askrobots / dbbasic-object-server
Public
Runs live, versioned Python application objects on one VM, with a suite of apps: projects, notes, tasks, files and more.
dbbasic-package.json · 3.9 KB · 46 lines
| 1 | { |
| 2 | "id": "app-assets", |
| 3 | "name": "Fixed Assets And Losses", |
| 4 | "version": "0.1.0", |
| 5 | "description": "A fixed-asset register (fixed_assets: cost basis, placed-in-service date, location and custodian, book method/life/salvage and separate tax method/life/salvage, methods as data), improvements and repairs with the decision and its reason recorded on the row (asset_work), disposals by sale, scrap, theft or casualty with the gain or loss computed against net book value and stamped (asset_disposals), tax figures typed in from the accountant (asset_tax_entries, never booked), and one record for any loss of stock or equipment, approved by somebody other than its reporter (loss_events). The books follow the register through object_finance.compose_posted_journal: capitalization, improvements and repairs, monthly book depreciation (full-month convention, never below salvage, stopping at end of life or disposal) and disposals, each journal with a generated_from marker so a replay posts nothing twice and a date in a closed period books on the first open day, flagged. It runs daily (system_asset_books), on demand (action_asset_books), and as a reaction where the change dispatcher is on. Accounts come from the asset (or the disposal, the work, the loss) and else from app_settings keys assets.journal.* and losses.journal.*; an unconfigured account waits with a reason and books nothing. MACRS, Section 179, bonus depreciation and tax conventions are not computed: ask your accountant. See docs/assets-and-losses.md.", |
| 6 | "compatibility": {"dbbasic_object_server": ">=0.1.0"}, |
| 7 | "dependencies": ["app-finance", "app-catalog", "app-settings", "app-nav", "app-views"], |
| 8 | "objects": [ |
| 9 | {"id": "check_assets", "path": "objects/check/assets.py"}, |
| 10 | {"id": "hook_loss_events", "path": "objects/hook/loss_events.py"}, |
| 11 | {"id": "system_asset_books", "path": "objects/system/asset_books.py"}, |
| 12 | {"id": "action_asset_books", "path": "objects/action/asset_books.py"}, |
| 13 | {"id": "site_asset_schedule", "path": "objects/site/asset_schedule.py"} |
| 14 | ], |
| 15 | "schemas": [ |
| 16 | {"collection": "fixed_assets", "path": "schemas/fixed_assets.json"}, |
| 17 | {"collection": "asset_work", "path": "schemas/asset_work.json"}, |
| 18 | {"collection": "asset_disposals", "path": "schemas/asset_disposals.json"}, |
| 19 | {"collection": "asset_tax_entries", "path": "schemas/asset_tax_entries.json"}, |
| 20 | {"collection": "loss_events", "path": "schemas/loss_events.json"} |
| 21 | ], |
| 22 | "permissions": [{"path": "permissions/rules.json"}], |
| 23 | "seed": [ |
| 24 | {"collection": "views", "path": "seed/views.tsv"}, |
| 25 | {"collection": "site_routes", "path": "seed/site_routes.tsv"} |
| 26 | ], |
| 27 | "migrations": [], |
| 28 | "schedules": [ |
| 29 | {"id": "asset_books_daily", "object_id": "system_asset_books", "schedule": "35 6 * * *", |
| 30 | "description": "Book what the fixed-asset register and approved losses say: capitalizations, improvements and repairs, each ended month's depreciation, disposals, write-offs and insurance recoveries. Daily, so a month is booked on the first pass after it ends even if the box was down on the 1st; idempotent by generated_from marker, so most days it writes nothing. After the recurring-journal pass (6:25)."} |
| 31 | ], |
| 32 | "nav": [ |
| 33 | {"id": "fixed_assets", "label": "Fixed Assets", "path": "/assets", |
| 34 | "blurb": "What the business owns, what it cost, and its depreciation schedule", |
| 35 | "surface": "member", "group": "Money", "order": 360}, |
| 36 | {"id": "losses", "label": "Losses", "path": "/losses", |
| 37 | "blurb": "Theft, damage, spoilage and shrinkage, with evidence, insurance and approval", |
| 38 | "surface": "member", "group": "Money", "order": 365} |
| 39 | ], |
| 40 | "attention": [ |
| 41 | {"id": "losses_to_approve", "collection": "loss_events", "where": {"status": "reported"}, |
| 42 | "detail": {"op": "sum", "field": "estimated_amount_cents", "format": "cents", "text": "{value} estimated"}, |
| 43 | "label": "Losses to approve", "path": "/losses", "nav_id": "losses", "group": "Money", |
| 44 | "severity": "normal"} |
| 45 | ] |
| 46 | } |