@feedmepos/mf-inventory-portal 1.2.37-dev.3 → 1.2.37-dev.5
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-CD8VnJ2H.js → App-C--rid9g.js} +3 -3
- package/dist/{ApprovalView-Bolcj_tP.js → ApprovalView-BWp22gJQ.js} +5 -5
- package/dist/{BindingsDialog-lKTIRoyx.js → BindingsDialog-DIx176jc.js} +8 -8
- package/dist/{BindingsPicker-BND4bzyn.js → BindingsPicker-sIB4rH_g.js} +2 -2
- package/dist/{BindingsTable-g3RjbO1T.js → BindingsTable-DF1W_dpw.js} +3 -3
- package/dist/{ClosingDraftView-CKWN87FO.js → ClosingDraftView-BIYeen44.js} +8 -8
- package/dist/{ClosingHistoryView-CuNlKY6J.js → ClosingHistoryView-C1Hp60X5.js} +23 -23
- package/dist/{ClosingTemplateView-DWxJYyX6.js → ClosingTemplateView-DYBLy0BS.js} +14 -14
- package/dist/{DeliveryOrderPrintPreview-B3j5bRvr.js → DeliveryOrderPrintPreview-B_WubjDZ.js} +9 -9
- package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-6YZN79sn.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-BsIerHRN.js} +60 -61
- package/dist/{FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-BWj71msy.js → FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-BHZD0tBw.js} +2 -2
- package/dist/{FmMultiselectDialog-C3-2Dr6d.js → FmMultiselectDialog-DVNO-uNg.js} +2 -2
- package/dist/{FmMultiselectDialog-CWgEzEwT.js → FmMultiselectDialog-DfpLQ-TG.js} +1 -1
- package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-DLIipU_w.js → FmUnitInput.vue_vue_type_script_setup_true_lang-Bgrj7ZCq.js} +3 -3
- package/dist/{ImportView-CQU75C7a.js → ImportView-DGEpuBVQ.js} +6 -6
- package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-BV3xSQCM.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-DzXaqj0C.js} +1 -1
- package/dist/{IngredientGroupView-D3WW4zUe.js → IngredientGroupView-DJQWGZyr.js} +5 -5
- package/dist/{IngredientsView-YzKkGD7A.js → IngredientsView-C1en_8YA.js} +14 -14
- package/dist/{IntegrationView-CJ3n2xwM.js → IntegrationView-CwTy3agW.js} +124 -120
- package/dist/{InventoryBindingForm-Dfo61wMe.js → InventoryBindingForm-BRS_Fmza.js} +1 -1
- package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-BMxnjBbe.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-B4U9V3FS.js} +14 -14
- package/dist/{InventoryBindingSummary-3hzbFGYh.js → InventoryBindingSummary-DI2Bc3jD.js} +1 -1
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-J2HLdfnn.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-BNpisdur.js} +1 -1
- package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-BMZKKl_Z.js → PremiumBadge.vue_vue_type_script_setup_true_lang-2m3BLO-g.js} +2 -2
- package/dist/{PublishView-B20R6kNi.js → PublishView-DhS7o5Hx.js} +3 -3
- package/dist/{PurchaseOrderPrintPreview-WC_Y24lf.js → PurchaseOrderPrintPreview-DEn1zDFr.js} +9 -9
- package/dist/ReceiveRequestView-DVKPNknh.js +2839 -0
- package/dist/{RecipeView-Bbgjm3Bt.js → RecipeView-CvWEmOXf.js} +8 -8
- package/dist/{StockView-optz_EZ6.js → StockView-CSWJovvw.js} +15 -15
- package/dist/{SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-BBC-ZUNx.js → SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-CTNFLn4_.js} +1 -1
- package/dist/{SupplierView-4SURx1s3.js → SupplierView-CC7lHFj0.js} +11 -11
- package/dist/{SystemTrailDialog.vue_vue_type_script_setup_true_lang-dTqgPsg7.js → SystemTrailDialog.vue_vue_type_script_setup_true_lang-B8cZqhV9.js} +2 -2
- package/dist/{TemplatePublishDialog.vue_vue_type_script_setup_true_lang-BhwX2jFa.js → TemplatePublishDialog.vue_vue_type_script_setup_true_lang-BJRPmG57.js} +1 -1
- package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-B3GqoprI.js → TransferDetails.vue_vue_type_script_setup_true_lang--22Xp6iV.js} +374 -374
- package/dist/{TransferTemplateView-1aLMHMeM.js → TransferTemplateView-DDK4eVMr.js} +354 -354
- package/dist/{UnitView-CD2vaeCV.js → UnitView-pslNAUpI.js} +6 -6
- package/dist/{WarehouseView-DUVodtRz.js → WarehouseView-ByX6FKFl.js} +5 -5
- package/dist/{WastageTemplateView-BfTAruKY.js → WastageTemplateView-4HuLPZ-X.js} +14 -14
- package/dist/api/netsuite.d.ts +4 -1
- package/dist/{app-BwepdcDI.js → app-CUmp0PVy.js} +3997 -3981
- package/dist/app.d.ts +3 -0
- package/dist/app.js +1 -1
- package/dist/{closing-template-DL6w2Dg7.js → closing-template-uj9TdFiy.js} +1 -1
- package/dist/{date2-K4W_yblK.js → date2-xhHs_vRD.js} +1 -1
- package/dist/{dayjs.min-CbTj4kCs.js → dayjs.min-Bvyb1gka.js} +12 -12
- package/dist/{decimal-C4tfRShD.js → decimal-a_Rg7uFi.js} +2 -2
- package/dist/{defineDeepModel-D0UEmaXm.js → defineDeepModel-Bt-NNrQE.js} +1 -1
- package/dist/{duplicate-template-chD1EoHj.js → duplicate-template-DiPVCWxZ.js} +1 -1
- package/dist/feature-DA7ce55A.js +25312 -0
- package/dist/{format-time-from-id-QOYFKV10.js → format-time-from-id-DHP3UfRh.js} +1 -1
- package/dist/{format-unit-display-C1wJe-Gr.js → format-unit-display-O-9_OgTV.js} +245 -246
- package/dist/helper/reactivity.d.ts +11 -0
- package/dist/helper/reactivity.spec.d.ts +1 -0
- package/dist/{import-export.helper-Iwt-idQz.js → import-export.helper-5WiFVwkN.js} +5 -5
- package/dist/{index-ZPzpEsHL.js → index-B70mpPVq.js} +1 -1
- package/dist/{index-BHetDmy2.js → index-BTdam0yI.js} +3 -3
- package/dist/{index-DsXGv2ab.js → index-DByE6wgo.js} +9 -9
- package/dist/{lodash-5E2A8OkY.js → lodash-DSSF3ULA.js} +1 -1
- package/dist/{netsuite-DVvZz2U0.js → netsuite-BUYuykqg.js} +3 -3
- package/dist/{purchase-order-template-BEUYQowA.js → purchase-order-template-D9XrkyM2.js} +1 -1
- package/dist/{rules-CQN_rhwa.js → rules-cBIg-1cp.js} +3 -3
- package/dist/{stock-CEY9W-x-.js → stock-BpQjHPXj.js} +3 -3
- package/dist/{stock-LfuniSDW.js → stock-CPk2bthu.js} +1 -1
- package/dist/{supplier-6OLoIB8O.js → supplier-BG2fOstv.js} +2 -2
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{use-ingredient-select-dialog-zq-B-tyI.js → use-ingredient-select-dialog-B9pfMohw.js} +2 -2
- package/dist/{use-inventory-binding-dialog-DCjNYz-I.js → use-inventory-binding-dialog-BKe4LI4d.js} +2 -2
- package/dist/{use-template-enabled-locations-2-CGOlEVFg.js → use-template-enabled-locations-2-DJ48W1Ky.js} +2 -2
- package/dist/views/receive-request/components/netsuite/NetSuitePanel.vue.d.ts +3 -2
- package/dist/views/receive-request/components/netsuite/NetSuiteProps.d.ts +3 -2
- package/dist/views/receive-request/components/transfer-form/TransferForm.vue.d.ts +518 -2225
- package/dist/views/receive-request/components/transfer-form/TransferForm2.vue.d.ts +1430 -0
- package/dist/views/receive-request/components/transfer-form/TransferFormProps.d.ts +1 -0
- package/dist/views/receive-request/components/transfer-form/composables/use-purchase-order-form-controller.d.ts +13974 -0
- package/dist/views/receive-request/components/transfer-form/composables/use-transfer-items.d.ts +3 -2
- package/dist/views/receive-request/composables/use-process-purchase-order.d.ts +1 -1
- package/dist/views/receive-request/composables/use-receive-request-form.d.ts +6 -6
- package/dist/views/receive-request/composables/use-receive-request-table.d.ts +7 -7
- package/dist/views/receive-request/helper/get-transfer-type.d.ts +1 -2
- package/dist/views/transfer-template/components/transfer-template-form/composables/use-transfer-template-items.d.ts +3 -2
- package/dist/views/transfer-template/components/transfer-template-import/TransferTemplateImportItemProps.d.ts +3 -2
- package/dist/views/transfer-template/helpers/import-export.helper.d.ts +4 -3
- package/dist/{vue-i18n-W94mo81w.js → vue-i18n-CZC2idKj.js} +444 -444
- package/dist/{xlsx-B-urH5Xf.js → xlsx-Me-_9DqL.js} +398 -398
- package/dist/{xlsx.util-CA9U1NRi.js → xlsx.util-jUo-kRE0.js} +1 -1
- package/package.json +2 -2
- package/dist/ReceiveRequestView-D1laHiZU.js +0 -2821
- package/dist/feature-B7AE08ql.js +0 -20162
- package/dist/views/receive-request/constants/purchase-order-transaction-type.d.ts +0 -4
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import { p as wt, f as
|
|
2
|
-
import { ref as J, computed as Y, h as
|
|
1
|
+
import { p as wt, f as He } from "./format-time-from-id-DHP3UfRh.js";
|
|
2
|
+
import { ref as J, computed as Y, h as E, defineComponent as Oe, reactive as $t, onMounted as ft, resolveComponent as z, openBlock as i, createBlock as re, withCtx as X, createElementVNode as e, createVNode as N, unref as v, createElementBlock as S, toDisplayString as h, createCommentVNode as M, Fragment as ue, renderList as _e, createTextVNode as Ce, normalizeClass as Le, watch as Ct, isRef as Rt, resolveDynamicComponent as kt } from "vue";
|
|
3
3
|
import { c as dt } from "./TableActionableRow.vue_vue_type_script_setup_true_lang-DlNJ6kRg.js";
|
|
4
4
|
import { R as me, D as ge } from "./row-action.enum-BcW_L_nE.js";
|
|
5
|
-
import { o as Dt, u as Re,
|
|
6
|
-
import { l as ht, d as bt, a as ve, t as Qe, e as Ke } from "./rules-
|
|
7
|
-
import { F as At } from "./decimal-
|
|
8
|
-
import { t as Tt, c as Ft, h as gt, a as
|
|
9
|
-
import { u as
|
|
5
|
+
import { o as Dt, u as Re, Q as V, T as Xe, L as ee, D as Nt, c as yt, v as it, U as vt, t as Ie, I as we, A as We, s as Fe, B as Te } from "./app-CUmp0PVy.js";
|
|
6
|
+
import { l as ht, d as bt, a as ve, t as Qe, e as Ke } from "./rules-cBIg-1cp.js";
|
|
7
|
+
import { F as At } from "./decimal-a_Rg7uFi.js";
|
|
8
|
+
import { t as Tt, c as Ft, h as gt, a as Ge } from "./date2-xhHs_vRD.js";
|
|
9
|
+
import { u as Me, F as It, a as st } from "./feature-DA7ce55A.js";
|
|
10
10
|
import { useCoreStore as Ze, useI18n as ct } from "@feedmepos/mf-common";
|
|
11
|
-
import { u as et, a as ut, S as xe } from "./netsuite-
|
|
12
|
-
import { useDialog as tt, useSnackbar as
|
|
11
|
+
import { u as et, a as ut, S as xe } from "./netsuite-BUYuykqg.js";
|
|
12
|
+
import { useDialog as tt, useSnackbar as Ue, components as Ye, FmButtonVariant as be, useProxiedModel as Pt } from "@feedmepos/ui-library";
|
|
13
13
|
import { F as Pe } from "./SingleColumnLayout.vue_vue_type_script_setup_true_lang-CWZkVCAj.js";
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import { u as Be, _ as
|
|
17
|
-
import { _ as
|
|
14
|
+
import { E as qt } from "./empty-placeholder-wf6-BWE8.js";
|
|
15
|
+
import { u as Vt, a as Et, f as Lt } from "./format-unit-display-O-9_OgTV.js";
|
|
16
|
+
import { u as Be, _ as Mt } from "./SystemTrailDialog.vue_vue_type_script_setup_true_lang-B8cZqhV9.js";
|
|
17
|
+
import { _ as Ut, a as Bt, b as jt } from "./FmUnitInput.vue_vue_type_script_setup_true_lang-Bgrj7ZCq.js";
|
|
18
18
|
import { u as zt, R as mt } from "./usePromise-CbVUCxhj.js";
|
|
19
|
-
import { c as Kt } from "./index-
|
|
20
|
-
import { i as
|
|
19
|
+
import { c as Kt } from "./index-DByE6wgo.js";
|
|
20
|
+
import { i as Gt } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-BHZD0tBw.js";
|
|
21
21
|
import { F as pt } from "./form-mode.enum-BKiNVH6A.js";
|
|
22
|
-
import { d as _t } from "./defineDeepModel-
|
|
23
|
-
import { u as
|
|
22
|
+
import { d as _t } from "./defineDeepModel-Bt-NNrQE.js";
|
|
23
|
+
import { u as Ht } from "./vue-i18n-CZC2idKj.js";
|
|
24
24
|
const Wt = Dt((k, o) => {
|
|
25
25
|
const a = Re();
|
|
26
26
|
return {
|
|
@@ -39,7 +39,7 @@ const Wt = Dt((k, o) => {
|
|
|
39
39
|
}
|
|
40
40
|
};
|
|
41
41
|
}), St = {
|
|
42
|
-
[
|
|
42
|
+
[V.enum.confirmDraft]: {
|
|
43
43
|
primaryActions: {
|
|
44
44
|
text: "Confirm draft",
|
|
45
45
|
close: !0
|
|
@@ -48,7 +48,7 @@ const Wt = Dt((k, o) => {
|
|
|
48
48
|
message: "Purchase order cannot be changed after confirm draft.",
|
|
49
49
|
successMessage: "Purchase order draft has been confirmed"
|
|
50
50
|
},
|
|
51
|
-
[
|
|
51
|
+
[V.enum.cancelDraft]: {
|
|
52
52
|
primaryActions: {
|
|
53
53
|
text: "Cancel draft",
|
|
54
54
|
close: !0,
|
|
@@ -58,7 +58,7 @@ const Wt = Dt((k, o) => {
|
|
|
58
58
|
message: "Purchase order cannot be changed after cancelled draft.",
|
|
59
59
|
successMessage: "Purchase order draft has been cancelled"
|
|
60
60
|
},
|
|
61
|
-
[
|
|
61
|
+
[V.enum.submitRequest]: {
|
|
62
62
|
primaryActions: {
|
|
63
63
|
text: "Submit request",
|
|
64
64
|
close: !0
|
|
@@ -67,7 +67,7 @@ const Wt = Dt((k, o) => {
|
|
|
67
67
|
message: "Purchase order cannot be changed after confirm draft.",
|
|
68
68
|
successMessage: "Purchase order draft has been submitted"
|
|
69
69
|
},
|
|
70
|
-
[
|
|
70
|
+
[V.enum.completeReceive]: {
|
|
71
71
|
primaryActions: {
|
|
72
72
|
text: "Mark received",
|
|
73
73
|
close: !0
|
|
@@ -76,7 +76,7 @@ const Wt = Dt((k, o) => {
|
|
|
76
76
|
message: "Purchase order cannot be changed after it has complete receiving.",
|
|
77
77
|
successMessage: "Purchase order has been marked as received"
|
|
78
78
|
},
|
|
79
|
-
[
|
|
79
|
+
[V.enum.approveRequest]: {
|
|
80
80
|
primaryActions: {
|
|
81
81
|
text: "Accept request",
|
|
82
82
|
close: !0
|
|
@@ -85,7 +85,7 @@ const Wt = Dt((k, o) => {
|
|
|
85
85
|
message: "Transfer out request will be accepted.",
|
|
86
86
|
successMessage: "Transfer out request has been approved"
|
|
87
87
|
},
|
|
88
|
-
[
|
|
88
|
+
[V.enum.rejectRequest]: {
|
|
89
89
|
primaryActions: {
|
|
90
90
|
text: "Reject request",
|
|
91
91
|
close: !0,
|
|
@@ -95,7 +95,7 @@ const Wt = Dt((k, o) => {
|
|
|
95
95
|
message: "Purchase order will be rejected.",
|
|
96
96
|
successMessage: "Purchase order has been rejected"
|
|
97
97
|
},
|
|
98
|
-
[
|
|
98
|
+
[V.enum.processRequest]: {
|
|
99
99
|
primaryActions: {
|
|
100
100
|
text: "Process request",
|
|
101
101
|
close: !0,
|
|
@@ -132,10 +132,10 @@ function at(k, o, a) {
|
|
|
132
132
|
});
|
|
133
133
|
}
|
|
134
134
|
function xt() {
|
|
135
|
-
const k = Re(), o = Be(), a =
|
|
135
|
+
const k = Re(), o = Be(), a = Me();
|
|
136
136
|
async function f(n, _) {
|
|
137
137
|
const s = k.currentLocationDBName;
|
|
138
|
-
return n.doc.supplier.internal && n.operation ===
|
|
138
|
+
return n.doc.supplier.internal && n.operation === V.enum.confirmDraft && (n.operation = V.enum.submitRequest), await o.processPurchaseOrder(n, _ || s);
|
|
139
139
|
}
|
|
140
140
|
async function y(n, _) {
|
|
141
141
|
const s = k.currentLocationDBName;
|
|
@@ -146,25 +146,25 @@ function xt() {
|
|
|
146
146
|
var lt = /* @__PURE__ */ ((k) => (k.RECEIVE_REQUEST = "receive/request", k.APPROVAL = "approval", k))(lt || {});
|
|
147
147
|
const ze = J(), rt = J();
|
|
148
148
|
function Wn(k, o) {
|
|
149
|
-
const a = tt(), f = Re(), y =
|
|
149
|
+
const a = tt(), f = Re(), y = Me();
|
|
150
150
|
et();
|
|
151
|
-
const n =
|
|
152
|
-
o != null && o.startDate && (o != null && o.endDate) ? o :
|
|
151
|
+
const n = Vt(), _ = Et(), s = J(!1), c = Ue(), x = Be(), w = Wt(), u = J(new Array()), T = J(new Array()), b = J(
|
|
152
|
+
o != null && o.startDate && (o != null && o.endDate) ? o : Gt()
|
|
153
153
|
), F = Y(() => {
|
|
154
|
-
const q = new Date(b.value.startDate),
|
|
154
|
+
const q = new Date(b.value.startDate), U = new Date(b.value.endDate);
|
|
155
155
|
return {
|
|
156
156
|
start: Tt(q).toISOString(),
|
|
157
|
-
end: Ft(
|
|
157
|
+
end: Ft(U).toISOString()
|
|
158
158
|
};
|
|
159
159
|
}), l = J(new Array()), r = Nt(), g = J(null);
|
|
160
160
|
async function d(q) {
|
|
161
|
-
function
|
|
161
|
+
function U(D) {
|
|
162
162
|
const O = {
|
|
163
163
|
mode: pt.CREATE,
|
|
164
164
|
modelValue: q || void 0,
|
|
165
165
|
show: !0,
|
|
166
|
-
"onUpdate:show"(
|
|
167
|
-
ze.value.show =
|
|
166
|
+
"onUpdate:show"(I) {
|
|
167
|
+
ze.value.show = I;
|
|
168
168
|
},
|
|
169
169
|
templateId: D,
|
|
170
170
|
lastClosingDate: g.value
|
|
@@ -185,13 +185,13 @@ function Wn(k, o) {
|
|
|
185
185
|
close: !0
|
|
186
186
|
}
|
|
187
187
|
}).onPrimary(async () => {
|
|
188
|
-
ae = await n.getTemplateId(), ae &&
|
|
188
|
+
ae = await n.getTemplateId(), ae && U(ae);
|
|
189
189
|
}).onSecondary(() => {
|
|
190
|
-
|
|
191
|
-
}) :
|
|
190
|
+
U(void 0);
|
|
191
|
+
}) : U(ae);
|
|
192
192
|
}
|
|
193
193
|
function $(q) {
|
|
194
|
-
const
|
|
194
|
+
const U = {
|
|
195
195
|
mode: pt.UPDATE,
|
|
196
196
|
modelValue: yt(q),
|
|
197
197
|
show: !0,
|
|
@@ -200,22 +200,22 @@ function Wn(k, o) {
|
|
|
200
200
|
},
|
|
201
201
|
lastClosingDate: g.value
|
|
202
202
|
};
|
|
203
|
-
ze.value =
|
|
203
|
+
ze.value = U;
|
|
204
204
|
}
|
|
205
|
-
async function
|
|
205
|
+
async function P() {
|
|
206
206
|
u.value = [], T.value = [], s.value = !0;
|
|
207
207
|
try {
|
|
208
208
|
const q = await x.getPurchaseOrders(F.value);
|
|
209
209
|
u.value = q.sort((j, t) => t._id.localeCompare(j._id));
|
|
210
|
-
const
|
|
210
|
+
const U = q.flatMap((j) => j.shipmentIds || []).filter(Boolean), ae = U.length > 0 ? await w.getShipmentsByIds(U) : [];
|
|
211
211
|
T.value = ae;
|
|
212
212
|
const D = await r.readCurrentLocationLastClosing(!0), O = D == null ? void 0 : D._id;
|
|
213
213
|
O && (g.value = wt(O)), await y.awaitFeatureLoaded(() => y.mustUsePoTemplate) && await _.fetchTemplates();
|
|
214
|
-
const
|
|
214
|
+
const I = u.value.map((j) => {
|
|
215
215
|
var t;
|
|
216
216
|
return ((t = j.request) == null ? void 0 : t.id) ?? "";
|
|
217
217
|
}).filter((j) => j);
|
|
218
|
-
l.value = await x.readRequestByIds(
|
|
218
|
+
l.value = await x.readRequestByIds(I);
|
|
219
219
|
} catch {
|
|
220
220
|
c.open({
|
|
221
221
|
title: "Something went wrong",
|
|
@@ -247,15 +247,15 @@ function Wn(k, o) {
|
|
|
247
247
|
function C() {
|
|
248
248
|
switch (k) {
|
|
249
249
|
case "receive/request":
|
|
250
|
-
return
|
|
250
|
+
return P();
|
|
251
251
|
case "approval":
|
|
252
252
|
return B();
|
|
253
253
|
}
|
|
254
254
|
}
|
|
255
|
-
function K(q,
|
|
255
|
+
function K(q, U) {
|
|
256
256
|
b.value = {
|
|
257
257
|
startDate: q,
|
|
258
|
-
endDate:
|
|
258
|
+
endDate: U
|
|
259
259
|
}, C();
|
|
260
260
|
}
|
|
261
261
|
f.watchLocation(async (q) => {
|
|
@@ -266,16 +266,16 @@ function Wn(k, o) {
|
|
|
266
266
|
await C();
|
|
267
267
|
});
|
|
268
268
|
const Q = J(), se = J(Math.random().toString());
|
|
269
|
-
async function pe(q,
|
|
269
|
+
async function pe(q, U) {
|
|
270
270
|
const ae = Math.random().toString();
|
|
271
|
-
se.value = ae,
|
|
271
|
+
se.value = ae, U ?? (U = l.value.computeFirst(
|
|
272
272
|
(j) => j.purchaseOrderId === q._id ? j : null
|
|
273
273
|
) ?? void 0);
|
|
274
|
-
const D = k === "receive/request" ? f.currentLocation :
|
|
275
|
-
poRequest:
|
|
274
|
+
const D = k === "receive/request" ? f.currentLocation : U == null ? void 0 : U.to, O = k === "approval", I = {
|
|
275
|
+
poRequest: U,
|
|
276
276
|
purchaseOrder: {
|
|
277
277
|
...q,
|
|
278
|
-
status: O && (
|
|
278
|
+
status: O && (U != null && U.rejectedAt) ? ee.Enum.REJECT : q.status
|
|
279
279
|
},
|
|
280
280
|
transferTo: D == null ? void 0 : D.name,
|
|
281
281
|
transferToDbName: D == null ? void 0 : D.dbName,
|
|
@@ -289,20 +289,20 @@ function Wn(k, o) {
|
|
|
289
289
|
receivedMap: Je(q) ?? {},
|
|
290
290
|
shipments: T.value
|
|
291
291
|
};
|
|
292
|
-
Q.value =
|
|
292
|
+
Q.value = I;
|
|
293
293
|
}
|
|
294
|
-
async function fe(q,
|
|
294
|
+
async function fe(q, U, ae, D) {
|
|
295
295
|
const O = xt();
|
|
296
296
|
s.value = !0;
|
|
297
297
|
try {
|
|
298
298
|
await O({
|
|
299
299
|
operate: {
|
|
300
|
-
operation:
|
|
300
|
+
operation: U,
|
|
301
301
|
doc: q,
|
|
302
302
|
options: (
|
|
303
303
|
// auto receive for supplier to warehouse
|
|
304
|
-
(
|
|
305
|
-
|
|
304
|
+
(U === V.enum.confirmDraft || // auto receive for warehouse to warehouse
|
|
305
|
+
U === V.enum.completeReceive) && y.autoReceiveWarehouse ? {
|
|
306
306
|
autoReceive: !0
|
|
307
307
|
} : void 0
|
|
308
308
|
)
|
|
@@ -310,13 +310,13 @@ function Wn(k, o) {
|
|
|
310
310
|
operateV2: {
|
|
311
311
|
_id: q._id,
|
|
312
312
|
_rev: q._rev ?? "",
|
|
313
|
-
action:
|
|
313
|
+
action: U,
|
|
314
314
|
payloads: []
|
|
315
315
|
},
|
|
316
316
|
transferTo: D
|
|
317
317
|
}), await new Promise((t) => setTimeout(t, 1e3));
|
|
318
318
|
const j = Re().currentLocationDBName.startsWith("restaurant_");
|
|
319
|
-
|
|
319
|
+
U === V.enum.confirmDraft && q.effectiveAt && j ? c.open({
|
|
320
320
|
title: "Success",
|
|
321
321
|
message: `${ae}. The backdate will be reflected once your POS has received this change.`,
|
|
322
322
|
type: "success"
|
|
@@ -325,33 +325,33 @@ function Wn(k, o) {
|
|
|
325
325
|
message: ae,
|
|
326
326
|
type: "success"
|
|
327
327
|
});
|
|
328
|
-
} catch (
|
|
328
|
+
} catch (I) {
|
|
329
329
|
c.open({
|
|
330
330
|
title: "Something went wrong",
|
|
331
331
|
message: "Please try again.",
|
|
332
332
|
type: "error"
|
|
333
|
-
}), console.error("Error when submitting PO operation",
|
|
333
|
+
}), console.error("Error when submitting PO operation", U, q, I);
|
|
334
334
|
} finally {
|
|
335
335
|
s.value = !1, C();
|
|
336
336
|
}
|
|
337
337
|
}
|
|
338
|
-
async function ke(q,
|
|
339
|
-
const D = St[
|
|
338
|
+
async function ke(q, U, ae) {
|
|
339
|
+
const D = St[U];
|
|
340
340
|
if (!D) {
|
|
341
341
|
c.open({
|
|
342
342
|
title: "Something went wrong",
|
|
343
|
-
message: `Cannot process order: ${it(
|
|
343
|
+
message: `Cannot process order: ${it(U)}`,
|
|
344
344
|
type: "error"
|
|
345
345
|
});
|
|
346
346
|
return;
|
|
347
347
|
}
|
|
348
|
-
const { successMessage: O, ...
|
|
348
|
+
const { successMessage: O, ...I } = D;
|
|
349
349
|
a.open({
|
|
350
|
-
title:
|
|
351
|
-
message:
|
|
352
|
-
primaryActions:
|
|
350
|
+
title: I.title,
|
|
351
|
+
message: I.message,
|
|
352
|
+
primaryActions: I.primaryActions
|
|
353
353
|
}).onPrimary(() => {
|
|
354
|
-
fe(q,
|
|
354
|
+
fe(q, U, O, ae);
|
|
355
355
|
});
|
|
356
356
|
}
|
|
357
357
|
async function qe() {
|
|
@@ -368,8 +368,8 @@ function Wn(k, o) {
|
|
|
368
368
|
}).onPrimary(() => {
|
|
369
369
|
const q = {
|
|
370
370
|
show: !0,
|
|
371
|
-
"onUpdate:show"(
|
|
372
|
-
rt.value.show =
|
|
371
|
+
"onUpdate:show"(U) {
|
|
372
|
+
rt.value.show = U;
|
|
373
373
|
}
|
|
374
374
|
};
|
|
375
375
|
rt.value = q;
|
|
@@ -422,26 +422,26 @@ function Jt(k) {
|
|
|
422
422
|
city: o.supplier.address.city,
|
|
423
423
|
state: o.supplier.address.state,
|
|
424
424
|
country: o.supplier.address.country
|
|
425
|
-
}, T = o.items.map((
|
|
426
|
-
const { sku: B, measurement: C } =
|
|
427
|
-
Yt(
|
|
425
|
+
}, T = o.items.map((P) => {
|
|
426
|
+
const { sku: B, measurement: C } = P, K = ve(
|
|
427
|
+
Yt(P.sku, o.deliveryOrder || []),
|
|
428
428
|
!1
|
|
429
429
|
);
|
|
430
430
|
return {
|
|
431
431
|
code: B.code,
|
|
432
432
|
description: B.name,
|
|
433
|
-
quantity: ve(
|
|
433
|
+
quantity: ve(P.quantity, !1),
|
|
434
434
|
unit: (C == null ? void 0 : C.abbrev) || B.unit.abbrev,
|
|
435
435
|
received: K,
|
|
436
|
-
cost:
|
|
437
|
-
value:
|
|
436
|
+
cost: P.totalCost ? `${P.totalCost.currency} ${It.toFormatString({
|
|
437
|
+
value: P.totalCost
|
|
438
438
|
})}` : void 0
|
|
439
439
|
};
|
|
440
|
-
}), b = o.deliveryOrder.map((
|
|
441
|
-
createdAt: gt(new Date(
|
|
442
|
-
ref:
|
|
443
|
-
remark:
|
|
444
|
-
items:
|
|
440
|
+
}), b = o.deliveryOrder.map((P) => ({
|
|
441
|
+
createdAt: gt(new Date(P.createdAt)),
|
|
442
|
+
ref: P.deliveryOrderNumber,
|
|
443
|
+
remark: P.remark || "",
|
|
444
|
+
items: P.received.map((B) => {
|
|
445
445
|
var C;
|
|
446
446
|
return {
|
|
447
447
|
code: B.sku.code,
|
|
@@ -458,15 +458,15 @@ function Jt(k) {
|
|
|
458
458
|
];
|
|
459
459
|
let l = "Inventory Receive Note";
|
|
460
460
|
if (o.supplier.internal ? (l = "Inventory Transfer Note", F.includes((f == null ? void 0 : f._id) || "") && (l = "Stock Request")) : l = "Purchase Order", n) {
|
|
461
|
-
const
|
|
462
|
-
a.dbName ===
|
|
461
|
+
const P = n.from.dbName;
|
|
462
|
+
a.dbName === P || (l = "Inventory Receive Note");
|
|
463
463
|
}
|
|
464
464
|
const g = {
|
|
465
465
|
title: l,
|
|
466
466
|
businessName: f == null ? void 0 : f.name,
|
|
467
467
|
logo: f == null ? void 0 : f.thumbnail,
|
|
468
468
|
orderNumber: o.seqNumber.toString(),
|
|
469
|
-
createdAt:
|
|
469
|
+
createdAt: He(o._id),
|
|
470
470
|
ref: o.ref || "",
|
|
471
471
|
remark: o.remark || "",
|
|
472
472
|
buyer: w,
|
|
@@ -477,51 +477,51 @@ function Jt(k) {
|
|
|
477
477
|
}, d = new URL(window.location.href), $ = y && (o.deliveryFullfillment || []).length > 0 ? "receive-request/delivery-print-preview" : "receive-request/print-preview";
|
|
478
478
|
d.pathname = d.hostname.includes("portal.feedme") ? `/inventory/${$}` : `/${$}`, d.searchParams.append("data", JSON.stringify(g)), window.open(d.href, "_blank", "noreferrer");
|
|
479
479
|
}
|
|
480
|
-
const
|
|
480
|
+
const Ee = {
|
|
481
481
|
submitRequest: {
|
|
482
482
|
translationKey: "inventory.transfer.receiveRequest.actions.submitRequest",
|
|
483
483
|
color: "text-fm-color-typo-primary",
|
|
484
|
-
value:
|
|
484
|
+
value: V.enum.submitRequest
|
|
485
485
|
},
|
|
486
486
|
confirmDraft: {
|
|
487
487
|
translationKey: "inventory.transfer.receiveRequest.actions.confirmDraft",
|
|
488
488
|
color: "text-fm-color-typo-primary",
|
|
489
|
-
value:
|
|
489
|
+
value: V.enum.confirmDraft
|
|
490
490
|
},
|
|
491
491
|
cancelDraft: {
|
|
492
492
|
translationKey: "inventory.transfer.receiveRequest.actions.cancelDraft",
|
|
493
493
|
color: "text-fm-color-typo-error",
|
|
494
|
-
value:
|
|
494
|
+
value: V.enum.cancelDraft
|
|
495
495
|
},
|
|
496
496
|
approveRequest: {
|
|
497
497
|
translationKey: "inventory.transfer.receiveRequest.actions.approveRequest",
|
|
498
498
|
color: "text-fm-color-typo-primary",
|
|
499
|
-
value:
|
|
499
|
+
value: V.enum.approveRequest
|
|
500
500
|
},
|
|
501
501
|
rejectRequest: {
|
|
502
502
|
translationKey: "inventory.transfer.receiveRequest.actions.rejectRequest",
|
|
503
503
|
color: "text-fm-color-typo-error",
|
|
504
|
-
value:
|
|
504
|
+
value: V.enum.rejectRequest
|
|
505
505
|
},
|
|
506
506
|
processRequest: {
|
|
507
507
|
translationKey: "inventory.transfer.receiveRequest.actions.processRequest",
|
|
508
508
|
color: "text-fm-color-typo-primary",
|
|
509
|
-
value:
|
|
509
|
+
value: V.enum.processRequest
|
|
510
510
|
},
|
|
511
511
|
receiveStock: {
|
|
512
512
|
translationKey: "inventory.transfer.receiveRequest.actions.receiveStock",
|
|
513
513
|
color: "text-fm-color-typo-primary",
|
|
514
|
-
value:
|
|
514
|
+
value: V.enum.receiveStock
|
|
515
515
|
},
|
|
516
516
|
completeReceive: {
|
|
517
517
|
translationKey: "inventory.transfer.receiveRequest.actions.completeReceive",
|
|
518
518
|
color: "text-fm-color-typo-primary",
|
|
519
|
-
value:
|
|
519
|
+
value: V.enum.completeReceive
|
|
520
520
|
},
|
|
521
521
|
closeRequest: {
|
|
522
522
|
translationKey: "inventory.transfer.receiveRequest.actions.closeRequest",
|
|
523
523
|
color: "system-error-300",
|
|
524
|
-
value:
|
|
524
|
+
value: V.enum.closeRequest
|
|
525
525
|
},
|
|
526
526
|
approveDraft: {
|
|
527
527
|
translationKey: "",
|
|
@@ -536,7 +536,7 @@ const Ve = {
|
|
|
536
536
|
returnStock: {
|
|
537
537
|
translationKey: "inventory.transfer.receiveRequest.actions.returnStock",
|
|
538
538
|
color: "text-fm-color-typo-primary",
|
|
539
|
-
value:
|
|
539
|
+
value: V.enum.returnStock
|
|
540
540
|
}
|
|
541
541
|
};
|
|
542
542
|
function Qn(k, o, a) {
|
|
@@ -547,19 +547,19 @@ function Qn(k, o, a) {
|
|
|
547
547
|
return [
|
|
548
548
|
ge[me.Update],
|
|
549
549
|
ge[me.Details],
|
|
550
|
-
b.supplier.internal === "restaurant" || b.supplier.internal === "warehouse" ?
|
|
551
|
-
|
|
550
|
+
b.supplier.internal === "restaurant" || b.supplier.internal === "warehouse" ? Ee[V.enum.submitRequest] : Ee[V.enum.confirmDraft],
|
|
551
|
+
Ee[V.enum.cancelDraft]
|
|
552
552
|
];
|
|
553
553
|
case "RECEIVING":
|
|
554
554
|
return [
|
|
555
|
-
|
|
555
|
+
Ee[V.enum.completeReceive],
|
|
556
556
|
ge[me.Details],
|
|
557
557
|
ge[me.Print]
|
|
558
558
|
];
|
|
559
559
|
case "REQUESTING":
|
|
560
560
|
return k === "receive/request" ? [ge[me.Details], ge[me.Print]] : [
|
|
561
|
-
|
|
562
|
-
|
|
561
|
+
Ee[V.enum.approveRequest],
|
|
562
|
+
Ee[V.enum.rejectRequest],
|
|
563
563
|
ge[me.Details]
|
|
564
564
|
// DefaultRowActions[RowActionEnum.Print]
|
|
565
565
|
];
|
|
@@ -572,10 +572,10 @@ function Qn(k, o, a) {
|
|
|
572
572
|
}
|
|
573
573
|
}
|
|
574
574
|
function c(b) {
|
|
575
|
-
return Object.values(
|
|
575
|
+
return Object.values(V.enum).includes(b);
|
|
576
576
|
}
|
|
577
577
|
async function x(b, F, l) {
|
|
578
|
-
var g, d, $,
|
|
578
|
+
var g, d, $, P, B, C;
|
|
579
579
|
const r = yt(F);
|
|
580
580
|
if (b === me.Print) {
|
|
581
581
|
const K = (l == null ? void 0 : l.toInventoryLocation) ?? f.currentLocation;
|
|
@@ -583,7 +583,7 @@ function Qn(k, o, a) {
|
|
|
583
583
|
const Q = f.locationRestaurantFromCore(K.doc._id);
|
|
584
584
|
Q !== null && (K.doc = Q);
|
|
585
585
|
}
|
|
586
|
-
((g = l == null ? void 0 : l.netSuite) != null && g.refNo || (d = r.netSuite) != null && d.refNo) && (r.ref = [(($ = l == null ? void 0 : l.netSuite) == null ? void 0 : $.refNo) || ((
|
|
586
|
+
((g = l == null ? void 0 : l.netSuite) != null && g.refNo || (d = r.netSuite) != null && d.refNo) && (r.ref = [(($ = l == null ? void 0 : l.netSuite) == null ? void 0 : $.refNo) || ((P = r.netSuite) == null ? void 0 : P.refNo)].filter((Q) => Q).join(" ")), Jt({
|
|
587
587
|
po: r,
|
|
588
588
|
currentLocation: K,
|
|
589
589
|
business: n.currentBusiness.value,
|
|
@@ -619,7 +619,7 @@ function Qn(k, o, a) {
|
|
|
619
619
|
accessorKey: "_id",
|
|
620
620
|
header: () => _("inventory.transfer.table.createdAt"),
|
|
621
621
|
cell(l) {
|
|
622
|
-
return
|
|
622
|
+
return He(`${l.getValue()}`);
|
|
623
623
|
},
|
|
624
624
|
enableSorting: !0
|
|
625
625
|
},
|
|
@@ -634,14 +634,14 @@ function Qn(k, o, a) {
|
|
|
634
634
|
header: () => _("inventory.transfer.table.noOfItems"),
|
|
635
635
|
cell: (l) => {
|
|
636
636
|
const r = l.row.original.version || "1", g = l.getValue();
|
|
637
|
-
return
|
|
637
|
+
return E("div", { class: "flex items-center gap-2" }, [
|
|
638
638
|
g,
|
|
639
|
-
r !== "1" ?
|
|
639
|
+
r !== "1" ? E(
|
|
640
640
|
"div",
|
|
641
641
|
{ class: "py-3" },
|
|
642
|
-
|
|
642
|
+
E(
|
|
643
643
|
Pe,
|
|
644
|
-
|
|
644
|
+
E(
|
|
645
645
|
"div",
|
|
646
646
|
{
|
|
647
647
|
class: ["fm-status-badge", "fm-status-badge-draft"].join(" ")
|
|
@@ -666,7 +666,7 @@ function Qn(k, o, a) {
|
|
|
666
666
|
...(F = n.sessionUser.value) != null && F.role.isAdmin ? [
|
|
667
667
|
{
|
|
668
668
|
id: "statusForAdmin",
|
|
669
|
-
header: () =>
|
|
669
|
+
header: () => E(Pe, {}, () => `${_("inventory.transfer.table.status")}`),
|
|
670
670
|
cell(l) {
|
|
671
671
|
return l.row.original.status;
|
|
672
672
|
},
|
|
@@ -678,9 +678,9 @@ function Qn(k, o, a) {
|
|
|
678
678
|
accessorKey: "status",
|
|
679
679
|
header: () => _("inventory.transfer.table.status"),
|
|
680
680
|
cell(l) {
|
|
681
|
-
const r = l.getValue(), g = Je(l.row.original), { partial: d, over: $ } = nt(g),
|
|
682
|
-
let B = _(`inventory.transfer.status.${
|
|
683
|
-
|
|
681
|
+
const r = l.getValue(), g = Je(l.row.original), { partial: d, over: $ } = nt(g), P = at(r ?? "", d, $);
|
|
682
|
+
let B = _(`inventory.transfer.status.${P}`), C = `${r ?? ""}`.toLocaleLowerCase("en-us");
|
|
683
|
+
P === ee.enum.CLOSE && (B = `${_(`inventory.transfer.status.${ee.enum.COMPLETE}`)}`), P === "PARTIAL_RECEIVED" && C === ee.enum.PROCESSING.toLocaleLowerCase("en-us") && (C = ee.enum.RECEIVING.toLocaleLowerCase("en-us"));
|
|
684
684
|
let K = null;
|
|
685
685
|
const Q = a.value.find((se) => se.ref === l.row.original._id);
|
|
686
686
|
if (Q != null && Q.milestones && Q.milestones.length > 0) {
|
|
@@ -690,16 +690,16 @@ function Qn(k, o, a) {
|
|
|
690
690
|
K = `${pe.toLocaleString("en-US", { month: "short" })} ${fe}`;
|
|
691
691
|
}
|
|
692
692
|
}
|
|
693
|
-
return
|
|
693
|
+
return E(
|
|
694
694
|
"div",
|
|
695
695
|
{
|
|
696
696
|
class: "flex"
|
|
697
697
|
},
|
|
698
698
|
[
|
|
699
|
-
|
|
699
|
+
E(
|
|
700
700
|
"div",
|
|
701
701
|
{ class: "flex items-center" },
|
|
702
|
-
|
|
702
|
+
E(
|
|
703
703
|
"div",
|
|
704
704
|
{
|
|
705
705
|
class: [
|
|
@@ -712,18 +712,18 @@ function Qn(k, o, a) {
|
|
|
712
712
|
)
|
|
713
713
|
),
|
|
714
714
|
...K ? [
|
|
715
|
-
|
|
715
|
+
E(
|
|
716
716
|
"div",
|
|
717
717
|
{
|
|
718
718
|
class: "flex items-center gap-1 ml-2"
|
|
719
719
|
},
|
|
720
720
|
[
|
|
721
|
-
|
|
721
|
+
E(Ye.FmIcon, {
|
|
722
722
|
name: "local_shipping",
|
|
723
723
|
size: "md",
|
|
724
724
|
color: "neutral-gray-400"
|
|
725
725
|
}),
|
|
726
|
-
|
|
726
|
+
E(
|
|
727
727
|
"span",
|
|
728
728
|
{ class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" },
|
|
729
729
|
K
|
|
@@ -809,7 +809,7 @@ function Qn(k, o, a) {
|
|
|
809
809
|
accessorKey: "purchaseOrder._id",
|
|
810
810
|
header: () => _("inventory.transfer.table.createdAt"),
|
|
811
811
|
cell(l) {
|
|
812
|
-
return
|
|
812
|
+
return He(`${l.getValue()}`);
|
|
813
813
|
},
|
|
814
814
|
enableSorting: !0
|
|
815
815
|
},
|
|
@@ -833,7 +833,7 @@ function Qn(k, o, a) {
|
|
|
833
833
|
...(F = n.sessionUser.value) != null && F.role.isAdmin ? [
|
|
834
834
|
{
|
|
835
835
|
id: "statusForAdmin",
|
|
836
|
-
header: () =>
|
|
836
|
+
header: () => E(Pe, {}, () => `${_("inventory.transfer.table.status")}`),
|
|
837
837
|
cell(l) {
|
|
838
838
|
return l.row.original.status;
|
|
839
839
|
},
|
|
@@ -847,24 +847,24 @@ function Qn(k, o, a) {
|
|
|
847
847
|
cell(l) {
|
|
848
848
|
const r = l.row.original, g = l.getValue();
|
|
849
849
|
if (!r.purchaseOrder)
|
|
850
|
-
return
|
|
850
|
+
return E(Ye.FmChip, {
|
|
851
851
|
label: "N/A",
|
|
852
852
|
compact: !0
|
|
853
853
|
});
|
|
854
|
-
const d = Je(r.purchaseOrder), { partial: $, over:
|
|
854
|
+
const d = Je(r.purchaseOrder), { partial: $, over: P } = nt(d), B = at(g ?? "", $, P);
|
|
855
855
|
let C = _(`inventory.transfer.status.${B}`), K = `${g ?? ""}`.toLocaleLowerCase("en-us");
|
|
856
|
-
return B === ee.enum.CLOSE && (C = `${_(`inventory.transfer.status.${ee.enum.COMPLETE}`)}`), B === "PARTIAL_RECEIVED" && K === ee.enum.PROCESSING.toLocaleLowerCase("en-us") && (K = ee.enum.RECEIVING.toLocaleLowerCase("en-us")), r.rejectedAt && (C = _("inventory.transfer.status.REJECT"), K = ee.enum.REJECT.toLocaleLowerCase("en-us")),
|
|
856
|
+
return B === ee.enum.CLOSE && (C = `${_(`inventory.transfer.status.${ee.enum.COMPLETE}`)}`), B === "PARTIAL_RECEIVED" && K === ee.enum.PROCESSING.toLocaleLowerCase("en-us") && (K = ee.enum.RECEIVING.toLocaleLowerCase("en-us")), r.rejectedAt && (C = _("inventory.transfer.status.REJECT"), K = ee.enum.REJECT.toLocaleLowerCase("en-us")), E(
|
|
857
857
|
"div",
|
|
858
858
|
{
|
|
859
859
|
class: "flex"
|
|
860
860
|
},
|
|
861
|
-
|
|
861
|
+
E(
|
|
862
862
|
"div",
|
|
863
863
|
{
|
|
864
864
|
class: [
|
|
865
865
|
"fm-status-badge",
|
|
866
866
|
`fm-status-badge-${K}`,
|
|
867
|
-
|
|
867
|
+
P && "fm-status-badge-error"
|
|
868
868
|
].filter(Boolean).join(" ")
|
|
869
869
|
},
|
|
870
870
|
`${C}`
|
|
@@ -982,7 +982,7 @@ const Xt = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
982
982
|
header: "Code",
|
|
983
983
|
cell: (T) => {
|
|
984
984
|
const b = a.purchaseOrder.items.find((F) => F.id === T.row.original.id || F.sku._id === T.row.original.sku._id);
|
|
985
|
-
return
|
|
985
|
+
return E(
|
|
986
986
|
v(Ye).FmTooltip,
|
|
987
987
|
{
|
|
988
988
|
content: b.code,
|
|
@@ -990,7 +990,7 @@ const Xt = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
990
990
|
variant: "plain",
|
|
991
991
|
zIndex: 50
|
|
992
992
|
},
|
|
993
|
-
|
|
993
|
+
E(
|
|
994
994
|
"span",
|
|
995
995
|
{
|
|
996
996
|
class: "flex-auto line-clamp-2 text-ellipsis break-all"
|
|
@@ -1004,7 +1004,7 @@ const Xt = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
1004
1004
|
header: "Name",
|
|
1005
1005
|
cell: (T) => {
|
|
1006
1006
|
const b = a.purchaseOrder.items.find((F) => F.id === T.row.original.id || F.sku._id === T.row.original.sku._id);
|
|
1007
|
-
return
|
|
1007
|
+
return E(
|
|
1008
1008
|
v(Ye).FmTooltip,
|
|
1009
1009
|
{
|
|
1010
1010
|
content: b.name,
|
|
@@ -1012,7 +1012,7 @@ const Xt = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
1012
1012
|
variant: "plain",
|
|
1013
1013
|
zIndex: 50
|
|
1014
1014
|
},
|
|
1015
|
-
|
|
1015
|
+
E(
|
|
1016
1016
|
"span",
|
|
1017
1017
|
{
|
|
1018
1018
|
class: "flex-auto line-clamp-2 text-ellipsis break-all"
|
|
@@ -1029,7 +1029,7 @@ const Xt = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
1029
1029
|
amount: 1,
|
|
1030
1030
|
precision: 0
|
|
1031
1031
|
};
|
|
1032
|
-
return
|
|
1032
|
+
return E(Ut, {
|
|
1033
1033
|
style: {
|
|
1034
1034
|
flex: "1 1 0%"
|
|
1035
1035
|
},
|
|
@@ -1148,7 +1148,7 @@ const Xt = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
1148
1148
|
}
|
|
1149
1149
|
};
|
|
1150
1150
|
function ss() {
|
|
1151
|
-
const k =
|
|
1151
|
+
const k = Me();
|
|
1152
1152
|
return {
|
|
1153
1153
|
ableToMarkReceived(o) {
|
|
1154
1154
|
if (!o || o.status !== ee.enum.RECEIVING)
|
|
@@ -1177,7 +1177,7 @@ const rs = { class: "flex flex-row-reverse" }, os = /* @__PURE__ */ Oe({
|
|
|
1177
1177
|
scope: {}
|
|
1178
1178
|
},
|
|
1179
1179
|
setup(k) {
|
|
1180
|
-
const o = k, a = et(), f =
|
|
1180
|
+
const o = k, a = et(), f = Ue(), y = tt(), n = J(!1);
|
|
1181
1181
|
Y(() => {
|
|
1182
1182
|
var w, u, T, b;
|
|
1183
1183
|
let s = !0;
|
|
@@ -1188,10 +1188,10 @@ const rs = { class: "flex flex-row-reverse" }, os = /* @__PURE__ */ Oe({
|
|
|
1188
1188
|
async function _() {
|
|
1189
1189
|
n.value || y.open({
|
|
1190
1190
|
title: "Sync with NetSuite",
|
|
1191
|
-
contentComponent:
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1191
|
+
contentComponent: E("div", [
|
|
1192
|
+
E("p", "Are you sure you want to sync now?"),
|
|
1193
|
+
E("br"),
|
|
1194
|
+
E(
|
|
1195
1195
|
"p",
|
|
1196
1196
|
{ class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" },
|
|
1197
1197
|
"Please wait a moment before syncing manually to avoid unnecessary actions."
|
|
@@ -1293,33 +1293,33 @@ const rs = { class: "flex flex-row-reverse" }, os = /* @__PURE__ */ Oe({
|
|
|
1293
1293
|
}).join(", ") : "N/A";
|
|
1294
1294
|
});
|
|
1295
1295
|
return (c, x) => {
|
|
1296
|
-
var w, u, T, b, F, l, r, g, d, $,
|
|
1296
|
+
var w, u, T, b, F, l, r, g, d, $, P, B, C, K, Q, se;
|
|
1297
1297
|
return v(a).isEnabled ? (i(), S("div", ns, [
|
|
1298
1298
|
e("div", as, [
|
|
1299
1299
|
x[0] || (x[0] = e("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, "NetSuite subsidiary", -1)),
|
|
1300
1300
|
e("div", ls, h(n.value || "N/A"), 1)
|
|
1301
1301
|
]),
|
|
1302
1302
|
!c.isTransferBetweenOutlets && c.scope === v(lt).RECEIVE_REQUEST ? (i(), S("div", is, [
|
|
1303
|
-
e("div", cs, " NetSuite " + h((u = (w = c.purchaseOrder) == null ? void 0 : w.netSuite) != null && u.recordType ? v(vt)((b = (T = c.purchaseOrder) == null ? void 0 : T.netSuite) == null ? void 0 : b.recordType) : c.transferType === v(Ie).
|
|
1303
|
+
e("div", cs, " NetSuite " + h((u = (w = c.purchaseOrder) == null ? void 0 : w.netSuite) != null && u.recordType ? v(vt)((b = (T = c.purchaseOrder) == null ? void 0 : T.netSuite) == null ? void 0 : b.recordType) : c.transferType === v(Ie).enum.purchase ? "Purchase Order" : "Transfer Order") + " (ID) ", 1),
|
|
1304
1304
|
e("div", us, [
|
|
1305
1305
|
(l = (F = c.purchaseOrder) == null ? void 0 : F.netSuite) != null && l.id ? (i(), S("span", ds, h((g = (r = c.purchaseOrder) == null ? void 0 : r.netSuite) == null ? void 0 : g.refNo) + " (" + h(($ = (d = c.purchaseOrder) == null ? void 0 : d.netSuite) == null ? void 0 : $.id) + ") ", 1)) : (i(), S("span", ms, "N/A"))
|
|
1306
1306
|
])
|
|
1307
|
-
])) :
|
|
1307
|
+
])) : M("", !0),
|
|
1308
1308
|
!c.isTransferBetweenOutlets && y.value || c.scope === v(lt).APPROVAL ? (i(), S("div", ps, [
|
|
1309
|
-
e("div", fs, " (Request) NetSuite " + h(c.transferType === v(Ie).
|
|
1309
|
+
e("div", fs, " (Request) NetSuite " + h(c.transferType === v(Ie).enum.purchase ? "Purchase Order" : "Transfer Order") + " (ID) ", 1),
|
|
1310
1310
|
e("div", ys, [
|
|
1311
|
-
(B = (
|
|
1311
|
+
(B = (P = y.value) == null ? void 0 : P.netSuite) != null && B.id ? (i(), S("span", vs, h((K = (C = y.value) == null ? void 0 : C.netSuite) == null ? void 0 : K.refNo) + " (" + h((se = (Q = y.value) == null ? void 0 : Q.netSuite) == null ? void 0 : se.id) + ") ", 1)) : (i(), S("span", hs, "N/A"))
|
|
1312
1312
|
])
|
|
1313
|
-
])) :
|
|
1313
|
+
])) : M("", !0),
|
|
1314
1314
|
_.value ? (i(), S("div", bs, [
|
|
1315
1315
|
x[1] || (x[1] = e("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " NetSuite Transaction Number ", -1)),
|
|
1316
1316
|
e("div", gs, h(_.value), 1)
|
|
1317
|
-
])) :
|
|
1318
|
-
v(a).isEnabled && c.transferType === v(Ie).
|
|
1317
|
+
])) : M("", !0),
|
|
1318
|
+
v(a).isEnabled && c.transferType === v(Ie).enum.transfer && !c.isTransferBetweenOutlets ? (i(), S("div", _s, [
|
|
1319
1319
|
x[2] || (x[2] = e("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " NetSuite fulfillment IDs ", -1)),
|
|
1320
1320
|
e("div", Ss, h(s.value), 1)
|
|
1321
|
-
])) :
|
|
1322
|
-
])) :
|
|
1321
|
+
])) : M("", !0)
|
|
1322
|
+
])) : M("", !0);
|
|
1323
1323
|
};
|
|
1324
1324
|
}
|
|
1325
1325
|
}), Os = { class: "flex flex-row-reverse" }, ws = /* @__PURE__ */ Oe({
|
|
@@ -1329,7 +1329,7 @@ const rs = { class: "flex flex-row-reverse" }, os = /* @__PURE__ */ Oe({
|
|
|
1329
1329
|
purchaseOrderId: {}
|
|
1330
1330
|
},
|
|
1331
1331
|
setup(k) {
|
|
1332
|
-
const o =
|
|
1332
|
+
const o = Ue(), a = ut();
|
|
1333
1333
|
async function f(y, n) {
|
|
1334
1334
|
const _ = [];
|
|
1335
1335
|
if (y && _.push(`body.message:*${y}*`), n) {
|
|
@@ -1373,10 +1373,10 @@ const rs = { class: "flex flex-row-reverse" }, os = /* @__PURE__ */ Oe({
|
|
|
1373
1373
|
}, Fs = {
|
|
1374
1374
|
key: 1,
|
|
1375
1375
|
class: "border-t pt-6"
|
|
1376
|
-
},
|
|
1376
|
+
}, Is = { class: "fm-typo-en-body-lg-600 mb-4 flex items-center gap-2" }, Ps = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg overflow-y-auto" }, qs = { class: "w-full" }, Vs = {
|
|
1377
1377
|
class: "p-3 fm-typo-en-body-sm-600",
|
|
1378
1378
|
style: { "min-width": "130px" }
|
|
1379
|
-
},
|
|
1379
|
+
}, Es = { class: "p-3 fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, Ls = { class: "p-3 fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, Ms = { class: "p-3 fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, Us = { class: "p-3 fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, Bs = { class: "p-3 fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, js = { class: "p-3 fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, zs = { class: "p-3 fm-typo-en-body-sm-600" }, Ks = { key: 2 }, Gs = { key: 1 }, Hs = /* @__PURE__ */ Oe({
|
|
1380
1380
|
__name: "NetSuiteLatestInfo",
|
|
1381
1381
|
props: {
|
|
1382
1382
|
netsuiteId: {},
|
|
@@ -1438,7 +1438,7 @@ const rs = { class: "flex flex-row-reverse" }, os = /* @__PURE__ */ Oe({
|
|
|
1438
1438
|
});
|
|
1439
1439
|
}
|
|
1440
1440
|
return (l, r) => {
|
|
1441
|
-
const g = z("FmButton"), d = z("FmLabel"), $ = z("FmCircularProgress"),
|
|
1441
|
+
const g = z("FmButton"), d = z("FmLabel"), $ = z("FmCircularProgress"), P = z("FmIcon"), B = z("FmDialog");
|
|
1442
1442
|
return i(), S("div", $s, [
|
|
1443
1443
|
N(B, {
|
|
1444
1444
|
modelValue: f.value,
|
|
@@ -1462,7 +1462,7 @@ const rs = { class: "flex flex-row-reverse" }, os = /* @__PURE__ */ Oe({
|
|
|
1462
1462
|
])),
|
|
1463
1463
|
default: X(() => [
|
|
1464
1464
|
n.value ? (i(), S("div", Cs, "Loading...")) : (i(), S("div", Rs, [
|
|
1465
|
-
_.value ? (i(), S("p",
|
|
1465
|
+
_.value ? (i(), S("p", Gs, "Something went wrong.")) : (i(), S(ue, { key: 0 }, [
|
|
1466
1466
|
e("div", ks, [
|
|
1467
1467
|
r[4] || (r[4] = e("h3", { class: "fm-typo-en-body-lg-600 mb-4" }, "NetSuite Order Details", -1)),
|
|
1468
1468
|
(i(!0), S(ue, null, _e(x.value, (C, K) => (i(), S("div", {
|
|
@@ -1482,17 +1482,17 @@ const rs = { class: "flex flex-row-reverse" }, os = /* @__PURE__ */ Oe({
|
|
|
1482
1482
|
s.value ? (i(), S("div", Ts, [
|
|
1483
1483
|
r[5] || (r[5] = e("span", null, "Change Log Loading...", -1)),
|
|
1484
1484
|
N($, { size: "md" })
|
|
1485
|
-
])) :
|
|
1485
|
+
])) : M("", !0),
|
|
1486
1486
|
!s.value && w.value.length > 0 ? (i(), S("div", Fs, [
|
|
1487
|
-
e("h3",
|
|
1488
|
-
N(
|
|
1487
|
+
e("h3", Is, [
|
|
1488
|
+
N(P, {
|
|
1489
1489
|
name: "error",
|
|
1490
1490
|
color: "#ff9500",
|
|
1491
1491
|
size: "sm"
|
|
1492
1492
|
}),
|
|
1493
1493
|
r[6] || (r[6] = Ce(" Change Logs "))
|
|
1494
1494
|
]),
|
|
1495
|
-
e("div",
|
|
1495
|
+
e("div", Ps, [
|
|
1496
1496
|
e("table", qs, [
|
|
1497
1497
|
r[7] || (r[7] = e("thead", { class: "bg-fm-color-neutral-gray-50" }, [
|
|
1498
1498
|
e("tr", { class: "border-b border-fm-color-neutral-gray-200" }, [
|
|
@@ -1515,14 +1515,14 @@ const rs = { class: "flex flex-row-reverse" }, os = /* @__PURE__ */ Oe({
|
|
|
1515
1515
|
key: K,
|
|
1516
1516
|
class: "border-b border-fm-color-neutral-gray-200 last:border-b-0"
|
|
1517
1517
|
}, [
|
|
1518
|
-
e("td",
|
|
1519
|
-
e("td",
|
|
1518
|
+
e("td", Vs, h(F(C._dateiso8601)), 1),
|
|
1519
|
+
e("td", Es, h(C._rolename), 1),
|
|
1520
1520
|
e("td", Ls, h(C._employeename), 1),
|
|
1521
|
-
e("td",
|
|
1521
|
+
e("td", Ms, h(C._contextname), 1),
|
|
1522
1522
|
e("td", {
|
|
1523
1523
|
class: Le(`p-3 fm-typo-en-body-sm-600 ${b(Number(C.type) - 1)}`)
|
|
1524
1524
|
}, h(v(xe)[Number(C.type) - 1]), 3),
|
|
1525
|
-
e("td",
|
|
1525
|
+
e("td", Us, h(C.lineid || ""), 1),
|
|
1526
1526
|
e("td", Bs, h(C._fieldname), 1),
|
|
1527
1527
|
e("td", js, h(C.oldvalue || ""), 1),
|
|
1528
1528
|
e("td", zs, h(C.newvalue || ""), 1)
|
|
@@ -1567,7 +1567,7 @@ const rs = { class: "flex flex-row-reverse" }, os = /* @__PURE__ */ Oe({
|
|
|
1567
1567
|
Ze();
|
|
1568
1568
|
const f = Y(() => {
|
|
1569
1569
|
var s, c, x, w, u, T, b;
|
|
1570
|
-
const y = ((s = o.transferToDbName) == null ? void 0 : s.startsWith("restaurant")) && ((x = (c = o.purchaseOrder) == null ? void 0 : c.supplier) == null ? void 0 : x.internal) === "restaurant", n = o.transferType === Ie.
|
|
1570
|
+
const y = ((s = o.transferToDbName) == null ? void 0 : s.startsWith("restaurant")) && ((x = (c = o.purchaseOrder) == null ? void 0 : c.supplier) == null ? void 0 : x.internal) === "restaurant", n = o.transferType === Ie.enum.purchase, _ = o.transferType === Ie.enum.transfer;
|
|
1571
1571
|
return n || _ && !y || ((u = (w = o.purchaseOrder) == null ? void 0 : w.netSuite) == null ? void 0 : u.id) || ((b = (T = o.poRequest) == null ? void 0 : T.netSuite) == null ? void 0 : b.id);
|
|
1572
1572
|
});
|
|
1573
1573
|
return (y, n) => {
|
|
@@ -1582,14 +1582,14 @@ const rs = { class: "flex flex-row-reverse" }, os = /* @__PURE__ */ Oe({
|
|
|
1582
1582
|
default: X(() => {
|
|
1583
1583
|
var x, w, u;
|
|
1584
1584
|
return [
|
|
1585
|
-
N(
|
|
1585
|
+
N(Hs, {
|
|
1586
1586
|
"netsuite-id": (w = (x = y.purchaseOrder) == null ? void 0 : x.netSuite) == null ? void 0 : w.id,
|
|
1587
1587
|
"purchase-order-id": (u = y.purchaseOrder) == null ? void 0 : u._id
|
|
1588
1588
|
}, null, 8, ["netsuite-id", "purchase-order-id"])
|
|
1589
1589
|
];
|
|
1590
1590
|
}),
|
|
1591
1591
|
_: 1
|
|
1592
|
-
})) :
|
|
1592
|
+
})) : M("", !0),
|
|
1593
1593
|
N(Pe, null, {
|
|
1594
1594
|
default: X(() => {
|
|
1595
1595
|
var x, w, u;
|
|
@@ -1620,7 +1620,7 @@ const rs = { class: "flex flex-row-reverse" }, os = /* @__PURE__ */ Oe({
|
|
|
1620
1620
|
"is-transfer-between-outlets": !f.value,
|
|
1621
1621
|
scope: y.scope
|
|
1622
1622
|
}, null, 8, ["po-request", "purchase-order", "transfer-type", "transfer-to-db-name", "is-transfer-between-outlets", "scope"])
|
|
1623
|
-
])) :
|
|
1623
|
+
])) : M("", !0);
|
|
1624
1624
|
};
|
|
1625
1625
|
}
|
|
1626
1626
|
}), Zs = { class: "flex flex-col gap-3" }, er = { class: "flex flex-col gap-4" }, tr = { class: "flex flex-col gap-4 fm-typo-en-body-lg-600" }, sr = { class: "flex flex-col gap-4" }, rr = { class: "flex justify-between items-center py-1 gap-4" }, or = { class: "flex flex-col" }, nr = { class: "fm-typo-en-body-lg-600" }, ar = { class: "fm-typo-en-body-md-400" }, lr = { class: "flex flex-col gap-2 items-end" }, ir = { class: "flex self-end fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, cr = {
|
|
@@ -1640,8 +1640,8 @@ const rs = { class: "flex flex-row-reverse" }, os = /* @__PURE__ */ Oe({
|
|
|
1640
1640
|
},
|
|
1641
1641
|
emits: ["submitted"],
|
|
1642
1642
|
setup(k, { emit: o }) {
|
|
1643
|
-
|
|
1644
|
-
const a =
|
|
1643
|
+
Ht();
|
|
1644
|
+
const a = Me(), f = Ue(), y = J(!1), n = k, _ = o, s = _t("deliveryOrder"), c = Be(), x = Y(
|
|
1645
1645
|
() => {
|
|
1646
1646
|
var g;
|
|
1647
1647
|
return ((g = n.purchaseOrder.deliveryFullfillment) == null ? void 0 : g.findIndex(
|
|
@@ -1650,8 +1650,8 @@ const rs = { class: "flex flex-row-reverse" }, os = /* @__PURE__ */ Oe({
|
|
|
1650
1650
|
}
|
|
1651
1651
|
), w = a.enablePurchaseOrderReceiveWithCustomCost, u = a.enablePortalDeliveryOrderWrite, T = J({}), b = Y(() => n.purchaseOrder.items.map((g, d) => Y({
|
|
1652
1652
|
get: () => {
|
|
1653
|
-
var
|
|
1654
|
-
const $ = (
|
|
1653
|
+
var P;
|
|
1654
|
+
const $ = (P = s.received[d]) == null ? void 0 : P.cost;
|
|
1655
1655
|
return $ ? +ve($) : 0;
|
|
1656
1656
|
},
|
|
1657
1657
|
set: ($) => {
|
|
@@ -1662,8 +1662,8 @@ const rs = { class: "flex flex-row-reverse" }, os = /* @__PURE__ */ Oe({
|
|
|
1662
1662
|
}
|
|
1663
1663
|
}))), F = Y(() => n.deliveryOrder.received.map((g, d) => Y({
|
|
1664
1664
|
get: () => {
|
|
1665
|
-
var
|
|
1666
|
-
const $ = (
|
|
1665
|
+
var P;
|
|
1666
|
+
const $ = (P = s.received[d]) == null ? void 0 : P.amount;
|
|
1667
1667
|
return $ ? +ve($) : 0;
|
|
1668
1668
|
},
|
|
1669
1669
|
set: ($) => {
|
|
@@ -1706,7 +1706,7 @@ const rs = { class: "flex flex-row-reverse" }, os = /* @__PURE__ */ Oe({
|
|
|
1706
1706
|
});
|
|
1707
1707
|
}
|
|
1708
1708
|
return (g, d) => {
|
|
1709
|
-
const $ = z("FmButton"),
|
|
1709
|
+
const $ = z("FmButton"), P = z("FmStepperField"), B = z("FmSwitch"), C = z("FmTextField"), K = z("FmDialog");
|
|
1710
1710
|
return i(), re(K, {
|
|
1711
1711
|
modelValue: y.value,
|
|
1712
1712
|
"onUpdate:modelValue": d[1] || (d[1] = (Q) => y.value = Q),
|
|
@@ -1719,10 +1719,10 @@ const rs = { class: "flex flex-row-reverse" }, os = /* @__PURE__ */ Oe({
|
|
|
1719
1719
|
label: "Edit",
|
|
1720
1720
|
size: "md",
|
|
1721
1721
|
"prepend-icon": "edit"
|
|
1722
|
-
})) :
|
|
1722
|
+
})) : M("", !0)
|
|
1723
1723
|
]),
|
|
1724
1724
|
"dialog-header": X(() => [
|
|
1725
|
-
e("div", null, "Received on " + h(v(
|
|
1725
|
+
e("div", null, "Received on " + h(v(Ge)(n.deliveryOrder.createdAt)), 1)
|
|
1726
1726
|
]),
|
|
1727
1727
|
"dialog-footer": X(() => [
|
|
1728
1728
|
N($, {
|
|
@@ -1738,7 +1738,7 @@ const rs = { class: "flex flex-row-reverse" }, os = /* @__PURE__ */ Oe({
|
|
|
1738
1738
|
e("div", Zs, [
|
|
1739
1739
|
e("div", er, [
|
|
1740
1740
|
d[2] || (d[2] = e("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, "Adjustment date", -1)),
|
|
1741
|
-
e("div", tr, h(n.deliveryOrder.adjustment ? v(
|
|
1741
|
+
e("div", tr, h(n.deliveryOrder.adjustment ? v(Ge)(new Date(v(We)(n.deliveryOrder.adjustment))) : "-"), 1)
|
|
1742
1742
|
]),
|
|
1743
1743
|
e("div", sr, [
|
|
1744
1744
|
d[4] || (d[4] = e("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, "Received items", -1)),
|
|
@@ -1751,7 +1751,7 @@ const rs = { class: "flex flex-row-reverse" }, os = /* @__PURE__ */ Oe({
|
|
|
1751
1751
|
e("span", ar, h(Q.sku.code), 1)
|
|
1752
1752
|
]),
|
|
1753
1753
|
e("div", lr, [
|
|
1754
|
-
N(
|
|
1754
|
+
N(P, {
|
|
1755
1755
|
label: "Receive Quantity",
|
|
1756
1756
|
modelValue: F.value[se].value,
|
|
1757
1757
|
"onUpdate:modelValue": (fe) => F.value[se].value = fe,
|
|
@@ -1766,8 +1766,8 @@ const rs = { class: "flex flex-row-reverse" }, os = /* @__PURE__ */ Oe({
|
|
|
1766
1766
|
size: "sm"
|
|
1767
1767
|
}, null, 8, ["model-value", "onUpdate:modelValue"]),
|
|
1768
1768
|
d[3] || (d[3] = e("span", { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, " Override cost ", -1))
|
|
1769
|
-
])) :
|
|
1770
|
-
v(w) && T.value[se] ? (i(), re(
|
|
1769
|
+
])) : M("", !0),
|
|
1770
|
+
v(w) && T.value[se] ? (i(), re(P, {
|
|
1771
1771
|
key: 1,
|
|
1772
1772
|
modelValue: b.value[se].value,
|
|
1773
1773
|
"onUpdate:modelValue": (fe) => b.value[se].value = fe,
|
|
@@ -1777,10 +1777,10 @@ const rs = { class: "flex flex-row-reverse" }, os = /* @__PURE__ */ Oe({
|
|
|
1777
1777
|
placeholder: "0.0000",
|
|
1778
1778
|
size: "sm",
|
|
1779
1779
|
"append-text": v(we)()
|
|
1780
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue", "append-text"])) :
|
|
1780
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "append-text"])) : M("", !0)
|
|
1781
1781
|
])
|
|
1782
1782
|
]),
|
|
1783
|
-
se < n.purchaseOrder.items.length - 1 ? (i(), S("div", ur)) :
|
|
1783
|
+
se < n.purchaseOrder.items.length - 1 ? (i(), S("div", ur)) : M("", !0)
|
|
1784
1784
|
]);
|
|
1785
1785
|
}), 128))
|
|
1786
1786
|
]),
|
|
@@ -1802,7 +1802,7 @@ const rs = { class: "flex flex-row-reverse" }, os = /* @__PURE__ */ Oe({
|
|
|
1802
1802
|
x.value >= 0 ? (i(), S("div", yr, [
|
|
1803
1803
|
d[7] || (d[7] = e("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, " Fulfilment's sequence ", -1)),
|
|
1804
1804
|
e("div", vr, h(x.value + 1), 1)
|
|
1805
|
-
])) :
|
|
1805
|
+
])) : M("", !0)
|
|
1806
1806
|
])
|
|
1807
1807
|
])
|
|
1808
1808
|
]),
|
|
@@ -1819,13 +1819,13 @@ const rs = { class: "flex flex-row-reverse" }, os = /* @__PURE__ */ Oe({
|
|
|
1819
1819
|
}, $r = { class: "flex gap-4" }, Cr = { class: "flex-1" }, Rr = { class: "flex-1" }, kr = {
|
|
1820
1820
|
key: 0,
|
|
1821
1821
|
class: "flex items-center text-fm-color-system-error-300"
|
|
1822
|
-
}, Dr = { class: "fm-typo-en-body-md-400" }, Nr = { class: "flex flex-col gap-4" }, Ar = { class: "flex justify-between items-center py-1 gap-4" }, Tr = { class: "flex flex-col" }, Fr = { class: "fm-typo-en-body-lg-600" },
|
|
1822
|
+
}, Dr = { class: "fm-typo-en-body-md-400" }, Nr = { class: "flex flex-col gap-4" }, Ar = { class: "flex justify-between items-center py-1 gap-4" }, Tr = { class: "flex flex-col" }, Fr = { class: "fm-typo-en-body-lg-600" }, Ir = { class: "fm-typo-en-body-md-400" }, Pr = { class: "flex flex-col gap-2 items-end" }, qr = {
|
|
1823
1823
|
key: 0,
|
|
1824
1824
|
class: "flex items-center gap-2"
|
|
1825
|
-
},
|
|
1825
|
+
}, Vr = {
|
|
1826
1826
|
key: 0,
|
|
1827
1827
|
class: "border-b border-fm-color-stroke-secondary"
|
|
1828
|
-
},
|
|
1828
|
+
}, Er = { class: "flex flex-col gap-4" }, Lr = { class: "flex flex-col gap-4" }, Mr = { class: "flex flex-col gap-4" }, Ur = { class: "flex flex-col gap-4 fm-typo-en-body-lg-600" }, Br = /* @__PURE__ */ Oe({
|
|
1829
1829
|
__name: "CreateForm",
|
|
1830
1830
|
props: {
|
|
1831
1831
|
purchaseOrder: {},
|
|
@@ -1833,7 +1833,7 @@ const rs = { class: "flex flex-row-reverse" }, os = /* @__PURE__ */ Oe({
|
|
|
1833
1833
|
},
|
|
1834
1834
|
emits: ["submitted"],
|
|
1835
1835
|
setup(k, { emit: o }) {
|
|
1836
|
-
var q,
|
|
1836
|
+
var q, U, ae;
|
|
1837
1837
|
const { t: a } = ct(), f = J(!1), y = Ze(), n = k, _ = o, s = _t("", {
|
|
1838
1838
|
default: {
|
|
1839
1839
|
deliveryOrderNumber: "",
|
|
@@ -1845,52 +1845,52 @@ const rs = { class: "flex flex-row-reverse" }, os = /* @__PURE__ */ Oe({
|
|
|
1845
1845
|
})),
|
|
1846
1846
|
createdBy: {
|
|
1847
1847
|
id: ((q = y.sessionUser.value) == null ? void 0 : q.id) || "",
|
|
1848
|
-
name: ((
|
|
1848
|
+
name: ((U = y.sessionUser.value) == null ? void 0 : U.displayName) || ""
|
|
1849
1849
|
},
|
|
1850
1850
|
createdAt: ""
|
|
1851
1851
|
}
|
|
1852
|
-
}), c = Be(), x = tt(), w =
|
|
1852
|
+
}), c = Be(), x = tt(), w = Me(), u = ((ae = n.purchaseOrder) == null ? void 0 : ae.supplier.internal) != null, T = u && w.enablePOSTransferRequireFulfillment, b = w.enablePortalDeliveryOrderWrite && (n.purchaseOrder.status === ee.Enum.RECEIVING || n.purchaseOrder.status === ee.Enum.COMPLETE) && (u ? !T : !0), F = w.enablePurchaseOrderReceiveWithCustomCost, l = w.enableBackdateReceive, r = J({}), g = Ue(), d = Y({
|
|
1853
1853
|
get() {
|
|
1854
1854
|
if (!s.createdAt) return "";
|
|
1855
|
-
const D = new Date(s.createdAt), O = D.getFullYear(),
|
|
1856
|
-
return `${O}-${
|
|
1855
|
+
const D = new Date(s.createdAt), O = D.getFullYear(), I = String(D.getMonth() + 1).padStart(2, "0"), j = String(D.getDate()).padStart(2, "0");
|
|
1856
|
+
return `${O}-${I}-${j}`;
|
|
1857
1857
|
},
|
|
1858
1858
|
set(D) {
|
|
1859
1859
|
if (D) {
|
|
1860
|
-
const O = s.createdAt ? new Date(s.createdAt) : /* @__PURE__ */ new Date(), [
|
|
1861
|
-
O.setFullYear(parseInt(
|
|
1860
|
+
const O = s.createdAt ? new Date(s.createdAt) : /* @__PURE__ */ new Date(), [I, j, t] = D.split("-");
|
|
1861
|
+
O.setFullYear(parseInt(I)), O.setMonth(parseInt(j) - 1), O.setDate(parseInt(t)), s.createdAt = O.toISOString();
|
|
1862
1862
|
}
|
|
1863
1863
|
}
|
|
1864
1864
|
}), $ = Y({
|
|
1865
1865
|
get() {
|
|
1866
1866
|
if (!s.createdAt) return "";
|
|
1867
|
-
const D = new Date(s.createdAt), O = String(D.getHours()).padStart(2, "0"),
|
|
1868
|
-
return `${O}:${
|
|
1867
|
+
const D = new Date(s.createdAt), O = String(D.getHours()).padStart(2, "0"), I = String(D.getMinutes()).padStart(2, "0");
|
|
1868
|
+
return `${O}:${I}`;
|
|
1869
1869
|
},
|
|
1870
1870
|
set(D) {
|
|
1871
1871
|
if (D) {
|
|
1872
|
-
const O = s.createdAt ? new Date(s.createdAt) : /* @__PURE__ */ new Date(), [
|
|
1873
|
-
O.setHours(parseInt(
|
|
1872
|
+
const O = s.createdAt ? new Date(s.createdAt) : /* @__PURE__ */ new Date(), [I, j] = D.split(":");
|
|
1873
|
+
O.setHours(parseInt(I)), O.setMinutes(parseInt(j)), s.createdAt = O.toISOString();
|
|
1874
1874
|
}
|
|
1875
1875
|
}
|
|
1876
|
-
}),
|
|
1876
|
+
}), P = Y(() => {
|
|
1877
1877
|
const D = We(n.purchaseOrder._id);
|
|
1878
1878
|
if (!D) return "";
|
|
1879
|
-
const O = new Date(D),
|
|
1880
|
-
return `${
|
|
1879
|
+
const O = new Date(D), I = O.getFullYear(), j = String(O.getMonth() + 1).padStart(2, "0"), t = String(O.getDate()).padStart(2, "0");
|
|
1880
|
+
return `${I}-${j}-${t}`;
|
|
1881
1881
|
}), B = Y(() => {
|
|
1882
1882
|
const D = We(n.purchaseOrder._id);
|
|
1883
1883
|
return D ? new Date(D) : null;
|
|
1884
1884
|
}), C = Y(() => {
|
|
1885
1885
|
if (!d.value || !$.value || !B.value) return null;
|
|
1886
1886
|
if (/* @__PURE__ */ new Date(`${d.value}T${$.value}:00`) < B.value) {
|
|
1887
|
-
const O =
|
|
1887
|
+
const O = P.value, I = B.value.getHours(), j = B.value.getMinutes(), t = I >= 12 ? "PM" : "AM", p = I % 12 || 12, A = `${String(p).padStart(2, "0")}:${String(j).padStart(2, "0")} ${t}`;
|
|
1888
1888
|
return `Delivery date & time cannot be earlier than order creation (${O} ${A})`;
|
|
1889
1889
|
}
|
|
1890
1890
|
return null;
|
|
1891
1891
|
}), K = Y(() => C.value ? !1 : s.received.some((O) => {
|
|
1892
|
-
const
|
|
1893
|
-
return
|
|
1892
|
+
const I = O.amount;
|
|
1893
|
+
return I ? +ve(I) > 0 : !1;
|
|
1894
1894
|
}));
|
|
1895
1895
|
function Q() {
|
|
1896
1896
|
s.createdAt = "";
|
|
@@ -1898,20 +1898,20 @@ const rs = { class: "flex flex-row-reverse" }, os = /* @__PURE__ */ Oe({
|
|
|
1898
1898
|
const se = Y(() => n.purchaseOrder.items.map((D, O) => Y({
|
|
1899
1899
|
get: () => {
|
|
1900
1900
|
var j;
|
|
1901
|
-
const
|
|
1902
|
-
return
|
|
1901
|
+
const I = (j = s.received[O]) == null ? void 0 : j.amount;
|
|
1902
|
+
return I ? +ve(I) : 0;
|
|
1903
1903
|
},
|
|
1904
|
-
set: (
|
|
1905
|
-
s.received[O].amount = Qe(
|
|
1904
|
+
set: (I) => {
|
|
1905
|
+
s.received[O].amount = Qe(I, 2);
|
|
1906
1906
|
}
|
|
1907
1907
|
})));
|
|
1908
1908
|
function pe(D) {
|
|
1909
1909
|
const O = !r.value[D];
|
|
1910
1910
|
if (r.value[D] = O, O) {
|
|
1911
|
-
const
|
|
1912
|
-
|
|
1913
|
-
currency:
|
|
1914
|
-
amount:
|
|
1911
|
+
const I = n.purchaseOrder.items[D];
|
|
1912
|
+
I.totalCost ? s.received[D].cost = {
|
|
1913
|
+
currency: I.totalCost.currency,
|
|
1914
|
+
amount: I.totalCost.amount,
|
|
1915
1915
|
precision: 4
|
|
1916
1916
|
// Standardize to 4 decimals
|
|
1917
1917
|
} : s.received[D].cost = {
|
|
@@ -1925,13 +1925,13 @@ const rs = { class: "flex flex-row-reverse" }, os = /* @__PURE__ */ Oe({
|
|
|
1925
1925
|
const fe = Y(() => n.purchaseOrder.items.map((D, O) => Y({
|
|
1926
1926
|
get: () => {
|
|
1927
1927
|
var j;
|
|
1928
|
-
const
|
|
1929
|
-
return
|
|
1928
|
+
const I = (j = s.received[O]) == null ? void 0 : j.cost;
|
|
1929
|
+
return I ? +ve(I) : 0;
|
|
1930
1930
|
},
|
|
1931
|
-
set: (
|
|
1931
|
+
set: (I) => {
|
|
1932
1932
|
s.received[O].cost = {
|
|
1933
1933
|
currency: we(),
|
|
1934
|
-
...Qe(
|
|
1934
|
+
...Qe(I, 4)
|
|
1935
1935
|
};
|
|
1936
1936
|
}
|
|
1937
1937
|
})));
|
|
@@ -1968,7 +1968,7 @@ const rs = { class: "flex flex-row-reverse" }, os = /* @__PURE__ */ Oe({
|
|
|
1968
1968
|
});
|
|
1969
1969
|
}
|
|
1970
1970
|
return (D, O) => {
|
|
1971
|
-
const
|
|
1971
|
+
const I = z("FmButton"), j = z("FmDatePicker"), t = z("FmTimePicker"), p = z("FmIcon"), A = z("FmStepperField"), R = z("FmSwitch"), H = z("FmTextField"), W = z("FmDialog");
|
|
1972
1972
|
return i(), re(W, {
|
|
1973
1973
|
modelValue: f.value,
|
|
1974
1974
|
"onUpdate:modelValue": O[4] || (O[4] = (te) => f.value = te),
|
|
@@ -1976,20 +1976,20 @@ const rs = { class: "flex flex-row-reverse" }, os = /* @__PURE__ */ Oe({
|
|
|
1976
1976
|
"min-width": 800
|
|
1977
1977
|
}, {
|
|
1978
1978
|
"dialog-button": X(() => [
|
|
1979
|
-
v(b) ? (i(), re(
|
|
1979
|
+
v(b) ? (i(), re(I, {
|
|
1980
1980
|
key: 0,
|
|
1981
1981
|
variant: "primary",
|
|
1982
1982
|
label: "Create",
|
|
1983
1983
|
size: "md",
|
|
1984
1984
|
"prepend-icon": "add",
|
|
1985
1985
|
class: "w-full"
|
|
1986
|
-
})) :
|
|
1986
|
+
})) : M("", !0)
|
|
1987
1987
|
]),
|
|
1988
1988
|
"dialog-header": X(() => [
|
|
1989
1989
|
e("div", null, "Order #" + h(n.purchaseOrder.seqNumber) + " (New Delivery Order)", 1)
|
|
1990
1990
|
]),
|
|
1991
1991
|
"dialog-footer": X(() => [
|
|
1992
|
-
N(
|
|
1992
|
+
N(I, {
|
|
1993
1993
|
class: "ml-auto",
|
|
1994
1994
|
label: "Create",
|
|
1995
1995
|
size: "md",
|
|
@@ -2010,15 +2010,15 @@ const rs = { class: "flex flex-row-reverse" }, os = /* @__PURE__ */ Oe({
|
|
|
2010
2010
|
e("div", xr, [
|
|
2011
2011
|
e("div", Or, [
|
|
2012
2012
|
O[6] || (O[6] = Ce(" Delivery Date & Time ")),
|
|
2013
|
-
!d.value && !$.value ? (i(), S("div", wr, " Leave blank to use current date & time ")) :
|
|
2013
|
+
!d.value && !$.value ? (i(), S("div", wr, " Leave blank to use current date & time ")) : M("", !0)
|
|
2014
2014
|
]),
|
|
2015
|
-
d.value || $.value ? (i(), re(
|
|
2015
|
+
d.value || $.value ? (i(), re(I, {
|
|
2016
2016
|
key: 0,
|
|
2017
2017
|
variant: "tertiary",
|
|
2018
2018
|
label: "Clear",
|
|
2019
2019
|
"prepend-icon": "close",
|
|
2020
2020
|
onClick: Q
|
|
2021
|
-
})) :
|
|
2021
|
+
})) : M("", !0)
|
|
2022
2022
|
]),
|
|
2023
2023
|
e("div", $r, [
|
|
2024
2024
|
e("div", Cr, [
|
|
@@ -2041,23 +2041,23 @@ const rs = { class: "flex flex-row-reverse" }, os = /* @__PURE__ */ Oe({
|
|
|
2041
2041
|
size: "sm"
|
|
2042
2042
|
}),
|
|
2043
2043
|
e("div", Dr, h(C.value), 1)
|
|
2044
|
-
])) :
|
|
2045
|
-
])) :
|
|
2044
|
+
])) : M("", !0)
|
|
2045
|
+
])) : M("", !0),
|
|
2046
2046
|
e("div", Nr, [
|
|
2047
2047
|
O[8] || (O[8] = e("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, " Items going to receive ", -1)),
|
|
2048
|
-
(i(!0), S(ue, null, _e(n.purchaseOrder.items, (m,
|
|
2048
|
+
(i(!0), S(ue, null, _e(n.purchaseOrder.items, (m, G) => {
|
|
2049
2049
|
var le, oe, L;
|
|
2050
|
-
return i(), S("div", { key:
|
|
2050
|
+
return i(), S("div", { key: G }, [
|
|
2051
2051
|
e("div", Ar, [
|
|
2052
2052
|
e("div", Tr, [
|
|
2053
2053
|
e("span", Fr, h(m.sku.name), 1),
|
|
2054
|
-
e("span",
|
|
2054
|
+
e("span", Ir, h(m.sku.code), 1)
|
|
2055
2055
|
]),
|
|
2056
|
-
e("div",
|
|
2056
|
+
e("div", Pr, [
|
|
2057
2057
|
N(A, {
|
|
2058
2058
|
label: "Receive Quantity",
|
|
2059
|
-
modelValue: se.value[
|
|
2060
|
-
"onUpdate:modelValue": (ne) => se.value[
|
|
2059
|
+
modelValue: se.value[G].value,
|
|
2060
|
+
"onUpdate:modelValue": (ne) => se.value[G].value = ne,
|
|
2061
2061
|
"helper-text": `${v(a)("inventory.transfer.receiveRequest.details.received")} ${v(Fe).toFormatString(
|
|
2062
2062
|
{
|
|
2063
2063
|
value: (le = D.receivedInfoMap[m.sku._id]) == null ? void 0 : le.received
|
|
@@ -2068,43 +2068,43 @@ const rs = { class: "flex flex-row-reverse" }, os = /* @__PURE__ */ Oe({
|
|
|
2068
2068
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "helper-text", "append-text"]),
|
|
2069
2069
|
v(F) ? (i(), S("div", qr, [
|
|
2070
2070
|
N(R, {
|
|
2071
|
-
"model-value": r.value[
|
|
2072
|
-
"onUpdate:modelValue": (ne) => pe(
|
|
2071
|
+
"model-value": r.value[G],
|
|
2072
|
+
"onUpdate:modelValue": (ne) => pe(G),
|
|
2073
2073
|
size: "sm"
|
|
2074
2074
|
}, null, 8, ["model-value", "onUpdate:modelValue"]),
|
|
2075
2075
|
O[7] || (O[7] = e("span", { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, " Override cost ", -1))
|
|
2076
|
-
])) :
|
|
2077
|
-
v(F) && r.value[
|
|
2076
|
+
])) : M("", !0),
|
|
2077
|
+
v(F) && r.value[G] ? (i(), re(A, {
|
|
2078
2078
|
key: 1,
|
|
2079
|
-
modelValue: fe.value[
|
|
2080
|
-
"onUpdate:modelValue": (ne) => fe.value[
|
|
2079
|
+
modelValue: fe.value[G].value,
|
|
2080
|
+
"onUpdate:modelValue": (ne) => fe.value[G].value = ne,
|
|
2081
2081
|
label: "Total Cost",
|
|
2082
2082
|
step: 1e-4,
|
|
2083
2083
|
min: 0,
|
|
2084
2084
|
placeholder: "0.0000",
|
|
2085
2085
|
size: "sm",
|
|
2086
2086
|
"append-text": v(we)()
|
|
2087
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue", "append-text"])) :
|
|
2087
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "append-text"])) : M("", !0)
|
|
2088
2088
|
])
|
|
2089
2089
|
]),
|
|
2090
|
-
|
|
2090
|
+
G < n.purchaseOrder.items.length - 1 ? (i(), S("div", Vr)) : M("", !0)
|
|
2091
2091
|
]);
|
|
2092
2092
|
}), 128))
|
|
2093
2093
|
]),
|
|
2094
|
-
e("div",
|
|
2094
|
+
e("div", Er, [
|
|
2095
2095
|
O[9] || (O[9] = e("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, "Delivery order no.", -1)),
|
|
2096
2096
|
e("div", Lr, [
|
|
2097
|
-
N(
|
|
2097
|
+
N(H, {
|
|
2098
2098
|
modelValue: v(s).deliveryOrderNumber,
|
|
2099
2099
|
"onUpdate:modelValue": O[2] || (O[2] = (m) => v(s).deliveryOrderNumber = m),
|
|
2100
2100
|
size: "md"
|
|
2101
2101
|
}, null, 8, ["modelValue"])
|
|
2102
2102
|
])
|
|
2103
2103
|
]),
|
|
2104
|
-
e("div",
|
|
2104
|
+
e("div", Mr, [
|
|
2105
2105
|
O[10] || (O[10] = e("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, "Remark", -1)),
|
|
2106
|
-
e("div",
|
|
2107
|
-
N(
|
|
2106
|
+
e("div", Ur, [
|
|
2107
|
+
N(H, {
|
|
2108
2108
|
modelValue: v(s).remark,
|
|
2109
2109
|
"onUpdate:modelValue": O[3] || (O[3] = (m) => v(s).remark = m),
|
|
2110
2110
|
size: "md"
|
|
@@ -2124,7 +2124,7 @@ const rs = { class: "flex flex-row-reverse" }, os = /* @__PURE__ */ Oe({
|
|
|
2124
2124
|
}, Kr = {
|
|
2125
2125
|
key: 1,
|
|
2126
2126
|
class: "border-t pt-6"
|
|
2127
|
-
},
|
|
2127
|
+
}, Gr = { class: "fm-typo-en-body-lg-600 mb-4 flex items-center gap-2" }, Hr = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg overflow-y-auto" }, Wr = { class: "w-full" }, Qr = {
|
|
2128
2128
|
class: "p-3 fm-typo-en-body-sm-600",
|
|
2129
2129
|
style: { "min-width": "130px" }
|
|
2130
2130
|
}, Yr = { class: "p-3 fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, Jr = { class: "p-3 fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, Xr = { class: "p-3 fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, Zr = { class: "p-3 fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, eo = { class: "p-3 fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, to = { class: "p-3 fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, so = { class: "p-3 fm-typo-en-body-sm-600" }, ro = { key: 2 }, oo = /* @__PURE__ */ Oe({
|
|
@@ -2196,9 +2196,9 @@ const rs = { class: "flex flex-row-reverse" }, os = /* @__PURE__ */ Oe({
|
|
|
2196
2196
|
y.value ? (i(), S("div", zr, [
|
|
2197
2197
|
u[4] || (u[4] = e("span", null, "Change Log Loading...", -1)),
|
|
2198
2198
|
N(b, { size: "md" })
|
|
2199
|
-
])) :
|
|
2199
|
+
])) : M("", !0),
|
|
2200
2200
|
!y.value && _.value.length > 0 ? (i(), S("div", Kr, [
|
|
2201
|
-
e("h3",
|
|
2201
|
+
e("h3", Gr, [
|
|
2202
2202
|
N(F, {
|
|
2203
2203
|
name: "error",
|
|
2204
2204
|
color: "#ff9500",
|
|
@@ -2206,7 +2206,7 @@ const rs = { class: "flex flex-row-reverse" }, os = /* @__PURE__ */ Oe({
|
|
|
2206
2206
|
}),
|
|
2207
2207
|
u[5] || (u[5] = Ce(" Change Logs "))
|
|
2208
2208
|
]),
|
|
2209
|
-
e("div",
|
|
2209
|
+
e("div", Hr, [
|
|
2210
2210
|
e("table", Wr, [
|
|
2211
2211
|
u[6] || (u[6] = e("thead", { class: "bg-fm-color-neutral-gray-50" }, [
|
|
2212
2212
|
e("tr", { class: "border-b border-fm-color-neutral-gray-200" }, [
|
|
@@ -2277,10 +2277,10 @@ const rs = { class: "flex flex-row-reverse" }, os = /* @__PURE__ */ Oe({
|
|
|
2277
2277
|
}, No = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ao = { class: "fm-typo-en-body-lg-600" }, To = {
|
|
2278
2278
|
key: 3,
|
|
2279
2279
|
class: "flex flex-col gap-4"
|
|
2280
|
-
}, Fo = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" },
|
|
2280
|
+
}, Fo = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Io = { class: "fm-typo-en-body-lg-600" }, Po = {
|
|
2281
2281
|
key: 4,
|
|
2282
2282
|
class: "flex flex-col gap-4"
|
|
2283
|
-
}, qo = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" },
|
|
2283
|
+
}, qo = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Vo = { class: "fm-typo-en-body-lg-600" }, Eo = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg p-16" }, Lo = { class: "flex flex-col gap-8" }, Mo = { class: "flex gap-8 items-center" }, Uo = { class: "flex-1 fm-typo-en-body-lg-600" }, Bo = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary flex flex-col gap-4" }, jo = { class: "flex w-full gap-4" }, zo = { class: "basis-1/2 shrink-0 grow fm-typo-en-body-lg-400 line-clamp-2 flex items-center gap-2" }, Ko = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary flex flex-col gap-2" }, Go = { class: "fm-typo-en-body-lg-400 line-clamp-2" }, Ho = ["innerHTML"], Wo = { class: "flex w-full gap-4 fm-typo-en-body-sm-400" }, Qo = { class: "grow fm-typo-en-body-lg-400 text-fm-color-typo-secondary line-clamp-1" }, Yo = {
|
|
2284
2284
|
key: 0,
|
|
2285
2285
|
class: "line-clamp-1 fm-typo-en-body-lg-400 text-fm-color-typo-secondary"
|
|
2286
2286
|
}, Jo = { class: "py-8" }, Xo = { class: "flex justify-end gap-4 items-center" }, Zo = { class: "fm-typo-en-body-lg-600" }, en = {
|
|
@@ -2320,7 +2320,7 @@ const rs = { class: "flex flex-row-reverse" }, os = /* @__PURE__ */ Oe({
|
|
|
2320
2320
|
},
|
|
2321
2321
|
emits: ["update:show", "submitted"],
|
|
2322
2322
|
setup(k, { emit: o }) {
|
|
2323
|
-
const a = k, f = o, y = tt(), n =
|
|
2323
|
+
const a = k, f = o, y = tt(), n = Ue(), _ = Me(), s = Re(), c = Ze(), x = Y(
|
|
2324
2324
|
() => {
|
|
2325
2325
|
var t, p;
|
|
2326
2326
|
return {
|
|
@@ -2331,24 +2331,24 @@ const rs = { class: "flex flex-row-reverse" }, os = /* @__PURE__ */ Oe({
|
|
|
2331
2331
|
), w = ss(), { t: u } = ct(), T = Y(
|
|
2332
2332
|
() => {
|
|
2333
2333
|
var t, p, A, R;
|
|
2334
|
-
return ((p = (t = a.purchaseOrder) == null ? void 0 : t.supplier) == null ? void 0 : p.internal) === "restaurant" || ((R = (A = a.purchaseOrder) == null ? void 0 : A.supplier) == null ? void 0 : R.internal) === "warehouse" ? Ie.
|
|
2334
|
+
return ((p = (t = a.purchaseOrder) == null ? void 0 : t.supplier) == null ? void 0 : p.internal) === "restaurant" || ((R = (A = a.purchaseOrder) == null ? void 0 : A.supplier) == null ? void 0 : R.internal) === "warehouse" ? Ie.enum.transfer : Ie.enum.purchase;
|
|
2335
2335
|
}
|
|
2336
2336
|
), b = Y(() => {
|
|
2337
2337
|
var A;
|
|
2338
2338
|
const t = (A = a.shipments) == null ? void 0 : A.find((R) => {
|
|
2339
|
-
var
|
|
2340
|
-
return R.ref === ((
|
|
2339
|
+
var H;
|
|
2340
|
+
return R.ref === ((H = a.purchaseOrder) == null ? void 0 : H._id);
|
|
2341
2341
|
});
|
|
2342
2342
|
let p = null;
|
|
2343
2343
|
if (t != null && t.milestones && t.milestones.length > 0) {
|
|
2344
2344
|
const R = t.milestones[t.milestones.length - 1];
|
|
2345
2345
|
if (R.estimatedTime) {
|
|
2346
|
-
const
|
|
2347
|
-
p = `${
|
|
2346
|
+
const H = new Date(R.estimatedTime), W = H.getDate().toString().padStart(2, "0");
|
|
2347
|
+
p = `${H.toLocaleString("en-US", { month: "short" })} ${W}`;
|
|
2348
2348
|
}
|
|
2349
2349
|
}
|
|
2350
2350
|
return p;
|
|
2351
|
-
}), F = J(!1), l = J(""), r = J(!0), g = Be(), d = zt(g.getWorkflowConfig), $ = xt(),
|
|
2351
|
+
}), F = J(!1), l = J(""), r = J(!0), g = Be(), d = zt(g.getWorkflowConfig), $ = xt(), P = Y(() => {
|
|
2352
2352
|
if (!a.purchaseOrder)
|
|
2353
2353
|
return [];
|
|
2354
2354
|
const t = d.result.value;
|
|
@@ -2358,8 +2358,8 @@ const rs = { class: "flex flex-row-reverse" }, os = /* @__PURE__ */ Oe({
|
|
|
2358
2358
|
user: x.value,
|
|
2359
2359
|
executedAt: s.locations.computeFirst(
|
|
2360
2360
|
(R) => {
|
|
2361
|
-
var
|
|
2362
|
-
return R.dbName === ((
|
|
2361
|
+
var H;
|
|
2362
|
+
return R.dbName === ((H = s._currentLocation) == null ? void 0 : H.dbName) ? R : null;
|
|
2363
2363
|
}
|
|
2364
2364
|
),
|
|
2365
2365
|
purchaseOrderRequest: a.poRequest,
|
|
@@ -2374,19 +2374,19 @@ const rs = { class: "flex flex-row-reverse" }, os = /* @__PURE__ */ Oe({
|
|
|
2374
2374
|
(R) => (
|
|
2375
2375
|
// TODO: create receiveStock & processRequest dialog
|
|
2376
2376
|
// to create their payload
|
|
2377
|
-
R !==
|
|
2377
|
+
R !== V.enum.receiveStock && R !== V.enum.processRequest && R !== V.enum.closeRequest
|
|
2378
2378
|
)
|
|
2379
2379
|
)) : A = st.getAvailableActions({
|
|
2380
2380
|
...p,
|
|
2381
2381
|
orderConfig: t.data
|
|
2382
2382
|
}).actions.filter(
|
|
2383
|
-
(R) => R !==
|
|
2383
|
+
(R) => R !== V.enum.receiveStock && R !== V.enum.processRequest && R !== V.enum.closeRequest
|
|
2384
2384
|
);
|
|
2385
2385
|
} catch (R) {
|
|
2386
2386
|
console.error("Error getting available actions:", R);
|
|
2387
2387
|
}
|
|
2388
|
-
return a.scope === "approval" && (A = A.filter((R) => R !==
|
|
2389
|
-
}), B =
|
|
2388
|
+
return a.scope === "approval" && (A = A.filter((R) => R !== V.enum.completeReceive)), A;
|
|
2389
|
+
}), B = Pt(a, "show"), C = Y(() => [
|
|
2390
2390
|
{
|
|
2391
2391
|
label: u("inventory.transfer.receiveRequest.details.overview"),
|
|
2392
2392
|
value: "overview"
|
|
@@ -2411,7 +2411,7 @@ const rs = { class: "flex flex-row-reverse" }, os = /* @__PURE__ */ Oe({
|
|
|
2411
2411
|
}
|
|
2412
2412
|
}));
|
|
2413
2413
|
}
|
|
2414
|
-
async function se(t, p, A, R,
|
|
2414
|
+
async function se(t, p, A, R, H) {
|
|
2415
2415
|
return new Promise((W, te) => {
|
|
2416
2416
|
y.open({
|
|
2417
2417
|
closeButton: !1,
|
|
@@ -2420,9 +2420,9 @@ const rs = { class: "flex flex-row-reverse" }, os = /* @__PURE__ */ Oe({
|
|
|
2420
2420
|
primaryActions: R.primaryActions,
|
|
2421
2421
|
secondaryActions: { text: "No", close: !1 }
|
|
2422
2422
|
}).onPrimary(async () => {
|
|
2423
|
-
var
|
|
2423
|
+
var G, le, oe, L;
|
|
2424
2424
|
const m = [];
|
|
2425
|
-
A ===
|
|
2425
|
+
A === V.enum.approveRequest ? (m.push({
|
|
2426
2426
|
action: "approveRequest",
|
|
2427
2427
|
payload: null
|
|
2428
2428
|
}), p.fulfillment && m.push({
|
|
@@ -2434,7 +2434,7 @@ const rs = { class: "flex flex-row-reverse" }, os = /* @__PURE__ */ Oe({
|
|
|
2434
2434
|
items: Q(p.fulfillment.items),
|
|
2435
2435
|
createdBy: x.value
|
|
2436
2436
|
}
|
|
2437
|
-
})) : A ===
|
|
2437
|
+
})) : A === V.enum.processRequest ? p.fulfillment && m.push({
|
|
2438
2438
|
action: "processRequest",
|
|
2439
2439
|
payload: {
|
|
2440
2440
|
fulfillmentId: "",
|
|
@@ -2443,10 +2443,10 @@ const rs = { class: "flex flex-row-reverse" }, os = /* @__PURE__ */ Oe({
|
|
|
2443
2443
|
items: Q(p.fulfillment.items),
|
|
2444
2444
|
createdBy: x.value
|
|
2445
2445
|
}
|
|
2446
|
-
}) : A ===
|
|
2446
|
+
}) : A === V.enum.rejectRequest ? m.push({
|
|
2447
2447
|
action: "rejectRequest",
|
|
2448
2448
|
payload: null
|
|
2449
|
-
}) : A ===
|
|
2449
|
+
}) : A === V.enum.closeRequest && m.push({
|
|
2450
2450
|
action: "closeRequest",
|
|
2451
2451
|
payload: null
|
|
2452
2452
|
});
|
|
@@ -2458,7 +2458,7 @@ const rs = { class: "flex flex-row-reverse" }, os = /* @__PURE__ */ Oe({
|
|
|
2458
2458
|
options: p
|
|
2459
2459
|
},
|
|
2460
2460
|
operateV2: {
|
|
2461
|
-
_id: ((
|
|
2461
|
+
_id: ((G = a.purchaseOrder) == null ? void 0 : G._id) ?? "",
|
|
2462
2462
|
_rev: ((le = a.purchaseOrder) == null ? void 0 : le._rev) ?? "",
|
|
2463
2463
|
action: A,
|
|
2464
2464
|
payloads: m
|
|
@@ -2471,15 +2471,15 @@ const rs = { class: "flex flex-row-reverse" }, os = /* @__PURE__ */ Oe({
|
|
|
2471
2471
|
}
|
|
2472
2472
|
}).onSecondary(() => {
|
|
2473
2473
|
W("cancelled");
|
|
2474
|
-
for (let m = 0; m <
|
|
2474
|
+
for (let m = 0; m < H + 2; m++)
|
|
2475
2475
|
y.close();
|
|
2476
2476
|
}).onClose(() => {
|
|
2477
2477
|
});
|
|
2478
2478
|
});
|
|
2479
2479
|
}
|
|
2480
2480
|
async function pe(t) {
|
|
2481
|
-
var
|
|
2482
|
-
if (t ===
|
|
2481
|
+
var H, W, te, m;
|
|
2482
|
+
if (t === V.enum.receiveStock)
|
|
2483
2483
|
return;
|
|
2484
2484
|
const p = St[t];
|
|
2485
2485
|
if (!p) {
|
|
@@ -2493,13 +2493,13 @@ const rs = { class: "flex flex-row-reverse" }, os = /* @__PURE__ */ Oe({
|
|
|
2493
2493
|
const { successMessage: A, ...R } = p;
|
|
2494
2494
|
if (a.purchaseOrder) {
|
|
2495
2495
|
l.value = `${t}`, F.value = !0, r.value = !1;
|
|
2496
|
-
const
|
|
2496
|
+
const G = {};
|
|
2497
2497
|
let le = 0;
|
|
2498
|
-
if ((t ===
|
|
2499
|
-
t ===
|
|
2500
|
-
|
|
2501
|
-
else if ((t ===
|
|
2502
|
-
const oe = (W = (
|
|
2498
|
+
if ((t === V.enum.confirmDraft || // auto receive for warehouse to warehouse
|
|
2499
|
+
t === V.enum.completeReceive) && _.autoReceiveWarehouse)
|
|
2500
|
+
G.autoReceive = !0;
|
|
2501
|
+
else if ((t === V.enum.approveRequest || t === V.enum.processRequest) && _.acceptRequireFulfillment) {
|
|
2502
|
+
const oe = (W = (H = a.poRequest) == null ? void 0 : H.from) == null ? void 0 : W.dbName, L = (m = (te = a.poRequest) == null ? void 0 : te.to) == null ? void 0 : m.dbName;
|
|
2503
2503
|
if (oe && L && (oe.startsWith("warehouse_") || L.startsWith("warehouse_"))) {
|
|
2504
2504
|
const ne = await new Promise((Se, De) => {
|
|
2505
2505
|
y.open({
|
|
@@ -2515,13 +2515,13 @@ const rs = { class: "flex flex-row-reverse" }, os = /* @__PURE__ */ Oe({
|
|
|
2515
2515
|
}
|
|
2516
2516
|
});
|
|
2517
2517
|
});
|
|
2518
|
-
|
|
2518
|
+
G.fulfillment = ne;
|
|
2519
2519
|
}
|
|
2520
2520
|
}
|
|
2521
2521
|
try {
|
|
2522
2522
|
await se(
|
|
2523
2523
|
a.purchaseOrder,
|
|
2524
|
-
|
|
2524
|
+
G,
|
|
2525
2525
|
t,
|
|
2526
2526
|
p,
|
|
2527
2527
|
le
|
|
@@ -2548,9 +2548,9 @@ const rs = { class: "flex flex-row-reverse" }, os = /* @__PURE__ */ Oe({
|
|
|
2548
2548
|
const t = a.purchaseOrder;
|
|
2549
2549
|
if (!t) return { status: "", statusClass: "" };
|
|
2550
2550
|
const { partial: p, over: A } = nt(ke.value), R = at(t.status, p, A);
|
|
2551
|
-
let
|
|
2552
|
-
return R === ee.enum.CLOSE && (
|
|
2553
|
-
status:
|
|
2551
|
+
let H = u(`inventory.transfer.status.${R}`), W = `${t.status}`.toLocaleLowerCase("en-us");
|
|
2552
|
+
return R === ee.enum.CLOSE && (H = `${u(`inventory.transfer.status.${ee.enum.COMPLETE}`)}`), R === "PARTIAL_RECEIVED" && W === ee.enum.PROCESSING.toLocaleLowerCase("en-us") && (W = ee.enum.RECEIVING.toLocaleLowerCase("en-us")), {
|
|
2553
|
+
status: H,
|
|
2554
2554
|
statusClass: `fm-status-badge fm-status-badge-${W}`
|
|
2555
2555
|
};
|
|
2556
2556
|
}), q = Y(() => {
|
|
@@ -2567,13 +2567,13 @@ const rs = { class: "flex flex-row-reverse" }, os = /* @__PURE__ */ Oe({
|
|
|
2567
2567
|
doc: m
|
|
2568
2568
|
}))
|
|
2569
2569
|
];
|
|
2570
|
-
A.reverse().sort((m,
|
|
2570
|
+
A.reverse().sort((m, G) => m.createdAt.localeCompare(G.createdAt));
|
|
2571
2571
|
function R(m) {
|
|
2572
2572
|
var oe, L, ne, Se, De, Ne, Z, ce, de, ye;
|
|
2573
|
-
const
|
|
2574
|
-
(L = (oe = p[
|
|
2573
|
+
const G = p.findIndex((ie) => ie.id === m.fullfillmentId), le = [
|
|
2574
|
+
(L = (oe = p[G]) == null ? void 0 : oe.netSuite) != null && L.refNo ? {
|
|
2575
2575
|
label: "Fulfillment's ref no. (Netsuite)",
|
|
2576
|
-
values: [(Se = (ne = p[
|
|
2576
|
+
values: [(Se = (ne = p[G]) == null ? void 0 : ne.netSuite) == null ? void 0 : Se.refNo]
|
|
2577
2577
|
} : null,
|
|
2578
2578
|
(De = m == null ? void 0 : m.netSuite) != null && De.refNo ? {
|
|
2579
2579
|
label: "Netsuite ref no.",
|
|
@@ -2587,12 +2587,12 @@ const rs = { class: "flex flex-row-reverse" }, os = /* @__PURE__ */ Oe({
|
|
|
2587
2587
|
return {
|
|
2588
2588
|
header: "Received",
|
|
2589
2589
|
deliveryOrder: m,
|
|
2590
|
-
date:
|
|
2590
|
+
date: Ge(new Date(m.createdAt)),
|
|
2591
2591
|
info: [
|
|
2592
2592
|
{
|
|
2593
2593
|
label: "Adjustment date",
|
|
2594
2594
|
values: [
|
|
2595
|
-
m.adjustment ?
|
|
2595
|
+
m.adjustment ? Ge(new Date(We(m.adjustment))) : "-"
|
|
2596
2596
|
]
|
|
2597
2597
|
},
|
|
2598
2598
|
{
|
|
@@ -2603,27 +2603,27 @@ const rs = { class: "flex flex-row-reverse" }, os = /* @__PURE__ */ Oe({
|
|
|
2603
2603
|
label: "Received items",
|
|
2604
2604
|
values: m.received.map((ie) => {
|
|
2605
2605
|
var $e;
|
|
2606
|
-
return
|
|
2607
|
-
|
|
2606
|
+
return E("div", [
|
|
2607
|
+
E(
|
|
2608
2608
|
"div",
|
|
2609
2609
|
{
|
|
2610
2610
|
class: "flex gap-4"
|
|
2611
2611
|
},
|
|
2612
2612
|
[
|
|
2613
|
-
|
|
2613
|
+
E(
|
|
2614
2614
|
"div",
|
|
2615
2615
|
{
|
|
2616
2616
|
class: "flex flex-col"
|
|
2617
2617
|
},
|
|
2618
2618
|
[
|
|
2619
|
-
|
|
2619
|
+
E(
|
|
2620
2620
|
"span",
|
|
2621
2621
|
{
|
|
2622
2622
|
class: "fm-typo-en-body-lg-800 basis-1/2 shrink-0 grow"
|
|
2623
2623
|
},
|
|
2624
2624
|
`${ie.sku.name}`
|
|
2625
2625
|
),
|
|
2626
|
-
|
|
2626
|
+
E(
|
|
2627
2627
|
"span",
|
|
2628
2628
|
{
|
|
2629
2629
|
class: "fm-typo-en-body-md-400"
|
|
@@ -2632,26 +2632,26 @@ const rs = { class: "flex flex-row-reverse" }, os = /* @__PURE__ */ Oe({
|
|
|
2632
2632
|
)
|
|
2633
2633
|
]
|
|
2634
2634
|
),
|
|
2635
|
-
|
|
2635
|
+
E(
|
|
2636
2636
|
"div",
|
|
2637
2637
|
{
|
|
2638
2638
|
class: "ml-auto flex flex-col"
|
|
2639
2639
|
},
|
|
2640
2640
|
[
|
|
2641
|
-
|
|
2641
|
+
E(
|
|
2642
2642
|
"div",
|
|
2643
2643
|
{
|
|
2644
2644
|
class: "ml-auto flex gap-1"
|
|
2645
2645
|
},
|
|
2646
2646
|
[
|
|
2647
|
-
|
|
2647
|
+
E(
|
|
2648
2648
|
"span",
|
|
2649
2649
|
{
|
|
2650
2650
|
class: "fm-typo-en-body-lg-600 self-end"
|
|
2651
2651
|
},
|
|
2652
2652
|
ve(ie.amount, !1)
|
|
2653
2653
|
),
|
|
2654
|
-
|
|
2654
|
+
E(
|
|
2655
2655
|
"span",
|
|
2656
2656
|
{
|
|
2657
2657
|
class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary"
|
|
@@ -2660,7 +2660,7 @@ const rs = { class: "flex flex-row-reverse" }, os = /* @__PURE__ */ Oe({
|
|
|
2660
2660
|
)
|
|
2661
2661
|
]
|
|
2662
2662
|
),
|
|
2663
|
-
|
|
2663
|
+
E(
|
|
2664
2664
|
"div",
|
|
2665
2665
|
{
|
|
2666
2666
|
class: "flex self-end fm-typo-en-body-md-400 text-fm-color-typo-secondary"
|
|
@@ -2682,50 +2682,50 @@ const rs = { class: "flex flex-row-reverse" }, os = /* @__PURE__ */ Oe({
|
|
|
2682
2682
|
label: "Remark",
|
|
2683
2683
|
values: [m.remark || "N/A"]
|
|
2684
2684
|
},
|
|
2685
|
-
|
|
2685
|
+
G > -1 ? {
|
|
2686
2686
|
label: "Fulfilment's sequence",
|
|
2687
|
-
values: [`${
|
|
2687
|
+
values: [`${G + 1}`]
|
|
2688
2688
|
} : null,
|
|
2689
2689
|
...le
|
|
2690
2690
|
].filter((ie) => !!ie)
|
|
2691
2691
|
};
|
|
2692
2692
|
}
|
|
2693
|
-
function
|
|
2693
|
+
function H(m) {
|
|
2694
2694
|
var le, oe;
|
|
2695
|
-
const
|
|
2695
|
+
const G = p.findIndex((L) => L.id === m.id);
|
|
2696
2696
|
return {
|
|
2697
2697
|
header: "Fulfillment",
|
|
2698
|
-
date:
|
|
2698
|
+
date: Ge(new Date(m.createdAt)),
|
|
2699
2699
|
info: [
|
|
2700
2700
|
{
|
|
2701
2701
|
label: "Sequence",
|
|
2702
|
-
values: [String(
|
|
2702
|
+
values: [String(G + 1)]
|
|
2703
2703
|
},
|
|
2704
2704
|
{
|
|
2705
2705
|
label: "Receiveable items",
|
|
2706
2706
|
values: m.items.map((L) => {
|
|
2707
2707
|
var ne;
|
|
2708
|
-
return
|
|
2709
|
-
|
|
2708
|
+
return E("div", [
|
|
2709
|
+
E(
|
|
2710
2710
|
"div",
|
|
2711
2711
|
{
|
|
2712
2712
|
class: "flex gap-4"
|
|
2713
2713
|
},
|
|
2714
2714
|
[
|
|
2715
|
-
|
|
2715
|
+
E(
|
|
2716
2716
|
"div",
|
|
2717
2717
|
{
|
|
2718
2718
|
class: "flex flex-col"
|
|
2719
2719
|
},
|
|
2720
2720
|
[
|
|
2721
|
-
|
|
2721
|
+
E(
|
|
2722
2722
|
"span",
|
|
2723
2723
|
{
|
|
2724
2724
|
class: "fm-typo-en-body-lg-800 basis-1/2 shrink-0 grow"
|
|
2725
2725
|
},
|
|
2726
2726
|
`${L.sku.name}`
|
|
2727
2727
|
),
|
|
2728
|
-
|
|
2728
|
+
E(
|
|
2729
2729
|
"span",
|
|
2730
2730
|
{
|
|
2731
2731
|
class: "fm-typo-en-body-md-400"
|
|
@@ -2734,26 +2734,26 @@ const rs = { class: "flex flex-row-reverse" }, os = /* @__PURE__ */ Oe({
|
|
|
2734
2734
|
)
|
|
2735
2735
|
]
|
|
2736
2736
|
),
|
|
2737
|
-
|
|
2737
|
+
E(
|
|
2738
2738
|
"div",
|
|
2739
2739
|
{
|
|
2740
2740
|
class: "ml-auto flex flex-col"
|
|
2741
2741
|
},
|
|
2742
2742
|
[
|
|
2743
|
-
|
|
2743
|
+
E(
|
|
2744
2744
|
"div",
|
|
2745
2745
|
{
|
|
2746
2746
|
class: "ml-auto flex gap-1"
|
|
2747
2747
|
},
|
|
2748
2748
|
[
|
|
2749
|
-
|
|
2749
|
+
E(
|
|
2750
2750
|
"span",
|
|
2751
2751
|
{
|
|
2752
2752
|
class: "fm-typo-en-body-lg-600 self-end"
|
|
2753
2753
|
},
|
|
2754
2754
|
ve(L.amount, !1)
|
|
2755
2755
|
),
|
|
2756
|
-
|
|
2756
|
+
E(
|
|
2757
2757
|
"span",
|
|
2758
2758
|
{
|
|
2759
2759
|
class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary"
|
|
@@ -2762,7 +2762,7 @@ const rs = { class: "flex flex-row-reverse" }, os = /* @__PURE__ */ Oe({
|
|
|
2762
2762
|
)
|
|
2763
2763
|
]
|
|
2764
2764
|
),
|
|
2765
|
-
|
|
2765
|
+
E(
|
|
2766
2766
|
"div",
|
|
2767
2767
|
{
|
|
2768
2768
|
class: "flex self-end fm-typo-en-body-md-400 text-fm-color-typo-secondary"
|
|
@@ -2788,10 +2788,10 @@ const rs = { class: "flex flex-row-reverse" }, os = /* @__PURE__ */ Oe({
|
|
|
2788
2788
|
case "grn":
|
|
2789
2789
|
return R(m.doc);
|
|
2790
2790
|
case "fulfillment":
|
|
2791
|
-
return
|
|
2791
|
+
return H(m.doc);
|
|
2792
2792
|
}
|
|
2793
2793
|
});
|
|
2794
|
-
}),
|
|
2794
|
+
}), U = Y(() => {
|
|
2795
2795
|
var p;
|
|
2796
2796
|
const t = {
|
|
2797
2797
|
...bt(0),
|
|
@@ -2805,35 +2805,35 @@ const rs = { class: "flex flex-row-reverse" }, os = /* @__PURE__ */ Oe({
|
|
|
2805
2805
|
function ae(t) {
|
|
2806
2806
|
var W;
|
|
2807
2807
|
const A = (((W = a.purchaseOrder) == null ? void 0 : W.version) ?? Te.enum[1]) === Te.enum[2] ? t.id : t.sku._id, R = a.receivedMap[A];
|
|
2808
|
-
return `<span class="${D(t)} fm-typo-en-body-lg-600">${Fe.toFormatString({ value: R.received })}</span>/${
|
|
2808
|
+
return `<span class="${D(t)} fm-typo-en-body-lg-600">${Fe.toFormatString({ value: R.received })}</span>/${Lt(t.quantity, t.sku.unit, t.measurement)}`;
|
|
2809
2809
|
}
|
|
2810
2810
|
function D(t) {
|
|
2811
|
-
var
|
|
2812
|
-
const A = (((
|
|
2813
|
-
return W ? "text-fm-color-typo-tertiary" :
|
|
2811
|
+
var G;
|
|
2812
|
+
const A = (((G = a.purchaseOrder) == null ? void 0 : G.version) ?? Te.enum[1]) === Te.enum[2] ? t.id : t.sku._id, R = a.receivedMap[A], { isPartialReceive: H, isNoReceive: W, isOverReceive: te, isFullReceive: m } = Qt(R);
|
|
2813
|
+
return W ? "text-fm-color-typo-tertiary" : H ? "text-fm-color-system-warning-300" : te ? "text-fm-color-system-error-300" : m ? "text-fm-color-system-success-300" : "";
|
|
2814
2814
|
}
|
|
2815
2815
|
const O = Y(() => {
|
|
2816
2816
|
var t, p, A;
|
|
2817
|
-
return (t = a.purchaseOrder) != null && t.itemsAtSubmission ? ((p = a.purchaseOrder) == null ? void 0 : p.version) === Te.enum[2] ? a.purchaseOrder.items.reduce((R,
|
|
2817
|
+
return (t = a.purchaseOrder) != null && t.itemsAtSubmission ? ((p = a.purchaseOrder) == null ? void 0 : p.version) === Te.enum[2] ? a.purchaseOrder.items.reduce((R, H) => {
|
|
2818
2818
|
var te, m;
|
|
2819
2819
|
const W = (m = (te = a.purchaseOrder) == null ? void 0 : te.itemsAtSubmission) == null ? void 0 : m.find(
|
|
2820
|
-
(
|
|
2820
|
+
(G) => G.id === H.id
|
|
2821
2821
|
);
|
|
2822
|
-
return W && W.quantity !==
|
|
2822
|
+
return W && W.quantity !== H.quantity && R.set(H.sku.code, {
|
|
2823
2823
|
originalAmount: Number(Fe.toFormatString({ value: W.quantity })),
|
|
2824
|
-
newAmount: Number(Fe.toFormatString({ value:
|
|
2824
|
+
newAmount: Number(Fe.toFormatString({ value: H.quantity }))
|
|
2825
2825
|
}), R;
|
|
2826
|
-
}, /* @__PURE__ */ new Map()) : (A = a.purchaseOrder) == null ? void 0 : A.items.reduce((R,
|
|
2827
|
-
var
|
|
2828
|
-
const W = (le = (
|
|
2829
|
-
(oe) => oe.sku._id ===
|
|
2830
|
-
), te = W ? Number(Fe.toFormatString({ value: W.quantity })) : 0, m = Number(Fe.toFormatString({ value:
|
|
2831
|
-
return W && te !== m && R.set(
|
|
2826
|
+
}, /* @__PURE__ */ new Map()) : (A = a.purchaseOrder) == null ? void 0 : A.items.reduce((R, H) => {
|
|
2827
|
+
var G, le;
|
|
2828
|
+
const W = (le = (G = a.purchaseOrder) == null ? void 0 : G.itemsAtSubmission) == null ? void 0 : le.find(
|
|
2829
|
+
(oe) => oe.sku._id === H.sku._id
|
|
2830
|
+
), te = W ? Number(Fe.toFormatString({ value: W.quantity })) : 0, m = Number(Fe.toFormatString({ value: H.quantity }));
|
|
2831
|
+
return W && te !== m && R.set(H.sku.code, {
|
|
2832
2832
|
originalAmount: te,
|
|
2833
2833
|
newAmount: m
|
|
2834
2834
|
}), R;
|
|
2835
2835
|
}, /* @__PURE__ */ new Map()) : /* @__PURE__ */ new Map();
|
|
2836
|
-
}),
|
|
2836
|
+
}), I = (t) => {
|
|
2837
2837
|
var A, R;
|
|
2838
2838
|
const p = O.value;
|
|
2839
2839
|
return ((A = a.purchaseOrder) == null ? void 0 : A.version) === Te.enum[2] ? p.has(t.id) : p.has((R = t.sku) == null ? void 0 : R.code);
|
|
@@ -2843,7 +2843,7 @@ const rs = { class: "flex flex-row-reverse" }, os = /* @__PURE__ */ Oe({
|
|
|
2843
2843
|
return ((A = a.purchaseOrder) == null ? void 0 : A.version) === Te.enum[2] ? p.get(t.id) : p.get((R = t.sku) == null ? void 0 : R.code);
|
|
2844
2844
|
};
|
|
2845
2845
|
return (t, p) => {
|
|
2846
|
-
const A = z("FmButton"), R = z("FmButtonGroup"),
|
|
2846
|
+
const A = z("FmButton"), R = z("FmButtonGroup"), H = z("FmChip"), W = z("FmIcon"), te = z("FmMenuDivider"), m = z("FmCard"), G = z("FmTooltip"), le = z("FmSpacer"), oe = z("FmSideSheet");
|
|
2847
2847
|
return i(), re(oe, {
|
|
2848
2848
|
modelValue: v(B),
|
|
2849
2849
|
"onUpdate:modelValue": p[8] || (p[8] = (L) => Rt(B) ? B.value = L : null),
|
|
@@ -2876,7 +2876,7 @@ const rs = { class: "flex flex-row-reverse" }, os = /* @__PURE__ */ Oe({
|
|
|
2876
2876
|
onSubmitted: p[2] || (p[2] = () => {
|
|
2877
2877
|
f("update:show", !1), f("submitted");
|
|
2878
2878
|
})
|
|
2879
|
-
}, null, 8, ["purchase-order", "received-info-map"])) :
|
|
2879
|
+
}, null, 8, ["purchase-order", "received-info-map"])) : M("", !0)
|
|
2880
2880
|
])
|
|
2881
2881
|
];
|
|
2882
2882
|
}),
|
|
@@ -2898,14 +2898,14 @@ const rs = { class: "flex flex-row-reverse" }, os = /* @__PURE__ */ Oe({
|
|
|
2898
2898
|
e("div", mo, [
|
|
2899
2899
|
N(Pe, null, {
|
|
2900
2900
|
default: X(() => {
|
|
2901
|
-
var
|
|
2901
|
+
var Ve;
|
|
2902
2902
|
return [
|
|
2903
|
-
Ce(h((
|
|
2903
|
+
Ce(h((Ve = a.purchaseOrder) == null ? void 0 : Ve.status), 1)
|
|
2904
2904
|
];
|
|
2905
2905
|
}),
|
|
2906
2906
|
_: 1
|
|
2907
2907
|
}),
|
|
2908
|
-
N(
|
|
2908
|
+
N(H, {
|
|
2909
2909
|
label: qe.value.status,
|
|
2910
2910
|
class: Le(qe.value.statusClass),
|
|
2911
2911
|
compact: ""
|
|
@@ -2916,7 +2916,7 @@ const rs = { class: "flex flex-row-reverse" }, os = /* @__PURE__ */ Oe({
|
|
|
2916
2916
|
color: "#666666"
|
|
2917
2917
|
}),
|
|
2918
2918
|
e("span", fo, h(b.value), 1)
|
|
2919
|
-
])) :
|
|
2919
|
+
])) : M("", !0)
|
|
2920
2920
|
])
|
|
2921
2921
|
]),
|
|
2922
2922
|
N(te),
|
|
@@ -2925,12 +2925,12 @@ const rs = { class: "flex flex-row-reverse" }, os = /* @__PURE__ */ Oe({
|
|
|
2925
2925
|
e("div", ho, [
|
|
2926
2926
|
e("div", bo, h(v(u)("inventory.transfer.receiveRequest.details.createdAt")), 1)
|
|
2927
2927
|
]),
|
|
2928
|
-
e("div", go, h(v(
|
|
2928
|
+
e("div", go, h(v(He)(((Z = t.purchaseOrder) == null ? void 0 : Z._id) ?? "")), 1)
|
|
2929
2929
|
]),
|
|
2930
2930
|
(ce = t.purchaseOrder) != null && ce.effectiveAt ? (i(), S("div", _o, [
|
|
2931
2931
|
e("div", So, h(v(u)("inventory.transfer.receiveRequest.details.backdatedTo")), 1),
|
|
2932
2932
|
e("div", xo, h(v(gt)(new Date((de = t.purchaseOrder) == null ? void 0 : de.effectiveAt))), 1)
|
|
2933
|
-
])) :
|
|
2933
|
+
])) : M("", !0),
|
|
2934
2934
|
e("div", Oo, [
|
|
2935
2935
|
e("div", wo, h(v(u)("inventory.transfer.receiveRequest.details.type.title")), 1),
|
|
2936
2936
|
e("div", $o, h(v(u)(
|
|
@@ -2940,19 +2940,19 @@ const rs = { class: "flex flex-row-reverse" }, os = /* @__PURE__ */ Oe({
|
|
|
2940
2940
|
(ie = (ye = t.purchaseOrder) == null ? void 0 : ye.supplier) != null && ie.name ? (i(), S("div", Co, [
|
|
2941
2941
|
e("div", Ro, h(v(u)("inventory.transfer.receiveRequest.details.from")), 1),
|
|
2942
2942
|
e("div", ko, h((je = ($e = t.purchaseOrder) == null ? void 0 : $e.supplier) == null ? void 0 : je.name), 1)
|
|
2943
|
-
])) :
|
|
2943
|
+
])) : M("", !0),
|
|
2944
2944
|
t.transferTo ? (i(), S("div", Do, [
|
|
2945
2945
|
e("div", No, h(v(u)("inventory.transfer.receiveRequest.details.to")), 1),
|
|
2946
2946
|
e("div", Ao, h(t.transferTo), 1)
|
|
2947
|
-
])) :
|
|
2947
|
+
])) : M("", !0),
|
|
2948
2948
|
(he = t.purchaseOrder) != null && he.ref ? (i(), S("div", To, [
|
|
2949
2949
|
e("div", Fo, h(v(u)("inventory.transfer.receiveRequest.details.reference")), 1),
|
|
2950
|
-
e("div",
|
|
2951
|
-
])) :
|
|
2952
|
-
(Ae = t.purchaseOrder) != null && Ae.remark ? (i(), S("div",
|
|
2950
|
+
e("div", Io, h(t.purchaseOrder.ref), 1)
|
|
2951
|
+
])) : M("", !0),
|
|
2952
|
+
(Ae = t.purchaseOrder) != null && Ae.remark ? (i(), S("div", Po, [
|
|
2953
2953
|
e("div", qo, h(v(u)("inventory.transfer.receiveRequest.details.remark")), 1),
|
|
2954
|
-
e("div",
|
|
2955
|
-
])) :
|
|
2954
|
+
e("div", Vo, h(t.purchaseOrder.remark), 1)
|
|
2955
|
+
])) : M("", !0)
|
|
2956
2956
|
])
|
|
2957
2957
|
];
|
|
2958
2958
|
}),
|
|
@@ -2966,12 +2966,12 @@ const rs = { class: "flex flex-row-reverse" }, os = /* @__PURE__ */ Oe({
|
|
|
2966
2966
|
transferToDbName: t.transferToDbName,
|
|
2967
2967
|
scope: t.scope
|
|
2968
2968
|
}, null, 8, ["po-request", "purchaseOrder", "transferType", "transferToDbName", "scope"]),
|
|
2969
|
-
e("div",
|
|
2969
|
+
e("div", Eo, [
|
|
2970
2970
|
e("div", Lo, [
|
|
2971
|
-
e("div",
|
|
2972
|
-
e("span",
|
|
2971
|
+
e("div", Mo, [
|
|
2972
|
+
e("span", Uo, [
|
|
2973
2973
|
Ce(h(fe.value ? v(u)("inventory.transfer.receiveRequest.details.receivedItems") : v(u)("inventory.transfer.receiveRequest.details.requestedItems")) + " ", 1),
|
|
2974
|
-
(ne = (L = t.purchaseOrder) == null ? void 0 : L.netSuite) != null && ne.missingItems && ((De = (Se = t.purchaseOrder) == null ? void 0 : Se.netSuite) == null ? void 0 : De.missingItems.length) > 0 ? (i(), re(
|
|
2974
|
+
(ne = (L = t.purchaseOrder) == null ? void 0 : L.netSuite) != null && ne.missingItems && ((De = (Se = t.purchaseOrder) == null ? void 0 : Se.netSuite) == null ? void 0 : De.missingItems.length) > 0 ? (i(), re(G, {
|
|
2975
2975
|
key: 0,
|
|
2976
2976
|
variant: "rich",
|
|
2977
2977
|
placement: "top",
|
|
@@ -3002,7 +3002,7 @@ const rs = { class: "flex flex-row-reverse" }, os = /* @__PURE__ */ Oe({
|
|
|
3002
3002
|
})
|
|
3003
3003
|
]),
|
|
3004
3004
|
_: 1
|
|
3005
|
-
})) :
|
|
3005
|
+
})) : M("", !0)
|
|
3006
3006
|
])
|
|
3007
3007
|
]),
|
|
3008
3008
|
N(te),
|
|
@@ -3015,7 +3015,7 @@ const rs = { class: "flex flex-row-reverse" }, os = /* @__PURE__ */ Oe({
|
|
|
3015
3015
|
e("div", jo, [
|
|
3016
3016
|
e("div", zo, [
|
|
3017
3017
|
Ce(h(Z.name) + " ", 1),
|
|
3018
|
-
|
|
3018
|
+
I(Z) ? (i(), re(G, {
|
|
3019
3019
|
key: 0,
|
|
3020
3020
|
variant: "rich",
|
|
3021
3021
|
placement: "top",
|
|
@@ -3039,29 +3039,29 @@ const rs = { class: "flex flex-row-reverse" }, os = /* @__PURE__ */ Oe({
|
|
|
3039
3039
|
})
|
|
3040
3040
|
]),
|
|
3041
3041
|
_: 2
|
|
3042
|
-
}, 1024)) :
|
|
3042
|
+
}, 1024)) : M("", !0)
|
|
3043
3043
|
]),
|
|
3044
|
-
e("div",
|
|
3044
|
+
e("div", Go, [
|
|
3045
3045
|
e("span", {
|
|
3046
3046
|
innerHTML: ae(Z)
|
|
3047
|
-
}, null, 8,
|
|
3047
|
+
}, null, 8, Ho)
|
|
3048
3048
|
])
|
|
3049
3049
|
]),
|
|
3050
3050
|
e("div", Wo, [
|
|
3051
3051
|
e("div", Qo, h(Z.code), 1),
|
|
3052
|
-
(de = Z.totalCost) != null && de.amount && v(_).enableTotalCost ? (i(), S("div", Yo, " (" + h(v(Ke)(Z.totalCost)) + ") ", 1)) :
|
|
3052
|
+
(de = Z.totalCost) != null && de.amount && v(_).enableTotalCost ? (i(), S("div", Yo, " (" + h(v(Ke)(Z.totalCost)) + ") ", 1)) : M("", !0)
|
|
3053
3053
|
])
|
|
3054
3054
|
]);
|
|
3055
3055
|
}), 128)),
|
|
3056
|
-
+v(ve)(
|
|
3056
|
+
+v(ve)(U.value) ? (i(), S(ue, { key: 0 }, [
|
|
3057
3057
|
e("div", Jo, [
|
|
3058
3058
|
N(te)
|
|
3059
3059
|
]),
|
|
3060
3060
|
e("div", Xo, [
|
|
3061
3061
|
p[10] || (p[10] = e("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, "Total:", -1)),
|
|
3062
|
-
e("div", Zo, h(v(Ke)(
|
|
3062
|
+
e("div", Zo, h(v(Ke)(U.value)), 1)
|
|
3063
3063
|
])
|
|
3064
|
-
], 64)) :
|
|
3064
|
+
], 64)) : M("", !0)
|
|
3065
3065
|
])
|
|
3066
3066
|
])
|
|
3067
3067
|
], 64)) : K.value.value === "deliveryHistory" ? (i(), S("div", en, [
|
|
@@ -3088,7 +3088,7 @@ const rs = { class: "flex flex-row-reverse" }, os = /* @__PURE__ */ Oe({
|
|
|
3088
3088
|
name: "local_shipping",
|
|
3089
3089
|
outline: "",
|
|
3090
3090
|
color: "#ffffff"
|
|
3091
|
-
})) :
|
|
3091
|
+
})) : M("", !0)
|
|
3092
3092
|
]),
|
|
3093
3093
|
e("div", dn, [
|
|
3094
3094
|
e("div", {
|
|
@@ -3115,7 +3115,7 @@ const rs = { class: "flex flex-row-reverse" }, os = /* @__PURE__ */ Oe({
|
|
|
3115
3115
|
onSubmitted: p[3] || (p[3] = () => {
|
|
3116
3116
|
f("update:show", !1), f("submitted");
|
|
3117
3117
|
})
|
|
3118
|
-
}, null, 8, ["deliveryOrder", "purchaseOrder"])) :
|
|
3118
|
+
}, null, 8, ["deliveryOrder", "purchaseOrder"])) : M("", !0),
|
|
3119
3119
|
(ye = (de = Z.deliveryOrder) == null ? void 0 : de.netSuite) != null && ye.id ? (i(), re(Pe, { key: 1 }, {
|
|
3120
3120
|
default: X(() => {
|
|
3121
3121
|
var he, Ae;
|
|
@@ -3126,12 +3126,12 @@ const rs = { class: "flex flex-row-reverse" }, os = /* @__PURE__ */ Oe({
|
|
|
3126
3126
|
];
|
|
3127
3127
|
}),
|
|
3128
3128
|
_: 2
|
|
3129
|
-
}, 1024)) :
|
|
3130
|
-
t.purchaseOrder && ((ie = Z.deliveryOrder) != null && ie.id) ? (i(), re(
|
|
3129
|
+
}, 1024)) : M("", !0),
|
|
3130
|
+
t.purchaseOrder && ((ie = Z.deliveryOrder) != null && ie.id) ? (i(), re(Mt, {
|
|
3131
3131
|
key: 2,
|
|
3132
3132
|
"purchase-order-id": ($e = t.purchaseOrder) == null ? void 0 : $e._id,
|
|
3133
3133
|
"delivery-order-id": (je = Z.deliveryOrder) == null ? void 0 : je.id
|
|
3134
|
-
}, null, 8, ["purchase-order-id", "delivery-order-id"])) :
|
|
3134
|
+
}, null, 8, ["purchase-order-id", "delivery-order-id"])) : M("", !0)
|
|
3135
3135
|
])
|
|
3136
3136
|
])
|
|
3137
3137
|
]),
|
|
@@ -3162,13 +3162,13 @@ const rs = { class: "flex flex-row-reverse" }, os = /* @__PURE__ */ Oe({
|
|
|
3162
3162
|
}, [
|
|
3163
3163
|
e("div", xn, h(he == null ? void 0 : he.label), 1),
|
|
3164
3164
|
e("div", On, [
|
|
3165
|
-
(i(!0), S(ue, null, _e(he == null ? void 0 : he.values, (
|
|
3165
|
+
(i(!0), S(ue, null, _e(he == null ? void 0 : he.values, (Ve, Ot) => (i(), S("div", {
|
|
3166
3166
|
key: Ot,
|
|
3167
3167
|
class: "fm-typo-en-body-lg-600"
|
|
3168
3168
|
}, [
|
|
3169
|
-
typeof
|
|
3170
|
-
Ce(h(
|
|
3171
|
-
], 64)) : (i(), re(kt(
|
|
3169
|
+
typeof Ve == "string" ? (i(), S(ue, { key: 0 }, [
|
|
3170
|
+
Ce(h(Ve), 1)
|
|
3171
|
+
], 64)) : (i(), re(kt(Ve), { key: 1 }))
|
|
3172
3172
|
]))), 128))
|
|
3173
3173
|
])
|
|
3174
3174
|
]))), 128))
|
|
@@ -3184,7 +3184,7 @@ const rs = { class: "flex flex-row-reverse" }, os = /* @__PURE__ */ Oe({
|
|
|
3184
3184
|
N(le),
|
|
3185
3185
|
e("div", null, [
|
|
3186
3186
|
e("img", {
|
|
3187
|
-
src: v(
|
|
3187
|
+
src: v(qt),
|
|
3188
3188
|
alt: "List is empty"
|
|
3189
3189
|
}, null, 8, sn)
|
|
3190
3190
|
]),
|
|
@@ -3193,13 +3193,13 @@ const rs = { class: "flex flex-row-reverse" }, os = /* @__PURE__ */ Oe({
|
|
|
3193
3193
|
N(le),
|
|
3194
3194
|
N(le)
|
|
3195
3195
|
]))
|
|
3196
|
-
])) :
|
|
3196
|
+
])) : M("", !0)
|
|
3197
3197
|
])
|
|
3198
3198
|
];
|
|
3199
3199
|
}),
|
|
3200
3200
|
"side-sheet-footer": X(() => [
|
|
3201
3201
|
e("div", wn, [
|
|
3202
|
-
(i(!0), S(ue, null, _e(
|
|
3202
|
+
(i(!0), S(ue, null, _e(P.value, (L) => (i(), S(ue, null, [
|
|
3203
3203
|
v(ot)[L].available != !1 ? (i(), re(A, {
|
|
3204
3204
|
key: L,
|
|
3205
3205
|
label: v(u)(v(ot)[L].translationKey),
|
|
@@ -3207,29 +3207,29 @@ const rs = { class: "flex flex-row-reverse" }, os = /* @__PURE__ */ Oe({
|
|
|
3207
3207
|
loading: l.value === L,
|
|
3208
3208
|
disabled: l.value !== L && F.value,
|
|
3209
3209
|
variant: v(ot)[L].buttonVariant
|
|
3210
|
-
}, null, 8, ["label", "onClick", "loading", "disabled", "variant"])) :
|
|
3210
|
+
}, null, 8, ["label", "onClick", "loading", "disabled", "variant"])) : M("", !0)
|
|
3211
3211
|
], 64))), 256)),
|
|
3212
|
-
v(w).ableToMarkReceived(t.purchaseOrder) && !
|
|
3212
|
+
v(w).ableToMarkReceived(t.purchaseOrder) && !P.value.includes("completeReceive") ? (i(), re(A, {
|
|
3213
3213
|
key: 0,
|
|
3214
3214
|
label: v(u)("inventory.transfer.receiveRequest.actions.completeReceive"),
|
|
3215
3215
|
onClick: p[4] || (p[4] = (L) => pe("completeReceive")),
|
|
3216
3216
|
loading: l.value === "completeReceive",
|
|
3217
3217
|
disabled: l.value !== "completeReceive" && F.value
|
|
3218
|
-
}, null, 8, ["label", "loading", "disabled"])) :
|
|
3219
|
-
v(w).ableToMarkApproved(t.purchaseOrder) && t.canApprove && !
|
|
3218
|
+
}, null, 8, ["label", "loading", "disabled"])) : M("", !0),
|
|
3219
|
+
v(w).ableToMarkApproved(t.purchaseOrder) && t.canApprove && !P.value.includes("approveRequest") ? (i(), re(A, {
|
|
3220
3220
|
key: 1,
|
|
3221
3221
|
label: v(u)("inventory.transfer.approval.actions.approveRequest"),
|
|
3222
3222
|
onClick: p[5] || (p[5] = (L) => pe("approveRequest")),
|
|
3223
3223
|
loading: l.value === "approveRequest",
|
|
3224
3224
|
disabled: l.value !== "approveRequest" && F.value
|
|
3225
|
-
}, null, 8, ["label", "loading", "disabled"])) :
|
|
3225
|
+
}, null, 8, ["label", "loading", "disabled"])) : M("", !0),
|
|
3226
3226
|
v(w).ableToCreateFulfillment(t.purchaseOrder, t.poRequest) && a.scope === "approval" ? (i(), re(A, {
|
|
3227
3227
|
key: 2,
|
|
3228
3228
|
label: v(u)("inventory.transfer.receiveRequest.actions.processRequest"),
|
|
3229
3229
|
onClick: p[6] || (p[6] = (L) => pe("processRequest")),
|
|
3230
3230
|
loading: l.value === "processRequest",
|
|
3231
3231
|
disabled: l.value !== "processRequest" && F.value
|
|
3232
|
-
}, null, 8, ["label", "loading", "disabled"])) :
|
|
3232
|
+
}, null, 8, ["label", "loading", "disabled"])) : M("", !0),
|
|
3233
3233
|
N(A, {
|
|
3234
3234
|
label: v(u)("common.close"),
|
|
3235
3235
|
variant: "tertiary",
|