@feedmepos/mf-inventory-portal 1.1.6-dev.2 → 1.1.6-dev.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{App-ZdPyRgoK.js → App-7aDQCs0e.js} +1 -1
- package/dist/{ApprovalView-VNUUoGaD.js → ApprovalView-DTiHrtmv.js} +2 -2
- package/dist/{BindingsDialog-CqrwH8Le.js → BindingsDialog-CwFtThz3.js} +2 -2
- package/dist/{BindingsPicker-CBrr3QOo.js → BindingsPicker-C-gN6_S_.js} +1 -1
- package/dist/{BindingsTable-CM_qgGzX.js → BindingsTable-03rYMdPD.js} +1 -1
- package/dist/{ClosingDraftView-EJxncQHK.js → ClosingDraftView-CFzIsJ47.js} +2 -2
- package/dist/{ClosingTemplateView-P3-3w7LP.js → ClosingTemplateView-fQ5i6sqs.js} +2 -2
- package/dist/{DeliveryOrderPrintPreview-B_0diddC.js → DeliveryOrderPrintPreview-CU_7rneV.js} +1 -1
- package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-C_pIvqso.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-CJBz08np.js} +3 -3
- package/dist/{FmMultiselectDialog-B3_QQAyt.js → FmMultiselectDialog-1yDoDij3.js} +1 -1
- package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-FPaLEdx0.js → FmUnitInput.vue_vue_type_script_setup_true_lang-Bj0Wj8Xz.js} +1 -1
- package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-BOMcifaU.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-PPX_rDZF.js} +1 -1
- package/dist/{IngredientGroupView-C4qAQE49.js → IngredientGroupView-DM7Inm_j.js} +2 -2
- package/dist/{IngredientsView-BuUCuN_-.js → IngredientsView-CYNfI7-d.js} +4 -4
- package/dist/{IntegrationView-Ww16O2-h.js → IntegrationView-GGqFp4AF.js} +3 -3
- package/dist/{InventoryBindingForm-BdGh-FcD.js → InventoryBindingForm-B2NUQyYC.js} +1 -1
- package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-DkqxNffc.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-DWwDEcts.js} +3 -3
- package/dist/{InventoryBindingSummary-immSfENb.js → InventoryBindingSummary-BS_KPYvV.js} +1 -1
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-ChP4yc96.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-KwJ-92ME.js} +1 -1
- package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-D-GMVZlu.js → PremiumBadge.vue_vue_type_script_setup_true_lang-c3-rBgMz.js} +1 -1
- package/dist/{PublishView-BYymYGs5.js → PublishView-Be-xDCoP.js} +1 -1
- package/dist/{PurchaseOrderPrintPreview-D3WKx7pj.js → PurchaseOrderPrintPreview-CgBW_CYT.js} +1 -1
- package/dist/{ReceiveRequestView-Ba5ONN7U.js → ReceiveRequestView-DMk5uA4T.js} +8 -8
- package/dist/{RecipeView-DoD3paRP.js → RecipeView-Btr3k6HN.js} +3 -3
- package/dist/{StockView-fO7PGIdp.js → StockView-B4hURpuW.js} +6 -6
- package/dist/{SupplierView-DNhVDIF0.js → SupplierView-BAlA5PiP.js} +3 -3
- package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-D4noOVzU.js → TransferDetails.vue_vue_type_script_setup_true_lang-CaxJcFvC.js} +602 -586
- package/dist/{TransferTemplateView-788yoUXj.js → TransferTemplateView-BX9hZLJK.js} +6 -6
- package/dist/{UnitView-iQCflI7n.js → UnitView-CLHFLa9Y.js} +3 -3
- package/dist/{WarehouseView-ComVJ9Ub.js → WarehouseView-D7dlQVJG.js} +1 -1
- package/dist/{app-DDQ8iM43.js → app-BDvExlDk.js} +13 -19
- package/dist/app.d.ts +0 -3
- package/dist/app.js +1 -1
- package/dist/{decimal-Cj3dpSJu.js → decimal-DH1GxF5C.js} +1 -1
- package/dist/{format-unit-display-DBZ-CswW.js → format-unit-display-D8HvxRH6.js} +2 -2
- package/dist/{index-TCig0pJv.js → index-D8hgUJvl.js} +1 -1
- package/dist/{index-DkQGplv5.js → index-j96vAh5F.js} +1 -1
- package/dist/{stock-cW_hYhb6.js → stock-DmyqH5zu.js} +1 -1
- package/dist/{supplier-CmLYcKmg.js → supplier-XLhXYVot.js} +1 -1
- package/dist/{use-ingredient-select-dialog-J1mw_EQM.js → use-ingredient-select-dialog-CKqSU8JV.js} +1 -1
- package/dist/{use-inventory-binding-dialog-CgxQ2cgb.js → use-inventory-binding-dialog-CnWPra3F.js} +1 -1
- package/dist/views/receive-request/composables/fn.d.ts +2 -2
- package/package.json +1 -1
|
@@ -1,74 +1,74 @@
|
|
|
1
|
-
import { a3 as pt, u as me, aR as
|
|
2
|
-
import { ref as M, computed as Z, h as
|
|
3
|
-
import { F as kt } from "./decimal-
|
|
1
|
+
import { a3 as pt, u as me, aR as O, aS as $e, ay as ie, c as Ae, b as Te, a8 as vt, aa as yt, ab as ht, aT as bt, e as Xe, f as rt, a0 as Ke, aU as gt, a5 as st, T as nt, j as fe, aV as _t, aW as at, af as qe, h as Ze, i as J, D as ne, aX as ot, aY as it, aZ as Ee, aw as Je, a7 as xe, am as Le, az as St, a_ as ke, Q as wt } from "./app-BDvExlDk.js";
|
|
2
|
+
import { ref as M, computed as Z, h as $, defineComponent as he, reactive as Rt, onMounted as lt, resolveComponent as z, openBlock as g, createBlock as oe, withCtx as ae, createElementVNode as o, createVNode as I, unref as S, createElementBlock as N, toDisplayString as D, createCommentVNode as U, Fragment as se, renderList as ve, watch as Ot, isRef as Nt, normalizeClass as De, createTextVNode as Be, resolveDynamicComponent as xt } from "vue";
|
|
3
|
+
import { F as kt } from "./decimal-DH1GxF5C.js";
|
|
4
4
|
import { useCoreStore as Pe, useI18n as ct } from "@feedmepos/mf-common";
|
|
5
5
|
import { useDialog as je, useSnackbar as Ce, components as et, FmButtonVariant as re, useProxiedModel as Dt } from "@feedmepos/ui-library";
|
|
6
|
-
import { b as qt, u as
|
|
7
|
-
import { E as
|
|
8
|
-
import { _ as Pt, F as Ct, a as It } from "./FmUnitInput.vue_vue_type_script_setup_true_lang-
|
|
6
|
+
import { b as qt, u as $t, P as ye, f as At } from "./format-unit-display-D8HvxRH6.js";
|
|
7
|
+
import { E as Tt } from "./empty-placeholder-wf6-BWE8.js";
|
|
8
|
+
import { _ as Pt, F as Ct, a as It } from "./FmUnitInput.vue_vue_type_script_setup_true_lang-Bj0Wj8Xz.js";
|
|
9
9
|
import { u as Ft, R as tt } from "./usePromise-CbVUCxhj.js";
|
|
10
|
-
import { u as Et } from "./index-
|
|
11
|
-
const Ie = pt((
|
|
12
|
-
const a = me(),
|
|
10
|
+
import { u as Et } from "./index-j96vAh5F.js";
|
|
11
|
+
const Ie = pt((p, e) => {
|
|
12
|
+
const a = me(), b = Pe();
|
|
13
13
|
return {
|
|
14
14
|
async readRequests(u, t, c) {
|
|
15
|
-
const i = u ?? a.currentLocationDBName, n = `${
|
|
15
|
+
const i = u ?? a.currentLocationDBName, n = `${p.inventoryBackendUrl}/${i}/purchase-request`;
|
|
16
16
|
return t && c ? await e.get(`${n}?startDate=${t}&endDate=${c}`) : await e.get(n);
|
|
17
17
|
},
|
|
18
18
|
async readRequestById(u, t) {
|
|
19
|
-
const c = t ?? a.currentLocationDBName, i = `${
|
|
19
|
+
const c = t ?? a.currentLocationDBName, i = `${p.inventoryBackendUrl}/${c}/purchase-request/${u}`;
|
|
20
20
|
return await e.get(i);
|
|
21
21
|
},
|
|
22
22
|
async readRequestByIds(u, t) {
|
|
23
|
-
const c = t ?? a.currentLocationDBName, i = `${
|
|
23
|
+
const c = t ?? a.currentLocationDBName, i = `${p.inventoryBackendUrl}/${c}/purchase-request/find`;
|
|
24
24
|
return await e.post(i, { requestIds: u });
|
|
25
25
|
},
|
|
26
26
|
async getPurchaseOrders({
|
|
27
27
|
start: u,
|
|
28
28
|
end: t
|
|
29
29
|
}) {
|
|
30
|
-
const c = a.currentLocationDBName, i = `${
|
|
30
|
+
const c = a.currentLocationDBName, i = `${p.inventoryBackendUrl}/${c}/purchase-order`;
|
|
31
31
|
return await e.get(`${i}?start=${u}&end=${t}`);
|
|
32
32
|
},
|
|
33
33
|
async getLatestPurchaseOrderRequest(u) {
|
|
34
|
-
const t = a.currentLocationDBName, c = `${
|
|
34
|
+
const t = a.currentLocationDBName, c = `${p.inventoryBackendUrl}/${t}/purchase-request/find-by-purchase-order-id`;
|
|
35
35
|
return await e.get(`${c}/${u}`);
|
|
36
36
|
},
|
|
37
37
|
async getPurchaseOrderById(u) {
|
|
38
|
-
const t = a.currentLocationDBName, c = `${
|
|
38
|
+
const t = a.currentLocationDBName, c = `${p.inventoryBackendUrl}/${t}/purchase-order`;
|
|
39
39
|
return await e.get(`${c}/${u}`);
|
|
40
40
|
},
|
|
41
41
|
/**
|
|
42
42
|
* @deprecated Use `processPurchaseOrderV2` instead.
|
|
43
43
|
*/
|
|
44
44
|
async processPurchaseOrder(u, t) {
|
|
45
|
-
const c = a.currentLocationDBName, i = t || c, n = `${
|
|
45
|
+
const c = a.currentLocationDBName, i = t || c, n = `${p.inventoryBackendUrl}/${i}/purchase-order/run-operation`;
|
|
46
46
|
return await e.put(n, u);
|
|
47
47
|
},
|
|
48
48
|
async createPurchaseOrder(u) {
|
|
49
|
-
const t = a.currentLocationDBName, c = `${
|
|
49
|
+
const t = a.currentLocationDBName, c = `${p.inventoryBackendUrl}/${t}/purchase-order`;
|
|
50
50
|
return await e.post(c, u);
|
|
51
51
|
},
|
|
52
52
|
async updatePurchaseOrder(u) {
|
|
53
|
-
const t = a.currentLocationDBName, c = `${
|
|
53
|
+
const t = a.currentLocationDBName, c = `${p.inventoryBackendUrl}/${t}/purchase-order`;
|
|
54
54
|
return await e.put(c, u);
|
|
55
55
|
},
|
|
56
56
|
async importFromXilnex(u) {
|
|
57
|
-
const t = a.currentLocationDBName, c = `${
|
|
57
|
+
const t = a.currentLocationDBName, c = `${p.inventoryBackendUrl}/${t}/purchase-order/import-from-xilnex`;
|
|
58
58
|
return await e.post(c, u);
|
|
59
59
|
},
|
|
60
60
|
async processPurchaseOrderV2(u, t) {
|
|
61
|
-
const c = a.currentLocationDBName, i = t || c, n = `${
|
|
61
|
+
const c = a.currentLocationDBName, i = t || c, n = `${p.inventoryBackendUrl}/${i}/v2/purchase-order/run-operation`;
|
|
62
62
|
return await e.put(n, u);
|
|
63
63
|
},
|
|
64
64
|
async getWorkflowConfig() {
|
|
65
65
|
var i;
|
|
66
|
-
const t = `business_${(i =
|
|
66
|
+
const t = `business_${(i = b.currentBusiness.value) == null ? void 0 : i._id}`, c = `${p.inventoryBackendUrl}/${t}/v2/purchase-order/workflow-config`;
|
|
67
67
|
return await e.get(c);
|
|
68
68
|
}
|
|
69
69
|
};
|
|
70
70
|
}), ut = {
|
|
71
|
-
[
|
|
71
|
+
[O.enum.confirmDraft]: {
|
|
72
72
|
primaryActions: {
|
|
73
73
|
text: "Confirm draft",
|
|
74
74
|
close: !0
|
|
@@ -77,7 +77,7 @@ const Ie = pt((m, e) => {
|
|
|
77
77
|
message: "Purchase order cannot be changed after confirm draft.",
|
|
78
78
|
successMessage: "Purchase order draft has been confirmed"
|
|
79
79
|
},
|
|
80
|
-
[
|
|
80
|
+
[O.enum.cancelDraft]: {
|
|
81
81
|
primaryActions: {
|
|
82
82
|
text: "Cancel draft",
|
|
83
83
|
close: !0,
|
|
@@ -87,7 +87,7 @@ const Ie = pt((m, e) => {
|
|
|
87
87
|
message: "Purchase order cannot be changed after cancelled draft.",
|
|
88
88
|
successMessage: "Purchase order draft has been cancelled"
|
|
89
89
|
},
|
|
90
|
-
[
|
|
90
|
+
[O.enum.submitRequest]: {
|
|
91
91
|
primaryActions: {
|
|
92
92
|
text: "Submit request",
|
|
93
93
|
close: !0
|
|
@@ -96,7 +96,7 @@ const Ie = pt((m, e) => {
|
|
|
96
96
|
message: "Purchase order cannot be changed after confirm draft.",
|
|
97
97
|
successMessage: "Purchase order draft has been submitted"
|
|
98
98
|
},
|
|
99
|
-
[
|
|
99
|
+
[O.enum.completeReceive]: {
|
|
100
100
|
primaryActions: {
|
|
101
101
|
text: "Mark received",
|
|
102
102
|
close: !0
|
|
@@ -105,7 +105,7 @@ const Ie = pt((m, e) => {
|
|
|
105
105
|
message: "Purchase order cannot be changed after it has complete receiving.",
|
|
106
106
|
successMessage: "Purchase order has been marked as received"
|
|
107
107
|
},
|
|
108
|
-
[
|
|
108
|
+
[O.enum.approveRequest]: {
|
|
109
109
|
primaryActions: {
|
|
110
110
|
text: "Accept request",
|
|
111
111
|
close: !0
|
|
@@ -114,7 +114,7 @@ const Ie = pt((m, e) => {
|
|
|
114
114
|
message: "Transfer out request will be accepted.",
|
|
115
115
|
successMessage: "Transfer out request has been approved"
|
|
116
116
|
},
|
|
117
|
-
[
|
|
117
|
+
[O.enum.rejectRequest]: {
|
|
118
118
|
primaryActions: {
|
|
119
119
|
text: "Reject request",
|
|
120
120
|
close: !0,
|
|
@@ -124,7 +124,7 @@ const Ie = pt((m, e) => {
|
|
|
124
124
|
message: "Purchase order will be rejected.",
|
|
125
125
|
successMessage: "Purchase order has been rejected"
|
|
126
126
|
},
|
|
127
|
-
[
|
|
127
|
+
[O.enum.processRequest]: {
|
|
128
128
|
primaryActions: {
|
|
129
129
|
text: "Process request",
|
|
130
130
|
close: !0,
|
|
@@ -135,70 +135,70 @@ const Ie = pt((m, e) => {
|
|
|
135
135
|
successMessage: "Purchase order has been processed"
|
|
136
136
|
}
|
|
137
137
|
};
|
|
138
|
-
function ze(
|
|
139
|
-
return
|
|
140
|
-
purchaseOrder:
|
|
138
|
+
function ze(p) {
|
|
139
|
+
return $e.generatedPOReceivedMap({
|
|
140
|
+
purchaseOrder: p
|
|
141
141
|
});
|
|
142
142
|
}
|
|
143
|
-
function Lt(
|
|
144
|
-
return
|
|
145
|
-
dto:
|
|
143
|
+
function Lt(p) {
|
|
144
|
+
return $e.validatePOItemReceivedStatus({
|
|
145
|
+
dto: p
|
|
146
146
|
});
|
|
147
147
|
}
|
|
148
|
-
function dt(
|
|
149
|
-
return
|
|
150
|
-
receivedMap:
|
|
148
|
+
function dt(p) {
|
|
149
|
+
return $e.validatePOReceivedStatus({
|
|
150
|
+
receivedMap: p
|
|
151
151
|
});
|
|
152
152
|
}
|
|
153
|
-
function ft(
|
|
154
|
-
if (!ie.safeParse(
|
|
155
|
-
throw new Error(`Invalid purchase order status: ${
|
|
156
|
-
const
|
|
157
|
-
return
|
|
158
|
-
status:
|
|
153
|
+
function ft(p, e, a) {
|
|
154
|
+
if (!ie.safeParse(p).success)
|
|
155
|
+
throw new Error(`Invalid purchase order status: ${p}`);
|
|
156
|
+
const b = ie.parse(p);
|
|
157
|
+
return $e.orderStatusCombination({
|
|
158
|
+
status: b,
|
|
159
159
|
isPOPartialReceive: e,
|
|
160
160
|
isPOOverReceive: a
|
|
161
161
|
});
|
|
162
162
|
}
|
|
163
163
|
function mt() {
|
|
164
|
-
const
|
|
165
|
-
async function
|
|
166
|
-
const i =
|
|
167
|
-
return t.doc.supplier.internal && t.operation ===
|
|
164
|
+
const p = me(), e = Ie(), a = Ae();
|
|
165
|
+
async function b(t, c) {
|
|
166
|
+
const i = p.currentLocationDBName;
|
|
167
|
+
return t.doc.supplier.internal && t.operation === O.enum.confirmDraft && (t.operation = O.enum.submitRequest), await e.processPurchaseOrder(t, c || i);
|
|
168
168
|
}
|
|
169
169
|
async function u(t, c) {
|
|
170
|
-
const i =
|
|
170
|
+
const i = p.currentLocationDBName;
|
|
171
171
|
return await e.processPurchaseOrderV2(t, c || i);
|
|
172
172
|
}
|
|
173
|
-
return (t) => a.useOperatePurchaseOrderV2 ? u(t.operateV2, t.transferTo) :
|
|
173
|
+
return (t) => a.useOperatePurchaseOrderV2 ? u(t.operateV2, t.transferTo) : b(t.operate, t.transferTo);
|
|
174
174
|
}
|
|
175
|
-
var Me = /* @__PURE__ */ ((
|
|
175
|
+
var Me = /* @__PURE__ */ ((p) => (p.RECEIVE_REQUEST = "receive/request", p.APPROVAL = "approval", p))(Me || {});
|
|
176
176
|
const Oe = M(), Ve = M();
|
|
177
|
-
function zs(
|
|
178
|
-
const a = je(),
|
|
179
|
-
|
|
180
|
-
const t = qt(), c =
|
|
177
|
+
function zs(p, e) {
|
|
178
|
+
const a = je(), b = me(), u = Ae();
|
|
179
|
+
Te();
|
|
180
|
+
const t = qt(), c = $t(), i = M(!1), n = Ce(), h = Ie(), _ = M(new Array()), v = M(
|
|
181
181
|
e != null && e.startDate && (e != null && e.endDate) ? e : vt()
|
|
182
|
-
),
|
|
183
|
-
const k = new Date(
|
|
182
|
+
), m = Z(() => {
|
|
183
|
+
const k = new Date(v.value.startDate), T = new Date(v.value.endDate);
|
|
184
184
|
return {
|
|
185
185
|
start: yt(k).toISOString(),
|
|
186
|
-
end: ht(
|
|
186
|
+
end: ht(T).toISOString()
|
|
187
187
|
};
|
|
188
|
-
}), l = M(new Array()),
|
|
189
|
-
async function
|
|
190
|
-
function
|
|
191
|
-
const
|
|
188
|
+
}), l = M(new Array()), r = bt(), d = M(null);
|
|
189
|
+
async function w(k) {
|
|
190
|
+
function T(s) {
|
|
191
|
+
const f = {
|
|
192
192
|
mode: Xe.CREATE,
|
|
193
193
|
modelValue: k || void 0,
|
|
194
194
|
show: !0,
|
|
195
|
-
"onUpdate:show"(
|
|
196
|
-
Oe.value.show =
|
|
195
|
+
"onUpdate:show"(R) {
|
|
196
|
+
Oe.value.show = R;
|
|
197
197
|
},
|
|
198
|
-
templateId:
|
|
199
|
-
lastClosingDate:
|
|
198
|
+
templateId: s,
|
|
199
|
+
lastClosingDate: d.value
|
|
200
200
|
};
|
|
201
|
-
Oe.value =
|
|
201
|
+
Oe.value = f;
|
|
202
202
|
}
|
|
203
203
|
let H;
|
|
204
204
|
u.mustUsePoTemplate && !(k != null && k.template) ? a.open({
|
|
@@ -214,34 +214,34 @@ function zs(m, e) {
|
|
|
214
214
|
close: !0
|
|
215
215
|
}
|
|
216
216
|
}).onPrimary(async () => {
|
|
217
|
-
H = await t.getTemplateId(), H &&
|
|
217
|
+
H = await t.getTemplateId(), H && T(H);
|
|
218
218
|
}).onSecondary(() => {
|
|
219
|
-
|
|
220
|
-
}) :
|
|
219
|
+
T(void 0);
|
|
220
|
+
}) : T(H);
|
|
221
221
|
}
|
|
222
|
-
function
|
|
223
|
-
const
|
|
222
|
+
function x(k) {
|
|
223
|
+
const T = {
|
|
224
224
|
mode: Xe.UPDATE,
|
|
225
225
|
modelValue: rt(k),
|
|
226
226
|
show: !0,
|
|
227
227
|
"onUpdate:show"(H) {
|
|
228
228
|
Oe.value.show = H;
|
|
229
229
|
},
|
|
230
|
-
lastClosingDate:
|
|
230
|
+
lastClosingDate: d.value
|
|
231
231
|
};
|
|
232
|
-
Oe.value =
|
|
232
|
+
Oe.value = T;
|
|
233
233
|
}
|
|
234
234
|
async function E() {
|
|
235
235
|
_.value = [], i.value = !0;
|
|
236
236
|
try {
|
|
237
|
-
_.value = await
|
|
238
|
-
const k = await
|
|
239
|
-
|
|
240
|
-
const H = _.value.map((
|
|
241
|
-
var
|
|
242
|
-
return ((
|
|
243
|
-
}).filter((
|
|
244
|
-
l.value = await
|
|
237
|
+
_.value = await h.getPurchaseOrders(m.value).then((s) => s.sort((f, R) => R._id.localeCompare(f._id)));
|
|
238
|
+
const k = await r.readCurrentLocationLastClosing(!0), T = k == null ? void 0 : k._id;
|
|
239
|
+
T && (d.value = gt(T)), await u.awaitFeatureLoaded(() => u.mustUsePoTemplate) && await c.fetchTemplates();
|
|
240
|
+
const H = _.value.map((s) => {
|
|
241
|
+
var f;
|
|
242
|
+
return ((f = s.request) == null ? void 0 : f.id) ?? "";
|
|
243
|
+
}).filter((s) => s);
|
|
244
|
+
l.value = await h.readRequestByIds(H);
|
|
245
245
|
} catch {
|
|
246
246
|
n.open({
|
|
247
247
|
title: "Something went wrong",
|
|
@@ -252,13 +252,13 @@ function zs(m, e) {
|
|
|
252
252
|
i.value = !1;
|
|
253
253
|
}
|
|
254
254
|
}
|
|
255
|
-
async function
|
|
255
|
+
async function A() {
|
|
256
256
|
l.value = [], i.value = !0;
|
|
257
257
|
try {
|
|
258
|
-
l.value = await
|
|
258
|
+
l.value = await h.readRequests(
|
|
259
259
|
void 0,
|
|
260
|
-
|
|
261
|
-
|
|
260
|
+
m.value.start,
|
|
261
|
+
m.value.end
|
|
262
262
|
).then((k) => k.reverse());
|
|
263
263
|
} catch {
|
|
264
264
|
n.open({
|
|
@@ -271,20 +271,20 @@ function zs(m, e) {
|
|
|
271
271
|
}
|
|
272
272
|
}
|
|
273
273
|
function P() {
|
|
274
|
-
switch (
|
|
274
|
+
switch (p) {
|
|
275
275
|
case "receive/request":
|
|
276
276
|
return E();
|
|
277
277
|
case "approval":
|
|
278
|
-
return
|
|
278
|
+
return A();
|
|
279
279
|
}
|
|
280
280
|
}
|
|
281
|
-
function K(k,
|
|
282
|
-
|
|
281
|
+
function K(k, T) {
|
|
282
|
+
v.value = {
|
|
283
283
|
startDate: k,
|
|
284
|
-
endDate:
|
|
284
|
+
endDate: T
|
|
285
285
|
}, P();
|
|
286
286
|
}
|
|
287
|
-
|
|
287
|
+
b.watchLocation(async (k) => {
|
|
288
288
|
if (!k) {
|
|
289
289
|
_.value = [];
|
|
290
290
|
return;
|
|
@@ -292,39 +292,39 @@ function zs(m, e) {
|
|
|
292
292
|
await P();
|
|
293
293
|
});
|
|
294
294
|
const G = M(), ce = M(Math.random().toString());
|
|
295
|
-
async function le(k,
|
|
295
|
+
async function le(k, T) {
|
|
296
296
|
const H = Math.random().toString();
|
|
297
|
-
ce.value = H,
|
|
298
|
-
(
|
|
297
|
+
ce.value = H, T ?? (T = l.value.computeFirst(
|
|
298
|
+
(R) => R.purchaseOrderId === k._id ? R : null
|
|
299
299
|
) ?? void 0);
|
|
300
|
-
const
|
|
301
|
-
poRequest:
|
|
300
|
+
const s = p === "receive/request" ? b.currentLocation : T == null ? void 0 : T.to, f = {
|
|
301
|
+
poRequest: T,
|
|
302
302
|
purchaseOrder: k,
|
|
303
|
-
transferTo:
|
|
304
|
-
transferToDbName:
|
|
303
|
+
transferTo: s == null ? void 0 : s.name,
|
|
304
|
+
transferToDbName: s == null ? void 0 : s.dbName,
|
|
305
305
|
show: !0,
|
|
306
306
|
canResubmit: !1,
|
|
307
|
-
canApprove:
|
|
308
|
-
"onUpdate:show"(
|
|
309
|
-
G.value.show =
|
|
307
|
+
canApprove: p === "approval",
|
|
308
|
+
"onUpdate:show"(R) {
|
|
309
|
+
G.value.show = R;
|
|
310
310
|
},
|
|
311
|
-
scope:
|
|
311
|
+
scope: p,
|
|
312
312
|
receivedMap: ze(k) ?? {}
|
|
313
313
|
};
|
|
314
|
-
G.value =
|
|
314
|
+
G.value = f;
|
|
315
315
|
}
|
|
316
|
-
async function be(k,
|
|
317
|
-
const
|
|
316
|
+
async function be(k, T, H, s) {
|
|
317
|
+
const f = mt();
|
|
318
318
|
i.value = !0;
|
|
319
319
|
try {
|
|
320
|
-
await
|
|
320
|
+
await f({
|
|
321
321
|
operate: {
|
|
322
|
-
operation:
|
|
322
|
+
operation: T,
|
|
323
323
|
doc: k,
|
|
324
324
|
options: (
|
|
325
325
|
// auto receive for supplier to warehouse
|
|
326
|
-
(
|
|
327
|
-
|
|
326
|
+
(T === O.enum.confirmDraft || // auto receive for warehouse to warehouse
|
|
327
|
+
T === O.enum.completeReceive) && u.autoReceiveWarehouse ? {
|
|
328
328
|
autoReceive: !0
|
|
329
329
|
} : void 0
|
|
330
330
|
)
|
|
@@ -332,13 +332,13 @@ function zs(m, e) {
|
|
|
332
332
|
operateV2: {
|
|
333
333
|
_id: k._id,
|
|
334
334
|
_rev: k._rev ?? "",
|
|
335
|
-
action:
|
|
335
|
+
action: T,
|
|
336
336
|
payloads: []
|
|
337
337
|
},
|
|
338
|
-
transferTo:
|
|
338
|
+
transferTo: s
|
|
339
339
|
}), await new Promise((j) => setTimeout(j, 1e3));
|
|
340
340
|
const q = me().currentLocationDBName.startsWith("restaurant_");
|
|
341
|
-
|
|
341
|
+
T === O.enum.confirmDraft && k.effectiveAt && q ? n.open({
|
|
342
342
|
title: "Success",
|
|
343
343
|
message: `${H}. The backdate will be reflected once your POS has received this change.`,
|
|
344
344
|
type: "success"
|
|
@@ -347,33 +347,33 @@ function zs(m, e) {
|
|
|
347
347
|
message: H,
|
|
348
348
|
type: "success"
|
|
349
349
|
});
|
|
350
|
-
} catch (
|
|
350
|
+
} catch (R) {
|
|
351
351
|
n.open({
|
|
352
352
|
title: "Something went wrong",
|
|
353
353
|
message: "Please try again.",
|
|
354
354
|
type: "error"
|
|
355
|
-
}), console.error("Error when submitting PO operation",
|
|
355
|
+
}), console.error("Error when submitting PO operation", T, k, R);
|
|
356
356
|
} finally {
|
|
357
357
|
i.value = !1, P();
|
|
358
358
|
}
|
|
359
359
|
}
|
|
360
|
-
async function Fe(k,
|
|
361
|
-
const
|
|
362
|
-
if (!
|
|
360
|
+
async function Fe(k, T, H) {
|
|
361
|
+
const s = ut[T];
|
|
362
|
+
if (!s) {
|
|
363
363
|
n.open({
|
|
364
364
|
title: "Something went wrong",
|
|
365
|
-
message: `Cannot process order: ${Ke(
|
|
365
|
+
message: `Cannot process order: ${Ke(T)}`,
|
|
366
366
|
type: "error"
|
|
367
367
|
});
|
|
368
368
|
return;
|
|
369
369
|
}
|
|
370
|
-
const { successMessage:
|
|
370
|
+
const { successMessage: f, ...R } = s;
|
|
371
371
|
a.open({
|
|
372
|
-
title:
|
|
373
|
-
message:
|
|
374
|
-
primaryActions:
|
|
372
|
+
title: R.title,
|
|
373
|
+
message: R.message,
|
|
374
|
+
primaryActions: R.primaryActions
|
|
375
375
|
}).onPrimary(() => {
|
|
376
|
-
be(k,
|
|
376
|
+
be(k, T, f, H);
|
|
377
377
|
});
|
|
378
378
|
}
|
|
379
379
|
async function ue() {
|
|
@@ -390,8 +390,8 @@ function zs(m, e) {
|
|
|
390
390
|
}).onPrimary(() => {
|
|
391
391
|
const k = {
|
|
392
392
|
show: !0,
|
|
393
|
-
"onUpdate:show"(
|
|
394
|
-
Ve.value.show =
|
|
393
|
+
"onUpdate:show"(T) {
|
|
394
|
+
Ve.value.show = T;
|
|
395
395
|
}
|
|
396
396
|
};
|
|
397
397
|
Ve.value = k;
|
|
@@ -404,8 +404,8 @@ function zs(m, e) {
|
|
|
404
404
|
fetchData: P,
|
|
405
405
|
loading: i,
|
|
406
406
|
transferDialogProps: Oe,
|
|
407
|
-
promptCreateTransferDialog:
|
|
408
|
-
promptUpdateTransferDialog:
|
|
407
|
+
promptCreateTransferDialog: w,
|
|
408
|
+
promptUpdateTransferDialog: x,
|
|
409
409
|
transferDetailsProps: G,
|
|
410
410
|
promptShowTransferDetails: le,
|
|
411
411
|
submitAction: Fe,
|
|
@@ -413,17 +413,17 @@ function zs(m, e) {
|
|
|
413
413
|
promptUploadTransferDialog: ue
|
|
414
414
|
};
|
|
415
415
|
}
|
|
416
|
-
function Bt(
|
|
416
|
+
function Bt(p, e) {
|
|
417
417
|
return e.reduce(
|
|
418
|
-
(
|
|
419
|
-
const t = u.received.find((c) => c.sku._id ===
|
|
420
|
-
return t && (
|
|
418
|
+
(b, u) => {
|
|
419
|
+
const t = u.received.find((c) => c.sku._id === p._id);
|
|
420
|
+
return t && (b = st(b, t.amount)), b;
|
|
421
421
|
},
|
|
422
|
-
kt.toPrecision(nt(0),
|
|
422
|
+
kt.toPrecision(nt(0), p.unit.precision)
|
|
423
423
|
);
|
|
424
424
|
}
|
|
425
|
-
function Vt(
|
|
426
|
-
const { po: e, currentLocation: a, business:
|
|
425
|
+
function Vt(p) {
|
|
426
|
+
const { po: e, currentLocation: a, business: b, fulfilling: u, por: t } = p, { name: c, address: i, regNo: n } = a.doc.profile, h = {
|
|
427
427
|
name: c,
|
|
428
428
|
registrationNumber: n,
|
|
429
429
|
line1: i == null ? void 0 : i.line1,
|
|
@@ -442,26 +442,26 @@ function Vt(m) {
|
|
|
442
442
|
city: e.supplier.address.city,
|
|
443
443
|
state: e.supplier.address.state,
|
|
444
444
|
country: e.supplier.address.country
|
|
445
|
-
},
|
|
446
|
-
const { sku: P, measurement: K } =
|
|
447
|
-
Bt(
|
|
445
|
+
}, v = e.items.map((A) => {
|
|
446
|
+
const { sku: P, measurement: K } = A, G = fe(
|
|
447
|
+
Bt(A.sku, e.deliveryOrder || []),
|
|
448
448
|
!1
|
|
449
449
|
);
|
|
450
450
|
return {
|
|
451
451
|
code: P.code,
|
|
452
452
|
description: P.name,
|
|
453
|
-
quantity: fe(
|
|
453
|
+
quantity: fe(A.quantity, !1),
|
|
454
454
|
unit: (K == null ? void 0 : K.abbrev) || P.unit.abbrev,
|
|
455
455
|
received: G,
|
|
456
|
-
cost:
|
|
457
|
-
value:
|
|
456
|
+
cost: A.totalCost ? `${A.totalCost.currency} ${_t.toFormatString({
|
|
457
|
+
value: A.totalCost
|
|
458
458
|
})}` : void 0
|
|
459
459
|
};
|
|
460
|
-
}),
|
|
461
|
-
createdAt: at(new Date(
|
|
462
|
-
ref:
|
|
463
|
-
remark:
|
|
464
|
-
items:
|
|
460
|
+
}), m = e.deliveryOrder.map((A) => ({
|
|
461
|
+
createdAt: at(new Date(A.createdAt)),
|
|
462
|
+
ref: A.deliveryOrderNumber,
|
|
463
|
+
remark: A.remark || "",
|
|
464
|
+
items: A.received.map((P) => {
|
|
465
465
|
var K;
|
|
466
466
|
return {
|
|
467
467
|
code: P.sku.code,
|
|
@@ -476,72 +476,72 @@ function Vt(m) {
|
|
|
476
476
|
// Dev
|
|
477
477
|
"6880b36a3054c5001db19218"
|
|
478
478
|
];
|
|
479
|
-
let
|
|
480
|
-
if (e.supplier.internal ? (
|
|
481
|
-
const
|
|
482
|
-
a.dbName ===
|
|
479
|
+
let r = "Inventory Receive Note";
|
|
480
|
+
if (e.supplier.internal ? (r = "Inventory Transfer Note", l.includes((b == null ? void 0 : b._id) || "") && (r = "Stock Request")) : r = "Purchase Order", t) {
|
|
481
|
+
const A = t.from.dbName;
|
|
482
|
+
a.dbName === A || (r = "Inventory Receive Note");
|
|
483
483
|
}
|
|
484
|
-
const
|
|
485
|
-
title:
|
|
486
|
-
businessName:
|
|
487
|
-
logo:
|
|
484
|
+
const w = {
|
|
485
|
+
title: r,
|
|
486
|
+
businessName: b == null ? void 0 : b.name,
|
|
487
|
+
logo: b == null ? void 0 : b.thumbnail,
|
|
488
488
|
orderNumber: e.seqNumber.toString(),
|
|
489
489
|
createdAt: qe(e._id),
|
|
490
490
|
ref: e.ref || "",
|
|
491
491
|
remark: e.remark || "",
|
|
492
|
-
buyer:
|
|
492
|
+
buyer: h,
|
|
493
493
|
supplier: _,
|
|
494
|
-
items:
|
|
494
|
+
items: v,
|
|
495
495
|
status: e.status,
|
|
496
|
-
deliveryOrders:
|
|
497
|
-
},
|
|
498
|
-
|
|
496
|
+
deliveryOrders: m
|
|
497
|
+
}, x = new URL(window.location.href), E = u && (e.deliveryFullfillment || []).length > 0 ? "receive-request/delivery-print-preview" : "receive-request/print-preview";
|
|
498
|
+
x.pathname = x.hostname.includes("portal.feedme") ? `/inventory/${E}` : `/${E}`, x.searchParams.append("data", JSON.stringify(w)), window.open(x.href, "_blank", "noreferrer");
|
|
499
499
|
}
|
|
500
500
|
const Se = {
|
|
501
501
|
submitRequest: {
|
|
502
502
|
translationKey: "inventory.transfer.receiveRequest.actions.submitRequest",
|
|
503
503
|
color: "text-fm-color-typo-primary",
|
|
504
|
-
value:
|
|
504
|
+
value: O.enum.submitRequest
|
|
505
505
|
},
|
|
506
506
|
confirmDraft: {
|
|
507
507
|
translationKey: "inventory.transfer.receiveRequest.actions.confirmDraft",
|
|
508
508
|
color: "text-fm-color-typo-primary",
|
|
509
|
-
value:
|
|
509
|
+
value: O.enum.confirmDraft
|
|
510
510
|
},
|
|
511
511
|
cancelDraft: {
|
|
512
512
|
translationKey: "inventory.transfer.receiveRequest.actions.cancelDraft",
|
|
513
513
|
color: "text-fm-color-typo-error",
|
|
514
|
-
value:
|
|
514
|
+
value: O.enum.cancelDraft
|
|
515
515
|
},
|
|
516
516
|
approveRequest: {
|
|
517
517
|
translationKey: "inventory.transfer.receiveRequest.actions.approveRequest",
|
|
518
518
|
color: "text-fm-color-typo-primary",
|
|
519
|
-
value:
|
|
519
|
+
value: O.enum.approveRequest
|
|
520
520
|
},
|
|
521
521
|
rejectRequest: {
|
|
522
522
|
translationKey: "inventory.transfer.receiveRequest.actions.rejectRequest",
|
|
523
523
|
color: "text-fm-color-typo-error",
|
|
524
|
-
value:
|
|
524
|
+
value: O.enum.rejectRequest
|
|
525
525
|
},
|
|
526
526
|
processRequest: {
|
|
527
527
|
translationKey: "inventory.transfer.receiveRequest.actions.processRequest",
|
|
528
528
|
color: "text-fm-color-typo-primary",
|
|
529
|
-
value:
|
|
529
|
+
value: O.enum.processRequest
|
|
530
530
|
},
|
|
531
531
|
receiveStock: {
|
|
532
532
|
translationKey: "inventory.transfer.receiveRequest.actions.receiveStock",
|
|
533
533
|
color: "text-fm-color-typo-primary",
|
|
534
|
-
value:
|
|
534
|
+
value: O.enum.receiveStock
|
|
535
535
|
},
|
|
536
536
|
completeReceive: {
|
|
537
537
|
translationKey: "inventory.transfer.receiveRequest.actions.completeReceive",
|
|
538
538
|
color: "text-fm-color-typo-primary",
|
|
539
|
-
value:
|
|
539
|
+
value: O.enum.completeReceive
|
|
540
540
|
},
|
|
541
541
|
closeRequest: {
|
|
542
542
|
translationKey: "inventory.transfer.receiveRequest.actions.closeRequest",
|
|
543
543
|
color: "system-error-300",
|
|
544
|
-
value:
|
|
544
|
+
value: O.enum.closeRequest
|
|
545
545
|
},
|
|
546
546
|
approveDraft: {
|
|
547
547
|
translationKey: "",
|
|
@@ -556,30 +556,30 @@ const Se = {
|
|
|
556
556
|
returnStock: {
|
|
557
557
|
translationKey: "inventory.transfer.receiveRequest.actions.returnStock",
|
|
558
558
|
color: "text-fm-color-typo-primary",
|
|
559
|
-
value:
|
|
559
|
+
value: O.enum.returnStock
|
|
560
560
|
}
|
|
561
561
|
};
|
|
562
|
-
function Hs(
|
|
563
|
-
const a = me(),
|
|
564
|
-
function c(
|
|
565
|
-
switch (
|
|
562
|
+
function Hs(p, e) {
|
|
563
|
+
const a = me(), b = Te(), u = Pe(), { t } = ct();
|
|
564
|
+
function c(m) {
|
|
565
|
+
switch (m.status) {
|
|
566
566
|
case "DRAFT":
|
|
567
567
|
return [
|
|
568
568
|
ne[J.Update],
|
|
569
569
|
ne[J.Details],
|
|
570
|
-
|
|
571
|
-
Se[
|
|
570
|
+
m.supplier.internal === "restaurant" || m.supplier.internal === "warehouse" ? Se[O.enum.submitRequest] : Se[O.enum.confirmDraft],
|
|
571
|
+
Se[O.enum.cancelDraft]
|
|
572
572
|
];
|
|
573
573
|
case "RECEIVING":
|
|
574
574
|
return [
|
|
575
|
-
Se[
|
|
575
|
+
Se[O.enum.completeReceive],
|
|
576
576
|
ne[J.Details],
|
|
577
577
|
ne[J.Print]
|
|
578
578
|
];
|
|
579
579
|
case "REQUESTING":
|
|
580
|
-
return
|
|
581
|
-
Se[
|
|
582
|
-
Se[
|
|
580
|
+
return p === "receive/request" ? [ne[J.Details], ne[J.Print]] : [
|
|
581
|
+
Se[O.enum.approveRequest],
|
|
582
|
+
Se[O.enum.rejectRequest],
|
|
583
583
|
ne[J.Details]
|
|
584
584
|
// DefaultRowActions[RowActionEnum.Print]
|
|
585
585
|
];
|
|
@@ -591,38 +591,38 @@ function Hs(m, e) {
|
|
|
591
591
|
return [ne[J.Details], ne[J.Print]];
|
|
592
592
|
}
|
|
593
593
|
}
|
|
594
|
-
function i(
|
|
595
|
-
return Object.values(
|
|
594
|
+
function i(m) {
|
|
595
|
+
return Object.values(O.enum).includes(m);
|
|
596
596
|
}
|
|
597
|
-
async function n(
|
|
598
|
-
var
|
|
599
|
-
const
|
|
600
|
-
if (
|
|
601
|
-
const G = (
|
|
602
|
-
((
|
|
603
|
-
po:
|
|
597
|
+
async function n(m, l, r) {
|
|
598
|
+
var w, x, E, A, P, K;
|
|
599
|
+
const d = rt(l);
|
|
600
|
+
if (m === J.Print) {
|
|
601
|
+
const G = (r == null ? void 0 : r.toInventoryLocation) ?? a.currentLocation;
|
|
602
|
+
((w = r == null ? void 0 : r.netSuite) != null && w.refNo || (x = d.netSuite) != null && x.refNo) && (d.ref = [((E = r == null ? void 0 : r.netSuite) == null ? void 0 : E.refNo) || ((A = d.netSuite) == null ? void 0 : A.refNo)].filter((ce) => ce).join(" ")), Vt({
|
|
603
|
+
po: d,
|
|
604
604
|
currentLocation: G,
|
|
605
605
|
business: u.currentBusiness.value,
|
|
606
|
-
fulfilling:
|
|
607
|
-
por:
|
|
606
|
+
fulfilling: p === "approval",
|
|
607
|
+
por: r
|
|
608
608
|
});
|
|
609
609
|
return;
|
|
610
610
|
}
|
|
611
|
-
if (
|
|
612
|
-
e.promptShowTransferDetails(
|
|
611
|
+
if (m === J.Details) {
|
|
612
|
+
e.promptShowTransferDetails(d, r);
|
|
613
613
|
return;
|
|
614
614
|
}
|
|
615
|
-
if (
|
|
616
|
-
(P = e.promptUpdateTransferDialog) == null || P.call(e,
|
|
615
|
+
if (m === J.Update) {
|
|
616
|
+
(P = e.promptUpdateTransferDialog) == null || P.call(e, d);
|
|
617
617
|
return;
|
|
618
618
|
}
|
|
619
|
-
if (i(
|
|
620
|
-
e.submitAction(l,
|
|
619
|
+
if (i(m)) {
|
|
620
|
+
e.submitAction(l, m, (K = r == null ? void 0 : r.to) == null ? void 0 : K.dbName);
|
|
621
621
|
return;
|
|
622
622
|
}
|
|
623
623
|
}
|
|
624
|
-
function
|
|
625
|
-
const
|
|
624
|
+
function h() {
|
|
625
|
+
const m = [
|
|
626
626
|
{
|
|
627
627
|
accessorKey: "seqNumber",
|
|
628
628
|
header: () => t("inventory.transfer.table.seqNo"),
|
|
@@ -648,15 +648,15 @@ function Hs(m, e) {
|
|
|
648
648
|
accessorKey: "items.length",
|
|
649
649
|
header: () => t("inventory.transfer.table.noOfItems"),
|
|
650
650
|
cell: (l) => {
|
|
651
|
-
const
|
|
652
|
-
return
|
|
653
|
-
|
|
654
|
-
|
|
651
|
+
const r = l.row.original.version || "1", d = l.getValue();
|
|
652
|
+
return $("div", { class: "flex items-center gap-2" }, [
|
|
653
|
+
d,
|
|
654
|
+
r !== "1" ? $(
|
|
655
655
|
"div",
|
|
656
656
|
{
|
|
657
657
|
class: ["fm-status-badge", "fm-status-badge-draft"].join(" ")
|
|
658
658
|
},
|
|
659
|
-
`v${
|
|
659
|
+
`v${r}`
|
|
660
660
|
) : null
|
|
661
661
|
]);
|
|
662
662
|
},
|
|
@@ -675,21 +675,21 @@ function Hs(m, e) {
|
|
|
675
675
|
accessorKey: "status",
|
|
676
676
|
header: () => t("inventory.transfer.table.status"),
|
|
677
677
|
cell(l) {
|
|
678
|
-
const
|
|
679
|
-
`inventory.transfer.status.${ft(
|
|
680
|
-
),
|
|
681
|
-
return
|
|
678
|
+
const r = l.getValue(), d = ze(l.row.original), { partial: w, over: x } = dt(d), E = t(
|
|
679
|
+
`inventory.transfer.status.${ft(r ?? "", w, x)}`
|
|
680
|
+
), A = `${r ?? ""}`.toLocaleLowerCase("en-us");
|
|
681
|
+
return $(
|
|
682
682
|
"div",
|
|
683
683
|
{
|
|
684
684
|
class: "flex"
|
|
685
685
|
},
|
|
686
|
-
|
|
686
|
+
$(
|
|
687
687
|
"div",
|
|
688
688
|
{
|
|
689
689
|
class: [
|
|
690
690
|
"fm-status-badge",
|
|
691
|
-
`fm-status-badge-${
|
|
692
|
-
|
|
691
|
+
`fm-status-badge-${A}`,
|
|
692
|
+
x && "fm-status-badge-error"
|
|
693
693
|
].filter(Boolean).join(" ")
|
|
694
694
|
},
|
|
695
695
|
`${E}`
|
|
@@ -702,8 +702,8 @@ function Hs(m, e) {
|
|
|
702
702
|
{
|
|
703
703
|
id: "action",
|
|
704
704
|
cell(l) {
|
|
705
|
-
const
|
|
706
|
-
return Ze(
|
|
705
|
+
const r = l.row.original, d = c(r);
|
|
706
|
+
return Ze(d, (w) => n(w, r));
|
|
707
707
|
},
|
|
708
708
|
enableSorting: !1,
|
|
709
709
|
size: 40,
|
|
@@ -713,15 +713,19 @@ function Hs(m, e) {
|
|
|
713
713
|
}
|
|
714
714
|
}
|
|
715
715
|
];
|
|
716
|
-
if (
|
|
716
|
+
if (b.isEnabled) {
|
|
717
717
|
const l = [
|
|
718
718
|
{
|
|
719
719
|
id: "netsuiteTransferOrder",
|
|
720
|
+
accessorFn: (r) => {
|
|
721
|
+
var d;
|
|
722
|
+
return (d = r.netSuite) != null && d.id ? `${r.netSuite.refNo} (${r.netSuite.id})` : "N/A";
|
|
723
|
+
},
|
|
720
724
|
header: () => "NetSuite Order (ID)",
|
|
721
|
-
cell(
|
|
722
|
-
var
|
|
723
|
-
const
|
|
724
|
-
return (
|
|
725
|
+
cell(r) {
|
|
726
|
+
var w;
|
|
727
|
+
const d = r.row.original;
|
|
728
|
+
return (w = d.netSuite) != null && w.id ? `${d.netSuite.refNo} (${d.netSuite.id})` : "N/A";
|
|
725
729
|
},
|
|
726
730
|
enableSorting: !1,
|
|
727
731
|
size: 200,
|
|
@@ -732,10 +736,14 @@ function Hs(m, e) {
|
|
|
732
736
|
},
|
|
733
737
|
{
|
|
734
738
|
id: "netsuiteTransactionNumber",
|
|
739
|
+
accessorFn: (r) => {
|
|
740
|
+
var d, w;
|
|
741
|
+
return ((w = (d = r.netSuite) == null ? void 0 : d.additionalInfo) == null ? void 0 : w.transactionnumber) ?? "N/A";
|
|
742
|
+
},
|
|
735
743
|
header: () => "NetSuite Transaction No.",
|
|
736
|
-
cell(
|
|
737
|
-
var
|
|
738
|
-
return ((
|
|
744
|
+
cell(r) {
|
|
745
|
+
var w, x;
|
|
746
|
+
return ((x = (w = r.row.original.netSuite) == null ? void 0 : w.additionalInfo) == null ? void 0 : x.transactionnumber) ?? "N/A";
|
|
739
747
|
},
|
|
740
748
|
enableSorting: !1,
|
|
741
749
|
size: 200,
|
|
@@ -745,12 +753,12 @@ function Hs(m, e) {
|
|
|
745
753
|
}
|
|
746
754
|
}
|
|
747
755
|
];
|
|
748
|
-
|
|
756
|
+
m.splice(m.length - 1, 0, ...l);
|
|
749
757
|
}
|
|
750
|
-
return
|
|
758
|
+
return m;
|
|
751
759
|
}
|
|
752
760
|
function _() {
|
|
753
|
-
const
|
|
761
|
+
const m = [
|
|
754
762
|
{
|
|
755
763
|
accessorKey: "purchaseOrder.seqNumber",
|
|
756
764
|
header: () => t("inventory.transfer.table.seqNo"),
|
|
@@ -787,19 +795,19 @@ function Hs(m, e) {
|
|
|
787
795
|
accessorKey: "purchaseOrder.status",
|
|
788
796
|
header: () => t("inventory.transfer.table.status"),
|
|
789
797
|
cell(l) {
|
|
790
|
-
var
|
|
791
|
-
const
|
|
792
|
-
return
|
|
798
|
+
var A, P;
|
|
799
|
+
const r = l.row.original, d = l.getValue(), w = d === "RECEIVING" && (((P = (A = r.purchaseOrder) == null ? void 0 : A.deliveryOrder) == null ? void 0 : P.length) ?? 0) > 0, x = t(w ? "inventory.transfer.status.PARTIAL_RECEIVED" : `inventory.transfer.status.${d ?? ""}`), E = w ? "partially_received" : `${d ?? ""}`.toLocaleLowerCase("en-us");
|
|
800
|
+
return $(
|
|
793
801
|
"div",
|
|
794
802
|
{
|
|
795
803
|
class: "flex"
|
|
796
804
|
},
|
|
797
|
-
|
|
805
|
+
$(
|
|
798
806
|
"div",
|
|
799
807
|
{
|
|
800
808
|
class: `fm-status-badge fm-status-badge-${E}`
|
|
801
809
|
},
|
|
802
|
-
|
|
810
|
+
x
|
|
803
811
|
)
|
|
804
812
|
);
|
|
805
813
|
},
|
|
@@ -808,13 +816,13 @@ function Hs(m, e) {
|
|
|
808
816
|
{
|
|
809
817
|
id: "action",
|
|
810
818
|
cell(l) {
|
|
811
|
-
const
|
|
812
|
-
...
|
|
819
|
+
const r = l.row.original, w = (r.purchaseOrder ? c(r.purchaseOrder) : []).map((x) => x.value === J.Print ? {
|
|
820
|
+
...x,
|
|
813
821
|
translationKey: "inventory.transfer.receiveRequest.details.printDeliveryOrder"
|
|
814
|
-
} :
|
|
822
|
+
} : x);
|
|
815
823
|
return Ze(
|
|
816
|
-
|
|
817
|
-
(
|
|
824
|
+
w,
|
|
825
|
+
(x) => r.purchaseOrder ? n(x, r.purchaseOrder, r) : void 0
|
|
818
826
|
);
|
|
819
827
|
},
|
|
820
828
|
enableSorting: !1,
|
|
@@ -825,15 +833,19 @@ function Hs(m, e) {
|
|
|
825
833
|
}
|
|
826
834
|
}
|
|
827
835
|
];
|
|
828
|
-
if (
|
|
836
|
+
if (b.isEnabled) {
|
|
829
837
|
const l = [
|
|
830
838
|
{
|
|
831
839
|
id: "netsuiteTransferOrder",
|
|
840
|
+
accessorFn: (r) => {
|
|
841
|
+
var d;
|
|
842
|
+
return (d = r.netSuite) != null && d.id ? `${r.netSuite.refNo} (${r.netSuite.id})` : "N/A";
|
|
843
|
+
},
|
|
832
844
|
header: () => "NetSuite Order (ID)",
|
|
833
|
-
cell(
|
|
834
|
-
var
|
|
835
|
-
const
|
|
836
|
-
return (
|
|
845
|
+
cell(r) {
|
|
846
|
+
var w;
|
|
847
|
+
const d = r.row.original;
|
|
848
|
+
return (w = d.netSuite) != null && w.id ? `${d.netSuite.refNo} (${d.netSuite.id})` : "N/A";
|
|
837
849
|
},
|
|
838
850
|
enableSorting: !1,
|
|
839
851
|
size: 200,
|
|
@@ -844,10 +856,14 @@ function Hs(m, e) {
|
|
|
844
856
|
},
|
|
845
857
|
{
|
|
846
858
|
id: "netsuiteTransactionNumber",
|
|
859
|
+
accessorFn: (r) => {
|
|
860
|
+
var d, w;
|
|
861
|
+
return ((w = (d = r.netSuite) == null ? void 0 : d.additionalInfo) == null ? void 0 : w.transactionnumber) ?? "N/A";
|
|
862
|
+
},
|
|
847
863
|
header: () => "NetSuite Transaction No.",
|
|
848
|
-
cell(
|
|
849
|
-
var
|
|
850
|
-
return ((
|
|
864
|
+
cell(r) {
|
|
865
|
+
var w, x;
|
|
866
|
+
return ((x = (w = r.row.original.netSuite) == null ? void 0 : w.additionalInfo) == null ? void 0 : x.transactionnumber) ?? "N/A";
|
|
851
867
|
},
|
|
852
868
|
enableSorting: !1,
|
|
853
869
|
size: 200,
|
|
@@ -857,12 +873,12 @@ function Hs(m, e) {
|
|
|
857
873
|
}
|
|
858
874
|
}
|
|
859
875
|
];
|
|
860
|
-
|
|
876
|
+
m.splice(m.length - 2, 0, ...l);
|
|
861
877
|
}
|
|
862
|
-
return
|
|
878
|
+
return m;
|
|
863
879
|
}
|
|
864
880
|
return {
|
|
865
|
-
columnDefs: Z(() =>
|
|
881
|
+
columnDefs: Z(() => p === "receive/request" ? h() : _())
|
|
866
882
|
};
|
|
867
883
|
}
|
|
868
884
|
const Ut = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg p-16" }, Mt = { class: "flex flex-col gap-8" }, Kt = { class: "flex w-full justify-end gap-16" }, jt = /* @__PURE__ */ he({
|
|
@@ -872,41 +888,41 @@ const Ut = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
872
888
|
confirm: { type: Function }
|
|
873
889
|
},
|
|
874
890
|
emits: ["update:show"],
|
|
875
|
-
setup(
|
|
876
|
-
const a =
|
|
891
|
+
setup(p, { emit: e }) {
|
|
892
|
+
const a = p, b = Rt({
|
|
877
893
|
id: "",
|
|
878
894
|
createdAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
879
895
|
items: []
|
|
880
896
|
}), u = M(), t = e;
|
|
881
897
|
lt(() => {
|
|
882
|
-
a.purchaseOrder && (
|
|
898
|
+
a.purchaseOrder && (b.items = a.purchaseOrder.items.map((i) => ({
|
|
883
899
|
id: i.id,
|
|
884
900
|
sku: i.sku,
|
|
885
901
|
measurement: i.measurement,
|
|
886
902
|
amount: i.quantity ?? { amount: 1, precision: 0 }
|
|
887
903
|
})));
|
|
888
904
|
});
|
|
889
|
-
const c = Z(() =>
|
|
905
|
+
const c = Z(() => b.items.length <= 10);
|
|
890
906
|
return (i, n) => {
|
|
891
|
-
const
|
|
892
|
-
return g(), oe(
|
|
907
|
+
const h = z("FmTable"), _ = z("FmButton"), v = z("FmForm");
|
|
908
|
+
return g(), oe(v, {
|
|
893
909
|
ref_key: "formRef",
|
|
894
910
|
ref: u,
|
|
895
911
|
class: "bg-white flex flex-col gap-32 rounded-3xl p-24 w-[800px]",
|
|
896
912
|
onValidationFailed: console.log,
|
|
897
|
-
onValidationSuccess: n[1] || (n[1] = () => a.confirm(
|
|
913
|
+
onValidationSuccess: n[1] || (n[1] = () => a.confirm(b))
|
|
898
914
|
}, {
|
|
899
915
|
default: ae(() => [
|
|
900
916
|
n[2] || (n[2] = o("div", { class: "fm-typo-en-title-sm-600" }, "Confirm the transfer amount", -1)),
|
|
901
917
|
o("div", Ut, [
|
|
902
918
|
o("div", Mt, [
|
|
903
|
-
I(
|
|
919
|
+
I(h, {
|
|
904
920
|
"column-defs": [
|
|
905
921
|
{
|
|
906
922
|
header: "Code",
|
|
907
|
-
cell: (
|
|
908
|
-
const l = a.purchaseOrder.items.find((
|
|
909
|
-
return
|
|
923
|
+
cell: (m) => {
|
|
924
|
+
const l = a.purchaseOrder.items.find((r) => r.id === m.row.original.id || r.sku._id === m.row.original.sku._id);
|
|
925
|
+
return $(
|
|
910
926
|
S(et).FmTooltip,
|
|
911
927
|
{
|
|
912
928
|
content: l.code,
|
|
@@ -914,7 +930,7 @@ const Ut = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
914
930
|
variant: "plain",
|
|
915
931
|
zIndex: 50
|
|
916
932
|
},
|
|
917
|
-
|
|
933
|
+
$(
|
|
918
934
|
"span",
|
|
919
935
|
{
|
|
920
936
|
class: "flex-auto line-clamp-2 text-ellipsis break-all"
|
|
@@ -926,9 +942,9 @@ const Ut = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
926
942
|
},
|
|
927
943
|
{
|
|
928
944
|
header: "Name",
|
|
929
|
-
cell: (
|
|
930
|
-
const l = a.purchaseOrder.items.find((
|
|
931
|
-
return
|
|
945
|
+
cell: (m) => {
|
|
946
|
+
const l = a.purchaseOrder.items.find((r) => r.id === m.row.original.id || r.sku._id === m.row.original.sku._id);
|
|
947
|
+
return $(
|
|
932
948
|
S(et).FmTooltip,
|
|
933
949
|
{
|
|
934
950
|
content: l.name,
|
|
@@ -936,7 +952,7 @@ const Ut = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
936
952
|
variant: "plain",
|
|
937
953
|
zIndex: 50
|
|
938
954
|
},
|
|
939
|
-
|
|
955
|
+
$(
|
|
940
956
|
"span",
|
|
941
957
|
{
|
|
942
958
|
class: "flex-auto line-clamp-2 text-ellipsis break-all"
|
|
@@ -948,39 +964,39 @@ const Ut = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
948
964
|
},
|
|
949
965
|
{
|
|
950
966
|
header: "Amount",
|
|
951
|
-
cell: (
|
|
952
|
-
const l =
|
|
967
|
+
cell: (m) => {
|
|
968
|
+
const l = m.row.original, r = a.purchaseOrder.items.find((w) => w.id === l.id || w.sku._id === l.sku._id), d = l.amount ?? {
|
|
953
969
|
amount: 1,
|
|
954
970
|
precision: 0
|
|
955
971
|
};
|
|
956
|
-
return
|
|
972
|
+
return $(Pt, {
|
|
957
973
|
style: {
|
|
958
974
|
flex: "1 1 0%"
|
|
959
975
|
},
|
|
960
976
|
modelValue: {
|
|
961
|
-
amount:
|
|
977
|
+
amount: d,
|
|
962
978
|
measurement: l.measurement ?? null
|
|
963
979
|
},
|
|
964
980
|
key: l.id ?? l.sku._id,
|
|
965
981
|
unit: l.sku.unit,
|
|
966
|
-
"onUpdate:modelValue": (
|
|
967
|
-
if (!
|
|
968
|
-
const
|
|
969
|
-
|
|
982
|
+
"onUpdate:modelValue": (w) => {
|
|
983
|
+
if (!w) return;
|
|
984
|
+
const x = b.items.find((E) => E.id === l.id || E.sku._id === l.sku._id);
|
|
985
|
+
x && (x.amount = w.amount);
|
|
970
986
|
},
|
|
971
987
|
disableUnit: !0,
|
|
972
988
|
rules: [
|
|
973
989
|
S(Ct)(
|
|
974
990
|
+S(fe)({ amount: 0, precision: 0 })
|
|
975
991
|
),
|
|
976
|
-
S(It)(+S(fe)(
|
|
992
|
+
S(It)(+S(fe)(r.quantity))
|
|
977
993
|
],
|
|
978
994
|
applyDefaultRules: !0
|
|
979
995
|
});
|
|
980
996
|
}
|
|
981
997
|
}
|
|
982
998
|
],
|
|
983
|
-
"row-data":
|
|
999
|
+
"row-data": b.items,
|
|
984
1000
|
"hide-footer": c.value
|
|
985
1001
|
}, null, 8, ["column-defs", "row-data", "hide-footer"])
|
|
986
1002
|
])
|
|
@@ -1072,23 +1088,23 @@ const Ut = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
1072
1088
|
}
|
|
1073
1089
|
};
|
|
1074
1090
|
function zt() {
|
|
1075
|
-
const
|
|
1091
|
+
const p = Ae();
|
|
1076
1092
|
return {
|
|
1077
1093
|
ableToMarkReceived(e) {
|
|
1078
1094
|
if (!e || e.status !== ie.enum.RECEIVING)
|
|
1079
1095
|
return !1;
|
|
1080
|
-
const
|
|
1081
|
-
return `${e.supplier.internal}_${e.supplier._id}` !==
|
|
1096
|
+
const b = me().currentLocationDBName;
|
|
1097
|
+
return `${e.supplier.internal}_${e.supplier._id}` !== b;
|
|
1082
1098
|
},
|
|
1083
1099
|
ableToMarkApproved(e) {
|
|
1084
1100
|
return !(!e || (e == null ? void 0 : e.status) !== ie.enum.REQUESTING);
|
|
1085
1101
|
},
|
|
1086
1102
|
ableToCreateFulfillment(e, a) {
|
|
1087
1103
|
var t, c;
|
|
1088
|
-
if (!
|
|
1104
|
+
if (!p.acceptRequireFulfillment || !e || !a || e.status !== ie.enum.PROCESSING || !a.processedAt)
|
|
1089
1105
|
return !1;
|
|
1090
|
-
const
|
|
1091
|
-
return !(
|
|
1106
|
+
const b = (t = a == null ? void 0 : a.from) == null ? void 0 : t.dbName, u = (c = a == null ? void 0 : a.to) == null ? void 0 : c.dbName;
|
|
1107
|
+
return !(b.startsWith("restaurant_") && u.startsWith("restaurant_"));
|
|
1092
1108
|
}
|
|
1093
1109
|
};
|
|
1094
1110
|
}
|
|
@@ -1100,22 +1116,22 @@ const Ht = { class: "flex flex-row-reverse" }, Gt = /* @__PURE__ */ he({
|
|
|
1100
1116
|
isTransferBetweenOutlets: { type: Boolean },
|
|
1101
1117
|
scope: {}
|
|
1102
1118
|
},
|
|
1103
|
-
setup(
|
|
1104
|
-
const e =
|
|
1119
|
+
setup(p) {
|
|
1120
|
+
const e = p, a = Te(), b = Ce(), u = je(), t = M(!1);
|
|
1105
1121
|
Z(() => {
|
|
1106
|
-
var _,
|
|
1122
|
+
var _, v, m, l;
|
|
1107
1123
|
let i = !0;
|
|
1108
1124
|
a.isEnabled || (i = !1);
|
|
1109
|
-
const n = e.purchaseOrder,
|
|
1110
|
-
return n && ((_ = n == null ? void 0 : n.supplier) != null && _.internal ? (!
|
|
1125
|
+
const n = e.purchaseOrder, h = e.poRequest;
|
|
1126
|
+
return n && ((_ = n == null ? void 0 : n.supplier) != null && _.internal ? (!h && n.status == ie.enum.DRAFT && (i = !1), h && !((v = h == null ? void 0 : h.netSuite) != null && v.id) && (i = !1), e.isTransferBetweenOutlets && (i = !1)) : ((n == null ? void 0 : n.status) !== ie.enum.REQUESTING && n.supplier.internal && (i = !1), !h && !((m = n == null ? void 0 : n.netSuite) != null && m.id) && (i = !1), !h && ((l = n == null ? void 0 : n.netSuite) != null && l.id) && (n == null ? void 0 : n.status) == ie.enum.REQUESTING && (i = !1))), i;
|
|
1111
1127
|
});
|
|
1112
1128
|
async function c() {
|
|
1113
1129
|
t.value || u.open({
|
|
1114
1130
|
title: "Sync with NetSuite",
|
|
1115
|
-
contentComponent:
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1131
|
+
contentComponent: $("div", [
|
|
1132
|
+
$("p", "Are you sure you want to sync now?"),
|
|
1133
|
+
$("br"),
|
|
1134
|
+
$(
|
|
1119
1135
|
"p",
|
|
1120
1136
|
{ class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" },
|
|
1121
1137
|
"Please wait a moment before syncing manually to avoid unnecessary actions."
|
|
@@ -1128,20 +1144,20 @@ const Ht = { class: "flex flex-row-reverse" }, Gt = /* @__PURE__ */ he({
|
|
|
1128
1144
|
},
|
|
1129
1145
|
secondaryActions: { text: "Not now", close: !0 }
|
|
1130
1146
|
}).onPrimary(async () => {
|
|
1131
|
-
var i, n,
|
|
1147
|
+
var i, n, h;
|
|
1132
1148
|
try {
|
|
1133
1149
|
t.value = !0;
|
|
1134
|
-
const _ = ((i = e.purchaseOrder) == null ? void 0 : i._id) || ((n = e.poRequest) == null ? void 0 : n.purchaseOrderId) || "",
|
|
1150
|
+
const _ = ((i = e.purchaseOrder) == null ? void 0 : i._id) || ((n = e.poRequest) == null ? void 0 : n.purchaseOrderId) || "", v = (h = e.poRequest) == null ? void 0 : h.to.dbName;
|
|
1135
1151
|
await a.syncPurchaseOrder(
|
|
1136
1152
|
_,
|
|
1137
|
-
e.scope === "approval" ?
|
|
1138
|
-
),
|
|
1153
|
+
e.scope === "approval" ? v : void 0
|
|
1154
|
+
), b.open({
|
|
1139
1155
|
title: "Sync with NetSuite",
|
|
1140
1156
|
message: "Requested to sync with NetSuite. Please wait a moment.",
|
|
1141
1157
|
type: "success"
|
|
1142
|
-
}), await new Promise((
|
|
1158
|
+
}), await new Promise((m) => setTimeout(m, 5e3)), t.value = !1;
|
|
1143
1159
|
} catch {
|
|
1144
|
-
|
|
1160
|
+
b.open({
|
|
1145
1161
|
title: "Error",
|
|
1146
1162
|
message: "Failed to sync with NetSuite",
|
|
1147
1163
|
type: "error"
|
|
@@ -1150,9 +1166,9 @@ const Ht = { class: "flex flex-row-reverse" }, Gt = /* @__PURE__ */ he({
|
|
|
1150
1166
|
});
|
|
1151
1167
|
}
|
|
1152
1168
|
return (i, n) => {
|
|
1153
|
-
const
|
|
1154
|
-
return g(),
|
|
1155
|
-
I(
|
|
1169
|
+
const h = z("FmButton");
|
|
1170
|
+
return g(), N("div", Ht, [
|
|
1171
|
+
I(h, {
|
|
1156
1172
|
"prepend-icon": "sync",
|
|
1157
1173
|
variant: "secondary",
|
|
1158
1174
|
label: "Sync",
|
|
@@ -1190,57 +1206,57 @@ const Ht = { class: "flex flex-row-reverse" }, Gt = /* @__PURE__ */ he({
|
|
|
1190
1206
|
isTransferBetweenOutlets: { type: Boolean },
|
|
1191
1207
|
scope: {}
|
|
1192
1208
|
},
|
|
1193
|
-
setup(
|
|
1194
|
-
const e =
|
|
1209
|
+
setup(p) {
|
|
1210
|
+
const e = p, a = Te(), b = Ie(), u = M(e.poRequest);
|
|
1195
1211
|
lt(async () => {
|
|
1196
1212
|
var n;
|
|
1197
1213
|
if (!e.poRequest && ((n = e.purchaseOrder) != null && n._id)) {
|
|
1198
|
-
const
|
|
1199
|
-
u.value =
|
|
1214
|
+
const h = await b.getLatestPurchaseOrderRequest(e.purchaseOrder._id);
|
|
1215
|
+
u.value = h;
|
|
1200
1216
|
}
|
|
1201
1217
|
});
|
|
1202
1218
|
const t = Z(
|
|
1203
1219
|
() => {
|
|
1204
|
-
var n,
|
|
1220
|
+
var n, h, _, v, m, l;
|
|
1205
1221
|
return a.getSubsidiaryFullName(
|
|
1206
|
-
((_ = (
|
|
1222
|
+
((_ = (h = (n = e.purchaseOrder) == null ? void 0 : n.netSuite) == null ? void 0 : h.subsidiary) == null ? void 0 : _.id) || ((l = (m = (v = e.poRequest) == null ? void 0 : v.netSuite) == null ? void 0 : m.subsidiary) == null ? void 0 : l.id)
|
|
1207
1223
|
).fullName;
|
|
1208
1224
|
}
|
|
1209
1225
|
), c = Z(() => {
|
|
1210
|
-
var n,
|
|
1211
|
-
return (_ = (
|
|
1226
|
+
var n, h, _, v, m, l, r, d, w, x, E, A;
|
|
1227
|
+
return (_ = (h = (n = e.purchaseOrder) == null ? void 0 : n.netSuite) == null ? void 0 : h.additionalInfo) != null && _.transactionnumber ? (l = (m = (v = e.purchaseOrder) == null ? void 0 : v.netSuite) == null ? void 0 : m.additionalInfo) == null ? void 0 : l.transactionnumber : (w = (d = (r = u.value) == null ? void 0 : r.netSuite) == null ? void 0 : d.additionalInfo) != null && w.transactionnumber ? (A = (E = (x = u.value) == null ? void 0 : x.netSuite) == null ? void 0 : E.additionalInfo) == null ? void 0 : A.transactionnumber : null;
|
|
1212
1228
|
}), i = Z(() => {
|
|
1213
|
-
var n,
|
|
1214
|
-
return (
|
|
1215
|
-
var
|
|
1216
|
-
return (
|
|
1229
|
+
var n, h, _, v, m, l;
|
|
1230
|
+
return (h = (n = e.purchaseOrder) == null ? void 0 : n.deliveryFullfillment) != null && h.length && ((v = (_ = e.purchaseOrder) == null ? void 0 : _.deliveryFullfillment) == null ? void 0 : v.length) > 0 ? (l = (m = e.purchaseOrder) == null ? void 0 : m.deliveryFullfillment) == null ? void 0 : l.map((r) => {
|
|
1231
|
+
var d;
|
|
1232
|
+
return (d = r.netSuite) == null ? void 0 : d.refNo;
|
|
1217
1233
|
}).join(", ") : "N/A";
|
|
1218
1234
|
});
|
|
1219
|
-
return (n,
|
|
1220
|
-
var _,
|
|
1221
|
-
return S(a).isEnabled ? (g(),
|
|
1235
|
+
return (n, h) => {
|
|
1236
|
+
var _, v, m, l, r, d, w, x, E, A, P, K, G, ce, le, be;
|
|
1237
|
+
return S(a).isEnabled ? (g(), N("div", Wt, [
|
|
1222
1238
|
o("div", Yt, [
|
|
1223
|
-
|
|
1239
|
+
h[0] || (h[0] = o("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, "NetSuite subsidiary", -1)),
|
|
1224
1240
|
o("div", Qt, D(t.value || "N/A"), 1)
|
|
1225
1241
|
]),
|
|
1226
|
-
!n.isTransferBetweenOutlets && n.scope === S(Me).RECEIVE_REQUEST ? (g(),
|
|
1227
|
-
o("div", Zt, " NetSuite " + D((
|
|
1242
|
+
!n.isTransferBetweenOutlets && n.scope === S(Me).RECEIVE_REQUEST ? (g(), N("div", Xt, [
|
|
1243
|
+
o("div", Zt, " NetSuite " + D((v = (_ = n.purchaseOrder) == null ? void 0 : _.netSuite) != null && v.recordType ? S(ot)((l = (m = n.purchaseOrder) == null ? void 0 : m.netSuite) == null ? void 0 : l.recordType) : n.transferType === S(ye).PURCHASE ? "Purchase Order" : "Transfer Order") + " (ID) ", 1),
|
|
1228
1244
|
o("div", Jt, [
|
|
1229
|
-
(
|
|
1245
|
+
(d = (r = n.purchaseOrder) == null ? void 0 : r.netSuite) != null && d.id ? (g(), N("span", er, D((x = (w = n.purchaseOrder) == null ? void 0 : w.netSuite) == null ? void 0 : x.refNo) + " (" + D((A = (E = n.purchaseOrder) == null ? void 0 : E.netSuite) == null ? void 0 : A.id) + ") ", 1)) : (g(), N("span", tr, "N/A"))
|
|
1230
1246
|
])
|
|
1231
1247
|
])) : U("", !0),
|
|
1232
|
-
!n.isTransferBetweenOutlets && u.value || n.scope === S(Me).APPROVAL ? (g(),
|
|
1248
|
+
!n.isTransferBetweenOutlets && u.value || n.scope === S(Me).APPROVAL ? (g(), N("div", rr, [
|
|
1233
1249
|
o("div", sr, " (Request) NetSuite " + D(n.transferType === S(ye).PURCHASE ? "Purchase Order" : "Transfer Order") + " (ID) ", 1),
|
|
1234
1250
|
o("div", nr, [
|
|
1235
|
-
(K = (P = u.value) == null ? void 0 : P.netSuite) != null && K.id ? (g(),
|
|
1251
|
+
(K = (P = u.value) == null ? void 0 : P.netSuite) != null && K.id ? (g(), N("span", ar, D((ce = (G = u.value) == null ? void 0 : G.netSuite) == null ? void 0 : ce.refNo) + " (" + D((be = (le = u.value) == null ? void 0 : le.netSuite) == null ? void 0 : be.id) + ") ", 1)) : (g(), N("span", or, "N/A"))
|
|
1236
1252
|
])
|
|
1237
1253
|
])) : U("", !0),
|
|
1238
|
-
c.value ? (g(),
|
|
1239
|
-
|
|
1254
|
+
c.value ? (g(), N("div", ir, [
|
|
1255
|
+
h[1] || (h[1] = o("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " NetSuite Transaction Number ", -1)),
|
|
1240
1256
|
o("div", lr, D(c.value), 1)
|
|
1241
1257
|
])) : U("", !0),
|
|
1242
|
-
S(a).isEnabled && n.transferType === S(ye).TRANSFER && !n.isTransferBetweenOutlets ? (g(),
|
|
1243
|
-
|
|
1258
|
+
S(a).isEnabled && n.transferType === S(ye).TRANSFER && !n.isTransferBetweenOutlets ? (g(), N("div", cr, [
|
|
1259
|
+
h[2] || (h[2] = o("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " NetSuite fulfillment IDs ", -1)),
|
|
1244
1260
|
o("div", ur, D(i.value), 1)
|
|
1245
1261
|
])) : U("", !0)
|
|
1246
1262
|
])) : U("", !0);
|
|
@@ -1252,9 +1268,9 @@ const Ht = { class: "flex flex-row-reverse" }, Gt = /* @__PURE__ */ he({
|
|
|
1252
1268
|
netsuiteId: {},
|
|
1253
1269
|
purchaseOrderId: {}
|
|
1254
1270
|
},
|
|
1255
|
-
setup(
|
|
1271
|
+
setup(p) {
|
|
1256
1272
|
const e = Ce(), a = it();
|
|
1257
|
-
async function
|
|
1273
|
+
async function b(u, t) {
|
|
1258
1274
|
const c = [];
|
|
1259
1275
|
if (u && c.push(`body.message:*${u}*`), t) {
|
|
1260
1276
|
const _ = t.replace(/:/g, "\\:");
|
|
@@ -1267,23 +1283,23 @@ const Ht = { class: "flex flex-row-reverse" }, Gt = /* @__PURE__ */ he({
|
|
|
1267
1283
|
});
|
|
1268
1284
|
return;
|
|
1269
1285
|
}
|
|
1270
|
-
const n = `attributes.pod:netsuite* AND (${c.join(" OR ")})`, { url:
|
|
1286
|
+
const n = `attributes.pod:netsuite* AND (${c.join(" OR ")})`, { url: h } = await a.getLogs(n);
|
|
1271
1287
|
e.open(
|
|
1272
1288
|
{
|
|
1273
1289
|
message: "Opening NetSuite logs...",
|
|
1274
1290
|
type: "info"
|
|
1275
1291
|
},
|
|
1276
1292
|
800
|
|
1277
|
-
), await new Promise((_) => setTimeout(_, 800)), window.open(
|
|
1293
|
+
), await new Promise((_) => setTimeout(_, 800)), window.open(h, "_blank");
|
|
1278
1294
|
}
|
|
1279
1295
|
return (u, t) => {
|
|
1280
1296
|
const c = z("FmButton");
|
|
1281
|
-
return g(),
|
|
1297
|
+
return g(), N("div", fr, [
|
|
1282
1298
|
I(c, {
|
|
1283
1299
|
"prepend-icon": "history",
|
|
1284
1300
|
variant: "secondary",
|
|
1285
1301
|
label: "Logs",
|
|
1286
|
-
onClick: t[0] || (t[0] = (i) =>
|
|
1302
|
+
onClick: t[0] || (t[0] = (i) => b(u.netsuiteId, u.purchaseOrderId)),
|
|
1287
1303
|
"text-color": "primary",
|
|
1288
1304
|
"bg-color": "transparent",
|
|
1289
1305
|
"border-color": "primary"
|
|
@@ -1300,18 +1316,18 @@ const Ht = { class: "flex flex-row-reverse" }, Gt = /* @__PURE__ */ he({
|
|
|
1300
1316
|
netsuiteId: {},
|
|
1301
1317
|
purchaseOrderId: {}
|
|
1302
1318
|
},
|
|
1303
|
-
setup(
|
|
1304
|
-
const e =
|
|
1319
|
+
setup(p) {
|
|
1320
|
+
const e = p, a = it(), b = M(!1), u = me(), t = M(!0), c = M(!1), i = M(null);
|
|
1305
1321
|
async function n() {
|
|
1306
1322
|
if (!i.value) {
|
|
1307
|
-
|
|
1323
|
+
b.value = !0;
|
|
1308
1324
|
try {
|
|
1309
1325
|
t.value = !0;
|
|
1310
|
-
const
|
|
1326
|
+
const h = await a.getMoreInfo(
|
|
1311
1327
|
u.currentLocation.dbName,
|
|
1312
1328
|
e.purchaseOrderId
|
|
1313
1329
|
);
|
|
1314
|
-
i.value =
|
|
1330
|
+
i.value = h, c.value = !1;
|
|
1315
1331
|
} catch {
|
|
1316
1332
|
c.value = !0;
|
|
1317
1333
|
} finally {
|
|
@@ -1319,20 +1335,20 @@ const Ht = { class: "flex flex-row-reverse" }, Gt = /* @__PURE__ */ he({
|
|
|
1319
1335
|
}
|
|
1320
1336
|
}
|
|
1321
1337
|
}
|
|
1322
|
-
return (
|
|
1323
|
-
const
|
|
1324
|
-
return g(),
|
|
1338
|
+
return (h, _) => {
|
|
1339
|
+
const v = z("FmButton"), m = z("FmLabel"), l = z("FmDialog");
|
|
1340
|
+
return g(), N("div", pr, [
|
|
1325
1341
|
I(l, {
|
|
1326
|
-
modelValue:
|
|
1327
|
-
"onUpdate:modelValue": _[2] || (_[2] = (
|
|
1342
|
+
modelValue: b.value,
|
|
1343
|
+
"onUpdate:modelValue": _[2] || (_[2] = (r) => b.value = r),
|
|
1328
1344
|
overlay: !0
|
|
1329
1345
|
}, {
|
|
1330
1346
|
"dialog-button": ae(() => [
|
|
1331
|
-
I(
|
|
1347
|
+
I(v, {
|
|
1332
1348
|
"prepend-icon": "info",
|
|
1333
1349
|
variant: "secondary",
|
|
1334
1350
|
label: "Latest Info",
|
|
1335
|
-
onClick: _[0] || (_[0] = (
|
|
1351
|
+
onClick: _[0] || (_[0] = (r) => n()),
|
|
1336
1352
|
"text-color": "primary",
|
|
1337
1353
|
"bg-color": "transparent",
|
|
1338
1354
|
"border-color": "primary"
|
|
@@ -1342,26 +1358,26 @@ const Ht = { class: "flex flex-row-reverse" }, Gt = /* @__PURE__ */ he({
|
|
|
1342
1358
|
o("div", null, "NetSuite latest info", -1)
|
|
1343
1359
|
])),
|
|
1344
1360
|
"dialog-footer": ae(() => [
|
|
1345
|
-
I(
|
|
1361
|
+
I(v, {
|
|
1346
1362
|
class: "ml-auto sm:w-full xs:w-full",
|
|
1347
1363
|
label: "Close",
|
|
1348
1364
|
size: "md",
|
|
1349
1365
|
variant: "primary",
|
|
1350
|
-
onClick: _[1] || (_[1] = (
|
|
1366
|
+
onClick: _[1] || (_[1] = (r) => b.value = !1)
|
|
1351
1367
|
})
|
|
1352
1368
|
]),
|
|
1353
1369
|
default: ae(() => [
|
|
1354
|
-
t.value ? (g(),
|
|
1355
|
-
c.value ? (g(),
|
|
1356
|
-
key:
|
|
1370
|
+
t.value ? (g(), N("div", vr, "Loading...")) : (g(), N("div", yr, [
|
|
1371
|
+
c.value ? (g(), N("p", _r, "Something went wrong.")) : (g(!0), N(se, { key: 0 }, ve(i.value, (r, d) => (g(), N("div", {
|
|
1372
|
+
key: d,
|
|
1357
1373
|
class: "mb-2"
|
|
1358
1374
|
}, [
|
|
1359
1375
|
o("div", null, [
|
|
1360
|
-
I(
|
|
1361
|
-
label: S(Ke)(
|
|
1376
|
+
I(m, {
|
|
1377
|
+
label: S(Ke)(d)
|
|
1362
1378
|
}, null, 8, ["label"]),
|
|
1363
1379
|
o("div", hr, [
|
|
1364
|
-
Array.isArray(
|
|
1380
|
+
Array.isArray(r) ? (g(), N("span", br, D(r.length > 0 ? r.join(", ") : "N/A"), 1)) : (g(), N("span", gr, D(r), 1))
|
|
1365
1381
|
])
|
|
1366
1382
|
])
|
|
1367
1383
|
]))), 128))
|
|
@@ -1375,7 +1391,7 @@ const Ht = { class: "flex flex-row-reverse" }, Gt = /* @__PURE__ */ he({
|
|
|
1375
1391
|
}), wr = {
|
|
1376
1392
|
key: 0,
|
|
1377
1393
|
class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg p-16 flex flex-col gap-8"
|
|
1378
|
-
}, Rr = { class: "flex gap-8 items-center" }, Or = { class: "ml-auto" },
|
|
1394
|
+
}, Rr = { class: "flex gap-8 items-center" }, Or = { class: "ml-auto" }, Nr = { class: "flex gap-4" }, xr = /* @__PURE__ */ he({
|
|
1379
1395
|
__name: "NetSuitePanel",
|
|
1380
1396
|
props: {
|
|
1381
1397
|
poRequest: {},
|
|
@@ -1384,29 +1400,29 @@ const Ht = { class: "flex flex-row-reverse" }, Gt = /* @__PURE__ */ he({
|
|
|
1384
1400
|
transferToDbName: {},
|
|
1385
1401
|
scope: {}
|
|
1386
1402
|
},
|
|
1387
|
-
setup(
|
|
1388
|
-
const e =
|
|
1389
|
-
var n,
|
|
1390
|
-
const t = ((n = e.transferToDbName) == null ? void 0 : n.startsWith("restaurant")) && ((_ = (
|
|
1391
|
-
return c || i && !t || ((
|
|
1403
|
+
setup(p) {
|
|
1404
|
+
const e = p, a = Et(), b = Pe(), u = Z(() => {
|
|
1405
|
+
var n, h, _, v, m, l, r;
|
|
1406
|
+
const t = ((n = e.transferToDbName) == null ? void 0 : n.startsWith("restaurant")) && ((_ = (h = e.purchaseOrder) == null ? void 0 : h.supplier) == null ? void 0 : _.internal) === "restaurant", c = e.transferType === ye.PURCHASE, i = e.transferType === ye.TRANSFER;
|
|
1407
|
+
return c || i && !t || ((m = (v = e.purchaseOrder) == null ? void 0 : v.netSuite) == null ? void 0 : m.id) || ((r = (l = e.poRequest) == null ? void 0 : l.netSuite) == null ? void 0 : r.id);
|
|
1392
1408
|
});
|
|
1393
1409
|
return (t, c) => {
|
|
1394
|
-
var n,
|
|
1410
|
+
var n, h, _, v, m, l, r, d, w, x;
|
|
1395
1411
|
const i = z("FmMenuDivider");
|
|
1396
|
-
return S(a).isNetSuiteEnabled && u.value ? (g(),
|
|
1412
|
+
return S(a).isNetSuiteEnabled && u.value ? (g(), N("div", wr, [
|
|
1397
1413
|
o("div", Rr, [
|
|
1398
1414
|
c[0] || (c[0] = o("span", { class: "flex-1 fm-typo-en-body-lg-600" }, "NetSuite Info", -1)),
|
|
1399
1415
|
o("div", Or, [
|
|
1400
|
-
o("div",
|
|
1401
|
-
(n = S(
|
|
1416
|
+
o("div", Nr, [
|
|
1417
|
+
(n = S(b).sessionUser.value) != null && n.role.isAdmin && ((_ = (h = e.purchaseOrder) == null ? void 0 : h.netSuite) != null && _.id) ? (g(), oe(Sr, {
|
|
1402
1418
|
key: 0,
|
|
1403
|
-
"netsuite-id": (
|
|
1419
|
+
"netsuite-id": (m = (v = t.purchaseOrder) == null ? void 0 : v.netSuite) == null ? void 0 : m.id,
|
|
1404
1420
|
"purchase-order-id": (l = t.purchaseOrder) == null ? void 0 : l._id
|
|
1405
1421
|
}, null, 8, ["netsuite-id", "purchase-order-id"])) : U("", !0),
|
|
1406
|
-
(
|
|
1422
|
+
(r = S(b).sessionUser.value) != null && r.role.isAdmin ? (g(), oe(mr, {
|
|
1407
1423
|
key: 1,
|
|
1408
|
-
"netsuite-id": (
|
|
1409
|
-
"purchase-order-id": (
|
|
1424
|
+
"netsuite-id": (w = (d = t.purchaseOrder) == null ? void 0 : d.netSuite) == null ? void 0 : w.id,
|
|
1425
|
+
"purchase-order-id": (x = t.purchaseOrder) == null ? void 0 : x._id
|
|
1410
1426
|
}, null, 8, ["netsuite-id", "purchase-order-id"])) : U("", !0),
|
|
1411
1427
|
I(Gt, {
|
|
1412
1428
|
"po-request": t.poRequest,
|
|
@@ -1429,7 +1445,7 @@ const Ht = { class: "flex flex-row-reverse" }, Gt = /* @__PURE__ */ he({
|
|
|
1429
1445
|
])) : U("", !0);
|
|
1430
1446
|
};
|
|
1431
1447
|
}
|
|
1432
|
-
}), kr = { class: "flex flex-col gap-16 w-full h-full" }, Dr = { class: "flex justify-between" }, qr = { class: "fm-typo-en-body-lg-600" },
|
|
1448
|
+
}), kr = { class: "flex flex-col gap-16 w-full h-full" }, Dr = { class: "flex justify-between" }, qr = { class: "fm-typo-en-body-lg-600" }, $r = { class: "flex flex-col gap-8" }, Ar = { class: "flex flex-col gap-4" }, Tr = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Pr = { class: "flex gap-1" }, Cr = { class: "fm-typo-en-body-lg-600" }, Ir = {
|
|
1433
1449
|
key: 0,
|
|
1434
1450
|
class: "flex flex-col gap-4"
|
|
1435
1451
|
}, Fr = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Er = { class: "fm-typo-en-body-lg-600" }, Lr = { class: "flex flex-col gap-4" }, Br = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Vr = { class: "fm-typo-en-body-lg-600" }, Ur = {
|
|
@@ -1462,13 +1478,13 @@ const Ht = { class: "flex flex-row-reverse" }, Gt = /* @__PURE__ */ he({
|
|
|
1462
1478
|
}, ws = { class: "flex-1 flex flex-col items-center" }, Rs = { class: "flex-1 flex flex-col items-center" }, Os = {
|
|
1463
1479
|
class: "py-12 flex flex-col gap-4",
|
|
1464
1480
|
name: "received-at header"
|
|
1465
|
-
},
|
|
1481
|
+
}, Ns = { class: "fm-typo-en-body-lg-400" }, xs = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, ks = { class: "flex gap-12 content-stretch" }, Ds = {
|
|
1466
1482
|
class: "flex flex-col w-24",
|
|
1467
1483
|
name: "circles"
|
|
1468
|
-
}, qs = { class: "flex-1 flex flex-col items-center" },
|
|
1484
|
+
}, qs = { class: "flex-1 flex flex-col items-center" }, $s = {
|
|
1469
1485
|
class: "py-12 flex flex-col gap-4 flex-1",
|
|
1470
1486
|
name: "delivery details"
|
|
1471
|
-
},
|
|
1487
|
+
}, As = { class: "flex flex-col gap-8" }, Ts = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, Ps = { class: "flex flex-col gap-4" }, Cs = { class: "flex gap-8 xs:flex-col" }, Gs = /* @__PURE__ */ he({
|
|
1472
1488
|
__name: "TransferDetails",
|
|
1473
1489
|
props: {
|
|
1474
1490
|
poRequest: {},
|
|
@@ -1482,28 +1498,28 @@ const Ht = { class: "flex flex-row-reverse" }, Gt = /* @__PURE__ */ he({
|
|
|
1482
1498
|
receivedMap: {}
|
|
1483
1499
|
},
|
|
1484
1500
|
emits: ["update:show", "submitted"],
|
|
1485
|
-
setup(
|
|
1486
|
-
const a =
|
|
1501
|
+
setup(p, { emit: e }) {
|
|
1502
|
+
const a = p, b = e, u = je(), t = Ce(), c = Ae(), i = me(), n = Pe(), h = Z(
|
|
1487
1503
|
() => {
|
|
1488
|
-
var
|
|
1504
|
+
var s, f;
|
|
1489
1505
|
return {
|
|
1490
|
-
id: ((
|
|
1491
|
-
name: ((
|
|
1506
|
+
id: ((s = n.sessionUser.value) == null ? void 0 : s.id) ?? "",
|
|
1507
|
+
name: ((f = n.sessionUser.value) == null ? void 0 : f.displayName) ?? ""
|
|
1492
1508
|
};
|
|
1493
1509
|
}
|
|
1494
|
-
), _ = zt(), { t:
|
|
1510
|
+
), _ = zt(), { t: v } = ct(), m = Z(
|
|
1495
1511
|
() => {
|
|
1496
|
-
var
|
|
1497
|
-
return ((
|
|
1512
|
+
var s, f, R, q;
|
|
1513
|
+
return ((f = (s = a.purchaseOrder) == null ? void 0 : s.supplier) == null ? void 0 : f.internal) === "restaurant" || ((q = (R = a.purchaseOrder) == null ? void 0 : R.supplier) == null ? void 0 : q.internal) === "warehouse" ? ye.TRANSFER : ye.PURCHASE;
|
|
1498
1514
|
}
|
|
1499
|
-
), l = M(!1),
|
|
1515
|
+
), l = M(!1), r = M(""), d = M(!0), w = Ie(), x = Ft(w.getWorkflowConfig), E = mt(), A = Z(() => {
|
|
1500
1516
|
if (!a.purchaseOrder)
|
|
1501
1517
|
return [];
|
|
1502
|
-
const
|
|
1503
|
-
if (
|
|
1518
|
+
const s = x.result.value;
|
|
1519
|
+
if (s.state === tt.loading)
|
|
1504
1520
|
return [];
|
|
1505
|
-
const
|
|
1506
|
-
user:
|
|
1521
|
+
const f = {
|
|
1522
|
+
user: h.value,
|
|
1507
1523
|
executedAt: i.locations.computeFirst(
|
|
1508
1524
|
(q) => {
|
|
1509
1525
|
var j;
|
|
@@ -1513,44 +1529,44 @@ const Ht = { class: "flex flex-row-reverse" }, Gt = /* @__PURE__ */ he({
|
|
|
1513
1529
|
purchaseOrderRequest: a.poRequest,
|
|
1514
1530
|
purchaseOrder: a.purchaseOrder
|
|
1515
1531
|
};
|
|
1516
|
-
let
|
|
1532
|
+
let R = [];
|
|
1517
1533
|
try {
|
|
1518
|
-
|
|
1519
|
-
...
|
|
1534
|
+
s.state === tt.error ? (console.error("Error fetching workflow config:", s.error), R = Ee.getAvailableActions({
|
|
1535
|
+
...f,
|
|
1520
1536
|
orderConfig: Ee.getDefaultConfig()
|
|
1521
1537
|
}).actions.filter(
|
|
1522
1538
|
(q) => (
|
|
1523
1539
|
// TODO: create receiveStock & processRequest dialog
|
|
1524
1540
|
// to create their payload
|
|
1525
|
-
q !==
|
|
1541
|
+
q !== O.enum.receiveStock && q !== O.enum.processRequest && q !== O.enum.closeRequest
|
|
1526
1542
|
)
|
|
1527
|
-
)) :
|
|
1528
|
-
...
|
|
1529
|
-
orderConfig:
|
|
1543
|
+
)) : R = Ee.getAvailableActions({
|
|
1544
|
+
...f,
|
|
1545
|
+
orderConfig: s.data
|
|
1530
1546
|
}).actions.filter(
|
|
1531
|
-
(q) => q !==
|
|
1547
|
+
(q) => q !== O.enum.receiveStock && q !== O.enum.processRequest && q !== O.enum.closeRequest
|
|
1532
1548
|
);
|
|
1533
1549
|
} catch (q) {
|
|
1534
1550
|
console.error("Error getting available actions:", q);
|
|
1535
1551
|
}
|
|
1536
|
-
return a.scope === "approval" && (
|
|
1552
|
+
return a.scope === "approval" && (R = R.filter((q) => q !== O.enum.completeReceive)), R;
|
|
1537
1553
|
}), P = Dt(a, "show"), K = Z(() => [
|
|
1538
1554
|
{
|
|
1539
|
-
label:
|
|
1555
|
+
label: v("inventory.transfer.receiveRequest.details.overview"),
|
|
1540
1556
|
value: "overview"
|
|
1541
1557
|
},
|
|
1542
1558
|
{
|
|
1543
|
-
label:
|
|
1559
|
+
label: v("inventory.transfer.receiveRequest.details.deliveryHistory"),
|
|
1544
1560
|
value: "deliveryHistory"
|
|
1545
1561
|
}
|
|
1546
1562
|
]), G = M(K.value[0]);
|
|
1547
1563
|
Ot(
|
|
1548
1564
|
() => a.show,
|
|
1549
|
-
(
|
|
1550
|
-
|
|
1565
|
+
(s) => {
|
|
1566
|
+
s && (G.value = K.value[0]);
|
|
1551
1567
|
}
|
|
1552
1568
|
);
|
|
1553
|
-
async function ce(
|
|
1569
|
+
async function ce(s, f, R, q, j) {
|
|
1554
1570
|
return new Promise((W, ee) => {
|
|
1555
1571
|
u.open({
|
|
1556
1572
|
closeButton: !1,
|
|
@@ -1560,47 +1576,47 @@ const Ht = { class: "flex flex-row-reverse" }, Gt = /* @__PURE__ */ he({
|
|
|
1560
1576
|
secondaryActions: { text: "No", close: !1 }
|
|
1561
1577
|
}).onPrimary(async () => {
|
|
1562
1578
|
var L, Y, Q, F;
|
|
1563
|
-
const
|
|
1564
|
-
|
|
1579
|
+
const y = [];
|
|
1580
|
+
R === O.enum.approveRequest ? (y.push({
|
|
1565
1581
|
action: "approveRequest",
|
|
1566
1582
|
payload: null
|
|
1567
|
-
}),
|
|
1583
|
+
}), f.fulfillment && y.push({
|
|
1568
1584
|
action: "processRequest",
|
|
1569
1585
|
payload: {
|
|
1570
1586
|
fulfillmentId: "",
|
|
1571
1587
|
deliveryOrderNumber: "",
|
|
1572
1588
|
deliveryRemark: null,
|
|
1573
|
-
items:
|
|
1574
|
-
createdBy:
|
|
1589
|
+
items: f.fulfillment.items,
|
|
1590
|
+
createdBy: h.value
|
|
1575
1591
|
}
|
|
1576
|
-
})) :
|
|
1592
|
+
})) : R === O.enum.processRequest ? f.fulfillment && y.push({
|
|
1577
1593
|
action: "processRequest",
|
|
1578
1594
|
payload: {
|
|
1579
1595
|
fulfillmentId: "",
|
|
1580
1596
|
deliveryOrderNumber: "",
|
|
1581
1597
|
deliveryRemark: null,
|
|
1582
|
-
items:
|
|
1583
|
-
createdBy:
|
|
1598
|
+
items: f.fulfillment.items,
|
|
1599
|
+
createdBy: h.value
|
|
1584
1600
|
}
|
|
1585
|
-
}) :
|
|
1601
|
+
}) : R === O.enum.rejectRequest ? y.push({
|
|
1586
1602
|
action: "rejectRequest",
|
|
1587
1603
|
payload: null
|
|
1588
|
-
}) :
|
|
1604
|
+
}) : R === O.enum.closeRequest && y.push({
|
|
1589
1605
|
action: "closeRequest",
|
|
1590
1606
|
payload: null
|
|
1591
1607
|
});
|
|
1592
1608
|
try {
|
|
1593
1609
|
await E({
|
|
1594
1610
|
operate: {
|
|
1595
|
-
operation:
|
|
1596
|
-
doc:
|
|
1597
|
-
options:
|
|
1611
|
+
operation: R,
|
|
1612
|
+
doc: s,
|
|
1613
|
+
options: f
|
|
1598
1614
|
},
|
|
1599
1615
|
operateV2: {
|
|
1600
1616
|
_id: ((L = a.purchaseOrder) == null ? void 0 : L._id) ?? "",
|
|
1601
1617
|
_rev: ((Y = a.purchaseOrder) == null ? void 0 : Y._rev) ?? "",
|
|
1602
|
-
action:
|
|
1603
|
-
payloads:
|
|
1618
|
+
action: R,
|
|
1619
|
+
payloads: y
|
|
1604
1620
|
// add payload if action is receiveStock or processRequest
|
|
1605
1621
|
},
|
|
1606
1622
|
transferTo: (F = (Q = a.poRequest) == null ? void 0 : Q.to) == null ? void 0 : F.dbName
|
|
@@ -1610,35 +1626,35 @@ const Ht = { class: "flex flex-row-reverse" }, Gt = /* @__PURE__ */ he({
|
|
|
1610
1626
|
}
|
|
1611
1627
|
}).onSecondary(() => {
|
|
1612
1628
|
W("cancelled");
|
|
1613
|
-
for (let
|
|
1629
|
+
for (let y = 0; y < j + 2; y++)
|
|
1614
1630
|
u.close();
|
|
1615
1631
|
}).onClose(() => {
|
|
1616
1632
|
});
|
|
1617
1633
|
});
|
|
1618
1634
|
}
|
|
1619
|
-
async function le(
|
|
1620
|
-
var j, W, ee,
|
|
1621
|
-
if (
|
|
1635
|
+
async function le(s) {
|
|
1636
|
+
var j, W, ee, y;
|
|
1637
|
+
if (s === O.enum.receiveStock)
|
|
1622
1638
|
return;
|
|
1623
|
-
const
|
|
1624
|
-
if (!
|
|
1639
|
+
const f = ut[s];
|
|
1640
|
+
if (!f) {
|
|
1625
1641
|
t.open({
|
|
1626
1642
|
title: "Something went wrong",
|
|
1627
|
-
message: `Cannot process order: ${Ke(
|
|
1643
|
+
message: `Cannot process order: ${Ke(s)}`,
|
|
1628
1644
|
type: "error"
|
|
1629
1645
|
});
|
|
1630
1646
|
return;
|
|
1631
1647
|
}
|
|
1632
|
-
const { successMessage:
|
|
1648
|
+
const { successMessage: R, ...q } = f;
|
|
1633
1649
|
if (a.purchaseOrder) {
|
|
1634
|
-
|
|
1650
|
+
r.value = `${s}`, l.value = !0, d.value = !1;
|
|
1635
1651
|
const L = {};
|
|
1636
1652
|
let Y = 0;
|
|
1637
|
-
if ((
|
|
1638
|
-
|
|
1653
|
+
if ((s === O.enum.confirmDraft || // auto receive for warehouse to warehouse
|
|
1654
|
+
s === O.enum.completeReceive) && c.autoReceiveWarehouse)
|
|
1639
1655
|
L.autoReceive = !0;
|
|
1640
|
-
else if ((
|
|
1641
|
-
const Q = (W = (j = a.poRequest) == null ? void 0 : j.from) == null ? void 0 : W.dbName, F = (
|
|
1656
|
+
else if ((s === O.enum.approveRequest || s === O.enum.processRequest) && c.acceptRequireFulfillment) {
|
|
1657
|
+
const Q = (W = (j = a.poRequest) == null ? void 0 : j.from) == null ? void 0 : W.dbName, F = (y = (ee = a.poRequest) == null ? void 0 : ee.to) == null ? void 0 : y.dbName;
|
|
1642
1658
|
if (Q && F && (Q.startsWith("warehouse_") || F.startsWith("warehouse_"))) {
|
|
1643
1659
|
const te = await new Promise((B, de) => {
|
|
1644
1660
|
u.open({
|
|
@@ -1649,7 +1665,7 @@ const Ht = { class: "flex flex-row-reverse" }, Gt = /* @__PURE__ */ he({
|
|
|
1649
1665
|
purchaseOrder: a.purchaseOrder,
|
|
1650
1666
|
confirm: B,
|
|
1651
1667
|
"onUpdate:show": (pe) => {
|
|
1652
|
-
pe || (
|
|
1668
|
+
pe || (r.value = "", l.value = !1, d.value = !0, Y++, u.close()), de("cancelled");
|
|
1653
1669
|
}
|
|
1654
1670
|
}
|
|
1655
1671
|
});
|
|
@@ -1661,103 +1677,103 @@ const Ht = { class: "flex flex-row-reverse" }, Gt = /* @__PURE__ */ he({
|
|
|
1661
1677
|
await ce(
|
|
1662
1678
|
a.purchaseOrder,
|
|
1663
1679
|
L,
|
|
1664
|
-
|
|
1665
|
-
|
|
1680
|
+
s,
|
|
1681
|
+
f,
|
|
1666
1682
|
Y
|
|
1667
1683
|
) === "submitted" && (t.open({
|
|
1668
1684
|
title: "Success",
|
|
1669
|
-
message:
|
|
1685
|
+
message: R,
|
|
1670
1686
|
type: "success"
|
|
1671
|
-
}),
|
|
1687
|
+
}), b("update:show", !1), b("submitted"));
|
|
1672
1688
|
} catch (Q) {
|
|
1673
1689
|
t.open({
|
|
1674
1690
|
title: "Something went wrong",
|
|
1675
1691
|
message: "Please try again.",
|
|
1676
1692
|
type: "error"
|
|
1677
|
-
}), console.error("Error when submitting PO operation",
|
|
1693
|
+
}), console.error("Error when submitting PO operation", s, a.purchaseOrder, Q);
|
|
1678
1694
|
} finally {
|
|
1679
|
-
|
|
1695
|
+
r.value = "", l.value = !1, d.value = !0;
|
|
1680
1696
|
}
|
|
1681
1697
|
}
|
|
1682
1698
|
}
|
|
1683
1699
|
const be = Z(() => {
|
|
1684
|
-
var
|
|
1685
|
-
return ((
|
|
1700
|
+
var s, f;
|
|
1701
|
+
return ((s = a.purchaseOrder) == null ? void 0 : s.status) === ie.enum.RECEIVING || ((f = a.purchaseOrder) == null ? void 0 : f.status) === ie.enum.COMPLETE;
|
|
1686
1702
|
}), Fe = Z(() => {
|
|
1687
|
-
const
|
|
1688
|
-
if (!
|
|
1689
|
-
const
|
|
1690
|
-
return
|
|
1703
|
+
const s = a.purchaseOrder;
|
|
1704
|
+
if (!s) return;
|
|
1705
|
+
const f = ze(s), { partial: R, over: q } = dt(f);
|
|
1706
|
+
return v(`inventory.transfer.status.${ft(s.status, R, q)}`);
|
|
1691
1707
|
}), ue = Z(() => {
|
|
1692
1708
|
var W, ee;
|
|
1693
|
-
const
|
|
1694
|
-
...
|
|
1695
|
-
createdAt:
|
|
1709
|
+
const s = ((W = a.purchaseOrder) == null ? void 0 : W.deliveryOrder) ?? [], f = ((ee = a.purchaseOrder) == null ? void 0 : ee.deliveryFullfillment) ?? [], R = [
|
|
1710
|
+
...s.map((y) => ({
|
|
1711
|
+
createdAt: y.createdAt,
|
|
1696
1712
|
type: "grn",
|
|
1697
|
-
doc:
|
|
1713
|
+
doc: y
|
|
1698
1714
|
})),
|
|
1699
|
-
...
|
|
1700
|
-
createdAt:
|
|
1715
|
+
...f.map((y) => ({
|
|
1716
|
+
createdAt: y.createdAt,
|
|
1701
1717
|
type: "fulfillment",
|
|
1702
|
-
doc:
|
|
1718
|
+
doc: y
|
|
1703
1719
|
}))
|
|
1704
1720
|
];
|
|
1705
|
-
|
|
1706
|
-
function q(
|
|
1721
|
+
R.reverse().sort((y, L) => y.createdAt.localeCompare(L.createdAt));
|
|
1722
|
+
function q(y) {
|
|
1707
1723
|
var Q, F, te, B, de, pe, we, Re, V;
|
|
1708
|
-
const L =
|
|
1709
|
-
(F = (Q =
|
|
1724
|
+
const L = f.findIndex((C) => C.id === y.fullfillmentId), Y = [
|
|
1725
|
+
(F = (Q = f[L]) == null ? void 0 : Q.netSuite) != null && F.refNo ? {
|
|
1710
1726
|
label: "Fulfillment's ref no. (Netsuite)",
|
|
1711
|
-
values: [(B = (te =
|
|
1727
|
+
values: [(B = (te = f[L]) == null ? void 0 : te.netSuite) == null ? void 0 : B.refNo]
|
|
1712
1728
|
} : null,
|
|
1713
|
-
(de =
|
|
1729
|
+
(de = y == null ? void 0 : y.netSuite) != null && de.refNo ? {
|
|
1714
1730
|
label: "Netsuite ref no.",
|
|
1715
|
-
values: [(pe =
|
|
1731
|
+
values: [(pe = y == null ? void 0 : y.netSuite) == null ? void 0 : pe.refNo]
|
|
1716
1732
|
} : null,
|
|
1717
|
-
(we =
|
|
1733
|
+
(we = y == null ? void 0 : y.netSuite) != null && we.recordType ? {
|
|
1718
1734
|
label: "Netsuite Type",
|
|
1719
|
-
values: [ot((Re =
|
|
1735
|
+
values: [ot((Re = y == null ? void 0 : y.netSuite) == null ? void 0 : Re.recordType)]
|
|
1720
1736
|
} : null
|
|
1721
1737
|
];
|
|
1722
1738
|
return {
|
|
1723
1739
|
header: "Received",
|
|
1724
|
-
date: Le(new Date(
|
|
1740
|
+
date: Le(new Date(y.createdAt)),
|
|
1725
1741
|
info: [
|
|
1726
1742
|
{
|
|
1727
1743
|
label: "Adjustment date",
|
|
1728
1744
|
values: [
|
|
1729
|
-
|
|
1745
|
+
y.adjustment ? Le(new Date(St(y.adjustment))) : "-"
|
|
1730
1746
|
]
|
|
1731
1747
|
},
|
|
1732
1748
|
{
|
|
1733
1749
|
label: "Received by",
|
|
1734
|
-
values: [(V =
|
|
1750
|
+
values: [(V = y.createdBy) == null ? void 0 : V.name]
|
|
1735
1751
|
},
|
|
1736
1752
|
{
|
|
1737
1753
|
label: "Received items",
|
|
1738
|
-
values:
|
|
1754
|
+
values: y.received.map((C) => {
|
|
1739
1755
|
var X;
|
|
1740
|
-
return
|
|
1741
|
-
|
|
1756
|
+
return $("div", [
|
|
1757
|
+
$(
|
|
1742
1758
|
"div",
|
|
1743
1759
|
{
|
|
1744
1760
|
class: "flex gap-4"
|
|
1745
1761
|
},
|
|
1746
1762
|
[
|
|
1747
|
-
|
|
1763
|
+
$(
|
|
1748
1764
|
"div",
|
|
1749
1765
|
{
|
|
1750
1766
|
class: "flex flex-col"
|
|
1751
1767
|
},
|
|
1752
1768
|
[
|
|
1753
|
-
|
|
1769
|
+
$(
|
|
1754
1770
|
"span",
|
|
1755
1771
|
{
|
|
1756
1772
|
class: "fm-typo-en-body-lg-800 basis-1/2 shrink-0 grow"
|
|
1757
1773
|
},
|
|
1758
1774
|
`${C.sku.name}`
|
|
1759
1775
|
),
|
|
1760
|
-
|
|
1776
|
+
$(
|
|
1761
1777
|
"span",
|
|
1762
1778
|
{
|
|
1763
1779
|
class: "fm-typo-en-body-md-400"
|
|
@@ -1766,26 +1782,26 @@ const Ht = { class: "flex flex-row-reverse" }, Gt = /* @__PURE__ */ he({
|
|
|
1766
1782
|
)
|
|
1767
1783
|
]
|
|
1768
1784
|
),
|
|
1769
|
-
|
|
1785
|
+
$(
|
|
1770
1786
|
"div",
|
|
1771
1787
|
{
|
|
1772
1788
|
class: "ml-auto flex flex-col"
|
|
1773
1789
|
},
|
|
1774
1790
|
[
|
|
1775
|
-
|
|
1791
|
+
$(
|
|
1776
1792
|
"div",
|
|
1777
1793
|
{
|
|
1778
1794
|
class: "ml-auto flex gap-1"
|
|
1779
1795
|
},
|
|
1780
1796
|
[
|
|
1781
|
-
|
|
1797
|
+
$(
|
|
1782
1798
|
"span",
|
|
1783
1799
|
{
|
|
1784
1800
|
class: "fm-typo-en-body-lg-600 self-end"
|
|
1785
1801
|
},
|
|
1786
1802
|
fe(C.amount, !1)
|
|
1787
1803
|
),
|
|
1788
|
-
|
|
1804
|
+
$(
|
|
1789
1805
|
"span",
|
|
1790
1806
|
{
|
|
1791
1807
|
class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary"
|
|
@@ -1794,12 +1810,12 @@ const Ht = { class: "flex flex-row-reverse" }, Gt = /* @__PURE__ */ he({
|
|
|
1794
1810
|
)
|
|
1795
1811
|
]
|
|
1796
1812
|
),
|
|
1797
|
-
|
|
1813
|
+
$(
|
|
1798
1814
|
"div",
|
|
1799
1815
|
{
|
|
1800
1816
|
class: "flex self-end fm-typo-en-body-md-400 text-fm-color-typo-secondary"
|
|
1801
1817
|
},
|
|
1802
|
-
`${C.cost ? `(${
|
|
1818
|
+
`${C.cost ? `(${xe(C.cost)})` : ""}`
|
|
1803
1819
|
)
|
|
1804
1820
|
]
|
|
1805
1821
|
)
|
|
@@ -1808,13 +1824,13 @@ const Ht = { class: "flex flex-row-reverse" }, Gt = /* @__PURE__ */ he({
|
|
|
1808
1824
|
]);
|
|
1809
1825
|
})
|
|
1810
1826
|
},
|
|
1811
|
-
|
|
1827
|
+
y.deliveryOrderNumber ? {
|
|
1812
1828
|
label: "Delivery order no.",
|
|
1813
|
-
values: [
|
|
1829
|
+
values: [y.deliveryOrderNumber]
|
|
1814
1830
|
} : null,
|
|
1815
|
-
|
|
1831
|
+
y.remark ? {
|
|
1816
1832
|
label: "Remark",
|
|
1817
|
-
values: [
|
|
1833
|
+
values: [y.remark]
|
|
1818
1834
|
} : null,
|
|
1819
1835
|
L > -1 ? {
|
|
1820
1836
|
label: "Fulfilment's sequence",
|
|
@@ -1824,12 +1840,12 @@ const Ht = { class: "flex flex-row-reverse" }, Gt = /* @__PURE__ */ he({
|
|
|
1824
1840
|
].filter((C) => C)
|
|
1825
1841
|
};
|
|
1826
1842
|
}
|
|
1827
|
-
function j(
|
|
1843
|
+
function j(y) {
|
|
1828
1844
|
var Y, Q;
|
|
1829
|
-
const L =
|
|
1845
|
+
const L = f.findIndex((F) => F.id === y.id);
|
|
1830
1846
|
return {
|
|
1831
1847
|
header: "Fulfillment",
|
|
1832
|
-
date: Le(new Date(
|
|
1848
|
+
date: Le(new Date(y.createdAt)),
|
|
1833
1849
|
info: [
|
|
1834
1850
|
{
|
|
1835
1851
|
label: "Sequence",
|
|
@@ -1837,29 +1853,29 @@ const Ht = { class: "flex flex-row-reverse" }, Gt = /* @__PURE__ */ he({
|
|
|
1837
1853
|
},
|
|
1838
1854
|
{
|
|
1839
1855
|
label: "Receiveable items",
|
|
1840
|
-
values:
|
|
1856
|
+
values: y.items.map((F) => {
|
|
1841
1857
|
var te;
|
|
1842
|
-
return
|
|
1843
|
-
|
|
1858
|
+
return $("div", [
|
|
1859
|
+
$(
|
|
1844
1860
|
"div",
|
|
1845
1861
|
{
|
|
1846
1862
|
class: "flex gap-4"
|
|
1847
1863
|
},
|
|
1848
1864
|
[
|
|
1849
|
-
|
|
1865
|
+
$(
|
|
1850
1866
|
"div",
|
|
1851
1867
|
{
|
|
1852
1868
|
class: "flex flex-col"
|
|
1853
1869
|
},
|
|
1854
1870
|
[
|
|
1855
|
-
|
|
1871
|
+
$(
|
|
1856
1872
|
"span",
|
|
1857
1873
|
{
|
|
1858
1874
|
class: "fm-typo-en-body-lg-800 basis-1/2 shrink-0 grow"
|
|
1859
1875
|
},
|
|
1860
1876
|
`${F.sku.name}`
|
|
1861
1877
|
),
|
|
1862
|
-
|
|
1878
|
+
$(
|
|
1863
1879
|
"span",
|
|
1864
1880
|
{
|
|
1865
1881
|
class: "fm-typo-en-body-md-400"
|
|
@@ -1868,26 +1884,26 @@ const Ht = { class: "flex flex-row-reverse" }, Gt = /* @__PURE__ */ he({
|
|
|
1868
1884
|
)
|
|
1869
1885
|
]
|
|
1870
1886
|
),
|
|
1871
|
-
|
|
1887
|
+
$(
|
|
1872
1888
|
"div",
|
|
1873
1889
|
{
|
|
1874
1890
|
class: "ml-auto flex flex-col"
|
|
1875
1891
|
},
|
|
1876
1892
|
[
|
|
1877
|
-
|
|
1893
|
+
$(
|
|
1878
1894
|
"div",
|
|
1879
1895
|
{
|
|
1880
1896
|
class: "ml-auto flex gap-1"
|
|
1881
1897
|
},
|
|
1882
1898
|
[
|
|
1883
|
-
|
|
1899
|
+
$(
|
|
1884
1900
|
"span",
|
|
1885
1901
|
{
|
|
1886
1902
|
class: "fm-typo-en-body-lg-600 self-end"
|
|
1887
1903
|
},
|
|
1888
1904
|
fe(F.amount, !1)
|
|
1889
1905
|
),
|
|
1890
|
-
|
|
1906
|
+
$(
|
|
1891
1907
|
"span",
|
|
1892
1908
|
{
|
|
1893
1909
|
class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary"
|
|
@@ -1896,12 +1912,12 @@ const Ht = { class: "flex flex-row-reverse" }, Gt = /* @__PURE__ */ he({
|
|
|
1896
1912
|
)
|
|
1897
1913
|
]
|
|
1898
1914
|
),
|
|
1899
|
-
|
|
1915
|
+
$(
|
|
1900
1916
|
"div",
|
|
1901
1917
|
{
|
|
1902
1918
|
class: "flex self-end fm-typo-en-body-md-400 text-fm-color-typo-secondary"
|
|
1903
1919
|
},
|
|
1904
|
-
`${F.cost ? `(${
|
|
1920
|
+
`${F.cost ? `(${xe(F.cost)})` : ""}`
|
|
1905
1921
|
)
|
|
1906
1922
|
]
|
|
1907
1923
|
)
|
|
@@ -1910,50 +1926,50 @@ const Ht = { class: "flex flex-row-reverse" }, Gt = /* @__PURE__ */ he({
|
|
|
1910
1926
|
]);
|
|
1911
1927
|
})
|
|
1912
1928
|
},
|
|
1913
|
-
(Y =
|
|
1929
|
+
(Y = y.netSuite) != null && Y.refNo ? {
|
|
1914
1930
|
label: "Ref no. (Netsuite)",
|
|
1915
|
-
values: [(Q =
|
|
1931
|
+
values: [(Q = y.netSuite) == null ? void 0 : Q.refNo]
|
|
1916
1932
|
} : null
|
|
1917
1933
|
].filter((F) => F)
|
|
1918
1934
|
};
|
|
1919
1935
|
}
|
|
1920
|
-
return
|
|
1921
|
-
switch (
|
|
1936
|
+
return R.map((y) => {
|
|
1937
|
+
switch (y.type) {
|
|
1922
1938
|
case "grn":
|
|
1923
|
-
return q(
|
|
1939
|
+
return q(y.doc);
|
|
1924
1940
|
case "fulfillment":
|
|
1925
|
-
return j(
|
|
1941
|
+
return j(y.doc);
|
|
1926
1942
|
}
|
|
1927
1943
|
});
|
|
1928
1944
|
}), k = Z(() => {
|
|
1929
|
-
var
|
|
1930
|
-
const
|
|
1945
|
+
var f;
|
|
1946
|
+
const s = {
|
|
1931
1947
|
...nt(0),
|
|
1932
1948
|
currency: Je()
|
|
1933
1949
|
};
|
|
1934
|
-
return ((
|
|
1935
|
-
...st(
|
|
1950
|
+
return ((f = a.purchaseOrder) == null ? void 0 : f.items.reduce((R, q) => ({
|
|
1951
|
+
...st(R, q.totalCost ?? s),
|
|
1936
1952
|
currency: Je()
|
|
1937
|
-
}),
|
|
1953
|
+
}), s)) ?? s;
|
|
1938
1954
|
});
|
|
1939
|
-
function
|
|
1955
|
+
function T(s) {
|
|
1940
1956
|
var W;
|
|
1941
|
-
const
|
|
1942
|
-
return `<span class="${H(
|
|
1957
|
+
const R = (((W = a.purchaseOrder) == null ? void 0 : W.version) ?? ke.enum[1]) === ke.enum[2] ? s.id : s.sku._id, q = a.receivedMap[R];
|
|
1958
|
+
return `<span class="${H(s)} fm-typo-en-body-lg-600">${wt.toFormatString({ value: q.received })}</span>/${At(s.quantity, s.sku.unit, s.measurement)}`;
|
|
1943
1959
|
}
|
|
1944
|
-
function H(
|
|
1960
|
+
function H(s) {
|
|
1945
1961
|
var L;
|
|
1946
|
-
const
|
|
1947
|
-
return W ? "text-fm-color-typo-tertiary" : j ? "text-fm-color-system-warning-300" : ee ? "text-fm-color-system-error-300" :
|
|
1962
|
+
const R = (((L = a.purchaseOrder) == null ? void 0 : L.version) ?? ke.enum[1]) === ke.enum[2] ? s.id : s.sku._id, q = a.receivedMap[R], { isPartialReceive: j, isNoReceive: W, isOverReceive: ee, isFullReceive: y } = Lt(q);
|
|
1963
|
+
return W ? "text-fm-color-typo-tertiary" : j ? "text-fm-color-system-warning-300" : ee ? "text-fm-color-system-error-300" : y ? "text-fm-color-system-success-300" : "";
|
|
1948
1964
|
}
|
|
1949
|
-
return (
|
|
1965
|
+
return (s, f) => {
|
|
1950
1966
|
var F, te;
|
|
1951
|
-
const
|
|
1967
|
+
const R = z("FmButtonGroup"), q = z("FmChip"), j = z("FmMenuDivider"), W = z("FmCard"), ee = z("FmIcon"), y = z("FmTooltip"), L = z("FmSpacer"), Y = z("FmButton"), Q = z("FmSideSheet");
|
|
1952
1968
|
return g(), oe(Q, {
|
|
1953
|
-
header: S(
|
|
1969
|
+
header: S(v)("inventory.transfer.receiveRequest.details.title") + ((F = s.purchaseOrder) != null && F.seqNumber ? ` #${(te = s.purchaseOrder) == null ? void 0 : te.seqNumber}` : ""),
|
|
1954
1970
|
modelValue: S(P),
|
|
1955
|
-
"onUpdate:modelValue":
|
|
1956
|
-
"dismiss-away":
|
|
1971
|
+
"onUpdate:modelValue": f[5] || (f[5] = (B) => Nt(P) ? P.value = B : null),
|
|
1972
|
+
"dismiss-away": d.value,
|
|
1957
1973
|
"close-button": "",
|
|
1958
1974
|
"max-width": 600
|
|
1959
1975
|
}, {
|
|
@@ -1962,64 +1978,64 @@ const Ht = { class: "flex flex-row-reverse" }, Gt = /* @__PURE__ */ he({
|
|
|
1962
1978
|
return [
|
|
1963
1979
|
o("div", kr, [
|
|
1964
1980
|
o("div", null, [
|
|
1965
|
-
I(
|
|
1981
|
+
I(R, {
|
|
1966
1982
|
items: K.value,
|
|
1967
1983
|
modelValue: G.value,
|
|
1968
|
-
"onUpdate:modelValue":
|
|
1984
|
+
"onUpdate:modelValue": f[0] || (f[0] = (V) => G.value = V)
|
|
1969
1985
|
}, null, 8, ["items", "modelValue"])
|
|
1970
1986
|
]),
|
|
1971
|
-
G.value.value === "overview" ? (g(),
|
|
1987
|
+
G.value.value === "overview" ? (g(), N(se, { key: 0 }, [
|
|
1972
1988
|
o("div", null, [
|
|
1973
1989
|
I(W, {
|
|
1974
1990
|
variant: "outlined",
|
|
1975
1991
|
class: "flex flex-col gap-8 px-12 py-16"
|
|
1976
1992
|
}, {
|
|
1977
1993
|
default: ae(() => {
|
|
1978
|
-
var V, C, X, ge, _e,
|
|
1994
|
+
var V, C, X, ge, _e, Ne, He, Ge, We, Ye, Qe;
|
|
1979
1995
|
return [
|
|
1980
1996
|
o("div", Dr, [
|
|
1981
|
-
o("div", qr, D(S(
|
|
1997
|
+
o("div", qr, D(S(v)("inventory.transfer.receiveRequest.details.requestSummary")), 1),
|
|
1982
1998
|
o("div", null, [
|
|
1983
1999
|
I(q, {
|
|
1984
2000
|
label: Fe.value,
|
|
1985
|
-
class: De(`fm-status-badge fm-status-badge-${(C = (V =
|
|
2001
|
+
class: De(`fm-status-badge fm-status-badge-${(C = (V = s.purchaseOrder) == null ? void 0 : V.status) == null ? void 0 : C.toLocaleLowerCase("en-us")}`),
|
|
1986
2002
|
compact: ""
|
|
1987
2003
|
}, null, 8, ["label", "class"])
|
|
1988
2004
|
])
|
|
1989
2005
|
]),
|
|
1990
2006
|
I(j),
|
|
1991
|
-
o("div",
|
|
1992
|
-
o("div",
|
|
1993
|
-
o("div",
|
|
1994
|
-
o("div", Pr, D(S(
|
|
2007
|
+
o("div", $r, [
|
|
2008
|
+
o("div", Ar, [
|
|
2009
|
+
o("div", Tr, [
|
|
2010
|
+
o("div", Pr, D(S(v)("inventory.transfer.receiveRequest.details.createdAt")), 1)
|
|
1995
2011
|
]),
|
|
1996
|
-
o("div", Cr, D(S(qe)(((X =
|
|
2012
|
+
o("div", Cr, D(S(qe)(((X = s.purchaseOrder) == null ? void 0 : X._id) ?? "")), 1)
|
|
1997
2013
|
]),
|
|
1998
|
-
(ge =
|
|
1999
|
-
o("div", Fr, D(S(
|
|
2000
|
-
o("div", Er, D(S(at)(new Date((_e =
|
|
2014
|
+
(ge = s.purchaseOrder) != null && ge.effectiveAt ? (g(), N("div", Ir, [
|
|
2015
|
+
o("div", Fr, D(S(v)("inventory.transfer.receiveRequest.details.backdatedTo")), 1),
|
|
2016
|
+
o("div", Er, D(S(at)(new Date((_e = s.purchaseOrder) == null ? void 0 : _e.effectiveAt))), 1)
|
|
2001
2017
|
])) : U("", !0),
|
|
2002
2018
|
o("div", Lr, [
|
|
2003
|
-
o("div", Br, D(S(
|
|
2004
|
-
o("div", Vr, D(S(
|
|
2005
|
-
`inventory.transfer.receiveRequest.details.type.${
|
|
2019
|
+
o("div", Br, D(S(v)("inventory.transfer.receiveRequest.details.type.title")), 1),
|
|
2020
|
+
o("div", Vr, D(S(v)(
|
|
2021
|
+
`inventory.transfer.receiveRequest.details.type.${m.value.toLocaleLowerCase("en-US")}`
|
|
2006
2022
|
)), 1)
|
|
2007
2023
|
]),
|
|
2008
|
-
(He = (
|
|
2009
|
-
o("div", Mr, D(S(
|
|
2010
|
-
o("div", Kr, D((We = (Ge =
|
|
2024
|
+
(He = (Ne = s.purchaseOrder) == null ? void 0 : Ne.supplier) != null && He.name ? (g(), N("div", Ur, [
|
|
2025
|
+
o("div", Mr, D(S(v)("inventory.transfer.receiveRequest.details.from")), 1),
|
|
2026
|
+
o("div", Kr, D((We = (Ge = s.purchaseOrder) == null ? void 0 : Ge.supplier) == null ? void 0 : We.name), 1)
|
|
2011
2027
|
])) : U("", !0),
|
|
2012
|
-
|
|
2013
|
-
o("div", zr, D(S(
|
|
2014
|
-
o("div", Hr, D(
|
|
2028
|
+
s.transferTo ? (g(), N("div", jr, [
|
|
2029
|
+
o("div", zr, D(S(v)("inventory.transfer.receiveRequest.details.to")), 1),
|
|
2030
|
+
o("div", Hr, D(s.transferTo), 1)
|
|
2015
2031
|
])) : U("", !0),
|
|
2016
|
-
(Ye =
|
|
2017
|
-
o("div", Wr, D(S(
|
|
2018
|
-
o("div", Yr, D(
|
|
2032
|
+
(Ye = s.purchaseOrder) != null && Ye.ref ? (g(), N("div", Gr, [
|
|
2033
|
+
o("div", Wr, D(S(v)("inventory.transfer.receiveRequest.details.reference")), 1),
|
|
2034
|
+
o("div", Yr, D(s.purchaseOrder.ref), 1)
|
|
2019
2035
|
])) : U("", !0),
|
|
2020
|
-
(Qe =
|
|
2021
|
-
o("div", Xr, D(S(
|
|
2022
|
-
o("div", Zr, D(
|
|
2036
|
+
(Qe = s.purchaseOrder) != null && Qe.remark ? (g(), N("div", Qr, [
|
|
2037
|
+
o("div", Xr, D(S(v)("inventory.transfer.receiveRequest.details.remark")), 1),
|
|
2038
|
+
o("div", Zr, D(s.purchaseOrder.remark), 1)
|
|
2023
2039
|
])) : U("", !0)
|
|
2024
2040
|
])
|
|
2025
2041
|
];
|
|
@@ -2027,19 +2043,19 @@ const Ht = { class: "flex flex-row-reverse" }, Gt = /* @__PURE__ */ he({
|
|
|
2027
2043
|
_: 1
|
|
2028
2044
|
})
|
|
2029
2045
|
]),
|
|
2030
|
-
I(
|
|
2031
|
-
"po-request":
|
|
2032
|
-
purchaseOrder:
|
|
2033
|
-
transferType:
|
|
2034
|
-
transferToDbName:
|
|
2035
|
-
scope:
|
|
2046
|
+
I(xr, {
|
|
2047
|
+
"po-request": s.poRequest,
|
|
2048
|
+
purchaseOrder: s.purchaseOrder,
|
|
2049
|
+
transferType: m.value,
|
|
2050
|
+
transferToDbName: s.transferToDbName,
|
|
2051
|
+
scope: s.scope
|
|
2036
2052
|
}, null, 8, ["po-request", "purchaseOrder", "transferType", "transferToDbName", "scope"]),
|
|
2037
2053
|
o("div", Jr, [
|
|
2038
2054
|
o("div", es, [
|
|
2039
2055
|
o("div", ts, [
|
|
2040
2056
|
o("span", rs, [
|
|
2041
|
-
Be(D(be.value ? S(
|
|
2042
|
-
(de = (B =
|
|
2057
|
+
Be(D(be.value ? S(v)("inventory.transfer.receiveRequest.details.receivedItems") : S(v)("inventory.transfer.receiveRequest.details.requestedItems")) + " ", 1),
|
|
2058
|
+
(de = (B = s.purchaseOrder) == null ? void 0 : B.netSuite) != null && de.missingItems && ((we = (pe = s.purchaseOrder) == null ? void 0 : pe.netSuite) == null ? void 0 : we.missingItems.length) > 0 ? (g(), oe(y, {
|
|
2043
2059
|
key: 0,
|
|
2044
2060
|
variant: "rich",
|
|
2045
2061
|
placement: "top",
|
|
@@ -2049,7 +2065,7 @@ const Ht = { class: "flex flex-row-reverse" }, Gt = /* @__PURE__ */ he({
|
|
|
2049
2065
|
var V, C;
|
|
2050
2066
|
return [
|
|
2051
2067
|
o("div", ss, [
|
|
2052
|
-
(g(!0),
|
|
2068
|
+
(g(!0), N(se, null, ve((C = (V = s.purchaseOrder) == null ? void 0 : V.netSuite) == null ? void 0 : C.missingItems, (X, ge) => (g(), N("div", {
|
|
2053
2069
|
class: "flex justify-center align-middle",
|
|
2054
2070
|
key: ge
|
|
2055
2071
|
}, [
|
|
@@ -2074,9 +2090,9 @@ const Ht = { class: "flex flex-row-reverse" }, Gt = /* @__PURE__ */ he({
|
|
|
2074
2090
|
])
|
|
2075
2091
|
]),
|
|
2076
2092
|
I(j),
|
|
2077
|
-
(g(!0),
|
|
2093
|
+
(g(!0), N(se, null, ve(((Re = s.purchaseOrder) == null ? void 0 : Re.items) ?? [], (V) => {
|
|
2078
2094
|
var C;
|
|
2079
|
-
return g(),
|
|
2095
|
+
return g(), N("div", {
|
|
2080
2096
|
key: V.code,
|
|
2081
2097
|
class: "flex flex-col"
|
|
2082
2098
|
}, [
|
|
@@ -2084,30 +2100,30 @@ const Ht = { class: "flex flex-row-reverse" }, Gt = /* @__PURE__ */ he({
|
|
|
2084
2100
|
o("div", as, D(V.name), 1),
|
|
2085
2101
|
o("div", os, [
|
|
2086
2102
|
o("span", {
|
|
2087
|
-
innerHTML:
|
|
2103
|
+
innerHTML: T(V)
|
|
2088
2104
|
}, null, 8, is)
|
|
2089
2105
|
])
|
|
2090
2106
|
]),
|
|
2091
2107
|
o("div", ls, [
|
|
2092
2108
|
o("div", cs, D(V.code), 1),
|
|
2093
|
-
(C = V.totalCost) != null && C.amount && S(c).enableTotalCost ? (g(),
|
|
2109
|
+
(C = V.totalCost) != null && C.amount && S(c).enableTotalCost ? (g(), N("div", us, " (" + D(S(xe)(V.totalCost)) + ") ", 1)) : U("", !0)
|
|
2094
2110
|
])
|
|
2095
2111
|
]);
|
|
2096
2112
|
}), 128)),
|
|
2097
|
-
+S(fe)(k.value) ? (g(),
|
|
2113
|
+
+S(fe)(k.value) ? (g(), N(se, { key: 0 }, [
|
|
2098
2114
|
o("div", ds, [
|
|
2099
2115
|
I(j)
|
|
2100
2116
|
]),
|
|
2101
2117
|
o("div", fs, [
|
|
2102
|
-
|
|
2103
|
-
o("div", ms, D(S(
|
|
2118
|
+
f[6] || (f[6] = o("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, "Total:", -1)),
|
|
2119
|
+
o("div", ms, D(S(xe)(k.value)), 1)
|
|
2104
2120
|
])
|
|
2105
2121
|
], 64)) : U("", !0)
|
|
2106
2122
|
])
|
|
2107
2123
|
])
|
|
2108
|
-
], 64)) : G.value.value === "deliveryHistory" ? (g(),
|
|
2109
|
-
ue.value.length ? (g(),
|
|
2110
|
-
(g(!0),
|
|
2124
|
+
], 64)) : G.value.value === "deliveryHistory" ? (g(), N("div", ps, [
|
|
2125
|
+
ue.value.length ? (g(), N("div", gs, [
|
|
2126
|
+
(g(!0), N(se, null, ve(ue.value, (V, C) => (g(), N(se, { key: C }, [
|
|
2111
2127
|
o("div", _s, [
|
|
2112
2128
|
o("div", Ss, [
|
|
2113
2129
|
o("div", ws, [
|
|
@@ -2121,7 +2137,7 @@ const Ht = { class: "flex flex-row-reverse" }, Gt = /* @__PURE__ */ he({
|
|
|
2121
2137
|
])
|
|
2122
2138
|
}, null, 2)
|
|
2123
2139
|
]),
|
|
2124
|
-
|
|
2140
|
+
f[7] || (f[7] = o("div", { class: "h-24 w-24 bg-fm-color-primary rounded-full" }, null, -1)),
|
|
2125
2141
|
o("div", Rs, [
|
|
2126
2142
|
o("div", {
|
|
2127
2143
|
class: De([
|
|
@@ -2135,8 +2151,8 @@ const Ht = { class: "flex flex-row-reverse" }, Gt = /* @__PURE__ */ he({
|
|
|
2135
2151
|
])
|
|
2136
2152
|
]),
|
|
2137
2153
|
o("div", Os, [
|
|
2138
|
-
o("div",
|
|
2139
|
-
o("div",
|
|
2154
|
+
o("div", Ns, D(V.header), 1),
|
|
2155
|
+
o("div", xs, D(V.date), 1)
|
|
2140
2156
|
])
|
|
2141
2157
|
]),
|
|
2142
2158
|
o("div", ks, [
|
|
@@ -2153,26 +2169,26 @@ const Ht = { class: "flex flex-row-reverse" }, Gt = /* @__PURE__ */ he({
|
|
|
2153
2169
|
}, null, 2)
|
|
2154
2170
|
])
|
|
2155
2171
|
]),
|
|
2156
|
-
o("div",
|
|
2172
|
+
o("div", $s, [
|
|
2157
2173
|
I(W, {
|
|
2158
2174
|
variant: "outlined",
|
|
2159
2175
|
class: "py-12 px-16"
|
|
2160
2176
|
}, {
|
|
2161
2177
|
default: ae(() => [
|
|
2162
|
-
o("div",
|
|
2163
|
-
(g(!0),
|
|
2178
|
+
o("div", As, [
|
|
2179
|
+
(g(!0), N(se, null, ve(V.info, (X, ge) => (g(), N("div", {
|
|
2164
2180
|
key: ge,
|
|
2165
2181
|
class: "flex flex-col gap-4"
|
|
2166
2182
|
}, [
|
|
2167
|
-
o("div",
|
|
2183
|
+
o("div", Ts, D(X == null ? void 0 : X.label), 1),
|
|
2168
2184
|
o("div", Ps, [
|
|
2169
|
-
(g(!0),
|
|
2170
|
-
key:
|
|
2185
|
+
(g(!0), N(se, null, ve(X == null ? void 0 : X.values, (_e, Ne) => (g(), N("div", {
|
|
2186
|
+
key: Ne,
|
|
2171
2187
|
class: "fm-typo-en-body-lg-600"
|
|
2172
2188
|
}, [
|
|
2173
|
-
typeof _e == "string" ? (g(),
|
|
2189
|
+
typeof _e == "string" ? (g(), N(se, { key: 0 }, [
|
|
2174
2190
|
Be(D(_e), 1)
|
|
2175
|
-
], 64)) : (g(), oe(
|
|
2191
|
+
], 64)) : (g(), oe(xt(_e), { key: 1 }))
|
|
2176
2192
|
]))), 128))
|
|
2177
2193
|
])
|
|
2178
2194
|
]))), 128))
|
|
@@ -2183,16 +2199,16 @@ const Ht = { class: "flex flex-row-reverse" }, Gt = /* @__PURE__ */ he({
|
|
|
2183
2199
|
])
|
|
2184
2200
|
])
|
|
2185
2201
|
], 64))), 128))
|
|
2186
|
-
])) : (g(),
|
|
2202
|
+
])) : (g(), N("div", vs, [
|
|
2187
2203
|
I(L),
|
|
2188
2204
|
o("div", null, [
|
|
2189
2205
|
o("img", {
|
|
2190
|
-
src: S(
|
|
2206
|
+
src: S(Tt),
|
|
2191
2207
|
alt: "List is empty"
|
|
2192
2208
|
}, null, 8, ys)
|
|
2193
2209
|
]),
|
|
2194
|
-
o("div", hs, D(S(
|
|
2195
|
-
o("div", bs, D(S(
|
|
2210
|
+
o("div", hs, D(S(v)("inventory.transfer.receiveRequest.details.noRecordsFound")), 1),
|
|
2211
|
+
o("div", bs, D(S(v)("inventory.transfer.receiveRequest.details.trackDeliveryMessage")), 1),
|
|
2196
2212
|
I(L),
|
|
2197
2213
|
I(L)
|
|
2198
2214
|
]))
|
|
@@ -2202,41 +2218,41 @@ const Ht = { class: "flex flex-row-reverse" }, Gt = /* @__PURE__ */ he({
|
|
|
2202
2218
|
}),
|
|
2203
2219
|
"side-sheet-footer": ae(() => [
|
|
2204
2220
|
o("div", Cs, [
|
|
2205
|
-
(g(!0),
|
|
2221
|
+
(g(!0), N(se, null, ve(A.value, (B) => (g(), N(se, null, [
|
|
2206
2222
|
S(Ue)[B].available != !1 ? (g(), oe(Y, {
|
|
2207
2223
|
key: B,
|
|
2208
|
-
label: S(
|
|
2224
|
+
label: S(v)(S(Ue)[B].translationKey),
|
|
2209
2225
|
onClick: (de) => le(B),
|
|
2210
|
-
loading:
|
|
2211
|
-
disabled:
|
|
2226
|
+
loading: r.value === B,
|
|
2227
|
+
disabled: r.value !== B && l.value,
|
|
2212
2228
|
variant: S(Ue)[B].buttonVariant
|
|
2213
2229
|
}, null, 8, ["label", "onClick", "loading", "disabled", "variant"])) : U("", !0)
|
|
2214
2230
|
], 64))), 256)),
|
|
2215
|
-
S(_).ableToMarkReceived(
|
|
2231
|
+
S(_).ableToMarkReceived(s.purchaseOrder) && !A.value.includes("completeReceive") ? (g(), oe(Y, {
|
|
2216
2232
|
key: 0,
|
|
2217
|
-
label: S(
|
|
2218
|
-
onClick:
|
|
2219
|
-
loading:
|
|
2220
|
-
disabled:
|
|
2233
|
+
label: S(v)("inventory.transfer.receiveRequest.actions.completeReceive"),
|
|
2234
|
+
onClick: f[1] || (f[1] = (B) => le("completeReceive")),
|
|
2235
|
+
loading: r.value === "completeReceive",
|
|
2236
|
+
disabled: r.value !== "completeReceive" && l.value
|
|
2221
2237
|
}, null, 8, ["label", "loading", "disabled"])) : U("", !0),
|
|
2222
|
-
S(_).ableToMarkApproved(
|
|
2238
|
+
S(_).ableToMarkApproved(s.purchaseOrder) && s.canApprove && !A.value.includes("approveRequest") ? (g(), oe(Y, {
|
|
2223
2239
|
key: 1,
|
|
2224
|
-
label: S(
|
|
2225
|
-
onClick:
|
|
2226
|
-
loading:
|
|
2227
|
-
disabled:
|
|
2240
|
+
label: S(v)("inventory.transfer.approval.actions.approveRequest"),
|
|
2241
|
+
onClick: f[2] || (f[2] = (B) => le("approveRequest")),
|
|
2242
|
+
loading: r.value === "approveRequest",
|
|
2243
|
+
disabled: r.value !== "approveRequest" && l.value
|
|
2228
2244
|
}, null, 8, ["label", "loading", "disabled"])) : U("", !0),
|
|
2229
|
-
S(_).ableToCreateFulfillment(
|
|
2245
|
+
S(_).ableToCreateFulfillment(s.purchaseOrder, s.poRequest) && a.scope === "approval" ? (g(), oe(Y, {
|
|
2230
2246
|
key: 2,
|
|
2231
|
-
label: S(
|
|
2232
|
-
onClick:
|
|
2233
|
-
loading:
|
|
2234
|
-
disabled:
|
|
2247
|
+
label: S(v)("inventory.transfer.receiveRequest.actions.processRequest"),
|
|
2248
|
+
onClick: f[3] || (f[3] = (B) => le("processRequest")),
|
|
2249
|
+
loading: r.value === "processRequest",
|
|
2250
|
+
disabled: r.value !== "processRequest" && l.value
|
|
2235
2251
|
}, null, 8, ["label", "loading", "disabled"])) : U("", !0),
|
|
2236
2252
|
I(Y, {
|
|
2237
|
-
label: S(
|
|
2253
|
+
label: S(v)("common.close"),
|
|
2238
2254
|
variant: "tertiary",
|
|
2239
|
-
onClick:
|
|
2255
|
+
onClick: f[4] || (f[4] = (B) => b("update:show", !1))
|
|
2240
2256
|
}, null, 8, ["label"])
|
|
2241
2257
|
])
|
|
2242
2258
|
]),
|