@senior-gestao-empresarial/erpx-components 4.2.2 → 4.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 +32 -2
- 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/components/tributos/erp-tributos.component.d.ts +1 -0
- package/components/tributos/rules/types/schemas/incoming-invoice.schema.d.ts +18 -18
- package/components/tributos/rules/types/schemas/outgoing-invoice.schema.d.ts +34 -34
- package/esm2015/components/tributos/erp-tributos.component.js +33 -3
- package/esm2015/components/tributos/rules/types/schemas/incoming-invoice.schema.js +37 -19
- package/esm2015/components/tributos/rules/types/schemas/outgoing-invoice.schema.js +67 -33
- package/esm5/components/tributos/erp-tributos.component.js +33 -3
- package/esm5/components/tributos/rules/types/schemas/incoming-invoice.schema.js +37 -19
- package/esm5/components/tributos/rules/types/schemas/outgoing-invoice.schema.js +67 -33
- package/fesm2015/senior-gestao-empresarial-erpx-components.js +32 -2
- package/fesm2015/senior-gestao-empresarial-erpx-components.js.map +1 -1
- package/fesm5/senior-gestao-empresarial-erpx-components.js +32 -2
- 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
|
@@ -26759,7 +26759,15 @@
|
|
|
26759
26759
|
(_this.indexAccordion = [0]));
|
|
26760
26760
|
_this.changeDetector.detectChanges();
|
|
26761
26761
|
}
|
|
26762
|
-
}
|
|
26762
|
+
});
|
|
26763
|
+
}
|
|
26764
|
+
if (this.context.document === 'Incoming Invoice' ||
|
|
26765
|
+
this.context.document === 'Outgoing Invoice' ||
|
|
26766
|
+
(this.context.document === 'Purchase Order' &&
|
|
26767
|
+
this.context.order.item.type === 'Service') ||
|
|
26768
|
+
(this.context.document === 'Sale Order' &&
|
|
26769
|
+
this.context.order.item.type === 'Service')) {
|
|
26770
|
+
menu.push({
|
|
26763
26771
|
id: 'retencoes',
|
|
26764
26772
|
label: this.translate.instant('erpx.tributos.actions_retencoes_label'),
|
|
26765
26773
|
disabled: this.menuItemRetencoes,
|
|
@@ -30493,7 +30501,7 @@
|
|
|
30493
30501
|
};
|
|
30494
30502
|
ErpTributosComponent.prototype.initializeValueChanges = function (_a) {
|
|
30495
30503
|
var _this = this;
|
|
30496
|
-
var item = _a.item;
|
|
30504
|
+
var item = _a.item, group = _a.group;
|
|
30497
30505
|
item.formGroup.valueChanges
|
|
30498
30506
|
.pipe(operators.startWith(item.formGroup.getRawValue()),
|
|
30499
30507
|
// We are using debounceTime here because our Lookup Component is emitting two events unfortunately.
|
|
@@ -30529,6 +30537,7 @@
|
|
|
30529
30537
|
item.formGroup
|
|
30530
30538
|
.get('impostoManual')
|
|
30531
30539
|
.setValue(true, { emitEvent: false });
|
|
30540
|
+
_this.markICMSSimplesAsManual(item.name, group, exports.EnumCampoTributo.ImpostoManual);
|
|
30532
30541
|
}
|
|
30533
30542
|
}
|
|
30534
30543
|
if (startingValue[exports.EnumCampoTributo.TipoCalculoImposto] !==
|
|
@@ -30557,6 +30566,7 @@
|
|
|
30557
30566
|
.setValue(EnumTipoCalculoImposto.MANUAL, {
|
|
30558
30567
|
emitEvent: false
|
|
30559
30568
|
});
|
|
30569
|
+
_this.markICMSSimplesAsManual(item.name, group, exports.EnumCampoTributo.TipoCalculoImposto);
|
|
30560
30570
|
}
|
|
30561
30571
|
}
|
|
30562
30572
|
_this.updateTwoWayDataBinding();
|
|
@@ -30651,6 +30661,26 @@
|
|
|
30651
30661
|
.item.find(function (item) { return item.name === taxType; });
|
|
30652
30662
|
return (_c = (_b = (_a = item.formGroup.get(field)).validator) === null || _b === void 0 ? void 0 : _b.call(_a, {})) === null || _c === void 0 ? void 0 : _c.required;
|
|
30653
30663
|
};
|
|
30664
|
+
// Work-around pra resolver a #ERPPEQ-20595.
|
|
30665
|
+
// No futuro mover para o ManualTaxCalculationRule e TaxCalculationTypeCalculationRule
|
|
30666
|
+
// quando os impostos legados forem migrados para o novo padrão.
|
|
30667
|
+
ErpTributosComponent.prototype.markICMSSimplesAsManual = function (tax, group, field) {
|
|
30668
|
+
if (tax !== exports.EnumTipoTributo.ICMS)
|
|
30669
|
+
return;
|
|
30670
|
+
var ICMS_SIMPLES_ITEM = group.item.find(function (item) { return item.name === exports.EnumTipoTributo.ICMS_SIMPLES; });
|
|
30671
|
+
if (!ICMS_SIMPLES_ITEM)
|
|
30672
|
+
return;
|
|
30673
|
+
if (field === exports.EnumCampoTributo.ImpostoManual) {
|
|
30674
|
+
ICMS_SIMPLES_ITEM.formGroup
|
|
30675
|
+
.get('impostoManual')
|
|
30676
|
+
.setValue(true, { emitEvent: false });
|
|
30677
|
+
}
|
|
30678
|
+
else if (field === exports.EnumCampoTributo.TipoCalculoImposto) {
|
|
30679
|
+
ICMS_SIMPLES_ITEM.formGroup
|
|
30680
|
+
.get(field)
|
|
30681
|
+
.setValue(EnumTipoCalculoImposto.MANUAL, { emitEvent: false });
|
|
30682
|
+
}
|
|
30683
|
+
};
|
|
30654
30684
|
ErpTributosComponent.ctorParameters = function () { return [
|
|
30655
30685
|
{ type: api.MessageService },
|
|
30656
30686
|
{ type: forms.FormBuilder },
|