FIX ##5263

This commit is contained in:
Laurent Destailleur
2016-06-03 22:20:58 +02:00
parent f81a4c56b7
commit 149c6916f8
5 changed files with 28 additions and 13 deletions

View File

@@ -3278,9 +3278,12 @@ class Commande extends CommonOrder
$line->total_tva=19.6;
$line->remise_percent=0;
}
$prodid = mt_rand(1, $num_prods);
$line->fk_product=$prodids[$prodid];
if ($num_prods > 0)
{
$prodid = mt_rand(1, $num_prods);
$line->fk_product=$prodids[$prodid];
}
$this->lines[$xnbp]=$line;
$this->total_ht += $line->total_ht;