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

0 downloads

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.

danq9 signup: the person chooses the password and name on the confirm page 83c7aa6 2 weeks, 5 days ago History
fin_journal_lines.json · 2.9 KB · 97 lines
1{
2 "name": "fin_journal_lines",
3 "title": "Journal Lines",
4 "version": 3,
5 "storage": "append",
6 "description": "Debit/credit rows belonging to one journal. A line is a debit OR a credit -- nothing in this schema enforces that split (a row could carry both debit_cents and credit_cents nonzero), matching the source's own JournalLine model, which also never enforced it at the field level (reconciled against a private predecessor-system audit, not part of this repo: 'JournalLine (debit-or-credit, ...)' is a naming/usage convention, not a guarded constraint). Totals are never stamped back onto fin_journals -- see object_finance.journal_totals for the computed fold and packages/app-finance/schemas/fin_journals.json's status field help for why no balance check exists at post.",
7 "fields": [
8 {
9 "name": "id"
10 },
11 {
12 "name": "journal_id",
13 "type": "relation",
14 "required": true,
15 "relation": {
16 "collection": "fin_journals",
17 "display_field": "description"
18 },
19 "label": "Journal",
20 "help": "Set once at creation and not intended to change after. Not schema read_only -- same reason as app-invoices' invoice_lines.invoice_id: a required, client-submitted-at-creation field cannot also be read_only on this platform (the server rejects any client submission of a read_only field, even the first one)."
21 },
22 {
23 "name": "account_id",
24 "type": "relation",
25 "required": true,
26 "relation": {
27 "collection": "fin_accounts",
28 "display_field": "name"
29 },
30 "label": "Account"
31 },
32 {
33 "name": "debit_cents",
34 "type": "integer",
35 "default": "0",
36 "label": "Debit (cents)"
37 },
38 {
39 "name": "credit_cents",
40 "type": "integer",
41 "default": "0",
42 "label": "Credit (cents)"
43 },
44 {
45 "name": "memo",
46 "type": "text",
47 "label": "Memo",
48 "validation": {
49 "max_length": 300
50 }
51 },
52 {
53 "name": "owner_id",
54 "type": "text",
55 "label": "Owner"
56 },
57 {
58 "name": "entity_id",
59 "type": "text",
60 "label": "Entity",
61 "relation": {
62 "collection": "entities",
63 "display_field": "name"
64 },
65 "help": "The set of books this belongs to (65 multi-entity). Optional during rollout; backfilled to the owner's default entity, set by the entity switcher on new writes."
66 },
67 {
68 "name": "created_at",
69 "type": "datetime",
70 "label": "Created",
71 "read_only": true
72 }
73 ],
74 "forms": {
75 "default": {
76 "fields": [
77 "journal_id",
78 "account_id",
79 "debit_cents",
80 "credit_cents",
81 "memo"
82 ]
83 }
84 },
85 "views": {
86 "list_mode": "table",
87 "list_fields": [
88 "account_id",
89 "debit_cents",
90 "credit_cents",
91 "memo"
92 ]
93 },
94 "hooks": {
95 "before_write": "hook_fin_journal_lines"
96 }
97}