@feedmepos/mf-inventory-portal 1.1.3-dev.1 → 1.1.3-dev.2
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-cNDvnIR8.js → App-Y70p19Gp.js} +1 -1
- package/dist/{ApprovalView-DCZBiIEO.js → ApprovalView-BVyt_mNb.js} +2 -2
- package/dist/{BindingsDialog-D76F8fvx.js → BindingsDialog-BULs3OTl.js} +2 -2
- package/dist/{BindingsPicker-CdpKkspS.js → BindingsPicker-DpAk5M6U.js} +1 -1
- package/dist/{BindingsTable-YQvN_pYF.js → BindingsTable-DzQzbNFw.js} +1 -1
- package/dist/{ClosingDraftView-CCb0FAzW.js → ClosingDraftView-BpRIs-2B.js} +2 -2
- package/dist/{ClosingTemplateView-9UUUma7y.js → ClosingTemplateView-B-kRLpTZ.js} +2 -2
- package/dist/{DeliveryOrderPrintPreview-kIAwU5VW.js → DeliveryOrderPrintPreview-CSZndykZ.js} +1 -1
- package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-DR-pjb50.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-CDvzOUsD.js} +3 -3
- package/dist/{FmMultiselectDialog-C3i332De.js → FmMultiselectDialog-DSJ2MFmR.js} +1 -1
- package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-C4wdN-If.js → FmUnitInput.vue_vue_type_script_setup_true_lang-XUPKPUMs.js} +1 -1
- package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-B5d73yc2.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-c0_HwN-t.js} +1 -1
- package/dist/{IngredientGroupView-BvDH-C9a.js → IngredientGroupView-DQ-EBjd-.js} +2 -2
- package/dist/{IngredientsView-CC4_GIOh.js → IngredientsView-CQgltl5_.js} +4 -4
- package/dist/{IntegrationView-3W5NZOEc.js → IntegrationView-CNcVeIFO.js} +4 -4
- package/dist/{InventoryBindingForm-kKVvfrW2.js → InventoryBindingForm-BuKXc_Sa.js} +1 -1
- package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-BxiQ_Bol.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-DQaufX7H.js} +3 -3
- package/dist/{InventoryBindingSummary-TwWRus0N.js → InventoryBindingSummary-D68_zXou.js} +1 -1
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-C0CFfJnS.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-d2nPZ3lt.js} +1 -1
- package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-DlCQdwHY.js → PremiumBadge.vue_vue_type_script_setup_true_lang-DkRWn5u5.js} +1 -1
- package/dist/{PublishView-cRnx8uFn.js → PublishView-CpQ71JIU.js} +2 -2
- package/dist/{PurchaseOrderPrintPreview-DeKzCEvp.js → PurchaseOrderPrintPreview-DZo7aY7C.js} +1 -1
- package/dist/{ReceiveRequestView-DtaA_-ux.js → ReceiveRequestView-C4546P-_.js} +9 -9
- package/dist/{RecipeView-CJpKAuD-.js → RecipeView-BRwqCYV9.js} +3 -3
- package/dist/{StockView-ddbQuRf-.js → StockView-cvnJr_oX.js} +6 -6
- package/dist/{SupplierView-CUU8z105.js → SupplierView-DwS-SiXQ.js} +3 -3
- package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-D5_7PNKj.js → TransferDetails.vue_vue_type_script_setup_true_lang-B2NLmIxb.js} +602 -597
- package/dist/{TransferTemplateView-B43Gg1Aj.js → TransferTemplateView-CGKjXln1.js} +6 -6
- package/dist/{UnitView-DQLfzNGX.js → UnitView-BabatKhp.js} +3 -3
- package/dist/{WarehouseView-CoNcLEuO.js → WarehouseView-BtEuG-Iw.js} +1 -1
- package/dist/{app-BQG51ddI.js → app-cN81pzZd.js} +16 -16
- package/dist/app.d.ts +3 -3
- package/dist/app.js +1 -1
- package/dist/{decimal-B6rJ9w4Z.js → decimal-CC3JyA3f.js} +1 -1
- package/dist/{format-unit-display-CfRJYIG_.js → format-unit-display-B7SHcLn9.js} +2 -2
- package/dist/{index-B6hmI-pG.js → index-D-5LSVee.js} +1 -1
- package/dist/{index-CqybPlVV.js → index-DldWujwI.js} +1 -1
- package/dist/{stock-B9dC-FDe.js → stock-DBkA5bTB.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/{supplier-C-gaLIFh.js → supplier-C_xP9tgW.js} +1 -1
- package/dist/{use-ingredient-select-dialog-DV9ryvA0.js → use-ingredient-select-dialog-mXti22kH.js} +1 -1
- package/dist/{use-inventory-binding-dialog-BSQQ21da.js → use-inventory-binding-dialog-0b-ngROc.js} +1 -1
- package/dist/views/receive-request/composables/fn.d.ts +24 -0
- package/dist/views/receive-request/composables/use-receive-request-table.d.ts +0 -626
- package/dist/{vue-i18n-h2uQnw9N.js → vue-i18n-DB3u4gQS.js} +401 -401
- package/package.json +1 -1
|
@@ -1,70 +1,70 @@
|
|
|
1
|
-
import { a3 as mt, u as fe, aP as O, aQ as ve, c as Ae, b as $e, a8 as pt, aa as vt, ab as yt, aR as ht, e as
|
|
2
|
-
import { ref as K, computed as J, h as A, defineComponent as be, reactive as Rt, onMounted as it, resolveComponent as G, openBlock as
|
|
3
|
-
import { F as
|
|
1
|
+
import { a3 as mt, u as fe, aP as O, aQ as ve, ax as le, c as Ae, b as $e, a8 as pt, aa as vt, ab as yt, aR as ht, e as Ye, f as tt, a0 as Me, aS as bt, a5 as rt, T as st, j as de, aT as gt, aU as nt, af as Te, h as Xe, i as X, D as ne, aV as ot, aW as at, aX as Fe, av as Je, a7 as De, al as Ee, ay as _t, Q as St } from "./app-cN81pzZd.js";
|
|
2
|
+
import { ref as K, computed as J, h as A, defineComponent as be, reactive as Rt, onMounted as it, resolveComponent as G, openBlock as b, createBlock as ie, withCtx as oe, createElementVNode as i, createVNode as I, unref as S, createElementBlock as N, toDisplayString as D, createCommentVNode as U, Fragment as re, renderList as pe, watch as wt, isRef as Ot, normalizeClass as qe, createTextVNode as Le, resolveDynamicComponent as Nt } from "vue";
|
|
3
|
+
import { F as kt } from "./decimal-CC3JyA3f.js";
|
|
4
4
|
import { useCoreStore as Ce, useI18n as lt } from "@feedmepos/mf-common";
|
|
5
|
-
import { useDialog as
|
|
6
|
-
import { b as Dt, u as qt, P as he, f as Tt } from "./format-unit-display-
|
|
5
|
+
import { useDialog as Ke, useSnackbar as Pe, components as Ze, FmButtonVariant as te, useProxiedModel as xt } from "@feedmepos/ui-library";
|
|
6
|
+
import { b as Dt, u as qt, P as he, f as Tt } from "./format-unit-display-B7SHcLn9.js";
|
|
7
7
|
import { E as At } from "./empty-placeholder-wf6-BWE8.js";
|
|
8
|
-
import { _ as $t, F as Ct, a as Pt } from "./FmUnitInput.vue_vue_type_script_setup_true_lang-
|
|
8
|
+
import { _ as $t, F as Ct, a as Pt } from "./FmUnitInput.vue_vue_type_script_setup_true_lang-XUPKPUMs.js";
|
|
9
9
|
import { u as It, R as et } from "./usePromise-CbVUCxhj.js";
|
|
10
|
-
import { u as Ft } from "./index-
|
|
11
|
-
const Ie = mt((f,
|
|
12
|
-
const s = fe(),
|
|
10
|
+
import { u as Ft } from "./index-DldWujwI.js";
|
|
11
|
+
const Ie = mt((f, e) => {
|
|
12
|
+
const s = fe(), h = Ce();
|
|
13
13
|
return {
|
|
14
|
-
async readRequests(u,
|
|
14
|
+
async readRequests(u, t, c) {
|
|
15
15
|
const n = u ?? s.currentLocationDBName, r = `${f.inventoryBackendUrl}/${n}/purchase-request`;
|
|
16
|
-
return
|
|
16
|
+
return t && c ? await e.get(`${r}?startDate=${t}&endDate=${c}`) : await e.get(r);
|
|
17
17
|
},
|
|
18
|
-
async readRequestById(u,
|
|
19
|
-
const c =
|
|
20
|
-
return await
|
|
18
|
+
async readRequestById(u, t) {
|
|
19
|
+
const c = t ?? s.currentLocationDBName, n = `${f.inventoryBackendUrl}/${c}/purchase-request/${u}`;
|
|
20
|
+
return await e.get(n);
|
|
21
21
|
},
|
|
22
|
-
async readRequestByIds(u,
|
|
23
|
-
const c =
|
|
24
|
-
return await
|
|
22
|
+
async readRequestByIds(u, t) {
|
|
23
|
+
const c = t ?? s.currentLocationDBName, n = `${f.inventoryBackendUrl}/${c}/purchase-request/find`;
|
|
24
|
+
return await e.post(n, { requestIds: u });
|
|
25
25
|
},
|
|
26
26
|
async getPurchaseOrders({
|
|
27
27
|
start: u,
|
|
28
|
-
end:
|
|
28
|
+
end: t
|
|
29
29
|
}) {
|
|
30
30
|
const c = s.currentLocationDBName, n = `${f.inventoryBackendUrl}/${c}/purchase-order`;
|
|
31
|
-
return await
|
|
31
|
+
return await e.get(`${n}?start=${u}&end=${t}`);
|
|
32
32
|
},
|
|
33
33
|
async getLatestPurchaseOrderRequest(u) {
|
|
34
|
-
const
|
|
35
|
-
return await
|
|
34
|
+
const t = s.currentLocationDBName, c = `${f.inventoryBackendUrl}/${t}/purchase-request/find-by-purchase-order-id`;
|
|
35
|
+
return await e.get(`${c}/${u}`);
|
|
36
36
|
},
|
|
37
37
|
async getPurchaseOrderById(u) {
|
|
38
|
-
const
|
|
39
|
-
return await
|
|
38
|
+
const t = s.currentLocationDBName, c = `${f.inventoryBackendUrl}/${t}/purchase-order`;
|
|
39
|
+
return await e.get(`${c}/${u}`);
|
|
40
40
|
},
|
|
41
41
|
/**
|
|
42
42
|
* @deprecated Use `processPurchaseOrderV2` instead.
|
|
43
43
|
*/
|
|
44
|
-
async processPurchaseOrder(u,
|
|
45
|
-
const c = s.currentLocationDBName, n =
|
|
46
|
-
return await
|
|
44
|
+
async processPurchaseOrder(u, t) {
|
|
45
|
+
const c = s.currentLocationDBName, n = t || c, r = `${f.inventoryBackendUrl}/${n}/purchase-order/run-operation`;
|
|
46
|
+
return await e.put(r, u);
|
|
47
47
|
},
|
|
48
48
|
async createPurchaseOrder(u) {
|
|
49
|
-
const
|
|
50
|
-
return await
|
|
49
|
+
const t = s.currentLocationDBName, c = `${f.inventoryBackendUrl}/${t}/purchase-order`;
|
|
50
|
+
return await e.post(c, u);
|
|
51
51
|
},
|
|
52
52
|
async updatePurchaseOrder(u) {
|
|
53
|
-
const
|
|
54
|
-
return await
|
|
53
|
+
const t = s.currentLocationDBName, c = `${f.inventoryBackendUrl}/${t}/purchase-order`;
|
|
54
|
+
return await e.put(c, u);
|
|
55
55
|
},
|
|
56
56
|
async importFromXilnex(u) {
|
|
57
|
-
const
|
|
58
|
-
return await
|
|
57
|
+
const t = s.currentLocationDBName, c = `${f.inventoryBackendUrl}/${t}/purchase-order/import-from-xilnex`;
|
|
58
|
+
return await e.post(c, u);
|
|
59
59
|
},
|
|
60
|
-
async processPurchaseOrderV2(u,
|
|
61
|
-
const c = s.currentLocationDBName, n =
|
|
62
|
-
return await
|
|
60
|
+
async processPurchaseOrderV2(u, t) {
|
|
61
|
+
const c = s.currentLocationDBName, n = t || c, r = `${f.inventoryBackendUrl}/${n}/v2/purchase-order/run-operation`;
|
|
62
|
+
return await e.put(r, u);
|
|
63
63
|
},
|
|
64
64
|
async getWorkflowConfig() {
|
|
65
65
|
var n;
|
|
66
|
-
const
|
|
67
|
-
return await
|
|
66
|
+
const t = `business_${(n = h.currentBusiness.value) == null ? void 0 : n._id}`, c = `${f.inventoryBackendUrl}/${t}/v2/purchase-order/workflow-config`;
|
|
67
|
+
return await e.get(c);
|
|
68
68
|
}
|
|
69
69
|
};
|
|
70
70
|
}), ct = {
|
|
@@ -136,10 +136,10 @@ const Ie = mt((f, t) => {
|
|
|
136
136
|
}
|
|
137
137
|
}, ye = exports.FfCalculator;
|
|
138
138
|
function ut(f) {
|
|
139
|
-
var
|
|
140
|
-
const
|
|
141
|
-
for (const c of
|
|
142
|
-
const n =
|
|
139
|
+
var t;
|
|
140
|
+
const e = f.version ?? ve.enum[1], s = {}, h = f.items ?? [];
|
|
141
|
+
for (const c of h) {
|
|
142
|
+
const n = e === ve.enum[2] ? c.id : c.sku._id;
|
|
143
143
|
s[n] || (s[n] = {
|
|
144
144
|
key: n,
|
|
145
145
|
total: c.quantity,
|
|
@@ -150,12 +150,12 @@ function ut(f) {
|
|
|
150
150
|
const u = f.deliveryOrder ?? [];
|
|
151
151
|
for (const c of u)
|
|
152
152
|
for (const n of c.received) {
|
|
153
|
-
const r =
|
|
153
|
+
const r = e === ve.enum[2] ? n.id : n.sku._id;
|
|
154
154
|
if (!s[r]) {
|
|
155
155
|
console.warn(`key ${r} not found in receivedMap`);
|
|
156
156
|
continue;
|
|
157
157
|
}
|
|
158
|
-
const p = ((
|
|
158
|
+
const p = ((t = s[r]) == null ? void 0 : t.received) ?? ye.fromNumber(0);
|
|
159
159
|
s[r].received = ye.add([p, n.amount]), s[r].remaining = ye.subtract([
|
|
160
160
|
s[r].total,
|
|
161
161
|
s[r].received
|
|
@@ -181,45 +181,60 @@ function dt(f) {
|
|
|
181
181
|
isOverReceive: !0
|
|
182
182
|
} : {};
|
|
183
183
|
}
|
|
184
|
+
function Et(f, e, s) {
|
|
185
|
+
switch (f) {
|
|
186
|
+
case le.Enum.PROCESSING: {
|
|
187
|
+
if (e)
|
|
188
|
+
return "PARTIAL_FULFILLED";
|
|
189
|
+
break;
|
|
190
|
+
}
|
|
191
|
+
case le.Enum.RECEIVING: {
|
|
192
|
+
if (e)
|
|
193
|
+
return "PARTIAL_RECEIVED";
|
|
194
|
+
break;
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
return f;
|
|
198
|
+
}
|
|
184
199
|
function ft() {
|
|
185
|
-
const f = fe(),
|
|
186
|
-
async function
|
|
200
|
+
const f = fe(), e = Ie(), s = Ae();
|
|
201
|
+
async function h(t, c) {
|
|
187
202
|
const n = f.currentLocationDBName;
|
|
188
|
-
return
|
|
203
|
+
return t.doc.supplier.internal && t.operation === O.enum.confirmDraft && (t.operation = O.enum.submitRequest), await e.processPurchaseOrder(t, c || n);
|
|
189
204
|
}
|
|
190
|
-
async function u(
|
|
205
|
+
async function u(t, c) {
|
|
191
206
|
const n = f.currentLocationDBName;
|
|
192
|
-
return await
|
|
207
|
+
return await e.processPurchaseOrderV2(t, c || n);
|
|
193
208
|
}
|
|
194
|
-
return (
|
|
209
|
+
return (t) => s.useOperatePurchaseOrderV2 ? u(t.operateV2, t.transferTo) : h(t.operate, t.transferTo);
|
|
195
210
|
}
|
|
196
|
-
var
|
|
211
|
+
var Ue = /* @__PURE__ */ ((f) => (f.RECEIVE_REQUEST = "receive/request", f.APPROVAL = "approval", f))(Ue || {});
|
|
197
212
|
const Ne = K(), Be = K();
|
|
198
|
-
function
|
|
199
|
-
const s =
|
|
213
|
+
function js(f, e) {
|
|
214
|
+
const s = Ke(), h = fe(), u = Ae();
|
|
200
215
|
$e();
|
|
201
|
-
const
|
|
202
|
-
|
|
216
|
+
const t = Dt(), c = qt(), n = K(!1), r = Pe(), p = Ie(), g = K(new Array()), v = K(
|
|
217
|
+
e != null && e.startDate && (e != null && e.endDate) ? e : pt()
|
|
203
218
|
), m = J(() => {
|
|
204
|
-
const q = new Date(v.value.startDate),
|
|
219
|
+
const q = new Date(v.value.startDate), T = new Date(v.value.endDate);
|
|
205
220
|
return {
|
|
206
221
|
start: vt(q).toISOString(),
|
|
207
|
-
end: yt(
|
|
222
|
+
end: yt(T).toISOString()
|
|
208
223
|
};
|
|
209
|
-
}), l = K(new Array()), a = ht(),
|
|
210
|
-
async function
|
|
211
|
-
function
|
|
212
|
-
const
|
|
213
|
-
mode:
|
|
224
|
+
}), l = K(new Array()), a = ht(), _ = K(null);
|
|
225
|
+
async function w(q) {
|
|
226
|
+
function T(d) {
|
|
227
|
+
const x = {
|
|
228
|
+
mode: Ye.CREATE,
|
|
214
229
|
modelValue: q || void 0,
|
|
215
230
|
show: !0,
|
|
216
|
-
"onUpdate:show"(
|
|
217
|
-
Ne.value.show =
|
|
231
|
+
"onUpdate:show"(R) {
|
|
232
|
+
Ne.value.show = R;
|
|
218
233
|
},
|
|
219
234
|
templateId: d,
|
|
220
|
-
lastClosingDate:
|
|
235
|
+
lastClosingDate: _.value
|
|
221
236
|
};
|
|
222
|
-
Ne.value =
|
|
237
|
+
Ne.value = x;
|
|
223
238
|
}
|
|
224
239
|
let o;
|
|
225
240
|
u.mustUsePoTemplate && !(q != null && q.template) ? s.open({
|
|
@@ -235,32 +250,32 @@ function Ks(f, t) {
|
|
|
235
250
|
close: !0
|
|
236
251
|
}
|
|
237
252
|
}).onPrimary(async () => {
|
|
238
|
-
o = await
|
|
253
|
+
o = await t.getTemplateId(), o && T(o);
|
|
239
254
|
}).onSecondary(() => {
|
|
240
|
-
|
|
241
|
-
}) :
|
|
255
|
+
T(void 0);
|
|
256
|
+
}) : T(o);
|
|
242
257
|
}
|
|
243
|
-
function
|
|
244
|
-
const
|
|
245
|
-
mode:
|
|
258
|
+
function k(q) {
|
|
259
|
+
const T = {
|
|
260
|
+
mode: Ye.UPDATE,
|
|
246
261
|
modelValue: tt(q),
|
|
247
262
|
show: !0,
|
|
248
263
|
"onUpdate:show"(o) {
|
|
249
264
|
Ne.value.show = o;
|
|
250
265
|
},
|
|
251
|
-
lastClosingDate:
|
|
266
|
+
lastClosingDate: _.value
|
|
252
267
|
};
|
|
253
|
-
Ne.value =
|
|
268
|
+
Ne.value = T;
|
|
254
269
|
}
|
|
255
|
-
async function
|
|
256
|
-
|
|
270
|
+
async function F() {
|
|
271
|
+
g.value = [], n.value = !0;
|
|
257
272
|
try {
|
|
258
|
-
|
|
259
|
-
const q = await a.readCurrentLocationLastClosing(!0),
|
|
260
|
-
|
|
261
|
-
const o =
|
|
262
|
-
var
|
|
263
|
-
return ((
|
|
273
|
+
g.value = await p.getPurchaseOrders(m.value).then((d) => d.sort((x, R) => R._id.localeCompare(x._id)));
|
|
274
|
+
const q = await a.readCurrentLocationLastClosing(!0), T = q == null ? void 0 : q._id;
|
|
275
|
+
T && (_.value = bt(T)), await u.awaitFeatureLoaded(() => u.mustUsePoTemplate) && await c.fetchTemplates();
|
|
276
|
+
const o = g.value.map((d) => {
|
|
277
|
+
var x;
|
|
278
|
+
return ((x = d.request) == null ? void 0 : x.id) ?? "";
|
|
264
279
|
}).filter((d) => d);
|
|
265
280
|
l.value = await p.readRequestByIds(o);
|
|
266
281
|
} catch {
|
|
@@ -273,7 +288,7 @@ function Ks(f, t) {
|
|
|
273
288
|
n.value = !1;
|
|
274
289
|
}
|
|
275
290
|
}
|
|
276
|
-
async function
|
|
291
|
+
async function $() {
|
|
277
292
|
l.value = [], n.value = !0;
|
|
278
293
|
try {
|
|
279
294
|
l.value = await p.readRequests(
|
|
@@ -294,58 +309,58 @@ function Ks(f, t) {
|
|
|
294
309
|
function C() {
|
|
295
310
|
switch (f) {
|
|
296
311
|
case "receive/request":
|
|
297
|
-
return
|
|
312
|
+
return F();
|
|
298
313
|
case "approval":
|
|
299
|
-
return
|
|
314
|
+
return $();
|
|
300
315
|
}
|
|
301
316
|
}
|
|
302
|
-
function M(q,
|
|
317
|
+
function M(q, T) {
|
|
303
318
|
v.value = {
|
|
304
319
|
startDate: q,
|
|
305
|
-
endDate:
|
|
320
|
+
endDate: T
|
|
306
321
|
}, C();
|
|
307
322
|
}
|
|
308
|
-
|
|
323
|
+
h.watchLocation(async (q) => {
|
|
309
324
|
if (!q) {
|
|
310
|
-
|
|
325
|
+
g.value = [];
|
|
311
326
|
return;
|
|
312
327
|
}
|
|
313
328
|
await C();
|
|
314
329
|
});
|
|
315
|
-
const j = K(),
|
|
316
|
-
async function
|
|
330
|
+
const j = K(), ae = K(Math.random().toString());
|
|
331
|
+
async function se(q, T) {
|
|
317
332
|
const o = Math.random().toString();
|
|
318
|
-
|
|
319
|
-
(
|
|
333
|
+
ae.value = o, T ?? (T = l.value.computeFirst(
|
|
334
|
+
(R) => R.purchaseOrderId === q._id ? R : null
|
|
320
335
|
) ?? void 0);
|
|
321
|
-
const d = f === "receive/request" ?
|
|
322
|
-
poRequest:
|
|
336
|
+
const d = f === "receive/request" ? h.currentLocation : T == null ? void 0 : T.to, x = {
|
|
337
|
+
poRequest: T,
|
|
323
338
|
purchaseOrder: q,
|
|
324
339
|
transferTo: d == null ? void 0 : d.name,
|
|
325
340
|
transferToDbName: d == null ? void 0 : d.dbName,
|
|
326
341
|
show: !0,
|
|
327
342
|
canResubmit: !1,
|
|
328
343
|
canApprove: f === "approval",
|
|
329
|
-
"onUpdate:show"(
|
|
330
|
-
j.value.show =
|
|
344
|
+
"onUpdate:show"(R) {
|
|
345
|
+
j.value.show = R;
|
|
331
346
|
},
|
|
332
347
|
scope: f,
|
|
333
348
|
receivedMap: ut(q) ?? {}
|
|
334
349
|
};
|
|
335
|
-
j.value =
|
|
350
|
+
j.value = x;
|
|
336
351
|
}
|
|
337
|
-
async function ge(q,
|
|
338
|
-
const
|
|
352
|
+
async function ge(q, T, o, d) {
|
|
353
|
+
const x = ft();
|
|
339
354
|
n.value = !0;
|
|
340
355
|
try {
|
|
341
|
-
await
|
|
356
|
+
await x({
|
|
342
357
|
operate: {
|
|
343
|
-
operation:
|
|
358
|
+
operation: T,
|
|
344
359
|
doc: q,
|
|
345
360
|
options: (
|
|
346
361
|
// auto receive for supplier to warehouse
|
|
347
|
-
(
|
|
348
|
-
|
|
362
|
+
(T === O.enum.confirmDraft || // auto receive for warehouse to warehouse
|
|
363
|
+
T === O.enum.completeReceive) && u.autoReceiveWarehouse ? {
|
|
349
364
|
autoReceive: !0
|
|
350
365
|
} : void 0
|
|
351
366
|
)
|
|
@@ -353,13 +368,13 @@ function Ks(f, t) {
|
|
|
353
368
|
operateV2: {
|
|
354
369
|
_id: q._id,
|
|
355
370
|
_rev: q._rev ?? "",
|
|
356
|
-
action:
|
|
371
|
+
action: T,
|
|
357
372
|
payloads: []
|
|
358
373
|
},
|
|
359
374
|
transferTo: d
|
|
360
375
|
}), await new Promise((H) => setTimeout(H, 1e3));
|
|
361
376
|
const z = fe().currentLocationDBName.startsWith("restaurant_");
|
|
362
|
-
|
|
377
|
+
T === O.enum.confirmDraft && q.effectiveAt && z ? r.open({
|
|
363
378
|
title: "Success",
|
|
364
379
|
message: `${o}. The backdate will be reflected once your POS has received this change.`,
|
|
365
380
|
type: "success"
|
|
@@ -368,36 +383,36 @@ function Ks(f, t) {
|
|
|
368
383
|
message: o,
|
|
369
384
|
type: "success"
|
|
370
385
|
});
|
|
371
|
-
} catch (
|
|
386
|
+
} catch (R) {
|
|
372
387
|
r.open({
|
|
373
388
|
title: "Something went wrong",
|
|
374
389
|
message: "Please try again.",
|
|
375
390
|
type: "error"
|
|
376
|
-
}), console.error("Error when submitting PO operation",
|
|
391
|
+
}), console.error("Error when submitting PO operation", T, q, R);
|
|
377
392
|
} finally {
|
|
378
393
|
n.value = !1, C();
|
|
379
394
|
}
|
|
380
395
|
}
|
|
381
|
-
async function
|
|
382
|
-
const d = ct[
|
|
396
|
+
async function ce(q, T, o) {
|
|
397
|
+
const d = ct[T];
|
|
383
398
|
if (!d) {
|
|
384
399
|
r.open({
|
|
385
400
|
title: "Something went wrong",
|
|
386
|
-
message: `Cannot process order: ${
|
|
401
|
+
message: `Cannot process order: ${Me(T)}`,
|
|
387
402
|
type: "error"
|
|
388
403
|
});
|
|
389
404
|
return;
|
|
390
405
|
}
|
|
391
|
-
const { successMessage:
|
|
406
|
+
const { successMessage: x, ...R } = d;
|
|
392
407
|
s.open({
|
|
393
|
-
title:
|
|
394
|
-
message:
|
|
395
|
-
primaryActions:
|
|
408
|
+
title: R.title,
|
|
409
|
+
message: R.message,
|
|
410
|
+
primaryActions: R.primaryActions
|
|
396
411
|
}).onPrimary(() => {
|
|
397
|
-
ge(q,
|
|
412
|
+
ge(q, T, x, o);
|
|
398
413
|
});
|
|
399
414
|
}
|
|
400
|
-
async function
|
|
415
|
+
async function ke() {
|
|
401
416
|
s.open({
|
|
402
417
|
title: "Upload Transfer",
|
|
403
418
|
primaryActions: {
|
|
@@ -411,40 +426,40 @@ function Ks(f, t) {
|
|
|
411
426
|
}).onPrimary(() => {
|
|
412
427
|
const q = {
|
|
413
428
|
show: !0,
|
|
414
|
-
"onUpdate:show"(
|
|
415
|
-
Be.value.show =
|
|
429
|
+
"onUpdate:show"(T) {
|
|
430
|
+
Be.value.show = T;
|
|
416
431
|
}
|
|
417
432
|
};
|
|
418
433
|
Be.value = q;
|
|
419
434
|
});
|
|
420
435
|
}
|
|
421
436
|
return {
|
|
422
|
-
purchaseOrders:
|
|
437
|
+
purchaseOrders: g,
|
|
423
438
|
purchaseRequests: l,
|
|
424
439
|
updateDateRange: M,
|
|
425
440
|
fetchData: C,
|
|
426
441
|
loading: n,
|
|
427
442
|
transferDialogProps: Ne,
|
|
428
|
-
promptCreateTransferDialog:
|
|
429
|
-
promptUpdateTransferDialog:
|
|
443
|
+
promptCreateTransferDialog: w,
|
|
444
|
+
promptUpdateTransferDialog: k,
|
|
430
445
|
transferDetailsProps: j,
|
|
431
|
-
promptShowTransferDetails:
|
|
432
|
-
submitAction:
|
|
446
|
+
promptShowTransferDetails: se,
|
|
447
|
+
submitAction: ce,
|
|
433
448
|
xilnexImportDialogProps: Be,
|
|
434
|
-
promptUploadTransferDialog:
|
|
449
|
+
promptUploadTransferDialog: ke
|
|
435
450
|
};
|
|
436
451
|
}
|
|
437
|
-
function
|
|
438
|
-
return
|
|
439
|
-
(
|
|
440
|
-
const
|
|
441
|
-
return
|
|
452
|
+
function Lt(f, e) {
|
|
453
|
+
return e.reduce(
|
|
454
|
+
(h, u) => {
|
|
455
|
+
const t = u.received.find((c) => c.sku._id === f._id);
|
|
456
|
+
return t && (h = rt(h, t.amount)), h;
|
|
442
457
|
},
|
|
443
|
-
|
|
458
|
+
kt.toPrecision(st(0), f.unit.precision)
|
|
444
459
|
);
|
|
445
460
|
}
|
|
446
|
-
function
|
|
447
|
-
const { po:
|
|
461
|
+
function Bt(f) {
|
|
462
|
+
const { po: e, currentLocation: s, business: h, fulfilling: u, por: t } = f, { name: c, address: n, regNo: r } = s.doc.profile, p = {
|
|
448
463
|
name: c,
|
|
449
464
|
registrationNumber: r,
|
|
450
465
|
line1: n == null ? void 0 : n.line1,
|
|
@@ -453,41 +468,41 @@ function Lt(f) {
|
|
|
453
468
|
city: n == null ? void 0 : n.city,
|
|
454
469
|
state: n == null ? void 0 : n.state,
|
|
455
470
|
country: n == null ? void 0 : n.country
|
|
456
|
-
},
|
|
457
|
-
name:
|
|
458
|
-
phoneNumber:
|
|
459
|
-
registrationNumber:
|
|
460
|
-
line1:
|
|
461
|
-
line2:
|
|
462
|
-
postcode:
|
|
463
|
-
city:
|
|
464
|
-
state:
|
|
465
|
-
country:
|
|
466
|
-
}, v =
|
|
467
|
-
const { sku: C, measurement: M } =
|
|
468
|
-
|
|
471
|
+
}, g = {
|
|
472
|
+
name: e.supplier.name,
|
|
473
|
+
phoneNumber: e.supplier.phoneNumber,
|
|
474
|
+
registrationNumber: e.supplier.registrationNumber,
|
|
475
|
+
line1: e.supplier.address.line1,
|
|
476
|
+
line2: e.supplier.address.line2,
|
|
477
|
+
postcode: e.supplier.address.postcode,
|
|
478
|
+
city: e.supplier.address.city,
|
|
479
|
+
state: e.supplier.address.state,
|
|
480
|
+
country: e.supplier.address.country
|
|
481
|
+
}, v = e.items.map(($) => {
|
|
482
|
+
const { sku: C, measurement: M } = $, j = de(
|
|
483
|
+
Lt($.sku, e.deliveryOrder || []),
|
|
469
484
|
!1
|
|
470
485
|
);
|
|
471
486
|
return {
|
|
472
487
|
code: C.code,
|
|
473
488
|
description: C.name,
|
|
474
|
-
quantity:
|
|
489
|
+
quantity: de($.quantity, !1),
|
|
475
490
|
unit: (M == null ? void 0 : M.abbrev) || C.unit.abbrev,
|
|
476
491
|
received: j,
|
|
477
|
-
cost:
|
|
478
|
-
value:
|
|
492
|
+
cost: $.totalCost ? `${$.totalCost.currency} ${gt.toFormatString({
|
|
493
|
+
value: $.totalCost
|
|
479
494
|
})}` : void 0
|
|
480
495
|
};
|
|
481
|
-
}), m =
|
|
482
|
-
createdAt: nt(new Date(
|
|
483
|
-
ref:
|
|
484
|
-
remark:
|
|
485
|
-
items:
|
|
496
|
+
}), m = e.deliveryOrder.map(($) => ({
|
|
497
|
+
createdAt: nt(new Date($.createdAt)),
|
|
498
|
+
ref: $.deliveryOrderNumber,
|
|
499
|
+
remark: $.remark || "",
|
|
500
|
+
items: $.received.map((C) => {
|
|
486
501
|
var M;
|
|
487
502
|
return {
|
|
488
503
|
code: C.sku.code,
|
|
489
504
|
description: C.sku.name,
|
|
490
|
-
quantity:
|
|
505
|
+
quantity: de(C.amount),
|
|
491
506
|
unit: ((M = C.measurement) == null ? void 0 : M.abbrev) || C.sku.unit.abbrev
|
|
492
507
|
};
|
|
493
508
|
})
|
|
@@ -498,25 +513,25 @@ function Lt(f) {
|
|
|
498
513
|
"6880b36a3054c5001db19218"
|
|
499
514
|
];
|
|
500
515
|
let a = "Inventory Receive Note";
|
|
501
|
-
if (
|
|
502
|
-
const
|
|
503
|
-
s.dbName ===
|
|
516
|
+
if (e.supplier.internal ? (a = "Inventory Transfer Note", l.includes((h == null ? void 0 : h._id) || "") && (a = "Stock Request")) : a = "Purchase Order", t) {
|
|
517
|
+
const $ = t.from.dbName;
|
|
518
|
+
s.dbName === $ || (a = "Inventory Receive Note");
|
|
504
519
|
}
|
|
505
|
-
const
|
|
520
|
+
const w = {
|
|
506
521
|
title: a,
|
|
507
|
-
businessName:
|
|
508
|
-
logo:
|
|
509
|
-
orderNumber:
|
|
510
|
-
createdAt: Te(
|
|
511
|
-
ref:
|
|
512
|
-
remark:
|
|
522
|
+
businessName: h == null ? void 0 : h.name,
|
|
523
|
+
logo: h == null ? void 0 : h.thumbnail,
|
|
524
|
+
orderNumber: e.seqNumber.toString(),
|
|
525
|
+
createdAt: Te(e._id),
|
|
526
|
+
ref: e.ref || "",
|
|
527
|
+
remark: e.remark || "",
|
|
513
528
|
buyer: p,
|
|
514
|
-
supplier:
|
|
529
|
+
supplier: g,
|
|
515
530
|
items: v,
|
|
516
|
-
status:
|
|
531
|
+
status: e.status,
|
|
517
532
|
deliveryOrders: m
|
|
518
|
-
},
|
|
519
|
-
|
|
533
|
+
}, k = new URL(window.location.href), F = u && (e.deliveryFullfillment || []).length > 0 ? "receive-request/delivery-print-preview" : "receive-request/print-preview";
|
|
534
|
+
k.pathname = k.hostname.includes("portal.feedme") ? `/inventory/${F}` : `/${F}`, k.searchParams.append("data", JSON.stringify(w)), window.open(k.href, "_blank", "noreferrer");
|
|
520
535
|
}
|
|
521
536
|
const Re = {
|
|
522
537
|
submitRequest: {
|
|
@@ -580,48 +595,48 @@ const Re = {
|
|
|
580
595
|
value: O.enum.returnStock
|
|
581
596
|
}
|
|
582
597
|
};
|
|
583
|
-
function
|
|
584
|
-
const s = fe(),
|
|
598
|
+
function zs(f, e) {
|
|
599
|
+
const s = fe(), h = $e(), u = Ce(), { t } = lt();
|
|
585
600
|
function c(m) {
|
|
586
601
|
switch (m.status) {
|
|
587
602
|
case "DRAFT":
|
|
588
603
|
return [
|
|
589
|
-
|
|
590
|
-
|
|
604
|
+
ne[X.Update],
|
|
605
|
+
ne[X.Details],
|
|
591
606
|
m.supplier.internal === "restaurant" || m.supplier.internal === "warehouse" ? Re[O.enum.submitRequest] : Re[O.enum.confirmDraft],
|
|
592
607
|
Re[O.enum.cancelDraft]
|
|
593
608
|
];
|
|
594
609
|
case "RECEIVING":
|
|
595
610
|
return [
|
|
596
611
|
Re[O.enum.completeReceive],
|
|
597
|
-
|
|
598
|
-
|
|
612
|
+
ne[X.Details],
|
|
613
|
+
ne[X.Print]
|
|
599
614
|
];
|
|
600
615
|
case "REQUESTING":
|
|
601
|
-
return f === "receive/request" ? [
|
|
616
|
+
return f === "receive/request" ? [ne[X.Details], ne[X.Print]] : [
|
|
602
617
|
Re[O.enum.approveRequest],
|
|
603
618
|
Re[O.enum.rejectRequest],
|
|
604
|
-
|
|
619
|
+
ne[X.Details]
|
|
605
620
|
// DefaultRowActions[RowActionEnum.Print]
|
|
606
621
|
];
|
|
607
622
|
case "PROCESSING":
|
|
608
|
-
return [
|
|
623
|
+
return [ne[X.Details], ne[X.Print]];
|
|
609
624
|
case "COMPLETE":
|
|
610
625
|
case "CANCEL":
|
|
611
626
|
default:
|
|
612
|
-
return [
|
|
627
|
+
return [ne[X.Details], ne[X.Print]];
|
|
613
628
|
}
|
|
614
629
|
}
|
|
615
630
|
function n(m) {
|
|
616
631
|
return Object.values(O.enum).includes(m);
|
|
617
632
|
}
|
|
618
633
|
async function r(m, l, a) {
|
|
619
|
-
var
|
|
620
|
-
const
|
|
634
|
+
var w, k, F, $, C, M;
|
|
635
|
+
const _ = tt(l);
|
|
621
636
|
if (m === X.Print) {
|
|
622
637
|
const j = (a == null ? void 0 : a.toInventoryLocation) ?? s.currentLocation;
|
|
623
|
-
((
|
|
624
|
-
po:
|
|
638
|
+
((w = a == null ? void 0 : a.netSuite) != null && w.refNo || (k = _.netSuite) != null && k.refNo) && (_.ref = [((F = a == null ? void 0 : a.netSuite) == null ? void 0 : F.refNo) || (($ = _.netSuite) == null ? void 0 : $.refNo)].filter((ae) => ae).join(" ")), Bt({
|
|
639
|
+
po: _,
|
|
625
640
|
currentLocation: j,
|
|
626
641
|
business: u.currentBusiness.value,
|
|
627
642
|
fulfilling: f === "approval",
|
|
@@ -630,15 +645,15 @@ function js(f, t) {
|
|
|
630
645
|
return;
|
|
631
646
|
}
|
|
632
647
|
if (m === X.Details) {
|
|
633
|
-
|
|
648
|
+
e.promptShowTransferDetails(_, a);
|
|
634
649
|
return;
|
|
635
650
|
}
|
|
636
651
|
if (m === X.Update) {
|
|
637
|
-
(C =
|
|
652
|
+
(C = e.promptUpdateTransferDialog) == null || C.call(e, _);
|
|
638
653
|
return;
|
|
639
654
|
}
|
|
640
655
|
if (n(m)) {
|
|
641
|
-
|
|
656
|
+
e.submitAction(l, m, (M = a == null ? void 0 : a.to) == null ? void 0 : M.dbName);
|
|
642
657
|
return;
|
|
643
658
|
}
|
|
644
659
|
}
|
|
@@ -646,14 +661,14 @@ function js(f, t) {
|
|
|
646
661
|
const m = [
|
|
647
662
|
{
|
|
648
663
|
accessorKey: "seqNumber",
|
|
649
|
-
header: () =>
|
|
664
|
+
header: () => t("inventory.transfer.table.seqNo"),
|
|
650
665
|
enableSorting: !0,
|
|
651
666
|
size: 80,
|
|
652
667
|
sortUndefined: "last"
|
|
653
668
|
},
|
|
654
669
|
{
|
|
655
670
|
accessorKey: "_id",
|
|
656
|
-
header: () =>
|
|
671
|
+
header: () => t("inventory.transfer.table.createdAt"),
|
|
657
672
|
cell(l) {
|
|
658
673
|
return Te(`${l.getValue()}`);
|
|
659
674
|
},
|
|
@@ -661,13 +676,13 @@ function js(f, t) {
|
|
|
661
676
|
},
|
|
662
677
|
{
|
|
663
678
|
accessorKey: "supplier.name",
|
|
664
|
-
header: () =>
|
|
679
|
+
header: () => t("inventory.transfer.table.transferFrom"),
|
|
665
680
|
enableSorting: !0,
|
|
666
681
|
size: 200
|
|
667
682
|
},
|
|
668
683
|
{
|
|
669
684
|
accessorKey: "items.length",
|
|
670
|
-
header: () =>
|
|
685
|
+
header: () => t("inventory.transfer.table.noOfItems"),
|
|
671
686
|
enableSorting: !1,
|
|
672
687
|
meta: {
|
|
673
688
|
width: "10rem"
|
|
@@ -675,15 +690,23 @@ function js(f, t) {
|
|
|
675
690
|
},
|
|
676
691
|
{
|
|
677
692
|
accessorKey: "ref",
|
|
678
|
-
header: () =>
|
|
693
|
+
header: () => t("inventory.transfer.table.reference"),
|
|
679
694
|
enableSorting: !1,
|
|
680
695
|
size: "auto"
|
|
681
696
|
},
|
|
682
697
|
{
|
|
683
698
|
accessorKey: "status",
|
|
684
|
-
header: () =>
|
|
699
|
+
header: () => t("inventory.transfer.table.status"),
|
|
685
700
|
cell(l) {
|
|
686
|
-
const a = l.getValue(),
|
|
701
|
+
const a = l.getValue(), _ = ut(l.row.original);
|
|
702
|
+
let w = !1, k = !1, F = !1;
|
|
703
|
+
for (const j of Object.values(_)) {
|
|
704
|
+
const { isNoReceive: ae, isOverReceive: se } = dt(j);
|
|
705
|
+
if (ae ? k = !0 : w = !0, se && (F = !0), w && k && F) break;
|
|
706
|
+
}
|
|
707
|
+
const C = t(
|
|
708
|
+
`inventory.transfer.status.${Et(a ?? "", w && k)}`
|
|
709
|
+
), M = `${a ?? ""}`.toLocaleLowerCase("en-us");
|
|
687
710
|
return A(
|
|
688
711
|
"div",
|
|
689
712
|
{
|
|
@@ -692,42 +715,24 @@ function js(f, t) {
|
|
|
692
715
|
A(
|
|
693
716
|
"div",
|
|
694
717
|
{
|
|
695
|
-
class:
|
|
718
|
+
class: [
|
|
719
|
+
"fm-status-badge",
|
|
720
|
+
`fm-status-badge-${M}`,
|
|
721
|
+
F && "fm-status-badge-error"
|
|
722
|
+
].filter(Boolean).join(" ")
|
|
696
723
|
},
|
|
697
|
-
`${
|
|
724
|
+
`${C}`
|
|
698
725
|
)
|
|
699
726
|
);
|
|
700
727
|
},
|
|
701
728
|
enableSorting: !0,
|
|
702
729
|
size: 200
|
|
703
730
|
},
|
|
704
|
-
{
|
|
705
|
-
id: "receive_status",
|
|
706
|
-
header: () => e("inventory.transfer.table.receive_status"),
|
|
707
|
-
cell(l) {
|
|
708
|
-
const a = ut(l.row.original);
|
|
709
|
-
let h = !1, R = !1, x = !1;
|
|
710
|
-
for (const C of Object.values(a)) {
|
|
711
|
-
const { isNoReceive: M, isOverReceive: j } = dt(C);
|
|
712
|
-
if (M ? R = !0 : h = !0, j && (x = !0), h && R && x) break;
|
|
713
|
-
}
|
|
714
|
-
const E = h && R, T = [];
|
|
715
|
-
return E && T.push({
|
|
716
|
-
label: e("inventory.transfer.status.PARTIAL_RECEIVED"),
|
|
717
|
-
variant: "plain"
|
|
718
|
-
}), x && T.push({
|
|
719
|
-
label: e("inventory.transfer.status.OVER_RECEIVED"),
|
|
720
|
-
variant: "critical"
|
|
721
|
-
}), A(Ue.FmChipGroup, { items: T, compact: !0 });
|
|
722
|
-
},
|
|
723
|
-
enableSorting: !0,
|
|
724
|
-
size: 200
|
|
725
|
-
},
|
|
726
731
|
{
|
|
727
732
|
id: "action",
|
|
728
733
|
cell(l) {
|
|
729
|
-
const a = l.row.original,
|
|
730
|
-
return
|
|
734
|
+
const a = l.row.original, _ = c(a);
|
|
735
|
+
return Xe(_, (w) => r(w, a));
|
|
731
736
|
},
|
|
732
737
|
enableSorting: !1,
|
|
733
738
|
size: 40,
|
|
@@ -737,15 +742,15 @@ function js(f, t) {
|
|
|
737
742
|
}
|
|
738
743
|
}
|
|
739
744
|
];
|
|
740
|
-
if (
|
|
745
|
+
if (h.isEnabled) {
|
|
741
746
|
const l = [
|
|
742
747
|
{
|
|
743
748
|
id: "netsuiteTransferOrder",
|
|
744
749
|
header: () => "NetSuite Order (ID)",
|
|
745
750
|
cell(a) {
|
|
746
|
-
var
|
|
747
|
-
const
|
|
748
|
-
return (
|
|
751
|
+
var w;
|
|
752
|
+
const _ = a.row.original;
|
|
753
|
+
return (w = _.netSuite) != null && w.id ? `${_.netSuite.refNo} (${_.netSuite.id})` : "N/A";
|
|
749
754
|
},
|
|
750
755
|
enableSorting: !1,
|
|
751
756
|
size: 200,
|
|
@@ -758,8 +763,8 @@ function js(f, t) {
|
|
|
758
763
|
id: "netsuiteTransactionNumber",
|
|
759
764
|
header: () => "NetSuite Transaction No.",
|
|
760
765
|
cell(a) {
|
|
761
|
-
var
|
|
762
|
-
return ((
|
|
766
|
+
var w, k;
|
|
767
|
+
return ((k = (w = a.row.original.netSuite) == null ? void 0 : w.additionalInfo) == null ? void 0 : k.transactionnumber) ?? "N/A";
|
|
763
768
|
},
|
|
764
769
|
enableSorting: !1,
|
|
765
770
|
size: 200,
|
|
@@ -773,18 +778,18 @@ function js(f, t) {
|
|
|
773
778
|
}
|
|
774
779
|
return m;
|
|
775
780
|
}
|
|
776
|
-
function
|
|
781
|
+
function g() {
|
|
777
782
|
const m = [
|
|
778
783
|
{
|
|
779
784
|
accessorKey: "purchaseOrder.seqNumber",
|
|
780
|
-
header: () =>
|
|
785
|
+
header: () => t("inventory.transfer.table.seqNo"),
|
|
781
786
|
enableSorting: !0,
|
|
782
787
|
size: 80,
|
|
783
788
|
sortUndefined: "last"
|
|
784
789
|
},
|
|
785
790
|
{
|
|
786
791
|
accessorKey: "purchaseOrder._id",
|
|
787
|
-
header: () =>
|
|
792
|
+
header: () => t("inventory.transfer.table.createdAt"),
|
|
788
793
|
cell(l) {
|
|
789
794
|
return Te(`${l.getValue()}`);
|
|
790
795
|
},
|
|
@@ -792,27 +797,27 @@ function js(f, t) {
|
|
|
792
797
|
},
|
|
793
798
|
{
|
|
794
799
|
accessorKey: "to.name",
|
|
795
|
-
header: () =>
|
|
800
|
+
header: () => t("inventory.transfer.table.transferTo"),
|
|
796
801
|
enableSorting: !1,
|
|
797
802
|
size: 200
|
|
798
803
|
},
|
|
799
804
|
{
|
|
800
805
|
accessorKey: "purchaseOrder.items.length",
|
|
801
|
-
header: () =>
|
|
806
|
+
header: () => t("inventory.transfer.table.noOfItems"),
|
|
802
807
|
enableSorting: !1
|
|
803
808
|
},
|
|
804
809
|
{
|
|
805
810
|
accessorKey: "purchaseOrder.ref",
|
|
806
|
-
header: () =>
|
|
811
|
+
header: () => t("inventory.transfer.table.reference"),
|
|
807
812
|
enableSorting: !1,
|
|
808
813
|
size: "auto"
|
|
809
814
|
},
|
|
810
815
|
{
|
|
811
816
|
accessorKey: "purchaseOrder.status",
|
|
812
|
-
header: () =>
|
|
817
|
+
header: () => t("inventory.transfer.table.status"),
|
|
813
818
|
cell(l) {
|
|
814
|
-
var
|
|
815
|
-
const a = l.row.original,
|
|
819
|
+
var $, C;
|
|
820
|
+
const a = l.row.original, _ = l.getValue(), w = _ === "RECEIVING" && (((C = ($ = a.purchaseOrder) == null ? void 0 : $.deliveryOrder) == null ? void 0 : C.length) ?? 0) > 0, k = t(w ? "inventory.transfer.status.PARTIAL_RECEIVED" : `inventory.transfer.status.${_ ?? ""}`), F = w ? "partially_received" : `${_ ?? ""}`.toLocaleLowerCase("en-us");
|
|
816
821
|
return A(
|
|
817
822
|
"div",
|
|
818
823
|
{
|
|
@@ -821,9 +826,9 @@ function js(f, t) {
|
|
|
821
826
|
A(
|
|
822
827
|
"div",
|
|
823
828
|
{
|
|
824
|
-
class: `fm-status-badge fm-status-badge-${
|
|
829
|
+
class: `fm-status-badge fm-status-badge-${F}`
|
|
825
830
|
},
|
|
826
|
-
|
|
831
|
+
k
|
|
827
832
|
)
|
|
828
833
|
);
|
|
829
834
|
},
|
|
@@ -832,13 +837,13 @@ function js(f, t) {
|
|
|
832
837
|
{
|
|
833
838
|
id: "action",
|
|
834
839
|
cell(l) {
|
|
835
|
-
const a = l.row.original,
|
|
836
|
-
...
|
|
840
|
+
const a = l.row.original, w = (a.purchaseOrder ? c(a.purchaseOrder) : []).map((k) => k.value === X.Print ? {
|
|
841
|
+
...k,
|
|
837
842
|
translationKey: "inventory.transfer.receiveRequest.details.printDeliveryOrder"
|
|
838
|
-
} :
|
|
839
|
-
return
|
|
840
|
-
|
|
841
|
-
(
|
|
843
|
+
} : k);
|
|
844
|
+
return Xe(
|
|
845
|
+
w,
|
|
846
|
+
(k) => a.purchaseOrder ? r(k, a.purchaseOrder, a) : void 0
|
|
842
847
|
);
|
|
843
848
|
},
|
|
844
849
|
enableSorting: !1,
|
|
@@ -849,15 +854,15 @@ function js(f, t) {
|
|
|
849
854
|
}
|
|
850
855
|
}
|
|
851
856
|
];
|
|
852
|
-
if (
|
|
857
|
+
if (h.isEnabled) {
|
|
853
858
|
const l = [
|
|
854
859
|
{
|
|
855
860
|
id: "netsuiteTransferOrder",
|
|
856
861
|
header: () => "NetSuite Order (ID)",
|
|
857
862
|
cell(a) {
|
|
858
|
-
var
|
|
859
|
-
const
|
|
860
|
-
return (
|
|
863
|
+
var w;
|
|
864
|
+
const _ = a.row.original;
|
|
865
|
+
return (w = _.netSuite) != null && w.id ? `${_.netSuite.refNo} (${_.netSuite.id})` : "N/A";
|
|
861
866
|
},
|
|
862
867
|
enableSorting: !1,
|
|
863
868
|
size: 200,
|
|
@@ -870,8 +875,8 @@ function js(f, t) {
|
|
|
870
875
|
id: "netsuiteTransactionNumber",
|
|
871
876
|
header: () => "NetSuite Transaction No.",
|
|
872
877
|
cell(a) {
|
|
873
|
-
var
|
|
874
|
-
return ((
|
|
878
|
+
var w, k;
|
|
879
|
+
return ((k = (w = a.row.original.netSuite) == null ? void 0 : w.additionalInfo) == null ? void 0 : k.transactionnumber) ?? "N/A";
|
|
875
880
|
},
|
|
876
881
|
enableSorting: !1,
|
|
877
882
|
size: 200,
|
|
@@ -886,44 +891,44 @@ function js(f, t) {
|
|
|
886
891
|
return m;
|
|
887
892
|
}
|
|
888
893
|
return {
|
|
889
|
-
columnDefs: J(() => f === "receive/request" ? p() :
|
|
894
|
+
columnDefs: J(() => f === "receive/request" ? p() : g())
|
|
890
895
|
};
|
|
891
896
|
}
|
|
892
|
-
const
|
|
897
|
+
const Vt = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg p-16" }, Ut = { class: "flex flex-col gap-8" }, Mt = { class: "flex w-full justify-end gap-16" }, Kt = /* @__PURE__ */ be({
|
|
893
898
|
__name: "FulfillmentForm",
|
|
894
899
|
props: {
|
|
895
900
|
purchaseOrder: {},
|
|
896
901
|
confirm: { type: Function }
|
|
897
902
|
},
|
|
898
903
|
emits: ["update:show"],
|
|
899
|
-
setup(f, { emit:
|
|
900
|
-
const s = f,
|
|
904
|
+
setup(f, { emit: e }) {
|
|
905
|
+
const s = f, h = Rt({
|
|
901
906
|
id: "",
|
|
902
907
|
createdAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
903
908
|
items: []
|
|
904
|
-
}), u = K(),
|
|
909
|
+
}), u = K(), t = e;
|
|
905
910
|
it(() => {
|
|
906
|
-
s.purchaseOrder && (
|
|
911
|
+
s.purchaseOrder && (h.items = s.purchaseOrder.items.map((n) => ({
|
|
907
912
|
id: n.id,
|
|
908
913
|
sku: n.sku,
|
|
909
914
|
measurement: n.measurement,
|
|
910
915
|
amount: n.quantity ?? { amount: 1, precision: 0 }
|
|
911
916
|
})));
|
|
912
917
|
});
|
|
913
|
-
const c = J(() =>
|
|
918
|
+
const c = J(() => h.items.length <= 10);
|
|
914
919
|
return (n, r) => {
|
|
915
|
-
const p = G("FmTable"),
|
|
916
|
-
return
|
|
920
|
+
const p = G("FmTable"), g = G("FmButton"), v = G("FmForm");
|
|
921
|
+
return b(), ie(v, {
|
|
917
922
|
ref_key: "formRef",
|
|
918
923
|
ref: u,
|
|
919
924
|
class: "bg-white flex flex-col gap-32 rounded-3xl p-24 w-[800px]",
|
|
920
925
|
onValidationFailed: console.log,
|
|
921
|
-
onValidationSuccess: r[1] || (r[1] = () => s.confirm(
|
|
926
|
+
onValidationSuccess: r[1] || (r[1] = () => s.confirm(h))
|
|
922
927
|
}, {
|
|
923
|
-
default:
|
|
928
|
+
default: oe(() => [
|
|
924
929
|
r[2] || (r[2] = i("div", { class: "fm-typo-en-title-sm-600" }, "Confirm the transfer amount", -1)),
|
|
925
|
-
i("div",
|
|
926
|
-
i("div",
|
|
930
|
+
i("div", Vt, [
|
|
931
|
+
i("div", Ut, [
|
|
927
932
|
I(p, {
|
|
928
933
|
"column-defs": [
|
|
929
934
|
{
|
|
@@ -931,7 +936,7 @@ const Bt = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
931
936
|
cell: (m) => {
|
|
932
937
|
const l = s.purchaseOrder.items.find((a) => a.id === m.row.original.id || a.sku._id === m.row.original.sku._id);
|
|
933
938
|
return A(
|
|
934
|
-
S(
|
|
939
|
+
S(Ze).FmTooltip,
|
|
935
940
|
{
|
|
936
941
|
content: l.code,
|
|
937
942
|
placement: "top",
|
|
@@ -953,7 +958,7 @@ const Bt = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
953
958
|
cell: (m) => {
|
|
954
959
|
const l = s.purchaseOrder.items.find((a) => a.id === m.row.original.id || a.sku._id === m.row.original.sku._id);
|
|
955
960
|
return A(
|
|
956
|
-
S(
|
|
961
|
+
S(Ze).FmTooltip,
|
|
957
962
|
{
|
|
958
963
|
content: l.name,
|
|
959
964
|
placement: "top",
|
|
@@ -973,7 +978,7 @@ const Bt = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
973
978
|
{
|
|
974
979
|
header: "Amount",
|
|
975
980
|
cell: (m) => {
|
|
976
|
-
const l = m.row.original, a = s.purchaseOrder.items.find((
|
|
981
|
+
const l = m.row.original, a = s.purchaseOrder.items.find((w) => w.id === l.id || w.sku._id === l.sku._id), _ = l.amount ?? {
|
|
977
982
|
amount: 1,
|
|
978
983
|
precision: 0
|
|
979
984
|
};
|
|
@@ -982,47 +987,47 @@ const Bt = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
982
987
|
flex: "1 1 0%"
|
|
983
988
|
},
|
|
984
989
|
modelValue: {
|
|
985
|
-
amount:
|
|
990
|
+
amount: _,
|
|
986
991
|
measurement: l.measurement ?? null
|
|
987
992
|
},
|
|
988
993
|
key: l.id ?? l.sku._id,
|
|
989
994
|
unit: l.sku.unit,
|
|
990
|
-
"onUpdate:modelValue": (
|
|
991
|
-
if (!
|
|
992
|
-
const
|
|
993
|
-
|
|
995
|
+
"onUpdate:modelValue": (w) => {
|
|
996
|
+
if (!w) return;
|
|
997
|
+
const k = h.items.find((F) => F.id === l.id || F.sku._id === l.sku._id);
|
|
998
|
+
k && (k.amount = w.amount);
|
|
994
999
|
},
|
|
995
1000
|
disableUnit: !0,
|
|
996
1001
|
rules: [
|
|
997
1002
|
S(Ct)(
|
|
998
|
-
+S(
|
|
1003
|
+
+S(de)({ amount: 0, precision: 0 })
|
|
999
1004
|
),
|
|
1000
|
-
S(Pt)(+S(
|
|
1005
|
+
S(Pt)(+S(de)(a.quantity))
|
|
1001
1006
|
],
|
|
1002
1007
|
applyDefaultRules: !0
|
|
1003
1008
|
});
|
|
1004
1009
|
}
|
|
1005
1010
|
}
|
|
1006
1011
|
],
|
|
1007
|
-
"row-data":
|
|
1012
|
+
"row-data": h.items,
|
|
1008
1013
|
"hide-footer": c.value
|
|
1009
1014
|
}, null, 8, ["column-defs", "row-data", "hide-footer"])
|
|
1010
1015
|
])
|
|
1011
1016
|
]),
|
|
1012
|
-
i("div",
|
|
1013
|
-
I(
|
|
1017
|
+
i("div", Mt, [
|
|
1018
|
+
I(g, {
|
|
1014
1019
|
class: "px-16",
|
|
1015
1020
|
label: "Confirm",
|
|
1016
1021
|
size: "md",
|
|
1017
1022
|
variant: "primary",
|
|
1018
1023
|
type: "submit"
|
|
1019
1024
|
}),
|
|
1020
|
-
I(
|
|
1025
|
+
I(g, {
|
|
1021
1026
|
class: "px-16",
|
|
1022
1027
|
label: "Cancel",
|
|
1023
1028
|
size: "md",
|
|
1024
1029
|
variant: "secondary",
|
|
1025
|
-
onClick: r[0] || (r[0] = () =>
|
|
1030
|
+
onClick: r[0] || (r[0] = () => t("update:show", !1))
|
|
1026
1031
|
})
|
|
1027
1032
|
])
|
|
1028
1033
|
]),
|
|
@@ -1095,28 +1100,28 @@ const Bt = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
1095
1100
|
available: !1
|
|
1096
1101
|
}
|
|
1097
1102
|
};
|
|
1098
|
-
function
|
|
1103
|
+
function jt() {
|
|
1099
1104
|
const f = Ae();
|
|
1100
1105
|
return {
|
|
1101
|
-
ableToMarkReceived(
|
|
1102
|
-
if (!
|
|
1106
|
+
ableToMarkReceived(e) {
|
|
1107
|
+
if (!e || e.status !== le.enum.RECEIVING)
|
|
1103
1108
|
return !1;
|
|
1104
|
-
const
|
|
1105
|
-
return `${
|
|
1109
|
+
const h = fe().currentLocationDBName;
|
|
1110
|
+
return `${e.supplier.internal}_${e.supplier._id}` !== h;
|
|
1106
1111
|
},
|
|
1107
|
-
ableToMarkApproved(
|
|
1108
|
-
return !(!
|
|
1112
|
+
ableToMarkApproved(e) {
|
|
1113
|
+
return !(!e || (e == null ? void 0 : e.status) !== le.enum.REQUESTING);
|
|
1109
1114
|
},
|
|
1110
|
-
ableToCreateFulfillment(
|
|
1111
|
-
var
|
|
1112
|
-
if (!f.acceptRequireFulfillment || !
|
|
1115
|
+
ableToCreateFulfillment(e, s) {
|
|
1116
|
+
var t, c;
|
|
1117
|
+
if (!f.acceptRequireFulfillment || !e || !s || e.status !== le.enum.PROCESSING || !s.processedAt)
|
|
1113
1118
|
return !1;
|
|
1114
|
-
const
|
|
1115
|
-
return !(
|
|
1119
|
+
const h = (t = s == null ? void 0 : s.from) == null ? void 0 : t.dbName, u = (c = s == null ? void 0 : s.to) == null ? void 0 : c.dbName;
|
|
1120
|
+
return !(h.startsWith("restaurant_") && u.startsWith("restaurant_"));
|
|
1116
1121
|
}
|
|
1117
1122
|
};
|
|
1118
1123
|
}
|
|
1119
|
-
const
|
|
1124
|
+
const zt = { class: "flex flex-row-reverse" }, Ht = /* @__PURE__ */ be({
|
|
1120
1125
|
__name: "NetSuiteSync",
|
|
1121
1126
|
props: {
|
|
1122
1127
|
poRequest: {},
|
|
@@ -1125,16 +1130,16 @@ const jt = { class: "flex flex-row-reverse" }, zt = /* @__PURE__ */ be({
|
|
|
1125
1130
|
scope: {}
|
|
1126
1131
|
},
|
|
1127
1132
|
setup(f) {
|
|
1128
|
-
const
|
|
1133
|
+
const e = f, s = $e(), h = Pe(), u = Ke(), t = K(!1);
|
|
1129
1134
|
J(() => {
|
|
1130
|
-
var
|
|
1135
|
+
var g, v, m, l;
|
|
1131
1136
|
let n = !0;
|
|
1132
1137
|
s.isEnabled || (n = !1);
|
|
1133
|
-
const r =
|
|
1134
|
-
return r && ((
|
|
1138
|
+
const r = e.purchaseOrder, p = e.poRequest;
|
|
1139
|
+
return r && ((g = r == null ? void 0 : r.supplier) != null && g.internal ? (!p && r.status == le.enum.DRAFT && (n = !1), p && !((v = p == null ? void 0 : p.netSuite) != null && v.id) && (n = !1), e.isTransferBetweenOutlets && (n = !1)) : ((r == null ? void 0 : r.status) !== le.enum.REQUESTING && r.supplier.internal && (n = !1), !p && !((m = r == null ? void 0 : r.netSuite) != null && m.id) && (n = !1), !p && ((l = r == null ? void 0 : r.netSuite) != null && l.id) && (r == null ? void 0 : r.status) == le.enum.REQUESTING && (n = !1))), n;
|
|
1135
1140
|
});
|
|
1136
1141
|
async function c() {
|
|
1137
|
-
|
|
1142
|
+
t.value || u.open({
|
|
1138
1143
|
title: "Sync with NetSuite",
|
|
1139
1144
|
contentComponent: A("div", [
|
|
1140
1145
|
A("p", "Are you sure you want to sync now?"),
|
|
@@ -1154,33 +1159,33 @@ const jt = { class: "flex flex-row-reverse" }, zt = /* @__PURE__ */ be({
|
|
|
1154
1159
|
}).onPrimary(async () => {
|
|
1155
1160
|
var n, r, p;
|
|
1156
1161
|
try {
|
|
1157
|
-
|
|
1158
|
-
const
|
|
1162
|
+
t.value = !0;
|
|
1163
|
+
const g = ((n = e.purchaseOrder) == null ? void 0 : n._id) || ((r = e.poRequest) == null ? void 0 : r.purchaseOrderId) || "", v = (p = e.poRequest) == null ? void 0 : p.to.dbName;
|
|
1159
1164
|
await s.syncPurchaseOrder(
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
),
|
|
1165
|
+
g,
|
|
1166
|
+
e.scope === "approval" ? v : void 0
|
|
1167
|
+
), h.open({
|
|
1163
1168
|
title: "Sync with NetSuite",
|
|
1164
1169
|
message: "Requested to sync with NetSuite. Please wait a moment.",
|
|
1165
1170
|
type: "success"
|
|
1166
|
-
}), await new Promise((m) => setTimeout(m, 5e3)),
|
|
1171
|
+
}), await new Promise((m) => setTimeout(m, 5e3)), t.value = !1;
|
|
1167
1172
|
} catch {
|
|
1168
|
-
|
|
1173
|
+
h.open({
|
|
1169
1174
|
title: "Error",
|
|
1170
1175
|
message: "Failed to sync with NetSuite",
|
|
1171
1176
|
type: "error"
|
|
1172
|
-
}),
|
|
1177
|
+
}), t.value = !1;
|
|
1173
1178
|
}
|
|
1174
1179
|
});
|
|
1175
1180
|
}
|
|
1176
1181
|
return (n, r) => {
|
|
1177
1182
|
const p = G("FmButton");
|
|
1178
|
-
return
|
|
1183
|
+
return b(), N("div", zt, [
|
|
1179
1184
|
I(p, {
|
|
1180
1185
|
"prepend-icon": "sync",
|
|
1181
1186
|
variant: "secondary",
|
|
1182
1187
|
label: "Sync",
|
|
1183
|
-
loading:
|
|
1188
|
+
loading: t.value,
|
|
1184
1189
|
onClick: c,
|
|
1185
1190
|
"text-color": "primary",
|
|
1186
1191
|
"bg-color": "transparent",
|
|
@@ -1189,22 +1194,22 @@ const jt = { class: "flex flex-row-reverse" }, zt = /* @__PURE__ */ be({
|
|
|
1189
1194
|
]);
|
|
1190
1195
|
};
|
|
1191
1196
|
}
|
|
1192
|
-
}),
|
|
1197
|
+
}), Gt = {
|
|
1193
1198
|
key: 0,
|
|
1194
1199
|
class: "flex flex-col gap-8"
|
|
1195
|
-
},
|
|
1200
|
+
}, Wt = { class: "flex flex-col gap-4" }, Qt = { class: "fm-typo-en-body-lg-600" }, Yt = {
|
|
1196
1201
|
key: 0,
|
|
1197
1202
|
class: "flex flex-col gap-4"
|
|
1198
|
-
},
|
|
1203
|
+
}, Xt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Jt = { class: "fm-typo-en-body-lg-600" }, Zt = { key: 0 }, er = { key: 1 }, tr = {
|
|
1199
1204
|
key: 1,
|
|
1200
1205
|
class: "flex flex-col gap-4"
|
|
1201
|
-
},
|
|
1206
|
+
}, rr = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, sr = { class: "fm-typo-en-body-lg-600" }, nr = { key: 0 }, or = { key: 1 }, ar = {
|
|
1202
1207
|
key: 2,
|
|
1203
1208
|
class: "flex flex-col gap-4"
|
|
1204
|
-
},
|
|
1209
|
+
}, ir = { class: "fm-typo-en-body-lg-600" }, lr = {
|
|
1205
1210
|
key: 3,
|
|
1206
1211
|
class: "flex flex-col gap-4"
|
|
1207
|
-
},
|
|
1212
|
+
}, cr = { class: "fm-typo-en-body-lg-600" }, ur = /* @__PURE__ */ be({
|
|
1208
1213
|
__name: "NetSuiteInfo",
|
|
1209
1214
|
props: {
|
|
1210
1215
|
transferType: {},
|
|
@@ -1215,99 +1220,99 @@ const jt = { class: "flex flex-row-reverse" }, zt = /* @__PURE__ */ be({
|
|
|
1215
1220
|
scope: {}
|
|
1216
1221
|
},
|
|
1217
1222
|
setup(f) {
|
|
1218
|
-
const
|
|
1223
|
+
const e = f, s = $e(), h = Ie(), u = K(e.poRequest);
|
|
1219
1224
|
it(async () => {
|
|
1220
1225
|
var r;
|
|
1221
|
-
if (!
|
|
1222
|
-
const p = await
|
|
1226
|
+
if (!e.poRequest && ((r = e.purchaseOrder) != null && r._id)) {
|
|
1227
|
+
const p = await h.getLatestPurchaseOrderRequest(e.purchaseOrder._id);
|
|
1223
1228
|
u.value = p;
|
|
1224
1229
|
}
|
|
1225
1230
|
});
|
|
1226
|
-
const
|
|
1231
|
+
const t = J(
|
|
1227
1232
|
() => {
|
|
1228
|
-
var r, p,
|
|
1233
|
+
var r, p, g, v, m, l;
|
|
1229
1234
|
return s.getSubsidiaryFullName(
|
|
1230
|
-
((
|
|
1235
|
+
((g = (p = (r = e.purchaseOrder) == null ? void 0 : r.netSuite) == null ? void 0 : p.subsidiary) == null ? void 0 : g.id) || ((l = (m = (v = e.poRequest) == null ? void 0 : v.netSuite) == null ? void 0 : m.subsidiary) == null ? void 0 : l.id)
|
|
1231
1236
|
).fullName;
|
|
1232
1237
|
}
|
|
1233
1238
|
), c = J(() => {
|
|
1234
|
-
var r, p,
|
|
1235
|
-
return (
|
|
1239
|
+
var r, p, g, v, m, l, a, _, w, k, F, $;
|
|
1240
|
+
return (g = (p = (r = e.purchaseOrder) == null ? void 0 : r.netSuite) == null ? void 0 : p.additionalInfo) != null && g.transactionnumber ? (l = (m = (v = e.purchaseOrder) == null ? void 0 : v.netSuite) == null ? void 0 : m.additionalInfo) == null ? void 0 : l.transactionnumber : (w = (_ = (a = u.value) == null ? void 0 : a.netSuite) == null ? void 0 : _.additionalInfo) != null && w.transactionnumber ? ($ = (F = (k = u.value) == null ? void 0 : k.netSuite) == null ? void 0 : F.additionalInfo) == null ? void 0 : $.transactionnumber : null;
|
|
1236
1241
|
}), n = J(() => {
|
|
1237
|
-
var r, p,
|
|
1238
|
-
return (p = (r =
|
|
1239
|
-
var
|
|
1240
|
-
return (
|
|
1242
|
+
var r, p, g, v, m, l;
|
|
1243
|
+
return (p = (r = e.purchaseOrder) == null ? void 0 : r.deliveryFullfillment) != null && p.length && ((v = (g = e.purchaseOrder) == null ? void 0 : g.deliveryFullfillment) == null ? void 0 : v.length) > 0 ? (l = (m = e.purchaseOrder) == null ? void 0 : m.deliveryFullfillment) == null ? void 0 : l.map((a) => {
|
|
1244
|
+
var _;
|
|
1245
|
+
return (_ = a.netSuite) == null ? void 0 : _.refNo;
|
|
1241
1246
|
}).join(", ") : "N/A";
|
|
1242
1247
|
});
|
|
1243
1248
|
return (r, p) => {
|
|
1244
|
-
var
|
|
1245
|
-
return S(s).isEnabled ? (
|
|
1246
|
-
i("div",
|
|
1249
|
+
var g, v, m, l, a, _, w, k, F, $, C, M, j, ae, se, ge;
|
|
1250
|
+
return S(s).isEnabled ? (b(), N("div", Gt, [
|
|
1251
|
+
i("div", Wt, [
|
|
1247
1252
|
p[0] || (p[0] = i("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, "NetSuite subsidiary", -1)),
|
|
1248
|
-
i("div",
|
|
1253
|
+
i("div", Qt, D(t.value || "N/A"), 1)
|
|
1249
1254
|
]),
|
|
1250
|
-
!r.isTransferBetweenOutlets && r.scope === S(
|
|
1251
|
-
i("div",
|
|
1252
|
-
i("div",
|
|
1253
|
-
(
|
|
1255
|
+
!r.isTransferBetweenOutlets && r.scope === S(Ue).RECEIVE_REQUEST ? (b(), N("div", Yt, [
|
|
1256
|
+
i("div", Xt, " NetSuite " + D((v = (g = r.purchaseOrder) == null ? void 0 : g.netSuite) != null && v.recordType ? S(ot)((l = (m = r.purchaseOrder) == null ? void 0 : m.netSuite) == null ? void 0 : l.recordType) : r.transferType === S(he).PURCHASE ? "Purchase Order" : "Transfer Order") + " (ID) ", 1),
|
|
1257
|
+
i("div", Jt, [
|
|
1258
|
+
(_ = (a = r.purchaseOrder) == null ? void 0 : a.netSuite) != null && _.id ? (b(), N("span", Zt, D((k = (w = r.purchaseOrder) == null ? void 0 : w.netSuite) == null ? void 0 : k.refNo) + " (" + D(($ = (F = r.purchaseOrder) == null ? void 0 : F.netSuite) == null ? void 0 : $.id) + ") ", 1)) : (b(), N("span", er, "N/A"))
|
|
1254
1259
|
])
|
|
1255
1260
|
])) : U("", !0),
|
|
1256
|
-
!r.isTransferBetweenOutlets && u.value || r.scope === S(
|
|
1257
|
-
i("div",
|
|
1258
|
-
i("div",
|
|
1259
|
-
(M = (C = u.value) == null ? void 0 : C.netSuite) != null && M.id ? (
|
|
1261
|
+
!r.isTransferBetweenOutlets && u.value || r.scope === S(Ue).APPROVAL ? (b(), N("div", tr, [
|
|
1262
|
+
i("div", rr, " (Request) NetSuite " + D(r.transferType === S(he).PURCHASE ? "Purchase Order" : "Transfer Order") + " (ID) ", 1),
|
|
1263
|
+
i("div", sr, [
|
|
1264
|
+
(M = (C = u.value) == null ? void 0 : C.netSuite) != null && M.id ? (b(), N("span", nr, D((ae = (j = u.value) == null ? void 0 : j.netSuite) == null ? void 0 : ae.refNo) + " (" + D((ge = (se = u.value) == null ? void 0 : se.netSuite) == null ? void 0 : ge.id) + ") ", 1)) : (b(), N("span", or, "N/A"))
|
|
1260
1265
|
])
|
|
1261
1266
|
])) : U("", !0),
|
|
1262
|
-
c.value ? (
|
|
1267
|
+
c.value ? (b(), N("div", ar, [
|
|
1263
1268
|
p[1] || (p[1] = i("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " NetSuite Transaction Number ", -1)),
|
|
1264
|
-
i("div",
|
|
1269
|
+
i("div", ir, D(c.value), 1)
|
|
1265
1270
|
])) : U("", !0),
|
|
1266
|
-
S(s).isEnabled && r.transferType === S(he).TRANSFER && !r.isTransferBetweenOutlets ? (
|
|
1271
|
+
S(s).isEnabled && r.transferType === S(he).TRANSFER && !r.isTransferBetweenOutlets ? (b(), N("div", lr, [
|
|
1267
1272
|
p[2] || (p[2] = i("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " NetSuite fulfillment IDs ", -1)),
|
|
1268
|
-
i("div",
|
|
1273
|
+
i("div", cr, D(n.value), 1)
|
|
1269
1274
|
])) : U("", !0)
|
|
1270
1275
|
])) : U("", !0);
|
|
1271
1276
|
};
|
|
1272
1277
|
}
|
|
1273
|
-
}),
|
|
1278
|
+
}), dr = { class: "flex flex-row-reverse" }, fr = /* @__PURE__ */ be({
|
|
1274
1279
|
__name: "NetSuiteLog",
|
|
1275
1280
|
props: {
|
|
1276
1281
|
netsuiteId: {},
|
|
1277
1282
|
purchaseOrderId: {}
|
|
1278
1283
|
},
|
|
1279
1284
|
setup(f) {
|
|
1280
|
-
const
|
|
1281
|
-
async function
|
|
1285
|
+
const e = Pe(), s = at();
|
|
1286
|
+
async function h(u, t) {
|
|
1282
1287
|
const c = [];
|
|
1283
|
-
if (u && c.push(`body.message:*${u}*`),
|
|
1284
|
-
const
|
|
1285
|
-
c.push(`${
|
|
1288
|
+
if (u && c.push(`body.message:*${u}*`), t) {
|
|
1289
|
+
const g = t.replace(/:/g, "\\:");
|
|
1290
|
+
c.push(`${g}`);
|
|
1286
1291
|
}
|
|
1287
1292
|
if (c.length === 0) {
|
|
1288
|
-
|
|
1293
|
+
e.open({
|
|
1289
1294
|
message: "Cannot open logs without valid filters.",
|
|
1290
1295
|
type: "error"
|
|
1291
1296
|
});
|
|
1292
1297
|
return;
|
|
1293
1298
|
}
|
|
1294
1299
|
const r = `attributes.pod:netsuite* AND (${c.join(" OR ")})`, { url: p } = await s.getLogs(r);
|
|
1295
|
-
|
|
1300
|
+
e.open(
|
|
1296
1301
|
{
|
|
1297
1302
|
message: "Opening NetSuite logs...",
|
|
1298
1303
|
type: "info"
|
|
1299
1304
|
},
|
|
1300
1305
|
800
|
|
1301
|
-
), await new Promise((
|
|
1306
|
+
), await new Promise((g) => setTimeout(g, 800)), window.open(p, "_blank");
|
|
1302
1307
|
}
|
|
1303
|
-
return (u,
|
|
1308
|
+
return (u, t) => {
|
|
1304
1309
|
const c = G("FmButton");
|
|
1305
|
-
return
|
|
1310
|
+
return b(), N("div", dr, [
|
|
1306
1311
|
I(c, {
|
|
1307
1312
|
"prepend-icon": "history",
|
|
1308
1313
|
variant: "secondary",
|
|
1309
1314
|
label: "Logs",
|
|
1310
|
-
onClick:
|
|
1315
|
+
onClick: t[0] || (t[0] = (n) => h(u.netsuiteId, u.purchaseOrderId)),
|
|
1311
1316
|
"text-color": "primary",
|
|
1312
1317
|
"bg-color": "transparent",
|
|
1313
1318
|
"border-color": "primary"
|
|
@@ -1315,77 +1320,77 @@ const jt = { class: "flex flex-row-reverse" }, zt = /* @__PURE__ */ be({
|
|
|
1315
1320
|
]);
|
|
1316
1321
|
};
|
|
1317
1322
|
}
|
|
1318
|
-
}),
|
|
1323
|
+
}), mr = { class: "flex flex-row-reverse" }, pr = { key: 0 }, vr = {
|
|
1319
1324
|
key: 1,
|
|
1320
1325
|
class: "w-[480px]"
|
|
1321
|
-
},
|
|
1326
|
+
}, yr = { class: "fm-typo-en-body-md-400" }, hr = { key: 0 }, br = { key: 1 }, gr = { key: 1 }, _r = /* @__PURE__ */ be({
|
|
1322
1327
|
__name: "NetSuiteLatestInfo",
|
|
1323
1328
|
props: {
|
|
1324
1329
|
netsuiteId: {},
|
|
1325
1330
|
purchaseOrderId: {}
|
|
1326
1331
|
},
|
|
1327
1332
|
setup(f) {
|
|
1328
|
-
const
|
|
1333
|
+
const e = f, s = at(), h = K(!1), u = fe(), t = K(!0), c = K(!1), n = K(null);
|
|
1329
1334
|
async function r() {
|
|
1330
1335
|
if (!n.value) {
|
|
1331
|
-
|
|
1336
|
+
h.value = !0;
|
|
1332
1337
|
try {
|
|
1333
|
-
|
|
1338
|
+
t.value = !0;
|
|
1334
1339
|
const p = await s.getMoreInfo(
|
|
1335
1340
|
u.currentLocation.dbName,
|
|
1336
|
-
|
|
1341
|
+
e.purchaseOrderId
|
|
1337
1342
|
);
|
|
1338
1343
|
n.value = p, c.value = !1;
|
|
1339
1344
|
} catch {
|
|
1340
1345
|
c.value = !0;
|
|
1341
1346
|
} finally {
|
|
1342
|
-
|
|
1347
|
+
t.value = !1;
|
|
1343
1348
|
}
|
|
1344
1349
|
}
|
|
1345
1350
|
}
|
|
1346
|
-
return (p,
|
|
1351
|
+
return (p, g) => {
|
|
1347
1352
|
const v = G("FmButton"), m = G("FmLabel"), l = G("FmDialog");
|
|
1348
|
-
return
|
|
1353
|
+
return b(), N("div", mr, [
|
|
1349
1354
|
I(l, {
|
|
1350
|
-
modelValue:
|
|
1351
|
-
"onUpdate:modelValue":
|
|
1355
|
+
modelValue: h.value,
|
|
1356
|
+
"onUpdate:modelValue": g[2] || (g[2] = (a) => h.value = a),
|
|
1352
1357
|
overlay: !0
|
|
1353
1358
|
}, {
|
|
1354
|
-
"dialog-button":
|
|
1359
|
+
"dialog-button": oe(() => [
|
|
1355
1360
|
I(v, {
|
|
1356
1361
|
"prepend-icon": "info",
|
|
1357
1362
|
variant: "secondary",
|
|
1358
1363
|
label: "Latest Info",
|
|
1359
|
-
onClick:
|
|
1364
|
+
onClick: g[0] || (g[0] = (a) => r()),
|
|
1360
1365
|
"text-color": "primary",
|
|
1361
1366
|
"bg-color": "transparent",
|
|
1362
1367
|
"border-color": "primary"
|
|
1363
1368
|
})
|
|
1364
1369
|
]),
|
|
1365
|
-
"dialog-header":
|
|
1370
|
+
"dialog-header": oe(() => g[3] || (g[3] = [
|
|
1366
1371
|
i("div", null, "NetSuite latest info", -1)
|
|
1367
1372
|
])),
|
|
1368
|
-
"dialog-footer":
|
|
1373
|
+
"dialog-footer": oe(() => [
|
|
1369
1374
|
I(v, {
|
|
1370
1375
|
class: "ml-auto sm:w-full xs:w-full",
|
|
1371
1376
|
label: "Close",
|
|
1372
1377
|
size: "md",
|
|
1373
1378
|
variant: "primary",
|
|
1374
|
-
onClick:
|
|
1379
|
+
onClick: g[1] || (g[1] = (a) => h.value = !1)
|
|
1375
1380
|
})
|
|
1376
1381
|
]),
|
|
1377
|
-
default:
|
|
1378
|
-
|
|
1379
|
-
c.value ? (
|
|
1380
|
-
key:
|
|
1382
|
+
default: oe(() => [
|
|
1383
|
+
t.value ? (b(), N("div", pr, "Loading...")) : (b(), N("div", vr, [
|
|
1384
|
+
c.value ? (b(), N("p", gr, "Something went wrong.")) : (b(!0), N(re, { key: 0 }, pe(n.value, (a, _) => (b(), N("div", {
|
|
1385
|
+
key: _,
|
|
1381
1386
|
class: "mb-2"
|
|
1382
1387
|
}, [
|
|
1383
1388
|
i("div", null, [
|
|
1384
1389
|
I(m, {
|
|
1385
|
-
label: S(
|
|
1390
|
+
label: S(Me)(_)
|
|
1386
1391
|
}, null, 8, ["label"]),
|
|
1387
|
-
i("div",
|
|
1388
|
-
Array.isArray(a) ? (
|
|
1392
|
+
i("div", yr, [
|
|
1393
|
+
Array.isArray(a) ? (b(), N("span", hr, D(a.length > 0 ? a.join(", ") : "N/A"), 1)) : (b(), N("span", br, D(a), 1))
|
|
1389
1394
|
])
|
|
1390
1395
|
])
|
|
1391
1396
|
]))), 128))
|
|
@@ -1396,10 +1401,10 @@ const jt = { class: "flex flex-row-reverse" }, zt = /* @__PURE__ */ be({
|
|
|
1396
1401
|
]);
|
|
1397
1402
|
};
|
|
1398
1403
|
}
|
|
1399
|
-
}),
|
|
1404
|
+
}), Sr = {
|
|
1400
1405
|
key: 0,
|
|
1401
1406
|
class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg p-16 flex flex-col gap-8"
|
|
1402
|
-
},
|
|
1407
|
+
}, Rr = { class: "flex gap-8 items-center" }, wr = { class: "ml-auto" }, Or = { class: "flex gap-4" }, Nr = /* @__PURE__ */ be({
|
|
1403
1408
|
__name: "NetSuitePanel",
|
|
1404
1409
|
props: {
|
|
1405
1410
|
poRequest: {},
|
|
@@ -1409,90 +1414,90 @@ const jt = { class: "flex flex-row-reverse" }, zt = /* @__PURE__ */ be({
|
|
|
1409
1414
|
scope: {}
|
|
1410
1415
|
},
|
|
1411
1416
|
setup(f) {
|
|
1412
|
-
const
|
|
1413
|
-
var r, p,
|
|
1414
|
-
const
|
|
1415
|
-
return c || n && !
|
|
1417
|
+
const e = f, s = Ft(), h = Ce(), u = J(() => {
|
|
1418
|
+
var r, p, g, v, m, l, a;
|
|
1419
|
+
const t = ((r = e.transferToDbName) == null ? void 0 : r.startsWith("restaurant")) && ((g = (p = e.purchaseOrder) == null ? void 0 : p.supplier) == null ? void 0 : g.internal) === "restaurant", c = e.transferType === he.PURCHASE, n = e.transferType === he.TRANSFER;
|
|
1420
|
+
return c || n && !t || ((m = (v = e.purchaseOrder) == null ? void 0 : v.netSuite) == null ? void 0 : m.id) || ((a = (l = e.poRequest) == null ? void 0 : l.netSuite) == null ? void 0 : a.id);
|
|
1416
1421
|
});
|
|
1417
|
-
return (
|
|
1418
|
-
var r, p,
|
|
1422
|
+
return (t, c) => {
|
|
1423
|
+
var r, p, g, v, m, l, a, _, w, k;
|
|
1419
1424
|
const n = G("FmMenuDivider");
|
|
1420
|
-
return S(s).isNetSuiteEnabled && u.value ? (
|
|
1421
|
-
i("div",
|
|
1425
|
+
return S(s).isNetSuiteEnabled && u.value ? (b(), N("div", Sr, [
|
|
1426
|
+
i("div", Rr, [
|
|
1422
1427
|
c[0] || (c[0] = i("span", { class: "flex-1 fm-typo-en-body-lg-600" }, "NetSuite Info", -1)),
|
|
1423
|
-
i("div",
|
|
1424
|
-
i("div",
|
|
1425
|
-
(r = S(
|
|
1428
|
+
i("div", wr, [
|
|
1429
|
+
i("div", Or, [
|
|
1430
|
+
(r = S(h).sessionUser.value) != null && r.role.isAdmin && ((g = (p = e.purchaseOrder) == null ? void 0 : p.netSuite) != null && g.id) ? (b(), ie(_r, {
|
|
1426
1431
|
key: 0,
|
|
1427
|
-
"netsuite-id": (m = (v =
|
|
1428
|
-
"purchase-order-id": (l =
|
|
1432
|
+
"netsuite-id": (m = (v = t.purchaseOrder) == null ? void 0 : v.netSuite) == null ? void 0 : m.id,
|
|
1433
|
+
"purchase-order-id": (l = t.purchaseOrder) == null ? void 0 : l._id
|
|
1429
1434
|
}, null, 8, ["netsuite-id", "purchase-order-id"])) : U("", !0),
|
|
1430
|
-
(a = S(
|
|
1435
|
+
(a = S(h).sessionUser.value) != null && a.role.isAdmin ? (b(), ie(fr, {
|
|
1431
1436
|
key: 1,
|
|
1432
|
-
"netsuite-id": (
|
|
1433
|
-
"purchase-order-id": (
|
|
1437
|
+
"netsuite-id": (w = (_ = t.purchaseOrder) == null ? void 0 : _.netSuite) == null ? void 0 : w.id,
|
|
1438
|
+
"purchase-order-id": (k = t.purchaseOrder) == null ? void 0 : k._id
|
|
1434
1439
|
}, null, 8, ["netsuite-id", "purchase-order-id"])) : U("", !0),
|
|
1435
|
-
I(
|
|
1436
|
-
"po-request":
|
|
1437
|
-
"purchase-order":
|
|
1440
|
+
I(Ht, {
|
|
1441
|
+
"po-request": t.poRequest,
|
|
1442
|
+
"purchase-order": t.purchaseOrder,
|
|
1438
1443
|
"is-transfer-between-outlets": !u.value,
|
|
1439
|
-
scope:
|
|
1444
|
+
scope: t.scope
|
|
1440
1445
|
}, null, 8, ["po-request", "purchase-order", "is-transfer-between-outlets", "scope"])
|
|
1441
1446
|
])
|
|
1442
1447
|
])
|
|
1443
1448
|
]),
|
|
1444
1449
|
I(n),
|
|
1445
|
-
I(
|
|
1446
|
-
"po-request":
|
|
1447
|
-
"purchase-order":
|
|
1448
|
-
"transfer-type":
|
|
1449
|
-
"transfer-to-db-name":
|
|
1450
|
+
I(ur, {
|
|
1451
|
+
"po-request": t.poRequest,
|
|
1452
|
+
"purchase-order": t.purchaseOrder,
|
|
1453
|
+
"transfer-type": t.transferType,
|
|
1454
|
+
"transfer-to-db-name": t.transferToDbName,
|
|
1450
1455
|
"is-transfer-between-outlets": !u.value,
|
|
1451
|
-
scope:
|
|
1456
|
+
scope: t.scope
|
|
1452
1457
|
}, null, 8, ["po-request", "purchase-order", "transfer-type", "transfer-to-db-name", "is-transfer-between-outlets", "scope"])
|
|
1453
1458
|
])) : U("", !0);
|
|
1454
1459
|
};
|
|
1455
1460
|
}
|
|
1456
|
-
}),
|
|
1461
|
+
}), kr = { class: "flex flex-col gap-16 w-full h-full" }, xr = { class: "flex justify-between" }, Dr = { class: "fm-typo-en-body-lg-600" }, qr = { class: "flex flex-col gap-8" }, Tr = { class: "flex flex-col gap-4" }, Ar = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, $r = { class: "flex gap-1" }, Cr = { class: "fm-typo-en-body-lg-600" }, Pr = {
|
|
1457
1462
|
key: 0,
|
|
1458
1463
|
class: "flex flex-col gap-4"
|
|
1459
|
-
},
|
|
1464
|
+
}, Ir = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Fr = { class: "fm-typo-en-body-lg-600" }, Er = { class: "flex flex-col gap-4" }, Lr = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Br = { class: "fm-typo-en-body-lg-600" }, Vr = {
|
|
1460
1465
|
key: 1,
|
|
1461
1466
|
class: "flex flex-col gap-4"
|
|
1462
|
-
},
|
|
1467
|
+
}, Ur = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Mr = { class: "fm-typo-en-body-lg-600" }, Kr = {
|
|
1463
1468
|
key: 2,
|
|
1464
1469
|
class: "flex flex-col gap-4"
|
|
1465
|
-
},
|
|
1470
|
+
}, jr = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, zr = { class: "fm-typo-en-body-lg-600" }, Hr = {
|
|
1466
1471
|
key: 3,
|
|
1467
1472
|
class: "flex flex-col gap-4"
|
|
1468
|
-
},
|
|
1473
|
+
}, Gr = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Wr = { class: "fm-typo-en-body-lg-600" }, Qr = {
|
|
1469
1474
|
key: 4,
|
|
1470
1475
|
class: "flex flex-col gap-4"
|
|
1471
|
-
},
|
|
1476
|
+
}, Yr = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Xr = { class: "fm-typo-en-body-lg-600" }, Jr = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg p-16" }, Zr = { class: "flex flex-col gap-8" }, es = { class: "flex gap-8 items-center" }, ts = { class: "flex-1 fm-typo-en-body-lg-600" }, rs = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary flex flex-col gap-4" }, ss = { class: "flex w-full gap-4" }, ns = { class: "basis-1/2 shrink-0 grow fm-typo-en-body-lg-400 line-clamp-2 flex items-center gap-2" }, os = { class: "fm-typo-en-body-lg-400 line-clamp-2" }, as = ["innerHTML"], is = { class: "flex w-full gap-4 fm-typo-en-body-sm-400" }, ls = { class: "grow fm-typo-en-body-lg-400 text-fm-color-typo-secondary line-clamp-1" }, cs = {
|
|
1472
1477
|
key: 0,
|
|
1473
1478
|
class: "line-clamp-1 fm-typo-en-body-lg-400 text-fm-color-typo-secondary"
|
|
1474
|
-
},
|
|
1479
|
+
}, us = { class: "py-8" }, ds = { class: "flex justify-end gap-4 items-center" }, fs = { class: "fm-typo-en-body-lg-600" }, ms = {
|
|
1475
1480
|
key: 1,
|
|
1476
1481
|
class: "flex-1 xs:w-screen xs:max-w-full"
|
|
1477
|
-
},
|
|
1482
|
+
}, ps = {
|
|
1478
1483
|
key: 0,
|
|
1479
1484
|
class: "flex flex-col items-center gap-8 h-full"
|
|
1480
|
-
},
|
|
1485
|
+
}, vs = ["src"], ys = { class: "fm-typo-en-body-lg-600" }, hs = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary px-16" }, bs = {
|
|
1481
1486
|
key: 1,
|
|
1482
1487
|
class: "px-4 flex flex-col"
|
|
1483
|
-
},
|
|
1488
|
+
}, gs = { class: "flex gap-12 content-stretch" }, _s = {
|
|
1484
1489
|
class: "flex flex-col w-24",
|
|
1485
1490
|
name: "circles"
|
|
1486
|
-
},
|
|
1491
|
+
}, Ss = { class: "flex-1 flex flex-col items-center" }, Rs = { class: "flex-1 flex flex-col items-center" }, ws = {
|
|
1487
1492
|
class: "py-12 flex flex-col gap-4",
|
|
1488
1493
|
name: "received-at header"
|
|
1489
|
-
},
|
|
1494
|
+
}, Os = { class: "fm-typo-en-body-lg-400" }, Ns = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, ks = { class: "flex gap-12 content-stretch" }, xs = {
|
|
1490
1495
|
class: "flex flex-col w-24",
|
|
1491
1496
|
name: "circles"
|
|
1492
|
-
},
|
|
1497
|
+
}, Ds = { class: "flex-1 flex flex-col items-center" }, qs = {
|
|
1493
1498
|
class: "py-12 flex flex-col gap-4 flex-1",
|
|
1494
1499
|
name: "delivery details"
|
|
1495
|
-
},
|
|
1500
|
+
}, Ts = { class: "flex flex-col gap-8" }, As = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, $s = { class: "flex flex-col gap-4" }, Cs = { class: "flex gap-8 xs:flex-col" }, Hs = /* @__PURE__ */ be({
|
|
1496
1501
|
__name: "TransferDetails",
|
|
1497
1502
|
props: {
|
|
1498
1503
|
poRequest: {},
|
|
@@ -1506,8 +1511,8 @@ const jt = { class: "flex flex-row-reverse" }, zt = /* @__PURE__ */ be({
|
|
|
1506
1511
|
receivedMap: {}
|
|
1507
1512
|
},
|
|
1508
1513
|
emits: ["update:show", "submitted"],
|
|
1509
|
-
setup(f, { emit:
|
|
1510
|
-
const s = f,
|
|
1514
|
+
setup(f, { emit: e }) {
|
|
1515
|
+
const s = f, h = e, u = Ke(), t = Pe(), c = Ae(), n = fe(), r = Ce(), p = J(
|
|
1511
1516
|
() => {
|
|
1512
1517
|
var o, d;
|
|
1513
1518
|
return {
|
|
@@ -1515,50 +1520,50 @@ const jt = { class: "flex flex-row-reverse" }, zt = /* @__PURE__ */ be({
|
|
|
1515
1520
|
name: ((d = r.sessionUser.value) == null ? void 0 : d.displayName) ?? ""
|
|
1516
1521
|
};
|
|
1517
1522
|
}
|
|
1518
|
-
),
|
|
1523
|
+
), g = jt(), { t: v } = lt(), m = J(
|
|
1519
1524
|
() => {
|
|
1520
|
-
var o, d,
|
|
1521
|
-
return ((d = (o = s.purchaseOrder) == null ? void 0 : o.supplier) == null ? void 0 : d.internal) === "restaurant" || ((
|
|
1525
|
+
var o, d, x, R;
|
|
1526
|
+
return ((d = (o = s.purchaseOrder) == null ? void 0 : o.supplier) == null ? void 0 : d.internal) === "restaurant" || ((R = (x = s.purchaseOrder) == null ? void 0 : x.supplier) == null ? void 0 : R.internal) === "warehouse" ? he.TRANSFER : he.PURCHASE;
|
|
1522
1527
|
}
|
|
1523
|
-
), l = K(!1), a = K(""),
|
|
1528
|
+
), l = K(!1), a = K(""), _ = K(!0), w = Ie(), k = It(w.getWorkflowConfig), F = ft(), $ = J(() => {
|
|
1524
1529
|
if (!s.purchaseOrder)
|
|
1525
1530
|
return [];
|
|
1526
|
-
const o =
|
|
1531
|
+
const o = k.result.value;
|
|
1527
1532
|
if (o.state === et.loading)
|
|
1528
1533
|
return [];
|
|
1529
1534
|
const d = {
|
|
1530
1535
|
user: p.value,
|
|
1531
1536
|
executedAt: n.locations.computeFirst(
|
|
1532
|
-
(
|
|
1537
|
+
(R) => {
|
|
1533
1538
|
var z;
|
|
1534
|
-
return
|
|
1539
|
+
return R.dbName === ((z = n._currentLocation) == null ? void 0 : z.dbName) ? R : null;
|
|
1535
1540
|
}
|
|
1536
1541
|
),
|
|
1537
1542
|
purchaseOrderRequest: s.poRequest,
|
|
1538
1543
|
purchaseOrder: s.purchaseOrder
|
|
1539
1544
|
};
|
|
1540
|
-
let
|
|
1545
|
+
let x = [];
|
|
1541
1546
|
try {
|
|
1542
|
-
o.state === et.error ? (console.error("Error fetching workflow config:", o.error),
|
|
1547
|
+
o.state === et.error ? (console.error("Error fetching workflow config:", o.error), x = Fe.getAvailableActions({
|
|
1543
1548
|
...d,
|
|
1544
1549
|
orderConfig: Fe.getDefaultConfig()
|
|
1545
1550
|
}).actions.filter(
|
|
1546
|
-
(
|
|
1551
|
+
(R) => (
|
|
1547
1552
|
// TODO: create receiveStock & processRequest dialog
|
|
1548
1553
|
// to create their payload
|
|
1549
|
-
|
|
1554
|
+
R !== O.enum.receiveStock && R !== O.enum.processRequest && R !== O.enum.closeRequest
|
|
1550
1555
|
)
|
|
1551
|
-
)) :
|
|
1556
|
+
)) : x = Fe.getAvailableActions({
|
|
1552
1557
|
...d,
|
|
1553
1558
|
orderConfig: o.data
|
|
1554
1559
|
}).actions.filter(
|
|
1555
|
-
(
|
|
1560
|
+
(R) => R !== O.enum.receiveStock && R !== O.enum.processRequest && R !== O.enum.closeRequest
|
|
1556
1561
|
);
|
|
1557
|
-
} catch (
|
|
1558
|
-
console.error("Error getting available actions:",
|
|
1562
|
+
} catch (R) {
|
|
1563
|
+
console.error("Error getting available actions:", R);
|
|
1559
1564
|
}
|
|
1560
|
-
return s.scope === "approval" && (
|
|
1561
|
-
}), C =
|
|
1565
|
+
return s.scope === "approval" && (x = x.filter((R) => R !== O.enum.completeReceive)), x;
|
|
1566
|
+
}), C = xt(s, "show"), M = J(() => [
|
|
1562
1567
|
{
|
|
1563
1568
|
label: v("inventory.transfer.receiveRequest.details.overview"),
|
|
1564
1569
|
value: "overview"
|
|
@@ -1574,18 +1579,18 @@ const jt = { class: "flex flex-row-reverse" }, zt = /* @__PURE__ */ be({
|
|
|
1574
1579
|
o && (j.value = M.value[0]);
|
|
1575
1580
|
}
|
|
1576
1581
|
);
|
|
1577
|
-
async function
|
|
1582
|
+
async function ae(o, d, x, R, z) {
|
|
1578
1583
|
return new Promise((H, Z) => {
|
|
1579
1584
|
u.open({
|
|
1580
1585
|
closeButton: !1,
|
|
1581
|
-
title:
|
|
1582
|
-
message:
|
|
1583
|
-
primaryActions:
|
|
1586
|
+
title: R.title,
|
|
1587
|
+
message: R.message,
|
|
1588
|
+
primaryActions: R.primaryActions,
|
|
1584
1589
|
secondaryActions: { text: "No", close: !1 }
|
|
1585
1590
|
}).onPrimary(async () => {
|
|
1586
|
-
var L, W, Q,
|
|
1591
|
+
var L, W, Q, E;
|
|
1587
1592
|
const y = [];
|
|
1588
|
-
|
|
1593
|
+
x === O.enum.approveRequest ? (y.push({
|
|
1589
1594
|
action: "approveRequest",
|
|
1590
1595
|
payload: null
|
|
1591
1596
|
}), d.fulfillment && y.push({
|
|
@@ -1597,7 +1602,7 @@ const jt = { class: "flex flex-row-reverse" }, zt = /* @__PURE__ */ be({
|
|
|
1597
1602
|
items: d.fulfillment.items,
|
|
1598
1603
|
createdBy: p.value
|
|
1599
1604
|
}
|
|
1600
|
-
})) :
|
|
1605
|
+
})) : x === O.enum.processRequest ? d.fulfillment && y.push({
|
|
1601
1606
|
action: "processRequest",
|
|
1602
1607
|
payload: {
|
|
1603
1608
|
fulfillmentId: "",
|
|
@@ -1606,28 +1611,28 @@ const jt = { class: "flex flex-row-reverse" }, zt = /* @__PURE__ */ be({
|
|
|
1606
1611
|
items: d.fulfillment.items,
|
|
1607
1612
|
createdBy: p.value
|
|
1608
1613
|
}
|
|
1609
|
-
}) :
|
|
1614
|
+
}) : x === O.enum.rejectRequest ? y.push({
|
|
1610
1615
|
action: "rejectRequest",
|
|
1611
1616
|
payload: null
|
|
1612
|
-
}) :
|
|
1617
|
+
}) : x === O.enum.closeRequest && y.push({
|
|
1613
1618
|
action: "closeRequest",
|
|
1614
1619
|
payload: null
|
|
1615
1620
|
});
|
|
1616
1621
|
try {
|
|
1617
|
-
await
|
|
1622
|
+
await F({
|
|
1618
1623
|
operate: {
|
|
1619
|
-
operation:
|
|
1624
|
+
operation: x,
|
|
1620
1625
|
doc: o,
|
|
1621
1626
|
options: d
|
|
1622
1627
|
},
|
|
1623
1628
|
operateV2: {
|
|
1624
1629
|
_id: ((L = s.purchaseOrder) == null ? void 0 : L._id) ?? "",
|
|
1625
1630
|
_rev: ((W = s.purchaseOrder) == null ? void 0 : W._rev) ?? "",
|
|
1626
|
-
action:
|
|
1631
|
+
action: x,
|
|
1627
1632
|
payloads: y
|
|
1628
1633
|
// add payload if action is receiveStock or processRequest
|
|
1629
1634
|
},
|
|
1630
|
-
transferTo: (
|
|
1635
|
+
transferTo: (E = (Q = s.poRequest) == null ? void 0 : Q.to) == null ? void 0 : E.dbName
|
|
1631
1636
|
}).delayed(1e3), H("submitted");
|
|
1632
1637
|
} catch (ee) {
|
|
1633
1638
|
Z(ee);
|
|
@@ -1640,40 +1645,40 @@ const jt = { class: "flex flex-row-reverse" }, zt = /* @__PURE__ */ be({
|
|
|
1640
1645
|
});
|
|
1641
1646
|
});
|
|
1642
1647
|
}
|
|
1643
|
-
async function
|
|
1648
|
+
async function se(o) {
|
|
1644
1649
|
var z, H, Z, y;
|
|
1645
1650
|
if (o === O.enum.receiveStock)
|
|
1646
1651
|
return;
|
|
1647
1652
|
const d = ct[o];
|
|
1648
1653
|
if (!d) {
|
|
1649
|
-
|
|
1654
|
+
t.open({
|
|
1650
1655
|
title: "Something went wrong",
|
|
1651
|
-
message: `Cannot process order: ${
|
|
1656
|
+
message: `Cannot process order: ${Me(o)}`,
|
|
1652
1657
|
type: "error"
|
|
1653
1658
|
});
|
|
1654
1659
|
return;
|
|
1655
1660
|
}
|
|
1656
|
-
const { successMessage:
|
|
1661
|
+
const { successMessage: x, ...R } = d;
|
|
1657
1662
|
if (s.purchaseOrder) {
|
|
1658
|
-
a.value = `${o}`, l.value = !0,
|
|
1663
|
+
a.value = `${o}`, l.value = !0, _.value = !1;
|
|
1659
1664
|
const L = {};
|
|
1660
1665
|
let W = 0;
|
|
1661
1666
|
if ((o === O.enum.confirmDraft || // auto receive for warehouse to warehouse
|
|
1662
1667
|
o === O.enum.completeReceive) && c.autoReceiveWarehouse)
|
|
1663
1668
|
L.autoReceive = !0;
|
|
1664
1669
|
else if ((o === O.enum.approveRequest || o === O.enum.processRequest) && c.acceptRequireFulfillment) {
|
|
1665
|
-
const Q = (H = (z = s.poRequest) == null ? void 0 : z.from) == null ? void 0 : H.dbName,
|
|
1666
|
-
if (Q &&
|
|
1667
|
-
const ee = await new Promise((B,
|
|
1670
|
+
const Q = (H = (z = s.poRequest) == null ? void 0 : z.from) == null ? void 0 : H.dbName, E = (y = (Z = s.poRequest) == null ? void 0 : Z.to) == null ? void 0 : y.dbName;
|
|
1671
|
+
if (Q && E && (Q.startsWith("warehouse_") || E.startsWith("warehouse_"))) {
|
|
1672
|
+
const ee = await new Promise((B, ue) => {
|
|
1668
1673
|
u.open({
|
|
1669
1674
|
closeButton: !1,
|
|
1670
1675
|
title: "Confirm transfer amount",
|
|
1671
|
-
dialogComponent:
|
|
1676
|
+
dialogComponent: Kt,
|
|
1672
1677
|
dialogComponentProps: {
|
|
1673
1678
|
purchaseOrder: s.purchaseOrder,
|
|
1674
1679
|
confirm: B,
|
|
1675
1680
|
"onUpdate:show": (me) => {
|
|
1676
|
-
me || (a.value = "", l.value = !1,
|
|
1681
|
+
me || (a.value = "", l.value = !1, _.value = !0, W++, u.close()), ue("cancelled");
|
|
1677
1682
|
}
|
|
1678
1683
|
}
|
|
1679
1684
|
});
|
|
@@ -1682,34 +1687,34 @@ const jt = { class: "flex flex-row-reverse" }, zt = /* @__PURE__ */ be({
|
|
|
1682
1687
|
}
|
|
1683
1688
|
}
|
|
1684
1689
|
try {
|
|
1685
|
-
await
|
|
1690
|
+
await ae(
|
|
1686
1691
|
s.purchaseOrder,
|
|
1687
1692
|
L,
|
|
1688
1693
|
o,
|
|
1689
1694
|
d,
|
|
1690
1695
|
W
|
|
1691
|
-
) === "submitted" && (
|
|
1696
|
+
) === "submitted" && (t.open({
|
|
1692
1697
|
title: "Success",
|
|
1693
|
-
message:
|
|
1698
|
+
message: x,
|
|
1694
1699
|
type: "success"
|
|
1695
|
-
}),
|
|
1700
|
+
}), h("update:show", !1), h("submitted"));
|
|
1696
1701
|
} catch (Q) {
|
|
1697
|
-
|
|
1702
|
+
t.open({
|
|
1698
1703
|
title: "Something went wrong",
|
|
1699
1704
|
message: "Please try again.",
|
|
1700
1705
|
type: "error"
|
|
1701
1706
|
}), console.error("Error when submitting PO operation", o, s.purchaseOrder, Q);
|
|
1702
1707
|
} finally {
|
|
1703
|
-
a.value = "", l.value = !1,
|
|
1708
|
+
a.value = "", l.value = !1, _.value = !0;
|
|
1704
1709
|
}
|
|
1705
1710
|
}
|
|
1706
1711
|
}
|
|
1707
1712
|
const ge = J(() => {
|
|
1708
1713
|
var o, d;
|
|
1709
|
-
return ((o = s.purchaseOrder) == null ? void 0 : o.status) ===
|
|
1710
|
-
}),
|
|
1714
|
+
return ((o = s.purchaseOrder) == null ? void 0 : o.status) === le.enum.RECEIVING || ((d = s.purchaseOrder) == null ? void 0 : d.status) === le.enum.COMPLETE;
|
|
1715
|
+
}), ce = J(() => {
|
|
1711
1716
|
var H, Z;
|
|
1712
|
-
const o = ((H = s.purchaseOrder) == null ? void 0 : H.deliveryOrder) ?? [], d = ((Z = s.purchaseOrder) == null ? void 0 : Z.deliveryFullfillment) ?? [],
|
|
1717
|
+
const o = ((H = s.purchaseOrder) == null ? void 0 : H.deliveryOrder) ?? [], d = ((Z = s.purchaseOrder) == null ? void 0 : Z.deliveryFullfillment) ?? [], x = [
|
|
1713
1718
|
...o.map((y) => ({
|
|
1714
1719
|
createdAt: y.createdAt,
|
|
1715
1720
|
type: "grn",
|
|
@@ -1721,21 +1726,21 @@ const jt = { class: "flex flex-row-reverse" }, zt = /* @__PURE__ */ be({
|
|
|
1721
1726
|
doc: y
|
|
1722
1727
|
}))
|
|
1723
1728
|
];
|
|
1724
|
-
|
|
1725
|
-
function
|
|
1726
|
-
var Q,
|
|
1729
|
+
x.reverse().sort((y, L) => y.createdAt.localeCompare(L.createdAt));
|
|
1730
|
+
function R(y) {
|
|
1731
|
+
var Q, E, ee, B, ue, me, we, Oe, V;
|
|
1727
1732
|
const L = d.findIndex((P) => P.id === y.fullfillmentId), W = [
|
|
1728
|
-
(
|
|
1733
|
+
(E = (Q = d[L]) == null ? void 0 : Q.netSuite) != null && E.refNo ? {
|
|
1729
1734
|
label: "Fulfillment's ref no. (Netsuite)",
|
|
1730
1735
|
values: [(B = (ee = d[L]) == null ? void 0 : ee.netSuite) == null ? void 0 : B.refNo]
|
|
1731
1736
|
} : null,
|
|
1732
|
-
(
|
|
1737
|
+
(ue = y == null ? void 0 : y.netSuite) != null && ue.refNo ? {
|
|
1733
1738
|
label: "Netsuite ref no.",
|
|
1734
1739
|
values: [(me = y == null ? void 0 : y.netSuite) == null ? void 0 : me.refNo]
|
|
1735
1740
|
} : null,
|
|
1736
1741
|
(we = y == null ? void 0 : y.netSuite) != null && we.recordType ? {
|
|
1737
1742
|
label: "Netsuite Type",
|
|
1738
|
-
values: [
|
|
1743
|
+
values: [ot((Oe = y == null ? void 0 : y.netSuite) == null ? void 0 : Oe.recordType)]
|
|
1739
1744
|
} : null
|
|
1740
1745
|
];
|
|
1741
1746
|
return {
|
|
@@ -1802,7 +1807,7 @@ const jt = { class: "flex flex-row-reverse" }, zt = /* @__PURE__ */ be({
|
|
|
1802
1807
|
{
|
|
1803
1808
|
class: "fm-typo-en-body-lg-600 self-end"
|
|
1804
1809
|
},
|
|
1805
|
-
|
|
1810
|
+
de(P.amount, !1)
|
|
1806
1811
|
),
|
|
1807
1812
|
A(
|
|
1808
1813
|
"span",
|
|
@@ -1845,7 +1850,7 @@ const jt = { class: "flex flex-row-reverse" }, zt = /* @__PURE__ */ be({
|
|
|
1845
1850
|
}
|
|
1846
1851
|
function z(y) {
|
|
1847
1852
|
var W, Q;
|
|
1848
|
-
const L = d.findIndex((
|
|
1853
|
+
const L = d.findIndex((E) => E.id === y.id);
|
|
1849
1854
|
return {
|
|
1850
1855
|
header: "Fulfillment",
|
|
1851
1856
|
date: Ee(new Date(y.createdAt)),
|
|
@@ -1856,7 +1861,7 @@ const jt = { class: "flex flex-row-reverse" }, zt = /* @__PURE__ */ be({
|
|
|
1856
1861
|
},
|
|
1857
1862
|
{
|
|
1858
1863
|
label: "Receiveable items",
|
|
1859
|
-
values: y.items.map((
|
|
1864
|
+
values: y.items.map((E) => {
|
|
1860
1865
|
var ee;
|
|
1861
1866
|
return A("div", [
|
|
1862
1867
|
A(
|
|
@@ -1876,14 +1881,14 @@ const jt = { class: "flex flex-row-reverse" }, zt = /* @__PURE__ */ be({
|
|
|
1876
1881
|
{
|
|
1877
1882
|
class: "fm-typo-en-body-lg-800 basis-1/2 shrink-0 grow"
|
|
1878
1883
|
},
|
|
1879
|
-
`${
|
|
1884
|
+
`${E.sku.name}`
|
|
1880
1885
|
),
|
|
1881
1886
|
A(
|
|
1882
1887
|
"span",
|
|
1883
1888
|
{
|
|
1884
1889
|
class: "fm-typo-en-body-md-400"
|
|
1885
1890
|
},
|
|
1886
|
-
`${
|
|
1891
|
+
`${E.sku.code} `
|
|
1887
1892
|
)
|
|
1888
1893
|
]
|
|
1889
1894
|
),
|
|
@@ -1904,14 +1909,14 @@ const jt = { class: "flex flex-row-reverse" }, zt = /* @__PURE__ */ be({
|
|
|
1904
1909
|
{
|
|
1905
1910
|
class: "fm-typo-en-body-lg-600 self-end"
|
|
1906
1911
|
},
|
|
1907
|
-
|
|
1912
|
+
de(E.amount, !1)
|
|
1908
1913
|
),
|
|
1909
1914
|
A(
|
|
1910
1915
|
"span",
|
|
1911
1916
|
{
|
|
1912
1917
|
class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary"
|
|
1913
1918
|
},
|
|
1914
|
-
((ee =
|
|
1919
|
+
((ee = E.measurement) == null ? void 0 : ee.abbrev) ?? E.sku.unit.abbrev
|
|
1915
1920
|
)
|
|
1916
1921
|
]
|
|
1917
1922
|
),
|
|
@@ -1920,7 +1925,7 @@ const jt = { class: "flex flex-row-reverse" }, zt = /* @__PURE__ */ be({
|
|
|
1920
1925
|
{
|
|
1921
1926
|
class: "flex self-end fm-typo-en-body-md-400 text-fm-color-typo-secondary"
|
|
1922
1927
|
},
|
|
1923
|
-
`${
|
|
1928
|
+
`${E.cost ? `(${De(E.cost)})` : ""}`
|
|
1924
1929
|
)
|
|
1925
1930
|
]
|
|
1926
1931
|
)
|
|
@@ -1933,73 +1938,73 @@ const jt = { class: "flex flex-row-reverse" }, zt = /* @__PURE__ */ be({
|
|
|
1933
1938
|
label: "Ref no. (Netsuite)",
|
|
1934
1939
|
values: [(Q = y.netSuite) == null ? void 0 : Q.refNo]
|
|
1935
1940
|
} : null
|
|
1936
|
-
].filter((
|
|
1941
|
+
].filter((E) => E)
|
|
1937
1942
|
};
|
|
1938
1943
|
}
|
|
1939
|
-
return
|
|
1944
|
+
return x.map((y) => {
|
|
1940
1945
|
switch (y.type) {
|
|
1941
1946
|
case "grn":
|
|
1942
|
-
return
|
|
1947
|
+
return R(y.doc);
|
|
1943
1948
|
case "fulfillment":
|
|
1944
1949
|
return z(y.doc);
|
|
1945
1950
|
}
|
|
1946
1951
|
});
|
|
1947
|
-
}),
|
|
1952
|
+
}), ke = J(() => {
|
|
1948
1953
|
var d;
|
|
1949
1954
|
const o = {
|
|
1950
1955
|
...st(0),
|
|
1951
|
-
currency:
|
|
1956
|
+
currency: Je()
|
|
1952
1957
|
};
|
|
1953
|
-
return ((d = s.purchaseOrder) == null ? void 0 : d.items.reduce((
|
|
1954
|
-
...rt(
|
|
1955
|
-
currency:
|
|
1958
|
+
return ((d = s.purchaseOrder) == null ? void 0 : d.items.reduce((x, R) => ({
|
|
1959
|
+
...rt(x, R.totalCost ?? o),
|
|
1960
|
+
currency: Je()
|
|
1956
1961
|
}), o)) ?? o;
|
|
1957
1962
|
});
|
|
1958
1963
|
function q(o) {
|
|
1959
1964
|
var H;
|
|
1960
|
-
const
|
|
1961
|
-
return `<span class="${
|
|
1965
|
+
const x = (((H = s.purchaseOrder) == null ? void 0 : H.version) ?? ve.enum[1]) === ve.enum[2] ? o.id : o.sku._id, R = s.receivedMap[x];
|
|
1966
|
+
return `<span class="${T(o)} fm-typo-en-body-lg-600">${St.toFormatString({ value: R.received })}</span>/${Tt(o.quantity, o.sku.unit, o.measurement)}`;
|
|
1962
1967
|
}
|
|
1963
|
-
function
|
|
1968
|
+
function T(o) {
|
|
1964
1969
|
var L;
|
|
1965
|
-
const
|
|
1970
|
+
const x = (((L = s.purchaseOrder) == null ? void 0 : L.version) ?? ve.enum[1]) === ve.enum[2] ? o.id : o.sku._id, R = s.receivedMap[x], { isPartialReceive: z, isNoReceive: H, isOverReceive: Z, isFullReceive: y } = dt(R);
|
|
1966
1971
|
return H ? "text-fm-color-typo-tertiary" : z ? "text-fm-color-system-warning-300" : Z ? "text-fm-color-system-error-300" : y ? "text-fm-color-system-success-300" : "";
|
|
1967
1972
|
}
|
|
1968
1973
|
return (o, d) => {
|
|
1969
|
-
var
|
|
1970
|
-
const
|
|
1971
|
-
return
|
|
1972
|
-
header: S(v)("inventory.transfer.receiveRequest.details.title") + ((
|
|
1974
|
+
var E, ee;
|
|
1975
|
+
const x = G("FmButtonGroup"), R = G("FmChip"), z = G("FmMenuDivider"), H = G("FmCard"), Z = G("FmIcon"), y = G("FmTooltip"), L = G("FmSpacer"), W = G("FmButton"), Q = G("FmSideSheet");
|
|
1976
|
+
return b(), ie(Q, {
|
|
1977
|
+
header: S(v)("inventory.transfer.receiveRequest.details.title") + ((E = o.purchaseOrder) != null && E.seqNumber ? ` #${(ee = o.purchaseOrder) == null ? void 0 : ee.seqNumber}` : ""),
|
|
1973
1978
|
modelValue: S(C),
|
|
1974
1979
|
"onUpdate:modelValue": d[5] || (d[5] = (B) => Ot(C) ? C.value = B : null),
|
|
1975
|
-
"dismiss-away":
|
|
1980
|
+
"dismiss-away": _.value,
|
|
1976
1981
|
"close-button": "",
|
|
1977
1982
|
"max-width": 600
|
|
1978
1983
|
}, {
|
|
1979
|
-
default:
|
|
1980
|
-
var B,
|
|
1984
|
+
default: oe(() => {
|
|
1985
|
+
var B, ue, me, we, Oe;
|
|
1981
1986
|
return [
|
|
1982
|
-
i("div",
|
|
1987
|
+
i("div", kr, [
|
|
1983
1988
|
i("div", null, [
|
|
1984
|
-
I(
|
|
1989
|
+
I(x, {
|
|
1985
1990
|
items: M.value,
|
|
1986
1991
|
modelValue: j.value,
|
|
1987
1992
|
"onUpdate:modelValue": d[0] || (d[0] = (V) => j.value = V)
|
|
1988
1993
|
}, null, 8, ["items", "modelValue"])
|
|
1989
1994
|
]),
|
|
1990
|
-
j.value.value === "overview" ? (
|
|
1995
|
+
j.value.value === "overview" ? (b(), N(re, { key: 0 }, [
|
|
1991
1996
|
i("div", null, [
|
|
1992
1997
|
I(H, {
|
|
1993
1998
|
variant: "outlined",
|
|
1994
1999
|
class: "flex flex-col gap-8 px-12 py-16"
|
|
1995
2000
|
}, {
|
|
1996
|
-
default:
|
|
1997
|
-
var V, P, Y, _e, Se,
|
|
2001
|
+
default: oe(() => {
|
|
2002
|
+
var V, P, Y, _e, Se, xe, je, ze, He, Ge, We, Qe;
|
|
1998
2003
|
return [
|
|
1999
2004
|
i("div", xr, [
|
|
2000
|
-
i("div",
|
|
2005
|
+
i("div", Dr, D(S(v)("inventory.transfer.receiveRequest.details.requestSummary")), 1),
|
|
2001
2006
|
i("div", null, [
|
|
2002
|
-
I(
|
|
2007
|
+
I(R, {
|
|
2003
2008
|
label: S(v)(`inventory.transfer.status.${(V = o.purchaseOrder) == null ? void 0 : V.status}`),
|
|
2004
2009
|
class: qe(`fm-status-badge fm-status-badge-${(Y = (P = o.purchaseOrder) == null ? void 0 : P.status) == null ? void 0 : Y.toLocaleLowerCase("en-us")}`),
|
|
2005
2010
|
compact: ""
|
|
@@ -2007,38 +2012,38 @@ const jt = { class: "flex flex-row-reverse" }, zt = /* @__PURE__ */ be({
|
|
|
2007
2012
|
])
|
|
2008
2013
|
]),
|
|
2009
2014
|
I(z),
|
|
2010
|
-
i("div",
|
|
2011
|
-
i("div",
|
|
2012
|
-
i("div",
|
|
2013
|
-
i("div",
|
|
2015
|
+
i("div", qr, [
|
|
2016
|
+
i("div", Tr, [
|
|
2017
|
+
i("div", Ar, [
|
|
2018
|
+
i("div", $r, D(S(v)("inventory.transfer.receiveRequest.details.createdAt")), 1)
|
|
2014
2019
|
]),
|
|
2015
|
-
i("div",
|
|
2020
|
+
i("div", Cr, D(S(Te)(((_e = o.purchaseOrder) == null ? void 0 : _e._id) ?? "")), 1)
|
|
2016
2021
|
]),
|
|
2017
|
-
(Se = o.purchaseOrder) != null && Se.effectiveAt ? (
|
|
2018
|
-
i("div",
|
|
2019
|
-
i("div",
|
|
2022
|
+
(Se = o.purchaseOrder) != null && Se.effectiveAt ? (b(), N("div", Pr, [
|
|
2023
|
+
i("div", Ir, D(S(v)("inventory.transfer.receiveRequest.details.backdatedTo")), 1),
|
|
2024
|
+
i("div", Fr, D(S(nt)(new Date((xe = o.purchaseOrder) == null ? void 0 : xe.effectiveAt))), 1)
|
|
2020
2025
|
])) : U("", !0),
|
|
2021
|
-
i("div",
|
|
2022
|
-
i("div",
|
|
2023
|
-
i("div",
|
|
2026
|
+
i("div", Er, [
|
|
2027
|
+
i("div", Lr, D(S(v)("inventory.transfer.receiveRequest.details.type.title")), 1),
|
|
2028
|
+
i("div", Br, D(S(v)(
|
|
2024
2029
|
`inventory.transfer.receiveRequest.details.type.${m.value.toLocaleLowerCase("en-US")}`
|
|
2025
2030
|
)), 1)
|
|
2026
2031
|
]),
|
|
2027
|
-
(
|
|
2028
|
-
i("div",
|
|
2029
|
-
i("div",
|
|
2032
|
+
(ze = (je = o.purchaseOrder) == null ? void 0 : je.supplier) != null && ze.name ? (b(), N("div", Vr, [
|
|
2033
|
+
i("div", Ur, D(S(v)("inventory.transfer.receiveRequest.details.from")), 1),
|
|
2034
|
+
i("div", Mr, D((Ge = (He = o.purchaseOrder) == null ? void 0 : He.supplier) == null ? void 0 : Ge.name), 1)
|
|
2030
2035
|
])) : U("", !0),
|
|
2031
|
-
o.transferTo ? (
|
|
2032
|
-
i("div",
|
|
2033
|
-
i("div",
|
|
2036
|
+
o.transferTo ? (b(), N("div", Kr, [
|
|
2037
|
+
i("div", jr, D(S(v)("inventory.transfer.receiveRequest.details.to")), 1),
|
|
2038
|
+
i("div", zr, D(o.transferTo), 1)
|
|
2034
2039
|
])) : U("", !0),
|
|
2035
|
-
(
|
|
2036
|
-
i("div",
|
|
2037
|
-
i("div",
|
|
2040
|
+
(We = o.purchaseOrder) != null && We.ref ? (b(), N("div", Hr, [
|
|
2041
|
+
i("div", Gr, D(S(v)("inventory.transfer.receiveRequest.details.reference")), 1),
|
|
2042
|
+
i("div", Wr, D(o.purchaseOrder.ref), 1)
|
|
2038
2043
|
])) : U("", !0),
|
|
2039
|
-
(
|
|
2040
|
-
i("div",
|
|
2041
|
-
i("div",
|
|
2044
|
+
(Qe = o.purchaseOrder) != null && Qe.remark ? (b(), N("div", Qr, [
|
|
2045
|
+
i("div", Yr, D(S(v)("inventory.transfer.receiveRequest.details.remark")), 1),
|
|
2046
|
+
i("div", Xr, D(o.purchaseOrder.remark), 1)
|
|
2042
2047
|
])) : U("", !0)
|
|
2043
2048
|
])
|
|
2044
2049
|
];
|
|
@@ -2046,29 +2051,29 @@ const jt = { class: "flex flex-row-reverse" }, zt = /* @__PURE__ */ be({
|
|
|
2046
2051
|
_: 1
|
|
2047
2052
|
})
|
|
2048
2053
|
]),
|
|
2049
|
-
I(
|
|
2054
|
+
I(Nr, {
|
|
2050
2055
|
"po-request": o.poRequest,
|
|
2051
2056
|
purchaseOrder: o.purchaseOrder,
|
|
2052
2057
|
transferType: m.value,
|
|
2053
2058
|
transferToDbName: o.transferToDbName,
|
|
2054
2059
|
scope: o.scope
|
|
2055
2060
|
}, null, 8, ["po-request", "purchaseOrder", "transferType", "transferToDbName", "scope"]),
|
|
2056
|
-
i("div",
|
|
2057
|
-
i("div",
|
|
2058
|
-
i("div",
|
|
2059
|
-
i("span",
|
|
2061
|
+
i("div", Jr, [
|
|
2062
|
+
i("div", Zr, [
|
|
2063
|
+
i("div", es, [
|
|
2064
|
+
i("span", ts, [
|
|
2060
2065
|
Le(D(ge.value ? S(v)("inventory.transfer.receiveRequest.details.receivedItems") : S(v)("inventory.transfer.receiveRequest.details.requestedItems")) + " ", 1),
|
|
2061
|
-
(
|
|
2066
|
+
(ue = (B = o.purchaseOrder) == null ? void 0 : B.netSuite) != null && ue.missingItems && ((we = (me = o.purchaseOrder) == null ? void 0 : me.netSuite) == null ? void 0 : we.missingItems.length) > 0 ? (b(), ie(y, {
|
|
2062
2067
|
key: 0,
|
|
2063
2068
|
variant: "rich",
|
|
2064
2069
|
placement: "top",
|
|
2065
2070
|
"z-index": 51
|
|
2066
2071
|
}, {
|
|
2067
|
-
content:
|
|
2072
|
+
content: oe(() => {
|
|
2068
2073
|
var V, P;
|
|
2069
2074
|
return [
|
|
2070
|
-
i("div",
|
|
2071
|
-
(
|
|
2075
|
+
i("div", rs, [
|
|
2076
|
+
(b(!0), N(re, null, pe((P = (V = o.purchaseOrder) == null ? void 0 : V.netSuite) == null ? void 0 : P.missingItems, (Y, _e) => (b(), N("div", {
|
|
2072
2077
|
class: "flex justify-center align-middle",
|
|
2073
2078
|
key: _e
|
|
2074
2079
|
}, [
|
|
@@ -2081,7 +2086,7 @@ const jt = { class: "flex flex-row-reverse" }, zt = /* @__PURE__ */ be({
|
|
|
2081
2086
|
])
|
|
2082
2087
|
];
|
|
2083
2088
|
}),
|
|
2084
|
-
default:
|
|
2089
|
+
default: oe(() => [
|
|
2085
2090
|
I(Z, {
|
|
2086
2091
|
name: "error",
|
|
2087
2092
|
color: "#ff2c2c",
|
|
@@ -2093,43 +2098,43 @@ const jt = { class: "flex flex-row-reverse" }, zt = /* @__PURE__ */ be({
|
|
|
2093
2098
|
])
|
|
2094
2099
|
]),
|
|
2095
2100
|
I(z),
|
|
2096
|
-
(
|
|
2101
|
+
(b(!0), N(re, null, pe(((Oe = o.purchaseOrder) == null ? void 0 : Oe.items) ?? [], (V) => {
|
|
2097
2102
|
var P;
|
|
2098
|
-
return
|
|
2103
|
+
return b(), N("div", {
|
|
2099
2104
|
key: V.code,
|
|
2100
2105
|
class: "flex flex-col"
|
|
2101
2106
|
}, [
|
|
2102
|
-
i("div",
|
|
2103
|
-
i("div",
|
|
2104
|
-
i("div",
|
|
2107
|
+
i("div", ss, [
|
|
2108
|
+
i("div", ns, D(V.name), 1),
|
|
2109
|
+
i("div", os, [
|
|
2105
2110
|
i("span", {
|
|
2106
2111
|
innerHTML: q(V)
|
|
2107
2112
|
}, null, 8, as)
|
|
2108
2113
|
])
|
|
2109
2114
|
]),
|
|
2110
|
-
i("div",
|
|
2111
|
-
i("div",
|
|
2112
|
-
(P = V.totalCost) != null && P.amount && S(c).enableTotalCost ? (
|
|
2115
|
+
i("div", is, [
|
|
2116
|
+
i("div", ls, D(V.code), 1),
|
|
2117
|
+
(P = V.totalCost) != null && P.amount && S(c).enableTotalCost ? (b(), N("div", cs, " (" + D(S(De)(V.totalCost)) + ") ", 1)) : U("", !0)
|
|
2113
2118
|
])
|
|
2114
2119
|
]);
|
|
2115
2120
|
}), 128)),
|
|
2116
|
-
+S(
|
|
2117
|
-
i("div",
|
|
2121
|
+
+S(de)(ke.value) ? (b(), N(re, { key: 0 }, [
|
|
2122
|
+
i("div", us, [
|
|
2118
2123
|
I(z)
|
|
2119
2124
|
]),
|
|
2120
|
-
i("div",
|
|
2125
|
+
i("div", ds, [
|
|
2121
2126
|
d[6] || (d[6] = i("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, "Total:", -1)),
|
|
2122
|
-
i("div",
|
|
2127
|
+
i("div", fs, D(S(De)(ke.value)), 1)
|
|
2123
2128
|
])
|
|
2124
2129
|
], 64)) : U("", !0)
|
|
2125
2130
|
])
|
|
2126
2131
|
])
|
|
2127
|
-
], 64)) : j.value.value === "deliveryHistory" ? (
|
|
2128
|
-
|
|
2129
|
-
(
|
|
2130
|
-
i("div",
|
|
2131
|
-
i("div",
|
|
2132
|
-
i("div",
|
|
2132
|
+
], 64)) : j.value.value === "deliveryHistory" ? (b(), N("div", ms, [
|
|
2133
|
+
ce.value.length ? (b(), N("div", bs, [
|
|
2134
|
+
(b(!0), N(re, null, pe(ce.value, (V, P) => (b(), N(re, { key: P }, [
|
|
2135
|
+
i("div", gs, [
|
|
2136
|
+
i("div", _s, [
|
|
2137
|
+
i("div", Ss, [
|
|
2133
2138
|
i("div", {
|
|
2134
2139
|
class: qe([
|
|
2135
2140
|
{
|
|
@@ -2141,57 +2146,57 @@ const jt = { class: "flex flex-row-reverse" }, zt = /* @__PURE__ */ be({
|
|
|
2141
2146
|
}, null, 2)
|
|
2142
2147
|
]),
|
|
2143
2148
|
d[7] || (d[7] = i("div", { class: "h-24 w-24 bg-fm-color-primary rounded-full" }, null, -1)),
|
|
2144
|
-
i("div",
|
|
2149
|
+
i("div", Rs, [
|
|
2145
2150
|
i("div", {
|
|
2146
2151
|
class: qe([
|
|
2147
2152
|
{
|
|
2148
|
-
"bg-fm-color-primary": P <
|
|
2149
|
-
"bg-white": P >=
|
|
2153
|
+
"bg-fm-color-primary": P < ce.value.length - 1,
|
|
2154
|
+
"bg-white": P >= ce.value.length - 1
|
|
2150
2155
|
},
|
|
2151
2156
|
"w-[2px] h-full"
|
|
2152
2157
|
])
|
|
2153
2158
|
}, null, 2)
|
|
2154
2159
|
])
|
|
2155
2160
|
]),
|
|
2156
|
-
i("div",
|
|
2157
|
-
i("div",
|
|
2158
|
-
i("div",
|
|
2161
|
+
i("div", ws, [
|
|
2162
|
+
i("div", Os, D(V.header), 1),
|
|
2163
|
+
i("div", Ns, D(V.date), 1)
|
|
2159
2164
|
])
|
|
2160
2165
|
]),
|
|
2161
|
-
i("div",
|
|
2166
|
+
i("div", ks, [
|
|
2162
2167
|
i("div", xs, [
|
|
2163
|
-
i("div",
|
|
2168
|
+
i("div", Ds, [
|
|
2164
2169
|
i("div", {
|
|
2165
2170
|
class: qe([
|
|
2166
2171
|
{
|
|
2167
|
-
"bg-fm-color-primary": P <
|
|
2168
|
-
"bg-white": P >=
|
|
2172
|
+
"bg-fm-color-primary": P < ce.value.length - 1,
|
|
2173
|
+
"bg-white": P >= ce.value.length - 1
|
|
2169
2174
|
},
|
|
2170
2175
|
"w-[2px] h-full"
|
|
2171
2176
|
])
|
|
2172
2177
|
}, null, 2)
|
|
2173
2178
|
])
|
|
2174
2179
|
]),
|
|
2175
|
-
i("div",
|
|
2180
|
+
i("div", qs, [
|
|
2176
2181
|
I(H, {
|
|
2177
2182
|
variant: "outlined",
|
|
2178
2183
|
class: "py-12 px-16"
|
|
2179
2184
|
}, {
|
|
2180
|
-
default:
|
|
2181
|
-
i("div",
|
|
2182
|
-
(
|
|
2185
|
+
default: oe(() => [
|
|
2186
|
+
i("div", Ts, [
|
|
2187
|
+
(b(!0), N(re, null, pe(V.info, (Y, _e) => (b(), N("div", {
|
|
2183
2188
|
key: _e,
|
|
2184
2189
|
class: "flex flex-col gap-4"
|
|
2185
2190
|
}, [
|
|
2186
|
-
i("div",
|
|
2187
|
-
i("div",
|
|
2188
|
-
(
|
|
2189
|
-
key:
|
|
2191
|
+
i("div", As, D(Y == null ? void 0 : Y.label), 1),
|
|
2192
|
+
i("div", $s, [
|
|
2193
|
+
(b(!0), N(re, null, pe(Y == null ? void 0 : Y.values, (Se, xe) => (b(), N("div", {
|
|
2194
|
+
key: xe,
|
|
2190
2195
|
class: "fm-typo-en-body-lg-600"
|
|
2191
2196
|
}, [
|
|
2192
|
-
typeof Se == "string" ? (
|
|
2197
|
+
typeof Se == "string" ? (b(), N(re, { key: 0 }, [
|
|
2193
2198
|
Le(D(Se), 1)
|
|
2194
|
-
], 64)) : (
|
|
2199
|
+
], 64)) : (b(), ie(Nt(Se), { key: 1 }))
|
|
2195
2200
|
]))), 128))
|
|
2196
2201
|
])
|
|
2197
2202
|
]))), 128))
|
|
@@ -2202,16 +2207,16 @@ const jt = { class: "flex flex-row-reverse" }, zt = /* @__PURE__ */ be({
|
|
|
2202
2207
|
])
|
|
2203
2208
|
])
|
|
2204
2209
|
], 64))), 128))
|
|
2205
|
-
])) : (
|
|
2210
|
+
])) : (b(), N("div", ps, [
|
|
2206
2211
|
I(L),
|
|
2207
2212
|
i("div", null, [
|
|
2208
2213
|
i("img", {
|
|
2209
2214
|
src: S(At),
|
|
2210
2215
|
alt: "List is empty"
|
|
2211
|
-
}, null, 8,
|
|
2216
|
+
}, null, 8, vs)
|
|
2212
2217
|
]),
|
|
2213
|
-
i("div",
|
|
2214
|
-
i("div",
|
|
2218
|
+
i("div", ys, D(S(v)("inventory.transfer.receiveRequest.details.noRecordsFound")), 1),
|
|
2219
|
+
i("div", hs, D(S(v)("inventory.transfer.receiveRequest.details.trackDeliveryMessage")), 1),
|
|
2215
2220
|
I(L),
|
|
2216
2221
|
I(L)
|
|
2217
2222
|
]))
|
|
@@ -2219,43 +2224,43 @@ const jt = { class: "flex flex-row-reverse" }, zt = /* @__PURE__ */ be({
|
|
|
2219
2224
|
])
|
|
2220
2225
|
];
|
|
2221
2226
|
}),
|
|
2222
|
-
"side-sheet-footer":
|
|
2223
|
-
i("div",
|
|
2224
|
-
(
|
|
2225
|
-
S(Ve)[B].available != !1 ? (
|
|
2227
|
+
"side-sheet-footer": oe(() => [
|
|
2228
|
+
i("div", Cs, [
|
|
2229
|
+
(b(!0), N(re, null, pe($.value, (B) => (b(), N(re, null, [
|
|
2230
|
+
S(Ve)[B].available != !1 ? (b(), ie(W, {
|
|
2226
2231
|
key: B,
|
|
2227
2232
|
label: S(v)(S(Ve)[B].translationKey),
|
|
2228
|
-
onClick: (
|
|
2233
|
+
onClick: (ue) => se(B),
|
|
2229
2234
|
loading: a.value === B,
|
|
2230
2235
|
disabled: a.value !== B && l.value,
|
|
2231
2236
|
variant: S(Ve)[B].buttonVariant
|
|
2232
2237
|
}, null, 8, ["label", "onClick", "loading", "disabled", "variant"])) : U("", !0)
|
|
2233
2238
|
], 64))), 256)),
|
|
2234
|
-
S(
|
|
2239
|
+
S(g).ableToMarkReceived(o.purchaseOrder) && !$.value.includes("completeReceive") ? (b(), ie(W, {
|
|
2235
2240
|
key: 0,
|
|
2236
2241
|
label: S(v)("inventory.transfer.receiveRequest.actions.completeReceive"),
|
|
2237
|
-
onClick: d[1] || (d[1] = (B) =>
|
|
2242
|
+
onClick: d[1] || (d[1] = (B) => se("completeReceive")),
|
|
2238
2243
|
loading: a.value === "completeReceive",
|
|
2239
2244
|
disabled: a.value !== "completeReceive" && l.value
|
|
2240
2245
|
}, null, 8, ["label", "loading", "disabled"])) : U("", !0),
|
|
2241
|
-
S(
|
|
2246
|
+
S(g).ableToMarkApproved(o.purchaseOrder) && o.canApprove && !$.value.includes("approveRequest") ? (b(), ie(W, {
|
|
2242
2247
|
key: 1,
|
|
2243
2248
|
label: S(v)("inventory.transfer.approval.actions.approveRequest"),
|
|
2244
|
-
onClick: d[2] || (d[2] = (B) =>
|
|
2249
|
+
onClick: d[2] || (d[2] = (B) => se("approveRequest")),
|
|
2245
2250
|
loading: a.value === "approveRequest",
|
|
2246
2251
|
disabled: a.value !== "approveRequest" && l.value
|
|
2247
2252
|
}, null, 8, ["label", "loading", "disabled"])) : U("", !0),
|
|
2248
|
-
S(
|
|
2253
|
+
S(g).ableToCreateFulfillment(o.purchaseOrder, o.poRequest) && s.scope === "approval" ? (b(), ie(W, {
|
|
2249
2254
|
key: 2,
|
|
2250
2255
|
label: S(v)("inventory.transfer.receiveRequest.actions.processRequest"),
|
|
2251
|
-
onClick: d[3] || (d[3] = (B) =>
|
|
2256
|
+
onClick: d[3] || (d[3] = (B) => se("processRequest")),
|
|
2252
2257
|
loading: a.value === "processRequest",
|
|
2253
2258
|
disabled: a.value !== "processRequest" && l.value
|
|
2254
2259
|
}, null, 8, ["label", "loading", "disabled"])) : U("", !0),
|
|
2255
2260
|
I(W, {
|
|
2256
2261
|
label: S(v)("common.close"),
|
|
2257
2262
|
variant: "tertiary",
|
|
2258
|
-
onClick: d[4] || (d[4] = (B) =>
|
|
2263
|
+
onClick: d[4] || (d[4] = (B) => h("update:show", !1))
|
|
2259
2264
|
}, null, 8, ["label"])
|
|
2260
2265
|
])
|
|
2261
2266
|
]),
|
|
@@ -2266,10 +2271,10 @@ const jt = { class: "flex flex-row-reverse" }, zt = /* @__PURE__ */ be({
|
|
|
2266
2271
|
});
|
|
2267
2272
|
export {
|
|
2268
2273
|
ye as F,
|
|
2269
|
-
|
|
2270
|
-
|
|
2271
|
-
|
|
2272
|
-
|
|
2273
|
-
|
|
2274
|
+
Ue as P,
|
|
2275
|
+
Hs as _,
|
|
2276
|
+
js as a,
|
|
2277
|
+
zs as b,
|
|
2278
|
+
Lt as g,
|
|
2274
2279
|
Ie as u
|
|
2275
2280
|
};
|