Skip to content

Commit

Permalink
CRM-16189, used api
Browse files Browse the repository at this point in the history
----------------------------------------
* CRM-16189: Improve support for Accrual Method bookkeeping
  https://issues.civicrm.org/jira/browse/CRM-16189
  • Loading branch information
pradpnayak committed Sep 20, 2016
1 parent 07f5cc4 commit 829802b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion CRM/Contribute/Form/AdditionalPayment.php
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,13 @@ public function postProcess() {
);
$contributionStatusID = CRM_Core_DAO::getFieldValue('CRM_Contribute_DAO_Contribution', $this->_contributionId, 'contribution_status_id');
if ($contributionStatuses[$contributionStatusID] == 'Pending') {
CRM_Core_DAO::setFieldValue('CRM_Contribute_DAO_Contribution', $this->_contributionId, 'contribution_status_id', array_search('Partially paid', $contributionStatuses));
civicrm_api3('Contribution', 'create',
array(
'id' => $this->_contributionId,
'contribution_status_id' => array_search('Partially paid', $contributionStatuses),
'is_pay_later' => 0,
)
);
}
$submittedValues['trxn_date'] = CRM_Utils_Date::processDate($submittedValues['trxn_date'], $submittedValues['trxn_date_time']);
if ($this->_mode) {
Expand Down

0 comments on commit 829802b

Please sign in to comment.