@feedmepos/mf-inventory-portal 1.2.59 → 1.2.60-dev.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{App-Nwc0Ha2r.js → App-B_yr-6yL.js} +82 -78
- package/dist/{ApprovalView-Y5f915s3.js → ApprovalView-DoYBBuSD.js} +5 -5
- package/dist/{BindingsDialog-5N7R_u4c.js → BindingsDialog-DG7HOy6J.js} +5 -5
- package/dist/{BindingsPicker-BJwvLu2s.js → BindingsPicker-DVCYpyrR.js} +3 -3
- package/dist/{BindingsTable-B8sq-qXH.js → BindingsTable-CCel2b_W.js} +5 -5
- package/dist/{ClosingDraftView-BsyYOZsz.js → ClosingDraftView-CfM7gNBX.js} +891 -893
- package/dist/{ClosingHistoryView-BNpsMNy1.js → ClosingHistoryView-DWH4bFgg.js} +36 -36
- package/dist/{ClosingTemplateView-BBqbq07d.js → ClosingTemplateView-JYnnvm7L.js} +14 -14
- package/dist/{DeliveryOrderPrintPreview-CmOO7wuE.js → DeliveryOrderPrintPreview-BihBTJGj.js} +7 -7
- package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-BXlY-Gu1.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-CWjtQajS.js} +17 -17
- package/dist/{FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-CAMkZRFI.js → FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-CUIrR73y.js} +2 -2
- package/dist/{FmMultiselectDialog-CwJUv9tG.js → FmMultiselectDialog-CxDviJZM.js} +16 -16
- package/dist/{FmMultiselectDialog-LagHyTQP.js → FmMultiselectDialog-D51nW6yj.js} +1 -1
- package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-BmHFIkt1.js → FmUnitInput.vue_vue_type_script_setup_true_lang-DLqUnROc.js} +16 -15
- package/dist/{ImportView-wQ_bNesb.js → ImportView-C52rZFib.js} +6 -6
- package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-DtMrJIVs.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-CjZmd-Sa.js} +1 -1
- package/dist/{IngredientGroupView-DsGMhdwu.js → IngredientGroupView-DTHpZP2L.js} +5 -5
- package/dist/{IngredientsView-JdjcLdOx.js → IngredientsView-CrCW6heJ.js} +25 -24
- package/dist/{IntegrationView-CMmSIRUk.js → IntegrationView--DZANrHj.js} +18 -17
- package/dist/{InventoryBindingForm-UL-UKtYW.js → InventoryBindingForm-DLTpv-zQ.js} +1 -1
- package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-r875PDKP.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-hkIg4Rbp.js} +17 -16
- package/dist/{InventoryBindingSummary-BDAuT62b.js → InventoryBindingSummary-D9ptV8Cw.js} +1 -1
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-C5zOYiqR.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-CdPxhkg0.js} +5 -5
- package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-B2zppgqk.js → PremiumBadge.vue_vue_type_script_setup_true_lang-Ci3esisT.js} +2 -2
- package/dist/{PublishView-CSoZCSHT.js → PublishView-DxzL_D61.js} +8 -8
- package/dist/{PurchaseOrderPrintPreview-D5Qw44xo.js → PurchaseOrderPrintPreview-D0tg-2TC.js} +11 -11
- package/dist/{ReceiveRequestView-Chntp08E.js → ReceiveRequestView-2U534J1_.js} +251 -250
- package/dist/RecipeView-VZRyX3Mm.js +1558 -0
- package/dist/{StockView-CuCK7tD2.js → StockView-CvWbnYGz.js} +653 -651
- package/dist/SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-CxjceLuZ.js +183 -0
- package/dist/{SupplierView-CA17Tz02.js → SupplierView-DMIunLvv.js} +20 -19
- package/dist/{SurchargeView-EIftjMCa.js → SurchargeView-jteWYvQz.js} +6 -6
- package/dist/{SystemTrailDialog.vue_vue_type_script_setup_true_lang-CqA6RmPy.js → SystemTrailDialog.vue_vue_type_script_setup_true_lang-CyoUVoDH.js} +2 -2
- package/dist/{TemplatePublishDialog.vue_vue_type_script_setup_true_lang-CYXsAP0i.js → TemplatePublishDialog.vue_vue_type_script_setup_true_lang-DAkKiy0Z.js} +1 -1
- package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-BbbAEIcW.js → TransferDetails.vue_vue_type_script_setup_true_lang-CEXA3vvS.js} +77 -78
- package/dist/{TransferTemplateView-CYfbm9aS.js → TransferTemplateView-DMQ1WIij.js} +22 -21
- package/dist/UnitCostHistoryView-DQ3sXVAQ.js +651 -0
- package/dist/{UnitView-6s5CsGEQ.js → UnitView-p6eZ8G2C.js} +9 -9
- package/dist/{WarehouseView-BXDQOyFZ.js → WarehouseView-BIShkEPs.js} +5 -5
- package/dist/{WastageTemplateView-Cq92TiRs.js → WastageTemplateView-DCbczB_0.js} +14 -14
- package/dist/api/inventory.d.ts +126 -36
- package/dist/api/netsuite.d.ts +8 -1
- package/dist/api/stock-estimate.d.ts +2 -0
- package/dist/api/unit-cost-history.d.ts +28 -0
- package/dist/{app-DJuq_faF.js → app-BAVBNKKH.js} +7461 -6448
- package/dist/app.d.ts +236 -0
- package/dist/app.js +1 -1
- package/dist/{closing-template-D_zbp5V1.js → closing-template-DqxA750a.js} +1 -1
- package/dist/components/StockForecastProps.d.ts +6 -0
- package/dist/components/inventory-binding/InventoryBinding.vue.d.ts +37 -1
- package/dist/components/shell/inventory/binding-dialog.vue.d.ts +14 -0
- package/dist/components/shell/inventory/binding-ui.vue.d.ts +16 -1
- package/dist/{date2-4vrHarNG.js → date2-CgwRU403.js} +1 -1
- package/dist/{dayjs.min-Dwp8614O.js → dayjs.min-CjWVK_Fe.js} +16 -16
- package/dist/{defineDeepModel-DVt2Wz9r.js → defineDeepModel-B1j_kSRA.js} +1 -1
- package/dist/{duplicate-template-CkYWeFtL.js → duplicate-template-iHtqE_uw.js} +1 -1
- package/dist/{feature-Beh-qc03.js → feature-DEryk-Cv.js} +94 -89
- package/dist/{format-time-from-id-84iLSxVu.js → format-time-from-id-C-mbWMLS.js} +1 -1
- package/dist/{format-unit-display-DfeNpWk4.js → format-unit-display-C8Hzskg0.js} +16 -15
- package/dist/helper/number.d.ts +2 -0
- package/dist/helper/type.d.ts +5 -0
- package/dist/{import-export.helper-fAVzQM2q.js → import-export.helper-DGg16RXI.js} +17 -16
- package/dist/{index-CoEqhZLm.js → index-BAkoTUB0.js} +1 -1
- package/dist/{index-B2_16R5E.js → index-BLowSL6G.js} +1471 -1412
- package/dist/{index-Chogzhcq.js → index-CLr4DPan.js} +3 -3
- package/dist/{lodash-Cx8BU1GH.js → lodash-D1_0uR01.js} +1 -1
- package/dist/{netsuite-C1bml-v1.js → netsuite-Bbxz8tiD.js} +60 -60
- package/dist/number-Cof88Fjz.js +232 -0
- package/dist/{purchase-order-template-BqFnJ-6B.js → purchase-order-template-B-sXEbRE.js} +1 -1
- package/dist/router/name.d.ts +1 -0
- package/dist/rules-CzPUVxD_.js +98 -0
- package/dist/{stock-KxT4JbNf.js → stock-BYPFH5a_.js} +1 -1
- package/dist/stock-D9E1uFb1.js +75 -0
- package/dist/stores/feature.d.ts +2 -0
- package/dist/stores/integration/netsuite.d.ts +8 -1
- package/dist/stores/inventory.d.ts +119 -30
- package/dist/{supplier-C7wUB1zT.js → supplier-wQYh275s.js} +2 -2
- package/dist/{surcharge-CjB_Qtbv.js → surcharge-Bi21qFa0.js} +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{use-ingredient-select-dialog-D5KSqA4Z.js → use-ingredient-select-dialog-DH-mXl8H.js} +2 -2
- package/dist/{use-inventory-binding-dialog-eGOvztV3.js → use-inventory-binding-dialog-i8E2CNuV.js} +2 -2
- package/dist/{use-template-enabled-locations-2-3kcVWPQm.js → use-template-enabled-locations-2-DRk9TskI.js} +2 -2
- package/dist/views/closing-draft/components/closing-draft-dialog/ClosingDraftDialog.vue.d.ts +64 -8
- package/dist/views/closing-draft/composables/use-closing-draft-table.d.ts +192 -24
- package/dist/views/closing-template/components/closing-template-form/composables/use-closing-template-items.d.ts +8 -1
- package/dist/views/closing-template/composables/use-closing-template-actions.d.ts +96 -12
- package/dist/views/closing-template/composables/use-closing-template-table.d.ts +96 -12
- package/dist/views/ingredient-group/composables/use-ingredient-group-table.d.ts +18 -18
- package/dist/views/ingredients/components/convert/ConvertForm.vue.d.ts +14 -0
- package/dist/views/ingredients/components/ingredient-form/IngredientForm.vue.d.ts +32 -4
- package/dist/views/ingredients/components/inventory-binding/InventoryBindingForm.vue.d.ts +28 -0
- package/dist/views/ingredients/components/inventory-binding/v2/InventoryBindingFormV2.vue.d.ts +169 -0
- package/dist/views/ingredients/components/inventory-binding/v2/components/InventoryBindingAlternative.vue.d.ts +43 -0
- package/dist/views/ingredients/components/inventory-binding/v2/components/InventoryBindingRule.vue.d.ts +25 -0
- package/dist/views/ingredients/components/inventory-binding/v2/components/InventoryRecipeBindingV2Field.vue.d.ts +125 -0
- package/dist/views/ingredients/components/inventory-binding/v2/components/InventorySkuBindingV2Field.vue.d.ts +129 -0
- package/dist/views/ingredients/components/inventory-binding/v2/composables/use-inventory-binding-alternative-table.d.ts +30 -0
- package/dist/views/ingredients/components/inventory-binding/v2/composables/use-inventory-binding-dialog.d.ts +4 -0
- package/dist/views/ingredients/composables/use-ingredient-table.d.ts +8 -1
- package/dist/views/integration/components/netsuite/InventoryTransferIngredientTable.vue.d.ts +16 -2
- package/dist/views/receive-request/components/transfer-form/TransferFormWithController.vue.d.ts +33 -5
- package/dist/views/receive-request/components/transfer-form/components/ForecastStock.vue.d.ts +16 -2
- package/dist/views/receive-request/components/transfer-form/components/TransferItemTable.vue.d.ts +32 -4
- package/dist/views/receive-request/components/transfer-form/composables/use-transfer-items.d.ts +8 -1
- package/dist/views/receive-request/composables/use-process-purchase-order.d.ts +41 -6
- package/dist/views/receive-request/composables/use-receive-request-form.d.ts +246 -36
- package/dist/views/receive-request/composables/use-receive-request-table.d.ts +287 -42
- package/dist/views/recipe/components/recipe-form/RecipeForm.vue.d.ts +16 -0
- package/dist/views/stock/components/StockRecordCard.vue.d.ts +1 -0
- package/dist/views/stock/components/dialog/AdjustedItemForm.vue.d.ts +16 -2
- package/dist/views/stock/type.d.ts +2 -0
- package/dist/views/transfer-template/components/transfer-template-dialog/TransferTemplateDialog.vue.d.ts +16 -2
- package/dist/views/transfer-template/components/transfer-template-form/components/NetSuiteCustomCodeSelection.vue.d.ts +16 -2
- package/dist/views/transfer-template/components/transfer-template-form/components/TransferTemplateItemTable.vue.d.ts +16 -2
- package/dist/views/transfer-template/components/transfer-template-form/composables/use-transfer-template-items.d.ts +8 -1
- package/dist/views/transfer-template/composables/use-netsuite-custom-field.d.ts +24 -3
- package/dist/views/transfer-template/composables/use-transfer-template-actions.d.ts +96 -12
- package/dist/views/transfer-template/composables/use-transfer-template-table.d.ts +96 -12
- package/dist/views/unit-cost-history/UnitCostHistoryView.vue.d.ts +2 -0
- package/dist/views/unit-cost-history/components/UnitCostDetailsSideSheet.vue.d.ts +19 -0
- package/dist/views/unit-cost-history/components/UnitCostRecalculationDialog.vue.d.ts +11 -0
- package/dist/views/unit-cost-history/composables/use-unit-cost-history.d.ts +65 -0
- package/dist/{vue-i18n-C6XNfngV.js → vue-i18n-Cf9iDkfk.js} +398 -398
- package/dist/{xlsx-BwNUbN_O.js → xlsx-lp5RXzSw.js} +398 -398
- package/dist/{xlsx.util-B_DE3inS.js → xlsx.util-BxpZNkEZ.js} +1 -1
- package/package.json +2 -2
- package/dist/RecipeView-Ck3Pa4fg.js +0 -646
- package/dist/SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-fMji2qKG.js +0 -172
- package/dist/decimal-Bf6AG_d3.js +0 -99
- package/dist/rules-y2OYGOro.js +0 -201
- package/dist/stock-BWUzlDTa.js +0 -75
|
@@ -1,22 +1,23 @@
|
|
|
1
1
|
import { components as X, useDialogChild as Ae, useSnackbar as ye, useDialog as De, FmButtonVariant as j } from "@feedmepos/ui-library";
|
|
2
2
|
import { defineStore as he } from "pinia";
|
|
3
3
|
import { F as le } from "./form-mode.enum-BKiNVH6A.js";
|
|
4
|
-
import { u as ve } from "./purchase-order-template-
|
|
4
|
+
import { u as ve } from "./purchase-order-template-B-sXEbRE.js";
|
|
5
5
|
import { ref as E, h as K, defineComponent as te, resolveComponent as U, openBlock as _, createElementBlock as k, createElementVNode as C, normalizeClass as V, createTextVNode as Ne, toDisplayString as N, unref as O, createCommentVNode as q, createVNode as P, withCtx as ee, Fragment as L, renderList as W, onMounted as Re, computed as me, watch as Fe, createSlots as Pe, createBlock as z } from "vue";
|
|
6
|
-
import { a as H, c as re, t as A, u as Z, n as Me, k as ce, v as Le, R as ue } from "./app-
|
|
6
|
+
import { a as H, c as re, t as A, u as Z, n as Me, k as ce, v as Le, R as ue } from "./app-BAVBNKKH.js";
|
|
7
7
|
import { useRouter as Be } from "vue-router";
|
|
8
|
-
import { a as Qe } from "./FmMultiselectDialog-
|
|
8
|
+
import { a as Qe } from "./FmMultiselectDialog-CxDviJZM.js";
|
|
9
9
|
import { D as Y, R as D } from "./row-action.enum-BcW_L_nE.js";
|
|
10
10
|
import { c as Ue } from "./component-DpCUABT3.js";
|
|
11
|
-
import { f as Ve } from "./format-time-from-id-
|
|
11
|
+
import { f as Ve } from "./format-time-from-id-C-mbWMLS.js";
|
|
12
12
|
import { useI18n as ne, useCoreStore as ge } from "@feedmepos/mf-common";
|
|
13
|
-
import { t as B, a as be, d as xe, s as Te, r as qe } from "./xlsx.util-
|
|
13
|
+
import { t as B, a as be, d as xe, s as Te, r as qe } from "./xlsx.util-BxpZNkEZ.js";
|
|
14
14
|
import { F as He } from "./FmDroppableField-J0xUsOTV.js";
|
|
15
|
-
import {
|
|
16
|
-
import { f as
|
|
17
|
-
import { u as oe } from "./supplier-
|
|
18
|
-
import {
|
|
19
|
-
import { u as
|
|
15
|
+
import { c as je, a as Q, t as G, g as J } from "./number-Cof88Fjz.js";
|
|
16
|
+
import { f as ze } from "./date2-CgwRU403.js";
|
|
17
|
+
import { u as oe } from "./supplier-wQYh275s.js";
|
|
18
|
+
import { a as Ye, B as Ke } from "./rules-CzPUVxD_.js";
|
|
19
|
+
import { u as ae } from "./netsuite-Bbxz8tiD.js";
|
|
20
|
+
import { u as We } from "./duplicate-template-iHtqE_uw.js";
|
|
20
21
|
function Se(t) {
|
|
21
22
|
const e = H(), a = t.sku, u = e.skuById[a._id];
|
|
22
23
|
if (u.unit._id !== a.unit._id) return !0;
|
|
@@ -270,7 +271,7 @@ function Ge(t) {
|
|
|
270
271
|
sheets: {},
|
|
271
272
|
sheetOccurence: {}
|
|
272
273
|
}
|
|
273
|
-
)) == null ? void 0 : l.sheets, s = `${a == null ? void 0 : a.name} transfer templates (${
|
|
274
|
+
)) == null ? void 0 : l.sheets, s = `${a == null ? void 0 : a.name} transfer templates (${ze(/* @__PURE__ */ new Date())}).xlsx`, f = be(i);
|
|
274
275
|
return xe(f, s), s;
|
|
275
276
|
}
|
|
276
277
|
function Ze() {
|
|
@@ -564,13 +565,13 @@ function nt(t, e, a) {
|
|
|
564
565
|
J(l, o)
|
|
565
566
|
);
|
|
566
567
|
(Number.isNaN(Number(t.quantityStep)) || Number(t.quantityStep) <= 0) && f.push("Amount step must be more than 0");
|
|
567
|
-
const h =
|
|
568
|
+
const h = Ye(m), d = rt(
|
|
568
569
|
t.minimumQuantity,
|
|
569
570
|
t.maximumQuantity,
|
|
570
571
|
J(l, o)
|
|
571
572
|
), c = d.min, v = d.max;
|
|
572
573
|
d.compareError && f.push(d.compareError);
|
|
573
|
-
const b =
|
|
574
|
+
const b = Ke(+t.minimumQuantity, +t.maximumQuantity), r = G(
|
|
574
575
|
t.defaultQuantity,
|
|
575
576
|
J(l, o)
|
|
576
577
|
), x = h(r);
|
|
@@ -1255,13 +1256,13 @@ const _t = he("transferTemplateActions", () => {
|
|
|
1255
1256
|
templateDetailsProps: b
|
|
1256
1257
|
};
|
|
1257
1258
|
});
|
|
1258
|
-
function
|
|
1259
|
+
function jt(t, e, a) {
|
|
1259
1260
|
const u = (a == null ? void 0 : a.abbrev) ?? e.abbrev;
|
|
1260
1261
|
return `${Q(t, !1)} ${u}`;
|
|
1261
1262
|
}
|
|
1262
1263
|
export {
|
|
1263
1264
|
_e as a,
|
|
1264
|
-
|
|
1265
|
+
jt as f,
|
|
1265
1266
|
Se as t,
|
|
1266
1267
|
_t as u
|
|
1267
1268
|
};
|
package/dist/helper/number.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { FCurrency, FdoDecimal, FdoDinero } from '@feedmepos/core/entity';
|
|
2
|
+
import type { FormatNumberOptions } from './type';
|
|
2
3
|
export type AdjustmentAmount = FdoDecimal;
|
|
3
4
|
export declare function zeroDinero(currency: FCurrency): FdoDinero;
|
|
4
5
|
export declare function formatNumber(number: number, factor: number, precision: number): number;
|
|
@@ -37,3 +38,4 @@ export declare function countDivisibleByTrailingZero(n: number | BigInt): number
|
|
|
37
38
|
*/
|
|
38
39
|
export declare function getAllowedPrecision(unit: FdoInventoryUnit, measurement?: FdoUnitMeasurement | null): number;
|
|
39
40
|
export declare const isNumeric: (value: any) => boolean | 0;
|
|
41
|
+
export declare function formatToLocale(value: number | string | AdjustmentAmount, options?: FormatNumberOptions): string;
|
package/dist/helper/type.d.ts
CHANGED
|
@@ -6,3 +6,8 @@
|
|
|
6
6
|
export type Nullable<T> = {
|
|
7
7
|
[K in keyof T]: T[K] extends Date ? Date | null : T[K] extends Object ? Nullable<T[K]> | null : T[K] extends Array<infer U> ? Array<Nullable<U>> | null : T[K] | null;
|
|
8
8
|
};
|
|
9
|
+
export interface FormatNumberOptions {
|
|
10
|
+
minPrecision?: number;
|
|
11
|
+
maxPrecision?: number;
|
|
12
|
+
locale?: string;
|
|
13
|
+
}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { a as w, t as H,
|
|
2
|
-
import { u as
|
|
1
|
+
import { a as w, t as H, h as T } from "./number-Cof88Fjz.js";
|
|
2
|
+
import { u as P } from "./feature-DEryk-Cv.js";
|
|
3
3
|
import { useCoreStore as g } from "@feedmepos/mf-common";
|
|
4
|
-
import { a as y, d as k, n as
|
|
5
|
-
import { b as N, d as $, s as
|
|
6
|
-
import { f as
|
|
4
|
+
import { a as y, d as k, n as j, e as S } from "./app-BAVBNKKH.js";
|
|
5
|
+
import { b as N, d as $, s as I } from "./xlsx.util-BxpZNkEZ.js";
|
|
6
|
+
import { f as _ } from "./date2-CgwRU403.js";
|
|
7
|
+
import { I as O } from "./rules-CzPUVxD_.js";
|
|
7
8
|
function R() {
|
|
8
9
|
return {
|
|
9
10
|
low: 6,
|
|
@@ -71,7 +72,7 @@ function E() {
|
|
|
71
72
|
id: "measurementName",
|
|
72
73
|
name: "Measurement Name"
|
|
73
74
|
}
|
|
74
|
-
], t =
|
|
75
|
+
], t = P(), a = g(), n = k(a.currentCountry.value);
|
|
75
76
|
return t.enableTotalCost && e.push(
|
|
76
77
|
{
|
|
77
78
|
id: "valuationMethod",
|
|
@@ -95,7 +96,7 @@ function E() {
|
|
|
95
96
|
name: "Custom Attributes"
|
|
96
97
|
}), e;
|
|
97
98
|
}
|
|
98
|
-
function
|
|
99
|
+
function X() {
|
|
99
100
|
const t = y().skus.map(V), n = g().currentBusiness.value, s = E(), c = [
|
|
100
101
|
["Business name:", n == null ? void 0 : n.name],
|
|
101
102
|
["Business ID:", n == null ? void 0 : n._id],
|
|
@@ -103,10 +104,10 @@ function Q() {
|
|
|
103
104
|
[],
|
|
104
105
|
s.map((o) => o.name),
|
|
105
106
|
...t.map((o) => s.map((u) => o[u.id]))
|
|
106
|
-
], r = s.map((o) => `system:${o.id}`), m = N(c, r), d = `${n == null ? void 0 : n.name} ingredients (${
|
|
107
|
+
], r = s.map((o) => `system:${o.id}`), m = N(c, r), d = `${n == null ? void 0 : n.name} ingredients (${_(/* @__PURE__ */ new Date())}).xlsx`;
|
|
107
108
|
return $(m, d), d;
|
|
108
109
|
}
|
|
109
|
-
function
|
|
110
|
+
function Z() {
|
|
110
111
|
const t = g().currentBusiness.value, a = E(), n = [
|
|
111
112
|
["Business name:", t == null ? void 0 : t.name],
|
|
112
113
|
["Business ID:", t == null ? void 0 : t._id],
|
|
@@ -125,7 +126,7 @@ function L(e) {
|
|
|
125
126
|
c,
|
|
126
127
|
r,
|
|
127
128
|
...m
|
|
128
|
-
] =
|
|
129
|
+
] = I(e);
|
|
129
130
|
if (!t || !t.length || t.some((l) => l.length && !l.startsWith("system:")))
|
|
130
131
|
throw new Error("Missing meta header. Excel file does not come from the template.");
|
|
131
132
|
const d = t.map((l) => l.split(":")[1]), u = ["code", "name", "unit", "baseUnit", "measurementName"].filter((l) => !d.includes(l));
|
|
@@ -167,7 +168,7 @@ function U(e, t, a, { ignoreErrors: n = !1 } = {}) {
|
|
|
167
168
|
e.valuationMethod && !u && r.push(
|
|
168
169
|
`Expected valuation method to be one of ${S.options.join()} but got ${e.valuationMethod} instead.`
|
|
169
170
|
);
|
|
170
|
-
const l = g().currentCountry.value, h = (i) => `${i}`.length &&
|
|
171
|
+
const l = g().currentCountry.value, h = (i) => `${i}`.length && O()(i) === !0, f = h(`${e.pricePerUnit}`) === !0 ? {
|
|
171
172
|
costPerUnit: {
|
|
172
173
|
...H(Number(e.pricePerUnit) || 0, T(Number(e.pricePerUnit) || 0)),
|
|
173
174
|
currency: ((M = k(l)) == null ? void 0 : M.currency) ?? "MYR"
|
|
@@ -193,9 +194,9 @@ function U(e, t, a, { ignoreErrors: n = !1 } = {}) {
|
|
|
193
194
|
excelRowNumber: t + 6
|
|
194
195
|
};
|
|
195
196
|
}
|
|
196
|
-
function
|
|
197
|
+
function ee(e) {
|
|
197
198
|
try {
|
|
198
|
-
const t = L(e).filter((o) => o.data.code), n = y().skus, s =
|
|
199
|
+
const t = L(e).filter((o) => o.data.code), n = y().skus, s = j(n, "code"), c = t.filter((o) => !s[o.data.code]), r = t.filter((o) => s[o.data.code]), m = c.map(
|
|
199
200
|
(o) => U(o.data, o.index, t)
|
|
200
201
|
), d = r.map((o) => {
|
|
201
202
|
const u = U(o.data, o.index, t), p = s[o.data.code];
|
|
@@ -233,10 +234,10 @@ function Z(e) {
|
|
|
233
234
|
}
|
|
234
235
|
}
|
|
235
236
|
export {
|
|
236
|
-
|
|
237
|
+
Z as a,
|
|
237
238
|
E as b,
|
|
238
239
|
R as d,
|
|
239
|
-
|
|
240
|
-
|
|
240
|
+
X as e,
|
|
241
|
+
ee as g,
|
|
241
242
|
A as s
|
|
242
243
|
};
|