From cd8e79adf88bc50f64d260d2652736ccc697f77a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?LAPSAM5=5CSam=20Jocqu=C3=A9?= Date: Thu, 17 Dec 2020 15:22:49 +0100 Subject: [PATCH] Change invoiceBatchDate selection system to the one asked by MCN and the OA's on 17/12/2020 --- icc-x-api/utils/efact-util.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/icc-x-api/utils/efact-util.ts b/icc-x-api/utils/efact-util.ts index 9f5939c9..32fcf3ab 100644 --- a/icc-x-api/utils/efact-util.ts +++ b/icc-x-api/utils/efact-util.ts @@ -243,7 +243,7 @@ export function toInvoiceBatch( }) const invoiceDate = toMoment( _.get( - _.head(_.orderBy(dateCounts, ["count", "date"], ["desc", "desc"])), + _.head(_.orderBy(dateCounts, ["date"], ["desc"])), "date", invoicesWithPatient[0].invoiceDto.invoiceDate )