Update card.php

This commit is contained in:
Laurent Destailleur 2022-05-16 21:01:48 +02:00 committed by GitHub
parent 82017d7a39
commit 7890d6f7f6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -305,7 +305,7 @@ if (empty($reshook)) {
$object->fetch($id);
if (!empty($conf->global-> INVOICE_CHECK_POSTERIOR_DATE)) {
$last_of_type = $object->willBeLastOfSameType($allow_validated_drafts = true);
$last_of_type = $object->willBeLastOfSameType(true);
if (empty($object->date_validation) && !$last_of_type[0]) {
setEventMessages($langs->transnoentities("ErrorInvoiceIsNotLastOfSameType", $object->ref, dol_print_date($object->date, 'day'), dol_print_date($last_of_type[1], 'day')), null, 'errors');
$action = '';