(dev/core#959) Expose contribution page in Contribution Summary report
[civicrm-core.git] / CRM / Core / DAO / Phone.php
index 002ea1b93c6534adb278a99d5900a58353afc6ca..fce47cfc31ec1f0969174fd0f476f274131b9f0a 100644 (file)
@@ -135,6 +135,7 @@ class CRM_Core_DAO_Phone extends CRM_Core_DAO {
           'title' => ts('Phone ID'),
           'description' => ts('Unique Phone ID'),
           'required' => TRUE,
+          'where' => 'civicrm_phone.id',
           'table_name' => 'civicrm_phone',
           'entity' => 'Phone',
           'bao' => 'CRM_Core_BAO_Phone',
@@ -145,6 +146,7 @@ class CRM_Core_DAO_Phone extends CRM_Core_DAO {
           'type' => CRM_Utils_Type::T_INT,
           'title' => ts('Phone Contact'),
           'description' => ts('FK to Contact ID'),
+          'where' => 'civicrm_phone.contact_id',
           'table_name' => 'civicrm_phone',
           'entity' => 'Phone',
           'bao' => 'CRM_Core_BAO_Phone',
@@ -156,6 +158,7 @@ class CRM_Core_DAO_Phone extends CRM_Core_DAO {
           'type' => CRM_Utils_Type::T_INT,
           'title' => ts('Phone Location Type'),
           'description' => ts('Which Location does this phone belong to.'),
+          'where' => 'civicrm_phone.location_type_id',
           'table_name' => 'civicrm_phone',
           'entity' => 'Phone',
           'bao' => 'CRM_Core_BAO_Phone',
@@ -174,6 +177,7 @@ class CRM_Core_DAO_Phone extends CRM_Core_DAO {
           'type' => CRM_Utils_Type::T_BOOLEAN,
           'title' => ts('Is Phone Primary?'),
           'description' => ts('Is this the primary phone for this contact and location.'),
+          'where' => 'civicrm_phone.is_primary',
           'default' => '0',
           'table_name' => 'civicrm_phone',
           'entity' => 'Phone',
@@ -185,6 +189,7 @@ class CRM_Core_DAO_Phone extends CRM_Core_DAO {
           'type' => CRM_Utils_Type::T_BOOLEAN,
           'title' => ts('Is Billing Phone'),
           'description' => ts('Is this the billing?'),
+          'where' => 'civicrm_phone.is_billing',
           'default' => '0',
           'table_name' => 'civicrm_phone',
           'entity' => 'Phone',
@@ -196,6 +201,7 @@ class CRM_Core_DAO_Phone extends CRM_Core_DAO {
           'type' => CRM_Utils_Type::T_INT,
           'title' => ts('Mobile Provider'),
           'description' => ts('Which Mobile Provider does this phone belong to.'),
+          'where' => 'civicrm_phone.mobile_provider_id',
           'table_name' => 'civicrm_phone',
           'entity' => 'Phone',
           'bao' => 'CRM_Core_BAO_Phone',
@@ -248,6 +254,7 @@ class CRM_Core_DAO_Phone extends CRM_Core_DAO {
           'description' => ts('Phone number stripped of all whitespace, letters, and punctuation.'),
           'maxlength' => 32,
           'size' => CRM_Utils_Type::MEDIUM,
+          'where' => 'civicrm_phone.phone_numeric',
           'table_name' => 'civicrm_phone',
           'entity' => 'Phone',
           'bao' => 'CRM_Core_BAO_Phone',
@@ -258,10 +265,8 @@ class CRM_Core_DAO_Phone extends CRM_Core_DAO {
           'type' => CRM_Utils_Type::T_INT,
           'title' => ts('Phone Type'),
           'description' => ts('Which type of phone does this number belongs.'),
-          'export' => TRUE,
           'where' => 'civicrm_phone.phone_type_id',
-          'headerPattern' => '',
-          'dataPattern' => '',
+          'export' => TRUE,
           'table_name' => 'civicrm_phone',
           'entity' => 'Phone',
           'bao' => 'CRM_Core_BAO_Phone',