@seniorsistemas/yms-integration 1.38.0-0be270cf-7979-4065-88af-d4097b6f6e51 → 1.38.0-84525130-8955-4de4-9dbd-cbae08fb1cda

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.
@@ -3841,22 +3841,19 @@
3841
3841
  });
3842
3842
  };
3843
3843
  RegisterDocumentComponent.prototype.save = function () {
3844
- var logistcUnitDocument = this.formGroup.get("logistcUnitDocument").value;
3845
- this.validateYardDocument(logistcUnitDocument);
3846
- this.document.emit(Document.fromDto(this.formGroup.getRawValue()));
3847
- this.formGroup.reset();
3848
- };
3849
- RegisterDocumentComponent.prototype.validateYardDocument = function (logistcUnitDocument) {
3850
3844
  if (this.isWmsSeniorConnect()) {
3851
3845
  if (!this.planta.codigo) {
3852
3846
  this.utils.message("warn", "yms.int.yard_code_not_found_warning_header", "yms.int.yard_code_not_found_warning_description");
3853
3847
  return;
3854
3848
  }
3849
+ var logistcUnitDocument = this.formGroup.get("logistcUnitDocument").value;
3855
3850
  if (logistcUnitDocument !== this.planta.codigo) {
3856
3851
  this.utils.message("warn", "yms.int.document_yard_mismatch_agenda_warning_header", "yms.int.document_yard_mismatch_agenda_warning_description");
3857
3852
  return;
3858
3853
  }
3859
3854
  }
3855
+ this.document.emit(Document.fromDto(this.formGroup.getRawValue()));
3856
+ this.formGroup.reset();
3860
3857
  };
3861
3858
  RegisterDocumentComponent.prototype.isWmsWis = function () {
3862
3859
  return this.wmsSystem === WmsSystem.WIS;
@@ -4042,25 +4039,22 @@
4042
4039
  return;
4043
4040
  }
4044
4041
  var document = content.contents[0];
4045
- _this.validateYardDocument(document.logistcUnitDocument);
4042
+ if (_this.isWmsSeniorConnect()) {
4043
+ if (!_this.planta.codigo) {
4044
+ _this.utils.message("warn", "yms.int.yard_code_not_found_warning_header", "yms.int.yard_code_not_found_warning_description");
4045
+ return;
4046
+ }
4047
+ if (document.logistcUnitDocument !== _this.planta.codigo) {
4048
+ _this.utils.message("warn", "yms.int.document_yard_mismatch_agenda_warning_header", "yms.int.document_yard_mismatch_agenda_warning_description");
4049
+ return;
4050
+ }
4051
+ }
4046
4052
  document.invoiceKey = _this.formGroup.get('key').value;
4047
4053
  document.invoiceCondition = InvoiceCondition.AUTHORIZED;
4048
4054
  _this.document.emit(document);
4049
4055
  _this.formGroup.reset();
4050
4056
  });
4051
4057
  };
4052
- InsertKeyComponent.prototype.validateYardDocument = function (logistcUnitDocument) {
4053
- if (this.isWmsSeniorConnect()) {
4054
- if (!this.planta.codigo) {
4055
- this.utils.message("warn", "yms.int.yard_code_not_found_warning_header", "yms.int.yard_code_not_found_warning_description");
4056
- return;
4057
- }
4058
- if (logistcUnitDocument !== this.planta.codigo) {
4059
- this.utils.message("warn", "yms.int.document_yard_mismatch_agenda_warning_header", "yms.int.document_yard_mismatch_agenda_warning_description");
4060
- return;
4061
- }
4062
- }
4063
- };
4064
4058
  InsertKeyComponent.prototype.confirmInvoiceDialog = function () {
4065
4059
  var _this = this;
4066
4060
  if (this.isWmsWis()) {