noalyss-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Noalyss-commit] [noalyss] 64/65: improve translation Show sum


From: Dany De Bontridder
Subject: [Noalyss-commit] [noalyss] 64/65: improve translation Show sum
Date: Wed, 09 Sep 2015 08:27:37 +0000

sparkyx pushed a commit to branch master
in repository noalyss.

commit 69b6bd780c6e306b8d5137ee8aab61ef9f666f76
Author: Dany De Bontridder <address@hidden>
Date:   Tue Sep 8 14:39:04 2015 +0200

    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 f1aa84c..ed5c662 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 effd2ca..0a44c33 100644
--- a/include/template/detail-action.php
+++ b/include/template/detail-action.php
@@ -302,8 +302,8 @@ echo '</span>';
   </div>
 </div>
 <?php if ( $p_view !='READ'  ) :?>
-<input type='button' class="button" class="noprint" value='Montrer articles' 
id="toggleButton" onclick='toggleShowDetail()'>
-<input type='button' class="button" class="noprint" value='Générer' 
id="toggleButtonGenerate" onclick="$('div_generate_document').show()">
+<input type='button' class="button" class="noprint" value="<?php echo 
_('Montrer articles');?>" id="toggleButton" onclick='toggleShowDetail()'>
+<input type='button' class="button" class="noprint" value="<?php echo 
_('Générer')?>" id="toggleButtonGenerate" 
onclick="$('div_generate_document').show()">
 <?php endif; ?>
 <?php
 /**
@@ -378,10 +378,10 @@ function toggleShowDetail() {
 <?php if ( $show_row != 0 ): ?>
 <div>
   
-    <div style=" float:right;margin-right: 2px"" id="sum">
-    <br><span style="text-align: right;" class="highlight" id="htva">0.0</span>
-     <br><span style="text-align: right" class="highlight" id="tva">0.0</span>
-    <br><span style="text-align: right" class="highlight" id="tvac">0.0</span>
+    <div style=" float:right;margin-right: 2px" id="sum">
+    <br><span style="text-align: right;" class="highlight" id="htva"><?php 
echo $tot_item?></span>
+     <br><span style="text-align: right" class="highlight" id="tva"><?php echo 
$tot_vat?></span>
+    <br><span style="text-align: right" class="highlight" id="tvac"><?php echo 
bcadd($tot_vat,$tot_item)?></span>
  </div>
 
     <div  style="float:right;margin-right: 230px" >



reply via email to

[Prev in Thread] Current Thread [Next in Thread]