noalyss-commit
[Top][All Lists]
Advanced

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

[Noalyss-commit] [noalyss] 01/09: TVA : cannot load when tva_id is empty


From: Dany De Bontridder
Subject: [Noalyss-commit] [noalyss] 01/09: TVA : cannot load when tva_id is empty
Date: Mon, 17 Jan 2022 14:58:25 -0500 (EST)

sparkyx pushed a commit to branch devel
in repository noalyss.

commit c88c44d9353d4f155038c62f67bf7a9758b9ec33
Author: sparkyx <danydb@noalyss.eu>
AuthorDate: Tue Jan 4 17:43:38 2022 +0100

    TVA : cannot load when tva_id is empty
---
 include/class/acc_tva.class.php | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/include/class/acc_tva.class.php b/include/class/acc_tva.class.php
index b9a14a44..419e9ad7 100644
--- a/include/class/acc_tva.class.php
+++ b/include/class/acc_tva.class.php
@@ -138,6 +138,8 @@ class Acc_Tva
      */
     public function load()
     {
+        if ( trim($this->tva_id)=="" || isNumber($this->tva_id)==0) return -1;
+        
         $sql="select * from tva_rate where tva_id=$1";
         $res=$this->cn->exec_sql(
                  $sql,
@@ -176,6 +178,7 @@ class Acc_Tva
     }
     public function delete()
     {
+        if ( trim($this->tva_id)=="" || isNumber($this->tva_id)==0) return -1;
         $sql="delete from tva_rate where tva_id=$1";
         $res=$this->cn->exec_sql($sql,array($this->tva_id));
     }



reply via email to

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