@senior-gestao-empresarial/erpx-components 3.35.0-develop-b37ce58c → 4.0.0-develop-a313cf68

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.
@@ -665,7 +665,7 @@ var getBaseTaxByGroupTax = function (groupTax) {
665
665
  case EnumGrupoTributo.CBS_IBS_ESTORNO_CREDITO:
666
666
  return EnumTipoTributo.CBS_ESTORNO_CREDITO;
667
667
  default:
668
- throw new Error("Unsupported value for EnumGrupoTributo: " + groupTax);
668
+ return null;
669
669
  }
670
670
  };
671
671
  var getRegularTaxationTaxByGroupTax = function (groupTax) {
@@ -24108,6 +24108,10 @@ var ErpTributosComponent = /** @class */ (function () {
24108
24108
  case EnumTipoTributo.IS:
24109
24109
  _this.montaIS();
24110
24110
  break;
24111
+ case EnumTipoTributo.CBS_ESTORNO_CREDITO:
24112
+ case EnumTipoTributo.IBS_ESTORNO_CREDITO:
24113
+ _this.montaCBSIBSEstornoCredito();
24114
+ break;
24111
24115
  case EnumTipoTributo.PIS_RECUPERAR:
24112
24116
  case EnumTipoTributo.PIS_DEVOLVIDO:
24113
24117
  case EnumTipoTributo.PIS:
@@ -24673,7 +24677,7 @@ var ErpTributosComponent = /** @class */ (function () {
24673
24677
  label: this.translate.instant('erpx.tributos.actions_cbs_ibs_estorno_credito_label'),
24674
24678
  disabled: this.menuItemCBS_IBS_ESTORNO_CREDITO,
24675
24679
  command: function () {
24676
- (_this.montaCBS_IBS_ESTORNO_CREDITO().forEach(function (value) {
24680
+ (_this.montaCBSIBSEstornoCredito().forEach(function (value) {
24677
24681
  _this.novoImpostoManual(value);
24678
24682
  }),
24679
24683
  (_this.indexAccordion = [0]));
@@ -24686,7 +24690,10 @@ var ErpTributosComponent = /** @class */ (function () {
24686
24690
  context: _this.context
24687
24691
  });
24688
24692
  _this.changeDetector.detectChanges();
24689
- }
24693
+ },
24694
+ visible: this.context.document === 'Outgoing Invoice' &&
24695
+ this.context.invoice.type === 'Debit' &&
24696
+ this.context.invoice.debitInvoiceType === 'Inventory Loss'
24690
24697
  }, {
24691
24698
  id: 'retencaoFunrural',
24692
24699
  label: this.translate.instant('erpx.tributos.actions_retencao_funrural_label'),
@@ -26156,7 +26163,7 @@ var ErpTributosComponent = /** @class */ (function () {
26156
26163
  });
26157
26164
  return item;
26158
26165
  };
26159
- ErpTributosComponent.prototype.montaCBS_IBS_ESTORNO_CREDITO = function () {
26166
+ ErpTributosComponent.prototype.montaCBSIBSEstornoCredito = function () {
26160
26167
  if (this.menuItemCBS_IBS_ESTORNO_CREDITO)
26161
26168
  return;
26162
26169
  this.menuItemCBS_IBS_ESTORNO_CREDITO = true;
@@ -27403,58 +27410,54 @@ var ErpTributosComponent = /** @class */ (function () {
27403
27410
  }
27404
27411
  ];
27405
27412
  }
27406
- formField.push(new FormField(__assign(__assign({}, _this.e027StrLookup.mountOptions({
27407
- multiple: false,
27408
- domain: _this.dominio,
27409
- service: _this.servico,
27410
- searchGridFields: searchGridFields,
27411
- defaultFilter: [
27412
- {
27413
- field: 'excluido',
27414
- operator: EnumLogicalOperator.Eq,
27415
- values: ['false']
27416
- },
27417
- {
27418
- field: 'tipImp',
27419
- operator: EnumLogicalOperator.Eq,
27420
- values: [
27421
- mapEnumTipoTributoToEnumTipImpCst(tributo)
27422
- ]
27423
- },
27424
- {
27425
- field: 'tipOpe',
27426
- operator: EnumLogicalOperator.Eq,
27427
- values: _this.context.document ===
27428
- 'Outgoing Invoice' ||
27429
- _this.context.document ===
27430
- 'Controllership Outgoing Invoice'
27431
- ? [
27432
- EnumTipOpe.VAMBOS,
27433
- EnumTipOpe.VSAIDA
27434
- ]
27435
- : [
27436
- EnumTipOpe.VAMBOS,
27437
- EnumTipOpe.VENTRADA
27438
- ]
27439
- },
27440
- {
27441
- field: 'situacao',
27442
- operator: EnumLogicalOperator.Eq,
27443
- values: ['VATIVO']
27444
- },
27413
+ var defaultFilter = [
27414
+ {
27415
+ field: 'excluido',
27416
+ operator: EnumLogicalOperator.Eq,
27417
+ values: ['false']
27418
+ },
27419
+ {
27420
+ field: 'tipImp',
27421
+ operator: EnumLogicalOperator.Eq,
27422
+ values: [mapEnumTipoTributoToEnumTipImpCst(tributo)]
27423
+ },
27424
+ {
27425
+ field: 'tipOpe',
27426
+ operator: EnumLogicalOperator.Eq,
27427
+ values: _this.context.document === 'Outgoing Invoice' ||
27428
+ _this.context.document ===
27429
+ 'Controllership Outgoing Invoice'
27430
+ ? [EnumTipOpe.VAMBOS, EnumTipOpe.VSAIDA]
27431
+ : [EnumTipOpe.VAMBOS, EnumTipOpe.VENTRADA]
27432
+ },
27433
+ {
27434
+ field: 'situacao',
27435
+ operator: EnumLogicalOperator.Eq,
27436
+ values: ['VATIVO']
27437
+ }
27438
+ ];
27439
+ if (tributo === EnumTipoTributo.CBS ||
27440
+ tributo === EnumTipoTributo.IBS_ESTADUAL ||
27441
+ tributo === EnumTipoTributo.IBS_MUNICIPAL ||
27442
+ tributo === EnumTipoTributo.CBS_ESTORNO_CREDITO ||
27443
+ tributo === EnumTipoTributo.IBS_ESTORNO_CREDITO)
27444
+ defaultFilter = __spread(defaultFilter, [
27445
27445
  {
27446
27446
  field: 'classificacaoTributaria.indGEstornoCred',
27447
- operator: _this.context.document ===
27448
- 'Outgoing Invoice' &&
27449
- _this.context.invoice.type === 'Debit' &&
27450
- _this.context.invoice
27451
- .debitInvoiceType ===
27452
- 'Inventory Loss'
27447
+ operator: tributo ===
27448
+ EnumTipoTributo.CBS_ESTORNO_CREDITO ||
27449
+ tributo === EnumTipoTributo.IBS_ESTORNO_CREDITO
27453
27450
  ? EnumLogicalOperator.Eq
27454
27451
  : EnumLogicalOperator.Ne,
27455
27452
  values: ['EXIGE']
27456
27453
  }
27457
- ]
27454
+ ]);
27455
+ formField.push(new FormField(__assign(__assign({}, _this.e027StrLookup.mountOptions({
27456
+ multiple: false,
27457
+ domain: _this.dominio,
27458
+ service: _this.servico,
27459
+ searchGridFields: searchGridFields,
27460
+ defaultFilter: defaultFilter
27458
27461
  })), { onBlur: function () {
27459
27462
  if (!isTaxFromTaxReform(tributo)) {
27460
27463
  _this.setValidators(tributo);