From 9d4a5959fef8c711f904b41b1f8cb8a4e7ef9d0b Mon Sep 17 00:00:00 2001 From: Dany De Bontridder Date: Fri, 27 Sep 2013 19:48:41 +0000 Subject: [PATCH] Better printing of VAT --- include/class_itva_popup.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/include/class_itva_popup.php b/include/class_itva_popup.php index f958b8f24..39e60dd09 100644 --- a/include/class_itva_popup.php +++ b/include/class_itva_popup.php @@ -145,9 +145,11 @@ class ITva_Popup extends HtmlInput /*!\brief print in html the readonly value of the widget*/ public function display() { - $r=''; - - $res=sprintf($r,$this->name,$this->value,$this->name); + $cn= new Database(Dossier::id()); + $tva=new Acc_Tva($cn, $this->value); + + $comment=($tva->load() != "-1")? $tva->tva_label:""; + $res=sprintf('%s',$this->name,$this->value,$this->name,$comment); return $res; } /**