[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 39/219: Acc_Reconciliation : improve function
From: |
Dany De Bontridder |
Subject: |
[Noalyss-commit] [noalyss] 39/219: Acc_Reconciliation : improve function get_amount_noautovat, set the prepare query inside the function |
Date: |
Mon, 18 Dec 2017 13:22:33 -0500 (EST) |
sparkyx pushed a commit to branch master
in repository noalyss.
commit 45178f289dca781cd5facfc7f73b293bb30000a8
Author: Dany De Bontridder <address@hidden>
Date: Mon Sep 4 00:30:57 2017 +0200
Acc_Reconciliation : improve function get_amount_noautovat, set the
prepare query inside the function
---
include/class/acc_reconciliation.class.php | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/include/class/acc_reconciliation.class.php
b/include/class/acc_reconciliation.class.php
index 9c4ff61..8d815a8 100644
--- a/include/class/acc_reconciliation.class.php
+++ b/include/class/acc_reconciliation.class.php
@@ -348,7 +348,7 @@ j1.j_poste as poste
$ret[$i]['depend'][$e]=$this->fill_info();
}
}
- $this->db->prepare('detail_quant','select * from v_quant_detail where
jr_id=$1');
+
return $ret;
}
/**
@@ -611,6 +611,10 @@ j1.j_poste as poste
}
return $array;
}
+ function prepare_query_detail_quant()
+ {
+ $this->db->prepare('detail_quant','select * from v_quant_detail where
jr_id=$1');
+ }
/**
* Retrieve the amount VAT included and autoreversed VAT excluded thanks
* the view v_quant_detail and return it.
@@ -622,6 +626,12 @@ j1.j_poste as poste
* @return number
*/
function get_amount_noautovat($p_jrn_id,$p_default_amount) {
+ static $p=0;
+ if ( $p==0) {
+ $this->prepare_query_detail_quant();
+ $p=1;
+ }
+
$retdb=$this->db->execute("detail_quant",array($p_jrn_id));
if ( Database::num_row($retdb) != 0)
{
- [Noalyss-commit] [noalyss] 82/219: Fix Doxygen issue : @example must be in a function otherwise the detailed section of Doxygen disappear, (continued)
- [Noalyss-commit] [noalyss] 82/219: Fix Doxygen issue : @example must be in a function otherwise the detailed section of Doxygen disappear, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 64/219: Inplace_Edit : cosmetic, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 137/219: Infobulle : avoid that the info balloon exceed limit of the display, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 193/219: SansationLight add the readme.txt file with license, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 85/219: Task #1349 : si une seule catégorie de fiche , alors on ne doit pas la choisir, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 07/219: Bug : cannot print action in profil Cannot add a export / printing in profile, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 79/219: PRINTGL : do not print accounting without operation, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 182/219: Icon move / fix, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 111/219: Comment Table, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 92/219: Esthetic : hide some columns when screen too small, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 39/219: Acc_Reconciliation : improve function get_amount_noautovat, set the prepare query inside the function,
Dany De Bontridder <=
- [Noalyss-commit] [noalyss] 172/219: Merge branch 'master' of ns3:/srv/git/noalyss, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 143/219: ANC : balance analytique / comptabilité, corrige bug SQL, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 155/219: Task #1493 Encodage VEN , ACH, Ordre des opérations Déplacement du bouton modèle d'opérations, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 130/219: ANC groupe : little bug in PLANANC, allow a group null, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 142/219: ANC : balance croisée double fixe SQL query, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 160/219: INSTALL : check PHP version minimum 5.5, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 219/219: Task #1378 : show only the ledger of a given type, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 215/219: ICheckBox : add attribute to allow to select checkbox thanks its attribute with the js select_checkbox_attribute, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 170/219: Traduction, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 216/219: Task #1378 : select ledger thanks their type, Dany De Bontridder, 2017/12/18