@ketvietlab/ketsuite 0.1.1
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 +21 -0
- package/README.md +19 -0
- package/dist/index.d.ts +119 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +118 -0
- package/dist/index.js.map +1 -0
- package/dist/modules/account/functions.d.ts +14 -0
- package/dist/modules/account/functions.d.ts.map +1 -0
- package/dist/modules/account/functions.js +1038 -0
- package/dist/modules/account/functions.js.map +1 -0
- package/dist/modules/account/index.d.ts +5 -0
- package/dist/modules/account/index.d.ts.map +1 -0
- package/dist/modules/account/index.js +31 -0
- package/dist/modules/account/index.js.map +1 -0
- package/dist/modules/account/models.d.ts +3 -0
- package/dist/modules/account/models.d.ts.map +1 -0
- package/dist/modules/account/models.js +151 -0
- package/dist/modules/account/models.js.map +1 -0
- package/dist/modules/account/relations.d.ts +3 -0
- package/dist/modules/account/relations.d.ts.map +1 -0
- package/dist/modules/account/relations.js +35 -0
- package/dist/modules/account/relations.js.map +1 -0
- package/dist/modules/account/setup.d.ts +4 -0
- package/dist/modules/account/setup.d.ts.map +1 -0
- package/dist/modules/account/setup.js +179 -0
- package/dist/modules/account/setup.js.map +1 -0
- package/dist/modules/account/tt99.d.ts +30 -0
- package/dist/modules/account/tt99.d.ts.map +1 -0
- package/dist/modules/account/tt99.js +1661 -0
- package/dist/modules/account/tt99.js.map +1 -0
- package/dist/modules/account_activity_backend/index.d.ts +5 -0
- package/dist/modules/account_activity_backend/index.d.ts.map +1 -0
- package/dist/modules/account_activity_backend/index.js +27 -0
- package/dist/modules/account_activity_backend/index.js.map +1 -0
- package/dist/modules/account_backend/accounting-overview-screen.d.ts +18 -0
- package/dist/modules/account_backend/accounting-overview-screen.d.ts.map +1 -0
- package/dist/modules/account_backend/accounting-overview-screen.js +104 -0
- package/dist/modules/account_backend/accounting-overview-screen.js.map +1 -0
- package/dist/modules/account_backend/accounts-screen.d.ts +13 -0
- package/dist/modules/account_backend/accounts-screen.d.ts.map +1 -0
- package/dist/modules/account_backend/accounts-screen.js +49 -0
- package/dist/modules/account_backend/accounts-screen.js.map +1 -0
- package/dist/modules/account_backend/customer-invoices-screen.d.ts +14 -0
- package/dist/modules/account_backend/customer-invoices-screen.d.ts.map +1 -0
- package/dist/modules/account_backend/customer-invoices-screen.js +63 -0
- package/dist/modules/account_backend/customer-invoices-screen.js.map +1 -0
- package/dist/modules/account_backend/general-ledger-screen.d.ts +13 -0
- package/dist/modules/account_backend/general-ledger-screen.d.ts.map +1 -0
- package/dist/modules/account_backend/general-ledger-screen.js +56 -0
- package/dist/modules/account_backend/general-ledger-screen.js.map +1 -0
- package/dist/modules/account_backend/index.d.ts +3 -0
- package/dist/modules/account_backend/index.d.ts.map +1 -0
- package/dist/modules/account_backend/index.js +1516 -0
- package/dist/modules/account_backend/index.js.map +1 -0
- package/dist/modules/account_backend/journal-entries-screen.d.ts +14 -0
- package/dist/modules/account_backend/journal-entries-screen.d.ts.map +1 -0
- package/dist/modules/account_backend/journal-entries-screen.js +45 -0
- package/dist/modules/account_backend/journal-entries-screen.js.map +1 -0
- package/dist/modules/account_backend/journals-screen.d.ts +14 -0
- package/dist/modules/account_backend/journals-screen.d.ts.map +1 -0
- package/dist/modules/account_backend/journals-screen.js +53 -0
- package/dist/modules/account_backend/journals-screen.js.map +1 -0
- package/dist/modules/account_backend/move-detail-screen.d.ts +10 -0
- package/dist/modules/account_backend/move-detail-screen.d.ts.map +1 -0
- package/dist/modules/account_backend/move-detail-screen.js +100 -0
- package/dist/modules/account_backend/move-detail-screen.js.map +1 -0
- package/dist/modules/account_backend/partner-ledger-screen.d.ts +14 -0
- package/dist/modules/account_backend/partner-ledger-screen.d.ts.map +1 -0
- package/dist/modules/account_backend/partner-ledger-screen.js +69 -0
- package/dist/modules/account_backend/partner-ledger-screen.js.map +1 -0
- package/dist/modules/account_backend/payment-terms-screen.d.ts +14 -0
- package/dist/modules/account_backend/payment-terms-screen.d.ts.map +1 -0
- package/dist/modules/account_backend/payment-terms-screen.js +40 -0
- package/dist/modules/account_backend/payment-terms-screen.js.map +1 -0
- package/dist/modules/account_backend/payments-screen.d.ts +14 -0
- package/dist/modules/account_backend/payments-screen.d.ts.map +1 -0
- package/dist/modules/account_backend/payments-screen.js +54 -0
- package/dist/modules/account_backend/payments-screen.js.map +1 -0
- package/dist/modules/account_backend/screens.d.ts +7 -0
- package/dist/modules/account_backend/screens.d.ts.map +1 -0
- package/dist/modules/account_backend/screens.js +7 -0
- package/dist/modules/account_backend/screens.js.map +1 -0
- package/dist/modules/account_backend/taxes-screen.d.ts +15 -0
- package/dist/modules/account_backend/taxes-screen.d.ts.map +1 -0
- package/dist/modules/account_backend/taxes-screen.js +73 -0
- package/dist/modules/account_backend/taxes-screen.js.map +1 -0
- package/dist/modules/account_backend/trial-balance-screen.d.ts +13 -0
- package/dist/modules/account_backend/trial-balance-screen.d.ts.map +1 -0
- package/dist/modules/account_backend/trial-balance-screen.js +62 -0
- package/dist/modules/account_backend/trial-balance-screen.js.map +1 -0
- package/dist/modules/account_backend/vendor-bills-screen.d.ts +14 -0
- package/dist/modules/account_backend/vendor-bills-screen.d.ts.map +1 -0
- package/dist/modules/account_backend/vendor-bills-screen.js +59 -0
- package/dist/modules/account_backend/vendor-bills-screen.js.map +1 -0
- package/dist/modules/account_mail_backend/index.d.ts +5 -0
- package/dist/modules/account_mail_backend/index.d.ts.map +1 -0
- package/dist/modules/account_mail_backend/index.js +28 -0
- package/dist/modules/account_mail_backend/index.js.map +1 -0
- package/dist/modules/account_partner/functions.d.ts +3 -0
- package/dist/modules/account_partner/functions.d.ts.map +1 -0
- package/dist/modules/account_partner/functions.js +85 -0
- package/dist/modules/account_partner/functions.js.map +1 -0
- package/dist/modules/account_partner/index.d.ts +3 -0
- package/dist/modules/account_partner/index.d.ts.map +1 -0
- package/dist/modules/account_partner/index.js +48 -0
- package/dist/modules/account_partner/index.js.map +1 -0
- package/dist/modules/account_partner_backend/index.d.ts +4 -0
- package/dist/modules/account_partner_backend/index.d.ts.map +1 -0
- package/dist/modules/account_partner_backend/index.js +49 -0
- package/dist/modules/account_partner_backend/index.js.map +1 -0
- package/dist/modules/account_partner_backend/routes.d.ts +3 -0
- package/dist/modules/account_partner_backend/routes.d.ts.map +1 -0
- package/dist/modules/account_partner_backend/routes.js +69 -0
- package/dist/modules/account_partner_backend/routes.js.map +1 -0
- package/dist/modules/account_partner_backend/screens.d.ts +16 -0
- package/dist/modules/account_partner_backend/screens.d.ts.map +1 -0
- package/dist/modules/account_partner_backend/screens.js +26 -0
- package/dist/modules/account_partner_backend/screens.js.map +1 -0
- package/dist/modules/activity/functions.d.ts +3 -0
- package/dist/modules/activity/functions.d.ts.map +1 -0
- package/dist/modules/activity/functions.js +250 -0
- package/dist/modules/activity/functions.js.map +1 -0
- package/dist/modules/activity/index.d.ts +9 -0
- package/dist/modules/activity/index.d.ts.map +1 -0
- package/dist/modules/activity/index.js +33 -0
- package/dist/modules/activity/index.js.map +1 -0
- package/dist/modules/activity/models.d.ts +3 -0
- package/dist/modules/activity/models.d.ts.map +1 -0
- package/dist/modules/activity/models.js +81 -0
- package/dist/modules/activity/models.js.map +1 -0
- package/dist/modules/activity/operations.d.ts +39 -0
- package/dist/modules/activity/operations.d.ts.map +1 -0
- package/dist/modules/activity/operations.js +226 -0
- package/dist/modules/activity/operations.js.map +1 -0
- package/dist/modules/activity/relations.d.ts +3 -0
- package/dist/modules/activity/relations.d.ts.map +1 -0
- package/dist/modules/activity/relations.js +24 -0
- package/dist/modules/activity/relations.js.map +1 -0
- package/dist/modules/activity/target.d.ts +4 -0
- package/dist/modules/activity/target.d.ts.map +1 -0
- package/dist/modules/activity/target.js +149 -0
- package/dist/modules/activity/target.js.map +1 -0
- package/dist/modules/activity/types.d.ts +9 -0
- package/dist/modules/activity/types.d.ts.map +1 -0
- package/dist/modules/activity/types.js +5 -0
- package/dist/modules/activity/types.js.map +1 -0
- package/dist/modules/activity_backend/index.d.ts +5 -0
- package/dist/modules/activity_backend/index.d.ts.map +1 -0
- package/dist/modules/activity_backend/index.js +80 -0
- package/dist/modules/activity_backend/index.js.map +1 -0
- package/dist/modules/activity_backend/islands.d.ts +3 -0
- package/dist/modules/activity_backend/islands.d.ts.map +1 -0
- package/dist/modules/activity_backend/islands.js +20 -0
- package/dist/modules/activity_backend/islands.js.map +1 -0
- package/dist/modules/activity_backend/routes.d.ts +5 -0
- package/dist/modules/activity_backend/routes.d.ts.map +1 -0
- package/dist/modules/activity_backend/routes.js +53 -0
- package/dist/modules/activity_backend/routes.js.map +1 -0
- package/dist/modules/activity_backend/screens.d.ts +5 -0
- package/dist/modules/activity_backend/screens.d.ts.map +1 -0
- package/dist/modules/activity_backend/screens.js +52 -0
- package/dist/modules/activity_backend/screens.js.map +1 -0
- package/dist/modules/address/data/VN/NOTICE.md +15 -0
- package/dist/modules/address/data/VN/catalogs/2025-07-01/divisions/0001.json +8002 -0
- package/dist/modules/address/data/VN/catalogs/2025-07-01/divisions/0002.json +8002 -0
- package/dist/modules/address/data/VN/catalogs/2025-07-01/divisions/0003.json +8002 -0
- package/dist/modules/address/data/VN/catalogs/2025-07-01/divisions/0004.json +2842 -0
- package/dist/modules/address/data/VN/catalogs/2025-07-01/manifest.json +77 -0
- package/dist/modules/address/data/VN/catalogs/2025-07-01/policy.json +49 -0
- package/dist/modules/address/data/countries.json +11 -0
- package/dist/modules/address/data/index.json +14 -0
- package/dist/modules/address/format.d.ts +37 -0
- package/dist/modules/address/format.d.ts.map +1 -0
- package/dist/modules/address/format.js +146 -0
- package/dist/modules/address/format.js.map +1 -0
- package/dist/modules/address/functions.d.ts +3 -0
- package/dist/modules/address/functions.d.ts.map +1 -0
- package/dist/modules/address/functions.js +320 -0
- package/dist/modules/address/functions.js.map +1 -0
- package/dist/modules/address/index.d.ts +6 -0
- package/dist/modules/address/index.d.ts.map +1 -0
- package/dist/modules/address/index.js +20 -0
- package/dist/modules/address/index.js.map +1 -0
- package/dist/modules/address/loader.d.ts +74 -0
- package/dist/modules/address/loader.d.ts.map +1 -0
- package/dist/modules/address/loader.js +144 -0
- package/dist/modules/address/loader.js.map +1 -0
- package/dist/modules/address/messages.d.ts +51 -0
- package/dist/modules/address/messages.d.ts.map +1 -0
- package/dist/modules/address/messages.js +51 -0
- package/dist/modules/address/messages.js.map +1 -0
- package/dist/modules/address/models.d.ts +8 -0
- package/dist/modules/address/models.d.ts.map +1 -0
- package/dist/modules/address/models.js +98 -0
- package/dist/modules/address/models.js.map +1 -0
- package/dist/modules/address/relations.d.ts +3 -0
- package/dist/modules/address/relations.d.ts.map +1 -0
- package/dist/modules/address/relations.js +22 -0
- package/dist/modules/address/relations.js.map +1 -0
- package/dist/modules/address_backend/index.d.ts +4 -0
- package/dist/modules/address_backend/index.d.ts.map +1 -0
- package/dist/modules/address_backend/index.js +90 -0
- package/dist/modules/address_backend/index.js.map +1 -0
- package/dist/modules/address_backend/routes.d.ts +3 -0
- package/dist/modules/address_backend/routes.d.ts.map +1 -0
- package/dist/modules/address_backend/routes.js +87 -0
- package/dist/modules/address_backend/routes.js.map +1 -0
- package/dist/modules/address_backend/screens.d.ts +31 -0
- package/dist/modules/address_backend/screens.d.ts.map +1 -0
- package/dist/modules/address_backend/screens.js +147 -0
- package/dist/modules/address_backend/screens.js.map +1 -0
- package/dist/modules/attendance/functions.d.ts +3 -0
- package/dist/modules/attendance/functions.d.ts.map +1 -0
- package/dist/modules/attendance/functions.js +750 -0
- package/dist/modules/attendance/functions.js.map +1 -0
- package/dist/modules/attendance/index.d.ts +5 -0
- package/dist/modules/attendance/index.d.ts.map +1 -0
- package/dist/modules/attendance/index.js +20 -0
- package/dist/modules/attendance/index.js.map +1 -0
- package/dist/modules/attendance/messages.d.ts +41 -0
- package/dist/modules/attendance/messages.d.ts.map +1 -0
- package/dist/modules/attendance/messages.js +41 -0
- package/dist/modules/attendance/messages.js.map +1 -0
- package/dist/modules/attendance/models.d.ts +3 -0
- package/dist/modules/attendance/models.d.ts.map +1 -0
- package/dist/modules/attendance/models.js +158 -0
- package/dist/modules/attendance/models.js.map +1 -0
- package/dist/modules/attendance/relations.d.ts +3 -0
- package/dist/modules/attendance/relations.d.ts.map +1 -0
- package/dist/modules/attendance/relations.js +12 -0
- package/dist/modules/attendance/relations.js.map +1 -0
- package/dist/modules/attendance/types.d.ts +9 -0
- package/dist/modules/attendance/types.d.ts.map +1 -0
- package/dist/modules/attendance/types.js +5 -0
- package/dist/modules/attendance/types.js.map +1 -0
- package/dist/modules/attendance_backend/index.d.ts +4 -0
- package/dist/modules/attendance_backend/index.d.ts.map +1 -0
- package/dist/modules/attendance_backend/index.js +182 -0
- package/dist/modules/attendance_backend/index.js.map +1 -0
- package/dist/modules/attendance_backend/qr.d.ts +2 -0
- package/dist/modules/attendance_backend/qr.d.ts.map +1 -0
- package/dist/modules/attendance_backend/qr.js +120 -0
- package/dist/modules/attendance_backend/qr.js.map +1 -0
- package/dist/modules/attendance_backend/routes.d.ts +3 -0
- package/dist/modules/attendance_backend/routes.d.ts.map +1 -0
- package/dist/modules/attendance_backend/routes.js +131 -0
- package/dist/modules/attendance_backend/routes.js.map +1 -0
- package/dist/modules/attendance_backend/screens.d.ts +10 -0
- package/dist/modules/attendance_backend/screens.d.ts.map +1 -0
- package/dist/modules/attendance_backend/screens.js +227 -0
- package/dist/modules/attendance_backend/screens.js.map +1 -0
- package/dist/modules/backend/catalogue.d.ts +10 -0
- package/dist/modules/backend/catalogue.d.ts.map +1 -0
- package/dist/modules/backend/catalogue.js +615 -0
- package/dist/modules/backend/catalogue.js.map +1 -0
- package/dist/modules/backend/design/HANDOFF.md +356 -0
- package/dist/modules/backend/design/admin.css +4229 -0
- package/dist/modules/backend/design/client/relation-select-view.d.mts +5 -0
- package/dist/modules/backend/design/client/relation-select-view.d.mts.map +1 -0
- package/dist/modules/backend/design/client/relation-select-view.mjs +335 -0
- package/dist/modules/backend/design/client/relation-select-view.mjs.map +1 -0
- package/dist/modules/backend/design/client/relation-select.d.mts +5 -0
- package/dist/modules/backend/design/client/relation-select.d.mts.map +1 -0
- package/dist/modules/backend/design/client/relation-select.mjs +7 -0
- package/dist/modules/backend/design/client/relation-select.mjs.map +1 -0
- package/dist/modules/backend/design/fixtures/product-back.svg +11 -0
- package/dist/modules/backend/design/fixtures/product-front.svg +9 -0
- package/dist/modules/backend/design/screenshots/apps-desktop-dark.png +0 -0
- package/dist/modules/backend/design/screenshots/list-mobile-dark.png +0 -0
- package/dist/modules/backend/design/screenshots/product-list-favorites-desktop-en.png +0 -0
- package/dist/modules/backend/design/screenshots/product-list-filter-desktop-en.png +0 -0
- package/dist/modules/backend/design/screenshots/product-list-filter-mobile-en.png +0 -0
- package/dist/modules/backend/design/screenshots/product-list-grouped-desktop.png +0 -0
- package/dist/modules/backend/design/screenshots/product-list-grouped-mobile.png +0 -0
- package/dist/modules/backend/design/tokens.css +132 -0
- package/dist/modules/backend/forms.d.ts +7 -0
- package/dist/modules/backend/forms.d.ts.map +1 -0
- package/dist/modules/backend/forms.js +25 -0
- package/dist/modules/backend/forms.js.map +1 -0
- package/dist/modules/backend/index.d.ts +24 -0
- package/dist/modules/backend/index.d.ts.map +1 -0
- package/dist/modules/backend/index.js +61 -0
- package/dist/modules/backend/index.js.map +1 -0
- package/dist/modules/backend/islands.d.ts +3 -0
- package/dist/modules/backend/islands.d.ts.map +1 -0
- package/dist/modules/backend/islands.js +13 -0
- package/dist/modules/backend/islands.js.map +1 -0
- package/dist/modules/backend/joints.d.ts +13 -0
- package/dist/modules/backend/joints.d.ts.map +1 -0
- package/dist/modules/backend/joints.js +33 -0
- package/dist/modules/backend/joints.js.map +1 -0
- package/dist/modules/backend/menus.d.ts +3 -0
- package/dist/modules/backend/menus.d.ts.map +1 -0
- package/dist/modules/backend/menus.js +25 -0
- package/dist/modules/backend/menus.js.map +1 -0
- package/dist/modules/backend/messages.d.ts +11 -0
- package/dist/modules/backend/messages.d.ts.map +1 -0
- package/dist/modules/backend/messages.js +161 -0
- package/dist/modules/backend/messages.js.map +1 -0
- package/dist/modules/backend/paging.d.ts +22 -0
- package/dist/modules/backend/paging.d.ts.map +1 -0
- package/dist/modules/backend/paging.js +56 -0
- package/dist/modules/backend/paging.js.map +1 -0
- package/dist/modules/backend/relation-select.d.ts +63 -0
- package/dist/modules/backend/relation-select.d.ts.map +1 -0
- package/dist/modules/backend/relation-select.js +20 -0
- package/dist/modules/backend/relation-select.js.map +1 -0
- package/dist/modules/backend/routes.d.ts +10 -0
- package/dist/modules/backend/routes.d.ts.map +1 -0
- package/dist/modules/backend/routes.js +123 -0
- package/dist/modules/backend/routes.js.map +1 -0
- package/dist/modules/backend/saved-searches.d.ts +4 -0
- package/dist/modules/backend/saved-searches.d.ts.map +1 -0
- package/dist/modules/backend/saved-searches.js +138 -0
- package/dist/modules/backend/saved-searches.js.map +1 -0
- package/dist/modules/backend/screens.d.ts +37 -0
- package/dist/modules/backend/screens.d.ts.map +1 -0
- package/dist/modules/backend/screens.js +107 -0
- package/dist/modules/backend/screens.js.map +1 -0
- package/dist/modules/calendar/functions.d.ts +3 -0
- package/dist/modules/calendar/functions.d.ts.map +1 -0
- package/dist/modules/calendar/functions.js +259 -0
- package/dist/modules/calendar/functions.js.map +1 -0
- package/dist/modules/calendar/index.d.ts +9 -0
- package/dist/modules/calendar/index.d.ts.map +1 -0
- package/dist/modules/calendar/index.js +36 -0
- package/dist/modules/calendar/index.js.map +1 -0
- package/dist/modules/calendar/jobs.d.ts +3 -0
- package/dist/modules/calendar/jobs.d.ts.map +1 -0
- package/dist/modules/calendar/jobs.js +57 -0
- package/dist/modules/calendar/jobs.js.map +1 -0
- package/dist/modules/calendar/models.d.ts +3 -0
- package/dist/modules/calendar/models.d.ts.map +1 -0
- package/dist/modules/calendar/models.js +90 -0
- package/dist/modules/calendar/models.js.map +1 -0
- package/dist/modules/calendar/operations.d.ts +45 -0
- package/dist/modules/calendar/operations.d.ts.map +1 -0
- package/dist/modules/calendar/operations.js +280 -0
- package/dist/modules/calendar/operations.js.map +1 -0
- package/dist/modules/calendar/recurrence.d.ts +28 -0
- package/dist/modules/calendar/recurrence.d.ts.map +1 -0
- package/dist/modules/calendar/recurrence.js +175 -0
- package/dist/modules/calendar/recurrence.js.map +1 -0
- package/dist/modules/calendar/relations.d.ts +3 -0
- package/dist/modules/calendar/relations.d.ts.map +1 -0
- package/dist/modules/calendar/relations.js +22 -0
- package/dist/modules/calendar/relations.js.map +1 -0
- package/dist/modules/calendar/types.d.ts +10 -0
- package/dist/modules/calendar/types.d.ts.map +1 -0
- package/dist/modules/calendar/types.js +6 -0
- package/dist/modules/calendar/types.js.map +1 -0
- package/dist/modules/calendar_activity/index.d.ts +6 -0
- package/dist/modules/calendar_activity/index.d.ts.map +1 -0
- package/dist/modules/calendar_activity/index.js +250 -0
- package/dist/modules/calendar_activity/index.js.map +1 -0
- package/dist/modules/calendar_backend/index.d.ts +5 -0
- package/dist/modules/calendar_backend/index.d.ts.map +1 -0
- package/dist/modules/calendar_backend/index.js +47 -0
- package/dist/modules/calendar_backend/index.js.map +1 -0
- package/dist/modules/calendar_backend/islands.d.ts +3 -0
- package/dist/modules/calendar_backend/islands.d.ts.map +1 -0
- package/dist/modules/calendar_backend/islands.js +12 -0
- package/dist/modules/calendar_backend/islands.js.map +1 -0
- package/dist/modules/calendar_backend/routes.d.ts +3 -0
- package/dist/modules/calendar_backend/routes.d.ts.map +1 -0
- package/dist/modules/calendar_backend/routes.js +43 -0
- package/dist/modules/calendar_backend/routes.js.map +1 -0
- package/dist/modules/calendar_backend/screens.d.ts +5 -0
- package/dist/modules/calendar_backend/screens.d.ts.map +1 -0
- package/dist/modules/calendar_backend/screens.js +4 -0
- package/dist/modules/calendar_backend/screens.js.map +1 -0
- package/dist/modules/calendar_mail_transport/index.d.ts +6 -0
- package/dist/modules/calendar_mail_transport/index.d.ts.map +1 -0
- package/dist/modules/calendar_mail_transport/index.js +138 -0
- package/dist/modules/calendar_mail_transport/index.js.map +1 -0
- package/dist/modules/catalog/index.d.ts +3 -0
- package/dist/modules/catalog/index.d.ts.map +1 -0
- package/dist/modules/catalog/index.js +68 -0
- package/dist/modules/catalog/index.js.map +1 -0
- package/dist/modules/checkout/index.d.ts +3 -0
- package/dist/modules/checkout/index.d.ts.map +1 -0
- package/dist/modules/checkout/index.js +50 -0
- package/dist/modules/checkout/index.js.map +1 -0
- package/dist/modules/company/functions.d.ts +3 -0
- package/dist/modules/company/functions.d.ts.map +1 -0
- package/dist/modules/company/functions.js +337 -0
- package/dist/modules/company/functions.js.map +1 -0
- package/dist/modules/company/index.d.ts +3 -0
- package/dist/modules/company/index.d.ts.map +1 -0
- package/dist/modules/company/index.js +23 -0
- package/dist/modules/company/index.js.map +1 -0
- package/dist/modules/company/messages.d.ts +63 -0
- package/dist/modules/company/messages.d.ts.map +1 -0
- package/dist/modules/company/messages.js +63 -0
- package/dist/modules/company/messages.js.map +1 -0
- package/dist/modules/company/models.d.ts +19 -0
- package/dist/modules/company/models.d.ts.map +1 -0
- package/dist/modules/company/models.js +61 -0
- package/dist/modules/company/models.js.map +1 -0
- package/dist/modules/company/relations.d.ts +3 -0
- package/dist/modules/company/relations.d.ts.map +1 -0
- package/dist/modules/company/relations.js +14 -0
- package/dist/modules/company/relations.js.map +1 -0
- package/dist/modules/company_backend/index.d.ts +5 -0
- package/dist/modules/company_backend/index.d.ts.map +1 -0
- package/dist/modules/company_backend/index.js +136 -0
- package/dist/modules/company_backend/index.js.map +1 -0
- package/dist/modules/company_backend/menus.d.ts +3 -0
- package/dist/modules/company_backend/menus.d.ts.map +1 -0
- package/dist/modules/company_backend/menus.js +17 -0
- package/dist/modules/company_backend/menus.js.map +1 -0
- package/dist/modules/company_backend/routes.d.ts +3 -0
- package/dist/modules/company_backend/routes.d.ts.map +1 -0
- package/dist/modules/company_backend/routes.js +269 -0
- package/dist/modules/company_backend/routes.js.map +1 -0
- package/dist/modules/company_backend/screens.d.ts +62 -0
- package/dist/modules/company_backend/screens.d.ts.map +1 -0
- package/dist/modules/company_backend/screens.js +268 -0
- package/dist/modules/company_backend/screens.js.map +1 -0
- package/dist/modules/crm/functions.d.ts +5 -0
- package/dist/modules/crm/functions.d.ts.map +1 -0
- package/dist/modules/crm/functions.js +840 -0
- package/dist/modules/crm/functions.js.map +1 -0
- package/dist/modules/crm/index.d.ts +6 -0
- package/dist/modules/crm/index.d.ts.map +1 -0
- package/dist/modules/crm/index.js +22 -0
- package/dist/modules/crm/index.js.map +1 -0
- package/dist/modules/crm/jobs.d.ts +4 -0
- package/dist/modules/crm/jobs.d.ts.map +1 -0
- package/dist/modules/crm/jobs.js +3 -0
- package/dist/modules/crm/jobs.js.map +1 -0
- package/dist/modules/crm/messages.d.ts +37 -0
- package/dist/modules/crm/messages.d.ts.map +1 -0
- package/dist/modules/crm/messages.js +68 -0
- package/dist/modules/crm/messages.js.map +1 -0
- package/dist/modules/crm/models.d.ts +3 -0
- package/dist/modules/crm/models.d.ts.map +1 -0
- package/dist/modules/crm/models.js +215 -0
- package/dist/modules/crm/models.js.map +1 -0
- package/dist/modules/crm/operations.d.ts +121 -0
- package/dist/modules/crm/operations.d.ts.map +1 -0
- package/dist/modules/crm/operations.js +744 -0
- package/dist/modules/crm/operations.js.map +1 -0
- package/dist/modules/crm/search.d.ts +67 -0
- package/dist/modules/crm/search.d.ts.map +1 -0
- package/dist/modules/crm/search.js +89 -0
- package/dist/modules/crm/search.js.map +1 -0
- package/dist/modules/crm/types.d.ts +10 -0
- package/dist/modules/crm/types.d.ts.map +1 -0
- package/dist/modules/crm/types.js +6 -0
- package/dist/modules/crm/types.js.map +1 -0
- package/dist/modules/crm_backend/client/crm-kanban-view.d.mts +8 -0
- package/dist/modules/crm_backend/client/crm-kanban-view.d.mts.map +1 -0
- package/dist/modules/crm_backend/client/crm-kanban-view.mjs +129 -0
- package/dist/modules/crm_backend/client/crm-kanban-view.mjs.map +1 -0
- package/dist/modules/crm_backend/client/crm-kanban.d.mts +3 -0
- package/dist/modules/crm_backend/client/crm-kanban.d.mts.map +1 -0
- package/dist/modules/crm_backend/client/crm-kanban.mjs +7 -0
- package/dist/modules/crm_backend/client/crm-kanban.mjs.map +1 -0
- package/dist/modules/crm_backend/client/crm.css +69 -0
- package/dist/modules/crm_backend/index.d.ts +4 -0
- package/dist/modules/crm_backend/index.d.ts.map +1 -0
- package/dist/modules/crm_backend/index.js +54 -0
- package/dist/modules/crm_backend/index.js.map +1 -0
- package/dist/modules/crm_backend/islands.d.ts +9 -0
- package/dist/modules/crm_backend/islands.d.ts.map +1 -0
- package/dist/modules/crm_backend/islands.js +13 -0
- package/dist/modules/crm_backend/islands.js.map +1 -0
- package/dist/modules/crm_backend/list-search.d.ts +21 -0
- package/dist/modules/crm_backend/list-search.d.ts.map +1 -0
- package/dist/modules/crm_backend/list-search.js +220 -0
- package/dist/modules/crm_backend/list-search.js.map +1 -0
- package/dist/modules/crm_backend/messages.d.ts +183 -0
- package/dist/modules/crm_backend/messages.d.ts.map +1 -0
- package/dist/modules/crm_backend/messages.js +182 -0
- package/dist/modules/crm_backend/messages.js.map +1 -0
- package/dist/modules/crm_backend/routes.d.ts +3 -0
- package/dist/modules/crm_backend/routes.d.ts.map +1 -0
- package/dist/modules/crm_backend/routes.js +520 -0
- package/dist/modules/crm_backend/routes.js.map +1 -0
- package/dist/modules/crm_backend/screens.d.ts +32 -0
- package/dist/modules/crm_backend/screens.d.ts.map +1 -0
- package/dist/modules/crm_backend/screens.js +405 -0
- package/dist/modules/crm_backend/screens.js.map +1 -0
- package/dist/modules/crm_sale/index.d.ts +4 -0
- package/dist/modules/crm_sale/index.d.ts.map +1 -0
- package/dist/modules/crm_sale/index.js +18 -0
- package/dist/modules/crm_sale/index.js.map +1 -0
- package/dist/modules/crm_sale/messages.d.ts +10 -0
- package/dist/modules/crm_sale/messages.d.ts.map +1 -0
- package/dist/modules/crm_sale/messages.js +14 -0
- package/dist/modules/crm_sale/messages.js.map +1 -0
- package/dist/modules/crm_sale/models.d.ts +3 -0
- package/dist/modules/crm_sale/models.d.ts.map +1 -0
- package/dist/modules/crm_sale/models.js +16 -0
- package/dist/modules/crm_sale/models.js.map +1 -0
- package/dist/modules/crm_sale/sale-functions.d.ts +15 -0
- package/dist/modules/crm_sale/sale-functions.d.ts.map +1 -0
- package/dist/modules/crm_sale/sale-functions.js +139 -0
- package/dist/modules/crm_sale/sale-functions.js.map +1 -0
- package/dist/modules/crm_website/functions.d.ts +3 -0
- package/dist/modules/crm_website/functions.d.ts.map +1 -0
- package/dist/modules/crm_website/functions.js +65 -0
- package/dist/modules/crm_website/functions.js.map +1 -0
- package/dist/modules/crm_website/index.d.ts +3 -0
- package/dist/modules/crm_website/index.d.ts.map +1 -0
- package/dist/modules/crm_website/index.js +19 -0
- package/dist/modules/crm_website/index.js.map +1 -0
- package/dist/modules/crm_website/messages.d.ts +20 -0
- package/dist/modules/crm_website/messages.d.ts.map +1 -0
- package/dist/modules/crm_website/messages.js +34 -0
- package/dist/modules/crm_website/messages.js.map +1 -0
- package/dist/modules/crm_website/models.d.ts +3 -0
- package/dist/modules/crm_website/models.d.ts.map +1 -0
- package/dist/modules/crm_website/models.js +15 -0
- package/dist/modules/crm_website/models.js.map +1 -0
- package/dist/modules/crm_website/routes.d.ts +3 -0
- package/dist/modules/crm_website/routes.d.ts.map +1 -0
- package/dist/modules/crm_website/routes.js +71 -0
- package/dist/modules/crm_website/routes.js.map +1 -0
- package/dist/modules/crm_website/screens.d.ts +5 -0
- package/dist/modules/crm_website/screens.d.ts.map +1 -0
- package/dist/modules/crm_website/screens.js +15 -0
- package/dist/modules/crm_website/screens.js.map +1 -0
- package/dist/modules/hospitality_core/calendar.d.ts +9 -0
- package/dist/modules/hospitality_core/calendar.d.ts.map +1 -0
- package/dist/modules/hospitality_core/calendar.js +41 -0
- package/dist/modules/hospitality_core/calendar.js.map +1 -0
- package/dist/modules/hospitality_core/content.d.ts +13 -0
- package/dist/modules/hospitality_core/content.d.ts.map +1 -0
- package/dist/modules/hospitality_core/content.js +345 -0
- package/dist/modules/hospitality_core/content.js.map +1 -0
- package/dist/modules/hospitality_core/functions.d.ts +3 -0
- package/dist/modules/hospitality_core/functions.d.ts.map +1 -0
- package/dist/modules/hospitality_core/functions.js +1558 -0
- package/dist/modules/hospitality_core/functions.js.map +1 -0
- package/dist/modules/hospitality_core/housekeeping.d.ts +3 -0
- package/dist/modules/hospitality_core/housekeeping.d.ts.map +1 -0
- package/dist/modules/hospitality_core/housekeeping.js +352 -0
- package/dist/modules/hospitality_core/housekeeping.js.map +1 -0
- package/dist/modules/hospitality_core/index.d.ts +5 -0
- package/dist/modules/hospitality_core/index.d.ts.map +1 -0
- package/dist/modules/hospitality_core/index.js +41 -0
- package/dist/modules/hospitality_core/index.js.map +1 -0
- package/dist/modules/hospitality_core/inventory.d.ts +40 -0
- package/dist/modules/hospitality_core/inventory.d.ts.map +1 -0
- package/dist/modules/hospitality_core/inventory.js +627 -0
- package/dist/modules/hospitality_core/inventory.js.map +1 -0
- package/dist/modules/hospitality_core/menus.d.ts +3 -0
- package/dist/modules/hospitality_core/menus.d.ts.map +1 -0
- package/dist/modules/hospitality_core/menus.js +134 -0
- package/dist/modules/hospitality_core/menus.js.map +1 -0
- package/dist/modules/hospitality_core/messages.d.ts +3 -0
- package/dist/modules/hospitality_core/messages.d.ts.map +1 -0
- package/dist/modules/hospitality_core/messages.js +2011 -0
- package/dist/modules/hospitality_core/messages.js.map +1 -0
- package/dist/modules/hospitality_core/models.d.ts +10 -0
- package/dist/modules/hospitality_core/models.d.ts.map +1 -0
- package/dist/modules/hospitality_core/models.js +657 -0
- package/dist/modules/hospitality_core/models.js.map +1 -0
- package/dist/modules/hospitality_core/night-audit.d.ts +26 -0
- package/dist/modules/hospitality_core/night-audit.d.ts.map +1 -0
- package/dist/modules/hospitality_core/night-audit.js +381 -0
- package/dist/modules/hospitality_core/night-audit.js.map +1 -0
- package/dist/modules/hospitality_core/operations.d.ts +3 -0
- package/dist/modules/hospitality_core/operations.d.ts.map +1 -0
- package/dist/modules/hospitality_core/operations.js +1562 -0
- package/dist/modules/hospitality_core/operations.js.map +1 -0
- package/dist/modules/hospitality_core/relations.d.ts +3 -0
- package/dist/modules/hospitality_core/relations.d.ts.map +1 -0
- package/dist/modules/hospitality_core/relations.js +175 -0
- package/dist/modules/hospitality_core/relations.js.map +1 -0
- package/dist/modules/hospitality_core/routes.d.ts +3 -0
- package/dist/modules/hospitality_core/routes.d.ts.map +1 -0
- package/dist/modules/hospitality_core/routes.js +1556 -0
- package/dist/modules/hospitality_core/routes.js.map +1 -0
- package/dist/modules/hospitality_core/screens.d.ts +763 -0
- package/dist/modules/hospitality_core/screens.d.ts.map +1 -0
- package/dist/modules/hospitality_core/screens.js +4138 -0
- package/dist/modules/hospitality_core/screens.js.map +1 -0
- package/dist/modules/hospitality_core/services.d.ts +9 -0
- package/dist/modules/hospitality_core/services.d.ts.map +1 -0
- package/dist/modules/hospitality_core/services.js +586 -0
- package/dist/modules/hospitality_core/services.js.map +1 -0
- package/dist/modules/hospitality_core/stay-notices.d.ts +11 -0
- package/dist/modules/hospitality_core/stay-notices.d.ts.map +1 -0
- package/dist/modules/hospitality_core/stay-notices.js +338 -0
- package/dist/modules/hospitality_core/stay-notices.js.map +1 -0
- package/dist/modules/hospitality_core/types.d.ts +61 -0
- package/dist/modules/hospitality_core/types.d.ts.map +1 -0
- package/dist/modules/hospitality_core/types.js +65 -0
- package/dist/modules/hospitality_core/types.js.map +1 -0
- package/dist/modules/hr/functions.d.ts +3 -0
- package/dist/modules/hr/functions.d.ts.map +1 -0
- package/dist/modules/hr/functions.js +711 -0
- package/dist/modules/hr/functions.js.map +1 -0
- package/dist/modules/hr/index.d.ts +5 -0
- package/dist/modules/hr/index.d.ts.map +1 -0
- package/dist/modules/hr/index.js +20 -0
- package/dist/modules/hr/index.js.map +1 -0
- package/dist/modules/hr/messages.d.ts +45 -0
- package/dist/modules/hr/messages.d.ts.map +1 -0
- package/dist/modules/hr/messages.js +45 -0
- package/dist/modules/hr/messages.js.map +1 -0
- package/dist/modules/hr/models.d.ts +3 -0
- package/dist/modules/hr/models.d.ts.map +1 -0
- package/dist/modules/hr/models.js +166 -0
- package/dist/modules/hr/models.js.map +1 -0
- package/dist/modules/hr/relations.d.ts +3 -0
- package/dist/modules/hr/relations.d.ts.map +1 -0
- package/dist/modules/hr/relations.js +19 -0
- package/dist/modules/hr/relations.js.map +1 -0
- package/dist/modules/hr/types.d.ts +9 -0
- package/dist/modules/hr/types.d.ts.map +1 -0
- package/dist/modules/hr/types.js +5 -0
- package/dist/modules/hr/types.js.map +1 -0
- package/dist/modules/hr_backend/index.d.ts +4 -0
- package/dist/modules/hr_backend/index.d.ts.map +1 -0
- package/dist/modules/hr_backend/index.js +142 -0
- package/dist/modules/hr_backend/index.js.map +1 -0
- package/dist/modules/hr_backend/routes.d.ts +3 -0
- package/dist/modules/hr_backend/routes.d.ts.map +1 -0
- package/dist/modules/hr_backend/routes.js +83 -0
- package/dist/modules/hr_backend/routes.js.map +1 -0
- package/dist/modules/hr_backend/screens.d.ts +9 -0
- package/dist/modules/hr_backend/screens.d.ts.map +1 -0
- package/dist/modules/hr_backend/screens.js +144 -0
- package/dist/modules/hr_backend/screens.js.map +1 -0
- package/dist/modules/inventory/index.d.ts +3 -0
- package/dist/modules/inventory/index.d.ts.map +1 -0
- package/dist/modules/inventory/index.js +31 -0
- package/dist/modules/inventory/index.js.map +1 -0
- package/dist/modules/loyalty/admin-functions.d.ts +3 -0
- package/dist/modules/loyalty/admin-functions.d.ts.map +1 -0
- package/dist/modules/loyalty/admin-functions.js +692 -0
- package/dist/modules/loyalty/admin-functions.js.map +1 -0
- package/dist/modules/loyalty/engine.d.ts +31 -0
- package/dist/modules/loyalty/engine.d.ts.map +1 -0
- package/dist/modules/loyalty/engine.js +412 -0
- package/dist/modules/loyalty/engine.js.map +1 -0
- package/dist/modules/loyalty/index.d.ts +5 -0
- package/dist/modules/loyalty/index.d.ts.map +1 -0
- package/dist/modules/loyalty/index.js +24 -0
- package/dist/modules/loyalty/index.js.map +1 -0
- package/dist/modules/loyalty/jobs.d.ts +4 -0
- package/dist/modules/loyalty/jobs.d.ts.map +1 -0
- package/dist/modules/loyalty/jobs.js +103 -0
- package/dist/modules/loyalty/jobs.js.map +1 -0
- package/dist/modules/loyalty/ledger.d.ts +48 -0
- package/dist/modules/loyalty/ledger.d.ts.map +1 -0
- package/dist/modules/loyalty/ledger.js +164 -0
- package/dist/modules/loyalty/ledger.js.map +1 -0
- package/dist/modules/loyalty/membership-functions.d.ts +4 -0
- package/dist/modules/loyalty/membership-functions.d.ts.map +1 -0
- package/dist/modules/loyalty/membership-functions.js +163 -0
- package/dist/modules/loyalty/membership-functions.js.map +1 -0
- package/dist/modules/loyalty/messages.d.ts +119 -0
- package/dist/modules/loyalty/messages.d.ts.map +1 -0
- package/dist/modules/loyalty/messages.js +119 -0
- package/dist/modules/loyalty/messages.js.map +1 -0
- package/dist/modules/loyalty/models.d.ts +3 -0
- package/dist/modules/loyalty/models.d.ts.map +1 -0
- package/dist/modules/loyalty/models.js +259 -0
- package/dist/modules/loyalty/models.js.map +1 -0
- package/dist/modules/loyalty/order-functions.d.ts +3 -0
- package/dist/modules/loyalty/order-functions.d.ts.map +1 -0
- package/dist/modules/loyalty/order-functions.js +656 -0
- package/dist/modules/loyalty/order-functions.js.map +1 -0
- package/dist/modules/loyalty/relations.d.ts +3 -0
- package/dist/modules/loyalty/relations.d.ts.map +1 -0
- package/dist/modules/loyalty/relations.js +19 -0
- package/dist/modules/loyalty/relations.js.map +1 -0
- package/dist/modules/loyalty/types.d.ts +83 -0
- package/dist/modules/loyalty/types.d.ts.map +1 -0
- package/dist/modules/loyalty/types.js +23 -0
- package/dist/modules/loyalty/types.js.map +1 -0
- package/dist/modules/loyalty_backend/index.d.ts +3 -0
- package/dist/modules/loyalty_backend/index.d.ts.map +1 -0
- package/dist/modules/loyalty_backend/index.js +636 -0
- package/dist/modules/loyalty_backend/index.js.map +1 -0
- package/dist/modules/loyalty_backend/messages.d.ts +162 -0
- package/dist/modules/loyalty_backend/messages.d.ts.map +1 -0
- package/dist/modules/loyalty_backend/messages.js +318 -0
- package/dist/modules/loyalty_backend/messages.js.map +1 -0
- package/dist/modules/loyalty_backend/screens.d.ts +33 -0
- package/dist/modules/loyalty_backend/screens.d.ts.map +1 -0
- package/dist/modules/loyalty_backend/screens.js +562 -0
- package/dist/modules/loyalty_backend/screens.js.map +1 -0
- package/dist/modules/loyalty_pos/functions.d.ts +19 -0
- package/dist/modules/loyalty_pos/functions.d.ts.map +1 -0
- package/dist/modules/loyalty_pos/functions.js +274 -0
- package/dist/modules/loyalty_pos/functions.js.map +1 -0
- package/dist/modules/loyalty_pos/index.d.ts +3 -0
- package/dist/modules/loyalty_pos/index.d.ts.map +1 -0
- package/dist/modules/loyalty_pos/index.js +45 -0
- package/dist/modules/loyalty_pos/index.js.map +1 -0
- package/dist/modules/loyalty_sale/functions.d.ts +19 -0
- package/dist/modules/loyalty_sale/functions.d.ts.map +1 -0
- package/dist/modules/loyalty_sale/functions.js +275 -0
- package/dist/modules/loyalty_sale/functions.js.map +1 -0
- package/dist/modules/loyalty_sale/index.d.ts +3 -0
- package/dist/modules/loyalty_sale/index.d.ts.map +1 -0
- package/dist/modules/loyalty_sale/index.js +45 -0
- package/dist/modules/loyalty_sale/index.js.map +1 -0
- package/dist/modules/mail/functions.d.ts +3 -0
- package/dist/modules/mail/functions.d.ts.map +1 -0
- package/dist/modules/mail/functions.js +129 -0
- package/dist/modules/mail/functions.js.map +1 -0
- package/dist/modules/mail/index.d.ts +9 -0
- package/dist/modules/mail/index.d.ts.map +1 -0
- package/dist/modules/mail/index.js +22 -0
- package/dist/modules/mail/index.js.map +1 -0
- package/dist/modules/mail/messages.d.ts +13 -0
- package/dist/modules/mail/messages.d.ts.map +1 -0
- package/dist/modules/mail/messages.js +13 -0
- package/dist/modules/mail/messages.js.map +1 -0
- package/dist/modules/mail/models.d.ts +3 -0
- package/dist/modules/mail/models.d.ts.map +1 -0
- package/dist/modules/mail/models.js +124 -0
- package/dist/modules/mail/models.js.map +1 -0
- package/dist/modules/mail/operations.d.ts +60 -0
- package/dist/modules/mail/operations.d.ts.map +1 -0
- package/dist/modules/mail/operations.js +249 -0
- package/dist/modules/mail/operations.js.map +1 -0
- package/dist/modules/mail/relations.d.ts +3 -0
- package/dist/modules/mail/relations.d.ts.map +1 -0
- package/dist/modules/mail/relations.js +41 -0
- package/dist/modules/mail/relations.js.map +1 -0
- package/dist/modules/mail/target.d.ts +16 -0
- package/dist/modules/mail/target.d.ts.map +1 -0
- package/dist/modules/mail/target.js +245 -0
- package/dist/modules/mail/target.js.map +1 -0
- package/dist/modules/mail/types.d.ts +7 -0
- package/dist/modules/mail/types.d.ts.map +1 -0
- package/dist/modules/mail/types.js +4 -0
- package/dist/modules/mail/types.js.map +1 -0
- package/dist/modules/mail_backend/index.d.ts +5 -0
- package/dist/modules/mail_backend/index.d.ts.map +1 -0
- package/dist/modules/mail_backend/index.js +56 -0
- package/dist/modules/mail_backend/index.js.map +1 -0
- package/dist/modules/mail_backend/islands.d.ts +3 -0
- package/dist/modules/mail_backend/islands.d.ts.map +1 -0
- package/dist/modules/mail_backend/islands.js +20 -0
- package/dist/modules/mail_backend/islands.js.map +1 -0
- package/dist/modules/mail_backend/routes.d.ts +5 -0
- package/dist/modules/mail_backend/routes.d.ts.map +1 -0
- package/dist/modules/mail_backend/routes.js +37 -0
- package/dist/modules/mail_backend/routes.js.map +1 -0
- package/dist/modules/mail_backend/screens.d.ts +5 -0
- package/dist/modules/mail_backend/screens.d.ts.map +1 -0
- package/dist/modules/mail_backend/screens.js +11 -0
- package/dist/modules/mail_backend/screens.js.map +1 -0
- package/dist/modules/mail_inbound/functions.d.ts +27 -0
- package/dist/modules/mail_inbound/functions.d.ts.map +1 -0
- package/dist/modules/mail_inbound/functions.js +178 -0
- package/dist/modules/mail_inbound/functions.js.map +1 -0
- package/dist/modules/mail_inbound/index.d.ts +10 -0
- package/dist/modules/mail_inbound/index.d.ts.map +1 -0
- package/dist/modules/mail_inbound/index.js +38 -0
- package/dist/modules/mail_inbound/index.js.map +1 -0
- package/dist/modules/mail_inbound/jobs.d.ts +3 -0
- package/dist/modules/mail_inbound/jobs.d.ts.map +1 -0
- package/dist/modules/mail_inbound/jobs.js +29 -0
- package/dist/modules/mail_inbound/jobs.js.map +1 -0
- package/dist/modules/mail_inbound/models.d.ts +3 -0
- package/dist/modules/mail_inbound/models.d.ts.map +1 -0
- package/dist/modules/mail_inbound/models.js +68 -0
- package/dist/modules/mail_inbound/models.js.map +1 -0
- package/dist/modules/mail_inbound/operations.d.ts +17 -0
- package/dist/modules/mail_inbound/operations.d.ts.map +1 -0
- package/dist/modules/mail_inbound/operations.js +273 -0
- package/dist/modules/mail_inbound/operations.js.map +1 -0
- package/dist/modules/mail_inbound/relations.d.ts +3 -0
- package/dist/modules/mail_inbound/relations.d.ts.map +1 -0
- package/dist/modules/mail_inbound/relations.js +19 -0
- package/dist/modules/mail_inbound/relations.js.map +1 -0
- package/dist/modules/mail_inbound/routes.d.ts +4 -0
- package/dist/modules/mail_inbound/routes.d.ts.map +1 -0
- package/dist/modules/mail_inbound/routes.js +156 -0
- package/dist/modules/mail_inbound/routes.js.map +1 -0
- package/dist/modules/mail_inbound/types.d.ts +37 -0
- package/dist/modules/mail_inbound/types.d.ts.map +1 -0
- package/dist/modules/mail_inbound/types.js +3 -0
- package/dist/modules/mail_inbound/types.js.map +1 -0
- package/dist/modules/mail_inbound_backend/index.d.ts +5 -0
- package/dist/modules/mail_inbound_backend/index.d.ts.map +1 -0
- package/dist/modules/mail_inbound_backend/index.js +59 -0
- package/dist/modules/mail_inbound_backend/index.js.map +1 -0
- package/dist/modules/mail_inbound_backend/routes.d.ts +5 -0
- package/dist/modules/mail_inbound_backend/routes.d.ts.map +1 -0
- package/dist/modules/mail_inbound_backend/routes.js +31 -0
- package/dist/modules/mail_inbound_backend/routes.js.map +1 -0
- package/dist/modules/mail_inbound_backend/screens.d.ts +5 -0
- package/dist/modules/mail_inbound_backend/screens.d.ts.map +1 -0
- package/dist/modules/mail_inbound_backend/screens.js +25 -0
- package/dist/modules/mail_inbound_backend/screens.js.map +1 -0
- package/dist/modules/mail_transport/functions.d.ts +3 -0
- package/dist/modules/mail_transport/functions.d.ts.map +1 -0
- package/dist/modules/mail_transport/functions.js +280 -0
- package/dist/modules/mail_transport/functions.js.map +1 -0
- package/dist/modules/mail_transport/index.d.ts +11 -0
- package/dist/modules/mail_transport/index.d.ts.map +1 -0
- package/dist/modules/mail_transport/index.js +37 -0
- package/dist/modules/mail_transport/index.js.map +1 -0
- package/dist/modules/mail_transport/jobs.d.ts +3 -0
- package/dist/modules/mail_transport/jobs.d.ts.map +1 -0
- package/dist/modules/mail_transport/jobs.js +79 -0
- package/dist/modules/mail_transport/jobs.js.map +1 -0
- package/dist/modules/mail_transport/models.d.ts +3 -0
- package/dist/modules/mail_transport/models.d.ts.map +1 -0
- package/dist/modules/mail_transport/models.js +88 -0
- package/dist/modules/mail_transport/models.js.map +1 -0
- package/dist/modules/mail_transport/operations.d.ts +16 -0
- package/dist/modules/mail_transport/operations.d.ts.map +1 -0
- package/dist/modules/mail_transport/operations.js +122 -0
- package/dist/modules/mail_transport/operations.js.map +1 -0
- package/dist/modules/mail_transport/relations.d.ts +3 -0
- package/dist/modules/mail_transport/relations.d.ts.map +1 -0
- package/dist/modules/mail_transport/relations.js +19 -0
- package/dist/modules/mail_transport/relations.js.map +1 -0
- package/dist/modules/mail_transport/target.d.ts +8 -0
- package/dist/modules/mail_transport/target.d.ts.map +1 -0
- package/dist/modules/mail_transport/target.js +43 -0
- package/dist/modules/mail_transport/target.js.map +1 -0
- package/dist/modules/mail_transport/template.d.ts +4 -0
- package/dist/modules/mail_transport/template.d.ts.map +1 -0
- package/dist/modules/mail_transport/template.js +52 -0
- package/dist/modules/mail_transport/template.js.map +1 -0
- package/dist/modules/mail_transport/types.d.ts +9 -0
- package/dist/modules/mail_transport/types.d.ts.map +1 -0
- package/dist/modules/mail_transport/types.js +3 -0
- package/dist/modules/mail_transport/types.js.map +1 -0
- package/dist/modules/mail_transport_backend/index.d.ts +5 -0
- package/dist/modules/mail_transport_backend/index.d.ts.map +1 -0
- package/dist/modules/mail_transport_backend/index.js +69 -0
- package/dist/modules/mail_transport_backend/index.js.map +1 -0
- package/dist/modules/mail_transport_backend/routes.d.ts +5 -0
- package/dist/modules/mail_transport_backend/routes.d.ts.map +1 -0
- package/dist/modules/mail_transport_backend/routes.js +42 -0
- package/dist/modules/mail_transport_backend/routes.js.map +1 -0
- package/dist/modules/mail_transport_backend/screens.d.ts +5 -0
- package/dist/modules/mail_transport_backend/screens.d.ts.map +1 -0
- package/dist/modules/mail_transport_backend/screens.js +35 -0
- package/dist/modules/mail_transport_backend/screens.js.map +1 -0
- package/dist/modules/oauth/functions.d.ts +3 -0
- package/dist/modules/oauth/functions.d.ts.map +1 -0
- package/dist/modules/oauth/functions.js +817 -0
- package/dist/modules/oauth/functions.js.map +1 -0
- package/dist/modules/oauth/index.d.ts +4 -0
- package/dist/modules/oauth/index.d.ts.map +1 -0
- package/dist/modules/oauth/index.js +22 -0
- package/dist/modules/oauth/index.js.map +1 -0
- package/dist/modules/oauth/messages.d.ts +129 -0
- package/dist/modules/oauth/messages.d.ts.map +1 -0
- package/dist/modules/oauth/messages.js +129 -0
- package/dist/modules/oauth/messages.js.map +1 -0
- package/dist/modules/oauth/models.d.ts +4 -0
- package/dist/modules/oauth/models.d.ts.map +1 -0
- package/dist/modules/oauth/models.js +83 -0
- package/dist/modules/oauth/models.js.map +1 -0
- package/dist/modules/oauth/protocol.d.ts +54 -0
- package/dist/modules/oauth/protocol.d.ts.map +1 -0
- package/dist/modules/oauth/protocol.js +309 -0
- package/dist/modules/oauth/protocol.js.map +1 -0
- package/dist/modules/oauth/relations.d.ts +3 -0
- package/dist/modules/oauth/relations.d.ts.map +1 -0
- package/dist/modules/oauth/relations.js +18 -0
- package/dist/modules/oauth/relations.js.map +1 -0
- package/dist/modules/oauth/routes.d.ts +3 -0
- package/dist/modules/oauth/routes.d.ts.map +1 -0
- package/dist/modules/oauth/routes.js +185 -0
- package/dist/modules/oauth/routes.js.map +1 -0
- package/dist/modules/oauth_backend/index.d.ts +4 -0
- package/dist/modules/oauth_backend/index.d.ts.map +1 -0
- package/dist/modules/oauth_backend/index.js +23 -0
- package/dist/modules/oauth_backend/index.js.map +1 -0
- package/dist/modules/oauth_backend/menus.d.ts +3 -0
- package/dist/modules/oauth_backend/menus.d.ts.map +1 -0
- package/dist/modules/oauth_backend/menus.js +17 -0
- package/dist/modules/oauth_backend/menus.js.map +1 -0
- package/dist/modules/oauth_backend/messages.d.ts +169 -0
- package/dist/modules/oauth_backend/messages.d.ts.map +1 -0
- package/dist/modules/oauth_backend/messages.js +169 -0
- package/dist/modules/oauth_backend/messages.js.map +1 -0
- package/dist/modules/oauth_backend/routes.d.ts +3 -0
- package/dist/modules/oauth_backend/routes.d.ts.map +1 -0
- package/dist/modules/oauth_backend/routes.js +231 -0
- package/dist/modules/oauth_backend/routes.js.map +1 -0
- package/dist/modules/oauth_backend/screens.d.ts +66 -0
- package/dist/modules/oauth_backend/screens.d.ts.map +1 -0
- package/dist/modules/oauth_backend/screens.js +323 -0
- package/dist/modules/oauth_backend/screens.js.map +1 -0
- package/dist/modules/odoo_collaboration_import/functions.d.ts +3 -0
- package/dist/modules/odoo_collaboration_import/functions.d.ts.map +1 -0
- package/dist/modules/odoo_collaboration_import/functions.js +128 -0
- package/dist/modules/odoo_collaboration_import/functions.js.map +1 -0
- package/dist/modules/odoo_collaboration_import/index.d.ts +6 -0
- package/dist/modules/odoo_collaboration_import/index.d.ts.map +1 -0
- package/dist/modules/odoo_collaboration_import/index.js +31 -0
- package/dist/modules/odoo_collaboration_import/index.js.map +1 -0
- package/dist/modules/odoo_collaboration_import/models.d.ts +3 -0
- package/dist/modules/odoo_collaboration_import/models.d.ts.map +1 -0
- package/dist/modules/odoo_collaboration_import/models.js +76 -0
- package/dist/modules/odoo_collaboration_import/models.js.map +1 -0
- package/dist/modules/odoo_collaboration_import/operations.d.ts +14 -0
- package/dist/modules/odoo_collaboration_import/operations.d.ts.map +1 -0
- package/dist/modules/odoo_collaboration_import/operations.js +1139 -0
- package/dist/modules/odoo_collaboration_import/operations.js.map +1 -0
- package/dist/modules/odoo_collaboration_import/relations.d.ts +3 -0
- package/dist/modules/odoo_collaboration_import/relations.d.ts.map +1 -0
- package/dist/modules/odoo_collaboration_import/relations.js +19 -0
- package/dist/modules/odoo_collaboration_import/relations.js.map +1 -0
- package/dist/modules/odoo_collaboration_import/types.d.ts +58 -0
- package/dist/modules/odoo_collaboration_import/types.d.ts.map +1 -0
- package/dist/modules/odoo_collaboration_import/types.js +2 -0
- package/dist/modules/odoo_collaboration_import/types.js.map +1 -0
- package/dist/modules/partner/functions.d.ts +5 -0
- package/dist/modules/partner/functions.d.ts.map +1 -0
- package/dist/modules/partner/functions.js +563 -0
- package/dist/modules/partner/functions.js.map +1 -0
- package/dist/modules/partner/index.d.ts +5 -0
- package/dist/modules/partner/index.d.ts.map +1 -0
- package/dist/modules/partner/index.js +23 -0
- package/dist/modules/partner/index.js.map +1 -0
- package/dist/modules/partner/messages.d.ts +55 -0
- package/dist/modules/partner/messages.d.ts.map +1 -0
- package/dist/modules/partner/messages.js +55 -0
- package/dist/modules/partner/messages.js.map +1 -0
- package/dist/modules/partner/models.d.ts +23 -0
- package/dist/modules/partner/models.d.ts.map +1 -0
- package/dist/modules/partner/models.js +124 -0
- package/dist/modules/partner/models.js.map +1 -0
- package/dist/modules/partner/relations.d.ts +4 -0
- package/dist/modules/partner/relations.d.ts.map +1 -0
- package/dist/modules/partner/relations.js +35 -0
- package/dist/modules/partner/relations.js.map +1 -0
- package/dist/modules/partner/types.d.ts +17 -0
- package/dist/modules/partner/types.d.ts.map +1 -0
- package/dist/modules/partner/types.js +14 -0
- package/dist/modules/partner/types.js.map +1 -0
- package/dist/modules/partner/views.d.ts +4 -0
- package/dist/modules/partner/views.d.ts.map +1 -0
- package/dist/modules/partner/views.js +19 -0
- package/dist/modules/partner/views.js.map +1 -0
- package/dist/modules/partner_backend/client/address-view.d.mts +5 -0
- package/dist/modules/partner_backend/client/address-view.d.mts.map +1 -0
- package/dist/modules/partner_backend/client/address-view.mjs +193 -0
- package/dist/modules/partner_backend/client/address-view.mjs.map +1 -0
- package/dist/modules/partner_backend/client/address.css +12 -0
- package/dist/modules/partner_backend/client/address.d.mts +5 -0
- package/dist/modules/partner_backend/client/address.d.mts.map +1 -0
- package/dist/modules/partner_backend/client/address.mjs +7 -0
- package/dist/modules/partner_backend/client/address.mjs.map +1 -0
- package/dist/modules/partner_backend/index.d.ts +5 -0
- package/dist/modules/partner_backend/index.d.ts.map +1 -0
- package/dist/modules/partner_backend/index.js +178 -0
- package/dist/modules/partner_backend/index.js.map +1 -0
- package/dist/modules/partner_backend/islands.d.ts +3 -0
- package/dist/modules/partner_backend/islands.d.ts.map +1 -0
- package/dist/modules/partner_backend/islands.js +23 -0
- package/dist/modules/partner_backend/islands.js.map +1 -0
- package/dist/modules/partner_backend/menus.d.ts +3 -0
- package/dist/modules/partner_backend/menus.d.ts.map +1 -0
- package/dist/modules/partner_backend/menus.js +11 -0
- package/dist/modules/partner_backend/menus.js.map +1 -0
- package/dist/modules/partner_backend/relation-control.d.ts +22 -0
- package/dist/modules/partner_backend/relation-control.d.ts.map +1 -0
- package/dist/modules/partner_backend/relation-control.js +46 -0
- package/dist/modules/partner_backend/relation-control.js.map +1 -0
- package/dist/modules/partner_backend/routes.d.ts +3 -0
- package/dist/modules/partner_backend/routes.d.ts.map +1 -0
- package/dist/modules/partner_backend/routes.js +300 -0
- package/dist/modules/partner_backend/routes.js.map +1 -0
- package/dist/modules/partner_backend/screens.d.ts +53 -0
- package/dist/modules/partner_backend/screens.d.ts.map +1 -0
- package/dist/modules/partner_backend/screens.js +169 -0
- package/dist/modules/partner_backend/screens.js.map +1 -0
- package/dist/modules/pos/functions.d.ts +6 -0
- package/dist/modules/pos/functions.d.ts.map +1 -0
- package/dist/modules/pos/functions.js +953 -0
- package/dist/modules/pos/functions.js.map +1 -0
- package/dist/modules/pos/index.d.ts +4 -0
- package/dist/modules/pos/index.d.ts.map +1 -0
- package/dist/modules/pos/index.js +34 -0
- package/dist/modules/pos/index.js.map +1 -0
- package/dist/modules/pos/models.d.ts +3 -0
- package/dist/modules/pos/models.d.ts.map +1 -0
- package/dist/modules/pos/models.js +107 -0
- package/dist/modules/pos/models.js.map +1 -0
- package/dist/modules/pos/relations.d.ts +3 -0
- package/dist/modules/pos/relations.d.ts.map +1 -0
- package/dist/modules/pos/relations.js +37 -0
- package/dist/modules/pos/relations.js.map +1 -0
- package/dist/modules/pos_backend/index.d.ts +3 -0
- package/dist/modules/pos_backend/index.d.ts.map +1 -0
- package/dist/modules/pos_backend/index.js +654 -0
- package/dist/modules/pos_backend/index.js.map +1 -0
- package/dist/modules/pos_backend/screens.d.ts +15 -0
- package/dist/modules/pos_backend/screens.d.ts.map +1 -0
- package/dist/modules/pos_backend/screens.js +320 -0
- package/dist/modules/pos_backend/screens.js.map +1 -0
- package/dist/modules/pricing/functions.d.ts +6 -0
- package/dist/modules/pricing/functions.d.ts.map +1 -0
- package/dist/modules/pricing/functions.js +318 -0
- package/dist/modules/pricing/functions.js.map +1 -0
- package/dist/modules/pricing/index.d.ts +4 -0
- package/dist/modules/pricing/index.d.ts.map +1 -0
- package/dist/modules/pricing/index.js +30 -0
- package/dist/modules/pricing/index.js.map +1 -0
- package/dist/modules/pricing/models.d.ts +3 -0
- package/dist/modules/pricing/models.d.ts.map +1 -0
- package/dist/modules/pricing/models.js +34 -0
- package/dist/modules/pricing/models.js.map +1 -0
- package/dist/modules/pricing/relations.d.ts +3 -0
- package/dist/modules/pricing/relations.d.ts.map +1 -0
- package/dist/modules/pricing/relations.js +11 -0
- package/dist/modules/pricing/relations.js.map +1 -0
- package/dist/modules/pricing_backend/index.d.ts +3 -0
- package/dist/modules/pricing_backend/index.d.ts.map +1 -0
- package/dist/modules/pricing_backend/index.js +241 -0
- package/dist/modules/pricing_backend/index.js.map +1 -0
- package/dist/modules/pricing_backend/screens.d.ts +13 -0
- package/dist/modules/pricing_backend/screens.d.ts.map +1 -0
- package/dist/modules/pricing_backend/screens.js +182 -0
- package/dist/modules/pricing_backend/screens.js.map +1 -0
- package/dist/modules/product/functions.d.ts +3 -0
- package/dist/modules/product/functions.d.ts.map +1 -0
- package/dist/modules/product/functions.js +627 -0
- package/dist/modules/product/functions.js.map +1 -0
- package/dist/modules/product/index.d.ts +6 -0
- package/dist/modules/product/index.d.ts.map +1 -0
- package/dist/modules/product/index.js +24 -0
- package/dist/modules/product/index.js.map +1 -0
- package/dist/modules/product/messages.d.ts +3 -0
- package/dist/modules/product/messages.d.ts.map +1 -0
- package/dist/modules/product/messages.js +19 -0
- package/dist/modules/product/messages.js.map +1 -0
- package/dist/modules/product/models.d.ts +11 -0
- package/dist/modules/product/models.d.ts.map +1 -0
- package/dist/modules/product/models.js +116 -0
- package/dist/modules/product/models.js.map +1 -0
- package/dist/modules/product/relations.d.ts +8 -0
- package/dist/modules/product/relations.d.ts.map +1 -0
- package/dist/modules/product/relations.js +53 -0
- package/dist/modules/product/relations.js.map +1 -0
- package/dist/modules/product/search.d.ts +73 -0
- package/dist/modules/product/search.d.ts.map +1 -0
- package/dist/modules/product/search.js +66 -0
- package/dist/modules/product/search.js.map +1 -0
- package/dist/modules/product/types.d.ts +14 -0
- package/dist/modules/product/types.d.ts.map +1 -0
- package/dist/modules/product/types.js +2 -0
- package/dist/modules/product/types.js.map +1 -0
- package/dist/modules/product/views.d.ts +4 -0
- package/dist/modules/product/views.d.ts.map +1 -0
- package/dist/modules/product/views.js +7 -0
- package/dist/modules/product/views.js.map +1 -0
- package/dist/modules/product_activity_backend/index.d.ts +5 -0
- package/dist/modules/product_activity_backend/index.d.ts.map +1 -0
- package/dist/modules/product_activity_backend/index.js +29 -0
- package/dist/modules/product_activity_backend/index.js.map +1 -0
- package/dist/modules/product_backend/attributes-screen.d.ts +7 -0
- package/dist/modules/product_backend/attributes-screen.d.ts.map +1 -0
- package/dist/modules/product_backend/attributes-screen.js +76 -0
- package/dist/modules/product_backend/attributes-screen.js.map +1 -0
- package/dist/modules/product_backend/client/editor-view.d.mts +5 -0
- package/dist/modules/product_backend/client/editor-view.d.mts.map +1 -0
- package/dist/modules/product_backend/client/editor-view.mjs +141 -0
- package/dist/modules/product_backend/client/editor-view.mjs.map +1 -0
- package/dist/modules/product_backend/client/product.d.mts +6 -0
- package/dist/modules/product_backend/client/product.d.mts.map +1 -0
- package/dist/modules/product_backend/client/product.mjs +8 -0
- package/dist/modules/product_backend/client/product.mjs.map +1 -0
- package/dist/modules/product_backend/create-screen.d.ts +12 -0
- package/dist/modules/product_backend/create-screen.d.ts.map +1 -0
- package/dist/modules/product_backend/create-screen.js +83 -0
- package/dist/modules/product_backend/create-screen.js.map +1 -0
- package/dist/modules/product_backend/index.d.ts +20 -0
- package/dist/modules/product_backend/index.d.ts.map +1 -0
- package/dist/modules/product_backend/index.js +287 -0
- package/dist/modules/product_backend/index.js.map +1 -0
- package/dist/modules/product_backend/islands.d.ts +3 -0
- package/dist/modules/product_backend/islands.d.ts.map +1 -0
- package/dist/modules/product_backend/islands.js +13 -0
- package/dist/modules/product_backend/islands.js.map +1 -0
- package/dist/modules/product_backend/menus.d.ts +3 -0
- package/dist/modules/product_backend/menus.d.ts.map +1 -0
- package/dist/modules/product_backend/menus.js +25 -0
- package/dist/modules/product_backend/menus.js.map +1 -0
- package/dist/modules/product_backend/routes.d.ts +14 -0
- package/dist/modules/product_backend/routes.d.ts.map +1 -0
- package/dist/modules/product_backend/routes.js +990 -0
- package/dist/modules/product_backend/routes.js.map +1 -0
- package/dist/modules/product_backend/screens.d.ts +68 -0
- package/dist/modules/product_backend/screens.d.ts.map +1 -0
- package/dist/modules/product_backend/screens.js +388 -0
- package/dist/modules/product_backend/screens.js.map +1 -0
- package/dist/modules/product_mail_backend/index.d.ts +5 -0
- package/dist/modules/product_mail_backend/index.d.ts.map +1 -0
- package/dist/modules/product_mail_backend/index.js +30 -0
- package/dist/modules/product_mail_backend/index.js.map +1 -0
- package/dist/modules/product_media/functions.d.ts +3 -0
- package/dist/modules/product_media/functions.d.ts.map +1 -0
- package/dist/modules/product_media/functions.js +183 -0
- package/dist/modules/product_media/functions.js.map +1 -0
- package/dist/modules/product_media/index.d.ts +3 -0
- package/dist/modules/product_media/index.d.ts.map +1 -0
- package/dist/modules/product_media/index.js +29 -0
- package/dist/modules/product_media/index.js.map +1 -0
- package/dist/modules/product_media/models.d.ts +4 -0
- package/dist/modules/product_media/models.d.ts.map +1 -0
- package/dist/modules/product_media/models.js +24 -0
- package/dist/modules/product_media/models.js.map +1 -0
- package/dist/modules/product_media/relations.d.ts +3 -0
- package/dist/modules/product_media/relations.d.ts.map +1 -0
- package/dist/modules/product_media/relations.js +8 -0
- package/dist/modules/product_media/relations.js.map +1 -0
- package/dist/modules/product_variant_activity_backend/index.d.ts +5 -0
- package/dist/modules/product_variant_activity_backend/index.d.ts.map +1 -0
- package/dist/modules/product_variant_activity_backend/index.js +29 -0
- package/dist/modules/product_variant_activity_backend/index.js.map +1 -0
- package/dist/modules/product_variant_mail_backend/index.d.ts +5 -0
- package/dist/modules/product_variant_mail_backend/index.d.ts.map +1 -0
- package/dist/modules/product_variant_mail_backend/index.js +30 -0
- package/dist/modules/product_variant_mail_backend/index.js.map +1 -0
- package/dist/modules/purchase/functions.d.ts +6 -0
- package/dist/modules/purchase/functions.d.ts.map +1 -0
- package/dist/modules/purchase/functions.js +743 -0
- package/dist/modules/purchase/functions.js.map +1 -0
- package/dist/modules/purchase/index.d.ts +4 -0
- package/dist/modules/purchase/index.d.ts.map +1 -0
- package/dist/modules/purchase/index.js +35 -0
- package/dist/modules/purchase/index.js.map +1 -0
- package/dist/modules/purchase/models.d.ts +3 -0
- package/dist/modules/purchase/models.d.ts.map +1 -0
- package/dist/modules/purchase/models.js +68 -0
- package/dist/modules/purchase/models.js.map +1 -0
- package/dist/modules/purchase/relations.d.ts +3 -0
- package/dist/modules/purchase/relations.d.ts.map +1 -0
- package/dist/modules/purchase/relations.js +20 -0
- package/dist/modules/purchase/relations.js.map +1 -0
- package/dist/modules/purchase_backend/index.d.ts +3 -0
- package/dist/modules/purchase_backend/index.d.ts.map +1 -0
- package/dist/modules/purchase_backend/index.js +615 -0
- package/dist/modules/purchase_backend/index.js.map +1 -0
- package/dist/modules/purchase_backend/screens.d.ts +29 -0
- package/dist/modules/purchase_backend/screens.d.ts.map +1 -0
- package/dist/modules/purchase_backend/screens.js +324 -0
- package/dist/modules/purchase_backend/screens.js.map +1 -0
- package/dist/modules/sale/functions.d.ts +6 -0
- package/dist/modules/sale/functions.d.ts.map +1 -0
- package/dist/modules/sale/functions.js +611 -0
- package/dist/modules/sale/functions.js.map +1 -0
- package/dist/modules/sale/index.d.ts +4 -0
- package/dist/modules/sale/index.d.ts.map +1 -0
- package/dist/modules/sale/index.js +35 -0
- package/dist/modules/sale/index.js.map +1 -0
- package/dist/modules/sale/models.d.ts +3 -0
- package/dist/modules/sale/models.d.ts.map +1 -0
- package/dist/modules/sale/models.js +46 -0
- package/dist/modules/sale/models.js.map +1 -0
- package/dist/modules/sale/relations.d.ts +3 -0
- package/dist/modules/sale/relations.d.ts.map +1 -0
- package/dist/modules/sale/relations.js +16 -0
- package/dist/modules/sale/relations.js.map +1 -0
- package/dist/modules/sale_activity_backend/index.d.ts +5 -0
- package/dist/modules/sale_activity_backend/index.d.ts.map +1 -0
- package/dist/modules/sale_activity_backend/index.js +29 -0
- package/dist/modules/sale_activity_backend/index.js.map +1 -0
- package/dist/modules/sale_backend/client/editor-view.d.mts +5 -0
- package/dist/modules/sale_backend/client/editor-view.d.mts.map +1 -0
- package/dist/modules/sale_backend/client/editor-view.mjs +132 -0
- package/dist/modules/sale_backend/client/editor-view.mjs.map +1 -0
- package/dist/modules/sale_backend/client/sale.d.mts +6 -0
- package/dist/modules/sale_backend/client/sale.d.mts.map +1 -0
- package/dist/modules/sale_backend/client/sale.mjs +8 -0
- package/dist/modules/sale_backend/client/sale.mjs.map +1 -0
- package/dist/modules/sale_backend/index.d.ts +3 -0
- package/dist/modules/sale_backend/index.d.ts.map +1 -0
- package/dist/modules/sale_backend/index.js +681 -0
- package/dist/modules/sale_backend/index.js.map +1 -0
- package/dist/modules/sale_backend/invoicing-policies-screen.d.ts +14 -0
- package/dist/modules/sale_backend/invoicing-policies-screen.d.ts.map +1 -0
- package/dist/modules/sale_backend/invoicing-policies-screen.js +36 -0
- package/dist/modules/sale_backend/invoicing-policies-screen.js.map +1 -0
- package/dist/modules/sale_backend/islands.d.ts +3 -0
- package/dist/modules/sale_backend/islands.d.ts.map +1 -0
- package/dist/modules/sale_backend/islands.js +13 -0
- package/dist/modules/sale_backend/islands.js.map +1 -0
- package/dist/modules/sale_backend/order-detail-screen.d.ts +18 -0
- package/dist/modules/sale_backend/order-detail-screen.d.ts.map +1 -0
- package/dist/modules/sale_backend/order-detail-screen.js +217 -0
- package/dist/modules/sale_backend/order-detail-screen.js.map +1 -0
- package/dist/modules/sale_backend/quotations-screen.d.ts +15 -0
- package/dist/modules/sale_backend/quotations-screen.d.ts.map +1 -0
- package/dist/modules/sale_backend/quotations-screen.js +64 -0
- package/dist/modules/sale_backend/quotations-screen.js.map +1 -0
- package/dist/modules/sale_backend/sales-orders-screen.d.ts +12 -0
- package/dist/modules/sale_backend/sales-orders-screen.d.ts.map +1 -0
- package/dist/modules/sale_backend/sales-orders-screen.js +65 -0
- package/dist/modules/sale_backend/sales-orders-screen.js.map +1 -0
- package/dist/modules/sale_backend/screens.d.ts +23 -0
- package/dist/modules/sale_backend/screens.d.ts.map +1 -0
- package/dist/modules/sale_backend/screens.js +275 -0
- package/dist/modules/sale_backend/screens.js.map +1 -0
- package/dist/modules/sale_mail_backend/index.d.ts +5 -0
- package/dist/modules/sale_mail_backend/index.d.ts.map +1 -0
- package/dist/modules/sale_mail_backend/index.js +30 -0
- package/dist/modules/sale_mail_backend/index.js.map +1 -0
- package/dist/modules/stock/functions.d.ts +10 -0
- package/dist/modules/stock/functions.d.ts.map +1 -0
- package/dist/modules/stock/functions.js +1523 -0
- package/dist/modules/stock/functions.js.map +1 -0
- package/dist/modules/stock/index.d.ts +5 -0
- package/dist/modules/stock/index.d.ts.map +1 -0
- package/dist/modules/stock/index.js +35 -0
- package/dist/modules/stock/index.js.map +1 -0
- package/dist/modules/stock/models.d.ts +3 -0
- package/dist/modules/stock/models.d.ts.map +1 -0
- package/dist/modules/stock/models.js +185 -0
- package/dist/modules/stock/models.js.map +1 -0
- package/dist/modules/stock/relations.d.ts +3 -0
- package/dist/modules/stock/relations.d.ts.map +1 -0
- package/dist/modules/stock/relations.js +40 -0
- package/dist/modules/stock/relations.js.map +1 -0
- package/dist/modules/stock/routing.d.ts +7 -0
- package/dist/modules/stock/routing.d.ts.map +1 -0
- package/dist/modules/stock/routing.js +527 -0
- package/dist/modules/stock/routing.js.map +1 -0
- package/dist/modules/stock_activity_backend/index.d.ts +5 -0
- package/dist/modules/stock_activity_backend/index.d.ts.map +1 -0
- package/dist/modules/stock_activity_backend/index.js +29 -0
- package/dist/modules/stock_activity_backend/index.js.map +1 -0
- package/dist/modules/stock_backend/client/editor-view.d.mts +5 -0
- package/dist/modules/stock_backend/client/editor-view.d.mts.map +1 -0
- package/dist/modules/stock_backend/client/editor-view.mjs +147 -0
- package/dist/modules/stock_backend/client/editor-view.mjs.map +1 -0
- package/dist/modules/stock_backend/client/stock.d.mts +6 -0
- package/dist/modules/stock_backend/client/stock.d.mts.map +1 -0
- package/dist/modules/stock_backend/client/stock.mjs +8 -0
- package/dist/modules/stock_backend/client/stock.mjs.map +1 -0
- package/dist/modules/stock_backend/forecast-screen.d.ts +28 -0
- package/dist/modules/stock_backend/forecast-screen.d.ts.map +1 -0
- package/dist/modules/stock_backend/forecast-screen.js +108 -0
- package/dist/modules/stock_backend/forecast-screen.js.map +1 -0
- package/dist/modules/stock_backend/index.d.ts +3 -0
- package/dist/modules/stock_backend/index.d.ts.map +1 -0
- package/dist/modules/stock_backend/index.js +880 -0
- package/dist/modules/stock_backend/index.js.map +1 -0
- package/dist/modules/stock_backend/inventory-screen.d.ts +27 -0
- package/dist/modules/stock_backend/inventory-screen.d.ts.map +1 -0
- package/dist/modules/stock_backend/inventory-screen.js +141 -0
- package/dist/modules/stock_backend/inventory-screen.js.map +1 -0
- package/dist/modules/stock_backend/islands.d.ts +3 -0
- package/dist/modules/stock_backend/islands.d.ts.map +1 -0
- package/dist/modules/stock_backend/islands.js +13 -0
- package/dist/modules/stock_backend/islands.js.map +1 -0
- package/dist/modules/stock_backend/locations-screen.d.ts +18 -0
- package/dist/modules/stock_backend/locations-screen.d.ts.map +1 -0
- package/dist/modules/stock_backend/locations-screen.js +92 -0
- package/dist/modules/stock_backend/locations-screen.js.map +1 -0
- package/dist/modules/stock_backend/lot-screen.d.ts +30 -0
- package/dist/modules/stock_backend/lot-screen.d.ts.map +1 -0
- package/dist/modules/stock_backend/lot-screen.js +86 -0
- package/dist/modules/stock_backend/lot-screen.js.map +1 -0
- package/dist/modules/stock_backend/lots-screen.d.ts +21 -0
- package/dist/modules/stock_backend/lots-screen.d.ts.map +1 -0
- package/dist/modules/stock_backend/lots-screen.js +79 -0
- package/dist/modules/stock_backend/lots-screen.js.map +1 -0
- package/dist/modules/stock_backend/picking-types-screen.d.ts +21 -0
- package/dist/modules/stock_backend/picking-types-screen.d.ts.map +1 -0
- package/dist/modules/stock_backend/picking-types-screen.js +110 -0
- package/dist/modules/stock_backend/picking-types-screen.js.map +1 -0
- package/dist/modules/stock_backend/replenishment-screen.d.ts +29 -0
- package/dist/modules/stock_backend/replenishment-screen.d.ts.map +1 -0
- package/dist/modules/stock_backend/replenishment-screen.js +131 -0
- package/dist/modules/stock_backend/replenishment-screen.js.map +1 -0
- package/dist/modules/stock_backend/routes.d.ts +3 -0
- package/dist/modules/stock_backend/routes.d.ts.map +1 -0
- package/dist/modules/stock_backend/routes.js +950 -0
- package/dist/modules/stock_backend/routes.js.map +1 -0
- package/dist/modules/stock_backend/screens.d.ts +14 -0
- package/dist/modules/stock_backend/screens.d.ts.map +1 -0
- package/dist/modules/stock_backend/screens.js +40 -0
- package/dist/modules/stock_backend/screens.js.map +1 -0
- package/dist/modules/stock_backend/stock-route-screen.d.ts +30 -0
- package/dist/modules/stock_backend/stock-route-screen.d.ts.map +1 -0
- package/dist/modules/stock_backend/stock-route-screen.js +129 -0
- package/dist/modules/stock_backend/stock-route-screen.js.map +1 -0
- package/dist/modules/stock_backend/stock-routes-screen.d.ts +17 -0
- package/dist/modules/stock_backend/stock-routes-screen.d.ts.map +1 -0
- package/dist/modules/stock_backend/stock-routes-screen.js +60 -0
- package/dist/modules/stock_backend/stock-routes-screen.js.map +1 -0
- package/dist/modules/stock_backend/transfer-screen.d.ts +26 -0
- package/dist/modules/stock_backend/transfer-screen.d.ts.map +1 -0
- package/dist/modules/stock_backend/transfer-screen.js +95 -0
- package/dist/modules/stock_backend/transfer-screen.js.map +1 -0
- package/dist/modules/stock_backend/transfers-screen.d.ts +21 -0
- package/dist/modules/stock_backend/transfers-screen.d.ts.map +1 -0
- package/dist/modules/stock_backend/transfers-screen.js +88 -0
- package/dist/modules/stock_backend/transfers-screen.js.map +1 -0
- package/dist/modules/stock_backend/warehouses-screen.d.ts +17 -0
- package/dist/modules/stock_backend/warehouses-screen.d.ts.map +1 -0
- package/dist/modules/stock_backend/warehouses-screen.js +96 -0
- package/dist/modules/stock_backend/warehouses-screen.js.map +1 -0
- package/dist/modules/stock_lot_activity_backend/index.d.ts +5 -0
- package/dist/modules/stock_lot_activity_backend/index.d.ts.map +1 -0
- package/dist/modules/stock_lot_activity_backend/index.js +29 -0
- package/dist/modules/stock_lot_activity_backend/index.js.map +1 -0
- package/dist/modules/stock_lot_mail_backend/index.d.ts +5 -0
- package/dist/modules/stock_lot_mail_backend/index.d.ts.map +1 -0
- package/dist/modules/stock_lot_mail_backend/index.js +30 -0
- package/dist/modules/stock_lot_mail_backend/index.js.map +1 -0
- package/dist/modules/stock_mail_backend/index.d.ts +5 -0
- package/dist/modules/stock_mail_backend/index.d.ts.map +1 -0
- package/dist/modules/stock_mail_backend/index.js +30 -0
- package/dist/modules/stock_mail_backend/index.js.map +1 -0
- package/dist/modules/stock_mail_inbound/index.d.ts +6 -0
- package/dist/modules/stock_mail_inbound/index.d.ts.map +1 -0
- package/dist/modules/stock_mail_inbound/index.js +104 -0
- package/dist/modules/stock_mail_inbound/index.js.map +1 -0
- package/dist/modules/storage/functions.d.ts +3 -0
- package/dist/modules/storage/functions.d.ts.map +1 -0
- package/dist/modules/storage/functions.js +129 -0
- package/dist/modules/storage/functions.js.map +1 -0
- package/dist/modules/storage/index.d.ts +3 -0
- package/dist/modules/storage/index.d.ts.map +1 -0
- package/dist/modules/storage/index.js +31 -0
- package/dist/modules/storage/index.js.map +1 -0
- package/dist/modules/storage/jobs.d.ts +3 -0
- package/dist/modules/storage/jobs.d.ts.map +1 -0
- package/dist/modules/storage/jobs.js +37 -0
- package/dist/modules/storage/jobs.js.map +1 -0
- package/dist/modules/storage/models.d.ts +3 -0
- package/dist/modules/storage/models.d.ts.map +1 -0
- package/dist/modules/storage/models.js +23 -0
- package/dist/modules/storage/models.js.map +1 -0
- package/dist/modules/storage/routes.d.ts +27 -0
- package/dist/modules/storage/routes.d.ts.map +1 -0
- package/dist/modules/storage/routes.js +180 -0
- package/dist/modules/storage/routes.js.map +1 -0
- package/dist/modules/uom/convert.d.ts +52 -0
- package/dist/modules/uom/convert.d.ts.map +1 -0
- package/dist/modules/uom/convert.js +76 -0
- package/dist/modules/uom/convert.js.map +1 -0
- package/dist/modules/uom/functions.d.ts +5 -0
- package/dist/modules/uom/functions.d.ts.map +1 -0
- package/dist/modules/uom/functions.js +235 -0
- package/dist/modules/uom/functions.js.map +1 -0
- package/dist/modules/uom/index.d.ts +5 -0
- package/dist/modules/uom/index.d.ts.map +1 -0
- package/dist/modules/uom/index.js +19 -0
- package/dist/modules/uom/index.js.map +1 -0
- package/dist/modules/uom/messages.d.ts +3 -0
- package/dist/modules/uom/messages.d.ts.map +1 -0
- package/dist/modules/uom/messages.js +19 -0
- package/dist/modules/uom/messages.js.map +1 -0
- package/dist/modules/uom/models.d.ts +4 -0
- package/dist/modules/uom/models.d.ts.map +1 -0
- package/dist/modules/uom/models.js +34 -0
- package/dist/modules/uom/models.js.map +1 -0
- package/dist/modules/uom/relations.d.ts +3 -0
- package/dist/modules/uom/relations.d.ts.map +1 -0
- package/dist/modules/uom/relations.js +7 -0
- package/dist/modules/uom/relations.js.map +1 -0
- package/dist/modules/user/functions.d.ts +8 -0
- package/dist/modules/user/functions.d.ts.map +1 -0
- package/dist/modules/user/functions.js +1094 -0
- package/dist/modules/user/functions.js.map +1 -0
- package/dist/modules/user/index.d.ts +8 -0
- package/dist/modules/user/index.d.ts.map +1 -0
- package/dist/modules/user/index.js +34 -0
- package/dist/modules/user/index.js.map +1 -0
- package/dist/modules/user/login.d.ts +28 -0
- package/dist/modules/user/login.d.ts.map +1 -0
- package/dist/modules/user/login.js +46 -0
- package/dist/modules/user/login.js.map +1 -0
- package/dist/modules/user/messages.d.ts +115 -0
- package/dist/modules/user/messages.d.ts.map +1 -0
- package/dist/modules/user/messages.js +115 -0
- package/dist/modules/user/messages.js.map +1 -0
- package/dist/modules/user/models.d.ts +16 -0
- package/dist/modules/user/models.d.ts.map +1 -0
- package/dist/modules/user/models.js +168 -0
- package/dist/modules/user/models.js.map +1 -0
- package/dist/modules/user/password.d.ts +11 -0
- package/dist/modules/user/password.d.ts.map +1 -0
- package/dist/modules/user/password.js +74 -0
- package/dist/modules/user/password.js.map +1 -0
- package/dist/modules/user/relations.d.ts +3 -0
- package/dist/modules/user/relations.d.ts.map +1 -0
- package/dist/modules/user/relations.js +31 -0
- package/dist/modules/user/relations.js.map +1 -0
- package/dist/modules/user/roles.d.ts +12 -0
- package/dist/modules/user/roles.d.ts.map +1 -0
- package/dist/modules/user/roles.js +254 -0
- package/dist/modules/user/roles.js.map +1 -0
- package/dist/modules/user/routes.d.ts +3 -0
- package/dist/modules/user/routes.d.ts.map +1 -0
- package/dist/modules/user/routes.js +244 -0
- package/dist/modules/user/routes.js.map +1 -0
- package/dist/modules/user/session-context.d.ts +10 -0
- package/dist/modules/user/session-context.d.ts.map +1 -0
- package/dist/modules/user/session-context.js +31 -0
- package/dist/modules/user/session-context.js.map +1 -0
- package/dist/modules/user_backend/index.d.ts +5 -0
- package/dist/modules/user_backend/index.d.ts.map +1 -0
- package/dist/modules/user_backend/index.js +24 -0
- package/dist/modules/user_backend/index.js.map +1 -0
- package/dist/modules/user_backend/menus.d.ts +3 -0
- package/dist/modules/user_backend/menus.d.ts.map +1 -0
- package/dist/modules/user_backend/menus.js +24 -0
- package/dist/modules/user_backend/menus.js.map +1 -0
- package/dist/modules/user_backend/messages.d.ts +189 -0
- package/dist/modules/user_backend/messages.d.ts.map +1 -0
- package/dist/modules/user_backend/messages.js +189 -0
- package/dist/modules/user_backend/messages.js.map +1 -0
- package/dist/modules/user_backend/routes.d.ts +3 -0
- package/dist/modules/user_backend/routes.d.ts.map +1 -0
- package/dist/modules/user_backend/routes.js +474 -0
- package/dist/modules/user_backend/routes.js.map +1 -0
- package/dist/modules/user_backend/screens.d.ts +70 -0
- package/dist/modules/user_backend/screens.d.ts.map +1 -0
- package/dist/modules/user_backend/screens.js +308 -0
- package/dist/modules/user_backend/screens.js.map +1 -0
- package/dist/modules/website/access.d.ts +15 -0
- package/dist/modules/website/access.d.ts.map +1 -0
- package/dist/modules/website/access.js +39 -0
- package/dist/modules/website/access.js.map +1 -0
- package/dist/modules/website/cms.d.ts +3 -0
- package/dist/modules/website/cms.d.ts.map +1 -0
- package/dist/modules/website/cms.js +1142 -0
- package/dist/modules/website/cms.js.map +1 -0
- package/dist/modules/website/content-types.d.ts +4 -0
- package/dist/modules/website/content-types.d.ts.map +1 -0
- package/dist/modules/website/content-types.js +30 -0
- package/dist/modules/website/content-types.js.map +1 -0
- package/dist/modules/website/customer-password.d.ts +4 -0
- package/dist/modules/website/customer-password.d.ts.map +1 -0
- package/dist/modules/website/customer-password.js +51 -0
- package/dist/modules/website/customer-password.js.map +1 -0
- package/dist/modules/website/customer-routes.d.ts +3 -0
- package/dist/modules/website/customer-routes.d.ts.map +1 -0
- package/dist/modules/website/customer-routes.js +322 -0
- package/dist/modules/website/customer-routes.js.map +1 -0
- package/dist/modules/website/customer.d.ts +5 -0
- package/dist/modules/website/customer.d.ts.map +1 -0
- package/dist/modules/website/customer.js +442 -0
- package/dist/modules/website/customer.js.map +1 -0
- package/dist/modules/website/functions.d.ts +3 -0
- package/dist/modules/website/functions.d.ts.map +1 -0
- package/dist/modules/website/functions.js +96 -0
- package/dist/modules/website/functions.js.map +1 -0
- package/dist/modules/website/index.d.ts +4 -0
- package/dist/modules/website/index.d.ts.map +1 -0
- package/dist/modules/website/index.js +152 -0
- package/dist/modules/website/index.js.map +1 -0
- package/dist/modules/website/jobs.d.ts +3 -0
- package/dist/modules/website/jobs.d.ts.map +1 -0
- package/dist/modules/website/jobs.js +25 -0
- package/dist/modules/website/jobs.js.map +1 -0
- package/dist/modules/website/joints.d.ts +4 -0
- package/dist/modules/website/joints.d.ts.map +1 -0
- package/dist/modules/website/joints.js +7 -0
- package/dist/modules/website/joints.js.map +1 -0
- package/dist/modules/website/models.d.ts +8 -0
- package/dist/modules/website/models.d.ts.map +1 -0
- package/dist/modules/website/models.js +260 -0
- package/dist/modules/website/models.js.map +1 -0
- package/dist/modules/website/sections.d.ts +8 -0
- package/dist/modules/website/sections.d.ts.map +1 -0
- package/dist/modules/website/sections.js +16 -0
- package/dist/modules/website/sections.js.map +1 -0
- package/dist/modules/website/tokens.d.ts +2 -0
- package/dist/modules/website/tokens.d.ts.map +1 -0
- package/dist/modules/website/tokens.js +5 -0
- package/dist/modules/website/tokens.js.map +1 -0
- package/dist/modules/website/types.d.ts +6 -0
- package/dist/modules/website/types.d.ts.map +1 -0
- package/dist/modules/website/types.js +2 -0
- package/dist/modules/website/types.js.map +1 -0
- package/dist/modules/website/views.d.ts +4 -0
- package/dist/modules/website/views.d.ts.map +1 -0
- package/dist/modules/website/views.js +5 -0
- package/dist/modules/website/views.js.map +1 -0
- package/dist/modules/website_backend/index.d.ts +3 -0
- package/dist/modules/website_backend/index.d.ts.map +1 -0
- package/dist/modules/website_backend/index.js +290 -0
- package/dist/modules/website_backend/index.js.map +1 -0
- package/dist/modules/website_backend/menus.d.ts +3 -0
- package/dist/modules/website_backend/menus.d.ts.map +1 -0
- package/dist/modules/website_backend/menus.js +54 -0
- package/dist/modules/website_backend/menus.js.map +1 -0
- package/dist/modules/website_backend/routes.d.ts +3 -0
- package/dist/modules/website_backend/routes.d.ts.map +1 -0
- package/dist/modules/website_backend/routes.js +625 -0
- package/dist/modules/website_backend/routes.js.map +1 -0
- package/dist/modules/website_backend/screens.d.ts +114 -0
- package/dist/modules/website_backend/screens.d.ts.map +1 -0
- package/dist/modules/website_backend/screens.js +625 -0
- package/dist/modules/website_backend/screens.js.map +1 -0
- package/dist/modules/website_form/functions.d.ts +3 -0
- package/dist/modules/website_form/functions.d.ts.map +1 -0
- package/dist/modules/website_form/functions.js +305 -0
- package/dist/modules/website_form/functions.js.map +1 -0
- package/dist/modules/website_form/index.d.ts +3 -0
- package/dist/modules/website_form/index.d.ts.map +1 -0
- package/dist/modules/website_form/index.js +72 -0
- package/dist/modules/website_form/index.js.map +1 -0
- package/dist/modules/website_form/models.d.ts +3 -0
- package/dist/modules/website_form/models.d.ts.map +1 -0
- package/dist/modules/website_form/models.js +46 -0
- package/dist/modules/website_form/models.js.map +1 -0
- package/dist/modules/website_form/routes.d.ts +3 -0
- package/dist/modules/website_form/routes.d.ts.map +1 -0
- package/dist/modules/website_form/routes.js +74 -0
- package/dist/modules/website_form/routes.js.map +1 -0
- package/dist/modules/website_form/sections.d.ts +3 -0
- package/dist/modules/website_form/sections.d.ts.map +1 -0
- package/dist/modules/website_form/sections.js +7 -0
- package/dist/modules/website_form/sections.js.map +1 -0
- package/dist/modules/website_hospitality/content-types.d.ts +3 -0
- package/dist/modules/website_hospitality/content-types.d.ts.map +1 -0
- package/dist/modules/website_hospitality/content-types.js +9 -0
- package/dist/modules/website_hospitality/content-types.js.map +1 -0
- package/dist/modules/website_hospitality/functions.d.ts +3 -0
- package/dist/modules/website_hospitality/functions.d.ts.map +1 -0
- package/dist/modules/website_hospitality/functions.js +296 -0
- package/dist/modules/website_hospitality/functions.js.map +1 -0
- package/dist/modules/website_hospitality/index.d.ts +3 -0
- package/dist/modules/website_hospitality/index.d.ts.map +1 -0
- package/dist/modules/website_hospitality/index.js +67 -0
- package/dist/modules/website_hospitality/index.js.map +1 -0
- package/dist/modules/website_hospitality/models.d.ts +3 -0
- package/dist/modules/website_hospitality/models.d.ts.map +1 -0
- package/dist/modules/website_hospitality/models.js +49 -0
- package/dist/modules/website_hospitality/models.js.map +1 -0
- package/dist/modules/website_hospitality/routes.d.ts +3 -0
- package/dist/modules/website_hospitality/routes.d.ts.map +1 -0
- package/dist/modules/website_hospitality/routes.js +78 -0
- package/dist/modules/website_hospitality/routes.js.map +1 -0
- package/dist/modules/website_hospitality/sections.d.ts +3 -0
- package/dist/modules/website_hospitality/sections.d.ts.map +1 -0
- package/dist/modules/website_hospitality/sections.js +11 -0
- package/dist/modules/website_hospitality/sections.js.map +1 -0
- package/dist/modules/website_menu/functions.d.ts +3 -0
- package/dist/modules/website_menu/functions.d.ts.map +1 -0
- package/dist/modules/website_menu/functions.js +79 -0
- package/dist/modules/website_menu/functions.js.map +1 -0
- package/dist/modules/website_menu/index.d.ts +3 -0
- package/dist/modules/website_menu/index.d.ts.map +1 -0
- package/dist/modules/website_menu/index.js +31 -0
- package/dist/modules/website_menu/index.js.map +1 -0
- package/dist/modules/website_menu/models.d.ts +3 -0
- package/dist/modules/website_menu/models.d.ts.map +1 -0
- package/dist/modules/website_menu/models.js +15 -0
- package/dist/modules/website_menu/models.js.map +1 -0
- package/dist/modules/website_menu/sections.d.ts +3 -0
- package/dist/modules/website_menu/sections.d.ts.map +1 -0
- package/dist/modules/website_menu/sections.js +4 -0
- package/dist/modules/website_menu/sections.js.map +1 -0
- package/dist/modules/website_menu/views.d.ts +3 -0
- package/dist/modules/website_menu/views.d.ts.map +1 -0
- package/dist/modules/website_menu/views.js +4 -0
- package/dist/modules/website_menu/views.js.map +1 -0
- package/dist/modules/website_retail/content-types.d.ts +3 -0
- package/dist/modules/website_retail/content-types.d.ts.map +1 -0
- package/dist/modules/website_retail/content-types.js +10 -0
- package/dist/modules/website_retail/content-types.js.map +1 -0
- package/dist/modules/website_retail/functions.d.ts +3 -0
- package/dist/modules/website_retail/functions.d.ts.map +1 -0
- package/dist/modules/website_retail/functions.js +321 -0
- package/dist/modules/website_retail/functions.js.map +1 -0
- package/dist/modules/website_retail/index.d.ts +3 -0
- package/dist/modules/website_retail/index.d.ts.map +1 -0
- package/dist/modules/website_retail/index.js +63 -0
- package/dist/modules/website_retail/index.js.map +1 -0
- package/dist/modules/website_retail/models.d.ts +3 -0
- package/dist/modules/website_retail/models.d.ts.map +1 -0
- package/dist/modules/website_retail/models.js +50 -0
- package/dist/modules/website_retail/models.js.map +1 -0
- package/dist/modules/website_retail/sections.d.ts +3 -0
- package/dist/modules/website_retail/sections.d.ts.map +1 -0
- package/dist/modules/website_retail/sections.js +11 -0
- package/dist/modules/website_retail/sections.js.map +1 -0
- package/dist/modules/website_search/client/search.d.mts +6 -0
- package/dist/modules/website_search/client/search.d.mts.map +1 -0
- package/dist/modules/website_search/client/search.mjs +25 -0
- package/dist/modules/website_search/client/search.mjs.map +1 -0
- package/dist/modules/website_search/fills.d.ts +3 -0
- package/dist/modules/website_search/fills.d.ts.map +1 -0
- package/dist/modules/website_search/fills.js +5 -0
- package/dist/modules/website_search/fills.js.map +1 -0
- package/dist/modules/website_search/index.d.ts +3 -0
- package/dist/modules/website_search/index.d.ts.map +1 -0
- package/dist/modules/website_search/index.js +28 -0
- package/dist/modules/website_search/index.js.map +1 -0
- package/dist/modules/website_search/islands.d.ts +7 -0
- package/dist/modules/website_search/islands.d.ts.map +1 -0
- package/dist/modules/website_search/islands.js +23 -0
- package/dist/modules/website_search/islands.js.map +1 -0
- package/dist/modules/website_seo/extend.d.ts +7 -0
- package/dist/modules/website_seo/extend.d.ts.map +1 -0
- package/dist/modules/website_seo/extend.js +20 -0
- package/dist/modules/website_seo/extend.js.map +1 -0
- package/dist/modules/website_seo/fills.d.ts +3 -0
- package/dist/modules/website_seo/fills.d.ts.map +1 -0
- package/dist/modules/website_seo/fills.js +8 -0
- package/dist/modules/website_seo/fills.js.map +1 -0
- package/dist/modules/website_seo/index.d.ts +3 -0
- package/dist/modules/website_seo/index.d.ts.map +1 -0
- package/dist/modules/website_seo/index.js +30 -0
- package/dist/modules/website_seo/index.js.map +1 -0
- package/dist/modules/website_seo/views.d.ts +3 -0
- package/dist/modules/website_seo/views.d.ts.map +1 -0
- package/dist/modules/website_seo/views.js +5 -0
- package/dist/modules/website_seo/views.js.map +1 -0
- package/dist/themes/default/index.d.ts +3 -0
- package/dist/themes/default/index.d.ts.map +1 -0
- package/dist/themes/default/index.js +16 -0
- package/dist/themes/default/index.js.map +1 -0
- package/dist/themes/default/templates/layout.ktl +7 -0
- package/dist/themes/default/templates/product.detail.ktl +10 -0
- package/dist/themes/default/templates/product.related_row.ktl +1 -0
- package/dist/themes/hospitality/assets/theme.css +109 -0
- package/dist/themes/hospitality/index.d.ts +3 -0
- package/dist/themes/hospitality/index.d.ts.map +1 -0
- package/dist/themes/hospitality/index.js +26 -0
- package/dist/themes/hospitality/index.js.map +1 -0
- package/dist/themes/hospitality/templates/layout.ktl +17 -0
- package/dist/themes/hospitality/templates/menu.item.ktl +1 -0
- package/dist/themes/hospitality/templates/menu.primary.ktl +1 -0
- package/dist/themes/hospitality/templates/website.hero.ktl +6 -0
- package/dist/themes/hospitality/templates/website.page.ktl +1 -0
- package/dist/themes/hospitality/templates/website.rich_text.ktl +3 -0
- package/dist/themes/hospitality/templates/website_form.form.ktl +1 -0
- package/dist/themes/hospitality/templates/website_hospitality.booking.ktl +1 -0
- package/dist/themes/hospitality/templates/website_hospitality.stays.ktl +1 -0
- package/dist/themes/hospitality/tokens.d.ts +2 -0
- package/dist/themes/hospitality/tokens.d.ts.map +1 -0
- package/dist/themes/hospitality/tokens.js +9 -0
- package/dist/themes/hospitality/tokens.js.map +1 -0
- package/dist/themes/paper/index.d.ts +9 -0
- package/dist/themes/paper/index.d.ts.map +1 -0
- package/dist/themes/paper/index.js +30 -0
- package/dist/themes/paper/index.js.map +1 -0
- package/dist/themes/paper/templates/layout.ktl +14 -0
- package/dist/themes/paper/templates/menu.item.ktl +3 -0
- package/dist/themes/paper/templates/menu.primary.ktl +3 -0
- package/dist/themes/paper/templates/website.hero.ktl +6 -0
- package/dist/themes/paper/templates/website.page.ktl +2 -0
- package/dist/themes/paper/templates/website.rich_text.ktl +4 -0
- package/dist/themes/paper/tokens.d.ts +2 -0
- package/dist/themes/paper/tokens.d.ts.map +1 -0
- package/dist/themes/paper/tokens.js +11 -0
- package/dist/themes/paper/tokens.js.map +1 -0
- package/dist/themes/retail/assets/theme.css +114 -0
- package/dist/themes/retail/index.d.ts +3 -0
- package/dist/themes/retail/index.d.ts.map +1 -0
- package/dist/themes/retail/index.js +26 -0
- package/dist/themes/retail/index.js.map +1 -0
- package/dist/themes/retail/templates/layout.ktl +5 -0
- package/dist/themes/retail/templates/menu.item.ktl +1 -0
- package/dist/themes/retail/templates/menu.primary.ktl +1 -0
- package/dist/themes/retail/templates/website.hero.ktl +1 -0
- package/dist/themes/retail/templates/website.page.ktl +1 -0
- package/dist/themes/retail/templates/website.rich_text.ktl +1 -0
- package/dist/themes/retail/templates/website_form.form.ktl +1 -0
- package/dist/themes/retail/templates/website_retail.cart.ktl +1 -0
- package/dist/themes/retail/templates/website_retail.products.ktl +1 -0
- package/dist/themes/retail/tokens.d.ts +2 -0
- package/dist/themes/retail/tokens.d.ts.map +1 -0
- package/dist/themes/retail/tokens.js +9 -0
- package/dist/themes/retail/tokens.js.map +1 -0
- package/dist/ui/actions.d.ts +38 -0
- package/dist/ui/actions.d.ts.map +1 -0
- package/dist/ui/actions.js +20 -0
- package/dist/ui/actions.js.map +1 -0
- package/dist/ui/activity.d.ts +4 -0
- package/dist/ui/activity.d.ts.map +1 -0
- package/dist/ui/activity.js +73 -0
- package/dist/ui/activity.js.map +1 -0
- package/dist/ui/attachments.d.ts +18 -0
- package/dist/ui/attachments.d.ts.map +1 -0
- package/dist/ui/attachments.js +15 -0
- package/dist/ui/attachments.js.map +1 -0
- package/dist/ui/auth.d.ts +9 -0
- package/dist/ui/auth.d.ts.map +1 -0
- package/dist/ui/auth.js +44 -0
- package/dist/ui/auth.js.map +1 -0
- package/dist/ui/calendar.d.ts +4 -0
- package/dist/ui/calendar.d.ts.map +1 -0
- package/dist/ui/calendar.js +51 -0
- package/dist/ui/calendar.js.map +1 -0
- package/dist/ui/chrome.d.ts +66 -0
- package/dist/ui/chrome.d.ts.map +1 -0
- package/dist/ui/chrome.js +39 -0
- package/dist/ui/chrome.js.map +1 -0
- package/dist/ui/client/activity-view.d.mts +12 -0
- package/dist/ui/client/activity-view.d.mts.map +1 -0
- package/dist/ui/client/activity-view.mjs +393 -0
- package/dist/ui/client/activity-view.mjs.map +1 -0
- package/dist/ui/client/activity.css +269 -0
- package/dist/ui/client/activity.d.mts +11 -0
- package/dist/ui/client/activity.d.mts.map +1 -0
- package/dist/ui/client/activity.mjs +10 -0
- package/dist/ui/client/activity.mjs.map +1 -0
- package/dist/ui/client/calendar-view.d.mts +5 -0
- package/dist/ui/client/calendar-view.d.mts.map +1 -0
- package/dist/ui/client/calendar-view.mjs +266 -0
- package/dist/ui/client/calendar-view.mjs.map +1 -0
- package/dist/ui/client/calendar.css +170 -0
- package/dist/ui/client/calendar.d.mts +6 -0
- package/dist/ui/client/calendar.d.mts.map +1 -0
- package/dist/ui/client/calendar.mjs +6 -0
- package/dist/ui/client/calendar.mjs.map +1 -0
- package/dist/ui/client/mail-view.d.mts +9 -0
- package/dist/ui/client/mail-view.d.mts.map +1 -0
- package/dist/ui/client/mail-view.mjs +350 -0
- package/dist/ui/client/mail-view.mjs.map +1 -0
- package/dist/ui/client/mail.css +230 -0
- package/dist/ui/client/mail.d.mts +11 -0
- package/dist/ui/client/mail.d.mts.map +1 -0
- package/dist/ui/client/mail.mjs +10 -0
- package/dist/ui/client/mail.mjs.map +1 -0
- package/dist/ui/data.d.ts +25 -0
- package/dist/ui/data.d.ts.map +1 -0
- package/dist/ui/data.js +23 -0
- package/dist/ui/data.js.map +1 -0
- package/dist/ui/date-picker.d.ts +36 -0
- package/dist/ui/date-picker.d.ts.map +1 -0
- package/dist/ui/date-picker.js +40 -0
- package/dist/ui/date-picker.js.map +1 -0
- package/dist/ui/form.d.ts +67 -0
- package/dist/ui/form.d.ts.map +1 -0
- package/dist/ui/form.js +75 -0
- package/dist/ui/form.js.map +1 -0
- package/dist/ui/format.d.ts +4 -0
- package/dist/ui/format.d.ts.map +1 -0
- package/dist/ui/format.js +33 -0
- package/dist/ui/format.js.map +1 -0
- package/dist/ui/hooks.d.ts +5 -0
- package/dist/ui/hooks.d.ts.map +1 -0
- package/dist/ui/hooks.js +82 -0
- package/dist/ui/hooks.js.map +1 -0
- package/dist/ui/icons.d.ts +12 -0
- package/dist/ui/icons.d.ts.map +1 -0
- package/dist/ui/icons.js +76 -0
- package/dist/ui/icons.js.map +1 -0
- package/dist/ui/index.d.ts +39 -0
- package/dist/ui/index.d.ts.map +1 -0
- package/dist/ui/index.js +39 -0
- package/dist/ui/index.js.map +1 -0
- package/dist/ui/layout.d.ts +80 -0
- package/dist/ui/layout.d.ts.map +1 -0
- package/dist/ui/layout.js +86 -0
- package/dist/ui/layout.js.map +1 -0
- package/dist/ui/mail.d.ts +5 -0
- package/dist/ui/mail.d.ts.map +1 -0
- package/dist/ui/mail.js +69 -0
- package/dist/ui/mail.js.map +1 -0
- package/dist/ui/media.d.ts +42 -0
- package/dist/ui/media.d.ts.map +1 -0
- package/dist/ui/media.js +48 -0
- package/dist/ui/media.js.map +1 -0
- package/dist/ui/modal.d.ts +9 -0
- package/dist/ui/modal.d.ts.map +1 -0
- package/dist/ui/modal.js +13 -0
- package/dist/ui/modal.js.map +1 -0
- package/dist/ui/nav.d.ts +34 -0
- package/dist/ui/nav.d.ts.map +1 -0
- package/dist/ui/nav.js +77 -0
- package/dist/ui/nav.js.map +1 -0
- package/dist/ui/navigation.d.ts +22 -0
- package/dist/ui/navigation.d.ts.map +1 -0
- package/dist/ui/navigation.js +9 -0
- package/dist/ui/navigation.js.map +1 -0
- package/dist/ui/primitives.d.ts +61 -0
- package/dist/ui/primitives.d.ts.map +1 -0
- package/dist/ui/primitives.js +74 -0
- package/dist/ui/primitives.js.map +1 -0
- package/dist/ui/record.d.ts +44 -0
- package/dist/ui/record.d.ts.map +1 -0
- package/dist/ui/record.js +39 -0
- package/dist/ui/record.js.map +1 -0
- package/dist/ui/schedule.d.ts +34 -0
- package/dist/ui/schedule.d.ts.map +1 -0
- package/dist/ui/schedule.js +39 -0
- package/dist/ui/schedule.js.map +1 -0
- package/dist/ui/state.d.ts +19 -0
- package/dist/ui/state.d.ts.map +1 -0
- package/dist/ui/state.js +34 -0
- package/dist/ui/state.js.map +1 -0
- package/dist/ui/surfaces.d.ts +38 -0
- package/dist/ui/surfaces.d.ts.map +1 -0
- package/dist/ui/surfaces.js +36 -0
- package/dist/ui/surfaces.js.map +1 -0
- package/dist/ui/table.d.ts +48 -0
- package/dist/ui/table.d.ts.map +1 -0
- package/dist/ui/table.js +53 -0
- package/dist/ui/table.js.map +1 -0
- package/package.json +57 -0
|
@@ -0,0 +1,953 @@
|
|
|
1
|
+
import { defineFn } from '@ketvietlab/ketjs';
|
|
2
|
+
import { functions as accountFunctions } from '../account/functions.js';
|
|
3
|
+
import { functions as pricingFunctions } from '../pricing/functions.js';
|
|
4
|
+
import { functions as stockFunctions } from '../stock/functions.js';
|
|
5
|
+
export const POS_ORDER_STATES = ['draft', 'cancel', 'paid', 'done'];
|
|
6
|
+
export const POS_SESSION_STATES = ['opening_control', 'opened', 'closing_control', 'closed'];
|
|
7
|
+
export const POS_INVOICE_STATUSES = ['invoiced', 'to_invoice'];
|
|
8
|
+
const invalid = (field, message) => ({ ok: false, errors: [{ field, message }] });
|
|
9
|
+
const n = (value) => Number(value ?? 0);
|
|
10
|
+
const money = (value) => Math.round((value + Number.EPSILON) * 100) / 100;
|
|
11
|
+
const decimal = (value) => String(money(value));
|
|
12
|
+
const now = () => new Date().toISOString();
|
|
13
|
+
async function currencyOf(ctx) {
|
|
14
|
+
if (!ctx.scope.company)
|
|
15
|
+
throw new Error('point of sale requires an active company');
|
|
16
|
+
const company = (await ctx.db.select('company.Company', { id: ctx.scope.company }))[0];
|
|
17
|
+
if (!company)
|
|
18
|
+
throw new Error(`company ${ctx.scope.company} does not exist`);
|
|
19
|
+
return String(company.currency);
|
|
20
|
+
}
|
|
21
|
+
async function productOf(ctx, id) {
|
|
22
|
+
const product = (await ctx.db.select('product.Product', { id }))[0];
|
|
23
|
+
const template = product && (await ctx.db.select('product.Template', { id: product.templateId }))[0];
|
|
24
|
+
return product && template ? { product, template } : null;
|
|
25
|
+
}
|
|
26
|
+
async function nextOrderNumber(ctx, sessionId) {
|
|
27
|
+
const key = String(sessionId);
|
|
28
|
+
await ctx.db.insertIfAbsent('pos.Sequence', { id: key, nextNumber: 1 });
|
|
29
|
+
for (let attempt = 0; attempt < 32; attempt += 1) {
|
|
30
|
+
const row = (await ctx.db.select('pos.Sequence', { id: key }))[0];
|
|
31
|
+
const current = n(row.nextNumber);
|
|
32
|
+
const changed = await ctx.db.compareAndSet('pos.Sequence', { id: key }, { nextNumber: row.nextNumber }, { nextNumber: current + 1 });
|
|
33
|
+
if ('dryRun' in changed || changed.matched)
|
|
34
|
+
return current;
|
|
35
|
+
}
|
|
36
|
+
throw new Error('POS order sequence did not settle after concurrent updates');
|
|
37
|
+
}
|
|
38
|
+
function taxAmounts(tax, gross, quantity) {
|
|
39
|
+
if (!tax)
|
|
40
|
+
return { untaxed: money(gross), tax: 0, total: money(gross) };
|
|
41
|
+
if (tax.amountType === 'group')
|
|
42
|
+
throw new Error('group taxes are outside the supported Odoo 19 POS subset');
|
|
43
|
+
const amount = n(tax.amount), rate = amount / 100;
|
|
44
|
+
let untaxed = money(gross), taxAmount = 0;
|
|
45
|
+
if (tax.amountType === 'fixed') {
|
|
46
|
+
taxAmount = money(amount * quantity);
|
|
47
|
+
if (tax.priceInclude)
|
|
48
|
+
untaxed = money(gross - taxAmount);
|
|
49
|
+
return { untaxed, tax: taxAmount, total: tax.priceInclude ? money(gross) : money(gross + taxAmount) };
|
|
50
|
+
}
|
|
51
|
+
if (tax.amountType === 'division') {
|
|
52
|
+
if (tax.priceInclude) {
|
|
53
|
+
untaxed = money(gross * (1 - rate));
|
|
54
|
+
taxAmount = money(gross - untaxed);
|
|
55
|
+
}
|
|
56
|
+
else
|
|
57
|
+
taxAmount = money(gross / (1 - rate) - gross);
|
|
58
|
+
}
|
|
59
|
+
else if (tax.priceInclude) {
|
|
60
|
+
untaxed = money(gross / (1 + rate));
|
|
61
|
+
taxAmount = money(gross - untaxed);
|
|
62
|
+
}
|
|
63
|
+
else
|
|
64
|
+
taxAmount = money(gross * rate);
|
|
65
|
+
return { untaxed, tax: taxAmount, total: money(untaxed + taxAmount) };
|
|
66
|
+
}
|
|
67
|
+
async function recompute(ctx, orderId) {
|
|
68
|
+
let untaxed = 0, tax = 0;
|
|
69
|
+
for (const line of await ctx.db.select('pos.OrderLine', { orderId })) {
|
|
70
|
+
const held = line.taxId ? ((await ctx.db.select('account.Tax', { id: line.taxId }))[0] ?? null) : null;
|
|
71
|
+
const amounts = taxAmounts(held, money(n(line.qty) * n(line.priceUnit) * (1 - n(line.discount) / 100)), n(line.qty));
|
|
72
|
+
untaxed = money(untaxed + amounts.untaxed);
|
|
73
|
+
tax = money(tax + amounts.tax);
|
|
74
|
+
await ctx.db.update('pos.OrderLine', { id: line.id }, { priceSubtotal: decimal(amounts.untaxed), priceSubtotalIncl: decimal(amounts.total) });
|
|
75
|
+
}
|
|
76
|
+
const payments = await ctx.db.select('pos.Payment', { orderId }), paid = money(payments.reduce((sum, payment) => sum + n(payment.amount), 0));
|
|
77
|
+
await ctx.db.update('pos.Order', { id: orderId }, {
|
|
78
|
+
amountUntaxed: decimal(untaxed),
|
|
79
|
+
amountTax: decimal(tax),
|
|
80
|
+
amountTotal: decimal(untaxed + tax),
|
|
81
|
+
amountPaid: decimal(paid),
|
|
82
|
+
amountReturn: decimal(paid - untaxed - tax),
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
async function createAccounting(ctx, order, config, lines, payments) {
|
|
86
|
+
const id = `${String(order.id)}:account`, existing = (await ctx.db.select('account.Move', { id }))[0];
|
|
87
|
+
if (existing)
|
|
88
|
+
return id;
|
|
89
|
+
const invoice = Boolean(order.toInvoice), refund = n(order.amountTotal) < 0, date = String(order.dateOrder), total = Math.abs(n(order.amountTotal)), untaxed = Math.abs(n(order.amountUntaxed)), tax = Math.abs(n(order.amountTax));
|
|
90
|
+
if (invoice && !order.partnerId)
|
|
91
|
+
throw new Error('a customer is required to invoice a POS order');
|
|
92
|
+
if (tax && !config.taxAccountId)
|
|
93
|
+
throw new Error('a tax account is required for taxed POS orders');
|
|
94
|
+
await ctx.tx(async (tx) => {
|
|
95
|
+
await tx.db.insert('account.Move', {
|
|
96
|
+
id,
|
|
97
|
+
name: id,
|
|
98
|
+
ref: order.posReference,
|
|
99
|
+
date,
|
|
100
|
+
moveType: invoice ? (refund ? 'out_refund' : 'out_invoice') : 'entry',
|
|
101
|
+
state: 'draft',
|
|
102
|
+
journalId: config.salesJournalId,
|
|
103
|
+
partnerId: order.partnerId ?? null,
|
|
104
|
+
invoiceDate: invoice ? date : null,
|
|
105
|
+
invoiceDateDue: invoice ? date : null,
|
|
106
|
+
paymentTermId: null,
|
|
107
|
+
paymentState: invoice ? 'not_paid' : 'paid',
|
|
108
|
+
currency: order.currency,
|
|
109
|
+
amountUntaxed: decimal(untaxed),
|
|
110
|
+
amountTax: decimal(tax),
|
|
111
|
+
amountTotal: decimal(total),
|
|
112
|
+
postedAt: null,
|
|
113
|
+
});
|
|
114
|
+
let sequence = 10;
|
|
115
|
+
for (const line of lines) {
|
|
116
|
+
// Revenue follows the signed line subtotal. A negative Loyalty line is a
|
|
117
|
+
// contra-revenue debit on a sale, and becomes a credit when a refund
|
|
118
|
+
// reverses it. Looking only at the order direction would overstate revenue.
|
|
119
|
+
const balance = -n(line.priceSubtotal), debit = Math.max(0, balance), credit = Math.max(0, -balance);
|
|
120
|
+
await tx.db.insert('account.MoveLine', {
|
|
121
|
+
id: `${id}:line:${String(line.id)}`,
|
|
122
|
+
moveId: id,
|
|
123
|
+
name: line.name,
|
|
124
|
+
accountId: config.revenueAccountId,
|
|
125
|
+
partnerId: order.partnerId ?? null,
|
|
126
|
+
productId: line.productId,
|
|
127
|
+
productUomId: line.productUomId,
|
|
128
|
+
quantity: decimal(Math.abs(n(line.qty))),
|
|
129
|
+
priceUnit: line.priceUnit,
|
|
130
|
+
discount: line.discount,
|
|
131
|
+
taxId: line.taxId,
|
|
132
|
+
debit: decimal(debit),
|
|
133
|
+
credit: decimal(credit),
|
|
134
|
+
balance: decimal(balance),
|
|
135
|
+
dateMaturity: null,
|
|
136
|
+
displayType: null,
|
|
137
|
+
reconciled: false,
|
|
138
|
+
amountResidual: '0',
|
|
139
|
+
sequence,
|
|
140
|
+
posLineId: line.id,
|
|
141
|
+
});
|
|
142
|
+
sequence += 10;
|
|
143
|
+
}
|
|
144
|
+
if (tax)
|
|
145
|
+
await tx.db.insert('account.MoveLine', {
|
|
146
|
+
id: `${id}:tax`,
|
|
147
|
+
moveId: id,
|
|
148
|
+
name: 'Tax',
|
|
149
|
+
accountId: config.taxAccountId,
|
|
150
|
+
partnerId: order.partnerId ?? null,
|
|
151
|
+
productId: null,
|
|
152
|
+
productUomId: null,
|
|
153
|
+
quantity: '1',
|
|
154
|
+
priceUnit: decimal(tax),
|
|
155
|
+
discount: '0',
|
|
156
|
+
taxId: null,
|
|
157
|
+
debit: refund ? decimal(tax) : '0',
|
|
158
|
+
credit: refund ? '0' : decimal(tax),
|
|
159
|
+
balance: decimal(refund ? tax : -tax),
|
|
160
|
+
dateMaturity: null,
|
|
161
|
+
displayType: null,
|
|
162
|
+
reconciled: false,
|
|
163
|
+
amountResidual: '0',
|
|
164
|
+
sequence: 900,
|
|
165
|
+
});
|
|
166
|
+
if (invoice) {
|
|
167
|
+
await tx.db.insert('account.MoveLine', {
|
|
168
|
+
id: `${id}:counterpart`,
|
|
169
|
+
moveId: id,
|
|
170
|
+
name: order.posReference,
|
|
171
|
+
accountId: config.receivableAccountId,
|
|
172
|
+
partnerId: order.partnerId,
|
|
173
|
+
productId: null,
|
|
174
|
+
productUomId: null,
|
|
175
|
+
quantity: '1',
|
|
176
|
+
priceUnit: decimal(total),
|
|
177
|
+
discount: '0',
|
|
178
|
+
taxId: null,
|
|
179
|
+
debit: refund ? '0' : decimal(total),
|
|
180
|
+
credit: refund ? decimal(total) : '0',
|
|
181
|
+
balance: decimal(refund ? -total : total),
|
|
182
|
+
dateMaturity: date,
|
|
183
|
+
displayType: null,
|
|
184
|
+
reconciled: false,
|
|
185
|
+
amountResidual: decimal(total),
|
|
186
|
+
sequence: 1000,
|
|
187
|
+
});
|
|
188
|
+
}
|
|
189
|
+
else {
|
|
190
|
+
let paymentSequence = 1000;
|
|
191
|
+
for (const payment of payments) {
|
|
192
|
+
const method = (await tx.db.select('pos.PaymentMethod', { id: payment.paymentMethodId }))[0], journal = (await tx.db.select('account.Journal', { id: method.journalId }))[0];
|
|
193
|
+
const amount = Math.abs(n(payment.amount));
|
|
194
|
+
await tx.db.insert('account.MoveLine', {
|
|
195
|
+
id: `${id}:payment:${String(payment.id)}`,
|
|
196
|
+
moveId: id,
|
|
197
|
+
name: method.name,
|
|
198
|
+
accountId: journal.defaultAccountId,
|
|
199
|
+
partnerId: order.partnerId ?? null,
|
|
200
|
+
productId: null,
|
|
201
|
+
productUomId: null,
|
|
202
|
+
quantity: '1',
|
|
203
|
+
priceUnit: decimal(amount),
|
|
204
|
+
discount: '0',
|
|
205
|
+
taxId: null,
|
|
206
|
+
debit: refund ? '0' : decimal(amount),
|
|
207
|
+
credit: refund ? decimal(amount) : '0',
|
|
208
|
+
balance: decimal(refund ? -amount : amount),
|
|
209
|
+
dateMaturity: null,
|
|
210
|
+
displayType: null,
|
|
211
|
+
reconciled: false,
|
|
212
|
+
amountResidual: '0',
|
|
213
|
+
sequence: paymentSequence,
|
|
214
|
+
});
|
|
215
|
+
paymentSequence += 10;
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
});
|
|
219
|
+
const posted = (await accountFunctions.postMove.handler(ctx, { id }));
|
|
220
|
+
if (posted.ok !== true)
|
|
221
|
+
throw new Error(String(posted.errors?.[0]?.message ?? 'POS accounting move could not be posted'));
|
|
222
|
+
if (invoice) {
|
|
223
|
+
for (const payment of payments) {
|
|
224
|
+
const method = (await ctx.db.select('pos.PaymentMethod', { id: payment.paymentMethodId }))[0];
|
|
225
|
+
const result = (await accountFunctions.registerPayment.handler(ctx, {
|
|
226
|
+
id: `${String(payment.id)}:account`,
|
|
227
|
+
name: String(order.posReference),
|
|
228
|
+
paymentType: refund ? 'outbound' : 'inbound',
|
|
229
|
+
partnerType: 'customer',
|
|
230
|
+
partnerId: order.partnerId,
|
|
231
|
+
journalId: method.journalId,
|
|
232
|
+
destinationAccountId: config.receivableAccountId,
|
|
233
|
+
amount: decimal(Math.abs(n(payment.amount))),
|
|
234
|
+
date,
|
|
235
|
+
paymentReference: order.posReference,
|
|
236
|
+
reconcileLineId: `${id}:counterpart`,
|
|
237
|
+
}));
|
|
238
|
+
if (result.ok !== true)
|
|
239
|
+
throw new Error(String(result.errors?.[0]?.message ?? 'POS payment could not be posted'));
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
return id;
|
|
243
|
+
}
|
|
244
|
+
const stockEffects = [
|
|
245
|
+
...(stockFunctions.createPicking.effects ?? []),
|
|
246
|
+
...(stockFunctions.addMove.effects ?? []),
|
|
247
|
+
...(stockFunctions.confirmPicking.effects ?? []),
|
|
248
|
+
...(stockFunctions.reserveMove.effects ?? []),
|
|
249
|
+
...(stockFunctions.saveMoveLine.effects ?? []),
|
|
250
|
+
...(stockFunctions.completePicking.effects ?? []),
|
|
251
|
+
];
|
|
252
|
+
const accountEffects = [
|
|
253
|
+
...(accountFunctions.postMove.effects ?? []),
|
|
254
|
+
...(accountFunctions.registerPayment.effects ?? []),
|
|
255
|
+
];
|
|
256
|
+
export const functions = {
|
|
257
|
+
listConfigs: defineFn({
|
|
258
|
+
input: {},
|
|
259
|
+
effects: ['read:pos.Config'],
|
|
260
|
+
agent: true,
|
|
261
|
+
handler: (ctx) => ctx.db.select('pos.Config', { active: true }),
|
|
262
|
+
}),
|
|
263
|
+
saveConfig: defineFn({
|
|
264
|
+
input: {
|
|
265
|
+
id: 'id',
|
|
266
|
+
name: 'text',
|
|
267
|
+
warehouseId: 'id',
|
|
268
|
+
pricelistId: 'id?',
|
|
269
|
+
salesJournalId: 'id',
|
|
270
|
+
revenueAccountId: 'id',
|
|
271
|
+
receivableAccountId: 'id',
|
|
272
|
+
taxAccountId: 'id?',
|
|
273
|
+
maximumDifference: 'decimal?',
|
|
274
|
+
},
|
|
275
|
+
output: { ok: 'bool', id: 'id?', errors: 'json?' },
|
|
276
|
+
effects: [
|
|
277
|
+
'read:pos.Config',
|
|
278
|
+
'write:pos.Config',
|
|
279
|
+
'read:stock.Warehouse',
|
|
280
|
+
'read:pricing.Pricelist',
|
|
281
|
+
'read:account.Journal',
|
|
282
|
+
'read:account.Account',
|
|
283
|
+
],
|
|
284
|
+
idempotent: true,
|
|
285
|
+
agent: true,
|
|
286
|
+
handler: async (ctx, args) => {
|
|
287
|
+
if (!(await ctx.db.select('stock.Warehouse', { id: args.warehouseId }))[0])
|
|
288
|
+
return invalid('warehouseId', 'warehouse does not exist');
|
|
289
|
+
const journal = (await ctx.db.select('account.Journal', { id: args.salesJournalId }))[0];
|
|
290
|
+
if (journal?.type !== 'sale')
|
|
291
|
+
return invalid('salesJournalId', 'a sales journal is required');
|
|
292
|
+
const revenue = (await ctx.db.select('account.Account', { id: args.revenueAccountId }))[0], receivable = (await ctx.db.select('account.Account', { id: args.receivableAccountId }))[0];
|
|
293
|
+
if (!revenue || !String(revenue.accountType).startsWith('income'))
|
|
294
|
+
return invalid('revenueAccountId', 'an income account is required');
|
|
295
|
+
if (receivable?.accountType !== 'asset_receivable')
|
|
296
|
+
return invalid('receivableAccountId', 'a receivable account is required');
|
|
297
|
+
if (args.taxAccountId && !(await ctx.db.select('account.Account', { id: args.taxAccountId }))[0])
|
|
298
|
+
return invalid('taxAccountId', 'tax account does not exist');
|
|
299
|
+
const existing = (await ctx.db.select('pos.Config', { id: args.id }))[0], values = {
|
|
300
|
+
name: args.name,
|
|
301
|
+
warehouseId: args.warehouseId,
|
|
302
|
+
pricelistId: args.pricelistId ?? null,
|
|
303
|
+
salesJournalId: args.salesJournalId,
|
|
304
|
+
revenueAccountId: args.revenueAccountId,
|
|
305
|
+
receivableAccountId: args.receivableAccountId,
|
|
306
|
+
taxAccountId: args.taxAccountId ?? null,
|
|
307
|
+
maximumDifference: args.maximumDifference ?? '0',
|
|
308
|
+
active: true,
|
|
309
|
+
};
|
|
310
|
+
if (existing)
|
|
311
|
+
await ctx.db.update('pos.Config', { id: args.id }, values);
|
|
312
|
+
else
|
|
313
|
+
await ctx.db.insert('pos.Config', { id: args.id, ...values });
|
|
314
|
+
return { ok: true, id: args.id };
|
|
315
|
+
},
|
|
316
|
+
}),
|
|
317
|
+
listPaymentMethods: defineFn({
|
|
318
|
+
input: {},
|
|
319
|
+
effects: ['read:pos.PaymentMethod'],
|
|
320
|
+
agent: true,
|
|
321
|
+
handler: (ctx) => ctx.db.select('pos.PaymentMethod', { active: true }),
|
|
322
|
+
}),
|
|
323
|
+
savePaymentMethod: defineFn({
|
|
324
|
+
input: { id: 'id', name: 'text', journalId: 'id', isCash: 'bool?' },
|
|
325
|
+
output: { ok: 'bool', id: 'id?', errors: 'json?' },
|
|
326
|
+
effects: ['read:pos.PaymentMethod', 'write:pos.PaymentMethod', 'read:account.Journal'],
|
|
327
|
+
idempotent: true,
|
|
328
|
+
agent: true,
|
|
329
|
+
handler: async (ctx, args) => {
|
|
330
|
+
const journal = (await ctx.db.select('account.Journal', { id: args.journalId }))[0];
|
|
331
|
+
if (!journal?.defaultAccountId || !['cash', 'bank'].includes(String(journal.type)))
|
|
332
|
+
return invalid('journalId', 'payment method requires a cash or bank journal with a default account');
|
|
333
|
+
const existing = (await ctx.db.select('pos.PaymentMethod', { id: args.id }))[0], values = { name: args.name, journalId: args.journalId, isCash: Boolean(args.isCash), active: true };
|
|
334
|
+
if (existing)
|
|
335
|
+
await ctx.db.update('pos.PaymentMethod', { id: args.id }, values);
|
|
336
|
+
else
|
|
337
|
+
await ctx.db.insert('pos.PaymentMethod', { id: args.id, ...values });
|
|
338
|
+
return { ok: true, id: args.id };
|
|
339
|
+
},
|
|
340
|
+
}),
|
|
341
|
+
linkPaymentMethod: defineFn({
|
|
342
|
+
input: { id: 'id', configId: 'id', paymentMethodId: 'id' },
|
|
343
|
+
output: { ok: 'bool', id: 'id?', errors: 'json?' },
|
|
344
|
+
effects: ['read:pos.Config', 'read:pos.PaymentMethod', 'write:pos.ConfigPaymentMethod'],
|
|
345
|
+
idempotent: true,
|
|
346
|
+
agent: true,
|
|
347
|
+
handler: async (ctx, args) => {
|
|
348
|
+
if (!(await ctx.db.select('pos.Config', { id: args.configId }))[0])
|
|
349
|
+
return invalid('configId', 'point of sale does not exist');
|
|
350
|
+
if (!(await ctx.db.select('pos.PaymentMethod', { id: args.paymentMethodId }))[0])
|
|
351
|
+
return invalid('paymentMethodId', 'payment method does not exist');
|
|
352
|
+
await ctx.db.insertIfAbsent('pos.ConfigPaymentMethod', args);
|
|
353
|
+
return { ok: true, id: args.id };
|
|
354
|
+
},
|
|
355
|
+
}),
|
|
356
|
+
paymentMethodAvailable: defineFn({
|
|
357
|
+
input: { configId: 'id', paymentMethodId: 'id' },
|
|
358
|
+
output: { ok: 'bool' },
|
|
359
|
+
effects: ['read:pos.ConfigPaymentMethod'],
|
|
360
|
+
agent: true,
|
|
361
|
+
handler: async (ctx, args) => ({
|
|
362
|
+
ok: Boolean((await ctx.db.select('pos.ConfigPaymentMethod', {
|
|
363
|
+
configId: args.configId,
|
|
364
|
+
paymentMethodId: args.paymentMethodId,
|
|
365
|
+
}))[0]),
|
|
366
|
+
}),
|
|
367
|
+
}),
|
|
368
|
+
listSessions: defineFn({
|
|
369
|
+
input: { state: 'text?' },
|
|
370
|
+
effects: ['read:pos.Session'],
|
|
371
|
+
agent: true,
|
|
372
|
+
handler: (ctx, args) => args.state ? ctx.db.select('pos.Session', { state: args.state }) : ctx.db.select('pos.Session'),
|
|
373
|
+
}),
|
|
374
|
+
getSession: defineFn({
|
|
375
|
+
input: { id: 'id' },
|
|
376
|
+
effects: ['read:pos.Session', 'read:pos.Order', 'read:pos.Payment', 'read:pos.PaymentMethod'],
|
|
377
|
+
agent: true,
|
|
378
|
+
handler: async (ctx, args) => {
|
|
379
|
+
const session = (await ctx.db.select('pos.Session', { id: args.id }))[0];
|
|
380
|
+
if (!session)
|
|
381
|
+
return null;
|
|
382
|
+
const orders = await ctx.db.select('pos.Order', { sessionId: args.id });
|
|
383
|
+
let expectedCash = n(session.cashRegisterBalanceStart);
|
|
384
|
+
for (const order of orders)
|
|
385
|
+
for (const payment of await ctx.db.select('pos.Payment', { orderId: order.id })) {
|
|
386
|
+
const method = (await ctx.db.select('pos.PaymentMethod', { id: payment.paymentMethodId }))[0];
|
|
387
|
+
if (method?.isCash)
|
|
388
|
+
expectedCash += n(payment.amount);
|
|
389
|
+
}
|
|
390
|
+
return { ...session, cashRegisterBalanceEnd: decimal(expectedCash), orders };
|
|
391
|
+
},
|
|
392
|
+
}),
|
|
393
|
+
createSession: defineFn({
|
|
394
|
+
input: { id: 'id', configId: 'id', userId: 'id', openingCash: 'decimal?', openingNotes: 'text?' },
|
|
395
|
+
output: { ok: 'bool', id: 'id?', errors: 'json?' },
|
|
396
|
+
effects: ['read:pos.Session', 'write:pos.Session', 'read:pos.Config', 'read:user.User'],
|
|
397
|
+
idempotent: true,
|
|
398
|
+
agent: true,
|
|
399
|
+
handler: async (ctx, args) => {
|
|
400
|
+
const existing = (await ctx.db.select('pos.Session', { id: args.id }))[0];
|
|
401
|
+
if (existing)
|
|
402
|
+
return { ok: true, id: args.id };
|
|
403
|
+
if (!(await ctx.db.select('pos.Config', { id: args.configId }))[0])
|
|
404
|
+
return invalid('configId', 'point of sale does not exist');
|
|
405
|
+
if (!(await ctx.db.select('user.User', { id: args.userId }))[0])
|
|
406
|
+
return invalid('userId', 'operator does not exist');
|
|
407
|
+
const active = (await ctx.db.select('pos.Session', { configId: args.configId })).find((row) => row.state !== 'closed');
|
|
408
|
+
if (active)
|
|
409
|
+
return invalid('configId', 'this point of sale already has an active session');
|
|
410
|
+
await ctx.db.insert('pos.Session', {
|
|
411
|
+
id: args.id,
|
|
412
|
+
name: `POS/${String(args.id)}`,
|
|
413
|
+
configId: args.configId,
|
|
414
|
+
userId: args.userId,
|
|
415
|
+
state: 'opening_control',
|
|
416
|
+
startAt: null,
|
|
417
|
+
stopAt: null,
|
|
418
|
+
openingNotes: args.openingNotes ?? null,
|
|
419
|
+
closingNotes: null,
|
|
420
|
+
cashRegisterBalanceStart: args.openingCash ?? '0',
|
|
421
|
+
cashRegisterBalanceEnd: args.openingCash ?? '0',
|
|
422
|
+
cashRegisterBalanceEndReal: args.openingCash ?? '0',
|
|
423
|
+
cashRegisterDifference: '0',
|
|
424
|
+
});
|
|
425
|
+
return { ok: true, id: args.id };
|
|
426
|
+
},
|
|
427
|
+
}),
|
|
428
|
+
openSession: defineFn({
|
|
429
|
+
input: { id: 'id' },
|
|
430
|
+
output: { ok: 'bool', id: 'id?', errors: 'json?' },
|
|
431
|
+
effects: ['read:pos.Session', 'write:pos.Session'],
|
|
432
|
+
idempotent: true,
|
|
433
|
+
agent: true,
|
|
434
|
+
handler: async (ctx, args) => {
|
|
435
|
+
const session = (await ctx.db.select('pos.Session', { id: args.id }))[0];
|
|
436
|
+
if (!session || !['opening_control', 'opened'].includes(String(session.state)))
|
|
437
|
+
return invalid('state', 'only opening control can be opened');
|
|
438
|
+
await ctx.db.update('pos.Session', { id: args.id }, { state: 'opened', startAt: session.startAt ?? now() });
|
|
439
|
+
return { ok: true, id: args.id };
|
|
440
|
+
},
|
|
441
|
+
}),
|
|
442
|
+
startClosing: defineFn({
|
|
443
|
+
input: { id: 'id' },
|
|
444
|
+
output: { ok: 'bool', id: 'id?', errors: 'json?' },
|
|
445
|
+
effects: ['read:pos.Session', 'read:pos.Order', 'write:pos.Session'],
|
|
446
|
+
idempotent: true,
|
|
447
|
+
agent: true,
|
|
448
|
+
handler: async (ctx, args) => {
|
|
449
|
+
const session = (await ctx.db.select('pos.Session', { id: args.id }))[0];
|
|
450
|
+
if (!session || !['opened', 'closing_control'].includes(String(session.state)))
|
|
451
|
+
return invalid('state', 'only an open session can enter closing control');
|
|
452
|
+
if ((await ctx.db.select('pos.Order', { sessionId: args.id })).some((order) => order.state === 'draft'))
|
|
453
|
+
return invalid('orders', 'pay or cancel every draft order before closing');
|
|
454
|
+
await ctx.db.update('pos.Session', { id: args.id }, { state: 'closing_control' });
|
|
455
|
+
return { ok: true, id: args.id };
|
|
456
|
+
},
|
|
457
|
+
}),
|
|
458
|
+
closeSession: defineFn({
|
|
459
|
+
input: { id: 'id', closingCash: 'decimal', closingNotes: 'text?' },
|
|
460
|
+
output: { ok: 'bool', id: 'id?', difference: 'decimal?', errors: 'json?' },
|
|
461
|
+
effects: [
|
|
462
|
+
'read:pos.Session',
|
|
463
|
+
'write:pos.Session',
|
|
464
|
+
'read:pos.Config',
|
|
465
|
+
'read:pos.Order',
|
|
466
|
+
'read:pos.Payment',
|
|
467
|
+
'read:pos.PaymentMethod',
|
|
468
|
+
'write:pos.Order',
|
|
469
|
+
],
|
|
470
|
+
idempotent: true,
|
|
471
|
+
agent: true,
|
|
472
|
+
handler: async (ctx, args) => {
|
|
473
|
+
const session = (await ctx.db.select('pos.Session', { id: args.id }))[0];
|
|
474
|
+
if (!session)
|
|
475
|
+
return invalid('id', 'session does not exist');
|
|
476
|
+
if (session.state === 'closed')
|
|
477
|
+
return { ok: true, id: args.id, difference: session.cashRegisterDifference };
|
|
478
|
+
if (session.state !== 'closing_control')
|
|
479
|
+
return invalid('state', 'session must be in closing control');
|
|
480
|
+
const config = (await ctx.db.select('pos.Config', { id: session.configId }))[0], orders = await ctx.db.select('pos.Order', { sessionId: args.id });
|
|
481
|
+
let cash = n(session.cashRegisterBalanceStart);
|
|
482
|
+
for (const order of orders)
|
|
483
|
+
for (const payment of await ctx.db.select('pos.Payment', { orderId: order.id })) {
|
|
484
|
+
const method = (await ctx.db.select('pos.PaymentMethod', { id: payment.paymentMethodId }))[0];
|
|
485
|
+
if (method?.isCash)
|
|
486
|
+
cash += n(payment.amount);
|
|
487
|
+
}
|
|
488
|
+
const difference = money(n(args.closingCash) - cash);
|
|
489
|
+
if (Math.abs(difference) - n(config.maximumDifference) > 0.000001)
|
|
490
|
+
return invalid('closingCash', 'cash difference exceeds the configured maximum');
|
|
491
|
+
for (const order of orders)
|
|
492
|
+
if (order.state === 'paid')
|
|
493
|
+
await ctx.db.update('pos.Order', { id: order.id }, { state: 'done' });
|
|
494
|
+
await ctx.db.update('pos.Session', { id: args.id }, {
|
|
495
|
+
state: 'closed',
|
|
496
|
+
stopAt: now(),
|
|
497
|
+
closingNotes: args.closingNotes ?? null,
|
|
498
|
+
cashRegisterBalanceEnd: decimal(cash),
|
|
499
|
+
cashRegisterBalanceEndReal: args.closingCash,
|
|
500
|
+
cashRegisterDifference: decimal(difference),
|
|
501
|
+
});
|
|
502
|
+
return { ok: true, id: args.id, difference: decimal(difference) };
|
|
503
|
+
},
|
|
504
|
+
}),
|
|
505
|
+
listOrders: defineFn({
|
|
506
|
+
input: { state: 'text?', sessionId: 'id?' },
|
|
507
|
+
effects: ['read:pos.Order'],
|
|
508
|
+
agent: true,
|
|
509
|
+
handler: (ctx, args) => ctx.db.select('pos.Order', {
|
|
510
|
+
...(args.state ? { state: args.state } : {}),
|
|
511
|
+
...(args.sessionId ? { sessionId: args.sessionId } : {}),
|
|
512
|
+
}),
|
|
513
|
+
}),
|
|
514
|
+
getOrder: defineFn({
|
|
515
|
+
input: { id: 'id' },
|
|
516
|
+
effects: ['read:pos.Order', 'read:pos.OrderLine', 'read:pos.Payment'],
|
|
517
|
+
agent: true,
|
|
518
|
+
handler: async (ctx, args) => {
|
|
519
|
+
const order = (await ctx.db.select('pos.Order', { id: args.id }))[0];
|
|
520
|
+
return order
|
|
521
|
+
? {
|
|
522
|
+
...order,
|
|
523
|
+
lines: await ctx.db.select('pos.OrderLine', { orderId: args.id }),
|
|
524
|
+
payments: await ctx.db.select('pos.Payment', { orderId: args.id }),
|
|
525
|
+
}
|
|
526
|
+
: null;
|
|
527
|
+
},
|
|
528
|
+
}),
|
|
529
|
+
createOrder: defineFn({
|
|
530
|
+
input: { id: 'id', uuid: 'text?', sessionId: 'id', partnerId: 'id?', toInvoice: 'bool?', note: 'text?' },
|
|
531
|
+
output: { ok: 'bool', id: 'id?', name: 'text?', errors: 'json?' },
|
|
532
|
+
effects: [
|
|
533
|
+
'read:pos.Sequence',
|
|
534
|
+
'write:pos.Sequence',
|
|
535
|
+
'read:pos.Session',
|
|
536
|
+
'read:pos.Config',
|
|
537
|
+
'read:pos.Order',
|
|
538
|
+
'write:pos.Order',
|
|
539
|
+
'read:partner.Partner',
|
|
540
|
+
'read:company.Company',
|
|
541
|
+
],
|
|
542
|
+
idempotent: true,
|
|
543
|
+
agent: true,
|
|
544
|
+
handler: async (ctx, args) => {
|
|
545
|
+
const existing = (await ctx.db.select('pos.Order', { id: args.id }))[0];
|
|
546
|
+
if (existing)
|
|
547
|
+
return { ok: true, id: args.id, name: existing.name };
|
|
548
|
+
if (args.uuid) {
|
|
549
|
+
const offline = (await ctx.db.select('pos.Order', { uuid: args.uuid }))[0];
|
|
550
|
+
if (offline)
|
|
551
|
+
return { ok: true, id: offline.id, name: offline.name };
|
|
552
|
+
}
|
|
553
|
+
const session = (await ctx.db.select('pos.Session', { id: args.sessionId }))[0];
|
|
554
|
+
if (session?.state !== 'opened')
|
|
555
|
+
return invalid('sessionId', 'orders require an open POS session');
|
|
556
|
+
if (args.partnerId && !(await ctx.db.select('partner.Partner', { id: args.partnerId }))[0])
|
|
557
|
+
return invalid('partnerId', 'customer does not exist');
|
|
558
|
+
if (args.toInvoice && !args.partnerId)
|
|
559
|
+
return invalid('partnerId', 'invoiced POS orders require a customer');
|
|
560
|
+
const sequenceNumber = await nextOrderNumber(ctx, args.sessionId), name = `Order ${String(sequenceNumber).padStart(5, '0')}`, posReference = `POS/${String(sequenceNumber).padStart(5, '0')}`;
|
|
561
|
+
await ctx.db.insert('pos.Order', {
|
|
562
|
+
id: args.id,
|
|
563
|
+
uuid: args.uuid ?? args.id,
|
|
564
|
+
name,
|
|
565
|
+
posReference,
|
|
566
|
+
sequenceNumber,
|
|
567
|
+
sessionId: args.sessionId,
|
|
568
|
+
configId: session.configId,
|
|
569
|
+
partnerId: args.partnerId ?? null,
|
|
570
|
+
state: 'draft',
|
|
571
|
+
invoiceStatus: args.toInvoice ? 'to_invoice' : 'to_invoice',
|
|
572
|
+
isRefund: false,
|
|
573
|
+
refundedOrderId: null,
|
|
574
|
+
dateOrder: now(),
|
|
575
|
+
currency: await currencyOf(ctx),
|
|
576
|
+
amountUntaxed: '0',
|
|
577
|
+
amountTax: '0',
|
|
578
|
+
amountTotal: '0',
|
|
579
|
+
amountPaid: '0',
|
|
580
|
+
amountReturn: '0',
|
|
581
|
+
toInvoice: Boolean(args.toInvoice),
|
|
582
|
+
accountMoveId: null,
|
|
583
|
+
pickingId: null,
|
|
584
|
+
note: args.note ?? null,
|
|
585
|
+
});
|
|
586
|
+
return { ok: true, id: args.id, name };
|
|
587
|
+
},
|
|
588
|
+
}),
|
|
589
|
+
addLine: defineFn({
|
|
590
|
+
input: {
|
|
591
|
+
id: 'id',
|
|
592
|
+
orderId: 'id',
|
|
593
|
+
productId: 'id',
|
|
594
|
+
productUomId: 'id',
|
|
595
|
+
qty: 'decimal',
|
|
596
|
+
priceUnit: 'decimal?',
|
|
597
|
+
discount: 'decimal?',
|
|
598
|
+
taxId: 'id?',
|
|
599
|
+
},
|
|
600
|
+
output: { ok: 'bool', id: 'id?', priceUnit: 'decimal?', errors: 'json?' },
|
|
601
|
+
effects: [
|
|
602
|
+
'read:pos.Order',
|
|
603
|
+
'read:pos.Config',
|
|
604
|
+
'read:pos.OrderLine',
|
|
605
|
+
'write:pos.OrderLine',
|
|
606
|
+
'read:pos.Payment',
|
|
607
|
+
'write:pos.Order',
|
|
608
|
+
'read:product.Product',
|
|
609
|
+
'read:product.Template',
|
|
610
|
+
'read:product.Category',
|
|
611
|
+
'read:product.Cost',
|
|
612
|
+
'read:uom.Unit',
|
|
613
|
+
'read:pricing.Pricelist',
|
|
614
|
+
'read:pricing.PricelistItem',
|
|
615
|
+
'read:account.Tax',
|
|
616
|
+
],
|
|
617
|
+
idempotent: true,
|
|
618
|
+
agent: true,
|
|
619
|
+
handler: async (ctx, args) => {
|
|
620
|
+
const order = (await ctx.db.select('pos.Order', { id: args.orderId }))[0];
|
|
621
|
+
if (order?.state !== 'draft' || order.isRefund)
|
|
622
|
+
return invalid('orderId', 'products can only be added to a new non-refund order');
|
|
623
|
+
if (!(n(args.qty) > 0))
|
|
624
|
+
return invalid('qty', 'quantity must be positive');
|
|
625
|
+
const product = await productOf(ctx, args.productId);
|
|
626
|
+
if (!product?.template.saleOk)
|
|
627
|
+
return invalid('productId', 'product is not available for sale');
|
|
628
|
+
if (!(await ctx.db.select('uom.Unit', { id: args.productUomId }))[0])
|
|
629
|
+
return invalid('productUomId', 'unit does not exist');
|
|
630
|
+
const config = (await ctx.db.select('pos.Config', { id: order.configId }))[0], discount = args.discount ?? '0';
|
|
631
|
+
let priceUnit = args.priceUnit;
|
|
632
|
+
if (priceUnit === undefined && config.pricelistId) {
|
|
633
|
+
const result = (await pricingFunctions.priceFor.handler(ctx, {
|
|
634
|
+
pricelistId: config.pricelistId,
|
|
635
|
+
productId: args.productId,
|
|
636
|
+
quantity: args.qty,
|
|
637
|
+
uomId: args.productUomId,
|
|
638
|
+
date: order.dateOrder,
|
|
639
|
+
}));
|
|
640
|
+
if (result.ok !== true)
|
|
641
|
+
return result;
|
|
642
|
+
priceUnit = result.price;
|
|
643
|
+
}
|
|
644
|
+
priceUnit ??= product.template.listPrice;
|
|
645
|
+
if (n(discount) < 0 || n(discount) > 100 || n(priceUnit) < 0)
|
|
646
|
+
return invalid('discount', 'price and discount are invalid');
|
|
647
|
+
const tax = args.taxId ? (await ctx.db.select('account.Tax', { id: args.taxId }))[0] : null;
|
|
648
|
+
if (args.taxId && (!tax || !['sale', 'none'].includes(String(tax.typeTaxUse))))
|
|
649
|
+
return invalid('taxId', 'tax use does not match POS sales');
|
|
650
|
+
try {
|
|
651
|
+
taxAmounts(tax, n(args.qty) * n(priceUnit) * (1 - n(discount) / 100), n(args.qty));
|
|
652
|
+
}
|
|
653
|
+
catch (error) {
|
|
654
|
+
return invalid('taxId', error.message);
|
|
655
|
+
}
|
|
656
|
+
if (!(await ctx.db.select('pos.OrderLine', { id: args.id }))[0])
|
|
657
|
+
await ctx.db.insert('pos.OrderLine', {
|
|
658
|
+
id: args.id,
|
|
659
|
+
orderId: args.orderId,
|
|
660
|
+
productId: args.productId,
|
|
661
|
+
productUomId: args.productUomId,
|
|
662
|
+
name: product.template.name,
|
|
663
|
+
qty: args.qty,
|
|
664
|
+
priceUnit: String(priceUnit),
|
|
665
|
+
discount: String(discount),
|
|
666
|
+
taxId: args.taxId ?? null,
|
|
667
|
+
priceSubtotal: '0',
|
|
668
|
+
priceSubtotalIncl: '0',
|
|
669
|
+
refundedOrderlineId: null,
|
|
670
|
+
sequence: 10,
|
|
671
|
+
});
|
|
672
|
+
await recompute(ctx, args.orderId);
|
|
673
|
+
return { ok: true, id: args.id, priceUnit: String(priceUnit) };
|
|
674
|
+
},
|
|
675
|
+
}),
|
|
676
|
+
addPayment: defineFn({
|
|
677
|
+
input: { id: 'id', orderId: 'id', paymentMethodId: 'id', amount: 'decimal' },
|
|
678
|
+
output: { ok: 'bool', id: 'id?', errors: 'json?' },
|
|
679
|
+
effects: [
|
|
680
|
+
'read:pos.Order',
|
|
681
|
+
'read:pos.ConfigPaymentMethod',
|
|
682
|
+
'read:pos.PaymentMethod',
|
|
683
|
+
'read:pos.Payment',
|
|
684
|
+
'write:pos.Payment',
|
|
685
|
+
'read:pos.OrderLine',
|
|
686
|
+
'write:pos.OrderLine',
|
|
687
|
+
'write:pos.Order',
|
|
688
|
+
'read:account.Tax',
|
|
689
|
+
],
|
|
690
|
+
idempotent: true,
|
|
691
|
+
agent: true,
|
|
692
|
+
handler: async (ctx, args) => {
|
|
693
|
+
const order = (await ctx.db.select('pos.Order', { id: args.orderId }))[0];
|
|
694
|
+
if (order?.state !== 'draft')
|
|
695
|
+
return invalid('orderId', 'payments can only be added to a new order');
|
|
696
|
+
if ((order.isRefund && n(args.amount) >= 0) || (!order.isRefund && n(args.amount) <= 0))
|
|
697
|
+
return invalid('amount', order.isRefund ? 'refund payments must be negative' : 'payment must be positive');
|
|
698
|
+
const linked = (await ctx.db.select('pos.ConfigPaymentMethod', {
|
|
699
|
+
configId: order.configId,
|
|
700
|
+
paymentMethodId: args.paymentMethodId,
|
|
701
|
+
}))[0];
|
|
702
|
+
if (!linked || !(await ctx.db.select('pos.PaymentMethod', { id: args.paymentMethodId }))[0])
|
|
703
|
+
return invalid('paymentMethodId', 'payment method is not configured for this point of sale');
|
|
704
|
+
if (!(await ctx.db.select('pos.Payment', { id: args.id }))[0])
|
|
705
|
+
await ctx.db.insert('pos.Payment', {
|
|
706
|
+
id: args.id,
|
|
707
|
+
orderId: args.orderId,
|
|
708
|
+
paymentMethodId: args.paymentMethodId,
|
|
709
|
+
amount: args.amount,
|
|
710
|
+
paymentDate: now(),
|
|
711
|
+
});
|
|
712
|
+
await recompute(ctx, args.orderId);
|
|
713
|
+
return { ok: true, id: args.id };
|
|
714
|
+
},
|
|
715
|
+
}),
|
|
716
|
+
validateOrder: defineFn({
|
|
717
|
+
input: { id: 'id' },
|
|
718
|
+
output: {
|
|
719
|
+
ok: 'bool',
|
|
720
|
+
id: 'id?',
|
|
721
|
+
state: 'text?',
|
|
722
|
+
pickingId: 'id?',
|
|
723
|
+
accountMoveId: 'id?',
|
|
724
|
+
errors: 'json?',
|
|
725
|
+
},
|
|
726
|
+
effects: [
|
|
727
|
+
'read:pos.Order',
|
|
728
|
+
'write:pos.Order',
|
|
729
|
+
'read:pos.Session',
|
|
730
|
+
'read:pos.Config',
|
|
731
|
+
'read:pos.OrderLine',
|
|
732
|
+
'read:pos.Payment',
|
|
733
|
+
'read:pos.PaymentMethod',
|
|
734
|
+
'read:product.Product',
|
|
735
|
+
'read:product.Template',
|
|
736
|
+
'read:account.Move',
|
|
737
|
+
'write:account.Move',
|
|
738
|
+
'write:account.MoveLine',
|
|
739
|
+
'read:account.Journal',
|
|
740
|
+
'read:account.Account',
|
|
741
|
+
'read:account.Tax',
|
|
742
|
+
...stockEffects,
|
|
743
|
+
...accountEffects,
|
|
744
|
+
],
|
|
745
|
+
idempotent: true,
|
|
746
|
+
agent: true,
|
|
747
|
+
handler: async (ctx, args) => {
|
|
748
|
+
const order = (await ctx.db.select('pos.Order', { id: args.id }))[0];
|
|
749
|
+
if (!order)
|
|
750
|
+
return invalid('id', 'POS order does not exist');
|
|
751
|
+
if (['paid', 'done'].includes(String(order.state)))
|
|
752
|
+
return {
|
|
753
|
+
ok: true,
|
|
754
|
+
id: args.id,
|
|
755
|
+
state: order.state,
|
|
756
|
+
pickingId: order.pickingId,
|
|
757
|
+
accountMoveId: order.accountMoveId,
|
|
758
|
+
};
|
|
759
|
+
if (order.state !== 'draft')
|
|
760
|
+
return invalid('state', 'only a new order can be paid');
|
|
761
|
+
const session = (await ctx.db.select('pos.Session', { id: order.sessionId }))[0];
|
|
762
|
+
if (!session || !['opened', 'closing_control'].includes(String(session.state)))
|
|
763
|
+
return invalid('sessionId', 'session is not open');
|
|
764
|
+
const lines = await ctx.db.select('pos.OrderLine', { orderId: args.id });
|
|
765
|
+
if (!lines.length)
|
|
766
|
+
return invalid('lines', 'order needs at least one product');
|
|
767
|
+
const payments = await ctx.db.select('pos.Payment', { orderId: args.id });
|
|
768
|
+
if (Math.abs(n(order.amountPaid) - n(order.amountTotal)) > 0.000001)
|
|
769
|
+
return invalid('amountPaid', 'paid amount must equal order total');
|
|
770
|
+
const config = (await ctx.db.select('pos.Config', { id: order.configId }))[0];
|
|
771
|
+
if (n(order.amountTax) && !config.taxAccountId)
|
|
772
|
+
return invalid('taxAccountId', 'a tax account is required before stock is moved');
|
|
773
|
+
const goods = [];
|
|
774
|
+
for (const line of lines) {
|
|
775
|
+
const held = await productOf(ctx, line.productId);
|
|
776
|
+
if (held?.template.type !== 'service') {
|
|
777
|
+
if (held && held.template.tracking !== 'none')
|
|
778
|
+
return invalid('tracking', 'lot/serial selection is required for tracked POS products and is not supported by this retail subset');
|
|
779
|
+
goods.push(line);
|
|
780
|
+
}
|
|
781
|
+
}
|
|
782
|
+
let pickingId = null;
|
|
783
|
+
if (goods.length) {
|
|
784
|
+
pickingId = `${String(order.id)}:picking`;
|
|
785
|
+
const suffix = order.isRefund ? 'incoming' : 'outgoing';
|
|
786
|
+
const created = (await stockFunctions.createPicking.handler(ctx, {
|
|
787
|
+
id: pickingId,
|
|
788
|
+
name: `${order.isRefund ? 'Refund' : 'POS'} ${String(order.posReference)}`,
|
|
789
|
+
pickingTypeId: `${String(config.warehouseId)}:${suffix}`,
|
|
790
|
+
scheduledDate: order.dateOrder,
|
|
791
|
+
}));
|
|
792
|
+
if (created.ok !== true)
|
|
793
|
+
return created;
|
|
794
|
+
for (const line of goods) {
|
|
795
|
+
const moveId = `${String(line.id)}:move`, quantity = Math.abs(n(line.qty));
|
|
796
|
+
const moved = (await stockFunctions.addMove.handler(ctx, {
|
|
797
|
+
id: moveId,
|
|
798
|
+
name: line.name,
|
|
799
|
+
pickingId,
|
|
800
|
+
productId: line.productId,
|
|
801
|
+
productUomId: line.productUomId,
|
|
802
|
+
productUomQty: decimal(quantity),
|
|
803
|
+
origin: order.posReference,
|
|
804
|
+
}));
|
|
805
|
+
if (moved.ok !== true)
|
|
806
|
+
return moved;
|
|
807
|
+
await ctx.db.update('stock.Move', { id: moveId }, { posLineId: line.id });
|
|
808
|
+
}
|
|
809
|
+
const confirmed = (await stockFunctions.confirmPicking.handler(ctx, { id: pickingId }));
|
|
810
|
+
if (confirmed.ok !== true)
|
|
811
|
+
return confirmed;
|
|
812
|
+
for (const line of goods) {
|
|
813
|
+
const moveId = `${String(line.id)}:move`;
|
|
814
|
+
if (order.isRefund) {
|
|
815
|
+
const picking = (await ctx.db.select('stock.Picking', { id: pickingId }))[0];
|
|
816
|
+
const saved = (await stockFunctions.saveMoveLine.handler(ctx, {
|
|
817
|
+
id: `${moveId}:line`,
|
|
818
|
+
moveId,
|
|
819
|
+
productUomId: line.productUomId,
|
|
820
|
+
quantity: decimal(Math.abs(n(line.qty))),
|
|
821
|
+
locationId: picking.locationId,
|
|
822
|
+
locationDestId: picking.locationDestId,
|
|
823
|
+
picked: true,
|
|
824
|
+
}));
|
|
825
|
+
if (saved.ok !== true)
|
|
826
|
+
return saved;
|
|
827
|
+
}
|
|
828
|
+
else {
|
|
829
|
+
const reserved = (await stockFunctions.reserveMove.handler(ctx, { id: moveId }));
|
|
830
|
+
if (reserved.ok !== true || n(reserved.reserved) + 0.000001 < Math.abs(n(line.qty)))
|
|
831
|
+
return invalid('stock', `insufficient stock for ${String(line.name)}`);
|
|
832
|
+
}
|
|
833
|
+
}
|
|
834
|
+
const completed = (await stockFunctions.completePicking.handler(ctx, {
|
|
835
|
+
id: pickingId,
|
|
836
|
+
createBackorder: false,
|
|
837
|
+
}));
|
|
838
|
+
if (completed.ok !== true)
|
|
839
|
+
return completed;
|
|
840
|
+
}
|
|
841
|
+
let accountMoveId;
|
|
842
|
+
try {
|
|
843
|
+
accountMoveId = await createAccounting(ctx, order, config, lines, payments);
|
|
844
|
+
}
|
|
845
|
+
catch (error) {
|
|
846
|
+
return invalid('accounting', error.message);
|
|
847
|
+
}
|
|
848
|
+
await ctx.db.update('pos.Order', { id: args.id }, {
|
|
849
|
+
state: 'paid',
|
|
850
|
+
invoiceStatus: order.toInvoice ? 'invoiced' : 'to_invoice',
|
|
851
|
+
pickingId,
|
|
852
|
+
accountMoveId,
|
|
853
|
+
});
|
|
854
|
+
return { ok: true, id: args.id, state: 'paid', ...(pickingId ? { pickingId } : {}), accountMoveId };
|
|
855
|
+
},
|
|
856
|
+
}),
|
|
857
|
+
refundOrder: defineFn({
|
|
858
|
+
input: { id: 'id', uuid: 'text?', originalOrderId: 'id', sessionId: 'id' },
|
|
859
|
+
output: { ok: 'bool', id: 'id?', name: 'text?', errors: 'json?' },
|
|
860
|
+
effects: [
|
|
861
|
+
'read:pos.Order',
|
|
862
|
+
'read:pos.OrderLine',
|
|
863
|
+
'write:pos.Order',
|
|
864
|
+
'write:pos.OrderLine',
|
|
865
|
+
'read:pos.Payment',
|
|
866
|
+
'write:pos.Order',
|
|
867
|
+
'read:account.Tax',
|
|
868
|
+
'read:pos.Sequence',
|
|
869
|
+
'write:pos.Sequence',
|
|
870
|
+
'read:pos.Session',
|
|
871
|
+
'read:pos.Config',
|
|
872
|
+
'read:partner.Partner',
|
|
873
|
+
'read:company.Company',
|
|
874
|
+
],
|
|
875
|
+
idempotent: true,
|
|
876
|
+
agent: true,
|
|
877
|
+
handler: async (ctx, args) => {
|
|
878
|
+
const existing = (await ctx.db.select('pos.Order', { id: args.id }))[0];
|
|
879
|
+
if (existing)
|
|
880
|
+
return { ok: true, id: args.id, name: existing.name };
|
|
881
|
+
const original = (await ctx.db.select('pos.Order', { id: args.originalOrderId }))[0];
|
|
882
|
+
if (!original || !['paid', 'done'].includes(String(original.state)) || original.isRefund)
|
|
883
|
+
return invalid('originalOrderId', 'only a paid sale can be refunded');
|
|
884
|
+
const session = (await ctx.db.select('pos.Session', { id: args.sessionId }))[0];
|
|
885
|
+
if (session?.state !== 'opened')
|
|
886
|
+
return invalid('sessionId', 'refund requires an open session');
|
|
887
|
+
const sequenceNumber = await nextOrderNumber(ctx, args.sessionId), name = `Order ${String(sequenceNumber).padStart(5, '0')}`;
|
|
888
|
+
await ctx.db.insert('pos.Order', {
|
|
889
|
+
id: args.id,
|
|
890
|
+
uuid: args.uuid ?? args.id,
|
|
891
|
+
name,
|
|
892
|
+
posReference: `POS/${String(sequenceNumber).padStart(5, '0')}`,
|
|
893
|
+
sequenceNumber,
|
|
894
|
+
sessionId: args.sessionId,
|
|
895
|
+
configId: session.configId,
|
|
896
|
+
partnerId: original.partnerId,
|
|
897
|
+
state: 'draft',
|
|
898
|
+
invoiceStatus: 'to_invoice',
|
|
899
|
+
isRefund: true,
|
|
900
|
+
refundedOrderId: original.id,
|
|
901
|
+
dateOrder: now(),
|
|
902
|
+
currency: original.currency,
|
|
903
|
+
amountUntaxed: '0',
|
|
904
|
+
amountTax: '0',
|
|
905
|
+
amountTotal: '0',
|
|
906
|
+
amountPaid: '0',
|
|
907
|
+
amountReturn: '0',
|
|
908
|
+
toInvoice: false,
|
|
909
|
+
accountMoveId: null,
|
|
910
|
+
pickingId: null,
|
|
911
|
+
note: `Refund ${String(original.posReference)}`,
|
|
912
|
+
});
|
|
913
|
+
let sequence = 10;
|
|
914
|
+
for (const line of await ctx.db.select('pos.OrderLine', { orderId: original.id })) {
|
|
915
|
+
await ctx.db.insert('pos.OrderLine', {
|
|
916
|
+
id: `${String(args.id)}:${String(line.id)}`,
|
|
917
|
+
orderId: args.id,
|
|
918
|
+
productId: line.productId,
|
|
919
|
+
productUomId: line.productUomId,
|
|
920
|
+
name: line.name,
|
|
921
|
+
qty: decimal(-n(line.qty)),
|
|
922
|
+
priceUnit: line.priceUnit,
|
|
923
|
+
discount: line.discount,
|
|
924
|
+
taxId: line.taxId,
|
|
925
|
+
priceSubtotal: '0',
|
|
926
|
+
priceSubtotalIncl: '0',
|
|
927
|
+
refundedOrderlineId: line.id,
|
|
928
|
+
sequence,
|
|
929
|
+
});
|
|
930
|
+
sequence += 10;
|
|
931
|
+
}
|
|
932
|
+
await recompute(ctx, args.id);
|
|
933
|
+
return { ok: true, id: args.id, name };
|
|
934
|
+
},
|
|
935
|
+
}),
|
|
936
|
+
cancelOrder: defineFn({
|
|
937
|
+
input: { id: 'id' },
|
|
938
|
+
output: { ok: 'bool', id: 'id?', errors: 'json?' },
|
|
939
|
+
effects: ['read:pos.Order', 'write:pos.Order'],
|
|
940
|
+
idempotent: true,
|
|
941
|
+
agent: true,
|
|
942
|
+
handler: async (ctx, args) => {
|
|
943
|
+
const order = (await ctx.db.select('pos.Order', { id: args.id }))[0];
|
|
944
|
+
if (!order)
|
|
945
|
+
return invalid('id', 'order does not exist');
|
|
946
|
+
if (order.state !== 'draft' && order.state !== 'cancel')
|
|
947
|
+
return invalid('state', 'paid orders must be refunded, not cancelled');
|
|
948
|
+
await ctx.db.update('pos.Order', { id: args.id }, { state: 'cancel' });
|
|
949
|
+
return { ok: true, id: args.id };
|
|
950
|
+
},
|
|
951
|
+
}),
|
|
952
|
+
};
|
|
953
|
+
//# sourceMappingURL=functions.js.map
|