@ketvietlab/ketsuite 0.1.2 → 0.1.3
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/LICENSE +1 -1
- package/README.md +15 -1
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +59 -0
- package/dist/cli.js.map +1 -0
- package/dist/deployment.d.ts +5 -0
- package/dist/deployment.d.ts.map +1 -0
- package/dist/deployment.js +152 -0
- package/dist/deployment.js.map +1 -0
- package/dist/development.d.ts +8 -0
- package/dist/development.d.ts.map +1 -0
- package/dist/development.js +40 -0
- package/dist/development.js.map +1 -0
- package/dist/index.d.ts +77 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +66 -6
- package/dist/index.js.map +1 -1
- package/dist/modules/account/analytics.d.ts +32 -0
- package/dist/modules/account/analytics.d.ts.map +1 -0
- package/dist/modules/account/analytics.js +457 -0
- package/dist/modules/account/analytics.js.map +1 -0
- package/dist/modules/account/assets-costing.d.ts +4 -0
- package/dist/modules/account/assets-costing.d.ts.map +1 -0
- package/dist/modules/account/assets-costing.js +1134 -0
- package/dist/modules/account/assets-costing.js.map +1 -0
- package/dist/modules/account/audit.d.ts +3 -0
- package/dist/modules/account/audit.d.ts.map +1 -0
- package/dist/modules/account/audit.js +14 -0
- package/dist/modules/account/audit.js.map +1 -0
- package/dist/modules/account/books.d.ts +4 -0
- package/dist/modules/account/books.d.ts.map +1 -0
- package/dist/modules/account/books.js +150 -0
- package/dist/modules/account/books.js.map +1 -0
- package/dist/modules/account/cash-receivables.d.ts +3 -0
- package/dist/modules/account/cash-receivables.d.ts.map +1 -0
- package/dist/modules/account/cash-receivables.js +1087 -0
- package/dist/modules/account/cash-receivables.js.map +1 -0
- package/dist/modules/account/close.d.ts +4 -0
- package/dist/modules/account/close.d.ts.map +1 -0
- package/dist/modules/account/close.js +343 -0
- package/dist/modules/account/close.js.map +1 -0
- package/dist/modules/account/date.d.ts +21 -0
- package/dist/modules/account/date.d.ts.map +1 -0
- package/dist/modules/account/date.js +70 -0
- package/dist/modules/account/date.js.map +1 -0
- package/dist/modules/account/functions.d.ts +131 -3
- package/dist/modules/account/functions.d.ts.map +1 -1
- package/dist/modules/account/functions.js +2570 -389
- package/dist/modules/account/functions.js.map +1 -1
- package/dist/modules/account/index.d.ts +1 -2
- package/dist/modules/account/index.d.ts.map +1 -1
- package/dist/modules/account/index.js +403 -8
- package/dist/modules/account/index.js.map +1 -1
- package/dist/modules/account/models.d.ts.map +1 -1
- package/dist/modules/account/models.js +748 -0
- package/dist/modules/account/models.js.map +1 -1
- package/dist/modules/account/money.d.ts +60 -0
- package/dist/modules/account/money.d.ts.map +1 -0
- package/dist/modules/account/money.js +237 -0
- package/dist/modules/account/money.js.map +1 -0
- package/dist/modules/account/open-items.d.ts +3 -0
- package/dist/modules/account/open-items.d.ts.map +1 -0
- package/dist/modules/account/open-items.js +390 -0
- package/dist/modules/account/open-items.js.map +1 -0
- package/dist/modules/account/opening.d.ts +3 -0
- package/dist/modules/account/opening.d.ts.map +1 -0
- package/dist/modules/account/opening.js +323 -0
- package/dist/modules/account/opening.js.map +1 -0
- package/dist/modules/account/period.d.ts +21 -0
- package/dist/modules/account/period.d.ts.map +1 -0
- package/dist/modules/account/period.js +155 -0
- package/dist/modules/account/period.js.map +1 -0
- package/dist/modules/account/relations.d.ts.map +1 -1
- package/dist/modules/account/relations.js +46 -0
- package/dist/modules/account/relations.js.map +1 -1
- package/dist/modules/account/reports.d.ts +4 -0
- package/dist/modules/account/reports.d.ts.map +1 -0
- package/dist/modules/account/reports.js +125 -0
- package/dist/modules/account/reports.js.map +1 -0
- package/dist/modules/account/setup.d.ts +3 -1
- package/dist/modules/account/setup.d.ts.map +1 -1
- package/dist/modules/account/setup.js +45 -160
- package/dist/modules/account/setup.js.map +1 -1
- package/dist/modules/account_activity_backend/index.d.ts.map +1 -1
- package/dist/modules/account_activity_backend/index.js +0 -1
- package/dist/modules/account_activity_backend/index.js.map +1 -1
- package/dist/modules/account_backend/index.js +3339 -494
- package/dist/modules/account_backend/index.js.map +1 -1
- package/dist/modules/account_backend/overview.d.ts +92 -0
- package/dist/modules/account_backend/overview.d.ts.map +1 -0
- package/dist/modules/account_backend/overview.js +257 -0
- package/dist/modules/account_backend/overview.js.map +1 -0
- package/dist/modules/account_backend/relation-control.d.ts +48 -0
- package/dist/modules/account_backend/relation-control.d.ts.map +1 -0
- package/dist/modules/account_backend/relation-control.js +67 -0
- package/dist/modules/account_backend/relation-control.js.map +1 -0
- package/dist/modules/account_backend/screens/account-defaults.d.ts +28 -0
- package/dist/modules/account_backend/screens/account-defaults.d.ts.map +1 -0
- package/dist/modules/account_backend/screens/account-defaults.js +60 -0
- package/dist/modules/account_backend/screens/account-defaults.js.map +1 -0
- package/dist/modules/account_backend/screens/account-form.d.ts +16 -0
- package/dist/modules/account_backend/screens/account-form.d.ts.map +1 -0
- package/dist/modules/account_backend/screens/account-form.js +53 -0
- package/dist/modules/account_backend/screens/account-form.js.map +1 -0
- package/dist/modules/account_backend/screens/accounting-books.d.ts +15 -0
- package/dist/modules/account_backend/screens/accounting-books.d.ts.map +1 -0
- package/dist/modules/account_backend/screens/accounting-books.js +86 -0
- package/dist/modules/account_backend/screens/accounting-books.js.map +1 -0
- package/dist/modules/account_backend/screens/accounts-list.d.ts +50 -0
- package/dist/modules/account_backend/screens/accounts-list.d.ts.map +1 -0
- package/dist/modules/account_backend/screens/accounts-list.js +66 -0
- package/dist/modules/account_backend/screens/accounts-list.js.map +1 -0
- package/dist/modules/account_backend/screens/customer-invoice-form.d.ts +13 -0
- package/dist/modules/account_backend/screens/customer-invoice-form.d.ts.map +1 -0
- package/dist/modules/account_backend/screens/customer-invoice-form.js +20 -0
- package/dist/modules/account_backend/screens/customer-invoice-form.js.map +1 -0
- package/dist/modules/account_backend/screens/customer-invoices-list.d.ts +62 -0
- package/dist/modules/account_backend/screens/customer-invoices-list.d.ts.map +1 -0
- package/dist/modules/account_backend/screens/customer-invoices-list.js +82 -0
- package/dist/modules/account_backend/screens/customer-invoices-list.js.map +1 -0
- package/dist/modules/account_backend/screens/general-ledger.d.ts +24 -0
- package/dist/modules/account_backend/screens/general-ledger.d.ts.map +1 -0
- package/dist/modules/account_backend/screens/general-ledger.js +73 -0
- package/dist/modules/account_backend/screens/general-ledger.js.map +1 -0
- package/dist/modules/account_backend/screens/index.d.ts +27 -0
- package/dist/modules/account_backend/screens/index.d.ts.map +1 -0
- package/dist/modules/account_backend/screens/index.js +27 -0
- package/dist/modules/account_backend/screens/index.js.map +1 -0
- package/dist/modules/account_backend/screens/journal-entries-list.d.ts +48 -0
- package/dist/modules/account_backend/screens/journal-entries-list.d.ts.map +1 -0
- package/dist/modules/account_backend/screens/journal-entries-list.js +58 -0
- package/dist/modules/account_backend/screens/journal-entries-list.js.map +1 -0
- package/dist/modules/account_backend/screens/journal-entry-create.d.ts +14 -0
- package/dist/modules/account_backend/screens/journal-entry-create.d.ts.map +1 -0
- package/dist/modules/account_backend/screens/journal-entry-create.js +41 -0
- package/dist/modules/account_backend/screens/journal-entry-create.js.map +1 -0
- package/dist/modules/account_backend/screens/journal-form.d.ts +15 -0
- package/dist/modules/account_backend/screens/journal-form.d.ts.map +1 -0
- package/dist/modules/account_backend/screens/journal-form.js +53 -0
- package/dist/modules/account_backend/screens/journal-form.js.map +1 -0
- package/dist/modules/account_backend/screens/journals-list.d.ts +51 -0
- package/dist/modules/account_backend/screens/journals-list.d.ts.map +1 -0
- package/dist/modules/account_backend/screens/journals-list.js +70 -0
- package/dist/modules/account_backend/screens/journals-list.js.map +1 -0
- package/dist/modules/account_backend/screens/move-detail.d.ts +26 -0
- package/dist/modules/account_backend/screens/move-detail.d.ts.map +1 -0
- package/dist/modules/account_backend/screens/move-detail.js +130 -0
- package/dist/modules/account_backend/screens/move-detail.js.map +1 -0
- package/dist/modules/account_backend/screens/opening-balances.d.ts +28 -0
- package/dist/modules/account_backend/screens/opening-balances.d.ts.map +1 -0
- package/dist/modules/account_backend/screens/opening-balances.js +96 -0
- package/dist/modules/account_backend/screens/opening-balances.js.map +1 -0
- package/dist/modules/account_backend/screens/overview.d.ts +62 -0
- package/dist/modules/account_backend/screens/overview.d.ts.map +1 -0
- package/dist/modules/account_backend/screens/overview.js +215 -0
- package/dist/modules/account_backend/screens/overview.js.map +1 -0
- package/dist/modules/account_backend/screens/partner-statement.d.ts +26 -0
- package/dist/modules/account_backend/screens/partner-statement.d.ts.map +1 -0
- package/dist/modules/account_backend/screens/partner-statement.js +82 -0
- package/dist/modules/account_backend/screens/partner-statement.js.map +1 -0
- package/dist/modules/account_backend/screens/payment-form.d.ts +14 -0
- package/dist/modules/account_backend/screens/payment-form.d.ts.map +1 -0
- package/dist/modules/account_backend/screens/payment-form.js +21 -0
- package/dist/modules/account_backend/screens/payment-form.js.map +1 -0
- package/dist/modules/account_backend/screens/payment-term-form.d.ts +25 -0
- package/dist/modules/account_backend/screens/payment-term-form.d.ts.map +1 -0
- package/dist/modules/account_backend/screens/payment-term-form.js +96 -0
- package/dist/modules/account_backend/screens/payment-term-form.js.map +1 -0
- package/dist/modules/account_backend/screens/payment-terms-list.d.ts +23 -0
- package/dist/modules/account_backend/screens/payment-terms-list.d.ts.map +1 -0
- package/dist/modules/account_backend/screens/payment-terms-list.js +104 -0
- package/dist/modules/account_backend/screens/payment-terms-list.js.map +1 -0
- package/dist/modules/account_backend/screens/payments-list.d.ts +62 -0
- package/dist/modules/account_backend/screens/payments-list.d.ts.map +1 -0
- package/dist/modules/account_backend/screens/payments-list.js +71 -0
- package/dist/modules/account_backend/screens/payments-list.js.map +1 -0
- package/dist/modules/account_backend/screens/period-closes.d.ts +21 -0
- package/dist/modules/account_backend/screens/period-closes.d.ts.map +1 -0
- package/dist/modules/account_backend/screens/period-closes.js +123 -0
- package/dist/modules/account_backend/screens/period-closes.js.map +1 -0
- package/dist/modules/account_backend/screens/shared.d.ts +16 -0
- package/dist/modules/account_backend/screens/shared.d.ts.map +1 -0
- package/dist/modules/account_backend/screens/shared.js +15 -0
- package/dist/modules/account_backend/screens/shared.js.map +1 -0
- package/dist/modules/account_backend/screens/tax-form.d.ts +14 -0
- package/dist/modules/account_backend/screens/tax-form.d.ts.map +1 -0
- package/dist/modules/account_backend/screens/tax-form.js +25 -0
- package/dist/modules/account_backend/screens/tax-form.js.map +1 -0
- package/dist/modules/account_backend/screens/taxes-list.d.ts +55 -0
- package/dist/modules/account_backend/screens/taxes-list.d.ts.map +1 -0
- package/dist/modules/account_backend/screens/taxes-list.js +83 -0
- package/dist/modules/account_backend/screens/taxes-list.js.map +1 -0
- package/dist/modules/account_backend/screens/trial-balance.d.ts +19 -0
- package/dist/modules/account_backend/screens/trial-balance.d.ts.map +1 -0
- package/dist/modules/account_backend/screens/trial-balance.js +75 -0
- package/dist/modules/account_backend/screens/trial-balance.js.map +1 -0
- package/dist/modules/account_backend/screens/vendor-bill-form.d.ts +13 -0
- package/dist/modules/account_backend/screens/vendor-bill-form.d.ts.map +1 -0
- package/dist/modules/account_backend/screens/vendor-bill-form.js +20 -0
- package/dist/modules/account_backend/screens/vendor-bill-form.js.map +1 -0
- package/dist/modules/account_backend/screens/vendor-bills-list.d.ts +62 -0
- package/dist/modules/account_backend/screens/vendor-bills-list.d.ts.map +1 -0
- package/dist/modules/account_backend/screens/vendor-bills-list.js +84 -0
- package/dist/modules/account_backend/screens/vendor-bills-list.js.map +1 -0
- package/dist/modules/account_mail_backend/index.d.ts.map +1 -1
- package/dist/modules/account_mail_backend/index.js +0 -1
- package/dist/modules/account_mail_backend/index.js.map +1 -1
- package/dist/modules/account_partner/index.js +0 -2
- package/dist/modules/account_partner/index.js.map +1 -1
- package/dist/modules/account_partner_backend/index.d.ts +1 -1
- package/dist/modules/account_partner_backend/index.d.ts.map +1 -1
- package/dist/modules/account_partner_backend/index.js +2 -3
- package/dist/modules/account_partner_backend/index.js.map +1 -1
- package/dist/modules/account_partner_backend/routes.d.ts.map +1 -1
- package/dist/modules/account_partner_backend/routes.js +19 -25
- package/dist/modules/account_partner_backend/routes.js.map +1 -1
- package/dist/modules/account_partner_backend/screens/accounting-terms.d.ts +20 -0
- package/dist/modules/account_partner_backend/screens/accounting-terms.d.ts.map +1 -0
- package/dist/modules/account_partner_backend/screens/accounting-terms.js +63 -0
- package/dist/modules/account_partner_backend/screens/accounting-terms.js.map +1 -0
- package/dist/modules/account_partner_backend/screens/index.d.ts +2 -0
- package/dist/modules/account_partner_backend/screens/index.d.ts.map +1 -0
- package/dist/modules/account_partner_backend/screens/index.js +2 -0
- package/dist/modules/account_partner_backend/screens/index.js.map +1 -0
- package/dist/modules/account_staff_channel/channel-routes.d.ts +2 -0
- package/dist/modules/account_staff_channel/channel-routes.d.ts.map +1 -0
- package/dist/modules/account_staff_channel/channel-routes.js +787 -0
- package/dist/modules/account_staff_channel/channel-routes.js.map +1 -0
- package/dist/modules/account_staff_channel/functions.d.ts.map +1 -0
- package/dist/modules/account_staff_channel/functions.js +143 -0
- package/dist/modules/account_staff_channel/functions.js.map +1 -0
- package/dist/modules/account_staff_channel/index.d.ts +5 -0
- package/dist/modules/account_staff_channel/index.d.ts.map +1 -0
- package/dist/modules/account_staff_channel/index.js +42 -0
- package/dist/modules/account_staff_channel/index.js.map +1 -0
- package/dist/modules/account_staff_channel/models.d.ts.map +1 -0
- package/dist/modules/account_staff_channel/models.js +30 -0
- package/dist/modules/account_staff_channel/models.js.map +1 -0
- package/dist/modules/activity/index.d.ts.map +1 -1
- package/dist/modules/activity/index.js +0 -1
- package/dist/modules/activity/index.js.map +1 -1
- package/dist/modules/activity_backend/index.d.ts +1 -1
- package/dist/modules/activity_backend/index.d.ts.map +1 -1
- package/dist/modules/activity_backend/index.js +3 -12
- package/dist/modules/activity_backend/index.js.map +1 -1
- package/dist/modules/activity_backend/routes.d.ts.map +1 -1
- package/dist/modules/activity_backend/routes.js +36 -22
- package/dist/modules/activity_backend/routes.js.map +1 -1
- package/dist/modules/activity_backend/screens/activities-list.d.ts +15 -0
- package/dist/modules/activity_backend/screens/activities-list.d.ts.map +1 -0
- package/dist/modules/activity_backend/screens/activities-list.js +40 -0
- package/dist/modules/activity_backend/screens/activities-list.js.map +1 -0
- package/dist/modules/activity_backend/screens/index.d.ts +2 -0
- package/dist/modules/activity_backend/screens/index.d.ts.map +1 -0
- package/dist/modules/activity_backend/screens/index.js +2 -0
- package/dist/modules/activity_backend/screens/index.js.map +1 -0
- package/dist/modules/address/data/VN/NOTICE.md +1 -1
- package/dist/modules/address/index.d.ts.map +1 -1
- package/dist/modules/address/index.js +0 -1
- package/dist/modules/address/index.js.map +1 -1
- package/dist/modules/address_backend/index.d.ts +1 -1
- package/dist/modules/address_backend/index.d.ts.map +1 -1
- package/dist/modules/address_backend/index.js +1 -3
- package/dist/modules/address_backend/index.js.map +1 -1
- package/dist/modules/address_backend/routes.d.ts.map +1 -1
- package/dist/modules/address_backend/routes.js +20 -27
- package/dist/modules/address_backend/routes.js.map +1 -1
- package/dist/modules/address_backend/screens/catalogs-list.d.ts +14 -0
- package/dist/modules/address_backend/screens/catalogs-list.d.ts.map +1 -0
- package/dist/modules/address_backend/screens/catalogs-list.js +38 -0
- package/dist/modules/address_backend/screens/catalogs-list.js.map +1 -0
- package/dist/modules/address_backend/screens/country-browser.d.ts +12 -0
- package/dist/modules/address_backend/screens/country-browser.d.ts.map +1 -0
- package/dist/modules/address_backend/screens/country-browser.js +74 -0
- package/dist/modules/address_backend/screens/country-browser.js.map +1 -0
- package/dist/modules/address_backend/screens/index.d.ts +4 -0
- package/dist/modules/address_backend/screens/index.d.ts.map +1 -0
- package/dist/modules/address_backend/screens/index.js +3 -0
- package/dist/modules/address_backend/screens/index.js.map +1 -0
- package/dist/modules/address_backend/screens/types.d.ts +20 -0
- package/dist/modules/address_backend/screens/types.d.ts.map +1 -0
- package/dist/modules/address_backend/screens/types.js.map +1 -0
- package/dist/modules/attendance/channel-routes.d.ts +2 -0
- package/dist/modules/attendance/channel-routes.d.ts.map +1 -0
- package/dist/modules/attendance/channel-routes.js +234 -0
- package/dist/modules/attendance/channel-routes.js.map +1 -0
- package/dist/modules/attendance/functions.d.ts.map +1 -1
- package/dist/modules/attendance/functions.js +171 -22
- package/dist/modules/attendance/functions.js.map +1 -1
- package/dist/modules/attendance/index.d.ts.map +1 -1
- package/dist/modules/attendance/index.js +4 -2
- package/dist/modules/attendance/index.js.map +1 -1
- package/dist/modules/attendance/messages.d.ts +6 -0
- package/dist/modules/attendance/messages.d.ts.map +1 -1
- package/dist/modules/attendance/messages.js +6 -0
- package/dist/modules/attendance/messages.js.map +1 -1
- package/dist/modules/attendance/models.d.ts.map +1 -1
- package/dist/modules/attendance/models.js +1 -0
- package/dist/modules/attendance/models.js.map +1 -1
- package/dist/modules/attendance_backend/index.d.ts +3 -1
- package/dist/modules/attendance_backend/index.d.ts.map +1 -1
- package/dist/modules/attendance_backend/index.js +65 -4
- package/dist/modules/attendance_backend/index.js.map +1 -1
- package/dist/modules/attendance_backend/routes.d.ts.map +1 -1
- package/dist/modules/attendance_backend/routes.js +240 -53
- package/dist/modules/attendance_backend/routes.js.map +1 -1
- package/dist/modules/attendance_backend/screens/credentials.d.ts +32 -0
- package/dist/modules/attendance_backend/screens/credentials.d.ts.map +1 -0
- package/dist/modules/attendance_backend/screens/credentials.js +84 -0
- package/dist/modules/attendance_backend/screens/credentials.js.map +1 -0
- package/dist/modules/attendance_backend/screens/index.d.ts +4 -0
- package/dist/modules/attendance_backend/screens/index.d.ts.map +1 -0
- package/dist/modules/attendance_backend/screens/index.js +4 -0
- package/dist/modules/attendance_backend/screens/index.js.map +1 -0
- package/dist/modules/attendance_backend/screens/my-work.d.ts +35 -0
- package/dist/modules/attendance_backend/screens/my-work.d.ts.map +1 -0
- package/dist/modules/attendance_backend/screens/my-work.js +189 -0
- package/dist/modules/attendance_backend/screens/my-work.js.map +1 -0
- package/dist/modules/attendance_backend/screens/period.d.ts +22 -0
- package/dist/modules/attendance_backend/screens/period.d.ts.map +1 -0
- package/dist/modules/attendance_backend/screens/period.js +85 -0
- package/dist/modules/attendance_backend/screens/period.js.map +1 -0
- package/dist/modules/attendance_backend/screens.d.ts +0 -4
- package/dist/modules/attendance_backend/screens.d.ts.map +1 -1
- package/dist/modules/attendance_backend/screens.js +1 -209
- package/dist/modules/attendance_backend/screens.js.map +1 -1
- package/dist/modules/backend/catalogue.d.ts.map +1 -1
- package/dist/modules/backend/catalogue.js +53 -115
- package/dist/modules/backend/catalogue.js.map +1 -1
- package/dist/modules/backend/chart.d.ts +42 -0
- package/dist/modules/backend/chart.d.ts.map +1 -0
- package/dist/modules/backend/chart.js +39 -0
- package/dist/modules/backend/chart.js.map +1 -0
- package/dist/modules/backend/design/HANDOFF.md +118 -38
- package/dist/modules/backend/design/auth.css +463 -0
- package/dist/modules/backend/design/brand/logo-dark.png +0 -0
- package/dist/modules/backend/design/brand/logo-light.png +0 -0
- package/dist/modules/backend/design/charts.css +229 -0
- package/dist/modules/backend/design/client/chart.d.mts +31 -0
- package/dist/modules/backend/design/client/chart.d.mts.map +1 -0
- package/dist/modules/backend/design/client/chart.mjs +23 -0
- package/dist/modules/backend/design/client/chart.mjs.map +7 -0
- package/dist/modules/backend/design/client/relation-select.d.mts +6 -1
- package/dist/modules/backend/design/client/relation-select.d.mts.map +1 -1
- package/dist/modules/backend/design/client/relation-select.mjs +2 -7
- package/dist/modules/backend/design/client/relation-select.mjs.map +7 -1
- package/dist/modules/backend/design/client/table-selection.d.mts +7 -0
- package/dist/modules/backend/design/client/table-selection.d.mts.map +1 -0
- package/dist/modules/backend/design/client/table-selection.mjs +2 -0
- package/dist/modules/backend/design/client/table-selection.mjs.map +7 -0
- package/dist/modules/backend/design/content.css +766 -0
- package/dist/modules/backend/design/controls.css +451 -0
- package/dist/modules/backend/design/design-system.css +2 -0
- package/dist/modules/backend/design/forms.css +1134 -0
- package/dist/modules/backend/design/foundation.css +423 -0
- package/dist/modules/backend/design/lists.css +1462 -0
- package/dist/modules/backend/design/record.css +526 -0
- package/dist/modules/backend/design/responsive.css +331 -0
- package/dist/modules/backend/design/tokens.css +317 -92
- package/dist/modules/backend/index.d.ts +12 -5
- package/dist/modules/backend/index.d.ts.map +1 -1
- package/dist/modules/backend/index.js +32 -15
- package/dist/modules/backend/index.js.map +1 -1
- package/dist/modules/backend/islands.d.ts.map +1 -1
- package/dist/modules/backend/islands.js +22 -4
- package/dist/modules/backend/islands.js.map +1 -1
- package/dist/modules/backend/joints.d.ts +1 -1
- package/dist/modules/backend/joints.d.ts.map +1 -1
- package/dist/modules/backend/joints.js +14 -6
- package/dist/modules/backend/joints.js.map +1 -1
- package/dist/modules/backend/list-search.d.ts +33 -0
- package/dist/modules/backend/list-search.d.ts.map +1 -0
- package/dist/modules/backend/list-search.js +232 -0
- package/dist/modules/backend/list-search.js.map +1 -0
- package/dist/modules/backend/menus.d.ts.map +1 -1
- package/dist/modules/backend/menus.js +3 -12
- package/dist/modules/backend/menus.js.map +1 -1
- package/dist/modules/backend/messages.d.ts +1 -1
- package/dist/modules/backend/messages.d.ts.map +1 -1
- package/dist/modules/backend/messages.js +48 -35
- package/dist/modules/backend/messages.js.map +1 -1
- package/dist/modules/backend/paging.d.ts +1 -1
- package/dist/modules/backend/paging.d.ts.map +1 -1
- package/dist/modules/backend/paging.js +1 -1
- package/dist/modules/backend/paging.js.map +1 -1
- package/dist/modules/backend/relation-select.d.ts +2 -57
- package/dist/modules/backend/relation-select.d.ts.map +1 -1
- package/dist/modules/backend/relation-select.js +2 -0
- package/dist/modules/backend/relation-select.js.map +1 -1
- package/dist/modules/backend/routes.d.ts +1 -8
- package/dist/modules/backend/routes.d.ts.map +1 -1
- package/dist/modules/backend/routes.js +36 -111
- package/dist/modules/backend/routes.js.map +1 -1
- package/dist/modules/backend/screen.d.ts +130 -0
- package/dist/modules/backend/screen.d.ts.map +1 -0
- package/dist/modules/backend/screen.js +205 -0
- package/dist/modules/backend/screen.js.map +1 -0
- package/dist/modules/backend/screens.d.ts +11 -14
- package/dist/modules/backend/screens.d.ts.map +1 -1
- package/dist/modules/backend/screens.js +13 -70
- package/dist/modules/backend/screens.js.map +1 -1
- package/dist/modules/business_report_staff_channel/channel-routes.d.ts +2 -0
- package/dist/modules/business_report_staff_channel/channel-routes.d.ts.map +1 -0
- package/dist/modules/business_report_staff_channel/channel-routes.js +438 -0
- package/dist/modules/business_report_staff_channel/channel-routes.js.map +1 -0
- package/dist/modules/business_report_staff_channel/index.d.ts +5 -0
- package/dist/modules/business_report_staff_channel/index.d.ts.map +1 -0
- package/dist/modules/business_report_staff_channel/index.js +18 -0
- package/dist/modules/business_report_staff_channel/index.js.map +1 -0
- package/dist/modules/calendar/index.d.ts.map +1 -1
- package/dist/modules/calendar/index.js +0 -1
- package/dist/modules/calendar/index.js.map +1 -1
- package/dist/modules/calendar/recurrence.d.ts.map +1 -1
- package/dist/modules/calendar/recurrence.js +3 -11
- package/dist/modules/calendar/recurrence.js.map +1 -1
- package/dist/modules/calendar_activity/index.d.ts.map +1 -1
- package/dist/modules/calendar_activity/index.js +0 -2
- package/dist/modules/calendar_activity/index.js.map +1 -1
- package/dist/modules/calendar_backend/index.d.ts +1 -1
- package/dist/modules/calendar_backend/index.d.ts.map +1 -1
- package/dist/modules/calendar_backend/index.js +1 -3
- package/dist/modules/calendar_backend/index.js.map +1 -1
- package/dist/modules/calendar_backend/routes.d.ts.map +1 -1
- package/dist/modules/calendar_backend/routes.js +10 -22
- package/dist/modules/calendar_backend/routes.js.map +1 -1
- package/dist/modules/calendar_backend/screens/calendar.d.ts +5 -0
- package/dist/modules/calendar_backend/screens/calendar.d.ts.map +1 -0
- package/dist/modules/calendar_backend/screens/calendar.js +10 -0
- package/dist/modules/calendar_backend/screens/calendar.js.map +1 -0
- package/dist/modules/calendar_backend/screens/index.d.ts +2 -0
- package/dist/modules/calendar_backend/screens/index.d.ts.map +1 -0
- package/dist/modules/calendar_backend/screens/index.js +2 -0
- package/dist/modules/calendar_backend/screens/index.js.map +1 -0
- package/dist/modules/calendar_mail_transport/index.d.ts.map +1 -1
- package/dist/modules/calendar_mail_transport/index.js +0 -2
- package/dist/modules/calendar_mail_transport/index.js.map +1 -1
- package/dist/modules/channel_api/core.d.ts +253 -0
- package/dist/modules/channel_api/core.d.ts.map +1 -0
- package/dist/modules/channel_api/core.js +587 -0
- package/dist/modules/channel_api/core.js.map +1 -0
- package/dist/modules/channel_api/customer.d.ts +21 -0
- package/dist/modules/channel_api/customer.d.ts.map +1 -0
- package/dist/modules/channel_api/customer.js +368 -0
- package/dist/modules/channel_api/customer.js.map +1 -0
- package/dist/modules/channel_api/index.d.ts +6 -0
- package/dist/modules/channel_api/index.d.ts.map +1 -0
- package/dist/modules/channel_api/index.js +66 -0
- package/dist/modules/channel_api/index.js.map +1 -0
- package/dist/modules/channel_api/openapi.d.ts +17 -0
- package/dist/modules/channel_api/openapi.d.ts.map +1 -0
- package/dist/modules/channel_api/openapi.js +105 -0
- package/dist/modules/channel_api/openapi.js.map +1 -0
- package/dist/modules/channel_api/staff.d.ts +7 -0
- package/dist/modules/channel_api/staff.d.ts.map +1 -0
- package/dist/modules/channel_api/staff.js +209 -0
- package/dist/modules/channel_api/staff.js.map +1 -0
- package/dist/modules/company/functions.d.ts.map +1 -1
- package/dist/modules/company/functions.js +93 -12
- package/dist/modules/company/functions.js.map +1 -1
- package/dist/modules/company/index.js +3 -3
- package/dist/modules/company/index.js.map +1 -1
- package/dist/modules/company/messages.d.ts +8 -0
- package/dist/modules/company/messages.d.ts.map +1 -1
- package/dist/modules/company/messages.js +8 -0
- package/dist/modules/company/messages.js.map +1 -1
- package/dist/modules/company/models.d.ts +2 -2
- package/dist/modules/company/models.d.ts.map +1 -1
- package/dist/modules/company/models.js +12 -2
- package/dist/modules/company/models.js.map +1 -1
- package/dist/modules/company_backend/index.d.ts +2 -1
- package/dist/modules/company_backend/index.d.ts.map +1 -1
- package/dist/modules/company_backend/index.js +25 -4
- package/dist/modules/company_backend/index.js.map +1 -1
- package/dist/modules/company_backend/routes.d.ts.map +1 -1
- package/dist/modules/company_backend/routes.js +314 -96
- package/dist/modules/company_backend/routes.js.map +1 -1
- package/dist/modules/company_backend/screens/branch-form.d.ts +18 -0
- package/dist/modules/company_backend/screens/branch-form.d.ts.map +1 -0
- package/dist/modules/company_backend/screens/branch-form.js +63 -0
- package/dist/modules/company_backend/screens/branch-form.js.map +1 -0
- package/dist/modules/company_backend/screens/companies-list.d.ts +18 -0
- package/dist/modules/company_backend/screens/companies-list.d.ts.map +1 -0
- package/dist/modules/company_backend/screens/companies-list.js +49 -0
- package/dist/modules/company_backend/screens/companies-list.js.map +1 -0
- package/dist/modules/company_backend/screens/company-form.d.ts +25 -0
- package/dist/modules/company_backend/screens/company-form.d.ts.map +1 -0
- package/dist/modules/company_backend/screens/company-form.js +159 -0
- package/dist/modules/company_backend/screens/company-form.js.map +1 -0
- package/dist/modules/company_backend/screens/context.d.ts +30 -0
- package/dist/modules/company_backend/screens/context.d.ts.map +1 -0
- package/dist/modules/company_backend/screens/context.js +48 -0
- package/dist/modules/company_backend/screens/context.js.map +1 -0
- package/dist/modules/company_backend/screens/hierarchy.d.ts +16 -0
- package/dist/modules/company_backend/screens/hierarchy.d.ts.map +1 -0
- package/dist/modules/company_backend/screens/hierarchy.js +41 -0
- package/dist/modules/company_backend/screens/hierarchy.js.map +1 -0
- package/dist/modules/company_backend/screens/index.d.ts +7 -0
- package/dist/modules/company_backend/screens/index.d.ts.map +1 -0
- package/dist/modules/company_backend/screens/index.js +6 -0
- package/dist/modules/company_backend/screens/index.js.map +1 -0
- package/dist/modules/company_backend/screens/types.d.ts +22 -0
- package/dist/modules/company_backend/screens/types.d.ts.map +1 -0
- package/dist/modules/company_backend/screens/types.js +2 -0
- package/dist/modules/company_backend/screens/types.js.map +1 -0
- package/dist/modules/crm/functions.d.ts +1 -1
- package/dist/modules/crm/functions.d.ts.map +1 -1
- package/dist/modules/crm/functions.js +534 -75
- package/dist/modules/crm/functions.js.map +1 -1
- package/dist/modules/crm/index.d.ts +2 -1
- package/dist/modules/crm/index.d.ts.map +1 -1
- package/dist/modules/crm/index.js +3 -4
- package/dist/modules/crm/index.js.map +1 -1
- package/dist/modules/crm/jobs.d.ts +10 -0
- package/dist/modules/crm/jobs.d.ts.map +1 -1
- package/dist/modules/crm/jobs.js +50 -1
- package/dist/modules/crm/jobs.js.map +1 -1
- package/dist/modules/crm/messages.d.ts +14 -1
- package/dist/modules/crm/messages.d.ts.map +1 -1
- package/dist/modules/crm/messages.js +26 -0
- package/dist/modules/crm/messages.js.map +1 -1
- package/dist/modules/crm/models.d.ts.map +1 -1
- package/dist/modules/crm/models.js +25 -0
- package/dist/modules/crm/models.js.map +1 -1
- package/dist/modules/crm/operations.d.ts +110 -1
- package/dist/modules/crm/operations.d.ts.map +1 -1
- package/dist/modules/crm/operations.js +612 -84
- package/dist/modules/crm/operations.js.map +1 -1
- package/dist/modules/crm_backend/client/crm-kanban-view.d.mts.map +1 -1
- package/dist/modules/crm_backend/client/crm-kanban-view.mjs +132 -32
- package/dist/modules/crm_backend/client/crm-kanban-view.mjs.map +1 -1
- package/dist/modules/crm_backend/client/crm.css +398 -63
- package/dist/modules/crm_backend/index.d.ts.map +1 -1
- package/dist/modules/crm_backend/index.js +12 -4
- package/dist/modules/crm_backend/index.js.map +1 -1
- package/dist/modules/crm_backend/messages.d.ts +212 -0
- package/dist/modules/crm_backend/messages.d.ts.map +1 -1
- package/dist/modules/crm_backend/messages.js +212 -0
- package/dist/modules/crm_backend/messages.js.map +1 -1
- package/dist/modules/crm_backend/relation-control.d.ts +51 -0
- package/dist/modules/crm_backend/relation-control.d.ts.map +1 -0
- package/dist/modules/crm_backend/relation-control.js +107 -0
- package/dist/modules/crm_backend/relation-control.js.map +1 -0
- package/dist/modules/crm_backend/routes.d.ts.map +1 -1
- package/dist/modules/crm_backend/routes.js +1068 -260
- package/dist/modules/crm_backend/routes.js.map +1 -1
- package/dist/modules/crm_backend/screens/activity-planner.d.ts +22 -0
- package/dist/modules/crm_backend/screens/activity-planner.d.ts.map +1 -0
- package/dist/modules/crm_backend/screens/activity-planner.js +159 -0
- package/dist/modules/crm_backend/screens/activity-planner.js.map +1 -0
- package/dist/modules/crm_backend/screens/case-create.d.ts +15 -0
- package/dist/modules/crm_backend/screens/case-create.d.ts.map +1 -0
- package/dist/modules/crm_backend/screens/case-create.js +19 -0
- package/dist/modules/crm_backend/screens/case-create.js.map +1 -0
- package/dist/modules/crm_backend/screens/case-detail.d.ts +46 -0
- package/dist/modules/crm_backend/screens/case-detail.d.ts.map +1 -0
- package/dist/modules/crm_backend/screens/case-detail.js +506 -0
- package/dist/modules/crm_backend/screens/case-detail.js.map +1 -0
- package/dist/modules/crm_backend/screens/cases-list.d.ts +16 -0
- package/dist/modules/crm_backend/screens/cases-list.d.ts.map +1 -0
- package/dist/modules/crm_backend/screens/cases-list.js +86 -0
- package/dist/modules/crm_backend/screens/cases-list.js.map +1 -0
- package/dist/modules/crm_backend/screens/configuration.d.ts +28 -0
- package/dist/modules/crm_backend/screens/configuration.d.ts.map +1 -0
- package/dist/modules/crm_backend/screens/configuration.js +115 -0
- package/dist/modules/crm_backend/screens/configuration.js.map +1 -0
- package/dist/modules/crm_backend/screens/index.d.ts +14 -0
- package/dist/modules/crm_backend/screens/index.d.ts.map +1 -0
- package/dist/modules/crm_backend/screens/index.js +8 -0
- package/dist/modules/crm_backend/screens/index.js.map +1 -0
- package/dist/modules/crm_backend/screens/leaderboard.d.ts +12 -0
- package/dist/modules/crm_backend/screens/leaderboard.d.ts.map +1 -0
- package/dist/modules/crm_backend/screens/leaderboard.js +89 -0
- package/dist/modules/crm_backend/screens/leaderboard.js.map +1 -0
- package/dist/modules/crm_backend/screens/pipeline.d.ts +21 -0
- package/dist/modules/crm_backend/screens/pipeline.d.ts.map +1 -0
- package/dist/modules/crm_backend/screens/pipeline.js +22 -0
- package/dist/modules/crm_backend/screens/pipeline.js.map +1 -0
- package/dist/modules/crm_sale/index.d.ts.map +1 -1
- package/dist/modules/crm_sale/index.js +3 -4
- package/dist/modules/crm_sale/index.js.map +1 -1
- package/dist/modules/crm_sale/messages.d.ts +3 -1
- package/dist/modules/crm_sale/messages.d.ts.map +1 -1
- package/dist/modules/crm_sale/messages.js +4 -0
- package/dist/modules/crm_sale/messages.js.map +1 -1
- package/dist/modules/crm_sale/sale-functions.d.ts +8 -1
- package/dist/modules/crm_sale/sale-functions.d.ts.map +1 -1
- package/dist/modules/crm_sale/sale-functions.js +184 -55
- package/dist/modules/crm_sale/sale-functions.js.map +1 -1
- package/dist/modules/crm_staff_channel/channel-routes.d.ts +2 -0
- package/dist/modules/crm_staff_channel/channel-routes.d.ts.map +1 -0
- package/dist/modules/crm_staff_channel/channel-routes.js +788 -0
- package/dist/modules/crm_staff_channel/channel-routes.js.map +1 -0
- package/dist/modules/crm_staff_channel/index.d.ts +5 -0
- package/dist/modules/crm_staff_channel/index.d.ts.map +1 -0
- package/dist/modules/crm_staff_channel/index.js +30 -0
- package/dist/modules/crm_staff_channel/index.js.map +1 -0
- package/dist/modules/crm_website/functions.d.ts.map +1 -1
- package/dist/modules/crm_website/functions.js +89 -10
- package/dist/modules/crm_website/functions.js.map +1 -1
- package/dist/modules/crm_website/index.js +1 -2
- package/dist/modules/crm_website/index.js.map +1 -1
- package/dist/modules/crm_website/messages.d.ts +4 -1
- package/dist/modules/crm_website/messages.d.ts.map +1 -1
- package/dist/modules/crm_website/messages.js +6 -0
- package/dist/modules/crm_website/messages.js.map +1 -1
- package/dist/modules/crm_website/models.d.ts.map +1 -1
- package/dist/modules/crm_website/models.js +18 -0
- package/dist/modules/crm_website/models.js.map +1 -1
- package/dist/modules/crm_website/routes.d.ts.map +1 -1
- package/dist/modules/crm_website/routes.js +44 -12
- package/dist/modules/crm_website/routes.js.map +1 -1
- package/dist/modules/crm_website/screens.d.ts +7 -1
- package/dist/modules/crm_website/screens.d.ts.map +1 -1
- package/dist/modules/crm_website/screens.js +13 -8
- package/dist/modules/crm_website/screens.js.map +1 -1
- package/dist/modules/flow/functions.d.ts +3 -0
- package/dist/modules/flow/functions.d.ts.map +1 -0
- package/dist/modules/flow/functions.js +1876 -0
- package/dist/modules/flow/functions.js.map +1 -0
- package/dist/modules/flow/index.d.ts +12 -0
- package/dist/modules/flow/index.d.ts.map +1 -0
- package/dist/modules/flow/index.js +30 -0
- package/dist/modules/flow/index.js.map +1 -0
- package/dist/modules/flow/jobs.d.ts +3 -0
- package/dist/modules/flow/jobs.d.ts.map +1 -0
- package/dist/modules/flow/jobs.js +136 -0
- package/dist/modules/flow/jobs.js.map +1 -0
- package/dist/modules/flow/membership.d.ts +72 -0
- package/dist/modules/flow/membership.d.ts.map +1 -0
- package/dist/modules/flow/membership.js +176 -0
- package/dist/modules/flow/membership.js.map +1 -0
- package/dist/modules/flow/messages.d.ts +79 -0
- package/dist/modules/flow/messages.d.ts.map +1 -0
- package/dist/modules/flow/messages.js +152 -0
- package/dist/modules/flow/messages.js.map +1 -0
- package/dist/modules/flow/models.d.ts +3 -0
- package/dist/modules/flow/models.d.ts.map +1 -0
- package/dist/modules/flow/models.js +453 -0
- package/dist/modules/flow/models.js.map +1 -0
- package/dist/modules/flow/operations.d.ts +408 -0
- package/dist/modules/flow/operations.d.ts.map +1 -0
- package/dist/modules/flow/operations.js +1665 -0
- package/dist/modules/flow/operations.js.map +1 -0
- package/dist/modules/flow/pages.d.ts +146 -0
- package/dist/modules/flow/pages.d.ts.map +1 -0
- package/dist/modules/flow/pages.js +394 -0
- package/dist/modules/flow/pages.js.map +1 -0
- package/dist/modules/flow/projects.d.ts +41 -0
- package/dist/modules/flow/projects.d.ts.map +1 -0
- package/dist/modules/flow/projects.js +74 -0
- package/dist/modules/flow/projects.js.map +1 -0
- package/dist/modules/flow/search.d.ts +57 -0
- package/dist/modules/flow/search.d.ts.map +1 -0
- package/dist/modules/flow/search.js +110 -0
- package/dist/modules/flow/search.js.map +1 -0
- package/dist/modules/flow/types.d.ts +17 -0
- package/dist/modules/flow/types.d.ts.map +1 -0
- package/dist/modules/flow/types.js +13 -0
- package/dist/modules/flow/types.js.map +1 -0
- package/dist/modules/flow_backend/functions.d.ts +3 -0
- package/dist/modules/flow_backend/functions.d.ts.map +1 -0
- package/dist/modules/flow_backend/functions.js +162 -0
- package/dist/modules/flow_backend/functions.js.map +1 -0
- package/dist/modules/flow_backend/index.d.ts +3 -0
- package/dist/modules/flow_backend/index.d.ts.map +1 -0
- package/dist/modules/flow_backend/index.js +96 -0
- package/dist/modules/flow_backend/index.js.map +1 -0
- package/dist/modules/flow_backend/islands.d.ts +3 -0
- package/dist/modules/flow_backend/islands.d.ts.map +1 -0
- package/dist/modules/flow_backend/islands.js +31 -0
- package/dist/modules/flow_backend/islands.js.map +1 -0
- package/dist/modules/flow_backend/messages.d.ts +248 -0
- package/dist/modules/flow_backend/messages.d.ts.map +1 -0
- package/dist/modules/flow_backend/messages.js +470 -0
- package/dist/modules/flow_backend/messages.js.map +1 -0
- package/dist/modules/flow_backend/relation-control.d.ts +53 -0
- package/dist/modules/flow_backend/relation-control.d.ts.map +1 -0
- package/dist/modules/flow_backend/relation-control.js +106 -0
- package/dist/modules/flow_backend/relation-control.js.map +1 -0
- package/dist/modules/flow_backend/routes.d.ts +3 -0
- package/dist/modules/flow_backend/routes.d.ts.map +1 -0
- package/dist/modules/flow_backend/routes.js +2519 -0
- package/dist/modules/flow_backend/routes.js.map +1 -0
- package/dist/modules/flow_backend/screens/all-epics.d.ts +19 -0
- package/dist/modules/flow_backend/screens/all-epics.d.ts.map +1 -0
- package/dist/modules/flow_backend/screens/all-epics.js +59 -0
- package/dist/modules/flow_backend/screens/all-epics.js.map +1 -0
- package/dist/modules/flow_backend/screens/all-pages.d.ts +19 -0
- package/dist/modules/flow_backend/screens/all-pages.d.ts.map +1 -0
- package/dist/modules/flow_backend/screens/all-pages.js +65 -0
- package/dist/modules/flow_backend/screens/all-pages.js.map +1 -0
- package/dist/modules/flow_backend/screens/board.d.ts +5 -0
- package/dist/modules/flow_backend/screens/board.d.ts.map +1 -0
- package/dist/modules/flow_backend/screens/board.js +7 -0
- package/dist/modules/flow_backend/screens/board.js.map +1 -0
- package/dist/modules/flow_backend/screens/epic-detail.d.ts +22 -0
- package/dist/modules/flow_backend/screens/epic-detail.d.ts.map +1 -0
- package/dist/modules/flow_backend/screens/epic-detail.js +41 -0
- package/dist/modules/flow_backend/screens/epic-detail.js.map +1 -0
- package/dist/modules/flow_backend/screens/gantt.d.ts +21 -0
- package/dist/modules/flow_backend/screens/gantt.d.ts.map +1 -0
- package/dist/modules/flow_backend/screens/gantt.js +42 -0
- package/dist/modules/flow_backend/screens/gantt.js.map +1 -0
- package/dist/modules/flow_backend/screens/index.d.ts +29 -0
- package/dist/modules/flow_backend/screens/index.d.ts.map +1 -0
- package/dist/modules/flow_backend/screens/index.js +23 -0
- package/dist/modules/flow_backend/screens/index.js.map +1 -0
- package/dist/modules/flow_backend/screens/issue-detail.d.ts +38 -0
- package/dist/modules/flow_backend/screens/issue-detail.d.ts.map +1 -0
- package/dist/modules/flow_backend/screens/issue-detail.js +336 -0
- package/dist/modules/flow_backend/screens/issue-detail.js.map +1 -0
- package/dist/modules/flow_backend/screens/issues.d.ts +34 -0
- package/dist/modules/flow_backend/screens/issues.d.ts.map +1 -0
- package/dist/modules/flow_backend/screens/issues.js +118 -0
- package/dist/modules/flow_backend/screens/issues.js.map +1 -0
- package/dist/modules/flow_backend/screens/map.d.ts +13 -0
- package/dist/modules/flow_backend/screens/map.d.ts.map +1 -0
- package/dist/modules/flow_backend/screens/map.js +16 -0
- package/dist/modules/flow_backend/screens/map.js.map +1 -0
- package/dist/modules/flow_backend/screens/my-work.d.ts +42 -0
- package/dist/modules/flow_backend/screens/my-work.d.ts.map +1 -0
- package/dist/modules/flow_backend/screens/my-work.js +157 -0
- package/dist/modules/flow_backend/screens/my-work.js.map +1 -0
- package/dist/modules/flow_backend/screens/nav.d.ts +3 -0
- package/dist/modules/flow_backend/screens/nav.d.ts.map +1 -0
- package/dist/modules/flow_backend/screens/nav.js +79 -0
- package/dist/modules/flow_backend/screens/nav.js.map +1 -0
- package/dist/modules/flow_backend/screens/page-detail.d.ts +31 -0
- package/dist/modules/flow_backend/screens/page-detail.d.ts.map +1 -0
- package/dist/modules/flow_backend/screens/page-detail.js +113 -0
- package/dist/modules/flow_backend/screens/page-detail.js.map +1 -0
- package/dist/modules/flow_backend/screens/project-create.d.ts +26 -0
- package/dist/modules/flow_backend/screens/project-create.d.ts.map +1 -0
- package/dist/modules/flow_backend/screens/project-create.js +56 -0
- package/dist/modules/flow_backend/screens/project-create.js.map +1 -0
- package/dist/modules/flow_backend/screens/project-epics.d.ts +33 -0
- package/dist/modules/flow_backend/screens/project-epics.d.ts.map +1 -0
- package/dist/modules/flow_backend/screens/project-epics.js +90 -0
- package/dist/modules/flow_backend/screens/project-epics.js.map +1 -0
- package/dist/modules/flow_backend/screens/project-pages.d.ts +34 -0
- package/dist/modules/flow_backend/screens/project-pages.d.ts.map +1 -0
- package/dist/modules/flow_backend/screens/project-pages.js +66 -0
- package/dist/modules/flow_backend/screens/project-pages.js.map +1 -0
- package/dist/modules/flow_backend/screens/project-settings.d.ts +69 -0
- package/dist/modules/flow_backend/screens/project-settings.d.ts.map +1 -0
- package/dist/modules/flow_backend/screens/project-settings.js +248 -0
- package/dist/modules/flow_backend/screens/project-settings.js.map +1 -0
- package/dist/modules/flow_backend/screens/projects-list.d.ts +30 -0
- package/dist/modules/flow_backend/screens/projects-list.d.ts.map +1 -0
- package/dist/modules/flow_backend/screens/projects-list.js +121 -0
- package/dist/modules/flow_backend/screens/projects-list.js.map +1 -0
- package/dist/modules/flow_backend/screens/shared.d.ts +28 -0
- package/dist/modules/flow_backend/screens/shared.d.ts.map +1 -0
- package/dist/modules/flow_backend/screens/shared.js +46 -0
- package/dist/modules/flow_backend/screens/shared.js.map +1 -0
- package/dist/modules/flow_backend/screens/sprints.d.ts +33 -0
- package/dist/modules/flow_backend/screens/sprints.d.ts.map +1 -0
- package/dist/modules/flow_backend/screens/sprints.js +159 -0
- package/dist/modules/flow_backend/screens/sprints.js.map +1 -0
- package/dist/modules/flow_staff_channel/channel-routes.d.ts +2 -0
- package/dist/modules/flow_staff_channel/channel-routes.d.ts.map +1 -0
- package/dist/modules/flow_staff_channel/channel-routes.js +444 -0
- package/dist/modules/flow_staff_channel/channel-routes.js.map +1 -0
- package/dist/modules/flow_staff_channel/index.d.ts +5 -0
- package/dist/modules/flow_staff_channel/index.d.ts.map +1 -0
- package/dist/modules/flow_staff_channel/index.js +30 -0
- package/dist/modules/flow_staff_channel/index.js.map +1 -0
- package/dist/modules/hospitality_billing/functions.d.ts +18 -0
- package/dist/modules/hospitality_billing/functions.d.ts.map +1 -0
- package/dist/modules/hospitality_billing/functions.js +426 -0
- package/dist/modules/hospitality_billing/functions.js.map +1 -0
- package/dist/modules/hospitality_billing/index.d.ts +3 -0
- package/dist/modules/hospitality_billing/index.d.ts.map +1 -0
- package/dist/modules/hospitality_billing/index.js +25 -0
- package/dist/modules/hospitality_billing/index.js.map +1 -0
- package/dist/modules/hospitality_billing/jobs.d.ts +17 -0
- package/dist/modules/hospitality_billing/jobs.d.ts.map +1 -0
- package/dist/modules/hospitality_billing/jobs.js +83 -0
- package/dist/modules/hospitality_billing/jobs.js.map +1 -0
- package/dist/modules/hospitality_billing/menus.d.ts +9 -0
- package/dist/modules/hospitality_billing/menus.d.ts.map +1 -0
- package/dist/modules/hospitality_billing/menus.js +25 -0
- package/dist/modules/hospitality_billing/menus.js.map +1 -0
- package/dist/modules/hospitality_billing/messages.d.ts +3 -0
- package/dist/modules/hospitality_billing/messages.d.ts.map +1 -0
- package/dist/modules/hospitality_billing/messages.js +163 -0
- package/dist/modules/hospitality_billing/messages.js.map +1 -0
- package/dist/modules/hospitality_billing/models.d.ts +3 -0
- package/dist/modules/hospitality_billing/models.d.ts.map +1 -0
- package/dist/modules/hospitality_billing/models.js +65 -0
- package/dist/modules/hospitality_billing/models.js.map +1 -0
- package/dist/modules/hospitality_billing/routes.d.ts +3 -0
- package/dist/modules/hospitality_billing/routes.d.ts.map +1 -0
- package/dist/modules/hospitality_billing/routes.js +189 -0
- package/dist/modules/hospitality_billing/routes.js.map +1 -0
- package/dist/modules/hospitality_billing/screens/billing.d.ts +3 -0
- package/dist/modules/hospitality_billing/screens/billing.d.ts.map +1 -0
- package/dist/modules/hospitality_billing/screens/billing.js +20 -0
- package/dist/modules/hospitality_billing/screens/billing.js.map +1 -0
- package/dist/modules/hospitality_billing/screens/charge-rules.d.ts +12 -0
- package/dist/modules/hospitality_billing/screens/charge-rules.d.ts.map +1 -0
- package/dist/modules/hospitality_billing/screens/charge-rules.js +86 -0
- package/dist/modules/hospitality_billing/screens/charge-rules.js.map +1 -0
- package/dist/modules/hospitality_billing/screens/index.d.ts +4 -0
- package/dist/modules/hospitality_billing/screens/index.d.ts.map +1 -0
- package/dist/modules/hospitality_billing/screens/index.js +4 -0
- package/dist/modules/hospitality_billing/screens/index.js.map +1 -0
- package/dist/modules/hospitality_billing/screens/page-frame.d.ts +14 -0
- package/dist/modules/hospitality_billing/screens/page-frame.d.ts.map +1 -0
- package/dist/modules/hospitality_billing/screens/page-frame.js +6 -0
- package/dist/modules/hospitality_billing/screens/page-frame.js.map +1 -0
- package/dist/modules/hospitality_billing/screens/shared.d.ts +64 -0
- package/dist/modules/hospitality_billing/screens/shared.d.ts.map +1 -0
- package/dist/modules/hospitality_billing/screens/shared.js +117 -0
- package/dist/modules/hospitality_billing/screens/shared.js.map +1 -0
- package/dist/modules/hospitality_core/calendar.d.ts.map +1 -1
- package/dist/modules/hospitality_core/calendar.js +2 -1
- package/dist/modules/hospitality_core/calendar.js.map +1 -1
- package/dist/modules/hospitality_core/functions.d.ts.map +1 -1
- package/dist/modules/hospitality_core/functions.js +114 -14
- package/dist/modules/hospitality_core/functions.js.map +1 -1
- package/dist/modules/hospitality_core/index.d.ts +2 -2
- package/dist/modules/hospitality_core/index.d.ts.map +1 -1
- package/dist/modules/hospitality_core/index.js +3 -2
- package/dist/modules/hospitality_core/index.js.map +1 -1
- package/dist/modules/hospitality_core/inventory.d.ts +53 -4
- package/dist/modules/hospitality_core/inventory.d.ts.map +1 -1
- package/dist/modules/hospitality_core/inventory.js +121 -14
- package/dist/modules/hospitality_core/inventory.js.map +1 -1
- package/dist/modules/hospitality_core/menus.d.ts.map +1 -1
- package/dist/modules/hospitality_core/menus.js +31 -0
- package/dist/modules/hospitality_core/menus.js.map +1 -1
- package/dist/modules/hospitality_core/messages.d.ts.map +1 -1
- package/dist/modules/hospitality_core/messages.js +383 -183
- package/dist/modules/hospitality_core/messages.js.map +1 -1
- package/dist/modules/hospitality_core/models.d.ts +1 -1
- package/dist/modules/hospitality_core/models.d.ts.map +1 -1
- package/dist/modules/hospitality_core/models.js +47 -2
- package/dist/modules/hospitality_core/models.js.map +1 -1
- package/dist/modules/hospitality_core/night-audit.d.ts +1 -0
- package/dist/modules/hospitality_core/night-audit.d.ts.map +1 -1
- package/dist/modules/hospitality_core/night-audit.js +39 -1
- package/dist/modules/hospitality_core/night-audit.js.map +1 -1
- package/dist/modules/hospitality_core/online-booking.d.ts +5 -0
- package/dist/modules/hospitality_core/online-booking.d.ts.map +1 -0
- package/dist/modules/hospitality_core/online-booking.js +775 -0
- package/dist/modules/hospitality_core/online-booking.js.map +1 -0
- package/dist/modules/hospitality_core/operations.d.ts +21 -1
- package/dist/modules/hospitality_core/operations.d.ts.map +1 -1
- package/dist/modules/hospitality_core/operations.js +432 -67
- package/dist/modules/hospitality_core/operations.js.map +1 -1
- package/dist/modules/hospitality_core/routes.d.ts.map +1 -1
- package/dist/modules/hospitality_core/routes.js +503 -106
- package/dist/modules/hospitality_core/routes.js.map +1 -1
- package/dist/modules/hospitality_core/screens/amenities.d.ts +10 -0
- package/dist/modules/hospitality_core/screens/amenities.d.ts.map +1 -0
- package/dist/modules/hospitality_core/screens/amenities.js +65 -0
- package/dist/modules/hospitality_core/screens/amenities.js.map +1 -0
- package/dist/modules/hospitality_core/screens/building-detail.d.ts +3 -0
- package/dist/modules/hospitality_core/screens/building-detail.d.ts.map +1 -0
- package/dist/modules/hospitality_core/screens/building-detail.js +69 -0
- package/dist/modules/hospitality_core/screens/building-detail.js.map +1 -0
- package/dist/modules/hospitality_core/screens/cleaning-task-detail.d.ts +7 -0
- package/dist/modules/hospitality_core/screens/cleaning-task-detail.d.ts.map +1 -0
- package/dist/modules/hospitality_core/screens/cleaning-task-detail.js +109 -0
- package/dist/modules/hospitality_core/screens/cleaning-task-detail.js.map +1 -0
- package/dist/modules/hospitality_core/screens/cleaning-tasks.d.ts +20 -0
- package/dist/modules/hospitality_core/screens/cleaning-tasks.d.ts.map +1 -0
- package/dist/modules/hospitality_core/screens/cleaning-tasks.js +139 -0
- package/dist/modules/hospitality_core/screens/cleaning-tasks.js.map +1 -0
- package/dist/modules/hospitality_core/screens/content.d.ts +3 -0
- package/dist/modules/hospitality_core/screens/content.d.ts.map +1 -0
- package/dist/modules/hospitality_core/screens/content.js +114 -0
- package/dist/modules/hospitality_core/screens/content.js.map +1 -0
- package/dist/modules/hospitality_core/screens/floor-detail.d.ts +3 -0
- package/dist/modules/hospitality_core/screens/floor-detail.d.ts.map +1 -0
- package/dist/modules/hospitality_core/screens/floor-detail.js +74 -0
- package/dist/modules/hospitality_core/screens/floor-detail.js.map +1 -0
- package/dist/modules/hospitality_core/screens/folio-detail.d.ts +3 -0
- package/dist/modules/hospitality_core/screens/folio-detail.d.ts.map +1 -0
- package/dist/modules/hospitality_core/screens/folio-detail.js +142 -0
- package/dist/modules/hospitality_core/screens/folio-detail.js.map +1 -0
- package/dist/modules/hospitality_core/screens/folios.d.ts +3 -0
- package/dist/modules/hospitality_core/screens/folios.d.ts.map +1 -0
- package/dist/modules/hospitality_core/screens/folios.js +7 -0
- package/dist/modules/hospitality_core/screens/folios.js.map +1 -0
- package/dist/modules/hospitality_core/screens/front-desk.d.ts +35 -0
- package/dist/modules/hospitality_core/screens/front-desk.d.ts.map +1 -0
- package/dist/modules/hospitality_core/screens/front-desk.js +195 -0
- package/dist/modules/hospitality_core/screens/front-desk.js.map +1 -0
- package/dist/modules/hospitality_core/screens/housekeeping-room-detail.d.ts +3 -0
- package/dist/modules/hospitality_core/screens/housekeeping-room-detail.d.ts.map +1 -0
- package/dist/modules/hospitality_core/screens/housekeeping-room-detail.js +121 -0
- package/dist/modules/hospitality_core/screens/housekeeping-room-detail.js.map +1 -0
- package/dist/modules/hospitality_core/screens/housekeeping-rooms.d.ts +9 -0
- package/dist/modules/hospitality_core/screens/housekeeping-rooms.d.ts.map +1 -0
- package/dist/modules/hospitality_core/screens/housekeeping-rooms.js +54 -0
- package/dist/modules/hospitality_core/screens/housekeeping-rooms.js.map +1 -0
- package/dist/modules/hospitality_core/screens/index.d.ts +33 -0
- package/dist/modules/hospitality_core/screens/index.d.ts.map +1 -0
- package/dist/modules/hospitality_core/screens/index.js +33 -0
- package/dist/modules/hospitality_core/screens/index.js.map +1 -0
- package/dist/modules/hospitality_core/screens/inventory.d.ts +8 -0
- package/dist/modules/hospitality_core/screens/inventory.d.ts.map +1 -0
- package/dist/modules/hospitality_core/screens/inventory.js +122 -0
- package/dist/modules/hospitality_core/screens/inventory.js.map +1 -0
- package/dist/modules/hospitality_core/screens/new-property.d.ts +3 -0
- package/dist/modules/hospitality_core/screens/new-property.d.ts.map +1 -0
- package/dist/modules/hospitality_core/screens/new-property.js +8 -0
- package/dist/modules/hospitality_core/screens/new-property.js.map +1 -0
- package/dist/modules/hospitality_core/screens/new-room-type.d.ts +3 -0
- package/dist/modules/hospitality_core/screens/new-room-type.d.ts.map +1 -0
- package/dist/modules/hospitality_core/screens/new-room-type.js +8 -0
- package/dist/modules/hospitality_core/screens/new-room-type.js.map +1 -0
- package/dist/modules/hospitality_core/screens/new-room.d.ts +3 -0
- package/dist/modules/hospitality_core/screens/new-room.d.ts.map +1 -0
- package/dist/modules/hospitality_core/screens/new-room.js +8 -0
- package/dist/modules/hospitality_core/screens/new-room.js.map +1 -0
- package/dist/modules/hospitality_core/screens/night-audit.d.ts +10 -0
- package/dist/modules/hospitality_core/screens/night-audit.d.ts.map +1 -0
- package/dist/modules/hospitality_core/screens/night-audit.js +67 -0
- package/dist/modules/hospitality_core/screens/night-audit.js.map +1 -0
- package/dist/modules/hospitality_core/screens/page-frame.d.ts +15 -0
- package/dist/modules/hospitality_core/screens/page-frame.d.ts.map +1 -0
- package/dist/modules/hospitality_core/screens/page-frame.js +10 -0
- package/dist/modules/hospitality_core/screens/page-frame.js.map +1 -0
- package/dist/modules/hospitality_core/screens/policies.d.ts +10 -0
- package/dist/modules/hospitality_core/screens/policies.d.ts.map +1 -0
- package/dist/modules/hospitality_core/screens/policies.js +72 -0
- package/dist/modules/hospitality_core/screens/policies.js.map +1 -0
- package/dist/modules/hospitality_core/screens/properties.d.ts +7 -0
- package/dist/modules/hospitality_core/screens/properties.d.ts.map +1 -0
- package/dist/modules/hospitality_core/screens/properties.js +45 -0
- package/dist/modules/hospitality_core/screens/properties.js.map +1 -0
- package/dist/modules/hospitality_core/screens/property-detail.d.ts +3 -0
- package/dist/modules/hospitality_core/screens/property-detail.d.ts.map +1 -0
- package/dist/modules/hospitality_core/screens/property-detail.js +92 -0
- package/dist/modules/hospitality_core/screens/property-detail.js.map +1 -0
- package/dist/modules/hospitality_core/screens/rate-plans.d.ts +10 -0
- package/dist/modules/hospitality_core/screens/rate-plans.d.ts.map +1 -0
- package/dist/modules/hospitality_core/screens/rate-plans.js +123 -0
- package/dist/modules/hospitality_core/screens/rate-plans.js.map +1 -0
- package/dist/modules/hospitality_core/screens/reservation-detail.d.ts +11 -0
- package/dist/modules/hospitality_core/screens/reservation-detail.d.ts.map +1 -0
- package/dist/modules/hospitality_core/screens/reservation-detail.js +237 -0
- package/dist/modules/hospitality_core/screens/reservation-detail.js.map +1 -0
- package/dist/modules/hospitality_core/screens/reservations.d.ts +17 -0
- package/dist/modules/hospitality_core/screens/reservations.d.ts.map +1 -0
- package/dist/modules/hospitality_core/screens/reservations.js +166 -0
- package/dist/modules/hospitality_core/screens/reservations.js.map +1 -0
- package/dist/modules/hospitality_core/screens/room-detail.d.ts +3 -0
- package/dist/modules/hospitality_core/screens/room-detail.d.ts.map +1 -0
- package/dist/modules/hospitality_core/screens/room-detail.js +75 -0
- package/dist/modules/hospitality_core/screens/room-detail.js.map +1 -0
- package/dist/modules/hospitality_core/screens/room-type-detail.d.ts +3 -0
- package/dist/modules/hospitality_core/screens/room-type-detail.d.ts.map +1 -0
- package/dist/modules/hospitality_core/screens/room-type-detail.js +91 -0
- package/dist/modules/hospitality_core/screens/room-type-detail.js.map +1 -0
- package/dist/modules/hospitality_core/screens/room-types.d.ts +3 -0
- package/dist/modules/hospitality_core/screens/room-types.d.ts.map +1 -0
- package/dist/modules/hospitality_core/screens/room-types.js +61 -0
- package/dist/modules/hospitality_core/screens/room-types.js.map +1 -0
- package/dist/modules/hospitality_core/screens/rooms.d.ts +10 -0
- package/dist/modules/hospitality_core/screens/rooms.d.ts.map +1 -0
- package/dist/modules/hospitality_core/screens/rooms.js +150 -0
- package/dist/modules/hospitality_core/screens/rooms.js.map +1 -0
- package/dist/modules/hospitality_core/screens/services.d.ts +18 -0
- package/dist/modules/hospitality_core/screens/services.d.ts.map +1 -0
- package/dist/modules/hospitality_core/screens/services.js +196 -0
- package/dist/modules/hospitality_core/screens/services.js.map +1 -0
- package/dist/modules/hospitality_core/screens/shared.d.ts +777 -0
- package/dist/modules/hospitality_core/screens/shared.d.ts.map +1 -0
- package/dist/modules/hospitality_core/screens/shared.js +1586 -0
- package/dist/modules/hospitality_core/screens/shared.js.map +1 -0
- package/dist/modules/hospitality_core/screens/stay-detail.d.ts +3 -0
- package/dist/modules/hospitality_core/screens/stay-detail.d.ts.map +1 -0
- package/dist/modules/hospitality_core/screens/stay-detail.js +233 -0
- package/dist/modules/hospitality_core/screens/stay-detail.js.map +1 -0
- package/dist/modules/hospitality_core/screens/stay-notices.d.ts +9 -0
- package/dist/modules/hospitality_core/screens/stay-notices.d.ts.map +1 -0
- package/dist/modules/hospitality_core/screens/stay-notices.js +87 -0
- package/dist/modules/hospitality_core/screens/stay-notices.js.map +1 -0
- package/dist/modules/hospitality_core/screens/stays.d.ts +3 -0
- package/dist/modules/hospitality_core/screens/stays.d.ts.map +1 -0
- package/dist/modules/hospitality_core/screens/stays.js +7 -0
- package/dist/modules/hospitality_core/screens/stays.js.map +1 -0
- package/dist/modules/hospitality_core/screens/tape-chart.d.ts +7 -0
- package/dist/modules/hospitality_core/screens/tape-chart.d.ts.map +1 -0
- package/dist/modules/hospitality_core/screens/tape-chart.js +99 -0
- package/dist/modules/hospitality_core/screens/tape-chart.js.map +1 -0
- package/dist/modules/hospitality_core/services.d.ts.map +1 -1
- package/dist/modules/hospitality_core/services.js +133 -30
- package/dist/modules/hospitality_core/services.js.map +1 -1
- package/dist/modules/hospitality_core/stay-notices.js +2 -2
- package/dist/modules/hospitality_core/stay-notices.js.map +1 -1
- package/dist/modules/hospitality_core/types.d.ts +26 -5
- package/dist/modules/hospitality_core/types.d.ts.map +1 -1
- package/dist/modules/hospitality_core/types.js +47 -5
- package/dist/modules/hospitality_core/types.js.map +1 -1
- package/dist/modules/hospitality_staff_channel/channel-routes.d.ts +2 -0
- package/dist/modules/hospitality_staff_channel/channel-routes.d.ts.map +1 -0
- package/dist/modules/hospitality_staff_channel/channel-routes.js +1227 -0
- package/dist/modules/hospitality_staff_channel/channel-routes.js.map +1 -0
- package/dist/modules/hospitality_staff_channel/index.d.ts +5 -0
- package/dist/modules/hospitality_staff_channel/index.d.ts.map +1 -0
- package/dist/modules/hospitality_staff_channel/index.js +34 -0
- package/dist/modules/hospitality_staff_channel/index.js.map +1 -0
- package/dist/modules/hr/functions.d.ts.map +1 -1
- package/dist/modules/hr/functions.js +108 -44
- package/dist/modules/hr/functions.js.map +1 -1
- package/dist/modules/hr/index.d.ts.map +1 -1
- package/dist/modules/hr/index.js +0 -1
- package/dist/modules/hr/index.js.map +1 -1
- package/dist/modules/hr_backend/index.d.ts +2 -1
- package/dist/modules/hr_backend/index.d.ts.map +1 -1
- package/dist/modules/hr_backend/index.js +39 -7
- package/dist/modules/hr_backend/index.js.map +1 -1
- package/dist/modules/hr_backend/routes.d.ts.map +1 -1
- package/dist/modules/hr_backend/routes.js +279 -42
- package/dist/modules/hr_backend/routes.js.map +1 -1
- package/dist/modules/hr_backend/screens/employee-form.d.ts +28 -0
- package/dist/modules/hr_backend/screens/employee-form.d.ts.map +1 -0
- package/dist/modules/hr_backend/screens/employee-form.js +110 -0
- package/dist/modules/hr_backend/screens/employee-form.js.map +1 -0
- package/dist/modules/hr_backend/screens/employees-list.d.ts +22 -0
- package/dist/modules/hr_backend/screens/employees-list.d.ts.map +1 -0
- package/dist/modules/hr_backend/screens/employees-list.js +53 -0
- package/dist/modules/hr_backend/screens/employees-list.js.map +1 -0
- package/dist/modules/hr_backend/screens/index.d.ts +5 -0
- package/dist/modules/hr_backend/screens/index.d.ts.map +1 -0
- package/dist/modules/hr_backend/screens/index.js +5 -0
- package/dist/modules/hr_backend/screens/index.js.map +1 -0
- package/dist/modules/hr_backend/screens/leaves-list.d.ts +22 -0
- package/dist/modules/hr_backend/screens/leaves-list.d.ts.map +1 -0
- package/dist/modules/hr_backend/screens/leaves-list.js +78 -0
- package/dist/modules/hr_backend/screens/leaves-list.js.map +1 -0
- package/dist/modules/hr_backend/screens/roster.d.ts +19 -0
- package/dist/modules/hr_backend/screens/roster.d.ts.map +1 -0
- package/dist/modules/hr_backend/screens/roster.js +83 -0
- package/dist/modules/hr_backend/screens/roster.js.map +1 -0
- package/dist/modules/inventory_staff_channel/channel-routes.d.ts +2 -0
- package/dist/modules/inventory_staff_channel/channel-routes.d.ts.map +1 -0
- package/dist/modules/inventory_staff_channel/channel-routes.js +724 -0
- package/dist/modules/inventory_staff_channel/channel-routes.js.map +1 -0
- package/dist/modules/inventory_staff_channel/index.d.ts +5 -0
- package/dist/modules/inventory_staff_channel/index.d.ts.map +1 -0
- package/dist/modules/inventory_staff_channel/index.js +38 -0
- package/dist/modules/inventory_staff_channel/index.js.map +1 -0
- package/dist/modules/livedoc/documents.d.ts +48 -0
- package/dist/modules/livedoc/documents.d.ts.map +1 -0
- package/dist/modules/livedoc/documents.js +99 -0
- package/dist/modules/livedoc/documents.js.map +1 -0
- package/dist/modules/livedoc/functions.d.ts +3 -0
- package/dist/modules/livedoc/functions.d.ts.map +1 -0
- package/dist/modules/livedoc/functions.js +47 -0
- package/dist/modules/livedoc/functions.js.map +1 -0
- package/dist/modules/livedoc/index.d.ts +22 -0
- package/dist/modules/livedoc/index.d.ts.map +1 -0
- package/dist/modules/livedoc/index.js +37 -0
- package/dist/modules/livedoc/index.js.map +1 -0
- package/dist/modules/livedoc/islands.d.ts +3 -0
- package/dist/modules/livedoc/islands.d.ts.map +1 -0
- package/dist/modules/livedoc/islands.js +22 -0
- package/dist/modules/livedoc/islands.js.map +1 -0
- package/dist/modules/livedoc/routes.d.ts +11 -0
- package/dist/modules/livedoc/routes.d.ts.map +1 -0
- package/dist/modules/livedoc/routes.js +232 -0
- package/dist/modules/livedoc/routes.js.map +1 -0
- package/dist/modules/livedoc/sync.d.ts +124 -0
- package/dist/modules/livedoc/sync.d.ts.map +1 -0
- package/dist/modules/livedoc/sync.js +218 -0
- package/dist/modules/livedoc/sync.js.map +1 -0
- package/dist/modules/loyalty/admin-functions.d.ts.map +1 -1
- package/dist/modules/loyalty/admin-functions.js +42 -6
- package/dist/modules/loyalty/admin-functions.js.map +1 -1
- package/dist/modules/loyalty/engine.d.ts +1 -0
- package/dist/modules/loyalty/engine.d.ts.map +1 -1
- package/dist/modules/loyalty/engine.js +88 -28
- package/dist/modules/loyalty/engine.js.map +1 -1
- package/dist/modules/loyalty/index.d.ts.map +1 -1
- package/dist/modules/loyalty/index.js +10 -2
- package/dist/modules/loyalty/index.js.map +1 -1
- package/dist/modules/loyalty/ledger.d.ts.map +1 -1
- package/dist/modules/loyalty/ledger.js +11 -0
- package/dist/modules/loyalty/ledger.js.map +1 -1
- package/dist/modules/loyalty/membership-functions.d.ts.map +1 -1
- package/dist/modules/loyalty/membership-functions.js +23 -7
- package/dist/modules/loyalty/membership-functions.js.map +1 -1
- package/dist/modules/loyalty/messages.d.ts +8 -0
- package/dist/modules/loyalty/messages.d.ts.map +1 -1
- package/dist/modules/loyalty/messages.js +8 -0
- package/dist/modules/loyalty/messages.js.map +1 -1
- package/dist/modules/loyalty/models.d.ts.map +1 -1
- package/dist/modules/loyalty/models.js +20 -0
- package/dist/modules/loyalty/models.js.map +1 -1
- package/dist/modules/loyalty/order-functions.d.ts +16 -1
- package/dist/modules/loyalty/order-functions.d.ts.map +1 -1
- package/dist/modules/loyalty/order-functions.js +513 -291
- package/dist/modules/loyalty/order-functions.js.map +1 -1
- package/dist/modules/loyalty/stats.d.ts +17 -0
- package/dist/modules/loyalty/stats.d.ts.map +1 -0
- package/dist/modules/loyalty/stats.js +178 -0
- package/dist/modules/loyalty/stats.js.map +1 -0
- package/dist/modules/loyalty/stored-value.d.ts +42 -0
- package/dist/modules/loyalty/stored-value.d.ts.map +1 -0
- package/dist/modules/loyalty/stored-value.js +368 -0
- package/dist/modules/loyalty/stored-value.js.map +1 -0
- package/dist/modules/loyalty/types.d.ts +6 -4
- package/dist/modules/loyalty/types.d.ts.map +1 -1
- package/dist/modules/loyalty/types.js +1 -1
- package/dist/modules/loyalty/types.js.map +1 -1
- package/dist/modules/loyalty_backend/index.js +443 -172
- package/dist/modules/loyalty_backend/index.js.map +1 -1
- package/dist/modules/loyalty_backend/messages.d.ts +58 -1
- package/dist/modules/loyalty_backend/messages.d.ts.map +1 -1
- package/dist/modules/loyalty_backend/messages.js +114 -0
- package/dist/modules/loyalty_backend/messages.js.map +1 -1
- package/dist/modules/loyalty_backend/screens/index.d.ts +90 -0
- package/dist/modules/loyalty_backend/screens/index.d.ts.map +1 -0
- package/dist/modules/loyalty_backend/screens/index.js +912 -0
- package/dist/modules/loyalty_backend/screens/index.js.map +1 -0
- package/dist/modules/loyalty_backend/screens/page-frame.d.ts +14 -0
- package/dist/modules/loyalty_backend/screens/page-frame.d.ts.map +1 -0
- package/dist/modules/loyalty_backend/screens/page-frame.js +13 -0
- package/dist/modules/loyalty_backend/screens/page-frame.js.map +1 -0
- package/dist/modules/loyalty_pos/channel.d.ts +2 -0
- package/dist/modules/loyalty_pos/channel.d.ts.map +1 -0
- package/dist/modules/loyalty_pos/channel.js +270 -0
- package/dist/modules/loyalty_pos/channel.js.map +1 -0
- package/dist/modules/loyalty_pos/functions.d.ts +11 -17
- package/dist/modules/loyalty_pos/functions.d.ts.map +1 -1
- package/dist/modules/loyalty_pos/functions.js +454 -94
- package/dist/modules/loyalty_pos/functions.js.map +1 -1
- package/dist/modules/loyalty_pos/index.js +6 -16
- package/dist/modules/loyalty_pos/index.js.map +1 -1
- package/dist/modules/loyalty_pos/jobs.d.ts +3 -0
- package/dist/modules/loyalty_pos/jobs.d.ts.map +1 -0
- package/dist/modules/loyalty_pos/jobs.js +30 -0
- package/dist/modules/loyalty_pos/jobs.js.map +1 -0
- package/dist/modules/loyalty_sale/functions.d.ts +2 -2
- package/dist/modules/loyalty_sale/functions.d.ts.map +1 -1
- package/dist/modules/loyalty_sale/functions.js +53 -34
- package/dist/modules/loyalty_sale/functions.js.map +1 -1
- package/dist/modules/loyalty_sale/index.js +0 -2
- package/dist/modules/loyalty_sale/index.js.map +1 -1
- package/dist/modules/mail/functions.d.ts.map +1 -1
- package/dist/modules/mail/functions.js +48 -6
- package/dist/modules/mail/functions.js.map +1 -1
- package/dist/modules/mail/index.d.ts.map +1 -1
- package/dist/modules/mail/index.js +0 -1
- package/dist/modules/mail/index.js.map +1 -1
- package/dist/modules/mail/operations.d.ts +19 -0
- package/dist/modules/mail/operations.d.ts.map +1 -1
- package/dist/modules/mail/operations.js +69 -0
- package/dist/modules/mail/operations.js.map +1 -1
- package/dist/modules/mail_backend/index.d.ts +1 -1
- package/dist/modules/mail_backend/index.d.ts.map +1 -1
- package/dist/modules/mail_backend/index.js +5 -14
- package/dist/modules/mail_backend/index.js.map +1 -1
- package/dist/modules/mail_backend/islands.js +2 -2
- package/dist/modules/mail_backend/islands.js.map +1 -1
- package/dist/modules/mail_backend/routes.d.ts.map +1 -1
- package/dist/modules/mail_backend/routes.js +25 -20
- package/dist/modules/mail_backend/routes.js.map +1 -1
- package/dist/modules/mail_backend/screens/inbox-list.d.ts +9 -0
- package/dist/modules/mail_backend/screens/inbox-list.d.ts.map +1 -0
- package/dist/modules/mail_backend/screens/inbox-list.js +13 -0
- package/dist/modules/mail_backend/screens/inbox-list.js.map +1 -0
- package/dist/modules/mail_backend/screens/index.d.ts +3 -0
- package/dist/modules/mail_backend/screens/index.d.ts.map +1 -0
- package/dist/modules/mail_backend/screens/index.js +2 -0
- package/dist/modules/mail_backend/screens/index.js.map +1 -0
- package/dist/modules/mail_inbound/index.d.ts.map +1 -1
- package/dist/modules/mail_inbound/index.js +0 -1
- package/dist/modules/mail_inbound/index.js.map +1 -1
- package/dist/modules/mail_inbound_backend/index.d.ts +1 -1
- package/dist/modules/mail_inbound_backend/index.d.ts.map +1 -1
- package/dist/modules/mail_inbound_backend/index.js +3 -12
- package/dist/modules/mail_inbound_backend/index.js.map +1 -1
- package/dist/modules/mail_inbound_backend/routes.d.ts.map +1 -1
- package/dist/modules/mail_inbound_backend/routes.js +6 -21
- package/dist/modules/mail_inbound_backend/routes.js.map +1 -1
- package/dist/modules/mail_inbound_backend/screens/inbound-list.d.ts +8 -0
- package/dist/modules/mail_inbound_backend/screens/inbound-list.d.ts.map +1 -0
- package/dist/modules/mail_inbound_backend/screens/inbound-list.js +20 -0
- package/dist/modules/mail_inbound_backend/screens/inbound-list.js.map +1 -0
- package/dist/modules/mail_inbound_backend/screens/index.d.ts +3 -0
- package/dist/modules/mail_inbound_backend/screens/index.d.ts.map +1 -0
- package/dist/modules/mail_inbound_backend/screens/index.js +2 -0
- package/dist/modules/mail_inbound_backend/screens/index.js.map +1 -0
- package/dist/modules/mail_staff_channel/channel-routes.d.ts +2 -0
- package/dist/modules/mail_staff_channel/channel-routes.d.ts.map +1 -0
- package/dist/modules/mail_staff_channel/channel-routes.js +183 -0
- package/dist/modules/mail_staff_channel/channel-routes.js.map +1 -0
- package/dist/modules/mail_staff_channel/index.d.ts +5 -0
- package/dist/modules/mail_staff_channel/index.d.ts.map +1 -0
- package/dist/modules/mail_staff_channel/index.js +28 -0
- package/dist/modules/mail_staff_channel/index.js.map +1 -0
- package/dist/modules/mail_transport/index.d.ts.map +1 -1
- package/dist/modules/mail_transport/index.js +0 -1
- package/dist/modules/mail_transport/index.js.map +1 -1
- package/dist/modules/mail_transport_backend/index.d.ts +1 -1
- package/dist/modules/mail_transport_backend/index.d.ts.map +1 -1
- package/dist/modules/mail_transport_backend/index.js +3 -12
- package/dist/modules/mail_transport_backend/index.js.map +1 -1
- package/dist/modules/mail_transport_backend/routes.d.ts.map +1 -1
- package/dist/modules/mail_transport_backend/routes.js +23 -22
- package/dist/modules/mail_transport_backend/routes.js.map +1 -1
- package/dist/modules/mail_transport_backend/screens/index.d.ts +3 -0
- package/dist/modules/mail_transport_backend/screens/index.d.ts.map +1 -0
- package/dist/modules/mail_transport_backend/screens/index.js +2 -0
- package/dist/modules/mail_transport_backend/screens/index.js.map +1 -0
- package/dist/modules/mail_transport_backend/screens/outbox-list.d.ts +9 -0
- package/dist/modules/mail_transport_backend/screens/outbox-list.d.ts.map +1 -0
- package/dist/modules/mail_transport_backend/screens/outbox-list.js +29 -0
- package/dist/modules/mail_transport_backend/screens/outbox-list.js.map +1 -0
- package/dist/modules/manufacturing/functions.d.ts +3 -0
- package/dist/modules/manufacturing/functions.d.ts.map +1 -0
- package/dist/modules/manufacturing/functions.js +912 -0
- package/dist/modules/manufacturing/functions.js.map +1 -0
- package/dist/modules/manufacturing/index.d.ts +6 -0
- package/dist/modules/manufacturing/index.d.ts.map +1 -0
- package/dist/modules/manufacturing/index.js +42 -0
- package/dist/modules/manufacturing/index.js.map +1 -0
- package/dist/modules/manufacturing/models.d.ts +8 -0
- package/dist/modules/manufacturing/models.d.ts.map +1 -0
- package/dist/modules/manufacturing/models.js +145 -0
- package/dist/modules/manufacturing/models.js.map +1 -0
- package/dist/modules/manufacturing/relations.d.ts.map +1 -0
- package/dist/modules/manufacturing/relations.js +37 -0
- package/dist/modules/manufacturing/relations.js.map +1 -0
- package/dist/modules/manufacturing/types.d.ts +7 -0
- package/dist/modules/manufacturing/types.d.ts.map +1 -0
- package/dist/modules/manufacturing/types.js +11 -0
- package/dist/modules/manufacturing/types.js.map +1 -0
- package/dist/modules/manufacturing_backend/index.d.ts +5 -0
- package/dist/modules/manufacturing_backend/index.d.ts.map +1 -0
- package/dist/modules/manufacturing_backend/index.js +146 -0
- package/dist/modules/manufacturing_backend/index.js.map +1 -0
- package/dist/modules/manufacturing_backend/routes.d.ts +3 -0
- package/dist/modules/manufacturing_backend/routes.d.ts.map +1 -0
- package/dist/modules/manufacturing_backend/routes.js +477 -0
- package/dist/modules/manufacturing_backend/routes.js.map +1 -0
- package/dist/modules/manufacturing_backend/screens/bom-create.d.ts +15 -0
- package/dist/modules/manufacturing_backend/screens/bom-create.d.ts.map +1 -0
- package/dist/modules/manufacturing_backend/screens/bom-create.js +39 -0
- package/dist/modules/manufacturing_backend/screens/bom-create.js.map +1 -0
- package/dist/modules/manufacturing_backend/screens/boms-list.d.ts +18 -0
- package/dist/modules/manufacturing_backend/screens/boms-list.d.ts.map +1 -0
- package/dist/modules/manufacturing_backend/screens/boms-list.js +36 -0
- package/dist/modules/manufacturing_backend/screens/boms-list.js.map +1 -0
- package/dist/modules/manufacturing_backend/screens/index.d.ts +8 -0
- package/dist/modules/manufacturing_backend/screens/index.d.ts.map +1 -0
- package/dist/modules/manufacturing_backend/screens/index.js +8 -0
- package/dist/modules/manufacturing_backend/screens/index.js.map +1 -0
- package/dist/modules/manufacturing_backend/screens/order-create.d.ts +13 -0
- package/dist/modules/manufacturing_backend/screens/order-create.d.ts.map +1 -0
- package/dist/modules/manufacturing_backend/screens/order-create.js +20 -0
- package/dist/modules/manufacturing_backend/screens/order-create.js.map +1 -0
- package/dist/modules/manufacturing_backend/screens/order-execution.d.ts +7 -0
- package/dist/modules/manufacturing_backend/screens/order-execution.d.ts.map +1 -0
- package/dist/modules/manufacturing_backend/screens/order-execution.js +129 -0
- package/dist/modules/manufacturing_backend/screens/order-execution.js.map +1 -0
- package/dist/modules/manufacturing_backend/screens/orders-list.d.ts +21 -0
- package/dist/modules/manufacturing_backend/screens/orders-list.d.ts.map +1 -0
- package/dist/modules/manufacturing_backend/screens/orders-list.js +49 -0
- package/dist/modules/manufacturing_backend/screens/orders-list.js.map +1 -0
- package/dist/modules/manufacturing_backend/screens/work-center-form.d.ts +24 -0
- package/dist/modules/manufacturing_backend/screens/work-center-form.d.ts.map +1 -0
- package/dist/modules/manufacturing_backend/screens/work-center-form.js +80 -0
- package/dist/modules/manufacturing_backend/screens/work-center-form.js.map +1 -0
- package/dist/modules/manufacturing_backend/screens/work-centers-list.d.ts +23 -0
- package/dist/modules/manufacturing_backend/screens/work-centers-list.d.ts.map +1 -0
- package/dist/modules/manufacturing_backend/screens/work-centers-list.js +61 -0
- package/dist/modules/manufacturing_backend/screens/work-centers-list.js.map +1 -0
- package/dist/modules/oauth/index.d.ts.map +1 -1
- package/dist/modules/oauth/index.js +0 -1
- package/dist/modules/oauth/index.js.map +1 -1
- package/dist/modules/oauth/models.d.ts.map +1 -1
- package/dist/modules/oauth/models.js +2 -1
- package/dist/modules/oauth/models.js.map +1 -1
- package/dist/modules/oauth_backend/index.d.ts +1 -1
- package/dist/modules/oauth_backend/index.d.ts.map +1 -1
- package/dist/modules/oauth_backend/index.js +3 -5
- package/dist/modules/oauth_backend/index.js.map +1 -1
- package/dist/modules/oauth_backend/messages.d.ts +4 -0
- package/dist/modules/oauth_backend/messages.d.ts.map +1 -1
- package/dist/modules/oauth_backend/messages.js +4 -0
- package/dist/modules/oauth_backend/messages.js.map +1 -1
- package/dist/modules/oauth_backend/routes.d.ts.map +1 -1
- package/dist/modules/oauth_backend/routes.js +28 -30
- package/dist/modules/oauth_backend/routes.js.map +1 -1
- package/dist/modules/oauth_backend/screens/index.d.ts +66 -0
- package/dist/modules/oauth_backend/screens/index.d.ts.map +1 -0
- package/dist/modules/oauth_backend/screens/index.js +306 -0
- package/dist/modules/oauth_backend/screens/index.js.map +1 -0
- package/dist/modules/partner/functions.d.ts.map +1 -1
- package/dist/modules/partner/functions.js +74 -6
- package/dist/modules/partner/functions.js.map +1 -1
- package/dist/modules/partner/index.d.ts.map +1 -1
- package/dist/modules/partner/index.js +0 -1
- package/dist/modules/partner/index.js.map +1 -1
- package/dist/modules/partner/models.d.ts +4 -4
- package/dist/modules/partner/models.d.ts.map +1 -1
- package/dist/modules/partner/models.js +9 -7
- package/dist/modules/partner/models.js.map +1 -1
- package/dist/modules/partner/types.d.ts +2 -2
- package/dist/modules/partner/types.js +2 -2
- package/dist/modules/partner_backend/client/address-view.mjs +5 -5
- package/dist/modules/partner_backend/client/address-view.mjs.map +1 -1
- package/dist/modules/partner_backend/client/address.css +22 -10
- package/dist/modules/partner_backend/client/partner.css +116 -0
- package/dist/modules/partner_backend/index.d.ts +1 -1
- package/dist/modules/partner_backend/index.d.ts.map +1 -1
- package/dist/modules/partner_backend/index.js +34 -4
- package/dist/modules/partner_backend/index.js.map +1 -1
- package/dist/modules/partner_backend/menus.js +2 -2
- package/dist/modules/partner_backend/menus.js.map +1 -1
- package/dist/modules/partner_backend/routes.d.ts +3 -1
- package/dist/modules/partner_backend/routes.d.ts.map +1 -1
- package/dist/modules/partner_backend/routes.js +236 -91
- package/dist/modules/partner_backend/routes.js.map +1 -1
- package/dist/modules/partner_backend/screens/form.d.ts +21 -0
- package/dist/modules/partner_backend/screens/form.d.ts.map +1 -0
- package/dist/modules/partner_backend/screens/form.js +101 -0
- package/dist/modules/partner_backend/screens/form.js.map +1 -0
- package/dist/modules/partner_backend/screens/index.d.ts +5 -0
- package/dist/modules/partner_backend/screens/index.d.ts.map +1 -0
- package/dist/modules/partner_backend/screens/index.js +4 -0
- package/dist/modules/partner_backend/screens/index.js.map +1 -0
- package/dist/modules/partner_backend/screens/list.d.ts +6 -0
- package/dist/modules/partner_backend/screens/list.d.ts.map +1 -0
- package/dist/modules/partner_backend/screens/list.js +94 -0
- package/dist/modules/partner_backend/screens/list.js.map +1 -0
- package/dist/modules/partner_backend/screens/new.d.ts +5 -0
- package/dist/modules/partner_backend/screens/new.d.ts.map +1 -0
- package/dist/modules/partner_backend/screens/new.js +58 -0
- package/dist/modules/partner_backend/screens/new.js.map +1 -0
- package/dist/modules/partner_backend/screens/types.d.ts +44 -0
- package/dist/modules/partner_backend/screens/types.d.ts.map +1 -0
- package/dist/modules/partner_backend/screens/types.js +2 -0
- package/dist/modules/partner_backend/screens/types.js.map +1 -0
- package/dist/modules/partner_mail_backend/index.d.ts +5 -0
- package/dist/modules/partner_mail_backend/index.d.ts.map +1 -0
- package/dist/modules/partner_mail_backend/index.js +29 -0
- package/dist/modules/partner_mail_backend/index.js.map +1 -0
- package/dist/modules/pos/functions.d.ts +18 -2
- package/dist/modules/pos/functions.d.ts.map +1 -1
- package/dist/modules/pos/functions.js +3279 -345
- package/dist/modules/pos/functions.js.map +1 -1
- package/dist/modules/pos/index.d.ts +2 -1
- package/dist/modules/pos/index.d.ts.map +1 -1
- package/dist/modules/pos/index.js +5 -5
- package/dist/modules/pos/index.js.map +1 -1
- package/dist/modules/pos/models.d.ts.map +1 -1
- package/dist/modules/pos/models.js +189 -1
- package/dist/modules/pos/models.js.map +1 -1
- package/dist/modules/pos/relations.d.ts.map +1 -1
- package/dist/modules/pos/relations.js +11 -0
- package/dist/modules/pos/relations.js.map +1 -1
- package/dist/modules/pos_backend/index.js +182 -154
- package/dist/modules/pos_backend/index.js.map +1 -1
- package/dist/modules/pos_backend/screens.d.ts +1 -0
- package/dist/modules/pos_backend/screens.d.ts.map +1 -1
- package/dist/modules/pos_backend/screens.js +28 -38
- package/dist/modules/pos_backend/screens.js.map +1 -1
- package/dist/modules/pos_channel/catalog.d.ts +27 -0
- package/dist/modules/pos_channel/catalog.d.ts.map +1 -0
- package/dist/modules/pos_channel/catalog.js +310 -0
- package/dist/modules/pos_channel/catalog.js.map +1 -0
- package/dist/modules/pos_channel/index.d.ts +7 -0
- package/dist/modules/pos_channel/index.d.ts.map +1 -0
- package/dist/modules/pos_channel/index.js +61 -0
- package/dist/modules/pos_channel/index.js.map +1 -0
- package/dist/modules/pos_channel/offline.d.ts +66 -0
- package/dist/modules/pos_channel/offline.d.ts.map +1 -0
- package/dist/modules/pos_channel/offline.js +16 -0
- package/dist/modules/pos_channel/offline.js.map +1 -0
- package/dist/modules/pos_channel/operations.d.ts +422 -0
- package/dist/modules/pos_channel/operations.d.ts.map +1 -0
- package/dist/modules/pos_channel/operations.js +1781 -0
- package/dist/modules/pos_channel/operations.js.map +1 -0
- package/dist/modules/pos_channel/sync.d.ts +6 -0
- package/dist/modules/pos_channel/sync.d.ts.map +1 -0
- package/dist/modules/pos_channel/sync.js +1161 -0
- package/dist/modules/pos_channel/sync.js.map +1 -0
- package/dist/modules/pricing/index.d.ts.map +1 -1
- package/dist/modules/pricing/index.js +3 -4
- package/dist/modules/pricing/index.js.map +1 -1
- package/dist/modules/pricing_backend/index.js +135 -78
- package/dist/modules/pricing_backend/index.js.map +1 -1
- package/dist/modules/pricing_backend/screens/index.d.ts +5 -0
- package/dist/modules/pricing_backend/screens/index.d.ts.map +1 -0
- package/dist/modules/pricing_backend/screens/index.js +4 -0
- package/dist/modules/pricing_backend/screens/index.js.map +1 -0
- package/dist/modules/pricing_backend/screens/pricelist-create.d.ts +10 -0
- package/dist/modules/pricing_backend/screens/pricelist-create.d.ts.map +1 -0
- package/dist/modules/pricing_backend/screens/pricelist-create.js +30 -0
- package/dist/modules/pricing_backend/screens/pricelist-create.js.map +1 -0
- package/dist/modules/pricing_backend/screens/pricelist-detail.d.ts +15 -0
- package/dist/modules/pricing_backend/screens/pricelist-detail.d.ts.map +1 -0
- package/dist/modules/pricing_backend/screens/pricelist-detail.js +164 -0
- package/dist/modules/pricing_backend/screens/pricelist-detail.js.map +1 -0
- package/dist/modules/pricing_backend/screens/pricelists-list.d.ts +11 -0
- package/dist/modules/pricing_backend/screens/pricelists-list.d.ts.map +1 -0
- package/dist/modules/pricing_backend/screens/pricelists-list.js +27 -0
- package/dist/modules/pricing_backend/screens/pricelists-list.js.map +1 -0
- package/dist/modules/pricing_backend/screens/shared.d.ts +21 -0
- package/dist/modules/pricing_backend/screens/shared.d.ts.map +1 -0
- package/dist/modules/pricing_backend/screens/shared.js +3 -0
- package/dist/modules/pricing_backend/screens/shared.js.map +1 -0
- package/dist/modules/product/functions.d.ts.map +1 -1
- package/dist/modules/product/functions.js +679 -50
- package/dist/modules/product/functions.js.map +1 -1
- package/dist/modules/product/index.d.ts +2 -0
- package/dist/modules/product/index.d.ts.map +1 -1
- package/dist/modules/product/index.js +2 -2
- package/dist/modules/product/index.js.map +1 -1
- package/dist/modules/product/models.d.ts +1 -1
- package/dist/modules/product/models.d.ts.map +1 -1
- package/dist/modules/product/models.js +27 -4
- package/dist/modules/product/models.js.map +1 -1
- package/dist/modules/product/relations.d.ts.map +1 -1
- package/dist/modules/product/relations.js +4 -0
- package/dist/modules/product/relations.js.map +1 -1
- package/dist/modules/product/sellable.d.ts +26 -0
- package/dist/modules/product/sellable.d.ts.map +1 -0
- package/dist/modules/product/sellable.js +56 -0
- package/dist/modules/product/sellable.js.map +1 -0
- package/dist/modules/product/types.d.ts +2 -2
- package/dist/modules/product/views.d.ts.map +1 -1
- package/dist/modules/product/views.js +5 -1
- package/dist/modules/product/views.js.map +1 -1
- package/dist/modules/product_activity_backend/index.d.ts.map +1 -1
- package/dist/modules/product_activity_backend/index.js +2 -3
- package/dist/modules/product_activity_backend/index.js.map +1 -1
- package/dist/modules/product_backend/client/media-upload-view.d.mts.map +1 -1
- package/dist/modules/product_backend/client/media-upload-view.mjs +1 -0
- package/dist/modules/product_backend/client/media-upload-view.mjs.map +1 -1
- package/dist/modules/product_backend/client/product.css +964 -0
- package/dist/modules/product_backend/index.d.ts +5 -6
- package/dist/modules/product_backend/index.d.ts.map +1 -1
- package/dist/modules/product_backend/index.js +203 -14
- package/dist/modules/product_backend/index.js.map +1 -1
- package/dist/modules/product_backend/menus.js +2 -2
- package/dist/modules/product_backend/menus.js.map +1 -1
- package/dist/modules/product_backend/relation-control.d.ts +85 -0
- package/dist/modules/product_backend/relation-control.d.ts.map +1 -0
- package/dist/modules/product_backend/relation-control.js +129 -0
- package/dist/modules/product_backend/relation-control.js.map +1 -0
- package/dist/modules/product_backend/routes.d.ts.map +1 -1
- package/dist/modules/product_backend/routes.js +502 -196
- package/dist/modules/product_backend/routes.js.map +1 -1
- package/dist/modules/product_backend/screens/attributes.d.ts +7 -0
- package/dist/modules/product_backend/screens/attributes.d.ts.map +1 -0
- package/dist/modules/product_backend/screens/attributes.js +66 -0
- package/dist/modules/product_backend/screens/attributes.js.map +1 -0
- package/dist/modules/product_backend/screens/create.d.ts +16 -0
- package/dist/modules/product_backend/screens/create.d.ts.map +1 -0
- package/dist/modules/product_backend/screens/create.js +86 -0
- package/dist/modules/product_backend/screens/create.js.map +1 -0
- package/dist/modules/product_backend/screens/detail.d.ts +87 -0
- package/dist/modules/product_backend/screens/detail.d.ts.map +1 -0
- package/dist/modules/product_backend/screens/detail.js +381 -0
- package/dist/modules/product_backend/screens/detail.js.map +1 -0
- package/dist/modules/product_backend/screens/favorite.d.ts +6 -0
- package/dist/modules/product_backend/screens/favorite.d.ts.map +1 -0
- package/dist/modules/product_backend/screens/favorite.js +43 -0
- package/dist/modules/product_backend/screens/favorite.js.map +1 -0
- package/dist/modules/product_backend/screens/index.d.ts +10 -0
- package/dist/modules/product_backend/screens/index.d.ts.map +1 -0
- package/dist/modules/product_backend/screens/index.js +7 -0
- package/dist/modules/product_backend/screens/index.js.map +1 -0
- package/dist/modules/product_backend/screens/list.d.ts +54 -0
- package/dist/modules/product_backend/screens/list.d.ts.map +1 -0
- package/dist/modules/product_backend/screens/list.js +124 -0
- package/dist/modules/product_backend/screens/list.js.map +1 -0
- package/dist/modules/product_backend/screens/variant.d.ts +9 -0
- package/dist/modules/product_backend/screens/variant.d.ts.map +1 -0
- package/dist/modules/product_backend/screens/variant.js +113 -0
- package/dist/modules/product_backend/screens/variant.js.map +1 -0
- package/dist/modules/product_mail_backend/index.d.ts.map +1 -1
- package/dist/modules/product_mail_backend/index.js +2 -3
- package/dist/modules/product_mail_backend/index.js.map +1 -1
- package/dist/modules/product_media/functions.d.ts.map +1 -1
- package/dist/modules/product_media/functions.js +59 -6
- package/dist/modules/product_media/functions.js.map +1 -1
- package/dist/modules/product_media/index.js +0 -1
- package/dist/modules/product_media/index.js.map +1 -1
- package/dist/modules/product_variant_activity_backend/index.d.ts.map +1 -1
- package/dist/modules/product_variant_activity_backend/index.js +2 -3
- package/dist/modules/product_variant_activity_backend/index.js.map +1 -1
- package/dist/modules/product_variant_mail_backend/index.d.ts.map +1 -1
- package/dist/modules/product_variant_mail_backend/index.js +2 -3
- package/dist/modules/product_variant_mail_backend/index.js.map +1 -1
- package/dist/modules/purchase/functions.d.ts.map +1 -1
- package/dist/modules/purchase/functions.js +852 -225
- package/dist/modules/purchase/functions.js.map +1 -1
- package/dist/modules/purchase/index.d.ts.map +1 -1
- package/dist/modules/purchase/index.js +30 -5
- package/dist/modules/purchase/index.js.map +1 -1
- package/dist/modules/purchase/models.d.ts.map +1 -1
- package/dist/modules/purchase/models.js +1 -0
- package/dist/modules/purchase/models.js.map +1 -1
- package/dist/modules/purchase/reports.d.ts +4 -0
- package/dist/modules/purchase/reports.d.ts.map +1 -0
- package/dist/modules/purchase/reports.js +86 -0
- package/dist/modules/purchase/reports.js.map +1 -0
- package/dist/modules/purchase_backend/index.js +513 -112
- package/dist/modules/purchase_backend/index.js.map +1 -1
- package/dist/modules/purchase_backend/screens/index.d.ts +10 -0
- package/dist/modules/purchase_backend/screens/index.d.ts.map +1 -0
- package/dist/modules/purchase_backend/screens/index.js +10 -0
- package/dist/modules/purchase_backend/screens/index.js.map +1 -0
- package/dist/modules/purchase_backend/screens/order-detail.d.ts +31 -0
- package/dist/modules/purchase_backend/screens/order-detail.d.ts.map +1 -0
- package/dist/modules/purchase_backend/screens/order-detail.js +204 -0
- package/dist/modules/purchase_backend/screens/order-detail.js.map +1 -0
- package/dist/modules/purchase_backend/screens/order-list-shared.d.ts +7 -0
- package/dist/modules/purchase_backend/screens/order-list-shared.d.ts.map +1 -0
- package/dist/modules/purchase_backend/screens/order-list-shared.js +58 -0
- package/dist/modules/purchase_backend/screens/order-list-shared.js.map +1 -0
- package/dist/modules/purchase_backend/screens/overview.d.ts +19 -0
- package/dist/modules/purchase_backend/screens/overview.d.ts.map +1 -0
- package/dist/modules/purchase_backend/screens/overview.js +52 -0
- package/dist/modules/purchase_backend/screens/overview.js.map +1 -0
- package/dist/modules/purchase_backend/screens/purchase-orders-list.d.ts +14 -0
- package/dist/modules/purchase_backend/screens/purchase-orders-list.d.ts.map +1 -0
- package/dist/modules/purchase_backend/screens/purchase-orders-list.js +26 -0
- package/dist/modules/purchase_backend/screens/purchase-orders-list.js.map +1 -0
- package/dist/modules/purchase_backend/screens/rfq-create.d.ts +16 -0
- package/dist/modules/purchase_backend/screens/rfq-create.d.ts.map +1 -0
- package/dist/modules/purchase_backend/screens/rfq-create.js +24 -0
- package/dist/modules/purchase_backend/screens/rfq-create.js.map +1 -0
- package/dist/modules/purchase_backend/screens/rfqs-list.d.ts +18 -0
- package/dist/modules/purchase_backend/screens/rfqs-list.d.ts.map +1 -0
- package/dist/modules/purchase_backend/screens/rfqs-list.js +28 -0
- package/dist/modules/purchase_backend/screens/rfqs-list.js.map +1 -0
- package/dist/modules/purchase_backend/screens/shared.d.ts +18 -0
- package/dist/modules/purchase_backend/screens/shared.d.ts.map +1 -0
- package/dist/modules/purchase_backend/screens/shared.js +30 -0
- package/dist/modules/purchase_backend/screens/shared.js.map +1 -0
- package/dist/modules/purchase_backend/screens/vendor-pricelist-create.d.ts +20 -0
- package/dist/modules/purchase_backend/screens/vendor-pricelist-create.d.ts.map +1 -0
- package/dist/modules/purchase_backend/screens/vendor-pricelist-create.js +25 -0
- package/dist/modules/purchase_backend/screens/vendor-pricelist-create.js.map +1 -0
- package/dist/modules/purchase_backend/screens/vendor-pricelists-list.d.ts +33 -0
- package/dist/modules/purchase_backend/screens/vendor-pricelists-list.d.ts.map +1 -0
- package/dist/modules/purchase_backend/screens/vendor-pricelists-list.js +73 -0
- package/dist/modules/purchase_backend/screens/vendor-pricelists-list.js.map +1 -0
- package/dist/modules/purchase_staff_channel/channel-routes.d.ts +2 -0
- package/dist/modules/purchase_staff_channel/channel-routes.d.ts.map +1 -0
- package/dist/modules/purchase_staff_channel/channel-routes.js +119 -0
- package/dist/modules/purchase_staff_channel/channel-routes.js.map +1 -0
- package/dist/modules/purchase_staff_channel/index.d.ts +8 -0
- package/dist/modules/purchase_staff_channel/index.d.ts.map +1 -0
- package/dist/modules/purchase_staff_channel/index.js +45 -0
- package/dist/modules/purchase_staff_channel/index.js.map +1 -0
- package/dist/modules/purchase_staff_channel/order-routes.d.ts +2 -0
- package/dist/modules/purchase_staff_channel/order-routes.d.ts.map +1 -0
- package/dist/modules/purchase_staff_channel/order-routes.js +754 -0
- package/dist/modules/purchase_staff_channel/order-routes.js.map +1 -0
- package/dist/modules/purchase_staff_channel/product-routes.d.ts +2 -0
- package/dist/modules/purchase_staff_channel/product-routes.d.ts.map +1 -0
- package/dist/modules/purchase_staff_channel/product-routes.js +183 -0
- package/dist/modules/purchase_staff_channel/product-routes.js.map +1 -0
- package/dist/modules/purchase_staff_channel/vendor-bill-routes.d.ts +2 -0
- package/dist/modules/purchase_staff_channel/vendor-bill-routes.d.ts.map +1 -0
- package/dist/modules/purchase_staff_channel/vendor-bill-routes.js +189 -0
- package/dist/modules/purchase_staff_channel/vendor-bill-routes.js.map +1 -0
- package/dist/modules/quality/functions.d.ts +3 -0
- package/dist/modules/quality/functions.d.ts.map +1 -0
- package/dist/modules/quality/functions.js +381 -0
- package/dist/modules/quality/functions.js.map +1 -0
- package/dist/modules/quality/index.d.ts +5 -0
- package/dist/modules/quality/index.d.ts.map +1 -0
- package/dist/modules/quality/index.js +19 -0
- package/dist/modules/quality/index.js.map +1 -0
- package/dist/modules/quality/models.d.ts +3 -0
- package/dist/modules/quality/models.d.ts.map +1 -0
- package/dist/modules/quality/models.js +91 -0
- package/dist/modules/quality/models.js.map +1 -0
- package/dist/modules/quality_staff_channel/channel-routes.d.ts +2 -0
- package/dist/modules/quality_staff_channel/channel-routes.d.ts.map +1 -0
- package/dist/modules/quality_staff_channel/channel-routes.js +495 -0
- package/dist/modules/quality_staff_channel/channel-routes.js.map +1 -0
- package/dist/modules/quality_staff_channel/index.d.ts +5 -0
- package/dist/modules/quality_staff_channel/index.d.ts.map +1 -0
- package/dist/modules/quality_staff_channel/index.js +30 -0
- package/dist/modules/quality_staff_channel/index.js.map +1 -0
- package/dist/modules/report/functions.d.ts +3 -0
- package/dist/modules/report/functions.d.ts.map +1 -0
- package/dist/modules/report/functions.js +197 -0
- package/dist/modules/report/functions.js.map +1 -0
- package/dist/modules/report/index.d.ts +3 -0
- package/dist/modules/report/index.d.ts.map +1 -0
- package/dist/modules/report/index.js +21 -0
- package/dist/modules/report/index.js.map +1 -0
- package/dist/modules/report/jobs.d.ts +3 -0
- package/dist/modules/report/jobs.d.ts.map +1 -0
- package/dist/modules/report/jobs.js +18 -0
- package/dist/modules/report/jobs.js.map +1 -0
- package/dist/modules/report/models.d.ts +3 -0
- package/dist/modules/report/models.d.ts.map +1 -0
- package/dist/modules/report/models.js +45 -0
- package/dist/modules/report/models.js.map +1 -0
- package/dist/modules/report/routes.d.ts +19 -0
- package/dist/modules/report/routes.d.ts.map +1 -0
- package/dist/modules/report/routes.js +138 -0
- package/dist/modules/report/routes.js.map +1 -0
- package/dist/modules/report_backend/index.d.ts +3 -0
- package/dist/modules/report_backend/index.d.ts.map +1 -0
- package/dist/modules/report_backend/index.js +67 -0
- package/dist/modules/report_backend/index.js.map +1 -0
- package/dist/modules/report_backend/routes.d.ts +10 -0
- package/dist/modules/report_backend/routes.d.ts.map +1 -0
- package/dist/modules/report_backend/routes.js +87 -0
- package/dist/modules/report_backend/routes.js.map +1 -0
- package/dist/modules/report_backend/screens/index.d.ts +13 -0
- package/dist/modules/report_backend/screens/index.d.ts.map +1 -0
- package/dist/modules/report_backend/screens/index.js +91 -0
- package/dist/modules/report_backend/screens/index.js.map +1 -0
- package/dist/modules/sale/functions.d.ts.map +1 -1
- package/dist/modules/sale/functions.js +796 -238
- package/dist/modules/sale/functions.js.map +1 -1
- package/dist/modules/sale/index.d.ts.map +1 -1
- package/dist/modules/sale/index.js +44 -5
- package/dist/modules/sale/index.js.map +1 -1
- package/dist/modules/sale/models.d.ts.map +1 -1
- package/dist/modules/sale/models.js +47 -1
- package/dist/modules/sale/models.js.map +1 -1
- package/dist/modules/sale/relations.d.ts.map +1 -1
- package/dist/modules/sale/relations.js +6 -0
- package/dist/modules/sale/relations.js.map +1 -1
- package/dist/modules/sale/reports.d.ts +4 -0
- package/dist/modules/sale/reports.d.ts.map +1 -0
- package/dist/modules/sale/reports.js +132 -0
- package/dist/modules/sale/reports.js.map +1 -0
- package/dist/modules/sale/scope.d.ts +31 -0
- package/dist/modules/sale/scope.d.ts.map +1 -0
- package/dist/modules/sale/scope.js +34 -0
- package/dist/modules/sale/scope.js.map +1 -0
- package/dist/modules/sale_activity_backend/index.d.ts.map +1 -1
- package/dist/modules/sale_activity_backend/index.js +0 -1
- package/dist/modules/sale_activity_backend/index.js.map +1 -1
- package/dist/modules/sale_backend/index.js +338 -121
- package/dist/modules/sale_backend/index.js.map +1 -1
- package/dist/modules/sale_backend/screens/index.d.ts +9 -0
- package/dist/modules/sale_backend/screens/index.d.ts.map +1 -0
- package/dist/modules/sale_backend/screens/index.js +9 -0
- package/dist/modules/sale_backend/screens/index.js.map +1 -0
- package/dist/modules/sale_backend/screens/invoicing-policies-list.d.ts +14 -0
- package/dist/modules/sale_backend/screens/invoicing-policies-list.d.ts.map +1 -0
- package/dist/modules/sale_backend/screens/invoicing-policies-list.js +48 -0
- package/dist/modules/sale_backend/screens/invoicing-policies-list.js.map +1 -0
- package/dist/modules/sale_backend/screens/invoicing-policy-create.d.ts +14 -0
- package/dist/modules/sale_backend/screens/invoicing-policy-create.d.ts.map +1 -0
- package/dist/modules/sale_backend/screens/invoicing-policy-create.js +38 -0
- package/dist/modules/sale_backend/screens/invoicing-policy-create.js.map +1 -0
- package/dist/modules/sale_backend/screens/order-detail.d.ts +43 -0
- package/dist/modules/sale_backend/screens/order-detail.d.ts.map +1 -0
- package/dist/modules/sale_backend/screens/order-detail.js +226 -0
- package/dist/modules/sale_backend/screens/order-detail.js.map +1 -0
- package/dist/modules/sale_backend/screens/overview.d.ts +31 -0
- package/dist/modules/sale_backend/screens/overview.d.ts.map +1 -0
- package/dist/modules/sale_backend/screens/overview.js +73 -0
- package/dist/modules/sale_backend/screens/overview.js.map +1 -0
- package/dist/modules/sale_backend/screens/quotation-create.d.ts +13 -0
- package/dist/modules/sale_backend/screens/quotation-create.d.ts.map +1 -0
- package/dist/modules/sale_backend/screens/quotation-create.js +19 -0
- package/dist/modules/sale_backend/screens/quotation-create.js.map +1 -0
- package/dist/modules/sale_backend/screens/quotations-list.d.ts +25 -0
- package/dist/modules/sale_backend/screens/quotations-list.d.ts.map +1 -0
- package/dist/modules/sale_backend/screens/quotations-list.js +96 -0
- package/dist/modules/sale_backend/screens/quotations-list.js.map +1 -0
- package/dist/modules/sale_backend/screens/sales-orders-list.d.ts +25 -0
- package/dist/modules/sale_backend/screens/sales-orders-list.d.ts.map +1 -0
- package/dist/modules/sale_backend/screens/sales-orders-list.js +100 -0
- package/dist/modules/sale_backend/screens/sales-orders-list.js.map +1 -0
- package/dist/modules/sale_backend/screens/shared.d.ts +4 -0
- package/dist/modules/sale_backend/screens/shared.d.ts.map +1 -0
- package/dist/modules/sale_backend/screens/shared.js +4 -0
- package/dist/modules/sale_backend/screens/shared.js.map +1 -0
- package/dist/modules/sale_mail_backend/index.d.ts.map +1 -1
- package/dist/modules/sale_mail_backend/index.js +0 -1
- package/dist/modules/sale_mail_backend/index.js.map +1 -1
- package/dist/modules/sale_staff_channel/channel-routes.d.ts +2 -0
- package/dist/modules/sale_staff_channel/channel-routes.d.ts.map +1 -0
- package/dist/modules/sale_staff_channel/channel-routes.js +296 -0
- package/dist/modules/sale_staff_channel/channel-routes.js.map +1 -0
- package/dist/modules/sale_staff_channel/index.d.ts +7 -0
- package/dist/modules/sale_staff_channel/index.d.ts.map +1 -0
- package/dist/modules/sale_staff_channel/index.js +44 -0
- package/dist/modules/sale_staff_channel/index.js.map +1 -0
- package/dist/modules/sale_staff_channel/order-routes.d.ts +2 -0
- package/dist/modules/sale_staff_channel/order-routes.d.ts.map +1 -0
- package/dist/modules/sale_staff_channel/order-routes.js +658 -0
- package/dist/modules/sale_staff_channel/order-routes.js.map +1 -0
- package/dist/modules/sale_staff_channel/product-routes.d.ts +2 -0
- package/dist/modules/sale_staff_channel/product-routes.d.ts.map +1 -0
- package/dist/modules/sale_staff_channel/product-routes.js +183 -0
- package/dist/modules/sale_staff_channel/product-routes.js.map +1 -0
- package/dist/modules/stock/functions.d.ts.map +1 -1
- package/dist/modules/stock/functions.js +1239 -332
- package/dist/modules/stock/functions.js.map +1 -1
- package/dist/modules/stock/index.d.ts +2 -0
- package/dist/modules/stock/index.d.ts.map +1 -1
- package/dist/modules/stock/index.js +29 -6
- package/dist/modules/stock/index.js.map +1 -1
- package/dist/modules/stock/models.d.ts.map +1 -1
- package/dist/modules/stock/models.js +1 -0
- package/dist/modules/stock/models.js.map +1 -1
- package/dist/modules/stock/reports.d.ts +4 -0
- package/dist/modules/stock/reports.d.ts.map +1 -0
- package/dist/modules/stock/reports.js +100 -0
- package/dist/modules/stock/reports.js.map +1 -0
- package/dist/modules/stock/routing.d.ts +1 -1
- package/dist/modules/stock/routing.d.ts.map +1 -1
- package/dist/modules/stock/routing.js +35 -30
- package/dist/modules/stock/routing.js.map +1 -1
- package/dist/modules/stock/scope.d.ts +23 -0
- package/dist/modules/stock/scope.d.ts.map +1 -0
- package/dist/modules/stock/scope.js +26 -0
- package/dist/modules/stock/scope.js.map +1 -0
- package/dist/modules/stock/units.d.ts +14 -0
- package/dist/modules/stock/units.d.ts.map +1 -0
- package/dist/modules/stock/units.js +50 -0
- package/dist/modules/stock/units.js.map +1 -0
- package/dist/modules/stock_activity_backend/index.d.ts.map +1 -1
- package/dist/modules/stock_activity_backend/index.js +0 -1
- package/dist/modules/stock_activity_backend/index.js.map +1 -1
- package/dist/modules/stock_backend/client/editor-view.d.mts.map +1 -1
- package/dist/modules/stock_backend/client/editor-view.mjs +12 -10
- package/dist/modules/stock_backend/client/editor-view.mjs.map +1 -1
- package/dist/modules/stock_backend/index.js +27 -20
- package/dist/modules/stock_backend/index.js.map +1 -1
- package/dist/modules/stock_backend/routes.d.ts.map +1 -1
- package/dist/modules/stock_backend/routes.js +485 -232
- package/dist/modules/stock_backend/routes.js.map +1 -1
- package/dist/modules/stock_backend/screens/forecast.d.ts +28 -0
- package/dist/modules/stock_backend/screens/forecast.d.ts.map +1 -0
- package/dist/modules/stock_backend/screens/forecast.js +108 -0
- package/dist/modules/stock_backend/screens/forecast.js.map +1 -0
- package/dist/modules/stock_backend/screens/index.d.ts +22 -0
- package/dist/modules/stock_backend/screens/index.d.ts.map +1 -0
- package/dist/modules/stock_backend/screens/index.js +22 -0
- package/dist/modules/stock_backend/screens/index.js.map +1 -0
- package/dist/modules/stock_backend/screens/inventory.d.ts +27 -0
- package/dist/modules/stock_backend/screens/inventory.d.ts.map +1 -0
- package/dist/modules/stock_backend/screens/inventory.js +128 -0
- package/dist/modules/stock_backend/screens/inventory.js.map +1 -0
- package/dist/modules/stock_backend/screens/location-create.d.ts +15 -0
- package/dist/modules/stock_backend/screens/location-create.d.ts.map +1 -0
- package/dist/modules/stock_backend/screens/location-create.js +75 -0
- package/dist/modules/stock_backend/screens/location-create.js.map +1 -0
- package/dist/modules/stock_backend/screens/locations-list.d.ts +21 -0
- package/dist/modules/stock_backend/screens/locations-list.d.ts.map +1 -0
- package/dist/modules/stock_backend/screens/locations-list.js +62 -0
- package/dist/modules/stock_backend/screens/locations-list.js.map +1 -0
- package/dist/modules/stock_backend/screens/lot-create.d.ts +14 -0
- package/dist/modules/stock_backend/screens/lot-create.d.ts.map +1 -0
- package/dist/modules/stock_backend/screens/lot-create.js +60 -0
- package/dist/modules/stock_backend/screens/lot-create.js.map +1 -0
- package/dist/modules/stock_backend/screens/lot-detail.d.ts +30 -0
- package/dist/modules/stock_backend/screens/lot-detail.d.ts.map +1 -0
- package/dist/modules/stock_backend/screens/lot-detail.js +84 -0
- package/dist/modules/stock_backend/screens/lot-detail.js.map +1 -0
- package/dist/modules/stock_backend/screens/lots-list.d.ts +25 -0
- package/dist/modules/stock_backend/screens/lots-list.d.ts.map +1 -0
- package/dist/modules/stock_backend/screens/lots-list.js +54 -0
- package/dist/modules/stock_backend/screens/lots-list.js.map +1 -0
- package/dist/modules/stock_backend/screens/picking-type-create.d.ts +15 -0
- package/dist/modules/stock_backend/screens/picking-type-create.d.ts.map +1 -0
- package/dist/modules/stock_backend/screens/picking-type-create.js +89 -0
- package/dist/modules/stock_backend/screens/picking-type-create.js.map +1 -0
- package/dist/modules/stock_backend/screens/picking-types-list.d.ts +22 -0
- package/dist/modules/stock_backend/screens/picking-types-list.d.ts.map +1 -0
- package/dist/modules/stock_backend/screens/picking-types-list.js +80 -0
- package/dist/modules/stock_backend/screens/picking-types-list.js.map +1 -0
- package/dist/modules/stock_backend/screens/replenishment-create.d.ts +17 -0
- package/dist/modules/stock_backend/screens/replenishment-create.d.ts.map +1 -0
- package/dist/modules/stock_backend/screens/replenishment-create.js +74 -0
- package/dist/modules/stock_backend/screens/replenishment-create.js.map +1 -0
- package/dist/modules/stock_backend/screens/replenishment-list.d.ts +29 -0
- package/dist/modules/stock_backend/screens/replenishment-list.d.ts.map +1 -0
- package/dist/modules/stock_backend/screens/replenishment-list.js +84 -0
- package/dist/modules/stock_backend/screens/replenishment-list.js.map +1 -0
- package/dist/modules/stock_backend/screens/shared.d.ts +12 -0
- package/dist/modules/stock_backend/screens/shared.d.ts.map +1 -0
- package/dist/modules/stock_backend/screens/shared.js +29 -0
- package/dist/modules/stock_backend/screens/shared.js.map +1 -0
- package/dist/modules/stock_backend/screens/stock-route-create.d.ts +13 -0
- package/dist/modules/stock_backend/screens/stock-route-create.d.ts.map +1 -0
- package/dist/modules/stock_backend/screens/stock-route-create.js +52 -0
- package/dist/modules/stock_backend/screens/stock-route-create.js.map +1 -0
- package/dist/modules/stock_backend/screens/stock-route-detail.d.ts +30 -0
- package/dist/modules/stock_backend/screens/stock-route-detail.d.ts.map +1 -0
- package/dist/modules/stock_backend/screens/stock-route-detail.js +131 -0
- package/dist/modules/stock_backend/screens/stock-route-detail.js.map +1 -0
- package/dist/modules/stock_backend/screens/stock-routes-list.d.ts +22 -0
- package/dist/modules/stock_backend/screens/stock-routes-list.d.ts.map +1 -0
- package/dist/modules/stock_backend/screens/stock-routes-list.js +51 -0
- package/dist/modules/stock_backend/screens/stock-routes-list.js.map +1 -0
- package/dist/modules/stock_backend/screens/stock.d.ts +7 -0
- package/dist/modules/stock_backend/screens/stock.d.ts.map +1 -0
- package/dist/modules/stock_backend/screens/stock.js +13 -0
- package/dist/modules/stock_backend/screens/stock.js.map +1 -0
- package/dist/modules/stock_backend/screens/transfer-create.d.ts +13 -0
- package/dist/modules/stock_backend/screens/transfer-create.d.ts.map +1 -0
- package/dist/modules/stock_backend/screens/transfer-create.js +38 -0
- package/dist/modules/stock_backend/screens/transfer-create.js.map +1 -0
- package/dist/modules/stock_backend/screens/transfer-detail.d.ts +27 -0
- package/dist/modules/stock_backend/screens/transfer-detail.d.ts.map +1 -0
- package/dist/modules/stock_backend/screens/transfer-detail.js +91 -0
- package/dist/modules/stock_backend/screens/transfer-detail.js.map +1 -0
- package/dist/modules/stock_backend/screens/transfers-list.d.ts +25 -0
- package/dist/modules/stock_backend/screens/transfers-list.d.ts.map +1 -0
- package/dist/modules/stock_backend/screens/transfers-list.js +81 -0
- package/dist/modules/stock_backend/screens/transfers-list.js.map +1 -0
- package/dist/modules/stock_backend/screens/warehouse-create.d.ts +13 -0
- package/dist/modules/stock_backend/screens/warehouse-create.d.ts.map +1 -0
- package/dist/modules/stock_backend/screens/warehouse-create.js +79 -0
- package/dist/modules/stock_backend/screens/warehouse-create.js.map +1 -0
- package/dist/modules/stock_backend/screens/warehouses-list.d.ts +21 -0
- package/dist/modules/stock_backend/screens/warehouses-list.d.ts.map +1 -0
- package/dist/modules/stock_backend/screens/warehouses-list.js +60 -0
- package/dist/modules/stock_backend/screens/warehouses-list.js.map +1 -0
- package/dist/modules/stock_lot_activity_backend/index.d.ts.map +1 -1
- package/dist/modules/stock_lot_activity_backend/index.js +0 -1
- package/dist/modules/stock_lot_activity_backend/index.js.map +1 -1
- package/dist/modules/stock_lot_mail_backend/index.d.ts.map +1 -1
- package/dist/modules/stock_lot_mail_backend/index.js +0 -1
- package/dist/modules/stock_lot_mail_backend/index.js.map +1 -1
- package/dist/modules/stock_mail_backend/index.d.ts.map +1 -1
- package/dist/modules/stock_mail_backend/index.js +0 -1
- package/dist/modules/stock_mail_backend/index.js.map +1 -1
- package/dist/modules/stock_mail_inbound/index.d.ts.map +1 -1
- package/dist/modules/stock_mail_inbound/index.js +0 -2
- package/dist/modules/stock_mail_inbound/index.js.map +1 -1
- package/dist/modules/stock_staff_channel/channel-routes.d.ts +656 -0
- package/dist/modules/stock_staff_channel/channel-routes.d.ts.map +1 -0
- package/dist/modules/stock_staff_channel/channel-routes.js +445 -0
- package/dist/modules/stock_staff_channel/channel-routes.js.map +1 -0
- package/dist/modules/stock_staff_channel/functions.d.ts +3 -0
- package/dist/modules/stock_staff_channel/functions.d.ts.map +1 -0
- package/dist/modules/stock_staff_channel/functions.js +954 -0
- package/dist/modules/stock_staff_channel/functions.js.map +1 -0
- package/dist/modules/stock_staff_channel/index.d.ts +8 -0
- package/dist/modules/stock_staff_channel/index.d.ts.map +1 -0
- package/dist/modules/stock_staff_channel/index.js +37 -0
- package/dist/modules/stock_staff_channel/index.js.map +1 -0
- package/dist/modules/stock_staff_channel/models.d.ts +4 -0
- package/dist/modules/stock_staff_channel/models.d.ts.map +1 -0
- package/dist/modules/stock_staff_channel/models.js +119 -0
- package/dist/modules/stock_staff_channel/models.js.map +1 -0
- package/dist/modules/stock_staff_channel/operation-routes.d.ts +2 -0
- package/dist/modules/stock_staff_channel/operation-routes.d.ts.map +1 -0
- package/dist/modules/stock_staff_channel/operation-routes.js +1269 -0
- package/dist/modules/stock_staff_channel/operation-routes.js.map +1 -0
- package/dist/modules/storage/functions.d.ts.map +1 -1
- package/dist/modules/storage/functions.js +18 -5
- package/dist/modules/storage/functions.js.map +1 -1
- package/dist/modules/storage/index.js +0 -1
- package/dist/modules/storage/index.js.map +1 -1
- package/dist/modules/storage/jobs.d.ts +21 -1
- package/dist/modules/storage/jobs.d.ts.map +1 -1
- package/dist/modules/storage/jobs.js +142 -2
- package/dist/modules/storage/jobs.js.map +1 -1
- package/dist/modules/storage/models.d.ts.map +1 -1
- package/dist/modules/storage/models.js +2 -0
- package/dist/modules/storage/models.js.map +1 -1
- package/dist/modules/storage/policy.d.ts +5 -0
- package/dist/modules/storage/policy.d.ts.map +1 -0
- package/dist/modules/storage/policy.js +13 -0
- package/dist/modules/storage/policy.js.map +1 -0
- package/dist/modules/storage/routes.d.ts +1 -0
- package/dist/modules/storage/routes.d.ts.map +1 -1
- package/dist/modules/storage/routes.js +19 -15
- package/dist/modules/storage/routes.js.map +1 -1
- package/dist/modules/uom/convert.d.ts +1 -1
- package/dist/modules/uom/convert.js +2 -2
- package/dist/modules/uom/convert.js.map +1 -1
- package/dist/modules/uom/functions.d.ts.map +1 -1
- package/dist/modules/uom/functions.js +39 -4
- package/dist/modules/uom/functions.js.map +1 -1
- package/dist/modules/uom/index.d.ts.map +1 -1
- package/dist/modules/uom/index.js +1 -2
- package/dist/modules/uom/index.js.map +1 -1
- package/dist/modules/uom/messages.js +2 -2
- package/dist/modules/uom/messages.js.map +1 -1
- package/dist/modules/uom/models.d.ts +1 -1
- package/dist/modules/uom/models.d.ts.map +1 -1
- package/dist/modules/uom/models.js +1 -1
- package/dist/modules/uom/models.js.map +1 -1
- package/dist/modules/user/authorization.d.ts +80 -0
- package/dist/modules/user/authorization.d.ts.map +1 -0
- package/dist/modules/user/authorization.js +1039 -0
- package/dist/modules/user/authorization.js.map +1 -0
- package/dist/modules/user/functions.d.ts.map +1 -1
- package/dist/modules/user/functions.js +188 -32
- package/dist/modules/user/functions.js.map +1 -1
- package/dist/modules/user/index.d.ts +4 -1
- package/dist/modules/user/index.d.ts.map +1 -1
- package/dist/modules/user/index.js +2 -3
- package/dist/modules/user/index.js.map +1 -1
- package/dist/modules/user/login.d.ts +1 -27
- package/dist/modules/user/login.d.ts.map +1 -1
- package/dist/modules/user/login.js +5 -45
- package/dist/modules/user/login.js.map +1 -1
- package/dist/modules/user/messages.d.ts +6 -0
- package/dist/modules/user/messages.d.ts.map +1 -1
- package/dist/modules/user/messages.js +6 -0
- package/dist/modules/user/messages.js.map +1 -1
- package/dist/modules/user/models.d.ts +1 -1
- package/dist/modules/user/models.d.ts.map +1 -1
- package/dist/modules/user/models.js +73 -9
- package/dist/modules/user/models.js.map +1 -1
- package/dist/modules/user/relations.d.ts.map +1 -1
- package/dist/modules/user/relations.js +6 -0
- package/dist/modules/user/relations.js.map +1 -1
- package/dist/modules/user/roles.d.ts +11 -1
- package/dist/modules/user/roles.d.ts.map +1 -1
- package/dist/modules/user/roles.js +402 -117
- package/dist/modules/user/roles.js.map +1 -1
- package/dist/modules/user/routes.js +1 -1
- package/dist/modules/user/routes.js.map +1 -1
- package/dist/modules/user_backend/index.d.ts +1 -1
- package/dist/modules/user_backend/index.d.ts.map +1 -1
- package/dist/modules/user_backend/index.js +1 -3
- package/dist/modules/user_backend/index.js.map +1 -1
- package/dist/modules/user_backend/messages.d.ts +60 -0
- package/dist/modules/user_backend/messages.d.ts.map +1 -1
- package/dist/modules/user_backend/messages.js +60 -0
- package/dist/modules/user_backend/messages.js.map +1 -1
- package/dist/modules/user_backend/routes.d.ts.map +1 -1
- package/dist/modules/user_backend/routes.js +352 -69
- package/dist/modules/user_backend/routes.js.map +1 -1
- package/dist/modules/user_backend/screens/index.d.ts +11 -0
- package/dist/modules/user_backend/screens/index.d.ts.map +1 -0
- package/dist/modules/user_backend/screens/index.js +8 -0
- package/dist/modules/user_backend/screens/index.js.map +1 -0
- package/dist/modules/user_backend/screens/presets-form.d.ts +16 -0
- package/dist/modules/user_backend/screens/presets-form.d.ts.map +1 -0
- package/dist/modules/user_backend/screens/presets-form.js +37 -0
- package/dist/modules/user_backend/screens/presets-form.js.map +1 -0
- package/dist/modules/user_backend/screens/profile-form.d.ts +14 -0
- package/dist/modules/user_backend/screens/profile-form.d.ts.map +1 -0
- package/dist/modules/user_backend/screens/profile-form.js +37 -0
- package/dist/modules/user_backend/screens/profile-form.js.map +1 -0
- package/dist/modules/user_backend/screens/role-form.d.ts +21 -0
- package/dist/modules/user_backend/screens/role-form.d.ts.map +1 -0
- package/dist/modules/user_backend/screens/role-form.js +93 -0
- package/dist/modules/user_backend/screens/role-form.js.map +1 -0
- package/dist/modules/user_backend/screens/roles-list.d.ts +15 -0
- package/dist/modules/user_backend/screens/roles-list.d.ts.map +1 -0
- package/dist/modules/user_backend/screens/roles-list.js +48 -0
- package/dist/modules/user_backend/screens/roles-list.js.map +1 -0
- package/dist/modules/user_backend/screens/sessions.d.ts +5 -0
- package/dist/modules/user_backend/screens/sessions.d.ts.map +1 -0
- package/dist/modules/user_backend/screens/sessions.js +35 -0
- package/dist/modules/user_backend/screens/sessions.js.map +1 -0
- package/dist/modules/user_backend/screens/types.d.ts +68 -0
- package/dist/modules/user_backend/screens/types.d.ts.map +1 -0
- package/dist/modules/user_backend/screens/types.js +2 -0
- package/dist/modules/user_backend/screens/types.js.map +1 -0
- package/dist/modules/user_backend/screens/user-form.d.ts +55 -0
- package/dist/modules/user_backend/screens/user-form.d.ts.map +1 -0
- package/dist/modules/user_backend/screens/user-form.js +174 -0
- package/dist/modules/user_backend/screens/user-form.js.map +1 -0
- package/dist/modules/user_backend/screens/users-list.d.ts +17 -0
- package/dist/modules/user_backend/screens/users-list.d.ts.map +1 -0
- package/dist/modules/user_backend/screens/users-list.js +56 -0
- package/dist/modules/user_backend/screens/users-list.js.map +1 -0
- package/dist/modules/website/cms.d.ts +18 -1
- package/dist/modules/website/cms.d.ts.map +1 -1
- package/dist/modules/website/cms.js +373 -38
- package/dist/modules/website/cms.js.map +1 -1
- package/dist/modules/website/customer.d.ts.map +1 -1
- package/dist/modules/website/customer.js +249 -1
- package/dist/modules/website/customer.js.map +1 -1
- package/dist/modules/website/index.d.ts.map +1 -1
- package/dist/modules/website/index.js +26 -4
- package/dist/modules/website/index.js.map +1 -1
- package/dist/modules/website/models.d.ts.map +1 -1
- package/dist/modules/website/models.js +101 -0
- package/dist/modules/website/models.js.map +1 -1
- package/dist/modules/website/paths.d.ts +31 -0
- package/dist/modules/website/paths.d.ts.map +1 -0
- package/dist/modules/website/paths.js +48 -0
- package/dist/modules/website/paths.js.map +1 -0
- package/dist/modules/website/publication.d.ts +3 -0
- package/dist/modules/website/publication.d.ts.map +1 -0
- package/dist/modules/website/publication.js +366 -0
- package/dist/modules/website/publication.js.map +1 -0
- package/dist/modules/website/renderable.d.ts +32 -0
- package/dist/modules/website/renderable.d.ts.map +1 -0
- package/dist/modules/website/renderable.js +59 -0
- package/dist/modules/website/renderable.js.map +1 -0
- package/dist/modules/website/sections.d.ts.map +1 -1
- package/dist/modules/website/sections.js +13 -0
- package/dist/modules/website/sections.js.map +1 -1
- package/dist/modules/website_backend/csv.d.ts +23 -0
- package/dist/modules/website_backend/csv.d.ts.map +1 -0
- package/dist/modules/website_backend/csv.js +31 -0
- package/dist/modules/website_backend/csv.js.map +1 -0
- package/dist/modules/website_backend/index.js +260 -2
- package/dist/modules/website_backend/index.js.map +1 -1
- package/dist/modules/website_backend/menus.d.ts.map +1 -1
- package/dist/modules/website_backend/menus.js +28 -6
- package/dist/modules/website_backend/menus.js.map +1 -1
- package/dist/modules/website_backend/routes.d.ts.map +1 -1
- package/dist/modules/website_backend/routes.js +684 -126
- package/dist/modules/website_backend/routes.js.map +1 -1
- package/dist/modules/website_backend/screens/index.d.ts +333 -0
- package/dist/modules/website_backend/screens/index.d.ts.map +1 -0
- package/dist/modules/website_backend/screens/index.js +1332 -0
- package/dist/modules/website_backend/screens/index.js.map +1 -0
- package/dist/modules/website_backend/screens/page-frame.d.ts +14 -0
- package/dist/modules/website_backend/screens/page-frame.d.ts.map +1 -0
- package/dist/modules/website_backend/screens/page-frame.js +13 -0
- package/dist/modules/website_backend/screens/page-frame.js.map +1 -0
- package/dist/modules/website_form/audit.d.ts +27 -0
- package/dist/modules/website_form/audit.d.ts.map +1 -0
- package/dist/modules/website_form/audit.js +30 -0
- package/dist/modules/website_form/audit.js.map +1 -0
- package/dist/modules/website_form/functions.d.ts.map +1 -1
- package/dist/modules/website_form/functions.js +416 -12
- package/dist/modules/website_form/functions.js.map +1 -1
- package/dist/modules/website_form/index.js +24 -2
- package/dist/modules/website_form/index.js.map +1 -1
- package/dist/modules/website_form/jobs.d.ts +11 -0
- package/dist/modules/website_form/jobs.d.ts.map +1 -0
- package/dist/modules/website_form/jobs.js +80 -0
- package/dist/modules/website_form/jobs.js.map +1 -0
- package/dist/modules/website_form/models.d.ts.map +1 -1
- package/dist/modules/website_form/models.js +89 -0
- package/dist/modules/website_form/models.js.map +1 -1
- package/dist/modules/website_form/purge.d.ts +22 -0
- package/dist/modules/website_form/purge.d.ts.map +1 -0
- package/dist/modules/website_form/purge.js +59 -0
- package/dist/modules/website_form/purge.js.map +1 -0
- package/dist/modules/website_form/retention.d.ts +70 -0
- package/dist/modules/website_form/retention.d.ts.map +1 -0
- package/dist/modules/website_form/retention.js +145 -0
- package/dist/modules/website_form/retention.js.map +1 -0
- package/dist/modules/website_form/routes.d.ts.map +1 -1
- package/dist/modules/website_form/routes.js +37 -3
- package/dist/modules/website_form/routes.js.map +1 -1
- package/dist/modules/website_form_mail/index.d.ts +36 -0
- package/dist/modules/website_form_mail/index.d.ts.map +1 -0
- package/dist/modules/website_form_mail/index.js +137 -0
- package/dist/modules/website_form_mail/index.js.map +1 -0
- package/dist/modules/website_hospitality/channel-routes.d.ts +2 -0
- package/dist/modules/website_hospitality/channel-routes.d.ts.map +1 -0
- package/dist/modules/website_hospitality/channel-routes.js +355 -0
- package/dist/modules/website_hospitality/channel-routes.js.map +1 -0
- package/dist/modules/website_hospitality/functions.d.ts.map +1 -1
- package/dist/modules/website_hospitality/functions.js +27 -2
- package/dist/modules/website_hospitality/functions.js.map +1 -1
- package/dist/modules/website_hospitality/index.js +4 -3
- package/dist/modules/website_hospitality/index.js.map +1 -1
- package/dist/modules/website_hospitality/models.d.ts.map +1 -1
- package/dist/modules/website_hospitality/models.js +2 -0
- package/dist/modules/website_hospitality/models.js.map +1 -1
- package/dist/modules/website_menu/functions.d.ts.map +1 -1
- package/dist/modules/website_menu/functions.js +184 -9
- package/dist/modules/website_menu/functions.js.map +1 -1
- package/dist/modules/website_menu/index.js +6 -1
- package/dist/modules/website_menu/index.js.map +1 -1
- package/dist/modules/website_retail/channel-routes.d.ts +2 -0
- package/dist/modules/website_retail/channel-routes.d.ts.map +1 -0
- package/dist/modules/website_retail/channel-routes.js +305 -0
- package/dist/modules/website_retail/channel-routes.js.map +1 -0
- package/dist/modules/website_retail/functions.d.ts +14 -1
- package/dist/modules/website_retail/functions.d.ts.map +1 -1
- package/dist/modules/website_retail/functions.js +6 -6
- package/dist/modules/website_retail/functions.js.map +1 -1
- package/dist/modules/website_retail/index.js +24 -3
- package/dist/modules/website_retail/index.js.map +1 -1
- package/dist/modules/website_retail/models.d.ts.map +1 -1
- package/dist/modules/website_retail/models.js +30 -0
- package/dist/modules/website_retail/models.js.map +1 -1
- package/dist/modules/website_retail/online.d.ts +3 -0
- package/dist/modules/website_retail/online.d.ts.map +1 -0
- package/dist/modules/website_retail/online.js +710 -0
- package/dist/modules/website_retail/online.js.map +1 -0
- package/dist/modules/website_search/client/search.d.mts +16 -2
- package/dist/modules/website_search/client/search.d.mts.map +1 -1
- package/dist/modules/website_search/client/search.mjs +112 -6
- package/dist/modules/website_search/client/search.mjs.map +1 -1
- package/dist/modules/website_search/functions.d.ts +3 -0
- package/dist/modules/website_search/functions.d.ts.map +1 -0
- package/dist/modules/website_search/functions.js +239 -0
- package/dist/modules/website_search/functions.js.map +1 -0
- package/dist/modules/website_search/index.js +4 -1
- package/dist/modules/website_search/index.js.map +1 -1
- package/dist/modules/website_search/islands.d.ts +6 -0
- package/dist/modules/website_search/islands.d.ts.map +1 -1
- package/dist/modules/website_search/islands.js +8 -2
- package/dist/modules/website_search/islands.js.map +1 -1
- package/dist/modules/website_search/models.d.ts +15 -0
- package/dist/modules/website_search/models.d.ts.map +1 -0
- package/dist/modules/website_search/models.js +58 -0
- package/dist/modules/website_search/models.js.map +1 -0
- package/dist/modules/website_seo/functions.d.ts +3 -0
- package/dist/modules/website_seo/functions.d.ts.map +1 -0
- package/dist/modules/website_seo/functions.js +164 -0
- package/dist/modules/website_seo/functions.js.map +1 -0
- package/dist/modules/website_seo/index.js +15 -5
- package/dist/modules/website_seo/index.js.map +1 -1
- package/dist/modules/website_seo/projection.d.ts +52 -0
- package/dist/modules/website_seo/projection.d.ts.map +1 -0
- package/dist/modules/website_seo/projection.js +129 -0
- package/dist/modules/website_seo/projection.js.map +1 -0
- package/dist/modules/website_seo/routes.d.ts +3 -0
- package/dist/modules/website_seo/routes.d.ts.map +1 -0
- package/dist/modules/website_seo/routes.js +56 -0
- package/dist/modules/website_seo/routes.js.map +1 -0
- package/dist/permission-catalogue.d.ts +5 -0
- package/dist/permission-catalogue.d.ts.map +1 -0
- package/dist/permission-catalogue.js +1505 -0
- package/dist/permission-catalogue.js.map +1 -0
- package/dist/scaffold/index.d.ts +2 -0
- package/dist/scaffold/index.d.ts.map +1 -0
- package/dist/scaffold/index.js +31 -0
- package/dist/scaffold/index.js.map +1 -0
- package/dist/scaffold/templates/README.md.tmpl +17 -0
- package/dist/scaffold/templates/gitignore.tmpl +2 -0
- package/dist/scaffold/templates/ket.workspace.mjs.tmpl +1 -0
- package/dist/scaffold/templates/package.json.tmpl +15 -0
- package/dist/themes/hospitality/templates/website.columns.ktl +4 -0
- package/dist/themes/paper/templates/website.columns.ktl +4 -0
- package/dist/ui/actions.d.ts +4 -0
- package/dist/ui/actions.d.ts.map +1 -1
- package/dist/ui/actions.js +1 -1
- package/dist/ui/actions.js.map +1 -1
- package/dist/ui/activity.d.ts +1 -1
- package/dist/ui/activity.d.ts.map +1 -1
- package/dist/ui/activity.js +3 -5
- package/dist/ui/activity.js.map +1 -1
- package/dist/ui/attachments.js +1 -1
- package/dist/ui/attachments.js.map +1 -1
- package/dist/ui/auth.d.ts +36 -0
- package/dist/ui/auth.d.ts.map +1 -1
- package/dist/ui/auth.js +55 -0
- package/dist/ui/auth.js.map +1 -1
- package/dist/ui/board-page.d.ts +6 -0
- package/dist/ui/board-page.d.ts.map +1 -0
- package/dist/ui/board-page.js +4 -0
- package/dist/ui/board-page.js.map +1 -0
- package/dist/ui/charts.d.ts +83 -0
- package/dist/ui/charts.d.ts.map +1 -0
- package/dist/ui/charts.js +105 -0
- package/dist/ui/charts.js.map +1 -0
- package/dist/ui/chrome.d.ts +37 -2
- package/dist/ui/chrome.d.ts.map +1 -1
- package/dist/ui/chrome.js +39 -5
- package/dist/ui/chrome.js.map +1 -1
- package/dist/ui/client/activity-view.mjs +7 -7
- package/dist/ui/client/activity-view.mjs.map +1 -1
- package/dist/ui/client/activity.css +6 -34
- package/dist/ui/client/calendar-view.d.mts.map +1 -1
- package/dist/ui/client/calendar-view.mjs +7 -6
- package/dist/ui/client/calendar-view.mjs.map +1 -1
- package/dist/ui/client/calendar.css +4 -14
- package/dist/ui/client/chart-view.d.ts +51 -0
- package/dist/ui/client/chart-view.d.ts.map +1 -0
- package/dist/ui/client/chart-view.js +192 -0
- package/dist/ui/client/chart-view.js.map +1 -0
- package/dist/ui/client/flow-app.css +387 -0
- package/dist/ui/client/flow-board-view.d.mts +8 -0
- package/dist/ui/client/flow-board-view.d.mts.map +1 -0
- package/dist/ui/client/flow-board-view.mjs +161 -0
- package/dist/ui/client/flow-board-view.mjs.map +1 -0
- package/dist/ui/client/flow-board.d.mts +3 -0
- package/dist/ui/client/flow-board.d.mts.map +1 -0
- package/dist/ui/client/flow-board.mjs +7 -0
- package/dist/ui/client/flow-board.mjs.map +1 -0
- package/dist/ui/client/flow-map-view.d.mts +2 -0
- package/dist/ui/client/flow-map-view.d.mts.map +1 -0
- package/dist/ui/client/flow-map-view.mjs +235 -0
- package/dist/ui/client/flow-map-view.mjs.map +1 -0
- package/dist/ui/client/flow-map.d.mts +3 -0
- package/dist/ui/client/flow-map.d.mts.map +1 -0
- package/dist/ui/client/flow-map.mjs +7 -0
- package/dist/ui/client/flow-map.mjs.map +1 -0
- package/dist/ui/client/live-doc-blocks.d.ts +19 -0
- package/dist/ui/client/live-doc-blocks.d.ts.map +1 -0
- package/dist/ui/client/live-doc-blocks.js +23 -0
- package/dist/ui/client/live-doc-blocks.js.map +1 -0
- package/dist/ui/client/live-doc-markdown.d.ts +18 -0
- package/dist/ui/client/live-doc-markdown.d.ts.map +1 -0
- package/dist/ui/client/live-doc-markdown.js +175 -0
- package/dist/ui/client/live-doc-markdown.js.map +1 -0
- package/dist/ui/client/live-doc-shell.d.ts +101 -0
- package/dist/ui/client/live-doc-shell.d.ts.map +1 -0
- package/dist/ui/client/live-doc-shell.js +251 -0
- package/dist/ui/client/live-doc-shell.js.map +1 -0
- package/dist/ui/client/live-doc-view.d.ts +33 -0
- package/dist/ui/client/live-doc-view.d.ts.map +1 -0
- package/dist/ui/client/live-doc-view.js +1237 -0
- package/dist/ui/client/live-doc-view.js.map +1 -0
- package/dist/ui/client/live-doc.css +243 -0
- package/dist/ui/client/live-doc.d.mts +12 -0
- package/dist/ui/client/live-doc.d.mts.map +1 -0
- package/dist/ui/client/live-doc.mjs +11 -0
- package/dist/ui/client/live-doc.mjs.map +7 -0
- package/dist/ui/client/mail-bundle.d.mts +9 -0
- package/dist/ui/client/mail-bundle.d.mts.map +1 -0
- package/dist/ui/client/mail-bundle.mjs +50 -0
- package/dist/ui/client/mail-bundle.mjs.map +7 -0
- package/dist/ui/client/mail-entry.d.mts +11 -0
- package/dist/ui/client/mail-entry.d.mts.map +1 -0
- package/dist/ui/client/mail-entry.mjs +9 -0
- package/dist/ui/client/mail-entry.mjs.map +1 -0
- package/dist/ui/client/mail-view.d.mts.map +1 -1
- package/dist/ui/client/mail-view.mjs +5 -3
- package/dist/ui/client/mail-view.mjs.map +1 -1
- package/dist/ui/client/mail.css +3 -3
- package/dist/ui/client/relation-select-view.d.ts +77 -0
- package/dist/ui/client/relation-select-view.d.ts.map +1 -0
- package/dist/ui/client/relation-select-view.js +216 -0
- package/dist/ui/client/relation-select-view.js.map +1 -0
- package/dist/ui/client/table-selection-view.d.ts +4 -0
- package/dist/ui/client/table-selection-view.d.ts.map +1 -0
- package/dist/ui/client/table-selection-view.js +283 -0
- package/dist/ui/client/table-selection-view.js.map +1 -0
- package/dist/ui/dashboard-page.d.ts +6 -0
- package/dist/ui/dashboard-page.d.ts.map +1 -0
- package/dist/ui/dashboard-page.js +4 -0
- package/dist/ui/dashboard-page.js.map +1 -0
- package/dist/ui/data.d.ts +51 -1
- package/dist/ui/data.d.ts.map +1 -1
- package/dist/ui/data.js +87 -1
- package/dist/ui/data.js.map +1 -1
- package/dist/ui/date-picker.d.ts.map +1 -1
- package/dist/ui/date-picker.js +2 -2
- package/dist/ui/date-picker.js.map +1 -1
- package/dist/ui/form-page.d.ts +6 -0
- package/dist/ui/form-page.d.ts.map +1 -0
- package/dist/ui/form-page.js +5 -0
- package/dist/ui/form-page.js.map +1 -0
- package/dist/ui/form.d.ts +4 -1
- package/dist/ui/form.d.ts.map +1 -1
- package/dist/ui/form.js +7 -5
- package/dist/ui/form.js.map +1 -1
- package/dist/ui/format.d.ts +13 -2
- package/dist/ui/format.d.ts.map +1 -1
- package/dist/ui/format.js +28 -7
- package/dist/ui/format.js.map +1 -1
- package/dist/ui/gantt.d.ts +52 -0
- package/dist/ui/gantt.d.ts.map +1 -0
- package/dist/ui/gantt.js +92 -0
- package/dist/ui/gantt.js.map +1 -0
- package/dist/ui/hooks.d.ts.map +1 -1
- package/dist/ui/hooks.js +14 -0
- package/dist/ui/hooks.js.map +1 -1
- package/dist/ui/icons.d.ts.map +1 -1
- package/dist/ui/icons.js +6 -1
- package/dist/ui/icons.js.map +1 -1
- package/dist/ui/index.d.ts +95 -14
- package/dist/ui/index.d.ts.map +1 -1
- package/dist/ui/index.js +78 -13
- package/dist/ui/index.js.map +1 -1
- package/dist/ui/layout.d.ts +43 -38
- package/dist/ui/layout.d.ts.map +1 -1
- package/dist/ui/layout.js +29 -37
- package/dist/ui/layout.js.map +1 -1
- package/dist/ui/list-page.d.ts +19 -0
- package/dist/ui/list-page.d.ts.map +1 -0
- package/dist/ui/list-page.js +21 -0
- package/dist/ui/list-page.js.map +1 -0
- package/dist/ui/media.d.ts.map +1 -1
- package/dist/ui/media.js +1 -1
- package/dist/ui/media.js.map +1 -1
- package/dist/ui/modal.d.ts +26 -1
- package/dist/ui/modal.d.ts.map +1 -1
- package/dist/ui/modal.js +18 -2
- package/dist/ui/modal.js.map +1 -1
- package/dist/ui/nav.d.ts +21 -1
- package/dist/ui/nav.d.ts.map +1 -1
- package/dist/ui/nav.js +43 -8
- package/dist/ui/nav.js.map +1 -1
- package/dist/ui/navigation.d.ts +36 -2
- package/dist/ui/navigation.d.ts.map +1 -1
- package/dist/ui/navigation.js +60 -5
- package/dist/ui/navigation.js.map +1 -1
- package/dist/ui/partner.d.ts +18 -0
- package/dist/ui/partner.d.ts.map +1 -0
- package/dist/ui/partner.js +11 -0
- package/dist/ui/partner.js.map +1 -0
- package/dist/ui/primitives.d.ts +28 -10
- package/dist/ui/primitives.d.ts.map +1 -1
- package/dist/ui/primitives.js +21 -7
- package/dist/ui/primitives.js.map +1 -1
- package/dist/ui/product-media.d.ts +47 -0
- package/dist/ui/product-media.d.ts.map +1 -0
- package/dist/ui/product-media.js +67 -0
- package/dist/ui/product-media.js.map +1 -0
- package/dist/ui/product-variants.d.ts +68 -0
- package/dist/ui/product-variants.d.ts.map +1 -0
- package/dist/ui/product-variants.js +81 -0
- package/dist/ui/product-variants.js.map +1 -0
- package/dist/ui/record-detail.d.ts +70 -0
- package/dist/ui/record-detail.d.ts.map +1 -0
- package/dist/ui/record-detail.js +35 -0
- package/dist/ui/record-detail.js.map +1 -0
- package/dist/ui/record-page.d.ts +16 -0
- package/dist/ui/record-page.d.ts.map +1 -0
- package/dist/ui/record-page.js +13 -0
- package/dist/ui/record-page.js.map +1 -0
- package/dist/ui/record.d.ts +15 -3
- package/dist/ui/record.d.ts.map +1 -1
- package/dist/ui/record.js +6 -5
- package/dist/ui/record.js.map +1 -1
- package/dist/ui/surfaces.d.ts +30 -2
- package/dist/ui/surfaces.d.ts.map +1 -1
- package/dist/ui/surfaces.js +39 -2
- package/dist/ui/surfaces.js.map +1 -1
- package/dist/ui/table.d.ts +25 -2
- package/dist/ui/table.d.ts.map +1 -1
- package/dist/ui/table.js +10 -6
- package/dist/ui/table.js.map +1 -1
- package/dist/ui/timeframe.d.ts +39 -0
- package/dist/ui/timeframe.d.ts.map +1 -0
- package/dist/ui/timeframe.js +36 -0
- package/dist/ui/timeframe.js.map +1 -0
- package/dist/ui/workspace-page.d.ts +16 -0
- package/dist/ui/workspace-page.d.ts.map +1 -0
- package/dist/ui/workspace-page.js +15 -0
- package/dist/ui/workspace-page.js.map +1 -0
- package/package.json +16 -3
- package/dist/modules/account/tt99.d.ts +0 -30
- package/dist/modules/account/tt99.d.ts.map +0 -1
- package/dist/modules/account/tt99.js +0 -1661
- package/dist/modules/account/tt99.js.map +0 -1
- package/dist/modules/account_backend/accounting-overview-screen.d.ts +0 -18
- package/dist/modules/account_backend/accounting-overview-screen.d.ts.map +0 -1
- package/dist/modules/account_backend/accounting-overview-screen.js +0 -104
- package/dist/modules/account_backend/accounting-overview-screen.js.map +0 -1
- package/dist/modules/account_backend/accounts-screen.d.ts +0 -13
- package/dist/modules/account_backend/accounts-screen.d.ts.map +0 -1
- package/dist/modules/account_backend/accounts-screen.js +0 -49
- package/dist/modules/account_backend/accounts-screen.js.map +0 -1
- package/dist/modules/account_backend/customer-invoices-screen.d.ts +0 -14
- package/dist/modules/account_backend/customer-invoices-screen.d.ts.map +0 -1
- package/dist/modules/account_backend/customer-invoices-screen.js +0 -63
- package/dist/modules/account_backend/customer-invoices-screen.js.map +0 -1
- package/dist/modules/account_backend/general-ledger-screen.d.ts +0 -13
- package/dist/modules/account_backend/general-ledger-screen.d.ts.map +0 -1
- package/dist/modules/account_backend/general-ledger-screen.js +0 -56
- package/dist/modules/account_backend/general-ledger-screen.js.map +0 -1
- package/dist/modules/account_backend/journal-entries-screen.d.ts +0 -14
- package/dist/modules/account_backend/journal-entries-screen.d.ts.map +0 -1
- package/dist/modules/account_backend/journal-entries-screen.js +0 -45
- package/dist/modules/account_backend/journal-entries-screen.js.map +0 -1
- package/dist/modules/account_backend/journals-screen.d.ts +0 -14
- package/dist/modules/account_backend/journals-screen.d.ts.map +0 -1
- package/dist/modules/account_backend/journals-screen.js +0 -53
- package/dist/modules/account_backend/journals-screen.js.map +0 -1
- package/dist/modules/account_backend/move-detail-screen.d.ts +0 -10
- package/dist/modules/account_backend/move-detail-screen.d.ts.map +0 -1
- package/dist/modules/account_backend/move-detail-screen.js +0 -100
- package/dist/modules/account_backend/move-detail-screen.js.map +0 -1
- package/dist/modules/account_backend/partner-ledger-screen.d.ts +0 -14
- package/dist/modules/account_backend/partner-ledger-screen.d.ts.map +0 -1
- package/dist/modules/account_backend/partner-ledger-screen.js +0 -69
- package/dist/modules/account_backend/partner-ledger-screen.js.map +0 -1
- package/dist/modules/account_backend/payment-terms-screen.d.ts +0 -14
- package/dist/modules/account_backend/payment-terms-screen.d.ts.map +0 -1
- package/dist/modules/account_backend/payment-terms-screen.js +0 -40
- package/dist/modules/account_backend/payment-terms-screen.js.map +0 -1
- package/dist/modules/account_backend/payments-screen.d.ts +0 -14
- package/dist/modules/account_backend/payments-screen.d.ts.map +0 -1
- package/dist/modules/account_backend/payments-screen.js +0 -54
- package/dist/modules/account_backend/payments-screen.js.map +0 -1
- package/dist/modules/account_backend/screens.d.ts +0 -7
- package/dist/modules/account_backend/screens.d.ts.map +0 -1
- package/dist/modules/account_backend/screens.js +0 -7
- package/dist/modules/account_backend/screens.js.map +0 -1
- package/dist/modules/account_backend/taxes-screen.d.ts +0 -15
- package/dist/modules/account_backend/taxes-screen.d.ts.map +0 -1
- package/dist/modules/account_backend/taxes-screen.js +0 -73
- package/dist/modules/account_backend/taxes-screen.js.map +0 -1
- package/dist/modules/account_backend/trial-balance-screen.d.ts +0 -13
- package/dist/modules/account_backend/trial-balance-screen.d.ts.map +0 -1
- package/dist/modules/account_backend/trial-balance-screen.js +0 -62
- package/dist/modules/account_backend/trial-balance-screen.js.map +0 -1
- package/dist/modules/account_backend/vendor-bills-screen.d.ts +0 -14
- package/dist/modules/account_backend/vendor-bills-screen.d.ts.map +0 -1
- package/dist/modules/account_backend/vendor-bills-screen.js +0 -59
- package/dist/modules/account_backend/vendor-bills-screen.js.map +0 -1
- package/dist/modules/account_partner_backend/screens.d.ts +0 -16
- package/dist/modules/account_partner_backend/screens.d.ts.map +0 -1
- package/dist/modules/account_partner_backend/screens.js +0 -26
- package/dist/modules/account_partner_backend/screens.js.map +0 -1
- package/dist/modules/activity_backend/screens.d.ts +0 -5
- package/dist/modules/activity_backend/screens.d.ts.map +0 -1
- package/dist/modules/activity_backend/screens.js +0 -52
- package/dist/modules/activity_backend/screens.js.map +0 -1
- package/dist/modules/address_backend/screens.d.ts +0 -31
- package/dist/modules/address_backend/screens.d.ts.map +0 -1
- package/dist/modules/address_backend/screens.js +0 -147
- package/dist/modules/address_backend/screens.js.map +0 -1
- package/dist/modules/backend/design/admin.css +0 -4229
- package/dist/modules/backend/design/client/relation-select-view.d.mts +0 -5
- package/dist/modules/backend/design/client/relation-select-view.d.mts.map +0 -1
- package/dist/modules/backend/design/client/relation-select-view.mjs +0 -335
- package/dist/modules/backend/design/client/relation-select-view.mjs.map +0 -1
- package/dist/modules/calendar_backend/screens.d.ts +0 -5
- package/dist/modules/calendar_backend/screens.d.ts.map +0 -1
- package/dist/modules/calendar_backend/screens.js +0 -4
- package/dist/modules/calendar_backend/screens.js.map +0 -1
- package/dist/modules/company_backend/screens.d.ts +0 -62
- package/dist/modules/company_backend/screens.d.ts.map +0 -1
- package/dist/modules/company_backend/screens.js +0 -268
- package/dist/modules/company_backend/screens.js.map +0 -1
- package/dist/modules/crm_backend/list-search.d.ts +0 -21
- package/dist/modules/crm_backend/list-search.d.ts.map +0 -1
- package/dist/modules/crm_backend/list-search.js +0 -220
- package/dist/modules/crm_backend/list-search.js.map +0 -1
- package/dist/modules/crm_backend/screens.d.ts +0 -32
- package/dist/modules/crm_backend/screens.d.ts.map +0 -1
- package/dist/modules/crm_backend/screens.js +0 -405
- package/dist/modules/crm_backend/screens.js.map +0 -1
- package/dist/modules/hospitality_core/screens.d.ts +0 -773
- package/dist/modules/hospitality_core/screens.d.ts.map +0 -1
- package/dist/modules/hospitality_core/screens.js +0 -4152
- package/dist/modules/hospitality_core/screens.js.map +0 -1
- package/dist/modules/hr_backend/screens.d.ts +0 -9
- package/dist/modules/hr_backend/screens.d.ts.map +0 -1
- package/dist/modules/hr_backend/screens.js +0 -144
- package/dist/modules/hr_backend/screens.js.map +0 -1
- package/dist/modules/loyalty_backend/screens.d.ts +0 -33
- package/dist/modules/loyalty_backend/screens.d.ts.map +0 -1
- package/dist/modules/loyalty_backend/screens.js +0 -562
- package/dist/modules/loyalty_backend/screens.js.map +0 -1
- package/dist/modules/mail_backend/screens.d.ts +0 -5
- package/dist/modules/mail_backend/screens.d.ts.map +0 -1
- package/dist/modules/mail_backend/screens.js +0 -11
- package/dist/modules/mail_backend/screens.js.map +0 -1
- package/dist/modules/mail_inbound_backend/screens.d.ts +0 -5
- package/dist/modules/mail_inbound_backend/screens.d.ts.map +0 -1
- package/dist/modules/mail_inbound_backend/screens.js +0 -25
- package/dist/modules/mail_inbound_backend/screens.js.map +0 -1
- package/dist/modules/mail_transport_backend/screens.d.ts +0 -5
- package/dist/modules/mail_transport_backend/screens.d.ts.map +0 -1
- package/dist/modules/mail_transport_backend/screens.js +0 -35
- package/dist/modules/mail_transport_backend/screens.js.map +0 -1
- package/dist/modules/oauth_backend/screens.d.ts +0 -66
- package/dist/modules/oauth_backend/screens.d.ts.map +0 -1
- package/dist/modules/oauth_backend/screens.js +0 -323
- package/dist/modules/oauth_backend/screens.js.map +0 -1
- package/dist/modules/odoo_collaboration_import/functions.d.ts.map +0 -1
- package/dist/modules/odoo_collaboration_import/functions.js +0 -128
- package/dist/modules/odoo_collaboration_import/functions.js.map +0 -1
- package/dist/modules/odoo_collaboration_import/index.d.ts +0 -6
- package/dist/modules/odoo_collaboration_import/index.d.ts.map +0 -1
- package/dist/modules/odoo_collaboration_import/index.js +0 -31
- package/dist/modules/odoo_collaboration_import/index.js.map +0 -1
- package/dist/modules/odoo_collaboration_import/models.d.ts.map +0 -1
- package/dist/modules/odoo_collaboration_import/models.js +0 -76
- package/dist/modules/odoo_collaboration_import/models.js.map +0 -1
- package/dist/modules/odoo_collaboration_import/operations.d.ts +0 -14
- package/dist/modules/odoo_collaboration_import/operations.d.ts.map +0 -1
- package/dist/modules/odoo_collaboration_import/operations.js +0 -1139
- package/dist/modules/odoo_collaboration_import/operations.js.map +0 -1
- package/dist/modules/odoo_collaboration_import/relations.d.ts.map +0 -1
- package/dist/modules/odoo_collaboration_import/relations.js +0 -19
- package/dist/modules/odoo_collaboration_import/relations.js.map +0 -1
- package/dist/modules/odoo_collaboration_import/types.d.ts +0 -58
- package/dist/modules/odoo_collaboration_import/types.d.ts.map +0 -1
- package/dist/modules/odoo_collaboration_import/types.js.map +0 -1
- package/dist/modules/partner_backend/screens.d.ts +0 -53
- package/dist/modules/partner_backend/screens.d.ts.map +0 -1
- package/dist/modules/partner_backend/screens.js +0 -169
- package/dist/modules/partner_backend/screens.js.map +0 -1
- package/dist/modules/pricing_backend/screens.d.ts +0 -13
- package/dist/modules/pricing_backend/screens.d.ts.map +0 -1
- package/dist/modules/pricing_backend/screens.js +0 -182
- package/dist/modules/pricing_backend/screens.js.map +0 -1
- package/dist/modules/product_backend/attributes-screen.d.ts +0 -7
- package/dist/modules/product_backend/attributes-screen.d.ts.map +0 -1
- package/dist/modules/product_backend/attributes-screen.js +0 -76
- package/dist/modules/product_backend/attributes-screen.js.map +0 -1
- package/dist/modules/product_backend/create-screen.d.ts +0 -12
- package/dist/modules/product_backend/create-screen.d.ts.map +0 -1
- package/dist/modules/product_backend/create-screen.js +0 -83
- package/dist/modules/product_backend/create-screen.js.map +0 -1
- package/dist/modules/product_backend/screens.d.ts +0 -68
- package/dist/modules/product_backend/screens.d.ts.map +0 -1
- package/dist/modules/product_backend/screens.js +0 -388
- package/dist/modules/product_backend/screens.js.map +0 -1
- package/dist/modules/purchase_backend/screens.d.ts +0 -29
- package/dist/modules/purchase_backend/screens.d.ts.map +0 -1
- package/dist/modules/purchase_backend/screens.js +0 -324
- package/dist/modules/purchase_backend/screens.js.map +0 -1
- package/dist/modules/sale_backend/invoicing-policies-screen.d.ts +0 -14
- package/dist/modules/sale_backend/invoicing-policies-screen.d.ts.map +0 -1
- package/dist/modules/sale_backend/invoicing-policies-screen.js +0 -36
- package/dist/modules/sale_backend/invoicing-policies-screen.js.map +0 -1
- package/dist/modules/sale_backend/order-detail-screen.d.ts +0 -18
- package/dist/modules/sale_backend/order-detail-screen.d.ts.map +0 -1
- package/dist/modules/sale_backend/order-detail-screen.js +0 -217
- package/dist/modules/sale_backend/order-detail-screen.js.map +0 -1
- package/dist/modules/sale_backend/quotations-screen.d.ts +0 -15
- package/dist/modules/sale_backend/quotations-screen.d.ts.map +0 -1
- package/dist/modules/sale_backend/quotations-screen.js +0 -64
- package/dist/modules/sale_backend/quotations-screen.js.map +0 -1
- package/dist/modules/sale_backend/sales-orders-screen.d.ts +0 -12
- package/dist/modules/sale_backend/sales-orders-screen.d.ts.map +0 -1
- package/dist/modules/sale_backend/sales-orders-screen.js +0 -65
- package/dist/modules/sale_backend/sales-orders-screen.js.map +0 -1
- package/dist/modules/sale_backend/screens.d.ts +0 -23
- package/dist/modules/sale_backend/screens.d.ts.map +0 -1
- package/dist/modules/sale_backend/screens.js +0 -275
- package/dist/modules/sale_backend/screens.js.map +0 -1
- package/dist/modules/stock_backend/forecast-screen.d.ts +0 -28
- package/dist/modules/stock_backend/forecast-screen.d.ts.map +0 -1
- package/dist/modules/stock_backend/forecast-screen.js +0 -108
- package/dist/modules/stock_backend/forecast-screen.js.map +0 -1
- package/dist/modules/stock_backend/inventory-screen.d.ts +0 -27
- package/dist/modules/stock_backend/inventory-screen.d.ts.map +0 -1
- package/dist/modules/stock_backend/inventory-screen.js +0 -141
- package/dist/modules/stock_backend/inventory-screen.js.map +0 -1
- package/dist/modules/stock_backend/locations-screen.d.ts +0 -18
- package/dist/modules/stock_backend/locations-screen.d.ts.map +0 -1
- package/dist/modules/stock_backend/locations-screen.js +0 -92
- package/dist/modules/stock_backend/locations-screen.js.map +0 -1
- package/dist/modules/stock_backend/lot-screen.d.ts +0 -30
- package/dist/modules/stock_backend/lot-screen.d.ts.map +0 -1
- package/dist/modules/stock_backend/lot-screen.js +0 -86
- package/dist/modules/stock_backend/lot-screen.js.map +0 -1
- package/dist/modules/stock_backend/lots-screen.d.ts +0 -21
- package/dist/modules/stock_backend/lots-screen.d.ts.map +0 -1
- package/dist/modules/stock_backend/lots-screen.js +0 -79
- package/dist/modules/stock_backend/lots-screen.js.map +0 -1
- package/dist/modules/stock_backend/picking-types-screen.d.ts +0 -21
- package/dist/modules/stock_backend/picking-types-screen.d.ts.map +0 -1
- package/dist/modules/stock_backend/picking-types-screen.js +0 -110
- package/dist/modules/stock_backend/picking-types-screen.js.map +0 -1
- package/dist/modules/stock_backend/replenishment-screen.d.ts +0 -29
- package/dist/modules/stock_backend/replenishment-screen.d.ts.map +0 -1
- package/dist/modules/stock_backend/replenishment-screen.js +0 -131
- package/dist/modules/stock_backend/replenishment-screen.js.map +0 -1
- package/dist/modules/stock_backend/screens.d.ts +0 -14
- package/dist/modules/stock_backend/screens.d.ts.map +0 -1
- package/dist/modules/stock_backend/screens.js +0 -40
- package/dist/modules/stock_backend/screens.js.map +0 -1
- package/dist/modules/stock_backend/stock-route-screen.d.ts +0 -30
- package/dist/modules/stock_backend/stock-route-screen.d.ts.map +0 -1
- package/dist/modules/stock_backend/stock-route-screen.js +0 -129
- package/dist/modules/stock_backend/stock-route-screen.js.map +0 -1
- package/dist/modules/stock_backend/stock-routes-screen.d.ts +0 -17
- package/dist/modules/stock_backend/stock-routes-screen.d.ts.map +0 -1
- package/dist/modules/stock_backend/stock-routes-screen.js +0 -60
- package/dist/modules/stock_backend/stock-routes-screen.js.map +0 -1
- package/dist/modules/stock_backend/transfer-screen.d.ts +0 -26
- package/dist/modules/stock_backend/transfer-screen.d.ts.map +0 -1
- package/dist/modules/stock_backend/transfer-screen.js +0 -95
- package/dist/modules/stock_backend/transfer-screen.js.map +0 -1
- package/dist/modules/stock_backend/transfers-screen.d.ts +0 -21
- package/dist/modules/stock_backend/transfers-screen.d.ts.map +0 -1
- package/dist/modules/stock_backend/transfers-screen.js +0 -88
- package/dist/modules/stock_backend/transfers-screen.js.map +0 -1
- package/dist/modules/stock_backend/warehouses-screen.d.ts +0 -17
- package/dist/modules/stock_backend/warehouses-screen.d.ts.map +0 -1
- package/dist/modules/stock_backend/warehouses-screen.js +0 -96
- package/dist/modules/stock_backend/warehouses-screen.js.map +0 -1
- package/dist/modules/user_backend/screens.d.ts +0 -70
- package/dist/modules/user_backend/screens.d.ts.map +0 -1
- package/dist/modules/user_backend/screens.js +0 -308
- package/dist/modules/user_backend/screens.js.map +0 -1
- package/dist/modules/website/customer-routes.d.ts +0 -3
- package/dist/modules/website/customer-routes.d.ts.map +0 -1
- package/dist/modules/website/customer-routes.js +0 -322
- package/dist/modules/website/customer-routes.js.map +0 -1
- package/dist/modules/website_backend/screens.d.ts +0 -114
- package/dist/modules/website_backend/screens.d.ts.map +0 -1
- package/dist/modules/website_backend/screens.js +0 -625
- package/dist/modules/website_backend/screens.js.map +0 -1
- package/dist/ui/client/mail.d.mts +0 -11
- package/dist/ui/client/mail.d.mts.map +0 -1
- package/dist/ui/client/mail.mjs +0 -10
- package/dist/ui/client/mail.mjs.map +0 -1
- /package/dist/modules/{odoo_collaboration_import → account_staff_channel}/functions.d.ts +0 -0
- /package/dist/modules/{odoo_collaboration_import → account_staff_channel}/models.d.ts +0 -0
- /package/dist/modules/{odoo_collaboration_import → address_backend/screens}/types.js +0 -0
- /package/dist/modules/{odoo_collaboration_import → manufacturing}/relations.d.ts +0 -0
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { createHash } from 'node:crypto';
|
|
2
|
+
import { defineFn, deleteFrom, desc, eq, from, inArray } from '@ketvietlab/ketjs';
|
|
2
3
|
import { compareQty } from '../uom/convert.js';
|
|
3
4
|
import { pushFromCompletedMove } from './routing.js';
|
|
5
|
+
import { company, ours } from './scope.js';
|
|
6
|
+
import { toProductUnit } from './units.js';
|
|
4
7
|
export const RECEPTION_STEPS = ['one_step', 'two_steps', 'three_steps'];
|
|
5
8
|
export const DELIVERY_STEPS = ['ship_only', 'pick_ship', 'pick_pack_ship'];
|
|
6
9
|
export const PICKING_TYPE_CODES = ['incoming', 'outgoing', 'internal'];
|
|
@@ -25,10 +28,23 @@ export const MOVE_STATES = [
|
|
|
25
28
|
export const PICKING_STATES = ['draft', 'waiting', 'confirmed', 'assigned', 'done', 'cancel'];
|
|
26
29
|
export const TRACKING = ['none', 'lot', 'serial'];
|
|
27
30
|
const invalid = (field, message) => ({ ok: false, errors: [{ field, message }] });
|
|
28
|
-
const
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
31
|
+
const n = (value) => Number(value ?? 0);
|
|
32
|
+
const companyKey = (ctx, ...parts) => [company(ctx), ...parts.map(String)].join(':');
|
|
33
|
+
class InventoryRefused extends Error {
|
|
34
|
+
result;
|
|
35
|
+
constructor(result) {
|
|
36
|
+
super('inventory operation refused');
|
|
37
|
+
this.result = result;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
class PickingConflict extends Error {
|
|
41
|
+
}
|
|
42
|
+
const claimInventoryRevision = async (ctx, template, expected) => {
|
|
43
|
+
const revision = n(template.inventoryRevision);
|
|
44
|
+
if (revision !== n(expected))
|
|
45
|
+
return false;
|
|
46
|
+
const changed = await ctx.db.compareAndSet('product.Template', { id: template.id }, { inventoryRevision: template.inventoryRevision ?? null }, { inventoryRevision: revision + 1 });
|
|
47
|
+
return 'dryRun' in changed || changed.matched;
|
|
32
48
|
};
|
|
33
49
|
const lotKey = (lotId) => (lotId == null ? '' : String(lotId));
|
|
34
50
|
const quantId = (ctx, productId, locationId, lotId) => `${company(ctx)}:${String(productId)}:${String(locationId)}:${lotKey(lotId) || '_'}`;
|
|
@@ -48,9 +64,11 @@ async function isStorable(ctx, productId) {
|
|
|
48
64
|
async function mutateQuant(ctx, args) {
|
|
49
65
|
const id = quantId(ctx, args.productId, args.locationId, args.lotId);
|
|
50
66
|
for (let attempt = 0; attempt < 8; attempt++) {
|
|
51
|
-
const current = (await ctx
|
|
67
|
+
const current = (await ours(ctx, 'stock.Quant', { id }))[0];
|
|
68
|
+
if (args.expectedVersion !== undefined && n(current?.version ?? -1) !== args.expectedVersion)
|
|
69
|
+
throw new InventoryRefused(invalid('stockRevision', 'stock position changed'));
|
|
52
70
|
if (!current) {
|
|
53
|
-
//
|
|
71
|
+
// the domain contract keeps the other side of completed moves on supplier, customer and
|
|
54
72
|
// inventory locations as well. Those virtual locations legitimately carry
|
|
55
73
|
// negative quantities; only a positive physical balance can be reserved.
|
|
56
74
|
if (args.reserved < 0 || args.reserved > Math.max(args.quantity, 0))
|
|
@@ -81,7 +99,7 @@ async function mutateQuant(ctx, args) {
|
|
|
81
99
|
version: 0,
|
|
82
100
|
};
|
|
83
101
|
if (inserted.inserted)
|
|
84
|
-
return (await ctx
|
|
102
|
+
return (await ours(ctx, 'stock.Quant', { id }))[0];
|
|
85
103
|
continue;
|
|
86
104
|
}
|
|
87
105
|
const quantity = Number(current.quantity) + args.quantity;
|
|
@@ -99,23 +117,49 @@ async function mutateQuant(ctx, args) {
|
|
|
99
117
|
});
|
|
100
118
|
if ('dryRun' in changed || changed.matched)
|
|
101
119
|
return { ...current, quantity, reservedQuantity, version: Number(current.version) + 1 };
|
|
120
|
+
if (args.expectedVersion !== undefined)
|
|
121
|
+
throw new InventoryRefused(invalid('stockRevision', 'stock position changed'));
|
|
102
122
|
}
|
|
103
123
|
throw new Error(`concurrent quant update did not settle for ${id}`);
|
|
104
124
|
}
|
|
105
125
|
/** How much of a quant is already spoken for; 0 when the quant does not exist. */
|
|
106
126
|
async function reservedOn(ctx, productId, locationId, lotId) {
|
|
107
127
|
const id = quantId(ctx, productId, locationId, lotId);
|
|
108
|
-
const quant = (await ctx
|
|
128
|
+
const quant = (await ours(ctx, 'stock.Quant', { id }))[0];
|
|
109
129
|
return quant ? Number(quant.reservedQuantity) : 0;
|
|
110
130
|
}
|
|
131
|
+
/**
|
|
132
|
+
* The locations a move may draw from: the one it names, and everything beneath it.
|
|
133
|
+
*
|
|
134
|
+
* `forecast` already rolls a location up through `parentPath` — the replenishment
|
|
135
|
+
* screen asks it for an orderpoint's location, which is a parent with the real
|
|
136
|
+
* shelves under it. Reserving only from the named location meant that stock was
|
|
137
|
+
* reported as available and then refused, leaving the move `confirmed` with no
|
|
138
|
+
* reason given. The named location comes first so a move still empties the shelf
|
|
139
|
+
* it was written against before reaching into the children.
|
|
140
|
+
*/
|
|
141
|
+
async function sourcesUnder(ctx, locationId) {
|
|
142
|
+
const locations = await ours(ctx, 'stock.Location');
|
|
143
|
+
const anchor = locations.find((location) => String(location.id) === String(locationId));
|
|
144
|
+
if (!anchor)
|
|
145
|
+
return [String(locationId)];
|
|
146
|
+
const path = String(anchor.parentPath);
|
|
147
|
+
return [
|
|
148
|
+
String(anchor.id),
|
|
149
|
+
...locations
|
|
150
|
+
.filter((location) => String(location.id) !== String(anchor.id) && String(location.parentPath).startsWith(path))
|
|
151
|
+
.sort((a, b) => String(a.parentPath).localeCompare(String(b.parentPath)))
|
|
152
|
+
.map((location) => String(location.id)),
|
|
153
|
+
];
|
|
154
|
+
}
|
|
111
155
|
async function updatePickingState(ctx, pickingId) {
|
|
112
|
-
const picking = (await ctx
|
|
156
|
+
const picking = (await ours(ctx, 'stock.Picking', { id: pickingId }))[0];
|
|
113
157
|
// draft belongs to confirmPicking and cancel is terminal. Deriving a state from the
|
|
114
158
|
// moves and writing it unconditionally let a reservation confirm a draft transfer
|
|
115
159
|
// and resurrect a cancelled one.
|
|
116
160
|
if (!picking || picking.state === 'draft' || picking.state === 'cancel')
|
|
117
161
|
return;
|
|
118
|
-
const moves = await ctx
|
|
162
|
+
const moves = await ours(ctx, 'stock.Move', { pickingId });
|
|
119
163
|
const live = moves.filter((move) => move.state !== 'cancel');
|
|
120
164
|
let state = 'confirmed';
|
|
121
165
|
if (moves.length && !live.length)
|
|
@@ -128,6 +172,234 @@ async function updatePickingState(ctx, pickingId) {
|
|
|
128
172
|
state = 'waiting';
|
|
129
173
|
await ctx.db.update('stock.Picking', { id: pickingId }, { state });
|
|
130
174
|
}
|
|
175
|
+
const stockRevision = (rows) => createHash('sha256')
|
|
176
|
+
.update(JSON.stringify(rows
|
|
177
|
+
.map((row) => ({
|
|
178
|
+
id: String(row.id),
|
|
179
|
+
quantity: String(row.quantity),
|
|
180
|
+
reservedQuantity: String(row.reservedQuantity),
|
|
181
|
+
version: n(row.version),
|
|
182
|
+
}))
|
|
183
|
+
.sort((left, right) => left.id.localeCompare(right.id))))
|
|
184
|
+
.digest('hex');
|
|
185
|
+
const availabilityAt = async (ctx, args) => {
|
|
186
|
+
const tracking = await trackingOf(ctx, args.productId);
|
|
187
|
+
const pickingType = (await ours(ctx, 'stock.PickingType', {
|
|
188
|
+
id: `${String(args.warehouseId)}:outgoing`,
|
|
189
|
+
}))[0];
|
|
190
|
+
if (!pickingType?.defaultLocationSrcId)
|
|
191
|
+
return { tracking, sourceLocationId: null, lots: [] };
|
|
192
|
+
const sources = new Set(await sourcesUnder(ctx, pickingType.defaultLocationSrcId));
|
|
193
|
+
const quants = (await ours(ctx, 'stock.Quant', { productId: args.productId })).filter((quant) => sources.has(String(quant.locationId)));
|
|
194
|
+
const lots = await ours(ctx, 'stock.Lot', { productId: args.productId });
|
|
195
|
+
const at = new Date(String(args.at ?? new Date().toISOString())).getTime();
|
|
196
|
+
return {
|
|
197
|
+
tracking,
|
|
198
|
+
sourceLocationId: String(pickingType.defaultLocationSrcId),
|
|
199
|
+
lots: lots
|
|
200
|
+
.map((lot) => {
|
|
201
|
+
const positions = quants.filter((quant) => String(quant.lotId ?? '') === String(lot.id));
|
|
202
|
+
const available = positions.reduce((sum, quant) => sum + Math.max(0, n(quant.quantity) - n(quant.reservedQuantity)), 0);
|
|
203
|
+
const expiration = lot.expirationDate == null ? null : String(lot.expirationDate);
|
|
204
|
+
const expired = expiration !== null && Number.isFinite(at) && new Date(expiration).getTime() <= at;
|
|
205
|
+
const serialConflict = tracking === 'serial' && positions.reduce((sum, quant) => sum + n(quant.quantity), 0) > 1;
|
|
206
|
+
return {
|
|
207
|
+
lotId: String(lot.id),
|
|
208
|
+
name: String(lot.name),
|
|
209
|
+
expirationDate: expiration,
|
|
210
|
+
availableQuantity: String(expired || serialConflict || lot.active === false ? 0 : available),
|
|
211
|
+
stockRevision: stockRevision(positions),
|
|
212
|
+
selectable: lot.active !== false && !expired && !serialConflict && available > 0,
|
|
213
|
+
};
|
|
214
|
+
})
|
|
215
|
+
.sort((left, right) => left.name.localeCompare(right.name) || left.lotId.localeCompare(right.lotId)),
|
|
216
|
+
};
|
|
217
|
+
};
|
|
218
|
+
const parsedSelections = (value) => {
|
|
219
|
+
if (!Array.isArray(value))
|
|
220
|
+
return null;
|
|
221
|
+
const selections = value.map((entry) => {
|
|
222
|
+
const row = entry;
|
|
223
|
+
return {
|
|
224
|
+
lotId: String(row.lotId ?? ''),
|
|
225
|
+
quantity: n(row.quantity),
|
|
226
|
+
stockRevision: String(row.stockRevision ?? ''),
|
|
227
|
+
};
|
|
228
|
+
});
|
|
229
|
+
return selections.every((selection) => selection.lotId && selection.quantity > 0 && selection.stockRevision)
|
|
230
|
+
? selections
|
|
231
|
+
: null;
|
|
232
|
+
};
|
|
233
|
+
const reserveMoveInContext = async (ctx, move, requestedSelections) => {
|
|
234
|
+
if (!(await isStorable(ctx, move.productId)))
|
|
235
|
+
return invalid('productId', 'chỉ sản phẩm lưu kho mới được reserve');
|
|
236
|
+
if (['done', 'cancel'].includes(String(move.state)))
|
|
237
|
+
return invalid('state', 'move đã kết thúc');
|
|
238
|
+
if (move.state === 'draft')
|
|
239
|
+
return invalid('state', 'xác nhận transfer trước khi reserve');
|
|
240
|
+
const demand = Number(move.productUomQty);
|
|
241
|
+
const existingLines = await ours(ctx, 'stock.MoveLine', { moveId: move.id });
|
|
242
|
+
let reserved = existingLines.reduce((sum, line) => sum + Number(line.quantity), 0);
|
|
243
|
+
let state = 'confirmed';
|
|
244
|
+
const tracking = await trackingOf(ctx, move.productId);
|
|
245
|
+
const sources = await sourcesUnder(ctx, move.locationId);
|
|
246
|
+
const sourceOrder = new Map(sources.map((id, index) => [id, index]));
|
|
247
|
+
const quants = (await ours(ctx, 'stock.Quant', { productId: move.productId }))
|
|
248
|
+
.filter((quant) => sourceOrder.has(String(quant.locationId)))
|
|
249
|
+
.sort((left, right) => sourceOrder.get(String(left.locationId)) - sourceOrder.get(String(right.locationId)) ||
|
|
250
|
+
String(left.lotKey).localeCompare(String(right.lotKey)));
|
|
251
|
+
const selections = requestedSelections === undefined ? undefined : parsedSelections(requestedSelections);
|
|
252
|
+
if (requestedSelections !== undefined && !selections)
|
|
253
|
+
return invalid('selections', 'lot/serial selection is malformed');
|
|
254
|
+
if (selections) {
|
|
255
|
+
if (tracking === 'none')
|
|
256
|
+
return invalid('selections', 'untracked product must not select a lot');
|
|
257
|
+
if (move.pickingId) {
|
|
258
|
+
const picking = (await ours(ctx, 'stock.Picking', { id: move.pickingId }))[0];
|
|
259
|
+
const pickingType = picking
|
|
260
|
+
? (await ours(ctx, 'stock.PickingType', { id: picking.pickingTypeId }))[0]
|
|
261
|
+
: null;
|
|
262
|
+
// trackedAvailability hashes quants below the outgoing type's default source.
|
|
263
|
+
// A selected move must reserve below that exact same root; otherwise every
|
|
264
|
+
// refreshed revision would be computed from a permanently different set.
|
|
265
|
+
if (!pickingType?.defaultLocationSrcId ||
|
|
266
|
+
String(pickingType.defaultLocationSrcId) !== String(move.locationId))
|
|
267
|
+
return invalid('locationId', 'tracked selection source does not match its picking type');
|
|
268
|
+
}
|
|
269
|
+
if (new Set(selections.map((selection) => selection.lotId)).size !== selections.length)
|
|
270
|
+
return invalid('selections', 'a lot/serial can only be selected once per line');
|
|
271
|
+
if (tracking === 'serial' &&
|
|
272
|
+
selections.some((selection) => compareQty(selection.quantity, 1, 0.000001) !== 0))
|
|
273
|
+
return invalid('selections', 'every selected serial must have quantity 1');
|
|
274
|
+
if (compareQty(selections.reduce((sum, selection) => sum + selection.quantity, 0), demand, 0.000001) !== 0)
|
|
275
|
+
return invalid('selections', 'selected lot/serial quantity must equal line quantity');
|
|
276
|
+
if (existingLines.length) {
|
|
277
|
+
const held = new Map();
|
|
278
|
+
for (const line of existingLines)
|
|
279
|
+
held.set(String(line.lotId ?? ''), (held.get(String(line.lotId ?? '')) ?? 0) + n(line.quantity));
|
|
280
|
+
const same = compareQty(reserved, demand, 0.000001) === 0 &&
|
|
281
|
+
selections.every((selection) => compareQty(held.get(selection.lotId) ?? 0, selection.quantity, 0.000001) === 0);
|
|
282
|
+
if (!same)
|
|
283
|
+
return invalid('selections', 'move already holds a different lot/serial selection');
|
|
284
|
+
// This is a completed idempotent replay, not a new stock claim. The original
|
|
285
|
+
// revisions were consumed when these move lines reserved the quants, so a
|
|
286
|
+
// later retry intentionally compares the immutable selection instead.
|
|
287
|
+
await ctx.db.update('stock.Move', { id: move.id }, { state: 'assigned', quantity: String(reserved) });
|
|
288
|
+
if (move.pickingId)
|
|
289
|
+
await updatePickingState(ctx, move.pickingId);
|
|
290
|
+
return { ok: true, reserved: String(reserved), state: 'assigned' };
|
|
291
|
+
}
|
|
292
|
+
for (const selection of selections) {
|
|
293
|
+
const positions = quants.filter((quant) => String(quant.lotId ?? '') === selection.lotId);
|
|
294
|
+
if (stockRevision(positions) !== selection.stockRevision)
|
|
295
|
+
return invalid('stockRevision', 'stock position changed; reload lot availability');
|
|
296
|
+
const lot = (await ours(ctx, 'stock.Lot', { id: selection.lotId }))[0];
|
|
297
|
+
if (!lot || lot.productId !== move.productId || lot.active === false)
|
|
298
|
+
return invalid('lotId', 'lot/serial is not available for this product');
|
|
299
|
+
if (lot.expirationDate && new Date(String(lot.expirationDate)).getTime() <= Date.now())
|
|
300
|
+
return invalid('lotId', 'expired lot/serial cannot be sold');
|
|
301
|
+
if (tracking === 'serial' && positions.reduce((sum, quant) => sum + n(quant.quantity), 0) > 1)
|
|
302
|
+
return invalid('lotId', 'duplicate serial stock must be reconciled before sale');
|
|
303
|
+
let remaining = selection.quantity;
|
|
304
|
+
for (const quant of positions) {
|
|
305
|
+
if (remaining <= 0.000001)
|
|
306
|
+
break;
|
|
307
|
+
const available = n(quant.quantity) - n(quant.reservedQuantity);
|
|
308
|
+
if (available <= 0)
|
|
309
|
+
continue;
|
|
310
|
+
const take = Math.min(available, remaining);
|
|
311
|
+
await mutateQuant(ctx, {
|
|
312
|
+
productId: move.productId,
|
|
313
|
+
locationId: quant.locationId,
|
|
314
|
+
lotId: quant.lotId,
|
|
315
|
+
quantity: 0,
|
|
316
|
+
reserved: take,
|
|
317
|
+
expectedVersion: n(quant.version),
|
|
318
|
+
});
|
|
319
|
+
await ctx.db.insert('stock.MoveLine', {
|
|
320
|
+
id: `${String(move.id)}:reserve:${String(quant.id)}`,
|
|
321
|
+
moveId: move.id,
|
|
322
|
+
pickingId: move.pickingId,
|
|
323
|
+
productId: move.productId,
|
|
324
|
+
productUomId: move.productUomId,
|
|
325
|
+
quantity: String(take),
|
|
326
|
+
quantityProductUom: String(take),
|
|
327
|
+
locationId: quant.locationId,
|
|
328
|
+
locationDestId: move.locationDestId,
|
|
329
|
+
lotId: quant.lotId,
|
|
330
|
+
picked: false,
|
|
331
|
+
});
|
|
332
|
+
remaining -= take;
|
|
333
|
+
reserved += take;
|
|
334
|
+
}
|
|
335
|
+
if (remaining > 0.000001)
|
|
336
|
+
return invalid('stock', `insufficient stock for lot/serial ${selection.lotId}`);
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
else {
|
|
340
|
+
for (const quant of quants) {
|
|
341
|
+
if (reserved >= demand)
|
|
342
|
+
break;
|
|
343
|
+
if (tracking !== 'none' && !quant.lotId)
|
|
344
|
+
continue;
|
|
345
|
+
const available = Number(quant.quantity) - Number(quant.reservedQuantity);
|
|
346
|
+
if (available <= 0)
|
|
347
|
+
continue;
|
|
348
|
+
const take = Math.min(available, demand - reserved, tracking === 'serial' ? 1 : Number.POSITIVE_INFINITY);
|
|
349
|
+
await mutateQuant(ctx, {
|
|
350
|
+
productId: move.productId,
|
|
351
|
+
locationId: quant.locationId,
|
|
352
|
+
lotId: quant.lotId,
|
|
353
|
+
quantity: 0,
|
|
354
|
+
reserved: take,
|
|
355
|
+
});
|
|
356
|
+
const lineId = `${String(move.id)}:reserve:${String(quant.id)}`;
|
|
357
|
+
const line = (await ours(ctx, 'stock.MoveLine', { id: lineId }))[0];
|
|
358
|
+
if (line)
|
|
359
|
+
await ctx.db.update('stock.MoveLine', { id: lineId }, { quantity: String(Number(line.quantity) + take) });
|
|
360
|
+
else
|
|
361
|
+
await ctx.db.insert('stock.MoveLine', {
|
|
362
|
+
id: lineId,
|
|
363
|
+
moveId: move.id,
|
|
364
|
+
pickingId: move.pickingId,
|
|
365
|
+
productId: move.productId,
|
|
366
|
+
productUomId: move.productUomId,
|
|
367
|
+
quantity: String(take),
|
|
368
|
+
quantityProductUom: String(take),
|
|
369
|
+
locationId: quant.locationId,
|
|
370
|
+
locationDestId: move.locationDestId,
|
|
371
|
+
lotId: quant.lotId,
|
|
372
|
+
picked: false,
|
|
373
|
+
});
|
|
374
|
+
reserved += take;
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
state =
|
|
378
|
+
compareQty(reserved, demand, 0.000001) >= 0
|
|
379
|
+
? 'assigned'
|
|
380
|
+
: reserved > 0
|
|
381
|
+
? 'partially_available'
|
|
382
|
+
: 'confirmed';
|
|
383
|
+
await ctx.db.update('stock.Move', { id: move.id }, { state, quantity: String(reserved) });
|
|
384
|
+
if (move.pickingId)
|
|
385
|
+
await updatePickingState(ctx, move.pickingId);
|
|
386
|
+
return { ok: true, reserved: String(reserved), state };
|
|
387
|
+
};
|
|
388
|
+
const reserveEffects = [
|
|
389
|
+
'read:stock.Move',
|
|
390
|
+
'write:stock.Move',
|
|
391
|
+
'read:stock.Picking',
|
|
392
|
+
'write:stock.Picking',
|
|
393
|
+
'read:stock.PickingType',
|
|
394
|
+
'read:stock.MoveLine',
|
|
395
|
+
'write:stock.MoveLine',
|
|
396
|
+
'read:stock.Quant',
|
|
397
|
+
'write:stock.Quant',
|
|
398
|
+
'read:stock.Location',
|
|
399
|
+
'read:stock.Lot',
|
|
400
|
+
'read:product.Product',
|
|
401
|
+
'read:product.Template',
|
|
402
|
+
];
|
|
131
403
|
export const functions = {
|
|
132
404
|
listStorableProducts: defineFn({
|
|
133
405
|
input: {},
|
|
@@ -153,10 +425,32 @@ export const functions = {
|
|
|
153
425
|
templateId: args.templateId,
|
|
154
426
|
isStorable: Boolean(template.isStorable),
|
|
155
427
|
tracking: String(template.tracking ?? 'none'),
|
|
428
|
+
inventoryRevision: n(template.inventoryRevision),
|
|
156
429
|
}
|
|
157
430
|
: null;
|
|
158
431
|
},
|
|
159
432
|
}),
|
|
433
|
+
/** Batch companion to getProductConfig for bounded catalogue projections. */
|
|
434
|
+
listProductConfigs: defineFn({
|
|
435
|
+
input: { templateIds: 'json' },
|
|
436
|
+
effects: ['read:product.Template'],
|
|
437
|
+
agent: true,
|
|
438
|
+
handler: async (ctx, args) => {
|
|
439
|
+
const ids = [...new Set(Array.isArray(args.templateIds) ? args.templateIds.map(String) : [])];
|
|
440
|
+
if (!ids.length)
|
|
441
|
+
return [];
|
|
442
|
+
// Reading every template in the tenant to answer for twenty of them is the
|
|
443
|
+
// shape a batch companion exists to avoid; getProductConfig above filters
|
|
444
|
+
// in the query and so does this.
|
|
445
|
+
const T = ctx.table('product.Template');
|
|
446
|
+
return (await ctx.db.all(from(T).where(inArray(T.id, ids)))).map((template) => ({
|
|
447
|
+
templateId: String(template.id),
|
|
448
|
+
isStorable: Boolean(template.isStorable),
|
|
449
|
+
tracking: String(template.tracking ?? 'none'),
|
|
450
|
+
inventoryRevision: n(template.inventoryRevision),
|
|
451
|
+
}));
|
|
452
|
+
},
|
|
453
|
+
}),
|
|
160
454
|
configureProduct: defineFn({
|
|
161
455
|
input: { templateId: 'id', isStorable: 'bool', tracking: 'text?' },
|
|
162
456
|
output: { ok: 'bool', id: 'id?', errors: 'json?' },
|
|
@@ -176,32 +470,305 @@ export const functions = {
|
|
|
176
470
|
return { ok: true, id: args.templateId };
|
|
177
471
|
},
|
|
178
472
|
}),
|
|
473
|
+
saveInventoryProduct: defineFn({
|
|
474
|
+
input: {
|
|
475
|
+
id: 'id',
|
|
476
|
+
templateId: 'id',
|
|
477
|
+
create: 'bool?',
|
|
478
|
+
expectedRevision: 'int?',
|
|
479
|
+
name: 'text',
|
|
480
|
+
kind: 'text',
|
|
481
|
+
uomId: 'id',
|
|
482
|
+
categoryId: 'id?',
|
|
483
|
+
salePrice: 'decimal',
|
|
484
|
+
cost: 'decimal',
|
|
485
|
+
saleOk: 'bool',
|
|
486
|
+
purchaseOk: 'bool',
|
|
487
|
+
pointOfSale: 'bool',
|
|
488
|
+
tracking: 'text',
|
|
489
|
+
sku: 'text?',
|
|
490
|
+
barcode: 'text?',
|
|
491
|
+
},
|
|
492
|
+
output: { ok: 'bool', id: 'id?', templateId: 'id?', revision: 'int?', errors: 'json?' },
|
|
493
|
+
effects: [
|
|
494
|
+
'read:product.Template',
|
|
495
|
+
'write:product.Template',
|
|
496
|
+
'read:product.Product',
|
|
497
|
+
'write:product.Product',
|
|
498
|
+
'read:product.Cost',
|
|
499
|
+
'write:product.Cost',
|
|
500
|
+
'read:product.Category',
|
|
501
|
+
'read:uom.Unit',
|
|
502
|
+
'write:uom.Unit',
|
|
503
|
+
],
|
|
504
|
+
idempotent: true,
|
|
505
|
+
agent: true,
|
|
506
|
+
handler: async (ctx, args) => {
|
|
507
|
+
const name = String(args.name ?? '').trim();
|
|
508
|
+
const sku = args.sku == null || String(args.sku).trim() === '' ? null : String(args.sku).trim();
|
|
509
|
+
const barcode = args.barcode == null || String(args.barcode).trim() === '' ? null : String(args.barcode).trim();
|
|
510
|
+
const kind = String(args.kind);
|
|
511
|
+
const tracking = String(args.tracking);
|
|
512
|
+
if (!name || name.length > 200)
|
|
513
|
+
return invalid('name', 'name needs 1 to 200 characters');
|
|
514
|
+
if (sku && sku.length > 100)
|
|
515
|
+
return invalid('sku', 'SKU cannot exceed 100 characters');
|
|
516
|
+
if (barcode && barcode.length > 100)
|
|
517
|
+
return invalid('barcode', 'barcode cannot exceed 100 characters');
|
|
518
|
+
if (!['storable', 'consumable'].includes(kind))
|
|
519
|
+
return invalid('kind', 'kind must be storable or consumable');
|
|
520
|
+
if (!TRACKING.includes(tracking))
|
|
521
|
+
return invalid('tracking', `tracking must be: ${TRACKING.join(', ')}`);
|
|
522
|
+
if (kind !== 'storable' && tracking !== 'none')
|
|
523
|
+
return invalid('tracking', 'a consumable product must use tracking none');
|
|
524
|
+
if (args.pointOfSale !== args.saleOk)
|
|
525
|
+
return invalid('pointOfSale', 'point of sale currently follows sales eligibility');
|
|
526
|
+
if (n(args.salePrice) < 0 || n(args.cost) < 0)
|
|
527
|
+
return invalid('salePrice', 'sale price and cost cannot be negative');
|
|
528
|
+
if (!(await ctx.db.select('uom.Unit', { id: args.uomId }))[0])
|
|
529
|
+
return invalid('uomId', 'unit of measure does not exist');
|
|
530
|
+
if (args.categoryId && !(await ctx.db.select('product.Category', { id: args.categoryId }))[0])
|
|
531
|
+
return invalid('categoryId', 'product category does not exist');
|
|
532
|
+
if (barcode) {
|
|
533
|
+
const collision = (await ctx.db.select('product.Product', { barcode }))[0];
|
|
534
|
+
if (collision && collision.id !== args.id)
|
|
535
|
+
return invalid('barcode', 'barcode is already assigned to another product');
|
|
536
|
+
}
|
|
537
|
+
try {
|
|
538
|
+
await ctx.tx(async (tx) => {
|
|
539
|
+
const product = (await tx.db.select('product.Product', { id: args.id }))[0];
|
|
540
|
+
const template = product
|
|
541
|
+
? (await tx.db.select('product.Template', { id: product.templateId }))[0]
|
|
542
|
+
: (await tx.db.select('product.Template', { id: args.templateId }))[0];
|
|
543
|
+
if (args.create && product && template)
|
|
544
|
+
return;
|
|
545
|
+
if (args.create) {
|
|
546
|
+
if (product || template)
|
|
547
|
+
throw new InventoryRefused(invalid('id', 'product identity is already in use'));
|
|
548
|
+
await tx.db.insert('product.Template', {
|
|
549
|
+
id: args.templateId,
|
|
550
|
+
name,
|
|
551
|
+
type: 'goods',
|
|
552
|
+
categoryId: args.categoryId ?? null,
|
|
553
|
+
uomId: args.uomId,
|
|
554
|
+
description: null,
|
|
555
|
+
listPrice: args.salePrice,
|
|
556
|
+
saleOk: args.saleOk,
|
|
557
|
+
purchaseOk: args.purchaseOk,
|
|
558
|
+
active: true,
|
|
559
|
+
isStorable: kind === 'storable',
|
|
560
|
+
tracking,
|
|
561
|
+
inventoryRevision: 0,
|
|
562
|
+
});
|
|
563
|
+
await tx.db.insert('product.Product', {
|
|
564
|
+
id: args.id,
|
|
565
|
+
templateId: args.templateId,
|
|
566
|
+
defaultCode: sku,
|
|
567
|
+
barcode,
|
|
568
|
+
weight: '0',
|
|
569
|
+
volume: '0',
|
|
570
|
+
combinationKey: `manual:${String(args.id)}`,
|
|
571
|
+
active: true,
|
|
572
|
+
});
|
|
573
|
+
}
|
|
574
|
+
else {
|
|
575
|
+
if (!product || !template)
|
|
576
|
+
throw new InventoryRefused(invalid('id', 'inventory product does not exist'));
|
|
577
|
+
if (args.expectedRevision === undefined)
|
|
578
|
+
throw new InventoryRefused(invalid('expectedRevision', 'product version is required'));
|
|
579
|
+
if (!(await claimInventoryRevision(tx, template, args.expectedRevision)))
|
|
580
|
+
throw new InventoryRefused(invalid('expectedRevision', 'inventory product changed'));
|
|
581
|
+
await tx.db.update('product.Template', { id: template.id }, {
|
|
582
|
+
name,
|
|
583
|
+
categoryId: args.categoryId ?? null,
|
|
584
|
+
uomId: args.uomId,
|
|
585
|
+
listPrice: args.salePrice,
|
|
586
|
+
saleOk: args.saleOk,
|
|
587
|
+
purchaseOk: args.purchaseOk,
|
|
588
|
+
isStorable: kind === 'storable',
|
|
589
|
+
tracking,
|
|
590
|
+
});
|
|
591
|
+
await tx.db.update('product.Product', { id: product.id }, { defaultCode: sku, barcode });
|
|
592
|
+
}
|
|
593
|
+
const costId = companyKey(tx, args.id);
|
|
594
|
+
const existingCost = (await tx.db.select('product.Cost', { id: costId }))[0];
|
|
595
|
+
if (existingCost)
|
|
596
|
+
await tx.db.update('product.Cost', { id: costId }, { standardPrice: args.cost });
|
|
597
|
+
else
|
|
598
|
+
await tx.db.insert('product.Cost', {
|
|
599
|
+
id: costId,
|
|
600
|
+
productId: args.id,
|
|
601
|
+
standardPrice: args.cost,
|
|
602
|
+
});
|
|
603
|
+
await tx.db.update('uom.Unit', { id: args.uomId }, { locked: true });
|
|
604
|
+
});
|
|
605
|
+
}
|
|
606
|
+
catch (error) {
|
|
607
|
+
if (error instanceof InventoryRefused)
|
|
608
|
+
return error.result;
|
|
609
|
+
throw error;
|
|
610
|
+
}
|
|
611
|
+
const product = (await ctx.db.select('product.Product', { id: args.id }))[0];
|
|
612
|
+
const template = product && (await ctx.db.select('product.Template', { id: product.templateId }))[0];
|
|
613
|
+
return {
|
|
614
|
+
ok: true,
|
|
615
|
+
id: args.id,
|
|
616
|
+
templateId: template?.id ?? args.templateId,
|
|
617
|
+
revision: n(template?.inventoryRevision),
|
|
618
|
+
};
|
|
619
|
+
},
|
|
620
|
+
}),
|
|
621
|
+
setInventoryProductActive: defineFn({
|
|
622
|
+
input: { id: 'id', active: 'bool', expectedRevision: 'int' },
|
|
623
|
+
output: { ok: 'bool', id: 'id?', revision: 'int?', errors: 'json?' },
|
|
624
|
+
effects: [
|
|
625
|
+
'read:product.Template',
|
|
626
|
+
'write:product.Template',
|
|
627
|
+
'read:product.Product',
|
|
628
|
+
'write:product.Product',
|
|
629
|
+
],
|
|
630
|
+
idempotent: true,
|
|
631
|
+
agent: true,
|
|
632
|
+
handler: async (ctx, args) => {
|
|
633
|
+
try {
|
|
634
|
+
await ctx.tx(async (tx) => {
|
|
635
|
+
const product = (await tx.db.select('product.Product', { id: args.id }))[0];
|
|
636
|
+
const template = product && (await tx.db.select('product.Template', { id: product.templateId }))[0];
|
|
637
|
+
if (!product || !template)
|
|
638
|
+
throw new InventoryRefused(invalid('id', 'inventory product does not exist'));
|
|
639
|
+
if (Boolean(product.active) === args.active && Boolean(template.active) === args.active)
|
|
640
|
+
throw new InventoryRefused(invalid('active', 'inventory product is already in that state'));
|
|
641
|
+
if (!(await claimInventoryRevision(tx, template, args.expectedRevision)))
|
|
642
|
+
throw new InventoryRefused(invalid('expectedRevision', 'inventory product changed'));
|
|
643
|
+
await tx.db.update('product.Template', { id: template.id }, { active: args.active });
|
|
644
|
+
for (const variant of await tx.db.select('product.Product', { templateId: template.id }))
|
|
645
|
+
await tx.db.update('product.Product', { id: variant.id }, { active: args.active });
|
|
646
|
+
});
|
|
647
|
+
}
|
|
648
|
+
catch (error) {
|
|
649
|
+
if (error instanceof InventoryRefused)
|
|
650
|
+
return error.result;
|
|
651
|
+
throw error;
|
|
652
|
+
}
|
|
653
|
+
const product = (await ctx.db.select('product.Product', { id: args.id }))[0];
|
|
654
|
+
const template = product && (await ctx.db.select('product.Template', { id: product.templateId }))[0];
|
|
655
|
+
return { ok: true, id: args.id, revision: n(template?.inventoryRevision) };
|
|
656
|
+
},
|
|
657
|
+
}),
|
|
658
|
+
/**
|
|
659
|
+
* Withheld from the public surface until it can refuse a referenced product.
|
|
660
|
+
*
|
|
661
|
+
* The guard below sees stock history and nothing else, because this module
|
|
662
|
+
* cannot read sale, purchase or account tables. A product named only by a
|
|
663
|
+
* draft quotation therefore passes it, and deleting one leaves the order line
|
|
664
|
+
* pointing at a row that no longer exists — proven, not supposed. Until the
|
|
665
|
+
* reference check exists this stays off HTTP and off the agent surface, where
|
|
666
|
+
* it would answer without even the channel's CSRF and rate limit.
|
|
667
|
+
*/
|
|
668
|
+
deleteInventoryProduct: defineFn({
|
|
669
|
+
exposure: 'internal',
|
|
670
|
+
input: { id: 'id', expectedRevision: 'int' },
|
|
671
|
+
output: { ok: 'bool', id: 'id?', deleted: 'bool?', errors: 'json?' },
|
|
672
|
+
effects: [
|
|
673
|
+
'read:product.Template',
|
|
674
|
+
'write:product.Template',
|
|
675
|
+
'read:product.Product',
|
|
676
|
+
'write:product.Product',
|
|
677
|
+
'read:product.Cost',
|
|
678
|
+
'write:product.Cost',
|
|
679
|
+
'read:product.TemplateUom',
|
|
680
|
+
'write:product.TemplateUom',
|
|
681
|
+
'read:product.ProductUom',
|
|
682
|
+
'write:product.ProductUom',
|
|
683
|
+
'read:product.TemplateAttributeLine',
|
|
684
|
+
'write:product.TemplateAttributeLine',
|
|
685
|
+
'read:product.TemplateAttributeValue',
|
|
686
|
+
'write:product.TemplateAttributeValue',
|
|
687
|
+
'read:product.ProductValue',
|
|
688
|
+
'write:product.ProductValue',
|
|
689
|
+
'read:stock.Quant',
|
|
690
|
+
'read:stock.Move',
|
|
691
|
+
],
|
|
692
|
+
idempotent: true,
|
|
693
|
+
handler: async (ctx, args) => {
|
|
694
|
+
try {
|
|
695
|
+
await ctx.tx(async (tx) => {
|
|
696
|
+
const product = (await tx.db.select('product.Product', { id: args.id }))[0];
|
|
697
|
+
const template = product && (await tx.db.select('product.Template', { id: product.templateId }))[0];
|
|
698
|
+
if (!product || !template)
|
|
699
|
+
throw new InventoryRefused(invalid('id', 'inventory product does not exist'));
|
|
700
|
+
if (!(await claimInventoryRevision(tx, template, args.expectedRevision)))
|
|
701
|
+
throw new InventoryRefused(invalid('expectedRevision', 'inventory product changed'));
|
|
702
|
+
const variants = await tx.db.select('product.Product', { templateId: template.id });
|
|
703
|
+
for (const variant of variants) {
|
|
704
|
+
if ((await ours(tx, 'stock.Quant', { productId: variant.id })).length)
|
|
705
|
+
throw new InventoryRefused(invalid('id', 'a product with stock history cannot be deleted'));
|
|
706
|
+
if ((await ours(tx, 'stock.Move', { productId: variant.id })).length)
|
|
707
|
+
throw new InventoryRefused(invalid('id', 'a product with movement history cannot be deleted'));
|
|
708
|
+
}
|
|
709
|
+
const ProductValue = tx.table('product.ProductValue');
|
|
710
|
+
const ProductUom = tx.table('product.ProductUom');
|
|
711
|
+
const Cost = tx.table('product.Cost');
|
|
712
|
+
const Line = tx.table('product.TemplateAttributeLine');
|
|
713
|
+
const Value = tx.table('product.TemplateAttributeValue');
|
|
714
|
+
const TemplateUom = tx.table('product.TemplateUom');
|
|
715
|
+
const Product = tx.table('product.Product');
|
|
716
|
+
const Template = tx.table('product.Template');
|
|
717
|
+
const productIds = variants.map((variant) => String(variant.id));
|
|
718
|
+
const lines = await tx.db.select('product.TemplateAttributeLine', {
|
|
719
|
+
templateId: template.id,
|
|
720
|
+
});
|
|
721
|
+
const lineIds = lines.map((line) => String(line.id));
|
|
722
|
+
if (productIds.length) {
|
|
723
|
+
await tx.db.del(deleteFrom(ProductValue).where(inArray(ProductValue.productId, productIds)));
|
|
724
|
+
await tx.db.del(deleteFrom(ProductUom).where(inArray(ProductUom.productId, productIds)));
|
|
725
|
+
await tx.db.del(deleteFrom(Cost).where(inArray(Cost.productId, productIds)));
|
|
726
|
+
}
|
|
727
|
+
if (lineIds.length)
|
|
728
|
+
await tx.db.del(deleteFrom(Value).where(inArray(Value.lineId, lineIds)));
|
|
729
|
+
await tx.db.del(deleteFrom(Line).where(eq(Line.templateId, String(template.id))));
|
|
730
|
+
await tx.db.del(deleteFrom(TemplateUom).where(eq(TemplateUom.templateId, String(template.id))));
|
|
731
|
+
if (productIds.length)
|
|
732
|
+
await tx.db.del(deleteFrom(Product).where(inArray(Product.id, productIds)));
|
|
733
|
+
const deleted = await tx.db.del(deleteFrom(Template).where(eq(Template.id, String(template.id))));
|
|
734
|
+
if (deleted.changes !== 1)
|
|
735
|
+
throw new InventoryRefused(invalid('id', 'inventory product could not be deleted'));
|
|
736
|
+
});
|
|
737
|
+
}
|
|
738
|
+
catch (error) {
|
|
739
|
+
if (error instanceof InventoryRefused)
|
|
740
|
+
return error.result;
|
|
741
|
+
throw error;
|
|
742
|
+
}
|
|
743
|
+
return { ok: true, id: args.id, deleted: true };
|
|
744
|
+
},
|
|
745
|
+
}),
|
|
179
746
|
listWarehouses: defineFn({
|
|
180
747
|
input: {},
|
|
181
748
|
effects: ['read:stock.Warehouse'],
|
|
182
749
|
agent: true,
|
|
183
|
-
handler: (ctx) => ctx
|
|
750
|
+
handler: (ctx) => ours(ctx, 'stock.Warehouse', { active: true }),
|
|
184
751
|
}),
|
|
185
752
|
listPickings: defineFn({
|
|
186
753
|
input: { state: 'text?' },
|
|
187
754
|
effects: ['read:stock.Picking'],
|
|
188
755
|
agent: true,
|
|
189
|
-
handler: async (ctx, args) => args.state ? ctx
|
|
756
|
+
handler: async (ctx, args) => args.state ? ours(ctx, 'stock.Picking', { state: args.state }) : ours(ctx, 'stock.Picking'),
|
|
190
757
|
}),
|
|
191
758
|
getPicking: defineFn({
|
|
192
759
|
input: { id: 'id' },
|
|
193
760
|
effects: ['read:stock.Picking', 'read:stock.Move', 'read:stock.MoveLine'],
|
|
194
761
|
agent: true,
|
|
195
762
|
handler: async (ctx, args) => {
|
|
196
|
-
const picking = (await ctx
|
|
763
|
+
const picking = (await ours(ctx, 'stock.Picking', { id: args.id }))[0];
|
|
197
764
|
if (!picking)
|
|
198
765
|
return null;
|
|
199
|
-
const moves = await ctx
|
|
766
|
+
const moves = await ours(ctx, 'stock.Move', { pickingId: args.id });
|
|
200
767
|
return {
|
|
201
768
|
...picking,
|
|
202
769
|
moves: await Promise.all(moves.map(async (move) => ({
|
|
203
770
|
...move,
|
|
204
|
-
lines: await ctx
|
|
771
|
+
lines: await ours(ctx, 'stock.MoveLine', { moveId: move.id }),
|
|
205
772
|
}))),
|
|
206
773
|
};
|
|
207
774
|
},
|
|
@@ -210,25 +777,42 @@ export const functions = {
|
|
|
210
777
|
input: { warehouseId: 'id?' },
|
|
211
778
|
effects: ['read:stock.Location'],
|
|
212
779
|
agent: true,
|
|
213
|
-
handler: (ctx, args) => ctx
|
|
780
|
+
handler: (ctx, args) => ours(ctx, 'stock.Location', args.warehouseId ? { warehouseId: args.warehouseId } : {}),
|
|
214
781
|
}),
|
|
215
782
|
listPickingTypes: defineFn({
|
|
216
783
|
input: {},
|
|
217
784
|
effects: ['read:stock.PickingType'],
|
|
218
785
|
agent: true,
|
|
219
|
-
handler: (ctx) => ctx
|
|
786
|
+
handler: (ctx) => ours(ctx, 'stock.PickingType', { active: true }),
|
|
220
787
|
}),
|
|
221
788
|
listLots: defineFn({
|
|
222
789
|
input: { productId: 'id?' },
|
|
223
790
|
effects: ['read:stock.Lot'],
|
|
224
791
|
agent: true,
|
|
225
|
-
handler: (ctx, args) => ctx
|
|
792
|
+
handler: (ctx, args) => ours(ctx, 'stock.Lot', args.productId ? { productId: args.productId } : {}),
|
|
793
|
+
}),
|
|
794
|
+
trackedAvailability: defineFn({
|
|
795
|
+
input: { productId: 'id', warehouseId: 'id', at: 'datetime?' },
|
|
796
|
+
effects: [
|
|
797
|
+
'read:product.Product',
|
|
798
|
+
'read:product.Template',
|
|
799
|
+
'read:stock.PickingType',
|
|
800
|
+
'read:stock.Location',
|
|
801
|
+
'read:stock.Quant',
|
|
802
|
+
'read:stock.Lot',
|
|
803
|
+
],
|
|
804
|
+
agent: true,
|
|
805
|
+
handler: (ctx, args) => availabilityAt(ctx, {
|
|
806
|
+
productId: args.productId,
|
|
807
|
+
warehouseId: args.warehouseId,
|
|
808
|
+
at: args.at,
|
|
809
|
+
}),
|
|
226
810
|
}),
|
|
227
811
|
listQuants: defineFn({
|
|
228
812
|
input: { productId: 'id?', locationId: 'id?' },
|
|
229
813
|
effects: ['read:stock.Quant'],
|
|
230
814
|
agent: true,
|
|
231
|
-
handler: (ctx, args) => ctx
|
|
815
|
+
handler: (ctx, args) => ours(ctx, 'stock.Quant', {
|
|
232
816
|
...(args.productId ? { productId: args.productId } : {}),
|
|
233
817
|
...(args.locationId ? { locationId: args.locationId } : {}),
|
|
234
818
|
}),
|
|
@@ -259,7 +843,7 @@ export const functions = {
|
|
|
259
843
|
return invalid('receptionSteps', `phải là: ${RECEPTION_STEPS.join(', ')}`);
|
|
260
844
|
if (!DELIVERY_STEPS.includes(deliverySteps))
|
|
261
845
|
return invalid('deliverySteps', `phải là: ${DELIVERY_STEPS.join(', ')}`);
|
|
262
|
-
const existing = (await ctx
|
|
846
|
+
const existing = (await ours(ctx, 'stock.Warehouse', { id: args.id }))[0];
|
|
263
847
|
const values = { ...args, receptionSteps, deliverySteps, active: true };
|
|
264
848
|
const cs = ctx
|
|
265
849
|
.change('stock.Warehouse', values, existing ?? null)
|
|
@@ -321,7 +905,7 @@ export const functions = {
|
|
|
321
905
|
warehouseId: args.id,
|
|
322
906
|
active: location.active,
|
|
323
907
|
};
|
|
324
|
-
const found = (await tx
|
|
908
|
+
const found = (await ours(tx, 'stock.Location', { id }))[0];
|
|
325
909
|
if (found)
|
|
326
910
|
await tx.db.update('stock.Location', { id }, values);
|
|
327
911
|
else
|
|
@@ -396,7 +980,7 @@ export const functions = {
|
|
|
396
980
|
createBackorder: 'ask',
|
|
397
981
|
active: type.active ?? true,
|
|
398
982
|
};
|
|
399
|
-
const found = (await tx
|
|
983
|
+
const found = (await ours(tx, 'stock.PickingType', { id: type.id }))[0];
|
|
400
984
|
if (found)
|
|
401
985
|
await tx.db.update('stock.PickingType', { id: type.id }, values);
|
|
402
986
|
else
|
|
@@ -410,7 +994,7 @@ export const functions = {
|
|
|
410
994
|
{ id: deliveryRouteId, name: `${String(args.name)}: ${deliverySteps}`, sequence: 60 },
|
|
411
995
|
];
|
|
412
996
|
for (const route of routes) {
|
|
413
|
-
const found = (await tx
|
|
997
|
+
const found = (await ours(tx, 'stock.Route', { id: route.id }))[0];
|
|
414
998
|
const values = { name: route.name, sequence: route.sequence, active: true };
|
|
415
999
|
if (found)
|
|
416
1000
|
await tx.db.update('stock.Route', { id: route.id }, values);
|
|
@@ -424,7 +1008,7 @@ export const functions = {
|
|
|
424
1008
|
}
|
|
425
1009
|
// The subset executes route chains backwards from demand, so each leg is
|
|
426
1010
|
// represented as a pull rule. The resulting locations and operation types
|
|
427
|
-
// match
|
|
1011
|
+
// match the domain contract's receipt/delivery topology.
|
|
428
1012
|
const ruleDefinitions = [
|
|
429
1013
|
{
|
|
430
1014
|
id: `${warehouseId}:receipt:supplier-stock`,
|
|
@@ -531,7 +1115,7 @@ export const functions = {
|
|
|
531
1115
|
procureMethod: rule.procureMethod ?? 'make_to_order',
|
|
532
1116
|
active: rule.active,
|
|
533
1117
|
};
|
|
534
|
-
const found = (await tx
|
|
1118
|
+
const found = (await ours(tx, 'stock.Rule', { id: rule.id }))[0];
|
|
535
1119
|
if (found)
|
|
536
1120
|
await tx.db.update('stock.Rule', { id: rule.id }, values);
|
|
537
1121
|
else
|
|
@@ -554,14 +1138,14 @@ export const functions = {
|
|
|
554
1138
|
return invalid('parentId', 'location không thể là cha của chính nó');
|
|
555
1139
|
let parentPath = `${String(args.id)}/`;
|
|
556
1140
|
if (args.parentId) {
|
|
557
|
-
const parent = (await ctx
|
|
1141
|
+
const parent = (await ours(ctx, 'stock.Location', { id: args.parentId }))[0];
|
|
558
1142
|
if (!parent)
|
|
559
1143
|
return invalid('parentId', 'location cha không tồn tại');
|
|
560
1144
|
if (String(parent.parentPath).split('/').includes(String(args.id)))
|
|
561
1145
|
return invalid('parentId', 'cây location có vòng lặp');
|
|
562
1146
|
parentPath = `${String(parent.parentPath)}${String(args.id)}/`;
|
|
563
1147
|
}
|
|
564
|
-
const existing = (await ctx
|
|
1148
|
+
const existing = (await ours(ctx, 'stock.Location', { id: args.id }))[0];
|
|
565
1149
|
const values = { ...args, parentPath, active: true };
|
|
566
1150
|
const cs = ctx
|
|
567
1151
|
.change('stock.Location', values, existing ?? null)
|
|
@@ -569,7 +1153,24 @@ export const functions = {
|
|
|
569
1153
|
.required(['name', 'usage']);
|
|
570
1154
|
if (!cs.valid)
|
|
571
1155
|
return { ok: false, errors: cs.errors };
|
|
572
|
-
|
|
1156
|
+
// Re-parenting moves a whole subtree, and every row under it stores the path
|
|
1157
|
+
// it reaches the root by. Writing only this row left descendants pointing
|
|
1158
|
+
// through the old ancestor, and `forecast` anchors on exactly that path — so
|
|
1159
|
+
// one location was counted inside its old warehouse and outside its new one.
|
|
1160
|
+
// uom.saveUnit rebuilds its tree for the same reason.
|
|
1161
|
+
const moved = existing ? String(existing.parentPath) !== parentPath : false;
|
|
1162
|
+
await ctx.tx(async (tx) => {
|
|
1163
|
+
await tx.db.commit(cs, existing ? { id: args.id } : undefined);
|
|
1164
|
+
if (!moved)
|
|
1165
|
+
return;
|
|
1166
|
+
const previous = String(existing.parentPath);
|
|
1167
|
+
for (const descendant of await ours(tx, 'stock.Location')) {
|
|
1168
|
+
const path = String(descendant.parentPath);
|
|
1169
|
+
if (descendant.id === args.id || !path.startsWith(previous))
|
|
1170
|
+
continue;
|
|
1171
|
+
await tx.db.update('stock.Location', { id: descendant.id }, { parentPath: `${parentPath}${path.slice(previous.length)}` });
|
|
1172
|
+
}
|
|
1173
|
+
});
|
|
573
1174
|
return { ok: true, id: args.id };
|
|
574
1175
|
},
|
|
575
1176
|
}),
|
|
@@ -593,7 +1194,7 @@ export const functions = {
|
|
|
593
1194
|
const createBackorder = String(args.createBackorder ?? 'ask');
|
|
594
1195
|
if (!['ask', 'always', 'never'].includes(createBackorder))
|
|
595
1196
|
return invalid('createBackorder', 'phải là ask, always hoặc never');
|
|
596
|
-
const existing = (await ctx
|
|
1197
|
+
const existing = (await ours(ctx, 'stock.PickingType', { id: args.id }))[0];
|
|
597
1198
|
const values = { ...args, createBackorder, active: true };
|
|
598
1199
|
const cs = ctx
|
|
599
1200
|
.change('stock.PickingType', values, existing ?? null)
|
|
@@ -615,7 +1216,14 @@ export const functions = {
|
|
|
615
1216
|
},
|
|
616
1217
|
}),
|
|
617
1218
|
createLot: defineFn({
|
|
618
|
-
input: {
|
|
1219
|
+
input: {
|
|
1220
|
+
id: 'id',
|
|
1221
|
+
productId: 'id',
|
|
1222
|
+
name: 'text',
|
|
1223
|
+
ref: 'text?',
|
|
1224
|
+
note: 'text?',
|
|
1225
|
+
expirationDate: 'datetime?',
|
|
1226
|
+
},
|
|
619
1227
|
output: { ok: 'bool', id: 'id?', errors: 'json?' },
|
|
620
1228
|
effects: ['read:product.Product', 'write:stock.Lot'],
|
|
621
1229
|
idempotent: true,
|
|
@@ -645,7 +1253,7 @@ export const functions = {
|
|
|
645
1253
|
idempotent: true,
|
|
646
1254
|
agent: true,
|
|
647
1255
|
handler: async (ctx, args) => {
|
|
648
|
-
const type = (await ctx
|
|
1256
|
+
const type = (await ours(ctx, 'stock.PickingType', { id: args.pickingTypeId }))[0];
|
|
649
1257
|
if (!type)
|
|
650
1258
|
return invalid('pickingTypeId', 'operation type không tồn tại');
|
|
651
1259
|
const locationId = args.locationId ?? type.defaultLocationSrcId;
|
|
@@ -687,13 +1295,17 @@ export const functions = {
|
|
|
687
1295
|
origin: 'text?',
|
|
688
1296
|
},
|
|
689
1297
|
output: { ok: 'bool', id: 'id?', errors: 'json?' },
|
|
690
|
-
effects: [
|
|
1298
|
+
effects: [
|
|
1299
|
+
'read:stock.Picking',
|
|
1300
|
+
'read:product.Product',
|
|
1301
|
+
'read:product.Template',
|
|
1302
|
+
'read:uom.Unit',
|
|
1303
|
+
'write:stock.Move',
|
|
1304
|
+
],
|
|
691
1305
|
idempotent: true,
|
|
692
1306
|
agent: true,
|
|
693
1307
|
handler: async (ctx, args) => {
|
|
694
|
-
const picking = args.pickingId
|
|
695
|
-
? (await ctx.db.select('stock.Picking', { id: args.pickingId }))[0]
|
|
696
|
-
: null;
|
|
1308
|
+
const picking = args.pickingId ? (await ours(ctx, 'stock.Picking', { id: args.pickingId }))[0] : null;
|
|
697
1309
|
if (args.pickingId && !picking)
|
|
698
1310
|
return invalid('pickingId', 'transfer không tồn tại');
|
|
699
1311
|
if (picking && ['done', 'cancel'].includes(String(picking.state)))
|
|
@@ -704,6 +1316,12 @@ export const functions = {
|
|
|
704
1316
|
return invalid('productUomId', 'đơn vị không tồn tại');
|
|
705
1317
|
if (!(Number(args.productUomQty) > 0))
|
|
706
1318
|
return invalid('productUomQty', 'phải lớn hơn 0');
|
|
1319
|
+
// The caller may speak in boxes; the ledger does not. Everything behind
|
|
1320
|
+
// this door — quants, reservations, the forecast — compares plain numbers
|
|
1321
|
+
// and is only right when they all share the product's unit.
|
|
1322
|
+
const based = await toProductUnit(ctx, args.productId, args.productUomId, Number(args.productUomQty));
|
|
1323
|
+
if (based === null)
|
|
1324
|
+
return invalid('productUomId', 'đơn vị không cùng hệ đo với đơn vị gốc của sản phẩm');
|
|
707
1325
|
const locationId = args.locationId ?? picking?.locationId;
|
|
708
1326
|
const locationDestId = args.locationDestId ?? picking?.locationDestId;
|
|
709
1327
|
if (!locationId || !locationDestId)
|
|
@@ -716,8 +1334,8 @@ export const functions = {
|
|
|
716
1334
|
name: args.name,
|
|
717
1335
|
pickingId: args.pickingId ?? null,
|
|
718
1336
|
productId: args.productId,
|
|
719
|
-
productUomId:
|
|
720
|
-
productUomQty:
|
|
1337
|
+
productUomId: based.uomId,
|
|
1338
|
+
productUomQty: String(based.quantity),
|
|
721
1339
|
quantity: '0',
|
|
722
1340
|
locationId,
|
|
723
1341
|
locationDestId,
|
|
@@ -737,103 +1355,70 @@ export const functions = {
|
|
|
737
1355
|
idempotent: true,
|
|
738
1356
|
agent: true,
|
|
739
1357
|
handler: async (ctx, args) => {
|
|
740
|
-
const picking = (await ctx
|
|
1358
|
+
const picking = (await ours(ctx, 'stock.Picking', { id: args.id }))[0];
|
|
741
1359
|
if (!picking)
|
|
742
1360
|
return invalid('id', 'transfer không tồn tại');
|
|
743
1361
|
if (picking.state === 'done' || picking.state === 'cancel')
|
|
744
1362
|
return invalid('state', 'transfer đã kết thúc');
|
|
745
1363
|
await ctx.db.update('stock.Picking', { id: args.id }, { state: 'confirmed' });
|
|
746
|
-
for (const move of await ctx
|
|
1364
|
+
for (const move of await ours(ctx, 'stock.Move', { pickingId: args.id }))
|
|
747
1365
|
if (move.state === 'draft')
|
|
748
1366
|
await ctx.db.update('stock.Move', { id: move.id }, { state: 'confirmed' });
|
|
749
1367
|
return { ok: true, id: args.id };
|
|
750
1368
|
},
|
|
751
1369
|
}),
|
|
752
1370
|
reserveMove: defineFn({
|
|
753
|
-
input: { id: 'id' },
|
|
1371
|
+
input: { id: 'id', selections: 'json?' },
|
|
754
1372
|
output: { ok: 'bool', reserved: 'decimal?', state: 'text?', errors: 'json?' },
|
|
755
|
-
effects:
|
|
756
|
-
'read:stock.Move',
|
|
757
|
-
'write:stock.Move',
|
|
758
|
-
'read:stock.Picking',
|
|
759
|
-
'write:stock.Picking',
|
|
760
|
-
'read:stock.MoveLine',
|
|
761
|
-
'write:stock.MoveLine',
|
|
762
|
-
'read:stock.Quant',
|
|
763
|
-
'write:stock.Quant',
|
|
764
|
-
'read:product.Product',
|
|
765
|
-
'read:product.Template',
|
|
766
|
-
],
|
|
1373
|
+
effects: reserveEffects,
|
|
767
1374
|
idempotent: true,
|
|
768
1375
|
agent: true,
|
|
769
1376
|
handler: async (ctx, args) => {
|
|
770
|
-
const move = (await ctx
|
|
1377
|
+
const move = (await ours(ctx, 'stock.Move', { id: args.id }))[0];
|
|
771
1378
|
if (!move)
|
|
772
1379
|
return invalid('id', 'move không tồn tại');
|
|
773
|
-
|
|
774
|
-
return
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
quantityProductUom: String(take),
|
|
816
|
-
locationId: move.locationId,
|
|
817
|
-
locationDestId: move.locationDestId,
|
|
818
|
-
lotId: quant.lotId,
|
|
819
|
-
picked: false,
|
|
820
|
-
});
|
|
821
|
-
reserved += take;
|
|
822
|
-
}
|
|
823
|
-
state =
|
|
824
|
-
compareQty(reserved, demand, 0.000001) >= 0
|
|
825
|
-
? 'assigned'
|
|
826
|
-
: reserved > 0
|
|
827
|
-
? 'partially_available'
|
|
828
|
-
: 'confirmed';
|
|
829
|
-
await tx.db.update('stock.Move', { id: move.id }, { state, quantity: String(reserved) });
|
|
830
|
-
if (move.pickingId)
|
|
831
|
-
await updatePickingState(tx, move.pickingId);
|
|
832
|
-
});
|
|
833
|
-
// The state that was written, not a second derivation of it: the tolerant
|
|
834
|
-
// compareQty above and a bare `reserved >= demand` disagree inside 1e-6, and
|
|
835
|
-
// the caller was being told the opposite of what landed in the row.
|
|
836
|
-
return { ok: true, reserved: String(reserved), state };
|
|
1380
|
+
try {
|
|
1381
|
+
return await ctx.tx((tx) => reserveMoveInContext(tx, move, args.selections));
|
|
1382
|
+
}
|
|
1383
|
+
catch (error) {
|
|
1384
|
+
if (error instanceof InventoryRefused)
|
|
1385
|
+
return error.result;
|
|
1386
|
+
throw error;
|
|
1387
|
+
}
|
|
1388
|
+
},
|
|
1389
|
+
}),
|
|
1390
|
+
reserveMoves: defineFn({
|
|
1391
|
+
input: { moves: 'json', requireFull: 'bool?' },
|
|
1392
|
+
output: { ok: 'bool', results: 'json?', errors: 'json?' },
|
|
1393
|
+
effects: reserveEffects,
|
|
1394
|
+
idempotent: true,
|
|
1395
|
+
agent: true,
|
|
1396
|
+
handler: async (ctx, args) => {
|
|
1397
|
+
if (!Array.isArray(args.moves) || !args.moves.length)
|
|
1398
|
+
return invalid('moves', 'at least one move reservation is required');
|
|
1399
|
+
try {
|
|
1400
|
+
const results = await ctx.tx(async (tx) => {
|
|
1401
|
+
const held = [];
|
|
1402
|
+
for (const entry of args.moves) {
|
|
1403
|
+
const move = (await ours(tx, 'stock.Move', { id: entry.id }))[0];
|
|
1404
|
+
if (!move)
|
|
1405
|
+
throw new InventoryRefused(invalid('moves', `move ${String(entry.id)} does not exist`));
|
|
1406
|
+
const result = await reserveMoveInContext(tx, move, entry.selections);
|
|
1407
|
+
if (result.ok !== true)
|
|
1408
|
+
throw new InventoryRefused(result);
|
|
1409
|
+
if (args.requireFull && result.state !== 'assigned')
|
|
1410
|
+
throw new InventoryRefused(invalid('stock', `insufficient stock for move ${String(move.id)}`));
|
|
1411
|
+
held.push({ id: String(move.id), reserved: result.reserved, state: result.state });
|
|
1412
|
+
}
|
|
1413
|
+
return held;
|
|
1414
|
+
});
|
|
1415
|
+
return { ok: true, results };
|
|
1416
|
+
}
|
|
1417
|
+
catch (error) {
|
|
1418
|
+
if (error instanceof InventoryRefused)
|
|
1419
|
+
return error.result;
|
|
1420
|
+
throw error;
|
|
1421
|
+
}
|
|
837
1422
|
},
|
|
838
1423
|
}),
|
|
839
1424
|
saveMoveLine: defineFn({
|
|
@@ -853,7 +1438,7 @@ export const functions = {
|
|
|
853
1438
|
idempotent: true,
|
|
854
1439
|
agent: true,
|
|
855
1440
|
handler: async (ctx, args) => {
|
|
856
|
-
const move = (await ctx
|
|
1441
|
+
const move = (await ours(ctx, 'stock.Move', { id: args.moveId }))[0];
|
|
857
1442
|
if (!move)
|
|
858
1443
|
return invalid('moveId', 'move không tồn tại');
|
|
859
1444
|
if (['done', 'cancel'].includes(String(move.state)))
|
|
@@ -868,11 +1453,11 @@ export const functions = {
|
|
|
868
1453
|
if (tracking === 'serial' && args.picked && compareQty(Number(args.quantity), 1, 0.000001) !== 0)
|
|
869
1454
|
return invalid('quantity', 'serial đã pick phải có quantity đúng 1');
|
|
870
1455
|
if (args.lotId) {
|
|
871
|
-
const lot = (await ctx
|
|
1456
|
+
const lot = (await ours(ctx, 'stock.Lot', { id: args.lotId }))[0];
|
|
872
1457
|
if (!lot || lot.productId !== move.productId)
|
|
873
1458
|
return invalid('lotId', 'lot/serial không thuộc sản phẩm');
|
|
874
1459
|
}
|
|
875
|
-
const existing = (await ctx
|
|
1460
|
+
const existing = (await ours(ctx, 'stock.MoveLine', { id: args.id }))[0];
|
|
876
1461
|
const values = {
|
|
877
1462
|
id: args.id,
|
|
878
1463
|
moveId: move.id,
|
|
@@ -905,9 +1490,16 @@ export const functions = {
|
|
|
905
1490
|
if (!cs.valid)
|
|
906
1491
|
return { ok: false, errors: cs.errors };
|
|
907
1492
|
await ctx.tx(async (tx) => {
|
|
908
|
-
const source = (await tx
|
|
1493
|
+
const source = (await ours(tx, 'stock.Location', { id: move.locationId }))[0];
|
|
909
1494
|
if (source && ['internal', 'transit'].includes(String(source.usage))) {
|
|
910
|
-
|
|
1495
|
+
// A picked line still holds its reservation — completePicking and
|
|
1496
|
+
// cancelPicking both release it on the way out — so what the row holds
|
|
1497
|
+
// today is its quantity whether or not it has been picked. Excluding a
|
|
1498
|
+
// picked line here made re-saving one add its quantity to the quant a
|
|
1499
|
+
// second time: pressing the pick button twice reserved ten for a line
|
|
1500
|
+
// of five, or threw `cannot become over-reserved` when the quant had
|
|
1501
|
+
// nothing left to give.
|
|
1502
|
+
const oldQuantity = existing ? Number(existing.quantity) : 0;
|
|
911
1503
|
const newQuantity = Number(args.quantity);
|
|
912
1504
|
if (existing && lotKey(existing.lotId) !== lotKey(args.lotId) && oldQuantity)
|
|
913
1505
|
await mutateQuant(tx, {
|
|
@@ -957,132 +1549,171 @@ export const functions = {
|
|
|
957
1549
|
'read:stock.MoveLink',
|
|
958
1550
|
'write:stock.MoveLink',
|
|
959
1551
|
],
|
|
1552
|
+
idempotent: true,
|
|
960
1553
|
agent: true,
|
|
961
1554
|
handler: async (ctx, args) => {
|
|
962
|
-
const
|
|
1555
|
+
const completedResult = async () => {
|
|
1556
|
+
const backorder = (await ours(ctx, 'stock.Picking', { backorderId: args.id }))[0];
|
|
1557
|
+
return { ok: true, id: args.id, ...(backorder ? { backorderId: backorder.id } : {}) };
|
|
1558
|
+
};
|
|
1559
|
+
const picking = (await ours(ctx, 'stock.Picking', { id: args.id }))[0];
|
|
963
1560
|
if (!picking)
|
|
964
1561
|
return invalid('id', 'transfer không tồn tại');
|
|
965
1562
|
if (picking.state === 'done')
|
|
966
|
-
return
|
|
1563
|
+
return completedResult();
|
|
967
1564
|
if (picking.state === 'cancel')
|
|
968
1565
|
return invalid('state', 'transfer đã hủy');
|
|
969
1566
|
const requested = new Map();
|
|
970
1567
|
if (Array.isArray(args.quantities))
|
|
971
1568
|
for (const entry of args.quantities)
|
|
972
1569
|
requested.set(String(entry.moveLineId), Number(entry.quantity));
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
const
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
1570
|
+
let alreadyDone = false;
|
|
1571
|
+
let backorderId = null;
|
|
1572
|
+
try {
|
|
1573
|
+
await ctx.tx(async (tx) => {
|
|
1574
|
+
const current = (await ours(tx, 'stock.Picking', { id: args.id }))[0];
|
|
1575
|
+
if (!current)
|
|
1576
|
+
throw new Error('transfer disappeared while completing');
|
|
1577
|
+
if (current.state === 'done') {
|
|
1578
|
+
alreadyDone = true;
|
|
1579
|
+
return;
|
|
1580
|
+
}
|
|
1581
|
+
if (current.state === 'cancel')
|
|
1582
|
+
throw new Error('transfer đã hủy');
|
|
1583
|
+
const moves = await ours(tx, 'stock.Move', { pickingId: args.id });
|
|
1584
|
+
const remaining = [];
|
|
1585
|
+
for (const move of moves) {
|
|
1586
|
+
const tracking = await trackingOf(tx, move.productId);
|
|
1587
|
+
const destination = (await ours(tx, 'stock.Location', { id: move.locationDestId }))[0];
|
|
1588
|
+
const lines = await ours(tx, 'stock.MoveLine', { moveId: move.id });
|
|
1589
|
+
let done = 0;
|
|
1590
|
+
for (const line of lines) {
|
|
1591
|
+
// A line records the location its goods actually sit in, which is the
|
|
1592
|
+
// sub-location reserveMove drew them from rather than the parent the
|
|
1593
|
+
// move names. Releasing and deducting at the move's location would
|
|
1594
|
+
// touch a quant the line never held.
|
|
1595
|
+
const source = (await ours(tx, 'stock.Location', { id: line.locationId }))[0];
|
|
1596
|
+
const reserved = Number(line.quantity);
|
|
1597
|
+
if (args.pickedOnly && !line.picked) {
|
|
1598
|
+
if ((source.usage === 'internal' || source.usage === 'transit') && reserved)
|
|
1599
|
+
await mutateQuant(tx, {
|
|
1600
|
+
productId: move.productId,
|
|
1601
|
+
locationId: line.locationId,
|
|
1602
|
+
lotId: line.lotId,
|
|
1603
|
+
quantity: 0,
|
|
1604
|
+
reserved: -reserved,
|
|
1605
|
+
});
|
|
1606
|
+
await tx.db.update('stock.MoveLine', { id: line.id }, { quantity: '0', quantityProductUom: '0', picked: true });
|
|
1607
|
+
continue;
|
|
1608
|
+
}
|
|
1609
|
+
const quantity = requested.has(String(line.id))
|
|
1610
|
+
? requested.get(String(line.id))
|
|
1611
|
+
: requested.size
|
|
1612
|
+
? 0
|
|
1613
|
+
: reserved;
|
|
1614
|
+
if (quantity < 0 || quantity > reserved)
|
|
1615
|
+
throw new Error(`invalid done quantity for ${String(line.id)}`);
|
|
1616
|
+
if (tracking !== 'none' && !line.lotId)
|
|
1617
|
+
throw new Error(`${tracking} tracked product requires a lot/serial`);
|
|
1618
|
+
if (tracking === 'serial' && quantity > 0 && compareQty(quantity, 1, 0.000001) !== 0)
|
|
1619
|
+
throw new Error('serial picked move line quantity must equal 1');
|
|
1620
|
+
if (source.usage === 'internal' || source.usage === 'transit') {
|
|
1621
|
+
// Release what this line holds, capped at what the quant has left to
|
|
1622
|
+
// release. Both reserveMove and saveMoveLine reserve as they write a
|
|
1623
|
+
// line, so the two agree in normal operation; the cap is a floor
|
|
1624
|
+
// against a ledger already off, where releasing the full quantity
|
|
1625
|
+
// would drive the mirror negative and throw, leaving the transfer
|
|
1626
|
+
// impossible to complete by any later call.
|
|
1627
|
+
const held = await reservedOn(tx, move.productId, line.locationId, line.lotId);
|
|
1628
|
+
await mutateQuant(tx, {
|
|
1629
|
+
productId: move.productId,
|
|
1630
|
+
locationId: line.locationId,
|
|
1631
|
+
lotId: line.lotId,
|
|
1632
|
+
quantity: -quantity,
|
|
1633
|
+
reserved: -Math.min(reserved, held),
|
|
1634
|
+
});
|
|
1635
|
+
}
|
|
1636
|
+
else {
|
|
1637
|
+
await mutateQuant(tx, {
|
|
1638
|
+
productId: move.productId,
|
|
1639
|
+
locationId: line.locationId,
|
|
1640
|
+
lotId: line.lotId,
|
|
1641
|
+
quantity: -quantity,
|
|
1642
|
+
reserved: 0,
|
|
1643
|
+
});
|
|
1644
|
+
}
|
|
1645
|
+
// Keep both sides of every completed move in the quant ledger. The
|
|
1646
|
+
// forecast still counts only internal/transit locations.
|
|
1647
|
+
if (destination)
|
|
986
1648
|
await mutateQuant(tx, {
|
|
987
1649
|
productId: move.productId,
|
|
988
|
-
locationId: move.
|
|
1650
|
+
locationId: move.locationDestId,
|
|
989
1651
|
lotId: line.lotId,
|
|
990
|
-
quantity
|
|
991
|
-
reserved:
|
|
1652
|
+
quantity,
|
|
1653
|
+
reserved: 0,
|
|
992
1654
|
});
|
|
993
|
-
await tx.db.update('stock.MoveLine', { id: line.id }, { quantity:
|
|
994
|
-
|
|
1655
|
+
await tx.db.update('stock.MoveLine', { id: line.id }, { quantity: String(quantity), quantityProductUom: String(quantity), picked: true });
|
|
1656
|
+
done += quantity;
|
|
995
1657
|
}
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
if (
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1658
|
+
if (done > Number(move.productUomQty) + 0.000001)
|
|
1659
|
+
throw new Error(`done quantity exceeds demand for ${String(move.id)}`);
|
|
1660
|
+
await tx.db.update('stock.Move', { id: move.id }, { quantity: String(done), picked: true, state: 'done' });
|
|
1661
|
+
await pushFromCompletedMove(tx, move, done);
|
|
1662
|
+
const left = Math.max(0, Number(move.productUomQty) - done);
|
|
1663
|
+
if (left > 0)
|
|
1664
|
+
remaining.push({ move, quantity: left });
|
|
1665
|
+
}
|
|
1666
|
+
const finishedAt = new Date().toISOString();
|
|
1667
|
+
const completed = await tx.db.compareAndSet('stock.Picking', { id: args.id }, { state: current.state }, { state: 'done', dateDone: finishedAt });
|
|
1668
|
+
if (!('dryRun' in completed) && !completed.matched)
|
|
1669
|
+
throw new PickingConflict();
|
|
1670
|
+
const type = (await ours(tx, 'stock.PickingType', { id: current.pickingTypeId }))[0];
|
|
1671
|
+
const shouldBackorder = remaining.length > 0 && (args.createBackorder ?? type?.createBackorder !== 'never');
|
|
1672
|
+
if (shouldBackorder) {
|
|
1673
|
+
backorderId = companyKey(ctx, String(args.id), 'backorder');
|
|
1674
|
+
await tx.db.insertIfAbsent('stock.Picking', {
|
|
1675
|
+
id: backorderId,
|
|
1676
|
+
name: `${String(current.name)} backorder`,
|
|
1677
|
+
pickingTypeId: current.pickingTypeId,
|
|
1678
|
+
locationId: current.locationId,
|
|
1679
|
+
locationDestId: current.locationDestId,
|
|
1680
|
+
moveType: current.moveType,
|
|
1681
|
+
state: 'confirmed',
|
|
1682
|
+
backorderId: current.id,
|
|
1683
|
+
scheduledDate: finishedAt,
|
|
1684
|
+
dateDone: null,
|
|
1685
|
+
});
|
|
1686
|
+
for (const { move, quantity } of remaining) {
|
|
1687
|
+
const id = companyKey(ctx, String(move.id), 'backorder');
|
|
1688
|
+
await tx.db.insertIfAbsent('stock.Move', {
|
|
1689
|
+
...Object.fromEntries(Object.entries(move).filter(([key]) => key !== 'companyId')),
|
|
1690
|
+
id,
|
|
1691
|
+
pickingId: backorderId,
|
|
1692
|
+
productUomQty: String(quantity),
|
|
1693
|
+
quantity: '0',
|
|
1694
|
+
state: 'confirmed',
|
|
1695
|
+
picked: false,
|
|
1019
1696
|
});
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
locationId: move.locationId,
|
|
1025
|
-
lotId: line.lotId,
|
|
1026
|
-
quantity: -quantity,
|
|
1027
|
-
reserved: 0,
|
|
1697
|
+
await tx.db.insertIfAbsent('stock.MoveLink', {
|
|
1698
|
+
id: `${String(move.id)}:${id}`,
|
|
1699
|
+
originMoveId: move.id,
|
|
1700
|
+
destinationMoveId: id,
|
|
1028
1701
|
});
|
|
1029
1702
|
}
|
|
1030
|
-
// Keep both sides of every completed move in the quant ledger. The
|
|
1031
|
-
// forecast still counts only internal/transit locations.
|
|
1032
|
-
if (destination)
|
|
1033
|
-
await mutateQuant(tx, {
|
|
1034
|
-
productId: move.productId,
|
|
1035
|
-
locationId: move.locationDestId,
|
|
1036
|
-
lotId: line.lotId,
|
|
1037
|
-
quantity,
|
|
1038
|
-
reserved: 0,
|
|
1039
|
-
});
|
|
1040
|
-
await tx.db.update('stock.MoveLine', { id: line.id }, { quantity: String(quantity), quantityProductUom: String(quantity), picked: true });
|
|
1041
|
-
done += quantity;
|
|
1042
1703
|
}
|
|
1043
|
-
await tx.db.update('stock.Move', { id: move.id }, { quantity: String(done), picked: true, state: 'done' });
|
|
1044
|
-
await pushFromCompletedMove(tx, move, done);
|
|
1045
|
-
const left = Math.max(0, Number(move.productUomQty) - done);
|
|
1046
|
-
if (left > 0)
|
|
1047
|
-
remaining.push({ move, quantity: left });
|
|
1048
|
-
}
|
|
1049
|
-
await tx.db.update('stock.Picking', { id: args.id }, { state: 'done', dateDone: new Date().toISOString() });
|
|
1050
|
-
});
|
|
1051
|
-
const type = (await ctx.db.select('stock.PickingType', { id: picking.pickingTypeId }))[0];
|
|
1052
|
-
const shouldBackorder = remaining.length > 0 && (args.createBackorder ?? type?.createBackorder !== 'never');
|
|
1053
|
-
let backorderId = null;
|
|
1054
|
-
if (shouldBackorder) {
|
|
1055
|
-
backorderId = `${String(args.id)}:backorder:${Date.now()}`;
|
|
1056
|
-
await ctx.db.insert('stock.Picking', {
|
|
1057
|
-
id: backorderId,
|
|
1058
|
-
name: `${String(picking.name)} backorder`,
|
|
1059
|
-
pickingTypeId: picking.pickingTypeId,
|
|
1060
|
-
locationId: picking.locationId,
|
|
1061
|
-
locationDestId: picking.locationDestId,
|
|
1062
|
-
moveType: picking.moveType,
|
|
1063
|
-
state: 'confirmed',
|
|
1064
|
-
backorderId: picking.id,
|
|
1065
|
-
scheduledDate: new Date().toISOString(),
|
|
1066
|
-
dateDone: null,
|
|
1067
1704
|
});
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
quantity: '0',
|
|
1076
|
-
state: 'confirmed',
|
|
1077
|
-
picked: false,
|
|
1078
|
-
});
|
|
1079
|
-
await ctx.db.insertIfAbsent('stock.MoveLink', {
|
|
1080
|
-
id: `${String(move.id)}:${id}`,
|
|
1081
|
-
originMoveId: move.id,
|
|
1082
|
-
destinationMoveId: id,
|
|
1083
|
-
});
|
|
1705
|
+
}
|
|
1706
|
+
catch (error) {
|
|
1707
|
+
if (error instanceof PickingConflict) {
|
|
1708
|
+
const latest = (await ours(ctx, 'stock.Picking', { id: args.id }))[0];
|
|
1709
|
+
if (latest?.state === 'done')
|
|
1710
|
+
return completedResult();
|
|
1711
|
+
return invalid('state', 'transfer đã thay đổi, hãy tải lại');
|
|
1084
1712
|
}
|
|
1713
|
+
throw error;
|
|
1085
1714
|
}
|
|
1715
|
+
if (alreadyDone)
|
|
1716
|
+
return completedResult();
|
|
1086
1717
|
return { ok: true, id: args.id, backorderId };
|
|
1087
1718
|
},
|
|
1088
1719
|
}),
|
|
@@ -1095,6 +1726,8 @@ export const functions = {
|
|
|
1095
1726
|
countedQuantity: 'decimal',
|
|
1096
1727
|
lotId: 'id?',
|
|
1097
1728
|
productUomId: 'id',
|
|
1729
|
+
expectedQuantRevision: 'int?',
|
|
1730
|
+
reason: 'text?',
|
|
1098
1731
|
},
|
|
1099
1732
|
output: { ok: 'bool', pickingId: 'id?', moveId: 'id?', difference: 'decimal?', errors: 'json?' },
|
|
1100
1733
|
effects: [
|
|
@@ -1109,6 +1742,7 @@ export const functions = {
|
|
|
1109
1742
|
'write:stock.MoveLine',
|
|
1110
1743
|
'read:product.Product',
|
|
1111
1744
|
'read:product.Template',
|
|
1745
|
+
'read:uom.Unit',
|
|
1112
1746
|
],
|
|
1113
1747
|
idempotent: true,
|
|
1114
1748
|
agent: true,
|
|
@@ -1123,90 +1757,145 @@ export const functions = {
|
|
|
1123
1757
|
if (tracking === 'serial' && compareQty(Number(args.countedQuantity), 1, 0.000001) > 0)
|
|
1124
1758
|
return invalid('countedQuantity', 'mỗi serial chỉ có thể có số lượng 0 hoặc 1');
|
|
1125
1759
|
if (args.lotId) {
|
|
1126
|
-
const lot = (await ctx
|
|
1760
|
+
const lot = (await ours(ctx, 'stock.Lot', { id: args.lotId }))[0];
|
|
1127
1761
|
if (!lot || lot.productId !== args.productId)
|
|
1128
1762
|
return invalid('lotId', 'lot/serial không thuộc sản phẩm');
|
|
1129
1763
|
}
|
|
1130
|
-
|
|
1764
|
+
// The count may be spoken in boxes; the quant it corrects is not.
|
|
1765
|
+
// Comparing them unconverted turned "counted two boxes" into a shortfall
|
|
1766
|
+
// of twenty-two pieces.
|
|
1767
|
+
const counted = await toProductUnit(ctx, args.productId, args.productUomId, Number(args.countedQuantity));
|
|
1768
|
+
if (counted === null)
|
|
1769
|
+
return invalid('productUomId', 'đơn vị không cùng hệ đo với đơn vị gốc của sản phẩm');
|
|
1770
|
+
const current = (await ours(ctx, 'stock.Quant', {
|
|
1131
1771
|
productId: args.productId,
|
|
1132
1772
|
locationId: args.locationId,
|
|
1133
1773
|
lotKey: lotKey(args.lotId),
|
|
1134
1774
|
}))[0];
|
|
1135
|
-
const
|
|
1775
|
+
const currentRevision = current ? n(current.version) : -1;
|
|
1776
|
+
if (args.expectedQuantRevision !== undefined && currentRevision !== n(args.expectedQuantRevision))
|
|
1777
|
+
return invalid('expectedQuantRevision', 'stock position changed');
|
|
1778
|
+
const difference = counted.quantity - Number(current?.quantity ?? 0);
|
|
1136
1779
|
if (Math.abs(difference) < 1e-12)
|
|
1137
1780
|
return { ok: true, moveId: args.id, difference: '0' };
|
|
1781
|
+
// Counting below what is reserved is a real thing to want to say — the shelf
|
|
1782
|
+
// is short and a transfer is holding stock that is not there — but it is not
|
|
1783
|
+
// something this function can carry out. mutateQuant would refuse it by
|
|
1784
|
+
// throwing, which reached the operator as a server error naming neither the
|
|
1785
|
+
// reservation nor the transfer holding it. Say so as a field error instead.
|
|
1786
|
+
const reserved = Number(current?.reservedQuantity ?? 0);
|
|
1787
|
+
if (reserved - counted.quantity > 1e-12)
|
|
1788
|
+
return invalid('countedQuantity', `không thể kiểm kê xuống dưới ${String(reserved)} đang được reserve; hủy hoặc hoàn tất transfer giữ số này trước`);
|
|
1138
1789
|
const incoming = difference > 0;
|
|
1139
1790
|
const source = incoming ? args.inventoryLocationId : args.locationId;
|
|
1140
1791
|
const destination = incoming ? args.locationId : args.inventoryLocationId;
|
|
1141
1792
|
const pickingTypeId = `${String(args.inventoryLocationId)}:adjustment`;
|
|
1142
1793
|
const pickingId = `${String(args.id)}:picking`;
|
|
1143
|
-
|
|
1144
|
-
await
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1794
|
+
try {
|
|
1795
|
+
await ctx.tx(async (tx) => {
|
|
1796
|
+
if (args.expectedQuantRevision !== undefined) {
|
|
1797
|
+
const live = (await ours(tx, 'stock.Quant', {
|
|
1798
|
+
productId: args.productId,
|
|
1799
|
+
locationId: args.locationId,
|
|
1800
|
+
lotKey: lotKey(args.lotId),
|
|
1801
|
+
}))[0];
|
|
1802
|
+
if (currentRevision === -1) {
|
|
1803
|
+
if (live)
|
|
1804
|
+
throw new InventoryRefused(invalid('expectedQuantRevision', 'stock position changed'));
|
|
1805
|
+
const inserted = await tx.db.insertIfAbsent('stock.Quant', {
|
|
1806
|
+
id: quantId(tx, args.productId, args.locationId, args.lotId),
|
|
1807
|
+
productId: args.productId,
|
|
1808
|
+
locationId: args.locationId,
|
|
1809
|
+
lotId: args.lotId ?? null,
|
|
1810
|
+
lotKey: lotKey(args.lotId),
|
|
1811
|
+
quantity: '0',
|
|
1812
|
+
reservedQuantity: '0',
|
|
1813
|
+
inDate: new Date().toISOString(),
|
|
1814
|
+
version: 0,
|
|
1815
|
+
});
|
|
1816
|
+
if (!('dryRun' in inserted) && !inserted.inserted)
|
|
1817
|
+
throw new InventoryRefused(invalid('expectedQuantRevision', 'stock position changed'));
|
|
1818
|
+
}
|
|
1819
|
+
else {
|
|
1820
|
+
if (!live)
|
|
1821
|
+
throw new InventoryRefused(invalid('expectedQuantRevision', 'stock position changed'));
|
|
1822
|
+
const claimed = await tx.db.compareAndSet('stock.Quant', { id: live.id }, { version: currentRevision }, { version: currentRevision + 1 });
|
|
1823
|
+
if (!('dryRun' in claimed) && !claimed.matched)
|
|
1824
|
+
throw new InventoryRefused(invalid('expectedQuantRevision', 'stock position changed'));
|
|
1825
|
+
}
|
|
1826
|
+
}
|
|
1827
|
+
await mutateQuant(tx, {
|
|
1828
|
+
productId: args.productId,
|
|
1829
|
+
locationId: source,
|
|
1830
|
+
lotId: args.lotId,
|
|
1831
|
+
quantity: -Math.abs(difference),
|
|
1832
|
+
reserved: 0,
|
|
1833
|
+
});
|
|
1834
|
+
await mutateQuant(tx, {
|
|
1835
|
+
productId: args.productId,
|
|
1836
|
+
locationId: destination,
|
|
1837
|
+
lotId: args.lotId,
|
|
1838
|
+
quantity: Math.abs(difference),
|
|
1839
|
+
reserved: 0,
|
|
1840
|
+
});
|
|
1841
|
+
await tx.db.insertIfAbsent('stock.PickingType', {
|
|
1842
|
+
id: pickingTypeId,
|
|
1843
|
+
name: 'Inventory Adjustments',
|
|
1844
|
+
code: 'internal',
|
|
1845
|
+
warehouseId: null,
|
|
1846
|
+
defaultLocationSrcId: args.inventoryLocationId,
|
|
1847
|
+
defaultLocationDestId: args.locationId,
|
|
1848
|
+
createBackorder: 'never',
|
|
1849
|
+
active: true,
|
|
1850
|
+
});
|
|
1851
|
+
await tx.db.insertIfAbsent('stock.Picking', {
|
|
1852
|
+
id: pickingId,
|
|
1853
|
+
name: `Inventory ${String(args.id)}`,
|
|
1854
|
+
pickingTypeId,
|
|
1855
|
+
locationId: source,
|
|
1856
|
+
locationDestId: destination,
|
|
1857
|
+
moveType: 'direct',
|
|
1858
|
+
state: 'done',
|
|
1859
|
+
backorderId: null,
|
|
1860
|
+
scheduledDate: new Date().toISOString(),
|
|
1861
|
+
dateDone: new Date().toISOString(),
|
|
1862
|
+
});
|
|
1863
|
+
await tx.db.insertIfAbsent('stock.Move', {
|
|
1864
|
+
id: args.id,
|
|
1865
|
+
name: String(args.reason ?? 'Inventory adjustment'),
|
|
1866
|
+
pickingId,
|
|
1867
|
+
productId: args.productId,
|
|
1868
|
+
productUomId: counted.uomId,
|
|
1869
|
+
productUomQty: String(Math.abs(difference)),
|
|
1870
|
+
quantity: String(Math.abs(difference)),
|
|
1871
|
+
locationId: source,
|
|
1872
|
+
locationDestId: destination,
|
|
1873
|
+
state: 'done',
|
|
1874
|
+
picked: true,
|
|
1875
|
+
procureMethod: 'make_to_stock',
|
|
1876
|
+
ruleId: null,
|
|
1877
|
+
origin: 'inventory',
|
|
1878
|
+
});
|
|
1879
|
+
await tx.db.insertIfAbsent('stock.MoveLine', {
|
|
1880
|
+
id: `${args.id}:line`,
|
|
1881
|
+
moveId: args.id,
|
|
1882
|
+
pickingId,
|
|
1883
|
+
productId: args.productId,
|
|
1884
|
+
productUomId: counted.uomId,
|
|
1885
|
+
quantity: String(Math.abs(difference)),
|
|
1886
|
+
quantityProductUom: String(Math.abs(difference)),
|
|
1887
|
+
locationId: source,
|
|
1888
|
+
locationDestId: destination,
|
|
1889
|
+
lotId: args.lotId ?? null,
|
|
1890
|
+
picked: true,
|
|
1891
|
+
});
|
|
1208
1892
|
});
|
|
1209
|
-
}
|
|
1893
|
+
}
|
|
1894
|
+
catch (error) {
|
|
1895
|
+
if (error instanceof InventoryRefused)
|
|
1896
|
+
return error.result;
|
|
1897
|
+
throw error;
|
|
1898
|
+
}
|
|
1210
1899
|
return { ok: true, pickingId, moveId: args.id, difference: String(difference) };
|
|
1211
1900
|
},
|
|
1212
1901
|
}),
|
|
@@ -1225,7 +1914,7 @@ export const functions = {
|
|
|
1225
1914
|
effects: ['read:stock.Quant', 'read:stock.Move', 'read:stock.Location'],
|
|
1226
1915
|
agent: true,
|
|
1227
1916
|
handler: async (ctx, args) => {
|
|
1228
|
-
const locations = await ctx
|
|
1917
|
+
const locations = await ours(ctx, 'stock.Location');
|
|
1229
1918
|
const anchor = args.locationId ? locations.find((location) => location.id === args.locationId) : null;
|
|
1230
1919
|
const inside = new Set(locations
|
|
1231
1920
|
.filter((location) => ['internal', 'transit'].includes(String(location.usage)))
|
|
@@ -1237,13 +1926,20 @@ export const functions = {
|
|
|
1237
1926
|
return true;
|
|
1238
1927
|
})
|
|
1239
1928
|
.map((location) => String(location.id)));
|
|
1240
|
-
const quants = (await ctx
|
|
1929
|
+
const quants = (await ours(ctx, 'stock.Quant', { productId: args.productId })).filter((quant) => inside.has(String(quant.locationId)));
|
|
1241
1930
|
const onHand = quants.reduce((sum, quant) => sum + Number(quant.quantity), 0);
|
|
1242
1931
|
const reserved = quants.reduce((sum, quant) => sum + Number(quant.reservedQuantity), 0);
|
|
1243
|
-
const moves = (await ctx
|
|
1932
|
+
const moves = (await ours(ctx, 'stock.Move', { productId: args.productId })).filter((move) => !['done', 'cancel', 'draft'].includes(String(move.state)));
|
|
1244
1933
|
let incoming = 0, outgoing = 0;
|
|
1245
1934
|
for (const move of moves) {
|
|
1246
|
-
|
|
1935
|
+
// The whole demand of an open move is still to come. `move.quantity` is
|
|
1936
|
+
// what has been reserved, not what has shipped — completePicking is the
|
|
1937
|
+
// only writer that turns it into a done quantity, and it sets state to
|
|
1938
|
+
// `done` in the same update, which this filter has already excluded. Using
|
|
1939
|
+
// it as progress made a fully reserved outgoing move count for nothing, so
|
|
1940
|
+
// the screen reported `available 0` beside `forecast 10` for the same
|
|
1941
|
+
// product, and replenishment never saw the committed demand.
|
|
1942
|
+
const remaining = Number(move.productUomQty);
|
|
1247
1943
|
const sourceInside = inside.has(String(move.locationId));
|
|
1248
1944
|
const destinationInside = inside.has(String(move.locationDestId));
|
|
1249
1945
|
if (!sourceInside && destinationInside)
|
|
@@ -1281,10 +1977,10 @@ functions.savePicking = defineFn({
|
|
|
1281
1977
|
idempotent: true,
|
|
1282
1978
|
agent: true,
|
|
1283
1979
|
handler: async (ctx, args) => {
|
|
1284
|
-
const type = (await ctx
|
|
1980
|
+
const type = (await ours(ctx, 'stock.PickingType', { id: args.pickingTypeId }))[0];
|
|
1285
1981
|
if (!type)
|
|
1286
1982
|
return invalid('pickingTypeId', 'operation type không tồn tại');
|
|
1287
|
-
const existing = (await ctx
|
|
1983
|
+
const existing = (await ours(ctx, 'stock.Picking', { id: args.id }))[0];
|
|
1288
1984
|
const values = {
|
|
1289
1985
|
...args,
|
|
1290
1986
|
locationId: args.locationId ?? type.defaultLocationSrcId,
|
|
@@ -1335,9 +2031,9 @@ functions.saveLot = defineFn({
|
|
|
1335
2031
|
handler: async (ctx, args) => {
|
|
1336
2032
|
if (!(await ctx.db.select('product.Product', { id: args.productId }))[0])
|
|
1337
2033
|
return invalid('productId', 'biến thể không tồn tại');
|
|
1338
|
-
const existing = (await ctx
|
|
2034
|
+
const existing = (await ours(ctx, 'stock.Lot', { id: args.id }))[0];
|
|
1339
2035
|
if (existing && existing.productId !== args.productId) {
|
|
1340
|
-
const moveLines = await ctx
|
|
2036
|
+
const moveLines = await ours(ctx, 'stock.MoveLine', { lotId: args.id });
|
|
1341
2037
|
if (moveLines.length)
|
|
1342
2038
|
return invalid('productId', 'không thể đổi sản phẩm khi lô hoặc sê-ri đã được dùng trong dịch chuyển kho');
|
|
1343
2039
|
}
|
|
@@ -1355,22 +2051,12 @@ functions.saveLot = defineFn({
|
|
|
1355
2051
|
functions.assignPicking = defineFn({
|
|
1356
2052
|
input: { id: 'id' },
|
|
1357
2053
|
output: { ok: 'bool', state: 'text?', allocations: 'json?', shortages: 'json?', errors: 'json?' },
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
'write:stock.Picking',
|
|
1361
|
-
'read:stock.Move',
|
|
1362
|
-
'write:stock.Move',
|
|
1363
|
-
'read:stock.MoveLine',
|
|
1364
|
-
'write:stock.MoveLine',
|
|
1365
|
-
'read:stock.Quant',
|
|
1366
|
-
'write:stock.Quant',
|
|
1367
|
-
'read:product.Product',
|
|
1368
|
-
'read:product.Template',
|
|
1369
|
-
],
|
|
2054
|
+
// It reserves every move of the transfer, so it needs what reserveMove needs.
|
|
2055
|
+
effects: [...(functions.reserveMove.effects ?? []), 'read:stock.Picking', 'write:stock.Picking'],
|
|
1370
2056
|
idempotent: true,
|
|
1371
2057
|
agent: true,
|
|
1372
2058
|
handler: async (ctx, args) => {
|
|
1373
|
-
const picking = (await ctx
|
|
2059
|
+
const picking = (await ours(ctx, 'stock.Picking', { id: args.id }))[0];
|
|
1374
2060
|
if (!picking)
|
|
1375
2061
|
return invalid('id', 'transfer không tồn tại');
|
|
1376
2062
|
if (picking.state === 'draft')
|
|
@@ -1379,15 +2065,15 @@ functions.assignPicking = defineFn({
|
|
|
1379
2065
|
return invalid('state', 'transfer đã kết thúc');
|
|
1380
2066
|
const allocations = [];
|
|
1381
2067
|
const shortages = [];
|
|
1382
|
-
for (const move of await ctx
|
|
2068
|
+
for (const move of await ours(ctx, 'stock.Move', { pickingId: args.id })) {
|
|
1383
2069
|
const result = (await functions.reserveMove.handler(ctx, { id: move.id }));
|
|
1384
2070
|
const reserved = Number(result.reserved ?? 0);
|
|
1385
|
-
allocations.push(...(await ctx
|
|
2071
|
+
allocations.push(...(await ours(ctx, 'stock.MoveLine', { moveId: move.id })));
|
|
1386
2072
|
const shortage = Math.max(0, Number(move.productUomQty) - reserved);
|
|
1387
2073
|
if (shortage)
|
|
1388
2074
|
shortages.push({ moveId: move.id, quantity: String(shortage) });
|
|
1389
2075
|
}
|
|
1390
|
-
const updated = (await ctx
|
|
2076
|
+
const updated = (await ours(ctx, 'stock.Picking', { id: args.id }))[0];
|
|
1391
2077
|
return { ok: true, state: updated.state, allocations, shortages };
|
|
1392
2078
|
},
|
|
1393
2079
|
});
|
|
@@ -1408,19 +2094,21 @@ functions.cancelPicking = defineFn({
|
|
|
1408
2094
|
idempotent: true,
|
|
1409
2095
|
agent: true,
|
|
1410
2096
|
handler: async (ctx, args) => {
|
|
1411
|
-
const picking = (await ctx
|
|
2097
|
+
const picking = (await ours(ctx, 'stock.Picking', { id: args.id }))[0];
|
|
1412
2098
|
if (!picking)
|
|
1413
2099
|
return invalid('id', 'transfer không tồn tại');
|
|
1414
2100
|
if (picking.state === 'done')
|
|
1415
2101
|
return invalid('state', 'transfer đã hoàn thành');
|
|
1416
2102
|
await ctx.tx(async (tx) => {
|
|
1417
|
-
for (const move of await tx
|
|
1418
|
-
const
|
|
1419
|
-
|
|
2103
|
+
for (const move of await ours(tx, 'stock.Move', { pickingId: args.id })) {
|
|
2104
|
+
for (const line of await ours(tx, 'stock.MoveLine', { moveId: move.id })) {
|
|
2105
|
+
// Per line, for the same reason completePicking works per line: the
|
|
2106
|
+
// goods sit where the line says, not where the move does.
|
|
2107
|
+
const source = (await ours(tx, 'stock.Location', { id: line.locationId }))[0];
|
|
1420
2108
|
if (!line.picked && source && ['internal', 'transit'].includes(String(source.usage)))
|
|
1421
2109
|
await mutateQuant(tx, {
|
|
1422
2110
|
productId: move.productId,
|
|
1423
|
-
locationId:
|
|
2111
|
+
locationId: line.locationId,
|
|
1424
2112
|
lotId: line.lotId,
|
|
1425
2113
|
quantity: 0,
|
|
1426
2114
|
reserved: -Number(line.quantity),
|
|
@@ -1447,10 +2135,15 @@ functions.reconcileReservations = defineFn({
|
|
|
1447
2135
|
idempotent: true,
|
|
1448
2136
|
agent: true,
|
|
1449
2137
|
handler: async (ctx, args) => {
|
|
1450
|
-
|
|
1451
|
-
|
|
2138
|
+
// Every read here is narrowed to the company being written to, and quantId
|
|
2139
|
+
// keys on that same company. Read across the whole readable set instead — as
|
|
2140
|
+
// an unnarrowed select does — and another company's lines land under keys no
|
|
2141
|
+
// quant of theirs carries: their expectation reads as zero and this function
|
|
2142
|
+
// strips reservations it was asked to repair.
|
|
2143
|
+
const moves = new Map((await ours(ctx, 'stock.Move')).map((move) => [String(move.id), move]));
|
|
2144
|
+
const locations = new Map((await ours(ctx, 'stock.Location')).map((location) => [String(location.id), location]));
|
|
1452
2145
|
const wanted = new Map();
|
|
1453
|
-
for (const line of await ctx
|
|
2146
|
+
for (const line of await ours(ctx, 'stock.MoveLine')) {
|
|
1454
2147
|
const move = moves.get(String(line.moveId));
|
|
1455
2148
|
const location = locations.get(String(line.locationId));
|
|
1456
2149
|
if (line.picked ||
|
|
@@ -1465,7 +2158,7 @@ functions.reconcileReservations = defineFn({
|
|
|
1465
2158
|
wanted.set(id, (wanted.get(id) ?? 0) + Number(line.quantity));
|
|
1466
2159
|
}
|
|
1467
2160
|
let changed = 0;
|
|
1468
|
-
for (const quant of await ctx
|
|
2161
|
+
for (const quant of await ours(ctx, 'stock.Quant')) {
|
|
1469
2162
|
if (args.productId && quant.productId !== args.productId)
|
|
1470
2163
|
continue;
|
|
1471
2164
|
if (args.locationId && quant.locationId !== args.locationId)
|
|
@@ -1492,14 +2185,14 @@ functions.validatePicking = defineFn({
|
|
|
1492
2185
|
effects: functions.completePicking.effects,
|
|
1493
2186
|
agent: true,
|
|
1494
2187
|
handler: async (ctx, args) => {
|
|
1495
|
-
const picking = (await ctx
|
|
2188
|
+
const picking = (await ours(ctx, 'stock.Picking', { id: args.id }))[0];
|
|
1496
2189
|
if (!picking)
|
|
1497
2190
|
return invalid('id', 'transfer không tồn tại');
|
|
1498
|
-
const type = (await ctx
|
|
1499
|
-
const moves = await ctx
|
|
2191
|
+
const type = (await ours(ctx, 'stock.PickingType', { id: picking.pickingTypeId }))[0];
|
|
2192
|
+
const moves = await ours(ctx, 'stock.Move', { pickingId: args.id });
|
|
1500
2193
|
let hasRemaining = false;
|
|
1501
2194
|
for (const move of moves) {
|
|
1502
|
-
const done = (await ctx
|
|
2195
|
+
const done = (await ours(ctx, 'stock.MoveLine', { moveId: move.id }))
|
|
1503
2196
|
.filter((line) => line.picked)
|
|
1504
2197
|
.reduce((sum, line) => sum + Number(line.quantity), 0);
|
|
1505
2198
|
if (done + 1e-12 < Number(move.productUomQty))
|
|
@@ -1520,4 +2213,218 @@ functions.validatePicking = defineFn({
|
|
|
1520
2213
|
});
|
|
1521
2214
|
},
|
|
1522
2215
|
});
|
|
2216
|
+
const pickingViewEffects = [
|
|
2217
|
+
'read:stock.Picking',
|
|
2218
|
+
'read:stock.PickingType',
|
|
2219
|
+
'read:stock.Warehouse',
|
|
2220
|
+
'read:stock.Location',
|
|
2221
|
+
'read:stock.Move',
|
|
2222
|
+
'read:stock.MoveLine',
|
|
2223
|
+
'read:stock.Lot',
|
|
2224
|
+
'read:product.Product',
|
|
2225
|
+
'read:product.Template',
|
|
2226
|
+
];
|
|
2227
|
+
const rowsBy = (rows, key) => {
|
|
2228
|
+
const grouped = new Map();
|
|
2229
|
+
for (const row of rows) {
|
|
2230
|
+
const id = String(row[key]);
|
|
2231
|
+
grouped.set(id, [...(grouped.get(id) ?? []), row]);
|
|
2232
|
+
}
|
|
2233
|
+
return grouped;
|
|
2234
|
+
};
|
|
2235
|
+
/**
|
|
2236
|
+
* Load the transfer aggregate and the stock-owned labels around it in batches.
|
|
2237
|
+
*
|
|
2238
|
+
* Staff and backend clients need the same picking/type/location/move graph. Keeping
|
|
2239
|
+
* the joins here prevents every facade from growing an N+1 query per transfer.
|
|
2240
|
+
* Product display names and company labels stay with their owning modules.
|
|
2241
|
+
*/
|
|
2242
|
+
const pickingViews = async (ctx, pickings) => {
|
|
2243
|
+
if (!pickings.length)
|
|
2244
|
+
return [];
|
|
2245
|
+
const pickingIds = pickings.map((row) => String(row.id));
|
|
2246
|
+
const pickingTypeIds = [...new Set(pickings.map((row) => String(row.pickingTypeId)))];
|
|
2247
|
+
const locationIds = [
|
|
2248
|
+
...new Set(pickings.flatMap((row) => [String(row.locationId), String(row.locationDestId)])),
|
|
2249
|
+
];
|
|
2250
|
+
const PT = ctx.table('stock.PickingType');
|
|
2251
|
+
const L = ctx.table('stock.Location');
|
|
2252
|
+
const M = ctx.table('stock.Move');
|
|
2253
|
+
const ML = ctx.table('stock.MoveLine');
|
|
2254
|
+
const mine = company(ctx);
|
|
2255
|
+
const [pickingTypes, locations, moves, lines] = await Promise.all([
|
|
2256
|
+
ctx.db.all(from(PT).where(eq(PT.companyId, mine), inArray(PT.id, pickingTypeIds))),
|
|
2257
|
+
ctx.db.all(from(L).where(eq(L.companyId, mine), inArray(L.id, locationIds))),
|
|
2258
|
+
ctx.db.all(from(M).where(eq(M.companyId, mine), inArray(M.pickingId, pickingIds))),
|
|
2259
|
+
ctx.db.all(from(ML).where(eq(ML.companyId, mine), inArray(ML.pickingId, pickingIds))),
|
|
2260
|
+
]);
|
|
2261
|
+
const warehouseIds = [
|
|
2262
|
+
...new Set(pickingTypes
|
|
2263
|
+
.map((row) => row.warehouseId)
|
|
2264
|
+
.filter(Boolean)
|
|
2265
|
+
.map(String)),
|
|
2266
|
+
];
|
|
2267
|
+
const productIds = [...new Set(moves.map((row) => String(row.productId)))];
|
|
2268
|
+
const lotIds = [
|
|
2269
|
+
...new Set(lines
|
|
2270
|
+
.map((row) => row.lotId)
|
|
2271
|
+
.filter(Boolean)
|
|
2272
|
+
.map(String)),
|
|
2273
|
+
];
|
|
2274
|
+
const W = ctx.table('stock.Warehouse');
|
|
2275
|
+
const Lot = ctx.table('stock.Lot');
|
|
2276
|
+
const Product = ctx.table('product.Product');
|
|
2277
|
+
const [warehouses, lots, products] = await Promise.all([
|
|
2278
|
+
warehouseIds.length ? ctx.db.all(from(W).where(eq(W.companyId, mine), inArray(W.id, warehouseIds))) : [],
|
|
2279
|
+
lotIds.length ? ctx.db.all(from(Lot).where(eq(Lot.companyId, mine), inArray(Lot.id, lotIds))) : [],
|
|
2280
|
+
productIds.length ? ctx.db.all(from(Product).where(inArray(Product.id, productIds))) : [],
|
|
2281
|
+
]);
|
|
2282
|
+
const templateIds = [...new Set(products.map((row) => String(row.templateId)))];
|
|
2283
|
+
const Template = ctx.table('product.Template');
|
|
2284
|
+
const templates = templateIds.length
|
|
2285
|
+
? await ctx.db.all(from(Template).where(inArray(Template.id, templateIds)))
|
|
2286
|
+
: [];
|
|
2287
|
+
const byId = (rows) => new Map(rows.map((row) => [String(row.id), row]));
|
|
2288
|
+
const typeById = byId(pickingTypes);
|
|
2289
|
+
const locationById = byId(locations);
|
|
2290
|
+
const warehouseById = byId(warehouses);
|
|
2291
|
+
const lotById = byId(lots);
|
|
2292
|
+
const productById = byId(products);
|
|
2293
|
+
const templateById = byId(templates);
|
|
2294
|
+
const movesByPicking = rowsBy(moves, 'pickingId');
|
|
2295
|
+
const linesByMove = rowsBy(lines, 'moveId');
|
|
2296
|
+
return pickings.map((picking) => {
|
|
2297
|
+
const pickingType = typeById.get(String(picking.pickingTypeId)) ?? null;
|
|
2298
|
+
const warehouse = pickingType?.warehouseId
|
|
2299
|
+
? (warehouseById.get(String(pickingType.warehouseId)) ?? null)
|
|
2300
|
+
: null;
|
|
2301
|
+
return {
|
|
2302
|
+
...picking,
|
|
2303
|
+
pickingType,
|
|
2304
|
+
warehouse,
|
|
2305
|
+
sourceLocation: locationById.get(String(picking.locationId)) ?? null,
|
|
2306
|
+
destinationLocation: locationById.get(String(picking.locationDestId)) ?? null,
|
|
2307
|
+
moves: (movesByPicking.get(String(picking.id)) ?? [])
|
|
2308
|
+
.sort((left, right) => String(left.id).localeCompare(String(right.id)))
|
|
2309
|
+
.map((move) => {
|
|
2310
|
+
const product = productById.get(String(move.productId));
|
|
2311
|
+
const template = product ? templateById.get(String(product.templateId)) : null;
|
|
2312
|
+
return {
|
|
2313
|
+
...move,
|
|
2314
|
+
tracking: String(template?.tracking ?? 'none'),
|
|
2315
|
+
lines: (linesByMove.get(String(move.id)) ?? [])
|
|
2316
|
+
.sort((left, right) => String(left.id).localeCompare(String(right.id)))
|
|
2317
|
+
.map((line) => ({
|
|
2318
|
+
...line,
|
|
2319
|
+
lot: line.lotId ? (lotById.get(String(line.lotId)) ?? null) : null,
|
|
2320
|
+
})),
|
|
2321
|
+
};
|
|
2322
|
+
}),
|
|
2323
|
+
};
|
|
2324
|
+
});
|
|
2325
|
+
};
|
|
2326
|
+
functions.listPickingViews = defineFn({
|
|
2327
|
+
input: { state: 'text?', limit: 'int?', offset: 'int?' },
|
|
2328
|
+
effects: pickingViewEffects,
|
|
2329
|
+
agent: true,
|
|
2330
|
+
handler: async (ctx, args) => {
|
|
2331
|
+
const P = ctx.table('stock.Picking');
|
|
2332
|
+
const limit = Math.max(1, Math.min(Math.trunc(Number(args.limit) || 20), 101));
|
|
2333
|
+
const rows = await ctx.db.all(from(P)
|
|
2334
|
+
.where(eq(P.companyId, company(ctx)), ...(args.state ? [eq(P.state, String(args.state))] : []))
|
|
2335
|
+
.orderBy(desc(P.scheduledDate), desc(P.id))
|
|
2336
|
+
.limit(limit)
|
|
2337
|
+
.offset(Math.max(0, Math.trunc(Number(args.offset) || 0))));
|
|
2338
|
+
return pickingViews(ctx, rows);
|
|
2339
|
+
},
|
|
2340
|
+
});
|
|
2341
|
+
functions.getPickingView = defineFn({
|
|
2342
|
+
input: { id: 'id' },
|
|
2343
|
+
effects: pickingViewEffects,
|
|
2344
|
+
agent: true,
|
|
2345
|
+
handler: async (ctx, args) => {
|
|
2346
|
+
const P = ctx.table('stock.Picking');
|
|
2347
|
+
const row = await ctx.db.one(from(P).where(eq(P.companyId, company(ctx)), eq(P.id, String(args.id))));
|
|
2348
|
+
return row ? (await pickingViews(ctx, [row]))[0] : null;
|
|
2349
|
+
},
|
|
2350
|
+
});
|
|
2351
|
+
functions.listProductAvailability = defineFn({
|
|
2352
|
+
input: { productIds: 'json', warehouseId: 'id?' },
|
|
2353
|
+
output: { productId: 'id', available: 'decimal' },
|
|
2354
|
+
effects: ['read:stock.Quant', 'read:stock.Location'],
|
|
2355
|
+
agent: true,
|
|
2356
|
+
handler: async (ctx, args) => {
|
|
2357
|
+
const productIds = [
|
|
2358
|
+
...new Set(Array.isArray(args.productIds) ? args.productIds.map(String).slice(0, 2_000) : []),
|
|
2359
|
+
];
|
|
2360
|
+
if (!productIds.length)
|
|
2361
|
+
return [];
|
|
2362
|
+
const mine = company(ctx);
|
|
2363
|
+
const Q = ctx.table('stock.Quant');
|
|
2364
|
+
const L = ctx.table('stock.Location');
|
|
2365
|
+
const [quants, locations] = await Promise.all([
|
|
2366
|
+
ctx.db.all(from(Q).where(eq(Q.companyId, mine), inArray(Q.productId, productIds))),
|
|
2367
|
+
ctx.db.all(from(L).where(eq(L.companyId, mine), inArray(L.usage, ['internal', 'transit']))),
|
|
2368
|
+
]);
|
|
2369
|
+
const inside = new Set(locations
|
|
2370
|
+
.filter((row) => !args.warehouseId || row.warehouseId === args.warehouseId)
|
|
2371
|
+
.map((row) => String(row.id)));
|
|
2372
|
+
const available = new Map(productIds.map((id) => [id, 0]));
|
|
2373
|
+
for (const quant of quants) {
|
|
2374
|
+
if (!inside.has(String(quant.locationId)))
|
|
2375
|
+
continue;
|
|
2376
|
+
const id = String(quant.productId);
|
|
2377
|
+
available.set(id, (available.get(id) ?? 0) + Number(quant.quantity) - Number(quant.reservedQuantity));
|
|
2378
|
+
}
|
|
2379
|
+
return productIds.map((productId) => ({
|
|
2380
|
+
productId,
|
|
2381
|
+
available: String(available.get(productId) ?? 0),
|
|
2382
|
+
}));
|
|
2383
|
+
},
|
|
2384
|
+
});
|
|
2385
|
+
functions.getProductStockView = defineFn({
|
|
2386
|
+
input: { productId: 'id' },
|
|
2387
|
+
effects: ['read:stock.Quant', 'read:stock.Location', 'read:stock.Lot'],
|
|
2388
|
+
agent: true,
|
|
2389
|
+
handler: async (ctx, args) => {
|
|
2390
|
+
const mine = company(ctx);
|
|
2391
|
+
const Q = ctx.table('stock.Quant');
|
|
2392
|
+
const L = ctx.table('stock.Location');
|
|
2393
|
+
const Lot = ctx.table('stock.Lot');
|
|
2394
|
+
const quants = await ctx.db.all(from(Q).where(eq(Q.companyId, mine), eq(Q.productId, String(args.productId))));
|
|
2395
|
+
const locationIds = [...new Set(quants.map((row) => String(row.locationId)))];
|
|
2396
|
+
const lotIds = [
|
|
2397
|
+
...new Set(quants
|
|
2398
|
+
.map((row) => row.lotId)
|
|
2399
|
+
.filter(Boolean)
|
|
2400
|
+
.map(String)),
|
|
2401
|
+
];
|
|
2402
|
+
const [locations, lots] = await Promise.all([
|
|
2403
|
+
locationIds.length ? ctx.db.all(from(L).where(eq(L.companyId, mine), inArray(L.id, locationIds))) : [],
|
|
2404
|
+
lotIds.length ? ctx.db.all(from(Lot).where(eq(Lot.companyId, mine), inArray(Lot.id, lotIds))) : [],
|
|
2405
|
+
]);
|
|
2406
|
+
const locationById = new Map(locations.map((row) => [String(row.id), row]));
|
|
2407
|
+
const lotById = new Map(lots.map((row) => [String(row.id), row]));
|
|
2408
|
+
const positions = quants
|
|
2409
|
+
.flatMap((quant) => {
|
|
2410
|
+
const location = locationById.get(String(quant.locationId));
|
|
2411
|
+
if (!location ||
|
|
2412
|
+
!['internal', 'transit'].includes(String(location.usage)) ||
|
|
2413
|
+
Number(quant.quantity) <= 0)
|
|
2414
|
+
return [];
|
|
2415
|
+
return [
|
|
2416
|
+
{
|
|
2417
|
+
quant,
|
|
2418
|
+
location,
|
|
2419
|
+
lot: quant.lotId ? (lotById.get(String(quant.lotId)) ?? null) : null,
|
|
2420
|
+
},
|
|
2421
|
+
];
|
|
2422
|
+
})
|
|
2423
|
+
.sort((left, right) => String(left.location.name).localeCompare(String(right.location.name)) ||
|
|
2424
|
+
String(left.lot?.name ?? '').localeCompare(String(right.lot?.name ?? '')) ||
|
|
2425
|
+
String(left.quant.id).localeCompare(String(right.quant.id)));
|
|
2426
|
+
const available = positions.reduce((sum, entry) => sum + Number(entry.quant.quantity) - Number(entry.quant.reservedQuantity), 0);
|
|
2427
|
+
return { productId: String(args.productId), available: String(available), positions };
|
|
2428
|
+
},
|
|
2429
|
+
});
|
|
1523
2430
|
//# sourceMappingURL=functions.js.map
|