Fix situation invoice

This commit is contained in:
Laurent Destailleur 2026-02-02 20:02:28 +01:00
parent b28c19d48d
commit 3379457ed7
2 changed files with 4 additions and 2 deletions

View file

@ -1021,7 +1021,7 @@ class FactureLigne extends CommonInvoiceLine
$invoicecache[$invoiceid] = new Facture($this->db);
$invoicecache[$invoiceid]->fetch($invoiceid);
}
if ($invoicecache[$invoiceid]->type != Facture::TYPE_SITUATION) {
if (!$invoicecache[$invoiceid]->isSituationInvoice()) {
return 0;
}

View file

@ -348,7 +348,9 @@ $coldisplay++;
$old_fieldv = $line->getAllPrevProgress($line->fk_facture);
$fieldv = $tmp_fieldv + $old_fieldv;
print '<td class="nowrap right linecolcycleref"><input class="right" type="text" size="1" value="'.$fieldv.'" name="progress">%</td>';
print '<td class="nowrap right linecolcycleref"><input class="right" type="text" size="1" value="'.$fieldv.'" name="progress">%';
print ' '.$form->textwithpicto('', $langs->trans("PreviousProgress").' ('.$old_fieldv.'%)');
print '</td>';
} else {
print '<td class="nowrap right linecolcycleref"><input class="right" type="text" size="1" value="' . (GETPOSTISSET('progress') ? GETPOST('progress') : $line->situation_percent) . '" name="progress">%</td>';
}