diff --git a/src/api/ADempiere/form/point-of-sales.js b/src/api/ADempiere/form/point-of-sales.js
index a98f2927..5c9b8643 100644
--- a/src/api/ADempiere/form/point-of-sales.js
+++ b/src/api/ADempiere/form/point-of-sales.js
@@ -125,18 +125,20 @@ export function requestGetOrder(orderUuid) {
// Create order from POS
export function requestDeleteOrder({
- posUuid,
- customerUuid,
- documentTypeUuid,
- salesRepresentativeUuid
+ orderUuid
+ // posUuid,
+ // customerUuid,
+ // documentTypeUuid,
+ // salesRepresentativeUuid
}) {
return requestRest({
url: '/pos/delete-order',
data: {
- pos_uuid: posUuid,
- customer_uuid: customerUuid,
- document_type_uuid: documentTypeUuid,
- sales_representative_uuid: salesRepresentativeUuid
+ order_uuid: orderUuid
+ // pos_uuid: posUuid,
+ // customer_uuid: customerUuid,
+ // document_type_uuid: documentTypeUuid,
+ // sales_representative_uuid: salesRepresentativeUuid
}
})
.then(evaluateResponse)
diff --git a/src/components/ADempiere/Dialog/index.vue b/src/components/ADempiere/Dialog/index.vue
index 9bc375c0..c09c10e3 100644
--- a/src/components/ADempiere/Dialog/index.vue
+++ b/src/components/ADempiere/Dialog/index.vue
@@ -10,26 +10,30 @@
close-on-click-modal
>
{{ modalMetadata.description }}
-
+
+
+ {{ $t('form.pos.optionsPoinSales.salesOrder.copyOrderLine') }}
+
{
console.info(`VPOS/Options component (New Order): ${error.message}`)
}).finally(() => {
- const { templateBusinessPartner } = this.currentPOS
-
+ // const { templateBusinessPartner } = this.currentPOS
this.$store.commit('updateValuesOfContainer', {
containerUuid: this.metadata.containerUuid,
attributes: [{
@@ -375,15 +413,15 @@ export default {
},
{
columnName: 'C_BPartner_ID',
- value: templateBusinessPartner.id
+ value: 1000006
},
{
columnName: 'DisplayColumn_C_BPartner_ID',
- value: templateBusinessPartner.name
+ value: 'Cliente Unico'
},
{
columnName: ' C_BPartner_ID_UUID',
- value: templateBusinessPartner.uuid
+ value: '9f6cf428-9209-11e9-8046-0242ac140002'
}]
})
@@ -417,9 +455,33 @@ export default {
})
},
reverseSalesTransaction() {
- // TODO: Add BPartner
- requestReverseSalesTransaction({
- orderUuid: this.$route.query.action
+ const process = this.$store.getters.getProcess(posProcess[1].uuid)
+ this.$store.dispatch('startProcess', {
+ action: process,
+ isProcessTableSelection: false,
+ containerUuid: process.containerUuid,
+ parametersList: [
+ {
+ columnName: 'C_Order_ID',
+ value: this.currentPOS.id
+ },
+ {
+ columnName: 'Bill_BPartner_ID',
+ value: this.currentPOS.businessPartner.id
+ },
+ {
+ columnName: 'IsCancelled',
+ value: false
+ },
+ {
+ columnName: 'IsShipConfirm',
+ value: true
+ },
+ {
+ columnName: 'C_DocTypeRMA_ID',
+ value: 'VO'
+ }
+ ]
})
},
createWithdrawal() {
@@ -435,6 +497,25 @@ export default {
orderUuid: this.$route.query.action
})
},
+ showModal(action) {
+ this.$store.dispatch('setShowDialog', {
+ type: action.type,
+ action: {
+ ...action,
+ containerUuid: action.uuid
+ }
+ })
+ },
+ copyOrder() {
+ this.processPos = posProcess[5].uuid
+ const process = this.$store.getters.getProcess(posProcess[5].uuid)
+ this.showModal(process)
+ },
+ copyLineOrder() {
+ this.processPos = posProcess[5].uuid
+ const process = this.$store.getters.getProcess(posProcess[5].uuid)
+ this.showModal(process)
+ },
cashClosing() {
const { uuid: posUuid, id: posId } = this.getCurrentPOS
requestCashClosing({
@@ -446,7 +527,19 @@ export default {
requestDeleteOrder({
orderUuid: this.$route.query.action
})
- this.newOrder()
+ .then(response => {
+ this.changePos(this.$store.getters.getCurrentPOS)
+ })
+ .finally(() => {
+ this.$store.dispatch('listOrdersFromServer', {
+ posUuid: this.$store.getters.getCurrentPOS.uuid
+ })
+ this.$message({
+ type: 'success',
+ message: 'Orden Cancelada',
+ showClose: true
+ })
+ })
}
}
}
diff --git a/src/components/ADempiere/Form/VPOS/Order/index.vue b/src/components/ADempiere/Form/VPOS/Order/index.vue
index 972cdee9..a6a29c05 100644
--- a/src/components/ADempiere/Form/VPOS/Order/index.vue
+++ b/src/components/ADempiere/Form/VPOS/Order/index.vue
@@ -50,6 +50,7 @@