diff --git a/src/server/services/afis/afis-facturen.test.ts b/src/server/services/afis/afis-facturen.test.ts index 04ebecfcb..acbc77208 100644 --- a/src/server/services/afis/afis-facturen.test.ts +++ b/src/server/services/afis/afis-facturen.test.ts @@ -71,7 +71,7 @@ const ROUTES = { }, deelbetalingen: (uri: string) => decodeURI(uri).includes( - `IsCleared eq false and InvoiceReference ne '' and (AccountingDocumentType eq 'AB')` + `IsCleared eq false and InvoiceReference ne '' and` ), }; @@ -699,13 +699,7 @@ describe('afis-facturen', async () => { }, }; - remoteApi - .get((uri) => - decodeURI(uri).includes( - `IsCleared eq false and InvoiceReference ne '' and (AccountingDocumentType eq 'AB')` - ) - ) - .reply(200, deelbetalingenResponse); + remoteApi.get(ROUTES.deelbetalingen).reply(200, deelbetalingenResponse); const params: AfisFacturenParams = { state: 'deelbetalingen', diff --git a/src/server/services/afis/afis-facturen.ts b/src/server/services/afis/afis-facturen.ts index 856ab1ec1..1e8721f22 100644 --- a/src/server/services/afis/afis-facturen.ts +++ b/src/server/services/afis/afis-facturen.ts @@ -56,7 +56,7 @@ const accountingDocumentTypesByState: Record< open: ['DR', 'DG', 'DM', 'DE', 'DF', 'DV', 'DW'], afgehandeld: ['DR', 'DE', 'DM', 'DV', 'DG', 'DF', 'DM', 'DW'], overgedragen: ['DR', 'DE', 'DM', 'DV', 'DG', 'DF', 'DM', 'DW'], - deelbetalingen: ['AB'], + deelbetalingen: ['AB', 'BA'], }; const select = `$select=IsCleared,ReverseDocument,Paylink,PostingDate,ProfitCenterName,DocumentReferenceID,AccountingDocument,AmountInBalanceTransacCrcy,NetDueDate,DunningLevel,DunningBlockingReason,SEPAMandate,ClearingDate,PaymentMethod`;