noalyss-commit
[Top][All Lists]
Advanced

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

[Noalyss-commit] [noalyss] 03/03: Use connection and not global


From: Dany De Bontridder
Subject: [Noalyss-commit] [noalyss] 03/03: Use connection and not global
Date: Sat, 11 Jul 2020 13:28:23 -0400 (EDT)

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

commit a295d4f39679fb30fddef72aa099a8fa0036d475
Author: Dany De Bontridder <danydb@noalyss.eu>
AuthorDate: Sat Nov 2 23:10:06 2019 +0100

    Use connection and not global
---
 include/class/acc_currency.class.php | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/class/acc_currency.class.php 
b/include/class/acc_currency.class.php
index 0de9a09..7c17092 100644
--- a/include/class/acc_currency.class.php
+++ b/include/class/acc_currency.class.php
@@ -140,14 +140,14 @@ class Acc_Currency
      */
     function get_rate_date($p_date)
     {
-        global $cn;
+        
         if (isDate($p_date) == null ) return -1;
         
         $sql="select ch_value from currency_history 
             where
             ch_from=(select max(ch_from) from currency_history where ch_from 
<= to_date($1,'DD.MM.YYYY') and currency_id=$2)
             and currency_id=$2";
-        $value=$cn->get_value($sql,[$p_date,$this->get_id()]);
+        $value=$this->cn->get_value($sql,[$p_date,$this->get_id()]);
         if ($value == "") return -2;
         return $value;
     }



reply via email to

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