diff --git a/CRM/Batch/Form/Batch.php b/CRM/Batch/Form/Batch.php index 3af565e66a13c428cbd0c4e81bb43717d9f4f777..48df091486eee5243da1497d65c3a9b5f67de3ee 100644 --- a/CRM/Batch/Form/Batch.php +++ b/CRM/Batch/Form/Batch.php @@ -63,7 +63,7 @@ class CRM_Batch_Form_Batch extends CRM_Admin_Form { $attributes = CRM_Core_DAO::getAttribute('CRM_Batch_DAO_Batch'); $this->add('text', 'title', ts('Batch Name'), $attributes['name'], TRUE); - $batchTypes = CRM_Core_PseudoConstant::get('CRM_Batch_DAO_Batch', 'type_id'); + $batchTypes = CRM_Batch_DAO_Batch::buildOptions('type_id'); // unset non-related types unset($batchTypes[3]); @@ -96,8 +96,6 @@ class CRM_Batch_Form_Batch extends CRM_Admin_Form { else { $defaults = $this->_values; } - - return $defaults; } diff --git a/CRM/Batch/Form/Entry.php b/CRM/Batch/Form/Entry.php index 8c5efd085bd18b8ce24ac49b3d7a9a14ee157ac9..a4b137f76236a9ddc7312a281bc94627c691a0cc 100644 --- a/CRM/Batch/Form/Entry.php +++ b/CRM/Batch/Form/Entry.php @@ -107,7 +107,10 @@ class CRM_Batch_Form_Entry extends CRM_Core_Form { $this->_profileId = CRM_Batch_BAO_Batch::getProfileId($this->_batchInfo['type_id']); } CRM_Core_Resources::singleton() - ->addSetting(array('batch' => array('type_id' => $this->_batchInfo['type_id']))); + ->addSetting(array('batch' => array('type_id' => $this->_batchInfo['type_id']))) + ->addSetting(array('setting' => array('monetaryThousandSeparator' => CRM_Core_Config::singleton()->monetaryThousandSeparator))) + ->addSetting(array('setting' => array('monetaryDecimalPoint' => CRM_Core_Config::singleton()->monetaryDecimalPoint))); + } /** diff --git a/templates/CRM/Batch/Form/Entry.tpl b/templates/CRM/Batch/Form/Entry.tpl index 29c8527e05c2c8f0e676f8b024e5a620adacf053..7cfbfeb7422dcc009ee06ea55972ae247f94a5a2 100644 --- a/templates/CRM/Batch/Form/Entry.tpl +++ b/templates/CRM/Batch/Form/Entry.tpl @@ -270,8 +270,8 @@ function calculateActualTotal() { //money formatting/localization function formatMoney(amount) { var c = 2; - var t = '{/literal}{$config->monetaryThousandSeparator}{literal}'; - var d = '{/literal}{$config->monetaryDecimalPoint}{literal}'; + var t = CRM.setting.monetaryThousandSeparator; + var d = CRM.setting.monetaryDecimalPoint; var n = amount, c = isNaN(c = Math.abs(c)) ? 2 : c,