'weight' => 8,
'option_values' => [
'Do_not_show' => ts('Do not show breakdown, only show total -i.e ' .
- $config->defaultCurrencySymbol . '120.00'),
+ CRM_Core_BAO_Country::defaultCurrencySymbol() . '120.00'),
'Inclusive' => ts('Show [tax term] inclusive price - i.e. ' .
- $config->defaultCurrencySymbol .
+ CRM_Core_BAO_Country::defaultCurrencySymbol() .
'120.00 (includes [tax term] of ' .
- $config->defaultCurrencySymbol . '20.00)'),
+ CRM_Core_BAO_Country::defaultCurrencySymbol() . '20.00)'),
'Exclusive' => ts('Show [tax term] exclusive price - i.e. ' .
- $config->defaultCurrencySymbol . '100.00 + ' .
- $config->defaultCurrencySymbol . '20.00 [tax term]'),
+ CRM_Core_BAO_Country::defaultCurrencySymbol() . '100.00 + ' .
+ CRM_Core_BAO_Country::defaultCurrencySymbol() . '20.00 [tax term]'),
],
],
];
->addSetting(['setting' => ['monetaryThousandSeparator' => CRM_Core_Config::singleton()->monetaryThousandSeparator]])
->addSetting(['setting' => ['monetaryDecimalPoint' => CRM_Core_Config::singleton()->monetaryDecimalPoint]]);
+ $this->assign('defaultCurrencySymbol', CRM_Core_BAO_Country::defaultCurrencySymbol());
}
/**
$config = CRM_Core_Config::singleton();
$data = [];
- $data['currencySymbol'] = $config->defaultCurrencySymbol;
+ $data['currencySymbol'] = CRM_Core_BAO_Country::defaultCurrencySymbol();
if (empty($contributionPageID) ||
CRM_Utils_Type::validate($contributionPageID, 'Integer') == NULL
* @return string
*/
public static function getDefaultCurrencySymbol($k = NULL) {
- $config = CRM_Core_Config::singleton();
- return $config->defaultCurrencySymbol(Civi::settings()->get('defaultCurrency'));
+ return CRM_Core_BAO_Country::defaultCurrencySymbol(\Civi::settings()->get('defaultCurrency'));
}
}
* @return string
*/
public function defaultCurrencySymbol($defaultCurrency = NULL) {
+ CRM_Core_Error::deprecatedFunctionWarning('CRM_Core_BAO_Country::defaultCurrencySymbol');
return CRM_Core_BAO_Country::defaultCurrencySymbol($defaultCurrency);
}
$config = CRM_Core_Config::singleton();
+ // @fixme this is probably the wrong place for this. It is required by jsortable.tpl which is inherited from many page templates.
+ // So we have to add it here to deprecate $config->defaultCurrencySymbol
+ $this->assign('defaultCurrencySymbol', CRM_Core_BAO_Country::defaultCurrencySymbol());
+
// Intermittent alert to admins
CRM_Utils_Check::singleton()->showPeriodicAlerts();
$this->assign('pendingRefund', array_search('Pending refund', $statuses));
$this->assign('participantStatus', $this->_participantStatus);
- $config = CRM_Core_Config::singleton();
- $this->assign('currencySymbol', $config->defaultCurrencySymbol);
+ $this->assign('currencySymbol', CRM_Core_BAO_Country::defaultCurrencySymbol());
// line items block
$lineItem = $event = [];
public function buildQuickForm() {
$this->buildQuickEntityForm();
- $this->assign('currency', CRM_Core_Config::singleton()->defaultCurrencySymbol);
+ $this->assign('currency', CRM_Core_BAO_Country::defaultCurrencySymbol());
$isUpdateToExistingRecurringMembership = $this->isUpdateToExistingRecurringMembership();
// build price set form.
$buildPriceSet = FALSE;
$ySteps = $yMax / 5;
$bars = [];
- $config = CRM_Core_Config::singleton();
- $symbol = $config->defaultCurrencySymbol;
+ $symbol = CRM_Core_BAO_Country::defaultCurrencySymbol();
foreach ($values as $barCount => $barVal) {
$bars[$barCount] = new bar_glass();
$graphTitle = !empty($params['legend']) ? $params['legend'] : ts('Pie Chart');
// get the currency.
- $config = CRM_Core_Config::singleton();
- $symbol = $config->defaultCurrencySymbol;
+ $symbol = CRM_Core_BAO_Country::defaultCurrencySymbol();
$pie = new pie();
$pie->radius(100);
}
// get the currency.
- $config = CRM_Core_Config::singleton();
- $symbol = $config->defaultCurrencySymbol;
+ $symbol = CRM_Core_BAO_Country::defaultCurrencySymbol();
// set the tooltip.
$tooltip = CRM_Utils_Array::value('tip', $params, "$symbol #val#");
<td class="label">
<label>{ts}Total amount entered{/ts}</label>
</td>
- <td class="right">{$config->defaultCurrencySymbol} <span class="batch-actual-total"></span></td>
+ <td class="right">{$defaultCurrencySymbol} <span class="batch-actual-total"></span></td>
</tr>
</table>
//plugin to sort on currency
cj.fn.dataTableExt.oSort['currency-asc'] = function(a,b) {
- var symbol = "{/literal}{$config->defaultCurrencySymbol()}{literal}";
+ var symbol = "{/literal}{$defaultCurrencySymbol}{literal}";
var x = (a == "-") ? 0 : a.replace( symbol, "" );
var y = (b == "-") ? 0 : b.replace( symbol, "" );
x = parseFloat( x );
};
cj.fn.dataTableExt.oSort['currency-desc'] = function(a,b) {
- var symbol = "{/literal}{$config->defaultCurrencySymbol()}{literal}";
+ var symbol = "{/literal}{$defaultCurrencySymbol}{literal}";
var x = (a == "-") ? 0 : a.replace( symbol, "" );
var y = (b == "-") ? 0 : b.replace( symbol, "" );
x = parseFloat( x );