Qual: Some methods object->addline used a first parameter that was

object->id, some not. Of course this was not a good pratice, since
object->id is already known so no need to provide it as parameter.
All methods addline in this case were modified to match good
pratice and be uniformed with others.
This commit is contained in:
Laurent Destailleur
2013-07-10 17:29:54 +02:00
parent 1ee67bd5b9
commit 27a435994a
14 changed files with 28 additions and 33 deletions

View File

@@ -186,7 +186,7 @@ for ($s = 0 ; $s < GEN_NUMBER_COMMANDE ; $s++)
$prodid = rand(1, $num_prods);
$product=new Product($db);
$result=$product->fetch($prodids[$prodid]);
$result=$com->addline($com->id, $product->description, $product->price, rand(1,5), 0, 0, 0, $prodids[$prodid], 0, 0, 0, $product->price_base_type, $product->price_ttc, '', '', $product->type);
$result=$com->addline($product->description, $product->price, rand(1,5), 0, 0, 0, $prodids[$prodid], 0, 0, 0, $product->price_base_type, $product->price_ttc, '', '', $product->type);
if ($result < 0)
{
dol_print_error($db,$propal->error);