phpcompta-dev
[Top][All Lists]
Advanced

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

[Phpcompta-dev] r5093 - phpcompta/tags/rel650/include


From: phpcompta-dev
Subject: [Phpcompta-dev] r5093 - phpcompta/tags/rel650/include
Date: Thu, 23 Aug 2012 22:52:07 +0200 (CEST)

Author: danydb
Date: 2012-08-23 22:52:06 +0200 (Thu, 23 Aug 2012)
New Revision: 5093

Modified:
   phpcompta/tags/rel650/include/class_acc_account_ledger.php
   phpcompta/tags/rel650/include/export_poste_detail_csv.php
   phpcompta/tags/rel650/include/export_poste_detail_pdf.php
Log:
0000705: Perte info lettrage lors de l'export .csv
Nom de fichier comprennent la date et le poste comptable

Modified: phpcompta/tags/rel650/include/class_acc_account_ledger.php
===================================================================
--- phpcompta/tags/rel650/include/class_acc_account_ledger.php  2012-08-23 
18:29:52 UTC (rev 5092)
+++ phpcompta/tags/rel650/include/class_acc_account_ledger.php  2012-08-23 
20:52:06 UTC (rev 5093)
@@ -127,7 +127,9 @@
        if ( $solded == 1)
          {
            $filter=str_replace('jrn_def_id','jr_def_id',$filter_sql);
-           $bal_sql="select sum(amount_deb) as s_deb,sum(amount_cred) as 
s_cred, j_poste from                                          (select case when 
j_debit='t' then j_montant else 0 end as amount_deb,
+           $bal_sql="select sum(amount_deb) as s_deb,sum(amount_cred) as 
s_cred, j_poste,
+                                coalesce(comptaproc.get_letter_jnt(j_id),-1) 
as letter
+                               from                                            
(select case when j_debit='t' then j_montant else 0 end as amount_deb,
                                                                case when 
j_debit='f' then j_montant else 0 end as amount_cred,
                                                                j_poste
                                                                from jrnx join 
jrn on (j_grpt = jr_grpt_id)

Modified: phpcompta/tags/rel650/include/export_poste_detail_csv.php
===================================================================
--- phpcompta/tags/rel650/include/export_poste_detail_csv.php   2012-08-23 
18:29:52 UTC (rev 5092)
+++ phpcompta/tags/rel650/include/export_poste_detail_csv.php   2012-08-23 
20:52:06 UTC (rev 5093)
@@ -25,10 +25,10 @@
 require_once('class_database.php');
 require_once("class_acc_account_ledger.php");
 require_once ('class_acc_operation.php');
-
+$fDate=date('dmy-Hi');
 header('Pragma: public');
 header('Content-type: application/csv');
-header('Content-Disposition: attachment;filename="poste.csv"',FALSE);
+header('Content-Disposition: 
attachment;filename="poste-'.$fDate.'-'.$_REQUEST['poste_id'].'.csv"',FALSE);
 require_once('class_dossier.php');
 $gDossier=dossier::id();
 
@@ -68,7 +68,8 @@
         "\"Description\";".
         "\"Débit\";".
         "\"Crédit\";".
-        "\"Prog.\"";
+        "\"Prog.\";".
+               "\"Let.\"";
         printf("\n");
 
         $prog=0;
@@ -84,7 +85,8 @@
             '"'.$op['description'].'";'.
             nb($op['deb_montant']).";".
             nb($op['cred_montant']).";".
-            nb(abs($prog));
+            nb(abs($prog)).";".
+                       (($op['letter']!=-1)?$op['letter']:"");
             printf("\n");
 
 

Modified: phpcompta/tags/rel650/include/export_poste_detail_pdf.php
===================================================================
--- phpcompta/tags/rel650/include/export_poste_detail_pdf.php   2012-08-23 
18:29:52 UTC (rev 5092)
+++ phpcompta/tags/rel650/include/export_poste_detail_pdf.php   2012-08-23 
20:52:06 UTC (rev 5093)
@@ -198,5 +198,5 @@
 
 }
 $fDate=date('dmy-Hi');
-$pdf->Output('poste-'.$fDate.'.pdf','D');
+$pdf->Output('poste-'.$fDate.'-'.$poste_id.'.pdf','D');
 ?>



---
PhpCompta est un logiciel de comptabilité libre en ligne (full web)
Projet opensource http://www.phpcompta.eu



reply via email to

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