@feedmepos/mf-inventory-portal 1.8.0-dev.3 → 1.8.0-dev.4
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-DRXADP0k.js → App-FeJnwZme.js} +362 -374
- package/dist/{ApprovalView-hV1msz5Y.js → ApprovalView-Eo-cGWyA.js} +9 -9
- package/dist/{BindingsDialog-BX1Lopf0.js → BindingsDialog-DkjuXydb.js} +2 -2
- package/dist/{BindingsPicker-BNKW8-XY.js → BindingsPicker-DUOQcOlj.js} +2 -2
- package/dist/{BindingsTable-DiLDsL83.js → BindingsTable-CoDdU5xh.js} +4 -4
- package/dist/{BulkReceiveRequestView-oQh6kFLc.js → BulkReceiveRequestView-BGh8fbEX.js} +21 -22
- package/dist/{ChangeLocationComponent.vue_vue_type_script_setup_true_lang-BaMcGU-x.js → ChangeLocationComponent.vue_vue_type_script_setup_true_lang-CStISRqy.js} +1 -1
- package/dist/{ClosingDraftView-sgLoaSf4.js → ClosingDraftView-Cwnhrv5P.js} +20 -20
- package/dist/{ClosingHistoryView-BnE9HrzA.js → ClosingHistoryView-oHf77Lal.js} +5 -5
- package/dist/{ClosingTemplateView-BD3Pa11r.js → ClosingTemplateView-1P8J1vAn.js} +18 -18
- package/dist/{CustomPrintTemplatePreview.vue_vue_type_script_setup_true_lang-DlbyxkMQ.js → CustomPrintTemplatePreview.vue_vue_type_script_setup_true_lang-BuEPaqQK.js} +1 -1
- package/dist/{DefaultView-CuzvVkfE.js → DefaultView-3Z8aVFSU.js} +5 -5
- package/dist/{DeliveryOrderPrintPreview-w-1aAOY1.js → DeliveryOrderPrintPreview-uT_e3Suw.js} +2 -2
- package/dist/{DeprecateSoonWarningDialog.vue_vue_type_script_setup_true_lang-Bp8bjDU1.js → DeprecateSoonWarningDialog.vue_vue_type_script_setup_true_lang-D_vmtZDZ.js} +1 -1
- package/dist/{EmailDialog.vue_vue_type_script_setup_true_lang-CxD12Qct.js → EmailDialog.vue_vue_type_script_setup_true_lang-BCgnXxEi.js} +29 -30
- package/dist/FeatureCapabilityBadge.vue_vue_type_script_setup_true_lang-D-RzUmqA.js +81 -0
- package/dist/{FmDateRangePickerChip.vue_vue_type_script_setup_true_lang-BqCh_vTP.js → FmDateRangePickerChip.vue_vue_type_script_setup_true_lang-BlKpGdCx.js} +1 -1
- package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-CAXnmdUy.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-DKkxn1J-.js} +2 -2
- package/dist/{FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-NhOdW33O.js → FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-dOXDST-E.js} +2 -2
- package/dist/{FmMultiselectDialog-BqZgHP8s.js → FmMultiselectDialog-C8uYx8rr.js} +1 -1
- package/dist/{FmMultiselectDialog-CULwA_hi.js → FmMultiselectDialog-DRxZAkcu.js} +2 -2
- package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-CI3Y9kDl.js → FmUnitInput.vue_vue_type_script_setup_true_lang-DRSzQqVJ.js} +6 -6
- package/dist/{ImportView-DqQG673_.js → ImportView-Qigtf3ik.js} +6 -6
- package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-DfvNUu80.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-B8PJeYrP.js} +1 -1
- package/dist/{IngredientGroupView-CyngKxPo.js → IngredientGroupView-RNYZLkQu.js} +7 -7
- package/dist/{IngredientsView-pzpP6oXT.js → IngredientsView-N9U7tdI_.js} +17 -17
- package/dist/{IntegrationExplorerView-C5aAhB6e.js → IntegrationExplorerView-CjmeGQ14.js} +4 -4
- package/dist/{IntegrationView-Bqun7nX0.js → IntegrationView-DAdpmuxx.js} +15 -15
- package/dist/{InventoryBindingForm-r_Ua1C4a.js → InventoryBindingForm-CAj3MurI.js} +1 -1
- package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-CYDuu4kU.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-3pYuu62C.js} +5 -5
- package/dist/{InventoryBindingSummary-BQuZLohR.js → InventoryBindingSummary-B-1OBUdw.js} +1 -1
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-7r-QcJdU.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-CUYYEuW3.js} +1 -1
- package/dist/{ProductionRunDetailView-95fu_CfH.js → ProductionRunDetailView-eFvl8-By.js} +4 -4
- package/dist/{ProductionRunLifecycleDialogs.vue_vue_type_script_setup_true_lang-CdOca1tV.js → ProductionRunLifecycleDialogs.vue_vue_type_script_setup_true_lang-DaC7e4qS.js} +7 -7
- package/dist/{ProductionRunView-DIjor_Ix.js → ProductionRunView-C_NJJKLr.js} +3 -3
- package/dist/{PublishView-DYObyHQq.js → PublishView-BglAEkzU.js} +3 -3
- package/dist/{PurchaseOrderPrintPreview-C0jCmI9L.js → PurchaseOrderPrintPreview-BTF9ikpQ.js} +2 -2
- package/dist/{ReceiveRequestView-i7ibPfIE.js → ReceiveRequestView-BUvehG10.js} +15 -16
- package/dist/{RecipeView-C5VO7yr3.js → RecipeView-DO5-jgwh.js} +19 -20
- package/dist/{SettingsView-CdBloj9k.js → SettingsView-DRR86cHo.js} +10 -11
- package/dist/{StockView-g_6eJ62R.js → StockView-D1oEnbZp.js} +23 -24
- package/dist/{SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-C1rKc7MA.js → SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-CxU92-io.js} +1 -1
- package/dist/{SupplierView-DkYp_Frj.js → SupplierView-D68wz0-g.js} +14 -14
- package/dist/{SurchargeView-CfkV4Y3y.js → SurchargeView-Cw9rTw2h.js} +7 -7
- package/dist/{SystemTrailDialog.vue_vue_type_script_setup_true_lang-2MtN1p5t.js → SystemTrailDialog.vue_vue_type_script_setup_true_lang-Az-a1Dsp.js} +2 -2
- package/dist/{TemplatePublishDialog.vue_vue_type_script_setup_true_lang-CYMjKXq4.js → TemplatePublishDialog.vue_vue_type_script_setup_true_lang-C-sxbacO.js} +1 -1
- package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-D0zNr_vQ.js → TransferDetails.vue_vue_type_script_setup_true_lang-CsHfLaCv.js} +241 -242
- package/dist/{TransferTemplateView-Ne2gYUSn.js → TransferTemplateView-CHPJMjYC.js} +22 -23
- package/dist/{UnitCostHistoryView-Db0_otOb.js → UnitCostHistoryView-DM8OzWhe.js} +4 -4
- package/dist/{UnitDisplayControl.vue_vue_type_script_setup_true_lang-BzO1lq7j.js → UnitDisplayControl.vue_vue_type_script_setup_true_lang-DpwK5mFH.js} +4 -4
- package/dist/{UnitView-CiCeQ63i.js → UnitView-90uR-ZzQ.js} +8 -8
- package/dist/{WarehouseView-BcuJSOMF.js → WarehouseView-Bulg6Vac.js} +8 -8
- package/dist/{WastageTemplateView-CPQmtOKQ.js → WastageTemplateView-BmAHnnwm.js} +15 -15
- package/dist/{app-DqJp3dcI.js → app-Ccdgbe4f.js} +16 -16
- package/dist/app.js +1 -1
- package/dist/{closing-template-BNlgZviN.js → closing-template-DuBZxoXx.js} +1 -1
- package/dist/components/FeatureCapabilityBadge.vue.d.ts +1 -1
- package/dist/{date2-Ci7521dn.js → date2-IBrLdtni.js} +1 -1
- package/dist/{dayjs.min-Cyp32v4J.js → dayjs.min-DEkq-Hpp.js} +1 -1
- package/dist/{decimal-BGdm5R3A.js → decimal-g6jRdlSk.js} +2 -2
- package/dist/{defineDeepModel-B2cJ-rtd.js → defineDeepModel-P5a5Ffpn.js} +1 -1
- package/dist/{duplicate-template-By5WeKZ0.js → duplicate-template-Do8s80ei.js} +1 -1
- package/dist/{core-Js7d-3Pv.js → feature-ChVm5JED.js} +3296 -1860
- package/dist/feature-flags/core.d.ts +3 -2
- package/dist/feature-flags/portal-feature-catalog.d.ts +2 -5
- package/dist/feature-flags/premium-flags.spec.d.ts +1 -0
- package/dist/feature-flags/vue.d.ts +2 -0
- package/dist/{format-time-from-id-Q8C2P96H.js → format-time-from-id-BgbBOII7.js} +1 -1
- package/dist/{format-unit-display-CICrmm8r.js → format-unit-display-hSXy2iu6.js} +13 -13
- package/dist/{id-to-date-DeN5x0LR.js → id-to-date-DlGYysU8.js} +1 -1
- package/dist/{import-export.helper-BOTQWxr6.js → import-export.helper-LrZhiz2W.js} +28 -28
- package/dist/{index-BbbqCCfp.js → index-BTNJ1fk2.js} +3 -3
- package/dist/{index-Cxm3Sgfv.js → index-DCiNwlw2.js} +1 -1
- package/dist/{index-tCYhLCKP.js → index-DsOmtywr.js} +1 -1
- package/dist/{lz-string-Dy4Pg8mh.js → lz-string-DRuyjE9G.js} +1 -1
- package/dist/{netsuite-BaJjkDM8.js → netsuite-B6y8GZCP.js} +2 -2
- package/dist/{number-CB36d2PQ.js → number-Besn-1-5.js} +3 -3
- package/dist/{predefined-templates-DLm93Bpx.js → predefined-templates-D92mN_2S.js} +1 -1
- package/dist/{purchase-order-template-CDhn9ZIF.js → purchase-order-template-hvq2pfWx.js} +1 -1
- package/dist/{recalculationUtils-Cqvefakh.js → recalculationUtils-BlZR5O2G.js} +1 -1
- package/dist/{row-action.enum-NTfVmGY8.js → row-action.enum-R2bi3eAv.js} +1 -1
- package/dist/{rules-C8dfM84-.js → rules-DzwoRKUS.js} +2 -2
- package/dist/{stock-BGB0Siue.js → stock-Cq37EARQ.js} +3 -3
- package/dist/{stock-Qu5IiN2_.js → stock-oJqnUrtt.js} +1 -1
- package/dist/stores/feature.d.ts +1 -0
- package/dist/{supplier-CZdNOSMN.js → supplier-DtdwvcPr.js} +17 -17
- package/dist/{surcharge-Cm40oJvU.js → surcharge-CjdJGIsM.js} +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{uom-rules-L-IW4Nwk.js → uom-rules-BqPn_GoZ.js} +1 -1
- package/dist/{use-ingredient-select-dialog-B2TDVJM6.js → use-ingredient-select-dialog-0hRCj6Fu.js} +2 -2
- package/dist/{use-inventory-binding-dialog-BJ00hl5f.js → use-inventory-binding-dialog-BLRcIC1u.js} +2 -2
- package/dist/{use-template-enabled-locations-DYAPMvo9.js → use-template-enabled-locations-8ZfTj4YB.js} +2 -2
- package/dist/{use-transfer-locations-w-9tymYS.js → use-transfer-locations-BGS1EBEt.js} +2 -2
- package/dist/{useHrmPermission-BFCIo5sA.js → useHrmPermission-BcQ2KPD-.js} +1 -1
- package/dist/{useNavigationMenu-BPHAH5sJ.js → useNavigationMenu-DImtns81.js} +73 -71
- package/dist/{useSseClient-CWjRacRs.js → useSseClient-DPSFFVci.js} +1 -1
- package/dist/{vue-i18n-S4YQ9w6a.js → vue-i18n-DTyGIjTI.js} +1 -1
- package/dist/{xlsx.util-CP8_VajN.js → xlsx.util-CK9Lnq3Q.js} +2 -2
- package/package.json +6 -6
- package/dist/FeatureCapabilityBadge.vue_vue_type_script_setup_true_lang-CMoQKl_a.js +0 -308
- package/dist/feature-fG7d73oi.js +0 -371
- package/dist/index-Dqf27vLH.js +0 -841
|
@@ -1,32 +1,31 @@
|
|
|
1
|
-
import { f as lt, p as ks } from "./format-time-from-id-
|
|
1
|
+
import { f as lt, p as ks } from "./format-time-from-id-BgbBOII7.js";
|
|
2
2
|
import { defineComponent as Ve, ref as ne, watch as Ye, createElementBlock as v, openBlock as i, createCommentVNode as V, createElementVNode as e, withDirectives as Os, toDisplayString as k, unref as h, vModelText as xs, toRaw as ws, shallowRef as dt, onUnmounted as rs, triggerRef as $s, computed as H, readonly as Cs, h as re, resolveComponent as oe, createVNode as T, Fragment as Ce, renderList as Te, reactive as As, onMounted as os, createBlock as he, withCtx as ce, createTextVNode as Ge, normalizeClass as We, renderSlot as Ds, isRef as Rs, resolveDynamicComponent as Ns } from "vue";
|
|
3
3
|
import { c as Ht } from "./component-BmLAdDiY.js";
|
|
4
|
-
import { D as qe, R as Re } from "./row-action.enum-
|
|
5
|
-
import { q as Ae, H as st, d as Ps, u as ze, _ as z, a3 as ns, a4 as yt, Z as
|
|
6
|
-
import { h as Nt, a as qs, t as Vs, b as et } from "./date2-
|
|
7
|
-
import { j as Ls, c as js, a as $e, t as Qe, d as ut } from "./number-
|
|
8
|
-
import { F as Be, c as Us,
|
|
9
|
-
import { L as Ms } from "./lz-string-
|
|
10
|
-
import { useI18n as ht, useCoreStore as
|
|
11
|
-
import { useDialog as
|
|
12
|
-
import { u as _t, a as Pt, S as Me } from "./netsuite-
|
|
4
|
+
import { D as qe, R as Re } from "./row-action.enum-R2bi3eAv.js";
|
|
5
|
+
import { q as Ae, H as st, d as Ps, u as ze, _ as z, a3 as ns, a4 as yt, Z as be, a as Dt, a5 as Gt, a6 as Fs, a7 as Is, G as Ts, s as Rt, c as wt, M as Wt, a8 as as, r as at, C as Ue, w as Pe, B as mt, a9 as Es } from "./app-Ccdgbe4f.js";
|
|
6
|
+
import { h as Nt, a as qs, t as Vs, b as et } from "./date2-IBrLdtni.js";
|
|
7
|
+
import { j as Ls, c as js, a as $e, t as Qe, d as ut } from "./number-Besn-1-5.js";
|
|
8
|
+
import { F as Be, u as Je, c as Us, d as Qt, e as St } from "./feature-ChVm5JED.js";
|
|
9
|
+
import { L as Ms } from "./lz-string-DRuyjE9G.js";
|
|
10
|
+
import { useI18n as ht, useCoreStore as gt } from "@feedmepos/mf-common";
|
|
11
|
+
import { useDialog as bt, useSnackbar as Ze, components as pt, FmButtonVariant as je, useProxiedModel as Bs } from "@feedmepos/ui-library";
|
|
12
|
+
import { u as _t, a as Pt, S as Me } from "./netsuite-B6y8GZCP.js";
|
|
13
13
|
import { F as tt } from "./FmAdminBadge-DlplQOHb.js";
|
|
14
|
-
import { useFeatureStore as Ze } from "./feature-fG7d73oi.js";
|
|
15
14
|
import { _ as Yt } from "./empty-placeholder-B0QU467o.js";
|
|
16
|
-
import { a as zs, b as Ks, f as ft } from "./format-unit-display-
|
|
17
|
-
import { u as Xe, _ as Hs } from "./SystemTrailDialog.vue_vue_type_script_setup_true_lang-
|
|
18
|
-
import { _ as Gs, a as Ws, b as Qs } from "./FmUnitInput.vue_vue_type_script_setup_true_lang-
|
|
15
|
+
import { a as zs, b as Ks, f as ft } from "./format-unit-display-hSXy2iu6.js";
|
|
16
|
+
import { u as Xe, _ as Hs } from "./SystemTrailDialog.vue_vue_type_script_setup_true_lang-Az-a1Dsp.js";
|
|
17
|
+
import { _ as Gs, a as Ws, b as Qs } from "./FmUnitInput.vue_vue_type_script_setup_true_lang-DRSzQqVJ.js";
|
|
19
18
|
import { u as Ys, R as Jt } from "./usePromise-CbVUCxhj.js";
|
|
20
|
-
import { e as Js } from "./index-
|
|
21
|
-
import { i as Zs } from "./FmDateRangePickerChip.vue_vue_type_script_setup_true_lang-
|
|
19
|
+
import { e as Js } from "./index-BTNJ1fk2.js";
|
|
20
|
+
import { i as Zs } from "./FmDateRangePickerChip.vue_vue_type_script_setup_true_lang-BlKpGdCx.js";
|
|
22
21
|
import { F as Zt } from "./form-mode.enum-BKiNVH6A.js";
|
|
23
|
-
import { u as ls } from "./supplier-
|
|
24
|
-
import { u as Xs } from "./surcharge-
|
|
25
|
-
import { f as er, h as tr, r as sr, s as rr } from "./predefined-templates-
|
|
26
|
-
import { F as or } from "./decimal-
|
|
27
|
-
import { d as is } from "./defineDeepModel-
|
|
28
|
-
import { u as nr } from "./vue-i18n-
|
|
29
|
-
import { u as ar } from "./useHrmPermission-
|
|
22
|
+
import { u as ls } from "./supplier-DtdwvcPr.js";
|
|
23
|
+
import { u as Xs } from "./surcharge-CjdJGIsM.js";
|
|
24
|
+
import { f as er, h as tr, r as sr, s as rr } from "./predefined-templates-D92mN_2S.js";
|
|
25
|
+
import { F as or } from "./decimal-g6jRdlSk.js";
|
|
26
|
+
import { d as is } from "./defineDeepModel-P5a5Ffpn.js";
|
|
27
|
+
import { u as nr } from "./vue-i18n-DTyGIjTI.js";
|
|
28
|
+
import { u as ar } from "./useHrmPermission-BcQ2KPD-.js";
|
|
30
29
|
function us(d, t) {
|
|
31
30
|
return t.reduce(
|
|
32
31
|
(n, m) => {
|
|
@@ -85,18 +84,18 @@ function lr(d) {
|
|
|
85
84
|
const { sku: G, measurement: X } = A, le = $e(
|
|
86
85
|
us(A.sku, t.deliveryOrder || []),
|
|
87
86
|
!1
|
|
88
|
-
),
|
|
89
|
-
return
|
|
87
|
+
), g = F(A);
|
|
88
|
+
return g && _.push(g), {
|
|
90
89
|
code: G.code,
|
|
91
90
|
description: G.name,
|
|
92
91
|
quantity: $e(A.quantity, !1),
|
|
93
92
|
unit: (X == null ? void 0 : X.abbrev) || ((D = G.unit) == null ? void 0 : D.abbrev) || "",
|
|
94
93
|
received: le,
|
|
95
|
-
unitCost:
|
|
96
|
-
value: A.quantity.amount === 0 ? Be.fromNumber(0) : Be.divide([
|
|
94
|
+
unitCost: g ? `${g.currency} ${Be.toFormatString({
|
|
95
|
+
value: A.quantity.amount === 0 ? Be.fromNumber(0) : Be.divide([g, A.quantity])
|
|
97
96
|
})}` : void 0,
|
|
98
|
-
cost:
|
|
99
|
-
value:
|
|
97
|
+
cost: g ? `${g.currency} ${Be.toFormatString({
|
|
98
|
+
value: g
|
|
100
99
|
})}` : void 0
|
|
101
100
|
};
|
|
102
101
|
}), E = _.length ? `${_[0].currency} ${Be.toFormatString({
|
|
@@ -106,12 +105,12 @@ function lr(d) {
|
|
|
106
105
|
ref: A.deliveryOrderNumber,
|
|
107
106
|
remark: A.remark || "",
|
|
108
107
|
items: (A.received || []).map((G) => {
|
|
109
|
-
var X, le,
|
|
108
|
+
var X, le, g, D, ie;
|
|
110
109
|
return {
|
|
111
110
|
code: ((X = G.sku) == null ? void 0 : X.code) || "",
|
|
112
111
|
description: ((le = G.sku) == null ? void 0 : le.name) || "",
|
|
113
112
|
quantity: $e(G.amount),
|
|
114
|
-
unit: ((
|
|
113
|
+
unit: ((g = G.measurement) == null ? void 0 : g.abbrev) || ((ie = (D = G.sku) == null ? void 0 : D.unit) == null ? void 0 : ie.abbrev) || ""
|
|
115
114
|
};
|
|
116
115
|
})
|
|
117
116
|
}));
|
|
@@ -332,9 +331,9 @@ function $t(d) {
|
|
|
332
331
|
});
|
|
333
332
|
}
|
|
334
333
|
function Ct(d, t, r) {
|
|
335
|
-
if (!
|
|
334
|
+
if (!be.safeParse(d).success)
|
|
336
335
|
throw new Error(`Invalid purchase order status: ${d}`);
|
|
337
|
-
const n =
|
|
336
|
+
const n = be.parse(d);
|
|
338
337
|
return yt.orderStatusCombination({
|
|
339
338
|
status: n,
|
|
340
339
|
isPOPartialReceive: t,
|
|
@@ -342,7 +341,7 @@ function Ct(d, t, r) {
|
|
|
342
341
|
});
|
|
343
342
|
}
|
|
344
343
|
function fs() {
|
|
345
|
-
const d = ze(), t = Xe(), r =
|
|
344
|
+
const d = ze(), t = Xe(), r = Je();
|
|
346
345
|
async function n(u, c) {
|
|
347
346
|
const s = d.currentLocationDBName;
|
|
348
347
|
return u.doc.supplier.internal && u.operation === z.enum.confirmDraft && (u.operation = z.enum.submitRequest), await t.processPurchaseOrder(u, c || s);
|
|
@@ -502,7 +501,7 @@ function hs() {
|
|
|
502
501
|
}
|
|
503
502
|
return;
|
|
504
503
|
}
|
|
505
|
-
if (!
|
|
504
|
+
if (!Je().mustUsePoTemplate) {
|
|
506
505
|
c.value.init();
|
|
507
506
|
return;
|
|
508
507
|
}
|
|
@@ -516,24 +515,24 @@ function hs() {
|
|
|
516
515
|
}
|
|
517
516
|
var At = /* @__PURE__ */ ((d) => (d.RECEIVE_REQUEST = "receive/request", d.APPROVAL = "approval", d))(At || {});
|
|
518
517
|
const ot = ne(), Ot = ne(), xt = ne();
|
|
519
|
-
function
|
|
520
|
-
const r =
|
|
518
|
+
function hi(d, t) {
|
|
519
|
+
const r = bt(), n = ze(), m = Je(), u = ls(), c = gt(), s = zs(), a = Ks(), O = ne(!1), f = Ze(), R = Xe(), N = ir(), F = ne(new Array()), _ = ne(new Array()), B = ne(
|
|
521
520
|
t != null && t.startDate && (t != null && t.endDate) ? t : Zs()
|
|
522
521
|
), E = H(() => {
|
|
523
|
-
const
|
|
522
|
+
const g = new Date(B.value.startDate), D = new Date(B.value.endDate);
|
|
524
523
|
return {
|
|
525
|
-
start: Vs(
|
|
524
|
+
start: Vs(g).toISOString(),
|
|
526
525
|
end: qs(D).toISOString()
|
|
527
526
|
};
|
|
528
527
|
}), te = ne(new Array()), se = Ts(), Q = ne(null);
|
|
529
|
-
async function de(
|
|
528
|
+
async function de(g) {
|
|
530
529
|
function D(ee) {
|
|
531
530
|
const L = {
|
|
532
531
|
mode: Zt.CREATE,
|
|
533
|
-
modelValue:
|
|
532
|
+
modelValue: g || void 0,
|
|
534
533
|
show: !0,
|
|
535
|
-
"onUpdate:show"(
|
|
536
|
-
ot.value.show =
|
|
534
|
+
"onUpdate:show"(b) {
|
|
535
|
+
ot.value.show = b;
|
|
537
536
|
},
|
|
538
537
|
templateId: ee,
|
|
539
538
|
lastClosingDate: Q.value
|
|
@@ -541,7 +540,7 @@ function bi(d, t) {
|
|
|
541
540
|
ot.value = L;
|
|
542
541
|
}
|
|
543
542
|
let ie;
|
|
544
|
-
m.mustUsePoTemplate && !(
|
|
543
|
+
m.mustUsePoTemplate && !(g != null && g.template) ? r.open({
|
|
545
544
|
title: "Create transfer",
|
|
546
545
|
message: "",
|
|
547
546
|
primaryActions: {
|
|
@@ -559,10 +558,10 @@ function bi(d, t) {
|
|
|
559
558
|
D(void 0);
|
|
560
559
|
}) : D(ie);
|
|
561
560
|
}
|
|
562
|
-
function Oe(
|
|
561
|
+
function Oe(g) {
|
|
563
562
|
const D = {
|
|
564
563
|
mode: Zt.UPDATE,
|
|
565
|
-
modelValue: wt(
|
|
564
|
+
modelValue: wt(g),
|
|
566
565
|
show: !0,
|
|
567
566
|
"onUpdate:show"(ie) {
|
|
568
567
|
ot.value.show = ie;
|
|
@@ -571,7 +570,7 @@ function bi(d, t) {
|
|
|
571
570
|
};
|
|
572
571
|
ot.value = D;
|
|
573
572
|
}
|
|
574
|
-
function ae(
|
|
573
|
+
function ae(g) {
|
|
575
574
|
if (!c.currentBusiness.value) return;
|
|
576
575
|
const D = n.currentLocation;
|
|
577
576
|
if (D.type === "restaurant") {
|
|
@@ -579,14 +578,14 @@ function bi(d, t) {
|
|
|
579
578
|
j !== null && (D.doc = j);
|
|
580
579
|
}
|
|
581
580
|
const ie = ds({
|
|
582
|
-
po:
|
|
581
|
+
po: g,
|
|
583
582
|
currentLocation: D,
|
|
584
583
|
business: c.currentBusiness.value,
|
|
585
584
|
fulfilling: d === "approval",
|
|
586
|
-
por:
|
|
585
|
+
por: g.request
|
|
587
586
|
});
|
|
588
587
|
if (!ie) return;
|
|
589
|
-
const ee = rr(ie.html), L = u.supplierById[
|
|
588
|
+
const ee = rr(ie.html), L = u.supplierById[g.supplier._id], b = {
|
|
590
589
|
recipientName: L.name,
|
|
591
590
|
email: (L == null ? void 0 : L.email) ?? "",
|
|
592
591
|
business: c.currentBusiness.value,
|
|
@@ -596,22 +595,22 @@ function bi(d, t) {
|
|
|
596
595
|
Ot.value.show = j;
|
|
597
596
|
}
|
|
598
597
|
};
|
|
599
|
-
Ot.value =
|
|
598
|
+
Ot.value = b;
|
|
600
599
|
}
|
|
601
600
|
async function Se() {
|
|
602
601
|
F.value = [], _.value = [], O.value = !0;
|
|
603
602
|
try {
|
|
604
|
-
const
|
|
605
|
-
F.value =
|
|
606
|
-
const D =
|
|
603
|
+
const g = await R.getPurchaseOrders(E.value);
|
|
604
|
+
F.value = g.sort((j, J) => J._id.localeCompare(j._id));
|
|
605
|
+
const D = g.flatMap((j) => j.shipmentIds || []).filter(Boolean), ie = D.length > 0 ? await N.getShipmentsByIds(D) : [];
|
|
607
606
|
_.value = ie;
|
|
608
607
|
const ee = await se.readCurrentLocationLastClosing(!0), L = ee == null ? void 0 : ee._id;
|
|
609
608
|
L && (Q.value = ks(L)), await m.awaitFeatureLoaded(() => m.mustUsePoTemplate) && await a.fetchTemplates();
|
|
610
|
-
const
|
|
609
|
+
const b = F.value.map((j) => {
|
|
611
610
|
var J;
|
|
612
611
|
return ((J = j.request) == null ? void 0 : J.id) ?? "";
|
|
613
612
|
}).filter((j) => j);
|
|
614
|
-
te.value = await R.readRequestByIds(
|
|
613
|
+
te.value = await R.readRequestByIds(b);
|
|
615
614
|
} catch {
|
|
616
615
|
f.open({
|
|
617
616
|
title: "Something went wrong",
|
|
@@ -629,7 +628,7 @@ function bi(d, t) {
|
|
|
629
628
|
void 0,
|
|
630
629
|
E.value.start,
|
|
631
630
|
E.value.end
|
|
632
|
-
).then((
|
|
631
|
+
).then((g) => g.reverse());
|
|
633
632
|
} catch {
|
|
634
633
|
f.open({
|
|
635
634
|
title: "Something went wrong",
|
|
@@ -648,33 +647,33 @@ function bi(d, t) {
|
|
|
648
647
|
return De();
|
|
649
648
|
}
|
|
650
649
|
}
|
|
651
|
-
function ve(
|
|
650
|
+
function ve(g, D) {
|
|
652
651
|
B.value = {
|
|
653
|
-
startDate:
|
|
652
|
+
startDate: g,
|
|
654
653
|
endDate: D
|
|
655
654
|
}, K();
|
|
656
655
|
}
|
|
657
|
-
n.watchLocation(async (
|
|
658
|
-
if (!
|
|
656
|
+
n.watchLocation(async (g) => {
|
|
657
|
+
if (!g) {
|
|
659
658
|
F.value = [];
|
|
660
659
|
return;
|
|
661
660
|
}
|
|
662
661
|
await K();
|
|
663
662
|
});
|
|
664
|
-
async function P(
|
|
665
|
-
return
|
|
663
|
+
async function P(g) {
|
|
664
|
+
return g;
|
|
666
665
|
}
|
|
667
666
|
const x = ne(), w = ne(Math.random().toString());
|
|
668
|
-
async function A(
|
|
667
|
+
async function A(g, D) {
|
|
669
668
|
const ie = Math.random().toString();
|
|
670
669
|
w.value = ie, D ?? (D = te.value.computeFirst(
|
|
671
|
-
(j) => j.purchaseOrderId ===
|
|
670
|
+
(j) => j.purchaseOrderId === g._id ? j : null
|
|
672
671
|
) ?? void 0);
|
|
673
|
-
const ee = d === "receive/request" ? n.currentLocation : D == null ? void 0 : D.to, L = d === "approval",
|
|
672
|
+
const ee = d === "receive/request" ? n.currentLocation : D == null ? void 0 : D.to, L = d === "approval", b = {
|
|
674
673
|
poRequest: D,
|
|
675
674
|
purchaseOrder: {
|
|
676
|
-
...
|
|
677
|
-
status: L && (D != null && D.rejectedAt) ?
|
|
675
|
+
...g,
|
|
676
|
+
status: L && (D != null && D.rejectedAt) ? be.Enum.REJECT : g.status
|
|
678
677
|
},
|
|
679
678
|
transferTo: ee == null ? void 0 : ee.name,
|
|
680
679
|
transferToDbName: ee == null ? void 0 : ee.dbName,
|
|
@@ -685,19 +684,19 @@ function bi(d, t) {
|
|
|
685
684
|
x.value && (x.value = { ...x.value, show: j });
|
|
686
685
|
},
|
|
687
686
|
scope: d,
|
|
688
|
-
receivedMap: vt(
|
|
687
|
+
receivedMap: vt(g) ?? {},
|
|
689
688
|
shipments: _.value
|
|
690
689
|
};
|
|
691
|
-
x.value =
|
|
690
|
+
x.value = b;
|
|
692
691
|
}
|
|
693
|
-
async function G(
|
|
694
|
-
const
|
|
692
|
+
async function G(g, D, ie, ee, L) {
|
|
693
|
+
const b = fs();
|
|
695
694
|
O.value = !0;
|
|
696
695
|
try {
|
|
697
|
-
await
|
|
696
|
+
await b({
|
|
698
697
|
operate: {
|
|
699
698
|
operation: D,
|
|
700
|
-
doc:
|
|
699
|
+
doc: g,
|
|
701
700
|
options: (
|
|
702
701
|
// auto receive for supplier to warehouse
|
|
703
702
|
(D === z.enum.confirmDraft || // auto receive for warehouse to warehouse
|
|
@@ -707,15 +706,15 @@ function bi(d, t) {
|
|
|
707
706
|
)
|
|
708
707
|
},
|
|
709
708
|
operateV2: {
|
|
710
|
-
_id:
|
|
711
|
-
_rev:
|
|
709
|
+
_id: g._id,
|
|
710
|
+
_rev: g._rev ?? "",
|
|
712
711
|
action: D === z.enum.submitRequest ? z.enum.confirmDraft : D,
|
|
713
712
|
payloads: L ?? []
|
|
714
713
|
},
|
|
715
714
|
transferTo: ee
|
|
716
715
|
}), await new Promise((me) => setTimeout(me, 1e3));
|
|
717
716
|
const J = ze().currentLocationDBName.startsWith("restaurant_");
|
|
718
|
-
D === z.enum.confirmDraft &&
|
|
717
|
+
D === z.enum.confirmDraft && g.effectiveAt && J ? f.open({
|
|
719
718
|
title: "Success",
|
|
720
719
|
message: `${ie}. The backdate will be reflected once your POS has received this change.`,
|
|
721
720
|
type: "success"
|
|
@@ -729,12 +728,12 @@ function bi(d, t) {
|
|
|
729
728
|
title: "Something went wrong",
|
|
730
729
|
message: j instanceof Error ? j.message : "Please try again.",
|
|
731
730
|
type: "error"
|
|
732
|
-
}), console.error("Error when submitting PO operation", D,
|
|
731
|
+
}), console.error("Error when submitting PO operation", D, g, j);
|
|
733
732
|
} finally {
|
|
734
733
|
O.value = !1, K();
|
|
735
734
|
}
|
|
736
735
|
}
|
|
737
|
-
async function X(
|
|
736
|
+
async function X(g, D, ie) {
|
|
738
737
|
const ee = ms[D];
|
|
739
738
|
if (!ee) {
|
|
740
739
|
f.open({
|
|
@@ -744,16 +743,16 @@ function bi(d, t) {
|
|
|
744
743
|
});
|
|
745
744
|
return;
|
|
746
745
|
}
|
|
747
|
-
const { successMessage: L, ...
|
|
746
|
+
const { successMessage: L, ...b } = ee;
|
|
748
747
|
if (D === z.enum.rejectDraft) {
|
|
749
748
|
let me = "";
|
|
750
749
|
r.open({
|
|
751
|
-
title:
|
|
752
|
-
message:
|
|
753
|
-
primaryActions:
|
|
750
|
+
title: b.title,
|
|
751
|
+
message: b.message,
|
|
752
|
+
primaryActions: b.primaryActions,
|
|
754
753
|
contentComponent: ps,
|
|
755
754
|
contentComponentProps: {
|
|
756
|
-
message:
|
|
755
|
+
message: b.message,
|
|
757
756
|
onChange: (ke) => me = ke
|
|
758
757
|
}
|
|
759
758
|
}).onPrimary(() => {
|
|
@@ -763,20 +762,20 @@ function bi(d, t) {
|
|
|
763
762
|
payload: {
|
|
764
763
|
rejectReason: me
|
|
765
764
|
}
|
|
766
|
-
}), G(
|
|
765
|
+
}), G(g, D, L, ie, ke);
|
|
767
766
|
});
|
|
768
767
|
return;
|
|
769
768
|
}
|
|
770
769
|
const j = [], J = hs();
|
|
771
|
-
J.init(
|
|
770
|
+
J.init(g), (D === z.enum.confirmDraft || D === z.enum.submitRequest) && j.push({
|
|
772
771
|
action: "confirmDraft",
|
|
773
772
|
payload: J.controller.value.toConfirmDraftData(Ae())
|
|
774
773
|
}), r.open({
|
|
775
|
-
title:
|
|
776
|
-
message:
|
|
777
|
-
primaryActions:
|
|
774
|
+
title: b.title,
|
|
775
|
+
message: b.message,
|
|
776
|
+
primaryActions: b.primaryActions
|
|
778
777
|
}).onPrimary(() => {
|
|
779
|
-
G(
|
|
778
|
+
G(g, D, L, ie, j);
|
|
780
779
|
});
|
|
781
780
|
}
|
|
782
781
|
async function le() {
|
|
@@ -791,13 +790,13 @@ function bi(d, t) {
|
|
|
791
790
|
close: !0
|
|
792
791
|
}
|
|
793
792
|
}).onPrimary(() => {
|
|
794
|
-
const
|
|
793
|
+
const g = {
|
|
795
794
|
show: !0,
|
|
796
795
|
"onUpdate:show"(D) {
|
|
797
796
|
xt.value.show = D;
|
|
798
797
|
}
|
|
799
798
|
};
|
|
800
|
-
xt.value =
|
|
799
|
+
xt.value = g;
|
|
801
800
|
});
|
|
802
801
|
}
|
|
803
802
|
return {
|
|
@@ -961,27 +960,27 @@ const Ke = {
|
|
|
961
960
|
value: z.enum.returnStock
|
|
962
961
|
}
|
|
963
962
|
};
|
|
964
|
-
function
|
|
965
|
-
const d =
|
|
963
|
+
function gs() {
|
|
964
|
+
const d = Je();
|
|
966
965
|
return {
|
|
967
966
|
ableToMarkReceived(t) {
|
|
968
|
-
if (!t || t.status !==
|
|
967
|
+
if (!t || t.status !== be.enum.RECEIVING || d.useOperatePurchaseOrderV2) return !1;
|
|
969
968
|
const n = ze().currentLocationDBName;
|
|
970
969
|
return `${t.supplier.internal}_${t.supplier._id}` !== n;
|
|
971
970
|
},
|
|
972
971
|
ableToMarkApproved(t) {
|
|
973
|
-
return !(!t || (t == null ? void 0 : t.status) !==
|
|
972
|
+
return !(!t || (t == null ? void 0 : t.status) !== be.enum.REQUESTING);
|
|
974
973
|
},
|
|
975
974
|
ableToCreateFulfillment(t, r) {
|
|
976
975
|
var u, c;
|
|
977
|
-
if (!d.acceptRequireFulfillment || !t || !r || t.status !==
|
|
976
|
+
if (!d.acceptRequireFulfillment || !t || !r || t.status !== be.enum.PROCESSING || !r.processedAt)
|
|
978
977
|
return !1;
|
|
979
978
|
const n = (u = r == null ? void 0 : r.from) == null ? void 0 : u.dbName, m = (c = r == null ? void 0 : r.to) == null ? void 0 : c.dbName;
|
|
980
979
|
return !(n.startsWith("restaurant_") && m.startsWith("restaurant_"));
|
|
981
980
|
}
|
|
982
981
|
};
|
|
983
982
|
}
|
|
984
|
-
function
|
|
983
|
+
function bs() {
|
|
985
984
|
const d = H(() => [
|
|
986
985
|
{
|
|
987
986
|
action: Wt.Action.manage,
|
|
@@ -993,7 +992,7 @@ function gs() {
|
|
|
993
992
|
};
|
|
994
993
|
}
|
|
995
994
|
function gi(d, t, r, n) {
|
|
996
|
-
const m = ze(), u = _t(), c =
|
|
995
|
+
const m = ze(), u = _t(), c = gt(), s = gs(), { t: a } = ht(), O = Ze(), { hasOrderDraftPermission: f } = bs(), R = Je(), N = H(
|
|
997
996
|
() => R.enablePrintTemplate ? [qe[Re.PrintCustom]] : []
|
|
998
997
|
), F = H(
|
|
999
998
|
() => R.enablePurchaseOrderEmail ? [qe[Re.Email]] : []
|
|
@@ -1060,14 +1059,14 @@ function gi(d, t, r, n) {
|
|
|
1060
1059
|
return Object.values(z.enum).includes(K);
|
|
1061
1060
|
}
|
|
1062
1061
|
async function te(K, ve, P) {
|
|
1063
|
-
var A, G, X, le,
|
|
1062
|
+
var A, G, X, le, g, D, ie, ee, L;
|
|
1064
1063
|
let x;
|
|
1065
1064
|
try {
|
|
1066
1065
|
x = t.resolvePO ? await t.resolvePO(ve) : ve;
|
|
1067
|
-
} catch (
|
|
1068
|
-
console.error("Failed to load full purchase order for action",
|
|
1066
|
+
} catch (b) {
|
|
1067
|
+
console.error("Failed to load full purchase order for action", b), O.open({
|
|
1069
1068
|
title: a("inventory.common.somethingWentWrong"),
|
|
1070
|
-
message: (
|
|
1069
|
+
message: (b == null ? void 0 : b.message) || a("inventory.common.tryAgain"),
|
|
1071
1070
|
type: "error"
|
|
1072
1071
|
});
|
|
1073
1072
|
return;
|
|
@@ -1075,20 +1074,20 @@ function gi(d, t, r, n) {
|
|
|
1075
1074
|
const w = wt(x);
|
|
1076
1075
|
if (!(n != null && n.onCustomAction && await n.onCustomAction(K, w))) {
|
|
1077
1076
|
if (K === Re.Print || K === Re.PrintCustom) {
|
|
1078
|
-
let
|
|
1079
|
-
if (
|
|
1077
|
+
let b = w;
|
|
1078
|
+
if (b.items == null && (n != null && n.fetchFullPo)) {
|
|
1080
1079
|
const o = await n.fetchFullPo(w);
|
|
1081
1080
|
if (o == null) return;
|
|
1082
|
-
|
|
1081
|
+
b = wt(o);
|
|
1083
1082
|
}
|
|
1084
1083
|
const j = (A = n == null ? void 0 : n.resolveLocation) == null ? void 0 : A.call(n, w), me = { ...(P == null ? void 0 : P.toInventoryLocation) ?? j ?? m.currentLocation };
|
|
1085
1084
|
if (me.type === "restaurant") {
|
|
1086
1085
|
const o = m.locationRestaurantFromCore(me.doc._id);
|
|
1087
1086
|
o !== null && (me.doc = o);
|
|
1088
1087
|
}
|
|
1089
|
-
((G = P == null ? void 0 : P.netSuite) != null && G.refNo || (X =
|
|
1088
|
+
((G = P == null ? void 0 : P.netSuite) != null && G.refNo || (X = b.netSuite) != null && X.refNo) && (b.ref = [((le = P == null ? void 0 : P.netSuite) == null ? void 0 : le.refNo) || ((g = b.netSuite) == null ? void 0 : g.refNo)].filter((o) => o).join(" "));
|
|
1090
1089
|
const ke = P ?? ((D = n == null ? void 0 : n.resolvePurchaseRequest) == null ? void 0 : D.call(n, w)), we = {
|
|
1091
|
-
po:
|
|
1090
|
+
po: b,
|
|
1092
1091
|
currentLocation: me,
|
|
1093
1092
|
business: c.currentBusiness.value,
|
|
1094
1093
|
fulfilling: d === "approval",
|
|
@@ -1199,15 +1198,15 @@ function gi(d, t, r, n) {
|
|
|
1199
1198
|
header: () => a("inventory.transfer.table.status"),
|
|
1200
1199
|
cell(P) {
|
|
1201
1200
|
const x = P.getValue(), w = P.row.original, { partial: A, over: G } = w.items == null ? { partial: !!w.partialReceived, over: !!w.overReceived } : $t(vt(w)), X = Ct(x ?? "", A, G);
|
|
1202
|
-
let le = a(`inventory.transfer.status.${X}`),
|
|
1203
|
-
X ===
|
|
1201
|
+
let le = a(`inventory.transfer.status.${X}`), g = `${x ?? ""}`.toLocaleLowerCase("en-us");
|
|
1202
|
+
X === be.enum.CLOSE && (le = `${a(`inventory.transfer.status.${be.enum.COMPLETE}`)}`), X === "PARTIAL_RECEIVED" && g === be.enum.PROCESSING.toLocaleLowerCase("en-us") && (g = be.enum.RECEIVING.toLocaleLowerCase("en-us"));
|
|
1204
1203
|
let D = null;
|
|
1205
1204
|
const ie = r.value.find((ee) => ee.ref === P.row.original._id);
|
|
1206
1205
|
if (ie != null && ie.milestones && ie.milestones.length > 0) {
|
|
1207
1206
|
const ee = ie.milestones[ie.milestones.length - 1];
|
|
1208
1207
|
if (ee.estimatedTime) {
|
|
1209
|
-
const L = new Date(ee.estimatedTime),
|
|
1210
|
-
D = `${L.toLocaleString("en-US", { month: "short" })} ${
|
|
1208
|
+
const L = new Date(ee.estimatedTime), b = L.getDate().toString().padStart(2, "0");
|
|
1209
|
+
D = `${L.toLocaleString("en-US", { month: "short" })} ${b}`;
|
|
1211
1210
|
}
|
|
1212
1211
|
}
|
|
1213
1212
|
return re(
|
|
@@ -1224,7 +1223,7 @@ function gi(d, t, r, n) {
|
|
|
1224
1223
|
{
|
|
1225
1224
|
class: [
|
|
1226
1225
|
"fm-status-badge",
|
|
1227
|
-
`fm-status-badge-${
|
|
1226
|
+
`fm-status-badge-${g}`,
|
|
1228
1227
|
G && "fm-status-badge-error"
|
|
1229
1228
|
].filter(Boolean).join(" ")
|
|
1230
1229
|
},
|
|
@@ -1323,20 +1322,20 @@ function gi(d, t, r, n) {
|
|
|
1323
1322
|
return (le = X.netSuite) == null ? void 0 : le.id;
|
|
1324
1323
|
});
|
|
1325
1324
|
return w != null && w.length ? w.map((X) => {
|
|
1326
|
-
var le,
|
|
1327
|
-
return `${((le = X.netSuite) == null ? void 0 : le.refNo) ?? "N/A"} (${((
|
|
1325
|
+
var le, g;
|
|
1326
|
+
return `${((le = X.netSuite) == null ? void 0 : le.refNo) ?? "N/A"} (${((g = X.netSuite) == null ? void 0 : g.id) ?? "-"})`;
|
|
1328
1327
|
}).join(", ") : (G = x.netSuite) != null && G.id ? `${x.netSuite.refNo} (${x.netSuite.id})` : "N/A";
|
|
1329
1328
|
},
|
|
1330
1329
|
header: () => "Netsuite ref no.",
|
|
1331
1330
|
cell(x) {
|
|
1332
1331
|
var G, X;
|
|
1333
1332
|
const w = x.row.original, A = (G = w.deliveryOrder) == null ? void 0 : G.filter((le) => {
|
|
1334
|
-
var
|
|
1335
|
-
return (
|
|
1333
|
+
var g;
|
|
1334
|
+
return (g = le.netSuite) == null ? void 0 : g.id;
|
|
1336
1335
|
});
|
|
1337
1336
|
return A != null && A.length ? A.map((le) => {
|
|
1338
|
-
var
|
|
1339
|
-
return `${((
|
|
1337
|
+
var g, D;
|
|
1338
|
+
return `${((g = le.netSuite) == null ? void 0 : g.refNo) ?? "N/A"} (${((D = le.netSuite) == null ? void 0 : D.id) ?? "-"})`;
|
|
1340
1339
|
}).join(", ") : (X = w.netSuite) != null && X.id ? `${w.netSuite.refNo} (${w.netSuite.id})` : "N/A";
|
|
1341
1340
|
},
|
|
1342
1341
|
enableSorting: !1,
|
|
@@ -1408,8 +1407,8 @@ function gi(d, t, r, n) {
|
|
|
1408
1407
|
compact: !0
|
|
1409
1408
|
});
|
|
1410
1409
|
const A = vt(x.purchaseOrder), { partial: G, over: X } = $t(A), le = Ct(w ?? "", G, X);
|
|
1411
|
-
let
|
|
1412
|
-
return le ===
|
|
1410
|
+
let g = a(`inventory.transfer.status.${le}`), D = `${w ?? ""}`.toLocaleLowerCase("en-us");
|
|
1411
|
+
return le === be.enum.CLOSE && (g = `${a(`inventory.transfer.status.${be.enum.COMPLETE}`)}`), le === "PARTIAL_RECEIVED" && D === be.enum.PROCESSING.toLocaleLowerCase("en-us") && (D = be.enum.RECEIVING.toLocaleLowerCase("en-us")), x.rejectedAt && (g = a("inventory.transfer.status.REJECT"), D = be.enum.REJECT.toLocaleLowerCase("en-us")), re(
|
|
1413
1412
|
"div",
|
|
1414
1413
|
{
|
|
1415
1414
|
class: "flex"
|
|
@@ -1423,7 +1422,7 @@ function gi(d, t, r, n) {
|
|
|
1423
1422
|
X && "fm-status-badge-error"
|
|
1424
1423
|
].filter(Boolean).join(" ")
|
|
1425
1424
|
},
|
|
1426
|
-
`${
|
|
1425
|
+
`${g}`
|
|
1427
1426
|
)
|
|
1428
1427
|
);
|
|
1429
1428
|
},
|
|
@@ -1493,24 +1492,24 @@ function gi(d, t, r, n) {
|
|
|
1493
1492
|
accessorFn: (x) => {
|
|
1494
1493
|
var A, G, X;
|
|
1495
1494
|
const w = (G = (A = x.purchaseOrder) == null ? void 0 : A.deliveryOrder) == null ? void 0 : G.filter((le) => {
|
|
1496
|
-
var
|
|
1497
|
-
return (
|
|
1495
|
+
var g;
|
|
1496
|
+
return (g = le.netSuite) == null ? void 0 : g.id;
|
|
1498
1497
|
});
|
|
1499
1498
|
return w != null && w.length ? w.map((le) => {
|
|
1500
|
-
var
|
|
1501
|
-
return `${((
|
|
1499
|
+
var g, D;
|
|
1500
|
+
return `${((g = le.netSuite) == null ? void 0 : g.refNo) ?? "N/A"} (${((D = le.netSuite) == null ? void 0 : D.id) ?? "-"})`;
|
|
1502
1501
|
}).join(", ") : (X = x.netSuite) != null && X.id ? `${x.netSuite.refNo} (${x.netSuite.id})` : "N/A";
|
|
1503
1502
|
},
|
|
1504
1503
|
header: () => "Netsuite ref no.",
|
|
1505
1504
|
cell(x) {
|
|
1506
1505
|
var G, X, le;
|
|
1507
|
-
const w = x.row.original, A = (X = (G = w.purchaseOrder) == null ? void 0 : G.deliveryOrder) == null ? void 0 : X.filter((
|
|
1506
|
+
const w = x.row.original, A = (X = (G = w.purchaseOrder) == null ? void 0 : G.deliveryOrder) == null ? void 0 : X.filter((g) => {
|
|
1508
1507
|
var D;
|
|
1509
|
-
return (D =
|
|
1508
|
+
return (D = g.netSuite) == null ? void 0 : D.id;
|
|
1510
1509
|
});
|
|
1511
|
-
return A != null && A.length ? A.map((
|
|
1510
|
+
return A != null && A.length ? A.map((g) => {
|
|
1512
1511
|
var D, ie;
|
|
1513
|
-
return `${((D =
|
|
1512
|
+
return `${((D = g.netSuite) == null ? void 0 : D.refNo) ?? "N/A"} (${((ie = g.netSuite) == null ? void 0 : ie.id) ?? "-"})`;
|
|
1514
1513
|
}).join(", ") : (le = w.netSuite) != null && le.id ? `${w.netSuite.refNo} (${w.netSuite.id})` : "N/A";
|
|
1515
1514
|
},
|
|
1516
1515
|
enableSorting: !1,
|
|
@@ -1537,7 +1536,7 @@ function gi(d, t, r, n) {
|
|
|
1537
1536
|
const fr = { class: "flex flex-col gap-4 border border-fm-color-neutral-gray-200 fm-corner-radius-lg p-16" }, vr = { class: "flex items-center justify-between" }, yr = {
|
|
1538
1537
|
key: 0,
|
|
1539
1538
|
class: "fm-typo-en-body-md-400 text-fm-color-typo-tertiary"
|
|
1540
|
-
}, hr = { class: "flex justify-between items-start py-1 gap-4" },
|
|
1539
|
+
}, hr = { class: "flex justify-between items-start py-1 gap-4" }, gr = { class: "flex-1 min-w-0 flex flex-col gap-2" }, br = { class: "flex flex-col gap-2 items-end w-52 shrink-0" }, _r = {
|
|
1541
1540
|
key: 0,
|
|
1542
1541
|
class: "border-b border-fm-color-stroke-secondary"
|
|
1543
1542
|
}, Ft = /* @__PURE__ */ Ve({
|
|
@@ -1581,7 +1580,7 @@ const fr = { class: "flex flex-col gap-4 border border-fm-color-neutral-gray-200
|
|
|
1581
1580
|
key: F.id
|
|
1582
1581
|
}, [
|
|
1583
1582
|
e("div", hr, [
|
|
1584
|
-
e("div",
|
|
1583
|
+
e("div", gr, [
|
|
1585
1584
|
T(R, {
|
|
1586
1585
|
"model-value": F.name,
|
|
1587
1586
|
"onUpdate:modelValue": (B) => u(F.id, B),
|
|
@@ -1590,7 +1589,7 @@ const fr = { class: "flex flex-col gap-4 border border-fm-color-neutral-gray-200
|
|
|
1590
1589
|
size: "md"
|
|
1591
1590
|
}, null, 8, ["model-value", "onUpdate:modelValue"])
|
|
1592
1591
|
]),
|
|
1593
|
-
e("div",
|
|
1592
|
+
e("div", br, [
|
|
1594
1593
|
T(N, {
|
|
1595
1594
|
"model-value": n(F),
|
|
1596
1595
|
"onUpdate:modelValue": (B) => c(F.id, B),
|
|
@@ -1851,13 +1850,13 @@ const Sr = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
1851
1850
|
scope: {}
|
|
1852
1851
|
},
|
|
1853
1852
|
setup(d) {
|
|
1854
|
-
const t = d, r = _t(), n =
|
|
1853
|
+
const t = d, r = _t(), n = Ze(), m = bt(), u = ne(!1);
|
|
1855
1854
|
H(() => {
|
|
1856
1855
|
var f, R, N, F;
|
|
1857
1856
|
let s = !0;
|
|
1858
1857
|
r.isEnabled || (s = !1);
|
|
1859
1858
|
const a = t.purchaseOrder, O = t.poRequest;
|
|
1860
|
-
return a && ((f = a == null ? void 0 : a.supplier) != null && f.internal ? (!O && a.status ==
|
|
1859
|
+
return a && ((f = a == null ? void 0 : a.supplier) != null && f.internal ? (!O && a.status == be.enum.DRAFT && (s = !1), O && !((R = O == null ? void 0 : O.netSuite) != null && R.id) && (s = !1), t.isTransferBetweenOutlets && (s = !1)) : ((a == null ? void 0 : a.status) !== be.enum.REQUESTING && a.supplier.internal && (s = !1), !O && !((N = a == null ? void 0 : a.netSuite) != null && N.id) && (s = !1), !O && ((F = a == null ? void 0 : a.netSuite) != null && F.id) && (a == null ? void 0 : a.status) == be.enum.REQUESTING && (s = !1))), s;
|
|
1861
1860
|
});
|
|
1862
1861
|
async function c() {
|
|
1863
1862
|
u.value || m.open({
|
|
@@ -2004,7 +2003,7 @@ const Sr = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
2004
2003
|
purchaseOrderId: {}
|
|
2005
2004
|
},
|
|
2006
2005
|
setup(d) {
|
|
2007
|
-
const t =
|
|
2006
|
+
const t = Ze(), r = Pt();
|
|
2008
2007
|
async function n(m, u) {
|
|
2009
2008
|
const c = [];
|
|
2010
2009
|
if (m && c.push(`body.message:*${m}*`), u) {
|
|
@@ -2228,7 +2227,7 @@ const Sr = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
2228
2227
|
}), ho = {
|
|
2229
2228
|
key: 0,
|
|
2230
2229
|
class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg p-16 flex flex-col gap-8"
|
|
2231
|
-
},
|
|
2230
|
+
}, go = { class: "flex gap-8 items-center" }, bo = { class: "ml-auto" }, _o = { class: "flex gap-3" }, So = /* @__PURE__ */ Ve({
|
|
2232
2231
|
__name: "NetSuitePanel",
|
|
2233
2232
|
props: {
|
|
2234
2233
|
poRequest: {},
|
|
@@ -2243,9 +2242,9 @@ const Sr = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
2243
2242
|
var s, a;
|
|
2244
2243
|
const c = oe("FmMenuDivider");
|
|
2245
2244
|
return n.value ? (i(), v("div", ho, [
|
|
2246
|
-
e("div",
|
|
2245
|
+
e("div", go, [
|
|
2247
2246
|
u[0] || (u[0] = e("span", { class: "flex-1 fm-typo-en-body-lg-600" }, "NetSuite Info", -1)),
|
|
2248
|
-
e("div",
|
|
2247
|
+
e("div", bo, [
|
|
2249
2248
|
e("div", _o, [
|
|
2250
2249
|
(a = (s = t.purchaseOrder) == null ? void 0 : s.netSuite) != null && a.id ? (i(), he(tt, { key: 0 }, {
|
|
2251
2250
|
default: ce(() => {
|
|
@@ -2384,7 +2383,7 @@ const xo = { class: "flex flex-col gap-3" }, wo = { class: "flex flex-col gap-4"
|
|
|
2384
2383
|
emits: ["submitted"],
|
|
2385
2384
|
setup(d, { emit: t }) {
|
|
2386
2385
|
var ee;
|
|
2387
|
-
const { t: r } = nr(), n =
|
|
2386
|
+
const { t: r } = nr(), n = Je(), m = Ze(), u = ne(!1), c = Dt(), s = d, a = (((ee = s.purchaseOrder) == null ? void 0 : ee.version) ?? Ue.enum[1]) === Ue.enum[2], O = t, f = is("deliveryOrder"), R = Xe(), {
|
|
2388
2387
|
controller: N,
|
|
2389
2388
|
state: F,
|
|
2390
2389
|
reset: _
|
|
@@ -2395,7 +2394,7 @@ const xo = { class: "flex flex-col gap-3" }, wo = { class: "flex flex-col gap-4"
|
|
|
2395
2394
|
() => {
|
|
2396
2395
|
var L;
|
|
2397
2396
|
return ((L = s.purchaseOrder.deliveryFullfillment) == null ? void 0 : L.findIndex(
|
|
2398
|
-
(
|
|
2397
|
+
(b) => s.deliveryOrder.fullfillmentId && b.id === s.deliveryOrder.fullfillmentId
|
|
2399
2398
|
)) ?? -1;
|
|
2400
2399
|
}
|
|
2401
2400
|
), E = n.enablePurchaseOrderReceiveWithCustomCost, te = n.enablePortalDeliveryOrderWrite, se = ne({}), Q = H(
|
|
@@ -2404,27 +2403,27 @@ const xo = { class: "flex flex-col gap-3" }, wo = { class: "flex flex-col gap-4"
|
|
|
2404
2403
|
() => Ss(s.purchaseOrder, de.value)
|
|
2405
2404
|
), ae = H(
|
|
2406
2405
|
() => s.purchaseOrder.items.map(
|
|
2407
|
-
(L,
|
|
2406
|
+
(L, b) => H({
|
|
2408
2407
|
get: () => {
|
|
2409
2408
|
var J;
|
|
2410
|
-
const j = (J = f.received[
|
|
2409
|
+
const j = (J = f.received[b]) == null ? void 0 : J.amount;
|
|
2411
2410
|
return j ? +$e(j) : 0;
|
|
2412
2411
|
},
|
|
2413
2412
|
set: (j) => {
|
|
2414
|
-
f.received[
|
|
2413
|
+
f.received[b].amount = Qe(j, L.sku.unit.precision);
|
|
2415
2414
|
}
|
|
2416
2415
|
})
|
|
2417
2416
|
)
|
|
2418
2417
|
), Se = H(
|
|
2419
2418
|
() => s.purchaseOrder.items.map(
|
|
2420
|
-
(L,
|
|
2419
|
+
(L, b) => H({
|
|
2421
2420
|
get: () => {
|
|
2422
2421
|
var J;
|
|
2423
|
-
const j = (J = f.received[
|
|
2422
|
+
const j = (J = f.received[b]) == null ? void 0 : J.cost;
|
|
2424
2423
|
return j ? +$e(j) : 0;
|
|
2425
2424
|
},
|
|
2426
2425
|
set: (j) => {
|
|
2427
|
-
f.received[
|
|
2426
|
+
f.received[b].cost = {
|
|
2428
2427
|
currency: Ae(),
|
|
2429
2428
|
...Qe(j, 4)
|
|
2430
2429
|
};
|
|
@@ -2434,8 +2433,8 @@ const xo = { class: "flex flex-col gap-3" }, wo = { class: "flex flex-col gap-4"
|
|
|
2434
2433
|
);
|
|
2435
2434
|
function De(L) {
|
|
2436
2435
|
var j;
|
|
2437
|
-
const
|
|
2438
|
-
if (se.value[L] =
|
|
2436
|
+
const b = !se.value[L];
|
|
2437
|
+
if (se.value[L] = b, b) {
|
|
2439
2438
|
const J = (j = f.received[L]) == null ? void 0 : j.cost;
|
|
2440
2439
|
f.received[L].cost = J ? { ...J, precision: 4 } : { currency: Ae(), amount: 0, precision: 4 };
|
|
2441
2440
|
} else
|
|
@@ -2454,19 +2453,19 @@ const xo = { class: "flex flex-col gap-3" }, wo = { class: "flex flex-col gap-4"
|
|
|
2454
2453
|
function x(L) {
|
|
2455
2454
|
K.value.splice(L, 1), f.received.splice(Q.value + L, 1);
|
|
2456
2455
|
}
|
|
2457
|
-
function w(L,
|
|
2458
|
-
K.value[L].skuId =
|
|
2459
|
-
const j =
|
|
2456
|
+
function w(L, b) {
|
|
2457
|
+
K.value[L].skuId = b;
|
|
2458
|
+
const j = b ? c.skuById[b] : null;
|
|
2460
2459
|
f.received[Q.value + L].sku = j;
|
|
2461
2460
|
}
|
|
2462
|
-
function A(L,
|
|
2461
|
+
function A(L, b) {
|
|
2463
2462
|
var ke, we;
|
|
2464
|
-
const j = (ke = s.receivedInfoMap) == null ? void 0 : ke[
|
|
2463
|
+
const j = (ke = s.receivedInfoMap) == null ? void 0 : ke[b.sku._id], J = j ? `${r("inventory.transfer.receiveRequest.details.received")} ${Pe.toFormatString({ value: j.received })} / ${ft(b.quantity, b.sku.unit, b.measurement)}` : void 0;
|
|
2465
2464
|
return (((we = ae.value[L]) == null ? void 0 : we.value) ?? 0) > 0 ? J : J ? `${J} · ${ct}` : ct;
|
|
2466
2465
|
}
|
|
2467
|
-
function G(L,
|
|
2466
|
+
function G(L, b) {
|
|
2468
2467
|
var ke;
|
|
2469
|
-
const J = (((ke = X.value[
|
|
2468
|
+
const J = (((ke = X.value[b]) == null ? void 0 : ke.value) ?? 0) <= 0;
|
|
2470
2469
|
let me;
|
|
2471
2470
|
if (L.skuId && Oe.value[L.skuId]) {
|
|
2472
2471
|
const we = Oe.value[L.skuId], o = Pe.toFormatString({ value: we.received });
|
|
@@ -2475,8 +2474,8 @@ const xo = { class: "flex flex-col gap-3" }, wo = { class: "flex flex-col gap-4"
|
|
|
2475
2474
|
return J ? me ? `${me} · ${ct}` : ct : me;
|
|
2476
2475
|
}
|
|
2477
2476
|
const X = H(
|
|
2478
|
-
() => K.value.map((L,
|
|
2479
|
-
const j = Q.value +
|
|
2477
|
+
() => K.value.map((L, b) => {
|
|
2478
|
+
const j = Q.value + b;
|
|
2480
2479
|
return H({
|
|
2481
2480
|
get: () => {
|
|
2482
2481
|
var me;
|
|
@@ -2491,8 +2490,8 @@ const xo = { class: "flex flex-col gap-3" }, wo = { class: "flex flex-col gap-4"
|
|
|
2491
2490
|
});
|
|
2492
2491
|
})
|
|
2493
2492
|
), le = H(
|
|
2494
|
-
() => K.value.map((L,
|
|
2495
|
-
const j = Q.value +
|
|
2493
|
+
() => K.value.map((L, b) => {
|
|
2494
|
+
const j = Q.value + b;
|
|
2496
2495
|
return H({
|
|
2497
2496
|
get: () => {
|
|
2498
2497
|
var me;
|
|
@@ -2508,9 +2507,9 @@ const xo = { class: "flex flex-col gap-3" }, wo = { class: "flex flex-col gap-4"
|
|
|
2508
2507
|
});
|
|
2509
2508
|
})
|
|
2510
2509
|
);
|
|
2511
|
-
function
|
|
2512
|
-
const
|
|
2513
|
-
|
|
2510
|
+
function g(L) {
|
|
2511
|
+
const b = K.value[L], j = Q.value + L;
|
|
2512
|
+
b.costEnabled = !b.costEnabled, b.costEnabled ? f.received[j].cost = { currency: Ae(), amount: 0, precision: 4 } : delete f.received[j].cost;
|
|
2514
2513
|
}
|
|
2515
2514
|
Ye(
|
|
2516
2515
|
() => u.value,
|
|
@@ -2521,12 +2520,12 @@ const xo = { class: "flex flex-col gap-3" }, wo = { class: "flex flex-col gap-4"
|
|
|
2521
2520
|
return;
|
|
2522
2521
|
}
|
|
2523
2522
|
_(s.deliveryOrder.priceAdjustments);
|
|
2524
|
-
const
|
|
2523
|
+
const b = s.purchaseOrder.itemsAtSubmission ?? s.purchaseOrder.items, j = new Set(b.map((C) => C.sku._id)), J = {}, me = [];
|
|
2525
2524
|
for (const C of s.deliveryOrder.received ?? []) {
|
|
2526
2525
|
const q = (o = C.sku) == null ? void 0 : o._id;
|
|
2527
2526
|
q && (j.has(q) ? J[q] = C : me.push(C));
|
|
2528
2527
|
}
|
|
2529
|
-
f.received =
|
|
2528
|
+
f.received = b.map((C) => {
|
|
2530
2529
|
const q = J[C.sku._id];
|
|
2531
2530
|
return q ? { ...q } : {
|
|
2532
2531
|
// Propagate the stable id so V2 submissions match this existing PO line
|
|
@@ -2538,8 +2537,8 @@ const xo = { class: "flex flex-col gap-3" }, wo = { class: "flex flex-col gap-4"
|
|
|
2538
2537
|
};
|
|
2539
2538
|
});
|
|
2540
2539
|
const ke = {};
|
|
2541
|
-
for (let C = 0; C <
|
|
2542
|
-
(l = J[
|
|
2540
|
+
for (let C = 0; C < b.length; C++)
|
|
2541
|
+
(l = J[b[C].sku._id]) != null && l.cost && (ke[C] = !0);
|
|
2543
2542
|
se.value = ke, K.value = [];
|
|
2544
2543
|
const we = de.value;
|
|
2545
2544
|
for (const C of me) {
|
|
@@ -2598,11 +2597,11 @@ const xo = { class: "flex flex-col gap-3" }, wo = { class: "flex flex-col gap-4"
|
|
|
2598
2597
|
D.value = !1;
|
|
2599
2598
|
});
|
|
2600
2599
|
}
|
|
2601
|
-
return (L,
|
|
2600
|
+
return (L, b) => {
|
|
2602
2601
|
const j = oe("FmButton"), J = oe("FmStepperField"), me = oe("FmSwitch"), ke = oe("FmSelect"), we = oe("FmTextField"), o = oe("FmDialog");
|
|
2603
2602
|
return i(), he(o, {
|
|
2604
2603
|
modelValue: u.value,
|
|
2605
|
-
"onUpdate:modelValue":
|
|
2604
|
+
"onUpdate:modelValue": b[1] || (b[1] = (l) => u.value = l),
|
|
2606
2605
|
overlay: !0,
|
|
2607
2606
|
"min-width": 800
|
|
2608
2607
|
}, {
|
|
@@ -2632,11 +2631,11 @@ const xo = { class: "flex flex-col gap-3" }, wo = { class: "flex flex-col gap-4"
|
|
|
2632
2631
|
default: ce(() => [
|
|
2633
2632
|
e("div", xo, [
|
|
2634
2633
|
e("div", wo, [
|
|
2635
|
-
|
|
2634
|
+
b[2] || (b[2] = e("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, "Adjustment date", -1)),
|
|
2636
2635
|
e("div", $o, k(s.deliveryOrder.adjustment ? h(et)(new Date(h(mt)(s.deliveryOrder.adjustment))) : "-"), 1)
|
|
2637
2636
|
]),
|
|
2638
2637
|
e("div", Co, [
|
|
2639
|
-
|
|
2638
|
+
b[4] || (b[4] = e("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, " Items going to receive ", -1)),
|
|
2640
2639
|
(i(!0), v(Ce, null, Te(s.purchaseOrder.items, (l, $) => {
|
|
2641
2640
|
var C;
|
|
2642
2641
|
return i(), v("div", { key: $ }, [
|
|
@@ -2659,7 +2658,7 @@ const xo = { class: "flex flex-col gap-3" }, wo = { class: "flex flex-col gap-4"
|
|
|
2659
2658
|
"onUpdate:modelValue": (q) => De($),
|
|
2660
2659
|
size: "sm"
|
|
2661
2660
|
}, null, 8, ["model-value", "onUpdate:modelValue"]),
|
|
2662
|
-
|
|
2661
|
+
b[3] || (b[3] = e("span", { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, " Override cost ", -1))
|
|
2663
2662
|
])) : V("", !0),
|
|
2664
2663
|
h(E) && se.value[$] ? (i(), he(J, {
|
|
2665
2664
|
key: 1,
|
|
@@ -2680,7 +2679,7 @@ const xo = { class: "flex flex-col gap-3" }, wo = { class: "flex flex-col gap-4"
|
|
|
2680
2679
|
]),
|
|
2681
2680
|
e("div", To, [
|
|
2682
2681
|
e("div", Eo, [
|
|
2683
|
-
|
|
2682
|
+
b[5] || (b[5] = e("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, "Extra items", -1)),
|
|
2684
2683
|
T(j, {
|
|
2685
2684
|
variant: "tertiary",
|
|
2686
2685
|
label: "Add item",
|
|
@@ -2718,10 +2717,10 @@ const xo = { class: "flex flex-col gap-3" }, wo = { class: "flex flex-col gap-4"
|
|
|
2718
2717
|
h(E) ? (i(), v("div", Uo, [
|
|
2719
2718
|
T(me, {
|
|
2720
2719
|
"model-value": l.costEnabled,
|
|
2721
|
-
"onUpdate:modelValue": (Y) =>
|
|
2720
|
+
"onUpdate:modelValue": (Y) => g($),
|
|
2722
2721
|
size: "sm"
|
|
2723
2722
|
}, null, 8, ["model-value", "onUpdate:modelValue"]),
|
|
2724
|
-
|
|
2723
|
+
b[6] || (b[6] = e("span", { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, " Override cost ", -1))
|
|
2725
2724
|
])) : V("", !0),
|
|
2726
2725
|
h(E) && l.costEnabled ? (i(), he(J, {
|
|
2727
2726
|
key: 1,
|
|
@@ -2749,18 +2748,18 @@ const xo = { class: "flex flex-col gap-3" }, wo = { class: "flex flex-col gap-4"
|
|
|
2749
2748
|
}), 128))
|
|
2750
2749
|
]),
|
|
2751
2750
|
e("div", Bo, [
|
|
2752
|
-
|
|
2751
|
+
b[7] || (b[7] = e("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, "Delivery order no.", -1)),
|
|
2753
2752
|
e("div", zo, [
|
|
2754
2753
|
T(we, {
|
|
2755
2754
|
modelValue: h(f).deliveryOrderNumber,
|
|
2756
|
-
"onUpdate:modelValue":
|
|
2755
|
+
"onUpdate:modelValue": b[0] || (b[0] = (l) => h(f).deliveryOrderNumber = l),
|
|
2757
2756
|
size: "md",
|
|
2758
2757
|
placeholder: s.deliveryOrder.deliveryOrderNumber
|
|
2759
2758
|
}, null, 8, ["modelValue", "placeholder"])
|
|
2760
2759
|
])
|
|
2761
2760
|
]),
|
|
2762
2761
|
e("div", Ko, [
|
|
2763
|
-
|
|
2762
|
+
b[8] || (b[8] = e("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, "Remark", -1)),
|
|
2764
2763
|
e("div", Ho, k(s.deliveryOrder.remark || "N/A"), 1)
|
|
2765
2764
|
]),
|
|
2766
2765
|
h(n).enablePurchaseOrderPriceAdjustment ? (i(), he(Ft, {
|
|
@@ -2769,7 +2768,7 @@ const xo = { class: "flex flex-col gap-3" }, wo = { class: "flex flex-col gap-4"
|
|
|
2769
2768
|
state: h(F)
|
|
2770
2769
|
}, null, 8, ["controller", "state"])) : V("", !0),
|
|
2771
2770
|
B.value >= 0 ? (i(), v("div", Go, [
|
|
2772
|
-
|
|
2771
|
+
b[9] || (b[9] = e("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, "Fulfilment's sequence", -1)),
|
|
2773
2772
|
e("div", Wo, k(B.value + 1), 1)
|
|
2774
2773
|
])) : V("", !0)
|
|
2775
2774
|
])
|
|
@@ -2796,7 +2795,7 @@ const xo = { class: "flex flex-col gap-3" }, wo = { class: "flex flex-col gap-4"
|
|
|
2796
2795
|
}, hn = {
|
|
2797
2796
|
key: 0,
|
|
2798
2797
|
class: "border-b border-fm-color-stroke-secondary"
|
|
2799
|
-
},
|
|
2798
|
+
}, gn = { class: "flex flex-col gap-4" }, bn = { class: "flex items-center justify-between" }, _n = {
|
|
2800
2799
|
key: 0,
|
|
2801
2800
|
class: "fm-typo-en-body-md-400 text-fm-color-typo-tertiary"
|
|
2802
2801
|
}, Sn = { class: "flex justify-between items-start py-1 gap-4" }, kn = { class: "flex-1 min-w-0 flex flex-col gap-2" }, On = { class: "flex flex-col gap-2 items-end w-52 shrink-0" }, xn = {
|
|
@@ -2818,7 +2817,7 @@ const xo = { class: "flex flex-col gap-3" }, wo = { class: "flex flex-col gap-4"
|
|
|
2818
2817
|
emits: ["submitted"],
|
|
2819
2818
|
setup(d, { emit: t }) {
|
|
2820
2819
|
var ye, I, pe;
|
|
2821
|
-
const { t: r } = ht(), n = ne(!1), m =
|
|
2820
|
+
const { t: r } = ht(), n = ne(!1), m = gt(), u = d, c = t, s = is("", {
|
|
2822
2821
|
default: {
|
|
2823
2822
|
deliveryOrderNumber: "",
|
|
2824
2823
|
remark: "",
|
|
@@ -2841,14 +2840,14 @@ const xo = { class: "flex flex-col gap-3" }, wo = { class: "flex flex-col gap-4"
|
|
|
2841
2840
|
},
|
|
2842
2841
|
createdAt: ""
|
|
2843
2842
|
}
|
|
2844
|
-
}), a = Xe(), O =
|
|
2843
|
+
}), a = Xe(), O = bt(), f = Je(), R = Dt(), {
|
|
2845
2844
|
controller: N,
|
|
2846
2845
|
state: F,
|
|
2847
2846
|
reset: _
|
|
2848
2847
|
} = It({ currency: Ae() }), B = H(
|
|
2849
2848
|
() => u.purchaseOrder.deliveryFullfillment != null
|
|
2850
2849
|
), E = H(
|
|
2851
|
-
() => f.enablePortalDeliveryOrderWrite && (u.purchaseOrder.status ===
|
|
2850
|
+
() => f.enablePortalDeliveryOrderWrite && (u.purchaseOrder.status === be.Enum.RECEIVING || u.purchaseOrder.status === be.Enum.COMPLETE) && !B.value
|
|
2852
2851
|
), te = f.enablePurchaseOrderReceiveWithCustomCost, se = f.enableBackdateReceive, Q = ne({}), de = H(
|
|
2853
2852
|
() => u.purchaseOrder.itemsAtSubmission ?? u.purchaseOrder.items
|
|
2854
2853
|
), Oe = H(() => _s(u.purchaseOrder)), ae = H(
|
|
@@ -2857,7 +2856,7 @@ const xo = { class: "flex flex-col gap-3" }, wo = { class: "flex flex-col gap-4"
|
|
|
2857
2856
|
function Se(y) {
|
|
2858
2857
|
return y.sku._id ?? null;
|
|
2859
2858
|
}
|
|
2860
|
-
const De = (((pe = u.purchaseOrder) == null ? void 0 : pe.version) ?? Ue.enum[1]) === Ue.enum[2], K =
|
|
2859
|
+
const De = (((pe = u.purchaseOrder) == null ? void 0 : pe.version) ?? Ue.enum[1]) === Ue.enum[2], K = Ze(), ve = H({
|
|
2861
2860
|
get() {
|
|
2862
2861
|
if (!s.createdAt) return "";
|
|
2863
2862
|
const y = new Date(s.createdAt), p = y.getFullYear(), S = String(y.getMonth() + 1).padStart(2, "0"), U = String(y.getDate()).padStart(2, "0");
|
|
@@ -2908,7 +2907,7 @@ const xo = { class: "flex flex-col gap-3" }, wo = { class: "flex flex-col gap-4"
|
|
|
2908
2907
|
function le() {
|
|
2909
2908
|
s.createdAt = "";
|
|
2910
2909
|
}
|
|
2911
|
-
const
|
|
2910
|
+
const g = H(() => de.value.map((y, p) => H({
|
|
2912
2911
|
get: () => {
|
|
2913
2912
|
var U;
|
|
2914
2913
|
const S = (U = s.received[p]) == null ? void 0 : U.amount;
|
|
@@ -2951,7 +2950,7 @@ const xo = { class: "flex flex-col gap-3" }, wo = { class: "flex flex-col gap-4"
|
|
|
2951
2950
|
}
|
|
2952
2951
|
}))), ee = ne([]), L = H(
|
|
2953
2952
|
() => R.skus.filter((y) => !y.isInactive).map((y) => ({ label: `${y.name} (${y.code})`, value: y._id }))
|
|
2954
|
-
),
|
|
2953
|
+
), b = H(() => de.value.length);
|
|
2955
2954
|
function j() {
|
|
2956
2955
|
ee.value.push({ skuId: null, stableKey: null, costEnabled: !1 }), s.received.push({
|
|
2957
2956
|
sku: null,
|
|
@@ -2960,12 +2959,12 @@ const xo = { class: "flex flex-col gap-3" }, wo = { class: "flex flex-col gap-4"
|
|
|
2960
2959
|
});
|
|
2961
2960
|
}
|
|
2962
2961
|
function J(y) {
|
|
2963
|
-
ee.value.splice(y, 1), s.received.splice(
|
|
2962
|
+
ee.value.splice(y, 1), s.received.splice(b.value + y, 1);
|
|
2964
2963
|
}
|
|
2965
2964
|
function me(y, p) {
|
|
2966
2965
|
ee.value[y].skuId = p;
|
|
2967
2966
|
const S = p ? R.skuById[p] : null;
|
|
2968
|
-
s.received[
|
|
2967
|
+
s.received[b.value + y].sku = S;
|
|
2969
2968
|
}
|
|
2970
2969
|
function ke(y) {
|
|
2971
2970
|
const p = y.stableKey;
|
|
@@ -2976,7 +2975,7 @@ const xo = { class: "flex flex-col gap-3" }, wo = { class: "flex flex-col gap-4"
|
|
|
2976
2975
|
}
|
|
2977
2976
|
const we = H(
|
|
2978
2977
|
() => ee.value.map((y, p) => {
|
|
2979
|
-
const S =
|
|
2978
|
+
const S = b.value + p;
|
|
2980
2979
|
return H({
|
|
2981
2980
|
get: () => {
|
|
2982
2981
|
var M;
|
|
@@ -2992,7 +2991,7 @@ const xo = { class: "flex flex-col gap-3" }, wo = { class: "flex flex-col gap-4"
|
|
|
2992
2991
|
})
|
|
2993
2992
|
), o = H(
|
|
2994
2993
|
() => ee.value.map((y, p) => {
|
|
2995
|
-
const S =
|
|
2994
|
+
const S = b.value + p;
|
|
2996
2995
|
return H({
|
|
2997
2996
|
get: () => {
|
|
2998
2997
|
var M;
|
|
@@ -3009,7 +3008,7 @@ const xo = { class: "flex flex-col gap-3" }, wo = { class: "flex flex-col gap-4"
|
|
|
3009
3008
|
})
|
|
3010
3009
|
);
|
|
3011
3010
|
function l(y) {
|
|
3012
|
-
const p = ee.value[y], S =
|
|
3011
|
+
const p = ee.value[y], S = b.value + y;
|
|
3013
3012
|
p.costEnabled = !p.costEnabled, p.costEnabled ? s.received[S].cost = { currency: Ae(), amount: 0, precision: 4 } : delete s.received[S].cost;
|
|
3014
3013
|
}
|
|
3015
3014
|
function $() {
|
|
@@ -3077,8 +3076,8 @@ const xo = { class: "flex flex-col gap-3" }, wo = { class: "flex flex-col gap-4"
|
|
|
3077
3076
|
}
|
|
3078
3077
|
const p = de.value;
|
|
3079
3078
|
for (let M = 0; M < p.length; M++) {
|
|
3080
|
-
const _e = p[M], W = (((U = u.purchaseOrder) == null ? void 0 : U.version) ?? Ue.enum[1]) === Ue.enum[2] ? _e.id : _e.sku._id, Z = u.receivedMap[W],
|
|
3081
|
-
|
|
3079
|
+
const _e = p[M], W = (((U = u.purchaseOrder) == null ? void 0 : U.version) ?? Ue.enum[1]) === Ue.enum[2] ? _e.id : _e.sku._id, Z = u.receivedMap[W], ge = +$e(_e.quantity), Fe = Z ? +$e(Z.received) : 0;
|
|
3080
|
+
g.value[M].value = Math.max(0, ge - Fe);
|
|
3082
3081
|
}
|
|
3083
3082
|
const S = Oe.value;
|
|
3084
3083
|
if (S.length) {
|
|
@@ -3107,7 +3106,7 @@ const xo = { class: "flex flex-col gap-3" }, wo = { class: "flex flex-col gap-4"
|
|
|
3107
3106
|
}
|
|
3108
3107
|
}
|
|
3109
3108
|
), (y, p) => {
|
|
3110
|
-
const S = oe("FmButton"), U = oe("FmDatePicker"), M = oe("FmTimePicker"), _e = oe("FmIcon"), xe = oe("FmStepperField"), W = oe("FmSwitch"), Z = oe("FmSelect"),
|
|
3109
|
+
const S = oe("FmButton"), U = oe("FmDatePicker"), M = oe("FmTimePicker"), _e = oe("FmIcon"), xe = oe("FmStepperField"), W = oe("FmSwitch"), Z = oe("FmSelect"), ge = oe("FmTextField"), Fe = oe("FmDialog");
|
|
3111
3110
|
return i(), he(Fe, {
|
|
3112
3111
|
modelValue: n.value,
|
|
3113
3112
|
"onUpdate:modelValue": p[4] || (p[4] = (Ie) => n.value = Ie),
|
|
@@ -3196,12 +3195,12 @@ const xo = { class: "flex flex-col gap-3" }, wo = { class: "flex flex-col gap-4"
|
|
|
3196
3195
|
e("div", fn, [
|
|
3197
3196
|
T(xe, {
|
|
3198
3197
|
label: "Receive Quantity",
|
|
3199
|
-
modelValue:
|
|
3200
|
-
"onUpdate:modelValue": (Ee) =>
|
|
3198
|
+
modelValue: g.value[ue].value,
|
|
3199
|
+
"onUpdate:modelValue": (Ee) => g.value[ue].value = Ee,
|
|
3201
3200
|
"helper-text": X(fe),
|
|
3202
3201
|
"append-text": ((Ne = fe.measurement) == null ? void 0 : Ne.abbrev) ?? fe.sku.unit.abbrev
|
|
3203
3202
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "helper-text", "append-text"]),
|
|
3204
|
-
|
|
3203
|
+
g.value[ue].value <= 0 ? (i(), v("div", vn, k(ss))) : V("", !0),
|
|
3205
3204
|
h(te) ? (i(), v("div", yn, [
|
|
3206
3205
|
T(W, {
|
|
3207
3206
|
"model-value": Q.value[ue],
|
|
@@ -3227,8 +3226,8 @@ const xo = { class: "flex flex-col gap-3" }, wo = { class: "flex flex-col gap-4"
|
|
|
3227
3226
|
]);
|
|
3228
3227
|
}), 128))
|
|
3229
3228
|
]),
|
|
3230
|
-
e("div",
|
|
3231
|
-
e("div",
|
|
3229
|
+
e("div", gn, [
|
|
3230
|
+
e("div", bn, [
|
|
3232
3231
|
p[9] || (p[9] = e("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, "Extra items", -1)),
|
|
3233
3232
|
T(S, {
|
|
3234
3233
|
variant: "tertiary",
|
|
@@ -3300,7 +3299,7 @@ const xo = { class: "flex flex-col gap-3" }, wo = { class: "flex flex-col gap-4"
|
|
|
3300
3299
|
e("div", Cn, [
|
|
3301
3300
|
p[11] || (p[11] = e("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, "Delivery order no.", -1)),
|
|
3302
3301
|
e("div", An, [
|
|
3303
|
-
T(
|
|
3302
|
+
T(ge, {
|
|
3304
3303
|
modelValue: h(s).deliveryOrderNumber,
|
|
3305
3304
|
"onUpdate:modelValue": p[2] || (p[2] = (fe) => h(s).deliveryOrderNumber = fe),
|
|
3306
3305
|
size: "md"
|
|
@@ -3310,7 +3309,7 @@ const xo = { class: "flex flex-col gap-3" }, wo = { class: "flex flex-col gap-4"
|
|
|
3310
3309
|
e("div", Dn, [
|
|
3311
3310
|
p[12] || (p[12] = e("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, "Remark", -1)),
|
|
3312
3311
|
e("div", Rn, [
|
|
3313
|
-
T(
|
|
3312
|
+
T(ge, {
|
|
3314
3313
|
modelValue: h(s).remark,
|
|
3315
3314
|
"onUpdate:modelValue": p[3] || (p[3] = (fe) => h(s).remark = fe),
|
|
3316
3315
|
size: "md"
|
|
@@ -3360,7 +3359,7 @@ const xo = { class: "flex flex-col gap-3" }, wo = { class: "flex flex-col gap-4"
|
|
|
3360
3359
|
},
|
|
3361
3360
|
emits: ["submitted"],
|
|
3362
3361
|
setup(d, { emit: t }) {
|
|
3363
|
-
const r = d, n = t, m = Xe(), u =
|
|
3362
|
+
const r = d, n = t, m = Xe(), u = Ze(), c = ne(!1), s = ne(!1), { controller: a, state: O, reset: f } = It({
|
|
3364
3363
|
currency: Ae(),
|
|
3365
3364
|
adjustments: r.purchaseOrder.priceAdjustments
|
|
3366
3365
|
});
|
|
@@ -3588,7 +3587,7 @@ const xo = { class: "flex flex-col gap-3" }, wo = { class: "flex flex-col gap-4"
|
|
|
3588
3587
|
}, va = { class: "text-xs font-mono text-right break-all" }, ya = {
|
|
3589
3588
|
key: 3,
|
|
3590
3589
|
class: "flex items-start justify-between gap-6"
|
|
3591
|
-
}, ha = { class: "text-xs font-mono text-right break-all" },
|
|
3590
|
+
}, ha = { class: "text-xs font-mono text-right break-all" }, ga = { class: "flex flex-col gap-4" }, ba = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, _a = { class: "flex gap-1" }, Sa = { class: "fm-typo-en-body-lg-600" }, ka = {
|
|
3592
3591
|
key: 0,
|
|
3593
3592
|
class: "flex flex-col gap-4"
|
|
3594
3593
|
}, Oa = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, xa = { class: "fm-typo-en-body-lg-600" }, wa = { class: "flex flex-col gap-4" }, $a = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ca = { class: "fm-typo-en-body-lg-600" }, Aa = {
|
|
@@ -3627,7 +3626,7 @@ const xo = { class: "flex flex-col gap-3" }, wo = { class: "flex flex-col gap-4"
|
|
|
3627
3626
|
}, fl = { class: "flex gap-12 content-stretch" }, vl = {
|
|
3628
3627
|
class: "flex flex-col w-40",
|
|
3629
3628
|
name: "circles"
|
|
3630
|
-
}, yl = { class: "flex-1 flex flex-col items-center" }, hl = { class: "h-40 w-40 bg-fm-color-primary rounded-full flex items-center justify-center" },
|
|
3629
|
+
}, yl = { class: "flex-1 flex flex-col items-center" }, hl = { class: "h-40 w-40 bg-fm-color-primary rounded-full flex items-center justify-center" }, gl = { class: "flex-1 flex flex-col items-center" }, bl = { class: "flex w-full items-center gap-4" }, _l = {
|
|
3631
3630
|
class: "py-12 flex flex-col gap-4",
|
|
3632
3631
|
name: "received-at header"
|
|
3633
3632
|
}, Sl = { class: "fm-typo-en-body-lg-400" }, kl = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, Ol = { class: "ml-auto flex gap-1" }, xl = { class: "flex gap-12 content-stretch" }, wl = {
|
|
@@ -3648,7 +3647,7 @@ const xo = { class: "flex flex-col gap-3" }, wo = { class: "flex flex-col gap-4"
|
|
|
3648
3647
|
}, El = { class: "flex flex-col gap-4" }, ql = { class: "flex justify-between gap-8" }, Vl = { class: "fm-typo-en-body-lg-600" }, Ll = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary whitespace-nowrap" }, jl = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ul = {
|
|
3649
3648
|
key: 0,
|
|
3650
3649
|
class: "fm-typo-en-body-md-400"
|
|
3651
|
-
}, Ml = { class: "flex gap-8 xs:flex-col" },
|
|
3650
|
+
}, Ml = { class: "flex gap-8 xs:flex-col" }, bi = /* @__PURE__ */ Ve({
|
|
3652
3651
|
__name: "TransferDetails",
|
|
3653
3652
|
props: {
|
|
3654
3653
|
poRequest: {},
|
|
@@ -3664,7 +3663,7 @@ const xo = { class: "flex flex-col gap-3" }, wo = { class: "flex flex-col gap-4"
|
|
|
3664
3663
|
},
|
|
3665
3664
|
emits: ["update:show", "submitted"],
|
|
3666
3665
|
setup(d, { emit: t }) {
|
|
3667
|
-
const r = d, n = t, m =
|
|
3666
|
+
const r = d, n = t, m = bt(), u = Ze(), c = Je(), s = ze(), a = gt(), { hasOrderDraftPermission: O } = bs(), f = hs();
|
|
3668
3667
|
function R(o) {
|
|
3669
3668
|
const l = o.isCustomCost, $ = o.totalCost;
|
|
3670
3669
|
return l != null ? l === !0 : $ != null;
|
|
@@ -3684,7 +3683,7 @@ const xo = { class: "flex flex-col gap-3" }, wo = { class: "flex flex-col gap-4"
|
|
|
3684
3683
|
name: ((l = a.sessionUser.value) == null ? void 0 : l.displayName) ?? ""
|
|
3685
3684
|
};
|
|
3686
3685
|
}
|
|
3687
|
-
), F =
|
|
3686
|
+
), F = gs(), { t: _ } = ht(), B = H(
|
|
3688
3687
|
() => {
|
|
3689
3688
|
var o, l, $, C;
|
|
3690
3689
|
return ((l = (o = r.purchaseOrder) == null ? void 0 : o.supplier) == null ? void 0 : l.internal) === "restaurant" || ((C = ($ = r.purchaseOrder) == null ? void 0 : $.supplier) == null ? void 0 : C.internal) === "warehouse" ? at.enum.transfer : at.enum.purchase;
|
|
@@ -3720,16 +3719,16 @@ const xo = { class: "flex flex-col gap-3" }, wo = { class: "flex flex-col gap-4"
|
|
|
3720
3719
|
if ($.success)
|
|
3721
3720
|
l = $.data;
|
|
3722
3721
|
else {
|
|
3723
|
-
const Z = /* @__PURE__ */ new Set(["1", "2"]),
|
|
3722
|
+
const Z = /* @__PURE__ */ new Set(["1", "2"]), ge = { line1: "", state: "", city: "", postcode: "", country: "" };
|
|
3724
3723
|
l = {
|
|
3725
3724
|
_id: ((pe = r.purchaseOrder) == null ? void 0 : pe._id) ?? "",
|
|
3726
|
-
status: ((y = r.purchaseOrder) == null ? void 0 : y.status) ??
|
|
3725
|
+
status: ((y = r.purchaseOrder) == null ? void 0 : y.status) ?? be.enum.DRAFT,
|
|
3727
3726
|
version: Z.has((p = r.purchaseOrder) == null ? void 0 : p.version) ? (S = r.purchaseOrder) == null ? void 0 : S.version : null,
|
|
3728
3727
|
seqNumber: typeof ((U = r.purchaseOrder) == null ? void 0 : U.seqNumber) == "number" ? r.purchaseOrder.seqNumber : 0,
|
|
3729
3728
|
supplier: {
|
|
3730
3729
|
_id: ((_e = (M = r.purchaseOrder) == null ? void 0 : M.supplier) == null ? void 0 : _e._id) ?? "",
|
|
3731
3730
|
name: ((W = (xe = r.purchaseOrder) == null ? void 0 : xe.supplier) == null ? void 0 : W.name) ?? "",
|
|
3732
|
-
address:
|
|
3731
|
+
address: ge
|
|
3733
3732
|
},
|
|
3734
3733
|
items: [],
|
|
3735
3734
|
deliveryOrder: []
|
|
@@ -3739,8 +3738,8 @@ const xo = { class: "flex flex-col gap-3" }, wo = { class: "flex flex-col gap-4"
|
|
|
3739
3738
|
user: N.value,
|
|
3740
3739
|
executedAt: s.locations.computeFirst(
|
|
3741
3740
|
(Z) => {
|
|
3742
|
-
var
|
|
3743
|
-
return Z.dbName === ((
|
|
3741
|
+
var ge;
|
|
3742
|
+
return Z.dbName === ((ge = s._currentLocation) == null ? void 0 : ge.dbName) ? Z : null;
|
|
3744
3743
|
}
|
|
3745
3744
|
),
|
|
3746
3745
|
// Strip purchaseOrder and netSuite from the POR before passing to the Dart
|
|
@@ -3949,17 +3948,17 @@ const xo = { class: "flex flex-col gap-3" }, wo = { class: "flex flex-col gap-4"
|
|
|
3949
3948
|
}
|
|
3950
3949
|
const G = H(() => {
|
|
3951
3950
|
var o, l;
|
|
3952
|
-
return ((o = r.purchaseOrder) == null ? void 0 : o.status) ===
|
|
3951
|
+
return ((o = r.purchaseOrder) == null ? void 0 : o.status) === be.enum.RECEIVING || ((l = r.purchaseOrder) == null ? void 0 : l.status) === be.enum.COMPLETE;
|
|
3953
3952
|
}), X = H(() => r.purchaseOrder ? vt(r.purchaseOrder) : {}), le = H(() => {
|
|
3954
3953
|
const o = r.purchaseOrder;
|
|
3955
3954
|
if (!o) return { status: "", statusClass: "" };
|
|
3956
3955
|
const { partial: l, over: $ } = $t(X.value), C = Ct(o.status, l, $);
|
|
3957
3956
|
let q = _(`inventory.transfer.status.${C}`), Y = `${o.status}`.toLocaleLowerCase("en-us");
|
|
3958
|
-
return C ===
|
|
3957
|
+
return C === be.enum.CLOSE && (q = `${_(`inventory.transfer.status.${be.enum.COMPLETE}`)}`), C === "PARTIAL_RECEIVED" && Y === be.enum.PROCESSING.toLocaleLowerCase("en-us") && (Y = be.enum.RECEIVING.toLocaleLowerCase("en-us")), {
|
|
3959
3958
|
status: q,
|
|
3960
3959
|
statusClass: `fm-status-badge fm-status-badge-${Y}`
|
|
3961
3960
|
};
|
|
3962
|
-
}),
|
|
3961
|
+
}), g = H(() => {
|
|
3963
3962
|
var Y, ye;
|
|
3964
3963
|
const o = ((Y = r.purchaseOrder) == null ? void 0 : Y.deliveryOrder) ?? [], l = ((ye = r.purchaseOrder) == null ? void 0 : ye.deliveryFullfillment) ?? [], $ = [
|
|
3965
3964
|
...o.map((I) => ({
|
|
@@ -3975,7 +3974,7 @@ const xo = { class: "flex flex-col gap-3" }, wo = { class: "flex flex-col gap-4"
|
|
|
3975
3974
|
];
|
|
3976
3975
|
$.reverse().sort((I, pe) => I.createdAt.localeCompare(pe.createdAt));
|
|
3977
3976
|
function C(I) {
|
|
3978
|
-
var p, S, U, M, _e, xe, W, Z,
|
|
3977
|
+
var p, S, U, M, _e, xe, W, Z, ge, Fe, Ie, fe;
|
|
3979
3978
|
const pe = l.findIndex((ue) => ue.id === I.fullfillmentId), y = [
|
|
3980
3979
|
(S = (p = l[pe]) == null ? void 0 : p.netSuite) != null && S.id ? {
|
|
3981
3980
|
label: "Fulfillment's ref no. (Netsuite)",
|
|
@@ -3985,7 +3984,7 @@ const xo = { class: "flex flex-col gap-3" }, wo = { class: "flex flex-col gap-4"
|
|
|
3985
3984
|
} : null,
|
|
3986
3985
|
(W = I == null ? void 0 : I.netSuite) != null && W.id ? {
|
|
3987
3986
|
label: "Netsuite ref no.",
|
|
3988
|
-
values: [`${((Z = I == null ? void 0 : I.netSuite) == null ? void 0 : Z.refNo) ?? "N/A"} (${((
|
|
3987
|
+
values: [`${((Z = I == null ? void 0 : I.netSuite) == null ? void 0 : Z.refNo) ?? "N/A"} (${((ge = I == null ? void 0 : I.netSuite) == null ? void 0 : ge.id) ?? "-"})`]
|
|
3989
3988
|
} : null,
|
|
3990
3989
|
(Fe = I == null ? void 0 : I.netSuite) != null && Fe.recordType ? {
|
|
3991
3990
|
label: "Netsuite Type",
|
|
@@ -4223,14 +4222,14 @@ const xo = { class: "flex flex-col gap-3" }, wo = { class: "flex flex-col gap-4"
|
|
|
4223
4222
|
return C;
|
|
4224
4223
|
});
|
|
4225
4224
|
function ee(o) {
|
|
4226
|
-
const l = ie.value[o.sku._id], $ =
|
|
4225
|
+
const l = ie.value[o.sku._id], $ = b(o);
|
|
4227
4226
|
return l ? `<span class="${$} fm-typo-en-body-lg-600">${Pe.toFormatString({ value: l.received })}</span>/${ft(o.quantity, o.sku.unit, o.measurement)}` : `<span class="fm-typo-en-body-lg-600">-</span>/${ft(o.quantity, o.sku.unit, o.measurement)}`;
|
|
4228
4227
|
}
|
|
4229
4228
|
function L(o) {
|
|
4230
4229
|
const l = r.purchaseOrder;
|
|
4231
4230
|
return l != null && l.itemsAtSubmission ? !l.itemsAtSubmission.some(($) => $.sku._id === o.sku._id) : !1;
|
|
4232
4231
|
}
|
|
4233
|
-
function
|
|
4232
|
+
function b(o) {
|
|
4234
4233
|
const l = ie.value[o.sku._id];
|
|
4235
4234
|
if (!l)
|
|
4236
4235
|
return "text-fm-color-typo-tertiary";
|
|
@@ -4329,7 +4328,7 @@ const xo = { class: "flex flex-col gap-3" }, wo = { class: "flex flex-col gap-4"
|
|
|
4329
4328
|
class: "flex flex-col gap-8 px-12 py-16"
|
|
4330
4329
|
}, {
|
|
4331
4330
|
default: ce(() => {
|
|
4332
|
-
var W, Z,
|
|
4331
|
+
var W, Z, ge, Fe, Ie, fe, ue, Ne, Ee, Le;
|
|
4333
4332
|
return [
|
|
4334
4333
|
e("div", oa, [
|
|
4335
4334
|
e("div", na, k(h(_)("inventory.transfer.receiveRequest.details.requestSummary")), 1),
|
|
@@ -4374,15 +4373,15 @@ const xo = { class: "flex flex-col gap-3" }, wo = { class: "flex flex-col gap-4"
|
|
|
4374
4373
|
}),
|
|
4375
4374
|
_: 1
|
|
4376
4375
|
}),
|
|
4377
|
-
e("div",
|
|
4378
|
-
e("div",
|
|
4376
|
+
e("div", ga, [
|
|
4377
|
+
e("div", ba, [
|
|
4379
4378
|
e("div", _a, k(h(_)("inventory.transfer.receiveRequest.details.createdAt")), 1)
|
|
4380
4379
|
]),
|
|
4381
4380
|
e("div", Sa, k(h(lt)(((W = o.purchaseOrder) == null ? void 0 : W._id) ?? "")), 1)
|
|
4382
4381
|
]),
|
|
4383
4382
|
(Z = o.purchaseOrder) != null && Z.effectiveAt ? (i(), v("div", ka, [
|
|
4384
4383
|
e("div", Oa, k(h(_)("inventory.transfer.receiveRequest.details.date")), 1),
|
|
4385
|
-
e("div", xa, k(h(Nt)(new Date((
|
|
4384
|
+
e("div", xa, k(h(Nt)(new Date((ge = o.purchaseOrder) == null ? void 0 : ge.effectiveAt))), 1)
|
|
4386
4385
|
])) : V("", !0),
|
|
4387
4386
|
e("div", wa, [
|
|
4388
4387
|
e("div", $a, k(h(_)("inventory.transfer.receiveRequest.details.type.title")), 1),
|
|
@@ -4406,7 +4405,7 @@ const xo = { class: "flex flex-col gap-3" }, wo = { class: "flex flex-col gap-4"
|
|
|
4406
4405
|
e("div", Va, k(h(_)("inventory.transfer.receiveRequest.details.remark")), 1),
|
|
4407
4406
|
e("div", La, k(o.purchaseOrder.remark), 1)
|
|
4408
4407
|
])) : V("", !0),
|
|
4409
|
-
((Le = o.purchaseOrder) == null ? void 0 : Le.status) === h(
|
|
4408
|
+
((Le = o.purchaseOrder) == null ? void 0 : Le.status) === h(be).enum.DRAFT && ke.value ? (i(), v("div", ja, [
|
|
4410
4409
|
e("div", Ua, k(h(_)("inventory.transfer.receiveRequest.details.rejectionReason")), 1),
|
|
4411
4410
|
e("div", Ma, k(ke.value !== "" ? ke.value : "-"), 1)
|
|
4412
4411
|
])) : V("", !0)
|
|
@@ -4438,7 +4437,7 @@ const xo = { class: "flex flex-col gap-3" }, wo = { class: "flex flex-col gap-4"
|
|
|
4438
4437
|
var W, Z;
|
|
4439
4438
|
return [
|
|
4440
4439
|
e("div", Ga, [
|
|
4441
|
-
(i(!0), v(Ce, null, Te((Z = (W = o.purchaseOrder) == null ? void 0 : W.netSuite) == null ? void 0 : Z.missingItems, (
|
|
4440
|
+
(i(!0), v(Ce, null, Te((Z = (W = o.purchaseOrder) == null ? void 0 : W.netSuite) == null ? void 0 : Z.missingItems, (ge, Fe) => (i(), v("div", {
|
|
4442
4441
|
class: "flex justify-center align-middle",
|
|
4443
4442
|
key: Fe
|
|
4444
4443
|
}, [
|
|
@@ -4446,7 +4445,7 @@ const xo = { class: "flex flex-col gap-3" }, wo = { class: "flex flex-col gap-4"
|
|
|
4446
4445
|
name: "arrow_right",
|
|
4447
4446
|
size: "sm"
|
|
4448
4447
|
}),
|
|
4449
|
-
Ge(" " + k(`(${
|
|
4448
|
+
Ge(" " + k(`(${ge.netSuiteId}) ${ge.name}: ${ge.reason}`), 1)
|
|
4450
4449
|
]))), 128))
|
|
4451
4450
|
])
|
|
4452
4451
|
];
|
|
@@ -4464,7 +4463,7 @@ const xo = { class: "flex flex-col gap-3" }, wo = { class: "flex flex-col gap-4"
|
|
|
4464
4463
|
]),
|
|
4465
4464
|
T(ye),
|
|
4466
4465
|
(i(!0), v(Ce, null, Te(D.value, (W, Z) => {
|
|
4467
|
-
var
|
|
4466
|
+
var ge, Fe;
|
|
4468
4467
|
return i(), v("div", {
|
|
4469
4468
|
key: Z,
|
|
4470
4469
|
class: "flex flex-col"
|
|
@@ -4524,7 +4523,7 @@ const xo = { class: "flex flex-col gap-3" }, wo = { class: "flex flex-col gap-4"
|
|
|
4524
4523
|
]),
|
|
4525
4524
|
e("div", Xa, [
|
|
4526
4525
|
e("div", el, k(W.code), 1),
|
|
4527
|
-
h(c).enableTotalCost && ((
|
|
4526
|
+
h(c).enableTotalCost && ((ge = W.totalCost) != null && ge.amount || typeof W.sku == "object" && W.sku != null) ? (i(), v("div", tl, [
|
|
4528
4527
|
e("span", sl, k(h(ut)(
|
|
4529
4528
|
(Fe = W.totalCost) != null && Fe.amount ? W.totalCost : h(f).controller.value.getItemCost(W, h(Ae)()).cost
|
|
4530
4529
|
)), 1),
|
|
@@ -4564,9 +4563,9 @@ const xo = { class: "flex flex-col gap-3" }, wo = { class: "flex flex-col gap-4"
|
|
|
4564
4563
|
])
|
|
4565
4564
|
])
|
|
4566
4565
|
], 64)) : P.value.value === "deliveryHistory" ? (i(), v("div", il, [
|
|
4567
|
-
|
|
4568
|
-
(i(!0), v(Ce, null, Te(
|
|
4569
|
-
var
|
|
4566
|
+
g.value.length ? (i(), v("div", pl, [
|
|
4567
|
+
(i(!0), v(Ce, null, Te(g.value, (W, Z) => {
|
|
4568
|
+
var ge, Fe, Ie, fe, ue;
|
|
4570
4569
|
return i(), v(Ce, { key: Z }, [
|
|
4571
4570
|
e("div", fl, [
|
|
4572
4571
|
e("div", vl, [
|
|
@@ -4589,19 +4588,19 @@ const xo = { class: "flex flex-col gap-3" }, wo = { class: "flex flex-col gap-4"
|
|
|
4589
4588
|
color: "#ffffff"
|
|
4590
4589
|
})) : V("", !0)
|
|
4591
4590
|
]),
|
|
4592
|
-
e("div",
|
|
4591
|
+
e("div", gl, [
|
|
4593
4592
|
e("div", {
|
|
4594
4593
|
class: We([
|
|
4595
4594
|
{
|
|
4596
|
-
"bg-fm-color-primary": Z <
|
|
4597
|
-
"bg-white": Z >=
|
|
4595
|
+
"bg-fm-color-primary": Z < g.value.length - 1,
|
|
4596
|
+
"bg-white": Z >= g.value.length - 1
|
|
4598
4597
|
},
|
|
4599
4598
|
"w-[2px] h-full"
|
|
4600
4599
|
])
|
|
4601
4600
|
}, null, 2)
|
|
4602
4601
|
])
|
|
4603
4602
|
]),
|
|
4604
|
-
e("div",
|
|
4603
|
+
e("div", bl, [
|
|
4605
4604
|
e("div", _l, [
|
|
4606
4605
|
e("div", Sl, k(W.header), 1),
|
|
4607
4606
|
e("div", kl, k(W.date), 1)
|
|
@@ -4616,7 +4615,7 @@ const xo = { class: "flex flex-col gap-3" }, wo = { class: "flex flex-col gap-4"
|
|
|
4616
4615
|
n("update:show", !1), n("submitted");
|
|
4617
4616
|
})
|
|
4618
4617
|
}, null, 8, ["deliveryOrder", "purchaseOrder", "received-info-map"])) : V("", !0),
|
|
4619
|
-
(Fe = (
|
|
4618
|
+
(Fe = (ge = W.deliveryOrder) == null ? void 0 : ge.netSuite) != null && Fe.id ? (i(), he(ts, {
|
|
4620
4619
|
key: 1,
|
|
4621
4620
|
title: "Admin",
|
|
4622
4621
|
class: "min-w-[140px]"
|
|
@@ -4645,8 +4644,8 @@ const xo = { class: "flex flex-col gap-3" }, wo = { class: "flex flex-col gap-4"
|
|
|
4645
4644
|
e("div", {
|
|
4646
4645
|
class: We([
|
|
4647
4646
|
{
|
|
4648
|
-
"bg-fm-color-primary": Z <
|
|
4649
|
-
"bg-white": Z >=
|
|
4647
|
+
"bg-fm-color-primary": Z < g.value.length - 1,
|
|
4648
|
+
"bg-white": Z >= g.value.length - 1
|
|
4650
4649
|
},
|
|
4651
4650
|
"w-[2px] h-full"
|
|
4652
4651
|
])
|
|
@@ -4705,14 +4704,14 @@ const xo = { class: "flex flex-col gap-3" }, wo = { class: "flex flex-col gap-4"
|
|
|
4705
4704
|
class: "py-12 px-16"
|
|
4706
4705
|
}, {
|
|
4707
4706
|
default: ce(() => {
|
|
4708
|
-
var
|
|
4707
|
+
var ge;
|
|
4709
4708
|
return [
|
|
4710
4709
|
e("div", El, [
|
|
4711
4710
|
e("div", ql, [
|
|
4712
4711
|
e("div", Vl, k(h(nt)[W.action] ? h(_)(h(nt)[W.action].translationKey) : W.action), 1),
|
|
4713
4712
|
e("div", Ll, k(h(et)(W.changedAt)), 1)
|
|
4714
4713
|
]),
|
|
4715
|
-
e("div", jl, k((
|
|
4714
|
+
e("div", jl, k((ge = W.changedBy) == null ? void 0 : ge.name), 1),
|
|
4716
4715
|
W.remarks ? (i(), v("div", Ul, k(W.remarks), 1)) : V("", !0)
|
|
4717
4716
|
])
|
|
4718
4717
|
];
|
|
@@ -4782,7 +4781,7 @@ const xo = { class: "flex flex-col gap-3" }, wo = { class: "flex flex-col gap-4"
|
|
|
4782
4781
|
});
|
|
4783
4782
|
export {
|
|
4784
4783
|
At as P,
|
|
4785
|
-
|
|
4784
|
+
bi as _,
|
|
4786
4785
|
gi as a,
|
|
4787
4786
|
ir as b,
|
|
4788
4787
|
ps as c,
|
|
@@ -4793,5 +4792,5 @@ export {
|
|
|
4793
4792
|
fs as h,
|
|
4794
4793
|
It as i,
|
|
4795
4794
|
Ft as j,
|
|
4796
|
-
|
|
4795
|
+
hi as u
|
|
4797
4796
|
};
|