Version 6.x.x Source

Table Name: `tabSales Invoice`

### Fields

Sr | Fieldname | Type | Label | Options
--- | --- | --- | --- | ---
1 | `customer_section` | Section Break |  |
    icon-user
2 | `title` | Data | Title |
3 | `naming_series` | Select | Series |
    SINV-
    SINV-RET-
4 | `customer` | Link | Customer | Customer
5 | `customer_name` | Data | Customer Name |
6 | `address_display` | Small Text | Address |
7 | `contact_display` | Small Text | Contact |
8 | `contact_mobile` | Small Text | Mobile No |
9 | `contact_email` | Small Text | Contact Email |
10 | `is_pos` | Check | Is POS |
11 | `is_return` | Check | Is Return |
12 | `column_break1` | Column Break |  |
13 | `posting_date` | Date | Date |
14 | `due_date` | Date | Payment Due Date |
15 | `company` | Link | Company | Company
16 | `amended_from` | Link | Amended From | Sales Invoice
17 | `return_against` | Link | Return Against Sales Invoice | Sales Invoice
18 | `shipping_address_name` | Link | Shipping Address Name | Address
19 | `shipping_address` | Small Text | Shipping Address |
20 | `currency_and_price_list` | Section Break | Currency and Price List |
21 | `currency` | Link | Currency | Currency
22 | `conversion_rate` | Float | Exchange Rate Rate at which Customer Currency is converted to customer's base currency |
23 | `column_break2` | Column Break |  |
24 | `selling_price_list` | Link | Price List | Price List
25 | `price_list_currency` | Link | Price List Currency | Currency
26 | `plc_conversion_rate` | Float | Price List Exchange Rate Rate at which Price list currency is converted to customer's base currency |
27 | `ignore_pricing_rule` | Check | Ignore Pricing Rule |
28 | `items_section` | Section Break |  |
    icon-shopping-cart
29 | `update_stock` | Check | Update Stock |
30 | `items` | Table | Items | Sales Invoice Item
31 | `packing_list` | Section Break | Packing List |
    icon-suitcase
32 | `packed_items` | Table | Packed Items | Packed Item
33 | `product_bundle_help` | HTML | Product Bundle Help |
34 | `section_break_30` | Section Break |  |
35 | `base_total` | Currency | Total (Company Currency) |
    Company:company:default_currency
36 | `base_net_total` | Currency | Net Total (Company Currency) |
    Company:company:default_currency
37 | `column_break_32` | Column Break |  |
38 | `total` | Currency | Total |
    currency
39 | `net_total` | Currency | Net Total |
    currency
40 | `taxes_section` | Section Break |  |
    icon-money
41 | `taxes_and_charges` | Link | Taxes and Charges | Sales Taxes and Charges Template
42 | `column_break_38` | Column Break |  |
43 | `shipping_rule` | Link | Shipping Rule | Shipping Rule
44 | `section_break_40` | Section Break |  |
45 | `taxes` | Table | Sales Taxes and Charges | Sales Taxes and Charges
46 | `other_charges_calculation` | HTML | Taxes and Charges Calculation |
47 | `section_break_43` | Section Break |  |
48 | `base_total_taxes_and_charges` | Currency | Total Taxes and Charges (Company Currency) |
    Company:company:default_currency
49 | `column_break_47` | Column Break |  |
50 | `total_taxes_and_charges` | Currency | Total Taxes and Charges |
    currency
51 | `section_break_49` | Section Break | Additional Discount |
52 | `apply_discount_on` | Select | Apply Additional Discount On |
    Grand Total
    Net Total
53 | `column_break_51` | Column Break |  |
54 | `discount_amount` | Currency | Additional Discount Amount |
    currency
55 | `base_discount_amount` | Currency | Additional Discount Amount (Company Currency) |
    Company:company:default_currency
56 | `totals` | Section Break |  |
    icon-money
57 | `base_grand_total` | Currency | Grand Total (Company Currency) |
    Company:company:default_currency
58 | `base_rounded_total` | Currency | Rounded Total (Company Currency) |
    Company:company:default_currency
59 | `base_in_words` | Data | In Words (Company Currency) In Words will be visible once you save the Sales Invoice. |
60 | `column_break5` | Column Break |  |
61 | `grand_total` | Currency | Grand Total |
    currency
62 | `rounded_total` | Currency | Rounded Total |
    currency
63 | `in_words` | Data | In Words |
64 | `total_advance` | Currency | Total Advance |
    party_account_currency
65 | `outstanding_amount` | Currency | Outstanding Amount |
    party_account_currency
66 | `advances_section` | Section Break | Advance Payments |
    icon-money
67 | `get_advances_received` | Button | Get Advances Received |
    get_advances
68 | `advances` | Table | Advances | Sales Invoice Advance
69 | `payments_section` | Section Break | Payments |
    icon-money
70 | `mode_of_payment` | Link | Mode of Payment | Mode of Payment
71 | `cash_bank_account` | Link | Cash/Bank Account | Account
72 | `column_break3` | Column Break |  |
73 | `paid_amount` | Currency | Paid Amount |
    currency
74 | `base_paid_amount` | Currency | Paid Amount (Company Currency) |
    Company:company:default_currency
75 | `column_break4` | Section Break | Write Off |
76 | `write_off_amount` | Currency | Write Off Amount |
    currency
77 | `base_write_off_amount` | Currency | Write Off Amount (Company Currency) |
    Company:company:default_currency
78 | `write_off_outstanding_amount_automatically` | Check | Write Off Outstanding Amount |
79 | `column_break_74` | Column Break |  |
80 | `write_off_account` | Link | Write Off Account | Account
81 | `write_off_cost_center` | Link | Write Off Cost Center | Cost Center
82 | `terms_section_break` | Section Break | Terms |
83 | `tc_name` | Link | Terms | Terms and Conditions
84 | `terms` | Text Editor | Terms and Conditions Details |
85 | `edit_printing_settings` | Section Break | Printing Settings |
86 | `letter_head` | Link | Letter Head | Letter Head
87 | `column_break_84` | Column Break |  |
88 | `select_print_heading` | Link | Print Heading | Print Heading
89 | `contact_section` | Section Break | More Information |
    icon-bullhorn
90 | `project_name` | Link | Project Name | Project
91 | `territory` | Link | Territory | Territory
92 | `customer_group` | Link | Customer Group | Customer Group
93 | `col_break23` | Column Break |  |
94 | `customer_address` | Link | Customer Address | Address
95 | `contact_person` | Link | Contact Person | Contact
96 | `campaign` | Link | Campaign | Campaign
97 | `source` | Select | Source |
    Existing Customer
    Reference
    Advertisement
    Cold Calling
    Exhibition
    Supplier Reference
    Mass Mailing
    Customer's Vendor
    Campaign
98 | `more_info` | Section Break | Accounting Details |
    icon-file-text
99 | `debit_to` | Link | Debit To | Account
100 | `party_account_currency` | Link | Party Account Currency | Currency
101 | `is_opening` | Select | Is Opening Entry |
    No
    Yes
102 | `c_form_applicable` | Select | C-Form Applicable |
    No
    Yes
103 | `c_form_no` | Link | C-Form No | C-Form
104 | `column_break8` | Column Break |  |
105 | `posting_time` | Time | Posting Time |
106 | `fiscal_year` | Link | Fiscal Year | Fiscal Year
107 | `remarks` | Small Text | Remarks |
108 | `sales_team_section_break` | Section Break | Commission |
    icon-group
109 | `sales_partner` | Link | Sales Partner | Sales Partner
110 | `column_break10` | Column Break |  |
111 | `commission_rate` | Float | Commission Rate (%) |
112 | `total_commission` | Currency | Total Commission |
    Company:company:default_currency
113 | `section_break2` | Section Break | Sales Team |
114 | `sales_team` | Table | Sales Team1 | Sales Team
115 | `recurring_invoice` | Section Break | Recurring |
    icon-time
116 | `column_break11` | Column Break |  |
117 | `is_recurring` | Check | Is Recurring Check if recurring invoice, uncheck to stop recurring or put proper End Date |
118 | `recurring_type` | Select | Recurring Type Select the period when the invoice will be generated automatically |
    Monthly
    Quarterly
    Half-yearly
    Yearly
119 | `from_date` | Date | From Date Start date of current invoice's period |
120 | `to_date` | Date | To Date End date of current invoice's period |
121 | `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 |
122 | `end_date` | Date | End Date The date on which recurring invoice will be stop |
123 | `column_break12` | Column Break |  |
124 | `next_date` | Date | Next Date The date on which next invoice will be generated. It is generated on submit. |
125 | `recurring_id` | Data | Recurring Id The unique id for tracking all recurring invoices. It is generated on submit. |
126 | `notification_email_address` | Small Text | Notification Email Address Enter email id separated by commas, invoice will be mailed automatically on particular date |
127 | `recurring_print_format` | Link | Recurring Print Format | Print Format
128 | `against_income_account` | Small Text | Against Income Account |

### Controller

#### erpnext.accounts.doctype.sales_invoice.sales_invoice

### Class SalesInvoice

Inherits from erpnext.controllers.selling_controller.SellingController

__init__ (self, arg1, arg2=None)

No docs

add_remarks (self)

No docs

before_cancel (self)

No docs

check_credit_limit (self)

No docs

check_prev_docstatus (self)

No docs

get_advances (self)

No docs

get_company_abbr (self)

No docs

get_gl_entries (self, warehouse_account=None)

No docs

get_warehouse (self)

No docs

make_customer_gl_entry (self, gl_entries)

No docs

make_gl_entries (self, repost_future_gle=True)

No docs

make_item_gl_entries (self, gl_entries)

No docs

make_pos_gl_entries (self, gl_entries)

No docs

make_tax_gl_entries (self, gl_entries)

No docs

make_write_off_gl_entry (self, gl_entries)

No docs

on_cancel (self)

No docs

on_submit (self)

No docs

on_update (self)

No docs

set_against_income_account (self)

Set against account for debit to account

set_indicator (self)

Set indicator for portal

set_missing_values (self, for_validate=False)

No docs

set_pos_fields (self, for_validate=False)

Set retail related fields from POS Profiles

so_dn_required (self)

check in manage account if sales order / delivery note required or not.

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_current_stock (self)

No docs

update_packing_list (self)

No docs

update_status_updater_args (self)

No docs

update_time_log_batch (self, sales_invoice)

No docs

validate (self)

No docs

validate_c_form (self)

Blank C-form no if C-form applicable marked as 'No'

validate_c_form_on_cancel (self)

Display message if C-Form no exists on cancellation of Sales Invoice

validate_debit_to_acc (self)

No docs

validate_delivery_note (self)

No docs

validate_fixed_asset_account (self)

Validate Fixed Asset and whether Income Account Entered Exists

validate_item_code (self)

No docs

validate_pos (self)

No docs

validate_proj_cust (self)

check for does customer belong to same project as entered..

validate_time_logs_are_submitted (self)

No docs

validate_warehouse (self)

No docs

validate_with_previous_doc (self)

No docs

validate_write_off_account (self)

No docs

Public API
`/api/method/erpnext.accounts.doctype.sales_invoice.sales_invoice.get_bank_cash_account`

erpnext.accounts.doctype.sales_invoice.sales_invoice.get_bank_cash_account (mode_of_payment, company)

No docs

erpnext.accounts.doctype.sales_invoice.sales_invoice.get_list_context (context=None)

No docs

Public API
`/api/method/erpnext.accounts.doctype.sales_invoice.sales_invoice.make_delivery_note`

erpnext.accounts.doctype.sales_invoice.sales_invoice.make_delivery_note (source_name, target_doc=None)

No docs

Public API
`/api/method/erpnext.accounts.doctype.sales_invoice.sales_invoice.make_sales_return`

erpnext.accounts.doctype.sales_invoice.sales_invoice.make_sales_return (source_name, target_doc=None)

No docs

#### Linked In:

- C-Form Invoice Detail
- Delivery Note Item
- Sales Invoice
- Stock Entry
- Time Log
- Time Log Batch