@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.
@@ -0,0 +1,7 @@
1
+ export var EnumIndicativoPadrao;
2
+ (function (EnumIndicativoPadrao) {
3
+ EnumIndicativoPadrao["NAO_PERMITIDO"] = "NAO_PERMITIDO";
4
+ EnumIndicativoPadrao["EXIGE"] = "EXIGE";
5
+ EnumIndicativoPadrao["INDIFERENTE"] = "INDIFERENTE";
6
+ })(EnumIndicativoPadrao || (EnumIndicativoPadrao = {}));
7
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZW51bS1pbmRpY2F0aXZvLXBhZHJhby5qcyIsInNvdXJjZVJvb3QiOiJuZzovL0BzZW5pb3ItZ2VzdGFvLWVtcHJlc2FyaWFsL2VycHgtY29tcG9uZW50cy8iLCJzb3VyY2VzIjpbImNvcmUvZW51bXMvZXJweC1jb20tcHJvY2Vzc28tZmF0dXJhbWVudG8tYmFja2VuZC9lbnVtLWluZGljYXRpdm8tcGFkcmFvLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE1BQU0sQ0FBTixJQUFZLG9CQUlYO0FBSkQsV0FBWSxvQkFBb0I7SUFDNUIsdURBQStCLENBQUE7SUFDL0IsdUNBQWUsQ0FBQTtJQUNmLG1EQUEyQixDQUFBO0FBQy9CLENBQUMsRUFKVyxvQkFBb0IsS0FBcEIsb0JBQW9CLFFBSS9CIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0IGVudW0gRW51bUluZGljYXRpdm9QYWRyYW8ge1xuICAgIE5BT19QRVJNSVRJRE8gPSAnTkFPX1BFUk1JVElETycsXG4gICAgRVhJR0UgPSAnRVhJR0UnLFxuICAgIElORElGRVJFTlRFID0gJ0lORElGRVJFTlRFJ1xufVxuIl19
@@ -299,6 +299,13 @@ var EnumTipoCalculoImposto;
299
299
  EnumTipoCalculoImposto["MANUAL"] = "MANUAL";
300
300
  })(EnumTipoCalculoImposto || (EnumTipoCalculoImposto = {}));
301
301
 
302
+ var EnumIndicativoPadrao;
303
+ (function (EnumIndicativoPadrao) {
304
+ EnumIndicativoPadrao["NAO_PERMITIDO"] = "NAO_PERMITIDO";
305
+ EnumIndicativoPadrao["EXIGE"] = "EXIGE";
306
+ EnumIndicativoPadrao["INDIFERENTE"] = "INDIFERENTE";
307
+ })(EnumIndicativoPadrao || (EnumIndicativoPadrao = {}));
308
+
302
309
  let ErpTributosService = class ErpTributosService {
303
310
  constructor(http, messageService) {
304
311
  this.http = http;
@@ -27551,16 +27558,16 @@ let ErpTributosComponent = class ErpTributosComponent {
27551
27558
  { campo: EnumCampoTributo.Valor }
27552
27559
  ], EnumTipoTributo.IPI_PRESUMIDO)));
27553
27560
  break;
27554
- case this.context.document === 'Outgoing Invoice' &&
27555
- this.context.invoice.type === 'Product Return':
27556
- item.unshift(Object.assign({ name: EnumTipoTributo.IPI_PRESUMIDO, label: 'erpx.tributos.enum_tipo_tributo_ipi_presumido' }, this.montaCampos([
27557
- { campo: EnumCampoTributo.BaseCalculo },
27558
- { campo: EnumCampoTributo.Aliquota },
27559
- { campo: EnumCampoTributo.Valor }
27560
- ], EnumTipoTributo.IPI_PRESUMIDO)));
27561
- break;
27562
27561
  case this.context.document === 'Outgoing Invoice' &&
27563
27562
  this.context.invoice.type !== 'Debit':
27563
+ if (this.context.document === 'Outgoing Invoice' &&
27564
+ this.context.invoice.type === 'Product Return') {
27565
+ item.unshift(Object.assign({ name: EnumTipoTributo.IPI_PRESUMIDO, label: 'erpx.tributos.enum_tipo_tributo_ipi_presumido' }, this.montaCampos([
27566
+ { campo: EnumCampoTributo.BaseCalculo },
27567
+ { campo: EnumCampoTributo.Aliquota },
27568
+ { campo: EnumCampoTributo.Valor }
27569
+ ], EnumTipoTributo.IPI_PRESUMIDO)));
27570
+ }
27564
27571
  item.unshift(Object.assign({ name: EnumTipoTributo.IPI, label: 'erpx.tributos.enum_tipo_tributo_ipi' }, this.montaCampos([
27565
27572
  { campo: EnumCampoTributo.BaseCalculo },
27566
27573
  { campo: EnumCampoTributo.Aliquota },
@@ -28528,7 +28535,7 @@ let ErpTributosComponent = class ErpTributosComponent {
28528
28535
  tributo === EnumTipoTributo.IBS_ESTORNO_CREDITO
28529
28536
  ? EnumLogicalOperator.Eq
28530
28537
  : EnumLogicalOperator.Ne,
28531
- values: ['EXIGE']
28538
+ values: [EnumIndicativoPadrao.EXIGE]
28532
28539
  },
28533
28540
  {
28534
28541
  field: 'indGAjusteCompet',
@@ -28536,7 +28543,7 @@ let ErpTributosComponent = class ErpTributosComponent {
28536
28543
  tributo === EnumTipoTributo.IBS_AJUSTE
28537
28544
  ? EnumLogicalOperator.Eq
28538
28545
  : EnumLogicalOperator.Ne,
28539
- values: ['EXIGE']
28546
+ values: [EnumIndicativoPadrao.EXIGE]
28540
28547
  }
28541
28548
  ];
28542
28549
  formField.push(new FormField(Object.assign(Object.assign({}, this.e027StrLookup.mountOptions({
@@ -28561,6 +28568,22 @@ let ErpTributosComponent = class ErpTributosComponent {
28561
28568
  { value: undefined, disabled: false },
28562
28569
  Validators.compose([])
28563
28570
  ] });
28571
+ const defaultFilter = [
28572
+ {
28573
+ field: 'situacao',
28574
+ operator: EnumLogicalOperator.Eq,
28575
+ values: ['ATIVO']
28576
+ }
28577
+ ];
28578
+ if (this.context.document === 'Outgoing Invoice' &&
28579
+ this.context.invoice.type === 'Debit' &&
28580
+ (tributo === EnumTipoTributo.CBS_ESTORNO_CREDITO ||
28581
+ tributo === EnumTipoTributo.IBS_ESTORNO_CREDITO))
28582
+ defaultFilter.push({
28583
+ field: 'indGEstornoCred',
28584
+ operator: EnumLogicalOperator.Eq,
28585
+ values: [EnumIndicativoPadrao.EXIGE]
28586
+ });
28564
28587
  formField.push(new FormField(Object.assign(Object.assign({}, this.classificacaoTributariaLookup.mountOptions({
28565
28588
  multiple: false,
28566
28589
  prefix: 'erpx_cpl_imp.impostos',
@@ -28568,13 +28591,7 @@ let ErpTributosComponent = class ErpTributosComponent {
28568
28591
  service: this.servico,
28569
28592
  entity: 'classificacaoTributaria',
28570
28593
  formGroup: 'classificacaoTributaria',
28571
- defaultFilter: [
28572
- {
28573
- field: 'situacao',
28574
- operator: EnumLogicalOperator.Eq,
28575
- values: ['ATIVO']
28576
- }
28577
- ],
28594
+ defaultFilter,
28578
28595
  queryFields: ['e027str.id'],
28579
28596
  entityDependency: [
28580
28597
  {