From b2e31b43b96f559beb9fafc2fe04cd4531321010 Mon Sep 17 00:00:00 2001 From: Stan Pinte Date: Sun, 2 Apr 2006 15:10:50 +0000 Subject: [PATCH] =?UTF-8?q?Ajout=C3=A9=20une=20base=20d'impl=C3=A9mentatio?= =?UTF-8?q?n=20du=20taux=20de=20d=C3=A9ductibilit=C3=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- include/user_form_ach.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/include/user_form_ach.php b/include/user_form_ach.php index eedba9e8a..0a1f5674f 100644 --- a/include/user_form_ach.php +++ b/include/user_form_ach.php @@ -170,6 +170,7 @@ function FormAchInput($p_cn,$p_jrn,$p_periode,$p_array=null,$p_submit="",$pview_ if ( $march_tva_id == "" ) { $march_tva_id=$a_fiche['tva_id']; $march_tva_label=$a_fiche['tva_label']; + //STAN: here I could get the VAT deduction rate, and impact the computations coming after. } $march_label=$a_fiche['vw_name']; } @@ -455,7 +456,14 @@ function FormAchView ($p_cn,$p_jrn,$p_periode,$p_array,$p_submit,$p_number,$p_pi // VAT $vat=(isNumber(${"e_march$i"."_tva_id"})==0)?getFicheAttribut($p_cn,${"e_march$i"},ATTR_DEF_TVA):${"e_march$i"."_tva_id"}; - + + //VAT deductibility rate + $deduct_rate = getFicheAttribut($p_cn,${"e_march$i"},ATTR_DEF_TVA_DEDUCT_RATE); + if ($deduct_rate == null) + { + $deduct_rate = 100; + } + // vat label // vat rate $a_vat=GetTvaRate($p_cn,$vat);