@feedmepos/mf-inventory-portal 1.0.37 → 1.0.38
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-PCcAF8Xv.js → App-Bh_jIWxm.js} +1 -1
- package/dist/{ApprovalView-CAF8rKoi.js → ApprovalView-U-Jo7wyv.js} +2 -2
- package/dist/{BindingsDialog-DwqG0Hsz.js → BindingsDialog-CC0wt6a_.js} +2 -2
- package/dist/{BindingsPicker-Q-I3VeNS.js → BindingsPicker-WL_1lOdc.js} +1 -1
- package/dist/{BindingsTable-Dg9eIaTK.js → BindingsTable-DJf1WJou.js} +1 -1
- package/dist/{ClosingDraftView-wGfktZWC.js → ClosingDraftView-BI19VIT_.js} +2 -2
- package/dist/{ClosingTemplateView-NRHvagkV.js → ClosingTemplateView-B6p83fs1.js} +2 -2
- package/dist/{DeliveryOrderPrintPreview-B0XUNKJb.js → DeliveryOrderPrintPreview-LANZdQE7.js} +1 -1
- package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-Bgof7EWF.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-Bhz1nVO6.js} +3 -3
- package/dist/{FmMultiselectDialog-CzkgAIGY.js → FmMultiselectDialog-B16LNSaK.js} +1 -1
- package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-CgU3fI7R.js → FmUnitInput.vue_vue_type_script_setup_true_lang-pAmapm7v.js} +1 -1
- package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-BJ0tegHR.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-D7wM9EQ2.js} +1 -1
- package/dist/{IngredientGroupView-BcTQ0KqW.js → IngredientGroupView-Bi8657CZ.js} +2 -2
- package/dist/{IngredientsView-Yj3W5zHy.js → IngredientsView-CGEQ-GvW.js} +4 -4
- package/dist/{IntegrationView-JI6kjKNB.js → IntegrationView-mYS_UJlk.js} +4 -4
- package/dist/{InventoryBindingForm-DeEj_xzq.js → InventoryBindingForm-D-Y-IDFl.js} +1 -1
- package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-BaNc5eeK.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-ByFJ6s6U.js} +3 -3
- package/dist/{InventoryBindingSummary-Bipyw3xO.js → InventoryBindingSummary-z6XljZ_R.js} +1 -1
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-BQBjpBNL.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-ihrVnPMe.js} +1 -1
- package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-DPwHQy_S.js → PremiumBadge.vue_vue_type_script_setup_true_lang-DhoXg0vX.js} +1 -1
- package/dist/{PublishView-7XkvtNnX.js → PublishView-DB7j7FkK.js} +2 -2
- package/dist/{PurchaseOrderPrintPreview-eSOFS1g6.js → PurchaseOrderPrintPreview-CTQIzDKp.js} +1 -1
- package/dist/{ReceiveRequestView-BuOj9nZG.js → ReceiveRequestView-B2UDO9o9.js} +9 -9
- package/dist/{RecipeView-Bmgrlys8.js → RecipeView-BIDDh0V9.js} +3 -3
- package/dist/{StockView-By7lUolG.js → StockView-BgzAJBdL.js} +6 -6
- package/dist/{SupplierView-BP4FxIE9.js → SupplierView-zS3HDy59.js} +3 -3
- package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-D7k3PiMo.js → TransferDetails.vue_vue_type_script_setup_true_lang-DhnPjxXG.js} +372 -365
- package/dist/{TransferTemplateView-C6AXtV1p.js → TransferTemplateView-DLS9QAGY.js} +6 -6
- package/dist/{UnitView-CpJT9nbZ.js → UnitView-B8mfgqXO.js} +3 -3
- package/dist/{WarehouseView-bD9WOJAb.js → WarehouseView-D4yYBRSM.js} +1 -1
- package/dist/{app-8I_gNY_C.js → app-BLo-E2P1.js} +1696 -1696
- package/dist/app.js +1 -1
- package/dist/{decimal-XS-oUZ58.js → decimal-u4mLA_2Z.js} +1 -1
- package/dist/{format-unit-display-Bqbyy60P.js → format-unit-display-g_Tq_sk7.js} +2 -2
- package/dist/{index-CxWZtTgh.js → index-BbBtmjWx.js} +1 -1
- package/dist/{index-ByjAx-mG.js → index-Bu2R1xRv.js} +1 -1
- package/dist/{stock-Di0sHyh2.js → stock-BxIuAFed.js} +1 -1
- package/dist/{supplier-BOti7LMg.js → supplier-CQftkZPG.js} +1 -1
- package/dist/{use-ingredient-select-dialog-DHNa-mhW.js → use-ingredient-select-dialog-C9I7bja9.js} +1 -1
- package/dist/{use-inventory-binding-dialog-CvyHpZHX.js → use-inventory-binding-dialog-s8nyBhfo.js} +1 -1
- package/dist/views/receive-request/components/netsuite/NetSuiteLog.vue.d.ts +2 -2
- package/dist/{vue-i18n-y6eJldrX.js → vue-i18n-C3CYm8Dg.js} +221 -221
- package/package.json +3 -3
|
@@ -1,69 +1,69 @@
|
|
|
1
|
-
import { a3 as lt, u as de, aN as O, c as De, b as qe, a8 as ct, aa as ut, ab as dt, aO as mt, e as Ye, f as et, a0 as Ve, aP as ft, a5 as Le, T as ke, j as ie, aQ as pt, aR as tt, af as xe, h as Qe, i as J, D as re, aw as ue, aS as rt, aT as st, aU as Pe, a9 as yt, au as Xe, a7 as Oe, ak as Ie, ax as vt } from "./app-
|
|
2
|
-
import { ref as M, computed as Z, h as A, defineComponent as pe, reactive as ht, onMounted as nt, resolveComponent as
|
|
3
|
-
import { F as St } from "./decimal-
|
|
1
|
+
import { a3 as lt, u as de, aN as O, c as De, b as qe, a8 as ct, aa as ut, ab as dt, aO as mt, e as Ye, f as et, a0 as Ve, aP as ft, a5 as Le, T as ke, j as ie, aQ as pt, aR as tt, af as xe, h as Qe, i as J, D as re, aw as ue, aS as rt, aT as st, aU as Pe, a9 as yt, au as Xe, a7 as Oe, ak as Ie, ax as vt } from "./app-BLo-E2P1.js";
|
|
2
|
+
import { ref as M, computed as Z, h as A, defineComponent as pe, reactive as ht, onMounted as nt, resolveComponent as K, openBlock as b, createBlock as ae, withCtx as se, createElementVNode as n, createVNode as I, unref as h, createElementBlock as N, toDisplayString as k, createCommentVNode as V, Fragment as te, renderList as me, watch as bt, isRef as gt, normalizeClass as Ne, createTextVNode as Fe, resolveDynamicComponent as _t } from "vue";
|
|
3
|
+
import { F as St } from "./decimal-u4mLA_2Z.js";
|
|
4
4
|
import { useCoreStore as Ae, useI18n as at } from "@feedmepos/mf-common";
|
|
5
|
-
import { b as wt, u as Rt, P as fe, f as Ot } from "./format-unit-display-
|
|
5
|
+
import { b as wt, u as Rt, P as fe, f as Ot } from "./format-unit-display-g_Tq_sk7.js";
|
|
6
6
|
import { E as Nt } from "./empty-placeholder-wf6-BWE8.js";
|
|
7
7
|
import { useDialog as Me, useSnackbar as Te, components as Je, FmButtonVariant as ee, useProxiedModel as kt } from "@feedmepos/ui-library";
|
|
8
|
-
import { _ as xt, F as Dt, a as qt } from "./FmUnitInput.vue_vue_type_script_setup_true_lang-
|
|
8
|
+
import { _ as xt, F as Dt, a as qt } from "./FmUnitInput.vue_vue_type_script_setup_true_lang-pAmapm7v.js";
|
|
9
9
|
import { u as At, R as Ze } from "./usePromise-CbVUCxhj.js";
|
|
10
|
-
import { u as Tt } from "./index-
|
|
11
|
-
const $e = lt((
|
|
12
|
-
const i = de(),
|
|
10
|
+
import { u as Tt } from "./index-Bu2R1xRv.js";
|
|
11
|
+
const $e = lt((S, e) => {
|
|
12
|
+
const i = de(), _ = Ae();
|
|
13
13
|
return {
|
|
14
14
|
async readRequests(d, t, l) {
|
|
15
|
-
const
|
|
15
|
+
const a = d ?? i.currentLocationDBName, s = `${S.inventoryBackendUrl}/${a}/purchase-request`;
|
|
16
16
|
return t && l ? await e.get(`${s}?startDate=${t}&endDate=${l}`) : await e.get(s);
|
|
17
17
|
},
|
|
18
18
|
async readRequestById(d, t) {
|
|
19
|
-
const l = t ?? i.currentLocationDBName,
|
|
20
|
-
return await e.get(
|
|
19
|
+
const l = t ?? i.currentLocationDBName, a = `${S.inventoryBackendUrl}/${l}/purchase-request/${d}`;
|
|
20
|
+
return await e.get(a);
|
|
21
21
|
},
|
|
22
22
|
async readRequestByIds(d, t) {
|
|
23
|
-
const l = t ?? i.currentLocationDBName,
|
|
24
|
-
return await e.post(
|
|
23
|
+
const l = t ?? i.currentLocationDBName, a = `${S.inventoryBackendUrl}/${l}/purchase-request/find`;
|
|
24
|
+
return await e.post(a, { requestIds: d });
|
|
25
25
|
},
|
|
26
26
|
async getPurchaseOrders({
|
|
27
27
|
start: d,
|
|
28
28
|
end: t
|
|
29
29
|
}) {
|
|
30
|
-
const l = i.currentLocationDBName,
|
|
31
|
-
return await e.get(`${
|
|
30
|
+
const l = i.currentLocationDBName, a = `${S.inventoryBackendUrl}/${l}/purchase-order`;
|
|
31
|
+
return await e.get(`${a}?start=${d}&end=${t}`);
|
|
32
32
|
},
|
|
33
33
|
async getLatestPurchaseOrderRequest(d) {
|
|
34
|
-
const t = i.currentLocationDBName, l = `${
|
|
34
|
+
const t = i.currentLocationDBName, l = `${S.inventoryBackendUrl}/${t}/purchase-request/find-by-purchase-order-id`;
|
|
35
35
|
return await e.get(`${l}/${d}`);
|
|
36
36
|
},
|
|
37
37
|
async getPurchaseOrderById(d) {
|
|
38
|
-
const t = i.currentLocationDBName, l = `${
|
|
38
|
+
const t = i.currentLocationDBName, l = `${S.inventoryBackendUrl}/${t}/purchase-order`;
|
|
39
39
|
return await e.get(`${l}/${d}`);
|
|
40
40
|
},
|
|
41
41
|
/**
|
|
42
42
|
* @deprecated Use `processPurchaseOrderV2` instead.
|
|
43
43
|
*/
|
|
44
44
|
async processPurchaseOrder(d, t) {
|
|
45
|
-
const l = i.currentLocationDBName,
|
|
45
|
+
const l = i.currentLocationDBName, a = t || l, s = `${S.inventoryBackendUrl}/${a}/purchase-order/run-operation`;
|
|
46
46
|
return await e.put(s, d);
|
|
47
47
|
},
|
|
48
48
|
async createPurchaseOrder(d) {
|
|
49
|
-
const t = i.currentLocationDBName, l = `${
|
|
49
|
+
const t = i.currentLocationDBName, l = `${S.inventoryBackendUrl}/${t}/purchase-order`;
|
|
50
50
|
return await e.post(l, d);
|
|
51
51
|
},
|
|
52
52
|
async updatePurchaseOrder(d) {
|
|
53
|
-
const t = i.currentLocationDBName, l = `${
|
|
53
|
+
const t = i.currentLocationDBName, l = `${S.inventoryBackendUrl}/${t}/purchase-order`;
|
|
54
54
|
return await e.put(l, d);
|
|
55
55
|
},
|
|
56
56
|
async importFromXilnex(d) {
|
|
57
|
-
const t = i.currentLocationDBName, l = `${
|
|
57
|
+
const t = i.currentLocationDBName, l = `${S.inventoryBackendUrl}/${t}/purchase-order/import-from-xilnex`;
|
|
58
58
|
return await e.post(l, d);
|
|
59
59
|
},
|
|
60
60
|
async processPurchaseOrderV2(d, t) {
|
|
61
|
-
const l = i.currentLocationDBName,
|
|
61
|
+
const l = i.currentLocationDBName, a = t || l, s = `${S.inventoryBackendUrl}/${a}/v2/purchase-order/run-operation`;
|
|
62
62
|
return await e.put(s, d);
|
|
63
63
|
},
|
|
64
64
|
async getWorkflowConfig() {
|
|
65
|
-
var
|
|
66
|
-
const t = `business_${(
|
|
65
|
+
var a;
|
|
66
|
+
const t = `business_${(a = _.currentBusiness.value) == null ? void 0 : a._id}`, l = `${S.inventoryBackendUrl}/${t}/v2/purchase-order/workflow-config`;
|
|
67
67
|
return await e.get(l);
|
|
68
68
|
}
|
|
69
69
|
};
|
|
@@ -136,23 +136,23 @@ const $e = lt((_, e) => {
|
|
|
136
136
|
}
|
|
137
137
|
};
|
|
138
138
|
function it() {
|
|
139
|
-
const
|
|
140
|
-
async function
|
|
141
|
-
const
|
|
142
|
-
return t.doc.supplier.internal && t.operation === O.enum.confirmDraft && (t.operation = O.enum.submitRequest), await e.processPurchaseOrder(t, l ||
|
|
139
|
+
const S = de(), e = $e(), i = De();
|
|
140
|
+
async function _(t, l) {
|
|
141
|
+
const a = S.currentLocationDBName;
|
|
142
|
+
return t.doc.supplier.internal && t.operation === O.enum.confirmDraft && (t.operation = O.enum.submitRequest), await e.processPurchaseOrder(t, l || a);
|
|
143
143
|
}
|
|
144
144
|
async function d(t, l) {
|
|
145
|
-
const
|
|
146
|
-
return await e.processPurchaseOrderV2(t, l ||
|
|
145
|
+
const a = S.currentLocationDBName;
|
|
146
|
+
return await e.processPurchaseOrderV2(t, l || a);
|
|
147
147
|
}
|
|
148
|
-
return (t) => i.useOperatePurchaseOrderV2 ? d(t.operateV2, t.transferTo) :
|
|
148
|
+
return (t) => i.useOperatePurchaseOrderV2 ? d(t.operateV2, t.transferTo) : _(t.operate, t.transferTo);
|
|
149
149
|
}
|
|
150
|
-
var Ue = /* @__PURE__ */ ((
|
|
150
|
+
var Ue = /* @__PURE__ */ ((S) => (S.RECEIVE_REQUEST = "receive/request", S.APPROVAL = "approval", S))(Ue || {});
|
|
151
151
|
const we = M(), Be = M();
|
|
152
|
-
function Bs(
|
|
153
|
-
const i = Me(),
|
|
152
|
+
function Bs(S, e) {
|
|
153
|
+
const i = Me(), _ = de(), d = De();
|
|
154
154
|
qe();
|
|
155
|
-
const t = wt(), l = Rt(),
|
|
155
|
+
const t = wt(), l = Rt(), a = M(!1), s = Te(), y = $e(), g = M(new Array()), f = M(
|
|
156
156
|
e != null && e.startDate && (e != null && e.endDate) ? e : ct()
|
|
157
157
|
), c = Z(() => {
|
|
158
158
|
const x = new Date(f.value.startDate), r = new Date(f.value.endDate);
|
|
@@ -167,8 +167,8 @@ function Bs(_, e) {
|
|
|
167
167
|
mode: Ye.CREATE,
|
|
168
168
|
modelValue: x || void 0,
|
|
169
169
|
show: !0,
|
|
170
|
-
"onUpdate:show"(
|
|
171
|
-
we.value.show =
|
|
170
|
+
"onUpdate:show"(T) {
|
|
171
|
+
we.value.show = T;
|
|
172
172
|
},
|
|
173
173
|
templateId: R,
|
|
174
174
|
lastClosingDate: v.value
|
|
@@ -206,13 +206,13 @@ function Bs(_, e) {
|
|
|
206
206
|
};
|
|
207
207
|
we.value = r;
|
|
208
208
|
}
|
|
209
|
-
async function
|
|
210
|
-
|
|
209
|
+
async function Y() {
|
|
210
|
+
g.value = [], a.value = !0;
|
|
211
211
|
try {
|
|
212
|
-
|
|
212
|
+
g.value = await y.getPurchaseOrders(c.value).then((R) => R.sort((w, T) => T._id.localeCompare(w._id)));
|
|
213
213
|
const x = await o.readCurrentLocationLastClosing(!0), r = x == null ? void 0 : x._id;
|
|
214
214
|
r && (v.value = ft(r)), await d.awaitFeatureLoaded(() => d.mustUsePoTemplate) && await l.fetchTemplates();
|
|
215
|
-
const m =
|
|
215
|
+
const m = g.value.map((R) => {
|
|
216
216
|
var w;
|
|
217
217
|
return ((w = R.request) == null ? void 0 : w.id) ?? "";
|
|
218
218
|
}).filter((R) => R);
|
|
@@ -224,11 +224,11 @@ function Bs(_, e) {
|
|
|
224
224
|
type: "error"
|
|
225
225
|
});
|
|
226
226
|
} finally {
|
|
227
|
-
|
|
227
|
+
a.value = !1;
|
|
228
228
|
}
|
|
229
229
|
}
|
|
230
|
-
async function
|
|
231
|
-
u.value = [],
|
|
230
|
+
async function C() {
|
|
231
|
+
u.value = [], a.value = !0;
|
|
232
232
|
try {
|
|
233
233
|
u.value = await y.readRequests(
|
|
234
234
|
void 0,
|
|
@@ -242,54 +242,54 @@ function Bs(_, e) {
|
|
|
242
242
|
type: "error"
|
|
243
243
|
});
|
|
244
244
|
} finally {
|
|
245
|
-
|
|
245
|
+
a.value = !1;
|
|
246
246
|
}
|
|
247
247
|
}
|
|
248
248
|
function F() {
|
|
249
|
-
switch (
|
|
249
|
+
switch (S) {
|
|
250
250
|
case "receive/request":
|
|
251
|
-
return
|
|
251
|
+
return Y();
|
|
252
252
|
case "approval":
|
|
253
|
-
return
|
|
253
|
+
return C();
|
|
254
254
|
}
|
|
255
255
|
}
|
|
256
|
-
function
|
|
256
|
+
function j(x, r) {
|
|
257
257
|
f.value = {
|
|
258
258
|
startDate: x,
|
|
259
259
|
endDate: r
|
|
260
260
|
}, F();
|
|
261
261
|
}
|
|
262
|
-
|
|
262
|
+
_.watchLocation(async (x) => {
|
|
263
263
|
if (!x) {
|
|
264
|
-
|
|
264
|
+
g.value = [];
|
|
265
265
|
return;
|
|
266
266
|
}
|
|
267
267
|
await F();
|
|
268
268
|
});
|
|
269
|
-
const
|
|
269
|
+
const H = M(), le = M(Math.random().toString());
|
|
270
270
|
async function oe(x, r) {
|
|
271
271
|
const m = Math.random().toString();
|
|
272
272
|
le.value = m, r ?? (r = u.value.computeFirst(
|
|
273
|
-
(
|
|
273
|
+
(T) => T.purchaseOrderId === x._id ? T : null
|
|
274
274
|
) ?? void 0);
|
|
275
|
-
const R =
|
|
275
|
+
const R = S === "receive/request" ? _.currentLocation : r == null ? void 0 : r.to, w = {
|
|
276
276
|
poRequest: r,
|
|
277
277
|
purchaseOrder: x,
|
|
278
278
|
transferTo: R == null ? void 0 : R.name,
|
|
279
279
|
transferToDbName: R == null ? void 0 : R.dbName,
|
|
280
280
|
show: !0,
|
|
281
281
|
canResubmit: !1,
|
|
282
|
-
canApprove:
|
|
283
|
-
"onUpdate:show"(
|
|
284
|
-
|
|
282
|
+
canApprove: S === "approval",
|
|
283
|
+
"onUpdate:show"(T) {
|
|
284
|
+
H.value.show = T;
|
|
285
285
|
},
|
|
286
|
-
scope:
|
|
286
|
+
scope: S
|
|
287
287
|
};
|
|
288
|
-
|
|
288
|
+
H.value = w;
|
|
289
289
|
}
|
|
290
290
|
async function ye(x, r, m, R) {
|
|
291
291
|
const w = it();
|
|
292
|
-
|
|
292
|
+
a.value = !0;
|
|
293
293
|
try {
|
|
294
294
|
await w({
|
|
295
295
|
operate: {
|
|
@@ -311,8 +311,8 @@ function Bs(_, e) {
|
|
|
311
311
|
},
|
|
312
312
|
transferTo: R
|
|
313
313
|
}), await new Promise((Q) => setTimeout(Q, 1e3));
|
|
314
|
-
const
|
|
315
|
-
r === O.enum.confirmDraft && x.effectiveAt &&
|
|
314
|
+
const G = de().currentLocationDBName.startsWith("restaurant_");
|
|
315
|
+
r === O.enum.confirmDraft && x.effectiveAt && G ? s.open({
|
|
316
316
|
title: "Success",
|
|
317
317
|
message: `${m}. The backdate will be reflected once your POS has received this change.`,
|
|
318
318
|
type: "success"
|
|
@@ -321,14 +321,14 @@ function Bs(_, e) {
|
|
|
321
321
|
message: m,
|
|
322
322
|
type: "success"
|
|
323
323
|
});
|
|
324
|
-
} catch (
|
|
324
|
+
} catch (T) {
|
|
325
325
|
s.open({
|
|
326
326
|
title: "Something went wrong",
|
|
327
327
|
message: "Please try again.",
|
|
328
328
|
type: "error"
|
|
329
|
-
}), console.error("Error when submitting PO operation", r, x,
|
|
329
|
+
}), console.error("Error when submitting PO operation", r, x, T);
|
|
330
330
|
} finally {
|
|
331
|
-
|
|
331
|
+
a.value = !1, F();
|
|
332
332
|
}
|
|
333
333
|
}
|
|
334
334
|
async function Ce(x, r, m) {
|
|
@@ -341,11 +341,11 @@ function Bs(_, e) {
|
|
|
341
341
|
});
|
|
342
342
|
return;
|
|
343
343
|
}
|
|
344
|
-
const { successMessage: w,
|
|
344
|
+
const { successMessage: w, ...T } = R;
|
|
345
345
|
i.open({
|
|
346
|
-
title:
|
|
347
|
-
message:
|
|
348
|
-
primaryActions:
|
|
346
|
+
title: T.title,
|
|
347
|
+
message: T.message,
|
|
348
|
+
primaryActions: T.primaryActions
|
|
349
349
|
}).onPrimary(() => {
|
|
350
350
|
ye(x, r, w, m);
|
|
351
351
|
});
|
|
@@ -372,41 +372,41 @@ function Bs(_, e) {
|
|
|
372
372
|
});
|
|
373
373
|
}
|
|
374
374
|
return {
|
|
375
|
-
purchaseOrders:
|
|
375
|
+
purchaseOrders: g,
|
|
376
376
|
purchaseRequests: u,
|
|
377
|
-
updateDateRange:
|
|
377
|
+
updateDateRange: j,
|
|
378
378
|
fetchData: F,
|
|
379
|
-
loading:
|
|
379
|
+
loading: a,
|
|
380
380
|
transferDialogProps: we,
|
|
381
381
|
promptCreateTransferDialog: D,
|
|
382
382
|
promptUpdateTransferDialog: q,
|
|
383
|
-
transferDetailsProps:
|
|
383
|
+
transferDetailsProps: H,
|
|
384
384
|
promptShowTransferDetails: oe,
|
|
385
385
|
submitAction: Ce,
|
|
386
386
|
xilnexImportDialogProps: Be,
|
|
387
387
|
promptUploadTransferDialog: ce
|
|
388
388
|
};
|
|
389
389
|
}
|
|
390
|
-
function $t(
|
|
390
|
+
function $t(S, e) {
|
|
391
391
|
return e.reduce(
|
|
392
|
-
(
|
|
393
|
-
const t = d.received.find((l) => l.sku._id ===
|
|
394
|
-
return t && (
|
|
392
|
+
(_, d) => {
|
|
393
|
+
const t = d.received.find((l) => l.sku._id === S._id);
|
|
394
|
+
return t && (_ = Le(_, t.amount)), _;
|
|
395
395
|
},
|
|
396
|
-
St.toPrecision(ke(0),
|
|
396
|
+
St.toPrecision(ke(0), S.unit.precision)
|
|
397
397
|
);
|
|
398
398
|
}
|
|
399
|
-
function Ct(
|
|
400
|
-
const { po: e, currentLocation: i, business:
|
|
399
|
+
function Ct(S) {
|
|
400
|
+
const { po: e, currentLocation: i, business: _, fulfilling: d, por: t } = S, { name: l, address: a, regNo: s } = i.doc.profile, y = {
|
|
401
401
|
name: l,
|
|
402
402
|
registrationNumber: s,
|
|
403
|
-
line1:
|
|
404
|
-
line2:
|
|
405
|
-
postcode:
|
|
406
|
-
city:
|
|
407
|
-
state:
|
|
408
|
-
country:
|
|
409
|
-
},
|
|
403
|
+
line1: a == null ? void 0 : a.line1,
|
|
404
|
+
line2: a == null ? void 0 : a.line2,
|
|
405
|
+
postcode: a == null ? void 0 : a.postcode,
|
|
406
|
+
city: a == null ? void 0 : a.city,
|
|
407
|
+
state: a == null ? void 0 : a.state,
|
|
408
|
+
country: a == null ? void 0 : a.country
|
|
409
|
+
}, g = {
|
|
410
410
|
name: e.supplier.name,
|
|
411
411
|
phoneNumber: e.supplier.phoneNumber,
|
|
412
412
|
registrationNumber: e.supplier.registrationNumber,
|
|
@@ -416,32 +416,32 @@ function Ct(_) {
|
|
|
416
416
|
city: e.supplier.address.city,
|
|
417
417
|
state: e.supplier.address.state,
|
|
418
418
|
country: e.supplier.address.country
|
|
419
|
-
}, f = e.items.map((
|
|
420
|
-
const { sku: F, measurement:
|
|
421
|
-
$t(
|
|
419
|
+
}, f = e.items.map((C) => {
|
|
420
|
+
const { sku: F, measurement: j } = C, H = ie(
|
|
421
|
+
$t(C.sku, e.deliveryOrder || []),
|
|
422
422
|
!1
|
|
423
423
|
);
|
|
424
424
|
return {
|
|
425
425
|
code: F.code,
|
|
426
426
|
description: F.name,
|
|
427
|
-
quantity: ie(
|
|
428
|
-
unit: (
|
|
429
|
-
received:
|
|
430
|
-
cost:
|
|
431
|
-
value:
|
|
427
|
+
quantity: ie(C.quantity, !1),
|
|
428
|
+
unit: (j == null ? void 0 : j.abbrev) || F.unit.abbrev,
|
|
429
|
+
received: H,
|
|
430
|
+
cost: C.totalCost ? `${C.totalCost.currency} ${pt.toFormatString({
|
|
431
|
+
value: C.totalCost
|
|
432
432
|
})}` : void 0
|
|
433
433
|
};
|
|
434
|
-
}), c = e.deliveryOrder.map((
|
|
435
|
-
createdAt: tt(new Date(
|
|
436
|
-
ref:
|
|
437
|
-
remark:
|
|
438
|
-
items:
|
|
439
|
-
var
|
|
434
|
+
}), c = e.deliveryOrder.map((C) => ({
|
|
435
|
+
createdAt: tt(new Date(C.createdAt)),
|
|
436
|
+
ref: C.deliveryOrderNumber,
|
|
437
|
+
remark: C.remark || "",
|
|
438
|
+
items: C.received.map((F) => {
|
|
439
|
+
var j;
|
|
440
440
|
return {
|
|
441
441
|
code: F.sku.code,
|
|
442
442
|
description: F.sku.name,
|
|
443
443
|
quantity: ie(F.amount),
|
|
444
|
-
unit: ((
|
|
444
|
+
unit: ((j = F.measurement) == null ? void 0 : j.abbrev) || F.sku.unit.abbrev
|
|
445
445
|
};
|
|
446
446
|
})
|
|
447
447
|
})), u = [
|
|
@@ -451,25 +451,25 @@ function Ct(_) {
|
|
|
451
451
|
"6880b36a3054c5001db19218"
|
|
452
452
|
];
|
|
453
453
|
let o = "Inventory Receive Note";
|
|
454
|
-
if (e.supplier.internal ? (o = "Inventory Transfer Note", u.includes((
|
|
455
|
-
const
|
|
456
|
-
i.dbName ===
|
|
454
|
+
if (e.supplier.internal ? (o = "Inventory Transfer Note", u.includes((_ == null ? void 0 : _._id) || "") && (o = "Stock Request")) : o = "Purchase Order", t) {
|
|
455
|
+
const C = t.from.dbName;
|
|
456
|
+
i.dbName === C || (o = "Inventory Receive Note");
|
|
457
457
|
}
|
|
458
458
|
const D = {
|
|
459
459
|
title: o,
|
|
460
|
-
businessName:
|
|
461
|
-
logo:
|
|
460
|
+
businessName: _ == null ? void 0 : _.name,
|
|
461
|
+
logo: _ == null ? void 0 : _.thumbnail,
|
|
462
462
|
orderNumber: e.seqNumber.toString(),
|
|
463
463
|
createdAt: xe(e._id),
|
|
464
464
|
ref: e.ref || "",
|
|
465
465
|
remark: e.remark || "",
|
|
466
466
|
buyer: y,
|
|
467
|
-
supplier:
|
|
467
|
+
supplier: g,
|
|
468
468
|
items: f,
|
|
469
469
|
status: e.status,
|
|
470
470
|
deliveryOrders: c
|
|
471
|
-
}, q = new URL(window.location.href),
|
|
472
|
-
q.pathname = q.hostname.includes("portal.feedme") ? `/inventory/${
|
|
471
|
+
}, q = new URL(window.location.href), Y = d && (e.deliveryFullfillment || []).length > 0 ? "receive-request/delivery-print-preview" : "receive-request/print-preview";
|
|
472
|
+
q.pathname = q.hostname.includes("portal.feedme") ? `/inventory/${Y}` : `/${Y}`, q.searchParams.append("data", JSON.stringify(D)), window.open(q.href, "_blank", "noreferrer");
|
|
473
473
|
}
|
|
474
474
|
const be = {
|
|
475
475
|
submitRequest: {
|
|
@@ -533,8 +533,8 @@ const be = {
|
|
|
533
533
|
value: O.enum.returnStock
|
|
534
534
|
}
|
|
535
535
|
};
|
|
536
|
-
function Es(
|
|
537
|
-
const i = de(),
|
|
536
|
+
function Es(S, e) {
|
|
537
|
+
const i = de(), _ = qe(), d = Ae(), { t } = at();
|
|
538
538
|
function l(c) {
|
|
539
539
|
switch (c.status) {
|
|
540
540
|
case "DRAFT":
|
|
@@ -551,7 +551,7 @@ function Es(_, e) {
|
|
|
551
551
|
re[J.Print]
|
|
552
552
|
];
|
|
553
553
|
case "REQUESTING":
|
|
554
|
-
return
|
|
554
|
+
return S === "receive/request" ? [re[J.Details], re[J.Print]] : [
|
|
555
555
|
be[O.enum.approveRequest],
|
|
556
556
|
be[O.enum.rejectRequest],
|
|
557
557
|
re[J.Details]
|
|
@@ -565,19 +565,19 @@ function Es(_, e) {
|
|
|
565
565
|
return [re[J.Details], re[J.Print]];
|
|
566
566
|
}
|
|
567
567
|
}
|
|
568
|
-
function
|
|
568
|
+
function a(c) {
|
|
569
569
|
return Object.values(O.enum).includes(c);
|
|
570
570
|
}
|
|
571
571
|
async function s(c, u, o) {
|
|
572
|
-
var D, q,
|
|
572
|
+
var D, q, Y, C, F, j;
|
|
573
573
|
const v = et(u);
|
|
574
574
|
if (c === J.Print) {
|
|
575
|
-
const
|
|
576
|
-
((D = o == null ? void 0 : o.netSuite) != null && D.refNo || (q = v.netSuite) != null && q.refNo) && (v.ref = [((
|
|
575
|
+
const H = (o == null ? void 0 : o.toInventoryLocation) ?? i.currentLocation;
|
|
576
|
+
((D = o == null ? void 0 : o.netSuite) != null && D.refNo || (q = v.netSuite) != null && q.refNo) && (v.ref = [((Y = o == null ? void 0 : o.netSuite) == null ? void 0 : Y.refNo) || ((C = v.netSuite) == null ? void 0 : C.refNo)].filter((le) => le).join(" ")), Ct({
|
|
577
577
|
po: v,
|
|
578
|
-
currentLocation:
|
|
578
|
+
currentLocation: H,
|
|
579
579
|
business: d.currentBusiness.value,
|
|
580
|
-
fulfilling:
|
|
580
|
+
fulfilling: S === "approval",
|
|
581
581
|
por: o
|
|
582
582
|
});
|
|
583
583
|
return;
|
|
@@ -590,8 +590,8 @@ function Es(_, e) {
|
|
|
590
590
|
(F = e.promptUpdateTransferDialog) == null || F.call(e, v);
|
|
591
591
|
return;
|
|
592
592
|
}
|
|
593
|
-
if (
|
|
594
|
-
e.submitAction(u, c, (
|
|
593
|
+
if (a(c)) {
|
|
594
|
+
e.submitAction(u, c, (j = o == null ? void 0 : o.to) == null ? void 0 : j.dbName);
|
|
595
595
|
return;
|
|
596
596
|
}
|
|
597
597
|
}
|
|
@@ -668,7 +668,7 @@ function Es(_, e) {
|
|
|
668
668
|
}
|
|
669
669
|
}
|
|
670
670
|
];
|
|
671
|
-
if (
|
|
671
|
+
if (_.isEnabled) {
|
|
672
672
|
const u = [
|
|
673
673
|
{
|
|
674
674
|
id: "netsuiteTransferOrder",
|
|
@@ -704,7 +704,7 @@ function Es(_, e) {
|
|
|
704
704
|
}
|
|
705
705
|
return c;
|
|
706
706
|
}
|
|
707
|
-
function
|
|
707
|
+
function g() {
|
|
708
708
|
const c = [
|
|
709
709
|
{
|
|
710
710
|
accessorKey: "purchaseOrder.seqNumber",
|
|
@@ -779,7 +779,7 @@ function Es(_, e) {
|
|
|
779
779
|
}
|
|
780
780
|
}
|
|
781
781
|
];
|
|
782
|
-
if (
|
|
782
|
+
if (_.isEnabled) {
|
|
783
783
|
const u = [
|
|
784
784
|
{
|
|
785
785
|
id: "netsuiteTransferOrder",
|
|
@@ -816,7 +816,7 @@ function Es(_, e) {
|
|
|
816
816
|
return c;
|
|
817
817
|
}
|
|
818
818
|
return {
|
|
819
|
-
columnDefs: Z(() =>
|
|
819
|
+
columnDefs: Z(() => S === "receive/request" ? y() : g())
|
|
820
820
|
};
|
|
821
821
|
}
|
|
822
822
|
const Pt = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg p-16" }, It = { class: "flex flex-col gap-8" }, Ft = { class: "flex w-full justify-end gap-16" }, Bt = /* @__PURE__ */ pe({
|
|
@@ -826,32 +826,32 @@ const Pt = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
826
826
|
confirm: { type: Function }
|
|
827
827
|
},
|
|
828
828
|
emits: ["update:show"],
|
|
829
|
-
setup(
|
|
830
|
-
const i =
|
|
829
|
+
setup(S, { emit: e }) {
|
|
830
|
+
const i = S, _ = ht({
|
|
831
831
|
id: "",
|
|
832
832
|
createdAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
833
833
|
items: []
|
|
834
834
|
}), d = M(), t = e;
|
|
835
835
|
return nt(() => {
|
|
836
|
-
i.purchaseOrder && (
|
|
836
|
+
i.purchaseOrder && (_.items = i.purchaseOrder.items.map((l) => ({
|
|
837
837
|
id: l.id,
|
|
838
838
|
sku: l.sku,
|
|
839
839
|
measurement: l.measurement,
|
|
840
840
|
amount: l.quantity ?? { amount: 1, precision: 0 }
|
|
841
841
|
})));
|
|
842
|
-
}), (l,
|
|
843
|
-
const s =
|
|
844
|
-
return b(), ae(
|
|
842
|
+
}), (l, a) => {
|
|
843
|
+
const s = K("FmTable"), y = K("FmButton"), g = K("FmForm");
|
|
844
|
+
return b(), ae(g, {
|
|
845
845
|
ref_key: "formRef",
|
|
846
846
|
ref: d,
|
|
847
847
|
class: "bg-white flex flex-col gap-32 rounded-3xl p-24 w-[800px]",
|
|
848
848
|
onValidationFailed: console.log,
|
|
849
|
-
onValidationSuccess:
|
|
849
|
+
onValidationSuccess: a[1] || (a[1] = () => i.confirm(_))
|
|
850
850
|
}, {
|
|
851
851
|
default: se(() => [
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
852
|
+
a[2] || (a[2] = n("div", { class: "fm-typo-en-title-sm-600" }, "Confirm the transfer amount", -1)),
|
|
853
|
+
n("div", Pt, [
|
|
854
|
+
n("div", It, [
|
|
855
855
|
I(s, {
|
|
856
856
|
"column-defs": [
|
|
857
857
|
{
|
|
@@ -917,7 +917,7 @@ const Pt = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
917
917
|
unit: c.sku.unit,
|
|
918
918
|
"onUpdate:modelValue": (v) => {
|
|
919
919
|
if (!v) return;
|
|
920
|
-
const D =
|
|
920
|
+
const D = _.items.find((q) => q.id === c.id || q.sku._id === c.sku._id);
|
|
921
921
|
D && (D.amount = v.amount);
|
|
922
922
|
},
|
|
923
923
|
disableUnit: !0,
|
|
@@ -932,12 +932,12 @@ const Pt = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
932
932
|
}
|
|
933
933
|
}
|
|
934
934
|
],
|
|
935
|
-
"row-data":
|
|
935
|
+
"row-data": _.items,
|
|
936
936
|
"hide-footer": !0
|
|
937
937
|
}, null, 8, ["column-defs", "row-data"])
|
|
938
938
|
])
|
|
939
939
|
]),
|
|
940
|
-
|
|
940
|
+
n("div", Ft, [
|
|
941
941
|
I(y, {
|
|
942
942
|
class: "px-16",
|
|
943
943
|
label: "Confirm",
|
|
@@ -950,7 +950,7 @@ const Pt = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
950
950
|
label: "Cancel",
|
|
951
951
|
size: "md",
|
|
952
952
|
variant: "secondary",
|
|
953
|
-
onClick:
|
|
953
|
+
onClick: a[0] || (a[0] = () => t("update:show", !1))
|
|
954
954
|
})
|
|
955
955
|
])
|
|
956
956
|
]),
|
|
@@ -1024,23 +1024,23 @@ const Pt = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
1024
1024
|
}
|
|
1025
1025
|
};
|
|
1026
1026
|
function Et() {
|
|
1027
|
-
const
|
|
1027
|
+
const S = De();
|
|
1028
1028
|
return {
|
|
1029
1029
|
ableToMarkReceived(e) {
|
|
1030
1030
|
if (!e || e.status !== ue.enum.RECEIVING)
|
|
1031
1031
|
return !1;
|
|
1032
|
-
const
|
|
1033
|
-
return `${e.supplier.internal}_${e.supplier._id}` !==
|
|
1032
|
+
const _ = de().currentLocationDBName;
|
|
1033
|
+
return `${e.supplier.internal}_${e.supplier._id}` !== _;
|
|
1034
1034
|
},
|
|
1035
1035
|
ableToMarkApproved(e) {
|
|
1036
1036
|
return !(!e || (e == null ? void 0 : e.status) !== ue.enum.REQUESTING);
|
|
1037
1037
|
},
|
|
1038
1038
|
ableToCreateFulfillment(e, i) {
|
|
1039
1039
|
var t, l;
|
|
1040
|
-
if (!
|
|
1040
|
+
if (!S.acceptRequireFulfillment || !e || !i || e.status !== ue.enum.PROCESSING || !i.processedAt)
|
|
1041
1041
|
return !1;
|
|
1042
|
-
const
|
|
1043
|
-
return !(
|
|
1042
|
+
const _ = (t = i == null ? void 0 : i.from) == null ? void 0 : t.dbName, d = (l = i == null ? void 0 : i.to) == null ? void 0 : l.dbName;
|
|
1043
|
+
return !(_.startsWith("restaurant_") && d.startsWith("restaurant_"));
|
|
1044
1044
|
}
|
|
1045
1045
|
};
|
|
1046
1046
|
}
|
|
@@ -1052,14 +1052,14 @@ const Lt = { class: "flex flex-row-reverse" }, Ut = /* @__PURE__ */ pe({
|
|
|
1052
1052
|
isTransferBetweenOutlets: { type: Boolean },
|
|
1053
1053
|
scope: {}
|
|
1054
1054
|
},
|
|
1055
|
-
setup(
|
|
1056
|
-
const e =
|
|
1055
|
+
setup(S) {
|
|
1056
|
+
const e = S, i = qe(), _ = Te(), d = Me(), t = M(!1);
|
|
1057
1057
|
Z(() => {
|
|
1058
|
-
var
|
|
1059
|
-
let
|
|
1060
|
-
i.isEnabled || (
|
|
1058
|
+
var g, f, c, u;
|
|
1059
|
+
let a = !0;
|
|
1060
|
+
i.isEnabled || (a = !1);
|
|
1061
1061
|
const s = e.purchaseOrder, y = e.poRequest;
|
|
1062
|
-
return s && ((
|
|
1062
|
+
return s && ((g = s == null ? void 0 : s.supplier) != null && g.internal ? (!y && s.status == ue.enum.DRAFT && (a = !1), y && !((f = y == null ? void 0 : y.netSuite) != null && f.id) && (a = !1), e.isTransferBetweenOutlets && (a = !1)) : ((s == null ? void 0 : s.status) !== ue.enum.REQUESTING && s.supplier.internal && (a = !1), !y && !((c = s == null ? void 0 : s.netSuite) != null && c.id) && (a = !1), !y && ((u = s == null ? void 0 : s.netSuite) != null && u.id) && (s == null ? void 0 : s.status) == ue.enum.REQUESTING && (a = !1))), a;
|
|
1063
1063
|
});
|
|
1064
1064
|
async function l() {
|
|
1065
1065
|
t.value || d.open({
|
|
@@ -1080,20 +1080,20 @@ const Lt = { class: "flex flex-row-reverse" }, Ut = /* @__PURE__ */ pe({
|
|
|
1080
1080
|
},
|
|
1081
1081
|
secondaryActions: { text: "Not now", close: !0 }
|
|
1082
1082
|
}).onPrimary(async () => {
|
|
1083
|
-
var
|
|
1083
|
+
var a, s, y;
|
|
1084
1084
|
try {
|
|
1085
1085
|
t.value = !0;
|
|
1086
|
-
const
|
|
1086
|
+
const g = ((a = e.purchaseOrder) == null ? void 0 : a._id) || ((s = e.poRequest) == null ? void 0 : s.purchaseOrderId) || "", f = (y = e.poRequest) == null ? void 0 : y.to.dbName;
|
|
1087
1087
|
await i.syncPurchaseOrder(
|
|
1088
|
-
|
|
1088
|
+
g,
|
|
1089
1089
|
e.scope === "approval" ? f : void 0
|
|
1090
|
-
),
|
|
1090
|
+
), _.open({
|
|
1091
1091
|
title: "Sync with NetSuite",
|
|
1092
1092
|
message: "Requested to sync with NetSuite. Please wait a moment.",
|
|
1093
1093
|
type: "success"
|
|
1094
1094
|
}), await new Promise((c) => setTimeout(c, 5e3)), t.value = !1;
|
|
1095
1095
|
} catch {
|
|
1096
|
-
|
|
1096
|
+
_.open({
|
|
1097
1097
|
title: "Error",
|
|
1098
1098
|
message: "Failed to sync with NetSuite",
|
|
1099
1099
|
type: "error"
|
|
@@ -1101,8 +1101,8 @@ const Lt = { class: "flex flex-row-reverse" }, Ut = /* @__PURE__ */ pe({
|
|
|
1101
1101
|
}
|
|
1102
1102
|
});
|
|
1103
1103
|
}
|
|
1104
|
-
return (
|
|
1105
|
-
const y =
|
|
1104
|
+
return (a, s) => {
|
|
1105
|
+
const y = K("FmButton");
|
|
1106
1106
|
return b(), N("div", Lt, [
|
|
1107
1107
|
I(y, {
|
|
1108
1108
|
"prepend-icon": "sync",
|
|
@@ -1142,58 +1142,58 @@ const Lt = { class: "flex flex-row-reverse" }, Ut = /* @__PURE__ */ pe({
|
|
|
1142
1142
|
isTransferBetweenOutlets: { type: Boolean },
|
|
1143
1143
|
scope: {}
|
|
1144
1144
|
},
|
|
1145
|
-
setup(
|
|
1146
|
-
const e =
|
|
1145
|
+
setup(S) {
|
|
1146
|
+
const e = S, i = qe(), _ = $e(), d = M(e.poRequest);
|
|
1147
1147
|
nt(async () => {
|
|
1148
1148
|
var s;
|
|
1149
1149
|
if (!e.poRequest && ((s = e.purchaseOrder) != null && s._id)) {
|
|
1150
|
-
const y = await
|
|
1150
|
+
const y = await _.getLatestPurchaseOrderRequest(e.purchaseOrder._id);
|
|
1151
1151
|
d.value = y;
|
|
1152
1152
|
}
|
|
1153
1153
|
});
|
|
1154
1154
|
const t = Z(
|
|
1155
1155
|
() => {
|
|
1156
|
-
var s, y,
|
|
1156
|
+
var s, y, g, f, c, u;
|
|
1157
1157
|
return i.getSubsidiaryFullName(
|
|
1158
|
-
((
|
|
1158
|
+
((g = (y = (s = e.purchaseOrder) == null ? void 0 : s.netSuite) == null ? void 0 : y.subsidiary) == null ? void 0 : g.id) || ((u = (c = (f = e.poRequest) == null ? void 0 : f.netSuite) == null ? void 0 : c.subsidiary) == null ? void 0 : u.id)
|
|
1159
1159
|
).fullName;
|
|
1160
1160
|
}
|
|
1161
1161
|
), l = Z(() => {
|
|
1162
|
-
var s, y,
|
|
1163
|
-
return (
|
|
1164
|
-
}),
|
|
1165
|
-
var s, y,
|
|
1166
|
-
return (y = (s = e.purchaseOrder) == null ? void 0 : s.deliveryFullfillment) != null && y.length && ((f = (
|
|
1162
|
+
var s, y, g, f, c, u, o, v, D, q, Y, C;
|
|
1163
|
+
return (g = (y = (s = e.purchaseOrder) == null ? void 0 : s.netSuite) == null ? void 0 : y.additionalInfo) != null && g.transactionnumber ? (u = (c = (f = e.purchaseOrder) == null ? void 0 : f.netSuite) == null ? void 0 : c.additionalInfo) == null ? void 0 : u.transactionnumber : (D = (v = (o = d.value) == null ? void 0 : o.netSuite) == null ? void 0 : v.additionalInfo) != null && D.transactionnumber ? (C = (Y = (q = d.value) == null ? void 0 : q.netSuite) == null ? void 0 : Y.additionalInfo) == null ? void 0 : C.transactionnumber : null;
|
|
1164
|
+
}), a = Z(() => {
|
|
1165
|
+
var s, y, g, f, c, u;
|
|
1166
|
+
return (y = (s = e.purchaseOrder) == null ? void 0 : s.deliveryFullfillment) != null && y.length && ((f = (g = e.purchaseOrder) == null ? void 0 : g.deliveryFullfillment) == null ? void 0 : f.length) > 0 ? (u = (c = e.purchaseOrder) == null ? void 0 : c.deliveryFullfillment) == null ? void 0 : u.map((o) => {
|
|
1167
1167
|
var v;
|
|
1168
1168
|
return (v = o.netSuite) == null ? void 0 : v.refNo;
|
|
1169
1169
|
}).join(", ") : "N/A";
|
|
1170
1170
|
});
|
|
1171
1171
|
return (s, y) => {
|
|
1172
|
-
var
|
|
1172
|
+
var g, f, c, u, o, v, D, q, Y, C, F, j, H, le, oe, ye;
|
|
1173
1173
|
return h(i).isEnabled ? (b(), N("div", Vt, [
|
|
1174
|
-
|
|
1175
|
-
y[0] || (y[0] =
|
|
1176
|
-
|
|
1174
|
+
n("div", Mt, [
|
|
1175
|
+
y[0] || (y[0] = n("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, "NetSuite subsidiary", -1)),
|
|
1176
|
+
n("div", jt, k(t.value || "N/A"), 1)
|
|
1177
1177
|
]),
|
|
1178
1178
|
!s.isTransferBetweenOutlets && s.scope === h(Ue).RECEIVE_REQUEST ? (b(), N("div", Kt, [
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
(v = (o = s.purchaseOrder) == null ? void 0 : o.netSuite) != null && v.id ? (b(), N("span", Gt, k((q = (D = s.purchaseOrder) == null ? void 0 : D.netSuite) == null ? void 0 : q.refNo) + " (" + k((
|
|
1179
|
+
n("div", zt, " NetSuite " + k((f = (g = s.purchaseOrder) == null ? void 0 : g.netSuite) != null && f.recordType ? h(rt)((u = (c = s.purchaseOrder) == null ? void 0 : c.netSuite) == null ? void 0 : u.recordType) : s.transferType === h(fe).PURCHASE ? "Purchase Order" : "Transfer Order") + " (ID) ", 1),
|
|
1180
|
+
n("div", Ht, [
|
|
1181
|
+
(v = (o = s.purchaseOrder) == null ? void 0 : o.netSuite) != null && v.id ? (b(), N("span", Gt, k((q = (D = s.purchaseOrder) == null ? void 0 : D.netSuite) == null ? void 0 : q.refNo) + " (" + k((C = (Y = s.purchaseOrder) == null ? void 0 : Y.netSuite) == null ? void 0 : C.id) + ") ", 1)) : (b(), N("span", Wt, "N/A"))
|
|
1182
1182
|
])
|
|
1183
1183
|
])) : V("", !0),
|
|
1184
1184
|
!s.isTransferBetweenOutlets && d.value || s.scope === h(Ue).APPROVAL ? (b(), N("div", Yt, [
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
(
|
|
1185
|
+
n("div", Qt, " (Request) NetSuite " + k(s.transferType === h(fe).PURCHASE ? "Purchase Order" : "Transfer Order") + " (ID) ", 1),
|
|
1186
|
+
n("div", Xt, [
|
|
1187
|
+
(j = (F = d.value) == null ? void 0 : F.netSuite) != null && j.id ? (b(), N("span", Jt, k((le = (H = d.value) == null ? void 0 : H.netSuite) == null ? void 0 : le.refNo) + " (" + k((ye = (oe = d.value) == null ? void 0 : oe.netSuite) == null ? void 0 : ye.id) + ") ", 1)) : (b(), N("span", Zt, "N/A"))
|
|
1188
1188
|
])
|
|
1189
1189
|
])) : V("", !0),
|
|
1190
1190
|
l.value ? (b(), N("div", er, [
|
|
1191
|
-
y[1] || (y[1] =
|
|
1192
|
-
|
|
1191
|
+
y[1] || (y[1] = n("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " NetSuite Transaction Number ", -1)),
|
|
1192
|
+
n("div", tr, k(l.value), 1)
|
|
1193
1193
|
])) : V("", !0),
|
|
1194
1194
|
h(i).isEnabled && s.transferType === h(fe).TRANSFER && !s.isTransferBetweenOutlets ? (b(), N("div", rr, [
|
|
1195
|
-
y[2] || (y[2] =
|
|
1196
|
-
|
|
1195
|
+
y[2] || (y[2] = n("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " NetSuite fulfillment IDs ", -1)),
|
|
1196
|
+
n("div", sr, k(a.value), 1)
|
|
1197
1197
|
])) : V("", !0)
|
|
1198
1198
|
])) : V("", !0);
|
|
1199
1199
|
};
|
|
@@ -1204,31 +1204,38 @@ const Lt = { class: "flex flex-row-reverse" }, Ut = /* @__PURE__ */ pe({
|
|
|
1204
1204
|
netsuiteId: {},
|
|
1205
1205
|
purchaseOrderId: {}
|
|
1206
1206
|
},
|
|
1207
|
-
setup(
|
|
1207
|
+
setup(S) {
|
|
1208
1208
|
const e = Te(), i = st();
|
|
1209
|
-
async function
|
|
1210
|
-
|
|
1211
|
-
if (t) {
|
|
1212
|
-
const
|
|
1213
|
-
l
|
|
1209
|
+
async function _(d, t) {
|
|
1210
|
+
const l = [];
|
|
1211
|
+
if (d && l.push(`body.message:*${d}*`), t) {
|
|
1212
|
+
const g = t.replace(/:/g, "\\:");
|
|
1213
|
+
l.push(`${g}`);
|
|
1214
1214
|
}
|
|
1215
|
-
|
|
1215
|
+
if (l.length === 0) {
|
|
1216
|
+
e.open({
|
|
1217
|
+
message: "Cannot open logs without valid filters.",
|
|
1218
|
+
type: "error"
|
|
1219
|
+
});
|
|
1220
|
+
return;
|
|
1221
|
+
}
|
|
1222
|
+
const s = `attributes.pod:netsuite* AND (${l.join(" OR ")})`, { url: y } = await i.getLogs(s);
|
|
1216
1223
|
e.open(
|
|
1217
1224
|
{
|
|
1218
1225
|
message: "Opening NetSuite logs...",
|
|
1219
1226
|
type: "info"
|
|
1220
1227
|
},
|
|
1221
1228
|
800
|
|
1222
|
-
), await new Promise((
|
|
1229
|
+
), await new Promise((g) => setTimeout(g, 800)), window.open(y, "_blank");
|
|
1223
1230
|
}
|
|
1224
1231
|
return (d, t) => {
|
|
1225
|
-
const l =
|
|
1232
|
+
const l = K("FmButton");
|
|
1226
1233
|
return b(), N("div", ar, [
|
|
1227
1234
|
I(l, {
|
|
1228
1235
|
"prepend-icon": "history",
|
|
1229
1236
|
variant: "secondary",
|
|
1230
1237
|
label: "Logs",
|
|
1231
|
-
onClick: t[0] || (t[0] = (
|
|
1238
|
+
onClick: t[0] || (t[0] = (a) => _(d.netsuiteId, d.purchaseOrderId)),
|
|
1232
1239
|
"text-color": "primary",
|
|
1233
1240
|
"bg-color": "transparent",
|
|
1234
1241
|
"border-color": "primary"
|
|
@@ -1245,18 +1252,18 @@ const Lt = { class: "flex flex-row-reverse" }, Ut = /* @__PURE__ */ pe({
|
|
|
1245
1252
|
netsuiteId: {},
|
|
1246
1253
|
purchaseOrderId: {}
|
|
1247
1254
|
},
|
|
1248
|
-
setup(
|
|
1249
|
-
const e =
|
|
1255
|
+
setup(S) {
|
|
1256
|
+
const e = S, i = st(), _ = M(!1), d = de(), t = M(!0), l = M(!1), a = M(null);
|
|
1250
1257
|
async function s() {
|
|
1251
|
-
if (!
|
|
1252
|
-
|
|
1258
|
+
if (!a.value) {
|
|
1259
|
+
_.value = !0;
|
|
1253
1260
|
try {
|
|
1254
1261
|
t.value = !0;
|
|
1255
1262
|
const y = await i.getMoreInfo(
|
|
1256
1263
|
d.currentLocation.dbName,
|
|
1257
1264
|
e.purchaseOrderId
|
|
1258
1265
|
);
|
|
1259
|
-
|
|
1266
|
+
a.value = y, l.value = !1;
|
|
1260
1267
|
} catch {
|
|
1261
1268
|
l.value = !0;
|
|
1262
1269
|
} finally {
|
|
@@ -1264,12 +1271,12 @@ const Lt = { class: "flex flex-row-reverse" }, Ut = /* @__PURE__ */ pe({
|
|
|
1264
1271
|
}
|
|
1265
1272
|
}
|
|
1266
1273
|
}
|
|
1267
|
-
return (y,
|
|
1268
|
-
const f =
|
|
1274
|
+
return (y, g) => {
|
|
1275
|
+
const f = K("FmButton"), c = K("FmLabel"), u = K("FmDialog");
|
|
1269
1276
|
return b(), N("div", ir, [
|
|
1270
1277
|
I(u, {
|
|
1271
|
-
modelValue:
|
|
1272
|
-
"onUpdate:modelValue":
|
|
1278
|
+
modelValue: _.value,
|
|
1279
|
+
"onUpdate:modelValue": g[2] || (g[2] = (o) => _.value = o),
|
|
1273
1280
|
overlay: !0
|
|
1274
1281
|
}, {
|
|
1275
1282
|
"dialog-button": se(() => [
|
|
@@ -1277,14 +1284,14 @@ const Lt = { class: "flex flex-row-reverse" }, Ut = /* @__PURE__ */ pe({
|
|
|
1277
1284
|
"prepend-icon": "info",
|
|
1278
1285
|
variant: "secondary",
|
|
1279
1286
|
label: "Latest Info",
|
|
1280
|
-
onClick:
|
|
1287
|
+
onClick: g[0] || (g[0] = (o) => s()),
|
|
1281
1288
|
"text-color": "primary",
|
|
1282
1289
|
"bg-color": "transparent",
|
|
1283
1290
|
"border-color": "primary"
|
|
1284
1291
|
})
|
|
1285
1292
|
]),
|
|
1286
|
-
"dialog-header": se(() =>
|
|
1287
|
-
|
|
1293
|
+
"dialog-header": se(() => g[3] || (g[3] = [
|
|
1294
|
+
n("div", null, "NetSuite latest info", -1)
|
|
1288
1295
|
])),
|
|
1289
1296
|
"dialog-footer": se(() => [
|
|
1290
1297
|
I(f, {
|
|
@@ -1292,20 +1299,20 @@ const Lt = { class: "flex flex-row-reverse" }, Ut = /* @__PURE__ */ pe({
|
|
|
1292
1299
|
label: "Close",
|
|
1293
1300
|
size: "md",
|
|
1294
1301
|
variant: "primary",
|
|
1295
|
-
onClick:
|
|
1302
|
+
onClick: g[1] || (g[1] = (o) => _.value = !1)
|
|
1296
1303
|
})
|
|
1297
1304
|
]),
|
|
1298
1305
|
default: se(() => [
|
|
1299
1306
|
t.value ? (b(), N("div", lr, "Loading...")) : (b(), N("div", cr, [
|
|
1300
|
-
l.value ? (b(), N("p", fr, "Something went wrong.")) : (b(!0), N(te, { key: 0 }, me(
|
|
1307
|
+
l.value ? (b(), N("p", fr, "Something went wrong.")) : (b(!0), N(te, { key: 0 }, me(a.value, (o, v) => (b(), N("div", {
|
|
1301
1308
|
key: v,
|
|
1302
1309
|
class: "mb-2"
|
|
1303
1310
|
}, [
|
|
1304
|
-
|
|
1311
|
+
n("div", null, [
|
|
1305
1312
|
I(c, {
|
|
1306
1313
|
label: h(Ve)(v)
|
|
1307
1314
|
}, null, 8, ["label"]),
|
|
1308
|
-
|
|
1315
|
+
n("div", ur, [
|
|
1309
1316
|
Array.isArray(o) ? (b(), N("span", dr, k(o.length > 0 ? o.join(", ") : "N/A"), 1)) : (b(), N("span", mr, k(o), 1))
|
|
1310
1317
|
])
|
|
1311
1318
|
])
|
|
@@ -1329,29 +1336,29 @@ const Lt = { class: "flex flex-row-reverse" }, Ut = /* @__PURE__ */ pe({
|
|
|
1329
1336
|
transferToDbName: {},
|
|
1330
1337
|
scope: {}
|
|
1331
1338
|
},
|
|
1332
|
-
setup(
|
|
1333
|
-
const e =
|
|
1334
|
-
var s, y,
|
|
1335
|
-
const t = ((s = e.transferToDbName) == null ? void 0 : s.startsWith("restaurant")) && ((
|
|
1336
|
-
return l ||
|
|
1339
|
+
setup(S) {
|
|
1340
|
+
const e = S, i = Tt(), _ = Ae(), d = Z(() => {
|
|
1341
|
+
var s, y, g, f, c, u, o;
|
|
1342
|
+
const t = ((s = e.transferToDbName) == null ? void 0 : s.startsWith("restaurant")) && ((g = (y = e.purchaseOrder) == null ? void 0 : y.supplier) == null ? void 0 : g.internal) === "restaurant", l = e.transferType === fe.PURCHASE, a = e.transferType === fe.TRANSFER;
|
|
1343
|
+
return l || a && !t || ((c = (f = e.purchaseOrder) == null ? void 0 : f.netSuite) == null ? void 0 : c.id) || ((o = (u = e.poRequest) == null ? void 0 : u.netSuite) == null ? void 0 : o.id);
|
|
1337
1344
|
});
|
|
1338
1345
|
return (t, l) => {
|
|
1339
|
-
var s, y,
|
|
1340
|
-
const
|
|
1346
|
+
var s, y, g, f, c, u, o, v, D, q;
|
|
1347
|
+
const a = K("FmMenuDivider");
|
|
1341
1348
|
return h(i).isNetSuiteEnabled && d.value ? (b(), N("div", yr, [
|
|
1342
|
-
|
|
1343
|
-
l[0] || (l[0] =
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
(s = h(
|
|
1349
|
+
n("div", vr, [
|
|
1350
|
+
l[0] || (l[0] = n("span", { class: "flex-1 fm-typo-en-body-lg-600" }, "NetSuite Info", -1)),
|
|
1351
|
+
n("div", hr, [
|
|
1352
|
+
n("div", br, [
|
|
1353
|
+
(s = h(_).sessionUser.value) != null && s.role.isAdmin && ((g = (y = e.purchaseOrder) == null ? void 0 : y.netSuite) != null && g.id) ? (b(), ae(pr, {
|
|
1347
1354
|
key: 0,
|
|
1348
1355
|
"netsuite-id": (c = (f = t.purchaseOrder) == null ? void 0 : f.netSuite) == null ? void 0 : c.id,
|
|
1349
1356
|
"purchase-order-id": (u = t.purchaseOrder) == null ? void 0 : u._id
|
|
1350
1357
|
}, null, 8, ["netsuite-id", "purchase-order-id"])) : V("", !0),
|
|
1351
|
-
(o = h(
|
|
1358
|
+
(o = h(_).sessionUser.value) != null && o.role.isAdmin ? (b(), ae(or, {
|
|
1352
1359
|
key: 1,
|
|
1353
|
-
"netsuite-id": (
|
|
1354
|
-
"purchase-order-id": (
|
|
1360
|
+
"netsuite-id": (D = (v = t.purchaseOrder) == null ? void 0 : v.netSuite) == null ? void 0 : D.id,
|
|
1361
|
+
"purchase-order-id": (q = t.purchaseOrder) == null ? void 0 : q._id
|
|
1355
1362
|
}, null, 8, ["netsuite-id", "purchase-order-id"])) : V("", !0),
|
|
1356
1363
|
I(Ut, {
|
|
1357
1364
|
"po-request": t.poRequest,
|
|
@@ -1362,7 +1369,7 @@ const Lt = { class: "flex flex-row-reverse" }, Ut = /* @__PURE__ */ pe({
|
|
|
1362
1369
|
])
|
|
1363
1370
|
])
|
|
1364
1371
|
]),
|
|
1365
|
-
I(
|
|
1372
|
+
I(a),
|
|
1366
1373
|
I(nr, {
|
|
1367
1374
|
"po-request": t.poRequest,
|
|
1368
1375
|
"purchase-order": t.purchaseOrder,
|
|
@@ -1426,8 +1433,8 @@ const Lt = { class: "flex flex-row-reverse" }, Ut = /* @__PURE__ */ pe({
|
|
|
1426
1433
|
scope: {}
|
|
1427
1434
|
},
|
|
1428
1435
|
emits: ["update:show", "submitted"],
|
|
1429
|
-
setup(
|
|
1430
|
-
const i =
|
|
1436
|
+
setup(S, { emit: e }) {
|
|
1437
|
+
const i = S, _ = e, d = Me(), t = Te(), l = De(), a = de(), s = Ae(), y = Z(
|
|
1431
1438
|
() => {
|
|
1432
1439
|
var r, m;
|
|
1433
1440
|
return {
|
|
@@ -1435,12 +1442,12 @@ const Lt = { class: "flex flex-row-reverse" }, Ut = /* @__PURE__ */ pe({
|
|
|
1435
1442
|
name: ((m = s.sessionUser.value) == null ? void 0 : m.displayName) ?? ""
|
|
1436
1443
|
};
|
|
1437
1444
|
}
|
|
1438
|
-
),
|
|
1445
|
+
), g = Et(), { t: f } = at(), c = Z(
|
|
1439
1446
|
() => {
|
|
1440
1447
|
var r, m, R, w;
|
|
1441
1448
|
return ((m = (r = i.purchaseOrder) == null ? void 0 : r.supplier) == null ? void 0 : m.internal) === "restaurant" || ((w = (R = i.purchaseOrder) == null ? void 0 : R.supplier) == null ? void 0 : w.internal) === "warehouse" ? fe.TRANSFER : fe.PURCHASE;
|
|
1442
1449
|
}
|
|
1443
|
-
), u = M(!1), o = M(""), v = M(!0), D = $e(), q = At(D.getWorkflowConfig),
|
|
1450
|
+
), u = M(!1), o = M(""), v = M(!0), D = $e(), q = At(D.getWorkflowConfig), Y = it(), C = Z(() => {
|
|
1444
1451
|
if (!i.purchaseOrder)
|
|
1445
1452
|
return [];
|
|
1446
1453
|
const r = q.result.value;
|
|
@@ -1448,10 +1455,10 @@ const Lt = { class: "flex flex-row-reverse" }, Ut = /* @__PURE__ */ pe({
|
|
|
1448
1455
|
return [];
|
|
1449
1456
|
const m = {
|
|
1450
1457
|
user: y.value,
|
|
1451
|
-
executedAt:
|
|
1458
|
+
executedAt: a.locations.computeFirst(
|
|
1452
1459
|
(w) => {
|
|
1453
|
-
var
|
|
1454
|
-
return w.dbName === ((
|
|
1460
|
+
var T;
|
|
1461
|
+
return w.dbName === ((T = a._currentLocation) == null ? void 0 : T.dbName) ? w : null;
|
|
1455
1462
|
}
|
|
1456
1463
|
),
|
|
1457
1464
|
purchaseOrderRequest: i.poRequest,
|
|
@@ -1478,7 +1485,7 @@ const Lt = { class: "flex flex-row-reverse" }, Ut = /* @__PURE__ */ pe({
|
|
|
1478
1485
|
console.error("Error getting available actions:", w);
|
|
1479
1486
|
}
|
|
1480
1487
|
return i.scope === "approval" && (R = R.filter((w) => w !== O.enum.completeReceive)), R;
|
|
1481
|
-
}), F = kt(i, "show"),
|
|
1488
|
+
}), F = kt(i, "show"), j = Z(() => [
|
|
1482
1489
|
{
|
|
1483
1490
|
label: f("inventory.transfer.receiveRequest.details.overview"),
|
|
1484
1491
|
value: "overview"
|
|
@@ -1487,15 +1494,15 @@ const Lt = { class: "flex flex-row-reverse" }, Ut = /* @__PURE__ */ pe({
|
|
|
1487
1494
|
label: f("inventory.transfer.receiveRequest.details.deliveryHistory"),
|
|
1488
1495
|
value: "deliveryHistory"
|
|
1489
1496
|
}
|
|
1490
|
-
]),
|
|
1497
|
+
]), H = M(j.value[0]);
|
|
1491
1498
|
bt(
|
|
1492
1499
|
() => i.show,
|
|
1493
1500
|
(r) => {
|
|
1494
|
-
r && (
|
|
1501
|
+
r && (H.value = j.value[0]);
|
|
1495
1502
|
}
|
|
1496
1503
|
);
|
|
1497
|
-
async function le(r, m, R, w,
|
|
1498
|
-
return new Promise((
|
|
1504
|
+
async function le(r, m, R, w, T) {
|
|
1505
|
+
return new Promise((G, Q) => {
|
|
1499
1506
|
d.open({
|
|
1500
1507
|
closeButton: !1,
|
|
1501
1508
|
title: w.title,
|
|
@@ -1503,7 +1510,7 @@ const Lt = { class: "flex flex-row-reverse" }, Ut = /* @__PURE__ */ pe({
|
|
|
1503
1510
|
primaryActions: w.primaryActions,
|
|
1504
1511
|
secondaryActions: { text: "No", close: !1 }
|
|
1505
1512
|
}).onPrimary(async () => {
|
|
1506
|
-
var
|
|
1513
|
+
var $, B, z, E;
|
|
1507
1514
|
const p = [];
|
|
1508
1515
|
R === O.enum.approveRequest ? (p.push({
|
|
1509
1516
|
action: "approveRequest",
|
|
@@ -1534,34 +1541,34 @@ const Lt = { class: "flex flex-row-reverse" }, Ut = /* @__PURE__ */ pe({
|
|
|
1534
1541
|
payload: null
|
|
1535
1542
|
});
|
|
1536
1543
|
try {
|
|
1537
|
-
await
|
|
1544
|
+
await Y({
|
|
1538
1545
|
operate: {
|
|
1539
1546
|
operation: R,
|
|
1540
1547
|
doc: r,
|
|
1541
1548
|
options: m
|
|
1542
1549
|
},
|
|
1543
1550
|
operateV2: {
|
|
1544
|
-
_id: ((
|
|
1551
|
+
_id: (($ = i.purchaseOrder) == null ? void 0 : $._id) ?? "",
|
|
1545
1552
|
_rev: ((B = i.purchaseOrder) == null ? void 0 : B._rev) ?? "",
|
|
1546
1553
|
action: R,
|
|
1547
1554
|
payloads: p
|
|
1548
1555
|
// add payload if action is receiveStock or processRequest
|
|
1549
1556
|
},
|
|
1550
|
-
transferTo: (E = (
|
|
1551
|
-
}).delayed(1e3),
|
|
1557
|
+
transferTo: (E = (z = i.poRequest) == null ? void 0 : z.to) == null ? void 0 : E.dbName
|
|
1558
|
+
}).delayed(1e3), G("submitted");
|
|
1552
1559
|
} catch (X) {
|
|
1553
1560
|
Q(X);
|
|
1554
1561
|
}
|
|
1555
1562
|
}).onSecondary(() => {
|
|
1556
|
-
|
|
1557
|
-
for (let p = 0; p <
|
|
1563
|
+
G("cancelled");
|
|
1564
|
+
for (let p = 0; p < T + 2; p++)
|
|
1558
1565
|
d.close();
|
|
1559
1566
|
}).onClose(() => {
|
|
1560
1567
|
});
|
|
1561
1568
|
});
|
|
1562
1569
|
}
|
|
1563
1570
|
async function oe(r) {
|
|
1564
|
-
var w,
|
|
1571
|
+
var w, T, G, Q;
|
|
1565
1572
|
if (r === O.enum.receiveStock)
|
|
1566
1573
|
return;
|
|
1567
1574
|
const m = ot[r];
|
|
@@ -1577,13 +1584,13 @@ const Lt = { class: "flex flex-row-reverse" }, Ut = /* @__PURE__ */ pe({
|
|
|
1577
1584
|
if (i.purchaseOrder) {
|
|
1578
1585
|
o.value = `${r}`, u.value = !0, v.value = !1;
|
|
1579
1586
|
const p = {};
|
|
1580
|
-
let
|
|
1587
|
+
let $ = 0;
|
|
1581
1588
|
if ((r === O.enum.confirmDraft || // auto receive for warehouse to warehouse
|
|
1582
1589
|
r === O.enum.completeReceive) && l.autoReceiveWarehouse)
|
|
1583
1590
|
p.autoReceive = !0;
|
|
1584
1591
|
else if ((r === O.enum.approveRequest || r === O.enum.processRequest) && l.acceptRequireFulfillment) {
|
|
1585
|
-
const B = (
|
|
1586
|
-
if (B &&
|
|
1592
|
+
const B = (T = (w = i.poRequest) == null ? void 0 : w.from) == null ? void 0 : T.dbName, z = (Q = (G = i.poRequest) == null ? void 0 : G.to) == null ? void 0 : Q.dbName;
|
|
1593
|
+
if (B && z && (B.startsWith("warehouse_") || z.startsWith("warehouse_"))) {
|
|
1587
1594
|
const E = await new Promise((X, L) => {
|
|
1588
1595
|
d.open({
|
|
1589
1596
|
closeButton: !1,
|
|
@@ -1593,7 +1600,7 @@ const Lt = { class: "flex flex-row-reverse" }, Ut = /* @__PURE__ */ pe({
|
|
|
1593
1600
|
purchaseOrder: i.purchaseOrder,
|
|
1594
1601
|
confirm: X,
|
|
1595
1602
|
"onUpdate:show": (ne) => {
|
|
1596
|
-
ne || (o.value = "", u.value = !1, v.value = !0,
|
|
1603
|
+
ne || (o.value = "", u.value = !1, v.value = !0, $++, d.close()), L("cancelled");
|
|
1597
1604
|
}
|
|
1598
1605
|
}
|
|
1599
1606
|
});
|
|
@@ -1607,12 +1614,12 @@ const Lt = { class: "flex flex-row-reverse" }, Ut = /* @__PURE__ */ pe({
|
|
|
1607
1614
|
p,
|
|
1608
1615
|
r,
|
|
1609
1616
|
m,
|
|
1610
|
-
|
|
1617
|
+
$
|
|
1611
1618
|
) === "submitted" && (t.open({
|
|
1612
1619
|
title: "Success",
|
|
1613
1620
|
message: R,
|
|
1614
1621
|
type: "success"
|
|
1615
|
-
}),
|
|
1622
|
+
}), _("update:show", !1), _("submitted"));
|
|
1616
1623
|
} catch (B) {
|
|
1617
1624
|
t.open({
|
|
1618
1625
|
title: "Something went wrong",
|
|
@@ -1628,32 +1635,32 @@ const Lt = { class: "flex flex-row-reverse" }, Ut = /* @__PURE__ */ pe({
|
|
|
1628
1635
|
var r, m;
|
|
1629
1636
|
return ((r = i.purchaseOrder) == null ? void 0 : r.status) === ue.enum.RECEIVING || ((m = i.purchaseOrder) == null ? void 0 : m.status) === ue.enum.COMPLETE;
|
|
1630
1637
|
}), Ce = Z(() => {
|
|
1631
|
-
var
|
|
1632
|
-
const R = (((
|
|
1633
|
-
(
|
|
1634
|
-
const
|
|
1635
|
-
return
|
|
1638
|
+
var G, Q, p;
|
|
1639
|
+
const R = (((G = i.purchaseOrder) == null ? void 0 : G.deliveryOrder) ?? []).flatMap(($) => $.received ?? []).reduce(
|
|
1640
|
+
($, B) => {
|
|
1641
|
+
const z = $[B.sku._id] ?? [];
|
|
1642
|
+
return $[B.sku._id] = [...z, B], $;
|
|
1636
1643
|
},
|
|
1637
1644
|
{}
|
|
1638
1645
|
), w = Object.entries(R).reduce(
|
|
1639
|
-
(
|
|
1640
|
-
const E =
|
|
1646
|
+
($, [B, z]) => {
|
|
1647
|
+
const E = z.reduce((X, L) => {
|
|
1641
1648
|
const ne = yt(
|
|
1642
1649
|
X,
|
|
1643
1650
|
Math.max(X.precision, L.amount.precision)
|
|
1644
1651
|
);
|
|
1645
1652
|
return Le(ne, L.amount);
|
|
1646
1653
|
}, ke(0));
|
|
1647
|
-
return
|
|
1654
|
+
return $[B] = E, $;
|
|
1648
1655
|
},
|
|
1649
1656
|
{}
|
|
1650
|
-
),
|
|
1651
|
-
for (const
|
|
1652
|
-
w[p =
|
|
1657
|
+
), T = ((Q = i.purchaseOrder) == null ? void 0 : Q.items) ?? [];
|
|
1658
|
+
for (const $ of T)
|
|
1659
|
+
w[p = $.sku._id] ?? (w[p] = ke(0));
|
|
1653
1660
|
return w;
|
|
1654
1661
|
}), ce = Z(() => {
|
|
1655
|
-
var
|
|
1656
|
-
const r = ((
|
|
1662
|
+
var G, Q;
|
|
1663
|
+
const r = ((G = i.purchaseOrder) == null ? void 0 : G.deliveryOrder) ?? [], m = ((Q = i.purchaseOrder) == null ? void 0 : Q.deliveryFullfillment) ?? [], R = [
|
|
1657
1664
|
...r.map((p) => ({
|
|
1658
1665
|
createdAt: p.createdAt,
|
|
1659
1666
|
type: "grn",
|
|
@@ -1665,13 +1672,13 @@ const Lt = { class: "flex flex-row-reverse" }, Ut = /* @__PURE__ */ pe({
|
|
|
1665
1672
|
doc: p
|
|
1666
1673
|
}))
|
|
1667
1674
|
];
|
|
1668
|
-
R.reverse().sort((p,
|
|
1675
|
+
R.reverse().sort((p, $) => p.createdAt.localeCompare($.createdAt));
|
|
1669
1676
|
function w(p) {
|
|
1670
|
-
var
|
|
1671
|
-
const
|
|
1672
|
-
(E = (
|
|
1677
|
+
var z, E, X, L, ne, ge, _e, Se, U;
|
|
1678
|
+
const $ = m.findIndex((P) => P.id === p.fullfillmentId), B = [
|
|
1679
|
+
(E = (z = m[$]) == null ? void 0 : z.netSuite) != null && E.refNo ? {
|
|
1673
1680
|
label: "Fulfillment's ref no. (Netsuite)",
|
|
1674
|
-
values: [(L = (X = m[
|
|
1681
|
+
values: [(L = (X = m[$]) == null ? void 0 : X.netSuite) == null ? void 0 : L.refNo]
|
|
1675
1682
|
} : null,
|
|
1676
1683
|
(ne = p == null ? void 0 : p.netSuite) != null && ne.refNo ? {
|
|
1677
1684
|
label: "Netsuite ref no.",
|
|
@@ -1699,7 +1706,7 @@ const Lt = { class: "flex flex-row-reverse" }, Ut = /* @__PURE__ */ pe({
|
|
|
1699
1706
|
{
|
|
1700
1707
|
label: "Received items",
|
|
1701
1708
|
values: p.received.map((P) => {
|
|
1702
|
-
var
|
|
1709
|
+
var W;
|
|
1703
1710
|
return A("div", [
|
|
1704
1711
|
A(
|
|
1705
1712
|
"div",
|
|
@@ -1753,7 +1760,7 @@ const Lt = { class: "flex flex-row-reverse" }, Ut = /* @__PURE__ */ pe({
|
|
|
1753
1760
|
{
|
|
1754
1761
|
class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary"
|
|
1755
1762
|
},
|
|
1756
|
-
((
|
|
1763
|
+
((W = P.measurement) == null ? void 0 : W.abbrev) ?? P.sku.unit.abbrev
|
|
1757
1764
|
)
|
|
1758
1765
|
]
|
|
1759
1766
|
),
|
|
@@ -1779,24 +1786,24 @@ const Lt = { class: "flex flex-row-reverse" }, Ut = /* @__PURE__ */ pe({
|
|
|
1779
1786
|
label: "Remark",
|
|
1780
1787
|
values: [p.remark]
|
|
1781
1788
|
} : null,
|
|
1782
|
-
|
|
1789
|
+
$ > -1 ? {
|
|
1783
1790
|
label: "Fulfilment's sequence",
|
|
1784
|
-
values: [`${
|
|
1791
|
+
values: [`${$ + 1}`]
|
|
1785
1792
|
} : null,
|
|
1786
1793
|
...B
|
|
1787
1794
|
].filter((P) => P)
|
|
1788
1795
|
};
|
|
1789
1796
|
}
|
|
1790
|
-
function
|
|
1791
|
-
var B,
|
|
1792
|
-
const
|
|
1797
|
+
function T(p) {
|
|
1798
|
+
var B, z;
|
|
1799
|
+
const $ = m.findIndex((E) => E.id === p.id);
|
|
1793
1800
|
return {
|
|
1794
1801
|
header: "Fulfillment",
|
|
1795
1802
|
date: Ie(new Date(p.createdAt)),
|
|
1796
1803
|
info: [
|
|
1797
1804
|
{
|
|
1798
1805
|
label: "Sequence",
|
|
1799
|
-
values: [String(
|
|
1806
|
+
values: [String($ + 1)]
|
|
1800
1807
|
},
|
|
1801
1808
|
{
|
|
1802
1809
|
label: "Receiveable items",
|
|
@@ -1875,7 +1882,7 @@ const Lt = { class: "flex flex-row-reverse" }, Ut = /* @__PURE__ */ pe({
|
|
|
1875
1882
|
},
|
|
1876
1883
|
(B = p.netSuite) != null && B.refNo ? {
|
|
1877
1884
|
label: "Ref no. (Netsuite)",
|
|
1878
|
-
values: [(
|
|
1885
|
+
values: [(z = p.netSuite) == null ? void 0 : z.refNo]
|
|
1879
1886
|
} : null
|
|
1880
1887
|
].filter((E) => E)
|
|
1881
1888
|
};
|
|
@@ -1885,7 +1892,7 @@ const Lt = { class: "flex flex-row-reverse" }, Ut = /* @__PURE__ */ pe({
|
|
|
1885
1892
|
case "grn":
|
|
1886
1893
|
return w(p.doc);
|
|
1887
1894
|
case "fulfillment":
|
|
1888
|
-
return
|
|
1895
|
+
return T(p.doc);
|
|
1889
1896
|
}
|
|
1890
1897
|
});
|
|
1891
1898
|
}), x = Z(() => {
|
|
@@ -1901,8 +1908,8 @@ const Lt = { class: "flex flex-row-reverse" }, Ut = /* @__PURE__ */ pe({
|
|
|
1901
1908
|
});
|
|
1902
1909
|
return (r, m) => {
|
|
1903
1910
|
var E, X;
|
|
1904
|
-
const R =
|
|
1905
|
-
return b(), ae(
|
|
1911
|
+
const R = K("FmButtonGroup"), w = K("FmChip"), T = K("FmMenuDivider"), G = K("FmCard"), Q = K("FmIcon"), p = K("FmTooltip"), $ = K("FmSpacer"), B = K("FmButton"), z = K("FmSideSheet");
|
|
1912
|
+
return b(), ae(z, {
|
|
1906
1913
|
header: h(f)("inventory.transfer.receiveRequest.details.title") + ((E = r.purchaseOrder) != null && E.seqNumber ? ` #${(X = r.purchaseOrder) == null ? void 0 : X.seqNumber}` : ""),
|
|
1907
1914
|
modelValue: h(F),
|
|
1908
1915
|
"onUpdate:modelValue": m[5] || (m[5] = (L) => gt(F) ? F.value = L : null),
|
|
@@ -1913,66 +1920,66 @@ const Lt = { class: "flex flex-row-reverse" }, Ut = /* @__PURE__ */ pe({
|
|
|
1913
1920
|
default: se(() => {
|
|
1914
1921
|
var L, ne, ge, _e, Se;
|
|
1915
1922
|
return [
|
|
1916
|
-
|
|
1917
|
-
|
|
1923
|
+
n("div", _r, [
|
|
1924
|
+
n("div", null, [
|
|
1918
1925
|
I(R, {
|
|
1919
|
-
items:
|
|
1920
|
-
modelValue:
|
|
1921
|
-
"onUpdate:modelValue": m[0] || (m[0] = (U) =>
|
|
1926
|
+
items: j.value,
|
|
1927
|
+
modelValue: H.value,
|
|
1928
|
+
"onUpdate:modelValue": m[0] || (m[0] = (U) => H.value = U)
|
|
1922
1929
|
}, null, 8, ["items", "modelValue"])
|
|
1923
1930
|
]),
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
I(
|
|
1931
|
+
H.value.value === "overview" ? (b(), N(te, { key: 0 }, [
|
|
1932
|
+
n("div", null, [
|
|
1933
|
+
I(G, {
|
|
1927
1934
|
variant: "outlined",
|
|
1928
1935
|
class: "flex flex-col gap-8 px-12 py-16"
|
|
1929
1936
|
}, {
|
|
1930
1937
|
default: se(() => {
|
|
1931
|
-
var U, P,
|
|
1938
|
+
var U, P, W, ve, he, Re, je, Ke, ze, He, Ge, We;
|
|
1932
1939
|
return [
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1940
|
+
n("div", Sr, [
|
|
1941
|
+
n("div", wr, k(h(f)("inventory.transfer.receiveRequest.details.requestSummary")), 1),
|
|
1942
|
+
n("div", null, [
|
|
1936
1943
|
I(w, {
|
|
1937
1944
|
label: h(f)(`inventory.transfer.status.${(U = r.purchaseOrder) == null ? void 0 : U.status}`),
|
|
1938
|
-
class: Ne(`fm-status-badge fm-status-badge-${(
|
|
1945
|
+
class: Ne(`fm-status-badge fm-status-badge-${(W = (P = r.purchaseOrder) == null ? void 0 : P.status) == null ? void 0 : W.toLocaleLowerCase("en-us")}`),
|
|
1939
1946
|
compact: ""
|
|
1940
1947
|
}, null, 8, ["label", "class"])
|
|
1941
1948
|
])
|
|
1942
1949
|
]),
|
|
1943
|
-
I(
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
1950
|
+
I(T),
|
|
1951
|
+
n("div", Rr, [
|
|
1952
|
+
n("div", Or, [
|
|
1953
|
+
n("div", Nr, [
|
|
1954
|
+
n("div", kr, k(h(f)("inventory.transfer.receiveRequest.details.createdAt")), 1)
|
|
1948
1955
|
]),
|
|
1949
|
-
|
|
1956
|
+
n("div", xr, k(h(xe)(((ve = r.purchaseOrder) == null ? void 0 : ve._id) ?? "")), 1)
|
|
1950
1957
|
]),
|
|
1951
1958
|
(he = r.purchaseOrder) != null && he.effectiveAt ? (b(), N("div", Dr, [
|
|
1952
|
-
|
|
1953
|
-
|
|
1959
|
+
n("div", qr, k(h(f)("inventory.transfer.receiveRequest.details.backdatedTo")), 1),
|
|
1960
|
+
n("div", Ar, k(h(tt)(new Date((Re = r.purchaseOrder) == null ? void 0 : Re.effectiveAt))), 1)
|
|
1954
1961
|
])) : V("", !0),
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
1962
|
+
n("div", Tr, [
|
|
1963
|
+
n("div", $r, k(h(f)("inventory.transfer.receiveRequest.details.type.title")), 1),
|
|
1964
|
+
n("div", Cr, k(h(f)(
|
|
1958
1965
|
`inventory.transfer.receiveRequest.details.type.${c.value.toLocaleLowerCase("en-US")}`
|
|
1959
1966
|
)), 1)
|
|
1960
1967
|
]),
|
|
1961
1968
|
(Ke = (je = r.purchaseOrder) == null ? void 0 : je.supplier) != null && Ke.name ? (b(), N("div", Pr, [
|
|
1962
|
-
|
|
1963
|
-
|
|
1969
|
+
n("div", Ir, k(h(f)("inventory.transfer.receiveRequest.details.from")), 1),
|
|
1970
|
+
n("div", Fr, k((He = (ze = r.purchaseOrder) == null ? void 0 : ze.supplier) == null ? void 0 : He.name), 1)
|
|
1964
1971
|
])) : V("", !0),
|
|
1965
1972
|
r.transferTo ? (b(), N("div", Br, [
|
|
1966
|
-
|
|
1967
|
-
|
|
1973
|
+
n("div", Er, k(h(f)("inventory.transfer.receiveRequest.details.to")), 1),
|
|
1974
|
+
n("div", Lr, k(r.transferTo), 1)
|
|
1968
1975
|
])) : V("", !0),
|
|
1969
1976
|
(Ge = r.purchaseOrder) != null && Ge.ref ? (b(), N("div", Ur, [
|
|
1970
|
-
|
|
1971
|
-
|
|
1977
|
+
n("div", Vr, k(h(f)("inventory.transfer.receiveRequest.details.reference")), 1),
|
|
1978
|
+
n("div", Mr, k(r.purchaseOrder.ref), 1)
|
|
1972
1979
|
])) : V("", !0),
|
|
1973
1980
|
(We = r.purchaseOrder) != null && We.remark ? (b(), N("div", jr, [
|
|
1974
|
-
|
|
1975
|
-
|
|
1981
|
+
n("div", Kr, k(h(f)("inventory.transfer.receiveRequest.details.remark")), 1),
|
|
1982
|
+
n("div", zr, k(r.purchaseOrder.remark), 1)
|
|
1976
1983
|
])) : V("", !0)
|
|
1977
1984
|
])
|
|
1978
1985
|
];
|
|
@@ -1987,10 +1994,10 @@ const Lt = { class: "flex flex-row-reverse" }, Ut = /* @__PURE__ */ pe({
|
|
|
1987
1994
|
transferToDbName: r.transferToDbName,
|
|
1988
1995
|
scope: r.scope
|
|
1989
1996
|
}, null, 8, ["po-request", "purchaseOrder", "transferType", "transferToDbName", "scope"]),
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
1997
|
+
n("div", Hr, [
|
|
1998
|
+
n("div", Gr, [
|
|
1999
|
+
n("div", Wr, [
|
|
2000
|
+
n("span", Yr, [
|
|
1994
2001
|
Fe(k(ye.value ? h(f)("inventory.transfer.receiveRequest.details.receivedItems") : h(f)("inventory.transfer.receiveRequest.details.requestedItems")) + " ", 1),
|
|
1995
2002
|
(ne = (L = r.purchaseOrder) == null ? void 0 : L.netSuite) != null && ne.missingItems && ((_e = (ge = r.purchaseOrder) == null ? void 0 : ge.netSuite) == null ? void 0 : _e.missingItems.length) > 0 ? (b(), ae(p, {
|
|
1996
2003
|
key: 0,
|
|
@@ -2001,8 +2008,8 @@ const Lt = { class: "flex flex-row-reverse" }, Ut = /* @__PURE__ */ pe({
|
|
|
2001
2008
|
content: se(() => {
|
|
2002
2009
|
var U, P;
|
|
2003
2010
|
return [
|
|
2004
|
-
|
|
2005
|
-
(b(!0), N(te, null, me((P = (U = r.purchaseOrder) == null ? void 0 : U.netSuite) == null ? void 0 : P.missingItems, (
|
|
2011
|
+
n("div", Qr, [
|
|
2012
|
+
(b(!0), N(te, null, me((P = (U = r.purchaseOrder) == null ? void 0 : U.netSuite) == null ? void 0 : P.missingItems, (W, ve) => (b(), N("div", {
|
|
2006
2013
|
class: "flex justify-center align-middle",
|
|
2007
2014
|
key: ve
|
|
2008
2015
|
}, [
|
|
@@ -2010,7 +2017,7 @@ const Lt = { class: "flex flex-row-reverse" }, Ut = /* @__PURE__ */ pe({
|
|
|
2010
2017
|
name: "arrow_right",
|
|
2011
2018
|
size: "sm"
|
|
2012
2019
|
}),
|
|
2013
|
-
Fe(" " + k(`(${
|
|
2020
|
+
Fe(" " + k(`(${W.netSuiteId}) ${W.name}: ${W.reason}`), 1)
|
|
2014
2021
|
]))), 128))
|
|
2015
2022
|
])
|
|
2016
2023
|
];
|
|
@@ -2026,41 +2033,41 @@ const Lt = { class: "flex flex-row-reverse" }, Ut = /* @__PURE__ */ pe({
|
|
|
2026
2033
|
})) : V("", !0)
|
|
2027
2034
|
])
|
|
2028
2035
|
]),
|
|
2029
|
-
I(
|
|
2036
|
+
I(T),
|
|
2030
2037
|
(b(!0), N(te, null, me(((Se = r.purchaseOrder) == null ? void 0 : Se.items) ?? [], (U) => {
|
|
2031
2038
|
var P;
|
|
2032
2039
|
return b(), N("div", {
|
|
2033
2040
|
key: U.code,
|
|
2034
2041
|
class: "flex flex-col"
|
|
2035
2042
|
}, [
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
|
|
2043
|
+
n("div", Xr, [
|
|
2044
|
+
n("div", Jr, k(U.name), 1),
|
|
2045
|
+
n("div", Zr, k(h(ie)(Ce.value[U.sku._id], !1)) + "/" + k(h(Ot)(U.quantity, U.sku.unit, U.measurement)), 1)
|
|
2039
2046
|
]),
|
|
2040
|
-
|
|
2041
|
-
|
|
2047
|
+
n("div", es, [
|
|
2048
|
+
n("div", ts, k(U.code), 1),
|
|
2042
2049
|
(P = U.totalCost) != null && P.amount && h(l).enableTotalCost ? (b(), N("div", rs, " (" + k(h(Oe)(U.totalCost)) + ") ", 1)) : V("", !0)
|
|
2043
2050
|
])
|
|
2044
2051
|
]);
|
|
2045
2052
|
}), 128)),
|
|
2046
2053
|
+h(ie)(x.value) ? (b(), N(te, { key: 0 }, [
|
|
2047
|
-
|
|
2048
|
-
I(
|
|
2054
|
+
n("div", ss, [
|
|
2055
|
+
I(T)
|
|
2049
2056
|
]),
|
|
2050
|
-
|
|
2051
|
-
m[6] || (m[6] =
|
|
2052
|
-
|
|
2057
|
+
n("div", ns, [
|
|
2058
|
+
m[6] || (m[6] = n("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, "Total:", -1)),
|
|
2059
|
+
n("div", as, k(h(Oe)(x.value)), 1)
|
|
2053
2060
|
])
|
|
2054
2061
|
], 64)) : V("", !0)
|
|
2055
2062
|
])
|
|
2056
2063
|
])
|
|
2057
|
-
], 64)) :
|
|
2064
|
+
], 64)) : H.value.value === "deliveryHistory" ? (b(), N("div", os, [
|
|
2058
2065
|
ce.value.length ? (b(), N("div", ds, [
|
|
2059
2066
|
(b(!0), N(te, null, me(ce.value, (U, P) => (b(), N(te, { key: P }, [
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
|
|
2067
|
+
n("div", ms, [
|
|
2068
|
+
n("div", fs, [
|
|
2069
|
+
n("div", ps, [
|
|
2070
|
+
n("div", {
|
|
2064
2071
|
class: Ne([
|
|
2065
2072
|
{
|
|
2066
2073
|
"bg-fm-color-primary": P !== 0,
|
|
@@ -2070,9 +2077,9 @@ const Lt = { class: "flex flex-row-reverse" }, Ut = /* @__PURE__ */ pe({
|
|
|
2070
2077
|
])
|
|
2071
2078
|
}, null, 2)
|
|
2072
2079
|
]),
|
|
2073
|
-
m[7] || (m[7] =
|
|
2074
|
-
|
|
2075
|
-
|
|
2080
|
+
m[7] || (m[7] = n("div", { class: "h-24 w-24 bg-fm-color-primary rounded-full" }, null, -1)),
|
|
2081
|
+
n("div", ys, [
|
|
2082
|
+
n("div", {
|
|
2076
2083
|
class: Ne([
|
|
2077
2084
|
{
|
|
2078
2085
|
"bg-fm-color-primary": P < ce.value.length - 1,
|
|
@@ -2083,15 +2090,15 @@ const Lt = { class: "flex flex-row-reverse" }, Ut = /* @__PURE__ */ pe({
|
|
|
2083
2090
|
}, null, 2)
|
|
2084
2091
|
])
|
|
2085
2092
|
]),
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2093
|
+
n("div", vs, [
|
|
2094
|
+
n("div", hs, k(U.header), 1),
|
|
2095
|
+
n("div", bs, k(U.date), 1)
|
|
2089
2096
|
])
|
|
2090
2097
|
]),
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
|
|
2098
|
+
n("div", gs, [
|
|
2099
|
+
n("div", _s, [
|
|
2100
|
+
n("div", Ss, [
|
|
2101
|
+
n("div", {
|
|
2095
2102
|
class: Ne([
|
|
2096
2103
|
{
|
|
2097
2104
|
"bg-fm-color-primary": P < ce.value.length - 1,
|
|
@@ -2102,20 +2109,20 @@ const Lt = { class: "flex flex-row-reverse" }, Ut = /* @__PURE__ */ pe({
|
|
|
2102
2109
|
}, null, 2)
|
|
2103
2110
|
])
|
|
2104
2111
|
]),
|
|
2105
|
-
|
|
2106
|
-
I(
|
|
2112
|
+
n("div", ws, [
|
|
2113
|
+
I(G, {
|
|
2107
2114
|
variant: "outlined",
|
|
2108
2115
|
class: "py-12 px-16"
|
|
2109
2116
|
}, {
|
|
2110
2117
|
default: se(() => [
|
|
2111
|
-
|
|
2112
|
-
(b(!0), N(te, null, me(U.info, (
|
|
2118
|
+
n("div", Rs, [
|
|
2119
|
+
(b(!0), N(te, null, me(U.info, (W, ve) => (b(), N("div", {
|
|
2113
2120
|
key: ve,
|
|
2114
2121
|
class: "flex flex-col gap-4"
|
|
2115
2122
|
}, [
|
|
2116
|
-
|
|
2117
|
-
|
|
2118
|
-
(b(!0), N(te, null, me(
|
|
2123
|
+
n("div", Os, k(W == null ? void 0 : W.label), 1),
|
|
2124
|
+
n("div", Ns, [
|
|
2125
|
+
(b(!0), N(te, null, me(W == null ? void 0 : W.values, (he, Re) => (b(), N("div", {
|
|
2119
2126
|
key: Re,
|
|
2120
2127
|
class: "fm-typo-en-body-lg-600"
|
|
2121
2128
|
}, [
|
|
@@ -2133,25 +2140,25 @@ const Lt = { class: "flex flex-row-reverse" }, Ut = /* @__PURE__ */ pe({
|
|
|
2133
2140
|
])
|
|
2134
2141
|
], 64))), 128))
|
|
2135
2142
|
])) : (b(), N("div", is, [
|
|
2136
|
-
I(
|
|
2137
|
-
|
|
2138
|
-
|
|
2143
|
+
I($),
|
|
2144
|
+
n("div", null, [
|
|
2145
|
+
n("img", {
|
|
2139
2146
|
src: h(Nt),
|
|
2140
2147
|
alt: "List is empty"
|
|
2141
2148
|
}, null, 8, ls)
|
|
2142
2149
|
]),
|
|
2143
|
-
|
|
2144
|
-
|
|
2145
|
-
I(
|
|
2146
|
-
I(
|
|
2150
|
+
n("div", cs, k(h(f)("inventory.transfer.receiveRequest.details.noRecordsFound")), 1),
|
|
2151
|
+
n("div", us, k(h(f)("inventory.transfer.receiveRequest.details.trackDeliveryMessage")), 1),
|
|
2152
|
+
I($),
|
|
2153
|
+
I($)
|
|
2147
2154
|
]))
|
|
2148
2155
|
])) : V("", !0)
|
|
2149
2156
|
])
|
|
2150
2157
|
];
|
|
2151
2158
|
}),
|
|
2152
2159
|
"side-sheet-footer": se(() => [
|
|
2153
|
-
|
|
2154
|
-
(b(!0), N(te, null, me(
|
|
2160
|
+
n("div", ks, [
|
|
2161
|
+
(b(!0), N(te, null, me(C.value, (L) => (b(), N(te, null, [
|
|
2155
2162
|
h(Ee)[L].available != !1 ? (b(), ae(B, {
|
|
2156
2163
|
key: L,
|
|
2157
2164
|
label: h(f)(h(Ee)[L].translationKey),
|
|
@@ -2161,21 +2168,21 @@ const Lt = { class: "flex flex-row-reverse" }, Ut = /* @__PURE__ */ pe({
|
|
|
2161
2168
|
variant: h(Ee)[L].buttonVariant
|
|
2162
2169
|
}, null, 8, ["label", "onClick", "loading", "disabled", "variant"])) : V("", !0)
|
|
2163
2170
|
], 64))), 256)),
|
|
2164
|
-
h(
|
|
2171
|
+
h(g).ableToMarkReceived(r.purchaseOrder) && !C.value.includes("completeReceive") ? (b(), ae(B, {
|
|
2165
2172
|
key: 0,
|
|
2166
2173
|
label: h(f)("inventory.transfer.receiveRequest.actions.completeReceive"),
|
|
2167
2174
|
onClick: m[1] || (m[1] = (L) => oe("completeReceive")),
|
|
2168
2175
|
loading: o.value === "completeReceive",
|
|
2169
2176
|
disabled: o.value !== "completeReceive" && u.value
|
|
2170
2177
|
}, null, 8, ["label", "loading", "disabled"])) : V("", !0),
|
|
2171
|
-
h(
|
|
2178
|
+
h(g).ableToMarkApproved(r.purchaseOrder) && r.canApprove && !C.value.includes("approveRequest") ? (b(), ae(B, {
|
|
2172
2179
|
key: 1,
|
|
2173
2180
|
label: h(f)("inventory.transfer.approval.actions.approveRequest"),
|
|
2174
2181
|
onClick: m[2] || (m[2] = (L) => oe("approveRequest")),
|
|
2175
2182
|
loading: o.value === "approveRequest",
|
|
2176
2183
|
disabled: o.value !== "approveRequest" && u.value
|
|
2177
2184
|
}, null, 8, ["label", "loading", "disabled"])) : V("", !0),
|
|
2178
|
-
h(
|
|
2185
|
+
h(g).ableToCreateFulfillment(r.purchaseOrder, r.poRequest) && i.scope === "approval" ? (b(), ae(B, {
|
|
2179
2186
|
key: 2,
|
|
2180
2187
|
label: h(f)("inventory.transfer.receiveRequest.actions.processRequest"),
|
|
2181
2188
|
onClick: m[3] || (m[3] = (L) => oe("processRequest")),
|
|
@@ -2185,7 +2192,7 @@ const Lt = { class: "flex flex-row-reverse" }, Ut = /* @__PURE__ */ pe({
|
|
|
2185
2192
|
I(B, {
|
|
2186
2193
|
label: h(f)("common.close"),
|
|
2187
2194
|
variant: "tertiary",
|
|
2188
|
-
onClick: m[4] || (m[4] = (L) =>
|
|
2195
|
+
onClick: m[4] || (m[4] = (L) => _("update:show", !1))
|
|
2189
2196
|
}, null, 8, ["label"])
|
|
2190
2197
|
])
|
|
2191
2198
|
]),
|