CRM-16259, Implemented payment API for get and create via UI
authorPradeep Nayak <pradpnayak@gmail.com>
Tue, 12 Jan 2016 12:51:08 +0000 (18:21 +0530)
committerPradeep Nayak <pradpnayak@gmail.com>
Tue, 12 Jan 2016 12:51:08 +0000 (18:21 +0530)
----------------------------------------
* CRM-16259: Create Payment API
  https://issues.civicrm.org/jira/browse/CRM-16259

CRM/Contribute/BAO/Query.php

index c39a490372221eefb83bcca447cd35d51ef2cbcd..e86b91fabd40800571658d101a73399dd3cd7623 100644 (file)
@@ -583,6 +583,11 @@ class CRM_Contribute_BAO_Query {
         $query->_tables['civicrm_product'] = $query->_whereTables['civicrm_product'] = 1;
         return;
 
+      case 'contribution_is_payment':
+        $query->_where[$grouping][] = " civicrm_financial_trxn.is_payment $op $value";
+        $query->_tables['contribution_financial_trxn'] = $query->_whereTables['contribution_financial_trxn'] = 1;
+        return;
+
       default:
         //all other elements are handle in this case
         $fldName = substr($name, 13);