From 4d661f1924d2d91c30492d4d730bea78271c1cb2 Mon Sep 17 00:00:00 2001 From: sparkyx Date: Thu, 2 Dec 2021 17:44:10 +0100 Subject: [PATCH] Bug , incompatibility php7 --- include/class/acc_tva.class.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/class/acc_tva.class.php b/include/class/acc_tva.class.php index 17ee87f96..421544eef 100644 --- a/include/class/acc_tva.class.php +++ b/include/class/acc_tva.class.php @@ -134,7 +134,7 @@ class Acc_Tva */ public function load() { - $sql="select tva_id,tva_label,tva_rate, tva_comment,tva_poste,tva_both_side from tva_rate where tva_id=$1"; + $sql="select * from tva_rate where tva_id=$1"; $res=$this->cn->exec_sql( $sql, array($this->tva_id) @@ -143,9 +143,9 @@ class Acc_Tva if ( $this->cn->size() == 0 ) return -1; $row=Database::fetch_array($res,0); - foreach ($row as $idx=>$value) + foreach (self::$variable as $idx) { - $this->$idx=$value; + $this->$idx=$row[$idx]; } return 0; }