noalyss-commit
[Top][All Lists]
Advanced

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

[Noalyss-commit] [noalyss] 42/54: If currency not given then supposed to


From: Dany De Bontridder
Subject: [Noalyss-commit] [noalyss] 42/54: If currency not given then supposed to be the default one (id=0)
Date: Sat, 11 Jul 2020 13:26:58 -0400 (EDT)

sparkyx pushed a commit to annotated tag entreprise-0500
in repository noalyss.

commit e1be2ee3ef4f86685a1d3ccb89874f8e5264e678
Author: Dany De Bontridder <danydb@noalyss.eu>
AuthorDate: Thu Oct 24 10:30:47 2019 +0200

    If currency not given then supposed to be the default one (id=0)
---
 include/class/acc_currency.class.php | 3 ++-
 include/class/acc_ledger.class.php   | 4 ++--
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/include/class/acc_currency.class.php 
b/include/class/acc_currency.class.php
index 7470957..0de9a09 100644
--- a/include/class/acc_currency.class.php
+++ b/include/class/acc_currency.class.php
@@ -27,7 +27,8 @@ require_once 
NOALYSS_INCLUDE."/database/v_currency_last_value_sql.class.php";
 
 /**
  * @class
- * @brief display currency , convert to euro , and save them if used
+ * @brief display currency , convert to euro , and save them if used. The 
default currency has the id 0 and is
+ * normally EUR
  */
 class Acc_Currency
 {
diff --git a/include/class/acc_ledger.class.php 
b/include/class/acc_ledger.class.php
index bfb8f0f..ee30e8b 100644
--- a/include/class/acc_ledger.class.php
+++ b/include/class/acc_ledger.class.php
@@ -1332,8 +1332,8 @@ class Acc_Ledger extends jrn_def_sql
             $count=0;
             
             // currency
-            $currency_code=$http->extract($p_array, 
"p_currency_code","number");
-            $currency_rate=$http->extract($p_array, 
"p_currency_rate","number");
+            $currency_code=$http->extract($p_array, 
"p_currency_code","number",0);
+            $currency_rate=$http->extract($p_array, 
"p_currency_rate","number",1);
             $currency_rate_ref=new Acc_Currency($this->db, $currency_code);
             
             for ($i=0; $i<$nb_item; $i++)



reply via email to

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