noalyss-commit
[Top][All Lists]
Advanced

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

[Noalyss-commit] [noalyss] 28/33: VEN - ACH fix default currency


From: dwm
Subject: [Noalyss-commit] [noalyss] 28/33: VEN - ACH fix default currency
Date: Thu, 18 Jul 2024 12:24:49 -0400 (EDT)

sparkyx pushed a commit to branch unstable
in repository noalyss.

commit 82047229320de32099b646df0223d0a7e8b52491
Author: sparkyx <danydb@noalyss.eu>
AuthorDate: Sat Jul 13 12:02:51 2024 +0200

    VEN - ACH fix default currency
---
 include/class/acc_ledger_purchase.class.php | 49 +++++++++++++++--------------
 include/class/acc_ledger_sale.class.php     |  6 ++--
 2 files changed, 30 insertions(+), 25 deletions(-)

diff --git a/include/class/acc_ledger_purchase.class.php 
b/include/class/acc_ledger_purchase.class.php
index e95e057e2..d9a5ff7af 100644
--- a/include/class/acc_ledger_purchase.class.php
+++ b/include/class/acc_ledger_purchase.class.php
@@ -1812,29 +1812,32 @@ class  Acc_Ledger_Purchase extends Acc_Ledger
     </td>
 </tr>
 EOF;
-    if ($p_currency_code !=0) {
-        $sql_currency=new Currency_SQL($this->cn,0);
-        $iso_code=$sql_currency->getp("cr_code_iso");
-        $rate=_("Taux ");
-$r.=<<<EOF
-<tr class="highlight">
-    {$decalage}            
-     <td>
-                
-     </td>
-    <td class="num">
-        
-    </td>
-    <td class="num">
-        {$rate} {$p_currency_rate}
-    </td>
-    <td class="num">
-        {$tot_eur}  {$iso_code}
-    </td>
-</tr>
-EOF;
+        if ($p_currency_code !=0) {
+            $sql_currency=new Currency_SQL($this->cn,0);
+            $iso_code=$sql_currency->getp("cr_code_iso");
+            $rate=_("Taux ");
+    $r.=<<<EOF
+    <tr class="highlight">
+        {$decalage}            
+         <td>
+                    
+         </td>
+        <td class="num">
+            
+        </td>
+        <td class="num">
+            {$rate} {$p_currency_rate}
+        </td>
+        <td class="num">
+            {$tot_eur}  {$iso_code}
+        </td>
+    </tr>
+    EOF;
         } // if ($p_currency_code !=0
-        }else { // if $g_parameter->MY_TVA_USE=='Y'
+    }else // if $g_parameter->MY_TVA_USE=='Y'
+    {
+            $sql_currency=new Currency_SQL($this->cn,0);
+            $iso_code=$sql_currency->getp("cr_code_iso");
         $r.=<<<EOF
 <tr class="highlight">
     {$decalage}            
@@ -1860,7 +1863,7 @@ EOF;
     <td>
     </td>
     <td class="num">
-        {$tot_str} {$str_code}
+        {$tot_str} {$iso_code}
     </td>
 </tr>
 EOF;
diff --git a/include/class/acc_ledger_sale.class.php 
b/include/class/acc_ledger_sale.class.php
index 28e39581d..c567bd3f3 100644
--- a/include/class/acc_ledger_sale.class.php
+++ b/include/class/acc_ledger_sale.class.php
@@ -1100,7 +1100,9 @@ EOF;
 
         } else {
     $sql_currency=new Currency_SQL($this->cn,$p_currency_code);
-    $iso_code=$sql_currency->getp("cr_code_iso");
+    $str_code=$sql_currency->getp("cr_code_iso");
+    $sql_currencydefault=new Currency_SQL($this->cn,0);
+    $iso_code=$sql_currencydefault->getp("cr_code_iso");
             // without VAT
             $r.=<<<EOF
     <tr class="highlight">
@@ -1115,7 +1117,7 @@ EOF;
 
         </td>
         <td class="num">
-            {$tot_str}
+            {$tot_str} {$str_code}
         </td>
             </tr>
     <tr class="highlight">



reply via email to

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