Fix use $numlines instead $i
This commit is contained in:
parent
17f37cc9e1
commit
d120a391f9
@ -1084,9 +1084,9 @@ if (empty($reshook))
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($totalamount != 0) {
|
if ($totalamount != 0) {
|
||||||
$i = $i > 0 ? $i-1 : 0;
|
if ($numlines > 0) $numlines = $numlines-1;
|
||||||
$tva_tx = $lines[$i]->tva_tx;
|
$tva_tx = $lines[$numlines]->tva_tx;
|
||||||
if (! empty($lines[$i]->vat_src_code) && ! preg_match('/\(/', $tva_tx)) $tva_tx .= ' ('.$lines[$i]->vat_src_code.')';
|
if (! empty($lines[$numlines]->vat_src_code) && ! preg_match('/\(/', $tva_tx)) $tva_tx .= ' ('.$lines[$numlines]->vat_src_code.')';
|
||||||
$amountdeposit[$tva_tx] = ($totalamount * $valuedeposit) / 100;
|
$amountdeposit[$tva_tx] = ($totalamount * $valuedeposit) / 100;
|
||||||
} else {
|
} else {
|
||||||
$amountdeposit[0] = 0;
|
$amountdeposit[0] = 0;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user