@feedmepos/mf-inventory-portal 1.2.17-dev.1 → 1.2.18
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-CvQI16_m.js → App-C7bnTGbg.js} +1 -1
- package/dist/{ApprovalView-Bpmp0EiN.js → ApprovalView-WhdGpygb.js} +2 -2
- package/dist/{BindingsDialog-Dj3Ul3Hv.js → BindingsDialog-CHKnpitE.js} +2 -2
- package/dist/{BindingsPicker-DFaOJ9Mr.js → BindingsPicker-BXUv8H0c.js} +1 -1
- package/dist/{BindingsTable-D_gYSqc3.js → BindingsTable-4Ndm5r7H.js} +1 -1
- package/dist/{ClosingDraftView-Ds7yRxye.js → ClosingDraftView-C0XTMbHo.js} +2 -2
- package/dist/{ClosingTemplateView-BEknM3gR.js → ClosingTemplateView-C17StrHT.js} +296 -296
- package/dist/{DeliveryOrderPrintPreview-pKBREKAn.js → DeliveryOrderPrintPreview-C7t3WZV1.js} +1 -1
- package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-D4Fy0CRH.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-DRSUXz--.js} +3 -3
- package/dist/{FmMultiselectDialog-KFA3Oe14.js → FmMultiselectDialog-BnAHRAAM.js} +1 -1
- package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-CHViCIO9.js → FmUnitInput.vue_vue_type_script_setup_true_lang-DbaD9qUk.js} +1 -1
- package/dist/{ImportView-BMIp5iNg.js → ImportView-BJyqR26k.js} +275 -279
- package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-BbR7BY5t.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-DYskeNa8.js} +1 -1
- package/dist/{IngredientGroupView-DyPWmsHp.js → IngredientGroupView-CmTrE28Q.js} +2 -2
- package/dist/{IngredientsView-BBrYRXgE.js → IngredientsView-CZSd4iI2.js} +8 -8
- package/dist/{IntegrationView-ClHFof33.js → IntegrationView-BcdRocma.js} +3 -3
- package/dist/{InventoryBindingForm-BBA5xLdJ.js → InventoryBindingForm-hsjpKGlq.js} +1 -1
- package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-CmPAkzJn.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-5yGfFt02.js} +3 -3
- package/dist/{InventoryBindingSummary-BjXlLwGS.js → InventoryBindingSummary-AE1tIBZX.js} +1 -1
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-mFE4CC3D.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-qhWKUytO.js} +1 -1
- package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-AWY6QeLj.js → PremiumBadge.vue_vue_type_script_setup_true_lang-BN07OE3j.js} +1 -1
- package/dist/{PublishView-D3xxqwhK.js → PublishView-CPWKoKv4.js} +1 -1
- package/dist/{PurchaseOrderPrintPreview-mwyZgu5h.js → PurchaseOrderPrintPreview-CkiHTmgC.js} +1 -1
- package/dist/{ReceiveRequestView-NyKfbtAl.js → ReceiveRequestView-B-Q5LDit.js} +185 -193
- package/dist/{RecipeView-Cg7_T6-B.js → RecipeView-DEd2uP8R.js} +3 -3
- package/dist/{StockView-C9K7xKpF.js → StockView-DGL_EghN.js} +7 -7
- package/dist/{SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-DZhRVJwr.js → SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-D6-lImIW.js} +1 -1
- package/dist/{SupplierView-CaEzwVVw.js → SupplierView-uY0HvMr-.js} +4 -4
- package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-BVSyv6NL.js → TransferDetails.vue_vue_type_script_setup_true_lang-C0LNY9CK.js} +5 -5
- package/dist/{TransferTemplateView-B4_J_O_U.js → TransferTemplateView-DjI7px12.js} +7 -7
- package/dist/{UnitView-DuiQRfl9.js → UnitView-CANjtjhH.js} +3 -3
- package/dist/{WarehouseView-Bb2VB3uH.js → WarehouseView-BzGxfJI-.js} +1 -1
- package/dist/{app-C_ybIeQL.js → app-ZxL49u29.js} +2468 -2480
- package/dist/app.js +1 -1
- package/dist/{closing-template-BjPPidb4.js → closing-template-BA7jw5Ib.js} +1 -1
- package/dist/{decimal-DIKbgzfe.js → decimal-YUVJ1ppE.js} +1 -1
- package/dist/{format-unit-display-SiJQnJk-.js → format-unit-display-B8-ONx5f.js} +3 -3
- package/dist/{import-export.helper-DdPmfMT_.js → import-export.helper-B0RkcNAy.js} +62 -67
- package/dist/{index-CowO4VHt.js → index-BOLpjtRD.js} +1 -1
- package/dist/{index-bIhW74tJ.js → index-By0SWtFG.js} +1 -1
- package/dist/{purchase-order-template-C8y1AzcV.js → purchase-order-template-CppyMHCz.js} +1 -1
- package/dist/{stock-BQVrprBx.js → stock-8M_JUjPp.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/{supplier-B6kYUhIp.js → supplier-BkEYL5KY.js} +1 -1
- package/dist/{use-ingredient-select-dialog-BA8NYDBZ.js → use-ingredient-select-dialog-BNr7wDV-.js} +1 -1
- package/dist/{use-inventory-binding-dialog-DM-6mqUf.js → use-inventory-binding-dialog-C3r06vdY.js} +1 -1
- package/package.json +3 -3
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { reactive as gt, onMounted as
|
|
2
|
-
import { b as Ue, Z as
|
|
3
|
-
import { u as
|
|
4
|
-
import { _ as Ct, u as ns, i as ls, e as rs } from "./PremiumBadge.vue_vue_type_script_setup_true_lang-
|
|
1
|
+
import { reactive as gt, onMounted as Qe, watch as ge, computed as N, h as L, defineComponent as ce, openBlock as S, createElementBlock as T, Fragment as de, renderList as Se, createElementVNode as n, toDisplayString as M, unref as s, resolveComponent as $, createVNode as y, withCtx as A, createCommentVNode as j, ref as q, createBlock as W, normalizeClass as J, normalizeStyle as _t, createTextVNode as $e, nextTick as It, mergeProps as Ze, isRef as xe, createSlots as $t, Teleport as Tt, normalizeProps as Dt, guardReactiveProps as Pt } from "vue";
|
|
2
|
+
import { b as Ue, Z as Ge, c as Je, q as Me, l as Ce, ae as Ye, $ as Vt, aF as Rt, A as qe, M as At, r as ht, al as We, K as fe, aw as Et, aG as Ot, aH as Mt, a9 as qt, aI as Ut, P as kt, u as et, a as tt, aJ as Nt, aK as Bt, ad as zt, a5 as Lt, aL as Ht, J as xt, w as jt, e as Oe, aM as Yt, ar as Qt, B as Kt, C as Xt, m as je, af as ft, E as Zt, N as Gt, H as Jt, G as Wt, I as es, a1 as vt } from "./app-ZxL49u29.js";
|
|
3
|
+
import { u as st, a as ts, P as Xe, b as ss, _ as os, g as as } from "./TransferDetails.vue_vue_type_script_setup_true_lang-C0LNY9CK.js";
|
|
4
|
+
import { _ as Ct, u as ns, i as ls, e as rs } from "./PremiumBadge.vue_vue_type_script_setup_true_lang-BN07OE3j.js";
|
|
5
5
|
import { u as is } from "./useTabStorage-BkIVScW_.js";
|
|
6
|
-
import { useBreakpoints as
|
|
7
|
-
import { P as
|
|
8
|
-
import { _ as cs, F as ms, a as ps, b as fs } from "./FmUnitInput.vue_vue_type_script_setup_true_lang-
|
|
9
|
-
import { c as
|
|
10
|
-
import { useI18n as
|
|
11
|
-
import "./FmMultiselectDialog-
|
|
12
|
-
import { u as
|
|
6
|
+
import { useBreakpoints as ot, components as be, FmButtonVariant as us, useSnackbar as Te, useDialog as ds, useProxiedModel as St } from "@feedmepos/ui-library";
|
|
7
|
+
import { P as ne, u as wt } from "./format-unit-display-B8-ONx5f.js";
|
|
8
|
+
import { _ as cs, F as ms, a as ps, b as fs } from "./FmUnitInput.vue_vue_type_script_setup_true_lang-DbaD9qUk.js";
|
|
9
|
+
import { c as Ie, u as vs, _ as ys } from "./FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-DRSUXz--.js";
|
|
10
|
+
import { useI18n as _e } from "@feedmepos/mf-common";
|
|
11
|
+
import "./FmMultiselectDialog-BnAHRAAM.js";
|
|
12
|
+
import { u as at } from "./supplier-BkEYL5KY.js";
|
|
13
13
|
import { _ as bs } from "./PreviewBadge.vue_vue_type_script_setup_true_lang-CRZiQHjx.js";
|
|
14
|
-
var
|
|
15
|
-
const gs = () => (
|
|
14
|
+
var ee = /* @__PURE__ */ ((g) => (g.Code = "Code", g.Name = "Name", g.TemplateName = "TemplateName", g.Amount = "Amount", g.Cost = "Cost", g.TotalCost = "TotalCost", g.Delete = "Delete", g))(ee || {});
|
|
15
|
+
const gs = () => (_e(), L(
|
|
16
16
|
Ct,
|
|
17
17
|
{
|
|
18
18
|
zIndex: 50,
|
|
@@ -21,26 +21,26 @@ const gs = () => (ge(), L(
|
|
|
21
21
|
`Total (${ht()})`
|
|
22
22
|
));
|
|
23
23
|
function _s(g) {
|
|
24
|
-
const { t: w } =
|
|
25
|
-
|
|
24
|
+
const { t: w } = _e(), r = gt({}), { breakpoints: p } = ot(), x = Je(), t = Ue();
|
|
25
|
+
Qe(() => {
|
|
26
26
|
for (const v of g.items) {
|
|
27
27
|
if (!v.totalCost)
|
|
28
28
|
continue;
|
|
29
|
-
const { cost: e } =
|
|
29
|
+
const { cost: e } = Ie(
|
|
30
30
|
v.sku,
|
|
31
31
|
v.quantity,
|
|
32
32
|
v.measurement,
|
|
33
33
|
{
|
|
34
34
|
supplier: g.supplier
|
|
35
35
|
}
|
|
36
|
-
), u = v.totalCost ??
|
|
36
|
+
), u = v.totalCost ?? Ge.reset();
|
|
37
37
|
e ? r[v.sku._id] = e.amount !== u.amount || e.precision !== u.precision : r[v.sku._id] = !0;
|
|
38
38
|
}
|
|
39
|
-
}),
|
|
39
|
+
}), ge([() => g.supplier], ([v]) => {
|
|
40
40
|
for (const e of g.items) {
|
|
41
41
|
if (!e.totalCost || r[e.sku._id] || !f(e.sku))
|
|
42
42
|
continue;
|
|
43
|
-
const { cost: u } =
|
|
43
|
+
const { cost: u } = Ie(
|
|
44
44
|
e.sku,
|
|
45
45
|
e.quantity,
|
|
46
46
|
e.measurement,
|
|
@@ -64,7 +64,7 @@ function _s(g) {
|
|
|
64
64
|
cell(v) {
|
|
65
65
|
const e = v.row.original;
|
|
66
66
|
return t.isEnabled ? L(
|
|
67
|
-
|
|
67
|
+
be.FmTooltip,
|
|
68
68
|
{
|
|
69
69
|
content: e.code,
|
|
70
70
|
placement: "top",
|
|
@@ -78,7 +78,7 @@ function _s(g) {
|
|
|
78
78
|
},
|
|
79
79
|
e.code
|
|
80
80
|
)
|
|
81
|
-
) : L(
|
|
81
|
+
) : L(be.FmTextField, {
|
|
82
82
|
modelValue: e.code,
|
|
83
83
|
"onUpdate:modelValue": (u) => {
|
|
84
84
|
g.updateItem({
|
|
@@ -100,7 +100,7 @@ function _s(g) {
|
|
|
100
100
|
cell(v) {
|
|
101
101
|
const e = v.row.original;
|
|
102
102
|
return t.isEnabled ? L(
|
|
103
|
-
|
|
103
|
+
be.FmTooltip,
|
|
104
104
|
{
|
|
105
105
|
content: e.name,
|
|
106
106
|
placement: "top",
|
|
@@ -114,7 +114,7 @@ function _s(g) {
|
|
|
114
114
|
},
|
|
115
115
|
e.name
|
|
116
116
|
)
|
|
117
|
-
) : L(
|
|
117
|
+
) : L(be.FmTextField, {
|
|
118
118
|
modelValue: e.name,
|
|
119
119
|
"onUpdate:modelValue": (u) => {
|
|
120
120
|
g.updateItem({
|
|
@@ -137,7 +137,7 @@ function _s(g) {
|
|
|
137
137
|
cell(v) {
|
|
138
138
|
const e = v.row.original, u = e.code, k = e.name;
|
|
139
139
|
return L(
|
|
140
|
-
|
|
140
|
+
be.FmTooltip,
|
|
141
141
|
{ zIndex: 50 },
|
|
142
142
|
{
|
|
143
143
|
default() {
|
|
@@ -192,7 +192,7 @@ function _s(g) {
|
|
|
192
192
|
measurement: c.measurement
|
|
193
193
|
};
|
|
194
194
|
if (x.enableTotalCost) {
|
|
195
|
-
const { cost: B } =
|
|
195
|
+
const { cost: B } = Ie(
|
|
196
196
|
D.sku,
|
|
197
197
|
D.quantity,
|
|
198
198
|
D.measurement,
|
|
@@ -233,7 +233,7 @@ function _s(g) {
|
|
|
233
233
|
cell(v) {
|
|
234
234
|
const e = v.row.original, u = f(e.sku), k = p.value.xs || p.value.sm;
|
|
235
235
|
if (!r[e.sku._id] && u) {
|
|
236
|
-
const { cost: a, supplierOverrideCost: i } =
|
|
236
|
+
const { cost: a, supplierOverrideCost: i } = Ie(
|
|
237
237
|
e.sku,
|
|
238
238
|
e.quantity,
|
|
239
239
|
e.measurement,
|
|
@@ -251,7 +251,7 @@ function _s(g) {
|
|
|
251
251
|
key: e.sku._id
|
|
252
252
|
},
|
|
253
253
|
[
|
|
254
|
-
L(
|
|
254
|
+
L(be.FmButton, {
|
|
255
255
|
prependIcon: "edit",
|
|
256
256
|
variant: us.Tertiary,
|
|
257
257
|
disabled: g.disabled,
|
|
@@ -270,7 +270,7 @@ function _s(g) {
|
|
|
270
270
|
[
|
|
271
271
|
L(
|
|
272
272
|
"span",
|
|
273
|
-
k ?
|
|
273
|
+
k ? Ye(a) : Ce(a)
|
|
274
274
|
),
|
|
275
275
|
L(
|
|
276
276
|
"span",
|
|
@@ -291,7 +291,7 @@ function _s(g) {
|
|
|
291
291
|
]
|
|
292
292
|
},
|
|
293
293
|
[
|
|
294
|
-
|
|
294
|
+
Ye(i.costPerUnit),
|
|
295
295
|
"/",
|
|
296
296
|
i.measurement ? L(
|
|
297
297
|
"span",
|
|
@@ -307,7 +307,7 @@ function _s(g) {
|
|
|
307
307
|
);
|
|
308
308
|
}
|
|
309
309
|
return L(
|
|
310
|
-
|
|
310
|
+
be.FmTextField,
|
|
311
311
|
{
|
|
312
312
|
modelValue: Ce(e.totalCost ?? { amount: 0, precision: 0 }),
|
|
313
313
|
key: e.sku._id,
|
|
@@ -336,12 +336,12 @@ function _s(g) {
|
|
|
336
336
|
) : null;
|
|
337
337
|
},
|
|
338
338
|
append() {
|
|
339
|
-
return u ? L(
|
|
339
|
+
return u ? L(be.FmButton, {
|
|
340
340
|
prependIcon: "close",
|
|
341
341
|
variant: "tertiary",
|
|
342
342
|
disabled: g.disabled,
|
|
343
343
|
onClick() {
|
|
344
|
-
const { cost: a } =
|
|
344
|
+
const { cost: a } = Ie(
|
|
345
345
|
e.sku,
|
|
346
346
|
e.quantity,
|
|
347
347
|
e.measurement,
|
|
@@ -369,7 +369,7 @@ function _s(g) {
|
|
|
369
369
|
cell(v) {
|
|
370
370
|
const e = v.row.original;
|
|
371
371
|
return L("div", { class: "flex justify-end" }, [
|
|
372
|
-
L(
|
|
372
|
+
L(be.FmButton, {
|
|
373
373
|
key: e.sku._id,
|
|
374
374
|
class: "delete-button",
|
|
375
375
|
type: "button",
|
|
@@ -392,7 +392,7 @@ function _s(g) {
|
|
|
392
392
|
}
|
|
393
393
|
];
|
|
394
394
|
return {
|
|
395
|
-
columnDefs: N(() => x.enableTotalCost && g.transferType ===
|
|
395
|
+
columnDefs: N(() => x.enableTotalCost && g.transferType === ne.PURCHASE ? F : F.filter(
|
|
396
396
|
(v) => v.id !== "Cost"
|
|
397
397
|
/* Cost */
|
|
398
398
|
))
|
|
@@ -404,7 +404,7 @@ const hs = { class: "flex flex-col gap-8 px-16 xs:px-4 sm:px-4 py-4 items-center
|
|
|
404
404
|
prices: {}
|
|
405
405
|
},
|
|
406
406
|
setup(g) {
|
|
407
|
-
const w =
|
|
407
|
+
const w = at();
|
|
408
408
|
function r(p) {
|
|
409
409
|
return w.suppliers.find((x) => x._id === p);
|
|
410
410
|
}
|
|
@@ -424,7 +424,7 @@ const hs = { class: "flex flex-col gap-8 px-16 xs:px-4 sm:px-4 py-4 items-center
|
|
|
424
424
|
class: "flex flex-col w-[150px] xs:flex-1 text-ellipsis cursor-pointer"
|
|
425
425
|
}, [
|
|
426
426
|
n("div", Cs, [
|
|
427
|
-
n("span", null, M(F.totalCost ? s(
|
|
427
|
+
n("span", null, M(F.totalCost ? s(Ye)(F.totalCost) : "No data"), 1),
|
|
428
428
|
x[0] || (x[0] = n("span", { class: "text-fm-color-typo-secondary" }, "/", -1)),
|
|
429
429
|
n("span", null, M(s(Ce)(F.totalUnit, !1)), 1),
|
|
430
430
|
n("span", null, M(((I = F.measurement) == null ? void 0 : I.abbrev) ?? F.unit.abbrev), 1)
|
|
@@ -432,7 +432,7 @@ const hs = { class: "flex flex-col gap-8 px-16 xs:px-4 sm:px-4 py-4 items-center
|
|
|
432
432
|
n("div", Ss, [
|
|
433
433
|
n("span", null, "(#" + M(F.seqNumber) + ")", 1),
|
|
434
434
|
x[1] || (x[1] = n("span", null, M(" "), -1)),
|
|
435
|
-
n("span", null, M(s(
|
|
435
|
+
n("span", null, M(s(We)(new Date(F.date))), 1)
|
|
436
436
|
])
|
|
437
437
|
]);
|
|
438
438
|
}), 128))
|
|
@@ -453,7 +453,7 @@ const hs = { class: "flex flex-col gap-8 px-16 xs:px-4 sm:px-4 py-4 items-center
|
|
|
453
453
|
row: {}
|
|
454
454
|
},
|
|
455
455
|
setup(g) {
|
|
456
|
-
const { t: w } =
|
|
456
|
+
const { t: w } = _e();
|
|
457
457
|
return (r, p) => {
|
|
458
458
|
var f, F, I, v, e, u, k, a, i, h, _, C, l, c, D, B, Y, Q, K, O, U, V, d, b, R, X, Z;
|
|
459
459
|
const x = $("FmLabel"), t = $("FmSpacer");
|
|
@@ -473,21 +473,21 @@ const hs = { class: "flex flex-col gap-8 px-16 xs:px-4 sm:px-4 py-4 items-center
|
|
|
473
473
|
n("div", Ds, [
|
|
474
474
|
n("div", Ps, [
|
|
475
475
|
y(x, {
|
|
476
|
-
label: s(w)(`inventory.transfer.form.items.table.${s(
|
|
476
|
+
label: s(w)(`inventory.transfer.form.items.table.${s(ee).Code}`)
|
|
477
477
|
}, null, 8, ["label"]),
|
|
478
478
|
y(s(fe), {
|
|
479
|
-
render: (a = (k = (u = r.cellByColId[s(
|
|
480
|
-
props: (h = (i = r.cellByColId[s(
|
|
479
|
+
render: (a = (k = (u = r.cellByColId[s(ee).Code]) == null ? void 0 : u.column) == null ? void 0 : k.columnDef) == null ? void 0 : a.cell,
|
|
480
|
+
props: (h = (i = r.cellByColId[s(ee).Code]) == null ? void 0 : i.getContext) == null ? void 0 : h.call(i)
|
|
481
481
|
}, null, 8, ["render", "props"]),
|
|
482
482
|
p[0] || (p[0] = n("div", { class: "fm-typo-en-body-md-600 text-fm-color-primary" }, null, -1))
|
|
483
483
|
]),
|
|
484
484
|
n("div", Vs, [
|
|
485
485
|
y(x, {
|
|
486
|
-
label: s(w)(`inventory.transfer.form.items.table.${s(
|
|
486
|
+
label: s(w)(`inventory.transfer.form.items.table.${s(ee).Name}`)
|
|
487
487
|
}, null, 8, ["label"]),
|
|
488
488
|
y(s(fe), {
|
|
489
|
-
render: (l = (C = (_ = r.cellByColId[s(
|
|
490
|
-
props: (D = (c = r.cellByColId[s(
|
|
489
|
+
render: (l = (C = (_ = r.cellByColId[s(ee).Name]) == null ? void 0 : _.column) == null ? void 0 : C.columnDef) == null ? void 0 : l.cell,
|
|
490
|
+
props: (D = (c = r.cellByColId[s(ee).Name]) == null ? void 0 : c.getContext) == null ? void 0 : D.call(c)
|
|
491
491
|
}, null, 8, ["render", "props"]),
|
|
492
492
|
p[1] || (p[1] = n("div", { class: "fm-typo-en-body-md-600 text-fm-color-primary" }, null, -1))
|
|
493
493
|
])
|
|
@@ -495,26 +495,26 @@ const hs = { class: "flex flex-col gap-8 px-16 xs:px-4 sm:px-4 py-4 items-center
|
|
|
495
495
|
n("div", Rs, [
|
|
496
496
|
n("div", As, [
|
|
497
497
|
y(x, {
|
|
498
|
-
label: s(w)(`inventory.transfer.form.items.table.${s(
|
|
498
|
+
label: s(w)(`inventory.transfer.form.items.table.${s(ee).Amount}`)
|
|
499
499
|
}, null, 8, ["label"]),
|
|
500
500
|
y(s(fe), {
|
|
501
|
-
render: (Q = (Y = (B = r.cellByColId[s(
|
|
502
|
-
props: (O = (K = r.cellByColId[s(
|
|
501
|
+
render: (Q = (Y = (B = r.cellByColId[s(ee).Amount]) == null ? void 0 : B.column) == null ? void 0 : Y.columnDef) == null ? void 0 : Q.cell,
|
|
502
|
+
props: (O = (K = r.cellByColId[s(ee).Amount]) == null ? void 0 : K.getContext) == null ? void 0 : O.call(K)
|
|
503
503
|
}, null, 8, ["render", "props"]),
|
|
504
504
|
p[2] || (p[2] = n("div", { class: "fm-typo-en-body-md-600 text-fm-color-primary" }, null, -1))
|
|
505
505
|
]),
|
|
506
|
-
r.cellByColId[s(
|
|
506
|
+
r.cellByColId[s(ee).Cost] ? (S(), T("div", Es, [
|
|
507
507
|
y(Ct, { "z-index": 50 }, {
|
|
508
508
|
default: A(() => [
|
|
509
509
|
y(x, {
|
|
510
|
-
label: s(w)(`inventory.transfer.form.items.table.${s(
|
|
510
|
+
label: s(w)(`inventory.transfer.form.items.table.${s(ee).Cost}2`)
|
|
511
511
|
}, null, 8, ["label"])
|
|
512
512
|
]),
|
|
513
513
|
_: 1
|
|
514
514
|
}),
|
|
515
515
|
y(s(fe), {
|
|
516
|
-
render: (d = (V = (U = r.cellByColId[s(
|
|
517
|
-
props: (R = (b = r.cellByColId[s(
|
|
516
|
+
render: (d = (V = (U = r.cellByColId[s(ee).Cost]) == null ? void 0 : U.column) == null ? void 0 : V.columnDef) == null ? void 0 : d.cell,
|
|
517
|
+
props: (R = (b = r.cellByColId[s(ee).Cost]) == null ? void 0 : b.getContext) == null ? void 0 : R.call(b)
|
|
518
518
|
}, null, 8, ["render", "props"]),
|
|
519
519
|
p[3] || (p[3] = n("div", { class: "fm-typo-en-body-md-600 text-fm-color-primary" }, null, -1))
|
|
520
520
|
])) : j("", !0)
|
|
@@ -547,7 +547,7 @@ function Ms(g) {
|
|
|
547
547
|
}
|
|
548
548
|
}), p = N({
|
|
549
549
|
get() {
|
|
550
|
-
return w.value === null ? "" :
|
|
550
|
+
return w.value === null ? "" : We(w.value);
|
|
551
551
|
},
|
|
552
552
|
set(t) {
|
|
553
553
|
t ? w.value = /* @__PURE__ */ new Date(`${t} ${x.value}`) : w.value = null;
|
|
@@ -621,7 +621,7 @@ const qs = {
|
|
|
621
621
|
},
|
|
622
622
|
emits: ["update:poItems", "update:forecastAmounts"],
|
|
623
623
|
setup(g, { emit: w }) {
|
|
624
|
-
const r = g, p = w, x = q(!1), t = q(7), f = ns(), F =
|
|
624
|
+
const r = g, p = w, x = q(!1), t = q(7), f = ns(), F = Te(), { t: I } = _e();
|
|
625
625
|
function v(a, i, h) {
|
|
626
626
|
return i != null && a < i && (a = i), h != null && a > h && (a = h), a;
|
|
627
627
|
}
|
|
@@ -786,8 +786,8 @@ const qs = {
|
|
|
786
786
|
}
|
|
787
787
|
});
|
|
788
788
|
function eo() {
|
|
789
|
-
const g =
|
|
790
|
-
|
|
789
|
+
const g = Te(), w = st(), r = q(!1);
|
|
790
|
+
ge(r, (f) => {
|
|
791
791
|
f && (x.value = !0, p().finally(() => {
|
|
792
792
|
x.value = !1;
|
|
793
793
|
}));
|
|
@@ -903,7 +903,7 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
903
903
|
emits: ["netsuite:ready"],
|
|
904
904
|
setup(g, { emit: w }) {
|
|
905
905
|
const r = Ue(), p = g, x = w, { t } = Ut(), f = q(!1), F = q();
|
|
906
|
-
|
|
906
|
+
Qe(() => {
|
|
907
907
|
var u, k, a, i;
|
|
908
908
|
let e = {
|
|
909
909
|
id: "",
|
|
@@ -971,7 +971,7 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
971
971
|
disabled: e.disabled
|
|
972
972
|
}, {
|
|
973
973
|
content: A(() => u[0] || (u[0] = [
|
|
974
|
-
|
|
974
|
+
$e("This field is locked and based on the location of the request.")
|
|
975
975
|
])),
|
|
976
976
|
default: A(() => [
|
|
977
977
|
y(i, null, {
|
|
@@ -1021,7 +1021,7 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
1021
1021
|
},
|
|
1022
1022
|
emits: ["validation-success", "form:ready"],
|
|
1023
1023
|
setup(g, { expose: w, emit: r }) {
|
|
1024
|
-
const p = g, x = r, t = kt(), { t: f } =
|
|
1024
|
+
const p = g, x = r, t = kt(), { t: f } = _e(), F = et(), I = tt(), v = Ue(), e = at(), u = Je(), k = wt(), { breakpoints: a } = ot(), i = N(() => a.value.xs || a.value.sm), h = gt({
|
|
1025
1025
|
value: !1
|
|
1026
1026
|
}), _ = q(!1), C = q(0), l = q([]), c = N(
|
|
1027
1027
|
() => {
|
|
@@ -1029,7 +1029,7 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
1029
1029
|
return ((o = p.modelValue) == null ? void 0 : o.templateDoc) ?? k.templates.find((m) => m._id === t.template);
|
|
1030
1030
|
}
|
|
1031
1031
|
), D = N(() => t.status === "DRAFT" || !t._rev);
|
|
1032
|
-
|
|
1032
|
+
ge(c, (o) => {
|
|
1033
1033
|
var m, E;
|
|
1034
1034
|
if (o) {
|
|
1035
1035
|
if (o && !o.purchaseOrder.supplier)
|
|
@@ -1037,11 +1037,11 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
1037
1037
|
if (D.value) {
|
|
1038
1038
|
const H = (m = o.purchaseOrder) == null ? void 0 : m.supplier.internal;
|
|
1039
1039
|
if (H && (H == "restaurant" || H == "warehouse")) {
|
|
1040
|
-
const
|
|
1041
|
-
(
|
|
1040
|
+
const le = (E = o.purchaseOrder) == null ? void 0 : E.supplier._id, me = `${H}_${le}`, G = F.allLocations.find(
|
|
1041
|
+
(re) => re.type === H && re.dbName === me
|
|
1042
1042
|
);
|
|
1043
1043
|
if (G) {
|
|
1044
|
-
const
|
|
1044
|
+
const re = {
|
|
1045
1045
|
...o.purchaseOrder.supplier,
|
|
1046
1046
|
name: G.doc.profile.name,
|
|
1047
1047
|
contactName: G.doc.profile.name,
|
|
@@ -1051,22 +1051,22 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
1051
1051
|
address: G.doc.profile.address,
|
|
1052
1052
|
preparationTime: G.preparationTime
|
|
1053
1053
|
};
|
|
1054
|
-
t.supplier =
|
|
1054
|
+
t.supplier = re;
|
|
1055
1055
|
}
|
|
1056
1056
|
} else {
|
|
1057
|
-
const
|
|
1057
|
+
const le = e.suppliers.find(
|
|
1058
1058
|
(me) => {
|
|
1059
1059
|
var G;
|
|
1060
1060
|
return me._id === ((G = o.purchaseOrder.supplier) == null ? void 0 : G._id);
|
|
1061
1061
|
}
|
|
1062
1062
|
);
|
|
1063
|
-
t.supplier =
|
|
1063
|
+
t.supplier = le ?? t.supplier;
|
|
1064
1064
|
}
|
|
1065
1065
|
if (!t.supplier)
|
|
1066
1066
|
throw new Error("Unable to resolve supplier from template");
|
|
1067
1067
|
}
|
|
1068
1068
|
}
|
|
1069
|
-
}),
|
|
1069
|
+
}), Qe(() => {
|
|
1070
1070
|
var o;
|
|
1071
1071
|
try {
|
|
1072
1072
|
const m = I.skuById;
|
|
@@ -1075,7 +1075,7 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
1075
1075
|
} finally {
|
|
1076
1076
|
_.value = !0;
|
|
1077
1077
|
}
|
|
1078
|
-
}),
|
|
1078
|
+
}), ge([_, h], ([o, m], [E, H]) => {
|
|
1079
1079
|
m.value && H.value && x("form:ready");
|
|
1080
1080
|
});
|
|
1081
1081
|
const B = N(
|
|
@@ -1094,15 +1094,15 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
1094
1094
|
), K = N({
|
|
1095
1095
|
get() {
|
|
1096
1096
|
var o;
|
|
1097
|
-
return typeof ((o = t == null ? void 0 : t.supplier) == null ? void 0 : o.internal) == "string" ?
|
|
1097
|
+
return typeof ((o = t == null ? void 0 : t.supplier) == null ? void 0 : o.internal) == "string" ? ne.TRANSFER : ne.PURCHASE;
|
|
1098
1098
|
},
|
|
1099
1099
|
set(o) {
|
|
1100
1100
|
var E;
|
|
1101
|
-
const m = typeof ((E = t == null ? void 0 : t.supplier) == null ? void 0 : E.internal) == "string" ?
|
|
1102
|
-
o !== m && (t.supplier = o ===
|
|
1101
|
+
const m = typeof ((E = t == null ? void 0 : t.supplier) == null ? void 0 : E.internal) == "string" ? ne.TRANSFER : ne.PURCHASE;
|
|
1102
|
+
o !== m && (t.supplier = o === ne.PURCHASE ? Q.locationOptionsTypePurchase.value[0] : Q.locationOptionsTypeTransfer.value[0]);
|
|
1103
1103
|
}
|
|
1104
1104
|
});
|
|
1105
|
-
|
|
1105
|
+
ge(
|
|
1106
1106
|
() => {
|
|
1107
1107
|
var o;
|
|
1108
1108
|
return (o = p.modelValue) == null ? void 0 : o.template;
|
|
@@ -1145,19 +1145,19 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
1145
1145
|
setEffectiveAt(o) {
|
|
1146
1146
|
t.effectiveAt = o;
|
|
1147
1147
|
}
|
|
1148
|
-
}), { comparePricesToggle: Z, comparePriceFetching: he, comparePriceBySku: ke } = eo(),
|
|
1148
|
+
}), { comparePricesToggle: Z, comparePriceFetching: he, comparePriceBySku: ke } = eo(), ie = q();
|
|
1149
1149
|
w({
|
|
1150
1150
|
validateInputs: () => {
|
|
1151
1151
|
var o, m;
|
|
1152
|
-
(m = (o =
|
|
1152
|
+
(m = (o = ie.value) == null ? void 0 : o.validateInputs) == null || m.call(o);
|
|
1153
1153
|
},
|
|
1154
1154
|
resetInputsValidation: () => {
|
|
1155
1155
|
var o, m;
|
|
1156
|
-
(m = (o =
|
|
1156
|
+
(m = (o = ie.value) == null ? void 0 : o.resetInputsValidation) == null || m.call(o);
|
|
1157
1157
|
},
|
|
1158
1158
|
resetInputs: () => {
|
|
1159
1159
|
var o, m;
|
|
1160
|
-
(m = (o =
|
|
1160
|
+
(m = (o = ie.value) == null ? void 0 : o.resetInputs) == null || m.call(o);
|
|
1161
1161
|
}
|
|
1162
1162
|
});
|
|
1163
1163
|
const we = N(() => ({
|
|
@@ -1193,51 +1193,43 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
1193
1193
|
}
|
|
1194
1194
|
}), Be = N(() => Ne.columnDefs.value);
|
|
1195
1195
|
function ze() {
|
|
1196
|
-
var
|
|
1197
|
-
const o = (
|
|
1198
|
-
var
|
|
1199
|
-
const
|
|
1196
|
+
var G, re, Fe, He, Re;
|
|
1197
|
+
const o = (Fe = (re = (G = c.value) == null ? void 0 : G.purchaseOrder) == null ? void 0 : re.items) == null ? void 0 : Fe.groupBy((z) => z.sku._id), m = v.isEnabled ? v.getAvailableItems((Re = (He = t.netSuite) == null ? void 0 : He.subsidiary) == null ? void 0 : Re.id) : [], E = o != null && o.size ? I.skus.filter((z) => o.has(z._id)) : I.skus, H = v.isEnabled ? E.filter((z) => {
|
|
1198
|
+
var ae, se, ue, pe;
|
|
1199
|
+
const te = (se = (ae = c.value) == null ? void 0 : ae.purchaseOrder) == null ? void 0 : se.items.find(
|
|
1200
1200
|
(ve) => ve.sku._id === z._id
|
|
1201
1201
|
);
|
|
1202
|
-
if (
|
|
1202
|
+
if (te != null && te.measurement != null) {
|
|
1203
1203
|
const ve = v.getAvailableMeasurements(
|
|
1204
|
-
|
|
1204
|
+
te.sku._id,
|
|
1205
1205
|
(pe = (ue = t.netSuite) == null ? void 0 : ue.subsidiary) == null ? void 0 : pe.id
|
|
1206
1206
|
);
|
|
1207
|
-
return m.includes(
|
|
1207
|
+
return m.includes(te.sku._id) && ve.includes(te.measurement.id);
|
|
1208
1208
|
}
|
|
1209
1209
|
return m.includes(z._id);
|
|
1210
|
-
}).map((z) => z._id) : E.map((z) => z._id),
|
|
1210
|
+
}).map((z) => z._id) : E.map((z) => z._id), le = E.map(
|
|
1211
1211
|
(z) => {
|
|
1212
|
-
var
|
|
1212
|
+
var te, ae, se, ue;
|
|
1213
1213
|
return {
|
|
1214
|
-
label: ((
|
|
1214
|
+
label: ((ae = (te = o == null ? void 0 : o.get(z._id)) == null ? void 0 : te[0]) == null ? void 0 : ae.name) ?? z.name,
|
|
1215
1215
|
sublabel: ((ue = (se = o == null ? void 0 : o.get(z._id)) == null ? void 0 : se[0]) == null ? void 0 : ue.code) ?? z.code,
|
|
1216
1216
|
value: z,
|
|
1217
1217
|
disabled: !!(!H.includes(z._id) || z.isInactive),
|
|
1218
|
-
tags: z.isInactive ? ["Inactive"] : [
|
|
1218
|
+
tags: z.isInactive ? ["Inactive"] : []
|
|
1219
1219
|
};
|
|
1220
1220
|
}
|
|
1221
|
-
), me =
|
|
1222
|
-
var
|
|
1223
|
-
return (
|
|
1224
|
-
}).map((z) => z.value)
|
|
1225
|
-
{
|
|
1226
|
-
type: "string",
|
|
1227
|
-
key: "tags",
|
|
1228
|
-
entity: "item",
|
|
1229
|
-
values: ["Inactive", "Active"]
|
|
1230
|
-
}
|
|
1231
|
-
];
|
|
1221
|
+
), me = le.filter((z) => {
|
|
1222
|
+
var te;
|
|
1223
|
+
return (te = t.items) == null ? void 0 : te.find((ae) => ae.sku._id === z.value._id);
|
|
1224
|
+
}).map((z) => z.value);
|
|
1232
1225
|
Y.open({
|
|
1233
1226
|
title: f("inventory.transfer.form.items.selectItem"),
|
|
1234
1227
|
closeButton: !0,
|
|
1235
1228
|
contentComponent: jt,
|
|
1236
1229
|
contentComponentProps: {
|
|
1237
1230
|
modelValue: me,
|
|
1238
|
-
items:
|
|
1239
|
-
virtualScroll: !0
|
|
1240
|
-
filterAttributes: G
|
|
1231
|
+
items: le,
|
|
1232
|
+
virtualScroll: !0
|
|
1241
1233
|
},
|
|
1242
1234
|
primaryActions: {
|
|
1243
1235
|
text: f("common.confirm"),
|
|
@@ -1249,13 +1241,13 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
1249
1241
|
variant: "tertiary"
|
|
1250
1242
|
}
|
|
1251
1243
|
}).onPrimary((z) => {
|
|
1252
|
-
const
|
|
1253
|
-
var ve,
|
|
1254
|
-
const ue =
|
|
1244
|
+
const te = t.items ?? [], ae = z.map((se) => {
|
|
1245
|
+
var ve, Ae;
|
|
1246
|
+
const ue = te.find((ye) => ye.sku._id === se._id);
|
|
1255
1247
|
if (ue)
|
|
1256
1248
|
return ue;
|
|
1257
|
-
const pe = ((
|
|
1258
|
-
(
|
|
1249
|
+
const pe = ((Ae = (ve = c.value) == null ? void 0 : ve.purchaseOrder.items) == null ? void 0 : Ae.find(
|
|
1250
|
+
(ye) => ye.sku._id === se._id
|
|
1259
1251
|
)) ?? {
|
|
1260
1252
|
sku: se,
|
|
1261
1253
|
code: se.code,
|
|
@@ -1265,8 +1257,8 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
1265
1257
|
precision: 0
|
|
1266
1258
|
}
|
|
1267
1259
|
};
|
|
1268
|
-
if (K.value ==
|
|
1269
|
-
const { cost:
|
|
1260
|
+
if (K.value == ne.PURCHASE) {
|
|
1261
|
+
const { cost: ye } = Ie(
|
|
1270
1262
|
pe.sku,
|
|
1271
1263
|
pe.quantity,
|
|
1272
1264
|
pe.measurement,
|
|
@@ -1274,14 +1266,14 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
1274
1266
|
supplier: t.supplier
|
|
1275
1267
|
}
|
|
1276
1268
|
);
|
|
1277
|
-
pe.totalCost =
|
|
1269
|
+
pe.totalCost = ye;
|
|
1278
1270
|
}
|
|
1279
1271
|
return pe;
|
|
1280
1272
|
});
|
|
1281
|
-
|
|
1273
|
+
ae.sort((se, ue) => se.sku.code.localeCompare(ue.sku.code)), t.items = ae;
|
|
1282
1274
|
});
|
|
1283
1275
|
}
|
|
1284
|
-
function
|
|
1276
|
+
function De(o) {
|
|
1285
1277
|
return o;
|
|
1286
1278
|
}
|
|
1287
1279
|
const Le = N(() => {
|
|
@@ -1300,28 +1292,28 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
1300
1292
|
},
|
|
1301
1293
|
measurement: m.trackingMeasurement ? m.unit.measurements.find((E) => E.id === m.trackingMeasurement) : null
|
|
1302
1294
|
}));
|
|
1303
|
-
}),
|
|
1295
|
+
}), Pe = N(() => {
|
|
1304
1296
|
const o = [];
|
|
1305
1297
|
return (!u.mustUsePoTemplate || u.mustUsePoTemplate && t.template) && o.push({
|
|
1306
1298
|
label: f("inventory.transfer.form.type.purchase"),
|
|
1307
|
-
value:
|
|
1299
|
+
value: ne.PURCHASE
|
|
1308
1300
|
}), o.push({
|
|
1309
1301
|
label: f("inventory.transfer.form.type.transfer"),
|
|
1310
|
-
value:
|
|
1302
|
+
value: ne.TRANSFER
|
|
1311
1303
|
}), o;
|
|
1312
|
-
}),
|
|
1304
|
+
}), Ve = N(() => {
|
|
1313
1305
|
var o;
|
|
1314
1306
|
return (o = p.modelValue) == null ? void 0 : o.items.every((m) => m.quantity.amount <= 0);
|
|
1315
1307
|
});
|
|
1316
1308
|
return (o, m) => {
|
|
1317
|
-
var
|
|
1318
|
-
const E = $("FmChip"), H = $("FmLabel"),
|
|
1309
|
+
var ve, Ae;
|
|
1310
|
+
const E = $("FmChip"), H = $("FmLabel"), le = $("FmIcon"), me = $("FmField"), G = $("FmTooltip"), re = $("FmSelect"), Fe = $("FmTextField"), He = $("FmTextarea"), Re = $("FmSwitch"), z = $("FmDatePicker"), te = $("FmTimePicker"), ae = $("FmFormGroup"), se = $("FmButton"), ue = $("FmTable"), pe = $("FmForm");
|
|
1319
1311
|
return S(), T("div", co, [
|
|
1320
1312
|
n("div", mo, [
|
|
1321
|
-
(
|
|
1313
|
+
(ve = p.modelValue) != null && ve.template ? (S(), W(E, {
|
|
1322
1314
|
key: 0,
|
|
1323
1315
|
variant: o.disabled ? "warning" : void 0,
|
|
1324
|
-
label: `${s(f)("inventory.transfer.template.title")}: ${((
|
|
1316
|
+
label: `${s(f)("inventory.transfer.template.title")}: ${((Ae = c.value) == null ? void 0 : Ae.name) ?? s(f)("inventory.transfer.form.loading")}`,
|
|
1325
1317
|
icon: "summarize",
|
|
1326
1318
|
compact: ""
|
|
1327
1319
|
}, null, 8, ["variant", "label"])) : j("", !0),
|
|
@@ -1332,25 +1324,25 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
1332
1324
|
}, null, 8, ["label"]),
|
|
1333
1325
|
o.lastClosingDate ? (S(), W(E, {
|
|
1334
1326
|
key: 1,
|
|
1335
|
-
label: `${s(f)("inventory.transfer.form.lastClosing")}: ${s(
|
|
1327
|
+
label: `${s(f)("inventory.transfer.form.lastClosing")}: ${s(We)(o.lastClosingDate)} ${s(zt)(o.lastClosingDate)}`,
|
|
1336
1328
|
icon: "calendar_month",
|
|
1337
1329
|
compact: ""
|
|
1338
1330
|
}, null, 8, ["label"])) : j("", !0)
|
|
1339
1331
|
]),
|
|
1340
|
-
y(
|
|
1332
|
+
y(pe, {
|
|
1341
1333
|
ref_key: "formRef",
|
|
1342
|
-
ref:
|
|
1334
|
+
ref: ie,
|
|
1343
1335
|
class: "flex flex-col gap-32",
|
|
1344
1336
|
disabled: o.disabled,
|
|
1345
1337
|
onValidationFailed: console.log,
|
|
1346
|
-
onValidationSuccess: m[14] || (m[14] = (
|
|
1338
|
+
onValidationSuccess: m[14] || (m[14] = (ye) => x("validation-success"))
|
|
1347
1339
|
}, {
|
|
1348
1340
|
default: A(() => {
|
|
1349
|
-
var
|
|
1341
|
+
var ye, nt, lt, rt, it, ut, dt, ct;
|
|
1350
1342
|
return [
|
|
1351
1343
|
n("div", po, [
|
|
1352
1344
|
n("div", fo, [
|
|
1353
|
-
(
|
|
1345
|
+
(ye = p.modelValue) != null && ye.template ? (S(), T(de, { key: 0 }, [
|
|
1354
1346
|
n("div", vo, [
|
|
1355
1347
|
y(H, {
|
|
1356
1348
|
label: s(f)("inventory.transfer.form.type.title")
|
|
@@ -1362,13 +1354,13 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
1362
1354
|
disabled: o.disabled
|
|
1363
1355
|
}, {
|
|
1364
1356
|
content: A(() => m[15] || (m[15] = [
|
|
1365
|
-
|
|
1357
|
+
$e("This field is locked from template.")
|
|
1366
1358
|
])),
|
|
1367
1359
|
default: A(() => [
|
|
1368
1360
|
y(me, null, {
|
|
1369
1361
|
default: A(() => [
|
|
1370
1362
|
n("div", bo, [
|
|
1371
|
-
y(
|
|
1363
|
+
y(le, {
|
|
1372
1364
|
name: "lock_outline",
|
|
1373
1365
|
size: "sm",
|
|
1374
1366
|
color: o.disabled ? "neutral-gray-200" : "neutral-gray-400"
|
|
@@ -1393,7 +1385,7 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
1393
1385
|
]),
|
|
1394
1386
|
n("div", go, [
|
|
1395
1387
|
y(H, {
|
|
1396
|
-
label: K.value === s(
|
|
1388
|
+
label: K.value === s(ne).PURCHASE ? s(f)("inventory.transfer.form.purchaseFrom") : s(f)("inventory.transfer.form.transferFrom")
|
|
1397
1389
|
}, null, 8, ["label"]),
|
|
1398
1390
|
n("div", _o, [
|
|
1399
1391
|
y(G, {
|
|
@@ -1402,7 +1394,7 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
1402
1394
|
disabled: o.disabled
|
|
1403
1395
|
}, {
|
|
1404
1396
|
content: A(() => m[16] || (m[16] = [
|
|
1405
|
-
|
|
1397
|
+
$e("This field is locked from template.")
|
|
1406
1398
|
])),
|
|
1407
1399
|
default: A(() => [
|
|
1408
1400
|
y(me, null, {
|
|
@@ -1410,7 +1402,7 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
1410
1402
|
var P;
|
|
1411
1403
|
return [
|
|
1412
1404
|
n("div", ho, [
|
|
1413
|
-
y(
|
|
1405
|
+
y(le, {
|
|
1414
1406
|
name: "lock_outline",
|
|
1415
1407
|
size: "sm",
|
|
1416
1408
|
color: o.disabled ? "neutral-gray-200" : "neutral-gray-400"
|
|
@@ -1429,13 +1421,13 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
1429
1421
|
])
|
|
1430
1422
|
])
|
|
1431
1423
|
], 64)) : (S(), T(de, { key: 1 }, [
|
|
1432
|
-
y(
|
|
1424
|
+
y(re, {
|
|
1433
1425
|
label: s(f)("inventory.transfer.form.type.title"),
|
|
1434
1426
|
"label-mark": "required",
|
|
1435
1427
|
modelValue: K.value,
|
|
1436
1428
|
"onUpdate:modelValue": m[0] || (m[0] = (P) => K.value = P),
|
|
1437
|
-
items:
|
|
1438
|
-
rules: [s(qe)(1)(
|
|
1429
|
+
items: Pe.value,
|
|
1430
|
+
rules: [s(qe)(1)(Pe.value)]
|
|
1439
1431
|
}, {
|
|
1440
1432
|
default: A(() => [
|
|
1441
1433
|
n("span", {
|
|
@@ -1447,8 +1439,8 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
1447
1439
|
]),
|
|
1448
1440
|
_: 1
|
|
1449
1441
|
}, 8, ["label", "modelValue", "items", "rules"]),
|
|
1450
|
-
y(
|
|
1451
|
-
label: K.value === s(
|
|
1442
|
+
y(re, {
|
|
1443
|
+
label: K.value === s(ne).PURCHASE ? s(f)("inventory.transfer.form.purchaseFrom") : s(f)("inventory.transfer.form.transferFrom"),
|
|
1452
1444
|
"label-mark": "required",
|
|
1453
1445
|
modelValue: U.value,
|
|
1454
1446
|
"onUpdate:modelValue": m[1] || (m[1] = (P) => U.value = P),
|
|
@@ -1458,7 +1450,7 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
1458
1450
|
"menu-wrapper": A((P) => {
|
|
1459
1451
|
var oe, Ee;
|
|
1460
1452
|
return [
|
|
1461
|
-
y(ys,
|
|
1453
|
+
y(ys, Ze(P, {
|
|
1462
1454
|
items: O.value,
|
|
1463
1455
|
"model-value": (Ee = (oe = o.modelValue) == null ? void 0 : oe.supplier) == null ? void 0 : Ee._id
|
|
1464
1456
|
}), null, 16, ["items", "model-value"])
|
|
@@ -1515,7 +1507,7 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
1515
1507
|
}
|
|
1516
1508
|
])
|
|
1517
1509
|
}, [
|
|
1518
|
-
y(
|
|
1510
|
+
y(Re, {
|
|
1519
1511
|
modelValue: s(b),
|
|
1520
1512
|
"onUpdate:modelValue": m[5] || (m[5] = (P) => xe(b) ? b.value = P : null),
|
|
1521
1513
|
label: s(f)("inventory.transfer.form.backdate.title"),
|
|
@@ -1528,27 +1520,27 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
1528
1520
|
}, null, 2),
|
|
1529
1521
|
s(b) ? (S(), T("div", xo, [
|
|
1530
1522
|
n("div", Co, [
|
|
1531
|
-
y(
|
|
1523
|
+
y(z, {
|
|
1532
1524
|
modelValue: s(R),
|
|
1533
1525
|
"onUpdate:modelValue": m[6] || (m[6] = (P) => xe(R) ? R.value = P : null)
|
|
1534
1526
|
}, null, 8, ["modelValue"])
|
|
1535
1527
|
]),
|
|
1536
1528
|
n("div", So, [
|
|
1537
|
-
y(
|
|
1529
|
+
y(te, {
|
|
1538
1530
|
modelValue: s(X),
|
|
1539
1531
|
"onUpdate:modelValue": m[7] || (m[7] = (P) => xe(X) ? X.value = P : null)
|
|
1540
1532
|
}, null, 8, ["modelValue"])
|
|
1541
1533
|
])
|
|
1542
1534
|
])) : j("", !0)
|
|
1543
1535
|
], 2),
|
|
1544
|
-
s(d) ? (S(), W(
|
|
1536
|
+
s(d) ? (S(), W(ae, {
|
|
1545
1537
|
key: 0,
|
|
1546
1538
|
modelValue: s(d),
|
|
1547
1539
|
"onUpdate:modelValue": m[8] || (m[8] = (P) => xe(d) ? d.value = P : null),
|
|
1548
1540
|
rules: [s(Ht)(new Date(o.lastClosingDate), /* @__PURE__ */ new Date())]
|
|
1549
1541
|
}, null, 8, ["modelValue", "rules"])) : j("", !0),
|
|
1550
1542
|
B.value && !o.lastClosingDate ? (S(), T("div", wo, [
|
|
1551
|
-
y(
|
|
1543
|
+
y(le, {
|
|
1552
1544
|
name: "error",
|
|
1553
1545
|
size: "sm",
|
|
1554
1546
|
class: "text-fm-color-typo-warning"
|
|
@@ -1559,7 +1551,7 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
1559
1551
|
])
|
|
1560
1552
|
]),
|
|
1561
1553
|
n("div", Io, [
|
|
1562
|
-
y(
|
|
1554
|
+
y(ae, {
|
|
1563
1555
|
"model-value": s(t).items,
|
|
1564
1556
|
rules: [s(qe)(1)]
|
|
1565
1557
|
}, null, 8, ["model-value", "rules"]),
|
|
@@ -1574,7 +1566,7 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
1574
1566
|
}, [
|
|
1575
1567
|
n("div", $o, M(s(f)("inventory.transfer.form.items.title")), 1),
|
|
1576
1568
|
n("div", To, [
|
|
1577
|
-
y(
|
|
1569
|
+
y(se, {
|
|
1578
1570
|
disabled: o.disabled,
|
|
1579
1571
|
label: s(f)("inventory.transfer.form.items.addItem"),
|
|
1580
1572
|
"prepend-icon": "add",
|
|
@@ -1598,8 +1590,8 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
1598
1590
|
}, null, 8, ["template-id", "template-items", "po-items"])
|
|
1599
1591
|
])
|
|
1600
1592
|
], 2),
|
|
1601
|
-
K.value === s(
|
|
1602
|
-
y(
|
|
1593
|
+
K.value === s(ne).PURCHASE && D.value && s(u).enableTotalCost && ((nt = o.modelValue) != null && nt.items.length) ? (S(), T("div", Do, [
|
|
1594
|
+
y(Re, {
|
|
1603
1595
|
label: s(he) ? s(f)("inventory.transfer.form.items.fetchingData") : s(f)("inventory.transfer.form.items.comparePriceHistory"),
|
|
1604
1596
|
"prepend-icon": "compare_arrows",
|
|
1605
1597
|
"label-placement": "right",
|
|
@@ -1608,16 +1600,16 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
1608
1600
|
disabled: s(he) || o.disabled
|
|
1609
1601
|
}, null, 8, ["label", "model-value", "disabled"])
|
|
1610
1602
|
])) : j("", !0),
|
|
1611
|
-
y(
|
|
1612
|
-
"model-value":
|
|
1613
|
-
rules: [() =>
|
|
1603
|
+
y(ae, {
|
|
1604
|
+
"model-value": Ve.value,
|
|
1605
|
+
rules: [() => Ve.value ? "Must have at least one non-zero item" : !0]
|
|
1614
1606
|
}, null, 8, ["model-value", "rules"]),
|
|
1615
|
-
(S(), W(
|
|
1607
|
+
(S(), W(ue, {
|
|
1616
1608
|
"column-defs": Be.value,
|
|
1617
1609
|
"column-visibility": {
|
|
1618
|
-
[s(
|
|
1619
|
-
[s(
|
|
1620
|
-
[s(
|
|
1610
|
+
[s(ee).Code]: !(((lt = o.modelValue) == null ? void 0 : lt.template) ?? ((rt = o.modelValue) == null ? void 0 : rt.templateDoc)),
|
|
1611
|
+
[s(ee).Name]: !(((it = o.modelValue) == null ? void 0 : it.template) ?? ((ut = o.modelValue) == null ? void 0 : ut.templateDoc)),
|
|
1612
|
+
[s(ee).TemplateName]: !!(((dt = o.modelValue) == null ? void 0 : dt.template) ?? ((ct = o.modelValue) == null ? void 0 : ct.templateDoc))
|
|
1621
1613
|
},
|
|
1622
1614
|
"row-data": s(t).items,
|
|
1623
1615
|
key: C.value,
|
|
@@ -1629,12 +1621,12 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
1629
1621
|
return [
|
|
1630
1622
|
y(ao, {
|
|
1631
1623
|
"compare-price-by-sku": s(ke),
|
|
1632
|
-
"show-compare-price": K.value === s(
|
|
1624
|
+
"show-compare-price": K.value === s(ne).PURCHASE && s(Z),
|
|
1633
1625
|
row: P,
|
|
1634
1626
|
"template-item": (pt = (mt = (Ee = (oe = o.modelValue) == null ? void 0 : oe.templateDoc) == null ? void 0 : Ee.purchaseOrder) == null ? void 0 : mt.items) == null ? void 0 : pt.find(
|
|
1635
|
-
(
|
|
1627
|
+
(Ke) => Ke.sku._id === P.original.sku._id
|
|
1636
1628
|
),
|
|
1637
|
-
"onUpdate:item": m[13] || (m[13] = (
|
|
1629
|
+
"onUpdate:item": m[13] || (m[13] = (Ke) => we.value.updateItem(Ke)),
|
|
1638
1630
|
disabled: o.disabled
|
|
1639
1631
|
}, null, 8, ["compare-price-by-sku", "show-compare-price", "row", "template-item", "disabled"])
|
|
1640
1632
|
];
|
|
@@ -1647,7 +1639,7 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
1647
1639
|
default: A((oe) => [
|
|
1648
1640
|
y(Os, {
|
|
1649
1641
|
"compare-price-by-sku": s(ke),
|
|
1650
|
-
"show-compare-price": K.value === s(
|
|
1642
|
+
"show-compare-price": K.value === s(ne).PURCHASE && s(Z),
|
|
1651
1643
|
row: P,
|
|
1652
1644
|
"cell-by-col-id": oe
|
|
1653
1645
|
}, null, 8, ["compare-price-by-sku", "show-compare-price", "row", "cell-by-col-id"])
|
|
@@ -1677,7 +1669,7 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
1677
1669
|
emits: ["update:show", "submitted"],
|
|
1678
1670
|
setup(g, { expose: w, emit: r }) {
|
|
1679
1671
|
var V;
|
|
1680
|
-
const p = g, x = r, t =
|
|
1672
|
+
const p = g, x = r, t = st(), f = wt(), F = Te(), I = at(), v = tt(), e = et(), { t: u } = _e(), k = q(!1), a = q(!1), i = q(!1);
|
|
1681
1673
|
async function h(d) {
|
|
1682
1674
|
if (d) {
|
|
1683
1675
|
a.value = !1;
|
|
@@ -1728,7 +1720,7 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
1728
1720
|
};
|
|
1729
1721
|
}
|
|
1730
1722
|
const C = St(p, "show"), l = q(p.modelValue ?? _()), c = q(((V = p.modelValue) == null ? void 0 : V._id) ?? `${Math.random()}`);
|
|
1731
|
-
|
|
1723
|
+
ge(
|
|
1732
1724
|
() => p.show,
|
|
1733
1725
|
(d) => {
|
|
1734
1726
|
var b;
|
|
@@ -1913,7 +1905,7 @@ function Mo(g) {
|
|
|
1913
1905
|
try {
|
|
1914
1906
|
return w.reduce(
|
|
1915
1907
|
(p, x) => {
|
|
1916
|
-
const t = new Array(), f = g.Sheets[x], F =
|
|
1908
|
+
const t = new Array(), f = g.Sheets[x], F = tt(), I = Oo(f), v = [];
|
|
1917
1909
|
for (const { index: u, data: k } of I) {
|
|
1918
1910
|
k.scanned_code === "" && t.push(`Row ${u + 1}: Scanned code is empty`), k.item_name === "" && t.push(`Row ${u + 1}: Item name is empty`), k.uom === "" && t.push(`Row ${u + 1}: UOM is empty`), k["transfer_quantity(uom)"] === "" && t.push(`Row ${u + 1}: Transfer quantity is empty`);
|
|
1919
1911
|
const a = F.skus.find((_) => _.code === k.scanned_code);
|
|
@@ -1935,7 +1927,7 @@ function Mo(g) {
|
|
|
1935
1927
|
sku: a,
|
|
1936
1928
|
code: k.scanned_code,
|
|
1937
1929
|
name: k.item_name,
|
|
1938
|
-
quantity:
|
|
1930
|
+
quantity: Ge.fromNumber(Number(k["transfer_quantity(uom)"])),
|
|
1939
1931
|
measurement: h
|
|
1940
1932
|
});
|
|
1941
1933
|
}
|
|
@@ -1974,7 +1966,7 @@ const qo = { class: "flex flex-col flex-1" }, Uo = { class: "flex flex-col" }, N
|
|
|
1974
1966
|
errors: {}
|
|
1975
1967
|
},
|
|
1976
1968
|
setup(g) {
|
|
1977
|
-
const w = g, { t: r } =
|
|
1969
|
+
const w = g, { t: r } = _e(), p = q(!1), x = () => {
|
|
1978
1970
|
w.errors.length && (p.value = !p.value);
|
|
1979
1971
|
};
|
|
1980
1972
|
return (t, f) => {
|
|
@@ -1994,7 +1986,7 @@ const qo = { class: "flex flex-col flex-1" }, Uo = { class: "flex flex-col" }, N
|
|
|
1994
1986
|
"text-fm-color-system-error-300": t.errors.length
|
|
1995
1987
|
})
|
|
1996
1988
|
}, [
|
|
1997
|
-
|
|
1989
|
+
$e(M(t.name) + " ", 1),
|
|
1998
1990
|
t.type === "create" ? (S(), T("span", Bo, "(" + M(s(r)("inventory.closing.template.import.new")) + ")", 1)) : j("", !0)
|
|
1999
1991
|
], 2),
|
|
2000
1992
|
t.errors.length ? (S(), T("div", zo, [
|
|
@@ -2034,10 +2026,10 @@ const qo = { class: "flex flex-col flex-1" }, Uo = { class: "flex flex-col" }, N
|
|
|
2034
2026
|
}, 1032, ["content"])
|
|
2035
2027
|
]),
|
|
2036
2028
|
n("div", null, [
|
|
2037
|
-
n("span", Qo, M(s(
|
|
2029
|
+
n("span", Qo, M(s(Ge).toFormatString({
|
|
2038
2030
|
value: e.quantity
|
|
2039
2031
|
})), 1),
|
|
2040
|
-
|
|
2032
|
+
$e(" " + M(e.measurement ? e.measurement.abbrev : e.sku.unit.abbrev), 1)
|
|
2041
2033
|
])
|
|
2042
2034
|
]))), 128)) : j("", !0)
|
|
2043
2035
|
])
|
|
@@ -2081,7 +2073,7 @@ const qo = { class: "flex flex-col flex-1" }, Uo = { class: "flex flex-col" }, N
|
|
|
2081
2073
|
}, la = { class: "fm-typo-en-body-lg-600" }, yt = "Transfer note", ra = /* @__PURE__ */ ce({
|
|
2082
2074
|
__name: "XilnexImportForm",
|
|
2083
2075
|
setup(g, { expose: w }) {
|
|
2084
|
-
const r = q(null), p =
|
|
2076
|
+
const r = q(null), p = Te(), x = q(!1), t = q(!1), f = kt(), F = q(!1), I = Ue();
|
|
2085
2077
|
q([]);
|
|
2086
2078
|
const v = N({
|
|
2087
2079
|
get() {
|
|
@@ -2105,7 +2097,7 @@ const qo = { class: "flex flex-col flex-1" }, Uo = { class: "flex flex-col" }, N
|
|
|
2105
2097
|
});
|
|
2106
2098
|
}
|
|
2107
2099
|
});
|
|
2108
|
-
|
|
2100
|
+
Qe(async () => {
|
|
2109
2101
|
const l = await I.getNetSuiteLocations();
|
|
2110
2102
|
console.log(l), F.value = !0;
|
|
2111
2103
|
});
|
|
@@ -2146,7 +2138,7 @@ const qo = { class: "flex flex-col flex-1" }, Uo = { class: "flex flex-col" }, N
|
|
|
2146
2138
|
(c = (l = h.value) == null ? void 0 : l.resetInputs) == null || c.call(l);
|
|
2147
2139
|
}
|
|
2148
2140
|
});
|
|
2149
|
-
const { t: _ } =
|
|
2141
|
+
const { t: _ } = _e();
|
|
2150
2142
|
async function C(l) {
|
|
2151
2143
|
k.value = [], a.value = [];
|
|
2152
2144
|
try {
|
|
@@ -2180,7 +2172,7 @@ const qo = { class: "flex flex-col flex-1" }, Uo = { class: "flex flex-col" }, N
|
|
|
2180
2172
|
}), x.value = !1;
|
|
2181
2173
|
}
|
|
2182
2174
|
}
|
|
2183
|
-
return
|
|
2175
|
+
return ge(r, (l) => {
|
|
2184
2176
|
l && C(l);
|
|
2185
2177
|
}), (l, c) => {
|
|
2186
2178
|
const D = $("FmSelect"), B = $("FmDatePicker"), Y = $("FmTimePicker"), Q = $("FmCircularProgress"), K = $("FmLabel"), O = $("FmIcon"), U = $("FmButton"), V = $("FmForm");
|
|
@@ -2244,7 +2236,7 @@ const qo = { class: "flex flex-col flex-1" }, Uo = { class: "flex flex-col" }, N
|
|
|
2244
2236
|
fn: A(({ openFileDialog: d }) => [
|
|
2245
2237
|
y(K, null, {
|
|
2246
2238
|
default: A(() => [
|
|
2247
|
-
|
|
2239
|
+
$e(M(yt))
|
|
2248
2240
|
]),
|
|
2249
2241
|
_: 1
|
|
2250
2242
|
}),
|
|
@@ -2331,7 +2323,7 @@ const qo = { class: "flex flex-col flex-1" }, Uo = { class: "flex flex-col" }, N
|
|
|
2331
2323
|
},
|
|
2332
2324
|
emits: ["update:show", "submitted"],
|
|
2333
2325
|
setup(g, { expose: w, emit: r }) {
|
|
2334
|
-
const p = r, t = St(g, "show"), f =
|
|
2326
|
+
const p = r, t = St(g, "show"), f = Te(), F = st(), I = q(!1), v = q(), e = q();
|
|
2335
2327
|
w({
|
|
2336
2328
|
validateInputs: () => {
|
|
2337
2329
|
var a, i;
|
|
@@ -2450,15 +2442,15 @@ const qo = { class: "flex flex-col flex-1" }, Uo = { class: "flex flex-col" }, N
|
|
|
2450
2442
|
}, va = { class: "pt-8" }, bt = "ReceiveRequestViewSearchCriteria", Ta = /* @__PURE__ */ ce({
|
|
2451
2443
|
__name: "ReceiveRequestView",
|
|
2452
2444
|
setup(g) {
|
|
2453
|
-
const { t: w } =
|
|
2454
|
-
|
|
2455
|
-
name:
|
|
2456
|
-
startDate:
|
|
2457
|
-
endDate:
|
|
2445
|
+
const { t: w } = _e(), r = Te();
|
|
2446
|
+
je.object({
|
|
2447
|
+
name: je.string().optional().nullable(),
|
|
2448
|
+
startDate: je.string().optional().nullable(),
|
|
2449
|
+
endDate: je.string().optional().nullable()
|
|
2458
2450
|
});
|
|
2459
2451
|
const p = N(
|
|
2460
2452
|
() => !k._currentLocation || e.loading.value
|
|
2461
|
-
), x = is(), t =
|
|
2453
|
+
), x = is(), t = Je(), f = Ue();
|
|
2462
2454
|
function F() {
|
|
2463
2455
|
const O = {
|
|
2464
2456
|
name: "",
|
|
@@ -2476,20 +2468,20 @@ const qo = { class: "flex flex-col flex-1" }, Uo = { class: "flex flex-col" }, N
|
|
|
2476
2468
|
x.setItem(bt, JSON.stringify(v.value));
|
|
2477
2469
|
}
|
|
2478
2470
|
const v = q(F()), e = ts(
|
|
2479
|
-
|
|
2471
|
+
Xe.RECEIVE_REQUEST,
|
|
2480
2472
|
v.value
|
|
2481
2473
|
), { columnDefs: u } = ss(
|
|
2482
|
-
|
|
2474
|
+
Xe.RECEIVE_REQUEST,
|
|
2483
2475
|
e,
|
|
2484
2476
|
e.shipments
|
|
2485
|
-
), k =
|
|
2477
|
+
), k = et();
|
|
2486
2478
|
async function a() {
|
|
2487
2479
|
const O = `inventory-record_${vt(v.value.startDate).format("DD-MM-YYYY_HH-mm")}-${vt(v.value.endDate).format("DD-MM-YYYY_HH-mm")}.xlsx`, U = e.purchaseOrders.value.flatMap(
|
|
2488
2480
|
(d) => d.items.map((b) => {
|
|
2489
|
-
var
|
|
2481
|
+
var ie;
|
|
2490
2482
|
const R = new Date(ls(d._id) ?? ""), X = d.effectiveAt ? new Date(d.effectiveAt) : void 0, Z = Ce(
|
|
2491
2483
|
as(b.sku, d.deliveryOrder || [])
|
|
2492
|
-
), he = Ce(b.quantity), ke = ((
|
|
2484
|
+
), he = Ce(b.quantity), ke = ((ie = b == null ? void 0 : b.measurement) == null ? void 0 : ie.abbrev) || b.sku.unit.abbrev;
|
|
2493
2485
|
return {
|
|
2494
2486
|
"SKU code": b.code,
|
|
2495
2487
|
"SKU name": b.name,
|
|
@@ -2501,7 +2493,7 @@ const qo = { class: "flex flex-col flex-1" }, Uo = { class: "flex flex-col" }, N
|
|
|
2501
2493
|
"Received quantity": Z,
|
|
2502
2494
|
"Ordered quantity": he,
|
|
2503
2495
|
Unit: ke,
|
|
2504
|
-
"Total cost": b.totalCost ?
|
|
2496
|
+
"Total cost": b.totalCost ? Ye(b.totalCost) : null
|
|
2505
2497
|
};
|
|
2506
2498
|
})
|
|
2507
2499
|
), V = [
|
|
@@ -2531,12 +2523,12 @@ const qo = { class: "flex flex-col flex-1" }, Uo = { class: "flex flex-col" }, N
|
|
|
2531
2523
|
});
|
|
2532
2524
|
}
|
|
2533
2525
|
const i = q(ft()), h = q("");
|
|
2534
|
-
|
|
2526
|
+
ge([() => i.value], ([O]) => {
|
|
2535
2527
|
!O.startDate || !O.endDate || (v.value.startDate = O.startDate, v.value.endDate = O.endDate, e.updateDateRange(
|
|
2536
2528
|
v.value.startDate,
|
|
2537
2529
|
v.value.endDate
|
|
2538
2530
|
), I());
|
|
2539
|
-
}),
|
|
2531
|
+
}), ge([() => h.value], () => {
|
|
2540
2532
|
I();
|
|
2541
2533
|
});
|
|
2542
2534
|
function _(O) {
|
|
@@ -2558,7 +2550,7 @@ const qo = { class: "flex flex-col flex-1" }, Uo = { class: "flex flex-col" }, N
|
|
|
2558
2550
|
if (O === "export")
|
|
2559
2551
|
return a();
|
|
2560
2552
|
}
|
|
2561
|
-
const { breakpoints: C } =
|
|
2553
|
+
const { breakpoints: C } = ot(), l = N(() => C.value.xs || C.value.sm), c = N(() => l.value ? 10 : 20), D = Zt(), B = N(() => [
|
|
2562
2554
|
{
|
|
2563
2555
|
label: w("inventory.transfer.receiveRequest.actions.create"),
|
|
2564
2556
|
value: "create",
|
|
@@ -2684,32 +2676,32 @@ const qo = { class: "flex flex-col flex-1" }, Uo = { class: "flex flex-col" }, N
|
|
|
2684
2676
|
onRowClick: s(e).promptShowTransferDetails
|
|
2685
2677
|
}, {
|
|
2686
2678
|
default: A((X) => {
|
|
2687
|
-
var Z, he, ke,
|
|
2679
|
+
var Z, he, ke, ie, we, Ne, Be, ze, De, Le, Pe, Ve, o, m, E, H, le, me, G, re;
|
|
2688
2680
|
return [
|
|
2689
2681
|
n("div", da, [
|
|
2690
2682
|
n("div", ca, [
|
|
2691
2683
|
y(s(fe), {
|
|
2692
2684
|
render: (ke = (he = (Z = X._id) == null ? void 0 : Z.column) == null ? void 0 : he.columnDef) == null ? void 0 : ke.cell,
|
|
2693
|
-
props: (we = (
|
|
2685
|
+
props: (we = (ie = X._id) == null ? void 0 : ie.getContext) == null ? void 0 : we.call(ie)
|
|
2694
2686
|
}, null, 8, ["render", "props"])
|
|
2695
2687
|
]),
|
|
2696
2688
|
n("div", ma, [
|
|
2697
2689
|
y(s(fe), {
|
|
2698
2690
|
render: (ze = (Be = (Ne = X.supplier_name) == null ? void 0 : Ne.column) == null ? void 0 : Be.columnDef) == null ? void 0 : ze.cell,
|
|
2699
|
-
props: (Le = (
|
|
2691
|
+
props: (Le = (De = X.supplier_name) == null ? void 0 : De.getContext) == null ? void 0 : Le.call(De)
|
|
2700
2692
|
}, null, 8, ["render", "props"])
|
|
2701
2693
|
]),
|
|
2702
2694
|
n("div", pa, M(R.original.items.map((Fe) => `${Fe.name}`).join(", ")), 1),
|
|
2703
2695
|
R.original.ref ? (S(), T("div", fa, [
|
|
2704
2696
|
y(s(fe), {
|
|
2705
|
-
render: (o = (
|
|
2697
|
+
render: (o = (Ve = (Pe = X.ref) == null ? void 0 : Pe.column) == null ? void 0 : Ve.columnDef) == null ? void 0 : o.cell,
|
|
2706
2698
|
props: (E = (m = X.ref) == null ? void 0 : m.getContext) == null ? void 0 : E.call(m)
|
|
2707
2699
|
}, null, 8, ["render", "props"])
|
|
2708
2700
|
])) : j("", !0),
|
|
2709
2701
|
n("div", va, [
|
|
2710
2702
|
y(s(fe), {
|
|
2711
|
-
render: (me = (
|
|
2712
|
-
props: (
|
|
2703
|
+
render: (me = (le = (H = X.status) == null ? void 0 : H.column) == null ? void 0 : le.columnDef) == null ? void 0 : me.cell,
|
|
2704
|
+
props: (re = (G = X.status) == null ? void 0 : G.getContext) == null ? void 0 : re.call(G)
|
|
2713
2705
|
}, null, 8, ["render", "props"])
|
|
2714
2706
|
])
|
|
2715
2707
|
])
|
|
@@ -2722,11 +2714,11 @@ const qo = { class: "flex flex-col flex-1" }, Uo = { class: "flex flex-col" }, N
|
|
|
2722
2714
|
}, 8, ["style", "column-defs", "row-data", "search-value", "loading", "page-size"]))
|
|
2723
2715
|
], 2),
|
|
2724
2716
|
(S(), W(Tt, { to: "body" }, [
|
|
2725
|
-
y(Eo,
|
|
2717
|
+
y(Eo, Ze(s(e).transferDialogProps.value, {
|
|
2726
2718
|
onSubmitted: s(e).fetchData
|
|
2727
2719
|
}), null, 16, ["onSubmitted"]),
|
|
2728
|
-
y(os,
|
|
2729
|
-
scope: s(
|
|
2720
|
+
y(os, Ze({
|
|
2721
|
+
scope: s(Xe).RECEIVE_REQUEST
|
|
2730
2722
|
}, {
|
|
2731
2723
|
...s(e).transferDetailsProps.value,
|
|
2732
2724
|
receivedMap: ((b = s(e).transferDetailsProps.value) == null ? void 0 : b.receivedMap) ?? {},
|