@senior-gestao-empresarial/erpx-components 4.18.0-develop-6fcd6567 → 4.19.0-develop-6b84c27e
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 +60 -56
- 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/rules/calculation/rules/tax-classification-calculation-rule.js +47 -35
- package/esm5/components/tributos/rules/calculation/rules/tax-classification-calculation-rule.js +63 -59
- package/fesm2015/senior-gestao-empresarial-erpx-components.js +45 -33
- package/fesm2015/senior-gestao-empresarial-erpx-components.js.map +1 -1
- package/fesm5/senior-gestao-empresarial-erpx-components.js +61 -57
- 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
|
@@ -3,7 +3,7 @@ import { Input, Component, NgModule, ɵɵdefineInjectable, Injectable, ɵɵinjec
|
|
|
3
3
|
import { CommonModule } from '@angular/common';
|
|
4
4
|
import { BreadcrumbModule as BreadcrumbModule$1 } from 'primeng/breadcrumb';
|
|
5
5
|
import { NavigationEnd, PRIMARY_OUTLET, ActivatedRoute, Router, RouterModule } from '@angular/router';
|
|
6
|
-
import { Subject, combineLatest, throwError } from 'rxjs';
|
|
6
|
+
import { Subject, combineLatest, merge, throwError } from 'rxjs';
|
|
7
7
|
import { takeUntil, filter, startWith, distinctUntilChanged, skip, map, debounceTime, auditTime, scan, first, finalize, catchError } from 'rxjs/operators';
|
|
8
8
|
import { TranslateService, TranslateModule } from '@ngx-translate/core';
|
|
9
9
|
import { EnumLogicalOperator, E027StrLookup, BeneficioFiscalLookup, E027EqiLookup, CplTriNotaSaidaNaturezaReceitaPisCofinsLookup, ClassificacaoTributariaLookup, LookupValidationUtils, ErpLookupsModule, E210DxpLookup, E091PlfLookup, E044CcuLookup } from '@senior-gestao-empresarial/angular-components';
|
|
@@ -1827,23 +1827,24 @@ var TaxClassificationCalculationRule = /** @class */ (function () {
|
|
|
1827
1827
|
var name = _a.name;
|
|
1828
1828
|
return name === EnumTipoTributo.IBS_ESTORNO_CREDITO;
|
|
1829
1829
|
}), ibsEstornoCreditoFormGroup = _c.formGroup, ibsEstornoCreditoFormField = _c.formField;
|
|
1830
|
-
var
|
|
1830
|
+
var classificacaoTributariaDataKey_1 = ibsEstornoCreditoFormField.find(function (_a) {
|
|
1831
1831
|
var name = _a.name;
|
|
1832
1832
|
return name === 'classificacaoTributaria';
|
|
1833
1833
|
}).dataKey;
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
|
|
1834
|
+
var situacaoTributariaDataKey_1 = formField.find(function (field) { return field.name === 'situacaoTributaria'; }).dataKey;
|
|
1835
|
+
merge(ibsEstornoCreditoFormGroup
|
|
1836
|
+
.get('classificacaoTributaria')
|
|
1837
|
+
.valueChanges.pipe(distinctUntilChanged(function (old, current) {
|
|
1838
|
+
return (old === null || old === void 0 ? void 0 : old[classificacaoTributariaDataKey_1]) === (current === null || current === void 0 ? void 0 : current[classificacaoTributariaDataKey_1]);
|
|
1839
|
+
})), formGroup.get('situacaoTributaria').valueChanges.pipe(distinctUntilChanged(function (old, current) {
|
|
1840
|
+
return (old === null || old === void 0 ? void 0 : old[situacaoTributariaDataKey_1]) === (current === null || current === void 0 ? void 0 : current[situacaoTributariaDataKey_1]);
|
|
1841
|
+
}), map(function () { return null; })))
|
|
1842
|
+
.pipe(filter(function (taxClassification) {
|
|
1843
|
+
var _a;
|
|
1844
|
+
return (taxClassification === null || taxClassification === void 0 ? void 0 : taxClassification.id) !== ((_a = formGroup.get('classificacaoTributaria')
|
|
1845
|
+
.value) === null || _a === void 0 ? void 0 : _a.id);
|
|
1844
1846
|
}))
|
|
1845
|
-
.subscribe(function (
|
|
1846
|
-
var _b = __read(_a, 1), taxClassification = _b[0];
|
|
1847
|
+
.subscribe(function (taxClassification) {
|
|
1847
1848
|
formGroup
|
|
1848
1849
|
.get('classificacaoTributaria')
|
|
1849
1850
|
.setValue(taxClassification);
|
|
@@ -1856,23 +1857,24 @@ var TaxClassificationCalculationRule = /** @class */ (function () {
|
|
|
1856
1857
|
var name = _a.name;
|
|
1857
1858
|
return name === EnumTipoTributo.CBS_ESTORNO_CREDITO;
|
|
1858
1859
|
}), cbsEstornoCreditoFormGroup = _d.formGroup, cbsEstornoCreditoFormField = _d.formField;
|
|
1859
|
-
var
|
|
1860
|
+
var classificacaoTributariaDataKey_2 = cbsEstornoCreditoFormField.find(function (_a) {
|
|
1860
1861
|
var name = _a.name;
|
|
1861
1862
|
return name === 'classificacaoTributaria';
|
|
1862
1863
|
}).dataKey;
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1864
|
+
var situacaoTributariaDataKey_2 = formField.find(function (field) { return field.name === 'situacaoTributaria'; }).dataKey;
|
|
1865
|
+
merge(cbsEstornoCreditoFormGroup
|
|
1866
|
+
.get('classificacaoTributaria')
|
|
1867
|
+
.valueChanges.pipe(distinctUntilChanged(function (old, current) {
|
|
1868
|
+
return (old === null || old === void 0 ? void 0 : old[classificacaoTributariaDataKey_2]) === (current === null || current === void 0 ? void 0 : current[classificacaoTributariaDataKey_2]);
|
|
1869
|
+
})), formGroup.get('situacaoTributaria').valueChanges.pipe(distinctUntilChanged(function (old, current) {
|
|
1870
|
+
return (old === null || old === void 0 ? void 0 : old[situacaoTributariaDataKey_2]) === (current === null || current === void 0 ? void 0 : current[situacaoTributariaDataKey_2]);
|
|
1871
|
+
}), map(function () { return null; })))
|
|
1872
|
+
.pipe(filter(function (taxClassification) {
|
|
1873
|
+
var _a;
|
|
1874
|
+
return (taxClassification === null || taxClassification === void 0 ? void 0 : taxClassification.id) !== ((_a = formGroup.get('classificacaoTributaria')
|
|
1875
|
+
.value) === null || _a === void 0 ? void 0 : _a.id);
|
|
1873
1876
|
}))
|
|
1874
|
-
.subscribe(function (
|
|
1875
|
-
var _b = __read(_a, 1), taxClassification = _b[0];
|
|
1877
|
+
.subscribe(function (taxClassification) {
|
|
1876
1878
|
formGroup
|
|
1877
1879
|
.get('classificacaoTributaria')
|
|
1878
1880
|
.setValue(taxClassification);
|
|
@@ -1885,7 +1887,7 @@ var TaxClassificationCalculationRule = /** @class */ (function () {
|
|
|
1885
1887
|
var name = _a.name;
|
|
1886
1888
|
return name === EnumTipoTributo.IBS_AJUSTE;
|
|
1887
1889
|
}), ibsAjusteFormGroup = _e.formGroup, ibsAjusteFormField = _e.formField;
|
|
1888
|
-
var
|
|
1890
|
+
var dataKey_2 = ibsAjusteFormField.find(function (_a) {
|
|
1889
1891
|
var name = _a.name;
|
|
1890
1892
|
return name === 'classificacaoTributaria';
|
|
1891
1893
|
}).dataKey;
|
|
@@ -1893,7 +1895,7 @@ var TaxClassificationCalculationRule = /** @class */ (function () {
|
|
|
1893
1895
|
ibsAjusteFormGroup
|
|
1894
1896
|
.get('classificacaoTributaria')
|
|
1895
1897
|
.valueChanges.pipe(startWith(ibsAjusteFormGroup.get('classificacaoTributaria').value), distinctUntilChanged(function (old, current) {
|
|
1896
|
-
return (old === null || old === void 0 ? void 0 : old[
|
|
1898
|
+
return (old === null || old === void 0 ? void 0 : old[dataKey_2]) === (current === null || current === void 0 ? void 0 : current[dataKey_2]);
|
|
1897
1899
|
}))
|
|
1898
1900
|
])
|
|
1899
1901
|
.pipe(skip(1), map(function (_a) {
|
|
@@ -1914,7 +1916,7 @@ var TaxClassificationCalculationRule = /** @class */ (function () {
|
|
|
1914
1916
|
var name = _a.name;
|
|
1915
1917
|
return name === EnumTipoTributo.CBS_AJUSTE;
|
|
1916
1918
|
}), cbsAjusteFormGroup = _f.formGroup, cbsAjusteFormField = _f.formField;
|
|
1917
|
-
var
|
|
1919
|
+
var dataKey_3 = cbsAjusteFormField.find(function (_a) {
|
|
1918
1920
|
var name = _a.name;
|
|
1919
1921
|
return name === 'classificacaoTributaria';
|
|
1920
1922
|
}).dataKey;
|
|
@@ -1922,7 +1924,7 @@ var TaxClassificationCalculationRule = /** @class */ (function () {
|
|
|
1922
1924
|
cbsAjusteFormGroup
|
|
1923
1925
|
.get('classificacaoTributaria')
|
|
1924
1926
|
.valueChanges.pipe(startWith(cbsAjusteFormGroup.get('classificacaoTributaria').value), distinctUntilChanged(function (old, current) {
|
|
1925
|
-
return (old === null || old === void 0 ? void 0 : old[
|
|
1927
|
+
return (old === null || old === void 0 ? void 0 : old[dataKey_3]) === (current === null || current === void 0 ? void 0 : current[dataKey_3]);
|
|
1926
1928
|
}))
|
|
1927
1929
|
])
|
|
1928
1930
|
.pipe(skip(1), map(function (_a) {
|
|
@@ -1943,23 +1945,24 @@ var TaxClassificationCalculationRule = /** @class */ (function () {
|
|
|
1943
1945
|
var name = _a.name;
|
|
1944
1946
|
return name === EnumTipoTributo.IBS_TRANSFERENCIA_CREDITO;
|
|
1945
1947
|
}), ibsTransferenciaCreditoFormGroup = _g.formGroup, ibsTransferenciaCreditoFormField = _g.formField;
|
|
1946
|
-
var
|
|
1948
|
+
var classificacaoTributariaDataKey_3 = ibsTransferenciaCreditoFormField.find(function (_a) {
|
|
1947
1949
|
var name = _a.name;
|
|
1948
1950
|
return name === 'classificacaoTributaria';
|
|
1949
1951
|
}).dataKey;
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1952
|
+
var situacaoTributariaDataKey_3 = formField.find(function (field) { return field.name === 'situacaoTributaria'; }).dataKey;
|
|
1953
|
+
merge(ibsTransferenciaCreditoFormGroup
|
|
1954
|
+
.get('classificacaoTributaria')
|
|
1955
|
+
.valueChanges.pipe(distinctUntilChanged(function (old, current) {
|
|
1956
|
+
return (old === null || old === void 0 ? void 0 : old[classificacaoTributariaDataKey_3]) === (current === null || current === void 0 ? void 0 : current[classificacaoTributariaDataKey_3]);
|
|
1957
|
+
})), formGroup.get('situacaoTributaria').valueChanges.pipe(distinctUntilChanged(function (old, current) {
|
|
1958
|
+
return (old === null || old === void 0 ? void 0 : old[situacaoTributariaDataKey_3]) === (current === null || current === void 0 ? void 0 : current[situacaoTributariaDataKey_3]);
|
|
1959
|
+
}), map(function () { return null; })))
|
|
1960
|
+
.pipe(filter(function (taxClassification) {
|
|
1961
|
+
var _a;
|
|
1962
|
+
return (taxClassification === null || taxClassification === void 0 ? void 0 : taxClassification.id) !== ((_a = formGroup.get('classificacaoTributaria')
|
|
1963
|
+
.value) === null || _a === void 0 ? void 0 : _a.id);
|
|
1960
1964
|
}))
|
|
1961
|
-
.subscribe(function (
|
|
1962
|
-
var _b = __read(_a, 1), taxClassification = _b[0];
|
|
1965
|
+
.subscribe(function (taxClassification) {
|
|
1963
1966
|
formGroup
|
|
1964
1967
|
.get('classificacaoTributaria')
|
|
1965
1968
|
.setValue(taxClassification);
|
|
@@ -1972,23 +1975,24 @@ var TaxClassificationCalculationRule = /** @class */ (function () {
|
|
|
1972
1975
|
var name = _a.name;
|
|
1973
1976
|
return name === EnumTipoTributo.CBS_TRANSFERENCIA_CREDITO;
|
|
1974
1977
|
}), cbsTransferenciaCreditoFormGroup = _h.formGroup, cbsTransferenciaCreditoFormField = _h.formField;
|
|
1975
|
-
var
|
|
1978
|
+
var classificacaoTributariaDataKey_4 = cbsTransferenciaCreditoFormField.find(function (_a) {
|
|
1976
1979
|
var name = _a.name;
|
|
1977
1980
|
return name === 'classificacaoTributaria';
|
|
1978
1981
|
}).dataKey;
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
|
|
1985
|
-
|
|
1986
|
-
|
|
1987
|
-
|
|
1988
|
-
|
|
1982
|
+
var situacaoTributariaDataKey_4 = formField.find(function (field) { return field.name === 'situacaoTributaria'; }).dataKey;
|
|
1983
|
+
merge(cbsTransferenciaCreditoFormGroup
|
|
1984
|
+
.get('classificacaoTributaria')
|
|
1985
|
+
.valueChanges.pipe(distinctUntilChanged(function (old, current) {
|
|
1986
|
+
return (old === null || old === void 0 ? void 0 : old[classificacaoTributariaDataKey_4]) === (current === null || current === void 0 ? void 0 : current[classificacaoTributariaDataKey_4]);
|
|
1987
|
+
})), formGroup.get('situacaoTributaria').valueChanges.pipe(distinctUntilChanged(function (old, current) {
|
|
1988
|
+
return (old === null || old === void 0 ? void 0 : old[situacaoTributariaDataKey_4]) === (current === null || current === void 0 ? void 0 : current[situacaoTributariaDataKey_4]);
|
|
1989
|
+
}), map(function () { return null; })))
|
|
1990
|
+
.pipe(filter(function (taxClassification) {
|
|
1991
|
+
var _a;
|
|
1992
|
+
return (taxClassification === null || taxClassification === void 0 ? void 0 : taxClassification.id) !== ((_a = formGroup.get('classificacaoTributaria')
|
|
1993
|
+
.value) === null || _a === void 0 ? void 0 : _a.id);
|
|
1989
1994
|
}))
|
|
1990
|
-
.subscribe(function (
|
|
1991
|
-
var _b = __read(_a, 1), taxClassification = _b[0];
|
|
1995
|
+
.subscribe(function (taxClassification) {
|
|
1992
1996
|
formGroup
|
|
1993
1997
|
.get('classificacaoTributaria')
|
|
1994
1998
|
.setValue(taxClassification);
|