financial#71 - allow emailing partially paid invoices
authorJon Goldberg <jon@megaphonetech.com>
Wed, 2 Oct 2019 14:28:19 +0000 (10:28 -0400)
committerJon Goldberg <jon@megaphonetech.com>
Wed, 2 Oct 2019 14:28:19 +0000 (10:28 -0400)
CRM/Contribute/Form/Task/Invoice.php

index 55447fd77a6ba59ff7dd7ac8c9d7e370d16ab14e..23cea476ede62e9a501765bbbae9561dc8a93cf2 100644 (file)
@@ -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