mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-07 16:41:48 +01:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user