Correct the number of rows with predefined operations

This commit is contained in:
Dany De Bontridder 2016-02-29 21:42:54 +01:00
parent 0eadb1052c
commit bdfb364b7e
2 changed files with 12 additions and 4 deletions

View file

@ -126,14 +126,18 @@ class Pre_op_ach extends Pre_operation_detail
}
else
{
$array+=array("e_march".$count=>$row['opd_poste'],
if ( trim($row['opd_poste']) !="" )
{
$array+=array("e_march".$count=>$row['opd_poste'],
"e_march".$count."_price"=>$row['opd_amount'],
"e_march".$count."_tva_id"=>$row['opd_tva_id'],
"e_march".$count."_tva_amount"=>$row['opd_tva_amount'],
"e_quant".$count=>$row['opd_quantity']
);
$count++;
$count++;
}
}
$array['nb_item']=$count;
}
return $array;
}

View file

@ -124,16 +124,20 @@ class Pre_op_ven extends Pre_operation_detail
}
else
{
$array+=array("e_march".$count=>$row['opd_poste'],
if ( trim($row['opd_poste']) != "")
{
$array+=array("e_march".$count=>$row['opd_poste'],
"e_march".$count."_price"=>$row['opd_amount'],
"e_march".$count."_tva_id"=>$row['opd_tva_id'],
"e_quant".$count=>$row['opd_quantity'],
"e_march".$count."_label"=>$row['opd_comment'],
"e_march".$count."_tva_amount"=>$row['opd_tva_amount'],
);
$count++;
$count++;
}
}
}
$array['nb_item']=$count;
return $array;
}
/*!\brief load the data from the database and return an array