@senior-gestao-empresarial/erpx-components 3.35.0 → 3.35.2
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 +18 -19
- package/bundles/senior-gestao-empresarial-erpx-components.umd.js.map +1 -1
- package/bundles/senior-gestao-empresarial-erpx-components.umd.min.js +1 -1
- package/bundles/senior-gestao-empresarial-erpx-components.umd.min.js.map +1 -1
- package/esm2015/components/tributos/erp-tributos.component.js +16 -21
- package/esm5/components/tributos/erp-tributos.component.js +19 -20
- package/fesm2015/senior-gestao-empresarial-erpx-components.js +15 -20
- package/fesm2015/senior-gestao-empresarial-erpx-components.js.map +1 -1
- package/fesm5/senior-gestao-empresarial-erpx-components.js +18 -19
- package/fesm5/senior-gestao-empresarial-erpx-components.js.map +1 -1
- package/package.json +2 -48
|
@@ -9071,14 +9071,6 @@ let ErpTributosComponent = class ErpTributosComponent {
|
|
|
9071
9071
|
this.tributosValue = val;
|
|
9072
9072
|
}
|
|
9073
9073
|
ngOnInit() {
|
|
9074
|
-
this.menuItemPis = false;
|
|
9075
|
-
this.menuItemCofins = false;
|
|
9076
|
-
this.menuItemIpi = false;
|
|
9077
|
-
this.menuItemIss = false;
|
|
9078
|
-
this.menuItemImportacoes = false;
|
|
9079
|
-
this.menuItemRetencoes = false;
|
|
9080
|
-
this.menuItemIcms = false;
|
|
9081
|
-
this.menuItemCideTecnologia = false;
|
|
9082
9074
|
this.dominio = this.dominio ? this.dominio : 'erpx_cpl_imp';
|
|
9083
9075
|
this.servico = this.servico ? this.servico : 'cadastros';
|
|
9084
9076
|
this.prefixLabel = `${this.dominio}.${this.servico}`;
|
|
@@ -9440,10 +9432,10 @@ let ErpTributosComponent = class ErpTributosComponent {
|
|
|
9440
9432
|
this.grupos.map((grupo) => grupo.item.map((item) => {
|
|
9441
9433
|
this.tributosValue.map((it) => {
|
|
9442
9434
|
if (item.name === it.tipoImposto) {
|
|
9435
|
+
item.formGroup.patchValue(it, { emitEvent: false });
|
|
9443
9436
|
if (!isTaxFromTaxReform(it.tipoImposto)) {
|
|
9444
9437
|
this.setValidators(it.tipoImposto);
|
|
9445
9438
|
}
|
|
9446
|
-
item.formGroup.patchValue(it, { emitEvent: false });
|
|
9447
9439
|
}
|
|
9448
9440
|
});
|
|
9449
9441
|
}));
|
|
@@ -9465,17 +9457,11 @@ let ErpTributosComponent = class ErpTributosComponent {
|
|
|
9465
9457
|
grupo.item
|
|
9466
9458
|
.filter((it) => it.name == tributo)
|
|
9467
9459
|
.map((it) => {
|
|
9468
|
-
|
|
9469
|
-
|
|
9470
|
-
|
|
9471
|
-
|
|
9472
|
-
|
|
9473
|
-
it.formGroup.value[item] !== '') {
|
|
9474
|
-
hasValue = true;
|
|
9475
|
-
return;
|
|
9476
|
-
}
|
|
9477
|
-
}
|
|
9478
|
-
});
|
|
9460
|
+
const hasValue = Object.keys(it.formGroup.value)
|
|
9461
|
+
.filter((key) => key !== 'impostoManual' &&
|
|
9462
|
+
key !== EnumCampoTributo.TipoCalculoImposto)
|
|
9463
|
+
.some((key) => it.formGroup.get(key).value !== null &&
|
|
9464
|
+
it.formGroup.get(key).value !== undefined);
|
|
9479
9465
|
if (hasValue)
|
|
9480
9466
|
Object.keys(it.formGroup.value).forEach((item) => {
|
|
9481
9467
|
if (item == 'percentualReducao' ||
|
|
@@ -9491,6 +9477,15 @@ let ErpTributosComponent = class ErpTributosComponent {
|
|
|
9491
9477
|
it.formGroup.controls[item].updateValueAndValidity({ emitEvent: false });
|
|
9492
9478
|
this.setRequired(tributo, true);
|
|
9493
9479
|
}
|
|
9480
|
+
else if (item === 'situacaoTributaria') {
|
|
9481
|
+
it.formGroup.controls[item].setValidators(Validators.compose([
|
|
9482
|
+
Validators.required
|
|
9483
|
+
]));
|
|
9484
|
+
it.formGroup.controls[item].updateValueAndValidity({
|
|
9485
|
+
emitEvent: false
|
|
9486
|
+
});
|
|
9487
|
+
this.setRequired(tributo, true);
|
|
9488
|
+
}
|
|
9494
9489
|
else if (item === 'observacao') {
|
|
9495
9490
|
it.formGroup.controls[item].setValidators(Validators.compose([Validators.maxLength(120)]));
|
|
9496
9491
|
it.formGroup.controls[item].updateValueAndValidity({ emitEvent: false });
|