PurchaseInvoice
PurchaseInvoice DocType definition.
Attributes: name: Unique identifier for this PurchaseInvoice.Source: doctype.py
Fields
Section titled “Fields”| Field | Type | Required | Description | Validators |
|---|---|---|---|---|
| invoice_number | str | Supplier Invoice Number | maxLen: 50 | |
| supplier | Link | Linked Supplier 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 | - | |
| supplier_gstin | None | Supplier GSTIN | - | |
| place_of_supply | None | Place of supply / GST state code | - | |
| e_way_bill_no | None | E-Way Bill Number | - | |
| irn | None | Invoice Reference Number (IRN) | - | |
| is_reverse_charge | bool | Reverse Charge Applicable | - | |
| gst_category | Literal[ |
"Registered Regular","Registered Composition","Unregistered","SEZ","Overseas","Deemed Export",] | | GST Category | - | | cgst_amount | float | | CGST Amount | - | | sgst_amount | float | | SGST Amount | - | | igst_amount | float | | IGST Amount | - | | tds_category | None | | TDS Category / Section | - | | tds_rate | float | | TDS Rate (%) | - | | tds_amount | float | | TDS Amount | - | | 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 | Literal[ “Draft”, “Submitted”, “Paid”, “Partially Paid”, “Overdue”, “Cancelled”, ] | | Status | - |
Permissions
Section titled “Permissions”| Role | Cancel | Create | Delete | Read | Submit | Write |
|---|---|---|---|---|---|---|
| All | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
Configuration
Section titled “Configuration”| Setting | Value |
|---|---|
| Submittable | True |
| 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