@senior-gestao-empresarial/erpx-components 3.22.0 → 3.23.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 +1101 -337
- 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 +2 -1
- package/components/tributos/erp-tributos.types.d.ts +8 -2
- package/components/tributos/rules/calculation/calculation-rules.registry.d.ts +3 -1
- package/components/tributos/rules/calculation/tax-classification-calculation-rule.d.ts +6 -0
- package/components/tributos/rules/calculation/taxable-base-calculation-rule.d.ts +1 -1
- package/components/tributos/rules/rules.service.d.ts +2 -1
- package/components/tributos/rules/types/document-type-field-mapping.d.ts +12 -12
- package/components/tributos/rules/types/rule-payload.d.ts +1 -0
- package/components/tributos/rules/validation/required/net-amount-application-validation-rule.d.ts +6 -0
- package/components/tributos/rules/validation/validation-rules.registry.d.ts +3 -1
- package/components/tributos/tax-reform-utilities.d.ts +8 -4
- package/esm2015/components/tributos/erp-tributos.component.js +89 -62
- package/esm2015/components/tributos/erp-tributos.types.js +10 -3
- package/esm2015/components/tributos/rules/calculation/calculation-rules.registry.js +86 -42
- package/esm2015/components/tributos/rules/calculation/tax-amount-calculation-rule.js +13 -26
- package/esm2015/components/tributos/rules/calculation/tax-classification-calculation-rule.js +48 -0
- package/esm2015/components/tributos/rules/calculation/taxable-base-calculation-rule.js +36 -5
- package/esm2015/components/tributos/rules/rules.service.js +11 -11
- package/esm2015/components/tributos/rules/status/status-rules.registry.js +13 -1
- package/esm2015/components/tributos/rules/status/tax-classification-status-rule.js +5 -30
- package/esm2015/components/tributos/rules/types/document-type-field-mapping.js +35 -23
- package/esm2015/components/tributos/rules/types/rule-payload.js +1 -1
- package/esm2015/components/tributos/rules/validation/required/net-amount-application-validation-rule.js +69 -0
- package/esm2015/components/tributos/rules/validation/required/tax-amount-required-validation-rule.js +117 -15
- package/esm2015/components/tributos/rules/validation/required/tax-classification-required-validation-rule.js +72 -15
- package/esm2015/components/tributos/rules/validation/required/tax-rate-required-validation-rule.js +130 -27
- package/esm2015/components/tributos/rules/validation/required/tax-situation-required-validation-rule.js +16 -14
- package/esm2015/components/tributos/rules/validation/required/taxable-base-required-validation-rule.js +119 -16
- package/esm2015/components/tributos/rules/validation/validation-rules.registry.js +194 -30
- package/esm2015/components/tributos/tax-reform-utilities.js +15 -11
- package/esm2015/senior-gestao-empresarial-erpx-components.js +17 -15
- package/esm5/components/tributos/erp-tributos.component.js +93 -65
- package/esm5/components/tributos/erp-tributos.types.js +10 -3
- package/esm5/components/tributos/rules/calculation/calculation-rules.registry.js +86 -42
- package/esm5/components/tributos/rules/calculation/tax-amount-calculation-rule.js +15 -28
- package/esm5/components/tributos/rules/calculation/tax-classification-calculation-rule.js +51 -0
- package/esm5/components/tributos/rules/calculation/taxable-base-calculation-rule.js +39 -5
- package/esm5/components/tributos/rules/rules.service.js +11 -11
- package/esm5/components/tributos/rules/status/status-rules.registry.js +13 -1
- package/esm5/components/tributos/rules/status/tax-classification-status-rule.js +5 -34
- package/esm5/components/tributos/rules/types/document-type-field-mapping.js +35 -23
- package/esm5/components/tributos/rules/types/rule-payload.js +1 -1
- package/esm5/components/tributos/rules/validation/required/net-amount-application-validation-rule.js +76 -0
- package/esm5/components/tributos/rules/validation/required/tax-amount-required-validation-rule.js +125 -15
- package/esm5/components/tributos/rules/validation/required/tax-classification-required-validation-rule.js +76 -15
- package/esm5/components/tributos/rules/validation/required/tax-rate-required-validation-rule.js +142 -27
- package/esm5/components/tributos/rules/validation/required/tax-situation-required-validation-rule.js +16 -14
- package/esm5/components/tributos/rules/validation/required/taxable-base-required-validation-rule.js +131 -16
- package/esm5/components/tributos/rules/validation/validation-rules.registry.js +194 -30
- package/esm5/components/tributos/tax-reform-utilities.js +16 -11
- package/esm5/senior-gestao-empresarial-erpx-components.js +17 -15
- package/fesm2015/senior-gestao-empresarial-erpx-components.js +1028 -313
- package/fesm2015/senior-gestao-empresarial-erpx-components.js.map +1 -1
- package/fesm5/senior-gestao-empresarial-erpx-components.js +1085 -323
- package/fesm5/senior-gestao-empresarial-erpx-components.js.map +1 -1
- package/package.json +1 -1
- package/senior-gestao-empresarial-erpx-components.d.ts +16 -14
- package/senior-gestao-empresarial-erpx-components.metadata.json +1 -1
|
@@ -586,7 +586,7 @@
|
|
|
586
586
|
EnumCampoTributo["ClassificacaoTributaria"] = "classificacao_tributaria";
|
|
587
587
|
EnumCampoTributo["CstDesoneracao"] = "cst_desoneracao";
|
|
588
588
|
EnumCampoTributo["ClassificacaoTributariaDesoneracao"] = "classificacao_tributaria_desoneracao";
|
|
589
|
-
EnumCampoTributo["
|
|
589
|
+
EnumCampoTributo["AplicarValorLiquidoDocumento"] = "AplicarValorLiquidoDocumento";
|
|
590
590
|
EnumCampoTributo["ClassificacaoTributariaCreditoPresumido"] = "classificacao_tributaria_credito_presumido";
|
|
591
591
|
})(exports.EnumCampoTributo || (exports.EnumCampoTributo = {}));
|
|
592
592
|
|
|
@@ -595,6 +595,7 @@
|
|
|
595
595
|
EnumGrupoTributo["IBS_ESTADUAL"] = "ibs_estadual";
|
|
596
596
|
EnumGrupoTributo["IBS_MUNICIPAL"] = "ibs_municipal";
|
|
597
597
|
EnumGrupoTributo["IBS_MUNICIPAL_DIFERIDO"] = "ibs_municipal_diferido";
|
|
598
|
+
EnumGrupoTributo["IBS_CREDITO_PRESUMIDO"] = "ibs_credito_presumido";
|
|
598
599
|
EnumGrupoTributo["IS"] = "is";
|
|
599
600
|
EnumGrupoTributo["ICMS"] = "icms";
|
|
600
601
|
EnumGrupoTributo["ICMS_ST"] = "icms_st";
|
|
@@ -615,7 +616,6 @@
|
|
|
615
616
|
EnumTipoTributo["CBS_CREDITO_PRESUMIDO"] = "CBS_CREDITO_PRESUMIDO";
|
|
616
617
|
EnumTipoTributo["CBS_TRIBUTACAO_REGULAR"] = "CBS_TRIBUTACAO_REGULAR";
|
|
617
618
|
EnumTipoTributo["CBS_GOVERNAMENTAL"] = "CBS_GOVERNAMENTAL";
|
|
618
|
-
EnumTipoTributo["IBS_ESTADUAL_CREDITO_PRESUMIDO"] = "IBS_ESTADUAL_CREDITO_PRESUMIDO";
|
|
619
619
|
EnumTipoTributo["IBS_ESTADUAL"] = "IBS_ESTADUAL";
|
|
620
620
|
EnumTipoTributo["IBS_ESTADUAL_DIFERIDO"] = "IBS_ESTADUAL_DIFERIDO";
|
|
621
621
|
EnumTipoTributo["IBS_ESTADUAL_TRIBUTACAO_REGULAR"] = "IBS_ESTADUAL_TRIBUTACAO_REGULAR";
|
|
@@ -624,6 +624,7 @@
|
|
|
624
624
|
EnumTipoTributo["IBS_MUNICIPAL_DIFERIDO"] = "IBS_MUNICIPAL_DIFERIDO";
|
|
625
625
|
EnumTipoTributo["IBS_MUNICIPAL_TRIBUTACAO_REGULAR"] = "IBS_MUNICIPAL_TRIBUTACAO_REGULAR";
|
|
626
626
|
EnumTipoTributo["IBS_MUNICIPAL_GOVERNAMENTAL"] = "IBS_MUNICIPAL_GOVERNAMENTAL";
|
|
627
|
+
EnumTipoTributo["IBS_CREDITO_PRESUMIDO"] = "IBS_CREDITO_PRESUMIDO";
|
|
627
628
|
EnumTipoTributo["IS"] = "IS";
|
|
628
629
|
EnumTipoTributo["PIS_FATURAMENTO"] = "PIS_FATURAMENTO";
|
|
629
630
|
EnumTipoTributo["PIS_RECUPERAR"] = "PIS_RECUPERAR";
|
|
@@ -800,6 +801,12 @@
|
|
|
800
801
|
EnumSituacao["VINATIVO"] = "VINATIVO";
|
|
801
802
|
})(exports.EnumSituacao || (exports.EnumSituacao = {}));
|
|
802
803
|
|
|
804
|
+
(function (EnumAplicarValorLiquidoDocumento) {
|
|
805
|
+
EnumAplicarValorLiquidoDocumento["SOMAR"] = "SOMAR";
|
|
806
|
+
EnumAplicarValorLiquidoDocumento["SUBTRAIR"] = "SUBTRAIR";
|
|
807
|
+
EnumAplicarValorLiquidoDocumento["NENHUM"] = "NENHUM";
|
|
808
|
+
})(exports.EnumAplicarValorLiquidoDocumento || (exports.EnumAplicarValorLiquidoDocumento = {}));
|
|
809
|
+
|
|
803
810
|
var isTaxFromTaxReform = function (tax) {
|
|
804
811
|
return (tax === exports.EnumTipoTributo.IS ||
|
|
805
812
|
tax === exports.EnumTipoTributo.CBS ||
|
|
@@ -808,25 +815,27 @@
|
|
|
808
815
|
tax === exports.EnumTipoTributo.CBS_TRIBUTACAO_REGULAR ||
|
|
809
816
|
tax === exports.EnumTipoTributo.CBS_GOVERNAMENTAL ||
|
|
810
817
|
tax === exports.EnumTipoTributo.IBS_ESTADUAL ||
|
|
811
|
-
tax === exports.EnumTipoTributo.IBS_ESTADUAL_CREDITO_PRESUMIDO ||
|
|
812
818
|
tax === exports.EnumTipoTributo.IBS_ESTADUAL_DIFERIDO ||
|
|
813
819
|
tax === exports.EnumTipoTributo.IBS_ESTADUAL_TRIBUTACAO_REGULAR ||
|
|
814
820
|
tax === exports.EnumTipoTributo.IBS_ESTADUAL_GOVERNAMENTAL ||
|
|
815
821
|
tax === exports.EnumTipoTributo.IBS_MUNICIPAL ||
|
|
816
822
|
tax === exports.EnumTipoTributo.IBS_MUNICIPAL_DIFERIDO ||
|
|
817
823
|
tax === exports.EnumTipoTributo.IBS_MUNICIPAL_TRIBUTACAO_REGULAR ||
|
|
818
|
-
tax === exports.EnumTipoTributo.IBS_MUNICIPAL_GOVERNAMENTAL
|
|
824
|
+
tax === exports.EnumTipoTributo.IBS_MUNICIPAL_GOVERNAMENTAL ||
|
|
825
|
+
tax === exports.EnumTipoTributo.IBS_CREDITO_PRESUMIDO);
|
|
819
826
|
};
|
|
820
827
|
var getBaseTaxByGroupTax = function (groupTax) {
|
|
821
828
|
switch (groupTax) {
|
|
822
|
-
case exports.EnumGrupoTributo.IS:
|
|
823
|
-
return exports.EnumTipoTributo.IS;
|
|
824
829
|
case exports.EnumGrupoTributo.CBS:
|
|
825
830
|
return exports.EnumTipoTributo.CBS;
|
|
826
831
|
case exports.EnumGrupoTributo.IBS_ESTADUAL:
|
|
827
832
|
return exports.EnumTipoTributo.IBS_ESTADUAL;
|
|
828
833
|
case exports.EnumGrupoTributo.IBS_MUNICIPAL:
|
|
829
834
|
return exports.EnumTipoTributo.IBS_MUNICIPAL;
|
|
835
|
+
case exports.EnumGrupoTributo.IBS_CREDITO_PRESUMIDO:
|
|
836
|
+
return exports.EnumTipoTributo.IBS_CREDITO_PRESUMIDO;
|
|
837
|
+
case exports.EnumGrupoTributo.IS:
|
|
838
|
+
return exports.EnumTipoTributo.IS;
|
|
830
839
|
default:
|
|
831
840
|
return null;
|
|
832
841
|
}
|
|
@@ -862,8 +871,6 @@
|
|
|
862
871
|
switch (tax) {
|
|
863
872
|
case exports.EnumTipoTributo.CBS:
|
|
864
873
|
return exports.EnumTipoTributo.CBS_CREDITO_PRESUMIDO;
|
|
865
|
-
case exports.EnumTipoTributo.IBS_ESTADUAL:
|
|
866
|
-
return exports.EnumTipoTributo.IBS_ESTADUAL_CREDITO_PRESUMIDO;
|
|
867
874
|
default:
|
|
868
875
|
return null;
|
|
869
876
|
}
|
|
@@ -900,7 +907,6 @@
|
|
|
900
907
|
case exports.EnumTipoTributo.CBS_TRIBUTACAO_REGULAR:
|
|
901
908
|
return exports.EnumTipoTributo.CBS_TRIBUTACAO_REGULAR;
|
|
902
909
|
case exports.EnumTipoTributo.IBS_ESTADUAL:
|
|
903
|
-
case exports.EnumTipoTributo.IBS_ESTADUAL_CREDITO_PRESUMIDO:
|
|
904
910
|
case exports.EnumTipoTributo.IBS_ESTADUAL_TRIBUTACAO_REGULAR:
|
|
905
911
|
case exports.EnumTipoTributo.IBS_ESTADUAL_DIFERIDO:
|
|
906
912
|
return exports.EnumTipoTributo.CBS_TRIBUTACAO_REGULAR;
|
|
@@ -921,13 +927,14 @@
|
|
|
921
927
|
return exports.EnumTipoTributo.CBS;
|
|
922
928
|
case exports.EnumTipoTributo.IBS_ESTADUAL:
|
|
923
929
|
case exports.EnumTipoTributo.IBS_ESTADUAL_DIFERIDO:
|
|
924
|
-
case exports.EnumTipoTributo.IBS_ESTADUAL_CREDITO_PRESUMIDO:
|
|
925
930
|
case exports.EnumTipoTributo.IBS_ESTADUAL_TRIBUTACAO_REGULAR:
|
|
926
931
|
return exports.EnumTipoTributo.IBS_ESTADUAL;
|
|
927
932
|
case exports.EnumTipoTributo.IBS_MUNICIPAL:
|
|
928
933
|
case exports.EnumTipoTributo.IBS_MUNICIPAL_DIFERIDO:
|
|
929
934
|
case exports.EnumTipoTributo.IBS_MUNICIPAL_TRIBUTACAO_REGULAR:
|
|
930
935
|
return exports.EnumTipoTributo.IBS_MUNICIPAL;
|
|
936
|
+
case exports.EnumTipoTributo.IBS_CREDITO_PRESUMIDO:
|
|
937
|
+
return exports.EnumTipoTributo.IBS_CREDITO_PRESUMIDO;
|
|
931
938
|
default:
|
|
932
939
|
return null;
|
|
933
940
|
}
|
|
@@ -941,13 +948,14 @@
|
|
|
941
948
|
return exports.EnumTipoTributo.CBS_TRIBUTACAO_REGULAR;
|
|
942
949
|
case exports.EnumTipoTributo.IBS_ESTADUAL:
|
|
943
950
|
case exports.EnumTipoTributo.IBS_ESTADUAL_DIFERIDO:
|
|
944
|
-
case exports.EnumTipoTributo.IBS_ESTADUAL_CREDITO_PRESUMIDO:
|
|
945
951
|
case exports.EnumTipoTributo.IBS_ESTADUAL_TRIBUTACAO_REGULAR:
|
|
946
952
|
return exports.EnumTipoTributo.IBS_ESTADUAL_TRIBUTACAO_REGULAR;
|
|
947
953
|
case exports.EnumTipoTributo.IBS_MUNICIPAL:
|
|
948
954
|
case exports.EnumTipoTributo.IBS_MUNICIPAL_DIFERIDO:
|
|
949
955
|
case exports.EnumTipoTributo.IBS_MUNICIPAL_TRIBUTACAO_REGULAR:
|
|
950
956
|
return exports.EnumTipoTributo.IBS_MUNICIPAL_TRIBUTACAO_REGULAR;
|
|
957
|
+
case exports.EnumTipoTributo.IBS_CREDITO_PRESUMIDO:
|
|
958
|
+
return exports.EnumTipoTributo.IBS_CREDITO_PRESUMIDO;
|
|
951
959
|
default:
|
|
952
960
|
return null;
|
|
953
961
|
}
|
|
@@ -975,7 +983,7 @@
|
|
|
975
983
|
var isPresumedCreditTax = function (tax) {
|
|
976
984
|
switch (tax) {
|
|
977
985
|
case exports.EnumTipoTributo.CBS_CREDITO_PRESUMIDO:
|
|
978
|
-
case exports.EnumTipoTributo.
|
|
986
|
+
case exports.EnumTipoTributo.IBS_CREDITO_PRESUMIDO:
|
|
979
987
|
return true;
|
|
980
988
|
default:
|
|
981
989
|
return false;
|
|
@@ -1001,6 +1009,10 @@
|
|
|
1001
1009
|
return false;
|
|
1002
1010
|
}
|
|
1003
1011
|
};
|
|
1012
|
+
var getGroupByGroupTax = function (_a) {
|
|
1013
|
+
var groups = _a.groups, groupTax = _a.groupTax;
|
|
1014
|
+
return groups.find(function (group) { return group.grupoTributo === groupTax; });
|
|
1015
|
+
};
|
|
1004
1016
|
var getBaseTaxItemFromGroup = function (_a) {
|
|
1005
1017
|
var group = _a.group;
|
|
1006
1018
|
var baseTax = getBaseTaxByGroupTax(group.grupoTributo);
|
|
@@ -1360,10 +1372,10 @@
|
|
|
1360
1372
|
case exports.EnumTipoTributo.IBS_ESTADUAL_DIFERIDO:
|
|
1361
1373
|
case exports.EnumTipoTributo.IBS_MUNICIPAL_DIFERIDO:
|
|
1362
1374
|
case exports.EnumTipoTributo.CBS_CREDITO_PRESUMIDO:
|
|
1363
|
-
case exports.EnumTipoTributo.IBS_ESTADUAL_CREDITO_PRESUMIDO:
|
|
1364
1375
|
case exports.EnumTipoTributo.CBS_TRIBUTACAO_REGULAR:
|
|
1365
1376
|
case exports.EnumTipoTributo.IBS_ESTADUAL_TRIBUTACAO_REGULAR:
|
|
1366
1377
|
case exports.EnumTipoTributo.IBS_MUNICIPAL_TRIBUTACAO_REGULAR:
|
|
1378
|
+
case exports.EnumTipoTributo.IBS_CREDITO_PRESUMIDO:
|
|
1367
1379
|
case exports.EnumTipoTributo.IS:
|
|
1368
1380
|
{
|
|
1369
1381
|
switch (documentType) {
|
|
@@ -1399,7 +1411,7 @@
|
|
|
1399
1411
|
}
|
|
1400
1412
|
break;
|
|
1401
1413
|
default:
|
|
1402
|
-
|
|
1414
|
+
throw new Error("Regra TaxAmountCalculationRule n\u00E3o implementada para o imposto " + taxType + ", documento " + documentType + ".");
|
|
1403
1415
|
}
|
|
1404
1416
|
}
|
|
1405
1417
|
break;
|
|
@@ -1413,37 +1425,24 @@
|
|
|
1413
1425
|
case exports.EnumTipoDocumento.PEDIDO_COMPRA:
|
|
1414
1426
|
case exports.EnumTipoDocumento.PEDIDO_VENDA:
|
|
1415
1427
|
{
|
|
1416
|
-
var baseTaxFormGroup = getBaseTaxItemFromGroup({ group: group }).formGroup;
|
|
1417
1428
|
rxjs.combineLatest([
|
|
1418
|
-
|
|
1429
|
+
formGroup
|
|
1419
1430
|
.get('baseCalculo')
|
|
1420
|
-
.valueChanges.pipe(operators.startWith(
|
|
1421
|
-
|
|
1431
|
+
.valueChanges.pipe(operators.startWith(formGroup.get('baseCalculo').value), operators.distinctUntilChanged()),
|
|
1432
|
+
formGroup
|
|
1422
1433
|
.get('aliquota')
|
|
1423
|
-
.valueChanges.pipe(operators.startWith(
|
|
1424
|
-
baseTaxFormGroup
|
|
1425
|
-
.get('reducaoAliquota')
|
|
1426
|
-
.valueChanges.pipe(operators.startWith(baseTaxFormGroup.get('reducaoAliquota').value), operators.distinctUntilChanged()),
|
|
1427
|
-
baseTaxFormGroup
|
|
1428
|
-
.get('reducaoAliquotaGovernamental')
|
|
1429
|
-
.valueChanges.pipe(operators.startWith(baseTaxFormGroup.get('reducaoAliquotaGovernamental').value), operators.distinctUntilChanged())
|
|
1434
|
+
.valueChanges.pipe(operators.startWith(formGroup.get('aliquota').value), operators.distinctUntilChanged())
|
|
1430
1435
|
])
|
|
1431
1436
|
.pipe(operators.skip(1), operators.map(function (_a) {
|
|
1432
|
-
var _b = __read(_a,
|
|
1433
|
-
return [
|
|
1434
|
-
new BigNumber(baseTaxTaxableBase),
|
|
1435
|
-
new BigNumber(baseTaxTaxRate),
|
|
1436
|
-
new BigNumber(baseTaxTaxRateReduction),
|
|
1437
|
-
new BigNumber(governamentalTaxRateReduction)
|
|
1438
|
-
];
|
|
1437
|
+
var _b = __read(_a, 2), taxableBase = _b[0], taxRate = _b[1];
|
|
1438
|
+
return [new BigNumber(taxableBase), new BigNumber(taxRate)];
|
|
1439
1439
|
}), operators.map(function (_a) {
|
|
1440
|
-
var _b = __read(_a,
|
|
1441
|
-
if (
|
|
1440
|
+
var _b = __read(_a, 2), taxableBase = _b[0], taxRate = _b[1];
|
|
1441
|
+
if (taxableBase.isNaN() || taxRate.isNaN())
|
|
1442
1442
|
return null;
|
|
1443
|
-
var taxAmount = _this.taxAmountCalculator.
|
|
1444
|
-
|
|
1445
|
-
taxRate:
|
|
1446
|
-
taxRateReduction: baseTaxTaxRateReduction
|
|
1443
|
+
var taxAmount = _this.taxAmountCalculator.calculateTaxAmount({
|
|
1444
|
+
taxableBase: taxableBase,
|
|
1445
|
+
taxRate: taxRate
|
|
1447
1446
|
});
|
|
1448
1447
|
return taxAmount.decimalPlaces(2).toNumber();
|
|
1449
1448
|
}), operators.filter(function (taxAmount) { return taxAmount !== formGroup.get('valor').value; }))
|
|
@@ -1550,7 +1549,7 @@
|
|
|
1550
1549
|
}
|
|
1551
1550
|
TaxableBaseCalculationRule.prototype.apply = function (_a) {
|
|
1552
1551
|
var _this = this;
|
|
1553
|
-
var documentType = _a.documentType, group = _a.group, _b = _a.item, taxType = _b.name, formGroup = _b.formGroup;
|
|
1552
|
+
var documentType = _a.documentType, groups = _a.groups, group = _a.group, _b = _a.item, taxType = _b.name, formGroup = _b.formGroup;
|
|
1554
1553
|
switch (taxType) {
|
|
1555
1554
|
case exports.EnumTipoTributo.CBS_DIFERIDO:
|
|
1556
1555
|
case exports.EnumTipoTributo.IBS_ESTADUAL_DIFERIDO:
|
|
@@ -1606,7 +1605,6 @@
|
|
|
1606
1605
|
}
|
|
1607
1606
|
break;
|
|
1608
1607
|
case exports.EnumTipoTributo.CBS_CREDITO_PRESUMIDO:
|
|
1609
|
-
case exports.EnumTipoTributo.IBS_ESTADUAL_CREDITO_PRESUMIDO:
|
|
1610
1608
|
{
|
|
1611
1609
|
switch (documentType) {
|
|
1612
1610
|
case exports.EnumTipoDocumento.NF_ENTRADA:
|
|
@@ -1714,6 +1712,41 @@
|
|
|
1714
1712
|
}
|
|
1715
1713
|
}
|
|
1716
1714
|
break;
|
|
1715
|
+
case exports.EnumTipoTributo.IBS_CREDITO_PRESUMIDO:
|
|
1716
|
+
{
|
|
1717
|
+
switch (documentType) {
|
|
1718
|
+
case exports.EnumTipoDocumento.NF_ENTRADA:
|
|
1719
|
+
case exports.EnumTipoDocumento.NF_SAIDA:
|
|
1720
|
+
case exports.EnumTipoDocumento.PEDIDO_COMPRA:
|
|
1721
|
+
case exports.EnumTipoDocumento.PEDIDO_VENDA:
|
|
1722
|
+
{
|
|
1723
|
+
rxjs.combineLatest([formGroup.get('aliquota').valueChanges.pipe(operators.startWith(formGroup.get('aliquota').value))])
|
|
1724
|
+
.pipe(operators.skip(1), operators.filter(function () { return new BigNumber(formGroup.get('baseCalculo').value).isNaN(); }), operators.map(function (_a) {
|
|
1725
|
+
var _b = __read(_a, 1), taxRate = _b[0];
|
|
1726
|
+
return [new BigNumber(taxRate)];
|
|
1727
|
+
}), operators.map(function () {
|
|
1728
|
+
var taxableBase = [exports.EnumGrupoTributo.IBS_ESTADUAL, exports.EnumGrupoTributo.IBS_MUNICIPAL]
|
|
1729
|
+
.map(function (groupTax) {
|
|
1730
|
+
var _a;
|
|
1731
|
+
var group = getGroupByGroupTax({ groups: groups, groupTax: groupTax });
|
|
1732
|
+
if (!group)
|
|
1733
|
+
return new BigNumber(0);
|
|
1734
|
+
var formGroup = getBaseTaxItemFromGroup({ group: group }).formGroup;
|
|
1735
|
+
return new BigNumber((_a = formGroup.get('valor').value) !== null && _a !== void 0 ? _a : 0);
|
|
1736
|
+
})
|
|
1737
|
+
.reduce(function (acc, val) { return acc.plus(val); }, new BigNumber(0));
|
|
1738
|
+
return taxableBase.decimalPlaces(2).toNumber();
|
|
1739
|
+
}), operators.filter(function (taxableBase) { return taxableBase !== formGroup.get('baseCalculo').value; }))
|
|
1740
|
+
.subscribe(function (taxableBase) {
|
|
1741
|
+
formGroup.get('baseCalculo').setValue(taxableBase);
|
|
1742
|
+
});
|
|
1743
|
+
}
|
|
1744
|
+
break;
|
|
1745
|
+
default:
|
|
1746
|
+
throw new Error("Regra TaxableBaseCalculationRule n\u00E3o implementada para o imposto " + taxType + ", documento " + documentType + ".");
|
|
1747
|
+
}
|
|
1748
|
+
}
|
|
1749
|
+
break;
|
|
1717
1750
|
default:
|
|
1718
1751
|
throw new Error("Regra TaxableBaseCalculationRule n\u00E3o implementada para o imposto " + taxType + ", documento " + documentType + ".");
|
|
1719
1752
|
}
|
|
@@ -1728,14 +1761,59 @@
|
|
|
1728
1761
|
return TaxableBaseCalculationRule;
|
|
1729
1762
|
}());
|
|
1730
1763
|
|
|
1764
|
+
var TaxClassificationCalculationRule = /** @class */ (function () {
|
|
1765
|
+
function TaxClassificationCalculationRule() {
|
|
1766
|
+
}
|
|
1767
|
+
TaxClassificationCalculationRule.prototype.apply = function (_a) {
|
|
1768
|
+
var documentType = _a.documentType, _b = _a.item, taxType = _b.name, formGroup = _b.formGroup, formField = _b.formField;
|
|
1769
|
+
switch (taxType) {
|
|
1770
|
+
case exports.EnumTipoTributo.CBS:
|
|
1771
|
+
case exports.EnumTipoTributo.IBS_ESTADUAL:
|
|
1772
|
+
case exports.EnumTipoTributo.IBS_MUNICIPAL:
|
|
1773
|
+
case exports.EnumTipoTributo.IBS_CREDITO_PRESUMIDO:
|
|
1774
|
+
case exports.EnumTipoTributo.IS:
|
|
1775
|
+
{
|
|
1776
|
+
switch (documentType) {
|
|
1777
|
+
case exports.EnumTipoDocumento.NF_ENTRADA:
|
|
1778
|
+
case exports.EnumTipoDocumento.NF_SAIDA:
|
|
1779
|
+
case exports.EnumTipoDocumento.PEDIDO_COMPRA:
|
|
1780
|
+
case exports.EnumTipoDocumento.PEDIDO_VENDA:
|
|
1781
|
+
{
|
|
1782
|
+
var dataKey_1 = formField.find(function (field) { return field.name === 'situacaoTributaria'; }).dataKey;
|
|
1783
|
+
rxjs.combineLatest([
|
|
1784
|
+
formGroup.get('situacaoTributaria').valueChanges.pipe(operators.startWith(formGroup.get('situacaoTributaria').value), operators.distinctUntilChanged(function (old, current) { return (old === null || old === void 0 ? void 0 : old[dataKey_1]) === (current === null || current === void 0 ? void 0 : current[dataKey_1]); }))
|
|
1785
|
+
])
|
|
1786
|
+
.pipe(operators.skip(1), operators.map(function () { return null; }), operators.filter(function (taxClassification) { var _a; return (taxClassification === null || taxClassification === void 0 ? void 0 : taxClassification.id) !== ((_a = formGroup.get('classificacaoTributaria').value) === null || _a === void 0 ? void 0 : _a.id); }))
|
|
1787
|
+
.subscribe(function (taxClassification) {
|
|
1788
|
+
formGroup.get('classificacaoTributaria').setValue(taxClassification);
|
|
1789
|
+
});
|
|
1790
|
+
}
|
|
1791
|
+
break;
|
|
1792
|
+
default:
|
|
1793
|
+
throw new Error("Regra TaxClassificationCalculationRule n\u00E3o implementada para o imposto " + taxType + ", documento " + documentType + ".");
|
|
1794
|
+
}
|
|
1795
|
+
}
|
|
1796
|
+
break;
|
|
1797
|
+
default:
|
|
1798
|
+
throw new Error("Regra TaxClassificationCalculationRule n\u00E3o implementada para o imposto " + taxType + ", documento " + documentType + ".");
|
|
1799
|
+
}
|
|
1800
|
+
};
|
|
1801
|
+
TaxClassificationCalculationRule.ɵprov = core.ɵɵdefineInjectable({ factory: function TaxClassificationCalculationRule_Factory() { return new TaxClassificationCalculationRule(); }, token: TaxClassificationCalculationRule, providedIn: "root" });
|
|
1802
|
+
TaxClassificationCalculationRule = __decorate([
|
|
1803
|
+
core.Injectable({ providedIn: 'root' })
|
|
1804
|
+
], TaxClassificationCalculationRule);
|
|
1805
|
+
return TaxClassificationCalculationRule;
|
|
1806
|
+
}());
|
|
1807
|
+
|
|
1731
1808
|
var CalculationRulesRegistry = /** @class */ (function () {
|
|
1732
|
-
function CalculationRulesRegistry(taxableBaseCalculationRule, taxRateCalculationRule, effectiveTaxRateCalculationRule, taxAmountCalculationRule, grossAmountCalculationRule) {
|
|
1809
|
+
function CalculationRulesRegistry(taxableBaseCalculationRule, taxRateCalculationRule, effectiveTaxRateCalculationRule, taxAmountCalculationRule, grossAmountCalculationRule, taxClassificationCalculationRule) {
|
|
1733
1810
|
var _a, _b, _c, _d, _e;
|
|
1734
1811
|
this.taxableBaseCalculationRule = taxableBaseCalculationRule;
|
|
1735
1812
|
this.taxRateCalculationRule = taxRateCalculationRule;
|
|
1736
1813
|
this.effectiveTaxRateCalculationRule = effectiveTaxRateCalculationRule;
|
|
1737
1814
|
this.taxAmountCalculationRule = taxAmountCalculationRule;
|
|
1738
1815
|
this.grossAmountCalculationRule = grossAmountCalculationRule;
|
|
1816
|
+
this.taxClassificationCalculationRule = taxClassificationCalculationRule;
|
|
1739
1817
|
this.strategies = (_a = {},
|
|
1740
1818
|
_a[exports.EnumTipoDocumento.NF_ENTRADA] = (_b = {},
|
|
1741
1819
|
_b[exports.EnumTipoTributo.CBS] = [
|
|
@@ -1750,6 +1828,10 @@
|
|
|
1750
1828
|
{
|
|
1751
1829
|
field: exports.EnumCampoTributo.Valor,
|
|
1752
1830
|
rule: this.taxAmountCalculationRule
|
|
1831
|
+
},
|
|
1832
|
+
{
|
|
1833
|
+
field: exports.EnumCampoTributo.ClassificacaoTributaria,
|
|
1834
|
+
rule: this.taxClassificationCalculationRule
|
|
1753
1835
|
}
|
|
1754
1836
|
],
|
|
1755
1837
|
_b[exports.EnumTipoTributo.CBS_DIFERIDO] = [
|
|
@@ -1808,19 +1890,13 @@
|
|
|
1808
1890
|
{
|
|
1809
1891
|
field: exports.EnumCampoTributo.Valor,
|
|
1810
1892
|
rule: this.taxAmountCalculationRule
|
|
1811
|
-
}
|
|
1812
|
-
],
|
|
1813
|
-
_b[exports.EnumTipoTributo.IBS_ESTADUAL_DIFERIDO] = [
|
|
1814
|
-
{
|
|
1815
|
-
field: exports.EnumCampoTributo.BaseCalculo,
|
|
1816
|
-
rule: this.taxableBaseCalculationRule
|
|
1817
1893
|
},
|
|
1818
1894
|
{
|
|
1819
|
-
field: exports.EnumCampoTributo.
|
|
1820
|
-
rule: this.
|
|
1895
|
+
field: exports.EnumCampoTributo.ClassificacaoTributaria,
|
|
1896
|
+
rule: this.taxClassificationCalculationRule
|
|
1821
1897
|
}
|
|
1822
1898
|
],
|
|
1823
|
-
_b[exports.EnumTipoTributo.
|
|
1899
|
+
_b[exports.EnumTipoTributo.IBS_ESTADUAL_DIFERIDO] = [
|
|
1824
1900
|
{
|
|
1825
1901
|
field: exports.EnumCampoTributo.BaseCalculo,
|
|
1826
1902
|
rule: this.taxableBaseCalculationRule
|
|
@@ -1866,6 +1942,10 @@
|
|
|
1866
1942
|
{
|
|
1867
1943
|
field: exports.EnumCampoTributo.Valor,
|
|
1868
1944
|
rule: this.taxAmountCalculationRule
|
|
1945
|
+
},
|
|
1946
|
+
{
|
|
1947
|
+
field: exports.EnumCampoTributo.ClassificacaoTributaria,
|
|
1948
|
+
rule: this.taxClassificationCalculationRule
|
|
1869
1949
|
}
|
|
1870
1950
|
],
|
|
1871
1951
|
_b[exports.EnumTipoTributo.IBS_MUNICIPAL_DIFERIDO] = [
|
|
@@ -1902,10 +1982,28 @@
|
|
|
1902
1982
|
rule: this.taxAmountCalculationRule
|
|
1903
1983
|
}
|
|
1904
1984
|
],
|
|
1985
|
+
_b[exports.EnumTipoTributo.IBS_CREDITO_PRESUMIDO] = [
|
|
1986
|
+
{
|
|
1987
|
+
field: exports.EnumCampoTributo.BaseCalculo,
|
|
1988
|
+
rule: this.taxableBaseCalculationRule
|
|
1989
|
+
},
|
|
1990
|
+
{
|
|
1991
|
+
field: exports.EnumCampoTributo.Valor,
|
|
1992
|
+
rule: this.taxAmountCalculationRule
|
|
1993
|
+
},
|
|
1994
|
+
{
|
|
1995
|
+
field: exports.EnumCampoTributo.ClassificacaoTributariaCreditoPresumido,
|
|
1996
|
+
rule: this.taxClassificationCalculationRule
|
|
1997
|
+
}
|
|
1998
|
+
],
|
|
1905
1999
|
_b[exports.EnumTipoTributo.IS] = [
|
|
1906
2000
|
{
|
|
1907
2001
|
field: exports.EnumCampoTributo.Valor,
|
|
1908
2002
|
rule: this.taxAmountCalculationRule
|
|
2003
|
+
},
|
|
2004
|
+
{
|
|
2005
|
+
field: exports.EnumCampoTributo.ClassificacaoTributaria,
|
|
2006
|
+
rule: this.taxClassificationCalculationRule
|
|
1909
2007
|
}
|
|
1910
2008
|
],
|
|
1911
2009
|
_b),
|
|
@@ -1922,6 +2020,10 @@
|
|
|
1922
2020
|
{
|
|
1923
2021
|
field: exports.EnumCampoTributo.Valor,
|
|
1924
2022
|
rule: this.taxAmountCalculationRule
|
|
2023
|
+
},
|
|
2024
|
+
{
|
|
2025
|
+
field: exports.EnumCampoTributo.ClassificacaoTributaria,
|
|
2026
|
+
rule: this.taxClassificationCalculationRule
|
|
1925
2027
|
}
|
|
1926
2028
|
],
|
|
1927
2029
|
_c[exports.EnumTipoTributo.CBS_DIFERIDO] = [
|
|
@@ -1980,19 +2082,13 @@
|
|
|
1980
2082
|
{
|
|
1981
2083
|
field: exports.EnumCampoTributo.Valor,
|
|
1982
2084
|
rule: this.taxAmountCalculationRule
|
|
1983
|
-
}
|
|
1984
|
-
],
|
|
1985
|
-
_c[exports.EnumTipoTributo.IBS_ESTADUAL_DIFERIDO] = [
|
|
1986
|
-
{
|
|
1987
|
-
field: exports.EnumCampoTributo.BaseCalculo,
|
|
1988
|
-
rule: this.taxableBaseCalculationRule
|
|
1989
2085
|
},
|
|
1990
2086
|
{
|
|
1991
|
-
field: exports.EnumCampoTributo.
|
|
1992
|
-
rule: this.
|
|
2087
|
+
field: exports.EnumCampoTributo.ClassificacaoTributaria,
|
|
2088
|
+
rule: this.taxClassificationCalculationRule
|
|
1993
2089
|
}
|
|
1994
2090
|
],
|
|
1995
|
-
_c[exports.EnumTipoTributo.
|
|
2091
|
+
_c[exports.EnumTipoTributo.IBS_ESTADUAL_DIFERIDO] = [
|
|
1996
2092
|
{
|
|
1997
2093
|
field: exports.EnumCampoTributo.BaseCalculo,
|
|
1998
2094
|
rule: this.taxableBaseCalculationRule
|
|
@@ -2038,6 +2134,10 @@
|
|
|
2038
2134
|
{
|
|
2039
2135
|
field: exports.EnumCampoTributo.Valor,
|
|
2040
2136
|
rule: this.taxAmountCalculationRule
|
|
2137
|
+
},
|
|
2138
|
+
{
|
|
2139
|
+
field: exports.EnumCampoTributo.ClassificacaoTributaria,
|
|
2140
|
+
rule: this.taxClassificationCalculationRule
|
|
2041
2141
|
}
|
|
2042
2142
|
],
|
|
2043
2143
|
_c[exports.EnumTipoTributo.IBS_MUNICIPAL_DIFERIDO] = [
|
|
@@ -2074,10 +2174,28 @@
|
|
|
2074
2174
|
rule: this.taxAmountCalculationRule
|
|
2075
2175
|
}
|
|
2076
2176
|
],
|
|
2177
|
+
_c[exports.EnumTipoTributo.IBS_CREDITO_PRESUMIDO] = [
|
|
2178
|
+
{
|
|
2179
|
+
field: exports.EnumCampoTributo.BaseCalculo,
|
|
2180
|
+
rule: this.taxableBaseCalculationRule
|
|
2181
|
+
},
|
|
2182
|
+
{
|
|
2183
|
+
field: exports.EnumCampoTributo.Valor,
|
|
2184
|
+
rule: this.taxAmountCalculationRule
|
|
2185
|
+
},
|
|
2186
|
+
{
|
|
2187
|
+
field: exports.EnumCampoTributo.ClassificacaoTributariaCreditoPresumido,
|
|
2188
|
+
rule: this.taxClassificationCalculationRule
|
|
2189
|
+
}
|
|
2190
|
+
],
|
|
2077
2191
|
_c[exports.EnumTipoTributo.IS] = [
|
|
2078
2192
|
{
|
|
2079
2193
|
field: exports.EnumCampoTributo.Valor,
|
|
2080
2194
|
rule: this.taxAmountCalculationRule
|
|
2195
|
+
},
|
|
2196
|
+
{
|
|
2197
|
+
field: exports.EnumCampoTributo.ClassificacaoTributaria,
|
|
2198
|
+
rule: this.taxClassificationCalculationRule
|
|
2081
2199
|
}
|
|
2082
2200
|
],
|
|
2083
2201
|
_c),
|
|
@@ -2164,16 +2282,6 @@
|
|
|
2164
2282
|
rule: this.taxAmountCalculationRule
|
|
2165
2283
|
}
|
|
2166
2284
|
],
|
|
2167
|
-
_d[exports.EnumTipoTributo.IBS_ESTADUAL_CREDITO_PRESUMIDO] = [
|
|
2168
|
-
{
|
|
2169
|
-
field: exports.EnumCampoTributo.BaseCalculo,
|
|
2170
|
-
rule: this.taxableBaseCalculationRule
|
|
2171
|
-
},
|
|
2172
|
-
{
|
|
2173
|
-
field: exports.EnumCampoTributo.Valor,
|
|
2174
|
-
rule: this.taxAmountCalculationRule
|
|
2175
|
-
}
|
|
2176
|
-
],
|
|
2177
2285
|
_d[exports.EnumTipoTributo.IBS_ESTADUAL_TRIBUTACAO_REGULAR] = [
|
|
2178
2286
|
{
|
|
2179
2287
|
field: exports.EnumCampoTributo.BaseCalculo,
|
|
@@ -2246,6 +2354,16 @@
|
|
|
2246
2354
|
rule: this.taxAmountCalculationRule
|
|
2247
2355
|
}
|
|
2248
2356
|
],
|
|
2357
|
+
_d[exports.EnumTipoTributo.IBS_CREDITO_PRESUMIDO] = [
|
|
2358
|
+
{
|
|
2359
|
+
field: exports.EnumCampoTributo.BaseCalculo,
|
|
2360
|
+
rule: this.taxableBaseCalculationRule
|
|
2361
|
+
},
|
|
2362
|
+
{
|
|
2363
|
+
field: exports.EnumCampoTributo.Valor,
|
|
2364
|
+
rule: this.taxAmountCalculationRule
|
|
2365
|
+
}
|
|
2366
|
+
],
|
|
2249
2367
|
_d[exports.EnumTipoTributo.IS] = [
|
|
2250
2368
|
{
|
|
2251
2369
|
field: exports.EnumCampoTributo.Valor,
|
|
@@ -2336,16 +2454,6 @@
|
|
|
2336
2454
|
rule: this.taxAmountCalculationRule
|
|
2337
2455
|
}
|
|
2338
2456
|
],
|
|
2339
|
-
_e[exports.EnumTipoTributo.IBS_ESTADUAL_CREDITO_PRESUMIDO] = [
|
|
2340
|
-
{
|
|
2341
|
-
field: exports.EnumCampoTributo.BaseCalculo,
|
|
2342
|
-
rule: this.taxableBaseCalculationRule
|
|
2343
|
-
},
|
|
2344
|
-
{
|
|
2345
|
-
field: exports.EnumCampoTributo.Valor,
|
|
2346
|
-
rule: this.taxAmountCalculationRule
|
|
2347
|
-
}
|
|
2348
|
-
],
|
|
2349
2457
|
_e[exports.EnumTipoTributo.IBS_ESTADUAL_TRIBUTACAO_REGULAR] = [
|
|
2350
2458
|
{
|
|
2351
2459
|
field: exports.EnumCampoTributo.BaseCalculo,
|
|
@@ -2418,6 +2526,16 @@
|
|
|
2418
2526
|
rule: this.taxAmountCalculationRule
|
|
2419
2527
|
}
|
|
2420
2528
|
],
|
|
2529
|
+
_e[exports.EnumTipoTributo.IBS_CREDITO_PRESUMIDO] = [
|
|
2530
|
+
{
|
|
2531
|
+
field: exports.EnumCampoTributo.BaseCalculo,
|
|
2532
|
+
rule: this.taxableBaseCalculationRule
|
|
2533
|
+
},
|
|
2534
|
+
{
|
|
2535
|
+
field: exports.EnumCampoTributo.Valor,
|
|
2536
|
+
rule: this.taxAmountCalculationRule
|
|
2537
|
+
}
|
|
2538
|
+
],
|
|
2421
2539
|
_e[exports.EnumTipoTributo.IS] = [
|
|
2422
2540
|
{
|
|
2423
2541
|
field: exports.EnumCampoTributo.Valor,
|
|
@@ -2436,9 +2554,10 @@
|
|
|
2436
2554
|
{ type: TaxRateCalculationRule },
|
|
2437
2555
|
{ type: EffectiveTaxRateCalculationRule },
|
|
2438
2556
|
{ type: TaxAmountCalculationRule },
|
|
2439
|
-
{ type: GrossAmountCalculationRule }
|
|
2557
|
+
{ type: GrossAmountCalculationRule },
|
|
2558
|
+
{ type: TaxClassificationCalculationRule }
|
|
2440
2559
|
]; };
|
|
2441
|
-
CalculationRulesRegistry.ɵprov = core.ɵɵdefineInjectable({ factory: function CalculationRulesRegistry_Factory() { return new CalculationRulesRegistry(core.ɵɵinject(TaxableBaseCalculationRule), core.ɵɵinject(TaxRateCalculationRule), core.ɵɵinject(EffectiveTaxRateCalculationRule), core.ɵɵinject(TaxAmountCalculationRule), core.ɵɵinject(GrossAmountCalculationRule)); }, token: CalculationRulesRegistry, providedIn: "root" });
|
|
2560
|
+
CalculationRulesRegistry.ɵprov = core.ɵɵdefineInjectable({ factory: function CalculationRulesRegistry_Factory() { return new CalculationRulesRegistry(core.ɵɵinject(TaxableBaseCalculationRule), core.ɵɵinject(TaxRateCalculationRule), core.ɵɵinject(EffectiveTaxRateCalculationRule), core.ɵɵinject(TaxAmountCalculationRule), core.ɵɵinject(GrossAmountCalculationRule), core.ɵɵinject(TaxClassificationCalculationRule)); }, token: CalculationRulesRegistry, providedIn: "root" });
|
|
2442
2561
|
CalculationRulesRegistry = __decorate([
|
|
2443
2562
|
core.Injectable({ providedIn: 'root' })
|
|
2444
2563
|
], CalculationRulesRegistry);
|
|
@@ -2452,42 +2571,13 @@
|
|
|
2452
2571
|
var documentType = _a.documentType, _b = _a.item, taxType = _b.name, formGroup = _b.formGroup;
|
|
2453
2572
|
switch (taxType) {
|
|
2454
2573
|
case exports.EnumTipoTributo.CBS:
|
|
2455
|
-
case exports.EnumTipoTributo.IBS_ESTADUAL:
|
|
2456
|
-
case exports.EnumTipoTributo.IBS_MUNICIPAL:
|
|
2457
|
-
case exports.EnumTipoTributo.IS:
|
|
2458
|
-
{
|
|
2459
|
-
switch (documentType) {
|
|
2460
|
-
case exports.EnumTipoDocumento.NF_ENTRADA:
|
|
2461
|
-
case exports.EnumTipoDocumento.NF_SAIDA:
|
|
2462
|
-
{
|
|
2463
|
-
rxjs.combineLatest([
|
|
2464
|
-
formGroup
|
|
2465
|
-
.get('situacaoTributaria')
|
|
2466
|
-
.valueChanges.pipe(operators.startWith(formGroup.get('situacaoTributaria').value))
|
|
2467
|
-
])
|
|
2468
|
-
.pipe(operators.map(function (_a) {
|
|
2469
|
-
var _b = __read(_a, 1), taxSituation = _b[0];
|
|
2470
|
-
return [taxSituation];
|
|
2471
|
-
}))
|
|
2472
|
-
.subscribe(function (_a) {
|
|
2473
|
-
var _b = __read(_a, 1), taxSituation = _b[0];
|
|
2474
|
-
if (taxSituation) {
|
|
2475
|
-
formGroup.get('classificacaoTributaria').enable({ emitEvent: false });
|
|
2476
|
-
}
|
|
2477
|
-
else {
|
|
2478
|
-
formGroup.get('classificacaoTributaria').disable({ emitEvent: false });
|
|
2479
|
-
}
|
|
2480
|
-
});
|
|
2481
|
-
}
|
|
2482
|
-
break;
|
|
2483
|
-
default:
|
|
2484
|
-
throw new Error("Regra TaxClassificationStatusRule n\u00E3o implementada para o imposto " + taxType + ", documento " + documentType + ".");
|
|
2485
|
-
}
|
|
2486
|
-
}
|
|
2487
|
-
break;
|
|
2488
2574
|
case exports.EnumTipoTributo.CBS_TRIBUTACAO_REGULAR:
|
|
2575
|
+
case exports.EnumTipoTributo.IBS_ESTADUAL:
|
|
2489
2576
|
case exports.EnumTipoTributo.IBS_ESTADUAL_TRIBUTACAO_REGULAR:
|
|
2577
|
+
case exports.EnumTipoTributo.IBS_MUNICIPAL:
|
|
2490
2578
|
case exports.EnumTipoTributo.IBS_MUNICIPAL_TRIBUTACAO_REGULAR:
|
|
2579
|
+
case exports.EnumTipoTributo.IBS_CREDITO_PRESUMIDO:
|
|
2580
|
+
case exports.EnumTipoTributo.IS:
|
|
2491
2581
|
{
|
|
2492
2582
|
switch (documentType) {
|
|
2493
2583
|
case exports.EnumTipoDocumento.NF_ENTRADA:
|
|
@@ -2571,6 +2661,12 @@
|
|
|
2571
2661
|
rule: this.taxClassificationStatusRule
|
|
2572
2662
|
}
|
|
2573
2663
|
],
|
|
2664
|
+
_b[exports.EnumTipoTributo.IBS_CREDITO_PRESUMIDO] = [
|
|
2665
|
+
{
|
|
2666
|
+
field: exports.EnumCampoTributo.ClassificacaoTributariaCreditoPresumido,
|
|
2667
|
+
rule: this.taxClassificationStatusRule
|
|
2668
|
+
}
|
|
2669
|
+
],
|
|
2574
2670
|
_b[exports.EnumTipoTributo.IS] = [
|
|
2575
2671
|
{
|
|
2576
2672
|
field: exports.EnumCampoTributo.ClassificacaoTributaria,
|
|
@@ -2615,6 +2711,12 @@
|
|
|
2615
2711
|
rule: this.taxClassificationStatusRule
|
|
2616
2712
|
}
|
|
2617
2713
|
],
|
|
2714
|
+
_c[exports.EnumTipoTributo.IBS_CREDITO_PRESUMIDO] = [
|
|
2715
|
+
{
|
|
2716
|
+
field: exports.EnumCampoTributo.ClassificacaoTributariaCreditoPresumido,
|
|
2717
|
+
rule: this.taxClassificationStatusRule
|
|
2718
|
+
}
|
|
2719
|
+
],
|
|
2618
2720
|
_c[exports.EnumTipoTributo.IS] = [
|
|
2619
2721
|
{
|
|
2620
2722
|
field: exports.EnumCampoTributo.ClassificacaoTributaria,
|
|
@@ -2645,7 +2747,6 @@
|
|
|
2645
2747
|
var documentType = _a.documentType, group = _a.group, _b = _a.item, taxType = _b.name, formGroup = _b.formGroup;
|
|
2646
2748
|
switch (taxType) {
|
|
2647
2749
|
case exports.EnumTipoTributo.CBS:
|
|
2648
|
-
case exports.EnumTipoTributo.IBS_ESTADUAL:
|
|
2649
2750
|
{
|
|
2650
2751
|
switch (documentType) {
|
|
2651
2752
|
case exports.EnumTipoDocumento.NF_ENTRADA:
|
|
@@ -2665,7 +2766,9 @@
|
|
|
2665
2766
|
.get('classificacaoTributaria')
|
|
2666
2767
|
.valueChanges.pipe(operators.startWith(formGroup.get('classificacaoTributaria').value)),
|
|
2667
2768
|
formGroup.get('valor').valueChanges.pipe(operators.startWith(formGroup.get('valor').value)),
|
|
2668
|
-
formGroup
|
|
2769
|
+
formGroup
|
|
2770
|
+
.get(exports.EnumCampoTributo.AplicarValorLiquidoDocumento)
|
|
2771
|
+
.valueChanges.pipe(operators.startWith(formGroup.get(exports.EnumCampoTributo.AplicarValorLiquidoDocumento).value)),
|
|
2669
2772
|
deferredTaxFormGroup
|
|
2670
2773
|
.get('aliquota')
|
|
2671
2774
|
.valueChanges.pipe(operators.startWith(deferredTaxFormGroup.get('aliquota').value)),
|
|
@@ -2677,7 +2780,7 @@
|
|
|
2677
2780
|
.valueChanges.pipe(operators.startWith(regularTaxationTaxFormGroup.get('aliquota').value))
|
|
2678
2781
|
])
|
|
2679
2782
|
.pipe(operators.map(function (_a) {
|
|
2680
|
-
var _b = __read(_a, 10), taxableBase = _b[0], taxRate = _b[1], effectiveTaxRate = _b[2], taxSituation = _b[3], taxClassication = _b[4], taxAmount = _b[5],
|
|
2783
|
+
var _b = __read(_a, 10), taxableBase = _b[0], taxRate = _b[1], effectiveTaxRate = _b[2], taxSituation = _b[3], taxClassication = _b[4], taxAmount = _b[5], applyNetDocumentValue = _b[6], deferredTaxRate = _b[7], presumedCreditTaxRate = _b[8], regularTaxationTaxRate = _b[9];
|
|
2681
2784
|
return [
|
|
2682
2785
|
new BigNumber(taxableBase),
|
|
2683
2786
|
new BigNumber(taxRate),
|
|
@@ -2685,14 +2788,14 @@
|
|
|
2685
2788
|
taxSituation,
|
|
2686
2789
|
taxClassication,
|
|
2687
2790
|
new BigNumber(taxAmount),
|
|
2688
|
-
|
|
2791
|
+
applyNetDocumentValue,
|
|
2689
2792
|
new BigNumber(deferredTaxRate),
|
|
2690
2793
|
new BigNumber(presumedCreditTaxRate),
|
|
2691
2794
|
new BigNumber(regularTaxationTaxRate)
|
|
2692
2795
|
];
|
|
2693
2796
|
}))
|
|
2694
2797
|
.subscribe(function (_a) {
|
|
2695
|
-
var _b = __read(_a, 10), taxableBase = _b[0], taxRate = _b[1], effectiveTaxRate = _b[2], taxSituation = _b[3], taxClassication = _b[4], taxAmount = _b[5],
|
|
2798
|
+
var _b = __read(_a, 10), taxableBase = _b[0], taxRate = _b[1], effectiveTaxRate = _b[2], taxSituation = _b[3], taxClassication = _b[4], taxAmount = _b[5], applyNetDocumentValue = _b[6], deferredTaxRate = _b[7], presumedCreditTaxRate = _b[8], regularTaxationTaxRate = _b[9];
|
|
2696
2799
|
var validators = [];
|
|
2697
2800
|
if (taxableBase.isFinite() ||
|
|
2698
2801
|
taxRate.isFinite() ||
|
|
@@ -2700,8 +2803,7 @@
|
|
|
2700
2803
|
taxSituation ||
|
|
2701
2804
|
taxClassication ||
|
|
2702
2805
|
taxAmount.isFinite() ||
|
|
2703
|
-
|
|
2704
|
-
netValueOperation === false ||
|
|
2806
|
+
applyNetDocumentValue ||
|
|
2705
2807
|
deferredTaxRate.isFinite() ||
|
|
2706
2808
|
presumedCreditTaxRate.isFinite() ||
|
|
2707
2809
|
regularTaxationTaxRate.isFinite()) {
|
|
@@ -2759,7 +2861,7 @@
|
|
|
2759
2861
|
}
|
|
2760
2862
|
}
|
|
2761
2863
|
break;
|
|
2762
|
-
case exports.EnumTipoTributo.
|
|
2864
|
+
case exports.EnumTipoTributo.IBS_ESTADUAL:
|
|
2763
2865
|
{
|
|
2764
2866
|
switch (documentType) {
|
|
2765
2867
|
case exports.EnumTipoDocumento.NF_ENTRADA:
|
|
@@ -2778,7 +2880,9 @@
|
|
|
2778
2880
|
.get('classificacaoTributaria')
|
|
2779
2881
|
.valueChanges.pipe(operators.startWith(formGroup.get('classificacaoTributaria').value)),
|
|
2780
2882
|
formGroup.get('valor').valueChanges.pipe(operators.startWith(formGroup.get('valor').value)),
|
|
2781
|
-
formGroup
|
|
2883
|
+
formGroup
|
|
2884
|
+
.get(exports.EnumCampoTributo.AplicarValorLiquidoDocumento)
|
|
2885
|
+
.valueChanges.pipe(operators.startWith(formGroup.get(exports.EnumCampoTributo.AplicarValorLiquidoDocumento).value)),
|
|
2782
2886
|
deferredTaxFormGroup
|
|
2783
2887
|
.get('aliquota')
|
|
2784
2888
|
.valueChanges.pipe(operators.startWith(deferredTaxFormGroup.get('aliquota').value)),
|
|
@@ -2787,7 +2891,7 @@
|
|
|
2787
2891
|
.valueChanges.pipe(operators.startWith(regularTaxationTaxFormGroup.get('aliquota').value))
|
|
2788
2892
|
])
|
|
2789
2893
|
.pipe(operators.map(function (_a) {
|
|
2790
|
-
var _b = __read(_a, 9), taxableBase = _b[0], taxRate = _b[1], effectiveTaxRate = _b[2], taxSituation = _b[3], taxClassication = _b[4], taxAmount = _b[5],
|
|
2894
|
+
var _b = __read(_a, 9), taxableBase = _b[0], taxRate = _b[1], effectiveTaxRate = _b[2], taxSituation = _b[3], taxClassication = _b[4], taxAmount = _b[5], applyNetDocumentValue = _b[6], deferredTaxRate = _b[7], regularTaxationTaxRate = _b[8];
|
|
2791
2895
|
return [
|
|
2792
2896
|
new BigNumber(taxableBase),
|
|
2793
2897
|
new BigNumber(taxRate),
|
|
@@ -2795,13 +2899,13 @@
|
|
|
2795
2899
|
taxSituation,
|
|
2796
2900
|
taxClassication,
|
|
2797
2901
|
new BigNumber(taxAmount),
|
|
2798
|
-
|
|
2902
|
+
applyNetDocumentValue,
|
|
2799
2903
|
new BigNumber(deferredTaxRate),
|
|
2800
2904
|
new BigNumber(regularTaxationTaxRate)
|
|
2801
2905
|
];
|
|
2802
2906
|
}))
|
|
2803
2907
|
.subscribe(function (_a) {
|
|
2804
|
-
var _b = __read(_a, 9), taxableBase = _b[0], taxRate = _b[1], effectiveTaxRate = _b[2], taxSituation = _b[3], taxClassication = _b[4], taxAmount = _b[5],
|
|
2908
|
+
var _b = __read(_a, 9), taxableBase = _b[0], taxRate = _b[1], effectiveTaxRate = _b[2], taxSituation = _b[3], taxClassication = _b[4], taxAmount = _b[5], applyNetDocumentValue = _b[6], deferredTaxRate = _b[7], regularTaxationTaxRate = _b[8];
|
|
2805
2909
|
var validators = [];
|
|
2806
2910
|
if (taxableBase.isFinite() ||
|
|
2807
2911
|
taxRate.isFinite() ||
|
|
@@ -2809,8 +2913,7 @@
|
|
|
2809
2913
|
taxSituation ||
|
|
2810
2914
|
taxClassication ||
|
|
2811
2915
|
taxAmount.isFinite() ||
|
|
2812
|
-
|
|
2813
|
-
netValueOperation === false ||
|
|
2916
|
+
applyNetDocumentValue ||
|
|
2814
2917
|
deferredTaxRate.isFinite() ||
|
|
2815
2918
|
regularTaxationTaxRate.isFinite()) {
|
|
2816
2919
|
validators = [forms.Validators.max(9999999999999.99), forms.Validators.required];
|
|
@@ -2867,32 +2970,141 @@
|
|
|
2867
2970
|
}
|
|
2868
2971
|
}
|
|
2869
2972
|
break;
|
|
2870
|
-
default:
|
|
2871
|
-
throw new Error("Regra TaxAmountRequiredValidationRule n\u00E3o implementada para o imposto " + taxType + ", documento " + documentType + ".");
|
|
2872
|
-
}
|
|
2873
|
-
};
|
|
2874
|
-
TaxAmountRequiredValidationRule.ɵprov = core.ɵɵdefineInjectable({ factory: function TaxAmountRequiredValidationRule_Factory() { return new TaxAmountRequiredValidationRule(); }, token: TaxAmountRequiredValidationRule, providedIn: "root" });
|
|
2875
|
-
TaxAmountRequiredValidationRule = __decorate([
|
|
2876
|
-
core.Injectable({ providedIn: 'root' })
|
|
2877
|
-
], TaxAmountRequiredValidationRule);
|
|
2878
|
-
return TaxAmountRequiredValidationRule;
|
|
2879
|
-
}());
|
|
2880
|
-
|
|
2881
|
-
var TaxClassificationRequiredValidationRule = /** @class */ (function () {
|
|
2882
|
-
function TaxClassificationRequiredValidationRule() {
|
|
2883
|
-
}
|
|
2884
|
-
TaxClassificationRequiredValidationRule.prototype.apply = function (_a) {
|
|
2885
|
-
var documentType = _a.documentType, _b = _a.item, taxType = _b.name, formGroup = _b.formGroup;
|
|
2886
|
-
switch (taxType) {
|
|
2887
|
-
case exports.EnumTipoTributo.CBS:
|
|
2888
|
-
case exports.EnumTipoTributo.IBS_ESTADUAL:
|
|
2889
2973
|
case exports.EnumTipoTributo.IBS_MUNICIPAL:
|
|
2890
2974
|
{
|
|
2891
2975
|
switch (documentType) {
|
|
2892
2976
|
case exports.EnumTipoDocumento.NF_ENTRADA:
|
|
2893
2977
|
case exports.EnumTipoDocumento.NF_SAIDA:
|
|
2894
2978
|
{
|
|
2895
|
-
|
|
2979
|
+
var deferredTaxFormGroup = getDeferredTaxItemFromGroup({ group: group }).formGroup;
|
|
2980
|
+
var regularTaxationTaxFormGroup = getRegularTaxationTaxItemFromGroup({ group: group }).formGroup;
|
|
2981
|
+
rxjs.combineLatest([
|
|
2982
|
+
formGroup.get('baseCalculo').valueChanges.pipe(operators.startWith(formGroup.get('baseCalculo').value)),
|
|
2983
|
+
formGroup.get('aliquota').valueChanges.pipe(operators.startWith(formGroup.get('aliquota').value)),
|
|
2984
|
+
formGroup.get('aliquotaEfetiva').valueChanges.pipe(operators.startWith(formGroup.get('aliquotaEfetiva').value)),
|
|
2985
|
+
formGroup
|
|
2986
|
+
.get('situacaoTributaria')
|
|
2987
|
+
.valueChanges.pipe(operators.startWith(formGroup.get('situacaoTributaria').value)),
|
|
2988
|
+
formGroup
|
|
2989
|
+
.get('classificacaoTributaria')
|
|
2990
|
+
.valueChanges.pipe(operators.startWith(formGroup.get('classificacaoTributaria').value)),
|
|
2991
|
+
formGroup.get('valor').valueChanges.pipe(operators.startWith(formGroup.get('valor').value)),
|
|
2992
|
+
formGroup
|
|
2993
|
+
.get(exports.EnumCampoTributo.AplicarValorLiquidoDocumento)
|
|
2994
|
+
.valueChanges.pipe(operators.startWith(formGroup.get(exports.EnumCampoTributo.AplicarValorLiquidoDocumento).value)),
|
|
2995
|
+
deferredTaxFormGroup
|
|
2996
|
+
.get('aliquota')
|
|
2997
|
+
.valueChanges.pipe(operators.startWith(deferredTaxFormGroup.get('aliquota').value)),
|
|
2998
|
+
regularTaxationTaxFormGroup
|
|
2999
|
+
.get('aliquota')
|
|
3000
|
+
.valueChanges.pipe(operators.startWith(regularTaxationTaxFormGroup.get('aliquota').value))
|
|
3001
|
+
])
|
|
3002
|
+
.pipe(operators.map(function (_a) {
|
|
3003
|
+
var _b = __read(_a, 9), taxableBase = _b[0], taxRate = _b[1], effectiveTaxRate = _b[2], taxSituation = _b[3], taxClassication = _b[4], taxAmount = _b[5], applyNetDocumentValue = _b[6], deferredTaxRate = _b[7], regularTaxationTaxRate = _b[8];
|
|
3004
|
+
return [
|
|
3005
|
+
new BigNumber(taxableBase),
|
|
3006
|
+
new BigNumber(taxRate),
|
|
3007
|
+
new BigNumber(effectiveTaxRate),
|
|
3008
|
+
taxSituation,
|
|
3009
|
+
taxClassication,
|
|
3010
|
+
new BigNumber(taxAmount),
|
|
3011
|
+
applyNetDocumentValue,
|
|
3012
|
+
new BigNumber(deferredTaxRate),
|
|
3013
|
+
new BigNumber(regularTaxationTaxRate)
|
|
3014
|
+
];
|
|
3015
|
+
}))
|
|
3016
|
+
.subscribe(function (_a) {
|
|
3017
|
+
var _b = __read(_a, 9), taxableBase = _b[0], taxRate = _b[1], effectiveTaxRate = _b[2], taxSituation = _b[3], taxClassication = _b[4], taxAmount = _b[5], applyNetDocumentValue = _b[6], deferredTaxRate = _b[7], regularTaxationTaxRate = _b[8];
|
|
3018
|
+
var validators = [];
|
|
3019
|
+
if (taxableBase.isFinite() ||
|
|
3020
|
+
taxRate.isFinite() ||
|
|
3021
|
+
effectiveTaxRate.isFinite() ||
|
|
3022
|
+
taxSituation ||
|
|
3023
|
+
taxClassication ||
|
|
3024
|
+
taxAmount.isFinite() ||
|
|
3025
|
+
applyNetDocumentValue ||
|
|
3026
|
+
deferredTaxRate.isFinite() ||
|
|
3027
|
+
regularTaxationTaxRate.isFinite()) {
|
|
3028
|
+
validators = [forms.Validators.max(9999999999999.99), forms.Validators.required];
|
|
3029
|
+
}
|
|
3030
|
+
else {
|
|
3031
|
+
validators = [forms.Validators.max(9999999999999.99)];
|
|
3032
|
+
}
|
|
3033
|
+
formGroup.get('valor').setValidators(validators);
|
|
3034
|
+
formGroup.get('valor').updateValueAndValidity({ emitEvent: false });
|
|
3035
|
+
});
|
|
3036
|
+
}
|
|
3037
|
+
break;
|
|
3038
|
+
case exports.EnumTipoDocumento.PEDIDO_COMPRA:
|
|
3039
|
+
case exports.EnumTipoDocumento.PEDIDO_VENDA:
|
|
3040
|
+
{
|
|
3041
|
+
var deferredFormGroup = getDeferredTaxItemFromGroup({ group: group }).formGroup;
|
|
3042
|
+
rxjs.combineLatest([
|
|
3043
|
+
formGroup.get('baseCalculo').valueChanges.pipe(operators.startWith(formGroup.get('baseCalculo').value)),
|
|
3044
|
+
formGroup.get('aliquota').valueChanges.pipe(operators.startWith(formGroup.get('aliquota').value)),
|
|
3045
|
+
formGroup.get('aliquotaEfetiva').valueChanges.pipe(operators.startWith(formGroup.get('aliquota').value)),
|
|
3046
|
+
formGroup.get('valor').valueChanges.pipe(operators.startWith(formGroup.get('valor').value)),
|
|
3047
|
+
deferredFormGroup.get('aliquota').valueChanges.pipe(operators.startWith(deferredFormGroup.get('aliquota').value))
|
|
3048
|
+
])
|
|
3049
|
+
.pipe(operators.map(function (_a) {
|
|
3050
|
+
var _b = __read(_a, 5), taxableBase = _b[0], taxRate = _b[1], effectiveTaxRate = _b[2], taxAmount = _b[3], deferredTaxRate = _b[4];
|
|
3051
|
+
return [
|
|
3052
|
+
new BigNumber(taxableBase),
|
|
3053
|
+
new BigNumber(taxRate),
|
|
3054
|
+
new BigNumber(effectiveTaxRate),
|
|
3055
|
+
new BigNumber(taxAmount),
|
|
3056
|
+
new BigNumber(deferredTaxRate)
|
|
3057
|
+
];
|
|
3058
|
+
}))
|
|
3059
|
+
.subscribe(function (_a) {
|
|
3060
|
+
var _b = __read(_a, 5), taxableBase = _b[0], taxRate = _b[1], effectiveTaxRate = _b[2], taxAmount = _b[3], deferredTaxRate = _b[4];
|
|
3061
|
+
var validators = [];
|
|
3062
|
+
if (taxableBase.isFinite() ||
|
|
3063
|
+
taxRate.isFinite() ||
|
|
3064
|
+
effectiveTaxRate.isFinite() ||
|
|
3065
|
+
taxAmount.isFinite() ||
|
|
3066
|
+
deferredTaxRate.isFinite()) {
|
|
3067
|
+
validators = [forms.Validators.max(9999999999999.99), forms.Validators.required];
|
|
3068
|
+
}
|
|
3069
|
+
else {
|
|
3070
|
+
validators = [forms.Validators.max(9999999999999.99)];
|
|
3071
|
+
}
|
|
3072
|
+
formGroup.get('valor').setValidators(validators);
|
|
3073
|
+
formGroup.get('valor').updateValueAndValidity({ emitEvent: false });
|
|
3074
|
+
});
|
|
3075
|
+
}
|
|
3076
|
+
break;
|
|
3077
|
+
default:
|
|
3078
|
+
throw new Error("Regra TaxAmountRequiredValidationRule n\u00E3o implementada para o imposto " + taxType + ", documento " + documentType + ".");
|
|
3079
|
+
}
|
|
3080
|
+
}
|
|
3081
|
+
break;
|
|
3082
|
+
default:
|
|
3083
|
+
throw new Error("Regra TaxAmountRequiredValidationRule n\u00E3o implementada para o imposto " + taxType + ", documento " + documentType + ".");
|
|
3084
|
+
}
|
|
3085
|
+
};
|
|
3086
|
+
TaxAmountRequiredValidationRule.ɵprov = core.ɵɵdefineInjectable({ factory: function TaxAmountRequiredValidationRule_Factory() { return new TaxAmountRequiredValidationRule(); }, token: TaxAmountRequiredValidationRule, providedIn: "root" });
|
|
3087
|
+
TaxAmountRequiredValidationRule = __decorate([
|
|
3088
|
+
core.Injectable({ providedIn: 'root' })
|
|
3089
|
+
], TaxAmountRequiredValidationRule);
|
|
3090
|
+
return TaxAmountRequiredValidationRule;
|
|
3091
|
+
}());
|
|
3092
|
+
|
|
3093
|
+
var TaxClassificationRequiredValidationRule = /** @class */ (function () {
|
|
3094
|
+
function TaxClassificationRequiredValidationRule() {
|
|
3095
|
+
}
|
|
3096
|
+
TaxClassificationRequiredValidationRule.prototype.apply = function (_a) {
|
|
3097
|
+
var documentType = _a.documentType, _b = _a.item, taxType = _b.name, formGroup = _b.formGroup;
|
|
3098
|
+
switch (taxType) {
|
|
3099
|
+
case exports.EnumTipoTributo.CBS:
|
|
3100
|
+
case exports.EnumTipoTributo.IBS_ESTADUAL:
|
|
3101
|
+
case exports.EnumTipoTributo.IBS_MUNICIPAL:
|
|
3102
|
+
{
|
|
3103
|
+
switch (documentType) {
|
|
3104
|
+
case exports.EnumTipoDocumento.NF_ENTRADA:
|
|
3105
|
+
case exports.EnumTipoDocumento.NF_SAIDA:
|
|
3106
|
+
{
|
|
3107
|
+
rxjs.combineLatest([
|
|
2896
3108
|
formGroup.get('baseCalculo').valueChanges.pipe(operators.startWith(formGroup.get('baseCalculo').value)),
|
|
2897
3109
|
formGroup.get('aliquota').valueChanges.pipe(operators.startWith(formGroup.get('aliquota').value)),
|
|
2898
3110
|
formGroup.get('aliquotaEfetiva').valueChanges.pipe(operators.startWith(formGroup.get('aliquotaEfetiva').value)),
|
|
@@ -2903,10 +3115,12 @@
|
|
|
2903
3115
|
formGroup
|
|
2904
3116
|
.get('classificacaoTributaria')
|
|
2905
3117
|
.valueChanges.pipe(operators.startWith(formGroup.get('classificacaoTributaria').value)),
|
|
2906
|
-
formGroup
|
|
3118
|
+
formGroup
|
|
3119
|
+
.get(exports.EnumCampoTributo.AplicarValorLiquidoDocumento)
|
|
3120
|
+
.valueChanges.pipe(operators.startWith(formGroup.get(exports.EnumCampoTributo.AplicarValorLiquidoDocumento).value))
|
|
2907
3121
|
])
|
|
2908
3122
|
.pipe(operators.map(function (_a) {
|
|
2909
|
-
var _b = __read(_a, 7), taxableBase = _b[0], taxRate = _b[1], effectiveTaxRate = _b[2], taxAmount = _b[3], taxSituation = _b[4], taxClassication = _b[5],
|
|
3123
|
+
var _b = __read(_a, 7), taxableBase = _b[0], taxRate = _b[1], effectiveTaxRate = _b[2], taxAmount = _b[3], taxSituation = _b[4], taxClassication = _b[5], applyNetDocumentValue = _b[6];
|
|
2910
3124
|
return [
|
|
2911
3125
|
new BigNumber(taxableBase),
|
|
2912
3126
|
new BigNumber(taxRate),
|
|
@@ -2914,11 +3128,11 @@
|
|
|
2914
3128
|
new BigNumber(taxAmount),
|
|
2915
3129
|
taxSituation,
|
|
2916
3130
|
taxClassication,
|
|
2917
|
-
|
|
3131
|
+
applyNetDocumentValue
|
|
2918
3132
|
];
|
|
2919
3133
|
}))
|
|
2920
3134
|
.subscribe(function (_a) {
|
|
2921
|
-
var _b = __read(_a, 7), taxableBase = _b[0], taxRate = _b[1], effectiveTaxRate = _b[2], taxAmount = _b[3], taxSituation = _b[4], taxClassication = _b[5],
|
|
3135
|
+
var _b = __read(_a, 7), taxableBase = _b[0], taxRate = _b[1], effectiveTaxRate = _b[2], taxAmount = _b[3], taxSituation = _b[4], taxClassication = _b[5], applyNetDocumentValue = _b[6];
|
|
2922
3136
|
var validators = [];
|
|
2923
3137
|
if (taxableBase.isFinite() ||
|
|
2924
3138
|
taxRate.isFinite() ||
|
|
@@ -2926,8 +3140,7 @@
|
|
|
2926
3140
|
taxAmount.isFinite() ||
|
|
2927
3141
|
taxSituation ||
|
|
2928
3142
|
taxClassication ||
|
|
2929
|
-
|
|
2930
|
-
netValueOperation === false) {
|
|
3143
|
+
applyNetDocumentValue) {
|
|
2931
3144
|
validators = [forms.Validators.required];
|
|
2932
3145
|
}
|
|
2933
3146
|
else {
|
|
@@ -2944,7 +3157,6 @@
|
|
|
2944
3157
|
}
|
|
2945
3158
|
break;
|
|
2946
3159
|
case exports.EnumTipoTributo.CBS_CREDITO_PRESUMIDO:
|
|
2947
|
-
case exports.EnumTipoTributo.IBS_ESTADUAL_CREDITO_PRESUMIDO:
|
|
2948
3160
|
{
|
|
2949
3161
|
switch (documentType) {
|
|
2950
3162
|
case exports.EnumTipoDocumento.NF_ENTRADA:
|
|
@@ -2980,6 +3192,50 @@
|
|
|
2980
3192
|
}
|
|
2981
3193
|
}
|
|
2982
3194
|
break;
|
|
3195
|
+
case exports.EnumTipoTributo.IBS_CREDITO_PRESUMIDO:
|
|
3196
|
+
{
|
|
3197
|
+
switch (documentType) {
|
|
3198
|
+
case exports.EnumTipoDocumento.NF_ENTRADA:
|
|
3199
|
+
case exports.EnumTipoDocumento.NF_SAIDA:
|
|
3200
|
+
{
|
|
3201
|
+
rxjs.combineLatest([
|
|
3202
|
+
formGroup.get('baseCalculo').valueChanges.pipe(operators.startWith(formGroup.get('baseCalculo').value)),
|
|
3203
|
+
formGroup.get('aliquota').valueChanges.pipe(operators.startWith(formGroup.get('aliquota').value)),
|
|
3204
|
+
formGroup
|
|
3205
|
+
.get('classificacaoTributaria')
|
|
3206
|
+
.valueChanges.pipe(operators.startWith(formGroup.get('classificacaoTributaria').value)),
|
|
3207
|
+
formGroup
|
|
3208
|
+
.get(exports.EnumCampoTributo.AplicarValorLiquidoDocumento)
|
|
3209
|
+
.valueChanges.pipe(operators.startWith(formGroup.get(exports.EnumCampoTributo.AplicarValorLiquidoDocumento).value))
|
|
3210
|
+
])
|
|
3211
|
+
.pipe(operators.map(function (_a) {
|
|
3212
|
+
var _b = __read(_a, 4), taxableBase = _b[0], taxRate = _b[1], taxClassication = _b[2], applyNetDocumentValue = _b[3];
|
|
3213
|
+
return [
|
|
3214
|
+
new BigNumber(taxableBase),
|
|
3215
|
+
new BigNumber(taxRate),
|
|
3216
|
+
taxClassication,
|
|
3217
|
+
applyNetDocumentValue
|
|
3218
|
+
];
|
|
3219
|
+
}))
|
|
3220
|
+
.subscribe(function (_a) {
|
|
3221
|
+
var _b = __read(_a, 4), taxableBase = _b[0], taxRate = _b[1], taxClassication = _b[2], applyNetDocumentValue = _b[3];
|
|
3222
|
+
var validators = [];
|
|
3223
|
+
if (taxableBase.isFinite() || taxRate.isFinite() || taxClassication || applyNetDocumentValue) {
|
|
3224
|
+
validators = [forms.Validators.required];
|
|
3225
|
+
}
|
|
3226
|
+
else {
|
|
3227
|
+
validators = [];
|
|
3228
|
+
}
|
|
3229
|
+
formGroup.get('classificacaoTributaria').setValidators(validators);
|
|
3230
|
+
formGroup.get('classificacaoTributaria').updateValueAndValidity({ emitEvent: false });
|
|
3231
|
+
});
|
|
3232
|
+
}
|
|
3233
|
+
break;
|
|
3234
|
+
default:
|
|
3235
|
+
throw new Error("Regra TaxClassificationRequiredValidationRule n\u00E3o implementada para o imposto " + taxType + ", documento " + documentType + ".");
|
|
3236
|
+
}
|
|
3237
|
+
}
|
|
3238
|
+
break;
|
|
2983
3239
|
case exports.EnumTipoTributo.CBS_TRIBUTACAO_REGULAR:
|
|
2984
3240
|
case exports.EnumTipoTributo.IBS_ESTADUAL_TRIBUTACAO_REGULAR:
|
|
2985
3241
|
case exports.EnumTipoTributo.IBS_MUNICIPAL_TRIBUTACAO_REGULAR:
|
|
@@ -3021,6 +3277,22 @@
|
|
|
3021
3277
|
}
|
|
3022
3278
|
}
|
|
3023
3279
|
break;
|
|
3280
|
+
// case EnumTipoTributo.IBS_CREDITO_PRESUMIDO:
|
|
3281
|
+
// {
|
|
3282
|
+
// switch (documentType) {
|
|
3283
|
+
// case EnumTipoDocumento.NF_ENTRADA:
|
|
3284
|
+
// case EnumTipoDocumento.NF_SAIDA:
|
|
3285
|
+
// break;
|
|
3286
|
+
// case EnumTipoDocumento.PEDIDO_COMPRA:
|
|
3287
|
+
// case EnumTipoDocumento.PEDIDO_VENDA:
|
|
3288
|
+
// break;
|
|
3289
|
+
// default:
|
|
3290
|
+
// throw new Error(
|
|
3291
|
+
// `Regra TaxClassificationRequiredValidationRule não implementada para o imposto ${taxType}, documento ${documentType}.`
|
|
3292
|
+
// );
|
|
3293
|
+
// }
|
|
3294
|
+
// }
|
|
3295
|
+
// break;
|
|
3024
3296
|
case exports.EnumTipoTributo.IS:
|
|
3025
3297
|
{
|
|
3026
3298
|
switch (documentType) {
|
|
@@ -3037,29 +3309,30 @@
|
|
|
3037
3309
|
formGroup
|
|
3038
3310
|
.get('classificacaoTributaria')
|
|
3039
3311
|
.valueChanges.pipe(operators.startWith(formGroup.get('classificacaoTributaria').value)),
|
|
3040
|
-
formGroup
|
|
3312
|
+
formGroup
|
|
3313
|
+
.get(exports.EnumCampoTributo.AplicarValorLiquidoDocumento)
|
|
3314
|
+
.valueChanges.pipe(operators.startWith(formGroup.get(exports.EnumCampoTributo.AplicarValorLiquidoDocumento).value))
|
|
3041
3315
|
])
|
|
3042
3316
|
.pipe(operators.map(function (_a) {
|
|
3043
|
-
var _b = __read(_a, 6), taxableBase = _b[0], taxRate = _b[1], taxAmount = _b[2], taxSituation = _b[3], taxClassication = _b[4],
|
|
3317
|
+
var _b = __read(_a, 6), taxableBase = _b[0], taxRate = _b[1], taxAmount = _b[2], taxSituation = _b[3], taxClassication = _b[4], applyNetDocumentValue = _b[5];
|
|
3044
3318
|
return [
|
|
3045
3319
|
new BigNumber(taxableBase),
|
|
3046
3320
|
new BigNumber(taxRate),
|
|
3047
3321
|
new BigNumber(taxAmount),
|
|
3048
3322
|
taxSituation,
|
|
3049
3323
|
taxClassication,
|
|
3050
|
-
|
|
3324
|
+
applyNetDocumentValue
|
|
3051
3325
|
];
|
|
3052
3326
|
}))
|
|
3053
3327
|
.subscribe(function (_a) {
|
|
3054
|
-
var _b = __read(_a, 6), taxableBase = _b[0], taxRate = _b[1], taxAmount = _b[2], taxSituation = _b[3], taxClassication = _b[4],
|
|
3328
|
+
var _b = __read(_a, 6), taxableBase = _b[0], taxRate = _b[1], taxAmount = _b[2], taxSituation = _b[3], taxClassication = _b[4], applyNetDocumentValue = _b[5];
|
|
3055
3329
|
var validators = [];
|
|
3056
3330
|
if (taxableBase.isFinite() ||
|
|
3057
3331
|
taxRate.isFinite() ||
|
|
3058
3332
|
taxAmount.isFinite() ||
|
|
3059
3333
|
taxSituation ||
|
|
3060
3334
|
taxClassication ||
|
|
3061
|
-
|
|
3062
|
-
netValueOperation === false) {
|
|
3335
|
+
applyNetDocumentValue) {
|
|
3063
3336
|
validators = [forms.Validators.required];
|
|
3064
3337
|
}
|
|
3065
3338
|
else {
|
|
@@ -3120,11 +3393,11 @@
|
|
|
3120
3393
|
.get('classificacaoTributaria')
|
|
3121
3394
|
.valueChanges.pipe(operators.startWith(formGroup.get('classificacaoTributaria').value), operators.distinctUntilChanged()),
|
|
3122
3395
|
formGroup
|
|
3123
|
-
.get(
|
|
3124
|
-
.valueChanges.pipe(operators.startWith(formGroup.get(
|
|
3396
|
+
.get(exports.EnumCampoTributo.AplicarValorLiquidoDocumento)
|
|
3397
|
+
.valueChanges.pipe(operators.startWith(formGroup.get(exports.EnumCampoTributo.AplicarValorLiquidoDocumento).value), operators.distinctUntilChanged())
|
|
3125
3398
|
])
|
|
3126
3399
|
.pipe(operators.map(function (_a) {
|
|
3127
|
-
var _b = __read(_a, 7), taxableBase = _b[0], taxRate = _b[1], effectiveTaxRate = _b[2], taxAmount = _b[3], taxSituation = _b[4], taxClassication = _b[5],
|
|
3400
|
+
var _b = __read(_a, 7), taxableBase = _b[0], taxRate = _b[1], effectiveTaxRate = _b[2], taxAmount = _b[3], taxSituation = _b[4], taxClassication = _b[5], applyNetDocumentValue = _b[6];
|
|
3128
3401
|
return [
|
|
3129
3402
|
new BigNumber(taxableBase),
|
|
3130
3403
|
new BigNumber(taxRate),
|
|
@@ -3132,11 +3405,11 @@
|
|
|
3132
3405
|
new BigNumber(taxAmount),
|
|
3133
3406
|
taxSituation,
|
|
3134
3407
|
taxClassication,
|
|
3135
|
-
|
|
3408
|
+
applyNetDocumentValue
|
|
3136
3409
|
];
|
|
3137
3410
|
}))
|
|
3138
3411
|
.subscribe(function (_a) {
|
|
3139
|
-
var _b = __read(_a, 7), taxableBase = _b[0], taxRate = _b[1], effectiveTaxRate = _b[2], taxAmount = _b[3], taxSituation = _b[4], taxClassication = _b[5],
|
|
3412
|
+
var _b = __read(_a, 7), taxableBase = _b[0], taxRate = _b[1], effectiveTaxRate = _b[2], taxAmount = _b[3], taxSituation = _b[4], taxClassication = _b[5], applyNetDocumentValue = _b[6];
|
|
3140
3413
|
var validators = [];
|
|
3141
3414
|
if (taxableBase.isFinite() ||
|
|
3142
3415
|
taxRate.isFinite() ||
|
|
@@ -3144,8 +3417,7 @@
|
|
|
3144
3417
|
taxAmount.isFinite() ||
|
|
3145
3418
|
taxSituation ||
|
|
3146
3419
|
taxClassication ||
|
|
3147
|
-
|
|
3148
|
-
netValueOperation === false) {
|
|
3420
|
+
applyNetDocumentValue) {
|
|
3149
3421
|
validators = [forms.Validators.max(999.9999), forms.Validators.required];
|
|
3150
3422
|
}
|
|
3151
3423
|
else {
|
|
@@ -3227,30 +3499,29 @@
|
|
|
3227
3499
|
.get('classificacaoTributaria')
|
|
3228
3500
|
.valueChanges.pipe(operators.startWith(formGroup.get('classificacaoTributaria').value), operators.distinctUntilChanged()),
|
|
3229
3501
|
formGroup
|
|
3230
|
-
.get(
|
|
3231
|
-
.valueChanges.pipe(operators.startWith(formGroup.get(
|
|
3502
|
+
.get(exports.EnumCampoTributo.AplicarValorLiquidoDocumento)
|
|
3503
|
+
.valueChanges.pipe(operators.startWith(formGroup.get(exports.EnumCampoTributo.AplicarValorLiquidoDocumento).value), operators.distinctUntilChanged())
|
|
3232
3504
|
])
|
|
3233
3505
|
.pipe(operators.map(function (_a) {
|
|
3234
|
-
var _b = __read(_a, 6), taxableBase = _b[0], taxRate = _b[1], taxAmount = _b[2], taxSituation = _b[3], taxClassication = _b[4],
|
|
3506
|
+
var _b = __read(_a, 6), taxableBase = _b[0], taxRate = _b[1], taxAmount = _b[2], taxSituation = _b[3], taxClassication = _b[4], applyNetDocumentValue = _b[5];
|
|
3235
3507
|
return [
|
|
3236
3508
|
new BigNumber(taxableBase),
|
|
3237
3509
|
new BigNumber(taxRate),
|
|
3238
3510
|
new BigNumber(taxAmount),
|
|
3239
3511
|
taxSituation,
|
|
3240
3512
|
taxClassication,
|
|
3241
|
-
|
|
3513
|
+
applyNetDocumentValue
|
|
3242
3514
|
];
|
|
3243
3515
|
}))
|
|
3244
3516
|
.subscribe(function (_a) {
|
|
3245
|
-
var _b = __read(_a, 6), taxableBase = _b[0], taxRate = _b[1], taxAmount = _b[2], taxSituation = _b[3], taxClassication = _b[4],
|
|
3517
|
+
var _b = __read(_a, 6), taxableBase = _b[0], taxRate = _b[1], taxAmount = _b[2], taxSituation = _b[3], taxClassication = _b[4], applyNetDocumentValue = _b[5];
|
|
3246
3518
|
var validators = [];
|
|
3247
3519
|
if (taxableBase.isFinite() ||
|
|
3248
3520
|
taxRate.isFinite() ||
|
|
3249
3521
|
taxAmount.isFinite() ||
|
|
3250
3522
|
taxSituation ||
|
|
3251
3523
|
taxClassication ||
|
|
3252
|
-
|
|
3253
|
-
netValueOperation === false) {
|
|
3524
|
+
applyNetDocumentValue) {
|
|
3254
3525
|
validators = [forms.Validators.max(999.9999), forms.Validators.required];
|
|
3255
3526
|
}
|
|
3256
3527
|
else {
|
|
@@ -3280,10 +3551,10 @@
|
|
|
3280
3551
|
var _b = __read(_a, 2), taxableBase = _b[0], taxRate = _b[1];
|
|
3281
3552
|
var validators = [];
|
|
3282
3553
|
if (taxableBase.isFinite() || taxRate.isFinite()) {
|
|
3283
|
-
validators = [forms.Validators.max(
|
|
3554
|
+
validators = [forms.Validators.max(999.9999), forms.Validators.required];
|
|
3284
3555
|
}
|
|
3285
3556
|
else {
|
|
3286
|
-
validators = [forms.Validators.max(
|
|
3557
|
+
validators = [forms.Validators.max(999.9999)];
|
|
3287
3558
|
}
|
|
3288
3559
|
formGroup.get('aliquota').setValidators(validators);
|
|
3289
3560
|
formGroup.get('aliquota').updateValueAndValidity({ emitEvent: false });
|
|
@@ -3296,7 +3567,6 @@
|
|
|
3296
3567
|
}
|
|
3297
3568
|
break;
|
|
3298
3569
|
case exports.EnumTipoTributo.CBS_CREDITO_PRESUMIDO:
|
|
3299
|
-
case exports.EnumTipoTributo.IBS_ESTADUAL_CREDITO_PRESUMIDO:
|
|
3300
3570
|
{
|
|
3301
3571
|
switch (documentType) {
|
|
3302
3572
|
case exports.EnumTipoDocumento.NF_ENTRADA:
|
|
@@ -3321,10 +3591,10 @@
|
|
|
3321
3591
|
var _b = __read(_a, 3), taxableBase = _b[0], taxRate = _b[1], taxClassication = _b[2];
|
|
3322
3592
|
var validators = [];
|
|
3323
3593
|
if (taxableBase.isFinite() || taxRate.isFinite() || taxClassication) {
|
|
3324
|
-
validators = [forms.Validators.max(
|
|
3594
|
+
validators = [forms.Validators.max(999.9999), forms.Validators.required];
|
|
3325
3595
|
}
|
|
3326
3596
|
else {
|
|
3327
|
-
validators = [forms.Validators.max(
|
|
3597
|
+
validators = [forms.Validators.max(999.9999)];
|
|
3328
3598
|
}
|
|
3329
3599
|
formGroup.get('aliquota').setValidators(validators);
|
|
3330
3600
|
formGroup.get('aliquota').updateValueAndValidity({ emitEvent: false });
|
|
@@ -3350,10 +3620,87 @@
|
|
|
3350
3620
|
var _b = __read(_a, 2), taxableBase = _b[0], taxRate = _b[1];
|
|
3351
3621
|
var validators = [];
|
|
3352
3622
|
if (taxableBase.isFinite() || taxRate.isFinite()) {
|
|
3353
|
-
validators = [forms.Validators.max(
|
|
3623
|
+
validators = [forms.Validators.max(999.9999), forms.Validators.required];
|
|
3354
3624
|
}
|
|
3355
3625
|
else {
|
|
3356
|
-
validators = [forms.Validators.max(
|
|
3626
|
+
validators = [forms.Validators.max(999.9999)];
|
|
3627
|
+
}
|
|
3628
|
+
formGroup.get('aliquota').setValidators(validators);
|
|
3629
|
+
formGroup.get('aliquota').updateValueAndValidity({ emitEvent: false });
|
|
3630
|
+
});
|
|
3631
|
+
}
|
|
3632
|
+
break;
|
|
3633
|
+
default:
|
|
3634
|
+
throw new Error("Regra TaxRateRequiredValidationRule n\u00E3o implementada para o imposto " + taxType + ", documento " + documentType + ".");
|
|
3635
|
+
}
|
|
3636
|
+
}
|
|
3637
|
+
break;
|
|
3638
|
+
case exports.EnumTipoTributo.IBS_CREDITO_PRESUMIDO:
|
|
3639
|
+
{
|
|
3640
|
+
switch (documentType) {
|
|
3641
|
+
case exports.EnumTipoDocumento.NF_ENTRADA:
|
|
3642
|
+
case exports.EnumTipoDocumento.NF_SAIDA:
|
|
3643
|
+
{
|
|
3644
|
+
rxjs.combineLatest([
|
|
3645
|
+
formGroup
|
|
3646
|
+
.get('baseCalculo')
|
|
3647
|
+
.valueChanges.pipe(operators.startWith(formGroup.get('baseCalculo').value), operators.distinctUntilChanged()),
|
|
3648
|
+
formGroup
|
|
3649
|
+
.get('aliquota')
|
|
3650
|
+
.valueChanges.pipe(operators.startWith(formGroup.get('aliquota').value), operators.distinctUntilChanged()),
|
|
3651
|
+
formGroup
|
|
3652
|
+
.get('classificacaoTributaria')
|
|
3653
|
+
.valueChanges.pipe(operators.startWith(formGroup.get('classificacaoTributaria').value), operators.distinctUntilChanged()),
|
|
3654
|
+
formGroup
|
|
3655
|
+
.get(exports.EnumCampoTributo.AplicarValorLiquidoDocumento)
|
|
3656
|
+
.valueChanges.pipe(operators.startWith(formGroup.get(exports.EnumCampoTributo.AplicarValorLiquidoDocumento).value), operators.distinctUntilChanged())
|
|
3657
|
+
])
|
|
3658
|
+
.pipe(operators.map(function (_a) {
|
|
3659
|
+
var _b = __read(_a, 4), taxableBase = _b[0], taxRate = _b[1], taxClassication = _b[2], applyNetDocumentValue = _b[3];
|
|
3660
|
+
return [
|
|
3661
|
+
new BigNumber(taxableBase),
|
|
3662
|
+
new BigNumber(taxRate),
|
|
3663
|
+
taxClassication,
|
|
3664
|
+
applyNetDocumentValue
|
|
3665
|
+
];
|
|
3666
|
+
}))
|
|
3667
|
+
.subscribe(function (_a) {
|
|
3668
|
+
var _b = __read(_a, 4), taxableBase = _b[0], taxRate = _b[1], taxClassication = _b[2], applyNetDocumentValue = _b[3];
|
|
3669
|
+
var validators = [];
|
|
3670
|
+
if (taxableBase.isFinite() || taxRate.isFinite() || taxClassication || applyNetDocumentValue) {
|
|
3671
|
+
validators = [forms.Validators.max(999.9999), forms.Validators.required];
|
|
3672
|
+
}
|
|
3673
|
+
else {
|
|
3674
|
+
validators = [forms.Validators.max(999.9999)];
|
|
3675
|
+
}
|
|
3676
|
+
formGroup.get('aliquota').setValidators(validators);
|
|
3677
|
+
formGroup.get('aliquota').updateValueAndValidity({ emitEvent: false });
|
|
3678
|
+
});
|
|
3679
|
+
}
|
|
3680
|
+
break;
|
|
3681
|
+
case exports.EnumTipoDocumento.PEDIDO_COMPRA:
|
|
3682
|
+
case exports.EnumTipoDocumento.PEDIDO_VENDA:
|
|
3683
|
+
{
|
|
3684
|
+
rxjs.combineLatest([
|
|
3685
|
+
formGroup
|
|
3686
|
+
.get('baseCalculo')
|
|
3687
|
+
.valueChanges.pipe(operators.startWith(formGroup.get('baseCalculo').value), operators.distinctUntilChanged()),
|
|
3688
|
+
formGroup
|
|
3689
|
+
.get('aliquota')
|
|
3690
|
+
.valueChanges.pipe(operators.startWith(formGroup.get('aliquota').value), operators.distinctUntilChanged())
|
|
3691
|
+
])
|
|
3692
|
+
.pipe(operators.map(function (_a) {
|
|
3693
|
+
var _b = __read(_a, 2), taxableBase = _b[0], taxRate = _b[1];
|
|
3694
|
+
return [new BigNumber(taxableBase), new BigNumber(taxRate)];
|
|
3695
|
+
}), operators.distinctUntilChanged())
|
|
3696
|
+
.subscribe(function (_a) {
|
|
3697
|
+
var _b = __read(_a, 2), taxableBase = _b[0], taxRate = _b[1];
|
|
3698
|
+
var validators = [];
|
|
3699
|
+
if (taxableBase.isFinite() || taxRate.isFinite()) {
|
|
3700
|
+
validators = [forms.Validators.max(999.9999), forms.Validators.required];
|
|
3701
|
+
}
|
|
3702
|
+
else {
|
|
3703
|
+
validators = [forms.Validators.max(999.9999)];
|
|
3357
3704
|
}
|
|
3358
3705
|
formGroup.get('aliquota').setValidators(validators);
|
|
3359
3706
|
formGroup.get('aliquota').updateValueAndValidity({ emitEvent: false });
|
|
@@ -3395,10 +3742,10 @@
|
|
|
3395
3742
|
var _b = __read(_a, 4), taxableBase = _b[0], taxRate = _b[1], taxClassication = _b[2], taxSituation = _b[3];
|
|
3396
3743
|
var validators = [];
|
|
3397
3744
|
if (taxableBase.isFinite() || taxRate.isFinite() || taxClassication || taxSituation) {
|
|
3398
|
-
validators = [forms.Validators.max(
|
|
3745
|
+
validators = [forms.Validators.max(999.9999), forms.Validators.required];
|
|
3399
3746
|
}
|
|
3400
3747
|
else {
|
|
3401
|
-
validators = [forms.Validators.max(
|
|
3748
|
+
validators = [forms.Validators.max(999.9999)];
|
|
3402
3749
|
}
|
|
3403
3750
|
formGroup.get('aliquota').setValidators(validators);
|
|
3404
3751
|
formGroup.get('aliquota').updateValueAndValidity({ emitEvent: false });
|
|
@@ -3424,10 +3771,51 @@
|
|
|
3424
3771
|
var _b = __read(_a, 2), taxableBase = _b[0], taxRate = _b[1];
|
|
3425
3772
|
var validators = [];
|
|
3426
3773
|
if (taxableBase.isFinite() || taxRate.isFinite()) {
|
|
3427
|
-
validators = [forms.Validators.max(
|
|
3774
|
+
validators = [forms.Validators.max(999.9999), forms.Validators.required];
|
|
3428
3775
|
}
|
|
3429
3776
|
else {
|
|
3430
|
-
validators = [forms.Validators.max(
|
|
3777
|
+
validators = [forms.Validators.max(999.9999)];
|
|
3778
|
+
}
|
|
3779
|
+
formGroup.get('aliquota').setValidators(validators);
|
|
3780
|
+
formGroup.get('aliquota').updateValueAndValidity({ emitEvent: false });
|
|
3781
|
+
});
|
|
3782
|
+
}
|
|
3783
|
+
break;
|
|
3784
|
+
default:
|
|
3785
|
+
throw new Error("Regra TaxRateRequiredValidationRule n\u00E3o implementada para o imposto " + taxType + ", documento " + documentType + ".");
|
|
3786
|
+
}
|
|
3787
|
+
}
|
|
3788
|
+
break;
|
|
3789
|
+
case exports.EnumTipoTributo.CBS_GOVERNAMENTAL:
|
|
3790
|
+
case exports.EnumTipoTributo.IBS_ESTADUAL_GOVERNAMENTAL:
|
|
3791
|
+
case exports.EnumTipoTributo.IBS_MUNICIPAL_GOVERNAMENTAL:
|
|
3792
|
+
{
|
|
3793
|
+
switch (documentType) {
|
|
3794
|
+
case exports.EnumTipoDocumento.NF_ENTRADA:
|
|
3795
|
+
case exports.EnumTipoDocumento.NF_SAIDA:
|
|
3796
|
+
case exports.EnumTipoDocumento.PEDIDO_COMPRA:
|
|
3797
|
+
case exports.EnumTipoDocumento.PEDIDO_VENDA:
|
|
3798
|
+
{
|
|
3799
|
+
rxjs.combineLatest([
|
|
3800
|
+
formGroup
|
|
3801
|
+
.get('baseCalculo')
|
|
3802
|
+
.valueChanges.pipe(operators.startWith(formGroup.get('baseCalculo').value), operators.distinctUntilChanged()),
|
|
3803
|
+
formGroup
|
|
3804
|
+
.get('aliquota')
|
|
3805
|
+
.valueChanges.pipe(operators.startWith(formGroup.get('aliquota').value), operators.distinctUntilChanged())
|
|
3806
|
+
])
|
|
3807
|
+
.pipe(operators.map(function (_a) {
|
|
3808
|
+
var _b = __read(_a, 2), taxableBase = _b[0], taxRate = _b[1];
|
|
3809
|
+
return [new BigNumber(taxableBase), new BigNumber(taxRate)];
|
|
3810
|
+
}))
|
|
3811
|
+
.subscribe(function (_a) {
|
|
3812
|
+
var _b = __read(_a, 2), taxableBase = _b[0], taxRate = _b[1];
|
|
3813
|
+
var validators = [];
|
|
3814
|
+
if (taxableBase.isFinite() || taxRate.isFinite()) {
|
|
3815
|
+
validators = [forms.Validators.max(999.9999), forms.Validators.required];
|
|
3816
|
+
}
|
|
3817
|
+
else {
|
|
3818
|
+
validators = [forms.Validators.max(999.9999)];
|
|
3431
3819
|
}
|
|
3432
3820
|
formGroup.get('aliquota').setValidators(validators);
|
|
3433
3821
|
formGroup.get('aliquota').updateValueAndValidity({ emitEvent: false });
|
|
@@ -3478,10 +3866,12 @@
|
|
|
3478
3866
|
.get('classificacaoTributaria')
|
|
3479
3867
|
.valueChanges.pipe(operators.startWith(formGroup.get('classificacaoTributaria').value)),
|
|
3480
3868
|
formGroup.get('valor').valueChanges.pipe(operators.startWith(formGroup.get('valor').value)),
|
|
3481
|
-
formGroup
|
|
3869
|
+
formGroup
|
|
3870
|
+
.get(exports.EnumCampoTributo.AplicarValorLiquidoDocumento)
|
|
3871
|
+
.valueChanges.pipe(operators.startWith(formGroup.get(exports.EnumCampoTributo.AplicarValorLiquidoDocumento).value))
|
|
3482
3872
|
])
|
|
3483
3873
|
.pipe(operators.map(function (_a) {
|
|
3484
|
-
var _b = __read(_a, 8), taxableBase = _b[0], taxTaxRate = _b[1], taxTaxRateReduction = _b[2], governamentalTaxRateReduction = _b[3], taxSituation = _b[4], taxClassication = _b[5], taxAmount = _b[6],
|
|
3874
|
+
var _b = __read(_a, 8), taxableBase = _b[0], taxTaxRate = _b[1], taxTaxRateReduction = _b[2], governamentalTaxRateReduction = _b[3], taxSituation = _b[4], taxClassication = _b[5], taxAmount = _b[6], applyNetDocumentValue = _b[7];
|
|
3485
3875
|
return [
|
|
3486
3876
|
new BigNumber(taxableBase),
|
|
3487
3877
|
new BigNumber(taxTaxRate),
|
|
@@ -3490,11 +3880,11 @@
|
|
|
3490
3880
|
taxSituation,
|
|
3491
3881
|
taxClassication,
|
|
3492
3882
|
new BigNumber(taxAmount),
|
|
3493
|
-
|
|
3883
|
+
applyNetDocumentValue
|
|
3494
3884
|
];
|
|
3495
3885
|
}))
|
|
3496
3886
|
.subscribe(function (_a) {
|
|
3497
|
-
var _b = __read(_a, 8), taxableBase = _b[0], taxTaxRate = _b[1], taxTaxRateReduction = _b[2], governamentalTaxRateReduction = _b[3], taxSituation = _b[4], taxClassication = _b[5], taxAmount = _b[6],
|
|
3887
|
+
var _b = __read(_a, 8), taxableBase = _b[0], taxTaxRate = _b[1], taxTaxRateReduction = _b[2], governamentalTaxRateReduction = _b[3], taxSituation = _b[4], taxClassication = _b[5], taxAmount = _b[6], applyNetDocumentValue = _b[7];
|
|
3498
3888
|
var validators = [];
|
|
3499
3889
|
if (taxableBase.isFinite() ||
|
|
3500
3890
|
taxTaxRate.isFinite() ||
|
|
@@ -3503,8 +3893,7 @@
|
|
|
3503
3893
|
taxSituation ||
|
|
3504
3894
|
taxClassication ||
|
|
3505
3895
|
taxAmount.isFinite() ||
|
|
3506
|
-
|
|
3507
|
-
netValueOperation === false) {
|
|
3896
|
+
applyNetDocumentValue) {
|
|
3508
3897
|
validators = [forms.Validators.required];
|
|
3509
3898
|
}
|
|
3510
3899
|
else {
|
|
@@ -3574,29 +3963,30 @@
|
|
|
3574
3963
|
.get('classificacaoTributaria')
|
|
3575
3964
|
.valueChanges.pipe(operators.startWith(formGroup.get('classificacaoTributaria').value)),
|
|
3576
3965
|
formGroup.get('valor').valueChanges.pipe(operators.startWith(formGroup.get('valor').value)),
|
|
3577
|
-
formGroup
|
|
3966
|
+
formGroup
|
|
3967
|
+
.get(exports.EnumCampoTributo.AplicarValorLiquidoDocumento)
|
|
3968
|
+
.valueChanges.pipe(operators.startWith(formGroup.get(exports.EnumCampoTributo.AplicarValorLiquidoDocumento).value))
|
|
3578
3969
|
])
|
|
3579
3970
|
.pipe(operators.map(function (_a) {
|
|
3580
|
-
var _b = __read(_a, 6), taxableBase = _b[0], taxTaxRate = _b[1], taxSituation = _b[2], taxClassication = _b[3], taxAmount = _b[4],
|
|
3971
|
+
var _b = __read(_a, 6), taxableBase = _b[0], taxTaxRate = _b[1], taxSituation = _b[2], taxClassication = _b[3], taxAmount = _b[4], applyNetDocumentValue = _b[5];
|
|
3581
3972
|
return [
|
|
3582
3973
|
new BigNumber(taxableBase),
|
|
3583
3974
|
new BigNumber(taxTaxRate),
|
|
3584
3975
|
taxSituation,
|
|
3585
3976
|
taxClassication,
|
|
3586
3977
|
new BigNumber(taxAmount),
|
|
3587
|
-
|
|
3978
|
+
applyNetDocumentValue
|
|
3588
3979
|
];
|
|
3589
3980
|
}))
|
|
3590
3981
|
.subscribe(function (_a) {
|
|
3591
|
-
var _b = __read(_a, 6), taxableBase = _b[0], taxTaxRate = _b[1], taxSituation = _b[2], taxClassication = _b[3], taxAmount = _b[4],
|
|
3982
|
+
var _b = __read(_a, 6), taxableBase = _b[0], taxTaxRate = _b[1], taxSituation = _b[2], taxClassication = _b[3], taxAmount = _b[4], applyNetDocumentValue = _b[5];
|
|
3592
3983
|
var validators = [];
|
|
3593
3984
|
if (taxableBase.isFinite() ||
|
|
3594
3985
|
taxTaxRate.isFinite() ||
|
|
3595
3986
|
taxSituation ||
|
|
3596
3987
|
taxClassication ||
|
|
3597
3988
|
taxAmount.isFinite() ||
|
|
3598
|
-
|
|
3599
|
-
netValueOperation === false) {
|
|
3989
|
+
applyNetDocumentValue) {
|
|
3600
3990
|
validators = [forms.Validators.required];
|
|
3601
3991
|
}
|
|
3602
3992
|
else {
|
|
@@ -3657,11 +4047,11 @@
|
|
|
3657
4047
|
.get('classificacaoTributaria')
|
|
3658
4048
|
.valueChanges.pipe(operators.startWith(formGroup.get('classificacaoTributaria').value)),
|
|
3659
4049
|
formGroup
|
|
3660
|
-
.get(
|
|
3661
|
-
.valueChanges.pipe(operators.startWith(formGroup.get(
|
|
4050
|
+
.get(exports.EnumCampoTributo.AplicarValorLiquidoDocumento)
|
|
4051
|
+
.valueChanges.pipe(operators.startWith(formGroup.get(exports.EnumCampoTributo.AplicarValorLiquidoDocumento).value), operators.distinctUntilChanged())
|
|
3662
4052
|
])
|
|
3663
4053
|
.pipe(operators.map(function (_a) {
|
|
3664
|
-
var _b = __read(_a, 7), taxableBase = _b[0], taxRate = _b[1], effectiveTaxRate = _b[2], taxAmount = _b[3], taxSituation = _b[4], taxClassication = _b[5],
|
|
4054
|
+
var _b = __read(_a, 7), taxableBase = _b[0], taxRate = _b[1], effectiveTaxRate = _b[2], taxAmount = _b[3], taxSituation = _b[4], taxClassication = _b[5], applyNetDocumentValue = _b[6];
|
|
3665
4055
|
return [
|
|
3666
4056
|
new BigNumber(taxableBase),
|
|
3667
4057
|
new BigNumber(taxRate),
|
|
@@ -3669,11 +4059,11 @@
|
|
|
3669
4059
|
new BigNumber(taxAmount),
|
|
3670
4060
|
taxSituation,
|
|
3671
4061
|
taxClassication,
|
|
3672
|
-
|
|
4062
|
+
applyNetDocumentValue
|
|
3673
4063
|
];
|
|
3674
4064
|
}))
|
|
3675
4065
|
.subscribe(function (_a) {
|
|
3676
|
-
var _b = __read(_a, 7), taxableBase = _b[0], taxRate = _b[1], effectiveTaxRate = _b[2], taxAmount = _b[3], taxSituation = _b[4], taxClassication = _b[5],
|
|
4066
|
+
var _b = __read(_a, 7), taxableBase = _b[0], taxRate = _b[1], effectiveTaxRate = _b[2], taxAmount = _b[3], taxSituation = _b[4], taxClassication = _b[5], applyNetDocumentValue = _b[6];
|
|
3677
4067
|
var validators = [];
|
|
3678
4068
|
if (taxableBase.isFinite() ||
|
|
3679
4069
|
taxRate.isFinite() ||
|
|
@@ -3681,8 +4071,7 @@
|
|
|
3681
4071
|
taxAmount.isFinite() ||
|
|
3682
4072
|
taxSituation ||
|
|
3683
4073
|
taxClassication ||
|
|
3684
|
-
|
|
3685
|
-
netValueOperation === false) {
|
|
4074
|
+
applyNetDocumentValue) {
|
|
3686
4075
|
validators = [forms.Validators.max(9999999999999.99), forms.Validators.required];
|
|
3687
4076
|
}
|
|
3688
4077
|
else {
|
|
@@ -3757,29 +4146,30 @@
|
|
|
3757
4146
|
formGroup
|
|
3758
4147
|
.get('classificacaoTributaria')
|
|
3759
4148
|
.valueChanges.pipe(operators.startWith(formGroup.get('classificacaoTributaria').value)),
|
|
3760
|
-
formGroup
|
|
4149
|
+
formGroup
|
|
4150
|
+
.get(exports.EnumCampoTributo.AplicarValorLiquidoDocumento)
|
|
4151
|
+
.valueChanges.pipe(operators.startWith(formGroup.get(exports.EnumCampoTributo.AplicarValorLiquidoDocumento).value))
|
|
3761
4152
|
])
|
|
3762
4153
|
.pipe(operators.map(function (_a) {
|
|
3763
|
-
var _b = __read(_a, 6), taxableBase = _b[0], taxRate = _b[1], taxAmount = _b[2], taxSituation = _b[3], taxClassication = _b[4],
|
|
4154
|
+
var _b = __read(_a, 6), taxableBase = _b[0], taxRate = _b[1], taxAmount = _b[2], taxSituation = _b[3], taxClassication = _b[4], applyNetDocumentValue = _b[5];
|
|
3764
4155
|
return [
|
|
3765
4156
|
new BigNumber(taxableBase),
|
|
3766
4157
|
new BigNumber(taxRate),
|
|
3767
4158
|
new BigNumber(taxAmount),
|
|
3768
4159
|
taxSituation,
|
|
3769
4160
|
taxClassication,
|
|
3770
|
-
|
|
4161
|
+
applyNetDocumentValue
|
|
3771
4162
|
];
|
|
3772
4163
|
}))
|
|
3773
4164
|
.subscribe(function (_a) {
|
|
3774
|
-
var _b = __read(_a, 6), taxableBase = _b[0], taxRate = _b[1], taxAmount = _b[2], taxSituation = _b[3], taxClassication = _b[4],
|
|
4165
|
+
var _b = __read(_a, 6), taxableBase = _b[0], taxRate = _b[1], taxAmount = _b[2], taxSituation = _b[3], taxClassication = _b[4], applyNetDocumentValue = _b[5];
|
|
3775
4166
|
var validators = [];
|
|
3776
4167
|
if (taxableBase.isFinite() ||
|
|
3777
4168
|
taxRate.isFinite() ||
|
|
3778
4169
|
taxAmount.isFinite() ||
|
|
3779
4170
|
taxSituation ||
|
|
3780
4171
|
taxClassication ||
|
|
3781
|
-
|
|
3782
|
-
netValueOperation === false) {
|
|
4172
|
+
applyNetDocumentValue) {
|
|
3783
4173
|
validators = [forms.Validators.max(9999999999999.99), forms.Validators.required];
|
|
3784
4174
|
}
|
|
3785
4175
|
else {
|
|
@@ -3821,7 +4211,6 @@
|
|
|
3821
4211
|
}
|
|
3822
4212
|
break;
|
|
3823
4213
|
case exports.EnumTipoTributo.CBS_CREDITO_PRESUMIDO:
|
|
3824
|
-
case exports.EnumTipoTributo.IBS_ESTADUAL_CREDITO_PRESUMIDO:
|
|
3825
4214
|
switch (documentType) {
|
|
3826
4215
|
case exports.EnumTipoDocumento.NF_ENTRADA:
|
|
3827
4216
|
case exports.EnumTipoDocumento.NF_SAIDA:
|
|
@@ -3888,6 +4277,81 @@
|
|
|
3888
4277
|
throw new Error("Regra TaxableBaseRequiredValidationRule n\u00E3o implementada para o imposto " + taxType + ", documento " + documentType + ".");
|
|
3889
4278
|
}
|
|
3890
4279
|
break;
|
|
4280
|
+
case exports.EnumTipoTributo.IBS_CREDITO_PRESUMIDO:
|
|
4281
|
+
switch (documentType) {
|
|
4282
|
+
case exports.EnumTipoDocumento.NF_ENTRADA:
|
|
4283
|
+
case exports.EnumTipoDocumento.NF_SAIDA:
|
|
4284
|
+
{
|
|
4285
|
+
rxjs.combineLatest([
|
|
4286
|
+
formGroup
|
|
4287
|
+
.get('baseCalculo')
|
|
4288
|
+
.valueChanges.pipe(operators.startWith(formGroup.get('baseCalculo').value), operators.distinctUntilChanged()),
|
|
4289
|
+
formGroup
|
|
4290
|
+
.get('aliquota')
|
|
4291
|
+
.valueChanges.pipe(operators.startWith(formGroup.get('aliquota').value), operators.distinctUntilChanged()),
|
|
4292
|
+
formGroup
|
|
4293
|
+
.get('classificacaoTributaria')
|
|
4294
|
+
.valueChanges.pipe(operators.startWith(formGroup.get('classificacaoTributaria').value), operators.distinctUntilChanged()),
|
|
4295
|
+
formGroup
|
|
4296
|
+
.get(exports.EnumCampoTributo.AplicarValorLiquidoDocumento)
|
|
4297
|
+
.valueChanges.pipe(operators.startWith(formGroup.get(exports.EnumCampoTributo.AplicarValorLiquidoDocumento).value), operators.distinctUntilChanged())
|
|
4298
|
+
])
|
|
4299
|
+
.pipe(operators.map(function (_a) {
|
|
4300
|
+
var _b = __read(_a, 4), taxableBase = _b[0], taxRate = _b[1], taxClassication = _b[2], applyNetDocumentValue = _b[3];
|
|
4301
|
+
return [
|
|
4302
|
+
new BigNumber(taxableBase),
|
|
4303
|
+
new BigNumber(taxRate),
|
|
4304
|
+
taxClassication,
|
|
4305
|
+
applyNetDocumentValue
|
|
4306
|
+
];
|
|
4307
|
+
}))
|
|
4308
|
+
.subscribe(function (_a) {
|
|
4309
|
+
var _b = __read(_a, 4), taxableBase = _b[0], taxRate = _b[1], taxClassication = _b[2], applyNetDocumentValue = _b[3];
|
|
4310
|
+
var validators = [];
|
|
4311
|
+
if (taxableBase.isFinite() || taxRate.isFinite() || taxClassication || applyNetDocumentValue) {
|
|
4312
|
+
validators = [forms.Validators.max(9999999999999.99), forms.Validators.required];
|
|
4313
|
+
}
|
|
4314
|
+
else {
|
|
4315
|
+
validators = [forms.Validators.max(9999999999999.99)];
|
|
4316
|
+
}
|
|
4317
|
+
formGroup.get('baseCalculo').setValidators(validators);
|
|
4318
|
+
formGroup.get('baseCalculo').updateValueAndValidity({ emitEvent: false });
|
|
4319
|
+
});
|
|
4320
|
+
}
|
|
4321
|
+
break;
|
|
4322
|
+
case exports.EnumTipoDocumento.PEDIDO_COMPRA:
|
|
4323
|
+
case exports.EnumTipoDocumento.PEDIDO_VENDA:
|
|
4324
|
+
{
|
|
4325
|
+
rxjs.combineLatest([
|
|
4326
|
+
formGroup
|
|
4327
|
+
.get('baseCalculo')
|
|
4328
|
+
.valueChanges.pipe(operators.startWith(formGroup.get('baseCalculo').value), operators.distinctUntilChanged()),
|
|
4329
|
+
formGroup
|
|
4330
|
+
.get('aliquota')
|
|
4331
|
+
.valueChanges.pipe(operators.startWith(formGroup.get('aliquota').value), operators.distinctUntilChanged())
|
|
4332
|
+
])
|
|
4333
|
+
.pipe(operators.map(function (_a) {
|
|
4334
|
+
var _b = __read(_a, 2), taxableBase = _b[0], taxRate = _b[1];
|
|
4335
|
+
return [new BigNumber(taxableBase), new BigNumber(taxRate)];
|
|
4336
|
+
}))
|
|
4337
|
+
.subscribe(function (_a) {
|
|
4338
|
+
var _b = __read(_a, 2), taxableBase = _b[0], taxRate = _b[1];
|
|
4339
|
+
var validators = [];
|
|
4340
|
+
if (taxableBase.isFinite() || taxRate.isFinite()) {
|
|
4341
|
+
validators = [forms.Validators.max(9999999999999.99), forms.Validators.required];
|
|
4342
|
+
}
|
|
4343
|
+
else {
|
|
4344
|
+
validators = [forms.Validators.max(9999999999999.99)];
|
|
4345
|
+
}
|
|
4346
|
+
formGroup.get('baseCalculo').setValidators(validators);
|
|
4347
|
+
formGroup.get('baseCalculo').updateValueAndValidity({ emitEvent: false });
|
|
4348
|
+
});
|
|
4349
|
+
}
|
|
4350
|
+
break;
|
|
4351
|
+
default:
|
|
4352
|
+
throw new Error("Regra TaxableBaseRequiredValidationRule n\u00E3o implementada para o imposto " + taxType + ", documento " + documentType + ".");
|
|
4353
|
+
}
|
|
4354
|
+
break;
|
|
3891
4355
|
case exports.EnumTipoTributo.CBS_TRIBUTACAO_REGULAR:
|
|
3892
4356
|
case exports.EnumTipoTributo.IBS_ESTADUAL_TRIBUTACAO_REGULAR:
|
|
3893
4357
|
case exports.EnumTipoTributo.IBS_MUNICIPAL_TRIBUTACAO_REGULAR:
|
|
@@ -3950,37 +4414,146 @@
|
|
|
3950
4414
|
validators = [forms.Validators.max(9999999999999.99), forms.Validators.required];
|
|
3951
4415
|
}
|
|
3952
4416
|
else {
|
|
3953
|
-
validators = [forms.Validators.max(9999999999999.99)];
|
|
4417
|
+
validators = [forms.Validators.max(9999999999999.99)];
|
|
4418
|
+
}
|
|
4419
|
+
formGroup.get('baseCalculo').setValidators(validators);
|
|
4420
|
+
formGroup.get('baseCalculo').updateValueAndValidity({ emitEvent: false });
|
|
4421
|
+
});
|
|
4422
|
+
}
|
|
4423
|
+
break;
|
|
4424
|
+
default:
|
|
4425
|
+
throw new Error("Regra TaxableBaseRequiredValidationRule n\u00E3o implementada para o imposto " + taxType + ", documento " + documentType + ".");
|
|
4426
|
+
}
|
|
4427
|
+
}
|
|
4428
|
+
break;
|
|
4429
|
+
case exports.EnumTipoTributo.CBS_GOVERNAMENTAL:
|
|
4430
|
+
case exports.EnumTipoTributo.IBS_ESTADUAL_GOVERNAMENTAL:
|
|
4431
|
+
case exports.EnumTipoTributo.IBS_MUNICIPAL_GOVERNAMENTAL:
|
|
4432
|
+
{
|
|
4433
|
+
switch (documentType) {
|
|
4434
|
+
case exports.EnumTipoDocumento.NF_ENTRADA:
|
|
4435
|
+
case exports.EnumTipoDocumento.NF_SAIDA:
|
|
4436
|
+
case exports.EnumTipoDocumento.PEDIDO_COMPRA:
|
|
4437
|
+
case exports.EnumTipoDocumento.PEDIDO_VENDA:
|
|
4438
|
+
{
|
|
4439
|
+
rxjs.combineLatest([
|
|
4440
|
+
formGroup
|
|
4441
|
+
.get('baseCalculo')
|
|
4442
|
+
.valueChanges.pipe(operators.startWith(formGroup.get('baseCalculo').value), operators.distinctUntilChanged()),
|
|
4443
|
+
formGroup
|
|
4444
|
+
.get('aliquota')
|
|
4445
|
+
.valueChanges.pipe(operators.startWith(formGroup.get('aliquota').value), operators.distinctUntilChanged())
|
|
4446
|
+
])
|
|
4447
|
+
.pipe(operators.map(function (_a) {
|
|
4448
|
+
var _b = __read(_a, 2), taxableBase = _b[0], taxRate = _b[1];
|
|
4449
|
+
return [new BigNumber(taxableBase), new BigNumber(taxRate)];
|
|
4450
|
+
}))
|
|
4451
|
+
.subscribe(function (_a) {
|
|
4452
|
+
var _b = __read(_a, 2), taxableBase = _b[0], taxRate = _b[1];
|
|
4453
|
+
var validators = [];
|
|
4454
|
+
if (taxableBase.isFinite() || taxRate.isFinite()) {
|
|
4455
|
+
validators = [forms.Validators.max(9999999999999.99), forms.Validators.required];
|
|
4456
|
+
}
|
|
4457
|
+
else {
|
|
4458
|
+
validators = [forms.Validators.max(9999999999999.99)];
|
|
4459
|
+
}
|
|
4460
|
+
formGroup.get('baseCalculo').setValidators(validators);
|
|
4461
|
+
formGroup.get('baseCalculo').updateValueAndValidity({ emitEvent: false });
|
|
4462
|
+
});
|
|
4463
|
+
}
|
|
4464
|
+
break;
|
|
4465
|
+
default:
|
|
4466
|
+
throw new Error("Regra TaxableBaseRequiredValidationRule n\u00E3o implementada para o imposto " + taxType + ", documento " + documentType + ".");
|
|
4467
|
+
}
|
|
4468
|
+
}
|
|
4469
|
+
break;
|
|
4470
|
+
default:
|
|
4471
|
+
throw new Error("Regra TaxableBaseRequiredValidationRule n\u00E3o implementada para o imposto " + taxType + ", documento " + documentType + ".");
|
|
4472
|
+
}
|
|
4473
|
+
};
|
|
4474
|
+
TaxableBaseRequiredValidationRule.ɵprov = core.ɵɵdefineInjectable({ factory: function TaxableBaseRequiredValidationRule_Factory() { return new TaxableBaseRequiredValidationRule(); }, token: TaxableBaseRequiredValidationRule, providedIn: "root" });
|
|
4475
|
+
TaxableBaseRequiredValidationRule = __decorate([
|
|
4476
|
+
core.Injectable({ providedIn: 'root' })
|
|
4477
|
+
], TaxableBaseRequiredValidationRule);
|
|
4478
|
+
return TaxableBaseRequiredValidationRule;
|
|
4479
|
+
}());
|
|
4480
|
+
|
|
4481
|
+
var NetAmountApplicationRequiredValidationRule = /** @class */ (function () {
|
|
4482
|
+
function NetAmountApplicationRequiredValidationRule() {
|
|
4483
|
+
}
|
|
4484
|
+
NetAmountApplicationRequiredValidationRule.prototype.apply = function (_a) {
|
|
4485
|
+
var documentType = _a.documentType, _b = _a.item, taxType = _b.name, formGroup = _b.formGroup;
|
|
4486
|
+
switch (taxType) {
|
|
4487
|
+
case exports.EnumTipoTributo.CBS:
|
|
4488
|
+
case exports.EnumTipoTributo.IBS_ESTADUAL:
|
|
4489
|
+
case exports.EnumTipoTributo.IBS_MUNICIPAL:
|
|
4490
|
+
case exports.EnumTipoTributo.IBS_CREDITO_PRESUMIDO:
|
|
4491
|
+
case exports.EnumTipoTributo.IS:
|
|
4492
|
+
{
|
|
4493
|
+
switch (documentType) {
|
|
4494
|
+
case exports.EnumTipoDocumento.NF_ENTRADA:
|
|
4495
|
+
case exports.EnumTipoDocumento.NF_SAIDA:
|
|
4496
|
+
{
|
|
4497
|
+
rxjs.combineLatest([
|
|
4498
|
+
formGroup.get('baseCalculo').valueChanges.pipe(operators.startWith(formGroup.get('baseCalculo').value)),
|
|
4499
|
+
formGroup.get('aliquota').valueChanges.pipe(operators.startWith(formGroup.get('aliquota').value)),
|
|
4500
|
+
formGroup
|
|
4501
|
+
.get('classificacaoTributaria')
|
|
4502
|
+
.valueChanges.pipe(operators.startWith(formGroup.get('classificacaoTributaria').value)),
|
|
4503
|
+
formGroup
|
|
4504
|
+
.get(exports.EnumCampoTributo.AplicarValorLiquidoDocumento)
|
|
4505
|
+
.valueChanges.pipe(operators.startWith(formGroup.get(exports.EnumCampoTributo.AplicarValorLiquidoDocumento).value))
|
|
4506
|
+
])
|
|
4507
|
+
.pipe(operators.map(function (_a) {
|
|
4508
|
+
var _b = __read(_a, 4), taxableBase = _b[0], taxRate = _b[1], taxClassification = _b[2], netAmountApplication = _b[3];
|
|
4509
|
+
return [
|
|
4510
|
+
new BigNumber(taxableBase),
|
|
4511
|
+
new BigNumber(taxRate),
|
|
4512
|
+
taxClassification,
|
|
4513
|
+
netAmountApplication
|
|
4514
|
+
];
|
|
4515
|
+
}))
|
|
4516
|
+
.subscribe(function (_a) {
|
|
4517
|
+
var _b = __read(_a, 4), taxableBase = _b[0], taxRate = _b[1], taxClassification = _b[2], netAmountApplication = _b[3];
|
|
4518
|
+
var validators = [];
|
|
4519
|
+
if (taxableBase.isFinite() || taxRate.isFinite() || taxClassification || netAmountApplication) {
|
|
4520
|
+
validators = [forms.Validators.required];
|
|
4521
|
+
}
|
|
4522
|
+
else {
|
|
4523
|
+
validators = [];
|
|
3954
4524
|
}
|
|
3955
|
-
formGroup.get(
|
|
3956
|
-
formGroup
|
|
4525
|
+
formGroup.get(exports.EnumCampoTributo.AplicarValorLiquidoDocumento).setValidators(validators);
|
|
4526
|
+
formGroup
|
|
4527
|
+
.get(exports.EnumCampoTributo.AplicarValorLiquidoDocumento)
|
|
4528
|
+
.updateValueAndValidity({ emitEvent: false });
|
|
3957
4529
|
});
|
|
3958
4530
|
}
|
|
3959
4531
|
break;
|
|
3960
4532
|
default:
|
|
3961
|
-
throw new Error("Regra
|
|
4533
|
+
throw new Error("Regra NetAmountApplicationRequiredValidationRule n\u00E3o implementada para o imposto " + taxType + ", documento " + documentType + ".");
|
|
3962
4534
|
}
|
|
3963
4535
|
}
|
|
3964
4536
|
break;
|
|
3965
4537
|
default:
|
|
3966
|
-
throw new Error("Regra
|
|
4538
|
+
throw new Error("Regra NetAmountApplicationRequiredValidationRule n\u00E3o implementada para o imposto " + taxType + ", documento " + documentType + ".");
|
|
3967
4539
|
}
|
|
3968
4540
|
};
|
|
3969
|
-
|
|
3970
|
-
|
|
4541
|
+
NetAmountApplicationRequiredValidationRule.ɵprov = core.ɵɵdefineInjectable({ factory: function NetAmountApplicationRequiredValidationRule_Factory() { return new NetAmountApplicationRequiredValidationRule(); }, token: NetAmountApplicationRequiredValidationRule, providedIn: "root" });
|
|
4542
|
+
NetAmountApplicationRequiredValidationRule = __decorate([
|
|
3971
4543
|
core.Injectable({ providedIn: 'root' })
|
|
3972
|
-
],
|
|
3973
|
-
return
|
|
4544
|
+
], NetAmountApplicationRequiredValidationRule);
|
|
4545
|
+
return NetAmountApplicationRequiredValidationRule;
|
|
3974
4546
|
}());
|
|
3975
4547
|
|
|
3976
4548
|
var ValidationRulesRegistry = /** @class */ (function () {
|
|
3977
|
-
function ValidationRulesRegistry(taxableBaseRequiredValidationRule, taxRateRequiredValidationRule, taxClassificationRequiredValidationRule, taxAmountRequiredValidationRule, taxSituationRequiredValidationRule) {
|
|
4549
|
+
function ValidationRulesRegistry(taxableBaseRequiredValidationRule, taxRateRequiredValidationRule, taxClassificationRequiredValidationRule, taxAmountRequiredValidationRule, taxSituationRequiredValidationRule, netAmountApplicationRequiredValidationRule) {
|
|
3978
4550
|
var _a, _b, _c, _d, _e;
|
|
3979
4551
|
this.taxableBaseRequiredValidationRule = taxableBaseRequiredValidationRule;
|
|
3980
4552
|
this.taxRateRequiredValidationRule = taxRateRequiredValidationRule;
|
|
3981
4553
|
this.taxClassificationRequiredValidationRule = taxClassificationRequiredValidationRule;
|
|
3982
4554
|
this.taxAmountRequiredValidationRule = taxAmountRequiredValidationRule;
|
|
3983
4555
|
this.taxSituationRequiredValidationRule = taxSituationRequiredValidationRule;
|
|
4556
|
+
this.netAmountApplicationRequiredValidationRule = netAmountApplicationRequiredValidationRule;
|
|
3984
4557
|
this.strategies = (_a = {},
|
|
3985
4558
|
_a[exports.EnumTipoDocumento.NF_ENTRADA] = (_b = {},
|
|
3986
4559
|
_b[exports.EnumTipoTributo.CBS] = [
|
|
@@ -4003,6 +4576,10 @@
|
|
|
4003
4576
|
{
|
|
4004
4577
|
field: exports.EnumCampoTributo.SituacaoTributaria,
|
|
4005
4578
|
rules: [this.taxSituationRequiredValidationRule]
|
|
4579
|
+
},
|
|
4580
|
+
{
|
|
4581
|
+
field: exports.EnumCampoTributo.AplicarValorLiquidoDocumento,
|
|
4582
|
+
rules: [this.netAmountApplicationRequiredValidationRule]
|
|
4006
4583
|
}
|
|
4007
4584
|
],
|
|
4008
4585
|
_b[exports.EnumTipoTributo.CBS_CREDITO_PRESUMIDO] = [
|
|
@@ -4037,6 +4614,16 @@
|
|
|
4037
4614
|
rules: [this.taxSituationRequiredValidationRule]
|
|
4038
4615
|
}
|
|
4039
4616
|
],
|
|
4617
|
+
_b[exports.EnumTipoTributo.CBS_GOVERNAMENTAL] = [
|
|
4618
|
+
{
|
|
4619
|
+
field: exports.EnumCampoTributo.BaseCalculo,
|
|
4620
|
+
rules: [this.taxableBaseRequiredValidationRule]
|
|
4621
|
+
},
|
|
4622
|
+
{
|
|
4623
|
+
field: exports.EnumCampoTributo.Aliquota,
|
|
4624
|
+
rules: [this.taxRateRequiredValidationRule]
|
|
4625
|
+
}
|
|
4626
|
+
],
|
|
4040
4627
|
_b[exports.EnumTipoTributo.IBS_ESTADUAL] = [
|
|
4041
4628
|
{
|
|
4042
4629
|
field: exports.EnumCampoTributo.BaseCalculo,
|
|
@@ -4057,9 +4644,13 @@
|
|
|
4057
4644
|
{
|
|
4058
4645
|
field: exports.EnumCampoTributo.SituacaoTributaria,
|
|
4059
4646
|
rules: [this.taxSituationRequiredValidationRule]
|
|
4647
|
+
},
|
|
4648
|
+
{
|
|
4649
|
+
field: exports.EnumCampoTributo.AplicarValorLiquidoDocumento,
|
|
4650
|
+
rules: [this.netAmountApplicationRequiredValidationRule]
|
|
4060
4651
|
}
|
|
4061
4652
|
],
|
|
4062
|
-
_b[exports.EnumTipoTributo.
|
|
4653
|
+
_b[exports.EnumTipoTributo.IBS_ESTADUAL_TRIBUTACAO_REGULAR] = [
|
|
4063
4654
|
{
|
|
4064
4655
|
field: exports.EnumCampoTributo.BaseCalculo,
|
|
4065
4656
|
rules: [this.taxableBaseRequiredValidationRule]
|
|
@@ -4069,11 +4660,15 @@
|
|
|
4069
4660
|
rules: [this.taxRateRequiredValidationRule]
|
|
4070
4661
|
},
|
|
4071
4662
|
{
|
|
4072
|
-
field: exports.EnumCampoTributo.
|
|
4663
|
+
field: exports.EnumCampoTributo.ClassificacaoTributaria,
|
|
4073
4664
|
rules: [this.taxClassificationRequiredValidationRule]
|
|
4665
|
+
},
|
|
4666
|
+
{
|
|
4667
|
+
field: exports.EnumCampoTributo.SituacaoTributaria,
|
|
4668
|
+
rules: [this.taxSituationRequiredValidationRule]
|
|
4074
4669
|
}
|
|
4075
4670
|
],
|
|
4076
|
-
_b[exports.EnumTipoTributo.
|
|
4671
|
+
_b[exports.EnumTipoTributo.IBS_ESTADUAL_GOVERNAMENTAL] = [
|
|
4077
4672
|
{
|
|
4078
4673
|
field: exports.EnumCampoTributo.BaseCalculo,
|
|
4079
4674
|
rules: [this.taxableBaseRequiredValidationRule]
|
|
@@ -4081,14 +4676,6 @@
|
|
|
4081
4676
|
{
|
|
4082
4677
|
field: exports.EnumCampoTributo.Aliquota,
|
|
4083
4678
|
rules: [this.taxRateRequiredValidationRule]
|
|
4084
|
-
},
|
|
4085
|
-
{
|
|
4086
|
-
field: exports.EnumCampoTributo.ClassificacaoTributaria,
|
|
4087
|
-
rules: [this.taxClassificationRequiredValidationRule]
|
|
4088
|
-
},
|
|
4089
|
-
{
|
|
4090
|
-
field: exports.EnumCampoTributo.SituacaoTributaria,
|
|
4091
|
-
rules: [this.taxSituationRequiredValidationRule]
|
|
4092
4679
|
}
|
|
4093
4680
|
],
|
|
4094
4681
|
_b[exports.EnumTipoTributo.IBS_MUNICIPAL] = [
|
|
@@ -4111,6 +4698,10 @@
|
|
|
4111
4698
|
{
|
|
4112
4699
|
field: exports.EnumCampoTributo.SituacaoTributaria,
|
|
4113
4700
|
rules: [this.taxSituationRequiredValidationRule]
|
|
4701
|
+
},
|
|
4702
|
+
{
|
|
4703
|
+
field: exports.EnumCampoTributo.AplicarValorLiquidoDocumento,
|
|
4704
|
+
rules: [this.netAmountApplicationRequiredValidationRule]
|
|
4114
4705
|
}
|
|
4115
4706
|
],
|
|
4116
4707
|
_b[exports.EnumTipoTributo.IBS_MUNICIPAL_TRIBUTACAO_REGULAR] = [
|
|
@@ -4131,6 +4722,34 @@
|
|
|
4131
4722
|
rules: [this.taxSituationRequiredValidationRule]
|
|
4132
4723
|
}
|
|
4133
4724
|
],
|
|
4725
|
+
_b[exports.EnumTipoTributo.IBS_MUNICIPAL_GOVERNAMENTAL] = [
|
|
4726
|
+
{
|
|
4727
|
+
field: exports.EnumCampoTributo.BaseCalculo,
|
|
4728
|
+
rules: [this.taxableBaseRequiredValidationRule]
|
|
4729
|
+
},
|
|
4730
|
+
{
|
|
4731
|
+
field: exports.EnumCampoTributo.Aliquota,
|
|
4732
|
+
rules: [this.taxRateRequiredValidationRule]
|
|
4733
|
+
}
|
|
4734
|
+
],
|
|
4735
|
+
_b[exports.EnumTipoTributo.IBS_CREDITO_PRESUMIDO] = [
|
|
4736
|
+
{
|
|
4737
|
+
field: exports.EnumCampoTributo.BaseCalculo,
|
|
4738
|
+
rules: [this.taxableBaseRequiredValidationRule]
|
|
4739
|
+
},
|
|
4740
|
+
{
|
|
4741
|
+
field: exports.EnumCampoTributo.Aliquota,
|
|
4742
|
+
rules: [this.taxRateRequiredValidationRule]
|
|
4743
|
+
},
|
|
4744
|
+
{
|
|
4745
|
+
field: exports.EnumCampoTributo.ClassificacaoTributariaCreditoPresumido,
|
|
4746
|
+
rules: [this.taxClassificationRequiredValidationRule]
|
|
4747
|
+
},
|
|
4748
|
+
{
|
|
4749
|
+
field: exports.EnumCampoTributo.AplicarValorLiquidoDocumento,
|
|
4750
|
+
rules: [this.netAmountApplicationRequiredValidationRule]
|
|
4751
|
+
}
|
|
4752
|
+
],
|
|
4134
4753
|
_b[exports.EnumTipoTributo.IS] = [
|
|
4135
4754
|
{
|
|
4136
4755
|
field: exports.EnumCampoTributo.BaseCalculo,
|
|
@@ -4147,6 +4766,10 @@
|
|
|
4147
4766
|
{
|
|
4148
4767
|
field: exports.EnumCampoTributo.SituacaoTributaria,
|
|
4149
4768
|
rules: [this.taxSituationRequiredValidationRule]
|
|
4769
|
+
},
|
|
4770
|
+
{
|
|
4771
|
+
field: exports.EnumCampoTributo.AplicarValorLiquidoDocumento,
|
|
4772
|
+
rules: [this.netAmountApplicationRequiredValidationRule]
|
|
4150
4773
|
}
|
|
4151
4774
|
],
|
|
4152
4775
|
_b),
|
|
@@ -4171,6 +4794,10 @@
|
|
|
4171
4794
|
{
|
|
4172
4795
|
field: exports.EnumCampoTributo.SituacaoTributaria,
|
|
4173
4796
|
rules: [this.taxSituationRequiredValidationRule]
|
|
4797
|
+
},
|
|
4798
|
+
{
|
|
4799
|
+
field: exports.EnumCampoTributo.AplicarValorLiquidoDocumento,
|
|
4800
|
+
rules: [this.netAmountApplicationRequiredValidationRule]
|
|
4174
4801
|
}
|
|
4175
4802
|
],
|
|
4176
4803
|
_c[exports.EnumTipoTributo.CBS_CREDITO_PRESUMIDO] = [
|
|
@@ -4205,6 +4832,16 @@
|
|
|
4205
4832
|
rules: [this.taxSituationRequiredValidationRule]
|
|
4206
4833
|
}
|
|
4207
4834
|
],
|
|
4835
|
+
_c[exports.EnumTipoTributo.CBS_GOVERNAMENTAL] = [
|
|
4836
|
+
{
|
|
4837
|
+
field: exports.EnumCampoTributo.BaseCalculo,
|
|
4838
|
+
rules: [this.taxableBaseRequiredValidationRule]
|
|
4839
|
+
},
|
|
4840
|
+
{
|
|
4841
|
+
field: exports.EnumCampoTributo.Aliquota,
|
|
4842
|
+
rules: [this.taxRateRequiredValidationRule]
|
|
4843
|
+
}
|
|
4844
|
+
],
|
|
4208
4845
|
_c[exports.EnumTipoTributo.IBS_ESTADUAL] = [
|
|
4209
4846
|
{
|
|
4210
4847
|
field: exports.EnumCampoTributo.BaseCalculo,
|
|
@@ -4225,9 +4862,13 @@
|
|
|
4225
4862
|
{
|
|
4226
4863
|
field: exports.EnumCampoTributo.SituacaoTributaria,
|
|
4227
4864
|
rules: [this.taxSituationRequiredValidationRule]
|
|
4865
|
+
},
|
|
4866
|
+
{
|
|
4867
|
+
field: exports.EnumCampoTributo.AplicarValorLiquidoDocumento,
|
|
4868
|
+
rules: [this.netAmountApplicationRequiredValidationRule]
|
|
4228
4869
|
}
|
|
4229
4870
|
],
|
|
4230
|
-
_c[exports.EnumTipoTributo.
|
|
4871
|
+
_c[exports.EnumTipoTributo.IBS_ESTADUAL_TRIBUTACAO_REGULAR] = [
|
|
4231
4872
|
{
|
|
4232
4873
|
field: exports.EnumCampoTributo.BaseCalculo,
|
|
4233
4874
|
rules: [this.taxableBaseRequiredValidationRule]
|
|
@@ -4237,11 +4878,15 @@
|
|
|
4237
4878
|
rules: [this.taxRateRequiredValidationRule]
|
|
4238
4879
|
},
|
|
4239
4880
|
{
|
|
4240
|
-
field: exports.EnumCampoTributo.
|
|
4881
|
+
field: exports.EnumCampoTributo.ClassificacaoTributaria,
|
|
4241
4882
|
rules: [this.taxClassificationRequiredValidationRule]
|
|
4883
|
+
},
|
|
4884
|
+
{
|
|
4885
|
+
field: exports.EnumCampoTributo.SituacaoTributaria,
|
|
4886
|
+
rules: [this.taxSituationRequiredValidationRule]
|
|
4242
4887
|
}
|
|
4243
4888
|
],
|
|
4244
|
-
_c[exports.EnumTipoTributo.
|
|
4889
|
+
_c[exports.EnumTipoTributo.IBS_ESTADUAL_GOVERNAMENTAL] = [
|
|
4245
4890
|
{
|
|
4246
4891
|
field: exports.EnumCampoTributo.BaseCalculo,
|
|
4247
4892
|
rules: [this.taxableBaseRequiredValidationRule]
|
|
@@ -4249,14 +4894,6 @@
|
|
|
4249
4894
|
{
|
|
4250
4895
|
field: exports.EnumCampoTributo.Aliquota,
|
|
4251
4896
|
rules: [this.taxRateRequiredValidationRule]
|
|
4252
|
-
},
|
|
4253
|
-
{
|
|
4254
|
-
field: exports.EnumCampoTributo.ClassificacaoTributaria,
|
|
4255
|
-
rules: [this.taxClassificationRequiredValidationRule]
|
|
4256
|
-
},
|
|
4257
|
-
{
|
|
4258
|
-
field: exports.EnumCampoTributo.SituacaoTributaria,
|
|
4259
|
-
rules: [this.taxSituationRequiredValidationRule]
|
|
4260
4897
|
}
|
|
4261
4898
|
],
|
|
4262
4899
|
_c[exports.EnumTipoTributo.IBS_MUNICIPAL] = [
|
|
@@ -4279,6 +4916,10 @@
|
|
|
4279
4916
|
{
|
|
4280
4917
|
field: exports.EnumCampoTributo.SituacaoTributaria,
|
|
4281
4918
|
rules: [this.taxSituationRequiredValidationRule]
|
|
4919
|
+
},
|
|
4920
|
+
{
|
|
4921
|
+
field: exports.EnumCampoTributo.AplicarValorLiquidoDocumento,
|
|
4922
|
+
rules: [this.netAmountApplicationRequiredValidationRule]
|
|
4282
4923
|
}
|
|
4283
4924
|
],
|
|
4284
4925
|
_c[exports.EnumTipoTributo.IBS_MUNICIPAL_TRIBUTACAO_REGULAR] = [
|
|
@@ -4299,6 +4940,34 @@
|
|
|
4299
4940
|
rules: [this.taxSituationRequiredValidationRule]
|
|
4300
4941
|
}
|
|
4301
4942
|
],
|
|
4943
|
+
_c[exports.EnumTipoTributo.IBS_MUNICIPAL_GOVERNAMENTAL] = [
|
|
4944
|
+
{
|
|
4945
|
+
field: exports.EnumCampoTributo.BaseCalculo,
|
|
4946
|
+
rules: [this.taxableBaseRequiredValidationRule]
|
|
4947
|
+
},
|
|
4948
|
+
{
|
|
4949
|
+
field: exports.EnumCampoTributo.Aliquota,
|
|
4950
|
+
rules: [this.taxRateRequiredValidationRule]
|
|
4951
|
+
}
|
|
4952
|
+
],
|
|
4953
|
+
_c[exports.EnumTipoTributo.IBS_CREDITO_PRESUMIDO] = [
|
|
4954
|
+
{
|
|
4955
|
+
field: exports.EnumCampoTributo.BaseCalculo,
|
|
4956
|
+
rules: [this.taxableBaseRequiredValidationRule]
|
|
4957
|
+
},
|
|
4958
|
+
{
|
|
4959
|
+
field: exports.EnumCampoTributo.Aliquota,
|
|
4960
|
+
rules: [this.taxRateRequiredValidationRule]
|
|
4961
|
+
},
|
|
4962
|
+
{
|
|
4963
|
+
field: exports.EnumCampoTributo.ClassificacaoTributariaCreditoPresumido,
|
|
4964
|
+
rules: [this.taxClassificationRequiredValidationRule]
|
|
4965
|
+
},
|
|
4966
|
+
{
|
|
4967
|
+
field: exports.EnumCampoTributo.AplicarValorLiquidoDocumento,
|
|
4968
|
+
rules: [this.netAmountApplicationRequiredValidationRule]
|
|
4969
|
+
}
|
|
4970
|
+
],
|
|
4302
4971
|
_c[exports.EnumTipoTributo.IS] = [
|
|
4303
4972
|
{
|
|
4304
4973
|
field: exports.EnumCampoTributo.BaseCalculo,
|
|
@@ -4315,6 +4984,10 @@
|
|
|
4315
4984
|
{
|
|
4316
4985
|
field: exports.EnumCampoTributo.SituacaoTributaria,
|
|
4317
4986
|
rules: [this.taxSituationRequiredValidationRule]
|
|
4987
|
+
},
|
|
4988
|
+
{
|
|
4989
|
+
field: exports.EnumCampoTributo.AplicarValorLiquidoDocumento,
|
|
4990
|
+
rules: [this.netAmountApplicationRequiredValidationRule]
|
|
4318
4991
|
}
|
|
4319
4992
|
],
|
|
4320
4993
|
_c),
|
|
@@ -4353,6 +5026,16 @@
|
|
|
4353
5026
|
rules: [this.taxRateRequiredValidationRule]
|
|
4354
5027
|
}
|
|
4355
5028
|
],
|
|
5029
|
+
_d[exports.EnumTipoTributo.CBS_GOVERNAMENTAL] = [
|
|
5030
|
+
{
|
|
5031
|
+
field: exports.EnumCampoTributo.BaseCalculo,
|
|
5032
|
+
rules: [this.taxableBaseRequiredValidationRule]
|
|
5033
|
+
},
|
|
5034
|
+
{
|
|
5035
|
+
field: exports.EnumCampoTributo.Aliquota,
|
|
5036
|
+
rules: [this.taxRateRequiredValidationRule]
|
|
5037
|
+
}
|
|
5038
|
+
],
|
|
4356
5039
|
_d[exports.EnumTipoTributo.IBS_ESTADUAL] = [
|
|
4357
5040
|
{
|
|
4358
5041
|
field: exports.EnumCampoTributo.BaseCalculo,
|
|
@@ -4367,7 +5050,7 @@
|
|
|
4367
5050
|
rules: [this.taxAmountRequiredValidationRule]
|
|
4368
5051
|
}
|
|
4369
5052
|
],
|
|
4370
|
-
_d[exports.EnumTipoTributo.
|
|
5053
|
+
_d[exports.EnumTipoTributo.IBS_ESTADUAL_TRIBUTACAO_REGULAR] = [
|
|
4371
5054
|
{
|
|
4372
5055
|
field: exports.EnumCampoTributo.BaseCalculo,
|
|
4373
5056
|
rules: [this.taxableBaseRequiredValidationRule]
|
|
@@ -4377,7 +5060,7 @@
|
|
|
4377
5060
|
rules: [this.taxRateRequiredValidationRule]
|
|
4378
5061
|
}
|
|
4379
5062
|
],
|
|
4380
|
-
_d[exports.EnumTipoTributo.
|
|
5063
|
+
_d[exports.EnumTipoTributo.IBS_ESTADUAL_GOVERNAMENTAL] = [
|
|
4381
5064
|
{
|
|
4382
5065
|
field: exports.EnumCampoTributo.BaseCalculo,
|
|
4383
5066
|
rules: [this.taxableBaseRequiredValidationRule]
|
|
@@ -4411,6 +5094,26 @@
|
|
|
4411
5094
|
rules: [this.taxRateRequiredValidationRule]
|
|
4412
5095
|
}
|
|
4413
5096
|
],
|
|
5097
|
+
_d[exports.EnumTipoTributo.IBS_MUNICIPAL_GOVERNAMENTAL] = [
|
|
5098
|
+
{
|
|
5099
|
+
field: exports.EnumCampoTributo.BaseCalculo,
|
|
5100
|
+
rules: [this.taxableBaseRequiredValidationRule]
|
|
5101
|
+
},
|
|
5102
|
+
{
|
|
5103
|
+
field: exports.EnumCampoTributo.Aliquota,
|
|
5104
|
+
rules: [this.taxRateRequiredValidationRule]
|
|
5105
|
+
}
|
|
5106
|
+
],
|
|
5107
|
+
_d[exports.EnumTipoTributo.IBS_CREDITO_PRESUMIDO] = [
|
|
5108
|
+
{
|
|
5109
|
+
field: exports.EnumCampoTributo.BaseCalculo,
|
|
5110
|
+
rules: [this.taxableBaseRequiredValidationRule]
|
|
5111
|
+
},
|
|
5112
|
+
{
|
|
5113
|
+
field: exports.EnumCampoTributo.Aliquota,
|
|
5114
|
+
rules: [this.taxRateRequiredValidationRule]
|
|
5115
|
+
}
|
|
5116
|
+
],
|
|
4414
5117
|
_d[exports.EnumTipoTributo.IS] = [
|
|
4415
5118
|
{
|
|
4416
5119
|
field: exports.EnumCampoTributo.BaseCalculo,
|
|
@@ -4457,6 +5160,16 @@
|
|
|
4457
5160
|
rules: [this.taxRateRequiredValidationRule]
|
|
4458
5161
|
}
|
|
4459
5162
|
],
|
|
5163
|
+
_e[exports.EnumTipoTributo.CBS_GOVERNAMENTAL] = [
|
|
5164
|
+
{
|
|
5165
|
+
field: exports.EnumCampoTributo.BaseCalculo,
|
|
5166
|
+
rules: [this.taxableBaseRequiredValidationRule]
|
|
5167
|
+
},
|
|
5168
|
+
{
|
|
5169
|
+
field: exports.EnumCampoTributo.Aliquota,
|
|
5170
|
+
rules: [this.taxRateRequiredValidationRule]
|
|
5171
|
+
}
|
|
5172
|
+
],
|
|
4460
5173
|
_e[exports.EnumTipoTributo.IBS_ESTADUAL] = [
|
|
4461
5174
|
{
|
|
4462
5175
|
field: exports.EnumCampoTributo.BaseCalculo,
|
|
@@ -4471,7 +5184,7 @@
|
|
|
4471
5184
|
rules: [this.taxAmountRequiredValidationRule]
|
|
4472
5185
|
}
|
|
4473
5186
|
],
|
|
4474
|
-
_e[exports.EnumTipoTributo.
|
|
5187
|
+
_e[exports.EnumTipoTributo.IBS_ESTADUAL_TRIBUTACAO_REGULAR] = [
|
|
4475
5188
|
{
|
|
4476
5189
|
field: exports.EnumCampoTributo.BaseCalculo,
|
|
4477
5190
|
rules: [this.taxableBaseRequiredValidationRule]
|
|
@@ -4481,7 +5194,7 @@
|
|
|
4481
5194
|
rules: [this.taxRateRequiredValidationRule]
|
|
4482
5195
|
}
|
|
4483
5196
|
],
|
|
4484
|
-
_e[exports.EnumTipoTributo.
|
|
5197
|
+
_e[exports.EnumTipoTributo.IBS_ESTADUAL_GOVERNAMENTAL] = [
|
|
4485
5198
|
{
|
|
4486
5199
|
field: exports.EnumCampoTributo.BaseCalculo,
|
|
4487
5200
|
rules: [this.taxableBaseRequiredValidationRule]
|
|
@@ -4515,6 +5228,26 @@
|
|
|
4515
5228
|
rules: [this.taxRateRequiredValidationRule]
|
|
4516
5229
|
}
|
|
4517
5230
|
],
|
|
5231
|
+
_e[exports.EnumTipoTributo.IBS_MUNICIPAL_GOVERNAMENTAL] = [
|
|
5232
|
+
{
|
|
5233
|
+
field: exports.EnumCampoTributo.BaseCalculo,
|
|
5234
|
+
rules: [this.taxableBaseRequiredValidationRule]
|
|
5235
|
+
},
|
|
5236
|
+
{
|
|
5237
|
+
field: exports.EnumCampoTributo.Aliquota,
|
|
5238
|
+
rules: [this.taxRateRequiredValidationRule]
|
|
5239
|
+
}
|
|
5240
|
+
],
|
|
5241
|
+
_e[exports.EnumTipoTributo.IBS_CREDITO_PRESUMIDO] = [
|
|
5242
|
+
{
|
|
5243
|
+
field: exports.EnumCampoTributo.BaseCalculo,
|
|
5244
|
+
rules: [this.taxableBaseRequiredValidationRule]
|
|
5245
|
+
},
|
|
5246
|
+
{
|
|
5247
|
+
field: exports.EnumCampoTributo.Aliquota,
|
|
5248
|
+
rules: [this.taxRateRequiredValidationRule]
|
|
5249
|
+
}
|
|
5250
|
+
],
|
|
4518
5251
|
_e[exports.EnumTipoTributo.IS] = [
|
|
4519
5252
|
{
|
|
4520
5253
|
field: exports.EnumCampoTributo.BaseCalculo,
|
|
@@ -4537,9 +5270,10 @@
|
|
|
4537
5270
|
{ type: TaxRateRequiredValidationRule },
|
|
4538
5271
|
{ type: TaxClassificationRequiredValidationRule },
|
|
4539
5272
|
{ type: TaxAmountRequiredValidationRule },
|
|
4540
|
-
{ type: TaxSituationRequiredValidationRule }
|
|
5273
|
+
{ type: TaxSituationRequiredValidationRule },
|
|
5274
|
+
{ type: NetAmountApplicationRequiredValidationRule }
|
|
4541
5275
|
]; };
|
|
4542
|
-
ValidationRulesRegistry.ɵprov = core.ɵɵdefineInjectable({ factory: function ValidationRulesRegistry_Factory() { return new ValidationRulesRegistry(core.ɵɵinject(TaxableBaseRequiredValidationRule), core.ɵɵinject(TaxRateRequiredValidationRule), core.ɵɵinject(TaxClassificationRequiredValidationRule), core.ɵɵinject(TaxAmountRequiredValidationRule), core.ɵɵinject(TaxSituationRequiredValidationRule)); }, token: ValidationRulesRegistry, providedIn: "root" });
|
|
5276
|
+
ValidationRulesRegistry.ɵprov = core.ɵɵdefineInjectable({ factory: function ValidationRulesRegistry_Factory() { return new ValidationRulesRegistry(core.ɵɵinject(TaxableBaseRequiredValidationRule), core.ɵɵinject(TaxRateRequiredValidationRule), core.ɵɵinject(TaxClassificationRequiredValidationRule), core.ɵɵinject(TaxAmountRequiredValidationRule), core.ɵɵinject(TaxSituationRequiredValidationRule), core.ɵɵinject(NetAmountApplicationRequiredValidationRule)); }, token: ValidationRulesRegistry, providedIn: "root" });
|
|
4543
5277
|
ValidationRulesRegistry = __decorate([
|
|
4544
5278
|
core.Injectable({ providedIn: 'root' })
|
|
4545
5279
|
], ValidationRulesRegistry);
|
|
@@ -4553,16 +5287,16 @@
|
|
|
4553
5287
|
this.calculationRulesRegistry = calculationRulesRegistry;
|
|
4554
5288
|
}
|
|
4555
5289
|
RulesService.prototype.apply = function (_a) {
|
|
4556
|
-
var group = _a.group, documentType = _a.documentType;
|
|
5290
|
+
var groups = _a.groups, group = _a.group, documentType = _a.documentType;
|
|
4557
5291
|
if (!isTaxFromTaxReform(getBaseTaxByGroupTax(group.grupoTributo)))
|
|
4558
5292
|
return;
|
|
4559
|
-
this.applyStatusRules({ group: group, documentType: documentType });
|
|
4560
|
-
this.applyValidationRules({ group: group, documentType: documentType });
|
|
4561
|
-
this.applyCalculationRules({ group: group, documentType: documentType });
|
|
5293
|
+
this.applyStatusRules({ groups: groups, group: group, documentType: documentType });
|
|
5294
|
+
this.applyValidationRules({ groups: groups, group: group, documentType: documentType });
|
|
5295
|
+
this.applyCalculationRules({ groups: groups, group: group, documentType: documentType });
|
|
4562
5296
|
};
|
|
4563
5297
|
RulesService.prototype.applyCalculationRules = function (_a) {
|
|
4564
5298
|
var e_1, _b, e_2, _c;
|
|
4565
|
-
var group = _a.group, documentType = _a.documentType;
|
|
5299
|
+
var groups = _a.groups, group = _a.group, documentType = _a.documentType;
|
|
4566
5300
|
try {
|
|
4567
5301
|
for (var _d = __values(group.item), _e = _d.next(); !_e.done; _e = _d.next()) {
|
|
4568
5302
|
var item = _e.value;
|
|
@@ -4570,7 +5304,7 @@
|
|
|
4570
5304
|
try {
|
|
4571
5305
|
for (var strategy_1 = (e_2 = void 0, __values(strategy)), strategy_1_1 = strategy_1.next(); !strategy_1_1.done; strategy_1_1 = strategy_1.next()) {
|
|
4572
5306
|
var rule = strategy_1_1.value.rule;
|
|
4573
|
-
rule.apply({ group: group, item: item, documentType: documentType });
|
|
5307
|
+
rule.apply({ groups: groups, group: group, item: item, documentType: documentType });
|
|
4574
5308
|
}
|
|
4575
5309
|
}
|
|
4576
5310
|
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
@@ -4592,7 +5326,7 @@
|
|
|
4592
5326
|
};
|
|
4593
5327
|
RulesService.prototype.applyValidationRules = function (_a) {
|
|
4594
5328
|
var e_3, _b, e_4, _c, e_5, _d;
|
|
4595
|
-
var group = _a.group, documentType = _a.documentType;
|
|
5329
|
+
var groups = _a.groups, group = _a.group, documentType = _a.documentType;
|
|
4596
5330
|
try {
|
|
4597
5331
|
for (var _e = __values(group.item), _f = _e.next(); !_f.done; _f = _e.next()) {
|
|
4598
5332
|
var item = _f.value;
|
|
@@ -4603,7 +5337,7 @@
|
|
|
4603
5337
|
try {
|
|
4604
5338
|
for (var rules_1 = (e_5 = void 0, __values(rules)), rules_1_1 = rules_1.next(); !rules_1_1.done; rules_1_1 = rules_1.next()) {
|
|
4605
5339
|
var rule = rules_1_1.value;
|
|
4606
|
-
rule.apply({ group: group, item: item, documentType: documentType });
|
|
5340
|
+
rule.apply({ groups: groups, group: group, item: item, documentType: documentType });
|
|
4607
5341
|
}
|
|
4608
5342
|
}
|
|
4609
5343
|
catch (e_5_1) { e_5 = { error: e_5_1 }; }
|
|
@@ -4634,7 +5368,7 @@
|
|
|
4634
5368
|
};
|
|
4635
5369
|
RulesService.prototype.applyStatusRules = function (_a) {
|
|
4636
5370
|
var e_6, _b, e_7, _c;
|
|
4637
|
-
var group = _a.group, documentType = _a.documentType;
|
|
5371
|
+
var groups = _a.groups, group = _a.group, documentType = _a.documentType;
|
|
4638
5372
|
try {
|
|
4639
5373
|
for (var _d = __values(group.item), _e = _d.next(); !_e.done; _e = _d.next()) {
|
|
4640
5374
|
var item = _e.value;
|
|
@@ -4642,7 +5376,7 @@
|
|
|
4642
5376
|
try {
|
|
4643
5377
|
for (var strategy_3 = (e_7 = void 0, __values(strategy)), strategy_3_1 = strategy_3.next(); !strategy_3_1.done; strategy_3_1 = strategy_3.next()) {
|
|
4644
5378
|
var rule = strategy_3_1.value.rule;
|
|
4645
|
-
rule.apply({ group: group, item: item, documentType: documentType });
|
|
5379
|
+
rule.apply({ groups: groups, group: group, item: item, documentType: documentType });
|
|
4646
5380
|
}
|
|
4647
5381
|
}
|
|
4648
5382
|
catch (e_7_1) { e_7 = { error: e_7_1 }; }
|
|
@@ -4712,6 +5446,7 @@
|
|
|
4712
5446
|
this.menuItemCBS = false;
|
|
4713
5447
|
this.menuItemIBSEstadual = false;
|
|
4714
5448
|
this.menuItemIBSMunicipal = false;
|
|
5449
|
+
this.menuItemIBSCreditoPresumido = false;
|
|
4715
5450
|
this.menuItemIS = false;
|
|
4716
5451
|
this.menuItemIcmsCreditoPresumido = false;
|
|
4717
5452
|
this.requiredItemCideTecnologia = false;
|
|
@@ -4972,8 +5707,8 @@
|
|
|
4972
5707
|
return 'cbs';
|
|
4973
5708
|
case exports.EnumTipoTributo.IBS_ESTADUAL:
|
|
4974
5709
|
case exports.EnumTipoTributo.IBS_ESTADUAL_DIFERIDO:
|
|
4975
|
-
case exports.EnumTipoTributo.IBS_ESTADUAL_CREDITO_PRESUMIDO:
|
|
4976
5710
|
case exports.EnumTipoTributo.IBS_ESTADUAL_TRIBUTACAO_REGULAR:
|
|
5711
|
+
case exports.EnumTipoTributo.IBS_CREDITO_PRESUMIDO:
|
|
4977
5712
|
return 'ibs-estadual';
|
|
4978
5713
|
case exports.EnumTipoTributo.IBS_MUNICIPAL:
|
|
4979
5714
|
case exports.EnumTipoTributo.IBS_MUNICIPAL_DIFERIDO:
|
|
@@ -5058,7 +5793,6 @@
|
|
|
5058
5793
|
break;
|
|
5059
5794
|
case exports.EnumTipoTributo.IBS_ESTADUAL:
|
|
5060
5795
|
case exports.EnumTipoTributo.IBS_ESTADUAL_DIFERIDO:
|
|
5061
|
-
case exports.EnumTipoTributo.IBS_ESTADUAL_CREDITO_PRESUMIDO:
|
|
5062
5796
|
case exports.EnumTipoTributo.IBS_ESTADUAL_TRIBUTACAO_REGULAR:
|
|
5063
5797
|
_this.montaIBSEstadual();
|
|
5064
5798
|
break;
|
|
@@ -5067,6 +5801,9 @@
|
|
|
5067
5801
|
case exports.EnumTipoTributo.IBS_MUNICIPAL_TRIBUTACAO_REGULAR:
|
|
5068
5802
|
_this.montaIBSMunicipal();
|
|
5069
5803
|
break;
|
|
5804
|
+
case exports.EnumTipoTributo.IBS_CREDITO_PRESUMIDO:
|
|
5805
|
+
_this.montaIBSCreditoPresumido();
|
|
5806
|
+
break;
|
|
5070
5807
|
case exports.EnumTipoTributo.IS:
|
|
5071
5808
|
_this.montaIS();
|
|
5072
5809
|
break;
|
|
@@ -5186,7 +5923,7 @@
|
|
|
5186
5923
|
}
|
|
5187
5924
|
finally { if (e_2) throw e_2.error; }
|
|
5188
5925
|
}
|
|
5189
|
-
this.rulesService.apply({ group: group, documentType: this.documento });
|
|
5926
|
+
this.rulesService.apply({ groups: this.grupos, group: group, documentType: this.documento });
|
|
5190
5927
|
}
|
|
5191
5928
|
}
|
|
5192
5929
|
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
@@ -5453,6 +6190,7 @@
|
|
|
5453
6190
|
}),
|
|
5454
6191
|
(_this.indexAccordion = [0]));
|
|
5455
6192
|
_this.rulesService.apply({
|
|
6193
|
+
groups: _this.grupos,
|
|
5456
6194
|
group: _this.grupos.find(function (group) { return group.grupoTributo === exports.EnumGrupoTributo.CBS; }),
|
|
5457
6195
|
documentType: _this.documento
|
|
5458
6196
|
});
|
|
@@ -5468,6 +6206,7 @@
|
|
|
5468
6206
|
}),
|
|
5469
6207
|
(_this.indexAccordion = [0]));
|
|
5470
6208
|
_this.rulesService.apply({
|
|
6209
|
+
groups: _this.grupos,
|
|
5471
6210
|
group: _this.grupos.find(function (group) { return group.grupoTributo === exports.EnumGrupoTributo.IBS_ESTADUAL; }),
|
|
5472
6211
|
documentType: _this.documento
|
|
5473
6212
|
});
|
|
@@ -5483,11 +6222,28 @@
|
|
|
5483
6222
|
}),
|
|
5484
6223
|
(_this.indexAccordion = [0]));
|
|
5485
6224
|
_this.rulesService.apply({
|
|
6225
|
+
groups: _this.grupos,
|
|
5486
6226
|
group: _this.grupos.find(function (group) { return group.grupoTributo === exports.EnumGrupoTributo.IBS_MUNICIPAL; }),
|
|
5487
6227
|
documentType: _this.documento
|
|
5488
6228
|
});
|
|
5489
6229
|
_this.changeDetector.detectChanges();
|
|
5490
6230
|
}
|
|
6231
|
+
}, {
|
|
6232
|
+
label: this.translate.instant('erpx.tributos.actions_ibs_credito_presumido_label'),
|
|
6233
|
+
disabled: this.menuItemIBSCreditoPresumido,
|
|
6234
|
+
visible: this.podeAdicionarImpostoManual(),
|
|
6235
|
+
command: function () {
|
|
6236
|
+
(_this.montaIBSCreditoPresumido().forEach(function (value) {
|
|
6237
|
+
_this.novoImpostoManual(value);
|
|
6238
|
+
}),
|
|
6239
|
+
(_this.indexAccordion = [0]));
|
|
6240
|
+
_this.rulesService.apply({
|
|
6241
|
+
groups: _this.grupos,
|
|
6242
|
+
group: _this.grupos.find(function (group) { return group.grupoTributo === exports.EnumGrupoTributo.IBS_CREDITO_PRESUMIDO; }),
|
|
6243
|
+
documentType: _this.documento
|
|
6244
|
+
});
|
|
6245
|
+
_this.changeDetector.detectChanges();
|
|
6246
|
+
}
|
|
5491
6247
|
}, {
|
|
5492
6248
|
label: this.translate.instant('erpx.tributos.actions_is_label'),
|
|
5493
6249
|
disabled: this.menuItemIS,
|
|
@@ -5498,6 +6254,7 @@
|
|
|
5498
6254
|
}),
|
|
5499
6255
|
(_this.indexAccordion = [0]));
|
|
5500
6256
|
_this.rulesService.apply({
|
|
6257
|
+
groups: _this.grupos,
|
|
5501
6258
|
group: _this.grupos.find(function (group) { return group.grupoTributo === exports.EnumGrupoTributo.IS; }),
|
|
5502
6259
|
documentType: _this.documento
|
|
5503
6260
|
});
|
|
@@ -6612,27 +7369,27 @@
|
|
|
6612
7369
|
campos.push({ campo: exports.EnumCampoTributo.SituacaoTributaria }, {
|
|
6613
7370
|
campo: exports.EnumCampoTributo.ClassificacaoTributaria
|
|
6614
7371
|
}, {
|
|
6615
|
-
campo: exports.EnumCampoTributo.
|
|
7372
|
+
campo: exports.EnumCampoTributo.AplicarValorLiquidoDocumento,
|
|
6616
7373
|
grupo: exports.EnumGrupoTributo.CBS
|
|
6617
7374
|
});
|
|
6618
7375
|
}
|
|
6619
|
-
var
|
|
7376
|
+
var campos_CBS_CREDITO_PRESUMIDO = [
|
|
6620
7377
|
{ campo: exports.EnumCampoTributo.BaseCalculo },
|
|
6621
7378
|
{ campo: exports.EnumCampoTributo.Aliquota },
|
|
6622
7379
|
{ campo: exports.EnumCampoTributo.Valor, disabled: true }
|
|
6623
7380
|
];
|
|
6624
7381
|
if (this.documento === exports.EnumTipoDocumento.NF_ENTRADA || this.documento === exports.EnumTipoDocumento.NF_SAIDA) {
|
|
6625
|
-
|
|
7382
|
+
campos_CBS_CREDITO_PRESUMIDO.push({
|
|
6626
7383
|
campo: exports.EnumCampoTributo.ClassificacaoTributariaCreditoPresumido
|
|
6627
7384
|
});
|
|
6628
7385
|
}
|
|
6629
|
-
var
|
|
7386
|
+
var campos_CBS_TRIBUTACAO_REGULAR = [
|
|
6630
7387
|
{ campo: exports.EnumCampoTributo.BaseCalculo },
|
|
6631
7388
|
{ campo: exports.EnumCampoTributo.Aliquota },
|
|
6632
7389
|
{ campo: exports.EnumCampoTributo.Valor, disabled: true }
|
|
6633
7390
|
];
|
|
6634
7391
|
if (this.documento === exports.EnumTipoDocumento.NF_ENTRADA || this.documento === exports.EnumTipoDocumento.NF_SAIDA) {
|
|
6635
|
-
|
|
7392
|
+
campos_CBS_TRIBUTACAO_REGULAR.push({ campo: exports.EnumCampoTributo.SituacaoTributaria }, {
|
|
6636
7393
|
campo: exports.EnumCampoTributo.ClassificacaoTributaria
|
|
6637
7394
|
});
|
|
6638
7395
|
}
|
|
@@ -6640,9 +7397,9 @@
|
|
|
6640
7397
|
{ campo: exports.EnumCampoTributo.BaseCalculo },
|
|
6641
7398
|
{ campo: exports.EnumCampoTributo.Aliquota },
|
|
6642
7399
|
{ campo: exports.EnumCampoTributo.Valor, disabled: true }
|
|
6643
|
-
], exports.EnumTipoTributo.CBS_DIFERIDO)), __assign({ name: exports.EnumTipoTributo.CBS_CREDITO_PRESUMIDO, label: 'erpx.tributos.enum_tipo_tributo_cbs_credito_presumido' }, this.montaCampos(
|
|
6644
|
-
{ campo: exports.EnumCampoTributo.BaseCalculo
|
|
6645
|
-
{ campo: exports.EnumCampoTributo.Aliquota
|
|
7400
|
+
], exports.EnumTipoTributo.CBS_DIFERIDO)), __assign({ name: exports.EnumTipoTributo.CBS_CREDITO_PRESUMIDO, label: 'erpx.tributos.enum_tipo_tributo_cbs_credito_presumido' }, this.montaCampos(campos_CBS_CREDITO_PRESUMIDO, exports.EnumTipoTributo.CBS_CREDITO_PRESUMIDO)), __assign({ name: exports.EnumTipoTributo.CBS_TRIBUTACAO_REGULAR, label: 'erpx.tributos.enum_tipo_tributo_cbs_tributacao_regular' }, this.montaCampos(campos_CBS_TRIBUTACAO_REGULAR, exports.EnumTipoTributo.CBS_TRIBUTACAO_REGULAR)), __assign({ name: exports.EnumTipoTributo.CBS_GOVERNAMENTAL, label: 'erpx.tributos.enum_tipo_tributo_cbs_governamental' }, this.montaCampos([
|
|
7401
|
+
{ campo: exports.EnumCampoTributo.BaseCalculo },
|
|
7402
|
+
{ campo: exports.EnumCampoTributo.Aliquota },
|
|
6646
7403
|
{ campo: exports.EnumCampoTributo.Valor, disabled: true }
|
|
6647
7404
|
], exports.EnumTipoTributo.CBS_GOVERNAMENTAL)));
|
|
6648
7405
|
this.grupos.unshift({
|
|
@@ -6704,27 +7461,14 @@
|
|
|
6704
7461
|
campo: exports.EnumCampoTributo.ClassificacaoTributaria
|
|
6705
7462
|
},
|
|
6706
7463
|
{
|
|
6707
|
-
campo: exports.EnumCampoTributo.
|
|
7464
|
+
campo: exports.EnumCampoTributo.AplicarValorLiquidoDocumento,
|
|
6708
7465
|
grupo: exports.EnumGrupoTributo.IBS_ESTADUAL
|
|
6709
7466
|
}
|
|
6710
7467
|
], exports.EnumTipoTributo.IBS_ESTADUAL)), __assign({ name: exports.EnumTipoTributo.IBS_ESTADUAL_DIFERIDO, label: 'erpx.tributos.enum_tipo_tributo_ibs_estadual_diferido' }, this.montaCampos([
|
|
6711
7468
|
{ campo: exports.EnumCampoTributo.BaseCalculo },
|
|
6712
7469
|
{ campo: exports.EnumCampoTributo.Aliquota },
|
|
6713
7470
|
{ campo: exports.EnumCampoTributo.Valor, disabled: true }
|
|
6714
|
-
], exports.EnumTipoTributo.IBS_ESTADUAL_DIFERIDO)), __assign({ name: exports.EnumTipoTributo.
|
|
6715
|
-
? [
|
|
6716
|
-
{ campo: exports.EnumCampoTributo.BaseCalculo },
|
|
6717
|
-
{ campo: exports.EnumCampoTributo.Aliquota },
|
|
6718
|
-
{ campo: exports.EnumCampoTributo.Valor, disabled: true }
|
|
6719
|
-
]
|
|
6720
|
-
: [
|
|
6721
|
-
{ campo: exports.EnumCampoTributo.BaseCalculo },
|
|
6722
|
-
{ campo: exports.EnumCampoTributo.Aliquota },
|
|
6723
|
-
{ campo: exports.EnumCampoTributo.Valor, disabled: true },
|
|
6724
|
-
{
|
|
6725
|
-
campo: exports.EnumCampoTributo.ClassificacaoTributariaCreditoPresumido
|
|
6726
|
-
}
|
|
6727
|
-
], exports.EnumTipoTributo.IBS_ESTADUAL_CREDITO_PRESUMIDO)), __assign({ name: exports.EnumTipoTributo.IBS_ESTADUAL_TRIBUTACAO_REGULAR, label: 'erpx.tributos.enum_tipo_tributo_ibs_estadual_tributacao_regular' }, this.montaCampos(this.documento === exports.EnumTipoDocumento.PEDIDO_VENDA || this.documento === exports.EnumTipoDocumento.PEDIDO_COMPRA
|
|
7471
|
+
], exports.EnumTipoTributo.IBS_ESTADUAL_DIFERIDO)), __assign({ name: exports.EnumTipoTributo.IBS_ESTADUAL_TRIBUTACAO_REGULAR, label: 'erpx.tributos.enum_tipo_tributo_ibs_estadual_tributacao_regular' }, this.montaCampos(this.documento === exports.EnumTipoDocumento.PEDIDO_VENDA || this.documento === exports.EnumTipoDocumento.PEDIDO_COMPRA
|
|
6728
7472
|
? [
|
|
6729
7473
|
{ campo: exports.EnumCampoTributo.BaseCalculo },
|
|
6730
7474
|
{ campo: exports.EnumCampoTributo.Aliquota },
|
|
@@ -6739,8 +7483,8 @@
|
|
|
6739
7483
|
campo: exports.EnumCampoTributo.ClassificacaoTributaria
|
|
6740
7484
|
}
|
|
6741
7485
|
], exports.EnumTipoTributo.IBS_ESTADUAL_TRIBUTACAO_REGULAR)), __assign({ name: exports.EnumTipoTributo.IBS_ESTADUAL_GOVERNAMENTAL, label: 'erpx.tributos.enum_tipo_tributo_ibs_estadual_governamental' }, this.montaCampos([
|
|
6742
|
-
{ campo: exports.EnumCampoTributo.BaseCalculo
|
|
6743
|
-
{ campo: exports.EnumCampoTributo.Aliquota
|
|
7486
|
+
{ campo: exports.EnumCampoTributo.BaseCalculo },
|
|
7487
|
+
{ campo: exports.EnumCampoTributo.Aliquota },
|
|
6744
7488
|
{ campo: exports.EnumCampoTributo.Valor, disabled: true }
|
|
6745
7489
|
], exports.EnumTipoTributo.IBS_ESTADUAL_GOVERNAMENTAL)));
|
|
6746
7490
|
this.grupos.unshift({
|
|
@@ -6802,7 +7546,7 @@
|
|
|
6802
7546
|
campo: exports.EnumCampoTributo.ClassificacaoTributaria
|
|
6803
7547
|
},
|
|
6804
7548
|
{
|
|
6805
|
-
campo: exports.EnumCampoTributo.
|
|
7549
|
+
campo: exports.EnumCampoTributo.AplicarValorLiquidoDocumento,
|
|
6806
7550
|
grupo: exports.EnumGrupoTributo.IBS_MUNICIPAL
|
|
6807
7551
|
}
|
|
6808
7552
|
], exports.EnumTipoTributo.IBS_MUNICIPAL)), __assign({ name: exports.EnumTipoTributo.IBS_MUNICIPAL_DIFERIDO, label: 'erpx.tributos.enum_tipo_tributo_ibs_municipal_diferido' }, this.montaCampos([
|
|
@@ -6824,8 +7568,8 @@
|
|
|
6824
7568
|
campo: exports.EnumCampoTributo.ClassificacaoTributaria
|
|
6825
7569
|
}
|
|
6826
7570
|
], exports.EnumTipoTributo.IBS_MUNICIPAL_TRIBUTACAO_REGULAR)), __assign({ name: exports.EnumTipoTributo.IBS_MUNICIPAL_GOVERNAMENTAL, label: 'erpx.tributos.enum_tipo_tributo_ibs_municipal_governamental' }, this.montaCampos([
|
|
6827
|
-
{ campo: exports.EnumCampoTributo.BaseCalculo
|
|
6828
|
-
{ campo: exports.EnumCampoTributo.Aliquota
|
|
7571
|
+
{ campo: exports.EnumCampoTributo.BaseCalculo },
|
|
7572
|
+
{ campo: exports.EnumCampoTributo.Aliquota },
|
|
6829
7573
|
{ campo: exports.EnumCampoTributo.Valor, disabled: true }
|
|
6830
7574
|
], exports.EnumTipoTributo.IBS_MUNICIPAL_GOVERNAMENTAL)));
|
|
6831
7575
|
this.grupos.unshift({
|
|
@@ -6835,6 +7579,33 @@
|
|
|
6835
7579
|
});
|
|
6836
7580
|
return item;
|
|
6837
7581
|
};
|
|
7582
|
+
ErpTributosComponent.prototype.montaIBSCreditoPresumido = function () {
|
|
7583
|
+
if (this.menuItemIBSCreditoPresumido)
|
|
7584
|
+
return;
|
|
7585
|
+
this.menuItemIBSCreditoPresumido = true;
|
|
7586
|
+
var item = [];
|
|
7587
|
+
var campos = [
|
|
7588
|
+
{ campo: exports.EnumCampoTributo.BaseCalculo },
|
|
7589
|
+
{ campo: exports.EnumCampoTributo.Aliquota },
|
|
7590
|
+
{ campo: exports.EnumCampoTributo.Valor, disabled: true }
|
|
7591
|
+
];
|
|
7592
|
+
if (this.documento === exports.EnumTipoDocumento.NF_ENTRADA || this.documento === exports.EnumTipoDocumento.NF_SAIDA) {
|
|
7593
|
+
campos.push({
|
|
7594
|
+
campo: exports.EnumCampoTributo.SituacaoTributaria
|
|
7595
|
+
}, {
|
|
7596
|
+
campo: exports.EnumCampoTributo.ClassificacaoTributariaCreditoPresumido
|
|
7597
|
+
}, {
|
|
7598
|
+
campo: exports.EnumCampoTributo.AplicarValorLiquidoDocumento
|
|
7599
|
+
});
|
|
7600
|
+
}
|
|
7601
|
+
item.unshift(__assign({ name: exports.EnumTipoTributo.IBS_CREDITO_PRESUMIDO, label: 'erpx.tributos.enum_tipo_tributo_ibs_credito_presumido' }, this.montaCampos(campos, exports.EnumTipoTributo.IBS_CREDITO_PRESUMIDO)));
|
|
7602
|
+
this.grupos.unshift({
|
|
7603
|
+
grupo: "" + ('erpx.tributos.enum_grupo_tributo_' + exports.EnumGrupoTributo.IBS_CREDITO_PRESUMIDO + '_label'),
|
|
7604
|
+
grupoTributo: exports.EnumGrupoTributo.IBS_CREDITO_PRESUMIDO,
|
|
7605
|
+
item: item
|
|
7606
|
+
});
|
|
7607
|
+
return item;
|
|
7608
|
+
};
|
|
6838
7609
|
ErpTributosComponent.prototype.montaIS = function () {
|
|
6839
7610
|
if (this.menuItemIS)
|
|
6840
7611
|
return;
|
|
@@ -6846,7 +7617,7 @@
|
|
|
6846
7617
|
{ campo: exports.EnumCampoTributo.Valor, disabled: true }
|
|
6847
7618
|
];
|
|
6848
7619
|
if (this.documento === exports.EnumTipoDocumento.NF_ENTRADA || this.documento === exports.EnumTipoDocumento.NF_SAIDA) {
|
|
6849
|
-
campos.push({ campo: exports.EnumCampoTributo.SituacaoTributaria }, { campo: exports.EnumCampoTributo.ClassificacaoTributaria }, { campo: exports.EnumCampoTributo.
|
|
7620
|
+
campos.push({ campo: exports.EnumCampoTributo.SituacaoTributaria }, { campo: exports.EnumCampoTributo.ClassificacaoTributaria }, { campo: exports.EnumCampoTributo.AplicarValorLiquidoDocumento, grupo: exports.EnumGrupoTributo.IS });
|
|
6850
7621
|
}
|
|
6851
7622
|
item.unshift(__assign({ name: exports.EnumTipoTributo.IS, label: 'erpx.tributos.enum_tipo_tributo_is' }, this.montaCampos(campos, exports.EnumTipoTributo.IS)));
|
|
6852
7623
|
this.grupos.unshift({
|
|
@@ -7589,12 +8360,13 @@
|
|
|
7589
8360
|
var formField = [];
|
|
7590
8361
|
var formGroup = {};
|
|
7591
8362
|
campos.map(function (it) {
|
|
7592
|
-
var _a
|
|
8363
|
+
var _a;
|
|
8364
|
+
var _b, _c;
|
|
7593
8365
|
if (it.campo == exports.EnumCampoTributo.BaseCalculo) {
|
|
7594
8366
|
formGroup = __assign(__assign({}, formGroup), { baseCalculo: [
|
|
7595
8367
|
{
|
|
7596
8368
|
value: null,
|
|
7597
|
-
disabled: (
|
|
8369
|
+
disabled: (_b = it.disabled) !== null && _b !== void 0 ? _b : false
|
|
7598
8370
|
},
|
|
7599
8371
|
forms.Validators.compose([forms.Validators.max(9999999999999.99)])
|
|
7600
8372
|
] });
|
|
@@ -7628,7 +8400,7 @@
|
|
|
7628
8400
|
formGroup = __assign(__assign({}, formGroup), { aliquota: [
|
|
7629
8401
|
{
|
|
7630
8402
|
value: null,
|
|
7631
|
-
disabled: (
|
|
8403
|
+
disabled: (_c = it.disabled) !== null && _c !== void 0 ? _c : false
|
|
7632
8404
|
},
|
|
7633
8405
|
forms.Validators.compose([forms.Validators.max(999.9999)])
|
|
7634
8406
|
] });
|
|
@@ -8641,25 +9413,27 @@
|
|
|
8641
9413
|
_this.setValidators(tributo);
|
|
8642
9414
|
}, 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 } })));
|
|
8643
9415
|
}
|
|
8644
|
-
else if (it.campo === exports.EnumCampoTributo.
|
|
8645
|
-
formGroup = __assign(__assign({}, formGroup), {
|
|
9416
|
+
else if (it.campo === exports.EnumCampoTributo.AplicarValorLiquidoDocumento) {
|
|
9417
|
+
formGroup = __assign(__assign({}, formGroup), (_a = {}, _a[exports.EnumCampoTributo.AplicarValorLiquidoDocumento] = [{ value: null, disabled: false }, forms.Validators.compose([])], _a));
|
|
8646
9418
|
formField.push(new angularComponents$1.FormField({
|
|
8647
|
-
name:
|
|
8648
|
-
label: _this.translate.instant('erpx.tributos.
|
|
8649
|
-
type: angularComponents$1.FieldType.
|
|
9419
|
+
name: exports.EnumCampoTributo.AplicarValorLiquidoDocumento,
|
|
9420
|
+
label: _this.translate.instant('erpx.tributos.aplicar_valor_liquido_documento'),
|
|
9421
|
+
type: angularComponents$1.FieldType.Enum,
|
|
9422
|
+
required: function () { return _this.isFieldRequired(exports.EnumCampoTributo.AplicarValorLiquidoDocumento, tributo); },
|
|
9423
|
+
showClear: true,
|
|
8650
9424
|
options: [
|
|
9425
|
+
tributo === exports.EnumTipoTributo.IBS_CREDITO_PRESUMIDO
|
|
9426
|
+
? {
|
|
9427
|
+
label: _this.translate.instant('erpx.tributos.enum_enum_aplicar_valor_liquido_documento_subtrair'),
|
|
9428
|
+
value: exports.EnumAplicarValorLiquidoDocumento.SUBTRAIR
|
|
9429
|
+
}
|
|
9430
|
+
: {
|
|
9431
|
+
label: _this.translate.instant('erpx.tributos.enum_enum_aplicar_valor_liquido_documento_somar'),
|
|
9432
|
+
value: exports.EnumAplicarValorLiquidoDocumento.SOMAR
|
|
9433
|
+
},
|
|
8651
9434
|
{
|
|
8652
|
-
label: _this.translate.instant('erpx.tributos.
|
|
8653
|
-
value:
|
|
8654
|
-
},
|
|
8655
|
-
{
|
|
8656
|
-
label: _this.translate.instant('erpx.tributos.false'),
|
|
8657
|
-
value: false
|
|
8658
|
-
},
|
|
8659
|
-
{
|
|
8660
|
-
label: _this.translate.instant('erpx.tributos.none'),
|
|
8661
|
-
value: null,
|
|
8662
|
-
disabled: true
|
|
9435
|
+
label: _this.translate.instant('erpx.tributos.enum_enum_aplicar_valor_liquido_documento_nenhum'),
|
|
9436
|
+
value: exports.EnumAplicarValorLiquidoDocumento.NENHUM
|
|
8663
9437
|
}
|
|
8664
9438
|
],
|
|
8665
9439
|
size: { sm: 12, md: 4, lg: 4, xl: 3 }
|
|
@@ -8738,18 +9512,6 @@
|
|
|
8738
9512
|
}
|
|
8739
9513
|
_this.updateTwoWayDataBinding();
|
|
8740
9514
|
});
|
|
8741
|
-
this.onSituacaoTributariaValueChanges(item);
|
|
8742
|
-
};
|
|
8743
|
-
ErpTributosComponent.prototype.onSituacaoTributariaValueChanges = function (item) {
|
|
8744
|
-
if (!item.formGroup.get('situacaoTributaria') || !item.formGroup.get('classificacaoTributaria'))
|
|
8745
|
-
return;
|
|
8746
|
-
item.formGroup
|
|
8747
|
-
.get('situacaoTributaria')
|
|
8748
|
-
// We are using debounceTime here because our Lookup Component is emitting two events unfortunately.
|
|
8749
|
-
.valueChanges.pipe(operators.debounceTime(50))
|
|
8750
|
-
.subscribe(function () {
|
|
8751
|
-
item.formGroup.get('classificacaoTributaria').reset(null);
|
|
8752
|
-
});
|
|
8753
9515
|
};
|
|
8754
9516
|
ErpTributosComponent.prototype.mapEnumTipoTributoToEnumTipImpCst = function (taxType) {
|
|
8755
9517
|
switch (taxType) {
|
|
@@ -10923,6 +11685,8 @@
|
|
|
10923
11685
|
exports.nonNullish = nonNullish;
|
|
10924
11686
|
exports.ɵa = ErpResumoComponent;
|
|
10925
11687
|
exports.ɵb = ErpResumoService;
|
|
11688
|
+
exports.ɵba = EntityService;
|
|
11689
|
+
exports.ɵbb = QuantidadeDisponivelDemandaModule;
|
|
10926
11690
|
exports.ɵc = ErpTributosService;
|
|
10927
11691
|
exports.ɵd = RulesService;
|
|
10928
11692
|
exports.ɵe = StatusRulesRegistry;
|
|
@@ -10933,20 +11697,20 @@
|
|
|
10933
11697
|
exports.ɵj = TaxClassificationRequiredValidationRule;
|
|
10934
11698
|
exports.ɵk = TaxAmountRequiredValidationRule;
|
|
10935
11699
|
exports.ɵl = TaxSituationRequiredValidationRule;
|
|
10936
|
-
exports.ɵm =
|
|
10937
|
-
exports.ɵn =
|
|
10938
|
-
exports.ɵo =
|
|
10939
|
-
exports.ɵp =
|
|
10940
|
-
exports.ɵq =
|
|
10941
|
-
exports.ɵr =
|
|
10942
|
-
exports.ɵs =
|
|
10943
|
-
exports.ɵt =
|
|
10944
|
-
exports.ɵu =
|
|
10945
|
-
exports.ɵv =
|
|
10946
|
-
exports.ɵw =
|
|
10947
|
-
exports.ɵx =
|
|
10948
|
-
exports.ɵy =
|
|
10949
|
-
exports.ɵz =
|
|
11700
|
+
exports.ɵm = NetAmountApplicationRequiredValidationRule;
|
|
11701
|
+
exports.ɵn = CalculationRulesRegistry;
|
|
11702
|
+
exports.ɵo = TaxableBaseCalculationRule;
|
|
11703
|
+
exports.ɵp = TaxAmountCalculator;
|
|
11704
|
+
exports.ɵq = EffectiveTaxRateCalculator;
|
|
11705
|
+
exports.ɵr = TaxRateCalculationRule;
|
|
11706
|
+
exports.ɵs = EffectiveTaxRateCalculationRule;
|
|
11707
|
+
exports.ɵt = TaxAmountCalculationRule;
|
|
11708
|
+
exports.ɵu = GrossAmountCalculationRule;
|
|
11709
|
+
exports.ɵv = GrossAmountCalculator;
|
|
11710
|
+
exports.ɵw = TaxClassificationCalculationRule;
|
|
11711
|
+
exports.ɵx = FocusService;
|
|
11712
|
+
exports.ɵy = ErpLoteSeriesService;
|
|
11713
|
+
exports.ɵz = QuantidadeDisponivelDemandaService;
|
|
10950
11714
|
|
|
10951
11715
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
10952
11716
|
|