Skip to content
This repository was archived by the owner on Sep 16, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion components/ADempiere/Form/VPOS/Collection/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -1500,7 +1500,7 @@ export default {
title: this.$t('notifications.completed'),
type: 'success'
}
this.$store.dispatch('printTicket', { posUuid, orderUuid })
this.$store.dispatch('printTicket', { posId: this.currentPointOfSales.id, orderId: this.currentOrder.id })
.then(() => {})
.catch((error) => {
this.$message({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1902,8 +1902,8 @@ export default {
showClose: true
})
this.$store.dispatch('printTicket', {
posUuid: this.currentPointOfSales.uuid,
orderUuid: this.currentOrder.uuid
posId: this.currentPointOfSales.id,
orderId: this.currentOrder.id
})
this.summaryProcessOrder = {
labelModal: this.$t('notifications.succesful'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,8 @@ function completeOrder() {
if (this.$store.getters.getProcessLoading) return
const {
currentOrder,
uuid
uuid,
id
} = store.getters.posAttributes.currentPointOfSales
if (isEmptyValue(currentOrder) || currentOrder.documentStatus.value) return true
const isOpenRefund = !isEmptyValue(store.getters.getListRefundReference)
Expand All @@ -178,8 +179,8 @@ function completeOrder() {
})
.then(response => {
store.dispatch('printTicket', {
posUuid: uuid,
orderUuid: currentOrder.uuid
posId: id,
orderId: currentOrder.id
})
store.dispatch('reloadOrder', response.uuid)
.then(() => {
Expand Down Expand Up @@ -280,13 +281,13 @@ function printOrder() {
const {
isAllowsPrintDocument,
currentOrder,
uuid
id
} = store.getters.posAttributes.currentPointOfSales
if (isEmptyValue(currentOrder.uuid)) return false
if (isAllowsPrintDocument) return true
store.dispatch('printTicket', {
posUuid: uuid,
orderUuid: currentOrder.uuid
posId: id,
orderId: currentOrder.id
})
}

Expand Down
14 changes: 6 additions & 8 deletions components/ADempiere/Form/VPOS/Options/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -1895,13 +1895,13 @@ export default {
})
},
printTicket() {
const orderUuid = this.currentOrder.uuid
const posUuid = this.currentPointOfSales.uuid
const posId = this.currentOrder.id
const orderId = this.currentPointOfSales.id

this.isLoadingPrintTicket = true
this.$store.dispatch('printTicket', {
posUuid,
orderUuid
posId,
orderId
})
.finally(() => {
this.isLoadingPrintTicket = false
Expand Down Expand Up @@ -1940,7 +1940,7 @@ export default {
payments: []
})
.then(response => {
this.$store.dispatch('printTicket', { posUuid, orderUuid })
this.$store.dispatch('printTicket', { posId: this.currentPointOfSales.id, orderId: this.currentOrder.id })
this.$store.dispatch('reloadOrder', response.uuid)
.then(() => {
if (this.IsAllowsPreviewDocument) this.printPreview()
Expand Down Expand Up @@ -1977,9 +1977,7 @@ export default {
description: this.messageReverseSales
})
.then(response => {
const posUuid = this.currentPointOfSales.uuid
const orderUuid = response.uuid
this.$store.dispatch('printTicket', { posUuid, orderUuid })
this.$store.dispatch('printTicket', { posId: this.currentPointOfSales.id, orderId: response.id })
this.$store.dispatch('reloadOrder', response.uuid)
.then(() => {
if (this.IsAllowsPreviewDocument) this.printPreview()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,8 @@ export default defineComponent({
function cancelSaleTransaction() {
const {
currentOrder,
uuid
uuid,
id
} = store.getters.posAttributes.currentPointOfSales
reverseSales({
posUuid: uuid,
Expand All @@ -97,8 +98,8 @@ export default defineComponent({
})
.then(response => {
store.dispatch('printTicket', {
posUuid: uuid,
orderUuid: currentOrder.uuid
posId: id,
orderId: currentOrder.id
})
store.dispatch('reloadOrder', response.uuid)
.then(() => {
Expand Down
5 changes: 4 additions & 1 deletion components/ADempiere/Form/VPOS/posMixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,10 @@ export default {
payments: payments
})
.then(response => {
this.$store.dispatch('printTicket', { posUuid, orderUuid })
this.$store.dispatch('printTicket', {
posId: this.currentPointOfSales.id,
orderId: this.currentOrder.id
})
if (this.IsAllowsPreviewDocument) this.printPreview(posUuid, orderUuid)
this.clearOrder()
this.createOrder({ withLine: false, newOrder: true, customer: this.currentPointOfSales.templateCustomer.uuid })
Expand Down