Skip to content

Commit

Permalink
Sequence Increase when Changing Price List (#1248)
Browse files Browse the repository at this point in the history
Co-authored-by: elsiosanchez <[email protected]>
  • Loading branch information
elsiosanchez and elsiosanchez authored Oct 5, 2021
1 parent 951762d commit f3ab874
Showing 1 changed file with 43 additions and 37 deletions.
80 changes: 43 additions & 37 deletions src/components/ADempiere/Form/VPOS/Order/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -885,52 +885,58 @@ export default {
this.clearOrder()
},
changeWarehouse(warehouse) {
if (warehouse.is_pos_required_pin) {
const attributePin = {
...warehouse,
action: 'changeWarehouse',
type: 'actionPos',
label: this.$t('form.pos.pinMessage.warehouse')
if (warehouse.id !== this.currentWarehouse.id) {
if (warehouse.is_pos_required_pin) {
const attributePin = {
...warehouse,
action: 'changeWarehouse',
type: 'actionPos',
label: this.$t('form.pos.pinMessage.warehouse')
}
const visible = true
this.visible = visible
this.$store.dispatch('changePopoverOverdrawnInvoice', { attributePin, visible: true })
} else {
this.$store.commit('setCurrentWarehousePos', warehouse)
}
const visible = true
this.visible = visible
this.$store.dispatch('changePopoverOverdrawnInvoice', { attributePin, visible: true })
} else {
this.$store.commit('setCurrentWarehousePos', warehouse)
}
},
changeDocumentType(documentType) {
if (!documentType.is_pos_required_pin) {
this.$store.dispatch('updateOrder', {
orderUuid: this.currentOrder.uuid,
posUuid: this.currentPointOfSales.uuid,
documentTypeUuid: documentType.uuid,
priceListUuid: this.currentPointOfSales.priceList.uuid,
warehouseUuid: this.currentPointOfSales.warehouse.uuid
})
} else {
const attributePin = {
...documentType,
action: 'changeDocumentType',
type: 'actionPos',
label: this.$t('form.pos.pinMessage.documentType')
if (documentType.id !== this.currentDocumentType.id) {
if (!documentType.is_pos_required_pin) {
this.$store.dispatch('updateOrder', {
orderUuid: this.currentOrder.uuid,
posUuid: this.currentPointOfSales.uuid,
documentTypeUuid: documentType.uuid,
priceListUuid: this.currentPointOfSales.priceList.uuid,
warehouseUuid: this.currentPointOfSales.warehouse.uuid
})
} else {
const attributePin = {
...documentType,
action: 'changeDocumentType',
type: 'actionPos',
label: this.$t('form.pos.pinMessage.documentType')
}
this.$store.dispatch('changePopoverOverdrawnInvoice', { attributePin, visible: true })
this.visible = true
}
this.$store.dispatch('changePopoverOverdrawnInvoice', { attributePin, visible: true })
this.visible = true
}
},
changePriceList(priceList) {
if (priceList.is_pos_required_pin) {
const attributePin = {
...priceList,
action: 'changePriceList',
type: 'actionPos',
label: this.$t('form.pos.pinMessage.priceList')
if (priceList.id !== this.currentPriceList.id) {
if (priceList.is_pos_required_pin) {
const attributePin = {
...priceList,
action: 'changePriceList',
type: 'actionPos',
label: this.$t('form.pos.pinMessage.priceList')
}
this.$store.dispatch('changePopoverOverdrawnInvoice', { attributePin, visible: true })
this.visible = true
} else {
this.$store.commit('setCurrentPriceList', priceList)
}
this.$store.dispatch('changePopoverOverdrawnInvoice', { attributePin, visible: true })
this.visible = true
} else {
this.$store.commit('setCurrentPriceList', priceList)
}
},
arrowTop() {
Expand Down

0 comments on commit f3ab874

Please sign in to comment.