Runs live, versioned Python application objects on one VM, with a suite of apps: projects, notes, tasks, files and more.

9 downloads

Install on DigitalOcean Download zip
Clone
Clone with git
git clone https://gitstable.com/git/askrobots/dbbasic-object-server.git
HTTPS
https://gitstable.com/git/askrobots/dbbasic-object-server.git
SSH
ssh://git@gitstable.com:2222/askrobots/dbbasic-object-server.git

Cloning needs no sign-in. Pushing over HTTPS asks for your username and an access token. SSH needs your key under SSH keys.

Daniel Quellhorst Changelog for this batch. 65ef78d 3 hours, 41 minutes ago History
fixed_assets.json · 9.1 KB · 99 lines
1{
2 "name": "fixed_assets",
3 "title": "Fixed Assets",
4 "version": 1,
5 "description": "The fixed-asset register: one row per thing the business owns and uses for more than a year (a van, an oven, a laptop). The row is the record of what it cost, when it went into service, where it is and who has it, and how it is depreciated -- the BOOK columns (book_method, book_life_months, book_salvage_cents) drive the monthly journals; the TAX columns are separate data the books never read, shown beside the schedule for the accountant (MACRS tables and Section 179 are not modelled: ask your accountant). Methods are data: straight_line, declining or none. Nothing here is computed into the row: the schedule is derived from it (object_assets.book_schedule), and the journals are composed by system_asset_books / action_asset_books with a generated_from marker per asset-month, so a replay never posts twice. Once in service the cost and book columns are frozen (they are what the posted journals were computed from); a disposed asset is frozen whole. See docs/assets-and-losses.md.",
6 "fields": [
7 {"name": "id"},
8 {"name": "name", "type": "text", "required": true, "label": "Asset", "validation": {"min_length": 1, "max_length": 200}},
9 {"name": "asset_tag", "type": "text", "label": "Asset Tag", "validation": {"max_length": 64},
10 "help": "The label on the thing itself, or its serial or VIN."},
11 {"name": "description", "type": "textarea", "label": "Description"},
12 {"name": "category", "type": "text", "label": "Category", "validation": {"max_length": 80},
13 "help": "Vehicles, kitchen equipment, computers -- free text, for grouping."},
14 {"name": "status", "type": "enum", "label": "Status", "default": "draft",
15 "enum": ["draft", "in_service", "disposed"],
16 "transitions": {"draft": ["in_service"], "in_service": ["disposed"]},
17 "help": "draft until it is placed in service (nothing is booked); in_service starts capitalization and depreciation; disposed is set by the books pass when the asset's disposal is posted, and the locked check refuses it otherwise."},
18 {"name": "cost_cents", "type": "integer", "required": true, "label": "Cost Basis (cents)", "validation": {"min": 1},
19 "help": "What it cost to acquire and get ready for use: price, delivery, installation. Integer cents. Later improvements are separate asset_work rows, each with its own date."},
20 {"name": "acquired_on", "type": "date", "label": "Acquired On"},
21 {"name": "placed_in_service_on", "type": "date", "label": "Placed In Service",
22 "validation": {"required_when": {"status": ["in_service", "disposed"]}},
23 "help": "Depreciation starts the month of this date (full-month convention)."},
24 {"name": "location", "type": "text", "label": "Location", "validation": {"max_length": 200}},
25 {"name": "custodian", "type": "text", "label": "Custodian", "validation": {"max_length": 200},
26 "help": "The person responsible for it."},
27 {"name": "product_id", "type": "relation", "label": "Catalog Product",
28 "relation": {"collection": "products", "display_field": "name", "requires": "read"},
29 "help": "Optional: the catalog row (product_type asset) this asset is an instance of."},
30 {"name": "book_method", "type": "enum", "label": "Book Method", "default": "straight_line",
31 "enum": ["straight_line", "declining", "none"],
32 "help": "straight_line spreads cost minus salvage evenly over the life; declining books a rate of the remaining book value each month (switching to straight line when that is larger); none never depreciates (land)."},
33 {"name": "book_life_months", "type": "integer", "label": "Book Life (months)", "validation": {"min": 1, "max": 1200,
34 "required_when": {"book_method": ["straight_line", "declining"]}}},
35 {"name": "book_salvage_cents", "type": "integer", "label": "Book Salvage (cents)", "default": "0", "validation": {"min": 0},
36 "help": "What it is expected to be worth at the end of its life. Depreciation never takes the book value below it."},
37 {"name": "book_declining_rate_bps", "type": "integer", "label": "Declining Rate (bps)", "default": "20000",
38 "validation": {"min": 1, "max": 100000},
39 "help": "For declining only: 20000 is double declining (200%), 15000 is 150%."},
40 {"name": "tax_method", "type": "enum", "label": "Tax Method", "default": "none",
41 "enum": ["none", "straight_line", "declining", "operator_entered"],
42 "help": "Never booked. operator_entered: type each year's figure from your accountant into Asset Tax Entries. MACRS, Section 179 and bonus depreciation are not computed here: ask your accountant."},
43 {"name": "tax_life_months", "type": "integer", "label": "Tax Life (months)", "validation": {"min": 1, "max": 1200,
44 "required_when": {"tax_method": ["straight_line", "declining"]}}},
45 {"name": "tax_salvage_cents", "type": "integer", "label": "Tax Salvage (cents)", "default": "0", "validation": {"min": 0}},
46 {"name": "tax_declining_rate_bps", "type": "integer", "label": "Tax Declining Rate (bps)", "default": "20000",
47 "validation": {"min": 1, "max": 100000}},
48 {"name": "tax_notes", "type": "textarea", "label": "Tax Notes",
49 "help": "What the accountant said, and when."},
50 {"name": "capitalization", "type": "enum", "label": "Capitalization", "default": "post",
51 "enum": ["post", "booked_elsewhere"],
52 "help": "post: placing it in service books DR the asset cost account / CR the funding account. booked_elsewhere: the purchase is already in the books (a bill paid straight to the asset account), so only depreciation is booked."},
53 {"name": "asset_account_id", "label": "Asset Cost Account",
54 "relation": {"collection": "fin_accounts", "display_field": "name", "requires": "update"},
55 "help": "Blank: the app setting assets.journal.cost_account."},
56 {"name": "accumulated_account_id", "label": "Accumulated Depreciation Account",
57 "relation": {"collection": "fin_accounts", "display_field": "name", "requires": "update"},
58 "help": "Blank: assets.journal.accumulated_account (a contra-asset)."},
59 {"name": "expense_account_id", "label": "Depreciation Expense Account",
60 "relation": {"collection": "fin_accounts", "display_field": "name", "requires": "update"},
61 "help": "Blank: assets.journal.depreciation_account."},
62 {"name": "funding_account_id", "label": "Paid From Account",
63 "relation": {"collection": "fin_accounts", "display_field": "name", "requires": "update"},
64 "help": "The credit side of capitalization (cash, a card, a loan, payables). Blank: assets.journal.funding_account."},
65 {"name": "capitalization_journal_id", "type": "text", "label": "Capitalization Journal", "read_only": true},
66 {"name": "disposed_on", "type": "date", "label": "Disposed On", "read_only": true},
67 {"name": "notes", "type": "textarea", "label": "Notes"},
68 {"name": "owner_id", "type": "text", "label": "Owner"},
69 {"name": "entity_id", "type": "text", "label": "Entity",
70 "relation": {"collection": "entities", "display_field": "name", "requires": "update"}},
71 {"name": "created_at", "type": "datetime", "label": "Created", "read_only": true}
72 ],
73 "locked_when": [
74 {"when": {"status": ["in_service"]},
75 "except": ["name", "asset_tag", "description", "category", "status", "location", "custodian",
76 "product_id", "tax_method", "tax_life_months", "tax_salvage_cents",
77 "tax_declining_rate_bps", "tax_notes", "notes"],
78 "message": "This asset is in service: its cost and book depreciation terms are what the posted journals were computed from, so they are frozen. Add an improvement for added cost; a change of estimate is a decision for your accountant. Its name, tag, location, custodian, tax columns and notes may still change."},
79 {"when": {"status": ["disposed"]}, "except": ["notes"],
80 "message": "This asset is disposed: the register entry is final. Only notes may change."}
81 ],
82 "locked_checks": [
83 {"name": "asset_state", "object": "check_assets", "function": "ASSET_CHECK",
84 "reads": ["asset_disposals"], "lock": "assets",
85 "on": {"create": true, "update": ["status"], "delete": false}}
86 ],
87 "capabilities": {"comments": true, "attachments": true},
88 "forms": {"default": {"fields": ["name", "asset_tag", "category", "description", "status", "cost_cents",
89 "acquired_on", "placed_in_service_on", "location", "custodian",
90 "book_method", "book_life_months", "book_salvage_cents",
91 "book_declining_rate_bps", "capitalization", "funding_account_id",
92 "asset_account_id", "accumulated_account_id", "expense_account_id",
93 "tax_method", "tax_life_months", "tax_salvage_cents",
94 "tax_declining_rate_bps", "tax_notes", "product_id", "notes"]}},
95 "views": {"list_mode": "table",
96 "list_fields": ["name", "asset_tag", "category", "status", "cost_cents", "placed_in_service_on", "location", "custodian"],
97 "filter_fields": ["status", "book_method"]},
98 "search": {"fields": ["name", "asset_tag", "description", "location", "custodian"]}
99}