Skip to content

Commit

Permalink
Modify the Name of the Columns in the UI (#1238)
Browse files Browse the repository at this point in the history
* Modify the Name of the Columns in the UI

* add column % Tax

* minimal changes

Co-authored-by: elsiosanchez <elsiossanches@gmail.com>
  • Loading branch information
elsiosanchez and elsiosanchez authored Sep 28, 2021
1 parent b8a86ba commit dc53aa4
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 18 deletions.
2 changes: 1 addition & 1 deletion src/components/ADempiere/Form/VPOS/Order/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@
</template>
<el-table-column
:label="$t('form.pos.tableProduct.options')"
width="180"
width="164"
>
<template slot-scope="scope">
<el-popover
Expand Down
42 changes: 33 additions & 9 deletions src/components/ADempiere/Form/VPOS/Order/orderLineMixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,50 +30,56 @@ export default {
columnName: 'LineDescription',
label: this.$t('form.pos.tableProduct.product'),
isNumeric: false,
size: '380'
size: '345px'
},
currentPrice: {
columnName: 'CurrentPrice',
label: this.$t('form.productInfo.price'),
isNumeric: true,
size: 'auto'
size: '165px'
},
quantityOrdered: {
columnName: 'QtyEntered',
label: this.$t('form.pos.tableProduct.quantity'),
isNumeric: true,
size: 'auto'
size: '82px'
},
discount: {
columnName: 'Discount',
label: '% ' + this.$t('form.pos.order.discount'),
label: this.$t('form.pos.order.discount'),
isNumeric: true,
size: 'auto'
size: '78px'
},
discountTotal: {
columnName: 'DiscountTotal',
label: this.$t('form.pos.tableProduct.displayDiscuentAmount'),
isNumeric: true,
size: 'auto'
size: '110px'
},
discounDisplayTaxAmounttTotal: {
columnName: 'DisplayTaxAmount',
label: this.$t('form.pos.tableProduct.displayTaxAmount'),
isNumeric: true,
size: '110px'
size: '155px'
},
discounDisplayTaxIndicator: {
columnName: 'taxIndicator',
label: this.$t('form.pos.tableProduct.displayTaxIMP'),
isNumeric: true,
size: '60px'
},
grandTotal: {
columnName: 'GrandTotal',
label: 'Total',
isNumeric: true,
isVisible: true,
size: '110px'
size: 'auto'
},
convertedAmount: {
columnName: 'ConvertedAmount',
label: this.$t('form.pos.collect.convertedAmount'),
isNumeric: true,
size: '110px'
size: 'auto'
}
},
currentOrderLine: {
Expand Down Expand Up @@ -112,6 +118,20 @@ export default {
return pos.isPosRequiredPin
}
return false
},
isShowKeyLayout() {
return this.$store.getters.getShowPOSKeyLayout
}
},
watch: {
isShowKeyLayout(value) {
if (value) {
this.orderLineDefinition.lineDescription.size = '140px'
this.orderLineDefinition.currentPrice.size = 'auto'
} else {
this.orderLineDefinition.lineDescription.size = '300px'
this.orderLineDefinition.currentPrice.size = '165px'
}
}
},
methods: {
Expand Down Expand Up @@ -247,6 +267,8 @@ export default {
return !this.isEmptyValue(this.currentPointOfSales.displayCurrency)
} else if (row.columnName === 'DiscountTotal') {
return this.currentPointOfSales.isDisplayDiscount
} else if (row.columnName === 'taxIndicator') {
return this.currentPointOfSales.isDisplayDiscount
} else if (row.columnName === 'DisplayTaxAmount') {
return this.currentPointOfSales.isDisplayTaxAmount
}
Expand All @@ -270,6 +292,8 @@ export default {
return this.formatQuantity(row.quantityOrdered)
} else if (columnName === 'Discount') {
return this.formatQuantity(row.discount) + '%'
} else if (columnName === 'taxIndicator') {
return this.formatQuantity(row.taxIndicator)
} else if (columnName === 'GrandTotal') {
return this.formatPrice(row.grandTotal, currency)
} else if (columnName === 'ConvertedAmount') {
Expand Down
9 changes: 5 additions & 4 deletions src/lang/ADempiere/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -453,8 +453,9 @@ export default {
editQuantities: 'Edit Quantities',
pin: 'Insert Pin',
remove: 'Remove',
displayTaxAmount: 'Tax Amount',
displayDiscountAmount: 'Amount of Discount',
displayTaxAmount: 'Tax',
displayTaxIMP: '%Imp',
displayDiscountAmount: 'Discount',
empty: 'Enter the product name, code or UPC'
},
order: {
Expand All @@ -463,7 +464,7 @@ export default {
date: 'Date',
subTotal: 'Sub-Total',
type: 'Type',
discount: 'Descuento',
discount: '%Dcto',
tax: 'Tax',
total: 'Total',
itemQuantity: 'Item Quantity',
Expand All @@ -487,7 +488,7 @@ export default {
change: 'Change',
totalInvoiced: 'Total Invoiced',
convertAmount: 'Convert Quantity',
convertedAmount: 'Converted Amount',
convertedAmount: 'Converted',
fullPayment: 'Full Payment',
dayRate: 'Day Rate',
noDayRate: 'No daily rate has been generated for the currency.',
Expand Down
9 changes: 5 additions & 4 deletions src/lang/ADempiere/es.js
Original file line number Diff line number Diff line change
Expand Up @@ -429,8 +429,9 @@ export default {
editQuantities: 'Editar Cantidades',
pin: 'Ingrese Pin',
remove: 'Eliminar',
displayTaxAmount: 'Monto del Impuesto',
displayDiscuentAmount: 'Monto del Descuento',
displayTaxAmount: 'Impuesto',
displayTaxIMP: '%Imp',
displayDiscuentAmount: 'Descuento',
empty: 'Ingrese el nombre del producto, código o UPC'
},
order: {
Expand All @@ -439,7 +440,7 @@ export default {
date: 'Fecha',
subTotal: 'Sub-Total',
type: 'Tipo',
discount: 'Descuento',
discount: '%Dcto',
tax: 'Impuesto',
total: 'Total',
itemQuantity: 'Cantidad de Artículos',
Expand All @@ -463,7 +464,7 @@ export default {
change: 'Cambio',
totalInvoiced: 'Total Facturado',
convertAmount: 'Convertir Cantidad',
convertedAmount: 'Monto Convertido',
convertedAmount: 'Convertido',
fullPayment: 'Cobro Completo',
Currency: 'Moneda',
dayRate: 'Tasa del Día',
Expand Down

0 comments on commit dc53aa4

Please sign in to comment.