@senior-gestao-empresarial/erpx-components 4.0.2 → 4.1.1
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 +696 -56
- 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 +11 -7
- package/components/tributos/erp-tributos.types.d.ts +5 -1
- package/components/tributos/index.d.ts +1 -0
- package/components/tributos/rules/calculation/registries/calculation-rules-registries/outgoing-invoice-calculation-rules.registry.d.ts +3 -1
- package/components/tributos/rules/calculation/rules/assessment-period-calculation-rule.d.ts +5 -0
- package/components/tributos/rules/types/schemas/outgoing-invoice.schema.d.ts +2 -0
- package/components/tributos/rules/validation/registries/outgoing-invoice-validation-rules.registry.d.ts +3 -1
- package/components/tributos/rules/validation/rules/required/assessment-period-required-validation-rule.d.ts +5 -0
- package/components/tributos/tax-reform-utilities.d.ts +1 -1
- package/components/tributos/types/debit-invoice-type.d.ts +1 -1
- package/components/tributos/types/tax.d.ts +8 -0
- package/esm2015/components/tributos/erp-tributos.component.js +110 -16
- package/esm2015/components/tributos/erp-tributos.types.js +5 -1
- package/esm2015/components/tributos/index.js +1 -1
- package/esm2015/components/tributos/mappings/enum-tip-imp-cst-mapping.js +3 -1
- package/esm2015/components/tributos/rules/calculation/registries/calculation-rules-registries/outgoing-invoice-calculation-rules.registry.js +44 -4
- package/esm2015/components/tributos/rules/calculation/rules/assessment-period-calculation-rule.js +55 -0
- package/esm2015/components/tributos/rules/calculation/rules/tax-amount-calculation-rule.js +17 -1
- package/esm2015/components/tributos/rules/calculation/rules/tax-classification-calculation-rule.js +35 -1
- package/esm2015/components/tributos/rules/calculation/rules/tax-situation-calculation-rule.js +37 -1
- package/esm2015/components/tributos/rules/status/registries/outgoing-invoice-status-rules.registry.js +13 -1
- package/esm2015/components/tributos/rules/status/rules/tax-classification-status-rule.js +3 -1
- package/esm2015/components/tributos/rules/types/schemas/outgoing-invoice.schema.js +13 -1
- package/esm2015/components/tributos/rules/validation/registries/outgoing-invoice-validation-rules.registry.js +44 -4
- package/esm2015/components/tributos/rules/validation/rules/required/assessment-period-required-validation-rule.js +78 -0
- package/esm2015/components/tributos/rules/validation/rules/required/tax-amount-required-validation-rule.js +51 -2
- package/esm2015/components/tributos/rules/validation/rules/required/tax-classification-required-validation-rule.js +48 -2
- package/esm2015/components/tributos/rules/validation/rules/required/tax-situation-required-validation-rule.js +48 -2
- package/esm2015/components/tributos/tax-reform-utilities.js +6 -2
- package/esm2015/components/tributos/types/debit-invoice-type.js +1 -1
- package/esm2015/components/tributos/types/tax.js +2 -0
- package/esm2015/senior-gestao-empresarial-erpx-components.js +27 -25
- package/esm5/components/tributos/erp-tributos.component.js +122 -24
- package/esm5/components/tributos/erp-tributos.types.js +5 -1
- package/esm5/components/tributos/index.js +1 -1
- package/esm5/components/tributos/mappings/enum-tip-imp-cst-mapping.js +3 -1
- package/esm5/components/tributos/rules/calculation/registries/calculation-rules-registries/outgoing-invoice-calculation-rules.registry.js +44 -4
- package/esm5/components/tributos/rules/calculation/rules/assessment-period-calculation-rule.js +77 -0
- package/esm5/components/tributos/rules/calculation/rules/tax-amount-calculation-rule.js +24 -1
- package/esm5/components/tributos/rules/calculation/rules/tax-classification-calculation-rule.js +59 -1
- package/esm5/components/tributos/rules/calculation/rules/tax-situation-calculation-rule.js +61 -1
- package/esm5/components/tributos/rules/status/registries/outgoing-invoice-status-rules.registry.js +13 -1
- package/esm5/components/tributos/rules/status/rules/tax-classification-status-rule.js +3 -1
- package/esm5/components/tributos/rules/types/schemas/outgoing-invoice.schema.js +13 -1
- package/esm5/components/tributos/rules/validation/registries/outgoing-invoice-validation-rules.registry.js +44 -4
- package/esm5/components/tributos/rules/validation/rules/required/assessment-period-required-validation-rule.js +86 -0
- package/esm5/components/tributos/rules/validation/rules/required/tax-amount-required-validation-rule.js +55 -2
- package/esm5/components/tributos/rules/validation/rules/required/tax-classification-required-validation-rule.js +52 -2
- package/esm5/components/tributos/rules/validation/rules/required/tax-situation-required-validation-rule.js +52 -2
- package/esm5/components/tributos/tax-reform-utilities.js +6 -2
- package/esm5/components/tributos/types/debit-invoice-type.js +1 -1
- package/esm5/components/tributos/types/tax.js +2 -0
- package/esm5/senior-gestao-empresarial-erpx-components.js +27 -25
- package/fesm2015/senior-gestao-empresarial-erpx-components.js +561 -24
- package/fesm2015/senior-gestao-empresarial-erpx-components.js.map +1 -1
- package/fesm5/senior-gestao-empresarial-erpx-components.js +670 -32
- package/fesm5/senior-gestao-empresarial-erpx-components.js.map +1 -1
- package/package.json +1 -1
- package/senior-gestao-empresarial-erpx-components.d.ts +26 -24
- 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('@seniorsistemas/platform-utils'), require('bignumber.js'), require('primeng/api'), require('@angular/common/http'), require('primeng'), require('primeng/confirmdialog'), require('primeng/messages'), require('primeng/panel'), require('primeng/table'), require('primeng/tabview'), require('@seniorsistemas/platform-components')
|
|
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', '@seniorsistemas/platform-utils', 'bignumber.js', 'primeng/api', '@angular/common/http', 'primeng', 'primeng/confirmdialog', 'primeng/messages', 'primeng/panel', 'primeng/table', 'primeng/tabview', '@seniorsistemas/platform-components'
|
|
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.platformUtils, global.BigNumber, global.api, global.ng.common.http, global.primeng, global.confirmdialog, global.messages, global.panel, global.table, global.tabview, global.platformComponents
|
|
5
|
-
}(this, (function (exports, core, common, breadcrumb, router, rxjs, operators, core$1, angularComponents, angularComponents$1, accordion, forms, platformUtils, BigNumber, api, http, primeng, confirmdialog, messages, panel, table, tabview, platformComponents
|
|
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('@seniorsistemas/platform-utils'), require('bignumber.js'), require('primeng/api'), require('@angular/common/http'), require('primeng'), require('moment'), require('primeng/confirmdialog'), require('primeng/messages'), require('primeng/panel'), require('primeng/table'), require('primeng/tabview'), require('@seniorsistemas/platform-components')) :
|
|
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', '@seniorsistemas/platform-utils', 'bignumber.js', 'primeng/api', '@angular/common/http', 'primeng', 'moment', 'primeng/confirmdialog', 'primeng/messages', 'primeng/panel', 'primeng/table', 'primeng/tabview', '@seniorsistemas/platform-components'], 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.platformUtils, global.BigNumber, global.api, global.ng.common.http, global.primeng, global.moment, global.confirmdialog, global.messages, global.panel, global.table, global.tabview, global.platformComponents));
|
|
5
|
+
}(this, (function (exports, core, common, breadcrumb, router, rxjs, operators, core$1, angularComponents, angularComponents$1, accordion, forms, platformUtils, BigNumber, api, http, primeng, moment, confirmdialog, messages, panel, table, tabview, platformComponents) { 'use strict';
|
|
6
6
|
|
|
7
7
|
BigNumber = BigNumber && Object.prototype.hasOwnProperty.call(BigNumber, 'default') ? BigNumber['default'] : BigNumber;
|
|
8
8
|
|
|
@@ -591,6 +591,7 @@
|
|
|
591
591
|
EnumCampoTributo["TipoCalculoImposto"] = "TipoCalculoImposto";
|
|
592
592
|
EnumCampoTributo["ImpostoManual"] = "impostoManual";
|
|
593
593
|
EnumCampoTributo["EscriturarAliquotaISS"] = "escriturarAliquotaISS";
|
|
594
|
+
EnumCampoTributo["PeriodoApuracao"] = "periodoApuracao";
|
|
594
595
|
})(exports.EnumCampoTributo || (exports.EnumCampoTributo = {}));
|
|
595
596
|
|
|
596
597
|
(function (EnumGrupoTributo) {
|
|
@@ -601,6 +602,7 @@
|
|
|
601
602
|
EnumGrupoTributo["IBS_CREDITO_PRESUMIDO"] = "ibs_credito_presumido";
|
|
602
603
|
EnumGrupoTributo["IS"] = "is";
|
|
603
604
|
EnumGrupoTributo["CBS_IBS_ESTORNO_CREDITO"] = "cbs_ibs_estorno_credito";
|
|
605
|
+
EnumGrupoTributo["CBS_IBS_AJUSTE"] = "cbs_ibs_ajuste";
|
|
604
606
|
EnumGrupoTributo["ICMS"] = "icms";
|
|
605
607
|
EnumGrupoTributo["ICMS_ST"] = "icms_st";
|
|
606
608
|
EnumGrupoTributo["IPI"] = "ipi";
|
|
@@ -621,6 +623,7 @@
|
|
|
621
623
|
EnumTipoTributo["CBS_TRIBUTACAO_REGULAR"] = "CBS_TRIBUTACAO_REGULAR";
|
|
622
624
|
EnumTipoTributo["CBS_GOVERNAMENTAL"] = "CBS_GOVERNAMENTAL";
|
|
623
625
|
EnumTipoTributo["CBS_ESTORNO_CREDITO"] = "CBS_ESTORNO_CREDITO";
|
|
626
|
+
EnumTipoTributo["CBS_AJUSTE"] = "CBS_AJUSTE";
|
|
624
627
|
EnumTipoTributo["IBS_ESTADUAL"] = "IBS_ESTADUAL";
|
|
625
628
|
EnumTipoTributo["IBS_ESTADUAL_DIFERIDO"] = "IBS_ESTADUAL_DIFERIDO";
|
|
626
629
|
EnumTipoTributo["IBS_ESTADUAL_TRIBUTACAO_REGULAR"] = "IBS_ESTADUAL_TRIBUTACAO_REGULAR";
|
|
@@ -631,6 +634,7 @@
|
|
|
631
634
|
EnumTipoTributo["IBS_MUNICIPAL_GOVERNAMENTAL"] = "IBS_MUNICIPAL_GOVERNAMENTAL";
|
|
632
635
|
EnumTipoTributo["IBS_CREDITO_PRESUMIDO"] = "IBS_CREDITO_PRESUMIDO";
|
|
633
636
|
EnumTipoTributo["IBS_ESTORNO_CREDITO"] = "IBS_ESTORNO_CREDITO";
|
|
637
|
+
EnumTipoTributo["IBS_AJUSTE"] = "IBS_AJUSTE";
|
|
634
638
|
EnumTipoTributo["IS"] = "IS";
|
|
635
639
|
EnumTipoTributo["PIS_FATURAMENTO"] = "PIS_FATURAMENTO";
|
|
636
640
|
EnumTipoTributo["PIS_RECUPERAR"] = "PIS_RECUPERAR";
|
|
@@ -820,11 +824,13 @@
|
|
|
820
824
|
case exports.EnumTipoTributo.CBS:
|
|
821
825
|
case exports.EnumTipoTributo.CBS_TRIBUTACAO_REGULAR:
|
|
822
826
|
case exports.EnumTipoTributo.CBS_ESTORNO_CREDITO:
|
|
827
|
+
case exports.EnumTipoTributo.CBS_AJUSTE:
|
|
823
828
|
case exports.EnumTipoTributo.IBS_ESTADUAL:
|
|
824
829
|
case exports.EnumTipoTributo.IBS_ESTADUAL_TRIBUTACAO_REGULAR:
|
|
825
830
|
case exports.EnumTipoTributo.IBS_MUNICIPAL:
|
|
826
831
|
case exports.EnumTipoTributo.IBS_MUNICIPAL_TRIBUTACAO_REGULAR:
|
|
827
832
|
case exports.EnumTipoTributo.IBS_ESTORNO_CREDITO:
|
|
833
|
+
case exports.EnumTipoTributo.IBS_AJUSTE:
|
|
828
834
|
return exports.EnumTipImpCst.CBS_IBS;
|
|
829
835
|
case exports.EnumTipoTributo.IS:
|
|
830
836
|
return exports.EnumTipImpCst.IS;
|
|
@@ -850,7 +856,9 @@
|
|
|
850
856
|
tax === exports.EnumTipoTributo.IBS_MUNICIPAL_GOVERNAMENTAL ||
|
|
851
857
|
tax === exports.EnumTipoTributo.IBS_CREDITO_PRESUMIDO ||
|
|
852
858
|
tax === exports.EnumTipoTributo.CBS_ESTORNO_CREDITO ||
|
|
853
|
-
tax === exports.EnumTipoTributo.IBS_ESTORNO_CREDITO
|
|
859
|
+
tax === exports.EnumTipoTributo.IBS_ESTORNO_CREDITO ||
|
|
860
|
+
tax === exports.EnumTipoTributo.CBS_AJUSTE ||
|
|
861
|
+
tax === exports.EnumTipoTributo.IBS_AJUSTE);
|
|
854
862
|
};
|
|
855
863
|
var getBaseTaxByGroupTax = function (groupTax) {
|
|
856
864
|
switch (groupTax) {
|
|
@@ -866,6 +874,8 @@
|
|
|
866
874
|
return exports.EnumTipoTributo.IS;
|
|
867
875
|
case exports.EnumGrupoTributo.CBS_IBS_ESTORNO_CREDITO:
|
|
868
876
|
return exports.EnumTipoTributo.CBS_ESTORNO_CREDITO;
|
|
877
|
+
case exports.EnumGrupoTributo.CBS_IBS_AJUSTE:
|
|
878
|
+
return exports.EnumTipoTributo.CBS_AJUSTE;
|
|
869
879
|
default:
|
|
870
880
|
return null;
|
|
871
881
|
}
|
|
@@ -1655,6 +1665,29 @@
|
|
|
1655
1665
|
});
|
|
1656
1666
|
}
|
|
1657
1667
|
break;
|
|
1668
|
+
case exports.EnumTipoTributo.CBS_AJUSTE:
|
|
1669
|
+
case exports.EnumTipoTributo.IBS_AJUSTE:
|
|
1670
|
+
{
|
|
1671
|
+
var dataKey_2 = formField.find(function (_a) {
|
|
1672
|
+
var name = _a.name;
|
|
1673
|
+
return name === 'classificacaoTributaria';
|
|
1674
|
+
}).dataKey;
|
|
1675
|
+
rxjs.combineLatest([
|
|
1676
|
+
formGroup
|
|
1677
|
+
.get('classificacaoTributaria')
|
|
1678
|
+
.valueChanges.pipe(operators.startWith(formGroup.get('classificacaoTributaria')
|
|
1679
|
+
.value), operators.distinctUntilChanged(function (old, current) {
|
|
1680
|
+
return (old === null || old === void 0 ? void 0 : old[dataKey_2]) === (current === null || current === void 0 ? void 0 : current[dataKey_2]);
|
|
1681
|
+
}))
|
|
1682
|
+
])
|
|
1683
|
+
.pipe(operators.skip(1), operators.map(function () {
|
|
1684
|
+
return new BigNumber(formGroup.get('valor').value);
|
|
1685
|
+
}), operators.filter(function (taxAmount) { return taxAmount.isNaN(); }))
|
|
1686
|
+
.subscribe(function () {
|
|
1687
|
+
formGroup.get('valor').setValue(0);
|
|
1688
|
+
});
|
|
1689
|
+
}
|
|
1690
|
+
break;
|
|
1658
1691
|
default:
|
|
1659
1692
|
throw new Error("Regra TaxAmountCalculationRule n\u00E3o implementada para o imposto " + taxType + ", documento " + document + ".");
|
|
1660
1693
|
}
|
|
@@ -1851,6 +1884,64 @@
|
|
|
1851
1884
|
});
|
|
1852
1885
|
}
|
|
1853
1886
|
break;
|
|
1887
|
+
case exports.EnumTipoTributo.CBS_AJUSTE:
|
|
1888
|
+
{
|
|
1889
|
+
var _e = group.item.find(function (_a) {
|
|
1890
|
+
var name = _a.name;
|
|
1891
|
+
return name === exports.EnumTipoTributo.IBS_AJUSTE;
|
|
1892
|
+
}), ibsAjusteFormGroup = _e.formGroup, ibsAjusteFormField = _e.formField;
|
|
1893
|
+
var dataKey_4 = ibsAjusteFormField.find(function (_a) {
|
|
1894
|
+
var name = _a.name;
|
|
1895
|
+
return name === 'classificacaoTributaria';
|
|
1896
|
+
}).dataKey;
|
|
1897
|
+
rxjs.combineLatest([
|
|
1898
|
+
ibsAjusteFormGroup
|
|
1899
|
+
.get('classificacaoTributaria')
|
|
1900
|
+
.valueChanges.pipe(operators.startWith(ibsAjusteFormGroup.get('classificacaoTributaria').value), operators.distinctUntilChanged(function (old, current) {
|
|
1901
|
+
return (old === null || old === void 0 ? void 0 : old[dataKey_4]) === (current === null || current === void 0 ? void 0 : current[dataKey_4]);
|
|
1902
|
+
}))
|
|
1903
|
+
])
|
|
1904
|
+
.pipe(operators.skip(1), operators.map(function (_a) {
|
|
1905
|
+
var _b = __read(_a, 1), taxClassification = _b[0];
|
|
1906
|
+
return [taxClassification];
|
|
1907
|
+
}))
|
|
1908
|
+
.subscribe(function (_a) {
|
|
1909
|
+
var _b = __read(_a, 1), taxClassification = _b[0];
|
|
1910
|
+
formGroup
|
|
1911
|
+
.get('classificacaoTributaria')
|
|
1912
|
+
.setValue(taxClassification);
|
|
1913
|
+
});
|
|
1914
|
+
}
|
|
1915
|
+
break;
|
|
1916
|
+
case exports.EnumTipoTributo.IBS_AJUSTE:
|
|
1917
|
+
{
|
|
1918
|
+
var _f = group.item.find(function (_a) {
|
|
1919
|
+
var name = _a.name;
|
|
1920
|
+
return name === exports.EnumTipoTributo.CBS_AJUSTE;
|
|
1921
|
+
}), cbsAjusteFormGroup = _f.formGroup, cbsAjusteFormField = _f.formField;
|
|
1922
|
+
var dataKey_5 = cbsAjusteFormField.find(function (_a) {
|
|
1923
|
+
var name = _a.name;
|
|
1924
|
+
return name === 'classificacaoTributaria';
|
|
1925
|
+
}).dataKey;
|
|
1926
|
+
rxjs.combineLatest([
|
|
1927
|
+
cbsAjusteFormGroup
|
|
1928
|
+
.get('classificacaoTributaria')
|
|
1929
|
+
.valueChanges.pipe(operators.startWith(cbsAjusteFormGroup.get('classificacaoTributaria').value), operators.distinctUntilChanged(function (old, current) {
|
|
1930
|
+
return (old === null || old === void 0 ? void 0 : old[dataKey_5]) === (current === null || current === void 0 ? void 0 : current[dataKey_5]);
|
|
1931
|
+
}))
|
|
1932
|
+
])
|
|
1933
|
+
.pipe(operators.skip(1), operators.map(function (_a) {
|
|
1934
|
+
var _b = __read(_a, 1), taxClassification = _b[0];
|
|
1935
|
+
return [taxClassification];
|
|
1936
|
+
}))
|
|
1937
|
+
.subscribe(function (_a) {
|
|
1938
|
+
var _b = __read(_a, 1), taxClassification = _b[0];
|
|
1939
|
+
formGroup
|
|
1940
|
+
.get('classificacaoTributaria')
|
|
1941
|
+
.setValue(taxClassification);
|
|
1942
|
+
});
|
|
1943
|
+
}
|
|
1944
|
+
break;
|
|
1854
1945
|
default:
|
|
1855
1946
|
throw new Error("Regra TaxClassificationCalculationRule n\u00E3o implementada para o imposto " + taxType + ", documento " + document + ".");
|
|
1856
1947
|
}
|
|
@@ -4402,6 +4493,75 @@
|
|
|
4402
4493
|
return IncomingInvoiceCalculationRulesRegistry;
|
|
4403
4494
|
}());
|
|
4404
4495
|
|
|
4496
|
+
var AssessmentPeriodCalculationRule = /** @class */ (function () {
|
|
4497
|
+
function AssessmentPeriodCalculationRule() {
|
|
4498
|
+
}
|
|
4499
|
+
AssessmentPeriodCalculationRule.prototype.apply = function (_a) {
|
|
4500
|
+
var document = _a.context.document, group = _a.group, _b = _a.item, taxType = _b.name, formGroup = _b.formGroup;
|
|
4501
|
+
switch (taxType) {
|
|
4502
|
+
case exports.EnumTipoTributo.CBS_AJUSTE:
|
|
4503
|
+
{
|
|
4504
|
+
var ibsAjusteFormGroup = group.item.find(function (_a) {
|
|
4505
|
+
var name = _a.name;
|
|
4506
|
+
return name === exports.EnumTipoTributo.IBS_AJUSTE;
|
|
4507
|
+
}).formGroup;
|
|
4508
|
+
rxjs.combineLatest([
|
|
4509
|
+
ibsAjusteFormGroup
|
|
4510
|
+
.get(exports.EnumCampoTributo.PeriodoApuracao)
|
|
4511
|
+
.valueChanges.pipe(operators.startWith(ibsAjusteFormGroup.get(exports.EnumCampoTributo.PeriodoApuracao).value), operators.distinctUntilChanged(function (old, current) {
|
|
4512
|
+
return old === current ||
|
|
4513
|
+
moment(old).isSame(current, 'day');
|
|
4514
|
+
}), operators.debounceTime(100))
|
|
4515
|
+
])
|
|
4516
|
+
.pipe(operators.skip(1), operators.map(function (_a) {
|
|
4517
|
+
var _b = __read(_a, 1), taxSituation = _b[0];
|
|
4518
|
+
return [taxSituation];
|
|
4519
|
+
}))
|
|
4520
|
+
.subscribe(function (_a) {
|
|
4521
|
+
var _b = __read(_a, 1), taxSituation = _b[0];
|
|
4522
|
+
formGroup
|
|
4523
|
+
.get(exports.EnumCampoTributo.PeriodoApuracao)
|
|
4524
|
+
.setValue(taxSituation);
|
|
4525
|
+
});
|
|
4526
|
+
}
|
|
4527
|
+
break;
|
|
4528
|
+
case exports.EnumTipoTributo.IBS_AJUSTE:
|
|
4529
|
+
{
|
|
4530
|
+
var cbsAjusteFormGroup = group.item.find(function (_a) {
|
|
4531
|
+
var name = _a.name;
|
|
4532
|
+
return name === exports.EnumTipoTributo.CBS_AJUSTE;
|
|
4533
|
+
}).formGroup;
|
|
4534
|
+
rxjs.combineLatest([
|
|
4535
|
+
cbsAjusteFormGroup
|
|
4536
|
+
.get(exports.EnumCampoTributo.PeriodoApuracao)
|
|
4537
|
+
.valueChanges.pipe(operators.startWith(cbsAjusteFormGroup.get(exports.EnumCampoTributo.PeriodoApuracao).value), operators.distinctUntilChanged(function (old, current) {
|
|
4538
|
+
return old === current ||
|
|
4539
|
+
moment(old).isSame(current, 'day');
|
|
4540
|
+
}), operators.debounceTime(100))
|
|
4541
|
+
])
|
|
4542
|
+
.pipe(operators.skip(1), operators.map(function (_a) {
|
|
4543
|
+
var _b = __read(_a, 1), taxSituation = _b[0];
|
|
4544
|
+
return [taxSituation];
|
|
4545
|
+
}))
|
|
4546
|
+
.subscribe(function (_a) {
|
|
4547
|
+
var _b = __read(_a, 1), taxSituation = _b[0];
|
|
4548
|
+
formGroup
|
|
4549
|
+
.get(exports.EnumCampoTributo.PeriodoApuracao)
|
|
4550
|
+
.setValue(taxSituation);
|
|
4551
|
+
});
|
|
4552
|
+
}
|
|
4553
|
+
break;
|
|
4554
|
+
default:
|
|
4555
|
+
throw new Error("Regra AssessmentPeriodCalculationRule n\u00E3o implementada para o imposto " + taxType + ", documento " + document + ".");
|
|
4556
|
+
}
|
|
4557
|
+
};
|
|
4558
|
+
AssessmentPeriodCalculationRule.ɵprov = core.ɵɵdefineInjectable({ factory: function AssessmentPeriodCalculationRule_Factory() { return new AssessmentPeriodCalculationRule(); }, token: AssessmentPeriodCalculationRule, providedIn: "root" });
|
|
4559
|
+
AssessmentPeriodCalculationRule = __decorate([
|
|
4560
|
+
core.Injectable({ providedIn: 'root' })
|
|
4561
|
+
], AssessmentPeriodCalculationRule);
|
|
4562
|
+
return AssessmentPeriodCalculationRule;
|
|
4563
|
+
}());
|
|
4564
|
+
|
|
4405
4565
|
var TaxSituationCalculationRule = /** @class */ (function () {
|
|
4406
4566
|
function TaxSituationCalculationRule() {
|
|
4407
4567
|
}
|
|
@@ -4466,6 +4626,66 @@
|
|
|
4466
4626
|
});
|
|
4467
4627
|
}
|
|
4468
4628
|
break;
|
|
4629
|
+
case exports.EnumTipoTributo.CBS_AJUSTE:
|
|
4630
|
+
{
|
|
4631
|
+
var _e = group.item.find(function (_a) {
|
|
4632
|
+
var name = _a.name;
|
|
4633
|
+
return name === exports.EnumTipoTributo.IBS_AJUSTE;
|
|
4634
|
+
}), ibsAjusteFormGroup = _e.formGroup, ibsAjusteFormField = _e.formField;
|
|
4635
|
+
var dataKey_3 = ibsAjusteFormField.find(function (_a) {
|
|
4636
|
+
var name = _a.name;
|
|
4637
|
+
return name === 'situacaoTributaria';
|
|
4638
|
+
}).dataKey;
|
|
4639
|
+
rxjs.combineLatest([
|
|
4640
|
+
ibsAjusteFormGroup
|
|
4641
|
+
.get('situacaoTributaria')
|
|
4642
|
+
.valueChanges.pipe(operators.startWith(ibsAjusteFormGroup.get('situacaoTributaria')
|
|
4643
|
+
.value), operators.distinctUntilChanged(function (old, current) {
|
|
4644
|
+
return (old === null || old === void 0 ? void 0 : old[dataKey_3]) === (current === null || current === void 0 ? void 0 : current[dataKey_3]);
|
|
4645
|
+
}))
|
|
4646
|
+
])
|
|
4647
|
+
.pipe(operators.skip(1), operators.map(function (_a) {
|
|
4648
|
+
var _b = __read(_a, 1), taxSituation = _b[0];
|
|
4649
|
+
return [taxSituation];
|
|
4650
|
+
}))
|
|
4651
|
+
.subscribe(function (_a) {
|
|
4652
|
+
var _b = __read(_a, 1), taxSituation = _b[0];
|
|
4653
|
+
formGroup
|
|
4654
|
+
.get('situacaoTributaria')
|
|
4655
|
+
.setValue(taxSituation);
|
|
4656
|
+
});
|
|
4657
|
+
}
|
|
4658
|
+
break;
|
|
4659
|
+
case exports.EnumTipoTributo.IBS_AJUSTE:
|
|
4660
|
+
{
|
|
4661
|
+
var _f = group.item.find(function (_a) {
|
|
4662
|
+
var name = _a.name;
|
|
4663
|
+
return name === exports.EnumTipoTributo.CBS_AJUSTE;
|
|
4664
|
+
}), cbsAjusteFormGroup = _f.formGroup, cbsAjusteFormField = _f.formField;
|
|
4665
|
+
var dataKey_4 = cbsAjusteFormField.find(function (_a) {
|
|
4666
|
+
var name = _a.name;
|
|
4667
|
+
return name === 'situacaoTributaria';
|
|
4668
|
+
}).dataKey;
|
|
4669
|
+
rxjs.combineLatest([
|
|
4670
|
+
cbsAjusteFormGroup
|
|
4671
|
+
.get('situacaoTributaria')
|
|
4672
|
+
.valueChanges.pipe(operators.startWith(cbsAjusteFormGroup.get('situacaoTributaria')
|
|
4673
|
+
.value), operators.distinctUntilChanged(function (old, current) {
|
|
4674
|
+
return (old === null || old === void 0 ? void 0 : old[dataKey_4]) === (current === null || current === void 0 ? void 0 : current[dataKey_4]);
|
|
4675
|
+
}))
|
|
4676
|
+
])
|
|
4677
|
+
.pipe(operators.skip(1), operators.map(function (_a) {
|
|
4678
|
+
var _b = __read(_a, 1), taxSituation = _b[0];
|
|
4679
|
+
return [taxSituation];
|
|
4680
|
+
}))
|
|
4681
|
+
.subscribe(function (_a) {
|
|
4682
|
+
var _b = __read(_a, 1), taxSituation = _b[0];
|
|
4683
|
+
formGroup
|
|
4684
|
+
.get('situacaoTributaria')
|
|
4685
|
+
.setValue(taxSituation);
|
|
4686
|
+
});
|
|
4687
|
+
}
|
|
4688
|
+
break;
|
|
4469
4689
|
default:
|
|
4470
4690
|
throw new Error("Regra TaxSituationCalculationRule n\u00E3o implementada para o imposto " + taxType + ", documento " + document + ".");
|
|
4471
4691
|
}
|
|
@@ -4478,7 +4698,7 @@
|
|
|
4478
4698
|
}());
|
|
4479
4699
|
|
|
4480
4700
|
var OutgoingInvoiceCalculationRulesRegistry = /** @class */ (function () {
|
|
4481
|
-
function OutgoingInvoiceCalculationRulesRegistry(taxableBaseCalculationRule, taxRateCalculationRule, effectiveTaxRateCalculationRule, taxAmountCalculationRule, grossAmountCalculationRule, taxSituationCalculationRule, taxClassificationCalculationRule, taxCalculationTypeCalculationRule, manualTaxCalculationRule) {
|
|
4701
|
+
function OutgoingInvoiceCalculationRulesRegistry(taxableBaseCalculationRule, taxRateCalculationRule, effectiveTaxRateCalculationRule, taxAmountCalculationRule, grossAmountCalculationRule, taxSituationCalculationRule, taxClassificationCalculationRule, taxCalculationTypeCalculationRule, assessmentPeriodCalculationRule, manualTaxCalculationRule) {
|
|
4482
4702
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
|
|
4483
4703
|
this.taxableBaseCalculationRule = taxableBaseCalculationRule;
|
|
4484
4704
|
this.taxRateCalculationRule = taxRateCalculationRule;
|
|
@@ -4488,6 +4708,7 @@
|
|
|
4488
4708
|
this.taxSituationCalculationRule = taxSituationCalculationRule;
|
|
4489
4709
|
this.taxClassificationCalculationRule = taxClassificationCalculationRule;
|
|
4490
4710
|
this.taxCalculationTypeCalculationRule = taxCalculationTypeCalculationRule;
|
|
4711
|
+
this.assessmentPeriodCalculationRule = assessmentPeriodCalculationRule;
|
|
4491
4712
|
this.manualTaxCalculationRule = manualTaxCalculationRule;
|
|
4492
4713
|
this.strategies = {
|
|
4493
4714
|
'Product And Service Sale': (_a = {},
|
|
@@ -6677,6 +6898,42 @@
|
|
|
6677
6898
|
rule: this.taxAmountCalculationRule
|
|
6678
6899
|
}
|
|
6679
6900
|
],
|
|
6901
|
+
_k[exports.EnumTipoTributo.CBS_AJUSTE] = [
|
|
6902
|
+
{
|
|
6903
|
+
field: exports.EnumCampoTributo.SituacaoTributaria,
|
|
6904
|
+
rule: this.taxSituationCalculationRule
|
|
6905
|
+
},
|
|
6906
|
+
{
|
|
6907
|
+
field: exports.EnumCampoTributo.ClassificacaoTributaria,
|
|
6908
|
+
rule: this.taxClassificationCalculationRule
|
|
6909
|
+
},
|
|
6910
|
+
{
|
|
6911
|
+
field: exports.EnumCampoTributo.PeriodoApuracao,
|
|
6912
|
+
rule: this.assessmentPeriodCalculationRule
|
|
6913
|
+
},
|
|
6914
|
+
{
|
|
6915
|
+
field: exports.EnumCampoTributo.Valor,
|
|
6916
|
+
rule: this.taxAmountCalculationRule
|
|
6917
|
+
}
|
|
6918
|
+
],
|
|
6919
|
+
_k[exports.EnumTipoTributo.IBS_AJUSTE] = [
|
|
6920
|
+
{
|
|
6921
|
+
field: exports.EnumCampoTributo.SituacaoTributaria,
|
|
6922
|
+
rule: this.taxSituationCalculationRule
|
|
6923
|
+
},
|
|
6924
|
+
{
|
|
6925
|
+
field: exports.EnumCampoTributo.ClassificacaoTributaria,
|
|
6926
|
+
rule: this.taxClassificationCalculationRule
|
|
6927
|
+
},
|
|
6928
|
+
{
|
|
6929
|
+
field: exports.EnumCampoTributo.PeriodoApuracao,
|
|
6930
|
+
rule: this.assessmentPeriodCalculationRule
|
|
6931
|
+
},
|
|
6932
|
+
{
|
|
6933
|
+
field: exports.EnumCampoTributo.Valor,
|
|
6934
|
+
rule: this.taxAmountCalculationRule
|
|
6935
|
+
}
|
|
6936
|
+
],
|
|
6680
6937
|
_k),
|
|
6681
6938
|
Delivery: (_l = {},
|
|
6682
6939
|
_l[exports.EnumTipoTributo.CBS] = [
|
|
@@ -8205,9 +8462,10 @@
|
|
|
8205
8462
|
{ type: TaxSituationCalculationRule },
|
|
8206
8463
|
{ type: TaxClassificationCalculationRule },
|
|
8207
8464
|
{ type: TaxCalculationTypeCalculationRule },
|
|
8465
|
+
{ type: AssessmentPeriodCalculationRule },
|
|
8208
8466
|
{ type: ManualTaxCalculationRule }
|
|
8209
8467
|
]; };
|
|
8210
|
-
OutgoingInvoiceCalculationRulesRegistry.ɵprov = core.ɵɵdefineInjectable({ factory: function OutgoingInvoiceCalculationRulesRegistry_Factory() { return new OutgoingInvoiceCalculationRulesRegistry(core.ɵɵinject(TaxableBaseCalculationRule), core.ɵɵinject(TaxRateCalculationRule), core.ɵɵinject(EffectiveTaxRateCalculationRule), core.ɵɵinject(TaxAmountCalculationRule), core.ɵɵinject(GrossAmountCalculationRule), core.ɵɵinject(TaxSituationCalculationRule), core.ɵɵinject(TaxClassificationCalculationRule), core.ɵɵinject(TaxCalculationTypeCalculationRule), core.ɵɵinject(ManualTaxCalculationRule)); }, token: OutgoingInvoiceCalculationRulesRegistry, providedIn: "root" });
|
|
8468
|
+
OutgoingInvoiceCalculationRulesRegistry.ɵprov = core.ɵɵdefineInjectable({ factory: function OutgoingInvoiceCalculationRulesRegistry_Factory() { return new OutgoingInvoiceCalculationRulesRegistry(core.ɵɵinject(TaxableBaseCalculationRule), core.ɵɵinject(TaxRateCalculationRule), core.ɵɵinject(EffectiveTaxRateCalculationRule), core.ɵɵinject(TaxAmountCalculationRule), core.ɵɵinject(GrossAmountCalculationRule), core.ɵɵinject(TaxSituationCalculationRule), core.ɵɵinject(TaxClassificationCalculationRule), core.ɵɵinject(TaxCalculationTypeCalculationRule), core.ɵɵinject(AssessmentPeriodCalculationRule), core.ɵɵinject(ManualTaxCalculationRule)); }, token: OutgoingInvoiceCalculationRulesRegistry, providedIn: "root" });
|
|
8211
8469
|
OutgoingInvoiceCalculationRulesRegistry = __decorate([
|
|
8212
8470
|
core.Injectable({ providedIn: 'root' })
|
|
8213
8471
|
], OutgoingInvoiceCalculationRulesRegistry);
|
|
@@ -9905,6 +10163,8 @@
|
|
|
9905
10163
|
break;
|
|
9906
10164
|
case exports.EnumTipoTributo.CBS_ESTORNO_CREDITO:
|
|
9907
10165
|
case exports.EnumTipoTributo.IBS_ESTORNO_CREDITO:
|
|
10166
|
+
case exports.EnumTipoTributo.CBS_AJUSTE:
|
|
10167
|
+
case exports.EnumTipoTributo.IBS_AJUSTE:
|
|
9908
10168
|
{
|
|
9909
10169
|
rxjs.combineLatest([
|
|
9910
10170
|
formGroup
|
|
@@ -10884,6 +11144,18 @@
|
|
|
10884
11144
|
rule: this.taxClassificationStatusRule
|
|
10885
11145
|
}
|
|
10886
11146
|
],
|
|
11147
|
+
_k[exports.EnumTipoTributo.CBS_AJUSTE] = [
|
|
11148
|
+
{
|
|
11149
|
+
field: exports.EnumCampoTributo.ClassificacaoTributaria,
|
|
11150
|
+
rule: this.taxClassificationStatusRule
|
|
11151
|
+
}
|
|
11152
|
+
],
|
|
11153
|
+
_k[exports.EnumTipoTributo.IBS_AJUSTE] = [
|
|
11154
|
+
{
|
|
11155
|
+
field: exports.EnumCampoTributo.ClassificacaoTributaria,
|
|
11156
|
+
rule: this.taxClassificationStatusRule
|
|
11157
|
+
}
|
|
11158
|
+
],
|
|
10887
11159
|
_k),
|
|
10888
11160
|
Delivery: (_l = {},
|
|
10889
11161
|
_l[exports.EnumTipoTributo.CBS] = [
|
|
@@ -12118,6 +12390,59 @@
|
|
|
12118
12390
|
});
|
|
12119
12391
|
}
|
|
12120
12392
|
break;
|
|
12393
|
+
case exports.EnumTipoTributo.CBS_AJUSTE:
|
|
12394
|
+
case exports.EnumTipoTributo.IBS_AJUSTE:
|
|
12395
|
+
{
|
|
12396
|
+
rxjs.combineLatest([
|
|
12397
|
+
formGroup
|
|
12398
|
+
.get('situacaoTributaria')
|
|
12399
|
+
.valueChanges.pipe(operators.startWith(formGroup.get('situacaoTributaria').value), operators.distinctUntilChanged()),
|
|
12400
|
+
formGroup
|
|
12401
|
+
.get('classificacaoTributaria')
|
|
12402
|
+
.valueChanges.pipe(operators.startWith(formGroup.get('classificacaoTributaria')
|
|
12403
|
+
.value), operators.distinctUntilChanged()),
|
|
12404
|
+
formGroup
|
|
12405
|
+
.get(exports.EnumCampoTributo.PeriodoApuracao)
|
|
12406
|
+
.valueChanges.pipe(operators.startWith(formGroup.get(exports.EnumCampoTributo.PeriodoApuracao).value), operators.distinctUntilChanged()),
|
|
12407
|
+
formGroup
|
|
12408
|
+
.get('valor')
|
|
12409
|
+
.valueChanges.pipe(operators.startWith(formGroup.get('valor').value), operators.distinctUntilChanged())
|
|
12410
|
+
])
|
|
12411
|
+
.pipe(operators.map(function (_a) {
|
|
12412
|
+
var _b = __read(_a, 4), taxSituation = _b[0], taxClassification = _b[1], assessmentPeriod = _b[2], taxAmount = _b[3];
|
|
12413
|
+
return [
|
|
12414
|
+
taxSituation,
|
|
12415
|
+
taxClassification,
|
|
12416
|
+
assessmentPeriod,
|
|
12417
|
+
new BigNumber(taxAmount)
|
|
12418
|
+
];
|
|
12419
|
+
}))
|
|
12420
|
+
.subscribe(function (_a) {
|
|
12421
|
+
var _b = __read(_a, 4), taxSituation = _b[0], taxClassification = _b[1], assessmentPeriod = _b[2], taxAmount = _b[3];
|
|
12422
|
+
var validators = [];
|
|
12423
|
+
if (taxSituation ||
|
|
12424
|
+
taxClassification ||
|
|
12425
|
+
assessmentPeriod ||
|
|
12426
|
+
taxAmount.isFinite()) {
|
|
12427
|
+
validators = [
|
|
12428
|
+
forms.Validators.max(9999999999999.99),
|
|
12429
|
+
forms.Validators.required
|
|
12430
|
+
];
|
|
12431
|
+
}
|
|
12432
|
+
else {
|
|
12433
|
+
validators = [
|
|
12434
|
+
forms.Validators.max(9999999999999.99)
|
|
12435
|
+
];
|
|
12436
|
+
}
|
|
12437
|
+
formGroup
|
|
12438
|
+
.get('valor')
|
|
12439
|
+
.setValidators(validators);
|
|
12440
|
+
formGroup.get('valor').updateValueAndValidity({
|
|
12441
|
+
emitEvent: false
|
|
12442
|
+
});
|
|
12443
|
+
});
|
|
12444
|
+
}
|
|
12445
|
+
break;
|
|
12121
12446
|
default:
|
|
12122
12447
|
throw new Error("Regra TaxAmountRequiredValidationRule n\u00E3o implementada para o imposto " + taxType + ", documento " + document + ".");
|
|
12123
12448
|
}
|
|
@@ -12490,6 +12815,56 @@
|
|
|
12490
12815
|
});
|
|
12491
12816
|
}
|
|
12492
12817
|
break;
|
|
12818
|
+
case exports.EnumTipoTributo.CBS_AJUSTE:
|
|
12819
|
+
case exports.EnumTipoTributo.IBS_AJUSTE:
|
|
12820
|
+
{
|
|
12821
|
+
rxjs.combineLatest([
|
|
12822
|
+
formGroup
|
|
12823
|
+
.get('situacaoTributaria')
|
|
12824
|
+
.valueChanges.pipe(operators.startWith(formGroup.get('situacaoTributaria').value), operators.distinctUntilChanged()),
|
|
12825
|
+
formGroup
|
|
12826
|
+
.get('classificacaoTributaria')
|
|
12827
|
+
.valueChanges.pipe(operators.startWith(formGroup.get('classificacaoTributaria')
|
|
12828
|
+
.value), operators.distinctUntilChanged()),
|
|
12829
|
+
formGroup
|
|
12830
|
+
.get(exports.EnumCampoTributo.PeriodoApuracao)
|
|
12831
|
+
.valueChanges.pipe(operators.startWith(formGroup.get(exports.EnumCampoTributo.PeriodoApuracao).value), operators.distinctUntilChanged()),
|
|
12832
|
+
formGroup
|
|
12833
|
+
.get('valor')
|
|
12834
|
+
.valueChanges.pipe(operators.startWith(formGroup.get('valor').value), operators.distinctUntilChanged())
|
|
12835
|
+
])
|
|
12836
|
+
.pipe(operators.map(function (_a) {
|
|
12837
|
+
var _b = __read(_a, 4), taxSituation = _b[0], taxClassication = _b[1], assessmentPeriod = _b[2], taxAmount = _b[3];
|
|
12838
|
+
return [
|
|
12839
|
+
taxSituation,
|
|
12840
|
+
taxClassication,
|
|
12841
|
+
assessmentPeriod,
|
|
12842
|
+
new BigNumber(taxAmount)
|
|
12843
|
+
];
|
|
12844
|
+
}))
|
|
12845
|
+
.subscribe(function (_a) {
|
|
12846
|
+
var _b = __read(_a, 4), taxSituation = _b[0], taxClassication = _b[1], assessmentPeriod = _b[2], taxAmount = _b[3];
|
|
12847
|
+
var validators = [];
|
|
12848
|
+
if (taxSituation ||
|
|
12849
|
+
taxClassication ||
|
|
12850
|
+
assessmentPeriod ||
|
|
12851
|
+
taxAmount.isFinite()) {
|
|
12852
|
+
validators = [forms.Validators.required];
|
|
12853
|
+
}
|
|
12854
|
+
else {
|
|
12855
|
+
validators = [];
|
|
12856
|
+
}
|
|
12857
|
+
formGroup
|
|
12858
|
+
.get('classificacaoTributaria')
|
|
12859
|
+
.setValidators(validators);
|
|
12860
|
+
formGroup
|
|
12861
|
+
.get('classificacaoTributaria')
|
|
12862
|
+
.updateValueAndValidity({
|
|
12863
|
+
emitEvent: false
|
|
12864
|
+
});
|
|
12865
|
+
});
|
|
12866
|
+
}
|
|
12867
|
+
break;
|
|
12493
12868
|
default:
|
|
12494
12869
|
throw new Error("Regra TaxClassificationRequiredValidationRule n\u00E3o implementada para o imposto " + taxType + ", documento " + document + ".");
|
|
12495
12870
|
}
|
|
@@ -13455,6 +13830,56 @@
|
|
|
13455
13830
|
});
|
|
13456
13831
|
}
|
|
13457
13832
|
break;
|
|
13833
|
+
case exports.EnumTipoTributo.CBS_AJUSTE:
|
|
13834
|
+
case exports.EnumTipoTributo.IBS_AJUSTE:
|
|
13835
|
+
{
|
|
13836
|
+
rxjs.combineLatest([
|
|
13837
|
+
formGroup
|
|
13838
|
+
.get('situacaoTributaria')
|
|
13839
|
+
.valueChanges.pipe(operators.startWith(formGroup.get('situacaoTributaria').value), operators.distinctUntilChanged()),
|
|
13840
|
+
formGroup
|
|
13841
|
+
.get('classificacaoTributaria')
|
|
13842
|
+
.valueChanges.pipe(operators.startWith(formGroup.get('classificacaoTributaria')
|
|
13843
|
+
.value), operators.distinctUntilChanged()),
|
|
13844
|
+
formGroup
|
|
13845
|
+
.get(exports.EnumCampoTributo.PeriodoApuracao)
|
|
13846
|
+
.valueChanges.pipe(operators.startWith(formGroup.get(exports.EnumCampoTributo.PeriodoApuracao).value), operators.distinctUntilChanged()),
|
|
13847
|
+
formGroup
|
|
13848
|
+
.get('valor')
|
|
13849
|
+
.valueChanges.pipe(operators.startWith(formGroup.get('valor').value), operators.distinctUntilChanged())
|
|
13850
|
+
])
|
|
13851
|
+
.pipe(operators.map(function (_a) {
|
|
13852
|
+
var _b = __read(_a, 4), taxSituation = _b[0], taxClassification = _b[1], assessmentPeriod = _b[2], taxAmount = _b[3];
|
|
13853
|
+
return [
|
|
13854
|
+
taxSituation,
|
|
13855
|
+
taxClassification,
|
|
13856
|
+
assessmentPeriod,
|
|
13857
|
+
new BigNumber(taxAmount)
|
|
13858
|
+
];
|
|
13859
|
+
}))
|
|
13860
|
+
.subscribe(function (_a) {
|
|
13861
|
+
var _b = __read(_a, 4), taxSituation = _b[0], taxClassification = _b[1], assessmentPeriod = _b[2], taxAmount = _b[3];
|
|
13862
|
+
var validators = [];
|
|
13863
|
+
if (taxSituation ||
|
|
13864
|
+
taxClassification ||
|
|
13865
|
+
assessmentPeriod ||
|
|
13866
|
+
taxAmount.isFinite()) {
|
|
13867
|
+
validators = [forms.Validators.required];
|
|
13868
|
+
}
|
|
13869
|
+
else {
|
|
13870
|
+
validators = [];
|
|
13871
|
+
}
|
|
13872
|
+
formGroup
|
|
13873
|
+
.get('situacaoTributaria')
|
|
13874
|
+
.setValidators(validators);
|
|
13875
|
+
formGroup
|
|
13876
|
+
.get('situacaoTributaria')
|
|
13877
|
+
.updateValueAndValidity({
|
|
13878
|
+
emitEvent: false
|
|
13879
|
+
});
|
|
13880
|
+
});
|
|
13881
|
+
}
|
|
13882
|
+
break;
|
|
13458
13883
|
default:
|
|
13459
13884
|
throw new Error("Regra TaxSituationRequiredValidationRule n\u00E3o implementada para o imposto " + taxType + ", documento " + document + ".");
|
|
13460
13885
|
}
|
|
@@ -16958,14 +17383,92 @@
|
|
|
16958
17383
|
return IncomingInvoiceValidationRulesRegistry;
|
|
16959
17384
|
}());
|
|
16960
17385
|
|
|
17386
|
+
var AssessmentPeriodRequiredValidationRule = /** @class */ (function () {
|
|
17387
|
+
function AssessmentPeriodRequiredValidationRule() {
|
|
17388
|
+
}
|
|
17389
|
+
AssessmentPeriodRequiredValidationRule.prototype.apply = function (_a) {
|
|
17390
|
+
var context = _a.context, _b = _a.item, taxType = _b.name, formGroup = _b.formGroup;
|
|
17391
|
+
var document = context.document;
|
|
17392
|
+
switch (taxType) {
|
|
17393
|
+
case exports.EnumTipoTributo.CBS_AJUSTE:
|
|
17394
|
+
case exports.EnumTipoTributo.IBS_AJUSTE:
|
|
17395
|
+
{
|
|
17396
|
+
switch (document) {
|
|
17397
|
+
case 'Outgoing Invoice':
|
|
17398
|
+
{
|
|
17399
|
+
rxjs.combineLatest([
|
|
17400
|
+
formGroup
|
|
17401
|
+
.get('situacaoTributaria')
|
|
17402
|
+
.valueChanges.pipe(operators.startWith(formGroup.get('situacaoTributaria').value), operators.distinctUntilChanged()),
|
|
17403
|
+
formGroup
|
|
17404
|
+
.get('classificacaoTributaria')
|
|
17405
|
+
.valueChanges.pipe(operators.startWith(formGroup.get('classificacaoTributaria').value), operators.distinctUntilChanged()),
|
|
17406
|
+
formGroup
|
|
17407
|
+
.get(exports.EnumCampoTributo.PeriodoApuracao)
|
|
17408
|
+
.valueChanges.pipe(operators.startWith(formGroup.get(exports.EnumCampoTributo.PeriodoApuracao).value), operators.distinctUntilChanged()),
|
|
17409
|
+
formGroup
|
|
17410
|
+
.get('valor')
|
|
17411
|
+
.valueChanges.pipe(operators.startWith(formGroup.get('valor').value), operators.distinctUntilChanged())
|
|
17412
|
+
])
|
|
17413
|
+
.pipe(operators.map(function (_a) {
|
|
17414
|
+
var _b = __read(_a, 4), taxSituation = _b[0], taxClassication = _b[1], assessmentPeriod = _b[2], taxAmount = _b[3];
|
|
17415
|
+
return [
|
|
17416
|
+
taxSituation,
|
|
17417
|
+
taxClassication,
|
|
17418
|
+
assessmentPeriod,
|
|
17419
|
+
new BigNumber(taxAmount)
|
|
17420
|
+
];
|
|
17421
|
+
}))
|
|
17422
|
+
.subscribe(function (_a) {
|
|
17423
|
+
var _b = __read(_a, 4), taxSituation = _b[0], taxClassication = _b[1], assessmentPeriod = _b[2], taxAmount = _b[3];
|
|
17424
|
+
var validators = [];
|
|
17425
|
+
if (taxSituation ||
|
|
17426
|
+
taxClassication ||
|
|
17427
|
+
assessmentPeriod ||
|
|
17428
|
+
taxAmount.isFinite()) {
|
|
17429
|
+
validators = [
|
|
17430
|
+
forms.Validators.required
|
|
17431
|
+
];
|
|
17432
|
+
}
|
|
17433
|
+
else {
|
|
17434
|
+
validators = [];
|
|
17435
|
+
}
|
|
17436
|
+
formGroup
|
|
17437
|
+
.get(exports.EnumCampoTributo.PeriodoApuracao)
|
|
17438
|
+
.setValidators(validators);
|
|
17439
|
+
formGroup
|
|
17440
|
+
.get(exports.EnumCampoTributo.PeriodoApuracao)
|
|
17441
|
+
.updateValueAndValidity({
|
|
17442
|
+
emitEvent: false
|
|
17443
|
+
});
|
|
17444
|
+
});
|
|
17445
|
+
}
|
|
17446
|
+
break;
|
|
17447
|
+
default:
|
|
17448
|
+
throw new Error("Regra AssessmentPeriodRequiredValidationRule n\u00E3o implementada para o imposto " + taxType + ", documento " + document + ".");
|
|
17449
|
+
}
|
|
17450
|
+
}
|
|
17451
|
+
break;
|
|
17452
|
+
default:
|
|
17453
|
+
throw new Error("Regra AssessmentPeriodRequiredValidationRule n\u00E3o implementada para o imposto " + taxType + ", documento " + document + ".");
|
|
17454
|
+
}
|
|
17455
|
+
};
|
|
17456
|
+
AssessmentPeriodRequiredValidationRule.ɵprov = core.ɵɵdefineInjectable({ factory: function AssessmentPeriodRequiredValidationRule_Factory() { return new AssessmentPeriodRequiredValidationRule(); }, token: AssessmentPeriodRequiredValidationRule, providedIn: "root" });
|
|
17457
|
+
AssessmentPeriodRequiredValidationRule = __decorate([
|
|
17458
|
+
core.Injectable({ providedIn: 'root' })
|
|
17459
|
+
], AssessmentPeriodRequiredValidationRule);
|
|
17460
|
+
return AssessmentPeriodRequiredValidationRule;
|
|
17461
|
+
}());
|
|
17462
|
+
|
|
16961
17463
|
var OutgoingInvoiceValidationRulesRegistry = /** @class */ (function () {
|
|
16962
|
-
function OutgoingInvoiceValidationRulesRegistry(taxableBaseRequiredValidationRule, taxRateRequiredValidationRule, taxClassificationRequiredValidationRule, taxAmountRequiredValidationRule, taxSituationRequiredValidationRule) {
|
|
17464
|
+
function OutgoingInvoiceValidationRulesRegistry(taxableBaseRequiredValidationRule, taxRateRequiredValidationRule, taxClassificationRequiredValidationRule, taxAmountRequiredValidationRule, taxSituationRequiredValidationRule, assessmentPeriodRequiredValidationRule) {
|
|
16963
17465
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
|
|
16964
17466
|
this.taxableBaseRequiredValidationRule = taxableBaseRequiredValidationRule;
|
|
16965
17467
|
this.taxRateRequiredValidationRule = taxRateRequiredValidationRule;
|
|
16966
17468
|
this.taxClassificationRequiredValidationRule = taxClassificationRequiredValidationRule;
|
|
16967
17469
|
this.taxAmountRequiredValidationRule = taxAmountRequiredValidationRule;
|
|
16968
17470
|
this.taxSituationRequiredValidationRule = taxSituationRequiredValidationRule;
|
|
17471
|
+
this.assessmentPeriodRequiredValidationRule = assessmentPeriodRequiredValidationRule;
|
|
16969
17472
|
this.strategies = {
|
|
16970
17473
|
'Product And Service Sale': (_a = {},
|
|
16971
17474
|
_a[exports.EnumTipoTributo.CBS] = [
|
|
@@ -19754,6 +20257,42 @@
|
|
|
19754
20257
|
rules: [this.taxAmountRequiredValidationRule]
|
|
19755
20258
|
}
|
|
19756
20259
|
],
|
|
20260
|
+
_k[exports.EnumTipoTributo.CBS_AJUSTE] = [
|
|
20261
|
+
{
|
|
20262
|
+
field: exports.EnumCampoTributo.SituacaoTributaria,
|
|
20263
|
+
rules: [this.taxSituationRequiredValidationRule]
|
|
20264
|
+
},
|
|
20265
|
+
{
|
|
20266
|
+
field: exports.EnumCampoTributo.ClassificacaoTributaria,
|
|
20267
|
+
rules: [this.taxClassificationRequiredValidationRule]
|
|
20268
|
+
},
|
|
20269
|
+
{
|
|
20270
|
+
field: exports.EnumCampoTributo.PeriodoApuracao,
|
|
20271
|
+
rules: [this.assessmentPeriodRequiredValidationRule]
|
|
20272
|
+
},
|
|
20273
|
+
{
|
|
20274
|
+
field: exports.EnumCampoTributo.Valor,
|
|
20275
|
+
rules: [this.taxAmountRequiredValidationRule]
|
|
20276
|
+
}
|
|
20277
|
+
],
|
|
20278
|
+
_k[exports.EnumTipoTributo.IBS_AJUSTE] = [
|
|
20279
|
+
{
|
|
20280
|
+
field: exports.EnumCampoTributo.SituacaoTributaria,
|
|
20281
|
+
rules: [this.taxSituationRequiredValidationRule]
|
|
20282
|
+
},
|
|
20283
|
+
{
|
|
20284
|
+
field: exports.EnumCampoTributo.ClassificacaoTributaria,
|
|
20285
|
+
rules: [this.taxClassificationRequiredValidationRule]
|
|
20286
|
+
},
|
|
20287
|
+
{
|
|
20288
|
+
field: exports.EnumCampoTributo.PeriodoApuracao,
|
|
20289
|
+
rules: [this.assessmentPeriodRequiredValidationRule]
|
|
20290
|
+
},
|
|
20291
|
+
{
|
|
20292
|
+
field: exports.EnumCampoTributo.Valor,
|
|
20293
|
+
rules: [this.taxAmountRequiredValidationRule]
|
|
20294
|
+
}
|
|
20295
|
+
],
|
|
19757
20296
|
_k),
|
|
19758
20297
|
Delivery: (_l = {},
|
|
19759
20298
|
_l[exports.EnumTipoTributo.CBS] = [
|
|
@@ -21698,9 +22237,10 @@
|
|
|
21698
22237
|
{ type: TaxRateRequiredValidationRule },
|
|
21699
22238
|
{ type: TaxClassificationRequiredValidationRule },
|
|
21700
22239
|
{ type: TaxAmountRequiredValidationRule },
|
|
21701
|
-
{ type: TaxSituationRequiredValidationRule }
|
|
22240
|
+
{ type: TaxSituationRequiredValidationRule },
|
|
22241
|
+
{ type: AssessmentPeriodRequiredValidationRule }
|
|
21702
22242
|
]; };
|
|
21703
|
-
OutgoingInvoiceValidationRulesRegistry.ɵprov = core.ɵɵdefineInjectable({ factory: function OutgoingInvoiceValidationRulesRegistry_Factory() { return new OutgoingInvoiceValidationRulesRegistry(core.ɵɵinject(TaxableBaseRequiredValidationRule), core.ɵɵinject(TaxRateRequiredValidationRule), core.ɵɵinject(TaxClassificationRequiredValidationRule), core.ɵɵinject(TaxAmountRequiredValidationRule), core.ɵɵinject(TaxSituationRequiredValidationRule)); }, token: OutgoingInvoiceValidationRulesRegistry, providedIn: "root" });
|
|
22243
|
+
OutgoingInvoiceValidationRulesRegistry.ɵprov = core.ɵɵdefineInjectable({ factory: function OutgoingInvoiceValidationRulesRegistry_Factory() { return new OutgoingInvoiceValidationRulesRegistry(core.ɵɵinject(TaxableBaseRequiredValidationRule), core.ɵɵinject(TaxRateRequiredValidationRule), core.ɵɵinject(TaxClassificationRequiredValidationRule), core.ɵɵinject(TaxAmountRequiredValidationRule), core.ɵɵinject(TaxSituationRequiredValidationRule), core.ɵɵinject(AssessmentPeriodRequiredValidationRule)); }, token: OutgoingInvoiceValidationRulesRegistry, providedIn: "root" });
|
|
21704
22244
|
OutgoingInvoiceValidationRulesRegistry = __decorate([
|
|
21705
22245
|
core.Injectable({ providedIn: 'root' })
|
|
21706
22246
|
], OutgoingInvoiceValidationRulesRegistry);
|
|
@@ -23392,7 +23932,7 @@
|
|
|
23392
23932
|
}());
|
|
23393
23933
|
|
|
23394
23934
|
var ErpTributosComponent = /** @class */ (function () {
|
|
23395
|
-
function ErpTributosComponent(messageService, formBuilder, changeDetector, translate, e027StrLookup, beneficioFiscalLookup, e027eqiLookup, naturezaReceitaLookup, classificacaoTributariaLookup, lookupUtils, erpTributosService, gtag, rulesService) {
|
|
23935
|
+
function ErpTributosComponent(messageService, formBuilder, changeDetector, translate, e027StrLookup, beneficioFiscalLookup, e027eqiLookup, naturezaReceitaLookup, classificacaoTributariaLookup, lookupUtils, erpTributosService, gtag, rulesService, localeService) {
|
|
23396
23936
|
this.messageService = messageService;
|
|
23397
23937
|
this.formBuilder = formBuilder;
|
|
23398
23938
|
this.changeDetector = changeDetector;
|
|
@@ -23406,6 +23946,7 @@
|
|
|
23406
23946
|
this.erpTributosService = erpTributosService;
|
|
23407
23947
|
this.gtag = gtag;
|
|
23408
23948
|
this.rulesService = rulesService;
|
|
23949
|
+
this.localeService = localeService;
|
|
23409
23950
|
this.camposBloqueados = false;
|
|
23410
23951
|
this.currencyLocaleOptions = {
|
|
23411
23952
|
currencySymbol: '',
|
|
@@ -23437,6 +23978,7 @@
|
|
|
23437
23978
|
this.menuItemIBSCreditoPresumido = false;
|
|
23438
23979
|
this.menuItemIS = false;
|
|
23439
23980
|
this.menuItemCBS_IBS_ESTORNO_CREDITO = false;
|
|
23981
|
+
this.menuItemCBS_IBS_Ajuste = false;
|
|
23440
23982
|
this.menuItemIcmsCreditoPresumido = false;
|
|
23441
23983
|
this.requiredItemCideTecnologia = false;
|
|
23442
23984
|
this.requiredItemPisRecuperar = false;
|
|
@@ -23487,7 +24029,7 @@
|
|
|
23487
24029
|
this.requiredIcmsStSolidario = false;
|
|
23488
24030
|
this.requiredIcmsStRetidoAnt = false;
|
|
23489
24031
|
this.requiredFcpStReditoAnt = false;
|
|
23490
|
-
this.
|
|
24032
|
+
this.unsubscribe$ = new rxjs.Subject();
|
|
23491
24033
|
}
|
|
23492
24034
|
Object.defineProperty(ErpTributosComponent.prototype, "tributos", {
|
|
23493
24035
|
get: function () {
|
|
@@ -23500,14 +24042,6 @@
|
|
|
23500
24042
|
configurable: true
|
|
23501
24043
|
});
|
|
23502
24044
|
ErpTributosComponent.prototype.ngOnInit = function () {
|
|
23503
|
-
this.menuItemPis = false;
|
|
23504
|
-
this.menuItemCofins = false;
|
|
23505
|
-
this.menuItemIpi = false;
|
|
23506
|
-
this.menuItemIss = false;
|
|
23507
|
-
this.menuItemImportacoes = false;
|
|
23508
|
-
this.menuItemRetencoes = false;
|
|
23509
|
-
this.menuItemIcms = false;
|
|
23510
|
-
this.menuItemCideTecnologia = false;
|
|
23511
24045
|
this.dominio = this.dominio ? this.dominio : 'erpx_cpl_imp';
|
|
23512
24046
|
this.servico = this.servico ? this.servico : 'cadastros';
|
|
23513
24047
|
this.prefixLabel = this.dominio + "." + this.servico;
|
|
@@ -23547,8 +24081,8 @@
|
|
|
23547
24081
|
}
|
|
23548
24082
|
};
|
|
23549
24083
|
ErpTributosComponent.prototype.ngOnDestroy = function () {
|
|
23550
|
-
this.
|
|
23551
|
-
this.
|
|
24084
|
+
this.unsubscribe$.next();
|
|
24085
|
+
this.unsubscribe$.complete();
|
|
23552
24086
|
this.lookupUtils.resetStoredKeys();
|
|
23553
24087
|
};
|
|
23554
24088
|
ErpTributosComponent.prototype.memoriaCalculo = function (imposto) {
|
|
@@ -23800,6 +24334,10 @@
|
|
|
23800
24334
|
case exports.EnumTipoTributo.IBS_ESTORNO_CREDITO:
|
|
23801
24335
|
_this.montaCBSIBSEstornoCredito();
|
|
23802
24336
|
break;
|
|
24337
|
+
case exports.EnumTipoTributo.CBS_AJUSTE:
|
|
24338
|
+
case exports.EnumTipoTributo.IBS_AJUSTE:
|
|
24339
|
+
_this.montaCBS_IBS_Ajuste();
|
|
24340
|
+
break;
|
|
23803
24341
|
case exports.EnumTipoTributo.PIS_RECUPERAR:
|
|
23804
24342
|
case exports.EnumTipoTributo.PIS_DEVOLVIDO:
|
|
23805
24343
|
case exports.EnumTipoTributo.PIS:
|
|
@@ -24386,6 +24924,32 @@
|
|
|
24386
24924
|
visible: this.context.document === 'Outgoing Invoice' &&
|
|
24387
24925
|
this.context.invoice.type === 'Debit' &&
|
|
24388
24926
|
this.context.invoice.debitInvoiceType === 'Inventory Loss'
|
|
24927
|
+
}, {
|
|
24928
|
+
label: this.translate.instant('erpx.tributos.actions_cbs_ibs_ajuste_label'),
|
|
24929
|
+
disabled: this.menuItemCBS_IBS_Ajuste,
|
|
24930
|
+
command: function () {
|
|
24931
|
+
(_this.montaCBS_IBS_Ajuste().forEach(function (value) {
|
|
24932
|
+
_this.novoImpostoManual(value);
|
|
24933
|
+
}),
|
|
24934
|
+
(_this.indexAccordion = [0]));
|
|
24935
|
+
_this.rulesService.apply({
|
|
24936
|
+
groups: _this.grupos,
|
|
24937
|
+
group: _this.grupos.find(function (group) {
|
|
24938
|
+
return group.grupoTributo ===
|
|
24939
|
+
exports.EnumGrupoTributo.CBS_IBS_AJUSTE;
|
|
24940
|
+
}),
|
|
24941
|
+
context: _this.context
|
|
24942
|
+
});
|
|
24943
|
+
_this.changeDetector.detectChanges();
|
|
24944
|
+
},
|
|
24945
|
+
visible: this.context.document === 'Outgoing Invoice' &&
|
|
24946
|
+
this.context.invoice.type === 'Debit' &&
|
|
24947
|
+
(this.context.invoice.debitInvoiceType ===
|
|
24948
|
+
'Credit Cancellation Exempt Outputs' ||
|
|
24949
|
+
this.context.invoice.debitInvoiceType ===
|
|
24950
|
+
'Debits Unprocessed Invoices Assessment' ||
|
|
24951
|
+
this.context.invoice.debitInvoiceType ===
|
|
24952
|
+
'Disqualification from Simples Nacional')
|
|
24389
24953
|
}, {
|
|
24390
24954
|
id: 'retencaoFunrural',
|
|
24391
24955
|
label: this.translate.instant('erpx.tributos.actions_retencao_funrural_label'),
|
|
@@ -25890,6 +26454,47 @@
|
|
|
25890
26454
|
});
|
|
25891
26455
|
return item;
|
|
25892
26456
|
};
|
|
26457
|
+
ErpTributosComponent.prototype.montaCBS_IBS_Ajuste = function () {
|
|
26458
|
+
if (this.menuItemCBS_IBS_Ajuste)
|
|
26459
|
+
return;
|
|
26460
|
+
this.menuItemCBS_IBS_Ajuste = true;
|
|
26461
|
+
var item = [
|
|
26462
|
+
__assign({ name: exports.EnumTipoTributo.CBS_AJUSTE, label: 'erpx.tributos.enum_tipo_tributo_cbs_ajuste' }, this.montaCampos([
|
|
26463
|
+
{
|
|
26464
|
+
campo: exports.EnumCampoTributo.SituacaoTributaria
|
|
26465
|
+
},
|
|
26466
|
+
{
|
|
26467
|
+
campo: exports.EnumCampoTributo.ClassificacaoTributaria
|
|
26468
|
+
},
|
|
26469
|
+
{
|
|
26470
|
+
campo: exports.EnumCampoTributo.PeriodoApuracao
|
|
26471
|
+
},
|
|
26472
|
+
{
|
|
26473
|
+
campo: exports.EnumCampoTributo.Valor
|
|
26474
|
+
}
|
|
26475
|
+
], exports.EnumTipoTributo.CBS_AJUSTE)),
|
|
26476
|
+
__assign({ name: exports.EnumTipoTributo.IBS_AJUSTE, label: 'erpx.tributos.enum_tipo_tributo_ibs_ajuste' }, this.montaCampos([
|
|
26477
|
+
{
|
|
26478
|
+
campo: exports.EnumCampoTributo.SituacaoTributaria
|
|
26479
|
+
},
|
|
26480
|
+
{
|
|
26481
|
+
campo: exports.EnumCampoTributo.ClassificacaoTributaria
|
|
26482
|
+
},
|
|
26483
|
+
{
|
|
26484
|
+
campo: exports.EnumCampoTributo.PeriodoApuracao
|
|
26485
|
+
},
|
|
26486
|
+
{
|
|
26487
|
+
campo: exports.EnumCampoTributo.Valor
|
|
26488
|
+
}
|
|
26489
|
+
], exports.EnumTipoTributo.IBS_AJUSTE))
|
|
26490
|
+
];
|
|
26491
|
+
this.grupos.unshift({
|
|
26492
|
+
grupo: "" + ('erpx.tributos.enum_grupo_tributo_' + exports.EnumGrupoTributo.CBS_IBS_AJUSTE + '_label'),
|
|
26493
|
+
grupoTributo: exports.EnumGrupoTributo.CBS_IBS_AJUSTE,
|
|
26494
|
+
item: item
|
|
26495
|
+
});
|
|
26496
|
+
return item;
|
|
26497
|
+
};
|
|
25893
26498
|
ErpTributosComponent.prototype.montaPis = function () {
|
|
25894
26499
|
if (this.menuItemPis == false) {
|
|
25895
26500
|
this.menuItemPis = true;
|
|
@@ -26727,13 +27332,13 @@
|
|
|
26727
27332
|
var formField = [];
|
|
26728
27333
|
var formGroup = {};
|
|
26729
27334
|
campos.map(function (it) {
|
|
26730
|
-
var _a, _b;
|
|
26731
|
-
var
|
|
27335
|
+
var _a, _b, _c;
|
|
27336
|
+
var _d, _e;
|
|
26732
27337
|
if (it.campo == exports.EnumCampoTributo.BaseCalculo) {
|
|
26733
27338
|
formGroup = __assign(__assign({}, formGroup), { baseCalculo: [
|
|
26734
27339
|
{
|
|
26735
27340
|
value: null,
|
|
26736
|
-
disabled: (
|
|
27341
|
+
disabled: (_d = it.disabled) !== null && _d !== void 0 ? _d : false
|
|
26737
27342
|
},
|
|
26738
27343
|
forms.Validators.compose([forms.Validators.max(9999999999999.99)])
|
|
26739
27344
|
] });
|
|
@@ -26767,7 +27372,7 @@
|
|
|
26767
27372
|
formGroup = __assign(__assign({}, formGroup), { aliquota: [
|
|
26768
27373
|
{
|
|
26769
27374
|
value: null,
|
|
26770
|
-
disabled: (
|
|
27375
|
+
disabled: (_e = it.disabled) !== null && _e !== void 0 ? _e : false
|
|
26771
27376
|
},
|
|
26772
27377
|
forms.Validators.compose([forms.Validators.max(999.9999)])
|
|
26773
27378
|
] });
|
|
@@ -26797,6 +27402,28 @@
|
|
|
26797
27402
|
}
|
|
26798
27403
|
}));
|
|
26799
27404
|
}
|
|
27405
|
+
else if (it.campo === exports.EnumCampoTributo.PeriodoApuracao) {
|
|
27406
|
+
formGroup = __assign(__assign({}, formGroup), (_a = {}, _a[exports.EnumCampoTributo.PeriodoApuracao] = [
|
|
27407
|
+
{
|
|
27408
|
+
value: null,
|
|
27409
|
+
disabled: false
|
|
27410
|
+
},
|
|
27411
|
+
forms.Validators.compose([])
|
|
27412
|
+
], _a));
|
|
27413
|
+
formField.push(new angularComponents$1.FormField({
|
|
27414
|
+
type: angularComponents$1.FieldType.Date,
|
|
27415
|
+
name: exports.EnumCampoTributo.PeriodoApuracao,
|
|
27416
|
+
label: _this.translate.instant('erpx.tributos.fields_periodo_apuracao_label'),
|
|
27417
|
+
view: 'month',
|
|
27418
|
+
appendTo: 'body',
|
|
27419
|
+
calendarLocaleOptions: new angularComponents$1.CalendarLocaleOptions(__assign(__assign({}, _this.localeService.getLocaleOptions().calendar), { dateFormat: 'mm/yy' })),
|
|
27420
|
+
onBlur: function () { return _this.updateTwoWayDataBinding(); },
|
|
27421
|
+
required: function () {
|
|
27422
|
+
return _this.isFieldRequired(exports.EnumCampoTributo.PeriodoApuracao, tributo);
|
|
27423
|
+
},
|
|
27424
|
+
size: { sm: 12, md: 4, lg: 4, xl: 3 }
|
|
27425
|
+
}));
|
|
27426
|
+
}
|
|
26800
27427
|
else if (it.campo === exports.EnumCampoTributo.ReducaoAliquotaGovernamental) {
|
|
26801
27428
|
formGroup = __assign(__assign({}, formGroup), { reducaoAliquotaGovernamental: [
|
|
26802
27429
|
{
|
|
@@ -27132,7 +27759,9 @@
|
|
|
27132
27759
|
tributo === exports.EnumTipoTributo.IBS_ESTADUAL ||
|
|
27133
27760
|
tributo === exports.EnumTipoTributo.IBS_MUNICIPAL ||
|
|
27134
27761
|
tributo === exports.EnumTipoTributo.CBS_ESTORNO_CREDITO ||
|
|
27135
|
-
tributo === exports.EnumTipoTributo.IBS_ESTORNO_CREDITO
|
|
27762
|
+
tributo === exports.EnumTipoTributo.IBS_ESTORNO_CREDITO ||
|
|
27763
|
+
tributo === exports.EnumTipoTributo.CBS_AJUSTE ||
|
|
27764
|
+
tributo === exports.EnumTipoTributo.IBS_AJUSTE)
|
|
27136
27765
|
defaultFilter = __spread(defaultFilter, [
|
|
27137
27766
|
{
|
|
27138
27767
|
field: 'classificacaoTributaria.indGEstornoCred',
|
|
@@ -27142,6 +27771,14 @@
|
|
|
27142
27771
|
? angularComponents.EnumLogicalOperator.Eq
|
|
27143
27772
|
: angularComponents.EnumLogicalOperator.Ne,
|
|
27144
27773
|
values: ['EXIGE']
|
|
27774
|
+
},
|
|
27775
|
+
{
|
|
27776
|
+
field: 'indGAjusteCompet',
|
|
27777
|
+
operator: tributo === exports.EnumTipoTributo.CBS_AJUSTE ||
|
|
27778
|
+
tributo === exports.EnumTipoTributo.IBS_AJUSTE
|
|
27779
|
+
? angularComponents.EnumLogicalOperator.Eq
|
|
27780
|
+
: angularComponents.EnumLogicalOperator.Ne,
|
|
27781
|
+
values: ['EXIGE']
|
|
27145
27782
|
}
|
|
27146
27783
|
]);
|
|
27147
27784
|
formField.push(new angularComponents$1.FormField(__assign(__assign({}, _this.e027StrLookup.mountOptions({
|
|
@@ -28013,13 +28650,13 @@
|
|
|
28013
28650
|
}, id: tributo + 'ClassificacaoTributaria', name: 'classificacaoTributaria', formGroup: 'classificacaoTributaria', infoSign: _this.translate.instant('erpx_cpl_imp.impostos.classificacao_tributaria_desoneracao_info_sign'), label: _this.translate.instant('erpx_cpl_imp.impostos.classificacao_tributaria_desoneracao'), required: function () { return false; }, multiple: false, size: { sm: 12, md: 4, lg: 4, xl: 3 } })));
|
|
28014
28651
|
}
|
|
28015
28652
|
else if (it.campo === exports.EnumCampoTributo.AplicarValorLiquidoDocumento) {
|
|
28016
|
-
formGroup = __assign(__assign({}, formGroup), (
|
|
28653
|
+
formGroup = __assign(__assign({}, formGroup), (_b = {}, _b[exports.EnumCampoTributo.AplicarValorLiquidoDocumento] = [
|
|
28017
28654
|
{
|
|
28018
28655
|
value: exports.EnumAplicarValorLiquidoDocumento.NENHUM,
|
|
28019
28656
|
disabled: true
|
|
28020
28657
|
},
|
|
28021
28658
|
forms.Validators.compose([])
|
|
28022
|
-
],
|
|
28659
|
+
], _b));
|
|
28023
28660
|
formField.push(new angularComponents$1.FormField({
|
|
28024
28661
|
name: exports.EnumCampoTributo.AplicarValorLiquidoDocumento,
|
|
28025
28662
|
label: _this.translate.instant('erpx.tributos.aplicar_valor_liquido_documento'),
|
|
@@ -28048,13 +28685,13 @@
|
|
|
28048
28685
|
}));
|
|
28049
28686
|
}
|
|
28050
28687
|
else if (it.campo === exports.EnumCampoTributo.EscriturarAliquotaISS) {
|
|
28051
|
-
formGroup = __assign(__assign({}, formGroup), (
|
|
28688
|
+
formGroup = __assign(__assign({}, formGroup), (_c = {}, _c[exports.EnumCampoTributo.EscriturarAliquotaISS] = [
|
|
28052
28689
|
{
|
|
28053
28690
|
value: exports.EnumEscriturarAliquotaISS.SIM,
|
|
28054
28691
|
disabled: false
|
|
28055
28692
|
},
|
|
28056
28693
|
forms.Validators.compose([])
|
|
28057
|
-
],
|
|
28694
|
+
], _c));
|
|
28058
28695
|
formField.push(new angularComponents$1.FormField({
|
|
28059
28696
|
name: exports.EnumCampoTributo.EscriturarAliquotaISS,
|
|
28060
28697
|
label: _this.translate.instant('erpx.tributos.escriturar_aliquota_iss'),
|
|
@@ -28303,7 +28940,8 @@
|
|
|
28303
28940
|
{ type: angularComponents.LookupValidationUtils },
|
|
28304
28941
|
{ type: ErpTributosService },
|
|
28305
28942
|
{ type: platformUtils.GTagService },
|
|
28306
|
-
{ type: RulesService }
|
|
28943
|
+
{ type: RulesService },
|
|
28944
|
+
{ type: angularComponents$1.LocaleService }
|
|
28307
28945
|
]; };
|
|
28308
28946
|
__decorate([
|
|
28309
28947
|
core.Input()
|
|
@@ -30474,22 +31112,24 @@
|
|
|
30474
31112
|
exports.nonNullish = nonNullish;
|
|
30475
31113
|
exports.ɵa = ErpResumoComponent;
|
|
30476
31114
|
exports.ɵb = ErpResumoService;
|
|
30477
|
-
exports.ɵba =
|
|
30478
|
-
exports.ɵbb =
|
|
30479
|
-
exports.ɵbc =
|
|
30480
|
-
exports.ɵbd =
|
|
30481
|
-
exports.ɵbe =
|
|
30482
|
-
exports.ɵbf =
|
|
30483
|
-
exports.ɵbg =
|
|
30484
|
-
exports.ɵbh =
|
|
30485
|
-
exports.ɵbi =
|
|
30486
|
-
exports.ɵbj =
|
|
30487
|
-
exports.ɵbk =
|
|
30488
|
-
exports.ɵbl =
|
|
30489
|
-
exports.ɵbm =
|
|
30490
|
-
exports.ɵbn =
|
|
30491
|
-
exports.ɵbo =
|
|
30492
|
-
exports.ɵbp =
|
|
31115
|
+
exports.ɵba = TaxRateCalculationRule;
|
|
31116
|
+
exports.ɵbb = EffectiveTaxRateCalculationRule;
|
|
31117
|
+
exports.ɵbc = TaxAmountCalculationRule;
|
|
31118
|
+
exports.ɵbd = GrossAmountCalculationRule;
|
|
31119
|
+
exports.ɵbe = GrossAmountCalculator;
|
|
31120
|
+
exports.ɵbf = TaxClassificationCalculationRule;
|
|
31121
|
+
exports.ɵbg = TaxCalculationTypeCalculationRule;
|
|
31122
|
+
exports.ɵbh = ManualTaxCalculationRule;
|
|
31123
|
+
exports.ɵbi = OutgoingInvoiceCalculationRulesRegistry;
|
|
31124
|
+
exports.ɵbj = TaxSituationCalculationRule;
|
|
31125
|
+
exports.ɵbk = AssessmentPeriodCalculationRule;
|
|
31126
|
+
exports.ɵbl = SaleOrderCalculationRulesRegistry;
|
|
31127
|
+
exports.ɵbm = PurchaseOrderCalculationRulesRegistry;
|
|
31128
|
+
exports.ɵbn = FocusService;
|
|
31129
|
+
exports.ɵbo = ErpLoteSeriesService;
|
|
31130
|
+
exports.ɵbp = QuantidadeDisponivelDemandaService;
|
|
31131
|
+
exports.ɵbq = EntityService;
|
|
31132
|
+
exports.ɵbr = QuantidadeDisponivelDemandaModule;
|
|
30493
31133
|
exports.ɵc = ErpTributosService;
|
|
30494
31134
|
exports.ɵd = RulesService;
|
|
30495
31135
|
exports.ɵe = StatusRulesRegistry;
|
|
@@ -30506,14 +31146,14 @@
|
|
|
30506
31146
|
exports.ɵp = TaxAmountRequiredValidationRule;
|
|
30507
31147
|
exports.ɵq = TaxSituationRequiredValidationRule;
|
|
30508
31148
|
exports.ɵr = OutgoingInvoiceValidationRulesRegistry;
|
|
30509
|
-
exports.ɵs =
|
|
30510
|
-
exports.ɵt =
|
|
30511
|
-
exports.ɵu =
|
|
30512
|
-
exports.ɵv =
|
|
30513
|
-
exports.ɵw =
|
|
30514
|
-
exports.ɵx =
|
|
30515
|
-
exports.ɵy =
|
|
30516
|
-
exports.ɵz =
|
|
31149
|
+
exports.ɵs = AssessmentPeriodRequiredValidationRule;
|
|
31150
|
+
exports.ɵt = SaleOrderValidationRulesRegistry;
|
|
31151
|
+
exports.ɵu = PurchaseOrderValidationRulesRegistry;
|
|
31152
|
+
exports.ɵv = CalculationRulesRegistry;
|
|
31153
|
+
exports.ɵw = IncomingInvoiceCalculationRulesRegistry;
|
|
31154
|
+
exports.ɵx = TaxableBaseCalculationRule;
|
|
31155
|
+
exports.ɵy = TaxAmountCalculator;
|
|
31156
|
+
exports.ɵz = EffectiveTaxRateCalculator;
|
|
30517
31157
|
|
|
30518
31158
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
30519
31159
|
|