@feedmepos/mf-inventory-portal 0.0.22-dev.8 → 0.0.22-dev.9
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/{ApprovalView-BNeTV3TV.js → ApprovalView-BPsScR5_.js} +4 -4
- package/dist/{BindingsDialog-pBelBtiH.js → BindingsDialog-GzX9Bo2g.js} +1 -1
- package/dist/{BindingsPicker-VHr76FFM.js → BindingsPicker-SbOetc0-.js} +1 -1
- package/dist/{BindingsTable-CgIp6DKB.js → BindingsTable-CAcE5y8U.js} +1 -1
- package/dist/{ClosingTemplateView-FleQasJi.js → ClosingTemplateView-DECwEnlK.js} +72 -71
- package/dist/{FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-BYfojQsH.js → FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-DnogYrRE.js} +1 -1
- package/dist/{IngredientsView-BEW8_MJ0.js → IngredientsView-8fT1Ljd5.js} +3 -3
- package/dist/{IntegrationView-NnpJ8nYO.js → IntegrationView-CjGLRM78.js} +2 -2
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-CJMb1aR1.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-1FCwvO8A.js} +1 -1
- package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-DWSq3JsJ.js → PremiumBadge.vue_vue_type_script_setup_true_lang-DlhNc8Vk.js} +1 -1
- package/dist/{PurchaseOrderPrintPreview-BZ5uhyRy.js → PurchaseOrderPrintPreview-5HIWHR_f.js} +1 -1
- package/dist/{ReceiveRequestView-DN9u5HLn.js → ReceiveRequestView-CXZv8g5U.js} +6 -6
- package/dist/{RecipeView-DM20cOk3.js → RecipeView-sB0Lgmob.js} +3 -3
- package/dist/{StockView-LppKR-nM.js → StockView-CY2kNohB.js} +6 -6
- package/dist/{SupplierView-DHh6MhoI.js → SupplierView-DTqeZPts.js} +3 -3
- package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-KHwccWdi.js → TransferDetails.vue_vue_type_script_setup_true_lang-BBby29tW.js} +121 -113
- package/dist/TransferDialog.vue_vue_type_script_setup_true_lang-ByNQap9n.js +1498 -0
- package/dist/TransferTemplateView-DkRVfAox.js +1277 -0
- package/dist/{UnitView-D8XJca7H.js → UnitView-BpU0Yk7X.js} +4 -4
- package/dist/{WarehouseView-DTnx3-Fi.js → WarehouseView-DqxWgogc.js} +2 -2
- package/dist/api/inventory.d.ts +4 -7
- package/dist/{app-Cn0UYdAW.js → app-BuyAj4kw.js} +6668 -6630
- package/dist/app.js +1 -1
- package/dist/{decimal-BiLgcnqq.js → decimal-DWbwRn_v.js} +1 -1
- package/dist/{defineDeepModel-CXCb8GcR.js → defineDeepModel-DuVmbMwq.js} +1 -1
- package/dist/{format-time-from-id-5QzQNKlI.js → format-time-from-id-BnmaRuab.js} +1 -1
- package/dist/{id-to-date-C-LYuoim.js → id-to-date-CI5Vv0Ji.js} +1 -1
- package/dist/{purchase-order-transaction-type-BV80Rx9h.js → purchase-order-transaction-type-DrFJFvtK.js} +3 -3
- package/dist/stores/feature.d.ts +0 -1
- package/dist/stores/helper/core-store-proxy.d.ts +2 -26
- package/dist/stores/location.d.ts +24 -42
- package/dist/stores/warehouse.d.ts +4 -7
- package/dist/style.css +1 -1
- package/dist/{supplier-Bg9MjX_y.js → supplier-BQyK2eSZ.js} +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{use-template-enabled-locations-2-CzY-UFrc.js → use-template-enabled-locations-2-ClBq9FjN.js} +1 -1
- package/dist/views/closing-template/composables/use-closing-template-actions.d.ts +48 -84
- package/dist/views/closing-template/composables/use-closing-template-table.d.ts +48 -84
- package/dist/views/transfer-template/components/transfer-template-form/composables/use-template-enabled-locations.d.ts +4 -7
- package/dist/views/transfer-template/composables/use-transfer-template-actions.d.ts +48 -84
- package/dist/views/transfer-template/composables/use-transfer-template-table.d.ts +16 -28
- package/dist/views/transfer-template/helpers/remove-deleted-skus.helper.d.ts +4 -7
- package/dist/views/warehouse/components/WarehouseForm.vue.d.ts +8 -14
- package/dist/{xlsx-BsdfXPiA.js → xlsx-DiOKvJ6l.js} +1 -1
- package/dist/{xlsx.util-B_ynXZ3Q.js → xlsx.util-CZ7zYxdP.js} +2 -2
- package/package.json +1 -1
- package/dist/TransferDialog.vue_vue_type_script_setup_true_lang-2QZK3Iu5.js +0 -1485
- package/dist/TransferTemplateView-CUQSQR8U.js +0 -1278
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { f as ae } from "./format-time-from-id-
|
|
2
|
-
import { computed as re, h as
|
|
1
|
+
import { f as ae } from "./format-time-from-id-BnmaRuab.js";
|
|
2
|
+
import { computed as re, h as le, defineComponent as Ce, ref as Z, resolveComponent as L, openBlock as d, createBlock as N, unref as s, isRef as Ee, withCtx as ee, createElementVNode as e, createVNode as U, createElementBlock as y, Fragment as W, toDisplayString as n, normalizeClass as te, createCommentVNode as v, renderList as ie } from "vue";
|
|
3
3
|
import { c as ke } from "./TableActionableRow.vue_vue_type_script_setup_true_lang-DlNJ6kRg.js";
|
|
4
|
-
import { D as h, R as
|
|
5
|
-
import { B as
|
|
6
|
-
import { F as
|
|
7
|
-
import { f as
|
|
8
|
-
import { components as
|
|
9
|
-
import { useI18n as
|
|
4
|
+
import { D as h, R as p } from "./row-action.enum-PMKMRrZR.js";
|
|
5
|
+
import { B as xe, l as ce, a as ue, a7 as de, aj as g, c as Ne, j as Pe, ae as q, H as Te, G as Fe, E as je, ah as Ie, b as Ue, w as Me } from "./app-BuyAj4kw.js";
|
|
6
|
+
import { F as $e } from "./decimal-DWbwRn_v.js";
|
|
7
|
+
import { f as me, P as se, d as Ke, e as Le } from "./purchase-order-transaction-type-DrFJFvtK.js";
|
|
8
|
+
import { components as Ve, useDialog as Be, useSnackbar as Ge, useProxiedModel as He } from "@feedmepos/ui-library";
|
|
9
|
+
import { useI18n as we } from "@feedmepos/mf-common";
|
|
10
10
|
import { E as ze } from "./empty-placeholder-wf6-BWE8.js";
|
|
11
11
|
function Qe(f, k) {
|
|
12
12
|
return k.reduce(
|
|
13
13
|
(a, P) => {
|
|
14
|
-
const S = P.received.find((
|
|
15
|
-
return S && (a =
|
|
14
|
+
const S = P.received.find((C) => C.sku._id === f._id);
|
|
15
|
+
return S && (a = xe(a, S.amount)), a;
|
|
16
16
|
},
|
|
17
|
-
|
|
17
|
+
$e.toPrecision(ce(0), f.unit.precision)
|
|
18
18
|
);
|
|
19
19
|
}
|
|
20
20
|
function Ye(f, k) {
|
|
@@ -27,7 +27,7 @@ function Ye(f, k) {
|
|
|
27
27
|
city: a == null ? void 0 : a.city,
|
|
28
28
|
state: a == null ? void 0 : a.state,
|
|
29
29
|
country: a == null ? void 0 : a.country
|
|
30
|
-
},
|
|
30
|
+
}, C = {
|
|
31
31
|
name: f.supplier.name,
|
|
32
32
|
registrationNumber: f.supplier.registrationNumber,
|
|
33
33
|
line1: f.supplier.address.line1,
|
|
@@ -37,19 +37,19 @@ function Ye(f, k) {
|
|
|
37
37
|
state: f.supplier.address.state,
|
|
38
38
|
country: f.supplier.address.country
|
|
39
39
|
}, V = f.items.map((c) => {
|
|
40
|
-
const { sku: i, measurement: u } = c, T =
|
|
40
|
+
const { sku: i, measurement: u } = c, T = ue(
|
|
41
41
|
Qe(c.sku, f.deliveryOrder || []),
|
|
42
42
|
!1
|
|
43
43
|
);
|
|
44
44
|
return {
|
|
45
45
|
code: i.code,
|
|
46
46
|
description: i.name,
|
|
47
|
-
quantity:
|
|
47
|
+
quantity: me(c.quantity, i.unit, c.measurement),
|
|
48
48
|
unit: (u == null ? void 0 : u.abbrev) || i.unit.abbrev,
|
|
49
49
|
received: T
|
|
50
50
|
};
|
|
51
51
|
}), o = f.deliveryOrder.map((c) => ({
|
|
52
|
-
createdAt:
|
|
52
|
+
createdAt: de(new Date(c.createdAt)),
|
|
53
53
|
ref: c.deliveryOrderNumber,
|
|
54
54
|
remark: c.remark || "",
|
|
55
55
|
items: c.received.map((i) => {
|
|
@@ -57,7 +57,7 @@ function Ye(f, k) {
|
|
|
57
57
|
return {
|
|
58
58
|
code: i.sku.code,
|
|
59
59
|
description: i.sku.name,
|
|
60
|
-
quantity:
|
|
60
|
+
quantity: ue(i.amount),
|
|
61
61
|
unit: ((u = i.measurement) == null ? void 0 : u.abbrev) || i.sku.unit.abbrev
|
|
62
62
|
};
|
|
63
63
|
})
|
|
@@ -67,7 +67,7 @@ function Ye(f, k) {
|
|
|
67
67
|
ref: f.ref || "",
|
|
68
68
|
remark: f.remark || "",
|
|
69
69
|
buyer: S,
|
|
70
|
-
supplier:
|
|
70
|
+
supplier: C,
|
|
71
71
|
items: V,
|
|
72
72
|
status: f.status,
|
|
73
73
|
deliveryOrders: o
|
|
@@ -117,63 +117,63 @@ const H = {
|
|
|
117
117
|
}
|
|
118
118
|
};
|
|
119
119
|
function Rs(f, k) {
|
|
120
|
-
const _ =
|
|
120
|
+
const _ = Pe(), { t: a } = we();
|
|
121
121
|
function P(l) {
|
|
122
122
|
switch (l.status) {
|
|
123
123
|
case "DRAFT":
|
|
124
124
|
return [
|
|
125
125
|
l.supplier.internal === "restaurant" || l.supplier.internal === "warehouse" ? H[g.enum.submitRequest] : H[g.enum.confirmDraft],
|
|
126
126
|
H[g.enum.cancelDraft],
|
|
127
|
-
h[
|
|
128
|
-
h[
|
|
129
|
-
h[
|
|
127
|
+
h[p.Update],
|
|
128
|
+
h[p.Details],
|
|
129
|
+
h[p.Print]
|
|
130
130
|
];
|
|
131
131
|
case "RECEIVING":
|
|
132
132
|
return [
|
|
133
133
|
H[g.enum.completeReceive],
|
|
134
|
-
h[
|
|
135
|
-
h[
|
|
136
|
-
h[
|
|
134
|
+
h[p.Update],
|
|
135
|
+
h[p.Details],
|
|
136
|
+
h[p.Print]
|
|
137
137
|
];
|
|
138
138
|
case "REQUESTING":
|
|
139
139
|
return f === "receive/request" ? [
|
|
140
|
-
h[
|
|
141
|
-
h[
|
|
142
|
-
h[
|
|
140
|
+
h[p.Update],
|
|
141
|
+
h[p.Details],
|
|
142
|
+
h[p.Print]
|
|
143
143
|
] : [
|
|
144
144
|
H[g.enum.approveRequest],
|
|
145
145
|
H[g.enum.rejectRequest],
|
|
146
|
-
h[
|
|
147
|
-
h[
|
|
146
|
+
h[p.Details],
|
|
147
|
+
h[p.Print]
|
|
148
148
|
];
|
|
149
149
|
case "PROCESSING":
|
|
150
|
-
return [h[
|
|
150
|
+
return [h[p.Details], h[p.Print]];
|
|
151
151
|
case "COMPLETE":
|
|
152
152
|
return [
|
|
153
|
-
h[
|
|
154
|
-
h[
|
|
155
|
-
h[
|
|
153
|
+
h[p.Update],
|
|
154
|
+
h[p.Details],
|
|
155
|
+
h[p.Print]
|
|
156
156
|
];
|
|
157
157
|
case "CANCEL":
|
|
158
158
|
default:
|
|
159
|
-
return [h[
|
|
159
|
+
return [h[p.Details], h[p.Print]];
|
|
160
160
|
}
|
|
161
161
|
}
|
|
162
162
|
function S(l) {
|
|
163
163
|
return Object.values(g.enum).includes(l);
|
|
164
164
|
}
|
|
165
|
-
async function
|
|
165
|
+
async function C(l, c, i) {
|
|
166
166
|
var T, X;
|
|
167
|
-
const u =
|
|
168
|
-
if (l ===
|
|
167
|
+
const u = Ne(c);
|
|
168
|
+
if (l === p.Print) {
|
|
169
169
|
Ye(u, _.currentLocation);
|
|
170
170
|
return;
|
|
171
171
|
}
|
|
172
|
-
if (l ===
|
|
172
|
+
if (l === p.Details) {
|
|
173
173
|
k.promptShowTransferDetails(u, i);
|
|
174
174
|
return;
|
|
175
175
|
}
|
|
176
|
-
if (l ===
|
|
176
|
+
if (l === p.Update) {
|
|
177
177
|
(T = k.promptUpdateTransferDialog) == null || T.call(k, u);
|
|
178
178
|
return;
|
|
179
179
|
}
|
|
@@ -224,11 +224,19 @@ function Rs(f, k) {
|
|
|
224
224
|
header: () => a("inventory.transfer.table.status"),
|
|
225
225
|
cell(l) {
|
|
226
226
|
const c = a(`inventory.transfer.status.${l.getValue() ?? ""}`), i = `${l.getValue() ?? ""}`.toLocaleLowerCase("en-us");
|
|
227
|
-
return
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
227
|
+
return le(
|
|
228
|
+
"div",
|
|
229
|
+
{
|
|
230
|
+
class: "flex"
|
|
231
|
+
},
|
|
232
|
+
le(
|
|
233
|
+
"div",
|
|
234
|
+
{
|
|
235
|
+
class: `fm-status-badge fm-status-badge-${i}`
|
|
236
|
+
},
|
|
237
|
+
c
|
|
238
|
+
)
|
|
239
|
+
);
|
|
232
240
|
},
|
|
233
241
|
enableSorting: !0,
|
|
234
242
|
size: 200
|
|
@@ -237,7 +245,7 @@ function Rs(f, k) {
|
|
|
237
245
|
id: "action",
|
|
238
246
|
cell(l) {
|
|
239
247
|
const c = l.row.original, i = P(c);
|
|
240
|
-
return ke(i, (u) =>
|
|
248
|
+
return ke(i, (u) => C(u, c));
|
|
241
249
|
},
|
|
242
250
|
enableSorting: !1,
|
|
243
251
|
size: 40,
|
|
@@ -287,7 +295,7 @@ function Rs(f, k) {
|
|
|
287
295
|
header: () => a("inventory.transfer.table.status"),
|
|
288
296
|
cell(l) {
|
|
289
297
|
const c = a(`inventory.transfer.status.${l.getValue() ?? ""}`), i = `${l.getValue() ?? ""}`.toLocaleLowerCase("en-us");
|
|
290
|
-
return
|
|
298
|
+
return le(Ve.FmChip, {
|
|
291
299
|
label: c,
|
|
292
300
|
class: `fm-status-badge fm-status-badge-${i}`,
|
|
293
301
|
compact: !0
|
|
@@ -301,7 +309,7 @@ function Rs(f, k) {
|
|
|
301
309
|
const c = l.row.original, i = c.purchaseOrder ? P(c.purchaseOrder) : [];
|
|
302
310
|
return ke(
|
|
303
311
|
i,
|
|
304
|
-
(u) => c.purchaseOrder ?
|
|
312
|
+
(u) => c.purchaseOrder ? C(u, c.purchaseOrder, c) : void 0
|
|
305
313
|
);
|
|
306
314
|
},
|
|
307
315
|
enableSorting: !1,
|
|
@@ -329,7 +337,7 @@ const Je = { class: "flex flex-col gap-16 w-full h-full" }, We = { class: "flex
|
|
|
329
337
|
}, dt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, mt = { class: "fm-typo-en-body-lg-600" }, ft = {
|
|
330
338
|
key: 2,
|
|
331
339
|
class: "flex flex-col gap-4"
|
|
332
|
-
},
|
|
340
|
+
}, vt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, pt = { class: "fm-typo-en-body-lg-600" }, yt = {
|
|
333
341
|
key: 3,
|
|
334
342
|
class: "flex flex-col gap-4"
|
|
335
343
|
}, ht = { class: "fm-typo-en-body-lg-600" }, bt = {
|
|
@@ -341,7 +349,7 @@ const Je = { class: "flex flex-col gap-16 w-full h-full" }, We = { class: "flex
|
|
|
341
349
|
}, Rt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ot = { class: "fm-typo-en-body-lg-600" }, qt = {
|
|
342
350
|
key: 6,
|
|
343
351
|
class: "flex flex-col gap-4"
|
|
344
|
-
}, kt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, xt = { class: "fm-typo-en-body-lg-600" }, wt = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg p-16" }, St = { class: "flex flex-col gap-8" }, Dt = { class: "fm-typo-en-body-lg-600" },
|
|
352
|
+
}, kt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, xt = { class: "fm-typo-en-body-lg-600" }, wt = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg p-16" }, St = { class: "flex flex-col gap-8" }, Dt = { class: "fm-typo-en-body-lg-600" }, At = { class: "flex w-full gap-4" }, Ct = { class: "basis-1/2 shrink-0 grow fm-typo-en-body-lg-400 line-clamp-2" }, Et = { class: "fm-typo-en-body-lg-600 line-clamp-2" }, Nt = { class: "flex w-full gap-4 fm-typo-en-body-sm-400" }, Pt = { class: "grow fm-typo-en-body-lg-400 text-fm-color-typo-secondary line-clamp-1" }, Tt = {
|
|
345
353
|
key: 0,
|
|
346
354
|
class: "line-clamp-1 fm-typo-en-body-lg-400 text-fm-color-typo-secondary"
|
|
347
355
|
}, Ft = {
|
|
@@ -368,7 +376,7 @@ const Je = { class: "flex flex-col gap-16 w-full h-full" }, We = { class: "flex
|
|
|
368
376
|
}, Xt = { class: "flex flex-col gap-8" }, Zt = { class: "flex flex-col gap-4" }, es = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, ts = { class: "fm-typo-en-body-lg-600" }, ss = { class: "flex flex-col gap-4" }, rs = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, as = { class: "flex flex-col gap-4" }, ns = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, os = { class: "fm-typo-en-body-lg-600" }, ls = { class: "flex flex-col gap-4" }, is = {
|
|
369
377
|
key: 0,
|
|
370
378
|
class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary"
|
|
371
|
-
}, cs = { class: "fm-typo-en-body-lg-600" }, us = { class: "flex gap-8 xs:flex-col" }, Os = /* @__PURE__ */
|
|
379
|
+
}, cs = { class: "fm-typo-en-body-lg-600" }, us = { class: "flex gap-8 xs:flex-col" }, Os = /* @__PURE__ */ Ce({
|
|
372
380
|
__name: "TransferDetails",
|
|
373
381
|
props: {
|
|
374
382
|
purchaseOrder: {},
|
|
@@ -380,7 +388,7 @@ const Je = { class: "flex flex-col gap-16 w-full h-full" }, We = { class: "flex
|
|
|
380
388
|
},
|
|
381
389
|
emits: ["update:show", "submitted"],
|
|
382
390
|
setup(f, { emit: k }) {
|
|
383
|
-
const _ = f, a = k, P = Be(), S = Ge(),
|
|
391
|
+
const _ = f, a = k, P = Be(), S = Ge(), C = Ie(), V = Ue(), { t: o } = we(), M = re(
|
|
384
392
|
() => {
|
|
385
393
|
var t, r, D, b;
|
|
386
394
|
return ((r = (t = _.purchaseOrder) == null ? void 0 : t.supplier) == null ? void 0 : r.internal) === "restaurant" || ((b = (D = _.purchaseOrder) == null ? void 0 : D.supplier) == null ? void 0 : b.internal) === "warehouse" ? se.TRANSFER : se.PURCHASE;
|
|
@@ -394,8 +402,8 @@ const Je = { class: "flex flex-col gap-16 w-full h-full" }, We = { class: "flex
|
|
|
394
402
|
label: o("inventory.transfer.receiveRequest.details.deliveryHistory"),
|
|
395
403
|
value: "deliveryHistory"
|
|
396
404
|
}
|
|
397
|
-
], c = Z(l[0]), i = Z(!1), u = Z(""), T = Z(!0), X =
|
|
398
|
-
async function
|
|
405
|
+
], c = Z(l[0]), i = Z(!1), u = Z(""), T = Z(!0), X = Ke(), ne = He(_, "show");
|
|
406
|
+
async function Se(t, r, D) {
|
|
399
407
|
u.value = r, i.value = !0, T.value = !1;
|
|
400
408
|
try {
|
|
401
409
|
await X.processPurchaseOrder(
|
|
@@ -427,11 +435,11 @@ const Je = { class: "flex flex-col gap-16 w-full h-full" }, We = { class: "flex
|
|
|
427
435
|
}
|
|
428
436
|
}
|
|
429
437
|
async function $(t) {
|
|
430
|
-
const r =
|
|
438
|
+
const r = Le[t];
|
|
431
439
|
if (!r) {
|
|
432
440
|
S.open({
|
|
433
441
|
title: "Something went wrong",
|
|
434
|
-
message: `Cannot process order: ${
|
|
442
|
+
message: `Cannot process order: ${Me(t)}`,
|
|
435
443
|
type: "error"
|
|
436
444
|
});
|
|
437
445
|
return;
|
|
@@ -442,10 +450,10 @@ const Je = { class: "flex flex-col gap-16 w-full h-full" }, We = { class: "flex
|
|
|
442
450
|
message: b.message,
|
|
443
451
|
primaryActions: b.primaryActions
|
|
444
452
|
}).onPrimary(() => {
|
|
445
|
-
_.purchaseOrder &&
|
|
453
|
+
_.purchaseOrder && Se(_.purchaseOrder, t, D);
|
|
446
454
|
});
|
|
447
455
|
}
|
|
448
|
-
const
|
|
456
|
+
const De = re(() => {
|
|
449
457
|
var t, r;
|
|
450
458
|
return ((t = _.purchaseOrder) == null ? void 0 : t.status) === q.enum.RECEIVING || ((r = _.purchaseOrder) == null ? void 0 : r.status) === q.enum.COMPLETE;
|
|
451
459
|
}), Ae = re(() => {
|
|
@@ -459,18 +467,18 @@ const Je = { class: "flex flex-col gap-16 w-full h-full" }, We = { class: "flex
|
|
|
459
467
|
), b = Object.entries(D).reduce(
|
|
460
468
|
(O, [F, G]) => {
|
|
461
469
|
const E = G.reduce((j, I) => {
|
|
462
|
-
const K =
|
|
470
|
+
const K = Te(
|
|
463
471
|
j,
|
|
464
472
|
Math.max(j.precision, I.amount.precision)
|
|
465
473
|
);
|
|
466
|
-
return
|
|
467
|
-
},
|
|
474
|
+
return xe(K, I.amount);
|
|
475
|
+
}, ce(0));
|
|
468
476
|
return O[F] = E, O;
|
|
469
477
|
},
|
|
470
478
|
{}
|
|
471
479
|
), oe = ((B = _.purchaseOrder) == null ? void 0 : B.items) ?? [];
|
|
472
480
|
for (const O of oe)
|
|
473
|
-
b[x = O.sku._id] ?? (b[x] =
|
|
481
|
+
b[x = O.sku._id] ?? (b[x] = ce(0));
|
|
474
482
|
return b;
|
|
475
483
|
});
|
|
476
484
|
return (t, r) => {
|
|
@@ -479,7 +487,7 @@ const Je = { class: "flex flex-col gap-16 w-full h-full" }, We = { class: "flex
|
|
|
479
487
|
return d(), N(O, {
|
|
480
488
|
header: s(o)("inventory.transfer.receiveRequest.details.title") + ((F = t.purchaseOrder) != null && F.seqNumber ? ` #${(G = t.purchaseOrder) == null ? void 0 : G.seqNumber}` : ""),
|
|
481
489
|
modelValue: s(ne),
|
|
482
|
-
"onUpdate:modelValue": r[9] || (r[9] = (E) =>
|
|
490
|
+
"onUpdate:modelValue": r[9] || (r[9] = (E) => Ee(ne) ? ne.value = E : null),
|
|
483
491
|
"dismiss-away": T.value,
|
|
484
492
|
"close-button": "",
|
|
485
493
|
"max-width": 500
|
|
@@ -501,7 +509,7 @@ const Je = { class: "flex flex-col gap-16 w-full h-full" }, We = { class: "flex
|
|
|
501
509
|
class: "flex flex-col gap-8 px-12 py-16"
|
|
502
510
|
}, {
|
|
503
511
|
default: ee(() => {
|
|
504
|
-
var m, R, w, J,
|
|
512
|
+
var m, R, w, J, A, fe, ve, pe, ye, he, be, ge, _e, Re, Oe, qe;
|
|
505
513
|
return [
|
|
506
514
|
e("div", We, [
|
|
507
515
|
e("div", Xe, n(s(o)("inventory.transfer.receiveRequest.details.requestSummary")), 1),
|
|
@@ -521,40 +529,40 @@ const Je = { class: "flex flex-col gap-16 w-full h-full" }, We = { class: "flex
|
|
|
521
529
|
]),
|
|
522
530
|
e("div", rt, n(s(ae)(((J = t.purchaseOrder) == null ? void 0 : J._id) ?? "")), 1)
|
|
523
531
|
]),
|
|
524
|
-
(
|
|
532
|
+
(A = t.purchaseOrder) != null && A.effectiveAt ? (d(), y("div", at, [
|
|
525
533
|
e("div", nt, n(s(o)("inventory.transfer.receiveRequest.details.backdatedTo")), 1),
|
|
526
|
-
e("div", ot, n(s(
|
|
527
|
-
])) :
|
|
534
|
+
e("div", ot, n(s(de)(new Date((fe = t.purchaseOrder) == null ? void 0 : fe.effectiveAt))), 1)
|
|
535
|
+
])) : v("", !0),
|
|
528
536
|
e("div", lt, [
|
|
529
537
|
e("div", it, n(s(o)("inventory.transfer.receiveRequest.details.type.title")), 1),
|
|
530
538
|
e("div", ct, n(s(o)(
|
|
531
539
|
`inventory.transfer.receiveRequest.details.type.${M.value.toLocaleLowerCase("en-US")}`
|
|
532
540
|
)), 1)
|
|
533
541
|
]),
|
|
534
|
-
(pe = (
|
|
542
|
+
(pe = (ve = t.purchaseOrder) == null ? void 0 : ve.supplier) != null && pe.name ? (d(), y("div", ut, [
|
|
535
543
|
e("div", dt, n(s(o)("inventory.transfer.receiveRequest.details.from")), 1),
|
|
536
|
-
e("div", mt, n((
|
|
537
|
-
])) :
|
|
544
|
+
e("div", mt, n((he = (ye = t.purchaseOrder) == null ? void 0 : ye.supplier) == null ? void 0 : he.name), 1)
|
|
545
|
+
])) : v("", !0),
|
|
538
546
|
t.transferTo ? (d(), y("div", ft, [
|
|
539
|
-
e("div",
|
|
540
|
-
e("div",
|
|
541
|
-
])) :
|
|
542
|
-
s(
|
|
547
|
+
e("div", vt, n(s(o)("inventory.transfer.receiveRequest.details.to")), 1),
|
|
548
|
+
e("div", pt, n(t.transferTo), 1)
|
|
549
|
+
])) : v("", !0),
|
|
550
|
+
s(C).isEnabled ? (d(), y("div", yt, [
|
|
543
551
|
r[10] || (r[10] = e("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " NetSuite Subsidiary ", -1)),
|
|
544
|
-
e("div", ht, n(((
|
|
545
|
-
])) :
|
|
546
|
-
s(
|
|
552
|
+
e("div", ht, n(((ge = (be = t.purchaseOrder) == null ? void 0 : be.netSuite) == null ? void 0 : ge.subsidiary.name) || "-"), 1)
|
|
553
|
+
])) : v("", !0),
|
|
554
|
+
s(C).isEnabled ? (d(), y("div", bt, [
|
|
547
555
|
r[11] || (r[11] = e("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " NetSuite Transfer Order # ", -1)),
|
|
548
|
-
e("div", gt, n(((
|
|
549
|
-
])) :
|
|
550
|
-
(
|
|
556
|
+
e("div", gt, n(((Re = (_e = t.purchaseOrder) == null ? void 0 : _e.netSuite) == null ? void 0 : Re.id) || "-"), 1)
|
|
557
|
+
])) : v("", !0),
|
|
558
|
+
(Oe = t.purchaseOrder) != null && Oe.ref ? (d(), y("div", _t, [
|
|
551
559
|
e("div", Rt, n(s(o)("inventory.transfer.receiveRequest.details.reference")), 1),
|
|
552
560
|
e("div", Ot, n(t.purchaseOrder.ref), 1)
|
|
553
|
-
])) :
|
|
554
|
-
(
|
|
561
|
+
])) : v("", !0),
|
|
562
|
+
(qe = t.purchaseOrder) != null && qe.remark ? (d(), y("div", qt, [
|
|
555
563
|
e("div", kt, n(s(o)("inventory.transfer.receiveRequest.details.remark")), 1),
|
|
556
564
|
e("div", xt, n(t.purchaseOrder.remark), 1)
|
|
557
|
-
])) :
|
|
565
|
+
])) : v("", !0)
|
|
558
566
|
])
|
|
559
567
|
];
|
|
560
568
|
}),
|
|
@@ -562,23 +570,23 @@ const Je = { class: "flex flex-col gap-16 w-full h-full" }, We = { class: "flex
|
|
|
562
570
|
}),
|
|
563
571
|
e("div", wt, [
|
|
564
572
|
e("div", St, [
|
|
565
|
-
e("div", Dt, n(
|
|
566
|
-
(d(!0), y(W, null,
|
|
573
|
+
e("div", Dt, n(De.value ? s(o)("inventory.transfer.receiveRequest.details.receivedItems") : s(o)("inventory.transfer.receiveRequest.details.requestedItems")), 1),
|
|
574
|
+
(d(!0), y(W, null, ie(((E = t.purchaseOrder) == null ? void 0 : E.items) ?? [], (m) => (d(), y("div", {
|
|
567
575
|
key: m.code,
|
|
568
576
|
class: "flex flex-col"
|
|
569
577
|
}, [
|
|
570
|
-
e("div",
|
|
571
|
-
e("div",
|
|
572
|
-
e("div", Et, n(s(
|
|
578
|
+
e("div", At, [
|
|
579
|
+
e("div", Ct, n(m.name), 1),
|
|
580
|
+
e("div", Et, n(s(ue)(Ae.value[m.sku._id], !1)) + "/" + n(s(me)(m.quantity, m.sku.unit, m.measurement)), 1)
|
|
573
581
|
]),
|
|
574
582
|
e("div", Nt, [
|
|
575
583
|
e("div", Pt, n(m.code), 1),
|
|
576
|
-
m.totalCost && s(V).enableTotalCost ? (d(), y("div", Tt, " (" + n(s(
|
|
584
|
+
m.totalCost && s(V).enableTotalCost ? (d(), y("div", Tt, " (" + n(s(Fe)(m.totalCost)) + ") ", 1)) : v("", !0)
|
|
577
585
|
])
|
|
578
586
|
]))), 128))
|
|
579
587
|
])
|
|
580
588
|
])
|
|
581
|
-
], 64)) :
|
|
589
|
+
], 64)) : v("", !0),
|
|
582
590
|
c.value.value === "deliveryHistory" ? (d(), y("div", Ft, [
|
|
583
591
|
((I = (j = t.purchaseOrder) == null ? void 0 : j.deliveryOrder) == null ? void 0 : I.length) === 0 ? (d(), y("div", jt, [
|
|
584
592
|
U(B),
|
|
@@ -592,9 +600,9 @@ const Je = { class: "flex flex-col gap-16 w-full h-full" }, We = { class: "flex
|
|
|
592
600
|
e("div", Mt, n(s(o)("inventory.transfer.receiveRequest.details.trackDeliveryMessage")), 1),
|
|
593
601
|
U(B),
|
|
594
602
|
U(B)
|
|
595
|
-
])) :
|
|
603
|
+
])) : v("", !0),
|
|
596
604
|
(K = t.purchaseOrder) != null && K.deliveryOrder && ((Q = t.purchaseOrder) == null ? void 0 : Q.deliveryOrder.length) > 0 ? (d(), y("div", $t, [
|
|
597
|
-
(d(!0), y(W, null,
|
|
605
|
+
(d(!0), y(W, null, ie((Y = t.purchaseOrder) == null ? void 0 : Y.deliveryOrder, (m, R) => (d(), y(W, { key: R }, [
|
|
598
606
|
e("div", Kt, [
|
|
599
607
|
e("div", Lt, [
|
|
600
608
|
e("div", Vt, [
|
|
@@ -623,7 +631,7 @@ const Je = { class: "flex flex-col gap-16 w-full h-full" }, We = { class: "flex
|
|
|
623
631
|
]),
|
|
624
632
|
e("div", Gt, [
|
|
625
633
|
e("div", Ht, n(s(o)("inventory.transfer.receiveRequest.details.received")), 1),
|
|
626
|
-
e("div", zt, n(s(
|
|
634
|
+
e("div", zt, n(s(de)(new Date(m.createdAt))) + ", " + n(s(je)(new Date(m.createdAt))), 1)
|
|
627
635
|
])
|
|
628
636
|
]),
|
|
629
637
|
e("div", Qt, [
|
|
@@ -653,17 +661,17 @@ const Je = { class: "flex flex-col gap-16 w-full h-full" }, We = { class: "flex
|
|
|
653
661
|
]),
|
|
654
662
|
e("div", ss, [
|
|
655
663
|
e("div", rs, n(s(o)("inventory.transfer.receiveRequest.details.receivedItems")), 1),
|
|
656
|
-
(d(!0), y(W, null,
|
|
664
|
+
(d(!0), y(W, null, ie(m.received, (w) => (d(), y("div", {
|
|
657
665
|
class: "fm-typo-en-body-lg-600",
|
|
658
666
|
key: w.sku._id
|
|
659
|
-
}, n(w.sku.name) + " " + n(s(
|
|
667
|
+
}, n(w.sku.name) + " " + n(s(me)(w.amount, w.sku.unit, w.measurement)), 1))), 128))
|
|
660
668
|
]),
|
|
661
669
|
e("div", as, [
|
|
662
670
|
e("div", ns, n(s(o)("inventory.transfer.receiveRequest.details.deliveryOrderNo")), 1),
|
|
663
671
|
e("div", os, n(m.deliveryOrderNumber.trim().length ? m.deliveryOrderNumber : "-"), 1)
|
|
664
672
|
]),
|
|
665
673
|
e("div", ls, [
|
|
666
|
-
m.remark ? (d(), y("div", is, n(s(o)("inventory.transfer.receiveRequest.details.deliveryRemark")), 1)) :
|
|
674
|
+
m.remark ? (d(), y("div", is, n(s(o)("inventory.transfer.receiveRequest.details.deliveryRemark")), 1)) : v("", !0),
|
|
667
675
|
e("div", cs, n(m.remark), 1)
|
|
668
676
|
])
|
|
669
677
|
])
|
|
@@ -673,8 +681,8 @@ const Je = { class: "flex flex-col gap-16 w-full h-full" }, We = { class: "flex
|
|
|
673
681
|
])
|
|
674
682
|
])
|
|
675
683
|
], 64))), 128))
|
|
676
|
-
])) :
|
|
677
|
-
])) :
|
|
684
|
+
])) : v("", !0)
|
|
685
|
+
])) : v("", !0)
|
|
678
686
|
])
|
|
679
687
|
];
|
|
680
688
|
}),
|
|
@@ -685,60 +693,60 @@ const Je = { class: "flex flex-col gap-16 w-full h-full" }, We = { class: "flex
|
|
|
685
693
|
((E = t.purchaseOrder) == null ? void 0 : E.status) === s(q).enum.DRAFT && M.value === s(se).PURCHASE ? (d(), N(x, {
|
|
686
694
|
key: 0,
|
|
687
695
|
label: s(o)("inventory.transfer.receiveRequest.actions.confirmDraft"),
|
|
688
|
-
onClick: r[1] || (r[1] = (
|
|
696
|
+
onClick: r[1] || (r[1] = (A) => $("confirmDraft")),
|
|
689
697
|
loading: u.value === "confirmDraft",
|
|
690
698
|
disabled: u.value !== "confirmDraft" && i.value
|
|
691
|
-
}, null, 8, ["label", "loading", "disabled"])) :
|
|
699
|
+
}, null, 8, ["label", "loading", "disabled"])) : v("", !0),
|
|
692
700
|
((j = t.purchaseOrder) == null ? void 0 : j.status) === s(q).enum.DRAFT && M.value === s(se).TRANSFER ? (d(), N(x, {
|
|
693
701
|
key: 1,
|
|
694
702
|
label: s(o)("inventory.transfer.receiveRequest.actions.submitRequest"),
|
|
695
|
-
onClick: r[2] || (r[2] = (
|
|
703
|
+
onClick: r[2] || (r[2] = (A) => $("submitRequest")),
|
|
696
704
|
loading: u.value === "submitRequest",
|
|
697
705
|
disabled: u.value !== "submitRequest" && i.value
|
|
698
|
-
}, null, 8, ["label", "loading", "disabled"])) :
|
|
706
|
+
}, null, 8, ["label", "loading", "disabled"])) : v("", !0),
|
|
699
707
|
((I = t.purchaseOrder) == null ? void 0 : I.status) === s(q).enum.DRAFT ? (d(), N(x, {
|
|
700
708
|
key: 2,
|
|
701
709
|
label: s(o)("inventory.transfer.receiveRequest.actions.cancelDraft"),
|
|
702
|
-
onClick: r[3] || (r[3] = (
|
|
710
|
+
onClick: r[3] || (r[3] = (A) => $("cancelDraft")),
|
|
703
711
|
loading: u.value === "cancelDraft",
|
|
704
712
|
disabled: u.value !== "cancelDraft" && i.value,
|
|
705
713
|
variant: "destructive"
|
|
706
|
-
}, null, 8, ["label", "loading", "disabled"])) :
|
|
714
|
+
}, null, 8, ["label", "loading", "disabled"])) : v("", !0),
|
|
707
715
|
((K = t.purchaseOrder) == null ? void 0 : K.status) === s(q).enum.RECEIVING ? (d(), N(x, {
|
|
708
716
|
key: 3,
|
|
709
717
|
label: s(o)("inventory.transfer.receiveRequest.actions.completeReceive"),
|
|
710
|
-
onClick: r[4] || (r[4] = (
|
|
718
|
+
onClick: r[4] || (r[4] = (A) => $("completeReceive")),
|
|
711
719
|
loading: u.value === "completeReceive",
|
|
712
720
|
disabled: u.value !== "completeReceive" && i.value
|
|
713
|
-
}, null, 8, ["label", "loading", "disabled"])) :
|
|
721
|
+
}, null, 8, ["label", "loading", "disabled"])) : v("", !0),
|
|
714
722
|
t.canResubmit ? (d(), N(x, {
|
|
715
723
|
key: 4,
|
|
716
724
|
label: s(o)("inventory.transfer.receiveRequest.actions.resubmitRequest"),
|
|
717
|
-
onClick: r[5] || (r[5] = (
|
|
725
|
+
onClick: r[5] || (r[5] = (A) => $("submitRequest")),
|
|
718
726
|
loading: u.value === "submitRequest",
|
|
719
727
|
disabled: u.value !== "submitRequest" && i.value
|
|
720
|
-
}, null, 8, ["label", "loading", "disabled"])) :
|
|
728
|
+
}, null, 8, ["label", "loading", "disabled"])) : v("", !0),
|
|
721
729
|
(((Q = t.purchaseOrder) == null ? void 0 : Q.status) === s(q).enum.REQUESTING || ((Y = t.purchaseOrder) == null ? void 0 : Y.status) === s(q).enum.PROCESSING) && t.canApprove ? (d(), N(x, {
|
|
722
730
|
key: 5,
|
|
723
731
|
label: s(o)("inventory.transfer.approval.actions.approveRequest"),
|
|
724
|
-
onClick: r[6] || (r[6] = (
|
|
732
|
+
onClick: r[6] || (r[6] = (A) => $("approveRequest")),
|
|
725
733
|
loading: u.value === "approveRequest",
|
|
726
734
|
disabled: u.value !== "approveRequest" && i.value
|
|
727
|
-
}, null, 8, ["label", "loading", "disabled"])) :
|
|
735
|
+
}, null, 8, ["label", "loading", "disabled"])) : v("", !0),
|
|
728
736
|
((m = t.purchaseOrder) == null ? void 0 : m.status) === s(q).enum.REQUESTING && t.canApprove ? (d(), N(x, {
|
|
729
737
|
key: 6,
|
|
730
738
|
label: s(o)("inventory.transfer.approval.actions.rejectRequest"),
|
|
731
|
-
onClick: r[7] || (r[7] = (
|
|
739
|
+
onClick: r[7] || (r[7] = (A) => $("rejectRequest")),
|
|
732
740
|
loading: u.value === "rejectRequest",
|
|
733
741
|
disabled: u.value !== "rejectRequest" && i.value,
|
|
734
742
|
variant: "destructive"
|
|
735
|
-
}, null, 8, ["label", "loading", "disabled"])) :
|
|
743
|
+
}, null, 8, ["label", "loading", "disabled"])) : v("", !0),
|
|
736
744
|
((R = t.purchaseOrder) == null ? void 0 : R.status) !== s(q).enum.COMPLETE && ((w = t.purchaseOrder) == null ? void 0 : w.status) !== s(q).enum.CANCEL && (((J = t.purchaseOrder) == null ? void 0 : J.status) !== s(q).enum.REQUESTING || t.canApprove) ? (d(), N(x, {
|
|
737
745
|
key: 7,
|
|
738
746
|
label: s(o)("common.close"),
|
|
739
747
|
variant: "tertiary",
|
|
740
|
-
onClick: r[8] || (r[8] = (
|
|
741
|
-
}, null, 8, ["label"])) :
|
|
748
|
+
onClick: r[8] || (r[8] = (A) => a("update:show", !1))
|
|
749
|
+
}, null, 8, ["label"])) : v("", !0)
|
|
742
750
|
])
|
|
743
751
|
];
|
|
744
752
|
}),
|