@feedmepos/mf-inventory-portal 1.2.2-dev.4 → 1.2.2-dev.6
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-CYAziwBh.js → App-qyUn0mRE.js} +1 -1
- package/dist/{ApprovalView-DsxL6mbY.js → ApprovalView-DPoN8AbA.js} +2 -2
- package/dist/{BindingsDialog-DvE7diTd.js → BindingsDialog-DDimQEPK.js} +2 -2
- package/dist/{BindingsPicker-CiFmbDb4.js → BindingsPicker-DY62RSio.js} +1 -1
- package/dist/{BindingsTable-S3515rT6.js → BindingsTable-BVWi4ZvC.js} +1 -1
- package/dist/{ClosingDraftView-DCa1lBma.js → ClosingDraftView-BIlnp-Y4.js} +2 -2
- package/dist/{ClosingTemplateView-De6ytlNF.js → ClosingTemplateView-DspryiHM.js} +2 -2
- package/dist/{DeliveryOrderPrintPreview-BgLQ8zFm.js → DeliveryOrderPrintPreview-PSj2gBtt.js} +1 -1
- package/dist/{FmAdminBadge-B_FtrsaE.js → FmAdminBadge-C0z5yxLa.js} +1 -1
- package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-BHE0_auv.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-BbzsN6mh.js} +3 -3
- package/dist/{FmMultiselectDialog-DNpypK50.js → FmMultiselectDialog-BeyGae_v.js} +1 -1
- package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-CRa9HeIc.js → FmUnitInput.vue_vue_type_script_setup_true_lang-CJV5nuMH.js} +1 -1
- package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-BIY5Dw3A.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-CqJQSMt2.js} +1 -1
- package/dist/{IngredientGroupView-DRwWwMuX.js → IngredientGroupView-BVnUhnhF.js} +2 -2
- package/dist/{IngredientsView-CxsqnkX8.js → IngredientsView-CJvj3bGt.js} +4 -4
- package/dist/{IntegrationView-lu-pVT_g.js → IntegrationView-B4OOBLkd.js} +4 -4
- package/dist/{InventoryBindingForm-BHbqAFg0.js → InventoryBindingForm-BEMURvt6.js} +1 -1
- package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-BQGuKBPh.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-DL57fbvY.js} +3 -3
- package/dist/{InventoryBindingSummary-DaScUKeL.js → InventoryBindingSummary-CADbmPyM.js} +1 -1
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-D5QuOadM.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-CErfZxec.js} +1 -1
- package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-Dt5fgiIP.js → PremiumBadge.vue_vue_type_script_setup_true_lang-t23rVe6O.js} +1 -1
- package/dist/{PublishView-Da_NkemP.js → PublishView-CNlHsBwV.js} +69 -59
- package/dist/{PurchaseOrderPrintPreview-C6KUvxFc.js → PurchaseOrderPrintPreview-CpiIQwpd.js} +1 -1
- package/dist/{ReceiveRequestView-BHELdzXO.js → ReceiveRequestView-BFT5j4UZ.js} +8 -8
- package/dist/{RecipeView-KcEC3x3u.js → RecipeView-cNjsGI0a.js} +3 -3
- package/dist/{StockView-BrLaoCsb.js → StockView-BYudPVXI.js} +7 -7
- package/dist/{SupplierView-BrLHXWoG.js → SupplierView-B1tRY9GT.js} +3 -3
- package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-BQrrKw5p.js → TransferDetails.vue_vue_type_script_setup_true_lang-LLfayE3o.js} +359 -359
- package/dist/{TransferTemplateView-CNnS1dah.js → TransferTemplateView-BiywyIoS.js} +6 -6
- package/dist/{UnitView-BYWgA8Ga.js → UnitView-CpALGLE8.js} +3 -3
- package/dist/{WarehouseView-Dq2Rh_bi.js → WarehouseView-CLyQPu4y.js} +1 -1
- package/dist/api/inventory.d.ts +91 -0
- package/dist/{app-DZYj4yvr.js → app-lX8u0OMu.js} +5539 -5483
- package/dist/app.js +1 -1
- package/dist/{decimal-B3y9B5MD.js → decimal-Bzl57oeS.js} +1 -1
- package/dist/{format-unit-display-CaFsKH-j.js → format-unit-display-DRT-O8GV.js} +2 -2
- package/dist/helper/array.d.ts +1 -0
- package/dist/{index-Gjc_1VwO.js → index-C1J-07ED.js} +1 -1
- package/dist/{index-Cd_Evsjr.js → index-D_-xtoPB.js} +1 -1
- package/dist/{stock-d6SN3d25.js → stock-9j1EIEfL.js} +1 -1
- package/dist/stores/location.d.ts +274 -0
- package/dist/{supplier-Yw3bxYS3.js → supplier-CW2VKsbv.js} +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{use-ingredient-select-dialog-Cisa2X4a.js → use-ingredient-select-dialog-BhAsjfUN.js} +1 -1
- package/dist/{use-inventory-binding-dialog-CnE4YFiQ.js → use-inventory-binding-dialog-MRZtLjcQ.js} +1 -1
- package/package.json +1 -1
|
@@ -1,70 +1,70 @@
|
|
|
1
|
-
import { a3 as gt, u as ge, aS as k, aT as Be, aA as W, c as Ve, b as Ue, ab as _t, ad as St, ae as wt, aU as Rt, e as nt, f as ct, a0 as Je, aV as xt, a8 as ut, T as dt, j as be, a6 as Ot, aW as mt, ai as Le, h as at, i as oe, D as ce, aX as ft, aY as pt, aZ as Ae, a_ as ze, ay as it, a$ as Se, Q as De, aa as Fe, a4 as Ge, a5 as Nt } from "./app-
|
|
2
|
-
import { ref as z, computed as re, h as C, defineComponent as Re, reactive as $t, onMounted as yt, resolveComponent as Z, openBlock as
|
|
3
|
-
import { F as Dt } from "./decimal-
|
|
1
|
+
import { a3 as gt, u as ge, aS as k, aT as Be, aA as W, c as Ve, b as Ue, ab as _t, ad as St, ae as wt, aU as Rt, e as nt, f as ct, a0 as Je, aV as xt, a8 as ut, T as dt, j as be, a6 as Ot, aW as mt, ai as Le, h as at, i as oe, D as ce, aX as ft, aY as pt, aZ as Ae, a_ as ze, ay as it, a$ as Se, Q as De, aa as Fe, a4 as Ge, a5 as Nt } from "./app-lX8u0OMu.js";
|
|
2
|
+
import { ref as z, computed as re, h as C, defineComponent as Re, reactive as $t, onMounted as yt, resolveComponent as Z, openBlock as v, createBlock as ue, withCtx as se, createElementVNode as e, createVNode as F, unref as w, createElementBlock as x, toDisplayString as R, createCommentVNode as H, Fragment as ae, renderList as he, createTextVNode as Ne, normalizeClass as Te, watch as kt, isRef as Ct, resolveDynamicComponent as At } from "vue";
|
|
3
|
+
import { F as Dt } from "./decimal-Bzl57oeS.js";
|
|
4
4
|
import { useCoreStore as Me, useI18n as vt } from "@feedmepos/mf-common";
|
|
5
5
|
import { useDialog as et, useSnackbar as Ke, components as Ye, FmButtonVariant as le, useProxiedModel as qt } from "@feedmepos/ui-library";
|
|
6
|
-
import { F as $e } from "./FmAdminBadge-
|
|
7
|
-
import { b as Tt, u as Pt, P as we, f as It } from "./format-unit-display-
|
|
6
|
+
import { F as $e } from "./FmAdminBadge-C0z5yxLa.js";
|
|
7
|
+
import { b as Tt, u as Pt, P as we, f as It } from "./format-unit-display-DRT-O8GV.js";
|
|
8
8
|
import { E as Ft } from "./empty-placeholder-wf6-BWE8.js";
|
|
9
|
-
import { _ as Lt, F as Et, a as Bt } from "./FmUnitInput.vue_vue_type_script_setup_true_lang-
|
|
9
|
+
import { _ as Lt, F as Et, a as Bt } from "./FmUnitInput.vue_vue_type_script_setup_true_lang-CJV5nuMH.js";
|
|
10
10
|
import { u as Vt, R as lt } from "./usePromise-CbVUCxhj.js";
|
|
11
|
-
import { u as Ut } from "./index-
|
|
12
|
-
const je = gt((
|
|
11
|
+
import { u as Ut } from "./index-C1J-07ED.js";
|
|
12
|
+
const je = gt((b, t) => {
|
|
13
13
|
const s = ge(), _ = Me();
|
|
14
14
|
return {
|
|
15
15
|
async readRequests(i, r, d) {
|
|
16
|
-
const
|
|
16
|
+
const a = i ?? s.currentLocationDBName, o = `${b.inventoryBackendUrl}/${a}/purchase-request`;
|
|
17
17
|
return r && d ? await t.get(`${o}?startDate=${r}&endDate=${d}`) : await t.get(o);
|
|
18
18
|
},
|
|
19
19
|
async readRequestById(i, r) {
|
|
20
|
-
const d = r ?? s.currentLocationDBName,
|
|
21
|
-
return await t.get(
|
|
20
|
+
const d = r ?? s.currentLocationDBName, a = `${b.inventoryBackendUrl}/${d}/purchase-request/${i}`;
|
|
21
|
+
return await t.get(a);
|
|
22
22
|
},
|
|
23
23
|
async readRequestByIds(i, r) {
|
|
24
|
-
const d = r ?? s.currentLocationDBName,
|
|
25
|
-
return await t.post(
|
|
24
|
+
const d = r ?? s.currentLocationDBName, a = `${b.inventoryBackendUrl}/${d}/purchase-request/find`;
|
|
25
|
+
return await t.post(a, { requestIds: i });
|
|
26
26
|
},
|
|
27
27
|
async getPurchaseOrders({
|
|
28
28
|
start: i,
|
|
29
29
|
end: r
|
|
30
30
|
}) {
|
|
31
|
-
const d = s.currentLocationDBName,
|
|
32
|
-
return await t.get(`${
|
|
31
|
+
const d = s.currentLocationDBName, a = `${b.inventoryBackendUrl}/${d}/purchase-order`;
|
|
32
|
+
return await t.get(`${a}?start=${i}&end=${r}`);
|
|
33
33
|
},
|
|
34
34
|
async getLatestPurchaseOrderRequest(i) {
|
|
35
|
-
const r = s.currentLocationDBName, d = `${
|
|
35
|
+
const r = s.currentLocationDBName, d = `${b.inventoryBackendUrl}/${r}/purchase-request/find-by-purchase-order-id`;
|
|
36
36
|
return await t.get(`${d}/${i}`);
|
|
37
37
|
},
|
|
38
38
|
async getPurchaseOrderById(i) {
|
|
39
|
-
const r = s.currentLocationDBName, d = `${
|
|
39
|
+
const r = s.currentLocationDBName, d = `${b.inventoryBackendUrl}/${r}/purchase-order`;
|
|
40
40
|
return await t.get(`${d}/${i}`);
|
|
41
41
|
},
|
|
42
42
|
/**
|
|
43
43
|
* @deprecated Use `processPurchaseOrderV2` instead.
|
|
44
44
|
*/
|
|
45
45
|
async processPurchaseOrder(i, r) {
|
|
46
|
-
const d = s.currentLocationDBName,
|
|
46
|
+
const d = s.currentLocationDBName, a = r || d, o = `${b.inventoryBackendUrl}/${a}/purchase-order/run-operation`;
|
|
47
47
|
return await t.put(o, i);
|
|
48
48
|
},
|
|
49
49
|
async createPurchaseOrder(i) {
|
|
50
|
-
const r = s.currentLocationDBName, d = `${
|
|
50
|
+
const r = s.currentLocationDBName, d = `${b.inventoryBackendUrl}/${r}/purchase-order`;
|
|
51
51
|
return await t.post(d, i);
|
|
52
52
|
},
|
|
53
53
|
async updatePurchaseOrder(i) {
|
|
54
|
-
const r = s.currentLocationDBName, d = `${
|
|
54
|
+
const r = s.currentLocationDBName, d = `${b.inventoryBackendUrl}/${r}/purchase-order`;
|
|
55
55
|
return await t.put(d, i);
|
|
56
56
|
},
|
|
57
57
|
async importFromXilnex(i) {
|
|
58
|
-
const r = s.currentLocationDBName, d = `${
|
|
58
|
+
const r = s.currentLocationDBName, d = `${b.inventoryBackendUrl}/${r}/purchase-order/import-from-xilnex`;
|
|
59
59
|
return await t.post(d, i);
|
|
60
60
|
},
|
|
61
61
|
async processPurchaseOrderV2(i, r) {
|
|
62
|
-
const d = s.currentLocationDBName,
|
|
62
|
+
const d = s.currentLocationDBName, a = r || d, o = `${b.inventoryBackendUrl}/${a}/v2/purchase-order/run-operation`;
|
|
63
63
|
return await t.put(o, i);
|
|
64
64
|
},
|
|
65
65
|
async getWorkflowConfig() {
|
|
66
|
-
var
|
|
67
|
-
const r = `business_${(
|
|
66
|
+
var a;
|
|
67
|
+
const r = `business_${(a = _.currentBusiness.value) == null ? void 0 : a._id}`, d = `${b.inventoryBackendUrl}/${r}/v2/purchase-order/workflow-config`;
|
|
68
68
|
return await t.get(d);
|
|
69
69
|
}
|
|
70
70
|
};
|
|
@@ -136,25 +136,25 @@ const je = gt((h, t) => {
|
|
|
136
136
|
successMessage: "Purchase order has been processed"
|
|
137
137
|
}
|
|
138
138
|
};
|
|
139
|
-
function Ee(
|
|
139
|
+
function Ee(b) {
|
|
140
140
|
return Be.generatedPOReceivedMap({
|
|
141
|
-
purchaseOrder:
|
|
141
|
+
purchaseOrder: b
|
|
142
142
|
});
|
|
143
143
|
}
|
|
144
|
-
function Mt(
|
|
144
|
+
function Mt(b) {
|
|
145
145
|
return Be.validatePOItemReceivedStatus({
|
|
146
|
-
dto:
|
|
146
|
+
dto: b
|
|
147
147
|
});
|
|
148
148
|
}
|
|
149
|
-
function Qe(
|
|
149
|
+
function Qe(b) {
|
|
150
150
|
return Be.validatePOReceivedStatus({
|
|
151
|
-
receivedMap:
|
|
151
|
+
receivedMap: b
|
|
152
152
|
});
|
|
153
153
|
}
|
|
154
|
-
function Xe(
|
|
155
|
-
if (!W.safeParse(
|
|
156
|
-
throw new Error(`Invalid purchase order status: ${
|
|
157
|
-
const _ = W.parse(
|
|
154
|
+
function Xe(b, t, s) {
|
|
155
|
+
if (!W.safeParse(b).success)
|
|
156
|
+
throw new Error(`Invalid purchase order status: ${b}`);
|
|
157
|
+
const _ = W.parse(b);
|
|
158
158
|
return Be.orderStatusCombination({
|
|
159
159
|
status: _,
|
|
160
160
|
isPOPartialReceive: t,
|
|
@@ -162,26 +162,26 @@ function Xe(h, t, s) {
|
|
|
162
162
|
});
|
|
163
163
|
}
|
|
164
164
|
function bt() {
|
|
165
|
-
const
|
|
165
|
+
const b = ge(), t = je(), s = Ve();
|
|
166
166
|
async function _(r, d) {
|
|
167
|
-
const
|
|
168
|
-
return r.doc.supplier.internal && r.operation === k.enum.confirmDraft && (r.operation = k.enum.submitRequest), await t.processPurchaseOrder(r, d ||
|
|
167
|
+
const a = b.currentLocationDBName;
|
|
168
|
+
return r.doc.supplier.internal && r.operation === k.enum.confirmDraft && (r.operation = k.enum.submitRequest), await t.processPurchaseOrder(r, d || a);
|
|
169
169
|
}
|
|
170
170
|
async function i(r, d) {
|
|
171
|
-
const
|
|
172
|
-
return await t.processPurchaseOrderV2(r, d ||
|
|
171
|
+
const a = b.currentLocationDBName;
|
|
172
|
+
return await t.processPurchaseOrderV2(r, d || a);
|
|
173
173
|
}
|
|
174
174
|
return (r) => s.useOperatePurchaseOrderV2 ? i(r.operateV2, r.transferTo) : _(r.operate, r.transferTo);
|
|
175
175
|
}
|
|
176
|
-
var Ze = /* @__PURE__ */ ((
|
|
176
|
+
var Ze = /* @__PURE__ */ ((b) => (b.RECEIVE_REQUEST = "receive/request", b.APPROVAL = "approval", b))(Ze || {});
|
|
177
177
|
const qe = z(), He = z();
|
|
178
|
-
function po(
|
|
178
|
+
function po(b, t) {
|
|
179
179
|
const s = et(), _ = ge(), i = Ve();
|
|
180
180
|
Ue();
|
|
181
|
-
const r = Tt(), d = Pt(),
|
|
181
|
+
const r = Tt(), d = Pt(), a = z(!1), o = Ke(), h = je(), S = z(new Array()), y = z(
|
|
182
182
|
t != null && t.startDate && (t != null && t.endDate) ? t : _t()
|
|
183
|
-
),
|
|
184
|
-
const D = new Date(
|
|
183
|
+
), g = re(() => {
|
|
184
|
+
const D = new Date(y.value.startDate), I = new Date(y.value.endDate);
|
|
185
185
|
return {
|
|
186
186
|
start: St(D).toISOString(),
|
|
187
187
|
end: wt(I).toISOString()
|
|
@@ -233,16 +233,16 @@ function po(h, t) {
|
|
|
233
233
|
qe.value = I;
|
|
234
234
|
}
|
|
235
235
|
async function q() {
|
|
236
|
-
|
|
236
|
+
S.value = [], a.value = !0;
|
|
237
237
|
try {
|
|
238
|
-
|
|
238
|
+
S.value = await h.getPurchaseOrders(g.value).then((G) => G.sort((ne, J) => J._id.localeCompare(ne._id)));
|
|
239
239
|
const D = await l.readCurrentLocationLastClosing(!0), I = D == null ? void 0 : D._id;
|
|
240
240
|
I && (c.value = xt(I)), await i.awaitFeatureLoaded(() => i.mustUsePoTemplate) && await d.fetchTemplates();
|
|
241
|
-
const te =
|
|
241
|
+
const te = S.value.map((G) => {
|
|
242
242
|
var ne;
|
|
243
243
|
return ((ne = G.request) == null ? void 0 : ne.id) ?? "";
|
|
244
244
|
}).filter((G) => G);
|
|
245
|
-
p.value = await
|
|
245
|
+
p.value = await h.readRequestByIds(te);
|
|
246
246
|
} catch {
|
|
247
247
|
o.open({
|
|
248
248
|
title: "Something went wrong",
|
|
@@ -250,16 +250,16 @@ function po(h, t) {
|
|
|
250
250
|
type: "error"
|
|
251
251
|
});
|
|
252
252
|
} finally {
|
|
253
|
-
|
|
253
|
+
a.value = !1;
|
|
254
254
|
}
|
|
255
255
|
}
|
|
256
256
|
async function T() {
|
|
257
|
-
p.value = [],
|
|
257
|
+
p.value = [], a.value = !0;
|
|
258
258
|
try {
|
|
259
|
-
p.value = await
|
|
259
|
+
p.value = await h.readRequests(
|
|
260
260
|
void 0,
|
|
261
|
-
|
|
262
|
-
|
|
261
|
+
g.value.start,
|
|
262
|
+
g.value.end
|
|
263
263
|
).then((D) => D.reverse());
|
|
264
264
|
} catch {
|
|
265
265
|
o.open({
|
|
@@ -268,11 +268,11 @@ function po(h, t) {
|
|
|
268
268
|
type: "error"
|
|
269
269
|
});
|
|
270
270
|
} finally {
|
|
271
|
-
|
|
271
|
+
a.value = !1;
|
|
272
272
|
}
|
|
273
273
|
}
|
|
274
274
|
function P() {
|
|
275
|
-
switch (
|
|
275
|
+
switch (b) {
|
|
276
276
|
case "receive/request":
|
|
277
277
|
return q();
|
|
278
278
|
case "approval":
|
|
@@ -280,14 +280,14 @@ function po(h, t) {
|
|
|
280
280
|
}
|
|
281
281
|
}
|
|
282
282
|
function $(D, I) {
|
|
283
|
-
|
|
283
|
+
y.value = {
|
|
284
284
|
startDate: D,
|
|
285
285
|
endDate: I
|
|
286
286
|
}, P();
|
|
287
287
|
}
|
|
288
288
|
_.watchLocation(async (D) => {
|
|
289
289
|
if (!D) {
|
|
290
|
-
|
|
290
|
+
S.value = [];
|
|
291
291
|
return;
|
|
292
292
|
}
|
|
293
293
|
await P();
|
|
@@ -298,25 +298,25 @@ function po(h, t) {
|
|
|
298
298
|
pe.value = te, I ?? (I = p.value.computeFirst(
|
|
299
299
|
(J) => J.purchaseOrderId === D._id ? J : null
|
|
300
300
|
) ?? void 0);
|
|
301
|
-
const G =
|
|
301
|
+
const G = b === "receive/request" ? _.currentLocation : I == null ? void 0 : I.to, ne = {
|
|
302
302
|
poRequest: I,
|
|
303
303
|
purchaseOrder: D,
|
|
304
304
|
transferTo: G == null ? void 0 : G.name,
|
|
305
305
|
transferToDbName: G == null ? void 0 : G.dbName,
|
|
306
306
|
show: !0,
|
|
307
307
|
canResubmit: !1,
|
|
308
|
-
canApprove:
|
|
308
|
+
canApprove: b === "approval",
|
|
309
309
|
"onUpdate:show"(J) {
|
|
310
310
|
U.value.show = J;
|
|
311
311
|
},
|
|
312
|
-
scope:
|
|
312
|
+
scope: b,
|
|
313
313
|
receivedMap: Ee(D) ?? {}
|
|
314
314
|
};
|
|
315
315
|
U.value = ne;
|
|
316
316
|
}
|
|
317
317
|
async function xe(D, I, te, G) {
|
|
318
318
|
const ne = bt();
|
|
319
|
-
|
|
319
|
+
a.value = !0;
|
|
320
320
|
try {
|
|
321
321
|
await ne({
|
|
322
322
|
operate: {
|
|
@@ -338,8 +338,8 @@ function po(h, t) {
|
|
|
338
338
|
},
|
|
339
339
|
transferTo: G
|
|
340
340
|
}), await new Promise((m) => setTimeout(m, 1e3));
|
|
341
|
-
const
|
|
342
|
-
I === k.enum.confirmDraft && D.effectiveAt &&
|
|
341
|
+
const n = ge().currentLocationDBName.startsWith("restaurant_");
|
|
342
|
+
I === k.enum.confirmDraft && D.effectiveAt && n ? o.open({
|
|
343
343
|
title: "Success",
|
|
344
344
|
message: `${te}. The backdate will be reflected once your POS has received this change.`,
|
|
345
345
|
type: "success"
|
|
@@ -355,7 +355,7 @@ function po(h, t) {
|
|
|
355
355
|
type: "error"
|
|
356
356
|
}), console.error("Error when submitting PO operation", I, D, J);
|
|
357
357
|
} finally {
|
|
358
|
-
|
|
358
|
+
a.value = !1, P();
|
|
359
359
|
}
|
|
360
360
|
}
|
|
361
361
|
async function Pe(D, I, te) {
|
|
@@ -399,11 +399,11 @@ function po(h, t) {
|
|
|
399
399
|
});
|
|
400
400
|
}
|
|
401
401
|
return {
|
|
402
|
-
purchaseOrders:
|
|
402
|
+
purchaseOrders: S,
|
|
403
403
|
purchaseRequests: p,
|
|
404
404
|
updateDateRange: $,
|
|
405
405
|
fetchData: P,
|
|
406
|
-
loading:
|
|
406
|
+
loading: a,
|
|
407
407
|
transferDialogProps: qe,
|
|
408
408
|
promptCreateTransferDialog: u,
|
|
409
409
|
promptUpdateTransferDialog: O,
|
|
@@ -414,26 +414,26 @@ function po(h, t) {
|
|
|
414
414
|
promptUploadTransferDialog: ye
|
|
415
415
|
};
|
|
416
416
|
}
|
|
417
|
-
function Kt(
|
|
417
|
+
function Kt(b, t) {
|
|
418
418
|
return t.reduce(
|
|
419
419
|
(_, i) => {
|
|
420
|
-
const r = i.received.find((d) => d.sku._id ===
|
|
420
|
+
const r = i.received.find((d) => d.sku._id === b._id);
|
|
421
421
|
return r && (_ = ut(_, r.amount)), _;
|
|
422
422
|
},
|
|
423
|
-
Dt.toPrecision(dt(0),
|
|
423
|
+
Dt.toPrecision(dt(0), b.unit.precision)
|
|
424
424
|
);
|
|
425
425
|
}
|
|
426
|
-
function jt(
|
|
427
|
-
const { po: t, currentLocation: s, business: _, fulfilling: i, por: r } =
|
|
426
|
+
function jt(b) {
|
|
427
|
+
const { po: t, currentLocation: s, business: _, fulfilling: i, por: r } = b, { name: d, address: a, regNo: o } = s.doc.profile, h = {
|
|
428
428
|
name: d,
|
|
429
429
|
registrationNumber: o,
|
|
430
|
-
line1:
|
|
431
|
-
line2:
|
|
432
|
-
postcode:
|
|
433
|
-
city:
|
|
434
|
-
state:
|
|
435
|
-
country:
|
|
436
|
-
},
|
|
430
|
+
line1: a == null ? void 0 : a.line1,
|
|
431
|
+
line2: a == null ? void 0 : a.line2,
|
|
432
|
+
postcode: a == null ? void 0 : a.postcode,
|
|
433
|
+
city: a == null ? void 0 : a.city,
|
|
434
|
+
state: a == null ? void 0 : a.state,
|
|
435
|
+
country: a == null ? void 0 : a.country
|
|
436
|
+
}, S = {
|
|
437
437
|
name: t.supplier.name,
|
|
438
438
|
phoneNumber: t.supplier.phoneNumber,
|
|
439
439
|
registrationNumber: t.supplier.registrationNumber,
|
|
@@ -443,7 +443,7 @@ function jt(h) {
|
|
|
443
443
|
city: t.supplier.address.city,
|
|
444
444
|
state: t.supplier.address.state,
|
|
445
445
|
country: t.supplier.address.country
|
|
446
|
-
},
|
|
446
|
+
}, y = t.items.map((T) => {
|
|
447
447
|
const { sku: P, measurement: $ } = T, U = be(
|
|
448
448
|
Kt(T.sku, t.deliveryOrder || []),
|
|
449
449
|
!1
|
|
@@ -458,7 +458,7 @@ function jt(h) {
|
|
|
458
458
|
value: T.totalCost
|
|
459
459
|
})}` : void 0
|
|
460
460
|
};
|
|
461
|
-
}),
|
|
461
|
+
}), g = t.deliveryOrder.map((T) => ({
|
|
462
462
|
createdAt: mt(new Date(T.createdAt)),
|
|
463
463
|
ref: T.deliveryOrderNumber,
|
|
464
464
|
remark: T.remark || "",
|
|
@@ -490,11 +490,11 @@ function jt(h) {
|
|
|
490
490
|
createdAt: Le(t._id),
|
|
491
491
|
ref: t.ref || "",
|
|
492
492
|
remark: t.remark || "",
|
|
493
|
-
buyer:
|
|
494
|
-
supplier:
|
|
495
|
-
items:
|
|
493
|
+
buyer: h,
|
|
494
|
+
supplier: S,
|
|
495
|
+
items: y,
|
|
496
496
|
status: t.status,
|
|
497
|
-
deliveryOrders:
|
|
497
|
+
deliveryOrders: g
|
|
498
498
|
}, O = new URL(window.location.href), q = i && (t.deliveryFullfillment || []).length > 0 ? "receive-request/delivery-print-preview" : "receive-request/print-preview";
|
|
499
499
|
O.pathname = O.hostname.includes("portal.feedme") ? `/inventory/${q}` : `/${q}`, O.searchParams.append("data", JSON.stringify(u)), window.open(O.href, "_blank", "noreferrer");
|
|
500
500
|
}
|
|
@@ -560,15 +560,15 @@ const Oe = {
|
|
|
560
560
|
value: k.enum.returnStock
|
|
561
561
|
}
|
|
562
562
|
};
|
|
563
|
-
function yo(
|
|
563
|
+
function yo(b, t) {
|
|
564
564
|
const s = ge(), _ = Ue(), i = Me(), { t: r } = vt();
|
|
565
|
-
function d(
|
|
566
|
-
switch (
|
|
565
|
+
function d(g) {
|
|
566
|
+
switch (g.status) {
|
|
567
567
|
case "DRAFT":
|
|
568
568
|
return [
|
|
569
569
|
ce[oe.Update],
|
|
570
570
|
ce[oe.Details],
|
|
571
|
-
|
|
571
|
+
g.supplier.internal === "restaurant" || g.supplier.internal === "warehouse" ? Oe[k.enum.submitRequest] : Oe[k.enum.confirmDraft],
|
|
572
572
|
Oe[k.enum.cancelDraft]
|
|
573
573
|
];
|
|
574
574
|
case "RECEIVING":
|
|
@@ -578,7 +578,7 @@ function yo(h, t) {
|
|
|
578
578
|
ce[oe.Print]
|
|
579
579
|
];
|
|
580
580
|
case "REQUESTING":
|
|
581
|
-
return
|
|
581
|
+
return b === "receive/request" ? [ce[oe.Details], ce[oe.Print]] : [
|
|
582
582
|
Oe[k.enum.approveRequest],
|
|
583
583
|
Oe[k.enum.rejectRequest],
|
|
584
584
|
ce[oe.Details]
|
|
@@ -592,39 +592,39 @@ function yo(h, t) {
|
|
|
592
592
|
return [ce[oe.Details], ce[oe.Print]];
|
|
593
593
|
}
|
|
594
594
|
}
|
|
595
|
-
function
|
|
596
|
-
return Object.values(k.enum).includes(
|
|
595
|
+
function a(g) {
|
|
596
|
+
return Object.values(k.enum).includes(g);
|
|
597
597
|
}
|
|
598
|
-
async function o(
|
|
598
|
+
async function o(g, p, l) {
|
|
599
599
|
var u, O, q, T, P, $;
|
|
600
600
|
const c = ct(p);
|
|
601
|
-
if (
|
|
601
|
+
if (g === oe.Print) {
|
|
602
602
|
const U = (l == null ? void 0 : l.toInventoryLocation) ?? s.currentLocation;
|
|
603
603
|
((u = l == null ? void 0 : l.netSuite) != null && u.refNo || (O = c.netSuite) != null && O.refNo) && (c.ref = [((q = l == null ? void 0 : l.netSuite) == null ? void 0 : q.refNo) || ((T = c.netSuite) == null ? void 0 : T.refNo)].filter((pe) => pe).join(" ")), jt({
|
|
604
604
|
po: c,
|
|
605
605
|
currentLocation: U,
|
|
606
606
|
business: i.currentBusiness.value,
|
|
607
|
-
fulfilling:
|
|
607
|
+
fulfilling: b === "approval",
|
|
608
608
|
por: l
|
|
609
609
|
});
|
|
610
610
|
return;
|
|
611
611
|
}
|
|
612
|
-
if (
|
|
612
|
+
if (g === oe.Details) {
|
|
613
613
|
t.promptShowTransferDetails(c, l);
|
|
614
614
|
return;
|
|
615
615
|
}
|
|
616
|
-
if (
|
|
616
|
+
if (g === oe.Update) {
|
|
617
617
|
(P = t.promptUpdateTransferDialog) == null || P.call(t, c);
|
|
618
618
|
return;
|
|
619
619
|
}
|
|
620
|
-
if (
|
|
621
|
-
t.submitAction(p,
|
|
620
|
+
if (a(g)) {
|
|
621
|
+
t.submitAction(p, g, ($ = l == null ? void 0 : l.to) == null ? void 0 : $.dbName);
|
|
622
622
|
return;
|
|
623
623
|
}
|
|
624
624
|
}
|
|
625
|
-
function
|
|
625
|
+
function h() {
|
|
626
626
|
var p;
|
|
627
|
-
const
|
|
627
|
+
const g = [
|
|
628
628
|
{
|
|
629
629
|
accessorKey: "seqNumber",
|
|
630
630
|
header: () => r("inventory.transfer.table.seqNo"),
|
|
@@ -772,13 +772,13 @@ function yo(h, t) {
|
|
|
772
772
|
}
|
|
773
773
|
}
|
|
774
774
|
];
|
|
775
|
-
|
|
775
|
+
g.splice(g.length - 1, 0, ...l);
|
|
776
776
|
}
|
|
777
|
-
return
|
|
777
|
+
return g;
|
|
778
778
|
}
|
|
779
|
-
function
|
|
779
|
+
function S() {
|
|
780
780
|
var p;
|
|
781
|
-
const
|
|
781
|
+
const g = [
|
|
782
782
|
{
|
|
783
783
|
accessorKey: "purchaseOrder.seqNumber",
|
|
784
784
|
header: () => r("inventory.transfer.table.seqNo"),
|
|
@@ -914,12 +914,12 @@ function yo(h, t) {
|
|
|
914
914
|
}
|
|
915
915
|
}
|
|
916
916
|
];
|
|
917
|
-
|
|
917
|
+
g.splice(g.length - 2, 0, ...l);
|
|
918
918
|
}
|
|
919
|
-
return
|
|
919
|
+
return g;
|
|
920
920
|
}
|
|
921
921
|
return {
|
|
922
|
-
columnDefs: re(() =>
|
|
922
|
+
columnDefs: re(() => b === "receive/request" ? h() : S())
|
|
923
923
|
};
|
|
924
924
|
}
|
|
925
925
|
const zt = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg p-16" }, Gt = { class: "flex flex-col gap-8" }, Ht = { class: "flex w-full justify-end gap-16" }, Wt = /* @__PURE__ */ Re({
|
|
@@ -929,24 +929,24 @@ const zt = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
929
929
|
confirm: { type: Function }
|
|
930
930
|
},
|
|
931
931
|
emits: ["update:show"],
|
|
932
|
-
setup(
|
|
933
|
-
const s =
|
|
932
|
+
setup(b, { emit: t }) {
|
|
933
|
+
const s = b, _ = $t({
|
|
934
934
|
id: "",
|
|
935
935
|
createdAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
936
936
|
items: []
|
|
937
937
|
}), i = z(), r = t;
|
|
938
938
|
yt(() => {
|
|
939
|
-
s.purchaseOrder && (_.items = s.purchaseOrder.items.map((
|
|
940
|
-
id:
|
|
941
|
-
sku:
|
|
942
|
-
measurement:
|
|
943
|
-
amount:
|
|
939
|
+
s.purchaseOrder && (_.items = s.purchaseOrder.items.map((a) => ({
|
|
940
|
+
id: a.id,
|
|
941
|
+
sku: a.sku,
|
|
942
|
+
measurement: a.measurement,
|
|
943
|
+
amount: a.quantity ?? { amount: 1, precision: 0 }
|
|
944
944
|
})));
|
|
945
945
|
});
|
|
946
946
|
const d = re(() => _.items.length <= 10);
|
|
947
|
-
return (
|
|
948
|
-
const
|
|
949
|
-
return
|
|
947
|
+
return (a, o) => {
|
|
948
|
+
const h = Z("FmTable"), S = Z("FmButton"), y = Z("FmForm");
|
|
949
|
+
return v(), ue(y, {
|
|
950
950
|
ref_key: "formRef",
|
|
951
951
|
ref: i,
|
|
952
952
|
class: "bg-white flex flex-col gap-32 rounded-3xl p-24 w-[800px]",
|
|
@@ -957,14 +957,14 @@ const zt = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
957
957
|
o[2] || (o[2] = e("div", { class: "fm-typo-en-title-sm-600" }, "Confirm the transfer amount", -1)),
|
|
958
958
|
e("div", zt, [
|
|
959
959
|
e("div", Gt, [
|
|
960
|
-
F(
|
|
960
|
+
F(h, {
|
|
961
961
|
"column-defs": [
|
|
962
962
|
{
|
|
963
963
|
header: "Code",
|
|
964
|
-
cell: (
|
|
965
|
-
const p = s.purchaseOrder.items.find((l) => l.id ===
|
|
964
|
+
cell: (g) => {
|
|
965
|
+
const p = s.purchaseOrder.items.find((l) => l.id === g.row.original.id || l.sku._id === g.row.original.sku._id);
|
|
966
966
|
return C(
|
|
967
|
-
|
|
967
|
+
w(Ye).FmTooltip,
|
|
968
968
|
{
|
|
969
969
|
content: p.code,
|
|
970
970
|
placement: "top",
|
|
@@ -983,10 +983,10 @@ const zt = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
983
983
|
},
|
|
984
984
|
{
|
|
985
985
|
header: "Name",
|
|
986
|
-
cell: (
|
|
987
|
-
const p = s.purchaseOrder.items.find((l) => l.id ===
|
|
986
|
+
cell: (g) => {
|
|
987
|
+
const p = s.purchaseOrder.items.find((l) => l.id === g.row.original.id || l.sku._id === g.row.original.sku._id);
|
|
988
988
|
return C(
|
|
989
|
-
|
|
989
|
+
w(Ye).FmTooltip,
|
|
990
990
|
{
|
|
991
991
|
content: p.name,
|
|
992
992
|
placement: "top",
|
|
@@ -1005,8 +1005,8 @@ const zt = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
1005
1005
|
},
|
|
1006
1006
|
{
|
|
1007
1007
|
header: "Amount",
|
|
1008
|
-
cell: (
|
|
1009
|
-
const p =
|
|
1008
|
+
cell: (g) => {
|
|
1009
|
+
const p = g.row.original, l = s.purchaseOrder.items.find((u) => u.id === p.id || u.sku._id === p.sku._id), c = p.amount ?? {
|
|
1010
1010
|
amount: 1,
|
|
1011
1011
|
precision: 0
|
|
1012
1012
|
};
|
|
@@ -1027,10 +1027,10 @@ const zt = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
1027
1027
|
},
|
|
1028
1028
|
disableUnit: !0,
|
|
1029
1029
|
rules: [
|
|
1030
|
-
|
|
1031
|
-
+
|
|
1030
|
+
w(Et)(
|
|
1031
|
+
+w(be)({ amount: 0, precision: 0 })
|
|
1032
1032
|
),
|
|
1033
|
-
|
|
1033
|
+
w(Bt)(+w(be)(l.quantity))
|
|
1034
1034
|
],
|
|
1035
1035
|
applyDefaultRules: !0
|
|
1036
1036
|
});
|
|
@@ -1043,14 +1043,14 @@ const zt = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
1043
1043
|
])
|
|
1044
1044
|
]),
|
|
1045
1045
|
e("div", Ht, [
|
|
1046
|
-
F(
|
|
1046
|
+
F(S, {
|
|
1047
1047
|
class: "px-16",
|
|
1048
1048
|
label: "Confirm",
|
|
1049
1049
|
size: "md",
|
|
1050
1050
|
variant: "primary",
|
|
1051
1051
|
type: "submit"
|
|
1052
1052
|
}),
|
|
1053
|
-
F(
|
|
1053
|
+
F(S, {
|
|
1054
1054
|
class: "px-16",
|
|
1055
1055
|
label: "Cancel",
|
|
1056
1056
|
size: "md",
|
|
@@ -1129,7 +1129,7 @@ const zt = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
1129
1129
|
}
|
|
1130
1130
|
};
|
|
1131
1131
|
function Yt() {
|
|
1132
|
-
const
|
|
1132
|
+
const b = Ve();
|
|
1133
1133
|
return {
|
|
1134
1134
|
ableToMarkReceived(t) {
|
|
1135
1135
|
if (!t || t.status !== W.enum.RECEIVING)
|
|
@@ -1142,7 +1142,7 @@ function Yt() {
|
|
|
1142
1142
|
},
|
|
1143
1143
|
ableToCreateFulfillment(t, s) {
|
|
1144
1144
|
var r, d;
|
|
1145
|
-
if (!
|
|
1145
|
+
if (!b.acceptRequireFulfillment || !t || !s || t.status !== W.enum.PROCESSING || !s.processedAt)
|
|
1146
1146
|
return !1;
|
|
1147
1147
|
const _ = (r = s == null ? void 0 : s.from) == null ? void 0 : r.dbName, i = (d = s == null ? void 0 : s.to) == null ? void 0 : d.dbName;
|
|
1148
1148
|
return !(_.startsWith("restaurant_") && i.startsWith("restaurant_"));
|
|
@@ -1157,14 +1157,14 @@ const Qt = { class: "flex flex-row-reverse" }, Xt = /* @__PURE__ */ Re({
|
|
|
1157
1157
|
isTransferBetweenOutlets: { type: Boolean },
|
|
1158
1158
|
scope: {}
|
|
1159
1159
|
},
|
|
1160
|
-
setup(
|
|
1161
|
-
const t =
|
|
1160
|
+
setup(b) {
|
|
1161
|
+
const t = b, s = Ue(), _ = Ke(), i = et(), r = z(!1);
|
|
1162
1162
|
re(() => {
|
|
1163
|
-
var
|
|
1164
|
-
let
|
|
1165
|
-
s.isEnabled || (
|
|
1166
|
-
const o = t.purchaseOrder,
|
|
1167
|
-
return o && ((
|
|
1163
|
+
var S, y, g, p;
|
|
1164
|
+
let a = !0;
|
|
1165
|
+
s.isEnabled || (a = !1);
|
|
1166
|
+
const o = t.purchaseOrder, h = t.poRequest;
|
|
1167
|
+
return o && ((S = o == null ? void 0 : o.supplier) != null && S.internal ? (!h && o.status == W.enum.DRAFT && (a = !1), h && !((y = h == null ? void 0 : h.netSuite) != null && y.id) && (a = !1), t.isTransferBetweenOutlets && (a = !1)) : ((o == null ? void 0 : o.status) !== W.enum.REQUESTING && o.supplier.internal && (a = !1), !h && !((g = o == null ? void 0 : o.netSuite) != null && g.id) && (a = !1), !h && ((p = o == null ? void 0 : o.netSuite) != null && p.id) && (o == null ? void 0 : o.status) == W.enum.REQUESTING && (a = !1))), a;
|
|
1168
1168
|
});
|
|
1169
1169
|
async function d() {
|
|
1170
1170
|
r.value || i.open({
|
|
@@ -1185,18 +1185,18 @@ const Qt = { class: "flex flex-row-reverse" }, Xt = /* @__PURE__ */ Re({
|
|
|
1185
1185
|
},
|
|
1186
1186
|
secondaryActions: { text: "Not now", close: !0 }
|
|
1187
1187
|
}).onPrimary(async () => {
|
|
1188
|
-
var
|
|
1188
|
+
var a, o, h;
|
|
1189
1189
|
try {
|
|
1190
1190
|
r.value = !0;
|
|
1191
|
-
const
|
|
1191
|
+
const S = ((a = t.purchaseOrder) == null ? void 0 : a._id) || ((o = t.poRequest) == null ? void 0 : o.purchaseOrderId) || "", y = (h = t.poRequest) == null ? void 0 : h.to.dbName;
|
|
1192
1192
|
await s.syncPurchaseOrder(
|
|
1193
|
-
|
|
1194
|
-
t.scope === "approval" ?
|
|
1193
|
+
S,
|
|
1194
|
+
t.scope === "approval" ? y : void 0
|
|
1195
1195
|
), _.open({
|
|
1196
1196
|
title: "Sync with NetSuite",
|
|
1197
1197
|
message: "Requested to sync with NetSuite. Please wait a moment.",
|
|
1198
1198
|
type: "success"
|
|
1199
|
-
}), await new Promise((
|
|
1199
|
+
}), await new Promise((g) => setTimeout(g, 5e3)), r.value = !1;
|
|
1200
1200
|
} catch {
|
|
1201
1201
|
_.open({
|
|
1202
1202
|
title: "Error",
|
|
@@ -1206,10 +1206,10 @@ const Qt = { class: "flex flex-row-reverse" }, Xt = /* @__PURE__ */ Re({
|
|
|
1206
1206
|
}
|
|
1207
1207
|
});
|
|
1208
1208
|
}
|
|
1209
|
-
return (
|
|
1210
|
-
const
|
|
1211
|
-
return
|
|
1212
|
-
F(
|
|
1209
|
+
return (a, o) => {
|
|
1210
|
+
const h = Z("FmButton");
|
|
1211
|
+
return v(), x("div", Qt, [
|
|
1212
|
+
F(h, {
|
|
1213
1213
|
"prepend-icon": "sync",
|
|
1214
1214
|
variant: "secondary",
|
|
1215
1215
|
label: "Sync",
|
|
@@ -1247,58 +1247,58 @@ const Qt = { class: "flex flex-row-reverse" }, Xt = /* @__PURE__ */ Re({
|
|
|
1247
1247
|
isTransferBetweenOutlets: { type: Boolean },
|
|
1248
1248
|
scope: {}
|
|
1249
1249
|
},
|
|
1250
|
-
setup(
|
|
1251
|
-
const t =
|
|
1250
|
+
setup(b) {
|
|
1251
|
+
const t = b, s = Ue(), _ = je(), i = z(t.poRequest);
|
|
1252
1252
|
yt(async () => {
|
|
1253
1253
|
var o;
|
|
1254
1254
|
if (!t.poRequest && ((o = t.purchaseOrder) != null && o._id)) {
|
|
1255
|
-
const
|
|
1256
|
-
i.value =
|
|
1255
|
+
const h = await _.getLatestPurchaseOrderRequest(t.purchaseOrder._id);
|
|
1256
|
+
i.value = h;
|
|
1257
1257
|
}
|
|
1258
1258
|
});
|
|
1259
1259
|
const r = re(
|
|
1260
1260
|
() => {
|
|
1261
|
-
var o,
|
|
1261
|
+
var o, h, S, y, g, p;
|
|
1262
1262
|
return s.getSubsidiaryFullName(
|
|
1263
|
-
((
|
|
1263
|
+
((S = (h = (o = t.purchaseOrder) == null ? void 0 : o.netSuite) == null ? void 0 : h.subsidiary) == null ? void 0 : S.id) || ((p = (g = (y = t.poRequest) == null ? void 0 : y.netSuite) == null ? void 0 : g.subsidiary) == null ? void 0 : p.id)
|
|
1264
1264
|
).fullName;
|
|
1265
1265
|
}
|
|
1266
1266
|
), d = re(() => {
|
|
1267
|
-
var o,
|
|
1268
|
-
return (
|
|
1269
|
-
}),
|
|
1270
|
-
var o,
|
|
1271
|
-
return (
|
|
1267
|
+
var o, h, S, y, g, p, l, c, u, O, q, T;
|
|
1268
|
+
return (S = (h = (o = t.purchaseOrder) == null ? void 0 : o.netSuite) == null ? void 0 : h.additionalInfo) != null && S.transactionnumber ? (p = (g = (y = t.purchaseOrder) == null ? void 0 : y.netSuite) == null ? void 0 : g.additionalInfo) == null ? void 0 : p.transactionnumber : (u = (c = (l = i.value) == null ? void 0 : l.netSuite) == null ? void 0 : c.additionalInfo) != null && u.transactionnumber ? (T = (q = (O = i.value) == null ? void 0 : O.netSuite) == null ? void 0 : q.additionalInfo) == null ? void 0 : T.transactionnumber : null;
|
|
1269
|
+
}), a = re(() => {
|
|
1270
|
+
var o, h, S, y, g, p;
|
|
1271
|
+
return (h = (o = t.purchaseOrder) == null ? void 0 : o.deliveryFullfillment) != null && h.length && ((y = (S = t.purchaseOrder) == null ? void 0 : S.deliveryFullfillment) == null ? void 0 : y.length) > 0 ? (p = (g = t.purchaseOrder) == null ? void 0 : g.deliveryFullfillment) == null ? void 0 : p.map((l) => {
|
|
1272
1272
|
var c;
|
|
1273
1273
|
return (c = l.netSuite) == null ? void 0 : c.refNo;
|
|
1274
1274
|
}).join(", ") : "N/A";
|
|
1275
1275
|
});
|
|
1276
|
-
return (o,
|
|
1277
|
-
var
|
|
1278
|
-
return
|
|
1276
|
+
return (o, h) => {
|
|
1277
|
+
var S, y, g, p, l, c, u, O, q, T, P, $, U, pe, de, xe;
|
|
1278
|
+
return w(s).isEnabled ? (v(), x("div", Zt, [
|
|
1279
1279
|
e("div", Jt, [
|
|
1280
|
-
|
|
1281
|
-
e("div", er,
|
|
1280
|
+
h[0] || (h[0] = e("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, "NetSuite subsidiary", -1)),
|
|
1281
|
+
e("div", er, R(r.value || "N/A"), 1)
|
|
1282
1282
|
]),
|
|
1283
|
-
!o.isTransferBetweenOutlets && o.scope ===
|
|
1284
|
-
e("div", rr, " NetSuite " +
|
|
1283
|
+
!o.isTransferBetweenOutlets && o.scope === w(Ze).RECEIVE_REQUEST ? (v(), x("div", tr, [
|
|
1284
|
+
e("div", rr, " NetSuite " + R((y = (S = o.purchaseOrder) == null ? void 0 : S.netSuite) != null && y.recordType ? w(ft)((p = (g = o.purchaseOrder) == null ? void 0 : g.netSuite) == null ? void 0 : p.recordType) : o.transferType === w(we).PURCHASE ? "Purchase Order" : "Transfer Order") + " (ID) ", 1),
|
|
1285
1285
|
e("div", sr, [
|
|
1286
|
-
(c = (l = o.purchaseOrder) == null ? void 0 : l.netSuite) != null && c.id ? (
|
|
1286
|
+
(c = (l = o.purchaseOrder) == null ? void 0 : l.netSuite) != null && c.id ? (v(), x("span", or, R((O = (u = o.purchaseOrder) == null ? void 0 : u.netSuite) == null ? void 0 : O.refNo) + " (" + R((T = (q = o.purchaseOrder) == null ? void 0 : q.netSuite) == null ? void 0 : T.id) + ") ", 1)) : (v(), x("span", nr, "N/A"))
|
|
1287
1287
|
])
|
|
1288
1288
|
])) : H("", !0),
|
|
1289
|
-
!o.isTransferBetweenOutlets && i.value || o.scope ===
|
|
1290
|
-
e("div", ir, " (Request) NetSuite " +
|
|
1289
|
+
!o.isTransferBetweenOutlets && i.value || o.scope === w(Ze).APPROVAL ? (v(), x("div", ar, [
|
|
1290
|
+
e("div", ir, " (Request) NetSuite " + R(o.transferType === w(we).PURCHASE ? "Purchase Order" : "Transfer Order") + " (ID) ", 1),
|
|
1291
1291
|
e("div", lr, [
|
|
1292
|
-
($ = (P = i.value) == null ? void 0 : P.netSuite) != null && $.id ? (
|
|
1292
|
+
($ = (P = i.value) == null ? void 0 : P.netSuite) != null && $.id ? (v(), x("span", cr, R((pe = (U = i.value) == null ? void 0 : U.netSuite) == null ? void 0 : pe.refNo) + " (" + R((xe = (de = i.value) == null ? void 0 : de.netSuite) == null ? void 0 : xe.id) + ") ", 1)) : (v(), x("span", ur, "N/A"))
|
|
1293
1293
|
])
|
|
1294
1294
|
])) : H("", !0),
|
|
1295
|
-
d.value ? (
|
|
1296
|
-
|
|
1297
|
-
e("div", mr,
|
|
1295
|
+
d.value ? (v(), x("div", dr, [
|
|
1296
|
+
h[1] || (h[1] = e("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " NetSuite Transaction Number ", -1)),
|
|
1297
|
+
e("div", mr, R(d.value), 1)
|
|
1298
1298
|
])) : H("", !0),
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
e("div", pr,
|
|
1299
|
+
w(s).isEnabled && o.transferType === w(we).TRANSFER && !o.isTransferBetweenOutlets ? (v(), x("div", fr, [
|
|
1300
|
+
h[2] || (h[2] = e("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " NetSuite fulfillment IDs ", -1)),
|
|
1301
|
+
e("div", pr, R(a.value), 1)
|
|
1302
1302
|
])) : H("", !0)
|
|
1303
1303
|
])) : H("", !0);
|
|
1304
1304
|
};
|
|
@@ -1309,13 +1309,13 @@ const Qt = { class: "flex flex-row-reverse" }, Xt = /* @__PURE__ */ Re({
|
|
|
1309
1309
|
netsuiteId: {},
|
|
1310
1310
|
purchaseOrderId: {}
|
|
1311
1311
|
},
|
|
1312
|
-
setup(
|
|
1312
|
+
setup(b) {
|
|
1313
1313
|
const t = Ke(), s = pt();
|
|
1314
1314
|
async function _(i, r) {
|
|
1315
1315
|
const d = [];
|
|
1316
1316
|
if (i && d.push(`body.message:*${i}*`), r) {
|
|
1317
|
-
const
|
|
1318
|
-
d.push(`${
|
|
1317
|
+
const S = r.replace(/:/g, "\\:");
|
|
1318
|
+
d.push(`${S}`);
|
|
1319
1319
|
}
|
|
1320
1320
|
if (d.length === 0) {
|
|
1321
1321
|
t.open({
|
|
@@ -1324,23 +1324,23 @@ const Qt = { class: "flex flex-row-reverse" }, Xt = /* @__PURE__ */ Re({
|
|
|
1324
1324
|
});
|
|
1325
1325
|
return;
|
|
1326
1326
|
}
|
|
1327
|
-
const o = `attributes.pod:netsuite* AND (${d.join(" OR ")})`, { url:
|
|
1327
|
+
const o = `attributes.pod:netsuite* AND (${d.join(" OR ")})`, { url: h } = await s.getSyncLogs(o);
|
|
1328
1328
|
t.open(
|
|
1329
1329
|
{
|
|
1330
1330
|
message: "Opening NetSuite logs...",
|
|
1331
1331
|
type: "info"
|
|
1332
1332
|
},
|
|
1333
1333
|
800
|
|
1334
|
-
), await new Promise((
|
|
1334
|
+
), await new Promise((S) => setTimeout(S, 800)), window.open(h, "_blank");
|
|
1335
1335
|
}
|
|
1336
1336
|
return (i, r) => {
|
|
1337
1337
|
const d = Z("FmButton");
|
|
1338
|
-
return
|
|
1338
|
+
return v(), x("div", vr, [
|
|
1339
1339
|
F(d, {
|
|
1340
1340
|
"prepend-icon": "history",
|
|
1341
1341
|
variant: "secondary",
|
|
1342
1342
|
label: "Logs",
|
|
1343
|
-
onClick: r[0] || (r[0] = (
|
|
1343
|
+
onClick: r[0] || (r[0] = (a) => _(i.netsuiteId, i.purchaseOrderId)),
|
|
1344
1344
|
"text-color": "primary",
|
|
1345
1345
|
"bg-color": "transparent",
|
|
1346
1346
|
"border-color": "primary"
|
|
@@ -1360,10 +1360,10 @@ const Qt = { class: "flex flex-row-reverse" }, Xt = /* @__PURE__ */ Re({
|
|
|
1360
1360
|
netsuiteId: {},
|
|
1361
1361
|
purchaseOrderId: {}
|
|
1362
1362
|
},
|
|
1363
|
-
setup(
|
|
1364
|
-
const t =
|
|
1365
|
-
async function
|
|
1366
|
-
if (!
|
|
1363
|
+
setup(b) {
|
|
1364
|
+
const t = b, s = pt(), _ = z(!1), i = ge(), r = z(!0), d = z(!1), a = z(!1), o = z(!1), h = z(null), S = z([]);
|
|
1365
|
+
async function y() {
|
|
1366
|
+
if (!h.value) {
|
|
1367
1367
|
_.value = !0;
|
|
1368
1368
|
try {
|
|
1369
1369
|
r.value = !0;
|
|
@@ -1371,25 +1371,25 @@ const Qt = { class: "flex flex-row-reverse" }, Xt = /* @__PURE__ */ Re({
|
|
|
1371
1371
|
i.currentLocation.dbName,
|
|
1372
1372
|
t.purchaseOrderId
|
|
1373
1373
|
);
|
|
1374
|
-
|
|
1374
|
+
h.value = c, d.value = !1;
|
|
1375
1375
|
} catch {
|
|
1376
1376
|
d.value = !0;
|
|
1377
1377
|
} finally {
|
|
1378
1378
|
r.value = !1;
|
|
1379
1379
|
}
|
|
1380
|
-
await
|
|
1380
|
+
await g();
|
|
1381
1381
|
}
|
|
1382
1382
|
}
|
|
1383
|
-
async function
|
|
1384
|
-
if (!(
|
|
1383
|
+
async function g() {
|
|
1384
|
+
if (!(S.value.length > 0))
|
|
1385
1385
|
try {
|
|
1386
|
-
|
|
1386
|
+
a.value = !0;
|
|
1387
1387
|
const c = await s.getChangeLogs(t.netsuiteId);
|
|
1388
|
-
|
|
1388
|
+
S.value = c, o.value = !1;
|
|
1389
1389
|
} catch {
|
|
1390
1390
|
o.value = !0;
|
|
1391
1391
|
} finally {
|
|
1392
|
-
|
|
1392
|
+
a.value = !1;
|
|
1393
1393
|
}
|
|
1394
1394
|
}
|
|
1395
1395
|
function p(c) {
|
|
@@ -1417,7 +1417,7 @@ const Qt = { class: "flex flex-row-reverse" }, Xt = /* @__PURE__ */ Re({
|
|
|
1417
1417
|
}
|
|
1418
1418
|
return (c, u) => {
|
|
1419
1419
|
const O = Z("FmButton"), q = Z("FmLabel"), T = Z("FmIcon"), P = Z("FmDialog");
|
|
1420
|
-
return
|
|
1420
|
+
return v(), x("div", br, [
|
|
1421
1421
|
F(P, {
|
|
1422
1422
|
modelValue: _.value,
|
|
1423
1423
|
"onUpdate:modelValue": u[2] || (u[2] = ($) => _.value = $),
|
|
@@ -1429,7 +1429,7 @@ const Qt = { class: "flex flex-row-reverse" }, Xt = /* @__PURE__ */ Re({
|
|
|
1429
1429
|
"prepend-icon": "info",
|
|
1430
1430
|
variant: "secondary",
|
|
1431
1431
|
label: "Latest Info",
|
|
1432
|
-
onClick: u[0] || (u[0] = ($) =>
|
|
1432
|
+
onClick: u[0] || (u[0] = ($) => y()),
|
|
1433
1433
|
"text-color": "primary",
|
|
1434
1434
|
"bg-color": "transparent",
|
|
1435
1435
|
"border-color": "primary"
|
|
@@ -1439,26 +1439,26 @@ const Qt = { class: "flex flex-row-reverse" }, Xt = /* @__PURE__ */ Re({
|
|
|
1439
1439
|
e("div", null, "NetSuite latest info", -1)
|
|
1440
1440
|
])),
|
|
1441
1441
|
default: se(() => [
|
|
1442
|
-
r.value ? (
|
|
1443
|
-
d.value ? (
|
|
1442
|
+
r.value ? (v(), x("div", gr, "Loading...")) : (v(), x("div", _r, [
|
|
1443
|
+
d.value ? (v(), x("p", Br, "Something went wrong.")) : (v(), x(ae, { key: 0 }, [
|
|
1444
1444
|
e("div", Sr, [
|
|
1445
1445
|
u[4] || (u[4] = e("h3", { class: "fm-typo-en-body-lg-600 mb-4" }, "NetSuite Order Details", -1)),
|
|
1446
|
-
(
|
|
1446
|
+
(v(!0), x(ae, null, he(h.value, ($, U) => (v(), x("div", {
|
|
1447
1447
|
key: U,
|
|
1448
1448
|
class: "mb-2"
|
|
1449
1449
|
}, [
|
|
1450
1450
|
e("div", null, [
|
|
1451
1451
|
F(q, {
|
|
1452
|
-
label:
|
|
1452
|
+
label: w(Je)(U)
|
|
1453
1453
|
}, null, 8, ["label"]),
|
|
1454
1454
|
e("div", wr, [
|
|
1455
|
-
Array.isArray($) ? (
|
|
1455
|
+
Array.isArray($) ? (v(), x("span", Rr, R($.length > 0 ? $.join(", ") : "N/A"), 1)) : (v(), x("span", xr, R($), 1))
|
|
1456
1456
|
])
|
|
1457
1457
|
])
|
|
1458
1458
|
]))), 128))
|
|
1459
1459
|
]),
|
|
1460
|
-
|
|
1461
|
-
!
|
|
1460
|
+
a.value ? (v(), x("div", Or, "Change Log Loading...")) : H("", !0),
|
|
1461
|
+
!a.value && S.value.length > 0 ? (v(), x("div", Nr, [
|
|
1462
1462
|
e("h3", $r, [
|
|
1463
1463
|
F(T, {
|
|
1464
1464
|
name: "error",
|
|
@@ -1486,26 +1486,26 @@ const Qt = { class: "flex flex-row-reverse" }, Xt = /* @__PURE__ */ Re({
|
|
|
1486
1486
|
])
|
|
1487
1487
|
], -1)),
|
|
1488
1488
|
e("tbody", null, [
|
|
1489
|
-
(
|
|
1489
|
+
(v(!0), x(ae, null, he(S.value, ($, U) => (v(), x("tr", {
|
|
1490
1490
|
key: U,
|
|
1491
1491
|
class: "border-b border-fm-color-neutral-gray-200 last:border-b-0"
|
|
1492
1492
|
}, [
|
|
1493
|
-
e("td", Ar,
|
|
1494
|
-
e("td", Dr,
|
|
1495
|
-
e("td", qr,
|
|
1496
|
-
e("td", Tr,
|
|
1493
|
+
e("td", Ar, R(l($._dateiso8601)), 1),
|
|
1494
|
+
e("td", Dr, R($._rolename), 1),
|
|
1495
|
+
e("td", qr, R($._employeename), 1),
|
|
1496
|
+
e("td", Tr, R($._contextname), 1),
|
|
1497
1497
|
e("td", {
|
|
1498
1498
|
class: Te(`p-3 fm-typo-en-body-sm-600 ${p(Number($.type) - 1)}`)
|
|
1499
|
-
}, w(
|
|
1500
|
-
e("td", Pr,
|
|
1501
|
-
e("td", Ir,
|
|
1502
|
-
e("td", Fr,
|
|
1503
|
-
e("td", Lr,
|
|
1499
|
+
}, R(w(Ae)[Number($.type) - 1]), 3),
|
|
1500
|
+
e("td", Pr, R($.lineid || ""), 1),
|
|
1501
|
+
e("td", Ir, R($._fieldname), 1),
|
|
1502
|
+
e("td", Fr, R($.oldvalue || ""), 1),
|
|
1503
|
+
e("td", Lr, R($.newvalue || ""), 1)
|
|
1504
1504
|
]))), 128))
|
|
1505
1505
|
])
|
|
1506
1506
|
])
|
|
1507
1507
|
])
|
|
1508
|
-
])) : (
|
|
1508
|
+
])) : (v(), x("div", Er, u[7] || (u[7] = [
|
|
1509
1509
|
e("p", null, "No change logs available.", -1)
|
|
1510
1510
|
])))
|
|
1511
1511
|
], 64))
|
|
@@ -1537,41 +1537,41 @@ const Qt = { class: "flex flex-row-reverse" }, Xt = /* @__PURE__ */ Re({
|
|
|
1537
1537
|
transferToDbName: {},
|
|
1538
1538
|
scope: {}
|
|
1539
1539
|
},
|
|
1540
|
-
setup(
|
|
1541
|
-
const t =
|
|
1540
|
+
setup(b) {
|
|
1541
|
+
const t = b, s = Ut();
|
|
1542
1542
|
Me();
|
|
1543
1543
|
const _ = re(() => {
|
|
1544
|
-
var
|
|
1545
|
-
const i = ((
|
|
1546
|
-
return r || d && !i || ((
|
|
1544
|
+
var a, o, h, S, y, g, p;
|
|
1545
|
+
const i = ((a = t.transferToDbName) == null ? void 0 : a.startsWith("restaurant")) && ((h = (o = t.purchaseOrder) == null ? void 0 : o.supplier) == null ? void 0 : h.internal) === "restaurant", r = t.transferType === we.PURCHASE, d = t.transferType === we.TRANSFER;
|
|
1546
|
+
return r || d && !i || ((y = (S = t.purchaseOrder) == null ? void 0 : S.netSuite) == null ? void 0 : y.id) || ((p = (g = t.poRequest) == null ? void 0 : g.netSuite) == null ? void 0 : p.id);
|
|
1547
1547
|
});
|
|
1548
1548
|
return (i, r) => {
|
|
1549
|
+
var a, o;
|
|
1549
1550
|
const d = Z("FmMenuDivider");
|
|
1550
|
-
return
|
|
1551
|
+
return w(s).isNetSuiteEnabled && _.value ? (v(), x("div", Ur, [
|
|
1551
1552
|
e("div", Mr, [
|
|
1552
1553
|
r[0] || (r[0] = e("span", { class: "flex-1 fm-typo-en-body-lg-600" }, "NetSuite Info", -1)),
|
|
1553
1554
|
e("div", Kr, [
|
|
1554
1555
|
e("div", jr, [
|
|
1555
|
-
|
|
1556
|
+
(o = (a = t.purchaseOrder) == null ? void 0 : a.netSuite) != null && o.id ? (v(), ue($e, { key: 0 }, {
|
|
1556
1557
|
default: se(() => {
|
|
1557
|
-
var
|
|
1558
|
+
var h, S, y;
|
|
1558
1559
|
return [
|
|
1559
|
-
(
|
|
1560
|
-
|
|
1561
|
-
"
|
|
1562
|
-
|
|
1563
|
-
}, null, 8, ["netsuite-id", "purchase-order-id"])) : H("", !0)
|
|
1560
|
+
F(Vr, {
|
|
1561
|
+
"netsuite-id": (S = (h = i.purchaseOrder) == null ? void 0 : h.netSuite) == null ? void 0 : S.id,
|
|
1562
|
+
"purchase-order-id": (y = i.purchaseOrder) == null ? void 0 : y._id
|
|
1563
|
+
}, null, 8, ["netsuite-id", "purchase-order-id"])
|
|
1564
1564
|
];
|
|
1565
1565
|
}),
|
|
1566
1566
|
_: 1
|
|
1567
|
-
}),
|
|
1567
|
+
})) : H("", !0),
|
|
1568
1568
|
F($e, null, {
|
|
1569
1569
|
default: se(() => {
|
|
1570
|
-
var
|
|
1570
|
+
var h, S, y;
|
|
1571
1571
|
return [
|
|
1572
1572
|
F(hr, {
|
|
1573
|
-
"netsuite-id": (
|
|
1574
|
-
"purchase-order-id": (
|
|
1573
|
+
"netsuite-id": (S = (h = i.purchaseOrder) == null ? void 0 : h.netSuite) == null ? void 0 : S.id,
|
|
1574
|
+
"purchase-order-id": (y = i.purchaseOrder) == null ? void 0 : y._id
|
|
1575
1575
|
}, null, 8, ["netsuite-id", "purchase-order-id"])
|
|
1576
1576
|
];
|
|
1577
1577
|
}),
|
|
@@ -1651,32 +1651,32 @@ const Qt = { class: "flex flex-row-reverse" }, Xt = /* @__PURE__ */ Re({
|
|
|
1651
1651
|
receivedMap: {}
|
|
1652
1652
|
},
|
|
1653
1653
|
emits: ["update:show", "submitted"],
|
|
1654
|
-
setup(
|
|
1655
|
-
const s =
|
|
1654
|
+
setup(b, { emit: t }) {
|
|
1655
|
+
const s = b, _ = t, i = et(), r = Ke(), d = Ve(), a = ge(), o = Me(), h = re(
|
|
1656
1656
|
() => {
|
|
1657
|
-
var
|
|
1657
|
+
var n, m;
|
|
1658
1658
|
return {
|
|
1659
|
-
id: ((
|
|
1659
|
+
id: ((n = o.sessionUser.value) == null ? void 0 : n.id) ?? "",
|
|
1660
1660
|
name: ((m = o.sessionUser.value) == null ? void 0 : m.displayName) ?? ""
|
|
1661
1661
|
};
|
|
1662
1662
|
}
|
|
1663
|
-
),
|
|
1663
|
+
), S = Yt(), { t: y } = vt(), g = re(
|
|
1664
1664
|
() => {
|
|
1665
|
-
var
|
|
1666
|
-
return ((m = (
|
|
1665
|
+
var n, m, A, N;
|
|
1666
|
+
return ((m = (n = s.purchaseOrder) == null ? void 0 : n.supplier) == null ? void 0 : m.internal) === "restaurant" || ((N = (A = s.purchaseOrder) == null ? void 0 : A.supplier) == null ? void 0 : N.internal) === "warehouse" ? we.TRANSFER : we.PURCHASE;
|
|
1667
1667
|
}
|
|
1668
1668
|
), p = z(!1), l = z(""), c = z(!0), u = je(), O = Vt(u.getWorkflowConfig), q = bt(), T = re(() => {
|
|
1669
1669
|
if (!s.purchaseOrder)
|
|
1670
1670
|
return [];
|
|
1671
|
-
const
|
|
1672
|
-
if (
|
|
1671
|
+
const n = O.result.value;
|
|
1672
|
+
if (n.state === lt.loading)
|
|
1673
1673
|
return [];
|
|
1674
1674
|
const m = {
|
|
1675
|
-
user:
|
|
1676
|
-
executedAt:
|
|
1675
|
+
user: h.value,
|
|
1676
|
+
executedAt: a.locations.computeFirst(
|
|
1677
1677
|
(N) => {
|
|
1678
1678
|
var L;
|
|
1679
|
-
return N.dbName === ((L =
|
|
1679
|
+
return N.dbName === ((L = a._currentLocation) == null ? void 0 : L.dbName) ? N : null;
|
|
1680
1680
|
}
|
|
1681
1681
|
),
|
|
1682
1682
|
purchaseOrderRequest: s.poRequest,
|
|
@@ -1684,7 +1684,7 @@ const Qt = { class: "flex flex-row-reverse" }, Xt = /* @__PURE__ */ Re({
|
|
|
1684
1684
|
};
|
|
1685
1685
|
let A = [];
|
|
1686
1686
|
try {
|
|
1687
|
-
|
|
1687
|
+
n.state === lt.error ? (console.error("Error fetching workflow config:", n.error), A = ze.getAvailableActions({
|
|
1688
1688
|
...m,
|
|
1689
1689
|
orderConfig: ze.getDefaultConfig()
|
|
1690
1690
|
}).actions.filter(
|
|
@@ -1695,7 +1695,7 @@ const Qt = { class: "flex flex-row-reverse" }, Xt = /* @__PURE__ */ Re({
|
|
|
1695
1695
|
)
|
|
1696
1696
|
)) : A = ze.getAvailableActions({
|
|
1697
1697
|
...m,
|
|
1698
|
-
orderConfig:
|
|
1698
|
+
orderConfig: n.data
|
|
1699
1699
|
}).actions.filter(
|
|
1700
1700
|
(N) => N !== k.enum.receiveStock && N !== k.enum.processRequest && N !== k.enum.closeRequest
|
|
1701
1701
|
);
|
|
@@ -1705,21 +1705,21 @@ const Qt = { class: "flex flex-row-reverse" }, Xt = /* @__PURE__ */ Re({
|
|
|
1705
1705
|
return s.scope === "approval" && (A = A.filter((N) => N !== k.enum.completeReceive)), A;
|
|
1706
1706
|
}), P = qt(s, "show"), $ = re(() => [
|
|
1707
1707
|
{
|
|
1708
|
-
label:
|
|
1708
|
+
label: y("inventory.transfer.receiveRequest.details.overview"),
|
|
1709
1709
|
value: "overview"
|
|
1710
1710
|
},
|
|
1711
1711
|
{
|
|
1712
|
-
label:
|
|
1712
|
+
label: y("inventory.transfer.receiveRequest.details.deliveryHistory"),
|
|
1713
1713
|
value: "deliveryHistory"
|
|
1714
1714
|
}
|
|
1715
1715
|
]), U = z($.value[0]);
|
|
1716
1716
|
kt(
|
|
1717
1717
|
() => s.show,
|
|
1718
|
-
(
|
|
1719
|
-
|
|
1718
|
+
(n) => {
|
|
1719
|
+
n && (U.value = $.value[0]);
|
|
1720
1720
|
}
|
|
1721
1721
|
);
|
|
1722
|
-
async function pe(
|
|
1722
|
+
async function pe(n, m, A, N, L) {
|
|
1723
1723
|
return new Promise((E, M) => {
|
|
1724
1724
|
i.open({
|
|
1725
1725
|
closeButton: !1,
|
|
@@ -1740,7 +1740,7 @@ const Qt = { class: "flex flex-row-reverse" }, Xt = /* @__PURE__ */ Re({
|
|
|
1740
1740
|
deliveryOrderNumber: "",
|
|
1741
1741
|
deliveryRemark: null,
|
|
1742
1742
|
items: m.fulfillment.items,
|
|
1743
|
-
createdBy:
|
|
1743
|
+
createdBy: h.value
|
|
1744
1744
|
}
|
|
1745
1745
|
})) : A === k.enum.processRequest ? m.fulfillment && f.push({
|
|
1746
1746
|
action: "processRequest",
|
|
@@ -1749,7 +1749,7 @@ const Qt = { class: "flex flex-row-reverse" }, Xt = /* @__PURE__ */ Re({
|
|
|
1749
1749
|
deliveryOrderNumber: "",
|
|
1750
1750
|
deliveryRemark: null,
|
|
1751
1751
|
items: m.fulfillment.items,
|
|
1752
|
-
createdBy:
|
|
1752
|
+
createdBy: h.value
|
|
1753
1753
|
}
|
|
1754
1754
|
}) : A === k.enum.rejectRequest ? f.push({
|
|
1755
1755
|
action: "rejectRequest",
|
|
@@ -1762,7 +1762,7 @@ const Qt = { class: "flex flex-row-reverse" }, Xt = /* @__PURE__ */ Re({
|
|
|
1762
1762
|
await q({
|
|
1763
1763
|
operate: {
|
|
1764
1764
|
operation: A,
|
|
1765
|
-
doc:
|
|
1765
|
+
doc: n,
|
|
1766
1766
|
options: m
|
|
1767
1767
|
},
|
|
1768
1768
|
operateV2: {
|
|
@@ -1785,28 +1785,28 @@ const Qt = { class: "flex flex-row-reverse" }, Xt = /* @__PURE__ */ Re({
|
|
|
1785
1785
|
});
|
|
1786
1786
|
});
|
|
1787
1787
|
}
|
|
1788
|
-
async function de(
|
|
1788
|
+
async function de(n) {
|
|
1789
1789
|
var L, E, M, f;
|
|
1790
|
-
if (
|
|
1790
|
+
if (n === k.enum.receiveStock)
|
|
1791
1791
|
return;
|
|
1792
|
-
const m = ht[
|
|
1792
|
+
const m = ht[n];
|
|
1793
1793
|
if (!m) {
|
|
1794
1794
|
r.open({
|
|
1795
1795
|
title: "Something went wrong",
|
|
1796
|
-
message: `Cannot process order: ${Je(
|
|
1796
|
+
message: `Cannot process order: ${Je(n)}`,
|
|
1797
1797
|
type: "error"
|
|
1798
1798
|
});
|
|
1799
1799
|
return;
|
|
1800
1800
|
}
|
|
1801
1801
|
const { successMessage: A, ...N } = m;
|
|
1802
1802
|
if (s.purchaseOrder) {
|
|
1803
|
-
l.value = `${
|
|
1803
|
+
l.value = `${n}`, p.value = !0, c.value = !1;
|
|
1804
1804
|
const B = {};
|
|
1805
1805
|
let Q = 0;
|
|
1806
|
-
if ((
|
|
1807
|
-
|
|
1806
|
+
if ((n === k.enum.confirmDraft || // auto receive for warehouse to warehouse
|
|
1807
|
+
n === k.enum.completeReceive) && d.autoReceiveWarehouse)
|
|
1808
1808
|
B.autoReceive = !0;
|
|
1809
|
-
else if ((
|
|
1809
|
+
else if ((n === k.enum.approveRequest || n === k.enum.processRequest) && d.acceptRequireFulfillment) {
|
|
1810
1810
|
const ee = (E = (L = s.poRequest) == null ? void 0 : L.from) == null ? void 0 : E.dbName, K = (f = (M = s.poRequest) == null ? void 0 : M.to) == null ? void 0 : f.dbName;
|
|
1811
1811
|
if (ee && K && (ee.startsWith("warehouse_") || K.startsWith("warehouse_"))) {
|
|
1812
1812
|
const ie = await new Promise((Y, ve) => {
|
|
@@ -1830,7 +1830,7 @@ const Qt = { class: "flex flex-row-reverse" }, Xt = /* @__PURE__ */ Re({
|
|
|
1830
1830
|
await pe(
|
|
1831
1831
|
s.purchaseOrder,
|
|
1832
1832
|
B,
|
|
1833
|
-
|
|
1833
|
+
n,
|
|
1834
1834
|
m,
|
|
1835
1835
|
Q
|
|
1836
1836
|
) === "submitted" && (r.open({
|
|
@@ -1843,28 +1843,28 @@ const Qt = { class: "flex flex-row-reverse" }, Xt = /* @__PURE__ */ Re({
|
|
|
1843
1843
|
title: "Something went wrong",
|
|
1844
1844
|
message: "Please try again.",
|
|
1845
1845
|
type: "error"
|
|
1846
|
-
}), console.error("Error when submitting PO operation",
|
|
1846
|
+
}), console.error("Error when submitting PO operation", n, s.purchaseOrder, ee);
|
|
1847
1847
|
} finally {
|
|
1848
1848
|
l.value = "", p.value = !1, c.value = !0;
|
|
1849
1849
|
}
|
|
1850
1850
|
}
|
|
1851
1851
|
}
|
|
1852
1852
|
const xe = re(() => {
|
|
1853
|
-
var
|
|
1854
|
-
return ((
|
|
1853
|
+
var n, m;
|
|
1854
|
+
return ((n = s.purchaseOrder) == null ? void 0 : n.status) === W.enum.RECEIVING || ((m = s.purchaseOrder) == null ? void 0 : m.status) === W.enum.COMPLETE;
|
|
1855
1855
|
}), Pe = re(() => {
|
|
1856
|
-
const
|
|
1857
|
-
if (!
|
|
1858
|
-
const m = Ee(
|
|
1859
|
-
let E =
|
|
1860
|
-
return L === W.enum.CLOSE && (E = `${
|
|
1856
|
+
const n = s.purchaseOrder;
|
|
1857
|
+
if (!n) return { status: "", statusClass: "" };
|
|
1858
|
+
const m = Ee(n), { partial: A, over: N } = Qe(m), L = Xe(n.status, A, N);
|
|
1859
|
+
let E = y(`inventory.transfer.status.${L}`), M = `${n.status}`.toLocaleLowerCase("en-us");
|
|
1860
|
+
return L === W.enum.CLOSE && (E = `${y(`inventory.transfer.status.${W.enum.COMPLETE}`)}`), L === "PARTIAL_RECEIVED" && M === W.enum.PROCESSING.toLocaleLowerCase("en-us") && (M = W.enum.RECEIVING.toLocaleLowerCase("en-us")), {
|
|
1861
1861
|
status: E,
|
|
1862
1862
|
statusClass: `fm-status-badge fm-status-badge-${M}`
|
|
1863
1863
|
};
|
|
1864
1864
|
}), ye = re(() => {
|
|
1865
1865
|
var E, M;
|
|
1866
|
-
const
|
|
1867
|
-
...
|
|
1866
|
+
const n = ((E = s.purchaseOrder) == null ? void 0 : E.deliveryOrder) ?? [], m = ((M = s.purchaseOrder) == null ? void 0 : M.deliveryFullfillment) ?? [], A = [
|
|
1867
|
+
...n.map((f) => ({
|
|
1868
1868
|
createdAt: f.createdAt,
|
|
1869
1869
|
type: "grn",
|
|
1870
1870
|
doc: f
|
|
@@ -2100,28 +2100,28 @@ const Qt = { class: "flex flex-row-reverse" }, Xt = /* @__PURE__ */ Re({
|
|
|
2100
2100
|
});
|
|
2101
2101
|
}), D = re(() => {
|
|
2102
2102
|
var m;
|
|
2103
|
-
const
|
|
2103
|
+
const n = {
|
|
2104
2104
|
...dt(0),
|
|
2105
2105
|
currency: it()
|
|
2106
2106
|
};
|
|
2107
2107
|
return ((m = s.purchaseOrder) == null ? void 0 : m.items.reduce((A, N) => ({
|
|
2108
|
-
...ut(A, N.totalCost ??
|
|
2108
|
+
...ut(A, N.totalCost ?? n),
|
|
2109
2109
|
currency: it()
|
|
2110
|
-
}),
|
|
2110
|
+
}), n)) ?? n;
|
|
2111
2111
|
});
|
|
2112
|
-
function I(
|
|
2112
|
+
function I(n) {
|
|
2113
2113
|
var E;
|
|
2114
|
-
const A = (((E = s.purchaseOrder) == null ? void 0 : E.version) ?? Se.enum[1]) === Se.enum[2] ?
|
|
2115
|
-
return `<span class="${te(
|
|
2114
|
+
const A = (((E = s.purchaseOrder) == null ? void 0 : E.version) ?? Se.enum[1]) === Se.enum[2] ? n.id : n.sku._id, N = s.receivedMap[A];
|
|
2115
|
+
return `<span class="${te(n)} fm-typo-en-body-lg-600">${De.toFormatString({ value: N.received })}</span>/${It(n.quantity, n.sku.unit, n.measurement)}`;
|
|
2116
2116
|
}
|
|
2117
|
-
function te(
|
|
2117
|
+
function te(n) {
|
|
2118
2118
|
var B;
|
|
2119
|
-
const A = (((B = s.purchaseOrder) == null ? void 0 : B.version) ?? Se.enum[1]) === Se.enum[2] ?
|
|
2119
|
+
const A = (((B = s.purchaseOrder) == null ? void 0 : B.version) ?? Se.enum[1]) === Se.enum[2] ? n.id : n.sku._id, N = s.receivedMap[A], { isPartialReceive: L, isNoReceive: E, isOverReceive: M, isFullReceive: f } = Mt(N);
|
|
2120
2120
|
return E ? "text-fm-color-typo-tertiary" : L ? "text-fm-color-system-warning-300" : M ? "text-fm-color-system-error-300" : f ? "text-fm-color-system-success-300" : "";
|
|
2121
2121
|
}
|
|
2122
2122
|
const G = re(() => {
|
|
2123
|
-
var
|
|
2124
|
-
return (
|
|
2123
|
+
var n, m, A;
|
|
2124
|
+
return (n = s.purchaseOrder) != null && n.itemsAtSubmission ? ((m = s.purchaseOrder) == null ? void 0 : m.version) === Se.enum[2] ? s.purchaseOrder.items.reduce((N, L) => {
|
|
2125
2125
|
var M, f;
|
|
2126
2126
|
const E = (f = (M = s.purchaseOrder) == null ? void 0 : M.itemsAtSubmission) == null ? void 0 : f.find(
|
|
2127
2127
|
(B) => B.id === L.id
|
|
@@ -2140,21 +2140,21 @@ const Qt = { class: "flex flex-row-reverse" }, Xt = /* @__PURE__ */ Re({
|
|
|
2140
2140
|
newAmount: f
|
|
2141
2141
|
}), N;
|
|
2142
2142
|
}, /* @__PURE__ */ new Map()) : /* @__PURE__ */ new Map();
|
|
2143
|
-
}), ne = (
|
|
2143
|
+
}), ne = (n) => {
|
|
2144
2144
|
var A, N;
|
|
2145
2145
|
const m = G.value;
|
|
2146
|
-
return ((A = s.purchaseOrder) == null ? void 0 : A.version) === Se.enum[2] ? m.has(
|
|
2147
|
-
}, J = (
|
|
2146
|
+
return ((A = s.purchaseOrder) == null ? void 0 : A.version) === Se.enum[2] ? m.has(n.id) : m.has((N = n.sku) == null ? void 0 : N.code);
|
|
2147
|
+
}, J = (n) => {
|
|
2148
2148
|
var A, N;
|
|
2149
2149
|
const m = G.value;
|
|
2150
|
-
return ((A = s.purchaseOrder) == null ? void 0 : A.version) === Se.enum[2] ? m.get(
|
|
2150
|
+
return ((A = s.purchaseOrder) == null ? void 0 : A.version) === Se.enum[2] ? m.get(n.id) : m.get((N = n.sku) == null ? void 0 : N.code);
|
|
2151
2151
|
};
|
|
2152
|
-
return (
|
|
2152
|
+
return (n, m) => {
|
|
2153
2153
|
var K, ie;
|
|
2154
2154
|
const A = Z("FmButtonGroup"), N = Z("FmChip"), L = Z("FmMenuDivider"), E = Z("FmCard"), M = Z("FmIcon"), f = Z("FmTooltip"), B = Z("FmSpacer"), Q = Z("FmButton"), ee = Z("FmSideSheet");
|
|
2155
|
-
return
|
|
2156
|
-
header:
|
|
2157
|
-
modelValue:
|
|
2155
|
+
return v(), ue(ee, {
|
|
2156
|
+
header: w(y)("inventory.transfer.receiveRequest.details.title") + ((K = n.purchaseOrder) != null && K.seqNumber ? ` #${(ie = n.purchaseOrder) == null ? void 0 : ie.seqNumber}` : ""),
|
|
2157
|
+
modelValue: w(P),
|
|
2158
2158
|
"onUpdate:modelValue": m[5] || (m[5] = (Y) => Ct(P) ? P.value = Y : null),
|
|
2159
2159
|
"dismiss-away": c.value,
|
|
2160
2160
|
"close-button": "",
|
|
@@ -2171,7 +2171,7 @@ const Qt = { class: "flex flex-row-reverse" }, Xt = /* @__PURE__ */ Re({
|
|
|
2171
2171
|
"onUpdate:modelValue": m[0] || (m[0] = (j) => U.value = j)
|
|
2172
2172
|
}, null, 8, ["items", "modelValue"])
|
|
2173
2173
|
]),
|
|
2174
|
-
U.value.value === "overview" ? (
|
|
2174
|
+
U.value.value === "overview" ? (v(), x(ae, { key: 0 }, [
|
|
2175
2175
|
e("div", null, [
|
|
2176
2176
|
F(E, {
|
|
2177
2177
|
variant: "outlined",
|
|
@@ -2181,13 +2181,13 @@ const Qt = { class: "flex flex-row-reverse" }, Xt = /* @__PURE__ */ Re({
|
|
|
2181
2181
|
var j, V, X, me, fe, Ie, tt, rt, st;
|
|
2182
2182
|
return [
|
|
2183
2183
|
e("div", Hr, [
|
|
2184
|
-
e("div", Wr, w(
|
|
2184
|
+
e("div", Wr, R(w(y)("inventory.transfer.receiveRequest.details.requestSummary")), 1),
|
|
2185
2185
|
e("div", Yr, [
|
|
2186
2186
|
F($e, null, {
|
|
2187
2187
|
default: se(() => {
|
|
2188
2188
|
var ot;
|
|
2189
2189
|
return [
|
|
2190
|
-
Ne(
|
|
2190
|
+
Ne(R((ot = s.purchaseOrder) == null ? void 0 : ot.status), 1)
|
|
2191
2191
|
];
|
|
2192
2192
|
}),
|
|
2193
2193
|
_: 1
|
|
@@ -2203,35 +2203,35 @@ const Qt = { class: "flex flex-row-reverse" }, Xt = /* @__PURE__ */ Re({
|
|
|
2203
2203
|
e("div", Qr, [
|
|
2204
2204
|
e("div", Xr, [
|
|
2205
2205
|
e("div", Zr, [
|
|
2206
|
-
e("div", Jr, w(
|
|
2206
|
+
e("div", Jr, R(w(y)("inventory.transfer.receiveRequest.details.createdAt")), 1)
|
|
2207
2207
|
]),
|
|
2208
|
-
e("div", es, w(
|
|
2208
|
+
e("div", es, R(w(Le)(((j = n.purchaseOrder) == null ? void 0 : j._id) ?? "")), 1)
|
|
2209
2209
|
]),
|
|
2210
|
-
(V =
|
|
2211
|
-
e("div", rs, w(
|
|
2212
|
-
e("div", ss, w(
|
|
2210
|
+
(V = n.purchaseOrder) != null && V.effectiveAt ? (v(), x("div", ts, [
|
|
2211
|
+
e("div", rs, R(w(y)("inventory.transfer.receiveRequest.details.backdatedTo")), 1),
|
|
2212
|
+
e("div", ss, R(w(mt)(new Date((X = n.purchaseOrder) == null ? void 0 : X.effectiveAt))), 1)
|
|
2213
2213
|
])) : H("", !0),
|
|
2214
2214
|
e("div", os, [
|
|
2215
|
-
e("div", ns, w(
|
|
2216
|
-
e("div", as, w(
|
|
2217
|
-
`inventory.transfer.receiveRequest.details.type.${
|
|
2215
|
+
e("div", ns, R(w(y)("inventory.transfer.receiveRequest.details.type.title")), 1),
|
|
2216
|
+
e("div", as, R(w(y)(
|
|
2217
|
+
`inventory.transfer.receiveRequest.details.type.${g.value.toLocaleLowerCase("en-US")}`
|
|
2218
2218
|
)), 1)
|
|
2219
2219
|
]),
|
|
2220
|
-
(fe = (me =
|
|
2221
|
-
e("div", ls, w(
|
|
2222
|
-
e("div", cs,
|
|
2220
|
+
(fe = (me = n.purchaseOrder) == null ? void 0 : me.supplier) != null && fe.name ? (v(), x("div", is, [
|
|
2221
|
+
e("div", ls, R(w(y)("inventory.transfer.receiveRequest.details.from")), 1),
|
|
2222
|
+
e("div", cs, R((tt = (Ie = n.purchaseOrder) == null ? void 0 : Ie.supplier) == null ? void 0 : tt.name), 1)
|
|
2223
2223
|
])) : H("", !0),
|
|
2224
|
-
|
|
2225
|
-
e("div", ds, w(
|
|
2226
|
-
e("div", ms,
|
|
2224
|
+
n.transferTo ? (v(), x("div", us, [
|
|
2225
|
+
e("div", ds, R(w(y)("inventory.transfer.receiveRequest.details.to")), 1),
|
|
2226
|
+
e("div", ms, R(n.transferTo), 1)
|
|
2227
2227
|
])) : H("", !0),
|
|
2228
|
-
(rt =
|
|
2229
|
-
e("div", ps, w(
|
|
2230
|
-
e("div", ys,
|
|
2228
|
+
(rt = n.purchaseOrder) != null && rt.ref ? (v(), x("div", fs, [
|
|
2229
|
+
e("div", ps, R(w(y)("inventory.transfer.receiveRequest.details.reference")), 1),
|
|
2230
|
+
e("div", ys, R(n.purchaseOrder.ref), 1)
|
|
2231
2231
|
])) : H("", !0),
|
|
2232
|
-
(st =
|
|
2233
|
-
e("div", hs, w(
|
|
2234
|
-
e("div", bs,
|
|
2232
|
+
(st = n.purchaseOrder) != null && st.remark ? (v(), x("div", vs, [
|
|
2233
|
+
e("div", hs, R(w(y)("inventory.transfer.receiveRequest.details.remark")), 1),
|
|
2234
|
+
e("div", bs, R(n.purchaseOrder.remark), 1)
|
|
2235
2235
|
])) : H("", !0)
|
|
2236
2236
|
])
|
|
2237
2237
|
];
|
|
@@ -2240,18 +2240,18 @@ const Qt = { class: "flex flex-row-reverse" }, Xt = /* @__PURE__ */ Re({
|
|
|
2240
2240
|
})
|
|
2241
2241
|
]),
|
|
2242
2242
|
F(zr, {
|
|
2243
|
-
"po-request":
|
|
2244
|
-
purchaseOrder:
|
|
2245
|
-
transferType:
|
|
2246
|
-
transferToDbName:
|
|
2247
|
-
scope:
|
|
2243
|
+
"po-request": n.poRequest,
|
|
2244
|
+
purchaseOrder: n.purchaseOrder,
|
|
2245
|
+
transferType: g.value,
|
|
2246
|
+
transferToDbName: n.transferToDbName,
|
|
2247
|
+
scope: n.scope
|
|
2248
2248
|
}, null, 8, ["po-request", "purchaseOrder", "transferType", "transferToDbName", "scope"]),
|
|
2249
2249
|
e("div", gs, [
|
|
2250
2250
|
e("div", _s, [
|
|
2251
2251
|
e("div", Ss, [
|
|
2252
2252
|
e("span", ws, [
|
|
2253
|
-
Ne(
|
|
2254
|
-
(ve = (Y =
|
|
2253
|
+
Ne(R(xe.value ? w(y)("inventory.transfer.receiveRequest.details.receivedItems") : w(y)("inventory.transfer.receiveRequest.details.requestedItems")) + " ", 1),
|
|
2254
|
+
(ve = (Y = n.purchaseOrder) == null ? void 0 : Y.netSuite) != null && ve.missingItems && ((ke = (_e = n.purchaseOrder) == null ? void 0 : _e.netSuite) == null ? void 0 : ke.missingItems.length) > 0 ? (v(), ue(f, {
|
|
2255
2255
|
key: 0,
|
|
2256
2256
|
variant: "rich",
|
|
2257
2257
|
placement: "top",
|
|
@@ -2261,7 +2261,7 @@ const Qt = { class: "flex flex-row-reverse" }, Xt = /* @__PURE__ */ Re({
|
|
|
2261
2261
|
var j, V;
|
|
2262
2262
|
return [
|
|
2263
2263
|
e("div", Rs, [
|
|
2264
|
-
(
|
|
2264
|
+
(v(!0), x(ae, null, he((V = (j = n.purchaseOrder) == null ? void 0 : j.netSuite) == null ? void 0 : V.missingItems, (X, me) => (v(), x("div", {
|
|
2265
2265
|
class: "flex justify-center align-middle",
|
|
2266
2266
|
key: me
|
|
2267
2267
|
}, [
|
|
@@ -2269,7 +2269,7 @@ const Qt = { class: "flex flex-row-reverse" }, Xt = /* @__PURE__ */ Re({
|
|
|
2269
2269
|
name: "arrow_right",
|
|
2270
2270
|
size: "sm"
|
|
2271
2271
|
}),
|
|
2272
|
-
Ne(" " +
|
|
2272
|
+
Ne(" " + R(`(${X.netSuiteId}) ${X.name}: ${X.reason}`), 1)
|
|
2273
2273
|
]))), 128))
|
|
2274
2274
|
])
|
|
2275
2275
|
];
|
|
@@ -2286,16 +2286,16 @@ const Qt = { class: "flex flex-row-reverse" }, Xt = /* @__PURE__ */ Re({
|
|
|
2286
2286
|
])
|
|
2287
2287
|
]),
|
|
2288
2288
|
F(L),
|
|
2289
|
-
(
|
|
2289
|
+
(v(!0), x(ae, null, he(((Ce = n.purchaseOrder) == null ? void 0 : Ce.items) ?? [], (j, V) => {
|
|
2290
2290
|
var X;
|
|
2291
|
-
return
|
|
2291
|
+
return v(), x("div", {
|
|
2292
2292
|
key: V,
|
|
2293
2293
|
class: "flex flex-col"
|
|
2294
2294
|
}, [
|
|
2295
2295
|
e("div", xs, [
|
|
2296
2296
|
e("div", Os, [
|
|
2297
|
-
Ne(
|
|
2298
|
-
ne(j) ? (
|
|
2297
|
+
Ne(R(j.name) + " ", 1),
|
|
2298
|
+
ne(j) ? (v(), ue(f, {
|
|
2299
2299
|
key: 0,
|
|
2300
2300
|
variant: "rich",
|
|
2301
2301
|
placement: "top",
|
|
@@ -2306,8 +2306,8 @@ const Qt = { class: "flex flex-row-reverse" }, Xt = /* @__PURE__ */ Re({
|
|
|
2306
2306
|
return [
|
|
2307
2307
|
e("div", Ns, [
|
|
2308
2308
|
m[6] || (m[6] = e("div", { class: "font-semibold" }, "Submission changes", -1)),
|
|
2309
|
-
e("div", null, "Original Amount: " +
|
|
2310
|
-
e("div", null, " New Amount: " +
|
|
2309
|
+
e("div", null, "Original Amount: " + R((me = J(j)) == null ? void 0 : me.originalAmount), 1),
|
|
2310
|
+
e("div", null, " New Amount: " + R((fe = J(j)) == null ? void 0 : fe.newAmount), 1)
|
|
2311
2311
|
])
|
|
2312
2312
|
];
|
|
2313
2313
|
}),
|
|
@@ -2328,25 +2328,25 @@ const Qt = { class: "flex flex-row-reverse" }, Xt = /* @__PURE__ */ Re({
|
|
|
2328
2328
|
])
|
|
2329
2329
|
]),
|
|
2330
2330
|
e("div", Cs, [
|
|
2331
|
-
e("div", As,
|
|
2332
|
-
(X = j.totalCost) != null && X.amount &&
|
|
2331
|
+
e("div", As, R(j.code), 1),
|
|
2332
|
+
(X = j.totalCost) != null && X.amount && w(d).enableTotalCost ? (v(), x("div", Ds, " (" + R(w(Fe)(j.totalCost)) + ") ", 1)) : H("", !0)
|
|
2333
2333
|
])
|
|
2334
2334
|
]);
|
|
2335
2335
|
}), 128)),
|
|
2336
|
-
+
|
|
2336
|
+
+w(be)(D.value) ? (v(), x(ae, { key: 0 }, [
|
|
2337
2337
|
e("div", qs, [
|
|
2338
2338
|
F(L)
|
|
2339
2339
|
]),
|
|
2340
2340
|
e("div", Ts, [
|
|
2341
2341
|
m[7] || (m[7] = e("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, "Total:", -1)),
|
|
2342
|
-
e("div", Ps, w(
|
|
2342
|
+
e("div", Ps, R(w(Fe)(D.value)), 1)
|
|
2343
2343
|
])
|
|
2344
2344
|
], 64)) : H("", !0)
|
|
2345
2345
|
])
|
|
2346
2346
|
])
|
|
2347
|
-
], 64)) : U.value.value === "deliveryHistory" ? (
|
|
2348
|
-
ye.value.length ? (
|
|
2349
|
-
(
|
|
2347
|
+
], 64)) : U.value.value === "deliveryHistory" ? (v(), x("div", Is, [
|
|
2348
|
+
ye.value.length ? (v(), x("div", Vs, [
|
|
2349
|
+
(v(!0), x(ae, null, he(ye.value, (j, V) => (v(), x(ae, { key: V }, [
|
|
2350
2350
|
e("div", Us, [
|
|
2351
2351
|
e("div", Ms, [
|
|
2352
2352
|
e("div", Ks, [
|
|
@@ -2374,8 +2374,8 @@ const Qt = { class: "flex flex-row-reverse" }, Xt = /* @__PURE__ */ Re({
|
|
|
2374
2374
|
])
|
|
2375
2375
|
]),
|
|
2376
2376
|
e("div", zs, [
|
|
2377
|
-
e("div", Gs,
|
|
2378
|
-
e("div", Hs,
|
|
2377
|
+
e("div", Gs, R(j.header), 1),
|
|
2378
|
+
e("div", Hs, R(j.date), 1)
|
|
2379
2379
|
])
|
|
2380
2380
|
]),
|
|
2381
2381
|
e("div", Ws, [
|
|
@@ -2399,19 +2399,19 @@ const Qt = { class: "flex flex-row-reverse" }, Xt = /* @__PURE__ */ Re({
|
|
|
2399
2399
|
}, {
|
|
2400
2400
|
default: se(() => [
|
|
2401
2401
|
e("div", Zs, [
|
|
2402
|
-
(
|
|
2402
|
+
(v(!0), x(ae, null, he(j.info, (X, me) => (v(), x("div", {
|
|
2403
2403
|
key: me,
|
|
2404
2404
|
class: "flex flex-col gap-4"
|
|
2405
2405
|
}, [
|
|
2406
|
-
e("div", Js,
|
|
2406
|
+
e("div", Js, R(X == null ? void 0 : X.label), 1),
|
|
2407
2407
|
e("div", eo, [
|
|
2408
|
-
(
|
|
2408
|
+
(v(!0), x(ae, null, he(X == null ? void 0 : X.values, (fe, Ie) => (v(), x("div", {
|
|
2409
2409
|
key: Ie,
|
|
2410
2410
|
class: "fm-typo-en-body-lg-600"
|
|
2411
2411
|
}, [
|
|
2412
|
-
typeof fe == "string" ? (
|
|
2413
|
-
Ne(
|
|
2414
|
-
], 64)) : (
|
|
2412
|
+
typeof fe == "string" ? (v(), x(ae, { key: 0 }, [
|
|
2413
|
+
Ne(R(fe), 1)
|
|
2414
|
+
], 64)) : (v(), ue(At(fe), { key: 1 }))
|
|
2415
2415
|
]))), 128))
|
|
2416
2416
|
])
|
|
2417
2417
|
]))), 128))
|
|
@@ -2422,16 +2422,16 @@ const Qt = { class: "flex flex-row-reverse" }, Xt = /* @__PURE__ */ Re({
|
|
|
2422
2422
|
])
|
|
2423
2423
|
])
|
|
2424
2424
|
], 64))), 128))
|
|
2425
|
-
])) : (
|
|
2425
|
+
])) : (v(), x("div", Fs, [
|
|
2426
2426
|
F(B),
|
|
2427
2427
|
e("div", null, [
|
|
2428
2428
|
e("img", {
|
|
2429
|
-
src:
|
|
2429
|
+
src: w(Ft),
|
|
2430
2430
|
alt: "List is empty"
|
|
2431
2431
|
}, null, 8, Ls)
|
|
2432
2432
|
]),
|
|
2433
|
-
e("div", Es, w(
|
|
2434
|
-
e("div", Bs, w(
|
|
2433
|
+
e("div", Es, R(w(y)("inventory.transfer.receiveRequest.details.noRecordsFound")), 1),
|
|
2434
|
+
e("div", Bs, R(w(y)("inventory.transfer.receiveRequest.details.trackDeliveryMessage")), 1),
|
|
2435
2435
|
F(B),
|
|
2436
2436
|
F(B)
|
|
2437
2437
|
]))
|
|
@@ -2441,39 +2441,39 @@ const Qt = { class: "flex flex-row-reverse" }, Xt = /* @__PURE__ */ Re({
|
|
|
2441
2441
|
}),
|
|
2442
2442
|
"side-sheet-footer": se(() => [
|
|
2443
2443
|
e("div", to, [
|
|
2444
|
-
(
|
|
2445
|
-
|
|
2444
|
+
(v(!0), x(ae, null, he(T.value, (Y) => (v(), x(ae, null, [
|
|
2445
|
+
w(We)[Y].available != !1 ? (v(), ue(Q, {
|
|
2446
2446
|
key: Y,
|
|
2447
|
-
label:
|
|
2447
|
+
label: w(y)(w(We)[Y].translationKey),
|
|
2448
2448
|
onClick: (ve) => de(Y),
|
|
2449
2449
|
loading: l.value === Y,
|
|
2450
2450
|
disabled: l.value !== Y && p.value,
|
|
2451
|
-
variant:
|
|
2451
|
+
variant: w(We)[Y].buttonVariant
|
|
2452
2452
|
}, null, 8, ["label", "onClick", "loading", "disabled", "variant"])) : H("", !0)
|
|
2453
2453
|
], 64))), 256)),
|
|
2454
|
-
S
|
|
2454
|
+
w(S).ableToMarkReceived(n.purchaseOrder) && !T.value.includes("completeReceive") ? (v(), ue(Q, {
|
|
2455
2455
|
key: 0,
|
|
2456
|
-
label:
|
|
2456
|
+
label: w(y)("inventory.transfer.receiveRequest.actions.completeReceive"),
|
|
2457
2457
|
onClick: m[1] || (m[1] = (Y) => de("completeReceive")),
|
|
2458
2458
|
loading: l.value === "completeReceive",
|
|
2459
2459
|
disabled: l.value !== "completeReceive" && p.value
|
|
2460
2460
|
}, null, 8, ["label", "loading", "disabled"])) : H("", !0),
|
|
2461
|
-
S
|
|
2461
|
+
w(S).ableToMarkApproved(n.purchaseOrder) && n.canApprove && !T.value.includes("approveRequest") ? (v(), ue(Q, {
|
|
2462
2462
|
key: 1,
|
|
2463
|
-
label:
|
|
2463
|
+
label: w(y)("inventory.transfer.approval.actions.approveRequest"),
|
|
2464
2464
|
onClick: m[2] || (m[2] = (Y) => de("approveRequest")),
|
|
2465
2465
|
loading: l.value === "approveRequest",
|
|
2466
2466
|
disabled: l.value !== "approveRequest" && p.value
|
|
2467
2467
|
}, null, 8, ["label", "loading", "disabled"])) : H("", !0),
|
|
2468
|
-
S
|
|
2468
|
+
w(S).ableToCreateFulfillment(n.purchaseOrder, n.poRequest) && s.scope === "approval" ? (v(), ue(Q, {
|
|
2469
2469
|
key: 2,
|
|
2470
|
-
label:
|
|
2470
|
+
label: w(y)("inventory.transfer.receiveRequest.actions.processRequest"),
|
|
2471
2471
|
onClick: m[3] || (m[3] = (Y) => de("processRequest")),
|
|
2472
2472
|
loading: l.value === "processRequest",
|
|
2473
2473
|
disabled: l.value !== "processRequest" && p.value
|
|
2474
2474
|
}, null, 8, ["label", "loading", "disabled"])) : H("", !0),
|
|
2475
2475
|
F(Q, {
|
|
2476
|
-
label:
|
|
2476
|
+
label: w(y)("common.close"),
|
|
2477
2477
|
variant: "tertiary",
|
|
2478
2478
|
onClick: m[4] || (m[4] = (Y) => _("update:show", !1))
|
|
2479
2479
|
}, null, 8, ["label"])
|