Merge remote-tracking branch 'upstream/4.4' into 4.4-master-2014-07-16-12-52-48
[civicrm-core.git] / CRM / Report / Form / Contribute / Detail.php
index bee3481c65adaeb98cb425ccdea73497b0b0b937..0d9d2bae802cf93c93632773b8a3c3873c5122fc 100644 (file)
@@ -44,6 +44,12 @@ class CRM_Report_Form_Contribute_Detail extends CRM_Report_Form {
 
   protected $_customGroupExtends = array( 'Contribution');
 
+  /**
+   *
+   */
+  /**
+   *
+   */
   function __construct() {
 
     // Check if CiviCampaign is a) enabled and b) has active campaigns
@@ -144,18 +150,6 @@ class CRM_Report_Form_Contribute_Detail extends CRM_Report_Form {
             'name' => 'id',
             'title' => ts('Contribution ID'),
           ),
-          'contribution_or_soft' =>
-          array('title' => ts('Contribution OR Soft Credit?'),
-            'dbAlias' => "'Contribution'"
-          ),
-          'soft_credits' =>
-          array('title' => ts('Soft Credits'),
-            'dbAlias' => "NULL"
-          ),
-          'soft_credit_for' =>
-          array('title' => ts('Soft Credit For'),
-            'dbAlias' => "NULL"
-          ),
           'financial_type_id' => array('title' => ts('Financial Type'),
             'default' => TRUE,
           ),
@@ -176,13 +170,25 @@ class CRM_Report_Form_Contribute_Detail extends CRM_Report_Form {
           'trxn_id' => NULL,
           'receive_date' => array('default' => TRUE),
           'receipt_date' => NULL,
-          'fee_amount' => NULL,
-          'net_amount' => NULL,
           'total_amount' => array('title' => ts('Amount'),
             'required' => TRUE,
             'statistics' =>
             array('sum' => ts('Amount')),
           ),
+          'fee_amount' => NULL,
+          'net_amount' => NULL,
+          'contribution_or_soft' =>
+          array('title' => ts('Contribution OR Soft Credit?'),
+            'dbAlias' => "'Contribution'"
+          ),
+          'soft_credits' =>
+          array('title' => ts('Soft Credits'),
+            'dbAlias' => "NULL"
+          ),
+          'soft_credit_for' =>
+          array('title' => ts('Soft Credit For'),
+            'dbAlias' => "NULL"
+          ),
         ),
         'filters' =>
         array(
@@ -238,6 +244,7 @@ class CRM_Report_Form_Contribute_Detail extends CRM_Report_Form {
           'financial_type_id' => array('title' => ts('Financial Type')),
           'contribution_status_id' => array('title' => ts('Contribution Status')),
           'payment_instrument_id' => array('title' => ts('Payment Instrument')),
+          'receive_date' => array('title' => ts('Receive Date')),
         ),
         'grouping' => 'contri-fields',
       ),
@@ -384,6 +391,9 @@ class CRM_Report_Form_Contribute_Detail extends CRM_Report_Form {
     }
   }
 
+  /**
+   * @param bool $softcredit
+   */
   function from($softcredit = FALSE) {
     $this->_from = "
         FROM  civicrm_contact      {$this->_aliases['civicrm_contact']} {$this->_aclFrom}
@@ -457,6 +467,11 @@ class CRM_Report_Form_Contribute_Detail extends CRM_Report_Form {
     $this->_groupBy = " GROUP BY {$this->_aliases['civicrm_contact']}.id, {$this->_aliases['civicrm_contribution']}.id ";
   }
 
+  /**
+   * @param $rows
+   *
+   * @return array
+   */
   function statistics(&$rows) {
     $statistics = parent::statistics($rows);
 
@@ -620,6 +635,9 @@ UNION ALL
     $this->endPostProcess($rows);
   }
 
+  /**
+   * @param $rows
+   */
   function alterDisplay(&$rows) {
     // custom code to alter rows
     $checkList          = array();