Skip to content
Snippets Groups Projects
Unverified Commit 7a464f3c authored by Eileen McNaughton's avatar Eileen McNaughton Committed by GitHub
Browse files

Merge pull request #15388 from MegaphoneJon/financial-71

financial#71 - allow emailing partially paid invoices
parents 6fc8d110 46bee19a
No related branches found
No related tags found
No related merge requests found
......@@ -94,9 +94,9 @@ class CRM_Contribute_Form_Task_Invoice extends CRM_Contribute_Form_Task {
parent::preProcess();
}
// check that all the contribution ids have status Completed, Pending, Refunded.
// check that all the contribution ids have status Completed, Pending, Refunded, or Partially Paid.
$this->_contributionStatusId = CRM_Contribute_PseudoConstant::contributionStatus(NULL, 'name');
$status = ['Completed', 'Pending', 'Refunded'];
$status = ['Completed', 'Pending', 'Refunded', 'Partially paid'];
$statusId = [];
foreach ($this->_contributionStatusId as $key => $value) {
if (in_array($value, $status)) {
......@@ -107,7 +107,7 @@ class CRM_Contribute_Form_Task_Invoice extends CRM_Contribute_Form_Task {
$query = "SELECT count(*) FROM civicrm_contribution WHERE contribution_status_id NOT IN ($Id) AND {$this->_componentClause}";
$count = CRM_Core_DAO::singleValueQuery($query);
if ($count != 0) {
CRM_Core_Error::statusBounce(ts('Please select only contributions with Completed, Pending, Refunded status.'));
CRM_Core_Error::statusBounce(ts('Please select only contributions with Completed, Pending, Refunded, or Partially Paid status.'));
}
// we have all the contribution ids, so now we get the contact ids
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment