@feedmepos/mf-inventory-portal 1.2.29 → 1.2.30
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-BcetoQcK.js → App-CZJre5y8.js} +56 -54
- package/dist/{ApprovalView-CyRCctkZ.js → ApprovalView-CnxHxojY.js} +34 -28
- package/dist/{BindingsDialog-DLN2RPYo.js → BindingsDialog-C6lCOPNs.js} +2 -2
- package/dist/{BindingsPicker-CDtYeSVh.js → BindingsPicker-DZtFKLQ5.js} +6 -5
- package/dist/{BindingsTable-C19Bm8d6.js → BindingsTable-BmQGLuJ4.js} +28 -24
- package/dist/{ClosingDraftView-DBFIR6Xv.js → ClosingDraftView-KLtlh31f.js} +184 -176
- package/dist/{ClosingHistoryView-BEZOwsPz.js → ClosingHistoryView-Rf1yMhMj.js} +43 -41
- package/dist/{ClosingTemplateView-COifu0I6.js → ClosingTemplateView-C_IiKnGx.js} +116 -98
- package/dist/{DeliveryOrderPrintPreview-lBFtH_Rm.js → DeliveryOrderPrintPreview-UF7V005U.js} +15 -14
- package/dist/FmDroppableField-J0xUsOTV.js +154 -0
- package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-BhhmWaOl.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-BcMvEdc0.js} +74 -72
- package/dist/FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-CqAeF0wL.js +279 -0
- package/dist/{FmMultiselectDialog-CBYvYJnE.js → FmMultiselectDialog-B0aKuf2o.js} +1 -1
- package/dist/FmMultiselectDialog-BasrjBFA.js +597 -0
- package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-CLuceimk.js → FmUnitInput.vue_vue_type_script_setup_true_lang-CaYJJkXz.js} +51 -49
- package/dist/{ImportView-DYNjmjys.js → ImportView-DRSoz0uM.js} +81 -74
- package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-BXefPowE.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-DA8SlWPy.js} +5 -5
- package/dist/{IngredientGroupView-CNzK_dDv.js → IngredientGroupView-D5Laak2-.js} +73 -65
- package/dist/{IngredientsView-BnrA0ijB.js → IngredientsView-TG3fPQhR.js} +358 -345
- package/dist/{IntegrationView-DwcP5MgB.js → IntegrationView-CElpjyo7.js} +219 -209
- package/dist/{InventoryBindingForm-DeqdcXzm.js → InventoryBindingForm-CBgxRYBd.js} +1 -1
- package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-FuPTxo7z.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-Ys5GBHoQ.js} +41 -40
- package/dist/{InventoryBindingSummary-Dp0bshzL.js → InventoryBindingSummary-OK3vNWhi.js} +1 -1
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-DLvWaFvA.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-9QRntUlk.js} +5 -5
- package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-tLW9bojI.js → PremiumBadge.vue_vue_type_script_setup_true_lang-Bc01NoOn.js} +22 -21
- package/dist/{PublishView-CxIU1aI4.js → PublishView-CLMfiLjP.js} +26 -23
- package/dist/{PurchaseOrderPrintPreview-DWxp3cFM.js → PurchaseOrderPrintPreview-Dy77yWDC.js} +10 -9
- package/dist/{ReceiveRequestView-CF9ingct.js → ReceiveRequestView-BhD-NaHE.js} +324 -308
- package/dist/{RecipeView-B87vakmu.js → RecipeView-RWaO94w_.js} +73 -64
- package/dist/SingleColumnLayout.vue_vue_type_script_setup_true_lang-DY7TaxPK.js +251 -0
- package/dist/{StockView-XJY3690u.js → StockView-D5t8OxaG.js} +292 -282
- package/dist/{SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-DY1iRl1F.js → SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-3Asf1TGd.js} +1 -1
- package/dist/{SupplierView-Y2NqnJ6-.js → SupplierView-DiospFKq.js} +92 -80
- package/dist/SystemTrailDialog.vue_vue_type_script_setup_true_lang-DfCHteOF.js +177 -0
- package/dist/TableActionableRow.vue_vue_type_script_setup_true_lang-DlNJ6kRg.js +135 -0
- package/dist/TemplatePublishDialog.vue_vue_type_script_setup_true_lang-CNtvx-LA.js +123 -0
- package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-l0qRNa0W.js → TransferDetails.vue_vue_type_script_setup_true_lang-p959Op4k.js} +318 -305
- package/dist/{TransferTemplateView-DBlasHGY.js → TransferTemplateView-ePZFdZ0p.js} +228 -216
- package/dist/{UnitView-C8z90hHr.js → UnitView-Banlxw7y.js} +70 -63
- package/dist/{WarehouseView-egtnCnzo.js → WarehouseView-BL-p5hbi.js} +123 -114
- package/dist/WastageTemplateView-B1pmSuW0.js +2288 -0
- package/dist/_plugin-vue_export-helper-CHgC5LLL.js +9 -0
- package/dist/app-EpEEb8EO.js +64040 -0
- package/dist/app-rgirz_52.js +8024 -0
- package/dist/app.js +6 -6
- package/dist/closing-template-zIjwO1_E.js +117 -0
- package/dist/date2-Dnc8Y81g.js +116 -0
- package/dist/dayjs.min-TdUgzmww.js +282 -0
- package/dist/{decimal-CLM3HUsc.js → decimal-C6s3GvGb.js} +4 -3
- package/dist/defineDeepModel-BSaaXVBF.js +19 -0
- package/dist/duplicate-template-Bw0H416G.js +34 -0
- package/dist/feature-C95Hao53.js +20162 -0
- package/dist/form-mode.enum-BKiNVH6A.js +4 -0
- package/dist/format-time-from-id-DlbHo6kY.js +15 -0
- package/dist/{format-unit-display-BWoznxQp.js → format-unit-display-QBS54q0R.js} +308 -297
- package/dist/{import-export.helper-DgKnsYRB.js → import-export.helper-CUKCKtP7.js} +56 -52
- package/dist/index-CFn_9RMm.js +45 -0
- package/dist/{index-CK61uHgW.js → index-S9Ak__QC.js} +1 -1
- package/dist/{index-tMZSFG5r.js → index-goD-WGVb.js} +16 -14
- package/dist/lodash-gq8IrP4j.js +3678 -0
- package/dist/netsuite-CnhAKyAO.js +4316 -0
- package/dist/{purchase-order-template-D7dkJMqf.js → purchase-order-template-CBIpWdEW.js} +1 -1
- package/dist/router/shared.spec.d.ts +1 -0
- package/dist/row-action.enum-BcW_L_nE.js +67 -0
- package/dist/rules-DKklsaS1.js +201 -0
- package/dist/{stock-B3EEUmkF.js → stock-3K93Mif9.js} +1 -1
- package/dist/{stock-DYBHa0KN.js → stock-BW8fen3H.js} +11 -10
- package/dist/style.css +1 -1
- package/dist/{supplier-CY7Hj_a2.js → supplier-CObCSfot.js} +27 -26
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{use-ingredient-select-dialog-Dlv7Eowu.js → use-ingredient-select-dialog-DwvQiaVW.js} +4 -3
- package/dist/{use-inventory-binding-dialog-DOSfDQte.js → use-inventory-binding-dialog-CuLEHLDM.js} +4 -3
- package/dist/use-template-enabled-locations-2-DkUJeppb.js +111 -0
- package/dist/views/adjustment-template/wastage-template/table.d.ts +1 -1
- package/dist/views/closing-template/composables/use-closing-template-actions.d.ts +1 -1
- package/dist/vue-i18n-CUznvVzc.js +2365 -0
- package/dist/xlsx-bT1p3YVR.js +24004 -0
- package/dist/xlsx.util-Cr9DpDFb.js +78 -0
- package/package.json +6 -6
- package/dist/app-B5p73NM9.js +0 -130949
|
@@ -1,19 +1,35 @@
|
|
|
1
|
-
import { reactive as gt, onMounted as Ke, watch as be, computed as N, h as L, defineComponent as ce, openBlock as S, createElementBlock as T, Fragment as de, renderList as Se, createElementVNode as n, toDisplayString as M, unref as s, resolveComponent as $, createVNode as y, withCtx as A, createCommentVNode as j, ref as q, createBlock as W, normalizeClass as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
1
|
+
import { reactive as gt, onMounted as Ke, watch as be, computed as N, h as L, defineComponent as ce, openBlock as S, createElementBlock as T, Fragment as de, renderList as Se, createElementVNode as n, toDisplayString as M, unref as s, resolveComponent as $, createVNode as y, withCtx as A, createCommentVNode as j, ref as q, createBlock as W, normalizeClass as J, normalizeStyle as _t, createTextVNode as Te, nextTick as It, mergeProps as Ge, isRef as xe, createSlots as $t, Teleport as Tt, normalizeProps as Dt, guardReactiveProps as Pt } from "vue";
|
|
2
|
+
import { s as Je, G as Vt, f as ht, J as Rt, z as At, u as We, a as et, K as Et, L as Ot, t as Mt, m as Ye } from "./app-EpEEb8EO.js";
|
|
3
|
+
import { i as ft, _ as qt } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-CqAeF0wL.js";
|
|
4
|
+
import { u as Ut, P as Ze, a as Nt, _ as Bt, g as zt } from "./TransferDetails.vue_vue_type_script_setup_true_lang-p959Op4k.js";
|
|
5
|
+
import { R as Me, a as Ce, e as Qe, d as Lt, A as qe, M as Ht, B as jt } from "./rules-DKklsaS1.js";
|
|
6
|
+
import { _ as kt, u as Yt, i as Qt, e as Kt } from "./PremiumBadge.vue_vue_type_script_setup_true_lang-Bc01NoOn.js";
|
|
7
|
+
import { d as vt } from "./dayjs.min-TdUgzmww.js";
|
|
8
|
+
import { u as Xt } from "./useTabStorage-BkIVScW_.js";
|
|
9
|
+
import { u as Zt, _ as Gt } from "./SingleColumnLayout.vue_vue_type_script_setup_true_lang-DY7TaxPK.js";
|
|
10
|
+
import { useBreakpoints as tt, components as ye, FmButtonVariant as Jt, useSnackbar as De, useDialog as Wt, useProxiedModel as xt } from "@feedmepos/ui-library";
|
|
11
|
+
import { F as Oe } from "./form-mode.enum-BKiNVH6A.js";
|
|
12
|
+
import { P as ae, a as Ct } from "./format-unit-display-QBS54q0R.js";
|
|
13
|
+
import { _ as es, a as ts, b as ss, F as os } from "./FmUnitInput.vue_vue_type_script_setup_true_lang-CaYJJkXz.js";
|
|
14
|
+
import { u as st, P as as } from "./feature-C95Hao53.js";
|
|
15
|
+
import { u as Ue } from "./netsuite-CnhAKyAO.js";
|
|
16
|
+
import { c as $e, u as ns, _ as rs } from "./FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-BcMvEdc0.js";
|
|
10
17
|
import { useI18n as ge } from "@feedmepos/mf-common";
|
|
11
|
-
import "./FmMultiselectDialog-
|
|
12
|
-
import { u as
|
|
13
|
-
import {
|
|
18
|
+
import "./FmMultiselectDialog-B0aKuf2o.js";
|
|
19
|
+
import { u as ot } from "./supplier-CObCSfot.js";
|
|
20
|
+
import { a as ls } from "./FmMultiselectDialog-BasrjBFA.js";
|
|
21
|
+
import { d as St } from "./defineDeepModel-BSaaXVBF.js";
|
|
22
|
+
import { F as fe, _ as wt } from "./TableActionableRow.vue_vue_type_script_setup_true_lang-DlNJ6kRg.js";
|
|
23
|
+
import { d as at, e as is, g as us, b as ds } from "./date2-Dnc8Y81g.js";
|
|
24
|
+
import { _ as cs } from "./PreviewBadge.vue_vue_type_script_setup_true_lang-CRZiQHjx.js";
|
|
25
|
+
import { u as nt } from "./SystemTrailDialog.vue_vue_type_script_setup_true_lang-DfCHteOF.js";
|
|
26
|
+
import { u as ms } from "./vue-i18n-CUznvVzc.js";
|
|
27
|
+
import { s as ps, r as fs } from "./xlsx.util-Cr9DpDFb.js";
|
|
28
|
+
import { F as vs } from "./FmDroppableField-J0xUsOTV.js";
|
|
29
|
+
import { N as ys, H as bs } from "./app-rgirz_52.js";
|
|
14
30
|
var te = /* @__PURE__ */ ((g) => (g.Code = "Code", g.Name = "Name", g.TemplateName = "TemplateName", g.Amount = "Amount", g.Cost = "Cost", g.TotalCost = "TotalCost", g.Delete = "Delete", g))(te || {});
|
|
15
31
|
const gs = () => (ge(), L(
|
|
16
|
-
|
|
32
|
+
kt,
|
|
17
33
|
{
|
|
18
34
|
zIndex: 50,
|
|
19
35
|
class: "whitespace-nowrap"
|
|
@@ -21,7 +37,7 @@ const gs = () => (ge(), L(
|
|
|
21
37
|
`Total (${ht()})`
|
|
22
38
|
));
|
|
23
39
|
function _s(g) {
|
|
24
|
-
const { t: w } = ge(),
|
|
40
|
+
const { t: w } = ge(), l = gt({}), { breakpoints: p } = tt(), x = st(), t = Ue();
|
|
25
41
|
Ke(() => {
|
|
26
42
|
for (const v of g.items) {
|
|
27
43
|
if (!v.totalCost)
|
|
@@ -33,12 +49,12 @@ function _s(g) {
|
|
|
33
49
|
{
|
|
34
50
|
supplier: g.supplier
|
|
35
51
|
}
|
|
36
|
-
), u = v.totalCost ??
|
|
37
|
-
e ?
|
|
52
|
+
), u = v.totalCost ?? Je.reset();
|
|
53
|
+
e ? l[v.sku._id] = e.amount !== u.amount || e.precision !== u.precision : l[v.sku._id] = !0;
|
|
38
54
|
}
|
|
39
55
|
}), be([() => g.supplier], ([v]) => {
|
|
40
56
|
for (const e of g.items) {
|
|
41
|
-
if (!e.totalCost ||
|
|
57
|
+
if (!e.totalCost || l[e.sku._id] || !f(e.sku))
|
|
42
58
|
continue;
|
|
43
59
|
const { cost: u } = $e(
|
|
44
60
|
e.sku,
|
|
@@ -53,7 +69,7 @@ function _s(g) {
|
|
|
53
69
|
});
|
|
54
70
|
function f(v) {
|
|
55
71
|
var u, k, a, i, h, _, C;
|
|
56
|
-
return !!(((k = (u = v.defaultCost) == null ? void 0 : u.costPerUnit) == null ? void 0 : k.amount) ?? ((C = (_ = (h = (i = (a = g.supplier) == null ? void 0 : a.supplyItems) == null ? void 0 : i.find((
|
|
72
|
+
return !!(((k = (u = v.defaultCost) == null ? void 0 : u.costPerUnit) == null ? void 0 : k.amount) ?? ((C = (_ = (h = (i = (a = g.supplier) == null ? void 0 : a.supplyItems) == null ? void 0 : i.find((r) => r.skuId === v._id)) == null ? void 0 : h.defaultCost) == null ? void 0 : _.costPerUnit) == null ? void 0 : C.amount));
|
|
57
73
|
}
|
|
58
74
|
const F = [
|
|
59
75
|
{
|
|
@@ -168,11 +184,11 @@ function _s(g) {
|
|
|
168
184
|
header: () => w("inventory.transfer.form.items.table.Amount"),
|
|
169
185
|
minSize: 200,
|
|
170
186
|
cell(v) {
|
|
171
|
-
var i, h, _, C,
|
|
187
|
+
var i, h, _, C, r;
|
|
172
188
|
const e = v.row.original, u = (i = g.forecastAmounts) == null ? void 0 : i.find((c) => c.skuId === e.sku._id), k = u ? u.helperState === "error" ? `Predicted: ${u.amount} (out of range)` : `Predicted: ${u.amount}` : void 0, a = (C = (_ = (h = g.template) == null ? void 0 : h.purchaseOrder) == null ? void 0 : _.items) == null ? void 0 : C.find(
|
|
173
189
|
(c) => c.sku._id === e.sku._id
|
|
174
190
|
);
|
|
175
|
-
return L(
|
|
191
|
+
return L(es, {
|
|
176
192
|
style: {
|
|
177
193
|
flex: "1 1 0%"
|
|
178
194
|
},
|
|
@@ -200,7 +216,7 @@ function _s(g) {
|
|
|
200
216
|
supplier: g.supplier,
|
|
201
217
|
// NOTE: set undefined here if `manualTotalCost[updatedRow.sku._id] = false`, so that the function
|
|
202
218
|
// will return the auto calculated default cost instead of the manual total cost
|
|
203
|
-
manualTotalCost:
|
|
219
|
+
manualTotalCost: l[D.sku._id] ? D.totalCost : void 0
|
|
204
220
|
}
|
|
205
221
|
);
|
|
206
222
|
D.totalCost = B;
|
|
@@ -211,15 +227,15 @@ function _s(g) {
|
|
|
211
227
|
disableUnit: !!a,
|
|
212
228
|
disabled: g.disabled,
|
|
213
229
|
rules: [
|
|
214
|
-
|
|
230
|
+
ts(
|
|
215
231
|
+Ce(
|
|
216
|
-
((
|
|
232
|
+
((r = e.quantity) == null ? void 0 : r.amount) === 0 ? { amount: 0, precision: 0 } : (a == null ? void 0 : a.minimumQuantity) ?? { amount: 0, precision: 0 }
|
|
217
233
|
)
|
|
218
234
|
),
|
|
219
|
-
|
|
235
|
+
ss(
|
|
220
236
|
a != null && a.maximumQuantity ? +Ce(a == null ? void 0 : a.maximumQuantity) : 1 / 0
|
|
221
237
|
),
|
|
222
|
-
...a != null && a.quantityStep ? [
|
|
238
|
+
...a != null && a.quantityStep ? [os(a.quantityStep)] : []
|
|
223
239
|
],
|
|
224
240
|
applyDefaultRules: !0
|
|
225
241
|
});
|
|
@@ -232,7 +248,7 @@ function _s(g) {
|
|
|
232
248
|
size: 180,
|
|
233
249
|
cell(v) {
|
|
234
250
|
const e = v.row.original, u = f(e.sku), k = p.value.xs || p.value.sm;
|
|
235
|
-
if (!
|
|
251
|
+
if (!l[e.sku._id] && u) {
|
|
236
252
|
const { cost: a, supplierOverrideCost: i } = $e(
|
|
237
253
|
e.sku,
|
|
238
254
|
e.quantity,
|
|
@@ -253,13 +269,13 @@ function _s(g) {
|
|
|
253
269
|
[
|
|
254
270
|
L(ye.FmButton, {
|
|
255
271
|
prependIcon: "edit",
|
|
256
|
-
variant:
|
|
272
|
+
variant: Jt.Tertiary,
|
|
257
273
|
disabled: g.disabled,
|
|
258
274
|
onClick() {
|
|
259
275
|
g.updateItem({
|
|
260
276
|
...e,
|
|
261
277
|
totalCost: a
|
|
262
|
-
}),
|
|
278
|
+
}), l[e.sku._id] = !0;
|
|
263
279
|
}
|
|
264
280
|
}),
|
|
265
281
|
L(
|
|
@@ -270,7 +286,7 @@ function _s(g) {
|
|
|
270
286
|
[
|
|
271
287
|
L(
|
|
272
288
|
"span",
|
|
273
|
-
k ?
|
|
289
|
+
k ? Qe(a) : Ce(a)
|
|
274
290
|
),
|
|
275
291
|
L(
|
|
276
292
|
"span",
|
|
@@ -291,7 +307,7 @@ function _s(g) {
|
|
|
291
307
|
]
|
|
292
308
|
},
|
|
293
309
|
[
|
|
294
|
-
|
|
310
|
+
Qe(i.costPerUnit),
|
|
295
311
|
"/",
|
|
296
312
|
i.measurement ? L(
|
|
297
313
|
"span",
|
|
@@ -315,12 +331,12 @@ function _s(g) {
|
|
|
315
331
|
g.updateItem({
|
|
316
332
|
...e,
|
|
317
333
|
totalCost: {
|
|
318
|
-
...
|
|
319
|
-
currency:
|
|
334
|
+
...Lt(+a),
|
|
335
|
+
currency: Vt()
|
|
320
336
|
}
|
|
321
337
|
});
|
|
322
338
|
},
|
|
323
|
-
rules: [qe(0),
|
|
339
|
+
rules: [qe(0), Ht(2)]
|
|
324
340
|
},
|
|
325
341
|
{
|
|
326
342
|
prepend() {
|
|
@@ -354,7 +370,7 @@ function _s(g) {
|
|
|
354
370
|
// NOTE: different from PO template, if a default cost is reenabled,
|
|
355
371
|
// the total cost will automatically assigned
|
|
356
372
|
totalCost: a
|
|
357
|
-
}),
|
|
373
|
+
}), l[e.sku._id] = !1;
|
|
358
374
|
}
|
|
359
375
|
}) : null;
|
|
360
376
|
}
|
|
@@ -404,8 +420,8 @@ const hs = { class: "flex flex-col gap-8 px-16 xs:px-4 sm:px-4 py-4 items-center
|
|
|
404
420
|
prices: {}
|
|
405
421
|
},
|
|
406
422
|
setup(g) {
|
|
407
|
-
const w =
|
|
408
|
-
function
|
|
423
|
+
const w = ot();
|
|
424
|
+
function l(p) {
|
|
409
425
|
return w.suppliers.find((x) => x._id === p);
|
|
410
426
|
}
|
|
411
427
|
return (p, x) => (S(), T("div", hs, [
|
|
@@ -415,7 +431,7 @@ const hs = { class: "flex flex-col gap-8 px-16 xs:px-4 sm:px-4 py-4 items-center
|
|
|
415
431
|
key: t,
|
|
416
432
|
class: "flex items-center gap-12 xs:gap-4 xs:flex-wrap w-full"
|
|
417
433
|
}, [
|
|
418
|
-
n("div", ks, M((f =
|
|
434
|
+
n("div", ks, M((f = l(t)) == null ? void 0 : f.name), 1),
|
|
419
435
|
n("div", xs, [
|
|
420
436
|
(S(!0), T(de, null, Se(p.prices[t].slice(0, 3), (F) => {
|
|
421
437
|
var I;
|
|
@@ -424,7 +440,7 @@ const hs = { class: "flex flex-col gap-8 px-16 xs:px-4 sm:px-4 py-4 items-center
|
|
|
424
440
|
class: "flex flex-col w-[150px] xs:flex-1 text-ellipsis cursor-pointer"
|
|
425
441
|
}, [
|
|
426
442
|
n("div", Cs, [
|
|
427
|
-
n("span", null, M(F.totalCost ? s(
|
|
443
|
+
n("span", null, M(F.totalCost ? s(Qe)(F.totalCost) : "No data"), 1),
|
|
428
444
|
x[0] || (x[0] = n("span", { class: "text-fm-color-typo-secondary" }, "/", -1)),
|
|
429
445
|
n("span", null, M(s(Ce)(F.totalUnit, !1)), 1),
|
|
430
446
|
n("span", null, M(((I = F.measurement) == null ? void 0 : I.abbrev) ?? F.unit.abbrev), 1)
|
|
@@ -432,7 +448,7 @@ const hs = { class: "flex flex-col gap-8 px-16 xs:px-4 sm:px-4 py-4 items-center
|
|
|
432
448
|
n("div", Ss, [
|
|
433
449
|
n("span", null, "(#" + M(F.seqNumber) + ")", 1),
|
|
434
450
|
x[1] || (x[1] = n("span", null, M(" "), -1)),
|
|
435
|
-
n("span", null, M(s(
|
|
451
|
+
n("span", null, M(s(at)(new Date(F.date))), 1)
|
|
436
452
|
])
|
|
437
453
|
]);
|
|
438
454
|
}), 128))
|
|
@@ -454,19 +470,19 @@ const hs = { class: "flex flex-col gap-8 px-16 xs:px-4 sm:px-4 py-4 items-center
|
|
|
454
470
|
},
|
|
455
471
|
setup(g) {
|
|
456
472
|
const { t: w } = ge();
|
|
457
|
-
return (
|
|
458
|
-
var f, F, I, v, e, u, k, a, i, h, _, C,
|
|
473
|
+
return (l, p) => {
|
|
474
|
+
var f, F, I, v, e, u, k, a, i, h, _, C, r, c, D, B, Y, Q, K, O, U, V, d, b, R, X, Z;
|
|
459
475
|
const x = $("FmLabel"), t = $("FmSpacer");
|
|
460
476
|
return S(), T("div", ws, [
|
|
461
477
|
n("div", Fs, [
|
|
462
478
|
n("div", Is, [
|
|
463
|
-
n("span", $s, " (" + M(
|
|
464
|
-
n("span", Ts, M(
|
|
479
|
+
n("span", $s, " (" + M(l.row.original.sku.code) + ") ", 1),
|
|
480
|
+
n("span", Ts, M(l.row.original.sku.name), 1)
|
|
465
481
|
]),
|
|
466
482
|
n("div", null, [
|
|
467
483
|
y(s(fe), {
|
|
468
|
-
render: (I = (F = (f =
|
|
469
|
-
props: (e = (v =
|
|
484
|
+
render: (I = (F = (f = l.cellByColId.Delete) == null ? void 0 : f.column) == null ? void 0 : F.columnDef) == null ? void 0 : I.cell,
|
|
485
|
+
props: (e = (v = l.cellByColId.Delete) == null ? void 0 : v.getContext) == null ? void 0 : e.call(v)
|
|
470
486
|
}, null, 8, ["render", "props"])
|
|
471
487
|
])
|
|
472
488
|
]),
|
|
@@ -476,8 +492,8 @@ const hs = { class: "flex flex-col gap-8 px-16 xs:px-4 sm:px-4 py-4 items-center
|
|
|
476
492
|
label: s(w)(`inventory.transfer.form.items.table.${s(te).Code}`)
|
|
477
493
|
}, null, 8, ["label"]),
|
|
478
494
|
y(s(fe), {
|
|
479
|
-
render: (a = (k = (u =
|
|
480
|
-
props: (h = (i =
|
|
495
|
+
render: (a = (k = (u = l.cellByColId[s(te).Code]) == null ? void 0 : u.column) == null ? void 0 : k.columnDef) == null ? void 0 : a.cell,
|
|
496
|
+
props: (h = (i = l.cellByColId[s(te).Code]) == null ? void 0 : i.getContext) == null ? void 0 : h.call(i)
|
|
481
497
|
}, null, 8, ["render", "props"]),
|
|
482
498
|
p[0] || (p[0] = n("div", { class: "fm-typo-en-body-md-600 text-fm-color-primary" }, null, -1))
|
|
483
499
|
]),
|
|
@@ -486,8 +502,8 @@ const hs = { class: "flex flex-col gap-8 px-16 xs:px-4 sm:px-4 py-4 items-center
|
|
|
486
502
|
label: s(w)(`inventory.transfer.form.items.table.${s(te).Name}`)
|
|
487
503
|
}, null, 8, ["label"]),
|
|
488
504
|
y(s(fe), {
|
|
489
|
-
render: (
|
|
490
|
-
props: (D = (c =
|
|
505
|
+
render: (r = (C = (_ = l.cellByColId[s(te).Name]) == null ? void 0 : _.column) == null ? void 0 : C.columnDef) == null ? void 0 : r.cell,
|
|
506
|
+
props: (D = (c = l.cellByColId[s(te).Name]) == null ? void 0 : c.getContext) == null ? void 0 : D.call(c)
|
|
491
507
|
}, null, 8, ["render", "props"]),
|
|
492
508
|
p[1] || (p[1] = n("div", { class: "fm-typo-en-body-md-600 text-fm-color-primary" }, null, -1))
|
|
493
509
|
])
|
|
@@ -498,13 +514,13 @@ const hs = { class: "flex flex-col gap-8 px-16 xs:px-4 sm:px-4 py-4 items-center
|
|
|
498
514
|
label: s(w)(`inventory.transfer.form.items.table.${s(te).Amount}`)
|
|
499
515
|
}, null, 8, ["label"]),
|
|
500
516
|
y(s(fe), {
|
|
501
|
-
render: (
|
|
502
|
-
props: (O = (K =
|
|
517
|
+
render: (Q = (Y = (B = l.cellByColId[s(te).Amount]) == null ? void 0 : B.column) == null ? void 0 : Y.columnDef) == null ? void 0 : Q.cell,
|
|
518
|
+
props: (O = (K = l.cellByColId[s(te).Amount]) == null ? void 0 : K.getContext) == null ? void 0 : O.call(K)
|
|
503
519
|
}, null, 8, ["render", "props"]),
|
|
504
520
|
p[2] || (p[2] = n("div", { class: "fm-typo-en-body-md-600 text-fm-color-primary" }, null, -1))
|
|
505
521
|
]),
|
|
506
|
-
|
|
507
|
-
y(
|
|
522
|
+
l.cellByColId[s(te).Cost] ? (S(), T("div", Es, [
|
|
523
|
+
y(kt, { "z-index": 50 }, {
|
|
508
524
|
default: A(() => [
|
|
509
525
|
y(x, {
|
|
510
526
|
label: s(w)(`inventory.transfer.form.items.table.${s(te).Cost}2`)
|
|
@@ -513,16 +529,16 @@ const hs = { class: "flex flex-col gap-8 px-16 xs:px-4 sm:px-4 py-4 items-center
|
|
|
513
529
|
_: 1
|
|
514
530
|
}),
|
|
515
531
|
y(s(fe), {
|
|
516
|
-
render: (d = (V = (U =
|
|
517
|
-
props: (R = (b =
|
|
532
|
+
render: (d = (V = (U = l.cellByColId[s(te).Cost]) == null ? void 0 : U.column) == null ? void 0 : V.columnDef) == null ? void 0 : d.cell,
|
|
533
|
+
props: (R = (b = l.cellByColId[s(te).Cost]) == null ? void 0 : b.getContext) == null ? void 0 : R.call(b)
|
|
518
534
|
}, null, 8, ["render", "props"]),
|
|
519
535
|
p[3] || (p[3] = n("div", { class: "fm-typo-en-body-md-600 text-fm-color-primary" }, null, -1))
|
|
520
536
|
])) : j("", !0)
|
|
521
537
|
]),
|
|
522
|
-
|
|
538
|
+
l.showComparePrice && Object.keys(l.comparePriceBySku[(X = l.row.original.sku) == null ? void 0 : X._id] ?? {}).length > 0 ? (S(), T(de, { key: 0 }, [
|
|
523
539
|
y(t, { class: "h-8" }),
|
|
524
540
|
y(Ft, {
|
|
525
|
-
prices:
|
|
541
|
+
prices: l.comparePriceBySku[(Z = l.row.original.sku) == null ? void 0 : Z._id]
|
|
526
542
|
}, null, 8, ["prices"])
|
|
527
543
|
], 64)) : j("", !0)
|
|
528
544
|
]);
|
|
@@ -538,7 +554,7 @@ function Ms(g) {
|
|
|
538
554
|
set(t) {
|
|
539
555
|
g.setEffectiveAt((t == null ? void 0 : t.toISOString()) ?? null);
|
|
540
556
|
}
|
|
541
|
-
}),
|
|
557
|
+
}), l = N({
|
|
542
558
|
get() {
|
|
543
559
|
return !!w.value;
|
|
544
560
|
},
|
|
@@ -547,14 +563,14 @@ function Ms(g) {
|
|
|
547
563
|
}
|
|
548
564
|
}), p = N({
|
|
549
565
|
get() {
|
|
550
|
-
return w.value === null ? "" :
|
|
566
|
+
return w.value === null ? "" : at(w.value);
|
|
551
567
|
},
|
|
552
568
|
set(t) {
|
|
553
569
|
t ? w.value = /* @__PURE__ */ new Date(`${t} ${x.value}`) : w.value = null;
|
|
554
570
|
}
|
|
555
571
|
}), x = N({
|
|
556
572
|
get() {
|
|
557
|
-
return w.value === null ? "" :
|
|
573
|
+
return w.value === null ? "" : is(w.value);
|
|
558
574
|
},
|
|
559
575
|
set(t) {
|
|
560
576
|
t ? w.value = /* @__PURE__ */ new Date(`${p.value} ${t}`) : w.value = null;
|
|
@@ -562,7 +578,7 @@ function Ms(g) {
|
|
|
562
578
|
});
|
|
563
579
|
return {
|
|
564
580
|
backdatePo: w,
|
|
565
|
-
backdateSwitch:
|
|
581
|
+
backdateSwitch: l,
|
|
566
582
|
backdateModel: p,
|
|
567
583
|
backdateTimeModel: x
|
|
568
584
|
};
|
|
@@ -586,7 +602,7 @@ const qs = {
|
|
|
586
602
|
}
|
|
587
603
|
},
|
|
588
604
|
setup(g) {
|
|
589
|
-
return (w,
|
|
605
|
+
return (w, l) => (S(), T("svg", qs, [
|
|
590
606
|
n("path", {
|
|
591
607
|
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",
|
|
592
608
|
fill: g.color
|
|
@@ -611,7 +627,7 @@ const qs = {
|
|
|
611
627
|
}, null, 8, zs)
|
|
612
628
|
]));
|
|
613
629
|
}
|
|
614
|
-
}), Hs = { class: "flex gap-8 items-center" }, js = { class: "fm-typo-en-body-lg-600 line-clamp-1" },
|
|
630
|
+
}), Hs = { class: "flex gap-8 items-center" }, js = { class: "fm-typo-en-body-lg-600 line-clamp-1" }, Ys = { class: "w-[343px] px-24 py-16 rounded-lg shadow-light-300 flex flex-col gap-[20px]" }, Qs = { 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({
|
|
615
631
|
__name: "ForecastStock",
|
|
616
632
|
props: {
|
|
617
633
|
templateId: {},
|
|
@@ -621,7 +637,7 @@ const qs = {
|
|
|
621
637
|
},
|
|
622
638
|
emits: ["update:poItems", "update:forecastAmounts"],
|
|
623
639
|
setup(g, { emit: w }) {
|
|
624
|
-
const
|
|
640
|
+
const l = g, p = w, x = q(!1), t = q(7), f = Yt(), F = De(), { t: I } = ge();
|
|
625
641
|
function v(a, i, h) {
|
|
626
642
|
return i != null && a < i && (a = i), h != null && a > h && (a = h), a;
|
|
627
643
|
}
|
|
@@ -635,13 +651,13 @@ const qs = {
|
|
|
635
651
|
name: h,
|
|
636
652
|
baseAmount: _,
|
|
637
653
|
measurement: C,
|
|
638
|
-
min:
|
|
654
|
+
min: r,
|
|
639
655
|
max: c
|
|
640
656
|
}) {
|
|
641
657
|
if (C) {
|
|
642
658
|
const D = C.conversion.amount;
|
|
643
659
|
let B = Math.ceil(_ / D);
|
|
644
|
-
return B = v(B,
|
|
660
|
+
return B = v(B, r, c), {
|
|
645
661
|
sku: a,
|
|
646
662
|
code: i,
|
|
647
663
|
name: h,
|
|
@@ -649,7 +665,7 @@ const qs = {
|
|
|
649
665
|
measurement: C
|
|
650
666
|
};
|
|
651
667
|
} else {
|
|
652
|
-
const D = Math.ceil(v(_,
|
|
668
|
+
const D = Math.ceil(v(_, r, c));
|
|
653
669
|
return {
|
|
654
670
|
sku: a,
|
|
655
671
|
code: i,
|
|
@@ -661,7 +677,7 @@ const qs = {
|
|
|
661
677
|
}
|
|
662
678
|
async function k() {
|
|
663
679
|
if (t.value < 1) return;
|
|
664
|
-
x.value = !1, await f.readPurchaseOrder(t.value,
|
|
680
|
+
x.value = !1, await f.readPurchaseOrder(t.value, l.templateId);
|
|
665
681
|
const a = f.purchaseOrderForecast.skus;
|
|
666
682
|
if (a.length === 0) {
|
|
667
683
|
F.open({
|
|
@@ -670,13 +686,13 @@ const qs = {
|
|
|
670
686
|
});
|
|
671
687
|
return;
|
|
672
688
|
}
|
|
673
|
-
const i =
|
|
689
|
+
const i = l.templateItems.reduce((_, C) => {
|
|
674
690
|
var B;
|
|
675
|
-
const
|
|
691
|
+
const r = (B = l.poItems) == null ? void 0 : B.find((Y) => Y.sku._id === C.sku._id), c = a.find((Y) => Y.id === C.sku._id);
|
|
676
692
|
if (!c)
|
|
677
|
-
return
|
|
678
|
-
if (!
|
|
679
|
-
const D = c.amount ?? e(
|
|
693
|
+
return r && _.push(r), _;
|
|
694
|
+
if (!l.templateId && c.amount <= 0) return _;
|
|
695
|
+
const D = c.amount ?? e(r == null ? void 0 : r.quantity) ?? 0;
|
|
680
696
|
return _.push(
|
|
681
697
|
u({
|
|
682
698
|
sku: C.sku,
|
|
@@ -689,21 +705,21 @@ const qs = {
|
|
|
689
705
|
})
|
|
690
706
|
), _;
|
|
691
707
|
}, []), h = a.map((_) => {
|
|
692
|
-
const C =
|
|
693
|
-
let
|
|
708
|
+
const C = l.templateItems.find((Q) => Q.sku._id === _.id);
|
|
709
|
+
let r = _.amount, c = 0;
|
|
694
710
|
if (C != null && C.measurement) {
|
|
695
|
-
const
|
|
696
|
-
|
|
711
|
+
const Q = e(C.measurement.conversion) ?? 1;
|
|
712
|
+
r = Math.ceil(_.amount / Q);
|
|
697
713
|
} else
|
|
698
|
-
|
|
699
|
-
const D = e(C == null ? void 0 : C.minimumQuantity) ?? 0, B = e(C == null ? void 0 : C.maximumQuantity) ?? 1 / 0,
|
|
700
|
-
return { skuId: _.id, amount:
|
|
714
|
+
r = Math.ceil(_.amount);
|
|
715
|
+
const D = e(C == null ? void 0 : C.minimumQuantity) ?? 0, B = e(C == null ? void 0 : C.maximumQuantity) ?? 1 / 0, Y = r < D || r > B ? "error" : "success";
|
|
716
|
+
return { skuId: _.id, amount: r, precision: c, helperState: Y };
|
|
701
717
|
});
|
|
702
718
|
p("update:poItems", i), p("update:forecastAmounts", h);
|
|
703
719
|
}
|
|
704
720
|
return (a, i) => {
|
|
705
|
-
const h = $("FmButton"), _ = $("FmIcon"), C = $("FmStepperField"),
|
|
706
|
-
return S(), W(
|
|
721
|
+
const h = $("FmButton"), _ = $("FmIcon"), C = $("FmStepperField"), r = $("FmPopover");
|
|
722
|
+
return S(), W(r, {
|
|
707
723
|
disabled: a.disabled,
|
|
708
724
|
class: "flex",
|
|
709
725
|
"show-popover": x.value,
|
|
@@ -731,10 +747,10 @@ const qs = {
|
|
|
731
747
|
}, 8, ["text-color", "border-color", "disabled"])
|
|
732
748
|
]),
|
|
733
749
|
default: A(() => [
|
|
734
|
-
n("div",
|
|
735
|
-
n("div",
|
|
750
|
+
n("div", Ys, [
|
|
751
|
+
n("div", Qs, [
|
|
736
752
|
n("div", Ks, [
|
|
737
|
-
y(
|
|
753
|
+
y(cs, { "z-index": 99 }, {
|
|
738
754
|
default: A(() => [
|
|
739
755
|
n("p", Xs, M(s(I)("inventory.transfer.form.items.forecastStock.title")), 1)
|
|
740
756
|
]),
|
|
@@ -761,12 +777,12 @@ const qs = {
|
|
|
761
777
|
size: "sm",
|
|
762
778
|
class: "text-fm-color-system-warning-300"
|
|
763
779
|
}),
|
|
764
|
-
n("div",
|
|
780
|
+
n("div", Gs, M(s(I)("inventory.transfer.form.items.forecastStock.replace")), 1)
|
|
765
781
|
])
|
|
766
782
|
]),
|
|
767
783
|
_: 1
|
|
768
784
|
}, 8, ["modelValue", "label", "rules"]),
|
|
769
|
-
n("div",
|
|
785
|
+
n("div", Js, [
|
|
770
786
|
i[4] || (i[4] = n("div", { class: "grow" }, null, -1)),
|
|
771
787
|
y(h, {
|
|
772
788
|
label: s(I)("common.cancel"),
|
|
@@ -786,21 +802,21 @@ const qs = {
|
|
|
786
802
|
}
|
|
787
803
|
});
|
|
788
804
|
function eo() {
|
|
789
|
-
const g = De(), w =
|
|
790
|
-
be(
|
|
805
|
+
const g = De(), w = nt(), l = q(!1);
|
|
806
|
+
be(l, (f) => {
|
|
791
807
|
f && (x.value = !0, p().finally(() => {
|
|
792
808
|
x.value = !1;
|
|
793
809
|
}));
|
|
794
810
|
});
|
|
795
811
|
async function p() {
|
|
796
812
|
try {
|
|
797
|
-
const { startDate: f, endDate: F } =
|
|
813
|
+
const { startDate: f, endDate: F } = us(6), e = (await w.getPurchaseOrders({ start: f, end: F })).filter(
|
|
798
814
|
(u) => {
|
|
799
815
|
var k, a;
|
|
800
|
-
return u.status ===
|
|
816
|
+
return u.status === Rt.enum.COMPLETE && ((k = u.supplier) == null ? void 0 : k.internal) !== "warehouse" && ((a = u.supplier) == null ? void 0 : a.internal) !== "restaurant";
|
|
801
817
|
}
|
|
802
818
|
).reduce((u, k) => {
|
|
803
|
-
const a = new Date(
|
|
819
|
+
const a = new Date(At(k._id)), i = k.supplier._id;
|
|
804
820
|
for (const h of k.items) {
|
|
805
821
|
if (!h.totalCost) continue;
|
|
806
822
|
const _ = u[h.sku._id] ?? {}, C = _[i] ?? [];
|
|
@@ -820,12 +836,12 @@ function eo() {
|
|
|
820
836
|
g.open({
|
|
821
837
|
title: "Something went wrong",
|
|
822
838
|
message: "Cannot retrieve supplier purchase history. Please try again."
|
|
823
|
-
}),
|
|
839
|
+
}), l.value = !1;
|
|
824
840
|
}
|
|
825
841
|
}
|
|
826
842
|
const x = q(!1), t = q({});
|
|
827
843
|
return {
|
|
828
|
-
comparePricesToggle:
|
|
844
|
+
comparePricesToggle: l,
|
|
829
845
|
comparePriceFetching: x,
|
|
830
846
|
comparePriceBySku: t
|
|
831
847
|
};
|
|
@@ -841,22 +857,22 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
841
857
|
},
|
|
842
858
|
emits: ["update:item"],
|
|
843
859
|
setup(g) {
|
|
844
|
-
function w(
|
|
845
|
-
return
|
|
860
|
+
function w(l) {
|
|
861
|
+
return l.column.columnDef.meta;
|
|
846
862
|
}
|
|
847
|
-
return (
|
|
863
|
+
return (l, p) => {
|
|
848
864
|
var x, t;
|
|
849
865
|
return S(), T(de, null, [
|
|
850
866
|
n("tr", {
|
|
851
|
-
class:
|
|
852
|
-
"bg-fm-color-neutral-gray-100":
|
|
867
|
+
class: J(["border-b border-fm-color-neutral-gray-100 hover:bg-fm-color-opacity-sm", {
|
|
868
|
+
"bg-fm-color-neutral-gray-100": l.row.getIsSelected()
|
|
853
869
|
}])
|
|
854
870
|
}, [
|
|
855
|
-
(S(!0), T(de, null, Se(
|
|
871
|
+
(S(!0), T(de, null, Se(l.row.getVisibleCells(), (f) => {
|
|
856
872
|
var F, I, v, e;
|
|
857
873
|
return S(), T("td", {
|
|
858
874
|
key: f.id,
|
|
859
|
-
class:
|
|
875
|
+
class: J(["h-[56px] text-fm-color-typo-primary", ((F = w(f)) == null ? void 0 : F.cellClass) ?? "px-16"]),
|
|
860
876
|
style: _t({
|
|
861
877
|
width: (I = w(f)) == null ? void 0 : I.width,
|
|
862
878
|
maxWidth: (v = w(f)) == null ? void 0 : v.maxWidth,
|
|
@@ -872,12 +888,12 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
872
888
|
], 6);
|
|
873
889
|
}), 128))
|
|
874
890
|
], 2),
|
|
875
|
-
|
|
891
|
+
l.showComparePrice && Object.keys(l.comparePriceBySku[(x = l.row.original.sku) == null ? void 0 : x._id] ?? {}).length > 0 ? (S(), T("tr", so, [
|
|
876
892
|
n("td", {
|
|
877
|
-
colspan:
|
|
893
|
+
colspan: l.row.getVisibleCells().length
|
|
878
894
|
}, [
|
|
879
895
|
y(Ft, {
|
|
880
|
-
prices:
|
|
896
|
+
prices: l.comparePriceBySku[(t = l.row.original.sku) == null ? void 0 : t._id]
|
|
881
897
|
}, null, 8, ["prices"])
|
|
882
898
|
], 8, oo)
|
|
883
899
|
])) : j("", !0)
|
|
@@ -887,7 +903,7 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
887
903
|
}), no = {
|
|
888
904
|
key: 0,
|
|
889
905
|
class: "flex flex-col gap-8"
|
|
890
|
-
},
|
|
906
|
+
}, ro = { class: "flex flex-col gap-4" }, lo = { class: "flex items-center gap-4" }, io = {
|
|
891
907
|
key: 0,
|
|
892
908
|
class: "fm-typo-en-body-sm-400 text-fm-color-typo-error"
|
|
893
909
|
}, uo = /* @__PURE__ */ ce({
|
|
@@ -902,7 +918,7 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
902
918
|
},
|
|
903
919
|
emits: ["netsuite:ready"],
|
|
904
920
|
setup(g, { emit: w }) {
|
|
905
|
-
const
|
|
921
|
+
const l = Ue(), p = g, x = w, { t } = ms(), f = q(!1), F = q();
|
|
906
922
|
Ke(() => {
|
|
907
923
|
var u, k, a, i;
|
|
908
924
|
let e = {
|
|
@@ -910,12 +926,12 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
910
926
|
subsidiary: { id: "", name: "" },
|
|
911
927
|
errors: []
|
|
912
928
|
};
|
|
913
|
-
if (!
|
|
929
|
+
if (!l.isEnabled || !p.required) {
|
|
914
930
|
x("netsuite:ready", e);
|
|
915
931
|
return;
|
|
916
932
|
}
|
|
917
933
|
try {
|
|
918
|
-
const h =
|
|
934
|
+
const h = l.currentLocationSubsidiary();
|
|
919
935
|
p.setting ? e = {
|
|
920
936
|
...p.setting,
|
|
921
937
|
subsidiary: {
|
|
@@ -929,42 +945,42 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
929
945
|
name: h.name
|
|
930
946
|
}
|
|
931
947
|
};
|
|
932
|
-
const _ =
|
|
933
|
-
if (
|
|
934
|
-
const c =
|
|
935
|
-
|
|
948
|
+
const _ = l.getAvailableItems(h.id), C = p.items.filter((r) => {
|
|
949
|
+
if (r.measurement != null) {
|
|
950
|
+
const c = l.getAvailableMeasurements(
|
|
951
|
+
r.sku._id,
|
|
936
952
|
h.id
|
|
937
953
|
);
|
|
938
|
-
return _.includes(
|
|
954
|
+
return _.includes(r.sku._id) && c.includes(r.measurement.id);
|
|
939
955
|
}
|
|
940
|
-
return _.includes(
|
|
941
|
-
}).map((
|
|
956
|
+
return _.includes(r.sku._id);
|
|
957
|
+
}).map((r) => r.sku._id);
|
|
942
958
|
p.onChange(
|
|
943
|
-
p.items.filter((
|
|
959
|
+
p.items.filter((r) => C.includes(r.sku._id)),
|
|
944
960
|
e
|
|
945
961
|
);
|
|
946
962
|
} finally {
|
|
947
|
-
p.supplier.internal ? F.value =
|
|
963
|
+
p.supplier.internal ? F.value = l.getNetSuiteLocation(
|
|
948
964
|
`${p.supplier.internal}_${p.supplier._id}`
|
|
949
|
-
) : F.value =
|
|
950
|
-
const h = p.supplier.internal ?
|
|
951
|
-
!
|
|
965
|
+
) : F.value = l.getNetSuiteVendor(p.supplier._id);
|
|
966
|
+
const h = p.supplier.internal ? l.getLocationSubsidiary((u = F.value) == null ? void 0 : u.netSuiteId).id : (k = F.value) == null ? void 0 : k.subsidiaryId, _ = p.supplier.internal ? (a = l.currentLocationSubsidiary()) == null ? void 0 : a.id : (i = l.currentVendorSubsidiary(p.supplier._id)) == null ? void 0 : i.id;
|
|
967
|
+
!l.isEnabled || h && l.isEnabled && h == _ ? x("netsuite:ready", e) : f.value = !0;
|
|
952
968
|
}
|
|
953
969
|
});
|
|
954
970
|
const I = N(
|
|
955
|
-
() => p.supplier.internal ?
|
|
971
|
+
() => p.supplier.internal ? l.currentLocationSubsidiary() : l.currentVendorSubsidiary(p.supplier._id)
|
|
956
972
|
), v = N(() => {
|
|
957
973
|
var e, u;
|
|
958
974
|
return F.value == null ? `Cannot find the NetSuite location for "${p.supplier.name}"` : `The subsidiary of the request
|
|
959
|
-
location is ${(u =
|
|
975
|
+
location is ${(u = l.getLocationSubsidiary((e = F.value) == null ? void 0 : e.netSuiteId)) == null ? void 0 : u.fullName}`;
|
|
960
976
|
});
|
|
961
977
|
return (e, u) => {
|
|
962
978
|
const k = $("FmLabel"), a = $("FmIcon"), i = $("FmField"), h = $("FmTooltip");
|
|
963
|
-
return s(
|
|
979
|
+
return s(l).isEnabled && p.required ? (S(), T("div", no, [
|
|
964
980
|
y(k, {
|
|
965
981
|
label: `NetSuite ${s(t)("inventory.transfer.form.netsuite.subsidiary")}`
|
|
966
982
|
}, null, 8, ["label"]),
|
|
967
|
-
n("div",
|
|
983
|
+
n("div", ro, [
|
|
968
984
|
y(h, {
|
|
969
985
|
"z-index": 51,
|
|
970
986
|
placement: "left",
|
|
@@ -978,14 +994,14 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
978
994
|
default: A(() => {
|
|
979
995
|
var _;
|
|
980
996
|
return [
|
|
981
|
-
n("div",
|
|
997
|
+
n("div", lo, [
|
|
982
998
|
y(a, {
|
|
983
999
|
name: "lock_outline",
|
|
984
1000
|
size: "sm",
|
|
985
1001
|
color: e.disabled ? "neutral-gray-200" : "neutral-gray-400"
|
|
986
1002
|
}, null, 8, ["color"]),
|
|
987
1003
|
n("div", {
|
|
988
|
-
class:
|
|
1004
|
+
class: J([e.disabled ? "text-fm-color-typo-disabled" : ""])
|
|
989
1005
|
}, M((_ = I.value) == null ? void 0 : _.fullName), 3)
|
|
990
1006
|
])
|
|
991
1007
|
];
|
|
@@ -1020,10 +1036,10 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
1020
1036
|
lastClosingDate: {}
|
|
1021
1037
|
},
|
|
1022
1038
|
emits: ["validation-success", "form:ready"],
|
|
1023
|
-
setup(g, { expose: w, emit:
|
|
1024
|
-
const p = g, x =
|
|
1039
|
+
setup(g, { expose: w, emit: l }) {
|
|
1040
|
+
const p = g, x = l, t = St(), { t: f } = ge(), F = We(), I = et(), v = Ue(), e = ot(), u = st(), k = Ct(), { breakpoints: a } = tt(), i = N(() => a.value.xs || a.value.sm), h = gt({
|
|
1025
1041
|
value: !1
|
|
1026
|
-
}), _ = q(!1), C = q(0),
|
|
1042
|
+
}), _ = q(!1), C = q(0), r = q([]), c = N(
|
|
1027
1043
|
() => {
|
|
1028
1044
|
var o;
|
|
1029
1045
|
return ((o = p.modelValue) == null ? void 0 : o.templateDoc) ?? k.templates.find((m) => m._id === t.template);
|
|
@@ -1037,27 +1053,27 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
1037
1053
|
if (D.value) {
|
|
1038
1054
|
const H = (m = o.purchaseOrder) == null ? void 0 : m.supplier.internal;
|
|
1039
1055
|
if (H && (H == "restaurant" || H == "warehouse")) {
|
|
1040
|
-
const ne = (E = o.purchaseOrder) == null ? void 0 : E.supplier._id, me = `${H}_${ne}`,
|
|
1041
|
-
(
|
|
1056
|
+
const ne = (E = o.purchaseOrder) == null ? void 0 : E.supplier._id, me = `${H}_${ne}`, G = F.allLocations.find(
|
|
1057
|
+
(re) => re.type === H && re.dbName === me
|
|
1042
1058
|
);
|
|
1043
|
-
if (
|
|
1044
|
-
const
|
|
1059
|
+
if (G) {
|
|
1060
|
+
const re = {
|
|
1045
1061
|
...o.purchaseOrder.supplier,
|
|
1046
|
-
name:
|
|
1047
|
-
contactName:
|
|
1048
|
-
email:
|
|
1049
|
-
phoneNumber:
|
|
1050
|
-
registrationNumber:
|
|
1051
|
-
address:
|
|
1052
|
-
preparationTime:
|
|
1062
|
+
name: G.doc.profile.name,
|
|
1063
|
+
contactName: G.doc.profile.name,
|
|
1064
|
+
email: G.doc.profile.email,
|
|
1065
|
+
phoneNumber: G.doc.profile.phoneNo,
|
|
1066
|
+
registrationNumber: G.doc.profile.regNo,
|
|
1067
|
+
address: G.doc.profile.address,
|
|
1068
|
+
preparationTime: G.preparationTime
|
|
1053
1069
|
};
|
|
1054
|
-
t.supplier =
|
|
1070
|
+
t.supplier = re;
|
|
1055
1071
|
}
|
|
1056
1072
|
} else {
|
|
1057
1073
|
const ne = e.suppliers.find(
|
|
1058
1074
|
(me) => {
|
|
1059
|
-
var
|
|
1060
|
-
return me._id === ((
|
|
1075
|
+
var G;
|
|
1076
|
+
return me._id === ((G = o.purchaseOrder.supplier) == null ? void 0 : G._id);
|
|
1061
1077
|
}
|
|
1062
1078
|
);
|
|
1063
1079
|
t.supplier = ne ?? t.supplier;
|
|
@@ -1079,12 +1095,12 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
1079
1095
|
m.value && H.value && x("form:ready");
|
|
1080
1096
|
});
|
|
1081
1097
|
const B = N(
|
|
1082
|
-
() => F.currentLocation.type ===
|
|
1098
|
+
() => F.currentLocation.type === Et.restaurant
|
|
1083
1099
|
);
|
|
1084
1100
|
F.watchLocation(async () => {
|
|
1085
1101
|
location && (t.supplier || (t.supplier = e.suppliers.find((o) => o) ?? t.supplier));
|
|
1086
1102
|
});
|
|
1087
|
-
const
|
|
1103
|
+
const Y = Wt(), Q = ns(
|
|
1088
1104
|
() => t,
|
|
1089
1105
|
(o) => {
|
|
1090
1106
|
Object.assign(t, o);
|
|
@@ -1099,7 +1115,7 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
1099
1115
|
set(o) {
|
|
1100
1116
|
var E;
|
|
1101
1117
|
const m = typeof ((E = t == null ? void 0 : t.supplier) == null ? void 0 : E.internal) == "string" ? ae.TRANSFER : ae.PURCHASE;
|
|
1102
|
-
o !== m && (t.supplier = o === ae.PURCHASE ?
|
|
1118
|
+
o !== m && (t.supplier = o === ae.PURCHASE ? Q.locationOptionsTypePurchase.value[0] : Q.locationOptionsTypeTransfer.value[0]);
|
|
1103
1119
|
}
|
|
1104
1120
|
});
|
|
1105
1121
|
be(
|
|
@@ -1110,7 +1126,7 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
1110
1126
|
(o) => {
|
|
1111
1127
|
u.mustUsePoTemplate && !o && It(() => {
|
|
1112
1128
|
var m, E;
|
|
1113
|
-
t.supplier = ((E = (m =
|
|
1129
|
+
t.supplier = ((E = (m = Q.locationOptionsTypeTransfer.value) == null ? void 0 : m.filter(
|
|
1114
1130
|
(H) => H.internal === "restaurant"
|
|
1115
1131
|
)) == null ? void 0 : E[0]) ?? t.supplier;
|
|
1116
1132
|
});
|
|
@@ -1118,7 +1134,7 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
1118
1134
|
{ immediate: !0 }
|
|
1119
1135
|
);
|
|
1120
1136
|
const O = N(() => {
|
|
1121
|
-
let o =
|
|
1137
|
+
let o = Q.transferLocationOptions.value;
|
|
1122
1138
|
return u.mustUsePoTemplate && !t.template && (o = o.filter((m) => {
|
|
1123
1139
|
var E;
|
|
1124
1140
|
return (E = m.sublabel) == null ? void 0 : E.startsWith("restaurant");
|
|
@@ -1129,7 +1145,7 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
1129
1145
|
return (o = t.supplier) == null ? void 0 : o._id;
|
|
1130
1146
|
},
|
|
1131
1147
|
set(o) {
|
|
1132
|
-
|
|
1148
|
+
Q.transferLocationModel.value = o;
|
|
1133
1149
|
}
|
|
1134
1150
|
}), V = N({
|
|
1135
1151
|
get() {
|
|
@@ -1145,24 +1161,24 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
1145
1161
|
setEffectiveAt(o) {
|
|
1146
1162
|
t.effectiveAt = o;
|
|
1147
1163
|
}
|
|
1148
|
-
}), { comparePricesToggle: Z, comparePriceFetching: he, comparePriceBySku: ke } = eo(),
|
|
1164
|
+
}), { comparePricesToggle: Z, comparePriceFetching: he, comparePriceBySku: ke } = eo(), le = q();
|
|
1149
1165
|
w({
|
|
1150
1166
|
validateInputs: () => {
|
|
1151
1167
|
var o, m;
|
|
1152
|
-
(m = (o =
|
|
1168
|
+
(m = (o = le.value) == null ? void 0 : o.validateInputs) == null || m.call(o);
|
|
1153
1169
|
},
|
|
1154
1170
|
resetInputsValidation: () => {
|
|
1155
1171
|
var o, m;
|
|
1156
|
-
(m = (o =
|
|
1172
|
+
(m = (o = le.value) == null ? void 0 : o.resetInputsValidation) == null || m.call(o);
|
|
1157
1173
|
},
|
|
1158
1174
|
resetInputs: () => {
|
|
1159
1175
|
var o, m;
|
|
1160
|
-
(m = (o =
|
|
1176
|
+
(m = (o = le.value) == null ? void 0 : o.resetInputs) == null || m.call(o);
|
|
1161
1177
|
}
|
|
1162
1178
|
});
|
|
1163
1179
|
const we = N(() => ({
|
|
1164
1180
|
updateItem: (o) => {
|
|
1165
|
-
const m =
|
|
1181
|
+
const m = Ot.parse(o);
|
|
1166
1182
|
t.items = t.items.map((E) => E.id && E.id !== o.id || !E.id && E.sku._id !== o.sku._id ? E : m);
|
|
1167
1183
|
},
|
|
1168
1184
|
deleteItem: (o) => {
|
|
@@ -1189,12 +1205,12 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
1189
1205
|
return p.disabled;
|
|
1190
1206
|
},
|
|
1191
1207
|
get forecastAmounts() {
|
|
1192
|
-
return
|
|
1208
|
+
return r.value;
|
|
1193
1209
|
}
|
|
1194
1210
|
}), Be = N(() => Ne.columnDefs.value);
|
|
1195
1211
|
function ze() {
|
|
1196
|
-
var
|
|
1197
|
-
const o = (He = (Fe = (
|
|
1212
|
+
var re, Fe, He, Ae, je;
|
|
1213
|
+
const o = (He = (Fe = (re = c.value) == null ? void 0 : re.purchaseOrder) == null ? void 0 : Fe.items) == null ? void 0 : He.groupBy((z) => z.sku._id), m = v.isEnabled ? v.getAvailableItems((je = (Ae = t.netSuite) == null ? void 0 : Ae.subsidiary) == null ? void 0 : je.id) : [], E = o != null && o.size ? I.skus.filter((z) => o.has(z._id)) : I.skus, H = v.isEnabled ? E.filter((z) => {
|
|
1198
1214
|
var ie, se, ue, pe;
|
|
1199
1215
|
const ee = (se = (ie = c.value) == null ? void 0 : ie.purchaseOrder) == null ? void 0 : se.items.find(
|
|
1200
1216
|
(ve) => ve.sku._id === z._id
|
|
@@ -1221,7 +1237,7 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
1221
1237
|
), me = ne.filter((z) => {
|
|
1222
1238
|
var ee;
|
|
1223
1239
|
return (ee = t.items) == null ? void 0 : ee.find((ie) => ie.sku._id === z.value._id);
|
|
1224
|
-
}).map((z) => z.value),
|
|
1240
|
+
}).map((z) => z.value), G = [
|
|
1225
1241
|
{
|
|
1226
1242
|
type: "string",
|
|
1227
1243
|
key: "tags",
|
|
@@ -1229,15 +1245,15 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
1229
1245
|
values: ["Inactive", "Active"]
|
|
1230
1246
|
}
|
|
1231
1247
|
];
|
|
1232
|
-
|
|
1248
|
+
Y.open({
|
|
1233
1249
|
title: f("inventory.transfer.form.items.selectItem"),
|
|
1234
1250
|
closeButton: !0,
|
|
1235
|
-
contentComponent:
|
|
1251
|
+
contentComponent: ls,
|
|
1236
1252
|
contentComponentProps: {
|
|
1237
1253
|
modelValue: me,
|
|
1238
1254
|
items: ne,
|
|
1239
1255
|
virtualScroll: !0,
|
|
1240
|
-
filterAttributes:
|
|
1256
|
+
filterAttributes: G
|
|
1241
1257
|
},
|
|
1242
1258
|
primaryActions: {
|
|
1243
1259
|
text: f("common.confirm"),
|
|
@@ -1315,7 +1331,7 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
1315
1331
|
});
|
|
1316
1332
|
return (o, m) => {
|
|
1317
1333
|
var pe, ve;
|
|
1318
|
-
const E = $("FmChip"), H = $("FmLabel"), ne = $("FmIcon"), me = $("FmField"),
|
|
1334
|
+
const E = $("FmChip"), H = $("FmLabel"), ne = $("FmIcon"), me = $("FmField"), G = $("FmTooltip"), re = $("FmSelect"), Fe = $("FmTextField"), He = $("FmTextarea"), Ae = $("FmSwitch"), je = $("FmDatePicker"), z = $("FmTimePicker"), ee = $("FmFormGroup"), ie = $("FmButton"), se = $("FmTable"), ue = $("FmForm");
|
|
1319
1335
|
return S(), T("div", co, [
|
|
1320
1336
|
n("div", mo, [
|
|
1321
1337
|
(pe = p.modelValue) != null && pe.template ? (S(), W(E, {
|
|
@@ -1332,21 +1348,21 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
1332
1348
|
}, null, 8, ["label"]),
|
|
1333
1349
|
o.lastClosingDate ? (S(), W(E, {
|
|
1334
1350
|
key: 1,
|
|
1335
|
-
label: `${s(f)("inventory.transfer.form.lastClosing")}: ${s(
|
|
1351
|
+
label: `${s(f)("inventory.transfer.form.lastClosing")}: ${s(at)(o.lastClosingDate)} ${s(ds)(o.lastClosingDate)}`,
|
|
1336
1352
|
icon: "calendar_month",
|
|
1337
1353
|
compact: ""
|
|
1338
1354
|
}, null, 8, ["label"])) : j("", !0)
|
|
1339
1355
|
]),
|
|
1340
1356
|
y(ue, {
|
|
1341
1357
|
ref_key: "formRef",
|
|
1342
|
-
ref:
|
|
1358
|
+
ref: le,
|
|
1343
1359
|
class: "flex flex-col gap-32",
|
|
1344
1360
|
disabled: o.disabled,
|
|
1345
1361
|
onValidationFailed: console.log,
|
|
1346
1362
|
onValidationSuccess: m[14] || (m[14] = (Ie) => x("validation-success"))
|
|
1347
1363
|
}, {
|
|
1348
1364
|
default: A(() => {
|
|
1349
|
-
var Ie, _e,
|
|
1365
|
+
var Ie, _e, rt, lt, it, ut, dt, ct;
|
|
1350
1366
|
return [
|
|
1351
1367
|
n("div", po, [
|
|
1352
1368
|
n("div", fo, [
|
|
@@ -1356,7 +1372,7 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
1356
1372
|
label: s(f)("inventory.transfer.form.type.title")
|
|
1357
1373
|
}, null, 8, ["label"]),
|
|
1358
1374
|
n("div", yo, [
|
|
1359
|
-
y(
|
|
1375
|
+
y(G, {
|
|
1360
1376
|
"z-index": 51,
|
|
1361
1377
|
placement: "left",
|
|
1362
1378
|
disabled: o.disabled
|
|
@@ -1374,7 +1390,7 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
1374
1390
|
color: o.disabled ? "neutral-gray-200" : "neutral-gray-400"
|
|
1375
1391
|
}, null, 8, ["color"]),
|
|
1376
1392
|
n("div", {
|
|
1377
|
-
class:
|
|
1393
|
+
class: J({ "text-fm-color-typo-disabled": o.disabled })
|
|
1378
1394
|
}, M(s(f)(`inventory.transfer.form.type.${K.value.toLocaleLowerCase("en-us")}`)), 3)
|
|
1379
1395
|
])
|
|
1380
1396
|
]),
|
|
@@ -1384,7 +1400,7 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
1384
1400
|
_: 1
|
|
1385
1401
|
}, 8, ["disabled"]),
|
|
1386
1402
|
n("div", {
|
|
1387
|
-
class:
|
|
1403
|
+
class: J([
|
|
1388
1404
|
"fm-typo-en-body-sm-400",
|
|
1389
1405
|
o.disabled ? "text-fm-color-typo-disabled" : "text-fm-color-typo-secondary"
|
|
1390
1406
|
])
|
|
@@ -1396,7 +1412,7 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
1396
1412
|
label: K.value === s(ae).PURCHASE ? s(f)("inventory.transfer.form.purchaseFrom") : s(f)("inventory.transfer.form.transferFrom")
|
|
1397
1413
|
}, null, 8, ["label"]),
|
|
1398
1414
|
n("div", _o, [
|
|
1399
|
-
y(
|
|
1415
|
+
y(G, {
|
|
1400
1416
|
"z-index": 51,
|
|
1401
1417
|
placement: "left",
|
|
1402
1418
|
disabled: o.disabled
|
|
@@ -1416,7 +1432,7 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
1416
1432
|
color: o.disabled ? "neutral-gray-200" : "neutral-gray-400"
|
|
1417
1433
|
}, null, 8, ["color"]),
|
|
1418
1434
|
n("div", {
|
|
1419
|
-
class:
|
|
1435
|
+
class: J({ "text-fm-color-typo-disabled": o.disabled })
|
|
1420
1436
|
}, M((P = O.value.find((oe) => oe.value === U.value)) == null ? void 0 : P.label), 3)
|
|
1421
1437
|
])
|
|
1422
1438
|
];
|
|
@@ -1429,7 +1445,7 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
1429
1445
|
])
|
|
1430
1446
|
])
|
|
1431
1447
|
], 64)) : (S(), T(de, { key: 1 }, [
|
|
1432
|
-
y(
|
|
1448
|
+
y(re, {
|
|
1433
1449
|
label: s(f)("inventory.transfer.form.type.title"),
|
|
1434
1450
|
"label-mark": "required",
|
|
1435
1451
|
modelValue: K.value,
|
|
@@ -1439,15 +1455,15 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
1439
1455
|
}, {
|
|
1440
1456
|
default: A(() => [
|
|
1441
1457
|
n("span", {
|
|
1442
|
-
class:
|
|
1458
|
+
class: J([
|
|
1443
1459
|
"line-clamp-1 fm-typo-en-body-lg-400",
|
|
1444
1460
|
o.disabled ? "text-fm-color-typo-disabled" : "text-fm-color-typo-primary"
|
|
1445
1461
|
])
|
|
1446
|
-
}, M(s(
|
|
1462
|
+
}, M(s(Mt)(K.value)), 3)
|
|
1447
1463
|
]),
|
|
1448
1464
|
_: 1
|
|
1449
1465
|
}, 8, ["label", "modelValue", "items", "rules"]),
|
|
1450
|
-
y(
|
|
1466
|
+
y(re, {
|
|
1451
1467
|
label: K.value === s(ae).PURCHASE ? s(f)("inventory.transfer.form.purchaseFrom") : s(f)("inventory.transfer.form.transferFrom"),
|
|
1452
1468
|
"label-mark": "required",
|
|
1453
1469
|
modelValue: U.value,
|
|
@@ -1458,7 +1474,7 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
1458
1474
|
"menu-wrapper": A((P) => {
|
|
1459
1475
|
var oe, Ee;
|
|
1460
1476
|
return [
|
|
1461
|
-
y(
|
|
1477
|
+
y(rs, Ge(P, {
|
|
1462
1478
|
items: O.value,
|
|
1463
1479
|
"model-value": (Ee = (oe = o.modelValue) == null ? void 0 : oe.supplier) == null ? void 0 : Ee._id
|
|
1464
1480
|
}), null, 16, ["items", "model-value"])
|
|
@@ -1468,7 +1484,7 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
1468
1484
|
var P;
|
|
1469
1485
|
return [
|
|
1470
1486
|
n("span", {
|
|
1471
|
-
class:
|
|
1487
|
+
class: J([
|
|
1472
1488
|
"line-clamp-1 fm-typo-en-body-lg-400",
|
|
1473
1489
|
o.disabled ? "text-fm-color-typo-disabled" : "text-fm-color-typo-primary"
|
|
1474
1490
|
])
|
|
@@ -1490,7 +1506,7 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
1490
1506
|
"max-length": 240,
|
|
1491
1507
|
modelValue: V.value,
|
|
1492
1508
|
"onUpdate:modelValue": m[3] || (m[3] = (P) => V.value = P),
|
|
1493
|
-
class:
|
|
1509
|
+
class: J([o.disabled ? "text-fm-color-typo-disabled " : ""])
|
|
1494
1510
|
}, null, 8, ["label", "modelValue", "class"]),
|
|
1495
1511
|
_.value ? (S(), W(uo, {
|
|
1496
1512
|
key: 2,
|
|
@@ -1508,7 +1524,7 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
1508
1524
|
}, null, 8, ["required", "disabled", "supplier", "setting", "items", "onChange"])) : j("", !0),
|
|
1509
1525
|
s(u).enableBackdatePo ? (S(), T("div", ko, [
|
|
1510
1526
|
n("div", {
|
|
1511
|
-
class:
|
|
1527
|
+
class: J([
|
|
1512
1528
|
"flex",
|
|
1513
1529
|
{
|
|
1514
1530
|
"flex-col": i.value
|
|
@@ -1524,7 +1540,7 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
1524
1540
|
disabled: B.value && !o.lastClosingDate || o.disabled
|
|
1525
1541
|
}, null, 8, ["modelValue", "label", "sublabel", "disabled"]),
|
|
1526
1542
|
n("div", {
|
|
1527
|
-
class:
|
|
1543
|
+
class: J({ hidden: i.value, "w-16": !i.value })
|
|
1528
1544
|
}, null, 2),
|
|
1529
1545
|
s(b) ? (S(), T("div", xo, [
|
|
1530
1546
|
n("div", Co, [
|
|
@@ -1545,7 +1561,7 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
1545
1561
|
key: 0,
|
|
1546
1562
|
modelValue: s(d),
|
|
1547
1563
|
"onUpdate:modelValue": m[8] || (m[8] = (P) => xe(d) ? d.value = P : null),
|
|
1548
|
-
rules: [s(
|
|
1564
|
+
rules: [s(jt)(new Date(o.lastClosingDate), /* @__PURE__ */ new Date())]
|
|
1549
1565
|
}, null, 8, ["modelValue", "rules"])) : j("", !0),
|
|
1550
1566
|
B.value && !o.lastClosingDate ? (S(), T("div", wo, [
|
|
1551
1567
|
y(ne, {
|
|
@@ -1564,7 +1580,7 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
1564
1580
|
rules: [s(qe)(1)]
|
|
1565
1581
|
}, null, 8, ["model-value", "rules"]),
|
|
1566
1582
|
n("div", {
|
|
1567
|
-
class:
|
|
1583
|
+
class: J([
|
|
1568
1584
|
"flex gap-16",
|
|
1569
1585
|
{
|
|
1570
1586
|
"flex-col items-start": i.value,
|
|
@@ -1590,7 +1606,7 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
1590
1606
|
"template-items": Le.value,
|
|
1591
1607
|
"po-items": s(t).items,
|
|
1592
1608
|
"onUpdate:forecastAmounts": m[10] || (m[10] = (P) => {
|
|
1593
|
-
|
|
1609
|
+
r.value = P;
|
|
1594
1610
|
}),
|
|
1595
1611
|
"onUpdate:poItems": m[11] || (m[11] = (P) => {
|
|
1596
1612
|
s(t).items = P, C.value++;
|
|
@@ -1615,7 +1631,7 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
1615
1631
|
(S(), W(se, {
|
|
1616
1632
|
"column-defs": Be.value,
|
|
1617
1633
|
"column-visibility": {
|
|
1618
|
-
[s(te).Code]: !(((
|
|
1634
|
+
[s(te).Code]: !(((rt = o.modelValue) == null ? void 0 : rt.template) ?? ((lt = o.modelValue) == null ? void 0 : lt.templateDoc)),
|
|
1619
1635
|
[s(te).Name]: !(((it = o.modelValue) == null ? void 0 : it.template) ?? ((ut = o.modelValue) == null ? void 0 : ut.templateDoc)),
|
|
1620
1636
|
[s(te).TemplateName]: !!(((dt = o.modelValue) == null ? void 0 : dt.template) ?? ((ct = o.modelValue) == null ? void 0 : ct.templateDoc))
|
|
1621
1637
|
},
|
|
@@ -1640,7 +1656,7 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
1640
1656
|
];
|
|
1641
1657
|
}),
|
|
1642
1658
|
"list-row": A((P) => [
|
|
1643
|
-
(S(), W(
|
|
1659
|
+
(S(), W(wt, {
|
|
1644
1660
|
row: P,
|
|
1645
1661
|
key: s(t).items.map((oe) => oe.sku._id).join(".")
|
|
1646
1662
|
}, {
|
|
@@ -1675,9 +1691,9 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
1675
1691
|
lastClosingDate: {}
|
|
1676
1692
|
},
|
|
1677
1693
|
emits: ["update:show", "submitted"],
|
|
1678
|
-
setup(g, { expose: w, emit:
|
|
1694
|
+
setup(g, { expose: w, emit: l }) {
|
|
1679
1695
|
var V;
|
|
1680
|
-
const p = g, x =
|
|
1696
|
+
const p = g, x = l, t = nt(), f = Ct(), F = De(), I = ot(), v = et(), e = We(), { t: u } = ge(), k = q(!1), a = q(!1), i = q(!1);
|
|
1681
1697
|
async function h(d) {
|
|
1682
1698
|
if (d) {
|
|
1683
1699
|
a.value = !1;
|
|
@@ -1727,12 +1743,12 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
1727
1743
|
templateDoc: f.templates.find((b) => b._id === p.templateId)
|
|
1728
1744
|
};
|
|
1729
1745
|
}
|
|
1730
|
-
const C =
|
|
1746
|
+
const C = xt(p, "show"), r = q(p.modelValue ?? _()), c = q(((V = p.modelValue) == null ? void 0 : V._id) ?? `${Math.random()}`);
|
|
1731
1747
|
be(
|
|
1732
1748
|
() => p.show,
|
|
1733
1749
|
(d) => {
|
|
1734
1750
|
var b;
|
|
1735
|
-
d && (i.value = !1,
|
|
1751
|
+
d && (i.value = !1, r.value = p.modelValue ?? _(), c.value = ((b = p.modelValue) == null ? void 0 : b._id) ?? `${Math.random()}`);
|
|
1736
1752
|
}
|
|
1737
1753
|
);
|
|
1738
1754
|
const D = N(() => !a.value || !i.value), B = N(() => {
|
|
@@ -1745,23 +1761,23 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
1745
1761
|
return u("inventory.transfer.receiveRequest.update.title");
|
|
1746
1762
|
}
|
|
1747
1763
|
return "";
|
|
1748
|
-
}),
|
|
1764
|
+
}), Y = q();
|
|
1749
1765
|
w({
|
|
1750
1766
|
validateInputs: () => {
|
|
1751
1767
|
var d, b;
|
|
1752
|
-
(b = (d =
|
|
1768
|
+
(b = (d = Y.value) == null ? void 0 : d.validateInputs) == null || b.call(d);
|
|
1753
1769
|
},
|
|
1754
1770
|
resetInputsValidation: () => {
|
|
1755
1771
|
var d, b;
|
|
1756
|
-
(b = (d =
|
|
1772
|
+
(b = (d = Y.value) == null ? void 0 : d.resetInputsValidation) == null || b.call(d);
|
|
1757
1773
|
},
|
|
1758
1774
|
resetInputs: () => {
|
|
1759
1775
|
var d, b;
|
|
1760
|
-
(b = (d =
|
|
1776
|
+
(b = (d = Y.value) == null ? void 0 : d.resetInputs) == null || b.call(d);
|
|
1761
1777
|
}
|
|
1762
1778
|
});
|
|
1763
|
-
async function
|
|
1764
|
-
const d =
|
|
1779
|
+
async function Q() {
|
|
1780
|
+
const d = r.value;
|
|
1765
1781
|
if (k.value = !0, d.items = d.items.filter((b) => b.quantity.amount > 0), !d.items.length) {
|
|
1766
1782
|
F.open({
|
|
1767
1783
|
title: "Cannot create order",
|
|
@@ -1788,7 +1804,7 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
1788
1804
|
}
|
|
1789
1805
|
}
|
|
1790
1806
|
async function K() {
|
|
1791
|
-
const d =
|
|
1807
|
+
const d = r.value;
|
|
1792
1808
|
if (k.value = !0, d.items = d.items.filter((b) => b.quantity.amount > 0), !d.items.length) {
|
|
1793
1809
|
F.open({
|
|
1794
1810
|
title: "Cannot create order",
|
|
@@ -1817,16 +1833,16 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
1817
1833
|
function O() {
|
|
1818
1834
|
switch (p.mode) {
|
|
1819
1835
|
case Oe.CREATE:
|
|
1820
|
-
return
|
|
1836
|
+
return Q();
|
|
1821
1837
|
case Oe.UPDATE:
|
|
1822
1838
|
return K();
|
|
1823
1839
|
}
|
|
1824
1840
|
}
|
|
1825
1841
|
function U() {
|
|
1826
1842
|
var R, X;
|
|
1827
|
-
const d =
|
|
1843
|
+
const d = as.validatePurchaseOrderItems({
|
|
1828
1844
|
skusById: v.skuById ?? {},
|
|
1829
|
-
items:
|
|
1845
|
+
items: r.value.items ?? []
|
|
1830
1846
|
}), b = Object.values(d).flat();
|
|
1831
1847
|
if (b.length > 0) {
|
|
1832
1848
|
const Z = b[0];
|
|
@@ -1837,7 +1853,7 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
1837
1853
|
});
|
|
1838
1854
|
return;
|
|
1839
1855
|
}
|
|
1840
|
-
(X = (R =
|
|
1856
|
+
(X = (R = Y.value) == null ? void 0 : R.validateInputs) == null || X.call(R);
|
|
1841
1857
|
}
|
|
1842
1858
|
return (d, b) => {
|
|
1843
1859
|
const R = $("FmButton"), X = $("FmSideSheet");
|
|
@@ -1857,11 +1873,11 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
1857
1873
|
(S(), W(Po, {
|
|
1858
1874
|
class: "w-full",
|
|
1859
1875
|
ref_key: "formRef",
|
|
1860
|
-
ref:
|
|
1876
|
+
ref: Y,
|
|
1861
1877
|
"onForm:ready": b[0] || (b[0] = () => i.value = !0),
|
|
1862
1878
|
onValidationSuccess: O,
|
|
1863
|
-
modelValue:
|
|
1864
|
-
"onUpdate:modelValue": b[1] || (b[1] = (Z) =>
|
|
1879
|
+
modelValue: r.value,
|
|
1880
|
+
"onUpdate:modelValue": b[1] || (b[1] = (Z) => r.value = Z),
|
|
1865
1881
|
disabled: k.value || D.value,
|
|
1866
1882
|
suppliers: s(I).suppliers,
|
|
1867
1883
|
skus: s(v).skus,
|
|
@@ -1891,7 +1907,7 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
1891
1907
|
}
|
|
1892
1908
|
});
|
|
1893
1909
|
function Oo(g) {
|
|
1894
|
-
const [w,
|
|
1910
|
+
const [w, l, p, ...x] = ps(g), t = p.map((v) => v.toLowerCase().trim().replace(/ /g, "_")), F = ["item_name", "transfer_quantity(uom)", "uom", "scanned_code"].filter((v) => !t.includes(v));
|
|
1895
1911
|
if (F.length)
|
|
1896
1912
|
throw new Error(
|
|
1897
1913
|
`Missing headers (${F.join()}). Excel file does not come from the template.`
|
|
@@ -1913,7 +1929,7 @@ function Mo(g) {
|
|
|
1913
1929
|
try {
|
|
1914
1930
|
return w.reduce(
|
|
1915
1931
|
(p, x) => {
|
|
1916
|
-
const t = new Array(), f = g.Sheets[x], F =
|
|
1932
|
+
const t = new Array(), f = g.Sheets[x], F = et(), I = Oo(f), v = [];
|
|
1917
1933
|
for (const { index: u, data: k } of I) {
|
|
1918
1934
|
k.scanned_code === "" && t.push(`Row ${u + 1}: Scanned code is empty`), k.item_name === "" && t.push(`Row ${u + 1}: Item name is empty`), k.uom === "" && t.push(`Row ${u + 1}: UOM is empty`), k["transfer_quantity(uom)"] === "" && t.push(`Row ${u + 1}: Transfer quantity is empty`);
|
|
1919
1935
|
const a = F.skus.find((_) => _.code === k.scanned_code);
|
|
@@ -1935,7 +1951,7 @@ function Mo(g) {
|
|
|
1935
1951
|
sku: a,
|
|
1936
1952
|
code: k.scanned_code,
|
|
1937
1953
|
name: k.item_name,
|
|
1938
|
-
quantity:
|
|
1954
|
+
quantity: Je.fromNumber(Number(k["transfer_quantity(uom)"])),
|
|
1939
1955
|
measurement: h
|
|
1940
1956
|
});
|
|
1941
1957
|
}
|
|
@@ -1952,10 +1968,10 @@ function Mo(g) {
|
|
|
1952
1968
|
importCreateResult: new Array()
|
|
1953
1969
|
}
|
|
1954
1970
|
);
|
|
1955
|
-
} catch (
|
|
1971
|
+
} catch (l) {
|
|
1956
1972
|
return {
|
|
1957
1973
|
invalidExcel: !0,
|
|
1958
|
-
invalidExcelMessage: (
|
|
1974
|
+
invalidExcelMessage: (l == null ? void 0 : l.message) ?? "Invalid excel",
|
|
1959
1975
|
importCreateResult: []
|
|
1960
1976
|
};
|
|
1961
1977
|
}
|
|
@@ -1964,8 +1980,8 @@ const qo = { class: "flex flex-col flex-1" }, Uo = { class: "flex flex-col" }, N
|
|
|
1964
1980
|
key: 0,
|
|
1965
1981
|
class: "text-fm-color-typo-secondary fm-typo-en-body-sm-400"
|
|
1966
1982
|
}, zo = { key: 0 }, Lo = {
|
|
1967
|
-
class: /* @__PURE__ */
|
|
1968
|
-
}, Ho = { class: "flex-1" }, jo = { class: "flex-auto line-clamp-2 text-ellipsis break-all fm-typo-en-body-sm-400" },
|
|
1983
|
+
class: /* @__PURE__ */ J(["fm-typo-en-body-lg-600"])
|
|
1984
|
+
}, Ho = { class: "flex-1" }, jo = { class: "flex-auto line-clamp-2 text-ellipsis break-all fm-typo-en-body-sm-400" }, Yo = { class: "flex-auto line-clamp-2 text-ellipsis break-all" }, Qo = { class: "text-fm-color-typo-primary" }, Ko = { class: "ml-auto" }, Xo = { key: 0 }, Zo = /* @__PURE__ */ ce({
|
|
1969
1985
|
__name: "XilnexResult",
|
|
1970
1986
|
props: {
|
|
1971
1987
|
type: {},
|
|
@@ -1974,7 +1990,7 @@ const qo = { class: "flex flex-col flex-1" }, Uo = { class: "flex flex-col" }, N
|
|
|
1974
1990
|
errors: {}
|
|
1975
1991
|
},
|
|
1976
1992
|
setup(g) {
|
|
1977
|
-
const w = g, { t:
|
|
1993
|
+
const w = g, { t: l } = ge(), p = q(!1), x = () => {
|
|
1978
1994
|
w.errors.length && (p.value = !p.value);
|
|
1979
1995
|
};
|
|
1980
1996
|
return (t, f) => {
|
|
@@ -1983,19 +1999,19 @@ const qo = { class: "flex flex-col flex-1" }, Uo = { class: "flex flex-col" }, N
|
|
|
1983
1999
|
return S(), T("div", qo, [
|
|
1984
2000
|
n("div", {
|
|
1985
2001
|
onClick: x,
|
|
1986
|
-
class:
|
|
2002
|
+
class: J({
|
|
1987
2003
|
"cursor-pointer": t.errors.length
|
|
1988
2004
|
})
|
|
1989
2005
|
}, [
|
|
1990
2006
|
n("div", Uo, [
|
|
1991
2007
|
n("div", No, [
|
|
1992
2008
|
n("div", {
|
|
1993
|
-
class:
|
|
2009
|
+
class: J({
|
|
1994
2010
|
"text-fm-color-system-error-300": t.errors.length
|
|
1995
2011
|
})
|
|
1996
2012
|
}, [
|
|
1997
2013
|
Te(M(t.name) + " ", 1),
|
|
1998
|
-
t.type === "create" ? (S(), T("span", Bo, "(" + M(s(
|
|
2014
|
+
t.type === "create" ? (S(), T("span", Bo, "(" + M(s(l)("inventory.closing.template.import.new")) + ")", 1)) : j("", !0)
|
|
1999
2015
|
], 2),
|
|
2000
2016
|
t.errors.length ? (S(), T("div", zo, [
|
|
2001
2017
|
y(F, {
|
|
@@ -2028,13 +2044,13 @@ const qo = { class: "flex flex-col flex-1" }, Uo = { class: "flex flex-col" }, N
|
|
|
2028
2044
|
"z-index": 51
|
|
2029
2045
|
}, {
|
|
2030
2046
|
default: A(() => [
|
|
2031
|
-
n("span",
|
|
2047
|
+
n("span", Yo, M(e.name), 1)
|
|
2032
2048
|
]),
|
|
2033
2049
|
_: 2
|
|
2034
2050
|
}, 1032, ["content"])
|
|
2035
2051
|
]),
|
|
2036
2052
|
n("div", null, [
|
|
2037
|
-
n("span",
|
|
2053
|
+
n("span", Qo, M(s(Je).toFormatString({
|
|
2038
2054
|
value: e.quantity
|
|
2039
2055
|
})), 1),
|
|
2040
2056
|
Te(" " + M(e.measurement ? e.measurement.abbrev : e.sku.unit.abbrev), 1)
|
|
@@ -2052,7 +2068,7 @@ const qo = { class: "flex flex-col flex-1" }, Uo = { class: "flex flex-col" }, N
|
|
|
2052
2068
|
], 2),
|
|
2053
2069
|
p.value ? (S(), T("div", {
|
|
2054
2070
|
key: 0,
|
|
2055
|
-
class:
|
|
2071
|
+
class: J(["flex flex-col gap-4 pl-8 fm-typo-en-body-sm-400", {
|
|
2056
2072
|
"text-fm-color-typo-secondary": !t.errors.length,
|
|
2057
2073
|
"text-fm-color-system-error-300": t.errors.length
|
|
2058
2074
|
}])
|
|
@@ -2066,7 +2082,7 @@ const qo = { class: "flex flex-col flex-1" }, Uo = { class: "flex flex-col" }, N
|
|
|
2066
2082
|
]);
|
|
2067
2083
|
};
|
|
2068
2084
|
}
|
|
2069
|
-
}),
|
|
2085
|
+
}), Go = { class: "flex flex-col gap-24" }, Jo = {
|
|
2070
2086
|
key: 0,
|
|
2071
2087
|
class: "flex items-center gap-8"
|
|
2072
2088
|
}, Wo = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ea = { class: "flex flex-col gap-8" }, ta = { class: "line-clamp-2 text-ellipsis break-all" }, sa = {
|
|
@@ -2078,19 +2094,19 @@ const qo = { class: "flex flex-col flex-1" }, Uo = { class: "flex flex-col" }, N
|
|
|
2078
2094
|
}, aa = { class: "text-fm-color-system-error-300 fm-typo-en-body-sm-400" }, na = {
|
|
2079
2095
|
key: 0,
|
|
2080
2096
|
class: "max-h-[200px] overflow-y-auto flex flex-col gap-8"
|
|
2081
|
-
},
|
|
2097
|
+
}, ra = { class: "fm-typo-en-body-lg-600" }, yt = "Transfer note", la = /* @__PURE__ */ ce({
|
|
2082
2098
|
__name: "XilnexImportForm",
|
|
2083
2099
|
setup(g, { expose: w }) {
|
|
2084
|
-
const
|
|
2100
|
+
const l = q(null), p = De(), x = q(!1), t = q(!1), f = St(), F = q(!1), I = Ue();
|
|
2085
2101
|
q([]);
|
|
2086
2102
|
const v = N({
|
|
2087
2103
|
get() {
|
|
2088
|
-
var
|
|
2089
|
-
return ((
|
|
2104
|
+
var r;
|
|
2105
|
+
return ((r = f.supplier) == null ? void 0 : r.name) ?? "";
|
|
2090
2106
|
},
|
|
2091
|
-
set(
|
|
2092
|
-
|
|
2093
|
-
name:
|
|
2107
|
+
set(r) {
|
|
2108
|
+
r && (f.supplier = {
|
|
2109
|
+
name: r,
|
|
2094
2110
|
registrationNumber: "",
|
|
2095
2111
|
_id: "xilnex",
|
|
2096
2112
|
internal: "restaurant",
|
|
@@ -2106,53 +2122,53 @@ const qo = { class: "flex flex-col flex-1" }, Uo = { class: "flex flex-col" }, N
|
|
|
2106
2122
|
}
|
|
2107
2123
|
});
|
|
2108
2124
|
Ke(async () => {
|
|
2109
|
-
const
|
|
2110
|
-
console.log(
|
|
2125
|
+
const r = await I.getNetSuiteLocations();
|
|
2126
|
+
console.log(r), F.value = !0;
|
|
2111
2127
|
});
|
|
2112
2128
|
const e = N({
|
|
2113
2129
|
get() {
|
|
2114
2130
|
return "";
|
|
2115
2131
|
},
|
|
2116
|
-
set(
|
|
2117
|
-
if (
|
|
2118
|
-
const c = f.effectiveAt ? new Date(f.effectiveAt) : /* @__PURE__ */ new Date(), [D, B,
|
|
2119
|
-
c.setFullYear(parseInt(D)), c.setMonth(parseInt(B) - 1), c.setDate(parseInt(
|
|
2132
|
+
set(r) {
|
|
2133
|
+
if (r) {
|
|
2134
|
+
const c = f.effectiveAt ? new Date(f.effectiveAt) : /* @__PURE__ */ new Date(), [D, B, Y] = r.split("-");
|
|
2135
|
+
c.setFullYear(parseInt(D)), c.setMonth(parseInt(B) - 1), c.setDate(parseInt(Y)), f.effectiveAt = c.toISOString();
|
|
2120
2136
|
}
|
|
2121
2137
|
}
|
|
2122
2138
|
}), u = N({
|
|
2123
2139
|
get() {
|
|
2124
2140
|
return null;
|
|
2125
2141
|
},
|
|
2126
|
-
set(
|
|
2127
|
-
if (
|
|
2128
|
-
const c = f.effectiveAt ? new Date(f.effectiveAt) : /* @__PURE__ */ new Date(), [D, B] =
|
|
2142
|
+
set(r) {
|
|
2143
|
+
if (r) {
|
|
2144
|
+
const c = f.effectiveAt ? new Date(f.effectiveAt) : /* @__PURE__ */ new Date(), [D, B] = r.split(":");
|
|
2129
2145
|
c.setMinutes(parseInt(D)), c.setSeconds(parseInt(B)), f.effectiveAt = c.toISOString();
|
|
2130
2146
|
}
|
|
2131
2147
|
}
|
|
2132
2148
|
}), k = q(new Array()), a = q([]), i = N(
|
|
2133
|
-
() => !!k.value.length || a.value.some((
|
|
2149
|
+
() => !!k.value.length || a.value.some((r) => r.errors.length)
|
|
2134
2150
|
), h = q();
|
|
2135
2151
|
w({
|
|
2136
2152
|
validateInputs: () => {
|
|
2137
|
-
var
|
|
2138
|
-
(c = (
|
|
2153
|
+
var r, c;
|
|
2154
|
+
(c = (r = h.value) == null ? void 0 : r.validateInputs) == null || c.call(r);
|
|
2139
2155
|
},
|
|
2140
2156
|
resetInputsValidation: () => {
|
|
2141
|
-
var
|
|
2142
|
-
(c = (
|
|
2157
|
+
var r, c;
|
|
2158
|
+
(c = (r = h.value) == null ? void 0 : r.resetInputsValidation) == null || c.call(r);
|
|
2143
2159
|
},
|
|
2144
2160
|
resetInputs: () => {
|
|
2145
|
-
var
|
|
2146
|
-
(c = (
|
|
2161
|
+
var r, c;
|
|
2162
|
+
(c = (r = h.value) == null ? void 0 : r.resetInputs) == null || c.call(r);
|
|
2147
2163
|
}
|
|
2148
2164
|
});
|
|
2149
2165
|
const { t: _ } = ge();
|
|
2150
|
-
async function C(
|
|
2166
|
+
async function C(r) {
|
|
2151
2167
|
k.value = [], a.value = [];
|
|
2152
2168
|
try {
|
|
2153
2169
|
x.value = !0;
|
|
2154
2170
|
const [c] = await Promise.all([
|
|
2155
|
-
|
|
2171
|
+
fs(r),
|
|
2156
2172
|
// fake buffer
|
|
2157
2173
|
new Promise((B) => setTimeout(B, 1e3))
|
|
2158
2174
|
]), D = Mo(c);
|
|
@@ -2180,16 +2196,16 @@ const qo = { class: "flex flex-col flex-1" }, Uo = { class: "flex flex-col" }, N
|
|
|
2180
2196
|
}), x.value = !1;
|
|
2181
2197
|
}
|
|
2182
2198
|
}
|
|
2183
|
-
return be(
|
|
2184
|
-
|
|
2185
|
-
}), (
|
|
2186
|
-
const D = $("FmSelect"), B = $("FmDatePicker"),
|
|
2199
|
+
return be(l, (r) => {
|
|
2200
|
+
r && C(r);
|
|
2201
|
+
}), (r, c) => {
|
|
2202
|
+
const D = $("FmSelect"), B = $("FmDatePicker"), Y = $("FmTimePicker"), Q = $("FmCircularProgress"), K = $("FmLabel"), O = $("FmIcon"), U = $("FmButton"), V = $("FmForm");
|
|
2187
2203
|
return S(), W(V, {
|
|
2188
2204
|
ref_key: "formRef",
|
|
2189
2205
|
ref: h
|
|
2190
2206
|
}, {
|
|
2191
2207
|
default: A(() => [
|
|
2192
|
-
n("div",
|
|
2208
|
+
n("div", Go, [
|
|
2193
2209
|
y(D, {
|
|
2194
2210
|
modelValue: v.value,
|
|
2195
2211
|
"onUpdate:modelValue": c[0] || (c[0] = (d) => v.value = d),
|
|
@@ -2213,33 +2229,33 @@ const qo = { class: "flex flex-col flex-1" }, Uo = { class: "flex flex-col" }, N
|
|
|
2213
2229
|
label: "Transfer date",
|
|
2214
2230
|
rules: [s(Me)()]
|
|
2215
2231
|
}, null, 8, ["modelValue", "rules"]),
|
|
2216
|
-
y(
|
|
2232
|
+
y(Y, {
|
|
2217
2233
|
modelValue: u.value,
|
|
2218
2234
|
"onUpdate:modelValue": c[2] || (c[2] = (d) => u.value = d),
|
|
2219
2235
|
label: "Transfer time",
|
|
2220
2236
|
rules: [s(Me)()]
|
|
2221
2237
|
}, null, 8, ["modelValue", "rules"]),
|
|
2222
|
-
t.value ? (S(), T("div",
|
|
2238
|
+
t.value ? (S(), T("div", Jo, [
|
|
2223
2239
|
n("div", null, [
|
|
2224
|
-
y(
|
|
2240
|
+
y(Q, {
|
|
2225
2241
|
size: "md",
|
|
2226
2242
|
color: "neutral-gray-200"
|
|
2227
2243
|
})
|
|
2228
2244
|
]),
|
|
2229
2245
|
n("div", Wo, M(s(_)("inventory.formField.loading")), 1)
|
|
2230
2246
|
])) : (S(), T(de, { key: 1 }, [
|
|
2231
|
-
y(
|
|
2247
|
+
y(vs, {
|
|
2232
2248
|
"max-file-size": 5,
|
|
2233
|
-
class:
|
|
2249
|
+
class: J({
|
|
2234
2250
|
"w-full": !0,
|
|
2235
|
-
"h-[200px]": !
|
|
2251
|
+
"h-[200px]": !l.value
|
|
2236
2252
|
}),
|
|
2237
2253
|
accept: ".xlsx,.xls",
|
|
2238
2254
|
label: yt,
|
|
2239
|
-
onFileUpload: c[3] || (c[3] = (d) =>
|
|
2255
|
+
onFileUpload: c[3] || (c[3] = (d) => l.value = d),
|
|
2240
2256
|
"button-label": s(_)("inventory.ingredient.import.selectFile")
|
|
2241
2257
|
}, $t({ _: 2 }, [
|
|
2242
|
-
|
|
2258
|
+
l.value ? {
|
|
2243
2259
|
name: "default",
|
|
2244
2260
|
fn: A(({ openFileDialog: d }) => [
|
|
2245
2261
|
y(K, null, {
|
|
@@ -2250,7 +2266,7 @@ const qo = { class: "flex flex-col flex-1" }, Uo = { class: "flex flex-col" }, N
|
|
|
2250
2266
|
}),
|
|
2251
2267
|
n("div", ea, [
|
|
2252
2268
|
n("div", {
|
|
2253
|
-
class:
|
|
2269
|
+
class: J([
|
|
2254
2270
|
"fm-corner-radius-md p-16 flex items-center gap-16",
|
|
2255
2271
|
{
|
|
2256
2272
|
"border border-fm-color-neutral-gray-100": x.value,
|
|
@@ -2259,7 +2275,7 @@ const qo = { class: "flex flex-col flex-1" }, Uo = { class: "flex flex-col" }, N
|
|
|
2259
2275
|
}
|
|
2260
2276
|
])
|
|
2261
2277
|
}, [
|
|
2262
|
-
x.value ? (S(), W(
|
|
2278
|
+
x.value ? (S(), W(Q, {
|
|
2263
2279
|
key: 0,
|
|
2264
2280
|
size: "md",
|
|
2265
2281
|
color: "neutral-gray-200"
|
|
@@ -2270,7 +2286,7 @@ const qo = { class: "flex flex-col flex-1" }, Uo = { class: "flex flex-col" }, N
|
|
|
2270
2286
|
color: i.value ? "system-error-300" : void 0
|
|
2271
2287
|
}, null, 8, ["name", "color"])),
|
|
2272
2288
|
n("div", {
|
|
2273
|
-
class:
|
|
2289
|
+
class: J([
|
|
2274
2290
|
"fm-typo-en-body-md-400 flex-1 h-[36px] flex items-center",
|
|
2275
2291
|
{
|
|
2276
2292
|
"text-fm-color-typo-disabled": x.value,
|
|
@@ -2278,7 +2294,7 @@ const qo = { class: "flex flex-col flex-1" }, Uo = { class: "flex flex-col" }, N
|
|
|
2278
2294
|
}
|
|
2279
2295
|
])
|
|
2280
2296
|
}, [
|
|
2281
|
-
n("div", ta, M(
|
|
2297
|
+
n("div", ta, M(l.value.name), 1)
|
|
2282
2298
|
], 2),
|
|
2283
2299
|
x.value ? j("", !0) : (S(), T("div", sa, [
|
|
2284
2300
|
y(U, {
|
|
@@ -2307,8 +2323,8 @@ const qo = { class: "flex flex-col flex-1" }, Uo = { class: "flex flex-col" }, N
|
|
|
2307
2323
|
key: "0"
|
|
2308
2324
|
} : void 0
|
|
2309
2325
|
]), 1032, ["class", "button-label"]),
|
|
2310
|
-
|
|
2311
|
-
n("div",
|
|
2326
|
+
l.value ? (S(), T("div", na, [
|
|
2327
|
+
n("div", ra, M(s(_)("inventory.ingredient.import.summary")), 1),
|
|
2312
2328
|
(S(!0), T(de, null, Se(a.value, (d, b) => (S(), W(Zo, {
|
|
2313
2329
|
key: b,
|
|
2314
2330
|
name: `Transfer Note ${b + 1}`,
|
|
@@ -2330,8 +2346,8 @@ const qo = { class: "flex flex-col flex-1" }, Uo = { class: "flex flex-col" }, N
|
|
|
2330
2346
|
show: { type: Boolean }
|
|
2331
2347
|
},
|
|
2332
2348
|
emits: ["update:show", "submitted"],
|
|
2333
|
-
setup(g, { expose: w, emit:
|
|
2334
|
-
const p =
|
|
2349
|
+
setup(g, { expose: w, emit: l }) {
|
|
2350
|
+
const p = l, t = xt(g, "show"), f = De(), F = nt(), I = q(!1), v = q(), e = q();
|
|
2335
2351
|
w({
|
|
2336
2352
|
validateInputs: () => {
|
|
2337
2353
|
var a, i;
|
|
@@ -2351,7 +2367,7 @@ const qo = { class: "flex flex-col flex-1" }, Uo = { class: "flex flex-col" }, N
|
|
|
2351
2367
|
(i = (a = v.value) == null ? void 0 : a.validateInputs) == null || i.call(a);
|
|
2352
2368
|
}
|
|
2353
2369
|
async function k() {
|
|
2354
|
-
var i, h, _, C,
|
|
2370
|
+
var i, h, _, C, r;
|
|
2355
2371
|
if (!((h = (i = e.value) == null ? void 0 : i.supplier) != null && h.name)) {
|
|
2356
2372
|
f.open({
|
|
2357
2373
|
title: "Upload failed",
|
|
@@ -2360,7 +2376,7 @@ const qo = { class: "flex flex-col flex-1" }, Uo = { class: "flex flex-col" }, N
|
|
|
2360
2376
|
});
|
|
2361
2377
|
return;
|
|
2362
2378
|
}
|
|
2363
|
-
if (!((_ = e.value) != null && _.items) || ((
|
|
2379
|
+
if (!((_ = e.value) != null && _.items) || ((r = (C = e.value) == null ? void 0 : C.items) == null ? void 0 : r.length) === 0) {
|
|
2364
2380
|
f.open({
|
|
2365
2381
|
title: "Upload failed",
|
|
2366
2382
|
message: "No data to upload",
|
|
@@ -2402,7 +2418,7 @@ const qo = { class: "flex flex-col flex-1" }, Uo = { class: "flex flex-col" }, N
|
|
|
2402
2418
|
const h = $("FmSpacer"), _ = $("FmButton"), C = $("FmDialog");
|
|
2403
2419
|
return S(), W(C, {
|
|
2404
2420
|
modelValue: s(t),
|
|
2405
|
-
"onUpdate:modelValue": i[2] || (i[2] = (
|
|
2421
|
+
"onUpdate:modelValue": i[2] || (i[2] = (r) => xe(t) ? t.value = r : null),
|
|
2406
2422
|
overlay: !0,
|
|
2407
2423
|
"close-button": !1
|
|
2408
2424
|
}, {
|
|
@@ -2417,7 +2433,7 @@ const qo = { class: "flex flex-col flex-1" }, Uo = { class: "flex flex-col" }, N
|
|
|
2417
2433
|
label: "Cancel",
|
|
2418
2434
|
size: "md",
|
|
2419
2435
|
variant: "tertiary",
|
|
2420
|
-
onClick: i[1] || (i[1] = (
|
|
2436
|
+
onClick: i[1] || (i[1] = (r) => p("update:show", !1))
|
|
2421
2437
|
}, null, 8, ["disabled"]),
|
|
2422
2438
|
y(_, {
|
|
2423
2439
|
disabled: I.value,
|
|
@@ -2431,12 +2447,12 @@ const qo = { class: "flex flex-col flex-1" }, Uo = { class: "flex flex-col" }, N
|
|
|
2431
2447
|
]),
|
|
2432
2448
|
default: A(() => [
|
|
2433
2449
|
n("div", ia, [
|
|
2434
|
-
y(
|
|
2450
|
+
y(la, {
|
|
2435
2451
|
ref_key: "formRef",
|
|
2436
2452
|
ref: v,
|
|
2437
2453
|
onValidationSuccess: k,
|
|
2438
2454
|
modelValue: e.value,
|
|
2439
|
-
"onUpdate:modelValue": i[0] || (i[0] = (
|
|
2455
|
+
"onUpdate:modelValue": i[0] || (i[0] = (r) => e.value = r)
|
|
2440
2456
|
}, null, 8, ["modelValue"])
|
|
2441
2457
|
])
|
|
2442
2458
|
]),
|
|
@@ -2447,18 +2463,18 @@ const qo = { class: "flex flex-col flex-1" }, Uo = { class: "flex flex-col" }, N
|
|
|
2447
2463
|
}), da = { class: "flex flex-col py-8" }, ca = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ma = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary line-clamp-1" }, pa = { class: "fm-typo-en-body-md-400 text-fm-color-typo-primary line-clamp-1" }, fa = {
|
|
2448
2464
|
key: 0,
|
|
2449
2465
|
class: "fm-typo-en-body-md-400 text-fm-color-typo-primary line-clamp-1"
|
|
2450
|
-
}, va = { class: "pt-8" }, bt = "ReceiveRequestViewSearchCriteria",
|
|
2466
|
+
}, va = { class: "pt-8" }, bt = "ReceiveRequestViewSearchCriteria", ja = /* @__PURE__ */ ce({
|
|
2451
2467
|
__name: "ReceiveRequestView",
|
|
2452
2468
|
setup(g) {
|
|
2453
|
-
const { t: w } = ge(),
|
|
2454
|
-
|
|
2455
|
-
name:
|
|
2456
|
-
startDate:
|
|
2457
|
-
endDate:
|
|
2469
|
+
const { t: w } = ge(), l = De();
|
|
2470
|
+
Ye.object({
|
|
2471
|
+
name: Ye.string().optional().nullable(),
|
|
2472
|
+
startDate: Ye.string().optional().nullable(),
|
|
2473
|
+
endDate: Ye.string().optional().nullable()
|
|
2458
2474
|
});
|
|
2459
2475
|
const p = N(
|
|
2460
2476
|
() => !k._currentLocation || e.loading.value
|
|
2461
|
-
), x =
|
|
2477
|
+
), x = Xt(), t = st(), f = Ue();
|
|
2462
2478
|
function F() {
|
|
2463
2479
|
const O = {
|
|
2464
2480
|
name: "",
|
|
@@ -2475,21 +2491,21 @@ const qo = { class: "flex flex-col flex-1" }, Uo = { class: "flex flex-col" }, N
|
|
|
2475
2491
|
function I() {
|
|
2476
2492
|
x.setItem(bt, JSON.stringify(v.value));
|
|
2477
2493
|
}
|
|
2478
|
-
const v = q(F()), e =
|
|
2494
|
+
const v = q(F()), e = Ut(
|
|
2479
2495
|
Ze.RECEIVE_REQUEST,
|
|
2480
2496
|
v.value
|
|
2481
|
-
), { columnDefs: u } =
|
|
2497
|
+
), { columnDefs: u } = Nt(
|
|
2482
2498
|
Ze.RECEIVE_REQUEST,
|
|
2483
2499
|
e,
|
|
2484
2500
|
e.shipments
|
|
2485
|
-
), k =
|
|
2501
|
+
), k = We();
|
|
2486
2502
|
async function a() {
|
|
2487
2503
|
const O = `inventory-record_${vt(v.value.startDate).format("DD-MM-YYYY_HH-mm")}-${vt(v.value.endDate).format("DD-MM-YYYY_HH-mm")}.xlsx`, U = e.purchaseOrders.value.flatMap(
|
|
2488
2504
|
(d) => d.items.map((b) => {
|
|
2489
|
-
var
|
|
2490
|
-
const R = new Date(
|
|
2491
|
-
|
|
2492
|
-
), he = Ce(b.quantity), ke = ((
|
|
2505
|
+
var le;
|
|
2506
|
+
const R = new Date(Qt(d._id) ?? ""), X = d.effectiveAt ? new Date(d.effectiveAt) : void 0, Z = Ce(
|
|
2507
|
+
zt(b.sku, d.deliveryOrder || [])
|
|
2508
|
+
), he = Ce(b.quantity), ke = ((le = b == null ? void 0 : b.measurement) == null ? void 0 : le.abbrev) || b.sku.unit.abbrev;
|
|
2493
2509
|
return {
|
|
2494
2510
|
"SKU code": b.code,
|
|
2495
2511
|
"SKU name": b.name,
|
|
@@ -2501,7 +2517,7 @@ const qo = { class: "flex flex-col flex-1" }, Uo = { class: "flex flex-col" }, N
|
|
|
2501
2517
|
"Received quantity": Z,
|
|
2502
2518
|
"Ordered quantity": he,
|
|
2503
2519
|
Unit: ke,
|
|
2504
|
-
"Total cost": b.totalCost ?
|
|
2520
|
+
"Total cost": b.totalCost ? Qe(b.totalCost) : null
|
|
2505
2521
|
};
|
|
2506
2522
|
})
|
|
2507
2523
|
), V = [
|
|
@@ -2515,7 +2531,7 @@ const qo = { class: "flex flex-col flex-1" }, Uo = { class: "flex flex-col" }, N
|
|
|
2515
2531
|
"Ordered quantity",
|
|
2516
2532
|
"Unit"
|
|
2517
2533
|
];
|
|
2518
|
-
t.enableBackdatePo && V.insert("Effective at", 4), t.enableTotalCost && V.push("Total cost"), await
|
|
2534
|
+
t.enableBackdatePo && V.insert("Effective at", 4), t.enableTotalCost && V.push("Total cost"), await Kt(
|
|
2519
2535
|
[
|
|
2520
2536
|
{
|
|
2521
2537
|
name: "purchases",
|
|
@@ -2524,7 +2540,7 @@ const qo = { class: "flex flex-col flex-1" }, Uo = { class: "flex flex-col" }, N
|
|
|
2524
2540
|
}
|
|
2525
2541
|
],
|
|
2526
2542
|
O
|
|
2527
|
-
),
|
|
2543
|
+
), l.open({
|
|
2528
2544
|
title: w("inventory.transfer.receiveRequest.export.success"),
|
|
2529
2545
|
message: w("inventory.transfer.receiveRequest.export.message", [O]),
|
|
2530
2546
|
type: "success"
|
|
@@ -2542,7 +2558,7 @@ const qo = { class: "flex flex-col flex-1" }, Uo = { class: "flex flex-col" }, N
|
|
|
2542
2558
|
function _(O) {
|
|
2543
2559
|
if (O === "create") {
|
|
2544
2560
|
if (p.value) {
|
|
2545
|
-
|
|
2561
|
+
l.open({
|
|
2546
2562
|
title: "Loading data...",
|
|
2547
2563
|
message: "Please wait.",
|
|
2548
2564
|
type: "info"
|
|
@@ -2558,7 +2574,7 @@ const qo = { class: "flex flex-col flex-1" }, Uo = { class: "flex flex-col" }, N
|
|
|
2558
2574
|
if (O === "export")
|
|
2559
2575
|
return a();
|
|
2560
2576
|
}
|
|
2561
|
-
const { breakpoints: C } =
|
|
2577
|
+
const { breakpoints: C } = tt(), r = N(() => C.value.xs || C.value.sm), c = N(() => r.value ? 10 : 20), D = Zt(), B = N(() => [
|
|
2562
2578
|
{
|
|
2563
2579
|
label: w("inventory.transfer.receiveRequest.actions.create"),
|
|
2564
2580
|
value: "create",
|
|
@@ -2579,7 +2595,7 @@ const qo = { class: "flex flex-col flex-1" }, Uo = { class: "flex flex-col" }, N
|
|
|
2579
2595
|
label: w("inventory.common.export"),
|
|
2580
2596
|
value: "export"
|
|
2581
2597
|
}
|
|
2582
|
-
]),
|
|
2598
|
+
]), Y = N(() => {
|
|
2583
2599
|
const O = [
|
|
2584
2600
|
{
|
|
2585
2601
|
type: "string",
|
|
@@ -2619,13 +2635,13 @@ const qo = { class: "flex flex-col flex-1" }, Uo = { class: "flex flex-col" }, N
|
|
|
2619
2635
|
}
|
|
2620
2636
|
];
|
|
2621
2637
|
return [...O, ...f.isEnabled ? U : []];
|
|
2622
|
-
}),
|
|
2623
|
-
if (!
|
|
2638
|
+
}), Q = q(null), K = N(() => {
|
|
2639
|
+
if (!Q.value)
|
|
2624
2640
|
return e.purchaseOrders.value;
|
|
2625
|
-
const O =
|
|
2641
|
+
const O = ys.build(Q.value);
|
|
2626
2642
|
return e.purchaseOrders.value.filter((U) => {
|
|
2627
2643
|
var V, d, b, R;
|
|
2628
|
-
return
|
|
2644
|
+
return bs(
|
|
2629
2645
|
{
|
|
2630
2646
|
netsuiteTransactionNumber: (d = (V = U.netSuite) == null ? void 0 : V.additionalInfo) == null ? void 0 : d.transactionnumber,
|
|
2631
2647
|
netsuiteOrderNo: (b = U.netSuite) == null ? void 0 : b.refNo,
|
|
@@ -2638,7 +2654,7 @@ const qo = { class: "flex flex-col flex-1" }, Uo = { class: "flex flex-col" }, N
|
|
|
2638
2654
|
});
|
|
2639
2655
|
return (O, U) => {
|
|
2640
2656
|
const V = $("FmTable");
|
|
2641
|
-
return S(), W(
|
|
2657
|
+
return S(), W(Gt, {
|
|
2642
2658
|
title: s(w)("inventory.transfer.receiveRequest.title2"),
|
|
2643
2659
|
actions: B.value,
|
|
2644
2660
|
"onClick:action": _
|
|
@@ -2647,15 +2663,15 @@ const qo = { class: "flex flex-col flex-1" }, Uo = { class: "flex flex-col" }, N
|
|
|
2647
2663
|
var d, b;
|
|
2648
2664
|
return [
|
|
2649
2665
|
n("div", {
|
|
2650
|
-
class:
|
|
2666
|
+
class: J([
|
|
2651
2667
|
"flex flex-col gap-8 max-h-full",
|
|
2652
2668
|
{
|
|
2653
|
-
"p-0":
|
|
2654
|
-
"px-24 ": !
|
|
2669
|
+
"p-0": r.value,
|
|
2670
|
+
"px-24 ": !r.value
|
|
2655
2671
|
}
|
|
2656
2672
|
])
|
|
2657
2673
|
}, [
|
|
2658
|
-
y(
|
|
2674
|
+
y(qt, {
|
|
2659
2675
|
"date-range-query": "",
|
|
2660
2676
|
"date-range": i.value,
|
|
2661
2677
|
"onUpdate:dateRange": U[0] || (U[0] = (R) => i.value = R),
|
|
@@ -2664,9 +2680,9 @@ const qo = { class: "flex flex-col flex-1" }, Uo = { class: "flex flex-col" }, N
|
|
|
2664
2680
|
search: h.value,
|
|
2665
2681
|
"onUpdate:search": U[1] || (U[1] = (R) => h.value = R),
|
|
2666
2682
|
filterable: "",
|
|
2667
|
-
"filter-attributes":
|
|
2668
|
-
filter:
|
|
2669
|
-
"onUpdate:filter": U[2] || (U[2] = (R) =>
|
|
2683
|
+
"filter-attributes": Y.value,
|
|
2684
|
+
filter: Q.value,
|
|
2685
|
+
"onUpdate:filter": U[2] || (U[2] = (R) => Q.value = R)
|
|
2670
2686
|
}, null, 8, ["date-range", "search", "filter-attributes", "filter"]),
|
|
2671
2687
|
(S(), W(V, {
|
|
2672
2688
|
style: _t(s(D).tableHeight),
|
|
@@ -2679,18 +2695,18 @@ const qo = { class: "flex flex-col flex-1" }, Uo = { class: "flex flex-col" }, N
|
|
|
2679
2695
|
"page-size": c.value
|
|
2680
2696
|
}, {
|
|
2681
2697
|
"list-row": A((R) => [
|
|
2682
|
-
y(
|
|
2698
|
+
y(wt, {
|
|
2683
2699
|
row: R,
|
|
2684
2700
|
onRowClick: s(e).promptShowTransferDetails
|
|
2685
2701
|
}, {
|
|
2686
2702
|
default: A((X) => {
|
|
2687
|
-
var Z, he, ke,
|
|
2703
|
+
var Z, he, ke, le, we, Ne, Be, ze, Pe, Le, Ve, Re, o, m, E, H, ne, me, G, re;
|
|
2688
2704
|
return [
|
|
2689
2705
|
n("div", da, [
|
|
2690
2706
|
n("div", ca, [
|
|
2691
2707
|
y(s(fe), {
|
|
2692
2708
|
render: (ke = (he = (Z = X._id) == null ? void 0 : Z.column) == null ? void 0 : he.columnDef) == null ? void 0 : ke.cell,
|
|
2693
|
-
props: (we = (
|
|
2709
|
+
props: (we = (le = X._id) == null ? void 0 : le.getContext) == null ? void 0 : we.call(le)
|
|
2694
2710
|
}, null, 8, ["render", "props"])
|
|
2695
2711
|
]),
|
|
2696
2712
|
n("div", ma, [
|
|
@@ -2709,7 +2725,7 @@ const qo = { class: "flex flex-col flex-1" }, Uo = { class: "flex flex-col" }, N
|
|
|
2709
2725
|
n("div", va, [
|
|
2710
2726
|
y(s(fe), {
|
|
2711
2727
|
render: (me = (ne = (H = X.status) == null ? void 0 : H.column) == null ? void 0 : ne.columnDef) == null ? void 0 : me.cell,
|
|
2712
|
-
props: (
|
|
2728
|
+
props: (re = (G = X.status) == null ? void 0 : G.getContext) == null ? void 0 : re.call(G)
|
|
2713
2729
|
}, null, 8, ["render", "props"])
|
|
2714
2730
|
])
|
|
2715
2731
|
])
|
|
@@ -2722,10 +2738,10 @@ const qo = { class: "flex flex-col flex-1" }, Uo = { class: "flex flex-col" }, N
|
|
|
2722
2738
|
}, 8, ["style", "column-defs", "row-data", "search-value", "loading", "page-size"]))
|
|
2723
2739
|
], 2),
|
|
2724
2740
|
(S(), W(Tt, { to: "body" }, [
|
|
2725
|
-
y(Eo,
|
|
2741
|
+
y(Eo, Ge(s(e).transferDialogProps.value, {
|
|
2726
2742
|
onSubmitted: s(e).fetchData
|
|
2727
2743
|
}), null, 16, ["onSubmitted"]),
|
|
2728
|
-
y(
|
|
2744
|
+
y(Bt, Ge({
|
|
2729
2745
|
scope: s(Ze).RECEIVE_REQUEST
|
|
2730
2746
|
}, {
|
|
2731
2747
|
...s(e).transferDetailsProps.value,
|
|
@@ -2744,5 +2760,5 @@ const qo = { class: "flex flex-col flex-1" }, Uo = { class: "flex flex-col" }, N
|
|
|
2744
2760
|
}
|
|
2745
2761
|
});
|
|
2746
2762
|
export {
|
|
2747
|
-
|
|
2763
|
+
ja as default
|
|
2748
2764
|
};
|