Merge pull request #20365 from gdsoftdev/fix_invoicelineorders

Fix : keep row order into invoices created from massactions
This commit is contained in:
Laurent Destailleur
2022-03-17 13:37:17 +01:00
committed by GitHub
4 changed files with 24 additions and 3 deletions

View File

@@ -719,7 +719,7 @@ if ($id > 0 || !empty($ref)) {
$sql .= $hookmanager->resPrint;
$sql .= " GROUP BY p.ref, p.label, p.tobatch, p.fk_default_warehouse, l.rowid, l.fk_product, l.subprice, l.remise_percent, l.ref"; // Calculation of amount dispatched is done per fk_product so we must group by fk_product
$sql .= " ORDER BY p.ref, p.label";
$sql .= " ORDER BY l.rang, p.ref, p.label";
$resql = $db->query($sql);
if ($resql) {