_decodeProperties($_smarty_tpl, array ( 'version' => '3.1.39', 'unifunc' => 'content_6494327a1f3cc8_40355888', 'has_nocache_code' => false, 'file_dependency' => array ( '4d5112ad7064b92b222f89228e9a94569626637d' => array ( 0 => 'C:\\xampp\\htdocs\\hotelcommerce\\admin\\themes\\default\\template\\controllers\\attribute_generator\\content.tpl', 1 => 1687433793, 2 => 'file', ), ), 'includes' => array ( ), ),false)) { function content_6494327a1f3cc8_40355888 (Smarty_Internal_Template $_smarty_tpl) { $_smarty_tpl->_loadInheritance(); $_smarty_tpl->inheritance->init($_smarty_tpl, false); ?> type="text/javascript"> var attrs = new Array(); attrs[0] = new Array(0, '---'); smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['attribute_js']->value, 'group', false, 'idgrp'); $_smarty_tpl->tpl_vars['group']->do_else = true; if ($_from !== null) foreach ($_from as $_smarty_tpl->tpl_vars['idgrp']->value => $_smarty_tpl->tpl_vars['group']->value) { $_smarty_tpl->tpl_vars['group']->do_else = false; ?> _assignInScope('row', "attrs[".((string)$_smarty_tpl->tpl_vars['idgrp']->value)."] = new Array(0, '---'");?> smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['group']->value, 'attrname', false, 'idattr'); $_smarty_tpl->tpl_vars['attrname']->do_else = true; if ($_from !== null) foreach ($_from as $_smarty_tpl->tpl_vars['idattr']->value => $_smarty_tpl->tpl_vars['attrname']->value) { $_smarty_tpl->tpl_vars['attrname']->do_else = false; ?> tpl_vars['attrname']->value, ENT_QUOTES, 'UTF-8', true); $_prefixVariable1=ob_get_clean(); $_smarty_tpl->_assignInScope('row', ((string)$_smarty_tpl->tpl_vars['row']->value).", ".((string)$_smarty_tpl->tpl_vars['idattr']->value).", '".$_prefixVariable1."'");?> smarty->ext->_foreach->restore($_smarty_tpl, 1);?> _assignInScope('row', ((string)$_smarty_tpl->tpl_vars['row']->value).");");?> tpl_vars['row']->value;?> smarty->ext->_foreach->restore($_smarty_tpl, 1);?> i18n_tax_exc = 'smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['l'][0], array( array('s'=>'Tax Excluded'),$_smarty_tpl ) );?> '; i18n_tax_inc = 'smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['l'][0], array( array('s'=>'Tax Included'),$_smarty_tpl ) );?> '; var product_tax = 'tpl_vars['tax_rates']->value;?> '; function calcPrice(element, element_has_tax) { var element_price = element.val().replace(/,/g, '.'); var other_element_price = 0; if (!isNaN(element_price)) { if (element_has_tax) other_element_price = parseFloat(element_price / ((product_tax / 100) + 1)).toFixed(6); else other_element_price = ps_round(parseFloat(element_price * ((product_tax / 100) + 1)), 2).toFixed(2); } $('#related_to_'+element.attr('name')).val(other_element_price); } $(document).ready(function() { $('.price_impact').each(function() { calcPrice($(this), false); }); }); >