@senior-gestao-empresarial/erpx-components 4.2.0 → 4.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -529,6 +529,13 @@
529
529
  EnumTipoCalculoImposto["MANUAL"] = "MANUAL";
530
530
  })(EnumTipoCalculoImposto || (EnumTipoCalculoImposto = {}));
531
531
 
532
+ var EnumIndicativoPadrao;
533
+ (function (EnumIndicativoPadrao) {
534
+ EnumIndicativoPadrao["NAO_PERMITIDO"] = "NAO_PERMITIDO";
535
+ EnumIndicativoPadrao["EXIGE"] = "EXIGE";
536
+ EnumIndicativoPadrao["INDIFERENTE"] = "INDIFERENTE";
537
+ })(EnumIndicativoPadrao || (EnumIndicativoPadrao = {}));
538
+
532
539
  var ErpTributosService = /** @class */ (function () {
533
540
  function ErpTributosService(http, messageService) {
534
541
  this.http = http;
@@ -28487,16 +28494,16 @@
28487
28494
  { campo: exports.EnumCampoTributo.Valor }
28488
28495
  ], exports.EnumTipoTributo.IPI_PRESUMIDO)));
28489
28496
  break;
28490
- case this.context.document === 'Outgoing Invoice' &&
28491
- this.context.invoice.type === 'Product Return':
28492
- item.unshift(__assign({ name: exports.EnumTipoTributo.IPI_PRESUMIDO, label: 'erpx.tributos.enum_tipo_tributo_ipi_presumido' }, this.montaCampos([
28493
- { campo: exports.EnumCampoTributo.BaseCalculo },
28494
- { campo: exports.EnumCampoTributo.Aliquota },
28495
- { campo: exports.EnumCampoTributo.Valor }
28496
- ], exports.EnumTipoTributo.IPI_PRESUMIDO)));
28497
- break;
28498
28497
  case this.context.document === 'Outgoing Invoice' &&
28499
28498
  this.context.invoice.type !== 'Debit':
28499
+ if (this.context.document === 'Outgoing Invoice' &&
28500
+ this.context.invoice.type === 'Product Return') {
28501
+ item.unshift(__assign({ name: exports.EnumTipoTributo.IPI_PRESUMIDO, label: 'erpx.tributos.enum_tipo_tributo_ipi_presumido' }, this.montaCampos([
28502
+ { campo: exports.EnumCampoTributo.BaseCalculo },
28503
+ { campo: exports.EnumCampoTributo.Aliquota },
28504
+ { campo: exports.EnumCampoTributo.Valor }
28505
+ ], exports.EnumTipoTributo.IPI_PRESUMIDO)));
28506
+ }
28500
28507
  item.unshift(__assign({ name: exports.EnumTipoTributo.IPI, label: 'erpx.tributos.enum_tipo_tributo_ipi' }, this.montaCampos([
28501
28508
  { campo: exports.EnumCampoTributo.BaseCalculo },
28502
28509
  { campo: exports.EnumCampoTributo.Aliquota },
@@ -29477,7 +29484,7 @@
29477
29484
  tributo === exports.EnumTipoTributo.IBS_ESTORNO_CREDITO
29478
29485
  ? angularComponents.EnumLogicalOperator.Eq
29479
29486
  : angularComponents.EnumLogicalOperator.Ne,
29480
- values: ['EXIGE']
29487
+ values: [EnumIndicativoPadrao.EXIGE]
29481
29488
  },
29482
29489
  {
29483
29490
  field: 'indGAjusteCompet',
@@ -29485,7 +29492,7 @@
29485
29492
  tributo === exports.EnumTipoTributo.IBS_AJUSTE
29486
29493
  ? angularComponents.EnumLogicalOperator.Eq
29487
29494
  : angularComponents.EnumLogicalOperator.Ne,
29488
- values: ['EXIGE']
29495
+ values: [EnumIndicativoPadrao.EXIGE]
29489
29496
  }
29490
29497
  ]);
29491
29498
  formField.push(new angularComponents$1.FormField(__assign(__assign({}, _this.e027StrLookup.mountOptions({
@@ -29510,6 +29517,22 @@
29510
29517
  { value: undefined, disabled: false },
29511
29518
  forms.Validators.compose([])
29512
29519
  ] });
29520
+ var defaultFilter = [
29521
+ {
29522
+ field: 'situacao',
29523
+ operator: angularComponents.EnumLogicalOperator.Eq,
29524
+ values: ['ATIVO']
29525
+ }
29526
+ ];
29527
+ if (_this.context.document === 'Outgoing Invoice' &&
29528
+ _this.context.invoice.type === 'Debit' &&
29529
+ (tributo === exports.EnumTipoTributo.CBS_ESTORNO_CREDITO ||
29530
+ tributo === exports.EnumTipoTributo.IBS_ESTORNO_CREDITO))
29531
+ defaultFilter.push({
29532
+ field: 'indGEstornoCred',
29533
+ operator: angularComponents.EnumLogicalOperator.Eq,
29534
+ values: [EnumIndicativoPadrao.EXIGE]
29535
+ });
29513
29536
  formField.push(new angularComponents$1.FormField(__assign(__assign({}, _this.classificacaoTributariaLookup.mountOptions({
29514
29537
  multiple: false,
29515
29538
  prefix: 'erpx_cpl_imp.impostos',
@@ -29517,13 +29540,7 @@
29517
29540
  service: _this.servico,
29518
29541
  entity: 'classificacaoTributaria',
29519
29542
  formGroup: 'classificacaoTributaria',
29520
- defaultFilter: [
29521
- {
29522
- field: 'situacao',
29523
- operator: angularComponents.EnumLogicalOperator.Eq,
29524
- values: ['ATIVO']
29525
- }
29526
- ],
29543
+ defaultFilter: defaultFilter,
29527
29544
  queryFields: ['e027str.id'],
29528
29545
  entityDependency: [
29529
29546
  {