Merge pull request #11704 from defrance/patch-142

bad converting on php 7 is totalpaid is null
This commit is contained in:
Laurent Destailleur 2019-08-22 11:50:30 +02:00 committed by GitHub
commit 48361c481f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2058,7 +2058,10 @@ else
$totalpaid += $objp->amount; $totalpaid += $objp->amount;
$i++; $i++;
} }
$totalpaid = price2num($totalpaid); // Round $totalpaid to fix floating problem after addition into loop if (! is_null($totalpaid))
{
$totalpaid = price2num($totalpaid); // Round $totalpaid to fix floating problem after addition into loop
}
$remaintopay = price2num($object->total_ttc - $totalpaid); $remaintopay = price2num($object->total_ttc - $totalpaid);
$resteapayeraffiche = $remaintopay; $resteapayeraffiche = $remaintopay;