Merge pull request #5680 from elinw/restauthenticationjoomla
[civicrm-core.git] / CRM / Contribute / Form / UpdateBilling.php
index b3dbaa80814ab046db5f19d7d97cba688e8c6324..da01f93d1929dd26ca32b0bc838067488148196f 100644 (file)
@@ -111,13 +111,7 @@ class CRM_Contribute_Form_UpdateBilling extends CRM_Core_Form {
     }
     $this->assign('paymentProcessor', $this->_paymentProcessor);
 
-    // get the billing location type
-    $locationTypes = CRM_Core_PseudoConstant::get('CRM_Core_DAO_Address', 'location_type_id', array(), 'validate');
-    $this->_bltID = array_search('Billing', $locationTypes);
-    $this->assign('bltID', $this->_bltID);
-    if (!$this->_bltID) {
-      CRM_Core_Error::fatal(ts('Please set a location type of %1', array(1 => 'Billing')));
-    }
+    $this->assignBillingType();
 
     $this->assign('frequency_unit', $this->_subscriptionDetails->frequency_unit);
     $this->assign('frequency_interval', $this->_subscriptionDetails->frequency_interval);