@senior-gestao-empresarial/erpx-components 1.17.2 → 1.18.1

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.
@@ -4126,7 +4126,8 @@
4126
4126
  size: { sm: 12, md: 4, lg: 4, xl: 3 },
4127
4127
  type: angularComponents.FieldType.Double,
4128
4128
  scale: this.loteSerieParams.dadosProduto.qtdDec,
4129
- required: function () { return true; }
4129
+ required: function () { return true; },
4130
+ onBlur: function () { return _this.onBlurQuantity(); }
4130
4131
  }));
4131
4132
  }
4132
4133
  return dadosFieldsEntrada;
@@ -4180,6 +4181,7 @@
4180
4181
  searchFields: this.getQuantidadeDisponivelDemandaSearchFields(),
4181
4182
  searchGridFields: this.getQuantidadeDisponivelDemandaSearchGridFields(),
4182
4183
  multiple: true,
4184
+ dataKey: 'id',
4183
4185
  required: function () { return true; }
4184
4186
  }) :
4185
4187
  new angularComponents.FormField({
@@ -4272,7 +4274,8 @@
4272
4274
  size: { sm: 12, md: 4, lg: 4, xl: 3 },
4273
4275
  type: angularComponents.FieldType.Double,
4274
4276
  scale: this.loteSerieParams.dadosProduto.qtdDec,
4275
- required: function () { return true; }
4277
+ required: function () { return true; },
4278
+ onBlur: function () { return _this.onBlurQuantity(); }
4276
4279
  }));
4277
4280
  }
4278
4281
  return dadosFieldsSaida;
@@ -5208,6 +5211,16 @@
5208
5211
  var _a, _b;
5209
5212
  return ((_b = (_a = this.loteSerieParams) === null || _a === void 0 ? void 0 : _a.invoiceInformation) === null || _b === void 0 ? void 0 : _b.origin) === exports.EnumInvoiceOrigin.V2;
5210
5213
  };
5214
+ ErpLoteSerieComponent.prototype.onBlurQuantity = function () {
5215
+ var quantity = this.formGroupBatchOrSeries.controls.quantidade.value;
5216
+ var balance = this.formGroupBatchOrSeries.controls.saldo.value;
5217
+ if (quantity > balance)
5218
+ this.messageService.add({
5219
+ severity: 'warn',
5220
+ summary: this.translate.instant(this.prefix + "warn"),
5221
+ detail: this.translate.instant(this.prefix + "invalid_batch_distribution_quantity")
5222
+ });
5223
+ };
5211
5224
  ErpLoteSerieComponent.ctorParameters = function () { return [
5212
5225
  { type: core$1.TranslateService },
5213
5226
  { type: router.ActivatedRoute },