[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 126/173: Use connection and not global
From: |
Dany De Bontridder |
Subject: |
[Noalyss-commit] [noalyss] 126/173: Use connection and not global |
Date: |
Mon, 22 Mar 2021 12:59:07 -0400 (EDT) |
sparkyx pushed a commit to branch master
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;
}
- [Noalyss-commit] [noalyss] 105/173: documentation + traduction, (continued)
- [Noalyss-commit] [noalyss] 105/173: documentation + traduction, Dany De Bontridder, 2021/03/22
- [Noalyss-commit] [noalyss] 117/173: Acc_Ledger : problem with acc_ledger::load(), Dany De Bontridder, 2021/03/22
- [Noalyss-commit] [noalyss] 125/173: Merge branch 'dev-7200' into entreprise, Dany De Bontridder, 2021/03/22
- [Noalyss-commit] [noalyss] 130/173: fixup! Merge branch 'dev-7200' into entreprise, Dany De Bontridder, 2021/03/22
- [Noalyss-commit] [noalyss] 99/173: Merge branch 'Cosmetic-7100' into 'entreprise', Dany De Bontridder, 2021/03/22
- [Noalyss-commit] [noalyss] 100/173: Merge branch 'entreprise' of gitlab.noalyss.eu:noalyss/noalyss into entreprise * index.css logo size, Dany De Bontridder, 2021/03/22
- [Noalyss-commit] [noalyss] 120/173: test : compute min et max periode, Dany De Bontridder, 2021/03/22
- [Noalyss-commit] [noalyss] 123/173: Improve Scenario Test, Dany De Bontridder, 2021/03/22
- [Noalyss-commit] [noalyss] 129/173: Merge branch 'dev-7200' into entreprise, Dany De Bontridder, 2021/03/22
- [Noalyss-commit] [noalyss] 132/173: Bug solde is rounded and doesn't have decimal, Dany De Bontridder, 2021/03/22
- [Noalyss-commit] [noalyss] 126/173: Use connection and not global,
Dany De Bontridder <=
- [Noalyss-commit] [noalyss] 128/173: Merge branch 'dev7112' into entreprise, Dany De Bontridder, 2021/03/22
- [Noalyss-commit] [noalyss] 140/173: Cleanup + new logo, Dany De Bontridder, 2021/03/22
- [Noalyss-commit] [noalyss] 92/173: Merge branch 'accept7100' into entreprise, Dany De Bontridder, 2021/03/22
- [Noalyss-commit] [noalyss] 95/173: Merge branch 'accept7100' into entreprise, Dany De Bontridder, 2021/03/22
- [Noalyss-commit] [noalyss] 97/173: Merge branch 'accept7100' into entreprise, Dany De Bontridder, 2021/03/22
- [Noalyss-commit] [noalyss] 102/173: Task #0001698: Problème affichage historique fiches, Dany De Bontridder, 2021/03/22
- [Noalyss-commit] [noalyss] 141/173: Merge commit '3e075a0a1aa8b6e42c458571ef0380a9c38f18fa' into entreprise, Dany De Bontridder, 2021/03/22
- [Noalyss-commit] [noalyss] 106/173: Merge branch 'accept7100' into entreprise, Dany De Bontridder, 2021/03/22
- [Noalyss-commit] [noalyss] 108/173: Bug with p_jrn, Dany De Bontridder, 2021/03/22
- [Noalyss-commit] [noalyss] 109/173: Task #1759 = PRINTBAL sur 4 colonnes, Dany De Bontridder, 2021/03/22