Fix count into loop and test on true

This commit is contained in:
Laurent Destailleur 2016-10-17 20:10:53 +02:00
parent 17379cb5cd
commit 05b7c51e9d

View File

@ -2146,7 +2146,8 @@ class Facture extends CommonInvoice
if (!empty($conf->global->INVOICE_USE_SITUATION))
{
$final = True;
while ($i < count($this->lines) && $final == True) {
$nboflines = count($this->lines);
while (($i < $nboflines) && $final) {
$final = ($this->lines[$i]->situation_percent == 100);
$i++;
}