* $financialAccountType array with key account relationship and value financial account type option groups
*
*/
+ /**
+ * @param $config
+ */
static function jqFinancial($config) {
if (!isset($_GET['_value']) ||
empty($_GET['_value'])) {
) + $selectedArray;
}
}
- echo json_encode($elements);
- CRM_Utils_System::civiExit();
+ CRM_Utils_JSON::output($elements);
}
+ /**
+ * @param $config
+ */
static function jqFinancialRelation($config) {
if (!isset($_GET['_value']) ||
empty($_GET['_value'])) {
}
}
}
- echo json_encode($elements);
- CRM_Utils_System::civiExit();
+ CRM_Utils_JSON::output($elements);
}
+ /**
+ * @param $config
+ */
static function jqFinancialType($config) {
if (! isset($_GET['_value']) ||
empty($_GET['_value'])) {
}
$elements = CRM_Core_DAO::getFieldValue('CRM_Contribute_DAO_Product', $_GET['_value'], 'financial_type_id');
- echo json_encode($elements);
- CRM_Utils_System::civiExit();
+ CRM_Utils_JSON::output($elements);
}
/**
}
}
}
- echo json_encode($response);
- CRM_Utils_System::civiExit();
+ CRM_Utils_JSON::output($response);
}
static function getFinancialTransactionsList() {
else {
$status = array('status' => ts("This batch is configured to include only transactions using %1 payment method. If you want to include other transactions, please edit the batch first and modify the Payment Method.", array( 1 => $paymentInstrument)));
}
- echo json_encode($status);
- CRM_Utils_System::civiExit();
+ CRM_Utils_JSON::output($status);
}
static function getBatchSummary() {
'opened_date' => CRM_Utils_Date::customFormat($batchInfo->created_date),
);
- echo json_encode($batchSummary);
- CRM_Utils_System::civiExit();
- }
-
- /**
- * Callback to perform action on Print Invoice button.
- */
- static function getPrintPDF() {
-
- $contribIDs = CRM_Utils_Request::retrieve('id', 'Positive', $this, FALSE);
- $contributionIDs = array($contribIDs);
- $contactIds = CRM_Utils_Request::retrieve('cid', 'Positive', $this, FALSE);
- $params = array('output' => 'pdf_invoice');
- CRM_Contribute_Form_Task_Invoice::printPDF($contributionIDs , $params, $contactIds);
+ CRM_Utils_JSON::output($batchSummary);
}
}