phpcompta-dev
[Top][All Lists]
Advanced

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

[Phpcompta-dev] r5497 - phpcompta/trunk/include


From: phpcompta-dev
Subject: [Phpcompta-dev] r5497 - phpcompta/trunk/include
Date: Mon, 14 Oct 2013 23:19:46 +0200 (CEST)

Author: danydb
Date: 2013-10-14 23:19:46 +0200 (Mon, 14 Oct 2013)
New Revision: 5497

Added:
   phpcompta/trunk/include/export_rec_csv.php
Log:
Export CSV Reconciliation 

Added: phpcompta/trunk/include/export_rec_csv.php
===================================================================
--- phpcompta/trunk/include/export_rec_csv.php                          (rev 0)
+++ phpcompta/trunk/include/export_rec_csv.php  2013-10-14 21:19:46 UTC (rev 
5497)
@@ -0,0 +1,36 @@
+<?php
+/**
+ * Export to CSV the operations asked in impress_rec.inc.php
+ * variable set $g_user,$cn
+ * @see impress_rec.inc.php
+ */
+if ( ! defined ('ALLOWED') ) die('Appel direct ne sont pas permis');
+$Date=date('Ymd');
+$filename="reconcialed_operation-".$Date;
+
+header('Pragma: public');
+header('Content-type: application/csv');
+header('Content-Disposition: attachment;filename="'.$filename.'.csv"',FALSE);
+
+require_once 'class_acc_reconciliation.php';
+include_once ("ac_common.php");
+require_once('class_database.php');
+require_once('class_dossier.php');
+// --------------------------
+// Check if all mandatory arg are passed
+foreach (array('choice','p_end','p_start') as $arg)
+{
+    if ( ! isset ($_GET[$arg])) {
+        die ("argument [".$arg."] is missing");
+    }
+}
+extract($_GET);
+$r_jrn=(isset($r_jrn))?$r_jrn:'';
+// -------------------------
+// Create object and export
+$acc_reconciliation=new Acc_Reconciliation($cn);
+$acc_reconciliation->a_jrn=$r_jrn;
+$acc_reconciliation->start_day=$p_start;
+$acc_reconciliation->end_day=$p_end;
+
+$array=$acc_reconciliation->export_csv($choice);
\ No newline at end of file



---
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]