本文整理汇总了PHP中CRM_Batch_BAO_Batch::exportFinancialBatch方法的典型用法代码示例。如果您正苦于以下问题:PHP CRM_Batch_BAO_Batch::exportFinancialBatch方法的具体用法?PHP CRM_Batch_BAO_Batch::exportFinancialBatch怎么用?PHP CRM_Batch_BAO_Batch::exportFinancialBatch使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CRM_Batch_BAO_Batch
的用法示例。
在下文中一共展示了CRM_Batch_BAO_Batch::exportFinancialBatch方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: postProcess
/**
* Process the form after the input has been submitted and validated.
*/
public function postProcess()
{
if (!$this->_exportFormat) {
$params = $this->exportValues();
$this->_exportFormat = $params['export_format'];
}
if ($this->_id) {
$batchIds = array($this->_id);
} elseif (!empty($this->_batchIds)) {
$batchIds = explode(',', $this->_batchIds);
}
// Recalculate totals
$totals = CRM_Batch_BAO_Batch::batchTotals($batchIds);
// build batch params
$session = CRM_Core_Session::singleton();
$batchParams['modified_date'] = date('YmdHis');
$batchParams['modified_id'] = $session->get('userID');
$batchParams['status_id'] = $this->_exportStatusId;
$ids = array();
foreach ($batchIds as $batchId) {
$batchParams['id'] = $ids['batchID'] = $batchId;
// Update totals
$batchParams = array_merge($batchParams, $totals[$batchId]);
CRM_Batch_BAO_Batch::create($batchParams, $ids, 'financialBatch');
}
CRM_Batch_BAO_Batch::exportFinancialBatch($batchIds, $this->_exportFormat);
}