category
says which documents it takes (sales_invoice, sales_credit,
purchases_invoice, purchases_credit, incoming_sales, incoming_purchases); a
few historical incoming journals read as incoming, read-only.
Numbering
Every document of the journal gets a number drawn from a counter, rendered according tonumbering_format: {code}<sep><period><sep>{seq:N}, where <sep>
is - or /, and N (2–8) is the width of the counter — invoice 119 renders as
0119 with {seq:4}. Default: {code}-{year4}-{seq:5}.
<period> combines one or more of these tokens, computed from the issue date:
The
fy* tokens only differ from {year4}/{year2} when sequence_scope is
fiscal-year and the fiscal year does not start in January; otherwise they render
the same value.
sequence_scope (never, monthly, calendar-year, fiscal-year) says when the
counter resets.
The code prefixes that number: it is unique within the company, case-insensitive
(409 duplicate_journal_code).
code, category and sequence_scope are fixed at creation
(422 field_not_editable afterwards): changing them would break the continuity of
the numbers already handed out. For another code or category, create a journal.
Default journal
Each category has a default journal, the onePOST /documents books a document in
when it names none. It must stay usable:
is_default: truepromotes a journal and demotes the previous default of the same category;- a journal cannot be created or updated into being both default and inactive at
once, and the last default of a category cannot be demoted with
is_default: false(422 default_journal_required) — promote another journal instead. The rule looks at the final state: promoting an inactive journal passes if the same request reactivates it.
On documents
documents.journal_id is the journal the document is booked in, null when it has
none (many received documents). A document imported as purchase/sale is booked
in the default incoming journal at creation.