[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 08/107: Mantis #1693: CA - problème avec la
From: |
Dany De Bontridder |
Subject: |
[Noalyss-commit] [noalyss] 08/107: Mantis #1693: CA - problème avec la balance croisée double |
Date: |
Mon, 26 Aug 2019 10:31:46 -0400 (EDT) |
sparkyx pushed a commit to branch master
in repository noalyss.
commit bcc97e50ccaf8858e2c99982ebe952ade4c13f4c
Author: Dany De Bontridder <address@hidden>
Date: Wed Feb 13 23:14:06 2019 +0100
Mantis #1693: CA - problème avec la balance croisée double
---
include/anc_balance_double.inc.php | 27 +++++++++++++++------------
include/class/anc_balance_double.class.php | 9 +++++----
2 files changed, 20 insertions(+), 16 deletions(-)
diff --git a/include/anc_balance_double.inc.php
b/include/anc_balance_double.inc.php
index b8ab929..6b56ec8 100644
--- a/include/anc_balance_double.inc.php
+++ b/include/anc_balance_double.inc.php
@@ -15,18 +15,21 @@ echo $bc->display_form();
echo '</form>';
if (isset($_GET['result']))
{
- $result=$bc->display_html();
- if ($bc->has_data > 0)
- {
- echo $bc->show_button();
- echo $result;
+ try {
+ $result = $bc->display_html();
+ if ($bc->has_data > 0) {
+ echo $bc->show_button();
+ echo $result;
+ }else
+ {
+ echo '<p class="notice">';
+ echo _('Aucune donnée trouvée');
+ echo '</p>';
+ }
+
+ } catch (Exception $e){
+ alert($e->getMessage());
}
- else
- {
- echo '<p class="notice">';
- echo _('Aucune donnée trouvée');
- echo '</p>';
- }
-
}
+
?>
diff --git a/include/class/anc_balance_double.class.php
b/include/class/anc_balance_double.class.php
index 26fed20..3aed8e3 100644
--- a/include/class/anc_balance_double.class.php
+++ b/include/class/anc_balance_double.class.php
@@ -48,6 +48,8 @@ class Anc_Balance_Double extends Anc_Print
function display_html ()
{
+ if ($this->pa_id == $this->pa_id2) throw new Exception(_("Pas de
croisement avec un seul plan"),1000);
+
bcscale(2);
$r="";
@@ -475,9 +477,8 @@ class Anc_Balance_Double extends Anc_Print
operation_analytique as a join operation_analytique as b on
(a.oa_row=b.oa_row and a.oa_group=b.oa_group)
join poste_analytique as poa on (a.po_id=poa.po_id)
join poste_analytique as pob on (b.po_id=pob.po_id)
- where poa.pa_id=".
- $this->pa_id."
- and pob.pa_id=".$this->pa_id2." ".$this->set_sql_filter()."
+ where poa.pa_id= $1
+ and pob.pa_id= $2 ".$this->set_sql_filter()."
) as m join poste_analytique as pa on ( a_po_id=pa.po_id)
join poste_analytique as pb on (b_po_id=pb.po_id)
@@ -488,7 +489,7 @@ class Anc_Balance_Double extends Anc_Print
";
- $array=$this->db->get_array($sql);
+ $array=$this->db->get_array($sql,[$this->pa_id,$this->pa_id2]);
$this->has_data=count($array);
if ( $this->has_data == 0 )
return null;
- [Noalyss-commit] [noalyss] branch master updated (513424f -> a68b6a8), Dany De Bontridder, 2019/08/26
- [Noalyss-commit] [noalyss] 02/107: Fix bug with payment method, Dany De Bontridder, 2019/08/26
- [Noalyss-commit] [noalyss] 07/107: mantis #1690: Bug : impossible d'utiliser < dans Inplace_Edit Replace strip_tags , add a space before the "<", Dany De Bontridder, 2019/08/26
- [Noalyss-commit] [noalyss] 08/107: Mantis #1693: CA - problème avec la balance croisée double,
Dany De Bontridder <=
- [Noalyss-commit] [noalyss] 11/107: Security : replace $_GET by Http_Input + translate, Dany De Bontridder, 2019/08/26
- [Noalyss-commit] [noalyss] 13/107: Icon_Action : add icon for menu, Dany De Bontridder, 2019/08/26
- [Noalyss-commit] [noalyss] 16/107: Icon_Action add icon for locking , unlocking, Dany De Bontridder, 2019/08/26
- [Noalyss-commit] [noalyss] 24/107: Debug : Add memory info, Dany De Bontridder, 2019/08/26
- [Noalyss-commit] [noalyss] 18/107: Mantis #0001651: Problème avec totaux en CA, Dany De Bontridder, 2019/08/26
- [Noalyss-commit] [noalyss] 09/107: translation, Dany De Bontridder, 2019/08/26
- [Noalyss-commit] [noalyss] 04/107: Php7.2 incompatibility, Dany De Bontridder, 2019/08/26
- [Noalyss-commit] [noalyss] 10/107: Security : replace $_GET by Http_Input, Dany De Bontridder, 2019/08/26
- [Noalyss-commit] [noalyss] 06/107: TEST : fix some little bugs, Dany De Bontridder, 2019/08/26
- [Noalyss-commit] [noalyss] 14/107: Accounting : Cosmetic change icon more by arrow, Dany De Bontridder, 2019/08/26