}
// also check for billing information
// get the billing location type
- $locationTypes = CRM_Core_PseudoConstant::get('CRM_Core_DAO_Address', 'location_type_id');
+ $locationTypes = CRM_Core_PseudoConstant::get('CRM_Core_DAO_Address', 'location_type_id', array(), 'validate');
// CRM-8108 remove ts around Billing location type
//$this->_bltID = array_search( ts('Billing'), $locationTypes );
$this->_bltID = array_search('Billing', $locationTypes);
$defaults = parent::setDefaultValues();
//setting default join date and receive date
- list($now) = CRM_Utils_Date::setDateDefaults();
+ list($now, $currentTime) = CRM_Utils_Date::setDateDefaults();
if ($this->_action == CRM_Core_Action::ADD) {
$defaults['receive_date'] = $now;
+ $defaults['receive_date_time'] = $currentTime;
}
if (is_numeric($this->_memType)) {
$billingDefaults = $this->getProfileDefaults('Billing', $this->_contactID);
$defaults = array_merge($defaults, $billingDefaults);
-
+
+ // now fix all state country selectors, set correct state based on country
+ CRM_Core_BAO_Address::fixAllStateSelects($this, $defaults);
+
// // hack to simplify credit card entry for testing
// $defaults['credit_card_type'] = 'Visa';
// $defaults['credit_card_number'] = '4807731747657838';
}
}
- list($mailSend, $subject, $message, $html) = CRM_Core_BAO_MessageTemplates::sendTemplate(
+ list($mailSend, $subject, $message, $html) = CRM_Core_BAO_MessageTemplate::sendTemplate(
array(
'groupName' => 'msg_tpl_workflow_membership',
'valueName' => 'membership_offline_receipt',