@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,1038 @@
|
|
|
1
|
+
import { asc, defineFn, eq, from } from '@ketvietlab/ketjs';
|
|
2
|
+
import { ACCOUNT_SETUP_EFFECTS, ensureCompanyAccounting } from './setup.js';
|
|
3
|
+
export const ACCOUNT_TYPES = [
|
|
4
|
+
'asset_receivable',
|
|
5
|
+
'asset_cash',
|
|
6
|
+
'asset_current',
|
|
7
|
+
'asset_non_current',
|
|
8
|
+
'asset_prepayments',
|
|
9
|
+
'asset_fixed',
|
|
10
|
+
'liability_payable',
|
|
11
|
+
'liability_credit_card',
|
|
12
|
+
'liability_current',
|
|
13
|
+
'liability_non_current',
|
|
14
|
+
'equity',
|
|
15
|
+
'equity_unaffected',
|
|
16
|
+
'income',
|
|
17
|
+
'income_other',
|
|
18
|
+
'expense',
|
|
19
|
+
'expense_other',
|
|
20
|
+
'expense_depreciation',
|
|
21
|
+
'expense_direct_cost',
|
|
22
|
+
'off_balance',
|
|
23
|
+
];
|
|
24
|
+
export const JOURNAL_TYPES = ['sale', 'purchase', 'cash', 'bank', 'general'];
|
|
25
|
+
export const MOVE_TYPES = [
|
|
26
|
+
'entry',
|
|
27
|
+
'out_invoice',
|
|
28
|
+
'out_refund',
|
|
29
|
+
'in_invoice',
|
|
30
|
+
'in_refund',
|
|
31
|
+
'out_receipt',
|
|
32
|
+
'in_receipt',
|
|
33
|
+
];
|
|
34
|
+
export const MOVE_STATES = ['draft', 'posted', 'cancel'];
|
|
35
|
+
export const PAYMENT_STATES = [
|
|
36
|
+
'not_paid',
|
|
37
|
+
'in_payment',
|
|
38
|
+
'paid',
|
|
39
|
+
'partial',
|
|
40
|
+
'reversed',
|
|
41
|
+
'blocked',
|
|
42
|
+
'invoicing_legacy',
|
|
43
|
+
];
|
|
44
|
+
export const TAX_USES = ['sale', 'purchase', 'none'];
|
|
45
|
+
export const TAX_AMOUNT_TYPES = ['group', 'fixed', 'percent', 'division'];
|
|
46
|
+
export const PAYMENT_TYPES = ['outbound', 'inbound'];
|
|
47
|
+
export const PARTNER_TYPES = ['customer', 'supplier'];
|
|
48
|
+
export const PAYMENT_TERM_VALUES = ['percent', 'fixed'];
|
|
49
|
+
export const PAYMENT_TERM_DELAY_TYPES = [
|
|
50
|
+
'days_after',
|
|
51
|
+
'days_after_end_of_month',
|
|
52
|
+
'days_after_end_of_next_month',
|
|
53
|
+
'days_end_of_month_on_the',
|
|
54
|
+
];
|
|
55
|
+
const invalid = (field, message) => ({ ok: false, errors: [{ field, message }] });
|
|
56
|
+
const n = (value) => Number(value ?? 0);
|
|
57
|
+
const money = (value) => Math.round((value + Number.EPSILON) * 100) / 100;
|
|
58
|
+
const decimal = (value) => String(money(value));
|
|
59
|
+
const today = () => new Date().toISOString();
|
|
60
|
+
async function companyCurrency(ctx) {
|
|
61
|
+
if (!ctx.scope.company)
|
|
62
|
+
throw new Error('accounting requires an active company');
|
|
63
|
+
const company = (await ctx.db.select('company.Company', { id: ctx.scope.company }))[0];
|
|
64
|
+
if (!company)
|
|
65
|
+
throw new Error(`company ${ctx.scope.company} does not exist`);
|
|
66
|
+
return String(company.currency);
|
|
67
|
+
}
|
|
68
|
+
async function accountOf(ctx, id) {
|
|
69
|
+
return (await ctx.db.select('account.Account', { id }))[0] ?? null;
|
|
70
|
+
}
|
|
71
|
+
async function dueDate(ctx, paymentTermId, date) {
|
|
72
|
+
if (!paymentTermId)
|
|
73
|
+
return date.toISOString();
|
|
74
|
+
const lines = (await ctx.db.select('account.PaymentTermLine', { paymentId: paymentTermId })).sort((a, b) => n(a.sequence) - n(b.sequence));
|
|
75
|
+
let latest = new Date(date);
|
|
76
|
+
for (const line of lines) {
|
|
77
|
+
const due = new Date(date);
|
|
78
|
+
const days = n(line.nbDays);
|
|
79
|
+
if (line.delayType === 'days_after')
|
|
80
|
+
due.setUTCDate(due.getUTCDate() + days);
|
|
81
|
+
else if (line.delayType === 'days_after_end_of_month') {
|
|
82
|
+
due.setUTCMonth(due.getUTCMonth() + 1, 0);
|
|
83
|
+
due.setUTCDate(due.getUTCDate() + days);
|
|
84
|
+
}
|
|
85
|
+
else if (line.delayType === 'days_after_end_of_next_month') {
|
|
86
|
+
due.setUTCMonth(due.getUTCMonth() + 2, 0);
|
|
87
|
+
due.setUTCDate(due.getUTCDate() + days);
|
|
88
|
+
}
|
|
89
|
+
else {
|
|
90
|
+
due.setUTCDate(due.getUTCDate() + days);
|
|
91
|
+
due.setUTCMonth(due.getUTCMonth() + 1, Math.max(1, Math.min(31, n(line.daysNextMonth) || 1)));
|
|
92
|
+
}
|
|
93
|
+
if (due > latest)
|
|
94
|
+
latest = due;
|
|
95
|
+
}
|
|
96
|
+
return latest.toISOString();
|
|
97
|
+
}
|
|
98
|
+
function taxAmounts(tax, quantity, priceUnit, discount) {
|
|
99
|
+
const gross = money(quantity * priceUnit * (1 - discount / 100));
|
|
100
|
+
if (!tax)
|
|
101
|
+
return { untaxed: gross, tax: 0, total: gross };
|
|
102
|
+
if (tax.amountType === 'group')
|
|
103
|
+
throw new Error('group taxes are outside the supported Odoo 19 subset');
|
|
104
|
+
const rate = n(tax.amount) / 100;
|
|
105
|
+
let untaxed = gross;
|
|
106
|
+
let taxAmount = 0;
|
|
107
|
+
if (tax.amountType === 'fixed') {
|
|
108
|
+
taxAmount = money(n(tax.amount) * quantity);
|
|
109
|
+
if (tax.priceInclude)
|
|
110
|
+
untaxed = money(gross - taxAmount);
|
|
111
|
+
}
|
|
112
|
+
else if (tax.amountType === 'percent') {
|
|
113
|
+
if (tax.priceInclude) {
|
|
114
|
+
untaxed = money(gross / (1 + rate));
|
|
115
|
+
taxAmount = money(gross - untaxed);
|
|
116
|
+
}
|
|
117
|
+
else
|
|
118
|
+
taxAmount = money(gross * rate);
|
|
119
|
+
}
|
|
120
|
+
else if (tax.amountType === 'division') {
|
|
121
|
+
if (tax.priceInclude) {
|
|
122
|
+
untaxed = money(gross * (1 - rate));
|
|
123
|
+
taxAmount = money(gross - untaxed);
|
|
124
|
+
}
|
|
125
|
+
else
|
|
126
|
+
taxAmount = money(gross / (1 - rate) - gross);
|
|
127
|
+
}
|
|
128
|
+
return { untaxed, tax: taxAmount, total: money(untaxed + taxAmount) };
|
|
129
|
+
}
|
|
130
|
+
async function nextMoveName(ctx, journal, date) {
|
|
131
|
+
for (let attempt = 0; attempt < 32; attempt += 1) {
|
|
132
|
+
const current = (await ctx.db.select('account.Journal', { id: journal.id }))[0];
|
|
133
|
+
if (!current)
|
|
134
|
+
throw new Error('journal disappeared while assigning its sequence');
|
|
135
|
+
const previous = n(current.sequenceNumber);
|
|
136
|
+
const changed = await ctx.db.compareAndSet('account.Journal', { id: journal.id }, { sequenceNumber: current.sequenceNumber }, { sequenceNumber: previous + 1 });
|
|
137
|
+
if ('dryRun' in changed || changed.matched)
|
|
138
|
+
return `${String(journal.code).toUpperCase()}/${date.getUTCFullYear()}/${String(previous + 1).padStart(5, '0')}`;
|
|
139
|
+
}
|
|
140
|
+
throw new Error('journal sequence did not settle after concurrent updates');
|
|
141
|
+
}
|
|
142
|
+
async function post(ctx, id) {
|
|
143
|
+
const move = (await ctx.db.select('account.Move', { id }))[0];
|
|
144
|
+
if (!move)
|
|
145
|
+
return invalid('id', 'journal entry does not exist');
|
|
146
|
+
if (move.state === 'posted')
|
|
147
|
+
return { ok: true, id: move.id, name: move.name };
|
|
148
|
+
if (move.state !== 'draft')
|
|
149
|
+
return invalid('state', 'only a draft entry can be posted');
|
|
150
|
+
const lines = await ctx.db.select('account.MoveLine', { moveId: id });
|
|
151
|
+
if (lines.length < 2)
|
|
152
|
+
return invalid('lines', 'a journal entry needs at least two lines');
|
|
153
|
+
let debit = 0;
|
|
154
|
+
let credit = 0;
|
|
155
|
+
for (const line of lines) {
|
|
156
|
+
if (n(line.debit) < 0 || n(line.credit) < 0 || (n(line.debit) > 0 && n(line.credit) > 0))
|
|
157
|
+
return invalid('lines', 'each line must have a non-negative debit or credit, never both');
|
|
158
|
+
debit = money(debit + n(line.debit));
|
|
159
|
+
credit = money(credit + n(line.credit));
|
|
160
|
+
}
|
|
161
|
+
if (Math.abs(debit - credit) > 0.000001)
|
|
162
|
+
return invalid('lines', `entry is not balanced: debit ${debit}, credit ${credit}`);
|
|
163
|
+
const journal = (await ctx.db.select('account.Journal', { id: move.journalId }))[0];
|
|
164
|
+
if (!journal)
|
|
165
|
+
return invalid('journalId', 'journal does not exist');
|
|
166
|
+
const postedAt = today();
|
|
167
|
+
const assigned = await ctx.tx(async (tx) => {
|
|
168
|
+
const name = await nextMoveName(tx, journal, new Date(String(move.date)));
|
|
169
|
+
await tx.db.update('account.Move', { id }, { name, state: 'posted', postedAt });
|
|
170
|
+
return name;
|
|
171
|
+
});
|
|
172
|
+
return { ok: true, id: move.id, name: assigned };
|
|
173
|
+
}
|
|
174
|
+
async function updatePaymentState(ctx, moveId) {
|
|
175
|
+
const move = (await ctx.db.select('account.Move', { id: moveId }))[0];
|
|
176
|
+
if (!move || move.moveType === 'entry')
|
|
177
|
+
return;
|
|
178
|
+
const lines = await ctx.db.select('account.MoveLine', { moveId });
|
|
179
|
+
const candidates = [];
|
|
180
|
+
for (const line of lines) {
|
|
181
|
+
const account = await accountOf(ctx, line.accountId);
|
|
182
|
+
if (account?.accountType === 'asset_receivable' || account?.accountType === 'liability_payable')
|
|
183
|
+
candidates.push(line);
|
|
184
|
+
}
|
|
185
|
+
const original = candidates.reduce((sum, line) => sum + Math.abs(n(line.balance)), 0);
|
|
186
|
+
const residual = candidates.reduce((sum, line) => sum + Math.abs(n(line.amountResidual)), 0);
|
|
187
|
+
const paymentState = residual < 0.000001 ? 'paid' : residual < original ? 'partial' : 'not_paid';
|
|
188
|
+
await ctx.db.update('account.Move', { id: moveId }, { paymentState });
|
|
189
|
+
}
|
|
190
|
+
export const functions = {
|
|
191
|
+
initializeCompany: defineFn({
|
|
192
|
+
input: {},
|
|
193
|
+
output: {
|
|
194
|
+
id: 'id',
|
|
195
|
+
countryCode: 'text',
|
|
196
|
+
standard: 'text',
|
|
197
|
+
legalBasis: 'text',
|
|
198
|
+
sourceChecksum: 'text',
|
|
199
|
+
installedAt: 'datetime',
|
|
200
|
+
},
|
|
201
|
+
effects: [...ACCOUNT_SETUP_EFFECTS],
|
|
202
|
+
idempotent: true,
|
|
203
|
+
agent: true,
|
|
204
|
+
handler: (ctx) => ensureCompanyAccounting(ctx),
|
|
205
|
+
}),
|
|
206
|
+
getSetup: defineFn({
|
|
207
|
+
input: {},
|
|
208
|
+
effects: ['read:account.Setup'],
|
|
209
|
+
agent: true,
|
|
210
|
+
handler: async (ctx) => (await ctx.db.select('account.Setup'))[0] ?? null,
|
|
211
|
+
}),
|
|
212
|
+
listAccounts: defineFn({
|
|
213
|
+
input: { includeArchived: 'bool?' },
|
|
214
|
+
effects: ['read:account.Account', ...ACCOUNT_SETUP_EFFECTS],
|
|
215
|
+
agent: true,
|
|
216
|
+
handler: async (ctx, args) => {
|
|
217
|
+
await ensureCompanyAccounting(ctx);
|
|
218
|
+
const A = ctx.table('account.Account');
|
|
219
|
+
const q = from(A).orderBy(asc(A.code));
|
|
220
|
+
return ctx.db.all(args.includeArchived ? q : q.where(eq(A.active, true)));
|
|
221
|
+
},
|
|
222
|
+
}),
|
|
223
|
+
saveAccount: defineFn({
|
|
224
|
+
input: { id: 'id', code: 'text', name: 'text', accountType: 'text', reconcile: 'bool?', active: 'bool?' },
|
|
225
|
+
output: { ok: 'bool', id: 'id?', errors: 'json?' },
|
|
226
|
+
effects: ['read:account.Account', 'write:account.Account'],
|
|
227
|
+
idempotent: true,
|
|
228
|
+
agent: true,
|
|
229
|
+
handler: async (ctx, args) => {
|
|
230
|
+
if (!ACCOUNT_TYPES.includes(args.accountType))
|
|
231
|
+
return invalid('accountType', 'unsupported Odoo 19 account type');
|
|
232
|
+
if (!/^[A-Za-z0-9.]+$/.test(String(args.code)))
|
|
233
|
+
return invalid('code', 'account code may contain only letters, numbers, and dots');
|
|
234
|
+
const forced = ['asset_receivable', 'liability_payable'].includes(String(args.accountType));
|
|
235
|
+
const reconcile = forced || args.reconcile === true;
|
|
236
|
+
if (args.accountType === 'off_balance' && reconcile)
|
|
237
|
+
return invalid('reconcile', 'off-balance accounts cannot be reconciled');
|
|
238
|
+
const existing = (await ctx.db.select('account.Account', { id: args.id }))[0];
|
|
239
|
+
const values = { ...args, reconcile, active: args.active ?? true };
|
|
240
|
+
const cs = ctx
|
|
241
|
+
.change('account.Account', values, existing ?? null)
|
|
242
|
+
.cast(['id', 'code', 'name', 'accountType', 'reconcile', 'active'])
|
|
243
|
+
.required(['code', 'name', 'accountType']);
|
|
244
|
+
if (!cs.valid)
|
|
245
|
+
return { ok: false, errors: cs.errors };
|
|
246
|
+
await ctx.db.commit(cs, existing ? { id: args.id } : undefined);
|
|
247
|
+
return { ok: true, id: args.id };
|
|
248
|
+
},
|
|
249
|
+
}),
|
|
250
|
+
listJournals: defineFn({
|
|
251
|
+
input: { type: 'text?' },
|
|
252
|
+
effects: ['read:account.Journal', ...ACCOUNT_SETUP_EFFECTS],
|
|
253
|
+
agent: true,
|
|
254
|
+
handler: async (ctx, args) => {
|
|
255
|
+
await ensureCompanyAccounting(ctx);
|
|
256
|
+
return ctx.db.select('account.Journal', args.type ? { type: args.type, active: true } : { active: true });
|
|
257
|
+
},
|
|
258
|
+
}),
|
|
259
|
+
saveJournal: defineFn({
|
|
260
|
+
input: { id: 'id', name: 'text', code: 'text', type: 'text', defaultAccountId: 'id?', active: 'bool?' },
|
|
261
|
+
output: { ok: 'bool', id: 'id?', errors: 'json?' },
|
|
262
|
+
effects: ['read:account.Journal', 'write:account.Journal', 'read:account.Account'],
|
|
263
|
+
idempotent: true,
|
|
264
|
+
agent: true,
|
|
265
|
+
handler: async (ctx, args) => {
|
|
266
|
+
if (!JOURNAL_TYPES.includes(args.type))
|
|
267
|
+
return invalid('type', 'unsupported Odoo 19 journal type');
|
|
268
|
+
if (!/^[A-Za-z0-9]+$/.test(String(args.code)))
|
|
269
|
+
return invalid('code', 'journal code must be alphanumeric');
|
|
270
|
+
if (args.defaultAccountId && !(await accountOf(ctx, args.defaultAccountId)))
|
|
271
|
+
return invalid('defaultAccountId', 'default account does not exist');
|
|
272
|
+
const existing = (await ctx.db.select('account.Journal', { id: args.id }))[0];
|
|
273
|
+
const values = {
|
|
274
|
+
...args,
|
|
275
|
+
code: String(args.code).toUpperCase(),
|
|
276
|
+
sequenceNumber: existing?.sequenceNumber ?? 0,
|
|
277
|
+
active: args.active ?? true,
|
|
278
|
+
};
|
|
279
|
+
const cs = ctx
|
|
280
|
+
.change('account.Journal', values, existing ?? null)
|
|
281
|
+
.cast(['id', 'name', 'code', 'type', 'defaultAccountId', 'sequenceNumber', 'active'])
|
|
282
|
+
.required(['name', 'code', 'type']);
|
|
283
|
+
if (!cs.valid)
|
|
284
|
+
return { ok: false, errors: cs.errors };
|
|
285
|
+
await ctx.db.commit(cs, existing ? { id: args.id } : undefined);
|
|
286
|
+
return { ok: true, id: args.id };
|
|
287
|
+
},
|
|
288
|
+
}),
|
|
289
|
+
listTaxes: defineFn({
|
|
290
|
+
input: { typeTaxUse: 'text?' },
|
|
291
|
+
effects: ['read:account.Tax', ...ACCOUNT_SETUP_EFFECTS],
|
|
292
|
+
agent: true,
|
|
293
|
+
handler: async (ctx, args) => {
|
|
294
|
+
await ensureCompanyAccounting(ctx);
|
|
295
|
+
return ctx.db.select('account.Tax', args.typeTaxUse ? { typeTaxUse: args.typeTaxUse, active: true } : { active: true });
|
|
296
|
+
},
|
|
297
|
+
}),
|
|
298
|
+
saveTax: defineFn({
|
|
299
|
+
input: {
|
|
300
|
+
id: 'id',
|
|
301
|
+
name: 'text',
|
|
302
|
+
description: 'text?',
|
|
303
|
+
typeTaxUse: 'text',
|
|
304
|
+
taxScope: 'text?',
|
|
305
|
+
amountType: 'text',
|
|
306
|
+
amount: 'decimal',
|
|
307
|
+
priceInclude: 'bool?',
|
|
308
|
+
includeBaseAmount: 'bool?',
|
|
309
|
+
accountId: 'id?',
|
|
310
|
+
sequence: 'int?',
|
|
311
|
+
active: 'bool?',
|
|
312
|
+
},
|
|
313
|
+
output: { ok: 'bool', id: 'id?', errors: 'json?' },
|
|
314
|
+
effects: ['read:account.Tax', 'write:account.Tax', 'read:account.Account'],
|
|
315
|
+
idempotent: true,
|
|
316
|
+
agent: true,
|
|
317
|
+
handler: async (ctx, args) => {
|
|
318
|
+
if (!TAX_USES.includes(args.typeTaxUse))
|
|
319
|
+
return invalid('typeTaxUse', 'unsupported Odoo 19 tax use');
|
|
320
|
+
if (!TAX_AMOUNT_TYPES.includes(args.amountType))
|
|
321
|
+
return invalid('amountType', 'unsupported Odoo 19 tax computation');
|
|
322
|
+
if (args.taxScope && !['service', 'consu'].includes(String(args.taxScope)))
|
|
323
|
+
return invalid('taxScope', 'tax scope must be service or consu');
|
|
324
|
+
if (args.accountId && !(await accountOf(ctx, args.accountId)))
|
|
325
|
+
return invalid('accountId', 'tax account does not exist');
|
|
326
|
+
const existing = (await ctx.db.select('account.Tax', { id: args.id }))[0];
|
|
327
|
+
const values = {
|
|
328
|
+
...args,
|
|
329
|
+
priceInclude: args.priceInclude === true,
|
|
330
|
+
includeBaseAmount: args.includeBaseAmount === true,
|
|
331
|
+
sequence: args.sequence ?? 10,
|
|
332
|
+
active: args.active ?? true,
|
|
333
|
+
};
|
|
334
|
+
const cs = ctx
|
|
335
|
+
.change('account.Tax', values, existing ?? null)
|
|
336
|
+
.cast([
|
|
337
|
+
'id',
|
|
338
|
+
'name',
|
|
339
|
+
'description',
|
|
340
|
+
'typeTaxUse',
|
|
341
|
+
'taxScope',
|
|
342
|
+
'amountType',
|
|
343
|
+
'amount',
|
|
344
|
+
'priceInclude',
|
|
345
|
+
'includeBaseAmount',
|
|
346
|
+
'accountId',
|
|
347
|
+
'sequence',
|
|
348
|
+
'active',
|
|
349
|
+
])
|
|
350
|
+
.required(['name', 'typeTaxUse', 'amountType', 'amount']);
|
|
351
|
+
if (!cs.valid)
|
|
352
|
+
return { ok: false, errors: cs.errors };
|
|
353
|
+
await ctx.db.commit(cs, existing ? { id: args.id } : undefined);
|
|
354
|
+
return { ok: true, id: args.id };
|
|
355
|
+
},
|
|
356
|
+
}),
|
|
357
|
+
listPaymentTerms: defineFn({
|
|
358
|
+
input: {},
|
|
359
|
+
effects: ['read:account.PaymentTerm', 'read:account.PaymentTermLine', ...ACCOUNT_SETUP_EFFECTS],
|
|
360
|
+
agent: true,
|
|
361
|
+
handler: async (ctx) => {
|
|
362
|
+
await ensureCompanyAccounting(ctx);
|
|
363
|
+
const T = ctx.table('account.PaymentTerm');
|
|
364
|
+
return ctx.db.all(from(T).where(eq(T.active, true)).orderBy(asc(T.name)).preload('lines'));
|
|
365
|
+
},
|
|
366
|
+
}),
|
|
367
|
+
savePaymentTerm: defineFn({
|
|
368
|
+
input: { id: 'id', name: 'text', note: 'text?', active: 'bool?' },
|
|
369
|
+
output: { ok: 'bool', id: 'id?', errors: 'json?' },
|
|
370
|
+
effects: ['read:account.PaymentTerm', 'write:account.PaymentTerm'],
|
|
371
|
+
idempotent: true,
|
|
372
|
+
agent: true,
|
|
373
|
+
handler: async (ctx, args) => {
|
|
374
|
+
const existing = (await ctx.db.select('account.PaymentTerm', { id: args.id }))[0];
|
|
375
|
+
const values = { ...args, active: args.active ?? true };
|
|
376
|
+
const cs = ctx
|
|
377
|
+
.change('account.PaymentTerm', values, existing ?? null)
|
|
378
|
+
.cast(['id', 'name', 'note', 'active'])
|
|
379
|
+
.required(['name']);
|
|
380
|
+
if (!cs.valid)
|
|
381
|
+
return { ok: false, errors: cs.errors };
|
|
382
|
+
await ctx.db.commit(cs, existing ? { id: args.id } : undefined);
|
|
383
|
+
return { ok: true, id: args.id };
|
|
384
|
+
},
|
|
385
|
+
}),
|
|
386
|
+
savePaymentTermLine: defineFn({
|
|
387
|
+
input: {
|
|
388
|
+
id: 'id',
|
|
389
|
+
paymentId: 'id',
|
|
390
|
+
value: 'text',
|
|
391
|
+
valueAmount: 'decimal',
|
|
392
|
+
delayType: 'text',
|
|
393
|
+
nbDays: 'int',
|
|
394
|
+
daysNextMonth: 'int?',
|
|
395
|
+
sequence: 'int?',
|
|
396
|
+
},
|
|
397
|
+
output: { ok: 'bool', id: 'id?', errors: 'json?' },
|
|
398
|
+
effects: ['read:account.PaymentTerm', 'read:account.PaymentTermLine', 'write:account.PaymentTermLine'],
|
|
399
|
+
idempotent: true,
|
|
400
|
+
agent: true,
|
|
401
|
+
handler: async (ctx, args) => {
|
|
402
|
+
if (!(await ctx.db.select('account.PaymentTerm', { id: args.paymentId }))[0])
|
|
403
|
+
return invalid('paymentId', 'payment term does not exist');
|
|
404
|
+
if (!PAYMENT_TERM_VALUES.includes(args.value))
|
|
405
|
+
return invalid('value', 'value must be percent or fixed');
|
|
406
|
+
if (!PAYMENT_TERM_DELAY_TYPES.includes(args.delayType))
|
|
407
|
+
return invalid('delayType', 'unsupported Odoo 19 delay type');
|
|
408
|
+
if (args.value === 'percent' && (n(args.valueAmount) < 0 || n(args.valueAmount) > 100))
|
|
409
|
+
return invalid('valueAmount', 'percentage must be between 0 and 100');
|
|
410
|
+
const existing = (await ctx.db.select('account.PaymentTermLine', { id: args.id }))[0];
|
|
411
|
+
const values = { ...args, sequence: args.sequence ?? 10 };
|
|
412
|
+
const cs = ctx
|
|
413
|
+
.change('account.PaymentTermLine', values, existing ?? null)
|
|
414
|
+
.cast(['id', 'paymentId', 'value', 'valueAmount', 'delayType', 'nbDays', 'daysNextMonth', 'sequence'])
|
|
415
|
+
.required(['paymentId', 'value', 'valueAmount', 'delayType']);
|
|
416
|
+
if (!cs.valid)
|
|
417
|
+
return { ok: false, errors: cs.errors };
|
|
418
|
+
await ctx.db.commit(cs, existing ? { id: args.id } : undefined);
|
|
419
|
+
return { ok: true, id: args.id };
|
|
420
|
+
},
|
|
421
|
+
}),
|
|
422
|
+
listMoves: defineFn({
|
|
423
|
+
input: { moveType: 'text?', state: 'text?', partnerId: 'id?' },
|
|
424
|
+
effects: ['read:account.Move'],
|
|
425
|
+
agent: true,
|
|
426
|
+
handler: (ctx, args) => ctx.db.select('account.Move', {
|
|
427
|
+
...(args.moveType ? { moveType: args.moveType } : {}),
|
|
428
|
+
...(args.state ? { state: args.state } : {}),
|
|
429
|
+
...(args.partnerId ? { partnerId: args.partnerId } : {}),
|
|
430
|
+
}),
|
|
431
|
+
}),
|
|
432
|
+
listOpenItems: defineFn({
|
|
433
|
+
input: { partnerId: 'id?', accountId: 'id?' },
|
|
434
|
+
effects: ['read:account.Account', 'read:account.Move', 'read:account.MoveLine'],
|
|
435
|
+
agent: true,
|
|
436
|
+
handler: async (ctx, args) => {
|
|
437
|
+
const posted = new Map((await ctx.db.select('account.Move', { state: 'posted' })).map((move) => [String(move.id), move]));
|
|
438
|
+
const rows = [];
|
|
439
|
+
for (const line of await ctx.db.select('account.MoveLine', {
|
|
440
|
+
...(args.partnerId ? { partnerId: args.partnerId } : {}),
|
|
441
|
+
...(args.accountId ? { accountId: args.accountId } : {}),
|
|
442
|
+
})) {
|
|
443
|
+
const move = posted.get(String(line.moveId));
|
|
444
|
+
if (!move || line.reconciled || n(line.amountResidual) <= 0)
|
|
445
|
+
continue;
|
|
446
|
+
const account = await accountOf(ctx, line.accountId);
|
|
447
|
+
if (!account?.reconcile)
|
|
448
|
+
continue;
|
|
449
|
+
rows.push({ ...line, move });
|
|
450
|
+
}
|
|
451
|
+
return rows.sort((a, b) => String(a.move.date).localeCompare(String(b.move.date)));
|
|
452
|
+
},
|
|
453
|
+
}),
|
|
454
|
+
getMove: defineFn({
|
|
455
|
+
input: { id: 'id' },
|
|
456
|
+
effects: ['read:account.Move', 'read:account.MoveLine'],
|
|
457
|
+
agent: true,
|
|
458
|
+
handler: async (ctx, args) => {
|
|
459
|
+
const move = (await ctx.db.select('account.Move', { id: args.id }))[0];
|
|
460
|
+
return move ? { ...move, lines: await ctx.db.select('account.MoveLine', { moveId: args.id }) } : null;
|
|
461
|
+
},
|
|
462
|
+
}),
|
|
463
|
+
createMove: defineFn({
|
|
464
|
+
input: {
|
|
465
|
+
id: 'id',
|
|
466
|
+
journalId: 'id',
|
|
467
|
+
moveType: 'text?',
|
|
468
|
+
date: 'datetime?',
|
|
469
|
+
ref: 'text?',
|
|
470
|
+
partnerId: 'id?',
|
|
471
|
+
invoiceDate: 'datetime?',
|
|
472
|
+
invoiceDateDue: 'datetime?',
|
|
473
|
+
paymentTermId: 'id?',
|
|
474
|
+
},
|
|
475
|
+
output: { ok: 'bool', id: 'id?', errors: 'json?' },
|
|
476
|
+
effects: [
|
|
477
|
+
'read:account.Journal',
|
|
478
|
+
'read:account.Move',
|
|
479
|
+
'read:account.PaymentTermLine',
|
|
480
|
+
'read:company.Company',
|
|
481
|
+
'write:account.Move',
|
|
482
|
+
],
|
|
483
|
+
idempotent: true,
|
|
484
|
+
agent: true,
|
|
485
|
+
handler: async (ctx, args) => {
|
|
486
|
+
const journal = (await ctx.db.select('account.Journal', { id: args.journalId }))[0];
|
|
487
|
+
if (!journal)
|
|
488
|
+
return invalid('journalId', 'journal does not exist');
|
|
489
|
+
const moveType = String(args.moveType ?? 'entry');
|
|
490
|
+
if (!MOVE_TYPES.includes(moveType))
|
|
491
|
+
return invalid('moveType', 'unsupported Odoo 19 move type');
|
|
492
|
+
const existing = (await ctx.db.select('account.Move', { id: args.id }))[0];
|
|
493
|
+
if (existing)
|
|
494
|
+
return { ok: true, id: args.id };
|
|
495
|
+
const date = String(args.date ?? today());
|
|
496
|
+
await ctx.db.insert('account.Move', {
|
|
497
|
+
id: args.id,
|
|
498
|
+
name: String(args.id),
|
|
499
|
+
ref: args.ref ?? null,
|
|
500
|
+
date,
|
|
501
|
+
moveType,
|
|
502
|
+
state: 'draft',
|
|
503
|
+
journalId: args.journalId,
|
|
504
|
+
partnerId: args.partnerId ?? null,
|
|
505
|
+
invoiceDate: args.invoiceDate ?? null,
|
|
506
|
+
invoiceDateDue: args.invoiceDateDue ??
|
|
507
|
+
(args.invoiceDate
|
|
508
|
+
? await dueDate(ctx, args.paymentTermId, new Date(String(args.invoiceDate)))
|
|
509
|
+
: null),
|
|
510
|
+
paymentTermId: args.paymentTermId ?? null,
|
|
511
|
+
paymentState: moveType === 'entry' ? 'paid' : 'not_paid',
|
|
512
|
+
currency: await companyCurrency(ctx),
|
|
513
|
+
amountUntaxed: '0',
|
|
514
|
+
amountTax: '0',
|
|
515
|
+
amountTotal: '0',
|
|
516
|
+
postedAt: null,
|
|
517
|
+
});
|
|
518
|
+
return { ok: true, id: args.id };
|
|
519
|
+
},
|
|
520
|
+
}),
|
|
521
|
+
addMoveLine: defineFn({
|
|
522
|
+
input: {
|
|
523
|
+
id: 'id',
|
|
524
|
+
moveId: 'id',
|
|
525
|
+
name: 'text',
|
|
526
|
+
accountId: 'id',
|
|
527
|
+
partnerId: 'id?',
|
|
528
|
+
productId: 'id?',
|
|
529
|
+
productUomId: 'id?',
|
|
530
|
+
quantity: 'decimal?',
|
|
531
|
+
priceUnit: 'decimal?',
|
|
532
|
+
discount: 'decimal?',
|
|
533
|
+
taxId: 'id?',
|
|
534
|
+
debit: 'decimal?',
|
|
535
|
+
credit: 'decimal?',
|
|
536
|
+
dateMaturity: 'datetime?',
|
|
537
|
+
displayType: 'text?',
|
|
538
|
+
sequence: 'int?',
|
|
539
|
+
},
|
|
540
|
+
output: { ok: 'bool', id: 'id?', errors: 'json?' },
|
|
541
|
+
effects: ['read:account.Move', 'read:account.Account', 'write:account.MoveLine'],
|
|
542
|
+
idempotent: true,
|
|
543
|
+
agent: true,
|
|
544
|
+
handler: async (ctx, args) => {
|
|
545
|
+
const move = (await ctx.db.select('account.Move', { id: args.moveId }))[0];
|
|
546
|
+
if (move?.state !== 'draft')
|
|
547
|
+
return invalid('moveId', 'lines can only be added to a draft entry');
|
|
548
|
+
const account = await accountOf(ctx, args.accountId);
|
|
549
|
+
if (!account)
|
|
550
|
+
return invalid('accountId', 'account does not exist');
|
|
551
|
+
const debit = money(n(args.debit)), credit = money(n(args.credit));
|
|
552
|
+
if (debit < 0 || credit < 0 || (debit > 0 && credit > 0))
|
|
553
|
+
return invalid('debit', 'a line may have debit or credit, never both');
|
|
554
|
+
const inserted = await ctx.db.insertIfAbsent('account.MoveLine', {
|
|
555
|
+
id: args.id,
|
|
556
|
+
moveId: args.moveId,
|
|
557
|
+
name: args.name,
|
|
558
|
+
accountId: args.accountId,
|
|
559
|
+
partnerId: args.partnerId ?? move.partnerId ?? null,
|
|
560
|
+
productId: args.productId ?? null,
|
|
561
|
+
productUomId: args.productUomId ?? null,
|
|
562
|
+
quantity: args.quantity ?? '1',
|
|
563
|
+
priceUnit: args.priceUnit ?? '0',
|
|
564
|
+
discount: args.discount ?? '0',
|
|
565
|
+
taxId: args.taxId ?? null,
|
|
566
|
+
debit: decimal(debit),
|
|
567
|
+
credit: decimal(credit),
|
|
568
|
+
balance: decimal(debit - credit),
|
|
569
|
+
dateMaturity: args.dateMaturity ?? null,
|
|
570
|
+
displayType: args.displayType ?? null,
|
|
571
|
+
reconciled: false,
|
|
572
|
+
amountResidual: account.reconcile ? decimal(Math.abs(debit - credit)) : '0',
|
|
573
|
+
sequence: args.sequence ?? 10,
|
|
574
|
+
});
|
|
575
|
+
return { ok: true, id: args.id, existing: !('dryRun' in inserted) && !inserted.inserted };
|
|
576
|
+
},
|
|
577
|
+
}),
|
|
578
|
+
createInvoice: defineFn({
|
|
579
|
+
input: {
|
|
580
|
+
id: 'id',
|
|
581
|
+
journalId: 'id',
|
|
582
|
+
moveType: 'text',
|
|
583
|
+
partnerId: 'id',
|
|
584
|
+
invoiceDate: 'datetime?',
|
|
585
|
+
paymentTermId: 'id?',
|
|
586
|
+
ref: 'text?',
|
|
587
|
+
description: 'text',
|
|
588
|
+
productId: 'id?',
|
|
589
|
+
productUomId: 'id?',
|
|
590
|
+
quantity: 'decimal',
|
|
591
|
+
priceUnit: 'decimal',
|
|
592
|
+
discount: 'decimal?',
|
|
593
|
+
lineAccountId: 'id',
|
|
594
|
+
counterpartAccountId: 'id',
|
|
595
|
+
taxId: 'id?',
|
|
596
|
+
taxAccountId: 'id?',
|
|
597
|
+
},
|
|
598
|
+
output: { ok: 'bool', id: 'id?', amountTotal: 'decimal?', errors: 'json?' },
|
|
599
|
+
effects: [
|
|
600
|
+
'read:account.Journal',
|
|
601
|
+
'read:account.Account',
|
|
602
|
+
'read:account.Tax',
|
|
603
|
+
'read:account.Move',
|
|
604
|
+
'read:account.PaymentTermLine',
|
|
605
|
+
'read:company.Company',
|
|
606
|
+
'write:account.Move',
|
|
607
|
+
'write:account.MoveLine',
|
|
608
|
+
],
|
|
609
|
+
idempotent: true,
|
|
610
|
+
agent: true,
|
|
611
|
+
handler: async (ctx, args) => {
|
|
612
|
+
if (!['out_invoice', 'out_refund', 'in_invoice', 'in_refund', 'out_receipt', 'in_receipt'].includes(String(args.moveType)))
|
|
613
|
+
return invalid('moveType', 'createInvoice requires an invoice, refund, or receipt type');
|
|
614
|
+
const journal = (await ctx.db.select('account.Journal', { id: args.journalId }))[0];
|
|
615
|
+
if (!journal)
|
|
616
|
+
return invalid('journalId', 'journal does not exist');
|
|
617
|
+
const customerDocument = ['out_invoice', 'out_refund', 'out_receipt'].includes(String(args.moveType));
|
|
618
|
+
const expectedJournal = customerDocument ? 'sale' : 'purchase';
|
|
619
|
+
if (journal.type !== expectedJournal)
|
|
620
|
+
return invalid('journalId', `${String(args.moveType)} requires a ${expectedJournal} journal`);
|
|
621
|
+
const lineAccount = await accountOf(ctx, args.lineAccountId), counterpart = await accountOf(ctx, args.counterpartAccountId);
|
|
622
|
+
if (!lineAccount || !counterpart)
|
|
623
|
+
return invalid('accountId', 'invoice accounts do not exist');
|
|
624
|
+
const expectedCounterpart = customerDocument ? 'asset_receivable' : 'liability_payable';
|
|
625
|
+
if (counterpart.accountType !== expectedCounterpart)
|
|
626
|
+
return invalid('counterpartAccountId', `counterpart account must be ${expectedCounterpart}`);
|
|
627
|
+
const tax = args.taxId ? ((await ctx.db.select('account.Tax', { id: args.taxId }))[0] ?? null) : null;
|
|
628
|
+
if (tax && ![customerDocument ? 'sale' : 'purchase', 'none'].includes(String(tax.typeTaxUse)))
|
|
629
|
+
return invalid('taxId', 'tax use does not match the invoice direction');
|
|
630
|
+
let amounts;
|
|
631
|
+
try {
|
|
632
|
+
amounts = taxAmounts(tax, n(args.quantity), n(args.priceUnit), n(args.discount));
|
|
633
|
+
}
|
|
634
|
+
catch (error) {
|
|
635
|
+
return invalid('taxId', error.message);
|
|
636
|
+
}
|
|
637
|
+
const taxAccountId = args.taxAccountId ?? tax?.accountId;
|
|
638
|
+
if (amounts.tax && (!taxAccountId || !(await accountOf(ctx, taxAccountId))))
|
|
639
|
+
return invalid('taxAccountId', 'a valid tax account is required when tax is non-zero');
|
|
640
|
+
const existing = (await ctx.db.select('account.Move', { id: args.id }))[0];
|
|
641
|
+
if (existing)
|
|
642
|
+
return { ok: true, id: args.id, amountTotal: existing.amountTotal };
|
|
643
|
+
const invoiceDate = String(args.invoiceDate ?? today());
|
|
644
|
+
const currency = await companyCurrency(ctx);
|
|
645
|
+
const mainDebit = ['in_invoice', 'in_receipt', 'out_refund'].includes(String(args.moveType));
|
|
646
|
+
await ctx.tx(async (tx) => {
|
|
647
|
+
await tx.db.insert('account.Move', {
|
|
648
|
+
id: args.id,
|
|
649
|
+
name: String(args.id),
|
|
650
|
+
ref: args.ref ?? null,
|
|
651
|
+
date: invoiceDate,
|
|
652
|
+
moveType: args.moveType,
|
|
653
|
+
state: 'draft',
|
|
654
|
+
journalId: args.journalId,
|
|
655
|
+
partnerId: args.partnerId,
|
|
656
|
+
invoiceDate,
|
|
657
|
+
invoiceDateDue: await dueDate(tx, args.paymentTermId, new Date(invoiceDate)),
|
|
658
|
+
paymentTermId: args.paymentTermId ?? null,
|
|
659
|
+
paymentState: 'not_paid',
|
|
660
|
+
currency,
|
|
661
|
+
amountUntaxed: decimal(amounts.untaxed),
|
|
662
|
+
amountTax: decimal(amounts.tax),
|
|
663
|
+
amountTotal: decimal(amounts.total),
|
|
664
|
+
postedAt: null,
|
|
665
|
+
});
|
|
666
|
+
const line = async (id, accountId, amount, debitSide, name, reconcilable, extra = {}) => tx.db.insert('account.MoveLine', {
|
|
667
|
+
id,
|
|
668
|
+
moveId: args.id,
|
|
669
|
+
name,
|
|
670
|
+
accountId,
|
|
671
|
+
partnerId: args.partnerId,
|
|
672
|
+
productId: null,
|
|
673
|
+
productUomId: null,
|
|
674
|
+
quantity: '1',
|
|
675
|
+
priceUnit: decimal(amount),
|
|
676
|
+
discount: '0',
|
|
677
|
+
taxId: null,
|
|
678
|
+
debit: debitSide ? decimal(amount) : '0',
|
|
679
|
+
credit: debitSide ? '0' : decimal(amount),
|
|
680
|
+
balance: decimal(debitSide ? amount : -amount),
|
|
681
|
+
dateMaturity: null,
|
|
682
|
+
displayType: null,
|
|
683
|
+
reconciled: false,
|
|
684
|
+
amountResidual: reconcilable ? decimal(amount) : '0',
|
|
685
|
+
sequence: 10,
|
|
686
|
+
...extra,
|
|
687
|
+
});
|
|
688
|
+
await line(`${String(args.id)}:base`, args.lineAccountId, amounts.untaxed, mainDebit, String(args.description), false, {
|
|
689
|
+
productId: args.productId ?? null,
|
|
690
|
+
productUomId: args.productUomId ?? null,
|
|
691
|
+
quantity: String(args.quantity),
|
|
692
|
+
priceUnit: String(args.priceUnit),
|
|
693
|
+
discount: String(args.discount ?? 0),
|
|
694
|
+
taxId: args.taxId ?? null,
|
|
695
|
+
});
|
|
696
|
+
if (amounts.tax)
|
|
697
|
+
await line(`${String(args.id)}:tax`, taxAccountId, amounts.tax, mainDebit, String(tax?.name ?? 'Tax'), false, { sequence: 20 });
|
|
698
|
+
await line(`${String(args.id)}:counterpart`, args.counterpartAccountId, amounts.total, !mainDebit, String(args.ref ?? args.description), true, { dateMaturity: await dueDate(tx, args.paymentTermId, new Date(invoiceDate)), sequence: 30 });
|
|
699
|
+
});
|
|
700
|
+
return { ok: true, id: args.id, amountTotal: decimal(amounts.total) };
|
|
701
|
+
},
|
|
702
|
+
}),
|
|
703
|
+
postMove: defineFn({
|
|
704
|
+
input: { id: 'id' },
|
|
705
|
+
output: { ok: 'bool', id: 'id?', name: 'text?', errors: 'json?' },
|
|
706
|
+
effects: [
|
|
707
|
+
'read:account.Move',
|
|
708
|
+
'read:account.MoveLine',
|
|
709
|
+
'read:account.Journal',
|
|
710
|
+
'write:account.Journal',
|
|
711
|
+
'write:account.Move',
|
|
712
|
+
],
|
|
713
|
+
idempotent: true,
|
|
714
|
+
agent: true,
|
|
715
|
+
handler: (ctx, args) => post(ctx, args.id),
|
|
716
|
+
}),
|
|
717
|
+
cancelMove: defineFn({
|
|
718
|
+
input: { id: 'id' },
|
|
719
|
+
output: { ok: 'bool', id: 'id?', errors: 'json?' },
|
|
720
|
+
effects: ['read:account.Move', 'write:account.Move'],
|
|
721
|
+
idempotent: true,
|
|
722
|
+
agent: true,
|
|
723
|
+
handler: async (ctx, args) => {
|
|
724
|
+
const move = (await ctx.db.select('account.Move', { id: args.id }))[0];
|
|
725
|
+
if (!move)
|
|
726
|
+
return invalid('id', 'journal entry does not exist');
|
|
727
|
+
if (move.state === 'posted')
|
|
728
|
+
return invalid('state', 'posted entries must be reversed; direct cancellation is unsupported');
|
|
729
|
+
await ctx.db.update('account.Move', { id: args.id }, { state: 'cancel' });
|
|
730
|
+
return { ok: true, id: args.id };
|
|
731
|
+
},
|
|
732
|
+
}),
|
|
733
|
+
listPayments: defineFn({
|
|
734
|
+
input: {},
|
|
735
|
+
effects: ['read:account.Payment'],
|
|
736
|
+
agent: true,
|
|
737
|
+
handler: (ctx) => ctx.db.select('account.Payment'),
|
|
738
|
+
}),
|
|
739
|
+
registerPayment: defineFn({
|
|
740
|
+
input: {
|
|
741
|
+
id: 'id',
|
|
742
|
+
name: 'text',
|
|
743
|
+
paymentType: 'text',
|
|
744
|
+
partnerType: 'text',
|
|
745
|
+
partnerId: 'id?',
|
|
746
|
+
journalId: 'id',
|
|
747
|
+
destinationAccountId: 'id',
|
|
748
|
+
amount: 'decimal',
|
|
749
|
+
date: 'datetime?',
|
|
750
|
+
memo: 'text?',
|
|
751
|
+
paymentReference: 'text?',
|
|
752
|
+
reconcileLineId: 'id?',
|
|
753
|
+
},
|
|
754
|
+
output: { ok: 'bool', id: 'id?', moveId: 'id?', errors: 'json?' },
|
|
755
|
+
effects: [
|
|
756
|
+
'read:account.Payment',
|
|
757
|
+
'read:account.Journal',
|
|
758
|
+
'read:account.Account',
|
|
759
|
+
'read:account.Move',
|
|
760
|
+
'read:account.MoveLine',
|
|
761
|
+
'read:account.PartialReconcile',
|
|
762
|
+
'read:company.Company',
|
|
763
|
+
'write:account.Payment',
|
|
764
|
+
'write:account.Journal',
|
|
765
|
+
'write:account.Move',
|
|
766
|
+
'write:account.MoveLine',
|
|
767
|
+
'write:account.PartialReconcile',
|
|
768
|
+
],
|
|
769
|
+
idempotent: true,
|
|
770
|
+
agent: true,
|
|
771
|
+
handler: async (ctx, args) => {
|
|
772
|
+
if (!PAYMENT_TYPES.includes(args.paymentType))
|
|
773
|
+
return invalid('paymentType', 'payment type must be inbound or outbound');
|
|
774
|
+
if (!PARTNER_TYPES.includes(args.partnerType))
|
|
775
|
+
return invalid('partnerType', 'partner type must be customer or supplier');
|
|
776
|
+
if (!(n(args.amount) > 0))
|
|
777
|
+
return invalid('amount', 'payment amount must be positive');
|
|
778
|
+
const journal = (await ctx.db.select('account.Journal', { id: args.journalId }))[0];
|
|
779
|
+
if (!journal?.defaultAccountId)
|
|
780
|
+
return invalid('journalId', 'payment journal needs a default liquidity account');
|
|
781
|
+
if (!['bank', 'cash'].includes(String(journal.type)))
|
|
782
|
+
return invalid('journalId', 'payments require a bank or cash journal');
|
|
783
|
+
const destination = await accountOf(ctx, args.destinationAccountId);
|
|
784
|
+
if (!destination)
|
|
785
|
+
return invalid('destinationAccountId', 'destination account does not exist');
|
|
786
|
+
const expectedDestination = args.partnerType === 'customer' ? 'asset_receivable' : 'liability_payable';
|
|
787
|
+
if (destination.accountType !== expectedDestination)
|
|
788
|
+
return invalid('destinationAccountId', `destination account must be ${expectedDestination}`);
|
|
789
|
+
const existing = (await ctx.db.select('account.Payment', { id: args.id }))[0];
|
|
790
|
+
if (existing &&
|
|
791
|
+
args.reconcileLineId &&
|
|
792
|
+
(await ctx.db.select('account.PartialReconcile', {
|
|
793
|
+
id: `${String(args.id)}:reconcile:${String(args.reconcileLineId)}`,
|
|
794
|
+
}))[0])
|
|
795
|
+
return { ok: true, id: args.id, moveId: existing.moveId };
|
|
796
|
+
let reconcileTarget = null;
|
|
797
|
+
if (args.reconcileLineId) {
|
|
798
|
+
reconcileTarget = (await ctx.db.select('account.MoveLine', { id: args.reconcileLineId }))[0] ?? null;
|
|
799
|
+
if (!reconcileTarget)
|
|
800
|
+
return invalid('reconcileLineId', 'open item does not exist');
|
|
801
|
+
if (reconcileTarget.accountId !== args.destinationAccountId)
|
|
802
|
+
return invalid('reconcileLineId', 'open item uses another destination account');
|
|
803
|
+
const expectedDebit = args.paymentType === 'inbound';
|
|
804
|
+
if ((expectedDebit && n(reconcileTarget.balance) <= 0) ||
|
|
805
|
+
(!expectedDebit && n(reconcileTarget.balance) >= 0))
|
|
806
|
+
return invalid('reconcileLineId', 'open item has the wrong debit or credit direction');
|
|
807
|
+
if (n(args.amount) - n(reconcileTarget.amountResidual) > 0.000001)
|
|
808
|
+
return invalid('amount', 'payment amount exceeds the selected open item');
|
|
809
|
+
}
|
|
810
|
+
const reconcilePayment = async (paymentMoveId) => {
|
|
811
|
+
if (!reconcileTarget)
|
|
812
|
+
return null;
|
|
813
|
+
const counterpartId = `${paymentMoveId}:counterpart`;
|
|
814
|
+
const result = await functions.reconcile.handler(ctx, {
|
|
815
|
+
id: `${String(args.id)}:reconcile:${String(reconcileTarget.id)}`,
|
|
816
|
+
debitMoveId: args.paymentType === 'inbound' ? reconcileTarget.id : counterpartId,
|
|
817
|
+
creditMoveId: args.paymentType === 'inbound' ? counterpartId : reconcileTarget.id,
|
|
818
|
+
amount: args.amount,
|
|
819
|
+
date: args.date ?? today(),
|
|
820
|
+
});
|
|
821
|
+
return result.ok === true ? null : result;
|
|
822
|
+
};
|
|
823
|
+
if (existing) {
|
|
824
|
+
const failed = await reconcilePayment(String(existing.moveId));
|
|
825
|
+
return failed ?? { ok: true, id: args.id, moveId: existing.moveId };
|
|
826
|
+
}
|
|
827
|
+
const moveId = `${String(args.id)}:move`, date = String(args.date ?? today()), currency = await companyCurrency(ctx), inbound = args.paymentType === 'inbound';
|
|
828
|
+
await ctx.tx(async (tx) => {
|
|
829
|
+
await tx.db.insert('account.Move', {
|
|
830
|
+
id: moveId,
|
|
831
|
+
name: moveId,
|
|
832
|
+
ref: args.paymentReference ?? args.memo ?? null,
|
|
833
|
+
date,
|
|
834
|
+
moveType: 'entry',
|
|
835
|
+
state: 'draft',
|
|
836
|
+
journalId: args.journalId,
|
|
837
|
+
partnerId: args.partnerId ?? null,
|
|
838
|
+
invoiceDate: null,
|
|
839
|
+
invoiceDateDue: null,
|
|
840
|
+
paymentTermId: null,
|
|
841
|
+
paymentState: 'paid',
|
|
842
|
+
currency,
|
|
843
|
+
amountUntaxed: '0',
|
|
844
|
+
amountTax: '0',
|
|
845
|
+
amountTotal: String(args.amount),
|
|
846
|
+
postedAt: null,
|
|
847
|
+
});
|
|
848
|
+
const add = (id, accountId, debitSide, reconcilable) => tx.db.insert('account.MoveLine', {
|
|
849
|
+
id,
|
|
850
|
+
moveId,
|
|
851
|
+
name: args.memo ?? args.name,
|
|
852
|
+
accountId,
|
|
853
|
+
partnerId: args.partnerId ?? null,
|
|
854
|
+
productId: null,
|
|
855
|
+
productUomId: null,
|
|
856
|
+
quantity: '1',
|
|
857
|
+
priceUnit: String(args.amount),
|
|
858
|
+
discount: '0',
|
|
859
|
+
taxId: null,
|
|
860
|
+
debit: debitSide ? String(args.amount) : '0',
|
|
861
|
+
credit: debitSide ? '0' : String(args.amount),
|
|
862
|
+
balance: decimal(debitSide ? n(args.amount) : -n(args.amount)),
|
|
863
|
+
dateMaturity: null,
|
|
864
|
+
displayType: null,
|
|
865
|
+
reconciled: false,
|
|
866
|
+
amountResidual: reconcilable ? String(args.amount) : '0',
|
|
867
|
+
sequence: debitSide ? 10 : 20,
|
|
868
|
+
});
|
|
869
|
+
await add(`${moveId}:liquidity`, journal.defaultAccountId, inbound, false);
|
|
870
|
+
await add(`${moveId}:counterpart`, args.destinationAccountId, !inbound, true);
|
|
871
|
+
await tx.db.insert('account.Payment', {
|
|
872
|
+
id: args.id,
|
|
873
|
+
name: args.name,
|
|
874
|
+
paymentType: args.paymentType,
|
|
875
|
+
partnerType: args.partnerType,
|
|
876
|
+
partnerId: args.partnerId ?? null,
|
|
877
|
+
journalId: args.journalId,
|
|
878
|
+
destinationAccountId: args.destinationAccountId,
|
|
879
|
+
amount: args.amount,
|
|
880
|
+
date,
|
|
881
|
+
memo: args.memo ?? null,
|
|
882
|
+
paymentReference: args.paymentReference ?? null,
|
|
883
|
+
state: 'in_process',
|
|
884
|
+
currency,
|
|
885
|
+
moveId,
|
|
886
|
+
});
|
|
887
|
+
});
|
|
888
|
+
const posted = await post(ctx, moveId);
|
|
889
|
+
if (posted.ok !== true)
|
|
890
|
+
return posted;
|
|
891
|
+
await ctx.db.update('account.Payment', { id: args.id }, { state: 'paid' });
|
|
892
|
+
const failed = await reconcilePayment(moveId);
|
|
893
|
+
if (failed)
|
|
894
|
+
return failed;
|
|
895
|
+
return { ok: true, id: args.id, moveId };
|
|
896
|
+
},
|
|
897
|
+
}),
|
|
898
|
+
reconcile: defineFn({
|
|
899
|
+
input: { id: 'id', debitMoveId: 'id', creditMoveId: 'id', amount: 'decimal', date: 'datetime?' },
|
|
900
|
+
output: { ok: 'bool', id: 'id?', errors: 'json?' },
|
|
901
|
+
effects: [
|
|
902
|
+
'read:account.Move',
|
|
903
|
+
'read:account.MoveLine',
|
|
904
|
+
'read:account.Account',
|
|
905
|
+
'read:account.PartialReconcile',
|
|
906
|
+
'write:account.Move',
|
|
907
|
+
'write:account.MoveLine',
|
|
908
|
+
'write:account.PartialReconcile',
|
|
909
|
+
],
|
|
910
|
+
idempotent: true,
|
|
911
|
+
agent: true,
|
|
912
|
+
handler: async (ctx, args) => {
|
|
913
|
+
const amount = money(n(args.amount));
|
|
914
|
+
if (!(amount > 0))
|
|
915
|
+
return invalid('amount', 'reconciliation amount must be positive');
|
|
916
|
+
if ((await ctx.db.select('account.PartialReconcile', { id: args.id }))[0])
|
|
917
|
+
return { ok: true, id: args.id };
|
|
918
|
+
let moveIds = null;
|
|
919
|
+
try {
|
|
920
|
+
moveIds = await ctx.tx(async (tx) => {
|
|
921
|
+
const debit = (await tx.db.select('account.MoveLine', { id: args.debitMoveId }))[0];
|
|
922
|
+
const credit = (await tx.db.select('account.MoveLine', { id: args.creditMoveId }))[0];
|
|
923
|
+
if (!debit || !credit || n(debit.balance) <= 0 || n(credit.balance) >= 0)
|
|
924
|
+
throw new Error('reconciliation needs one debit and one credit line');
|
|
925
|
+
if (debit.accountId !== credit.accountId)
|
|
926
|
+
throw new Error('reconciled lines must use the same account');
|
|
927
|
+
const [debitMove, creditMove] = await Promise.all([
|
|
928
|
+
tx.db.select('account.Move', { id: debit.moveId }),
|
|
929
|
+
tx.db.select('account.Move', { id: credit.moveId }),
|
|
930
|
+
]);
|
|
931
|
+
if (debitMove[0]?.state !== 'posted' || creditMove[0]?.state !== 'posted')
|
|
932
|
+
throw new Error('only posted journal items can be reconciled');
|
|
933
|
+
const account = await accountOf(tx, debit.accountId);
|
|
934
|
+
if (!account?.reconcile)
|
|
935
|
+
throw new Error('account does not allow reconciliation');
|
|
936
|
+
if (amount - n(debit.amountResidual) > 0.000001 || amount - n(credit.amountResidual) > 0.000001)
|
|
937
|
+
throw new Error('amount exceeds a residual balance');
|
|
938
|
+
const held = await tx.db.insertIfAbsent('account.PartialReconcile', {
|
|
939
|
+
id: args.id,
|
|
940
|
+
debitMoveId: args.debitMoveId,
|
|
941
|
+
creditMoveId: args.creditMoveId,
|
|
942
|
+
amount: decimal(amount),
|
|
943
|
+
date: args.date ?? today(),
|
|
944
|
+
});
|
|
945
|
+
if (!('dryRun' in held) && !held.inserted)
|
|
946
|
+
return [debit.moveId, credit.moveId];
|
|
947
|
+
const debitResidual = money(n(debit.amountResidual) - amount);
|
|
948
|
+
const creditResidual = money(n(credit.amountResidual) - amount);
|
|
949
|
+
const debitWrite = await tx.db.compareAndSet('account.MoveLine', { id: debit.id }, { amountResidual: debit.amountResidual }, { amountResidual: decimal(debitResidual), reconciled: debitResidual === 0 });
|
|
950
|
+
const creditWrite = await tx.db.compareAndSet('account.MoveLine', { id: credit.id }, { amountResidual: credit.amountResidual }, { amountResidual: decimal(creditResidual), reconciled: creditResidual === 0 });
|
|
951
|
+
if ((!('dryRun' in debitWrite) && !debitWrite.matched) ||
|
|
952
|
+
(!('dryRun' in creditWrite) && !creditWrite.matched))
|
|
953
|
+
throw new Error('residual balance changed concurrently; retry reconciliation');
|
|
954
|
+
return [debit.moveId, credit.moveId];
|
|
955
|
+
});
|
|
956
|
+
}
|
|
957
|
+
catch (error) {
|
|
958
|
+
return invalid('lines', error.message);
|
|
959
|
+
}
|
|
960
|
+
if (moveIds) {
|
|
961
|
+
await updatePaymentState(ctx, moveIds[0]);
|
|
962
|
+
await updatePaymentState(ctx, moveIds[1]);
|
|
963
|
+
}
|
|
964
|
+
return { ok: true, id: args.id };
|
|
965
|
+
},
|
|
966
|
+
}),
|
|
967
|
+
trialBalance: defineFn({
|
|
968
|
+
input: { dateFrom: 'datetime?', dateTo: 'datetime?' },
|
|
969
|
+
effects: ['read:account.Account', 'read:account.Move', 'read:account.MoveLine'],
|
|
970
|
+
agent: true,
|
|
971
|
+
handler: async (ctx, args) => {
|
|
972
|
+
const accounts = await ctx.db.select('account.Account'), moves = new Map((await ctx.db.select('account.Move', { state: 'posted' })).map((move) => [String(move.id), move]));
|
|
973
|
+
const result = new Map();
|
|
974
|
+
for (const line of await ctx.db.select('account.MoveLine')) {
|
|
975
|
+
const move = moves.get(String(line.moveId));
|
|
976
|
+
if (!move)
|
|
977
|
+
continue;
|
|
978
|
+
const at = new Date(String(move.date)).getTime(), from = args.dateFrom ? new Date(String(args.dateFrom)).getTime() : -Infinity, to = args.dateTo ? new Date(String(args.dateTo)).getTime() : Infinity;
|
|
979
|
+
if (at < from || at > to)
|
|
980
|
+
continue;
|
|
981
|
+
const held = result.get(String(line.accountId)) ?? { debit: 0, credit: 0 };
|
|
982
|
+
held.debit = money(held.debit + n(line.debit));
|
|
983
|
+
held.credit = money(held.credit + n(line.credit));
|
|
984
|
+
result.set(String(line.accountId), held);
|
|
985
|
+
}
|
|
986
|
+
return accounts
|
|
987
|
+
.map((account) => {
|
|
988
|
+
const held = result.get(String(account.id)) ?? { debit: 0, credit: 0 };
|
|
989
|
+
return {
|
|
990
|
+
accountId: account.id,
|
|
991
|
+
code: account.code,
|
|
992
|
+
name: account.name,
|
|
993
|
+
debit: decimal(held.debit),
|
|
994
|
+
credit: decimal(held.credit),
|
|
995
|
+
balance: decimal(held.debit - held.credit),
|
|
996
|
+
};
|
|
997
|
+
})
|
|
998
|
+
.filter((row) => n(row.debit) || n(row.credit));
|
|
999
|
+
},
|
|
1000
|
+
}),
|
|
1001
|
+
generalLedger: defineFn({
|
|
1002
|
+
input: { accountId: 'id?', dateFrom: 'datetime?', dateTo: 'datetime?' },
|
|
1003
|
+
effects: ['read:account.Move', 'read:account.MoveLine'],
|
|
1004
|
+
agent: true,
|
|
1005
|
+
handler: async (ctx, args) => {
|
|
1006
|
+
const moves = new Map((await ctx.db.select('account.Move', { state: 'posted' })).map((move) => [String(move.id), move]));
|
|
1007
|
+
const rows = [];
|
|
1008
|
+
for (const line of await ctx.db.select('account.MoveLine', args.accountId ? { accountId: args.accountId } : {})) {
|
|
1009
|
+
const move = moves.get(String(line.moveId));
|
|
1010
|
+
if (!move)
|
|
1011
|
+
continue;
|
|
1012
|
+
const at = new Date(String(move.date)).getTime();
|
|
1013
|
+
if (at < (args.dateFrom ? new Date(String(args.dateFrom)).getTime() : -Infinity))
|
|
1014
|
+
continue;
|
|
1015
|
+
if (at > (args.dateTo ? new Date(String(args.dateTo)).getTime() : Infinity))
|
|
1016
|
+
continue;
|
|
1017
|
+
rows.push({ ...line, move });
|
|
1018
|
+
}
|
|
1019
|
+
return rows.sort((a, b) => String(a.move.date).localeCompare(String(b.move.date)) || n(a.sequence) - n(b.sequence));
|
|
1020
|
+
},
|
|
1021
|
+
}),
|
|
1022
|
+
partnerStatement: defineFn({
|
|
1023
|
+
input: { partnerId: 'id' },
|
|
1024
|
+
effects: ['read:account.Move', 'read:account.MoveLine', 'read:account.Account'],
|
|
1025
|
+
agent: true,
|
|
1026
|
+
handler: async (ctx, args) => {
|
|
1027
|
+
const moves = new Map((await ctx.db.select('account.Move', { state: 'posted', partnerId: args.partnerId })).map((move) => [String(move.id), move])), rows = [];
|
|
1028
|
+
for (const line of await ctx.db.select('account.MoveLine', { partnerId: args.partnerId })) {
|
|
1029
|
+
const account = await accountOf(ctx, line.accountId);
|
|
1030
|
+
if (moves.has(String(line.moveId)) &&
|
|
1031
|
+
['asset_receivable', 'liability_payable'].includes(String(account?.accountType)))
|
|
1032
|
+
rows.push({ ...line, move: moves.get(String(line.moveId)) });
|
|
1033
|
+
}
|
|
1034
|
+
return rows;
|
|
1035
|
+
},
|
|
1036
|
+
}),
|
|
1037
|
+
};
|
|
1038
|
+
//# sourceMappingURL=functions.js.map
|