noalyss-commit
[Top][All Lists]
Advanced

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

[Noalyss-commit] [noalyss] 117/218: Currency : cosmetic display history


From: Dany De Bontridder
Subject: [Noalyss-commit] [noalyss] 117/218: Currency : cosmetic display history : show only the value of the card/accounting
Date: Thu, 12 Sep 2019 15:58:51 -0400 (EDT)

sparkyx pushed a commit to branch entreprise
in repository noalyss.

commit 7280cfd320c3ef0a941d6d60e16c1ce154674c95
Author: Dany De Bontridder <address@hidden>
Date:   Sun Dec 9 11:12:28 2018 +0100

    Currency : cosmetic display history :  show only the value of the 
card/accounting
---
 include/class/acc_account_ledger.class.php |  8 +++++++-
 include/class/fiche.class.php              | 13 ++++++++++---
 2 files changed, 17 insertions(+), 4 deletions(-)

diff --git a/include/class/acc_account_ledger.class.php 
b/include/class/acc_account_ledger.class.php
index f588761..bcf3b12 100644
--- a/include/class/acc_account_ledger.class.php
+++ b/include/class/acc_account_ledger.class.php
@@ -474,8 +474,14 @@ class Acc_Account_Ledger
                 "<TD>".$tiers."</TD>".
              "<TD>".h($op['description'])."</TD>".
                     td($op['jr_optype']);
+                     /// If the currency is not the default one , then show 
the amount
+            if ( $op['currency_id'] > 0 && $op['oc_amount'] != 0)
+            {
              echo   td($op['cr_code_iso']).
-                    
td(nbm(bcadd($op['oc_amount'],$op['oc_vat_amount'],4)),'style="text-align:right;padding-left:10px;"');
+                    
td(nbm(bcadd($op['oc_amount'],4)),'style="text-align:right;padding-left:10px;"');
+            } else {
+                echo td().td();
+            }
             
             echo 
              "<TD 
style=\"text-align:right;padding-left:10px;\">".nbm($op['deb_montant'])."</TD>".
diff --git a/include/class/fiche.class.php b/include/class/fiche.class.php
index 6f62be3..6beb6df 100644
--- a/include/class/fiche.class.php
+++ b/include/class/fiche.class.php
@@ -1471,7 +1471,7 @@ class Fiche
         "<TH style=\"text-align:left\">"._('Description')." </TH>".
         "<TH style=\"text-align:left\">"._('Type')." </TH>".
         "<TH style=\"text-align:left\">"._('ISO')."</TH>".
-        "<TH style=\"text-align:left\">"._('Dev.')."</TH>".
+        "<TH style=\"text-align:right\">"._('Dev.')."</TH>".
         "<TH style=\"text-align:right\">"._('Débit')."  </TH>".
         "<TH style=\"text-align:right\">"._('Crédit')." </TH>".
         th('Prog.','style="text-align:right"').
@@ -1537,8 +1537,15 @@ class Fiche
             "<TD>".h($op['description'])."</TD>".
                     td($op['jr_optype']);
             
+            /// If the currency is not the default one , then show the amount
+            if ( $op['currency_id'] > 0 && $op['oc_amount'] != 0)
+            {
              echo   td($op['cr_code_iso']).
-                    
td(nbm(bcadd($op['oc_amount'],$op['oc_vat_amount'],4)),'style="text-align:right;padding-left:10px;"');
+                    
td(nbm(bcadd($op['oc_amount'],4)),'style="text-align:right;padding-left:10px;"');
+            } else {
+                echo td().td();
+            }
+            
             echo "<TD 
style=\"text-align:right\">".nbm($op['deb_montant'])."</TD>".
              "<TD 
style=\"text-align:right\">".nbm($op['cred_montant'])."</TD>".
              td(nbm(abs($progress)).$side,'style="text-align:right"').
@@ -1592,7 +1599,7 @@ class Fiche
         echo '<TR>';
 
         echo '<TD><form method="GET" ACTION="">'.
-            HtmlInput::submit('bt_other',"Autre poste").
+            HtmlInput::submit('bt_other',_("Autre poste")).
             HtmlInput::array_to_hidden(array('gDossier','ac'), $_REQUEST).
             dossier::hidden().
             
$hid->input("type","poste").$hid->input('p_action','impress')."</form></TD>";



reply via email to

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