@feedmepos/mf-inventory-portal 1.0.10-dev.1 → 1.0.10-dev.3
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-B650rzJv.js → App-l4jzZz2B.js} +2 -2
- package/dist/{ApprovalView-H0w0Pbkj.js → ApprovalView-pI2KqhAM.js} +2 -2
- package/dist/{BindingsDialog-BTEnbuSr.js → BindingsDialog-B5NR3aUs.js} +2 -2
- package/dist/{BindingsPicker-DJVlBOBU.js → BindingsPicker-XEQd0P-O.js} +5 -5
- package/dist/{BindingsTable-BWsGdzSB.js → BindingsTable-joZoNmA-.js} +5 -5
- package/dist/{ClosingDraftView-AWcZjvya.js → ClosingDraftView-Czbf7PyV.js} +2 -2
- package/dist/{ClosingTemplateView-N2Ap8Ekd.js → ClosingTemplateView-Di4ooMUW.js} +2 -2
- package/dist/{DeliveryOrderPrintPreview-C5EPAWPK.js → DeliveryOrderPrintPreview-DrzLgjJs.js} +1 -1
- package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-DVfj4MgV.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-ina596Zt.js} +3 -3
- package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-wvRtPslo.js → FmUnitInput.vue_vue_type_script_setup_true_lang-DIqWc5Dd.js} +1 -1
- package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-DRygALNq.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-CWh_2Uxr.js} +1 -1
- package/dist/{IngredientGroupView-B_xMnLFQ.js → IngredientGroupView-CuIAGfZ0.js} +1 -1
- package/dist/{IngredientsView-DZxBsZI-.js → IngredientsView-BBbmdZw7.js} +4 -4
- package/dist/IntegrationView-jR-lVJFD.js +9612 -0
- package/dist/{InventoryBindingForm-DOCKvvbd.js → InventoryBindingForm-B4Y9qwh5.js} +1 -1
- package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-Bzfh5vhC.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-7mfrPICj.js} +18 -18
- package/dist/{InventoryBindingSummary-Bot16bHd.js → InventoryBindingSummary-De7unho4.js} +1 -1
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-Cq1W66FY.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-B6QlAKSW.js} +1 -1
- package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-CLkcV3TQ.js → PremiumBadge.vue_vue_type_script_setup_true_lang-CrSyRk_D.js} +1 -1
- package/dist/{PublishView-gf-pE1NP.js → PublishView-Dgk2MSw2.js} +2 -2
- package/dist/{PurchaseOrderPrintPreview-BB5aGGvb.js → PurchaseOrderPrintPreview-CNHaBzZN.js} +1 -1
- package/dist/{ReceiveRequestView-CR2Ive4l.js → ReceiveRequestView-BybKYygC.js} +9 -9
- package/dist/{RecipeView-Cr1h7m7C.js → RecipeView-14vPYYbY.js} +3 -3
- package/dist/{StockView-CbJu6pz1.js → StockView-yHYxCPrw.js} +7 -7
- package/dist/{SupplierView-DLnf0IXT.js → SupplierView-DGhFEzcI.js} +4 -4
- package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-9saG4V9_.js → TransferDetails.vue_vue_type_script_setup_true_lang-Cx0idoW5.js} +288 -291
- package/dist/{TransferTemplateView-Cwn20Rza.js → TransferTemplateView-D-wv8s6l.js} +7 -7
- package/dist/{UnitView-ir5d8Ls0.js → UnitView-3tR5QLsQ.js} +3 -3
- package/dist/{WarehouseView-BA0b8JDG.js → WarehouseView-CnijW-n9.js} +1 -1
- package/dist/api/netsuite.d.ts +188 -5
- package/dist/{app-DmpPc6HP.js → app-BHu45pdq.js} +2065 -2030
- package/dist/app.js +5 -5
- package/dist/{decimal-BdCdQEd5.js → decimal-4K1H5vq1.js} +1 -1
- package/dist/{feature-B_qG9zNF.js → feature-IimaQ0YM.js} +2 -2
- package/dist/{format-unit-display-y8ZPuai0.js → format-unit-display-ButdcliX.js} +2 -2
- package/dist/{index-rWHZ5j80.js → index-B7Ct1j-A.js} +2 -2
- package/dist/{index-BdbeTU14.js → index-DnOnkr3L.js} +1 -1
- package/dist/{stock-C05OFvav.js → stock-_PILi5j9.js} +1 -1
- package/dist/stores/integration/netsuite.d.ts +15 -0
- package/dist/{supplier-B58dle3W.js → supplier-iZkILTHb.js} +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{use-ingredient-select-dialog-CrfP3e6M.js → use-ingredient-select-dialog-CO6QUE9q.js} +1 -1
- package/dist/{use-inventory-binding-dialog-D0RpVsqZ.js → use-inventory-binding-dialog-Dfdizb-l.js} +1 -1
- package/dist/views/integration/components/netsuite/InventoryTransfer.vue.d.ts +48 -0
- package/dist/views/integration/components/netsuite/InventoryTransferIngredientTable.vue.d.ts +180 -0
- package/dist/views/integration/components/netsuite/NetSuiteSideSheet.vue.d.ts +24 -0
- package/dist/views/integration/components/netsuite/NetSuiteSideSheetProps.d.ts +8 -0
- package/dist/views/integration/components/netsuite/{LocationConfigurationDialog.vue.d.ts → business/BusinessNetSuiteSideSheet.vue.d.ts} +1 -1
- package/dist/views/integration/components/netsuite/{LocationConfigurationDialogProps.d.ts → business/BusinessNetSuiteSideSheetProps.d.ts} +1 -5
- package/dist/views/integration/components/netsuite/{NetSuiteLocationField.vue.d.ts → business/NetSuiteLocationField.vue.d.ts} +11 -9
- package/dist/{vue-i18n-Dt--gl9w.js → vue-i18n-mlupysSx.js} +411 -411
- package/package.json +6 -5
- package/dist/IntegrationView-p63ruxVJ.js +0 -2149
- /package/dist/views/integration/components/netsuite/{AddLocationDialog.vue.d.ts → business/AddLocationDialog.vue.d.ts} +0 -0
|
@@ -1,67 +1,67 @@
|
|
|
1
|
-
import { X as it, u as ue, aH as N, b as Ue, a2 as ut, a4 as dt, a5 as mt, aI as ft, d as We, e as tt, V as rt, aJ as pt, Z as Fe, K as Oe, i as oe, aK as st, a9 as ke, f as Xe, h as K, D as Z, aq as se, a3 as yt, an as Je, a1 as xe, aL as vt, ae as
|
|
2
|
-
import { ref as V, computed as z, h as q, defineComponent as De, onMounted as at, unref as p, openBlock as w, createElementBlock as D, createElementVNode as
|
|
3
|
-
import { F as St } from "./decimal-
|
|
4
|
-
import { b as xt, u as Rt, f as nt, P as ve } from "./format-unit-display-
|
|
1
|
+
import { X as it, u as ue, aH as N, b as Ue, a2 as ut, a4 as dt, a5 as mt, aI as ft, d as We, e as tt, V as rt, aJ as pt, Z as Fe, K as Oe, i as oe, aK as st, a9 as ke, f as Xe, h as K, D as Z, aq as se, a3 as yt, an as Je, a1 as xe, aL as vt, ae as Te, ar as ht } from "./app-BHu45pdq.js";
|
|
2
|
+
import { ref as V, computed as z, h as q, defineComponent as De, onMounted as at, unref as p, openBlock as w, createElementBlock as D, createElementVNode as a, toDisplayString as R, createCommentVNode as L, resolveComponent as H, createVNode as E, reactive as bt, createBlock as le, withCtx as ie, watch as gt, isRef as _t, Fragment as te, normalizeClass as Re, createTextVNode as $e, renderList as pe, resolveDynamicComponent as wt } from "vue";
|
|
3
|
+
import { F as St } from "./decimal-4K1H5vq1.js";
|
|
4
|
+
import { b as xt, u as Rt, f as nt, P as ve } from "./format-unit-display-ButdcliX.js";
|
|
5
5
|
import { useCoreStore as Le, useI18n as ot } from "@feedmepos/mf-common";
|
|
6
6
|
import { E as Ot } from "./empty-placeholder-wf6-BWE8.js";
|
|
7
7
|
import { useDialog as Ve, useSnackbar as Me, components as Ze, FmButtonVariant as re, useProxiedModel as kt } from "@feedmepos/ui-library";
|
|
8
|
-
import { u as je, F as Ce } from "./feature-
|
|
9
|
-
import { u as Dt } from "./index-
|
|
10
|
-
import { _ as Nt, F as qt, a as At } from "./FmUnitInput.vue_vue_type_script_setup_true_lang-
|
|
8
|
+
import { u as je, F as Ce } from "./feature-IimaQ0YM.js";
|
|
9
|
+
import { u as Dt } from "./index-B7Ct1j-A.js";
|
|
10
|
+
import { _ as Nt, F as qt, a as At } from "./FmUnitInput.vue_vue_type_script_setup_true_lang-DIqWc5Dd.js";
|
|
11
11
|
const Ne = it((t, l) => {
|
|
12
12
|
const n = ue(), h = Le();
|
|
13
13
|
return {
|
|
14
|
-
async readRequests(i,
|
|
15
|
-
const
|
|
14
|
+
async readRequests(i, r = !1) {
|
|
15
|
+
const m = i ?? n.currentLocationDBName, y = `${t.inventoryBackendUrl}/${m}/purchase-request?${r ? "includeReturnRequest=true" : ""}`;
|
|
16
16
|
return await l.get(y);
|
|
17
17
|
},
|
|
18
|
-
async readRequestById(i,
|
|
19
|
-
const
|
|
18
|
+
async readRequestById(i, r) {
|
|
19
|
+
const m = r ?? n.currentLocationDBName, y = `${t.inventoryBackendUrl}/${m}/purchase-request/${i}`;
|
|
20
20
|
return await l.get(y);
|
|
21
21
|
},
|
|
22
|
-
async readRequestByIds(i,
|
|
23
|
-
const
|
|
22
|
+
async readRequestByIds(i, r) {
|
|
23
|
+
const m = r ?? n.currentLocationDBName, y = `${t.inventoryBackendUrl}/${m}/purchase-request/find`;
|
|
24
24
|
return await l.post(y, { requestIds: i });
|
|
25
25
|
},
|
|
26
26
|
async getPurchaseOrders({
|
|
27
27
|
start: i,
|
|
28
|
-
end:
|
|
28
|
+
end: r
|
|
29
29
|
}) {
|
|
30
|
-
const
|
|
31
|
-
return await l.get(`${y}?start=${i}&end=${
|
|
30
|
+
const m = n.currentLocationDBName, y = `${t.inventoryBackendUrl}/${m}/purchase-order`;
|
|
31
|
+
return await l.get(`${y}?start=${i}&end=${r}`);
|
|
32
32
|
},
|
|
33
33
|
async getLatestPurchaseOrderRequest(i) {
|
|
34
|
-
const
|
|
35
|
-
return await l.get(`${
|
|
34
|
+
const r = n.currentLocationDBName, m = `${t.inventoryBackendUrl}/${r}/purchase-request/find-by-purchase-order-id`;
|
|
35
|
+
return await l.get(`${m}/${i}`);
|
|
36
36
|
},
|
|
37
37
|
async getPurchaseOrderById(i) {
|
|
38
|
-
const
|
|
39
|
-
return await l.get(`${
|
|
38
|
+
const r = n.currentLocationDBName, m = `${t.inventoryBackendUrl}/${r}/purchase-order`;
|
|
39
|
+
return await l.get(`${m}/${i}`);
|
|
40
40
|
},
|
|
41
|
-
async processPurchaseOrder(i,
|
|
42
|
-
const
|
|
41
|
+
async processPurchaseOrder(i, r) {
|
|
42
|
+
const m = n.currentLocationDBName, y = r || m, o = `${t.inventoryBackendUrl}/${y}/purchase-order/run-operation`;
|
|
43
43
|
return await l.put(o, i);
|
|
44
44
|
},
|
|
45
|
-
async processPurchaseOrderV2(i,
|
|
46
|
-
const
|
|
45
|
+
async processPurchaseOrderV2(i, r) {
|
|
46
|
+
const m = n.currentLocationDBName, y = r || m, o = `${t.inventoryBackendUrl}/${y}/v2/purchase-order/run-operation`;
|
|
47
47
|
return await l.put(o, i);
|
|
48
48
|
},
|
|
49
49
|
async createPurchaseOrder(i) {
|
|
50
|
-
const
|
|
51
|
-
return await l.post(
|
|
50
|
+
const r = n.currentLocationDBName, m = `${t.inventoryBackendUrl}/${r}/purchase-order`;
|
|
51
|
+
return await l.post(m, i);
|
|
52
52
|
},
|
|
53
53
|
async updatePurchaseOrder(i) {
|
|
54
|
-
const
|
|
55
|
-
return await l.put(
|
|
54
|
+
const r = n.currentLocationDBName, m = `${t.inventoryBackendUrl}/${r}/purchase-order`;
|
|
55
|
+
return await l.put(m, i);
|
|
56
56
|
},
|
|
57
57
|
async importFromXilnex(i) {
|
|
58
|
-
const
|
|
59
|
-
return await l.post(
|
|
58
|
+
const r = n.currentLocationDBName, m = `${t.inventoryBackendUrl}/${r}/purchase-order/import-from-xilnex`;
|
|
59
|
+
return await l.post(m, i);
|
|
60
60
|
},
|
|
61
61
|
async getWorkflowConfig() {
|
|
62
62
|
var y;
|
|
63
|
-
const
|
|
64
|
-
return await l.get(
|
|
63
|
+
const r = `business_${(y = h.currentBusiness.value) == null ? void 0 : y._id}`, m = `${t.inventoryBackendUrl}/${r}/purchase-order/import-from-xilnex`;
|
|
64
|
+
return await l.get(m);
|
|
65
65
|
}
|
|
66
66
|
};
|
|
67
67
|
}), ct = {
|
|
@@ -124,23 +124,23 @@ const Ne = it((t, l) => {
|
|
|
124
124
|
};
|
|
125
125
|
function lt() {
|
|
126
126
|
const t = ue(), l = Ne(), n = je();
|
|
127
|
-
async function h(
|
|
127
|
+
async function h(r, m) {
|
|
128
128
|
const y = t.currentLocationDBName;
|
|
129
|
-
return
|
|
129
|
+
return r.doc.supplier.internal && r.operation === N.enum.confirmDraft && (r.operation = N.enum.submitRequest), await l.processPurchaseOrder(r, m || y);
|
|
130
130
|
}
|
|
131
|
-
async function i(
|
|
131
|
+
async function i(r, m) {
|
|
132
132
|
const y = t.currentLocationDBName;
|
|
133
|
-
return await l.processPurchaseOrderV2(
|
|
133
|
+
return await l.processPurchaseOrderV2(r, m || y);
|
|
134
134
|
}
|
|
135
|
-
return (
|
|
135
|
+
return (r) => n.useOperatePurchaseOrderV2 ? i(r.operateV2, r.transferTo) : h(r.operate, r.transferTo);
|
|
136
136
|
}
|
|
137
137
|
var Ee = /* @__PURE__ */ ((t) => (t.RECEIVE_REQUEST = "receive/request", t.APPROVAL = "approval", t))(Ee || {});
|
|
138
138
|
const we = V(), Ie = V();
|
|
139
139
|
function Rs(t, l) {
|
|
140
|
-
const n = Ve(), h = ue(), i = je(),
|
|
140
|
+
const n = Ve(), h = ue(), i = je(), r = Ue(), m = xt(), y = Rt(), o = V(!1), v = Me(), d = Ne(), f = V(new Array()), s = V(
|
|
141
141
|
l != null && l.startDate && (l != null && l.endDate) ? l : ut()
|
|
142
142
|
), b = z(() => {
|
|
143
|
-
const g = new Date(
|
|
143
|
+
const g = new Date(s.value.startDate), k = new Date(s.value.endDate);
|
|
144
144
|
return {
|
|
145
145
|
start: dt(g).toISOString(),
|
|
146
146
|
end: mt(k).toISOString()
|
|
@@ -174,7 +174,7 @@ function Rs(t, l) {
|
|
|
174
174
|
close: !0
|
|
175
175
|
}
|
|
176
176
|
}).onPrimary(async () => {
|
|
177
|
-
e = await
|
|
177
|
+
e = await m.getTemplateId(), e && k(e);
|
|
178
178
|
}).onSecondary(() => {
|
|
179
179
|
k(void 0);
|
|
180
180
|
}) : k(e);
|
|
@@ -194,14 +194,14 @@ function Rs(t, l) {
|
|
|
194
194
|
async function W() {
|
|
195
195
|
f.value = [], o.value = !0;
|
|
196
196
|
try {
|
|
197
|
-
f.value = await
|
|
197
|
+
f.value = await d.getPurchaseOrders(b.value).then((c) => c.sort((_, S) => S._id.localeCompare(_._id)));
|
|
198
198
|
const g = await O.readCurrentLocationLastClosing(!0), k = g == null ? void 0 : g._id;
|
|
199
199
|
k && (A.value = pt(k)), i.mustUsePoTemplate && await y.fetchTemplates();
|
|
200
200
|
const e = f.value.map((c) => {
|
|
201
201
|
var _;
|
|
202
202
|
return ((_ = c.request) == null ? void 0 : _.id) ?? "";
|
|
203
203
|
}).filter((c) => c);
|
|
204
|
-
x.value = await
|
|
204
|
+
x.value = await d.readRequestByIds(e);
|
|
205
205
|
} catch {
|
|
206
206
|
v.open({
|
|
207
207
|
title: "Something went wrong",
|
|
@@ -215,7 +215,7 @@ function Rs(t, l) {
|
|
|
215
215
|
async function de() {
|
|
216
216
|
x.value = [], o.value = !0;
|
|
217
217
|
try {
|
|
218
|
-
x.value = await
|
|
218
|
+
x.value = await d.readRequests(void 0, r.isEnabled).then((g) => g.reverse());
|
|
219
219
|
} catch {
|
|
220
220
|
v.open({
|
|
221
221
|
title: "Something went wrong",
|
|
@@ -235,7 +235,7 @@ function Rs(t, l) {
|
|
|
235
235
|
}
|
|
236
236
|
}
|
|
237
237
|
function ae(g, k) {
|
|
238
|
-
|
|
238
|
+
s.value = {
|
|
239
239
|
startDate: g,
|
|
240
240
|
endDate: k
|
|
241
241
|
}, X();
|
|
@@ -330,7 +330,7 @@ function Rs(t, l) {
|
|
|
330
330
|
he(g, k, _, e);
|
|
331
331
|
});
|
|
332
332
|
}
|
|
333
|
-
async function
|
|
333
|
+
async function Pe() {
|
|
334
334
|
n.open({
|
|
335
335
|
title: "Upload Transfer",
|
|
336
336
|
primaryActions: {
|
|
@@ -364,28 +364,28 @@ function Rs(t, l) {
|
|
|
364
364
|
promptShowTransferDetails: qe,
|
|
365
365
|
submitAction: Ae,
|
|
366
366
|
xilnexImportDialogProps: Ie,
|
|
367
|
-
promptUploadTransferDialog:
|
|
367
|
+
promptUploadTransferDialog: Pe
|
|
368
368
|
};
|
|
369
369
|
}
|
|
370
|
-
function
|
|
370
|
+
function Pt(t, l) {
|
|
371
371
|
return l.reduce(
|
|
372
372
|
(h, i) => {
|
|
373
|
-
const
|
|
374
|
-
return
|
|
373
|
+
const r = i.received.find((m) => m.sku._id === t._id);
|
|
374
|
+
return r && (h = Fe(h, r.amount)), h;
|
|
375
375
|
},
|
|
376
376
|
St.toPrecision(Oe(0), t.unit.precision)
|
|
377
377
|
);
|
|
378
378
|
}
|
|
379
|
-
function
|
|
380
|
-
const { name: i, address:
|
|
379
|
+
function Tt(t, l, n, h) {
|
|
380
|
+
const { name: i, address: r, regNo: m } = l.doc.profile, y = {
|
|
381
381
|
name: i,
|
|
382
|
-
registrationNumber:
|
|
383
|
-
line1:
|
|
384
|
-
line2:
|
|
385
|
-
postcode:
|
|
386
|
-
city:
|
|
387
|
-
state:
|
|
388
|
-
country:
|
|
382
|
+
registrationNumber: m,
|
|
383
|
+
line1: r == null ? void 0 : r.line1,
|
|
384
|
+
line2: r == null ? void 0 : r.line2,
|
|
385
|
+
postcode: r == null ? void 0 : r.postcode,
|
|
386
|
+
city: r == null ? void 0 : r.city,
|
|
387
|
+
state: r == null ? void 0 : r.state,
|
|
388
|
+
country: r == null ? void 0 : r.country
|
|
389
389
|
}, o = {
|
|
390
390
|
name: t.supplier.name,
|
|
391
391
|
phoneNumber: t.supplier.phoneNumber,
|
|
@@ -398,7 +398,7 @@ function Pt(t, l, n, h) {
|
|
|
398
398
|
country: t.supplier.address.country
|
|
399
399
|
}, v = t.items.map((x) => {
|
|
400
400
|
const { sku: O, measurement: A } = x, I = oe(
|
|
401
|
-
|
|
401
|
+
Pt(x.sku, t.deliveryOrder || []),
|
|
402
402
|
!1
|
|
403
403
|
);
|
|
404
404
|
return {
|
|
@@ -408,7 +408,7 @@ function Pt(t, l, n, h) {
|
|
|
408
408
|
unit: (A == null ? void 0 : A.abbrev) || O.unit.abbrev,
|
|
409
409
|
received: I
|
|
410
410
|
};
|
|
411
|
-
}),
|
|
411
|
+
}), d = t.deliveryOrder.map((x) => ({
|
|
412
412
|
createdAt: st(new Date(x.createdAt)),
|
|
413
413
|
ref: x.deliveryOrderNumber,
|
|
414
414
|
remark: x.remark || "",
|
|
@@ -432,9 +432,9 @@ function Pt(t, l, n, h) {
|
|
|
432
432
|
supplier: o,
|
|
433
433
|
items: v,
|
|
434
434
|
status: t.status,
|
|
435
|
-
deliveryOrders:
|
|
436
|
-
},
|
|
437
|
-
|
|
435
|
+
deliveryOrders: d
|
|
436
|
+
}, s = new URL(window.location.href), b = h && (t.deliveryFullfillment || []).length > 0 ? "receive-request/delivery-print-preview" : "receive-request/print-preview";
|
|
437
|
+
s.pathname = s.hostname.includes("portal.feedme") ? `/inventory/${b}` : `/${b}`, s.searchParams.append("data", JSON.stringify(f)), window.open(s.href, "_blank", "noreferrer");
|
|
438
438
|
}
|
|
439
439
|
const ye = {
|
|
440
440
|
submitRequest: {
|
|
@@ -493,13 +493,13 @@ const ye = {
|
|
|
493
493
|
function Os(t, l) {
|
|
494
494
|
ue();
|
|
495
495
|
const n = Le(), { t: h } = ot();
|
|
496
|
-
function i(
|
|
497
|
-
switch (
|
|
496
|
+
function i(d) {
|
|
497
|
+
switch (d.status) {
|
|
498
498
|
case "DRAFT":
|
|
499
499
|
return [
|
|
500
500
|
Z[K.Update],
|
|
501
501
|
Z[K.Details],
|
|
502
|
-
|
|
502
|
+
d.supplier.internal === "restaurant" || d.supplier.internal === "warehouse" ? ye[N.enum.submitRequest] : ye[N.enum.confirmDraft],
|
|
503
503
|
ye[N.enum.cancelDraft]
|
|
504
504
|
];
|
|
505
505
|
case "RECEIVING":
|
|
@@ -523,14 +523,14 @@ function Os(t, l) {
|
|
|
523
523
|
return [Z[K.Details], Z[K.Print]];
|
|
524
524
|
}
|
|
525
525
|
}
|
|
526
|
-
function
|
|
527
|
-
return Object.values(N.enum).includes(
|
|
526
|
+
function r(d) {
|
|
527
|
+
return Object.values(N.enum).includes(d);
|
|
528
528
|
}
|
|
529
|
-
async function d
|
|
529
|
+
async function m(d, f, s) {
|
|
530
530
|
var x, O, A, I;
|
|
531
531
|
const b = tt(f);
|
|
532
|
-
if (
|
|
533
|
-
const Y = (
|
|
532
|
+
if (d === K.Print) {
|
|
533
|
+
const Y = (s == null ? void 0 : s.toInventoryLocation) ?? {
|
|
534
534
|
name: "",
|
|
535
535
|
type: "restaurant",
|
|
536
536
|
acceptRequest: !0,
|
|
@@ -541,19 +541,19 @@ function Os(t, l) {
|
|
|
541
541
|
profile: {}
|
|
542
542
|
}
|
|
543
543
|
};
|
|
544
|
-
b.ref = [((x =
|
|
544
|
+
b.ref = [((x = s == null ? void 0 : s.netSuite) == null ? void 0 : x.refNo) || ((O = b.netSuite) == null ? void 0 : O.refNo)].filter((W) => W).join(" "), Tt(b, Y, n.currentBusiness.value, t === "approval");
|
|
545
545
|
return;
|
|
546
546
|
}
|
|
547
|
-
if (
|
|
548
|
-
l.promptShowTransferDetails(b,
|
|
547
|
+
if (d === K.Details) {
|
|
548
|
+
l.promptShowTransferDetails(b, s);
|
|
549
549
|
return;
|
|
550
550
|
}
|
|
551
|
-
if (
|
|
551
|
+
if (d === K.Update) {
|
|
552
552
|
(A = l.promptUpdateTransferDialog) == null || A.call(l, b);
|
|
553
553
|
return;
|
|
554
554
|
}
|
|
555
|
-
if (
|
|
556
|
-
l.submitAction(f,
|
|
555
|
+
if (r(d)) {
|
|
556
|
+
l.submitAction(f, d, (I = s == null ? void 0 : s.to) == null ? void 0 : I.dbName);
|
|
557
557
|
return;
|
|
558
558
|
}
|
|
559
559
|
}
|
|
@@ -569,8 +569,8 @@ function Os(t, l) {
|
|
|
569
569
|
{
|
|
570
570
|
accessorKey: "_id",
|
|
571
571
|
header: () => h("inventory.transfer.table.createdAt"),
|
|
572
|
-
cell(
|
|
573
|
-
return ke(`${
|
|
572
|
+
cell(d) {
|
|
573
|
+
return ke(`${d.getValue()}`);
|
|
574
574
|
},
|
|
575
575
|
enableSorting: !0
|
|
576
576
|
},
|
|
@@ -597,8 +597,8 @@ function Os(t, l) {
|
|
|
597
597
|
{
|
|
598
598
|
accessorKey: "status",
|
|
599
599
|
header: () => h("inventory.transfer.table.status"),
|
|
600
|
-
cell(
|
|
601
|
-
const f = h(`inventory.transfer.status.${
|
|
600
|
+
cell(d) {
|
|
601
|
+
const f = h(`inventory.transfer.status.${d.getValue() ?? ""}`), s = `${d.getValue() ?? ""}`.toLocaleLowerCase("en-us");
|
|
602
602
|
return q(
|
|
603
603
|
"div",
|
|
604
604
|
{
|
|
@@ -607,7 +607,7 @@ function Os(t, l) {
|
|
|
607
607
|
q(
|
|
608
608
|
"div",
|
|
609
609
|
{
|
|
610
|
-
class: `fm-status-badge fm-status-badge-${
|
|
610
|
+
class: `fm-status-badge fm-status-badge-${s}`
|
|
611
611
|
},
|
|
612
612
|
f
|
|
613
613
|
)
|
|
@@ -618,9 +618,9 @@ function Os(t, l) {
|
|
|
618
618
|
},
|
|
619
619
|
{
|
|
620
620
|
id: "action",
|
|
621
|
-
cell(
|
|
622
|
-
const f =
|
|
623
|
-
return Xe(
|
|
621
|
+
cell(d) {
|
|
622
|
+
const f = d.row.original, s = i(f);
|
|
623
|
+
return Xe(s, (b) => m(b, f));
|
|
624
624
|
},
|
|
625
625
|
enableSorting: !1,
|
|
626
626
|
size: 40,
|
|
@@ -643,8 +643,8 @@ function Os(t, l) {
|
|
|
643
643
|
{
|
|
644
644
|
accessorKey: "purchaseOrder._id",
|
|
645
645
|
header: () => h("inventory.transfer.table.createdAt"),
|
|
646
|
-
cell(
|
|
647
|
-
return ke(`${
|
|
646
|
+
cell(d) {
|
|
647
|
+
return ke(`${d.getValue()}`);
|
|
648
648
|
},
|
|
649
649
|
enableSorting: !0
|
|
650
650
|
},
|
|
@@ -668,8 +668,8 @@ function Os(t, l) {
|
|
|
668
668
|
{
|
|
669
669
|
accessorKey: "purchaseOrder.status",
|
|
670
670
|
header: () => h("inventory.transfer.table.status"),
|
|
671
|
-
cell(
|
|
672
|
-
const f = h(`inventory.transfer.status.${
|
|
671
|
+
cell(d) {
|
|
672
|
+
const f = h(`inventory.transfer.status.${d.getValue() ?? ""}`), s = `${d.getValue() ?? ""}`.toLocaleLowerCase("en-us");
|
|
673
673
|
return q(
|
|
674
674
|
"div",
|
|
675
675
|
{
|
|
@@ -678,7 +678,7 @@ function Os(t, l) {
|
|
|
678
678
|
q(
|
|
679
679
|
"div",
|
|
680
680
|
{
|
|
681
|
-
class: `fm-status-badge fm-status-badge-${
|
|
681
|
+
class: `fm-status-badge fm-status-badge-${s}`
|
|
682
682
|
},
|
|
683
683
|
f
|
|
684
684
|
)
|
|
@@ -688,14 +688,14 @@ function Os(t, l) {
|
|
|
688
688
|
},
|
|
689
689
|
{
|
|
690
690
|
id: "action",
|
|
691
|
-
cell(
|
|
692
|
-
const f =
|
|
691
|
+
cell(d) {
|
|
692
|
+
const f = d.row.original, b = (f.purchaseOrder ? i(f.purchaseOrder) : []).map((x) => x.value === K.Print ? {
|
|
693
693
|
...x,
|
|
694
694
|
translationKey: "inventory.transfer.receiveRequest.details.printDeliveryOrder"
|
|
695
695
|
} : x);
|
|
696
696
|
return Xe(
|
|
697
697
|
b,
|
|
698
|
-
(x) => f.purchaseOrder ?
|
|
698
|
+
(x) => f.purchaseOrder ? m(x, f.purchaseOrder, f) : void 0
|
|
699
699
|
);
|
|
700
700
|
},
|
|
701
701
|
enableSorting: !1,
|
|
@@ -748,49 +748,49 @@ const $t = {
|
|
|
748
748
|
i.value = v;
|
|
749
749
|
}
|
|
750
750
|
});
|
|
751
|
-
const
|
|
751
|
+
const r = z(
|
|
752
752
|
() => {
|
|
753
|
-
var o, v,
|
|
753
|
+
var o, v, d, f, s, b;
|
|
754
754
|
return n.getSubsidiaryFullName(
|
|
755
|
-
((
|
|
755
|
+
((d = (v = (o = l.purchaseOrder) == null ? void 0 : o.netSuite) == null ? void 0 : v.subsidiary) == null ? void 0 : d.id) || ((b = (s = (f = l.poRequest) == null ? void 0 : f.netSuite) == null ? void 0 : s.subsidiary) == null ? void 0 : b.id)
|
|
756
756
|
).fullName;
|
|
757
757
|
}
|
|
758
|
-
),
|
|
759
|
-
var o, v,
|
|
760
|
-
return (
|
|
758
|
+
), m = z(() => {
|
|
759
|
+
var o, v, d, f, s, b, x, O, A, I, Y, W;
|
|
760
|
+
return (d = (v = (o = l.purchaseOrder) == null ? void 0 : o.netSuite) == null ? void 0 : v.additionalInfo) != null && d.transactionnumber ? (b = (s = (f = l.purchaseOrder) == null ? void 0 : f.netSuite) == null ? void 0 : s.additionalInfo) == null ? void 0 : b.transactionnumber : (A = (O = (x = i.value) == null ? void 0 : x.netSuite) == null ? void 0 : O.additionalInfo) != null && A.transactionnumber ? (W = (Y = (I = i.value) == null ? void 0 : I.netSuite) == null ? void 0 : Y.additionalInfo) == null ? void 0 : W.transactionnumber : null;
|
|
761
761
|
}), y = z(() => {
|
|
762
|
-
var o, v,
|
|
763
|
-
return (v = (o = l.purchaseOrder) == null ? void 0 : o.deliveryFullfillment) != null && v.length && ((f = (
|
|
762
|
+
var o, v, d, f, s, b;
|
|
763
|
+
return (v = (o = l.purchaseOrder) == null ? void 0 : o.deliveryFullfillment) != null && v.length && ((f = (d = l.purchaseOrder) == null ? void 0 : d.deliveryFullfillment) == null ? void 0 : f.length) > 0 ? (b = (s = l.purchaseOrder) == null ? void 0 : s.deliveryFullfillment) == null ? void 0 : b.map((x) => {
|
|
764
764
|
var O;
|
|
765
765
|
return (O = x.netSuite) == null ? void 0 : O.refNo;
|
|
766
766
|
}).join(", ") : "N/A";
|
|
767
767
|
});
|
|
768
768
|
return (o, v) => {
|
|
769
|
-
var
|
|
769
|
+
var d, f, s, b, x, O, A, I, Y, W, de, X, ae, ee;
|
|
770
770
|
return p(n).isEnabled ? (w(), D("div", $t, [
|
|
771
|
-
|
|
772
|
-
v[0] || (v[0] =
|
|
773
|
-
|
|
771
|
+
a("div", Ct, [
|
|
772
|
+
v[0] || (v[0] = a("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, "NetSuite subsidiary", -1)),
|
|
773
|
+
a("div", It, R(r.value || "N/A"), 1)
|
|
774
774
|
]),
|
|
775
|
-
!o.isTransferBetweenOutlets && ((
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
(
|
|
775
|
+
!o.isTransferBetweenOutlets && ((d = o.purchaseOrder) == null ? void 0 : d.status) !== p(se).Enum.REQUESTING && o.scope === p(Ee).RECEIVE_REQUEST ? (w(), D("div", Ft, [
|
|
776
|
+
a("div", Et, " NetSuite " + R(o.transferType === p(ve).PURCHASE ? "Purchase Order" : "Transfer Order") + " (ID) ", 1),
|
|
777
|
+
a("div", Bt, [
|
|
778
|
+
(s = (f = o.purchaseOrder) == null ? void 0 : f.netSuite) != null && s.id ? (w(), D("span", Ut, R((x = (b = o.purchaseOrder) == null ? void 0 : b.netSuite) == null ? void 0 : x.refNo) + " (" + R((A = (O = o.purchaseOrder) == null ? void 0 : O.netSuite) == null ? void 0 : A.id) + ") ", 1)) : (w(), D("span", Lt, "N/A"))
|
|
779
779
|
])
|
|
780
780
|
])) : L("", !0),
|
|
781
781
|
!o.isTransferBetweenOutlets && i.value && ((I = o.purchaseOrder) == null ? void 0 : I.status) === p(se).Enum.REQUESTING || o.scope === p(Ee).APPROVAL ? (w(), D("div", Vt, [
|
|
782
|
-
|
|
783
|
-
|
|
782
|
+
a("div", Mt, " (Request) NetSuite " + R(o.transferType === p(ve).PURCHASE ? "Purchase Order" : "Transfer Order") + " (ID) ", 1),
|
|
783
|
+
a("div", jt, [
|
|
784
784
|
(W = (Y = i.value) == null ? void 0 : Y.netSuite) != null && W.id ? (w(), D("span", Kt, R((X = (de = i.value) == null ? void 0 : de.netSuite) == null ? void 0 : X.refNo) + " (" + R((ee = (ae = i.value) == null ? void 0 : ae.netSuite) == null ? void 0 : ee.id) + ") ", 1)) : (w(), D("span", zt, "N/A"))
|
|
785
785
|
])
|
|
786
786
|
])) : L("", !0),
|
|
787
|
-
|
|
788
|
-
v[1] || (v[1] =
|
|
789
|
-
|
|
787
|
+
m.value ? (w(), D("div", Gt, [
|
|
788
|
+
v[1] || (v[1] = a("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " NetSuite Transaction Number ", -1)),
|
|
789
|
+
a("div", Ht, R(m.value), 1)
|
|
790
790
|
])) : L("", !0),
|
|
791
791
|
p(n).isEnabled && o.transferType === p(ve).TRANSFER && !o.isTransferBetweenOutlets ? (w(), D("div", Qt, [
|
|
792
|
-
v[2] || (v[2] =
|
|
793
|
-
|
|
792
|
+
v[2] || (v[2] = a("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " NetSuite fulfillment IDs ", -1)),
|
|
793
|
+
a("div", Yt, R(y.value), 1)
|
|
794
794
|
])) : L("", !0)
|
|
795
795
|
])) : L("", !0);
|
|
796
796
|
};
|
|
@@ -803,16 +803,16 @@ const $t = {
|
|
|
803
803
|
isTransferBetweenOutlets: { type: Boolean }
|
|
804
804
|
},
|
|
805
805
|
setup(t) {
|
|
806
|
-
const l = t, n = Ue(), h = Me(), i = Ve(),
|
|
806
|
+
const l = t, n = Ue(), h = Me(), i = Ve(), r = V(!1);
|
|
807
807
|
z(() => {
|
|
808
|
-
var
|
|
808
|
+
var d, f, s, b;
|
|
809
809
|
let y = !0;
|
|
810
810
|
n.isEnabled || (y = !1);
|
|
811
811
|
const o = l.purchaseOrder, v = l.poRequest;
|
|
812
|
-
return o && ((
|
|
812
|
+
return o && ((d = o == null ? void 0 : o.supplier) != null && d.internal ? (!v && o.status == se.enum.DRAFT && (y = !1), v && !((f = v == null ? void 0 : v.netSuite) != null && f.id) && (y = !1), l.isTransferBetweenOutlets && (y = !1)) : ((o == null ? void 0 : o.status) !== se.enum.REQUESTING && o.supplier.internal && (y = !1), !v && !((s = o == null ? void 0 : o.netSuite) != null && s.id) && (y = !1), !v && ((b = o == null ? void 0 : o.netSuite) != null && b.id) && (o == null ? void 0 : o.status) == se.enum.REQUESTING && (y = !1))), y;
|
|
813
813
|
});
|
|
814
|
-
async function
|
|
815
|
-
|
|
814
|
+
async function m() {
|
|
815
|
+
r.value || i.open({
|
|
816
816
|
title: "Sync with NetSuite",
|
|
817
817
|
contentComponent: q("div", [
|
|
818
818
|
q("p", "Are you sure you want to sync now?"),
|
|
@@ -832,23 +832,20 @@ const $t = {
|
|
|
832
832
|
}).onPrimary(async () => {
|
|
833
833
|
var y, o;
|
|
834
834
|
try {
|
|
835
|
-
|
|
835
|
+
r.value = !0;
|
|
836
836
|
const v = ((y = l.purchaseOrder) == null ? void 0 : y._id) || ((o = l.poRequest) == null ? void 0 : o.purchaseOrderId) || "";
|
|
837
837
|
await n.syncPurchaseOrder(v), h.open({
|
|
838
838
|
title: "Sync with NetSuite",
|
|
839
839
|
message: "Requested to sync with NetSuite. Please wait a moment.",
|
|
840
840
|
type: "success"
|
|
841
|
-
});
|
|
841
|
+
}), await new Promise((d) => setTimeout(d, 5e3)), r.value = !1;
|
|
842
842
|
} catch {
|
|
843
843
|
h.open({
|
|
844
844
|
title: "Error",
|
|
845
845
|
message: "Failed to sync with NetSuite",
|
|
846
846
|
type: "error"
|
|
847
|
-
});
|
|
847
|
+
}), r.value = !1;
|
|
848
848
|
}
|
|
849
|
-
setTimeout(() => {
|
|
850
|
-
a.value = !1;
|
|
851
|
-
}, 5e3);
|
|
852
849
|
});
|
|
853
850
|
}
|
|
854
851
|
return (y, o) => {
|
|
@@ -858,8 +855,8 @@ const $t = {
|
|
|
858
855
|
"prepend-icon": "sync",
|
|
859
856
|
variant: "secondary",
|
|
860
857
|
label: "Sync",
|
|
861
|
-
loading:
|
|
862
|
-
onClick:
|
|
858
|
+
loading: r.value,
|
|
859
|
+
onClick: m,
|
|
863
860
|
"text-color": "primary",
|
|
864
861
|
"bg-color": "transparent",
|
|
865
862
|
"border-color": "primary"
|
|
@@ -879,17 +876,17 @@ const $t = {
|
|
|
879
876
|
id: "",
|
|
880
877
|
createdAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
881
878
|
items: []
|
|
882
|
-
}), i = V(),
|
|
879
|
+
}), i = V(), r = l;
|
|
883
880
|
return at(() => {
|
|
884
|
-
n.purchaseOrder && (console.log("props", n.purchaseOrder), h.items = n.purchaseOrder.items.map((
|
|
885
|
-
id:
|
|
886
|
-
sku:
|
|
887
|
-
measurement:
|
|
888
|
-
amount:
|
|
881
|
+
n.purchaseOrder && (console.log("props", n.purchaseOrder), h.items = n.purchaseOrder.items.map((m) => ({
|
|
882
|
+
id: m.id,
|
|
883
|
+
sku: m.sku,
|
|
884
|
+
measurement: m.measurement,
|
|
885
|
+
amount: m.quantity ?? { amount: 1, precision: 0 }
|
|
889
886
|
})));
|
|
890
|
-
}), (
|
|
891
|
-
const o = H("FmTable"), v = H("FmButton"),
|
|
892
|
-
return w(), le(
|
|
887
|
+
}), (m, y) => {
|
|
888
|
+
const o = H("FmTable"), v = H("FmButton"), d = H("FmForm");
|
|
889
|
+
return w(), le(d, {
|
|
893
890
|
ref_key: "formRef",
|
|
894
891
|
ref: i,
|
|
895
892
|
class: "bg-white flex flex-col gap-32 rounded-3xl p-24 w-[800px]",
|
|
@@ -897,19 +894,19 @@ const $t = {
|
|
|
897
894
|
onValidationSuccess: y[1] || (y[1] = () => n.confirm(h))
|
|
898
895
|
}, {
|
|
899
896
|
default: ie(() => [
|
|
900
|
-
y[2] || (y[2] =
|
|
901
|
-
|
|
902
|
-
|
|
897
|
+
y[2] || (y[2] = a("div", { class: "fm-typo-en-title-sm-600" }, "Confirm the transfer amount", -1)),
|
|
898
|
+
a("div", Zt, [
|
|
899
|
+
a("div", er, [
|
|
903
900
|
E(o, {
|
|
904
901
|
"column-defs": [
|
|
905
902
|
{
|
|
906
903
|
header: "Code",
|
|
907
904
|
cell: (f) => {
|
|
908
|
-
const
|
|
905
|
+
const s = n.purchaseOrder.items.find((b) => b.id === f.row.original.id || b.sku._id === f.row.original.sku._id);
|
|
909
906
|
return q(
|
|
910
907
|
p(Ze).FmTooltip,
|
|
911
908
|
{
|
|
912
|
-
content:
|
|
909
|
+
content: s.code,
|
|
913
910
|
placement: "top",
|
|
914
911
|
variant: "plain",
|
|
915
912
|
zIndex: 50
|
|
@@ -919,7 +916,7 @@ const $t = {
|
|
|
919
916
|
{
|
|
920
917
|
class: "flex-auto line-clamp-2 text-ellipsis break-all"
|
|
921
918
|
},
|
|
922
|
-
|
|
919
|
+
s.code
|
|
923
920
|
)
|
|
924
921
|
);
|
|
925
922
|
}
|
|
@@ -927,11 +924,11 @@ const $t = {
|
|
|
927
924
|
{
|
|
928
925
|
header: "Name",
|
|
929
926
|
cell: (f) => {
|
|
930
|
-
const
|
|
927
|
+
const s = n.purchaseOrder.items.find((b) => b.id === f.row.original.id || b.sku._id === f.row.original.sku._id);
|
|
931
928
|
return q(
|
|
932
929
|
p(Ze).FmTooltip,
|
|
933
930
|
{
|
|
934
|
-
content:
|
|
931
|
+
content: s.name,
|
|
935
932
|
placement: "top",
|
|
936
933
|
variant: "plain",
|
|
937
934
|
zIndex: 50
|
|
@@ -941,7 +938,7 @@ const $t = {
|
|
|
941
938
|
{
|
|
942
939
|
class: "flex-auto line-clamp-2 text-ellipsis break-all"
|
|
943
940
|
},
|
|
944
|
-
|
|
941
|
+
s.name
|
|
945
942
|
)
|
|
946
943
|
);
|
|
947
944
|
}
|
|
@@ -949,7 +946,7 @@ const $t = {
|
|
|
949
946
|
{
|
|
950
947
|
header: "Amount",
|
|
951
948
|
cell: (f) => {
|
|
952
|
-
const
|
|
949
|
+
const s = f.row.original, b = n.purchaseOrder.items.find((O) => O.id === s.id || O.sku._id === s.sku._id), x = s.amount ?? {
|
|
953
950
|
amount: 1,
|
|
954
951
|
precision: 0
|
|
955
952
|
};
|
|
@@ -959,13 +956,13 @@ const $t = {
|
|
|
959
956
|
},
|
|
960
957
|
modelValue: {
|
|
961
958
|
amount: x,
|
|
962
|
-
measurement:
|
|
959
|
+
measurement: s.measurement ?? null
|
|
963
960
|
},
|
|
964
|
-
key:
|
|
965
|
-
unit:
|
|
961
|
+
key: s.id ?? s.sku._id,
|
|
962
|
+
unit: s.sku.unit,
|
|
966
963
|
"onUpdate:modelValue": (O) => {
|
|
967
964
|
if (!O) return;
|
|
968
|
-
const A = h.items.find((I) => I.id ===
|
|
965
|
+
const A = h.items.find((I) => I.id === s.id || I.sku._id === s.sku._id);
|
|
969
966
|
A && (A.amount = O.amount);
|
|
970
967
|
},
|
|
971
968
|
disableUnit: !0,
|
|
@@ -985,7 +982,7 @@ const $t = {
|
|
|
985
982
|
}, null, 8, ["column-defs", "row-data"])
|
|
986
983
|
])
|
|
987
984
|
]),
|
|
988
|
-
|
|
985
|
+
a("div", tr, [
|
|
989
986
|
E(v, {
|
|
990
987
|
class: "px-16",
|
|
991
988
|
label: "Confirm",
|
|
@@ -998,7 +995,7 @@ const $t = {
|
|
|
998
995
|
label: "Cancel",
|
|
999
996
|
size: "md",
|
|
1000
997
|
variant: "secondary",
|
|
1001
|
-
onClick: y[0] || (y[0] = () =>
|
|
998
|
+
onClick: y[0] || (y[0] = () => r("update:show", !1))
|
|
1002
999
|
})
|
|
1003
1000
|
])
|
|
1004
1001
|
]),
|
|
@@ -1023,10 +1020,10 @@ function sr(t) {
|
|
|
1023
1020
|
/* loading */
|
|
1024
1021
|
};
|
|
1025
1022
|
try {
|
|
1026
|
-
const
|
|
1027
|
-
l.value = { state: "success", data:
|
|
1028
|
-
} catch (
|
|
1029
|
-
l.value = { state: "error", error:
|
|
1023
|
+
const r = await i();
|
|
1024
|
+
l.value = { state: "success", data: r };
|
|
1025
|
+
} catch (r) {
|
|
1026
|
+
l.value = { state: "error", error: r };
|
|
1030
1027
|
}
|
|
1031
1028
|
};
|
|
1032
1029
|
return t && n(), { result: l, execute: n };
|
|
@@ -1111,10 +1108,10 @@ const nr = { class: "flex flex-col gap-16 w-full h-full" }, or = { class: "flex
|
|
|
1111
1108
|
}, kr = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Dr = { class: "fm-typo-en-body-lg-600" }, Nr = {
|
|
1112
1109
|
key: 4,
|
|
1113
1110
|
class: "flex flex-col gap-4"
|
|
1114
|
-
}, qr = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ar = { class: "fm-typo-en-body-lg-600" },
|
|
1111
|
+
}, qr = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ar = { class: "fm-typo-en-body-lg-600" }, Pr = {
|
|
1115
1112
|
key: 0,
|
|
1116
1113
|
class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg p-16 flex flex-col gap-8"
|
|
1117
|
-
},
|
|
1114
|
+
}, Tr = { class: "flex gap-8 items-center" }, $r = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg p-16" }, Cr = { class: "flex flex-col gap-8" }, Ir = { class: "flex gap-8 items-center" }, Fr = { class: "flex-1 fm-typo-en-body-lg-600" }, Er = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary flex flex-col gap-4" }, Br = { class: "flex w-full gap-4" }, Ur = { class: "basis-1/2 shrink-0 grow fm-typo-en-body-lg-400 line-clamp-2" }, Lr = { class: "fm-typo-en-body-lg-600 line-clamp-2" }, Vr = { class: "flex w-full gap-4 fm-typo-en-body-sm-400" }, Mr = { class: "grow fm-typo-en-body-lg-400 text-fm-color-typo-secondary line-clamp-1" }, jr = {
|
|
1118
1115
|
key: 0,
|
|
1119
1116
|
class: "line-clamp-1 fm-typo-en-body-lg-400 text-fm-color-typo-secondary"
|
|
1120
1117
|
}, Kr = { class: "py-8" }, zr = { class: "flex justify-end gap-4 items-center" }, Gr = { class: "fm-typo-en-body-lg-600" }, Hr = {
|
|
@@ -1152,7 +1149,7 @@ const nr = { class: "flex flex-col gap-16 w-full h-full" }, or = { class: "flex
|
|
|
1152
1149
|
},
|
|
1153
1150
|
emits: ["update:show", "submitted"],
|
|
1154
1151
|
setup(t, { emit: l }) {
|
|
1155
|
-
const n = t, h = l, i = Ve(),
|
|
1152
|
+
const n = t, h = l, i = Ve(), r = Me(), m = je(), y = Dt(), o = ue(), v = Le(), d = z(
|
|
1156
1153
|
() => {
|
|
1157
1154
|
var e, c;
|
|
1158
1155
|
return {
|
|
@@ -1160,7 +1157,7 @@ const nr = { class: "flex flex-col gap-16 w-full h-full" }, or = { class: "flex
|
|
|
1160
1157
|
name: ((c = v.sessionUser.value) == null ? void 0 : c.displayName) ?? ""
|
|
1161
1158
|
};
|
|
1162
1159
|
}
|
|
1163
|
-
), f = ar(), { t:
|
|
1160
|
+
), f = ar(), { t: s } = ot(), b = z(
|
|
1164
1161
|
() => {
|
|
1165
1162
|
var e, c, _, S;
|
|
1166
1163
|
return ((c = (e = n.purchaseOrder) == null ? void 0 : e.supplier) == null ? void 0 : c.internal) === "restaurant" || ((S = (_ = n.purchaseOrder) == null ? void 0 : _.supplier) == null ? void 0 : S.internal) === "warehouse" ? ve.TRANSFER : ve.PURCHASE;
|
|
@@ -1175,7 +1172,7 @@ const nr = { class: "flex flex-col gap-16 w-full h-full" }, or = { class: "flex
|
|
|
1175
1172
|
if (e.state === Be.loading)
|
|
1176
1173
|
return [];
|
|
1177
1174
|
const c = {
|
|
1178
|
-
user:
|
|
1175
|
+
user: d.value,
|
|
1179
1176
|
executedAt: o.locations.computeFirst(
|
|
1180
1177
|
(_) => {
|
|
1181
1178
|
var S;
|
|
@@ -1202,11 +1199,11 @@ const nr = { class: "flex flex-col gap-16 w-full h-full" }, or = { class: "flex
|
|
|
1202
1199
|
);
|
|
1203
1200
|
}), ae = kt(n, "show"), ee = z(() => [
|
|
1204
1201
|
{
|
|
1205
|
-
label:
|
|
1202
|
+
label: s("inventory.transfer.receiveRequest.details.overview"),
|
|
1206
1203
|
value: "overview"
|
|
1207
1204
|
},
|
|
1208
1205
|
{
|
|
1209
|
-
label:
|
|
1206
|
+
label: s("inventory.transfer.receiveRequest.details.deliveryHistory"),
|
|
1210
1207
|
value: "deliveryHistory"
|
|
1211
1208
|
}
|
|
1212
1209
|
]), ce = V(ee.value[0]);
|
|
@@ -1225,7 +1222,7 @@ const nr = { class: "flex flex-col gap-16 w-full h-full" }, or = { class: "flex
|
|
|
1225
1222
|
primaryActions: S.primaryActions,
|
|
1226
1223
|
secondaryActions: { text: "No", close: !1 }
|
|
1227
1224
|
}).onPrimary(async () => {
|
|
1228
|
-
var u,
|
|
1225
|
+
var u, P, U, G;
|
|
1229
1226
|
try {
|
|
1230
1227
|
await de({
|
|
1231
1228
|
operate: {
|
|
@@ -1235,7 +1232,7 @@ const nr = { class: "flex flex-col gap-16 w-full h-full" }, or = { class: "flex
|
|
|
1235
1232
|
},
|
|
1236
1233
|
operateV2: {
|
|
1237
1234
|
_id: ((u = n.purchaseOrder) == null ? void 0 : u._id) ?? "",
|
|
1238
|
-
_rev: ((
|
|
1235
|
+
_rev: ((P = n.purchaseOrder) == null ? void 0 : P._rev) ?? "",
|
|
1239
1236
|
action: _
|
|
1240
1237
|
// add payload if action is receiveStock or processRequest
|
|
1241
1238
|
},
|
|
@@ -1257,7 +1254,7 @@ const nr = { class: "flex flex-col gap-16 w-full h-full" }, or = { class: "flex
|
|
|
1257
1254
|
return;
|
|
1258
1255
|
const c = ct[e];
|
|
1259
1256
|
if (!c) {
|
|
1260
|
-
|
|
1257
|
+
r.open({
|
|
1261
1258
|
title: "Something went wrong",
|
|
1262
1259
|
message: `Cannot process order: ${rt(e)}`,
|
|
1263
1260
|
type: "error"
|
|
@@ -1270,9 +1267,9 @@ const nr = { class: "flex flex-col gap-16 w-full h-full" }, or = { class: "flex
|
|
|
1270
1267
|
const S = {};
|
|
1271
1268
|
let j = 0;
|
|
1272
1269
|
if ((e === N.enum.confirmDraft || // auto receive for warehouse to warehouse
|
|
1273
|
-
e === N.enum.completeReceive) &&
|
|
1270
|
+
e === N.enum.completeReceive) && m.autoReceiveWarehouse)
|
|
1274
1271
|
S.autoReceive = !0;
|
|
1275
|
-
else if (e === N.enum.approveRequest &&
|
|
1272
|
+
else if (e === N.enum.approveRequest && m.acceptRequireFulfillment) {
|
|
1276
1273
|
const B = await new Promise((Q, u) => {
|
|
1277
1274
|
i.open({
|
|
1278
1275
|
closeButton: !1,
|
|
@@ -1281,8 +1278,8 @@ const nr = { class: "flex flex-col gap-16 w-full h-full" }, or = { class: "flex
|
|
|
1281
1278
|
dialogComponentProps: {
|
|
1282
1279
|
purchaseOrder: n.purchaseOrder,
|
|
1283
1280
|
confirm: Q,
|
|
1284
|
-
"onUpdate:show": (
|
|
1285
|
-
|
|
1281
|
+
"onUpdate:show": (P) => {
|
|
1282
|
+
P || (A.value = "", O.value = !1, I.value = !0, j++, i.close()), u("cancelled");
|
|
1286
1283
|
}
|
|
1287
1284
|
}
|
|
1288
1285
|
});
|
|
@@ -1296,13 +1293,13 @@ const nr = { class: "flex flex-col gap-16 w-full h-full" }, or = { class: "flex
|
|
|
1296
1293
|
e,
|
|
1297
1294
|
c,
|
|
1298
1295
|
j
|
|
1299
|
-
) === "submitted" && (
|
|
1296
|
+
) === "submitted" && (r.open({
|
|
1300
1297
|
title: "Success",
|
|
1301
1298
|
message: _,
|
|
1302
1299
|
type: "success"
|
|
1303
1300
|
}), h("update:show", !1), h("submitted"));
|
|
1304
1301
|
} catch (B) {
|
|
1305
|
-
|
|
1302
|
+
r.open({
|
|
1306
1303
|
title: "Something went wrong",
|
|
1307
1304
|
message: "Please try again.",
|
|
1308
1305
|
type: "error"
|
|
@@ -1315,16 +1312,16 @@ const nr = { class: "flex flex-col gap-16 w-full h-full" }, or = { class: "flex
|
|
|
1315
1312
|
const Ae = z(() => {
|
|
1316
1313
|
var e, c;
|
|
1317
1314
|
return ((e = n.purchaseOrder) == null ? void 0 : e.status) === se.enum.RECEIVING || ((c = n.purchaseOrder) == null ? void 0 : c.status) === se.enum.COMPLETE;
|
|
1318
|
-
}),
|
|
1315
|
+
}), Pe = z(() => {
|
|
1319
1316
|
var B, Q, u;
|
|
1320
|
-
const _ = (((B = n.purchaseOrder) == null ? void 0 : B.deliveryOrder) ?? []).flatMap((
|
|
1321
|
-
(
|
|
1322
|
-
const G =
|
|
1323
|
-
return
|
|
1317
|
+
const _ = (((B = n.purchaseOrder) == null ? void 0 : B.deliveryOrder) ?? []).flatMap((P) => P.received ?? []).reduce(
|
|
1318
|
+
(P, U) => {
|
|
1319
|
+
const G = P[U.sku._id] ?? [];
|
|
1320
|
+
return P[U.sku._id] = [...G, U], P;
|
|
1324
1321
|
},
|
|
1325
1322
|
{}
|
|
1326
1323
|
), S = Object.entries(_).reduce(
|
|
1327
|
-
(
|
|
1324
|
+
(P, [U, G]) => {
|
|
1328
1325
|
const C = G.reduce((J, F) => {
|
|
1329
1326
|
const ne = yt(
|
|
1330
1327
|
J,
|
|
@@ -1332,12 +1329,12 @@ const nr = { class: "flex flex-col gap-16 w-full h-full" }, or = { class: "flex
|
|
|
1332
1329
|
);
|
|
1333
1330
|
return Fe(ne, F.amount);
|
|
1334
1331
|
}, Oe(0));
|
|
1335
|
-
return
|
|
1332
|
+
return P[U] = C, P;
|
|
1336
1333
|
},
|
|
1337
1334
|
{}
|
|
1338
1335
|
), j = ((Q = n.purchaseOrder) == null ? void 0 : Q.items) ?? [];
|
|
1339
|
-
for (const
|
|
1340
|
-
S[u =
|
|
1336
|
+
for (const P of j)
|
|
1337
|
+
S[u = P.sku._id] ?? (S[u] = Oe(0));
|
|
1341
1338
|
return S;
|
|
1342
1339
|
}), g = z(() => {
|
|
1343
1340
|
var B, Q;
|
|
@@ -1353,13 +1350,13 @@ const nr = { class: "flex flex-col gap-16 w-full h-full" }, or = { class: "flex
|
|
|
1353
1350
|
doc: u
|
|
1354
1351
|
}))
|
|
1355
1352
|
];
|
|
1356
|
-
_.reverse().sort((u,
|
|
1353
|
+
_.reverse().sort((u, P) => u.createdAt.localeCompare(P.createdAt));
|
|
1357
1354
|
function S(u) {
|
|
1358
1355
|
var G, C, J, F, ne, be, ge, _e, $;
|
|
1359
|
-
const
|
|
1360
|
-
(C = (G = c[
|
|
1356
|
+
const P = c.findIndex((T) => T.id === u.fullfillmentId), U = [
|
|
1357
|
+
(C = (G = c[P]) == null ? void 0 : G.netSuite) != null && C.refNo ? {
|
|
1361
1358
|
label: "Fulfillment's ref no. (Netsuite)",
|
|
1362
|
-
values: [(F = (J = c[
|
|
1359
|
+
values: [(F = (J = c[P]) == null ? void 0 : J.netSuite) == null ? void 0 : F.refNo]
|
|
1363
1360
|
} : null,
|
|
1364
1361
|
(ne = u == null ? void 0 : u.netSuite) != null && ne.refNo ? {
|
|
1365
1362
|
label: "Netsuite ref no.",
|
|
@@ -1372,12 +1369,12 @@ const nr = { class: "flex flex-col gap-16 w-full h-full" }, or = { class: "flex
|
|
|
1372
1369
|
];
|
|
1373
1370
|
return {
|
|
1374
1371
|
header: "Received",
|
|
1375
|
-
date:
|
|
1372
|
+
date: Te(new Date(u.createdAt)),
|
|
1376
1373
|
info: [
|
|
1377
1374
|
{
|
|
1378
1375
|
label: "Adjustment date",
|
|
1379
1376
|
values: [
|
|
1380
|
-
u.adjustment ?
|
|
1377
|
+
u.adjustment ? Te(new Date(ht(u.adjustment))) : "-"
|
|
1381
1378
|
]
|
|
1382
1379
|
},
|
|
1383
1380
|
{
|
|
@@ -1386,7 +1383,7 @@ const nr = { class: "flex flex-col gap-16 w-full h-full" }, or = { class: "flex
|
|
|
1386
1383
|
},
|
|
1387
1384
|
{
|
|
1388
1385
|
label: "Received items",
|
|
1389
|
-
values: u.received.map((
|
|
1386
|
+
values: u.received.map((T) => {
|
|
1390
1387
|
var M;
|
|
1391
1388
|
return q("div", [
|
|
1392
1389
|
q(
|
|
@@ -1406,14 +1403,14 @@ const nr = { class: "flex flex-col gap-16 w-full h-full" }, or = { class: "flex
|
|
|
1406
1403
|
{
|
|
1407
1404
|
class: "fm-typo-en-body-lg-800 basis-1/2 shrink-0 grow"
|
|
1408
1405
|
},
|
|
1409
|
-
`${
|
|
1406
|
+
`${T.sku.name}`
|
|
1410
1407
|
),
|
|
1411
1408
|
q(
|
|
1412
1409
|
"span",
|
|
1413
1410
|
{
|
|
1414
1411
|
class: "fm-typo-en-body-md-400"
|
|
1415
1412
|
},
|
|
1416
|
-
`${
|
|
1413
|
+
`${T.sku.code} `
|
|
1417
1414
|
)
|
|
1418
1415
|
]
|
|
1419
1416
|
),
|
|
@@ -1434,14 +1431,14 @@ const nr = { class: "flex flex-col gap-16 w-full h-full" }, or = { class: "flex
|
|
|
1434
1431
|
{
|
|
1435
1432
|
class: "fm-typo-en-body-lg-600 self-end"
|
|
1436
1433
|
},
|
|
1437
|
-
oe(
|
|
1434
|
+
oe(T.amount, !1)
|
|
1438
1435
|
),
|
|
1439
1436
|
q(
|
|
1440
1437
|
"span",
|
|
1441
1438
|
{
|
|
1442
1439
|
class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary"
|
|
1443
1440
|
},
|
|
1444
|
-
((M =
|
|
1441
|
+
((M = T.measurement) == null ? void 0 : M.abbrev) ?? T.sku.unit.abbrev
|
|
1445
1442
|
)
|
|
1446
1443
|
]
|
|
1447
1444
|
),
|
|
@@ -1450,7 +1447,7 @@ const nr = { class: "flex flex-col gap-16 w-full h-full" }, or = { class: "flex
|
|
|
1450
1447
|
{
|
|
1451
1448
|
class: "flex self-end fm-typo-en-body-md-400 text-fm-color-typo-secondary"
|
|
1452
1449
|
},
|
|
1453
|
-
`${
|
|
1450
|
+
`${T.cost ? `(${xe(T.cost)})` : ""}`
|
|
1454
1451
|
)
|
|
1455
1452
|
]
|
|
1456
1453
|
)
|
|
@@ -1467,24 +1464,24 @@ const nr = { class: "flex flex-col gap-16 w-full h-full" }, or = { class: "flex
|
|
|
1467
1464
|
label: "Remark",
|
|
1468
1465
|
values: [u.remark]
|
|
1469
1466
|
} : null,
|
|
1470
|
-
|
|
1467
|
+
P > -1 ? {
|
|
1471
1468
|
label: "Fulfilment's sequence",
|
|
1472
|
-
values: [`${
|
|
1469
|
+
values: [`${P + 1}`]
|
|
1473
1470
|
} : null,
|
|
1474
1471
|
...U
|
|
1475
|
-
].filter((
|
|
1472
|
+
].filter((T) => T)
|
|
1476
1473
|
};
|
|
1477
1474
|
}
|
|
1478
1475
|
function j(u) {
|
|
1479
1476
|
var U, G;
|
|
1480
|
-
const
|
|
1477
|
+
const P = c.findIndex((C) => C.id === u.id);
|
|
1481
1478
|
return {
|
|
1482
1479
|
header: "Fulfillment",
|
|
1483
|
-
date:
|
|
1480
|
+
date: Te(new Date(u.createdAt)),
|
|
1484
1481
|
info: [
|
|
1485
1482
|
{
|
|
1486
1483
|
label: "Sequence",
|
|
1487
|
-
values: [String(
|
|
1484
|
+
values: [String(P + 1)]
|
|
1488
1485
|
},
|
|
1489
1486
|
{
|
|
1490
1487
|
label: "Receiveable items",
|
|
@@ -1589,9 +1586,9 @@ const nr = { class: "flex flex-col gap-16 w-full h-full" }, or = { class: "flex
|
|
|
1589
1586
|
});
|
|
1590
1587
|
return (e, c) => {
|
|
1591
1588
|
var C, J;
|
|
1592
|
-
const _ = H("FmButtonGroup"), S = H("FmChip"), j = H("FmMenuDivider"), B = H("FmCard"), Q = H("FmIcon"), u = H("FmTooltip"),
|
|
1589
|
+
const _ = H("FmButtonGroup"), S = H("FmChip"), j = H("FmMenuDivider"), B = H("FmCard"), Q = H("FmIcon"), u = H("FmTooltip"), P = H("FmSpacer"), U = H("FmButton"), G = H("FmSideSheet");
|
|
1593
1590
|
return w(), le(G, {
|
|
1594
|
-
header: p(
|
|
1591
|
+
header: p(s)("inventory.transfer.receiveRequest.details.title") + ((C = e.purchaseOrder) != null && C.seqNumber ? ` #${(J = e.purchaseOrder) == null ? void 0 : J.seqNumber}` : ""),
|
|
1595
1592
|
modelValue: p(ae),
|
|
1596
1593
|
"onUpdate:modelValue": c[4] || (c[4] = (F) => _t(ae) ? ae.value = F : null),
|
|
1597
1594
|
"dismiss-away": I.value,
|
|
@@ -1601,8 +1598,8 @@ const nr = { class: "flex flex-col gap-16 w-full h-full" }, or = { class: "flex
|
|
|
1601
1598
|
default: ie(() => {
|
|
1602
1599
|
var F, ne, be, ge, _e;
|
|
1603
1600
|
return [
|
|
1604
|
-
|
|
1605
|
-
|
|
1601
|
+
a("div", nr, [
|
|
1602
|
+
a("div", null, [
|
|
1606
1603
|
E(_, {
|
|
1607
1604
|
items: ee.value,
|
|
1608
1605
|
modelValue: ce.value,
|
|
@@ -1610,57 +1607,57 @@ const nr = { class: "flex flex-col gap-16 w-full h-full" }, or = { class: "flex
|
|
|
1610
1607
|
}, null, 8, ["items", "modelValue"])
|
|
1611
1608
|
]),
|
|
1612
1609
|
ce.value.value === "overview" ? (w(), D(te, { key: 0 }, [
|
|
1613
|
-
|
|
1610
|
+
a("div", null, [
|
|
1614
1611
|
E(B, {
|
|
1615
1612
|
variant: "outlined",
|
|
1616
1613
|
class: "flex flex-col gap-8 px-12 py-16"
|
|
1617
1614
|
}, {
|
|
1618
1615
|
default: ie(() => {
|
|
1619
|
-
var $,
|
|
1616
|
+
var $, T, M, me, fe, Se, Ke, ze, Ge, He, Qe, Ye;
|
|
1620
1617
|
return [
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1618
|
+
a("div", or, [
|
|
1619
|
+
a("div", cr, R(p(s)("inventory.transfer.receiveRequest.details.requestSummary")), 1),
|
|
1620
|
+
a("div", null, [
|
|
1624
1621
|
E(S, {
|
|
1625
|
-
label: p(
|
|
1626
|
-
class: Re(`fm-status-badge fm-status-badge-${(M = (
|
|
1622
|
+
label: p(s)(`inventory.transfer.status.${($ = e.purchaseOrder) == null ? void 0 : $.status}`),
|
|
1623
|
+
class: Re(`fm-status-badge fm-status-badge-${(M = (T = e.purchaseOrder) == null ? void 0 : T.status) == null ? void 0 : M.toLocaleLowerCase("en-us")}`),
|
|
1627
1624
|
compact: ""
|
|
1628
1625
|
}, null, 8, ["label", "class"])
|
|
1629
1626
|
])
|
|
1630
1627
|
]),
|
|
1631
1628
|
E(j),
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1629
|
+
a("div", lr, [
|
|
1630
|
+
a("div", ir, [
|
|
1631
|
+
a("div", ur, [
|
|
1632
|
+
a("div", dr, R(p(s)("inventory.transfer.receiveRequest.details.createdAt")), 1)
|
|
1636
1633
|
]),
|
|
1637
|
-
|
|
1634
|
+
a("div", mr, R(p(ke)(((me = e.purchaseOrder) == null ? void 0 : me._id) ?? "")), 1)
|
|
1638
1635
|
]),
|
|
1639
1636
|
(fe = e.purchaseOrder) != null && fe.effectiveAt ? (w(), D("div", fr, [
|
|
1640
|
-
|
|
1641
|
-
|
|
1637
|
+
a("div", pr, R(p(s)("inventory.transfer.receiveRequest.details.backdatedTo")), 1),
|
|
1638
|
+
a("div", yr, R(p(st)(new Date((Se = e.purchaseOrder) == null ? void 0 : Se.effectiveAt))), 1)
|
|
1642
1639
|
])) : L("", !0),
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1640
|
+
a("div", vr, [
|
|
1641
|
+
a("div", hr, R(p(s)("inventory.transfer.receiveRequest.details.type.title")), 1),
|
|
1642
|
+
a("div", br, R(p(s)(
|
|
1646
1643
|
`inventory.transfer.receiveRequest.details.type.${b.value.toLocaleLowerCase("en-US")}`
|
|
1647
1644
|
)), 1)
|
|
1648
1645
|
]),
|
|
1649
1646
|
(ze = (Ke = e.purchaseOrder) == null ? void 0 : Ke.supplier) != null && ze.name ? (w(), D("div", gr, [
|
|
1650
|
-
|
|
1651
|
-
|
|
1647
|
+
a("div", _r, R(p(s)("inventory.transfer.receiveRequest.details.from")), 1),
|
|
1648
|
+
a("div", wr, R((He = (Ge = e.purchaseOrder) == null ? void 0 : Ge.supplier) == null ? void 0 : He.name), 1)
|
|
1652
1649
|
])) : L("", !0),
|
|
1653
1650
|
e.transferTo ? (w(), D("div", Sr, [
|
|
1654
|
-
|
|
1655
|
-
|
|
1651
|
+
a("div", xr, R(p(s)("inventory.transfer.receiveRequest.details.to")), 1),
|
|
1652
|
+
a("div", Rr, R(e.transferTo), 1)
|
|
1656
1653
|
])) : L("", !0),
|
|
1657
1654
|
(Qe = e.purchaseOrder) != null && Qe.ref ? (w(), D("div", Or, [
|
|
1658
|
-
|
|
1659
|
-
|
|
1655
|
+
a("div", kr, R(p(s)("inventory.transfer.receiveRequest.details.reference")), 1),
|
|
1656
|
+
a("div", Dr, R(e.purchaseOrder.ref), 1)
|
|
1660
1657
|
])) : L("", !0),
|
|
1661
1658
|
(Ye = e.purchaseOrder) != null && Ye.remark ? (w(), D("div", Nr, [
|
|
1662
|
-
|
|
1663
|
-
|
|
1659
|
+
a("div", qr, R(p(s)("inventory.transfer.receiveRequest.details.remark")), 1),
|
|
1660
|
+
a("div", Ar, R(e.purchaseOrder.remark), 1)
|
|
1664
1661
|
])) : L("", !0)
|
|
1665
1662
|
])
|
|
1666
1663
|
];
|
|
@@ -1668,10 +1665,10 @@ const nr = { class: "flex flex-col gap-16 w-full h-full" }, or = { class: "flex
|
|
|
1668
1665
|
_: 1
|
|
1669
1666
|
})
|
|
1670
1667
|
]),
|
|
1671
|
-
p(y).isNetSuiteEnabled && !x.value ? (w(), D("div",
|
|
1672
|
-
|
|
1673
|
-
c[5] || (c[5] =
|
|
1674
|
-
|
|
1668
|
+
p(y).isNetSuiteEnabled && !x.value ? (w(), D("div", Pr, [
|
|
1669
|
+
a("div", Tr, [
|
|
1670
|
+
c[5] || (c[5] = a("span", { class: "flex-1 fm-typo-en-body-lg-600" }, "NetSuite Info", -1)),
|
|
1671
|
+
a("div", null, [
|
|
1675
1672
|
E(Jt, {
|
|
1676
1673
|
"po-request": e.poRequest,
|
|
1677
1674
|
"purchase-order": e.purchaseOrder,
|
|
@@ -1689,11 +1686,11 @@ const nr = { class: "flex flex-col gap-16 w-full h-full" }, or = { class: "flex
|
|
|
1689
1686
|
scope: e.scope
|
|
1690
1687
|
}, null, 8, ["po-request", "purchase-order", "transfer-type", "transfer-to-db-name", "is-transfer-between-outlets", "scope"])
|
|
1691
1688
|
])) : L("", !0),
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
$e(R(Ae.value ? p(
|
|
1689
|
+
a("div", $r, [
|
|
1690
|
+
a("div", Cr, [
|
|
1691
|
+
a("div", Ir, [
|
|
1692
|
+
a("span", Fr, [
|
|
1693
|
+
$e(R(Ae.value ? p(s)("inventory.transfer.receiveRequest.details.receivedItems") : p(s)("inventory.transfer.receiveRequest.details.requestedItems")) + " ", 1),
|
|
1697
1694
|
(ne = (F = e.purchaseOrder) == null ? void 0 : F.netSuite) != null && ne.missingItems && ((ge = (be = e.purchaseOrder) == null ? void 0 : be.netSuite) == null ? void 0 : ge.missingItems.length) > 0 ? (w(), le(u, {
|
|
1698
1695
|
key: 0,
|
|
1699
1696
|
variant: "rich",
|
|
@@ -1701,10 +1698,10 @@ const nr = { class: "flex flex-col gap-16 w-full h-full" }, or = { class: "flex
|
|
|
1701
1698
|
"z-index": 51
|
|
1702
1699
|
}, {
|
|
1703
1700
|
content: ie(() => {
|
|
1704
|
-
var $,
|
|
1701
|
+
var $, T;
|
|
1705
1702
|
return [
|
|
1706
|
-
|
|
1707
|
-
(w(!0), D(te, null, pe((
|
|
1703
|
+
a("div", Er, [
|
|
1704
|
+
(w(!0), D(te, null, pe((T = ($ = e.purchaseOrder) == null ? void 0 : $.netSuite) == null ? void 0 : T.missingItems, (M, me) => (w(), D("div", {
|
|
1708
1705
|
class: "flex justify-center align-middle",
|
|
1709
1706
|
key: me
|
|
1710
1707
|
}, [
|
|
@@ -1730,93 +1727,93 @@ const nr = { class: "flex flex-col gap-16 w-full h-full" }, or = { class: "flex
|
|
|
1730
1727
|
]),
|
|
1731
1728
|
E(j),
|
|
1732
1729
|
(w(!0), D(te, null, pe(((_e = e.purchaseOrder) == null ? void 0 : _e.items) ?? [], ($) => {
|
|
1733
|
-
var
|
|
1730
|
+
var T;
|
|
1734
1731
|
return w(), D("div", {
|
|
1735
1732
|
key: $.code,
|
|
1736
1733
|
class: "flex flex-col"
|
|
1737
1734
|
}, [
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1735
|
+
a("div", Br, [
|
|
1736
|
+
a("div", Ur, R($.name), 1),
|
|
1737
|
+
a("div", Lr, R(p(oe)(Pe.value[$.sku._id], !1)) + "/" + R(p(nt)($.quantity, $.sku.unit, $.measurement)), 1)
|
|
1741
1738
|
]),
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
(
|
|
1739
|
+
a("div", Vr, [
|
|
1740
|
+
a("div", Mr, R($.code), 1),
|
|
1741
|
+
(T = $.totalCost) != null && T.amount && p(m).enableTotalCost ? (w(), D("div", jr, " (" + R(p(xe)($.totalCost)) + ") ", 1)) : L("", !0)
|
|
1745
1742
|
])
|
|
1746
1743
|
]);
|
|
1747
1744
|
}), 128)),
|
|
1748
1745
|
+p(oe)(k.value) ? (w(), D(te, { key: 0 }, [
|
|
1749
|
-
|
|
1746
|
+
a("div", Kr, [
|
|
1750
1747
|
E(j)
|
|
1751
1748
|
]),
|
|
1752
|
-
|
|
1753
|
-
c[6] || (c[6] =
|
|
1754
|
-
|
|
1749
|
+
a("div", zr, [
|
|
1750
|
+
c[6] || (c[6] = a("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, "Total:", -1)),
|
|
1751
|
+
a("div", Gr, R(p(xe)(k.value)), 1)
|
|
1755
1752
|
])
|
|
1756
1753
|
], 64)) : L("", !0)
|
|
1757
1754
|
])
|
|
1758
1755
|
])
|
|
1759
1756
|
], 64)) : ce.value.value === "deliveryHistory" ? (w(), D("div", Hr, [
|
|
1760
1757
|
g.value.length ? (w(), D("div", Jr, [
|
|
1761
|
-
(w(!0), D(te, null, pe(g.value, ($,
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1758
|
+
(w(!0), D(te, null, pe(g.value, ($, T) => (w(), D(te, { key: T }, [
|
|
1759
|
+
a("div", Zr, [
|
|
1760
|
+
a("div", es, [
|
|
1761
|
+
a("div", ts, [
|
|
1762
|
+
a("div", {
|
|
1766
1763
|
class: Re([
|
|
1767
1764
|
{
|
|
1768
|
-
"bg-fm-color-primary":
|
|
1769
|
-
"bg-white":
|
|
1765
|
+
"bg-fm-color-primary": T !== 0,
|
|
1766
|
+
"bg-white": T === 0
|
|
1770
1767
|
},
|
|
1771
1768
|
"w-[2px] h-full"
|
|
1772
1769
|
])
|
|
1773
1770
|
}, null, 2)
|
|
1774
1771
|
]),
|
|
1775
|
-
c[7] || (c[7] =
|
|
1776
|
-
|
|
1777
|
-
|
|
1772
|
+
c[7] || (c[7] = a("div", { class: "h-24 w-24 bg-fm-color-primary rounded-full" }, null, -1)),
|
|
1773
|
+
a("div", rs, [
|
|
1774
|
+
a("div", {
|
|
1778
1775
|
class: Re([
|
|
1779
1776
|
{
|
|
1780
|
-
"bg-fm-color-primary":
|
|
1781
|
-
"bg-white":
|
|
1777
|
+
"bg-fm-color-primary": T < g.value.length - 1,
|
|
1778
|
+
"bg-white": T >= g.value.length - 1
|
|
1782
1779
|
},
|
|
1783
1780
|
"w-[2px] h-full"
|
|
1784
1781
|
])
|
|
1785
1782
|
}, null, 2)
|
|
1786
1783
|
])
|
|
1787
1784
|
]),
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1785
|
+
a("div", ss, [
|
|
1786
|
+
a("div", as, R($.header), 1),
|
|
1787
|
+
a("div", ns, R($.date), 1)
|
|
1791
1788
|
])
|
|
1792
1789
|
]),
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1790
|
+
a("div", os, [
|
|
1791
|
+
a("div", cs, [
|
|
1792
|
+
a("div", ls, [
|
|
1793
|
+
a("div", {
|
|
1797
1794
|
class: Re([
|
|
1798
1795
|
{
|
|
1799
|
-
"bg-fm-color-primary":
|
|
1800
|
-
"bg-white":
|
|
1796
|
+
"bg-fm-color-primary": T < g.value.length - 1,
|
|
1797
|
+
"bg-white": T >= g.value.length - 1
|
|
1801
1798
|
},
|
|
1802
1799
|
"w-[2px] h-full"
|
|
1803
1800
|
])
|
|
1804
1801
|
}, null, 2)
|
|
1805
1802
|
])
|
|
1806
1803
|
]),
|
|
1807
|
-
|
|
1804
|
+
a("div", is, [
|
|
1808
1805
|
E(B, {
|
|
1809
1806
|
variant: "outlined",
|
|
1810
1807
|
class: "py-12 px-16"
|
|
1811
1808
|
}, {
|
|
1812
1809
|
default: ie(() => [
|
|
1813
|
-
|
|
1810
|
+
a("div", us, [
|
|
1814
1811
|
(w(!0), D(te, null, pe($.info, (M, me) => (w(), D("div", {
|
|
1815
1812
|
key: me,
|
|
1816
1813
|
class: "flex flex-col gap-4"
|
|
1817
1814
|
}, [
|
|
1818
|
-
|
|
1819
|
-
|
|
1815
|
+
a("div", ds, R(M == null ? void 0 : M.label), 1),
|
|
1816
|
+
a("div", ms, [
|
|
1820
1817
|
(w(!0), D(te, null, pe(M == null ? void 0 : M.values, (fe, Se) => (w(), D("div", {
|
|
1821
1818
|
key: Se,
|
|
1822
1819
|
class: "fm-typo-en-body-lg-600"
|
|
@@ -1835,27 +1832,27 @@ const nr = { class: "flex flex-col gap-16 w-full h-full" }, or = { class: "flex
|
|
|
1835
1832
|
])
|
|
1836
1833
|
], 64))), 128))
|
|
1837
1834
|
])) : (w(), D("div", Qr, [
|
|
1838
|
-
E(
|
|
1839
|
-
|
|
1840
|
-
|
|
1835
|
+
E(P),
|
|
1836
|
+
a("div", null, [
|
|
1837
|
+
a("img", {
|
|
1841
1838
|
src: p(Ot),
|
|
1842
1839
|
alt: "List is empty"
|
|
1843
1840
|
}, null, 8, Yr)
|
|
1844
1841
|
]),
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
E(
|
|
1848
|
-
E(
|
|
1842
|
+
a("div", Wr, R(p(s)("inventory.transfer.receiveRequest.details.noRecordsFound")), 1),
|
|
1843
|
+
a("div", Xr, R(p(s)("inventory.transfer.receiveRequest.details.trackDeliveryMessage")), 1),
|
|
1844
|
+
E(P),
|
|
1845
|
+
E(P)
|
|
1849
1846
|
]))
|
|
1850
1847
|
])) : L("", !0)
|
|
1851
1848
|
])
|
|
1852
1849
|
];
|
|
1853
1850
|
}),
|
|
1854
1851
|
"side-sheet-footer": ie(() => [
|
|
1855
|
-
|
|
1852
|
+
a("div", fs, [
|
|
1856
1853
|
(w(!0), D(te, null, pe(X.value, (F) => (w(), le(U, {
|
|
1857
1854
|
key: F,
|
|
1858
|
-
label: p(
|
|
1855
|
+
label: p(s)(p(et)[F].translationKey),
|
|
1859
1856
|
onClick: (ne) => he(F),
|
|
1860
1857
|
loading: A.value === F,
|
|
1861
1858
|
disabled: A.value !== F && O.value,
|
|
@@ -1863,20 +1860,20 @@ const nr = { class: "flex flex-col gap-16 w-full h-full" }, or = { class: "flex
|
|
|
1863
1860
|
}, null, 8, ["label", "onClick", "loading", "disabled", "variant"]))), 128)),
|
|
1864
1861
|
p(f).ableToMarkReceived(e.purchaseOrder) && !X.value.includes("completeReceive") ? (w(), le(U, {
|
|
1865
1862
|
key: 0,
|
|
1866
|
-
label: p(
|
|
1863
|
+
label: p(s)("inventory.transfer.receiveRequest.actions.completeReceive"),
|
|
1867
1864
|
onClick: c[1] || (c[1] = (F) => he("completeReceive")),
|
|
1868
1865
|
loading: A.value === "completeReceive",
|
|
1869
1866
|
disabled: A.value !== "completeReceive" && O.value
|
|
1870
1867
|
}, null, 8, ["label", "loading", "disabled"])) : L("", !0),
|
|
1871
1868
|
p(f).ableToMarkApproved(e.purchaseOrder) && e.canApprove && !X.value.includes("approveRequest") ? (w(), le(U, {
|
|
1872
1869
|
key: 1,
|
|
1873
|
-
label: p(
|
|
1870
|
+
label: p(s)("inventory.transfer.approval.actions.approveRequest"),
|
|
1874
1871
|
onClick: c[2] || (c[2] = (F) => he("approveRequest")),
|
|
1875
1872
|
loading: A.value === "approveRequest",
|
|
1876
1873
|
disabled: A.value !== "approveRequest" && O.value
|
|
1877
1874
|
}, null, 8, ["label", "loading", "disabled"])) : L("", !0),
|
|
1878
1875
|
E(U, {
|
|
1879
|
-
label: p(
|
|
1876
|
+
label: p(s)("common.close"),
|
|
1880
1877
|
variant: "tertiary",
|
|
1881
1878
|
onClick: c[3] || (c[3] = (F) => h("update:show", !1))
|
|
1882
1879
|
}, null, 8, ["label"])
|
|
@@ -1892,6 +1889,6 @@ export {
|
|
|
1892
1889
|
ks as _,
|
|
1893
1890
|
Rs as a,
|
|
1894
1891
|
Os as b,
|
|
1895
|
-
|
|
1892
|
+
Pt as g,
|
|
1896
1893
|
Ne as u
|
|
1897
1894
|
};
|