From e46541708c36e8b44af4be39e267620a8a802fe4 Mon Sep 17 00:00:00 2001 From: andreubisquerra Date: Wed, 30 Mar 2022 17:49:54 +0200 Subject: [PATCH 1/2] Avoid grouping lines with ordered lines --- htdocs/takepos/invoice.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/takepos/invoice.php b/htdocs/takepos/invoice.php index 436c98c294f..d7de5ffd7e8 100644 --- a/htdocs/takepos/invoice.php +++ b/htdocs/takepos/invoice.php @@ -535,7 +535,7 @@ if ($action == "addline") { } $idoflineadded = 0; - if (!empty($conf->global->TAKEPOS_GROUP_SAME_PRODUCT)) { + if (!empty($conf->global->TAKEPOS_GROUP_SAME_PRODUCT) && $line->special_code != "4") { foreach ($invoice->lines as $line) { if ($line->product_ref == $prod->ref) { if ($line->special_code==4) continue; // If this line is sended to printer create new line From 7f4e71f66f7db0a7b4699ac4871c74a4bd836223 Mon Sep 17 00:00:00 2001 From: andreubisquerra Date: Thu, 31 Mar 2022 21:43:48 +0200 Subject: [PATCH 2/2] Comments --- htdocs/takepos/invoice.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/takepos/invoice.php b/htdocs/takepos/invoice.php index d7de5ffd7e8..1dbf033482d 100644 --- a/htdocs/takepos/invoice.php +++ b/htdocs/takepos/invoice.php @@ -535,6 +535,7 @@ if ($action == "addline") { } $idoflineadded = 0; + // Group if enabled. Skip group if line already sent to the printer if (!empty($conf->global->TAKEPOS_GROUP_SAME_PRODUCT) && $line->special_code != "4") { foreach ($invoice->lines as $line) { if ($line->product_ref == $prod->ref) {