From c9bc2af4342cebccb2333be75a7d9053d02849f8 Mon Sep 17 00:00:00 2001 From: elsiosanchez Date: Wed, 24 Aug 2022 09:58:39 -0400 Subject: [PATCH 1/2] Error in the sum of Warehouse --- .../ADempiere/Form/VPOS/Order/index.vue | 2 +- .../ADempiere/Form/VPOS/Order/line/index.vue | 57 ++++++++----------- 2 files changed, 25 insertions(+), 34 deletions(-) diff --git a/components/ADempiere/Form/VPOS/Order/index.vue b/components/ADempiere/Form/VPOS/Order/index.vue index cfadbefd..ebb1f962 100644 --- a/components/ADempiere/Form/VPOS/Order/index.vue +++ b/components/ADempiere/Form/VPOS/Order/index.vue @@ -182,7 +182,7 @@ placement="right" trigger="click" :title="$t('form.pos.tableProduct.editQuantities')" - width="600" + width="700" @hide="showFieldLine = false" > - - - + + - + {{ item.label }} - {{ item.qty }} + {{ item.sumaryQty }} @@ -252,7 +243,7 @@ export default { if (this.isEmptyValue(defaultLineWarehouse)) { const list = listWarehouseLine.push({ ...this.currentLine.warehouse, - qty: 0 + sumaryQty: 0 }) return list } From 94c8efec275cae2adf8bba35822f4f9d41fc402f Mon Sep 17 00:00:00 2001 From: elsiosanchez Date: Wed, 24 Aug 2022 11:09:25 -0400 Subject: [PATCH 2/2] minimal changes --- .../ADempiere/Form/VPOS/Order/line/index.vue | 22 ++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/components/ADempiere/Form/VPOS/Order/line/index.vue b/components/ADempiere/Form/VPOS/Order/line/index.vue index 3f35edb3..e64529c0 100644 --- a/components/ADempiere/Form/VPOS/Order/line/index.vue +++ b/components/ADempiere/Form/VPOS/Order/line/index.vue @@ -241,10 +241,14 @@ export default { defaultLineWarehouse = listWarehouseLine.find(stock => stock.uuid === this.currentLine.warehouse.uuid) } if (this.isEmptyValue(defaultLineWarehouse)) { - const list = listWarehouseLine.push({ + listWarehouseLine.push({ ...this.currentLine.warehouse, + label: this.currentLine.warehouse.name, + id: this.currentLine.warehouse.id, + uuid: this.currentLine.warehouse.uuid, sumaryQty: 0 }) + const list = listWarehouseLine return list } return listWarehouseLine @@ -401,6 +405,22 @@ export default { orderLineUuid: this.currentLine.uuid, warehouseUuid: value }) + .then(response => { + this.$message({ + type: 'success', + message: 'Acción a realizar', + showClose: true + }) + }) + .catch(error => { + this.stock = this.currentLine.warehouse.uuid + console.warn(error.message) + this.$message({ + type: 'error', + message: error.message, + showClose: true + }) + }) }, subscribeChanges() { return this.$store.subscribe((mutation, state) => {