noalyss-commit
[Top][All Lists]
Advanced

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

[Noalyss-commit] [noalyss] 01/01: Task #1082 - Sélection d'opération pa


From: Dany De Bontridder
Subject: [Noalyss-commit] [noalyss] 01/01: Task #1082 - Sélection d'opération par montant impossible Test the amount of the operation + amount of details
Date: Wed, 21 Jan 2015 19:50:55 +0000

sparkyx pushed a commit to branch master
in repository noalyss.

commit 2a412f2c425ec2f69c8ab071f98f5752f87d5153
Author: Dany De Bontridder <address@hidden>
Date:   Wed Jan 21 20:48:58 2015 +0100

    Task #1082 - Sélection d'opération par montant impossible
    Test the amount of the operation + amount of details
---
 include/class_acc_ledger.php |   15 ++++++++++++---
 1 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/include/class_acc_ledger.php b/include/class_acc_ledger.php
index 90d8ddb..a137dc6 100644
--- a/include/class_acc_ledger.php
+++ b/include/class_acc_ledger.php
@@ -2528,7 +2528,7 @@ class Acc_Ledger extends jrn_def_sql
                 
                 $bledger_param=  str_replace('"', "'", $bledger_param);
                 $bledger=new ISmallButton('l');
-                $bledger->label="choix des journaux";
+                $bledger->label=_("choix des journaux");
                 $bledger->javascript=" show_ledger_choice($bledger_param)";
                 $f_ledger=$bledger->input();
                 $hid_jrn="";
@@ -2839,8 +2839,17 @@ class Acc_Ledger extends jrn_def_sql
                                $amount_min > 0 &&
                                bccomp($amount_min, $amount_max, 2) == 0)
                {
-                       $fil_amount = $and . 'jr_grpt_id in  ( select distinct 
j_grpt from jrnx where j_montant = ' . $amount_min . ')';
-                       $and = " and ";
+                        $fil_amount = $and . ' ( ';
+ 
+                        // Look in detail
+                       $fil_amount .= 'jr_grpt_id in ( select distinct j_grpt 
from jrnx where j_montant = ' . $amount_min . ') ';
+
+                       //and the total operation
+                       $fil_amount .= ' or ';
+                       $fil_amount .= ' jr_montant = '.$amount_min;
+
+                      $fil_amount .= ')';
+                      $and = " and ";
                }
                // date
                if (isset($date_start) && isDate($date_start) != null)



reply via email to

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