From 69b6bd780c6e306b8d5137ee8aab61ef9f666f76 Mon Sep 17 00:00:00 2001 From: Dany De Bontridder Date: Tue, 8 Sep 2015 14:39:04 +0200 Subject: [PATCH] improve translation Show sum --- include/class_follow_up.php | 6 +++++- include/template/detail-action.php | 12 ++++++------ 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/include/class_follow_up.php b/include/class_follow_up.php index f1aa84c5f..ed5c662cf 100644 --- a/include/class_follow_up.php +++ b/include/class_follow_up.php @@ -440,7 +440,9 @@ class Follow_Up $aCard=array(); /* create aArticle for the detail section */ $article_count=(count($this->aAction_detail)==0)?MAX_ARTICLE:count($this->aAction_detail); - + /* Compute total */ + $tot_item=0; + $tot_vat=0; for ($i=0; $i<$article_count; $i++) { /* fid = Icard */ @@ -514,12 +516,14 @@ class Follow_Up $num->javascript=" onchange=\"compute_ledger('".$i." ')\""; $num->size=8; $aArticle[$i]['tva']=$num->input(); + $tot_vat=bcadd($tot_vat,$num->value); $num->name="tvac_march".$i; $num->id="tvac_march".$i; $num->value=($tmp_ad)?$tmp_ad->get_parameter('total'):0; $num->size=8; $aArticle[$i]['tvac']=$num->input(); + $tot_item=bcadd($tot_item,$num->value); $aArticle[$i]['hidden_htva']=HtmlInput::hidden('htva_march'.$i, 0); $aArticle[$i]['hidden_tva']=HtmlInput::hidden('tva_march'.$i, 0); diff --git a/include/template/detail-action.php b/include/template/detail-action.php index effd2ca01..0a44c3379 100644 --- a/include/template/detail-action.php +++ b/include/template/detail-action.php @@ -302,8 +302,8 @@ echo ''; - - + +
-
-
0.0 -
0.0 -
0.0 +
+
+
+