@feedmepos/mf-inventory-portal 0.0.25-dev.34 → 0.0.25-dev.35
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-UuAeJz-J.js → App-DPw6U_NJ.js} +2 -2
- package/dist/{ApprovalView-C3Tf9t-a.js → ApprovalView-lHxxupqD.js} +2 -2
- package/dist/{BindingsDialog-C8isRlOa.js → BindingsDialog-BYXxxF3D.js} +2 -2
- package/dist/{BindingsPicker-C_cMIfVT.js → BindingsPicker-BiOmhG63.js} +1 -1
- package/dist/{BindingsTable-CDq57uxU.js → BindingsTable-C2CG0Wzx.js} +1 -1
- package/dist/{ClosingDraftView-Bsd8hYXp.js → ClosingDraftView-BO8Fg9uW.js} +2 -2
- package/dist/{ClosingTemplateView-CDa99R8M.js → ClosingTemplateView-DmBvstOM.js} +2 -2
- package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-H_D5GldQ.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-CJ7BgFh6.js} +3 -3
- package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-DX0IjY_r.js → FmUnitInput.vue_vue_type_script_setup_true_lang-CQB9QYnf.js} +1 -1
- package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-D5RRS5YO.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-DditohRx.js} +1 -1
- package/dist/{IngredientGroupView-CI7lhD1x.js → IngredientGroupView-D5SpwtqP.js} +1 -1
- package/dist/{IngredientsView-BvFjkjKC.js → IngredientsView-Dgw0nCeT.js} +4 -4
- package/dist/{IntegrationView-f5B5BOng.js → IntegrationView-BPkBh8lR.js} +1 -1
- package/dist/{InventoryBindingForm-bhwxMwG6.js → InventoryBindingForm-COpLVAaA.js} +1 -1
- package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-BtELlrTt.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-BkyQOb8e.js} +3 -3
- package/dist/{InventoryBindingSummary-DxJR3GM_.js → InventoryBindingSummary-D6lmFeFs.js} +1 -1
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-Bkd1xEMr.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-BKzL_obr.js} +1 -1
- package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-B2rVQdd4.js → PremiumBadge.vue_vue_type_script_setup_true_lang-CRrDyI6N.js} +1 -1
- package/dist/{PublishView-dF55eriA.js → PublishView-DRLVREhD.js} +2 -2
- package/dist/{PurchaseOrderPrintPreview-ClCvdVR1.js → PurchaseOrderPrintPreview-DvaJAeNk.js} +1 -1
- package/dist/{ReceiveRequestView-ssYz4yxC.js → ReceiveRequestView-C9Hqtit6.js} +218 -213
- package/dist/{RecipeView-BG72kP5B.js → RecipeView-BFVpv5zA.js} +3 -3
- package/dist/{StockView-Dy60VEC8.js → StockView-BOzx7POz.js} +7 -7
- package/dist/{SupplierView-CVOAuBH1.js → SupplierView-DA3-b1sK.js} +4 -4
- package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-v_KuEHzq.js → TransferDetails.vue_vue_type_script_setup_true_lang-DRUroMZS.js} +4 -4
- package/dist/{TransferTemplateView-BerfCjbr.js → TransferTemplateView-V4C_flzB.js} +7 -7
- package/dist/{UnitView-boGM6pEJ.js → UnitView-CfQSRLN9.js} +3 -3
- package/dist/{WarehouseView-C_zr2FAh.js → WarehouseView-B5mEXts4.js} +1 -1
- package/dist/{app-D3JuCwp2.js → app-tDCjbNqA.js} +80 -80
- package/dist/app.js +1 -1
- package/dist/{decimal-B2tTbQiV.js → decimal-BXNZd-qR.js} +1 -1
- package/dist/{feature-BfS9zDbA.js → feature-RoIIaF13.js} +1 -1
- package/dist/{format-unit-display-Bl12c6dX.js → format-unit-display-B2P_1U8-.js} +2 -2
- package/dist/{index-RJV-OFft.js → index-0DbWAreR.js} +2 -2
- package/dist/{stock-DDeBGKvV.js → stock-BkYwqicV.js} +1 -1
- package/dist/{supplier-BbUrG9y7.js → supplier-2qlZME6l.js} +1 -1
- package/dist/{use-ingredient-select-dialog-CYzc3y0A.js → use-ingredient-select-dialog-D9bLhIPr.js} +1 -1
- package/dist/{use-inventory-binding-dialog-ck5hv0z7.js → use-inventory-binding-dialog-FprlSH51.js} +1 -1
- package/dist/{vue-i18n-COBqHhki.js → vue-i18n-C2CwX0tc.js} +314 -314
- package/package.json +3 -3
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import { defineComponent as se, onMounted as ze, onUnmounted as It, renderSlot as $t, h as H, reactive as bt, computed as M, openBlock as C, createElementBlock as $, Fragment as le, renderList as Se, createElementVNode as n, toDisplayString as R, unref as o, resolveComponent as I, createVNode as
|
|
2
|
-
import { H as Ze, b as He, Z as ve, l as Ee, i as Ce, a0 as Ge, K as At, as as Mt, A as Le, M as Ut, m as _t, ab as We, E as me, at as qt, a as Je, au as Ot, av as Nt, aw as Bt, G as ht, u as je, ax as Lt, ay as zt, $ as Ht, T as jt, az as Yt, B as kt, O as Qt, d as Re, v as Kt, w as Xt, x as Zt, aA as Be, a5 as ct, y as Gt, _ as Wt, z as Jt, N as pt } from "./app-
|
|
3
|
-
import { u as et, a as eo, P as Ke, b as to, _ as oo, g as so } from "./TransferDetails.vue_vue_type_script_setup_true_lang-
|
|
4
|
-
import { _ as xt, u as ao, i as no, e as lo } from "./PremiumBadge.vue_vue_type_script_setup_true_lang-
|
|
1
|
+
import { defineComponent as se, onMounted as ze, onUnmounted as It, renderSlot as $t, h as H, reactive as bt, computed as M, openBlock as C, createElementBlock as $, Fragment as le, renderList as Se, createElementVNode as n, toDisplayString as R, unref as o, resolveComponent as I, createVNode as p, withCtx as T, createCommentVNode as L, ref as E, createBlock as Y, watch as ge, normalizeClass as Q, normalizeStyle as gt, createTextVNode as De, nextTick as Tt, mergeProps as Xe, isRef as xe, createSlots as Pt, Teleport as Rt, normalizeProps as Vt, guardReactiveProps as Et } from "vue";
|
|
2
|
+
import { H as Ze, b as He, Z as ve, l as Ee, i as Ce, a0 as Ge, K as At, as as Mt, A as Le, M as Ut, m as _t, ab as We, E as me, at as qt, a as Je, au as Ot, av as Nt, aw as Bt, G as ht, u as je, ax as Lt, ay as zt, $ as Ht, T as jt, az as Yt, B as kt, O as Qt, d as Re, v as Kt, w as Xt, x as Zt, aA as Be, a5 as ct, y as Gt, _ as Wt, z as Jt, N as pt } from "./app-tDCjbNqA.js";
|
|
3
|
+
import { u as et, a as eo, P as Ke, b as to, _ as oo, g as so } from "./TransferDetails.vue_vue_type_script_setup_true_lang-DRUroMZS.js";
|
|
4
|
+
import { _ as xt, u as ao, i as no, e as lo } from "./PremiumBadge.vue_vue_type_script_setup_true_lang-CRrDyI6N.js";
|
|
5
5
|
import { u as ro } from "./useTabStorage-BkIVScW_.js";
|
|
6
6
|
import { useDialog as Ct, useBreakpoints as tt, components as fe, FmButtonVariant as io, useSnackbar as Ie, useProxiedModel as St } from "@feedmepos/ui-library";
|
|
7
|
-
import { P as oe, u as wt } from "./format-unit-display-
|
|
8
|
-
import { _ as uo, F as mo, a as co, b as po } from "./FmUnitInput.vue_vue_type_script_setup_true_lang-
|
|
9
|
-
import { u as ot } from "./feature-
|
|
10
|
-
import { c as Ve, u as fo, _ as vo, l as yo } from "./FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-
|
|
7
|
+
import { P as oe, u as wt } from "./format-unit-display-B2P_1U8-.js";
|
|
8
|
+
import { _ as uo, F as mo, a as co, b as po } from "./FmUnitInput.vue_vue_type_script_setup_true_lang-CQB9QYnf.js";
|
|
9
|
+
import { u as ot } from "./feature-RoIIaF13.js";
|
|
10
|
+
import { c as Ve, u as fo, _ as vo, l as yo } from "./FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-CJ7BgFh6.js";
|
|
11
11
|
import { useI18n as ce } from "@feedmepos/mf-common";
|
|
12
12
|
import { defineStore as bo } from "pinia";
|
|
13
|
-
import { u as st } from "./supplier-
|
|
13
|
+
import { u as st } from "./supplier-2qlZME6l.js";
|
|
14
14
|
import { _ as go } from "./PreviewBadge.vue_vue_type_script_setup_true_lang-CRZiQHjx.js";
|
|
15
|
-
import { u as _o } from "./vue-i18n-
|
|
15
|
+
import { u as _o } from "./vue-i18n-C2CwX0tc.js";
|
|
16
16
|
import "./array-hChJVZLE.js";
|
|
17
17
|
const ho = /* @__PURE__ */ se({
|
|
18
18
|
__name: "MountListener",
|
|
19
19
|
emits: ["mounted", "unmounted"],
|
|
20
|
-
setup(
|
|
20
|
+
setup(f, { emit: y }) {
|
|
21
21
|
const r = y;
|
|
22
22
|
return ze(() => r("mounted")), It(() => r("unmounted")), (l, h) => $t(l.$slots, "default");
|
|
23
23
|
}
|
|
24
24
|
}), Ft = bo("inventoryMultiSelectDialog", () => {
|
|
25
|
-
const
|
|
25
|
+
const f = Ct(), { t: y } = ce();
|
|
26
26
|
return { multiSelect: async (e, u, d) => {
|
|
27
27
|
const b = d ?? ((a) => a), { promise: i, resolve: t } = Promise.withResolvers();
|
|
28
|
-
return
|
|
28
|
+
return f.open({
|
|
29
29
|
title: "Select items",
|
|
30
30
|
closeButton: !0,
|
|
31
31
|
contentComponent: Ze,
|
|
@@ -50,7 +50,7 @@ const ho = /* @__PURE__ */ se({
|
|
|
50
50
|
}), i;
|
|
51
51
|
}, singleSelect: async (e, u, d) => {
|
|
52
52
|
const b = d ?? ((a) => a), { promise: i, resolve: t } = Promise.withResolvers();
|
|
53
|
-
return
|
|
53
|
+
return f.open({
|
|
54
54
|
title: "Select items",
|
|
55
55
|
closeButton: !0,
|
|
56
56
|
contentComponent: Ze,
|
|
@@ -78,7 +78,7 @@ const ho = /* @__PURE__ */ se({
|
|
|
78
78
|
}), i;
|
|
79
79
|
}, confirmation: async (e, u, d, b, i) => {
|
|
80
80
|
const { promise: t, resolve: a } = Promise.withResolvers();
|
|
81
|
-
return
|
|
81
|
+
return f.open({
|
|
82
82
|
title: e,
|
|
83
83
|
message: typeof u == "string" ? u : void 0,
|
|
84
84
|
contentComponent: H(
|
|
@@ -112,7 +112,7 @@ const ho = /* @__PURE__ */ se({
|
|
|
112
112
|
}), t;
|
|
113
113
|
} };
|
|
114
114
|
});
|
|
115
|
-
var G = /* @__PURE__ */ ((
|
|
115
|
+
var G = /* @__PURE__ */ ((f) => (f.Code = "Code", f.Name = "Name", f.TemplateName = "TemplateName", f.Amount = "Amount", f.Cost = "Cost", f.Delete = "Delete", f))(G || {});
|
|
116
116
|
const ko = () => (ce(), H(
|
|
117
117
|
xt,
|
|
118
118
|
{
|
|
@@ -121,21 +121,21 @@ const ko = () => (ce(), H(
|
|
|
121
121
|
},
|
|
122
122
|
`Total (${_t()})`
|
|
123
123
|
));
|
|
124
|
-
function xo(
|
|
124
|
+
function xo(f) {
|
|
125
125
|
const { t: y } = ce(), r = bt({}), { breakpoints: l } = tt(), h = ot(), e = He();
|
|
126
126
|
Ft(), ze(() => {
|
|
127
|
-
for (const i of
|
|
127
|
+
for (const i of f.items) {
|
|
128
128
|
if (!i.totalCost)
|
|
129
129
|
continue;
|
|
130
130
|
const t = Ve(i.sku, i.quantity, i.measurement, {
|
|
131
|
-
supplier:
|
|
131
|
+
supplier: f.supplier
|
|
132
132
|
}), a = i.totalCost ?? ve.reset();
|
|
133
133
|
t ? r[i.sku._id] = t.amount !== a.amount || t.precision !== a.precision : r[i.sku._id] = !0;
|
|
134
134
|
}
|
|
135
135
|
});
|
|
136
136
|
function u(i) {
|
|
137
|
-
var a, k, m, g, w, F,
|
|
138
|
-
return !!(((k = (a = i.defaultCost) == null ? void 0 : a.costPerUnit) == null ? void 0 : k.amount) ?? ((
|
|
137
|
+
var a, k, m, g, w, F, c;
|
|
138
|
+
return !!(((k = (a = i.defaultCost) == null ? void 0 : a.costPerUnit) == null ? void 0 : k.amount) ?? ((c = (F = (w = (g = (m = f.supplier) == null ? void 0 : m.supplyItems) == null ? void 0 : g.find((v) => v.skuId === i._id)) == null ? void 0 : w.defaultCost) == null ? void 0 : F.costPerUnit) == null ? void 0 : c.amount));
|
|
139
139
|
}
|
|
140
140
|
const d = [
|
|
141
141
|
{
|
|
@@ -163,7 +163,7 @@ function xo(p) {
|
|
|
163
163
|
) : H(fe.FmTextField, {
|
|
164
164
|
modelValue: t.code,
|
|
165
165
|
"onUpdate:modelValue": (a) => {
|
|
166
|
-
|
|
166
|
+
f.updateItem({
|
|
167
167
|
...t,
|
|
168
168
|
code: a
|
|
169
169
|
});
|
|
@@ -199,7 +199,7 @@ function xo(p) {
|
|
|
199
199
|
) : H(fe.FmTextField, {
|
|
200
200
|
modelValue: t.name,
|
|
201
201
|
"onUpdate:modelValue": (a) => {
|
|
202
|
-
|
|
202
|
+
f.updateItem({
|
|
203
203
|
...t,
|
|
204
204
|
name: a
|
|
205
205
|
});
|
|
@@ -251,7 +251,7 @@ function xo(p) {
|
|
|
251
251
|
minSize: 200,
|
|
252
252
|
cell(i) {
|
|
253
253
|
var k, m, g, w;
|
|
254
|
-
const t = i.row.original, a = (g = (m = (k =
|
|
254
|
+
const t = i.row.original, a = (g = (m = (k = f.template) == null ? void 0 : k.purchaseOrder) == null ? void 0 : m.items) == null ? void 0 : g.find(
|
|
255
255
|
(F) => F.sku._id === t.sku._id
|
|
256
256
|
);
|
|
257
257
|
return H(uo, {
|
|
@@ -266,21 +266,26 @@ function xo(p) {
|
|
|
266
266
|
unit: t.sku.unit,
|
|
267
267
|
"onUpdate:modelValue": (F) => {
|
|
268
268
|
if (!F) return;
|
|
269
|
-
const
|
|
269
|
+
const c = {
|
|
270
270
|
...t,
|
|
271
271
|
quantity: F.amount,
|
|
272
272
|
measurement: F.measurement
|
|
273
273
|
};
|
|
274
|
-
h.enableTotalCost && (
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
274
|
+
h.enableTotalCost && (c.totalCost = Ve(
|
|
275
|
+
c.sku,
|
|
276
|
+
c.quantity,
|
|
277
|
+
c.measurement,
|
|
278
|
+
{
|
|
279
|
+
supplier: f.supplier,
|
|
280
|
+
// NOTE: set undefined here if `manualTotalCost[updatedRow.sku._id] = false`, so that the function
|
|
281
|
+
// will return the auto calculated default cost instead of the manual total cost
|
|
282
|
+
manualTotalCost: r[c.sku._id] ? c.totalCost : void 0
|
|
283
|
+
}
|
|
284
|
+
)), f.updateItem(c);
|
|
280
285
|
},
|
|
281
286
|
stepper: a == null ? void 0 : a.quantityStep,
|
|
282
287
|
disableUnit: !!a,
|
|
283
|
-
disabled:
|
|
288
|
+
disabled: f.disabled,
|
|
284
289
|
rules: [
|
|
285
290
|
mo(
|
|
286
291
|
+Ce(
|
|
@@ -305,12 +310,12 @@ function xo(p) {
|
|
|
305
310
|
const t = i.row.original, a = u(t.sku), k = l.value.xs || l.value.sm;
|
|
306
311
|
if (!r[t.sku._id] && a) {
|
|
307
312
|
const m = Ve(t.sku, t.quantity, t.measurement, {
|
|
308
|
-
supplier:
|
|
313
|
+
supplier: f.supplier
|
|
309
314
|
});
|
|
310
315
|
return t.totalCost && !ve.equals({
|
|
311
316
|
a: ve.fromDinero(m),
|
|
312
317
|
b: ve.fromDinero(t.totalCost)
|
|
313
|
-
}) &&
|
|
318
|
+
}) && f.updateItem({
|
|
314
319
|
...t,
|
|
315
320
|
totalCost: m
|
|
316
321
|
}), H(
|
|
@@ -318,7 +323,7 @@ function xo(p) {
|
|
|
318
323
|
{
|
|
319
324
|
class: [
|
|
320
325
|
"flex gap-4 fm-typo-en-body-md-400 items-center",
|
|
321
|
-
|
|
326
|
+
f.disabled ? "text-fm-color-typo-disabled" : ""
|
|
322
327
|
],
|
|
323
328
|
key: t.sku._id
|
|
324
329
|
},
|
|
@@ -326,9 +331,9 @@ function xo(p) {
|
|
|
326
331
|
H(fe.FmButton, {
|
|
327
332
|
prependIcon: "edit",
|
|
328
333
|
variant: io.Tertiary,
|
|
329
|
-
disabled:
|
|
334
|
+
disabled: f.disabled,
|
|
330
335
|
onClick() {
|
|
331
|
-
|
|
336
|
+
f.updateItem({
|
|
332
337
|
...t,
|
|
333
338
|
totalCost: m
|
|
334
339
|
}), r[t.sku._id] = !0;
|
|
@@ -349,7 +354,7 @@ function xo(p) {
|
|
|
349
354
|
{
|
|
350
355
|
class: [
|
|
351
356
|
"fm-typo-en-body-sm-400",
|
|
352
|
-
|
|
357
|
+
f.disabled ? "text-fm-color-typo-disabled" : "text-fm-color-neutral-gray-400"
|
|
353
358
|
]
|
|
354
359
|
},
|
|
355
360
|
y("inventory.transfer.form.items.autoCalculated")
|
|
@@ -365,7 +370,7 @@ function xo(p) {
|
|
|
365
370
|
modelValue: Ce(t.totalCost ?? { amount: 0, precision: 0 }),
|
|
366
371
|
key: t.sku._id,
|
|
367
372
|
"onUpdate:modelValue": (m) => {
|
|
368
|
-
|
|
373
|
+
f.updateItem({
|
|
369
374
|
...t,
|
|
370
375
|
totalCost: {
|
|
371
376
|
...At(+m),
|
|
@@ -382,7 +387,7 @@ function xo(p) {
|
|
|
382
387
|
{
|
|
383
388
|
class: [
|
|
384
389
|
"text-fm-typo-en-body-lg-400",
|
|
385
|
-
|
|
390
|
+
f.disabled ? "text-fm-color-typo-disabled" : "text-fm-color-typo-primary"
|
|
386
391
|
]
|
|
387
392
|
},
|
|
388
393
|
_t()
|
|
@@ -392,14 +397,14 @@ function xo(p) {
|
|
|
392
397
|
return a ? H(fe.FmButton, {
|
|
393
398
|
prependIcon: "close",
|
|
394
399
|
variant: "tertiary",
|
|
395
|
-
disabled:
|
|
400
|
+
disabled: f.disabled,
|
|
396
401
|
onClick() {
|
|
397
|
-
|
|
402
|
+
f.updateItem({
|
|
398
403
|
...t,
|
|
399
404
|
// NOTE: different from PO template, if a default cost is reenabled,
|
|
400
405
|
// the total cost will automatically assigned
|
|
401
406
|
totalCost: Ve(t.sku, t.quantity, t.measurement, {
|
|
402
|
-
supplier:
|
|
407
|
+
supplier: f.supplier
|
|
403
408
|
})
|
|
404
409
|
}), r[t.sku._id] = !1;
|
|
405
410
|
}
|
|
@@ -423,9 +428,9 @@ function xo(p) {
|
|
|
423
428
|
icon: "delete",
|
|
424
429
|
variant: "tertiary",
|
|
425
430
|
size: "md",
|
|
426
|
-
disabled:
|
|
431
|
+
disabled: f.disabled,
|
|
427
432
|
onClick: () => {
|
|
428
|
-
|
|
433
|
+
f.deleteItem(t);
|
|
429
434
|
}
|
|
430
435
|
})
|
|
431
436
|
]);
|
|
@@ -439,7 +444,7 @@ function xo(p) {
|
|
|
439
444
|
}
|
|
440
445
|
];
|
|
441
446
|
return {
|
|
442
|
-
columnDefs: M(() => h.enableTotalCost &&
|
|
447
|
+
columnDefs: M(() => h.enableTotalCost && f.transferType === oe.PURCHASE ? d : d.filter(
|
|
443
448
|
(i) => i.id !== "Cost"
|
|
444
449
|
/* Cost */
|
|
445
450
|
))
|
|
@@ -450,7 +455,7 @@ const Co = { class: "flex flex-col gap-8 px-16 xs:px-4 sm:px-4 py-4 items-center
|
|
|
450
455
|
props: {
|
|
451
456
|
prices: {}
|
|
452
457
|
},
|
|
453
|
-
setup(
|
|
458
|
+
setup(f) {
|
|
454
459
|
const y = st();
|
|
455
460
|
function r(l) {
|
|
456
461
|
return y.suppliers.find((h) => h._id === l);
|
|
@@ -499,10 +504,10 @@ const Co = { class: "flex flex-col gap-8 px-16 xs:px-4 sm:px-4 py-4 items-center
|
|
|
499
504
|
showComparePrice: { type: Boolean },
|
|
500
505
|
row: {}
|
|
501
506
|
},
|
|
502
|
-
setup(
|
|
507
|
+
setup(f) {
|
|
503
508
|
const { t: y } = ce();
|
|
504
509
|
return (r, l) => {
|
|
505
|
-
var u, d, b, i, t, a, k, m, g, w, F,
|
|
510
|
+
var u, d, b, i, t, a, k, m, g, w, F, c, v, U, j, V, P, K, O, A, B, q, X, x, S, Z, ue;
|
|
506
511
|
const h = I("FmLabel"), e = I("FmSpacer");
|
|
507
512
|
return C(), $("div", Io, [
|
|
508
513
|
n("div", $o, [
|
|
@@ -511,7 +516,7 @@ const Co = { class: "flex flex-col gap-8 px-16 xs:px-4 sm:px-4 py-4 items-center
|
|
|
511
516
|
n("span", Ro, R(r.row.original.sku.name), 1)
|
|
512
517
|
]),
|
|
513
518
|
n("div", null, [
|
|
514
|
-
|
|
519
|
+
p(o(me), {
|
|
515
520
|
render: (b = (d = (u = r.cellByColId.Delete) == null ? void 0 : u.column) == null ? void 0 : d.columnDef) == null ? void 0 : b.cell,
|
|
516
521
|
props: (t = (i = r.cellByColId.Delete) == null ? void 0 : i.getContext) == null ? void 0 : t.call(i)
|
|
517
522
|
}, null, 8, ["render", "props"])
|
|
@@ -519,21 +524,21 @@ const Co = { class: "flex flex-col gap-8 px-16 xs:px-4 sm:px-4 py-4 items-center
|
|
|
519
524
|
]),
|
|
520
525
|
n("div", Vo, [
|
|
521
526
|
n("div", Eo, [
|
|
522
|
-
|
|
527
|
+
p(h, {
|
|
523
528
|
label: o(y)(`inventory.transfer.form.items.table.${o(G).Code}`)
|
|
524
529
|
}, null, 8, ["label"]),
|
|
525
|
-
|
|
530
|
+
p(o(me), {
|
|
526
531
|
render: (m = (k = (a = r.cellByColId[o(G).Code]) == null ? void 0 : a.column) == null ? void 0 : k.columnDef) == null ? void 0 : m.cell,
|
|
527
532
|
props: (w = (g = r.cellByColId[o(G).Code]) == null ? void 0 : g.getContext) == null ? void 0 : w.call(g)
|
|
528
533
|
}, null, 8, ["render", "props"]),
|
|
529
534
|
l[0] || (l[0] = n("div", { class: "fm-typo-en-body-md-600 text-fm-color-primary" }, null, -1))
|
|
530
535
|
]),
|
|
531
536
|
n("div", Ao, [
|
|
532
|
-
|
|
537
|
+
p(h, {
|
|
533
538
|
label: o(y)(`inventory.transfer.form.items.table.${o(G).Name}`)
|
|
534
539
|
}, null, 8, ["label"]),
|
|
535
|
-
|
|
536
|
-
render: (v = (
|
|
540
|
+
p(o(me), {
|
|
541
|
+
render: (v = (c = (F = r.cellByColId[o(G).Name]) == null ? void 0 : F.column) == null ? void 0 : c.columnDef) == null ? void 0 : v.cell,
|
|
537
542
|
props: (j = (U = r.cellByColId[o(G).Name]) == null ? void 0 : U.getContext) == null ? void 0 : j.call(U)
|
|
538
543
|
}, null, 8, ["render", "props"]),
|
|
539
544
|
l[1] || (l[1] = n("div", { class: "fm-typo-en-body-md-600 text-fm-color-primary" }, null, -1))
|
|
@@ -541,25 +546,25 @@ const Co = { class: "flex flex-col gap-8 px-16 xs:px-4 sm:px-4 py-4 items-center
|
|
|
541
546
|
]),
|
|
542
547
|
n("div", Mo, [
|
|
543
548
|
n("div", Uo, [
|
|
544
|
-
|
|
549
|
+
p(h, {
|
|
545
550
|
label: o(y)(`inventory.transfer.form.items.table.${o(G).Amount}`)
|
|
546
551
|
}, null, 8, ["label"]),
|
|
547
|
-
|
|
552
|
+
p(o(me), {
|
|
548
553
|
render: (K = (P = (V = r.cellByColId[o(G).Amount]) == null ? void 0 : V.column) == null ? void 0 : P.columnDef) == null ? void 0 : K.cell,
|
|
549
554
|
props: (A = (O = r.cellByColId[o(G).Amount]) == null ? void 0 : O.getContext) == null ? void 0 : A.call(O)
|
|
550
555
|
}, null, 8, ["render", "props"]),
|
|
551
556
|
l[2] || (l[2] = n("div", { class: "fm-typo-en-body-md-600 text-fm-color-primary" }, null, -1))
|
|
552
557
|
]),
|
|
553
558
|
r.cellByColId[o(G).Cost] ? (C(), $("div", qo, [
|
|
554
|
-
|
|
559
|
+
p(xt, { "z-index": 50 }, {
|
|
555
560
|
default: T(() => [
|
|
556
|
-
|
|
561
|
+
p(h, {
|
|
557
562
|
label: o(y)(`inventory.transfer.form.items.table.${o(G).Cost}2`)
|
|
558
563
|
}, null, 8, ["label"])
|
|
559
564
|
]),
|
|
560
565
|
_: 1
|
|
561
566
|
}),
|
|
562
|
-
|
|
567
|
+
p(o(me), {
|
|
563
568
|
render: (X = (q = (B = r.cellByColId[o(G).Cost]) == null ? void 0 : B.column) == null ? void 0 : q.columnDef) == null ? void 0 : X.cell,
|
|
564
569
|
props: (S = (x = r.cellByColId[o(G).Cost]) == null ? void 0 : x.getContext) == null ? void 0 : S.call(x)
|
|
565
570
|
}, null, 8, ["render", "props"]),
|
|
@@ -567,8 +572,8 @@ const Co = { class: "flex flex-col gap-8 px-16 xs:px-4 sm:px-4 py-4 items-center
|
|
|
567
572
|
])) : L("", !0)
|
|
568
573
|
]),
|
|
569
574
|
r.showComparePrice && Object.keys(r.comparePriceBySku[(Z = r.row.original.sku) == null ? void 0 : Z._id] ?? {}).length > 0 ? (C(), $(le, { key: 0 }, [
|
|
570
|
-
|
|
571
|
-
|
|
575
|
+
p(e, { class: "h-8" }),
|
|
576
|
+
p(Dt, {
|
|
572
577
|
prices: r.comparePriceBySku[(ue = r.row.original.sku) == null ? void 0 : ue._id]
|
|
573
578
|
}, null, 8, ["prices"])
|
|
574
579
|
], 64)) : L("", !0)
|
|
@@ -576,14 +581,14 @@ const Co = { class: "flex flex-col gap-8 px-16 xs:px-4 sm:px-4 py-4 items-center
|
|
|
576
581
|
};
|
|
577
582
|
}
|
|
578
583
|
});
|
|
579
|
-
function No(
|
|
584
|
+
function No(f) {
|
|
580
585
|
const y = M({
|
|
581
586
|
get() {
|
|
582
|
-
const e =
|
|
587
|
+
const e = f.getEffectiveAt();
|
|
583
588
|
return e ? new Date(e) : null;
|
|
584
589
|
},
|
|
585
590
|
set(e) {
|
|
586
|
-
|
|
591
|
+
f.setEffectiveAt((e == null ? void 0 : e.toISOString()) ?? null);
|
|
587
592
|
}
|
|
588
593
|
}), r = M({
|
|
589
594
|
get() {
|
|
@@ -632,26 +637,26 @@ const Bo = {
|
|
|
632
637
|
default: "#c7c7cc"
|
|
633
638
|
}
|
|
634
639
|
},
|
|
635
|
-
setup(
|
|
640
|
+
setup(f) {
|
|
636
641
|
return (y, r) => (C(), $("svg", Bo, [
|
|
637
642
|
n("path", {
|
|
638
643
|
d: "M7.6 7.6C8.17076 6.94229 8.5 5.5 8.5 5.5C8.5 5.5 8.81356 6.87361 9.35714 7.5C9.92948 8.15953 11.5 8.5 11.5 8.5C11.5 8.5 9.92948 8.69761 9.35714 9.35714C8.81356 9.98354 8.5 11.5 8.5 11.5C8.5 11.5 8.32076 10.1888 7.75 9.59091C7.14905 8.96136 5.5 8.5 5.5 8.5C5.5 8.5 6.99905 8.29251 7.6 7.6Z",
|
|
639
|
-
fill:
|
|
644
|
+
fill: f.color
|
|
640
645
|
}, null, 8, Lo),
|
|
641
646
|
n("path", {
|
|
642
647
|
d: "M12.2 12.2C13.3415 10.8846 14 8 14 8C14 8 14.6271 10.7472 15.7143 12C16.859 13.3191 20 14 20 14C20 14 16.859 14.3952 15.7143 15.7143C14.6271 16.9671 14 20 14 20C14 20 13.6415 17.3777 12.5 16.1818C11.2981 14.9227 8 14 8 14C8 14 10.9981 13.585 12.2 12.2Z",
|
|
643
|
-
fill:
|
|
648
|
+
fill: f.color
|
|
644
649
|
}, null, 8, zo),
|
|
645
650
|
n("path", {
|
|
646
651
|
d: "M7.6 7.6C8.17076 6.94229 8.5 5.5 8.5 5.5C8.5 5.5 8.81356 6.87361 9.35714 7.5C9.92948 8.15953 11.5 8.5 11.5 8.5C11.5 8.5 9.92948 8.69761 9.35714 9.35714C8.81356 9.98354 8.5 11.5 8.5 11.5C8.5 11.5 8.32076 10.1888 7.75 9.59091C7.14905 8.96136 5.5 8.5 5.5 8.5C5.5 8.5 6.99905 8.29251 7.6 7.6Z",
|
|
647
|
-
stroke:
|
|
652
|
+
stroke: f.color,
|
|
648
653
|
"stroke-width": "1.5",
|
|
649
654
|
"stroke-linecap": "round",
|
|
650
655
|
"stroke-linejoin": "round"
|
|
651
656
|
}, null, 8, Ho),
|
|
652
657
|
n("path", {
|
|
653
658
|
d: "M12.2 12.2C13.3415 10.8846 14 8 14 8C14 8 14.6271 10.7472 15.7143 12C16.859 13.3191 20 14 20 14C20 14 16.859 14.3952 15.7143 15.7143C14.6271 16.9671 14 20 14 20C14 20 13.6415 17.3777 12.5 16.1818C11.2981 14.9227 8 14 8 14C8 14 10.9981 13.585 12.2 12.2Z",
|
|
654
|
-
stroke:
|
|
659
|
+
stroke: f.color,
|
|
655
660
|
"stroke-width": "1.5",
|
|
656
661
|
"stroke-linecap": "round",
|
|
657
662
|
"stroke-linejoin": "round"
|
|
@@ -664,7 +669,7 @@ const Bo = {
|
|
|
664
669
|
disabled: { type: Boolean }
|
|
665
670
|
},
|
|
666
671
|
emits: ["update:poItems"],
|
|
667
|
-
setup(
|
|
672
|
+
setup(f, { emit: y }) {
|
|
668
673
|
const r = y, l = E(!1), h = E(7), e = ao(), u = Ie(), d = Je(), { t: b } = ce();
|
|
669
674
|
async function i() {
|
|
670
675
|
if (h.value < 1)
|
|
@@ -679,8 +684,8 @@ const Bo = {
|
|
|
679
684
|
return;
|
|
680
685
|
}
|
|
681
686
|
const a = e.purchaseOrderForecast.skus.reduce((k, m) => {
|
|
682
|
-
const g = d.skus.find((
|
|
683
|
-
if (k.find((
|
|
687
|
+
const g = d.skus.find((c) => c._id === m.id);
|
|
688
|
+
if (k.find((c) => c.sku._id === m.id) || !g)
|
|
684
689
|
return k;
|
|
685
690
|
const F = {
|
|
686
691
|
sku: g,
|
|
@@ -704,7 +709,7 @@ const Bo = {
|
|
|
704
709
|
onPopoverChanged: a[3] || (a[3] = (F) => l.value = F)
|
|
705
710
|
}, {
|
|
706
711
|
"popover-button": T(() => [
|
|
707
|
-
|
|
712
|
+
p(k, {
|
|
708
713
|
label: "unused",
|
|
709
714
|
variant: "secondary",
|
|
710
715
|
"text-color": t.disabled ? "disabled" : "primary",
|
|
@@ -714,7 +719,7 @@ const Bo = {
|
|
|
714
719
|
}, {
|
|
715
720
|
default: T(() => [
|
|
716
721
|
n("div", Qo, [
|
|
717
|
-
|
|
722
|
+
p(Yo, {
|
|
718
723
|
size: 24,
|
|
719
724
|
color: t.disabled ? "#c7c7cc" : "#ff7823"
|
|
720
725
|
}, null, 8, ["color"]),
|
|
@@ -728,21 +733,21 @@ const Bo = {
|
|
|
728
733
|
n("div", Xo, [
|
|
729
734
|
n("div", Zo, [
|
|
730
735
|
n("div", Go, [
|
|
731
|
-
|
|
736
|
+
p(go, { "z-index": 99 }, {
|
|
732
737
|
default: T(() => [
|
|
733
738
|
n("p", Wo, R(o(b)("inventory.transfer.form.items.forecastStock.title")), 1)
|
|
734
739
|
]),
|
|
735
740
|
_: 1
|
|
736
741
|
})
|
|
737
742
|
]),
|
|
738
|
-
|
|
743
|
+
p(k, {
|
|
739
744
|
icon: "close",
|
|
740
745
|
size: "md",
|
|
741
746
|
variant: "tertiary",
|
|
742
747
|
onClick: a[0] || (a[0] = (F) => l.value = !1)
|
|
743
748
|
})
|
|
744
749
|
]),
|
|
745
|
-
|
|
750
|
+
p(g, {
|
|
746
751
|
modelValue: h.value,
|
|
747
752
|
"onUpdate:modelValue": a[1] || (a[1] = (F) => h.value = F),
|
|
748
753
|
label: o(b)("inventory.transfer.form.items.forecastStock.days"),
|
|
@@ -750,7 +755,7 @@ const Bo = {
|
|
|
750
755
|
}, {
|
|
751
756
|
"helper-text": T(() => [
|
|
752
757
|
n("div", Jo, [
|
|
753
|
-
|
|
758
|
+
p(m, {
|
|
754
759
|
name: "warning",
|
|
755
760
|
size: "sm",
|
|
756
761
|
class: "text-fm-color-system-warning-300"
|
|
@@ -762,12 +767,12 @@ const Bo = {
|
|
|
762
767
|
}, 8, ["modelValue", "label", "rules"]),
|
|
763
768
|
n("div", ts, [
|
|
764
769
|
a[4] || (a[4] = n("div", { class: "grow" }, null, -1)),
|
|
765
|
-
|
|
770
|
+
p(k, {
|
|
766
771
|
label: o(b)("common.cancel"),
|
|
767
772
|
variant: "tertiary",
|
|
768
773
|
onClick: a[2] || (a[2] = (F) => l.value = !1)
|
|
769
774
|
}, null, 8, ["label"]),
|
|
770
|
-
|
|
775
|
+
p(k, {
|
|
771
776
|
label: o(b)("inventory.transfer.form.items.forecastStock.generate"),
|
|
772
777
|
onClick: i
|
|
773
778
|
}, null, 8, ["label"])
|
|
@@ -780,7 +785,7 @@ const Bo = {
|
|
|
780
785
|
}
|
|
781
786
|
});
|
|
782
787
|
function os() {
|
|
783
|
-
const
|
|
788
|
+
const f = Ie(), y = et(), r = E(!1);
|
|
784
789
|
ge(r, (u) => {
|
|
785
790
|
u && (h.value = !0, l().finally(() => {
|
|
786
791
|
h.value = !1;
|
|
@@ -797,21 +802,21 @@ function os() {
|
|
|
797
802
|
const m = new Date(Bt(k._id)), g = k.supplier._id;
|
|
798
803
|
for (const w of k.items) {
|
|
799
804
|
if (!w.totalCost) continue;
|
|
800
|
-
const F = a[w.sku._id] ?? {},
|
|
801
|
-
|
|
805
|
+
const F = a[w.sku._id] ?? {}, c = F[g] ?? [];
|
|
806
|
+
c.push({
|
|
802
807
|
date: m.toISOString(),
|
|
803
808
|
totalUnit: w.quantity,
|
|
804
809
|
totalCost: w.totalCost,
|
|
805
810
|
unit: w.sku.unit,
|
|
806
811
|
measurement: w.measurement,
|
|
807
812
|
seqNumber: k.seqNumber
|
|
808
|
-
}), F[g] =
|
|
813
|
+
}), F[g] = c, a[w.sku._id] = F;
|
|
809
814
|
}
|
|
810
815
|
return a;
|
|
811
816
|
}, {});
|
|
812
817
|
e.value = t;
|
|
813
818
|
} catch {
|
|
814
|
-
|
|
819
|
+
f.open({
|
|
815
820
|
title: "Something went wrong",
|
|
816
821
|
message: "Cannot retrieve supplier purchase history. Please try again."
|
|
817
822
|
}), r.value = !1;
|
|
@@ -834,7 +839,7 @@ const ss = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, as = { key: 0 }
|
|
|
834
839
|
disabled: { type: Boolean }
|
|
835
840
|
},
|
|
836
841
|
emits: ["update:item"],
|
|
837
|
-
setup(
|
|
842
|
+
setup(f) {
|
|
838
843
|
function y(r) {
|
|
839
844
|
return r.column.columnDef.meta;
|
|
840
845
|
}
|
|
@@ -858,7 +863,7 @@ const ss = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, as = { key: 0 }
|
|
|
858
863
|
})
|
|
859
864
|
}, [
|
|
860
865
|
n("span", ss, [
|
|
861
|
-
|
|
866
|
+
p(o(me), {
|
|
862
867
|
render: u.column.columnDef.cell,
|
|
863
868
|
props: u.getContext()
|
|
864
869
|
}, null, 8, ["render", "props"])
|
|
@@ -870,7 +875,7 @@ const ss = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, as = { key: 0 }
|
|
|
870
875
|
n("td", {
|
|
871
876
|
colspan: r.row.getVisibleCells().length
|
|
872
877
|
}, [
|
|
873
|
-
|
|
878
|
+
p(Dt, {
|
|
874
879
|
prices: r.comparePriceBySku[(e = r.row.original.sku) == null ? void 0 : e._id]
|
|
875
880
|
}, null, 8, ["prices"])
|
|
876
881
|
], 8, ns)
|
|
@@ -895,8 +900,8 @@ const ss = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, as = { key: 0 }
|
|
|
895
900
|
onChange: { type: Function }
|
|
896
901
|
},
|
|
897
902
|
emits: ["netsuite:ready"],
|
|
898
|
-
setup(
|
|
899
|
-
const r = He(), l =
|
|
903
|
+
setup(f, { emit: y }) {
|
|
904
|
+
const r = He(), l = f, h = y, { t: e } = _o(), u = E(!1), d = E();
|
|
900
905
|
ze(() => {
|
|
901
906
|
var a, k, m, g;
|
|
902
907
|
let t = {
|
|
@@ -923,7 +928,7 @@ const ss = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, as = { key: 0 }
|
|
|
923
928
|
name: w.name
|
|
924
929
|
}
|
|
925
930
|
};
|
|
926
|
-
const F = r.getAvailableItems(w.id),
|
|
931
|
+
const F = r.getAvailableItems(w.id), c = l.items.filter((v) => {
|
|
927
932
|
if (v.measurement != null) {
|
|
928
933
|
const U = r.getAvailableMeasurements(
|
|
929
934
|
v.sku._id,
|
|
@@ -934,7 +939,7 @@ const ss = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, as = { key: 0 }
|
|
|
934
939
|
return F.includes(v.sku._id);
|
|
935
940
|
}).map((v) => v.sku._id);
|
|
936
941
|
l.onChange(
|
|
937
|
-
l.items.filter((v) =>
|
|
942
|
+
l.items.filter((v) => c.includes(v.sku._id)),
|
|
938
943
|
t
|
|
939
944
|
);
|
|
940
945
|
} finally {
|
|
@@ -955,11 +960,11 @@ const ss = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, as = { key: 0 }
|
|
|
955
960
|
return (t, a) => {
|
|
956
961
|
const k = I("FmLabel"), m = I("FmIcon"), g = I("FmField"), w = I("FmTooltip");
|
|
957
962
|
return o(r).isEnabled && l.required ? (C(), $("div", rs, [
|
|
958
|
-
|
|
963
|
+
p(k, {
|
|
959
964
|
label: `NetSuite ${o(e)("inventory.transfer.form.netsuite.subsidiary")}`
|
|
960
965
|
}, null, 8, ["label"]),
|
|
961
966
|
n("div", is, [
|
|
962
|
-
|
|
967
|
+
p(w, {
|
|
963
968
|
"z-index": 51,
|
|
964
969
|
placement: "left",
|
|
965
970
|
disabled: t.disabled
|
|
@@ -968,12 +973,12 @@ const ss = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, as = { key: 0 }
|
|
|
968
973
|
De("This field is locked and based on the location of the request.")
|
|
969
974
|
])),
|
|
970
975
|
default: T(() => [
|
|
971
|
-
|
|
976
|
+
p(g, null, {
|
|
972
977
|
default: T(() => {
|
|
973
978
|
var F;
|
|
974
979
|
return [
|
|
975
980
|
n("div", us, [
|
|
976
|
-
|
|
981
|
+
p(m, {
|
|
977
982
|
name: "lock_outline",
|
|
978
983
|
size: "sm",
|
|
979
984
|
color: t.disabled ? "neutral-gray-200" : "neutral-gray-400"
|
|
@@ -1013,22 +1018,22 @@ const ss = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, as = { key: 0 }
|
|
|
1013
1018
|
lastClosingDate: {}
|
|
1014
1019
|
},
|
|
1015
1020
|
emits: ["validation-success", "form:ready"],
|
|
1016
|
-
setup(
|
|
1017
|
-
const l =
|
|
1021
|
+
setup(f, { expose: y, emit: r }) {
|
|
1022
|
+
const l = f, h = r, e = ht(), { t: u } = ce(), d = je(), b = Je(), i = He(), t = st(), a = ot(), k = wt(), { breakpoints: m } = tt(), g = M(() => m.value.xs || m.value.sm), w = bt({
|
|
1018
1023
|
value: !1
|
|
1019
|
-
}), F = E(!1),
|
|
1024
|
+
}), F = E(!1), c = M(
|
|
1020
1025
|
() => {
|
|
1021
1026
|
var s;
|
|
1022
1027
|
return ((s = l.modelValue) == null ? void 0 : s.templateDoc) ?? k.templates.find((_) => _._id === e.template);
|
|
1023
1028
|
}
|
|
1024
1029
|
), v = M(() => e.status === "DRAFT" || !e._rev);
|
|
1025
|
-
ge(
|
|
1030
|
+
ge(c, (s) => {
|
|
1026
1031
|
s && v.value && (e.supplier = (s == null ? void 0 : s.purchaseOrder.supplier) ?? e.supplier);
|
|
1027
1032
|
}), ze(() => {
|
|
1028
1033
|
var s;
|
|
1029
1034
|
try {
|
|
1030
1035
|
if (!e.templateDoc) return;
|
|
1031
|
-
e.items.length || (e.items = ((s =
|
|
1036
|
+
e.items.length || (e.items = ((s = c.value) == null ? void 0 : s.purchaseOrder.items) ?? []);
|
|
1032
1037
|
} finally {
|
|
1033
1038
|
F.value = !0;
|
|
1034
1039
|
}
|
|
@@ -1137,7 +1142,7 @@ const ss = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, as = { key: 0 }
|
|
|
1137
1142
|
return P.value;
|
|
1138
1143
|
},
|
|
1139
1144
|
get template() {
|
|
1140
|
-
return
|
|
1145
|
+
return c.value;
|
|
1141
1146
|
},
|
|
1142
1147
|
get disabled() {
|
|
1143
1148
|
return l.disabled;
|
|
@@ -1145,9 +1150,9 @@ const ss = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, as = { key: 0 }
|
|
|
1145
1150
|
}), Ae = M(() => Fe.columnDefs.value);
|
|
1146
1151
|
function Me() {
|
|
1147
1152
|
var ye, $e, qe, Oe, Te;
|
|
1148
|
-
const s = (qe = ($e = (ye =
|
|
1153
|
+
const s = (qe = ($e = (ye = c.value) == null ? void 0 : ye.purchaseOrder) == null ? void 0 : $e.items) == null ? void 0 : qe.groupBy((N) => N.sku._id), _ = i.isEnabled ? i.getAvailableItems((Te = (Oe = e.netSuite) == null ? void 0 : Oe.subsidiary) == null ? void 0 : Te.id) : [], z = s != null && s.size ? b.skus.filter((N) => s.has(N._id)) : b.skus, re = i.isEnabled ? z.filter((N) => {
|
|
1149
1154
|
var te, ee, ne, de;
|
|
1150
|
-
const J = (ee = (te =
|
|
1155
|
+
const J = (ee = (te = c.value) == null ? void 0 : te.purchaseOrder) == null ? void 0 : ee.items.find(
|
|
1151
1156
|
(pe) => pe.sku._id === N._id
|
|
1152
1157
|
);
|
|
1153
1158
|
if (J != null && J.measurement != null) {
|
|
@@ -1196,7 +1201,7 @@ const ss = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, as = { key: 0 }
|
|
|
1196
1201
|
const ne = J.find((ke) => ke.sku._id === ee._id);
|
|
1197
1202
|
if (ne)
|
|
1198
1203
|
return ne;
|
|
1199
|
-
const de = ((Pe = (pe =
|
|
1204
|
+
const de = ((Pe = (pe = c.value) == null ? void 0 : pe.purchaseOrder.items) == null ? void 0 : Pe.find(
|
|
1200
1205
|
(ke) => ke.sku._id === ee._id
|
|
1201
1206
|
)) ?? {
|
|
1202
1207
|
sku: ee,
|
|
@@ -1243,7 +1248,7 @@ const ss = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, as = { key: 0 }
|
|
|
1243
1248
|
(pe = l.modelValue) != null && pe.template ? (C(), Y(z, {
|
|
1244
1249
|
key: 0,
|
|
1245
1250
|
variant: s.disabled ? "warning" : void 0,
|
|
1246
|
-
label: `${o(u)("inventory.transfer.template.title")}: ${((Pe =
|
|
1251
|
+
label: `${o(u)("inventory.transfer.template.title")}: ${((Pe = c.value) == null ? void 0 : Pe.name) ?? o(u)("inventory.transfer.form.loading")}`,
|
|
1247
1252
|
icon: "summarize",
|
|
1248
1253
|
compact: ""
|
|
1249
1254
|
}, null, 8, ["variant", "label"])) : L("", !0),
|
|
@@ -1260,7 +1265,7 @@ const ss = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, as = { key: 0 }
|
|
|
1260
1265
|
compact: ""
|
|
1261
1266
|
}, null, 8, ["label"])) : L("", !0)
|
|
1262
1267
|
]),
|
|
1263
|
-
|
|
1268
|
+
p(de, {
|
|
1264
1269
|
ref_key: "formRef",
|
|
1265
1270
|
ref: ae,
|
|
1266
1271
|
class: "flex flex-col gap-32",
|
|
@@ -1275,11 +1280,11 @@ const ss = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, as = { key: 0 }
|
|
|
1275
1280
|
n("div", vs, [
|
|
1276
1281
|
(ke = l.modelValue) != null && ke.template ? (C(), $(le, { key: 0 }, [
|
|
1277
1282
|
n("div", ys, [
|
|
1278
|
-
|
|
1283
|
+
p(re, {
|
|
1279
1284
|
label: o(u)("inventory.transfer.form.type.title")
|
|
1280
1285
|
}, null, 8, ["label"]),
|
|
1281
1286
|
n("div", bs, [
|
|
1282
|
-
|
|
1287
|
+
p(ye, {
|
|
1283
1288
|
"z-index": 51,
|
|
1284
1289
|
placement: "left",
|
|
1285
1290
|
disabled: s.disabled
|
|
@@ -1288,10 +1293,10 @@ const ss = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, as = { key: 0 }
|
|
|
1288
1293
|
De("This field is locked from template.")
|
|
1289
1294
|
])),
|
|
1290
1295
|
default: T(() => [
|
|
1291
|
-
|
|
1296
|
+
p(he, null, {
|
|
1292
1297
|
default: T(() => [
|
|
1293
1298
|
n("div", gs, [
|
|
1294
|
-
|
|
1299
|
+
p(ie, {
|
|
1295
1300
|
name: "lock_outline",
|
|
1296
1301
|
size: "sm",
|
|
1297
1302
|
color: s.disabled ? "neutral-gray-200" : "neutral-gray-400"
|
|
@@ -1315,11 +1320,11 @@ const ss = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, as = { key: 0 }
|
|
|
1315
1320
|
])
|
|
1316
1321
|
]),
|
|
1317
1322
|
n("div", _s, [
|
|
1318
|
-
|
|
1323
|
+
p(re, {
|
|
1319
1324
|
label: s.returnFrom ? "Return to" : P.value === o(oe).PURCHASE ? o(u)("inventory.transfer.form.purchaseFrom") : o(u)("inventory.transfer.form.transferFrom")
|
|
1320
1325
|
}, null, 8, ["label"]),
|
|
1321
1326
|
n("div", hs, [
|
|
1322
|
-
|
|
1327
|
+
p(ye, {
|
|
1323
1328
|
"z-index": 51,
|
|
1324
1329
|
placement: "left",
|
|
1325
1330
|
disabled: s.disabled
|
|
@@ -1328,12 +1333,12 @@ const ss = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, as = { key: 0 }
|
|
|
1328
1333
|
De("This field is locked from template.")
|
|
1329
1334
|
])),
|
|
1330
1335
|
default: T(() => [
|
|
1331
|
-
|
|
1336
|
+
p(he, null, {
|
|
1332
1337
|
default: T(() => {
|
|
1333
1338
|
var D, W, be;
|
|
1334
1339
|
return [
|
|
1335
1340
|
n("div", ks, [
|
|
1336
|
-
|
|
1341
|
+
p(ie, {
|
|
1337
1342
|
name: "lock_outline",
|
|
1338
1343
|
size: "sm",
|
|
1339
1344
|
color: s.disabled ? "neutral-gray-200" : "neutral-gray-400"
|
|
@@ -1352,7 +1357,7 @@ const ss = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, as = { key: 0 }
|
|
|
1352
1357
|
])
|
|
1353
1358
|
])
|
|
1354
1359
|
], 64)) : (C(), $(le, { key: 1 }, [
|
|
1355
|
-
|
|
1360
|
+
p($e, {
|
|
1356
1361
|
label: o(u)("inventory.transfer.form.type.title"),
|
|
1357
1362
|
"label-mark": "required",
|
|
1358
1363
|
modelValue: P.value,
|
|
@@ -1370,7 +1375,7 @@ const ss = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, as = { key: 0 }
|
|
|
1370
1375
|
]),
|
|
1371
1376
|
_: 1
|
|
1372
1377
|
}, 8, ["label", "modelValue", "items", "rules"]),
|
|
1373
|
-
|
|
1378
|
+
p($e, {
|
|
1374
1379
|
label: P.value === o(oe).PURCHASE ? o(u)("inventory.transfer.form.purchaseFrom") : o(u)("inventory.transfer.form.transferFrom"),
|
|
1375
1380
|
"label-mark": "required",
|
|
1376
1381
|
modelValue: O.value,
|
|
@@ -1380,7 +1385,7 @@ const ss = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, as = { key: 0 }
|
|
|
1380
1385
|
"menu-wrapper": T((D) => {
|
|
1381
1386
|
var W, be;
|
|
1382
1387
|
return [
|
|
1383
|
-
|
|
1388
|
+
p(vo, Xe(D, {
|
|
1384
1389
|
items: K.value,
|
|
1385
1390
|
"model-value": (be = (W = s.modelValue) == null ? void 0 : W.supplier) == null ? void 0 : be._id
|
|
1386
1391
|
}), null, 16, ["items", "model-value"])
|
|
@@ -1400,13 +1405,13 @@ const ss = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, as = { key: 0 }
|
|
|
1400
1405
|
_: 1
|
|
1401
1406
|
}, 8, ["label", "modelValue", "items"])
|
|
1402
1407
|
], 64)),
|
|
1403
|
-
|
|
1408
|
+
p(qe, {
|
|
1404
1409
|
label: o(u)("inventory.transfer.form.reference"),
|
|
1405
1410
|
"label-mark": "optional",
|
|
1406
1411
|
modelValue: o(e).ref,
|
|
1407
1412
|
"onUpdate:modelValue": _[2] || (_[2] = (D) => o(e).ref = D)
|
|
1408
1413
|
}, null, 8, ["label", "modelValue"]),
|
|
1409
|
-
|
|
1414
|
+
p(Oe, {
|
|
1410
1415
|
label: o(u)("inventory.transfer.form.remark"),
|
|
1411
1416
|
"label-mark": "optional",
|
|
1412
1417
|
"max-length": 240,
|
|
@@ -1437,7 +1442,7 @@ const ss = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, as = { key: 0 }
|
|
|
1437
1442
|
}
|
|
1438
1443
|
])
|
|
1439
1444
|
}, [
|
|
1440
|
-
|
|
1445
|
+
p(Te, {
|
|
1441
1446
|
modelValue: o(q),
|
|
1442
1447
|
"onUpdate:modelValue": _[5] || (_[5] = (D) => xe(q) ? q.value = D : null),
|
|
1443
1448
|
label: o(u)("inventory.transfer.form.backdate.title"),
|
|
@@ -1450,13 +1455,13 @@ const ss = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, as = { key: 0 }
|
|
|
1450
1455
|
}, null, 2),
|
|
1451
1456
|
o(q) ? (C(), $("div", Cs, [
|
|
1452
1457
|
n("div", Ss, [
|
|
1453
|
-
|
|
1458
|
+
p(N, {
|
|
1454
1459
|
modelValue: o(X),
|
|
1455
1460
|
"onUpdate:modelValue": _[6] || (_[6] = (D) => xe(X) ? X.value = D : null)
|
|
1456
1461
|
}, null, 8, ["modelValue"])
|
|
1457
1462
|
]),
|
|
1458
1463
|
n("div", ws, [
|
|
1459
|
-
|
|
1464
|
+
p(J, {
|
|
1460
1465
|
modelValue: o(x),
|
|
1461
1466
|
"onUpdate:modelValue": _[7] || (_[7] = (D) => xe(x) ? x.value = D : null)
|
|
1462
1467
|
}, null, 8, ["modelValue"])
|
|
@@ -1470,7 +1475,7 @@ const ss = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, as = { key: 0 }
|
|
|
1470
1475
|
rules: [o(Yt)(new Date(s.lastClosingDate), /* @__PURE__ */ new Date())]
|
|
1471
1476
|
}, null, 8, ["modelValue", "rules"])) : L("", !0),
|
|
1472
1477
|
U.value && !s.lastClosingDate ? (C(), $("div", Fs, [
|
|
1473
|
-
|
|
1478
|
+
p(ie, {
|
|
1474
1479
|
name: "error",
|
|
1475
1480
|
size: "sm",
|
|
1476
1481
|
class: "text-fm-color-typo-warning"
|
|
@@ -1481,7 +1486,7 @@ const ss = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, as = { key: 0 }
|
|
|
1481
1486
|
])
|
|
1482
1487
|
]),
|
|
1483
1488
|
n("div", Is, [
|
|
1484
|
-
|
|
1489
|
+
p(te, {
|
|
1485
1490
|
"model-value": o(e).items,
|
|
1486
1491
|
rules: [o(Le)(1)]
|
|
1487
1492
|
}, null, 8, ["model-value", "rules"]),
|
|
@@ -1496,7 +1501,7 @@ const ss = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, as = { key: 0 }
|
|
|
1496
1501
|
}, [
|
|
1497
1502
|
n("div", $s, R(o(u)("inventory.transfer.form.items.title")), 1),
|
|
1498
1503
|
n("div", Ts, [
|
|
1499
|
-
|
|
1504
|
+
p(ee, {
|
|
1500
1505
|
disabled: s.disabled,
|
|
1501
1506
|
label: o(u)("inventory.transfer.form.items.addItem"),
|
|
1502
1507
|
"prepend-icon": "add",
|
|
@@ -1515,7 +1520,7 @@ const ss = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, as = { key: 0 }
|
|
|
1515
1520
|
n("div", null, R(o(u)("inventory.transfer.form.items.forecastStock.notAvailable")), 1)
|
|
1516
1521
|
]),
|
|
1517
1522
|
default: T(() => [
|
|
1518
|
-
|
|
1523
|
+
p(ft, {
|
|
1519
1524
|
"onUpdate:poItems": _[10] || (_[10] = (D) => o(e).items = D),
|
|
1520
1525
|
disabled: ""
|
|
1521
1526
|
})
|
|
@@ -1529,7 +1534,7 @@ const ss = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, as = { key: 0 }
|
|
|
1529
1534
|
])
|
|
1530
1535
|
], 2),
|
|
1531
1536
|
P.value === o(oe).PURCHASE && v.value && o(a).enableTotalCost && ((at = s.modelValue) != null && at.items.length) ? (C(), $("div", Ps, [
|
|
1532
|
-
|
|
1537
|
+
p(Te, {
|
|
1533
1538
|
label: o(Z) ? o(u)("inventory.transfer.form.items.fetchingData") : o(u)("inventory.transfer.form.items.comparePriceHistory"),
|
|
1534
1539
|
"prepend-icon": "compare_arrows",
|
|
1535
1540
|
"label-placement": "right",
|
|
@@ -1538,7 +1543,7 @@ const ss = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, as = { key: 0 }
|
|
|
1538
1543
|
disabled: o(Z) || s.disabled
|
|
1539
1544
|
}, null, 8, ["label", "model-value", "disabled"])
|
|
1540
1545
|
])) : L("", !0),
|
|
1541
|
-
|
|
1546
|
+
p(te, {
|
|
1542
1547
|
"model-value": _e.value,
|
|
1543
1548
|
rules: [() => _e.value ? "Must have at least one non-zero item" : !0]
|
|
1544
1549
|
}, null, 8, ["model-value", "rules"]),
|
|
@@ -1557,7 +1562,7 @@ const ss = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, as = { key: 0 }
|
|
|
1557
1562
|
"table-row": T((D) => {
|
|
1558
1563
|
var W, be, Ne, mt;
|
|
1559
1564
|
return [
|
|
1560
|
-
|
|
1565
|
+
p(ls, {
|
|
1561
1566
|
"compare-price-by-sku": o(ue),
|
|
1562
1567
|
"show-compare-price": P.value === o(oe).PURCHASE && o(S),
|
|
1563
1568
|
row: D,
|
|
@@ -1575,7 +1580,7 @@ const ss = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, as = { key: 0 }
|
|
|
1575
1580
|
key: o(e).items.map((W) => W.sku._id).join(".")
|
|
1576
1581
|
}, {
|
|
1577
1582
|
default: T((W) => [
|
|
1578
|
-
|
|
1583
|
+
p(Oo, {
|
|
1579
1584
|
"compare-price-by-sku": o(ue),
|
|
1580
1585
|
"show-compare-price": P.value === o(oe).PURCHASE && o(S),
|
|
1581
1586
|
row: D,
|
|
@@ -1596,14 +1601,14 @@ const ss = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, as = { key: 0 }
|
|
|
1596
1601
|
};
|
|
1597
1602
|
}
|
|
1598
1603
|
});
|
|
1599
|
-
function Vs(
|
|
1600
|
-
y ?? (y = `Return to ${
|
|
1604
|
+
function Vs(f, y) {
|
|
1605
|
+
y ?? (y = `Return to ${f.supplier.name}`);
|
|
1601
1606
|
const l = je().currentLocation, h = yo(l), e = {};
|
|
1602
|
-
for (const d of
|
|
1607
|
+
for (const d of f.items) {
|
|
1603
1608
|
const b = d.sku._id;
|
|
1604
1609
|
e[b] = ve.reset();
|
|
1605
1610
|
}
|
|
1606
|
-
const u =
|
|
1611
|
+
const u = f.deliveryOrder.flatMap((d) => d.received);
|
|
1607
1612
|
for (const d of u) {
|
|
1608
1613
|
const b = d.sku._id;
|
|
1609
1614
|
if (!e[b]) continue;
|
|
@@ -1611,13 +1616,13 @@ function Vs(p, y) {
|
|
|
1611
1616
|
e[b] = ve.add([e[b], i]);
|
|
1612
1617
|
}
|
|
1613
1618
|
return {
|
|
1614
|
-
_id:
|
|
1619
|
+
_id: f._id,
|
|
1615
1620
|
name: y,
|
|
1616
1621
|
purchaseOrder: {
|
|
1617
1622
|
supplier: h,
|
|
1618
|
-
ref:
|
|
1619
|
-
remark:
|
|
1620
|
-
items:
|
|
1623
|
+
ref: f.ref,
|
|
1624
|
+
remark: f.remark,
|
|
1625
|
+
items: f.items.map((d) => {
|
|
1621
1626
|
const b = d.measurement ? ve.divide([e[d.sku._id], d.measurement.conversion]) : e[d.sku._id];
|
|
1622
1627
|
return {
|
|
1623
1628
|
sku: d.sku,
|
|
@@ -1646,9 +1651,9 @@ const Es = { class: "flex items-center" }, As = { class: "fm-typo-en-title-md-80
|
|
|
1646
1651
|
lastClosingDate: {}
|
|
1647
1652
|
},
|
|
1648
1653
|
emits: ["update:show", "submitted"],
|
|
1649
|
-
setup(
|
|
1654
|
+
setup(f, { expose: y, emit: r }) {
|
|
1650
1655
|
var X;
|
|
1651
|
-
const l =
|
|
1656
|
+
const l = f, h = r, e = et(), u = wt(), d = Ie(), b = st(), i = je(), { t } = ce(), a = E(!1), k = E(!1), m = E(!1), g = Ft();
|
|
1652
1657
|
async function w(x) {
|
|
1653
1658
|
if (x) {
|
|
1654
1659
|
k.value = !1;
|
|
@@ -1703,7 +1708,7 @@ const Es = { class: "flex items-center" }, As = { class: "fm-typo-en-title-md-80
|
|
|
1703
1708
|
}
|
|
1704
1709
|
return x;
|
|
1705
1710
|
}
|
|
1706
|
-
const
|
|
1711
|
+
const c = St(l, "show"), v = E(l.modelValue ?? F()), U = E(((X = l.modelValue) == null ? void 0 : X._id) ?? `${Math.random()}`);
|
|
1707
1712
|
ge(
|
|
1708
1713
|
() => l.show,
|
|
1709
1714
|
(x) => {
|
|
@@ -1811,8 +1816,8 @@ const Es = { class: "flex items-center" }, As = { class: "fm-typo-en-title-md-80
|
|
|
1811
1816
|
return (x, S) => {
|
|
1812
1817
|
const Z = I("FmButton"), ue = I("FmSideSheet");
|
|
1813
1818
|
return C(), Y(ue, {
|
|
1814
|
-
modelValue: o(
|
|
1815
|
-
"onUpdate:modelValue": S[3] || (S[3] = (ae) => xe(
|
|
1819
|
+
modelValue: o(c),
|
|
1820
|
+
"onUpdate:modelValue": S[3] || (S[3] = (ae) => xe(c) ? c.value = ae : null),
|
|
1816
1821
|
"dismiss-away": "",
|
|
1817
1822
|
"close-button": "",
|
|
1818
1823
|
"max-width": 900
|
|
@@ -1839,13 +1844,13 @@ const Es = { class: "flex items-center" }, As = { class: "fm-typo-en-title-md-80
|
|
|
1839
1844
|
]),
|
|
1840
1845
|
"side-sheet-footer": T(() => [
|
|
1841
1846
|
n("div", Ms, [
|
|
1842
|
-
|
|
1847
|
+
p(Z, {
|
|
1843
1848
|
loading: a.value,
|
|
1844
1849
|
disabled: j.value,
|
|
1845
1850
|
label: o(t)("common.save"),
|
|
1846
1851
|
onClick: q
|
|
1847
1852
|
}, null, 8, ["loading", "disabled", "label"]),
|
|
1848
|
-
|
|
1853
|
+
p(Z, {
|
|
1849
1854
|
disabled: j.value,
|
|
1850
1855
|
variant: "tertiary",
|
|
1851
1856
|
label: o(t)("common.close"),
|
|
@@ -1858,8 +1863,8 @@ const Es = { class: "flex items-center" }, As = { class: "fm-typo-en-title-md-80
|
|
|
1858
1863
|
};
|
|
1859
1864
|
}
|
|
1860
1865
|
});
|
|
1861
|
-
function qs(
|
|
1862
|
-
const [y, ...r] = Kt(
|
|
1866
|
+
function qs(f) {
|
|
1867
|
+
const [y, ...r] = Kt(f), l = y.map((d) => d.toLowerCase().trim().replace(/ /g, "_")), e = ["item_code", "quantity"].filter((d) => !l.includes(d));
|
|
1863
1868
|
if (e.length)
|
|
1864
1869
|
throw new Error(
|
|
1865
1870
|
`Missing headers (${e.join()}). Excel file does not come from the template.`
|
|
@@ -1876,12 +1881,12 @@ function qs(p) {
|
|
|
1876
1881
|
};
|
|
1877
1882
|
});
|
|
1878
1883
|
}
|
|
1879
|
-
function Os(
|
|
1880
|
-
const y =
|
|
1884
|
+
function Os(f) {
|
|
1885
|
+
const y = f.SheetNames;
|
|
1881
1886
|
try {
|
|
1882
1887
|
return y.reduce(
|
|
1883
1888
|
(l, h) => {
|
|
1884
|
-
const e = new Array(), u =
|
|
1889
|
+
const e = new Array(), u = f.Sheets[h], d = Je(), b = qs(u), i = [];
|
|
1885
1890
|
for (const { index: a, data: k } of b) {
|
|
1886
1891
|
k.item_code === "" && e.push(`Row ${a + 1}: Item code is empty`), k.quantity === "" && e.push(`Row ${a + 1}: Quantity is empty`);
|
|
1887
1892
|
const m = d.skus.find((w) => w.code === k.item_code);
|
|
@@ -1931,8 +1936,8 @@ const Ns = exports.FfCalculator, Bs = { class: "flex flex-col flex-1" }, Ls = {
|
|
|
1931
1936
|
items: {},
|
|
1932
1937
|
errors: {}
|
|
1933
1938
|
},
|
|
1934
|
-
setup(
|
|
1935
|
-
const y =
|
|
1939
|
+
setup(f) {
|
|
1940
|
+
const y = f, { t: r } = ce(), l = E(!1), h = () => {
|
|
1936
1941
|
y.errors.length && (l.value = !l.value);
|
|
1937
1942
|
};
|
|
1938
1943
|
return (e, u) => {
|
|
@@ -1956,7 +1961,7 @@ const Ns = exports.FfCalculator, Bs = { class: "flex flex-col flex-1" }, Ls = {
|
|
|
1956
1961
|
e.type === "create" ? (C(), $("span", Hs, "(" + R(o(r)("inventory.closing.template.import.new")) + ")", 1)) : L("", !0)
|
|
1957
1962
|
], 2),
|
|
1958
1963
|
e.errors.length ? (C(), $("div", js, [
|
|
1959
|
-
|
|
1964
|
+
p(d, {
|
|
1960
1965
|
name: "error",
|
|
1961
1966
|
size: "sm",
|
|
1962
1967
|
color: "system-error-300"
|
|
@@ -1970,7 +1975,7 @@ const Ns = exports.FfCalculator, Bs = { class: "flex flex-col flex-1" }, Ls = {
|
|
|
1970
1975
|
class: "flex gap-4 mt-2 items-center"
|
|
1971
1976
|
}, [
|
|
1972
1977
|
n("div", Qs, [
|
|
1973
|
-
|
|
1978
|
+
p(b, {
|
|
1974
1979
|
content: t.code,
|
|
1975
1980
|
placement: "top",
|
|
1976
1981
|
"z-index": 51
|
|
@@ -1980,7 +1985,7 @@ const Ns = exports.FfCalculator, Bs = { class: "flex flex-col flex-1" }, Ls = {
|
|
|
1980
1985
|
]),
|
|
1981
1986
|
_: 2
|
|
1982
1987
|
}, 1032, ["content"]),
|
|
1983
|
-
|
|
1988
|
+
p(b, {
|
|
1984
1989
|
content: t.name,
|
|
1985
1990
|
placement: "top",
|
|
1986
1991
|
"z-index": 51
|
|
@@ -2038,7 +2043,7 @@ const Ns = exports.FfCalculator, Bs = { class: "flex flex-col flex-1" }, Ls = {
|
|
|
2038
2043
|
class: "max-h-[200px] overflow-y-auto flex flex-col gap-8"
|
|
2039
2044
|
}, ua = { class: "fm-typo-en-body-lg-600" }, vt = "Transfer note", da = /* @__PURE__ */ se({
|
|
2040
2045
|
__name: "XilnexImportForm",
|
|
2041
|
-
setup(
|
|
2046
|
+
setup(f, { expose: y }) {
|
|
2042
2047
|
const r = E(null), l = Ie(), h = E(!1), e = E(!1), u = ht();
|
|
2043
2048
|
E(!1), He();
|
|
2044
2049
|
const d = E([
|
|
@@ -2065,14 +2070,14 @@ const Ns = exports.FfCalculator, Bs = { class: "flex flex-col flex-1" }, Ls = {
|
|
|
2065
2070
|
}
|
|
2066
2071
|
]), b = M({
|
|
2067
2072
|
get() {
|
|
2068
|
-
var
|
|
2069
|
-
return ((
|
|
2073
|
+
var c;
|
|
2074
|
+
return ((c = u.supplier) == null ? void 0 : c.name) ?? "";
|
|
2070
2075
|
},
|
|
2071
|
-
set(
|
|
2072
|
-
|
|
2073
|
-
name:
|
|
2076
|
+
set(c) {
|
|
2077
|
+
c && (u.supplier = {
|
|
2078
|
+
name: c.name,
|
|
2074
2079
|
registrationNumber: "",
|
|
2075
|
-
_id:
|
|
2080
|
+
_id: c.netsuiteId,
|
|
2076
2081
|
internal: "restaurant",
|
|
2077
2082
|
address: {
|
|
2078
2083
|
line1: "",
|
|
@@ -2088,9 +2093,9 @@ const Ns = exports.FfCalculator, Bs = { class: "flex flex-col flex-1" }, Ls = {
|
|
|
2088
2093
|
get() {
|
|
2089
2094
|
return "";
|
|
2090
2095
|
},
|
|
2091
|
-
set(
|
|
2092
|
-
if (
|
|
2093
|
-
const v = u.effectiveAt ? new Date(u.effectiveAt) : /* @__PURE__ */ new Date(), [U, j, V] =
|
|
2096
|
+
set(c) {
|
|
2097
|
+
if (c) {
|
|
2098
|
+
const v = u.effectiveAt ? new Date(u.effectiveAt) : /* @__PURE__ */ new Date(), [U, j, V] = c.split("-");
|
|
2094
2099
|
v.setFullYear(parseInt(U)), v.setMonth(parseInt(j) - 1), v.setDate(parseInt(V)), u.effectiveAt = v.toISOString();
|
|
2095
2100
|
}
|
|
2096
2101
|
}
|
|
@@ -2098,36 +2103,36 @@ const Ns = exports.FfCalculator, Bs = { class: "flex flex-col flex-1" }, Ls = {
|
|
|
2098
2103
|
get() {
|
|
2099
2104
|
return null;
|
|
2100
2105
|
},
|
|
2101
|
-
set(
|
|
2102
|
-
if (
|
|
2103
|
-
const v = u.effectiveAt ? new Date(u.effectiveAt) : /* @__PURE__ */ new Date(), [U, j] =
|
|
2106
|
+
set(c) {
|
|
2107
|
+
if (c) {
|
|
2108
|
+
const v = u.effectiveAt ? new Date(u.effectiveAt) : /* @__PURE__ */ new Date(), [U, j] = c.split(":");
|
|
2104
2109
|
v.setHours(parseInt(U)), v.setMinutes(parseInt(j)), v.setSeconds(0), v.setMilliseconds(0), u.effectiveAt = v.toISOString();
|
|
2105
2110
|
}
|
|
2106
2111
|
}
|
|
2107
2112
|
}), a = E(new Array()), k = E([]), m = M(
|
|
2108
|
-
() => !!a.value.length || k.value.some((
|
|
2113
|
+
() => !!a.value.length || k.value.some((c) => c.errors.length)
|
|
2109
2114
|
), g = E();
|
|
2110
2115
|
y({
|
|
2111
2116
|
validateInputs: () => {
|
|
2112
|
-
var
|
|
2113
|
-
(v = (
|
|
2117
|
+
var c, v;
|
|
2118
|
+
(v = (c = g.value) == null ? void 0 : c.validateInputs) == null || v.call(c);
|
|
2114
2119
|
},
|
|
2115
2120
|
resetInputsValidation: () => {
|
|
2116
|
-
var
|
|
2117
|
-
(v = (
|
|
2121
|
+
var c, v;
|
|
2122
|
+
(v = (c = g.value) == null ? void 0 : c.resetInputsValidation) == null || v.call(c);
|
|
2118
2123
|
},
|
|
2119
2124
|
resetInputs: () => {
|
|
2120
|
-
var
|
|
2121
|
-
(v = (
|
|
2125
|
+
var c, v;
|
|
2126
|
+
(v = (c = g.value) == null ? void 0 : c.resetInputs) == null || v.call(c);
|
|
2122
2127
|
}
|
|
2123
2128
|
});
|
|
2124
2129
|
const { t: w } = ce();
|
|
2125
|
-
async function F(
|
|
2130
|
+
async function F(c) {
|
|
2126
2131
|
a.value = [], k.value = [];
|
|
2127
2132
|
try {
|
|
2128
2133
|
h.value = !0;
|
|
2129
2134
|
const [v] = await Promise.all([
|
|
2130
|
-
Zt(
|
|
2135
|
+
Zt(c),
|
|
2131
2136
|
// fake buffer
|
|
2132
2137
|
new Promise((j) => setTimeout(j, 1e3))
|
|
2133
2138
|
]), U = Os(v);
|
|
@@ -2155,9 +2160,9 @@ const Ns = exports.FfCalculator, Bs = { class: "flex flex-col flex-1" }, Ls = {
|
|
|
2155
2160
|
}), h.value = !1;
|
|
2156
2161
|
}
|
|
2157
2162
|
}
|
|
2158
|
-
return ge(r, (
|
|
2159
|
-
|
|
2160
|
-
}), (
|
|
2163
|
+
return ge(r, (c) => {
|
|
2164
|
+
c && F(c);
|
|
2165
|
+
}), (c, v) => {
|
|
2161
2166
|
const U = I("FmSelect"), j = I("FmDatePicker"), V = I("FmTimePicker"), P = I("FmCircularProgress"), K = I("FmLabel"), O = I("FmIcon"), A = I("FmButton"), B = I("FmForm");
|
|
2162
2167
|
return C(), Y(B, {
|
|
2163
2168
|
ref_key: "formRef",
|
|
@@ -2165,7 +2170,7 @@ const Ns = exports.FfCalculator, Bs = { class: "flex flex-col flex-1" }, Ls = {
|
|
|
2165
2170
|
}, {
|
|
2166
2171
|
default: T(() => [
|
|
2167
2172
|
n("div", ea, [
|
|
2168
|
-
|
|
2173
|
+
p(U, {
|
|
2169
2174
|
modelValue: b.value,
|
|
2170
2175
|
"onUpdate:modelValue": v[0] || (v[0] = (q) => b.value = q),
|
|
2171
2176
|
label: "Transfer from",
|
|
@@ -2174,13 +2179,13 @@ const Ns = exports.FfCalculator, Bs = { class: "flex flex-col flex-1" }, Ls = {
|
|
|
2174
2179
|
items: d.value,
|
|
2175
2180
|
rules: [o(Ee)()]
|
|
2176
2181
|
}, null, 8, ["modelValue", "items", "rules"]),
|
|
2177
|
-
|
|
2182
|
+
p(j, {
|
|
2178
2183
|
modelValue: i.value,
|
|
2179
2184
|
"onUpdate:modelValue": v[1] || (v[1] = (q) => i.value = q),
|
|
2180
2185
|
label: "Transfer date",
|
|
2181
2186
|
rules: [o(Ee)()]
|
|
2182
2187
|
}, null, 8, ["modelValue", "rules"]),
|
|
2183
|
-
|
|
2188
|
+
p(V, {
|
|
2184
2189
|
modelValue: t.value,
|
|
2185
2190
|
"onUpdate:modelValue": v[2] || (v[2] = (q) => t.value = q),
|
|
2186
2191
|
label: "Transfer time",
|
|
@@ -2188,14 +2193,14 @@ const Ns = exports.FfCalculator, Bs = { class: "flex flex-col flex-1" }, Ls = {
|
|
|
2188
2193
|
}, null, 8, ["modelValue", "rules"]),
|
|
2189
2194
|
e.value ? (C(), $("div", ta, [
|
|
2190
2195
|
n("div", null, [
|
|
2191
|
-
|
|
2196
|
+
p(P, {
|
|
2192
2197
|
size: "md",
|
|
2193
2198
|
color: "neutral-gray-200"
|
|
2194
2199
|
})
|
|
2195
2200
|
]),
|
|
2196
2201
|
n("div", oa, R(o(w)("inventory.formField.loading")), 1)
|
|
2197
2202
|
])) : (C(), $(le, { key: 1 }, [
|
|
2198
|
-
|
|
2203
|
+
p(Xt, {
|
|
2199
2204
|
"max-file-size": 5,
|
|
2200
2205
|
class: Q({
|
|
2201
2206
|
"w-full": !0,
|
|
@@ -2209,7 +2214,7 @@ const Ns = exports.FfCalculator, Bs = { class: "flex flex-col flex-1" }, Ls = {
|
|
|
2209
2214
|
r.value ? {
|
|
2210
2215
|
name: "default",
|
|
2211
2216
|
fn: T(({ openFileDialog: q }) => [
|
|
2212
|
-
|
|
2217
|
+
p(K, null, {
|
|
2213
2218
|
default: T(() => [
|
|
2214
2219
|
De(R(vt))
|
|
2215
2220
|
]),
|
|
@@ -2248,7 +2253,7 @@ const Ns = exports.FfCalculator, Bs = { class: "flex flex-col flex-1" }, Ls = {
|
|
|
2248
2253
|
n("div", aa, R(r.value.name), 1)
|
|
2249
2254
|
], 2),
|
|
2250
2255
|
h.value ? L("", !0) : (C(), $("div", na, [
|
|
2251
|
-
|
|
2256
|
+
p(A, {
|
|
2252
2257
|
label: o(w)("inventory.ingredient.import.replaceFile"),
|
|
2253
2258
|
variant: m.value ? "destructive" : "secondary",
|
|
2254
2259
|
"prepend-icon": m.value ? void 0 : "autorenew",
|
|
@@ -2261,7 +2266,7 @@ const Ns = exports.FfCalculator, Bs = { class: "flex flex-col flex-1" }, Ls = {
|
|
|
2261
2266
|
key: x,
|
|
2262
2267
|
class: "flex gap-8 items-center"
|
|
2263
2268
|
}, [
|
|
2264
|
-
|
|
2269
|
+
p(O, {
|
|
2265
2270
|
name: "error",
|
|
2266
2271
|
size: "sm",
|
|
2267
2272
|
color: "system-error-300"
|
|
@@ -2297,8 +2302,8 @@ const Ns = exports.FfCalculator, Bs = { class: "flex flex-col flex-1" }, Ls = {
|
|
|
2297
2302
|
show: { type: Boolean }
|
|
2298
2303
|
},
|
|
2299
2304
|
emits: ["update:show", "submitted"],
|
|
2300
|
-
setup(
|
|
2301
|
-
const l = r, e = St(
|
|
2305
|
+
setup(f, { expose: y, emit: r }) {
|
|
2306
|
+
const l = r, e = St(f, "show"), u = Ie(), d = et(), b = E(!1), i = E(), t = E();
|
|
2302
2307
|
y({
|
|
2303
2308
|
validateInputs: () => {
|
|
2304
2309
|
var m, g;
|
|
@@ -2318,7 +2323,7 @@ const Ns = exports.FfCalculator, Bs = { class: "flex flex-col flex-1" }, Ls = {
|
|
|
2318
2323
|
(g = (m = i.value) == null ? void 0 : m.validateInputs) == null || g.call(m);
|
|
2319
2324
|
}
|
|
2320
2325
|
async function k() {
|
|
2321
|
-
var g, w, F,
|
|
2326
|
+
var g, w, F, c, v;
|
|
2322
2327
|
if (!((w = (g = t.value) == null ? void 0 : g.supplier) != null && w.name)) {
|
|
2323
2328
|
u.open({
|
|
2324
2329
|
title: "Upload failed",
|
|
@@ -2327,7 +2332,7 @@ const Ns = exports.FfCalculator, Bs = { class: "flex flex-col flex-1" }, Ls = {
|
|
|
2327
2332
|
});
|
|
2328
2333
|
return;
|
|
2329
2334
|
}
|
|
2330
|
-
if (!((F = t.value) != null && F.items) || ((v = (
|
|
2335
|
+
if (!((F = t.value) != null && F.items) || ((v = (c = t.value) == null ? void 0 : c.items) == null ? void 0 : v.length) === 0) {
|
|
2331
2336
|
u.open({
|
|
2332
2337
|
title: "Upload failed",
|
|
2333
2338
|
message: "No data to upload",
|
|
@@ -2366,8 +2371,8 @@ const Ns = exports.FfCalculator, Bs = { class: "flex flex-col flex-1" }, Ls = {
|
|
|
2366
2371
|
}
|
|
2367
2372
|
}
|
|
2368
2373
|
return (m, g) => {
|
|
2369
|
-
const w = I("FmSpacer"), F = I("FmButton"),
|
|
2370
|
-
return C(), Y(
|
|
2374
|
+
const w = I("FmSpacer"), F = I("FmButton"), c = I("FmDialog");
|
|
2375
|
+
return C(), Y(c, {
|
|
2371
2376
|
modelValue: o(e),
|
|
2372
2377
|
"onUpdate:modelValue": g[2] || (g[2] = (v) => xe(e) ? e.value = v : null),
|
|
2373
2378
|
overlay: !0,
|
|
@@ -2377,8 +2382,8 @@ const Ns = exports.FfCalculator, Bs = { class: "flex flex-col flex-1" }, Ls = {
|
|
|
2377
2382
|
n("div", null, "Xilnex transfer order", -1)
|
|
2378
2383
|
])),
|
|
2379
2384
|
"dialog-footer": T(() => [
|
|
2380
|
-
|
|
2381
|
-
|
|
2385
|
+
p(w, { class: "sm:hidden xs:hidden" }),
|
|
2386
|
+
p(F, {
|
|
2382
2387
|
disabled: b.value,
|
|
2383
2388
|
class: "sm:w-full xs:w-full",
|
|
2384
2389
|
label: "Cancel",
|
|
@@ -2386,7 +2391,7 @@ const Ns = exports.FfCalculator, Bs = { class: "flex flex-col flex-1" }, Ls = {
|
|
|
2386
2391
|
variant: "tertiary",
|
|
2387
2392
|
onClick: g[1] || (g[1] = (v) => l("update:show", !1))
|
|
2388
2393
|
}, null, 8, ["disabled"]),
|
|
2389
|
-
|
|
2394
|
+
p(F, {
|
|
2390
2395
|
disabled: b.value,
|
|
2391
2396
|
loading: b.value,
|
|
2392
2397
|
class: "sm:w-full xs:w-full",
|
|
@@ -2398,7 +2403,7 @@ const Ns = exports.FfCalculator, Bs = { class: "flex flex-col flex-1" }, Ls = {
|
|
|
2398
2403
|
]),
|
|
2399
2404
|
default: T(() => [
|
|
2400
2405
|
n("div", ma, [
|
|
2401
|
-
|
|
2406
|
+
p(da, {
|
|
2402
2407
|
ref_key: "formRef",
|
|
2403
2408
|
ref: i,
|
|
2404
2409
|
onValidationSuccess: k,
|
|
@@ -2416,7 +2421,7 @@ const Ns = exports.FfCalculator, Bs = { class: "flex flex-col flex-1" }, Ls = {
|
|
|
2416
2421
|
class: "fm-typo-en-body-md-400 text-fm-color-typo-primary line-clamp-1"
|
|
2417
2422
|
}, ga = { class: "pt-8" }, yt = "ReceiveRequestViewSearchCriteria", Aa = /* @__PURE__ */ se({
|
|
2418
2423
|
__name: "ReceiveRequestView",
|
|
2419
|
-
setup(
|
|
2424
|
+
setup(f) {
|
|
2420
2425
|
const { t: y } = ce(), r = Ie();
|
|
2421
2426
|
Be.object({
|
|
2422
2427
|
name: Be.string().optional().nullable(),
|
|
@@ -2523,7 +2528,7 @@ const Ns = exports.FfCalculator, Bs = { class: "flex flex-col flex-1" }, Ls = {
|
|
|
2523
2528
|
if (V === "export")
|
|
2524
2529
|
return k();
|
|
2525
2530
|
}
|
|
2526
|
-
const { breakpoints: F } = tt(),
|
|
2531
|
+
const { breakpoints: F } = tt(), c = M(() => F.value.xs || F.value.sm), v = M(() => c.value ? 10 : 20), U = Gt(), j = M(() => [
|
|
2527
2532
|
{
|
|
2528
2533
|
label: y("inventory.transfer.receiveRequest.actions.create"),
|
|
2529
2534
|
value: "create",
|
|
@@ -2559,12 +2564,12 @@ const Ns = exports.FfCalculator, Bs = { class: "flex flex-col flex-1" }, Ls = {
|
|
|
2559
2564
|
class: Q([
|
|
2560
2565
|
"flex flex-col gap-8 max-h-full",
|
|
2561
2566
|
{
|
|
2562
|
-
"p-0":
|
|
2563
|
-
"px-24 ": !
|
|
2567
|
+
"p-0": c.value,
|
|
2568
|
+
"px-24 ": !c.value
|
|
2564
2569
|
}
|
|
2565
2570
|
])
|
|
2566
2571
|
}, [
|
|
2567
|
-
|
|
2572
|
+
p(Jt, {
|
|
2568
2573
|
"date-range-query": "",
|
|
2569
2574
|
"date-range": m.value,
|
|
2570
2575
|
"onUpdate:dateRange": P[0] || (P[0] = (A) => m.value = A),
|
|
@@ -2584,7 +2589,7 @@ const Ns = exports.FfCalculator, Bs = { class: "flex flex-col flex-1" }, Ls = {
|
|
|
2584
2589
|
"page-size": v.value
|
|
2585
2590
|
}, {
|
|
2586
2591
|
"list-row": T((A) => [
|
|
2587
|
-
|
|
2592
|
+
p(kt, {
|
|
2588
2593
|
row: A,
|
|
2589
2594
|
onRowClick: o(i).promptShowTransferDetails
|
|
2590
2595
|
}, {
|
|
@@ -2593,26 +2598,26 @@ const Ns = exports.FfCalculator, Bs = { class: "flex flex-col flex-1" }, Ls = {
|
|
|
2593
2598
|
return [
|
|
2594
2599
|
n("div", pa, [
|
|
2595
2600
|
n("div", fa, [
|
|
2596
|
-
|
|
2601
|
+
p(o(me), {
|
|
2597
2602
|
render: (x = (X = (q = B._id) == null ? void 0 : q.column) == null ? void 0 : X.columnDef) == null ? void 0 : x.cell,
|
|
2598
2603
|
props: (Z = (S = B._id) == null ? void 0 : S.getContext) == null ? void 0 : Z.call(S)
|
|
2599
2604
|
}, null, 8, ["render", "props"])
|
|
2600
2605
|
]),
|
|
2601
2606
|
n("div", va, [
|
|
2602
|
-
|
|
2607
|
+
p(o(me), {
|
|
2603
2608
|
render: (we = (ae = (ue = B.supplier_name) == null ? void 0 : ue.column) == null ? void 0 : ae.columnDef) == null ? void 0 : we.cell,
|
|
2604
2609
|
props: (Ae = (Fe = B.supplier_name) == null ? void 0 : Fe.getContext) == null ? void 0 : Ae.call(Fe)
|
|
2605
2610
|
}, null, 8, ["render", "props"])
|
|
2606
2611
|
]),
|
|
2607
2612
|
n("div", ya, R(A.original.items.map((ye) => `${ye.name}`).join(", ")), 1),
|
|
2608
2613
|
A.original.ref ? (C(), $("div", ba, [
|
|
2609
|
-
|
|
2614
|
+
p(o(me), {
|
|
2610
2615
|
render: (Ue = (Ye = (Me = B.ref) == null ? void 0 : Me.column) == null ? void 0 : Ye.columnDef) == null ? void 0 : Ue.cell,
|
|
2611
2616
|
props: (s = (_e = B.ref) == null ? void 0 : _e.getContext) == null ? void 0 : s.call(_e)
|
|
2612
2617
|
}, null, 8, ["render", "props"])
|
|
2613
2618
|
])) : L("", !0),
|
|
2614
2619
|
n("div", ga, [
|
|
2615
|
-
|
|
2620
|
+
p(o(me), {
|
|
2616
2621
|
render: (re = (z = (_ = B.status) == null ? void 0 : _.column) == null ? void 0 : z.columnDef) == null ? void 0 : re.cell,
|
|
2617
2622
|
props: (he = (ie = B.status) == null ? void 0 : ie.getContext) == null ? void 0 : he.call(ie)
|
|
2618
2623
|
}, null, 8, ["render", "props"])
|
|
@@ -2627,7 +2632,7 @@ const Ns = exports.FfCalculator, Bs = { class: "flex flex-col flex-1" }, Ls = {
|
|
|
2627
2632
|
}, 8, ["style", "column-defs", "row-data", "search-value", "loading", "page-size"]))
|
|
2628
2633
|
], 2),
|
|
2629
2634
|
(C(), Y(Rt, { to: "body" }, [
|
|
2630
|
-
|
|
2635
|
+
p(Us, Xe(o(i).transferDialogProps.value, {
|
|
2631
2636
|
onSubmitted: o(i).fetchData,
|
|
2632
2637
|
"on-submit:return-stock": (A, B) => o(i).submitAction(
|
|
2633
2638
|
A,
|
|
@@ -2636,13 +2641,13 @@ const Ns = exports.FfCalculator, Bs = { class: "flex flex-col flex-1" }, Ls = {
|
|
|
2636
2641
|
B
|
|
2637
2642
|
)
|
|
2638
2643
|
}), null, 16, ["onSubmitted", "on-submit:return-stock"]),
|
|
2639
|
-
|
|
2644
|
+
p(oo, Xe({
|
|
2640
2645
|
scope: o(Ke).RECEIVE_REQUEST
|
|
2641
2646
|
}, o(i).transferDetailsProps.value, {
|
|
2642
2647
|
onSubmitted: o(i).fetchData,
|
|
2643
2648
|
onReturnStock: o(i).promptReturnTransferDialog
|
|
2644
2649
|
}), null, 16, ["scope", "onSubmitted", "onReturnStock"]),
|
|
2645
|
-
|
|
2650
|
+
p(ca, Vt(Et(o(i).xilnexImportDialogProps.value)), null, 16)
|
|
2646
2651
|
]))
|
|
2647
2652
|
];
|
|
2648
2653
|
}),
|