From eb6b42d1e34f8f177f58f62e473b26a59bb6b017 Mon Sep 17 00:00:00 2001 From: Anthony Berton Date: Tue, 17 Jan 2023 11:25:16 +0100 Subject: [PATCH] NEW - Add sub total in order list det --- htdocs/commande/list_det.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/htdocs/commande/list_det.php b/htdocs/commande/list_det.php index fd36f229e5c..e638e56ff9a 100644 --- a/htdocs/commande/list_det.php +++ b/htdocs/commande/list_det.php @@ -1402,6 +1402,7 @@ if ($resql) { $total_ht = 0; $total_margin = 0; + // Détail commande $totalqty = 0; @@ -1419,6 +1420,15 @@ if ($resql) { $text_warning = ''; $nbprod = 0; + // Print SubTotal + if (empty($i)) { + $oldref = $obj->product_ref; + } + if ($oldref != $obj->product_ref) { + include DOL_DOCUMENT_ROOT.'/core/tpl/list_print_total.tpl.php'; + $oldref = $obj->product_ref; + } + $companystatic->id = $obj->socid; $companystatic->name = $obj->name; $companystatic->name_alias = $obj->alias;