$setPrevContribution = TRUE;
// CRM-13964 partial payment
- if (!empty($params['partial_payment_total']) && !empty($params['partial_amount_pay'])) {
+ if (!empty($params['partial_payment_total']) && !empty($params['partial_amount_to_pay'])) {
$partialAmtTotal = $params['partial_payment_total'];
- $partialAmtPay = $params['partial_amount_pay'];
+ $partialAmtPay = $params['partial_amount_to_pay'];
$params['total_amount'] = $partialAmtTotal;
if ($partialAmtPay < $partialAmtTotal) {
$params['contribution_status_id'] = CRM_Core_PseudoConstant::getKey('CRM_Contribute_BAO_Contribution', 'contribution_status_id', 'Partially paid');
$statusId = $params['contribution']->contribution_status_id;
// CRM-13964 partial payment
if ($contributionStatus == 'Partially paid'
- && !empty($params['partial_payment_total']) && !empty($params['partial_amount_pay'])
+ && !empty($params['partial_payment_total']) && !empty($params['partial_amount_to_pay'])
) {
- $partialAmtPay = CRM_Utils_Rule::cleanMoney($params['partial_amount_pay']);
+ $partialAmtPay = CRM_Utils_Rule::cleanMoney($params['partial_amount_to_pay']);
$partialAmtTotal = CRM_Utils_Rule::cleanMoney($params['partial_payment_total']);
$fromFinancialAccountId = CRM_Contribute_PseudoConstant::getRelationalFinancialAccount($params['financial_type_id'], 'Accounts Receivable Account is');
$trxnParams['card_type_id'] = CRM_Utils_Array::value('card_type_id', $params);
$return = $financialTxn = CRM_Core_BAO_FinancialTrxn::create($trxnParams);
$params['entity_id'] = $financialTxn->id;
- if (empty($params['partial_payment_total']) && empty($params['partial_amount_pay'])) {
+ if (empty($params['partial_payment_total']) && empty($params['partial_amount_to_pay'])) {
self::$_trxnIDs[] = $financialTxn->id;
}
}
'entity_table' => 'civicrm_financial_trxn',
'entity_id' => $financialTxn->id,
);
- CRM_Batch_BAO_Batch::addBatchEntity($entityParams);
+ CRM_Batch_BAO_EntityBatch::create($entityParams);
}
// when a fee is charged
$arAccountId = CRM_Contribute_PseudoConstant::getRelationalFinancialAccount($contributionDAO->financial_type_id, 'Accounts Receivable Account is');
if ($paymentType == 'owed') {
$params['partial_payment_total'] = $contributionDAO->total_amount;
- $params['partial_amount_pay'] = $trxnsData['total_amount'];
+ $params['partial_amount_to_pay'] = $trxnsData['total_amount'];
$trxnsData['net_amount'] = !empty($trxnsData['net_amount']) ? $trxnsData['net_amount'] : $trxnsData['total_amount'];
$params['pan_truncation'] = CRM_Utils_Array::value('pan_truncation', $trxnsData);
$params['card_type_id'] = CRM_Utils_Array::value('card_type_id', $trxnsData);
$contribution->contact_id = $ids['related_contact'];
}
CRM_Activity_BAO_Activity::addActivity($contribution, NULL, $targetContactID);
- // event
- }
- else {
- CRM_Activity_BAO_Activity::addActivity($participant);
}
// CRM-9132 legacy behaviour was that receipts were sent out in all instances. Still sending