@seniorsistemas/yms-integration 1.4.0 → 1.4.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.
- package/bundles/seniorsistemas-yms-integration.umd.js +25 -26
- package/bundles/seniorsistemas-yms-integration.umd.js.map +1 -1
- package/bundles/seniorsistemas-yms-integration.umd.min.js +1 -1
- package/bundles/seniorsistemas-yms-integration.umd.min.js.map +1 -1
- package/esm2015/src/erp-senior/components/nota-form/nota-form.component.js +3 -3
- package/esm2015/src/erp-senior/devolucao/form/devolucao-form.component.js +4 -1
- package/esm2015/src/erp-senior/expedicao/form/expedicao-form.component.js +4 -1
- package/esm2015/src/erp-senior/processo-avulso/form/processo-avulso-form.component.js +7 -1
- package/esm2015/src/erp-senior/recebimento/form/recebimento-form.component.js +5 -4
- package/esm2015/src/erp-senior/recebimento-ordem-compra/form/recebimento-ordem-compra-form.component.js +7 -21
- package/esm5/src/erp-senior/components/nota-form/nota-form.component.js +4 -4
- package/esm5/src/erp-senior/devolucao/form/devolucao-form.component.js +4 -1
- package/esm5/src/erp-senior/expedicao/form/expedicao-form.component.js +4 -1
- package/esm5/src/erp-senior/processo-avulso/form/processo-avulso-form.component.js +7 -1
- package/esm5/src/erp-senior/recebimento/form/recebimento-form.component.js +5 -4
- package/esm5/src/erp-senior/recebimento-ordem-compra/form/recebimento-ordem-compra-form.component.js +7 -21
- package/fesm2015/seniorsistemas-yms-integration.js +24 -25
- package/fesm2015/seniorsistemas-yms-integration.js.map +1 -1
- package/fesm5/seniorsistemas-yms-integration.js +25 -26
- package/fesm5/seniorsistemas-yms-integration.js.map +1 -1
- package/package.json +1 -1
- package/seniorsistemas-yms-integration.metadata.json +1 -1
- package/src/erp-senior/processo-avulso/form/processo-avulso-form.component.d.ts +1 -0
- package/src/erp-senior/recebimento-ordem-compra/form/recebimento-ordem-compra-form.component.d.ts +1 -1
|
@@ -2457,10 +2457,10 @@
|
|
|
2457
2457
|
if (!value.itens || !value.itens.length) {
|
|
2458
2458
|
return;
|
|
2459
2459
|
}
|
|
2460
|
-
|
|
2461
|
-
|
|
2460
|
+
if (!!value.itens[0].produto && !!_this.produto && (value.itens[0].produto.id !== _this.produto.id)) {
|
|
2461
|
+
_this.addErrorIfProdutoIsDifferent();
|
|
2462
2462
|
return;
|
|
2463
|
-
}
|
|
2463
|
+
}
|
|
2464
2464
|
if (!_this.fornecedor) {
|
|
2465
2465
|
_this.closeAndReturnNota({ chave: _this.formGroup.get("chaveNotaFiscal").value, serie: value.serie, numero: value.numero }, value.fornecedor, value.origemMercadoria);
|
|
2466
2466
|
return;
|
|
@@ -5039,6 +5039,9 @@
|
|
|
5039
5039
|
this.validateAllFormFields(this.formGroup);
|
|
5040
5040
|
}
|
|
5041
5041
|
this.loading = true;
|
|
5042
|
+
if (this.isNew()) {
|
|
5043
|
+
return this.saveAndInit(start);
|
|
5044
|
+
}
|
|
5042
5045
|
if (this.isFormModified) {
|
|
5043
5046
|
this.agendaService
|
|
5044
5047
|
.retornaModelosValidacao(this.agenda.tipoAgendamento.id)
|
|
@@ -5764,6 +5767,9 @@
|
|
|
5764
5767
|
this.setValuesPedidoBiodisel();
|
|
5765
5768
|
var _a = this.fieldCustomization.getFiles(this.formGroup), filesToDelete = _a.filesToDelete, filesToCommit = _a.filesToCommit;
|
|
5766
5769
|
this.loading = true;
|
|
5770
|
+
if (this.isNew()) {
|
|
5771
|
+
return this.saveAndInit(filesToDelete, filesToCommit, start);
|
|
5772
|
+
}
|
|
5767
5773
|
if (this.isFormModified) {
|
|
5768
5774
|
this.agendaService
|
|
5769
5775
|
.retornaModelosValidacao(this.agenda.tipoAgendamento.id)
|
|
@@ -7171,6 +7177,9 @@
|
|
|
7171
7177
|
return this.validateAllFormFields(this.formGroup);
|
|
7172
7178
|
}
|
|
7173
7179
|
this.loading = true;
|
|
7180
|
+
if (this.isNew()) {
|
|
7181
|
+
return this.saveAndInit(start);
|
|
7182
|
+
}
|
|
7174
7183
|
if (this.isFormModified) {
|
|
7175
7184
|
this.agendaService
|
|
7176
7185
|
.retornaModelosValidacao(this.agenda.tipoAgendamento.id)
|
|
@@ -7225,6 +7234,9 @@
|
|
|
7225
7234
|
detail: this.translate.instant("saved_message_content"),
|
|
7226
7235
|
});
|
|
7227
7236
|
};
|
|
7237
|
+
ProcessoAvulsoFormComponent.prototype.isNew = function () {
|
|
7238
|
+
return !this.formGroup.value.id;
|
|
7239
|
+
};
|
|
7228
7240
|
ProcessoAvulsoFormComponent.prototype.onFilialLookupRequest = function (value) {
|
|
7229
7241
|
var _this = this;
|
|
7230
7242
|
var filterInput = this.getFilialSearchFields()
|
|
@@ -7652,7 +7664,7 @@
|
|
|
7652
7664
|
var _this = this;
|
|
7653
7665
|
this.route.params.pipe(operators.takeUntil(this.ngUnsubscribe)).subscribe(function (_a) {
|
|
7654
7666
|
var agenda = _a.agenda;
|
|
7655
|
-
if (agenda ==
|
|
7667
|
+
if (agenda == "new") {
|
|
7656
7668
|
return _this.configureForm();
|
|
7657
7669
|
}
|
|
7658
7670
|
_this.getRecebimentoOrdemCompra(agenda);
|
|
@@ -8096,8 +8108,11 @@
|
|
|
8096
8108
|
return;
|
|
8097
8109
|
}
|
|
8098
8110
|
this.loading = true;
|
|
8111
|
+
if (this.isNew()) {
|
|
8112
|
+
return this.saveAndInit(start);
|
|
8113
|
+
}
|
|
8099
8114
|
if (this.isFormModified) {
|
|
8100
|
-
this.agendaService
|
|
8115
|
+
return this.agendaService
|
|
8101
8116
|
.retornaModelosValidacao(this.agenda.tipoAgendamento.id)
|
|
8102
8117
|
.pipe(operators.takeUntil(this.ngUnsubscribe), operators.finalize(function () { return _this.loading = false; }))
|
|
8103
8118
|
.subscribe(function (response) {
|
|
@@ -8110,7 +8125,7 @@
|
|
|
8110
8125
|
});
|
|
8111
8126
|
}
|
|
8112
8127
|
else {
|
|
8113
|
-
this.saveAndInit(start);
|
|
8128
|
+
return this.saveAndInit(start);
|
|
8114
8129
|
}
|
|
8115
8130
|
};
|
|
8116
8131
|
RecebimentoOrdemCompraFormComponent.prototype.atualizaAgendaParaRejeitadoPorValidacao = function () {
|
|
@@ -8394,16 +8409,6 @@
|
|
|
8394
8409
|
if (!values) {
|
|
8395
8410
|
return;
|
|
8396
8411
|
}
|
|
8397
|
-
/* const itemProduto = values.itens[0] || { produto: undefined, derivacao: undefined } as any;
|
|
8398
|
-
const produto = Produto.fromDto(itemProduto.produto);
|
|
8399
|
-
|
|
8400
|
-
if (!this.formGroup.get("produto").value && !!itemProduto.produto) {
|
|
8401
|
-
this.formGroup.get("produto").setValue(produto);
|
|
8402
|
-
this.formGroup.get("derivacao").setValue(Derivacao.fromDto(itemProduto.derivacao));
|
|
8403
|
-
} else if (!!itemProduto.produto && !this.validateProduto(produto)) {
|
|
8404
|
-
this.addNotaError();
|
|
8405
|
-
return;
|
|
8406
|
-
} */
|
|
8407
8412
|
var fornecedor = Pessoa.fromDto(values.fornecedor);
|
|
8408
8413
|
var origemMercadoria = PessoaEndereco.fromDto(values.origemMercadoria);
|
|
8409
8414
|
var fornecedorForm = this.getFornecedores().controls.find(function (_a) {
|
|
@@ -8417,13 +8422,6 @@
|
|
|
8417
8422
|
}
|
|
8418
8423
|
this.addFornecedorNotasToken(values);
|
|
8419
8424
|
};
|
|
8420
|
-
/* private validateProduto(produto: Produto) {
|
|
8421
|
-
const { value } = this.formGroup.get("produto");
|
|
8422
|
-
if (value.id !== produto.id) {
|
|
8423
|
-
return false;
|
|
8424
|
-
}
|
|
8425
|
-
return true;
|
|
8426
|
-
} */
|
|
8427
8425
|
RecebimentoOrdemCompraFormComponent.prototype.addFornecedorNotasToken = function (value) {
|
|
8428
8426
|
this.fornecedorNotasTokens.push({
|
|
8429
8427
|
id: this.chaveNotaFiscal,
|
|
@@ -9472,9 +9470,7 @@
|
|
|
9472
9470
|
this.notaValidatorService.pesquisarDocumento({
|
|
9473
9471
|
filialId: (this.formGroup.get("filial").value && this.formGroup.get("filial").value.id) || null,
|
|
9474
9472
|
chaveDocumento: value.trim()
|
|
9475
|
-
}).pipe(operators.takeUntil(this.ngUnsubscribe), operators.finalize(function () { return _this.loading = false; })).subscribe(
|
|
9476
|
-
_this.adicionarNovaNota(response);
|
|
9477
|
-
});
|
|
9473
|
+
}).pipe(operators.takeUntil(this.ngUnsubscribe), operators.finalize(function () { return _this.loading = false; })).subscribe(this.adicionarNovaNota);
|
|
9478
9474
|
}
|
|
9479
9475
|
};
|
|
9480
9476
|
RecebimentoFormComponent.prototype.isNew = function () {
|
|
@@ -9565,6 +9561,9 @@
|
|
|
9565
9561
|
return this.validateAllFormFields(this.formGroup);
|
|
9566
9562
|
}
|
|
9567
9563
|
this.loading = true;
|
|
9564
|
+
if (this.isNew()) {
|
|
9565
|
+
return this.saveAndInit(start);
|
|
9566
|
+
}
|
|
9568
9567
|
if (this.isFormModified) {
|
|
9569
9568
|
return this.agendaService
|
|
9570
9569
|
.retornaModelosValidacao(this.agenda.tipoAgendamento.id)
|