Fix: Initialise $amount_ttc_diff to fix PhanUndeclaredVariableAssignOp

This commit is contained in:
MDW
2024-03-18 13:06:35 +01:00
parent 83f2282517
commit a5d16b326b

View File

@@ -1172,6 +1172,7 @@ if (empty($reshook)) {
$TTotalByTva[$line->tva_tx] += $line->total_ttc;
}
$amount_ttc_diff = 0.;
foreach ($TTotalByTva as $tva => &$total) {
$coef = $total / $srcobject->total_ttc; // Calc coef
$am = $amount * $coef;