Source of file FormExtraLeftAndMainExtension.php
Size: 1,183 Bytes - Last Modified: 2021-12-23T10:00:38+00:00
/var/www/docs.ssmods.com/process/src/code/FormExtraLeftAndMainExtension.php
12345678910111213141516171819202122232425262728293031323334353637383940414243444546 | <?php require_once 'Zend/Locale/Data.php'; /** * Support class for initializing javascript in a global manner * * @author Koala */ class FormExtraLeftAndMainExtension extends LeftAndMainExtension { public function init() { // Send default settings according to locale $locale = i18n::get_locale(); $symbols = Zend_Locale_Data::getList($locale, 'symbols'); $currency = Currency::config()->currency_symbol; $decimals = $symbols['decimal']; $thousands = ($decimals == ',') ? ' ' : ','; // Accouting needs to be initialized globally FormExtraJquery::include_accounting(); Requirements::customScript(<<<EOT window.accounting.settings = { currency: { symbol : "$currency", format: "%s%v", decimal : "$decimals", thousand: "$thousands", precision : 2 }, number: { precision : 0, thousand: "$thousands", decimal : "$decimals" } } EOT , 'accountingInit' ); Requirements::javascript('form-extras/javascript/LeftAndMain.js'); } } |