Acc_Ledger_Sold : avoid message when undefined variable

This commit is contained in:
Dany De Bontridder 2016-04-30 16:47:24 +02:00
parent a492905921
commit 2fcebf3d1f

View file

@ -157,7 +157,7 @@ class Acc_Ledger_Sold extends Acc_Ledger {
// foreach item
//----------------------------------------
for ($i = 0; $i < $nb_item; $i++) {
if (strlen(trim(${'e_march' . $i})) == 0)
if (! isset (${'e_march' . $i}) || strlen(trim(${'e_march' . $i})) == 0)
continue;
/* check if amount are numeric and */
if (isNumber(${'e_march' . $i . '_price'}) == 0)