From a0c9cf2d8d0e9b374eb435350e30fe14bd53c9ea Mon Sep 17 00:00:00 2001 From: henrynopo Date: Thu, 26 Aug 2021 12:31:20 +0800 Subject: [PATCH 1/5] Update card.php --- htdocs/expedition/card.php | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/htdocs/expedition/card.php b/htdocs/expedition/card.php index 582b23aec45..c4ec3504383 100644 --- a/htdocs/expedition/card.php +++ b/htdocs/expedition/card.php @@ -717,6 +717,16 @@ if (empty($reshook)) { unset($_POST[$qty]); } } + } else { // both product batch and stock are not activated. + $qty = "qtyl".$line_id; + $line->id = $line_id; + $line->qty = GETPOST($qty, 'int'); + $line->entrepot_id = 0; + if ($line->update($user) < 0) { + setEventMessages($line->error, $line->errors, 'errors'); + $error++; + } + unset($_POST[$qty]); } } else { // Product no predefined @@ -2252,6 +2262,16 @@ if ($action == 'create') { print ''; print ''; } + } else { // both product batch and stock are not activated. + print ''; + print ''; + // Qty to ship or shipped + print ''; + // Warehouse source + print ''; + // Batch number managment + print ''; + print ''; } print ''; From faf1d52d9190747648c5a6fcbff3cf31a1fcb2de Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 28 Aug 2021 16:32:22 +0200 Subject: [PATCH 2/5] Update card.php --- htdocs/expedition/card.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/expedition/card.php b/htdocs/expedition/card.php index c4ec3504383..e020758fbbb 100644 --- a/htdocs/expedition/card.php +++ b/htdocs/expedition/card.php @@ -717,7 +717,7 @@ if (empty($reshook)) { unset($_POST[$qty]); } } - } else { // both product batch and stock are not activated. + } elsif (empty($conf->stock->enabled) && empty($conf->productbatch->enabled)) { // both product batch and stock are not activated. $qty = "qtyl".$line_id; $line->id = $line_id; $line->qty = GETPOST($qty, 'int'); From 2ddebc123ab8eb67f1561555532a6b42d73a1ebf Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Sat, 28 Aug 2021 14:32:44 +0000 Subject: [PATCH 3/5] Fixing style errors. --- htdocs/expedition/card.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/htdocs/expedition/card.php b/htdocs/expedition/card.php index e020758fbbb..e8455c906ef 100644 --- a/htdocs/expedition/card.php +++ b/htdocs/expedition/card.php @@ -717,15 +717,15 @@ if (empty($reshook)) { unset($_POST[$qty]); } } - } elsif (empty($conf->stock->enabled) && empty($conf->productbatch->enabled)) { // both product batch and stock are not activated. + } elsif(empty($conf->stock->enabled) && empty($conf->productbatch->enabled)) { // both product batch and stock are not activated. $qty = "qtyl".$line_id; $line->id = $line_id; $line->qty = GETPOST($qty, 'int'); $line->entrepot_id = 0; - if ($line->update($user) < 0) { - setEventMessages($line->error, $line->errors, 'errors'); - $error++; - } + if ($line->update($user) < 0) { + setEventMessages($line->error, $line->errors, 'errors'); + $error++; + } unset($_POST[$qty]); } } else { From 31ca781236bcb96a0c9812d6a20787e1b2a4805c Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 28 Aug 2021 16:34:38 +0200 Subject: [PATCH 4/5] Update card.php --- htdocs/expedition/card.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/expedition/card.php b/htdocs/expedition/card.php index e8455c906ef..8ab667780f0 100644 --- a/htdocs/expedition/card.php +++ b/htdocs/expedition/card.php @@ -717,7 +717,7 @@ if (empty($reshook)) { unset($_POST[$qty]); } } - } elsif(empty($conf->stock->enabled) && empty($conf->productbatch->enabled)) { // both product batch and stock are not activated. + } elseif (empty($conf->stock->enabled) && empty($conf->productbatch->enabled)) { // both product batch and stock are not activated. $qty = "qtyl".$line_id; $line->id = $line_id; $line->qty = GETPOST($qty, 'int'); @@ -2262,7 +2262,7 @@ if ($action == 'create') { print ''; print ''; } - } else { // both product batch and stock are not activated. + } elseif (empty($conf->stock->enabled) && empty($conf->productbatch->enabled)) { // both product batch and stock are not activated. print ''; print ''; // Qty to ship or shipped From e60cf96c8eb669904c91e68fa845325c10832c80 Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Sat, 28 Aug 2021 14:35:01 +0000 Subject: [PATCH 5/5] Fixing style errors. --- htdocs/expedition/card.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/expedition/card.php b/htdocs/expedition/card.php index 8ab667780f0..d4ea2fa006c 100644 --- a/htdocs/expedition/card.php +++ b/htdocs/expedition/card.php @@ -722,10 +722,10 @@ if (empty($reshook)) { $line->id = $line_id; $line->qty = GETPOST($qty, 'int'); $line->entrepot_id = 0; - if ($line->update($user) < 0) { - setEventMessages($line->error, $line->errors, 'errors'); - $error++; - } + if ($line->update($user) < 0) { + setEventMessages($line->error, $line->errors, 'errors'); + $error++; + } unset($_POST[$qty]); } } else {