From e7a32834b7da05746f7123bffe6174cc2fcaa055 Mon Sep 17 00:00:00 2001 From: Lucas Marcouiller Date: Fri, 17 Sep 2021 12:55:09 +0200 Subject: [PATCH 01/13] Fix actions_addupdatedelete.inc.php on lang --- htdocs/core/actions_addupdatedelete.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/actions_addupdatedelete.inc.php b/htdocs/core/actions_addupdatedelete.inc.php index 8364c139baef4..a62fe016946ff 100644 --- a/htdocs/core/actions_addupdatedelete.inc.php +++ b/htdocs/core/actions_addupdatedelete.inc.php @@ -87,7 +87,7 @@ $value = $tmparraykey[GETPOST($key)].','.GETPOST($key.'2'); } else { if ($key == 'lang') { - $value = GETPOST($key, 'aZ09'); + $value = GETPOST($key, 'aZ09')?GETPOST($key, 'aZ09'):""; } else { $value = GETPOST($key, 'alphanohtml'); } From 7c4fe41e8446b1349c1577003c2ff364f9aede28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mika=C3=ABl=20MARTIN?= <52456749+BlueGarm@users.noreply.github.com> Date: Fri, 17 Sep 2021 13:17:23 +0200 Subject: [PATCH 02/13] Update inventory.php Add the product name after the reference for better visualization during inventories. --- htdocs/product/inventory/inventory.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/product/inventory/inventory.php b/htdocs/product/inventory/inventory.php index 1147869a7165f..916e9a4e01dce 100644 --- a/htdocs/product/inventory/inventory.php +++ b/htdocs/product/inventory/inventory.php @@ -748,7 +748,7 @@ function disablebuttonmakemovementandclose() { print $warehouse_static->getNomUrl(1); print ''; print ''; - print $product_static->getNomUrl(1); + print $product_static->getNomUrl(1).' - '.$product_static->label; print ''; if ($conf->productbatch->enabled) { From 51f80bbc68c325f4e3fe6ba947b01a8ac692104a Mon Sep 17 00:00:00 2001 From: Lucas Marcouiller Date: Fri, 17 Sep 2021 15:09:21 +0200 Subject: [PATCH 03/13] New : validate massaction KM --- htdocs/knowledgemanagement/knowledgerecord_list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/knowledgemanagement/knowledgerecord_list.php b/htdocs/knowledgemanagement/knowledgerecord_list.php index 0e8f3a12514c9..9f399bf09768e 100644 --- a/htdocs/knowledgemanagement/knowledgerecord_list.php +++ b/htdocs/knowledgemanagement/knowledgerecord_list.php @@ -371,7 +371,7 @@ // List of mass actions available $arrayofmassactions = array( - //'validate'=>$langs->trans("Validate"), + 'validate'=>$langs->trans("Validate"), //'generate_doc'=>$langs->trans("ReGeneratePDF"), //'builddoc'=>$langs->trans("PDFMerge"), //'presend'=>$langs->trans("SendByMail"), From 44ff73f5de338d35ef976976052bcf6bbb1b86b9 Mon Sep 17 00:00:00 2001 From: Maksim Stojkovic <18454392+maksimstojkovic@users.noreply.github.com> Date: Fri, 17 Sep 2021 23:50:00 +1000 Subject: [PATCH 04/13] Remove unused $nblines assignment Fixes the following warning received when attempting to generate a warehouse stock document using the default template: `count(): Parameter must be an array or an object that implements Countable in /var/www/html/core/modules/stock/doc/pdf_standard.modules.php on line 211`. $nblines is subsequently assigned on line 326, after which it is then used. --- htdocs/core/modules/stock/doc/pdf_standard.modules.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/htdocs/core/modules/stock/doc/pdf_standard.modules.php b/htdocs/core/modules/stock/doc/pdf_standard.modules.php index 5374245cea4da..0c627322d69b1 100644 --- a/htdocs/core/modules/stock/doc/pdf_standard.modules.php +++ b/htdocs/core/modules/stock/doc/pdf_standard.modules.php @@ -208,8 +208,6 @@ public function write_file($object, $outputlangs, $srctemplatepath = '', $hidede // Load traductions files required by page $outputlangs->loadLangs(array("main", "dict", "companies", "bills", "stocks", "orders", "deliveries")); - $nblines = count($object->lines); - if ($conf->stock->dir_output) { // Definition of $dir and $file if ($object->specimen) { From d69ef7c134fdb4f91050eeb90e8d592447e3589e Mon Sep 17 00:00:00 2001 From: Maksim Stojkovic <18454392+maksimstojkovic@users.noreply.github.com> Date: Sat, 18 Sep 2021 03:12:13 +1000 Subject: [PATCH 05/13] Fix typo in pdf_standard.modules.php --- htdocs/core/modules/movement/doc/pdf_standard.modules.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/modules/movement/doc/pdf_standard.modules.php b/htdocs/core/modules/movement/doc/pdf_standard.modules.php index 528f45ee96245..7f487fdcf94a5 100644 --- a/htdocs/core/modules/movement/doc/pdf_standard.modules.php +++ b/htdocs/core/modules/movement/doc/pdf_standard.modules.php @@ -35,7 +35,7 @@ /** * Class to build documents using ODF templates generator */ -class pdf_stdandard extends ModelePDFMovement +class pdf_standard extends ModelePDFMovement { /** * @var DoliDb Database handler From 25111d47ee81b1709255d23267c1a0ed14b74fff Mon Sep 17 00:00:00 2001 From: Maksim Stojkovic <18454392+maksimstojkovic@users.noreply.github.com> Date: Sat, 18 Sep 2021 03:51:12 +1000 Subject: [PATCH 06/13] New Enable PDF Regeneration in Stock List Enables PDF Regeneration in warehouse stock list --- htdocs/product/stock/movement_list.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/product/stock/movement_list.php b/htdocs/product/stock/movement_list.php index 161eec9904755..a3ceb84ed2348 100644 --- a/htdocs/product/stock/movement_list.php +++ b/htdocs/product/stock/movement_list.php @@ -864,6 +864,7 @@ // List of mass actions available $arrayofmassactions = array( + 'generate_doc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("ReGeneratePDF"), // 'presend'=>img_picto('', 'email', 'class="pictofixedwidth"').$langs->trans("SendByMail"), // 'builddoc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("PDFMerge"), ); From 018dbca5c0a0cfdf5a4b6b0dd10d56e3d97a8108 Mon Sep 17 00:00:00 2001 From: mschamp <34092708+mschamp@users.noreply.github.com> Date: Sat, 18 Sep 2021 12:51:32 +0200 Subject: [PATCH 07/13] Show inventory in table toConsume Add a column with the reel inventory to the production screen of manufacturing orders. This gives the user an indication if production is possible. --- htdocs/mrp/mo_production.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/htdocs/mrp/mo_production.php b/htdocs/mrp/mo_production.php index 678865805d716..458bcfca7bafc 100644 --- a/htdocs/mrp/mo_production.php +++ b/htdocs/mrp/mo_production.php @@ -721,6 +721,12 @@ print $langs->trans("Warehouse"); } print ''; + // Available + print ''; + if ($collapse || in_array($action, array('consumeorproduce', 'consumeandproduceall'))) { + print $langs->trans("Available"); + } + print ''; // Lot - serial if ($conf->productbatch->enabled) { print ''; @@ -864,6 +870,12 @@ print ''; print ''; // Warehouse print ''; + print ''; + if ($tmpproduct->stock_reel < ($line->qty-$alreadyconsumed)) { + print img_warning($langs->trans('StockTooLow')).' '; + } + print $tmpproduct->stock_reel; // Available + print ''; if ($conf->productbatch->enabled) { print ''; // Lot } From 5bb50ec9511f5a8fb5050c1d9b74896fd800ad20 Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Sat, 18 Sep 2021 13:47:18 +0200 Subject: [PATCH 08/13] Fix error when adding sql filter with hook in knowledgerecord --- htdocs/knowledgemanagement/knowledgerecord_list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/knowledgemanagement/knowledgerecord_list.php b/htdocs/knowledgemanagement/knowledgerecord_list.php index 0e8f3a12514c9..8ec8ae62e2f61 100644 --- a/htdocs/knowledgemanagement/knowledgerecord_list.php +++ b/htdocs/knowledgemanagement/knowledgerecord_list.php @@ -226,7 +226,7 @@ // Add fields from hooks $parameters = array(); $reshook = $hookmanager->executeHooks('printFieldListSelect', $parameters, $object); // Note that $action and $object may have been modified by hook -$sql .= preg_replace('/^,/', '', $hookmanager->resPrint); +$sql .= preg_replace('/^,/', ',', $hookmanager->resPrint); $sql = preg_replace('/,\s*$/', '', $sql); $sql .= " FROM ".MAIN_DB_PREFIX.$object->table_element." as t"; if (is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label'])) { From b8d37ec37e77b416c2bfc16572943315afd4cb94 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 18 Sep 2021 16:12:10 +0200 Subject: [PATCH 09/13] Update mo_production.php --- htdocs/mrp/mo_production.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/mrp/mo_production.php b/htdocs/mrp/mo_production.php index 42aa1b6c14ed1..c2a6965186821 100644 --- a/htdocs/mrp/mo_production.php +++ b/htdocs/mrp/mo_production.php @@ -873,7 +873,8 @@ } print ' '.$alreadyconsumed; print ''; - print ''; // Warehouse + // Warehouse + print ''; print ''; print ''; if ($tmpproduct->stock_reel < ($line->qty-$alreadyconsumed)) { From e9e0258444265bd7422f054fd6fee6a8a269d97c Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 18 Sep 2021 16:14:42 +0200 Subject: [PATCH 10/13] Update mo_production.php --- htdocs/mrp/mo_production.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/htdocs/mrp/mo_production.php b/htdocs/mrp/mo_production.php index c2a6965186821..75be12ffc3969 100644 --- a/htdocs/mrp/mo_production.php +++ b/htdocs/mrp/mo_production.php @@ -726,12 +726,14 @@ print $langs->trans("Warehouse"); } print ''; - // Available - print ''; - if ($collapse || in_array($action, array('consumeorproduce', 'consumeandproduceall'))) { - print $langs->trans("Available"); + if ($conf->productbatch->enabled) { + // Available + print ''; + if ($collapse || in_array($action, array('consumeorproduce', 'consumeandproduceall'))) { + print $langs->trans("Available"); + } + print ''; } - print ''; // Lot - serial if ($conf->productbatch->enabled) { print ''; From c37767c5a05e77e0be8630845d560d9f8cf36c91 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 18 Sep 2021 16:15:21 +0200 Subject: [PATCH 11/13] Update mo_production.php --- htdocs/mrp/mo_production.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/htdocs/mrp/mo_production.php b/htdocs/mrp/mo_production.php index 75be12ffc3969..97246d120c8b2 100644 --- a/htdocs/mrp/mo_production.php +++ b/htdocs/mrp/mo_production.php @@ -878,12 +878,14 @@ // Warehouse print ''; print ''; - print ''; - if ($tmpproduct->stock_reel < ($line->qty-$alreadyconsumed)) { - print img_warning($langs->trans('StockTooLow')).' '; + if ($conf->stock->enabled) { + print ''; + if ($tmpproduct->stock_reel < ($line->qty-$alreadyconsumed)) { + print img_warning($langs->trans('StockTooLow')).' '; + } + print $tmpproduct->stock_reel; // Available + print ''; } - print $tmpproduct->stock_reel; // Available - print ''; if ($conf->productbatch->enabled) { print ''; // Lot } From 91bf2a8d7704d064d733946311c85ece360b5a5e Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 18 Sep 2021 16:16:28 +0200 Subject: [PATCH 12/13] Update mo_production.php --- htdocs/mrp/mo_production.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/mrp/mo_production.php b/htdocs/mrp/mo_production.php index 97246d120c8b2..60e05f90da15f 100644 --- a/htdocs/mrp/mo_production.php +++ b/htdocs/mrp/mo_production.php @@ -880,7 +880,7 @@ print ''; if ($conf->stock->enabled) { print ''; - if ($tmpproduct->stock_reel < ($line->qty-$alreadyconsumed)) { + if ($tmpproduct->stock_reel < ($line->qty - $alreadyconsumed)) { print img_warning($langs->trans('StockTooLow')).' '; } print $tmpproduct->stock_reel; // Available From a81ee14593b241b40994a08dcfc3d17113d10886 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 18 Sep 2021 16:18:09 +0200 Subject: [PATCH 13/13] Update mo_production.php --- htdocs/mrp/mo_production.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/mrp/mo_production.php b/htdocs/mrp/mo_production.php index 60e05f90da15f..929e82824d6f7 100644 --- a/htdocs/mrp/mo_production.php +++ b/htdocs/mrp/mo_production.php @@ -730,7 +730,7 @@ // Available print ''; if ($collapse || in_array($action, array('consumeorproduce', 'consumeandproduceall'))) { - print $langs->trans("Available"); + print $langs->trans("Stock"); } print ''; }