From 3aa41a25b935eb3ddeddf53fcbe5d68962bcdd13 Mon Sep 17 00:00:00 2001
From: Lenin Rivas <53640168+leninrivas@users.noreply.github.com>
Date: Sat, 2 Jul 2022 12:23:46 -0500
Subject: [PATCH 1/4] Correct Stock in Shipment
---
htdocs/expedition/shipment.php | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/htdocs/expedition/shipment.php b/htdocs/expedition/shipment.php
index a64e6c2b761..79f3976310f 100644
--- a/htdocs/expedition/shipment.php
+++ b/htdocs/expedition/shipment.php
@@ -797,6 +797,10 @@ if ($id > 0 || !empty($ref)) {
print $product->stock_reel;
if ($product->stock_reel < $toBeShipped[$objp->fk_product]) {
print ' '.img_warning($langs->trans("StockTooLow"));
+ if (!empty($conf->global->STOCK_CORRECT_STOCK_IN_SHIPMENT)) {
+ $nbPiece = $toBeShipped[$objp->fk_product] - $product->stock_reel;
+ print ' '.$langs->trans("GoTo").' id.'').'">'.$langs->trans("CorrectStock").'';
+ }
}
print '';
} else {
From 7d9ab1b71720a8a448ec7b09703c2f9ed1fe1541 Mon Sep 17 00:00:00 2001
From: stickler-ci
Date: Sat, 2 Jul 2022 17:28:16 +0000
Subject: [PATCH 2/4] Fixing style errors.
---
htdocs/expedition/shipment.php | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/htdocs/expedition/shipment.php b/htdocs/expedition/shipment.php
index 79f3976310f..60589d56292 100644
--- a/htdocs/expedition/shipment.php
+++ b/htdocs/expedition/shipment.php
@@ -798,9 +798,9 @@ if ($id > 0 || !empty($ref)) {
if ($product->stock_reel < $toBeShipped[$objp->fk_product]) {
print ' '.img_warning($langs->trans("StockTooLow"));
if (!empty($conf->global->STOCK_CORRECT_STOCK_IN_SHIPMENT)) {
- $nbPiece = $toBeShipped[$objp->fk_product] - $product->stock_reel;
- print ' '.$langs->trans("GoTo").' id.'').'">'.$langs->trans("CorrectStock").'';
- }
+ $nbPiece = $toBeShipped[$objp->fk_product] - $product->stock_reel;
+ print ' '.$langs->trans("GoTo").' id.'').'">'.$langs->trans("CorrectStock").'';
+ }
}
print '';
} else {
From 18a6f52abb5831442cf6ad60dc8ba15a2b6d4044 Mon Sep 17 00:00:00 2001
From: Laurent Destailleur
Date: Mon, 4 Jul 2022 01:20:50 +0200
Subject: [PATCH 3/4] Update shipment.php
---
htdocs/expedition/shipment.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/htdocs/expedition/shipment.php b/htdocs/expedition/shipment.php
index 60589d56292..bf030de51c2 100644
--- a/htdocs/expedition/shipment.php
+++ b/htdocs/expedition/shipment.php
@@ -799,7 +799,7 @@ if ($id > 0 || !empty($ref)) {
print ' '.img_warning($langs->trans("StockTooLow"));
if (!empty($conf->global->STOCK_CORRECT_STOCK_IN_SHIPMENT)) {
$nbPiece = $toBeShipped[$objp->fk_product] - $product->stock_reel;
- print ' '.$langs->trans("GoTo").' id.'').'">'.$langs->trans("CorrectStock").'';
+ print ' '.$langs->trans("GoTo").' id).'').'">'.$langs->trans("CorrectStock").'';
}
}
print '';
From 3f354be1192b1fac253d1012c1016d823544bc59 Mon Sep 17 00:00:00 2001
From: Laurent Destailleur
Date: Mon, 4 Jul 2022 01:21:41 +0200
Subject: [PATCH 4/4] Update shipment.php
---
htdocs/expedition/shipment.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/htdocs/expedition/shipment.php b/htdocs/expedition/shipment.php
index bf030de51c2..328a84430a9 100644
--- a/htdocs/expedition/shipment.php
+++ b/htdocs/expedition/shipment.php
@@ -799,7 +799,7 @@ if ($id > 0 || !empty($ref)) {
print ' '.img_warning($langs->trans("StockTooLow"));
if (!empty($conf->global->STOCK_CORRECT_STOCK_IN_SHIPMENT)) {
$nbPiece = $toBeShipped[$objp->fk_product] - $product->stock_reel;
- print ' '.$langs->trans("GoTo").' id).'').'">'.$langs->trans("CorrectStock").'';
+ print ' '.$langs->trans("GoTo").' id)).'">'.$langs->trans("CorrectStock").'';
}
}
print '';