From: Jon Goldberg Date: Wed, 2 Oct 2019 14:28:19 +0000 (-0400) Subject: financial#71 - allow emailing partially paid invoices X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=46bee19a7dec2ad0768ec7d9326c32f79ddec517;p=civicrm-core.git financial#71 - allow emailing partially paid invoices --- diff --git a/CRM/Contribute/Form/Task/Invoice.php b/CRM/Contribute/Form/Task/Invoice.php index 55447fd77a..23cea476ed 100644 --- a/CRM/Contribute/Form/Task/Invoice.php +++ b/CRM/Contribute/Form/Task/Invoice.php @@ -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