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"');