@feedmepos/mf-inventory-portal 1.0.12-dev.3 → 1.0.12-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-CljcnwTp.js → App-BL2nCyap.js} +2 -2
- package/dist/{ApprovalView-DKHAt7sK.js → ApprovalView-vS1YEuU_.js} +2 -2
- package/dist/{BindingsDialog-6ugkEqMg.js → BindingsDialog-C4R_jwpd.js} +2 -2
- package/dist/{BindingsPicker-CUEp4Rya.js → BindingsPicker-CYMXnQP5.js} +1 -1
- package/dist/{BindingsTable-CDEEfdfm.js → BindingsTable-BzR3jqR0.js} +1 -1
- package/dist/{ClosingDraftView-l-X-AkGj.js → ClosingDraftView-DtwSV0H_.js} +2 -2
- package/dist/{ClosingTemplateView-BG_TYDpD.js → ClosingTemplateView-DKPvsw5M.js} +2 -2
- package/dist/{DeliveryOrderPrintPreview-C8jN6FgI.js → DeliveryOrderPrintPreview-C1-5Crzv.js} +1 -1
- package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-Bs1AUyTV.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-D6l4_SO6.js} +3 -3
- package/dist/{FmMultiselectDialog-EdDWUr8X.js → FmMultiselectDialog-BEu1aJTA.js} +1 -1
- package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-BowjSVzo.js → FmUnitInput.vue_vue_type_script_setup_true_lang-DYPlBeyi.js} +1 -1
- package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-DBgStPS1.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-DOmWK6qi.js} +1 -1
- package/dist/{IngredientGroupView-B7xqsZxh.js → IngredientGroupView-DKqGa4a0.js} +2 -2
- package/dist/{IngredientsView-B1-n1Zuh.js → IngredientsView-DexjuWZI.js} +4 -4
- package/dist/{IntegrationView-DZRfJNZa.js → IntegrationView-1i9qdG0-.js} +5 -5
- package/dist/{InventoryBindingForm-GMN9TPaW.js → InventoryBindingForm-CU8K2Jm3.js} +1 -1
- package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-CeYnBXsj.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-C3fLld3Z.js} +44 -40
- package/dist/{InventoryBindingSummary-Ik2xxLpF.js → InventoryBindingSummary-ZSNpIS9_.js} +1 -1
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-BVO2un0T.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-DrI0E5lk.js} +1 -1
- package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-DhaFDjSB.js → PremiumBadge.vue_vue_type_script_setup_true_lang-B0cgQnfc.js} +1 -1
- package/dist/{PublishView-BewFP4rz.js → PublishView-BVZ6cSR6.js} +2 -2
- package/dist/{PurchaseOrderPrintPreview-1bOdlac_.js → PurchaseOrderPrintPreview-DSiQqUcx.js} +1 -1
- package/dist/{ReceiveRequestView-DyDpfSKU.js → ReceiveRequestView-OPV7Xi-d.js} +10 -10
- package/dist/RecipeView-__VoHsYO.js +622 -0
- package/dist/{StockView-D_X0Cfg7.js → StockView-DhmPlA-Q.js} +7 -7
- package/dist/{SupplierView-D2SizsKP.js → SupplierView-Bf8330x3.js} +4 -4
- package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-C0Pp6j3l.js → TransferDetails.vue_vue_type_script_setup_true_lang-BvJ-bbz7.js} +278 -278
- package/dist/{TransferTemplateView-BryKJByH.js → TransferTemplateView-BqfqE7Mi.js} +7 -7
- package/dist/{UnitView-sxq1JS_q.js → UnitView-B3bcLtHq.js} +3 -3
- package/dist/{WarehouseView-CPWmY5ep.js → WarehouseView-U-7GF5b9.js} +1 -1
- package/dist/{app-PeqY3WSF.js → app-DkaoQJXB.js} +130 -251
- package/dist/app.d.ts +6 -0
- package/dist/app.js +1 -1
- package/dist/{decimal-CdkeOQTR.js → decimal-ComYENyK.js} +1 -1
- package/dist/{feature-BByh_whS.js → feature-BFRn_gjx.js} +2 -2
- package/dist/{format-unit-display-DWnOEHsP.js → format-unit-display-D9aB7RLY.js} +2 -2
- package/dist/{index-BV_MbLKM.js → index-DcI4kpof.js} +2 -2
- package/dist/{index-Bzox-uMM.js → index-Dfqhgb9-.js} +1 -1
- package/dist/{stock-rByuoj6o.js → stock-kDMnsdKt.js} +1 -1
- package/dist/{supplier-DIWM2MFM.js → supplier-CYkSEUi_.js} +2 -2
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{use-ingredient-select-dialog-dO5sLLm4.js → use-ingredient-select-dialog-DQulb-JE.js} +1 -1
- package/dist/{use-inventory-binding-dialog-Dnn4uY0z.js → use-inventory-binding-dialog-DKjXbugG.js} +1 -1
- package/dist/views/ingredients/components/inventory-binding/InventoryBindingForm.vue.d.ts +1 -0
- package/dist/{vue-i18n-BrUAO3nM.js → vue-i18n-D8b9w5Yh.js} +271 -271
- package/package.json +1 -1
- package/dist/RecipeView-aa5rptHU.js +0 -620
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { X as it, u as me, aH as
|
|
2
|
-
import { ref as j, computed as G, h as N, defineComponent as qe, onMounted as at, unref as y, openBlock as _, createElementBlock as q, createElementVNode as r, toDisplayString as
|
|
3
|
-
import { F as St } from "./decimal-
|
|
4
|
-
import { b as Rt, u as xt, f as nt, P as he } from "./format-unit-display-
|
|
1
|
+
import { X as it, u as me, aH as O, b as Be, a2 as ut, a4 as dt, a5 as mt, aI as ft, d as Ye, e as tt, T as rt, aJ as pt, Z as Fe, J as ke, i as le, aK as st, a9 as De, f as We, h as z, D as Z, aq as se, a3 as yt, ao as Je, a1 as xe, aL as vt, ae as Te, ar as ht } from "./app-DkaoQJXB.js";
|
|
2
|
+
import { ref as j, computed as G, h as N, defineComponent as qe, onMounted as at, unref as y, openBlock as _, createElementBlock as q, createElementVNode as r, toDisplayString as x, createCommentVNode as V, resolveComponent as Q, createVNode as B, reactive as bt, createBlock as ue, withCtx as de, watch as gt, isRef as _t, Fragment as re, normalizeClass as Oe, createTextVNode as $e, renderList as ye, resolveDynamicComponent as wt } from "vue";
|
|
3
|
+
import { F as St } from "./decimal-ComYENyK.js";
|
|
4
|
+
import { b as Rt, u as xt, f as nt, P as he } from "./format-unit-display-D9aB7RLY.js";
|
|
5
5
|
import { useCoreStore as Ue, useI18n as ot } from "@feedmepos/mf-common";
|
|
6
6
|
import { E as Ot } from "./empty-placeholder-wf6-BWE8.js";
|
|
7
7
|
import { useDialog as Le, useSnackbar as Ve, components as Xe, FmButtonVariant as ee, useProxiedModel as kt } from "@feedmepos/ui-library";
|
|
8
|
-
import { u as Me, F as Ce } from "./feature-
|
|
9
|
-
import { u as Dt } from "./index-
|
|
10
|
-
import { _ as qt, F as Nt, a as At } from "./FmUnitInput.vue_vue_type_script_setup_true_lang-
|
|
11
|
-
import { u as
|
|
8
|
+
import { u as Me, F as Ce } from "./feature-BFRn_gjx.js";
|
|
9
|
+
import { u as Dt } from "./index-DcI4kpof.js";
|
|
10
|
+
import { _ as qt, F as Nt, a as At } from "./FmUnitInput.vue_vue_type_script_setup_true_lang-DYPlBeyi.js";
|
|
11
|
+
import { u as Pt, R as Ze } from "./usePromise-CbVUCxhj.js";
|
|
12
12
|
const Ne = it((n, l) => {
|
|
13
13
|
const o = me(), b = Ue();
|
|
14
14
|
return {
|
|
@@ -69,7 +69,7 @@ const Ne = it((n, l) => {
|
|
|
69
69
|
}
|
|
70
70
|
};
|
|
71
71
|
}), ct = {
|
|
72
|
-
[
|
|
72
|
+
[O.enum.confirmDraft]: {
|
|
73
73
|
primaryActions: {
|
|
74
74
|
text: "Confirm draft",
|
|
75
75
|
close: !0
|
|
@@ -78,7 +78,7 @@ const Ne = it((n, l) => {
|
|
|
78
78
|
message: "Purchase order cannot be changed after confirm draft.",
|
|
79
79
|
successMessage: "Purchase order draft has been confirmed"
|
|
80
80
|
},
|
|
81
|
-
[
|
|
81
|
+
[O.enum.cancelDraft]: {
|
|
82
82
|
primaryActions: {
|
|
83
83
|
text: "Cancel draft",
|
|
84
84
|
close: !0,
|
|
@@ -88,7 +88,7 @@ const Ne = it((n, l) => {
|
|
|
88
88
|
message: "Purchase order cannot be changed after cancelled draft.",
|
|
89
89
|
successMessage: "Purchase order draft has been cancelled"
|
|
90
90
|
},
|
|
91
|
-
[
|
|
91
|
+
[O.enum.submitRequest]: {
|
|
92
92
|
primaryActions: {
|
|
93
93
|
text: "Submit request",
|
|
94
94
|
close: !0
|
|
@@ -97,7 +97,7 @@ const Ne = it((n, l) => {
|
|
|
97
97
|
message: "Purchase order cannot be changed after confirm draft.",
|
|
98
98
|
successMessage: "Purchase order draft has been submitted"
|
|
99
99
|
},
|
|
100
|
-
[
|
|
100
|
+
[O.enum.completeReceive]: {
|
|
101
101
|
primaryActions: {
|
|
102
102
|
text: "Mark received",
|
|
103
103
|
close: !0
|
|
@@ -106,7 +106,7 @@ const Ne = it((n, l) => {
|
|
|
106
106
|
message: "Purchase order cannot be changed after it has complete receiving.",
|
|
107
107
|
successMessage: "Purchase order has been marked as received"
|
|
108
108
|
},
|
|
109
|
-
[
|
|
109
|
+
[O.enum.approveRequest]: {
|
|
110
110
|
primaryActions: {
|
|
111
111
|
text: "Accept request",
|
|
112
112
|
close: !0
|
|
@@ -115,7 +115,7 @@ const Ne = it((n, l) => {
|
|
|
115
115
|
message: "Transfer out request will be accepted.",
|
|
116
116
|
successMessage: "Transfer out request has been approved"
|
|
117
117
|
},
|
|
118
|
-
[
|
|
118
|
+
[O.enum.rejectRequest]: {
|
|
119
119
|
primaryActions: {
|
|
120
120
|
text: "Reject request",
|
|
121
121
|
close: !0,
|
|
@@ -130,7 +130,7 @@ function lt() {
|
|
|
130
130
|
const n = me(), l = Ne(), o = Me();
|
|
131
131
|
async function b(s, f) {
|
|
132
132
|
const u = n.currentLocationDBName;
|
|
133
|
-
return s.doc.supplier.internal && s.operation ===
|
|
133
|
+
return s.doc.supplier.internal && s.operation === O.enum.confirmDraft && (s.operation = O.enum.submitRequest), await l.processPurchaseOrder(s, f || u);
|
|
134
134
|
}
|
|
135
135
|
async function m(s, f) {
|
|
136
136
|
const u = n.currentLocationDBName;
|
|
@@ -146,17 +146,17 @@ function Os(n, l) {
|
|
|
146
146
|
const s = Rt(), f = xt(), u = j(!1), a = Ve(), h = Ne(), i = j(new Array()), p = j(
|
|
147
147
|
l != null && l.startDate && (l != null && l.endDate) ? l : ut()
|
|
148
148
|
), t = G(() => {
|
|
149
|
-
const
|
|
149
|
+
const k = new Date(p.value.startDate), R = new Date(p.value.endDate);
|
|
150
150
|
return {
|
|
151
|
-
start: dt(
|
|
152
|
-
end: mt(
|
|
151
|
+
start: dt(k).toISOString(),
|
|
152
|
+
end: mt(R).toISOString()
|
|
153
153
|
};
|
|
154
154
|
}), v = j(new Array()), D = ft(), w = j(null);
|
|
155
|
-
async function A(
|
|
156
|
-
function
|
|
155
|
+
async function A(k) {
|
|
156
|
+
function R(e) {
|
|
157
157
|
const c = {
|
|
158
158
|
mode: Ye.CREATE,
|
|
159
|
-
modelValue:
|
|
159
|
+
modelValue: k || void 0,
|
|
160
160
|
show: !0,
|
|
161
161
|
"onUpdate:show"(g) {
|
|
162
162
|
Se.value.show = g;
|
|
@@ -166,8 +166,8 @@ function Os(n, l) {
|
|
|
166
166
|
};
|
|
167
167
|
Se.value = c;
|
|
168
168
|
}
|
|
169
|
-
let
|
|
170
|
-
m.mustUsePoTemplate && !(
|
|
169
|
+
let U;
|
|
170
|
+
m.mustUsePoTemplate && !(k != null && k.template) ? o.open({
|
|
171
171
|
title: "Create transfer",
|
|
172
172
|
message: "",
|
|
173
173
|
primaryActions: {
|
|
@@ -180,34 +180,34 @@ function Os(n, l) {
|
|
|
180
180
|
close: !0
|
|
181
181
|
}
|
|
182
182
|
}).onPrimary(async () => {
|
|
183
|
-
|
|
183
|
+
U = await s.getTemplateId(), U && R(U);
|
|
184
184
|
}).onSecondary(() => {
|
|
185
|
-
|
|
186
|
-
}) :
|
|
185
|
+
R(void 0);
|
|
186
|
+
}) : R(U);
|
|
187
187
|
}
|
|
188
|
-
function
|
|
189
|
-
const
|
|
188
|
+
function F(k) {
|
|
189
|
+
const R = {
|
|
190
190
|
mode: Ye.UPDATE,
|
|
191
|
-
modelValue: tt(
|
|
191
|
+
modelValue: tt(k),
|
|
192
192
|
show: !0,
|
|
193
|
-
"onUpdate:show"(
|
|
194
|
-
Se.value.show =
|
|
193
|
+
"onUpdate:show"(U) {
|
|
194
|
+
Se.value.show = U;
|
|
195
195
|
},
|
|
196
196
|
lastClosingDate: w.value
|
|
197
197
|
};
|
|
198
|
-
Se.value =
|
|
198
|
+
Se.value = R;
|
|
199
199
|
}
|
|
200
200
|
async function W() {
|
|
201
201
|
i.value = [], u.value = !0;
|
|
202
202
|
try {
|
|
203
203
|
i.value = await h.getPurchaseOrders(t.value).then((e) => e.sort((c, g) => g._id.localeCompare(c._id)));
|
|
204
|
-
const
|
|
205
|
-
|
|
206
|
-
const
|
|
204
|
+
const k = await D.readCurrentLocationLastClosing(!0), R = k == null ? void 0 : k._id;
|
|
205
|
+
R && (w.value = pt(R)), m.mustUsePoTemplate && await f.fetchTemplates();
|
|
206
|
+
const U = i.value.map((e) => {
|
|
207
207
|
var c;
|
|
208
208
|
return ((c = e.request) == null ? void 0 : c.id) ?? "";
|
|
209
209
|
}).filter((e) => e);
|
|
210
|
-
v.value = await h.readRequestByIds(
|
|
210
|
+
v.value = await h.readRequestByIds(U);
|
|
211
211
|
} catch {
|
|
212
212
|
a.open({
|
|
213
213
|
title: "Something went wrong",
|
|
@@ -225,7 +225,7 @@ function Os(n, l) {
|
|
|
225
225
|
void 0,
|
|
226
226
|
t.value.start,
|
|
227
227
|
t.value.end
|
|
228
|
-
).then((
|
|
228
|
+
).then((k) => k.reverse());
|
|
229
229
|
} catch {
|
|
230
230
|
a.open({
|
|
231
231
|
title: "Something went wrong",
|
|
@@ -244,28 +244,28 @@ function Os(n, l) {
|
|
|
244
244
|
return J();
|
|
245
245
|
}
|
|
246
246
|
}
|
|
247
|
-
function ne(
|
|
247
|
+
function ne(k, R) {
|
|
248
248
|
p.value = {
|
|
249
|
-
startDate:
|
|
250
|
-
endDate:
|
|
249
|
+
startDate: k,
|
|
250
|
+
endDate: R
|
|
251
251
|
}, ae();
|
|
252
252
|
}
|
|
253
|
-
b.watchLocation(async (
|
|
254
|
-
if (!
|
|
253
|
+
b.watchLocation(async (k) => {
|
|
254
|
+
if (!k) {
|
|
255
255
|
i.value = [];
|
|
256
256
|
return;
|
|
257
257
|
}
|
|
258
258
|
await ae();
|
|
259
259
|
});
|
|
260
260
|
const te = j(), oe = j(Math.random().toString());
|
|
261
|
-
async function ie(
|
|
262
|
-
const
|
|
263
|
-
oe.value =
|
|
264
|
-
(g) => g.purchaseOrderId ===
|
|
261
|
+
async function ie(k, R) {
|
|
262
|
+
const U = Math.random().toString();
|
|
263
|
+
oe.value = U, R ?? (R = v.value.computeFirst(
|
|
264
|
+
(g) => g.purchaseOrderId === k._id ? g : null
|
|
265
265
|
) ?? void 0);
|
|
266
|
-
const e = n === "receive/request" ? b.currentLocation :
|
|
267
|
-
poRequest:
|
|
268
|
-
purchaseOrder:
|
|
266
|
+
const e = n === "receive/request" ? b.currentLocation : R == null ? void 0 : R.to, c = {
|
|
267
|
+
poRequest: R,
|
|
268
|
+
purchaseOrder: k,
|
|
269
269
|
transferTo: e == null ? void 0 : e.name,
|
|
270
270
|
transferToDbName: e == null ? void 0 : e.dbName,
|
|
271
271
|
show: !0,
|
|
@@ -278,37 +278,37 @@ function Os(n, l) {
|
|
|
278
278
|
};
|
|
279
279
|
te.value = c;
|
|
280
280
|
}
|
|
281
|
-
async function Ae(
|
|
281
|
+
async function Ae(k, R, U, e) {
|
|
282
282
|
const c = lt();
|
|
283
283
|
u.value = !0;
|
|
284
284
|
try {
|
|
285
285
|
await c({
|
|
286
286
|
operate: {
|
|
287
|
-
operation:
|
|
288
|
-
doc:
|
|
287
|
+
operation: R,
|
|
288
|
+
doc: k,
|
|
289
289
|
options: (
|
|
290
290
|
// auto receive for supplier to warehouse
|
|
291
|
-
(
|
|
292
|
-
|
|
291
|
+
(R === O.enum.confirmDraft || // auto receive for warehouse to warehouse
|
|
292
|
+
R === O.enum.completeReceive) && m.autoReceiveWarehouse ? {
|
|
293
293
|
autoReceive: !0
|
|
294
294
|
} : void 0
|
|
295
295
|
)
|
|
296
296
|
},
|
|
297
297
|
operateV2: {
|
|
298
|
-
_id:
|
|
299
|
-
_rev:
|
|
300
|
-
action:
|
|
298
|
+
_id: k._id,
|
|
299
|
+
_rev: k._rev ?? "",
|
|
300
|
+
action: R
|
|
301
301
|
},
|
|
302
302
|
transferTo: e
|
|
303
|
-
}), await new Promise((
|
|
304
|
-
const
|
|
305
|
-
|
|
303
|
+
}), await new Promise((C) => setTimeout(C, 1e3));
|
|
304
|
+
const S = me().currentLocationDBName.startsWith("restaurant_");
|
|
305
|
+
R === O.enum.confirmDraft && k.effectiveAt && S ? a.open({
|
|
306
306
|
title: "Success",
|
|
307
|
-
message: `${
|
|
307
|
+
message: `${U}. The backdate will be reflected once your POS has received this change.`,
|
|
308
308
|
type: "success"
|
|
309
309
|
}) : a.open({
|
|
310
310
|
title: "Success",
|
|
311
|
-
message:
|
|
311
|
+
message: U,
|
|
312
312
|
type: "success"
|
|
313
313
|
});
|
|
314
314
|
} catch (g) {
|
|
@@ -316,17 +316,17 @@ function Os(n, l) {
|
|
|
316
316
|
title: "Something went wrong",
|
|
317
317
|
message: "Please try again.",
|
|
318
318
|
type: "error"
|
|
319
|
-
}), console.error("Error when submitting PO operation",
|
|
319
|
+
}), console.error("Error when submitting PO operation", R, k, g);
|
|
320
320
|
} finally {
|
|
321
321
|
u.value = !1, ae();
|
|
322
322
|
}
|
|
323
323
|
}
|
|
324
|
-
async function be(
|
|
325
|
-
const e = ct[
|
|
324
|
+
async function be(k, R, U) {
|
|
325
|
+
const e = ct[R];
|
|
326
326
|
if (!e) {
|
|
327
327
|
a.open({
|
|
328
328
|
title: "Something went wrong",
|
|
329
|
-
message: `Cannot process order: ${rt(
|
|
329
|
+
message: `Cannot process order: ${rt(R)}`,
|
|
330
330
|
type: "error"
|
|
331
331
|
});
|
|
332
332
|
return;
|
|
@@ -337,10 +337,10 @@ function Os(n, l) {
|
|
|
337
337
|
message: g.message,
|
|
338
338
|
primaryActions: g.primaryActions
|
|
339
339
|
}).onPrimary(() => {
|
|
340
|
-
Ae(
|
|
340
|
+
Ae(k, R, c, U);
|
|
341
341
|
});
|
|
342
342
|
}
|
|
343
|
-
async function
|
|
343
|
+
async function Pe() {
|
|
344
344
|
o.open({
|
|
345
345
|
title: "Upload Transfer",
|
|
346
346
|
primaryActions: {
|
|
@@ -352,13 +352,13 @@ function Os(n, l) {
|
|
|
352
352
|
close: !0
|
|
353
353
|
}
|
|
354
354
|
}).onPrimary(() => {
|
|
355
|
-
const
|
|
355
|
+
const k = {
|
|
356
356
|
show: !0,
|
|
357
|
-
"onUpdate:show"(
|
|
358
|
-
Ie.value.show =
|
|
357
|
+
"onUpdate:show"(R) {
|
|
358
|
+
Ie.value.show = R;
|
|
359
359
|
}
|
|
360
360
|
};
|
|
361
|
-
Ie.value =
|
|
361
|
+
Ie.value = k;
|
|
362
362
|
});
|
|
363
363
|
}
|
|
364
364
|
return {
|
|
@@ -369,15 +369,15 @@ function Os(n, l) {
|
|
|
369
369
|
loading: u,
|
|
370
370
|
transferDialogProps: Se,
|
|
371
371
|
promptCreateTransferDialog: A,
|
|
372
|
-
promptUpdateTransferDialog:
|
|
372
|
+
promptUpdateTransferDialog: F,
|
|
373
373
|
transferDetailsProps: te,
|
|
374
374
|
promptShowTransferDetails: ie,
|
|
375
375
|
submitAction: be,
|
|
376
376
|
xilnexImportDialogProps: Ie,
|
|
377
|
-
promptUploadTransferDialog:
|
|
377
|
+
promptUploadTransferDialog: Pe
|
|
378
378
|
};
|
|
379
379
|
}
|
|
380
|
-
function
|
|
380
|
+
function Tt(n, l) {
|
|
381
381
|
return l.reduce(
|
|
382
382
|
(b, m) => {
|
|
383
383
|
const s = m.received.find((f) => f.sku._id === n._id);
|
|
@@ -407,8 +407,8 @@ function $t(n, l, o, b) {
|
|
|
407
407
|
state: n.supplier.address.state,
|
|
408
408
|
country: n.supplier.address.country
|
|
409
409
|
}, h = n.items.map((D) => {
|
|
410
|
-
const { sku: w, measurement: A } = D,
|
|
411
|
-
|
|
410
|
+
const { sku: w, measurement: A } = D, F = le(
|
|
411
|
+
Tt(D.sku, n.deliveryOrder || []),
|
|
412
412
|
!1
|
|
413
413
|
);
|
|
414
414
|
return {
|
|
@@ -416,7 +416,7 @@ function $t(n, l, o, b) {
|
|
|
416
416
|
description: w.name,
|
|
417
417
|
quantity: nt(D.quantity, w.unit, D.measurement),
|
|
418
418
|
unit: (A == null ? void 0 : A.abbrev) || w.unit.abbrev,
|
|
419
|
-
received:
|
|
419
|
+
received: F
|
|
420
420
|
};
|
|
421
421
|
}), i = n.deliveryOrder.map((D) => ({
|
|
422
422
|
createdAt: st(new Date(D.createdAt)),
|
|
@@ -450,47 +450,47 @@ const ve = {
|
|
|
450
450
|
submitRequest: {
|
|
451
451
|
translationKey: "inventory.transfer.receiveRequest.actions.submitRequest",
|
|
452
452
|
color: "text-fm-color-typo-primary",
|
|
453
|
-
value:
|
|
453
|
+
value: O.enum.submitRequest
|
|
454
454
|
},
|
|
455
455
|
confirmDraft: {
|
|
456
456
|
translationKey: "inventory.transfer.receiveRequest.actions.confirmDraft",
|
|
457
457
|
color: "text-fm-color-typo-primary",
|
|
458
|
-
value:
|
|
458
|
+
value: O.enum.confirmDraft
|
|
459
459
|
},
|
|
460
460
|
cancelDraft: {
|
|
461
461
|
translationKey: "inventory.transfer.receiveRequest.actions.cancelDraft",
|
|
462
462
|
color: "text-fm-color-typo-error",
|
|
463
|
-
value:
|
|
463
|
+
value: O.enum.cancelDraft
|
|
464
464
|
},
|
|
465
465
|
approveRequest: {
|
|
466
466
|
translationKey: "inventory.transfer.receiveRequest.actions.approveRequest",
|
|
467
467
|
color: "text-fm-color-typo-primary",
|
|
468
|
-
value:
|
|
468
|
+
value: O.enum.approveRequest
|
|
469
469
|
},
|
|
470
470
|
rejectRequest: {
|
|
471
471
|
translationKey: "inventory.transfer.receiveRequest.actions.rejectRequest",
|
|
472
472
|
color: "text-fm-color-typo-error",
|
|
473
|
-
value:
|
|
473
|
+
value: O.enum.rejectRequest
|
|
474
474
|
},
|
|
475
475
|
processRequest: {
|
|
476
476
|
translationKey: "inventory.transfer.receiveRequest.actions.processRequest",
|
|
477
477
|
color: "text-fm-color-typo-primary",
|
|
478
|
-
value:
|
|
478
|
+
value: O.enum.processRequest
|
|
479
479
|
},
|
|
480
480
|
receiveStock: {
|
|
481
481
|
translationKey: "inventory.transfer.receiveRequest.actions.receiveStock",
|
|
482
482
|
color: "text-fm-color-typo-primary",
|
|
483
|
-
value:
|
|
483
|
+
value: O.enum.receiveStock
|
|
484
484
|
},
|
|
485
485
|
completeReceive: {
|
|
486
486
|
translationKey: "inventory.transfer.receiveRequest.actions.completeReceive",
|
|
487
487
|
color: "text-fm-color-typo-primary",
|
|
488
|
-
value:
|
|
488
|
+
value: O.enum.completeReceive
|
|
489
489
|
},
|
|
490
490
|
closeRequest: {
|
|
491
491
|
translationKey: "inventory.transfer.receiveRequest.actions.closeRequest",
|
|
492
492
|
color: "system-error-300",
|
|
493
|
-
value:
|
|
493
|
+
value: O.enum.closeRequest
|
|
494
494
|
},
|
|
495
495
|
approveDraft: {
|
|
496
496
|
label: void 0,
|
|
@@ -514,19 +514,19 @@ function ks(n, l) {
|
|
|
514
514
|
return [
|
|
515
515
|
Z[z.Update],
|
|
516
516
|
Z[z.Details],
|
|
517
|
-
i.supplier.internal === "restaurant" || i.supplier.internal === "warehouse" ? ve[
|
|
518
|
-
ve[
|
|
517
|
+
i.supplier.internal === "restaurant" || i.supplier.internal === "warehouse" ? ve[O.enum.submitRequest] : ve[O.enum.confirmDraft],
|
|
518
|
+
ve[O.enum.cancelDraft]
|
|
519
519
|
];
|
|
520
520
|
case "RECEIVING":
|
|
521
521
|
return [
|
|
522
|
-
ve[
|
|
522
|
+
ve[O.enum.completeReceive],
|
|
523
523
|
Z[z.Details],
|
|
524
524
|
Z[z.Print]
|
|
525
525
|
];
|
|
526
526
|
case "REQUESTING":
|
|
527
527
|
return n === "receive/request" ? [Z[z.Details], Z[z.Print]] : [
|
|
528
|
-
ve[
|
|
529
|
-
ve[
|
|
528
|
+
ve[O.enum.approveRequest],
|
|
529
|
+
ve[O.enum.rejectRequest],
|
|
530
530
|
Z[z.Details]
|
|
531
531
|
// DefaultRowActions[RowActionEnum.Print]
|
|
532
532
|
];
|
|
@@ -539,10 +539,10 @@ function ks(n, l) {
|
|
|
539
539
|
}
|
|
540
540
|
}
|
|
541
541
|
function s(i) {
|
|
542
|
-
return Object.values(
|
|
542
|
+
return Object.values(O.enum).includes(i);
|
|
543
543
|
}
|
|
544
544
|
async function f(i, p, t) {
|
|
545
|
-
var D, w, A,
|
|
545
|
+
var D, w, A, F;
|
|
546
546
|
const v = tt(p);
|
|
547
547
|
if (i === z.Print) {
|
|
548
548
|
const W = (t == null ? void 0 : t.toInventoryLocation) ?? {
|
|
@@ -568,7 +568,7 @@ function ks(n, l) {
|
|
|
568
568
|
return;
|
|
569
569
|
}
|
|
570
570
|
if (s(i)) {
|
|
571
|
-
l.submitAction(p, i, (
|
|
571
|
+
l.submitAction(p, i, (F = t == null ? void 0 : t.to) == null ? void 0 : F.dbName);
|
|
572
572
|
return;
|
|
573
573
|
}
|
|
574
574
|
}
|
|
@@ -771,8 +771,8 @@ const Ct = {
|
|
|
771
771
|
).fullName;
|
|
772
772
|
}
|
|
773
773
|
), f = G(() => {
|
|
774
|
-
var a, h, i, p, t, v, D, w, A,
|
|
775
|
-
return (i = (h = (a = l.purchaseOrder) == null ? void 0 : a.netSuite) == null ? void 0 : h.additionalInfo) != null && i.transactionnumber ? (v = (t = (p = l.purchaseOrder) == null ? void 0 : p.netSuite) == null ? void 0 : t.additionalInfo) == null ? void 0 : v.transactionnumber : (A = (w = (D = m.value) == null ? void 0 : D.netSuite) == null ? void 0 : w.additionalInfo) != null && A.transactionnumber ? (J = (W = (
|
|
774
|
+
var a, h, i, p, t, v, D, w, A, F, W, J;
|
|
775
|
+
return (i = (h = (a = l.purchaseOrder) == null ? void 0 : a.netSuite) == null ? void 0 : h.additionalInfo) != null && i.transactionnumber ? (v = (t = (p = l.purchaseOrder) == null ? void 0 : p.netSuite) == null ? void 0 : t.additionalInfo) == null ? void 0 : v.transactionnumber : (A = (w = (D = m.value) == null ? void 0 : D.netSuite) == null ? void 0 : w.additionalInfo) != null && A.transactionnumber ? (J = (W = (F = m.value) == null ? void 0 : F.netSuite) == null ? void 0 : W.additionalInfo) == null ? void 0 : J.transactionnumber : null;
|
|
776
776
|
}), u = G(() => {
|
|
777
777
|
var a, h, i, p, t, v;
|
|
778
778
|
return (h = (a = l.purchaseOrder) == null ? void 0 : a.deliveryFullfillment) != null && h.length && ((p = (i = l.purchaseOrder) == null ? void 0 : i.deliveryFullfillment) == null ? void 0 : p.length) > 0 ? (v = (t = l.purchaseOrder) == null ? void 0 : t.deliveryFullfillment) == null ? void 0 : v.map((D) => {
|
|
@@ -781,31 +781,31 @@ const Ct = {
|
|
|
781
781
|
}).join(", ") : "N/A";
|
|
782
782
|
});
|
|
783
783
|
return (a, h) => {
|
|
784
|
-
var i, p, t, v, D, w, A,
|
|
784
|
+
var i, p, t, v, D, w, A, F, W, J, ae, ne, te, oe;
|
|
785
785
|
return y(o).isEnabled ? (_(), q("div", Ct, [
|
|
786
786
|
r("div", It, [
|
|
787
787
|
h[0] || (h[0] = r("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, "NetSuite subsidiary", -1)),
|
|
788
|
-
r("div", Ft,
|
|
788
|
+
r("div", Ft, x(s.value || "N/A"), 1)
|
|
789
789
|
]),
|
|
790
790
|
!a.isTransferBetweenOutlets && ((i = a.purchaseOrder) == null ? void 0 : i.status) !== y(se).Enum.REQUESTING && a.scope === y(Ee).RECEIVE_REQUEST ? (_(), q("div", Et, [
|
|
791
|
-
r("div", Bt, " NetSuite " +
|
|
791
|
+
r("div", Bt, " NetSuite " + x(a.transferType === y(he).PURCHASE ? "Purchase Order" : "Transfer Order") + " (ID) ", 1),
|
|
792
792
|
r("div", Ut, [
|
|
793
|
-
(t = (p = a.purchaseOrder) == null ? void 0 : p.netSuite) != null && t.id ? (_(), q("span", Lt,
|
|
793
|
+
(t = (p = a.purchaseOrder) == null ? void 0 : p.netSuite) != null && t.id ? (_(), q("span", Lt, x((D = (v = a.purchaseOrder) == null ? void 0 : v.netSuite) == null ? void 0 : D.refNo) + " (" + x((A = (w = a.purchaseOrder) == null ? void 0 : w.netSuite) == null ? void 0 : A.id) + ") ", 1)) : (_(), q("span", Vt, "N/A"))
|
|
794
794
|
])
|
|
795
795
|
])) : V("", !0),
|
|
796
|
-
!a.isTransferBetweenOutlets && m.value && ((
|
|
797
|
-
r("div", Kt, " (Request) NetSuite " +
|
|
796
|
+
!a.isTransferBetweenOutlets && m.value && ((F = a.purchaseOrder) == null ? void 0 : F.status) === y(se).Enum.REQUESTING || a.scope === y(Ee).APPROVAL ? (_(), q("div", Mt, [
|
|
797
|
+
r("div", Kt, " (Request) NetSuite " + x(a.transferType === y(he).PURCHASE ? "Purchase Order" : "Transfer Order") + " (ID) ", 1),
|
|
798
798
|
r("div", jt, [
|
|
799
|
-
(J = (W = m.value) == null ? void 0 : W.netSuite) != null && J.id ? (_(), q("span", zt,
|
|
799
|
+
(J = (W = m.value) == null ? void 0 : W.netSuite) != null && J.id ? (_(), q("span", zt, x((ne = (ae = m.value) == null ? void 0 : ae.netSuite) == null ? void 0 : ne.refNo) + " (" + x((oe = (te = m.value) == null ? void 0 : te.netSuite) == null ? void 0 : oe.id) + ") ", 1)) : (_(), q("span", Gt, "N/A"))
|
|
800
800
|
])
|
|
801
801
|
])) : V("", !0),
|
|
802
802
|
f.value ? (_(), q("div", Ht, [
|
|
803
803
|
h[1] || (h[1] = r("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " NetSuite Transaction Number ", -1)),
|
|
804
|
-
r("div", Qt,
|
|
804
|
+
r("div", Qt, x(f.value), 1)
|
|
805
805
|
])) : V("", !0),
|
|
806
806
|
y(o).isEnabled && a.transferType === y(he).TRANSFER && !a.isTransferBetweenOutlets ? (_(), q("div", Yt, [
|
|
807
807
|
h[2] || (h[2] = r("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " NetSuite fulfillment IDs ", -1)),
|
|
808
|
-
r("div", Wt,
|
|
808
|
+
r("div", Wt, x(u.value), 1)
|
|
809
809
|
])) : V("", !0)
|
|
810
810
|
])) : V("", !0);
|
|
811
811
|
};
|
|
@@ -870,7 +870,7 @@ const Ct = {
|
|
|
870
870
|
return (u, a) => {
|
|
871
871
|
const h = Q("FmButton");
|
|
872
872
|
return _(), q("div", Xt, [
|
|
873
|
-
|
|
873
|
+
B(h, {
|
|
874
874
|
"prepend-icon": "sync",
|
|
875
875
|
variant: "secondary",
|
|
876
876
|
label: "Sync",
|
|
@@ -916,7 +916,7 @@ const Ct = {
|
|
|
916
916
|
u[2] || (u[2] = r("div", { class: "fm-typo-en-title-sm-600" }, "Confirm the transfer amount", -1)),
|
|
917
917
|
r("div", er, [
|
|
918
918
|
r("div", tr, [
|
|
919
|
-
|
|
919
|
+
B(a, {
|
|
920
920
|
"column-defs": [
|
|
921
921
|
{
|
|
922
922
|
header: "Code",
|
|
@@ -981,7 +981,7 @@ const Ct = {
|
|
|
981
981
|
unit: t.sku.unit,
|
|
982
982
|
"onUpdate:modelValue": (w) => {
|
|
983
983
|
if (!w) return;
|
|
984
|
-
const A = b.items.find((
|
|
984
|
+
const A = b.items.find((F) => F.id === t.id || F.sku._id === t.sku._id);
|
|
985
985
|
A && (A.amount = w.amount);
|
|
986
986
|
},
|
|
987
987
|
disableUnit: !0,
|
|
@@ -1002,14 +1002,14 @@ const Ct = {
|
|
|
1002
1002
|
])
|
|
1003
1003
|
]),
|
|
1004
1004
|
r("div", rr, [
|
|
1005
|
-
|
|
1005
|
+
B(h, {
|
|
1006
1006
|
class: "px-16",
|
|
1007
1007
|
label: "Confirm",
|
|
1008
1008
|
size: "md",
|
|
1009
1009
|
variant: "primary",
|
|
1010
1010
|
type: "submit"
|
|
1011
1011
|
}),
|
|
1012
|
-
|
|
1012
|
+
B(h, {
|
|
1013
1013
|
class: "px-16",
|
|
1014
1014
|
label: "Cancel",
|
|
1015
1015
|
size: "md",
|
|
@@ -1107,10 +1107,10 @@ const nr = { class: "flex flex-col gap-16 w-full h-full" }, or = { class: "flex
|
|
|
1107
1107
|
}, kr = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Dr = { class: "fm-typo-en-body-lg-600" }, qr = {
|
|
1108
1108
|
key: 4,
|
|
1109
1109
|
class: "flex flex-col gap-4"
|
|
1110
|
-
}, Nr = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ar = { class: "fm-typo-en-body-lg-600" },
|
|
1110
|
+
}, Nr = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ar = { class: "fm-typo-en-body-lg-600" }, Pr = {
|
|
1111
1111
|
key: 0,
|
|
1112
1112
|
class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg p-16 flex flex-col gap-8"
|
|
1113
|
-
},
|
|
1113
|
+
}, Tr = { class: "flex gap-8 items-center" }, $r = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg p-16" }, Cr = { class: "flex flex-col gap-8" }, Ir = { class: "flex gap-8 items-center" }, Fr = { class: "flex-1 fm-typo-en-body-lg-600" }, Er = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary flex flex-col gap-4" }, Br = { class: "flex w-full gap-4" }, Ur = { class: "basis-1/2 shrink-0 grow fm-typo-en-body-lg-400 line-clamp-2" }, Lr = { class: "fm-typo-en-body-lg-600 line-clamp-2" }, Vr = { class: "flex w-full gap-4 fm-typo-en-body-sm-400" }, Mr = { class: "grow fm-typo-en-body-lg-400 text-fm-color-typo-secondary line-clamp-1" }, Kr = {
|
|
1114
1114
|
key: 0,
|
|
1115
1115
|
class: "line-clamp-1 fm-typo-en-body-lg-400 text-fm-color-typo-secondary"
|
|
1116
1116
|
}, jr = { class: "py-8" }, zr = { class: "flex justify-end gap-4 items-center" }, Gr = { class: "fm-typo-en-body-lg-600" }, Hr = {
|
|
@@ -1158,13 +1158,13 @@ const nr = { class: "flex flex-col gap-16 w-full h-full" }, or = { class: "flex
|
|
|
1158
1158
|
}
|
|
1159
1159
|
), p = ar(), { t } = ot(), v = G(
|
|
1160
1160
|
() => {
|
|
1161
|
-
var e, c, g,
|
|
1162
|
-
return ((c = (e = o.purchaseOrder) == null ? void 0 : e.supplier) == null ? void 0 : c.internal) === "restaurant" || ((
|
|
1161
|
+
var e, c, g, S;
|
|
1162
|
+
return ((c = (e = o.purchaseOrder) == null ? void 0 : e.supplier) == null ? void 0 : c.internal) === "restaurant" || ((S = (g = o.purchaseOrder) == null ? void 0 : g.supplier) == null ? void 0 : S.internal) === "warehouse" ? he.TRANSFER : he.PURCHASE;
|
|
1163
1163
|
}
|
|
1164
1164
|
), D = G(() => {
|
|
1165
|
-
var e, c, g;
|
|
1166
|
-
return v.value === he.TRANSFER && ((e = o.transferToDbName) == null ? void 0 : e.startsWith("restaurant")) && ((g = (c = o.purchaseOrder) == null ? void 0 : c.supplier) == null ? void 0 : g.internal) === "restaurant";
|
|
1167
|
-
}), w = j(!1), A = j(""),
|
|
1165
|
+
var e, c, g, S, C;
|
|
1166
|
+
return v.value === he.TRANSFER && ((e = o.transferToDbName) == null ? void 0 : e.startsWith("restaurant")) && ((g = (c = o.purchaseOrder) == null ? void 0 : c.supplier) == null ? void 0 : g.internal) === "restaurant" || ((C = (S = o.purchaseOrder) == null ? void 0 : S.netSuite) == null ? void 0 : C.id);
|
|
1167
|
+
}), w = j(!1), A = j(""), F = j(!0), W = Ne(), J = Pt(W.getWorkflowConfig), ae = lt(), ne = G(() => {
|
|
1168
1168
|
if (!o.purchaseOrder)
|
|
1169
1169
|
return [];
|
|
1170
1170
|
const e = J.result.value;
|
|
@@ -1173,9 +1173,9 @@ const nr = { class: "flex flex-col gap-16 w-full h-full" }, or = { class: "flex
|
|
|
1173
1173
|
const c = {
|
|
1174
1174
|
user: i.value,
|
|
1175
1175
|
executedAt: a.locations.computeFirst(
|
|
1176
|
-
(
|
|
1177
|
-
var
|
|
1178
|
-
return
|
|
1176
|
+
(S) => {
|
|
1177
|
+
var C;
|
|
1178
|
+
return S.dbName === ((C = a._currentLocation) == null ? void 0 : C.dbName) ? S : null;
|
|
1179
1179
|
}
|
|
1180
1180
|
),
|
|
1181
1181
|
purchaseOrderRequest: o.poRequest,
|
|
@@ -1186,17 +1186,17 @@ const nr = { class: "flex flex-col gap-16 w-full h-full" }, or = { class: "flex
|
|
|
1186
1186
|
...c,
|
|
1187
1187
|
purchaseOrderConfig: Ce.getDefaultConfig()
|
|
1188
1188
|
}).actions.filter(
|
|
1189
|
-
(
|
|
1189
|
+
(S) => (
|
|
1190
1190
|
// TODO: create receiveStock & processRequest dialog
|
|
1191
1191
|
// to create their payload
|
|
1192
|
-
|
|
1192
|
+
S !== O.enum.receiveStock && S !== O.enum.processRequest && S !== O.enum.closeRequest
|
|
1193
1193
|
)
|
|
1194
1194
|
)) : g = Ce.getAvailableActions({
|
|
1195
1195
|
...c,
|
|
1196
1196
|
purchaseOrderConfig: e.data
|
|
1197
1197
|
}).actions.filter(
|
|
1198
|
-
(
|
|
1199
|
-
), o.scope === "approval" && (g = g.filter((
|
|
1198
|
+
(S) => S !== O.enum.receiveStock && S !== O.enum.processRequest && S !== O.enum.closeRequest
|
|
1199
|
+
), o.scope === "approval" && (g = g.filter((S) => S !== O.enum.completeReceive)), g;
|
|
1200
1200
|
}), te = kt(o, "show"), oe = G(() => [
|
|
1201
1201
|
{
|
|
1202
1202
|
label: t("inventory.transfer.receiveRequest.details.overview"),
|
|
@@ -1213,16 +1213,16 @@ const nr = { class: "flex flex-col gap-16 w-full h-full" }, or = { class: "flex
|
|
|
1213
1213
|
e && (ie.value = oe.value[0]);
|
|
1214
1214
|
}
|
|
1215
1215
|
);
|
|
1216
|
-
async function Ae(e, c, g,
|
|
1216
|
+
async function Ae(e, c, g, S, C) {
|
|
1217
1217
|
return new Promise((M, Y) => {
|
|
1218
1218
|
m.open({
|
|
1219
1219
|
closeButton: !1,
|
|
1220
|
-
title:
|
|
1221
|
-
message:
|
|
1222
|
-
primaryActions:
|
|
1220
|
+
title: S.title,
|
|
1221
|
+
message: S.message,
|
|
1222
|
+
primaryActions: S.primaryActions,
|
|
1223
1223
|
secondaryActions: { text: "No", close: !1 }
|
|
1224
1224
|
}).onPrimary(async () => {
|
|
1225
|
-
var d,
|
|
1225
|
+
var d, P, L, H;
|
|
1226
1226
|
try {
|
|
1227
1227
|
await ae({
|
|
1228
1228
|
operate: {
|
|
@@ -1232,7 +1232,7 @@ const nr = { class: "flex flex-col gap-16 w-full h-full" }, or = { class: "flex
|
|
|
1232
1232
|
},
|
|
1233
1233
|
operateV2: {
|
|
1234
1234
|
_id: ((d = o.purchaseOrder) == null ? void 0 : d._id) ?? "",
|
|
1235
|
-
_rev: ((
|
|
1235
|
+
_rev: ((P = o.purchaseOrder) == null ? void 0 : P._rev) ?? "",
|
|
1236
1236
|
action: g,
|
|
1237
1237
|
payload: {
|
|
1238
1238
|
fulfillment: c.fulfillment
|
|
@@ -1241,19 +1241,19 @@ const nr = { class: "flex flex-col gap-16 w-full h-full" }, or = { class: "flex
|
|
|
1241
1241
|
},
|
|
1242
1242
|
transferTo: (H = (L = o.poRequest) == null ? void 0 : L.to) == null ? void 0 : H.dbName
|
|
1243
1243
|
}).delayed(1e3), M("submitted");
|
|
1244
|
-
} catch (
|
|
1245
|
-
Y(
|
|
1244
|
+
} catch (I) {
|
|
1245
|
+
Y(I);
|
|
1246
1246
|
}
|
|
1247
1247
|
}).onSecondary(() => {
|
|
1248
1248
|
M("cancelled");
|
|
1249
|
-
for (let d = 0; d <
|
|
1249
|
+
for (let d = 0; d < C + 2; d++)
|
|
1250
1250
|
m.close();
|
|
1251
1251
|
}).onClose(() => {
|
|
1252
1252
|
});
|
|
1253
1253
|
});
|
|
1254
1254
|
}
|
|
1255
1255
|
async function be(e) {
|
|
1256
|
-
if (e ===
|
|
1256
|
+
if (e === O.enum.receiveStock)
|
|
1257
1257
|
return;
|
|
1258
1258
|
const c = ct[e];
|
|
1259
1259
|
if (!c) {
|
|
@@ -1266,13 +1266,13 @@ const nr = { class: "flex flex-col gap-16 w-full h-full" }, or = { class: "flex
|
|
|
1266
1266
|
}
|
|
1267
1267
|
const { successMessage: g } = c;
|
|
1268
1268
|
if (o.purchaseOrder) {
|
|
1269
|
-
A.value = `${e}`, w.value = !0,
|
|
1270
|
-
const
|
|
1271
|
-
let
|
|
1272
|
-
if ((e ===
|
|
1273
|
-
e ===
|
|
1274
|
-
|
|
1275
|
-
else if (e ===
|
|
1269
|
+
A.value = `${e}`, w.value = !0, F.value = !1;
|
|
1270
|
+
const S = {};
|
|
1271
|
+
let C = 0;
|
|
1272
|
+
if ((e === O.enum.confirmDraft || // auto receive for warehouse to warehouse
|
|
1273
|
+
e === O.enum.completeReceive) && f.autoReceiveWarehouse)
|
|
1274
|
+
S.autoReceive = !0;
|
|
1275
|
+
else if (e === O.enum.approveRequest && f.acceptRequireFulfillment) {
|
|
1276
1276
|
const M = await new Promise((Y, d) => {
|
|
1277
1277
|
m.open({
|
|
1278
1278
|
closeButton: !1,
|
|
@@ -1281,21 +1281,21 @@ const nr = { class: "flex flex-col gap-16 w-full h-full" }, or = { class: "flex
|
|
|
1281
1281
|
dialogComponentProps: {
|
|
1282
1282
|
purchaseOrder: o.purchaseOrder,
|
|
1283
1283
|
confirm: Y,
|
|
1284
|
-
"onUpdate:show": (
|
|
1285
|
-
|
|
1284
|
+
"onUpdate:show": (P) => {
|
|
1285
|
+
P || (A.value = "", w.value = !1, F.value = !0, C++, m.close()), d("cancelled");
|
|
1286
1286
|
}
|
|
1287
1287
|
}
|
|
1288
1288
|
});
|
|
1289
1289
|
});
|
|
1290
|
-
|
|
1290
|
+
S.fulfillment = M;
|
|
1291
1291
|
}
|
|
1292
1292
|
try {
|
|
1293
1293
|
await Ae(
|
|
1294
1294
|
o.purchaseOrder,
|
|
1295
|
-
|
|
1295
|
+
S,
|
|
1296
1296
|
e,
|
|
1297
1297
|
c,
|
|
1298
|
-
|
|
1298
|
+
C
|
|
1299
1299
|
) === "submitted" && (s.open({
|
|
1300
1300
|
title: "Success",
|
|
1301
1301
|
message: g,
|
|
@@ -1308,38 +1308,38 @@ const nr = { class: "flex flex-col gap-16 w-full h-full" }, or = { class: "flex
|
|
|
1308
1308
|
type: "error"
|
|
1309
1309
|
}), console.error("Error when submitting PO operation", e, o.purchaseOrder, M);
|
|
1310
1310
|
} finally {
|
|
1311
|
-
A.value = "", w.value = !1,
|
|
1311
|
+
A.value = "", w.value = !1, F.value = !0;
|
|
1312
1312
|
}
|
|
1313
1313
|
}
|
|
1314
1314
|
}
|
|
1315
|
-
const
|
|
1315
|
+
const Pe = G(() => {
|
|
1316
1316
|
var e, c;
|
|
1317
1317
|
return ((e = o.purchaseOrder) == null ? void 0 : e.status) === se.enum.RECEIVING || ((c = o.purchaseOrder) == null ? void 0 : c.status) === se.enum.COMPLETE;
|
|
1318
|
-
}),
|
|
1318
|
+
}), k = G(() => {
|
|
1319
1319
|
var M, Y, d;
|
|
1320
|
-
const g = (((M = o.purchaseOrder) == null ? void 0 : M.deliveryOrder) ?? []).flatMap((
|
|
1321
|
-
(
|
|
1322
|
-
const H =
|
|
1323
|
-
return
|
|
1320
|
+
const g = (((M = o.purchaseOrder) == null ? void 0 : M.deliveryOrder) ?? []).flatMap((P) => P.received ?? []).reduce(
|
|
1321
|
+
(P, L) => {
|
|
1322
|
+
const H = P[L.sku._id] ?? [];
|
|
1323
|
+
return P[L.sku._id] = [...H, L], P;
|
|
1324
1324
|
},
|
|
1325
1325
|
{}
|
|
1326
|
-
),
|
|
1327
|
-
(
|
|
1328
|
-
const
|
|
1326
|
+
), S = Object.entries(g).reduce(
|
|
1327
|
+
(P, [L, H]) => {
|
|
1328
|
+
const I = H.reduce((X, E) => {
|
|
1329
1329
|
const ce = yt(
|
|
1330
1330
|
X,
|
|
1331
|
-
Math.max(X.precision,
|
|
1331
|
+
Math.max(X.precision, E.amount.precision)
|
|
1332
1332
|
);
|
|
1333
|
-
return Fe(ce,
|
|
1333
|
+
return Fe(ce, E.amount);
|
|
1334
1334
|
}, ke(0));
|
|
1335
|
-
return
|
|
1335
|
+
return P[L] = I, P;
|
|
1336
1336
|
},
|
|
1337
1337
|
{}
|
|
1338
|
-
),
|
|
1339
|
-
for (const
|
|
1340
|
-
|
|
1341
|
-
return
|
|
1342
|
-
}),
|
|
1338
|
+
), C = ((Y = o.purchaseOrder) == null ? void 0 : Y.items) ?? [];
|
|
1339
|
+
for (const P of C)
|
|
1340
|
+
S[d = P.sku._id] ?? (S[d] = ke(0));
|
|
1341
|
+
return S;
|
|
1342
|
+
}), R = G(() => {
|
|
1343
1343
|
var M, Y;
|
|
1344
1344
|
const e = ((M = o.purchaseOrder) == null ? void 0 : M.deliveryOrder) ?? [], c = ((Y = o.purchaseOrder) == null ? void 0 : Y.deliveryFullfillment) ?? [], g = [
|
|
1345
1345
|
...e.map((d) => ({
|
|
@@ -1353,13 +1353,13 @@ const nr = { class: "flex flex-col gap-16 w-full h-full" }, or = { class: "flex
|
|
|
1353
1353
|
doc: d
|
|
1354
1354
|
}))
|
|
1355
1355
|
];
|
|
1356
|
-
g.reverse().sort((d,
|
|
1357
|
-
function
|
|
1358
|
-
var H,
|
|
1359
|
-
const
|
|
1360
|
-
(
|
|
1356
|
+
g.reverse().sort((d, P) => d.createdAt.localeCompare(P.createdAt));
|
|
1357
|
+
function S(d) {
|
|
1358
|
+
var H, I, X, E, ce, ge, _e, we, $;
|
|
1359
|
+
const P = c.findIndex((T) => T.id === d.fullfillmentId), L = [
|
|
1360
|
+
(I = (H = c[P]) == null ? void 0 : H.netSuite) != null && I.refNo ? {
|
|
1361
1361
|
label: "Fulfillment's ref no. (Netsuite)",
|
|
1362
|
-
values: [(
|
|
1362
|
+
values: [(E = (X = c[P]) == null ? void 0 : X.netSuite) == null ? void 0 : E.refNo]
|
|
1363
1363
|
} : null,
|
|
1364
1364
|
(ce = d == null ? void 0 : d.netSuite) != null && ce.refNo ? {
|
|
1365
1365
|
label: "Netsuite ref no.",
|
|
@@ -1372,12 +1372,12 @@ const nr = { class: "flex flex-col gap-16 w-full h-full" }, or = { class: "flex
|
|
|
1372
1372
|
];
|
|
1373
1373
|
return {
|
|
1374
1374
|
header: "Received",
|
|
1375
|
-
date:
|
|
1375
|
+
date: Te(new Date(d.createdAt)),
|
|
1376
1376
|
info: [
|
|
1377
1377
|
{
|
|
1378
1378
|
label: "Adjustment date",
|
|
1379
1379
|
values: [
|
|
1380
|
-
d.adjustment ?
|
|
1380
|
+
d.adjustment ? Te(new Date(ht(d.adjustment))) : "-"
|
|
1381
1381
|
]
|
|
1382
1382
|
},
|
|
1383
1383
|
{
|
|
@@ -1386,7 +1386,7 @@ const nr = { class: "flex flex-col gap-16 w-full h-full" }, or = { class: "flex
|
|
|
1386
1386
|
},
|
|
1387
1387
|
{
|
|
1388
1388
|
label: "Received items",
|
|
1389
|
-
values: d.received.map((
|
|
1389
|
+
values: d.received.map((T) => {
|
|
1390
1390
|
var K;
|
|
1391
1391
|
return N("div", [
|
|
1392
1392
|
N(
|
|
@@ -1406,14 +1406,14 @@ const nr = { class: "flex flex-col gap-16 w-full h-full" }, or = { class: "flex
|
|
|
1406
1406
|
{
|
|
1407
1407
|
class: "fm-typo-en-body-lg-800 basis-1/2 shrink-0 grow"
|
|
1408
1408
|
},
|
|
1409
|
-
`${
|
|
1409
|
+
`${T.sku.name}`
|
|
1410
1410
|
),
|
|
1411
1411
|
N(
|
|
1412
1412
|
"span",
|
|
1413
1413
|
{
|
|
1414
1414
|
class: "fm-typo-en-body-md-400"
|
|
1415
1415
|
},
|
|
1416
|
-
`${
|
|
1416
|
+
`${T.sku.code} `
|
|
1417
1417
|
)
|
|
1418
1418
|
]
|
|
1419
1419
|
),
|
|
@@ -1434,14 +1434,14 @@ const nr = { class: "flex flex-col gap-16 w-full h-full" }, or = { class: "flex
|
|
|
1434
1434
|
{
|
|
1435
1435
|
class: "fm-typo-en-body-lg-600 self-end"
|
|
1436
1436
|
},
|
|
1437
|
-
le(
|
|
1437
|
+
le(T.amount, !1)
|
|
1438
1438
|
),
|
|
1439
1439
|
N(
|
|
1440
1440
|
"span",
|
|
1441
1441
|
{
|
|
1442
1442
|
class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary"
|
|
1443
1443
|
},
|
|
1444
|
-
((K =
|
|
1444
|
+
((K = T.measurement) == null ? void 0 : K.abbrev) ?? T.sku.unit.abbrev
|
|
1445
1445
|
)
|
|
1446
1446
|
]
|
|
1447
1447
|
),
|
|
@@ -1450,7 +1450,7 @@ const nr = { class: "flex flex-col gap-16 w-full h-full" }, or = { class: "flex
|
|
|
1450
1450
|
{
|
|
1451
1451
|
class: "flex self-end fm-typo-en-body-md-400 text-fm-color-typo-secondary"
|
|
1452
1452
|
},
|
|
1453
|
-
`${
|
|
1453
|
+
`${T.cost ? `(${xe(T.cost)})` : ""}`
|
|
1454
1454
|
)
|
|
1455
1455
|
]
|
|
1456
1456
|
)
|
|
@@ -1467,28 +1467,28 @@ const nr = { class: "flex flex-col gap-16 w-full h-full" }, or = { class: "flex
|
|
|
1467
1467
|
label: "Remark",
|
|
1468
1468
|
values: [d.remark]
|
|
1469
1469
|
} : null,
|
|
1470
|
-
|
|
1470
|
+
P > -1 ? {
|
|
1471
1471
|
label: "Fulfilment's sequence",
|
|
1472
|
-
values: [`${
|
|
1472
|
+
values: [`${P + 1}`]
|
|
1473
1473
|
} : null,
|
|
1474
1474
|
...L
|
|
1475
|
-
].filter((
|
|
1475
|
+
].filter((T) => T)
|
|
1476
1476
|
};
|
|
1477
1477
|
}
|
|
1478
|
-
function
|
|
1478
|
+
function C(d) {
|
|
1479
1479
|
var L, H;
|
|
1480
|
-
const
|
|
1480
|
+
const P = c.findIndex((I) => I.id === d.id);
|
|
1481
1481
|
return {
|
|
1482
1482
|
header: "Fulfillment",
|
|
1483
|
-
date:
|
|
1483
|
+
date: Te(new Date(d.createdAt)),
|
|
1484
1484
|
info: [
|
|
1485
1485
|
{
|
|
1486
1486
|
label: "Sequence",
|
|
1487
|
-
values: [String(
|
|
1487
|
+
values: [String(P + 1)]
|
|
1488
1488
|
},
|
|
1489
1489
|
{
|
|
1490
1490
|
label: "Receiveable items",
|
|
1491
|
-
values: d.items.map((
|
|
1491
|
+
values: d.items.map((I) => {
|
|
1492
1492
|
var X;
|
|
1493
1493
|
return N("div", [
|
|
1494
1494
|
N(
|
|
@@ -1508,14 +1508,14 @@ const nr = { class: "flex flex-col gap-16 w-full h-full" }, or = { class: "flex
|
|
|
1508
1508
|
{
|
|
1509
1509
|
class: "fm-typo-en-body-lg-800 basis-1/2 shrink-0 grow"
|
|
1510
1510
|
},
|
|
1511
|
-
`${
|
|
1511
|
+
`${I.sku.name}`
|
|
1512
1512
|
),
|
|
1513
1513
|
N(
|
|
1514
1514
|
"span",
|
|
1515
1515
|
{
|
|
1516
1516
|
class: "fm-typo-en-body-md-400"
|
|
1517
1517
|
},
|
|
1518
|
-
`${
|
|
1518
|
+
`${I.sku.code} `
|
|
1519
1519
|
)
|
|
1520
1520
|
]
|
|
1521
1521
|
),
|
|
@@ -1536,14 +1536,14 @@ const nr = { class: "flex flex-col gap-16 w-full h-full" }, or = { class: "flex
|
|
|
1536
1536
|
{
|
|
1537
1537
|
class: "fm-typo-en-body-lg-600 self-end"
|
|
1538
1538
|
},
|
|
1539
|
-
le(
|
|
1539
|
+
le(I.amount, !1)
|
|
1540
1540
|
),
|
|
1541
1541
|
N(
|
|
1542
1542
|
"span",
|
|
1543
1543
|
{
|
|
1544
1544
|
class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary"
|
|
1545
1545
|
},
|
|
1546
|
-
((X =
|
|
1546
|
+
((X = I.measurement) == null ? void 0 : X.abbrev) ?? I.sku.unit.abbrev
|
|
1547
1547
|
)
|
|
1548
1548
|
]
|
|
1549
1549
|
),
|
|
@@ -1552,7 +1552,7 @@ const nr = { class: "flex flex-col gap-16 w-full h-full" }, or = { class: "flex
|
|
|
1552
1552
|
{
|
|
1553
1553
|
class: "flex self-end fm-typo-en-body-md-400 text-fm-color-typo-secondary"
|
|
1554
1554
|
},
|
|
1555
|
-
`${
|
|
1555
|
+
`${I.cost ? `(${xe(I.cost)})` : ""}`
|
|
1556
1556
|
)
|
|
1557
1557
|
]
|
|
1558
1558
|
)
|
|
@@ -1565,45 +1565,45 @@ const nr = { class: "flex flex-col gap-16 w-full h-full" }, or = { class: "flex
|
|
|
1565
1565
|
label: "Ref no. (Netsuite)",
|
|
1566
1566
|
values: [(H = d.netSuite) == null ? void 0 : H.refNo]
|
|
1567
1567
|
} : null
|
|
1568
|
-
].filter((
|
|
1568
|
+
].filter((I) => I)
|
|
1569
1569
|
};
|
|
1570
1570
|
}
|
|
1571
1571
|
return g.map((d) => {
|
|
1572
1572
|
switch (d.type) {
|
|
1573
1573
|
case "grn":
|
|
1574
|
-
return
|
|
1574
|
+
return S(d.doc);
|
|
1575
1575
|
case "fulfillment":
|
|
1576
|
-
return
|
|
1576
|
+
return C(d.doc);
|
|
1577
1577
|
}
|
|
1578
1578
|
});
|
|
1579
|
-
}),
|
|
1579
|
+
}), U = G(() => {
|
|
1580
1580
|
var c;
|
|
1581
1581
|
const e = {
|
|
1582
1582
|
...ke(0),
|
|
1583
1583
|
currency: Je()
|
|
1584
1584
|
};
|
|
1585
|
-
return ((c = o.purchaseOrder) == null ? void 0 : c.items.reduce((g,
|
|
1586
|
-
...Fe(g,
|
|
1585
|
+
return ((c = o.purchaseOrder) == null ? void 0 : c.items.reduce((g, S) => ({
|
|
1586
|
+
...Fe(g, S.totalCost ?? e),
|
|
1587
1587
|
currency: Je()
|
|
1588
1588
|
}), e)) ?? e;
|
|
1589
1589
|
});
|
|
1590
1590
|
return (e, c) => {
|
|
1591
|
-
var
|
|
1592
|
-
const g = Q("FmButtonGroup"),
|
|
1591
|
+
var I, X;
|
|
1592
|
+
const g = Q("FmButtonGroup"), S = Q("FmChip"), C = Q("FmMenuDivider"), M = Q("FmCard"), Y = Q("FmIcon"), d = Q("FmTooltip"), P = Q("FmSpacer"), L = Q("FmButton"), H = Q("FmSideSheet");
|
|
1593
1593
|
return _(), ue(H, {
|
|
1594
|
-
header: y(t)("inventory.transfer.receiveRequest.details.title") + ((
|
|
1594
|
+
header: y(t)("inventory.transfer.receiveRequest.details.title") + ((I = e.purchaseOrder) != null && I.seqNumber ? ` #${(X = e.purchaseOrder) == null ? void 0 : X.seqNumber}` : ""),
|
|
1595
1595
|
modelValue: y(te),
|
|
1596
|
-
"onUpdate:modelValue": c[4] || (c[4] = (
|
|
1597
|
-
"dismiss-away":
|
|
1596
|
+
"onUpdate:modelValue": c[4] || (c[4] = (E) => _t(te) ? te.value = E : null),
|
|
1597
|
+
"dismiss-away": F.value,
|
|
1598
1598
|
"close-button": "",
|
|
1599
1599
|
"max-width": 600
|
|
1600
1600
|
}, {
|
|
1601
1601
|
default: de(() => {
|
|
1602
|
-
var
|
|
1602
|
+
var E, ce, ge, _e, we;
|
|
1603
1603
|
return [
|
|
1604
1604
|
r("div", nr, [
|
|
1605
1605
|
r("div", null, [
|
|
1606
|
-
|
|
1606
|
+
B(g, {
|
|
1607
1607
|
items: oe.value,
|
|
1608
1608
|
modelValue: ie.value,
|
|
1609
1609
|
"onUpdate:modelValue": c[0] || (c[0] = ($) => ie.value = $)
|
|
@@ -1611,56 +1611,56 @@ const nr = { class: "flex flex-col gap-16 w-full h-full" }, or = { class: "flex
|
|
|
1611
1611
|
]),
|
|
1612
1612
|
ie.value.value === "overview" ? (_(), q(re, { key: 0 }, [
|
|
1613
1613
|
r("div", null, [
|
|
1614
|
-
|
|
1614
|
+
B(M, {
|
|
1615
1615
|
variant: "outlined",
|
|
1616
1616
|
class: "flex flex-col gap-8 px-12 py-16"
|
|
1617
1617
|
}, {
|
|
1618
1618
|
default: de(() => {
|
|
1619
|
-
var $,
|
|
1619
|
+
var $, T, K, fe, pe, Re, Ke, je, ze, Ge, He, Qe;
|
|
1620
1620
|
return [
|
|
1621
1621
|
r("div", or, [
|
|
1622
|
-
r("div", cr,
|
|
1622
|
+
r("div", cr, x(y(t)("inventory.transfer.receiveRequest.details.requestSummary")), 1),
|
|
1623
1623
|
r("div", null, [
|
|
1624
|
-
|
|
1624
|
+
B(S, {
|
|
1625
1625
|
label: y(t)(`inventory.transfer.status.${($ = e.purchaseOrder) == null ? void 0 : $.status}`),
|
|
1626
|
-
class: Oe(`fm-status-badge fm-status-badge-${(K = (
|
|
1626
|
+
class: Oe(`fm-status-badge fm-status-badge-${(K = (T = e.purchaseOrder) == null ? void 0 : T.status) == null ? void 0 : K.toLocaleLowerCase("en-us")}`),
|
|
1627
1627
|
compact: ""
|
|
1628
1628
|
}, null, 8, ["label", "class"])
|
|
1629
1629
|
])
|
|
1630
1630
|
]),
|
|
1631
|
-
|
|
1631
|
+
B(C),
|
|
1632
1632
|
r("div", lr, [
|
|
1633
1633
|
r("div", ir, [
|
|
1634
1634
|
r("div", ur, [
|
|
1635
|
-
r("div", dr,
|
|
1635
|
+
r("div", dr, x(y(t)("inventory.transfer.receiveRequest.details.createdAt")), 1)
|
|
1636
1636
|
]),
|
|
1637
|
-
r("div", mr,
|
|
1637
|
+
r("div", mr, x(y(De)(((fe = e.purchaseOrder) == null ? void 0 : fe._id) ?? "")), 1)
|
|
1638
1638
|
]),
|
|
1639
1639
|
(pe = e.purchaseOrder) != null && pe.effectiveAt ? (_(), q("div", fr, [
|
|
1640
|
-
r("div", pr,
|
|
1641
|
-
r("div", yr,
|
|
1640
|
+
r("div", pr, x(y(t)("inventory.transfer.receiveRequest.details.backdatedTo")), 1),
|
|
1641
|
+
r("div", yr, x(y(st)(new Date((Re = e.purchaseOrder) == null ? void 0 : Re.effectiveAt))), 1)
|
|
1642
1642
|
])) : V("", !0),
|
|
1643
1643
|
r("div", vr, [
|
|
1644
|
-
r("div", hr,
|
|
1645
|
-
r("div", br,
|
|
1644
|
+
r("div", hr, x(y(t)("inventory.transfer.receiveRequest.details.type.title")), 1),
|
|
1645
|
+
r("div", br, x(y(t)(
|
|
1646
1646
|
`inventory.transfer.receiveRequest.details.type.${v.value.toLocaleLowerCase("en-US")}`
|
|
1647
1647
|
)), 1)
|
|
1648
1648
|
]),
|
|
1649
1649
|
(je = (Ke = e.purchaseOrder) == null ? void 0 : Ke.supplier) != null && je.name ? (_(), q("div", gr, [
|
|
1650
|
-
r("div", _r,
|
|
1651
|
-
r("div", wr,
|
|
1650
|
+
r("div", _r, x(y(t)("inventory.transfer.receiveRequest.details.from")), 1),
|
|
1651
|
+
r("div", wr, x((Ge = (ze = e.purchaseOrder) == null ? void 0 : ze.supplier) == null ? void 0 : Ge.name), 1)
|
|
1652
1652
|
])) : V("", !0),
|
|
1653
1653
|
e.transferTo ? (_(), q("div", Sr, [
|
|
1654
|
-
r("div", Rr,
|
|
1655
|
-
r("div", xr,
|
|
1654
|
+
r("div", Rr, x(y(t)("inventory.transfer.receiveRequest.details.to")), 1),
|
|
1655
|
+
r("div", xr, x(e.transferTo), 1)
|
|
1656
1656
|
])) : V("", !0),
|
|
1657
1657
|
(He = e.purchaseOrder) != null && He.ref ? (_(), q("div", Or, [
|
|
1658
|
-
r("div", kr,
|
|
1659
|
-
r("div", Dr,
|
|
1658
|
+
r("div", kr, x(y(t)("inventory.transfer.receiveRequest.details.reference")), 1),
|
|
1659
|
+
r("div", Dr, x(e.purchaseOrder.ref), 1)
|
|
1660
1660
|
])) : V("", !0),
|
|
1661
1661
|
(Qe = e.purchaseOrder) != null && Qe.remark ? (_(), q("div", qr, [
|
|
1662
|
-
r("div", Nr,
|
|
1663
|
-
r("div", Ar,
|
|
1662
|
+
r("div", Nr, x(y(t)("inventory.transfer.receiveRequest.details.remark")), 1),
|
|
1663
|
+
r("div", Ar, x(e.purchaseOrder.remark), 1)
|
|
1664
1664
|
])) : V("", !0)
|
|
1665
1665
|
])
|
|
1666
1666
|
];
|
|
@@ -1668,25 +1668,25 @@ const nr = { class: "flex flex-col gap-16 w-full h-full" }, or = { class: "flex
|
|
|
1668
1668
|
_: 1
|
|
1669
1669
|
})
|
|
1670
1670
|
]),
|
|
1671
|
-
y(u).isNetSuiteEnabled &&
|
|
1672
|
-
r("div",
|
|
1671
|
+
y(u).isNetSuiteEnabled && D.value ? (_(), q("div", Pr, [
|
|
1672
|
+
r("div", Tr, [
|
|
1673
1673
|
c[5] || (c[5] = r("span", { class: "flex-1 fm-typo-en-body-lg-600" }, "NetSuite Info", -1)),
|
|
1674
1674
|
r("div", null, [
|
|
1675
|
-
|
|
1675
|
+
B(Zt, {
|
|
1676
1676
|
"po-request": e.poRequest,
|
|
1677
1677
|
"purchase-order": e.purchaseOrder,
|
|
1678
|
-
"is-transfer-between-outlets": D.value,
|
|
1678
|
+
"is-transfer-between-outlets": !D.value,
|
|
1679
1679
|
scope: e.scope
|
|
1680
1680
|
}, null, 8, ["po-request", "purchase-order", "is-transfer-between-outlets", "scope"])
|
|
1681
1681
|
])
|
|
1682
1682
|
]),
|
|
1683
|
-
|
|
1684
|
-
|
|
1683
|
+
B(C),
|
|
1684
|
+
B(Jt, {
|
|
1685
1685
|
"po-request": e.poRequest,
|
|
1686
1686
|
"purchase-order": e.purchaseOrder,
|
|
1687
1687
|
"transfer-type": v.value,
|
|
1688
1688
|
"transfer-to-db-name": e.transferToDbName,
|
|
1689
|
-
"is-transfer-between-outlets": D.value,
|
|
1689
|
+
"is-transfer-between-outlets": !D.value,
|
|
1690
1690
|
scope: e.scope
|
|
1691
1691
|
}, null, 8, ["po-request", "purchase-order", "transfer-type", "transfer-to-db-name", "is-transfer-between-outlets", "scope"])
|
|
1692
1692
|
])) : V("", !0),
|
|
@@ -1694,32 +1694,32 @@ const nr = { class: "flex flex-col gap-16 w-full h-full" }, or = { class: "flex
|
|
|
1694
1694
|
r("div", Cr, [
|
|
1695
1695
|
r("div", Ir, [
|
|
1696
1696
|
r("span", Fr, [
|
|
1697
|
-
$e(
|
|
1698
|
-
(ce = (
|
|
1697
|
+
$e(x(Pe.value ? y(t)("inventory.transfer.receiveRequest.details.receivedItems") : y(t)("inventory.transfer.receiveRequest.details.requestedItems")) + " ", 1),
|
|
1698
|
+
(ce = (E = e.purchaseOrder) == null ? void 0 : E.netSuite) != null && ce.missingItems && ((_e = (ge = e.purchaseOrder) == null ? void 0 : ge.netSuite) == null ? void 0 : _e.missingItems.length) > 0 ? (_(), ue(d, {
|
|
1699
1699
|
key: 0,
|
|
1700
1700
|
variant: "rich",
|
|
1701
1701
|
placement: "top",
|
|
1702
1702
|
"z-index": 51
|
|
1703
1703
|
}, {
|
|
1704
1704
|
content: de(() => {
|
|
1705
|
-
var $,
|
|
1705
|
+
var $, T;
|
|
1706
1706
|
return [
|
|
1707
1707
|
r("div", Er, [
|
|
1708
|
-
(_(!0), q(re, null, ye((
|
|
1708
|
+
(_(!0), q(re, null, ye((T = ($ = e.purchaseOrder) == null ? void 0 : $.netSuite) == null ? void 0 : T.missingItems, (K, fe) => (_(), q("div", {
|
|
1709
1709
|
class: "flex justify-center align-middle",
|
|
1710
1710
|
key: fe
|
|
1711
1711
|
}, [
|
|
1712
|
-
|
|
1712
|
+
B(Y, {
|
|
1713
1713
|
name: "arrow_right",
|
|
1714
1714
|
size: "sm"
|
|
1715
1715
|
}),
|
|
1716
|
-
$e(" " +
|
|
1716
|
+
$e(" " + x(`(${K.netSuiteId}) ${K.name}: ${K.reason}`), 1)
|
|
1717
1717
|
]))), 128))
|
|
1718
1718
|
])
|
|
1719
1719
|
];
|
|
1720
1720
|
}),
|
|
1721
1721
|
default: de(() => [
|
|
1722
|
-
|
|
1722
|
+
B(Y, {
|
|
1723
1723
|
name: "error",
|
|
1724
1724
|
color: "#ff2c2c",
|
|
1725
1725
|
size: "sm"
|
|
@@ -1729,45 +1729,45 @@ const nr = { class: "flex flex-col gap-16 w-full h-full" }, or = { class: "flex
|
|
|
1729
1729
|
})) : V("", !0)
|
|
1730
1730
|
])
|
|
1731
1731
|
]),
|
|
1732
|
-
|
|
1732
|
+
B(C),
|
|
1733
1733
|
(_(!0), q(re, null, ye(((we = e.purchaseOrder) == null ? void 0 : we.items) ?? [], ($) => {
|
|
1734
|
-
var
|
|
1734
|
+
var T;
|
|
1735
1735
|
return _(), q("div", {
|
|
1736
1736
|
key: $.code,
|
|
1737
1737
|
class: "flex flex-col"
|
|
1738
1738
|
}, [
|
|
1739
1739
|
r("div", Br, [
|
|
1740
|
-
r("div", Ur,
|
|
1741
|
-
r("div", Lr,
|
|
1740
|
+
r("div", Ur, x($.name), 1),
|
|
1741
|
+
r("div", Lr, x(y(le)(k.value[$.sku._id], !1)) + "/" + x(y(nt)($.quantity, $.sku.unit, $.measurement)), 1)
|
|
1742
1742
|
]),
|
|
1743
1743
|
r("div", Vr, [
|
|
1744
|
-
r("div", Mr,
|
|
1745
|
-
(
|
|
1744
|
+
r("div", Mr, x($.code), 1),
|
|
1745
|
+
(T = $.totalCost) != null && T.amount && y(f).enableTotalCost ? (_(), q("div", Kr, " (" + x(y(xe)($.totalCost)) + ") ", 1)) : V("", !0)
|
|
1746
1746
|
])
|
|
1747
1747
|
]);
|
|
1748
1748
|
}), 128)),
|
|
1749
|
-
+y(le)(
|
|
1749
|
+
+y(le)(U.value) ? (_(), q(re, { key: 0 }, [
|
|
1750
1750
|
r("div", jr, [
|
|
1751
|
-
|
|
1751
|
+
B(C)
|
|
1752
1752
|
]),
|
|
1753
1753
|
r("div", zr, [
|
|
1754
1754
|
c[6] || (c[6] = r("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, "Total:", -1)),
|
|
1755
|
-
r("div", Gr,
|
|
1755
|
+
r("div", Gr, x(y(xe)(U.value)), 1)
|
|
1756
1756
|
])
|
|
1757
1757
|
], 64)) : V("", !0)
|
|
1758
1758
|
])
|
|
1759
1759
|
])
|
|
1760
1760
|
], 64)) : ie.value.value === "deliveryHistory" ? (_(), q("div", Hr, [
|
|
1761
|
-
|
|
1762
|
-
(_(!0), q(re, null, ye(
|
|
1761
|
+
R.value.length ? (_(), q("div", Xr, [
|
|
1762
|
+
(_(!0), q(re, null, ye(R.value, ($, T) => (_(), q(re, { key: T }, [
|
|
1763
1763
|
r("div", Zr, [
|
|
1764
1764
|
r("div", es, [
|
|
1765
1765
|
r("div", ts, [
|
|
1766
1766
|
r("div", {
|
|
1767
1767
|
class: Oe([
|
|
1768
1768
|
{
|
|
1769
|
-
"bg-fm-color-primary":
|
|
1770
|
-
"bg-white":
|
|
1769
|
+
"bg-fm-color-primary": T !== 0,
|
|
1770
|
+
"bg-white": T === 0
|
|
1771
1771
|
},
|
|
1772
1772
|
"w-[2px] h-full"
|
|
1773
1773
|
])
|
|
@@ -1778,8 +1778,8 @@ const nr = { class: "flex flex-col gap-16 w-full h-full" }, or = { class: "flex
|
|
|
1778
1778
|
r("div", {
|
|
1779
1779
|
class: Oe([
|
|
1780
1780
|
{
|
|
1781
|
-
"bg-fm-color-primary":
|
|
1782
|
-
"bg-white":
|
|
1781
|
+
"bg-fm-color-primary": T < R.value.length - 1,
|
|
1782
|
+
"bg-white": T >= R.value.length - 1
|
|
1783
1783
|
},
|
|
1784
1784
|
"w-[2px] h-full"
|
|
1785
1785
|
])
|
|
@@ -1787,8 +1787,8 @@ const nr = { class: "flex flex-col gap-16 w-full h-full" }, or = { class: "flex
|
|
|
1787
1787
|
])
|
|
1788
1788
|
]),
|
|
1789
1789
|
r("div", ss, [
|
|
1790
|
-
r("div", as,
|
|
1791
|
-
r("div", ns,
|
|
1790
|
+
r("div", as, x($.header), 1),
|
|
1791
|
+
r("div", ns, x($.date), 1)
|
|
1792
1792
|
])
|
|
1793
1793
|
]),
|
|
1794
1794
|
r("div", os, [
|
|
@@ -1797,8 +1797,8 @@ const nr = { class: "flex flex-col gap-16 w-full h-full" }, or = { class: "flex
|
|
|
1797
1797
|
r("div", {
|
|
1798
1798
|
class: Oe([
|
|
1799
1799
|
{
|
|
1800
|
-
"bg-fm-color-primary":
|
|
1801
|
-
"bg-white":
|
|
1800
|
+
"bg-fm-color-primary": T < R.value.length - 1,
|
|
1801
|
+
"bg-white": T >= R.value.length - 1
|
|
1802
1802
|
},
|
|
1803
1803
|
"w-[2px] h-full"
|
|
1804
1804
|
])
|
|
@@ -1806,7 +1806,7 @@ const nr = { class: "flex flex-col gap-16 w-full h-full" }, or = { class: "flex
|
|
|
1806
1806
|
])
|
|
1807
1807
|
]),
|
|
1808
1808
|
r("div", is, [
|
|
1809
|
-
|
|
1809
|
+
B(M, {
|
|
1810
1810
|
variant: "outlined",
|
|
1811
1811
|
class: "py-12 px-16"
|
|
1812
1812
|
}, {
|
|
@@ -1816,14 +1816,14 @@ const nr = { class: "flex flex-col gap-16 w-full h-full" }, or = { class: "flex
|
|
|
1816
1816
|
key: fe,
|
|
1817
1817
|
class: "flex flex-col gap-4"
|
|
1818
1818
|
}, [
|
|
1819
|
-
r("div", ds,
|
|
1819
|
+
r("div", ds, x(K == null ? void 0 : K.label), 1),
|
|
1820
1820
|
r("div", ms, [
|
|
1821
1821
|
(_(!0), q(re, null, ye(K == null ? void 0 : K.values, (pe, Re) => (_(), q("div", {
|
|
1822
1822
|
key: Re,
|
|
1823
1823
|
class: "fm-typo-en-body-lg-600"
|
|
1824
1824
|
}, [
|
|
1825
1825
|
typeof pe == "string" ? (_(), q(re, { key: 0 }, [
|
|
1826
|
-
$e(
|
|
1826
|
+
$e(x(pe), 1)
|
|
1827
1827
|
], 64)) : (_(), ue(wt(pe), { key: 1 }))
|
|
1828
1828
|
]))), 128))
|
|
1829
1829
|
])
|
|
@@ -1836,17 +1836,17 @@ const nr = { class: "flex flex-col gap-16 w-full h-full" }, or = { class: "flex
|
|
|
1836
1836
|
])
|
|
1837
1837
|
], 64))), 128))
|
|
1838
1838
|
])) : (_(), q("div", Qr, [
|
|
1839
|
-
|
|
1839
|
+
B(P),
|
|
1840
1840
|
r("div", null, [
|
|
1841
1841
|
r("img", {
|
|
1842
1842
|
src: y(Ot),
|
|
1843
1843
|
alt: "List is empty"
|
|
1844
1844
|
}, null, 8, Yr)
|
|
1845
1845
|
]),
|
|
1846
|
-
r("div", Wr,
|
|
1847
|
-
r("div", Jr,
|
|
1848
|
-
|
|
1849
|
-
|
|
1846
|
+
r("div", Wr, x(y(t)("inventory.transfer.receiveRequest.details.noRecordsFound")), 1),
|
|
1847
|
+
r("div", Jr, x(y(t)("inventory.transfer.receiveRequest.details.trackDeliveryMessage")), 1),
|
|
1848
|
+
B(P),
|
|
1849
|
+
B(P)
|
|
1850
1850
|
]))
|
|
1851
1851
|
])) : V("", !0)
|
|
1852
1852
|
])
|
|
@@ -1854,32 +1854,32 @@ const nr = { class: "flex flex-col gap-16 w-full h-full" }, or = { class: "flex
|
|
|
1854
1854
|
}),
|
|
1855
1855
|
"side-sheet-footer": de(() => [
|
|
1856
1856
|
r("div", fs, [
|
|
1857
|
-
(_(!0), q(re, null, ye(ne.value, (
|
|
1858
|
-
key:
|
|
1859
|
-
label: y(t)(y(et)[
|
|
1860
|
-
onClick: (ce) => be(
|
|
1861
|
-
loading: A.value ===
|
|
1862
|
-
disabled: A.value !==
|
|
1863
|
-
variant: y(et)[
|
|
1857
|
+
(_(!0), q(re, null, ye(ne.value, (E) => (_(), ue(L, {
|
|
1858
|
+
key: E,
|
|
1859
|
+
label: y(t)(y(et)[E].translationKey),
|
|
1860
|
+
onClick: (ce) => be(E),
|
|
1861
|
+
loading: A.value === E,
|
|
1862
|
+
disabled: A.value !== E && w.value,
|
|
1863
|
+
variant: y(et)[E].buttonVariant
|
|
1864
1864
|
}, null, 8, ["label", "onClick", "loading", "disabled", "variant"]))), 128)),
|
|
1865
1865
|
y(p).ableToMarkReceived(e.purchaseOrder) && !ne.value.includes("completeReceive") ? (_(), ue(L, {
|
|
1866
1866
|
key: 0,
|
|
1867
1867
|
label: y(t)("inventory.transfer.receiveRequest.actions.completeReceive"),
|
|
1868
|
-
onClick: c[1] || (c[1] = (
|
|
1868
|
+
onClick: c[1] || (c[1] = (E) => be("completeReceive")),
|
|
1869
1869
|
loading: A.value === "completeReceive",
|
|
1870
1870
|
disabled: A.value !== "completeReceive" && w.value
|
|
1871
1871
|
}, null, 8, ["label", "loading", "disabled"])) : V("", !0),
|
|
1872
1872
|
y(p).ableToMarkApproved(e.purchaseOrder) && e.canApprove && !ne.value.includes("approveRequest") ? (_(), ue(L, {
|
|
1873
1873
|
key: 1,
|
|
1874
1874
|
label: y(t)("inventory.transfer.approval.actions.approveRequest"),
|
|
1875
|
-
onClick: c[2] || (c[2] = (
|
|
1875
|
+
onClick: c[2] || (c[2] = (E) => be("approveRequest")),
|
|
1876
1876
|
loading: A.value === "approveRequest",
|
|
1877
1877
|
disabled: A.value !== "approveRequest" && w.value
|
|
1878
1878
|
}, null, 8, ["label", "loading", "disabled"])) : V("", !0),
|
|
1879
|
-
|
|
1879
|
+
B(L, {
|
|
1880
1880
|
label: y(t)("common.close"),
|
|
1881
1881
|
variant: "tertiary",
|
|
1882
|
-
onClick: c[3] || (c[3] = (
|
|
1882
|
+
onClick: c[3] || (c[3] = (E) => b("update:show", !1))
|
|
1883
1883
|
}, null, 8, ["label"])
|
|
1884
1884
|
])
|
|
1885
1885
|
]),
|
|
@@ -1893,6 +1893,6 @@ export {
|
|
|
1893
1893
|
Ds as _,
|
|
1894
1894
|
Os as a,
|
|
1895
1895
|
ks as b,
|
|
1896
|
-
|
|
1896
|
+
Tt as g,
|
|
1897
1897
|
Ne as u
|
|
1898
1898
|
};
|