Version 6.7.7 Source

Table Name: `tabSales Order`

### Fields

Sr | Fieldname | Type | Label | Options
--- | --- | --- | --- | ---
1 | `customer_section` | Section Break |  |
    icon-user
2 | `column_break0` | Column Break |  |
3 | `title` | Data | Title |
4 | `naming_series` | Select | Series |
    SO-
5 | `customer` | Link | Customer | Customer
6 | `customer_name` | Data | Customer Name |
7 | `address_display` | Small Text | Address |
8 | `contact_display` | Small Text | Contact |
9 | `contact_mobile` | Small Text | Mobile No |
10 | `contact_email` | Small Text | Contact Email |
11 | `order_type` | Select | Order Type |
    Sales
    Maintenance
    Shopping Cart
12 | `column_break1` | Column Break |  |
13 | `amended_from` | Link | Amended From | Sales Order
14 | `company` | Link | Company | Company
15 | `transaction_date` | Date | Date |
16 | `delivery_date` | Date | Delivery Date |
17 | `po_no` | Data | Customer's Purchase Order |
18 | `po_date` | Date | Customer's Purchase Order Date |
19 | `shipping_address_name` | Link | Shipping Address Name | Address
20 | `shipping_address` | Small Text | Shipping Address |
21 | `currency_and_price_list` | Section Break | Currency and Price List |
    icon-tag
22 | `currency` | Link | Currency | Currency
23 | `conversion_rate` | Float | Exchange Rate Rate at which customer's currency is converted to company's base currency |
24 | `column_break2` | Column Break |  |
25 | `selling_price_list` | Link | Price List | Price List
26 | `price_list_currency` | Link | Price List Currency | Currency
27 | `plc_conversion_rate` | Float | Price List Exchange Rate Rate at which Price list currency is converted to company's base currency |
28 | `ignore_pricing_rule` | Check | Ignore Pricing Rule |
29 | `items_section` | Section Break |  |
    icon-shopping-cart
30 | `items` | Table | Items | Sales Order Item
31 | `section_break_31` | Section Break |  |
32 | `column_break_33a` | Column Break |  |
33 | `base_total` | Currency | Total (Company Currency) |
    Company:company:default_currency
34 | `base_net_total` | Currency | Net Total (Company Currency) |
    Company:company:default_currency
35 | `column_break_33` | Column Break |  |
36 | `total` | Currency | Total |
    currency
37 | `net_total` | Currency | Net Total |
    currency
38 | `taxes_section` | Section Break | Taxes and Charges |
    icon-money
39 | `taxes_and_charges` | Link | Taxes and Charges | Sales Taxes and Charges Template
40 | `column_break_38` | Column Break |  |
41 | `shipping_rule` | Link | Shipping Rule | Shipping Rule
42 | `section_break_40` | Section Break |  |
43 | `taxes` | Table | Sales Taxes and Charges | Sales Taxes and Charges
44 | `other_charges_calculation` | HTML | Taxes and Charges Calculation |
45 | `section_break_43` | Section Break |  |
46 | `base_total_taxes_and_charges` | Currency | Total Taxes and Charges (Company Currency) |
    Company:company:default_currency
47 | `column_break_46` | Column Break |  |
48 | `total_taxes_and_charges` | Currency | Total Taxes and Charges |
    currency
49 | `section_break_48` | Section Break | Additional Discount |
50 | `apply_discount_on` | Select | Apply Additional Discount On |
    Grand Total
    Net Total
51 | `column_break_50` | Column Break |  |
52 | `discount_amount` | Currency | Additional Discount Amount |
    currency
53 | `base_discount_amount` | Currency | Additional Discount Amount (Company Currency) |
    Company:company:default_currency
54 | `totals` | Section Break |  |
    icon-money
55 | `base_grand_total` | Currency | Grand Total (Company Currency) |
    Company:company:default_currency
56 | `base_rounded_total` | Currency | Rounded Total (Company Currency) |
    Company:company:default_currency
57 | `base_in_words` | Data | In Words (Company Currency) In Words will be visible once you save the Sales Order. |
58 | `column_break3` | Column Break |  |
59 | `grand_total` | Currency | Grand Total |
    currency
60 | `rounded_total` | Currency | Rounded Total |
    currency
61 | `in_words` | Data | In Words |
62 | `advance_paid` | Currency | Advance Paid |
    Company:company:default_currency
63 | `packing_list` | Section Break | Packing List |
    icon-suitcase
64 | `packed_items` | Table | Packed Items | Packed Item
65 | `terms_section_break` | Section Break | Terms and Conditions |
    icon-legal
66 | `tc_name` | Link | Terms | Terms and Conditions
67 | `terms` | Text Editor | Terms and Conditions Details |
68 | `contact_info` | Section Break | Contact Details |
    icon-bullhorn
69 | `col_break45` | Column Break |  |
70 | `territory` | Link | Territory | Territory
71 | `customer_group` | Link | Customer Group | Customer Group
72 | `col_break46` | Column Break |  |
73 | `customer_address` | Link | Customer Address | Address
74 | `contact_person` | Link | Contact Person | Contact
75 | `more_info` | Section Break | More Information |
    icon-file-text
76 | `project_name` | Link | Project Name Track this Sales Order against any Project | Project
77 | `fiscal_year` | Link | Fiscal Year | Fiscal Year
78 | `column_break_77` | Column Break |  |
79 | `source` | Select | Source |
    Existing Customer
    Reference
    Advertisement
    Cold Calling
    Exhibition
    Supplier Reference
    Mass Mailing
    Customer's Vendor
    Campaign
80 | `campaign` | Link | Campaign | Campaign
81 | `printing_details` | Section Break | Printing Details |
82 | `letter_head` | Link | Letter Head | Letter Head
83 | `column_break4` | Column Break |  |
84 | `select_print_heading` | Link | Print Heading | Print Heading
85 | `section_break_78` | Section Break | Billing and Delivery Status |
86 | `status` | Select | Status |
    Draft
    To Deliver and Bill
    To Bill
    To Deliver
    Completed
    Stopped
    Cancelled
    Closed
87 | `delivery_status` | Select | Delivery Status |
    Not Delivered
    Fully Delivered
    Partly Delivered
    Closed
    Not Applicable
88 | `per_delivered` | Percent | % Delivered % of materials delivered against this Sales Order |
89 | `column_break_81` | Column Break |  |
90 | `per_billed` | Percent | % Amount Billed % of materials billed against this Sales Order |
91 | `billing_status` | Select | Billing Status |
    Not Billed
    Fully Billed
    Partly Billed
    Closed
92 | `sales_team_section_break` | Section Break | Commission |
    icon-group
93 | `sales_partner` | Link | Sales Partner | Sales Partner
94 | `column_break7` | Column Break |  |
95 | `commission_rate` | Float | Commission Rate |
96 | `total_commission` | Currency | Total Commission |
    Company:company:default_currency
97 | `section_break1` | Section Break | Sales Team |
98 | `sales_team` | Table | Sales Team1 | Sales Team
99 | `recurring_order` | Section Break | Recurring Order |
    icon-time
100 | `is_recurring` | Check | Is Recurring Check if recurring order, uncheck to stop recurring or put proper End Date |
101 | `recurring_type` | Select | Recurring Type Select the period when the invoice will be generated automatically |
    Monthly
    Quarterly
    Half-yearly
    Yearly
102 | `from_date` | Date | From Date Start date of current order's period |
103 | `to_date` | Date | To Date End date of current order's period |
104 | `repeat_on_day_of_month` | Int | Repeat on Day of Month The day of the month on which auto order will be generated e.g. 05, 28 etc |
105 | `end_date` | Date | End Date The date on which recurring order will be stop |
106 | `column_break83` | Column Break |  |
107 | `next_date` | Date | Next Date The date on which next invoice will be generated. It is generated on submit. |
108 | `recurring_id` | Data | Recurring Id |
109 | `notification_email_address` | Small Text | Notification Email Address Enter email id separated by commas, order will be mailed automatically on particular date |
110 | `recurring_print_format` | Link | Recurring Print Format | Print Format

### Controller

#### erpnext.selling.doctype.sales_order.sales_order

### Class SalesOrder

Inherits from erpnext.controllers.selling_controller.SellingController

before_update_after_submit (self)

No docs

check_credit_limit (self)

No docs

check_modified_date (self)

No docs

check_nextdoc_docstatus (self)

No docs

on_cancel (self)

No docs

on_submit (self)

No docs

on_update (self)

No docs

product_bundle_has_stock_item (self, product_bundle)

Returns true if product bundle has stock item

update_delivery_status (self, po_name)

Update delivery status from Purchase Order for drop shipping

update_enquiry_status (self, prevdoc, flag)

No docs

update_prevdoc_status (self, flag)

No docs

update_reserved_qty (self, so_item_rows=None)

update requested qty (before ordered_qty is updated)

update_status (self, status)

No docs

validate (self)

No docs

validate_delivery_date (self)

No docs

validate_drop_ship (self)

No docs

validate_for_items (self)

No docs

validate_mandatory (self)

No docs

validate_order_type (self)

No docs

validate_po (self)

No docs

validate_proj_cust (self)

No docs

validate_sales_mntc_quotation (self)

No docs

validate_supplier_after_submit (self)

Check that supplier is the same after submit if PO is already made

validate_warehouse (self)

No docs

validate_with_previous_doc (self)

No docs

### Class WarehouseRequired

Inherits from frappe.exceptions.ValidationError

Public API
`/api/method/erpnext.selling.doctype.sales_order.sales_order.get_events`

erpnext.selling.doctype.sales_order.sales_order.get_events (start, end, filters=None)

Returns events for Gantt / Calendar view rendering.

Parameters:

- `start` - Start date-time.
- `end` - End date-time.
- `filters` - Filters (JSON).

erpnext.selling.doctype.sales_order.sales_order.get_list_context (context=None)

No docs

Public API
`/api/method/erpnext.selling.doctype.sales_order.sales_order.get_supplier`

erpnext.selling.doctype.sales_order.sales_order.get_supplier (doctype, txt, searchfield, start, page_len, filters)

No docs

Public API
`/api/method/erpnext.selling.doctype.sales_order.sales_order.make_delivery_note`

erpnext.selling.doctype.sales_order.sales_order.make_delivery_note (source_name, target_doc=None)

No docs

Public API
`/api/method/erpnext.selling.doctype.sales_order.sales_order.make_maintenance_schedule`

erpnext.selling.doctype.sales_order.sales_order.make_maintenance_schedule (source_name, target_doc=None)

No docs

Public API
`/api/method/erpnext.selling.doctype.sales_order.sales_order.make_maintenance_visit`

erpnext.selling.doctype.sales_order.sales_order.make_maintenance_visit (source_name, target_doc=None)

No docs

Public API
`/api/method/erpnext.selling.doctype.sales_order.sales_order.make_material_request`

erpnext.selling.doctype.sales_order.sales_order.make_material_request (source_name, target_doc=None)

No docs

Public API
`/api/method/erpnext.selling.doctype.sales_order.sales_order.make_purchase_order_for_drop_shipment`

erpnext.selling.doctype.sales_order.sales_order.make_purchase_order_for_drop_shipment (source_name, for_supplier, target_doc=None)

No docs

Public API
`/api/method/erpnext.selling.doctype.sales_order.sales_order.make_sales_invoice`

erpnext.selling.doctype.sales_order.sales_order.make_sales_invoice (source_name, target_doc=None)

No docs

Public API
`/api/method/erpnext.selling.doctype.sales_order.sales_order.stop_or_unstop_sales_orders`

erpnext.selling.doctype.sales_order.sales_order.stop_or_unstop_sales_orders (names, status)

No docs

Public API
`/api/method/erpnext.selling.doctype.sales_order.sales_order.update_status`

erpnext.selling.doctype.sales_order.sales_order.update_status (status, name)

No docs

#### Linked In:

- Delivery Note Item
- Material Request Item
- Production Order
- Production Plan Item
- Production Plan Sales Order
- Project
- Sales Invoice Item
- Sales Order