noalyss-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Noalyss-commit] [noalyss] 20/34: Fix : if there is no stock there is an


From: Dany De Bontridder
Subject: [Noalyss-commit] [noalyss] 20/34: Fix : if there is no stock there is an exception instead of a warning
Date: Sun, 5 Feb 2023 04:41:41 -0500 (EST)

sparkyx pushed a commit to branch devel
in repository noalyss.

commit 59ddb6e97f8e029aa9b9415c1a7aa905db296b89
Author: sparkyx <danydb@noalyss.eu>
AuthorDate: Sun Jan 15 22:25:28 2023 +0100

    Fix : if there is no stock there is an exception instead of a warning
---
 include/class/stock_goods.class.php | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/include/class/stock_goods.class.php 
b/include/class/stock_goods.class.php
index 1e2d8da7d..668f07985 100644
--- a/include/class/stock_goods.class.php
+++ b/include/class/stock_goods.class.php
@@ -74,10 +74,10 @@ class Stock_Goods extends Stock_Goods_Sql
                $motif->size = 80;
                $idepo = HtmlInput::select_stock($cn, "p_depot", "W");
                $idepo->setReadOnly($p_readonly);
-               if (count($idepo->value) == 0)
+               if (empty($idepo->value) )
                {
-                       NoAccess();
-                       die();
+                       echo_warning(_("Aucun stock disponible"));
+                       return;
                }
                $idepo->selected = $p_depot;
                 if ($p_readonly ) {



reply via email to

[Prev in Thread] Current Thread [Next in Thread]