Merge branch '19.0' of git@github.com:Dolibarr/dolibarr.git into 20.0

This commit is contained in:
Laurent Destailleur
2024-10-14 21:18:24 +02:00
16 changed files with 93 additions and 29 deletions

View File

@@ -2950,7 +2950,16 @@ function dol_banner_tab($object, $paramid, $morehtml = '', $shownav = 1, $fieldi
$tmptxt = $object->getLibStatut(5, $object->alreadypaid);
}
$morehtmlstatus .= $tmptxt;
} elseif (in_array($object->element, array('facture', 'invoice', 'invoice_supplier', 'chargesociales', 'loan', 'tva'))) { // TODO Move this to use ->alreadypaid
} elseif (in_array($object->element, array('facture', 'invoice', 'invoice_supplier'))) { // TODO Move this to use ->alreadypaid
$totalallpayments = $object->getSommePaiement(0);
$totalallpayments += $object->getSumCreditNotesUsed(0);
$totalallpayments += $object->getSumDepositsUsed(0);
$tmptxt = $object->getLibStatut(6, $totalallpayments);
if (empty($tmptxt) || $tmptxt == $object->getLibStatut(3)) {
$tmptxt = $object->getLibStatut(5, $totalallpayments);
}
$morehtmlstatus .= $tmptxt;
} elseif (in_array($object->element, array('chargesociales', 'loan', 'tva'))) { // TODO Move this to use ->alreadypaid
$tmptxt = $object->getLibStatut(6, $object->totalpaid);
if (empty($tmptxt) || $tmptxt == $object->getLibStatut(3)) {
$tmptxt = $object->getLibStatut(5, $object->totalpaid);