@feedmepos/mf-inventory-portal 1.1.8-dev.1 → 1.1.8
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-veHf70us.js → App-LWr1yzQ6.js} +1 -1
- package/dist/{ApprovalView-BHmFwrSI.js → ApprovalView-Y8LJV80t.js} +2 -2
- package/dist/{BindingsDialog-BtsPrnkN.js → BindingsDialog-D1O7QUHY.js} +2 -2
- package/dist/{BindingsPicker-BZLdo3j7.js → BindingsPicker-DplZPoH4.js} +1 -1
- package/dist/{BindingsTable-Cl_202xc.js → BindingsTable-Bde3pmvK.js} +1 -1
- package/dist/{ClosingDraftView-BmYBBxXF.js → ClosingDraftView-Dkn2d7Pn.js} +2 -2
- package/dist/{ClosingTemplateView-D_q5Cqh0.js → ClosingTemplateView-DJiJcCif.js} +2 -2
- package/dist/{DeliveryOrderPrintPreview-OpO2cRqM.js → DeliveryOrderPrintPreview-U7zV8iDR.js} +1 -1
- package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-DnD-9Xlp.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-7vPKAf4U.js} +3 -3
- package/dist/{FmMultiselectDialog-BAXYhHXd.js → FmMultiselectDialog-8MellNpn.js} +1 -1
- package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-BhNXYuvq.js → FmUnitInput.vue_vue_type_script_setup_true_lang-0-Wrz6h2.js} +1 -1
- package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-C7SW2nNO.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-D4by8qar.js} +1 -1
- package/dist/{IngredientGroupView-D0h1YsbP.js → IngredientGroupView-Caoj5Wmc.js} +2 -2
- package/dist/{IngredientsView-C_3wyh5v.js → IngredientsView-dafhCj6X.js} +4 -4
- package/dist/{IntegrationView-QqGcH-dN.js → IntegrationView-mua_vfa-.js} +3 -3
- package/dist/{InventoryBindingForm-z8_qpiTO.js → InventoryBindingForm-DdWkMwzc.js} +1 -1
- package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-Lx9VL2I6.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-CHtIx9MR.js} +3 -3
- package/dist/{InventoryBindingSummary-Bsl4Gv9C.js → InventoryBindingSummary-pbkRTDmY.js} +1 -1
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-BxHFH1_k.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-pEaEl4Jj.js} +1 -1
- package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-D5oYHtLv.js → PremiumBadge.vue_vue_type_script_setup_true_lang-DeKCu64H.js} +1 -1
- package/dist/{PublishView-D4MSi6ZU.js → PublishView-mEFA3N6e.js} +1 -1
- package/dist/{PurchaseOrderPrintPreview-BfIw_wm3.js → PurchaseOrderPrintPreview-kIP57j50.js} +1 -1
- package/dist/{ReceiveRequestView-BLN4uh1f.js → ReceiveRequestView-B1CHZk2d.js} +8 -8
- package/dist/{RecipeView-BYrXdWYU.js → RecipeView-BlMIx4CT.js} +3 -3
- package/dist/{StockView-BkOpMBkI.js → StockView-aRMqJenk.js} +6 -6
- package/dist/{SupplierView-DCes9XEn.js → SupplierView-D8hzr0N0.js} +3 -3
- package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-DdmVEYUZ.js → TransferDetails.vue_vue_type_script_setup_true_lang-CjIc-VoQ.js} +254 -253
- package/dist/{TransferTemplateView-CSQWhzL3.js → TransferTemplateView-Dbg09Pdd.js} +6 -6
- package/dist/{UnitView-BR8h1-Fg.js → UnitView-Dk4xlIIx.js} +3 -3
- package/dist/{WarehouseView-C0owHwI6.js → WarehouseView-D43tzjqi.js} +1 -1
- package/dist/{app-CsCsQ8Wq.js → app-BPIbY53a.js} +13 -13
- package/dist/app.js +1 -1
- package/dist/{decimal-CCcb_ZM5.js → decimal-CyHGzqNK.js} +1 -1
- package/dist/{format-unit-display-LULBvgMu.js → format-unit-display-DAEO7Jpk.js} +2 -2
- package/dist/{index-CcJb5oyS.js → index-C1aEJZm1.js} +1 -1
- package/dist/{index-GxCc62xJ.js → index-Dp6B8J49.js} +1 -1
- package/dist/{stock-DYOew5RJ.js → stock-BAPhDXd5.js} +1 -1
- package/dist/{supplier-CeQJLRf5.js → supplier-Cf1F-SWs.js} +1 -1
- package/dist/{use-ingredient-select-dialog-DjZg2Cco.js → use-ingredient-select-dialog-CKczsMLr.js} +1 -1
- package/dist/{use-inventory-binding-dialog-CBXOv0gD.js → use-inventory-binding-dialog-Dqce7U2x.js} +1 -1
- package/package.json +2 -2
|
@@ -1,70 +1,70 @@
|
|
|
1
|
-
import { a3 as pt, u as me, aR as O, aS as
|
|
2
|
-
import { ref as M, computed as Z, h as
|
|
3
|
-
import { F as kt } from "./decimal-
|
|
1
|
+
import { a3 as pt, u as me, aR as O, aS as Ae, az as ie, c as $e, b as Te, a8 as vt, aa as yt, ab as ht, aT as bt, e as Xe, f as rt, a0 as Ke, aU as gt, a5 as st, T as nt, j as fe, aV as _t, aW as at, af as qe, h as Ze, i as J, D as ne, aX as ot, aY as it, aZ as Ee, ax as Je, a7 as xe, am as Le, as as St, a_ as ke, Q as wt } from "./app-BPIbY53a.js";
|
|
2
|
+
import { ref as M, computed as Z, h as A, defineComponent as he, reactive as Rt, onMounted as lt, resolveComponent as z, openBlock as g, createBlock as oe, withCtx as ae, createElementVNode as o, createVNode as I, unref as w, createElementBlock as N, toDisplayString as D, createCommentVNode as U, Fragment as se, renderList as ve, watch as Ot, isRef as Nt, normalizeClass as De, createTextVNode as Be, resolveDynamicComponent as xt } from "vue";
|
|
3
|
+
import { F as kt } from "./decimal-CyHGzqNK.js";
|
|
4
4
|
import { useCoreStore as Pe, useI18n as ct } from "@feedmepos/mf-common";
|
|
5
5
|
import { useDialog as je, useSnackbar as Ce, components as et, FmButtonVariant as re, useProxiedModel as Dt } from "@feedmepos/ui-library";
|
|
6
|
-
import { b as qt, u as
|
|
6
|
+
import { b as qt, u as At, P as ye, f as $t } from "./format-unit-display-DAEO7Jpk.js";
|
|
7
7
|
import { E as Tt } from "./empty-placeholder-wf6-BWE8.js";
|
|
8
|
-
import { _ as Pt, F as Ct, a as It } from "./FmUnitInput.vue_vue_type_script_setup_true_lang-
|
|
8
|
+
import { _ as Pt, F as Ct, a as It } from "./FmUnitInput.vue_vue_type_script_setup_true_lang-0-Wrz6h2.js";
|
|
9
9
|
import { u as Ft, R as tt } from "./usePromise-CbVUCxhj.js";
|
|
10
|
-
import { u as Et } from "./index-
|
|
10
|
+
import { u as Et } from "./index-Dp6B8J49.js";
|
|
11
11
|
const Ie = pt((p, e) => {
|
|
12
12
|
const a = me(), b = Pe();
|
|
13
13
|
return {
|
|
14
|
-
async readRequests(
|
|
15
|
-
const i =
|
|
16
|
-
return t &&
|
|
14
|
+
async readRequests(c, t, u) {
|
|
15
|
+
const i = c ?? a.currentLocationDBName, n = `${p.inventoryBackendUrl}/${i}/purchase-request`;
|
|
16
|
+
return t && u ? await e.get(`${n}?startDate=${t}&endDate=${u}`) : await e.get(n);
|
|
17
17
|
},
|
|
18
|
-
async readRequestById(
|
|
19
|
-
const
|
|
18
|
+
async readRequestById(c, t) {
|
|
19
|
+
const u = t ?? a.currentLocationDBName, i = `${p.inventoryBackendUrl}/${u}/purchase-request/${c}`;
|
|
20
20
|
return await e.get(i);
|
|
21
21
|
},
|
|
22
|
-
async readRequestByIds(
|
|
23
|
-
const
|
|
24
|
-
return await e.post(i, { requestIds:
|
|
22
|
+
async readRequestByIds(c, t) {
|
|
23
|
+
const u = t ?? a.currentLocationDBName, i = `${p.inventoryBackendUrl}/${u}/purchase-request/find`;
|
|
24
|
+
return await e.post(i, { requestIds: c });
|
|
25
25
|
},
|
|
26
26
|
async getPurchaseOrders({
|
|
27
|
-
start:
|
|
27
|
+
start: c,
|
|
28
28
|
end: t
|
|
29
29
|
}) {
|
|
30
|
-
const
|
|
31
|
-
return await e.get(`${i}?start=${
|
|
30
|
+
const u = a.currentLocationDBName, i = `${p.inventoryBackendUrl}/${u}/purchase-order`;
|
|
31
|
+
return await e.get(`${i}?start=${c}&end=${t}`);
|
|
32
32
|
},
|
|
33
|
-
async getLatestPurchaseOrderRequest(
|
|
34
|
-
const t = a.currentLocationDBName,
|
|
35
|
-
return await e.get(`${
|
|
33
|
+
async getLatestPurchaseOrderRequest(c) {
|
|
34
|
+
const t = a.currentLocationDBName, u = `${p.inventoryBackendUrl}/${t}/purchase-request/find-by-purchase-order-id`;
|
|
35
|
+
return await e.get(`${u}/${c}`);
|
|
36
36
|
},
|
|
37
|
-
async getPurchaseOrderById(
|
|
38
|
-
const t = a.currentLocationDBName,
|
|
39
|
-
return await e.get(`${
|
|
37
|
+
async getPurchaseOrderById(c) {
|
|
38
|
+
const t = a.currentLocationDBName, u = `${p.inventoryBackendUrl}/${t}/purchase-order`;
|
|
39
|
+
return await e.get(`${u}/${c}`);
|
|
40
40
|
},
|
|
41
41
|
/**
|
|
42
42
|
* @deprecated Use `processPurchaseOrderV2` instead.
|
|
43
43
|
*/
|
|
44
|
-
async processPurchaseOrder(
|
|
45
|
-
const
|
|
46
|
-
return await e.put(n,
|
|
44
|
+
async processPurchaseOrder(c, t) {
|
|
45
|
+
const u = a.currentLocationDBName, i = t || u, n = `${p.inventoryBackendUrl}/${i}/purchase-order/run-operation`;
|
|
46
|
+
return await e.put(n, c);
|
|
47
47
|
},
|
|
48
|
-
async createPurchaseOrder(
|
|
49
|
-
const t = a.currentLocationDBName,
|
|
50
|
-
return await e.post(
|
|
48
|
+
async createPurchaseOrder(c) {
|
|
49
|
+
const t = a.currentLocationDBName, u = `${p.inventoryBackendUrl}/${t}/purchase-order`;
|
|
50
|
+
return await e.post(u, c);
|
|
51
51
|
},
|
|
52
|
-
async updatePurchaseOrder(
|
|
53
|
-
const t = a.currentLocationDBName,
|
|
54
|
-
return await e.put(
|
|
52
|
+
async updatePurchaseOrder(c) {
|
|
53
|
+
const t = a.currentLocationDBName, u = `${p.inventoryBackendUrl}/${t}/purchase-order`;
|
|
54
|
+
return await e.put(u, c);
|
|
55
55
|
},
|
|
56
|
-
async importFromXilnex(
|
|
57
|
-
const t = a.currentLocationDBName,
|
|
58
|
-
return await e.post(
|
|
56
|
+
async importFromXilnex(c) {
|
|
57
|
+
const t = a.currentLocationDBName, u = `${p.inventoryBackendUrl}/${t}/purchase-order/import-from-xilnex`;
|
|
58
|
+
return await e.post(u, c);
|
|
59
59
|
},
|
|
60
|
-
async processPurchaseOrderV2(
|
|
61
|
-
const
|
|
62
|
-
return await e.put(n,
|
|
60
|
+
async processPurchaseOrderV2(c, t) {
|
|
61
|
+
const u = a.currentLocationDBName, i = t || u, n = `${p.inventoryBackendUrl}/${i}/v2/purchase-order/run-operation`;
|
|
62
|
+
return await e.put(n, c);
|
|
63
63
|
},
|
|
64
64
|
async getWorkflowConfig() {
|
|
65
65
|
var i;
|
|
66
|
-
const t = `business_${(i = b.currentBusiness.value) == null ? void 0 : i._id}`,
|
|
67
|
-
return await e.get(
|
|
66
|
+
const t = `business_${(i = b.currentBusiness.value) == null ? void 0 : i._id}`, u = `${p.inventoryBackendUrl}/${t}/v2/purchase-order/workflow-config`;
|
|
67
|
+
return await e.get(u);
|
|
68
68
|
}
|
|
69
69
|
};
|
|
70
70
|
}), ut = {
|
|
@@ -136,17 +136,17 @@ const Ie = pt((p, e) => {
|
|
|
136
136
|
}
|
|
137
137
|
};
|
|
138
138
|
function ze(p) {
|
|
139
|
-
return
|
|
139
|
+
return Ae.generatedPOReceivedMap({
|
|
140
140
|
purchaseOrder: p
|
|
141
141
|
});
|
|
142
142
|
}
|
|
143
143
|
function Lt(p) {
|
|
144
|
-
return
|
|
144
|
+
return Ae.validatePOItemReceivedStatus({
|
|
145
145
|
dto: p
|
|
146
146
|
});
|
|
147
147
|
}
|
|
148
148
|
function dt(p) {
|
|
149
|
-
return
|
|
149
|
+
return Ae.validatePOReceivedStatus({
|
|
150
150
|
receivedMap: p
|
|
151
151
|
});
|
|
152
152
|
}
|
|
@@ -154,30 +154,30 @@ function ft(p, e, a) {
|
|
|
154
154
|
if (!ie.safeParse(p).success)
|
|
155
155
|
throw new Error(`Invalid purchase order status: ${p}`);
|
|
156
156
|
const b = ie.parse(p);
|
|
157
|
-
return
|
|
157
|
+
return Ae.orderStatusCombination({
|
|
158
158
|
status: b,
|
|
159
159
|
isPOPartialReceive: e,
|
|
160
160
|
isPOOverReceive: a
|
|
161
161
|
});
|
|
162
162
|
}
|
|
163
163
|
function mt() {
|
|
164
|
-
const p = me(), e = Ie(), a =
|
|
165
|
-
async function b(t,
|
|
164
|
+
const p = me(), e = Ie(), a = $e();
|
|
165
|
+
async function b(t, u) {
|
|
166
166
|
const i = p.currentLocationDBName;
|
|
167
|
-
return t.doc.supplier.internal && t.operation === O.enum.confirmDraft && (t.operation = O.enum.submitRequest), await e.processPurchaseOrder(t,
|
|
167
|
+
return t.doc.supplier.internal && t.operation === O.enum.confirmDraft && (t.operation = O.enum.submitRequest), await e.processPurchaseOrder(t, u || i);
|
|
168
168
|
}
|
|
169
|
-
async function
|
|
169
|
+
async function c(t, u) {
|
|
170
170
|
const i = p.currentLocationDBName;
|
|
171
|
-
return await e.processPurchaseOrderV2(t,
|
|
171
|
+
return await e.processPurchaseOrderV2(t, u || i);
|
|
172
172
|
}
|
|
173
|
-
return (t) => a.useOperatePurchaseOrderV2 ?
|
|
173
|
+
return (t) => a.useOperatePurchaseOrderV2 ? c(t.operateV2, t.transferTo) : b(t.operate, t.transferTo);
|
|
174
174
|
}
|
|
175
175
|
var Me = /* @__PURE__ */ ((p) => (p.RECEIVE_REQUEST = "receive/request", p.APPROVAL = "approval", p))(Me || {});
|
|
176
176
|
const Oe = M(), Ve = M();
|
|
177
177
|
function zs(p, e) {
|
|
178
|
-
const a = je(), b = me(),
|
|
178
|
+
const a = je(), b = me(), c = $e();
|
|
179
179
|
Te();
|
|
180
|
-
const t = qt(),
|
|
180
|
+
const t = qt(), u = At(), i = M(!1), n = Ce(), h = Ie(), _ = M(new Array()), v = M(
|
|
181
181
|
e != null && e.startDate && (e != null && e.endDate) ? e : vt()
|
|
182
182
|
), m = Z(() => {
|
|
183
183
|
const k = new Date(v.value.startDate), T = new Date(v.value.endDate);
|
|
@@ -186,7 +186,7 @@ function zs(p, e) {
|
|
|
186
186
|
end: ht(T).toISOString()
|
|
187
187
|
};
|
|
188
188
|
}), l = M(new Array()), r = bt(), d = M(null);
|
|
189
|
-
async function
|
|
189
|
+
async function S(k) {
|
|
190
190
|
function T(s) {
|
|
191
191
|
const f = {
|
|
192
192
|
mode: Xe.CREATE,
|
|
@@ -201,7 +201,7 @@ function zs(p, e) {
|
|
|
201
201
|
Oe.value = f;
|
|
202
202
|
}
|
|
203
203
|
let H;
|
|
204
|
-
|
|
204
|
+
c.mustUsePoTemplate && !(k != null && k.template) ? a.open({
|
|
205
205
|
title: "Create transfer",
|
|
206
206
|
message: "",
|
|
207
207
|
primaryActions: {
|
|
@@ -236,7 +236,7 @@ function zs(p, e) {
|
|
|
236
236
|
try {
|
|
237
237
|
_.value = await h.getPurchaseOrders(m.value).then((s) => s.sort((f, R) => R._id.localeCompare(f._id)));
|
|
238
238
|
const k = await r.readCurrentLocationLastClosing(!0), T = k == null ? void 0 : k._id;
|
|
239
|
-
T && (d.value = gt(T)), await
|
|
239
|
+
T && (d.value = gt(T)), await c.awaitFeatureLoaded(() => c.mustUsePoTemplate) && await u.fetchTemplates();
|
|
240
240
|
const H = _.value.map((s) => {
|
|
241
241
|
var f;
|
|
242
242
|
return ((f = s.request) == null ? void 0 : f.id) ?? "";
|
|
@@ -252,7 +252,7 @@ function zs(p, e) {
|
|
|
252
252
|
i.value = !1;
|
|
253
253
|
}
|
|
254
254
|
}
|
|
255
|
-
async function
|
|
255
|
+
async function $() {
|
|
256
256
|
l.value = [], i.value = !0;
|
|
257
257
|
try {
|
|
258
258
|
l.value = await h.readRequests(
|
|
@@ -275,7 +275,7 @@ function zs(p, e) {
|
|
|
275
275
|
case "receive/request":
|
|
276
276
|
return E();
|
|
277
277
|
case "approval":
|
|
278
|
-
return
|
|
278
|
+
return $();
|
|
279
279
|
}
|
|
280
280
|
}
|
|
281
281
|
function K(k, T) {
|
|
@@ -324,7 +324,7 @@ function zs(p, e) {
|
|
|
324
324
|
options: (
|
|
325
325
|
// auto receive for supplier to warehouse
|
|
326
326
|
(T === O.enum.confirmDraft || // auto receive for warehouse to warehouse
|
|
327
|
-
T === O.enum.completeReceive) &&
|
|
327
|
+
T === O.enum.completeReceive) && c.autoReceiveWarehouse ? {
|
|
328
328
|
autoReceive: !0
|
|
329
329
|
} : void 0
|
|
330
330
|
)
|
|
@@ -404,7 +404,7 @@ function zs(p, e) {
|
|
|
404
404
|
fetchData: P,
|
|
405
405
|
loading: i,
|
|
406
406
|
transferDialogProps: Oe,
|
|
407
|
-
promptCreateTransferDialog:
|
|
407
|
+
promptCreateTransferDialog: S,
|
|
408
408
|
promptUpdateTransferDialog: x,
|
|
409
409
|
transferDetailsProps: G,
|
|
410
410
|
promptShowTransferDetails: le,
|
|
@@ -415,16 +415,16 @@ function zs(p, e) {
|
|
|
415
415
|
}
|
|
416
416
|
function Bt(p, e) {
|
|
417
417
|
return e.reduce(
|
|
418
|
-
(b,
|
|
419
|
-
const t =
|
|
418
|
+
(b, c) => {
|
|
419
|
+
const t = c.received.find((u) => u.sku._id === p._id);
|
|
420
420
|
return t && (b = st(b, t.amount)), b;
|
|
421
421
|
},
|
|
422
422
|
kt.toPrecision(nt(0), p.unit.precision)
|
|
423
423
|
);
|
|
424
424
|
}
|
|
425
425
|
function Vt(p) {
|
|
426
|
-
const { po: e, currentLocation: a, business: b, fulfilling:
|
|
427
|
-
name:
|
|
426
|
+
const { po: e, currentLocation: a, business: b, fulfilling: c, por: t } = p, { name: u, address: i, regNo: n } = a.doc.profile, h = {
|
|
427
|
+
name: u,
|
|
428
428
|
registrationNumber: n,
|
|
429
429
|
line1: i == null ? void 0 : i.line1,
|
|
430
430
|
line2: i == null ? void 0 : i.line2,
|
|
@@ -442,26 +442,26 @@ function Vt(p) {
|
|
|
442
442
|
city: e.supplier.address.city,
|
|
443
443
|
state: e.supplier.address.state,
|
|
444
444
|
country: e.supplier.address.country
|
|
445
|
-
}, v = e.items.map((
|
|
446
|
-
const { sku: P, measurement: K } =
|
|
447
|
-
Bt(
|
|
445
|
+
}, v = e.items.map(($) => {
|
|
446
|
+
const { sku: P, measurement: K } = $, G = fe(
|
|
447
|
+
Bt($.sku, e.deliveryOrder || []),
|
|
448
448
|
!1
|
|
449
449
|
);
|
|
450
450
|
return {
|
|
451
451
|
code: P.code,
|
|
452
452
|
description: P.name,
|
|
453
|
-
quantity: fe(
|
|
453
|
+
quantity: fe($.quantity, !1),
|
|
454
454
|
unit: (K == null ? void 0 : K.abbrev) || P.unit.abbrev,
|
|
455
455
|
received: G,
|
|
456
|
-
cost:
|
|
457
|
-
value:
|
|
456
|
+
cost: $.totalCost ? `${$.totalCost.currency} ${_t.toFormatString({
|
|
457
|
+
value: $.totalCost
|
|
458
458
|
})}` : void 0
|
|
459
459
|
};
|
|
460
|
-
}), m = e.deliveryOrder.map((
|
|
461
|
-
createdAt: at(new Date(
|
|
462
|
-
ref:
|
|
463
|
-
remark:
|
|
464
|
-
items:
|
|
460
|
+
}), m = e.deliveryOrder.map(($) => ({
|
|
461
|
+
createdAt: at(new Date($.createdAt)),
|
|
462
|
+
ref: $.deliveryOrderNumber,
|
|
463
|
+
remark: $.remark || "",
|
|
464
|
+
items: $.received.map((P) => {
|
|
465
465
|
var K;
|
|
466
466
|
return {
|
|
467
467
|
code: P.sku.code,
|
|
@@ -478,10 +478,10 @@ function Vt(p) {
|
|
|
478
478
|
];
|
|
479
479
|
let r = "Inventory Receive Note";
|
|
480
480
|
if (e.supplier.internal ? (r = "Inventory Transfer Note", l.includes((b == null ? void 0 : b._id) || "") && (r = "Stock Request")) : r = "Purchase Order", t) {
|
|
481
|
-
const
|
|
482
|
-
a.dbName ===
|
|
481
|
+
const $ = t.from.dbName;
|
|
482
|
+
a.dbName === $ || (r = "Inventory Receive Note");
|
|
483
483
|
}
|
|
484
|
-
const
|
|
484
|
+
const S = {
|
|
485
485
|
title: r,
|
|
486
486
|
businessName: b == null ? void 0 : b.name,
|
|
487
487
|
logo: b == null ? void 0 : b.thumbnail,
|
|
@@ -494,8 +494,8 @@ function Vt(p) {
|
|
|
494
494
|
items: v,
|
|
495
495
|
status: e.status,
|
|
496
496
|
deliveryOrders: m
|
|
497
|
-
}, x = new URL(window.location.href), E =
|
|
498
|
-
x.pathname = x.hostname.includes("portal.feedme") ? `/inventory/${E}` : `/${E}`, x.searchParams.append("data", JSON.stringify(
|
|
497
|
+
}, x = new URL(window.location.href), E = c && (e.deliveryFullfillment || []).length > 0 ? "receive-request/delivery-print-preview" : "receive-request/print-preview";
|
|
498
|
+
x.pathname = x.hostname.includes("portal.feedme") ? `/inventory/${E}` : `/${E}`, x.searchParams.append("data", JSON.stringify(S)), window.open(x.href, "_blank", "noreferrer");
|
|
499
499
|
}
|
|
500
500
|
const Se = {
|
|
501
501
|
submitRequest: {
|
|
@@ -560,8 +560,8 @@ const Se = {
|
|
|
560
560
|
}
|
|
561
561
|
};
|
|
562
562
|
function Hs(p, e) {
|
|
563
|
-
const a = me(), b = Te(),
|
|
564
|
-
function
|
|
563
|
+
const a = me(), b = Te(), c = Pe(), { t } = ct();
|
|
564
|
+
function u(m) {
|
|
565
565
|
switch (m.status) {
|
|
566
566
|
case "DRAFT":
|
|
567
567
|
return [
|
|
@@ -595,14 +595,14 @@ function Hs(p, e) {
|
|
|
595
595
|
return Object.values(O.enum).includes(m);
|
|
596
596
|
}
|
|
597
597
|
async function n(m, l, r) {
|
|
598
|
-
var
|
|
598
|
+
var S, x, E, $, P, K;
|
|
599
599
|
const d = rt(l);
|
|
600
600
|
if (m === J.Print) {
|
|
601
601
|
const G = (r == null ? void 0 : r.toInventoryLocation) ?? a.currentLocation;
|
|
602
|
-
((
|
|
602
|
+
((S = r == null ? void 0 : r.netSuite) != null && S.refNo || (x = d.netSuite) != null && x.refNo) && (d.ref = [((E = r == null ? void 0 : r.netSuite) == null ? void 0 : E.refNo) || (($ = d.netSuite) == null ? void 0 : $.refNo)].filter((ce) => ce).join(" ")), Vt({
|
|
603
603
|
po: d,
|
|
604
604
|
currentLocation: G,
|
|
605
|
-
business:
|
|
605
|
+
business: c.currentBusiness.value,
|
|
606
606
|
fulfilling: p === "approval",
|
|
607
607
|
por: r
|
|
608
608
|
});
|
|
@@ -648,10 +648,11 @@ function Hs(p, e) {
|
|
|
648
648
|
accessorKey: "items.length",
|
|
649
649
|
header: () => t("inventory.transfer.table.noOfItems"),
|
|
650
650
|
cell: (l) => {
|
|
651
|
+
var S;
|
|
651
652
|
const r = l.row.original.version || "1", d = l.getValue();
|
|
652
|
-
return
|
|
653
|
+
return A("div", { class: "flex items-center gap-2" }, [
|
|
653
654
|
d,
|
|
654
|
-
r !== "1" ?
|
|
655
|
+
r !== "1" && ((S = c.sessionUser.value) != null && S.role.isAdmin) ? A(
|
|
655
656
|
"div",
|
|
656
657
|
{
|
|
657
658
|
class: ["fm-status-badge", "fm-status-badge-draft"].join(" ")
|
|
@@ -675,20 +676,20 @@ function Hs(p, e) {
|
|
|
675
676
|
accessorKey: "status",
|
|
676
677
|
header: () => t("inventory.transfer.table.status"),
|
|
677
678
|
cell(l) {
|
|
678
|
-
const r = l.getValue(), d = ze(l.row.original), { partial:
|
|
679
|
-
`inventory.transfer.status.${ft(r ?? "",
|
|
680
|
-
),
|
|
681
|
-
return
|
|
679
|
+
const r = l.getValue(), d = ze(l.row.original), { partial: S, over: x } = dt(d), E = t(
|
|
680
|
+
`inventory.transfer.status.${ft(r ?? "", S, x)}`
|
|
681
|
+
), $ = `${r ?? ""}`.toLocaleLowerCase("en-us");
|
|
682
|
+
return A(
|
|
682
683
|
"div",
|
|
683
684
|
{
|
|
684
685
|
class: "flex"
|
|
685
686
|
},
|
|
686
|
-
|
|
687
|
+
A(
|
|
687
688
|
"div",
|
|
688
689
|
{
|
|
689
690
|
class: [
|
|
690
691
|
"fm-status-badge",
|
|
691
|
-
`fm-status-badge-${
|
|
692
|
+
`fm-status-badge-${$}`,
|
|
692
693
|
x && "fm-status-badge-error"
|
|
693
694
|
].filter(Boolean).join(" ")
|
|
694
695
|
},
|
|
@@ -702,8 +703,8 @@ function Hs(p, e) {
|
|
|
702
703
|
{
|
|
703
704
|
id: "action",
|
|
704
705
|
cell(l) {
|
|
705
|
-
const r = l.row.original, d =
|
|
706
|
-
return Ze(d, (
|
|
706
|
+
const r = l.row.original, d = u(r);
|
|
707
|
+
return Ze(d, (S) => n(S, r));
|
|
707
708
|
},
|
|
708
709
|
enableSorting: !1,
|
|
709
710
|
size: 40,
|
|
@@ -723,9 +724,9 @@ function Hs(p, e) {
|
|
|
723
724
|
},
|
|
724
725
|
header: () => "NetSuite Order (ID)",
|
|
725
726
|
cell(r) {
|
|
726
|
-
var
|
|
727
|
+
var S;
|
|
727
728
|
const d = r.row.original;
|
|
728
|
-
return (
|
|
729
|
+
return (S = d.netSuite) != null && S.id ? `${d.netSuite.refNo} (${d.netSuite.id})` : "N/A";
|
|
729
730
|
},
|
|
730
731
|
enableSorting: !1,
|
|
731
732
|
size: 200,
|
|
@@ -737,13 +738,13 @@ function Hs(p, e) {
|
|
|
737
738
|
{
|
|
738
739
|
id: "netsuiteTransactionNumber",
|
|
739
740
|
accessorFn: (r) => {
|
|
740
|
-
var d,
|
|
741
|
-
return ((
|
|
741
|
+
var d, S;
|
|
742
|
+
return ((S = (d = r.netSuite) == null ? void 0 : d.additionalInfo) == null ? void 0 : S.transactionnumber) ?? "N/A";
|
|
742
743
|
},
|
|
743
744
|
header: () => "NetSuite Transaction No.",
|
|
744
745
|
cell(r) {
|
|
745
|
-
var
|
|
746
|
-
return ((x = (
|
|
746
|
+
var S, x;
|
|
747
|
+
return ((x = (S = r.row.original.netSuite) == null ? void 0 : S.additionalInfo) == null ? void 0 : x.transactionnumber) ?? "N/A";
|
|
747
748
|
},
|
|
748
749
|
enableSorting: !1,
|
|
749
750
|
size: 200,
|
|
@@ -795,14 +796,14 @@ function Hs(p, e) {
|
|
|
795
796
|
accessorKey: "purchaseOrder.status",
|
|
796
797
|
header: () => t("inventory.transfer.table.status"),
|
|
797
798
|
cell(l) {
|
|
798
|
-
var
|
|
799
|
-
const r = l.row.original, d = l.getValue(),
|
|
800
|
-
return
|
|
799
|
+
var $, P;
|
|
800
|
+
const r = l.row.original, d = l.getValue(), S = d === "RECEIVING" && (((P = ($ = r.purchaseOrder) == null ? void 0 : $.deliveryOrder) == null ? void 0 : P.length) ?? 0) > 0, x = t(S ? "inventory.transfer.status.PARTIAL_RECEIVED" : `inventory.transfer.status.${d ?? ""}`), E = S ? "partially_received" : `${d ?? ""}`.toLocaleLowerCase("en-us");
|
|
801
|
+
return A(
|
|
801
802
|
"div",
|
|
802
803
|
{
|
|
803
804
|
class: "flex"
|
|
804
805
|
},
|
|
805
|
-
|
|
806
|
+
A(
|
|
806
807
|
"div",
|
|
807
808
|
{
|
|
808
809
|
class: `fm-status-badge fm-status-badge-${E}`
|
|
@@ -816,12 +817,12 @@ function Hs(p, e) {
|
|
|
816
817
|
{
|
|
817
818
|
id: "action",
|
|
818
819
|
cell(l) {
|
|
819
|
-
const r = l.row.original,
|
|
820
|
+
const r = l.row.original, S = (r.purchaseOrder ? u(r.purchaseOrder) : []).map((x) => x.value === J.Print ? {
|
|
820
821
|
...x,
|
|
821
822
|
translationKey: "inventory.transfer.receiveRequest.details.printDeliveryOrder"
|
|
822
823
|
} : x);
|
|
823
824
|
return Ze(
|
|
824
|
-
|
|
825
|
+
S,
|
|
825
826
|
(x) => r.purchaseOrder ? n(x, r.purchaseOrder, r) : void 0
|
|
826
827
|
);
|
|
827
828
|
},
|
|
@@ -843,9 +844,9 @@ function Hs(p, e) {
|
|
|
843
844
|
},
|
|
844
845
|
header: () => "NetSuite Order (ID)",
|
|
845
846
|
cell(r) {
|
|
846
|
-
var
|
|
847
|
+
var S;
|
|
847
848
|
const d = r.row.original;
|
|
848
|
-
return (
|
|
849
|
+
return (S = d.netSuite) != null && S.id ? `${d.netSuite.refNo} (${d.netSuite.id})` : "N/A";
|
|
849
850
|
},
|
|
850
851
|
enableSorting: !1,
|
|
851
852
|
size: 200,
|
|
@@ -857,13 +858,13 @@ function Hs(p, e) {
|
|
|
857
858
|
{
|
|
858
859
|
id: "netsuiteTransactionNumber",
|
|
859
860
|
accessorFn: (r) => {
|
|
860
|
-
var d,
|
|
861
|
-
return ((
|
|
861
|
+
var d, S;
|
|
862
|
+
return ((S = (d = r.netSuite) == null ? void 0 : d.additionalInfo) == null ? void 0 : S.transactionnumber) ?? "N/A";
|
|
862
863
|
},
|
|
863
864
|
header: () => "NetSuite Transaction No.",
|
|
864
865
|
cell(r) {
|
|
865
|
-
var
|
|
866
|
-
return ((x = (
|
|
866
|
+
var S, x;
|
|
867
|
+
return ((x = (S = r.row.original.netSuite) == null ? void 0 : S.additionalInfo) == null ? void 0 : x.transactionnumber) ?? "N/A";
|
|
867
868
|
},
|
|
868
869
|
enableSorting: !1,
|
|
869
870
|
size: 200,
|
|
@@ -893,7 +894,7 @@ const Ut = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
893
894
|
id: "",
|
|
894
895
|
createdAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
895
896
|
items: []
|
|
896
|
-
}),
|
|
897
|
+
}), c = M(), t = e;
|
|
897
898
|
lt(() => {
|
|
898
899
|
a.purchaseOrder && (b.items = a.purchaseOrder.items.map((i) => ({
|
|
899
900
|
id: i.id,
|
|
@@ -902,12 +903,12 @@ const Ut = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
902
903
|
amount: i.quantity ?? { amount: 1, precision: 0 }
|
|
903
904
|
})));
|
|
904
905
|
});
|
|
905
|
-
const
|
|
906
|
+
const u = Z(() => b.items.length <= 10);
|
|
906
907
|
return (i, n) => {
|
|
907
908
|
const h = z("FmTable"), _ = z("FmButton"), v = z("FmForm");
|
|
908
909
|
return g(), oe(v, {
|
|
909
910
|
ref_key: "formRef",
|
|
910
|
-
ref:
|
|
911
|
+
ref: c,
|
|
911
912
|
class: "bg-white flex flex-col gap-32 rounded-3xl p-24 w-[800px]",
|
|
912
913
|
onValidationFailed: console.log,
|
|
913
914
|
onValidationSuccess: n[1] || (n[1] = () => a.confirm(b))
|
|
@@ -922,15 +923,15 @@ const Ut = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
922
923
|
header: "Code",
|
|
923
924
|
cell: (m) => {
|
|
924
925
|
const l = a.purchaseOrder.items.find((r) => r.id === m.row.original.id || r.sku._id === m.row.original.sku._id);
|
|
925
|
-
return
|
|
926
|
-
|
|
926
|
+
return A(
|
|
927
|
+
w(et).FmTooltip,
|
|
927
928
|
{
|
|
928
929
|
content: l.code,
|
|
929
930
|
placement: "top",
|
|
930
931
|
variant: "plain",
|
|
931
932
|
zIndex: 50
|
|
932
933
|
},
|
|
933
|
-
|
|
934
|
+
A(
|
|
934
935
|
"span",
|
|
935
936
|
{
|
|
936
937
|
class: "flex-auto line-clamp-2 text-ellipsis break-all"
|
|
@@ -944,15 +945,15 @@ const Ut = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
944
945
|
header: "Name",
|
|
945
946
|
cell: (m) => {
|
|
946
947
|
const l = a.purchaseOrder.items.find((r) => r.id === m.row.original.id || r.sku._id === m.row.original.sku._id);
|
|
947
|
-
return
|
|
948
|
-
|
|
948
|
+
return A(
|
|
949
|
+
w(et).FmTooltip,
|
|
949
950
|
{
|
|
950
951
|
content: l.name,
|
|
951
952
|
placement: "top",
|
|
952
953
|
variant: "plain",
|
|
953
954
|
zIndex: 50
|
|
954
955
|
},
|
|
955
|
-
|
|
956
|
+
A(
|
|
956
957
|
"span",
|
|
957
958
|
{
|
|
958
959
|
class: "flex-auto line-clamp-2 text-ellipsis break-all"
|
|
@@ -965,11 +966,11 @@ const Ut = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
965
966
|
{
|
|
966
967
|
header: "Amount",
|
|
967
968
|
cell: (m) => {
|
|
968
|
-
const l = m.row.original, r = a.purchaseOrder.items.find((
|
|
969
|
+
const l = m.row.original, r = a.purchaseOrder.items.find((S) => S.id === l.id || S.sku._id === l.sku._id), d = l.amount ?? {
|
|
969
970
|
amount: 1,
|
|
970
971
|
precision: 0
|
|
971
972
|
};
|
|
972
|
-
return
|
|
973
|
+
return A(Pt, {
|
|
973
974
|
style: {
|
|
974
975
|
flex: "1 1 0%"
|
|
975
976
|
},
|
|
@@ -979,17 +980,17 @@ const Ut = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
979
980
|
},
|
|
980
981
|
key: l.id ?? l.sku._id,
|
|
981
982
|
unit: l.sku.unit,
|
|
982
|
-
"onUpdate:modelValue": (
|
|
983
|
-
if (!
|
|
983
|
+
"onUpdate:modelValue": (S) => {
|
|
984
|
+
if (!S) return;
|
|
984
985
|
const x = b.items.find((E) => E.id === l.id || E.sku._id === l.sku._id);
|
|
985
|
-
x && (x.amount =
|
|
986
|
+
x && (x.amount = S.amount);
|
|
986
987
|
},
|
|
987
988
|
disableUnit: !0,
|
|
988
989
|
rules: [
|
|
989
|
-
|
|
990
|
-
+
|
|
990
|
+
w(Ct)(
|
|
991
|
+
+w(fe)({ amount: 0, precision: 0 })
|
|
991
992
|
),
|
|
992
|
-
|
|
993
|
+
w(It)(+w(fe)(r.quantity))
|
|
993
994
|
],
|
|
994
995
|
applyDefaultRules: !0
|
|
995
996
|
});
|
|
@@ -997,7 +998,7 @@ const Ut = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
997
998
|
}
|
|
998
999
|
],
|
|
999
1000
|
"row-data": b.items,
|
|
1000
|
-
"hide-footer":
|
|
1001
|
+
"hide-footer": u.value
|
|
1001
1002
|
}, null, 8, ["column-defs", "row-data", "hide-footer"])
|
|
1002
1003
|
])
|
|
1003
1004
|
]),
|
|
@@ -1088,7 +1089,7 @@ const Ut = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
1088
1089
|
}
|
|
1089
1090
|
};
|
|
1090
1091
|
function zt() {
|
|
1091
|
-
const p =
|
|
1092
|
+
const p = $e();
|
|
1092
1093
|
return {
|
|
1093
1094
|
ableToMarkReceived(e) {
|
|
1094
1095
|
if (!e || e.status !== ie.enum.RECEIVING)
|
|
@@ -1100,11 +1101,11 @@ function zt() {
|
|
|
1100
1101
|
return !(!e || (e == null ? void 0 : e.status) !== ie.enum.REQUESTING);
|
|
1101
1102
|
},
|
|
1102
1103
|
ableToCreateFulfillment(e, a) {
|
|
1103
|
-
var t,
|
|
1104
|
+
var t, u;
|
|
1104
1105
|
if (!p.acceptRequireFulfillment || !e || !a || e.status !== ie.enum.PROCESSING || !a.processedAt)
|
|
1105
1106
|
return !1;
|
|
1106
|
-
const b = (t = a == null ? void 0 : a.from) == null ? void 0 : t.dbName,
|
|
1107
|
-
return !(b.startsWith("restaurant_") &&
|
|
1107
|
+
const b = (t = a == null ? void 0 : a.from) == null ? void 0 : t.dbName, c = (u = a == null ? void 0 : a.to) == null ? void 0 : u.dbName;
|
|
1108
|
+
return !(b.startsWith("restaurant_") && c.startsWith("restaurant_"));
|
|
1108
1109
|
}
|
|
1109
1110
|
};
|
|
1110
1111
|
}
|
|
@@ -1117,7 +1118,7 @@ const Ht = { class: "flex flex-row-reverse" }, Gt = /* @__PURE__ */ he({
|
|
|
1117
1118
|
scope: {}
|
|
1118
1119
|
},
|
|
1119
1120
|
setup(p) {
|
|
1120
|
-
const e = p, a = Te(), b = Ce(),
|
|
1121
|
+
const e = p, a = Te(), b = Ce(), c = je(), t = M(!1);
|
|
1121
1122
|
Z(() => {
|
|
1122
1123
|
var _, v, m, l;
|
|
1123
1124
|
let i = !0;
|
|
@@ -1125,13 +1126,13 @@ const Ht = { class: "flex flex-row-reverse" }, Gt = /* @__PURE__ */ he({
|
|
|
1125
1126
|
const n = e.purchaseOrder, h = e.poRequest;
|
|
1126
1127
|
return n && ((_ = n == null ? void 0 : n.supplier) != null && _.internal ? (!h && n.status == ie.enum.DRAFT && (i = !1), h && !((v = h == null ? void 0 : h.netSuite) != null && v.id) && (i = !1), e.isTransferBetweenOutlets && (i = !1)) : ((n == null ? void 0 : n.status) !== ie.enum.REQUESTING && n.supplier.internal && (i = !1), !h && !((m = n == null ? void 0 : n.netSuite) != null && m.id) && (i = !1), !h && ((l = n == null ? void 0 : n.netSuite) != null && l.id) && (n == null ? void 0 : n.status) == ie.enum.REQUESTING && (i = !1))), i;
|
|
1127
1128
|
});
|
|
1128
|
-
async function
|
|
1129
|
-
t.value ||
|
|
1129
|
+
async function u() {
|
|
1130
|
+
t.value || c.open({
|
|
1130
1131
|
title: "Sync with NetSuite",
|
|
1131
|
-
contentComponent:
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1132
|
+
contentComponent: A("div", [
|
|
1133
|
+
A("p", "Are you sure you want to sync now?"),
|
|
1134
|
+
A("br"),
|
|
1135
|
+
A(
|
|
1135
1136
|
"p",
|
|
1136
1137
|
{ class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" },
|
|
1137
1138
|
"Please wait a moment before syncing manually to avoid unnecessary actions."
|
|
@@ -1173,7 +1174,7 @@ const Ht = { class: "flex flex-row-reverse" }, Gt = /* @__PURE__ */ he({
|
|
|
1173
1174
|
variant: "secondary",
|
|
1174
1175
|
label: "Sync",
|
|
1175
1176
|
loading: t.value,
|
|
1176
|
-
onClick:
|
|
1177
|
+
onClick: u,
|
|
1177
1178
|
"text-color": "primary",
|
|
1178
1179
|
"bg-color": "transparent",
|
|
1179
1180
|
"border-color": "primary"
|
|
@@ -1207,12 +1208,12 @@ const Ht = { class: "flex flex-row-reverse" }, Gt = /* @__PURE__ */ he({
|
|
|
1207
1208
|
scope: {}
|
|
1208
1209
|
},
|
|
1209
1210
|
setup(p) {
|
|
1210
|
-
const e = p, a = Te(), b = Ie(),
|
|
1211
|
+
const e = p, a = Te(), b = Ie(), c = M(e.poRequest);
|
|
1211
1212
|
lt(async () => {
|
|
1212
1213
|
var n;
|
|
1213
1214
|
if (!e.poRequest && ((n = e.purchaseOrder) != null && n._id)) {
|
|
1214
1215
|
const h = await b.getLatestPurchaseOrderRequest(e.purchaseOrder._id);
|
|
1215
|
-
|
|
1216
|
+
c.value = h;
|
|
1216
1217
|
}
|
|
1217
1218
|
});
|
|
1218
1219
|
const t = Z(
|
|
@@ -1222,9 +1223,9 @@ const Ht = { class: "flex flex-row-reverse" }, Gt = /* @__PURE__ */ he({
|
|
|
1222
1223
|
((_ = (h = (n = e.purchaseOrder) == null ? void 0 : n.netSuite) == null ? void 0 : h.subsidiary) == null ? void 0 : _.id) || ((l = (m = (v = e.poRequest) == null ? void 0 : v.netSuite) == null ? void 0 : m.subsidiary) == null ? void 0 : l.id)
|
|
1223
1224
|
).fullName;
|
|
1224
1225
|
}
|
|
1225
|
-
),
|
|
1226
|
-
var n, h, _, v, m, l, r, d,
|
|
1227
|
-
return (_ = (h = (n = e.purchaseOrder) == null ? void 0 : n.netSuite) == null ? void 0 : h.additionalInfo) != null && _.transactionnumber ? (l = (m = (v = e.purchaseOrder) == null ? void 0 : v.netSuite) == null ? void 0 : m.additionalInfo) == null ? void 0 : l.transactionnumber : (
|
|
1226
|
+
), u = Z(() => {
|
|
1227
|
+
var n, h, _, v, m, l, r, d, S, x, E, $;
|
|
1228
|
+
return (_ = (h = (n = e.purchaseOrder) == null ? void 0 : n.netSuite) == null ? void 0 : h.additionalInfo) != null && _.transactionnumber ? (l = (m = (v = e.purchaseOrder) == null ? void 0 : v.netSuite) == null ? void 0 : m.additionalInfo) == null ? void 0 : l.transactionnumber : (S = (d = (r = c.value) == null ? void 0 : r.netSuite) == null ? void 0 : d.additionalInfo) != null && S.transactionnumber ? ($ = (E = (x = c.value) == null ? void 0 : x.netSuite) == null ? void 0 : E.additionalInfo) == null ? void 0 : $.transactionnumber : null;
|
|
1228
1229
|
}), i = Z(() => {
|
|
1229
1230
|
var n, h, _, v, m, l;
|
|
1230
1231
|
return (h = (n = e.purchaseOrder) == null ? void 0 : n.deliveryFullfillment) != null && h.length && ((v = (_ = e.purchaseOrder) == null ? void 0 : _.deliveryFullfillment) == null ? void 0 : v.length) > 0 ? (l = (m = e.purchaseOrder) == null ? void 0 : m.deliveryFullfillment) == null ? void 0 : l.map((r) => {
|
|
@@ -1233,29 +1234,29 @@ const Ht = { class: "flex flex-row-reverse" }, Gt = /* @__PURE__ */ he({
|
|
|
1233
1234
|
}).join(", ") : "N/A";
|
|
1234
1235
|
});
|
|
1235
1236
|
return (n, h) => {
|
|
1236
|
-
var _, v, m, l, r, d,
|
|
1237
|
-
return
|
|
1237
|
+
var _, v, m, l, r, d, S, x, E, $, P, K, G, ce, le, be;
|
|
1238
|
+
return w(a).isEnabled ? (g(), N("div", Wt, [
|
|
1238
1239
|
o("div", Yt, [
|
|
1239
1240
|
h[0] || (h[0] = o("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, "NetSuite subsidiary", -1)),
|
|
1240
1241
|
o("div", Qt, D(t.value || "N/A"), 1)
|
|
1241
1242
|
]),
|
|
1242
|
-
!n.isTransferBetweenOutlets && n.scope ===
|
|
1243
|
-
o("div", Zt, " NetSuite " + D((v = (_ = n.purchaseOrder) == null ? void 0 : _.netSuite) != null && v.recordType ?
|
|
1243
|
+
!n.isTransferBetweenOutlets && n.scope === w(Me).RECEIVE_REQUEST ? (g(), N("div", Xt, [
|
|
1244
|
+
o("div", Zt, " NetSuite " + D((v = (_ = n.purchaseOrder) == null ? void 0 : _.netSuite) != null && v.recordType ? w(ot)((l = (m = n.purchaseOrder) == null ? void 0 : m.netSuite) == null ? void 0 : l.recordType) : n.transferType === w(ye).PURCHASE ? "Purchase Order" : "Transfer Order") + " (ID) ", 1),
|
|
1244
1245
|
o("div", Jt, [
|
|
1245
|
-
(d = (r = n.purchaseOrder) == null ? void 0 : r.netSuite) != null && d.id ? (g(), N("span", er, D((x = (
|
|
1246
|
+
(d = (r = n.purchaseOrder) == null ? void 0 : r.netSuite) != null && d.id ? (g(), N("span", er, D((x = (S = n.purchaseOrder) == null ? void 0 : S.netSuite) == null ? void 0 : x.refNo) + " (" + D(($ = (E = n.purchaseOrder) == null ? void 0 : E.netSuite) == null ? void 0 : $.id) + ") ", 1)) : (g(), N("span", tr, "N/A"))
|
|
1246
1247
|
])
|
|
1247
1248
|
])) : U("", !0),
|
|
1248
|
-
!n.isTransferBetweenOutlets &&
|
|
1249
|
-
o("div", sr, " (Request) NetSuite " + D(n.transferType ===
|
|
1249
|
+
!n.isTransferBetweenOutlets && c.value || n.scope === w(Me).APPROVAL ? (g(), N("div", rr, [
|
|
1250
|
+
o("div", sr, " (Request) NetSuite " + D(n.transferType === w(ye).PURCHASE ? "Purchase Order" : "Transfer Order") + " (ID) ", 1),
|
|
1250
1251
|
o("div", nr, [
|
|
1251
|
-
(K = (P =
|
|
1252
|
+
(K = (P = c.value) == null ? void 0 : P.netSuite) != null && K.id ? (g(), N("span", ar, D((ce = (G = c.value) == null ? void 0 : G.netSuite) == null ? void 0 : ce.refNo) + " (" + D((be = (le = c.value) == null ? void 0 : le.netSuite) == null ? void 0 : be.id) + ") ", 1)) : (g(), N("span", or, "N/A"))
|
|
1252
1253
|
])
|
|
1253
1254
|
])) : U("", !0),
|
|
1254
|
-
|
|
1255
|
+
u.value ? (g(), N("div", ir, [
|
|
1255
1256
|
h[1] || (h[1] = o("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " NetSuite Transaction Number ", -1)),
|
|
1256
|
-
o("div", lr, D(
|
|
1257
|
+
o("div", lr, D(u.value), 1)
|
|
1257
1258
|
])) : U("", !0),
|
|
1258
|
-
|
|
1259
|
+
w(a).isEnabled && n.transferType === w(ye).TRANSFER && !n.isTransferBetweenOutlets ? (g(), N("div", cr, [
|
|
1259
1260
|
h[2] || (h[2] = o("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " NetSuite fulfillment IDs ", -1)),
|
|
1260
1261
|
o("div", ur, D(i.value), 1)
|
|
1261
1262
|
])) : U("", !0)
|
|
@@ -1270,20 +1271,20 @@ const Ht = { class: "flex flex-row-reverse" }, Gt = /* @__PURE__ */ he({
|
|
|
1270
1271
|
},
|
|
1271
1272
|
setup(p) {
|
|
1272
1273
|
const e = Ce(), a = it();
|
|
1273
|
-
async function b(
|
|
1274
|
-
const
|
|
1275
|
-
if (
|
|
1274
|
+
async function b(c, t) {
|
|
1275
|
+
const u = [];
|
|
1276
|
+
if (c && u.push(`body.message:*${c}*`), t) {
|
|
1276
1277
|
const _ = t.replace(/:/g, "\\:");
|
|
1277
|
-
|
|
1278
|
+
u.push(`${_}`);
|
|
1278
1279
|
}
|
|
1279
|
-
if (
|
|
1280
|
+
if (u.length === 0) {
|
|
1280
1281
|
e.open({
|
|
1281
1282
|
message: "Cannot open logs without valid filters.",
|
|
1282
1283
|
type: "error"
|
|
1283
1284
|
});
|
|
1284
1285
|
return;
|
|
1285
1286
|
}
|
|
1286
|
-
const n = `attributes.pod:netsuite* AND (${
|
|
1287
|
+
const n = `attributes.pod:netsuite* AND (${u.join(" OR ")})`, { url: h } = await a.getLogs(n);
|
|
1287
1288
|
e.open(
|
|
1288
1289
|
{
|
|
1289
1290
|
message: "Opening NetSuite logs...",
|
|
@@ -1292,14 +1293,14 @@ const Ht = { class: "flex flex-row-reverse" }, Gt = /* @__PURE__ */ he({
|
|
|
1292
1293
|
800
|
|
1293
1294
|
), await new Promise((_) => setTimeout(_, 800)), window.open(h, "_blank");
|
|
1294
1295
|
}
|
|
1295
|
-
return (
|
|
1296
|
-
const
|
|
1296
|
+
return (c, t) => {
|
|
1297
|
+
const u = z("FmButton");
|
|
1297
1298
|
return g(), N("div", fr, [
|
|
1298
|
-
I(
|
|
1299
|
+
I(u, {
|
|
1299
1300
|
"prepend-icon": "history",
|
|
1300
1301
|
variant: "secondary",
|
|
1301
1302
|
label: "Logs",
|
|
1302
|
-
onClick: t[0] || (t[0] = (i) => b(
|
|
1303
|
+
onClick: t[0] || (t[0] = (i) => b(c.netsuiteId, c.purchaseOrderId)),
|
|
1303
1304
|
"text-color": "primary",
|
|
1304
1305
|
"bg-color": "transparent",
|
|
1305
1306
|
"border-color": "primary"
|
|
@@ -1317,19 +1318,19 @@ const Ht = { class: "flex flex-row-reverse" }, Gt = /* @__PURE__ */ he({
|
|
|
1317
1318
|
purchaseOrderId: {}
|
|
1318
1319
|
},
|
|
1319
1320
|
setup(p) {
|
|
1320
|
-
const e = p, a = it(), b = M(!1),
|
|
1321
|
+
const e = p, a = it(), b = M(!1), c = me(), t = M(!0), u = M(!1), i = M(null);
|
|
1321
1322
|
async function n() {
|
|
1322
1323
|
if (!i.value) {
|
|
1323
1324
|
b.value = !0;
|
|
1324
1325
|
try {
|
|
1325
1326
|
t.value = !0;
|
|
1326
1327
|
const h = await a.getMoreInfo(
|
|
1327
|
-
|
|
1328
|
+
c.currentLocation.dbName,
|
|
1328
1329
|
e.purchaseOrderId
|
|
1329
1330
|
);
|
|
1330
|
-
i.value = h,
|
|
1331
|
+
i.value = h, u.value = !1;
|
|
1331
1332
|
} catch {
|
|
1332
|
-
|
|
1333
|
+
u.value = !0;
|
|
1333
1334
|
} finally {
|
|
1334
1335
|
t.value = !1;
|
|
1335
1336
|
}
|
|
@@ -1368,13 +1369,13 @@ const Ht = { class: "flex flex-row-reverse" }, Gt = /* @__PURE__ */ he({
|
|
|
1368
1369
|
]),
|
|
1369
1370
|
default: ae(() => [
|
|
1370
1371
|
t.value ? (g(), N("div", vr, "Loading...")) : (g(), N("div", yr, [
|
|
1371
|
-
|
|
1372
|
+
u.value ? (g(), N("p", _r, "Something went wrong.")) : (g(!0), N(se, { key: 0 }, ve(i.value, (r, d) => (g(), N("div", {
|
|
1372
1373
|
key: d,
|
|
1373
1374
|
class: "mb-2"
|
|
1374
1375
|
}, [
|
|
1375
1376
|
o("div", null, [
|
|
1376
1377
|
I(m, {
|
|
1377
|
-
label:
|
|
1378
|
+
label: w(Ke)(d)
|
|
1378
1379
|
}, null, 8, ["label"]),
|
|
1379
1380
|
o("div", hr, [
|
|
1380
1381
|
Array.isArray(r) ? (g(), N("span", br, D(r.length > 0 ? r.join(", ") : "N/A"), 1)) : (g(), N("span", gr, D(r), 1))
|
|
@@ -1401,33 +1402,33 @@ const Ht = { class: "flex flex-row-reverse" }, Gt = /* @__PURE__ */ he({
|
|
|
1401
1402
|
scope: {}
|
|
1402
1403
|
},
|
|
1403
1404
|
setup(p) {
|
|
1404
|
-
const e = p, a = Et(), b = Pe(),
|
|
1405
|
+
const e = p, a = Et(), b = Pe(), c = Z(() => {
|
|
1405
1406
|
var n, h, _, v, m, l, r;
|
|
1406
|
-
const t = ((n = e.transferToDbName) == null ? void 0 : n.startsWith("restaurant")) && ((_ = (h = e.purchaseOrder) == null ? void 0 : h.supplier) == null ? void 0 : _.internal) === "restaurant",
|
|
1407
|
-
return
|
|
1407
|
+
const t = ((n = e.transferToDbName) == null ? void 0 : n.startsWith("restaurant")) && ((_ = (h = e.purchaseOrder) == null ? void 0 : h.supplier) == null ? void 0 : _.internal) === "restaurant", u = e.transferType === ye.PURCHASE, i = e.transferType === ye.TRANSFER;
|
|
1408
|
+
return u || i && !t || ((m = (v = e.purchaseOrder) == null ? void 0 : v.netSuite) == null ? void 0 : m.id) || ((r = (l = e.poRequest) == null ? void 0 : l.netSuite) == null ? void 0 : r.id);
|
|
1408
1409
|
});
|
|
1409
|
-
return (t,
|
|
1410
|
-
var n, h, _, v, m, l, r, d,
|
|
1410
|
+
return (t, u) => {
|
|
1411
|
+
var n, h, _, v, m, l, r, d, S, x;
|
|
1411
1412
|
const i = z("FmMenuDivider");
|
|
1412
|
-
return
|
|
1413
|
+
return w(a).isNetSuiteEnabled && c.value ? (g(), N("div", wr, [
|
|
1413
1414
|
o("div", Rr, [
|
|
1414
|
-
|
|
1415
|
+
u[0] || (u[0] = o("span", { class: "flex-1 fm-typo-en-body-lg-600" }, "NetSuite Info", -1)),
|
|
1415
1416
|
o("div", Or, [
|
|
1416
1417
|
o("div", Nr, [
|
|
1417
|
-
(n =
|
|
1418
|
+
(n = w(b).sessionUser.value) != null && n.role.isAdmin && ((_ = (h = e.purchaseOrder) == null ? void 0 : h.netSuite) != null && _.id) ? (g(), oe(Sr, {
|
|
1418
1419
|
key: 0,
|
|
1419
1420
|
"netsuite-id": (m = (v = t.purchaseOrder) == null ? void 0 : v.netSuite) == null ? void 0 : m.id,
|
|
1420
1421
|
"purchase-order-id": (l = t.purchaseOrder) == null ? void 0 : l._id
|
|
1421
1422
|
}, null, 8, ["netsuite-id", "purchase-order-id"])) : U("", !0),
|
|
1422
|
-
(r =
|
|
1423
|
+
(r = w(b).sessionUser.value) != null && r.role.isAdmin ? (g(), oe(mr, {
|
|
1423
1424
|
key: 1,
|
|
1424
|
-
"netsuite-id": (
|
|
1425
|
+
"netsuite-id": (S = (d = t.purchaseOrder) == null ? void 0 : d.netSuite) == null ? void 0 : S.id,
|
|
1425
1426
|
"purchase-order-id": (x = t.purchaseOrder) == null ? void 0 : x._id
|
|
1426
1427
|
}, null, 8, ["netsuite-id", "purchase-order-id"])) : U("", !0),
|
|
1427
1428
|
I(Gt, {
|
|
1428
1429
|
"po-request": t.poRequest,
|
|
1429
1430
|
"purchase-order": t.purchaseOrder,
|
|
1430
|
-
"is-transfer-between-outlets": !
|
|
1431
|
+
"is-transfer-between-outlets": !c.value,
|
|
1431
1432
|
scope: t.scope
|
|
1432
1433
|
}, null, 8, ["po-request", "purchase-order", "is-transfer-between-outlets", "scope"])
|
|
1433
1434
|
])
|
|
@@ -1439,13 +1440,13 @@ const Ht = { class: "flex flex-row-reverse" }, Gt = /* @__PURE__ */ he({
|
|
|
1439
1440
|
"purchase-order": t.purchaseOrder,
|
|
1440
1441
|
"transfer-type": t.transferType,
|
|
1441
1442
|
"transfer-to-db-name": t.transferToDbName,
|
|
1442
|
-
"is-transfer-between-outlets": !
|
|
1443
|
+
"is-transfer-between-outlets": !c.value,
|
|
1443
1444
|
scope: t.scope
|
|
1444
1445
|
}, null, 8, ["po-request", "purchase-order", "transfer-type", "transfer-to-db-name", "is-transfer-between-outlets", "scope"])
|
|
1445
1446
|
])) : U("", !0);
|
|
1446
1447
|
};
|
|
1447
1448
|
}
|
|
1448
|
-
}), kr = { class: "flex flex-col gap-16 w-full h-full" }, Dr = { class: "flex justify-between" }, qr = { class: "fm-typo-en-body-lg-600" },
|
|
1449
|
+
}), kr = { class: "flex flex-col gap-16 w-full h-full" }, Dr = { class: "flex justify-between" }, qr = { class: "fm-typo-en-body-lg-600" }, Ar = { class: "flex flex-col gap-8" }, $r = { class: "flex flex-col gap-4" }, Tr = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Pr = { class: "flex gap-1" }, Cr = { class: "fm-typo-en-body-lg-600" }, Ir = {
|
|
1449
1450
|
key: 0,
|
|
1450
1451
|
class: "flex flex-col gap-4"
|
|
1451
1452
|
}, Fr = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Er = { class: "fm-typo-en-body-lg-600" }, Lr = { class: "flex flex-col gap-4" }, Br = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Vr = { class: "fm-typo-en-body-lg-600" }, Ur = {
|
|
@@ -1481,10 +1482,10 @@ const Ht = { class: "flex flex-row-reverse" }, Gt = /* @__PURE__ */ he({
|
|
|
1481
1482
|
}, Ns = { class: "fm-typo-en-body-lg-400" }, xs = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, ks = { class: "flex gap-12 content-stretch" }, Ds = {
|
|
1482
1483
|
class: "flex flex-col w-24",
|
|
1483
1484
|
name: "circles"
|
|
1484
|
-
}, qs = { class: "flex-1 flex flex-col items-center" },
|
|
1485
|
+
}, qs = { class: "flex-1 flex flex-col items-center" }, As = {
|
|
1485
1486
|
class: "py-12 flex flex-col gap-4 flex-1",
|
|
1486
1487
|
name: "delivery details"
|
|
1487
|
-
},
|
|
1488
|
+
}, $s = { class: "flex flex-col gap-8" }, Ts = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, Ps = { class: "flex flex-col gap-4" }, Cs = { class: "flex gap-8 xs:flex-col" }, Gs = /* @__PURE__ */ he({
|
|
1488
1489
|
__name: "TransferDetails",
|
|
1489
1490
|
props: {
|
|
1490
1491
|
poRequest: {},
|
|
@@ -1499,7 +1500,7 @@ const Ht = { class: "flex flex-row-reverse" }, Gt = /* @__PURE__ */ he({
|
|
|
1499
1500
|
},
|
|
1500
1501
|
emits: ["update:show", "submitted"],
|
|
1501
1502
|
setup(p, { emit: e }) {
|
|
1502
|
-
const a = p, b = e,
|
|
1503
|
+
const a = p, b = e, c = je(), t = Ce(), u = $e(), i = me(), n = Pe(), h = Z(
|
|
1503
1504
|
() => {
|
|
1504
1505
|
var s, f;
|
|
1505
1506
|
return {
|
|
@@ -1512,7 +1513,7 @@ const Ht = { class: "flex flex-row-reverse" }, Gt = /* @__PURE__ */ he({
|
|
|
1512
1513
|
var s, f, R, q;
|
|
1513
1514
|
return ((f = (s = a.purchaseOrder) == null ? void 0 : s.supplier) == null ? void 0 : f.internal) === "restaurant" || ((q = (R = a.purchaseOrder) == null ? void 0 : R.supplier) == null ? void 0 : q.internal) === "warehouse" ? ye.TRANSFER : ye.PURCHASE;
|
|
1514
1515
|
}
|
|
1515
|
-
), l = M(!1), r = M(""), d = M(!0),
|
|
1516
|
+
), l = M(!1), r = M(""), d = M(!0), S = Ie(), x = Ft(S.getWorkflowConfig), E = mt(), $ = Z(() => {
|
|
1516
1517
|
if (!a.purchaseOrder)
|
|
1517
1518
|
return [];
|
|
1518
1519
|
const s = x.result.value;
|
|
@@ -1568,7 +1569,7 @@ const Ht = { class: "flex flex-row-reverse" }, Gt = /* @__PURE__ */ he({
|
|
|
1568
1569
|
);
|
|
1569
1570
|
async function ce(s, f, R, q, j) {
|
|
1570
1571
|
return new Promise((W, ee) => {
|
|
1571
|
-
|
|
1572
|
+
c.open({
|
|
1572
1573
|
closeButton: !1,
|
|
1573
1574
|
title: q.title,
|
|
1574
1575
|
message: q.message,
|
|
@@ -1627,7 +1628,7 @@ const Ht = { class: "flex flex-row-reverse" }, Gt = /* @__PURE__ */ he({
|
|
|
1627
1628
|
}).onSecondary(() => {
|
|
1628
1629
|
W("cancelled");
|
|
1629
1630
|
for (let y = 0; y < j + 2; y++)
|
|
1630
|
-
|
|
1631
|
+
c.close();
|
|
1631
1632
|
}).onClose(() => {
|
|
1632
1633
|
});
|
|
1633
1634
|
});
|
|
@@ -1651,13 +1652,13 @@ const Ht = { class: "flex flex-row-reverse" }, Gt = /* @__PURE__ */ he({
|
|
|
1651
1652
|
const L = {};
|
|
1652
1653
|
let Y = 0;
|
|
1653
1654
|
if ((s === O.enum.confirmDraft || // auto receive for warehouse to warehouse
|
|
1654
|
-
s === O.enum.completeReceive) &&
|
|
1655
|
+
s === O.enum.completeReceive) && u.autoReceiveWarehouse)
|
|
1655
1656
|
L.autoReceive = !0;
|
|
1656
|
-
else if ((s === O.enum.approveRequest || s === O.enum.processRequest) &&
|
|
1657
|
+
else if ((s === O.enum.approveRequest || s === O.enum.processRequest) && u.acceptRequireFulfillment) {
|
|
1657
1658
|
const Q = (W = (j = a.poRequest) == null ? void 0 : j.from) == null ? void 0 : W.dbName, F = (y = (ee = a.poRequest) == null ? void 0 : ee.to) == null ? void 0 : y.dbName;
|
|
1658
1659
|
if (Q && F && (Q.startsWith("warehouse_") || F.startsWith("warehouse_"))) {
|
|
1659
1660
|
const te = await new Promise((B, de) => {
|
|
1660
|
-
|
|
1661
|
+
c.open({
|
|
1661
1662
|
closeButton: !1,
|
|
1662
1663
|
title: "Confirm transfer amount",
|
|
1663
1664
|
dialogComponent: jt,
|
|
@@ -1665,7 +1666,7 @@ const Ht = { class: "flex flex-row-reverse" }, Gt = /* @__PURE__ */ he({
|
|
|
1665
1666
|
purchaseOrder: a.purchaseOrder,
|
|
1666
1667
|
confirm: B,
|
|
1667
1668
|
"onUpdate:show": (pe) => {
|
|
1668
|
-
pe || (r.value = "", l.value = !1, d.value = !0, Y++,
|
|
1669
|
+
pe || (r.value = "", l.value = !1, d.value = !0, Y++, c.close()), de("cancelled");
|
|
1669
1670
|
}
|
|
1670
1671
|
}
|
|
1671
1672
|
});
|
|
@@ -1753,27 +1754,27 @@ const Ht = { class: "flex flex-row-reverse" }, Gt = /* @__PURE__ */ he({
|
|
|
1753
1754
|
label: "Received items",
|
|
1754
1755
|
values: y.received.map((C) => {
|
|
1755
1756
|
var X;
|
|
1756
|
-
return
|
|
1757
|
-
|
|
1757
|
+
return A("div", [
|
|
1758
|
+
A(
|
|
1758
1759
|
"div",
|
|
1759
1760
|
{
|
|
1760
1761
|
class: "flex gap-4"
|
|
1761
1762
|
},
|
|
1762
1763
|
[
|
|
1763
|
-
|
|
1764
|
+
A(
|
|
1764
1765
|
"div",
|
|
1765
1766
|
{
|
|
1766
1767
|
class: "flex flex-col"
|
|
1767
1768
|
},
|
|
1768
1769
|
[
|
|
1769
|
-
|
|
1770
|
+
A(
|
|
1770
1771
|
"span",
|
|
1771
1772
|
{
|
|
1772
1773
|
class: "fm-typo-en-body-lg-800 basis-1/2 shrink-0 grow"
|
|
1773
1774
|
},
|
|
1774
1775
|
`${C.sku.name}`
|
|
1775
1776
|
),
|
|
1776
|
-
|
|
1777
|
+
A(
|
|
1777
1778
|
"span",
|
|
1778
1779
|
{
|
|
1779
1780
|
class: "fm-typo-en-body-md-400"
|
|
@@ -1782,26 +1783,26 @@ const Ht = { class: "flex flex-row-reverse" }, Gt = /* @__PURE__ */ he({
|
|
|
1782
1783
|
)
|
|
1783
1784
|
]
|
|
1784
1785
|
),
|
|
1785
|
-
|
|
1786
|
+
A(
|
|
1786
1787
|
"div",
|
|
1787
1788
|
{
|
|
1788
1789
|
class: "ml-auto flex flex-col"
|
|
1789
1790
|
},
|
|
1790
1791
|
[
|
|
1791
|
-
|
|
1792
|
+
A(
|
|
1792
1793
|
"div",
|
|
1793
1794
|
{
|
|
1794
1795
|
class: "ml-auto flex gap-1"
|
|
1795
1796
|
},
|
|
1796
1797
|
[
|
|
1797
|
-
|
|
1798
|
+
A(
|
|
1798
1799
|
"span",
|
|
1799
1800
|
{
|
|
1800
1801
|
class: "fm-typo-en-body-lg-600 self-end"
|
|
1801
1802
|
},
|
|
1802
1803
|
fe(C.amount, !1)
|
|
1803
1804
|
),
|
|
1804
|
-
|
|
1805
|
+
A(
|
|
1805
1806
|
"span",
|
|
1806
1807
|
{
|
|
1807
1808
|
class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary"
|
|
@@ -1810,7 +1811,7 @@ const Ht = { class: "flex flex-row-reverse" }, Gt = /* @__PURE__ */ he({
|
|
|
1810
1811
|
)
|
|
1811
1812
|
]
|
|
1812
1813
|
),
|
|
1813
|
-
|
|
1814
|
+
A(
|
|
1814
1815
|
"div",
|
|
1815
1816
|
{
|
|
1816
1817
|
class: "flex self-end fm-typo-en-body-md-400 text-fm-color-typo-secondary"
|
|
@@ -1855,27 +1856,27 @@ const Ht = { class: "flex flex-row-reverse" }, Gt = /* @__PURE__ */ he({
|
|
|
1855
1856
|
label: "Receiveable items",
|
|
1856
1857
|
values: y.items.map((F) => {
|
|
1857
1858
|
var te;
|
|
1858
|
-
return
|
|
1859
|
-
|
|
1859
|
+
return A("div", [
|
|
1860
|
+
A(
|
|
1860
1861
|
"div",
|
|
1861
1862
|
{
|
|
1862
1863
|
class: "flex gap-4"
|
|
1863
1864
|
},
|
|
1864
1865
|
[
|
|
1865
|
-
|
|
1866
|
+
A(
|
|
1866
1867
|
"div",
|
|
1867
1868
|
{
|
|
1868
1869
|
class: "flex flex-col"
|
|
1869
1870
|
},
|
|
1870
1871
|
[
|
|
1871
|
-
|
|
1872
|
+
A(
|
|
1872
1873
|
"span",
|
|
1873
1874
|
{
|
|
1874
1875
|
class: "fm-typo-en-body-lg-800 basis-1/2 shrink-0 grow"
|
|
1875
1876
|
},
|
|
1876
1877
|
`${F.sku.name}`
|
|
1877
1878
|
),
|
|
1878
|
-
|
|
1879
|
+
A(
|
|
1879
1880
|
"span",
|
|
1880
1881
|
{
|
|
1881
1882
|
class: "fm-typo-en-body-md-400"
|
|
@@ -1884,26 +1885,26 @@ const Ht = { class: "flex flex-row-reverse" }, Gt = /* @__PURE__ */ he({
|
|
|
1884
1885
|
)
|
|
1885
1886
|
]
|
|
1886
1887
|
),
|
|
1887
|
-
|
|
1888
|
+
A(
|
|
1888
1889
|
"div",
|
|
1889
1890
|
{
|
|
1890
1891
|
class: "ml-auto flex flex-col"
|
|
1891
1892
|
},
|
|
1892
1893
|
[
|
|
1893
|
-
|
|
1894
|
+
A(
|
|
1894
1895
|
"div",
|
|
1895
1896
|
{
|
|
1896
1897
|
class: "ml-auto flex gap-1"
|
|
1897
1898
|
},
|
|
1898
1899
|
[
|
|
1899
|
-
|
|
1900
|
+
A(
|
|
1900
1901
|
"span",
|
|
1901
1902
|
{
|
|
1902
1903
|
class: "fm-typo-en-body-lg-600 self-end"
|
|
1903
1904
|
},
|
|
1904
1905
|
fe(F.amount, !1)
|
|
1905
1906
|
),
|
|
1906
|
-
|
|
1907
|
+
A(
|
|
1907
1908
|
"span",
|
|
1908
1909
|
{
|
|
1909
1910
|
class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary"
|
|
@@ -1912,7 +1913,7 @@ const Ht = { class: "flex flex-row-reverse" }, Gt = /* @__PURE__ */ he({
|
|
|
1912
1913
|
)
|
|
1913
1914
|
]
|
|
1914
1915
|
),
|
|
1915
|
-
|
|
1916
|
+
A(
|
|
1916
1917
|
"div",
|
|
1917
1918
|
{
|
|
1918
1919
|
class: "flex self-end fm-typo-en-body-md-400 text-fm-color-typo-secondary"
|
|
@@ -1955,7 +1956,7 @@ const Ht = { class: "flex flex-row-reverse" }, Gt = /* @__PURE__ */ he({
|
|
|
1955
1956
|
function T(s) {
|
|
1956
1957
|
var W;
|
|
1957
1958
|
const R = (((W = a.purchaseOrder) == null ? void 0 : W.version) ?? ke.enum[1]) === ke.enum[2] ? s.id : s.sku._id, q = a.receivedMap[R];
|
|
1958
|
-
return `<span class="${H(s)} fm-typo-en-body-lg-600">${wt.toFormatString({ value: q.received })}</span>/${
|
|
1959
|
+
return `<span class="${H(s)} fm-typo-en-body-lg-600">${wt.toFormatString({ value: q.received })}</span>/${$t(s.quantity, s.sku.unit, s.measurement)}`;
|
|
1959
1960
|
}
|
|
1960
1961
|
function H(s) {
|
|
1961
1962
|
var L;
|
|
@@ -1966,8 +1967,8 @@ const Ht = { class: "flex flex-row-reverse" }, Gt = /* @__PURE__ */ he({
|
|
|
1966
1967
|
var F, te;
|
|
1967
1968
|
const R = z("FmButtonGroup"), q = z("FmChip"), j = z("FmMenuDivider"), W = z("FmCard"), ee = z("FmIcon"), y = z("FmTooltip"), L = z("FmSpacer"), Y = z("FmButton"), Q = z("FmSideSheet");
|
|
1968
1969
|
return g(), oe(Q, {
|
|
1969
|
-
header:
|
|
1970
|
-
modelValue:
|
|
1970
|
+
header: w(v)("inventory.transfer.receiveRequest.details.title") + ((F = s.purchaseOrder) != null && F.seqNumber ? ` #${(te = s.purchaseOrder) == null ? void 0 : te.seqNumber}` : ""),
|
|
1971
|
+
modelValue: w(P),
|
|
1971
1972
|
"onUpdate:modelValue": f[5] || (f[5] = (B) => Nt(P) ? P.value = B : null),
|
|
1972
1973
|
"dismiss-away": d.value,
|
|
1973
1974
|
"close-button": "",
|
|
@@ -1994,7 +1995,7 @@ const Ht = { class: "flex flex-row-reverse" }, Gt = /* @__PURE__ */ he({
|
|
|
1994
1995
|
var V, C, X, ge, _e, Ne, He, Ge, We, Ye, Qe;
|
|
1995
1996
|
return [
|
|
1996
1997
|
o("div", Dr, [
|
|
1997
|
-
o("div", qr, D(
|
|
1998
|
+
o("div", qr, D(w(v)("inventory.transfer.receiveRequest.details.requestSummary")), 1),
|
|
1998
1999
|
o("div", null, [
|
|
1999
2000
|
I(q, {
|
|
2000
2001
|
label: Fe.value,
|
|
@@ -2004,37 +2005,37 @@ const Ht = { class: "flex flex-row-reverse" }, Gt = /* @__PURE__ */ he({
|
|
|
2004
2005
|
])
|
|
2005
2006
|
]),
|
|
2006
2007
|
I(j),
|
|
2007
|
-
o("div",
|
|
2008
|
-
o("div",
|
|
2008
|
+
o("div", Ar, [
|
|
2009
|
+
o("div", $r, [
|
|
2009
2010
|
o("div", Tr, [
|
|
2010
|
-
o("div", Pr, D(
|
|
2011
|
+
o("div", Pr, D(w(v)("inventory.transfer.receiveRequest.details.createdAt")), 1)
|
|
2011
2012
|
]),
|
|
2012
|
-
o("div", Cr, D(
|
|
2013
|
+
o("div", Cr, D(w(qe)(((X = s.purchaseOrder) == null ? void 0 : X._id) ?? "")), 1)
|
|
2013
2014
|
]),
|
|
2014
2015
|
(ge = s.purchaseOrder) != null && ge.effectiveAt ? (g(), N("div", Ir, [
|
|
2015
|
-
o("div", Fr, D(
|
|
2016
|
-
o("div", Er, D(
|
|
2016
|
+
o("div", Fr, D(w(v)("inventory.transfer.receiveRequest.details.backdatedTo")), 1),
|
|
2017
|
+
o("div", Er, D(w(at)(new Date((_e = s.purchaseOrder) == null ? void 0 : _e.effectiveAt))), 1)
|
|
2017
2018
|
])) : U("", !0),
|
|
2018
2019
|
o("div", Lr, [
|
|
2019
|
-
o("div", Br, D(
|
|
2020
|
-
o("div", Vr, D(
|
|
2020
|
+
o("div", Br, D(w(v)("inventory.transfer.receiveRequest.details.type.title")), 1),
|
|
2021
|
+
o("div", Vr, D(w(v)(
|
|
2021
2022
|
`inventory.transfer.receiveRequest.details.type.${m.value.toLocaleLowerCase("en-US")}`
|
|
2022
2023
|
)), 1)
|
|
2023
2024
|
]),
|
|
2024
2025
|
(He = (Ne = s.purchaseOrder) == null ? void 0 : Ne.supplier) != null && He.name ? (g(), N("div", Ur, [
|
|
2025
|
-
o("div", Mr, D(
|
|
2026
|
+
o("div", Mr, D(w(v)("inventory.transfer.receiveRequest.details.from")), 1),
|
|
2026
2027
|
o("div", Kr, D((We = (Ge = s.purchaseOrder) == null ? void 0 : Ge.supplier) == null ? void 0 : We.name), 1)
|
|
2027
2028
|
])) : U("", !0),
|
|
2028
2029
|
s.transferTo ? (g(), N("div", jr, [
|
|
2029
|
-
o("div", zr, D(
|
|
2030
|
+
o("div", zr, D(w(v)("inventory.transfer.receiveRequest.details.to")), 1),
|
|
2030
2031
|
o("div", Hr, D(s.transferTo), 1)
|
|
2031
2032
|
])) : U("", !0),
|
|
2032
2033
|
(Ye = s.purchaseOrder) != null && Ye.ref ? (g(), N("div", Gr, [
|
|
2033
|
-
o("div", Wr, D(
|
|
2034
|
+
o("div", Wr, D(w(v)("inventory.transfer.receiveRequest.details.reference")), 1),
|
|
2034
2035
|
o("div", Yr, D(s.purchaseOrder.ref), 1)
|
|
2035
2036
|
])) : U("", !0),
|
|
2036
2037
|
(Qe = s.purchaseOrder) != null && Qe.remark ? (g(), N("div", Qr, [
|
|
2037
|
-
o("div", Xr, D(
|
|
2038
|
+
o("div", Xr, D(w(v)("inventory.transfer.receiveRequest.details.remark")), 1),
|
|
2038
2039
|
o("div", Zr, D(s.purchaseOrder.remark), 1)
|
|
2039
2040
|
])) : U("", !0)
|
|
2040
2041
|
])
|
|
@@ -2054,7 +2055,7 @@ const Ht = { class: "flex flex-row-reverse" }, Gt = /* @__PURE__ */ he({
|
|
|
2054
2055
|
o("div", es, [
|
|
2055
2056
|
o("div", ts, [
|
|
2056
2057
|
o("span", rs, [
|
|
2057
|
-
Be(D(be.value ?
|
|
2058
|
+
Be(D(be.value ? w(v)("inventory.transfer.receiveRequest.details.receivedItems") : w(v)("inventory.transfer.receiveRequest.details.requestedItems")) + " ", 1),
|
|
2058
2059
|
(de = (B = s.purchaseOrder) == null ? void 0 : B.netSuite) != null && de.missingItems && ((we = (pe = s.purchaseOrder) == null ? void 0 : pe.netSuite) == null ? void 0 : we.missingItems.length) > 0 ? (g(), oe(y, {
|
|
2059
2060
|
key: 0,
|
|
2060
2061
|
variant: "rich",
|
|
@@ -2106,17 +2107,17 @@ const Ht = { class: "flex flex-row-reverse" }, Gt = /* @__PURE__ */ he({
|
|
|
2106
2107
|
]),
|
|
2107
2108
|
o("div", ls, [
|
|
2108
2109
|
o("div", cs, D(V.code), 1),
|
|
2109
|
-
(C = V.totalCost) != null && C.amount &&
|
|
2110
|
+
(C = V.totalCost) != null && C.amount && w(u).enableTotalCost ? (g(), N("div", us, " (" + D(w(xe)(V.totalCost)) + ") ", 1)) : U("", !0)
|
|
2110
2111
|
])
|
|
2111
2112
|
]);
|
|
2112
2113
|
}), 128)),
|
|
2113
|
-
+
|
|
2114
|
+
+w(fe)(k.value) ? (g(), N(se, { key: 0 }, [
|
|
2114
2115
|
o("div", ds, [
|
|
2115
2116
|
I(j)
|
|
2116
2117
|
]),
|
|
2117
2118
|
o("div", fs, [
|
|
2118
2119
|
f[6] || (f[6] = o("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, "Total:", -1)),
|
|
2119
|
-
o("div", ms, D(
|
|
2120
|
+
o("div", ms, D(w(xe)(k.value)), 1)
|
|
2120
2121
|
])
|
|
2121
2122
|
], 64)) : U("", !0)
|
|
2122
2123
|
])
|
|
@@ -2169,13 +2170,13 @@ const Ht = { class: "flex flex-row-reverse" }, Gt = /* @__PURE__ */ he({
|
|
|
2169
2170
|
}, null, 2)
|
|
2170
2171
|
])
|
|
2171
2172
|
]),
|
|
2172
|
-
o("div",
|
|
2173
|
+
o("div", As, [
|
|
2173
2174
|
I(W, {
|
|
2174
2175
|
variant: "outlined",
|
|
2175
2176
|
class: "py-12 px-16"
|
|
2176
2177
|
}, {
|
|
2177
2178
|
default: ae(() => [
|
|
2178
|
-
o("div",
|
|
2179
|
+
o("div", $s, [
|
|
2179
2180
|
(g(!0), N(se, null, ve(V.info, (X, ge) => (g(), N("div", {
|
|
2180
2181
|
key: ge,
|
|
2181
2182
|
class: "flex flex-col gap-4"
|
|
@@ -2203,12 +2204,12 @@ const Ht = { class: "flex flex-row-reverse" }, Gt = /* @__PURE__ */ he({
|
|
|
2203
2204
|
I(L),
|
|
2204
2205
|
o("div", null, [
|
|
2205
2206
|
o("img", {
|
|
2206
|
-
src:
|
|
2207
|
+
src: w(Tt),
|
|
2207
2208
|
alt: "List is empty"
|
|
2208
2209
|
}, null, 8, ys)
|
|
2209
2210
|
]),
|
|
2210
|
-
o("div", hs, D(
|
|
2211
|
-
o("div", bs, D(
|
|
2211
|
+
o("div", hs, D(w(v)("inventory.transfer.receiveRequest.details.noRecordsFound")), 1),
|
|
2212
|
+
o("div", bs, D(w(v)("inventory.transfer.receiveRequest.details.trackDeliveryMessage")), 1),
|
|
2212
2213
|
I(L),
|
|
2213
2214
|
I(L)
|
|
2214
2215
|
]))
|
|
@@ -2218,39 +2219,39 @@ const Ht = { class: "flex flex-row-reverse" }, Gt = /* @__PURE__ */ he({
|
|
|
2218
2219
|
}),
|
|
2219
2220
|
"side-sheet-footer": ae(() => [
|
|
2220
2221
|
o("div", Cs, [
|
|
2221
|
-
(g(!0), N(se, null, ve(
|
|
2222
|
-
|
|
2222
|
+
(g(!0), N(se, null, ve($.value, (B) => (g(), N(se, null, [
|
|
2223
|
+
w(Ue)[B].available != !1 ? (g(), oe(Y, {
|
|
2223
2224
|
key: B,
|
|
2224
|
-
label:
|
|
2225
|
+
label: w(v)(w(Ue)[B].translationKey),
|
|
2225
2226
|
onClick: (de) => le(B),
|
|
2226
2227
|
loading: r.value === B,
|
|
2227
2228
|
disabled: r.value !== B && l.value,
|
|
2228
|
-
variant:
|
|
2229
|
+
variant: w(Ue)[B].buttonVariant
|
|
2229
2230
|
}, null, 8, ["label", "onClick", "loading", "disabled", "variant"])) : U("", !0)
|
|
2230
2231
|
], 64))), 256)),
|
|
2231
|
-
|
|
2232
|
+
w(_).ableToMarkReceived(s.purchaseOrder) && !$.value.includes("completeReceive") ? (g(), oe(Y, {
|
|
2232
2233
|
key: 0,
|
|
2233
|
-
label:
|
|
2234
|
+
label: w(v)("inventory.transfer.receiveRequest.actions.completeReceive"),
|
|
2234
2235
|
onClick: f[1] || (f[1] = (B) => le("completeReceive")),
|
|
2235
2236
|
loading: r.value === "completeReceive",
|
|
2236
2237
|
disabled: r.value !== "completeReceive" && l.value
|
|
2237
2238
|
}, null, 8, ["label", "loading", "disabled"])) : U("", !0),
|
|
2238
|
-
|
|
2239
|
+
w(_).ableToMarkApproved(s.purchaseOrder) && s.canApprove && !$.value.includes("approveRequest") ? (g(), oe(Y, {
|
|
2239
2240
|
key: 1,
|
|
2240
|
-
label:
|
|
2241
|
+
label: w(v)("inventory.transfer.approval.actions.approveRequest"),
|
|
2241
2242
|
onClick: f[2] || (f[2] = (B) => le("approveRequest")),
|
|
2242
2243
|
loading: r.value === "approveRequest",
|
|
2243
2244
|
disabled: r.value !== "approveRequest" && l.value
|
|
2244
2245
|
}, null, 8, ["label", "loading", "disabled"])) : U("", !0),
|
|
2245
|
-
|
|
2246
|
+
w(_).ableToCreateFulfillment(s.purchaseOrder, s.poRequest) && a.scope === "approval" ? (g(), oe(Y, {
|
|
2246
2247
|
key: 2,
|
|
2247
|
-
label:
|
|
2248
|
+
label: w(v)("inventory.transfer.receiveRequest.actions.processRequest"),
|
|
2248
2249
|
onClick: f[3] || (f[3] = (B) => le("processRequest")),
|
|
2249
2250
|
loading: r.value === "processRequest",
|
|
2250
2251
|
disabled: r.value !== "processRequest" && l.value
|
|
2251
2252
|
}, null, 8, ["label", "loading", "disabled"])) : U("", !0),
|
|
2252
2253
|
I(Y, {
|
|
2253
|
-
label:
|
|
2254
|
+
label: w(v)("common.close"),
|
|
2254
2255
|
variant: "tertiary",
|
|
2255
2256
|
onClick: f[4] || (f[4] = (B) => b("update:show", !1))
|
|
2256
2257
|
}, null, 8, ["label"])
|