@feedmepos/mf-inventory-portal 1.2.8 → 1.2.10-dev.1
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-D1IJlQS8.js → App-Bg2M5RwP.js} +1 -1
- package/dist/{ApprovalView-GnDYWZHY.js → ApprovalView-C46UDXnc.js} +24 -24
- package/dist/{BindingsDialog-Bs00N9mp.js → BindingsDialog-CtJjpbw-.js} +2 -2
- package/dist/{BindingsPicker-LO15pMdZ.js → BindingsPicker-B6Er5Lea.js} +1 -1
- package/dist/{BindingsTable-g27KG9q4.js → BindingsTable-MPeTr_ip.js} +1 -1
- package/dist/{ClosingDraftView-Ddsgcrmg.js → ClosingDraftView-BaD3MLeG.js} +33 -33
- package/dist/{ClosingTemplateView-G8Ya81UZ.js → ClosingTemplateView-C4z3GXwd.js} +3 -3
- package/dist/{DeliveryOrderPrintPreview-qq1rhFKV.js → DeliveryOrderPrintPreview-BfafKFMa.js} +8 -8
- package/dist/{FmAdminBadge-B2NpMmJi.js → FmAdminBadge-Dg5rl1fj.js} +4 -4
- package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-C1i9CHE1.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-BATVvC9u.js} +11 -11
- package/dist/{FmMultiselectDialog-u2dbuZUp.js → FmMultiselectDialog-DJ-dIe8C.js} +1 -1
- package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-vpiiv6C1.js → FmUnitInput.vue_vue_type_script_setup_true_lang-BBWaPrlm.js} +38 -38
- package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-3T-d1pIb.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-oaujHoaU.js} +1 -1
- package/dist/{IngredientGroupView-CqB73-e4.js → IngredientGroupView-u4ubHtNF.js} +15 -15
- package/dist/{IngredientsView-Cq42ytcN.js → IngredientsView-CXbJifY6.js} +766 -744
- package/dist/{IntegrationView-OHnUGZst.js → IntegrationView-XEypfcAW.js} +137 -137
- package/dist/{InventoryBindingForm-DorgxR-Y.js → InventoryBindingForm-CETOb5Nj.js} +1 -1
- package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-CZy77tY7.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-DC52GJ2Y.js} +22 -22
- package/dist/{InventoryBindingSummary-B_YavyPb.js → InventoryBindingSummary-DbyJW8z0.js} +1 -1
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-XuEDo134.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-BQWWQxaq.js} +1 -1
- package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-Blq1oE5l.js → PremiumBadge.vue_vue_type_script_setup_true_lang-BruydtsG.js} +9 -9
- package/dist/{PublishView-Ds_ztGcV.js → PublishView-Cl3IluMR.js} +12 -12
- package/dist/{PurchaseOrderPrintPreview-DnyqN_xE.js → PurchaseOrderPrintPreview-BG_uBL4o.js} +7 -7
- package/dist/{ReceiveRequestView-ChpKsDaF.js → ReceiveRequestView-BvGlUVTp.js} +191 -191
- package/dist/{RecipeView-Dyp9Xcme.js → RecipeView-C-7XU5F8.js} +12 -12
- package/dist/{StockView-D-iP52Zw.js → StockView-rYhlg4fr.js} +680 -665
- package/dist/SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-D0kASPO9.js +158 -0
- package/dist/{SupplierView-BaEK3C8q.js → SupplierView-BoGoqUS-.js} +4 -4
- package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-B_ravTwn.js → TransferDetails.vue_vue_type_script_setup_true_lang-D53vhWDq.js} +6 -6
- package/dist/{TransferTemplateView-3zS7hNZz.js → TransferTemplateView-DZIDXFp7.js} +143 -143
- package/dist/{UnitView-BP5eztAG.js → UnitView-CvHIFkue.js} +27 -27
- package/dist/{WarehouseView-DMY7Lgwq.js → WarehouseView-Dh_WZz5L.js} +18 -18
- package/dist/{app-P6XaUzjP.js → app-BT34Yv61.js} +8968 -8917
- package/dist/app.d.ts +6 -6
- package/dist/app.js +4 -4
- package/dist/{closing-template-BGYZPBty.js → closing-template-JDCk0_lU.js} +1 -1
- package/dist/{decimal-wz5HXhQ8.js → decimal-BTgTm2JD.js} +1 -1
- package/dist/{format-unit-display-DOOJqLop.js → format-unit-display-HHCA1rN3.js} +48 -48
- package/dist/{index-oR0svfBM.js → index-Bz_lEYOD.js} +1 -1
- package/dist/{index-CHTB43Wl.js → index-CdamrmzX.js} +1 -1
- package/dist/{purchase-order-template-BGunGekw.js → purchase-order-template-DJiYiY6t.js} +1 -1
- package/dist/{stock-TJayQnag.js → stock-C8afHO4C.js} +1 -1
- package/dist/stores/integration/netsuite.d.ts +1 -0
- package/dist/{supplier-C_vqpE92.js → supplier-C8RMKqQX.js} +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{use-ingredient-select-dialog-CIahwuTX.js → use-ingredient-select-dialog-fLK9yq-0.js} +1 -1
- package/dist/{use-inventory-binding-dialog-BiKRXVhY.js → use-inventory-binding-dialog--7tzpXgV.js} +1 -1
- package/dist/views/ingredients/components/ingredient-dialog/IngredientDialogProps.d.ts +1 -1
- package/dist/views/transfer-template/components/transfer-template-form/components/NetSuiteCustomCodeSelection.vue.d.ts +2 -0
- package/package.json +2 -2
- package/dist/StockForecast.vue_vue_type_style_index_0_lang-KLXSWvo5.js +0 -59
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { reactive as gt, onMounted as
|
|
2
|
-
import { b as Ue,
|
|
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-
|
|
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 Ye, 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 I, createVNode as y, withCtx as A, createCommentVNode as j, ref as q, createBlock as W, normalizeClass as J, normalizeStyle as _t, createTextVNode as Ie, nextTick as $t, mergeProps as Ze, isRef as xe, createSlots as It, Teleport as Tt, normalizeProps as Dt, guardReactiveProps as Vt } from "vue";
|
|
2
|
+
import { b as Ue, Z as Ge, c as Je, o as Me, k as Ce, ae as Qe, $ as Pt, aD as Rt, A as qe, M as At, p as ht, al as We, Q as fe, au as Et, aE as Ot, aF as Mt, a9 as qt, aG as Ut, V as kt, u as et, a as tt, aH as Nt, aI as Bt, ad as zt, a5 as Lt, aJ as Ht, P as xt, s as jt, e as Oe, aK as Qt, E as Yt, G as Kt, H as Xt, aL as je, af as ft, K as Zt, N as Gt, J as Jt, L as Wt, O as es, a1 as vt } from "./app-BT34Yv61.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-D53vhWDq.js";
|
|
4
|
+
import { _ as Ct, u as ns, i as ls, e as rs } from "./PremiumBadge.vue_vue_type_script_setup_true_lang-BruydtsG.js";
|
|
5
5
|
import { u as is } from "./useTabStorage-BkIVScW_.js";
|
|
6
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-
|
|
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
|
|
7
|
+
import { P as ne, u as wt } from "./format-unit-display-HHCA1rN3.js";
|
|
8
|
+
import { _ as cs, F as ms, a as ps, b as fs } from "./FmUnitInput.vue_vue_type_script_setup_true_lang-BBWaPrlm.js";
|
|
9
|
+
import { c as $e, u as vs, _ as ys } from "./FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-BATVvC9u.js";
|
|
10
10
|
import { useI18n as _e } from "@feedmepos/mf-common";
|
|
11
|
-
import "./FmMultiselectDialog-
|
|
12
|
-
import { u as at } from "./supplier-
|
|
11
|
+
import "./FmMultiselectDialog-DJ-dIe8C.js";
|
|
12
|
+
import { u as at } from "./supplier-C8RMKqQX.js";
|
|
13
13
|
import { _ as bs } from "./PreviewBadge.vue_vue_type_script_setup_true_lang-CRZiQHjx.js";
|
|
14
14
|
import "./array-Ca8T3f_G.js";
|
|
15
15
|
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 || {});
|
|
@@ -23,11 +23,11 @@ const gs = () => (_e(), L(
|
|
|
23
23
|
));
|
|
24
24
|
function _s(g) {
|
|
25
25
|
const { t: w } = _e(), r = gt({}), { breakpoints: p } = ot(), x = Je(), t = Ue();
|
|
26
|
-
|
|
26
|
+
Ye(() => {
|
|
27
27
|
for (const v of g.items) {
|
|
28
28
|
if (!v.totalCost)
|
|
29
29
|
continue;
|
|
30
|
-
const { cost: e } =
|
|
30
|
+
const { cost: e } = $e(
|
|
31
31
|
v.sku,
|
|
32
32
|
v.quantity,
|
|
33
33
|
v.measurement,
|
|
@@ -41,7 +41,7 @@ function _s(g) {
|
|
|
41
41
|
for (const e of g.items) {
|
|
42
42
|
if (!e.totalCost || r[e.sku._id] || !f(e.sku))
|
|
43
43
|
continue;
|
|
44
|
-
const { cost: u } =
|
|
44
|
+
const { cost: u } = $e(
|
|
45
45
|
e.sku,
|
|
46
46
|
e.quantity,
|
|
47
47
|
e.measurement,
|
|
@@ -193,7 +193,7 @@ function _s(g) {
|
|
|
193
193
|
measurement: c.measurement
|
|
194
194
|
};
|
|
195
195
|
if (x.enableTotalCost) {
|
|
196
|
-
const { cost: B } =
|
|
196
|
+
const { cost: B } = $e(
|
|
197
197
|
D.sku,
|
|
198
198
|
D.quantity,
|
|
199
199
|
D.measurement,
|
|
@@ -234,7 +234,7 @@ function _s(g) {
|
|
|
234
234
|
cell(v) {
|
|
235
235
|
const e = v.row.original, u = f(e.sku), k = p.value.xs || p.value.sm;
|
|
236
236
|
if (!r[e.sku._id] && u) {
|
|
237
|
-
const { cost: a, supplierOverrideCost: i } =
|
|
237
|
+
const { cost: a, supplierOverrideCost: i } = $e(
|
|
238
238
|
e.sku,
|
|
239
239
|
e.quantity,
|
|
240
240
|
e.measurement,
|
|
@@ -271,7 +271,7 @@ function _s(g) {
|
|
|
271
271
|
[
|
|
272
272
|
L(
|
|
273
273
|
"span",
|
|
274
|
-
k ?
|
|
274
|
+
k ? Qe(a) : Ce(a)
|
|
275
275
|
),
|
|
276
276
|
L(
|
|
277
277
|
"span",
|
|
@@ -292,7 +292,7 @@ function _s(g) {
|
|
|
292
292
|
]
|
|
293
293
|
},
|
|
294
294
|
[
|
|
295
|
-
|
|
295
|
+
Qe(i.costPerUnit),
|
|
296
296
|
"/",
|
|
297
297
|
i.measurement ? L(
|
|
298
298
|
"span",
|
|
@@ -316,7 +316,7 @@ function _s(g) {
|
|
|
316
316
|
g.updateItem({
|
|
317
317
|
...e,
|
|
318
318
|
totalCost: {
|
|
319
|
-
...
|
|
319
|
+
...Pt(+a),
|
|
320
320
|
currency: Rt()
|
|
321
321
|
}
|
|
322
322
|
});
|
|
@@ -342,7 +342,7 @@ function _s(g) {
|
|
|
342
342
|
variant: "tertiary",
|
|
343
343
|
disabled: g.disabled,
|
|
344
344
|
onClick() {
|
|
345
|
-
const { cost: a } =
|
|
345
|
+
const { cost: a } = $e(
|
|
346
346
|
e.sku,
|
|
347
347
|
e.quantity,
|
|
348
348
|
e.measurement,
|
|
@@ -419,16 +419,16 @@ const hs = { class: "flex flex-col gap-8 px-16 xs:px-4 sm:px-4 py-4 items-center
|
|
|
419
419
|
n("div", ks, M((f = r(t)) == null ? void 0 : f.name), 1),
|
|
420
420
|
n("div", xs, [
|
|
421
421
|
(S(!0), T(de, null, Se(p.prices[t].slice(0, 3), (F) => {
|
|
422
|
-
var
|
|
422
|
+
var $;
|
|
423
423
|
return S(), T("div", {
|
|
424
424
|
key: F.date,
|
|
425
425
|
class: "flex flex-col w-[150px] xs:flex-1 text-ellipsis cursor-pointer"
|
|
426
426
|
}, [
|
|
427
427
|
n("div", Cs, [
|
|
428
|
-
n("span", null, M(F.totalCost ? s(
|
|
428
|
+
n("span", null, M(F.totalCost ? s(Qe)(F.totalCost) : "No data"), 1),
|
|
429
429
|
x[0] || (x[0] = n("span", { class: "text-fm-color-typo-secondary" }, "/", -1)),
|
|
430
430
|
n("span", null, M(s(Ce)(F.totalUnit, !1)), 1),
|
|
431
|
-
n("span", null, M(((
|
|
431
|
+
n("span", null, M((($ = F.measurement) == null ? void 0 : $.abbrev) ?? F.unit.abbrev), 1)
|
|
432
432
|
]),
|
|
433
433
|
n("div", Ss, [
|
|
434
434
|
n("span", null, "(#" + M(F.seqNumber) + ")", 1),
|
|
@@ -442,7 +442,7 @@ const hs = { class: "flex flex-col gap-8 px-16 xs:px-4 sm:px-4 py-4 items-center
|
|
|
442
442
|
}), 128))
|
|
443
443
|
]));
|
|
444
444
|
}
|
|
445
|
-
}), ws = { class: "flex flex-col gap-8 py-16" }, Fs = { class: "flex items-center" },
|
|
445
|
+
}), ws = { class: "flex flex-col gap-8 py-16" }, Fs = { class: "flex items-center" }, $s = { class: "flex-1 flex gap-1 items-center" }, Is = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, Ts = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, Ds = { class: "flex gap-8 w-full" }, Vs = { class: "flex-1 flex flex-col gap-4" }, Ps = { class: "flex-1 flex flex-col gap-4" }, Rs = { class: "flex gap-8 w-full" }, As = { class: "flex-1 flex flex-col gap-4" }, Es = {
|
|
446
446
|
key: 0,
|
|
447
447
|
class: "flex-1 flex flex-col gap-4"
|
|
448
448
|
}, Os = /* @__PURE__ */ ce({
|
|
@@ -456,23 +456,23 @@ const hs = { class: "flex flex-col gap-8 px-16 xs:px-4 sm:px-4 py-4 items-center
|
|
|
456
456
|
setup(g) {
|
|
457
457
|
const { t: w } = _e();
|
|
458
458
|
return (r, p) => {
|
|
459
|
-
var f, F,
|
|
460
|
-
const x =
|
|
459
|
+
var f, F, $, v, e, u, k, a, i, h, _, C, l, c, D, B, Q, Y, K, O, U, P, d, b, R, X, Z;
|
|
460
|
+
const x = I("FmLabel"), t = I("FmSpacer");
|
|
461
461
|
return S(), T("div", ws, [
|
|
462
462
|
n("div", Fs, [
|
|
463
|
-
n("div",
|
|
464
|
-
n("span",
|
|
463
|
+
n("div", $s, [
|
|
464
|
+
n("span", Is, " (" + M(r.row.original.sku.code) + ") ", 1),
|
|
465
465
|
n("span", Ts, M(r.row.original.sku.name), 1)
|
|
466
466
|
]),
|
|
467
467
|
n("div", null, [
|
|
468
468
|
y(s(fe), {
|
|
469
|
-
render: (
|
|
469
|
+
render: ($ = (F = (f = r.cellByColId.Delete) == null ? void 0 : f.column) == null ? void 0 : F.columnDef) == null ? void 0 : $.cell,
|
|
470
470
|
props: (e = (v = r.cellByColId.Delete) == null ? void 0 : v.getContext) == null ? void 0 : e.call(v)
|
|
471
471
|
}, null, 8, ["render", "props"])
|
|
472
472
|
])
|
|
473
473
|
]),
|
|
474
474
|
n("div", Ds, [
|
|
475
|
-
n("div",
|
|
475
|
+
n("div", Vs, [
|
|
476
476
|
y(x, {
|
|
477
477
|
label: s(w)(`inventory.transfer.form.items.table.${s(ee).Code}`)
|
|
478
478
|
}, null, 8, ["label"]),
|
|
@@ -482,7 +482,7 @@ const hs = { class: "flex flex-col gap-8 px-16 xs:px-4 sm:px-4 py-4 items-center
|
|
|
482
482
|
}, null, 8, ["render", "props"]),
|
|
483
483
|
p[0] || (p[0] = n("div", { class: "fm-typo-en-body-md-600 text-fm-color-primary" }, null, -1))
|
|
484
484
|
]),
|
|
485
|
-
n("div",
|
|
485
|
+
n("div", Ps, [
|
|
486
486
|
y(x, {
|
|
487
487
|
label: s(w)(`inventory.transfer.form.items.table.${s(ee).Name}`)
|
|
488
488
|
}, null, 8, ["label"]),
|
|
@@ -499,7 +499,7 @@ const hs = { class: "flex flex-col gap-8 px-16 xs:px-4 sm:px-4 py-4 items-center
|
|
|
499
499
|
label: s(w)(`inventory.transfer.form.items.table.${s(ee).Amount}`)
|
|
500
500
|
}, null, 8, ["label"]),
|
|
501
501
|
y(s(fe), {
|
|
502
|
-
render: (
|
|
502
|
+
render: (Y = (Q = (B = r.cellByColId[s(ee).Amount]) == null ? void 0 : B.column) == null ? void 0 : Q.columnDef) == null ? void 0 : Y.cell,
|
|
503
503
|
props: (O = (K = r.cellByColId[s(ee).Amount]) == null ? void 0 : K.getContext) == null ? void 0 : O.call(K)
|
|
504
504
|
}, null, 8, ["render", "props"]),
|
|
505
505
|
p[2] || (p[2] = n("div", { class: "fm-typo-en-body-md-600 text-fm-color-primary" }, null, -1))
|
|
@@ -514,7 +514,7 @@ const hs = { class: "flex flex-col gap-8 px-16 xs:px-4 sm:px-4 py-4 items-center
|
|
|
514
514
|
_: 1
|
|
515
515
|
}),
|
|
516
516
|
y(s(fe), {
|
|
517
|
-
render: (d = (
|
|
517
|
+
render: (d = (P = (U = r.cellByColId[s(ee).Cost]) == null ? void 0 : U.column) == null ? void 0 : P.columnDef) == null ? void 0 : d.cell,
|
|
518
518
|
props: (R = (b = r.cellByColId[s(ee).Cost]) == null ? void 0 : b.getContext) == null ? void 0 : R.call(b)
|
|
519
519
|
}, null, 8, ["render", "props"]),
|
|
520
520
|
p[3] || (p[3] = n("div", { class: "fm-typo-en-body-md-600 text-fm-color-primary" }, null, -1))
|
|
@@ -612,7 +612,7 @@ const qs = {
|
|
|
612
612
|
}, null, 8, zs)
|
|
613
613
|
]));
|
|
614
614
|
}
|
|
615
|
-
}), Hs = { class: "flex gap-8 items-center" }, js = { class: "fm-typo-en-body-lg-600 line-clamp-1" },
|
|
615
|
+
}), Hs = { class: "flex gap-8 items-center" }, js = { class: "fm-typo-en-body-lg-600 line-clamp-1" }, Qs = { class: "w-[343px] px-24 py-16 rounded-lg shadow-light-300 flex flex-col gap-[20px]" }, Ys = { class: "flex items-center w-full" }, Ks = { class: "flex-1" }, Xs = { class: "fm-typo-en-title-sm-800" }, Zs = { class: "flex items-start gap-8" }, Gs = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, Js = { class: "flex gap-1" }, Ws = /* @__PURE__ */ ce({
|
|
616
616
|
__name: "ForecastStock",
|
|
617
617
|
props: {
|
|
618
618
|
templateId: {},
|
|
@@ -622,7 +622,7 @@ const qs = {
|
|
|
622
622
|
},
|
|
623
623
|
emits: ["update:poItems", "update:forecastAmounts"],
|
|
624
624
|
setup(g, { emit: w }) {
|
|
625
|
-
const r = g, p = w, x = q(!1), t = q(7), f = ns(), F = Te(), { t:
|
|
625
|
+
const r = g, p = w, x = q(!1), t = q(7), f = ns(), F = Te(), { t: $ } = _e();
|
|
626
626
|
function v(a, i, h) {
|
|
627
627
|
return i != null && a < i && (a = i), h != null && a > h && (a = h), a;
|
|
628
628
|
}
|
|
@@ -666,14 +666,14 @@ const qs = {
|
|
|
666
666
|
const a = f.purchaseOrderForecast.skus;
|
|
667
667
|
if (a.length === 0) {
|
|
668
668
|
F.open({
|
|
669
|
-
message:
|
|
669
|
+
message: $("inventory.transfer.form.items.forecastStock.notAvailable"),
|
|
670
670
|
type: "info"
|
|
671
671
|
});
|
|
672
672
|
return;
|
|
673
673
|
}
|
|
674
674
|
const i = r.templateItems.reduce((_, C) => {
|
|
675
675
|
var B;
|
|
676
|
-
const l = (B = r.poItems) == null ? void 0 : B.find((
|
|
676
|
+
const l = (B = r.poItems) == null ? void 0 : B.find((Q) => Q.sku._id === C.sku._id), c = a.find((Q) => Q.id === C.sku._id);
|
|
677
677
|
if (!c)
|
|
678
678
|
return l && _.push(l), _;
|
|
679
679
|
if (!r.templateId && c.amount <= 0) return _;
|
|
@@ -690,20 +690,20 @@ const qs = {
|
|
|
690
690
|
})
|
|
691
691
|
), _;
|
|
692
692
|
}, []), h = a.map((_) => {
|
|
693
|
-
const C = r.templateItems.find((
|
|
693
|
+
const C = r.templateItems.find((Y) => Y.sku._id === _.id);
|
|
694
694
|
let l = _.amount, c = 0;
|
|
695
695
|
if (C != null && C.measurement) {
|
|
696
|
-
const
|
|
697
|
-
l = Math.ceil(_.amount /
|
|
696
|
+
const Y = e(C.measurement.conversion) ?? 1;
|
|
697
|
+
l = Math.ceil(_.amount / Y);
|
|
698
698
|
} else
|
|
699
699
|
l = Math.ceil(_.amount);
|
|
700
|
-
const D = e(C == null ? void 0 : C.minimumQuantity) ?? 0, B = e(C == null ? void 0 : C.maximumQuantity) ?? 1 / 0,
|
|
701
|
-
return { skuId: _.id, amount: l, precision: c, helperState:
|
|
700
|
+
const D = e(C == null ? void 0 : C.minimumQuantity) ?? 0, B = e(C == null ? void 0 : C.maximumQuantity) ?? 1 / 0, Q = l < D || l > B ? "error" : "success";
|
|
701
|
+
return { skuId: _.id, amount: l, precision: c, helperState: Q };
|
|
702
702
|
});
|
|
703
703
|
p("update:poItems", i), p("update:forecastAmounts", h);
|
|
704
704
|
}
|
|
705
705
|
return (a, i) => {
|
|
706
|
-
const h =
|
|
706
|
+
const h = I("FmButton"), _ = I("FmIcon"), C = I("FmStepperField"), l = I("FmPopover");
|
|
707
707
|
return S(), W(l, {
|
|
708
708
|
disabled: a.disabled,
|
|
709
709
|
class: "flex",
|
|
@@ -725,19 +725,19 @@ const qs = {
|
|
|
725
725
|
size: 24,
|
|
726
726
|
color: a.disabled ? "#c7c7cc" : "#ff7823"
|
|
727
727
|
}, null, 8, ["color"]),
|
|
728
|
-
n("div", js, M(s(
|
|
728
|
+
n("div", js, M(s($)("inventory.transfer.form.items.forecastStock.title")), 1)
|
|
729
729
|
])
|
|
730
730
|
]),
|
|
731
731
|
_: 1
|
|
732
732
|
}, 8, ["text-color", "border-color", "disabled"])
|
|
733
733
|
]),
|
|
734
734
|
default: A(() => [
|
|
735
|
-
n("div",
|
|
736
|
-
n("div",
|
|
735
|
+
n("div", Qs, [
|
|
736
|
+
n("div", Ys, [
|
|
737
737
|
n("div", Ks, [
|
|
738
738
|
y(bs, { "z-index": 99 }, {
|
|
739
739
|
default: A(() => [
|
|
740
|
-
n("p", Xs, M(s(
|
|
740
|
+
n("p", Xs, M(s($)("inventory.transfer.form.items.forecastStock.title")), 1)
|
|
741
741
|
]),
|
|
742
742
|
_: 1
|
|
743
743
|
})
|
|
@@ -752,7 +752,7 @@ const qs = {
|
|
|
752
752
|
y(C, {
|
|
753
753
|
modelValue: t.value,
|
|
754
754
|
"onUpdate:modelValue": i[1] || (i[1] = (c) => t.value = c),
|
|
755
|
-
label: s(
|
|
755
|
+
label: s($)("inventory.transfer.form.items.forecastStock.days"),
|
|
756
756
|
rules: [s(qe)(1)]
|
|
757
757
|
}, {
|
|
758
758
|
"helper-text": A(() => [
|
|
@@ -762,7 +762,7 @@ const qs = {
|
|
|
762
762
|
size: "sm",
|
|
763
763
|
class: "text-fm-color-system-warning-300"
|
|
764
764
|
}),
|
|
765
|
-
n("div", Gs, M(s(
|
|
765
|
+
n("div", Gs, M(s($)("inventory.transfer.form.items.forecastStock.replace")), 1)
|
|
766
766
|
])
|
|
767
767
|
]),
|
|
768
768
|
_: 1
|
|
@@ -770,12 +770,12 @@ const qs = {
|
|
|
770
770
|
n("div", Js, [
|
|
771
771
|
i[4] || (i[4] = n("div", { class: "grow" }, null, -1)),
|
|
772
772
|
y(h, {
|
|
773
|
-
label: s(
|
|
773
|
+
label: s($)("common.cancel"),
|
|
774
774
|
variant: "tertiary",
|
|
775
775
|
onClick: i[2] || (i[2] = (c) => x.value = !1)
|
|
776
776
|
}, null, 8, ["label"]),
|
|
777
777
|
y(h, {
|
|
778
|
-
label: s(
|
|
778
|
+
label: s($)("inventory.transfer.form.items.forecastStock.generate"),
|
|
779
779
|
onClick: k
|
|
780
780
|
}, null, 8, ["label"])
|
|
781
781
|
])
|
|
@@ -854,12 +854,12 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
854
854
|
}])
|
|
855
855
|
}, [
|
|
856
856
|
(S(!0), T(de, null, Se(r.row.getVisibleCells(), (f) => {
|
|
857
|
-
var F,
|
|
857
|
+
var F, $, v, e;
|
|
858
858
|
return S(), T("td", {
|
|
859
859
|
key: f.id,
|
|
860
860
|
class: J(["h-[56px] text-fm-color-typo-primary", ((F = w(f)) == null ? void 0 : F.cellClass) ?? "px-16"]),
|
|
861
861
|
style: _t({
|
|
862
|
-
width: (
|
|
862
|
+
width: ($ = w(f)) == null ? void 0 : $.width,
|
|
863
863
|
maxWidth: (v = w(f)) == null ? void 0 : v.maxWidth,
|
|
864
864
|
textAlign: ((e = w(f)) == null ? void 0 : e.textAlign) ?? "left"
|
|
865
865
|
})
|
|
@@ -904,7 +904,7 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
904
904
|
emits: ["netsuite:ready"],
|
|
905
905
|
setup(g, { emit: w }) {
|
|
906
906
|
const r = Ue(), p = g, x = w, { t } = Ut(), f = q(!1), F = q();
|
|
907
|
-
|
|
907
|
+
Ye(() => {
|
|
908
908
|
var u, k, a, i;
|
|
909
909
|
let e = {
|
|
910
910
|
id: "",
|
|
@@ -952,7 +952,7 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
952
952
|
!r.isEnabled || h && r.isEnabled && h == _ ? x("netsuite:ready", e) : f.value = !0;
|
|
953
953
|
}
|
|
954
954
|
});
|
|
955
|
-
const
|
|
955
|
+
const $ = N(
|
|
956
956
|
() => p.supplier.internal ? r.currentLocationSubsidiary() : r.currentVendorSubsidiary(p.supplier._id)
|
|
957
957
|
), v = N(() => {
|
|
958
958
|
var e, u;
|
|
@@ -960,7 +960,7 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
960
960
|
location is ${(u = r.getLocationSubsidiary((e = F.value) == null ? void 0 : e.netSuiteId)) == null ? void 0 : u.fullName}`;
|
|
961
961
|
});
|
|
962
962
|
return (e, u) => {
|
|
963
|
-
const k =
|
|
963
|
+
const k = I("FmLabel"), a = I("FmIcon"), i = I("FmField"), h = I("FmTooltip");
|
|
964
964
|
return s(r).isEnabled && p.required ? (S(), T("div", no, [
|
|
965
965
|
y(k, {
|
|
966
966
|
label: `NetSuite ${s(t)("inventory.transfer.form.netsuite.subsidiary")}`
|
|
@@ -972,7 +972,7 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
972
972
|
disabled: e.disabled
|
|
973
973
|
}, {
|
|
974
974
|
content: A(() => u[0] || (u[0] = [
|
|
975
|
-
|
|
975
|
+
Ie("This field is locked and based on the location of the request.")
|
|
976
976
|
])),
|
|
977
977
|
default: A(() => [
|
|
978
978
|
y(i, null, {
|
|
@@ -987,7 +987,7 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
987
987
|
}, null, 8, ["color"]),
|
|
988
988
|
n("div", {
|
|
989
989
|
class: J([e.disabled ? "text-fm-color-typo-disabled" : ""])
|
|
990
|
-
}, M((_ =
|
|
990
|
+
}, M((_ = $.value) == null ? void 0 : _.fullName), 3)
|
|
991
991
|
])
|
|
992
992
|
];
|
|
993
993
|
}),
|
|
@@ -1010,7 +1010,7 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
1010
1010
|
}, Co = { class: "flex-1" }, So = { class: "flex-1" }, wo = {
|
|
1011
1011
|
key: 1,
|
|
1012
1012
|
class: "flex items-center gap-4"
|
|
1013
|
-
}, Fo = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary translate-y-[1px]" },
|
|
1013
|
+
}, Fo = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary translate-y-[1px]" }, $o = { class: "flex flex-col gap-16" }, Io = { class: "flex-1 gap-8 fm-typo-en-title-sm-600" }, To = { class: "flex gap-8" }, Do = { key: 0 }, Vo = /* @__PURE__ */ ce({
|
|
1014
1014
|
__name: "TransferForm2",
|
|
1015
1015
|
props: {
|
|
1016
1016
|
modelValue: {},
|
|
@@ -1022,7 +1022,7 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
1022
1022
|
},
|
|
1023
1023
|
emits: ["validation-success", "form:ready"],
|
|
1024
1024
|
setup(g, { expose: w, emit: r }) {
|
|
1025
|
-
const p = g, x = r, t = kt(), { t: f } = _e(), F = et(),
|
|
1025
|
+
const p = g, x = r, t = kt(), { t: f } = _e(), F = et(), $ = tt(), v = Ue(), e = at(), u = Je(), k = wt(), { breakpoints: a } = ot(), i = N(() => a.value.xs || a.value.sm), h = gt({
|
|
1026
1026
|
value: !1
|
|
1027
1027
|
}), _ = q(!1), C = q(0), l = q([]), c = N(
|
|
1028
1028
|
() => {
|
|
@@ -1067,10 +1067,10 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
1067
1067
|
throw new Error("Unable to resolve supplier from template");
|
|
1068
1068
|
}
|
|
1069
1069
|
}
|
|
1070
|
-
}),
|
|
1070
|
+
}), Ye(() => {
|
|
1071
1071
|
var o;
|
|
1072
1072
|
try {
|
|
1073
|
-
const m =
|
|
1073
|
+
const m = $.skuById;
|
|
1074
1074
|
let E = t.items.map((H) => ({ ...H, id: H.id ?? H.sku._id }));
|
|
1075
1075
|
t.template && (t.items.length || (E = ((o = c.value) == null ? void 0 : o.purchaseOrder.items) ?? [])), t.items = E.filter((H) => !m[H.sku._id].isInactive);
|
|
1076
1076
|
} finally {
|
|
@@ -1085,7 +1085,7 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
1085
1085
|
F.watchLocation(async () => {
|
|
1086
1086
|
location && (t.supplier || (t.supplier = e.suppliers.find((o) => o) ?? t.supplier));
|
|
1087
1087
|
});
|
|
1088
|
-
const
|
|
1088
|
+
const Q = ds(), Y = vs(
|
|
1089
1089
|
() => t,
|
|
1090
1090
|
(o) => {
|
|
1091
1091
|
Object.assign(t, o);
|
|
@@ -1100,7 +1100,7 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
1100
1100
|
set(o) {
|
|
1101
1101
|
var E;
|
|
1102
1102
|
const m = typeof ((E = t == null ? void 0 : t.supplier) == null ? void 0 : E.internal) == "string" ? ne.TRANSFER : ne.PURCHASE;
|
|
1103
|
-
o !== m && (t.supplier = o === ne.PURCHASE ?
|
|
1103
|
+
o !== m && (t.supplier = o === ne.PURCHASE ? Y.locationOptionsTypePurchase.value[0] : Y.locationOptionsTypeTransfer.value[0]);
|
|
1104
1104
|
}
|
|
1105
1105
|
});
|
|
1106
1106
|
ge(
|
|
@@ -1109,9 +1109,9 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
1109
1109
|
return (o = p.modelValue) == null ? void 0 : o.template;
|
|
1110
1110
|
},
|
|
1111
1111
|
(o) => {
|
|
1112
|
-
u.mustUsePoTemplate && !o &&
|
|
1112
|
+
u.mustUsePoTemplate && !o && $t(() => {
|
|
1113
1113
|
var m, E;
|
|
1114
|
-
t.supplier = ((E = (m =
|
|
1114
|
+
t.supplier = ((E = (m = Y.locationOptionsTypeTransfer.value) == null ? void 0 : m.filter(
|
|
1115
1115
|
(H) => H.internal === "restaurant"
|
|
1116
1116
|
)) == null ? void 0 : E[0]) ?? t.supplier;
|
|
1117
1117
|
});
|
|
@@ -1119,7 +1119,7 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
1119
1119
|
{ immediate: !0 }
|
|
1120
1120
|
);
|
|
1121
1121
|
const O = N(() => {
|
|
1122
|
-
let o =
|
|
1122
|
+
let o = Y.transferLocationOptions.value;
|
|
1123
1123
|
return u.mustUsePoTemplate && !t.template && (o = o.filter((m) => {
|
|
1124
1124
|
var E;
|
|
1125
1125
|
return (E = m.sublabel) == null ? void 0 : E.startsWith("restaurant");
|
|
@@ -1130,9 +1130,9 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
1130
1130
|
return (o = t.supplier) == null ? void 0 : o._id;
|
|
1131
1131
|
},
|
|
1132
1132
|
set(o) {
|
|
1133
|
-
|
|
1133
|
+
Y.transferLocationModel.value = o;
|
|
1134
1134
|
}
|
|
1135
|
-
}),
|
|
1135
|
+
}), P = N({
|
|
1136
1136
|
get() {
|
|
1137
1137
|
return t.remark ?? void 0;
|
|
1138
1138
|
},
|
|
@@ -1195,7 +1195,7 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
1195
1195
|
}), Be = N(() => Ne.columnDefs.value);
|
|
1196
1196
|
function ze() {
|
|
1197
1197
|
var G, re, Fe, He, Re;
|
|
1198
|
-
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 ?
|
|
1198
|
+
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 ? $.skus.filter((z) => o.has(z._id)) : $.skus, H = v.isEnabled ? E.filter((z) => {
|
|
1199
1199
|
var ae, se, ue, pe;
|
|
1200
1200
|
const te = (se = (ae = c.value) == null ? void 0 : ae.purchaseOrder) == null ? void 0 : se.items.find(
|
|
1201
1201
|
(ve) => ve.sku._id === z._id
|
|
@@ -1223,7 +1223,7 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
1223
1223
|
var te;
|
|
1224
1224
|
return (te = t.items) == null ? void 0 : te.find((ae) => ae.sku._id === z.value._id);
|
|
1225
1225
|
}).map((z) => z.value);
|
|
1226
|
-
|
|
1226
|
+
Q.open({
|
|
1227
1227
|
title: f("inventory.transfer.form.items.selectItem"),
|
|
1228
1228
|
closeButton: !0,
|
|
1229
1229
|
contentComponent: jt,
|
|
@@ -1259,7 +1259,7 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
1259
1259
|
}
|
|
1260
1260
|
};
|
|
1261
1261
|
if (K.value == ne.PURCHASE) {
|
|
1262
|
-
const { cost: ye } =
|
|
1262
|
+
const { cost: ye } = $e(
|
|
1263
1263
|
pe.sku,
|
|
1264
1264
|
pe.quantity,
|
|
1265
1265
|
pe.measurement,
|
|
@@ -1279,7 +1279,7 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
1279
1279
|
}
|
|
1280
1280
|
const Le = N(() => {
|
|
1281
1281
|
var o;
|
|
1282
|
-
return c.value ? ((o = c.value) == null ? void 0 : o.purchaseOrder.items) || [] :
|
|
1282
|
+
return c.value ? ((o = c.value) == null ? void 0 : o.purchaseOrder.items) || [] : $.skus.map((m) => ({
|
|
1283
1283
|
quantity: {
|
|
1284
1284
|
amount: 0,
|
|
1285
1285
|
precision: 0
|
|
@@ -1293,7 +1293,7 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
1293
1293
|
},
|
|
1294
1294
|
measurement: m.trackingMeasurement ? m.unit.measurements.find((E) => E.id === m.trackingMeasurement) : null
|
|
1295
1295
|
}));
|
|
1296
|
-
}),
|
|
1296
|
+
}), Ve = N(() => {
|
|
1297
1297
|
const o = [];
|
|
1298
1298
|
return (!u.mustUsePoTemplate || u.mustUsePoTemplate && t.template) && o.push({
|
|
1299
1299
|
label: f("inventory.transfer.form.type.purchase"),
|
|
@@ -1302,13 +1302,13 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
1302
1302
|
label: f("inventory.transfer.form.type.transfer"),
|
|
1303
1303
|
value: ne.TRANSFER
|
|
1304
1304
|
}), o;
|
|
1305
|
-
}),
|
|
1305
|
+
}), Pe = N(() => {
|
|
1306
1306
|
var o;
|
|
1307
1307
|
return (o = p.modelValue) == null ? void 0 : o.items.every((m) => m.quantity.amount <= 0);
|
|
1308
1308
|
});
|
|
1309
1309
|
return (o, m) => {
|
|
1310
1310
|
var ve, Ae;
|
|
1311
|
-
const E =
|
|
1311
|
+
const E = I("FmChip"), H = I("FmLabel"), le = I("FmIcon"), me = I("FmField"), G = I("FmTooltip"), re = I("FmSelect"), Fe = I("FmTextField"), He = I("FmTextarea"), Re = I("FmSwitch"), z = I("FmDatePicker"), te = I("FmTimePicker"), ae = I("FmFormGroup"), se = I("FmButton"), ue = I("FmTable"), pe = I("FmForm");
|
|
1312
1312
|
return S(), T("div", co, [
|
|
1313
1313
|
n("div", mo, [
|
|
1314
1314
|
(ve = p.modelValue) != null && ve.template ? (S(), W(E, {
|
|
@@ -1355,7 +1355,7 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
1355
1355
|
disabled: o.disabled
|
|
1356
1356
|
}, {
|
|
1357
1357
|
content: A(() => m[15] || (m[15] = [
|
|
1358
|
-
|
|
1358
|
+
Ie("This field is locked from template.")
|
|
1359
1359
|
])),
|
|
1360
1360
|
default: A(() => [
|
|
1361
1361
|
y(me, null, {
|
|
@@ -1395,12 +1395,12 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
1395
1395
|
disabled: o.disabled
|
|
1396
1396
|
}, {
|
|
1397
1397
|
content: A(() => m[16] || (m[16] = [
|
|
1398
|
-
|
|
1398
|
+
Ie("This field is locked from template.")
|
|
1399
1399
|
])),
|
|
1400
1400
|
default: A(() => [
|
|
1401
1401
|
y(me, null, {
|
|
1402
1402
|
default: A(() => {
|
|
1403
|
-
var
|
|
1403
|
+
var V;
|
|
1404
1404
|
return [
|
|
1405
1405
|
n("div", ho, [
|
|
1406
1406
|
y(le, {
|
|
@@ -1410,7 +1410,7 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
1410
1410
|
}, null, 8, ["color"]),
|
|
1411
1411
|
n("div", {
|
|
1412
1412
|
class: J({ "text-fm-color-typo-disabled": o.disabled })
|
|
1413
|
-
}, M((
|
|
1413
|
+
}, M((V = O.value.find((oe) => oe.value === U.value)) == null ? void 0 : V.label), 3)
|
|
1414
1414
|
])
|
|
1415
1415
|
];
|
|
1416
1416
|
}),
|
|
@@ -1426,9 +1426,9 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
1426
1426
|
label: s(f)("inventory.transfer.form.type.title"),
|
|
1427
1427
|
"label-mark": "required",
|
|
1428
1428
|
modelValue: K.value,
|
|
1429
|
-
"onUpdate:modelValue": m[0] || (m[0] = (
|
|
1430
|
-
items:
|
|
1431
|
-
rules: [s(qe)(1)(
|
|
1429
|
+
"onUpdate:modelValue": m[0] || (m[0] = (V) => K.value = V),
|
|
1430
|
+
items: Ve.value,
|
|
1431
|
+
rules: [s(qe)(1)(Ve.value)]
|
|
1432
1432
|
}, {
|
|
1433
1433
|
default: A(() => [
|
|
1434
1434
|
n("span", {
|
|
@@ -1444,28 +1444,28 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
1444
1444
|
label: K.value === s(ne).PURCHASE ? s(f)("inventory.transfer.form.purchaseFrom") : s(f)("inventory.transfer.form.transferFrom"),
|
|
1445
1445
|
"label-mark": "required",
|
|
1446
1446
|
modelValue: U.value,
|
|
1447
|
-
"onUpdate:modelValue": m[1] || (m[1] = (
|
|
1447
|
+
"onUpdate:modelValue": m[1] || (m[1] = (V) => U.value = V),
|
|
1448
1448
|
items: O.value,
|
|
1449
1449
|
rules: [s(qe)(1)(O.value)]
|
|
1450
1450
|
}, {
|
|
1451
|
-
"menu-wrapper": A((
|
|
1451
|
+
"menu-wrapper": A((V) => {
|
|
1452
1452
|
var oe, Ee;
|
|
1453
1453
|
return [
|
|
1454
|
-
y(ys, Ze(
|
|
1454
|
+
y(ys, Ze(V, {
|
|
1455
1455
|
items: O.value,
|
|
1456
1456
|
"model-value": (Ee = (oe = o.modelValue) == null ? void 0 : oe.supplier) == null ? void 0 : Ee._id
|
|
1457
1457
|
}), null, 16, ["items", "model-value"])
|
|
1458
1458
|
];
|
|
1459
1459
|
}),
|
|
1460
1460
|
default: A(() => {
|
|
1461
|
-
var
|
|
1461
|
+
var V;
|
|
1462
1462
|
return [
|
|
1463
1463
|
n("span", {
|
|
1464
1464
|
class: J([
|
|
1465
1465
|
"line-clamp-1 fm-typo-en-body-lg-400",
|
|
1466
1466
|
o.disabled ? "text-fm-color-typo-disabled" : "text-fm-color-typo-primary"
|
|
1467
1467
|
])
|
|
1468
|
-
}, M((
|
|
1468
|
+
}, M((V = O.value.find((oe) => oe.value === U.value)) == null ? void 0 : V.label), 3)
|
|
1469
1469
|
];
|
|
1470
1470
|
}),
|
|
1471
1471
|
_: 1
|
|
@@ -1475,14 +1475,14 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
1475
1475
|
label: s(f)("inventory.transfer.form.reference"),
|
|
1476
1476
|
"label-mark": "optional",
|
|
1477
1477
|
modelValue: s(t).ref,
|
|
1478
|
-
"onUpdate:modelValue": m[2] || (m[2] = (
|
|
1478
|
+
"onUpdate:modelValue": m[2] || (m[2] = (V) => s(t).ref = V)
|
|
1479
1479
|
}, null, 8, ["label", "modelValue"]),
|
|
1480
1480
|
y(He, {
|
|
1481
1481
|
label: s(f)("inventory.transfer.form.remark"),
|
|
1482
1482
|
"label-mark": "optional",
|
|
1483
1483
|
"max-length": 240,
|
|
1484
|
-
modelValue:
|
|
1485
|
-
"onUpdate:modelValue": m[3] || (m[3] = (
|
|
1484
|
+
modelValue: P.value,
|
|
1485
|
+
"onUpdate:modelValue": m[3] || (m[3] = (V) => P.value = V),
|
|
1486
1486
|
class: J([o.disabled ? "text-fm-color-typo-disabled " : ""])
|
|
1487
1487
|
}, null, 8, ["label", "modelValue", "class"]),
|
|
1488
1488
|
_.value ? (S(), W(uo, {
|
|
@@ -1492,10 +1492,10 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
1492
1492
|
supplier: s(t).supplier,
|
|
1493
1493
|
setting: s(t).netSuite,
|
|
1494
1494
|
items: s(t).items,
|
|
1495
|
-
onChange: (
|
|
1496
|
-
s(t).items =
|
|
1495
|
+
onChange: (V, oe) => {
|
|
1496
|
+
s(t).items = V, s(t).netSuite = oe;
|
|
1497
1497
|
},
|
|
1498
|
-
"onNetsuite:ready": m[4] || (m[4] = (
|
|
1498
|
+
"onNetsuite:ready": m[4] || (m[4] = (V) => {
|
|
1499
1499
|
h.value = !0;
|
|
1500
1500
|
})
|
|
1501
1501
|
}, null, 8, ["required", "disabled", "supplier", "setting", "items", "onChange"])) : j("", !0),
|
|
@@ -1510,7 +1510,7 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
1510
1510
|
}, [
|
|
1511
1511
|
y(Re, {
|
|
1512
1512
|
modelValue: s(b),
|
|
1513
|
-
"onUpdate:modelValue": m[5] || (m[5] = (
|
|
1513
|
+
"onUpdate:modelValue": m[5] || (m[5] = (V) => xe(b) ? b.value = V : null),
|
|
1514
1514
|
label: s(f)("inventory.transfer.form.backdate.title"),
|
|
1515
1515
|
sublabel: s(f)("inventory.transfer.form.backdate.subtitle"),
|
|
1516
1516
|
"label-placement": "right",
|
|
@@ -1523,13 +1523,13 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
1523
1523
|
n("div", Co, [
|
|
1524
1524
|
y(z, {
|
|
1525
1525
|
modelValue: s(R),
|
|
1526
|
-
"onUpdate:modelValue": m[6] || (m[6] = (
|
|
1526
|
+
"onUpdate:modelValue": m[6] || (m[6] = (V) => xe(R) ? R.value = V : null)
|
|
1527
1527
|
}, null, 8, ["modelValue"])
|
|
1528
1528
|
]),
|
|
1529
1529
|
n("div", So, [
|
|
1530
1530
|
y(te, {
|
|
1531
1531
|
modelValue: s(X),
|
|
1532
|
-
"onUpdate:modelValue": m[7] || (m[7] = (
|
|
1532
|
+
"onUpdate:modelValue": m[7] || (m[7] = (V) => xe(X) ? X.value = V : null)
|
|
1533
1533
|
}, null, 8, ["modelValue"])
|
|
1534
1534
|
])
|
|
1535
1535
|
])) : j("", !0)
|
|
@@ -1537,7 +1537,7 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
1537
1537
|
s(d) ? (S(), W(ae, {
|
|
1538
1538
|
key: 0,
|
|
1539
1539
|
modelValue: s(d),
|
|
1540
|
-
"onUpdate:modelValue": m[8] || (m[8] = (
|
|
1540
|
+
"onUpdate:modelValue": m[8] || (m[8] = (V) => xe(d) ? d.value = V : null),
|
|
1541
1541
|
rules: [s(Ht)(new Date(o.lastClosingDate), /* @__PURE__ */ new Date())]
|
|
1542
1542
|
}, null, 8, ["modelValue", "rules"])) : j("", !0),
|
|
1543
1543
|
B.value && !o.lastClosingDate ? (S(), T("div", wo, [
|
|
@@ -1551,7 +1551,7 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
1551
1551
|
])) : j("", !0)
|
|
1552
1552
|
])
|
|
1553
1553
|
]),
|
|
1554
|
-
n("div",
|
|
1554
|
+
n("div", $o, [
|
|
1555
1555
|
y(ae, {
|
|
1556
1556
|
"model-value": s(t).items,
|
|
1557
1557
|
rules: [s(qe)(1)]
|
|
@@ -1565,7 +1565,7 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
1565
1565
|
}
|
|
1566
1566
|
])
|
|
1567
1567
|
}, [
|
|
1568
|
-
n("div",
|
|
1568
|
+
n("div", Io, M(s(f)("inventory.transfer.form.items.title")), 1),
|
|
1569
1569
|
n("div", To, [
|
|
1570
1570
|
y(se, {
|
|
1571
1571
|
disabled: o.disabled,
|
|
@@ -1575,18 +1575,18 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
1575
1575
|
"text-color": "primary",
|
|
1576
1576
|
"bg-color": "transparent",
|
|
1577
1577
|
"border-color": "primary",
|
|
1578
|
-
onClick: m[9] || (m[9] = (
|
|
1578
|
+
onClick: m[9] || (m[9] = (V) => ze()),
|
|
1579
1579
|
size: "md"
|
|
1580
1580
|
}, null, 8, ["disabled", "label"]),
|
|
1581
1581
|
y(Ws, {
|
|
1582
1582
|
"template-id": s(t).template || void 0,
|
|
1583
1583
|
"template-items": Le.value,
|
|
1584
1584
|
"po-items": s(t).items,
|
|
1585
|
-
"onUpdate:forecastAmounts": m[10] || (m[10] = (
|
|
1586
|
-
l.value =
|
|
1585
|
+
"onUpdate:forecastAmounts": m[10] || (m[10] = (V) => {
|
|
1586
|
+
l.value = V;
|
|
1587
1587
|
}),
|
|
1588
|
-
"onUpdate:poItems": m[11] || (m[11] = (
|
|
1589
|
-
s(t).items =
|
|
1588
|
+
"onUpdate:poItems": m[11] || (m[11] = (V) => {
|
|
1589
|
+
s(t).items = V, C.value++;
|
|
1590
1590
|
})
|
|
1591
1591
|
}, null, 8, ["template-id", "template-items", "po-items"])
|
|
1592
1592
|
])
|
|
@@ -1597,13 +1597,13 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
1597
1597
|
"prepend-icon": "compare_arrows",
|
|
1598
1598
|
"label-placement": "right",
|
|
1599
1599
|
"model-value": s(Z),
|
|
1600
|
-
"onUpdate:modelValue": m[12] || (m[12] = (
|
|
1600
|
+
"onUpdate:modelValue": m[12] || (m[12] = (V) => xe(Z) ? Z.value = V : null),
|
|
1601
1601
|
disabled: s(he) || o.disabled
|
|
1602
1602
|
}, null, 8, ["label", "model-value", "disabled"])
|
|
1603
1603
|
])) : j("", !0),
|
|
1604
1604
|
y(ae, {
|
|
1605
|
-
"model-value":
|
|
1606
|
-
rules: [() =>
|
|
1605
|
+
"model-value": Pe.value,
|
|
1606
|
+
rules: [() => Pe.value ? "Must have at least one non-zero item" : !0]
|
|
1607
1607
|
}, null, 8, ["model-value", "rules"]),
|
|
1608
1608
|
(S(), W(ue, {
|
|
1609
1609
|
"column-defs": Be.value,
|
|
@@ -1617,31 +1617,31 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
1617
1617
|
"hide-footer": "",
|
|
1618
1618
|
"page-size": s(t).items.length
|
|
1619
1619
|
}, {
|
|
1620
|
-
"table-row": A((
|
|
1620
|
+
"table-row": A((V) => {
|
|
1621
1621
|
var oe, Ee, mt, pt;
|
|
1622
1622
|
return [
|
|
1623
1623
|
y(ao, {
|
|
1624
1624
|
"compare-price-by-sku": s(ke),
|
|
1625
1625
|
"show-compare-price": K.value === s(ne).PURCHASE && s(Z),
|
|
1626
|
-
row:
|
|
1626
|
+
row: V,
|
|
1627
1627
|
"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(
|
|
1628
|
-
(Ke) => Ke.sku._id ===
|
|
1628
|
+
(Ke) => Ke.sku._id === V.original.sku._id
|
|
1629
1629
|
),
|
|
1630
1630
|
"onUpdate:item": m[13] || (m[13] = (Ke) => we.value.updateItem(Ke)),
|
|
1631
1631
|
disabled: o.disabled
|
|
1632
1632
|
}, null, 8, ["compare-price-by-sku", "show-compare-price", "row", "template-item", "disabled"])
|
|
1633
1633
|
];
|
|
1634
1634
|
}),
|
|
1635
|
-
"list-row": A((
|
|
1635
|
+
"list-row": A((V) => [
|
|
1636
1636
|
(S(), W(xt, {
|
|
1637
|
-
row:
|
|
1637
|
+
row: V,
|
|
1638
1638
|
key: s(t).items.map((oe) => oe.sku._id).join(".")
|
|
1639
1639
|
}, {
|
|
1640
1640
|
default: A((oe) => [
|
|
1641
1641
|
y(Os, {
|
|
1642
1642
|
"compare-price-by-sku": s(ke),
|
|
1643
1643
|
"show-compare-price": K.value === s(ne).PURCHASE && s(Z),
|
|
1644
|
-
row:
|
|
1644
|
+
row: V,
|
|
1645
1645
|
"cell-by-col-id": oe
|
|
1646
1646
|
}, null, 8, ["compare-price-by-sku", "show-compare-price", "row", "cell-by-col-id"])
|
|
1647
1647
|
]),
|
|
@@ -1658,7 +1658,7 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
1658
1658
|
]);
|
|
1659
1659
|
};
|
|
1660
1660
|
}
|
|
1661
|
-
}),
|
|
1661
|
+
}), Po = { class: "flex items-center" }, Ro = { class: "fm-typo-en-title-md-800" }, Ao = { class: "flex gap-4" }, Eo = /* @__PURE__ */ ce({
|
|
1662
1662
|
__name: "TransferDialog",
|
|
1663
1663
|
props: {
|
|
1664
1664
|
mode: {},
|
|
@@ -1669,13 +1669,13 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
1669
1669
|
},
|
|
1670
1670
|
emits: ["update:show", "submitted"],
|
|
1671
1671
|
setup(g, { expose: w, emit: r }) {
|
|
1672
|
-
var
|
|
1673
|
-
const p = g, x = r, t = st(), f = wt(), F = Te(),
|
|
1672
|
+
var P;
|
|
1673
|
+
const p = g, x = r, t = st(), f = wt(), F = Te(), $ = at(), v = tt(), e = et(), { t: u } = _e(), k = q(!1), a = q(!1), i = q(!1);
|
|
1674
1674
|
async function h(d) {
|
|
1675
1675
|
if (d) {
|
|
1676
1676
|
a.value = !1;
|
|
1677
1677
|
try {
|
|
1678
|
-
await
|
|
1678
|
+
await $.readSuppliers(), a.value = !0;
|
|
1679
1679
|
} catch {
|
|
1680
1680
|
F.open({
|
|
1681
1681
|
title: u("inventory.transfer.form.unableToFetchListOfSuppliers.title"),
|
|
@@ -1720,7 +1720,7 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
1720
1720
|
templateDoc: f.templates.find((b) => b._id === p.templateId)
|
|
1721
1721
|
};
|
|
1722
1722
|
}
|
|
1723
|
-
const C = St(p, "show"), l = q(p.modelValue ?? _()), c = q(((
|
|
1723
|
+
const C = St(p, "show"), l = q(p.modelValue ?? _()), c = q(((P = p.modelValue) == null ? void 0 : P._id) ?? `${Math.random()}`);
|
|
1724
1724
|
ge(
|
|
1725
1725
|
() => p.show,
|
|
1726
1726
|
(d) => {
|
|
@@ -1738,22 +1738,22 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
1738
1738
|
return u("inventory.transfer.receiveRequest.update.title");
|
|
1739
1739
|
}
|
|
1740
1740
|
return "";
|
|
1741
|
-
}),
|
|
1741
|
+
}), Q = q();
|
|
1742
1742
|
w({
|
|
1743
1743
|
validateInputs: () => {
|
|
1744
1744
|
var d, b;
|
|
1745
|
-
(b = (d =
|
|
1745
|
+
(b = (d = Q.value) == null ? void 0 : d.validateInputs) == null || b.call(d);
|
|
1746
1746
|
},
|
|
1747
1747
|
resetInputsValidation: () => {
|
|
1748
1748
|
var d, b;
|
|
1749
|
-
(b = (d =
|
|
1749
|
+
(b = (d = Q.value) == null ? void 0 : d.resetInputsValidation) == null || b.call(d);
|
|
1750
1750
|
},
|
|
1751
1751
|
resetInputs: () => {
|
|
1752
1752
|
var d, b;
|
|
1753
|
-
(b = (d =
|
|
1753
|
+
(b = (d = Q.value) == null ? void 0 : d.resetInputs) == null || b.call(d);
|
|
1754
1754
|
}
|
|
1755
1755
|
});
|
|
1756
|
-
async function
|
|
1756
|
+
async function Y() {
|
|
1757
1757
|
const d = l.value;
|
|
1758
1758
|
if (k.value = !0, d.items = d.items.filter((b) => b.quantity.amount > 0), !d.items.length) {
|
|
1759
1759
|
F.open({
|
|
@@ -1810,14 +1810,14 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
1810
1810
|
function O() {
|
|
1811
1811
|
switch (p.mode) {
|
|
1812
1812
|
case Oe.CREATE:
|
|
1813
|
-
return
|
|
1813
|
+
return Y();
|
|
1814
1814
|
case Oe.UPDATE:
|
|
1815
1815
|
return K();
|
|
1816
1816
|
}
|
|
1817
1817
|
}
|
|
1818
1818
|
function U() {
|
|
1819
1819
|
var R, X;
|
|
1820
|
-
const d =
|
|
1820
|
+
const d = Qt.validatePurchaseOrderItems({
|
|
1821
1821
|
skusById: v.skuById ?? {},
|
|
1822
1822
|
items: l.value.items ?? []
|
|
1823
1823
|
}), b = Object.values(d).flat();
|
|
@@ -1830,10 +1830,10 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
1830
1830
|
});
|
|
1831
1831
|
return;
|
|
1832
1832
|
}
|
|
1833
|
-
(X = (R =
|
|
1833
|
+
(X = (R = Q.value) == null ? void 0 : R.validateInputs) == null || X.call(R);
|
|
1834
1834
|
}
|
|
1835
1835
|
return (d, b) => {
|
|
1836
|
-
const R =
|
|
1836
|
+
const R = I("FmButton"), X = I("FmSideSheet");
|
|
1837
1837
|
return S(), W(X, {
|
|
1838
1838
|
modelValue: s(C),
|
|
1839
1839
|
"onUpdate:modelValue": b[3] || (b[3] = (Z) => xe(C) ? C.value = Z : null),
|
|
@@ -1842,21 +1842,21 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
1842
1842
|
"max-width": 900
|
|
1843
1843
|
}, {
|
|
1844
1844
|
"side-sheet-header": A(() => [
|
|
1845
|
-
n("div",
|
|
1845
|
+
n("div", Po, [
|
|
1846
1846
|
n("div", Ro, M(B.value), 1)
|
|
1847
1847
|
])
|
|
1848
1848
|
]),
|
|
1849
1849
|
default: A(() => [
|
|
1850
|
-
(S(), W(
|
|
1850
|
+
(S(), W(Vo, {
|
|
1851
1851
|
class: "w-full",
|
|
1852
1852
|
ref_key: "formRef",
|
|
1853
|
-
ref:
|
|
1853
|
+
ref: Q,
|
|
1854
1854
|
"onForm:ready": b[0] || (b[0] = () => i.value = !0),
|
|
1855
1855
|
onValidationSuccess: O,
|
|
1856
1856
|
modelValue: l.value,
|
|
1857
1857
|
"onUpdate:modelValue": b[1] || (b[1] = (Z) => l.value = Z),
|
|
1858
1858
|
disabled: k.value || D.value,
|
|
1859
|
-
suppliers: s(
|
|
1859
|
+
suppliers: s($).suppliers,
|
|
1860
1860
|
skus: s(v).skus,
|
|
1861
1861
|
key: c.value,
|
|
1862
1862
|
"last-closing-date": d.lastClosingDate
|
|
@@ -1884,7 +1884,7 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
1884
1884
|
}
|
|
1885
1885
|
});
|
|
1886
1886
|
function Oo(g) {
|
|
1887
|
-
const [w, r, p, ...x] =
|
|
1887
|
+
const [w, r, p, ...x] = Yt(g), t = p.map((v) => v.toLowerCase().trim().replace(/ /g, "_")), F = ["item_name", "transfer_quantity(uom)", "uom", "scanned_code"].filter((v) => !t.includes(v));
|
|
1888
1888
|
if (F.length)
|
|
1889
1889
|
throw new Error(
|
|
1890
1890
|
`Missing headers (${F.join()}). Excel file does not come from the template.`
|
|
@@ -1906,8 +1906,8 @@ function Mo(g) {
|
|
|
1906
1906
|
try {
|
|
1907
1907
|
return w.reduce(
|
|
1908
1908
|
(p, x) => {
|
|
1909
|
-
const t = new Array(), f = g.Sheets[x], F = tt(),
|
|
1910
|
-
for (const { index: u, data: k } of
|
|
1909
|
+
const t = new Array(), f = g.Sheets[x], F = tt(), $ = Oo(f), v = [];
|
|
1910
|
+
for (const { index: u, data: k } of $) {
|
|
1911
1911
|
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`);
|
|
1912
1912
|
const a = F.skus.find((_) => _.code === k.scanned_code);
|
|
1913
1913
|
if (!a) {
|
|
@@ -1958,7 +1958,7 @@ const qo = { class: "flex flex-col flex-1" }, Uo = { class: "flex flex-col" }, N
|
|
|
1958
1958
|
class: "text-fm-color-typo-secondary fm-typo-en-body-sm-400"
|
|
1959
1959
|
}, zo = { key: 0 }, Lo = {
|
|
1960
1960
|
class: /* @__PURE__ */ J(["fm-typo-en-body-lg-600"])
|
|
1961
|
-
}, Ho = { class: "flex-1" }, jo = { class: "flex-auto line-clamp-2 text-ellipsis break-all fm-typo-en-body-sm-400" },
|
|
1961
|
+
}, Ho = { class: "flex-1" }, jo = { class: "flex-auto line-clamp-2 text-ellipsis break-all fm-typo-en-body-sm-400" }, Qo = { class: "flex-auto line-clamp-2 text-ellipsis break-all" }, Yo = { class: "text-fm-color-typo-primary" }, Ko = { class: "ml-auto" }, Xo = { key: 0 }, Zo = /* @__PURE__ */ ce({
|
|
1962
1962
|
__name: "XilnexResult",
|
|
1963
1963
|
props: {
|
|
1964
1964
|
type: {},
|
|
@@ -1972,7 +1972,7 @@ const qo = { class: "flex flex-col flex-1" }, Uo = { class: "flex flex-col" }, N
|
|
|
1972
1972
|
};
|
|
1973
1973
|
return (t, f) => {
|
|
1974
1974
|
var v;
|
|
1975
|
-
const F =
|
|
1975
|
+
const F = I("FmIcon"), $ = I("FmTooltip");
|
|
1976
1976
|
return S(), T("div", qo, [
|
|
1977
1977
|
n("div", {
|
|
1978
1978
|
onClick: x,
|
|
@@ -1987,7 +1987,7 @@ const qo = { class: "flex flex-col flex-1" }, Uo = { class: "flex flex-col" }, N
|
|
|
1987
1987
|
"text-fm-color-system-error-300": t.errors.length
|
|
1988
1988
|
})
|
|
1989
1989
|
}, [
|
|
1990
|
-
|
|
1990
|
+
Ie(M(t.name) + " ", 1),
|
|
1991
1991
|
t.type === "create" ? (S(), T("span", Bo, "(" + M(s(r)("inventory.closing.template.import.new")) + ")", 1)) : j("", !0)
|
|
1992
1992
|
], 2),
|
|
1993
1993
|
t.errors.length ? (S(), T("div", zo, [
|
|
@@ -2005,7 +2005,7 @@ const qo = { class: "flex flex-col flex-1" }, Uo = { class: "flex flex-col" }, N
|
|
|
2005
2005
|
class: "flex gap-4 mt-2 items-center"
|
|
2006
2006
|
}, [
|
|
2007
2007
|
n("div", Ho, [
|
|
2008
|
-
y(
|
|
2008
|
+
y($, {
|
|
2009
2009
|
content: e.code,
|
|
2010
2010
|
placement: "top",
|
|
2011
2011
|
"z-index": 51
|
|
@@ -2015,22 +2015,22 @@ const qo = { class: "flex flex-col flex-1" }, Uo = { class: "flex flex-col" }, N
|
|
|
2015
2015
|
]),
|
|
2016
2016
|
_: 2
|
|
2017
2017
|
}, 1032, ["content"]),
|
|
2018
|
-
y(
|
|
2018
|
+
y($, {
|
|
2019
2019
|
content: e.name,
|
|
2020
2020
|
placement: "top",
|
|
2021
2021
|
"z-index": 51
|
|
2022
2022
|
}, {
|
|
2023
2023
|
default: A(() => [
|
|
2024
|
-
n("span",
|
|
2024
|
+
n("span", Qo, M(e.name), 1)
|
|
2025
2025
|
]),
|
|
2026
2026
|
_: 2
|
|
2027
2027
|
}, 1032, ["content"])
|
|
2028
2028
|
]),
|
|
2029
2029
|
n("div", null, [
|
|
2030
|
-
n("span",
|
|
2030
|
+
n("span", Yo, M(s(Ge).toFormatString({
|
|
2031
2031
|
value: e.quantity
|
|
2032
2032
|
})), 1),
|
|
2033
|
-
|
|
2033
|
+
Ie(" " + M(e.measurement ? e.measurement.abbrev : e.sku.unit.abbrev), 1)
|
|
2034
2034
|
])
|
|
2035
2035
|
]))), 128)) : j("", !0)
|
|
2036
2036
|
])
|
|
@@ -2074,7 +2074,7 @@ const qo = { class: "flex flex-col flex-1" }, Uo = { class: "flex flex-col" }, N
|
|
|
2074
2074
|
}, la = { class: "fm-typo-en-body-lg-600" }, yt = "Transfer note", ra = /* @__PURE__ */ ce({
|
|
2075
2075
|
__name: "XilnexImportForm",
|
|
2076
2076
|
setup(g, { expose: w }) {
|
|
2077
|
-
const r = q(null), p = Te(), x = q(!1), t = q(!1), f = kt(), F = q(!1),
|
|
2077
|
+
const r = q(null), p = Te(), x = q(!1), t = q(!1), f = kt(), F = q(!1), $ = Ue();
|
|
2078
2078
|
q([]);
|
|
2079
2079
|
const v = N({
|
|
2080
2080
|
get() {
|
|
@@ -2098,8 +2098,8 @@ const qo = { class: "flex flex-col flex-1" }, Uo = { class: "flex flex-col" }, N
|
|
|
2098
2098
|
});
|
|
2099
2099
|
}
|
|
2100
2100
|
});
|
|
2101
|
-
|
|
2102
|
-
const l = await
|
|
2101
|
+
Ye(async () => {
|
|
2102
|
+
const l = await $.getNetSuiteLocations();
|
|
2103
2103
|
console.log(l), F.value = !0;
|
|
2104
2104
|
});
|
|
2105
2105
|
const e = N({
|
|
@@ -2108,8 +2108,8 @@ const qo = { class: "flex flex-col flex-1" }, Uo = { class: "flex flex-col" }, N
|
|
|
2108
2108
|
},
|
|
2109
2109
|
set(l) {
|
|
2110
2110
|
if (l) {
|
|
2111
|
-
const c = f.effectiveAt ? new Date(f.effectiveAt) : /* @__PURE__ */ new Date(), [D, B,
|
|
2112
|
-
c.setFullYear(parseInt(D)), c.setMonth(parseInt(B) - 1), c.setDate(parseInt(
|
|
2111
|
+
const c = f.effectiveAt ? new Date(f.effectiveAt) : /* @__PURE__ */ new Date(), [D, B, Q] = l.split("-");
|
|
2112
|
+
c.setFullYear(parseInt(D)), c.setMonth(parseInt(B) - 1), c.setDate(parseInt(Q)), f.effectiveAt = c.toISOString();
|
|
2113
2113
|
}
|
|
2114
2114
|
}
|
|
2115
2115
|
}), u = N({
|
|
@@ -2176,8 +2176,8 @@ const qo = { class: "flex flex-col flex-1" }, Uo = { class: "flex flex-col" }, N
|
|
|
2176
2176
|
return ge(r, (l) => {
|
|
2177
2177
|
l && C(l);
|
|
2178
2178
|
}), (l, c) => {
|
|
2179
|
-
const D =
|
|
2180
|
-
return S(), W(
|
|
2179
|
+
const D = I("FmSelect"), B = I("FmDatePicker"), Q = I("FmTimePicker"), Y = I("FmCircularProgress"), K = I("FmLabel"), O = I("FmIcon"), U = I("FmButton"), P = I("FmForm");
|
|
2180
|
+
return S(), W(P, {
|
|
2181
2181
|
ref_key: "formRef",
|
|
2182
2182
|
ref: h
|
|
2183
2183
|
}, {
|
|
@@ -2206,7 +2206,7 @@ const qo = { class: "flex flex-col flex-1" }, Uo = { class: "flex flex-col" }, N
|
|
|
2206
2206
|
label: "Transfer date",
|
|
2207
2207
|
rules: [s(Me)()]
|
|
2208
2208
|
}, null, 8, ["modelValue", "rules"]),
|
|
2209
|
-
y(
|
|
2209
|
+
y(Q, {
|
|
2210
2210
|
modelValue: u.value,
|
|
2211
2211
|
"onUpdate:modelValue": c[2] || (c[2] = (d) => u.value = d),
|
|
2212
2212
|
label: "Transfer time",
|
|
@@ -2214,7 +2214,7 @@ const qo = { class: "flex flex-col flex-1" }, Uo = { class: "flex flex-col" }, N
|
|
|
2214
2214
|
}, null, 8, ["modelValue", "rules"]),
|
|
2215
2215
|
t.value ? (S(), T("div", Jo, [
|
|
2216
2216
|
n("div", null, [
|
|
2217
|
-
y(
|
|
2217
|
+
y(Y, {
|
|
2218
2218
|
size: "md",
|
|
2219
2219
|
color: "neutral-gray-200"
|
|
2220
2220
|
})
|
|
@@ -2231,13 +2231,13 @@ const qo = { class: "flex flex-col flex-1" }, Uo = { class: "flex flex-col" }, N
|
|
|
2231
2231
|
label: yt,
|
|
2232
2232
|
onFileUpload: c[3] || (c[3] = (d) => r.value = d),
|
|
2233
2233
|
"button-label": s(_)("inventory.ingredient.import.selectFile")
|
|
2234
|
-
},
|
|
2234
|
+
}, It({ _: 2 }, [
|
|
2235
2235
|
r.value ? {
|
|
2236
2236
|
name: "default",
|
|
2237
2237
|
fn: A(({ openFileDialog: d }) => [
|
|
2238
2238
|
y(K, null, {
|
|
2239
2239
|
default: A(() => [
|
|
2240
|
-
|
|
2240
|
+
Ie(M(yt))
|
|
2241
2241
|
]),
|
|
2242
2242
|
_: 1
|
|
2243
2243
|
}),
|
|
@@ -2252,7 +2252,7 @@ const qo = { class: "flex flex-col flex-1" }, Uo = { class: "flex flex-col" }, N
|
|
|
2252
2252
|
}
|
|
2253
2253
|
])
|
|
2254
2254
|
}, [
|
|
2255
|
-
x.value ? (S(), W(
|
|
2255
|
+
x.value ? (S(), W(Y, {
|
|
2256
2256
|
key: 0,
|
|
2257
2257
|
size: "md",
|
|
2258
2258
|
color: "neutral-gray-200"
|
|
@@ -2324,7 +2324,7 @@ const qo = { class: "flex flex-col flex-1" }, Uo = { class: "flex flex-col" }, N
|
|
|
2324
2324
|
},
|
|
2325
2325
|
emits: ["update:show", "submitted"],
|
|
2326
2326
|
setup(g, { expose: w, emit: r }) {
|
|
2327
|
-
const p = r, t = St(g, "show"), f = Te(), F = st(),
|
|
2327
|
+
const p = r, t = St(g, "show"), f = Te(), F = st(), $ = q(!1), v = q(), e = q();
|
|
2328
2328
|
w({
|
|
2329
2329
|
validateInputs: () => {
|
|
2330
2330
|
var a, i;
|
|
@@ -2378,7 +2378,7 @@ const qo = { class: "flex flex-col flex-1" }, Uo = { class: "flex flex-col" }, N
|
|
|
2378
2378
|
});
|
|
2379
2379
|
return;
|
|
2380
2380
|
}
|
|
2381
|
-
|
|
2381
|
+
$.value = !0;
|
|
2382
2382
|
try {
|
|
2383
2383
|
await F.importFromXilnex(e.value), p("update:show", !1);
|
|
2384
2384
|
} catch (c) {
|
|
@@ -2388,11 +2388,11 @@ const qo = { class: "flex flex-col flex-1" }, Uo = { class: "flex flex-col" }, N
|
|
|
2388
2388
|
type: "error"
|
|
2389
2389
|
});
|
|
2390
2390
|
} finally {
|
|
2391
|
-
|
|
2391
|
+
$.value = !1;
|
|
2392
2392
|
}
|
|
2393
2393
|
}
|
|
2394
2394
|
return (a, i) => {
|
|
2395
|
-
const h =
|
|
2395
|
+
const h = I("FmSpacer"), _ = I("FmButton"), C = I("FmDialog");
|
|
2396
2396
|
return S(), W(C, {
|
|
2397
2397
|
modelValue: s(t),
|
|
2398
2398
|
"onUpdate:modelValue": i[2] || (i[2] = (l) => xe(t) ? t.value = l : null),
|
|
@@ -2405,7 +2405,7 @@ const qo = { class: "flex flex-col flex-1" }, Uo = { class: "flex flex-col" }, N
|
|
|
2405
2405
|
"dialog-footer": A(() => [
|
|
2406
2406
|
y(h, { class: "sm:hidden xs:hidden" }),
|
|
2407
2407
|
y(_, {
|
|
2408
|
-
disabled:
|
|
2408
|
+
disabled: $.value,
|
|
2409
2409
|
class: "sm:w-full xs:w-full",
|
|
2410
2410
|
label: "Cancel",
|
|
2411
2411
|
size: "md",
|
|
@@ -2413,8 +2413,8 @@ const qo = { class: "flex flex-col flex-1" }, Uo = { class: "flex flex-col" }, N
|
|
|
2413
2413
|
onClick: i[1] || (i[1] = (l) => p("update:show", !1))
|
|
2414
2414
|
}, null, 8, ["disabled"]),
|
|
2415
2415
|
y(_, {
|
|
2416
|
-
disabled:
|
|
2417
|
-
loading:
|
|
2416
|
+
disabled: $.value,
|
|
2417
|
+
loading: $.value,
|
|
2418
2418
|
class: "sm:w-full xs:w-full",
|
|
2419
2419
|
label: "Upload",
|
|
2420
2420
|
size: "md",
|
|
@@ -2465,7 +2465,7 @@ const qo = { class: "flex flex-col flex-1" }, Uo = { class: "flex flex-col" }, N
|
|
|
2465
2465
|
return O;
|
|
2466
2466
|
}
|
|
2467
2467
|
}
|
|
2468
|
-
function
|
|
2468
|
+
function $() {
|
|
2469
2469
|
x.setItem(bt, JSON.stringify(v.value));
|
|
2470
2470
|
}
|
|
2471
2471
|
const v = q(F()), e = ts(
|
|
@@ -2494,10 +2494,10 @@ const qo = { class: "flex flex-col flex-1" }, Uo = { class: "flex flex-col" }, N
|
|
|
2494
2494
|
"Received quantity": Z,
|
|
2495
2495
|
"Ordered quantity": he,
|
|
2496
2496
|
Unit: ke,
|
|
2497
|
-
"Total cost": b.totalCost ?
|
|
2497
|
+
"Total cost": b.totalCost ? Qe(b.totalCost) : null
|
|
2498
2498
|
};
|
|
2499
2499
|
})
|
|
2500
|
-
),
|
|
2500
|
+
), P = [
|
|
2501
2501
|
"SKU code",
|
|
2502
2502
|
"SKU name",
|
|
2503
2503
|
"PO #",
|
|
@@ -2508,12 +2508,12 @@ const qo = { class: "flex flex-col flex-1" }, Uo = { class: "flex flex-col" }, N
|
|
|
2508
2508
|
"Ordered quantity",
|
|
2509
2509
|
"Unit"
|
|
2510
2510
|
];
|
|
2511
|
-
t.enableBackdatePo &&
|
|
2511
|
+
t.enableBackdatePo && P.insert("Effective at", 4), t.enableTotalCost && P.push("Total cost"), await rs(
|
|
2512
2512
|
[
|
|
2513
2513
|
{
|
|
2514
2514
|
name: "purchases",
|
|
2515
2515
|
data: U,
|
|
2516
|
-
columns:
|
|
2516
|
+
columns: P
|
|
2517
2517
|
}
|
|
2518
2518
|
],
|
|
2519
2519
|
O
|
|
@@ -2528,9 +2528,9 @@ const qo = { class: "flex flex-col flex-1" }, Uo = { class: "flex flex-col" }, N
|
|
|
2528
2528
|
!O.startDate || !O.endDate || (v.value.startDate = O.startDate, v.value.endDate = O.endDate, e.updateDateRange(
|
|
2529
2529
|
v.value.startDate,
|
|
2530
2530
|
v.value.endDate
|
|
2531
|
-
),
|
|
2531
|
+
), $());
|
|
2532
2532
|
}), ge([() => h.value], () => {
|
|
2533
|
-
|
|
2533
|
+
$();
|
|
2534
2534
|
});
|
|
2535
2535
|
function _(O) {
|
|
2536
2536
|
if (O === "create") {
|
|
@@ -2572,14 +2572,14 @@ const qo = { class: "flex flex-col flex-1" }, Uo = { class: "flex flex-col" }, N
|
|
|
2572
2572
|
label: w("inventory.common.export"),
|
|
2573
2573
|
value: "export"
|
|
2574
2574
|
}
|
|
2575
|
-
]),
|
|
2575
|
+
]), Q = N(() => {
|
|
2576
2576
|
const O = [
|
|
2577
2577
|
{
|
|
2578
2578
|
type: "string",
|
|
2579
2579
|
key: "status",
|
|
2580
2580
|
entity: "purchaseOrder",
|
|
2581
2581
|
values: Array.from(
|
|
2582
|
-
new Set(e.purchaseOrders.value.map((
|
|
2582
|
+
new Set(e.purchaseOrders.value.map((P) => P.status))
|
|
2583
2583
|
)
|
|
2584
2584
|
}
|
|
2585
2585
|
], U = [
|
|
@@ -2587,40 +2587,40 @@ const qo = { class: "flex flex-col flex-1" }, Uo = { class: "flex flex-col" }, N
|
|
|
2587
2587
|
type: "string",
|
|
2588
2588
|
key: "netsuiteTransactionNumber",
|
|
2589
2589
|
entity: "purchaseOrder",
|
|
2590
|
-
values: e.purchaseOrders.value.map((
|
|
2590
|
+
values: e.purchaseOrders.value.map((P) => {
|
|
2591
2591
|
var d, b;
|
|
2592
|
-
return (b = (d =
|
|
2593
|
-
}).filter((
|
|
2592
|
+
return (b = (d = P.netSuite) == null ? void 0 : d.additionalInfo) == null ? void 0 : b.transactionnumber;
|
|
2593
|
+
}).filter((P) => P != null)
|
|
2594
2594
|
},
|
|
2595
2595
|
{
|
|
2596
2596
|
type: "string",
|
|
2597
2597
|
key: "netsuiteOrderNo",
|
|
2598
2598
|
entity: "purchaseOrder",
|
|
2599
|
-
values: e.purchaseOrders.value.map((
|
|
2599
|
+
values: e.purchaseOrders.value.map((P) => {
|
|
2600
2600
|
var d;
|
|
2601
|
-
return (d =
|
|
2602
|
-
}).filter((
|
|
2601
|
+
return (d = P.netSuite) == null ? void 0 : d.refNo;
|
|
2602
|
+
}).filter((P) => P != null)
|
|
2603
2603
|
},
|
|
2604
2604
|
{
|
|
2605
2605
|
type: "string",
|
|
2606
2606
|
key: "netsuiteOrderId",
|
|
2607
2607
|
entity: "purchaseOrder",
|
|
2608
|
-
values: e.purchaseOrders.value.map((
|
|
2608
|
+
values: e.purchaseOrders.value.map((P) => {
|
|
2609
2609
|
var d;
|
|
2610
|
-
return (d =
|
|
2611
|
-
}).filter((
|
|
2610
|
+
return (d = P.netSuite) == null ? void 0 : d.id;
|
|
2611
|
+
}).filter((P) => P != null)
|
|
2612
2612
|
}
|
|
2613
2613
|
];
|
|
2614
2614
|
return [...O, ...f.isEnabled ? U : []];
|
|
2615
|
-
}),
|
|
2616
|
-
if (!
|
|
2615
|
+
}), Y = q(null), K = N(() => {
|
|
2616
|
+
if (!Y.value)
|
|
2617
2617
|
return e.purchaseOrders.value;
|
|
2618
|
-
const O = Gt.build(
|
|
2618
|
+
const O = Gt.build(Y.value);
|
|
2619
2619
|
return e.purchaseOrders.value.filter((U) => {
|
|
2620
|
-
var
|
|
2620
|
+
var P, d, b, R;
|
|
2621
2621
|
return Jt(
|
|
2622
2622
|
{
|
|
2623
|
-
netsuiteTransactionNumber: (d = (
|
|
2623
|
+
netsuiteTransactionNumber: (d = (P = U.netSuite) == null ? void 0 : P.additionalInfo) == null ? void 0 : d.transactionnumber,
|
|
2624
2624
|
netsuiteOrderNo: (b = U.netSuite) == null ? void 0 : b.refNo,
|
|
2625
2625
|
netsuiteOrderId: (R = U.netSuite) == null ? void 0 : R.id,
|
|
2626
2626
|
status: U.status
|
|
@@ -2630,7 +2630,7 @@ const qo = { class: "flex flex-col flex-1" }, Uo = { class: "flex flex-col" }, N
|
|
|
2630
2630
|
});
|
|
2631
2631
|
});
|
|
2632
2632
|
return (O, U) => {
|
|
2633
|
-
const
|
|
2633
|
+
const P = I("FmTable");
|
|
2634
2634
|
return S(), W(Wt, {
|
|
2635
2635
|
title: s(w)("inventory.transfer.receiveRequest.title2"),
|
|
2636
2636
|
actions: B.value,
|
|
@@ -2657,11 +2657,11 @@ const qo = { class: "flex flex-col flex-1" }, Uo = { class: "flex flex-col" }, N
|
|
|
2657
2657
|
search: h.value,
|
|
2658
2658
|
"onUpdate:search": U[1] || (U[1] = (R) => h.value = R),
|
|
2659
2659
|
filterable: "",
|
|
2660
|
-
"filter-attributes":
|
|
2661
|
-
filter:
|
|
2662
|
-
"onUpdate:filter": U[2] || (U[2] = (R) =>
|
|
2660
|
+
"filter-attributes": Q.value,
|
|
2661
|
+
filter: Y.value,
|
|
2662
|
+
"onUpdate:filter": U[2] || (U[2] = (R) => Y.value = R)
|
|
2663
2663
|
}, null, 8, ["date-range", "search", "filter-attributes", "filter"]),
|
|
2664
|
-
(S(), W(
|
|
2664
|
+
(S(), W(P, {
|
|
2665
2665
|
style: _t(s(D).tableHeight),
|
|
2666
2666
|
"column-defs": s(u),
|
|
2667
2667
|
"row-data": K.value,
|
|
@@ -2677,7 +2677,7 @@ const qo = { class: "flex flex-col flex-1" }, Uo = { class: "flex flex-col" }, N
|
|
|
2677
2677
|
onRowClick: s(e).promptShowTransferDetails
|
|
2678
2678
|
}, {
|
|
2679
2679
|
default: A((X) => {
|
|
2680
|
-
var Z, he, ke, ie, we, Ne, Be, ze, De, Le,
|
|
2680
|
+
var Z, he, ke, ie, we, Ne, Be, ze, De, Le, Ve, Pe, o, m, E, H, le, me, G, re;
|
|
2681
2681
|
return [
|
|
2682
2682
|
n("div", da, [
|
|
2683
2683
|
n("div", ca, [
|
|
@@ -2695,7 +2695,7 @@ const qo = { class: "flex flex-col flex-1" }, Uo = { class: "flex flex-col" }, N
|
|
|
2695
2695
|
n("div", pa, M(R.original.items.map((Fe) => `${Fe.name}`).join(", ")), 1),
|
|
2696
2696
|
R.original.ref ? (S(), T("div", fa, [
|
|
2697
2697
|
y(s(fe), {
|
|
2698
|
-
render: (o = (
|
|
2698
|
+
render: (o = (Pe = (Ve = X.ref) == null ? void 0 : Ve.column) == null ? void 0 : Pe.columnDef) == null ? void 0 : o.cell,
|
|
2699
2699
|
props: (E = (m = X.ref) == null ? void 0 : m.getContext) == null ? void 0 : E.call(m)
|
|
2700
2700
|
}, null, 8, ["render", "props"])
|
|
2701
2701
|
])) : j("", !0),
|
|
@@ -2727,7 +2727,7 @@ const qo = { class: "flex flex-col flex-1" }, Uo = { class: "flex flex-col" }, N
|
|
|
2727
2727
|
}, {
|
|
2728
2728
|
onSubmitted: s(e).fetchData
|
|
2729
2729
|
}), null, 16, ["scope", "onSubmitted"]),
|
|
2730
|
-
y(ua, Dt(
|
|
2730
|
+
y(ua, Dt(Vt(s(e).xilnexImportDialogProps.value)), null, 16)
|
|
2731
2731
|
]))
|
|
2732
2732
|
];
|
|
2733
2733
|
}),
|