<?php
-
/*
+--------------------------------------------------------------------+
| CiviCRM version 4.6 |
| GNU Affero General Public License or the licensing of CiviCRM, |
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
+--------------------------------------------------------------------+
-*/
+ */
/**
*
*
*/
-/*
- * @see http://wiki.civicrm.org/confluence/display/CRM/CiviAccounts+Specifications+-++Batches#CiviAccountsSpecifications-Batches-%C2%A0Overviewofimplementation
+/**
+ * @link http://wiki.civicrm.org/confluence/display/CRM/CiviAccounts+Specifications+-++Batches#CiviAccountsSpecifications-Batches-%C2%A0Overviewofimplementation
*/
-
class CRM_Financial_BAO_ExportFormat_CSV extends CRM_Financial_BAO_ExportFormat {
// For this phase, we always output these records too so that there isn't data referenced in the journal entries that isn't defined anywhere.
// Save the file in the public directory
$fileName = self::putFile($export);
- foreach ( self::$complementaryTables as $rct ) {
+ foreach (self::$complementaryTables as $rct) {
$func = "export{$rct}";
$this->$func();
}
WHERE eb.batch_id = ( %1 )";
$params = array(1 => array($batchId, 'String'));
- $dao = CRM_Core_DAO::executeQuery( $sql, $params );
+ $dao = CRM_Core_DAO::executeQuery($sql, $params);
return $dao;
}
*/
public function putFile($export) {
$config = CRM_Core_Config::singleton();
- $fileName = $config->uploadDir.'Financial_Transactions_'.$this->_batchIds.'_'.date('YmdHis').'.'.$this->getFileExtension();
- $this->_downloadFile[] = $config->customFileUploadDir.CRM_Utils_File::cleanFileName(basename($fileName));
+ $fileName = $config->uploadDir . 'Financial_Transactions_' . $this->_batchIds . '_' . date('YmdHis') . '.' . $this->getFileExtension();
+ $this->_downloadFile[] = $config->customFileUploadDir . CRM_Utils_File::cleanFileName(basename($fileName));
$out = fopen($fileName, 'w');
fputcsv($out, $export['headers']);
unset($export['headers']);
* Generate CSV array for export
*
* @param array $export
- *
*/
public function makeCSV($export) {
foreach ($export as $batchId => $dao) {
$financialItems = array();
$this->_batchIds = $batchId;
while ($dao->fetch()) {
- $creditAccountName = $creditAccountType =
- $creditAccount = NULL;
+ $creditAccountName = $creditAccountType = $creditAccount = NULL;
if ($dao->credit_account) {
$creditAccountName = $dao->credit_account_name;
$creditAccountType = $dao->credit_account_type_code;
public function exportTRANS() {
}
+
}