[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));
}
- [Noalyss-commit] [noalyss] branch devel updated (82808d24 -> 55f9dd9a), Dany De Bontridder, 2022/01/17
- [Noalyss-commit] [noalyss] 05/09: PHPUNIT : adapt test, Dany De Bontridder, 2022/01/17
- [Noalyss-commit] [noalyss] 06/09: Fix bug for Reconcilied, Dany De Bontridder, 2022/01/17
- [Noalyss-commit] [noalyss] 02/09: Bug #2118 Manage User problem, Dany De Bontridder, 2022/01/17
- [Noalyss-commit] [noalyss] 03/09: New #0002117: Lettrage : montre l'opération liée, Dany De Bontridder, 2022/01/17
- [Noalyss-commit] [noalyss] 07/09: Critical : password issue, Dany De Bontridder, 2022/01/17
- [Noalyss-commit] [noalyss] 08/09: Adapt to security change, Dany De Bontridder, 2022/01/17
- [Noalyss-commit] [noalyss] 09/09: Task #0002126: Fiche : amélioration, Dany De Bontridder, 2022/01/17
- [Noalyss-commit] [noalyss] 04/09: Give error with PHPUNIT, Dany De Bontridder, 2022/01/17
- [Noalyss-commit] [noalyss] 01/09: TVA : cannot load when tva_id is empty,
Dany De Bontridder <=