Change document type at the point of sale (#1108)
Co-authored-by: elsiosanchez <elsiossanches@gmail.com>pull/3793/head
parent
966e63907e
commit
540b8807a3
|
@ -751,6 +751,7 @@ export default {
|
|||
this.clearOrder()
|
||||
},
|
||||
changeWarehouse(warehouse) {
|
||||
if (warehouse.is_pos_required_pin) {
|
||||
const attributePin = {
|
||||
...warehouse,
|
||||
action: 'changeWarehouse',
|
||||
|
@ -760,10 +761,17 @@ export default {
|
|||
const visible = true
|
||||
this.visible = visible
|
||||
this.$store.dispatch('changePopoverOverdrawnInvoice', { attributePin, visible: true })
|
||||
} else {
|
||||
this.$store.commit('setCurrentWarehousePos', warehouse)
|
||||
}
|
||||
},
|
||||
changeDocumentType(documentType) {
|
||||
if (this.adviserPin) {
|
||||
this.$store.commit('setCurrentDocumentTypePos', documentType)
|
||||
if (!documentType.is_pos_required_pin) {
|
||||
this.$store.dispatch('updateOrder', {
|
||||
orderUuid: this.currentOrder.uuid,
|
||||
posUuid: this.currentPointOfSales.uuid,
|
||||
documentTypeUuid: documentType.uuid
|
||||
})
|
||||
} else {
|
||||
const attributePin = {
|
||||
...documentType,
|
||||
|
@ -776,6 +784,7 @@ export default {
|
|||
}
|
||||
},
|
||||
changePriceList(priceList) {
|
||||
if (priceList.is_pos_required_pin) {
|
||||
const attributePin = {
|
||||
...priceList,
|
||||
action: 'changePriceList',
|
||||
|
@ -784,6 +793,9 @@ export default {
|
|||
}
|
||||
this.$store.dispatch('changePopoverOverdrawnInvoice', { attributePin, visible: true })
|
||||
this.visible = true
|
||||
} else {
|
||||
this.$store.commit('setCurrentPriceList', priceList)
|
||||
}
|
||||
},
|
||||
arrowTop() {
|
||||
if (this.currentTable > 0) {
|
||||
|
|
Loading…
Reference in New Issue