whitespace only
authorEileen McNaughton <eileen@fuzion.co.nz>
Fri, 5 Sep 2014 00:34:24 +0000 (12:34 +1200)
committerEileen McNaughton <eileen@fuzion.co.nz>
Thu, 18 Sep 2014 05:31:45 +0000 (17:31 +1200)
CRM/Report/Form/Contribute/HouseholdSummary.php

index d46e70704258bc2979075704c9983e00a65ad100..67c5867313c9ddb9cf30ea97b4b7e1a605293fda 100644 (file)
@@ -61,49 +61,39 @@ class CRM_Report_Form_Contribute_HouseholdSummary extends CRM_Report_Form {
     }
 
     $this->_columns = array(
-      'civicrm_contact_household' =>
-      array(
+      'civicrm_contact_household' => array(
         'dao' => 'CRM_Contact_DAO_Contact',
-        'fields' =>
-        array(
+        'fields' => array(
           'household_name' =>
-          array('title' => ts('Household Name'),
-            'required' => TRUE,
-          ),
-          'id' =>
-          array(
+            array(
+              'title' => ts('Household Name'),
+              'required' => TRUE,
+            ),
+          'id' => array(
             'no_display' => TRUE,
             'required' => TRUE,
           ),
-          'contact_type' =>
-          array(
+          'contact_type' => array(
             'title' => ts('Contact Type'),
           ),
-          'contact_sub_type' =>
-          array(
+          'contact_sub_type' => array(
             'title' => ts('Contact SubType'),
           ),
         ),
-        'filters' =>
-        array(
-          'household_name' =>
-          array('title' => ts('Household Name')),
+        'filters' => array(
+          'household_name' => array('title' => ts('Household Name')),
         ),
         'grouping' => 'household-fields',
       ),
-      'civicrm_relationship' =>
-      array(
+      'civicrm_relationship' => array(
         'dao' => 'CRM_Contact_DAO_Relationship',
-        'fields' =>
-        array(
-          'relationship_type_id' =>
-          array('title' => ts('Relationship Type'),
+        'fields' => array(
+          'relationship_type_id' => array(
+            'title' => ts('Relationship Type'),
           ),
         ),
-        'filters' =>
-        array(
-          'relationship_type_id' =>
-          array(
+        'filters' => array(
+          'relationship_type_id' => array(
             'title' => ts('Relationship Type'),
             'type' => CRM_Utils_Type::T_INT,
             'operatorType' => CRM_Report_Form::OP_SELECT,
@@ -113,28 +103,25 @@ class CRM_Report_Form_Contribute_HouseholdSummary extends CRM_Report_Form {
         ),
         'grouping' => 'household-fields',
       ),
-      'civicrm_contact' =>
-      array(
+      'civicrm_contact' => array(
         'dao' => 'CRM_Contact_DAO_Contact',
-        'fields' =>
-        array(
-          'sort_name' =>
-          array('title' => ts('Contact Name'),
+        'fields' => array(
+          'sort_name' => array(
+            'title' => ts('Contact Name'),
             'required' => TRUE,
           ),
-          'id' =>
-          array(
+          'id' => array(
             'no_display' => TRUE,
             'required' => TRUE,
           ),
         ),
         'grouping' => 'contact-fields',
       ),
-      'civicrm_contribution' =>
-      array(
+      'civicrm_contribution' => array(
         'dao' => 'CRM_Contribute_DAO_Contribution',
-        'fields' =>
-        array('total_amount' => array('title' => ts('Amount'),
+        'fields' => array(
+          'total_amount' => array(
+            'title' => ts('Amount'),
             'required' => TRUE,
           ),
           'id' => array(
@@ -145,7 +132,8 @@ class CRM_Report_Form_Contribute_HouseholdSummary extends CRM_Report_Form {
             'title' => 'Contribution Status',
             'default' => TRUE,
           ),
-          'check_number' => array('title' => ts('Check Number'),
+          'check_number' => array(
+            'title' => ts('Check Number'),
           ),
           'currency' => array(
             'required' => TRUE,
@@ -155,21 +143,18 @@ class CRM_Report_Form_Contribute_HouseholdSummary extends CRM_Report_Form {
           'receive_date' => array('default' => TRUE),
           'receipt_date' => NULL,
         ),
-        'filters' =>
-        array(
-          'receive_date' =>
-          array('operatorType' => CRM_Report_Form::OP_DATE),
-          'total_amount' =>
-          array('title' => ts('Amount Between')),
-          'currency' =>
-          array('title' => 'Currency',
+        'filters' => array(
+          'receive_date' => array('operatorType' => CRM_Report_Form::OP_DATE),
+          'total_amount' => array('title' => ts('Amount Between')),
+          'currency' => array(
+            'title' => 'Currency',
             'operatorType' => CRM_Report_Form::OP_MULTISELECT,
             'options' => CRM_Core_OptionGroup::values('currencies_enabled'),
             'default' => NULL,
             'type' => CRM_Utils_Type::T_STRING,
           ),
-          'contribution_status_id' =>
-          array('title' => ts('Contribution Status'),
+          'contribution_status_id' => array(
+            'title' => ts('Contribution Status'),
             'operatorType' => CRM_Report_Form::OP_MULTISELECT,
             'options' => CRM_Contribute_PseudoConstant::contributionStatus(),
             'default' => array(1),
@@ -177,28 +162,26 @@ class CRM_Report_Form_Contribute_HouseholdSummary extends CRM_Report_Form {
         ),
         'grouping' => 'contri-fields',
       ),
-      'civicrm_address' =>
-      array(
+      'civicrm_address' => array(
         'dao' => 'CRM_Core_DAO_Address',
-        'fields' =>
-        array(
+        'fields' => array(
           'street_address' => NULL,
           'city' => NULL,
           'postal_code' => NULL,
-          'state_province_id' =>
-          array('title' => ts('State/Province'),
+          'state_province_id' => array(
+            'title' => ts('State/Province'),
           ),
-          'country_id' =>
-          array('title' => ts('Country'),
+          'country_id' => array(
+            'title' => ts('Country'),
           ),
         ),
         'grouping' => 'contact-fields',
       ),
-      'civicrm_email' =>
-      array(
+      'civicrm_email' => array(
         'dao' => 'CRM_Core_DAO_Email',
-        'fields' =>
-        array('email' => NULL),
+        'fields' => array(
+          'email' => NULL
+        ),
         'grouping' => 'contact-fields',
       ),
     );
@@ -208,7 +191,8 @@ class CRM_Report_Form_Contribute_HouseholdSummary extends CRM_Report_Form {
         'title' => 'Campaign',
         'default' => 'false',
       );
-      $this->_columns['civicrm_contribution']['filters']['campaign_id'] = array('title' => ts('Campaign'),
+      $this->_columns['civicrm_contribution']['filters']['campaign_id'] = array(
+        'title' => ts('Campaign'),
         'operatorType' => CRM_Report_Form::OP_MULTISELECT,
         'options' => $this->activeCampaigns,
       );
@@ -290,8 +274,8 @@ class CRM_Report_Form_Contribute_HouseholdSummary extends CRM_Report_Form {
           $clause = NULL;
           if (CRM_Utils_Array::value('type', $field) & CRM_Utils_Type::T_DATE) {
             $relative = CRM_Utils_Array::value("{$fieldName}_relative", $this->_params);
-            $from     = CRM_Utils_Array::value("{$fieldName}_from", $this->_params);
-            $to       = CRM_Utils_Array::value("{$fieldName}_to", $this->_params);
+            $from = CRM_Utils_Array::value("{$fieldName}_from", $this->_params);
+            $to = CRM_Utils_Array::value("{$fieldName}_to", $this->_params);
 
             $clause = $this->dateClause($field['name'], $relative, $from, $to, $field['type']);
           }
@@ -354,7 +338,8 @@ class CRM_Report_Form_Contribute_HouseholdSummary extends CRM_Report_Form {
         $value['title'] == 'Relationship Type' &&
         isset($this->relationTypes[$this->relationshipId . '_' . $type])
       ) {
-        $statistics['filters'][$id]['value'] = 'Is equal to ' . $this->relationTypes[$this->relationshipId . '_' . $type];
+        $statistics['filters'][$id]['value'] = 'Is equal to ' .
+          $this->relationTypes[$this->relationshipId . '_' . $type];
       }
     }
     return $statistics;
@@ -456,7 +441,8 @@ class CRM_Report_Form_Contribute_HouseholdSummary extends CRM_Report_Form {
               $this->_absoluteUrl
             );
 
-            $rows[$rowNum]['civicrm_contact_household_household_name'] = "<a href='$url' title='" . ts('View contact summary for this househould') . "'>" . $value . '</a>';
+            $rows[$rowNum]['civicrm_contact_household_household_name'] =
+              "<a href='$url' title='" . ts('View contact summary for this househould') . "'>" . $value . '</a>';
           }
           $entryFound = TRUE;
         }
@@ -534,7 +520,8 @@ class CRM_Report_Form_Contribute_HouseholdSummary extends CRM_Report_Form {
         CRM_Core_Permission::check('access CiviContribute')
       ) {
         $url = CRM_Utils_System::url("civicrm/contact/view/contribution",
-          "reset=1&id=" . $row['civicrm_contribution_id'] . "&cid=" . $row['civicrm_contact_id'] . "&action=view&context=contribution&selectedChild=contribute",
+          "reset=1&id=" . $row['civicrm_contribution_id'] . "&cid=" . $row['civicrm_contact_id'] .
+          "&action=view&context=contribution&selectedChild=contribute",
           $this->_absoluteUrl
         );
         $rows[$rowNum]['civicrm_contribution_total_amount_link'] = $url;