Version 6.x.x Source

Table Name: `tabPurchase Invoice`

### Fields

Sr | Fieldname | Type | Label | Options
--- | --- | --- | --- | ---
1 | `title` | Data | Title |
2 | `naming_series` | Select | Series |
    PINV-
    PINV-RET-
3 | `supplier` | Link | Supplier | Supplier
4 | `supplier_name` | Data | Supplier Name |
5 | `address_display` | Small Text | Address |
6 | `contact_display` | Small Text | Contact |
7 | `contact_mobile` | Small Text | Mobile No |
8 | `contact_email` | Small Text | Contact Email |
9 | `column_break1` | Column Break |  |
10 | `posting_date` | Date | Date |
11 | `bill_no` | Data | Supplier Invoice No |
12 | `bill_date` | Date | Supplier Invoice Date |
13 | `amended_from` | Link | Amended From | Purchase Invoice
14 | `company` | Link | Company | Company
15 | `is_return` | Check | Is Return |
16 | `return_against` | Link | Return Against Purchase Invoice | Purchase Invoice
17 | `currency_and_price_list` | Section Break | Currency and Price List |
    icon-tag
18 | `currency` | Link | Currency | Currency
19 | `conversion_rate` | Float | Exchange Rate |
20 | `column_break2` | Column Break |  |
21 | `buying_price_list` | Link | Price List | Price List
22 | `price_list_currency` | Link | Price List Currency | Currency
23 | `plc_conversion_rate` | Float | Price List Exchange Rate |
24 | `ignore_pricing_rule` | Check | Ignore Pricing Rule |
25 | `items_section` | Section Break |  |
    icon-shopping-cart
26 | `items` | Table | Items | Purchase Invoice Item
27 | `section_break_26` | Section Break |  |
28 | `base_total` | Currency | Total (Company Currency) |
    Company:company:default_currency
29 | `base_net_total` | Currency | Net Total (Company Currency) |
    Company:company:default_currency
30 | `column_break_28` | Column Break |  |
31 | `total` | Currency | Total |
    currency
32 | `net_total` | Currency | Net Total |
    currency
33 | `taxes_section` | Section Break |  |
    icon-money
34 | `taxes_and_charges` | Link | Taxes and Charges | Purchase Taxes and Charges Template
35 | `taxes` | Table | Purchase Taxes and Charges | Purchase Taxes and Charges
36 | `other_charges_calculation` | HTML | Taxes and Charges Calculation |
37 | `totals` | Section Break |  |
    icon-money
38 | `base_taxes_and_charges_added` | Currency | Taxes and Charges Added (Company Currency) |
    Company:company:default_currency
39 | `base_taxes_and_charges_deducted` | Currency | Taxes and Charges Deducted (Company Currency) |
    Company:company:default_currency
40 | `base_total_taxes_and_charges` | Currency | Total Taxes and Charges (Company Currency) |
    Company:company:default_currency
41 | `column_break_40` | Column Break |  |
42 | `taxes_and_charges_added` | Currency | Taxes and Charges Added |
    currency
43 | `taxes_and_charges_deducted` | Currency | Taxes and Charges Deducted |
    currency
44 | `total_taxes_and_charges` | Currency | Total Taxes and Charges |
    currency
45 | `section_break_44` | Section Break | Additional Discount |
46 | `apply_discount_on` | Select | Apply Additional Discount On |
    Grand Total
    Net Total
47 | `column_break_46` | Column Break |  |
48 | `discount_amount` | Currency | Additional Discount Amount |
    currency
49 | `base_discount_amount` | Currency | Additional Discount Amount (Company Currency) |
    Company:company:default_currency
50 | `section_break_49` | Section Break |  |
51 | `base_grand_total` | Currency | Grand Total (Company Currency) |
    Company:company:default_currency
52 | `base_in_words` | Data | In Words (Company Currency) |
53 | `column_break8` | Column Break |  |
54 | `grand_total` | Currency | Grand Total |
    currency
55 | `in_words` | Data | In Words |
56 | `total_advance` | Currency | Total Advance |
    party_account_currency
57 | `outstanding_amount` | Currency | Outstanding Amount |
    party_account_currency
58 | `write_off` | Section Break | Write Off |
59 | `write_off_amount` | Currency | Write Off Amount |
    currency
60 | `base_write_off_amount` | Currency | Write Off Amount (Company Currency) |
    Company:company:default_currency
61 | `column_break_61` | Column Break |  |
62 | `write_off_account` | Link | Write Off Account | Account
63 | `write_off_cost_center` | Link | Write Off Cost Center | Cost Center
64 | `advances_section` | Section Break | Advance Payments |
    icon-money
65 | `get_advances_paid` | Button | Get Advances Paid |
    get_advances
66 | `advances` | Table | Advances | Purchase Invoice Advance
67 | `terms_section_break` | Section Break | Terms and Conditions |
    icon-legal
68 | `tc_name` | Link | Terms | Terms and Conditions
69 | `terms` | Text Editor | Terms and Conditions1 |
70 | `contact_section` | Section Break | Contact Details |
    icon-bullhorn
71 | `supplier_address` | Link | Supplier Address | Address
72 | `col_break23` | Column Break |  |
73 | `contact_person` | Link | Contact Person | Contact
74 | `printing_settings` | Section Break | Printing Settings |
75 | `letter_head` | Link | Letter Head | Letter Head
76 | `select_print_heading` | Link | Print Heading | Print Heading
77 | `more_info` | Section Break | More Information |
    icon-file-text
78 | `credit_to` | Link | Credit To | Account
79 | `party_account_currency` | Link | Party Account Currency | Currency
80 | `is_opening` | Select | Is Opening |
    No
    Yes
81 | `due_date` | Date | Due Date |
82 | `against_expense_account` | Small Text | Against Expense Account |
83 | `column_break_63` | Column Break |  |
84 | `mode_of_payment` | Link | Mode of Payment | Mode of Payment
85 | `fiscal_year` | Link | Fiscal Year | Fiscal Year
86 | `remarks` | Small Text | Remarks |
87 | `recurring_invoice` | Section Break | Recurring Invoice |
    icon-time
88 | `is_recurring` | Check | Is Recurring |
89 | `recurring_type` | Select | Recurring Type Select the period when the invoice will be generated automatically |
    Monthly
    Quarterly
    Half-yearly
    Yearly
90 | `from_date` | Date | From Date Start date of current invoice's period |
91 | `to_date` | Date | To Date End date of current invoice's period |
92 | `repeat_on_day_of_month` | Int | Repeat on Day of Month The day of the month on which auto invoice will be generated e.g. 05, 28 etc |
93 | `end_date` | Date | End Date The date on which recurring invoice will be stop |
94 | `column_break_82` | Column Break |  |
95 | `next_date` | Date | Next Date The date on which next invoice will be generated. It is generated on submit. |
96 | `recurring_id` | Data | Recurring Id The unique id for tracking all recurring invoices. It is generated on submit. |
97 | `notification_email_address` | Small Text | Notification Email Address Enter email id separated by commas, invoice will be mailed automatically on particular date |
98 | `recurring_print_format` | Link | Recurring Print Format | Print Format

### Controller

#### erpnext.accounts.doctype.purchase_invoice.purchase_invoice

### Class PurchaseInvoice

Inherits from erpnext.controllers.buying_controller.BuyingController

__init__ (self, arg1, arg2=None)

No docs

check_active_purchase_items (self)

No docs

check_conversion_rate (self)

No docs

check_for_stopped_or_closed_status (self)

No docs

check_prev_docstatus (self)

No docs

create_remarks (self)

No docs

get_advances (self)

No docs

make_gl_entries (self)

No docs

on_cancel (self)

No docs

on_submit (self)

No docs

po_required (self)

No docs

pr_required (self)

No docs

set_against_expense_account (self)

No docs

set_missing_values (self, for_validate=False)

No docs

update_against_document_in_jv (self)

Links invoice and advance voucher: 1. cancel advance voucher 2. split into multiple rows if partially adjusted, assign against voucher 3. submit advance voucher

update_project (self)

No docs

validate (self)

No docs

validate_credit_to_acc (self)

No docs

validate_supplier_invoice (self)

No docs

validate_with_previous_doc (self)

No docs

validate_write_off_account (self)

No docs

Public API
`/api/method/erpnext.accounts.doctype.purchase_invoice.purchase_invoice.get_expense_account`

erpnext.accounts.doctype.purchase_invoice.purchase_invoice.get_expense_account (doctype, txt, searchfield, start, page_len, filters)

No docs

Public API
`/api/method/erpnext.accounts.doctype.purchase_invoice.purchase_invoice.make_debit_note`

erpnext.accounts.doctype.purchase_invoice.purchase_invoice.make_debit_note (source_name, target_doc=None)

No docs

#### Linked In:

- Purchase Invoice