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.
danq9
signup: the person chooses the password and name on the confirm page
83c7aa6
2 weeks, 5 days ago
History
fin_closed_periods.json · 2.7 KB · 26 lines
| 1 | { |
| 2 | "name": "fin_closed_periods", |
| 3 | "title": "Closed Periods", |
| 4 | "version": 1, |
| 5 | "description": "A closed accounting period: from start_date through end_date inclusive, the books for that stretch are settled and no journal may be written, edited, or posted into it (hook-enforced on fin_journals and fin_journal_lines -- see the hooks' own docstrings). This is the control the predecessor system modeled (ClosedPeriod + period_locked) and most small-business books skip entirely: without it, last year's 'final' numbers stay quietly editable forever, which means the statements you filed and the statements you have can drift apart with nobody deciding they should. Closing a period is creating a row; reopening -- rare, and legitimate (a late auditor adjustment) -- is deleting it, and both land in the change log with an actor, so the question 'who reopened March?' has an answer. What this deliberately is NOT yet: year-end closing ENTRIES (moving net income to retained earnings -- fin_journals' reserved kind=closing, built when a real year-end needs it) and composer awareness (machine-composed journals write at the storage level, which bypasses hooks by design; a late bank-line resolution dated into a closed period is a real case that should surface to the operator rather than be silently blocked or silently shifted -- tracked in the package description until it repeats enough to earn its design).", |
| 6 | "fields": [ |
| 7 | {"name": "id"}, |
| 8 | {"name": "start_date", "type": "date", "required": true, "label": "From"}, |
| 9 | {"name": "end_date", "type": "date", "required": true, "label": "Through", |
| 10 | "help": "Inclusive. A journal dated exactly on this date is inside the closed period."}, |
| 11 | {"name": "reason", "type": "text", "label": "Reason", |
| 12 | "help": "Why this stretch is settled: 'FY2025 filed', 'Q2 reviewed'."}, |
| 13 | {"name": "closing_journal_id", "label": "Closing Journal", |
| 14 | "relation": {"collection": "fin_journals", "display_field": "description"}, |
| 15 | "help": "The year-end closing entry for this period, once closing entries exist. Optional until then."}, |
| 16 | {"name": "notes", "type": "textarea", "label": "Notes"}, |
| 17 | {"name": "owner_id", "type": "text", "label": "Owner"}, |
| 18 | {"name": "entity_id", "type": "text", "label": "Entity", |
| 19 | "relation": {"collection": "entities", "display_field": "name"}, |
| 20 | "help": "Which set of books this closes. Blank closes the period for all of the owner's journals without an entity."}, |
| 21 | {"name": "created_at", "type": "datetime", "read_only": true, "label": "Closed At"} |
| 22 | ], |
| 23 | "forms": {"default": {"fields": ["start_date", "end_date", "reason", "notes"]}}, |
| 24 | "views": {"list_mode": "table", |
| 25 | "list_fields": ["start_date", "end_date", "reason", "created_at"]} |
| 26 | } |