From d13cb10c8bb253045d6cd59e70fffd75eab318e4 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 16 May 2022 21:02:09 +0200 Subject: [PATCH] Update facture.class.php --- htdocs/compta/facture/class/facture.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index 435b358ae32..a5cb99c2260 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -3009,7 +3009,7 @@ class Facture extends CommonInvoice return -1; } if (!empty($conf->global-> INVOICE_CHECK_POSTERIOR_DATE)) { - $last_of_type = $this->willBeLastOfSameType($allow_validated_drafts = true); + $last_of_type = $this->willBeLastOfSameType(true); if (!$last_of_type[0]) { $this->error = $langs->transnoentities("ErrorInvoiceIsNotLastOfSameType", $this->ref, dol_print_date($this->date, 'day'), dol_print_date($last_of_type[1], 'day')); return -1;