[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 130/173: fixup! Merge branch 'dev-7200' into
From: |
Dany De Bontridder |
Subject: |
[Noalyss-commit] [noalyss] 130/173: fixup! Merge branch 'dev-7200' into entreprise |
Date: |
Mon, 22 Mar 2021 12:59:09 -0400 (EDT) |
sparkyx pushed a commit to branch master
in repository noalyss.
commit 3b8970136106a2541f34e1d40dec0a9a0eda2bfa
Author: Dany De Bontridder <danydb@noalyss.eu>
AuthorDate: Sun Nov 24 23:52:48 2019 +0100
fixup! Merge branch 'dev-7200' into entreprise
---
include/class/prepared_query.class.php | 25 +++++++++++++++++++++++--
include/class/print_ledger_fin.class.php | 20 ++++++--------------
include/class/print_ledger_misc.class.php | 6 ++----
3 files changed, 31 insertions(+), 20 deletions(-)
diff --git a/include/class/prepared_query.class.php
b/include/class/prepared_query.class.php
index 325469e..69cf594 100644
--- a/include/class/prepared_query.class.php
+++ b/include/class/prepared_query.class.php
@@ -79,6 +79,27 @@ class Prepared_Query {
where jra_concerned=$1)');
}
}
-
-
+ /**
+ * Prepare the query for find the amount in currency
+ */
+ public function prepare_currency()
+ {
+ $prepare=$this->db->is_prepare("amount_cur");
+ if ($prepare==FALSE)
+ {
+
+ $this->db->prepare("amount_cur",
+ "select jrn2.jr_id ,
+ sum(coalesce(oc_amount,0)) as sum_ocamount
+ from operation_currency
+ join jrnx using (j_id)
+ join jrn as jrn2 on (j_grpt=jrn2.jr_grpt_Id)
+ where
+ j_id in (select j_id from jrnx where
j_grpt=jrn2.jr_grpt_id )
+ and jr_id=$1
+ group by jr_id"
+ );
+ }
+ }
+
}
diff --git a/include/class/print_ledger_fin.class.php
b/include/class/print_ledger_fin.class.php
index 316e02e..0a472cb 100644
--- a/include/class/print_ledger_fin.class.php
+++ b/include/class/print_ledger_fin.class.php
@@ -93,24 +93,16 @@ class Print_Ledger_Financial extends Print_Ledger
*/
function export()
{
- $http=new HttpInput();
-
$a_jrn=$this->ledger->get_operation($http->get('from_periode',"number"),
- $http->get('to_periode','number'));
+ $ledger=$this->get_ledger();
+ $a_jrn=$ledger->get_operation($this->get_from(),$this->get_to());
+
$this->SetFont('DejaVu', '', 6);
if ( $a_jrn == null ) return;
bcscale(2);
- $this->cn->prepare("amount_cur",
- "select jrn2.jr_id ,
- sum(coalesce(oc_amount,0)) as sum_ocamount
- from operation_currency
- join jrnx using (j_id)
- join jrn as jrn2 on (j_grpt=jrn2.jr_grpt_Id)
- where
- j_id in (select j_id from jrnx where
j_grpt=jrn2.jr_grpt_id )
- and jr_id=$1
- group by jr_id"
- );
+ $prepare=new Prepared_Query($this->cn);
+ $prepare->prepare_currency();
+
for ( $i=0;$i<count($a_jrn);$i++)
{
$row=$a_jrn[$i];
diff --git a/include/class/print_ledger_misc.class.php
b/include/class/print_ledger_misc.class.php
index 6040405..4e76bb6 100644
--- a/include/class/print_ledger_misc.class.php
+++ b/include/class/print_ledger_misc.class.php
@@ -70,10 +70,8 @@ class Print_Ledger_Misc extends Print_Ledger
*/
function export()
{
- $http=new HttpInput();
-
-
$a_jrn=$this->ledger->get_rowSimple($http->get('from_periode','number'),
- $http->get('to_periode','number'));
+
$a_jrn=$this->get_ledger()->get_rowSimple($this->get_from(),$this->get_to());
+
$this->SetFont('DejaVu', '', 6);
if ( $a_jrn == null ) return;
$ledger=$this->get_ledger();
- [Noalyss-commit] [noalyss] 110/173: Merge branch 'bug-printtva' into entreprise, (continued)
- [Noalyss-commit] [noalyss] 110/173: Merge branch 'bug-printtva' into entreprise, Dany De Bontridder, 2021/03/22
- [Noalyss-commit] [noalyss] 111/173: If currency not given then supposed to be the default one (id=0), Dany De Bontridder, 2021/03/22
- [Noalyss-commit] [noalyss] 113/173: gitlab #5 Achat propose l'anc pour toutes les lignes, Dany De Bontridder, 2021/03/22
- [Noalyss-commit] [noalyss] 96/173: Merge branch 'accept7100' into entreprise, Dany De Bontridder, 2021/03/22
- [Noalyss-commit] [noalyss] 86/173: Cosmetic, Dany De Bontridder, 2021/03/22
- [Noalyss-commit] [noalyss] 103/173: Task #0001703: Faciliter effacement montants dans les filtres, Dany De Bontridder, 2021/03/22
- [Noalyss-commit] [noalyss] 104/173: Improve PHPUNIT Test for phpunit7 and phpunit8, Dany De Bontridder, 2021/03/22
- [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 <=
- [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, 2021/03/22
- [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