@feedmepos/mf-inventory-portal 0.0.22-dev.34 → 0.0.22-dev.37

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.
Files changed (70) hide show
  1. package/dist/{ApprovalView-2pX2IV1F.js → ApprovalView-Dco0PkEf.js} +8 -8
  2. package/dist/{BindingsDialog-EyImpE9g.js → BindingsDialog-DrCU_kIA.js} +9 -9
  3. package/dist/{BindingsPicker-CbBNBcWW.js → BindingsPicker-BMIIrlG6.js} +17 -17
  4. package/dist/{BindingsTable-CJeV7Dd2.js → BindingsTable-BHRmkL1P.js} +1 -1
  5. package/dist/{ClosingTemplateView-BDEooji1.js → ClosingTemplateView-kiej8Nah.js} +15 -15
  6. package/dist/FmDroppableField-Bl7A98it.js +152 -0
  7. package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-DZtc5R4Z.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-DQw4pBwH.js} +25 -25
  8. package/dist/{FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-z-BBBTkh.js → FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-DBh79EM_.js} +20 -20
  9. package/dist/IngredientBindedItem.vue_vue_type_script_setup_true_lang-3OkJNtvH.js +51 -0
  10. package/dist/IngredientsView-m44wAwSR.js +1611 -0
  11. package/dist/{IntegrationView-1lXCciJp.js → IntegrationView-B4gCx21K.js} +71 -71
  12. package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-Bgd922-L.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-D1frNXtV.js} +1 -1
  13. package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-Bexig132.js → PremiumBadge.vue_vue_type_script_setup_true_lang-Dbs29jm_.js} +16 -16
  14. package/dist/{PurchaseOrderPrintPreview-036mLqRD.js → PurchaseOrderPrintPreview-lKu0y_xw.js} +7 -7
  15. package/dist/ReceiveRequestView-DflWKxgq.js +4053 -0
  16. package/dist/{RecipeView-BuiA-2uY.js → RecipeView-DfsXdlPn.js} +30 -29
  17. package/dist/StockView-BSeSpxkV.js +7762 -0
  18. package/dist/{SupplierView-Ck5hH5gT.js → SupplierView-DPWh1si_.js} +11 -11
  19. package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-DFDc3P3S.js → TransferDetails.vue_vue_type_script_setup_true_lang-Dt1lRW3W.js} +260 -262
  20. package/dist/TransferTemplateView-DGOT4oZN.js +2054 -0
  21. package/dist/{UnitView-DB2hQFMC.js → UnitView-X9bCqAWe.js} +16 -16
  22. package/dist/{WarehouseView-CFJiuhpx.js → WarehouseView-BphA-Peq.js} +20 -20
  23. package/dist/api/bill.d.ts +84 -238
  24. package/dist/api/purchase-order-template.d.ts +4 -2
  25. package/dist/{app-Z9P39kGh.js → app-DZiCiBV7.js} +18175 -18188
  26. package/dist/app.js +2 -2
  27. package/dist/{decimal-DIe_fFDH.js → decimal-Bx1Y3uW1.js} +1 -1
  28. package/dist/defineDeepModel-4XZbatJF.js +13 -0
  29. package/dist/format-time-from-id-CFJvgP70.js +15 -0
  30. package/dist/helper/xlsx.util.d.ts +7 -0
  31. package/dist/purchase-order-transaction-type-Ds7YRAAp.js +348 -0
  32. package/dist/stores/inventory.d.ts +63 -0
  33. package/dist/stores/location.d.ts +89 -0
  34. package/dist/stores/netsuite.d.ts +1 -0
  35. package/dist/stores/supplier.d.ts +120 -3
  36. package/dist/stores/warehouse.d.ts +7 -4
  37. package/dist/supplier-BhJT8KOX.js +70 -0
  38. package/dist/tsconfig.app.tsbuildinfo +1 -1
  39. package/dist/{use-template-enabled-locations-2-CeSeHnX0.js → use-template-enabled-locations-2-BrEPVOpT.js} +1 -1
  40. package/dist/views/closing-template/composables/use-closing-template-actions.d.ts +2 -2
  41. package/dist/views/closing-template/composables/use-closing-template-table.d.ts +2 -2
  42. package/dist/views/ingredients/composables/use-ingredient-form.d.ts +2 -2
  43. package/dist/views/receive-request/components/transfer-form/NetSuiteField.vue.d.ts +44 -0
  44. package/dist/views/receive-request/components/transfer-form/TransferForm.vue.d.ts +42 -34
  45. package/dist/views/receive-request/composables/use-receive-request-form.d.ts +75 -51
  46. package/dist/views/receive-request/composables/use-receive-request-table.d.ts +75 -51
  47. package/dist/views/recipe/composables/use-recipe-form.d.ts +2 -2
  48. package/dist/views/stock/components/StockRecordCard.vue.d.ts +42 -119
  49. package/dist/views/stock/composables/use-stock-action.d.ts +2 -2
  50. package/dist/views/transfer-template/components/transfer-template-import/TransferTemplateImport.vue.d.ts +2 -0
  51. package/dist/views/transfer-template/components/transfer-template-import/TransferTemplateImportItem.vue.d.ts +12 -0
  52. package/dist/views/transfer-template/components/transfer-template-import/TransferTemplateImportItemProps.d.ts +9 -0
  53. package/dist/views/transfer-template/composables/use-transfer-template-actions.d.ts +10 -6
  54. package/dist/views/transfer-template/composables/use-transfer-template-table.d.ts +1850 -5
  55. package/dist/views/transfer-template/helpers/import-export.helper.d.ts +76 -0
  56. package/dist/views/transfer-template/helpers/remove-deleted-skus.helper.d.ts +1 -230
  57. package/dist/views/unit/composables/use-unit-form.d.ts +2 -2
  58. package/dist/views/warehouse/components/WarehouseForm.vue.d.ts +14 -8
  59. package/dist/{xlsx-DrDljHnF.js → xlsx-B9lpxKgq.js} +651 -651
  60. package/dist/xlsx.util-DP5wVnRT.js +78 -0
  61. package/package.json +1 -1
  62. package/dist/IngredientsView-BvKaI0nb.js +0 -1755
  63. package/dist/ReceiveRequestView-BGlxEJkh.js +0 -1626
  64. package/dist/StockView-BKX6NX-g.js +0 -1909
  65. package/dist/TransferTemplateView-ByYEje9E.js +0 -1237
  66. package/dist/defineDeepModel-DH8vhBpR.js +0 -13
  67. package/dist/format-time-from-id-CAjL4U2X.js +0 -15
  68. package/dist/purchase-order-transaction-type-BJDnbhdk.js +0 -338
  69. package/dist/supplier-wJJ7ATk2.js +0 -69
  70. package/dist/xlsx.util-BwF0vRjF.js +0 -109
package/dist/app.js CHANGED
@@ -1,6 +1,6 @@
1
- import { au as n, _ as r, av as e, as as o, at as t, u as i } from "./app-Z9P39kGh.js";
1
+ import { ay as s, _ as r, az as e, aw as o, ax as t, u as i } from "./app-DZiCiBV7.js";
2
2
  export {
3
- n as FmApp,
3
+ s as FmApp,
4
4
  r as InventoryBindingForm,
5
5
  e as InventoryBindingSummary,
6
6
  o as i18nMessages,
@@ -1,4 +1,4 @@
1
- import "./app-Z9P39kGh.js";
1
+ import "./app-DZiCiBV7.js";
2
2
  function m(a) {
3
3
  function t(o, n = !0) {
4
4
  const e = Math.round(Math.log10(o));
@@ -0,0 +1,13 @@
1
+ import { c as i, ao as d } from "./app-DZiCiBV7.js";
2
+ import { getCurrentInstance as n, reactive as m, watch as l } from "vue";
3
+ function b(e = "modelValue") {
4
+ var t, r;
5
+ const s = ((t = n()) == null ? void 0 : t.props) ?? {}, a = ((r = n()) == null ? void 0 : r.emit) ?? (() => {
6
+ }), o = m(i(s[e] ?? {})), c = `update:${d(e)}`;
7
+ return l(o, (p) => {
8
+ a(c, p);
9
+ }), o;
10
+ }
11
+ export {
12
+ b as d
13
+ };
@@ -0,0 +1,15 @@
1
+ import { ar as n } from "./app-DZiCiBV7.js";
2
+ function d(t) {
3
+ const r = a(t);
4
+ return r === null ? "" : n(r);
5
+ }
6
+ function a(t) {
7
+ const r = t.match(/\w+_(\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{3}Z).*/);
8
+ if (!r) return null;
9
+ const e = /* @__PURE__ */ new Date(`${r[1]}`);
10
+ return isNaN(e.getTime()) ? null : e;
11
+ }
12
+ export {
13
+ d as f,
14
+ a as p
15
+ };
@@ -4,6 +4,13 @@ export declare function rowGenerator(range: string): Generator<number, void, unk
4
4
  export declare function columnGenerator(range: string): Generator<string, void, unknown>;
5
5
  export declare function sheetToRowArray(sheet: WorkSheet): string[][];
6
6
  export declare function cellArrayToMapByHeaderRow<T = Record<string, string>>(items: string[][], usingHeader: string[]): T[];
7
+ /** @returns workbook instead, use toWorkSheet instead */
7
8
  export declare function toSheet(data: any[][], header: string[], sheetName?: string): XLSX.WorkBook;
9
+ /** @returns workbook instead, use toWorkSheet instead */
10
+ export declare function toWorkSheet(data: any[][], header: string[]): XLSX.WorkSheet;
11
+ /** @returns workbook instead, use toWorkSheet instead */
12
+ export declare function toWorkBook<T extends {
13
+ [key: string]: XLSX.WorkSheet;
14
+ }>(workSheets: T, sheetNames?: (keyof T)[]): XLSX.WorkBook;
8
15
  export declare function downloadExcel(workbook: WorkBook, filename: string): void;
9
16
  export declare function readExcel(file: File): Promise<XLSX.WorkBook>;
@@ -0,0 +1,348 @@
1
+ import { F as C, D as A, R as h } from "./row-action.enum-PMKMRrZR.js";
2
+ import { c as O } from "./TableActionableRow.vue_vue_type_script_setup_true_lang-DlNJ6kRg.js";
3
+ import { n as x, u as D, i as B, c as $, as as P, y as M, a as L } from "./app-DZiCiBV7.js";
4
+ import { f as K } from "./format-time-from-id-CFJvgP70.js";
5
+ import { useCoreStore as z, useI18n as V } from "@feedmepos/mf-common";
6
+ import { useDialog as j, useSnackbar as H, FmButtonVariant as U, components as R } from "@feedmepos/ui-library";
7
+ import { defineStore as N } from "pinia";
8
+ import { ref as g, h as S } from "vue";
9
+ import { useRouter as q } from "vue-router";
10
+ const F = x((r, o) => {
11
+ function a() {
12
+ var n;
13
+ return `business_${((n = z().currentBusiness.value) == null ? void 0 : n._id) ?? ""}`;
14
+ }
15
+ return {
16
+ async getTemplate(t) {
17
+ const s = a(), n = `${r.inventoryBackendUrl}/${s}/purchase-order-template/${t}`;
18
+ return o.get(n);
19
+ },
20
+ async readTemplates() {
21
+ const t = a(), s = `${r.inventoryBackendUrl}/${t}/purchase-order-template`;
22
+ return o.get(s);
23
+ },
24
+ async createTemplate(t) {
25
+ const s = a(), n = `${r.inventoryBackendUrl}/${s}/purchase-order-template`;
26
+ return o.post(n, t);
27
+ },
28
+ async updateTemplate(t) {
29
+ const s = a(), n = `${r.inventoryBackendUrl}/${s}/purchase-order-template`;
30
+ return o.put(n, t);
31
+ },
32
+ async deleteTemplate(t) {
33
+ const s = a(), n = `${r.inventoryBackendUrl}/${s}/purchase-order-template`;
34
+ return o.delete(n, { _id: t._id, _rev: t._rev });
35
+ },
36
+ async importTemplates(t) {
37
+ const s = a(), n = `${r.inventoryBackendUrl}/${s}/purchase-order-template/import`;
38
+ return o.post(n, t);
39
+ }
40
+ };
41
+ });
42
+ function I(r) {
43
+ const o = D(), a = r.sku, t = o.skuById[a._id];
44
+ if (t.unit._id !== a.unit._id) return !0;
45
+ const s = r.measurement;
46
+ return s ? !o.unitById[t.unit._id].measurements.find((p) => p.id === s.id) : !1;
47
+ }
48
+ const G = N("transferTemplateActions", () => {
49
+ const r = j(), o = H(), a = B(), t = J(), s = F(), n = q(), u = g({});
50
+ function p() {
51
+ u.value = {
52
+ mode: C.CREATE,
53
+ show: !0,
54
+ "onUpdate:show"(e) {
55
+ u.value.show = e;
56
+ }
57
+ };
58
+ }
59
+ function y(e) {
60
+ u.value = {
61
+ mode: C.UPDATE,
62
+ modelValue: e,
63
+ show: !0,
64
+ "onUpdate:show"(l) {
65
+ u.value.show = l;
66
+ }
67
+ };
68
+ }
69
+ function T(e, l, m) {
70
+ r.open({
71
+ title: `Confirm deleting template ${e.name}?`,
72
+ message: "Deleted template can no longer be retrieved",
73
+ primaryActions: {
74
+ text: "Delete",
75
+ variant: U.Destructive,
76
+ close: !0
77
+ },
78
+ secondaryActions: {
79
+ text: "Cancel",
80
+ variant: U.Plain,
81
+ close: !0
82
+ }
83
+ }).onPrimary(async () => {
84
+ o.open({
85
+ title: `Deleting ${e.name}`,
86
+ type: "info"
87
+ });
88
+ try {
89
+ l.value = !0;
90
+ const [d] = await Promise.allSettled([
91
+ s.deleteTemplate(e),
92
+ new Promise((w) => setTimeout(w, 1e3))
93
+ ]);
94
+ if (d.status === "rejected") throw d.reason;
95
+ o.open({
96
+ title: `Deleted ${e.name}`,
97
+ type: "success"
98
+ });
99
+ } catch (d) {
100
+ o.open({
101
+ title: `Unable to delete ${e.name}`,
102
+ message: `See error from server: ${d}`,
103
+ type: "error"
104
+ }), console.error("error on deleting purchase order template", d);
105
+ } finally {
106
+ l.value = !1, m();
107
+ }
108
+ });
109
+ }
110
+ const f = g({});
111
+ function b(e) {
112
+ f.value = {
113
+ template: e,
114
+ show: !0,
115
+ "onUpdate:show"(l) {
116
+ f.value.show = l;
117
+ },
118
+ "onAction:edit"() {
119
+ f.value.show = !1, y($(e));
120
+ }
121
+ };
122
+ }
123
+ function _() {
124
+ const { promise: e, resolve: l } = Promise.withResolvers(), m = (c) => {
125
+ l(c);
126
+ }, d = t.templates.filter(
127
+ (c) => {
128
+ var v;
129
+ return (!c.locations || c.locations.find((E) => E.doc._id === a.currentLocation.doc._id)) && ((v = c.purchaseOrder.supplier) == null ? void 0 : v._id) !== a.currentLocation.doc._id;
130
+ }
131
+ );
132
+ if (!d.length)
133
+ return r.open({
134
+ title: "Select one template",
135
+ message: "There is no available template in your business. Configure a new template?",
136
+ primaryActions: {
137
+ text: "Close",
138
+ close: !0
139
+ },
140
+ secondaryActions: {
141
+ text: "Close",
142
+ close: !0
143
+ }
144
+ }).onPrimary(() => {
145
+ n.push({ name: P.TRANSFER_TEMPLATE }), m(void 0);
146
+ }).onSecondary(() => m(void 0)).onClose(() => m(void 0)), e;
147
+ const w = d.map((c) => {
148
+ const v = !c.purchaseOrder.items.length || c.purchaseOrder.items.some(I);
149
+ return {
150
+ label: c.name,
151
+ value: c._id,
152
+ disabled: v,
153
+ sublabel: v ? "This template is invalid. Update this template." : void 0
154
+ };
155
+ });
156
+ return r.open({
157
+ title: "Select one template",
158
+ contentComponent: M,
159
+ contentComponentProps: {
160
+ items: w,
161
+ singleSelect: !0
162
+ },
163
+ primaryActions: {
164
+ text: "Confirm",
165
+ close: !0
166
+ },
167
+ secondaryActions: {
168
+ text: "Close",
169
+ close: !0
170
+ },
171
+ tertiaryActions: {
172
+ text: "Templates",
173
+ close: !0
174
+ }
175
+ }).onPrimary((c) => Array.isArray(c) ? m(c[0]) : null).onSecondary(() => m(void 0)).onTertiary(() => {
176
+ n.push({ name: P.TRANSFER_TEMPLATE }), m(void 0);
177
+ }).onClose(() => m(void 0)), e;
178
+ }
179
+ async function i(e) {
180
+ await s.importTemplates(e);
181
+ }
182
+ return {
183
+ createTemplate: p,
184
+ viewTemplate: b,
185
+ updateTemplate: y,
186
+ deleteTemplate: T,
187
+ getTemplateId: _,
188
+ importTemplates: i,
189
+ templateDialogProps: u,
190
+ templateDetailsProps: f
191
+ };
192
+ });
193
+ function k(r) {
194
+ const { skuById: o } = D(), a = $(r);
195
+ return a.purchaseOrder.items = r.purchaseOrder.items.filter((t) => o[t.sku._id]), a;
196
+ }
197
+ const J = N(
198
+ "transferTemplateTable",
199
+ function() {
200
+ const { t: o } = V(), { viewTemplate: a, updateTemplate: t, deleteTemplate: s } = G(), n = g(!1), u = g(new Array()), p = F(), y = D();
201
+ async function T() {
202
+ u.value = [], n.value = !0;
203
+ try {
204
+ const [i] = await Promise.all([
205
+ p.readTemplates(),
206
+ y.readInventory()
207
+ ]).delayed(1e3);
208
+ u.value = i.map(k);
209
+ } catch (i) {
210
+ console.log("Something went wrong when fetching templates:", i);
211
+ } finally {
212
+ n.value = !1;
213
+ }
214
+ }
215
+ async function f(i) {
216
+ if (!u.value.find((e) => e._id)) {
217
+ n.value = !0;
218
+ try {
219
+ u.value = [
220
+ await p.getTemplate(i).then(k).delayed(1e3)
221
+ ];
222
+ } catch (e) {
223
+ console.log("Something went wrong when fetching templates:", e);
224
+ } finally {
225
+ n.value = !1;
226
+ }
227
+ }
228
+ }
229
+ function b(i, e) {
230
+ switch (e = $(e), i) {
231
+ case h.Details:
232
+ return a(e);
233
+ case h.Edit:
234
+ return t(e);
235
+ case h.Delete:
236
+ return s(e, n, T);
237
+ }
238
+ }
239
+ return {
240
+ columnDefs: [
241
+ {
242
+ id: "_id",
243
+ accessorKey: "_id",
244
+ header: () => o("inventory.transfer.table.createdAt"),
245
+ cell(i) {
246
+ return K(`${i.getValue()}`);
247
+ },
248
+ enableSorting: !0
249
+ },
250
+ {
251
+ id: "name",
252
+ accessorKey: "name",
253
+ header: () => o("inventory.transfer.table.name"),
254
+ enableSorting: !0,
255
+ size: 200
256
+ },
257
+ {
258
+ id: "noOfItems",
259
+ accessorKey: "purchaseOrder.items.length",
260
+ header: () => o("inventory.transfer.table.noOfItems"),
261
+ enableSorting: !1,
262
+ meta: {
263
+ width: "10rem",
264
+ textAlign: "right"
265
+ },
266
+ cell(i) {
267
+ const e = Number(i.getValue()) || 0, l = i.row.original.purchaseOrder.items.some(I);
268
+ return e === 0 || l ? S("div", { class: "flex justify-end gap-4 items-center" }, [
269
+ S(
270
+ R.FmTooltip,
271
+ {},
272
+ {
273
+ content() {
274
+ return l ? "The template is invalid due to invalid unit on some of the items. Please update this template." : "The template is invalid due to deleted ingredients. Please update this template.";
275
+ },
276
+ default() {
277
+ return S(R.FmIcon, {
278
+ name: "error",
279
+ color: "system-error-300",
280
+ size: "sm"
281
+ });
282
+ }
283
+ }
284
+ ),
285
+ e
286
+ ]) : e;
287
+ }
288
+ },
289
+ {
290
+ id: "enabledLocations",
291
+ accessorKey: "purchaseOrder.locations.length",
292
+ header: () => "Enabled outlets",
293
+ cell(i) {
294
+ var l;
295
+ const e = (l = i.row.original.locations) == null ? void 0 : l.length;
296
+ return e ? `${e}` : "All";
297
+ },
298
+ enableSorting: !1,
299
+ meta: {
300
+ width: "10rem",
301
+ textAlign: "right"
302
+ }
303
+ },
304
+ {
305
+ id: "ref",
306
+ accessorKey: "purchaseOrder.ref",
307
+ header: () => o("inventory.transfer.table.reference"),
308
+ enableSorting: !1,
309
+ size: "auto"
310
+ },
311
+ {
312
+ id: "action",
313
+ cell(i) {
314
+ const e = i.row.original, l = [
315
+ A[h.Details],
316
+ A[h.Edit],
317
+ A[h.Delete]
318
+ ];
319
+ return O(l, (m) => b(m, e));
320
+ },
321
+ enableSorting: !1,
322
+ size: 40,
323
+ meta: {
324
+ cellClass: "",
325
+ headerClass: ""
326
+ }
327
+ }
328
+ ],
329
+ templates: u,
330
+ loading: n,
331
+ fetchTemplates: T,
332
+ loadTemplate: f
333
+ };
334
+ }
335
+ );
336
+ function ae(r, o, a) {
337
+ const t = (a == null ? void 0 : a.abbrev) ?? o.abbrev;
338
+ return `${L(r, !1)} ${t}`;
339
+ }
340
+ var Q = /* @__PURE__ */ ((r) => (r.PURCHASE = "PURCHASE", r.TRANSFER = "TRANSFER", r))(Q || {});
341
+ export {
342
+ Q as P,
343
+ F as a,
344
+ G as b,
345
+ ae as f,
346
+ I as t,
347
+ J as u
348
+ };
@@ -2068,6 +2068,69 @@ export declare function useInventoryStore(): {
2068
2068
  _id: string;
2069
2069
  name: string;
2070
2070
  }>;
2071
+ readonly skuByCode: Record<string, {
2072
+ trackingMeasurement?: string | null | undefined;
2073
+ convert?: {
2074
+ measurement?: string | null | undefined;
2075
+ inventoryBindings?: {
2076
+ measurement?: {
2077
+ id: string;
2078
+ name: string;
2079
+ abbrev: string;
2080
+ conversion: {
2081
+ amount: number;
2082
+ precision: number;
2083
+ };
2084
+ } | null | undefined;
2085
+ type: "RECIPE" | "SKU";
2086
+ amount: {
2087
+ amount: number;
2088
+ precision: number;
2089
+ };
2090
+ id: string;
2091
+ }[] | null | undefined;
2092
+ } | null | undefined;
2093
+ valuation?: "FIFO" | "LIFO" | "FEFO" | "WAVG" | null | undefined;
2094
+ defaultCost?: {
2095
+ measurement?: {
2096
+ id: string;
2097
+ name: string;
2098
+ abbrev: string;
2099
+ conversion: {
2100
+ amount: number;
2101
+ precision: number;
2102
+ };
2103
+ } | null | undefined;
2104
+ costPerUnit: {
2105
+ currency: "AED" | "AFN" | "ALL" | "AMD" | "ANG" | "AOA" | "ARS" | "AUD" | "AWG" | "AZN" | "BAM" | "BBD" | "BDT" | "BGN" | "BHD" | "BIF" | "BMD" | "BND" | "BOB" | "BOV" | "BRL" | "BSD" | "BTN" | "BWP" | "BYN" | "BZD" | "CAD" | "CDF" | "CHE" | "CHF" | "CHW" | "CLF" | "CLP" | "CNY" | "COP" | "COU" | "CRC" | "CUC" | "CUP" | "CVE" | "CZK" | "DJF" | "DKK" | "DOP" | "DZD" | "EGP" | "ERN" | "ETB" | "EUR" | "FJD" | "FKP" | "GBP" | "GEL" | "GHS" | "GIP" | "GMD" | "GNF" | "GTQ" | "GYD" | "HKD" | "HNL" | "HRK" | "HTG" | "HUF" | "IDR" | "ILS" | "INR" | "IQD" | "IRR" | "ISK" | "JMD" | "JOD" | "JPY" | "KES" | "KGS" | "KHR" | "KMF" | "KPW" | "KRW" | "KWD" | "KYD" | "KZT" | "LAK" | "LBP" | "LKR" | "LRD" | "LSL" | "LYD" | "MAD" | "MDL" | "MGA" | "MKD" | "MMK" | "MNT" | "MOP" | "MRU" | "MUR" | "MVR" | "MWK" | "MXN" | "MXV" | "MYR" | "MZN" | "NAD" | "NGN" | "NIO" | "NOK" | "NPR" | "NZD" | "OMR" | "PAB" | "PEN" | "PGK" | "PHP" | "PKR" | "PLN" | "PYG" | "QAR" | "RON" | "RSD" | "RUB" | "RWF" | "SAR" | "SBD" | "SCR" | "SDG" | "SEK" | "SGD" | "SHP" | "SLL" | "SOS" | "SRD" | "SSP" | "STN" | "SVC" | "SYP" | "SZL" | "THB" | "TJS" | "TMT" | "TND" | "TOP" | "TRY" | "TTD" | "TWD" | "TZS" | "UAH" | "UGX" | "USD" | "USN" | "UYI" | "UYU" | "UYW" | "UZS" | "VES" | "VND" | "VUV" | "WST" | "XAF" | "XAG" | "XAU" | "XBA" | "XBB" | "XBC" | "XBD" | "XCD" | "XDR" | "XOF" | "XPD" | "XPF" | "XPT" | "XSU" | "XTS" | "XUA" | "XXX" | "YER" | "ZAR" | "ZMW" | "ZWL";
2106
+ amount: number;
2107
+ precision: number;
2108
+ };
2109
+ } | null | undefined;
2110
+ thresholds?: {
2111
+ low: number;
2112
+ mid: number;
2113
+ } | null | undefined;
2114
+ operationalGroup?: string | null | undefined;
2115
+ unit: {
2116
+ _id: string;
2117
+ name: string;
2118
+ abbrev: string;
2119
+ precision: number;
2120
+ measurements: {
2121
+ id: string;
2122
+ name: string;
2123
+ abbrev: string;
2124
+ conversion: {
2125
+ amount: number;
2126
+ precision: number;
2127
+ };
2128
+ }[];
2129
+ };
2130
+ code: string;
2131
+ _id: string;
2132
+ name: string;
2133
+ }>;
2071
2134
  init(): Promise<void>;
2072
2135
  readClosing(): Promise<void>;
2073
2136
  getAffectedMenu(id: string): Promise<BindedWithRecipeId[]>;
@@ -534,6 +534,95 @@ export declare function useLocationStore(): {
534
534
  };
535
535
  };
536
536
  }[];
537
+ readonly locationByDbName: {
538
+ [key: string]: {
539
+ type: "restaurant" | "warehouse";
540
+ name: string;
541
+ acceptRequest: boolean;
542
+ dbName: string;
543
+ doc: {
544
+ _id: string;
545
+ businessId: string;
546
+ profile: {
547
+ code?: string | null | undefined;
548
+ _id?: string | null | undefined;
549
+ name?: string | undefined;
550
+ address?: {
551
+ coordinates?: number[] | null | undefined;
552
+ line2?: string | null | undefined;
553
+ state: string;
554
+ country: string;
555
+ line1: string;
556
+ city: string;
557
+ postcode: string;
558
+ } | undefined;
559
+ email?: string | undefined;
560
+ regNo?: string | undefined;
561
+ sstRegNo?: string | null | undefined;
562
+ phoneNo?: string | undefined;
563
+ legalName?: string | null | undefined;
564
+ discovery?: boolean | null | undefined;
565
+ coverPhoto?: string | null | undefined;
566
+ thumbnailPhoto?: string | null | undefined;
567
+ description?: string | null | undefined;
568
+ photos?: string[] | null | undefined;
569
+ operatingHours?: {
570
+ 0: {
571
+ hours: {
572
+ end: string;
573
+ start: string;
574
+ }[];
575
+ enable: boolean;
576
+ };
577
+ 2: {
578
+ hours: {
579
+ end: string;
580
+ start: string;
581
+ }[];
582
+ enable: boolean;
583
+ };
584
+ 1: {
585
+ hours: {
586
+ end: string;
587
+ start: string;
588
+ }[];
589
+ enable: boolean;
590
+ };
591
+ 3: {
592
+ hours: {
593
+ end: string;
594
+ start: string;
595
+ }[];
596
+ enable: boolean;
597
+ };
598
+ 4: {
599
+ hours: {
600
+ end: string;
601
+ start: string;
602
+ }[];
603
+ enable: boolean;
604
+ };
605
+ 5: {
606
+ hours: {
607
+ end: string;
608
+ start: string;
609
+ }[];
610
+ enable: boolean;
611
+ };
612
+ 6: {
613
+ hours: {
614
+ end: string;
615
+ start: string;
616
+ }[];
617
+ enable: boolean;
618
+ };
619
+ } | null | undefined;
620
+ tags?: string[] | null | undefined;
621
+ url?: string | null | undefined;
622
+ };
623
+ };
624
+ };
625
+ };
537
626
  businessLevel: boolean;
538
627
  watchLocation(callback: (location?: InventoryLocation | null) => Promise<void>): void;
539
628
  readLocations(): Promise<void>;
@@ -39,6 +39,7 @@ export declare function useNetSuiteStore(): {
39
39
  }[];
40
40
  };
41
41
  };
42
+ getNetSuiteLocation(locationId: string): FdoNetSuiteLocation | undefined;
42
43
  getLocationSubsidiary(netSuiteLocationId?: string | null): {
43
44
  id: string | undefined;
44
45
  name: string;