From 23249751d57ab712642544027d72908cd6d61080 Mon Sep 17 00:00:00 2001 From: Gauthier PC portable 024 Date: Wed, 17 Nov 2021 12:10:12 +0100 Subject: [PATCH 01/99] FIX : reorder all lines when delete document line everywhere --- htdocs/commande/card.php | 2 ++ htdocs/compta/facture/card.php | 2 ++ htdocs/fourn/commande/card.php | 2 ++ htdocs/fourn/facture/card.php | 2 ++ 4 files changed, 8 insertions(+) diff --git a/htdocs/commande/card.php b/htdocs/commande/card.php index b9900459006..21b8897a3e3 100644 --- a/htdocs/commande/card.php +++ b/htdocs/commande/card.php @@ -216,6 +216,8 @@ if (empty($reshook)) $result = $object->deleteline($user, $lineid); if ($result > 0) { + // reorder lines + $object->line_order(true); // Define output language $outputlangs = $langs; $newlang = ''; diff --git a/htdocs/compta/facture/card.php b/htdocs/compta/facture/card.php index 86d3abedd2b..5a500eafe12 100644 --- a/htdocs/compta/facture/card.php +++ b/htdocs/compta/facture/card.php @@ -243,6 +243,8 @@ if (empty($reshook)) $result = $object->deleteline(GETPOST('lineid')); if ($result > 0) { + // reorder lines + $object->line_order(true); // Define output language $outputlangs = $langs; $newlang = ''; diff --git a/htdocs/fourn/commande/card.php b/htdocs/fourn/commande/card.php index f79f37d16e5..c85d1f56c29 100644 --- a/htdocs/fourn/commande/card.php +++ b/htdocs/fourn/commande/card.php @@ -805,6 +805,8 @@ if (empty($reshook)) $result = $object->deleteline($lineid); if ($result > 0) { + // reorder lines + $object->line_order(true); // Define output language $outputlangs = $langs; $newlang = ''; diff --git a/htdocs/fourn/facture/card.php b/htdocs/fourn/facture/card.php index 985c9a4cc62..d912f6917f7 100644 --- a/htdocs/fourn/facture/card.php +++ b/htdocs/fourn/facture/card.php @@ -253,6 +253,8 @@ if (empty($reshook)) $result = $object->deleteline($lineid); if ($result > 0) { + // reorder lines + $object->line_order(true); // Define output language /*$outputlangs = $langs; $newlang = ''; From e43b95f05a191a1a541bf6918c862b66541fa534 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A9lina?= Date: Tue, 30 Nov 2021 15:41:46 +0100 Subject: [PATCH 02/99] Show reference product --- htdocs/takepos/index.php | 20 +++++++++++++++++--- htdocs/takepos/invoice.php | 6 +++++- 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/htdocs/takepos/index.php b/htdocs/takepos/index.php index 8bd1c4dbca9..ad123ccd5e7 100644 --- a/htdocs/takepos/index.php +++ b/htdocs/takepos/index.php @@ -335,7 +335,11 @@ function LoadProducts(position, issubcat) { var titlestring = ; global->TAKEPOS_HIDE_PRODUCT_IMAGES) { echo '$("#prodivdesc"+ishow).show();'; - echo '$("#prodesc"+ishow).text(data[parseInt(idata)][\'label\']);'; + if ($conf->global->TAKEPOS_SHOW_PRODUCT_REFERENCE == 1) { + echo '$("#prodesc"+ishow).html(data[parseInt(idata)][\'ref\'].bold() + \' - \' + data[parseInt(idata)][\'label\']);'; + } else { + echo '$("#prodesc"+ishow).text(data[parseInt(idata)][\'label\']);'; + } echo '$("#proimg"+ishow).attr("title", titlestring);'; echo '$("#proimg"+ishow).attr("src", "genimg/index.php?query=pro&id="+data[idata][\'id\']);'; } else { @@ -401,7 +405,12 @@ function MoreProducts(moreorless) { else if ((data[idata]['status']) == "1") { //Only show products with status=1 (for sell) $("#prodivdesc"+ishow).show(); - $("#prodesc"+ishow).text(data[parseInt(idata)]['label']); + global->TAKEPOS_SHOW_PRODUCT_REFERENCE == 1) { ?> + $("#prodesc"+ishow).html(data[parseInt(idata)]['ref'].bold() + ' - ' + data[parseInt(idata)]['label']); + + $("#prodesc"+ishow).text(data[parseInt(idata)]['label']); + $("#probutton"+ishow).text(data[parseInt(idata)]['label']); $("#probutton"+ishow).show(); if (data[parseInt(idata)]['price_formated']) { @@ -579,7 +588,12 @@ function Search2(keyCodeForEnter) { $titlestring .= " + ' - ".dol_escape_js($langs->trans("Barcode").': ')."' + data[i]['barcode']"; ?> var titlestring = ; - $("#prodesc" + i).text(data[i]['label']); + global->TAKEPOS_SHOW_PRODUCT_REFERENCE == 1) { ?> + $("#prodesc" + i).html(data[i]['ref'].bold() + ' - ' + data[i]['label']); + + $("#prodesc" + i).text(data[i]['label']); + $("#prodivdesc" + i).show(); $("#probutton" + i).text(data[i]['label']); $("#probutton" + i).show(); diff --git a/htdocs/takepos/invoice.php b/htdocs/takepos/invoice.php index 2a951a505ae..01599cae4b6 100644 --- a/htdocs/takepos/invoice.php +++ b/htdocs/takepos/invoice.php @@ -1447,7 +1447,11 @@ if ($placeid > 0) { $tooltiptext .= $line->desc; } } - $htmlforlines .= $form->textwithpicto($line->product_label ? $line->product_label : ($line->product_ref ? $line->product_ref : dolGetFirstLineOfText($line->desc, 1)), $tooltiptext); + if ($conf->global->TAKEPOS_SHOW_PRODUCT_REFERENCE == 1) { + $htmlforlines .= $form->textwithpicto($line->product_label ? '' . $line->product_ref . ' - ' . $line->product_label : dolGetFirstLineOfText($line->desc, 1), $tooltiptext); + } else { + $htmlforlines .= $form->textwithpicto($line->product_label ? $line->product_label : ($line->product_ref ? $line->product_ref : dolGetFirstLineOfText($line->desc, 1)), $tooltiptext); + } } else { if ($line->product_label) { $htmlforlines .= $line->product_label; From 7c3b2f1e9bed3f2b45438810a89d2bba6c266dda Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Tue, 30 Nov 2021 15:07:59 +0000 Subject: [PATCH 03/99] Fixing style errors. --- htdocs/takepos/index.php | 2 +- htdocs/takepos/invoice.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/takepos/index.php b/htdocs/takepos/index.php index ad123ccd5e7..bf5428f81d0 100644 --- a/htdocs/takepos/index.php +++ b/htdocs/takepos/index.php @@ -589,7 +589,7 @@ function Search2(keyCodeForEnter) { ?> var titlestring = ; global->TAKEPOS_SHOW_PRODUCT_REFERENCE == 1) { ?> + if ($conf->global->TAKEPOS_SHOW_PRODUCT_REFERENCE == 1) { ?> $("#prodesc" + i).html(data[i]['ref'].bold() + ' - ' + data[i]['label']); $("#prodesc" + i).text(data[i]['label']); diff --git a/htdocs/takepos/invoice.php b/htdocs/takepos/invoice.php index 01599cae4b6..2f857e7a3ce 100644 --- a/htdocs/takepos/invoice.php +++ b/htdocs/takepos/invoice.php @@ -1447,9 +1447,9 @@ if ($placeid > 0) { $tooltiptext .= $line->desc; } } - if ($conf->global->TAKEPOS_SHOW_PRODUCT_REFERENCE == 1) { + if ($conf->global->TAKEPOS_SHOW_PRODUCT_REFERENCE == 1) { $htmlforlines .= $form->textwithpicto($line->product_label ? '' . $line->product_ref . ' - ' . $line->product_label : dolGetFirstLineOfText($line->desc, 1), $tooltiptext); - } else { + } else { $htmlforlines .= $form->textwithpicto($line->product_label ? $line->product_label : ($line->product_ref ? $line->product_ref : dolGetFirstLineOfText($line->desc, 1)), $tooltiptext); } } else { From 16ab6ce800a10887e31890d772a6356b34759f72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A9lina?= Date: Wed, 1 Dec 2021 10:26:24 +0100 Subject: [PATCH 04/99] No Category --- htdocs/takepos/index.php | 32 ++++++++++++++++++++++++-------- 1 file changed, 24 insertions(+), 8 deletions(-) diff --git a/htdocs/takepos/index.php b/htdocs/takepos/index.php index 8bd1c4dbca9..59205c638a6 100644 --- a/htdocs/takepos/index.php +++ b/htdocs/takepos/index.php @@ -1186,13 +1186,22 @@ if (!empty($conf->global->TAKEPOS_WEIGHING_SCALE)) {
+ } ?>" + global->TAKEPOS_NO_CATEGORY == 1) { + print ''; + } + ?>> -
- global->TAKEPOS_NO_CATEGORY == 1) { + print '