@senior-gestao-empresarial/erpx-components 3.3.4 → 3.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/senior-gestao-empresarial-erpx-components.umd.js +75 -10
- package/bundles/senior-gestao-empresarial-erpx-components.umd.js.map +1 -1
- package/bundles/senior-gestao-empresarial-erpx-components.umd.min.js +2 -2
- package/bundles/senior-gestao-empresarial-erpx-components.umd.min.js.map +1 -1
- package/components/tributos/erp-tributos.component.d.ts +15 -13
- package/components/tributos/erp-tributos.types.d.ts +5 -2
- package/esm2015/components/tributos/erp-tributos.component.js +70 -9
- package/esm2015/components/tributos/erp-tributos.types.js +4 -1
- package/esm5/components/tributos/erp-tributos.component.js +70 -9
- package/esm5/components/tributos/erp-tributos.types.js +4 -1
- package/fesm2015/senior-gestao-empresarial-erpx-components.js +73 -8
- package/fesm2015/senior-gestao-empresarial-erpx-components.js.map +1 -1
- package/fesm5/senior-gestao-empresarial-erpx-components.js +73 -8
- package/fesm5/senior-gestao-empresarial-erpx-components.js.map +1 -1
- package/package.json +1 -1
- package/senior-gestao-empresarial-erpx-components.metadata.json +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('primeng/breadcrumb'), require('@angular/router'), require('rxjs'), require('rxjs/operators'), require('@ngx-translate/core'), require('@senior-gestao-empresarial/angular-components'), require('@seniorsistemas/angular-components'), require('primeng/accordion'), require('@angular/forms'), require('primeng/api'), require('@angular/common/http'), require('primeng'), require('@seniorsistemas/platform-
|
|
3
|
-
typeof define === 'function' && define.amd ? define('@senior-gestao-empresarial/erpx-components', ['exports', '@angular/core', '@angular/common', 'primeng/breadcrumb', '@angular/router', 'rxjs', 'rxjs/operators', '@ngx-translate/core', '@senior-gestao-empresarial/angular-components', '@seniorsistemas/angular-components', 'primeng/accordion', '@angular/forms', 'primeng/api', '@angular/common/http', 'primeng', '@seniorsistemas/platform-
|
|
4
|
-
(global = global || self, factory((global['senior-gestao-empresarial'] = global['senior-gestao-empresarial'] || {}, global['senior-gestao-empresarial']['erpx-components'] = {}), global.ng.core, global.ng.common, global.breadcrumb, global.ng.router, global.rxjs, global.rxjs.operators, global.core$1, global.angularComponents, global.angularComponents$1, global.accordion, global.ng.forms, global.api, global.ng.common.http, global.primeng, global.
|
|
5
|
-
}(this, (function (exports, core, common, breadcrumb, router, rxjs, operators, core$1, angularComponents, angularComponents$1, accordion, forms, api, http, primeng,
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('primeng/breadcrumb'), require('@angular/router'), require('rxjs'), require('rxjs/operators'), require('@ngx-translate/core'), require('@senior-gestao-empresarial/angular-components'), require('@seniorsistemas/angular-components'), require('primeng/accordion'), require('@angular/forms'), require('primeng/api'), require('@angular/common/http'), require('primeng'), require('@seniorsistemas/platform-utils'), require('primeng/confirmdialog'), require('primeng/messages'), require('primeng/panel'), require('primeng/table'), require('primeng/tabview'), require('@seniorsistemas/platform-components'), require('moment')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define('@senior-gestao-empresarial/erpx-components', ['exports', '@angular/core', '@angular/common', 'primeng/breadcrumb', '@angular/router', 'rxjs', 'rxjs/operators', '@ngx-translate/core', '@senior-gestao-empresarial/angular-components', '@seniorsistemas/angular-components', 'primeng/accordion', '@angular/forms', 'primeng/api', '@angular/common/http', 'primeng', '@seniorsistemas/platform-utils', 'primeng/confirmdialog', 'primeng/messages', 'primeng/panel', 'primeng/table', 'primeng/tabview', '@seniorsistemas/platform-components', 'moment'], factory) :
|
|
4
|
+
(global = global || self, factory((global['senior-gestao-empresarial'] = global['senior-gestao-empresarial'] || {}, global['senior-gestao-empresarial']['erpx-components'] = {}), global.ng.core, global.ng.common, global.breadcrumb, global.ng.router, global.rxjs, global.rxjs.operators, global.core$1, global.angularComponents, global.angularComponents$1, global.accordion, global.ng.forms, global.api, global.ng.common.http, global.primeng, global.platformUtils, global.confirmdialog, global.messages, global.panel, global.table, global.tabview, global.platformComponents, global.moment));
|
|
5
|
+
}(this, (function (exports, core, common, breadcrumb, router, rxjs, operators, core$1, angularComponents, angularComponents$1, accordion, forms, api, http, primeng, platformUtils, confirmdialog, messages, panel, table, tabview, platformComponents, moment) { 'use strict';
|
|
6
6
|
|
|
7
7
|
/*! *****************************************************************************
|
|
8
8
|
Copyright (c) Microsoft Corporation.
|
|
@@ -559,6 +559,7 @@
|
|
|
559
559
|
EnumCampoTributo["CodigoTributacao"] = "codigo_tributacao";
|
|
560
560
|
EnumCampoTributo["RegimeTributarioPisCofins"] = "regime_tributario_pis_cofins";
|
|
561
561
|
EnumCampoTributo["IndicativoAquisicao"] = "indicativo_aquisicao";
|
|
562
|
+
EnumCampoTributo["BeneficioFiscal"] = "beneficio_fiscal";
|
|
562
563
|
})(exports.EnumCampoTributo || (exports.EnumCampoTributo = {}));
|
|
563
564
|
|
|
564
565
|
(function (EnumGrupoTributo) {
|
|
@@ -572,6 +573,7 @@
|
|
|
572
573
|
EnumGrupoTributo["IMPORTACOES"] = "importacoes";
|
|
573
574
|
EnumGrupoTributo["CIDE_TECNOLOGIA"] = "cide_tecnologia";
|
|
574
575
|
EnumGrupoTributo["FUNRURAL"] = "funrural";
|
|
576
|
+
EnumGrupoTributo["ICMS_CREDITO_PRESUMIDO"] = "icms_credito_presumido";
|
|
575
577
|
})(exports.EnumGrupoTributo || (exports.EnumGrupoTributo = {}));
|
|
576
578
|
|
|
577
579
|
(function (EnumTipoTributo) {
|
|
@@ -607,6 +609,7 @@
|
|
|
607
609
|
EnumTipoTributo["FCP"] = "FCP";
|
|
608
610
|
EnumTipoTributo["ICMS_DIFERIDO"] = "ICMS_DIFERIDO";
|
|
609
611
|
EnumTipoTributo["ICMS_DESONERADO"] = "ICMS_DESONERADO";
|
|
612
|
+
EnumTipoTributo["ICMS_CREDITO_PRESUMIDO"] = "ICMS_CREDITO_PRESUMIDO";
|
|
610
613
|
EnumTipoTributo["DIFAL"] = "DIFAL";
|
|
611
614
|
EnumTipoTributo["ICMS_UF_DESTINO"] = "ICMS_UF_DESTINO";
|
|
612
615
|
EnumTipoTributo["FCP_UF_DESTINO"] = "FCP_UF_DESTINO";
|
|
@@ -739,18 +742,18 @@
|
|
|
739
742
|
})(exports.EnumFunruralIndicativoAquisicao || (exports.EnumFunruralIndicativoAquisicao = {}));
|
|
740
743
|
|
|
741
744
|
var ErpTributosComponent = /** @class */ (function () {
|
|
742
|
-
function ErpTributosComponent(formBuilder, changeDetector, translate, e027StrLookup, e027eqiLookup, naturezaReceitaLookup, lookupUtils,
|
|
745
|
+
function ErpTributosComponent(formBuilder, changeDetector, translate, e027StrLookup, beneficioFiscalLookup, e027eqiLookup, naturezaReceitaLookup, lookupUtils, erpTributosService, gtag, messageService) {
|
|
743
746
|
this.formBuilder = formBuilder;
|
|
744
747
|
this.changeDetector = changeDetector;
|
|
745
748
|
this.translate = translate;
|
|
746
749
|
this.e027StrLookup = e027StrLookup;
|
|
750
|
+
this.beneficioFiscalLookup = beneficioFiscalLookup;
|
|
747
751
|
this.e027eqiLookup = e027eqiLookup;
|
|
748
752
|
this.naturezaReceitaLookup = naturezaReceitaLookup;
|
|
749
753
|
this.lookupUtils = lookupUtils;
|
|
750
|
-
this.messageService = messageService;
|
|
751
754
|
this.erpTributosService = erpTributosService;
|
|
752
755
|
this.gtag = gtag;
|
|
753
|
-
this.
|
|
756
|
+
this.messageService = messageService;
|
|
754
757
|
this.grupos = [];
|
|
755
758
|
this.tributosValue = [];
|
|
756
759
|
this.reload = true;
|
|
@@ -765,6 +768,7 @@
|
|
|
765
768
|
this.menuItemRetencoesFunrural = false;
|
|
766
769
|
this.menuItemIcms = false;
|
|
767
770
|
this.menuItemCideTecnologia = false;
|
|
771
|
+
this.menuItemIcmsCreditoPresumido = false;
|
|
768
772
|
this.requiredItemCideTecnologia = false;
|
|
769
773
|
this.requiredItemPisRecuperar = false;
|
|
770
774
|
this.requiredItemPisDevolvido = false;
|
|
@@ -803,6 +807,7 @@
|
|
|
803
807
|
this.requiredSituacaoTributaria = false;
|
|
804
808
|
this.requiredIcmsFuturo = false;
|
|
805
809
|
this.requiredIcmsSimples = false;
|
|
810
|
+
this.requiredIcmsCreditoPresumido = true;
|
|
806
811
|
this.requiredDifalDevolvido = false;
|
|
807
812
|
this.requiredICMS_UF_Destino_Devolvido = false;
|
|
808
813
|
this.requiredFCP_UF_Destino_Devolvido = false;
|
|
@@ -1009,6 +1014,7 @@
|
|
|
1009
1014
|
this.menuItemIcms = false;
|
|
1010
1015
|
this.menuItemCideTecnologia = false;
|
|
1011
1016
|
this.menuItemRetencoesFunrural = false;
|
|
1017
|
+
this.menuItemIcmsCreditoPresumido = false;
|
|
1012
1018
|
this.requiredItemCideTecnologia = false;
|
|
1013
1019
|
this.requiredItemPisRecuperar = false;
|
|
1014
1020
|
this.requiredItemPisDevolvido = false;
|
|
@@ -1108,6 +1114,9 @@
|
|
|
1108
1114
|
case exports.EnumTipoTributo.ICMS_FUTURO:
|
|
1109
1115
|
_this.montaIcms();
|
|
1110
1116
|
break;
|
|
1117
|
+
case exports.EnumTipoTributo.ICMS_CREDITO_PRESUMIDO:
|
|
1118
|
+
_this.montaIcmsCreditoPresumido();
|
|
1119
|
+
break;
|
|
1111
1120
|
case exports.EnumTipoTributo.CIDE_TECNOLOGIA:
|
|
1112
1121
|
_this.montaCide();
|
|
1113
1122
|
break;
|
|
@@ -1193,6 +1202,11 @@
|
|
|
1193
1202
|
it.formGroup.controls[item].updateValueAndValidity({ emitEvent: false });
|
|
1194
1203
|
_this.setRequired(tributo, true);
|
|
1195
1204
|
}
|
|
1205
|
+
else if (item === 'beneficioFiscal') {
|
|
1206
|
+
it.formGroup.controls[item].setValidators(forms.Validators.compose([]));
|
|
1207
|
+
it.formGroup.controls[item].updateValueAndValidity({ emitEvent: false });
|
|
1208
|
+
_this.setRequired(tributo, true);
|
|
1209
|
+
}
|
|
1196
1210
|
else if (item === 'indicativoAquisicao') {
|
|
1197
1211
|
it.formGroup.controls[item].setValidators(forms.Validators.compose([]));
|
|
1198
1212
|
it.formGroup.controls[item].updateValueAndValidity({ emitEvent: false });
|
|
@@ -1200,7 +1214,6 @@
|
|
|
1200
1214
|
else if (item === 'codigoTributacao') {
|
|
1201
1215
|
it.formGroup.controls[item].setValidators(forms.Validators.compose([forms.Validators.maxLength(5)]));
|
|
1202
1216
|
it.formGroup.controls[item].updateValueAndValidity({ emitEvent: false });
|
|
1203
|
-
_this.setRequired(tributo, true);
|
|
1204
1217
|
}
|
|
1205
1218
|
else if (item === 'ImpostoNaoRecuperado') {
|
|
1206
1219
|
it.formGroup.controls[item].setValidators(forms.Validators.compose([forms.Validators.max(9999999999999.99)]));
|
|
@@ -1246,6 +1259,10 @@
|
|
|
1246
1259
|
it.formGroup.controls[item].updateValueAndValidity({ emitEvent: false });
|
|
1247
1260
|
_this.setRequired(tributo, true);
|
|
1248
1261
|
}
|
|
1262
|
+
else if (item === 'beneficioFiscal') {
|
|
1263
|
+
it.formGroup.controls[item].setValidators(forms.Validators.compose([]));
|
|
1264
|
+
it.formGroup.controls[item].updateValueAndValidity({ emitEvent: false });
|
|
1265
|
+
}
|
|
1249
1266
|
else if (item === 'indicativoAquisicao') {
|
|
1250
1267
|
it.formGroup.controls[item].setValidators(forms.Validators.compose([]));
|
|
1251
1268
|
it.formGroup.controls[item].updateValueAndValidity({ emitEvent: false });
|
|
@@ -1437,8 +1454,41 @@
|
|
|
1437
1454
|
}
|
|
1438
1455
|
});
|
|
1439
1456
|
}
|
|
1457
|
+
if (this.documento === exports.EnumTipoDocumento.NF_ENTRADA ||
|
|
1458
|
+
this.documento === exports.EnumTipoDocumento.NF_SAIDA)
|
|
1459
|
+
menu.push({
|
|
1460
|
+
label: this.translate.instant('erpx.tributos.actions_icms_credito_presumido_label'),
|
|
1461
|
+
disabled: this.menuItemIcmsCreditoPresumido,
|
|
1462
|
+
command: function () {
|
|
1463
|
+
_this.montaIcmsCreditoPresumido().forEach(function (value) {
|
|
1464
|
+
_this.novoImpostoManual(value);
|
|
1465
|
+
}),
|
|
1466
|
+
(_this.indexAccordion = [0]);
|
|
1467
|
+
_this.changeDetector.detectChanges();
|
|
1468
|
+
}
|
|
1469
|
+
});
|
|
1440
1470
|
return menu;
|
|
1441
1471
|
};
|
|
1472
|
+
ErpTributosComponent.prototype.montaIcmsCreditoPresumido = function () {
|
|
1473
|
+
if (this.menuItemIcmsCreditoPresumido)
|
|
1474
|
+
return;
|
|
1475
|
+
this.menuItemIcmsCreditoPresumido = true;
|
|
1476
|
+
var item = [
|
|
1477
|
+
__assign({ name: exports.EnumTipoTributo.ICMS_CREDITO_PRESUMIDO, label: 'erpx.tributos.enum_tipo_tributo_icms_credito_presumido' }, this.montaCampos([
|
|
1478
|
+
{ campo: exports.EnumCampoTributo.BaseCalculo },
|
|
1479
|
+
{ campo: exports.EnumCampoTributo.Aliquota },
|
|
1480
|
+
{ campo: exports.EnumCampoTributo.Valor },
|
|
1481
|
+
{ campo: exports.EnumCampoTributo.BeneficioFiscal }
|
|
1482
|
+
], exports.EnumTipoTributo.ICMS_CREDITO_PRESUMIDO))
|
|
1483
|
+
];
|
|
1484
|
+
this.grupos.unshift({
|
|
1485
|
+
grupo: "" + ('erpx.tributos.enum_grupo_tributo_' +
|
|
1486
|
+
exports.EnumGrupoTributo.ICMS_CREDITO_PRESUMIDO +
|
|
1487
|
+
'_label'),
|
|
1488
|
+
item: item
|
|
1489
|
+
});
|
|
1490
|
+
return item;
|
|
1491
|
+
};
|
|
1442
1492
|
ErpTributosComponent.prototype.montaCide = function () {
|
|
1443
1493
|
if (this.menuItemCideTecnologia == false) {
|
|
1444
1494
|
this.menuItemCideTecnologia = true;
|
|
@@ -2579,6 +2629,8 @@
|
|
|
2579
2629
|
return this.requiredIcmsFuturo;
|
|
2580
2630
|
case exports.EnumTipoTributo.ICMS_SIMPLES:
|
|
2581
2631
|
return this.requiredIcmsSimples;
|
|
2632
|
+
case exports.EnumTipoTributo.ICMS_CREDITO_PRESUMIDO:
|
|
2633
|
+
return this.requiredIcmsCreditoPresumido;
|
|
2582
2634
|
case exports.EnumTipoTributo.DIFAL_DEVOLVIDO:
|
|
2583
2635
|
return this.requiredDifalDevolvido;
|
|
2584
2636
|
case exports.EnumTipoTributo.ICMS_UF_DESTINO_DEVOLVIDO:
|
|
@@ -3708,6 +3760,19 @@
|
|
|
3708
3760
|
required: function () { return _this.setVariableRequired(tributo); }
|
|
3709
3761
|
}));
|
|
3710
3762
|
}
|
|
3763
|
+
else if (it.campo === exports.EnumCampoTributo.BeneficioFiscal) {
|
|
3764
|
+
formGroup = __assign(__assign({}, formGroup), { beneficioFiscal: [{ value: null, disabled: false }, forms.Validators.compose([])] });
|
|
3765
|
+
formField.push(new angularComponents$1.FormField(__assign(__assign({}, _this.beneficioFiscalLookup.mountOptions({
|
|
3766
|
+
multiple: false,
|
|
3767
|
+
domain: _this.dominio,
|
|
3768
|
+
service: _this.servico,
|
|
3769
|
+
formGroup: 'beneficioFiscal',
|
|
3770
|
+
defaultFilter: [{ field: 'excluido', operator: angularComponents.EnumLogicalOperator.Eq, values: ['false'] }]
|
|
3771
|
+
})), { onBlur: function () {
|
|
3772
|
+
_this.backValue();
|
|
3773
|
+
_this.setValidators(tributo);
|
|
3774
|
+
}, label: _this.translate.instant('erpx.tributos.fields_beneficio_fiscal_label'), size: { sm: 12, md: 4, lg: 4, xl: 3 } })));
|
|
3775
|
+
}
|
|
3711
3776
|
});
|
|
3712
3777
|
if (this.sugestoes) {
|
|
3713
3778
|
this.sugestoes
|
|
@@ -3825,13 +3890,13 @@
|
|
|
3825
3890
|
{ type: core.ChangeDetectorRef },
|
|
3826
3891
|
{ type: core$1.TranslateService },
|
|
3827
3892
|
{ type: angularComponents.E027StrLookup },
|
|
3893
|
+
{ type: angularComponents.BeneficioFiscalLookup },
|
|
3828
3894
|
{ type: angularComponents.E027EqiLookup },
|
|
3829
3895
|
{ type: angularComponents.CplTriNotaSaidaNaturezaReceitaPisCofinsLookup },
|
|
3830
3896
|
{ type: angularComponents.LookupValidationUtils },
|
|
3831
|
-
{ type: api.MessageService },
|
|
3832
3897
|
{ type: ErpTributosService },
|
|
3833
3898
|
{ type: platformUtils.GTagService },
|
|
3834
|
-
{ type:
|
|
3899
|
+
{ type: api.MessageService }
|
|
3835
3900
|
]; };
|
|
3836
3901
|
__decorate([
|
|
3837
3902
|
core.Input()
|