From d0d2acb898c8ad8c8a6b5a2df71574599e440700 Mon Sep 17 00:00:00 2001 From: sparkyx Date: Sun, 29 Dec 2024 16:45:29 +0100 Subject: [PATCH] =?UTF-8?q?0002402:=20TVA=20:=20pr=C3=A9f=C3=A9rence:=20vi?= =?UTF-8?q?sible=20dans=20d=C3=A9tail=20Achat=20et=20Vente?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- include/class/acc_tva.class.php | 4 ++-- include/template/ledger_detail_ach.php | 2 ++ include/template/ledger_detail_ven.php | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/include/class/acc_tva.class.php b/include/class/acc_tva.class.php index 43a66b9b7..e9df34fc0 100644 --- a/include/class/acc_tva.class.php +++ b/include/class/acc_tva.class.php @@ -95,7 +95,7 @@ class Acc_Tva return $this->$idx; } - echo (__FILE__.":".__LINE__."AT97:Erreur attribut inexistant [$p_string]"); + throw new Exception("ACC98"."Attribut inexistant $p_string",EXC_INVALID); } public function set_parameter($p_string,$p_value) { @@ -105,7 +105,7 @@ class Acc_Tva $this->$idx=$p_value; } else - throw new Exception("Attribut inexistant $p_string"); + throw new Exception("ACC108"."Attribut inexistant $p_string",EXC_INVALID); } diff --git a/include/template/ledger_detail_ach.php b/include/template/ledger_detail_ach.php index 2eae6976e..be96bc5cc 100644 --- a/include/template/ledger_detail_ach.php +++ b/include/template/ledger_detail_ach.php @@ -212,6 +212,8 @@ global $div,$g_parameter,$cn,$access,$jr_id,$obj; $tva = new Acc_Tva($cn, $q['qp_vat_code']); $tva->load(); $sym_tva = h($tva->get_parameter('label')); + $x=($g_user->get_vat_code_preference()==1)?$tva->get_parameter('tva_code'):$tva->get_parameter('id'); + $sym_tva .= sprintf('[%s]',$x); } if ($owner->MY_UPDLAB == 'Y') { diff --git a/include/template/ledger_detail_ven.php b/include/template/ledger_detail_ven.php index 852d7844e..89eaf8217 100644 --- a/include/template/ledger_detail_ven.php +++ b/include/template/ledger_detail_ven.php @@ -226,7 +226,8 @@ $str_anc = ""; $tva = new Acc_Tva($cn, $q['qs_vat_code']); $tva->load(); $sym_tva = (h($tva->get_parameter('label'))); - // $sym_tva=$sym + $x=($g_user->get_vat_code_preference()==1)?$tva->get_parameter('tva_code'):$tva->get_parameter('id'); + $sym_tva .= sprintf('[%s]',$x); } $row .= td($sym_tva, 'style="text-align:center"');