From af34a968fc2a0d4284cf68b7515d05f2f6f9ec5c Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Wed, 5 Oct 2022 10:31:32 +0200 Subject: [PATCH] FIX missing check if incoice as a payment (wrong status) --- htdocs/core/lib/invoice.lib.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/htdocs/core/lib/invoice.lib.php b/htdocs/core/lib/invoice.lib.php index 34bf65de8ba..2184520c11e 100644 --- a/htdocs/core/lib/invoice.lib.php +++ b/htdocs/core/lib/invoice.lib.php @@ -751,8 +751,10 @@ function getCustomerInvoiceLatestEditTable($maxCount = 5, $socid = 0) $result .= ''.$companystatic->getNomUrl(1, 'customer').''; $result .= ''.dol_print_date($db->jdate($obj->datec), 'day').''; $result .= ''.price($obj->total_ttc).''; - // TODO with "alreadypaid" parameter with value -1 the status of invoice validated with no paiement sort with "status3" (BillStatusStarted) - $result .= ''.$objectstatic->getLibStatut(5).''; + + // Check if invoice as a payment + $payment = $objectstatic->getSommePaiement(); + $result .= ''.$objectstatic->getLibStatut(5, $payment).''; $result .= '';