-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
-
-
- {{ $t('form.productInfo.code') }}: {{ currentLineOrder.product.value }}
- {{ $t('form.productInfo.name') }}: {{ currentLineOrder.product.name }}
- {{ $t('form.productInfo.description') }}: {{ currentLineOrder.product.description }}
-
-
-
- {{ $t('form.productInfo.price') }}:
- {{ formatPrice(currentLineOrder.product.priceStandard, pointOfSalesCurrency.iSOCode) }}
-
- {{ $t('form.productInfo.taxAmount') }}:
- {{ currentLineOrder.taxIndicator }}
-
- {{ $t('form.productInfo.quantityAvailable') }}:
- {{ formatQuantity(currentLineOrder.quantityOrdered) }}
-
-
-
-
-
- {{ $t('form.productInfo.productInformation') }}
-
-
-
-
-
-
-
- {{ $t('form.pos.tableProduct.editQuantities') }}
-
-
-
-
- {{ $t('form.pos.tableProduct.remove') }}
-
-
-
+
+
+
+
+
+ {{ $t('form.productInfo.code') }}: {{ scope.row.product.value }}
+ {{ $t('form.productInfo.name') }}: {{ scope.row.product.name }}
+ {{ $t('form.productInfo.description') }}: {{ scope.row.product.description }}
+
+
+
+ {{ $t('form.productInfo.price') }}:
+ {{ formatPrice(scope.row.product.priceStandard, pointOfSalesCurrency.iSOCode) }}
+
+ {{ $t('form.productInfo.taxAmount') }}:
+ {{ scope.row.taxIndicator }}
+
+ {{ $t('form.productInfo.quantityAvailable') }}:
+ {{ formatQuantity(scope.row.quantityOrdered) }}
+
+
+
+
+
+
+
+
+
+
+
@@ -465,8 +431,8 @@ export default {
return this.currentOrder.lineOrder
},
currentLineOrder() {
- console.log(this.$store.state['pointOfSales/orderLine/index'].line)
- return this.$store.state['pointOfSales/orderLine/index'].line
+ const line = this.$store.state['pointOfSales/orderLine/index'].line
+ return line
}
},
mounted() {
@@ -557,6 +523,10 @@ export default {
this.currentOrderLine = this.listOrderLine[this.currentTable]
}
},
+ showEditLine(line) {
+ this.$store.commit('setLine', line)
+ this.showFieldLine = !this.showFieldLine
+ },
arrowBottom() {
const top = this.listOrderLine.length - 1
if (this.currentTable < top) {
diff --git a/src/components/ADempiere/Form/VPOS/Order/line/index.vue b/src/components/ADempiere/Form/VPOS/Order/line/index.vue
index cc92a673..c1d40333 100644
--- a/src/components/ADempiere/Form/VPOS/Order/line/index.vue
+++ b/src/components/ADempiere/Form/VPOS/Order/line/index.vue
@@ -153,8 +153,7 @@ export default {
},
watch: {
showField(value) {
- if (value && this.isEmptyValue(this.metadataList) && (this.dataLine.uuid === this.currentLine.uuid)) {
- this.setFieldsList()
+ if (value && this.isEmptyValue(this.metadataList) && (this.dataLine.uuid === this.$store.state['pointOfSales/orderLine/index'].line.uuid)) {
this.metadataList = this.setFieldsList()
this.isLoadedField = true
}
diff --git a/src/components/ADempiere/Form/VPOS/Order/orderLineMixin.js b/src/components/ADempiere/Form/VPOS/Order/orderLineMixin.js
index c9596259..e53834ee 100644
--- a/src/components/ADempiere/Form/VPOS/Order/orderLineMixin.js
+++ b/src/components/ADempiere/Form/VPOS/Order/orderLineMixin.js
@@ -29,27 +29,32 @@ export default {
lineDescription: {
columnName: 'LineDescription',
label: this.$t('form.pos.tableProduct.product'),
- isNumeric: false
+ isNumeric: false,
+ size: '380'
},
currentPrice: {
columnName: 'CurrentPrice',
label: this.$t('form.productInfo.price'),
- isNumeric: true
+ isNumeric: true,
+ size: 'auto'
},
quantityOrdered: {
columnName: 'QtyOrdered',
label: this.$t('form.pos.tableProduct.quantity'),
- isNumeric: true
+ isNumeric: true,
+ size: '100px'
},
discount: {
columnName: 'Discount',
label: '% ' + this.$t('form.pos.order.discount'),
- isNumeric: true
+ isNumeric: true,
+ size: '110px'
},
grandTotal: {
columnName: 'GrandTotal',
label: 'Total',
- isNumeric: true
+ isNumeric: true,
+ size: 'auto'
}
},
currentOrderLine: {
@@ -119,12 +124,7 @@ export default {
}
},
updateOrderLine(line) {
- let {
- currentPrice: price,
- discount: discountRate,
- quantityOrdered: quantity
- } = this.currentOrderLine
-
+ let quantity, price, discountRate
switch (line.columnName) {
case 'QtyEntered':
quantity = line.value
@@ -155,7 +155,8 @@ export default {
discount: response.discountRate
})
this.fillOrderLine(response)
- this.reloadOrder(true)
+ this.$store.dispatch('reloadOrder', { orderUuid: this.$store.getters.posAttributes.currentPointOfSales.currentOrder.uuid })
+ this.$store.dispatch('currentLine', response)
})
.catch(error => {
console.error(error.message)
@@ -167,11 +168,12 @@ export default {
})
},
deleteOrderLine(lineSelection) {
+ console
requestDeleteOrderLine({
orderLineUuid: lineSelection.uuid
})
.then(() => {
- this.reloadOrder(true)
+ this.$store.dispatch('reloadOrder', { orderUuid: this.$store.getters.posAttributes.currentPointOfSales.currentOrder.uuid })
})
.catch(error => {
console.error(error.message)
@@ -203,6 +205,9 @@ export default {
return this.formatPrice(row.grandTotal, currency)
}
},
+ productPrice(price, discount) {
+ return price / discount * 100
+ },
handleCurrentLineChange(rowLine) {
this.$store.dispatch('currentLine', rowLine)
if (!this.isEmptyValue(rowLine)) {