Qual: Fix getLibStatut notices with type hinting

This commit is contained in:
MDW
2025-03-01 13:10:45 +01:00
parent c18f84d948
commit 0533c28d56

View File

@@ -3213,12 +3213,14 @@ function dol_banner_tab($object, $paramid, $morehtml = '', $shownav = 1, $fieldi
$morehtmlstatus .= '<span class="statusrefbuy">'.$object->getLibStatut(6, 1).'</span>';
}
} elseif (in_array($object->element, array('salary'))) {
'@phan-var-force Salary $object';
$tmptxt = $object->getLibStatut(6, $object->alreadypaid);
if (empty($tmptxt) || $tmptxt == $object->getLibStatut(3)) {
$tmptxt = $object->getLibStatut(5, $object->alreadypaid);
}
$morehtmlstatus .= $tmptxt;
} elseif (in_array($object->element, array('facture', 'invoice', 'invoice_supplier'))) { // TODO Move this to use ->alreadypaid
'@phan-var-force Facture|FactureFournisseur|CommonInvoice $object';
$totalallpayments = $object->getSommePaiement(0);
$totalallpayments += $object->getSumCreditNotesUsed(0);
$totalallpayments += $object->getSumDepositsUsed(0);
@@ -3228,6 +3230,7 @@ function dol_banner_tab($object, $paramid, $morehtml = '', $shownav = 1, $fieldi
}
$morehtmlstatus .= $tmptxt;
} elseif (in_array($object->element, array('chargesociales', 'loan', 'tva'))) { // TODO Move this to use ->alreadypaid
'@phan-var-force ChargeSociales|Loan|Tva $object';
$tmptxt = $object->getLibStatut(6, $object->totalpaid);
if (empty($tmptxt) || $tmptxt == $object->getLibStatut(3)) {
$tmptxt = $object->getLibStatut(5, $object->totalpaid);