Skip to content

SalesInvoice

SalesInvoice DocType definition.

Attributes:
name: Unique identifier for this SalesInvoice.

Source: doctype.py

Field Type Required Description Validators
invoice_number str Invoice Number maxLen: 50
company Link Linked Company ID -
customer Link Linked Customer ID -
billing_address_snapshot None - -
billing_contact_snapshot None - -
snapshots_locked bool - -
posting_date date Posting Date -
due_date None Due Date -
price_list Link Linked Price List -
customer_gstin None Customer GSTIN -
place_of_supply None Place of supply / GST state code -
e_invoice_status Literal[“Not Generated”, “Generated”, “Cancelled”, “Failed”] E-Invoice status tracking -
remarks None Remarks / Notes -
items list[InvoiceItem] Invoice Items -
taxes list[InvoiceTaxItem] - -
total_qty Decimal Total Quantity -
total_amount Decimal Total Amount before Tax -
tax_amount Decimal Total Tax Amount -
grand_total Decimal Grand Total -
paid_amount Decimal Amount Paid -
outstanding_amount Decimal Amount Outstanding -
status Literal[
"Draft",
"Submitted",
"Paid",
"Partially Paid",
"Overdue",
"Cancelled",

] | | Status | - |

Role Cancel Create Delete Read Submit Write
All
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