From 9b722f278064b62ce35b5622f8e11847a9b034a8 Mon Sep 17 00:00:00 2001
From: Elsio Sanchez <45974454+elsiosanchez@users.noreply.github.com>
Date: Mon, 30 Oct 2023 17:51:34 -0400
Subject: [PATCH] Fix: Support Create Order from RMA (Transcoding) (#1571)
---
src/api/ADempiere/form/VPOS/index.js | 22 +++-
.../Form/VPOS2/Options/RMA/index.vue | 67 +++++++----
.../Form/VPOS2/Options/RMA/infoRMA.vue | 2 +
.../Form/VPOS2/Options/RMA/previwerRMA.vue | 107 +++++++++++++++---
.../Form/VPOS2/Options/salesOrder.vue | 8 +-
.../modules/ADempiere/form/VPOS/options.js | 104 +++++++++++++++--
.../modules/ADempiere/form/VPOS/order.js | 1 -
src/utils/ADempiere/dictionary/form/VPOS.js | 2 +-
8 files changed, 260 insertions(+), 53 deletions(-)
diff --git a/src/api/ADempiere/form/VPOS/index.js b/src/api/ADempiere/form/VPOS/index.js
index 1f4ee1f43f7..9d3a5b30369 100644
--- a/src/api/ADempiere/form/VPOS/index.js
+++ b/src/api/ADempiere/form/VPOS/index.js
@@ -1398,10 +1398,30 @@ export function processRMA({
}) {
return request({
url: `point-of-sales/returns/${rmaId}/process`,
- method: 'get',
+ method: 'put',
params: {
pos_id: posId,
+ rma_id: rmaId,
document_action: documentAction
}
})
}
+
+/**
+ * Create Order from RMA
+ */
+
+export function createOrderFromRMA({
+ posId,
+ salesRepresentativeId,
+ sourceRmaId
+}) {
+ return request({
+ url: `point-of-sales/returns/${sourceRmaId}/create-order`,
+ method: 'post',
+ params: {
+ pos_id: posId,
+ sales_representative_id: salesRepresentativeId
+ }
+ })
+}
diff --git a/src/components/ADempiere/Form/VPOS2/Options/RMA/index.vue b/src/components/ADempiere/Form/VPOS2/Options/RMA/index.vue
index e9d94cf85f5..e9af24ccc5c 100644
--- a/src/components/ADempiere/Form/VPOS2/Options/RMA/index.vue
+++ b/src/components/ADempiere/Form/VPOS2/Options/RMA/index.vue
@@ -18,6 +18,7 @@ along with this program. If not, see