From 804480ca2d07f80025927c7a4c33124aba8def6e Mon Sep 17 00:00:00 2001 From: JC Prieto Date: Thu, 25 Aug 2022 12:51:18 +0200 Subject: [PATCH 1/6] Update card.php Same behavior as products with not lot. (See line 1338). --- htdocs/expedition/card.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/htdocs/expedition/card.php b/htdocs/expedition/card.php index 4bec4220c6c..1bd4ca72dc2 100644 --- a/htdocs/expedition/card.php +++ b/htdocs/expedition/card.php @@ -1445,6 +1445,11 @@ if ($action == 'create') { } foreach ($product->stock_warehouse as $warehouse_id => $stock_warehouse) { + if (!empty($warehousePicking) && !in_array($warehouse_id, $warehousePicking)) { + // if a warehouse was selected by user, picking is limited to this warehouse and his children. + + continue; + } $tmpwarehouseObject->fetch($warehouse_id); if (($stock_warehouse->real > 0) && (count($stock_warehouse->detail_batch))) { foreach ($stock_warehouse->detail_batch as $dbatch) { From 215f89d5452abdde7282077a7d48ba49d25333a1 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 25 Aug 2022 23:44:57 +0200 Subject: [PATCH 2/6] Fix phpcs --- htdocs/expedition/card.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/htdocs/expedition/card.php b/htdocs/expedition/card.php index 1bd4ca72dc2..e8bfb0249b1 100644 --- a/htdocs/expedition/card.php +++ b/htdocs/expedition/card.php @@ -1446,8 +1446,7 @@ if ($action == 'create') { foreach ($product->stock_warehouse as $warehouse_id => $stock_warehouse) { if (!empty($warehousePicking) && !in_array($warehouse_id, $warehousePicking)) { - // if a warehouse was selected by user, picking is limited to this warehouse and his children. - + // if a warehouse was selected by user, picking is limited to this warehouse and his children. continue; } $tmpwarehouseObject->fetch($warehouse_id); From ec5af6cd23dd87c8be68b41867a8b0fe043cffcf Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 28 Aug 2022 23:32:36 +0200 Subject: [PATCH 3/6] Doc --- htdocs/holiday/class/holiday.class.php | 6 +++--- htdocs/install/mysql/tables/llx_holiday.sql | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/htdocs/holiday/class/holiday.class.php b/htdocs/holiday/class/holiday.class.php index 9a45a735716..3faf8e78770 100644 --- a/htdocs/holiday/class/holiday.class.php +++ b/htdocs/holiday/class/holiday.class.php @@ -85,17 +85,17 @@ class Holiday extends CommonObject public $statut = ''; // 1=draft, 2=validated, 3=approved /** - * @var int ID of user that must approve. TODO: there is no date for validation (date_valid is used for approval), add one. + * @var int ID of user that must approve. Real user for approval is fk_user_valid (old version) or fk_user_approve (new versions) */ public $fk_validator; /** - * @var int Date of approval. TODO: Add a field for approval date and use date_valid instead for validation. + * @var int Date of validation or approval. TODO: Use date_valid instead for validation. */ public $date_valid = ''; /** - * @var int ID of user that has approved (empty if not approved) + * @var int ID of user that has validated or approved (empty if not approved) */ public $fk_user_valid; diff --git a/htdocs/install/mysql/tables/llx_holiday.sql b/htdocs/install/mysql/tables/llx_holiday.sql index 992f9502394..a5a05197aa6 100644 --- a/htdocs/install/mysql/tables/llx_holiday.sql +++ b/htdocs/install/mysql/tables/llx_holiday.sql @@ -33,8 +33,8 @@ date_fin DATE NOT NULL, halfday integer DEFAULT 0, -- 0=start morning and end afternoon, -1=start afternoon end afternoon, 1=start morning and end morning, 2=start afternoon and end morning statut integer NOT NULL DEFAULT '1', fk_validator integer NOT NULL, -- who should approve -date_valid DATETIME DEFAULT NULL, -- date approval (both date valid and date_approval) -fk_user_valid integer DEFAULT NULL, -- user approval (both user valid and user that approved) +date_valid DATETIME DEFAULT NULL, -- date validation or approval (both date valid and date_approval) +fk_user_valid integer DEFAULT NULL, -- user validation or approval (both user valid and user that approved) date_approve DATETIME DEFAULT NULL, -- date approval (not used yet) fk_user_approve integer DEFAULT NULL, -- user approval (not used yet) date_refuse DATETIME DEFAULT NULL, From 185f8896c596f624dba5702346262b62ccac5d63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Mon, 29 Aug 2022 16:52:27 +0200 Subject: [PATCH 4/6] fix display date creation --- htdocs/reception/card.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/reception/card.php b/htdocs/reception/card.php index 9a679c067f8..3ee755bef37 100644 --- a/htdocs/reception/card.php +++ b/htdocs/reception/card.php @@ -1434,7 +1434,7 @@ if ($action == 'create') { // Date creation print ''.$langs->trans("DateCreation").''; - print ''.dol_print_date($object->date_creation, "dayhour")."\n"; + print ''.dol_print_date($object->date_creation, "dayhour", "tzuserrel")."\n"; print ''; // Delivery date planned From 017a2258ce5608102bf003c409d9058f0fb94ce2 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 31 Aug 2022 01:03:30 +0200 Subject: [PATCH 5/6] FIX bad sort order field on DMD in product lot page --- htdocs/product/reassortlot.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/product/reassortlot.php b/htdocs/product/reassortlot.php index 2bd62b2ce22..f432d97e403 100644 --- a/htdocs/product/reassortlot.php +++ b/htdocs/product/reassortlot.php @@ -369,10 +369,10 @@ if ($resql) { //print_liste_field_titre("DesiredStock", $_SERVER["PHP_SELF"], "p.desiredstock",$param,"",'',$sortfield,$sortorder, 'right ); print_liste_field_titre("Batch", $_SERVER["PHP_SELF"], "pb.batch", $param, "", '', $sortfield, $sortorder, 'center '); if (empty($conf->global->PRODUCT_DISABLE_SELLBY)) { - print_liste_field_titre("SellByDate", $_SERVER["PHP_SELF"], "pb.sellby", $param, "", '', $sortfield, $sortorder, 'center '); + print_liste_field_titre("SellByDate", $_SERVER["PHP_SELF"], "pl.sellby", $param, "", '', $sortfield, $sortorder, 'center '); } if (empty($conf->global->PRODUCT_DISABLE_EATBY)) { - print_liste_field_titre("EatByDate", $_SERVER["PHP_SELF"], "pb.eatby", $param, "", '', $sortfield, $sortorder, 'center '); + print_liste_field_titre("EatByDate", $_SERVER["PHP_SELF"], "pl.eatby", $param, "", '', $sortfield, $sortorder, 'center '); } print_liste_field_titre("PhysicalStock", $_SERVER["PHP_SELF"], "stock_physique", $param, "", '', $sortfield, $sortorder, 'right '); // TODO Add info of running suppliers/customers orders From 5c135b59eba913a5351842c721c615a2e3926ab2 Mon Sep 17 00:00:00 2001 From: Christian Foellmann Date: Tue, 30 Aug 2022 09:10:03 +0200 Subject: [PATCH 6/6] require missing signture.lib.php --- htdocs/core/lib/functions.lib.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 89cf3819d7e..f5206c700d0 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -7288,6 +7288,7 @@ function getCommonSubstitutionArray($outputlangs, $onlykey = 0, $exclude = null, $substitutionarray['__ONLINE_PAYMENT_URL__'] = $paymenturl; if (is_object($object) && $object->element == 'propal') { + require_once DOL_DOCUMENT_ROOT.'/core/lib/signature.lib.php'; $substitutionarray['__ONLINE_SIGN_URL__'] = getOnlineSignatureUrl(0, 'proposal', $object->ref); } if (!empty($conf->global->PROPOSAL_ALLOW_EXTERNAL_DOWNLOAD) && is_object($object) && $object->element == 'propal') {