Skip to content
Snippets Groups Projects
Commit af8608ab authored by Maxime Kohlhaas's avatar Maxime Kohlhaas
Browse files

Fix services dispatch on supplier order only if STOCK_SUPPORTS_SERVICES

parent 2b225c76
No related branches found
No related tags found
No related merge requests found
......@@ -386,6 +386,7 @@ if ($id > 0 || ! empty($ref))
$sql.= " FROM ".MAIN_DB_PREFIX."commande_fournisseurdet as l";
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."product as p ON l.fk_product=p.rowid";
$sql.= " WHERE l.fk_commande = ".$commande->id;
if(empty($conf->global->STOCK_SUPPORTS_SERVICES)) $sql.= " AND l.product_type = 0";
$sql.= " GROUP BY p.ref, p.label, p.tobatch, l.rowid, l.fk_product, l.subprice, l.remise_percent"; // Calculation of amount dispatched is done per fk_product so we must group by fk_product
$sql.= " ORDER BY p.ref, p.label";
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment