Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- o.validarOpcoesFormulaCalculo = function (codi_trib) {
- o.cx.find('#formula_calculo_tax').children('option').css('display', 'none');
- o.cx.find('#formula_calculo_tax').children('option[value=""]').css('display', '');
- o.cx.find('#formula_calculo_tax').children('option[value="0"]').css('display', '');
- o.cx.find('#formula_calculo_tax').val('');
- var opts = [];
- switch (codi_trib) {
- case <?=\Tributos\Tributos\Enum\TributosPadrao::IPTU ?>:
- opts = [1, 2, 3, 4, 5, 10, 15, 16, 17, 18, 19, 20, 21, 22, 24, 25];
- break;
- case <?=\Tributos\Tributos\Enum\TributosPadrao::ISSQN?>:
- opts = [6, 7, 8];
- break;
- case <?=\Tributos\Tributos\Enum\TributosPadrao::DIVIDA_ATIVA?>:
- opts = [9];
- break;
- case <?=\Tributos\Tributos\Enum\TributosPadrao::ITBI?>:
- opts = [11];
- break;
- case <?=\Tributos\Tributos\Enum\TributosPadrao::AGUA_E_OU_ESGOTO?>:
- opts = [14, 23];
- break;
- }
- $.each(opts, function (i, v) {
- console.log(v);
- o.cx.find('#formula_calculo_tax').children('option[value="' + v + '"]').css('display', '');
- });
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement