@feedmepos/mf-inventory-portal 1.2.59 → 1.2.60-dev.2
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-Nwc0Ha2r.js → App-B_yr-6yL.js} +82 -78
- package/dist/{ApprovalView-Y5f915s3.js → ApprovalView-DoYBBuSD.js} +5 -5
- package/dist/{BindingsDialog-5N7R_u4c.js → BindingsDialog-DG7HOy6J.js} +5 -5
- package/dist/{BindingsPicker-BJwvLu2s.js → BindingsPicker-DVCYpyrR.js} +3 -3
- package/dist/{BindingsTable-B8sq-qXH.js → BindingsTable-CCel2b_W.js} +5 -5
- package/dist/{ClosingDraftView-BsyYOZsz.js → ClosingDraftView-CfM7gNBX.js} +891 -893
- package/dist/{ClosingHistoryView-BNpsMNy1.js → ClosingHistoryView-DWH4bFgg.js} +36 -36
- package/dist/{ClosingTemplateView-BBqbq07d.js → ClosingTemplateView-JYnnvm7L.js} +14 -14
- package/dist/{DeliveryOrderPrintPreview-CmOO7wuE.js → DeliveryOrderPrintPreview-BihBTJGj.js} +7 -7
- package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-BXlY-Gu1.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-CWjtQajS.js} +17 -17
- package/dist/{FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-CAMkZRFI.js → FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-CUIrR73y.js} +2 -2
- package/dist/{FmMultiselectDialog-CwJUv9tG.js → FmMultiselectDialog-CxDviJZM.js} +16 -16
- package/dist/{FmMultiselectDialog-LagHyTQP.js → FmMultiselectDialog-D51nW6yj.js} +1 -1
- package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-BmHFIkt1.js → FmUnitInput.vue_vue_type_script_setup_true_lang-DLqUnROc.js} +16 -15
- package/dist/{ImportView-wQ_bNesb.js → ImportView-C52rZFib.js} +6 -6
- package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-DtMrJIVs.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-CjZmd-Sa.js} +1 -1
- package/dist/{IngredientGroupView-DsGMhdwu.js → IngredientGroupView-DTHpZP2L.js} +5 -5
- package/dist/{IngredientsView-JdjcLdOx.js → IngredientsView-CrCW6heJ.js} +25 -24
- package/dist/{IntegrationView-CMmSIRUk.js → IntegrationView--DZANrHj.js} +18 -17
- package/dist/{InventoryBindingForm-UL-UKtYW.js → InventoryBindingForm-DLTpv-zQ.js} +1 -1
- package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-r875PDKP.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-hkIg4Rbp.js} +17 -16
- package/dist/{InventoryBindingSummary-BDAuT62b.js → InventoryBindingSummary-D9ptV8Cw.js} +1 -1
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-C5zOYiqR.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-CdPxhkg0.js} +5 -5
- package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-B2zppgqk.js → PremiumBadge.vue_vue_type_script_setup_true_lang-Ci3esisT.js} +2 -2
- package/dist/{PublishView-CSoZCSHT.js → PublishView-DxzL_D61.js} +8 -8
- package/dist/{PurchaseOrderPrintPreview-D5Qw44xo.js → PurchaseOrderPrintPreview-D0tg-2TC.js} +11 -11
- package/dist/{ReceiveRequestView-Chntp08E.js → ReceiveRequestView-2U534J1_.js} +251 -250
- package/dist/RecipeView-VZRyX3Mm.js +1558 -0
- package/dist/{StockView-CuCK7tD2.js → StockView-CvWbnYGz.js} +653 -651
- package/dist/SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-CxjceLuZ.js +183 -0
- package/dist/{SupplierView-CA17Tz02.js → SupplierView-DMIunLvv.js} +20 -19
- package/dist/{SurchargeView-EIftjMCa.js → SurchargeView-jteWYvQz.js} +6 -6
- package/dist/{SystemTrailDialog.vue_vue_type_script_setup_true_lang-CqA6RmPy.js → SystemTrailDialog.vue_vue_type_script_setup_true_lang-CyoUVoDH.js} +2 -2
- package/dist/{TemplatePublishDialog.vue_vue_type_script_setup_true_lang-CYXsAP0i.js → TemplatePublishDialog.vue_vue_type_script_setup_true_lang-DAkKiy0Z.js} +1 -1
- package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-BbbAEIcW.js → TransferDetails.vue_vue_type_script_setup_true_lang-CEXA3vvS.js} +77 -78
- package/dist/{TransferTemplateView-CYfbm9aS.js → TransferTemplateView-DMQ1WIij.js} +22 -21
- package/dist/UnitCostHistoryView-DQ3sXVAQ.js +651 -0
- package/dist/{UnitView-6s5CsGEQ.js → UnitView-p6eZ8G2C.js} +9 -9
- package/dist/{WarehouseView-BXDQOyFZ.js → WarehouseView-BIShkEPs.js} +5 -5
- package/dist/{WastageTemplateView-Cq92TiRs.js → WastageTemplateView-DCbczB_0.js} +14 -14
- package/dist/api/inventory.d.ts +126 -36
- package/dist/api/netsuite.d.ts +8 -1
- package/dist/api/stock-estimate.d.ts +2 -0
- package/dist/api/unit-cost-history.d.ts +28 -0
- package/dist/{app-DJuq_faF.js → app-BAVBNKKH.js} +7461 -6448
- package/dist/app.d.ts +236 -0
- package/dist/app.js +1 -1
- package/dist/{closing-template-D_zbp5V1.js → closing-template-DqxA750a.js} +1 -1
- package/dist/components/StockForecastProps.d.ts +6 -0
- package/dist/components/inventory-binding/InventoryBinding.vue.d.ts +37 -1
- package/dist/components/shell/inventory/binding-dialog.vue.d.ts +14 -0
- package/dist/components/shell/inventory/binding-ui.vue.d.ts +16 -1
- package/dist/{date2-4vrHarNG.js → date2-CgwRU403.js} +1 -1
- package/dist/{dayjs.min-Dwp8614O.js → dayjs.min-CjWVK_Fe.js} +16 -16
- package/dist/{defineDeepModel-DVt2Wz9r.js → defineDeepModel-B1j_kSRA.js} +1 -1
- package/dist/{duplicate-template-CkYWeFtL.js → duplicate-template-iHtqE_uw.js} +1 -1
- package/dist/{feature-Beh-qc03.js → feature-DEryk-Cv.js} +94 -89
- package/dist/{format-time-from-id-84iLSxVu.js → format-time-from-id-C-mbWMLS.js} +1 -1
- package/dist/{format-unit-display-DfeNpWk4.js → format-unit-display-C8Hzskg0.js} +16 -15
- package/dist/helper/number.d.ts +2 -0
- package/dist/helper/type.d.ts +5 -0
- package/dist/{import-export.helper-fAVzQM2q.js → import-export.helper-DGg16RXI.js} +17 -16
- package/dist/{index-CoEqhZLm.js → index-BAkoTUB0.js} +1 -1
- package/dist/{index-B2_16R5E.js → index-BLowSL6G.js} +1471 -1412
- package/dist/{index-Chogzhcq.js → index-CLr4DPan.js} +3 -3
- package/dist/{lodash-Cx8BU1GH.js → lodash-D1_0uR01.js} +1 -1
- package/dist/{netsuite-C1bml-v1.js → netsuite-Bbxz8tiD.js} +60 -60
- package/dist/number-Cof88Fjz.js +232 -0
- package/dist/{purchase-order-template-BqFnJ-6B.js → purchase-order-template-B-sXEbRE.js} +1 -1
- package/dist/router/name.d.ts +1 -0
- package/dist/rules-CzPUVxD_.js +98 -0
- package/dist/{stock-KxT4JbNf.js → stock-BYPFH5a_.js} +1 -1
- package/dist/stock-D9E1uFb1.js +75 -0
- package/dist/stores/feature.d.ts +2 -0
- package/dist/stores/integration/netsuite.d.ts +8 -1
- package/dist/stores/inventory.d.ts +119 -30
- package/dist/{supplier-C7wUB1zT.js → supplier-wQYh275s.js} +2 -2
- package/dist/{surcharge-CjB_Qtbv.js → surcharge-Bi21qFa0.js} +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{use-ingredient-select-dialog-D5KSqA4Z.js → use-ingredient-select-dialog-DH-mXl8H.js} +2 -2
- package/dist/{use-inventory-binding-dialog-eGOvztV3.js → use-inventory-binding-dialog-i8E2CNuV.js} +2 -2
- package/dist/{use-template-enabled-locations-2-3kcVWPQm.js → use-template-enabled-locations-2-DRk9TskI.js} +2 -2
- package/dist/views/closing-draft/components/closing-draft-dialog/ClosingDraftDialog.vue.d.ts +64 -8
- package/dist/views/closing-draft/composables/use-closing-draft-table.d.ts +192 -24
- package/dist/views/closing-template/components/closing-template-form/composables/use-closing-template-items.d.ts +8 -1
- package/dist/views/closing-template/composables/use-closing-template-actions.d.ts +96 -12
- package/dist/views/closing-template/composables/use-closing-template-table.d.ts +96 -12
- package/dist/views/ingredient-group/composables/use-ingredient-group-table.d.ts +18 -18
- package/dist/views/ingredients/components/convert/ConvertForm.vue.d.ts +14 -0
- package/dist/views/ingredients/components/ingredient-form/IngredientForm.vue.d.ts +32 -4
- package/dist/views/ingredients/components/inventory-binding/InventoryBindingForm.vue.d.ts +28 -0
- package/dist/views/ingredients/components/inventory-binding/v2/InventoryBindingFormV2.vue.d.ts +169 -0
- package/dist/views/ingredients/components/inventory-binding/v2/components/InventoryBindingAlternative.vue.d.ts +43 -0
- package/dist/views/ingredients/components/inventory-binding/v2/components/InventoryBindingRule.vue.d.ts +25 -0
- package/dist/views/ingredients/components/inventory-binding/v2/components/InventoryRecipeBindingV2Field.vue.d.ts +125 -0
- package/dist/views/ingredients/components/inventory-binding/v2/components/InventorySkuBindingV2Field.vue.d.ts +129 -0
- package/dist/views/ingredients/components/inventory-binding/v2/composables/use-inventory-binding-alternative-table.d.ts +30 -0
- package/dist/views/ingredients/components/inventory-binding/v2/composables/use-inventory-binding-dialog.d.ts +4 -0
- package/dist/views/ingredients/composables/use-ingredient-table.d.ts +8 -1
- package/dist/views/integration/components/netsuite/InventoryTransferIngredientTable.vue.d.ts +16 -2
- package/dist/views/receive-request/components/transfer-form/TransferFormWithController.vue.d.ts +33 -5
- package/dist/views/receive-request/components/transfer-form/components/ForecastStock.vue.d.ts +16 -2
- package/dist/views/receive-request/components/transfer-form/components/TransferItemTable.vue.d.ts +32 -4
- package/dist/views/receive-request/components/transfer-form/composables/use-transfer-items.d.ts +8 -1
- package/dist/views/receive-request/composables/use-process-purchase-order.d.ts +41 -6
- package/dist/views/receive-request/composables/use-receive-request-form.d.ts +246 -36
- package/dist/views/receive-request/composables/use-receive-request-table.d.ts +287 -42
- package/dist/views/recipe/components/recipe-form/RecipeForm.vue.d.ts +16 -0
- package/dist/views/stock/components/StockRecordCard.vue.d.ts +1 -0
- package/dist/views/stock/components/dialog/AdjustedItemForm.vue.d.ts +16 -2
- package/dist/views/stock/type.d.ts +2 -0
- package/dist/views/transfer-template/components/transfer-template-dialog/TransferTemplateDialog.vue.d.ts +16 -2
- package/dist/views/transfer-template/components/transfer-template-form/components/NetSuiteCustomCodeSelection.vue.d.ts +16 -2
- package/dist/views/transfer-template/components/transfer-template-form/components/TransferTemplateItemTable.vue.d.ts +16 -2
- package/dist/views/transfer-template/components/transfer-template-form/composables/use-transfer-template-items.d.ts +8 -1
- package/dist/views/transfer-template/composables/use-netsuite-custom-field.d.ts +24 -3
- package/dist/views/transfer-template/composables/use-transfer-template-actions.d.ts +96 -12
- package/dist/views/transfer-template/composables/use-transfer-template-table.d.ts +96 -12
- package/dist/views/unit-cost-history/UnitCostHistoryView.vue.d.ts +2 -0
- package/dist/views/unit-cost-history/components/UnitCostDetailsSideSheet.vue.d.ts +19 -0
- package/dist/views/unit-cost-history/components/UnitCostRecalculationDialog.vue.d.ts +11 -0
- package/dist/views/unit-cost-history/composables/use-unit-cost-history.d.ts +65 -0
- package/dist/{vue-i18n-C6XNfngV.js → vue-i18n-Cf9iDkfk.js} +398 -398
- package/dist/{xlsx-BwNUbN_O.js → xlsx-lp5RXzSw.js} +398 -398
- package/dist/{xlsx.util-B_DE3inS.js → xlsx.util-BxpZNkEZ.js} +1 -1
- package/package.json +2 -2
- package/dist/RecipeView-Ck3Pa4fg.js +0 -646
- package/dist/SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-fMji2qKG.js +0 -172
- package/dist/decimal-Bf6AG_d3.js +0 -99
- package/dist/rules-y2OYGOro.js +0 -201
- package/dist/stock-BWUzlDTa.js +0 -75
|
@@ -1,34 +1,35 @@
|
|
|
1
|
-
import { computed as q, h as Y, defineComponent as le, openBlock as x, createElementBlock as P, Fragment as re, renderList as fe, createElementVNode as o, toDisplayString as I, unref as e, resolveComponent as O, createVNode as m, withCtx as A, createCommentVNode as K, ref as U, createBlock as se, watch as be, normalizeClass as W, normalizeStyle as kt, onMounted as
|
|
2
|
-
import { t as de, s as pe, f as Ct,
|
|
3
|
-
import { i as
|
|
4
|
-
import { u as es, P as Ye, a as ts, _ as ss, g as os } from "./TransferDetails.vue_vue_type_script_setup_true_lang-
|
|
5
|
-
import {
|
|
6
|
-
import { _ as St, u as
|
|
7
|
-
import { d as
|
|
8
|
-
import { u as
|
|
9
|
-
import { u as
|
|
10
|
-
import { useBreakpoints as
|
|
1
|
+
import { computed as q, h as Y, defineComponent as le, openBlock as x, createElementBlock as P, Fragment as re, renderList as fe, createElementVNode as o, toDisplayString as I, unref as e, resolveComponent as O, createVNode as m, withCtx as A, createCommentVNode as K, ref as U, createBlock as se, watch as be, normalizeClass as W, normalizeStyle as kt, onMounted as Ze, createTextVNode as Ce, toRaw as qt, shallowRef as pt, onUnmounted as Ut, triggerRef as Nt, reactive as Bt, mergeProps as Xe, isRef as he, createSlots as zt, Teleport as Lt, normalizeProps as jt, guardReactiveProps as Ht } from "vue";
|
|
2
|
+
import { t as de, s as pe, f as Ct, O as Qt, D as Yt, u as Ne, a as Be, P as ft, Q as Kt, T as Xt, U as Zt, V as Wt, v as Jt, y as wt, m as Me } from "./app-BAVBNKKH.js";
|
|
3
|
+
import { i as vt, _ as Gt } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-CUIrR73y.js";
|
|
4
|
+
import { u as es, P as Ye, a as ts, _ as ss, g as os } from "./TransferDetails.vue_vue_type_script_setup_true_lang-CEXA3vvS.js";
|
|
5
|
+
import { a as xe, d as we, c as as } from "./number-Cof88Fjz.js";
|
|
6
|
+
import { _ as St, u as rs, i as ns, e as ls } from "./PremiumBadge.vue_vue_type_script_setup_true_lang-Ci3esisT.js";
|
|
7
|
+
import { d as yt } from "./dayjs.min-CjWVK_Fe.js";
|
|
8
|
+
import { u as is } from "./useTabStorage-BkIVScW_.js";
|
|
9
|
+
import { u as us, _ as ds } from "./SingleColumnLayout.vue_vue_type_script_setup_true_lang-CWZkVCAj.js";
|
|
10
|
+
import { useBreakpoints as We, components as me, FmButtonVariant as cs, useSnackbar as Se, useDialog as ms, useProxiedModel as Ft } from "@feedmepos/ui-library";
|
|
11
11
|
import { F as De } from "./form-mode.enum-BKiNVH6A.js";
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import { u as
|
|
12
|
+
import { R as Te, A as Ue, M as ps, c as bt, B as fs } from "./rules-CzPUVxD_.js";
|
|
13
|
+
import { _ as vs, a as ys, b as bs, F as gs } from "./FmUnitInput.vue_vue_type_script_setup_true_lang-DLqUnROc.js";
|
|
14
|
+
import { F as qe, u as ze, c as _s, P as hs } from "./feature-DEryk-Cv.js";
|
|
15
|
+
import { u as Pe } from "./netsuite-Bbxz8tiD.js";
|
|
15
16
|
import { useI18n as ge } from "@feedmepos/mf-common";
|
|
16
|
-
import { u as $t } from "./surcharge-
|
|
17
|
-
import { a as
|
|
17
|
+
import { u as $t } from "./surcharge-Bi21qFa0.js";
|
|
18
|
+
import { a as xs } from "./FmMultiselectDialog-CxDviJZM.js";
|
|
18
19
|
import { F as ce, _ as It } from "./TableActionableRow.vue_vue_type_script_setup_true_lang-Ca_eYa8-.js";
|
|
19
|
-
import { u as
|
|
20
|
-
import { d as
|
|
21
|
-
import { u as
|
|
22
|
-
import { _ as
|
|
23
|
-
import { a as Dt } from "./format-unit-display-
|
|
24
|
-
import { u as
|
|
25
|
-
import { u as
|
|
26
|
-
import { s as
|
|
27
|
-
import { F as
|
|
28
|
-
import { d as
|
|
29
|
-
import { P as
|
|
20
|
+
import { u as Je } from "./supplier-wQYh275s.js";
|
|
21
|
+
import { d as Ge, e as ks, g as Cs, b as ws } from "./date2-CgwRU403.js";
|
|
22
|
+
import { u as Ss, _ as Fs } from "./FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-CWjtQajS.js";
|
|
23
|
+
import { _ as $s } from "./PreviewBadge.vue_vue_type_script_setup_true_lang-CRZiQHjx.js";
|
|
24
|
+
import { a as Dt } from "./format-unit-display-C8Hzskg0.js";
|
|
25
|
+
import { u as et } from "./SystemTrailDialog.vue_vue_type_script_setup_true_lang-CyoUVoDH.js";
|
|
26
|
+
import { u as Is } from "./vue-i18n-Cf9iDkfk.js";
|
|
27
|
+
import { s as Ds, r as Ts } from "./xlsx.util-BxpZNkEZ.js";
|
|
28
|
+
import { F as Ps } from "./FmDroppableField-J0xUsOTV.js";
|
|
29
|
+
import { d as Vs } from "./defineDeepModel-B1j_kSRA.js";
|
|
30
|
+
import { P as Rs, J as Os } from "./app-DiX-EfV6.js";
|
|
30
31
|
var te = /* @__PURE__ */ ((f) => (f.Code = "Code", f.Name = "Name", f.TemplateName = "TemplateName", f.Amount = "Amount", f.Cost = "Cost", f.TotalCost = "TotalCost", f.Delete = "Delete", f))(te || {});
|
|
31
|
-
const
|
|
32
|
+
const As = () => Y(
|
|
32
33
|
St,
|
|
33
34
|
{
|
|
34
35
|
zIndex: 50,
|
|
@@ -36,8 +37,8 @@ const Os = () => Y(
|
|
|
36
37
|
},
|
|
37
38
|
`Total (${Ct()})`
|
|
38
39
|
);
|
|
39
|
-
function
|
|
40
|
-
const { t: b } = ge(), { breakpoints: d } =
|
|
40
|
+
function Es(f) {
|
|
41
|
+
const { t: b } = ge(), { breakpoints: d } = We(), u = ze(), _ = Pe();
|
|
41
42
|
function n(i) {
|
|
42
43
|
const t = f.formController.getAllPurchaseOrderItems().find((s) => s.item.sku._id === i);
|
|
43
44
|
return (t == null ? void 0 : t.isCustomCost) ?? !1;
|
|
@@ -180,7 +181,7 @@ function As(f) {
|
|
|
180
181
|
const t = i.row.original, s = (C = f.forecastAmounts) == null ? void 0 : C.find((E) => E.skuId === t.sku._id), a = s ? s.helperState === "error" ? `Predicted: ${s.amount} (out of range)` : `Predicted: ${s.amount}` : void 0, r = (v = (c = ($ = f.template) == null ? void 0 : $.purchaseOrder) == null ? void 0 : c.items) == null ? void 0 : v.find(
|
|
181
182
|
(E) => E.sku._id === t.sku._id
|
|
182
183
|
);
|
|
183
|
-
return Y(
|
|
184
|
+
return Y(vs, {
|
|
184
185
|
style: {
|
|
185
186
|
flex: "1 1 0%"
|
|
186
187
|
},
|
|
@@ -205,15 +206,15 @@ function As(f) {
|
|
|
205
206
|
disableUnit: !!r,
|
|
206
207
|
disabled: f.disabled,
|
|
207
208
|
rules: [
|
|
208
|
-
|
|
209
|
+
ys(
|
|
209
210
|
+xe(
|
|
210
211
|
((T = t.quantity) == null ? void 0 : T.amount) === 0 ? { amount: 0, precision: 0 } : (r == null ? void 0 : r.minimumQuantity) ?? { amount: 0, precision: 0 }
|
|
211
212
|
)
|
|
212
213
|
),
|
|
213
|
-
|
|
214
|
+
bs(
|
|
214
215
|
r != null && r.maximumQuantity ? +xe(r == null ? void 0 : r.maximumQuantity) : 1 / 0
|
|
215
216
|
),
|
|
216
|
-
...r != null && r.quantityStep ? [
|
|
217
|
+
...r != null && r.quantityStep ? [gs(r.quantityStep)] : []
|
|
217
218
|
],
|
|
218
219
|
applyDefaultRules: !0
|
|
219
220
|
});
|
|
@@ -222,7 +223,7 @@ function As(f) {
|
|
|
222
223
|
},
|
|
223
224
|
{
|
|
224
225
|
id: "Cost",
|
|
225
|
-
header:
|
|
226
|
+
header: As,
|
|
226
227
|
size: 180,
|
|
227
228
|
cell(i) {
|
|
228
229
|
const t = i.row.original, s = g(t.sku), a = d.value.xs || d.value.sm;
|
|
@@ -240,7 +241,7 @@ function As(f) {
|
|
|
240
241
|
[
|
|
241
242
|
u.enablePurchaseOrderCostEdit ? Y(me.FmButton, {
|
|
242
243
|
prependIcon: "edit",
|
|
243
|
-
variant:
|
|
244
|
+
variant: cs.Tertiary,
|
|
244
245
|
disabled: f.disabled,
|
|
245
246
|
onClick() {
|
|
246
247
|
f.updateItem(
|
|
@@ -314,7 +315,7 @@ function As(f) {
|
|
|
314
315
|
!0
|
|
315
316
|
);
|
|
316
317
|
},
|
|
317
|
-
rules: [Ue(0),
|
|
318
|
+
rules: [Ue(0), ps(2)]
|
|
318
319
|
},
|
|
319
320
|
{
|
|
320
321
|
prepend() {
|
|
@@ -403,41 +404,41 @@ function As(f) {
|
|
|
403
404
|
totalCost: y
|
|
404
405
|
};
|
|
405
406
|
}
|
|
406
|
-
const
|
|
407
|
+
const Ms = { class: "flex flex-col gap-8 px-16 xs:px-4 sm:px-4 py-4 items-center" }, qs = { class: "fm-typo-en-body-lg-600 xs:fm-typo-en-body-md-600 mr-auto xs:w-full" }, Us = { class: "w-[450px] xs:w-full flex" }, Ns = { class: "fm-typo-en-body-md-400 whitespace-nowrap" }, Bs = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, Tt = /* @__PURE__ */ le({
|
|
407
408
|
__name: "SupplierPriceHistory",
|
|
408
409
|
props: {
|
|
409
410
|
prices: {}
|
|
410
411
|
},
|
|
411
412
|
setup(f) {
|
|
412
|
-
const b =
|
|
413
|
+
const b = Je();
|
|
413
414
|
function d(u) {
|
|
414
415
|
return b.suppliers.find((_) => _._id === u);
|
|
415
416
|
}
|
|
416
|
-
return (u, _) => (x(), P("div",
|
|
417
|
+
return (u, _) => (x(), P("div", Ms, [
|
|
417
418
|
(x(!0), P(re, null, fe(Object.keys(u.prices), (n) => {
|
|
418
419
|
var g;
|
|
419
420
|
return x(), P("div", {
|
|
420
421
|
key: n,
|
|
421
422
|
class: "flex items-center gap-12 xs:gap-4 xs:flex-wrap w-full"
|
|
422
423
|
}, [
|
|
423
|
-
o("div",
|
|
424
|
-
o("div",
|
|
424
|
+
o("div", qs, I((g = d(n)) == null ? void 0 : g.name), 1),
|
|
425
|
+
o("div", Us, [
|
|
425
426
|
(x(!0), P(re, null, fe(u.prices[n].slice(0, 3), (h) => {
|
|
426
427
|
var F;
|
|
427
428
|
return x(), P("div", {
|
|
428
429
|
key: h.date,
|
|
429
430
|
class: "flex flex-col w-[150px] xs:flex-1 text-ellipsis cursor-pointer"
|
|
430
431
|
}, [
|
|
431
|
-
o("div",
|
|
432
|
+
o("div", Ns, [
|
|
432
433
|
o("span", null, I(h.totalCost ? e(we)(h.totalCost) : "No data"), 1),
|
|
433
434
|
_[0] || (_[0] = o("span", { class: "text-fm-color-typo-secondary" }, "/", -1)),
|
|
434
435
|
o("span", null, I(e(xe)(h.totalUnit, !1)), 1),
|
|
435
436
|
o("span", null, I(((F = h.measurement) == null ? void 0 : F.abbrev) ?? h.unit.abbrev), 1)
|
|
436
437
|
]),
|
|
437
|
-
o("div",
|
|
438
|
+
o("div", Bs, [
|
|
438
439
|
o("span", null, "(#" + I(h.seqNumber) + ")", 1),
|
|
439
440
|
_[1] || (_[1] = o("span", null, I(" "), -1)),
|
|
440
|
-
o("span", null, I(e(
|
|
441
|
+
o("span", null, I(e(Ge)(new Date(h.date))), 1)
|
|
441
442
|
])
|
|
442
443
|
]);
|
|
443
444
|
}), 128))
|
|
@@ -446,10 +447,10 @@ const Es = { class: "flex flex-col gap-8 px-16 xs:px-4 sm:px-4 py-4 items-center
|
|
|
446
447
|
}), 128))
|
|
447
448
|
]));
|
|
448
449
|
}
|
|
449
|
-
}),
|
|
450
|
+
}), zs = { class: "flex flex-col gap-8 py-16" }, Ls = { class: "flex items-center" }, js = { class: "flex-1 flex gap-1 items-center" }, Hs = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, Qs = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, Ys = { class: "flex gap-8 w-full" }, Ks = { class: "flex-1 flex flex-col gap-4" }, Xs = { class: "flex-1 flex flex-col gap-4" }, Zs = { class: "flex gap-8 w-full" }, Ws = { class: "flex-1 flex flex-col gap-4" }, Js = {
|
|
450
451
|
key: 0,
|
|
451
452
|
class: "flex-1 flex flex-col gap-4"
|
|
452
|
-
},
|
|
453
|
+
}, Gs = /* @__PURE__ */ le({
|
|
453
454
|
__name: "TransferItem",
|
|
454
455
|
props: {
|
|
455
456
|
cellByColId: {},
|
|
@@ -462,11 +463,11 @@ const Es = { class: "flex flex-col gap-8 px-16 xs:px-4 sm:px-4 py-4 items-center
|
|
|
462
463
|
return (d, u) => {
|
|
463
464
|
var g, h, F, k, y, i, t, s, a, r, C, $, c, v, T, E, Z, z, X, N, B, V, D, M, L, J, oe;
|
|
464
465
|
const _ = O("FmLabel"), n = O("FmSpacer");
|
|
465
|
-
return x(), P("div",
|
|
466
|
-
o("div",
|
|
467
|
-
o("div",
|
|
468
|
-
o("span",
|
|
469
|
-
o("span",
|
|
466
|
+
return x(), P("div", zs, [
|
|
467
|
+
o("div", Ls, [
|
|
468
|
+
o("div", js, [
|
|
469
|
+
o("span", Hs, " (" + I(d.row.original.sku.code) + ") ", 1),
|
|
470
|
+
o("span", Qs, I(d.row.original.sku.name), 1)
|
|
470
471
|
]),
|
|
471
472
|
o("div", null, [
|
|
472
473
|
m(e(ce), {
|
|
@@ -475,8 +476,8 @@ const Es = { class: "flex flex-col gap-8 px-16 xs:px-4 sm:px-4 py-4 items-center
|
|
|
475
476
|
}, null, 8, ["render", "props"])
|
|
476
477
|
])
|
|
477
478
|
]),
|
|
478
|
-
o("div",
|
|
479
|
-
o("div",
|
|
479
|
+
o("div", Ys, [
|
|
480
|
+
o("div", Ks, [
|
|
480
481
|
m(_, {
|
|
481
482
|
label: e(b)(`inventory.transfer.form.items.table.${e(te).Code}`)
|
|
482
483
|
}, null, 8, ["label"]),
|
|
@@ -486,7 +487,7 @@ const Es = { class: "flex flex-col gap-8 px-16 xs:px-4 sm:px-4 py-4 items-center
|
|
|
486
487
|
}, null, 8, ["render", "props"]),
|
|
487
488
|
u[0] || (u[0] = o("div", { class: "fm-typo-en-body-md-600 text-fm-color-primary" }, null, -1))
|
|
488
489
|
]),
|
|
489
|
-
o("div",
|
|
490
|
+
o("div", Xs, [
|
|
490
491
|
m(_, {
|
|
491
492
|
label: e(b)(`inventory.transfer.form.items.table.${e(te).Name}`)
|
|
492
493
|
}, null, 8, ["label"]),
|
|
@@ -497,8 +498,8 @@ const Es = { class: "flex flex-col gap-8 px-16 xs:px-4 sm:px-4 py-4 items-center
|
|
|
497
498
|
u[1] || (u[1] = o("div", { class: "fm-typo-en-body-md-600 text-fm-color-primary" }, null, -1))
|
|
498
499
|
])
|
|
499
500
|
]),
|
|
500
|
-
o("div",
|
|
501
|
-
o("div",
|
|
501
|
+
o("div", Zs, [
|
|
502
|
+
o("div", Ws, [
|
|
502
503
|
m(_, {
|
|
503
504
|
label: e(b)(`inventory.transfer.form.items.table.${e(te).Amount}`)
|
|
504
505
|
}, null, 8, ["label"]),
|
|
@@ -508,7 +509,7 @@ const Es = { class: "flex flex-col gap-8 px-16 xs:px-4 sm:px-4 py-4 items-center
|
|
|
508
509
|
}, null, 8, ["render", "props"]),
|
|
509
510
|
u[2] || (u[2] = o("div", { class: "fm-typo-en-body-md-600 text-fm-color-primary" }, null, -1))
|
|
510
511
|
]),
|
|
511
|
-
d.cellByColId[e(te).Cost] ? (x(), P("div",
|
|
512
|
+
d.cellByColId[e(te).Cost] ? (x(), P("div", Js, [
|
|
512
513
|
m(St, { "z-index": 50 }, {
|
|
513
514
|
default: A(() => [
|
|
514
515
|
m(_, {
|
|
@@ -534,7 +535,7 @@ const Es = { class: "flex flex-col gap-8 px-16 xs:px-4 sm:px-4 py-4 items-center
|
|
|
534
535
|
};
|
|
535
536
|
}
|
|
536
537
|
});
|
|
537
|
-
function
|
|
538
|
+
function eo(f) {
|
|
538
539
|
const b = q({
|
|
539
540
|
get() {
|
|
540
541
|
const n = f.getEffectiveAt();
|
|
@@ -552,14 +553,14 @@ function Gs(f) {
|
|
|
552
553
|
}
|
|
553
554
|
}), u = q({
|
|
554
555
|
get() {
|
|
555
|
-
return b.value === null ? "" :
|
|
556
|
+
return b.value === null ? "" : Ge(b.value);
|
|
556
557
|
},
|
|
557
558
|
set(n) {
|
|
558
559
|
n ? b.value = /* @__PURE__ */ new Date(`${n} ${_.value}`) : b.value = null;
|
|
559
560
|
}
|
|
560
561
|
}), _ = q({
|
|
561
562
|
get() {
|
|
562
|
-
return b.value === null ? "" :
|
|
563
|
+
return b.value === null ? "" : ks(b.value);
|
|
563
564
|
},
|
|
564
565
|
set(n) {
|
|
565
566
|
n ? b.value = /* @__PURE__ */ new Date(`${u.value} ${n}`) : b.value = null;
|
|
@@ -572,13 +573,13 @@ function Gs(f) {
|
|
|
572
573
|
backdateTimeModel: _
|
|
573
574
|
};
|
|
574
575
|
}
|
|
575
|
-
const
|
|
576
|
+
const to = {
|
|
576
577
|
width: "24",
|
|
577
578
|
height: "24",
|
|
578
579
|
viewBox: "0 0 24 24",
|
|
579
580
|
fill: "none",
|
|
580
581
|
xmlns: "http://www.w3.org/2000/svg"
|
|
581
|
-
},
|
|
582
|
+
}, so = ["fill"], oo = ["fill"], ao = ["stroke"], ro = ["stroke"], no = /* @__PURE__ */ le({
|
|
582
583
|
__name: "SparkIcon",
|
|
583
584
|
props: {
|
|
584
585
|
size: {
|
|
@@ -591,32 +592,32 @@ const eo = {
|
|
|
591
592
|
}
|
|
592
593
|
},
|
|
593
594
|
setup(f) {
|
|
594
|
-
return (b, d) => (x(), P("svg",
|
|
595
|
+
return (b, d) => (x(), P("svg", to, [
|
|
595
596
|
o("path", {
|
|
596
597
|
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",
|
|
597
598
|
fill: f.color
|
|
598
|
-
}, null, 8,
|
|
599
|
+
}, null, 8, so),
|
|
599
600
|
o("path", {
|
|
600
601
|
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",
|
|
601
602
|
fill: f.color
|
|
602
|
-
}, null, 8,
|
|
603
|
+
}, null, 8, oo),
|
|
603
604
|
o("path", {
|
|
604
605
|
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",
|
|
605
606
|
stroke: f.color,
|
|
606
607
|
"stroke-width": "1.5",
|
|
607
608
|
"stroke-linecap": "round",
|
|
608
609
|
"stroke-linejoin": "round"
|
|
609
|
-
}, null, 8,
|
|
610
|
+
}, null, 8, ao),
|
|
610
611
|
o("path", {
|
|
611
612
|
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",
|
|
612
613
|
stroke: f.color,
|
|
613
614
|
"stroke-width": "1.5",
|
|
614
615
|
"stroke-linecap": "round",
|
|
615
616
|
"stroke-linejoin": "round"
|
|
616
|
-
}, null, 8,
|
|
617
|
+
}, null, 8, ro)
|
|
617
618
|
]));
|
|
618
619
|
}
|
|
619
|
-
}),
|
|
620
|
+
}), lo = { class: "flex gap-8 items-center" }, io = { class: "fm-typo-en-body-lg-600 line-clamp-1" }, uo = { class: "w-[343px] px-24 py-16 rounded-lg shadow-light-300 flex flex-col gap-[20px]" }, co = { class: "flex items-center w-full" }, mo = { class: "flex-1" }, po = { class: "fm-typo-en-title-sm-800" }, fo = { class: "flex items-start gap-8" }, vo = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, yo = { class: "flex gap-1" }, bo = /* @__PURE__ */ le({
|
|
620
621
|
__name: "ForecastStock",
|
|
621
622
|
props: {
|
|
622
623
|
templateId: {},
|
|
@@ -626,7 +627,7 @@ const eo = {
|
|
|
626
627
|
},
|
|
627
628
|
emits: ["update:poItems", "update:forecastAmounts", "update:predictionId"],
|
|
628
629
|
setup(f, { emit: b }) {
|
|
629
|
-
const d = f, u = b, _ = U(!1), n = U(7), g =
|
|
630
|
+
const d = f, u = b, _ = U(!1), n = U(7), g = rs(), h = Se(), { t: F } = ge();
|
|
630
631
|
function k(s, a, r) {
|
|
631
632
|
return a != null && s < a && (s = a), r != null && s > r && (s = r), s;
|
|
632
633
|
}
|
|
@@ -665,7 +666,7 @@ const eo = {
|
|
|
665
666
|
}
|
|
666
667
|
}
|
|
667
668
|
async function t() {
|
|
668
|
-
const s =
|
|
669
|
+
const s = bt(0)(n.value);
|
|
669
670
|
if (typeof s == "string") {
|
|
670
671
|
h.open({
|
|
671
672
|
message: s,
|
|
@@ -731,24 +732,24 @@ const eo = {
|
|
|
731
732
|
disabled: s.disabled
|
|
732
733
|
}, {
|
|
733
734
|
default: A(() => [
|
|
734
|
-
o("div",
|
|
735
|
-
m(
|
|
735
|
+
o("div", lo, [
|
|
736
|
+
m(no, {
|
|
736
737
|
size: 24,
|
|
737
738
|
color: s.disabled ? "#c7c7cc" : "#ff7823"
|
|
738
739
|
}, null, 8, ["color"]),
|
|
739
|
-
o("div",
|
|
740
|
+
o("div", io, I(e(F)("inventory.transfer.form.items.forecastStock.title")), 1)
|
|
740
741
|
])
|
|
741
742
|
]),
|
|
742
743
|
_: 1
|
|
743
744
|
}, 8, ["text-color", "border-color", "disabled"])
|
|
744
745
|
]),
|
|
745
746
|
default: A(() => [
|
|
746
|
-
o("div",
|
|
747
|
-
o("div",
|
|
748
|
-
o("div",
|
|
749
|
-
m(
|
|
747
|
+
o("div", uo, [
|
|
748
|
+
o("div", co, [
|
|
749
|
+
o("div", mo, [
|
|
750
|
+
m($s, { "z-index": 99 }, {
|
|
750
751
|
default: A(() => [
|
|
751
|
-
o("p",
|
|
752
|
+
o("p", po, I(e(F)("inventory.transfer.form.items.forecastStock.title")), 1)
|
|
752
753
|
]),
|
|
753
754
|
_: 1
|
|
754
755
|
})
|
|
@@ -764,21 +765,21 @@ const eo = {
|
|
|
764
765
|
modelValue: n.value,
|
|
765
766
|
"onUpdate:modelValue": a[1] || (a[1] = (v) => n.value = v),
|
|
766
767
|
label: e(F)("inventory.transfer.form.items.forecastStock.days"),
|
|
767
|
-
rules: [e(
|
|
768
|
+
rules: [e(bt)(0)]
|
|
768
769
|
}, {
|
|
769
770
|
"helper-text": A(() => [
|
|
770
|
-
o("div",
|
|
771
|
+
o("div", fo, [
|
|
771
772
|
m(C, {
|
|
772
773
|
name: "warning",
|
|
773
774
|
size: "sm",
|
|
774
775
|
class: "text-fm-color-system-warning-300"
|
|
775
776
|
}),
|
|
776
|
-
o("div",
|
|
777
|
+
o("div", vo, I(e(F)("inventory.transfer.form.items.forecastStock.replace")), 1)
|
|
777
778
|
])
|
|
778
779
|
]),
|
|
779
780
|
_: 1
|
|
780
781
|
}, 8, ["modelValue", "label", "rules"]),
|
|
781
|
-
o("div",
|
|
782
|
+
o("div", yo, [
|
|
782
783
|
a[4] || (a[4] = o("div", { class: "grow" }, null, -1)),
|
|
783
784
|
m(r, {
|
|
784
785
|
label: e(F)("common.cancel"),
|
|
@@ -797,8 +798,8 @@ const eo = {
|
|
|
797
798
|
};
|
|
798
799
|
}
|
|
799
800
|
});
|
|
800
|
-
function
|
|
801
|
-
const f = Se(), b =
|
|
801
|
+
function go() {
|
|
802
|
+
const f = Se(), b = et(), d = U(!1);
|
|
802
803
|
be(d, (g) => {
|
|
803
804
|
g && (_.value = !0, u().finally(() => {
|
|
804
805
|
_.value = !1;
|
|
@@ -806,7 +807,7 @@ function bo() {
|
|
|
806
807
|
});
|
|
807
808
|
async function u() {
|
|
808
809
|
try {
|
|
809
|
-
const { startDate: g, endDate: h } =
|
|
810
|
+
const { startDate: g, endDate: h } = Cs(6), y = (await b.getPurchaseOrders({ start: g, end: h })).filter(
|
|
810
811
|
(i) => {
|
|
811
812
|
var t, s;
|
|
812
813
|
return i.status === Qt.enum.COMPLETE && ((t = i.supplier) == null ? void 0 : t.internal) !== "warehouse" && ((s = i.supplier) == null ? void 0 : s.internal) !== "restaurant";
|
|
@@ -842,7 +843,7 @@ function bo() {
|
|
|
842
843
|
comparePriceBySku: n
|
|
843
844
|
};
|
|
844
845
|
}
|
|
845
|
-
const
|
|
846
|
+
const _o = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, ho = { key: 0 }, xo = ["colspan"], ko = /* @__PURE__ */ le({
|
|
846
847
|
__name: "TransferItemTable",
|
|
847
848
|
props: {
|
|
848
849
|
templateItem: {},
|
|
@@ -875,7 +876,7 @@ const go = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, _o = { key: 0 }
|
|
|
875
876
|
textAlign: ((y = b(g)) == null ? void 0 : y.textAlign) ?? "left"
|
|
876
877
|
})
|
|
877
878
|
}, [
|
|
878
|
-
o("span",
|
|
879
|
+
o("span", _o, [
|
|
879
880
|
m(e(ce), {
|
|
880
881
|
render: g.column.columnDef.cell,
|
|
881
882
|
props: g.getContext()
|
|
@@ -884,25 +885,25 @@ const go = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, _o = { key: 0 }
|
|
|
884
885
|
], 6);
|
|
885
886
|
}), 128))
|
|
886
887
|
], 2),
|
|
887
|
-
d.showComparePrice && Object.keys(d.comparePriceBySku[(_ = d.row.original.sku) == null ? void 0 : _._id] ?? {}).length > 0 ? (x(), P("tr",
|
|
888
|
+
d.showComparePrice && Object.keys(d.comparePriceBySku[(_ = d.row.original.sku) == null ? void 0 : _._id] ?? {}).length > 0 ? (x(), P("tr", ho, [
|
|
888
889
|
o("td", {
|
|
889
890
|
colspan: d.row.getVisibleCells().length
|
|
890
891
|
}, [
|
|
891
892
|
m(Tt, {
|
|
892
893
|
prices: d.comparePriceBySku[(n = d.row.original.sku) == null ? void 0 : n._id]
|
|
893
894
|
}, null, 8, ["prices"])
|
|
894
|
-
], 8,
|
|
895
|
+
], 8, xo)
|
|
895
896
|
])) : K("", !0)
|
|
896
897
|
], 64);
|
|
897
898
|
};
|
|
898
899
|
}
|
|
899
|
-
}),
|
|
900
|
+
}), Co = {
|
|
900
901
|
key: 0,
|
|
901
902
|
class: "flex flex-col gap-8"
|
|
902
|
-
},
|
|
903
|
+
}, wo = { class: "flex flex-col gap-4" }, So = { class: "flex items-center gap-4" }, Fo = {
|
|
903
904
|
key: 0,
|
|
904
905
|
class: "fm-typo-en-body-sm-400 text-fm-color-typo-error"
|
|
905
|
-
},
|
|
906
|
+
}, $o = /* @__PURE__ */ le({
|
|
906
907
|
__name: "NetSuiteField",
|
|
907
908
|
props: {
|
|
908
909
|
required: { type: Boolean },
|
|
@@ -915,7 +916,7 @@ const go = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, _o = { key: 0 }
|
|
|
915
916
|
},
|
|
916
917
|
emits: ["netsuite:ready"],
|
|
917
918
|
setup(f, { emit: b }) {
|
|
918
|
-
const d = Pe(), u = f, _ = b, { t: n } =
|
|
919
|
+
const d = Pe(), u = f, _ = b, { t: n } = Is(), g = U(!1), h = U();
|
|
919
920
|
function F() {
|
|
920
921
|
var s, a, r, C;
|
|
921
922
|
if (!u.supplier) return;
|
|
@@ -931,7 +932,7 @@ const go = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, _o = { key: 0 }
|
|
|
931
932
|
u.subsidiaryOptional && F();
|
|
932
933
|
},
|
|
933
934
|
{ deep: !0 }
|
|
934
|
-
),
|
|
935
|
+
), Ze(() => {
|
|
935
936
|
let i = {
|
|
936
937
|
id: "",
|
|
937
938
|
subsidiary: { id: "", name: "" },
|
|
@@ -985,11 +986,11 @@ const go = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, _o = { key: 0 }
|
|
|
985
986
|
});
|
|
986
987
|
return (i, t) => {
|
|
987
988
|
const s = O("FmLabel"), a = O("FmIcon"), r = O("FmField"), C = O("FmTooltip");
|
|
988
|
-
return e(d).isEnabled && u.required ? (x(), P("div",
|
|
989
|
+
return e(d).isEnabled && u.required ? (x(), P("div", Co, [
|
|
989
990
|
m(s, {
|
|
990
991
|
label: `NetSuite ${e(n)("inventory.transfer.form.netsuite.subsidiary")}`
|
|
991
992
|
}, null, 8, ["label"]),
|
|
992
|
-
o("div",
|
|
993
|
+
o("div", wo, [
|
|
993
994
|
m(C, {
|
|
994
995
|
"z-index": 51,
|
|
995
996
|
placement: "left",
|
|
@@ -1003,7 +1004,7 @@ const go = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, _o = { key: 0 }
|
|
|
1003
1004
|
default: A(() => {
|
|
1004
1005
|
var $;
|
|
1005
1006
|
return [
|
|
1006
|
-
o("div",
|
|
1007
|
+
o("div", So, [
|
|
1007
1008
|
m(a, {
|
|
1008
1009
|
name: "lock_outline",
|
|
1009
1010
|
size: "sm",
|
|
@@ -1020,7 +1021,7 @@ const go = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, _o = { key: 0 }
|
|
|
1020
1021
|
]),
|
|
1021
1022
|
_: 1
|
|
1022
1023
|
}, 8, ["disabled"]),
|
|
1023
|
-
g.value ? (x(), P("div",
|
|
1024
|
+
g.value ? (x(), P("div", Fo, I(y.value), 1)) : K("", !0)
|
|
1024
1025
|
])
|
|
1025
1026
|
])) : K("", !0);
|
|
1026
1027
|
};
|
|
@@ -1063,23 +1064,23 @@ function _t(f, b, d, u, _) {
|
|
|
1063
1064
|
surcharges: y
|
|
1064
1065
|
};
|
|
1065
1066
|
}
|
|
1066
|
-
function
|
|
1067
|
-
const f =
|
|
1067
|
+
function Io() {
|
|
1068
|
+
const f = Je(), b = Ne(), d = Be(), u = Pe(), _ = $t(), n = _t(
|
|
1068
1069
|
f,
|
|
1069
1070
|
b,
|
|
1070
1071
|
d,
|
|
1071
1072
|
u,
|
|
1072
1073
|
_
|
|
1073
|
-
), g =
|
|
1074
|
+
), g = pt(_s({ env: n }));
|
|
1074
1075
|
g.value.setUsePartialUpdates(!0);
|
|
1075
|
-
const h =
|
|
1076
|
+
const h = pt(g.value.state()), F = (t) => {
|
|
1076
1077
|
h.value = t;
|
|
1077
1078
|
};
|
|
1078
1079
|
g.value.addListener(F);
|
|
1079
1080
|
const k = (t, s, a) => {
|
|
1080
1081
|
switch (t) {
|
|
1081
1082
|
case Ke.set:
|
|
1082
|
-
|
|
1083
|
+
ft(h.value, s, a);
|
|
1083
1084
|
break;
|
|
1084
1085
|
case Ke.add:
|
|
1085
1086
|
Xt(h.value, s, a);
|
|
@@ -1088,7 +1089,7 @@ function $o() {
|
|
|
1088
1089
|
Kt(h.value, s);
|
|
1089
1090
|
break;
|
|
1090
1091
|
default:
|
|
1091
|
-
console.warn(`Unknown partial update operation: ${t}, falling back to 'set'`),
|
|
1092
|
+
console.warn(`Unknown partial update operation: ${t}, falling back to 'set'`), ft(h.value, s, a);
|
|
1092
1093
|
}
|
|
1093
1094
|
s !== "remark" && s !== "ref" && Nt(h);
|
|
1094
1095
|
};
|
|
@@ -1137,22 +1138,22 @@ function $o() {
|
|
|
1137
1138
|
init: i
|
|
1138
1139
|
};
|
|
1139
1140
|
}
|
|
1140
|
-
const
|
|
1141
|
+
const Do = { class: "flex flex-col gap-4" }, To = { class: "flex items-center gap-8 overflow-x-auto pb-12" }, Po = { class: "flex flex-col gap-16" }, Vo = { class: "flex flex-col gap-24" }, Ro = { class: "flex flex-col gap-8" }, Oo = { class: "flex flex-col gap-4" }, Ao = { class: "flex items-center gap-4" }, Eo = { class: "flex flex-col gap-8" }, Mo = { class: "flex flex-col gap-4" }, qo = { class: "flex items-center gap-4" }, Uo = {
|
|
1141
1142
|
key: 3,
|
|
1142
1143
|
class: "p-16 border border-fm-color-neutral-gray-300 fm-corner-radius-md flex flex-col"
|
|
1143
|
-
},
|
|
1144
|
+
}, No = {
|
|
1144
1145
|
key: 0,
|
|
1145
1146
|
class: "flex-1 flex gap-8 h-48 xs:flex-col xs:pt-16 sm:flex-col sm:pt-16"
|
|
1146
|
-
},
|
|
1147
|
+
}, Bo = { class: "flex-1" }, zo = { class: "flex-1" }, Lo = {
|
|
1147
1148
|
key: 1,
|
|
1148
1149
|
class: "flex items-center gap-4"
|
|
1149
|
-
},
|
|
1150
|
+
}, jo = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary translate-y-[1px]" }, Ho = { class: "flex flex-col gap-16" }, Qo = { class: "flex-1 gap-8 fm-typo-en-title-sm-600" }, Yo = { class: "flex gap-8" }, Ko = { key: 0 }, Xo = {
|
|
1150
1151
|
key: 0,
|
|
1151
1152
|
class: "flex justify-end p-16 border-t border-fm-color-neutral-gray-300"
|
|
1152
|
-
},
|
|
1153
|
+
}, Zo = { class: "flex items-center gap-16" }, Wo = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-secondary" }, Jo = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, Go = {
|
|
1153
1154
|
key: 1,
|
|
1154
1155
|
class: "flex flex-col gap-16"
|
|
1155
|
-
},
|
|
1156
|
+
}, ea = { class: "flex items-center gap-8" }, ta = { class: "flex-1 gap-8 fm-typo-en-title-sm-600" }, sa = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary mb-8" }, oa = { class: "flex flex-col gap-8 border border-fm-color-neutral-gray-300 fm-corner-radius-md overflow-hidden" }, aa = { class: "flex flex-col gap-4 flex-1" }, ra = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, na = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, la = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary whitespace-nowrap ml-16" }, ia = /* @__PURE__ */ le({
|
|
1156
1157
|
__name: "TransferFormWithController",
|
|
1157
1158
|
props: {
|
|
1158
1159
|
modelValue: {},
|
|
@@ -1164,7 +1165,7 @@ const Io = { class: "flex flex-col gap-4" }, Do = { class: "flex items-center ga
|
|
|
1164
1165
|
},
|
|
1165
1166
|
emits: ["validation-success", "form:ready"],
|
|
1166
1167
|
setup(f, { expose: b, emit: d }) {
|
|
1167
|
-
const u = f, _ = d, { t: n } = ge(), g = Ne(), h = Be(), F = $t(), k = ze(), y = Dt(), { breakpoints: i } =
|
|
1168
|
+
const u = f, _ = d, { t: n } = ge(), g = Ne(), h = Be(), F = $t(), k = ze(), y = Dt(), { breakpoints: i } = We(), t = q(() => i.value.xs || i.value.sm), s = Io();
|
|
1168
1169
|
s.init(u.modelValue);
|
|
1169
1170
|
const { controller: a, state: r } = s, C = Bt({
|
|
1170
1171
|
value: !1
|
|
@@ -1182,14 +1183,14 @@ const Io = { class: "flex flex-col gap-4" }, Do = { class: "flex items-center ga
|
|
|
1182
1183
|
return ((l = r.value.items) == null ? void 0 : l.map((p) => p.item)) || [];
|
|
1183
1184
|
}
|
|
1184
1185
|
);
|
|
1185
|
-
|
|
1186
|
+
Ze(async () => {
|
|
1186
1187
|
await F.browse(), $.value = !0;
|
|
1187
1188
|
}), be([$, C], ([l, p], [j, H]) => {
|
|
1188
1189
|
p.value && H.value && _("form:ready");
|
|
1189
1190
|
});
|
|
1190
1191
|
const X = q(
|
|
1191
1192
|
() => g.currentLocation.type === Zt.restaurant
|
|
1192
|
-
), N =
|
|
1193
|
+
), N = ms(), B = Ss(
|
|
1193
1194
|
() => r.value,
|
|
1194
1195
|
(l) => {
|
|
1195
1196
|
a.value.selectSupplier(l.supplier._id);
|
|
@@ -1232,14 +1233,14 @@ const Io = { class: "flex flex-col gap-4" }, Do = { class: "flex items-center ga
|
|
|
1232
1233
|
set(l) {
|
|
1233
1234
|
a.value.addReference(l ?? "");
|
|
1234
1235
|
}
|
|
1235
|
-
}), { backdatePo: oe, backdateSwitch: w, backdateModel: S, backdateTimeModel: Q } =
|
|
1236
|
+
}), { backdatePo: oe, backdateSwitch: w, backdateModel: S, backdateTimeModel: Q } = eo({
|
|
1236
1237
|
getEffectiveAt() {
|
|
1237
1238
|
return r.value.effectiveAt;
|
|
1238
1239
|
},
|
|
1239
1240
|
setEffectiveAt(l) {
|
|
1240
1241
|
a.value.setEffectiveAt(l);
|
|
1241
1242
|
}
|
|
1242
|
-
}), { comparePricesToggle: ne, comparePriceFetching: ie, comparePriceBySku: ee } =
|
|
1243
|
+
}), { comparePricesToggle: ne, comparePriceFetching: ie, comparePriceBySku: ee } = go(), _e = U();
|
|
1243
1244
|
b({
|
|
1244
1245
|
validateInputs: () => {
|
|
1245
1246
|
var l, p;
|
|
@@ -1270,7 +1271,7 @@ const Io = { class: "flex flex-col gap-4" }, Do = { class: "flex items-center ga
|
|
|
1270
1271
|
deleteItem: (l) => {
|
|
1271
1272
|
a.value.removeSku(l.sku);
|
|
1272
1273
|
}
|
|
1273
|
-
})), Ve =
|
|
1274
|
+
})), Ve = Es({
|
|
1274
1275
|
formController: a.value,
|
|
1275
1276
|
updateItem: (l, p) => ve.value.updateItem(l, p),
|
|
1276
1277
|
deleteItem: (l) => ve.value.deleteItem(l),
|
|
@@ -1305,7 +1306,7 @@ const Io = { class: "flex flex-col gap-4" }, Do = { class: "flex items-center ga
|
|
|
1305
1306
|
N.open({
|
|
1306
1307
|
title: n("inventory.transfer.form.items.selectItem"),
|
|
1307
1308
|
closeButton: !0,
|
|
1308
|
-
contentComponent:
|
|
1309
|
+
contentComponent: xs,
|
|
1309
1310
|
contentComponentProps: {
|
|
1310
1311
|
modelValue: p,
|
|
1311
1312
|
items: l,
|
|
@@ -1380,14 +1381,14 @@ const Io = { class: "flex flex-col gap-4" }, Do = { class: "flex items-center ga
|
|
|
1380
1381
|
return p.length > 0 ? p.join(" and ") : "Always applied";
|
|
1381
1382
|
}
|
|
1382
1383
|
return (l, p) => {
|
|
1383
|
-
var
|
|
1384
|
-
const j = O("FmChip"), H = O("FmLabel"), ae = O("FmIcon"), ue = O("FmField"), Ee = O("FmTooltip"),
|
|
1385
|
-
return x(), P("div",
|
|
1386
|
-
o("div",
|
|
1387
|
-
(
|
|
1384
|
+
var ot, at;
|
|
1385
|
+
const j = O("FmChip"), H = O("FmLabel"), ae = O("FmIcon"), ue = O("FmField"), Ee = O("FmTooltip"), tt = O("FmSelect"), Pt = O("FmTextField"), Vt = O("FmTextarea"), st = O("FmSwitch"), Rt = O("FmDatePicker"), Ot = O("FmTimePicker"), je = O("FmFormGroup"), At = O("FmButton"), Et = O("FmTable"), Mt = O("FmForm");
|
|
1386
|
+
return x(), P("div", Do, [
|
|
1387
|
+
o("div", To, [
|
|
1388
|
+
(ot = u.modelValue) != null && ot.template ? (x(), se(j, {
|
|
1388
1389
|
key: 0,
|
|
1389
1390
|
variant: l.disabled ? "warning" : void 0,
|
|
1390
|
-
label: `${e(n)("inventory.transfer.template.title")}: ${((
|
|
1391
|
+
label: `${e(n)("inventory.transfer.template.title")}: ${((at = E.value) == null ? void 0 : at.name) ?? e(n)("inventory.transfer.form.loading")}`,
|
|
1391
1392
|
icon: "summarize",
|
|
1392
1393
|
compact: ""
|
|
1393
1394
|
}, null, 8, ["variant", "label"])) : K("", !0),
|
|
@@ -1398,7 +1399,7 @@ const Io = { class: "flex flex-col gap-4" }, Do = { class: "flex items-center ga
|
|
|
1398
1399
|
}, null, 8, ["label"]),
|
|
1399
1400
|
l.lastClosingDate ? (x(), se(j, {
|
|
1400
1401
|
key: 1,
|
|
1401
|
-
label: `${e(n)("inventory.transfer.form.lastClosing")}: ${e(
|
|
1402
|
+
label: `${e(n)("inventory.transfer.form.lastClosing")}: ${e(Ge)(l.lastClosingDate)} ${e(ws)(l.lastClosingDate)}`,
|
|
1402
1403
|
icon: "calendar_month",
|
|
1403
1404
|
compact: ""
|
|
1404
1405
|
}, null, 8, ["label"])) : K("", !0)
|
|
@@ -1412,16 +1413,16 @@ const Io = { class: "flex flex-col gap-4" }, Do = { class: "flex items-center ga
|
|
|
1412
1413
|
onValidationSuccess: p[15] || (p[15] = (He) => _("validation-success"))
|
|
1413
1414
|
}, {
|
|
1414
1415
|
default: A(() => {
|
|
1415
|
-
var He, nt, lt, it, ut, dt
|
|
1416
|
+
var He, rt, nt, lt, it, ut, dt;
|
|
1416
1417
|
return [
|
|
1417
|
-
o("div",
|
|
1418
|
-
o("div",
|
|
1418
|
+
o("div", Po, [
|
|
1419
|
+
o("div", Vo, [
|
|
1419
1420
|
(He = u.modelValue) != null && He.template ? (x(), P(re, { key: 0 }, [
|
|
1420
|
-
o("div",
|
|
1421
|
+
o("div", Ro, [
|
|
1421
1422
|
m(H, {
|
|
1422
1423
|
label: e(n)("inventory.transfer.form.type.title")
|
|
1423
1424
|
}, null, 8, ["label"]),
|
|
1424
|
-
o("div",
|
|
1425
|
+
o("div", Oo, [
|
|
1425
1426
|
m(Ee, {
|
|
1426
1427
|
"z-index": 51,
|
|
1427
1428
|
placement: "left",
|
|
@@ -1433,7 +1434,7 @@ const Io = { class: "flex flex-col gap-4" }, Do = { class: "flex items-center ga
|
|
|
1433
1434
|
default: A(() => [
|
|
1434
1435
|
m(ue, null, {
|
|
1435
1436
|
default: A(() => [
|
|
1436
|
-
o("div",
|
|
1437
|
+
o("div", Ao, [
|
|
1437
1438
|
m(ae, {
|
|
1438
1439
|
name: "lock_outline",
|
|
1439
1440
|
size: "sm",
|
|
@@ -1457,11 +1458,11 @@ const Io = { class: "flex flex-col gap-4" }, Do = { class: "flex items-center ga
|
|
|
1457
1458
|
}, null, 2)
|
|
1458
1459
|
])
|
|
1459
1460
|
]),
|
|
1460
|
-
o("div",
|
|
1461
|
+
o("div", Eo, [
|
|
1461
1462
|
m(H, {
|
|
1462
1463
|
label: V.value === e(de).enum.purchase ? e(n)("inventory.transfer.form.purchaseFrom") : e(n)("inventory.transfer.form.transferFrom")
|
|
1463
1464
|
}, null, 8, ["label"]),
|
|
1464
|
-
o("div",
|
|
1465
|
+
o("div", Mo, [
|
|
1465
1466
|
m(Ee, {
|
|
1466
1467
|
"z-index": 51,
|
|
1467
1468
|
placement: "left",
|
|
@@ -1475,7 +1476,7 @@ const Io = { class: "flex flex-col gap-4" }, Do = { class: "flex items-center ga
|
|
|
1475
1476
|
default: A(() => {
|
|
1476
1477
|
var R;
|
|
1477
1478
|
return [
|
|
1478
|
-
o("div",
|
|
1479
|
+
o("div", qo, [
|
|
1479
1480
|
m(ae, {
|
|
1480
1481
|
name: "lock_outline",
|
|
1481
1482
|
size: "sm",
|
|
@@ -1495,7 +1496,7 @@ const Io = { class: "flex flex-col gap-4" }, Do = { class: "flex items-center ga
|
|
|
1495
1496
|
])
|
|
1496
1497
|
])
|
|
1497
1498
|
], 64)) : (x(), P(re, { key: 1 }, [
|
|
1498
|
-
m(
|
|
1499
|
+
m(tt, {
|
|
1499
1500
|
label: e(n)("inventory.transfer.form.type.title"),
|
|
1500
1501
|
"label-mark": "required",
|
|
1501
1502
|
modelValue: V.value,
|
|
@@ -1513,7 +1514,7 @@ const Io = { class: "flex flex-col gap-4" }, Do = { class: "flex items-center ga
|
|
|
1513
1514
|
]),
|
|
1514
1515
|
_: 1
|
|
1515
1516
|
}, 8, ["label", "modelValue", "items", "rules"]),
|
|
1516
|
-
m(
|
|
1517
|
+
m(tt, {
|
|
1517
1518
|
label: V.value === e(de).enum.purchase ? e(n)("inventory.transfer.form.purchaseFrom") : e(n)("inventory.transfer.form.transferFrom"),
|
|
1518
1519
|
"label-mark": "required",
|
|
1519
1520
|
modelValue: M.value,
|
|
@@ -1524,7 +1525,7 @@ const Io = { class: "flex flex-col gap-4" }, Do = { class: "flex items-center ga
|
|
|
1524
1525
|
"menu-wrapper": A((R) => {
|
|
1525
1526
|
var G, Ie;
|
|
1526
1527
|
return [
|
|
1527
|
-
m(
|
|
1528
|
+
m(Fs, Xe(R, {
|
|
1528
1529
|
items: D.value,
|
|
1529
1530
|
"model-value": (Ie = (G = l.modelValue) == null ? void 0 : G.supplier) == null ? void 0 : Ie._id
|
|
1530
1531
|
}), null, 16, ["items", "model-value"])
|
|
@@ -1558,7 +1559,7 @@ const Io = { class: "flex flex-col gap-4" }, Do = { class: "flex items-center ga
|
|
|
1558
1559
|
"onUpdate:modelValue": p[3] || (p[3] = (R) => L.value = R),
|
|
1559
1560
|
class: W([l.disabled ? "text-fm-color-typo-disabled " : ""])
|
|
1560
1561
|
}, null, 8, ["label", "modelValue", "class"]),
|
|
1561
|
-
$.value ? (x(), se(
|
|
1562
|
+
$.value ? (x(), se($o, {
|
|
1562
1563
|
key: 2,
|
|
1563
1564
|
required: e(r).template != null || e(r).netSuite != null,
|
|
1564
1565
|
subsidiaryOptional: e(r).template == null,
|
|
@@ -1573,7 +1574,7 @@ const Io = { class: "flex flex-col gap-4" }, Do = { class: "flex items-center ga
|
|
|
1573
1574
|
C.value = !0;
|
|
1574
1575
|
})
|
|
1575
1576
|
}, null, 8, ["required", "subsidiaryOptional", "disabled", "supplier", "setting", "items", "onChange"])) : K("", !0),
|
|
1576
|
-
e(k).enableBackdatePo ? (x(), P("div",
|
|
1577
|
+
e(k).enableBackdatePo ? (x(), P("div", Uo, [
|
|
1577
1578
|
o("div", {
|
|
1578
1579
|
class: W([
|
|
1579
1580
|
"flex",
|
|
@@ -1582,7 +1583,7 @@ const Io = { class: "flex flex-col gap-4" }, Do = { class: "flex items-center ga
|
|
|
1582
1583
|
}
|
|
1583
1584
|
])
|
|
1584
1585
|
}, [
|
|
1585
|
-
m(
|
|
1586
|
+
m(st, {
|
|
1586
1587
|
modelValue: e(w),
|
|
1587
1588
|
"onUpdate:modelValue": p[5] || (p[5] = (R) => he(w) ? w.value = R : null),
|
|
1588
1589
|
label: e(n)("inventory.transfer.form.backdate.title"),
|
|
@@ -1593,14 +1594,14 @@ const Io = { class: "flex flex-col gap-4" }, Do = { class: "flex items-center ga
|
|
|
1593
1594
|
o("div", {
|
|
1594
1595
|
class: W({ hidden: t.value, "w-16": !t.value })
|
|
1595
1596
|
}, null, 2),
|
|
1596
|
-
e(w) ? (x(), P("div",
|
|
1597
|
-
o("div",
|
|
1597
|
+
e(w) ? (x(), P("div", No, [
|
|
1598
|
+
o("div", Bo, [
|
|
1598
1599
|
m(Rt, {
|
|
1599
1600
|
modelValue: e(S),
|
|
1600
1601
|
"onUpdate:modelValue": p[6] || (p[6] = (R) => he(S) ? S.value = R : null)
|
|
1601
1602
|
}, null, 8, ["modelValue"])
|
|
1602
1603
|
]),
|
|
1603
|
-
o("div",
|
|
1604
|
+
o("div", zo, [
|
|
1604
1605
|
m(Ot, {
|
|
1605
1606
|
modelValue: e(Q),
|
|
1606
1607
|
"onUpdate:modelValue": p[7] || (p[7] = (R) => he(Q) ? Q.value = R : null)
|
|
@@ -1612,20 +1613,20 @@ const Io = { class: "flex flex-col gap-4" }, Do = { class: "flex items-center ga
|
|
|
1612
1613
|
key: 0,
|
|
1613
1614
|
modelValue: e(oe),
|
|
1614
1615
|
"onUpdate:modelValue": p[8] || (p[8] = (R) => he(oe) ? oe.value = R : null),
|
|
1615
|
-
rules: [e(
|
|
1616
|
+
rules: [e(fs)(new Date(l.lastClosingDate), /* @__PURE__ */ new Date())]
|
|
1616
1617
|
}, null, 8, ["modelValue", "rules"])) : K("", !0),
|
|
1617
|
-
X.value && !l.lastClosingDate ? (x(), P("div",
|
|
1618
|
+
X.value && !l.lastClosingDate ? (x(), P("div", Lo, [
|
|
1618
1619
|
m(ae, {
|
|
1619
1620
|
name: "error",
|
|
1620
1621
|
size: "sm",
|
|
1621
1622
|
class: "text-fm-color-typo-warning"
|
|
1622
1623
|
}),
|
|
1623
|
-
o("span",
|
|
1624
|
+
o("span", jo, I(e(n)("inventory.transfer.form.backdate.error")), 1)
|
|
1624
1625
|
])) : K("", !0)
|
|
1625
1626
|
])) : K("", !0)
|
|
1626
1627
|
])
|
|
1627
1628
|
]),
|
|
1628
|
-
o("div",
|
|
1629
|
+
o("div", Ho, [
|
|
1629
1630
|
m(je, {
|
|
1630
1631
|
"model-value": z.value,
|
|
1631
1632
|
rules: [e(Ue)(1)]
|
|
@@ -1639,8 +1640,8 @@ const Io = { class: "flex flex-col gap-4" }, Do = { class: "flex items-center ga
|
|
|
1639
1640
|
}
|
|
1640
1641
|
])
|
|
1641
1642
|
}, [
|
|
1642
|
-
o("div",
|
|
1643
|
-
o("div",
|
|
1643
|
+
o("div", Qo, I(e(n)("inventory.transfer.form.items.title")), 1),
|
|
1644
|
+
o("div", Yo, [
|
|
1644
1645
|
m(At, {
|
|
1645
1646
|
disabled: l.disabled,
|
|
1646
1647
|
label: e(n)("inventory.transfer.form.items.addItem"),
|
|
@@ -1652,7 +1653,7 @@ const Io = { class: "flex flex-col gap-4" }, Do = { class: "flex items-center ga
|
|
|
1652
1653
|
onClick: p[9] || (p[9] = (R) => Oe()),
|
|
1653
1654
|
size: "md"
|
|
1654
1655
|
}, null, 8, ["disabled", "label"]),
|
|
1655
|
-
m(
|
|
1656
|
+
m(bo, {
|
|
1656
1657
|
"template-id": e(r).template || void 0,
|
|
1657
1658
|
"template-items": ke.value,
|
|
1658
1659
|
"po-items": z.value,
|
|
@@ -1668,8 +1669,8 @@ const Io = { class: "flex flex-col gap-4" }, Do = { class: "flex items-center ga
|
|
|
1668
1669
|
}, null, 8, ["template-id", "template-items", "po-items"])
|
|
1669
1670
|
])
|
|
1670
1671
|
], 2),
|
|
1671
|
-
V.value === e(de).enum.purchase && Z.value && e(k).enableTotalCost && z.value.length ? (x(), P("div",
|
|
1672
|
-
m(
|
|
1672
|
+
V.value === e(de).enum.purchase && Z.value && e(k).enableTotalCost && z.value.length ? (x(), P("div", Ko, [
|
|
1673
|
+
m(st, {
|
|
1673
1674
|
label: e(ie) ? e(n)("inventory.transfer.form.items.fetchingData") : e(n)("inventory.transfer.form.items.comparePriceHistory"),
|
|
1674
1675
|
"prepend-icon": "compare_arrows",
|
|
1675
1676
|
"label-placement": "right",
|
|
@@ -1685,9 +1686,9 @@ const Io = { class: "flex flex-col gap-4" }, Do = { class: "flex items-center ga
|
|
|
1685
1686
|
(x(), se(Et, {
|
|
1686
1687
|
"column-defs": Re.value,
|
|
1687
1688
|
"column-visibility": {
|
|
1688
|
-
[e(te).Code]: !(((
|
|
1689
|
-
[e(te).Name]: !(((
|
|
1690
|
-
[e(te).TemplateName]: !!(((
|
|
1689
|
+
[e(te).Code]: !(((rt = l.modelValue) == null ? void 0 : rt.template) ?? ((nt = l.modelValue) == null ? void 0 : nt.templateDoc)),
|
|
1690
|
+
[e(te).Name]: !(((lt = l.modelValue) == null ? void 0 : lt.template) ?? ((it = l.modelValue) == null ? void 0 : it.templateDoc)),
|
|
1691
|
+
[e(te).TemplateName]: !!(((ut = l.modelValue) == null ? void 0 : ut.template) ?? ((dt = l.modelValue) == null ? void 0 : dt.templateDoc))
|
|
1691
1692
|
},
|
|
1692
1693
|
"row-data": z.value,
|
|
1693
1694
|
key: c.value,
|
|
@@ -1695,13 +1696,13 @@ const Io = { class: "flex flex-col gap-4" }, Do = { class: "flex items-center ga
|
|
|
1695
1696
|
"page-size": z.value.length
|
|
1696
1697
|
}, {
|
|
1697
1698
|
"table-row": A((R) => {
|
|
1698
|
-
var G, Ie,
|
|
1699
|
+
var G, Ie, ct, mt;
|
|
1699
1700
|
return [
|
|
1700
|
-
m(
|
|
1701
|
+
m(ko, {
|
|
1701
1702
|
"compare-price-by-sku": e(ee),
|
|
1702
1703
|
"show-compare-price": V.value === e(de).enum.purchase && e(ne),
|
|
1703
1704
|
row: R,
|
|
1704
|
-
"template-item": (
|
|
1705
|
+
"template-item": (mt = (ct = (Ie = (G = l.modelValue) == null ? void 0 : G.templateDoc) == null ? void 0 : Ie.purchaseOrder) == null ? void 0 : ct.items) == null ? void 0 : mt.find(
|
|
1705
1706
|
(Qe) => Qe.sku._id === R.original.sku._id
|
|
1706
1707
|
),
|
|
1707
1708
|
"onUpdate:item": p[14] || (p[14] = (Qe) => ve.value.updateItem(Qe)),
|
|
@@ -1715,7 +1716,7 @@ const Io = { class: "flex flex-col gap-4" }, Do = { class: "flex items-center ga
|
|
|
1715
1716
|
key: z.value.map((G) => G.sku._id).join(".")
|
|
1716
1717
|
}, {
|
|
1717
1718
|
default: A((G) => [
|
|
1718
|
-
m(
|
|
1719
|
+
m(Gs, {
|
|
1719
1720
|
"compare-price-by-sku": e(ee),
|
|
1720
1721
|
"show-compare-price": V.value === e(de).enum.purchase && e(ne),
|
|
1721
1722
|
row: R,
|
|
@@ -1728,18 +1729,18 @@ const Io = { class: "flex flex-col gap-4" }, Do = { class: "flex items-center ga
|
|
|
1728
1729
|
_: 1
|
|
1729
1730
|
}, 8, ["column-defs", "column-visibility", "row-data", "page-size"]))
|
|
1730
1731
|
]),
|
|
1731
|
-
e(k).enableTotalCost ? (x(), P("div",
|
|
1732
|
-
o("div",
|
|
1733
|
-
o("div",
|
|
1734
|
-
o("div",
|
|
1732
|
+
e(k).enableTotalCost ? (x(), P("div", Xo, [
|
|
1733
|
+
o("div", Zo, [
|
|
1734
|
+
o("div", Wo, I(e(n)("inventory.transfer.form.surcharges.totalCost")), 1),
|
|
1735
|
+
o("div", Jo, I(e(pe)()) + " " + I(e(we)({
|
|
1735
1736
|
...e(a).getTotalCosts(),
|
|
1736
1737
|
currency: e(pe)()
|
|
1737
1738
|
}).replace(/[^0-9.,]/g, "")), 1)
|
|
1738
1739
|
])
|
|
1739
1740
|
])) : K("", !0),
|
|
1740
|
-
e(a).getMatchedSurcharges().length > 0 ? (x(), P("div",
|
|
1741
|
-
o("div",
|
|
1742
|
-
o("div",
|
|
1741
|
+
e(a).getMatchedSurcharges().length > 0 ? (x(), P("div", Go, [
|
|
1742
|
+
o("div", ea, [
|
|
1743
|
+
o("div", ta, I(e(n)("inventory.transfer.form.surcharges.title")), 1),
|
|
1743
1744
|
m(j, {
|
|
1744
1745
|
label: e(n)("inventory.transfer.form.surcharges.autoApplied"),
|
|
1745
1746
|
icon: "auto_awesome",
|
|
@@ -1747,8 +1748,8 @@ const Io = { class: "flex flex-col gap-4" }, Do = { class: "flex items-center ga
|
|
|
1747
1748
|
compact: ""
|
|
1748
1749
|
}, null, 8, ["label"])
|
|
1749
1750
|
]),
|
|
1750
|
-
o("div",
|
|
1751
|
-
o("div",
|
|
1751
|
+
o("div", sa, I(e(n)("inventory.transfer.form.surcharges.appliedBased")), 1),
|
|
1752
|
+
o("div", oa, [
|
|
1752
1753
|
(x(!0), P(re, null, fe(e(a).getMatchedSurcharges(), (R, G) => (x(), P("div", {
|
|
1753
1754
|
key: G,
|
|
1754
1755
|
class: W([
|
|
@@ -1756,11 +1757,11 @@ const Io = { class: "flex flex-col gap-4" }, Do = { class: "flex items-center ga
|
|
|
1756
1757
|
G !== e(a).getMatchedSurcharges().length - 1 ? "border-b border-fm-color-neutral-gray-300" : ""
|
|
1757
1758
|
])
|
|
1758
1759
|
}, [
|
|
1759
|
-
o("div",
|
|
1760
|
-
o("div",
|
|
1761
|
-
o("div",
|
|
1760
|
+
o("div", aa, [
|
|
1761
|
+
o("div", ra, I(R.item.name), 1),
|
|
1762
|
+
o("div", na, I(e(n)("inventory.transfer.form.surcharges.appliedBased")) + ": " + I(Ae(R.surcharge.rule)), 1)
|
|
1762
1763
|
]),
|
|
1763
|
-
o("div",
|
|
1764
|
+
o("div", la, I(e(pe)()) + " " + I(e(we)(R.item.totalCost).replace(/[^0-9.,]/g, "")), 1)
|
|
1764
1765
|
], 2))), 128))
|
|
1765
1766
|
])
|
|
1766
1767
|
])) : K("", !0)
|
|
@@ -1771,7 +1772,7 @@ const Io = { class: "flex flex-col gap-4" }, Do = { class: "flex items-center ga
|
|
|
1771
1772
|
]);
|
|
1772
1773
|
};
|
|
1773
1774
|
}
|
|
1774
|
-
}),
|
|
1775
|
+
}), ua = { class: "flex items-center" }, da = { class: "fm-typo-en-title-md-800" }, ca = { class: "flex gap-4" }, ma = { class: "fm-typo-en-title-md-600" }, pa = { class: "flex flex-col gap-16" }, fa = { class: "fm-typo-en-body-md-400" }, va = { class: "max-h-[300px] overflow-y-auto" }, ya = { class: "list-disc pl-16" }, ba = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ga = { class: "flex w-full gap-8 justify-end" }, _a = /* @__PURE__ */ le({
|
|
1775
1776
|
__name: "TransferDialog",
|
|
1776
1777
|
props: {
|
|
1777
1778
|
mode: {},
|
|
@@ -1783,7 +1784,7 @@ const Io = { class: "flex flex-col gap-4" }, Do = { class: "flex items-center ga
|
|
|
1783
1784
|
emits: ["update:show", "submitted"],
|
|
1784
1785
|
setup(f, { expose: b, emit: d }) {
|
|
1785
1786
|
var oe;
|
|
1786
|
-
const u = f, _ = d, n =
|
|
1787
|
+
const u = f, _ = d, n = et(), g = Dt(), h = Se(), F = Je(), k = Be(), y = Ne(), { t: i } = ge(), t = U(!1), s = U(!1), a = U(!1), r = U(!1), C = q(() => {
|
|
1787
1788
|
var w;
|
|
1788
1789
|
return ((w = T.value.items) == null ? void 0 : w.filter((S) => S.quantity.amount === 0)) ?? [];
|
|
1789
1790
|
});
|
|
@@ -1943,7 +1944,7 @@ const Io = { class: "flex flex-col gap-4" }, Do = { class: "flex items-center ga
|
|
|
1943
1944
|
}
|
|
1944
1945
|
function L() {
|
|
1945
1946
|
var Q, ne;
|
|
1946
|
-
const w =
|
|
1947
|
+
const w = hs.validatePurchaseOrderItems({
|
|
1947
1948
|
skusById: k.skuById ?? {},
|
|
1948
1949
|
items: T.value.items ?? []
|
|
1949
1950
|
}), S = Object.values(w).flat();
|
|
@@ -1976,12 +1977,12 @@ const Io = { class: "flex flex-col gap-4" }, Do = { class: "flex items-center ga
|
|
|
1976
1977
|
"max-width": 900
|
|
1977
1978
|
}, {
|
|
1978
1979
|
"side-sheet-header": A(() => [
|
|
1979
|
-
o("div",
|
|
1980
|
-
o("div",
|
|
1980
|
+
o("div", ua, [
|
|
1981
|
+
o("div", da, I(z.value), 1)
|
|
1981
1982
|
])
|
|
1982
1983
|
]),
|
|
1983
1984
|
default: A(() => [
|
|
1984
|
-
(x(), se(
|
|
1985
|
+
(x(), se(ia, {
|
|
1985
1986
|
class: "w-full",
|
|
1986
1987
|
ref_key: "formRef",
|
|
1987
1988
|
ref: X,
|
|
@@ -1997,7 +1998,7 @@ const Io = { class: "flex flex-col gap-4" }, Do = { class: "flex items-center ga
|
|
|
1997
1998
|
}, null, 8, ["modelValue", "disabled", "suppliers", "skus", "last-closing-date"]))
|
|
1998
1999
|
]),
|
|
1999
2000
|
"side-sheet-footer": A(() => [
|
|
2000
|
-
o("div",
|
|
2001
|
+
o("div", ca, [
|
|
2001
2002
|
m(Q, {
|
|
2002
2003
|
loading: t.value,
|
|
2003
2004
|
disabled: Z.value,
|
|
@@ -2020,10 +2021,10 @@ const Io = { class: "flex flex-col gap-4" }, Do = { class: "flex items-center ga
|
|
|
2020
2021
|
overlay: !0
|
|
2021
2022
|
}, {
|
|
2022
2023
|
"dialog-header": A(() => [
|
|
2023
|
-
o("div",
|
|
2024
|
+
o("div", ma, I(e(i)("inventory.transfer.template.zeroQuantity.title")), 1)
|
|
2024
2025
|
]),
|
|
2025
2026
|
"dialog-footer": A(() => [
|
|
2026
|
-
o("div",
|
|
2027
|
+
o("div", ga, [
|
|
2027
2028
|
m(Q, {
|
|
2028
2029
|
label: e(i)("common.cancel"),
|
|
2029
2030
|
variant: "tertiary",
|
|
@@ -2038,17 +2039,17 @@ const Io = { class: "flex flex-col gap-4" }, Do = { class: "flex items-center ga
|
|
|
2038
2039
|
])
|
|
2039
2040
|
]),
|
|
2040
2041
|
default: A(() => [
|
|
2041
|
-
o("div",
|
|
2042
|
-
o("div",
|
|
2043
|
-
o("div",
|
|
2044
|
-
o("ul",
|
|
2042
|
+
o("div", pa, [
|
|
2043
|
+
o("div", fa, I(e(i)("inventory.transfer.template.zeroQuantity.message", { count: C.value.length })), 1),
|
|
2044
|
+
o("div", va, [
|
|
2045
|
+
o("ul", ya, [
|
|
2045
2046
|
(x(!0), P(re, null, fe(C.value, (ee) => (x(), P("li", {
|
|
2046
2047
|
key: ee.sku._id,
|
|
2047
2048
|
class: "fm-typo-en-body-md-400"
|
|
2048
2049
|
}, I(ee.sku.name) + " (" + I(ee.sku.code) + ") ", 1))), 128))
|
|
2049
2050
|
])
|
|
2050
2051
|
]),
|
|
2051
|
-
o("div",
|
|
2052
|
+
o("div", ba, I(e(i)("inventory.transfer.template.zeroQuantity.prompt")), 1)
|
|
2052
2053
|
])
|
|
2053
2054
|
]),
|
|
2054
2055
|
_: 1
|
|
@@ -2057,8 +2058,8 @@ const Io = { class: "flex flex-col gap-4" }, Do = { class: "flex items-center ga
|
|
|
2057
2058
|
};
|
|
2058
2059
|
}
|
|
2059
2060
|
});
|
|
2060
|
-
function
|
|
2061
|
-
const [b, d, u, ..._] =
|
|
2061
|
+
function ha(f) {
|
|
2062
|
+
const [b, d, u, ..._] = Ds(f), n = u.map((k) => k.toLowerCase().trim().replace(/ /g, "_")), h = ["item_name", "transfer_quantity(uom)", "uom", "scanned_code"].filter((k) => !n.includes(k));
|
|
2062
2063
|
if (h.length)
|
|
2063
2064
|
throw new Error(
|
|
2064
2065
|
`Missing headers (${h.join()}). Excel file does not come from the template.`
|
|
@@ -2075,12 +2076,12 @@ function _a(f) {
|
|
|
2075
2076
|
};
|
|
2076
2077
|
});
|
|
2077
2078
|
}
|
|
2078
|
-
function
|
|
2079
|
+
function xa(f) {
|
|
2079
2080
|
const b = f.SheetNames;
|
|
2080
2081
|
try {
|
|
2081
2082
|
return b.reduce(
|
|
2082
2083
|
(u, _) => {
|
|
2083
|
-
const n = new Array(), g = f.Sheets[_], h = Be(), F =
|
|
2084
|
+
const n = new Array(), g = f.Sheets[_], h = Be(), F = ha(g), k = [];
|
|
2084
2085
|
for (const { index: i, data: t } of F) {
|
|
2085
2086
|
t.scanned_code === "" && n.push(`Row ${i + 1}: Scanned code is empty`), t.item_name === "" && n.push(`Row ${i + 1}: Item name is empty`), t.uom === "" && n.push(`Row ${i + 1}: UOM is empty`), t["transfer_quantity(uom)"] === "" && n.push(`Row ${i + 1}: Transfer quantity is empty`);
|
|
2086
2087
|
const s = h.skus.find((C) => C.code === t.scanned_code);
|
|
@@ -2127,12 +2128,12 @@ function ha(f) {
|
|
|
2127
2128
|
};
|
|
2128
2129
|
}
|
|
2129
2130
|
}
|
|
2130
|
-
const
|
|
2131
|
+
const ka = { class: "flex flex-col flex-1" }, Ca = { class: "flex flex-col" }, wa = { class: "fm-typo-en-body-md-400 text-fm-color-typo-primary flex items-center gap-4" }, Sa = {
|
|
2131
2132
|
key: 0,
|
|
2132
2133
|
class: "text-fm-color-typo-secondary fm-typo-en-body-sm-400"
|
|
2133
|
-
},
|
|
2134
|
+
}, Fa = { key: 0 }, $a = {
|
|
2134
2135
|
class: /* @__PURE__ */ W(["fm-typo-en-body-lg-600"])
|
|
2135
|
-
},
|
|
2136
|
+
}, Ia = { class: "flex-1" }, Da = { class: "flex-auto line-clamp-2 text-ellipsis break-all fm-typo-en-body-sm-400" }, Ta = { class: "flex-auto line-clamp-2 text-ellipsis break-all" }, Pa = { class: "text-fm-color-typo-primary" }, Va = { class: "ml-auto" }, Ra = { key: 0 }, Oa = /* @__PURE__ */ le({
|
|
2136
2137
|
__name: "XilnexResult",
|
|
2137
2138
|
props: {
|
|
2138
2139
|
type: {},
|
|
@@ -2147,24 +2148,24 @@ const xa = { class: "flex flex-col flex-1" }, ka = { class: "flex flex-col" }, C
|
|
|
2147
2148
|
return (n, g) => {
|
|
2148
2149
|
var k;
|
|
2149
2150
|
const h = O("FmIcon"), F = O("FmTooltip");
|
|
2150
|
-
return x(), P("div",
|
|
2151
|
+
return x(), P("div", ka, [
|
|
2151
2152
|
o("div", {
|
|
2152
2153
|
onClick: _,
|
|
2153
2154
|
class: W({
|
|
2154
2155
|
"cursor-pointer": n.errors.length
|
|
2155
2156
|
})
|
|
2156
2157
|
}, [
|
|
2157
|
-
o("div",
|
|
2158
|
-
o("div",
|
|
2158
|
+
o("div", Ca, [
|
|
2159
|
+
o("div", wa, [
|
|
2159
2160
|
o("div", {
|
|
2160
2161
|
class: W({
|
|
2161
2162
|
"text-fm-color-system-error-300": n.errors.length
|
|
2162
2163
|
})
|
|
2163
2164
|
}, [
|
|
2164
2165
|
Ce(I(n.name) + " ", 1),
|
|
2165
|
-
n.type === "create" ? (x(), P("span",
|
|
2166
|
+
n.type === "create" ? (x(), P("span", Sa, "(" + I(e(d)("inventory.closing.template.import.new")) + ")", 1)) : K("", !0)
|
|
2166
2167
|
], 2),
|
|
2167
|
-
n.errors.length ? (x(), P("div",
|
|
2168
|
+
n.errors.length ? (x(), P("div", Fa, [
|
|
2168
2169
|
m(h, {
|
|
2169
2170
|
name: "error",
|
|
2170
2171
|
size: "sm",
|
|
@@ -2173,19 +2174,19 @@ const xa = { class: "flex flex-col flex-1" }, ka = { class: "flex flex-col" }, C
|
|
|
2173
2174
|
])) : K("", !0)
|
|
2174
2175
|
]),
|
|
2175
2176
|
g[0] || (g[0] = o("hr", { class: "my-2" }, null, -1)),
|
|
2176
|
-
o("div",
|
|
2177
|
+
o("div", $a, [
|
|
2177
2178
|
(k = n.items) != null && k.length ? (x(!0), P(re, { key: 0 }, fe(n.items, (y, i) => (x(), P("div", {
|
|
2178
2179
|
key: i,
|
|
2179
2180
|
class: "flex gap-4 mt-2 items-center"
|
|
2180
2181
|
}, [
|
|
2181
|
-
o("div",
|
|
2182
|
+
o("div", Ia, [
|
|
2182
2183
|
m(F, {
|
|
2183
2184
|
content: y.code,
|
|
2184
2185
|
placement: "top",
|
|
2185
2186
|
"z-index": 51
|
|
2186
2187
|
}, {
|
|
2187
2188
|
default: A(() => [
|
|
2188
|
-
o("span",
|
|
2189
|
+
o("span", Da, I(y.code), 1)
|
|
2189
2190
|
]),
|
|
2190
2191
|
_: 2
|
|
2191
2192
|
}, 1032, ["content"]),
|
|
@@ -2195,13 +2196,13 @@ const xa = { class: "flex flex-col flex-1" }, ka = { class: "flex flex-col" }, C
|
|
|
2195
2196
|
"z-index": 51
|
|
2196
2197
|
}, {
|
|
2197
2198
|
default: A(() => [
|
|
2198
|
-
o("span",
|
|
2199
|
+
o("span", Ta, I(y.name), 1)
|
|
2199
2200
|
]),
|
|
2200
2201
|
_: 2
|
|
2201
2202
|
}, 1032, ["content"])
|
|
2202
2203
|
]),
|
|
2203
2204
|
o("div", null, [
|
|
2204
|
-
o("span",
|
|
2205
|
+
o("span", Pa, I(e(wt).toFormatString({
|
|
2205
2206
|
value: y.quantity
|
|
2206
2207
|
})), 1),
|
|
2207
2208
|
Ce(" " + I(y.measurement ? y.measurement.abbrev : y.sku.unit.abbrev), 1)
|
|
@@ -2209,7 +2210,7 @@ const xa = { class: "flex flex-col flex-1" }, ka = { class: "flex flex-col" }, C
|
|
|
2209
2210
|
]))), 128)) : K("", !0)
|
|
2210
2211
|
])
|
|
2211
2212
|
]),
|
|
2212
|
-
o("div",
|
|
2213
|
+
o("div", Va, [
|
|
2213
2214
|
n.errors.length ? (x(), se(h, {
|
|
2214
2215
|
key: 0,
|
|
2215
2216
|
name: u.value ? "keyboard_arrow_up" : "keyboard_arrow_down",
|
|
@@ -2224,7 +2225,7 @@ const xa = { class: "flex flex-col flex-1" }, ka = { class: "flex flex-col" }, C
|
|
|
2224
2225
|
"text-fm-color-system-error-300": n.errors.length
|
|
2225
2226
|
}])
|
|
2226
2227
|
}, [
|
|
2227
|
-
n.errors.length ? (x(), P("div",
|
|
2228
|
+
n.errors.length ? (x(), P("div", Ra, [
|
|
2228
2229
|
o("ol", null, [
|
|
2229
2230
|
(x(!0), P(re, null, fe(n.errors, (y, i) => (x(), P("li", { key: i }, I(y), 1))), 128))
|
|
2230
2231
|
])
|
|
@@ -2233,22 +2234,22 @@ const xa = { class: "flex flex-col flex-1" }, ka = { class: "flex flex-col" }, C
|
|
|
2233
2234
|
]);
|
|
2234
2235
|
};
|
|
2235
2236
|
}
|
|
2236
|
-
}),
|
|
2237
|
+
}), Aa = { class: "flex flex-col gap-24" }, Ea = {
|
|
2237
2238
|
key: 0,
|
|
2238
2239
|
class: "flex items-center gap-8"
|
|
2239
|
-
},
|
|
2240
|
+
}, Ma = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, qa = { class: "flex flex-col gap-8" }, Ua = { class: "line-clamp-2 text-ellipsis break-all" }, Na = {
|
|
2240
2241
|
key: 2,
|
|
2241
2242
|
class: "shrink-0"
|
|
2242
|
-
},
|
|
2243
|
+
}, Ba = {
|
|
2243
2244
|
key: 0,
|
|
2244
2245
|
class: "flex flex-col"
|
|
2245
|
-
},
|
|
2246
|
+
}, za = { class: "text-fm-color-system-error-300 fm-typo-en-body-sm-400" }, La = {
|
|
2246
2247
|
key: 0,
|
|
2247
2248
|
class: "max-h-[200px] overflow-y-auto flex flex-col gap-8"
|
|
2248
|
-
},
|
|
2249
|
+
}, ja = { class: "fm-typo-en-body-lg-600" }, ht = "Transfer note", Ha = /* @__PURE__ */ le({
|
|
2249
2250
|
__name: "XilnexImportForm",
|
|
2250
2251
|
setup(f, { expose: b }) {
|
|
2251
|
-
const d = U(null), u = Se(), _ = U(!1), n = U(!1), g =
|
|
2252
|
+
const d = U(null), u = Se(), _ = U(!1), n = U(!1), g = Vs(), h = U(!1), F = Pe();
|
|
2252
2253
|
U([]);
|
|
2253
2254
|
const k = q({
|
|
2254
2255
|
get() {
|
|
@@ -2272,7 +2273,7 @@ const xa = { class: "flex flex-col flex-1" }, ka = { class: "flex flex-col" }, C
|
|
|
2272
2273
|
});
|
|
2273
2274
|
}
|
|
2274
2275
|
});
|
|
2275
|
-
|
|
2276
|
+
Ze(async () => {
|
|
2276
2277
|
const c = await F.getNetSuiteLocations();
|
|
2277
2278
|
console.log(c), h.value = !0;
|
|
2278
2279
|
});
|
|
@@ -2319,10 +2320,10 @@ const xa = { class: "flex flex-col flex-1" }, ka = { class: "flex flex-col" }, C
|
|
|
2319
2320
|
try {
|
|
2320
2321
|
_.value = !0;
|
|
2321
2322
|
const [v] = await Promise.all([
|
|
2322
|
-
|
|
2323
|
+
Ts(c),
|
|
2323
2324
|
// fake buffer
|
|
2324
2325
|
new Promise((E) => setTimeout(E, 1e3))
|
|
2325
|
-
]), T =
|
|
2326
|
+
]), T = xa(v);
|
|
2326
2327
|
if (T.invalidExcel) {
|
|
2327
2328
|
t.value.push(
|
|
2328
2329
|
T.invalidExcelMessage ?? C("inventory.ingredient.import.fileError.invalidExcel")
|
|
@@ -2356,7 +2357,7 @@ const xa = { class: "flex flex-col flex-1" }, ka = { class: "flex flex-col" }, C
|
|
|
2356
2357
|
ref: r
|
|
2357
2358
|
}, {
|
|
2358
2359
|
default: A(() => [
|
|
2359
|
-
o("div",
|
|
2360
|
+
o("div", Aa, [
|
|
2360
2361
|
m(T, {
|
|
2361
2362
|
modelValue: k.value,
|
|
2362
2363
|
"onUpdate:modelValue": v[0] || (v[0] = (D) => k.value = D),
|
|
@@ -2386,16 +2387,16 @@ const xa = { class: "flex flex-col flex-1" }, ka = { class: "flex flex-col" }, C
|
|
|
2386
2387
|
label: "Transfer time",
|
|
2387
2388
|
rules: [e(Te)()]
|
|
2388
2389
|
}, null, 8, ["modelValue", "rules"]),
|
|
2389
|
-
n.value ? (x(), P("div",
|
|
2390
|
+
n.value ? (x(), P("div", Ea, [
|
|
2390
2391
|
o("div", null, [
|
|
2391
2392
|
m(z, {
|
|
2392
2393
|
size: "md",
|
|
2393
2394
|
color: "neutral-gray-200"
|
|
2394
2395
|
})
|
|
2395
2396
|
]),
|
|
2396
|
-
o("div",
|
|
2397
|
+
o("div", Ma, I(e(C)("inventory.formField.loading")), 1)
|
|
2397
2398
|
])) : (x(), P(re, { key: 1 }, [
|
|
2398
|
-
m(
|
|
2399
|
+
m(Ps, {
|
|
2399
2400
|
"max-file-size": 5,
|
|
2400
2401
|
class: W({
|
|
2401
2402
|
"w-full": !0,
|
|
@@ -2415,7 +2416,7 @@ const xa = { class: "flex flex-col flex-1" }, ka = { class: "flex flex-col" }, C
|
|
|
2415
2416
|
]),
|
|
2416
2417
|
_: 1
|
|
2417
2418
|
}),
|
|
2418
|
-
o("div",
|
|
2419
|
+
o("div", qa, [
|
|
2419
2420
|
o("div", {
|
|
2420
2421
|
class: W([
|
|
2421
2422
|
"fm-corner-radius-md p-16 flex items-center gap-16",
|
|
@@ -2445,9 +2446,9 @@ const xa = { class: "flex flex-col flex-1" }, ka = { class: "flex flex-col" }, C
|
|
|
2445
2446
|
}
|
|
2446
2447
|
])
|
|
2447
2448
|
}, [
|
|
2448
|
-
o("div",
|
|
2449
|
+
o("div", Ua, I(d.value.name), 1)
|
|
2449
2450
|
], 2),
|
|
2450
|
-
_.value ? K("", !0) : (x(), P("div",
|
|
2451
|
+
_.value ? K("", !0) : (x(), P("div", Na, [
|
|
2451
2452
|
m(B, {
|
|
2452
2453
|
label: e(C)("inventory.ingredient.import.replaceFile"),
|
|
2453
2454
|
variant: a.value ? "destructive" : "secondary",
|
|
@@ -2456,7 +2457,7 @@ const xa = { class: "flex flex-col flex-1" }, ka = { class: "flex flex-col" }, C
|
|
|
2456
2457
|
}, null, 8, ["label", "variant", "prepend-icon", "onClick"])
|
|
2457
2458
|
]))
|
|
2458
2459
|
], 2),
|
|
2459
|
-
t.value.length ? (x(), P("div",
|
|
2460
|
+
t.value.length ? (x(), P("div", Ba, [
|
|
2460
2461
|
(x(!0), P(re, null, fe(t.value, (M, L) => (x(), P("div", {
|
|
2461
2462
|
key: L,
|
|
2462
2463
|
class: "flex gap-8 items-center"
|
|
@@ -2466,7 +2467,7 @@ const xa = { class: "flex flex-col flex-1" }, ka = { class: "flex flex-col" }, C
|
|
|
2466
2467
|
size: "sm",
|
|
2467
2468
|
color: "system-error-300"
|
|
2468
2469
|
}),
|
|
2469
|
-
o("div",
|
|
2470
|
+
o("div", za, I(M), 1)
|
|
2470
2471
|
]))), 128))
|
|
2471
2472
|
])) : K("", !0)
|
|
2472
2473
|
])
|
|
@@ -2474,9 +2475,9 @@ const xa = { class: "flex flex-col flex-1" }, ka = { class: "flex flex-col" }, C
|
|
|
2474
2475
|
key: "0"
|
|
2475
2476
|
} : void 0
|
|
2476
2477
|
]), 1032, ["class", "button-label"]),
|
|
2477
|
-
d.value ? (x(), P("div",
|
|
2478
|
-
o("div",
|
|
2479
|
-
(x(!0), P(re, null, fe(s.value, (D, M) => (x(), se(
|
|
2478
|
+
d.value ? (x(), P("div", La, [
|
|
2479
|
+
o("div", ja, I(e(C)("inventory.ingredient.import.summary")), 1),
|
|
2480
|
+
(x(!0), P(re, null, fe(s.value, (D, M) => (x(), se(Oa, {
|
|
2480
2481
|
key: M,
|
|
2481
2482
|
name: `Transfer Note ${M + 1}`,
|
|
2482
2483
|
items: D.poItems,
|
|
@@ -2491,14 +2492,14 @@ const xa = { class: "flex flex-col flex-1" }, ka = { class: "flex flex-col" }, C
|
|
|
2491
2492
|
}, 512);
|
|
2492
2493
|
};
|
|
2493
2494
|
}
|
|
2494
|
-
}),
|
|
2495
|
+
}), Qa = { class: "w-[480px]" }, Ya = /* @__PURE__ */ le({
|
|
2495
2496
|
__name: "XilnexImportDialog",
|
|
2496
2497
|
props: {
|
|
2497
2498
|
show: { type: Boolean }
|
|
2498
2499
|
},
|
|
2499
2500
|
emits: ["update:show", "submitted"],
|
|
2500
2501
|
setup(f, { expose: b, emit: d }) {
|
|
2501
|
-
const u = d, n = Ft(f, "show"), g = Se(), h =
|
|
2502
|
+
const u = d, n = Ft(f, "show"), g = Se(), h = et(), F = U(!1), k = U(), y = U();
|
|
2502
2503
|
b({
|
|
2503
2504
|
validateInputs: () => {
|
|
2504
2505
|
var s, a;
|
|
@@ -2597,8 +2598,8 @@ const xa = { class: "flex flex-col flex-1" }, ka = { class: "flex flex-col" }, C
|
|
|
2597
2598
|
}, null, 8, ["disabled", "loading"])
|
|
2598
2599
|
]),
|
|
2599
2600
|
default: A(() => [
|
|
2600
|
-
o("div",
|
|
2601
|
-
m(
|
|
2601
|
+
o("div", Qa, [
|
|
2602
|
+
m(Ha, {
|
|
2602
2603
|
ref_key: "formRef",
|
|
2603
2604
|
ref: k,
|
|
2604
2605
|
onValidationSuccess: t,
|
|
@@ -2611,10 +2612,10 @@ const xa = { class: "flex flex-col flex-1" }, ka = { class: "flex flex-col" }, C
|
|
|
2611
2612
|
}, 8, ["modelValue"]);
|
|
2612
2613
|
};
|
|
2613
2614
|
}
|
|
2614
|
-
}),
|
|
2615
|
+
}), Ka = { class: "flex flex-col py-8" }, Xa = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Za = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary line-clamp-1" }, Wa = { class: "fm-typo-en-body-md-400 text-fm-color-typo-primary line-clamp-1" }, Ja = {
|
|
2615
2616
|
key: 0,
|
|
2616
2617
|
class: "fm-typo-en-body-md-400 text-fm-color-typo-primary line-clamp-1"
|
|
2617
|
-
},
|
|
2618
|
+
}, Ga = { class: "pt-8" }, xt = "ReceiveRequestViewSearchCriteria", Tr = /* @__PURE__ */ le({
|
|
2618
2619
|
__name: "ReceiveRequestView",
|
|
2619
2620
|
setup(f) {
|
|
2620
2621
|
const { t: b } = ge(), d = Se();
|
|
@@ -2625,11 +2626,11 @@ const xa = { class: "flex flex-col flex-1" }, ka = { class: "flex flex-col" }, C
|
|
|
2625
2626
|
});
|
|
2626
2627
|
const u = q(
|
|
2627
2628
|
() => !t._currentLocation || y.loading.value
|
|
2628
|
-
), _ =
|
|
2629
|
+
), _ = is(), n = ze(), g = Pe();
|
|
2629
2630
|
function h() {
|
|
2630
2631
|
const N = {
|
|
2631
2632
|
name: "",
|
|
2632
|
-
...
|
|
2633
|
+
...vt()
|
|
2633
2634
|
}, B = _.getItem(xt);
|
|
2634
2635
|
if (!B)
|
|
2635
2636
|
return N;
|
|
@@ -2651,10 +2652,10 @@ const xa = { class: "flex flex-col flex-1" }, ka = { class: "flex flex-col" }, C
|
|
|
2651
2652
|
y.shipments
|
|
2652
2653
|
), t = Ne();
|
|
2653
2654
|
async function s() {
|
|
2654
|
-
const N = `inventory-record_${
|
|
2655
|
+
const N = `inventory-record_${yt(k.value.startDate).format("DD-MM-YYYY_HH-mm")}-${yt(k.value.endDate).format("DD-MM-YYYY_HH-mm")}.xlsx`, B = y.purchaseOrders.value.flatMap(
|
|
2655
2656
|
(D) => D.items.map((M) => {
|
|
2656
2657
|
var Q;
|
|
2657
|
-
const L = new Date(
|
|
2658
|
+
const L = new Date(ns(D._id) ?? ""), J = D.effectiveAt ? new Date(D.effectiveAt) : void 0, oe = xe(
|
|
2658
2659
|
os(M.sku, D.deliveryOrder || [])
|
|
2659
2660
|
), w = xe(M.quantity), S = ((Q = M == null ? void 0 : M.measurement) == null ? void 0 : Q.abbrev) || M.sku.unit.abbrev;
|
|
2660
2661
|
return {
|
|
@@ -2682,7 +2683,7 @@ const xa = { class: "flex flex-col flex-1" }, ka = { class: "flex flex-col" }, C
|
|
|
2682
2683
|
"Ordered quantity",
|
|
2683
2684
|
"Unit"
|
|
2684
2685
|
];
|
|
2685
|
-
n.enableBackdatePo && V.insert("Effective at", 4), n.enableTotalCost && V.push("Total cost"), await
|
|
2686
|
+
n.enableBackdatePo && V.insert("Effective at", 4), n.enableTotalCost && V.push("Total cost"), await ls(
|
|
2686
2687
|
[
|
|
2687
2688
|
{
|
|
2688
2689
|
name: "purchases",
|
|
@@ -2697,7 +2698,7 @@ const xa = { class: "flex flex-col flex-1" }, ka = { class: "flex flex-col" }, C
|
|
|
2697
2698
|
type: "success"
|
|
2698
2699
|
});
|
|
2699
2700
|
}
|
|
2700
|
-
const a = U(
|
|
2701
|
+
const a = U(vt()), r = U("");
|
|
2701
2702
|
be([() => a.value], ([N]) => {
|
|
2702
2703
|
!N.startDate || !N.endDate || (k.value.startDate = N.startDate, k.value.endDate = N.endDate, y.updateDateRange(
|
|
2703
2704
|
k.value.startDate,
|
|
@@ -2725,7 +2726,7 @@ const xa = { class: "flex flex-col flex-1" }, ka = { class: "flex flex-col" }, C
|
|
|
2725
2726
|
if (N === "export")
|
|
2726
2727
|
return s();
|
|
2727
2728
|
}
|
|
2728
|
-
const { breakpoints: $ } =
|
|
2729
|
+
const { breakpoints: $ } = We(), c = q(() => $.value.xs || $.value.sm), v = q(() => c.value ? 10 : 20), T = us(), E = q(() => [
|
|
2729
2730
|
{
|
|
2730
2731
|
label: b("inventory.transfer.receiveRequest.actions.create"),
|
|
2731
2732
|
value: "create",
|
|
@@ -2789,10 +2790,10 @@ const xa = { class: "flex flex-col flex-1" }, ka = { class: "flex flex-col" }, C
|
|
|
2789
2790
|
}), z = U(null), X = q(() => {
|
|
2790
2791
|
if (!z.value)
|
|
2791
2792
|
return y.purchaseOrders.value;
|
|
2792
|
-
const N =
|
|
2793
|
+
const N = Rs.build(z.value);
|
|
2793
2794
|
return y.purchaseOrders.value.filter((B) => {
|
|
2794
2795
|
var V, D, M, L;
|
|
2795
|
-
return
|
|
2796
|
+
return Os(
|
|
2796
2797
|
{
|
|
2797
2798
|
netsuiteTransactionNumber: (D = (V = B.netSuite) == null ? void 0 : V.additionalInfo) == null ? void 0 : D.transactionnumber,
|
|
2798
2799
|
netsuiteOrderNo: (M = B.netSuite) == null ? void 0 : M.refNo,
|
|
@@ -2805,7 +2806,7 @@ const xa = { class: "flex flex-col flex-1" }, ka = { class: "flex flex-col" }, C
|
|
|
2805
2806
|
});
|
|
2806
2807
|
return (N, B) => {
|
|
2807
2808
|
const V = O("FmTable");
|
|
2808
|
-
return x(), se(
|
|
2809
|
+
return x(), se(ds, {
|
|
2809
2810
|
title: e(b)("inventory.transfer.receiveRequest.title2"),
|
|
2810
2811
|
actions: E.value,
|
|
2811
2812
|
"onClick:action": C
|
|
@@ -2853,27 +2854,27 @@ const xa = { class: "flex flex-col flex-1" }, ka = { class: "flex flex-col" }, C
|
|
|
2853
2854
|
default: A((J) => {
|
|
2854
2855
|
var oe, w, S, Q, ne, ie, ee, _e, ve, Ve, Re, Oe, Le, ke, Fe, $e, Ae, l, p, j;
|
|
2855
2856
|
return [
|
|
2856
|
-
o("div",
|
|
2857
|
-
o("div",
|
|
2857
|
+
o("div", Ka, [
|
|
2858
|
+
o("div", Xa, [
|
|
2858
2859
|
m(e(ce), {
|
|
2859
2860
|
render: (S = (w = (oe = J._id) == null ? void 0 : oe.column) == null ? void 0 : w.columnDef) == null ? void 0 : S.cell,
|
|
2860
2861
|
props: (ne = (Q = J._id) == null ? void 0 : Q.getContext) == null ? void 0 : ne.call(Q)
|
|
2861
2862
|
}, null, 8, ["render", "props"])
|
|
2862
2863
|
]),
|
|
2863
|
-
o("div",
|
|
2864
|
+
o("div", Za, [
|
|
2864
2865
|
m(e(ce), {
|
|
2865
2866
|
render: (_e = (ee = (ie = J.supplier_name) == null ? void 0 : ie.column) == null ? void 0 : ee.columnDef) == null ? void 0 : _e.cell,
|
|
2866
2867
|
props: (Ve = (ve = J.supplier_name) == null ? void 0 : ve.getContext) == null ? void 0 : Ve.call(ve)
|
|
2867
2868
|
}, null, 8, ["render", "props"])
|
|
2868
2869
|
]),
|
|
2869
|
-
o("div",
|
|
2870
|
-
L.original.ref ? (x(), P("div",
|
|
2870
|
+
o("div", Wa, I(L.original.items.map((H) => `${H.name}`).join(", ")), 1),
|
|
2871
|
+
L.original.ref ? (x(), P("div", Ja, [
|
|
2871
2872
|
m(e(ce), {
|
|
2872
2873
|
render: (Le = (Oe = (Re = J.ref) == null ? void 0 : Re.column) == null ? void 0 : Oe.columnDef) == null ? void 0 : Le.cell,
|
|
2873
2874
|
props: (Fe = (ke = J.ref) == null ? void 0 : ke.getContext) == null ? void 0 : Fe.call(ke)
|
|
2874
2875
|
}, null, 8, ["render", "props"])
|
|
2875
2876
|
])) : K("", !0),
|
|
2876
|
-
o("div",
|
|
2877
|
+
o("div", Ga, [
|
|
2877
2878
|
m(e(ce), {
|
|
2878
2879
|
render: (l = (Ae = ($e = J.status) == null ? void 0 : $e.column) == null ? void 0 : Ae.columnDef) == null ? void 0 : l.cell,
|
|
2879
2880
|
props: (j = (p = J.status) == null ? void 0 : p.getContext) == null ? void 0 : j.call(p)
|
|
@@ -2889,7 +2890,7 @@ const xa = { class: "flex flex-col flex-1" }, ka = { class: "flex flex-col" }, C
|
|
|
2889
2890
|
}, 8, ["style", "column-defs", "row-data", "search-value", "loading", "page-size"]))
|
|
2890
2891
|
], 2),
|
|
2891
2892
|
(x(), se(Lt, { to: "body" }, [
|
|
2892
|
-
m(
|
|
2893
|
+
m(_a, Xe(e(y).transferDialogProps.value, {
|
|
2893
2894
|
onSubmitted: e(y).fetchData
|
|
2894
2895
|
}), null, 16, ["onSubmitted"]),
|
|
2895
2896
|
m(ss, Xe({
|
|
@@ -2901,7 +2902,7 @@ const xa = { class: "flex flex-col flex-1" }, ka = { class: "flex flex-col" }, C
|
|
|
2901
2902
|
}, {
|
|
2902
2903
|
onSubmitted: e(y).fetchData
|
|
2903
2904
|
}), null, 16, ["scope", "onSubmitted"]),
|
|
2904
|
-
m(
|
|
2905
|
+
m(Ya, jt(Ht(e(y).xilnexImportDialogProps.value)), null, 16)
|
|
2905
2906
|
]))
|
|
2906
2907
|
];
|
|
2907
2908
|
}),
|
|
@@ -2911,5 +2912,5 @@ const xa = { class: "flex flex-col flex-1" }, ka = { class: "flex flex-col" }, C
|
|
|
2911
2912
|
}
|
|
2912
2913
|
});
|
|
2913
2914
|
export {
|
|
2914
|
-
|
|
2915
|
+
Tr as default
|
|
2915
2916
|
};
|