Skip to content

JournalEntry

JournalEntry DocType definition.

Attributes:
name: Unique identifier for this JournalEntry.

Source: doctype.py

Field Type Required Description Validators
entry_number str Journal Entry Number maxLen: 50
company Link Linked Company -
posting_date date Posting Date -
entry_type Literal[
"Journal Entry",
"Adjustment",
"Opening Balance",
"Depreciation",
"Exchange Gain/Loss",

] | | Entry Type | - | | narration | str | | Narration / Description | - | | total_debit | Decimal | | Total Debit Amount | - | | total_credit | Decimal | | Total Credit Amount | - | | status | Literal[“Draft”, “Submitted”, “Pending GL”, “Posted”, “Cancelled”] | | Status | - | | transfer_id | None | | Ledger-core Transfer ID | - | | entity_id | str | | Owning Entity | - | | accounts | list[JournalEntryAccount] | | Accounting Entries | - |

Setting Value
Submittable True
Track Changes True

Controller hooks are implemented in *_controller.py files. Available lifecycle hooks:

  • validate() - Called before save, raise exceptions for validation errors
  • before_insert() - Called before inserting a new document
  • after_insert() - Called after successfully inserting
  • before_save() - Called before saving (insert or update)
  • after_save() - Called after saving
  • before_delete() - Called before deleting
  • after_delete() - Called after deleting