Skip to content

Commit

Permalink
show price base the info product (#1106)
Browse files Browse the repository at this point in the history
* show price base the info product

* fixe style

* minimal changes

Co-authored-by: elsiosanchez <[email protected]>
  • Loading branch information
elsiosanchez and elsiosanchez authored Aug 24, 2021
1 parent 540b880 commit c908591
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 31 deletions.
17 changes: 10 additions & 7 deletions src/components/ADempiere/Form/VPOS/Order/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -145,13 +145,14 @@
popper-class="el-popper-info"
placement="right-start"
trigger="click"
width="300"
:title="$t('form.productInfo.productInformation')"
>
<el-form
label-position="top"
style="float: right;display: contents;line-height: 30px;"
>
<el-row>
<el-row style="margin: 10px!important;">
<el-col :span="4">
<div>
<el-avatar v-if="isEmptyValue(scope.row.product.imageUrl)" shape="square" :size="100" src="https://#" @error="true">
Expand All @@ -175,12 +176,14 @@
{{ $t('form.productInfo.description') }}: <b>{{ scope.row.product.description }}</b><br>
</el-col>
<el-col :span="8">
<div style="float: right">
<div style="float: right; text-align: end;">
{{ $t('form.productInfo.price') }}:
<b>{{ formatPrice(scope.row.product.priceActual, pointOfSalesCurrency.iSOCode) }}</b>
<b>{{ formatPrice(scope.row.priceList, pointOfSalesCurrency.iSOCode) }}</b>
<br>
{{ $t('form.productInfo.taxAmount') }}:
<b>{{ scope.row.taxIndicator }}</b>
<b>{{ scope.row.taxRate.name }}</b>
<br>
{{ $t('form.productInfo.grandTotal') }}:
<b>{{ formatPrice((scope.row.priceList * scope.row.taxRate.rate / 100) + scope.row.priceList, pointOfSalesCurrency.iSOCode) }}</b>
<br>
{{ $t('form.productInfo.quantityAvailable') }}:
<b>{{ formatQuantity(scope.row.quantityOrdered) }}</b>
Expand Down Expand Up @@ -991,7 +994,7 @@ export default {
<style>
.el-popper-info {
margin-left: 12px;
max-width: 65%;
min-width: 50%;
max-width: 75%;
min-width: 60%;
}
</style>
42 changes: 20 additions & 22 deletions src/components/ADempiere/Form/VPOS/posMixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -548,31 +548,29 @@ export default {
return this.formatPrice(this.currentOrder.grandTotal - this.currentOrder.totalLines, currency)
},
deleteOrderLine(lineSelection) {
if (this.isPosRequiredPin) {
if (this.allowsModifyQuantity) {
deleteOrderLine({
orderLineUuid: lineSelection.uuid
if (this.currentPointOfSales.isAllowsModifyQuantity) {
deleteOrderLine({
orderLineUuid: lineSelection.uuid
})
.then(response => {
this.$store.dispatch('reloadOrder', { orderUuid: this.$store.getters.posAttributes.currentPointOfSales.currentOrder.uuid })
})
.then(response => {
this.$store.dispatch('reloadOrder', { orderUuid: this.$store.getters.posAttributes.currentPointOfSales.currentOrder.uuid })
})
.catch(error => {
console.error(error.message)
this.$message({
type: 'error',
message: error.message,
showClose: true
})
.catch(error => {
console.error(error.message)
this.$message({
type: 'error',
message: error.message,
showClose: true
})
} else {
const attributePin = {
...lineSelection,
type: 'deleteLine',
label: this.$t('form.pos.pinMessage.delete')
}
this.$store.dispatch('changePopoverOverdrawnInvoice', { attributePin, visible: true })
this.visible = true
})
} else {
const attributePin = {
...lineSelection,
type: 'deleteLine',
label: this.$t('form.pos.pinMessage.delete')
}
this.$store.dispatch('changePopoverOverdrawnInvoice', { attributePin, visible: true })
this.visible = true
}
},
subscribeChanges() {
Expand Down
2 changes: 1 addition & 1 deletion src/lang/ADempiere/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -548,7 +548,7 @@ export default {
taxAmount: 'Tax Amount',
grandTotal: 'Grand Total',
grandTotalConverted: 'Grand Total Converted',
quantityAvailable: 'Quantity Avalible',
quantityAvailable: 'Available',
upc: 'UPC / EAN'
},
guideSteps: {
Expand Down
2 changes: 1 addition & 1 deletion src/lang/ADempiere/es.js
Original file line number Diff line number Diff line change
Expand Up @@ -524,7 +524,7 @@ export default {
taxAmount: 'Monto de Impuesto',
grandTotal: 'Total General',
grandTotalConverted: 'Gran Total Convertido',
quantityAvailable: 'Cantidad Disponible',
quantityAvailable: 'Disponible',
upc: 'Código de Barras'
},
guideSteps: {
Expand Down

0 comments on commit c908591

Please sign in to comment.