@feedmepos/mf-inventory-portal 1.3.8-dev.1 → 1.3.9-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-Dl97lAmD.js → App-BdI67_JN.js} +4 -4
- package/dist/{ApprovalView-RePEhbhl.js → ApprovalView-B1NNaLLy.js} +8 -8
- package/dist/{BindingsDialog-8QVbtnnq.js → BindingsDialog-jE-dghzD.js} +2 -2
- package/dist/{BindingsPicker-D9yuDGcq.js → BindingsPicker-BjzQVedz.js} +2 -2
- package/dist/{BindingsTable-DAYhI-6V.js → BindingsTable-BeNHq3Cs.js} +3 -3
- package/dist/{ClosingDraftView-D_VtBfFG.js → ClosingDraftView-CzEtmv80.js} +13 -13
- package/dist/{ClosingHistoryView-ClUnxQS2.js → ClosingHistoryView-BKF0J6Ks.js} +6 -6
- package/dist/{ClosingTemplateView-0a_isyyx.js → ClosingTemplateView-BUjDyYGl.js} +15 -15
- package/dist/{DeliveryOrderPrintPreview-DovAi6j-.js → DeliveryOrderPrintPreview-Czt1MLZ_.js} +2 -2
- package/dist/FmAdminBadge-DjnBAgyv.js +48 -0
- package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-DjNZ0m13.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-BHoMk9oO.js} +3 -3
- package/dist/{FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-4vZH2hLF.js → FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-CSuTIhFr.js} +4 -4
- package/dist/{FmMultiselectDialog-B5-aK-b2.js → FmMultiselectDialog-CLjJFmL2.js} +1 -1
- package/dist/{FmMultiselectDialog-Z49kK96R.js → FmMultiselectDialog-_mQIndQU.js} +2 -2
- package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-zP1nS7bp.js → FmUnitInput.vue_vue_type_script_setup_true_lang-Db3KL1J4.js} +4 -4
- package/dist/{ImportView-Dba8fJry.js → ImportView-Hmv8oOwi.js} +8 -8
- package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-DHITBIhp.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-DJ74tTtu.js} +1 -1
- package/dist/{IngredientGroupView-CHi5_A4T.js → IngredientGroupView-D_fdrAir.js} +6 -6
- package/dist/{IngredientsView-DWk27PJg.js → IngredientsView-Ci5oxdy3.js} +17 -17
- package/dist/{IntegrationExplorerView-CixgHWVb.js → IntegrationExplorerView-CVPV3V6E.js} +12 -8
- package/dist/{IntegrationView-fttszvyC.js → IntegrationView-8e450eho.js} +15 -15
- package/dist/{InventoryBindingForm-DDcM2paa.js → InventoryBindingForm-DQ8v7_rx.js} +1 -1
- package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-DOHrtdbl.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-B6EgVlRx.js} +5 -5
- package/dist/{InventoryBindingSummary-BERshnpd.js → InventoryBindingSummary-CUQurNIf.js} +1 -1
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-D4u0MM_k.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-Gva5TitS.js} +1 -1
- package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-eFb-84g2.js → PremiumBadge.vue_vue_type_script_setup_true_lang-DWnVDWYN.js} +1 -1
- package/dist/{PublishView-COGdnDHP.js → PublishView-BOqcyvXi.js} +4 -4
- package/dist/{PurchaseOrderPrintPreview-COJVgeTm.js → PurchaseOrderPrintPreview-BSmCNsRd.js} +2 -2
- package/dist/{ReceiveRequestView-DvC12_QK.js → ReceiveRequestView-CSpbpF8o.js} +24 -24
- package/dist/RecipeView-n8O74vm0.js +1692 -0
- package/dist/{SettingsView-DbXva8_D.js → SettingsView-Cd-XI85I.js} +6 -6
- package/dist/{SingleColumnLayout.vue_vue_type_script_setup_true_lang-CkPuJQWF.js → SingleColumnLayout.vue_vue_type_script_setup_true_lang-sUxHOj47.js} +1 -1
- package/dist/{StockView-Hri6SSjn.js → StockView-C6EC-gfN.js} +20 -20
- package/dist/{SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-DiRfjFmz.js → SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-CCDPVBEk.js} +1 -1
- package/dist/{SupplierView-DCMW5muk.js → SupplierView-CIhoOaRm.js} +13 -13
- package/dist/{SurchargeView-DRh5EAi8.js → SurchargeView-CMsPGwN6.js} +7 -7
- package/dist/{SystemTrailDialog.vue_vue_type_script_setup_true_lang-BHNIS7Pp.js → SystemTrailDialog.vue_vue_type_script_setup_true_lang-Co-QAzlC.js} +3 -3
- package/dist/{TemplatePublishDialog.vue_vue_type_script_setup_true_lang-BVyoZ2a4.js → TemplatePublishDialog.vue_vue_type_script_setup_true_lang-C-PNgED3.js} +2 -2
- package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-CMSKhz6_.js → TransferDetails.vue_vue_type_script_setup_true_lang-6hlwPSZr.js} +1074 -1011
- package/dist/{TransferTemplateView-71XY525Q.js → TransferTemplateView-Ba7bZICY.js} +18 -18
- package/dist/{UnitCostHistoryView-CjEaekfJ.js → UnitCostHistoryView-BlpAzQC9.js} +6 -6
- package/dist/{UnitDisplayControl.vue_vue_type_script_setup_true_lang-B8dRQhZi.js → UnitDisplayControl.vue_vue_type_script_setup_true_lang-xiUvPYVX.js} +4 -4
- package/dist/{UnitView-D06txpBT.js → UnitView-BR0uGHcU.js} +8 -8
- package/dist/{WarehouseView-DQluGq0D.js → WarehouseView-Cn8W93kO.js} +6 -6
- package/dist/{WastageTemplateView-Bqmd_r_Y.js → WastageTemplateView-B3Rlhrgt.js} +15 -15
- package/dist/api/netsuite.d.ts +6 -1
- package/dist/{app-B5-QVzib.js → app-Dbe7V63L.js} +15 -11
- package/dist/app.js +1 -1
- package/dist/{closing-template-C3ClR8Pj.js → closing-template-C60HJnuG.js} +1 -1
- package/dist/components/FmAdminBadge.vue.d.ts +4 -0
- package/dist/components/FmAdminCollapsiblePanel.vue.d.ts +51 -0
- package/dist/{date2-CQCX7jCE.js → date2-DYdjU4Dj.js} +1 -1
- package/dist/{dayjs.min-Dhp0BWSV.js → dayjs.min-Dg5QmVd4.js} +1 -1
- package/dist/{decimal-98G--u_X.js → decimal-QkHGtq6S.js} +2 -2
- package/dist/{defineDeepModel-BmHs4vdS.js → defineDeepModel-DHKXLKo8.js} +1 -1
- package/dist/{duplicate-template-UzmArmcM.js → duplicate-template-Dq4BRUUL.js} +1 -1
- package/dist/{export-Bdxro0GT.js → export-DPp8BiEP.js} +1 -1
- package/dist/{feature-DyfUPR3b.js → feature-BK5cMjRG.js} +2 -2
- package/dist/{format-time-from-id-uRCD3JxF.js → format-time-from-id-BpQopXAH.js} +1 -1
- package/dist/{format-unit-display-C-_85vuL.js → format-unit-display-Cd6ytcux.js} +11 -11
- package/dist/{import-export.helper-N1BqiTub.js → import-export.helper-altzSoJ6.js} +6 -6
- package/dist/{index-CaREZ_vQ.js → index-BIpODgwB.js} +3 -3
- package/dist/{index-CwqHa5AY.js → index-CN0nHrpu.js} +1 -1
- package/dist/{index-B1RZtqz-.js → index-CPiqET5G.js} +1 -1
- package/dist/{inventory-core-dart.default-BK8f9n8e.js → inventory-core-dart.default-D70169Bu.js} +1 -1
- package/dist/{lodash-B9tHF9A4.js → lodash-Bxf-HD6Z.js} +1 -1
- package/dist/{lz-string-BSMjlcH9.js → lz-string-9T-4wD-Z.js} +1 -1
- package/dist/{netsuite-D4KHhWWu.js → netsuite-BKXgpKUj.js} +19 -14
- package/dist/{number-DmqVo28f.js → number-8SeP62VA.js} +3 -3
- package/dist/{predefined-templates-Dy5hYXMM.js → predefined-templates-fq9IwL3Z.js} +1 -1
- package/dist/{purchase-order-template-BT3tF_gn.js → purchase-order-template-B5nDbemx.js} +1 -1
- package/dist/{rules-CbJ7idQa.js → rules-CkEGsMeN.js} +2 -2
- package/dist/{stock-YXoLCE8o.js → stock-6in8sQP7.js} +3 -3
- package/dist/{stock-C9RXv-3_.js → stock-gVGvyX7k.js} +1 -1
- package/dist/stores/integration/netsuite.d.ts +6 -1
- package/dist/style.css +1 -1
- package/dist/{supplier-Duiacdig.js → supplier-LPpRbpiG.js} +2 -2
- package/dist/{surcharge-CkDK4P_6.js → surcharge-C6hh2TF1.js} +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{use-ingredient-select-dialog-C7uVeT1M.js → use-ingredient-select-dialog-Cu-MKKsF.js} +2 -2
- package/dist/{use-inventory-binding-dialog-BIo9Fi-9.js → use-inventory-binding-dialog-D_nkJQuf.js} +2 -2
- package/dist/{use-template-enabled-locations-BtbfLc0y.js → use-template-enabled-locations-VtfLGQ5g.js} +2 -2
- package/dist/views/ingredients/components/inventory-binding/v2/components/InventoryBindingRule.vue.d.ts +24 -33
- package/dist/views/integration-explorer/netsuite/ExplorerRecordSyncLog.vue.d.ts +2 -0
- package/dist/{vue-i18n-D1JHIbLE.js → vue-i18n-DCT1ZMkA.js} +206 -206
- package/dist/{xlsx-BEbkruI_.js → xlsx-B7ycJmBG.js} +1 -1
- package/dist/{xlsx.util-BMTXqfxw.js → xlsx.util-CaSNWKSp.js} +1 -1
- package/package.json +1 -1
- package/dist/FmAdminBadge-BOEV93D3.js +0 -44
- package/dist/RecipeView-BKlVCFPR.js +0 -1682
|
@@ -1,52 +1,52 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { f as
|
|
3
|
-
import { f as tt, p as
|
|
4
|
-
import { c as
|
|
1
|
+
import { defineComponent as Oe, ref as G, watch as Ke, nextTick as Zt, openBlock as i, createBlock as ie, Teleport as er, createElementBlock as v, withModifiers as tr, createElementVNode as e, normalizeClass as Pe, toDisplayString as d, createCommentVNode as M, unref as m, withDirectives as rr, vModelText as sr, toRaw as or, shallowRef as Tt, onUnmounted as nr, triggerRef as ar, computed as Z, readonly as lr, h as z, reactive as ir, onMounted as jt, resolveComponent as X, withCtx as oe, createVNode as L, Fragment as fe, renderList as ke, createTextVNode as Ee, renderSlot as cr, isRef as ur, resolveDynamicComponent as dr } from "vue";
|
|
2
|
+
import { f as mr, h as pr, r as fr, s as yr } from "./predefined-templates-fq9IwL3Z.js";
|
|
3
|
+
import { f as tt, p as vr } from "./format-time-from-id-BpQopXAH.js";
|
|
4
|
+
import { c as Ft } from "./component-kqxARxvM.js";
|
|
5
5
|
import { D as xe, R as ue } from "./row-action.enum-Co_O4qD9.js";
|
|
6
|
-
import { I as Ye, o as
|
|
7
|
-
import { j as
|
|
8
|
-
import { F as
|
|
9
|
-
import { h as _t, t as
|
|
10
|
-
import { F as Xe, c as
|
|
11
|
-
import { L as
|
|
12
|
-
import { useI18n as it, useCoreStore as ct, validatePermission as
|
|
13
|
-
import { u as ut, a as xt, S as Ne } from "./netsuite-
|
|
14
|
-
import { useDialog as dt, useSnackbar as He, components as nt, FmButtonVariant as
|
|
15
|
-
import { F as
|
|
16
|
-
import { u as
|
|
17
|
-
import { E as
|
|
18
|
-
import { u as
|
|
19
|
-
import { u as We, _ as
|
|
20
|
-
import { _ as
|
|
21
|
-
import { u as
|
|
22
|
-
import { c as
|
|
23
|
-
import { i as
|
|
24
|
-
import { F as
|
|
25
|
-
import { u as
|
|
26
|
-
import { u as
|
|
27
|
-
import { d as
|
|
28
|
-
import { u as
|
|
29
|
-
function
|
|
6
|
+
import { I as Ye, o as br, u as Te, W as q, X as lt, Q as ae, a as hr, Y as It, Z as gr, _ as _r, H as xr, c as Bt, v as gt, s as De, $ as zt, t as Ze, D as st, y as je, E as Ue } from "./app-Dbe7V63L.js";
|
|
7
|
+
import { j as Sr, c as Or, a as be, t as ot, d as Je } from "./number-8SeP62VA.js";
|
|
8
|
+
import { F as wr } from "./decimal-QkHGtq6S.js";
|
|
9
|
+
import { h as _t, t as Cr, d as Dr, a as et } from "./date2-DYdjU4Dj.js";
|
|
10
|
+
import { F as Xe, c as $r, a as mt } from "./inventory-core-dart.default-D70169Bu.js";
|
|
11
|
+
import { L as kr } from "./lz-string-9T-4wD-Z.js";
|
|
12
|
+
import { useI18n as it, useCoreStore as ct, validatePermission as Rr, Permission as qt } from "@feedmepos/mf-common";
|
|
13
|
+
import { u as ut, a as xt, S as Ne } from "./netsuite-BKXgpKUj.js";
|
|
14
|
+
import { useDialog as dt, useSnackbar as He, components as nt, FmButtonVariant as Ce, useProxiedModel as Nr } from "@feedmepos/ui-library";
|
|
15
|
+
import { F as ze } from "./FmAdminBadge-DjnBAgyv.js";
|
|
16
|
+
import { u as Ve } from "./feature-BK5cMjRG.js";
|
|
17
|
+
import { E as Ar } from "./empty-placeholder-wf6-BWE8.js";
|
|
18
|
+
import { u as Pr, a as Tr, f as Fr } from "./format-unit-display-Cd6ytcux.js";
|
|
19
|
+
import { u as We, _ as Ir } from "./SystemTrailDialog.vue_vue_type_script_setup_true_lang-Co-QAzlC.js";
|
|
20
|
+
import { _ as qr, a as Er, b as Vr } from "./FmUnitInput.vue_vue_type_script_setup_true_lang-Db3KL1J4.js";
|
|
21
|
+
import { u as Lr, R as Et } from "./usePromise-CbVUCxhj.js";
|
|
22
|
+
import { c as Mr } from "./index-BIpODgwB.js";
|
|
23
|
+
import { i as Ur } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-CSuTIhFr.js";
|
|
24
|
+
import { F as Vt } from "./form-mode.enum-BKiNVH6A.js";
|
|
25
|
+
import { u as jr } from "./supplier-LPpRbpiG.js";
|
|
26
|
+
import { u as Br } from "./surcharge-C6hh2TF1.js";
|
|
27
|
+
import { d as Kt } from "./defineDeepModel-DHKXLKo8.js";
|
|
28
|
+
import { u as zr } from "./vue-i18n-DCT1ZMkA.js";
|
|
29
|
+
function Ht(p, r) {
|
|
30
30
|
return r.reduce(
|
|
31
31
|
(l, c) => {
|
|
32
|
-
const
|
|
33
|
-
return
|
|
32
|
+
const n = c.received.find((f) => f.sku._id === p._id);
|
|
33
|
+
return n && (l = Sr(l, n.amount)), l;
|
|
34
34
|
},
|
|
35
|
-
|
|
35
|
+
wr.toPrecision(Or(0), p.unit.precision)
|
|
36
36
|
);
|
|
37
37
|
}
|
|
38
|
-
function
|
|
39
|
-
const { po: r, currentLocation: s, business: l, fulfilling: c, por:
|
|
40
|
-
name:
|
|
41
|
-
legalName:
|
|
42
|
-
registrationNumber:
|
|
38
|
+
function Kr(p) {
|
|
39
|
+
const { po: r, currentLocation: s, business: l, fulfilling: c, por: n } = p, { name: f, address: t, regNo: a, legalName: b } = s.doc.profile, y = {
|
|
40
|
+
name: f,
|
|
41
|
+
legalName: b || void 0,
|
|
42
|
+
registrationNumber: a || void 0,
|
|
43
43
|
line1: (t == null ? void 0 : t.line1) || "",
|
|
44
44
|
line2: (t == null ? void 0 : t.line2) || void 0,
|
|
45
45
|
postcode: (t == null ? void 0 : t.postcode) || "",
|
|
46
46
|
city: (t == null ? void 0 : t.city) || "",
|
|
47
47
|
state: (t == null ? void 0 : t.state) || "",
|
|
48
48
|
country: (t == null ? void 0 : t.country) || ""
|
|
49
|
-
},
|
|
49
|
+
}, x = {
|
|
50
50
|
name: r.supplier.name,
|
|
51
51
|
phoneNumber: r.supplier.phoneNumber || void 0,
|
|
52
52
|
registrationNumber: r.supplier.registrationNumber || void 0,
|
|
@@ -56,9 +56,9 @@ function Pr(f) {
|
|
|
56
56
|
city: r.supplier.address.city,
|
|
57
57
|
state: r.supplier.address.state,
|
|
58
58
|
country: r.supplier.address.country
|
|
59
|
-
},
|
|
59
|
+
}, _ = r.items.map((k) => {
|
|
60
60
|
const { sku: Y, measurement: N } = k, P = be(
|
|
61
|
-
|
|
61
|
+
Ht(k.sku, r.deliveryOrder || []),
|
|
62
62
|
!1
|
|
63
63
|
);
|
|
64
64
|
return {
|
|
@@ -74,7 +74,7 @@ function Pr(f) {
|
|
|
74
74
|
value: k.totalCost
|
|
75
75
|
})}` : void 0
|
|
76
76
|
};
|
|
77
|
-
}),
|
|
77
|
+
}), C = r.deliveryOrder.map((k) => ({
|
|
78
78
|
createdAt: _t(new Date(k.createdAt)),
|
|
79
79
|
ref: k.deliveryOrderNumber,
|
|
80
80
|
remark: k.remark || "",
|
|
@@ -88,13 +88,13 @@ function Pr(f) {
|
|
|
88
88
|
};
|
|
89
89
|
})
|
|
90
90
|
}));
|
|
91
|
-
let
|
|
92
|
-
if (r.supplier.internal ? (
|
|
93
|
-
const k =
|
|
94
|
-
s.dbName === k || (
|
|
91
|
+
let h = Ye.Enum.purchaseOrder, U = "Inventory Receive Note";
|
|
92
|
+
if (r.supplier.internal ? (U = "Inventory Transfer Note", h = Ye.Enum.transferOrder) : (U = "Purchase Order", h = Ye.Enum.purchaseOrder), n) {
|
|
93
|
+
const k = n.from.dbName;
|
|
94
|
+
s.dbName === k || (U = "Inventory Receive Note", h = Ye.Enum.goodsReceivedNote);
|
|
95
95
|
}
|
|
96
96
|
const j = {
|
|
97
|
-
title:
|
|
97
|
+
title: U,
|
|
98
98
|
businessName: l == null ? void 0 : l.name,
|
|
99
99
|
logo: l == null ? void 0 : l.thumbnail,
|
|
100
100
|
orderNumber: r.seqNumber.toString(),
|
|
@@ -102,18 +102,18 @@ function Pr(f) {
|
|
|
102
102
|
ref: r.ref || "",
|
|
103
103
|
remark: r.remark || "",
|
|
104
104
|
buyer: y,
|
|
105
|
-
supplier:
|
|
106
|
-
items:
|
|
105
|
+
supplier: x,
|
|
106
|
+
items: _,
|
|
107
107
|
status: r.status,
|
|
108
|
-
deliveryOrders:
|
|
108
|
+
deliveryOrders: C
|
|
109
109
|
}, O = c && (r.deliveryFullfillment || []).length > 0;
|
|
110
|
-
return O && (
|
|
110
|
+
return O && (h = Ye.Enum.deliveryOrder), { printData: j, templateType: h, isDeliveryPrint: O };
|
|
111
111
|
}
|
|
112
|
-
function
|
|
112
|
+
function Hr(p) {
|
|
113
113
|
var y;
|
|
114
|
-
const { printData: r, templateType: s } =
|
|
114
|
+
const { printData: r, templateType: s } = Kr(p), c = mr().getTemplateByType(s), n = !!((y = c == null ? void 0 : c.blocks) != null && y.length), f = pr(s), t = n ? c.blocks : f.blocks, a = n ? c.name : f.name, b = !n;
|
|
115
115
|
try {
|
|
116
|
-
const
|
|
116
|
+
const x = fr(t, r), _ = x.match(/<style>([\s\S]*?)<\/style>/), C = _ ? `<style>${_[1]}</style>` : "", h = x.replace(/<style>[\s\S]*?<\/style>/, "");
|
|
117
117
|
return {
|
|
118
118
|
html: `<!DOCTYPE html>
|
|
119
119
|
<html>
|
|
@@ -127,21 +127,21 @@ function Tr(f) {
|
|
|
127
127
|
}
|
|
128
128
|
* { box-sizing: border-box; margin: 0; padding: 0; }
|
|
129
129
|
</style>
|
|
130
|
-
${
|
|
130
|
+
${C}
|
|
131
131
|
</head>
|
|
132
|
-
<body>${
|
|
132
|
+
<body>${h}</body>
|
|
133
133
|
</html>`,
|
|
134
|
-
templateName:
|
|
135
|
-
isDefault:
|
|
134
|
+
templateName: a,
|
|
135
|
+
isDefault: b
|
|
136
136
|
};
|
|
137
137
|
} catch {
|
|
138
138
|
return alert("Failed to render print template. Please try recreating the template."), null;
|
|
139
139
|
}
|
|
140
140
|
}
|
|
141
|
-
const
|
|
141
|
+
const Wr = { class: "w-[95vw] h-[95vh] bg-white rounded-lg flex flex-col shadow-2xl overflow-hidden" }, Gr = { class: "flex justify-between items-center px-16 py-3 border-b border-gray-200 bg-gray-50" }, Yr = { class: "flex items-center gap-2.5" }, Qr = {
|
|
142
142
|
key: 1,
|
|
143
143
|
class: "text-xs text-gray-100 bg-gray-500 px-2 py-0.5 rounded font-medium"
|
|
144
|
-
},
|
|
144
|
+
}, Jr = { class: "flex-1 overflow-auto bg-gray-100" }, gl = /* @__PURE__ */ Oe({
|
|
145
145
|
__name: "CustomPrintTemplatePreview",
|
|
146
146
|
props: {
|
|
147
147
|
html: {},
|
|
@@ -150,32 +150,32 @@ const Fr = { class: "w-[95vw] h-[95vh] bg-white rounded-lg flex flex-col shadow-
|
|
|
150
150
|
isDefault: { type: Boolean }
|
|
151
151
|
},
|
|
152
152
|
emits: ["update:modelValue"],
|
|
153
|
-
setup(
|
|
154
|
-
const s =
|
|
155
|
-
function
|
|
153
|
+
setup(p, { emit: r }) {
|
|
154
|
+
const s = p, l = r, c = G(null);
|
|
155
|
+
function n() {
|
|
156
156
|
l("update:modelValue", !1);
|
|
157
157
|
}
|
|
158
|
-
function
|
|
159
|
-
var
|
|
158
|
+
function f() {
|
|
159
|
+
var a, b;
|
|
160
160
|
try {
|
|
161
|
-
(
|
|
161
|
+
(b = (a = c.value) == null ? void 0 : a.contentWindow) == null || b.print();
|
|
162
162
|
} catch {
|
|
163
163
|
alert("Failed to trigger print.");
|
|
164
164
|
}
|
|
165
165
|
}
|
|
166
166
|
Ke(
|
|
167
167
|
() => s.modelValue,
|
|
168
|
-
async (
|
|
169
|
-
|
|
170
|
-
|
|
168
|
+
async (a) => {
|
|
169
|
+
a && (await Zt(), t(), setTimeout(() => {
|
|
170
|
+
f();
|
|
171
171
|
}, 300));
|
|
172
172
|
}
|
|
173
173
|
);
|
|
174
174
|
function t() {
|
|
175
|
-
var
|
|
176
|
-
const
|
|
177
|
-
if (!
|
|
178
|
-
const
|
|
175
|
+
var x;
|
|
176
|
+
const a = c.value;
|
|
177
|
+
if (!a) return;
|
|
178
|
+
const b = yr(s.html), y = a.contentDocument || ((x = a.contentWindow) == null ? void 0 : x.document);
|
|
179
179
|
y && (y.open(), y.write(`
|
|
180
180
|
<!DOCTYPE html>
|
|
181
181
|
<html>
|
|
@@ -232,40 +232,40 @@ const Fr = { class: "w-[95vw] h-[95vh] bg-white rounded-lg flex flex-col shadow-
|
|
|
232
232
|
</head>
|
|
233
233
|
<body>
|
|
234
234
|
<div class="print-container">
|
|
235
|
-
${
|
|
235
|
+
${b}
|
|
236
236
|
</div>
|
|
237
237
|
</body>
|
|
238
238
|
</html>
|
|
239
239
|
`), y.close());
|
|
240
240
|
}
|
|
241
|
-
return (
|
|
242
|
-
|
|
241
|
+
return (a, b) => (i(), ie(er, { to: "body" }, [
|
|
242
|
+
a.modelValue ? (i(), v("div", {
|
|
243
243
|
key: 0,
|
|
244
244
|
class: "fixed inset-0 z-[9999] bg-black/50 flex justify-center items-center",
|
|
245
|
-
onClick:
|
|
245
|
+
onClick: tr(n, ["self"])
|
|
246
246
|
}, [
|
|
247
|
-
e("div",
|
|
248
|
-
e("div",
|
|
249
|
-
e("div",
|
|
250
|
-
|
|
251
|
-
|
|
247
|
+
e("div", Wr, [
|
|
248
|
+
e("div", Gr, [
|
|
249
|
+
e("div", Yr, [
|
|
250
|
+
b[0] || (b[0] = e("span", { class: "text-base font-semibold text-gray-700" }, "Print Preview", -1)),
|
|
251
|
+
a.templateName ? (i(), v("span", {
|
|
252
252
|
key: 0,
|
|
253
|
-
class:
|
|
254
|
-
},
|
|
255
|
-
|
|
253
|
+
class: Pe(["text-xs font-medium px-2 py-0.5 rounded", a.isDefault ? "text-gray-500 bg-gray-100" : "text-blue-700 bg-blue-50"])
|
|
254
|
+
}, d(a.templateName), 3)) : M("", !0),
|
|
255
|
+
a.isDefault ? (i(), v("span", Qr, "Default")) : M("", !0)
|
|
256
256
|
]),
|
|
257
257
|
e("div", { class: "flex gap-2 items-center" }, [
|
|
258
258
|
e("button", {
|
|
259
259
|
class: "px-8 py-1.5 bg-blue-500 text-white border-none rounded text-sm cursor-pointer hover:bg-blue-700",
|
|
260
|
-
onClick:
|
|
260
|
+
onClick: f
|
|
261
261
|
}, " Print "),
|
|
262
262
|
e("button", {
|
|
263
263
|
class: "px-2.5 py-1 bg-transparent border border-gray-300 rounded text-xl leading-none cursor-pointer text-gray-500 hover:bg-gray-100",
|
|
264
|
-
onClick:
|
|
264
|
+
onClick: n
|
|
265
265
|
}, " × ")
|
|
266
266
|
])
|
|
267
267
|
]),
|
|
268
|
-
e("div",
|
|
268
|
+
e("div", Jr, [
|
|
269
269
|
e("iframe", {
|
|
270
270
|
ref_key: "iframeRef",
|
|
271
271
|
ref: c,
|
|
@@ -274,27 +274,27 @@ const Fr = { class: "w-[95vw] h-[95vh] bg-white rounded-lg flex flex-col shadow-
|
|
|
274
274
|
}, null, 512)
|
|
275
275
|
])
|
|
276
276
|
])
|
|
277
|
-
])) :
|
|
277
|
+
])) : M("", !0)
|
|
278
278
|
]));
|
|
279
279
|
}
|
|
280
|
-
}),
|
|
280
|
+
}), Xr = br((p, r) => {
|
|
281
281
|
const s = Te();
|
|
282
282
|
return {
|
|
283
283
|
async getShipments({
|
|
284
284
|
start: l,
|
|
285
285
|
end: c
|
|
286
286
|
}) {
|
|
287
|
-
const
|
|
288
|
-
return await r.get(`${
|
|
287
|
+
const n = s.currentLocationDBName, f = `${p.inventoryBackendUrl}/${n}/shipments`;
|
|
288
|
+
return await r.get(`${f}?start=${l}&end=${c}`);
|
|
289
289
|
},
|
|
290
290
|
async getShipmentsByIds(l) {
|
|
291
291
|
if (l.length === 0)
|
|
292
292
|
return [];
|
|
293
|
-
const c = s.currentLocationDBName,
|
|
294
|
-
return await r.post(
|
|
293
|
+
const c = s.currentLocationDBName, n = `${p.inventoryBackendUrl}/${c}/shipments/get`;
|
|
294
|
+
return await r.post(n, { shipmentIds: l });
|
|
295
295
|
}
|
|
296
296
|
};
|
|
297
|
-
}),
|
|
297
|
+
}), Wt = {
|
|
298
298
|
[q.enum.confirmDraft]: {
|
|
299
299
|
primaryActions: {
|
|
300
300
|
text: "Confirm draft",
|
|
@@ -379,34 +379,34 @@ const Fr = { class: "w-[95vw] h-[95vh] bg-white rounded-lg flex flex-col shadow-
|
|
|
379
379
|
message: "Purchase order will be processed.",
|
|
380
380
|
successMessage: "Purchase order has been processed"
|
|
381
381
|
}
|
|
382
|
-
},
|
|
382
|
+
}, Zr = { class: "p-4" }, es = {
|
|
383
383
|
key: 0,
|
|
384
384
|
class: "fm-typo-en-body-md-400 mb-3"
|
|
385
|
-
},
|
|
385
|
+
}, ts = { class: "fm-typo-en-body-md-400" }, Gt = /* @__PURE__ */ Oe({
|
|
386
386
|
__name: "RejectDraftForm",
|
|
387
387
|
props: {
|
|
388
388
|
message: {},
|
|
389
389
|
confirm: { type: Function },
|
|
390
390
|
onChange: { type: Function }
|
|
391
391
|
},
|
|
392
|
-
setup(
|
|
393
|
-
const r =
|
|
394
|
-
Ke(l, (
|
|
395
|
-
var
|
|
396
|
-
(
|
|
392
|
+
setup(p) {
|
|
393
|
+
const r = p, { t: s } = it(), l = G("");
|
|
394
|
+
Ke(l, (n) => {
|
|
395
|
+
var f;
|
|
396
|
+
(f = r.onChange) == null || f.call(r, n ?? "");
|
|
397
397
|
});
|
|
398
398
|
function c() {
|
|
399
399
|
l.value = "";
|
|
400
400
|
}
|
|
401
|
-
return (
|
|
402
|
-
r.message ? (i(),
|
|
403
|
-
e("label",
|
|
404
|
-
|
|
405
|
-
"onUpdate:modelValue":
|
|
401
|
+
return (n, f) => (i(), v("div", Zr, [
|
|
402
|
+
r.message ? (i(), v("div", es, d(r.message), 1)) : M("", !0),
|
|
403
|
+
e("label", ts, d(m(s)("inventory.transfer.receiveRequest.details.rejectionReason")) + " (" + d(m(s)("inventory.common.optional")) + ")", 1),
|
|
404
|
+
rr(e("textarea", {
|
|
405
|
+
"onUpdate:modelValue": f[0] || (f[0] = (t) => l.value = t),
|
|
406
406
|
rows: "4",
|
|
407
407
|
class: "w-full mt-2 p-2 border rounded"
|
|
408
408
|
}, null, 512), [
|
|
409
|
-
[
|
|
409
|
+
[sr, l.value]
|
|
410
410
|
]),
|
|
411
411
|
e("div", { class: "mt-3 flex gap-2" }, [
|
|
412
412
|
e("button", {
|
|
@@ -418,45 +418,45 @@ const Fr = { class: "w-[95vw] h-[95vh] bg-white rounded-lg flex flex-col shadow-
|
|
|
418
418
|
]));
|
|
419
419
|
}
|
|
420
420
|
});
|
|
421
|
-
function at(
|
|
421
|
+
function at(p) {
|
|
422
422
|
return lt.generatedPOReceivedMap({
|
|
423
|
-
purchaseOrder:
|
|
423
|
+
purchaseOrder: p
|
|
424
424
|
});
|
|
425
425
|
}
|
|
426
|
-
function
|
|
426
|
+
function rs(p) {
|
|
427
427
|
return lt.validatePOItemReceivedStatus({
|
|
428
|
-
dto:
|
|
428
|
+
dto: p
|
|
429
429
|
});
|
|
430
430
|
}
|
|
431
|
-
function vt(
|
|
431
|
+
function vt(p) {
|
|
432
432
|
return lt.validatePOReceivedStatus({
|
|
433
|
-
receivedMap:
|
|
433
|
+
receivedMap: p
|
|
434
434
|
});
|
|
435
435
|
}
|
|
436
|
-
function bt(
|
|
437
|
-
if (!ae.safeParse(
|
|
438
|
-
throw new Error(`Invalid purchase order status: ${
|
|
439
|
-
const l = ae.parse(
|
|
436
|
+
function bt(p, r, s) {
|
|
437
|
+
if (!ae.safeParse(p).success)
|
|
438
|
+
throw new Error(`Invalid purchase order status: ${p}`);
|
|
439
|
+
const l = ae.parse(p);
|
|
440
440
|
return lt.orderStatusCombination({
|
|
441
441
|
status: l,
|
|
442
442
|
isPOPartialReceive: r,
|
|
443
443
|
isPOOverReceive: s
|
|
444
444
|
});
|
|
445
445
|
}
|
|
446
|
-
function
|
|
447
|
-
const
|
|
448
|
-
async function l(
|
|
449
|
-
const t =
|
|
450
|
-
return
|
|
446
|
+
function Yt() {
|
|
447
|
+
const p = Te(), r = We(), s = Ve();
|
|
448
|
+
async function l(n, f) {
|
|
449
|
+
const t = p.currentLocationDBName;
|
|
450
|
+
return n.doc.supplier.internal && n.operation === q.enum.confirmDraft && (n.operation = q.enum.submitRequest), await r.processPurchaseOrder(n, f || t);
|
|
451
451
|
}
|
|
452
|
-
async function c(
|
|
453
|
-
const t =
|
|
454
|
-
return await r.processPurchaseOrderV2(
|
|
452
|
+
async function c(n, f) {
|
|
453
|
+
const t = p.currentLocationDBName;
|
|
454
|
+
return await r.processPurchaseOrderV2(n, f || t);
|
|
455
455
|
}
|
|
456
|
-
return (
|
|
456
|
+
return (n) => s.useOperatePurchaseOrderV2 ? c(n.operateV2, n.transferTo) : l(n.operate, n.transferTo);
|
|
457
457
|
}
|
|
458
|
-
function qe(
|
|
459
|
-
const r =
|
|
458
|
+
function qe(p) {
|
|
459
|
+
const r = or(p);
|
|
460
460
|
if (Array.isArray(r))
|
|
461
461
|
return r.map(qe);
|
|
462
462
|
if (r !== null && typeof r == "object") {
|
|
@@ -472,69 +472,69 @@ const pt = {
|
|
|
472
472
|
add: "add",
|
|
473
473
|
delete: "delete"
|
|
474
474
|
};
|
|
475
|
-
function
|
|
475
|
+
function Lt(p) {
|
|
476
476
|
return {
|
|
477
|
-
dbName:
|
|
478
|
-
type:
|
|
479
|
-
name:
|
|
480
|
-
acceptRequest:
|
|
481
|
-
doc:
|
|
477
|
+
dbName: p.dbName,
|
|
478
|
+
type: p.type,
|
|
479
|
+
name: p.name,
|
|
480
|
+
acceptRequest: p.acceptRequest ?? !1,
|
|
481
|
+
doc: p.doc
|
|
482
482
|
};
|
|
483
483
|
}
|
|
484
|
-
function
|
|
485
|
-
const
|
|
484
|
+
function Mt(p, r, s, l, c) {
|
|
485
|
+
const n = qe(p.suppliers ?? []), f = qe(r.allLocations ?? []).map(Lt), t = r._currentLocation ? Lt(qe(r._currentLocation)) : null, a = s.inventory ? [qe(s.inventory)] : [], b = l.state.setting ? qe(l.state.setting) : null, y = qe(c.surcharges ?? []);
|
|
486
486
|
return {
|
|
487
|
-
suppliers:
|
|
488
|
-
locations:
|
|
487
|
+
suppliers: n,
|
|
488
|
+
locations: f,
|
|
489
489
|
currentLocation: t,
|
|
490
|
-
inventoryDoc:
|
|
491
|
-
netSuiteSetting:
|
|
490
|
+
inventoryDoc: a,
|
|
491
|
+
netSuiteSetting: b,
|
|
492
492
|
surcharges: y
|
|
493
493
|
};
|
|
494
494
|
}
|
|
495
|
-
function
|
|
496
|
-
const
|
|
497
|
-
|
|
495
|
+
function Qt() {
|
|
496
|
+
const p = jr(), r = Te(), s = hr(), l = ut(), c = Br(), n = Mt(
|
|
497
|
+
p,
|
|
498
498
|
r,
|
|
499
499
|
s,
|
|
500
500
|
l,
|
|
501
501
|
c
|
|
502
|
-
),
|
|
503
|
-
|
|
504
|
-
const t =
|
|
505
|
-
t.value =
|
|
502
|
+
), f = Tt($r({ env: n }));
|
|
503
|
+
f.value.setUsePartialUpdates(!0);
|
|
504
|
+
const t = Tt(f.value.state()), a = (_) => {
|
|
505
|
+
t.value = _;
|
|
506
506
|
};
|
|
507
|
-
|
|
508
|
-
const
|
|
509
|
-
switch (
|
|
507
|
+
f.value.addListener(a);
|
|
508
|
+
const b = (_, C, h) => {
|
|
509
|
+
switch (_) {
|
|
510
510
|
case pt.set:
|
|
511
|
-
|
|
511
|
+
It(t.value, C, h);
|
|
512
512
|
break;
|
|
513
513
|
case pt.add:
|
|
514
|
-
|
|
514
|
+
_r(t.value, C, h);
|
|
515
515
|
break;
|
|
516
516
|
case pt.delete:
|
|
517
|
-
|
|
517
|
+
gr(t.value, C);
|
|
518
518
|
break;
|
|
519
519
|
default:
|
|
520
|
-
console.warn(`Unknown partial update operation: ${
|
|
520
|
+
console.warn(`Unknown partial update operation: ${_}, falling back to 'set'`), It(t.value, C, h);
|
|
521
521
|
}
|
|
522
|
-
|
|
522
|
+
C !== "remark" && C !== "ref" && ar(t);
|
|
523
523
|
};
|
|
524
|
-
|
|
524
|
+
f.value.addPartialListener(b);
|
|
525
525
|
function y() {
|
|
526
|
-
const
|
|
527
|
-
|
|
526
|
+
const _ = Mt(
|
|
527
|
+
p,
|
|
528
528
|
r,
|
|
529
529
|
s,
|
|
530
530
|
l,
|
|
531
531
|
c
|
|
532
532
|
);
|
|
533
|
-
|
|
533
|
+
f.value.updateFullEnv(_), t.value = f.value.state();
|
|
534
534
|
}
|
|
535
535
|
Ke(
|
|
536
536
|
[
|
|
537
|
-
() =>
|
|
537
|
+
() => p.suppliers,
|
|
538
538
|
() => r.allLocations,
|
|
539
539
|
() => r._currentLocation,
|
|
540
540
|
() => s.inventory,
|
|
@@ -545,43 +545,43 @@ function Vt() {
|
|
|
545
545
|
y();
|
|
546
546
|
},
|
|
547
547
|
{ deep: !0 }
|
|
548
|
-
),
|
|
549
|
-
|
|
548
|
+
), nr(() => {
|
|
549
|
+
f.value.removeListener(a), f.value.removePartialListener(b);
|
|
550
550
|
});
|
|
551
|
-
function _
|
|
552
|
-
var
|
|
553
|
-
if (
|
|
554
|
-
|
|
551
|
+
function x(_) {
|
|
552
|
+
var C;
|
|
553
|
+
if (_ != null && _._id) {
|
|
554
|
+
f.value.loadPurchaseOrder(_);
|
|
555
555
|
return;
|
|
556
556
|
}
|
|
557
|
-
if (!
|
|
558
|
-
|
|
557
|
+
if (!Ve().mustUsePoTemplate) {
|
|
558
|
+
f.value.init();
|
|
559
559
|
return;
|
|
560
560
|
}
|
|
561
|
-
|
|
561
|
+
_ != null && _.template && ((C = _.templateDoc) != null && C.purchaseOrder) ? (_.items = _.templateDoc.purchaseOrder.items, f.value.initFromTemplate(_)) : f.value.initOutletToOutlet();
|
|
562
562
|
}
|
|
563
563
|
return {
|
|
564
|
-
controller:
|
|
564
|
+
controller: f,
|
|
565
565
|
state: t,
|
|
566
|
-
init:
|
|
566
|
+
init: x
|
|
567
567
|
};
|
|
568
568
|
}
|
|
569
|
-
var
|
|
569
|
+
var ht = /* @__PURE__ */ ((p) => (p.RECEIVE_REQUEST = "receive/request", p.APPROVAL = "approval", p))(ht || {});
|
|
570
570
|
const Qe = G(), ft = G();
|
|
571
|
-
function
|
|
572
|
-
const s = dt(), l = Te(), c =
|
|
573
|
-
r != null && r.startDate && (r != null && r.endDate) ? r :
|
|
574
|
-
),
|
|
575
|
-
const F = new Date(
|
|
571
|
+
function _l(p, r) {
|
|
572
|
+
const s = dt(), l = Te(), c = Ve(), n = Pr(), f = Tr(), t = G(!1), a = He(), b = We(), y = Xr(), x = G(new Array()), _ = G(new Array()), C = G(
|
|
573
|
+
r != null && r.startDate && (r != null && r.endDate) ? r : Ur()
|
|
574
|
+
), h = Z(() => {
|
|
575
|
+
const F = new Date(C.value.startDate), I = new Date(C.value.endDate);
|
|
576
576
|
return {
|
|
577
|
-
start:
|
|
578
|
-
end:
|
|
577
|
+
start: Cr(F).toISOString(),
|
|
578
|
+
end: Dr(I).toISOString()
|
|
579
579
|
};
|
|
580
|
-
}),
|
|
580
|
+
}), U = G(new Array()), R = xr(), j = G(null);
|
|
581
581
|
async function O(F) {
|
|
582
582
|
function I(w) {
|
|
583
583
|
const g = {
|
|
584
|
-
mode:
|
|
584
|
+
mode: Vt.CREATE,
|
|
585
585
|
modelValue: F || void 0,
|
|
586
586
|
show: !0,
|
|
587
587
|
"onUpdate:show"(V) {
|
|
@@ -606,15 +606,15 @@ function Ja(f, r) {
|
|
|
606
606
|
close: !0
|
|
607
607
|
}
|
|
608
608
|
}).onPrimary(async () => {
|
|
609
|
-
ee = await
|
|
609
|
+
ee = await n.getTemplateId(), ee && I(ee);
|
|
610
610
|
}).onSecondary(() => {
|
|
611
611
|
I(void 0);
|
|
612
612
|
}) : I(ee);
|
|
613
613
|
}
|
|
614
614
|
function k(F) {
|
|
615
615
|
const I = {
|
|
616
|
-
mode:
|
|
617
|
-
modelValue:
|
|
616
|
+
mode: Vt.UPDATE,
|
|
617
|
+
modelValue: Bt(F),
|
|
618
618
|
show: !0,
|
|
619
619
|
"onUpdate:show"(ee) {
|
|
620
620
|
Qe.value.show = ee;
|
|
@@ -624,21 +624,21 @@ function Ja(f, r) {
|
|
|
624
624
|
Qe.value = I;
|
|
625
625
|
}
|
|
626
626
|
async function Y() {
|
|
627
|
-
|
|
627
|
+
x.value = [], _.value = [], t.value = !0;
|
|
628
628
|
try {
|
|
629
|
-
const F = await
|
|
630
|
-
|
|
629
|
+
const F = await b.getPurchaseOrders(h.value);
|
|
630
|
+
x.value = F.sort((H, ce) => ce._id.localeCompare(H._id));
|
|
631
631
|
const I = F.flatMap((H) => H.shipmentIds || []).filter(Boolean), ee = I.length > 0 ? await y.getShipmentsByIds(I) : [];
|
|
632
|
-
|
|
632
|
+
_.value = ee;
|
|
633
633
|
const w = await R.readCurrentLocationLastClosing(!0), g = w == null ? void 0 : w._id;
|
|
634
|
-
g && (j.value =
|
|
635
|
-
const V =
|
|
634
|
+
g && (j.value = vr(g)), await c.awaitFeatureLoaded(() => c.mustUsePoTemplate) && await f.fetchTemplates();
|
|
635
|
+
const V = x.value.map((H) => {
|
|
636
636
|
var ce;
|
|
637
637
|
return ((ce = H.request) == null ? void 0 : ce.id) ?? "";
|
|
638
638
|
}).filter((H) => H);
|
|
639
|
-
|
|
639
|
+
U.value = await b.readRequestByIds(V);
|
|
640
640
|
} catch {
|
|
641
|
-
|
|
641
|
+
a.open({
|
|
642
642
|
title: "Something went wrong",
|
|
643
643
|
message: "Error at fetching purchase orders",
|
|
644
644
|
type: "error"
|
|
@@ -648,15 +648,15 @@ function Ja(f, r) {
|
|
|
648
648
|
}
|
|
649
649
|
}
|
|
650
650
|
async function N() {
|
|
651
|
-
|
|
651
|
+
U.value = [], t.value = !0;
|
|
652
652
|
try {
|
|
653
|
-
|
|
653
|
+
U.value = await b.readRequests(
|
|
654
654
|
void 0,
|
|
655
|
-
|
|
656
|
-
|
|
655
|
+
h.value.start,
|
|
656
|
+
h.value.end
|
|
657
657
|
).then((F) => F.reverse());
|
|
658
658
|
} catch {
|
|
659
|
-
|
|
659
|
+
a.open({
|
|
660
660
|
title: "Something went wrong",
|
|
661
661
|
message: "Error at fetching purchase requests",
|
|
662
662
|
type: "error"
|
|
@@ -666,7 +666,7 @@ function Ja(f, r) {
|
|
|
666
666
|
}
|
|
667
667
|
}
|
|
668
668
|
function P() {
|
|
669
|
-
switch (
|
|
669
|
+
switch (p) {
|
|
670
670
|
case "receive/request":
|
|
671
671
|
return Y();
|
|
672
672
|
case "approval":
|
|
@@ -674,14 +674,14 @@ function Ja(f, r) {
|
|
|
674
674
|
}
|
|
675
675
|
}
|
|
676
676
|
function $(F, I) {
|
|
677
|
-
|
|
677
|
+
C.value = {
|
|
678
678
|
startDate: F,
|
|
679
679
|
endDate: I
|
|
680
680
|
}, P();
|
|
681
681
|
}
|
|
682
682
|
l.watchLocation(async (F) => {
|
|
683
683
|
if (!F) {
|
|
684
|
-
|
|
684
|
+
x.value = [];
|
|
685
685
|
return;
|
|
686
686
|
}
|
|
687
687
|
await P();
|
|
@@ -689,10 +689,10 @@ function Ja(f, r) {
|
|
|
689
689
|
const S = G(), T = G(Math.random().toString());
|
|
690
690
|
async function W(F, I) {
|
|
691
691
|
const ee = Math.random().toString();
|
|
692
|
-
T.value = ee, I ?? (I =
|
|
692
|
+
T.value = ee, I ?? (I = U.value.computeFirst(
|
|
693
693
|
(H) => H.purchaseOrderId === F._id ? H : null
|
|
694
694
|
) ?? void 0);
|
|
695
|
-
const w =
|
|
695
|
+
const w = p === "receive/request" ? l.currentLocation : I == null ? void 0 : I.to, g = p === "approval", V = {
|
|
696
696
|
poRequest: I,
|
|
697
697
|
purchaseOrder: {
|
|
698
698
|
...F,
|
|
@@ -706,14 +706,14 @@ function Ja(f, r) {
|
|
|
706
706
|
"onUpdate:show"(H) {
|
|
707
707
|
S.value.show = H;
|
|
708
708
|
},
|
|
709
|
-
scope:
|
|
709
|
+
scope: p,
|
|
710
710
|
receivedMap: at(F) ?? {},
|
|
711
|
-
shipments:
|
|
711
|
+
shipments: _.value
|
|
712
712
|
};
|
|
713
713
|
S.value = V;
|
|
714
714
|
}
|
|
715
715
|
async function Q(F, I, ee, w, g) {
|
|
716
|
-
const V =
|
|
716
|
+
const V = Yt();
|
|
717
717
|
t.value = !0;
|
|
718
718
|
try {
|
|
719
719
|
await V({
|
|
@@ -737,17 +737,17 @@ function Ja(f, r) {
|
|
|
737
737
|
transferTo: w
|
|
738
738
|
}), await new Promise((Re) => setTimeout(Re, 1e3));
|
|
739
739
|
const ce = Te().currentLocationDBName.startsWith("restaurant_");
|
|
740
|
-
I === q.enum.confirmDraft && F.effectiveAt && ce ?
|
|
740
|
+
I === q.enum.confirmDraft && F.effectiveAt && ce ? a.open({
|
|
741
741
|
title: "Success",
|
|
742
742
|
message: `${ee}. The backdate will be reflected once your POS has received this change.`,
|
|
743
743
|
type: "success"
|
|
744
|
-
}) :
|
|
744
|
+
}) : a.open({
|
|
745
745
|
title: "Success",
|
|
746
746
|
message: ee,
|
|
747
747
|
type: "success"
|
|
748
748
|
});
|
|
749
749
|
} catch (H) {
|
|
750
|
-
|
|
750
|
+
a.open({
|
|
751
751
|
title: "Something went wrong",
|
|
752
752
|
message: "Please try again.",
|
|
753
753
|
type: "error"
|
|
@@ -757,11 +757,11 @@ function Ja(f, r) {
|
|
|
757
757
|
}
|
|
758
758
|
}
|
|
759
759
|
async function ye(F, I, ee) {
|
|
760
|
-
const w =
|
|
760
|
+
const w = Wt[I];
|
|
761
761
|
if (!w) {
|
|
762
|
-
|
|
762
|
+
a.open({
|
|
763
763
|
title: "Something went wrong",
|
|
764
|
-
message: `Cannot process order: ${
|
|
764
|
+
message: `Cannot process order: ${gt(I)}`,
|
|
765
765
|
type: "error"
|
|
766
766
|
});
|
|
767
767
|
return;
|
|
@@ -773,26 +773,26 @@ function Ja(f, r) {
|
|
|
773
773
|
title: V.title,
|
|
774
774
|
message: V.message,
|
|
775
775
|
primaryActions: V.primaryActions,
|
|
776
|
-
contentComponent:
|
|
776
|
+
contentComponent: Gt,
|
|
777
777
|
contentComponentProps: {
|
|
778
778
|
message: V.message,
|
|
779
|
-
onChange: (
|
|
779
|
+
onChange: (we) => Re = we
|
|
780
780
|
}
|
|
781
781
|
}).onPrimary(() => {
|
|
782
|
-
const
|
|
783
|
-
|
|
782
|
+
const we = [];
|
|
783
|
+
we.push({
|
|
784
784
|
action: "rejectDraft",
|
|
785
785
|
payload: {
|
|
786
786
|
rejectReason: Re
|
|
787
787
|
}
|
|
788
|
-
}), Q(F, I, g, ee,
|
|
788
|
+
}), Q(F, I, g, ee, we);
|
|
789
789
|
});
|
|
790
790
|
return;
|
|
791
791
|
}
|
|
792
|
-
const H = [], ce =
|
|
792
|
+
const H = [], ce = Qt();
|
|
793
793
|
ce.init(F), I === q.enum.confirmDraft && H.push({
|
|
794
794
|
action: "confirmDraft",
|
|
795
|
-
payload: ce.controller.value.toConfirmDraftData(
|
|
795
|
+
payload: ce.controller.value.toConfirmDraftData(De())
|
|
796
796
|
}), s.open({
|
|
797
797
|
title: V.title,
|
|
798
798
|
message: V.message,
|
|
@@ -801,7 +801,7 @@ function Ja(f, r) {
|
|
|
801
801
|
Q(F, I, g, ee, H);
|
|
802
802
|
});
|
|
803
803
|
}
|
|
804
|
-
async function
|
|
804
|
+
async function he() {
|
|
805
805
|
s.open({
|
|
806
806
|
title: "Upload Transfer",
|
|
807
807
|
primaryActions: {
|
|
@@ -823,9 +823,9 @@ function Ja(f, r) {
|
|
|
823
823
|
});
|
|
824
824
|
}
|
|
825
825
|
return {
|
|
826
|
-
purchaseOrders:
|
|
827
|
-
shipments:
|
|
828
|
-
purchaseRequests:
|
|
826
|
+
purchaseOrders: x,
|
|
827
|
+
shipments: _,
|
|
828
|
+
purchaseRequests: U,
|
|
829
829
|
updateDateRange: $,
|
|
830
830
|
fetchData: P,
|
|
831
831
|
loading: t,
|
|
@@ -836,21 +836,21 @@ function Ja(f, r) {
|
|
|
836
836
|
promptShowTransferDetails: W,
|
|
837
837
|
submitAction: ye,
|
|
838
838
|
xilnexImportDialogProps: ft,
|
|
839
|
-
promptUploadTransferDialog:
|
|
839
|
+
promptUploadTransferDialog: he
|
|
840
840
|
};
|
|
841
841
|
}
|
|
842
|
-
function
|
|
843
|
-
const { po: r, currentLocation: s, business: l, fulfilling: c, por:
|
|
844
|
-
name:
|
|
845
|
-
legalName:
|
|
846
|
-
registrationNumber:
|
|
842
|
+
function ss(p) {
|
|
843
|
+
const { po: r, currentLocation: s, business: l, fulfilling: c, por: n } = p, { name: f, address: t, regNo: a, legalName: b } = s.doc.profile, y = {
|
|
844
|
+
name: f,
|
|
845
|
+
legalName: b,
|
|
846
|
+
registrationNumber: a,
|
|
847
847
|
line1: t == null ? void 0 : t.line1,
|
|
848
848
|
line2: t == null ? void 0 : t.line2,
|
|
849
849
|
postcode: t == null ? void 0 : t.postcode,
|
|
850
850
|
city: t == null ? void 0 : t.city,
|
|
851
851
|
state: t == null ? void 0 : t.state,
|
|
852
852
|
country: t == null ? void 0 : t.country
|
|
853
|
-
},
|
|
853
|
+
}, x = {
|
|
854
854
|
name: r.supplier.name,
|
|
855
855
|
phoneNumber: r.supplier.phoneNumber,
|
|
856
856
|
registrationNumber: r.supplier.registrationNumber,
|
|
@@ -860,9 +860,9 @@ function zr(f) {
|
|
|
860
860
|
city: r.supplier.address.city,
|
|
861
861
|
state: r.supplier.address.state,
|
|
862
862
|
country: r.supplier.address.country
|
|
863
|
-
},
|
|
863
|
+
}, _ = r.items.map((N) => {
|
|
864
864
|
const { sku: P, measurement: $ } = N, S = be(
|
|
865
|
-
|
|
865
|
+
Ht(N.sku, r.deliveryOrder || []),
|
|
866
866
|
!1
|
|
867
867
|
);
|
|
868
868
|
return {
|
|
@@ -875,7 +875,7 @@ function zr(f) {
|
|
|
875
875
|
value: N.totalCost
|
|
876
876
|
})}` : void 0
|
|
877
877
|
};
|
|
878
|
-
}),
|
|
878
|
+
}), C = r.deliveryOrder.map((N) => ({
|
|
879
879
|
createdAt: _t(new Date(N.createdAt)),
|
|
880
880
|
ref: N.deliveryOrderNumber,
|
|
881
881
|
remark: N.remark || "",
|
|
@@ -888,19 +888,19 @@ function zr(f) {
|
|
|
888
888
|
unit: (($ = P.measurement) == null ? void 0 : $.abbrev) || P.sku.unit.abbrev
|
|
889
889
|
};
|
|
890
890
|
})
|
|
891
|
-
})),
|
|
891
|
+
})), h = [
|
|
892
892
|
// Production
|
|
893
893
|
"67ca5d2c80bd0e001c5bf5bc",
|
|
894
894
|
// Dev
|
|
895
895
|
"6880b36a3054c5001db19218"
|
|
896
896
|
];
|
|
897
|
-
let
|
|
898
|
-
if (r.supplier.internal ? (
|
|
899
|
-
const N =
|
|
900
|
-
s.dbName === N || (
|
|
897
|
+
let U = "Inventory Receive Note";
|
|
898
|
+
if (r.supplier.internal ? (U = "Inventory Transfer Note", h.includes((l == null ? void 0 : l._id) || "") && (U = "Stock Request")) : U = "Purchase Order", n) {
|
|
899
|
+
const N = n.from.dbName;
|
|
900
|
+
s.dbName === N || (U = "Inventory Receive Note");
|
|
901
901
|
}
|
|
902
902
|
const j = {
|
|
903
|
-
title:
|
|
903
|
+
title: U,
|
|
904
904
|
businessName: l == null ? void 0 : l.name,
|
|
905
905
|
logo: l == null ? void 0 : l.thumbnail,
|
|
906
906
|
orderNumber: r.seqNumber.toString(),
|
|
@@ -908,13 +908,13 @@ function zr(f) {
|
|
|
908
908
|
ref: r.ref || "",
|
|
909
909
|
remark: r.remark || "",
|
|
910
910
|
buyer: y,
|
|
911
|
-
supplier:
|
|
912
|
-
items:
|
|
911
|
+
supplier: x,
|
|
912
|
+
items: _,
|
|
913
913
|
status: r.status,
|
|
914
|
-
deliveryOrders:
|
|
914
|
+
deliveryOrders: C
|
|
915
915
|
}, O = new URL(window.location.href), k = c && (r.deliveryFullfillment || []).length > 0 ? "receive-request/delivery-print-preview" : "receive-request/print-preview";
|
|
916
916
|
O.pathname = O.hostname.includes("portal.feedme") ? `/inventory/${k}` : `/${k}`;
|
|
917
|
-
const Y =
|
|
917
|
+
const Y = kr.compressToEncodedURIComponent(JSON.stringify(j));
|
|
918
918
|
O.searchParams.append("data", Y), window.open(O.href, "_blank", "noreferrer");
|
|
919
919
|
}
|
|
920
920
|
const Ie = {
|
|
@@ -979,11 +979,11 @@ const Ie = {
|
|
|
979
979
|
value: q.enum.returnStock
|
|
980
980
|
}
|
|
981
981
|
};
|
|
982
|
-
function
|
|
983
|
-
const
|
|
982
|
+
function Jt() {
|
|
983
|
+
const p = Ve();
|
|
984
984
|
return {
|
|
985
985
|
ableToMarkReceived(r) {
|
|
986
|
-
if (!r || r.status !== ae.enum.RECEIVING ||
|
|
986
|
+
if (!r || r.status !== ae.enum.RECEIVING || p.useOperatePurchaseOrderV2) return !1;
|
|
987
987
|
const l = Te().currentLocationDBName;
|
|
988
988
|
return `${r.supplier.internal}_${r.supplier._id}` !== l;
|
|
989
989
|
},
|
|
@@ -991,25 +991,25 @@ function Lt() {
|
|
|
991
991
|
return !(!r || (r == null ? void 0 : r.status) !== ae.enum.REQUESTING);
|
|
992
992
|
},
|
|
993
993
|
ableToCreateFulfillment(r, s) {
|
|
994
|
-
var
|
|
995
|
-
if (!
|
|
994
|
+
var n, f;
|
|
995
|
+
if (!p.acceptRequireFulfillment || !r || !s || r.status !== ae.enum.PROCESSING || !s.processedAt)
|
|
996
996
|
return !1;
|
|
997
|
-
const l = (
|
|
997
|
+
const l = (n = s == null ? void 0 : s.from) == null ? void 0 : n.dbName, c = (f = s == null ? void 0 : s.to) == null ? void 0 : f.dbName;
|
|
998
998
|
return !(l.startsWith("restaurant_") && c.startsWith("restaurant_"));
|
|
999
999
|
}
|
|
1000
1000
|
};
|
|
1001
1001
|
}
|
|
1002
|
-
function
|
|
1003
|
-
const
|
|
1004
|
-
return Ke(() =>
|
|
1002
|
+
function Xt() {
|
|
1003
|
+
const p = ct(), r = G(!1);
|
|
1004
|
+
return Ke(() => p.sessionUser.value, async () => {
|
|
1005
1005
|
try {
|
|
1006
|
-
const l = await
|
|
1007
|
-
sessionUser:
|
|
1006
|
+
const l = await Rr({
|
|
1007
|
+
sessionUser: p.sessionUser.value,
|
|
1008
1008
|
validationManifest: {
|
|
1009
1009
|
requiredCaslPermissions: [
|
|
1010
1010
|
{
|
|
1011
|
-
action:
|
|
1012
|
-
subject:
|
|
1011
|
+
action: qt.Action.manage,
|
|
1012
|
+
subject: qt.Subject.Business.orderDraft
|
|
1013
1013
|
}
|
|
1014
1014
|
]
|
|
1015
1015
|
}
|
|
@@ -1019,14 +1019,14 @@ function Mt() {
|
|
|
1019
1019
|
console.error("Permission validation failed:", l), r.value = !1;
|
|
1020
1020
|
}
|
|
1021
1021
|
}, { immediate: !0 }), {
|
|
1022
|
-
hasOrderDraftPermission:
|
|
1022
|
+
hasOrderDraftPermission: lr(r)
|
|
1023
1023
|
};
|
|
1024
1024
|
}
|
|
1025
|
-
function
|
|
1026
|
-
const l = Te(), c = ut(),
|
|
1027
|
-
() =>
|
|
1025
|
+
function xl(p, r, s) {
|
|
1026
|
+
const l = Te(), c = ut(), n = ct(), f = Jt(), { t } = it(), { hasOrderDraftPermission: a } = Xt(), b = Ve(), y = Z(
|
|
1027
|
+
() => b.enablePrintTemplate ? [xe[ue.PrintCustom]] : []
|
|
1028
1028
|
);
|
|
1029
|
-
function
|
|
1029
|
+
function x(N) {
|
|
1030
1030
|
switch (N.status) {
|
|
1031
1031
|
case "DRAFT":
|
|
1032
1032
|
return [
|
|
@@ -1037,21 +1037,21 @@ function Xa(f, r, s) {
|
|
|
1037
1037
|
];
|
|
1038
1038
|
case "RECEIVING":
|
|
1039
1039
|
return [
|
|
1040
|
-
...
|
|
1040
|
+
...f.ableToMarkReceived(N) ? [Ie[q.enum.completeReceive]] : [],
|
|
1041
1041
|
xe[ue.Details],
|
|
1042
1042
|
xe[ue.Print],
|
|
1043
1043
|
...y.value
|
|
1044
1044
|
];
|
|
1045
1045
|
case "PENDING_APPROVAL": {
|
|
1046
1046
|
const $ = [xe[ue.Details]];
|
|
1047
|
-
return
|
|
1047
|
+
return a.value && $.push(
|
|
1048
1048
|
xe[ue.Update],
|
|
1049
1049
|
Ie[q.enum.approveDraft],
|
|
1050
1050
|
Ie[q.enum.rejectDraft]
|
|
1051
1051
|
), $;
|
|
1052
1052
|
}
|
|
1053
1053
|
case "REQUESTING":
|
|
1054
|
-
return
|
|
1054
|
+
return p === "receive/request" ? [
|
|
1055
1055
|
xe[ue.Details],
|
|
1056
1056
|
xe[ue.Print],
|
|
1057
1057
|
...y.value
|
|
@@ -1077,12 +1077,12 @@ function Xa(f, r, s) {
|
|
|
1077
1077
|
];
|
|
1078
1078
|
}
|
|
1079
1079
|
}
|
|
1080
|
-
function
|
|
1080
|
+
function _(N) {
|
|
1081
1081
|
return Object.values(q.enum).includes(N);
|
|
1082
1082
|
}
|
|
1083
|
-
async function
|
|
1084
|
-
var T, W, Q, ye,
|
|
1085
|
-
const S =
|
|
1083
|
+
async function C(N, P, $) {
|
|
1084
|
+
var T, W, Q, ye, he, F;
|
|
1085
|
+
const S = Bt(P);
|
|
1086
1086
|
if (N === ue.Print || N === ue.PrintCustom) {
|
|
1087
1087
|
const I = ($ == null ? void 0 : $.toInventoryLocation) ?? l.currentLocation;
|
|
1088
1088
|
if (I.type === "restaurant") {
|
|
@@ -1093,15 +1093,15 @@ function Xa(f, r, s) {
|
|
|
1093
1093
|
const ee = {
|
|
1094
1094
|
po: S,
|
|
1095
1095
|
currentLocation: I,
|
|
1096
|
-
business:
|
|
1097
|
-
fulfilling:
|
|
1096
|
+
business: n.currentBusiness.value,
|
|
1097
|
+
fulfilling: p === "approval",
|
|
1098
1098
|
por: $
|
|
1099
1099
|
};
|
|
1100
1100
|
if (N === ue.PrintCustom) {
|
|
1101
|
-
const w =
|
|
1101
|
+
const w = Hr(ee);
|
|
1102
1102
|
w && (O.value = w.html, k.value = w.templateName, Y.value = w.isDefault, j.value = !0);
|
|
1103
1103
|
} else
|
|
1104
|
-
|
|
1104
|
+
ss(ee);
|
|
1105
1105
|
return;
|
|
1106
1106
|
}
|
|
1107
1107
|
if (N === ue.Details) {
|
|
@@ -1109,15 +1109,15 @@ function Xa(f, r, s) {
|
|
|
1109
1109
|
return;
|
|
1110
1110
|
}
|
|
1111
1111
|
if (N === ue.Update) {
|
|
1112
|
-
(
|
|
1112
|
+
(he = r.promptUpdateTransferDialog) == null || he.call(r, S);
|
|
1113
1113
|
return;
|
|
1114
1114
|
}
|
|
1115
|
-
if (
|
|
1115
|
+
if (_(N)) {
|
|
1116
1116
|
r.submitAction(P, N, (F = $ == null ? void 0 : $.to) == null ? void 0 : F.dbName);
|
|
1117
1117
|
return;
|
|
1118
1118
|
}
|
|
1119
1119
|
}
|
|
1120
|
-
function
|
|
1120
|
+
function h() {
|
|
1121
1121
|
var P;
|
|
1122
1122
|
const N = [
|
|
1123
1123
|
{
|
|
@@ -1152,7 +1152,7 @@ function Xa(f, r, s) {
|
|
|
1152
1152
|
"div",
|
|
1153
1153
|
{ class: "py-3" },
|
|
1154
1154
|
z(
|
|
1155
|
-
|
|
1155
|
+
ze,
|
|
1156
1156
|
z(
|
|
1157
1157
|
"div",
|
|
1158
1158
|
{
|
|
@@ -1175,10 +1175,10 @@ function Xa(f, r, s) {
|
|
|
1175
1175
|
enableSorting: !1,
|
|
1176
1176
|
size: "auto"
|
|
1177
1177
|
},
|
|
1178
|
-
...(P =
|
|
1178
|
+
...(P = n.sessionUser.value) != null && P.role.isAdmin ? [
|
|
1179
1179
|
{
|
|
1180
1180
|
id: "statusForAdmin",
|
|
1181
|
-
header: () => z(
|
|
1181
|
+
header: () => z(ze, {}, () => `${t("inventory.transfer.table.status")}`),
|
|
1182
1182
|
cell($) {
|
|
1183
1183
|
return $.row.original.status;
|
|
1184
1184
|
},
|
|
@@ -1191,8 +1191,8 @@ function Xa(f, r, s) {
|
|
|
1191
1191
|
header: () => t("inventory.transfer.table.status"),
|
|
1192
1192
|
cell($) {
|
|
1193
1193
|
const S = $.getValue(), T = at($.row.original), { partial: W, over: Q } = vt(T), ye = bt(S ?? "", W, Q);
|
|
1194
|
-
let
|
|
1195
|
-
ye === ae.enum.CLOSE && (
|
|
1194
|
+
let he = t(`inventory.transfer.status.${ye}`), F = `${S ?? ""}`.toLocaleLowerCase("en-us");
|
|
1195
|
+
ye === ae.enum.CLOSE && (he = `${t(`inventory.transfer.status.${ae.enum.COMPLETE}`)}`), ye === "PARTIAL_RECEIVED" && F === ae.enum.PROCESSING.toLocaleLowerCase("en-us") && (F = ae.enum.RECEIVING.toLocaleLowerCase("en-us"));
|
|
1196
1196
|
let I = null;
|
|
1197
1197
|
const ee = s.value.find((w) => w.ref === $.row.original._id);
|
|
1198
1198
|
if (ee != null && ee.milestones && ee.milestones.length > 0) {
|
|
@@ -1220,7 +1220,7 @@ function Xa(f, r, s) {
|
|
|
1220
1220
|
Q && "fm-status-badge-error"
|
|
1221
1221
|
].filter(Boolean).join(" ")
|
|
1222
1222
|
},
|
|
1223
|
-
`${
|
|
1223
|
+
`${he}`
|
|
1224
1224
|
)
|
|
1225
1225
|
),
|
|
1226
1226
|
...I ? [
|
|
@@ -1252,8 +1252,8 @@ function Xa(f, r, s) {
|
|
|
1252
1252
|
{
|
|
1253
1253
|
id: "action",
|
|
1254
1254
|
cell($) {
|
|
1255
|
-
const S = $.row.original, T =
|
|
1256
|
-
return
|
|
1255
|
+
const S = $.row.original, T = x(S);
|
|
1256
|
+
return Ft(T, (W) => C(W, S));
|
|
1257
1257
|
},
|
|
1258
1258
|
enableSorting: !1,
|
|
1259
1259
|
size: 40,
|
|
@@ -1307,7 +1307,7 @@ function Xa(f, r, s) {
|
|
|
1307
1307
|
}
|
|
1308
1308
|
return N;
|
|
1309
1309
|
}
|
|
1310
|
-
function
|
|
1310
|
+
function U() {
|
|
1311
1311
|
var P;
|
|
1312
1312
|
const N = [
|
|
1313
1313
|
{
|
|
@@ -1342,10 +1342,10 @@ function Xa(f, r, s) {
|
|
|
1342
1342
|
enableSorting: !1,
|
|
1343
1343
|
size: "auto"
|
|
1344
1344
|
},
|
|
1345
|
-
...(P =
|
|
1345
|
+
...(P = n.sessionUser.value) != null && P.role.isAdmin ? [
|
|
1346
1346
|
{
|
|
1347
1347
|
id: "statusForAdmin",
|
|
1348
|
-
header: () => z(
|
|
1348
|
+
header: () => z(ze, {}, () => `${t("inventory.transfer.table.status")}`),
|
|
1349
1349
|
cell($) {
|
|
1350
1350
|
return $.row.original.status;
|
|
1351
1351
|
},
|
|
@@ -1363,9 +1363,9 @@ function Xa(f, r, s) {
|
|
|
1363
1363
|
label: "N/A",
|
|
1364
1364
|
compact: !0
|
|
1365
1365
|
});
|
|
1366
|
-
const W = at(S.purchaseOrder), { partial: Q, over: ye } = vt(W),
|
|
1367
|
-
let F = t(`inventory.transfer.status.${
|
|
1368
|
-
return
|
|
1366
|
+
const W = at(S.purchaseOrder), { partial: Q, over: ye } = vt(W), he = bt(T ?? "", Q, ye);
|
|
1367
|
+
let F = t(`inventory.transfer.status.${he}`), I = `${T ?? ""}`.toLocaleLowerCase("en-us");
|
|
1368
|
+
return he === ae.enum.CLOSE && (F = `${t(`inventory.transfer.status.${ae.enum.COMPLETE}`)}`), he === "PARTIAL_RECEIVED" && I === ae.enum.PROCESSING.toLocaleLowerCase("en-us") && (I = ae.enum.RECEIVING.toLocaleLowerCase("en-us")), S.rejectedAt && (F = t("inventory.transfer.status.REJECT"), I = ae.enum.REJECT.toLocaleLowerCase("en-us")), z(
|
|
1369
1369
|
"div",
|
|
1370
1370
|
{
|
|
1371
1371
|
class: "flex"
|
|
@@ -1388,13 +1388,13 @@ function Xa(f, r, s) {
|
|
|
1388
1388
|
{
|
|
1389
1389
|
id: "action",
|
|
1390
1390
|
cell($) {
|
|
1391
|
-
const S = $.row.original, W = (S.purchaseOrder ?
|
|
1391
|
+
const S = $.row.original, W = (S.purchaseOrder ? x(S.purchaseOrder) : []).map((Q) => Q.value === ue.Print ? {
|
|
1392
1392
|
...Q,
|
|
1393
1393
|
translationKey: "inventory.transfer.receiveRequest.details.printDeliveryOrder"
|
|
1394
1394
|
} : Q);
|
|
1395
|
-
return
|
|
1395
|
+
return Ft(
|
|
1396
1396
|
W,
|
|
1397
|
-
(Q) => S.purchaseOrder ?
|
|
1397
|
+
(Q) => S.purchaseOrder ? C(Q, S.purchaseOrder, S) : void 0
|
|
1398
1398
|
);
|
|
1399
1399
|
},
|
|
1400
1400
|
enableSorting: !1,
|
|
@@ -1449,7 +1449,7 @@ function Xa(f, r, s) {
|
|
|
1449
1449
|
}
|
|
1450
1450
|
return N;
|
|
1451
1451
|
}
|
|
1452
|
-
const R = Z(() =>
|
|
1452
|
+
const R = Z(() => p === "receive/request" ? h() : U()), j = G(!1), O = G(""), k = G(""), Y = G(!1);
|
|
1453
1453
|
return {
|
|
1454
1454
|
columnDefs: R,
|
|
1455
1455
|
showCustomPrintDialog: j,
|
|
@@ -1458,20 +1458,20 @@ function Xa(f, r, s) {
|
|
|
1458
1458
|
customPrintIsDefault: Y
|
|
1459
1459
|
};
|
|
1460
1460
|
}
|
|
1461
|
-
const
|
|
1461
|
+
const os = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg p-16" }, ns = { class: "flex flex-col gap-8" }, as = { class: "flex w-full justify-end gap-16" }, ls = /* @__PURE__ */ Oe({
|
|
1462
1462
|
__name: "FulfillmentForm",
|
|
1463
1463
|
props: {
|
|
1464
1464
|
purchaseOrder: {},
|
|
1465
1465
|
confirm: { type: Function }
|
|
1466
1466
|
},
|
|
1467
1467
|
emits: ["update:show"],
|
|
1468
|
-
setup(
|
|
1469
|
-
const s =
|
|
1468
|
+
setup(p, { emit: r }) {
|
|
1469
|
+
const s = p, l = ir({
|
|
1470
1470
|
id: "",
|
|
1471
1471
|
createdAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
1472
1472
|
items: []
|
|
1473
|
-
}), c = G(),
|
|
1474
|
-
|
|
1473
|
+
}), c = G(), n = r;
|
|
1474
|
+
jt(() => {
|
|
1475
1475
|
s.purchaseOrder && (l.items = s.purchaseOrder.items.map((t) => ({
|
|
1476
1476
|
id: t.id,
|
|
1477
1477
|
sku: t.sku,
|
|
@@ -1479,30 +1479,30 @@ const Kr = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
1479
1479
|
amount: t.quantity ?? { amount: 1, precision: 0 }
|
|
1480
1480
|
})));
|
|
1481
1481
|
});
|
|
1482
|
-
const
|
|
1483
|
-
return (t,
|
|
1484
|
-
const
|
|
1485
|
-
return i(), ie(
|
|
1482
|
+
const f = Z(() => l.items.length <= 10);
|
|
1483
|
+
return (t, a) => {
|
|
1484
|
+
const b = X("FmTable"), y = X("FmButton"), x = X("FmForm");
|
|
1485
|
+
return i(), ie(x, {
|
|
1486
1486
|
ref_key: "formRef",
|
|
1487
1487
|
ref: c,
|
|
1488
1488
|
class: "bg-white flex flex-col gap-32 rounded-3xl p-24 w-[800px]",
|
|
1489
1489
|
onValidationFailed: console.log,
|
|
1490
|
-
onValidationSuccess:
|
|
1490
|
+
onValidationSuccess: a[1] || (a[1] = () => s.confirm(l))
|
|
1491
1491
|
}, {
|
|
1492
1492
|
default: oe(() => [
|
|
1493
|
-
|
|
1494
|
-
e("div",
|
|
1495
|
-
e("div",
|
|
1496
|
-
L(
|
|
1493
|
+
a[2] || (a[2] = e("div", { class: "fm-typo-en-title-sm-600" }, "Confirm the transfer amount", -1)),
|
|
1494
|
+
e("div", os, [
|
|
1495
|
+
e("div", ns, [
|
|
1496
|
+
L(b, {
|
|
1497
1497
|
"column-defs": [
|
|
1498
1498
|
{
|
|
1499
1499
|
header: "Code",
|
|
1500
|
-
cell: (
|
|
1501
|
-
const
|
|
1500
|
+
cell: (_) => {
|
|
1501
|
+
const C = s.purchaseOrder.items.find((h) => h.id === _.row.original.id || h.sku._id === _.row.original.sku._id);
|
|
1502
1502
|
return z(
|
|
1503
|
-
|
|
1503
|
+
m(nt).FmTooltip,
|
|
1504
1504
|
{
|
|
1505
|
-
content:
|
|
1505
|
+
content: C.code,
|
|
1506
1506
|
placement: "top",
|
|
1507
1507
|
variant: "plain",
|
|
1508
1508
|
zIndex: 50
|
|
@@ -1512,19 +1512,19 @@ const Kr = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
1512
1512
|
{
|
|
1513
1513
|
class: "flex-auto line-clamp-2 text-ellipsis break-all"
|
|
1514
1514
|
},
|
|
1515
|
-
|
|
1515
|
+
C.code
|
|
1516
1516
|
)
|
|
1517
1517
|
);
|
|
1518
1518
|
}
|
|
1519
1519
|
},
|
|
1520
1520
|
{
|
|
1521
1521
|
header: "Name",
|
|
1522
|
-
cell: (
|
|
1523
|
-
const
|
|
1522
|
+
cell: (_) => {
|
|
1523
|
+
const C = s.purchaseOrder.items.find((h) => h.id === _.row.original.id || h.sku._id === _.row.original.sku._id);
|
|
1524
1524
|
return z(
|
|
1525
|
-
|
|
1525
|
+
m(nt).FmTooltip,
|
|
1526
1526
|
{
|
|
1527
|
-
content:
|
|
1527
|
+
content: C.name,
|
|
1528
1528
|
placement: "top",
|
|
1529
1529
|
variant: "plain",
|
|
1530
1530
|
zIndex: 50
|
|
@@ -1534,39 +1534,39 @@ const Kr = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
1534
1534
|
{
|
|
1535
1535
|
class: "flex-auto line-clamp-2 text-ellipsis break-all"
|
|
1536
1536
|
},
|
|
1537
|
-
|
|
1537
|
+
C.name
|
|
1538
1538
|
)
|
|
1539
1539
|
);
|
|
1540
1540
|
}
|
|
1541
1541
|
},
|
|
1542
1542
|
{
|
|
1543
1543
|
header: "Amount",
|
|
1544
|
-
cell: (
|
|
1545
|
-
const
|
|
1544
|
+
cell: (_) => {
|
|
1545
|
+
const C = _.row.original, h = s.purchaseOrder.items.find((R) => R.id === C.id || R.sku._id === C.sku._id), U = C.amount ?? {
|
|
1546
1546
|
amount: 1,
|
|
1547
1547
|
precision: 0
|
|
1548
1548
|
};
|
|
1549
|
-
return z(
|
|
1549
|
+
return z(qr, {
|
|
1550
1550
|
style: {
|
|
1551
1551
|
flex: "1 1 0%"
|
|
1552
1552
|
},
|
|
1553
1553
|
modelValue: {
|
|
1554
|
-
amount:
|
|
1555
|
-
measurement:
|
|
1554
|
+
amount: U,
|
|
1555
|
+
measurement: C.measurement ?? null
|
|
1556
1556
|
},
|
|
1557
|
-
key:
|
|
1558
|
-
unit:
|
|
1557
|
+
key: C.id ?? C.sku._id,
|
|
1558
|
+
unit: C.sku.unit,
|
|
1559
1559
|
"onUpdate:modelValue": (R) => {
|
|
1560
1560
|
if (!R) return;
|
|
1561
|
-
const j = l.items.find((O) => O.id ===
|
|
1561
|
+
const j = l.items.find((O) => O.id === C.id || O.sku._id === C.sku._id);
|
|
1562
1562
|
j && (j.amount = R.amount);
|
|
1563
1563
|
},
|
|
1564
1564
|
disableUnit: !0,
|
|
1565
1565
|
rules: [
|
|
1566
|
-
|
|
1567
|
-
+
|
|
1566
|
+
m(Er)(
|
|
1567
|
+
+m(be)({ amount: 0, precision: 0 })
|
|
1568
1568
|
),
|
|
1569
|
-
|
|
1569
|
+
m(Vr)(+m(be)(h.quantity))
|
|
1570
1570
|
],
|
|
1571
1571
|
applyDefaultRules: !0
|
|
1572
1572
|
});
|
|
@@ -1574,11 +1574,11 @@ const Kr = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
1574
1574
|
}
|
|
1575
1575
|
],
|
|
1576
1576
|
"row-data": l.items,
|
|
1577
|
-
"hide-footer":
|
|
1577
|
+
"hide-footer": f.value
|
|
1578
1578
|
}, null, 8, ["column-defs", "row-data", "hide-footer"])
|
|
1579
1579
|
])
|
|
1580
1580
|
]),
|
|
1581
|
-
e("div",
|
|
1581
|
+
e("div", as, [
|
|
1582
1582
|
L(y, {
|
|
1583
1583
|
class: "px-16",
|
|
1584
1584
|
label: "Confirm",
|
|
@@ -1591,7 +1591,7 @@ const Kr = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
1591
1591
|
label: "Cancel",
|
|
1592
1592
|
size: "md",
|
|
1593
1593
|
variant: "secondary",
|
|
1594
|
-
onClick:
|
|
1594
|
+
onClick: a[0] || (a[0] = () => n("update:show", !1))
|
|
1595
1595
|
})
|
|
1596
1596
|
])
|
|
1597
1597
|
]),
|
|
@@ -1603,67 +1603,67 @@ const Kr = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
1603
1603
|
submitRequest: {
|
|
1604
1604
|
translationKey: "inventory.transfer.receiveRequest.actions.submitRequest",
|
|
1605
1605
|
color: "primary",
|
|
1606
|
-
buttonVariant:
|
|
1606
|
+
buttonVariant: Ce.Primary
|
|
1607
1607
|
},
|
|
1608
1608
|
confirmDraft: {
|
|
1609
1609
|
translationKey: "inventory.transfer.receiveRequest.actions.confirmDraft",
|
|
1610
1610
|
color: "primary",
|
|
1611
|
-
buttonVariant:
|
|
1611
|
+
buttonVariant: Ce.Primary
|
|
1612
1612
|
},
|
|
1613
1613
|
cancelDraft: {
|
|
1614
1614
|
translationKey: "inventory.transfer.receiveRequest.actions.cancelDraft",
|
|
1615
1615
|
color: "system-error-300",
|
|
1616
|
-
buttonVariant:
|
|
1616
|
+
buttonVariant: Ce.Destructive
|
|
1617
1617
|
},
|
|
1618
1618
|
approveDraft: {
|
|
1619
1619
|
translationKey: "inventory.transfer.receiveRequest.actions.approveDraft",
|
|
1620
1620
|
color: "primary",
|
|
1621
|
-
buttonVariant:
|
|
1621
|
+
buttonVariant: Ce.Primary
|
|
1622
1622
|
},
|
|
1623
1623
|
rejectDraft: {
|
|
1624
1624
|
translationKey: "inventory.transfer.receiveRequest.actions.rejectDraft",
|
|
1625
1625
|
color: "system-error-300",
|
|
1626
|
-
buttonVariant:
|
|
1626
|
+
buttonVariant: Ce.Destructive
|
|
1627
1627
|
},
|
|
1628
1628
|
approveRequest: {
|
|
1629
1629
|
translationKey: "inventory.transfer.receiveRequest.actions.approveRequest",
|
|
1630
1630
|
color: "primary",
|
|
1631
|
-
buttonVariant:
|
|
1631
|
+
buttonVariant: Ce.Primary
|
|
1632
1632
|
},
|
|
1633
1633
|
processRequest: {
|
|
1634
1634
|
translationKey: "inventory.transfer.receiveRequest.actions.processRequest",
|
|
1635
1635
|
color: "primary",
|
|
1636
|
-
buttonVariant:
|
|
1636
|
+
buttonVariant: Ce.Primary
|
|
1637
1637
|
},
|
|
1638
1638
|
receiveStock: {
|
|
1639
1639
|
translationKey: "inventory.transfer.receiveRequest.actions.receiveStock",
|
|
1640
1640
|
color: "primary",
|
|
1641
|
-
buttonVariant:
|
|
1641
|
+
buttonVariant: Ce.Primary,
|
|
1642
1642
|
available: !1
|
|
1643
1643
|
},
|
|
1644
1644
|
completeReceive: {
|
|
1645
1645
|
translationKey: "inventory.transfer.receiveRequest.actions.completeReceive",
|
|
1646
1646
|
color: "primary",
|
|
1647
|
-
buttonVariant:
|
|
1647
|
+
buttonVariant: Ce.Plain
|
|
1648
1648
|
},
|
|
1649
1649
|
rejectRequest: {
|
|
1650
1650
|
translationKey: "inventory.transfer.receiveRequest.actions.rejectRequest",
|
|
1651
1651
|
color: "system-error-300",
|
|
1652
|
-
buttonVariant:
|
|
1652
|
+
buttonVariant: Ce.Destructive
|
|
1653
1653
|
},
|
|
1654
1654
|
closeRequest: {
|
|
1655
1655
|
translationKey: "inventory.transfer.receiveRequest.actions.closeRequest",
|
|
1656
1656
|
color: "system-error-300",
|
|
1657
|
-
buttonVariant:
|
|
1657
|
+
buttonVariant: Ce.Destructive,
|
|
1658
1658
|
available: !1
|
|
1659
1659
|
},
|
|
1660
1660
|
returnStock: {
|
|
1661
1661
|
translationKey: "inventory.transfer.receiveRequest.actions.returnStock",
|
|
1662
1662
|
color: "primary",
|
|
1663
|
-
buttonVariant:
|
|
1663
|
+
buttonVariant: Ce.Primary,
|
|
1664
1664
|
available: !1
|
|
1665
1665
|
}
|
|
1666
|
-
},
|
|
1666
|
+
}, is = { class: "flex flex-row-reverse" }, cs = /* @__PURE__ */ Oe({
|
|
1667
1667
|
__name: "NetSuiteSync",
|
|
1668
1668
|
props: {
|
|
1669
1669
|
poRequest: {},
|
|
@@ -1671,17 +1671,17 @@ const Kr = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
1671
1671
|
isTransferBetweenOutlets: { type: Boolean },
|
|
1672
1672
|
scope: {}
|
|
1673
1673
|
},
|
|
1674
|
-
setup(
|
|
1675
|
-
const r =
|
|
1674
|
+
setup(p) {
|
|
1675
|
+
const r = p, s = ut(), l = He(), c = dt(), n = G(!1);
|
|
1676
1676
|
Z(() => {
|
|
1677
|
-
var y,
|
|
1677
|
+
var y, x, _, C;
|
|
1678
1678
|
let t = !0;
|
|
1679
1679
|
s.isEnabled || (t = !1);
|
|
1680
|
-
const
|
|
1681
|
-
return
|
|
1680
|
+
const a = r.purchaseOrder, b = r.poRequest;
|
|
1681
|
+
return a && ((y = a == null ? void 0 : a.supplier) != null && y.internal ? (!b && a.status == ae.enum.DRAFT && (t = !1), b && !((x = b == null ? void 0 : b.netSuite) != null && x.id) && (t = !1), r.isTransferBetweenOutlets && (t = !1)) : ((a == null ? void 0 : a.status) !== ae.enum.REQUESTING && a.supplier.internal && (t = !1), !b && !((_ = a == null ? void 0 : a.netSuite) != null && _.id) && (t = !1), !b && ((C = a == null ? void 0 : a.netSuite) != null && C.id) && (a == null ? void 0 : a.status) == ae.enum.REQUESTING && (t = !1))), t;
|
|
1682
1682
|
});
|
|
1683
|
-
async function
|
|
1684
|
-
|
|
1683
|
+
async function f() {
|
|
1684
|
+
n.value || c.open({
|
|
1685
1685
|
title: "Sync with NetSuite",
|
|
1686
1686
|
contentComponent: z("div", [
|
|
1687
1687
|
z("p", "Are you sure you want to sync now?"),
|
|
@@ -1699,36 +1699,37 @@ const Kr = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
1699
1699
|
},
|
|
1700
1700
|
secondaryActions: { text: "Not now", close: !0 }
|
|
1701
1701
|
}).onPrimary(async () => {
|
|
1702
|
-
var t,
|
|
1702
|
+
var t, a, b, y, x, _, C;
|
|
1703
1703
|
try {
|
|
1704
|
-
|
|
1705
|
-
const
|
|
1706
|
-
await s.syncPurchaseOrder(
|
|
1707
|
-
|
|
1708
|
-
r.scope === "approval" ?
|
|
1709
|
-
|
|
1704
|
+
n.value = !0;
|
|
1705
|
+
const h = ((t = r.purchaseOrder) == null ? void 0 : t._id) || ((a = r.poRequest) == null ? void 0 : a.purchaseOrderId) || "", U = (b = r.poRequest) == null ? void 0 : b.to.dbName;
|
|
1706
|
+
await s.syncPurchaseOrder({
|
|
1707
|
+
purchaseOrderId: h,
|
|
1708
|
+
locationId: r.scope === "approval" ? U : void 0,
|
|
1709
|
+
netsuiteId: ((x = (y = r.purchaseOrder) == null ? void 0 : y.netSuite) == null ? void 0 : x.id) || ((C = (_ = r.poRequest) == null ? void 0 : _.netSuite) == null ? void 0 : C.id)
|
|
1710
|
+
}), l.open({
|
|
1710
1711
|
title: "Sync with NetSuite",
|
|
1711
1712
|
message: "Requested to sync with NetSuite. Please wait a moment.",
|
|
1712
1713
|
type: "success"
|
|
1713
|
-
}), await new Promise((
|
|
1714
|
-
} catch {
|
|
1715
|
-
l.open({
|
|
1714
|
+
}), await new Promise((R) => setTimeout(R, 5e3)), n.value = !1;
|
|
1715
|
+
} catch (h) {
|
|
1716
|
+
console.log("Failed to sync with NetSuite", h), l.open({
|
|
1716
1717
|
title: "Error",
|
|
1717
1718
|
message: "Failed to sync with NetSuite",
|
|
1718
1719
|
type: "error"
|
|
1719
|
-
}),
|
|
1720
|
+
}), n.value = !1;
|
|
1720
1721
|
}
|
|
1721
1722
|
});
|
|
1722
1723
|
}
|
|
1723
|
-
return (t,
|
|
1724
|
-
const
|
|
1725
|
-
return i(),
|
|
1726
|
-
L(
|
|
1724
|
+
return (t, a) => {
|
|
1725
|
+
const b = X("FmButton");
|
|
1726
|
+
return i(), v("div", is, [
|
|
1727
|
+
L(b, {
|
|
1727
1728
|
"prepend-icon": "sync",
|
|
1728
1729
|
variant: "secondary",
|
|
1729
1730
|
label: "Sync",
|
|
1730
|
-
loading:
|
|
1731
|
-
onClick:
|
|
1731
|
+
loading: n.value,
|
|
1732
|
+
onClick: f,
|
|
1732
1733
|
"text-color": "primary",
|
|
1733
1734
|
"bg-color": "transparent",
|
|
1734
1735
|
"border-color": "primary"
|
|
@@ -1736,22 +1737,22 @@ const Kr = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
1736
1737
|
]);
|
|
1737
1738
|
};
|
|
1738
1739
|
}
|
|
1739
|
-
}),
|
|
1740
|
+
}), us = {
|
|
1740
1741
|
key: 0,
|
|
1741
1742
|
class: "flex flex-col gap-8"
|
|
1742
|
-
},
|
|
1743
|
+
}, ds = { class: "flex flex-col gap-4" }, ms = { class: "fm-typo-en-body-lg-600" }, ps = {
|
|
1743
1744
|
key: 0,
|
|
1744
1745
|
class: "flex flex-col gap-4"
|
|
1745
|
-
},
|
|
1746
|
+
}, fs = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ys = { class: "fm-typo-en-body-lg-600" }, vs = { key: 0 }, bs = { key: 1 }, hs = {
|
|
1746
1747
|
key: 1,
|
|
1747
1748
|
class: "flex flex-col gap-4"
|
|
1748
|
-
},
|
|
1749
|
+
}, gs = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, _s = { class: "fm-typo-en-body-lg-600" }, xs = { key: 0 }, Ss = { key: 1 }, Os = {
|
|
1749
1750
|
key: 2,
|
|
1750
1751
|
class: "flex flex-col gap-4"
|
|
1751
|
-
},
|
|
1752
|
+
}, ws = { class: "fm-typo-en-body-lg-600" }, Cs = {
|
|
1752
1753
|
key: 3,
|
|
1753
1754
|
class: "flex flex-col gap-4"
|
|
1754
|
-
},
|
|
1755
|
+
}, Ds = { class: "fm-typo-en-body-lg-600" }, $s = /* @__PURE__ */ Oe({
|
|
1755
1756
|
__name: "NetSuiteInfo",
|
|
1756
1757
|
props: {
|
|
1757
1758
|
transferType: {},
|
|
@@ -1761,100 +1762,100 @@ const Kr = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
1761
1762
|
isTransferBetweenOutlets: { type: Boolean },
|
|
1762
1763
|
scope: {}
|
|
1763
1764
|
},
|
|
1764
|
-
setup(
|
|
1765
|
-
const r =
|
|
1766
|
-
|
|
1767
|
-
var
|
|
1768
|
-
if (!r.poRequest && ((
|
|
1769
|
-
const
|
|
1770
|
-
c.value =
|
|
1765
|
+
setup(p) {
|
|
1766
|
+
const r = p, s = ut(), l = We(), c = G(r.poRequest);
|
|
1767
|
+
jt(async () => {
|
|
1768
|
+
var a;
|
|
1769
|
+
if (!r.poRequest && ((a = r.purchaseOrder) != null && a._id)) {
|
|
1770
|
+
const b = await l.getLatestPurchaseOrderRequest(r.purchaseOrder._id);
|
|
1771
|
+
c.value = b;
|
|
1771
1772
|
}
|
|
1772
1773
|
});
|
|
1773
|
-
const
|
|
1774
|
+
const n = Z(
|
|
1774
1775
|
() => {
|
|
1775
|
-
var
|
|
1776
|
+
var a, b, y, x, _, C;
|
|
1776
1777
|
return s.getSubsidiaryFullName(
|
|
1777
|
-
((y = (
|
|
1778
|
+
((y = (b = (a = r.purchaseOrder) == null ? void 0 : a.netSuite) == null ? void 0 : b.subsidiary) == null ? void 0 : y.id) || ((C = (_ = (x = r.poRequest) == null ? void 0 : x.netSuite) == null ? void 0 : _.subsidiary) == null ? void 0 : C.id)
|
|
1778
1779
|
).fullName;
|
|
1779
1780
|
}
|
|
1780
|
-
),
|
|
1781
|
-
var
|
|
1782
|
-
return (y = (
|
|
1781
|
+
), f = Z(() => {
|
|
1782
|
+
var a, b, y, x, _, C, h, U, R, j, O, k;
|
|
1783
|
+
return (y = (b = (a = r.purchaseOrder) == null ? void 0 : a.netSuite) == null ? void 0 : b.additionalInfo) != null && y.transactionnumber ? (C = (_ = (x = r.purchaseOrder) == null ? void 0 : x.netSuite) == null ? void 0 : _.additionalInfo) == null ? void 0 : C.transactionnumber : (R = (U = (h = c.value) == null ? void 0 : h.netSuite) == null ? void 0 : U.additionalInfo) != null && R.transactionnumber ? (k = (O = (j = c.value) == null ? void 0 : j.netSuite) == null ? void 0 : O.additionalInfo) == null ? void 0 : k.transactionnumber : null;
|
|
1783
1784
|
}), t = Z(() => {
|
|
1784
|
-
var
|
|
1785
|
-
return (
|
|
1786
|
-
var
|
|
1787
|
-
return (
|
|
1785
|
+
var a, b, y, x, _, C;
|
|
1786
|
+
return (b = (a = r.purchaseOrder) == null ? void 0 : a.deliveryFullfillment) != null && b.length && ((x = (y = r.purchaseOrder) == null ? void 0 : y.deliveryFullfillment) == null ? void 0 : x.length) > 0 ? (C = (_ = r.purchaseOrder) == null ? void 0 : _.deliveryFullfillment) == null ? void 0 : C.map((h) => {
|
|
1787
|
+
var U;
|
|
1788
|
+
return (U = h.netSuite) == null ? void 0 : U.refNo;
|
|
1788
1789
|
}).join(", ") : "N/A";
|
|
1789
1790
|
});
|
|
1790
|
-
return (
|
|
1791
|
-
var y,
|
|
1792
|
-
return
|
|
1793
|
-
e("div",
|
|
1794
|
-
|
|
1795
|
-
e("div",
|
|
1791
|
+
return (a, b) => {
|
|
1792
|
+
var y, x, _, C, h, U, R, j, O, k, Y, N, P, $, S, T;
|
|
1793
|
+
return m(s).isEnabled ? (i(), v("div", us, [
|
|
1794
|
+
e("div", ds, [
|
|
1795
|
+
b[0] || (b[0] = e("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, "NetSuite subsidiary", -1)),
|
|
1796
|
+
e("div", ms, d(n.value || "N/A"), 1)
|
|
1796
1797
|
]),
|
|
1797
|
-
!
|
|
1798
|
-
e("div",
|
|
1799
|
-
e("div",
|
|
1800
|
-
(
|
|
1798
|
+
!a.isTransferBetweenOutlets && a.scope === m(ht).RECEIVE_REQUEST ? (i(), v("div", ps, [
|
|
1799
|
+
e("div", fs, " NetSuite " + d((x = (y = a.purchaseOrder) == null ? void 0 : y.netSuite) != null && x.recordType ? m(zt)((C = (_ = a.purchaseOrder) == null ? void 0 : _.netSuite) == null ? void 0 : C.recordType) : a.transferType === m(Ze).enum.purchase ? "Purchase Order" : "Transfer Order") + " (ID) ", 1),
|
|
1800
|
+
e("div", ys, [
|
|
1801
|
+
(U = (h = a.purchaseOrder) == null ? void 0 : h.netSuite) != null && U.id ? (i(), v("span", vs, d((j = (R = a.purchaseOrder) == null ? void 0 : R.netSuite) == null ? void 0 : j.refNo) + " (" + d((k = (O = a.purchaseOrder) == null ? void 0 : O.netSuite) == null ? void 0 : k.id) + ") ", 1)) : (i(), v("span", bs, "N/A"))
|
|
1801
1802
|
])
|
|
1802
|
-
])) :
|
|
1803
|
-
!
|
|
1804
|
-
e("div",
|
|
1805
|
-
e("div",
|
|
1806
|
-
(N = (Y = c.value) == null ? void 0 : Y.netSuite) != null && N.id ? (i(),
|
|
1803
|
+
])) : M("", !0),
|
|
1804
|
+
!a.isTransferBetweenOutlets && c.value || a.scope === m(ht).APPROVAL ? (i(), v("div", hs, [
|
|
1805
|
+
e("div", gs, " (Request) NetSuite " + d(a.transferType === m(Ze).enum.purchase ? "Purchase Order" : "Transfer Order") + " (ID) ", 1),
|
|
1806
|
+
e("div", _s, [
|
|
1807
|
+
(N = (Y = c.value) == null ? void 0 : Y.netSuite) != null && N.id ? (i(), v("span", xs, d(($ = (P = c.value) == null ? void 0 : P.netSuite) == null ? void 0 : $.refNo) + " (" + d((T = (S = c.value) == null ? void 0 : S.netSuite) == null ? void 0 : T.id) + ") ", 1)) : (i(), v("span", Ss, "N/A"))
|
|
1807
1808
|
])
|
|
1808
|
-
])) :
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
e("div",
|
|
1812
|
-
])) :
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
e("div",
|
|
1816
|
-
])) :
|
|
1817
|
-
])) :
|
|
1809
|
+
])) : M("", !0),
|
|
1810
|
+
f.value ? (i(), v("div", Os, [
|
|
1811
|
+
b[1] || (b[1] = e("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " NetSuite Transaction Number ", -1)),
|
|
1812
|
+
e("div", ws, d(f.value), 1)
|
|
1813
|
+
])) : M("", !0),
|
|
1814
|
+
m(s).isEnabled && a.transferType === m(Ze).enum.transfer && !a.isTransferBetweenOutlets ? (i(), v("div", Cs, [
|
|
1815
|
+
b[2] || (b[2] = e("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " NetSuite fulfillment IDs ", -1)),
|
|
1816
|
+
e("div", Ds, d(t.value), 1)
|
|
1817
|
+
])) : M("", !0)
|
|
1818
|
+
])) : M("", !0);
|
|
1818
1819
|
};
|
|
1819
1820
|
}
|
|
1820
|
-
}),
|
|
1821
|
+
}), ks = { class: "flex flex-row-reverse" }, Rs = /* @__PURE__ */ Oe({
|
|
1821
1822
|
__name: "NetSuiteLog",
|
|
1822
1823
|
props: {
|
|
1823
1824
|
netsuiteId: {},
|
|
1824
1825
|
purchaseOrderId: {}
|
|
1825
1826
|
},
|
|
1826
|
-
setup(
|
|
1827
|
+
setup(p) {
|
|
1827
1828
|
const r = He(), s = xt();
|
|
1828
|
-
async function l(c,
|
|
1829
|
-
const
|
|
1830
|
-
if (c &&
|
|
1831
|
-
const y =
|
|
1832
|
-
|
|
1829
|
+
async function l(c, n) {
|
|
1830
|
+
const f = [];
|
|
1831
|
+
if (c && f.push(`body.message:*${c}*`), n) {
|
|
1832
|
+
const y = n.replace(/:/g, "\\:");
|
|
1833
|
+
f.push(`${y}`);
|
|
1833
1834
|
}
|
|
1834
|
-
if (
|
|
1835
|
+
if (f.length === 0) {
|
|
1835
1836
|
r.open({
|
|
1836
1837
|
message: "Cannot open logs without valid filters.",
|
|
1837
1838
|
type: "error"
|
|
1838
1839
|
});
|
|
1839
1840
|
return;
|
|
1840
1841
|
}
|
|
1841
|
-
const
|
|
1842
|
+
const a = `attributes.pod:netsuite* AND (${f.join(" OR ")})`, { url: b } = await s.getSyncLogs(a);
|
|
1842
1843
|
r.open(
|
|
1843
1844
|
{
|
|
1844
1845
|
message: "Opening NetSuite logs...",
|
|
1845
1846
|
type: "info"
|
|
1846
1847
|
},
|
|
1847
1848
|
800
|
|
1848
|
-
), await new Promise((y) => setTimeout(y, 800)), window.open(
|
|
1849
|
+
), await new Promise((y) => setTimeout(y, 800)), window.open(b, "_blank");
|
|
1849
1850
|
}
|
|
1850
|
-
return (c,
|
|
1851
|
-
const
|
|
1852
|
-
return i(),
|
|
1853
|
-
L(
|
|
1851
|
+
return (c, n) => {
|
|
1852
|
+
const f = X("FmButton");
|
|
1853
|
+
return i(), v("div", ks, [
|
|
1854
|
+
L(f, {
|
|
1854
1855
|
"prepend-icon": "history",
|
|
1855
1856
|
variant: "secondary",
|
|
1856
1857
|
label: "Logs",
|
|
1857
|
-
onClick:
|
|
1858
|
+
onClick: n[0] || (n[0] = (t) => l(c.netsuiteId, c.purchaseOrderId)),
|
|
1858
1859
|
"text-color": "primary",
|
|
1859
1860
|
"bg-color": "transparent",
|
|
1860
1861
|
"border-color": "primary"
|
|
@@ -1862,55 +1863,55 @@ const Kr = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
1862
1863
|
]);
|
|
1863
1864
|
};
|
|
1864
1865
|
}
|
|
1865
|
-
}),
|
|
1866
|
+
}), Ns = { class: "flex flex-row-reverse" }, As = { key: 0 }, Ps = { key: 1 }, Ts = { class: "mb-6" }, Fs = { class: "fm-typo-en-body-md-400" }, Is = { key: 0 }, qs = { key: 1 }, Es = {
|
|
1866
1867
|
key: 0,
|
|
1867
1868
|
class: "flex"
|
|
1868
|
-
},
|
|
1869
|
+
}, Vs = {
|
|
1869
1870
|
key: 1,
|
|
1870
1871
|
class: "border-t pt-6"
|
|
1871
|
-
},
|
|
1872
|
+
}, Ls = { class: "fm-typo-en-body-lg-600 mb-4 flex items-center gap-2" }, Ms = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg overflow-y-auto" }, Us = { class: "w-full" }, js = {
|
|
1872
1873
|
class: "p-3 fm-typo-en-body-sm-600",
|
|
1873
1874
|
style: { "min-width": "130px" }
|
|
1874
|
-
},
|
|
1875
|
+
}, Bs = { class: "p-3 fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, zs = { class: "p-3 fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, Ks = { class: "p-3 fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, Hs = { class: "p-3 fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, Ws = { class: "p-3 fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, Gs = { class: "p-3 fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, Ys = { class: "p-3 fm-typo-en-body-sm-600" }, Qs = { key: 2 }, Js = { key: 1 }, Xs = /* @__PURE__ */ Oe({
|
|
1875
1876
|
__name: "NetSuiteLatestInfo",
|
|
1876
1877
|
props: {
|
|
1877
1878
|
netsuiteId: {},
|
|
1878
1879
|
purchaseOrderId: {}
|
|
1879
1880
|
},
|
|
1880
|
-
setup(
|
|
1881
|
-
const r =
|
|
1882
|
-
async function
|
|
1883
|
-
if (!
|
|
1881
|
+
setup(p) {
|
|
1882
|
+
const r = p, s = xt(), l = G(!1), c = Te(), n = G(!0), f = G(!1), t = G(!1), a = G(!1), b = G(null), y = G([]);
|
|
1883
|
+
async function x() {
|
|
1884
|
+
if (!b.value) {
|
|
1884
1885
|
l.value = !0;
|
|
1885
1886
|
try {
|
|
1886
|
-
|
|
1887
|
-
const
|
|
1887
|
+
n.value = !0;
|
|
1888
|
+
const U = await s.getMoreInfo(
|
|
1888
1889
|
c.currentLocation.dbName,
|
|
1889
1890
|
r.purchaseOrderId
|
|
1890
1891
|
);
|
|
1891
|
-
|
|
1892
|
+
b.value = U, f.value = !1;
|
|
1892
1893
|
} catch {
|
|
1893
|
-
|
|
1894
|
+
f.value = !0;
|
|
1894
1895
|
} finally {
|
|
1895
|
-
|
|
1896
|
+
n.value = !1;
|
|
1896
1897
|
}
|
|
1897
|
-
await
|
|
1898
|
+
await _();
|
|
1898
1899
|
}
|
|
1899
1900
|
}
|
|
1900
|
-
async function
|
|
1901
|
+
async function _() {
|
|
1901
1902
|
if (!(y.value.length > 0))
|
|
1902
1903
|
try {
|
|
1903
1904
|
t.value = !0;
|
|
1904
|
-
const
|
|
1905
|
-
y.value =
|
|
1905
|
+
const U = await s.getChangeLogs(r.netsuiteId);
|
|
1906
|
+
y.value = U, a.value = !1;
|
|
1906
1907
|
} catch {
|
|
1907
|
-
|
|
1908
|
+
a.value = !0;
|
|
1908
1909
|
} finally {
|
|
1909
1910
|
t.value = !1;
|
|
1910
1911
|
}
|
|
1911
1912
|
}
|
|
1912
|
-
function
|
|
1913
|
-
switch (
|
|
1913
|
+
function C(U) {
|
|
1914
|
+
switch (U) {
|
|
1914
1915
|
case Ne.Create:
|
|
1915
1916
|
return "text-green-600 bg-green-100";
|
|
1916
1917
|
case Ne.Set:
|
|
@@ -1923,8 +1924,8 @@ const Kr = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
1923
1924
|
return "text-gray-600 bg-gray-100";
|
|
1924
1925
|
}
|
|
1925
1926
|
}
|
|
1926
|
-
function
|
|
1927
|
-
return new Date(
|
|
1927
|
+
function h(U) {
|
|
1928
|
+
return new Date(U).toLocaleDateString("en-US", {
|
|
1928
1929
|
year: "numeric",
|
|
1929
1930
|
month: "short",
|
|
1930
1931
|
day: "numeric",
|
|
@@ -1932,9 +1933,9 @@ const Kr = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
1932
1933
|
minute: "2-digit"
|
|
1933
1934
|
});
|
|
1934
1935
|
}
|
|
1935
|
-
return (
|
|
1936
|
+
return (U, R) => {
|
|
1936
1937
|
const j = X("FmButton"), O = X("FmLabel"), k = X("FmCircularProgress"), Y = X("FmIcon"), N = X("FmDialog");
|
|
1937
|
-
return i(),
|
|
1938
|
+
return i(), v("div", Ns, [
|
|
1938
1939
|
L(N, {
|
|
1939
1940
|
modelValue: l.value,
|
|
1940
1941
|
"onUpdate:modelValue": R[2] || (R[2] = (P) => l.value = P),
|
|
@@ -1946,7 +1947,7 @@ const Kr = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
1946
1947
|
"prepend-icon": "info",
|
|
1947
1948
|
variant: "secondary",
|
|
1948
1949
|
label: "Latest Info",
|
|
1949
|
-
onClick: R[0] || (R[0] = (P) =>
|
|
1950
|
+
onClick: R[0] || (R[0] = (P) => x()),
|
|
1950
1951
|
"text-color": "primary",
|
|
1951
1952
|
"bg-color": "transparent",
|
|
1952
1953
|
"border-color": "primary"
|
|
@@ -1956,39 +1957,39 @@ const Kr = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
1956
1957
|
e("div", null, "NetSuite latest info", -1)
|
|
1957
1958
|
])),
|
|
1958
1959
|
default: oe(() => [
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
e("div",
|
|
1960
|
+
n.value ? (i(), v("div", As, "Loading...")) : (i(), v("div", Ps, [
|
|
1961
|
+
f.value ? (i(), v("p", Js, "Something went wrong.")) : (i(), v(fe, { key: 0 }, [
|
|
1962
|
+
e("div", Ts, [
|
|
1962
1963
|
R[4] || (R[4] = e("h3", { class: "fm-typo-en-body-lg-600 mb-4" }, "NetSuite Order Details", -1)),
|
|
1963
|
-
(i(!0),
|
|
1964
|
+
(i(!0), v(fe, null, ke(b.value, (P, $) => (i(), v("div", {
|
|
1964
1965
|
key: $,
|
|
1965
1966
|
class: "mb-2"
|
|
1966
1967
|
}, [
|
|
1967
1968
|
e("div", null, [
|
|
1968
1969
|
L(O, {
|
|
1969
|
-
label:
|
|
1970
|
+
label: m(gt)($)
|
|
1970
1971
|
}, null, 8, ["label"]),
|
|
1971
|
-
e("div",
|
|
1972
|
-
Array.isArray(P) ? (i(),
|
|
1972
|
+
e("div", Fs, [
|
|
1973
|
+
Array.isArray(P) ? (i(), v("span", Is, d(P.length > 0 ? P.join(", ") : "N/A"), 1)) : (i(), v("span", qs, d(P), 1))
|
|
1973
1974
|
])
|
|
1974
1975
|
])
|
|
1975
1976
|
]))), 128))
|
|
1976
1977
|
]),
|
|
1977
|
-
t.value ? (i(),
|
|
1978
|
+
t.value ? (i(), v("div", Es, [
|
|
1978
1979
|
R[5] || (R[5] = e("span", null, "Change Log Loading...", -1)),
|
|
1979
1980
|
L(k, { size: "md" })
|
|
1980
|
-
])) :
|
|
1981
|
-
!t.value && y.value.length > 0 ? (i(),
|
|
1982
|
-
e("h3",
|
|
1981
|
+
])) : M("", !0),
|
|
1982
|
+
!t.value && y.value.length > 0 ? (i(), v("div", Vs, [
|
|
1983
|
+
e("h3", Ls, [
|
|
1983
1984
|
L(Y, {
|
|
1984
1985
|
name: "error",
|
|
1985
1986
|
color: "#ff9500",
|
|
1986
1987
|
size: "sm"
|
|
1987
1988
|
}),
|
|
1988
|
-
R[6] || (R[6] =
|
|
1989
|
+
R[6] || (R[6] = Ee(" Change Logs "))
|
|
1989
1990
|
]),
|
|
1990
|
-
e("div",
|
|
1991
|
-
e("table",
|
|
1991
|
+
e("div", Ms, [
|
|
1992
|
+
e("table", Us, [
|
|
1992
1993
|
R[7] || (R[7] = e("thead", { class: "bg-fm-color-neutral-gray-50" }, [
|
|
1993
1994
|
e("tr", { class: "border-b border-fm-color-neutral-gray-200" }, [
|
|
1994
1995
|
e("th", {
|
|
@@ -2006,26 +2007,26 @@ const Kr = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
2006
2007
|
])
|
|
2007
2008
|
], -1)),
|
|
2008
2009
|
e("tbody", null, [
|
|
2009
|
-
(i(!0),
|
|
2010
|
+
(i(!0), v(fe, null, ke(y.value, (P, $) => (i(), v("tr", {
|
|
2010
2011
|
key: $,
|
|
2011
2012
|
class: "border-b border-fm-color-neutral-gray-200 last:border-b-0"
|
|
2012
2013
|
}, [
|
|
2013
|
-
e("td",
|
|
2014
|
-
e("td",
|
|
2015
|
-
e("td",
|
|
2016
|
-
e("td",
|
|
2014
|
+
e("td", js, d(h(P._dateiso8601)), 1),
|
|
2015
|
+
e("td", Bs, d(P._rolename), 1),
|
|
2016
|
+
e("td", zs, d(P._employeename), 1),
|
|
2017
|
+
e("td", Ks, d(P._contextname), 1),
|
|
2017
2018
|
e("td", {
|
|
2018
|
-
class:
|
|
2019
|
-
},
|
|
2020
|
-
e("td",
|
|
2021
|
-
e("td",
|
|
2022
|
-
e("td",
|
|
2023
|
-
e("td",
|
|
2019
|
+
class: Pe(`p-3 fm-typo-en-body-sm-600 ${C(Number(P.type) - 1)}`)
|
|
2020
|
+
}, d(m(Ne)[Number(P.type) - 1]), 3),
|
|
2021
|
+
e("td", Hs, d(P.lineid || ""), 1),
|
|
2022
|
+
e("td", Ws, d(P._fieldname), 1),
|
|
2023
|
+
e("td", Gs, d(P.oldvalue || ""), 1),
|
|
2024
|
+
e("td", Ys, d(P.newvalue || ""), 1)
|
|
2024
2025
|
]))), 128))
|
|
2025
2026
|
])
|
|
2026
2027
|
])
|
|
2027
2028
|
])
|
|
2028
|
-
])) : (i(),
|
|
2029
|
+
])) : (i(), v("div", Qs, R[8] || (R[8] = [
|
|
2029
2030
|
e("p", null, "No change logs available.", -1)
|
|
2030
2031
|
])))
|
|
2031
2032
|
], 64))
|
|
@@ -2045,10 +2046,10 @@ const Kr = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
2045
2046
|
]);
|
|
2046
2047
|
};
|
|
2047
2048
|
}
|
|
2048
|
-
}),
|
|
2049
|
+
}), Zs = {
|
|
2049
2050
|
key: 0,
|
|
2050
2051
|
class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg p-16 flex flex-col gap-8"
|
|
2051
|
-
},
|
|
2052
|
+
}, eo = { class: "flex gap-8 items-center" }, to = { class: "ml-auto" }, ro = { class: "flex gap-3" }, so = /* @__PURE__ */ Oe({
|
|
2052
2053
|
__name: "NetSuitePanel",
|
|
2053
2054
|
props: {
|
|
2054
2055
|
poRequest: {},
|
|
@@ -2057,41 +2058,41 @@ const Kr = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
2057
2058
|
transferToDbName: {},
|
|
2058
2059
|
scope: {}
|
|
2059
2060
|
},
|
|
2060
|
-
setup(
|
|
2061
|
-
const r =
|
|
2062
|
-
return (c,
|
|
2063
|
-
var t,
|
|
2064
|
-
const
|
|
2065
|
-
return l.value ? (i(),
|
|
2066
|
-
e("div",
|
|
2067
|
-
|
|
2068
|
-
e("div",
|
|
2069
|
-
e("div",
|
|
2070
|
-
(
|
|
2061
|
+
setup(p) {
|
|
2062
|
+
const r = p, s = Mr(), l = Z(() => s.isNetSuiteEnabled);
|
|
2063
|
+
return (c, n) => {
|
|
2064
|
+
var t, a;
|
|
2065
|
+
const f = X("FmMenuDivider");
|
|
2066
|
+
return l.value ? (i(), v("div", Zs, [
|
|
2067
|
+
e("div", eo, [
|
|
2068
|
+
n[0] || (n[0] = e("span", { class: "flex-1 fm-typo-en-body-lg-600" }, "NetSuite Info", -1)),
|
|
2069
|
+
e("div", to, [
|
|
2070
|
+
e("div", ro, [
|
|
2071
|
+
(a = (t = r.purchaseOrder) == null ? void 0 : t.netSuite) != null && a.id ? (i(), ie(ze, { key: 0 }, {
|
|
2071
2072
|
default: oe(() => {
|
|
2072
|
-
var
|
|
2073
|
+
var b, y, x;
|
|
2073
2074
|
return [
|
|
2074
|
-
L(
|
|
2075
|
-
"netsuite-id": (y = (
|
|
2076
|
-
"purchase-order-id": (
|
|
2075
|
+
L(Xs, {
|
|
2076
|
+
"netsuite-id": (y = (b = c.purchaseOrder) == null ? void 0 : b.netSuite) == null ? void 0 : y.id,
|
|
2077
|
+
"purchase-order-id": (x = c.purchaseOrder) == null ? void 0 : x._id
|
|
2077
2078
|
}, null, 8, ["netsuite-id", "purchase-order-id"])
|
|
2078
2079
|
];
|
|
2079
2080
|
}),
|
|
2080
2081
|
_: 1
|
|
2081
|
-
})) :
|
|
2082
|
-
L(
|
|
2082
|
+
})) : M("", !0),
|
|
2083
|
+
L(ze, null, {
|
|
2083
2084
|
default: oe(() => {
|
|
2084
|
-
var
|
|
2085
|
+
var b, y, x;
|
|
2085
2086
|
return [
|
|
2086
|
-
L(
|
|
2087
|
-
"netsuite-id": (y = (
|
|
2088
|
-
"purchase-order-id": (
|
|
2087
|
+
L(Rs, {
|
|
2088
|
+
"netsuite-id": (y = (b = c.purchaseOrder) == null ? void 0 : b.netSuite) == null ? void 0 : y.id,
|
|
2089
|
+
"purchase-order-id": (x = c.purchaseOrder) == null ? void 0 : x._id
|
|
2089
2090
|
}, null, 8, ["netsuite-id", "purchase-order-id"])
|
|
2090
2091
|
];
|
|
2091
2092
|
}),
|
|
2092
2093
|
_: 1
|
|
2093
2094
|
}),
|
|
2094
|
-
L(
|
|
2095
|
+
L(cs, {
|
|
2095
2096
|
"po-request": c.poRequest,
|
|
2096
2097
|
"purchase-order": c.purchaseOrder,
|
|
2097
2098
|
"is-transfer-between-outlets": !l.value,
|
|
@@ -2100,8 +2101,8 @@ const Kr = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
2100
2101
|
])
|
|
2101
2102
|
])
|
|
2102
2103
|
]),
|
|
2103
|
-
L(
|
|
2104
|
-
L(
|
|
2104
|
+
L(f),
|
|
2105
|
+
L($s, {
|
|
2105
2106
|
"po-request": c.poRequest,
|
|
2106
2107
|
"purchase-order": c.purchaseOrder,
|
|
2107
2108
|
"transfer-type": c.transferType,
|
|
@@ -2109,35 +2110,66 @@ const Kr = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
2109
2110
|
"is-transfer-between-outlets": !l.value,
|
|
2110
2111
|
scope: c.scope
|
|
2111
2112
|
}, null, 8, ["po-request", "purchase-order", "transfer-type", "transfer-to-db-name", "is-transfer-between-outlets", "scope"])
|
|
2112
|
-
])) :
|
|
2113
|
+
])) : M("", !0);
|
|
2113
2114
|
};
|
|
2114
2115
|
}
|
|
2115
|
-
}),
|
|
2116
|
+
}), oo = ["open"], no = { class: "fm-typo-en-body-sm-600 cursor-pointer select-none" }, Ut = /* @__PURE__ */ Oe({
|
|
2117
|
+
__name: "FmAdminCollapsiblePanel",
|
|
2118
|
+
props: {
|
|
2119
|
+
title: { default: "Admin" },
|
|
2120
|
+
open: { type: Boolean, default: !1 },
|
|
2121
|
+
selectable: { type: Boolean, default: !0 },
|
|
2122
|
+
class: { default: void 0 },
|
|
2123
|
+
contentClass: { default: void 0 }
|
|
2124
|
+
},
|
|
2125
|
+
setup(p) {
|
|
2126
|
+
const r = p;
|
|
2127
|
+
return (s, l) => (i(), ie(ze, {
|
|
2128
|
+
selectable: r.selectable,
|
|
2129
|
+
class: Pe(r.class)
|
|
2130
|
+
}, {
|
|
2131
|
+
default: oe(() => [
|
|
2132
|
+
e("details", {
|
|
2133
|
+
open: r.open,
|
|
2134
|
+
class: "w-full"
|
|
2135
|
+
}, [
|
|
2136
|
+
e("summary", no, d(r.title), 1),
|
|
2137
|
+
e("div", {
|
|
2138
|
+
class: Pe(["mt-4 flex flex-col gap-2", r.contentClass])
|
|
2139
|
+
}, [
|
|
2140
|
+
cr(s.$slots, "default")
|
|
2141
|
+
], 2)
|
|
2142
|
+
], 8, oo)
|
|
2143
|
+
]),
|
|
2144
|
+
_: 3
|
|
2145
|
+
}, 8, ["selectable", "class"]));
|
|
2146
|
+
}
|
|
2147
|
+
}), ao = { class: "flex flex-col gap-3" }, lo = { class: "flex flex-col gap-4" }, io = { class: "flex flex-col gap-4 fm-typo-en-body-lg-600" }, co = { class: "flex flex-col gap-4" }, uo = { class: "flex justify-between items-center py-1 gap-4" }, mo = { class: "flex flex-col" }, po = { class: "fm-typo-en-body-lg-600" }, fo = { class: "fm-typo-en-body-md-400" }, yo = { class: "flex flex-col gap-2 items-end" }, vo = { class: "flex self-end fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, bo = {
|
|
2116
2148
|
key: 0,
|
|
2117
2149
|
class: "flex items-center gap-2"
|
|
2118
|
-
},
|
|
2150
|
+
}, ho = {
|
|
2119
2151
|
key: 0,
|
|
2120
2152
|
class: "border-b border-fm-color-stroke-secondary"
|
|
2121
|
-
},
|
|
2153
|
+
}, go = { class: "flex flex-col gap-4" }, _o = { class: "flex flex-col gap-4" }, xo = { class: "flex flex-col gap-4" }, So = { class: "flex flex-col gap-4 fm-typo-en-body-lg-600" }, Oo = {
|
|
2122
2154
|
key: 0,
|
|
2123
2155
|
class: "flex flex-col gap-4"
|
|
2124
|
-
},
|
|
2156
|
+
}, wo = { class: "flex flex-col gap-4 fm-typo-en-body-lg-600" }, Co = /* @__PURE__ */ Oe({
|
|
2125
2157
|
__name: "EditForm",
|
|
2126
2158
|
props: {
|
|
2127
2159
|
purchaseOrder: {},
|
|
2128
2160
|
deliveryOrder: {}
|
|
2129
2161
|
},
|
|
2130
2162
|
emits: ["submitted"],
|
|
2131
|
-
setup(
|
|
2132
|
-
|
|
2133
|
-
const s =
|
|
2163
|
+
setup(p, { emit: r }) {
|
|
2164
|
+
zr();
|
|
2165
|
+
const s = Ve(), l = He(), c = G(!1), n = p, f = r, t = Kt("deliveryOrder"), a = We(), b = Z(
|
|
2134
2166
|
() => {
|
|
2135
2167
|
var j;
|
|
2136
|
-
return ((j =
|
|
2137
|
-
(O) =>
|
|
2168
|
+
return ((j = n.purchaseOrder.deliveryFullfillment) == null ? void 0 : j.findIndex(
|
|
2169
|
+
(O) => n.deliveryOrder.fullfillmentId && O.id === n.deliveryOrder.fullfillmentId
|
|
2138
2170
|
)) ?? -1;
|
|
2139
2171
|
}
|
|
2140
|
-
), y = s.enablePurchaseOrderReceiveWithCustomCost,
|
|
2172
|
+
), y = s.enablePurchaseOrderReceiveWithCustomCost, x = s.enablePortalDeliveryOrderWrite, _ = G({}), C = Z(() => n.purchaseOrder.items.map((j, O) => Z({
|
|
2141
2173
|
get: () => {
|
|
2142
2174
|
var Y;
|
|
2143
2175
|
const k = (Y = t.received[O]) == null ? void 0 : Y.cost;
|
|
@@ -2145,11 +2177,11 @@ const Kr = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
2145
2177
|
},
|
|
2146
2178
|
set: (k) => {
|
|
2147
2179
|
t.received[O].cost = {
|
|
2148
|
-
currency:
|
|
2180
|
+
currency: De(),
|
|
2149
2181
|
...ot(k, 4)
|
|
2150
2182
|
};
|
|
2151
2183
|
}
|
|
2152
|
-
}))),
|
|
2184
|
+
}))), h = Z(() => n.deliveryOrder.received.map((j, O) => Z({
|
|
2153
2185
|
get: () => {
|
|
2154
2186
|
var Y;
|
|
2155
2187
|
const k = (Y = t.received[O]) == null ? void 0 : Y.amount;
|
|
@@ -2159,16 +2191,16 @@ const Kr = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
2159
2191
|
t.received[O].amount = ot(k, 2);
|
|
2160
2192
|
}
|
|
2161
2193
|
})));
|
|
2162
|
-
function
|
|
2163
|
-
const O = !
|
|
2164
|
-
if (
|
|
2165
|
-
const k =
|
|
2194
|
+
function U(j) {
|
|
2195
|
+
const O = !_.value[j];
|
|
2196
|
+
if (_.value[j] = O, O) {
|
|
2197
|
+
const k = n.deliveryOrder.received[j];
|
|
2166
2198
|
k.cost ? t.received[j].cost = {
|
|
2167
2199
|
currency: k.cost.currency,
|
|
2168
2200
|
amount: k.cost.amount,
|
|
2169
2201
|
precision: k.cost.precision
|
|
2170
2202
|
} : t.received[j].cost = {
|
|
2171
|
-
currency:
|
|
2203
|
+
currency: De(),
|
|
2172
2204
|
amount: 0,
|
|
2173
2205
|
precision: 4
|
|
2174
2206
|
};
|
|
@@ -2176,22 +2208,22 @@ const Kr = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
2176
2208
|
delete t.received[j].cost;
|
|
2177
2209
|
}
|
|
2178
2210
|
function R() {
|
|
2179
|
-
|
|
2211
|
+
a.updateDeliveryOrder({
|
|
2180
2212
|
deliveryOrder: {
|
|
2181
|
-
...
|
|
2213
|
+
...n.deliveryOrder,
|
|
2182
2214
|
...t
|
|
2183
2215
|
},
|
|
2184
|
-
purchaseOrderId:
|
|
2185
|
-
purchaseOrderRev:
|
|
2216
|
+
purchaseOrderId: n.purchaseOrder._id,
|
|
2217
|
+
purchaseOrderRev: n.purchaseOrder._rev
|
|
2186
2218
|
}).then(() => {
|
|
2187
2219
|
l.open(
|
|
2188
2220
|
{
|
|
2189
2221
|
title: "Success",
|
|
2190
|
-
message: `PO# ${
|
|
2222
|
+
message: `PO# ${n.purchaseOrder.seqNumber} Changes have been saved`,
|
|
2191
2223
|
type: "success"
|
|
2192
2224
|
},
|
|
2193
2225
|
1e4
|
|
2194
|
-
), c.value = !1,
|
|
2226
|
+
), c.value = !1, f("submitted");
|
|
2195
2227
|
});
|
|
2196
2228
|
}
|
|
2197
2229
|
return (j, O) => {
|
|
@@ -2202,16 +2234,16 @@ const Kr = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
2202
2234
|
overlay: !0
|
|
2203
2235
|
}, {
|
|
2204
2236
|
"dialog-button": oe(() => [
|
|
2205
|
-
|
|
2237
|
+
m(x) ? (i(), ie(k, {
|
|
2206
2238
|
key: 0,
|
|
2207
2239
|
variant: "plain",
|
|
2208
2240
|
label: "Edit",
|
|
2209
2241
|
size: "md",
|
|
2210
2242
|
"prepend-icon": "edit"
|
|
2211
|
-
})) :
|
|
2243
|
+
})) : M("", !0)
|
|
2212
2244
|
]),
|
|
2213
2245
|
"dialog-header": oe(() => [
|
|
2214
|
-
e("div", null, "Received on " +
|
|
2246
|
+
e("div", null, "Received on " + d(m(et)(n.deliveryOrder.createdAt)), 1)
|
|
2215
2247
|
]),
|
|
2216
2248
|
"dialog-footer": oe(() => [
|
|
2217
2249
|
L(k, {
|
|
@@ -2224,74 +2256,74 @@ const Kr = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
2224
2256
|
]),
|
|
2225
2257
|
default: oe(() => [
|
|
2226
2258
|
e("div", null, [
|
|
2227
|
-
e("div",
|
|
2228
|
-
e("div",
|
|
2259
|
+
e("div", ao, [
|
|
2260
|
+
e("div", lo, [
|
|
2229
2261
|
O[2] || (O[2] = e("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, "Adjustment date", -1)),
|
|
2230
|
-
e("div",
|
|
2262
|
+
e("div", io, d(n.deliveryOrder.adjustment ? m(et)(new Date(m(st)(n.deliveryOrder.adjustment))) : "-"), 1)
|
|
2231
2263
|
]),
|
|
2232
|
-
e("div",
|
|
2264
|
+
e("div", co, [
|
|
2233
2265
|
O[4] || (O[4] = e("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, "Received items", -1)),
|
|
2234
|
-
(i(!0),
|
|
2266
|
+
(i(!0), v(fe, null, ke(n.deliveryOrder.received, (S, T) => {
|
|
2235
2267
|
var W;
|
|
2236
|
-
return i(),
|
|
2237
|
-
e("div",
|
|
2238
|
-
e("div",
|
|
2239
|
-
e("span",
|
|
2240
|
-
e("span",
|
|
2268
|
+
return i(), v("div", { key: T }, [
|
|
2269
|
+
e("div", uo, [
|
|
2270
|
+
e("div", mo, [
|
|
2271
|
+
e("span", po, d(S.sku.name), 1),
|
|
2272
|
+
e("span", fo, d(S.sku.code), 1)
|
|
2241
2273
|
]),
|
|
2242
|
-
e("div",
|
|
2274
|
+
e("div", yo, [
|
|
2243
2275
|
L(Y, {
|
|
2244
2276
|
label: "Receive Quantity",
|
|
2245
|
-
modelValue:
|
|
2246
|
-
"onUpdate:modelValue": (Q) =>
|
|
2277
|
+
modelValue: h.value[T].value,
|
|
2278
|
+
"onUpdate:modelValue": (Q) => h.value[T].value = Q,
|
|
2247
2279
|
min: 0,
|
|
2248
2280
|
"append-text": ((W = S.measurement) == null ? void 0 : W.abbrev) ?? S.sku.unit.abbrev
|
|
2249
2281
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "append-text"]),
|
|
2250
|
-
e("div",
|
|
2251
|
-
|
|
2282
|
+
e("div", vo, d(`${S.cost ? `${m(Je)(S.cost)}` : ""}`), 1),
|
|
2283
|
+
m(y) ? (i(), v("div", bo, [
|
|
2252
2284
|
L(N, {
|
|
2253
|
-
"model-value":
|
|
2254
|
-
"onUpdate:modelValue": (Q) =>
|
|
2285
|
+
"model-value": _.value[T],
|
|
2286
|
+
"onUpdate:modelValue": (Q) => U(T),
|
|
2255
2287
|
size: "sm"
|
|
2256
2288
|
}, null, 8, ["model-value", "onUpdate:modelValue"]),
|
|
2257
2289
|
O[3] || (O[3] = e("span", { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, " Override cost ", -1))
|
|
2258
|
-
])) :
|
|
2259
|
-
|
|
2290
|
+
])) : M("", !0),
|
|
2291
|
+
m(y) && _.value[T] ? (i(), ie(Y, {
|
|
2260
2292
|
key: 1,
|
|
2261
|
-
modelValue:
|
|
2262
|
-
"onUpdate:modelValue": (Q) =>
|
|
2293
|
+
modelValue: C.value[T].value,
|
|
2294
|
+
"onUpdate:modelValue": (Q) => C.value[T].value = Q,
|
|
2263
2295
|
label: "Total Cost",
|
|
2264
2296
|
step: 1e-4,
|
|
2265
2297
|
min: 0,
|
|
2266
2298
|
placeholder: "0.0000",
|
|
2267
2299
|
size: "sm",
|
|
2268
|
-
"append-text":
|
|
2269
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue", "append-text"])) :
|
|
2300
|
+
"append-text": m(De)()
|
|
2301
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "append-text"])) : M("", !0)
|
|
2270
2302
|
])
|
|
2271
2303
|
]),
|
|
2272
|
-
T <
|
|
2304
|
+
T < n.purchaseOrder.items.length - 1 ? (i(), v("div", ho)) : M("", !0)
|
|
2273
2305
|
]);
|
|
2274
2306
|
}), 128))
|
|
2275
2307
|
]),
|
|
2276
|
-
e("div",
|
|
2308
|
+
e("div", go, [
|
|
2277
2309
|
O[5] || (O[5] = e("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, "Delivery order no.", -1)),
|
|
2278
|
-
e("div",
|
|
2310
|
+
e("div", _o, [
|
|
2279
2311
|
L(P, {
|
|
2280
|
-
modelValue:
|
|
2281
|
-
"onUpdate:modelValue": O[0] || (O[0] = (S) =>
|
|
2312
|
+
modelValue: m(t).deliveryOrderNumber,
|
|
2313
|
+
"onUpdate:modelValue": O[0] || (O[0] = (S) => m(t).deliveryOrderNumber = S),
|
|
2282
2314
|
size: "md",
|
|
2283
|
-
placeholder:
|
|
2315
|
+
placeholder: n.deliveryOrder.deliveryOrderNumber
|
|
2284
2316
|
}, null, 8, ["modelValue", "placeholder"])
|
|
2285
2317
|
])
|
|
2286
2318
|
]),
|
|
2287
|
-
e("div",
|
|
2319
|
+
e("div", xo, [
|
|
2288
2320
|
O[6] || (O[6] = e("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, "Remark", -1)),
|
|
2289
|
-
e("div",
|
|
2321
|
+
e("div", So, d(n.deliveryOrder.remark || "N/A"), 1)
|
|
2290
2322
|
]),
|
|
2291
|
-
|
|
2323
|
+
b.value >= 0 ? (i(), v("div", Oo, [
|
|
2292
2324
|
O[7] || (O[7] = e("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, " Fulfilment's sequence ", -1)),
|
|
2293
|
-
e("div",
|
|
2294
|
-
])) :
|
|
2325
|
+
e("div", wo, d(b.value + 1), 1)
|
|
2326
|
+
])) : M("", !0)
|
|
2295
2327
|
])
|
|
2296
2328
|
])
|
|
2297
2329
|
]),
|
|
@@ -2299,37 +2331,37 @@ const Kr = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
2299
2331
|
}, 8, ["modelValue"]);
|
|
2300
2332
|
};
|
|
2301
2333
|
}
|
|
2302
|
-
}),
|
|
2334
|
+
}), Do = { class: "flex flex-col gap-3" }, $o = { class: "flex flex-col gap-4" }, ko = { class: "flex flex-col gap-4 fm-typo-en-body-lg-600" }, Ro = {
|
|
2303
2335
|
key: 0,
|
|
2304
2336
|
class: "flex flex-col gap-4"
|
|
2305
|
-
},
|
|
2337
|
+
}, No = { class: "flex items-center justify-between" }, Ao = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, Po = {
|
|
2306
2338
|
key: 0,
|
|
2307
2339
|
class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary"
|
|
2308
|
-
},
|
|
2340
|
+
}, To = { class: "flex gap-4" }, Fo = { class: "flex-1" }, Io = { class: "flex-1" }, qo = {
|
|
2309
2341
|
key: 0,
|
|
2310
2342
|
class: "flex items-center text-fm-color-system-error-300"
|
|
2311
|
-
},
|
|
2343
|
+
}, Eo = { class: "fm-typo-en-body-md-400" }, Vo = { class: "flex flex-col gap-4" }, Lo = { class: "flex justify-between items-center py-1 gap-4" }, Mo = { class: "flex flex-col" }, Uo = { class: "fm-typo-en-body-lg-600" }, jo = { class: "fm-typo-en-body-md-400" }, Bo = { class: "flex flex-col gap-2 items-end" }, zo = {
|
|
2312
2344
|
key: 0,
|
|
2313
2345
|
class: "flex items-center gap-2"
|
|
2314
|
-
},
|
|
2346
|
+
}, Ko = {
|
|
2315
2347
|
key: 0,
|
|
2316
2348
|
class: "border-b border-fm-color-stroke-secondary"
|
|
2317
|
-
},
|
|
2349
|
+
}, Ho = { class: "flex flex-col gap-4" }, Wo = { class: "flex flex-col gap-4" }, Go = { class: "flex flex-col gap-4" }, Yo = { class: "flex flex-col gap-4 fm-typo-en-body-lg-600" }, Qo = /* @__PURE__ */ Oe({
|
|
2318
2350
|
__name: "CreateForm",
|
|
2319
2351
|
props: {
|
|
2320
2352
|
purchaseOrder: {},
|
|
2321
2353
|
receivedInfoMap: {}
|
|
2322
2354
|
},
|
|
2323
2355
|
emits: ["submitted"],
|
|
2324
|
-
setup(
|
|
2356
|
+
setup(p, { emit: r }) {
|
|
2325
2357
|
var F, I, ee;
|
|
2326
|
-
const { t: s } = it(), l = G(!1), c = ct(),
|
|
2358
|
+
const { t: s } = it(), l = G(!1), c = ct(), n = p, f = r, t = Kt("", {
|
|
2327
2359
|
default: {
|
|
2328
2360
|
deliveryOrderNumber: "",
|
|
2329
2361
|
remark: "",
|
|
2330
|
-
received:
|
|
2362
|
+
received: n.purchaseOrder.items.map((w) => ({
|
|
2331
2363
|
sku: w.sku,
|
|
2332
|
-
amount:
|
|
2364
|
+
amount: je.fromNumber(0),
|
|
2333
2365
|
measurement: w.measurement
|
|
2334
2366
|
})),
|
|
2335
2367
|
createdBy: {
|
|
@@ -2338,7 +2370,7 @@ const Kr = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
2338
2370
|
},
|
|
2339
2371
|
createdAt: ""
|
|
2340
2372
|
}
|
|
2341
|
-
}),
|
|
2373
|
+
}), a = We(), b = dt(), y = Ve(), x = ((ee = n.purchaseOrder) == null ? void 0 : ee.supplier.internal) != null, _ = x && y.enablePOSTransferRequireFulfillment, C = y.enablePortalDeliveryOrderWrite && (n.purchaseOrder.status === ae.Enum.RECEIVING || n.purchaseOrder.status === ae.Enum.COMPLETE) && (x ? !_ : !0), h = y.enablePurchaseOrderReceiveWithCustomCost, U = y.enableBackdateReceive, R = G({}), j = He(), O = Z({
|
|
2342
2374
|
get() {
|
|
2343
2375
|
if (!t.createdAt) return "";
|
|
2344
2376
|
const w = new Date(t.createdAt), g = w.getFullYear(), V = String(w.getMonth() + 1).padStart(2, "0"), H = String(w.getDate()).padStart(2, "0");
|
|
@@ -2363,18 +2395,18 @@ const Kr = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
2363
2395
|
}
|
|
2364
2396
|
}
|
|
2365
2397
|
}), Y = Z(() => {
|
|
2366
|
-
const w = st(
|
|
2398
|
+
const w = st(n.purchaseOrder._id);
|
|
2367
2399
|
if (!w) return "";
|
|
2368
2400
|
const g = new Date(w), V = g.getFullYear(), H = String(g.getMonth() + 1).padStart(2, "0"), ce = String(g.getDate()).padStart(2, "0");
|
|
2369
2401
|
return `${V}-${H}-${ce}`;
|
|
2370
2402
|
}), N = Z(() => {
|
|
2371
|
-
const w = st(
|
|
2403
|
+
const w = st(n.purchaseOrder._id);
|
|
2372
2404
|
return w ? new Date(w) : null;
|
|
2373
2405
|
}), P = Z(() => {
|
|
2374
2406
|
if (!O.value || !k.value || !N.value) return null;
|
|
2375
2407
|
if (/* @__PURE__ */ new Date(`${O.value}T${k.value}:00`) < N.value) {
|
|
2376
|
-
const g = Y.value, V = N.value.getHours(), H = N.value.getMinutes(), ce = V >= 12 ? "PM" : "AM", Re = V % 12 || 12,
|
|
2377
|
-
return `Delivery date & time cannot be earlier than order creation (${g} ${
|
|
2408
|
+
const g = Y.value, V = N.value.getHours(), H = N.value.getMinutes(), ce = V >= 12 ? "PM" : "AM", Re = V % 12 || 12, we = `${String(Re).padStart(2, "0")}:${String(H).padStart(2, "0")} ${ce}`;
|
|
2409
|
+
return `Delivery date & time cannot be earlier than order creation (${g} ${we})`;
|
|
2378
2410
|
}
|
|
2379
2411
|
return null;
|
|
2380
2412
|
}), $ = Z(() => P.value ? !1 : t.received.some((g) => {
|
|
@@ -2384,7 +2416,7 @@ const Kr = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
2384
2416
|
function S() {
|
|
2385
2417
|
t.createdAt = "";
|
|
2386
2418
|
}
|
|
2387
|
-
const T = Z(() =>
|
|
2419
|
+
const T = Z(() => n.purchaseOrder.items.map((w, g) => Z({
|
|
2388
2420
|
get: () => {
|
|
2389
2421
|
var H;
|
|
2390
2422
|
const V = (H = t.received[g]) == null ? void 0 : H.amount;
|
|
@@ -2397,21 +2429,21 @@ const Kr = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
2397
2429
|
function W(w) {
|
|
2398
2430
|
const g = !R.value[w];
|
|
2399
2431
|
if (R.value[w] = g, g) {
|
|
2400
|
-
const V =
|
|
2432
|
+
const V = n.purchaseOrder.items[w];
|
|
2401
2433
|
V.totalCost ? t.received[w].cost = {
|
|
2402
2434
|
currency: V.totalCost.currency,
|
|
2403
2435
|
amount: V.totalCost.amount,
|
|
2404
2436
|
precision: 4
|
|
2405
2437
|
// Standardize to 4 decimals
|
|
2406
2438
|
} : t.received[w].cost = {
|
|
2407
|
-
currency:
|
|
2439
|
+
currency: De(),
|
|
2408
2440
|
amount: 0,
|
|
2409
2441
|
precision: 4
|
|
2410
2442
|
};
|
|
2411
2443
|
} else
|
|
2412
2444
|
delete t.received[w].cost;
|
|
2413
2445
|
}
|
|
2414
|
-
const Q = Z(() =>
|
|
2446
|
+
const Q = Z(() => n.purchaseOrder.items.map((w, g) => Z({
|
|
2415
2447
|
get: () => {
|
|
2416
2448
|
var H;
|
|
2417
2449
|
const V = (H = t.received[g]) == null ? void 0 : H.cost;
|
|
@@ -2419,15 +2451,15 @@ const Kr = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
2419
2451
|
},
|
|
2420
2452
|
set: (V) => {
|
|
2421
2453
|
t.received[g].cost = {
|
|
2422
|
-
currency:
|
|
2454
|
+
currency: De(),
|
|
2423
2455
|
...ot(V, 4)
|
|
2424
2456
|
};
|
|
2425
2457
|
}
|
|
2426
2458
|
})));
|
|
2427
2459
|
function ye() {
|
|
2428
|
-
|
|
2460
|
+
b.open({
|
|
2429
2461
|
title: "Confirm Create Delivery Order",
|
|
2430
|
-
message: `Are you sure you want to create delivery order for PO# ${
|
|
2462
|
+
message: `Are you sure you want to create delivery order for PO# ${n.purchaseOrder.seqNumber}?`,
|
|
2431
2463
|
primaryActions: {
|
|
2432
2464
|
text: "Create",
|
|
2433
2465
|
close: !0,
|
|
@@ -2437,27 +2469,27 @@ const Kr = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
2437
2469
|
text: "Cancel",
|
|
2438
2470
|
close: !0
|
|
2439
2471
|
}
|
|
2440
|
-
}).onPrimary(() =>
|
|
2472
|
+
}).onPrimary(() => he());
|
|
2441
2473
|
}
|
|
2442
|
-
function
|
|
2443
|
-
|
|
2474
|
+
function he() {
|
|
2475
|
+
a.createDeliveryOrder({
|
|
2444
2476
|
deliveryOrder: t,
|
|
2445
|
-
purchaseOrderId:
|
|
2446
|
-
purchaseOrderRev:
|
|
2447
|
-
currency:
|
|
2477
|
+
purchaseOrderId: n.purchaseOrder._id,
|
|
2478
|
+
purchaseOrderRev: n.purchaseOrder._rev,
|
|
2479
|
+
currency: De()
|
|
2448
2480
|
}).then(() => {
|
|
2449
2481
|
j.open(
|
|
2450
2482
|
{
|
|
2451
2483
|
title: "Success",
|
|
2452
|
-
message: `New delivery order created for PO# ${
|
|
2484
|
+
message: `New delivery order created for PO# ${n.purchaseOrder.seqNumber}`,
|
|
2453
2485
|
type: "success"
|
|
2454
2486
|
},
|
|
2455
2487
|
1e4
|
|
2456
|
-
), l.value = !1,
|
|
2488
|
+
), l.value = !1, f("submitted");
|
|
2457
2489
|
});
|
|
2458
2490
|
}
|
|
2459
2491
|
return (w, g) => {
|
|
2460
|
-
const V = X("FmButton"), H = X("FmDatePicker"), ce = X("FmTimePicker"), Re = X("FmIcon"),
|
|
2492
|
+
const V = X("FmButton"), H = X("FmDatePicker"), ce = X("FmTimePicker"), Re = X("FmIcon"), we = X("FmStepperField"), Ge = X("FmSwitch"), o = X("FmTextField"), u = X("FmDialog");
|
|
2461
2493
|
return i(), ie(u, {
|
|
2462
2494
|
modelValue: l.value,
|
|
2463
2495
|
"onUpdate:modelValue": g[4] || (g[4] = (E) => l.value = E),
|
|
@@ -2465,17 +2497,17 @@ const Kr = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
2465
2497
|
"min-width": 800
|
|
2466
2498
|
}, {
|
|
2467
2499
|
"dialog-button": oe(() => [
|
|
2468
|
-
|
|
2500
|
+
m(C) ? (i(), ie(V, {
|
|
2469
2501
|
key: 0,
|
|
2470
2502
|
variant: "primary",
|
|
2471
2503
|
label: "Create",
|
|
2472
2504
|
size: "md",
|
|
2473
2505
|
"prepend-icon": "add",
|
|
2474
2506
|
class: "w-full"
|
|
2475
|
-
})) :
|
|
2507
|
+
})) : M("", !0)
|
|
2476
2508
|
]),
|
|
2477
2509
|
"dialog-header": oe(() => [
|
|
2478
|
-
e("div", null, "Order #" +
|
|
2510
|
+
e("div", null, "Order #" + d(n.purchaseOrder.seqNumber) + " (New Delivery Order)", 1)
|
|
2479
2511
|
]),
|
|
2480
2512
|
"dialog-footer": oe(() => [
|
|
2481
2513
|
L(V, {
|
|
@@ -2490,16 +2522,16 @@ const Kr = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
2490
2522
|
default: oe(() => {
|
|
2491
2523
|
var E;
|
|
2492
2524
|
return [
|
|
2493
|
-
e("div",
|
|
2494
|
-
e("div",
|
|
2525
|
+
e("div", Do, [
|
|
2526
|
+
e("div", $o, [
|
|
2495
2527
|
g[5] || (g[5] = e("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, "Received by", -1)),
|
|
2496
|
-
e("div",
|
|
2528
|
+
e("div", ko, d((E = m(c).sessionUser.value) == null ? void 0 : E.displayName), 1)
|
|
2497
2529
|
]),
|
|
2498
|
-
|
|
2499
|
-
e("div",
|
|
2500
|
-
e("div",
|
|
2501
|
-
g[6] || (g[6] =
|
|
2502
|
-
!O.value && !k.value ? (i(),
|
|
2530
|
+
m(U) ? (i(), v("div", Ro, [
|
|
2531
|
+
e("div", No, [
|
|
2532
|
+
e("div", Ao, [
|
|
2533
|
+
g[6] || (g[6] = Ee(" Delivery Date & Time ")),
|
|
2534
|
+
!O.value && !k.value ? (i(), v("div", Po, " Leave blank to use current date & time ")) : M("", !0)
|
|
2503
2535
|
]),
|
|
2504
2536
|
O.value || k.value ? (i(), ie(V, {
|
|
2505
2537
|
key: 0,
|
|
@@ -2507,63 +2539,63 @@ const Kr = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
2507
2539
|
label: "Clear",
|
|
2508
2540
|
"prepend-icon": "close",
|
|
2509
2541
|
onClick: S
|
|
2510
|
-
})) :
|
|
2542
|
+
})) : M("", !0)
|
|
2511
2543
|
]),
|
|
2512
|
-
e("div",
|
|
2513
|
-
e("div",
|
|
2544
|
+
e("div", To, [
|
|
2545
|
+
e("div", Fo, [
|
|
2514
2546
|
L(H, {
|
|
2515
2547
|
modelValue: O.value,
|
|
2516
2548
|
"onUpdate:modelValue": g[0] || (g[0] = (A) => O.value = A)
|
|
2517
2549
|
}, null, 8, ["modelValue"])
|
|
2518
2550
|
]),
|
|
2519
|
-
e("div",
|
|
2551
|
+
e("div", Io, [
|
|
2520
2552
|
L(ce, {
|
|
2521
2553
|
modelValue: k.value,
|
|
2522
2554
|
"onUpdate:modelValue": g[1] || (g[1] = (A) => k.value = A)
|
|
2523
2555
|
}, null, 8, ["modelValue"])
|
|
2524
2556
|
])
|
|
2525
2557
|
]),
|
|
2526
|
-
P.value ? (i(),
|
|
2558
|
+
P.value ? (i(), v("div", qo, [
|
|
2527
2559
|
L(Re, {
|
|
2528
2560
|
name: "error",
|
|
2529
2561
|
class: "inline-block mr-1",
|
|
2530
2562
|
size: "sm"
|
|
2531
2563
|
}),
|
|
2532
|
-
e("div",
|
|
2533
|
-
])) :
|
|
2534
|
-
])) :
|
|
2535
|
-
e("div",
|
|
2564
|
+
e("div", Eo, d(P.value), 1)
|
|
2565
|
+
])) : M("", !0)
|
|
2566
|
+
])) : M("", !0),
|
|
2567
|
+
e("div", Vo, [
|
|
2536
2568
|
g[8] || (g[8] = e("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, " Items going to receive ", -1)),
|
|
2537
|
-
(i(!0),
|
|
2538
|
-
var B, J,
|
|
2539
|
-
return i(),
|
|
2540
|
-
e("div",
|
|
2541
|
-
e("div",
|
|
2542
|
-
e("span",
|
|
2543
|
-
e("span",
|
|
2569
|
+
(i(!0), v(fe, null, ke(n.purchaseOrder.items, (A, K) => {
|
|
2570
|
+
var B, J, D;
|
|
2571
|
+
return i(), v("div", { key: K }, [
|
|
2572
|
+
e("div", Lo, [
|
|
2573
|
+
e("div", Mo, [
|
|
2574
|
+
e("span", Uo, d(A.sku.name), 1),
|
|
2575
|
+
e("span", jo, d(A.sku.code), 1)
|
|
2544
2576
|
]),
|
|
2545
|
-
e("div",
|
|
2546
|
-
L(
|
|
2577
|
+
e("div", Bo, [
|
|
2578
|
+
L(we, {
|
|
2547
2579
|
label: "Receive Quantity",
|
|
2548
2580
|
modelValue: T.value[K].value,
|
|
2549
2581
|
"onUpdate:modelValue": (te) => T.value[K].value = te,
|
|
2550
|
-
"helper-text": `${
|
|
2582
|
+
"helper-text": `${m(s)("inventory.transfer.receiveRequest.details.received")} ${m(je).toFormatString(
|
|
2551
2583
|
{
|
|
2552
2584
|
value: (B = w.receivedInfoMap[A.sku._id]) == null ? void 0 : B.received
|
|
2553
2585
|
}
|
|
2554
2586
|
)} ${((J = A.measurement) == null ? void 0 : J.abbrev) ?? A.sku.unit.abbrev}`,
|
|
2555
2587
|
min: 0,
|
|
2556
|
-
"append-text": ((
|
|
2588
|
+
"append-text": ((D = A.measurement) == null ? void 0 : D.abbrev) ?? A.sku.unit.abbrev
|
|
2557
2589
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "helper-text", "append-text"]),
|
|
2558
|
-
|
|
2590
|
+
m(h) ? (i(), v("div", zo, [
|
|
2559
2591
|
L(Ge, {
|
|
2560
2592
|
"model-value": R.value[K],
|
|
2561
2593
|
"onUpdate:modelValue": (te) => W(K),
|
|
2562
2594
|
size: "sm"
|
|
2563
2595
|
}, null, 8, ["model-value", "onUpdate:modelValue"]),
|
|
2564
2596
|
g[7] || (g[7] = e("span", { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, " Override cost ", -1))
|
|
2565
|
-
])) :
|
|
2566
|
-
|
|
2597
|
+
])) : M("", !0),
|
|
2598
|
+
m(h) && R.value[K] ? (i(), ie(we, {
|
|
2567
2599
|
key: 1,
|
|
2568
2600
|
modelValue: Q.value[K].value,
|
|
2569
2601
|
"onUpdate:modelValue": (te) => Q.value[K].value = te,
|
|
@@ -2572,30 +2604,30 @@ const Kr = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
2572
2604
|
min: 0,
|
|
2573
2605
|
placeholder: "0.0000",
|
|
2574
2606
|
size: "sm",
|
|
2575
|
-
"append-text":
|
|
2576
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue", "append-text"])) :
|
|
2607
|
+
"append-text": m(De)()
|
|
2608
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "append-text"])) : M("", !0)
|
|
2577
2609
|
])
|
|
2578
2610
|
]),
|
|
2579
|
-
K <
|
|
2611
|
+
K < n.purchaseOrder.items.length - 1 ? (i(), v("div", Ko)) : M("", !0)
|
|
2580
2612
|
]);
|
|
2581
2613
|
}), 128))
|
|
2582
2614
|
]),
|
|
2583
|
-
e("div",
|
|
2615
|
+
e("div", Ho, [
|
|
2584
2616
|
g[9] || (g[9] = e("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, "Delivery order no.", -1)),
|
|
2585
|
-
e("div",
|
|
2586
|
-
L(
|
|
2587
|
-
modelValue:
|
|
2588
|
-
"onUpdate:modelValue": g[2] || (g[2] = (A) =>
|
|
2617
|
+
e("div", Wo, [
|
|
2618
|
+
L(o, {
|
|
2619
|
+
modelValue: m(t).deliveryOrderNumber,
|
|
2620
|
+
"onUpdate:modelValue": g[2] || (g[2] = (A) => m(t).deliveryOrderNumber = A),
|
|
2589
2621
|
size: "md"
|
|
2590
2622
|
}, null, 8, ["modelValue"])
|
|
2591
2623
|
])
|
|
2592
2624
|
]),
|
|
2593
|
-
e("div",
|
|
2625
|
+
e("div", Go, [
|
|
2594
2626
|
g[10] || (g[10] = e("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, "Remark", -1)),
|
|
2595
|
-
e("div",
|
|
2596
|
-
L(
|
|
2597
|
-
modelValue:
|
|
2598
|
-
"onUpdate:modelValue": g[3] || (g[3] = (A) =>
|
|
2627
|
+
e("div", Yo, [
|
|
2628
|
+
L(o, {
|
|
2629
|
+
modelValue: m(t).remark,
|
|
2630
|
+
"onUpdate:modelValue": g[3] || (g[3] = (A) => m(t).remark = A),
|
|
2599
2631
|
size: "md"
|
|
2600
2632
|
}, null, 8, ["modelValue"])
|
|
2601
2633
|
])
|
|
@@ -2607,35 +2639,35 @@ const Kr = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
2607
2639
|
}, 8, ["modelValue"]);
|
|
2608
2640
|
};
|
|
2609
2641
|
}
|
|
2610
|
-
}),
|
|
2642
|
+
}), Jo = { class: "flex flex-row-reverse" }, Xo = {
|
|
2611
2643
|
key: 0,
|
|
2612
2644
|
class: "flex"
|
|
2613
|
-
},
|
|
2645
|
+
}, Zo = {
|
|
2614
2646
|
key: 1,
|
|
2615
2647
|
class: "border-t pt-6"
|
|
2616
|
-
},
|
|
2648
|
+
}, en = { class: "fm-typo-en-body-lg-600 mb-4 flex items-center gap-2" }, tn = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg overflow-y-auto" }, rn = { class: "w-full" }, sn = {
|
|
2617
2649
|
class: "p-3 fm-typo-en-body-sm-600",
|
|
2618
2650
|
style: { "min-width": "130px" }
|
|
2619
|
-
},
|
|
2651
|
+
}, on = { class: "p-3 fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, nn = { class: "p-3 fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, an = { class: "p-3 fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, ln = { class: "p-3 fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, cn = { class: "p-3 fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, un = { class: "p-3 fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, dn = { class: "p-3 fm-typo-en-body-sm-600" }, mn = { key: 2 }, pn = /* @__PURE__ */ Oe({
|
|
2620
2652
|
__name: "NetSuiteTransactionChangeLog",
|
|
2621
2653
|
props: {
|
|
2622
2654
|
netsuiteId: {}
|
|
2623
2655
|
},
|
|
2624
|
-
setup(
|
|
2625
|
-
const r =
|
|
2656
|
+
setup(p) {
|
|
2657
|
+
const r = p, s = xt(), l = G(!1), c = G(!1), n = G(!1), f = G([]);
|
|
2626
2658
|
async function t() {
|
|
2627
|
-
if (!(
|
|
2659
|
+
if (!(f.value.length > 0))
|
|
2628
2660
|
try {
|
|
2629
2661
|
c.value = !0;
|
|
2630
2662
|
const y = await s.getChangeLogs(r.netsuiteId);
|
|
2631
|
-
|
|
2663
|
+
f.value = y, n.value = !1;
|
|
2632
2664
|
} catch {
|
|
2633
|
-
|
|
2665
|
+
n.value = !0;
|
|
2634
2666
|
} finally {
|
|
2635
2667
|
c.value = !1;
|
|
2636
2668
|
}
|
|
2637
2669
|
}
|
|
2638
|
-
function
|
|
2670
|
+
function a(y) {
|
|
2639
2671
|
switch (y) {
|
|
2640
2672
|
case Ne.Create:
|
|
2641
2673
|
return "text-green-600 bg-green-100";
|
|
@@ -2649,7 +2681,7 @@ const Kr = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
2649
2681
|
return "text-gray-600 bg-gray-100";
|
|
2650
2682
|
}
|
|
2651
2683
|
}
|
|
2652
|
-
function
|
|
2684
|
+
function b(y) {
|
|
2653
2685
|
return new Date(y).toLocaleDateString("en-US", {
|
|
2654
2686
|
year: "numeric",
|
|
2655
2687
|
month: "short",
|
|
@@ -2658,46 +2690,46 @@ const Kr = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
2658
2690
|
minute: "2-digit"
|
|
2659
2691
|
});
|
|
2660
2692
|
}
|
|
2661
|
-
return (y,
|
|
2662
|
-
const
|
|
2663
|
-
return i(),
|
|
2664
|
-
L(
|
|
2693
|
+
return (y, x) => {
|
|
2694
|
+
const _ = X("FmButton"), C = X("FmCircularProgress"), h = X("FmIcon"), U = X("FmDialog");
|
|
2695
|
+
return i(), v("div", Jo, [
|
|
2696
|
+
L(U, {
|
|
2665
2697
|
modelValue: l.value,
|
|
2666
|
-
"onUpdate:modelValue":
|
|
2698
|
+
"onUpdate:modelValue": x[2] || (x[2] = (R) => l.value = R),
|
|
2667
2699
|
overlay: !0,
|
|
2668
2700
|
"max-width": 800
|
|
2669
2701
|
}, {
|
|
2670
2702
|
"dialog-button": oe(() => [
|
|
2671
|
-
L(
|
|
2703
|
+
L(_, {
|
|
2672
2704
|
"prepend-icon": "info",
|
|
2673
2705
|
variant: "secondary",
|
|
2674
2706
|
label: "NetSuite",
|
|
2675
|
-
onClick:
|
|
2707
|
+
onClick: x[0] || (x[0] = (R) => t()),
|
|
2676
2708
|
"text-color": "primary",
|
|
2677
2709
|
"bg-color": "transparent",
|
|
2678
2710
|
"border-color": "primary"
|
|
2679
2711
|
})
|
|
2680
2712
|
]),
|
|
2681
|
-
"dialog-header": oe(() =>
|
|
2713
|
+
"dialog-header": oe(() => x[3] || (x[3] = [
|
|
2682
2714
|
e("div", null, "NetSuite info", -1)
|
|
2683
2715
|
])),
|
|
2684
2716
|
default: oe(() => [
|
|
2685
|
-
c.value ? (i(),
|
|
2686
|
-
|
|
2687
|
-
L(
|
|
2688
|
-
])) :
|
|
2689
|
-
!c.value &&
|
|
2690
|
-
e("h3",
|
|
2691
|
-
L(
|
|
2717
|
+
c.value ? (i(), v("div", Xo, [
|
|
2718
|
+
x[4] || (x[4] = e("span", null, "Change Log Loading...", -1)),
|
|
2719
|
+
L(C, { size: "md" })
|
|
2720
|
+
])) : M("", !0),
|
|
2721
|
+
!c.value && f.value.length > 0 ? (i(), v("div", Zo, [
|
|
2722
|
+
e("h3", en, [
|
|
2723
|
+
L(h, {
|
|
2692
2724
|
name: "error",
|
|
2693
2725
|
color: "#ff9500",
|
|
2694
2726
|
size: "sm"
|
|
2695
2727
|
}),
|
|
2696
|
-
|
|
2728
|
+
x[5] || (x[5] = Ee(" Change Logs "))
|
|
2697
2729
|
]),
|
|
2698
|
-
e("div",
|
|
2699
|
-
e("table",
|
|
2700
|
-
|
|
2730
|
+
e("div", tn, [
|
|
2731
|
+
e("table", rn, [
|
|
2732
|
+
x[6] || (x[6] = e("thead", { class: "bg-fm-color-neutral-gray-50" }, [
|
|
2701
2733
|
e("tr", { class: "border-b border-fm-color-neutral-gray-200" }, [
|
|
2702
2734
|
e("th", {
|
|
2703
2735
|
class: "text-left p-3 fm-typo-en-body-md-600",
|
|
@@ -2714,36 +2746,36 @@ const Kr = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
2714
2746
|
])
|
|
2715
2747
|
], -1)),
|
|
2716
2748
|
e("tbody", null, [
|
|
2717
|
-
(i(!0),
|
|
2749
|
+
(i(!0), v(fe, null, ke(f.value, (R, j) => (i(), v("tr", {
|
|
2718
2750
|
key: j,
|
|
2719
2751
|
class: "border-b border-fm-color-neutral-gray-200 last:border-b-0"
|
|
2720
2752
|
}, [
|
|
2721
|
-
e("td",
|
|
2722
|
-
e("td",
|
|
2723
|
-
e("td",
|
|
2724
|
-
e("td",
|
|
2753
|
+
e("td", sn, d(b(R._dateiso8601)), 1),
|
|
2754
|
+
e("td", on, d(R._rolename), 1),
|
|
2755
|
+
e("td", nn, d(R._employeename), 1),
|
|
2756
|
+
e("td", an, d(R._contextname), 1),
|
|
2725
2757
|
e("td", {
|
|
2726
|
-
class:
|
|
2727
|
-
},
|
|
2728
|
-
e("td",
|
|
2729
|
-
e("td",
|
|
2730
|
-
e("td",
|
|
2731
|
-
e("td",
|
|
2758
|
+
class: Pe(`p-3 fm-typo-en-body-sm-600 ${a(Number(R.type) - 1)}`)
|
|
2759
|
+
}, d(m(Ne)[Number(R.type) - 1]), 3),
|
|
2760
|
+
e("td", ln, d(R.lineid || ""), 1),
|
|
2761
|
+
e("td", cn, d(R._fieldname), 1),
|
|
2762
|
+
e("td", un, d(R.oldvalue || ""), 1),
|
|
2763
|
+
e("td", dn, d(R.newvalue || ""), 1)
|
|
2732
2764
|
]))), 128))
|
|
2733
2765
|
])
|
|
2734
2766
|
])
|
|
2735
2767
|
])
|
|
2736
|
-
])) : (i(),
|
|
2768
|
+
])) : (i(), v("div", mn, x[7] || (x[7] = [
|
|
2737
2769
|
e("p", null, "No change logs available.", -1)
|
|
2738
2770
|
])))
|
|
2739
2771
|
]),
|
|
2740
2772
|
"dialog-footer": oe(() => [
|
|
2741
|
-
L(
|
|
2773
|
+
L(_, {
|
|
2742
2774
|
class: "ml-auto sm:w-full xs:w-full",
|
|
2743
2775
|
label: "Close",
|
|
2744
2776
|
size: "md",
|
|
2745
2777
|
variant: "primary",
|
|
2746
|
-
onClick:
|
|
2778
|
+
onClick: x[1] || (x[1] = (R) => l.value = !1)
|
|
2747
2779
|
})
|
|
2748
2780
|
]),
|
|
2749
2781
|
_: 1
|
|
@@ -2751,55 +2783,67 @@ const Kr = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
2751
2783
|
]);
|
|
2752
2784
|
};
|
|
2753
2785
|
}
|
|
2754
|
-
}),
|
|
2786
|
+
}), fn = { class: "flex flex-col w-full gap-3" }, yn = { class: "flex" }, vn = { class: "fm-typo-en-title-md-600 text-fm-color-typo-primary" }, bn = { class: "flex flex-col gap-16 w-full h-full" }, hn = { class: "flex justify-between" }, gn = { class: "fm-typo-en-body-lg-600" }, _n = { class: "flex gap-2" }, xn = {
|
|
2755
2787
|
key: 0,
|
|
2756
2788
|
class: "flex items-center gap-1"
|
|
2757
|
-
},
|
|
2789
|
+
}, Sn = { class: "fm-typo-en-body-md-400" }, On = { class: "flex flex-col gap-8" }, wn = {
|
|
2790
|
+
key: 0,
|
|
2791
|
+
class: "flex items-start justify-between gap-6"
|
|
2792
|
+
}, Cn = { class: "text-xs font-mono text-right break-all" }, Dn = {
|
|
2793
|
+
key: 1,
|
|
2794
|
+
class: "flex items-start justify-between gap-6"
|
|
2795
|
+
}, $n = { class: "fm-typo-en-body-sm-600" }, kn = {
|
|
2796
|
+
key: 2,
|
|
2797
|
+
class: "flex items-start justify-between gap-6"
|
|
2798
|
+
}, Rn = { class: "text-xs font-mono text-right break-all" }, Nn = {
|
|
2799
|
+
key: 3,
|
|
2800
|
+
class: "flex items-start justify-between gap-6"
|
|
2801
|
+
}, An = { class: "text-xs font-mono text-right break-all" }, Pn = { class: "flex flex-col gap-4" }, Tn = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Fn = { class: "flex gap-1" }, In = { class: "fm-typo-en-body-lg-600" }, qn = {
|
|
2758
2802
|
key: 0,
|
|
2759
2803
|
class: "flex flex-col gap-4"
|
|
2760
|
-
},
|
|
2804
|
+
}, En = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Vn = { class: "fm-typo-en-body-lg-600" }, Ln = { class: "flex flex-col gap-4" }, Mn = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Un = { class: "fm-typo-en-body-lg-600" }, jn = {
|
|
2761
2805
|
key: 1,
|
|
2762
2806
|
class: "flex flex-col gap-4"
|
|
2763
|
-
},
|
|
2807
|
+
}, Bn = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, zn = { class: "fm-typo-en-body-lg-600" }, Kn = {
|
|
2764
2808
|
key: 2,
|
|
2765
2809
|
class: "flex flex-col gap-4"
|
|
2766
|
-
},
|
|
2810
|
+
}, Hn = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Wn = { class: "fm-typo-en-body-lg-600" }, Gn = {
|
|
2767
2811
|
key: 3,
|
|
2768
2812
|
class: "flex flex-col gap-4"
|
|
2769
|
-
},
|
|
2813
|
+
}, Yn = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Qn = { class: "fm-typo-en-body-lg-600" }, Jn = {
|
|
2770
2814
|
key: 4,
|
|
2771
2815
|
class: "flex flex-col gap-4"
|
|
2772
|
-
},
|
|
2816
|
+
}, Xn = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Zn = { class: "fm-typo-en-body-lg-600" }, ea = {
|
|
2773
2817
|
key: 5,
|
|
2774
2818
|
class: "flex flex-col gap-4"
|
|
2775
|
-
},
|
|
2819
|
+
}, ta = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ra = { class: "fm-typo-en-body-lg-600" }, sa = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg p-16" }, oa = { class: "flex flex-col gap-8" }, na = { class: "flex gap-8 items-center" }, aa = { class: "flex-1 fm-typo-en-body-lg-600" }, la = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary flex flex-col gap-4" }, ia = { class: "flex w-full gap-4" }, ca = { class: "basis-1/2 shrink-0 grow fm-typo-en-body-lg-400 line-clamp-2 flex items-center gap-2" }, ua = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary flex flex-col gap-2" }, da = { class: "fm-typo-en-body-lg-400 line-clamp-2" }, ma = ["innerHTML"], pa = { class: "flex w-full gap-4 fm-typo-en-body-sm-400" }, fa = { class: "grow fm-typo-en-body-lg-400 text-fm-color-typo-secondary line-clamp-1" }, ya = {
|
|
2776
2820
|
key: 0,
|
|
2777
2821
|
class: "flex items-center gap-4"
|
|
2778
|
-
},
|
|
2822
|
+
}, va = { class: "line-clamp-1 fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, ba = {
|
|
2779
2823
|
key: 0,
|
|
2780
2824
|
class: "inline-flex items-center gap-1 text-xs font-medium text-gray-500 bg-gray-100 px-2 py-0.5 rounded-full"
|
|
2781
|
-
},
|
|
2825
|
+
}, ha = { class: "py-8" }, ga = { class: "flex justify-end gap-4 items-center" }, _a = { class: "fm-typo-en-body-lg-600" }, xa = {
|
|
2782
2826
|
key: 1,
|
|
2783
2827
|
class: "flex-1 xs:w-screen xs:max-w-full"
|
|
2784
|
-
},
|
|
2828
|
+
}, Sa = {
|
|
2785
2829
|
key: 0,
|
|
2786
2830
|
class: "flex flex-col items-center gap-8 h-full"
|
|
2787
|
-
},
|
|
2831
|
+
}, Oa = ["src"], wa = { class: "fm-typo-en-body-lg-600" }, Ca = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary px-16" }, Da = {
|
|
2788
2832
|
key: 1,
|
|
2789
2833
|
class: "px-4 flex flex-col"
|
|
2790
|
-
},
|
|
2834
|
+
}, $a = { class: "flex gap-12 content-stretch" }, ka = {
|
|
2791
2835
|
class: "flex flex-col w-40",
|
|
2792
2836
|
name: "circles"
|
|
2793
|
-
},
|
|
2837
|
+
}, Ra = { class: "flex-1 flex flex-col items-center" }, Na = { class: "h-40 w-40 bg-fm-color-primary rounded-full flex items-center justify-center" }, Aa = { class: "flex-1 flex flex-col items-center" }, Pa = { class: "flex w-full items-center gap-4" }, Ta = {
|
|
2794
2838
|
class: "py-12 flex flex-col gap-4",
|
|
2795
2839
|
name: "received-at header"
|
|
2796
|
-
},
|
|
2840
|
+
}, Fa = { class: "fm-typo-en-body-lg-400" }, Ia = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, qa = { class: "ml-auto flex gap-1" }, Ea = { class: "flex gap-12 content-stretch" }, Va = {
|
|
2797
2841
|
class: "flex flex-col w-40",
|
|
2798
2842
|
name: "circles"
|
|
2799
|
-
},
|
|
2843
|
+
}, La = { class: "flex-1 flex flex-col items-center" }, Ma = {
|
|
2800
2844
|
class: "py-12 flex flex-col gap-4 flex-1",
|
|
2801
2845
|
name: "delivery details"
|
|
2802
|
-
},
|
|
2846
|
+
}, Ua = { class: "flex flex-col gap-8" }, ja = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, Ba = { class: "flex flex-col gap-4" }, za = { class: "flex gap-8 xs:flex-col" }, Sl = /* @__PURE__ */ Oe({
|
|
2803
2847
|
__name: "TransferDetails",
|
|
2804
2848
|
props: {
|
|
2805
2849
|
poRequest: {},
|
|
@@ -2814,102 +2858,102 @@ const Kr = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
2814
2858
|
shipments: {}
|
|
2815
2859
|
},
|
|
2816
2860
|
emits: ["update:show", "submitted"],
|
|
2817
|
-
setup(
|
|
2818
|
-
const s =
|
|
2819
|
-
function
|
|
2820
|
-
const u =
|
|
2861
|
+
setup(p, { emit: r }) {
|
|
2862
|
+
const s = p, l = r, c = dt(), n = He(), f = Ve(), t = Te(), a = ct(), { hasOrderDraftPermission: b } = Xt(), y = Qt();
|
|
2863
|
+
function x(o) {
|
|
2864
|
+
const u = o.isCustomCost, E = o.totalCost;
|
|
2821
2865
|
return u != null ? u === !0 : E != null;
|
|
2822
2866
|
}
|
|
2823
2867
|
Ke(
|
|
2824
2868
|
() => s.purchaseOrder,
|
|
2825
|
-
(
|
|
2826
|
-
y.init(
|
|
2869
|
+
(o) => {
|
|
2870
|
+
y.init(o);
|
|
2827
2871
|
},
|
|
2828
2872
|
{ immediate: !0 }
|
|
2829
2873
|
);
|
|
2830
|
-
const
|
|
2874
|
+
const _ = Z(
|
|
2831
2875
|
() => {
|
|
2832
|
-
var
|
|
2876
|
+
var o, u;
|
|
2833
2877
|
return {
|
|
2834
|
-
id: ((
|
|
2835
|
-
name: ((u =
|
|
2878
|
+
id: ((o = a.sessionUser.value) == null ? void 0 : o.id) ?? "",
|
|
2879
|
+
name: ((u = a.sessionUser.value) == null ? void 0 : u.displayName) ?? ""
|
|
2836
2880
|
};
|
|
2837
2881
|
}
|
|
2838
|
-
),
|
|
2882
|
+
), C = Jt(), { t: h } = it(), U = Z(
|
|
2839
2883
|
() => {
|
|
2840
|
-
var
|
|
2841
|
-
return ((u = (
|
|
2884
|
+
var o, u, E, A;
|
|
2885
|
+
return ((u = (o = s.purchaseOrder) == null ? void 0 : o.supplier) == null ? void 0 : u.internal) === "restaurant" || ((A = (E = s.purchaseOrder) == null ? void 0 : E.supplier) == null ? void 0 : A.internal) === "warehouse" ? Ze.enum.transfer : Ze.enum.purchase;
|
|
2842
2886
|
}
|
|
2843
2887
|
), R = Z(() => {
|
|
2844
2888
|
var E;
|
|
2845
|
-
const
|
|
2889
|
+
const o = (E = s.shipments) == null ? void 0 : E.find((A) => {
|
|
2846
2890
|
var K;
|
|
2847
2891
|
return A.ref === ((K = s.purchaseOrder) == null ? void 0 : K._id);
|
|
2848
2892
|
});
|
|
2849
2893
|
let u = null;
|
|
2850
|
-
if (
|
|
2851
|
-
const A =
|
|
2894
|
+
if (o != null && o.milestones && o.milestones.length > 0) {
|
|
2895
|
+
const A = o.milestones[o.milestones.length - 1];
|
|
2852
2896
|
if (A.estimatedTime) {
|
|
2853
2897
|
const K = new Date(A.estimatedTime), B = K.getDate().toString().padStart(2, "0");
|
|
2854
2898
|
u = `${K.toLocaleString("en-US", { month: "short" })} ${B}`;
|
|
2855
2899
|
}
|
|
2856
2900
|
}
|
|
2857
2901
|
return u;
|
|
2858
|
-
}), j = G(!1), O = G(""), k = G(!0), Y = We(), N =
|
|
2902
|
+
}), j = G(!1), O = G(""), k = G(!0), Y = We(), N = Lr(Y.getWorkflowConfig), P = Yt(), $ = [
|
|
2859
2903
|
q.enum.receiveStock,
|
|
2860
2904
|
q.enum.processRequest,
|
|
2861
2905
|
q.enum.closeRequest
|
|
2862
2906
|
], S = Z(() => {
|
|
2863
2907
|
if (!s.purchaseOrder)
|
|
2864
2908
|
return [];
|
|
2865
|
-
const
|
|
2866
|
-
if (
|
|
2909
|
+
const o = N.result.value;
|
|
2910
|
+
if (o.state === Et.loading)
|
|
2867
2911
|
return [];
|
|
2868
2912
|
const u = {
|
|
2869
|
-
user:
|
|
2913
|
+
user: _.value,
|
|
2870
2914
|
executedAt: t.locations.computeFirst(
|
|
2871
2915
|
(J) => {
|
|
2872
|
-
var
|
|
2873
|
-
return J.dbName === ((
|
|
2916
|
+
var D;
|
|
2917
|
+
return J.dbName === ((D = t._currentLocation) == null ? void 0 : D.dbName) ? J : null;
|
|
2874
2918
|
}
|
|
2875
2919
|
),
|
|
2876
2920
|
purchaseOrderRequest: s.poRequest,
|
|
2877
2921
|
purchaseOrder: s.purchaseOrder
|
|
2878
|
-
}, E =
|
|
2922
|
+
}, E = f.useOperatePurchaseOrderV2, A = f.poWorkflowAllowToMarkCompleted, K = [...$];
|
|
2879
2923
|
E && !A && K.push(q.enum.completeReceive);
|
|
2880
2924
|
let B = [];
|
|
2881
2925
|
try {
|
|
2882
|
-
|
|
2926
|
+
o.state === Et.error ? (console.error("Error fetching workflow config:", o.error), B = mt.getAvailableActions({
|
|
2883
2927
|
...u,
|
|
2884
2928
|
orderConfig: mt.getDefaultConfig()
|
|
2885
2929
|
}).actions.filter((J) => !K.includes(J))) : B = mt.getAvailableActions({
|
|
2886
2930
|
...u,
|
|
2887
|
-
orderConfig:
|
|
2931
|
+
orderConfig: o.data
|
|
2888
2932
|
}).actions.filter((J) => !K.includes(J));
|
|
2889
2933
|
} catch (J) {
|
|
2890
2934
|
console.error("Error getting available actions:", J);
|
|
2891
2935
|
}
|
|
2892
|
-
return s.scope === "approval" && (B = B.filter((J) => J !== q.enum.completeReceive)),
|
|
2936
|
+
return s.scope === "approval" && (B = B.filter((J) => J !== q.enum.completeReceive)), b.value || (B = B.filter(
|
|
2893
2937
|
(J) => J !== q.enum.approveDraft && J !== q.enum.rejectDraft
|
|
2894
2938
|
)), B;
|
|
2895
|
-
}), T =
|
|
2939
|
+
}), T = Nr(s, "show"), W = Z(() => [
|
|
2896
2940
|
{
|
|
2897
|
-
label:
|
|
2941
|
+
label: h("inventory.transfer.receiveRequest.details.overview"),
|
|
2898
2942
|
value: "overview"
|
|
2899
2943
|
},
|
|
2900
2944
|
{
|
|
2901
|
-
label:
|
|
2945
|
+
label: h("inventory.transfer.receiveRequest.details.deliveryHistory"),
|
|
2902
2946
|
value: "deliveryHistory"
|
|
2903
2947
|
}
|
|
2904
2948
|
]), Q = G(W.value[0]);
|
|
2905
2949
|
Ke(
|
|
2906
2950
|
() => s.show,
|
|
2907
|
-
(
|
|
2908
|
-
|
|
2951
|
+
(o) => {
|
|
2952
|
+
o && (Q.value = W.value[0]);
|
|
2909
2953
|
}
|
|
2910
2954
|
);
|
|
2911
|
-
function ye(
|
|
2912
|
-
return
|
|
2955
|
+
function ye(o) {
|
|
2956
|
+
return o.map((u) => ({
|
|
2913
2957
|
...u,
|
|
2914
2958
|
amount: {
|
|
2915
2959
|
...u.amount,
|
|
@@ -2917,9 +2961,9 @@ const Kr = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
2917
2961
|
}
|
|
2918
2962
|
}));
|
|
2919
2963
|
}
|
|
2920
|
-
async function
|
|
2964
|
+
async function he(o, u, E, A, K) {
|
|
2921
2965
|
return new Promise((B, J) => {
|
|
2922
|
-
const
|
|
2966
|
+
const D = {
|
|
2923
2967
|
closeButton: !1,
|
|
2924
2968
|
title: A.title,
|
|
2925
2969
|
message: A.message,
|
|
@@ -2927,17 +2971,17 @@ const Kr = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
2927
2971
|
secondaryActions: { text: "No", close: !1 }
|
|
2928
2972
|
};
|
|
2929
2973
|
let te = u.rejectReason ?? "";
|
|
2930
|
-
E === q.enum.rejectDraft && (
|
|
2974
|
+
E === q.enum.rejectDraft && (D.contentComponent = Gt, D.contentComponentProps = {
|
|
2931
2975
|
message: A.message,
|
|
2932
2976
|
onChange: (ne) => {
|
|
2933
2977
|
te = ne ?? "";
|
|
2934
2978
|
}
|
|
2935
|
-
}), c.open(
|
|
2979
|
+
}), c.open(D).onPrimary(async () => {
|
|
2936
2980
|
var de, re, le, ve;
|
|
2937
2981
|
const ne = [];
|
|
2938
2982
|
E === q.enum.confirmDraft ? ne.push({
|
|
2939
2983
|
action: "confirmDraft",
|
|
2940
|
-
payload: y.controller.value.toConfirmDraftData(
|
|
2984
|
+
payload: y.controller.value.toConfirmDraftData(De())
|
|
2941
2985
|
}) : E === q.enum.approveRequest ? (ne.push({
|
|
2942
2986
|
action: "approveRequest",
|
|
2943
2987
|
payload: null
|
|
@@ -2948,7 +2992,7 @@ const Kr = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
2948
2992
|
deliveryOrderNumber: "",
|
|
2949
2993
|
deliveryRemark: null,
|
|
2950
2994
|
items: ye(u.fulfillment.items),
|
|
2951
|
-
createdBy:
|
|
2995
|
+
createdBy: _.value
|
|
2952
2996
|
}
|
|
2953
2997
|
})) : E === q.enum.processRequest ? u.fulfillment && ne.push({
|
|
2954
2998
|
action: "processRequest",
|
|
@@ -2957,7 +3001,7 @@ const Kr = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
2957
3001
|
deliveryOrderNumber: "",
|
|
2958
3002
|
deliveryRemark: null,
|
|
2959
3003
|
items: ye(u.fulfillment.items),
|
|
2960
|
-
createdBy:
|
|
3004
|
+
createdBy: _.value
|
|
2961
3005
|
}
|
|
2962
3006
|
}) : E === q.enum.rejectRequest ? ne.push({
|
|
2963
3007
|
action: "rejectRequest",
|
|
@@ -2975,7 +3019,7 @@ const Kr = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
2975
3019
|
await P({
|
|
2976
3020
|
operate: {
|
|
2977
3021
|
operation: E,
|
|
2978
|
-
doc:
|
|
3022
|
+
doc: o,
|
|
2979
3023
|
options: u
|
|
2980
3024
|
},
|
|
2981
3025
|
operateV2: {
|
|
@@ -2998,40 +3042,40 @@ const Kr = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
2998
3042
|
});
|
|
2999
3043
|
});
|
|
3000
3044
|
}
|
|
3001
|
-
async function F(
|
|
3002
|
-
var K, B, J,
|
|
3003
|
-
if (
|
|
3045
|
+
async function F(o) {
|
|
3046
|
+
var K, B, J, D;
|
|
3047
|
+
if (o === q.enum.receiveStock)
|
|
3004
3048
|
return;
|
|
3005
|
-
const u =
|
|
3049
|
+
const u = Wt[o];
|
|
3006
3050
|
if (!u) {
|
|
3007
|
-
|
|
3051
|
+
n.open({
|
|
3008
3052
|
title: "Something went wrong",
|
|
3009
|
-
message: `Cannot process order: ${
|
|
3053
|
+
message: `Cannot process order: ${gt(o)}`,
|
|
3010
3054
|
type: "error"
|
|
3011
3055
|
});
|
|
3012
3056
|
return;
|
|
3013
3057
|
}
|
|
3014
3058
|
const { successMessage: E, ...A } = u;
|
|
3015
3059
|
if (s.purchaseOrder) {
|
|
3016
|
-
O.value = `${
|
|
3060
|
+
O.value = `${o}`, j.value = !0, k.value = !1;
|
|
3017
3061
|
const te = {};
|
|
3018
3062
|
let ne = 0;
|
|
3019
|
-
if ((
|
|
3020
|
-
|
|
3063
|
+
if ((o === q.enum.confirmDraft || // auto receive for warehouse to warehouse
|
|
3064
|
+
o === q.enum.completeReceive) && f.autoReceiveWarehouse)
|
|
3021
3065
|
te.autoReceive = !0;
|
|
3022
|
-
else if ((
|
|
3023
|
-
const de = (B = (K = s.poRequest) == null ? void 0 : K.from) == null ? void 0 : B.dbName, re = (
|
|
3066
|
+
else if ((o === q.enum.approveRequest || o === q.enum.processRequest) && f.acceptRequireFulfillment) {
|
|
3067
|
+
const de = (B = (K = s.poRequest) == null ? void 0 : K.from) == null ? void 0 : B.dbName, re = (D = (J = s.poRequest) == null ? void 0 : J.to) == null ? void 0 : D.dbName;
|
|
3024
3068
|
if (de && re && (de.startsWith("warehouse_") || re.startsWith("warehouse_"))) {
|
|
3025
3069
|
const le = await new Promise((ve, Ae) => {
|
|
3026
3070
|
c.open({
|
|
3027
3071
|
closeButton: !1,
|
|
3028
3072
|
title: "Confirm transfer amount",
|
|
3029
|
-
dialogComponent:
|
|
3073
|
+
dialogComponent: ls,
|
|
3030
3074
|
dialogComponentProps: {
|
|
3031
3075
|
purchaseOrder: s.purchaseOrder,
|
|
3032
3076
|
confirm: ve,
|
|
3033
|
-
"onUpdate:show": (
|
|
3034
|
-
|
|
3077
|
+
"onUpdate:show": (Le) => {
|
|
3078
|
+
Le || (O.value = "", j.value = !1, k.value = !0, ne++, c.close()), Ae("cancelled");
|
|
3035
3079
|
}
|
|
3036
3080
|
}
|
|
3037
3081
|
});
|
|
@@ -3040,91 +3084,91 @@ const Kr = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
3040
3084
|
}
|
|
3041
3085
|
}
|
|
3042
3086
|
try {
|
|
3043
|
-
await
|
|
3087
|
+
await he(
|
|
3044
3088
|
s.purchaseOrder,
|
|
3045
3089
|
te,
|
|
3046
|
-
|
|
3090
|
+
o,
|
|
3047
3091
|
u,
|
|
3048
3092
|
ne
|
|
3049
|
-
) === "submitted" && (
|
|
3093
|
+
) === "submitted" && (n.open({
|
|
3050
3094
|
title: "Success",
|
|
3051
3095
|
message: E,
|
|
3052
3096
|
type: "success"
|
|
3053
3097
|
}), l("update:show", !1), l("submitted"));
|
|
3054
3098
|
} catch (de) {
|
|
3055
|
-
|
|
3099
|
+
n.open({
|
|
3056
3100
|
title: "Something went wrong",
|
|
3057
3101
|
message: "Please try again.",
|
|
3058
3102
|
type: "error"
|
|
3059
|
-
}), console.error("Error when submitting PO operation",
|
|
3103
|
+
}), console.error("Error when submitting PO operation", o, s.purchaseOrder, de);
|
|
3060
3104
|
} finally {
|
|
3061
3105
|
O.value = "", j.value = !1, k.value = !0;
|
|
3062
3106
|
}
|
|
3063
3107
|
}
|
|
3064
3108
|
}
|
|
3065
3109
|
const I = Z(() => {
|
|
3066
|
-
var
|
|
3067
|
-
return ((
|
|
3110
|
+
var o, u;
|
|
3111
|
+
return ((o = s.purchaseOrder) == null ? void 0 : o.status) === ae.enum.RECEIVING || ((u = s.purchaseOrder) == null ? void 0 : u.status) === ae.enum.COMPLETE;
|
|
3068
3112
|
}), ee = Z(() => s.purchaseOrder ? at(s.purchaseOrder) : {}), w = Z(() => {
|
|
3069
|
-
const
|
|
3070
|
-
if (!
|
|
3071
|
-
const { partial: u, over: E } = vt(ee.value), A = bt(
|
|
3072
|
-
let K =
|
|
3073
|
-
return A === ae.enum.CLOSE && (K = `${
|
|
3113
|
+
const o = s.purchaseOrder;
|
|
3114
|
+
if (!o) return { status: "", statusClass: "" };
|
|
3115
|
+
const { partial: u, over: E } = vt(ee.value), A = bt(o.status, u, E);
|
|
3116
|
+
let K = h(`inventory.transfer.status.${A}`), B = `${o.status}`.toLocaleLowerCase("en-us");
|
|
3117
|
+
return A === ae.enum.CLOSE && (K = `${h(`inventory.transfer.status.${ae.enum.COMPLETE}`)}`), A === "PARTIAL_RECEIVED" && B === ae.enum.PROCESSING.toLocaleLowerCase("en-us") && (B = ae.enum.RECEIVING.toLocaleLowerCase("en-us")), {
|
|
3074
3118
|
status: K,
|
|
3075
3119
|
statusClass: `fm-status-badge fm-status-badge-${B}`
|
|
3076
3120
|
};
|
|
3077
3121
|
}), g = Z(() => {
|
|
3078
3122
|
var B, J;
|
|
3079
|
-
const
|
|
3080
|
-
...
|
|
3081
|
-
createdAt:
|
|
3123
|
+
const o = ((B = s.purchaseOrder) == null ? void 0 : B.deliveryOrder) ?? [], u = ((J = s.purchaseOrder) == null ? void 0 : J.deliveryFullfillment) ?? [], E = [
|
|
3124
|
+
...o.map((D) => ({
|
|
3125
|
+
createdAt: D.createdAt,
|
|
3082
3126
|
type: "grn",
|
|
3083
|
-
doc:
|
|
3127
|
+
doc: D
|
|
3084
3128
|
})),
|
|
3085
|
-
...u.map((
|
|
3086
|
-
createdAt:
|
|
3129
|
+
...u.map((D) => ({
|
|
3130
|
+
createdAt: D.createdAt,
|
|
3087
3131
|
type: "fulfillment",
|
|
3088
|
-
doc:
|
|
3132
|
+
doc: D
|
|
3089
3133
|
}))
|
|
3090
3134
|
];
|
|
3091
|
-
E.reverse().sort((
|
|
3092
|
-
function A(
|
|
3093
|
-
var de, re, le, ve, Ae,
|
|
3094
|
-
const te = u.findIndex((pe) => pe.id ===
|
|
3135
|
+
E.reverse().sort((D, te) => D.createdAt.localeCompare(te.createdAt));
|
|
3136
|
+
function A(D) {
|
|
3137
|
+
var de, re, le, ve, Ae, Le, se, me, ge, Se, $e, Fe;
|
|
3138
|
+
const te = u.findIndex((pe) => pe.id === D.fullfillmentId), ne = [
|
|
3095
3139
|
(re = (de = u[te]) == null ? void 0 : de.netSuite) != null && re.id ? {
|
|
3096
3140
|
label: "Fulfillment's ref no. (Netsuite)",
|
|
3097
3141
|
values: [
|
|
3098
|
-
`${((ve = (le = u[te]) == null ? void 0 : le.netSuite) == null ? void 0 : ve.refNo) ?? "N/A"} (${((
|
|
3142
|
+
`${((ve = (le = u[te]) == null ? void 0 : le.netSuite) == null ? void 0 : ve.refNo) ?? "N/A"} (${((Le = (Ae = u[te]) == null ? void 0 : Ae.netSuite) == null ? void 0 : Le.id) ?? "-"})`
|
|
3099
3143
|
]
|
|
3100
3144
|
} : null,
|
|
3101
|
-
(se =
|
|
3145
|
+
(se = D == null ? void 0 : D.netSuite) != null && se.id ? {
|
|
3102
3146
|
label: "Netsuite ref no.",
|
|
3103
|
-
values: [`${((me =
|
|
3147
|
+
values: [`${((me = D == null ? void 0 : D.netSuite) == null ? void 0 : me.refNo) ?? "N/A"} (${((ge = D == null ? void 0 : D.netSuite) == null ? void 0 : ge.id) ?? "-"})`]
|
|
3104
3148
|
} : null,
|
|
3105
|
-
(Se =
|
|
3149
|
+
(Se = D == null ? void 0 : D.netSuite) != null && Se.recordType ? {
|
|
3106
3150
|
label: "Netsuite Type",
|
|
3107
|
-
values: [
|
|
3151
|
+
values: [zt(($e = D == null ? void 0 : D.netSuite) == null ? void 0 : $e.recordType)]
|
|
3108
3152
|
} : null
|
|
3109
3153
|
];
|
|
3110
3154
|
return {
|
|
3111
3155
|
header: "Received",
|
|
3112
|
-
deliveryOrder:
|
|
3113
|
-
date: et(new Date(
|
|
3156
|
+
deliveryOrder: D,
|
|
3157
|
+
date: et(new Date(D.createdAt)),
|
|
3114
3158
|
info: [
|
|
3115
3159
|
{
|
|
3116
3160
|
label: "Adjustment date",
|
|
3117
3161
|
values: [
|
|
3118
|
-
|
|
3162
|
+
D.adjustment ? et(new Date(st(D.adjustment))) : "-"
|
|
3119
3163
|
]
|
|
3120
3164
|
},
|
|
3121
3165
|
{
|
|
3122
3166
|
label: "Received by",
|
|
3123
|
-
values: [(Fe =
|
|
3167
|
+
values: [(Fe = D.createdBy) == null ? void 0 : Fe.name]
|
|
3124
3168
|
},
|
|
3125
3169
|
{
|
|
3126
3170
|
label: "Received items",
|
|
3127
|
-
values:
|
|
3171
|
+
values: D.received.map((pe) => {
|
|
3128
3172
|
var _e;
|
|
3129
3173
|
return z("div", [
|
|
3130
3174
|
z(
|
|
@@ -3199,11 +3243,11 @@ const Kr = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
3199
3243
|
},
|
|
3200
3244
|
{
|
|
3201
3245
|
label: "Delivery order no.",
|
|
3202
|
-
values: [
|
|
3246
|
+
values: [D.deliveryOrderNumber || "N/A"]
|
|
3203
3247
|
},
|
|
3204
3248
|
{
|
|
3205
3249
|
label: "Remark",
|
|
3206
|
-
values: [
|
|
3250
|
+
values: [D.remark || "N/A"]
|
|
3207
3251
|
},
|
|
3208
3252
|
te > -1 ? {
|
|
3209
3253
|
label: "Fulfilment's sequence",
|
|
@@ -3213,12 +3257,12 @@ const Kr = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
3213
3257
|
].filter((pe) => !!pe)
|
|
3214
3258
|
};
|
|
3215
3259
|
}
|
|
3216
|
-
function K(
|
|
3260
|
+
function K(D) {
|
|
3217
3261
|
var ne, de, re;
|
|
3218
|
-
const te = u.findIndex((le) => le.id ===
|
|
3262
|
+
const te = u.findIndex((le) => le.id === D.id);
|
|
3219
3263
|
return {
|
|
3220
3264
|
header: "Fulfillment",
|
|
3221
|
-
date: et(new Date(
|
|
3265
|
+
date: et(new Date(D.createdAt)),
|
|
3222
3266
|
info: [
|
|
3223
3267
|
{
|
|
3224
3268
|
label: "Sequence",
|
|
@@ -3226,7 +3270,7 @@ const Kr = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
3226
3270
|
},
|
|
3227
3271
|
{
|
|
3228
3272
|
label: "Receiveable items",
|
|
3229
|
-
values:
|
|
3273
|
+
values: D.items.map((le) => {
|
|
3230
3274
|
var ve;
|
|
3231
3275
|
return z("div", [
|
|
3232
3276
|
z(
|
|
@@ -3299,76 +3343,76 @@ const Kr = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
3299
3343
|
]);
|
|
3300
3344
|
})
|
|
3301
3345
|
},
|
|
3302
|
-
(ne =
|
|
3346
|
+
(ne = D.netSuite) != null && ne.refNo ? {
|
|
3303
3347
|
label: "Netsuite Ref no. (ID)",
|
|
3304
|
-
values: [`${(de =
|
|
3348
|
+
values: [`${(de = D.netSuite) == null ? void 0 : de.refNo} (${((re = D.netSuite) == null ? void 0 : re.id) ?? "-"})`]
|
|
3305
3349
|
} : null
|
|
3306
3350
|
].filter((le) => !!le)
|
|
3307
3351
|
};
|
|
3308
3352
|
}
|
|
3309
|
-
return E.map((
|
|
3310
|
-
switch (
|
|
3353
|
+
return E.map((D) => {
|
|
3354
|
+
switch (D.type) {
|
|
3311
3355
|
case "grn":
|
|
3312
|
-
return A(
|
|
3356
|
+
return A(D.doc);
|
|
3313
3357
|
case "fulfillment":
|
|
3314
|
-
return K(
|
|
3358
|
+
return K(D.doc);
|
|
3315
3359
|
}
|
|
3316
3360
|
});
|
|
3317
3361
|
});
|
|
3318
|
-
function V(
|
|
3362
|
+
function V(o) {
|
|
3319
3363
|
var B;
|
|
3320
|
-
const E = (((B = s.purchaseOrder) == null ? void 0 : B.version) ??
|
|
3321
|
-
return `<span class="${H(
|
|
3364
|
+
const E = (((B = s.purchaseOrder) == null ? void 0 : B.version) ?? Ue.enum[1]) === Ue.enum[2] ? o.id : o.sku._id, A = s.receivedMap[E];
|
|
3365
|
+
return `<span class="${H(o)} fm-typo-en-body-lg-600">${je.toFormatString({ value: A.received })}</span>/${Fr(o.quantity, o.sku.unit, o.measurement)}`;
|
|
3322
3366
|
}
|
|
3323
|
-
function H(
|
|
3367
|
+
function H(o) {
|
|
3324
3368
|
var te;
|
|
3325
|
-
const E = (((te = s.purchaseOrder) == null ? void 0 : te.version) ??
|
|
3326
|
-
return B ? "text-fm-color-typo-tertiary" : K ? "text-fm-color-system-warning-300" : J ? "text-fm-color-system-error-300" :
|
|
3369
|
+
const E = (((te = s.purchaseOrder) == null ? void 0 : te.version) ?? Ue.enum[1]) === Ue.enum[2] ? o.id : o.sku._id, A = s.receivedMap[E], { isPartialReceive: K, isNoReceive: B, isOverReceive: J, isFullReceive: D } = rs(A);
|
|
3370
|
+
return B ? "text-fm-color-typo-tertiary" : K ? "text-fm-color-system-warning-300" : J ? "text-fm-color-system-error-300" : D ? "text-fm-color-system-success-300" : "";
|
|
3327
3371
|
}
|
|
3328
3372
|
const ce = Z(() => {
|
|
3329
|
-
var
|
|
3330
|
-
return (
|
|
3331
|
-
var J,
|
|
3332
|
-
const B = (
|
|
3373
|
+
var o, u, E;
|
|
3374
|
+
return (o = s.purchaseOrder) != null && o.itemsAtSubmission ? ((u = s.purchaseOrder) == null ? void 0 : u.version) === Ue.enum[2] ? s.purchaseOrder.items.reduce((A, K) => {
|
|
3375
|
+
var J, D;
|
|
3376
|
+
const B = (D = (J = s.purchaseOrder) == null ? void 0 : J.itemsAtSubmission) == null ? void 0 : D.find(
|
|
3333
3377
|
(te) => te.id === K.id
|
|
3334
3378
|
);
|
|
3335
3379
|
return B && B.quantity !== K.quantity && A.set(K.sku.code, {
|
|
3336
|
-
originalAmount: Number(
|
|
3337
|
-
newAmount: Number(
|
|
3380
|
+
originalAmount: Number(je.toFormatString({ value: B.quantity })),
|
|
3381
|
+
newAmount: Number(je.toFormatString({ value: K.quantity }))
|
|
3338
3382
|
}), A;
|
|
3339
3383
|
}, /* @__PURE__ */ new Map()) : (E = s.purchaseOrder) == null ? void 0 : E.items.reduce((A, K) => {
|
|
3340
3384
|
var te, ne;
|
|
3341
3385
|
const B = (ne = (te = s.purchaseOrder) == null ? void 0 : te.itemsAtSubmission) == null ? void 0 : ne.find(
|
|
3342
3386
|
(de) => de.sku._id === K.sku._id
|
|
3343
|
-
), J = B ? Number(
|
|
3344
|
-
return B && J !==
|
|
3387
|
+
), J = B ? Number(je.toFormatString({ value: B.quantity })) : 0, D = Number(je.toFormatString({ value: K.quantity }));
|
|
3388
|
+
return B && J !== D && A.set(K.sku.code, {
|
|
3345
3389
|
originalAmount: J,
|
|
3346
|
-
newAmount:
|
|
3390
|
+
newAmount: D
|
|
3347
3391
|
}), A;
|
|
3348
3392
|
}, /* @__PURE__ */ new Map()) : /* @__PURE__ */ new Map();
|
|
3349
|
-
}), Re = (
|
|
3393
|
+
}), Re = (o) => {
|
|
3350
3394
|
var E, A;
|
|
3351
3395
|
const u = ce.value;
|
|
3352
|
-
return ((E = s.purchaseOrder) == null ? void 0 : E.version) ===
|
|
3353
|
-
},
|
|
3396
|
+
return ((E = s.purchaseOrder) == null ? void 0 : E.version) === Ue.enum[2] ? u.has(o.id) : u.has((A = o.sku) == null ? void 0 : A.code);
|
|
3397
|
+
}, we = (o) => {
|
|
3354
3398
|
var E, A;
|
|
3355
3399
|
const u = ce.value;
|
|
3356
|
-
return ((E = s.purchaseOrder) == null ? void 0 : E.version) ===
|
|
3400
|
+
return ((E = s.purchaseOrder) == null ? void 0 : E.version) === Ue.enum[2] ? u.get(o.id) : u.get((A = o.sku) == null ? void 0 : A.code);
|
|
3357
3401
|
}, Ge = Z(() => {
|
|
3358
|
-
const
|
|
3359
|
-
if (!
|
|
3360
|
-
const u =
|
|
3402
|
+
const o = s.purchaseOrder;
|
|
3403
|
+
if (!o) return "";
|
|
3404
|
+
const u = o.actionChangelogs ?? [], E = u.length ? u[u.length - 1] : null;
|
|
3361
3405
|
if (E && E.action === "rejectDraft") {
|
|
3362
3406
|
const A = E.remarks ?? "";
|
|
3363
3407
|
return A && A.toString().trim() !== "" ? A.toString() : "-";
|
|
3364
3408
|
}
|
|
3365
3409
|
return "";
|
|
3366
3410
|
});
|
|
3367
|
-
return (
|
|
3368
|
-
const E = X("FmButton"), A = X("FmButtonGroup"), K = X("FmChip"), B = X("FmIcon"), J = X("FmMenuDivider"),
|
|
3411
|
+
return (o, u) => {
|
|
3412
|
+
const E = X("FmButton"), A = X("FmButtonGroup"), K = X("FmChip"), B = X("FmIcon"), J = X("FmMenuDivider"), D = X("FmCard"), te = X("FmTooltip"), ne = X("FmSpacer"), de = X("FmSideSheet");
|
|
3369
3413
|
return i(), ie(de, {
|
|
3370
|
-
modelValue:
|
|
3371
|
-
"onUpdate:modelValue": u[8] || (u[8] = (re) =>
|
|
3414
|
+
modelValue: m(T),
|
|
3415
|
+
"onUpdate:modelValue": u[8] || (u[8] = (re) => ur(T) ? T.value = re : null),
|
|
3372
3416
|
"dismiss-away": k.value,
|
|
3373
3417
|
"max-width": 600,
|
|
3374
3418
|
"close-button": !1
|
|
@@ -3376,9 +3420,9 @@ const Kr = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
3376
3420
|
"side-sheet-header": oe(() => {
|
|
3377
3421
|
var re, le;
|
|
3378
3422
|
return [
|
|
3379
|
-
e("div",
|
|
3380
|
-
e("div",
|
|
3381
|
-
e("div",
|
|
3423
|
+
e("div", fn, [
|
|
3424
|
+
e("div", yn, [
|
|
3425
|
+
e("div", vn, d(m(h)("inventory.transfer.receiveRequest.details.title") + ((re = o.purchaseOrder) != null && re.seqNumber ? ` #${(le = o.purchaseOrder) == null ? void 0 : le.seqNumber}` : "")), 1),
|
|
3382
3426
|
L(E, {
|
|
3383
3427
|
class: "ml-auto -m-2",
|
|
3384
3428
|
variant: "tertiary",
|
|
@@ -3391,113 +3435,128 @@ const Kr = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
3391
3435
|
modelValue: Q.value,
|
|
3392
3436
|
"onUpdate:modelValue": u[1] || (u[1] = (ve) => Q.value = ve)
|
|
3393
3437
|
}, null, 8, ["items", "modelValue"]),
|
|
3394
|
-
|
|
3438
|
+
o.purchaseOrder && Q.value.value === "deliveryHistory" ? (i(), ie(Qo, {
|
|
3395
3439
|
key: 0,
|
|
3396
|
-
"purchase-order":
|
|
3440
|
+
"purchase-order": o.purchaseOrder,
|
|
3397
3441
|
"received-info-map": ee.value,
|
|
3398
3442
|
onSubmitted: u[2] || (u[2] = () => {
|
|
3399
3443
|
l("update:show", !1), l("submitted");
|
|
3400
3444
|
})
|
|
3401
|
-
}, null, 8, ["purchase-order", "received-info-map"])) :
|
|
3445
|
+
}, null, 8, ["purchase-order", "received-info-map"])) : M("", !0)
|
|
3402
3446
|
])
|
|
3403
3447
|
];
|
|
3404
3448
|
}),
|
|
3405
3449
|
default: oe(() => {
|
|
3406
|
-
var re, le, ve, Ae,
|
|
3450
|
+
var re, le, ve, Ae, Le;
|
|
3407
3451
|
return [
|
|
3408
|
-
e("div",
|
|
3409
|
-
Q.value.value === "overview" ? (i(),
|
|
3452
|
+
e("div", bn, [
|
|
3453
|
+
Q.value.value === "overview" ? (i(), v(fe, { key: 0 }, [
|
|
3410
3454
|
e("div", null, [
|
|
3411
|
-
L(
|
|
3455
|
+
L(D, {
|
|
3412
3456
|
variant: "outlined",
|
|
3413
3457
|
class: "flex flex-col gap-8 px-12 py-16"
|
|
3414
3458
|
}, {
|
|
3415
3459
|
default: oe(() => {
|
|
3416
|
-
var se, me,
|
|
3460
|
+
var se, me, ge, Se, $e, Fe, pe, _e, Me, Be;
|
|
3417
3461
|
return [
|
|
3418
|
-
e("div",
|
|
3419
|
-
e("div",
|
|
3420
|
-
e("div",
|
|
3421
|
-
L(Be, null, {
|
|
3422
|
-
default: oe(() => {
|
|
3423
|
-
var rt;
|
|
3424
|
-
return [
|
|
3425
|
-
Pe(p((rt = s.purchaseOrder) == null ? void 0 : rt.status), 1)
|
|
3426
|
-
];
|
|
3427
|
-
}),
|
|
3428
|
-
_: 1
|
|
3429
|
-
}),
|
|
3462
|
+
e("div", hn, [
|
|
3463
|
+
e("div", gn, d(m(h)("inventory.transfer.receiveRequest.details.requestSummary")), 1),
|
|
3464
|
+
e("div", _n, [
|
|
3430
3465
|
L(K, {
|
|
3431
3466
|
label: w.value.status,
|
|
3432
|
-
class:
|
|
3467
|
+
class: Pe(w.value.statusClass),
|
|
3433
3468
|
compact: ""
|
|
3434
3469
|
}, null, 8, ["label", "class"]),
|
|
3435
|
-
R.value ? (i(),
|
|
3470
|
+
R.value ? (i(), v("div", xn, [
|
|
3436
3471
|
L(B, {
|
|
3437
3472
|
name: "local_shipping",
|
|
3438
3473
|
color: "#666666"
|
|
3439
3474
|
}),
|
|
3440
|
-
e("span",
|
|
3441
|
-
])) :
|
|
3475
|
+
e("span", Sn, d(R.value), 1)
|
|
3476
|
+
])) : M("", !0)
|
|
3442
3477
|
])
|
|
3443
3478
|
]),
|
|
3444
3479
|
L(J),
|
|
3445
|
-
e("div",
|
|
3446
|
-
|
|
3447
|
-
|
|
3448
|
-
|
|
3480
|
+
e("div", On, [
|
|
3481
|
+
L(Ut, { title: "Debug Info" }, {
|
|
3482
|
+
default: oe(() => {
|
|
3483
|
+
var rt, St, Ot, wt, Ct, Dt, $t, kt, Rt, Nt, At, Pt;
|
|
3484
|
+
return [
|
|
3485
|
+
(rt = o.purchaseOrder) != null && rt._id ? (i(), v("div", wn, [
|
|
3486
|
+
u[9] || (u[9] = e("span", { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, " Purchase Order ID ", -1)),
|
|
3487
|
+
e("span", Cn, d((St = o.purchaseOrder) == null ? void 0 : St._id), 1)
|
|
3488
|
+
])) : M("", !0),
|
|
3489
|
+
(Ot = o.purchaseOrder) != null && Ot.status ? (i(), v("div", Dn, [
|
|
3490
|
+
u[10] || (u[10] = e("span", { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, " Purchase Order Status ", -1)),
|
|
3491
|
+
e("span", $n, d((wt = o.purchaseOrder) == null ? void 0 : wt.status), 1)
|
|
3492
|
+
])) : M("", !0),
|
|
3493
|
+
(Dt = (Ct = o.purchaseOrder) == null ? void 0 : Ct.supplier) != null && Dt._id ? (i(), v("div", kn, [
|
|
3494
|
+
u[11] || (u[11] = e("span", { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, " Source Location ID ", -1)),
|
|
3495
|
+
e("span", Rn, d(((kt = ($t = o.purchaseOrder) == null ? void 0 : $t.supplier) == null ? void 0 : kt.internal) != null ? `${(Nt = (Rt = o.purchaseOrder) == null ? void 0 : Rt.supplier) == null ? void 0 : Nt.internal}_` : "") + d((Pt = (At = o.purchaseOrder) == null ? void 0 : At.supplier) == null ? void 0 : Pt._id), 1)
|
|
3496
|
+
])) : M("", !0),
|
|
3497
|
+
o.transferToDbName ? (i(), v("div", Nn, [
|
|
3498
|
+
u[12] || (u[12] = e("span", { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, " Destination Location ID ", -1)),
|
|
3499
|
+
e("span", An, d(o.transferToDbName), 1)
|
|
3500
|
+
])) : M("", !0)
|
|
3501
|
+
];
|
|
3502
|
+
}),
|
|
3503
|
+
_: 1
|
|
3504
|
+
}),
|
|
3505
|
+
e("div", Pn, [
|
|
3506
|
+
e("div", Tn, [
|
|
3507
|
+
e("div", Fn, d(m(h)("inventory.transfer.receiveRequest.details.createdAt")), 1)
|
|
3449
3508
|
]),
|
|
3450
|
-
e("div",
|
|
3509
|
+
e("div", In, d(m(tt)(((se = o.purchaseOrder) == null ? void 0 : se._id) ?? "")), 1)
|
|
3451
3510
|
]),
|
|
3452
|
-
(me =
|
|
3453
|
-
e("div",
|
|
3454
|
-
e("div",
|
|
3455
|
-
])) :
|
|
3456
|
-
e("div",
|
|
3457
|
-
e("div",
|
|
3458
|
-
e("div",
|
|
3459
|
-
`inventory.transfer.receiveRequest.details.type.${
|
|
3511
|
+
(me = o.purchaseOrder) != null && me.effectiveAt ? (i(), v("div", qn, [
|
|
3512
|
+
e("div", En, d(m(h)("inventory.transfer.receiveRequest.details.backdatedTo")), 1),
|
|
3513
|
+
e("div", Vn, d(m(_t)(new Date((ge = o.purchaseOrder) == null ? void 0 : ge.effectiveAt))), 1)
|
|
3514
|
+
])) : M("", !0),
|
|
3515
|
+
e("div", Ln, [
|
|
3516
|
+
e("div", Mn, d(m(h)("inventory.transfer.receiveRequest.details.type.title")), 1),
|
|
3517
|
+
e("div", Un, d(m(h)(
|
|
3518
|
+
`inventory.transfer.receiveRequest.details.type.${U.value.toLocaleLowerCase("en-US")}`
|
|
3460
3519
|
)), 1)
|
|
3461
3520
|
]),
|
|
3462
|
-
($e = (Se =
|
|
3463
|
-
e("div",
|
|
3464
|
-
e("div",
|
|
3465
|
-
])) :
|
|
3466
|
-
|
|
3467
|
-
e("div",
|
|
3468
|
-
e("div",
|
|
3469
|
-
])) :
|
|
3470
|
-
(_e =
|
|
3471
|
-
e("div",
|
|
3472
|
-
e("div",
|
|
3473
|
-
])) :
|
|
3474
|
-
(
|
|
3475
|
-
e("div",
|
|
3476
|
-
e("div",
|
|
3477
|
-
])) :
|
|
3478
|
-
((
|
|
3479
|
-
e("div",
|
|
3480
|
-
e("div",
|
|
3481
|
-
])) :
|
|
3521
|
+
($e = (Se = o.purchaseOrder) == null ? void 0 : Se.supplier) != null && $e.name ? (i(), v("div", jn, [
|
|
3522
|
+
e("div", Bn, d(m(h)("inventory.transfer.receiveRequest.details.from")), 1),
|
|
3523
|
+
e("div", zn, d((pe = (Fe = o.purchaseOrder) == null ? void 0 : Fe.supplier) == null ? void 0 : pe.name), 1)
|
|
3524
|
+
])) : M("", !0),
|
|
3525
|
+
o.transferTo ? (i(), v("div", Kn, [
|
|
3526
|
+
e("div", Hn, d(m(h)("inventory.transfer.receiveRequest.details.to")), 1),
|
|
3527
|
+
e("div", Wn, d(o.transferTo), 1)
|
|
3528
|
+
])) : M("", !0),
|
|
3529
|
+
(_e = o.purchaseOrder) != null && _e.ref ? (i(), v("div", Gn, [
|
|
3530
|
+
e("div", Yn, d(m(h)("inventory.transfer.receiveRequest.details.reference")), 1),
|
|
3531
|
+
e("div", Qn, d(o.purchaseOrder.ref), 1)
|
|
3532
|
+
])) : M("", !0),
|
|
3533
|
+
(Me = o.purchaseOrder) != null && Me.remark ? (i(), v("div", Jn, [
|
|
3534
|
+
e("div", Xn, d(m(h)("inventory.transfer.receiveRequest.details.remark")), 1),
|
|
3535
|
+
e("div", Zn, d(o.purchaseOrder.remark), 1)
|
|
3536
|
+
])) : M("", !0),
|
|
3537
|
+
((Be = o.purchaseOrder) == null ? void 0 : Be.status) === m(ae).enum.DRAFT && Ge.value ? (i(), v("div", ea, [
|
|
3538
|
+
e("div", ta, d(m(h)("inventory.transfer.receiveRequest.details.rejectionReason")), 1),
|
|
3539
|
+
e("div", ra, d(Ge.value !== "" ? Ge.value : "-"), 1)
|
|
3540
|
+
])) : M("", !0)
|
|
3482
3541
|
])
|
|
3483
3542
|
];
|
|
3484
3543
|
}),
|
|
3485
3544
|
_: 1
|
|
3486
3545
|
})
|
|
3487
3546
|
]),
|
|
3488
|
-
L(
|
|
3489
|
-
"po-request":
|
|
3490
|
-
purchaseOrder:
|
|
3491
|
-
transferType:
|
|
3492
|
-
transferToDbName:
|
|
3493
|
-
scope:
|
|
3547
|
+
L(so, {
|
|
3548
|
+
"po-request": o.poRequest,
|
|
3549
|
+
purchaseOrder: o.purchaseOrder,
|
|
3550
|
+
transferType: U.value,
|
|
3551
|
+
transferToDbName: o.transferToDbName,
|
|
3552
|
+
scope: o.scope
|
|
3494
3553
|
}, null, 8, ["po-request", "purchaseOrder", "transferType", "transferToDbName", "scope"]),
|
|
3495
|
-
e("div",
|
|
3496
|
-
e("div",
|
|
3497
|
-
e("div",
|
|
3498
|
-
e("span",
|
|
3499
|
-
|
|
3500
|
-
(le = (re =
|
|
3554
|
+
e("div", sa, [
|
|
3555
|
+
e("div", oa, [
|
|
3556
|
+
e("div", na, [
|
|
3557
|
+
e("span", aa, [
|
|
3558
|
+
Ee(d(I.value ? m(h)("inventory.transfer.receiveRequest.details.receivedItems") : m(h)("inventory.transfer.receiveRequest.details.requestedItems")) + " ", 1),
|
|
3559
|
+
(le = (re = o.purchaseOrder) == null ? void 0 : re.netSuite) != null && le.missingItems && ((Ae = (ve = o.purchaseOrder) == null ? void 0 : ve.netSuite) == null ? void 0 : Ae.missingItems.length) > 0 ? (i(), ie(te, {
|
|
3501
3560
|
key: 0,
|
|
3502
3561
|
variant: "rich",
|
|
3503
3562
|
placement: "top",
|
|
@@ -3506,8 +3565,8 @@ const Kr = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
3506
3565
|
content: oe(() => {
|
|
3507
3566
|
var se, me;
|
|
3508
3567
|
return [
|
|
3509
|
-
e("div",
|
|
3510
|
-
(i(!0),
|
|
3568
|
+
e("div", la, [
|
|
3569
|
+
(i(!0), v(fe, null, ke((me = (se = o.purchaseOrder) == null ? void 0 : se.netSuite) == null ? void 0 : me.missingItems, (ge, Se) => (i(), v("div", {
|
|
3511
3570
|
class: "flex justify-center align-middle",
|
|
3512
3571
|
key: Se
|
|
3513
3572
|
}, [
|
|
@@ -3515,7 +3574,7 @@ const Kr = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
3515
3574
|
name: "arrow_right",
|
|
3516
3575
|
size: "sm"
|
|
3517
3576
|
}),
|
|
3518
|
-
|
|
3577
|
+
Ee(" " + d(`(${ge.netSuiteId}) ${ge.name}: ${ge.reason}`), 1)
|
|
3519
3578
|
]))), 128))
|
|
3520
3579
|
])
|
|
3521
3580
|
];
|
|
@@ -3528,19 +3587,19 @@ const Kr = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
3528
3587
|
})
|
|
3529
3588
|
]),
|
|
3530
3589
|
_: 1
|
|
3531
|
-
})) :
|
|
3590
|
+
})) : M("", !0)
|
|
3532
3591
|
])
|
|
3533
3592
|
]),
|
|
3534
3593
|
L(J),
|
|
3535
|
-
(i(!0),
|
|
3536
|
-
var
|
|
3537
|
-
return i(),
|
|
3594
|
+
(i(!0), v(fe, null, ke(((Le = o.purchaseOrder) == null ? void 0 : Le.items) ?? [], (se, me) => {
|
|
3595
|
+
var ge;
|
|
3596
|
+
return i(), v("div", {
|
|
3538
3597
|
key: me,
|
|
3539
3598
|
class: "flex flex-col"
|
|
3540
3599
|
}, [
|
|
3541
|
-
e("div",
|
|
3542
|
-
e("div",
|
|
3543
|
-
|
|
3600
|
+
e("div", ia, [
|
|
3601
|
+
e("div", ca, [
|
|
3602
|
+
Ee(d(se.name) + " ", 1),
|
|
3544
3603
|
Re(se) ? (i(), ie(te, {
|
|
3545
3604
|
key: 0,
|
|
3546
3605
|
variant: "rich",
|
|
@@ -3550,10 +3609,10 @@ const Kr = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
3550
3609
|
content: oe(() => {
|
|
3551
3610
|
var Se, $e;
|
|
3552
3611
|
return [
|
|
3553
|
-
e("div",
|
|
3554
|
-
u[
|
|
3555
|
-
e("div", null, "Original Amount: " +
|
|
3556
|
-
e("div", null, " New Amount: " +
|
|
3612
|
+
e("div", ua, [
|
|
3613
|
+
u[13] || (u[13] = e("div", { class: "font-semibold" }, "Submission changes", -1)),
|
|
3614
|
+
e("div", null, "Original Amount: " + d((Se = we(se)) == null ? void 0 : Se.originalAmount), 1),
|
|
3615
|
+
e("div", null, " New Amount: " + d(($e = we(se)) == null ? void 0 : $e.newAmount), 1)
|
|
3557
3616
|
])
|
|
3558
3617
|
];
|
|
3559
3618
|
}),
|
|
@@ -3565,52 +3624,52 @@ const Kr = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
3565
3624
|
})
|
|
3566
3625
|
]),
|
|
3567
3626
|
_: 2
|
|
3568
|
-
}, 1024)) :
|
|
3627
|
+
}, 1024)) : M("", !0)
|
|
3569
3628
|
]),
|
|
3570
|
-
e("div",
|
|
3629
|
+
e("div", da, [
|
|
3571
3630
|
e("span", {
|
|
3572
3631
|
innerHTML: V(se)
|
|
3573
|
-
}, null, 8,
|
|
3632
|
+
}, null, 8, ma)
|
|
3574
3633
|
])
|
|
3575
3634
|
]),
|
|
3576
|
-
e("div",
|
|
3577
|
-
e("div",
|
|
3578
|
-
|
|
3579
|
-
e("span",
|
|
3580
|
-
(
|
|
3635
|
+
e("div", pa, [
|
|
3636
|
+
e("div", fa, d(se.code), 1),
|
|
3637
|
+
m(f).enableTotalCost ? (i(), v("div", ya, [
|
|
3638
|
+
e("span", va, d(m(Je)(
|
|
3639
|
+
(ge = se.totalCost) != null && ge.amount ? se.totalCost : m(y).controller.value.getItemCost(se, m(De)()).cost
|
|
3581
3640
|
)), 1),
|
|
3582
|
-
|
|
3583
|
-
u[
|
|
3584
|
-
|
|
3641
|
+
x(se) ? M("", !0) : (i(), v("span", ba, [
|
|
3642
|
+
u[14] || (u[14] = e("span", { class: "w-1.5 h-1.5 rounded-full bg-gray-400" }, null, -1)),
|
|
3643
|
+
Ee(" " + d(m(h)("inventory.transfer.form.items.autoCalculated")), 1)
|
|
3585
3644
|
]))
|
|
3586
|
-
])) :
|
|
3645
|
+
])) : M("", !0)
|
|
3587
3646
|
])
|
|
3588
3647
|
]);
|
|
3589
3648
|
}), 128)),
|
|
3590
|
-
+
|
|
3591
|
-
e("div",
|
|
3649
|
+
+m(be)(m(y).controller.value.getTotalCosts()) ? (i(), v(fe, { key: 0 }, [
|
|
3650
|
+
e("div", ha, [
|
|
3592
3651
|
L(J)
|
|
3593
3652
|
]),
|
|
3594
|
-
e("div",
|
|
3595
|
-
u[
|
|
3596
|
-
e("div",
|
|
3597
|
-
...
|
|
3598
|
-
currency:
|
|
3653
|
+
e("div", ga, [
|
|
3654
|
+
u[15] || (u[15] = e("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, "Total:", -1)),
|
|
3655
|
+
e("div", _a, d(m(De)()) + " " + d(m(Je)({
|
|
3656
|
+
...m(y).controller.value.getTotalCosts(),
|
|
3657
|
+
currency: m(De)()
|
|
3599
3658
|
}).replace(/[^0-9.,]/g, "")), 1)
|
|
3600
3659
|
])
|
|
3601
|
-
], 64)) :
|
|
3660
|
+
], 64)) : M("", !0)
|
|
3602
3661
|
])
|
|
3603
3662
|
])
|
|
3604
|
-
], 64)) : Q.value.value === "deliveryHistory" ? (i(),
|
|
3605
|
-
g.value.length ? (i(),
|
|
3606
|
-
(i(!0),
|
|
3607
|
-
var
|
|
3608
|
-
return i(),
|
|
3609
|
-
e("div",
|
|
3610
|
-
e("div",
|
|
3611
|
-
e("div",
|
|
3663
|
+
], 64)) : Q.value.value === "deliveryHistory" ? (i(), v("div", xa, [
|
|
3664
|
+
g.value.length ? (i(), v("div", Da, [
|
|
3665
|
+
(i(!0), v(fe, null, ke(g.value, (se, me) => {
|
|
3666
|
+
var ge, Se, $e, Fe, pe;
|
|
3667
|
+
return i(), v(fe, { key: me }, [
|
|
3668
|
+
e("div", $a, [
|
|
3669
|
+
e("div", ka, [
|
|
3670
|
+
e("div", Ra, [
|
|
3612
3671
|
e("div", {
|
|
3613
|
-
class:
|
|
3672
|
+
class: Pe([
|
|
3614
3673
|
{
|
|
3615
3674
|
"bg-fm-color-primary": me !== 0,
|
|
3616
3675
|
"bg-white": me === 0
|
|
@@ -3619,17 +3678,17 @@ const Kr = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
3619
3678
|
])
|
|
3620
3679
|
}, null, 2)
|
|
3621
3680
|
]),
|
|
3622
|
-
e("div",
|
|
3681
|
+
e("div", Na, [
|
|
3623
3682
|
se.header === "Received" ? (i(), ie(B, {
|
|
3624
3683
|
key: 0,
|
|
3625
3684
|
name: "local_shipping",
|
|
3626
3685
|
outline: "",
|
|
3627
3686
|
color: "#ffffff"
|
|
3628
|
-
})) :
|
|
3687
|
+
})) : M("", !0)
|
|
3629
3688
|
]),
|
|
3630
|
-
e("div",
|
|
3689
|
+
e("div", Aa, [
|
|
3631
3690
|
e("div", {
|
|
3632
|
-
class:
|
|
3691
|
+
class: Pe([
|
|
3633
3692
|
{
|
|
3634
3693
|
"bg-fm-color-primary": me < g.value.length - 1,
|
|
3635
3694
|
"bg-white": me >= g.value.length - 1
|
|
@@ -3639,44 +3698,48 @@ const Kr = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
3639
3698
|
}, null, 2)
|
|
3640
3699
|
])
|
|
3641
3700
|
]),
|
|
3642
|
-
e("div",
|
|
3643
|
-
e("div",
|
|
3644
|
-
e("div",
|
|
3645
|
-
e("div",
|
|
3701
|
+
e("div", Pa, [
|
|
3702
|
+
e("div", Ta, [
|
|
3703
|
+
e("div", Fa, d(se.header), 1),
|
|
3704
|
+
e("div", Ia, d(se.date), 1)
|
|
3646
3705
|
]),
|
|
3647
|
-
e("div",
|
|
3648
|
-
se.header === "Received" && se.deliveryOrder &&
|
|
3706
|
+
e("div", qa, [
|
|
3707
|
+
se.header === "Received" && se.deliveryOrder && o.purchaseOrder ? (i(), ie(Co, {
|
|
3649
3708
|
key: 0,
|
|
3650
3709
|
deliveryOrder: se.deliveryOrder,
|
|
3651
|
-
purchaseOrder:
|
|
3710
|
+
purchaseOrder: o.purchaseOrder,
|
|
3652
3711
|
onSubmitted: u[3] || (u[3] = () => {
|
|
3653
3712
|
l("update:show", !1), l("submitted");
|
|
3654
3713
|
})
|
|
3655
|
-
}, null, 8, ["deliveryOrder", "purchaseOrder"])) :
|
|
3656
|
-
(Se = (
|
|
3714
|
+
}, null, 8, ["deliveryOrder", "purchaseOrder"])) : M("", !0),
|
|
3715
|
+
(Se = (ge = se.deliveryOrder) == null ? void 0 : ge.netSuite) != null && Se.id ? (i(), ie(Ut, {
|
|
3716
|
+
key: 1,
|
|
3717
|
+
title: "Admin",
|
|
3718
|
+
class: "min-w-[140px]"
|
|
3719
|
+
}, {
|
|
3657
3720
|
default: oe(() => {
|
|
3658
|
-
var _e,
|
|
3721
|
+
var _e, Me;
|
|
3659
3722
|
return [
|
|
3660
|
-
L(
|
|
3661
|
-
"netsuite-id": (
|
|
3723
|
+
L(pn, {
|
|
3724
|
+
"netsuite-id": (Me = (_e = se.deliveryOrder) == null ? void 0 : _e.netSuite) == null ? void 0 : Me.id
|
|
3662
3725
|
}, null, 8, ["netsuite-id"])
|
|
3663
3726
|
];
|
|
3664
3727
|
}),
|
|
3665
3728
|
_: 2
|
|
3666
|
-
}, 1024)) :
|
|
3667
|
-
|
|
3729
|
+
}, 1024)) : M("", !0),
|
|
3730
|
+
o.purchaseOrder && (($e = se.deliveryOrder) != null && $e.id) ? (i(), ie(Ir, {
|
|
3668
3731
|
key: 2,
|
|
3669
|
-
"purchase-order-id": (Fe =
|
|
3732
|
+
"purchase-order-id": (Fe = o.purchaseOrder) == null ? void 0 : Fe._id,
|
|
3670
3733
|
"delivery-order-id": (pe = se.deliveryOrder) == null ? void 0 : pe.id
|
|
3671
|
-
}, null, 8, ["purchase-order-id", "delivery-order-id"])) :
|
|
3734
|
+
}, null, 8, ["purchase-order-id", "delivery-order-id"])) : M("", !0)
|
|
3672
3735
|
])
|
|
3673
3736
|
])
|
|
3674
3737
|
]),
|
|
3675
|
-
e("div",
|
|
3676
|
-
e("div",
|
|
3677
|
-
e("div",
|
|
3738
|
+
e("div", Ea, [
|
|
3739
|
+
e("div", Va, [
|
|
3740
|
+
e("div", La, [
|
|
3678
3741
|
e("div", {
|
|
3679
|
-
class:
|
|
3742
|
+
class: Pe([
|
|
3680
3743
|
{
|
|
3681
3744
|
"bg-fm-color-primary": me < g.value.length - 1,
|
|
3682
3745
|
"bg-white": me >= g.value.length - 1
|
|
@@ -3686,26 +3749,26 @@ const Kr = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
3686
3749
|
}, null, 2)
|
|
3687
3750
|
])
|
|
3688
3751
|
]),
|
|
3689
|
-
e("div",
|
|
3690
|
-
L(
|
|
3752
|
+
e("div", Ma, [
|
|
3753
|
+
L(D, {
|
|
3691
3754
|
variant: "outlined",
|
|
3692
3755
|
class: "py-12 px-16"
|
|
3693
3756
|
}, {
|
|
3694
3757
|
default: oe(() => [
|
|
3695
|
-
e("div",
|
|
3696
|
-
(i(!0),
|
|
3697
|
-
key:
|
|
3758
|
+
e("div", Ua, [
|
|
3759
|
+
(i(!0), v(fe, null, ke(se.info, (_e, Me) => (i(), v("div", {
|
|
3760
|
+
key: Me,
|
|
3698
3761
|
class: "flex flex-col gap-4"
|
|
3699
3762
|
}, [
|
|
3700
|
-
e("div",
|
|
3701
|
-
e("div",
|
|
3702
|
-
(i(!0),
|
|
3763
|
+
e("div", ja, d(_e == null ? void 0 : _e.label), 1),
|
|
3764
|
+
e("div", Ba, [
|
|
3765
|
+
(i(!0), v(fe, null, ke(_e == null ? void 0 : _e.values, (Be, rt) => (i(), v("div", {
|
|
3703
3766
|
key: rt,
|
|
3704
3767
|
class: "fm-typo-en-body-lg-600"
|
|
3705
3768
|
}, [
|
|
3706
|
-
typeof
|
|
3707
|
-
|
|
3708
|
-
], 64)) : (i(), ie(
|
|
3769
|
+
typeof Be == "string" ? (i(), v(fe, { key: 0 }, [
|
|
3770
|
+
Ee(d(Be), 1)
|
|
3771
|
+
], 64)) : (i(), ie(dr(Be), { key: 1 }))
|
|
3709
3772
|
]))), 128))
|
|
3710
3773
|
])
|
|
3711
3774
|
]))), 128))
|
|
@@ -3717,58 +3780,58 @@ const Kr = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
3717
3780
|
])
|
|
3718
3781
|
], 64);
|
|
3719
3782
|
}), 128))
|
|
3720
|
-
])) : (i(),
|
|
3783
|
+
])) : (i(), v("div", Sa, [
|
|
3721
3784
|
L(ne),
|
|
3722
3785
|
e("div", null, [
|
|
3723
3786
|
e("img", {
|
|
3724
|
-
src:
|
|
3787
|
+
src: m(Ar),
|
|
3725
3788
|
alt: "List is empty"
|
|
3726
|
-
}, null, 8,
|
|
3789
|
+
}, null, 8, Oa)
|
|
3727
3790
|
]),
|
|
3728
|
-
e("div",
|
|
3729
|
-
e("div",
|
|
3791
|
+
e("div", wa, d(m(h)("inventory.transfer.receiveRequest.details.noRecordsFound")), 1),
|
|
3792
|
+
e("div", Ca, d(m(h)("inventory.transfer.receiveRequest.details.trackDeliveryMessage")), 1),
|
|
3730
3793
|
L(ne),
|
|
3731
3794
|
L(ne)
|
|
3732
3795
|
]))
|
|
3733
|
-
])) :
|
|
3796
|
+
])) : M("", !0)
|
|
3734
3797
|
])
|
|
3735
3798
|
];
|
|
3736
3799
|
}),
|
|
3737
3800
|
"side-sheet-footer": oe(() => [
|
|
3738
|
-
e("div",
|
|
3739
|
-
(i(!0),
|
|
3740
|
-
|
|
3801
|
+
e("div", za, [
|
|
3802
|
+
(i(!0), v(fe, null, ke(S.value, (re) => (i(), v(fe, null, [
|
|
3803
|
+
m(yt)[re].available != !1 ? (i(), ie(E, {
|
|
3741
3804
|
key: re,
|
|
3742
|
-
label:
|
|
3805
|
+
label: m(h)(m(yt)[re].translationKey),
|
|
3743
3806
|
onClick: (le) => F(re),
|
|
3744
3807
|
loading: O.value === re,
|
|
3745
3808
|
disabled: O.value !== re && j.value,
|
|
3746
|
-
variant:
|
|
3747
|
-
}, null, 8, ["label", "onClick", "loading", "disabled", "variant"])) :
|
|
3809
|
+
variant: m(yt)[re].buttonVariant
|
|
3810
|
+
}, null, 8, ["label", "onClick", "loading", "disabled", "variant"])) : M("", !0)
|
|
3748
3811
|
], 64))), 256)),
|
|
3749
|
-
|
|
3812
|
+
m(C).ableToMarkReceived(o.purchaseOrder) && !S.value.includes("completeReceive") ? (i(), ie(E, {
|
|
3750
3813
|
key: 0,
|
|
3751
|
-
label:
|
|
3814
|
+
label: m(h)("inventory.transfer.receiveRequest.actions.completeReceive"),
|
|
3752
3815
|
onClick: u[4] || (u[4] = (re) => F("completeReceive")),
|
|
3753
3816
|
loading: O.value === "completeReceive",
|
|
3754
3817
|
disabled: O.value !== "completeReceive" && j.value
|
|
3755
|
-
}, null, 8, ["label", "loading", "disabled"])) :
|
|
3756
|
-
|
|
3818
|
+
}, null, 8, ["label", "loading", "disabled"])) : M("", !0),
|
|
3819
|
+
m(C).ableToMarkApproved(o.purchaseOrder) && o.canApprove && !S.value.includes("approveRequest") ? (i(), ie(E, {
|
|
3757
3820
|
key: 1,
|
|
3758
|
-
label:
|
|
3821
|
+
label: m(h)("inventory.transfer.approval.actions.approveRequest"),
|
|
3759
3822
|
onClick: u[5] || (u[5] = (re) => F("approveRequest")),
|
|
3760
3823
|
loading: O.value === "approveRequest",
|
|
3761
3824
|
disabled: O.value !== "approveRequest" && j.value
|
|
3762
|
-
}, null, 8, ["label", "loading", "disabled"])) :
|
|
3763
|
-
|
|
3825
|
+
}, null, 8, ["label", "loading", "disabled"])) : M("", !0),
|
|
3826
|
+
m(C).ableToCreateFulfillment(o.purchaseOrder, o.poRequest) && s.scope === "approval" ? (i(), ie(E, {
|
|
3764
3827
|
key: 2,
|
|
3765
|
-
label:
|
|
3828
|
+
label: m(h)("inventory.transfer.receiveRequest.actions.processRequest"),
|
|
3766
3829
|
onClick: u[6] || (u[6] = (re) => F("processRequest")),
|
|
3767
3830
|
loading: O.value === "processRequest",
|
|
3768
3831
|
disabled: O.value !== "processRequest" && j.value
|
|
3769
|
-
}, null, 8, ["label", "loading", "disabled"])) :
|
|
3832
|
+
}, null, 8, ["label", "loading", "disabled"])) : M("", !0),
|
|
3770
3833
|
L(E, {
|
|
3771
|
-
label:
|
|
3834
|
+
label: m(h)("common.close"),
|
|
3772
3835
|
variant: "tertiary",
|
|
3773
3836
|
onClick: u[7] || (u[7] = (re) => l("update:show", !1))
|
|
3774
3837
|
}, null, 8, ["label"])
|
|
@@ -3780,11 +3843,11 @@ const Kr = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
3780
3843
|
}
|
|
3781
3844
|
});
|
|
3782
3845
|
export {
|
|
3783
|
-
|
|
3784
|
-
|
|
3785
|
-
|
|
3786
|
-
|
|
3787
|
-
|
|
3788
|
-
|
|
3789
|
-
|
|
3846
|
+
ht as P,
|
|
3847
|
+
Sl as _,
|
|
3848
|
+
_l as a,
|
|
3849
|
+
xl as b,
|
|
3850
|
+
gl as c,
|
|
3851
|
+
Ht as g,
|
|
3852
|
+
Qt as u
|
|
3790
3853
|
};
|