SalesInvoice
SalesInvoice DocType definition.
Attributes: name: Unique identifier for this SalesInvoice.Source: doctype.py
Fields
Section titled “Fields”| Field | Type | Required | Description | Validators |
|---|---|---|---|---|
| invoice_number | str | Invoice Number | maxLen: 50 | |
| company | Link | Linked Company ID | - | |
| customer | str | Linked Customer ID | - | |
| posting_date | date | Posting Date | - | |
| due_date | None | Due Date | - | |
| customer_gstin | None | Customer GSTIN | - | |
| place_of_supply | None | Place of supply / GST state code | - | |
| e_invoice_status | str | E-Invoice status tracking | - | |
| items | list[InvoiceItem] | Invoice Items | - | |
| 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 | str | Status (Draft, Submitted, Paid, Cancelled) | - |
Permissions
Section titled “Permissions”| Role | Create | Delete | Read | Write |
|---|---|---|---|---|
| All | ✓ | ✓ | ✓ | ✓ |
Configuration
Section titled “Configuration”| Setting | Value |
|---|---|
| Submittable | False |
| Track Changes | True |
Controller
Section titled “Controller”Controller hooks are implemented in *_controller.py files.
Available lifecycle hooks:
validate()- Called before save, raise exceptions for validation errorsbefore_insert()- Called before inserting a new documentafter_insert()- Called after successfully insertingbefore_save()- Called before saving (insert or update)after_save()- Called after savingbefore_delete()- Called before deletingafter_delete()- Called after deleting