noalyss-commit
[Top][All Lists]
Advanced

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

[Noalyss-commit] [noalyss] 03/14: FIX CFGLED toutes les fiches DEB sont


From: Dany De Bontridder
Subject: [Noalyss-commit] [noalyss] 03/14: FIX CFGLED toutes les fiches DEB sont toujours sélectionnées
Date: Sat, 19 Dec 2015 21:17:10 +0000

sparkyx pushed a commit to branch master
in repository noalyss.

commit 26b98bdc57e656ae9bab8a28dcd9c1227fde6f99
Author: Dany De Bontridder <address@hidden>
Date:   Thu Dec 17 16:00:45 2015 +0100

    FIX CFGLED toutes les fiches DEB sont toujours sélectionnées
---
 include/class/class_acc_ledger.php |   28 ++++++++++++++++++++--------
 1 files changed, 20 insertions(+), 8 deletions(-)

diff --git a/include/class/class_acc_ledger.php 
b/include/class/class_acc_ledger.php
index 598abf6..45013b5 100644
--- a/include/class/class_acc_ledger.php
+++ b/include/class/class_acc_ledger.php
@@ -3589,24 +3589,31 @@ class Acc_Ledger extends jrn_def_sql
                $this->jrn_def_max_line_deb = 
($p_jrn_deb_max_line<1)?1:$p_jrn_deb_max_line;
                $this->jrn_def_type = $p_jrn_type;
                $this->jrn_def_pj_pref = $jrn_def_pj_pref;
-               $this->jrn_def_fiche_deb = (isset($FICHEDEB)) ? join($FICHEDEB, 
',') : "";
                $this->jrn_deb_max_line=($min_row<1)?1:$min_row;
                $this->jrn_def_description=$p_description;
                switch ($this->jrn_def_type)
                {
-                       case 'ACH':
+                    case 'ACH':
+                               $this->jrn_def_fiche_cred = 
(isset($ACH_FICHECRED)) ? join($ACH_FICHECRED, ',') : '';
+                                $this->jrn_def_fiche_deb = 
(isset($ACH_FICHEDEB)) ? join($ACH_FICHEDEB, ',') : "";
+                                break;
                        case 'VEN':
-                               $this->jrn_def_fiche_cred = (isset($FICHECRED)) 
? join($FICHECRED, ',') : '';
+                               $this->jrn_def_fiche_cred = 
(isset($VEN_FICHECRED)) ? join($VEN_FICHECRED, ',') : '';
+                                $this->jrn_def_fiche_deb = 
(isset($VEN_FICHEDEB)) ? join($VEN_FICHEDEB, ',') : "";
+
                                break;
                        case 'ODS':
-                               $this->jrn_def_class_deb = $p_jrn_class_deb;
-                               $this->jrn_def_fiche_cred=null;
+                                $this->jrn_def_class_deb = $p_jrn_class_deb;
+                               $this->jrn_def_fiche_deb = 
(isset($ODS_FICHEDEB)) ? join($ODS_FICHEDEB, ',') : '';;
+                               $this->jrn_def_fiche_cred = null;
                                break;
+                            
                        case 'FIN':
                                $a = new Fiche($this->db);
                                $result = 
$a->get_by_qcode(trim(strtoupper($_POST['bank'])), false);
                                $bank = $a->id;
                                $this->jrn_def_bank = $bank;
+                                $this->jrn_def_fiche_deb = 
(isset($FIN_FICHEDEB)) ? join($FIN_FICHEDEB, ',') : "";
                                if ($result == -1)
                                        throw new Exception(_("Aucun compte en 
banque n'est donné"));
                                $this->jrn_def_num_op = 
(isset($numb_operation)) ? 1 : 0;
@@ -3744,19 +3751,23 @@ class Acc_Ledger extends jrn_def_sql
                $this->jrn_def_max_line_deb = $p_jrn_deb_max_line;
                $this->jrn_def_type = $p_jrn_type;
                $this->jrn_def_pj_pref = $jrn_def_pj_pref;
-               $this->jrn_def_fiche_deb = (isset($FICHEDEB)) ? join($FICHEDEB, 
',') : "";
                $this->jrn_deb_max_line=$min_row;
                $this->jrn_def_code = sprintf("%s%02d", 
trim(substr($this->jrn_def_type, 0, 1)), Acc_Ledger::next_number($this->db, 
$this->jrn_def_type));
                 $this->jrn_def_description=$p_description;
                switch ($this->jrn_def_type)
                {
                        case 'ACH':
+                               $this->jrn_def_fiche_cred = 
(isset($ACH_FICHECRED)) ? join($ACH_FICHECRED, ',') : '';
+                                $this->jrn_def_fiche_deb = 
(isset($ACH_FICHEDEB)) ? join($ACH_FICHEDEB, ',') : "";
+                                break;
                        case 'VEN':
-                               $this->jrn_def_fiche_cred = (isset($FICHECRED)) 
? join($FICHECRED, ',') : '';
+                               $this->jrn_def_fiche_cred = 
(isset($VEN_FICHECRED)) ? join($VEN_FICHECRED, ',') : '';
+                                $this->jrn_def_fiche_deb = 
(isset($VEN_FICHEDEB)) ? join($VEN_FICHEDEB, ',') : "";
 
                                break;
                        case 'ODS':
-                               $this->jrn_def_class_deb = $p_jrn_class_deb;
+                                $this->jrn_def_class_deb = $p_jrn_class_deb;
+                               $this->jrn_def_fiche_deb = 
(isset($ODS_FICHEDEB)) ? join($ODS_FICHEDEB, ',') : '';;
                                $this->jrn_def_fiche_cred = null;
                                break;
                        case 'FIN':
@@ -3764,6 +3775,7 @@ class Acc_Ledger extends jrn_def_sql
                                $result = 
$a->get_by_qcode(trim(strtoupper($_POST['bank'])), false);
                                $bank = $a->id;
                                $this->jrn_def_bank = $bank;
+                                $this->jrn_def_fiche_deb = 
(isset($FIN_FICHEDEB)) ? join($FIN_FICHEDEB, ',') : "";
                                if ($result == -1)
                                        throw new Exception(_("Aucun compte en 
banque n'est donné"));
                                $this->jrn_def_num_op = 
(isset($numb_operation)) ? 1 : 0;



reply via email to

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