@feedmepos/mf-inventory-portal 1.7.15-dev.3 → 1.7.16-dev.0
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-B1h66sv9.js → App-DFSszWS2.js} +7 -7
- package/dist/{ApprovalView-DKlVcGah.js → ApprovalView-sHjUr1tA.js} +9 -9
- package/dist/{BindingsDialog-CxHlh0kQ.js → BindingsDialog-B-64TNTI.js} +2 -2
- package/dist/{BindingsPicker-BiF5OZEi.js → BindingsPicker-Czn-jEHe.js} +2 -2
- package/dist/{BindingsTable-CygkFbyE.js → BindingsTable-CmB0b3ov.js} +4 -4
- package/dist/{BulkReceiveRequestView-Cf4IHMVn.js → BulkReceiveRequestView-BjGCwQiH.js} +19 -19
- package/dist/{ClosingDraftView-DFnGCAHQ.js → ClosingDraftView-DJLqwVmZ.js} +19 -19
- package/dist/{ClosingHistoryView-c51cSbco.js → ClosingHistoryView-Dj170bDN.js} +5 -5
- package/dist/{ClosingTemplateView-tKdJEP6p.js → ClosingTemplateView-DsfJz31T.js} +16 -16
- package/dist/{CustomPrintTemplatePreview.vue_vue_type_script_setup_true_lang-Br8lpoIh.js → CustomPrintTemplatePreview.vue_vue_type_script_setup_true_lang-CitZIaJ7.js} +1 -1
- package/dist/{DefaultView-2PPCmcbd.js → DefaultView-CsI2C4Hr.js} +2 -2
- package/dist/{DeliveryOrderPrintPreview-BKSQLP79.js → DeliveryOrderPrintPreview-8EupGZmv.js} +12 -12
- package/dist/{EmailDialog.vue_vue_type_script_setup_true_lang-DNbWlGwL.js → EmailDialog.vue_vue_type_script_setup_true_lang-DX_o7mMG.js} +23 -23
- package/dist/{FmDateRangePickerChip.vue_vue_type_script_setup_true_lang-D-EePpPI.js → FmDateRangePickerChip.vue_vue_type_script_setup_true_lang-Vn94NCmp.js} +1 -1
- package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-BUrLcbIR.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-nq-MgcVV.js} +2 -2
- package/dist/FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-DAFZz6rG.js +243 -0
- package/dist/{FmMultiselectDialog-4K4U13Fa.js → FmMultiselectDialog-B5gQRKE6.js} +1 -1
- package/dist/{FmMultiselectDialog-CMUU4YMv.js → FmMultiselectDialog-CZr-dX4K.js} +2 -2
- package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-CWPYtvi-.js → FmUnitInput.vue_vue_type_script_setup_true_lang-BtZOjqlQ.js} +66 -63
- package/dist/{ImportView-3BL5dbPC.js → ImportView-Htolj46U.js} +6 -6
- package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-Gt9-RVuI.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-CTlKy5y-.js} +1 -1
- package/dist/{IngredientGroupView-CrQr-Wcc.js → IngredientGroupView-zZgJ3F9O.js} +5 -5
- package/dist/{IngredientsView-Co_ULkb6.js → IngredientsView-BhIIUpq5.js} +15 -15
- package/dist/{IntegrationExplorerView-Byz0ZiN7.js → IntegrationExplorerView-a7EEa4a4.js} +4 -4
- package/dist/{IntegrationView-BZvXCtuu.js → IntegrationView-Dbr7gTAK.js} +14 -14
- package/dist/{InventoryBindingForm-D7at6ntj.js → InventoryBindingForm-DSAHtnBI.js} +1 -1
- package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-BfN7YCnp.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-CQToFOhK.js} +5 -5
- package/dist/{InventoryBindingSummary-DIWHwJwb.js → InventoryBindingSummary-D_jEP9vJ.js} +1 -1
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-DLIYFBaL.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-BNsoxRX6.js} +1 -1
- package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-BIjAFa7R.js → PremiumBadge.vue_vue_type_script_setup_true_lang-BdqeMPWW.js} +1 -1
- package/dist/ProductionRunDetailView-DnIVaUbO.js +2284 -0
- package/dist/ProductionRunPreparePrintView-B7KsNPgV.js +34 -0
- package/dist/ProductionRunTabs.vue_vue_type_script_setup_true_lang-DkvVIKgN.js +7543 -0
- package/dist/ProductionRunView-9tC9ljDT.js +911 -0
- package/dist/{PublishView-qzVWXhU2.js → PublishView-tOyFyzkR.js} +3 -3
- package/dist/{PurchaseOrderPrintPreview-Dv107ZcE.js → PurchaseOrderPrintPreview-CKyZ5jco.js} +7 -7
- package/dist/{ReceiveRequestView-BoDIlSIR.js → ReceiveRequestView-Brjz7YtB.js} +14 -14
- package/dist/{RecipeView-CZExmd9h.js → RecipeView-DntISZwO.js} +17 -17
- package/dist/{SettingsView-JvHtBOeh.js → SettingsView-_uzG3DYW.js} +4 -4
- package/dist/{StockView-DtAlqzrF.js → StockView-D0ns42PP.js} +363 -363
- package/dist/{SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-DWxA3wuR.js → SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-KlyTPTxq.js} +1 -1
- package/dist/{SupplierView-DIxYLwEk.js → SupplierView-Cg0BEv_J.js} +12 -12
- package/dist/{SurchargeView-BeMy7-Lu.js → SurchargeView-CtNt10E_.js} +6 -6
- package/dist/{SystemTrailDialog.vue_vue_type_script_setup_true_lang-DrOVu6wg.js → SystemTrailDialog.vue_vue_type_script_setup_true_lang-Dm31p8O3.js} +2 -2
- package/dist/{TemplatePublishDialog.vue_vue_type_script_setup_true_lang-Chhxtkov.js → TemplatePublishDialog.vue_vue_type_script_setup_true_lang-C4zoOWNW.js} +1 -1
- package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-2LCcSzCa.js → TransferDetails.vue_vue_type_script_setup_true_lang-nWON2kfX.js} +120 -120
- package/dist/{TransferTemplateView-DK_UHrGt.js → TransferTemplateView-DA-0VP3h.js} +20 -20
- package/dist/{UnitCostHistoryView-CbX9hG9F.js → UnitCostHistoryView-BIcZSZeY.js} +4 -4
- package/dist/{UnitDisplayControl.vue_vue_type_script_setup_true_lang-CDQ7c1Gl.js → UnitDisplayControl.vue_vue_type_script_setup_true_lang-D2dmslg4.js} +4 -4
- package/dist/{UnitView-Cc_PTKs_.js → UnitView-B7hMqpmo.js} +7 -7
- package/dist/{WarehouseView-a-D3zs6h.js → WarehouseView-DQZhCobt.js} +334 -334
- package/dist/{WastageTemplateView-CFRi5Pvf.js → WastageTemplateView-Bg4oY2Vw.js} +14 -14
- package/dist/api/netsuite.d.ts +14 -8
- package/dist/api/production-run-error.d.ts +36 -0
- package/dist/api/production-run-error.spec.d.ts +1 -0
- package/dist/api/production-run.d.ts +80 -0
- package/dist/api/production-run.spec.d.ts +1 -0
- package/dist/{app-D8j93Oqu.js → app-CNKD3vjZ.js} +20007 -15586
- package/dist/app.d.ts +2998 -2
- package/dist/app.js +1 -1
- package/dist/{closing-template-C1b4O-N3.js → closing-template-BeegNS6p.js} +1 -1
- package/dist/components/FmUnitInput.spec.d.ts +1 -0
- package/dist/components/FmUnitInputProps.d.ts +2 -0
- package/dist/composable/useNavigationMenu.production.spec.d.ts +1 -0
- package/dist/{date2-uOSplHdf.js → date2-B00CYgio.js} +1 -1
- package/dist/{dayjs.min-jzzpE5jZ.js → dayjs.min-DPQzGVmJ.js} +1 -1
- package/dist/{decimal-8I4iIvBr.js → decimal-mk8IRyTq.js} +2 -2
- package/dist/{defineDeepModel-DBat73w6.js → defineDeepModel-DPmaWR48.js} +5 -5
- package/dist/{duplicate-template-hyvvKKZn.js → duplicate-template-CMddJ7le.js} +1 -1
- package/dist/{feature-BtW2IuYH.js → feature-fzePklTK.js} +28 -28
- package/dist/{format-time-from-id-TNzYsGd2.js → format-time-from-id-CX7mBtQD.js} +1 -1
- package/dist/{format-unit-display-Bv9J30wI.js → format-unit-display-C-WI6eC7.js} +12 -12
- package/dist/{import-export.helper-xpElLH-b.js → import-export.helper-BXXH9AYn.js} +6 -6
- package/dist/{index-CCpcCOf2.js → index-BGVJky7a.js} +1 -1
- package/dist/{index-BH22SMzP.js → index-D1nPGK7U.js} +3 -3
- package/dist/{index-CTQTVKeu.js → index-DJQBhZfo.js} +1 -1
- package/dist/{inventory-core-dart.default-BfVqWKxc.js → inventory-core-dart.default-CSFkzl91.js} +2928 -6981
- package/dist/{lz-string-BXcuXXWX.js → lz-string-CzFlgjO3.js} +1 -1
- package/dist/{netsuite-Bawdsy6u.js → netsuite-yzjEuV4c.js} +5 -3
- package/dist/{number-q25U2atb.js → number-LQ8tdP_1.js} +6 -6
- package/dist/{predefined-templates-DFETDxr0.js → predefined-templates-Db7qjPHc.js} +1 -1
- package/dist/production-run-prepare-sheet-BVAUvVqt.js +17411 -0
- package/dist/{purchase-order-template-BTSTgbF-.js → purchase-order-template-bBTN12Ij.js} +1 -1
- package/dist/{recalculationUtils-B-9ZEV5d.js → recalculationUtils-DN6oOoMX.js} +1 -1
- package/dist/router/name.d.ts +3 -1
- package/dist/router/shared.production.spec.d.ts +1 -0
- package/dist/{rules-_M2oshOW.js → rules-BdR1TB3v.js} +2 -2
- package/dist/{stock-CUsHHW7_.js → stock-AwNCy6xY.js} +1 -1
- package/dist/{stock-BdtZ5yDl.js → stock-BgGttjDF.js} +3 -3
- package/dist/stores/feature.d.ts +1 -1
- package/dist/stores/integration/codemax.d.ts +1 -1
- package/dist/stores/inventory.d.ts +10 -8
- package/dist/stores/stock.d.ts +10 -8
- package/dist/style.css +1 -1
- package/dist/{supplier-By-0Dy62.js → supplier-BNoSljLB.js} +2 -2
- package/dist/{surcharge-60G2Qke7.js → surcharge-pUc66ZZJ.js} +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{uom-rules-DeGuMW0s.js → uom-rules-BP8Vk8Rl.js} +1 -1
- package/dist/{use-ingredient-select-dialog-BVOtYoKp.js → use-ingredient-select-dialog-DTOzSrjt.js} +2 -2
- package/dist/{use-inventory-binding-dialog-CHm1Ezmr.js → use-inventory-binding-dialog-lHpBzqDy.js} +2 -2
- package/dist/{use-template-enabled-locations-C9vWaXj1.js → use-template-enabled-locations-DmCbj6aZ.js} +2 -2
- package/dist/{use-transfer-locations-VSzkSxBy.js → use-transfer-locations-BeARyv2s.js} +2 -2
- package/dist/{useHrmPermission-B48iHLre.js → useHrmPermission-DScCpS0P.js} +1 -1
- package/dist/{useNavigationMenu-DwRXSSh_.js → useNavigationMenu-B5pf21hS.js} +17 -17
- package/dist/{useSseClient-QeF0izVY.js → useSseClient-BPR5sQ_S.js} +1 -1
- package/dist/views/closing-draft/components/closing-draft-dialog/ClosingDraftApprovalDialog.vue.d.ts +20 -16
- package/dist/views/closing-draft/components/closing-draft-dialog/ClosingDraftDialog.vue.d.ts +40 -32
- package/dist/views/closing-draft/components/closing-draft-groups/ClosingGroupDetailSideSheet.vue.d.ts +20 -16
- package/dist/views/closing-draft/composables/use-closing-draft-actions.d.ts +60 -48
- package/dist/views/closing-draft/composables/use-closing-draft-import.d.ts +10 -8
- package/dist/views/closing-draft/helpers/draft-status-to-class-name.helper.d.ts +1 -1
- package/dist/views/integration/components/ApplyProductDialogCodemax.vue.d.ts +2 -2
- package/dist/views/integration/components/CodemaxDialog.vue.d.ts +2 -2
- package/dist/views/production-run/ProductionRunDetailView.spec.d.ts +1 -0
- package/dist/views/production-run/ProductionRunDetailView.vue.d.ts +15 -0
- package/dist/views/production-run/ProductionRunPreparePrintView.spec.d.ts +1 -0
- package/dist/views/production-run/ProductionRunView.spec.d.ts +1 -0
- package/dist/views/production-run/ProductionRunView.vue.d.ts +2 -0
- package/dist/views/production-run/features/detail/ProductionRunActivityTab.spec.d.ts +1 -0
- package/dist/views/production-run/features/detail/ProductionRunActivityTab.vue.d.ts +15 -0
- package/dist/views/production-run/features/detail/ProductionRunHeader.spec.d.ts +1 -0
- package/dist/views/production-run/features/detail/ProductionRunHeader.vue.d.ts +67 -0
- package/dist/views/production-run/features/detail/ProductionRunIngredientsTab.spec.d.ts +1 -0
- package/dist/views/production-run/features/detail/ProductionRunIngredientsTab.vue.d.ts +52 -0
- package/dist/views/production-run/features/detail/ProductionRunItemsTable.spec.d.ts +1 -0
- package/dist/views/production-run/features/detail/ProductionRunItemsTable.vue.d.ts +80 -0
- package/dist/views/production-run/features/detail/ProductionRunOverviewTab.spec.d.ts +1 -0
- package/dist/views/production-run/features/detail/ProductionRunOverviewTab.vue.d.ts +1066 -0
- package/dist/views/production-run/features/detail/ProductionRunResultTable.spec.d.ts +1 -0
- package/dist/views/{production/ProductionBindingsCell.vue.d.ts → production-run/features/detail/ProductionRunResultTable.vue.d.ts} +10 -14
- package/dist/views/production-run/features/detail/ProductionRunTabs.spec.d.ts +1 -0
- package/dist/views/production-run/features/detail/ProductionRunTabs.vue.d.ts +47 -0
- package/dist/views/production-run/features/detail/ProductionRunTerminalNotice.spec.d.ts +1 -0
- package/dist/views/production-run/features/detail/ProductionRunTerminalNotice.vue.d.ts +15 -0
- package/dist/views/production-run/features/detail/use-production-run-detail.d.ts +2098 -0
- package/dist/views/production-run/features/detail/use-production-run-detail.spec.d.ts +1 -0
- package/dist/views/production-run/features/lifecycle/CancelRunDialog.spec.d.ts +1 -0
- package/dist/views/production-run/features/lifecycle/CancelRunDialog.vue.d.ts +1020 -0
- package/dist/views/production-run/features/lifecycle/CancelRunDialogProps.d.ts +9 -0
- package/dist/views/production-run/features/lifecycle/CloseRunDialog.spec.d.ts +1 -0
- package/dist/views/production-run/features/lifecycle/CloseRunDialog.vue.d.ts +1020 -0
- package/dist/views/production-run/features/lifecycle/CloseRunDialogProps.d.ts +9 -0
- package/dist/views/production-run/features/lifecycle/ProductionRunLifecycleDialogs.spec.d.ts +1 -0
- package/dist/views/production-run/features/lifecycle/ProductionRunLifecycleDialogs.vue.d.ts +3573 -0
- package/dist/views/production-run/features/lifecycle/TargetReachedDialog.spec.d.ts +1 -0
- package/dist/views/production-run/features/lifecycle/TargetReachedDialog.vue.d.ts +1026 -0
- package/dist/views/production-run/features/list/ProductionRunActionMenu.vue.d.ts +56 -0
- package/dist/views/production-run/features/list/ProductionRunActionMenuItem.spec.d.ts +1 -0
- package/dist/views/{production/ProductionCompletionDialog.vue.d.ts → production-run/features/list/ProductionRunActionMenuItem.vue.d.ts} +8 -21
- package/dist/views/production-run/features/list/ProductionRunActionsCell.spec.d.ts +1 -0
- package/dist/views/production-run/features/list/ProductionRunActionsCell.vue.d.ts +20 -0
- package/dist/views/production-run/features/list/ProductionRunItemsCell.spec.d.ts +1 -0
- package/dist/views/production-run/features/list/ProductionRunItemsCell.vue.d.ts +40 -0
- package/dist/views/production-run/features/list/ProductionRunNameCell.spec.d.ts +1 -0
- package/dist/views/production-run/features/list/ProductionRunNameCell.vue.d.ts +43 -0
- package/dist/views/production-run/features/list/ProductionRunSortHeader.spec.d.ts +1 -0
- package/dist/views/production-run/features/list/ProductionRunSortHeader.vue.d.ts +25 -0
- package/dist/views/production-run/features/list/use-production-run-table.d.ts +18 -0
- package/dist/views/production-run/features/list/use-production-run-table.spec.d.ts +1 -0
- package/dist/views/production-run/features/output/ProductionRunBatchCard.spec.d.ts +1 -0
- package/dist/views/production-run/features/output/ProductionRunBatchCard.vue.d.ts +70 -0
- package/dist/views/production-run/features/output/ProductionRunBatchWastageDetails.spec.d.ts +1 -0
- package/dist/views/production-run/features/output/ProductionRunBatchWastageDetails.vue.d.ts +33 -0
- package/dist/views/production-run/features/output/ProductionRunOutputTab.spec.d.ts +1 -0
- package/dist/views/production-run/features/output/ProductionRunOutputTab.vue.d.ts +26 -0
- package/dist/views/production-run/features/output/ProductionRunRecordOutputDetails.spec.d.ts +1 -0
- package/dist/views/production-run/features/output/ProductionRunRecordOutputDetails.vue.d.ts +43 -0
- package/dist/views/production-run/features/output/ProductionRunRecordOutputWastageStatus.spec.d.ts +1 -0
- package/dist/views/production-run/features/output/ProductionRunRecordOutputWastageStatus.vue.d.ts +31 -0
- package/dist/views/production-run/features/output/ProductionRunWastageDisclosure.spec.d.ts +1 -0
- package/dist/views/production-run/features/output/ProductionRunWastageDisclosure.vue.d.ts +23 -0
- package/dist/views/production-run/features/output/ProductionRunWastageRemarkField.spec.d.ts +1 -0
- package/dist/views/production-run/features/output/ProductionRunWastageRemarkField.vue.d.ts +33 -0
- package/dist/views/production-run/features/output/RecordOutputDialog.spec.d.ts +1 -0
- package/dist/views/production-run/features/output/RecordOutputDialog.vue.d.ts +20 -0
- package/dist/views/production-run/features/output/RecordOutputDialogProps.d.ts +28 -0
- package/dist/views/production-run/features/output/use-production-run-record-output.d.ts +245 -0
- package/dist/views/production-run/features/output/use-production-run-record-output.spec.d.ts +1 -0
- package/dist/views/production-run/features/planning/ProductionRunContributorBranch.spec.d.ts +1 -0
- package/dist/views/production-run/features/planning/ProductionRunContributorBranch.vue.d.ts +25 -0
- package/dist/views/production-run/features/planning/ProductionRunDiscardDialog.spec.d.ts +1 -0
- package/dist/views/production-run/features/planning/ProductionRunDiscardDialog.vue.d.ts +21 -0
- package/dist/views/production-run/features/planning/ProductionRunDuplicateDialog.spec.d.ts +1 -0
- package/dist/views/production-run/features/planning/ProductionRunDuplicateDialog.vue.d.ts +61 -0
- package/dist/views/production-run/features/planning/ProductionRunFormDialog.spec.d.ts +1 -0
- package/dist/views/production-run/features/planning/ProductionRunFormDialog.vue.d.ts +1022 -0
- package/dist/views/production-run/features/planning/ProductionRunFormDialogProps.d.ts +25 -0
- package/dist/views/production-run/features/planning/ProductionRunIngredientTree.spec.d.ts +1 -0
- package/dist/views/production-run/features/planning/ProductionRunIngredientTree.vue.d.ts +65 -0
- package/dist/views/production-run/features/planning/ProductionRunInstructionsCard.spec.d.ts +1 -0
- package/dist/views/production-run/features/planning/ProductionRunInstructionsCard.vue.d.ts +15 -0
- package/dist/views/production-run/features/planning/ProductionRunItemPickerDialog.spec.d.ts +1 -0
- package/dist/views/production-run/features/planning/ProductionRunItemPickerDialog.vue.d.ts +30 -0
- package/dist/views/production-run/features/planning/ProductionRunPlanCard.spec.d.ts +1 -0
- package/dist/views/production-run/features/planning/ProductionRunPlanCard.vue.d.ts +67 -0
- package/dist/views/production-run/features/planning/ProductionRunPlanner.spec.d.ts +1 -0
- package/dist/views/production-run/features/planning/ProductionRunPlanner.vue.d.ts +85 -0
- package/dist/views/production-run/features/planning/ProductionRunRequestedOverview.spec.d.ts +1 -0
- package/dist/views/production-run/features/planning/ProductionRunRequestedOverview.vue.d.ts +78 -0
- package/dist/views/production-run/features/planning/production-run-frozen-ingredients.d.ts +49 -0
- package/dist/views/production-run/features/planning/production-run-frozen-ingredients.spec.d.ts +1 -0
- package/dist/views/production-run/features/planning/use-production-run-duplicate-sources.d.ts +1525 -0
- package/dist/views/production-run/features/planning/use-production-run-duplicate-sources.spec.d.ts +1 -0
- package/dist/views/production-run/features/planning/use-production-run-form.d.ts +275 -0
- package/dist/views/production-run/features/planning/use-production-run-form.spec.d.ts +1 -0
- package/dist/views/production-run/features/prepare/PrepareRunConfirmationDialog.spec.d.ts +1 -0
- package/dist/views/production-run/features/prepare/PrepareRunConfirmationDialog.vue.d.ts +32 -0
- package/dist/views/production-run/features/prepare/PrepareRunDialog.spec.d.ts +1 -0
- package/dist/views/production-run/features/prepare/PrepareRunDialog.vue.d.ts +18 -0
- package/dist/views/production-run/features/prepare/PrepareRunDialogProps.d.ts +29 -0
- package/dist/views/production-run/features/prepare/PrepareSheetDialog.spec.d.ts +1 -0
- package/dist/views/production-run/features/prepare/PrepareSheetDialog.vue.d.ts +26 -0
- package/dist/views/production-run/features/prepare/ProductionRunPrepareSheet.vue.d.ts +16 -0
- package/dist/views/production-run/features/prepare/production-run-prepare-sheet-cleanup.spec.d.ts +1 -0
- package/dist/views/production-run/features/prepare/production-run-prepare-sheet.d.ts +18 -0
- package/dist/views/production-run/shared/helpers/production-run-navigation.d.ts +6 -0
- package/dist/views/production-run/shared/helpers/production-run-navigation.spec.d.ts +1 -0
- package/dist/views/production-run/shared/helpers/production-run-precision.helper.d.ts +31 -0
- package/dist/views/production-run/shared/helpers/production-run-quantity.helper.d.ts +57 -0
- package/dist/views/production-run/shared/helpers/production-run-quantity.helper.spec.d.ts +1 -0
- package/dist/views/production-run/shared/model/production-run-display.d.ts +187 -0
- package/dist/views/production-run/shared/model/production-run-display.spec.d.ts +1 -0
- package/dist/views/production-run/shared/model/production-run-item-ingredients.d.ts +22 -0
- package/dist/views/production-run/shared/model/production-run-list.d.ts +46 -0
- package/dist/views/production-run/shared/model/production-run-list.spec.d.ts +1 -0
- package/dist/views/production-run/shared/model/production-run-request-confirmation.d.ts +20 -0
- package/dist/views/production-run/shared/model/production-run-text-limit.d.ts +22 -0
- package/dist/views/production-run/shared/model/production-run-text-limit.spec.d.ts +1 -0
- package/dist/views/production-run/shared/model/production-run-unit-snapshot.d.ts +39 -0
- package/dist/views/production-run/shared/model/use-production-run-actions.d.ts +39 -0
- package/dist/views/production-run/shared/model/use-production-run-actions.spec.d.ts +1 -0
- package/dist/views/production-run/shared/model/use-production-run-ingredients.d.ts +658 -0
- package/dist/views/production-run/shared/model/use-production-run-ingredients.spec.d.ts +1 -0
- package/dist/views/production-run/shared/ui/ProductionRunBanner.vue.d.ts +39 -0
- package/dist/views/production-run/shared/ui/ProductionRunBindingsDisclosure.spec.d.ts +1 -0
- package/dist/views/production-run/shared/ui/ProductionRunBindingsDisclosure.vue.d.ts +25 -0
- package/dist/views/production-run/shared/ui/ProductionRunBindingsList.vue.d.ts +51 -0
- package/dist/views/production-run/shared/ui/ProductionRunCompactBanner.spec.d.ts +1 -0
- package/dist/views/production-run/shared/ui/ProductionRunCompactBanner.vue.d.ts +23 -0
- package/dist/views/production-run/shared/ui/ProductionRunCompactDisclosure.vue.d.ts +25 -0
- package/dist/views/production-run/shared/ui/ProductionRunCostingUnavailable.vue.d.ts +2 -0
- package/dist/views/production-run/shared/ui/ProductionRunDialog.spec.d.ts +1 -0
- package/dist/views/production-run/shared/ui/ProductionRunDialog.vue.d.ts +24 -0
- package/dist/views/production-run/shared/ui/ProductionRunDialogProps.d.ts +15 -0
- package/dist/views/production-run/shared/ui/ProductionRunDialogSurface.vue.d.ts +33 -0
- package/dist/views/production-run/shared/ui/ProductionRunHelpPopover.spec.d.ts +1 -0
- package/dist/views/production-run/shared/ui/ProductionRunHelpPopover.vue.d.ts +67 -0
- package/dist/views/production-run/shared/ui/ProductionRunInfoBadge.spec.d.ts +1 -0
- package/dist/views/production-run/shared/ui/ProductionRunInfoBadge.vue.d.ts +70 -0
- package/dist/views/production-run/shared/ui/ProductionRunInfoText.spec.d.ts +1 -0
- package/dist/views/production-run/shared/ui/ProductionRunInfoText.vue.d.ts +71 -0
- package/dist/views/production-run/shared/ui/ProductionRunNoBindingsHelp.spec.d.ts +1 -0
- package/dist/views/production-run/shared/ui/ProductionRunNoBindingsHelp.vue.d.ts +15 -0
- package/dist/views/production-run/shared/ui/ProductionRunProjectionFeedback.spec.d.ts +1 -0
- package/dist/views/production-run/shared/ui/ProductionRunProjectionFeedback.vue.d.ts +46 -0
- package/dist/views/production-run/shared/ui/ProductionRunScrollHint.spec.d.ts +1 -0
- package/dist/views/production-run/shared/ui/ProductionRunScrollHint.vue.d.ts +31 -0
- package/dist/views/production-run/shared/ui/ProductionRunSelectionCheckbox.vue.d.ts +31 -0
- package/dist/views/production-run/shared/ui/ProductionRunSelectionControls.spec.d.ts +1 -0
- package/dist/views/production-run/shared/ui/ProductionRunSelectionRadio.spec.d.ts +1 -0
- package/dist/views/production-run/shared/ui/ProductionRunSelectionRadio.vue.d.ts +37 -0
- package/dist/views/production-run/shared/ui/ProductionRunSideSheet.spec.d.ts +1 -0
- package/dist/views/production-run/shared/ui/ProductionRunSideSheet.vue.d.ts +77 -0
- package/dist/views/production-run/shared/ui/ProductionRunSideSheetSurface.vue.d.ts +52 -0
- package/dist/views/production-run/shared/ui/ProductionRunStatusBadge.spec.d.ts +1 -0
- package/dist/views/production-run/shared/ui/ProductionRunStatusBadge.vue.d.ts +21 -0
- package/dist/views/production-run/shared/ui/ProductionRunTextLimitLabel.spec.d.ts +1 -0
- package/dist/views/production-run/shared/ui/ProductionRunTextLimitLabel.vue.d.ts +23 -0
- package/dist/views/production-run/shared/ui/ProductionRunTextarea.spec.d.ts +1 -0
- package/dist/views/production-run/shared/ui/ProductionRunTextarea.vue.d.ts +62 -0
- package/dist/views/production-run/shared/ui/ProductionRunUnitInput.spec.d.ts +1 -0
- package/dist/views/production-run/shared/ui/ProductionRunUnitInput.vue.d.ts +34 -0
- package/dist/views/production-run/shared/ui/production-run-info.types.d.ts +11 -0
- package/dist/views/production-run/shared/ui/use-production-run-disclosure.d.ts +15 -0
- package/dist/views/production-run/shared/ui/use-production-run-disclosure.spec.d.ts +1 -0
- package/dist/views/production-run/shared/ui/use-production-run-modal-a11y.d.ts +17 -0
- package/dist/views/production-run/shared/ui/use-production-run-modal-a11y.spec.d.ts +1 -0
- package/dist/views/production-run/shared/ui/use-production-run-scroll-hint.d.ts +9 -0
- package/dist/views/production-run/test-support/production-run.fixture.d.ts +88 -0
- package/dist/views/production-run/test-support/production-run.fixture.spec.d.ts +1 -0
- package/dist/views/production-run/tests/contracts/ProductionRunLoadBannerContract.spec.d.ts +1 -0
- package/dist/views/production-run/tests/contracts/production-run-deduction-parity.spec.d.ts +1 -0
- package/dist/views/production-run/tests/contracts/production-run-typography-contract.spec.d.ts +1 -0
- package/dist/views/receive-request/composables/use-receive-request-form.d.ts +3 -3
- package/dist/views/receive-request-bulk/composables/use-bulk-receive-request-form.d.ts +3 -3
- package/dist/views/stock/components/dialog/AdjustedItemForm.vue.d.ts +12 -8
- package/dist/views/stock/components/dialog/AmendAdjustmentForm.vue.d.ts +2 -0
- package/dist/{vue-i18n-DLckaDV3.js → vue-i18n-DLJI5tIS.js} +395 -395
- package/dist/{xlsx.util-BjqUaVU_.js → xlsx.util-CZOxuAL-.js} +2 -2
- package/package.json +5 -4
- package/dist/ChangeLocationComponent.vue_vue_type_script_setup_true_lang-D6ehNvzX.js +0 -130
- package/dist/FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-BpACpi1j.js +0 -120
- package/dist/ProductionView-Cg8tXEj7.js +0 -1441
- package/dist/api/production.d.ts +0 -30
- package/dist/views/production/ProductionDetailSheet.vue.d.ts +0 -42
- package/dist/views/production/ProductionDuplicateDialog.vue.d.ts +0 -282
- package/dist/views/production/ProductionPrepareBuilder.vue.d.ts +0 -282
- /package/dist/views/{production/ProductionView.vue.d.ts → production-run/ProductionRunPreparePrintView.vue.d.ts} +0 -0
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
import { defineComponent as pe, createBlock as te, openBlock as j, withCtx as M, createElementVNode as e, toDisplayString as
|
|
1
|
+
import { defineComponent as pe, createBlock as te, openBlock as j, withCtx as M, createElementVNode as e, toDisplayString as f, unref as s, ref as Y, h as be, computed as T, watch as Fe, resolveComponent as D, isRef as Pe, createVNode as _, createElementBlock as q, Fragment as ue, renderList as ve, createCommentVNode as se, normalizeClass as He, reactive as _t, mergeModels as nt, useModel as jt, onMounted as qe, createTextVNode as me, normalizeStyle as kt, watchEffect as Vt, renderSlot as st, onUnmounted as Ct, Teleport as Bt, normalizeProps as at, mergeProps as ze } from "vue";
|
|
2
2
|
import { u as Dt, _ as Mt } from "./SingleColumnLayout.vue_vue_type_script_setup_true_lang-DpwneGOV.js";
|
|
3
|
-
import { u as Se, c as Re, a as Ne, F as rt, t as It, E as ie, s as Ht, d as Tt, B as Et, w as ne, h as Ce, i as lt, e as it, L as ge, M as Be } from "./app-
|
|
4
|
-
import { u as Oe } from "./stock-
|
|
3
|
+
import { u as Se, c as Re, a as Ne, F as rt, t as It, E as ie, s as Ht, d as Tt, B as Et, w as ne, h as Ce, i as lt, e as it, L as ge, M as Be } from "./app-CNKD3vjZ.js";
|
|
4
|
+
import { u as Oe } from "./stock-BgGttjDF.js";
|
|
5
5
|
import { c as Ut } from "./component-BmLAdDiY.js";
|
|
6
|
-
import { _ as ht, o as Pt } from "./UnitDisplayControl.vue_vue_type_script_setup_true_lang-
|
|
7
|
-
import { _ as Ke, S as Ge, g as bt, a as Rt } from "./SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-
|
|
6
|
+
import { _ as ht, o as Pt } from "./UnitDisplayControl.vue_vue_type_script_setup_true_lang-D2dmslg4.js";
|
|
7
|
+
import { _ as Ke, S as Ge, g as bt, a as Rt } from "./SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-KlyTPTxq.js";
|
|
8
8
|
import { _ as Nt } from "./PreviewBadge.vue_vue_type_script_setup_true_lang-DX2MJqL4.js";
|
|
9
9
|
import { useI18n as ye, useCoreStore as Xe } from "@feedmepos/mf-common";
|
|
10
|
-
import { u as gt, i as Te, _ as ut } from "./PremiumBadge.vue_vue_type_script_setup_true_lang-
|
|
10
|
+
import { u as gt, i as Te, _ as ut } from "./PremiumBadge.vue_vue_type_script_setup_true_lang-BdqeMPWW.js";
|
|
11
11
|
import { useSnackbar as we, useDialog as Le, useProxiedModel as Ye, useBreakpoints as Ot } from "@feedmepos/ui-library";
|
|
12
12
|
import { defineStore as Lt } from "pinia";
|
|
13
13
|
import { F as Je } from "./FmAdminBadge-DlplQOHb.js";
|
|
14
|
-
import { g as $e, a as he, e as Yt, t as Ee, c as xe, f as zt, h as ct, i as xt, j as Qe, d as Me, k as Gt } from "./number-
|
|
15
|
-
import { u as Ae } from "./stock-
|
|
16
|
-
import { c as Ue, A as Wt, M as Kt, R as qt } from "./rules-
|
|
17
|
-
import { u as Xt } from "./use-inventory-binding-dialog-
|
|
18
|
-
import { a as St } from "./FmMultiselectDialog-
|
|
19
|
-
import { d as ke } from "./dayjs.min-
|
|
20
|
-
import { _ as Jt } from "./NumberPrecisionInput.vue_vue_type_script_setup_true_lang-
|
|
21
|
-
import { g as Qt } from "./decimal-
|
|
22
|
-
import { b as Zt, d as eo, f as wt, t as dt, a as mt, p as to, n as oo, c as no } from "./date2-
|
|
23
|
-
import { i as so } from "./FmDateRangePickerChip.vue_vue_type_script_setup_true_lang-
|
|
14
|
+
import { g as $e, a as he, e as Yt, t as Ee, c as xe, f as zt, h as ct, i as xt, j as Qe, d as Me, k as Gt } from "./number-LQ8tdP_1.js";
|
|
15
|
+
import { u as Ae } from "./stock-AwNCy6xY.js";
|
|
16
|
+
import { c as Ue, A as Wt, M as Kt, R as qt } from "./rules-BdR1TB3v.js";
|
|
17
|
+
import { u as Xt } from "./use-inventory-binding-dialog-lHpBzqDy.js";
|
|
18
|
+
import { a as St } from "./FmMultiselectDialog-CZr-dX4K.js";
|
|
19
|
+
import { d as ke } from "./dayjs.min-DPQzGVmJ.js";
|
|
20
|
+
import { _ as Jt } from "./NumberPrecisionInput.vue_vue_type_script_setup_true_lang-BNsoxRX6.js";
|
|
21
|
+
import { g as Qt } from "./decimal-mk8IRyTq.js";
|
|
22
|
+
import { b as Zt, d as eo, f as wt, t as dt, a as mt, p as to, n as oo, c as no } from "./date2-B00CYgio.js";
|
|
23
|
+
import { i as so } from "./FmDateRangePickerChip.vue_vue_type_script_setup_true_lang-Vn94NCmp.js";
|
|
24
24
|
import { _ as ao } from "./empty-placeholder-B0QU467o.js";
|
|
25
|
-
import { F as _e } from "./inventory-core-dart.default-
|
|
26
|
-
import { u as ro } from "./feature-
|
|
27
|
-
import { u as At } from "./useHrmPermission-
|
|
25
|
+
import { F as _e } from "./inventory-core-dart.default-CSFkzl91.js";
|
|
26
|
+
import { u as ro } from "./feature-fzePklTK.js";
|
|
27
|
+
import { u as At } from "./useHrmPermission-DScCpS0P.js";
|
|
28
28
|
import { _ as lo, F as ft } from "./TableActionableRow.vue_vue_type_script_setup_true_lang-DAMpuZ1X.js";
|
|
29
|
-
import { _ as io } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-
|
|
30
|
-
import { u as uo } from "./useSseClient-
|
|
31
|
-
import { u as co } from "./netsuite-
|
|
29
|
+
import { _ as io } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-DAFZz6rG.js";
|
|
30
|
+
import { u as uo } from "./useSseClient-BPR5sQ_S.js";
|
|
31
|
+
import { u as co } from "./netsuite-yzjEuV4c.js";
|
|
32
32
|
import { P as mo, J as fo } from "./app-C39bYJmq.js";
|
|
33
33
|
var Ie = /* @__PURE__ */ ((A) => (A.History = "History", A.Convert = "Convert", A.Adjust = "Adjust", A))(Ie || {});
|
|
34
34
|
const vo = [
|
|
@@ -60,18 +60,18 @@ const vo = [
|
|
|
60
60
|
], yo = { class: "whitespace-nowrap" }, _o = /* @__PURE__ */ pe({
|
|
61
61
|
__name: "StockHeaderPreview",
|
|
62
62
|
setup(A) {
|
|
63
|
-
const { t:
|
|
63
|
+
const { t: c } = ye();
|
|
64
64
|
return (k, y) => (j(), te(Nt, null, {
|
|
65
65
|
default: M(() => [
|
|
66
|
-
e("div", yo,
|
|
66
|
+
e("div", yo, f(s(c)("inventory.stock.prediction.daysRemaining")), 1)
|
|
67
67
|
]),
|
|
68
68
|
_: 1
|
|
69
69
|
}));
|
|
70
70
|
}
|
|
71
71
|
}), Ft = Lt("stockActions", () => {
|
|
72
|
-
const A = Y(!1),
|
|
72
|
+
const A = Y(!1), c = Se(), k = Oe(), y = gt(), w = we(), V = Le(), { t: d } = ye();
|
|
73
73
|
async function r() {
|
|
74
|
-
if (
|
|
74
|
+
if (c._currentLocation) {
|
|
75
75
|
A.value = !0;
|
|
76
76
|
try {
|
|
77
77
|
await k.readStockBalance(), await k.readProductBalance(), await y.readStockEstimateBalance();
|
|
@@ -134,7 +134,7 @@ const vo = [
|
|
|
134
134
|
};
|
|
135
135
|
a.value = o;
|
|
136
136
|
}
|
|
137
|
-
function
|
|
137
|
+
function v(g, o) {
|
|
138
138
|
const t = Re(o);
|
|
139
139
|
switch (g) {
|
|
140
140
|
case Ie.History:
|
|
@@ -150,7 +150,7 @@ const vo = [
|
|
|
150
150
|
}
|
|
151
151
|
return {
|
|
152
152
|
fetchStockBalance: r,
|
|
153
|
-
onActionMenu:
|
|
153
|
+
onActionMenu: v,
|
|
154
154
|
stockHistoryProps: a,
|
|
155
155
|
showSkuHistory: B,
|
|
156
156
|
convertSkuDialogProps: b,
|
|
@@ -159,7 +159,7 @@ const vo = [
|
|
|
159
159
|
});
|
|
160
160
|
function ko() {
|
|
161
161
|
var V;
|
|
162
|
-
const A = Se(),
|
|
162
|
+
const A = Se(), c = Ft(), k = Xe(), { t: y } = ye();
|
|
163
163
|
return {
|
|
164
164
|
columnDefs: [
|
|
165
165
|
{
|
|
@@ -215,8 +215,8 @@ function ko() {
|
|
|
215
215
|
enableSorting: !0,
|
|
216
216
|
sortUndefined: "last",
|
|
217
217
|
cell(d) {
|
|
218
|
-
var B,
|
|
219
|
-
const r = d.row.original.day, b = d.row.original.operator, R = (B = d.row.original.thresholds) == null ? void 0 : B.low, C = (
|
|
218
|
+
var B, v;
|
|
219
|
+
const r = d.row.original.day, b = d.row.original.operator, R = (B = d.row.original.thresholds) == null ? void 0 : B.low, C = (v = d.row.original.thresholds) == null ? void 0 : v.mid;
|
|
220
220
|
if (typeof r != "number" || typeof R != "number" || typeof C != "number")
|
|
221
221
|
return be(Ke, {
|
|
222
222
|
days: r,
|
|
@@ -236,7 +236,7 @@ function ko() {
|
|
|
236
236
|
var r;
|
|
237
237
|
return Ut(
|
|
238
238
|
((r = A._currentLocation) == null ? void 0 : r.type) === "restaurant" ? vo : po,
|
|
239
|
-
(b) =>
|
|
239
|
+
(b) => c.onActionMenu(b, d.row.original)
|
|
240
240
|
);
|
|
241
241
|
},
|
|
242
242
|
enableSorting: !1,
|
|
@@ -264,19 +264,19 @@ const ho = {
|
|
|
264
264
|
isInteger(A = "Must be an integer") {
|
|
265
265
|
return this.error ? this : (this.toInt(), isNaN(this.context) && (this.error = A), this);
|
|
266
266
|
},
|
|
267
|
-
min(A,
|
|
267
|
+
min(A, c) {
|
|
268
268
|
if (this.error) return this;
|
|
269
269
|
try {
|
|
270
|
-
typeof this.context == "number" ? +this.context < A && (this.error =
|
|
270
|
+
typeof this.context == "number" ? +this.context < A && (this.error = c ?? `Must be at least ${A}`) : Object.prototype.hasOwnProperty.call(this.context, "length") ? +this.context.length < A && (this.error = c ?? `Must be at least ${A}`) : this.error = "Length cannot be determined";
|
|
271
271
|
} catch {
|
|
272
272
|
this.error = "Length cannot be determined";
|
|
273
273
|
}
|
|
274
274
|
return this;
|
|
275
275
|
},
|
|
276
|
-
max(A,
|
|
276
|
+
max(A, c) {
|
|
277
277
|
if (this.error) return this;
|
|
278
278
|
try {
|
|
279
|
-
typeof this.context == "number" ? +this.context > A && (this.error =
|
|
279
|
+
typeof this.context == "number" ? +this.context > A && (this.error = c ?? `Must be at most ${A}`) : "length" in this.context ? +this.context.length > A && (this.error = c ?? `Must be at most ${A}`) : this.error = "Length cannot be determined";
|
|
280
280
|
} catch {
|
|
281
281
|
this.error = "Length cannot be determined";
|
|
282
282
|
}
|
|
@@ -294,7 +294,7 @@ const bo = { class: "flex items-center" }, go = { class: "fm-typo-en-title-md-80
|
|
|
294
294
|
show: { type: Boolean }
|
|
295
295
|
},
|
|
296
296
|
emits: ["update:show", "submitted"],
|
|
297
|
-
setup(A, { expose:
|
|
297
|
+
setup(A, { expose: c, emit: k }) {
|
|
298
298
|
const y = A, w = k, V = Xt(), d = Ne(), r = Ae(), b = we(), { t: R } = ye(), C = Y(0), l = Y(null), a = T(() => d.skus), B = T(
|
|
299
299
|
() => {
|
|
300
300
|
var x, F;
|
|
@@ -302,7 +302,7 @@ const bo = { class: "flex items-center" }, go = { class: "fm-typo-en-title-md-80
|
|
|
302
302
|
(G) => G.type === rt.enum.SKU
|
|
303
303
|
);
|
|
304
304
|
}
|
|
305
|
-
),
|
|
305
|
+
), v = T({
|
|
306
306
|
get() {
|
|
307
307
|
return !!l.value;
|
|
308
308
|
},
|
|
@@ -324,9 +324,9 @@ const bo = { class: "flex items-center" }, go = { class: "fm-typo-en-title-md-80
|
|
|
324
324
|
}
|
|
325
325
|
function n(x) {
|
|
326
326
|
var I;
|
|
327
|
-
const F = (I = y.sku.convert) != null && I.measurement ? y.sku.unit.measurements.find((
|
|
327
|
+
const F = (I = y.sku.convert) != null && I.measurement ? y.sku.unit.measurements.find((u) => {
|
|
328
328
|
var h;
|
|
329
|
-
return
|
|
329
|
+
return u.id === ((h = y.sku.convert) == null ? void 0 : h.measurement);
|
|
330
330
|
}) ?? null : null, G = $e(y.sku.unit, F), H = zt(+x);
|
|
331
331
|
return vt(H).isInteger().max(G).error ? "Precision cannot be more than " + G : !0;
|
|
332
332
|
}
|
|
@@ -348,24 +348,24 @@ const bo = { class: "flex items-center" }, go = { class: "fm-typo-en-title-md-80
|
|
|
348
348
|
}).inventoryBindings.filter((I) => "success" in I && I.success).map((I) => I).map((I) => I.binding);
|
|
349
349
|
return (J = l.value ?? F) == null ? void 0 : J.map((I) => {
|
|
350
350
|
var ee, ae, Q, W, oe;
|
|
351
|
-
const
|
|
351
|
+
const u = d.skus.find((le) => le._id === I.id), h = ((ee = I.measurement) == null ? void 0 : ee.abbrev) ?? ((ae = u == null ? void 0 : u.unit) == null ? void 0 : ae.abbrev), p = (Q = y.sku.convert) != null && Q.measurement ? y.sku.unit.measurements.find((le) => {
|
|
352
352
|
var ce;
|
|
353
353
|
return le.id === ((ce = y.sku.convert) == null ? void 0 : ce.measurement);
|
|
354
|
-
}) ?? null : null,
|
|
354
|
+
}) ?? null : null, m = $e(y.sku.unit, p), i = n(`${C.value}`) === !0 ? he(
|
|
355
355
|
Yt(
|
|
356
356
|
I.amount,
|
|
357
|
-
Ee(+C.value,
|
|
357
|
+
Ee(+C.value, m)
|
|
358
358
|
),
|
|
359
359
|
!1
|
|
360
|
-
) : "0", S = (oe = (W = l.value) == null ? void 0 : W.find((le) => le.id === (
|
|
360
|
+
) : "0", S = (oe = (W = l.value) == null ? void 0 : W.find((le) => le.id === (u == null ? void 0 : u._id))) == null ? void 0 : oe.amount, P = S ? he(S, !1) : null;
|
|
361
361
|
return {
|
|
362
|
-
sku:
|
|
362
|
+
sku: u,
|
|
363
363
|
convertAmount: P ?? i,
|
|
364
364
|
abbrev: h
|
|
365
365
|
};
|
|
366
366
|
});
|
|
367
367
|
}), N = Y();
|
|
368
|
-
|
|
368
|
+
c({
|
|
369
369
|
validateInputs: () => {
|
|
370
370
|
var x, F;
|
|
371
371
|
(F = (x = N.value) == null ? void 0 : x.validateInputs) == null || F.call(x);
|
|
@@ -432,8 +432,8 @@ const bo = { class: "flex items-center" }, go = { class: "fm-typo-en-title-md-80
|
|
|
432
432
|
else {
|
|
433
433
|
const J = a.value.find((I) => I._id === x);
|
|
434
434
|
H = G.map((I) => {
|
|
435
|
-
var
|
|
436
|
-
return I.id !== x || (I.measurement = (h = (
|
|
435
|
+
var u, h;
|
|
436
|
+
return I.id !== x || (I.measurement = (h = (u = J == null ? void 0 : J.unit) == null ? void 0 : u.measurements) == null ? void 0 : h.find((p) => p.id === F)), I;
|
|
437
437
|
}) ?? [];
|
|
438
438
|
}
|
|
439
439
|
l.value = H;
|
|
@@ -459,8 +459,8 @@ const bo = { class: "flex items-center" }, go = { class: "fm-typo-en-title-md-80
|
|
|
459
459
|
x || (l.value = null, C.value = 0);
|
|
460
460
|
}
|
|
461
461
|
), (x, F) => {
|
|
462
|
-
const G = D("FmTextField"), H = D("FmForm"), J = D("FmCard"), I = D("FmSwitch"),
|
|
463
|
-
return j(), te(
|
|
462
|
+
const G = D("FmTextField"), H = D("FmForm"), J = D("FmCard"), I = D("FmSwitch"), u = D("FmFormGroup"), h = D("FmSelect"), p = D("FmButton"), m = D("FmSideSheet");
|
|
463
|
+
return j(), te(m, {
|
|
464
464
|
"dismiss-away": "",
|
|
465
465
|
modelValue: s(O),
|
|
466
466
|
"onUpdate:modelValue": F[3] || (F[3] = (i) => Pe(O) ? O.value = i : null),
|
|
@@ -468,7 +468,7 @@ const bo = { class: "flex items-center" }, go = { class: "fm-typo-en-title-md-80
|
|
|
468
468
|
}, {
|
|
469
469
|
"side-sheet-header": M(() => [
|
|
470
470
|
e("div", bo, [
|
|
471
|
-
e("div", go,
|
|
471
|
+
e("div", go, f(s(R)("inventory.stock.convert.title", { name: x.sku.name })), 1)
|
|
472
472
|
])
|
|
473
473
|
]),
|
|
474
474
|
default: M(() => [
|
|
@@ -497,15 +497,15 @@ const bo = { class: "flex items-center" }, go = { class: "fm-typo-en-title-md-80
|
|
|
497
497
|
}, {
|
|
498
498
|
default: M(() => [
|
|
499
499
|
e("div", So, [
|
|
500
|
-
e("div", wo,
|
|
500
|
+
e("div", wo, f(s(R)("inventory.stock.convert.deductionSummary")), 1),
|
|
501
501
|
(j(!0), q(ue, null, ve(E.value, (i) => {
|
|
502
502
|
var S, P;
|
|
503
503
|
return j(), q("div", {
|
|
504
504
|
key: (S = i.sku) == null ? void 0 : S._id,
|
|
505
505
|
class: "flex items-center"
|
|
506
506
|
}, [
|
|
507
|
-
e("div", Ao,
|
|
508
|
-
e("div", Fo, " -" +
|
|
507
|
+
e("div", Ao, f((P = i.sku) == null ? void 0 : P.name), 1),
|
|
508
|
+
e("div", Fo, " -" + f(i.convertAmount) + " " + f(i.abbrev), 1)
|
|
509
509
|
]);
|
|
510
510
|
}), 128))
|
|
511
511
|
])
|
|
@@ -517,19 +517,19 @@ const bo = { class: "flex items-center" }, go = { class: "fm-typo-en-title-md-80
|
|
|
517
517
|
e("div", $o, [
|
|
518
518
|
_(I, {
|
|
519
519
|
value: "",
|
|
520
|
-
modelValue:
|
|
521
|
-
"onUpdate:modelValue": F[1] || (F[1] = (i) =>
|
|
520
|
+
modelValue: v.value,
|
|
521
|
+
"onUpdate:modelValue": F[1] || (F[1] = (i) => v.value = i),
|
|
522
522
|
label: s(R)("inventory.stock.convert.overrideDeduction"),
|
|
523
523
|
"label-placement": "right"
|
|
524
524
|
}, null, 8, ["modelValue", "label"]),
|
|
525
|
-
|
|
526
|
-
_(
|
|
525
|
+
v.value ? (j(), q(ue, { key: 0 }, [
|
|
526
|
+
_(u, {
|
|
527
527
|
modelValue: l.value,
|
|
528
528
|
rules: [s(Wt)(1, "Must have at least one ingredient binding")]
|
|
529
529
|
}, null, 8, ["modelValue", "rules"]),
|
|
530
530
|
e("div", jo, [
|
|
531
|
-
e("div", Vo,
|
|
532
|
-
(j(!0), q(ue, null, ve(l.value, (i) => (j(), te(
|
|
531
|
+
e("div", Vo, f(s(R)("inventory.stock.convert.ingredients")), 1),
|
|
532
|
+
(j(!0), q(ue, null, ve(l.value, (i) => (j(), te(u, {
|
|
533
533
|
key: i.id,
|
|
534
534
|
disabled: g.value,
|
|
535
535
|
modelValue: +s(he)(i.amount ?? { amount: 1, precision: 0 }),
|
|
@@ -545,7 +545,7 @@ const bo = { class: "flex items-center" }, go = { class: "fm-typo-en-title-md-80
|
|
|
545
545
|
var P, ee, ae;
|
|
546
546
|
return [
|
|
547
547
|
e("div", Co, [
|
|
548
|
-
e("div", Bo,
|
|
548
|
+
e("div", Bo, f((P = a.value.find((Q) => Q._id === i.id)) == null ? void 0 : P.name), 1),
|
|
549
549
|
_(G, {
|
|
550
550
|
class: "xs:col-span-2",
|
|
551
551
|
disabled: g.value,
|
|
@@ -566,7 +566,7 @@ const bo = { class: "flex items-center" }, go = { class: "fm-typo-en-title-md-80
|
|
|
566
566
|
"helper-text": M(() => F[4] || (F[4] = [])),
|
|
567
567
|
_: 2
|
|
568
568
|
}, 1032, ["disabled", "items", "model-value", "onUpdate:modelValue", "invalid"]),
|
|
569
|
-
_(
|
|
569
|
+
_(p, {
|
|
570
570
|
disabled: g.value,
|
|
571
571
|
type: "button",
|
|
572
572
|
variant: "tertiary",
|
|
@@ -580,7 +580,7 @@ const bo = { class: "flex items-center" }, go = { class: "fm-typo-en-title-md-80
|
|
|
580
580
|
}, 1032, ["disabled", "modelValue", "rules"]))), 128))
|
|
581
581
|
]),
|
|
582
582
|
e("div", null, [
|
|
583
|
-
_(
|
|
583
|
+
_(p, {
|
|
584
584
|
icon: "link",
|
|
585
585
|
label: s(R)("inventory.stock.convert.linkIngredient"),
|
|
586
586
|
variant: "plain",
|
|
@@ -596,7 +596,7 @@ const bo = { class: "flex items-center" }, go = { class: "fm-typo-en-title-md-80
|
|
|
596
596
|
]),
|
|
597
597
|
"side-sheet-footer": M(() => [
|
|
598
598
|
e("div", Do, [
|
|
599
|
-
_(
|
|
599
|
+
_(p, {
|
|
600
600
|
loading: g.value,
|
|
601
601
|
label: s(R)("inventory.stock.convert.convertButton"),
|
|
602
602
|
onClick: F[2] || (F[2] = (i) => {
|
|
@@ -611,12 +611,12 @@ const bo = { class: "flex items-center" }, go = { class: "fm-typo-en-title-md-80
|
|
|
611
611
|
};
|
|
612
612
|
}
|
|
613
613
|
});
|
|
614
|
-
function De(A,
|
|
615
|
-
const k = Ee(A,
|
|
614
|
+
function De(A, c) {
|
|
615
|
+
const k = Ee(A, c);
|
|
616
616
|
return { ...k, amount: -k.amount };
|
|
617
617
|
}
|
|
618
|
-
function pt(A,
|
|
619
|
-
return Ee(Math.abs(A),
|
|
618
|
+
function pt(A, c) {
|
|
619
|
+
return Ee(Math.abs(A), c);
|
|
620
620
|
}
|
|
621
621
|
const We = {
|
|
622
622
|
[ie.enum.DAMAGE]: {
|
|
@@ -654,8 +654,8 @@ const We = {
|
|
|
654
654
|
isBackdate: { type: Boolean }
|
|
655
655
|
},
|
|
656
656
|
emits: ["update:modelValue", "click:delete"],
|
|
657
|
-
setup(A, { emit:
|
|
658
|
-
const k = A, y =
|
|
657
|
+
setup(A, { emit: c }) {
|
|
658
|
+
const k = A, y = c, { t: w } = ye(), V = Oe(), d = T(
|
|
659
659
|
() => Object.keys(We).map((t) => ({
|
|
660
660
|
label: Ht(t),
|
|
661
661
|
value: t
|
|
@@ -718,10 +718,10 @@ const We = {
|
|
|
718
718
|
}), B = T(() => {
|
|
719
719
|
const t = k.modelValue.amount, n = k.modelValue.measurement;
|
|
720
720
|
return n ? xt(t, n.conversion) : t;
|
|
721
|
-
}),
|
|
721
|
+
}), v = T(
|
|
722
722
|
() => k.isBackdate ? a.value : Qe(a.value, B.value)
|
|
723
723
|
), g = T(
|
|
724
|
-
() => Qt(
|
|
724
|
+
() => Qt(v.value, k.modelValue.doc.unit)
|
|
725
725
|
), o = T(
|
|
726
726
|
() => !k.isBackdate && B.value.amount < 0
|
|
727
727
|
);
|
|
@@ -734,8 +734,8 @@ const We = {
|
|
|
734
734
|
default: M(() => [
|
|
735
735
|
e("div", Io, [
|
|
736
736
|
e("div", Ho, [
|
|
737
|
-
e("div", To,
|
|
738
|
-
e("div", Eo,
|
|
737
|
+
e("div", To, f(t.modelValue.doc.name), 1),
|
|
738
|
+
e("div", Eo, f(t.modelValue.doc.code), 1)
|
|
739
739
|
]),
|
|
740
740
|
_($, {
|
|
741
741
|
variant: "tertiary",
|
|
@@ -780,11 +780,11 @@ const We = {
|
|
|
780
780
|
"label-mark": "optional"
|
|
781
781
|
}, null, 8, ["disabled", "modelValue"]),
|
|
782
782
|
e("div", Uo, [
|
|
783
|
-
e("div", Po,
|
|
783
|
+
e("div", Po, f(s(w)("inventory.stock.stock_adjustment.stockAfter")), 1),
|
|
784
784
|
e("div", {
|
|
785
785
|
class: He(["fm-typo-en-body-lg-600", o.value ? "text-red-700" : "text-green-700"])
|
|
786
|
-
},
|
|
787
|
-
t.isBackdate ? (j(), q("div", Ro,
|
|
786
|
+
}, f(g.value), 3),
|
|
787
|
+
t.isBackdate ? (j(), q("div", Ro, f(s(w)("inventory.stock.stock_adjustment.backdatePreviewWarning")), 1)) : se("", !0)
|
|
788
788
|
])
|
|
789
789
|
]),
|
|
790
790
|
_: 1
|
|
@@ -798,13 +798,13 @@ const We = {
|
|
|
798
798
|
show: { type: Boolean }
|
|
799
799
|
},
|
|
800
800
|
emits: ["update:show", "submitted"],
|
|
801
|
-
setup(A, { expose:
|
|
801
|
+
setup(A, { expose: c, emit: k }) {
|
|
802
802
|
const y = A, w = k, V = Ne(), d = Le(), r = Ae(), b = we(), R = Y(!1), { t: C } = ye();
|
|
803
803
|
function l() {
|
|
804
|
-
g(Re(
|
|
804
|
+
g(Re(v));
|
|
805
805
|
}
|
|
806
806
|
const a = Y();
|
|
807
|
-
|
|
807
|
+
c({
|
|
808
808
|
validateInputs: () => {
|
|
809
809
|
var n, $;
|
|
810
810
|
($ = (n = a.value) == null ? void 0 : n.validateInputs) == null || $.call(n);
|
|
@@ -818,7 +818,7 @@ const We = {
|
|
|
818
818
|
($ = (n = a.value) == null ? void 0 : n.resetInputs) == null || $.call(n);
|
|
819
819
|
}
|
|
820
820
|
});
|
|
821
|
-
const B = Ye(y, "show"),
|
|
821
|
+
const B = Ye(y, "show"), v = _t({
|
|
822
822
|
remark: "",
|
|
823
823
|
adjustments: [
|
|
824
824
|
{
|
|
@@ -832,7 +832,7 @@ const We = {
|
|
|
832
832
|
]
|
|
833
833
|
});
|
|
834
834
|
Fe([() => y.show], ([n]) => {
|
|
835
|
-
n && (
|
|
835
|
+
n && (v.remark = "", v.adjustments = [
|
|
836
836
|
{
|
|
837
837
|
id: `sku_${(/* @__PURE__ */ new Date()).toISOString()}_${Math.random().toString(16).slice(2, 8)}`,
|
|
838
838
|
type: ie.enum.PURCHASE,
|
|
@@ -872,7 +872,7 @@ const We = {
|
|
|
872
872
|
label: E.name,
|
|
873
873
|
sublabel: E.code,
|
|
874
874
|
value: E._id
|
|
875
|
-
})), $ = n.filter((E) =>
|
|
875
|
+
})), $ = n.filter((E) => v.adjustments.find((N) => N.doc._id === E.value)).map((E) => E.value);
|
|
876
876
|
d.open({
|
|
877
877
|
title: "Select ingredients",
|
|
878
878
|
contentComponent: St,
|
|
@@ -893,8 +893,8 @@ const We = {
|
|
|
893
893
|
variant: "tertiary"
|
|
894
894
|
}
|
|
895
895
|
}).onPrimary((E) => {
|
|
896
|
-
|
|
897
|
-
(N) =>
|
|
896
|
+
v.adjustments = E.map(
|
|
897
|
+
(N) => v.adjustments.find((O) => O.doc._id === N) ?? {
|
|
898
898
|
id: `sku_${(/* @__PURE__ */ new Date()).toISOString()}_${Math.random().toString(16).slice(2, 8)}`,
|
|
899
899
|
type: ie.enum.PURCHASE,
|
|
900
900
|
doc: V.skus.find((O) => O._id === N),
|
|
@@ -906,7 +906,7 @@ const We = {
|
|
|
906
906
|
});
|
|
907
907
|
}
|
|
908
908
|
function t(n) {
|
|
909
|
-
|
|
909
|
+
v.adjustments.splice(n, 1);
|
|
910
910
|
}
|
|
911
911
|
return (n, $) => {
|
|
912
912
|
const E = D("FmTextarea"), N = D("FmButton"), O = D("FmForm"), L = D("FmSideSheet");
|
|
@@ -918,7 +918,7 @@ const We = {
|
|
|
918
918
|
}, {
|
|
919
919
|
"side-sheet-header": M(() => [
|
|
920
920
|
e("div", No, [
|
|
921
|
-
e("div", Oo,
|
|
921
|
+
e("div", Oo, f(s(C)("inventory.stock.adjust.title")), 1)
|
|
922
922
|
])
|
|
923
923
|
]),
|
|
924
924
|
default: M(() => [
|
|
@@ -931,11 +931,11 @@ const We = {
|
|
|
931
931
|
default: M(() => [
|
|
932
932
|
_(E, {
|
|
933
933
|
label: s(C)("inventory.stock.adjust.remark"),
|
|
934
|
-
modelValue:
|
|
935
|
-
"onUpdate:modelValue": $[0] || ($[0] = (X) =>
|
|
934
|
+
modelValue: v.remark,
|
|
935
|
+
"onUpdate:modelValue": $[0] || ($[0] = (X) => v.remark = X)
|
|
936
936
|
}, null, 8, ["label", "modelValue"]),
|
|
937
937
|
e("div", Lo, [
|
|
938
|
-
e("div", Yo,
|
|
938
|
+
e("div", Yo, f(s(C)("inventory.stock.adjust.adjustedItems")), 1),
|
|
939
939
|
_(N, {
|
|
940
940
|
"prepend-icon": "add",
|
|
941
941
|
variant: "tertiary",
|
|
@@ -943,10 +943,10 @@ const We = {
|
|
|
943
943
|
onClick: o
|
|
944
944
|
})
|
|
945
945
|
]),
|
|
946
|
-
(j(!0), q(ue, null, ve(
|
|
946
|
+
(j(!0), q(ue, null, ve(v.adjustments, (X, z) => (j(), te($t, {
|
|
947
947
|
key: X.id,
|
|
948
|
-
modelValue:
|
|
949
|
-
"onUpdate:modelValue": (K) =>
|
|
948
|
+
modelValue: v.adjustments[z],
|
|
949
|
+
"onUpdate:modelValue": (K) => v.adjustments[z] = K,
|
|
950
950
|
"onClick:delete": (K) => t(z)
|
|
951
951
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "onClick:delete"]))), 128))
|
|
952
952
|
]),
|
|
@@ -978,22 +978,22 @@ const We = {
|
|
|
978
978
|
show: { type: Boolean }
|
|
979
979
|
},
|
|
980
980
|
emits: ["update:show", "submitted"],
|
|
981
|
-
setup(A, { emit:
|
|
982
|
-
const k = A, y =
|
|
981
|
+
setup(A, { emit: c }) {
|
|
982
|
+
const k = A, y = c, { t: w } = ye(), V = Ne(), d = Ae(), r = Le(), b = we(), R = Ye(k, "show"), C = Y(!1), l = _t({
|
|
983
983
|
remark: "",
|
|
984
984
|
effectiveAt: /* @__PURE__ */ new Date(),
|
|
985
985
|
adjustments: []
|
|
986
|
-
}), a = Y(!1), B = Y(ke().format("YYYY-MM-DD")),
|
|
987
|
-
Fe([B,
|
|
988
|
-
if (B.value &&
|
|
989
|
-
const K = ke(`${B.value} ${
|
|
986
|
+
}), a = Y(!1), B = Y(ke().format("YYYY-MM-DD")), v = Y(ke().format("HH:mm")), g = Y();
|
|
987
|
+
Fe([B, v], () => {
|
|
988
|
+
if (B.value && v.value) {
|
|
989
|
+
const K = ke(`${B.value} ${v.value}`, "YYYY-MM-DD HH:mm");
|
|
990
990
|
K.isValid() && (l.effectiveAt = K.toDate());
|
|
991
991
|
}
|
|
992
992
|
});
|
|
993
|
-
const o = T(() => `${B.value} ${
|
|
993
|
+
const o = T(() => `${B.value} ${v.value}`);
|
|
994
994
|
function t() {
|
|
995
995
|
if (!a.value) return !0;
|
|
996
|
-
const K = ke(`${B.value} ${
|
|
996
|
+
const K = ke(`${B.value} ${v.value}`, "YYYY-MM-DD HH:mm");
|
|
997
997
|
if (!K.isValid()) return w("inventory.stock.stock_adjustment.invalidDateTime");
|
|
998
998
|
const U = ke();
|
|
999
999
|
if (K.isAfter(U))
|
|
@@ -1003,7 +1003,7 @@ const We = {
|
|
|
1003
1003
|
}
|
|
1004
1004
|
const n = T(() => [() => t()]), $ = T(() => l.adjustments.length === 0 || t() !== !0);
|
|
1005
1005
|
function E() {
|
|
1006
|
-
l.remark = "", l.effectiveAt = /* @__PURE__ */ new Date(), l.adjustments = [], a.value = !1, B.value = ke(l.effectiveAt).format("YYYY-MM-DD"),
|
|
1006
|
+
l.remark = "", l.effectiveAt = /* @__PURE__ */ new Date(), l.adjustments = [], a.value = !1, B.value = ke(l.effectiveAt).format("YYYY-MM-DD"), v.value = ke(l.effectiveAt).format("HH:mm");
|
|
1007
1007
|
}
|
|
1008
1008
|
function N() {
|
|
1009
1009
|
E();
|
|
@@ -1096,14 +1096,14 @@ const We = {
|
|
|
1096
1096
|
const Z = D("FmTextarea"), re = D("FmSwitch"), x = D("FmDatePicker"), F = D("FmTimePicker"), G = D("FmFormGroup"), H = D("FmButton"), J = D("FmForm"), I = D("FmSideSheet");
|
|
1097
1097
|
return j(), te(I, {
|
|
1098
1098
|
modelValue: s(R),
|
|
1099
|
-
"onUpdate:modelValue": U[6] || (U[6] = (
|
|
1099
|
+
"onUpdate:modelValue": U[6] || (U[6] = (u) => Pe(R) ? R.value = u : null),
|
|
1100
1100
|
"dismiss-away": "",
|
|
1101
1101
|
"max-width": 560,
|
|
1102
1102
|
onAfterEnter: N
|
|
1103
1103
|
}, {
|
|
1104
1104
|
"side-sheet-header": M(() => [
|
|
1105
1105
|
e("div", Wo, [
|
|
1106
|
-
e("div", Ko,
|
|
1106
|
+
e("div", Ko, f(s(w)("inventory.stock.stock_adjustment.title")), 1)
|
|
1107
1107
|
])
|
|
1108
1108
|
]),
|
|
1109
1109
|
default: M(() => [
|
|
@@ -1117,33 +1117,33 @@ const We = {
|
|
|
1117
1117
|
_(Z, {
|
|
1118
1118
|
label: s(w)("inventory.stock.adjust.remark"),
|
|
1119
1119
|
modelValue: l.remark,
|
|
1120
|
-
"onUpdate:modelValue": U[0] || (U[0] = (
|
|
1120
|
+
"onUpdate:modelValue": U[0] || (U[0] = (u) => l.remark = u),
|
|
1121
1121
|
"label-mark": "optional"
|
|
1122
1122
|
}, null, 8, ["label", "modelValue"]),
|
|
1123
1123
|
_(re, {
|
|
1124
1124
|
value: "",
|
|
1125
1125
|
"model-value": a.value,
|
|
1126
|
-
"onUpdate:modelValue": U[1] || (U[1] = (
|
|
1126
|
+
"onUpdate:modelValue": U[1] || (U[1] = (u) => a.value = u),
|
|
1127
1127
|
label: s(w)("inventory.stock.stock_adjustment.backdateLabel"),
|
|
1128
1128
|
sublabel: s(w)("inventory.stock.stock_adjustment.backdateSublabel"),
|
|
1129
1129
|
labelPlacement: "right"
|
|
1130
1130
|
}, null, 8, ["model-value", "label", "sublabel"]),
|
|
1131
1131
|
a.value ? (j(), q("div", qo, [
|
|
1132
|
-
e("label", Xo,
|
|
1132
|
+
e("label", Xo, f(s(w)("inventory.stock.stock_adjustment.effectiveAt")), 1),
|
|
1133
1133
|
e("div", Jo, [
|
|
1134
1134
|
e("div", Qo, [
|
|
1135
1135
|
_(x, {
|
|
1136
1136
|
class: "w-full",
|
|
1137
1137
|
modelValue: B.value,
|
|
1138
|
-
"onUpdate:modelValue": U[2] || (U[2] = (
|
|
1138
|
+
"onUpdate:modelValue": U[2] || (U[2] = (u) => B.value = u),
|
|
1139
1139
|
clearable: !1
|
|
1140
1140
|
}, null, 8, ["modelValue"])
|
|
1141
1141
|
]),
|
|
1142
1142
|
e("div", Zo, [
|
|
1143
1143
|
_(F, {
|
|
1144
1144
|
class: "w-full",
|
|
1145
|
-
modelValue:
|
|
1146
|
-
"onUpdate:modelValue": U[3] || (U[3] = (
|
|
1145
|
+
modelValue: v.value,
|
|
1146
|
+
"onUpdate:modelValue": U[3] || (U[3] = (u) => v.value = u),
|
|
1147
1147
|
format: "HH:mm"
|
|
1148
1148
|
}, null, 8, ["modelValue"])
|
|
1149
1149
|
])
|
|
@@ -1152,10 +1152,10 @@ const We = {
|
|
|
1152
1152
|
"model-value": o.value,
|
|
1153
1153
|
rules: n.value
|
|
1154
1154
|
}, null, 8, ["model-value", "rules"]),
|
|
1155
|
-
e("div", en,
|
|
1155
|
+
e("div", en, f(s(w)("inventory.stock.stock_adjustment.immediateHint")), 1)
|
|
1156
1156
|
])) : se("", !0),
|
|
1157
1157
|
e("div", tn, [
|
|
1158
|
-
e("div", on,
|
|
1158
|
+
e("div", on, f(s(w)("inventory.stock.adjust.adjustedItems")), 1),
|
|
1159
1159
|
_(H, {
|
|
1160
1160
|
"prepend-icon": "add",
|
|
1161
1161
|
variant: "tertiary",
|
|
@@ -1163,12 +1163,12 @@ const We = {
|
|
|
1163
1163
|
onClick: L
|
|
1164
1164
|
})
|
|
1165
1165
|
]),
|
|
1166
|
-
(j(!0), q(ue, null, ve(l.adjustments, (
|
|
1167
|
-
key:
|
|
1166
|
+
(j(!0), q(ue, null, ve(l.adjustments, (u, h) => (j(), te($t, {
|
|
1167
|
+
key: u.doc._id,
|
|
1168
1168
|
modelValue: l.adjustments[h],
|
|
1169
|
-
"onUpdate:modelValue": (
|
|
1169
|
+
"onUpdate:modelValue": (p) => l.adjustments[h] = p,
|
|
1170
1170
|
"is-backdate": a.value,
|
|
1171
|
-
"onClick:delete": (
|
|
1171
|
+
"onClick:delete": (p) => X(h)
|
|
1172
1172
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "is-backdate", "onClick:delete"]))), 128))
|
|
1173
1173
|
]),
|
|
1174
1174
|
_: 1
|
|
@@ -1180,15 +1180,15 @@ const We = {
|
|
|
1180
1180
|
label: s(w)("common.confirm"),
|
|
1181
1181
|
loading: C.value,
|
|
1182
1182
|
disabled: $.value,
|
|
1183
|
-
onClick: U[4] || (U[4] = (
|
|
1184
|
-
var h,
|
|
1185
|
-
return (
|
|
1183
|
+
onClick: U[4] || (U[4] = (u) => {
|
|
1184
|
+
var h, p;
|
|
1185
|
+
return (p = (h = g.value) == null ? void 0 : h.validateInputs) == null ? void 0 : p.call(h);
|
|
1186
1186
|
})
|
|
1187
1187
|
}, null, 8, ["label", "loading", "disabled"]),
|
|
1188
1188
|
_(H, {
|
|
1189
1189
|
label: s(w)("common.close"),
|
|
1190
1190
|
variant: "tertiary",
|
|
1191
|
-
onClick: U[5] || (U[5] = (
|
|
1191
|
+
onClick: U[5] || (U[5] = (u) => y("update:show", !1))
|
|
1192
1192
|
}, null, 8, ["label"])
|
|
1193
1193
|
])
|
|
1194
1194
|
]),
|
|
@@ -1196,7 +1196,7 @@ const We = {
|
|
|
1196
1196
|
}, 8, ["modelValue"]);
|
|
1197
1197
|
};
|
|
1198
1198
|
}
|
|
1199
|
-
}), an = Tt((A,
|
|
1199
|
+
}), an = Tt((A, c) => ({
|
|
1200
1200
|
// TODO: remove once latest inventory backend has been push
|
|
1201
1201
|
async findBillsByBusinessId(k, y, w) {
|
|
1202
1202
|
const V = `${A.businessesBackendUrl}/${k}/reports/find-many`, d = {
|
|
@@ -1205,13 +1205,13 @@ const We = {
|
|
|
1205
1205
|
restaurantIds: y,
|
|
1206
1206
|
ids: w
|
|
1207
1207
|
};
|
|
1208
|
-
return await
|
|
1208
|
+
return await c.post(V, d);
|
|
1209
1209
|
},
|
|
1210
1210
|
async findBillsById(k) {
|
|
1211
1211
|
const w = Se().currentLocationDBName, V = `${A.inventoryBackendUrl}/${w}/bill/search`, d = {
|
|
1212
1212
|
ids: k
|
|
1213
1213
|
};
|
|
1214
|
-
return await
|
|
1214
|
+
return await c.post(V, d);
|
|
1215
1215
|
}
|
|
1216
1216
|
})), rn = {
|
|
1217
1217
|
key: 0,
|
|
@@ -1225,8 +1225,8 @@ const We = {
|
|
|
1225
1225
|
modelModifiers: {}
|
|
1226
1226
|
}),
|
|
1227
1227
|
emits: /* @__PURE__ */ nt(["refreshHistory"], ["update:modelValue"]),
|
|
1228
|
-
setup(A, { emit:
|
|
1229
|
-
const k = A, y =
|
|
1228
|
+
setup(A, { emit: c }) {
|
|
1229
|
+
const k = A, y = c, w = Ae(), V = jt(A, "modelValue"), d = Y(!1), r = Y(!1), b = Y(!1), R = Y({
|
|
1230
1230
|
_id: `inventoryAdjustment_${(/* @__PURE__ */ new Date()).toISOString()}_XXXXX`,
|
|
1231
1231
|
skus: []
|
|
1232
1232
|
}), C = Y();
|
|
@@ -1278,7 +1278,7 @@ const We = {
|
|
|
1278
1278
|
const n = Number(_e.toFormatString({ value: o }));
|
|
1279
1279
|
return t ? Math.abs(n) : n;
|
|
1280
1280
|
}
|
|
1281
|
-
function
|
|
1281
|
+
function v(o, t) {
|
|
1282
1282
|
return t.measurement ? t.measurement.abbrev : o.sku.unit.abbrev;
|
|
1283
1283
|
}
|
|
1284
1284
|
function g(o, t) {
|
|
@@ -1351,7 +1351,7 @@ const We = {
|
|
|
1351
1351
|
e("p", ln, [
|
|
1352
1352
|
t[6] || (t[6] = e("b", null, "Date:", -1)),
|
|
1353
1353
|
t[7] || (t[7] = e("br", null, null, -1)),
|
|
1354
|
-
me(" " +
|
|
1354
|
+
me(" " + f(s(Zt)(s(Et)(R.value._id))), 1)
|
|
1355
1355
|
]),
|
|
1356
1356
|
e("div", un, [
|
|
1357
1357
|
(j(!0), q(ue, null, ve(R.value.skus, (z, K) => (j(), q(ue, { key: K }, [
|
|
@@ -1362,17 +1362,17 @@ const We = {
|
|
|
1362
1362
|
}, {
|
|
1363
1363
|
default: M(() => [
|
|
1364
1364
|
e("div", cn, [
|
|
1365
|
-
e("span", dn,
|
|
1366
|
-
e("span", null,
|
|
1365
|
+
e("span", dn, f(z.sku.code), 1),
|
|
1366
|
+
e("span", null, f(z.sku.name), 1)
|
|
1367
1367
|
]),
|
|
1368
1368
|
t[12] || (t[12] = e("hr", { class: "m-2" }, null, -1)),
|
|
1369
1369
|
e("div", mn, [
|
|
1370
1370
|
t[8] || (t[8] = e("span", { class: "fm-typo-en-body-lg-600" }, "Adjustment type:", -1)),
|
|
1371
|
-
e("span", null,
|
|
1371
|
+
e("span", null, f(U.type), 1)
|
|
1372
1372
|
]),
|
|
1373
1373
|
e("div", fn, [
|
|
1374
1374
|
t[9] || (t[9] = e("span", { class: "fm-typo-en-body-lg-600" }, "Current amount:", -1)),
|
|
1375
|
-
e("span", null,
|
|
1375
|
+
e("span", null, f(s(_e).toFormatString({ value: U.amount })) + " " + f(v(z, U)), 1)
|
|
1376
1376
|
]),
|
|
1377
1377
|
_($, {
|
|
1378
1378
|
"max-fraction-digits": s($e)(z.sku.unit),
|
|
@@ -1389,7 +1389,7 @@ const We = {
|
|
|
1389
1389
|
class: "mb-3",
|
|
1390
1390
|
label: "Adjust Amount (Leave 0 to skip)",
|
|
1391
1391
|
"helper-text": `Max: ${B(U.amount)}`,
|
|
1392
|
-
"append-text":
|
|
1392
|
+
"append-text": v(z, U),
|
|
1393
1393
|
rules: [
|
|
1394
1394
|
(re) => re <= B(U.amount) || `Cannot be more than ${B(U.amount)}`,
|
|
1395
1395
|
s(Ue)(-1)
|
|
@@ -1398,7 +1398,7 @@ const We = {
|
|
|
1398
1398
|
e("div", vn, [
|
|
1399
1399
|
t[10] || (t[10] = e("span", { class: "fm-typo-en-body-lg-600" }, "Amount after amend:", -1)),
|
|
1400
1400
|
t[11] || (t[11] = e("span", { class: "text-fm-color-system-warning-400 fm-typo-en-body-sm-400" }, "* It's an estimate for your reference, as it didn't include all the reversals related to this adjustment", -1)),
|
|
1401
|
-
me(" " +
|
|
1401
|
+
me(" " + f(g(
|
|
1402
1402
|
U.amount,
|
|
1403
1403
|
s(_e).fromNumber(
|
|
1404
1404
|
a({
|
|
@@ -1407,7 +1407,7 @@ const We = {
|
|
|
1407
1407
|
unit: z.sku.unit
|
|
1408
1408
|
}).value
|
|
1409
1409
|
)
|
|
1410
|
-
)) + " " +
|
|
1410
|
+
)) + " " + f(v(z, U)), 1)
|
|
1411
1411
|
])
|
|
1412
1412
|
]),
|
|
1413
1413
|
_: 2
|
|
@@ -1447,12 +1447,12 @@ const We = {
|
|
|
1447
1447
|
costMechanism: { default: "adjustment" }
|
|
1448
1448
|
},
|
|
1449
1449
|
setup(A) {
|
|
1450
|
-
const
|
|
1450
|
+
const c = A;
|
|
1451
1451
|
function k(C, l) {
|
|
1452
|
-
if (
|
|
1452
|
+
if (c.costMechanism === "adjustment")
|
|
1453
1453
|
return null;
|
|
1454
|
-
const a =
|
|
1455
|
-
(g) => g.mechanism ===
|
|
1454
|
+
const a = c.unitCostHistory.filter(
|
|
1455
|
+
(g) => g.mechanism === c.costMechanism && g.skuId === c.sku._id
|
|
1456
1456
|
);
|
|
1457
1457
|
if (a.length === 0) return null;
|
|
1458
1458
|
const B = a.find((g) => {
|
|
@@ -1460,8 +1460,8 @@ const We = {
|
|
|
1460
1460
|
return (o == null ? void 0 : o.adjustmentId) === C;
|
|
1461
1461
|
});
|
|
1462
1462
|
if (B) return B.cost;
|
|
1463
|
-
const
|
|
1464
|
-
return
|
|
1463
|
+
const v = [...a].filter((g) => new Date(g.snapshotAt) <= new Date(l)).sort((g, o) => new Date(o.snapshotAt).getTime() - new Date(g.snapshotAt).getTime());
|
|
1464
|
+
return v.length > 0 ? v[0].cost : null;
|
|
1465
1465
|
}
|
|
1466
1466
|
const y = Y(!1), w = Y(), V = Y(null), d = T(() => V.value === null ? "unset" : y.value ? `${V.value}px` : "0px");
|
|
1467
1467
|
qe(() => {
|
|
@@ -1470,11 +1470,11 @@ const We = {
|
|
|
1470
1470
|
});
|
|
1471
1471
|
const r = T(() => {
|
|
1472
1472
|
var g;
|
|
1473
|
-
const C =
|
|
1473
|
+
const C = c.record.adjustments, l = c.sku, a = {}, v = C.flatMap((o) => {
|
|
1474
1474
|
var t;
|
|
1475
1475
|
return ((t = o.skus) == null ? void 0 : t.filter((n) => n.sku._id === l._id)) ?? [];
|
|
1476
1476
|
}).flatMap((o) => o.amounts);
|
|
1477
|
-
for (const o of
|
|
1477
|
+
for (const o of v) {
|
|
1478
1478
|
const t = o.measurement ? xt(o.measurement.conversion, o.amount) : o.amount;
|
|
1479
1479
|
a[g = o.type] ?? (a[g] = { amount: 0, precision: 0 }), a[o.type] = Qe(t, a[o.type]);
|
|
1480
1480
|
}
|
|
@@ -1486,12 +1486,12 @@ const We = {
|
|
|
1486
1486
|
})} ${l.unit.abbrev}`, o),
|
|
1487
1487
|
{}
|
|
1488
1488
|
);
|
|
1489
|
-
}), { t: b } = ye(), R = T(() =>
|
|
1489
|
+
}), { t: b } = ye(), R = T(() => c.record.adjustmentsByTime.map(({ date: C, adjustments: l }) => ({
|
|
1490
1490
|
time: eo(new Date(C)),
|
|
1491
1491
|
adjustments: l.flatMap(
|
|
1492
1492
|
(a) => {
|
|
1493
|
-
var B,
|
|
1494
|
-
return ((
|
|
1493
|
+
var B, v;
|
|
1494
|
+
return ((v = (B = a.skus) == null ? void 0 : B.map) == null ? void 0 : v.call(B, (g) => {
|
|
1495
1495
|
var o, t;
|
|
1496
1496
|
return {
|
|
1497
1497
|
...g,
|
|
@@ -1508,7 +1508,7 @@ const We = {
|
|
|
1508
1508
|
}
|
|
1509
1509
|
).flatMap((a) => {
|
|
1510
1510
|
var t;
|
|
1511
|
-
const B = (t =
|
|
1511
|
+
const B = (t = c.bills.find((n) => n._id === a.ref)) == null ? void 0 : t.seqNumber, v = B ? b("inventory.stock.record.bill", [B]) : "", g = a.adjustmentTime ?? (/* @__PURE__ */ new Date()).toISOString(), o = k(a.adjustmentId, g);
|
|
1512
1512
|
return (a.amounts || []).filter((n) => n != null).map((n) => {
|
|
1513
1513
|
var N;
|
|
1514
1514
|
let $ = n.cost;
|
|
@@ -1523,11 +1523,11 @@ const We = {
|
|
|
1523
1523
|
};
|
|
1524
1524
|
}
|
|
1525
1525
|
let E = "";
|
|
1526
|
-
return
|
|
1526
|
+
return v ? E = n.remark || "" : E = [a.adjustmentRemark, n.remark].filter((L) => L).join("/"), {
|
|
1527
1527
|
amount: `${ne.toFormatString({ value: n.amount, precision: 4 })} ${((N = n.measurement) == null ? void 0 : N.abbrev) ?? a.sku.unit.abbrev}`,
|
|
1528
1528
|
backdateFrom: a.backdateFrom,
|
|
1529
1529
|
name: n.type,
|
|
1530
|
-
billRemark:
|
|
1530
|
+
billRemark: v,
|
|
1531
1531
|
remark: E,
|
|
1532
1532
|
reason: a.reason || "",
|
|
1533
1533
|
cost: $,
|
|
@@ -1543,15 +1543,15 @@ const We = {
|
|
|
1543
1543
|
})
|
|
1544
1544
|
})));
|
|
1545
1545
|
return (C, l) => {
|
|
1546
|
-
const a = D("FmIcon"), B = D("FmTooltip"),
|
|
1547
|
-
return j(), te(
|
|
1546
|
+
const a = D("FmIcon"), B = D("FmTooltip"), v = D("FmCard");
|
|
1547
|
+
return j(), te(v, { variant: "outlined" }, {
|
|
1548
1548
|
default: M(() => [
|
|
1549
1549
|
e("div", kn, [
|
|
1550
1550
|
e("div", {
|
|
1551
1551
|
class: "flex items-center cursor-pointer mb-1",
|
|
1552
1552
|
onClick: l[0] || (l[0] = (g) => y.value = !y.value)
|
|
1553
1553
|
}, [
|
|
1554
|
-
e("div", hn,
|
|
1554
|
+
e("div", hn, f(C.record.date), 1),
|
|
1555
1555
|
_(a, {
|
|
1556
1556
|
name: y.value ? "expand_more" : "expand_less",
|
|
1557
1557
|
color: "#777777",
|
|
@@ -1563,14 +1563,14 @@ const We = {
|
|
|
1563
1563
|
class: "flex flex-row py-1",
|
|
1564
1564
|
style: { "font-size": "0.8rem" }
|
|
1565
1565
|
}, [
|
|
1566
|
-
e("div", bn,
|
|
1566
|
+
e("div", bn, f(s(b)(`inventory.inventoryAdjustment.type.${o}`)), 1),
|
|
1567
1567
|
e("div", {
|
|
1568
1568
|
class: He({
|
|
1569
1569
|
"text-fm-color-typo-error": g.startsWith("-"),
|
|
1570
1570
|
"text-fm-color-typo-success": !g.startsWith("-"),
|
|
1571
1571
|
"ml-auto": !0
|
|
1572
1572
|
})
|
|
1573
|
-
},
|
|
1573
|
+
}, f(g), 3)
|
|
1574
1574
|
]))), 128)),
|
|
1575
1575
|
e("div", {
|
|
1576
1576
|
ref_key: "detailRef",
|
|
@@ -1587,7 +1587,7 @@ const We = {
|
|
|
1587
1587
|
key: g.time,
|
|
1588
1588
|
class: "flex gap-1 w-full"
|
|
1589
1589
|
}, [
|
|
1590
|
-
e("div", xn,
|
|
1590
|
+
e("div", xn, f(g.time), 1),
|
|
1591
1591
|
e("div", Sn, [
|
|
1592
1592
|
(j(!0), q(ue, null, ve(g.adjustments, (o) => {
|
|
1593
1593
|
var t;
|
|
@@ -1596,7 +1596,7 @@ const We = {
|
|
|
1596
1596
|
class: "flex gap-1"
|
|
1597
1597
|
}, [
|
|
1598
1598
|
e("div", wn, [
|
|
1599
|
-
me(
|
|
1599
|
+
me(f(s(b)(`inventory.inventoryAdjustment.type.${o.name}`)) + " ", 1),
|
|
1600
1600
|
o.backdateFrom ? (j(), te(B, {
|
|
1601
1601
|
key: 0,
|
|
1602
1602
|
variant: "plain",
|
|
@@ -1604,7 +1604,7 @@ const We = {
|
|
|
1604
1604
|
"z-index": 50
|
|
1605
1605
|
}, {
|
|
1606
1606
|
content: M(() => [
|
|
1607
|
-
e("div", An,
|
|
1607
|
+
e("div", An, f(s(b)("inventory.stock.record.backdate", [
|
|
1608
1608
|
s(wt)(new Date(o.backdateFrom))
|
|
1609
1609
|
])), 1)
|
|
1610
1610
|
]),
|
|
@@ -1617,10 +1617,10 @@ const We = {
|
|
|
1617
1617
|
]),
|
|
1618
1618
|
_: 2
|
|
1619
1619
|
}, 1024)) : se("", !0),
|
|
1620
|
-
o.billRemark ? (j(), q("span", Fn, " # " +
|
|
1621
|
-
o.billRemark && o.remark ? (j(), q("span", $n, " (" +
|
|
1622
|
-
!o.billRemark && o.reason ? (j(), q("span", jn, " (" +
|
|
1623
|
-
!o.billRemark && o.remark ? (j(), q("span", Vn, " # " +
|
|
1620
|
+
o.billRemark ? (j(), q("span", Fn, " # " + f(o.billRemark), 1)) : se("", !0),
|
|
1621
|
+
o.billRemark && o.remark ? (j(), q("span", $n, " (" + f(o.remark) + ") ", 1)) : se("", !0),
|
|
1622
|
+
!o.billRemark && o.reason ? (j(), q("span", jn, " (" + f(o.reason) + ") ", 1)) : se("", !0),
|
|
1623
|
+
!o.billRemark && o.remark ? (j(), q("span", Vn, " # " + f(o.remark), 1)) : se("", !0),
|
|
1624
1624
|
(t = o.createdBy) != null && t.name ? (j(), te(B, {
|
|
1625
1625
|
key: 5,
|
|
1626
1626
|
variant: "plain",
|
|
@@ -1628,7 +1628,7 @@ const We = {
|
|
|
1628
1628
|
"z-index": 50
|
|
1629
1629
|
}, {
|
|
1630
1630
|
content: M(() => [
|
|
1631
|
-
me(
|
|
1631
|
+
me(f(s(b)("inventory.stock.record.createdBy", [o.createdBy.name])), 1)
|
|
1632
1632
|
]),
|
|
1633
1633
|
default: M(() => [
|
|
1634
1634
|
e("span", Cn, [
|
|
@@ -1637,12 +1637,12 @@ const We = {
|
|
|
1637
1637
|
size: "sm",
|
|
1638
1638
|
color: "primary"
|
|
1639
1639
|
}),
|
|
1640
|
-
me(" " +
|
|
1640
|
+
me(" " + f(o.createdBy.name), 1)
|
|
1641
1641
|
])
|
|
1642
1642
|
]),
|
|
1643
1643
|
_: 2
|
|
1644
1644
|
}, 1024)) : se("", !0),
|
|
1645
|
-
o.name === s(ie).Enum.CLOSING ? (j(), q("span", Bn, " Actual Balance: " +
|
|
1645
|
+
o.name === s(ie).Enum.CLOSING ? (j(), q("span", Bn, " Actual Balance: " + f(o.toBalance) + " " + f(o.baseUnit), 1)) : se("", !0)
|
|
1646
1646
|
]),
|
|
1647
1647
|
e("div", {
|
|
1648
1648
|
class: He({
|
|
@@ -1650,13 +1650,13 @@ const We = {
|
|
|
1650
1650
|
"text-fm-color-typo-success": !o.amount.startsWith("-"),
|
|
1651
1651
|
"ml-auto": !0
|
|
1652
1652
|
})
|
|
1653
|
-
},
|
|
1653
|
+
}, f(o.amount), 3),
|
|
1654
1654
|
o.name === s(ie).Enum.WASTAGE ? (j(), te(_n, {
|
|
1655
1655
|
key: 0,
|
|
1656
1656
|
adjustmentId: o.adjustmentId,
|
|
1657
1657
|
onRefreshHistory: l[1] || (l[1] = (n) => C.$emit("refreshHistory"))
|
|
1658
1658
|
}, null, 8, ["adjustmentId"])) : se("", !0),
|
|
1659
|
-
o.cost ? (j(), q("div", Dn, " (" +
|
|
1659
|
+
o.cost ? (j(), q("div", Dn, " (" + f(s(Me)(o.cost, !1, o.cost.precision)) + ") ", 1)) : se("", !0)
|
|
1660
1660
|
]);
|
|
1661
1661
|
}), 128))
|
|
1662
1662
|
])
|
|
@@ -1669,20 +1669,20 @@ const We = {
|
|
|
1669
1669
|
};
|
|
1670
1670
|
}
|
|
1671
1671
|
});
|
|
1672
|
-
function In(A,
|
|
1672
|
+
function In(A, c) {
|
|
1673
1673
|
var V;
|
|
1674
1674
|
const k = Object.keys(ie.enum).reduce(
|
|
1675
1675
|
(d, r) => (d[r] = { amount: 0, precision: 0 }, d),
|
|
1676
1676
|
{}
|
|
1677
1677
|
);
|
|
1678
|
-
if (!
|
|
1678
|
+
if (!c)
|
|
1679
1679
|
return Object.entries(k).reduce(
|
|
1680
1680
|
(d, [r]) => (d[r] = ne.fromNumber(0), d),
|
|
1681
1681
|
{}
|
|
1682
1682
|
);
|
|
1683
1683
|
const w = A.flatMap((d) => {
|
|
1684
1684
|
var r;
|
|
1685
|
-
return ((r = d.skus) == null ? void 0 : r.filter((b) => b.sku._id ===
|
|
1685
|
+
return ((r = d.skus) == null ? void 0 : r.filter((b) => b.sku._id === c._id)) ?? [];
|
|
1686
1686
|
}).flatMap((d) => d.amounts);
|
|
1687
1687
|
for (const d of w) {
|
|
1688
1688
|
const r = d.measurement ? ne.multiply([d.measurement.conversion, d.amount]) : d.amount;
|
|
@@ -1698,18 +1698,18 @@ function In(A, u) {
|
|
|
1698
1698
|
`${ne.toFormatString({
|
|
1699
1699
|
value: R,
|
|
1700
1700
|
precision: 4
|
|
1701
|
-
})} ${
|
|
1701
|
+
})} ${c.unit.abbrev}`, d;
|
|
1702
1702
|
},
|
|
1703
1703
|
{}
|
|
1704
1704
|
);
|
|
1705
1705
|
}
|
|
1706
|
-
function Hn(A,
|
|
1707
|
-
if (!
|
|
1706
|
+
function Hn(A, c) {
|
|
1707
|
+
if (!c)
|
|
1708
1708
|
return null;
|
|
1709
1709
|
let k = null;
|
|
1710
1710
|
const w = A.flatMap((V) => {
|
|
1711
1711
|
var d;
|
|
1712
|
-
return ((d = V.skus) == null ? void 0 : d.filter((r) => r.sku._id ===
|
|
1712
|
+
return ((d = V.skus) == null ? void 0 : d.filter((r) => r.sku._id === c._id)) ?? [];
|
|
1713
1713
|
}).flatMap((V) => {
|
|
1714
1714
|
var d;
|
|
1715
1715
|
return !V.history || ((d = V.history) == null ? void 0 : d.length) === 0 ? [] : V.history[0];
|
|
@@ -1726,7 +1726,7 @@ function Hn(A, u) {
|
|
|
1726
1726
|
return k != null ? (k.amount = Math.abs(k.amount), `${ne.toFormatString({
|
|
1727
1727
|
value: k,
|
|
1728
1728
|
precision: 4
|
|
1729
|
-
})} ${
|
|
1729
|
+
})} ${c.unit.abbrev}`) : null;
|
|
1730
1730
|
}
|
|
1731
1731
|
const Tn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, En = { class: "flex-1 line-clamp-2" }, Un = { class: "flex flex-col gap-32 w-full h-full" }, Pn = { class: "flex items-center relative gap-4" }, Rn = { class: "flex-1" }, Nn = {
|
|
1732
1732
|
key: 0,
|
|
@@ -1751,226 +1751,226 @@ const Tn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, En = {
|
|
|
1751
1751
|
},
|
|
1752
1752
|
emits: ["update:show"],
|
|
1753
1753
|
setup(A) {
|
|
1754
|
-
const
|
|
1754
|
+
const c = Xe(), k = Oe(), y = Ae(), w = an(), V = Se(), d = ro(), { t: r } = ye(), b = A, R = Y(!1), C = we(), l = Y("adjustment"), a = Y([
|
|
1755
1755
|
{ label: "Adjustment (Default)", value: "adjustment" }
|
|
1756
|
-
]), B = Y([]),
|
|
1756
|
+
]), B = Y([]), v = Y(so(0));
|
|
1757
1757
|
async function g() {
|
|
1758
1758
|
R.value = !0;
|
|
1759
1759
|
try {
|
|
1760
1760
|
await N(), await k.readStockBalance();
|
|
1761
|
-
} catch (
|
|
1761
|
+
} catch (u) {
|
|
1762
1762
|
C.open({
|
|
1763
1763
|
title: "Something went wrong",
|
|
1764
1764
|
message: "Cannot fetch stock history. Please try again.",
|
|
1765
1765
|
type: "error"
|
|
1766
|
-
}), console.log("failed at fetching item adjustment history", b.sku,
|
|
1766
|
+
}), console.log("failed at fetching item adjustment history", b.sku, v, u);
|
|
1767
1767
|
} finally {
|
|
1768
1768
|
R.value = !1;
|
|
1769
1769
|
}
|
|
1770
1770
|
}
|
|
1771
1771
|
qe(() => {
|
|
1772
1772
|
g();
|
|
1773
|
-
}), Fe([() =>
|
|
1773
|
+
}), Fe([() => v.value, () => b.sku], () => {
|
|
1774
1774
|
g();
|
|
1775
1775
|
});
|
|
1776
1776
|
const o = Y([]), t = Y([]), n = Y(new Array());
|
|
1777
|
-
function $(
|
|
1778
|
-
return h === "day" ? no(
|
|
1777
|
+
function $(u, h) {
|
|
1778
|
+
return h === "day" ? no(u) : wt(u);
|
|
1779
1779
|
}
|
|
1780
|
-
function E(
|
|
1781
|
-
const
|
|
1782
|
-
(
|
|
1780
|
+
function E(u, h) {
|
|
1781
|
+
const p = u.reduce(
|
|
1782
|
+
(m, i) => {
|
|
1783
1783
|
const S = i.effectiveAt ?? Te(i._id);
|
|
1784
1784
|
if (!S)
|
|
1785
|
-
return
|
|
1785
|
+
return m;
|
|
1786
1786
|
const P = $(new Date(S), h);
|
|
1787
|
-
return
|
|
1787
|
+
return m[P] ?? (m[P] = []), m[P].push(i), m;
|
|
1788
1788
|
},
|
|
1789
1789
|
{}
|
|
1790
1790
|
);
|
|
1791
|
-
return Object.keys(
|
|
1792
|
-
date:
|
|
1793
|
-
adjustments:
|
|
1791
|
+
return Object.keys(p).map((m) => ({
|
|
1792
|
+
date: m,
|
|
1793
|
+
adjustments: p[m]
|
|
1794
1794
|
}));
|
|
1795
1795
|
}
|
|
1796
1796
|
async function N() {
|
|
1797
|
-
let
|
|
1797
|
+
let u = await y.readStockAdjustment(
|
|
1798
1798
|
b.sku._id,
|
|
1799
|
-
dt(new Date(
|
|
1800
|
-
mt(new Date(
|
|
1799
|
+
dt(new Date(v.value.startDate)).toISOString(),
|
|
1800
|
+
mt(new Date(v.value.endDate)).toISOString()
|
|
1801
1801
|
);
|
|
1802
|
-
o.value =
|
|
1803
|
-
const h =
|
|
1804
|
-
await O(h), t.value = E(
|
|
1805
|
-
date:
|
|
1806
|
-
adjustments:
|
|
1807
|
-
adjustmentsByTime: E(
|
|
1802
|
+
o.value = u;
|
|
1803
|
+
const h = u.filter(({ ref: p }) => p == null ? void 0 : p.startsWith("bill_")).map(({ ref: p }) => p);
|
|
1804
|
+
await O(h), t.value = E(u, "day").map(({ date: p, adjustments: m }) => ({
|
|
1805
|
+
date: p,
|
|
1806
|
+
adjustments: m,
|
|
1807
|
+
adjustmentsByTime: E(m, "minute")
|
|
1808
1808
|
}));
|
|
1809
1809
|
try {
|
|
1810
|
-
const
|
|
1810
|
+
const p = await y.readUnitCostHistory(
|
|
1811
1811
|
b.sku._id,
|
|
1812
|
-
dt(new Date(
|
|
1813
|
-
mt(new Date(
|
|
1812
|
+
dt(new Date(v.value.startDate)).toISOString(),
|
|
1813
|
+
mt(new Date(v.value.endDate)).toISOString()
|
|
1814
1814
|
);
|
|
1815
|
-
B.value =
|
|
1816
|
-
const
|
|
1817
|
-
|
|
1818
|
-
|
|
1815
|
+
B.value = p;
|
|
1816
|
+
const m = /* @__PURE__ */ new Set();
|
|
1817
|
+
p.forEach((S) => {
|
|
1818
|
+
m.add(S.mechanism);
|
|
1819
1819
|
});
|
|
1820
1820
|
const i = [{ label: "Default", value: "adjustment" }];
|
|
1821
|
-
|
|
1821
|
+
m.has(ge.Enum.weightedAverage) && i.push({
|
|
1822
1822
|
label: "Weighted Average (Beta)",
|
|
1823
1823
|
value: ge.Enum.weightedAverage
|
|
1824
|
-
}),
|
|
1824
|
+
}), m.has(ge.Enum.netsuite) && i.push({ label: "NetSuite (Beta)", value: ge.Enum.netsuite }), m.has(ge.Enum["netsuite-average"]) && i.push({
|
|
1825
1825
|
label: "NetSuite Average (Beta)",
|
|
1826
1826
|
value: ge.Enum["netsuite-average"]
|
|
1827
|
-
}), a.value = i, !
|
|
1828
|
-
} catch (
|
|
1829
|
-
console.error("Failed to fetch unit cost history:",
|
|
1827
|
+
}), a.value = i, !m.has(l.value) && l.value !== "adjustment" && (l.value = "adjustment");
|
|
1828
|
+
} catch (p) {
|
|
1829
|
+
console.error("Failed to fetch unit cost history:", p);
|
|
1830
1830
|
}
|
|
1831
1831
|
}
|
|
1832
|
-
async function O(
|
|
1833
|
-
|
|
1832
|
+
async function O(u) {
|
|
1833
|
+
u.length && (n.value = await w.findBillsById(u).catch((h) => {
|
|
1834
1834
|
var i;
|
|
1835
1835
|
console.error("Error on using latest bill API, retrying using legacy api", h);
|
|
1836
|
-
const
|
|
1837
|
-
return w.findBillsByBusinessId(
|
|
1836
|
+
const p = ((i = c.currentBusiness.value) == null ? void 0 : i._id) ?? "", m = V.currentLocation.doc._id;
|
|
1837
|
+
return w.findBillsByBusinessId(p, [m], u);
|
|
1838
1838
|
}));
|
|
1839
1839
|
}
|
|
1840
1840
|
const L = T(() => {
|
|
1841
|
-
const
|
|
1842
|
-
return In(
|
|
1841
|
+
const u = o.value, h = b.sku;
|
|
1842
|
+
return In(u, h);
|
|
1843
1843
|
}), X = T(() => {
|
|
1844
|
-
const
|
|
1845
|
-
return Hn(
|
|
1844
|
+
const u = o.value, h = b.sku;
|
|
1845
|
+
return Hn(u, h);
|
|
1846
1846
|
}), z = T(() => {
|
|
1847
|
-
const
|
|
1847
|
+
const u = [...o.value].computeFirst((p) => {
|
|
1848
1848
|
var i, S;
|
|
1849
|
-
const
|
|
1850
|
-
return
|
|
1849
|
+
const m = (S = (i = p.skus) == null ? void 0 : i.find) == null ? void 0 : S.call(i, (P) => P.sku._id === b.sku._id);
|
|
1850
|
+
return m == null ? void 0 : m.fromBalance;
|
|
1851
1851
|
}) ?? {
|
|
1852
1852
|
amount: 0,
|
|
1853
1853
|
precision: 0
|
|
1854
1854
|
}, h = b.sku;
|
|
1855
1855
|
return h ? `${ne.toFormatString({
|
|
1856
|
-
value:
|
|
1856
|
+
value: u,
|
|
1857
1857
|
precision: 4
|
|
1858
1858
|
})} ${h.unit.abbrev}` : "";
|
|
1859
1859
|
}), K = T(() => {
|
|
1860
|
-
const
|
|
1860
|
+
const u = [...o.value].reverse().computeFirst((p) => {
|
|
1861
1861
|
var i, S;
|
|
1862
|
-
const
|
|
1863
|
-
return
|
|
1862
|
+
const m = (S = (i = p.skus) == null ? void 0 : i.find) == null ? void 0 : S.call(i, (P) => P.sku._id === b.sku._id);
|
|
1863
|
+
return m == null ? void 0 : m.toBalance;
|
|
1864
1864
|
}) ?? {
|
|
1865
1865
|
amount: 0,
|
|
1866
1866
|
precision: 0
|
|
1867
1867
|
}, h = b.sku;
|
|
1868
|
-
return h ? `${ne.toFormatString({ value:
|
|
1868
|
+
return h ? `${ne.toFormatString({ value: u, precision: 4 })} ${h.unit.abbrev}` : "";
|
|
1869
1869
|
}), U = T(() => {
|
|
1870
|
-
var
|
|
1871
|
-
const h = o.value.flatMap((
|
|
1870
|
+
var p;
|
|
1871
|
+
const h = o.value.flatMap((m) => {
|
|
1872
1872
|
var i;
|
|
1873
|
-
return ((i =
|
|
1874
|
-
}).filter((
|
|
1875
|
-
(
|
|
1873
|
+
return ((i = m.skus) == null ? void 0 : i.flatMap((S) => S.amounts)) ?? [];
|
|
1874
|
+
}).filter((m) => m.amount.amount < 0).reduce(
|
|
1875
|
+
(m, i) => {
|
|
1876
1876
|
const S = i.cost;
|
|
1877
|
-
if (!S) return
|
|
1877
|
+
if (!S) return m;
|
|
1878
1878
|
const P = {
|
|
1879
|
-
...Gt(
|
|
1879
|
+
...Gt(m, Math.max(m.precision, S.precision)),
|
|
1880
1880
|
currency: S.currency
|
|
1881
1881
|
};
|
|
1882
1882
|
return {
|
|
1883
1883
|
...Qe(P, S),
|
|
1884
|
-
currency:
|
|
1884
|
+
currency: m.currency
|
|
1885
1885
|
};
|
|
1886
1886
|
},
|
|
1887
1887
|
{
|
|
1888
1888
|
amount: 0,
|
|
1889
1889
|
precision: 0,
|
|
1890
|
-
currency: Ce((
|
|
1890
|
+
currency: Ce((p = c.currentCountry) == null ? void 0 : p.value)
|
|
1891
1891
|
}
|
|
1892
1892
|
);
|
|
1893
1893
|
return Me(h, !1, h.precision);
|
|
1894
1894
|
});
|
|
1895
1895
|
function Z() {
|
|
1896
|
-
const { startDate:
|
|
1897
|
-
|
|
1898
|
-
startDate:
|
|
1896
|
+
const { startDate: u, endDate: h } = to(v.value);
|
|
1897
|
+
u !== null && h !== null && (v.value = {
|
|
1898
|
+
startDate: u,
|
|
1899
1899
|
endDate: h
|
|
1900
1900
|
});
|
|
1901
1901
|
}
|
|
1902
1902
|
const re = T(() => r("inventory.ingredient.valuationMethod.WAVG"));
|
|
1903
|
-
function x(
|
|
1903
|
+
function x(u, h) {
|
|
1904
1904
|
if (l.value === "adjustment")
|
|
1905
1905
|
return null;
|
|
1906
|
-
const
|
|
1906
|
+
const p = B.value.filter(
|
|
1907
1907
|
(S) => S.mechanism === l.value && S.skuId === b.sku._id
|
|
1908
1908
|
);
|
|
1909
|
-
if (
|
|
1910
|
-
const
|
|
1909
|
+
if (p.length === 0) return null;
|
|
1910
|
+
const m = p.find((S) => {
|
|
1911
1911
|
const P = S.meta;
|
|
1912
|
-
return (P == null ? void 0 : P.adjustmentId) ===
|
|
1912
|
+
return (P == null ? void 0 : P.adjustmentId) === u;
|
|
1913
1913
|
});
|
|
1914
|
-
if (
|
|
1915
|
-
const i = [...
|
|
1914
|
+
if (m) return m.cost;
|
|
1915
|
+
const i = [...p].filter((S) => new Date(S.snapshotAt) <= new Date(h)).sort((S, P) => new Date(P.snapshotAt).getTime() - new Date(S.snapshotAt).getTime());
|
|
1916
1916
|
return i.length > 0 ? i[0].cost : null;
|
|
1917
1917
|
}
|
|
1918
1918
|
const F = T(() => {
|
|
1919
|
-
var
|
|
1920
|
-
const
|
|
1919
|
+
var m, i, S, P, ee, ae;
|
|
1920
|
+
const u = [...o.value].reverse().find((Q) => {
|
|
1921
1921
|
var W, oe;
|
|
1922
1922
|
return (oe = (W = Q.skus) == null ? void 0 : W.find) == null ? void 0 : oe.call(W, (le) => le.sku._id === b.sku._id);
|
|
1923
1923
|
});
|
|
1924
|
-
if (!
|
|
1925
|
-
const h = (
|
|
1924
|
+
if (!u) return "No data";
|
|
1925
|
+
const h = (m = u.skus) == null ? void 0 : m.find((Q) => Q.sku._id === b.sku._id);
|
|
1926
1926
|
if (!h) return "No data";
|
|
1927
|
-
const
|
|
1927
|
+
const p = h.toBalance;
|
|
1928
1928
|
if (l.value === "adjustment") {
|
|
1929
1929
|
const Q = [...h.amounts].reverse()[0], W = {
|
|
1930
1930
|
amount: ((i = Q.cost) == null ? void 0 : i.amount) ?? 0,
|
|
1931
1931
|
precision: ((S = Q.cost) == null ? void 0 : S.precision) ?? 0
|
|
1932
1932
|
}, oe = Q.amount, le = oe.amount == 0 ? ne.fromNumber(0) : ne.divide([W, oe]);
|
|
1933
1933
|
return {
|
|
1934
|
-
...ne.multiply([le,
|
|
1935
|
-
currency: ((P = Q.cost) == null ? void 0 : P.currency) || Ce(((ee =
|
|
1934
|
+
...ne.multiply([le, p]),
|
|
1935
|
+
currency: ((P = Q.cost) == null ? void 0 : P.currency) || Ce(((ee = c.currentCountry) == null ? void 0 : ee.value) ?? lt)
|
|
1936
1936
|
};
|
|
1937
1937
|
} else {
|
|
1938
|
-
const Q =
|
|
1939
|
-
|
|
1938
|
+
const Q = u.effectiveAt ?? Te(u._id), W = x(
|
|
1939
|
+
u._id,
|
|
1940
1940
|
Q ?? (/* @__PURE__ */ new Date()).toISOString()
|
|
1941
1941
|
);
|
|
1942
1942
|
if (!W) return "No data";
|
|
1943
1943
|
const oe = ne.fromDinero(W);
|
|
1944
1944
|
return {
|
|
1945
|
-
...ne.multiply([oe,
|
|
1946
|
-
currency: W.currency || Ce(((ae =
|
|
1945
|
+
...ne.multiply([oe, p]),
|
|
1946
|
+
currency: W.currency || Ce(((ae = c.currentCountry) == null ? void 0 : ae.value) ?? lt)
|
|
1947
1947
|
};
|
|
1948
1948
|
}
|
|
1949
1949
|
}), G = T(() => {
|
|
1950
|
-
var
|
|
1951
|
-
const
|
|
1950
|
+
var p;
|
|
1951
|
+
const u = [...o.value].reverse().computeFirst((m) => {
|
|
1952
1952
|
var S, P;
|
|
1953
|
-
const i = (P = (S =
|
|
1953
|
+
const i = (P = (S = m.skus) == null ? void 0 : S.find) == null ? void 0 : P.call(S, (ee) => ee.sku._id === b.sku._id);
|
|
1954
1954
|
return i == null ? void 0 : i.toCostBalances;
|
|
1955
1955
|
});
|
|
1956
|
-
return
|
|
1957
|
-
...
|
|
1956
|
+
return !u || u.some((m) => m.cost == null) ? "No data" : {
|
|
1957
|
+
...u.reduce((m, i) => ne.add([m, ne.fromDinero(i.cost)]), {
|
|
1958
1958
|
amount: 0,
|
|
1959
1959
|
precision: 0
|
|
1960
1960
|
}),
|
|
1961
|
-
currency: Ce((
|
|
1962
|
-
}
|
|
1961
|
+
currency: Ce((p = c.currentCountry) == null ? void 0 : p.value)
|
|
1962
|
+
};
|
|
1963
1963
|
}), H = T(() => b.sku.valuation === it.Enum.FIFO ? G.value : F.value);
|
|
1964
1964
|
function J() {
|
|
1965
|
-
const { startDate:
|
|
1966
|
-
|
|
1967
|
-
startDate:
|
|
1965
|
+
const { startDate: u, endDate: h } = oo(v.value);
|
|
1966
|
+
u !== null && h !== null && (v.value = {
|
|
1967
|
+
startDate: u,
|
|
1968
1968
|
endDate: h
|
|
1969
1969
|
});
|
|
1970
1970
|
}
|
|
1971
1971
|
const I = Ye(b, "show");
|
|
1972
|
-
return (
|
|
1973
|
-
const
|
|
1972
|
+
return (u, h) => {
|
|
1973
|
+
const p = D("FmButton"), m = D("FmField"), i = D("FmDateRangePicker"), S = D("FmSpacer"), P = D("FmCircularProgress"), ee = D("FmIcon"), ae = D("FmTooltip"), Q = D("FmMenuDivider"), W = D("FmChip"), oe = D("FmSelect"), le = D("FmCardSection"), ce = D("FmCard"), je = D("FmSideSheet");
|
|
1974
1974
|
return j(), te(je, {
|
|
1975
1975
|
"dismiss-away": "",
|
|
1976
1976
|
modelValue: s(I),
|
|
@@ -1980,8 +1980,8 @@ const Tn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, En = {
|
|
|
1980
1980
|
}, {
|
|
1981
1981
|
"side-sheet-header": M(() => [
|
|
1982
1982
|
e("div", Tn, [
|
|
1983
|
-
e("div", En,
|
|
1984
|
-
_(
|
|
1983
|
+
e("div", En, f(s(r)("inventory.stock.history.title", [u.sku.name])), 1),
|
|
1984
|
+
_(p, {
|
|
1985
1985
|
variant: "tertiary",
|
|
1986
1986
|
"prepend-icon": "close",
|
|
1987
1987
|
onClick: h[0] || (h[0] = (fe) => I.value = !1)
|
|
@@ -1995,20 +1995,20 @@ const Tn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, En = {
|
|
|
1995
1995
|
e("div", Pn, [
|
|
1996
1996
|
e("div", Rn, [
|
|
1997
1997
|
_(i, {
|
|
1998
|
-
modelValue:
|
|
1999
|
-
"onUpdate:modelValue": h[1] || (h[1] = (de) =>
|
|
1998
|
+
modelValue: v.value,
|
|
1999
|
+
"onUpdate:modelValue": h[1] || (h[1] = (de) => v.value = de),
|
|
2000
2000
|
"show-predefined-range": "",
|
|
2001
2001
|
"start-label": "",
|
|
2002
2002
|
"end-label": "",
|
|
2003
2003
|
"z-index": 50
|
|
2004
2004
|
}, {
|
|
2005
2005
|
"trigger-button": M(({ opened: de }) => [
|
|
2006
|
-
_(
|
|
2006
|
+
_(m, {
|
|
2007
2007
|
"prepend-icon": "calendar_month",
|
|
2008
2008
|
focused: de
|
|
2009
2009
|
}, {
|
|
2010
2010
|
default: M(() => [
|
|
2011
|
-
me(
|
|
2011
|
+
me(f(v.value.startDate) + " - " + f(v.value.endDate), 1)
|
|
2012
2012
|
]),
|
|
2013
2013
|
_: 2
|
|
2014
2014
|
}, 1032, ["focused"])
|
|
@@ -2016,12 +2016,12 @@ const Tn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, En = {
|
|
|
2016
2016
|
_: 1
|
|
2017
2017
|
}, 8, ["modelValue"])
|
|
2018
2018
|
]),
|
|
2019
|
-
_(
|
|
2019
|
+
_(p, {
|
|
2020
2020
|
variant: "tertiary",
|
|
2021
2021
|
onClick: h[2] || (h[2] = (de) => Z()),
|
|
2022
2022
|
"prepend-icon": "navigate_before"
|
|
2023
2023
|
}),
|
|
2024
|
-
_(
|
|
2024
|
+
_(p, {
|
|
2025
2025
|
variant: "tertiary",
|
|
2026
2026
|
onClick: h[3] || (h[3] = (de) => J()),
|
|
2027
2027
|
"prepend-icon": "navigate_next"
|
|
@@ -2030,7 +2030,7 @@ const Tn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, En = {
|
|
|
2030
2030
|
R.value ? (j(), q("div", Nn, [
|
|
2031
2031
|
_(S),
|
|
2032
2032
|
_(P, { size: "xl" }),
|
|
2033
|
-
e("div", On,
|
|
2033
|
+
e("div", On, f(s(r)("inventory.stock.history.loading")), 1),
|
|
2034
2034
|
_(S),
|
|
2035
2035
|
_(S)
|
|
2036
2036
|
])) : t.value && ((fe = t.value) == null ? void 0 : fe.length) > 0 ? (j(), q("div", Ln, [
|
|
@@ -2039,16 +2039,16 @@ const Tn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, En = {
|
|
|
2039
2039
|
_(le, { class: "flex flex-col gap-4" }, {
|
|
2040
2040
|
default: M(() => [
|
|
2041
2041
|
e("div", Yn, [
|
|
2042
|
-
e("div", zn,
|
|
2042
|
+
e("div", zn, f(s(r)("inventory.stock.history.summary.title")), 1)
|
|
2043
2043
|
]),
|
|
2044
2044
|
e("div", Gn, [
|
|
2045
2045
|
e("div", Wn, [
|
|
2046
|
-
e("div", Kn,
|
|
2047
|
-
e("div", qn,
|
|
2046
|
+
e("div", Kn, f(s(r)("inventory.stock.history.summary.totalPurchase")), 1),
|
|
2047
|
+
e("div", qn, f(L.value.PURCHASE), 1)
|
|
2048
2048
|
]),
|
|
2049
2049
|
e("div", Xn, [
|
|
2050
2050
|
e("div", Jn, [
|
|
2051
|
-
me(
|
|
2051
|
+
me(f(s(r)("inventory.stock.history.summary.totalSales")) + " ", 1),
|
|
2052
2052
|
X.value != null ? (j(), te(ae, {
|
|
2053
2053
|
key: 0,
|
|
2054
2054
|
variant: "plain",
|
|
@@ -2065,35 +2065,35 @@ const Tn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, En = {
|
|
|
2065
2065
|
_: 1
|
|
2066
2066
|
}, 8, ["content"])) : se("", !0)
|
|
2067
2067
|
]),
|
|
2068
|
-
e("div", Qn,
|
|
2068
|
+
e("div", Qn, f(L.value.SALES), 1)
|
|
2069
2069
|
]),
|
|
2070
2070
|
e("div", Zn, [
|
|
2071
|
-
e("div", es,
|
|
2072
|
-
e("div", ts,
|
|
2071
|
+
e("div", es, f(s(r)("inventory.stock.history.summary.totalLose")), 1),
|
|
2072
|
+
e("div", ts, f(L.value.LOSE), 1)
|
|
2073
2073
|
]),
|
|
2074
2074
|
e("div", os, [
|
|
2075
|
-
e("div", ns,
|
|
2076
|
-
e("div", ss,
|
|
2075
|
+
e("div", ns, f(s(r)("inventory.stock.history.summary.totalRequest")), 1),
|
|
2076
|
+
e("div", ss, f(L.value.REQUEST), 1)
|
|
2077
2077
|
]),
|
|
2078
2078
|
e("div", as, [
|
|
2079
|
-
e("div", rs,
|
|
2080
|
-
e("div", ls,
|
|
2079
|
+
e("div", rs, f(s(r)("inventory.stock.history.summary.totalReceive")), 1),
|
|
2080
|
+
e("div", ls, f(L.value.RECEIVE), 1)
|
|
2081
2081
|
]),
|
|
2082
2082
|
e("div", is, [
|
|
2083
|
-
e("div", us,
|
|
2084
|
-
e("div", cs,
|
|
2083
|
+
e("div", us, f(s(r)("inventory.stock.history.summary.totalConvert")), 1),
|
|
2084
|
+
e("div", cs, f(L.value.CONVERT), 1)
|
|
2085
2085
|
]),
|
|
2086
2086
|
e("div", ds, [
|
|
2087
|
-
e("div", ms,
|
|
2088
|
-
e("div", fs,
|
|
2087
|
+
e("div", ms, f(s(r)("inventory.stock.history.summary.totalDamage")), 1),
|
|
2088
|
+
e("div", fs, f(L.value.DAMAGE), 1)
|
|
2089
2089
|
]),
|
|
2090
2090
|
e("div", vs, [
|
|
2091
|
-
e("div", ps,
|
|
2092
|
-
e("div", ys,
|
|
2091
|
+
e("div", ps, f(s(r)("inventory.stock.history.summary.openingBalance")), 1),
|
|
2092
|
+
e("div", ys, f(z.value), 1)
|
|
2093
2093
|
]),
|
|
2094
2094
|
e("div", _s, [
|
|
2095
|
-
e("div", ks,
|
|
2096
|
-
e("div", hs,
|
|
2095
|
+
e("div", ks, f(s(r)("inventory.stock.history.summary.lastStockBalance")), 1),
|
|
2096
|
+
e("div", hs, f(K.value), 1)
|
|
2097
2097
|
])
|
|
2098
2098
|
]),
|
|
2099
2099
|
s(d).enableTotalCost ? (j(), q("div", bs, [
|
|
@@ -2103,7 +2103,7 @@ const Tn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, En = {
|
|
|
2103
2103
|
_(ut, { "z-index": 50 }, {
|
|
2104
2104
|
default: M(() => [
|
|
2105
2105
|
e("div", Ss, [
|
|
2106
|
-
me(
|
|
2106
|
+
me(f(s(r)("inventory.stock.history.estimatedValue")) + " ", 1),
|
|
2107
2107
|
_(ae, {
|
|
2108
2108
|
variant: "plain",
|
|
2109
2109
|
placement: "top",
|
|
@@ -2123,18 +2123,18 @@ const Tn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, En = {
|
|
|
2123
2123
|
_: 1
|
|
2124
2124
|
}),
|
|
2125
2125
|
e("div", ws, [
|
|
2126
|
-
|
|
2126
|
+
u.sku.valuation === s(it).Enum.FIFO ? (j(), q(ue, { key: 0 }, [
|
|
2127
2127
|
_(W, {
|
|
2128
2128
|
label: "FIFO",
|
|
2129
2129
|
compact: ""
|
|
2130
2130
|
}),
|
|
2131
|
-
me(" " +
|
|
2131
|
+
me(" " + f(typeof H.value != "string" ? s(Me)(
|
|
2132
2132
|
H.value,
|
|
2133
2133
|
!1,
|
|
2134
2134
|
H.value.precision
|
|
2135
2135
|
) : H.value), 1)
|
|
2136
2136
|
], 64)) : (j(), q(ue, { key: 1 }, [
|
|
2137
|
-
me(
|
|
2137
|
+
me(f(typeof H.value != "string" ? s(Me)(
|
|
2138
2138
|
H.value,
|
|
2139
2139
|
!1,
|
|
2140
2140
|
H.value.precision
|
|
@@ -2154,14 +2154,14 @@ const Tn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, En = {
|
|
|
2154
2154
|
_(ut, { "z-index": 50 }, {
|
|
2155
2155
|
default: M(() => [
|
|
2156
2156
|
e("div", Fs, [
|
|
2157
|
-
me(
|
|
2157
|
+
me(f(s(r)("inventory.stock.history.costSold")) + " ", 1),
|
|
2158
2158
|
_(ae, {
|
|
2159
2159
|
variant: "plain",
|
|
2160
2160
|
placement: "top",
|
|
2161
2161
|
"z-index": 50
|
|
2162
2162
|
}, {
|
|
2163
2163
|
content: M(() => [
|
|
2164
|
-
e("div", $s,
|
|
2164
|
+
e("div", $s, f(s(r)("inventory.stock.history.costSoldTooltip")), 1)
|
|
2165
2165
|
]),
|
|
2166
2166
|
default: M(() => [
|
|
2167
2167
|
_(ee, {
|
|
@@ -2175,7 +2175,7 @@ const Tn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, En = {
|
|
|
2175
2175
|
]),
|
|
2176
2176
|
_: 1
|
|
2177
2177
|
}),
|
|
2178
|
-
e("div", js,
|
|
2178
|
+
e("div", js, f(U.value), 1)
|
|
2179
2179
|
])
|
|
2180
2180
|
])
|
|
2181
2181
|
])) : se("", !0)
|
|
@@ -2189,10 +2189,10 @@ const Tn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, En = {
|
|
|
2189
2189
|
(j(!0), q(ue, null, ve(t.value, (de) => (j(), q(ue, {
|
|
2190
2190
|
key: de.date
|
|
2191
2191
|
}, [
|
|
2192
|
-
|
|
2192
|
+
u.sku ? (j(), te(Mn, {
|
|
2193
2193
|
key: 0,
|
|
2194
2194
|
record: de,
|
|
2195
|
-
sku:
|
|
2195
|
+
sku: u.sku,
|
|
2196
2196
|
bills: n.value,
|
|
2197
2197
|
"unit-cost-history": B.value,
|
|
2198
2198
|
"cost-mechanism": l.value,
|
|
@@ -2207,8 +2207,8 @@ const Tn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, En = {
|
|
|
2207
2207
|
alt: "List is empty"
|
|
2208
2208
|
}, null, 8, Cs)
|
|
2209
2209
|
]),
|
|
2210
|
-
e("div", Bs,
|
|
2211
|
-
e("div", Ds,
|
|
2210
|
+
e("div", Bs, f(s(r)("inventory.stock.history.noRecords")), 1),
|
|
2211
|
+
e("div", Ds, f(s(r)("inventory.stock.history.changeDateRange")), 1),
|
|
2212
2212
|
_(S),
|
|
2213
2213
|
_(S)
|
|
2214
2214
|
]))
|
|
@@ -2227,18 +2227,18 @@ const Tn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, En = {
|
|
|
2227
2227
|
mode: { default: "all" }
|
|
2228
2228
|
},
|
|
2229
2229
|
setup(A) {
|
|
2230
|
-
const
|
|
2230
|
+
const c = A, k = T(() => {
|
|
2231
2231
|
const w = [];
|
|
2232
|
-
return
|
|
2232
|
+
return c.permission && w.push(c.permission), c.permissions && w.push(...c.permissions), w;
|
|
2233
2233
|
});
|
|
2234
2234
|
Vt(() => {
|
|
2235
2235
|
});
|
|
2236
|
-
const { hasPermission: y } = At(k, () =>
|
|
2236
|
+
const { hasPermission: y } = At(k, () => c.mode);
|
|
2237
2237
|
return (w, V) => s(y) ? st(w.$slots, "default", { key: 0 }) : st(w.$slots, "fallback", { key: 1 });
|
|
2238
2238
|
}
|
|
2239
2239
|
});
|
|
2240
2240
|
function Hs(A) {
|
|
2241
|
-
const
|
|
2241
|
+
const c = uo(), k = Se(), y = Y(!1), w = Y(null), V = Y(null);
|
|
2242
2242
|
let d = null, r = !1, b = !1;
|
|
2243
2243
|
function R() {
|
|
2244
2244
|
if (b) return;
|
|
@@ -2248,18 +2248,18 @@ function Hs(A) {
|
|
|
2248
2248
|
const B = {
|
|
2249
2249
|
type: "refresh-balance",
|
|
2250
2250
|
params: { locationId: a }
|
|
2251
|
-
}, { unsubscribe:
|
|
2251
|
+
}, { unsubscribe: v, initialState: g } = c.subscribe(
|
|
2252
2252
|
B,
|
|
2253
2253
|
C
|
|
2254
2254
|
);
|
|
2255
|
-
d =
|
|
2255
|
+
d = v, g.then((o) => {
|
|
2256
2256
|
o != null && o.initialState && C(o.initialState);
|
|
2257
2257
|
}).catch((o) => {
|
|
2258
2258
|
console.error("Failed to fetch refresh-balance initial state", o);
|
|
2259
2259
|
});
|
|
2260
2260
|
}
|
|
2261
2261
|
async function C(a) {
|
|
2262
|
-
var B,
|
|
2262
|
+
var B, v, g;
|
|
2263
2263
|
if (!(!b || !a)) {
|
|
2264
2264
|
if (w.value = a, a.completedAt && (V.value = a.completedAt), a.message === "processing" || !a.completedAt && !a.message) {
|
|
2265
2265
|
r = !0, y.value = !0;
|
|
@@ -2277,7 +2277,7 @@ function Hs(A) {
|
|
|
2277
2277
|
}
|
|
2278
2278
|
if (a.message === "error" || (B = a.message) != null && B.startsWith("error:")) {
|
|
2279
2279
|
console.log("Stock balance refresh error:", a.message);
|
|
2280
|
-
const o = (
|
|
2280
|
+
const o = (v = a.message) != null && v.startsWith("error:") ? a.message.slice(6).trim() : "Failed to refresh stock balance.";
|
|
2281
2281
|
l(), await ((g = A.onError) == null ? void 0 : g.call(A, o));
|
|
2282
2282
|
}
|
|
2283
2283
|
}
|
|
@@ -2301,7 +2301,7 @@ const Ts = {
|
|
|
2301
2301
|
}, Es = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Us = { class: "flex flex-col gap-8" }, Ps = { class: "flex flex-col" }, Rs = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ns = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary line-clamp-1" }, ba = /* @__PURE__ */ pe({
|
|
2302
2302
|
__name: "StockView",
|
|
2303
2303
|
setup(A) {
|
|
2304
|
-
const { t:
|
|
2304
|
+
const { t: c } = ye(), k = Ne(), y = Se(), w = Oe(), V = Ft(), d = Ae(), r = gt(), b = co(), { columnDefs: R } = ko(), C = Xe(), { hasPermission: l } = At(
|
|
2305
2305
|
T(() => [
|
|
2306
2306
|
{
|
|
2307
2307
|
action: Be.Action.manage,
|
|
@@ -2310,46 +2310,46 @@ const Ts = {
|
|
|
2310
2310
|
])
|
|
2311
2311
|
), a = T(
|
|
2312
2312
|
() => {
|
|
2313
|
-
var
|
|
2314
|
-
return l.value || ((
|
|
2313
|
+
var p;
|
|
2314
|
+
return l.value || ((p = C.sessionUser.value) == null ? void 0 : p.role.isAdmin);
|
|
2315
2315
|
}
|
|
2316
|
-
), B = Le(),
|
|
2316
|
+
), B = Le(), v = we();
|
|
2317
2317
|
y.watchLocation(X);
|
|
2318
2318
|
const g = T(
|
|
2319
2319
|
() => new Set(b.getAvailableItems(b.businessSubsidiaryId))
|
|
2320
2320
|
), o = Y(!1), t = Y(!1), { refreshing: n, lastCompletedAt: $, startListening: E, stopListening: N } = Hs({
|
|
2321
2321
|
onCompleted: async () => {
|
|
2322
|
-
await X(), t.value = !1,
|
|
2322
|
+
await X(), t.value = !1, v.open({
|
|
2323
2323
|
title: "Balance refreshed",
|
|
2324
2324
|
message: "Stock balance has been recalculated.",
|
|
2325
2325
|
type: "success"
|
|
2326
2326
|
});
|
|
2327
2327
|
},
|
|
2328
|
-
onError: (
|
|
2329
|
-
t.value = !1, console.log("Error refreshing stock balance",
|
|
2330
|
-
title:
|
|
2331
|
-
message:
|
|
2328
|
+
onError: (p) => {
|
|
2329
|
+
t.value = !1, console.log("Error refreshing stock balance", p), v.open({
|
|
2330
|
+
title: c("inventory.common.refreshFailed"),
|
|
2331
|
+
message: p || c("inventory.stock.stock_balance.refreshBalanceError"),
|
|
2332
2332
|
type: "error"
|
|
2333
2333
|
});
|
|
2334
2334
|
}
|
|
2335
2335
|
}), O = T(() => n.value || t.value);
|
|
2336
2336
|
async function L() {
|
|
2337
2337
|
E();
|
|
2338
|
-
const
|
|
2338
|
+
const p = c("inventory.stock.stock_balance.refreshBalanceDescription"), m = $.value ? `${p}
|
|
2339
2339
|
|
|
2340
|
-
Last refreshed: ${new Date($.value).toLocaleString()}` :
|
|
2340
|
+
Last refreshed: ${new Date($.value).toLocaleString()}` : p;
|
|
2341
2341
|
B.open({
|
|
2342
|
-
title:
|
|
2343
|
-
message:
|
|
2342
|
+
title: c("inventory.stock.stock_balance.refreshBalance"),
|
|
2343
|
+
message: m,
|
|
2344
2344
|
closeButton: !0,
|
|
2345
2345
|
primaryActions: {
|
|
2346
|
-
text:
|
|
2346
|
+
text: c("common.confirm"),
|
|
2347
2347
|
close: !1,
|
|
2348
2348
|
isLoading: O,
|
|
2349
2349
|
disabled: O
|
|
2350
2350
|
},
|
|
2351
2351
|
secondaryActions: {
|
|
2352
|
-
text:
|
|
2352
|
+
text: c("common.close"),
|
|
2353
2353
|
close: !0,
|
|
2354
2354
|
variant: "tertiary",
|
|
2355
2355
|
disabled: O
|
|
@@ -2362,9 +2362,9 @@ Last refreshed: ${new Date($.value).toLocaleString()}` : v;
|
|
|
2362
2362
|
} catch (i) {
|
|
2363
2363
|
console.log("Failed to queue refresh balan22ce", typeof i);
|
|
2364
2364
|
const S = typeof i == "object" ? JSON.stringify(i) : String(i);
|
|
2365
|
-
console.log("Error details:", S), t.value = !1,
|
|
2366
|
-
title:
|
|
2367
|
-
message: (i instanceof Error ? i.message : null) ??
|
|
2365
|
+
console.log("Error details:", S), t.value = !1, v.open({
|
|
2366
|
+
title: c("inventory.common.refreshFailed"),
|
|
2367
|
+
message: (i instanceof Error ? i.message : null) ?? c("inventory.stock.stock_balance.refreshBalanceError"),
|
|
2368
2368
|
type: "error"
|
|
2369
2369
|
});
|
|
2370
2370
|
}
|
|
@@ -2378,12 +2378,12 @@ Last refreshed: ${new Date($.value).toLocaleString()}` : v;
|
|
|
2378
2378
|
o.value = !0;
|
|
2379
2379
|
try {
|
|
2380
2380
|
await w.readStockBalance(), await w.readProductBalance(), await r.readStockEstimateBalance();
|
|
2381
|
-
} catch (
|
|
2382
|
-
|
|
2383
|
-
title:
|
|
2384
|
-
message:
|
|
2381
|
+
} catch (p) {
|
|
2382
|
+
v.open({
|
|
2383
|
+
title: c("inventory.stock.error.title"),
|
|
2384
|
+
message: c("inventory.stock.error.message"),
|
|
2385
2385
|
type: "error"
|
|
2386
|
-
}), console.error("error on fetch stock balance",
|
|
2386
|
+
}), console.error("error on fetch stock balance", p);
|
|
2387
2387
|
} finally {
|
|
2388
2388
|
o.value = !1;
|
|
2389
2389
|
}
|
|
@@ -2408,14 +2408,14 @@ Last refreshed: ${new Date($.value).toLocaleString()}` : v;
|
|
|
2408
2408
|
]
|
|
2409
2409
|
}), U = T(() => {
|
|
2410
2410
|
var i, S, P;
|
|
2411
|
-
const
|
|
2411
|
+
const p = K.value ? mo.build(K.value) : null, m = [];
|
|
2412
2412
|
for (const ee of k.skus) {
|
|
2413
2413
|
let ae = !0;
|
|
2414
|
-
if (b.isEnabled && re.value && g.value && ae && (ae = g.value.has(ee._id)),
|
|
2414
|
+
if (b.isEnabled && re.value && g.value && ae && (ae = g.value.has(ee._id)), p && ae && (ae = fo(
|
|
2415
2415
|
{
|
|
2416
2416
|
status: ee.isInactive ? "Inactive" : "Active"
|
|
2417
2417
|
},
|
|
2418
|
-
|
|
2418
|
+
p
|
|
2419
2419
|
)), ae) {
|
|
2420
2420
|
const Q = ee.trackingMeasurement;
|
|
2421
2421
|
let W = (S = (i = w.stockBalance.skus) == null ? void 0 : i.find(
|
|
@@ -2433,37 +2433,37 @@ Last refreshed: ${new Date($.value).toLocaleString()}` : v;
|
|
|
2433
2433
|
day: (oe == null ? void 0 : oe.depletionDays) ?? void 0,
|
|
2434
2434
|
trackingUnitAbbrev: Q ? ((P = ee.unit.measurements.find((ce) => ce.id === Q)) == null ? void 0 : P.abbrev) ?? "" : ee.unit.abbrev
|
|
2435
2435
|
};
|
|
2436
|
-
|
|
2436
|
+
m.push(le);
|
|
2437
2437
|
}
|
|
2438
2438
|
}
|
|
2439
|
-
return
|
|
2439
|
+
return m;
|
|
2440
2440
|
}), Z = Y(""), re = Y(!0), { breakpoints: x } = Ot(), F = T(() => x.value.xs || x.value.sm), G = T(() => F.value ? 10 : 20), H = Dt(), J = T(() => {
|
|
2441
|
-
const
|
|
2441
|
+
const p = [
|
|
2442
2442
|
{
|
|
2443
|
-
label:
|
|
2443
|
+
label: c("inventory.stock.stock_balance.refreshBalance"),
|
|
2444
2444
|
value: "refresh-balance",
|
|
2445
2445
|
isPrimary: !0,
|
|
2446
2446
|
prependIcon: "calculate"
|
|
2447
2447
|
},
|
|
2448
2448
|
{
|
|
2449
|
-
label:
|
|
2449
|
+
label: c("inventory.common.refresh"),
|
|
2450
2450
|
value: "refresh"
|
|
2451
2451
|
},
|
|
2452
2452
|
{
|
|
2453
|
-
label:
|
|
2453
|
+
label: c("inventory.common.export"),
|
|
2454
2454
|
value: "export"
|
|
2455
2455
|
}
|
|
2456
2456
|
];
|
|
2457
|
-
return a.value &&
|
|
2458
|
-
label:
|
|
2457
|
+
return a.value && p.push({
|
|
2458
|
+
label: c("inventory.stock.stock_adjustment.title"),
|
|
2459
2459
|
value: "stockAdjustment"
|
|
2460
|
-
}),
|
|
2460
|
+
}), p;
|
|
2461
2461
|
}), I = Y(!1);
|
|
2462
|
-
function
|
|
2462
|
+
function u() {
|
|
2463
2463
|
I.value = !0;
|
|
2464
2464
|
}
|
|
2465
|
-
function h(
|
|
2466
|
-
switch (
|
|
2465
|
+
function h(p) {
|
|
2466
|
+
switch (p) {
|
|
2467
2467
|
case "refresh-balance":
|
|
2468
2468
|
return L();
|
|
2469
2469
|
case "refresh":
|
|
@@ -2471,13 +2471,13 @@ Last refreshed: ${new Date($.value).toLocaleString()}` : v;
|
|
|
2471
2471
|
case "export":
|
|
2472
2472
|
return Pt(U.value);
|
|
2473
2473
|
case "stockAdjustment":
|
|
2474
|
-
return
|
|
2474
|
+
return u();
|
|
2475
2475
|
}
|
|
2476
2476
|
}
|
|
2477
|
-
return (
|
|
2477
|
+
return (p, m) => {
|
|
2478
2478
|
const i = D("FmSwitch"), S = D("FmTable");
|
|
2479
2479
|
return j(), te(Mt, {
|
|
2480
|
-
title: s(
|
|
2480
|
+
title: s(c)("inventory.stock.title"),
|
|
2481
2481
|
actions: J.value,
|
|
2482
2482
|
"onClick:action": h
|
|
2483
2483
|
}, {
|
|
@@ -2497,22 +2497,22 @@ Last refreshed: ${new Date($.value).toLocaleString()}` : v;
|
|
|
2497
2497
|
searchable: "",
|
|
2498
2498
|
"change-location": "",
|
|
2499
2499
|
search: Z.value,
|
|
2500
|
-
"onUpdate:search":
|
|
2500
|
+
"onUpdate:search": m[1] || (m[1] = (W) => Z.value = W),
|
|
2501
2501
|
"hide-filter-options": !0,
|
|
2502
2502
|
filterable: "",
|
|
2503
2503
|
"filter-attributes": z.value,
|
|
2504
2504
|
filter: K.value,
|
|
2505
|
-
"onUpdate:filter":
|
|
2505
|
+
"onUpdate:filter": m[2] || (m[2] = (W) => K.value = W)
|
|
2506
2506
|
}, {
|
|
2507
2507
|
default: M(() => [
|
|
2508
2508
|
s(b).isEnabled ? (j(), q("div", Ts, [
|
|
2509
|
-
e("span", Es,
|
|
2509
|
+
e("span", Es, f(s(c)("inventory.integration.netsuite.subsidiaryHierarchy.filtering")), 1),
|
|
2510
2510
|
_(Rt),
|
|
2511
2511
|
_(Je, null, {
|
|
2512
2512
|
default: M(() => [
|
|
2513
2513
|
_(i, {
|
|
2514
2514
|
modelValue: re.value,
|
|
2515
|
-
"onUpdate:modelValue":
|
|
2515
|
+
"onUpdate:modelValue": m[0] || (m[0] = (W) => re.value = W)
|
|
2516
2516
|
}, null, 8, ["modelValue"])
|
|
2517
2517
|
]),
|
|
2518
2518
|
_: 1
|
|
@@ -2528,7 +2528,7 @@ Last refreshed: ${new Date($.value).toLocaleString()}` : v;
|
|
|
2528
2528
|
"search-value": Z.value,
|
|
2529
2529
|
loading: o.value || s(n) || !s(y)._currentLocation,
|
|
2530
2530
|
key: (P = s(y)._currentLocation) == null ? void 0 : P.dbName,
|
|
2531
|
-
onRowClick:
|
|
2531
|
+
onRowClick: m[3] || (m[3] = (W) => s(V).showSkuHistory(W.original)),
|
|
2532
2532
|
"page-size": G.value
|
|
2533
2533
|
}, {
|
|
2534
2534
|
"list-row": M((W) => [
|
|
@@ -2581,7 +2581,7 @@ Last refreshed: ${new Date($.value).toLocaleString()}` : v;
|
|
|
2581
2581
|
(ee = s(V).stockHistoryProps) != null && ee.sku ? (j(), te(Ms, at(ze({ key: 0 }, s(V).stockHistoryProps)), null, 16)) : se("", !0),
|
|
2582
2582
|
(ae = s(V).convertSkuDialogProps) != null && ae.sku ? (j(), te(Mo, at(ze({ key: 1 }, s(V).convertSkuDialogProps)), null, 16)) : se("", !0),
|
|
2583
2583
|
(Q = s(V).adjustSkuDialogProps) != null && Q.stock ? (j(), te(Go, ze({ key: 2 }, s(V).adjustSkuDialogProps, {
|
|
2584
|
-
onSubmitted:
|
|
2584
|
+
onSubmitted: m[4] || (m[4] = (W) => X())
|
|
2585
2585
|
}), null, 16)) : se("", !0),
|
|
2586
2586
|
_(Is, {
|
|
2587
2587
|
permission: {
|
|
@@ -2593,8 +2593,8 @@ Last refreshed: ${new Date($.value).toLocaleString()}` : v;
|
|
|
2593
2593
|
I.value ? (j(), te(sn, {
|
|
2594
2594
|
key: 0,
|
|
2595
2595
|
show: I.value,
|
|
2596
|
-
"onUpdate:show":
|
|
2597
|
-
onSubmitted:
|
|
2596
|
+
"onUpdate:show": m[5] || (m[5] = (W) => I.value = W),
|
|
2597
|
+
onSubmitted: m[6] || (m[6] = (W) => X())
|
|
2598
2598
|
}, null, 8, ["show"])) : se("", !0)
|
|
2599
2599
|
]),
|
|
2600
2600
|
_: 1
|