noalyss-commit
[Top][All Lists]
Advanced

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

[Noalyss-commit] [noalyss] 152/323: FIX : PRINTJRN, ledger


From: Dany De Bontridder
Subject: [Noalyss-commit] [noalyss] 152/323: FIX : PRINTJRN, ledger
Date: Wed, 14 Mar 2018 17:38:41 -0400 (EDT)

sparkyx pushed a commit to branch master
in repository noalyss.

commit db1247d7696200be868ad43ddeff6880c560fdbd
Author: Dany De Bontridder <address@hidden>
Date:   Thu Feb 8 21:45:05 2018 +0100

    FIX : PRINTJRN, ledger
---
 include/export/export_ledger_csv.php | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/include/export/export_ledger_csv.php 
b/include/export/export_ledger_csv.php
index e8c54a3..96a466a 100644
--- a/include/export/export_ledger_csv.php
+++ b/include/export/export_ledger_csv.php
@@ -134,7 +134,7 @@ $jrn_type=$Jrn->get_type();
 //  ODS or all ledgers becomes A
 //  Extended but no FIN becomes L
 // 
-if ($get_option=='D'||($jrn_type=='ODS'||$Jrn->id==0)&&$get_option=="E")
+if ( $get_option=="E")
 {
     if ($jrn_type=='FIN')
     {
@@ -198,9 +198,15 @@ if 
($get_option=='D'||($jrn_type=='ODS'||$Jrn->id==0)&&$get_option=="E")
 //-----------------------------------------------------------------------------
 if ($get_option=='A')
 {
-
-    $acc_ledger_history=new Acc_Ledger_History_Generic($cn, $a_jrn,
+    if ($get_jrn == 0 )
+    {
+        $acc_ledger_history=new Acc_Ledger_History_Generic($cn, $a_jrn,
             $get_from_periode, $get_to_periode, 'A');
+    } else {
+        $acc_ledger_history=new Acc_Ledger_History_Generic($cn, array($a_jrn),
+            $get_from_periode, $get_to_periode, 'A');
+        
+    }
     $acc_ledger_history->export_csv();
     exit;
 }
@@ -209,7 +215,7 @@ if ($get_option=='A')
 // for Misc the amount 
 // For Financial only the tiers and the sign of the amount
 //-----------------------------------------------------------------------------
-if ($get_option=="L")
+if ($get_option=="L" || $get_option == 'D')
 {
 
 //-----------------------------------------------------



reply via email to

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