From e7bf06eaf3d9b7a6f9a2c732afa16bc442dcd773 Mon Sep 17 00:00:00 2001 From: Tim van Oostrom Date: Thu, 19 Dec 2024 10:18:48 +0100 Subject: [PATCH 1/2] Also Add BA --- src/server/services/afis/afis-facturen.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server/services/afis/afis-facturen.ts b/src/server/services/afis/afis-facturen.ts index 856ab1ec1f..1e8721f22c 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`; From 2f920e05a593cc08a88dd8342fe90701fad41860 Mon Sep 17 00:00:00 2001 From: Tim van Oostrom Date: Thu, 19 Dec 2024 10:39:26 +0100 Subject: [PATCH 2/2] Re-use existing --- src/server/services/afis/afis-facturen.test.ts | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/server/services/afis/afis-facturen.test.ts b/src/server/services/afis/afis-facturen.test.ts index 04ebecfcb3..acbc77208f 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',