fixed conflict while merging develop into v5
diff --git a/erpnext/accounts/doctype/account/account.py b/erpnext/accounts/doctype/account/account.py
index c4a59a7..f257f0a 100644
--- a/erpnext/accounts/doctype/account/account.py
+++ b/erpnext/accounts/doctype/account/account.py
@@ -3,8 +3,8 @@
 
 from __future__ import unicode_literals
 import frappe
-from frappe.utils import flt, cstr, cint, getdate, add_days, formatdate
-from frappe import msgprint, throw, _
+from frappe.utils import cstr, cint
+from frappe import throw, _
 from frappe.model.document import Document
 
 class Account(Document):
diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json
index 6298472..bdc87e3 100755
--- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json
+++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json
@@ -1,972 +1,974 @@
 {
- "allow_import": 1, 
- "autoname": "naming_series:", 
- "creation": "2013-05-21 16:16:39", 
- "docstatus": 0, 
- "doctype": "DocType", 
+ "allow_import": 1,
+ "autoname": "naming_series:",
+ "creation": "2013-05-21 16:16:39",
+ "docstatus": 0,
+ "doctype": "DocType",
  "fields": [
   {
-   "fieldname": "supplier_section", 
-   "fieldtype": "Section Break", 
-   "label": "Supplier", 
-   "options": "icon-user", 
+   "fieldname": "supplier_section",
+   "fieldtype": "Section Break",
+   "label": "Supplier",
+   "options": "icon-user",
    "permlevel": 0
-  }, 
+  },
   {
-   "fieldname": "column_break0", 
-   "fieldtype": "Column Break", 
-   "oldfieldtype": "Column Break", 
-   "permlevel": 0, 
-   "read_only": 0, 
+   "fieldname": "column_break0",
+   "fieldtype": "Column Break",
+   "oldfieldtype": "Column Break",
+   "permlevel": 0,
+   "read_only": 0,
    "width": "50%"
-  }, 
+  },
   {
-   "fieldname": "naming_series", 
-   "fieldtype": "Select", 
-   "label": "Series", 
-   "no_copy": 1, 
-   "oldfieldname": "naming_series", 
-   "oldfieldtype": "Select", 
-   "options": "PINV-", 
-   "permlevel": 0, 
-   "print_hide": 1, 
-   "read_only": 0, 
-   "report_hide": 0, 
+   "fieldname": "naming_series",
+   "fieldtype": "Select",
+   "label": "Series",
+   "no_copy": 1,
+   "oldfieldname": "naming_series",
+   "oldfieldtype": "Select",
+   "options": "PINV-",
+   "permlevel": 0,
+   "print_hide": 1,
+   "read_only": 0,
+   "report_hide": 0,
    "reqd": 1
-  }, 
+  },
   {
-   "fieldname": "supplier", 
-   "fieldtype": "Link", 
-   "hidden": 0, 
-   "label": "Supplier", 
-   "oldfieldname": "supplier", 
-   "oldfieldtype": "Link", 
-   "options": "Supplier", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "fieldname": "supplier",
+   "fieldtype": "Link",
+   "hidden": 0,
+   "label": "Supplier",
+   "oldfieldname": "supplier",
+   "oldfieldtype": "Link",
+   "options": "Supplier",
+   "permlevel": 0,
+   "print_hide": 1,
    "read_only": 0
-  }, 
+  },
   {
-   "depends_on": "supplier", 
-   "fieldname": "supplier_name", 
-   "fieldtype": "Data", 
-   "hidden": 0, 
-   "in_list_view": 1, 
-   "label": "Name", 
-   "oldfieldname": "supplier_name", 
-   "oldfieldtype": "Data", 
-   "permlevel": 0, 
+   "depends_on": "supplier",
+   "fieldname": "supplier_name",
+   "fieldtype": "Data",
+   "hidden": 0,
+   "in_list_view": 1,
+   "label": "Name",
+   "oldfieldname": "supplier_name",
+   "oldfieldtype": "Data",
+   "permlevel": 0,
    "read_only": 1
-  }, 
+  },
   {
-   "fieldname": "address_display", 
-   "fieldtype": "Small Text", 
-   "hidden": 1, 
-   "label": "Address", 
-   "permlevel": 0, 
+   "fieldname": "address_display",
+   "fieldtype": "Small Text",
+   "hidden": 1,
+   "label": "Address",
+   "permlevel": 0,
    "read_only": 1
-  }, 
+  },
   {
-   "fieldname": "contact_display", 
-   "fieldtype": "Small Text", 
-   "hidden": 1, 
-   "label": "Contact", 
-   "permlevel": 0, 
+   "fieldname": "contact_display",
+   "fieldtype": "Small Text",
+   "hidden": 1,
+   "label": "Contact",
+   "permlevel": 0,
    "read_only": 1
-  }, 
+  },
   {
-   "fieldname": "contact_mobile", 
-   "fieldtype": "Small Text", 
-   "hidden": 1, 
-   "label": "Mobile No", 
-   "permlevel": 0, 
+   "fieldname": "contact_mobile",
+   "fieldtype": "Small Text",
+   "hidden": 1,
+   "label": "Mobile No",
+   "permlevel": 0,
    "read_only": 1
-  }, 
+  },
   {
-   "fieldname": "contact_email", 
-   "fieldtype": "Small Text", 
-   "hidden": 1, 
-   "label": "Contact Email", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "fieldname": "contact_email",
+   "fieldtype": "Small Text",
+   "hidden": 1,
+   "label": "Contact Email",
+   "permlevel": 0,
+   "print_hide": 1,
    "read_only": 1
-  }, 
+  },
   {
-   "fieldname": "column_break1", 
-   "fieldtype": "Column Break", 
-   "oldfieldtype": "Column Break", 
-   "permlevel": 0, 
-   "read_only": 0, 
-   "reqd": 0, 
+   "fieldname": "column_break1",
+   "fieldtype": "Column Break",
+   "oldfieldtype": "Column Break",
+   "permlevel": 0,
+   "read_only": 0,
+   "reqd": 0,
    "width": "50%"
-  }, 
+  },
   {
-   "default": "Today", 
-   "fieldname": "posting_date", 
-   "fieldtype": "Date", 
-   "in_filter": 1, 
-   "label": "Date", 
-   "no_copy": 0, 
-   "oldfieldname": "posting_date", 
-   "oldfieldtype": "Date", 
-   "permlevel": 0, 
-   "print_hide": 1, 
-   "read_only": 0, 
-   "reqd": 1, 
+   "default": "Today",
+   "fieldname": "posting_date",
+   "fieldtype": "Date",
+   "in_filter": 1,
+   "label": "Date",
+   "no_copy": 0,
+   "oldfieldname": "posting_date",
+   "oldfieldtype": "Date",
+   "permlevel": 0,
+   "print_hide": 1,
+   "read_only": 0,
+   "reqd": 1,
    "search_index": 1
-  }, 
+  },
   {
-   "description": "", 
-   "fieldname": "bill_no", 
-   "fieldtype": "Data", 
-   "in_filter": 1, 
-   "label": "Supplier Invoice No", 
-   "oldfieldname": "bill_no", 
-   "oldfieldtype": "Data", 
-   "permlevel": 0, 
-   "print_hide": 1, 
-   "read_only": 0, 
-   "reqd": 0, 
+   "description": "",
+   "fieldname": "bill_no",
+   "fieldtype": "Data",
+   "in_filter": 1,
+   "label": "Supplier Invoice No",
+   "oldfieldname": "bill_no",
+   "oldfieldtype": "Data",
+   "permlevel": 0,
+   "print_hide": 1,
+   "read_only": 0,
+   "reqd": 0,
    "search_index": 1
-  }, 
+  },
   {
-   "fieldname": "bill_date", 
-   "fieldtype": "Date", 
-   "in_filter": 1, 
-   "label": "Supplier Invoice Date", 
-   "oldfieldname": "bill_date", 
-   "oldfieldtype": "Date", 
-   "permlevel": 0, 
-   "print_hide": 1, 
-   "read_only": 0, 
-   "reqd": 0, 
+   "fieldname": "bill_date",
+   "fieldtype": "Date",
+   "in_filter": 1,
+   "label": "Supplier Invoice Date",
+   "oldfieldname": "bill_date",
+   "oldfieldtype": "Date",
+   "permlevel": 0,
+   "print_hide": 1,
+   "read_only": 0,
+   "reqd": 0,
    "search_index": 1
-  }, 
+  },
   {
-   "fieldname": "amended_from", 
-   "fieldtype": "Link", 
-   "ignore_user_permissions": 1, 
-   "label": "Amended From", 
-   "no_copy": 1, 
-   "oldfieldname": "amended_from", 
-   "oldfieldtype": "Link", 
-   "options": "Purchase Invoice", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "fieldname": "amended_from",
+   "fieldtype": "Link",
+   "ignore_user_permissions": 1,
+   "label": "Amended From",
+   "no_copy": 1,
+   "oldfieldname": "amended_from",
+   "oldfieldtype": "Link",
+   "options": "Purchase Invoice",
+   "permlevel": 0,
+   "print_hide": 1,
    "read_only": 1
-  }, 
+  },
   {
-   "fieldname": "company", 
-   "fieldtype": "Link", 
-   "in_filter": 1, 
-   "label": "Company", 
-   "oldfieldname": "company", 
-   "oldfieldtype": "Link", 
-   "options": "Company", 
-   "permlevel": 0, 
-   "print_hide": 1, 
-   "read_only": 0, 
+   "fieldname": "company",
+   "fieldtype": "Link",
+   "in_filter": 1,
+   "label": "Company",
+   "oldfieldname": "company",
+   "oldfieldtype": "Link",
+   "options": "Company",
+   "permlevel": 0,
+   "print_hide": 1,
+   "read_only": 0,
    "search_index": 1
-  }, 
+  },
   {
-   "fieldname": "currency_price_list", 
-   "fieldtype": "Section Break", 
-   "label": "Currency and Price List", 
-   "options": "icon-tag", 
-   "permlevel": 0, 
+   "fieldname": "currency_price_list",
+   "fieldtype": "Section Break",
+   "label": "Currency and Price List",
+   "options": "icon-tag",
+   "permlevel": 0,
    "read_only": 0
-  }, 
+  },
   {
-   "fieldname": "currency", 
-   "fieldtype": "Link", 
-   "label": "Currency", 
-   "oldfieldname": "currency", 
-   "oldfieldtype": "Select", 
-   "options": "Currency", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "fieldname": "currency",
+   "fieldtype": "Link",
+   "label": "Currency",
+   "oldfieldname": "currency",
+   "oldfieldtype": "Select",
+   "options": "Currency",
+   "permlevel": 0,
+   "print_hide": 1,
    "read_only": 0
-  }, 
+  },
   {
-   "description": "The rate at which Bill Currency is converted into company's base currency", 
-   "fieldname": "conversion_rate", 
-   "fieldtype": "Float", 
-   "label": "Exchange Rate", 
-   "oldfieldname": "conversion_rate", 
-   "oldfieldtype": "Currency", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "description": "The rate at which Bill Currency is converted into company's base currency",
+   "fieldname": "conversion_rate",
+   "fieldtype": "Float",
+   "label": "Exchange Rate",
+   "oldfieldname": "conversion_rate",
+   "oldfieldtype": "Currency",
+   "permlevel": 0,
+   "print_hide": 1,
    "read_only": 0
-  }, 
+  },
   {
-   "fieldname": "column_break2", 
-   "fieldtype": "Column Break", 
-   "permlevel": 0, 
+   "fieldname": "column_break2",
+   "fieldtype": "Column Break",
+   "permlevel": 0,
    "read_only": 0
-  }, 
+  },
   {
-   "fieldname": "buying_price_list", 
-   "fieldtype": "Link", 
-   "label": "Price List", 
-   "options": "Price List", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "fieldname": "buying_price_list",
+   "fieldtype": "Link",
+   "label": "Price List",
+   "options": "Price List",
+   "permlevel": 0,
+   "print_hide": 1,
    "read_only": 0
-  }, 
+  },
   {
-   "fieldname": "price_list_currency", 
-   "fieldtype": "Link", 
-   "label": "Price List Currency", 
-   "options": "Currency", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "fieldname": "price_list_currency",
+   "fieldtype": "Link",
+   "label": "Price List Currency",
+   "options": "Currency",
+   "permlevel": 0,
+   "print_hide": 1,
    "read_only": 1
-  }, 
+  },
   {
-   "fieldname": "plc_conversion_rate", 
-   "fieldtype": "Float", 
-   "label": "Price List Exchange Rate", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "fieldname": "plc_conversion_rate",
+   "fieldtype": "Float",
+   "label": "Price List Exchange Rate",
+   "permlevel": 0,
+   "print_hide": 1,
    "read_only": 0
-  }, 
+  },
   {
-   "fieldname": "ignore_pricing_rule", 
-   "fieldtype": "Check", 
-   "label": "Ignore Pricing Rule", 
-   "no_copy": 1, 
-   "permlevel": 1, 
+   "fieldname": "ignore_pricing_rule",
+   "fieldtype": "Check",
+   "label": "Ignore Pricing Rule",
+   "no_copy": 1,
+   "permlevel": 1,
    "print_hide": 1
-  }, 
+  },
   {
-   "fieldname": "items_section", 
-   "fieldtype": "Section Break", 
-   "label": "Items", 
-   "oldfieldtype": "Section Break", 
-   "options": "icon-shopping-cart", 
-   "permlevel": 0, 
+   "fieldname": "items_section",
+   "fieldtype": "Section Break",
+   "label": "Items",
+   "oldfieldtype": "Section Break",
+   "options": "icon-shopping-cart",
+   "permlevel": 0,
    "read_only": 0
-  }, 
+  },
   {
-   "allow_on_submit": 1, 
-   "fieldname": "items", 
-   "fieldtype": "Table", 
-   "label": "Items", 
-   "oldfieldname": "entries", 
-   "oldfieldtype": "Table", 
-   "options": "Purchase Invoice Item", 
-   "permlevel": 0, 
+   "allow_on_submit": 1,
+   "fieldname": "items",
+   "fieldtype": "Table",
+   "label": "Items",
+   "oldfieldname": "entries",
+   "oldfieldtype": "Table",
+   "options": "Purchase Invoice Item",
+   "permlevel": 0,
    "read_only": 0
-  }, 
+  },
   {
-   "fieldname": "section_break_26", 
-   "fieldtype": "Section Break", 
+   "fieldname": "section_break_26",
+   "fieldtype": "Section Break",
    "permlevel": 0
-  }, 
+  },
   {
-   "description": "Will be calculated automatically when you enter the details", 
-   "fieldname": "net_total", 
-   "fieldtype": "Currency", 
-   "label": "Net Total (Company Currency)", 
-   "oldfieldname": "net_total", 
-   "oldfieldtype": "Currency", 
-   "options": "Company:company:default_currency", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "description": "Will be calculated automatically when you enter the details",
+   "fieldname": "net_total",
+   "fieldtype": "Currency",
+   "label": "Net Total (Company Currency)",
+   "oldfieldname": "net_total",
+   "oldfieldtype": "Currency",
+   "options": "Company:company:default_currency",
+   "permlevel": 0,
+   "print_hide": 1,
    "read_only": 1
-  }, 
+  },
   {
-   "fieldname": "column_break_28", 
-   "fieldtype": "Column Break", 
+   "fieldname": "column_break_28",
+   "fieldtype": "Column Break",
    "permlevel": 0
-  }, 
+  },
   {
-   "fieldname": "net_total_import", 
-   "fieldtype": "Currency", 
-   "label": "Net Total", 
-   "oldfieldname": "net_total_import", 
-   "oldfieldtype": "Currency", 
-   "options": "currency", 
-   "permlevel": 0, 
-   "print_hide": 0, 
+   "fieldname": "net_total_import",
+   "fieldtype": "Currency",
+   "label": "Net Total",
+   "oldfieldname": "net_total_import",
+   "oldfieldtype": "Currency",
+   "options": "currency",
+   "permlevel": 0,
+   "print_hide": 0,
    "read_only": 1
-  }, 
+  },
   {
-   "fieldname": "taxes_section", 
-   "fieldtype": "Section Break", 
-   "label": "Taxes and Charges", 
-   "oldfieldtype": "Section Break", 
-   "options": "icon-money", 
-   "permlevel": 0, 
+   "fieldname": "taxes_section",
+   "fieldtype": "Section Break",
+   "label": "Taxes and Charges",
+   "oldfieldtype": "Section Break",
+   "options": "icon-money",
+   "permlevel": 0,
    "read_only": 0
-  }, 
+  },
   {
-   "fieldname": "taxes_and_charges", 
-   "fieldtype": "Link", 
-   "label": "Taxes and Charges", 
-   "oldfieldname": "purchase_other_charges", 
-   "oldfieldtype": "Link", 
-   "options": "Purchase Taxes and Charges Master", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "fieldname": "taxes_and_charges",
+   "fieldtype": "Link",
+   "label": "Taxes and Charges",
+   "oldfieldname": "purchase_other_charges",
+   "oldfieldtype": "Link",
+   "options": "Purchase Taxes and Charges Master",
+   "permlevel": 0,
+   "print_hide": 1,
    "read_only": 0
-  }, 
+  },
   {
-   "fieldname": "taxes", 
-   "fieldtype": "Table", 
-   "label": "Purchase Taxes and Charges", 
-   "oldfieldname": "purchase_tax_details", 
-   "oldfieldtype": "Table", 
-   "options": "Purchase Taxes and Charges", 
-   "permlevel": 0, 
+   "fieldname": "taxes",
+   "fieldtype": "Table",
+   "label": "Purchase Taxes and Charges",
+   "oldfieldname": "purchase_tax_details",
+   "oldfieldtype": "Table",
+   "options": "Purchase Taxes and Charges",
+   "permlevel": 0,
    "read_only": 0
-  }, 
+  },
   {
-   "fieldname": "other_charges_calculation", 
-   "fieldtype": "HTML", 
-   "label": "Taxes and Charges Calculation", 
-   "oldfieldtype": "HTML", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "fieldname": "other_charges_calculation",
+   "fieldtype": "HTML",
+   "label": "Taxes and Charges Calculation",
+   "oldfieldtype": "HTML",
+   "permlevel": 0,
+   "print_hide": 1,
    "read_only": 0
-  }, 
+  },
   {
-   "fieldname": "totals", 
-   "fieldtype": "Section Break", 
-   "label": "Totals", 
-   "oldfieldtype": "Section Break", 
-   "options": "icon-money", 
-   "permlevel": 0, 
+   "fieldname": "totals",
+   "fieldtype": "Section Break",
+   "label": "Totals",
+   "oldfieldtype": "Section Break",
+   "options": "icon-money",
+   "permlevel": 0,
    "read_only": 0
-  }, 
+  },
   {
-   "fieldname": "other_charges_added", 
-   "fieldtype": "Currency", 
-   "label": "Taxes and Charges Added (Company Currency)", 
-   "oldfieldname": "other_charges_added", 
-   "oldfieldtype": "Currency", 
-   "options": "Company:company:default_currency", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "fieldname": "other_charges_added",
+   "fieldtype": "Currency",
+   "label": "Taxes and Charges Added (Company Currency)",
+   "oldfieldname": "other_charges_added",
+   "oldfieldtype": "Currency",
+   "options": "Company:company:default_currency",
+   "permlevel": 0,
+   "print_hide": 1,
    "read_only": 1
-  }, 
+  },
   {
-   "fieldname": "other_charges_deducted", 
-   "fieldtype": "Currency", 
-   "label": "Taxes and Charges Deducted (Company Currency)", 
-   "oldfieldname": "other_charges_deducted", 
-   "oldfieldtype": "Currency", 
-   "options": "Company:company:default_currency", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "fieldname": "other_charges_deducted",
+   "fieldtype": "Currency",
+   "label": "Taxes and Charges Deducted (Company Currency)",
+   "oldfieldname": "other_charges_deducted",
+   "oldfieldtype": "Currency",
+   "options": "Company:company:default_currency",
+   "permlevel": 0,
+   "print_hide": 1,
    "read_only": 1
-  }, 
+  },
   {
-   "fieldname": "grand_total", 
-   "fieldtype": "Currency", 
-   "label": "Grand Total (Company Currency)", 
-   "oldfieldname": "grand_total", 
-   "oldfieldtype": "Currency", 
-   "options": "Company:company:default_currency", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "fieldname": "grand_total",
+   "fieldtype": "Currency",
+   "label": "Grand Total (Company Currency)",
+   "oldfieldname": "grand_total",
+   "oldfieldtype": "Currency",
+   "options": "Company:company:default_currency",
+   "permlevel": 0,
+   "print_hide": 1,
    "read_only": 1
-  }, 
+  },
   {
-   "description": "In Words will be visible once you save the Purchase Invoice.", 
-   "fieldname": "in_words", 
-   "fieldtype": "Data", 
-   "label": "In Words (Company Currency)", 
-   "oldfieldname": "in_words", 
-   "oldfieldtype": "Data", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "description": "In Words will be visible once you save the Purchase Invoice.",
+   "fieldname": "in_words",
+   "fieldtype": "Data",
+   "label": "In Words (Company Currency)",
+   "oldfieldname": "in_words",
+   "oldfieldtype": "Data",
+   "permlevel": 0,
+   "print_hide": 1,
    "read_only": 1
-  }, 
+  },
   {
-   "fieldname": "column_break8", 
-   "fieldtype": "Column Break", 
-   "oldfieldtype": "Column Break", 
-   "permlevel": 0, 
-   "print_hide": 1, 
-   "read_only": 0, 
+   "fieldname": "column_break8",
+   "fieldtype": "Column Break",
+   "oldfieldtype": "Column Break",
+   "permlevel": 0,
+   "print_hide": 1,
+   "read_only": 0,
    "width": "50%"
-  }, 
+  },
   {
-   "fieldname": "other_charges_added_import", 
-   "fieldtype": "Currency", 
-   "label": "Taxes and Charges Added", 
-   "oldfieldname": "other_charges_added_import", 
-   "oldfieldtype": "Currency", 
-   "options": "currency", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "fieldname": "other_charges_added_import",
+   "fieldtype": "Currency",
+   "label": "Taxes and Charges Added",
+   "oldfieldname": "other_charges_added_import",
+   "oldfieldtype": "Currency",
+   "options": "currency",
+   "permlevel": 0,
+   "print_hide": 1,
    "read_only": 1
-  }, 
+  },
   {
-   "fieldname": "other_charges_deducted_import", 
-   "fieldtype": "Currency", 
-   "label": "Taxes and Charges Deducted", 
-   "oldfieldname": "other_charges_deducted_import", 
-   "oldfieldtype": "Currency", 
-   "options": "currency", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "fieldname": "other_charges_deducted_import",
+   "fieldtype": "Currency",
+   "label": "Taxes and Charges Deducted",
+   "oldfieldname": "other_charges_deducted_import",
+   "oldfieldtype": "Currency",
+   "options": "currency",
+   "permlevel": 0,
+   "print_hide": 1,
    "read_only": 1
-  }, 
+  },
   {
-   "fieldname": "grand_total_import", 
-   "fieldtype": "Currency", 
-   "in_list_view": 1, 
-   "label": "Grand Total", 
-   "oldfieldname": "grand_total_import", 
-   "oldfieldtype": "Currency", 
-   "options": "currency", 
-   "permlevel": 0, 
-   "print_hide": 0, 
+   "fieldname": "grand_total_import",
+   "fieldtype": "Currency",
+   "in_list_view": 1,
+   "label": "Grand Total",
+   "oldfieldname": "grand_total_import",
+   "oldfieldtype": "Currency",
+   "options": "currency",
+   "permlevel": 0,
+   "print_hide": 0,
    "read_only": 1
-  }, 
+  },
   {
-   "fieldname": "in_words_import", 
-   "fieldtype": "Data", 
-   "label": "In Words", 
-   "oldfieldname": "in_words_import", 
-   "oldfieldtype": "Data", 
-   "permlevel": 0, 
-   "print_hide": 0, 
+   "fieldname": "in_words_import",
+   "fieldtype": "Data",
+   "label": "In Words",
+   "oldfieldname": "in_words_import",
+   "oldfieldtype": "Data",
+   "permlevel": 0,
+   "print_hide": 0,
    "read_only": 1
-  }, 
+  },
   {
-   "fieldname": "total_amount_to_pay", 
-   "fieldtype": "Currency", 
-   "hidden": 0, 
-   "label": "Total Amount To Pay", 
-   "no_copy": 1, 
-   "oldfieldname": "total_amount_to_pay", 
-   "oldfieldtype": "Currency", 
-   "options": "Company:company:default_currency", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "fieldname": "total_amount_to_pay",
+   "fieldtype": "Currency",
+   "hidden": 0,
+   "label": "Total Amount To Pay",
+   "no_copy": 1,
+   "oldfieldname": "total_amount_to_pay",
+   "oldfieldtype": "Currency",
+   "options": "Company:company:default_currency",
+   "permlevel": 0,
+   "print_hide": 1,
    "read_only": 1
-  }, 
+  },
   {
-   "fieldname": "total_advance", 
-   "fieldtype": "Currency", 
-   "label": "Total Advance", 
-   "no_copy": 1, 
-   "oldfieldname": "total_advance", 
-   "oldfieldtype": "Currency", 
-   "options": "Company:company:default_currency", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "fieldname": "total_advance",
+   "fieldtype": "Currency",
+   "label": "Total Advance",
+   "no_copy": 1,
+   "oldfieldname": "total_advance",
+   "oldfieldtype": "Currency",
+   "options": "Company:company:default_currency",
+   "permlevel": 0,
+   "print_hide": 1,
    "read_only": 1
-  }, 
+  },
   {
-   "fieldname": "total_tax", 
-   "fieldtype": "Currency", 
-   "label": "Total Tax (Company Currency)", 
-   "oldfieldname": "total_tax", 
-   "oldfieldtype": "Currency", 
-   "options": "Company:company:default_currency", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "fieldname": "total_tax",
+   "fieldtype": "Currency",
+   "label": "Total Tax (Company Currency)",
+   "oldfieldname": "total_tax",
+   "oldfieldtype": "Currency",
+   "options": "Company:company:default_currency",
+   "permlevel": 0,
+   "print_hide": 1,
    "read_only": 1
-  }, 
+  },
   {
-   "fieldname": "outstanding_amount", 
-   "fieldtype": "Currency", 
-   "in_filter": 1, 
-   "in_list_view": 1, 
-   "label": "Outstanding Amount", 
-   "no_copy": 1, 
-   "oldfieldname": "outstanding_amount", 
-   "oldfieldtype": "Currency", 
-   "options": "Company:company:default_currency", 
-   "permlevel": 0, 
-   "print_hide": 1, 
-   "read_only": 1, 
+   "fieldname": "outstanding_amount",
+   "fieldtype": "Currency",
+   "in_filter": 1,
+   "in_list_view": 1,
+   "label": "Outstanding Amount",
+   "no_copy": 1,
+   "oldfieldname": "outstanding_amount",
+   "oldfieldtype": "Currency",
+   "options": "Company:company:default_currency",
+   "permlevel": 0,
+   "print_hide": 1,
+   "read_only": 1,
    "search_index": 1
-  }, 
+  },
   {
-   "fieldname": "write_off_amount", 
-   "fieldtype": "Currency", 
-   "label": "Write Off Amount", 
-   "no_copy": 1, 
-   "options": "Company:company:default_currency", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "fieldname": "write_off_amount",
+   "fieldtype": "Currency",
+   "label": "Write Off Amount",
+   "no_copy": 1,
+   "options": "Company:company:default_currency",
+   "permlevel": 0,
+   "print_hide": 1,
    "read_only": 0
-  }, 
+  },
   {
-   "depends_on": "eval:flt(doc.write_off_amount)!=0", 
-   "fieldname": "write_off_account", 
-   "fieldtype": "Link", 
-   "label": "Write Off Account", 
-   "no_copy": 1, 
-   "options": "Account", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "depends_on": "eval:flt(doc.write_off_amount)!=0",
+   "fieldname": "write_off_account",
+   "fieldtype": "Link",
+   "label": "Write Off Account",
+   "no_copy": 1,
+   "options": "Account",
+   "permlevel": 0,
+   "print_hide": 1,
    "read_only": 0
-  }, 
+  },
   {
-   "depends_on": "eval:flt(doc.write_off_amount)!=0", 
-   "fieldname": "write_off_cost_center", 
-   "fieldtype": "Link", 
-   "label": "Write Off Cost Center", 
-   "no_copy": 1, 
-   "options": "Cost Center", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "depends_on": "eval:flt(doc.write_off_amount)!=0",
+   "fieldname": "write_off_cost_center",
+   "fieldtype": "Link",
+   "label": "Write Off Cost Center",
+   "no_copy": 1,
+   "options": "Cost Center",
+   "permlevel": 0,
+   "print_hide": 1,
    "read_only": 0
-  }, 
+  },
   {
-   "fieldname": "against_expense_account", 
-   "fieldtype": "Small Text", 
-   "hidden": 1, 
-   "label": "Against Expense Account", 
-   "no_copy": 1, 
-   "oldfieldname": "against_expense_account", 
-   "oldfieldtype": "Small Text", 
-   "permlevel": 0, 
-   "print_hide": 1, 
-   "read_only": 0, 
+   "fieldname": "against_expense_account",
+   "fieldtype": "Small Text",
+   "hidden": 1,
+   "label": "Against Expense Account",
+   "no_copy": 1,
+   "oldfieldname": "against_expense_account",
+   "oldfieldtype": "Small Text",
+   "permlevel": 0,
+   "print_hide": 1,
+   "read_only": 0,
    "report_hide": 0
-  }, 
+  },
   {
-   "fieldname": "fold", 
-   "fieldtype": "Fold", 
+   "fieldname": "fold",
+   "fieldtype": "Fold",
    "permlevel": 0
-  }, 
+  },
   {
-   "fieldname": "advances_section", 
-   "fieldtype": "Section Break", 
-   "label": "Advances", 
-   "oldfieldtype": "Section Break", 
-   "options": "icon-money", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "fieldname": "advances_section",
+   "fieldtype": "Section Break",
+   "label": "Advances",
+   "oldfieldtype": "Section Break",
+   "options": "icon-money",
+   "permlevel": 0,
+   "print_hide": 1,
    "read_only": 0
-  }, 
+  },
   {
-   "fieldname": "get_advances_paid", 
-   "fieldtype": "Button", 
-   "label": "Get Advances Paid", 
-   "oldfieldtype": "Button", 
-   "options": "get_advances", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "fieldname": "get_advances_paid",
+   "fieldtype": "Button",
+   "label": "Get Advances Paid",
+   "oldfieldtype": "Button",
+   "options": "get_advances",
+   "permlevel": 0,
+   "print_hide": 1,
    "read_only": 0
-  }, 
+  },
   {
-   "fieldname": "advances", 
-   "fieldtype": "Table", 
-   "label": "Advances", 
-   "no_copy": 1, 
-   "oldfieldname": "advance_allocation_details", 
-   "oldfieldtype": "Table", 
-   "options": "Purchase Invoice Advance", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "fieldname": "advances",
+   "fieldtype": "Table",
+   "label": "Advances",
+   "no_copy": 1,
+   "oldfieldname": "advance_allocation_details",
+   "oldfieldtype": "Table",
+   "options": "Purchase Invoice Advance",
+   "permlevel": 0,
+   "print_hide": 1,
    "read_only": 0
-  }, 
+  },
   {
-   "fieldname": "terms_section_break", 
-   "fieldtype": "Section Break", 
-   "label": "Terms and Conditions", 
-   "options": "icon-legal", 
+   "fieldname": "terms_section_break",
+   "fieldtype": "Section Break",
+   "label": "Terms and Conditions",
+   "options": "icon-legal",
    "permlevel": 0
-  }, 
+  },
   {
-   "fieldname": "tc_name", 
-   "fieldtype": "Link", 
-   "label": "Terms", 
-   "options": "Terms and Conditions", 
-   "permlevel": 0, 
+   "fieldname": "tc_name",
+   "fieldtype": "Link",
+   "label": "Terms",
+   "options": "Terms and Conditions",
+   "permlevel": 0,
    "print_hide": 1
-  }, 
+  },
   {
-   "fieldname": "terms", 
-   "fieldtype": "Text Editor", 
-   "label": "Terms and Conditions1", 
+   "fieldname": "terms",
+   "fieldtype": "Text Editor",
+   "label": "Terms and Conditions1",
    "permlevel": 0
-  }, 
+  },
   {
-   "depends_on": "supplier", 
-   "fieldname": "contact_section", 
-   "fieldtype": "Section Break", 
-   "label": "Contact Info", 
-   "options": "icon-bullhorn", 
-   "permlevel": 0, 
+   "depends_on": "supplier",
+   "fieldname": "contact_section",
+   "fieldtype": "Section Break",
+   "label": "Contact Info",
+   "options": "icon-bullhorn",
+   "permlevel": 0,
    "read_only": 0
-  }, 
+  },
   {
-   "fieldname": "supplier_address", 
-   "fieldtype": "Link", 
-   "label": "Supplier Address", 
-   "options": "Address", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "fieldname": "supplier_address",
+   "fieldtype": "Link",
+   "label": "Supplier Address",
+   "options": "Address",
+   "permlevel": 0,
+   "print_hide": 1,
    "read_only": 0
-  }, 
+  },
   {
-   "fieldname": "col_break23", 
-   "fieldtype": "Column Break", 
-   "permlevel": 0, 
-   "read_only": 0, 
+   "fieldname": "col_break23",
+   "fieldtype": "Column Break",
+   "permlevel": 0,
+   "read_only": 0,
    "width": "50%"
-  }, 
+  },
   {
-   "fieldname": "contact_person", 
-   "fieldtype": "Link", 
-   "label": "Contact Person", 
-   "options": "Contact", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "fieldname": "contact_person",
+   "fieldtype": "Link",
+   "label": "Contact Person",
+   "options": "Contact",
+   "permlevel": 0,
+   "print_hide": 1,
    "read_only": 0
-  }, 
+  },
   {
-   "fieldname": "more_info", 
-   "fieldtype": "Section Break", 
-   "label": "More Info", 
-   "oldfieldtype": "Section Break", 
-   "options": "icon-file-text", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "fieldname": "more_info",
+   "fieldtype": "Section Break",
+   "label": "More Info",
+   "oldfieldtype": "Section Break",
+   "options": "icon-file-text",
+   "permlevel": 0,
+   "print_hide": 1,
    "read_only": 0
-  }, 
+  },
   {
-   "description": "Supplier (Payable) Account", 
-   "fieldname": "credit_to", 
-   "fieldtype": "Link", 
-   "in_filter": 1, 
-   "label": "Credit To", 
-   "oldfieldname": "credit_to", 
-   "oldfieldtype": "Link", 
-   "options": "Account", 
-   "permlevel": 0, 
-   "print_hide": 1, 
-   "read_only": 0, 
-   "reqd": 1, 
+   "description": "Supplier (Payable) Account",
+   "fieldname": "credit_to",
+   "fieldtype": "Link",
+   "in_filter": 1,
+   "label": "Credit To",
+   "oldfieldname": "credit_to",
+   "oldfieldtype": "Link",
+   "options": "Account",
+   "permlevel": 0,
+   "print_hide": 1,
+   "read_only": 0,
+   "reqd": 1,
    "search_index": 1
-  }, 
+  },
   {
-   "default": "No", 
-   "description": "Considered as Opening Balance", 
-   "fieldname": "is_opening", 
-   "fieldtype": "Select", 
-   "in_filter": 1, 
-   "label": "Is Opening", 
-   "oldfieldname": "is_opening", 
-   "oldfieldtype": "Select", 
-   "options": "No\nYes", 
-   "permlevel": 0, 
-   "print_hide": 1, 
-   "read_only": 0, 
+   "default": "No",
+   "description": "Considered as Opening Balance",
+   "fieldname": "is_opening",
+   "fieldtype": "Select",
+   "in_filter": 1,
+   "label": "Is Opening",
+   "oldfieldname": "is_opening",
+   "oldfieldtype": "Select",
+   "options": "No\nYes",
+   "permlevel": 0,
+   "print_hide": 1,
+   "read_only": 0,
    "search_index": 1
-  }, 
+  },
   {
-   "description": "Actual Invoice Date", 
-   "fieldname": "aging_date", 
-   "fieldtype": "Date", 
-   "label": "Aging Date", 
-   "oldfieldname": "aging_date", 
-   "oldfieldtype": "Date", 
-   "permlevel": 0, 
-   "print_hide": 1, 
-   "read_only": 0, 
+   "description": "Actual Invoice Date",
+   "fieldname": "aging_date",
+   "fieldtype": "Date",
+   "label": "Aging Date",
+   "oldfieldname": "aging_date",
+   "oldfieldtype": "Date",
+   "permlevel": 0,
+   "print_hide": 1,
+   "read_only": 0,
    "search_index": 0
-  }, 
+  },
   {
-   "allow_on_submit": 1, 
-   "fieldname": "select_print_heading", 
-   "fieldtype": "Link", 
-   "label": "Print Heading", 
-   "no_copy": 1, 
-   "oldfieldname": "select_print_heading", 
-   "oldfieldtype": "Link", 
-   "options": "Print Heading", 
-   "permlevel": 0, 
-   "print_hide": 1, 
-   "read_only": 0, 
+   "allow_on_submit": 1,
+   "fieldname": "select_print_heading",
+   "fieldtype": "Link",
+   "label": "Print Heading",
+   "no_copy": 1,
+   "oldfieldname": "select_print_heading",
+   "oldfieldtype": "Link",
+   "options": "Print Heading",
+   "permlevel": 0,
+   "print_hide": 1,
+   "read_only": 0,
    "report_hide": 1
-  }, 
+  },
   {
-   "fieldname": "due_date", 
-   "fieldtype": "Date", 
-   "in_filter": 1, 
-   "label": "Due Date", 
-   "no_copy": 0, 
-   "oldfieldname": "due_date", 
-   "oldfieldtype": "Date", 
-   "permlevel": 0, 
-   "print_hide": 1, 
-   "read_only": 0, 
+   "fieldname": "due_date",
+   "fieldtype": "Date",
+   "in_filter": 1,
+   "label": "Due Date",
+   "no_copy": 0,
+   "oldfieldname": "due_date",
+   "oldfieldtype": "Date",
+   "permlevel": 0,
+   "print_hide": 1,
+   "read_only": 0,
    "search_index": 1
-  }, 
+  },
   {
-   "fieldname": "mode_of_payment", 
-   "fieldtype": "Link", 
-   "label": "Mode of Payment", 
-   "oldfieldname": "mode_of_payment", 
-   "oldfieldtype": "Select", 
-   "options": "Mode of Payment", 
-   "permlevel": 0, 
+   "fieldname": "mode_of_payment",
+   "fieldtype": "Link",
+   "label": "Mode of Payment",
+   "oldfieldname": "mode_of_payment",
+   "oldfieldtype": "Select",
+   "options": "Mode of Payment",
+   "permlevel": 0,
    "read_only": 0
-  }, 
+  },
   {
-   "fieldname": "column_break_63", 
-   "fieldtype": "Column Break", 
-   "permlevel": 0, 
+   "fieldname": "column_break_63",
+   "fieldtype": "Column Break",
+   "permlevel": 0,
    "read_only": 0
-  }, 
+  },
   {
-   "allow_on_submit": 1, 
-   "fieldname": "letter_head", 
-   "fieldtype": "Link", 
-   "label": "Letter Head", 
-   "options": "Letter Head", 
-   "permlevel": 0, 
+   "allow_on_submit": 1,
+   "fieldname": "letter_head",
+   "fieldtype": "Link",
+   "label": "Letter Head",
+   "options": "Letter Head",
+   "permlevel": 0,
    "print_hide": 1
-  }, 
+  },
   {
-   "fieldname": "fiscal_year", 
-   "fieldtype": "Link", 
-   "in_filter": 1, 
-   "label": "Fiscal Year", 
-   "oldfieldname": "fiscal_year", 
-   "oldfieldtype": "Select", 
-   "options": "Fiscal Year", 
-   "permlevel": 0, 
-   "print_hide": 1, 
-   "read_only": 0, 
+   "fieldname": "fiscal_year",
+   "fieldtype": "Link",
+   "in_filter": 1,
+   "label": "Fiscal Year",
+   "oldfieldname": "fiscal_year",
+   "oldfieldtype": "Select",
+   "options": "Fiscal Year",
+   "permlevel": 0,
+   "print_hide": 1,
+   "read_only": 0,
    "search_index": 1
-  }, 
+  },
   {
-   "fieldname": "remarks", 
-   "fieldtype": "Small Text", 
-   "label": "Remarks", 
-   "no_copy": 1, 
-   "oldfieldname": "remarks", 
-   "oldfieldtype": "Text", 
-   "permlevel": 0, 
-   "print_hide": 1, 
-   "read_only": 0, 
+   "fieldname": "remarks",
+   "fieldtype": "Small Text",
+   "label": "Remarks",
+   "no_copy": 1,
+   "oldfieldname": "remarks",
+   "oldfieldtype": "Text",
+   "permlevel": 0,
+   "print_hide": 1,
+   "read_only": 0,
    "reqd": 0
-  }, 
+  },
   {
-   "depends_on": "eval:doc.docstatus<2", 
-   "fieldname": "recurring_invoice", 
-   "fieldtype": "Section Break", 
-   "label": "Recurring Invoice", 
-   "options": "icon-time", 
-   "permlevel": 0, 
+   "depends_on": "eval:doc.docstatus<2",
+   "fieldname": "recurring_invoice",
+   "fieldtype": "Section Break",
+   "label": "Recurring Invoice",
+   "options": "icon-time",
+   "permlevel": 0,
    "print_hide": 1
-  }, 
+  },
   {
-   "fieldname": "column_break_77", 
-   "fieldtype": "Column Break", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "fieldname": "column_break_77",
+   "fieldtype": "Column Break",
+   "permlevel": 0,
+   "print_hide": 1,
    "width": "50%"
-  }, 
+  },
   {
-   "allow_on_submit": 1, 
-   "depends_on": "eval:doc.docstatus<2", 
-   "description": "Check if recurring invoice, uncheck to stop recurring or put proper End Date", 
-   "fieldname": "is_recurring", 
-   "fieldtype": "Check", 
-   "label": "Is Recurring", 
-   "no_copy": 1, 
-   "permlevel": 0, 
+   "allow_on_submit": 1,
+   "depends_on": "eval:doc.docstatus<2",
+   "description": "Check if recurring invoice, uncheck to stop recurring or put proper End Date",
+   "fieldname": "is_recurring",
+   "fieldtype": "Check",
+   "label": "Is Recurring",
+   "no_copy": 1,
+   "permlevel": 0,
    "print_hide": 1
-  }, 
+  },
   {
-   "allow_on_submit": 1, 
-   "depends_on": "eval:doc.is_recurring==1", 
-   "description": "Select the period when the invoice will be generated automatically", 
-   "fieldname": "recurring_type", 
-   "fieldtype": "Select", 
-   "label": "Recurring Type", 
-   "no_copy": 1, 
-   "options": "Monthly\nQuarterly\nHalf-yearly\nYearly", 
-   "permlevel": 0, 
+   "allow_on_submit": 1,
+   "depends_on": "eval:doc.is_recurring==1",
+   "description": "Select the period when the invoice will be generated automatically",
+   "fieldname": "recurring_type",
+   "fieldtype": "Select",
+   "label": "Recurring Type",
+   "no_copy": 1,
+   "options": "Monthly\nQuarterly\nHalf-yearly\nYearly",
+   "permlevel": 0,
    "print_hide": 1
-  }, 
+  },
   {
-   "allow_on_submit": 1, 
-   "depends_on": "eval:doc.is_recurring==1", 
-   "description": "Start date of current invoice's period", 
-   "fieldname": "from_date", 
-   "fieldtype": "Date", 
-   "label": "From Date", 
-   "no_copy": 1, 
-   "permlevel": 0
-  }, 
-  {
-   "allow_on_submit": 1, 
-   "depends_on": "eval:doc.is_recurring==1", 
-   "description": "End date of current invoice's period", 
-   "fieldname": "to_date", 
-   "fieldtype": "Date", 
-   "label": "To Date", 
-   "no_copy": 1, 
-   "permlevel": 0
-  }, 
-  {
-   "allow_on_submit": 1, 
-   "depends_on": "eval:doc.is_recurring==1", 
-   "description": "The day of the month on which auto invoice will be generated e.g. 05, 28 etc", 
-   "fieldname": "repeat_on_day_of_month", 
-   "fieldtype": "Int", 
-   "label": "Repeat on Day of Month", 
-   "no_copy": 1, 
-   "permlevel": 0, 
+   "allow_on_submit": 1,
+   "depends_on": "eval:doc.is_recurring==1",
+   "description": "Start date of current invoice's period",
+   "fieldname": "from_date",
+   "fieldtype": "Date",
+   "label": "From Date",
+   "no_copy": 1,
+   "permlevel": 0,
    "print_hide": 1
-  }, 
+  },
   {
-   "allow_on_submit": 1, 
-   "depends_on": "eval:doc.is_recurring==1", 
-   "description": "The date on which recurring invoice will be stop", 
-   "fieldname": "end_date", 
-   "fieldtype": "Date", 
-   "label": "End Date", 
-   "no_copy": 1, 
-   "permlevel": 0, 
+   "allow_on_submit": 1,
+   "depends_on": "eval:doc.is_recurring==1",
+   "description": "End date of current invoice's period",
+   "fieldname": "to_date",
+   "fieldtype": "Date",
+   "label": "To Date",
+   "no_copy": 1,
+   "permlevel": 0,
    "print_hide": 1
-  }, 
+  },
   {
-   "fieldname": "column_break_82", 
-   "fieldtype": "Column Break", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "allow_on_submit": 1,
+   "depends_on": "eval:doc.is_recurring==1",
+   "description": "The day of the month on which auto invoice will be generated e.g. 05, 28 etc",
+   "fieldname": "repeat_on_day_of_month",
+   "fieldtype": "Int",
+   "label": "Repeat on Day of Month",
+   "no_copy": 1,
+   "permlevel": 0,
+   "print_hide": 1
+  },
+  {
+   "allow_on_submit": 1,
+   "depends_on": "eval:doc.is_recurring==1",
+   "description": "The date on which recurring invoice will be stop",
+   "fieldname": "end_date",
+   "fieldtype": "Date",
+   "label": "End Date",
+   "no_copy": 1,
+   "permlevel": 0,
+   "print_hide": 1
+  },
+  {
+   "fieldname": "column_break_82",
+   "fieldtype": "Column Break",
+   "permlevel": 0,
+   "print_hide": 1,
    "width": "50%"
-  }, 
+  },
   {
-   "depends_on": "eval:doc.is_recurring==1", 
-   "description": "The date on which next invoice will be generated. It is generated on submit.", 
-   "fieldname": "next_date", 
-   "fieldtype": "Date", 
-   "label": "Next Date", 
-   "no_copy": 1, 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "depends_on": "eval:doc.is_recurring==1",
+   "description": "The date on which next invoice will be generated. It is generated on submit.",
+   "fieldname": "next_date",
+   "fieldtype": "Date",
+   "label": "Next Date",
+   "no_copy": 1,
+   "permlevel": 0,
+   "print_hide": 1,
    "read_only": 1
-  }, 
+  },
   {
-   "depends_on": "eval:doc.is_recurring==1", 
-   "description": "The unique id for tracking all recurring invoices. It is generated on submit.", 
-   "fieldname": "recurring_id", 
-   "fieldtype": "Data", 
-   "label": "Recurring Id", 
-   "no_copy": 1, 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "depends_on": "eval:doc.is_recurring==1",
+   "description": "The unique id for tracking all recurring invoices. It is generated on submit.",
+   "fieldname": "recurring_id",
+   "fieldtype": "Data",
+   "label": "Recurring Id",
+   "no_copy": 1,
+   "permlevel": 0,
+   "print_hide": 1,
    "read_only": 1
-  }, 
+  },
   {
-   "allow_on_submit": 1, 
-   "depends_on": "eval:doc.is_recurring==1", 
-   "description": "Enter email id separated by commas, invoice will be mailed automatically on particular date", 
-   "fieldname": "notification_email_address", 
-   "fieldtype": "Small Text", 
-   "label": "Notification Email Address", 
-   "no_copy": 1, 
-   "permlevel": 0, 
+   "allow_on_submit": 1,
+   "depends_on": "eval:doc.is_recurring==1",
+   "description": "Enter email id separated by commas, invoice will be mailed automatically on particular date",
+   "fieldname": "notification_email_address",
+   "fieldtype": "Small Text",
+   "label": "Notification Email Address",
+   "no_copy": 1,
+   "permlevel": 0,
    "print_hide": 1
   }
- ], 
- "icon": "icon-file-text", 
- "idx": 1, 
- "is_submittable": 1, 
- "modified": "2014-12-24 14:32:24.551641", 
- "modified_by": "Administrator", 
- "module": "Accounts", 
- "name": "Purchase Invoice", 
- "owner": "Administrator", 
+ ],
+ "icon": "icon-file-text",
+ "idx": 1,
+ "is_submittable": 1,
+ "modified": "2014-12-24 14:32:24.551641",
+ "modified_by": "Administrator",
+ "module": "Accounts",
+ "name": "Purchase Invoice",
+ "owner": "Administrator",
  "permissions": [
   {
-   "amend": 1, 
-   "apply_user_permissions": 1, 
-   "cancel": 1, 
-   "create": 1, 
-   "delete": 0, 
-   "email": 1, 
-   "permlevel": 0, 
-   "print": 1, 
-   "read": 1, 
-   "report": 1, 
-   "role": "Accounts User", 
-   "submit": 1, 
+   "amend": 1,
+   "apply_user_permissions": 1,
+   "cancel": 1,
+   "create": 1,
+   "delete": 0,
+   "email": 1,
+   "permlevel": 0,
+   "print": 1,
+   "read": 1,
+   "report": 1,
+   "role": "Accounts User",
+   "submit": 1,
    "write": 1
-  }, 
+  },
   {
-   "amend": 0, 
-   "apply_user_permissions": 1, 
-   "cancel": 0, 
-   "create": 0, 
-   "delete": 0, 
-   "email": 1, 
-   "permlevel": 0, 
-   "print": 1, 
-   "read": 1, 
-   "report": 1, 
-   "role": "Purchase User", 
-   "submit": 0, 
+   "amend": 0,
+   "apply_user_permissions": 1,
+   "cancel": 0,
+   "create": 0,
+   "delete": 0,
+   "email": 1,
+   "permlevel": 0,
+   "print": 1,
+   "read": 1,
+   "report": 1,
+   "role": "Purchase User",
+   "submit": 0,
    "write": 0
-  }, 
+  },
   {
-   "amend": 0, 
-   "apply_user_permissions": 1, 
-   "cancel": 0, 
-   "create": 0, 
-   "delete": 0, 
-   "email": 1, 
-   "permlevel": 0, 
-   "print": 1, 
-   "read": 1, 
-   "report": 1, 
-   "role": "Supplier", 
-   "submit": 0, 
+   "amend": 0,
+   "apply_user_permissions": 1,
+   "cancel": 0,
+   "create": 0,
+   "delete": 0,
+   "email": 1,
+   "permlevel": 0,
+   "print": 1,
+   "read": 1,
+   "report": 1,
+   "role": "Supplier",
+   "submit": 0,
    "write": 0
-  }, 
+  },
   {
-   "amend": 1, 
-   "cancel": 1, 
-   "create": 1, 
-   "delete": 1, 
-   "email": 1, 
-   "permlevel": 0, 
-   "print": 1, 
-   "read": 1, 
-   "report": 1, 
-   "role": "Accounts Manager", 
-   "submit": 1, 
+   "amend": 1,
+   "cancel": 1,
+   "create": 1,
+   "delete": 1,
+   "email": 1,
+   "permlevel": 0,
+   "print": 1,
+   "read": 1,
+   "report": 1,
+   "role": "Accounts Manager",
+   "submit": 1,
    "write": 1
-  }, 
+  },
   {
-   "amend": 0, 
-   "apply_user_permissions": 1, 
-   "cancel": 0, 
-   "create": 0, 
-   "delete": 0, 
-   "email": 1, 
-   "permlevel": 0, 
-   "print": 1, 
-   "read": 1, 
-   "report": 1, 
-   "role": "Auditor", 
-   "submit": 0, 
+   "amend": 0,
+   "apply_user_permissions": 1,
+   "cancel": 0,
+   "create": 0,
+   "delete": 0,
+   "email": 1,
+   "permlevel": 0,
+   "print": 1,
+   "read": 1,
+   "report": 1,
+   "role": "Auditor",
+   "submit": 0,
    "write": 0
-  }, 
+  },
   {
-   "permlevel": 1, 
-   "read": 1, 
-   "role": "Accounts Manager", 
+   "permlevel": 1,
+   "read": 1,
+   "role": "Accounts Manager",
    "write": 1
   }
- ], 
- "read_only_onload": 1, 
- "search_fields": "posting_date, supplier, fiscal_year, bill_no, grand_total, outstanding_amount", 
- "sort_field": "modified", 
+ ],
+ "read_only_onload": 1,
+ "search_fields": "posting_date, supplier, fiscal_year, bill_no, grand_total, outstanding_amount",
+ "sort_field": "modified",
  "sort_order": "DESC"
-}
\ No newline at end of file
+}
diff --git a/erpnext/accounts/doctype/sales_invoice/pos.js b/erpnext/accounts/doctype/sales_invoice/pos.js
index cf6a8dd..e897362 100644
--- a/erpnext/accounts/doctype/sales_invoice/pos.js
+++ b/erpnext/accounts/doctype/sales_invoice/pos.js
@@ -233,6 +233,11 @@
 	},
 	make_item_list: function() {
 		var me = this;
+		if(!this.price_list) {
+			msgprint(__("Price List not found or disabled"));
+			return;
+		}
+
 		me.item_timeout = null;
 		frappe.call({
 			method: 'erpnext.accounts.doctype.sales_invoice.pos.get_items',
@@ -486,7 +491,7 @@
 		});
 
 		me.refresh_delete_btn();
-		if(me.frm.doc[this.party]) {
+		if(me.frm.doc[this.party.toLowerCase()]) {
 			this.barcode.$input.focus();
 		} else {
 			this.party_field.$input.focus();
diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.js b/erpnext/accounts/doctype/sales_invoice/sales_invoice.js
index e3fb994..7002664 100644
--- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.js
+++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.js
@@ -216,10 +216,8 @@
 // Hide Fields
 // ------------
 cur_frm.cscript.hide_fields = function(doc) {
-	par_flds = ['project_name', 'due_date', 'is_opening', 'source', 'total_advance', 'gross_profit',
-	'gross_profit_percent', 'get_advances_received',
-	'advances', 'sales_partner', 'commission_rate',
-	'total_commission', 'advances', 'from_date', 'to_date'];
+	par_flds = ['project_name', 'due_date', 'is_opening', 'source', 'total_advance', 'get_advances_received',
+	'advances', 'sales_partner', 'commission_rate', 'total_commission', 'advances', 'from_date', 'to_date'];
 
 	item_flds_normal = ['sales_order', 'delivery_note']
 
diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.json b/erpnext/accounts/doctype/sales_invoice/sales_invoice.json
index d48af51..625928a 100644
--- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.json
+++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.json
@@ -1,1273 +1,1252 @@
 {
- "allow_import": 1, 
- "autoname": "naming_series:", 
- "creation": "2013-05-24 19:29:05", 
- "default_print_format": "Standard", 
- "docstatus": 0, 
- "doctype": "DocType", 
- "document_type": "Transaction", 
+ "allow_import": 1,
+ "autoname": "naming_series:",
+ "creation": "2013-05-24 19:29:05",
+ "default_print_format": "Standard",
+ "docstatus": 0,
+ "doctype": "DocType",
+ "document_type": "Transaction",
  "fields": [
   {
-   "fieldname": "customer_section", 
-   "fieldtype": "Section Break", 
-   "label": "Customer", 
-   "options": "icon-user", 
+   "fieldname": "customer_section",
+   "fieldtype": "Section Break",
+   "label": "Customer",
+   "options": "icon-user",
    "permlevel": 0
-  }, 
+  },
   {
-   "fieldname": "naming_series", 
-   "fieldtype": "Select", 
-   "label": "Series", 
-   "no_copy": 1, 
-   "oldfieldname": "naming_series", 
-   "oldfieldtype": "Select", 
-   "options": "SINV-", 
-   "permlevel": 0, 
-   "print_hide": 1, 
-   "read_only": 0, 
+   "fieldname": "naming_series",
+   "fieldtype": "Select",
+   "label": "Series",
+   "no_copy": 1,
+   "oldfieldname": "naming_series",
+   "oldfieldtype": "Select",
+   "options": "SINV-",
+   "permlevel": 0,
+   "print_hide": 1,
+   "read_only": 0,
    "reqd": 1
-  }, 
+  },
   {
-   "fieldname": "customer", 
-   "fieldtype": "Link", 
-   "hidden": 0, 
-   "label": "Customer", 
-   "no_copy": 0, 
-   "oldfieldname": "customer", 
-   "oldfieldtype": "Link", 
-   "options": "Customer", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "fieldname": "customer",
+   "fieldtype": "Link",
+   "hidden": 0,
+   "label": "Customer",
+   "no_copy": 0,
+   "oldfieldname": "customer",
+   "oldfieldtype": "Link",
+   "options": "Customer",
+   "permlevel": 0,
+   "print_hide": 1,
    "read_only": 0
-  }, 
+  },
   {
-   "depends_on": "customer", 
-   "fieldname": "customer_name", 
-   "fieldtype": "Data", 
-   "hidden": 0, 
-   "in_list_view": 1, 
-   "label": "Name", 
-   "oldfieldname": "customer_name", 
-   "oldfieldtype": "Data", 
-   "permlevel": 0, 
+   "depends_on": "customer",
+   "fieldname": "customer_name",
+   "fieldtype": "Data",
+   "hidden": 0,
+   "in_list_view": 1,
+   "label": "Name",
+   "oldfieldname": "customer_name",
+   "oldfieldtype": "Data",
+   "permlevel": 0,
    "read_only": 1
-  }, 
+  },
   {
-   "fieldname": "address_display", 
-   "fieldtype": "Small Text", 
-   "hidden": 1, 
-   "label": "Address", 
-   "permlevel": 0, 
+   "fieldname": "address_display",
+   "fieldtype": "Small Text",
+   "hidden": 1,
+   "label": "Address",
+   "permlevel": 0,
    "read_only": 1
-  }, 
+  },
   {
-   "fieldname": "contact_display", 
-   "fieldtype": "Small Text", 
-   "hidden": 1, 
-   "label": "Contact", 
-   "permlevel": 0, 
+   "fieldname": "contact_display",
+   "fieldtype": "Small Text",
+   "hidden": 1,
+   "label": "Contact",
+   "permlevel": 0,
    "read_only": 1
-  }, 
+  },
   {
-   "fieldname": "contact_mobile", 
-   "fieldtype": "Small Text", 
-   "hidden": 1, 
-   "label": "Mobile No", 
-   "permlevel": 0, 
+   "fieldname": "contact_mobile",
+   "fieldtype": "Small Text",
+   "hidden": 1,
+   "label": "Mobile No",
+   "permlevel": 0,
    "read_only": 1
-  }, 
+  },
   {
-   "fieldname": "contact_email", 
-   "fieldtype": "Small Text", 
-   "hidden": 1, 
-   "label": "Contact Email", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "fieldname": "contact_email",
+   "fieldtype": "Small Text",
+   "hidden": 1,
+   "label": "Contact Email",
+   "permlevel": 0,
+   "print_hide": 1,
    "read_only": 1
-  }, 
+  },
   {
-   "fieldname": "mode_of_payment", 
-   "fieldtype": "Link", 
-   "label": "Mode of Payment", 
-   "no_copy": 0, 
-   "oldfieldname": "mode_of_payment", 
-   "oldfieldtype": "Select", 
-   "options": "Mode of Payment", 
-   "permlevel": 0, 
+   "fieldname": "mode_of_payment",
+   "fieldtype": "Link",
+   "label": "Mode of Payment",
+   "no_copy": 0,
+   "oldfieldname": "mode_of_payment",
+   "oldfieldtype": "Select",
+   "options": "Mode of Payment",
+   "permlevel": 0,
    "read_only": 0
-  }, 
+  },
   {
-   "fieldname": "column_break1", 
-   "fieldtype": "Column Break", 
-   "oldfieldtype": "Column Break", 
-   "permlevel": 0, 
+   "fieldname": "column_break1",
+   "fieldtype": "Column Break",
+   "oldfieldtype": "Column Break",
+   "permlevel": 0,
    "read_only": 0
-  }, 
+  },
   {
-   "fieldname": "is_pos", 
-   "fieldtype": "Check", 
-   "label": "Is POS", 
-   "oldfieldname": "is_pos", 
-   "oldfieldtype": "Check", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "fieldname": "is_pos",
+   "fieldtype": "Check",
+   "label": "Is POS",
+   "oldfieldname": "is_pos",
+   "oldfieldtype": "Check",
+   "permlevel": 0,
+   "print_hide": 1,
    "read_only": 0
-  }, 
+  },
   {
-   "fieldname": "company", 
-   "fieldtype": "Link", 
-   "in_filter": 1, 
-   "label": "Company", 
-   "oldfieldname": "company", 
-   "oldfieldtype": "Link", 
-   "options": "Company", 
-   "permlevel": 0, 
-   "print_hide": 1, 
-   "read_only": 0, 
-   "reqd": 1, 
+   "fieldname": "company",
+   "fieldtype": "Link",
+   "in_filter": 1,
+   "label": "Company",
+   "oldfieldname": "company",
+   "oldfieldtype": "Link",
+   "options": "Company",
+   "permlevel": 0,
+   "print_hide": 1,
+   "read_only": 0,
+   "reqd": 1,
    "search_index": 0
-  }, 
+  },
   {
-   "fieldname": "amended_from", 
-   "fieldtype": "Link", 
-   "ignore_user_permissions": 1, 
-   "label": "Amended From", 
-   "no_copy": 1, 
-   "oldfieldname": "amended_from", 
-   "oldfieldtype": "Link", 
-   "options": "Sales Invoice", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "fieldname": "amended_from",
+   "fieldtype": "Link",
+   "ignore_user_permissions": 1,
+   "label": "Amended From",
+   "no_copy": 1,
+   "oldfieldname": "amended_from",
+   "oldfieldtype": "Link",
+   "options": "Sales Invoice",
+   "permlevel": 0,
+   "print_hide": 1,
    "read_only": 1
-  }, 
+  },
   {
-   "default": "Today", 
-   "fieldname": "posting_date", 
-   "fieldtype": "Date", 
-   "in_filter": 1, 
-   "label": "Date", 
-   "no_copy": 1, 
-   "oldfieldname": "posting_date", 
-   "oldfieldtype": "Date", 
-   "permlevel": 0, 
-   "print_hide": 0, 
-   "read_only": 0, 
-   "reqd": 1, 
+   "default": "Today",
+   "fieldname": "posting_date",
+   "fieldtype": "Date",
+   "in_filter": 1,
+   "label": "Date",
+   "no_copy": 1,
+   "oldfieldname": "posting_date",
+   "oldfieldtype": "Date",
+   "permlevel": 0,
+   "print_hide": 0,
+   "read_only": 0,
+   "reqd": 1,
    "search_index": 1
-  }, 
+  },
   {
-   "fieldname": "due_date", 
-   "fieldtype": "Date", 
-   "in_filter": 1, 
-   "label": "Payment Due Date", 
-   "no_copy": 1, 
-   "oldfieldname": "due_date", 
-   "oldfieldtype": "Date", 
-   "permlevel": 0, 
-   "read_only": 0, 
-   "reqd": 1, 
+   "fieldname": "due_date",
+   "fieldtype": "Date",
+   "in_filter": 1,
+   "label": "Payment Due Date",
+   "no_copy": 1,
+   "oldfieldname": "due_date",
+   "oldfieldtype": "Date",
+   "permlevel": 0,
+   "read_only": 0,
+   "reqd": 1,
    "search_index": 0
-  }, 
+  },
   {
-   "fieldname": "shipping_address_name", 
-   "fieldtype": "Link", 
-   "hidden": 1, 
-   "in_filter": 1, 
-   "label": "Shipping Address Name", 
-   "options": "Address", 
-   "permlevel": 0, 
-   "precision": "", 
+   "fieldname": "shipping_address_name",
+   "fieldtype": "Link",
+   "hidden": 1,
+   "in_filter": 1,
+   "label": "Shipping Address Name",
+   "options": "Address",
+   "permlevel": 0,
+   "precision": "",
    "print_hide": 1
-  }, 
+  },
   {
-   "fieldname": "shipping_address", 
-   "fieldtype": "Small Text", 
-   "hidden": 1, 
-   "label": "Shipping Address", 
-   "permlevel": 0, 
-   "precision": "", 
-   "print_hide": 1, 
+   "fieldname": "shipping_address",
+   "fieldtype": "Small Text",
+   "hidden": 1,
+   "label": "Shipping Address",
+   "permlevel": 0,
+   "precision": "",
+   "print_hide": 1,
    "read_only": 1
-  }, 
+  },
   {
-   "fieldname": "currency_section", 
-   "fieldtype": "Section Break", 
-   "label": "Currency and Price List", 
-   "options": "icon-tag", 
-   "permlevel": 0, 
+   "fieldname": "currency_section",
+   "fieldtype": "Section Break",
+   "label": "Currency and Price List",
+   "options": "icon-tag",
+   "permlevel": 0,
    "read_only": 0
-  }, 
+  },
   {
-   "fieldname": "currency", 
-   "fieldtype": "Link", 
-   "label": "Currency", 
-   "oldfieldname": "currency", 
-   "oldfieldtype": "Select", 
-   "options": "Currency", 
-   "permlevel": 0, 
-   "print_hide": 1, 
-   "read_only": 0, 
+   "fieldname": "currency",
+   "fieldtype": "Link",
+   "label": "Currency",
+   "oldfieldname": "currency",
+   "oldfieldtype": "Select",
+   "options": "Currency",
+   "permlevel": 0,
+   "print_hide": 1,
+   "read_only": 0,
    "reqd": 1
-  }, 
+  },
   {
-   "description": "Rate at which Customer Currency is converted to customer's base currency", 
-   "fieldname": "conversion_rate", 
-   "fieldtype": "Float", 
-   "label": "Exchange Rate", 
-   "oldfieldname": "conversion_rate", 
-   "oldfieldtype": "Currency", 
-   "permlevel": 0, 
-   "print_hide": 1, 
-   "read_only": 0, 
+   "description": "Rate at which Customer Currency is converted to customer's base currency",
+   "fieldname": "conversion_rate",
+   "fieldtype": "Float",
+   "label": "Exchange Rate",
+   "oldfieldname": "conversion_rate",
+   "oldfieldtype": "Currency",
+   "permlevel": 0,
+   "print_hide": 1,
+   "read_only": 0,
    "reqd": 1
-  }, 
+  },
   {
-   "fieldname": "column_break2", 
-   "fieldtype": "Column Break", 
-   "permlevel": 0, 
-   "read_only": 0, 
+   "fieldname": "column_break2",
+   "fieldtype": "Column Break",
+   "permlevel": 0,
+   "read_only": 0,
    "width": "50%"
-  }, 
+  },
   {
-   "fieldname": "selling_price_list", 
-   "fieldtype": "Link", 
-   "label": "Price List", 
-   "oldfieldname": "price_list_name", 
-   "oldfieldtype": "Select", 
-   "options": "Price List", 
-   "permlevel": 0, 
-   "print_hide": 1, 
-   "read_only": 0, 
+   "fieldname": "selling_price_list",
+   "fieldtype": "Link",
+   "label": "Price List",
+   "oldfieldname": "price_list_name",
+   "oldfieldtype": "Select",
+   "options": "Price List",
+   "permlevel": 0,
+   "print_hide": 1,
+   "read_only": 0,
    "reqd": 1
-  }, 
+  },
   {
-   "fieldname": "price_list_currency", 
-   "fieldtype": "Link", 
-   "label": "Price List Currency", 
-   "options": "Currency", 
-   "permlevel": 0, 
-   "print_hide": 1, 
-   "read_only": 1, 
+   "fieldname": "price_list_currency",
+   "fieldtype": "Link",
+   "label": "Price List Currency",
+   "options": "Currency",
+   "permlevel": 0,
+   "print_hide": 1,
+   "read_only": 1,
    "reqd": 1
-  }, 
+  },
   {
-   "description": "Rate at which Price list currency is converted to customer's base currency", 
-   "fieldname": "plc_conversion_rate", 
-   "fieldtype": "Float", 
-   "label": "Price List Exchange Rate", 
-   "no_copy": 0, 
-   "permlevel": 0, 
-   "print_hide": 1, 
-   "read_only": 0, 
+   "description": "Rate at which Price list currency is converted to customer's base currency",
+   "fieldname": "plc_conversion_rate",
+   "fieldtype": "Float",
+   "label": "Price List Exchange Rate",
+   "no_copy": 0,
+   "permlevel": 0,
+   "print_hide": 1,
+   "read_only": 0,
    "reqd": 1
-  }, 
+  },
   {
-   "fieldname": "ignore_pricing_rule", 
-   "fieldtype": "Check", 
-   "label": "Ignore Pricing Rule", 
-   "no_copy": 1, 
-   "permlevel": 1, 
+   "fieldname": "ignore_pricing_rule",
+   "fieldtype": "Check",
+   "label": "Ignore Pricing Rule",
+   "no_copy": 1,
+   "permlevel": 1,
    "print_hide": 1
-  }, 
+  },
   {
-   "fieldname": "items_section", 
-   "fieldtype": "Section Break", 
-   "label": "Items", 
-   "oldfieldtype": "Section Break", 
-   "options": "icon-shopping-cart", 
-   "permlevel": 0, 
+   "fieldname": "items_section",
+   "fieldtype": "Section Break",
+   "label": "Items",
+   "oldfieldtype": "Section Break",
+   "options": "icon-shopping-cart",
+   "permlevel": 0,
    "read_only": 0
-  }, 
+  },
   {
-   "fieldname": "update_stock", 
-   "fieldtype": "Check", 
-   "label": "Update Stock", 
-   "oldfieldname": "update_stock", 
-   "oldfieldtype": "Check", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "fieldname": "update_stock",
+   "fieldtype": "Check",
+   "label": "Update Stock",
+   "oldfieldname": "update_stock",
+   "oldfieldtype": "Check",
+   "permlevel": 0,
+   "print_hide": 1,
    "read_only": 0
-  }, 
+  },
   {
-   "allow_on_submit": 1, 
-   "fieldname": "items", 
-   "fieldtype": "Table", 
-   "label": "Items", 
-   "oldfieldname": "entries", 
-   "oldfieldtype": "Table", 
-   "options": "Sales Invoice Item", 
-   "permlevel": 0, 
-   "read_only": 0, 
+   "allow_on_submit": 1,
+   "fieldname": "items",
+   "fieldtype": "Table",
+   "label": "Items",
+   "oldfieldname": "entries",
+   "oldfieldtype": "Table",
+   "options": "Sales Invoice Item",
+   "permlevel": 0,
+   "read_only": 0,
    "reqd": 1
-  }, 
+  },
   {
-   "fieldname": "packing_list", 
-   "fieldtype": "Section Break", 
-   "label": "Packing List", 
-   "options": "icon-suitcase", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "fieldname": "packing_list",
+   "fieldtype": "Section Break",
+   "label": "Packing List",
+   "options": "icon-suitcase",
+   "permlevel": 0,
+   "print_hide": 1,
    "read_only": 0
-  }, 
+  },
   {
-   "fieldname": "packed_items", 
-   "fieldtype": "Table", 
-   "label": "Packed Items", 
-   "options": "Packed Item", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "fieldname": "packed_items",
+   "fieldtype": "Table",
+   "label": "Packed Items",
+   "options": "Packed Item",
+   "permlevel": 0,
+   "print_hide": 1,
    "read_only": 0
-  }, 
+  },
   {
-   "fieldname": "sales_bom_help", 
-   "fieldtype": "HTML", 
-   "label": "Sales BOM Help", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "fieldname": "sales_bom_help",
+   "fieldtype": "HTML",
+   "label": "Sales BOM Help",
+   "permlevel": 0,
+   "print_hide": 1,
    "read_only": 0
-  }, 
+  },
   {
-   "fieldname": "section_break_30", 
-   "fieldtype": "Section Break", 
+   "fieldname": "section_break_30",
+   "fieldtype": "Section Break",
    "permlevel": 0
-  }, 
+  },
   {
-   "fieldname": "net_total", 
-   "fieldtype": "Currency", 
-   "label": "Net Total (Company Currency)", 
-   "oldfieldname": "net_total", 
-   "oldfieldtype": "Currency", 
-   "options": "Company:company:default_currency", 
-   "permlevel": 0, 
-   "print_hide": 1, 
-   "read_only": 1, 
+   "fieldname": "net_total",
+   "fieldtype": "Currency",
+   "label": "Net Total (Company Currency)",
+   "oldfieldname": "net_total",
+   "oldfieldtype": "Currency",
+   "options": "Company:company:default_currency",
+   "permlevel": 0,
+   "print_hide": 1,
+   "read_only": 1,
    "reqd": 1
-  }, 
+  },
   {
-   "fieldname": "column_break_32", 
-   "fieldtype": "Column Break", 
+   "fieldname": "column_break_32",
+   "fieldtype": "Column Break",
    "permlevel": 0
-  }, 
+  },
   {
-   "fieldname": "net_total_export", 
-   "fieldtype": "Currency", 
-   "label": "Net Total", 
-   "options": "currency", 
-   "permlevel": 0, 
-   "print_hide": 0, 
+   "fieldname": "net_total_export",
+   "fieldtype": "Currency",
+   "label": "Net Total",
+   "options": "currency",
+   "permlevel": 0,
+   "print_hide": 0,
    "read_only": 1
-  }, 
+  },
   {
-   "fieldname": "taxes_section", 
-   "fieldtype": "Section Break", 
-   "label": "Taxes and Charges", 
-   "oldfieldtype": "Section Break", 
-   "options": "icon-money", 
-   "permlevel": 0, 
+   "fieldname": "taxes_section",
+   "fieldtype": "Section Break",
+   "label": "Taxes and Charges",
+   "oldfieldtype": "Section Break",
+   "options": "icon-money",
+   "permlevel": 0,
    "read_only": 0
-  }, 
+  },
   {
-   "fieldname": "taxes_and_charges", 
-   "fieldtype": "Link", 
-   "label": "Taxes and Charges", 
-   "oldfieldname": "charge", 
-   "oldfieldtype": "Link", 
-   "options": "Sales Taxes and Charges Master", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "fieldname": "taxes_and_charges",
+   "fieldtype": "Link",
+   "label": "Taxes and Charges",
+   "oldfieldname": "charge",
+   "oldfieldtype": "Link",
+   "options": "Sales Taxes and Charges Master",
+   "permlevel": 0,
+   "print_hide": 1,
    "read_only": 0
-  }, 
+  },
   {
-   "fieldname": "column_break_38", 
-   "fieldtype": "Column Break", 
+   "fieldname": "column_break_38",
+   "fieldtype": "Column Break",
    "permlevel": 0
-  }, 
+  },
   {
-   "fieldname": "shipping_rule", 
-   "fieldtype": "Link", 
-   "label": "Shipping Rule", 
-   "oldfieldtype": "Button", 
-   "options": "Shipping Rule", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "fieldname": "shipping_rule",
+   "fieldtype": "Link",
+   "label": "Shipping Rule",
+   "oldfieldtype": "Button",
+   "options": "Shipping Rule",
+   "permlevel": 0,
+   "print_hide": 1,
    "read_only": 0
-  }, 
+  },
   {
-   "fieldname": "section_break_40", 
-   "fieldtype": "Section Break", 
+   "fieldname": "section_break_40",
+   "fieldtype": "Section Break",
    "permlevel": 0
-  }, 
+  },
   {
-   "allow_on_submit": 1, 
-   "fieldname": "taxes", 
-   "fieldtype": "Table", 
-   "label": "Sales Taxes and Charges", 
-   "oldfieldname": "other_charges", 
-   "oldfieldtype": "Table", 
-   "options": "Sales Taxes and Charges", 
-   "permlevel": 0, 
+   "allow_on_submit": 1,
+   "fieldname": "taxes",
+   "fieldtype": "Table",
+   "label": "Sales Taxes and Charges",
+   "oldfieldname": "other_charges",
+   "oldfieldtype": "Table",
+   "options": "Sales Taxes and Charges",
+   "permlevel": 0,
    "read_only": 0
-  }, 
+  },
   {
-   "fieldname": "other_charges_calculation", 
-   "fieldtype": "HTML", 
-   "label": "Taxes and Charges Calculation", 
-   "oldfieldtype": "HTML", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "fieldname": "other_charges_calculation",
+   "fieldtype": "HTML",
+   "label": "Taxes and Charges Calculation",
+   "oldfieldtype": "HTML",
+   "permlevel": 0,
+   "print_hide": 1,
    "read_only": 0
-  }, 
+  },
   {
-   "fieldname": "section_break_43", 
-   "fieldtype": "Section Break", 
+   "fieldname": "section_break_43",
+   "fieldtype": "Section Break",
    "permlevel": 0
-  }, 
+  },
   {
-   "fieldname": "other_charges_total", 
-   "fieldtype": "Currency", 
-   "label": "Total Taxes and Charges (Company Currency)", 
-   "oldfieldname": "other_charges_total", 
-   "oldfieldtype": "Currency", 
-   "options": "Company:company:default_currency", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "fieldname": "other_charges_total",
+   "fieldtype": "Currency",
+   "label": "Total Taxes and Charges (Company Currency)",
+   "oldfieldname": "other_charges_total",
+   "oldfieldtype": "Currency",
+   "options": "Company:company:default_currency",
+   "permlevel": 0,
+   "print_hide": 1,
    "read_only": 1
-  }, 
+  },
   {
-   "fieldname": "column_break_45", 
-   "fieldtype": "Column Break", 
+   "fieldname": "column_break_45",
+   "fieldtype": "Column Break",
    "permlevel": 0
-  }, 
+  },
   {
-   "fieldname": "other_charges_total_export", 
-   "fieldtype": "Currency", 
-   "label": "Total Taxes and Charges", 
-   "options": "currency", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "fieldname": "other_charges_total_export",
+   "fieldtype": "Currency",
+   "label": "Total Taxes and Charges",
+   "options": "currency",
+   "permlevel": 0,
+   "print_hide": 1,
    "read_only": 1
-  }, 
+  },
   {
-   "fieldname": "discount_amount", 
-   "fieldtype": "Currency", 
-   "label": "Discount Amount", 
-   "options": "Company:company:default_currency", 
-   "permlevel": 0, 
+   "fieldname": "discount_amount",
+   "fieldtype": "Currency",
+   "label": "Discount Amount",
+   "options": "Company:company:default_currency",
+   "permlevel": 0,
    "print_hide": 0
-  }, 
+  },
   {
-   "fieldname": "totals", 
-   "fieldtype": "Section Break", 
-   "label": "Totals", 
-   "oldfieldtype": "Section Break", 
-   "options": "icon-money", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "fieldname": "totals",
+   "fieldtype": "Section Break",
+   "label": "Totals",
+   "oldfieldtype": "Section Break",
+   "options": "icon-money",
+   "permlevel": 0,
+   "print_hide": 1,
    "read_only": 0
-  }, 
+  },
   {
-   "fieldname": "grand_total", 
-   "fieldtype": "Currency", 
-   "in_filter": 1, 
-   "label": "Grand Total (Company Currency)", 
-   "oldfieldname": "grand_total", 
-   "oldfieldtype": "Currency", 
-   "options": "Company:company:default_currency", 
-   "permlevel": 0, 
-   "print_hide": 1, 
-   "read_only": 1, 
-   "reqd": 1, 
+   "fieldname": "grand_total",
+   "fieldtype": "Currency",
+   "in_filter": 1,
+   "label": "Grand Total (Company Currency)",
+   "oldfieldname": "grand_total",
+   "oldfieldtype": "Currency",
+   "options": "Company:company:default_currency",
+   "permlevel": 0,
+   "print_hide": 1,
+   "read_only": 1,
+   "reqd": 1,
    "search_index": 0
-  }, 
+  },
   {
-   "fieldname": "rounded_total", 
-   "fieldtype": "Currency", 
-   "label": "Rounded Total (Company Currency)", 
-   "oldfieldname": "rounded_total", 
-   "oldfieldtype": "Currency", 
-   "options": "Company:company:default_currency", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "fieldname": "rounded_total",
+   "fieldtype": "Currency",
+   "label": "Rounded Total (Company Currency)",
+   "oldfieldname": "rounded_total",
+   "oldfieldtype": "Currency",
+   "options": "Company:company:default_currency",
+   "permlevel": 0,
+   "print_hide": 1,
    "read_only": 1
-  }, 
+  },
   {
-   "description": "In Words will be visible once you save the Sales Invoice.", 
-   "fieldname": "in_words", 
-   "fieldtype": "Data", 
-   "label": "In Words (Company Currency)", 
-   "oldfieldname": "in_words", 
-   "oldfieldtype": "Data", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "description": "In Words will be visible once you save the Sales Invoice.",
+   "fieldname": "in_words",
+   "fieldtype": "Data",
+   "label": "In Words (Company Currency)",
+   "oldfieldname": "in_words",
+   "oldfieldtype": "Data",
+   "permlevel": 0,
+   "print_hide": 1,
    "read_only": 1
-  }, 
+  },
   {
-   "fieldname": "total_advance", 
-   "fieldtype": "Currency", 
-   "label": "Total Advance", 
-   "oldfieldname": "total_advance", 
-   "oldfieldtype": "Currency", 
-   "options": "Company:company:default_currency", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "fieldname": "total_advance",
+   "fieldtype": "Currency",
+   "label": "Total Advance",
+   "oldfieldname": "total_advance",
+   "oldfieldtype": "Currency",
+   "options": "Company:company:default_currency",
+   "permlevel": 0,
+   "print_hide": 1,
    "read_only": 1
-  }, 
+  },
   {
-   "fieldname": "outstanding_amount", 
-   "fieldtype": "Currency", 
-   "in_list_view": 1, 
-   "label": "Outstanding Amount", 
-   "no_copy": 1, 
-   "oldfieldname": "outstanding_amount", 
-   "oldfieldtype": "Currency", 
-   "options": "Company:company:default_currency", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "fieldname": "outstanding_amount",
+   "fieldtype": "Currency",
+   "in_list_view": 1,
+   "label": "Outstanding Amount",
+   "no_copy": 1,
+   "oldfieldname": "outstanding_amount",
+   "oldfieldtype": "Currency",
+   "options": "Company:company:default_currency",
+   "permlevel": 0,
+   "print_hide": 1,
    "read_only": 1
-  }, 
+  },
   {
-   "fieldname": "column_break5", 
-   "fieldtype": "Column Break", 
-   "oldfieldtype": "Column Break", 
-   "permlevel": 0, 
-   "print_hide": 1, 
-   "read_only": 0, 
+   "fieldname": "column_break5",
+   "fieldtype": "Column Break",
+   "oldfieldtype": "Column Break",
+   "permlevel": 0,
+   "print_hide": 1,
+   "read_only": 0,
    "width": "50%"
-  }, 
+  },
   {
-   "fieldname": "grand_total_export", 
-   "fieldtype": "Currency", 
-   "in_list_view": 1, 
-   "label": "Grand Total", 
-   "oldfieldname": "grand_total_export", 
-   "oldfieldtype": "Currency", 
-   "options": "currency", 
-   "permlevel": 0, 
-   "print_hide": 0, 
-   "read_only": 1, 
+   "fieldname": "grand_total_export",
+   "fieldtype": "Currency",
+   "in_list_view": 1,
+   "label": "Grand Total",
+   "oldfieldname": "grand_total_export",
+   "oldfieldtype": "Currency",
+   "options": "currency",
+   "permlevel": 0,
+   "print_hide": 0,
+   "read_only": 1,
    "reqd": 1
-  }, 
+  },
   {
-   "fieldname": "rounded_total_export", 
-   "fieldtype": "Currency", 
-   "label": "Rounded Total", 
-   "oldfieldname": "rounded_total_export", 
-   "oldfieldtype": "Currency", 
-   "options": "currency", 
-   "permlevel": 0, 
-   "print_hide": 0, 
+   "fieldname": "rounded_total_export",
+   "fieldtype": "Currency",
+   "label": "Rounded Total",
+   "oldfieldname": "rounded_total_export",
+   "oldfieldtype": "Currency",
+   "options": "currency",
+   "permlevel": 0,
+   "print_hide": 0,
    "read_only": 1
-  }, 
+  },
   {
-   "fieldname": "in_words_export", 
-   "fieldtype": "Data", 
-   "label": "In Words", 
-   "oldfieldname": "in_words_export", 
-   "oldfieldtype": "Data", 
-   "permlevel": 0, 
-   "print_hide": 0, 
+   "fieldname": "in_words_export",
+   "fieldtype": "Data",
+   "label": "In Words",
+   "oldfieldname": "in_words_export",
+   "oldfieldtype": "Data",
+   "permlevel": 0,
+   "print_hide": 0,
    "read_only": 1
-  }, 
+  },
   {
-   "fieldname": "gross_profit", 
-   "fieldtype": "Currency", 
-   "label": "Gross Profit", 
-   "oldfieldname": "gross_profit", 
-   "oldfieldtype": "Currency", 
-   "options": "Company:company:default_currency", 
-   "permlevel": 0, 
-   "print_hide": 1, 
-   "read_only": 1
-  }, 
-  {
-   "fieldname": "gross_profit_percent", 
-   "fieldtype": "Float", 
-   "label": "Gross Profit (%)", 
-   "oldfieldname": "gross_profit_percent", 
-   "oldfieldtype": "Currency", 
-   "permlevel": 0, 
-   "print_hide": 1, 
-   "read_only": 1
-  }, 
-  {
-   "fieldname": "advances_section", 
-   "fieldtype": "Section Break", 
-   "label": "Advances", 
-   "oldfieldtype": "Section Break", 
-   "options": "icon-money", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "fieldname": "advances_section",
+   "fieldtype": "Section Break",
+   "label": "Advances",
+   "oldfieldtype": "Section Break",
+   "options": "icon-money",
+   "permlevel": 0,
+   "print_hide": 1,
    "read_only": 0
-  }, 
+  },
   {
-   "fieldname": "get_advances_received", 
-   "fieldtype": "Button", 
-   "label": "Get Advances Received", 
-   "oldfieldtype": "Button", 
-   "options": "get_advances", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "fieldname": "get_advances_received",
+   "fieldtype": "Button",
+   "label": "Get Advances Received",
+   "oldfieldtype": "Button",
+   "options": "get_advances",
+   "permlevel": 0,
+   "print_hide": 1,
    "read_only": 0
-  }, 
+  },
   {
-   "fieldname": "advances", 
-   "fieldtype": "Table", 
-   "label": "Advances", 
-   "oldfieldname": "advance_adjustment_details", 
-   "oldfieldtype": "Table", 
-   "options": "Sales Invoice Advance", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "fieldname": "advances",
+   "fieldtype": "Table",
+   "label": "Advances",
+   "oldfieldname": "advance_adjustment_details",
+   "oldfieldtype": "Table",
+   "options": "Sales Invoice Advance",
+   "permlevel": 0,
+   "print_hide": 1,
    "read_only": 0
-  }, 
+  },
   {
-   "depends_on": "is_pos", 
-   "fieldname": "payments_section", 
-   "fieldtype": "Section Break", 
-   "label": "Payments", 
-   "options": "icon-money", 
-   "permlevel": 0, 
+   "depends_on": "is_pos",
+   "fieldname": "payments_section",
+   "fieldtype": "Section Break",
+   "label": "Payments",
+   "options": "icon-money",
+   "permlevel": 0,
    "read_only": 0
-  }, 
+  },
   {
-   "depends_on": "is_pos", 
-   "fieldname": "column_break3", 
-   "fieldtype": "Column Break", 
-   "permlevel": 0, 
-   "read_only": 0, 
+   "depends_on": "is_pos",
+   "fieldname": "column_break3",
+   "fieldtype": "Column Break",
+   "permlevel": 0,
+   "read_only": 0,
    "width": "50%"
-  }, 
+  },
   {
-   "depends_on": "is_pos", 
-   "fieldname": "paid_amount", 
-   "fieldtype": "Currency", 
-   "label": "Paid Amount", 
-   "no_copy": 1, 
-   "oldfieldname": "paid_amount", 
-   "oldfieldtype": "Currency", 
-   "options": "Company:company:default_currency", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "depends_on": "is_pos",
+   "fieldname": "paid_amount",
+   "fieldtype": "Currency",
+   "label": "Paid Amount",
+   "no_copy": 1,
+   "oldfieldname": "paid_amount",
+   "oldfieldtype": "Currency",
+   "options": "Company:company:default_currency",
+   "permlevel": 0,
+   "print_hide": 1,
    "read_only": 0
-  }, 
+  },
   {
-   "depends_on": "is_pos", 
-   "fieldname": "cash_bank_account", 
-   "fieldtype": "Link", 
-   "label": "Cash/Bank Account", 
-   "oldfieldname": "cash_bank_account", 
-   "oldfieldtype": "Link", 
-   "options": "Account", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "depends_on": "is_pos",
+   "fieldname": "cash_bank_account",
+   "fieldtype": "Link",
+   "label": "Cash/Bank Account",
+   "oldfieldname": "cash_bank_account",
+   "oldfieldtype": "Link",
+   "options": "Account",
+   "permlevel": 0,
+   "print_hide": 1,
    "read_only": 0
-  }, 
+  },
   {
-   "depends_on": "is_pos", 
-   "fieldname": "column_break4", 
-   "fieldtype": "Column Break", 
-   "permlevel": 0, 
-   "read_only": 0, 
+   "depends_on": "is_pos",
+   "fieldname": "column_break4",
+   "fieldtype": "Column Break",
+   "permlevel": 0,
+   "read_only": 0,
    "width": "50%"
-  }, 
+  },
   {
-   "depends_on": "is_pos", 
-   "fieldname": "write_off_outstanding_amount_automatically", 
-   "fieldtype": "Check", 
-   "label": "Write Off Outstanding Amount", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "depends_on": "is_pos",
+   "fieldname": "write_off_outstanding_amount_automatically",
+   "fieldtype": "Check",
+   "label": "Write Off Outstanding Amount",
+   "permlevel": 0,
+   "print_hide": 1,
    "read_only": 0
-  }, 
+  },
   {
-   "depends_on": "is_pos", 
-   "fieldname": "write_off_amount", 
-   "fieldtype": "Currency", 
-   "label": "Write Off Amount", 
-   "no_copy": 1, 
-   "options": "Company:company:default_currency", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "depends_on": "is_pos",
+   "fieldname": "write_off_amount",
+   "fieldtype": "Currency",
+   "label": "Write Off Amount",
+   "no_copy": 1,
+   "options": "Company:company:default_currency",
+   "permlevel": 0,
+   "print_hide": 1,
    "read_only": 0
-  }, 
+  },
   {
-   "depends_on": "is_pos", 
-   "fieldname": "write_off_account", 
-   "fieldtype": "Link", 
-   "label": "Write Off Account", 
-   "options": "Account", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "depends_on": "is_pos",
+   "fieldname": "write_off_account",
+   "fieldtype": "Link",
+   "label": "Write Off Account",
+   "options": "Account",
+   "permlevel": 0,
+   "print_hide": 1,
    "read_only": 0
-  }, 
+  },
   {
-   "depends_on": "is_pos", 
-   "fieldname": "write_off_cost_center", 
-   "fieldtype": "Link", 
-   "label": "Write Off Cost Center", 
-   "options": "Cost Center", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "depends_on": "is_pos",
+   "fieldname": "write_off_cost_center",
+   "fieldtype": "Link",
+   "label": "Write Off Cost Center",
+   "options": "Cost Center",
+   "permlevel": 0,
+   "print_hide": 1,
    "read_only": 0
-  }, 
+  },
   {
-   "fieldname": "fold", 
-   "fieldtype": "Fold", 
+   "fieldname": "fold",
+   "fieldtype": "Fold",
    "permlevel": 0
-  }, 
+  },
   {
-   "fieldname": "terms_section_break", 
-   "fieldtype": "Section Break", 
-   "label": "Terms and Conditions", 
-   "oldfieldtype": "Section Break", 
-   "options": "icon-legal", 
-   "permlevel": 0, 
+   "fieldname": "terms_section_break",
+   "fieldtype": "Section Break",
+   "label": "Terms and Conditions",
+   "oldfieldtype": "Section Break",
+   "options": "icon-legal",
+   "permlevel": 0,
    "read_only": 0
-  }, 
+  },
   {
-   "fieldname": "tc_name", 
-   "fieldtype": "Link", 
-   "label": "Terms", 
-   "oldfieldname": "tc_name", 
-   "oldfieldtype": "Link", 
-   "options": "Terms and Conditions", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "fieldname": "tc_name",
+   "fieldtype": "Link",
+   "label": "Terms",
+   "oldfieldname": "tc_name",
+   "oldfieldtype": "Link",
+   "options": "Terms and Conditions",
+   "permlevel": 0,
+   "print_hide": 1,
    "read_only": 0
-  }, 
+  },
   {
-   "fieldname": "terms", 
-   "fieldtype": "Text Editor", 
-   "label": "Terms and Conditions Details", 
-   "oldfieldname": "terms", 
-   "oldfieldtype": "Text Editor", 
-   "permlevel": 0, 
+   "fieldname": "terms",
+   "fieldtype": "Text Editor",
+   "label": "Terms and Conditions Details",
+   "oldfieldname": "terms",
+   "oldfieldtype": "Text Editor",
+   "permlevel": 0,
    "read_only": 0
-  }, 
+  },
   {
-   "depends_on": "customer", 
-   "fieldname": "contact_section", 
-   "fieldtype": "Section Break", 
-   "hidden": 0, 
-   "label": "Contact Info", 
-   "options": "icon-bullhorn", 
-   "permlevel": 0, 
+   "depends_on": "customer",
+   "fieldname": "contact_section",
+   "fieldtype": "Section Break",
+   "hidden": 0,
+   "label": "Contact Info",
+   "options": "icon-bullhorn",
+   "permlevel": 0,
    "read_only": 0
-  }, 
+  },
   {
-   "description": "<a href=\"#Sales Browser/Territory\">Add / Edit</a>", 
-   "fieldname": "territory", 
-   "fieldtype": "Link", 
-   "in_filter": 1, 
-   "label": "Territory", 
-   "options": "Territory", 
-   "permlevel": 0, 
-   "print_hide": 1, 
-   "read_only": 0, 
-   "reqd": 1, 
+   "description": "<a href=\"#Sales Browser/Territory\">Add / Edit</a>",
+   "fieldname": "territory",
+   "fieldtype": "Link",
+   "in_filter": 1,
+   "label": "Territory",
+   "options": "Territory",
+   "permlevel": 0,
+   "print_hide": 1,
+   "read_only": 0,
+   "reqd": 1,
    "search_index": 0
-  }, 
+  },
   {
-   "description": "<a href=\"#Sales Browser/Customer Group\">Add / Edit</a>", 
-   "fieldname": "customer_group", 
-   "fieldtype": "Link", 
-   "in_filter": 1, 
-   "label": "Customer Group", 
-   "options": "Customer Group", 
-   "permlevel": 0, 
-   "print_hide": 1, 
-   "read_only": 0, 
+   "description": "<a href=\"#Sales Browser/Customer Group\">Add / Edit</a>",
+   "fieldname": "customer_group",
+   "fieldtype": "Link",
+   "in_filter": 1,
+   "label": "Customer Group",
+   "options": "Customer Group",
+   "permlevel": 0,
+   "print_hide": 1,
+   "read_only": 0,
    "search_index": 0
-  }, 
+  },
   {
-   "fieldname": "col_break23", 
-   "fieldtype": "Column Break", 
-   "permlevel": 0, 
-   "read_only": 0, 
+   "fieldname": "col_break23",
+   "fieldtype": "Column Break",
+   "permlevel": 0,
+   "read_only": 0,
    "width": "50%"
-  }, 
+  },
   {
-   "fieldname": "customer_address", 
-   "fieldtype": "Link", 
-   "label": "Customer Address", 
-   "options": "Address", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "fieldname": "customer_address",
+   "fieldtype": "Link",
+   "label": "Customer Address",
+   "options": "Address",
+   "permlevel": 0,
+   "print_hide": 1,
    "read_only": 0
-  }, 
+  },
   {
-   "fieldname": "contact_person", 
-   "fieldtype": "Link", 
-   "label": "Contact Person", 
-   "options": "Contact", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "fieldname": "contact_person",
+   "fieldtype": "Link",
+   "label": "Contact Person",
+   "options": "Contact",
+   "permlevel": 0,
+   "print_hide": 1,
    "read_only": 0
-  }, 
+  },
   {
-   "fieldname": "more_info", 
-   "fieldtype": "Section Break", 
-   "label": "More Info", 
-   "oldfieldtype": "Section Break", 
-   "options": "icon-file-text", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "fieldname": "more_info",
+   "fieldtype": "Section Break",
+   "label": "More Info",
+   "oldfieldtype": "Section Break",
+   "options": "icon-file-text",
+   "permlevel": 0,
+   "print_hide": 1,
    "read_only": 0
-  }, 
+  },
   {
-   "description": "Customer (Receivable) Account", 
-   "fieldname": "debit_to", 
-   "fieldtype": "Link", 
-   "in_filter": 1, 
-   "label": "Debit To", 
-   "oldfieldname": "debit_to", 
-   "oldfieldtype": "Link", 
-   "options": "Account", 
-   "permlevel": 0, 
-   "print_hide": 1, 
-   "read_only": 0, 
-   "reqd": 1, 
+   "description": "Customer (Receivable) Account",
+   "fieldname": "debit_to",
+   "fieldtype": "Link",
+   "in_filter": 1,
+   "label": "Debit To",
+   "oldfieldname": "debit_to",
+   "oldfieldtype": "Link",
+   "options": "Account",
+   "permlevel": 0,
+   "print_hide": 1,
+   "read_only": 0,
+   "reqd": 1,
    "search_index": 1
-  }, 
+  },
   {
-   "fieldname": "project_name", 
-   "fieldtype": "Link", 
-   "in_filter": 1, 
-   "label": "Project Name", 
-   "oldfieldname": "project_name", 
-   "oldfieldtype": "Link", 
-   "options": "Project", 
-   "permlevel": 0, 
-   "read_only": 0, 
+   "fieldname": "project_name",
+   "fieldtype": "Link",
+   "in_filter": 1,
+   "label": "Project Name",
+   "oldfieldname": "project_name",
+   "oldfieldtype": "Link",
+   "options": "Project",
+   "permlevel": 0,
+   "read_only": 0,
    "search_index": 1
-  }, 
+  },
   {
-   "depends_on": "eval:doc.source == 'Campaign'", 
-   "fieldname": "campaign", 
-   "fieldtype": "Link", 
-   "label": "Campaign", 
-   "oldfieldname": "campaign", 
-   "oldfieldtype": "Link", 
-   "options": "Campaign", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "depends_on": "eval:doc.source == 'Campaign'",
+   "fieldname": "campaign",
+   "fieldtype": "Link",
+   "label": "Campaign",
+   "oldfieldname": "campaign",
+   "oldfieldtype": "Link",
+   "options": "Campaign",
+   "permlevel": 0,
+   "print_hide": 1,
    "read_only": 0
-  }, 
+  },
   {
-   "fieldname": "source", 
-   "fieldtype": "Select", 
-   "label": "Source", 
-   "oldfieldname": "source", 
-   "oldfieldtype": "Select", 
-   "options": "\nExisting Customer\nReference\nAdvertisement\nCold Calling\nExhibition\nSupplier Reference\nMass Mailing\nCustomer's Vendor\nCampaign", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "fieldname": "source",
+   "fieldtype": "Select",
+   "label": "Source",
+   "oldfieldname": "source",
+   "oldfieldtype": "Select",
+   "options": "\nExisting Customer\nReference\nAdvertisement\nCold Calling\nExhibition\nSupplier Reference\nMass Mailing\nCustomer's Vendor\nCampaign",
+   "permlevel": 0,
+   "print_hide": 1,
    "read_only": 0
-  }, 
+  },
   {
-   "default": "No", 
-   "description": "Considered as an Opening Balance", 
-   "fieldname": "is_opening", 
-   "fieldtype": "Select", 
-   "in_filter": 1, 
-   "label": "Is Opening Entry", 
-   "oldfieldname": "is_opening", 
-   "oldfieldtype": "Select", 
-   "options": "No\nYes", 
-   "permlevel": 0, 
-   "print_hide": 1, 
-   "read_only": 0, 
+   "default": "No",
+   "description": "Considered as an Opening Balance",
+   "fieldname": "is_opening",
+   "fieldtype": "Select",
+   "in_filter": 1,
+   "label": "Is Opening Entry",
+   "oldfieldname": "is_opening",
+   "oldfieldtype": "Select",
+   "options": "No\nYes",
+   "permlevel": 0,
+   "print_hide": 1,
+   "read_only": 0,
    "search_index": 0
-  }, 
+  },
   {
-   "fieldname": "c_form_applicable", 
-   "fieldtype": "Select", 
-   "label": "C-Form Applicable", 
-   "no_copy": 1, 
-   "options": "No\nYes", 
-   "permlevel": 0, 
-   "print_hide": 1, 
-   "read_only": 0, 
+   "fieldname": "c_form_applicable",
+   "fieldtype": "Select",
+   "label": "C-Form Applicable",
+   "no_copy": 1,
+   "options": "No\nYes",
+   "permlevel": 0,
+   "print_hide": 1,
+   "read_only": 0,
    "report_hide": 0
-  }, 
+  },
   {
-   "fieldname": "c_form_no", 
-   "fieldtype": "Link", 
-   "label": "C-Form No", 
-   "no_copy": 1, 
-   "options": "C-Form", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "fieldname": "c_form_no",
+   "fieldtype": "Link",
+   "label": "C-Form No",
+   "no_copy": 1,
+   "options": "C-Form",
+   "permlevel": 0,
+   "print_hide": 1,
    "read_only": 1
-  }, 
+  },
   {
-   "fieldname": "column_break8", 
-   "fieldtype": "Column Break", 
-   "oldfieldtype": "Column Break", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "fieldname": "column_break8",
+   "fieldtype": "Column Break",
+   "oldfieldtype": "Column Break",
+   "permlevel": 0,
+   "print_hide": 1,
    "read_only": 0
-  }, 
+  },
   {
-   "allow_on_submit": 1, 
-   "fieldname": "letter_head", 
-   "fieldtype": "Link", 
-   "label": "Letter Head", 
-   "oldfieldname": "letter_head", 
-   "oldfieldtype": "Select", 
-   "options": "Letter Head", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "allow_on_submit": 1,
+   "fieldname": "letter_head",
+   "fieldtype": "Link",
+   "label": "Letter Head",
+   "oldfieldname": "letter_head",
+   "oldfieldtype": "Select",
+   "options": "Letter Head",
+   "permlevel": 0,
+   "print_hide": 1,
    "read_only": 0
-  }, 
+  },
   {
-   "allow_on_submit": 1, 
-   "fieldname": "select_print_heading", 
-   "fieldtype": "Link", 
-   "label": "Print Heading", 
-   "no_copy": 1, 
-   "oldfieldname": "select_print_heading", 
-   "oldfieldtype": "Link", 
-   "options": "Print Heading", 
-   "permlevel": 0, 
-   "print_hide": 1, 
-   "read_only": 0, 
+   "allow_on_submit": 1,
+   "fieldname": "select_print_heading",
+   "fieldtype": "Link",
+   "label": "Print Heading",
+   "no_copy": 1,
+   "oldfieldname": "select_print_heading",
+   "oldfieldtype": "Link",
+   "options": "Print Heading",
+   "permlevel": 0,
+   "print_hide": 1,
+   "read_only": 0,
    "report_hide": 1
-  }, 
+  },
   {
-   "fieldname": "posting_time", 
-   "fieldtype": "Time", 
-   "label": "Posting Time", 
-   "no_copy": 1, 
-   "oldfieldname": "posting_time", 
-   "oldfieldtype": "Time", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "fieldname": "posting_time",
+   "fieldtype": "Time",
+   "label": "Posting Time",
+   "no_copy": 1,
+   "oldfieldname": "posting_time",
+   "oldfieldtype": "Time",
+   "permlevel": 0,
+   "print_hide": 1,
    "read_only": 0
-  }, 
+  },
   {
-   "description": "Actual Invoice Date", 
-   "fieldname": "aging_date", 
-   "fieldtype": "Date", 
-   "label": "Aging Date", 
-   "oldfieldname": "aging_date", 
-   "oldfieldtype": "Date", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "description": "Actual Invoice Date",
+   "fieldname": "aging_date",
+   "fieldtype": "Date",
+   "label": "Aging Date",
+   "oldfieldname": "aging_date",
+   "oldfieldtype": "Date",
+   "permlevel": 0,
+   "print_hide": 1,
    "read_only": 0
-  }, 
+  },
   {
-   "fieldname": "fiscal_year", 
-   "fieldtype": "Link", 
-   "in_filter": 1, 
-   "label": "Fiscal Year", 
-   "no_copy": 0, 
-   "oldfieldname": "fiscal_year", 
-   "oldfieldtype": "Select", 
-   "options": "Fiscal Year", 
-   "permlevel": 0, 
-   "print_hide": 1, 
-   "read_only": 0, 
-   "reqd": 1, 
+   "fieldname": "fiscal_year",
+   "fieldtype": "Link",
+   "in_filter": 1,
+   "label": "Fiscal Year",
+   "no_copy": 0,
+   "oldfieldname": "fiscal_year",
+   "oldfieldtype": "Select",
+   "options": "Fiscal Year",
+   "permlevel": 0,
+   "print_hide": 1,
+   "read_only": 0,
+   "reqd": 1,
    "search_index": 0
-  }, 
+  },
   {
-   "fieldname": "remarks", 
-   "fieldtype": "Small Text", 
-   "label": "Remarks", 
-   "no_copy": 1, 
-   "oldfieldname": "remarks", 
-   "oldfieldtype": "Text", 
-   "permlevel": 0, 
-   "print_hide": 1, 
-   "read_only": 0, 
+   "fieldname": "remarks",
+   "fieldtype": "Small Text",
+   "label": "Remarks",
+   "no_copy": 1,
+   "oldfieldname": "remarks",
+   "oldfieldtype": "Text",
+   "permlevel": 0,
+   "print_hide": 1,
+   "read_only": 0,
    "reqd": 0
-  }, 
+  },
   {
-   "fieldname": "sales_team_section_break", 
-   "fieldtype": "Section Break", 
-   "label": "Sales Team", 
-   "oldfieldtype": "Section Break", 
-   "options": "icon-group", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "fieldname": "sales_team_section_break",
+   "fieldtype": "Section Break",
+   "label": "Sales Team",
+   "oldfieldtype": "Section Break",
+   "options": "icon-group",
+   "permlevel": 0,
+   "print_hide": 1,
    "read_only": 0
-  }, 
+  },
   {
-   "fieldname": "column_break9", 
-   "fieldtype": "Column Break", 
-   "oldfieldtype": "Column Break", 
-   "permlevel": 0, 
-   "print_hide": 1, 
-   "read_only": 0, 
+   "fieldname": "column_break9",
+   "fieldtype": "Column Break",
+   "oldfieldtype": "Column Break",
+   "permlevel": 0,
+   "print_hide": 1,
+   "read_only": 0,
    "width": "50%"
-  }, 
+  },
   {
-   "fieldname": "sales_partner", 
-   "fieldtype": "Link", 
-   "in_filter": 1, 
-   "label": "Sales Partner", 
-   "oldfieldname": "sales_partner", 
-   "oldfieldtype": "Link", 
-   "options": "Sales Partner", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "fieldname": "sales_partner",
+   "fieldtype": "Link",
+   "in_filter": 1,
+   "label": "Sales Partner",
+   "oldfieldname": "sales_partner",
+   "oldfieldtype": "Link",
+   "options": "Sales Partner",
+   "permlevel": 0,
+   "print_hide": 1,
    "read_only": 0
-  }, 
+  },
   {
-   "fieldname": "column_break10", 
-   "fieldtype": "Column Break", 
-   "oldfieldtype": "Column Break", 
-   "permlevel": 0, 
-   "print_hide": 1, 
-   "read_only": 0, 
+   "fieldname": "column_break10",
+   "fieldtype": "Column Break",
+   "oldfieldtype": "Column Break",
+   "permlevel": 0,
+   "print_hide": 1,
+   "read_only": 0,
    "width": "50%"
-  }, 
+  },
   {
-   "fieldname": "commission_rate", 
-   "fieldtype": "Float", 
-   "label": "Commission Rate (%)", 
-   "oldfieldname": "commission_rate", 
-   "oldfieldtype": "Currency", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "fieldname": "commission_rate",
+   "fieldtype": "Float",
+   "label": "Commission Rate (%)",
+   "oldfieldname": "commission_rate",
+   "oldfieldtype": "Currency",
+   "permlevel": 0,
+   "print_hide": 1,
    "read_only": 0
-  }, 
+  },
   {
-   "fieldname": "total_commission", 
-   "fieldtype": "Currency", 
-   "label": "Total Commission", 
-   "oldfieldname": "total_commission", 
-   "oldfieldtype": "Currency", 
-   "options": "Company:company:default_currency", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "fieldname": "total_commission",
+   "fieldtype": "Currency",
+   "label": "Total Commission",
+   "oldfieldname": "total_commission",
+   "oldfieldtype": "Currency",
+   "options": "Company:company:default_currency",
+   "permlevel": 0,
+   "print_hide": 1,
    "read_only": 0
-  }, 
+  },
   {
-   "fieldname": "section_break2", 
-   "fieldtype": "Section Break", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "fieldname": "section_break2",
+   "fieldtype": "Section Break",
+   "permlevel": 0,
+   "print_hide": 1,
    "read_only": 0
-  }, 
+  },
   {
-   "fieldname": "sales_team", 
-   "fieldtype": "Table", 
-   "label": "Sales Team1", 
-   "oldfieldname": "sales_team", 
-   "oldfieldtype": "Table", 
-   "options": "Sales Team", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "fieldname": "sales_team",
+   "fieldtype": "Table",
+   "label": "Sales Team1",
+   "oldfieldname": "sales_team",
+   "oldfieldtype": "Table",
+   "options": "Sales Team",
+   "permlevel": 0,
+   "print_hide": 1,
    "read_only": 0
-  }, 
+  },
   {
-   "depends_on": "eval:doc.docstatus<2", 
-   "fieldname": "recurring_invoice", 
-   "fieldtype": "Section Break", 
-   "label": "Recurring Invoice", 
-   "options": "icon-time", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "depends_on": "eval:doc.docstatus<2",
+   "fieldname": "recurring_invoice",
+   "fieldtype": "Section Break",
+   "label": "Recurring Invoice",
+   "options": "icon-time",
+   "permlevel": 0,
+   "print_hide": 1,
    "read_only": 0
-  }, 
+  },
   {
-   "fieldname": "column_break11", 
-   "fieldtype": "Column Break", 
-   "permlevel": 0, 
-   "print_hide": 1, 
-   "read_only": 0, 
+   "fieldname": "column_break11",
+   "fieldtype": "Column Break",
+   "permlevel": 0,
+   "print_hide": 1,
+   "read_only": 0,
    "width": "50%"
-  }, 
+  },
   {
-   "allow_on_submit": 1, 
-   "depends_on": "eval:doc.docstatus<2", 
-   "description": "Check if recurring invoice, uncheck to stop recurring or put proper End Date", 
-   "fieldname": "is_recurring", 
-   "fieldtype": "Check", 
-   "label": "Is Recurring", 
-   "no_copy": 1, 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "allow_on_submit": 1,
+   "depends_on": "eval:doc.docstatus<2",
+   "description": "Check if recurring invoice, uncheck to stop recurring or put proper End Date",
+   "fieldname": "is_recurring",
+   "fieldtype": "Check",
+   "label": "Is Recurring",
+   "no_copy": 1,
+   "permlevel": 0,
+   "print_hide": 1,
    "read_only": 0
-  }, 
+  },
   {
-   "allow_on_submit": 1, 
-   "depends_on": "eval:doc.is_recurring==1", 
-   "description": "Select the period when the invoice will be generated automatically", 
-   "fieldname": "recurring_type", 
-   "fieldtype": "Select", 
-   "label": "Recurring Type", 
-   "no_copy": 1, 
-   "options": "\nMonthly\nQuarterly\nHalf-yearly\nYearly", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "allow_on_submit": 1,
+   "depends_on": "eval:doc.is_recurring==1",
+   "description": "Select the period when the invoice will be generated automatically",
+   "fieldname": "recurring_type",
+   "fieldtype": "Select",
+   "label": "Recurring Type",
+   "no_copy": 1,
+   "options": "\nMonthly\nQuarterly\nHalf-yearly\nYearly",
+   "permlevel": 0,
+   "print_hide": 1,
    "read_only": 0
-  }, 
+  },
   {
-   "allow_on_submit": 1, 
-   "depends_on": "eval:doc.is_recurring==1", 
-   "description": "Start date of current invoice's period", 
-   "fieldname": "from_date", 
-   "fieldtype": "Date", 
-   "label": "From Date", 
-   "no_copy": 1, 
-   "permlevel": 0, 
-   "print_hide": 0, 
+   "allow_on_submit": 1,
+   "depends_on": "eval:doc.is_recurring==1",
+   "description": "Start date of current invoice's period",
+   "fieldname": "from_date",
+   "fieldtype": "Date",
+   "label": "From Date",
+   "no_copy": 1,
+   "permlevel": 0,
+   "print_hide": 0,
    "read_only": 0
-  }, 
+  },
   {
-   "allow_on_submit": 1, 
-   "depends_on": "eval:doc.is_recurring==1", 
-   "description": "End date of current invoice's period", 
-   "fieldname": "to_date", 
-   "fieldtype": "Date", 
-   "label": "To Date", 
-   "no_copy": 1, 
-   "permlevel": 0, 
-   "print_hide": 0, 
+   "allow_on_submit": 1,
+   "depends_on": "eval:doc.is_recurring==1",
+   "description": "End date of current invoice's period",
+   "fieldname": "to_date",
+   "fieldtype": "Date",
+   "label": "To Date",
+   "no_copy": 1,
+   "permlevel": 0,
+   "print_hide": 0,
    "read_only": 0
-  }, 
+  },
   {
-   "allow_on_submit": 1, 
-   "depends_on": "eval:doc.is_recurring==1", 
-   "description": "The day of the month on which auto invoice will be generated e.g. 05, 28 etc ", 
-   "fieldname": "repeat_on_day_of_month", 
-   "fieldtype": "Int", 
-   "label": "Repeat on Day of Month", 
-   "no_copy": 1, 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "allow_on_submit": 1,
+   "depends_on": "eval:doc.is_recurring==1",
+   "description": "The day of the month on which auto invoice will be generated e.g. 05, 28 etc ",
+   "fieldname": "repeat_on_day_of_month",
+   "fieldtype": "Int",
+   "label": "Repeat on Day of Month",
+   "no_copy": 1,
+   "permlevel": 0,
+   "print_hide": 1,
    "read_only": 0
-  }, 
+  },
   {
-   "allow_on_submit": 1, 
-   "depends_on": "eval:doc.is_recurring==1", 
-   "description": "The date on which recurring invoice will be stop", 
-   "fieldname": "end_date", 
-   "fieldtype": "Date", 
-   "label": "End Date", 
-   "no_copy": 1, 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "allow_on_submit": 1,
+   "depends_on": "eval:doc.is_recurring==1",
+   "description": "The date on which recurring invoice will be stop",
+   "fieldname": "end_date",
+   "fieldtype": "Date",
+   "label": "End Date",
+   "no_copy": 1,
+   "permlevel": 0,
+   "print_hide": 1,
    "read_only": 0
-  }, 
+  },
   {
-   "fieldname": "column_break12", 
-   "fieldtype": "Column Break", 
-   "no_copy": 0, 
-   "permlevel": 0, 
-   "print_hide": 1, 
-   "read_only": 0, 
+   "fieldname": "column_break12",
+   "fieldtype": "Column Break",
+   "no_copy": 0,
+   "permlevel": 0,
+   "print_hide": 1,
+   "read_only": 0,
    "width": "50%"
-  }, 
+  },
   {
-   "depends_on": "eval:doc.is_recurring==1", 
-   "description": "The date on which next invoice will be generated. It is generated on submit.\n", 
-   "fieldname": "next_date", 
-   "fieldtype": "Date", 
-   "label": "Next Date", 
-   "no_copy": 1, 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "depends_on": "eval:doc.is_recurring==1",
+   "description": "The date on which next invoice will be generated. It is generated on submit.\n",
+   "fieldname": "next_date",
+   "fieldtype": "Date",
+   "label": "Next Date",
+   "no_copy": 1,
+   "permlevel": 0,
+   "print_hide": 1,
    "read_only": 1
-  }, 
+  },
   {
-   "depends_on": "eval:doc.is_recurring==1", 
-   "description": "The unique id for tracking all recurring invoices.\u00a0It is generated on submit.", 
-   "fieldname": "recurring_id", 
-   "fieldtype": "Data", 
-   "label": "Recurring Id", 
-   "no_copy": 1, 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "depends_on": "eval:doc.is_recurring==1",
+   "description": "The unique id for tracking all recurring invoices.\u00a0It is generated on submit.",
+   "fieldname": "recurring_id",
+   "fieldtype": "Data",
+   "label": "Recurring Id",
+   "no_copy": 1,
+   "permlevel": 0,
+   "print_hide": 1,
    "read_only": 1
-  }, 
+  },
   {
-   "allow_on_submit": 1, 
-   "depends_on": "eval:doc.is_recurring==1", 
-   "description": "Enter email id separated by commas, invoice will be mailed automatically on particular date", 
-   "fieldname": "notification_email_address", 
-   "fieldtype": "Small Text", 
-   "label": "Notification Email Address", 
-   "no_copy": 1, 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "allow_on_submit": 1,
+   "depends_on": "eval:doc.is_recurring==1",
+   "description": "Enter email id separated by commas, invoice will be mailed automatically on particular date",
+   "fieldname": "notification_email_address",
+   "fieldtype": "Small Text",
+   "label": "Notification Email Address",
+   "no_copy": 1,
+   "permlevel": 0,
+   "print_hide": 1,
    "read_only": 0
-  }, 
+  },
   {
-   "fieldname": "against_income_account", 
-   "fieldtype": "Small Text", 
-   "hidden": 1, 
-   "label": "Against Income Account", 
-   "no_copy": 1, 
-   "oldfieldname": "against_income_account", 
-   "oldfieldtype": "Small Text", 
-   "permlevel": 0, 
-   "print_hide": 1, 
-   "read_only": 0, 
+   "fieldname": "against_income_account",
+   "fieldtype": "Small Text",
+   "hidden": 1,
+   "label": "Against Income Account",
+   "no_copy": 1,
+   "oldfieldname": "against_income_account",
+   "oldfieldtype": "Small Text",
+   "permlevel": 0,
+   "print_hide": 1,
+   "read_only": 0,
    "report_hide": 1
   }
- ], 
- "icon": "icon-file-text", 
- "idx": 1, 
- "is_submittable": 1, 
- "modified": "2014-12-24 14:27:52.461964", 
- "modified_by": "Administrator", 
- "module": "Accounts", 
- "name": "Sales Invoice", 
- "owner": "Administrator", 
+ ],
+ "icon": "icon-file-text",
+ "idx": 1,
+ "is_submittable": 1,
+ "modified": "2014-12-24 14:27:52.461964",
+ "modified_by": "Administrator",
+ "module": "Accounts",
+ "name": "Sales Invoice",
+ "owner": "Administrator",
  "permissions": [
   {
-   "amend": 1, 
-   "cancel": 1, 
-   "create": 1, 
-   "delete": 1, 
-   "email": 1, 
-   "permlevel": 0, 
-   "print": 1, 
-   "read": 1, 
-   "report": 1, 
-   "role": "Accounts Manager", 
-   "submit": 1, 
+   "amend": 1,
+   "cancel": 1,
+   "create": 1,
+   "delete": 1,
+   "email": 1,
+   "permlevel": 0,
+   "print": 1,
+   "read": 1,
+   "report": 1,
+   "role": "Accounts Manager",
+   "submit": 1,
    "write": 1
-  }, 
+  },
   {
-   "amend": 1, 
-   "apply_user_permissions": 1, 
-   "cancel": 0, 
-   "create": 1, 
-   "delete": 0, 
-   "email": 1, 
-   "permlevel": 0, 
-   "print": 1, 
-   "read": 1, 
-   "report": 1, 
-   "role": "Accounts User", 
-   "submit": 1, 
+   "amend": 1,
+   "apply_user_permissions": 1,
+   "cancel": 0,
+   "create": 1,
+   "delete": 0,
+   "email": 1,
+   "permlevel": 0,
+   "print": 1,
+   "read": 1,
+   "report": 1,
+   "role": "Accounts User",
+   "submit": 1,
    "write": 1
-  }, 
+  },
   {
-   "apply_user_permissions": 1, 
-   "cancel": 0, 
-   "delete": 0, 
-   "email": 1, 
-   "permlevel": 0, 
-   "print": 1, 
-   "read": 1, 
-   "report": 1, 
+   "apply_user_permissions": 1,
+   "cancel": 0,
+   "delete": 0,
+   "email": 1,
+   "permlevel": 0,
+   "print": 1,
+   "read": 1,
+   "report": 1,
    "role": "Customer"
-  }, 
+  },
   {
-   "permlevel": 1, 
-   "read": 1, 
-   "role": "Accounts Manager", 
+   "permlevel": 1,
+   "read": 1,
+   "role": "Accounts Manager",
    "write": 1
   }
- ], 
- "read_only_onload": 1, 
- "search_fields": "posting_date, due_date, customer, fiscal_year, grand_total, outstanding_amount", 
- "sort_field": "modified", 
+ ],
+ "read_only_onload": 1,
+ "search_fields": "posting_date, due_date, customer, fiscal_year, grand_total, outstanding_amount",
+ "sort_field": "modified",
  "sort_order": "DESC"
-}
\ No newline at end of file
+}
diff --git a/erpnext/accounts/doctype/sales_taxes_and_charges/sales_taxes_and_charges.json b/erpnext/accounts/doctype/sales_taxes_and_charges/sales_taxes_and_charges.json
index 7bde84f..d820c87 100644
--- a/erpnext/accounts/doctype/sales_taxes_and_charges/sales_taxes_and_charges.json
+++ b/erpnext/accounts/doctype/sales_taxes_and_charges/sales_taxes_and_charges.json
@@ -1,155 +1,156 @@
 {
- "autoname": "INVTD.######",
- "creation": "2013-04-24 11:39:32",
- "docstatus": 0,
- "doctype": "DocType",
+ "autoname": "INVTD.######", 
+ "creation": "2013-04-24 11:39:32", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
  "fields": [
   {
-   "fieldname": "charge_type",
-   "fieldtype": "Select",
-   "in_list_view": 1,
-   "label": "Type",
-   "oldfieldname": "charge_type",
-   "oldfieldtype": "Select",
-   "options": "\nActual\nOn Net Total\nOn Previous Row Amount\nOn Previous Row Total",
-   "permlevel": 0,
+   "fieldname": "charge_type", 
+   "fieldtype": "Select", 
+   "in_list_view": 1, 
+   "label": "Type", 
+   "oldfieldname": "charge_type", 
+   "oldfieldtype": "Select", 
+   "options": "\nActual\nOn Net Total\nOn Previous Row Amount\nOn Previous Row Total", 
+   "permlevel": 0, 
    "reqd": 1
-  },
+  }, 
   {
-   "depends_on": "eval:[\"On Previous Row Amount\", \"On Previous Row Total\"].indexOf(doc.charge_type)!==-1",
-   "fieldname": "row_id",
-   "fieldtype": "Data",
-   "hidden": 0,
-   "label": "Reference Row #",
-   "oldfieldname": "row_id",
-   "oldfieldtype": "Data",
+   "depends_on": "eval:[\"On Previous Row Amount\", \"On Previous Row Total\"].indexOf(doc.charge_type)!==-1", 
+   "fieldname": "row_id", 
+   "fieldtype": "Data", 
+   "hidden": 0, 
+   "label": "Reference Row #", 
+   "oldfieldname": "row_id", 
+   "oldfieldtype": "Data", 
    "permlevel": 0
-  },
+  }, 
   {
-   "fieldname": "description",
-   "fieldtype": "Small Text",
-   "in_list_view": 1,
-   "label": "Description",
-   "oldfieldname": "description",
-   "oldfieldtype": "Small Text",
-   "permlevel": 0,
-   "print_width": "300px",
-   "reqd": 1,
+   "fieldname": "description", 
+   "fieldtype": "Small Text", 
+   "in_list_view": 1, 
+   "label": "Description", 
+   "oldfieldname": "description", 
+   "oldfieldtype": "Small Text", 
+   "permlevel": 0, 
+   "print_width": "300px", 
+   "reqd": 1, 
    "width": "300px"
-  },
+  }, 
   {
-   "fieldname": "col_break_1",
-   "fieldtype": "Column Break",
-   "permlevel": 0,
+   "fieldname": "col_break_1", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0, 
    "width": "50%"
-  },
+  }, 
   {
-   "fieldname": "account_head",
-   "fieldtype": "Link",
-   "in_list_view": 0,
-   "label": "Account Head",
-   "oldfieldname": "account_head",
-   "oldfieldtype": "Link",
-   "options": "Account",
-   "permlevel": 0,
-   "reqd": 1,
+   "fieldname": "account_head", 
+   "fieldtype": "Link", 
+   "in_list_view": 0, 
+   "label": "Account Head", 
+   "oldfieldname": "account_head", 
+   "oldfieldtype": "Link", 
+   "options": "Account", 
+   "permlevel": 0, 
+   "reqd": 1, 
    "search_index": 1
-  },
+  }, 
   {
-   "default": ":Company",
-   "fieldname": "cost_center",
-   "fieldtype": "Link",
-   "in_list_view": 0,
-   "label": "Cost Center",
-   "oldfieldname": "cost_center_other_charges",
-   "oldfieldtype": "Link",
-   "options": "Cost Center",
+   "default": ":Company", 
+   "fieldname": "cost_center", 
+   "fieldtype": "Link", 
+   "in_list_view": 0, 
+   "label": "Cost Center", 
+   "oldfieldname": "cost_center_other_charges", 
+   "oldfieldtype": "Link", 
+   "options": "Cost Center", 
    "permlevel": 0
-  },
+  }, 
   {
-   "fieldname": "rate",
-   "fieldtype": "Float",
-   "in_list_view": 1,
-   "label": "Rate",
-   "oldfieldname": "rate",
-   "oldfieldtype": "Currency",
-   "permlevel": 0,
+   "fieldname": "rate", 
+   "fieldtype": "Float", 
+   "in_list_view": 1, 
+   "label": "Rate", 
+   "oldfieldname": "rate", 
+   "oldfieldtype": "Currency", 
+   "permlevel": 0, 
    "reqd": 1
-  },
+  }, 
   {
-   "fieldname": "tax_amount",
-   "fieldtype": "Currency",
-   "in_list_view": 1,
-   "label": "Amount",
-   "oldfieldname": "tax_amount",
-   "oldfieldtype": "Currency",
-   "options": "Company:company:default_currency",
-   "permlevel": 0,
-   "read_only": 1,
+   "fieldname": "tax_amount", 
+   "fieldtype": "Currency", 
+   "in_list_view": 1, 
+   "label": "Amount", 
+   "oldfieldname": "tax_amount", 
+   "oldfieldtype": "Currency", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "read_only": 1, 
    "reqd": 0
-  },
+  }, 
   {
-   "fieldname": "total",
-   "fieldtype": "Currency",
-   "label": "Total",
-   "oldfieldname": "total",
-   "oldfieldtype": "Currency",
-   "options": "Company:company:default_currency",
-   "permlevel": 0,
+   "fieldname": "total", 
+   "fieldtype": "Currency", 
+   "label": "Total", 
+   "oldfieldname": "total", 
+   "oldfieldtype": "Currency", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
    "read_only": 1
-  },
+  }, 
   {
-   "allow_on_submit": 0,
-   "description": "If checked, the tax amount will be considered as already included in the Print Rate / Print Amount",
-   "fieldname": "included_in_print_rate",
-   "fieldtype": "Check",
-   "label": "Is this Tax included in Basic Rate?",
-   "no_copy": 0,
-   "permlevel": 0,
-   "print_hide": 1,
-   "print_width": "150px",
-   "report_hide": 1,
+   "allow_on_submit": 0, 
+   "description": "If checked, the tax amount will be considered as already included in the Print Rate / Print Amount", 
+   "fieldname": "included_in_print_rate", 
+   "fieldtype": "Check", 
+   "label": "Is this Tax included in Basic Rate?", 
+   "no_copy": 0, 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "print_width": "150px", 
+   "report_hide": 1, 
    "width": "150px"
-  },
+  }, 
   {
-   "fieldname": "tax_amount_after_discount_amount",
-   "fieldtype": "Currency",
-   "hidden": 1,
-   "label": "Tax Amount After Discount Amount",
-   "options": "Company:company:default_currency",
-   "permlevel": 0,
+   "depends_on": "eval:parent.discount_amount", 
+   "fieldname": "tax_amount_after_discount_amount", 
+   "fieldtype": "Currency", 
+   "hidden": 0, 
+   "label": "Tax Amount After Discount Amount", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
    "read_only": 1
-  },
+  }, 
   {
-   "fieldname": "item_wise_tax_detail",
-   "fieldtype": "Small Text",
-   "hidden": 1,
-   "label": "Item Wise Tax Detail",
-   "oldfieldname": "item_wise_tax_detail",
-   "oldfieldtype": "Small Text",
-   "permlevel": 0,
+   "fieldname": "item_wise_tax_detail", 
+   "fieldtype": "Small Text", 
+   "hidden": 1, 
+   "label": "Item Wise Tax Detail", 
+   "oldfieldname": "item_wise_tax_detail", 
+   "oldfieldtype": "Small Text", 
+   "permlevel": 0, 
    "read_only": 1
-  },
+  }, 
   {
-   "fieldname": "parenttype",
-   "fieldtype": "Data",
-   "hidden": 1,
-   "in_filter": 1,
-   "label": "Parenttype",
-   "oldfieldname": "parenttype",
-   "oldfieldtype": "Data",
-   "permlevel": 0,
-   "print_hide": 1,
+   "fieldname": "parenttype", 
+   "fieldtype": "Data", 
+   "hidden": 1, 
+   "in_filter": 1, 
+   "label": "Parenttype", 
+   "oldfieldname": "parenttype", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "print_hide": 1, 
    "search_index": 1
   }
- ],
- "hide_heading": 1,
- "idx": 1,
- "istable": 1,
- "modified": "2014-05-30 03:43:39.740638",
- "modified_by": "Administrator",
- "module": "Accounts",
- "name": "Sales Taxes and Charges",
- "owner": "Administrator",
+ ], 
+ "hide_heading": 1, 
+ "idx": 1, 
+ "istable": 1, 
+ "modified": "2014-12-10 12:26:41.222471", 
+ "modified_by": "Administrator", 
+ "module": "Accounts", 
+ "name": "Sales Taxes and Charges", 
+ "owner": "Administrator", 
  "permissions": []
-}
+}
\ No newline at end of file
diff --git a/erpnext/accounts/print_format/pos_invoice/pos_invoice.json b/erpnext/accounts/print_format/pos_invoice/pos_invoice.json
index 51ac7cc..fcda513 100644
--- a/erpnext/accounts/print_format/pos_invoice/pos_invoice.json
+++ b/erpnext/accounts/print_format/pos_invoice/pos_invoice.json
@@ -3,9 +3,9 @@
  "doc_type": "Sales Invoice",
  "docstatus": 0,
  "doctype": "Print Format",
- "html": "<style>\n\t.print-format table, .print-format tr, \n\t.print-format td, .print-format div, .print-format p {\n\t\tfont-family: Monospace;\n\t\tline-height: 200%;\n\t\tvertical-align: middle;\n\t}\n\t@media screen {\n\t\t.print-format {\n\t\t\twidth: 4in;\n\t\t\tpadding: 0.25in;\n\t\t\tmin-height: 8in;\n\t\t}\n\t}\n</style>\n\n<p class=\"text-center\">\n\t{{ doc.company }}<br>\n\t{{ doc.select_print_heading or _(\"Invoice\") }}<br>\n</p>\n<p>\n\t<b>{{ _(\"Receipt No\") }}:</b> {{ doc.name }}<br>\n\t<b>{{ _(\"Date\") }}:</b> {{ doc.get_formatted(\"posting_date\") }}<br>\n\t<b>{{ _(\"Customer\") }}:</b> {{ doc.customer_name }}\n</p>\n\n<hr>\n<table class=\"table table-condensed cart no-border\">\n\t<thead>\n\t\t<tr>\n\t\t\t<th width=\"60%\">{{ _(\"Item\") }}</b></th>\n\t\t\t<th width=\"10%\" class=\"text-right\">{{ _(\"Qty\") }}</th>\n\t\t\t<th width=\"30%\" class=\"text-right\">{{ _(\"Rate\") }}</th>\n\t\t</tr>\n\t</thead>\n\t<tbody>\n\t\t{%- for item in doc.items -%}\n\t\t<tr>\n\t\t\t<td>\n\t\t\t\t{{ item.item_code }}\n\t\t\t\t{%- if item.item_name != item.item_code -%}\n\t\t\t\t\t<br>{{ item.item_name }}{%- endif -%}\n\t\t\t</td>\n\t\t\t<td class=\"text-right\">{{ item.qty }}</td>\n\t\t\t<td class=\"text-right\">{{ item.amount }}</td>\n\t\t</tr>\n\t\t{%- endfor -%}\n\t</tbody>\n</table>\n<table class=\"table table-condensed no-border\">\n\t<tbody>\n\t\t<tr>\n\t\t\t<td class=\"text-right\" style=\"width: 70%\">\n\t\t\t\t{{ _(\"Net Total\") }}\n\t\t\t</td>\n\t\t\t<td class=\"text-right\">\n\t\t\t\t{{ doc.get_formatted(\"net_total_export\") }}\n\t\t\t</td>\n\t\t</tr>\n\t\t{%- for row in doc.taxes -%}\n\t\t{%- if not row.included_in_print_rate -%}\n\t\t<tr>\n\t\t\t<td class=\"text-right\" style=\"width: 70%\">\n\t\t\t\t{{ row.description }}\n\t\t\t</td>\n\t\t\t<td class=\"text-right\">\n\t\t\t\t{{ row.get_formatted(\"tax_amount\", doc) }}\n\t\t\t</td>\n\t\t</tr>\n\t\t{%- endif -%}\n\t\t{%- endfor -%}\n\t\t{%- if doc.discount_amount -%}\n\t\t<tr>\n\t\t\t<td class=\"text-right\" style=\"width: 70%\">\n\t\t\t\t{{ _(\"Discount\") }}\n\t\t\t</td>\n\t\t\t<td class=\"text-right\">\n\t\t\t\t{{ doc.get_formatted(\"discount_amount\") }}\n\t\t\t</td>\n\t\t</tr>\n\t\t{%- endif -%}\n\t\t<tr>\n\t\t\t<td class=\"text-right\" style=\"width: 70%\">\n\t\t\t\t<b>{{ _(\"Grand Total\") }}</b>\n\t\t\t</td>\n\t\t\t<td class=\"text-right\">\n\t\t\t\t{{ doc.get_formatted(\"grand_total_export\") }}\n\t\t\t</td>\n\t\t</tr>\n\t</tbody>\n</table>\n{% if doc.get(\"taxes\", filters={\"included_in_print_rate\": 1}) %}\n<hr>\n<p><b>Taxes Included:</b></p>\n<table class=\"table table-condensed no-border\">\n\t<tbody>\n\t\t{%- for row in doc.taxes -%}\n\t\t{%- if row.included_in_print_rate -%}\n\t\t<tr>\n\t\t\t<td class=\"text-right\" style=\"width: 70%\">\n\t\t\t\t{{ row.description }}\n\t\t\t</td>\n\t\t\t<td class=\"text-right\">\n\t\t\t\t{{ row.get_formatted(\"tax_amount\", doc) }}\n\t\t\t</td>\n\t\t<tr>\n\t\t{%- endif -%}\n\t\t{%- endfor -%}\n\t</tbody>\n</table>\n{%- endif -%}\n<hr>\n<p>{{ doc.terms or \"\" }}</p>\n<p class=\"text-center\">{{ _(\"Thank you, please visit again.\") }}</p>",
+ "html": "<style>\n\t.print-format table, .print-format tr, \n\t.print-format td, .print-format div, .print-format p {\n\t\tfont-family: Monospace;\n\t\tline-height: 200%;\n\t\tvertical-align: middle;\n\t}\n\t@media screen {\n\t\t.print-format {\n\t\t\twidth: 4in;\n\t\t\tpadding: 0.25in;\n\t\t\tmin-height: 8in;\n\t\t}\n\t}\n</style>\n\n<p class=\"text-center\">\n\t{{ doc.company }}<br>\n\t{{ doc.select_print_heading or _(\"Invoice\") }}<br>\n</p>\n<p>\n\t<b>{{ _(\"Receipt No\") }}:</b> {{ doc.name }}<br>\n\t<b>{{ _(\"Date\") }}:</b> {{ doc.get_formatted(\"posting_date\") }}<br>\n\t<b>{{ _(\"Customer\") }}:</b> {{ doc.customer_name }}\n</p>\n\n<hr>\n<table class=\"table table-condensed cart no-border\">\n\t<thead>\n\t\t<tr>\n\t\t\t<th width=\"60%\">{{ _(\"Item\") }}</b></th>\n\t\t\t<th width=\"10%\" class=\"text-right\">{{ _(\"Qty\") }}</th>\n\t\t\t<th width=\"30%\" class=\"text-right\">{{ _(\"Rate\") }}</th>\n\t\t</tr>\n\t</thead>\n\t<tbody>\n\t\t{%- for item in doc.items -%}\n\t\t<tr>\n\t\t\t<td>\n\t\t\t\t{{ item.item_code }}\n\t\t\t\t{%- if item.item_name != item.item_code -%}\n\t\t\t\t\t<br>{{ item.item_name }}{%- endif -%}\n\t\t\t</td>\n\t\t\t<td class=\"text-right\">{{ item.qty }}</td>\n\t\t\t<td class=\"text-right\">{{ item.amount }}</td>\n\t\t</tr>\n\t\t{%- endfor -%}\n\t</tbody>\n</table>\n<table class=\"table table-condensed no-border\">\n\t<tbody>\n\t\t<tr>\n\t\t\t<td class=\"text-right\" style=\"width: 70%\">\n\t\t\t\t{{ _(\"Net Total\") }}\n\t\t\t</td>\n\t\t\t<td class=\"text-right\">\n\t\t\t\t{{ doc.get_formatted(\"net_total_export\") }}\n\t\t\t</td>\n\t\t</tr>\n\t\t{%- for row in doc.taxes -%}\n\t\t{%- if not row.included_in_print_rate -%}\n\t\t<tr>\n\t\t\t<td class=\"text-right\" style=\"width: 70%\">\n\t\t\t\t{{ row.description }}\n\t\t\t</td>\n\t\t\t<td class=\"text-right\">\n\t\t\t\t{{ row.get_formatted(\"tax_amount\", doc) }}\n\t\t\t</td>\n\t\t</tr>\n\t\t{%- endif -%}\n\t\t{%- endfor -%}\n\t\t{%- if doc.discount_amount -%}\n\t\t<tr>\n\t\t\t<td class=\"text-right\" style=\"width: 70%\">\n\t\t\t\t{{ _(\"Discount\") }}\n\t\t\t</td>\n\t\t\t<td class=\"text-right\">\n\t\t\t\t{{ doc.get_formatted(\"discount_amount\") }}\n\t\t\t</td>\n\t\t</tr>\n\t\t{%- endif -%}\n\t\t<tr>\n\t\t\t<td class=\"text-right\" style=\"width: 70%\">\n\t\t\t\t<b>{{ _(\"Grand Total\") }}</b>\n\t\t\t</td>\n\t\t\t<td class=\"text-right\">\n\t\t\t\t{{ doc.get_formatted(\"grand_total_export\") }}\n\t\t\t</td>\n\t\t</tr>\n\t</tbody>\n</table>\n{% if doc.get(\"taxes\", filters={\"included_in_print_rate\": 1}) %}\n<hr>\n<p><b>Taxes Included:</b></p>\n<table class=\"table table-condensed no-border\">\n\t<tbody>\n\t\t{%- for row in doc.taxes -%}\n\t\t{%- if row.included_in_print_rate -%}\n\t\t<tr>\n\t\t\t<td class=\"text-right\" style=\"width: 70%\">\n\t\t\t\t{{ row.description }}\n\t\t\t</td>\n\t\t\t<td class=\"text-right\">\n\t\t\t\t{{ row.get_formatted(\"tax_amount_after_discount_amount\", doc) }}\n\t\t\t</td>\n\t\t<tr>\n\t\t{%- endif -%}\n\t\t{%- endfor -%}\n\t</tbody>\n</table>\n{%- endif -%}\n<hr>\n<p>{{ doc.terms or \"\" }}</p>\n<p class=\"text-center\">{{ _(\"Thank you, please visit again.\") }}</p>",
  "idx": 1,
- "modified": "2014-12-25 02:08:26.603223",
+ "modified": "2014-12-26 02:08:26.603223",
  "modified_by": "Administrator",
  "module": "Accounts",
  "name": "POS Invoice",
diff --git a/erpnext/buying/doctype/purchase_common/purchase_common.js b/erpnext/buying/doctype/purchase_common/purchase_common.js
index abe2f39..27d7bc8 100644
--- a/erpnext/buying/doctype/purchase_common/purchase_common.js
+++ b/erpnext/buying/doctype/purchase_common/purchase_common.js
@@ -68,7 +68,7 @@
 	},
 
 	contact_person: function() {
-		this.supplier_address();
+		erpnext.utils.get_contact_details(this.frm);
 	},
 
 	buying_price_list: function() {
diff --git a/erpnext/buying/doctype/purchase_order/purchase_order.json b/erpnext/buying/doctype/purchase_order/purchase_order.json
index b2abc90..8c4f80c 100644
--- a/erpnext/buying/doctype/purchase_order/purchase_order.json
+++ b/erpnext/buying/doctype/purchase_order/purchase_order.json
@@ -1,847 +1,850 @@
 {
- "allow_import": 1, 
- "autoname": "naming_series:", 
- "creation": "2013-05-21 16:16:39", 
- "docstatus": 0, 
- "doctype": "DocType", 
- "document_type": "Transaction", 
+ "allow_import": 1,
+ "autoname": "naming_series:",
+ "creation": "2013-05-21 16:16:39",
+ "docstatus": 0,
+ "doctype": "DocType",
+ "document_type": "Transaction",
  "fields": [
   {
-   "fieldname": "supplier_section", 
-   "fieldtype": "Section Break", 
-   "label": "Supplier", 
-   "options": "icon-user", 
+   "fieldname": "supplier_section",
+   "fieldtype": "Section Break",
+   "label": "Supplier",
+   "options": "icon-user",
    "permlevel": 0
-  }, 
+  },
   {
-   "fieldname": "naming_series", 
-   "fieldtype": "Select", 
-   "label": "Series", 
-   "no_copy": 1, 
-   "oldfieldname": "naming_series", 
-   "oldfieldtype": "Select", 
-   "options": "PO-", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "fieldname": "naming_series",
+   "fieldtype": "Select",
+   "label": "Series",
+   "no_copy": 1,
+   "oldfieldname": "naming_series",
+   "oldfieldtype": "Select",
+   "options": "PO-",
+   "permlevel": 0,
+   "print_hide": 1,
    "reqd": 1
-  }, 
+  },
   {
-   "description": "Supplier (vendor) name as entered in supplier master", 
-   "fieldname": "supplier", 
-   "fieldtype": "Link", 
-   "in_filter": 1, 
-   "label": "Supplier", 
-   "oldfieldname": "supplier", 
-   "oldfieldtype": "Link", 
-   "options": "Supplier", 
-   "permlevel": 0, 
-   "print_hide": 1, 
-   "reqd": 1, 
+   "description": "Supplier (vendor) name as entered in supplier master",
+   "fieldname": "supplier",
+   "fieldtype": "Link",
+   "in_filter": 1,
+   "label": "Supplier",
+   "oldfieldname": "supplier",
+   "oldfieldtype": "Link",
+   "options": "Supplier",
+   "permlevel": 0,
+   "print_hide": 1,
+   "reqd": 1,
    "search_index": 1
-  }, 
+  },
   {
-   "fieldname": "supplier_name", 
-   "fieldtype": "Data", 
-   "hidden": 0, 
-   "in_list_view": 1, 
-   "label": "Name", 
-   "permlevel": 0, 
+   "fieldname": "supplier_name",
+   "fieldtype": "Data",
+   "hidden": 0,
+   "in_list_view": 1,
+   "label": "Name",
+   "permlevel": 0,
    "read_only": 1
-  }, 
+  },
   {
-   "fieldname": "address_display", 
-   "fieldtype": "Small Text", 
-   "hidden": 1, 
-   "label": "Address", 
-   "permlevel": 0, 
+   "fieldname": "address_display",
+   "fieldtype": "Small Text",
+   "hidden": 1,
+   "label": "Address",
+   "permlevel": 0,
    "read_only": 1
-  }, 
+  },
   {
-   "fieldname": "contact_display", 
-   "fieldtype": "Small Text", 
-   "hidden": 1, 
-   "label": "Contact", 
-   "permlevel": 0, 
+   "fieldname": "contact_display",
+   "fieldtype": "Small Text",
+   "hidden": 1,
+   "label": "Contact",
+   "permlevel": 0,
    "read_only": 1
-  }, 
+  },
   {
-   "fieldname": "contact_mobile", 
-   "fieldtype": "Small Text", 
-   "hidden": 1, 
-   "label": "Mobile No", 
-   "permlevel": 0, 
+   "fieldname": "contact_mobile",
+   "fieldtype": "Small Text",
+   "hidden": 1,
+   "label": "Mobile No",
+   "permlevel": 0,
    "read_only": 1
-  }, 
+  },
   {
-   "fieldname": "contact_email", 
-   "fieldtype": "Small Text", 
-   "hidden": 1, 
-   "label": "Contact Email", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "fieldname": "contact_email",
+   "fieldtype": "Small Text",
+   "hidden": 1,
+   "label": "Contact Email",
+   "permlevel": 0,
+   "print_hide": 1,
    "read_only": 1
-  }, 
+  },
   {
-   "fieldname": "column_break1", 
-   "fieldtype": "Column Break", 
-   "oldfieldtype": "Column Break", 
-   "permlevel": 0, 
-   "print_hide": 0, 
-   "print_width": "50%", 
+   "fieldname": "column_break1",
+   "fieldtype": "Column Break",
+   "oldfieldtype": "Column Break",
+   "permlevel": 0,
+   "print_hide": 0,
+   "print_width": "50%",
    "width": "50%"
-  }, 
+  },
   {
-   "fieldname": "transaction_date", 
-   "fieldtype": "Date", 
-   "in_filter": 1, 
-   "label": "Date", 
-   "oldfieldname": "transaction_date", 
-   "oldfieldtype": "Date", 
-   "permlevel": 0, 
-   "reqd": 1, 
+   "fieldname": "transaction_date",
+   "fieldtype": "Date",
+   "in_filter": 1,
+   "label": "Date",
+   "oldfieldname": "transaction_date",
+   "oldfieldtype": "Date",
+   "permlevel": 0,
+   "reqd": 1,
    "search_index": 1
-  }, 
+  },
   {
-   "fieldname": "amended_from", 
-   "fieldtype": "Link", 
-   "hidden": 0, 
-   "ignore_user_permissions": 1, 
-   "label": "Amended From", 
-   "no_copy": 1, 
-   "oldfieldname": "amended_from", 
-   "oldfieldtype": "Data", 
-   "options": "Purchase Order", 
-   "permlevel": 0, 
-   "print_hide": 1, 
-   "read_only": 1, 
+   "fieldname": "amended_from",
+   "fieldtype": "Link",
+   "hidden": 0,
+   "ignore_user_permissions": 1,
+   "label": "Amended From",
+   "no_copy": 1,
+   "oldfieldname": "amended_from",
+   "oldfieldtype": "Data",
+   "options": "Purchase Order",
+   "permlevel": 0,
+   "print_hide": 1,
+   "read_only": 1,
    "report_hide": 0
-  }, 
+  },
   {
-   "description": "Select the relevant company name if you have multiple companies", 
-   "fieldname": "company", 
-   "fieldtype": "Link", 
-   "in_filter": 1, 
-   "label": "Company", 
-   "no_copy": 0, 
-   "oldfieldname": "company", 
-   "oldfieldtype": "Link", 
-   "options": "Company", 
-   "permlevel": 0, 
-   "print_hide": 1, 
-   "reqd": 1, 
+   "description": "Select the relevant company name if you have multiple companies",
+   "fieldname": "company",
+   "fieldtype": "Link",
+   "in_filter": 1,
+   "label": "Company",
+   "no_copy": 0,
+   "oldfieldname": "company",
+   "oldfieldtype": "Link",
+   "options": "Company",
+   "permlevel": 0,
+   "print_hide": 1,
+   "reqd": 1,
    "search_index": 1
-  }, 
+  },
   {
-   "fieldname": "price_list_and_currency", 
-   "fieldtype": "Section Break", 
-   "label": "Currency and Price List", 
-   "options": "icon-tag", 
+   "fieldname": "price_list_and_currency",
+   "fieldtype": "Section Break",
+   "label": "Currency and Price List",
+   "options": "icon-tag",
    "permlevel": 0
-  }, 
+  },
   {
-   "fieldname": "cb_currency", 
-   "fieldtype": "Column Break", 
+   "fieldname": "cb_currency",
+   "fieldtype": "Column Break",
    "permlevel": 0
-  }, 
+  },
   {
-   "fieldname": "currency", 
-   "fieldtype": "Link", 
-   "label": "Currency", 
-   "no_copy": 0, 
-   "oldfieldname": "currency", 
-   "oldfieldtype": "Select", 
-   "options": "Currency", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "fieldname": "currency",
+   "fieldtype": "Link",
+   "label": "Currency",
+   "no_copy": 0,
+   "oldfieldname": "currency",
+   "oldfieldtype": "Select",
+   "options": "Currency",
+   "permlevel": 0,
+   "print_hide": 1,
    "reqd": 1
-  }, 
+  },
   {
-   "description": "Rate at which supplier's currency is converted to company's base currency", 
-   "fieldname": "conversion_rate", 
-   "fieldtype": "Float", 
-   "hidden": 0, 
-   "label": "Exchange Rate", 
-   "no_copy": 0, 
-   "oldfieldname": "conversion_rate", 
-   "oldfieldtype": "Currency", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "description": "Rate at which supplier's currency is converted to company's base currency",
+   "fieldname": "conversion_rate",
+   "fieldtype": "Float",
+   "hidden": 0,
+   "label": "Exchange Rate",
+   "no_copy": 0,
+   "oldfieldname": "conversion_rate",
+   "oldfieldtype": "Currency",
+   "permlevel": 0,
+   "print_hide": 1,
    "reqd": 1
-  }, 
+  },
   {
-   "fieldname": "cb_price_list", 
-   "fieldtype": "Column Break", 
+   "fieldname": "cb_price_list",
+   "fieldtype": "Column Break",
    "permlevel": 0
-  }, 
+  },
   {
-   "fieldname": "buying_price_list", 
-   "fieldtype": "Link", 
-   "label": "Price List", 
-   "options": "Price List", 
-   "permlevel": 0, 
+   "fieldname": "buying_price_list",
+   "fieldtype": "Link",
+   "label": "Price List",
+   "options": "Price List",
+   "permlevel": 0,
    "print_hide": 1
-  }, 
+  },
   {
-   "fieldname": "price_list_currency", 
-   "fieldtype": "Link", 
-   "label": "Price List Currency", 
-   "options": "Currency", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "fieldname": "price_list_currency",
+   "fieldtype": "Link",
+   "label": "Price List Currency",
+   "options": "Currency",
+   "permlevel": 0,
+   "print_hide": 1,
    "read_only": 1
-  }, 
+  },
   {
-   "fieldname": "plc_conversion_rate", 
-   "fieldtype": "Float", 
-   "label": "Price List Exchange Rate", 
-   "permlevel": 0, 
+   "fieldname": "plc_conversion_rate",
+   "fieldtype": "Float",
+   "label": "Price List Exchange Rate",
+   "permlevel": 0,
    "print_hide": 1
-  }, 
+  },
   {
-   "fieldname": "ignore_pricing_rule", 
-   "fieldtype": "Check", 
-   "label": "Ignore Pricing Rule", 
-   "no_copy": 1, 
-   "permlevel": 1, 
+   "fieldname": "ignore_pricing_rule",
+   "fieldtype": "Check",
+   "label": "Ignore Pricing Rule",
+   "no_copy": 1,
+   "permlevel": 1,
    "print_hide": 1
-  }, 
+  },
   {
-   "fieldname": "items_section", 
-   "fieldtype": "Section Break", 
-   "label": "Items", 
-   "oldfieldtype": "Section Break", 
-   "options": "icon-shopping-cart", 
+   "fieldname": "items_section",
+   "fieldtype": "Section Break",
+   "label": "Items",
+   "oldfieldtype": "Section Break",
+   "options": "icon-shopping-cart",
    "permlevel": 0
-  }, 
+  },
   {
-   "allow_on_submit": 1, 
-   "fieldname": "items", 
-   "fieldtype": "Table", 
-   "label": "Items", 
-   "no_copy": 0, 
-   "oldfieldname": "po_details", 
-   "oldfieldtype": "Table", 
-   "options": "Purchase Order Item", 
+   "allow_on_submit": 1,
+   "fieldname": "items",
+   "fieldtype": "Table",
+   "label": "Items",
+   "no_copy": 0,
+   "oldfieldname": "po_details",
+   "oldfieldtype": "Table",
+   "options": "Purchase Order Item",
    "permlevel": 0
-  }, 
+  },
   {
-   "fieldname": "sb_last_purchase", 
-   "fieldtype": "Section Break", 
+   "fieldname": "sb_last_purchase",
+   "fieldtype": "Section Break",
    "permlevel": 0
-  }, 
+  },
   {
-   "fieldname": "net_total", 
-   "fieldtype": "Currency", 
-   "label": "Net Total (Company Currency)", 
-   "no_copy": 1, 
-   "oldfieldname": "net_total", 
-   "oldfieldtype": "Currency", 
-   "options": "Company:company:default_currency", 
-   "permlevel": 0, 
-   "print_hide": 1, 
-   "read_only": 1, 
+   "fieldname": "net_total",
+   "fieldtype": "Currency",
+   "label": "Net Total (Company Currency)",
+   "no_copy": 1,
+   "oldfieldname": "net_total",
+   "oldfieldtype": "Currency",
+   "options": "Company:company:default_currency",
+   "permlevel": 0,
+   "print_hide": 1,
+   "read_only": 1,
    "reqd": 0
-  }, 
+  },
   {
-   "fieldname": "column_break_26", 
-   "fieldtype": "Column Break", 
+   "fieldname": "column_break_26",
+   "fieldtype": "Column Break",
    "permlevel": 0
-  }, 
+  },
   {
-   "fieldname": "net_total_import", 
-   "fieldtype": "Currency", 
-   "label": "Net Total", 
-   "no_copy": 0, 
-   "oldfieldname": "net_total_import", 
-   "oldfieldtype": "Currency", 
-   "options": "currency", 
-   "permlevel": 0, 
-   "print_hide": 0, 
+   "fieldname": "net_total_import",
+   "fieldtype": "Currency",
+   "label": "Net Total",
+   "no_copy": 0,
+   "oldfieldname": "net_total_import",
+   "oldfieldtype": "Currency",
+   "options": "currency",
+   "permlevel": 0,
+   "print_hide": 0,
    "read_only": 1
-  }, 
+  },
   {
-   "fieldname": "get_last_purchase_rate", 
-   "fieldtype": "Button", 
-   "label": "Get Last Purchase Rate", 
-   "oldfieldtype": "Button", 
-   "permlevel": 0, 
+   "fieldname": "get_last_purchase_rate",
+   "fieldtype": "Button",
+   "label": "Get Last Purchase Rate",
+   "oldfieldtype": "Button",
+   "permlevel": 0,
    "print_hide": 0
-  }, 
+  },
   {
-   "fieldname": "taxes_section", 
-   "fieldtype": "Section Break", 
-   "label": "Taxes and Charges", 
-   "oldfieldtype": "Section Break", 
-   "options": "icon-money", 
-   "permlevel": 0, 
+   "fieldname": "taxes_section",
+   "fieldtype": "Section Break",
+   "label": "Taxes and Charges",
+   "oldfieldtype": "Section Break",
+   "options": "icon-money",
+   "permlevel": 0,
    "print_hide": 0
-  }, 
+  },
   {
-   "description": "If you have created a standard template in Purchase Taxes and Charges Master, select one and click on the button below.", 
-   "fieldname": "taxes_and_charges", 
-   "fieldtype": "Link", 
-   "label": "Taxes and Charges", 
-   "no_copy": 0, 
-   "oldfieldname": "purchase_other_charges", 
-   "oldfieldtype": "Link", 
-   "options": "Purchase Taxes and Charges Master", 
-   "permlevel": 0, 
+   "description": "If you have created a standard template in Purchase Taxes and Charges Master, select one and click on the button below.",
+   "fieldname": "taxes_and_charges",
+   "fieldtype": "Link",
+   "label": "Taxes and Charges",
+   "no_copy": 0,
+   "oldfieldname": "purchase_other_charges",
+   "oldfieldtype": "Link",
+   "options": "Purchase Taxes and Charges Master",
+   "permlevel": 0,
    "print_hide": 1
-  }, 
+  },
   {
-   "fieldname": "taxes", 
-   "fieldtype": "Table", 
-   "label": "Purchase Taxes and Charges", 
-   "no_copy": 0, 
-   "oldfieldname": "purchase_tax_details", 
-   "oldfieldtype": "Table", 
-   "options": "Purchase Taxes and Charges", 
+   "fieldname": "taxes",
+   "fieldtype": "Table",
+   "label": "Purchase Taxes and Charges",
+   "no_copy": 0,
+   "oldfieldname": "purchase_tax_details",
+   "oldfieldtype": "Table",
+   "options": "Purchase Taxes and Charges",
    "permlevel": 0
-  }, 
+  },
   {
-   "fieldname": "other_charges_calculation", 
-   "fieldtype": "HTML", 
-   "label": "Taxes and Charges Calculation", 
-   "no_copy": 1, 
-   "oldfieldtype": "HTML", 
-   "permlevel": 0, 
+   "fieldname": "other_charges_calculation",
+   "fieldtype": "HTML",
+   "label": "Taxes and Charges Calculation",
+   "no_copy": 1,
+   "oldfieldtype": "HTML",
+   "permlevel": 0,
    "print_hide": 1
-  }, 
+  },
   {
-   "fieldname": "totals", 
-   "fieldtype": "Section Break", 
-   "label": "Totals", 
-   "oldfieldtype": "Section Break", 
-   "options": "icon-money", 
+   "fieldname": "totals",
+   "fieldtype": "Section Break",
+   "label": "Totals",
+   "oldfieldtype": "Section Break",
+   "options": "icon-money",
    "permlevel": 0
-  }, 
+  },
   {
-   "fieldname": "other_charges_added", 
-   "fieldtype": "Currency", 
-   "label": "Taxes and Charges Added (Company Currency)", 
-   "no_copy": 0, 
-   "oldfieldname": "other_charges_added", 
-   "oldfieldtype": "Currency", 
-   "options": "Company:company:default_currency", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "fieldname": "other_charges_added",
+   "fieldtype": "Currency",
+   "label": "Taxes and Charges Added (Company Currency)",
+   "no_copy": 0,
+   "oldfieldname": "other_charges_added",
+   "oldfieldtype": "Currency",
+   "options": "Company:company:default_currency",
+   "permlevel": 0,
+   "print_hide": 1,
    "read_only": 1
-  }, 
+  },
   {
-   "fieldname": "other_charges_deducted", 
-   "fieldtype": "Currency", 
-   "label": "Taxes and Charges Deducted (Company Currency)", 
-   "no_copy": 0, 
-   "oldfieldname": "other_charges_deducted", 
-   "oldfieldtype": "Currency", 
-   "options": "Company:company:default_currency", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "fieldname": "other_charges_deducted",
+   "fieldtype": "Currency",
+   "label": "Taxes and Charges Deducted (Company Currency)",
+   "no_copy": 0,
+   "oldfieldname": "other_charges_deducted",
+   "oldfieldtype": "Currency",
+   "options": "Company:company:default_currency",
+   "permlevel": 0,
+   "print_hide": 1,
    "read_only": 1
-  }, 
+  },
   {
-   "fieldname": "total_tax", 
-   "fieldtype": "Currency", 
-   "label": "Total Tax (Company Currency)", 
-   "no_copy": 1, 
-   "oldfieldname": "total_tax", 
-   "oldfieldtype": "Currency", 
-   "options": "Company:company:default_currency", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "fieldname": "total_tax",
+   "fieldtype": "Currency",
+   "label": "Total Tax (Company Currency)",
+   "no_copy": 1,
+   "oldfieldname": "total_tax",
+   "oldfieldtype": "Currency",
+   "options": "Company:company:default_currency",
+   "permlevel": 0,
+   "print_hide": 1,
    "read_only": 1
-  }, 
+  },
   {
-   "fieldname": "grand_total", 
-   "fieldtype": "Currency", 
-   "label": "Grand Total (Company Currency)", 
-   "no_copy": 1, 
-   "oldfieldname": "grand_total", 
-   "oldfieldtype": "Currency", 
-   "options": "Company:company:default_currency", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "fieldname": "grand_total",
+   "fieldtype": "Currency",
+   "label": "Grand Total (Company Currency)",
+   "no_copy": 1,
+   "oldfieldname": "grand_total",
+   "oldfieldtype": "Currency",
+   "options": "Company:company:default_currency",
+   "permlevel": 0,
+   "print_hide": 1,
    "read_only": 1
-  }, 
+  },
   {
-   "description": "In Words will be visible once you save the Purchase Order.", 
-   "fieldname": "in_words", 
-   "fieldtype": "Data", 
-   "label": "In Words (Company Currency)", 
-   "oldfieldname": "in_words", 
-   "oldfieldtype": "Data", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "description": "In Words will be visible once you save the Purchase Order.",
+   "fieldname": "in_words",
+   "fieldtype": "Data",
+   "label": "In Words (Company Currency)",
+   "oldfieldname": "in_words",
+   "oldfieldtype": "Data",
+   "permlevel": 0,
+   "print_hide": 1,
    "read_only": 1
-  }, 
+  },
   {
-   "fieldname": "rounded_total", 
-   "fieldtype": "Currency", 
-   "label": "Rounded Total (Company Currency)", 
-   "oldfieldname": "rounded_total", 
-   "oldfieldtype": "Currency", 
-   "options": "Company:company:default_currency", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "fieldname": "rounded_total",
+   "fieldtype": "Currency",
+   "label": "Rounded Total (Company Currency)",
+   "oldfieldname": "rounded_total",
+   "oldfieldtype": "Currency",
+   "options": "Company:company:default_currency",
+   "permlevel": 0,
+   "print_hide": 1,
    "read_only": 1
-  }, 
+  },
   {
-   "fieldname": "advance_paid", 
-   "fieldtype": "Currency", 
-   "label": "Advance Paid", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "fieldname": "advance_paid",
+   "fieldtype": "Currency",
+   "label": "Advance Paid",
+   "permlevel": 0,
+   "print_hide": 1,
    "read_only": 1
-  }, 
+  },
   {
-   "fieldname": "column_break4", 
-   "fieldtype": "Column Break", 
-   "oldfieldtype": "Column Break", 
-   "permlevel": 0, 
+   "fieldname": "column_break4",
+   "fieldtype": "Column Break",
+   "oldfieldtype": "Column Break",
+   "permlevel": 0,
    "print_hide": 0
-  }, 
+  },
   {
-   "fieldname": "other_charges_added_import", 
-   "fieldtype": "Currency", 
-   "label": "Taxes and Charges Added", 
-   "no_copy": 0, 
-   "oldfieldname": "other_charges_added_import", 
-   "oldfieldtype": "Currency", 
-   "options": "currency", 
-   "permlevel": 0, 
-   "print_hide": 1, 
-   "read_only": 1, 
+   "fieldname": "other_charges_added_import",
+   "fieldtype": "Currency",
+   "label": "Taxes and Charges Added",
+   "no_copy": 0,
+   "oldfieldname": "other_charges_added_import",
+   "oldfieldtype": "Currency",
+   "options": "currency",
+   "permlevel": 0,
+   "print_hide": 1,
+   "read_only": 1,
    "report_hide": 0
-  }, 
+  },
   {
-   "fieldname": "other_charges_deducted_import", 
-   "fieldtype": "Currency", 
-   "label": "Taxes and Charges Deducted", 
-   "no_copy": 0, 
-   "oldfieldname": "other_charges_deducted_import", 
-   "oldfieldtype": "Currency", 
-   "options": "currency", 
-   "permlevel": 0, 
-   "print_hide": 1, 
-   "read_only": 1, 
+   "fieldname": "other_charges_deducted_import",
+   "fieldtype": "Currency",
+   "label": "Taxes and Charges Deducted",
+   "no_copy": 0,
+   "oldfieldname": "other_charges_deducted_import",
+   "oldfieldtype": "Currency",
+   "options": "currency",
+   "permlevel": 0,
+   "print_hide": 1,
+   "read_only": 1,
    "report_hide": 0
-  }, 
+  },
   {
-   "fieldname": "grand_total_import", 
-   "fieldtype": "Currency", 
-   "in_list_view": 1, 
-   "label": "Grand Total", 
-   "no_copy": 0, 
-   "oldfieldname": "grand_total_import", 
-   "oldfieldtype": "Currency", 
-   "options": "currency", 
-   "permlevel": 0, 
-   "print_hide": 0, 
-   "read_only": 1, 
+   "fieldname": "grand_total_import",
+   "fieldtype": "Currency",
+   "in_list_view": 1,
+   "label": "Grand Total",
+   "no_copy": 0,
+   "oldfieldname": "grand_total_import",
+   "oldfieldtype": "Currency",
+   "options": "currency",
+   "permlevel": 0,
+   "print_hide": 0,
+   "read_only": 1,
    "report_hide": 0
-  }, 
+  },
   {
-   "fieldname": "in_words_import", 
-   "fieldtype": "Data", 
-   "label": "In Words", 
-   "oldfieldname": "in_words_import", 
-   "oldfieldtype": "Data", 
-   "permlevel": 0, 
-   "print_hide": 0, 
+   "fieldname": "in_words_import",
+   "fieldtype": "Data",
+   "label": "In Words",
+   "oldfieldname": "in_words_import",
+   "oldfieldtype": "Data",
+   "permlevel": 0,
+   "print_hide": 0,
    "read_only": 1
-  }, 
+  },
   {
-   "fieldname": "fold", 
-   "fieldtype": "Fold", 
+   "fieldname": "fold",
+   "fieldtype": "Fold",
    "permlevel": 0
-  }, 
+  },
   {
-   "fieldname": "terms_section_break", 
-   "fieldtype": "Section Break", 
-   "label": "Terms and Conditions", 
-   "oldfieldtype": "Section Break", 
-   "options": "icon-legal", 
+   "fieldname": "terms_section_break",
+   "fieldtype": "Section Break",
+   "label": "Terms and Conditions",
+   "oldfieldtype": "Section Break",
+   "options": "icon-legal",
    "permlevel": 0
-  }, 
+  },
   {
-   "fieldname": "tc_name", 
-   "fieldtype": "Link", 
-   "label": "Terms", 
-   "oldfieldname": "tc_name", 
-   "oldfieldtype": "Link", 
-   "options": "Terms and Conditions", 
-   "permlevel": 0, 
+   "fieldname": "tc_name",
+   "fieldtype": "Link",
+   "label": "Terms",
+   "oldfieldname": "tc_name",
+   "oldfieldtype": "Link",
+   "options": "Terms and Conditions",
+   "permlevel": 0,
    "print_hide": 1
-  }, 
+  },
   {
-   "fieldname": "terms", 
-   "fieldtype": "Text Editor", 
-   "label": "Terms and Conditions", 
-   "oldfieldname": "terms", 
-   "oldfieldtype": "Text Editor", 
+   "fieldname": "terms",
+   "fieldtype": "Text Editor",
+   "label": "Terms and Conditions",
+   "oldfieldname": "terms",
+   "oldfieldtype": "Text Editor",
    "permlevel": 0
-  }, 
+  },
   {
-   "depends_on": "supplier", 
-   "fieldname": "contact_section", 
-   "fieldtype": "Section Break", 
-   "label": "Contact Info", 
-   "options": "icon-bullhorn", 
+   "depends_on": "supplier",
+   "fieldname": "contact_section",
+   "fieldtype": "Section Break",
+   "label": "Contact Info",
+   "options": "icon-bullhorn",
    "permlevel": 0
-  }, 
+  },
   {
-   "fieldname": "supplier_address", 
-   "fieldtype": "Link", 
-   "in_filter": 1, 
-   "label": "Supplier Address", 
-   "options": "Address", 
-   "permlevel": 0, 
+   "fieldname": "supplier_address",
+   "fieldtype": "Link",
+   "in_filter": 1,
+   "label": "Supplier Address",
+   "options": "Address",
+   "permlevel": 0,
    "print_hide": 1
-  }, 
+  },
   {
-   "fieldname": "cb_contact", 
-   "fieldtype": "Column Break", 
+   "fieldname": "cb_contact",
+   "fieldtype": "Column Break",
    "permlevel": 0
-  }, 
+  },
   {
-   "fieldname": "contact_person", 
-   "fieldtype": "Link", 
-   "in_filter": 1, 
-   "label": "Contact Person", 
-   "options": "Contact", 
-   "permlevel": 0, 
+   "fieldname": "contact_person",
+   "fieldtype": "Link",
+   "in_filter": 1,
+   "label": "Contact Person",
+   "options": "Contact",
+   "permlevel": 0,
    "print_hide": 1
-  }, 
+  },
   {
-   "fieldname": "more_info", 
-   "fieldtype": "Section Break", 
-   "label": "More Info", 
-   "oldfieldtype": "Section Break", 
+   "fieldname": "more_info",
+   "fieldtype": "Section Break",
+   "label": "More Info",
+   "oldfieldtype": "Section Break",
    "permlevel": 0
-  }, 
+  },
   {
-   "fieldname": "status", 
-   "fieldtype": "Select", 
-   "in_filter": 1, 
-   "label": "Status", 
-   "no_copy": 1, 
-   "oldfieldname": "status", 
-   "oldfieldtype": "Select", 
-   "options": "\nDraft\nSubmitted\nStopped\nCancelled", 
-   "permlevel": 0, 
-   "print_hide": 1, 
-   "read_only": 1, 
-   "reqd": 1, 
+   "fieldname": "status",
+   "fieldtype": "Select",
+   "in_filter": 1,
+   "label": "Status",
+   "no_copy": 1,
+   "oldfieldname": "status",
+   "oldfieldtype": "Select",
+   "options": "\nDraft\nSubmitted\nStopped\nCancelled",
+   "permlevel": 0,
+   "print_hide": 1,
+   "read_only": 1,
+   "reqd": 1,
    "search_index": 1
-  }, 
+  },
   {
-   "default": "No", 
-   "fieldname": "is_subcontracted", 
-   "fieldtype": "Select", 
-   "label": "Is Subcontracted", 
-   "options": "\nYes\nNo", 
-   "permlevel": 0, 
+   "default": "No",
+   "fieldname": "is_subcontracted",
+   "fieldtype": "Select",
+   "label": "Is Subcontracted",
+   "options": "\nYes\nNo",
+   "permlevel": 0,
    "print_hide": 1
-  }, 
+  },
   {
-   "fieldname": "ref_sq", 
-   "fieldtype": "Data", 
-   "hidden": 1, 
-   "label": "Ref SQ", 
-   "no_copy": 1, 
-   "oldfieldname": "ref_sq", 
-   "oldfieldtype": "Data", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "fieldname": "ref_sq",
+   "fieldtype": "Data",
+   "hidden": 1,
+   "label": "Ref SQ",
+   "no_copy": 1,
+   "oldfieldname": "ref_sq",
+   "oldfieldtype": "Data",
+   "permlevel": 0,
+   "print_hide": 1,
    "read_only": 1
-  }, 
+  },
   {
-   "allow_on_submit": 1, 
-   "fieldname": "letter_head", 
-   "fieldtype": "Link", 
-   "label": "Letter Head", 
-   "oldfieldname": "letter_head", 
-   "oldfieldtype": "Select", 
-   "options": "Letter Head", 
-   "permlevel": 0, 
+   "allow_on_submit": 1,
+   "fieldname": "letter_head",
+   "fieldtype": "Link",
+   "label": "Letter Head",
+   "oldfieldname": "letter_head",
+   "oldfieldtype": "Select",
+   "options": "Letter Head",
+   "permlevel": 0,
    "print_hide": 1
-  }, 
+  },
   {
-   "fieldname": "fiscal_year", 
-   "fieldtype": "Link", 
-   "in_filter": 1, 
-   "label": "Fiscal Year", 
-   "no_copy": 0, 
-   "oldfieldname": "fiscal_year", 
-   "oldfieldtype": "Select", 
-   "options": "Fiscal Year", 
-   "permlevel": 0, 
-   "print_hide": 1, 
-   "reqd": 1, 
+   "fieldname": "fiscal_year",
+   "fieldtype": "Link",
+   "in_filter": 1,
+   "label": "Fiscal Year",
+   "no_copy": 0,
+   "oldfieldname": "fiscal_year",
+   "oldfieldtype": "Select",
+   "options": "Fiscal Year",
+   "permlevel": 0,
+   "print_hide": 1,
+   "reqd": 1,
    "search_index": 1
-  }, 
+  },
   {
-   "allow_on_submit": 1, 
-   "fieldname": "select_print_heading", 
-   "fieldtype": "Link", 
-   "label": "Print Heading", 
-   "no_copy": 1, 
-   "oldfieldname": "select_print_heading", 
-   "oldfieldtype": "Link", 
-   "options": "Print Heading", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "allow_on_submit": 1,
+   "fieldname": "select_print_heading",
+   "fieldtype": "Link",
+   "label": "Print Heading",
+   "no_copy": 1,
+   "oldfieldname": "select_print_heading",
+   "oldfieldtype": "Link",
+   "options": "Print Heading",
+   "permlevel": 0,
+   "print_hide": 1,
    "report_hide": 1
-  }, 
+  },
   {
-   "fieldname": "column_break5", 
-   "fieldtype": "Column Break", 
-   "oldfieldtype": "Column Break", 
-   "permlevel": 0, 
-   "print_hide": 1, 
-   "print_width": "50%", 
+   "fieldname": "column_break5",
+   "fieldtype": "Column Break",
+   "oldfieldtype": "Column Break",
+   "permlevel": 0,
+   "print_hide": 1,
+   "print_width": "50%",
    "width": "50%"
-  }, 
+  },
   {
-   "depends_on": "eval:!doc.__islocal", 
-   "description": "% of materials received against this Purchase Order", 
-   "fieldname": "per_received", 
-   "fieldtype": "Percent", 
-   "in_list_view": 1, 
-   "label": "% Received", 
-   "no_copy": 1, 
-   "oldfieldname": "per_received", 
-   "oldfieldtype": "Currency", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "depends_on": "eval:!doc.__islocal",
+   "description": "% of materials received against this Purchase Order",
+   "fieldname": "per_received",
+   "fieldtype": "Percent",
+   "in_list_view": 1,
+   "label": "% Received",
+   "no_copy": 1,
+   "oldfieldname": "per_received",
+   "oldfieldtype": "Currency",
+   "permlevel": 0,
+   "print_hide": 1,
    "read_only": 1
-  }, 
+  },
   {
-   "depends_on": "eval:!doc.__islocal", 
-   "description": "% of materials billed against this Purchase Order.", 
-   "fieldname": "per_billed", 
-   "fieldtype": "Percent", 
-   "in_list_view": 1, 
-   "label": "% Billed", 
-   "no_copy": 1, 
-   "oldfieldname": "per_billed", 
-   "oldfieldtype": "Currency", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "depends_on": "eval:!doc.__islocal",
+   "description": "% of materials billed against this Purchase Order.",
+   "fieldname": "per_billed",
+   "fieldtype": "Percent",
+   "in_list_view": 1,
+   "label": "% Billed",
+   "no_copy": 1,
+   "oldfieldname": "per_billed",
+   "oldfieldtype": "Currency",
+   "permlevel": 0,
+   "print_hide": 1,
    "read_only": 1
-  }, 
+  },
   {
-   "description": "Required raw materials issued to the supplier for producing a sub - contracted item.", 
-   "fieldname": "raw_material_details", 
-   "fieldtype": "Section Break", 
-   "label": "Raw Materials Supplied", 
-   "oldfieldtype": "Section Break", 
-   "options": "icon-truck", 
-   "permlevel": 0, 
+   "description": "Required raw materials issued to the supplier for producing a sub - contracted item.",
+   "fieldname": "raw_material_details",
+   "fieldtype": "Section Break",
+   "label": "Raw Materials Supplied",
+   "oldfieldtype": "Section Break",
+   "options": "icon-truck",
+   "permlevel": 0,
    "print_hide": 1
-  }, 
+  },
   {
-   "allow_on_submit": 1, 
-   "fieldname": "supplied_items", 
-   "fieldtype": "Table", 
-   "label": "Supplied Items", 
-   "no_copy": 0, 
-   "oldfieldname": "po_raw_material_details", 
-   "oldfieldtype": "Table", 
-   "options": "Purchase Order Item Supplied", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "allow_on_submit": 1,
+   "fieldname": "supplied_items",
+   "fieldtype": "Table",
+   "label": "Supplied Items",
+   "no_copy": 0,
+   "oldfieldname": "po_raw_material_details",
+   "oldfieldtype": "Table",
+   "options": "Purchase Order Item Supplied",
+   "permlevel": 0,
+   "print_hide": 1,
    "read_only": 1
-  }, 
+  },
   {
-   "fieldname": "recurring_order", 
-   "fieldtype": "Section Break", 
-   "label": "Recurring Order", 
-   "options": "icon-time", 
+   "fieldname": "recurring_order",
+   "fieldtype": "Section Break",
+   "label": "Recurring Order",
+   "options": "icon-time",
    "permlevel": 0
-  }, 
+  },
   {
-   "fieldname": "column_break", 
-   "fieldtype": "Column Break", 
-   "label": "Column Break", 
+   "fieldname": "column_break",
+   "fieldtype": "Column Break",
+   "label": "Column Break",
    "permlevel": 0
-  }, 
+  },
   {
-   "allow_on_submit": 1, 
-   "depends_on": "eval:doc.docstatus<2", 
-   "description": "Check if recurring order, uncheck to stop recurring or put proper End Date", 
-   "fieldname": "is_recurring", 
-   "fieldtype": "Check", 
-   "label": "Is Recurring", 
-   "no_copy": 1, 
-   "permlevel": 0, 
+   "allow_on_submit": 1,
+   "depends_on": "eval:doc.docstatus<2",
+   "description": "Check if recurring order, uncheck to stop recurring or put proper End Date",
+   "fieldname": "is_recurring",
+   "fieldtype": "Check",
+   "label": "Is Recurring",
+   "no_copy": 1,
+   "permlevel": 0,
    "print_hide": 1
-  }, 
+  },
   {
-   "allow_on_submit": 1, 
-   "depends_on": "eval:doc.is_recurring==1", 
-   "fieldname": "recurring_type", 
-   "fieldtype": "Select", 
-   "label": "Recurring Type", 
-   "no_copy": 1, 
-   "options": "Monthly\nQuarterly\nHalf-yearly\nYearly", 
-   "permlevel": 0
-  }, 
-  {
-   "allow_on_submit": 1, 
-   "depends_on": "eval:doc.is_recurring==1", 
-   "description": "Start date of current order's period", 
-   "fieldname": "from_date", 
-   "fieldtype": "Date", 
-   "label": "From Date", 
-   "no_copy": 1, 
-   "permlevel": 0
-  }, 
-  {
-   "allow_on_submit": 1, 
-   "depends_on": "eval:doc.is_recurring==1", 
-   "description": "End date of current order's period", 
-   "fieldname": "to_date", 
-   "fieldtype": "Date", 
-   "label": "To Date", 
-   "no_copy": 1, 
-   "permlevel": 0
-  }, 
-  {
-   "allow_on_submit": 1, 
-   "depends_on": "eval:doc.is_recurring==1", 
-   "description": "The day of the month on which auto order will be generated e.g. 05, 28 etc", 
-   "fieldname": "repeat_on_day_of_month", 
-   "fieldtype": "Int", 
-   "label": "Repeat on Day of Month", 
-   "no_copy": 1, 
-   "permlevel": 0, 
+   "allow_on_submit": 1,
+   "depends_on": "eval:doc.is_recurring==1",
+   "fieldname": "recurring_type",
+   "fieldtype": "Select",
+   "label": "Recurring Type",
+   "no_copy": 1,
+   "options": "Monthly\nQuarterly\nHalf-yearly\nYearly",
+   "permlevel": 0,
    "print_hide": 1
-  }, 
+  },
   {
-   "allow_on_submit": 1, 
-   "depends_on": "eval:doc.is_recurring==1", 
-   "description": "The date on which recurring order will be stop", 
-   "fieldname": "end_date", 
-   "fieldtype": "Date", 
-   "label": "End Date", 
-   "no_copy": 1, 
-   "permlevel": 0, 
+   "allow_on_submit": 1,
+   "depends_on": "eval:doc.is_recurring==1",
+   "description": "Start date of current order's period",
+   "fieldname": "from_date",
+   "fieldtype": "Date",
+   "label": "From Date",
+   "no_copy": 1,
+   "permlevel": 0,
    "print_hide": 1
-  }, 
+  },
   {
-   "fieldname": "column_break83", 
-   "fieldtype": "Column Break", 
-   "label": "Column Break", 
-   "permlevel": 0, 
+   "allow_on_submit": 1,
+   "depends_on": "eval:doc.is_recurring==1",
+   "description": "End date of current order's period",
+   "fieldname": "to_date",
+   "fieldtype": "Date",
+   "label": "To Date",
+   "no_copy": 1,
+   "permlevel": 0,
    "print_hide": 1
-  }, 
+  },
   {
-   "depends_on": "eval:doc.is_recurring==1", 
-   "description": "The date on which next invoice will be generated. It is generated on submit.", 
-   "fieldname": "next_date", 
-   "fieldtype": "Date", 
-   "label": "Next Date", 
-   "no_copy": 1, 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "allow_on_submit": 1,
+   "depends_on": "eval:doc.is_recurring==1",
+   "description": "The day of the month on which auto order will be generated e.g. 05, 28 etc",
+   "fieldname": "repeat_on_day_of_month",
+   "fieldtype": "Int",
+   "label": "Repeat on Day of Month",
+   "no_copy": 1,
+   "permlevel": 0,
+   "print_hide": 1
+  },
+  {
+   "allow_on_submit": 1,
+   "depends_on": "eval:doc.is_recurring==1",
+   "description": "The date on which recurring order will be stop",
+   "fieldname": "end_date",
+   "fieldtype": "Date",
+   "label": "End Date",
+   "no_copy": 1,
+   "permlevel": 0,
+   "print_hide": 1
+  },
+  {
+   "fieldname": "column_break83",
+   "fieldtype": "Column Break",
+   "label": "Column Break",
+   "permlevel": 0,
+   "print_hide": 1
+  },
+  {
+   "depends_on": "eval:doc.is_recurring==1",
+   "description": "The date on which next invoice will be generated. It is generated on submit.",
+   "fieldname": "next_date",
+   "fieldtype": "Date",
+   "label": "Next Date",
+   "no_copy": 1,
+   "permlevel": 0,
+   "print_hide": 1,
    "read_only": 1
-  }, 
+  },
   {
-   "depends_on": "eval:doc.is_recurring==1", 
-   "fieldname": "recurring_id", 
-   "fieldtype": "Data", 
-   "label": "Recurring Id", 
-   "no_copy": 1, 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "depends_on": "eval:doc.is_recurring==1",
+   "fieldname": "recurring_id",
+   "fieldtype": "Data",
+   "label": "Recurring Id",
+   "no_copy": 1,
+   "permlevel": 0,
+   "print_hide": 1,
    "read_only": 1
-  }, 
+  },
   {
-   "allow_on_submit": 1, 
-   "depends_on": "eval:doc.is_recurring==1", 
-   "description": "Enter email id separated by commas, order will be mailed automatically on particular date", 
-   "fieldname": "notification_email_address", 
-   "fieldtype": "Small Text", 
-   "label": "Notification Email Address", 
-   "no_copy": 1, 
-   "permlevel": 0, 
+   "allow_on_submit": 1,
+   "depends_on": "eval:doc.is_recurring==1",
+   "description": "Enter email id separated by commas, order will be mailed automatically on particular date",
+   "fieldname": "notification_email_address",
+   "fieldtype": "Small Text",
+   "label": "Notification Email Address",
+   "no_copy": 1,
+   "permlevel": 0,
    "print_hide": 1
   }
- ], 
- "icon": "icon-file-text", 
- "idx": 1, 
- "is_submittable": 1, 
- "modified": "2014-12-24 14:30:24.868635", 
- "modified_by": "Administrator", 
- "module": "Buying", 
- "name": "Purchase Order", 
- "owner": "Administrator", 
+ ],
+ "icon": "icon-file-text",
+ "idx": 1,
+ "is_submittable": 1,
+ "modified": "2014-12-24 14:30:24.868635",
+ "modified_by": "Administrator",
+ "module": "Buying",
+ "name": "Purchase Order",
+ "owner": "Administrator",
  "permissions": [
   {
-   "amend": 0, 
-   "apply_user_permissions": 1, 
-   "cancel": 0, 
-   "create": 0, 
-   "delete": 0, 
-   "email": 0, 
-   "permlevel": 0, 
-   "print": 0, 
-   "read": 1, 
-   "report": 1, 
-   "role": "Material User", 
-   "submit": 0, 
+   "amend": 0,
+   "apply_user_permissions": 1,
+   "cancel": 0,
+   "create": 0,
+   "delete": 0,
+   "email": 0,
+   "permlevel": 0,
+   "print": 0,
+   "read": 1,
+   "report": 1,
+   "role": "Material User",
+   "submit": 0,
    "write": 0
-  }, 
+  },
   {
-   "amend": 1, 
-   "cancel": 1, 
-   "create": 1, 
-   "delete": 1, 
-   "email": 1, 
-   "permlevel": 0, 
-   "print": 1, 
-   "read": 1, 
-   "report": 1, 
-   "role": "Purchase Manager", 
-   "submit": 1, 
+   "amend": 1,
+   "cancel": 1,
+   "create": 1,
+   "delete": 1,
+   "email": 1,
+   "permlevel": 0,
+   "print": 1,
+   "read": 1,
+   "report": 1,
+   "role": "Purchase Manager",
+   "submit": 1,
    "write": 1
-  }, 
+  },
   {
-   "amend": 1, 
-   "apply_user_permissions": 1, 
-   "cancel": 1, 
-   "create": 1, 
-   "delete": 1, 
-   "email": 1, 
-   "permlevel": 0, 
-   "print": 1, 
-   "read": 1, 
-   "report": 1, 
-   "role": "Purchase User", 
-   "submit": 1, 
+   "amend": 1,
+   "apply_user_permissions": 1,
+   "cancel": 1,
+   "create": 1,
+   "delete": 1,
+   "email": 1,
+   "permlevel": 0,
+   "print": 1,
+   "read": 1,
+   "report": 1,
+   "role": "Purchase User",
+   "submit": 1,
    "write": 1
-  }, 
+  },
   {
-   "apply_user_permissions": 1, 
-   "cancel": 0, 
-   "delete": 0, 
-   "email": 1, 
-   "permlevel": 0, 
-   "print": 1, 
-   "read": 1, 
-   "report": 1, 
+   "apply_user_permissions": 1,
+   "cancel": 0,
+   "delete": 0,
+   "email": 1,
+   "permlevel": 0,
+   "print": 1,
+   "read": 1,
+   "report": 1,
    "role": "Supplier"
-  }, 
+  },
   {
-   "permlevel": 1, 
-   "read": 1, 
-   "role": "Purchase Manager", 
+   "permlevel": 1,
+   "read": 1,
+   "role": "Purchase Manager",
    "write": 1
   }
- ], 
- "read_only_onload": 1, 
- "search_fields": "status, transaction_date, supplier,grand_total", 
- "sort_field": "modified", 
+ ],
+ "read_only_onload": 1,
+ "search_fields": "status, transaction_date, supplier,grand_total",
+ "sort_field": "modified",
  "sort_order": "DESC"
-}
\ No newline at end of file
+}
diff --git a/erpnext/buying/doctype/supplier_quotation/supplier_quotation.json b/erpnext/buying/doctype/supplier_quotation/supplier_quotation.json
index 8eb1826..f1fa8ae 100644
--- a/erpnext/buying/doctype/supplier_quotation/supplier_quotation.json
+++ b/erpnext/buying/doctype/supplier_quotation/supplier_quotation.json
@@ -1,668 +1,668 @@
 {
- "allow_import": 1, 
- "autoname": "naming_series:", 
- "creation": "2013-05-21 16:16:45", 
- "docstatus": 0, 
- "doctype": "DocType", 
- "document_type": "Transaction", 
+ "allow_import": 1,
+ "autoname": "naming_series:",
+ "creation": "2013-05-21 16:16:45",
+ "docstatus": 0,
+ "doctype": "DocType",
+ "document_type": "Transaction",
  "fields": [
   {
-   "fieldname": "supplier_section", 
-   "fieldtype": "Section Break", 
-   "label": "Supplier", 
-   "options": "icon-user", 
+   "fieldname": "supplier_section",
+   "fieldtype": "Section Break",
+   "label": "Supplier",
+   "options": "icon-user",
    "permlevel": 0
-  }, 
+  },
   {
-   "fieldname": "naming_series", 
-   "fieldtype": "Select", 
-   "label": "Series", 
-   "no_copy": 1, 
-   "oldfieldname": "naming_series", 
-   "oldfieldtype": "Select", 
-   "options": "SQTN-", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "fieldname": "naming_series",
+   "fieldtype": "Select",
+   "label": "Series",
+   "no_copy": 1,
+   "oldfieldname": "naming_series",
+   "oldfieldtype": "Select",
+   "options": "SQTN-",
+   "permlevel": 0,
+   "print_hide": 1,
    "reqd": 1
-  }, 
+  },
   {
-   "description": "Supplier (vendor) name as entered in supplier master", 
-   "fieldname": "supplier", 
-   "fieldtype": "Link", 
-   "in_filter": 1, 
-   "label": "Supplier", 
-   "oldfieldname": "supplier", 
-   "oldfieldtype": "Link", 
-   "options": "Supplier", 
-   "permlevel": 0, 
-   "print_hide": 1, 
-   "reqd": 1, 
+   "description": "Supplier (vendor) name as entered in supplier master",
+   "fieldname": "supplier",
+   "fieldtype": "Link",
+   "in_filter": 1,
+   "label": "Supplier",
+   "oldfieldname": "supplier",
+   "oldfieldtype": "Link",
+   "options": "Supplier",
+   "permlevel": 0,
+   "print_hide": 1,
+   "reqd": 1,
    "search_index": 1
-  }, 
+  },
   {
-   "fieldname": "supplier_name", 
-   "fieldtype": "Data", 
-   "hidden": 0, 
-   "in_list_view": 1, 
-   "label": "Name", 
-   "permlevel": 0, 
+   "fieldname": "supplier_name",
+   "fieldtype": "Data",
+   "hidden": 0,
+   "in_list_view": 1,
+   "label": "Name",
+   "permlevel": 0,
    "read_only": 1
-  }, 
+  },
   {
-   "fieldname": "address_display", 
-   "fieldtype": "Small Text", 
-   "hidden": 1, 
-   "label": "Address", 
-   "permlevel": 0, 
+   "fieldname": "address_display",
+   "fieldtype": "Small Text",
+   "hidden": 1,
+   "label": "Address",
+   "permlevel": 0,
    "read_only": 1
-  }, 
+  },
   {
-   "fieldname": "contact_display", 
-   "fieldtype": "Small Text", 
-   "hidden": 1, 
-   "label": "Contact", 
-   "permlevel": 0, 
+   "fieldname": "contact_display",
+   "fieldtype": "Small Text",
+   "hidden": 1,
+   "label": "Contact",
+   "permlevel": 0,
    "read_only": 1
-  }, 
+  },
   {
-   "fieldname": "contact_mobile", 
-   "fieldtype": "Small Text", 
-   "hidden": 1, 
-   "label": "Mobile No", 
-   "permlevel": 0, 
+   "fieldname": "contact_mobile",
+   "fieldtype": "Small Text",
+   "hidden": 1,
+   "label": "Mobile No",
+   "permlevel": 0,
    "read_only": 1
-  }, 
+  },
   {
-   "fieldname": "contact_email", 
-   "fieldtype": "Small Text", 
-   "hidden": 1, 
-   "label": "Contact Email", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "fieldname": "contact_email",
+   "fieldtype": "Small Text",
+   "hidden": 1,
+   "label": "Contact Email",
+   "permlevel": 0,
+   "print_hide": 1,
    "read_only": 1
-  }, 
+  },
   {
-   "fieldname": "column_break1", 
-   "fieldtype": "Column Break", 
-   "oldfieldtype": "Column Break", 
-   "permlevel": 0, 
-   "print_hide": 0, 
-   "print_width": "50%", 
+   "fieldname": "column_break1",
+   "fieldtype": "Column Break",
+   "oldfieldtype": "Column Break",
+   "permlevel": 0,
+   "print_hide": 0,
+   "print_width": "50%",
    "width": "50%"
-  }, 
+  },
   {
-   "fieldname": "transaction_date", 
-   "fieldtype": "Date", 
-   "in_filter": 1, 
-   "label": "Date", 
-   "oldfieldname": "transaction_date", 
-   "oldfieldtype": "Date", 
-   "permlevel": 0, 
-   "reqd": 1, 
+   "fieldname": "transaction_date",
+   "fieldtype": "Date",
+   "in_filter": 1,
+   "label": "Date",
+   "oldfieldname": "transaction_date",
+   "oldfieldtype": "Date",
+   "permlevel": 0,
+   "reqd": 1,
    "search_index": 1
-  }, 
+  },
   {
-   "fieldname": "amended_from", 
-   "fieldtype": "Link", 
-   "hidden": 1, 
-   "ignore_user_permissions": 1, 
-   "label": "Amended From", 
-   "no_copy": 1, 
-   "oldfieldname": "amended_from", 
-   "oldfieldtype": "Data", 
-   "options": "Supplier Quotation", 
-   "permlevel": 0, 
-   "print_hide": 1, 
-   "read_only": 1, 
+   "fieldname": "amended_from",
+   "fieldtype": "Link",
+   "hidden": 1,
+   "ignore_user_permissions": 1,
+   "label": "Amended From",
+   "no_copy": 1,
+   "oldfieldname": "amended_from",
+   "oldfieldtype": "Data",
+   "options": "Supplier Quotation",
+   "permlevel": 0,
+   "print_hide": 1,
+   "read_only": 1,
    "report_hide": 0
-  }, 
+  },
   {
-   "description": "Select the relevant company name if you have multiple companies", 
-   "fieldname": "company", 
-   "fieldtype": "Link", 
-   "in_filter": 1, 
-   "label": "Company", 
-   "no_copy": 0, 
-   "oldfieldname": "company", 
-   "oldfieldtype": "Link", 
-   "options": "Company", 
-   "permlevel": 0, 
-   "print_hide": 1, 
-   "reqd": 1, 
+   "description": "Select the relevant company name if you have multiple companies",
+   "fieldname": "company",
+   "fieldtype": "Link",
+   "in_filter": 1,
+   "label": "Company",
+   "no_copy": 0,
+   "oldfieldname": "company",
+   "oldfieldtype": "Link",
+   "options": "Company",
+   "permlevel": 0,
+   "print_hide": 1,
+   "reqd": 1,
    "search_index": 1
-  }, 
+  },
   {
-   "fieldname": "currency_price_list", 
-   "fieldtype": "Section Break", 
-   "label": "Currency and Price List", 
-   "options": "icon-tag", 
+   "fieldname": "currency_price_list",
+   "fieldtype": "Section Break",
+   "label": "Currency and Price List",
+   "options": "icon-tag",
    "permlevel": 0
-  }, 
+  },
   {
-   "fieldname": "currency", 
-   "fieldtype": "Link", 
-   "label": "Currency", 
-   "no_copy": 0, 
-   "oldfieldname": "currency", 
-   "oldfieldtype": "Select", 
-   "options": "Currency", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "fieldname": "currency",
+   "fieldtype": "Link",
+   "label": "Currency",
+   "no_copy": 0,
+   "oldfieldname": "currency",
+   "oldfieldtype": "Select",
+   "options": "Currency",
+   "permlevel": 0,
+   "print_hide": 1,
    "reqd": 1
-  }, 
+  },
   {
-   "description": "Rate at which supplier's currency is converted to company's base currency", 
-   "fieldname": "conversion_rate", 
-   "fieldtype": "Float", 
-   "hidden": 0, 
-   "label": "Exchange Rate", 
-   "no_copy": 1, 
-   "oldfieldname": "conversion_rate", 
-   "oldfieldtype": "Currency", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "description": "Rate at which supplier's currency is converted to company's base currency",
+   "fieldname": "conversion_rate",
+   "fieldtype": "Float",
+   "hidden": 0,
+   "label": "Exchange Rate",
+   "no_copy": 0,
+   "oldfieldname": "conversion_rate",
+   "oldfieldtype": "Currency",
+   "permlevel": 0,
+   "print_hide": 1,
    "reqd": 1
-  }, 
+  },
   {
-   "fieldname": "cb_price_list", 
-   "fieldtype": "Column Break", 
-   "permlevel": 0, 
-   "print_width": "50%", 
+   "fieldname": "cb_price_list",
+   "fieldtype": "Column Break",
+   "permlevel": 0,
+   "print_width": "50%",
    "width": "50%"
-  }, 
+  },
   {
-   "fieldname": "buying_price_list", 
-   "fieldtype": "Link", 
-   "label": "Price List", 
-   "options": "Price List", 
-   "permlevel": 0, 
+   "fieldname": "buying_price_list",
+   "fieldtype": "Link",
+   "label": "Price List",
+   "options": "Price List",
+   "permlevel": 0,
    "print_hide": 1
-  }, 
+  },
   {
-   "depends_on": "buying_price_list", 
-   "fieldname": "price_list_currency", 
-   "fieldtype": "Link", 
-   "label": "Price List Currency", 
-   "options": "Currency", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "depends_on": "buying_price_list",
+   "fieldname": "price_list_currency",
+   "fieldtype": "Link",
+   "label": "Price List Currency",
+   "options": "Currency",
+   "permlevel": 0,
+   "print_hide": 1,
    "read_only": 1
-  }, 
+  },
   {
-   "depends_on": "buying_price_list", 
-   "fieldname": "plc_conversion_rate", 
-   "fieldtype": "Float", 
-   "label": "Price List Exchange Rate", 
-   "permlevel": 0, 
+   "depends_on": "buying_price_list",
+   "fieldname": "plc_conversion_rate",
+   "fieldtype": "Float",
+   "label": "Price List Exchange Rate",
+   "permlevel": 0,
    "print_hide": 1
-  }, 
+  },
   {
-   "fieldname": "ignore_pricing_rule", 
-   "fieldtype": "Check", 
-   "label": "Ignore Pricing Rule", 
-   "no_copy": 1, 
-   "permlevel": 1, 
+   "fieldname": "ignore_pricing_rule",
+   "fieldtype": "Check",
+   "label": "Ignore Pricing Rule",
+   "no_copy": 1,
+   "permlevel": 1,
    "print_hide": 1
-  }, 
+  },
   {
-   "fieldname": "items_section", 
-   "fieldtype": "Section Break", 
-   "label": "Items", 
-   "oldfieldtype": "Section Break", 
-   "options": "icon-shopping-cart", 
+   "fieldname": "items_section",
+   "fieldtype": "Section Break",
+   "label": "Items",
+   "oldfieldtype": "Section Break",
+   "options": "icon-shopping-cart",
    "permlevel": 0
-  }, 
+  },
   {
-   "allow_on_submit": 1, 
-   "fieldname": "items", 
-   "fieldtype": "Table", 
-   "label": "Items", 
-   "no_copy": 0, 
-   "oldfieldname": "po_details", 
-   "oldfieldtype": "Table", 
-   "options": "Supplier Quotation Item", 
+   "allow_on_submit": 1,
+   "fieldname": "items",
+   "fieldtype": "Table",
+   "label": "Items",
+   "no_copy": 0,
+   "oldfieldname": "po_details",
+   "oldfieldtype": "Table",
+   "options": "Supplier Quotation Item",
    "permlevel": 0
-  }, 
+  },
   {
-   "fieldname": "section_break_22", 
-   "fieldtype": "Section Break", 
+   "fieldname": "section_break_22",
+   "fieldtype": "Section Break",
    "permlevel": 0
-  }, 
+  },
   {
-   "fieldname": "net_total", 
-   "fieldtype": "Currency", 
-   "label": "Net Total (Company Currency)", 
-   "no_copy": 1, 
-   "oldfieldname": "net_total", 
-   "oldfieldtype": "Currency", 
-   "options": "Company:company:default_currency", 
-   "permlevel": 0, 
-   "print_hide": 1, 
-   "read_only": 1, 
+   "fieldname": "net_total",
+   "fieldtype": "Currency",
+   "label": "Net Total (Company Currency)",
+   "no_copy": 1,
+   "oldfieldname": "net_total",
+   "oldfieldtype": "Currency",
+   "options": "Company:company:default_currency",
+   "permlevel": 0,
+   "print_hide": 1,
+   "read_only": 1,
    "reqd": 0
-  }, 
+  },
   {
-   "fieldname": "column_break_24", 
-   "fieldtype": "Column Break", 
+   "fieldname": "column_break_24",
+   "fieldtype": "Column Break",
    "permlevel": 0
-  }, 
+  },
   {
-   "fieldname": "net_total_import", 
-   "fieldtype": "Currency", 
-   "label": "Net Total", 
-   "no_copy": 0, 
-   "oldfieldname": "net_total_import", 
-   "oldfieldtype": "Currency", 
-   "options": "currency", 
-   "permlevel": 0, 
-   "print_hide": 0, 
+   "fieldname": "net_total_import",
+   "fieldtype": "Currency",
+   "label": "Net Total",
+   "no_copy": 0,
+   "oldfieldname": "net_total_import",
+   "oldfieldtype": "Currency",
+   "options": "currency",
+   "permlevel": 0,
+   "print_hide": 0,
    "read_only": 1
-  }, 
+  },
   {
-   "fieldname": "taxes_section", 
-   "fieldtype": "Section Break", 
-   "label": "Taxes and Charges", 
-   "oldfieldtype": "Section Break", 
-   "options": "icon-money", 
+   "fieldname": "taxes_section",
+   "fieldtype": "Section Break",
+   "label": "Taxes and Charges",
+   "oldfieldtype": "Section Break",
+   "options": "icon-money",
    "permlevel": 0
-  }, 
+  },
   {
-   "description": "If you have created a standard template in Purchase Taxes and Charges Master, select one and click on the button below.", 
-   "fieldname": "taxes_and_charges", 
-   "fieldtype": "Link", 
-   "label": "Taxes and Charges", 
-   "no_copy": 1, 
-   "oldfieldname": "purchase_other_charges", 
-   "oldfieldtype": "Link", 
-   "options": "Purchase Taxes and Charges Master", 
-   "permlevel": 0, 
+   "description": "If you have created a standard template in Purchase Taxes and Charges Master, select one and click on the button below.",
+   "fieldname": "taxes_and_charges",
+   "fieldtype": "Link",
+   "label": "Taxes and Charges",
+   "no_copy": 1,
+   "oldfieldname": "purchase_other_charges",
+   "oldfieldtype": "Link",
+   "options": "Purchase Taxes and Charges Master",
+   "permlevel": 0,
    "print_hide": 1
-  }, 
+  },
   {
-   "fieldname": "taxes", 
-   "fieldtype": "Table", 
-   "label": "Purchase Taxes and Charges", 
-   "no_copy": 0, 
-   "oldfieldname": "purchase_tax_details", 
-   "oldfieldtype": "Table", 
-   "options": "Purchase Taxes and Charges", 
+   "fieldname": "taxes",
+   "fieldtype": "Table",
+   "label": "Purchase Taxes and Charges",
+   "no_copy": 0,
+   "oldfieldname": "purchase_tax_details",
+   "oldfieldtype": "Table",
+   "options": "Purchase Taxes and Charges",
    "permlevel": 0
-  }, 
+  },
   {
-   "fieldname": "other_charges_calculation", 
-   "fieldtype": "HTML", 
-   "label": "Taxes and Charges Calculation", 
-   "no_copy": 1, 
-   "oldfieldtype": "HTML", 
-   "permlevel": 0, 
+   "fieldname": "other_charges_calculation",
+   "fieldtype": "HTML",
+   "label": "Taxes and Charges Calculation",
+   "no_copy": 1,
+   "oldfieldtype": "HTML",
+   "permlevel": 0,
    "print_hide": 1
-  }, 
+  },
   {
-   "fieldname": "totals", 
-   "fieldtype": "Section Break", 
-   "label": "Totals", 
-   "oldfieldtype": "Section Break", 
-   "options": "icon-money", 
+   "fieldname": "totals",
+   "fieldtype": "Section Break",
+   "label": "Totals",
+   "oldfieldtype": "Section Break",
+   "options": "icon-money",
    "permlevel": 0
-  }, 
+  },
   {
-   "fieldname": "other_charges_added", 
-   "fieldtype": "Currency", 
-   "label": "Taxes and Charges Added (Company Currency)", 
-   "no_copy": 0, 
-   "oldfieldname": "other_charges_added", 
-   "oldfieldtype": "Currency", 
-   "options": "Company:company:default_currency", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "fieldname": "other_charges_added",
+   "fieldtype": "Currency",
+   "label": "Taxes and Charges Added (Company Currency)",
+   "no_copy": 0,
+   "oldfieldname": "other_charges_added",
+   "oldfieldtype": "Currency",
+   "options": "Company:company:default_currency",
+   "permlevel": 0,
+   "print_hide": 1,
    "read_only": 1
-  }, 
+  },
   {
-   "fieldname": "other_charges_deducted", 
-   "fieldtype": "Currency", 
-   "label": "Taxes and Charges Deducted (Company Currency)", 
-   "no_copy": 0, 
-   "oldfieldname": "other_charges_deducted", 
-   "oldfieldtype": "Currency", 
-   "options": "Company:company:default_currency", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "fieldname": "other_charges_deducted",
+   "fieldtype": "Currency",
+   "label": "Taxes and Charges Deducted (Company Currency)",
+   "no_copy": 0,
+   "oldfieldname": "other_charges_deducted",
+   "oldfieldtype": "Currency",
+   "options": "Company:company:default_currency",
+   "permlevel": 0,
+   "print_hide": 1,
    "read_only": 1
-  }, 
+  },
   {
-   "fieldname": "total_tax", 
-   "fieldtype": "Currency", 
-   "label": "Total Tax (Company Currency)", 
-   "no_copy": 1, 
-   "oldfieldname": "total_tax", 
-   "oldfieldtype": "Currency", 
-   "options": "Company:company:default_currency", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "fieldname": "total_tax",
+   "fieldtype": "Currency",
+   "label": "Total Tax (Company Currency)",
+   "no_copy": 1,
+   "oldfieldname": "total_tax",
+   "oldfieldtype": "Currency",
+   "options": "Company:company:default_currency",
+   "permlevel": 0,
+   "print_hide": 1,
    "read_only": 1
-  }, 
+  },
   {
-   "fieldname": "grand_total", 
-   "fieldtype": "Currency", 
-   "label": "Grand Total (Company Currency)", 
-   "no_copy": 1, 
-   "oldfieldname": "grand_total", 
-   "oldfieldtype": "Currency", 
-   "options": "Company:company:default_currency", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "fieldname": "grand_total",
+   "fieldtype": "Currency",
+   "label": "Grand Total (Company Currency)",
+   "no_copy": 1,
+   "oldfieldname": "grand_total",
+   "oldfieldtype": "Currency",
+   "options": "Company:company:default_currency",
+   "permlevel": 0,
+   "print_hide": 1,
    "read_only": 1
-  }, 
+  },
   {
-   "fieldname": "rounded_total", 
-   "fieldtype": "Currency", 
-   "label": "Rounded Total (Company Currency)", 
-   "oldfieldname": "rounded_total", 
-   "oldfieldtype": "Currency", 
-   "options": "Company:company:default_currency", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "fieldname": "rounded_total",
+   "fieldtype": "Currency",
+   "label": "Rounded Total (Company Currency)",
+   "oldfieldname": "rounded_total",
+   "oldfieldtype": "Currency",
+   "options": "Company:company:default_currency",
+   "permlevel": 0,
+   "print_hide": 1,
    "read_only": 1
-  }, 
+  },
   {
-   "description": "In Words will be visible once you save the Purchase Order.", 
-   "fieldname": "in_words", 
-   "fieldtype": "Data", 
-   "label": "In Words (Company Currency)", 
-   "oldfieldname": "in_words", 
-   "oldfieldtype": "Data", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "description": "In Words will be visible once you save the Purchase Order.",
+   "fieldname": "in_words",
+   "fieldtype": "Data",
+   "label": "In Words (Company Currency)",
+   "oldfieldname": "in_words",
+   "oldfieldtype": "Data",
+   "permlevel": 0,
+   "print_hide": 1,
    "read_only": 1
-  }, 
+  },
   {
-   "fieldname": "column_break4", 
-   "fieldtype": "Column Break", 
-   "oldfieldtype": "Column Break", 
-   "permlevel": 0, 
+   "fieldname": "column_break4",
+   "fieldtype": "Column Break",
+   "oldfieldtype": "Column Break",
+   "permlevel": 0,
    "print_hide": 0
-  }, 
+  },
   {
-   "fieldname": "other_charges_added_import", 
-   "fieldtype": "Currency", 
-   "label": "Taxes and Charges Added", 
-   "no_copy": 0, 
-   "oldfieldname": "other_charges_added_import", 
-   "oldfieldtype": "Currency", 
-   "options": "currency", 
-   "permlevel": 0, 
-   "print_hide": 1, 
-   "read_only": 1, 
+   "fieldname": "other_charges_added_import",
+   "fieldtype": "Currency",
+   "label": "Taxes and Charges Added",
+   "no_copy": 0,
+   "oldfieldname": "other_charges_added_import",
+   "oldfieldtype": "Currency",
+   "options": "currency",
+   "permlevel": 0,
+   "print_hide": 1,
+   "read_only": 1,
    "report_hide": 0
-  }, 
+  },
   {
-   "fieldname": "other_charges_deducted_import", 
-   "fieldtype": "Currency", 
-   "label": "Taxes and Charges Deducted", 
-   "no_copy": 0, 
-   "oldfieldname": "other_charges_deducted_import", 
-   "oldfieldtype": "Currency", 
-   "options": "currency", 
-   "permlevel": 0, 
-   "print_hide": 1, 
-   "read_only": 1, 
+   "fieldname": "other_charges_deducted_import",
+   "fieldtype": "Currency",
+   "label": "Taxes and Charges Deducted",
+   "no_copy": 0,
+   "oldfieldname": "other_charges_deducted_import",
+   "oldfieldtype": "Currency",
+   "options": "currency",
+   "permlevel": 0,
+   "print_hide": 1,
+   "read_only": 1,
    "report_hide": 0
-  }, 
+  },
   {
-   "fieldname": "grand_total_import", 
-   "fieldtype": "Currency", 
-   "in_list_view": 1, 
-   "label": "Grand Total", 
-   "no_copy": 0, 
-   "oldfieldname": "grand_total_import", 
-   "oldfieldtype": "Currency", 
-   "options": "currency", 
-   "permlevel": 0, 
-   "print_hide": 0, 
-   "read_only": 1, 
+   "fieldname": "grand_total_import",
+   "fieldtype": "Currency",
+   "in_list_view": 1,
+   "label": "Grand Total",
+   "no_copy": 0,
+   "oldfieldname": "grand_total_import",
+   "oldfieldtype": "Currency",
+   "options": "currency",
+   "permlevel": 0,
+   "print_hide": 0,
+   "read_only": 1,
    "report_hide": 0
-  }, 
+  },
   {
-   "fieldname": "in_words_import", 
-   "fieldtype": "Data", 
-   "label": "In Words", 
-   "oldfieldname": "in_words_import", 
-   "oldfieldtype": "Data", 
-   "permlevel": 0, 
-   "print_hide": 0, 
+   "fieldname": "in_words_import",
+   "fieldtype": "Data",
+   "label": "In Words",
+   "oldfieldname": "in_words_import",
+   "oldfieldtype": "Data",
+   "permlevel": 0,
+   "print_hide": 0,
    "read_only": 1
-  }, 
+  },
   {
-   "fieldname": "fold", 
-   "fieldtype": "Fold", 
+   "fieldname": "fold",
+   "fieldtype": "Fold",
    "permlevel": 0
-  }, 
+  },
   {
-   "fieldname": "terms_section_break", 
-   "fieldtype": "Section Break", 
-   "label": "Terms and Conditions", 
-   "oldfieldtype": "Section Break", 
-   "options": "icon-legal", 
+   "fieldname": "terms_section_break",
+   "fieldtype": "Section Break",
+   "label": "Terms and Conditions",
+   "oldfieldtype": "Section Break",
+   "options": "icon-legal",
    "permlevel": 0
-  }, 
+  },
   {
-   "allow_on_submit": 1, 
-   "fieldname": "letter_head", 
-   "fieldtype": "Link", 
-   "label": "Letter Head", 
-   "oldfieldname": "letter_head", 
-   "oldfieldtype": "Select", 
-   "options": "Letter Head", 
-   "permlevel": 0, 
+   "allow_on_submit": 1,
+   "fieldname": "letter_head",
+   "fieldtype": "Link",
+   "label": "Letter Head",
+   "oldfieldname": "letter_head",
+   "oldfieldtype": "Select",
+   "options": "Letter Head",
+   "permlevel": 0,
    "print_hide": 1
-  }, 
+  },
   {
-   "fieldname": "tc_name", 
-   "fieldtype": "Link", 
-   "label": "Terms", 
-   "oldfieldname": "tc_name", 
-   "oldfieldtype": "Link", 
-   "options": "Terms and Conditions", 
-   "permlevel": 0, 
+   "fieldname": "tc_name",
+   "fieldtype": "Link",
+   "label": "Terms",
+   "oldfieldname": "tc_name",
+   "oldfieldtype": "Link",
+   "options": "Terms and Conditions",
+   "permlevel": 0,
    "print_hide": 1
-  }, 
+  },
   {
-   "fieldname": "get_terms", 
-   "fieldtype": "Button", 
-   "label": "Get Terms and Conditions", 
-   "oldfieldtype": "Button", 
+   "fieldname": "get_terms",
+   "fieldtype": "Button",
+   "label": "Get Terms and Conditions",
+   "oldfieldtype": "Button",
    "permlevel": 0
-  }, 
+  },
   {
-   "fieldname": "terms", 
-   "fieldtype": "Text Editor", 
-   "label": "Terms and Conditions", 
-   "oldfieldname": "terms", 
-   "oldfieldtype": "Text Editor", 
+   "fieldname": "terms",
+   "fieldtype": "Text Editor",
+   "label": "Terms and Conditions",
+   "oldfieldname": "terms",
+   "oldfieldtype": "Text Editor",
    "permlevel": 0
-  }, 
+  },
   {
-   "depends_on": "supplier", 
-   "fieldname": "contact_section", 
-   "fieldtype": "Section Break", 
-   "label": "Contact Info", 
-   "options": "icon-bullhorn", 
+   "depends_on": "supplier",
+   "fieldname": "contact_section",
+   "fieldtype": "Section Break",
+   "label": "Contact Info",
+   "options": "icon-bullhorn",
    "permlevel": 0
-  }, 
+  },
   {
-   "fieldname": "supplier_address", 
-   "fieldtype": "Link", 
-   "in_filter": 1, 
-   "label": "Supplier Address", 
-   "options": "Address", 
-   "permlevel": 0, 
+   "fieldname": "supplier_address",
+   "fieldtype": "Link",
+   "in_filter": 1,
+   "label": "Supplier Address",
+   "options": "Address",
+   "permlevel": 0,
    "print_hide": 1
-  }, 
+  },
   {
-   "fieldname": "contact_person", 
-   "fieldtype": "Link", 
-   "in_filter": 1, 
-   "label": "Contact Person", 
-   "options": "Contact", 
-   "permlevel": 0, 
+   "fieldname": "contact_person",
+   "fieldtype": "Link",
+   "in_filter": 1,
+   "label": "Contact Person",
+   "options": "Contact",
+   "permlevel": 0,
    "print_hide": 1
-  }, 
+  },
   {
-   "fieldname": "more_info", 
-   "fieldtype": "Section Break", 
-   "label": "More Info", 
-   "oldfieldtype": "Section Break", 
-   "options": "icon-file-text", 
+   "fieldname": "more_info",
+   "fieldtype": "Section Break",
+   "label": "More Info",
+   "oldfieldtype": "Section Break",
+   "options": "icon-file-text",
    "permlevel": 0
-  }, 
+  },
   {
-   "fieldname": "status", 
-   "fieldtype": "Select", 
-   "in_filter": 1, 
-   "label": "Status", 
-   "no_copy": 1, 
-   "oldfieldname": "status", 
-   "oldfieldtype": "Select", 
-   "options": "\nDraft\nSubmitted\nStopped\nCancelled", 
-   "permlevel": 0, 
-   "print_hide": 1, 
-   "read_only": 1, 
-   "reqd": 1, 
+   "fieldname": "status",
+   "fieldtype": "Select",
+   "in_filter": 1,
+   "label": "Status",
+   "no_copy": 1,
+   "oldfieldname": "status",
+   "oldfieldtype": "Select",
+   "options": "\nDraft\nSubmitted\nStopped\nCancelled",
+   "permlevel": 0,
+   "print_hide": 1,
+   "read_only": 1,
+   "reqd": 1,
    "search_index": 1
-  }, 
+  },
   {
-   "default": "No", 
-   "fieldname": "is_subcontracted", 
-   "fieldtype": "Select", 
-   "label": "Is Subcontracted", 
-   "options": "\nYes\nNo", 
-   "permlevel": 0, 
+   "default": "No",
+   "fieldname": "is_subcontracted",
+   "fieldtype": "Select",
+   "label": "Is Subcontracted",
+   "options": "\nYes\nNo",
+   "permlevel": 0,
    "print_hide": 1
-  }, 
+  },
   {
-   "fieldname": "column_break_57", 
-   "fieldtype": "Column Break", 
+   "fieldname": "column_break_57",
+   "fieldtype": "Column Break",
    "permlevel": 0
-  }, 
+  },
   {
-   "fieldname": "fiscal_year", 
-   "fieldtype": "Link", 
-   "in_filter": 1, 
-   "label": "Fiscal Year", 
-   "no_copy": 0, 
-   "oldfieldname": "fiscal_year", 
-   "oldfieldtype": "Select", 
-   "options": "Fiscal Year", 
-   "permlevel": 0, 
-   "print_hide": 1, 
-   "reqd": 1, 
+   "fieldname": "fiscal_year",
+   "fieldtype": "Link",
+   "in_filter": 1,
+   "label": "Fiscal Year",
+   "no_copy": 0,
+   "oldfieldname": "fiscal_year",
+   "oldfieldtype": "Select",
+   "options": "Fiscal Year",
+   "permlevel": 0,
+   "print_hide": 1,
+   "reqd": 1,
    "search_index": 1
-  }, 
+  },
   {
-   "allow_on_submit": 1, 
-   "fieldname": "select_print_heading", 
-   "fieldtype": "Link", 
-   "label": "Print Heading", 
-   "no_copy": 1, 
-   "oldfieldname": "select_print_heading", 
-   "oldfieldtype": "Link", 
-   "options": "Print Heading", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "allow_on_submit": 1,
+   "fieldname": "select_print_heading",
+   "fieldtype": "Link",
+   "label": "Print Heading",
+   "no_copy": 1,
+   "oldfieldname": "select_print_heading",
+   "oldfieldtype": "Link",
+   "options": "Print Heading",
+   "permlevel": 0,
+   "print_hide": 1,
    "report_hide": 1
   }
- ], 
- "icon": "icon-shopping-cart", 
- "idx": 1, 
- "is_submittable": 1, 
- "modified": "2014-12-24 14:28:56.009809", 
- "modified_by": "Administrator", 
- "module": "Buying", 
- "name": "Supplier Quotation", 
- "owner": "Administrator", 
+ ],
+ "icon": "icon-shopping-cart",
+ "idx": 1,
+ "is_submittable": 1,
+ "modified": "2014-12-24 14:28:56.009809",
+ "modified_by": "Administrator",
+ "module": "Buying",
+ "name": "Supplier Quotation",
+ "owner": "Administrator",
  "permissions": [
   {
-   "amend": 1, 
-   "cancel": 1, 
-   "create": 1, 
-   "delete": 1, 
-   "email": 1, 
-   "permlevel": 0, 
-   "print": 1, 
-   "read": 1, 
-   "report": 1, 
-   "role": "Manufacturing Manager", 
-   "submit": 1, 
+   "amend": 1,
+   "cancel": 1,
+   "create": 1,
+   "delete": 1,
+   "email": 1,
+   "permlevel": 0,
+   "print": 1,
+   "read": 1,
+   "report": 1,
+   "role": "Manufacturing Manager",
+   "submit": 1,
    "write": 1
-  }, 
+  },
   {
-   "amend": 1, 
-   "cancel": 1, 
-   "create": 1, 
-   "delete": 1, 
-   "email": 1, 
-   "permlevel": 0, 
-   "print": 1, 
-   "read": 1, 
-   "report": 1, 
-   "role": "Purchase Manager", 
-   "submit": 1, 
+   "amend": 1,
+   "cancel": 1,
+   "create": 1,
+   "delete": 1,
+   "email": 1,
+   "permlevel": 0,
+   "print": 1,
+   "read": 1,
+   "report": 1,
+   "role": "Purchase Manager",
+   "submit": 1,
    "write": 1
-  }, 
+  },
   {
-   "amend": 1, 
-   "apply_user_permissions": 1, 
-   "cancel": 0, 
-   "create": 1, 
-   "delete": 0, 
-   "email": 1, 
-   "permlevel": 0, 
-   "print": 1, 
-   "read": 1, 
-   "report": 1, 
-   "role": "Purchase User", 
-   "submit": 0, 
+   "amend": 1,
+   "apply_user_permissions": 1,
+   "cancel": 0,
+   "create": 1,
+   "delete": 0,
+   "email": 1,
+   "permlevel": 0,
+   "print": 1,
+   "read": 1,
+   "report": 1,
+   "role": "Purchase User",
+   "submit": 0,
    "write": 1
-  }, 
+  },
   {
-   "amend": 0, 
-   "apply_user_permissions": 1, 
-   "cancel": 0, 
-   "create": 0, 
-   "delete": 0, 
-   "email": 1, 
-   "permlevel": 0, 
-   "print": 1, 
-   "read": 1, 
-   "report": 1, 
-   "role": "Material User", 
-   "submit": 0, 
+   "amend": 0,
+   "apply_user_permissions": 1,
+   "cancel": 0,
+   "create": 0,
+   "delete": 0,
+   "email": 1,
+   "permlevel": 0,
+   "print": 1,
+   "read": 1,
+   "report": 1,
+   "role": "Material User",
+   "submit": 0,
    "write": 0
-  }, 
+  },
   {
-   "amend": 0, 
-   "apply_user_permissions": 1, 
-   "cancel": 0, 
-   "create": 0, 
-   "delete": 0, 
-   "email": 1, 
-   "permlevel": 0, 
-   "print": 1, 
-   "read": 1, 
-   "report": 1, 
-   "role": "Supplier", 
-   "submit": 0, 
+   "amend": 0,
+   "apply_user_permissions": 1,
+   "cancel": 0,
+   "create": 0,
+   "delete": 0,
+   "email": 1,
+   "permlevel": 0,
+   "print": 1,
+   "read": 1,
+   "report": 1,
+   "role": "Supplier",
+   "submit": 0,
    "write": 0
-  }, 
+  },
   {
-   "permlevel": 1, 
-   "read": 1, 
-   "role": "Purchase Manager", 
+   "permlevel": 1,
+   "read": 1,
+   "role": "Purchase Manager",
    "write": 1
   }
- ], 
- "read_only_onload": 1, 
- "search_fields": "status, transaction_date, supplier,grand_total", 
- "sort_field": "modified", 
+ ],
+ "read_only_onload": 1,
+ "search_fields": "status, transaction_date, supplier,grand_total",
+ "sort_field": "modified",
  "sort_order": "DESC"
-}
\ No newline at end of file
+}
diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py
index 862fb84..cf8a11c 100644
--- a/erpnext/controllers/accounts_controller.py
+++ b/erpnext/controllers/accounts_controller.py
@@ -118,6 +118,10 @@
 							item.get(fieldname) is None and value is not None:
 								item.set(fieldname, value)
 
+						if fieldname == "cost_center" and item.meta.get_field("cost_center") \
+							and not item.get("cost_center") and value is not None:
+								item.set(fieldname, value)
+
 					if ret.get("pricing_rule"):
 						for field in ["base_price_list_rate", "price_list_rate",
 							"discount_percentage", "base_rate", "rate"]:
@@ -441,7 +445,7 @@
 				for order, jv_list in order_jv_map.items():
 					for jv in jv_list:
 						if not advance_jv_against_si or jv not in advance_jv_against_si:
-							frappe.throw(_("Journal Entry {0} is linked against Order {1}, hence it must be fetched as advance in Invoice as well.")
+							frappe.msgprint(_("Journal Entry {0} is linked against Order {1}, check if it should be pulled as advance in this invoice.")
 								.format(jv, order))
 
 
diff --git a/erpnext/controllers/recurring_document.py b/erpnext/controllers/recurring_document.py
index e16280d..a46fa32 100644
--- a/erpnext/controllers/recurring_document.py
+++ b/erpnext/controllers/recurring_document.py
@@ -124,10 +124,7 @@
 	frappe.sendmail(new_rv.notification_email_address,
 		subject=  _("New {0}: #{1}").format(new_rv.doctype, new_rv.name),
 		message = _("Please find attached {0} #{1}").format(new_rv.doctype, new_rv.name),
-		attachments = [{
-			"fname": new_rv.name + ".pdf",
-			"fcontent": frappe.get_print_format(new_rv.doctype, new_rv.name, as_pdf=True)
-		}])
+		attachments = [frappe.attach_print(new_rv.doctype, new_rv.name, file_name=new_rv.name)])
 
 def notify_errors(doc, doctype, party, owner):
 	from frappe.utils.user import get_system_managers
diff --git a/erpnext/hr/doctype/leave_application/leave_application.js b/erpnext/hr/doctype/leave_application/leave_application.js
index ecaac4a..9ba988e 100755
--- a/erpnext/hr/doctype/leave_application/leave_application.js
+++ b/erpnext/hr/doctype/leave_application/leave_application.js
@@ -118,3 +118,18 @@
 }
 
 cur_frm.fields_dict.employee.get_query = erpnext.queries.employee;
+
+frappe.ui.form.on("Leave Application", "leave_approver", function(frm) {
+	frappe.call({
+		"method": "frappe.client.get",
+		args: {
+			doctype: "User",
+			name: frm.doc.leave_approver
+		},
+		callback: function (data) {
+			frappe.model.set_value(frm.doctype, frm.docname, "leave_approver_name",
+				data.message.first_name
+				+ (data.message.last_name ? (" " + data.message.last_name) : ""))
+		}
+	})
+})
diff --git a/erpnext/hr/doctype/leave_application/leave_application.json b/erpnext/hr/doctype/leave_application/leave_application.json
index 9e2ad53..8beed8b 100644
--- a/erpnext/hr/doctype/leave_application/leave_application.json
+++ b/erpnext/hr/doctype/leave_application/leave_application.json
@@ -25,6 +25,13 @@
    "permlevel": 0
   }, 
   {
+   "fieldname": "leave_approver_name", 
+   "fieldtype": "Read Only", 
+   "label": "Leave Approver Name", 
+   "permlevel": 0, 
+   "precision": ""
+  }, 
+  {
    "fieldname": "leave_type", 
    "fieldtype": "Link", 
    "ignore_user_permissions": 1, 
@@ -184,7 +191,7 @@
  "idx": 1, 
  "is_submittable": 1, 
  "max_attachments": 3, 
- "modified": "2014-09-09 05:35:31.531651", 
+ "modified": "2014-12-09 16:33:29.626849", 
  "modified_by": "Administrator", 
  "module": "HR", 
  "name": "Leave Application", 
diff --git a/erpnext/hr/doctype/leave_application/leave_application.py b/erpnext/hr/doctype/leave_application/leave_application.py
index ac12618..a7eeeae 100755
--- a/erpnext/hr/doctype/leave_application/leave_application.py
+++ b/erpnext/hr/doctype/leave_application/leave_application.py
@@ -207,15 +207,15 @@
 def get_holidays(leave_app):
 	tot_hol = frappe.db.sql("""select count(*) from `tabHoliday` h1, `tabHoliday List` h2, `tabEmployee` e1
 		where e1.name = %s and h1.parent = h2.name and e1.holiday_list = h2.name
-		and h1.holiday_date between %s and %s""", (leave_app.employee, leave_app.from_date, leave_app.to_date))
+		and h1.holiday_date between %s and %s""", (leave_app.employee, leave_app.from_date,
+			leave_app.to_date))[0][0]
 	# below line is needed. If an employee hasn't been assigned with any holiday list then above will return 0 rows.
-	tot_hol=tot_hol and flt(tot_hol[0][0]) or 0	
 	if not tot_hol:
 		tot_hol = frappe.db.sql("""select count(*) from `tabHoliday` h1, `tabHoliday List` h2
 			where h1.parent = h2.name and h1.holiday_date between %s and %s
 			and ifnull(h2.is_default,0) = 1 and h2.fiscal_year = %s""",
-			(leave_app.from_date, leave_app.to_date, leave_app.fiscal_year))
-	return tot_hol and flt(tot_hol[0][0]) or 0
+			(leave_app.from_date, leave_app.to_date, leave_app.fiscal_year))[0][0]
+	return tot_hol
 
 @frappe.whitelist()
 def get_total_leave_days(leave_app):
diff --git a/erpnext/hr/doctype/salary_slip/salary_slip.py b/erpnext/hr/doctype/salary_slip/salary_slip.py
index daaba29..3e15cd9 100644
--- a/erpnext/hr/doctype/salary_slip/salary_slip.py
+++ b/erpnext/hr/doctype/salary_slip/salary_slip.py
@@ -189,9 +189,6 @@
 		if receiver:
 			subj = 'Salary Slip - ' + cstr(self.month) +'/'+cstr(self.fiscal_year)
 			frappe.sendmail([receiver], subject=subj, msg = _("Please see attachment"),
-				attachments=[{
-					"fname": self.name + ".pdf",
-					"fcontent": frappe.get_print_format(self.doctype, self.name, as_pdf = True)
-				}])
+				attachments=[frappe.attach_print(self.doctype, self.name, file_name=self.name)])
 		else:
 			msgprint(_("Company Email ID not found, hence mail not sent"))
diff --git a/erpnext/manufacturing/doctype/bom/bom.js b/erpnext/manufacturing/doctype/bom/bom.js
index a6c7055..2ac11dc 100644
--- a/erpnext/manufacturing/doctype/bom/bom.js
+++ b/erpnext/manufacturing/doctype/bom/bom.js
@@ -57,6 +57,7 @@
 }
 
 cur_frm.cscript.time_in_mins = cur_frm.cscript.hour_rate;
+cur_frm.cscript.fixed_cycle_cost = cur_frm.cscript.hour_rate;
 
 cur_frm.cscript.item_code = function(doc, cdt, cdn) {
 	get_bom_material_detail(doc, cdt, cdn);
diff --git a/erpnext/manufacturing/doctype/bom/bom.py b/erpnext/manufacturing/doctype/bom/bom.py
index 3f9d8ff..afdf10f 100644
--- a/erpnext/manufacturing/doctype/bom/bom.py
+++ b/erpnext/manufacturing/doctype/bom/bom.py
@@ -56,6 +56,9 @@
 			last_purchase_rate
 			from `tabItem` where name=%s""", item_code, as_dict = 1)
 
+		if not item:
+			frappe.throw(_("Item: {0} does not exist in the system").format(item_code))
+
 		return item
 
 	def validate_rm_item(self, item):
diff --git a/erpnext/patches.txt b/erpnext/patches.txt
index f7b1670..32c0cc5 100644
--- a/erpnext/patches.txt
+++ b/erpnext/patches.txt
@@ -90,6 +90,7 @@
 erpnext.patches.v4_2.party_model
 erpnext.patches.v4_4.make_email_accounts
 execute:frappe.delete_doc("DocType", "Contact Control")
+erpnext.patches.v4_2.recalculate_bom_costs
 erpnext.patches.v5_0.update_frozen_accounts_permission_role
 erpnext.patches.v5_0.update_dn_against_doc_fields
 execute:frappe.db.sql("update `tabMaterial Request` set material_request_type = 'Material Transfer' where material_request_type = 'Transfer'")
diff --git a/erpnext/patches/v4_1/fix_jv_remarks.py b/erpnext/patches/v4_1/fix_jv_remarks.py
index 55e3800..513fb7f 100644
--- a/erpnext/patches/v4_1/fix_jv_remarks.py
+++ b/erpnext/patches/v4_1/fix_jv_remarks.py
@@ -6,8 +6,9 @@
 
 def execute():
 	reference_date = guess_reference_date()
+	frappe.reload_doc('accounts', 'doctype', 'journal_voucher_detail')
 	for name in frappe.db.sql_list("""select name from `tabJournal Entry`
-		where date(creation)>=%s""", reference_date):
+			where date(creation)>=%s""", reference_date):
 		jv = frappe.get_doc("Journal Entry", name)
 		try:
 			jv.create_remarks()
diff --git a/erpnext/patches/v4_2/recalculate_bom_costs.py b/erpnext/patches/v4_2/recalculate_bom_costs.py
new file mode 100644
index 0000000..37f0413
--- /dev/null
+++ b/erpnext/patches/v4_2/recalculate_bom_costs.py
@@ -0,0 +1,19 @@
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
+# License: GNU General Public License v3. See license.txt
+
+from __future__ import unicode_literals
+import frappe
+
+def execute():
+	frappe.reload_doc('manufacturing', 'doctype', 'bom_operation')
+	for d in frappe.db.sql("""select bom.name from `tabBOM` bom where bom.docstatus < 2 and
+		exists(select bom_op.name from `tabBOM Operation` bom_op where
+		bom.name = bom_op.parent and bom_op.fixed_cycle_cost IS NOT NULL)""", as_dict=1):
+		try:
+			bom = frappe.get_doc('BOM', d.name)
+			bom.ignore_validate_update_after_submit = True
+			bom.calculate_cost()
+			bom.save()
+			frappe.db.commit()
+		except:
+			frappe.db.rollback()
diff --git a/erpnext/projects/doctype/time_log/test_time_log.py b/erpnext/projects/doctype/time_log/test_time_log.py
index bfc4c05..8955c28 100644
--- a/erpnext/projects/doctype/time_log/test_time_log.py
+++ b/erpnext/projects/doctype/time_log/test_time_log.py
@@ -22,12 +22,12 @@
 		self.assertRaises(OverlapError, ts.insert)
 
 		frappe.db.sql("delete from `tabTime Log`")
-		
+
 	def test_production_order_status(self):
 		prod_order = make_prod_order(self)
-		
+
 		prod_order.save()
-		
+
 		time_log = frappe.get_doc({
 			"doctype": "Time Log",
 			"time_log_for": "Manufacturing",
@@ -36,15 +36,15 @@
 			"from_time": "2014-12-26 00:00:00",
 			"to_time": "2014-12-26 00:00:00"
 		})
-		
+
 		self.assertRaises(NotSubmittedError, time_log.save)
-		
-	def test_time_log_on_holiday(self):	
+
+	def test_time_log_on_holiday(self):
 		prod_order = make_prod_order(self)
-		
+
 		prod_order.save()
 		prod_order.submit()
-		
+
 		time_log = frappe.get_doc({
 			"doctype": "Time Log",
 			"time_log_for": "Manufacturing",
@@ -55,18 +55,27 @@
 			"workstation": "_Test Workstation 1"
 		})
 		self.assertRaises(WorkstationHolidayError , time_log.save)
-		
+
 		time_log.update({
 			"from_time": "2013-02-02 09:00:00",
 			"to_time": "2013-02-02 20:00:00"
 		})
 		self.assertRaises(WorkstationIsClosedError , time_log.save)
-		
+
 		time_log.from_time= "2013-02-02 09:30:00"
 		time_log.save()
 		time_log.submit()
 		time_log.cancel()
-		
+
+	def test_negative_hours(self):
+		frappe.db.sql("delete from `tabTime Log`")
+		test_time_log = frappe.new_doc("Time Log")
+		test_time_log.activity_type = "Communication"
+		test_time_log.from_time = "2013-01-01 11:00:00.000000"
+		test_time_log.to_time = "2013-01-01 10:00:00.000000"
+		self.assertRaises(frappe.ValidationError, test_time_log.save)
+		frappe.db.sql("delete from `tabTime Log`")
+
 def make_prod_order(self):
 	return frappe.get_doc({
 			"doctype":"Production Order",
@@ -76,6 +85,6 @@
 			"wip_warehouse": "_Test Warehouse - _TC",
 			"fg_warehouse": "_Test Warehouse 1 - _TC"
 		})
-		
+
 test_records = frappe.get_test_records('Time Log')
 test_ignore = ["Time Log Batch", "Sales Invoice"]
diff --git a/erpnext/public/js/stock_analytics.js b/erpnext/public/js/stock_analytics.js
index 091836f..57b69cb 100644
--- a/erpnext/public/js/stock_analytics.js
+++ b/erpnext/public/js/stock_analytics.js
@@ -108,6 +108,7 @@
 			// otherwise, only reset values
 			$.each(this.data, function(i, d) {
 				me.reset_item_values(d);
+				d["closing_qty_value"] = 0;
 			});
 		}
 
diff --git a/erpnext/public/js/templates/contact_list.html b/erpnext/public/js/templates/contact_list.html
index c4c058c..94af7ef 100644
--- a/erpnext/public/js/templates/contact_list.html
+++ b/erpnext/public/js/templates/contact_list.html
@@ -14,8 +14,11 @@
             {% if(contact_list[i].phone) { %}
                 {%= __("Phone") %}: {%= contact_list[i].phone %}<br>
             {% } %}
+            {% if(contact_list[i].mobile_no) { %}
+                {%= __("Mobile No.") %}: {%= contact_list[i].mobile_no %}<br>
+            {% } %}
             {% if(contact_list[i].email_id) { %}
-                {%= __("Email Id") %}: {%= contact_list[i].email_id %}
+                {%= __("Email ID") %}: {%= contact_list[i].email_id %}
             {% } %}
         </p>
     </div>
diff --git a/erpnext/public/js/transaction.js b/erpnext/public/js/transaction.js
index f0f4b5d..69f5c03 100644
--- a/erpnext/public/js/transaction.js
+++ b/erpnext/public/js/transaction.js
@@ -421,20 +421,32 @@
 	},
 
 	_set_values_for_item_list: function(children) {
+		var me = this;
+		var price_list_rate_changed = false;
 		$.each(children, function(i, d) {
+			var existing_pricing_rule = frappe.model.get_value(d.doctype, d.name, "pricing_rule");
 			$.each(d, function(k, v) {
 				if (["doctype", "name"].indexOf(k)===-1) {
+					if(k=="price_list_rate") {
+						if(flt(v) != flt(d.price_list_rate)) price_list_rate_changed = true;
+					}
 					frappe.model.set_value(d.doctype, d.name, k, v);
 				}
 			});
+			// if pricing rule set as blank from an existing value, apply price_list
+			if(!me.frm.doc.ignore_pricing_rule && existing_pricing_rule && !d.pricing_rule) {
+				me.apply_price_list(frappe.get_doc(d.doctype, d.name));
+			}
+
+			if(!price_list_rate_changed) me.calculate_taxes_and_totals();
 		});
 	},
 
-	apply_price_list: function() {
+	apply_price_list: function(item) {
 		var me = this;
 		return this.frm.call({
 			method: "erpnext.stock.get_item_details.apply_price_list",
-			args: {	args: this._get_args() },
+			args: {	args: this._get_args(item) },
 			callback: function(r) {
 				if (!r.exc) {
 					me.in_apply_price_list = true;
diff --git a/erpnext/selling/doctype/lead/lead.json b/erpnext/selling/doctype/lead/lead.json
index b78ca4f..db5e1a5 100644
--- a/erpnext/selling/doctype/lead/lead.json
+++ b/erpnext/selling/doctype/lead/lead.json
@@ -1,426 +1,426 @@
 {
- "allow_import": 1, 
- "autoname": "naming_series:", 
- "creation": "2013-04-10 11:45:37", 
- "docstatus": 0, 
- "doctype": "DocType", 
- "document_type": "Master", 
+ "allow_import": 1,
+ "autoname": "naming_series:",
+ "creation": "2013-04-10 11:45:37",
+ "docstatus": 0,
+ "doctype": "DocType",
+ "document_type": "Master",
  "fields": [
   {
-   "fieldname": "lead_details", 
-   "fieldtype": "Section Break", 
-   "label": "Lead Details", 
-   "options": "icon-user", 
+   "fieldname": "lead_details",
+   "fieldtype": "Section Break",
+   "label": "Lead Details",
+   "options": "icon-user",
    "permlevel": 0
-  }, 
+  },
   {
-   "fieldname": "naming_series", 
-   "fieldtype": "Select", 
-   "label": "Series", 
-   "no_copy": 1, 
-   "oldfieldname": "naming_series", 
-   "oldfieldtype": "Select", 
-   "options": "LEAD-", 
-   "permlevel": 0, 
+   "fieldname": "naming_series",
+   "fieldtype": "Select",
+   "label": "Series",
+   "no_copy": 1,
+   "oldfieldname": "naming_series",
+   "oldfieldtype": "Select",
+   "options": "LEAD-",
+   "permlevel": 0,
    "reqd": 0
-  }, 
+  },
   {
-   "fieldname": "lead_name", 
-   "fieldtype": "Data", 
-   "in_filter": 1, 
-   "in_list_view": 1, 
-   "label": "Contact Name", 
-   "oldfieldname": "lead_name", 
-   "oldfieldtype": "Data", 
-   "permlevel": 0, 
-   "reqd": 1, 
+   "fieldname": "lead_name",
+   "fieldtype": "Data",
+   "in_filter": 1,
+   "in_list_view": 1,
+   "label": "Contact Name",
+   "oldfieldname": "lead_name",
+   "oldfieldtype": "Data",
+   "permlevel": 0,
+   "reqd": 1,
    "search_index": 1
-  }, 
+  },
   {
-   "fieldname": "company_name", 
-   "fieldtype": "Data", 
-   "in_filter": 1, 
-   "in_list_view": 1, 
-   "label": "Organization Name", 
-   "oldfieldname": "company_name", 
-   "oldfieldtype": "Data", 
-   "permlevel": 0, 
-   "reqd": 0, 
+   "fieldname": "company_name",
+   "fieldtype": "Data",
+   "in_filter": 1,
+   "in_list_view": 1,
+   "label": "Organization Name",
+   "oldfieldname": "company_name",
+   "oldfieldtype": "Data",
+   "permlevel": 0,
+   "reqd": 0,
    "search_index": 0
-  }, 
+  },
   {
-   "fieldname": "email_id", 
-   "fieldtype": "Data", 
-   "label": "Email Id", 
-   "oldfieldname": "email_id", 
-   "oldfieldtype": "Data", 
-   "permlevel": 0, 
-   "reqd": 0, 
+   "fieldname": "email_id",
+   "fieldtype": "Data",
+   "label": "Email Id",
+   "oldfieldname": "email_id",
+   "oldfieldtype": "Data",
+   "permlevel": 0,
+   "reqd": 0,
    "search_index": 1
-  }, 
+  },
   {
-   "default": "Lead", 
-   "fieldname": "status", 
-   "fieldtype": "Select", 
-   "in_filter": 1, 
-   "in_list_view": 1, 
-   "label": "Status", 
-   "no_copy": 1, 
-   "oldfieldname": "status", 
-   "oldfieldtype": "Select", 
-   "options": "Lead\nOpen\nReplied\nOpportunity\nInterested\nConverted\nDo Not Contact", 
-   "permlevel": 0, 
-   "reqd": 1, 
+   "default": "Lead",
+   "fieldname": "status",
+   "fieldtype": "Select",
+   "in_filter": 1,
+   "in_list_view": 1,
+   "label": "Status",
+   "no_copy": 1,
+   "oldfieldname": "status",
+   "oldfieldtype": "Select",
+   "options": "Lead\nOpen\nReplied\nOpportunity\nInterested\nConverted\nDo Not Contact",
+   "permlevel": 0,
+   "reqd": 1,
    "search_index": 1
-  }, 
+  },
   {
-   "fieldname": "source", 
-   "fieldtype": "Select", 
-   "in_filter": 1, 
-   "in_list_view": 1, 
-   "label": "Source", 
-   "no_copy": 1, 
-   "oldfieldname": "source", 
-   "oldfieldtype": "Select", 
-   "options": "\nAdvertisement\nBlog Post\nCampaign\nCall\nCustomer\nExhibition\nSupplier\nWebsite\nEmail", 
-   "permlevel": 0, 
-   "reqd": 0, 
+   "fieldname": "source",
+   "fieldtype": "Select",
+   "in_filter": 1,
+   "in_list_view": 1,
+   "label": "Source",
+   "no_copy": 1,
+   "oldfieldname": "source",
+   "oldfieldtype": "Select",
+   "options": "\nAdvertisement\nBlog Post\nCampaign\nCall\nCustomer\nExhibition\nSupplier\nWebsite\nEmail",
+   "permlevel": 0,
+   "reqd": 0,
    "search_index": 0
-  }, 
+  },
   {
-   "fieldname": "col_break123", 
-   "fieldtype": "Column Break", 
-   "permlevel": 0, 
+   "fieldname": "col_break123",
+   "fieldtype": "Column Break",
+   "permlevel": 0,
    "width": "50%"
-  }, 
+  },
   {
-   "depends_on": "eval:doc.source == 'Customer'", 
-   "fieldname": "customer", 
-   "fieldtype": "Link", 
-   "hidden": 0, 
-   "label": "From Customer", 
-   "oldfieldname": "customer", 
-   "oldfieldtype": "Link", 
-   "options": "Customer", 
+   "depends_on": "eval:doc.source == 'Customer'",
+   "fieldname": "customer",
+   "fieldtype": "Link",
+   "hidden": 0,
+   "label": "From Customer",
+   "oldfieldname": "customer",
+   "oldfieldtype": "Link",
+   "options": "Customer",
    "permlevel": 0
-  }, 
+  },
   {
-   "depends_on": "eval:doc.source == 'Campaign'", 
-   "description": "Enter campaign name if the source of lead is campaign.", 
-   "fieldname": "campaign_name", 
-   "fieldtype": "Link", 
-   "hidden": 0, 
-   "label": "Campaign Name", 
-   "oldfieldname": "campaign_name", 
-   "oldfieldtype": "Link", 
-   "options": "Campaign", 
+   "depends_on": "eval:doc.source == 'Campaign'",
+   "description": "Enter campaign name if the source of lead is campaign.",
+   "fieldname": "campaign_name",
+   "fieldtype": "Link",
+   "hidden": 0,
+   "label": "Campaign Name",
+   "oldfieldname": "campaign_name",
+   "oldfieldtype": "Link",
+   "options": "Campaign",
    "permlevel": 0
-  }, 
+  },
   {
-   "default": "__user", 
-   "fieldname": "lead_owner", 
-   "fieldtype": "Link", 
-   "in_filter": 1, 
-   "label": "Lead Owner", 
-   "oldfieldname": "lead_owner", 
-   "oldfieldtype": "Link", 
-   "options": "User", 
-   "permlevel": 0, 
+   "default": "__user",
+   "fieldname": "lead_owner",
+   "fieldtype": "Link",
+   "in_filter": 1,
+   "label": "Lead Owner",
+   "oldfieldname": "lead_owner",
+   "oldfieldtype": "Link",
+   "options": "User",
+   "permlevel": 0,
    "search_index": 1
-  }, 
+  },
   {
-   "allow_on_submit": 0, 
-   "fieldname": "contact_by", 
-   "fieldtype": "Link", 
-   "hidden": 0, 
-   "in_filter": 1, 
-   "label": "Next Contact By", 
-   "oldfieldname": "contact_by", 
-   "oldfieldtype": "Link", 
-   "options": "User", 
-   "permlevel": 0, 
-   "print_hide": 0, 
-   "reqd": 0, 
+   "allow_on_submit": 0,
+   "fieldname": "contact_by",
+   "fieldtype": "Link",
+   "hidden": 0,
+   "in_filter": 1,
+   "label": "Next Contact By",
+   "oldfieldname": "contact_by",
+   "oldfieldtype": "Link",
+   "options": "User",
+   "permlevel": 0,
+   "print_hide": 0,
+   "reqd": 0,
    "width": "100px"
-  }, 
+  },
   {
-   "allow_on_submit": 0, 
-   "description": "Add to calendar on this date", 
-   "fieldname": "contact_date", 
-   "fieldtype": "Date", 
-   "in_filter": 1, 
-   "label": "Next Contact Date", 
-   "no_copy": 1, 
-   "oldfieldname": "contact_date", 
-   "oldfieldtype": "Date", 
-   "permlevel": 0, 
-   "reqd": 0, 
+   "allow_on_submit": 0,
+   "description": "Add to calendar on this date",
+   "fieldname": "contact_date",
+   "fieldtype": "Datetime",
+   "in_filter": 1,
+   "label": "Next Contact Date",
+   "no_copy": 1,
+   "oldfieldname": "contact_date",
+   "oldfieldtype": "Date",
+   "permlevel": 0,
+   "reqd": 0,
    "width": "100px"
-  }, 
+  },
   {
-   "fieldname": "fold", 
-   "fieldtype": "Fold", 
-   "label": "fold", 
+   "fieldname": "fold",
+   "fieldtype": "Fold",
+   "label": "fold",
    "permlevel": 0
-  }, 
+  },
   {
-   "fieldname": "contact_info", 
-   "fieldtype": "Section Break", 
-   "label": "Address & Contact", 
-   "oldfieldtype": "Column Break", 
-   "options": "icon-map-marker", 
+   "fieldname": "contact_info",
+   "fieldtype": "Section Break",
+   "label": "Address & Contact",
+   "oldfieldtype": "Column Break",
+   "options": "icon-map-marker",
    "permlevel": 0
-  }, 
+  },
   {
-   "depends_on": "eval:doc.__islocal", 
-   "fieldname": "address_desc", 
-   "fieldtype": "HTML", 
-   "hidden": 0, 
-   "label": "Address Desc", 
-   "options": "<em>Addresses will appear only when you save the lead</em>", 
-   "permlevel": 0, 
+   "depends_on": "eval:doc.__islocal",
+   "fieldname": "address_desc",
+   "fieldtype": "HTML",
+   "hidden": 0,
+   "label": "Address Desc",
+   "options": "<em>Addresses will appear only when you save the lead</em>",
+   "permlevel": 0,
    "print_hide": 1
-  }, 
+  },
   {
-   "fieldname": "address_html", 
-   "fieldtype": "HTML", 
-   "hidden": 0, 
-   "label": "Address HTML", 
-   "permlevel": 0, 
-   "print_hide": 0, 
+   "fieldname": "address_html",
+   "fieldtype": "HTML",
+   "hidden": 0,
+   "label": "Address HTML",
+   "permlevel": 0,
+   "print_hide": 0,
    "read_only": 1
-  }, 
+  },
   {
-   "fieldname": "column_break2", 
-   "fieldtype": "Column Break", 
+   "fieldname": "column_break2",
+   "fieldtype": "Column Break",
    "permlevel": 0
-  }, 
+  },
   {
-   "fieldname": "phone", 
-   "fieldtype": "Data", 
-   "label": "Phone", 
-   "oldfieldname": "contact_no", 
-   "oldfieldtype": "Data", 
-   "permlevel": 0, 
+   "fieldname": "phone",
+   "fieldtype": "Data",
+   "label": "Phone",
+   "oldfieldname": "contact_no",
+   "oldfieldtype": "Data",
+   "permlevel": 0,
    "reqd": 0
-  }, 
+  },
   {
-   "fieldname": "mobile_no", 
-   "fieldtype": "Data", 
-   "label": "Mobile No.", 
-   "oldfieldname": "mobile_no", 
-   "oldfieldtype": "Data", 
+   "fieldname": "mobile_no",
+   "fieldtype": "Data",
+   "label": "Mobile No.",
+   "oldfieldname": "mobile_no",
+   "oldfieldtype": "Data",
    "permlevel": 0
-  }, 
+  },
   {
-   "fieldname": "fax", 
-   "fieldtype": "Data", 
-   "label": "Fax", 
-   "oldfieldname": "fax", 
-   "oldfieldtype": "Data", 
+   "fieldname": "fax",
+   "fieldtype": "Data",
+   "label": "Fax",
+   "oldfieldname": "fax",
+   "oldfieldtype": "Data",
    "permlevel": 0
-  }, 
+  },
   {
-   "fieldname": "website", 
-   "fieldtype": "Data", 
-   "label": "Website", 
-   "oldfieldname": "website", 
-   "oldfieldtype": "Data", 
+   "fieldname": "website",
+   "fieldtype": "Data",
+   "label": "Website",
+   "oldfieldname": "website",
+   "oldfieldtype": "Data",
    "permlevel": 0
-  }, 
+  },
   {
-   "description": "<a href=\"#Sales Browser/Territory\">Add / Edit</a>", 
-   "fieldname": "territory", 
-   "fieldtype": "Link", 
-   "label": "Territory", 
-   "oldfieldname": "territory", 
-   "oldfieldtype": "Link", 
-   "options": "Territory", 
-   "permlevel": 0, 
+   "description": "<a href=\"#Sales Browser/Territory\">Add / Edit</a>",
+   "fieldname": "territory",
+   "fieldtype": "Link",
+   "label": "Territory",
+   "oldfieldname": "territory",
+   "oldfieldtype": "Link",
+   "options": "Territory",
+   "permlevel": 0,
    "print_hide": 1
-  }, 
+  },
   {
-   "fieldname": "more_info", 
-   "fieldtype": "Section Break", 
-   "label": "More Info", 
-   "oldfieldtype": "Section Break", 
-   "options": "icon-file-text", 
+   "fieldname": "more_info",
+   "fieldtype": "Section Break",
+   "label": "More Info",
+   "oldfieldtype": "Section Break",
+   "options": "icon-file-text",
    "permlevel": 0
-  }, 
+  },
   {
-   "fieldname": "type", 
-   "fieldtype": "Select", 
-   "in_filter": 1, 
-   "label": "Lead Type", 
-   "oldfieldname": "type", 
-   "oldfieldtype": "Select", 
-   "options": "\nClient\nChannel Partner\nConsultant", 
+   "fieldname": "type",
+   "fieldtype": "Select",
+   "in_filter": 1,
+   "label": "Lead Type",
+   "oldfieldname": "type",
+   "oldfieldtype": "Select",
+   "options": "\nClient\nChannel Partner\nConsultant",
    "permlevel": 0
-  }, 
+  },
   {
-   "fieldname": "market_segment", 
-   "fieldtype": "Select", 
-   "hidden": 0, 
-   "in_filter": 1, 
-   "label": "Market Segment", 
-   "oldfieldname": "market_segment", 
-   "oldfieldtype": "Select", 
-   "options": "\nLower Income\nMiddle Income\nUpper Income", 
-   "permlevel": 0, 
-   "reqd": 0, 
+   "fieldname": "market_segment",
+   "fieldtype": "Select",
+   "hidden": 0,
+   "in_filter": 1,
+   "label": "Market Segment",
+   "oldfieldname": "market_segment",
+   "oldfieldtype": "Select",
+   "options": "\nLower Income\nMiddle Income\nUpper Income",
+   "permlevel": 0,
+   "reqd": 0,
    "search_index": 0
-  }, 
+  },
   {
-   "fieldname": "industry", 
-   "fieldtype": "Link", 
-   "label": "Industry", 
-   "oldfieldname": "industry", 
-   "oldfieldtype": "Link", 
-   "options": "Industry Type", 
+   "fieldname": "industry",
+   "fieldtype": "Link",
+   "label": "Industry",
+   "oldfieldname": "industry",
+   "oldfieldtype": "Link",
+   "options": "Industry Type",
    "permlevel": 0
-  }, 
+  },
   {
-   "fieldname": "request_type", 
-   "fieldtype": "Select", 
-   "label": "Request Type", 
-   "oldfieldname": "request_type", 
-   "oldfieldtype": "Select", 
-   "options": "\nProduct Enquiry\nRequest for Information\nSuggestions\nOther", 
+   "fieldname": "request_type",
+   "fieldtype": "Select",
+   "label": "Request Type",
+   "oldfieldname": "request_type",
+   "oldfieldtype": "Select",
+   "options": "\nProduct Enquiry\nRequest for Information\nSuggestions\nOther",
    "permlevel": 0
-  }, 
+  },
   {
-   "fieldname": "fiscal_year", 
-   "fieldtype": "Link", 
-   "hidden": 1, 
-   "in_filter": 1, 
-   "label": "Fiscal Year", 
-   "oldfieldname": "fiscal_year", 
-   "oldfieldtype": "Select", 
-   "options": "Fiscal Year", 
+   "fieldname": "fiscal_year",
+   "fieldtype": "Link",
+   "hidden": 1,
+   "in_filter": 1,
+   "label": "Fiscal Year",
+   "oldfieldname": "fiscal_year",
+   "oldfieldtype": "Select",
+   "options": "Fiscal Year",
    "permlevel": 0
-  }, 
+  },
   {
-   "fieldname": "column_break3", 
-   "fieldtype": "Column Break", 
-   "oldfieldtype": "Column Break", 
-   "permlevel": 0, 
+   "fieldname": "column_break3",
+   "fieldtype": "Column Break",
+   "oldfieldtype": "Column Break",
+   "permlevel": 0,
    "width": "50%"
-  }, 
+  },
   {
-   "fieldname": "company", 
-   "fieldtype": "Link", 
-   "label": "Company", 
-   "oldfieldname": "company", 
-   "oldfieldtype": "Link", 
-   "options": "Company", 
-   "permlevel": 0, 
+   "fieldname": "company",
+   "fieldtype": "Link",
+   "label": "Company",
+   "oldfieldname": "company",
+   "oldfieldtype": "Link",
+   "options": "Company",
+   "permlevel": 0,
    "reqd": 0
-  }, 
+  },
   {
-   "fieldname": "unsubscribed", 
-   "fieldtype": "Check", 
-   "label": "Unsubscribed", 
+   "fieldname": "unsubscribed",
+   "fieldtype": "Check",
+   "label": "Unsubscribed",
    "permlevel": 0
-  }, 
+  },
   {
-   "fieldname": "blog_subscriber", 
-   "fieldtype": "Check", 
-   "label": "Blog Subscriber", 
+   "fieldname": "blog_subscriber",
+   "fieldtype": "Check",
+   "label": "Blog Subscriber",
    "permlevel": 0
   }
- ], 
- "icon": "icon-user", 
- "idx": 1, 
- "modified": "2014-09-11 18:52:50.397563", 
- "modified_by": "Administrator", 
- "module": "Selling", 
- "name": "Lead", 
- "owner": "Administrator", 
+ ],
+ "icon": "icon-user",
+ "idx": 1,
+ "modified": "2014-12-01 08:22:23.286314",
+ "modified_by": "Administrator",
+ "module": "Selling",
+ "name": "Lead",
+ "owner": "Administrator",
  "permissions": [
   {
-   "amend": 0, 
-   "cancel": 0, 
-   "create": 0, 
-   "delete": 0, 
-   "match": "", 
-   "permlevel": 1, 
-   "read": 1, 
-   "report": 1, 
-   "role": "All", 
-   "submit": 0, 
+   "amend": 0,
+   "cancel": 0,
+   "create": 0,
+   "delete": 0,
+   "match": "",
+   "permlevel": 1,
+   "read": 1,
+   "report": 1,
+   "role": "All",
+   "submit": 0,
    "write": 0
-  }, 
+  },
   {
-   "amend": 0, 
-   "cancel": 0, 
-   "create": 1, 
-   "delete": 0, 
-   "email": 1, 
-   "permlevel": 0, 
-   "print": 1, 
-   "read": 1, 
-   "report": 1, 
-   "role": "Sales User", 
-   "submit": 0, 
+   "amend": 0,
+   "cancel": 0,
+   "create": 1,
+   "delete": 0,
+   "email": 1,
+   "permlevel": 0,
+   "print": 1,
+   "read": 1,
+   "report": 1,
+   "role": "Sales User",
+   "submit": 0,
    "write": 1
-  }, 
+  },
   {
-   "amend": 0, 
-   "cancel": 0, 
-   "create": 1, 
-   "delete": 1, 
-   "email": 1, 
-   "permlevel": 0, 
-   "print": 1, 
-   "read": 1, 
-   "report": 1, 
-   "role": "Sales Manager", 
-   "submit": 0, 
+   "amend": 0,
+   "cancel": 0,
+   "create": 1,
+   "delete": 1,
+   "email": 1,
+   "permlevel": 0,
+   "print": 1,
+   "read": 1,
+   "report": 1,
+   "role": "Sales Manager",
+   "submit": 0,
    "write": 1
-  }, 
+  },
   {
-   "amend": 0, 
-   "cancel": 0, 
-   "create": 1, 
-   "delete": 0, 
-   "email": 1, 
-   "permlevel": 0, 
-   "print": 1, 
-   "read": 1, 
-   "report": 1, 
-   "role": "System Manager", 
-   "submit": 0, 
+   "amend": 0,
+   "cancel": 0,
+   "create": 1,
+   "delete": 0,
+   "email": 1,
+   "permlevel": 0,
+   "print": 1,
+   "read": 1,
+   "report": 1,
+   "role": "System Manager",
+   "submit": 0,
    "write": 1
-  }, 
+  },
   {
-   "amend": 0, 
-   "cancel": 0, 
-   "create": 0, 
-   "delete": 0, 
-   "match": "", 
-   "permlevel": 1, 
-   "read": 1, 
-   "report": 1, 
-   "role": "Sales Manager", 
-   "submit": 0, 
+   "amend": 0,
+   "cancel": 0,
+   "create": 0,
+   "delete": 0,
+   "match": "",
+   "permlevel": 1,
+   "read": 1,
+   "report": 1,
+   "role": "Sales Manager",
+   "submit": 0,
    "write": 0
-  }, 
+  },
   {
-   "amend": 0, 
-   "cancel": 0, 
-   "create": 0, 
-   "delete": 0, 
-   "match": "", 
-   "permlevel": 1, 
-   "read": 1, 
-   "report": 1, 
-   "role": "Sales User", 
-   "submit": 0, 
+   "amend": 0,
+   "cancel": 0,
+   "create": 0,
+   "delete": 0,
+   "match": "",
+   "permlevel": 1,
+   "read": 1,
+   "report": 1,
+   "role": "Sales User",
+   "submit": 0,
    "write": 0
   }
- ], 
- "search_fields": "lead_name,lead_owner,status", 
- "sort_field": "modified", 
- "sort_order": "DESC", 
+ ],
+ "search_fields": "lead_name,lead_owner,status",
+ "sort_field": "modified",
+ "sort_order": "DESC",
  "title_field": "lead_name"
-}
\ No newline at end of file
+}
diff --git a/erpnext/selling/doctype/lead/lead.py b/erpnext/selling/doctype/lead/lead.py
index 48cdee9..47d9b02 100644
--- a/erpnext/selling/doctype/lead/lead.py
+++ b/erpnext/selling/doctype/lead/lead.py
@@ -48,6 +48,7 @@
 	def add_calendar_event(self, opts=None, force=False):
 		super(Lead, self).add_calendar_event({
 			"owner": self.lead_owner,
+			"starts_on": self.contact_date,
 			"subject": ('Contact ' + cstr(self.lead_name)),
 			"description": ('Contact ' + cstr(self.lead_name)) + \
 				(self.contact_by and ('. By : ' + cstr(self.contact_by)) or '')
diff --git a/erpnext/selling/doctype/opportunity/opportunity.js b/erpnext/selling/doctype/opportunity/opportunity.js
index 41986d5..2ca1878 100644
--- a/erpnext/selling/doctype/opportunity/opportunity.js
+++ b/erpnext/selling/doctype/opportunity/opportunity.js
@@ -28,7 +28,6 @@
 		if(!this.frm.doc.fiscal_year && sys_defaults.fiscal_year)
 			set_multiple(cdt, cdn, { fiscal_year:sys_defaults.fiscal_year });
 
-
 		if(this.frm.doc.customer && !this.frm.doc.customer_name) cur_frm.cscript.customer(this.frm.doc);
 
 		this.setup_queries();
@@ -152,4 +151,4 @@
 
 cur_frm.cscript.transaction_date = function(doc, cdt, cdn){
 	erpnext.get_fiscal_year(doc.company, doc.transaction_date);
-}
\ No newline at end of file
+}
diff --git a/erpnext/selling/doctype/opportunity/opportunity.json b/erpnext/selling/doctype/opportunity/opportunity.json
index 5b39b33..995bb27 100644
--- a/erpnext/selling/doctype/opportunity/opportunity.json
+++ b/erpnext/selling/doctype/opportunity/opportunity.json
@@ -1,430 +1,431 @@
 {
- "allow_import": 1, 
- "autoname": "naming_series:", 
- "creation": "2013-03-07 18:50:30", 
- "description": "Potential Sales Deal", 
- "docstatus": 0, 
- "doctype": "DocType", 
- "document_type": "Transaction", 
+ "allow_import": 1,
+ "autoname": "naming_series:",
+ "creation": "2013-03-07 18:50:30",
+ "description": "Potential Sales Deal",
+ "docstatus": 0,
+ "doctype": "DocType",
+ "document_type": "Transaction",
  "fields": [
   {
-   "fieldname": "from_section", 
-   "fieldtype": "Section Break", 
-   "label": "From", 
-   "options": "icon-user", 
+   "fieldname": "from_section",
+   "fieldtype": "Section Break",
+   "label": "From",
+   "options": "icon-user",
    "permlevel": 0
-  }, 
+  },
   {
-   "fieldname": "naming_series", 
-   "fieldtype": "Select", 
-   "label": "Series", 
-   "no_copy": 1, 
-   "oldfieldname": "naming_series", 
-   "oldfieldtype": "Select", 
-   "options": "OPTY-", 
-   "permlevel": 0, 
-   "read_only": 0, 
+   "fieldname": "naming_series",
+   "fieldtype": "Select",
+   "label": "Series",
+   "no_copy": 1,
+   "oldfieldname": "naming_series",
+   "oldfieldtype": "Select",
+   "options": "OPTY-",
+   "permlevel": 0,
+   "read_only": 0,
    "reqd": 1
-  }, 
+  },
   {
-   "fieldname": "enquiry_from", 
-   "fieldtype": "Select", 
-   "in_list_view": 1, 
-   "label": "Opportunity From", 
-   "oldfieldname": "enquiry_from", 
-   "oldfieldtype": "Select", 
-   "options": "\nLead\nCustomer", 
-   "permlevel": 0, 
-   "print_hide": 1, 
-   "read_only": 0, 
-   "report_hide": 0, 
+   "fieldname": "enquiry_from",
+   "fieldtype": "Select",
+   "in_list_view": 1,
+   "label": "Opportunity From",
+   "oldfieldname": "enquiry_from",
+   "oldfieldtype": "Select",
+   "options": "\nLead\nCustomer",
+   "permlevel": 0,
+   "print_hide": 1,
+   "read_only": 0,
+   "report_hide": 0,
    "reqd": 1
-  }, 
+  },
   {
-   "depends_on": "eval:doc.enquiry_from===\"Customer\"", 
-   "fieldname": "customer", 
-   "fieldtype": "Link", 
-   "hidden": 0, 
-   "in_filter": 1, 
-   "in_list_view": 1, 
-   "label": "Customer", 
-   "oldfieldname": "customer", 
-   "oldfieldtype": "Link", 
-   "options": "Customer", 
-   "permlevel": 0, 
-   "print_hide": 1, 
-   "read_only": 0, 
-   "reqd": 0, 
+   "depends_on": "eval:doc.enquiry_from===\"Customer\"",
+   "fieldname": "customer",
+   "fieldtype": "Link",
+   "hidden": 0,
+   "in_filter": 1,
+   "in_list_view": 1,
+   "label": "Customer",
+   "no_copy": 1,
+   "oldfieldname": "customer",
+   "oldfieldtype": "Link",
+   "options": "Customer",
+   "permlevel": 0,
+   "print_hide": 1,
+   "read_only": 0,
+   "reqd": 0,
    "search_index": 0
-  }, 
+  },
   {
-   "depends_on": "eval:doc.enquiry_from===\"Lead\"", 
-   "fieldname": "lead", 
-   "fieldtype": "Link", 
-   "hidden": 0, 
-   "in_filter": 1, 
-   "in_list_view": 1, 
-   "label": "Lead", 
-   "oldfieldname": "lead", 
-   "oldfieldtype": "Link", 
-   "options": "Lead", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "depends_on": "eval:doc.enquiry_from===\"Lead\"",
+   "fieldname": "lead",
+   "fieldtype": "Link",
+   "hidden": 0,
+   "in_filter": 1,
+   "in_list_view": 1,
+   "label": "Lead",
+   "oldfieldname": "lead",
+   "oldfieldtype": "Link",
+   "options": "Lead",
+   "permlevel": 0,
+   "print_hide": 1,
    "read_only": 0
-  }, 
+  },
   {
-   "depends_on": "eval:doc.customer || doc.lead", 
-   "fieldname": "customer_name", 
-   "fieldtype": "Data", 
-   "label": "Customer / Lead Name", 
-   "permlevel": 0, 
-   "print_hide": 0, 
+   "depends_on": "eval:doc.customer || doc.lead",
+   "fieldname": "customer_name",
+   "fieldtype": "Data",
+   "label": "Customer / Lead Name",
+   "permlevel": 0,
+   "print_hide": 0,
    "read_only": 1
-  }, 
+  },
   {
-   "fieldname": "column_break0", 
-   "fieldtype": "Column Break", 
-   "oldfieldtype": "Column Break", 
-   "permlevel": 0, 
-   "read_only": 0, 
+   "fieldname": "column_break0",
+   "fieldtype": "Column Break",
+   "oldfieldtype": "Column Break",
+   "permlevel": 0,
+   "read_only": 0,
    "width": "50%"
-  }, 
+  },
   {
-   "fieldname": "enquiry_type", 
-   "fieldtype": "Select", 
-   "label": "Opportunity Type", 
-   "oldfieldname": "enquiry_type", 
-   "oldfieldtype": "Select", 
-   "options": "\nSales\nMaintenance", 
-   "permlevel": 0, 
-   "read_only": 0, 
+   "fieldname": "enquiry_type",
+   "fieldtype": "Select",
+   "label": "Opportunity Type",
+   "oldfieldname": "enquiry_type",
+   "oldfieldtype": "Select",
+   "options": "\nSales\nMaintenance",
+   "permlevel": 0,
+   "read_only": 0,
    "reqd": 1
-  }, 
+  },
   {
-   "default": "Draft", 
-   "fieldname": "status", 
-   "fieldtype": "Select", 
-   "in_list_view": 1, 
-   "label": "Status", 
-   "no_copy": 1, 
-   "oldfieldname": "status", 
-   "oldfieldtype": "Select", 
-   "options": "Draft\nSubmitted\nQuotation\nLost\nCancelled\nReplied\nOpen", 
-   "permlevel": 0, 
-   "print_hide": 1, 
-   "read_only": 1, 
+   "default": "Draft",
+   "fieldname": "status",
+   "fieldtype": "Select",
+   "in_list_view": 1,
+   "label": "Status",
+   "no_copy": 1,
+   "oldfieldname": "status",
+   "oldfieldtype": "Select",
+   "options": "Draft\nSubmitted\nQuotation\nLost\nCancelled\nReplied\nOpen",
+   "permlevel": 0,
+   "print_hide": 1,
+   "read_only": 1,
    "reqd": 1
-  }, 
+  },
   {
-   "fieldname": "items_section", 
-   "fieldtype": "Section Break", 
-   "label": "Items", 
-   "oldfieldtype": "Section Break", 
-   "options": "icon-shopping-cart", 
-   "permlevel": 0, 
+   "fieldname": "items_section",
+   "fieldtype": "Section Break",
+   "label": "Items",
+   "oldfieldtype": "Section Break",
+   "options": "icon-shopping-cart",
+   "permlevel": 0,
    "read_only": 0
-  }, 
+  },
   {
-   "description": "Items which do not exist in Item master can also be entered on customer's request", 
-   "fieldname": "items", 
-   "fieldtype": "Table", 
-   "label": "Items", 
-   "oldfieldname": "enquiry_details", 
-   "oldfieldtype": "Table", 
-   "options": "Opportunity Item", 
-   "permlevel": 0, 
+   "description": "Items which do not exist in Item master can also be entered on customer's request",
+   "fieldname": "items",
+   "fieldtype": "Table",
+   "label": "Items",
+   "oldfieldname": "enquiry_details",
+   "oldfieldtype": "Table",
+   "options": "Opportunity Item",
+   "permlevel": 0,
    "read_only": 0
-  }, 
+  },
   {
-   "fieldname": "fold", 
-   "fieldtype": "Fold", 
+   "fieldname": "fold",
+   "fieldtype": "Fold",
    "permlevel": 0
-  }, 
+  },
   {
-   "depends_on": "eval:doc.lead || doc.customer", 
-   "fieldname": "contact_info", 
-   "fieldtype": "Section Break", 
-   "label": "Contact Info", 
-   "options": "icon-bullhorn", 
-   "permlevel": 0, 
+   "depends_on": "eval:doc.lead || doc.customer",
+   "fieldname": "contact_info",
+   "fieldtype": "Section Break",
+   "label": "Contact Info",
+   "options": "icon-bullhorn",
+   "permlevel": 0,
    "read_only": 0
-  }, 
+  },
   {
-   "depends_on": "eval:doc.customer || doc.lead", 
-   "fieldname": "customer_address", 
-   "fieldtype": "Link", 
-   "in_filter": 1, 
-   "label": "Customer / Lead Address", 
-   "options": "Address", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "depends_on": "eval:doc.customer || doc.lead",
+   "fieldname": "customer_address",
+   "fieldtype": "Link",
+   "in_filter": 1,
+   "label": "Customer / Lead Address",
+   "options": "Address",
+   "permlevel": 0,
+   "print_hide": 1,
    "read_only": 0
-  }, 
+  },
   {
-   "fieldname": "address_display", 
-   "fieldtype": "Small Text", 
-   "hidden": 1, 
-   "label": "Address", 
-   "oldfieldname": "address", 
-   "oldfieldtype": "Small Text", 
-   "permlevel": 0, 
+   "fieldname": "address_display",
+   "fieldtype": "Small Text",
+   "hidden": 1,
+   "label": "Address",
+   "oldfieldname": "address",
+   "oldfieldtype": "Small Text",
+   "permlevel": 0,
    "read_only": 1
-  }, 
+  },
   {
-   "depends_on": "customer", 
-   "description": "<a href=\"#Sales Browser/Territory\">Add / Edit</a>", 
-   "fieldname": "territory", 
-   "fieldtype": "Link", 
-   "in_filter": 1, 
-   "label": "Territory", 
-   "options": "Territory", 
-   "permlevel": 0, 
-   "print_hide": 1, 
-   "read_only": 0, 
-   "reqd": 0, 
+   "depends_on": "customer",
+   "description": "<a href=\"#Sales Browser/Territory\">Add / Edit</a>",
+   "fieldname": "territory",
+   "fieldtype": "Link",
+   "in_filter": 1,
+   "label": "Territory",
+   "options": "Territory",
+   "permlevel": 0,
+   "print_hide": 1,
+   "read_only": 0,
+   "reqd": 0,
    "search_index": 1
-  }, 
+  },
   {
-   "depends_on": "customer", 
-   "description": "<a href=\"#Sales Browser/Customer Group\">Add / Edit</a>", 
-   "fieldname": "customer_group", 
-   "fieldtype": "Link", 
-   "hidden": 0, 
-   "in_filter": 1, 
-   "label": "Customer Group", 
-   "oldfieldname": "customer_group", 
-   "oldfieldtype": "Link", 
-   "options": "Customer Group", 
-   "permlevel": 0, 
-   "print_hide": 1, 
-   "read_only": 0, 
-   "reqd": 0, 
+   "depends_on": "customer",
+   "description": "<a href=\"#Sales Browser/Customer Group\">Add / Edit</a>",
+   "fieldname": "customer_group",
+   "fieldtype": "Link",
+   "hidden": 0,
+   "in_filter": 1,
+   "label": "Customer Group",
+   "oldfieldname": "customer_group",
+   "oldfieldtype": "Link",
+   "options": "Customer Group",
+   "permlevel": 0,
+   "print_hide": 1,
+   "read_only": 0,
+   "reqd": 0,
    "search_index": 1
-  }, 
+  },
   {
-   "fieldname": "column_break3", 
-   "fieldtype": "Column Break", 
-   "permlevel": 0, 
+   "fieldname": "column_break3",
+   "fieldtype": "Column Break",
+   "permlevel": 0,
    "read_only": 0
-  }, 
+  },
   {
-   "depends_on": "eval:doc.lead || doc.customer", 
-   "fieldname": "contact_person", 
-   "fieldtype": "Link", 
-   "in_filter": 1, 
-   "label": "Contact Person", 
-   "options": "Contact", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "depends_on": "eval:doc.lead || doc.customer",
+   "fieldname": "contact_person",
+   "fieldtype": "Link",
+   "in_filter": 1,
+   "label": "Contact Person",
+   "options": "Contact",
+   "permlevel": 0,
+   "print_hide": 1,
    "read_only": 0
-  }, 
+  },
   {
-   "depends_on": "customer", 
-   "fieldname": "contact_display", 
-   "fieldtype": "Small Text", 
-   "label": "Contact", 
-   "permlevel": 0, 
+   "depends_on": "customer",
+   "fieldname": "contact_display",
+   "fieldtype": "Small Text",
+   "label": "Contact",
+   "permlevel": 0,
    "read_only": 1
-  }, 
+  },
   {
-   "depends_on": "eval:doc.lead || doc.customer", 
-   "fieldname": "contact_email", 
-   "fieldtype": "Small Text", 
-   "label": "Contact Email", 
-   "permlevel": 0, 
+   "depends_on": "eval:doc.lead || doc.customer",
+   "fieldname": "contact_email",
+   "fieldtype": "Small Text",
+   "label": "Contact Email",
+   "permlevel": 0,
    "read_only": 1
-  }, 
+  },
   {
-   "depends_on": "eval:doc.lead || doc.customer", 
-   "fieldname": "contact_mobile", 
-   "fieldtype": "Small Text", 
-   "label": "Contact Mobile No", 
-   "permlevel": 0, 
+   "depends_on": "eval:doc.lead || doc.customer",
+   "fieldname": "contact_mobile",
+   "fieldtype": "Small Text",
+   "label": "Contact Mobile No",
+   "permlevel": 0,
    "read_only": 1
-  }, 
+  },
   {
-   "fieldname": "more_info", 
-   "fieldtype": "Section Break", 
-   "label": "More Info", 
-   "oldfieldtype": "Section Break", 
-   "options": "icon-file-text", 
-   "permlevel": 0, 
+   "fieldname": "more_info",
+   "fieldtype": "Section Break",
+   "label": "More Info",
+   "oldfieldtype": "Section Break",
+   "options": "icon-file-text",
+   "permlevel": 0,
    "read_only": 0
-  }, 
+  },
   {
-   "fieldname": "column_break1", 
-   "fieldtype": "Column Break", 
-   "oldfieldtype": "Column Break", 
-   "permlevel": 0, 
-   "read_only": 0, 
+   "fieldname": "column_break1",
+   "fieldtype": "Column Break",
+   "oldfieldtype": "Column Break",
+   "permlevel": 0,
+   "read_only": 0,
    "width": "50%"
-  }, 
+  },
   {
-   "default": "Today", 
-   "fieldname": "transaction_date", 
-   "fieldtype": "Date", 
-   "label": "Opportunity Date", 
-   "oldfieldname": "transaction_date", 
-   "oldfieldtype": "Date", 
-   "permlevel": 0, 
-   "read_only": 0, 
-   "reqd": 1, 
+   "default": "Today",
+   "fieldname": "transaction_date",
+   "fieldtype": "Date",
+   "label": "Opportunity Date",
+   "oldfieldname": "transaction_date",
+   "oldfieldtype": "Date",
+   "permlevel": 0,
+   "read_only": 0,
+   "reqd": 1,
    "width": "50px"
-  }, 
+  },
   {
-   "fieldname": "company", 
-   "fieldtype": "Link", 
-   "in_filter": 1, 
-   "label": "Company", 
-   "oldfieldname": "company", 
-   "oldfieldtype": "Link", 
-   "options": "Company", 
-   "permlevel": 0, 
-   "print_hide": 1, 
-   "read_only": 0, 
-   "reqd": 1, 
+   "fieldname": "company",
+   "fieldtype": "Link",
+   "in_filter": 1,
+   "label": "Company",
+   "oldfieldname": "company",
+   "oldfieldtype": "Link",
+   "options": "Company",
+   "permlevel": 0,
+   "print_hide": 1,
+   "read_only": 0,
+   "reqd": 1,
    "search_index": 1
-  }, 
+  },
   {
-   "fieldname": "source", 
-   "fieldtype": "Select", 
-   "label": "Source", 
-   "oldfieldname": "source", 
-   "oldfieldtype": "Select", 
-   "options": "\nExisting Customer\nReference\nAdvertisement\nCold Calling\nExhibition\nSupplier Reference\nMass Mailing\nCustomer's Vendor\nCampaign\nWalk In", 
-   "permlevel": 0, 
+   "fieldname": "source",
+   "fieldtype": "Select",
+   "label": "Source",
+   "oldfieldname": "source",
+   "oldfieldtype": "Select",
+   "options": "\nExisting Customer\nReference\nAdvertisement\nCold Calling\nExhibition\nSupplier Reference\nMass Mailing\nCustomer's Vendor\nCampaign\nWalk In",
+   "permlevel": 0,
    "read_only": 0
-  }, 
+  },
   {
-   "description": "Enter name of campaign if source of enquiry is campaign", 
-   "fieldname": "campaign", 
-   "fieldtype": "Link", 
-   "label": "Campaign", 
-   "oldfieldname": "campaign", 
-   "oldfieldtype": "Link", 
-   "options": "Campaign", 
-   "permlevel": 0, 
+   "description": "Enter name of campaign if source of enquiry is campaign",
+   "fieldname": "campaign",
+   "fieldtype": "Link",
+   "label": "Campaign",
+   "oldfieldname": "campaign",
+   "oldfieldtype": "Link",
+   "options": "Campaign",
+   "permlevel": 0,
    "read_only": 0
-  }, 
+  },
   {
-   "fieldname": "fiscal_year", 
-   "fieldtype": "Link", 
-   "in_filter": 1, 
-   "label": "Fiscal Year", 
-   "oldfieldname": "fiscal_year", 
-   "oldfieldtype": "Select", 
-   "options": "Fiscal Year", 
-   "permlevel": 0, 
-   "print_hide": 1, 
-   "read_only": 0, 
-   "reqd": 1, 
+   "fieldname": "fiscal_year",
+   "fieldtype": "Link",
+   "in_filter": 1,
+   "label": "Fiscal Year",
+   "oldfieldname": "fiscal_year",
+   "oldfieldtype": "Select",
+   "options": "Fiscal Year",
+   "permlevel": 0,
+   "print_hide": 1,
+   "read_only": 0,
+   "reqd": 1,
    "search_index": 1
-  }, 
+  },
   {
-   "depends_on": "eval:!doc.__islocal", 
-   "fieldname": "order_lost_reason", 
-   "fieldtype": "Text", 
-   "label": "Lost Reason", 
-   "no_copy": 1, 
-   "permlevel": 0, 
+   "depends_on": "eval:!doc.__islocal",
+   "fieldname": "order_lost_reason",
+   "fieldtype": "Text",
+   "label": "Lost Reason",
+   "no_copy": 1,
+   "permlevel": 0,
    "read_only": 1
-  }, 
+  },
   {
-   "fieldname": "column_break2", 
-   "fieldtype": "Column Break", 
-   "oldfieldtype": "Column Break", 
-   "permlevel": 0, 
-   "read_only": 0, 
+   "fieldname": "column_break2",
+   "fieldtype": "Column Break",
+   "oldfieldtype": "Column Break",
+   "permlevel": 0,
+   "read_only": 0,
    "width": "50%"
-  }, 
+  },
   {
-   "description": "Your sales person who will contact the customer in future", 
-   "fieldname": "contact_by", 
-   "fieldtype": "Link", 
-   "in_filter": 1, 
-   "label": "Next Contact By", 
-   "oldfieldname": "contact_by", 
-   "oldfieldtype": "Link", 
-   "options": "User", 
-   "permlevel": 0, 
-   "read_only": 0, 
+   "description": "Your sales person who will contact the customer in future",
+   "fieldname": "contact_by",
+   "fieldtype": "Link",
+   "in_filter": 1,
+   "label": "Next Contact By",
+   "oldfieldname": "contact_by",
+   "oldfieldtype": "Link",
+   "options": "User",
+   "permlevel": 0,
+   "read_only": 0,
    "width": "75px"
-  }, 
+  },
   {
-   "description": "Your sales person will get a reminder on this date to contact the customer", 
-   "fieldname": "contact_date", 
-   "fieldtype": "Date", 
-   "label": "Next Contact Date", 
-   "oldfieldname": "contact_date", 
-   "oldfieldtype": "Date", 
-   "permlevel": 0, 
+   "description": "Your sales person will get a reminder on this date to contact the customer",
+   "fieldname": "contact_date",
+   "fieldtype": "Datetime",
+   "label": "Next Contact Date",
+   "oldfieldname": "contact_date",
+   "oldfieldtype": "Date",
+   "permlevel": 0,
    "read_only": 0
-  }, 
+  },
   {
-   "fieldname": "to_discuss", 
-   "fieldtype": "Small Text", 
-   "label": "To Discuss", 
-   "no_copy": 1, 
-   "oldfieldname": "to_discuss", 
-   "oldfieldtype": "Small Text", 
-   "permlevel": 0, 
+   "fieldname": "to_discuss",
+   "fieldtype": "Small Text",
+   "label": "To Discuss",
+   "no_copy": 1,
+   "oldfieldname": "to_discuss",
+   "oldfieldtype": "Small Text",
+   "permlevel": 0,
    "read_only": 0
-  }, 
+  },
   {
-   "fieldname": "amended_from", 
-   "fieldtype": "Link", 
-   "ignore_user_permissions": 1, 
-   "label": "Amended From", 
-   "no_copy": 1, 
-   "oldfieldname": "amended_from", 
-   "oldfieldtype": "Data", 
-   "options": "Opportunity", 
-   "permlevel": 0, 
-   "print_hide": 1, 
-   "read_only": 1, 
+   "fieldname": "amended_from",
+   "fieldtype": "Link",
+   "ignore_user_permissions": 1,
+   "label": "Amended From",
+   "no_copy": 1,
+   "oldfieldname": "amended_from",
+   "oldfieldtype": "Data",
+   "options": "Opportunity",
+   "permlevel": 0,
+   "print_hide": 1,
+   "read_only": 1,
    "width": "150px"
   }
- ], 
- "icon": "icon-info-sign", 
- "idx": 1, 
- "is_submittable": 1, 
- "modified": "2014-12-24 14:22:53.858170", 
- "modified_by": "Administrator", 
- "module": "Selling", 
- "name": "Opportunity", 
- "owner": "Administrator", 
+ ],
+ "icon": "icon-info-sign",
+ "idx": 1,
+ "is_submittable": 1,
+ "modified": "2014-12-24 14:22:53.858170",
+ "modified_by": "Administrator",
+ "module": "Selling",
+ "name": "Opportunity",
+ "owner": "Administrator",
  "permissions": [
   {
-   "amend": 1, 
-   "apply_user_permissions": 1, 
-   "cancel": 1, 
-   "create": 1, 
-   "delete": 1, 
-   "email": 1, 
-   "permlevel": 0, 
-   "print": 1, 
-   "read": 1, 
-   "report": 1, 
-   "role": "Sales User", 
-   "submit": 1, 
+   "amend": 1,
+   "apply_user_permissions": 1,
+   "cancel": 1,
+   "create": 1,
+   "delete": 1,
+   "email": 1,
+   "permlevel": 0,
+   "print": 1,
+   "read": 1,
+   "report": 1,
+   "role": "Sales User",
+   "submit": 1,
    "write": 1
-  }, 
+  },
   {
-   "amend": 1, 
-   "cancel": 1, 
-   "create": 1, 
-   "delete": 1, 
-   "email": 1, 
-   "permlevel": 0, 
-   "print": 1, 
-   "read": 1, 
-   "report": 1, 
-   "role": "Sales Manager", 
-   "submit": 1, 
+   "amend": 1,
+   "cancel": 1,
+   "create": 1,
+   "delete": 1,
+   "email": 1,
+   "permlevel": 0,
+   "print": 1,
+   "read": 1,
+   "report": 1,
+   "role": "Sales Manager",
+   "submit": 1,
    "write": 1
   }
- ], 
- "search_fields": "status,transaction_date,customer,lead,enquiry_type,territory,company", 
- "sort_field": "modified", 
+ ],
+ "search_fields": "status,transaction_date,customer,lead,enquiry_type,territory,company",
+ "sort_field": "modified",
  "sort_order": "DESC"
-}
\ No newline at end of file
+}
diff --git a/erpnext/selling/doctype/opportunity/opportunity.py b/erpnext/selling/doctype/opportunity/opportunity.py
index 693e978..af170c4 100644
--- a/erpnext/selling/doctype/opportunity/opportunity.py
+++ b/erpnext/selling/doctype/opportunity/opportunity.py
@@ -54,6 +54,7 @@
 			opts = frappe._dict()
 
 		opts.description = ""
+		opts.contact_date = self.contact_date
 
 		if self.customer:
 			if self.contact_person:
diff --git a/erpnext/selling/doctype/sales_order/sales_order.json b/erpnext/selling/doctype/sales_order/sales_order.json
index 3064cc0..a5bf2b3 100644
--- a/erpnext/selling/doctype/sales_order/sales_order.json
+++ b/erpnext/selling/doctype/sales_order/sales_order.json
@@ -1,1114 +1,1115 @@
 {
- "allow_import": 1, 
- "autoname": "naming_series:", 
- "creation": "2013-06-18 12:39:59", 
- "docstatus": 0, 
- "doctype": "DocType", 
- "document_type": "Transaction", 
+ "allow_import": 1,
+ "autoname": "naming_series:",
+ "creation": "2013-06-18 12:39:59",
+ "docstatus": 0,
+ "doctype": "DocType",
+ "document_type": "Transaction",
  "fields": [
   {
-   "fieldname": "customer_section", 
-   "fieldtype": "Section Break", 
-   "label": "Customer", 
-   "options": "icon-user", 
+   "fieldname": "customer_section",
+   "fieldtype": "Section Break",
+   "label": "Customer",
+   "options": "icon-user",
    "permlevel": 0
-  }, 
+  },
   {
-   "fieldname": "column_break0", 
-   "fieldtype": "Column Break", 
-   "in_filter": 0, 
-   "oldfieldtype": "Column Break", 
-   "permlevel": 0, 
-   "search_index": 0, 
+   "fieldname": "column_break0",
+   "fieldtype": "Column Break",
+   "in_filter": 0,
+   "oldfieldtype": "Column Break",
+   "permlevel": 0,
+   "search_index": 0,
    "width": "50%"
-  }, 
+  },
   {
-   "fieldname": "naming_series", 
-   "fieldtype": "Select", 
-   "label": "Series", 
-   "no_copy": 1, 
-   "oldfieldname": "naming_series", 
-   "oldfieldtype": "Select", 
-   "options": "SO-", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "fieldname": "naming_series",
+   "fieldtype": "Select",
+   "label": "Series",
+   "no_copy": 1,
+   "oldfieldname": "naming_series",
+   "oldfieldtype": "Select",
+   "options": "SO-",
+   "permlevel": 0,
+   "print_hide": 1,
    "reqd": 1
-  }, 
+  },
   {
-   "fieldname": "customer", 
-   "fieldtype": "Link", 
-   "in_filter": 1, 
-   "in_list_view": 1, 
-   "label": "Customer", 
-   "oldfieldname": "customer", 
-   "oldfieldtype": "Link", 
-   "options": "Customer", 
-   "permlevel": 0, 
-   "print_hide": 1, 
-   "reqd": 1, 
+   "fieldname": "customer",
+   "fieldtype": "Link",
+   "in_filter": 1,
+   "in_list_view": 1,
+   "label": "Customer",
+   "oldfieldname": "customer",
+   "oldfieldtype": "Link",
+   "options": "Customer",
+   "permlevel": 0,
+   "print_hide": 1,
+   "reqd": 1,
    "search_index": 1
-  }, 
+  },
   {
-   "fieldname": "customer_name", 
-   "fieldtype": "Data", 
-   "hidden": 0, 
-   "label": "Name", 
-   "permlevel": 0, 
+   "fieldname": "customer_name",
+   "fieldtype": "Data",
+   "hidden": 0,
+   "label": "Name",
+   "permlevel": 0,
    "read_only": 1
-  }, 
+  },
   {
-   "fieldname": "address_display", 
-   "fieldtype": "Small Text", 
-   "hidden": 1, 
-   "label": "Address", 
-   "permlevel": 0, 
+   "fieldname": "address_display",
+   "fieldtype": "Small Text",
+   "hidden": 1,
+   "label": "Address",
+   "permlevel": 0,
    "read_only": 1
-  }, 
+  },
   {
-   "fieldname": "contact_display", 
-   "fieldtype": "Small Text", 
-   "hidden": 1, 
-   "label": "Contact", 
-   "permlevel": 0, 
+   "fieldname": "contact_display",
+   "fieldtype": "Small Text",
+   "hidden": 1,
+   "label": "Contact",
+   "permlevel": 0,
    "read_only": 1
-  }, 
+  },
   {
-   "fieldname": "contact_mobile", 
-   "fieldtype": "Small Text", 
-   "hidden": 1, 
-   "label": "Mobile No", 
-   "permlevel": 0, 
+   "fieldname": "contact_mobile",
+   "fieldtype": "Small Text",
+   "hidden": 1,
+   "label": "Mobile No",
+   "permlevel": 0,
    "read_only": 1
-  }, 
+  },
   {
-   "fieldname": "contact_email", 
-   "fieldtype": "Small Text", 
-   "hidden": 1, 
-   "label": "Contact Email", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "fieldname": "contact_email",
+   "fieldtype": "Small Text",
+   "hidden": 1,
+   "label": "Contact Email",
+   "permlevel": 0,
+   "print_hide": 1,
    "read_only": 1
-  }, 
+  },
   {
-   "default": "Sales", 
-   "fieldname": "order_type", 
-   "fieldtype": "Select", 
-   "in_list_view": 1, 
-   "label": "Order Type", 
-   "oldfieldname": "order_type", 
-   "oldfieldtype": "Select", 
-   "options": "\nSales\nMaintenance\nShopping Cart", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "default": "Sales",
+   "fieldname": "order_type",
+   "fieldtype": "Select",
+   "in_list_view": 1,
+   "label": "Order Type",
+   "oldfieldname": "order_type",
+   "oldfieldtype": "Select",
+   "options": "\nSales\nMaintenance\nShopping Cart",
+   "permlevel": 0,
+   "print_hide": 1,
    "reqd": 1
-  }, 
+  },
   {
-   "fieldname": "column_break1", 
-   "fieldtype": "Column Break", 
-   "oldfieldtype": "Column Break", 
-   "permlevel": 0, 
+   "fieldname": "column_break1",
+   "fieldtype": "Column Break",
+   "oldfieldtype": "Column Break",
+   "permlevel": 0,
    "width": "50%"
-  }, 
+  },
   {
-   "fieldname": "amended_from", 
-   "fieldtype": "Link", 
-   "hidden": 1, 
-   "ignore_user_permissions": 1, 
-   "label": "Amended From", 
-   "no_copy": 1, 
-   "oldfieldname": "amended_from", 
-   "oldfieldtype": "Data", 
-   "options": "Sales Order", 
-   "permlevel": 0, 
-   "print_hide": 1, 
-   "read_only": 1, 
+   "fieldname": "amended_from",
+   "fieldtype": "Link",
+   "hidden": 1,
+   "ignore_user_permissions": 1,
+   "label": "Amended From",
+   "no_copy": 1,
+   "oldfieldname": "amended_from",
+   "oldfieldtype": "Data",
+   "options": "Sales Order",
+   "permlevel": 0,
+   "print_hide": 1,
+   "read_only": 1,
    "width": "150px"
-  }, 
+  },
   {
-   "description": "Select the relevant company name if you have multiple companies.", 
-   "fieldname": "company", 
-   "fieldtype": "Link", 
-   "in_filter": 1, 
-   "label": "Company", 
-   "oldfieldname": "company", 
-   "oldfieldtype": "Link", 
-   "options": "Company", 
-   "permlevel": 0, 
-   "print_hide": 1, 
-   "reqd": 1, 
-   "search_index": 1, 
+   "description": "Select the relevant company name if you have multiple companies.",
+   "fieldname": "company",
+   "fieldtype": "Link",
+   "in_filter": 1,
+   "label": "Company",
+   "oldfieldname": "company",
+   "oldfieldtype": "Link",
+   "options": "Company",
+   "permlevel": 0,
+   "print_hide": 1,
+   "reqd": 1,
+   "search_index": 1,
    "width": "150px"
-  }, 
+  },
   {
-   "default": "Today", 
-   "fieldname": "transaction_date", 
-   "fieldtype": "Date", 
-   "in_filter": 1, 
-   "label": "Date", 
-   "no_copy": 1, 
-   "oldfieldname": "transaction_date", 
-   "oldfieldtype": "Date", 
-   "permlevel": 0, 
-   "print_hide": 0, 
-   "reqd": 1, 
-   "search_index": 1, 
+   "default": "Today",
+   "fieldname": "transaction_date",
+   "fieldtype": "Date",
+   "in_filter": 1,
+   "label": "Date",
+   "no_copy": 1,
+   "oldfieldname": "transaction_date",
+   "oldfieldtype": "Date",
+   "permlevel": 0,
+   "print_hide": 0,
+   "reqd": 1,
+   "search_index": 1,
    "width": "160px"
-  }, 
+  },
   {
-   "depends_on": "eval:doc.order_type == 'Sales'", 
-   "fieldname": "delivery_date", 
-   "fieldtype": "Date", 
-   "hidden": 0, 
-   "in_filter": 1, 
-   "label": "Delivery Date", 
-   "oldfieldname": "delivery_date", 
-   "oldfieldtype": "Date", 
-   "permlevel": 0, 
-   "print_hide": 1, 
-   "reqd": 0, 
-   "search_index": 1, 
+   "depends_on": "eval:doc.order_type == 'Sales'",
+   "fieldname": "delivery_date",
+   "fieldtype": "Date",
+   "hidden": 0,
+   "in_filter": 1,
+   "label": "Delivery Date",
+   "oldfieldname": "delivery_date",
+   "oldfieldtype": "Date",
+   "permlevel": 0,
+   "print_hide": 1,
+   "reqd": 0,
+   "search_index": 1,
    "width": "160px"
-  }, 
+  },
   {
-   "description": "Customer's Purchase Order Number", 
-   "fieldname": "po_no", 
-   "fieldtype": "Data", 
-   "hidden": 0, 
-   "label": "PO No", 
-   "oldfieldname": "po_no", 
-   "oldfieldtype": "Data", 
-   "permlevel": 0, 
-   "print_hide": 0, 
-   "reqd": 0, 
+   "description": "Customer's Purchase Order Number",
+   "fieldname": "po_no",
+   "fieldtype": "Data",
+   "hidden": 0,
+   "label": "PO No",
+   "no_copy": 0,
+   "oldfieldname": "po_no",
+   "oldfieldtype": "Data",
+   "permlevel": 0,
+   "print_hide": 0,
+   "reqd": 0,
    "width": "100px"
-  }, 
+  },
   {
-   "depends_on": "eval:doc.po_no", 
-   "description": "Customer's Purchase Order Date", 
-   "fieldname": "po_date", 
-   "fieldtype": "Date", 
-   "hidden": 0, 
-   "label": "PO Date", 
-   "oldfieldname": "po_date", 
-   "oldfieldtype": "Date", 
-   "permlevel": 0, 
-   "print_hide": 0, 
-   "reqd": 0, 
+   "depends_on": "eval:doc.po_no",
+   "description": "Customer's Purchase Order Date",
+   "fieldname": "po_date",
+   "fieldtype": "Date",
+   "hidden": 0,
+   "label": "PO Date",
+   "oldfieldname": "po_date",
+   "oldfieldtype": "Date",
+   "permlevel": 0,
+   "print_hide": 0,
+   "reqd": 0,
    "width": "100px"
-  }, 
+  },
   {
-   "fieldname": "shipping_address_name", 
-   "fieldtype": "Link", 
-   "hidden": 1, 
-   "in_filter": 1, 
-   "label": "Shipping Address Name", 
-   "options": "Address", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "fieldname": "shipping_address_name",
+   "fieldtype": "Link",
+   "hidden": 1,
+   "in_filter": 1,
+   "label": "Shipping Address Name",
+   "options": "Address",
+   "permlevel": 0,
+   "print_hide": 1,
    "read_only": 0
-  }, 
+  },
   {
-   "fieldname": "shipping_address", 
-   "fieldtype": "Small Text", 
-   "hidden": 1, 
-   "in_filter": 0, 
-   "label": "Shipping Address", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "fieldname": "shipping_address",
+   "fieldtype": "Small Text",
+   "hidden": 1,
+   "in_filter": 0,
+   "label": "Shipping Address",
+   "permlevel": 0,
+   "print_hide": 1,
    "read_only": 1
-  }, 
+  },
   {
-   "fieldname": "sec_break45", 
-   "fieldtype": "Section Break", 
-   "label": "Currency and Price List", 
-   "options": "icon-tag", 
-   "permlevel": 0, 
+   "fieldname": "sec_break45",
+   "fieldtype": "Section Break",
+   "label": "Currency and Price List",
+   "options": "icon-tag",
+   "permlevel": 0,
    "print_hide": 1
-  }, 
+  },
   {
-   "fieldname": "currency", 
-   "fieldtype": "Link", 
-   "label": "Currency", 
-   "oldfieldname": "currency", 
-   "oldfieldtype": "Select", 
-   "options": "Currency", 
-   "permlevel": 0, 
-   "print_hide": 1, 
-   "reqd": 1, 
+   "fieldname": "currency",
+   "fieldtype": "Link",
+   "label": "Currency",
+   "oldfieldname": "currency",
+   "oldfieldtype": "Select",
+   "options": "Currency",
+   "permlevel": 0,
+   "print_hide": 1,
+   "reqd": 1,
    "width": "100px"
-  }, 
+  },
   {
-   "description": "Rate at which customer's currency is converted to company's base currency", 
-   "fieldname": "conversion_rate", 
-   "fieldtype": "Float", 
-   "label": "Exchange Rate", 
-   "oldfieldname": "conversion_rate", 
-   "oldfieldtype": "Currency", 
-   "permlevel": 0, 
-   "print_hide": 1, 
-   "reqd": 1, 
+   "description": "Rate at which customer's currency is converted to company's base currency",
+   "fieldname": "conversion_rate",
+   "fieldtype": "Float",
+   "label": "Exchange Rate",
+   "oldfieldname": "conversion_rate",
+   "oldfieldtype": "Currency",
+   "permlevel": 0,
+   "print_hide": 1,
+   "reqd": 1,
    "width": "100px"
-  }, 
+  },
   {
-   "fieldname": "column_break2", 
-   "fieldtype": "Column Break", 
-   "permlevel": 0, 
+   "fieldname": "column_break2",
+   "fieldtype": "Column Break",
+   "permlevel": 0,
    "width": "50%"
-  }, 
+  },
   {
-   "fieldname": "selling_price_list", 
-   "fieldtype": "Link", 
-   "label": "Price List", 
-   "oldfieldname": "price_list_name", 
-   "oldfieldtype": "Select", 
-   "options": "Price List", 
-   "permlevel": 0, 
-   "print_hide": 1, 
-   "reqd": 1, 
+   "fieldname": "selling_price_list",
+   "fieldtype": "Link",
+   "label": "Price List",
+   "oldfieldname": "price_list_name",
+   "oldfieldtype": "Select",
+   "options": "Price List",
+   "permlevel": 0,
+   "print_hide": 1,
+   "reqd": 1,
    "width": "100px"
-  }, 
+  },
   {
-   "fieldname": "price_list_currency", 
-   "fieldtype": "Link", 
-   "label": "Price List Currency", 
-   "options": "Currency", 
-   "permlevel": 0, 
-   "print_hide": 1, 
-   "read_only": 1, 
+   "fieldname": "price_list_currency",
+   "fieldtype": "Link",
+   "label": "Price List Currency",
+   "options": "Currency",
+   "permlevel": 0,
+   "print_hide": 1,
+   "read_only": 1,
    "reqd": 1
-  }, 
+  },
   {
-   "description": "Rate at which Price list currency is converted to company's base currency", 
-   "fieldname": "plc_conversion_rate", 
-   "fieldtype": "Float", 
-   "label": "Price List Exchange Rate", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "description": "Rate at which Price list currency is converted to company's base currency",
+   "fieldname": "plc_conversion_rate",
+   "fieldtype": "Float",
+   "label": "Price List Exchange Rate",
+   "permlevel": 0,
+   "print_hide": 1,
    "reqd": 1
-  }, 
+  },
   {
-   "fieldname": "ignore_pricing_rule", 
-   "fieldtype": "Check", 
-   "label": "Ignore Pricing Rule", 
-   "no_copy": 1, 
-   "permlevel": 1, 
+   "fieldname": "ignore_pricing_rule",
+   "fieldtype": "Check",
+   "label": "Ignore Pricing Rule",
+   "no_copy": 1,
+   "permlevel": 1,
    "print_hide": 1
-  }, 
+  },
   {
-   "fieldname": "items_section", 
-   "fieldtype": "Section Break", 
-   "label": "Items", 
-   "oldfieldtype": "Section Break", 
-   "options": "icon-shopping-cart", 
+   "fieldname": "items_section",
+   "fieldtype": "Section Break",
+   "label": "Items",
+   "oldfieldtype": "Section Break",
+   "options": "icon-shopping-cart",
    "permlevel": 0
-  }, 
+  },
   {
-   "allow_on_submit": 1, 
-   "fieldname": "items", 
-   "fieldtype": "Table", 
-   "label": "Items", 
-   "oldfieldname": "sales_order_details", 
-   "oldfieldtype": "Table", 
-   "options": "Sales Order Item", 
-   "permlevel": 0, 
-   "print_hide": 0, 
+   "allow_on_submit": 1,
+   "fieldname": "items",
+   "fieldtype": "Table",
+   "label": "Items",
+   "oldfieldname": "sales_order_details",
+   "oldfieldtype": "Table",
+   "options": "Sales Order Item",
+   "permlevel": 0,
+   "print_hide": 0,
    "reqd": 1
-  }, 
+  },
   {
-   "fieldname": "section_break_31", 
-   "fieldtype": "Section Break", 
+   "fieldname": "section_break_31",
+   "fieldtype": "Section Break",
    "permlevel": 0
-  }, 
+  },
   {
-   "fieldname": "column_break_33a", 
-   "fieldtype": "Column Break", 
+   "fieldname": "column_break_33a",
+   "fieldtype": "Column Break",
    "permlevel": 0
-  }, 
+  },
   {
-   "fieldname": "column_break_33", 
-   "fieldtype": "Column Break", 
+   "fieldname": "column_break_33",
+   "fieldtype": "Column Break",
    "permlevel": 0
-  }, 
+  },
   {
-   "fieldname": "net_total_export", 
-   "fieldtype": "Currency", 
-   "label": "Net Total", 
-   "options": "currency", 
-   "permlevel": 0, 
+   "fieldname": "net_total_export",
+   "fieldtype": "Currency",
+   "label": "Net Total",
+   "options": "currency",
+   "permlevel": 0,
    "read_only": 1
-  }, 
+  },
   {
-   "fieldname": "net_total", 
-   "fieldtype": "Currency", 
-   "label": "Net Total (Company Currency)", 
-   "oldfieldname": "net_total", 
-   "oldfieldtype": "Currency", 
-   "options": "Company:company:default_currency", 
-   "permlevel": 0, 
-   "print_hide": 1, 
-   "read_only": 1, 
-   "reqd": 0, 
+   "fieldname": "net_total",
+   "fieldtype": "Currency",
+   "label": "Net Total (Company Currency)",
+   "oldfieldname": "net_total",
+   "oldfieldtype": "Currency",
+   "options": "Company:company:default_currency",
+   "permlevel": 0,
+   "print_hide": 1,
+   "read_only": 1,
+   "reqd": 0,
    "width": "150px"
-  }, 
+  },
   {
-   "fieldname": "taxes_section", 
-   "fieldtype": "Section Break", 
-   "label": "Taxes and Charges", 
-   "oldfieldtype": "Section Break", 
-   "options": "icon-money", 
-   "permlevel": 0, 
+   "fieldname": "taxes_section",
+   "fieldtype": "Section Break",
+   "label": "Taxes and Charges",
+   "oldfieldtype": "Section Break",
+   "options": "icon-money",
+   "permlevel": 0,
    "print_hide": 0
-  }, 
+  },
   {
-   "fieldname": "taxes_and_charges", 
-   "fieldtype": "Link", 
-   "label": "Taxes and Charges", 
-   "oldfieldname": "charge", 
-   "oldfieldtype": "Link", 
-   "options": "Sales Taxes and Charges Master", 
-   "permlevel": 0, 
+   "fieldname": "taxes_and_charges",
+   "fieldtype": "Link",
+   "label": "Taxes and Charges",
+   "oldfieldname": "charge",
+   "oldfieldtype": "Link",
+   "options": "Sales Taxes and Charges Master",
+   "permlevel": 0,
    "print_hide": 1
-  }, 
+  },
   {
-   "fieldname": "column_break_38", 
-   "fieldtype": "Column Break", 
+   "fieldname": "column_break_38",
+   "fieldtype": "Column Break",
    "permlevel": 0
-  }, 
+  },
   {
-   "fieldname": "shipping_rule", 
-   "fieldtype": "Link", 
-   "label": "Shipping Rule", 
-   "oldfieldtype": "Button", 
-   "options": "Shipping Rule", 
-   "permlevel": 0, 
+   "fieldname": "shipping_rule",
+   "fieldtype": "Link",
+   "label": "Shipping Rule",
+   "oldfieldtype": "Button",
+   "options": "Shipping Rule",
+   "permlevel": 0,
    "print_hide": 1
-  }, 
+  },
   {
-   "fieldname": "section_break_40", 
-   "fieldtype": "Section Break", 
+   "fieldname": "section_break_40",
+   "fieldtype": "Section Break",
    "permlevel": 0
-  }, 
+  },
   {
-   "fieldname": "taxes", 
-   "fieldtype": "Table", 
-   "label": "Sales Taxes and Charges", 
-   "oldfieldname": "other_charges", 
-   "oldfieldtype": "Table", 
-   "options": "Sales Taxes and Charges", 
+   "fieldname": "taxes",
+   "fieldtype": "Table",
+   "label": "Sales Taxes and Charges",
+   "oldfieldname": "other_charges",
+   "oldfieldtype": "Table",
+   "options": "Sales Taxes and Charges",
    "permlevel": 0
-  }, 
+  },
   {
-   "fieldname": "other_charges_calculation", 
-   "fieldtype": "HTML", 
-   "label": "Taxes and Charges Calculation", 
-   "oldfieldtype": "HTML", 
-   "permlevel": 0, 
+   "fieldname": "other_charges_calculation",
+   "fieldtype": "HTML",
+   "label": "Taxes and Charges Calculation",
+   "oldfieldtype": "HTML",
+   "permlevel": 0,
    "print_hide": 1
-  }, 
+  },
   {
-   "fieldname": "section_break_43", 
-   "fieldtype": "Section Break", 
+   "fieldname": "section_break_43",
+   "fieldtype": "Section Break",
    "permlevel": 0
-  }, 
+  },
   {
-   "fieldname": "other_charges_total_export", 
-   "fieldtype": "Currency", 
-   "label": "Taxes and Charges Total", 
-   "options": "currency", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "fieldname": "other_charges_total_export",
+   "fieldtype": "Currency",
+   "label": "Taxes and Charges Total",
+   "options": "currency",
+   "permlevel": 0,
+   "print_hide": 1,
    "read_only": 1
-  }, 
+  },
   {
-   "fieldname": "column_break_46", 
-   "fieldtype": "Column Break", 
+   "fieldname": "column_break_46",
+   "fieldtype": "Column Break",
    "permlevel": 0
-  }, 
+  },
   {
-   "fieldname": "other_charges_total", 
-   "fieldtype": "Currency", 
-   "label": "Taxes and Charges Total (Company Currency)", 
-   "oldfieldname": "other_charges_total", 
-   "oldfieldtype": "Currency", 
-   "options": "Company:company:default_currency", 
-   "permlevel": 0, 
-   "print_hide": 1, 
-   "read_only": 1, 
+   "fieldname": "other_charges_total",
+   "fieldtype": "Currency",
+   "label": "Taxes and Charges Total (Company Currency)",
+   "oldfieldname": "other_charges_total",
+   "oldfieldtype": "Currency",
+   "options": "Company:company:default_currency",
+   "permlevel": 0,
+   "print_hide": 1,
+   "read_only": 1,
    "width": "150px"
-  }, 
+  },
   {
-   "fieldname": "discount_amount", 
-   "fieldtype": "Currency", 
-   "label": "Discount Amount", 
-   "options": "Company:company:default_currency", 
+   "fieldname": "discount_amount",
+   "fieldtype": "Currency",
+   "label": "Discount Amount",
+   "options": "Company:company:default_currency",
    "permlevel": 0
-  }, 
+  },
   {
-   "fieldname": "totals", 
-   "fieldtype": "Section Break", 
-   "label": "Totals", 
-   "oldfieldtype": "Section Break", 
-   "options": "icon-money", 
-   "permlevel": 0, 
+   "fieldname": "totals",
+   "fieldtype": "Section Break",
+   "label": "Totals",
+   "oldfieldtype": "Section Break",
+   "options": "icon-money",
+   "permlevel": 0,
    "print_hide": 1
-  }, 
+  },
   {
-   "fieldname": "grand_total", 
-   "fieldtype": "Currency", 
-   "label": "Grand Total (Company Currency)", 
-   "oldfieldname": "grand_total", 
-   "oldfieldtype": "Currency", 
-   "options": "Company:company:default_currency", 
-   "permlevel": 0, 
-   "print_hide": 1, 
-   "read_only": 1, 
-   "reqd": 0, 
+   "fieldname": "grand_total",
+   "fieldtype": "Currency",
+   "label": "Grand Total (Company Currency)",
+   "oldfieldname": "grand_total",
+   "oldfieldtype": "Currency",
+   "options": "Company:company:default_currency",
+   "permlevel": 0,
+   "print_hide": 1,
+   "read_only": 1,
+   "reqd": 0,
    "width": "150px"
-  }, 
+  },
   {
-   "fieldname": "rounded_total", 
-   "fieldtype": "Currency", 
-   "label": "Rounded Total (Company Currency)", 
-   "oldfieldname": "rounded_total", 
-   "oldfieldtype": "Currency", 
-   "options": "Company:company:default_currency", 
-   "permlevel": 0, 
-   "print_hide": 1, 
-   "read_only": 1, 
+   "fieldname": "rounded_total",
+   "fieldtype": "Currency",
+   "label": "Rounded Total (Company Currency)",
+   "oldfieldname": "rounded_total",
+   "oldfieldtype": "Currency",
+   "options": "Company:company:default_currency",
+   "permlevel": 0,
+   "print_hide": 1,
+   "read_only": 1,
    "width": "150px"
-  }, 
+  },
   {
-   "description": "In Words will be visible once you save the Sales Order.", 
-   "fieldname": "in_words", 
-   "fieldtype": "Data", 
-   "label": "In Words (Company Currency)", 
-   "oldfieldname": "in_words", 
-   "oldfieldtype": "Data", 
-   "permlevel": 0, 
-   "print_hide": 1, 
-   "read_only": 1, 
+   "description": "In Words will be visible once you save the Sales Order.",
+   "fieldname": "in_words",
+   "fieldtype": "Data",
+   "label": "In Words (Company Currency)",
+   "oldfieldname": "in_words",
+   "oldfieldtype": "Data",
+   "permlevel": 0,
+   "print_hide": 1,
+   "read_only": 1,
    "width": "200px"
-  }, 
+  },
   {
-   "fieldname": "advance_paid", 
-   "fieldtype": "Currency", 
-   "label": "Advance Paid", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "fieldname": "advance_paid",
+   "fieldtype": "Currency",
+   "label": "Advance Paid",
+   "permlevel": 0,
+   "print_hide": 1,
    "read_only": 1
-  }, 
+  },
   {
-   "fieldname": "column_break3", 
-   "fieldtype": "Column Break", 
-   "oldfieldtype": "Column Break", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "fieldname": "column_break3",
+   "fieldtype": "Column Break",
+   "oldfieldtype": "Column Break",
+   "permlevel": 0,
+   "print_hide": 1,
    "width": "50%"
-  }, 
+  },
   {
-   "fieldname": "grand_total_export", 
-   "fieldtype": "Currency", 
-   "label": "Grand Total", 
-   "oldfieldname": "grand_total_export", 
-   "oldfieldtype": "Currency", 
-   "options": "currency", 
-   "permlevel": 0, 
-   "print_hide": 0, 
-   "read_only": 1, 
-   "reqd": 0, 
+   "fieldname": "grand_total_export",
+   "fieldtype": "Currency",
+   "label": "Grand Total",
+   "oldfieldname": "grand_total_export",
+   "oldfieldtype": "Currency",
+   "options": "currency",
+   "permlevel": 0,
+   "print_hide": 0,
+   "read_only": 1,
+   "reqd": 0,
    "width": "150px"
-  }, 
+  },
   {
-   "fieldname": "rounded_total_export", 
-   "fieldtype": "Currency", 
-   "label": "Rounded Total", 
-   "oldfieldname": "rounded_total_export", 
-   "oldfieldtype": "Currency", 
-   "options": "currency", 
-   "permlevel": 0, 
-   "print_hide": 0, 
-   "read_only": 1, 
+   "fieldname": "rounded_total_export",
+   "fieldtype": "Currency",
+   "label": "Rounded Total",
+   "oldfieldname": "rounded_total_export",
+   "oldfieldtype": "Currency",
+   "options": "currency",
+   "permlevel": 0,
+   "print_hide": 0,
+   "read_only": 1,
    "width": "150px"
-  }, 
+  },
   {
-   "fieldname": "in_words_export", 
-   "fieldtype": "Data", 
-   "label": "In Words", 
-   "oldfieldname": "in_words_export", 
-   "oldfieldtype": "Data", 
-   "permlevel": 0, 
-   "print_hide": 0, 
-   "read_only": 1, 
+   "fieldname": "in_words_export",
+   "fieldtype": "Data",
+   "label": "In Words",
+   "oldfieldname": "in_words_export",
+   "oldfieldtype": "Data",
+   "permlevel": 0,
+   "print_hide": 0,
+   "read_only": 1,
    "width": "200px"
-  }, 
+  },
   {
-   "fieldname": "view_details", 
-   "fieldtype": "Fold", 
-   "label": "View Details", 
+   "fieldname": "view_details",
+   "fieldtype": "Fold",
+   "label": "View Details",
    "permlevel": 0
-  }, 
+  },
   {
-   "description": "Display all the individual items delivered with the main items", 
-   "fieldname": "packing_list", 
-   "fieldtype": "Section Break", 
-   "hidden": 0, 
-   "label": "Packing List", 
-   "oldfieldtype": "Section Break", 
-   "options": "icon-suitcase", 
-   "permlevel": 0, 
+   "description": "Display all the individual items delivered with the main items",
+   "fieldname": "packing_list",
+   "fieldtype": "Section Break",
+   "hidden": 0,
+   "label": "Packing List",
+   "oldfieldtype": "Section Break",
+   "options": "icon-suitcase",
+   "permlevel": 0,
    "print_hide": 1
-  }, 
+  },
   {
-   "fieldname": "packed_items", 
-   "fieldtype": "Table", 
-   "label": "Packed Items", 
-   "oldfieldname": "packing_details", 
-   "oldfieldtype": "Table", 
-   "options": "Packed Item", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "fieldname": "packed_items",
+   "fieldtype": "Table",
+   "label": "Packed Items",
+   "oldfieldname": "packing_details",
+   "oldfieldtype": "Table",
+   "options": "Packed Item",
+   "permlevel": 0,
+   "print_hide": 1,
    "read_only": 1
-  }, 
+  },
   {
-   "fieldname": "terms_section_break", 
-   "fieldtype": "Section Break", 
-   "label": "Terms and Conditions", 
-   "oldfieldtype": "Section Break", 
-   "options": "icon-legal", 
-   "permlevel": 0, 
+   "fieldname": "terms_section_break",
+   "fieldtype": "Section Break",
+   "label": "Terms and Conditions",
+   "oldfieldtype": "Section Break",
+   "options": "icon-legal",
+   "permlevel": 0,
    "print_hide": 0
-  }, 
+  },
   {
-   "fieldname": "tc_name", 
-   "fieldtype": "Link", 
-   "label": "Terms", 
-   "oldfieldname": "tc_name", 
-   "oldfieldtype": "Link", 
-   "options": "Terms and Conditions", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "fieldname": "tc_name",
+   "fieldtype": "Link",
+   "label": "Terms",
+   "oldfieldname": "tc_name",
+   "oldfieldtype": "Link",
+   "options": "Terms and Conditions",
+   "permlevel": 0,
+   "print_hide": 1,
    "search_index": 0
-  }, 
+  },
   {
-   "fieldname": "terms", 
-   "fieldtype": "Text Editor", 
-   "label": "Terms and Conditions Details", 
-   "oldfieldname": "terms", 
-   "oldfieldtype": "Text Editor", 
-   "permlevel": 0, 
+   "fieldname": "terms",
+   "fieldtype": "Text Editor",
+   "label": "Terms and Conditions Details",
+   "oldfieldname": "terms",
+   "oldfieldtype": "Text Editor",
+   "permlevel": 0,
    "print_hide": 0
-  }, 
+  },
   {
-   "depends_on": "customer", 
-   "fieldname": "contact_info", 
-   "fieldtype": "Section Break", 
-   "label": "Contact Info", 
-   "options": "icon-bullhorn", 
+   "depends_on": "customer",
+   "fieldname": "contact_info",
+   "fieldtype": "Section Break",
+   "label": "Contact Info",
+   "options": "icon-bullhorn",
    "permlevel": 0
-  }, 
+  },
   {
-   "fieldname": "col_break45", 
-   "fieldtype": "Column Break", 
-   "permlevel": 0, 
+   "fieldname": "col_break45",
+   "fieldtype": "Column Break",
+   "permlevel": 0,
    "width": "50%"
-  }, 
+  },
   {
-   "description": "<a href=\"#Sales Browser/Territory\">Add / Edit</a>", 
-   "fieldname": "territory", 
-   "fieldtype": "Link", 
-   "in_filter": 1, 
-   "label": "Territory", 
-   "options": "Territory", 
-   "permlevel": 0, 
-   "print_hide": 1, 
-   "reqd": 1, 
+   "description": "<a href=\"#Sales Browser/Territory\">Add / Edit</a>",
+   "fieldname": "territory",
+   "fieldtype": "Link",
+   "in_filter": 1,
+   "label": "Territory",
+   "options": "Territory",
+   "permlevel": 0,
+   "print_hide": 1,
+   "reqd": 1,
    "search_index": 1
-  }, 
+  },
   {
-   "description": "<a href=\"#Sales Browser/Customer Group\">Add / Edit</a>", 
-   "fieldname": "customer_group", 
-   "fieldtype": "Link", 
-   "in_filter": 1, 
-   "label": "Customer Group", 
-   "options": "Customer Group", 
-   "permlevel": 0, 
-   "print_hide": 1, 
-   "reqd": 1, 
+   "description": "<a href=\"#Sales Browser/Customer Group\">Add / Edit</a>",
+   "fieldname": "customer_group",
+   "fieldtype": "Link",
+   "in_filter": 1,
+   "label": "Customer Group",
+   "options": "Customer Group",
+   "permlevel": 0,
+   "print_hide": 1,
+   "reqd": 1,
    "search_index": 1
-  }, 
+  },
   {
-   "fieldname": "col_break46", 
-   "fieldtype": "Column Break", 
-   "permlevel": 0, 
+   "fieldname": "col_break46",
+   "fieldtype": "Column Break",
+   "permlevel": 0,
    "width": "50%"
-  }, 
+  },
   {
-   "fieldname": "customer_address", 
-   "fieldtype": "Link", 
-   "hidden": 0, 
-   "in_filter": 1, 
-   "label": "Customer Address", 
-   "options": "Address", 
-   "permlevel": 0, 
+   "fieldname": "customer_address",
+   "fieldtype": "Link",
+   "hidden": 0,
+   "in_filter": 1,
+   "label": "Customer Address",
+   "options": "Address",
+   "permlevel": 0,
    "print_hide": 1
-  }, 
+  },
   {
-   "fieldname": "contact_person", 
-   "fieldtype": "Link", 
-   "in_filter": 1, 
-   "label": "Contact Person", 
-   "options": "Contact", 
-   "permlevel": 0, 
+   "fieldname": "contact_person",
+   "fieldtype": "Link",
+   "in_filter": 1,
+   "label": "Contact Person",
+   "options": "Contact",
+   "permlevel": 0,
    "print_hide": 1
-  }, 
+  },
   {
-   "fieldname": "more_info", 
-   "fieldtype": "Section Break", 
-   "label": "More Info", 
-   "oldfieldtype": "Section Break", 
-   "options": "icon-file-text", 
-   "permlevel": 0, 
+   "fieldname": "more_info",
+   "fieldtype": "Section Break",
+   "label": "More Info",
+   "oldfieldtype": "Section Break",
+   "options": "icon-file-text",
+   "permlevel": 0,
    "print_hide": 1
-  }, 
+  },
   {
-   "description": "Track this Sales Order against any Project", 
-   "fieldname": "project_name", 
-   "fieldtype": "Link", 
-   "in_filter": 1, 
-   "label": "Project Name", 
-   "oldfieldname": "project_name", 
-   "oldfieldtype": "Link", 
-   "options": "Project", 
-   "permlevel": 0, 
+   "description": "Track this Sales Order against any Project",
+   "fieldname": "project_name",
+   "fieldtype": "Link",
+   "in_filter": 1,
+   "label": "Project Name",
+   "oldfieldname": "project_name",
+   "oldfieldtype": "Link",
+   "options": "Project",
+   "permlevel": 0,
    "search_index": 1
-  }, 
+  },
   {
-   "depends_on": "eval:doc.source == 'Campaign'", 
-   "fieldname": "campaign", 
-   "fieldtype": "Link", 
-   "label": "Campaign", 
-   "oldfieldname": "campaign", 
-   "oldfieldtype": "Link", 
-   "options": "Campaign", 
-   "permlevel": 0, 
+   "depends_on": "eval:doc.source == 'Campaign'",
+   "fieldname": "campaign",
+   "fieldtype": "Link",
+   "label": "Campaign",
+   "oldfieldname": "campaign",
+   "oldfieldtype": "Link",
+   "options": "Campaign",
+   "permlevel": 0,
    "print_hide": 1
-  }, 
+  },
   {
-   "fieldname": "source", 
-   "fieldtype": "Select", 
-   "label": "Source", 
-   "oldfieldname": "source", 
-   "oldfieldtype": "Select", 
-   "options": "\nExisting Customer\nReference\nAdvertisement\nCold Calling\nExhibition\nSupplier Reference\nMass Mailing\nCustomer's Vendor\nCampaign", 
-   "permlevel": 0, 
+   "fieldname": "source",
+   "fieldtype": "Select",
+   "label": "Source",
+   "oldfieldname": "source",
+   "oldfieldtype": "Select",
+   "options": "\nExisting Customer\nReference\nAdvertisement\nCold Calling\nExhibition\nSupplier Reference\nMass Mailing\nCustomer's Vendor\nCampaign",
+   "permlevel": 0,
    "print_hide": 1
-  }, 
+  },
   {
-   "fieldname": "column_break4", 
-   "fieldtype": "Column Break", 
-   "oldfieldtype": "Column Break", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "fieldname": "column_break4",
+   "fieldtype": "Column Break",
+   "oldfieldtype": "Column Break",
+   "permlevel": 0,
+   "print_hide": 1,
    "width": "50%"
-  }, 
+  },
   {
-   "allow_on_submit": 1, 
-   "fieldname": "letter_head", 
-   "fieldtype": "Link", 
-   "label": "Letter Head", 
-   "oldfieldname": "letter_head", 
-   "oldfieldtype": "Select", 
-   "options": "Letter Head", 
-   "permlevel": 0, 
+   "allow_on_submit": 1,
+   "fieldname": "letter_head",
+   "fieldtype": "Link",
+   "label": "Letter Head",
+   "oldfieldname": "letter_head",
+   "oldfieldtype": "Select",
+   "options": "Letter Head",
+   "permlevel": 0,
    "print_hide": 1
-  }, 
+  },
   {
-   "allow_on_submit": 1, 
-   "fieldname": "select_print_heading", 
-   "fieldtype": "Link", 
-   "label": "Print Heading", 
-   "no_copy": 1, 
-   "oldfieldname": "select_print_heading", 
-   "oldfieldtype": "Link", 
-   "options": "Print Heading", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "allow_on_submit": 1,
+   "fieldname": "select_print_heading",
+   "fieldtype": "Link",
+   "label": "Print Heading",
+   "no_copy": 1,
+   "oldfieldname": "select_print_heading",
+   "oldfieldtype": "Link",
+   "options": "Print Heading",
+   "permlevel": 0,
+   "print_hide": 1,
    "report_hide": 1
-  }, 
+  },
   {
-   "fieldname": "fiscal_year", 
-   "fieldtype": "Link", 
-   "in_filter": 1, 
-   "label": "Fiscal Year", 
-   "oldfieldname": "fiscal_year", 
-   "oldfieldtype": "Select", 
-   "options": "Fiscal Year", 
-   "permlevel": 0, 
-   "print_hide": 1, 
-   "reqd": 1, 
-   "search_index": 1, 
+   "fieldname": "fiscal_year",
+   "fieldtype": "Link",
+   "in_filter": 1,
+   "label": "Fiscal Year",
+   "oldfieldname": "fiscal_year",
+   "oldfieldtype": "Select",
+   "options": "Fiscal Year",
+   "permlevel": 0,
+   "print_hide": 1,
+   "reqd": 1,
+   "search_index": 1,
    "width": "150px"
-  }, 
+  },
   {
-   "fieldname": "section_break_78", 
-   "fieldtype": "Section Break", 
-   "oldfieldtype": "Column Break", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "fieldname": "section_break_78",
+   "fieldtype": "Section Break",
+   "oldfieldtype": "Column Break",
+   "permlevel": 0,
+   "print_hide": 1,
    "width": "50%"
-  }, 
+  },
   {
-   "default": "Draft", 
-   "fieldname": "status", 
-   "fieldtype": "Select", 
-   "in_filter": 1, 
-   "in_list_view": 1, 
-   "label": "Status", 
-   "no_copy": 1, 
-   "oldfieldname": "status", 
-   "oldfieldtype": "Select", 
-   "options": "\nDraft\nSubmitted\nStopped\nCancelled", 
-   "permlevel": 0, 
-   "print_hide": 1, 
-   "read_only": 1, 
-   "reqd": 1, 
-   "search_index": 1, 
+   "default": "Draft",
+   "fieldname": "status",
+   "fieldtype": "Select",
+   "in_filter": 1,
+   "in_list_view": 1,
+   "label": "Status",
+   "no_copy": 1,
+   "oldfieldname": "status",
+   "oldfieldtype": "Select",
+   "options": "\nDraft\nSubmitted\nStopped\nCancelled",
+   "permlevel": 0,
+   "print_hide": 1,
+   "read_only": 1,
+   "reqd": 1,
+   "search_index": 1,
    "width": "100px"
-  }, 
+  },
   {
-   "fieldname": "delivery_status", 
-   "fieldtype": "Select", 
-   "hidden": 1, 
-   "label": "Delivery Status", 
-   "no_copy": 1, 
-   "options": "Not Delivered\nFully Delivered\nPartly Delivered\nClosed\nNot Applicable", 
-   "permlevel": 0, 
+   "fieldname": "delivery_status",
+   "fieldtype": "Select",
+   "hidden": 1,
+   "label": "Delivery Status",
+   "no_copy": 1,
+   "options": "Not Delivered\nFully Delivered\nPartly Delivered\nClosed\nNot Applicable",
+   "permlevel": 0,
    "print_hide": 1
-  }, 
+  },
   {
-   "depends_on": "eval:!doc.__islocal", 
-   "description": "% of materials delivered against this Sales Order", 
-   "fieldname": "per_delivered", 
-   "fieldtype": "Percent", 
-   "in_filter": 1, 
-   "in_list_view": 1, 
-   "label": "%  Delivered", 
-   "no_copy": 1, 
-   "oldfieldname": "per_delivered", 
-   "oldfieldtype": "Currency", 
-   "permlevel": 0, 
-   "print_hide": 1, 
-   "read_only": 1, 
+   "depends_on": "eval:!doc.__islocal",
+   "description": "% of materials delivered against this Sales Order",
+   "fieldname": "per_delivered",
+   "fieldtype": "Percent",
+   "in_filter": 1,
+   "in_list_view": 1,
+   "label": "%  Delivered",
+   "no_copy": 1,
+   "oldfieldname": "per_delivered",
+   "oldfieldtype": "Currency",
+   "permlevel": 0,
+   "print_hide": 1,
+   "read_only": 1,
    "width": "100px"
-  }, 
+  },
   {
-   "fieldname": "column_break_81", 
-   "fieldtype": "Column Break", 
+   "fieldname": "column_break_81",
+   "fieldtype": "Column Break",
    "permlevel": 0
-  }, 
+  },
   {
-   "depends_on": "eval:!doc.__islocal", 
-   "description": "% of materials billed against this Sales Order", 
-   "fieldname": "per_billed", 
-   "fieldtype": "Percent", 
-   "in_filter": 1, 
-   "in_list_view": 1, 
-   "label": "% Amount Billed", 
-   "no_copy": 1, 
-   "oldfieldname": "per_billed", 
-   "oldfieldtype": "Currency", 
-   "permlevel": 0, 
-   "print_hide": 1, 
-   "read_only": 1, 
+   "depends_on": "eval:!doc.__islocal",
+   "description": "% of materials billed against this Sales Order",
+   "fieldname": "per_billed",
+   "fieldtype": "Percent",
+   "in_filter": 1,
+   "in_list_view": 1,
+   "label": "% Amount Billed",
+   "no_copy": 1,
+   "oldfieldname": "per_billed",
+   "oldfieldtype": "Currency",
+   "permlevel": 0,
+   "print_hide": 1,
+   "read_only": 1,
    "width": "100px"
-  }, 
+  },
   {
-   "fieldname": "billing_status", 
-   "fieldtype": "Select", 
-   "hidden": 1, 
-   "label": "Billing Status", 
-   "no_copy": 1, 
-   "options": "Not Billed\nFully Billed\nPartly Billed\nClosed", 
-   "permlevel": 0, 
+   "fieldname": "billing_status",
+   "fieldtype": "Select",
+   "hidden": 1,
+   "label": "Billing Status",
+   "no_copy": 1,
+   "options": "Not Billed\nFully Billed\nPartly Billed\nClosed",
+   "permlevel": 0,
    "print_hide": 1
-  }, 
+  },
   {
-   "fieldname": "sales_team_section_break", 
-   "fieldtype": "Section Break", 
-   "label": "Sales Team", 
-   "oldfieldtype": "Section Break", 
-   "options": "icon-group", 
-   "permlevel": 0, 
+   "fieldname": "sales_team_section_break",
+   "fieldtype": "Section Break",
+   "label": "Sales Team",
+   "oldfieldtype": "Section Break",
+   "options": "icon-group",
+   "permlevel": 0,
    "print_hide": 1
-  }, 
+  },
   {
-   "fieldname": "sales_partner", 
-   "fieldtype": "Link", 
-   "in_filter": 1, 
-   "label": "Sales Partner", 
-   "oldfieldname": "sales_partner", 
-   "oldfieldtype": "Link", 
-   "options": "Sales Partner", 
-   "permlevel": 0, 
-   "print_hide": 1, 
-   "search_index": 1, 
+   "fieldname": "sales_partner",
+   "fieldtype": "Link",
+   "in_filter": 1,
+   "label": "Sales Partner",
+   "oldfieldname": "sales_partner",
+   "oldfieldtype": "Link",
+   "options": "Sales Partner",
+   "permlevel": 0,
+   "print_hide": 1,
+   "search_index": 1,
    "width": "150px"
-  }, 
+  },
   {
-   "fieldname": "column_break7", 
-   "fieldtype": "Column Break", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "fieldname": "column_break7",
+   "fieldtype": "Column Break",
+   "permlevel": 0,
+   "print_hide": 1,
    "width": "50%"
-  }, 
+  },
   {
-   "fieldname": "commission_rate", 
-   "fieldtype": "Float", 
-   "label": "Commission Rate", 
-   "oldfieldname": "commission_rate", 
-   "oldfieldtype": "Currency", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "fieldname": "commission_rate",
+   "fieldtype": "Float",
+   "label": "Commission Rate",
+   "oldfieldname": "commission_rate",
+   "oldfieldtype": "Currency",
+   "permlevel": 0,
+   "print_hide": 1,
    "width": "100px"
-  }, 
+  },
   {
-   "fieldname": "total_commission", 
-   "fieldtype": "Currency", 
-   "label": "Total Commission", 
-   "oldfieldname": "total_commission", 
-   "oldfieldtype": "Currency", 
-   "options": "Company:company:default_currency", 
-   "permlevel": 0, 
+   "fieldname": "total_commission",
+   "fieldtype": "Currency",
+   "label": "Total Commission",
+   "oldfieldname": "total_commission",
+   "oldfieldtype": "Currency",
+   "options": "Company:company:default_currency",
+   "permlevel": 0,
    "print_hide": 1
-  }, 
+  },
   {
-   "fieldname": "section_break1", 
-   "fieldtype": "Section Break", 
-   "permlevel": 0, 
+   "fieldname": "section_break1",
+   "fieldtype": "Section Break",
+   "permlevel": 0,
    "print_hide": 1
-  }, 
+  },
   {
-   "fieldname": "sales_team", 
-   "fieldtype": "Table", 
-   "label": "Sales Team1", 
-   "oldfieldname": "sales_team", 
-   "oldfieldtype": "Table", 
-   "options": "Sales Team", 
-   "permlevel": 0, 
+   "fieldname": "sales_team",
+   "fieldtype": "Table",
+   "label": "Sales Team1",
+   "oldfieldname": "sales_team",
+   "oldfieldtype": "Table",
+   "options": "Sales Team",
+   "permlevel": 0,
    "print_hide": 1
-  }, 
+  },
   {
-   "fieldname": "recurring_order", 
-   "fieldtype": "Section Break", 
-   "label": "Recurring Order", 
-   "options": "icon-time", 
+   "fieldname": "recurring_order",
+   "fieldtype": "Section Break",
+   "label": "Recurring Order",
+   "options": "icon-time",
    "permlevel": 0
-  }, 
+  },
   {
-   "fieldname": "column_break82", 
-   "fieldtype": "Column Break", 
-   "label": "Column Break", 
+   "fieldname": "column_break82",
+   "fieldtype": "Column Break",
+   "label": "Column Break",
    "permlevel": 0
-  }, 
+  },
   {
-   "allow_on_submit": 1, 
-   "depends_on": "eval:doc.docstatus<2", 
-   "description": "Check if recurring order, uncheck to stop recurring or put proper End Date", 
-   "fieldname": "is_recurring", 
-   "fieldtype": "Check", 
-   "label": "Is Recurring", 
-   "no_copy": 1, 
-   "permlevel": 0, 
+   "allow_on_submit": 1,
+   "depends_on": "eval:doc.docstatus<2",
+   "description": "Check if recurring order, uncheck to stop recurring or put proper End Date",
+   "fieldname": "is_recurring",
+   "fieldtype": "Check",
+   "label": "Is Recurring",
+   "no_copy": 1,
+   "permlevel": 0,
    "print_hide": 1
-  }, 
+  },
   {
-   "allow_on_submit": 1, 
-   "depends_on": "eval:doc.is_recurring==1", 
-   "description": "Select the period when the invoice will be generated automatically", 
-   "fieldname": "recurring_type", 
-   "fieldtype": "Select", 
-   "label": "Recurring Type", 
-   "no_copy": 1, 
-   "options": "\nMonthly\nQuarterly\nHalf-yearly\nYearly", 
-   "permlevel": 0, 
+   "allow_on_submit": 1,
+   "depends_on": "eval:doc.is_recurring==1",
+   "description": "Select the period when the invoice will be generated automatically",
+   "fieldname": "recurring_type",
+   "fieldtype": "Select",
+   "label": "Recurring Type",
+   "no_copy": 1,
+   "options": "\nMonthly\nQuarterly\nHalf-yearly\nYearly",
+   "permlevel": 0,
    "print_hide": 1
-  }, 
+  },
   {
-   "allow_on_submit": 1, 
-   "depends_on": "eval:doc.is_recurring==1", 
-   "description": "Start date of current order's period", 
-   "fieldname": "from_date", 
-   "fieldtype": "Date", 
-   "label": "From Date", 
-   "no_copy": 1, 
+   "allow_on_submit": 1,
+   "depends_on": "eval:doc.is_recurring==1",
+   "description": "Start date of current order's period",
+   "fieldname": "from_date",
+   "fieldtype": "Date",
+   "label": "From Date",
+   "no_copy": 1,
    "permlevel": 0
-  }, 
+  },
   {
-   "allow_on_submit": 1, 
-   "depends_on": "eval:doc.is_recurring==1", 
-   "description": "End date of current order's period", 
-   "fieldname": "to_date", 
-   "fieldtype": "Date", 
-   "label": "To Date", 
-   "no_copy": 1, 
+   "allow_on_submit": 1,
+   "depends_on": "eval:doc.is_recurring==1",
+   "description": "End date of current order's period",
+   "fieldname": "to_date",
+   "fieldtype": "Date",
+   "label": "To Date",
+   "no_copy": 1,
    "permlevel": 0
-  }, 
+  },
   {
-   "allow_on_submit": 1, 
-   "depends_on": "eval:doc.is_recurring==1", 
-   "description": "The day of the month on which auto order will be generated e.g. 05, 28 etc ", 
-   "fieldname": "repeat_on_day_of_month", 
-   "fieldtype": "Int", 
-   "label": "Repeat on Day of Month", 
-   "no_copy": 1, 
-   "permlevel": 0, 
+   "allow_on_submit": 1,
+   "depends_on": "eval:doc.is_recurring==1",
+   "description": "The day of the month on which auto order will be generated e.g. 05, 28 etc ",
+   "fieldname": "repeat_on_day_of_month",
+   "fieldtype": "Int",
+   "label": "Repeat on Day of Month",
+   "no_copy": 1,
+   "permlevel": 0,
    "print_hide": 1
-  }, 
+  },
   {
-   "allow_on_submit": 1, 
-   "depends_on": "eval:doc.is_recurring==1", 
-   "description": "The date on which recurring order will be stop", 
-   "fieldname": "end_date", 
-   "fieldtype": "Date", 
-   "label": "End Date", 
-   "no_copy": 1, 
-   "permlevel": 0, 
+   "allow_on_submit": 1,
+   "depends_on": "eval:doc.is_recurring==1",
+   "description": "The date on which recurring order will be stop",
+   "fieldname": "end_date",
+   "fieldtype": "Date",
+   "label": "End Date",
+   "no_copy": 1,
+   "permlevel": 0,
    "print_hide": 1
-  }, 
+  },
   {
-   "fieldname": "column_break83", 
-   "fieldtype": "Column Break", 
-   "label": "Column Break", 
-   "permlevel": 0, 
+   "fieldname": "column_break83",
+   "fieldtype": "Column Break",
+   "label": "Column Break",
+   "permlevel": 0,
    "print_hide": 1
-  }, 
+  },
   {
-   "depends_on": "eval:doc.is_recurring==1", 
-   "description": "The date on which next invoice will be generated. It is generated on submit.", 
-   "fieldname": "next_date", 
-   "fieldtype": "Date", 
-   "label": "Next Date", 
-   "no_copy": 1, 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "depends_on": "eval:doc.is_recurring==1",
+   "description": "The date on which next invoice will be generated. It is generated on submit.",
+   "fieldname": "next_date",
+   "fieldtype": "Date",
+   "label": "Next Date",
+   "no_copy": 1,
+   "permlevel": 0,
+   "print_hide": 1,
    "read_only": 1
-  }, 
+  },
   {
-   "depends_on": "eval:doc.is_recurring==1", 
-   "fieldname": "recurring_id", 
-   "fieldtype": "Data", 
-   "label": "Recurring Id", 
-   "no_copy": 1, 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "depends_on": "eval:doc.is_recurring==1",
+   "fieldname": "recurring_id",
+   "fieldtype": "Data",
+   "label": "Recurring Id",
+   "no_copy": 1,
+   "permlevel": 0,
+   "print_hide": 1,
    "read_only": 1
-  }, 
+  },
   {
-   "allow_on_submit": 1, 
-   "depends_on": "eval:doc.is_recurring==1", 
-   "description": "Enter email id separated by commas, order will be mailed automatically on particular date", 
-   "fieldname": "notification_email_address", 
-   "fieldtype": "Small Text", 
-   "ignore_user_permissions": 0, 
-   "label": "Notification Email Address", 
-   "no_copy": 1, 
-   "permlevel": 0, 
+   "allow_on_submit": 1,
+   "depends_on": "eval:doc.is_recurring==1",
+   "description": "Enter email id separated by commas, order will be mailed automatically on particular date",
+   "fieldname": "notification_email_address",
+   "fieldtype": "Small Text",
+   "ignore_user_permissions": 0,
+   "label": "Notification Email Address",
+   "no_copy": 1,
+   "permlevel": 0,
    "print_hide": 1
   }
- ], 
- "icon": "icon-file-text", 
- "idx": 1, 
- "is_submittable": 1, 
- "issingle": 0, 
- "modified": "2014-12-24 14:25:16.633280", 
- "modified_by": "Administrator", 
- "module": "Selling", 
- "name": "Sales Order", 
- "owner": "Administrator", 
+ ],
+ "icon": "icon-file-text",
+ "idx": 1,
+ "is_submittable": 1,
+ "issingle": 0,
+ "modified": "2014-12-24 14:25:16.633280",
+ "modified_by": "Administrator",
+ "module": "Selling",
+ "name": "Sales Order",
+ "owner": "Administrator",
  "permissions": [
   {
-   "amend": 1, 
-   "apply_user_permissions": 1, 
-   "cancel": 1, 
-   "create": 1, 
-   "delete": 1, 
-   "email": 1, 
-   "permlevel": 0, 
-   "print": 1, 
-   "read": 1, 
-   "report": 1, 
-   "role": "Sales User", 
-   "submit": 1, 
+   "amend": 1,
+   "apply_user_permissions": 1,
+   "cancel": 1,
+   "create": 1,
+   "delete": 1,
+   "email": 1,
+   "permlevel": 0,
+   "print": 1,
+   "read": 1,
+   "report": 1,
+   "role": "Sales User",
+   "submit": 1,
    "write": 1
-  }, 
+  },
   {
-   "amend": 1, 
-   "cancel": 1, 
-   "create": 1, 
-   "delete": 1, 
-   "email": 1, 
-   "export": 1, 
-   "import": 1, 
-   "permlevel": 0, 
-   "print": 1, 
-   "read": 1, 
-   "report": 1, 
-   "role": "Sales Manager", 
-   "set_user_permissions": 1, 
-   "submit": 1, 
+   "amend": 1,
+   "cancel": 1,
+   "create": 1,
+   "delete": 1,
+   "email": 1,
+   "export": 1,
+   "import": 1,
+   "permlevel": 0,
+   "print": 1,
+   "read": 1,
+   "report": 1,
+   "role": "Sales Manager",
+   "set_user_permissions": 1,
+   "submit": 1,
    "write": 1
-  }, 
+  },
   {
-   "amend": 1, 
-   "apply_user_permissions": 1, 
-   "cancel": 1, 
-   "create": 1, 
-   "delete": 1, 
-   "email": 1, 
-   "permlevel": 0, 
-   "print": 1, 
-   "read": 1, 
-   "report": 1, 
-   "role": "Maintenance User", 
-   "submit": 1, 
+   "amend": 1,
+   "apply_user_permissions": 1,
+   "cancel": 1,
+   "create": 1,
+   "delete": 1,
+   "email": 1,
+   "permlevel": 0,
+   "print": 1,
+   "read": 1,
+   "report": 1,
+   "role": "Maintenance User",
+   "submit": 1,
    "write": 1
-  }, 
+  },
   {
-   "apply_user_permissions": 1, 
-   "cancel": 0, 
-   "delete": 0, 
-   "email": 1, 
-   "permlevel": 0, 
-   "print": 1, 
-   "read": 1, 
+   "apply_user_permissions": 1,
+   "cancel": 0,
+   "delete": 0,
+   "email": 1,
+   "permlevel": 0,
+   "print": 1,
+   "read": 1,
    "role": "Accounts User"
-  }, 
+  },
   {
-   "apply_user_permissions": 1, 
-   "cancel": 0, 
-   "delete": 0, 
-   "email": 1, 
-   "permlevel": 0, 
-   "print": 1, 
-   "read": 1, 
+   "apply_user_permissions": 1,
+   "cancel": 0,
+   "delete": 0,
+   "email": 1,
+   "permlevel": 0,
+   "print": 1,
+   "read": 1,
    "role": "Customer"
-  }, 
+  },
   {
-   "apply_user_permissions": 1, 
-   "permlevel": 0, 
-   "read": 1, 
-   "report": 1, 
+   "apply_user_permissions": 1,
+   "permlevel": 0,
+   "read": 1,
+   "report": 1,
    "role": "Material User"
-  }, 
+  },
   {
-   "permlevel": 1, 
-   "read": 1, 
-   "role": "Sales Manager", 
+   "permlevel": 1,
+   "read": 1,
+   "role": "Sales Manager",
    "write": 1
   }
- ], 
- "read_only_onload": 1, 
- "search_fields": "status,transaction_date,customer,customer_name, territory,order_type,company", 
- "sort_field": "modified", 
+ ],
+ "read_only_onload": 1,
+ "search_fields": "status,transaction_date,customer,customer_name, territory,order_type,company",
+ "sort_field": "modified",
  "sort_order": "DESC"
-}
\ No newline at end of file
+}
diff --git a/erpnext/selling/doctype/sales_order/sales_order.py b/erpnext/selling/doctype/sales_order/sales_order.py
index da53521..ad90557 100644
--- a/erpnext/selling/doctype/sales_order/sales_order.py
+++ b/erpnext/selling/doctype/sales_order/sales_order.py
@@ -268,6 +268,14 @@
 @frappe.whitelist()
 def make_delivery_note(source_name, target_doc=None):
 	def set_missing_values(source, target):
+		if source.po_no:
+			if target.po_no:
+				target_po_no = target.po_no.split(", ")
+				target_po_no.append(source.po_no)
+				target.po_no = ", ".join(list(set(target_po_no))) if len(target_po_no) > 1 else target_po_no[0]
+			else:
+				target.po_no = source.po_no
+
 		target.ignore_pricing_rule = 1
 		target.run_method("set_missing_values")
 		target.run_method("calculate_taxes_and_totals")
diff --git a/erpnext/setup/doctype/authorization_control/authorization_control.py b/erpnext/setup/doctype/authorization_control/authorization_control.py
index 591a6fc..a080f1c 100644
--- a/erpnext/setup/doctype/authorization_control/authorization_control.py
+++ b/erpnext/setup/doctype/authorization_control/authorization_control.py
@@ -98,9 +98,12 @@
 		if doc_obj:
 			price_list_rate, base_rate = 0, 0
 			for d in doc_obj.get("items"):
-				if d.base_price_list_rate and d.base_rate:
-					price_list_rate += flt(d.base_price_list_rate)
+				if d.base_rate:
+					price_list_rate += flt(d.base_price_list_rate) or flt(d.base_rate)
 					base_rate += flt(d.base_rate)
+			if doc_obj.get("discount_amount"):
+				base_rate -= flt(doc_obj.discount_amount)
+
 			if price_list_rate: av_dis = 100 - flt(base_rate * 100 / price_list_rate)
 
 		final_based_on = ['Grand Total','Average Discount','Customerwise Discount','Itemwise Discount']
diff --git a/erpnext/setup/page/setup_wizard/setup_wizard.js b/erpnext/setup/page/setup_wizard/setup_wizard.js
index 7b2abdf..6b847e0 100644
--- a/erpnext/setup/page/setup_wizard/setup_wizard.js
+++ b/erpnext/setup/page/setup_wizard/setup_wizard.js
@@ -61,14 +61,27 @@
 				fields: [
 					{
 						"fieldname": "language", "label": __("Language"), "fieldtype": "Select",
-						options: ["english", "العربية", "deutsch", "ελληνικά", "español", "français", "हिंदी", "hrvatski",
-							"italiano", "nederlands", "polski", "português brasileiro", "português", "српски", "தமிழ்",
-							"ไทย", "中国(简体)", "中國(繁體)"],
-						reqd:1, "default": "english"
+						reqd:1
 					},
 				],
 				help: __("Welcome to ERPNext. Please select your language to begin the Setup Wizard."),
 				onload: function(slide) {
+					var me = this;
+
+					if (!this.language_list) {
+						frappe.call({
+							method: "erpnext.setup.page.setup_wizard.setup_wizard.load_languages",
+							callback: function(r) {
+								me.language_list = r.message;
+								slide.get_input("language")
+									.add_options(r.message)
+									.val("english");
+							}
+						})
+					} else {
+						slide.get_input("language").add_options(this.language_list);
+					}
+
 					slide.get_input("language").on("change", function() {
 						var lang = $(this).val() || "english";
 						frappe._messages = {};
diff --git a/erpnext/setup/page/setup_wizard/setup_wizard.py b/erpnext/setup/page/setup_wizard/setup_wizard.py
index 60c2450..c93e404 100644
--- a/erpnext/setup/page/setup_wizard/setup_wizard.py
+++ b/erpnext/setup/page/setup_wizard/setup_wizard.py
@@ -439,4 +439,6 @@
 	send_translations(m)
 	return lang
 
-
+@frappe.whitelist()
+def load_languages():
+	return sorted(get_lang_dict().keys())
diff --git a/erpnext/stock/doctype/delivery_note/delivery_note.json b/erpnext/stock/doctype/delivery_note/delivery_note.json
index 3e78500..aa4b685 100644
--- a/erpnext/stock/doctype/delivery_note/delivery_note.json
+++ b/erpnext/stock/doctype/delivery_note/delivery_note.json
@@ -1,1102 +1,1102 @@
 {
- "autoname": "naming_series:", 
- "creation": "2013-05-24 19:29:09", 
- "docstatus": 0, 
- "doctype": "DocType", 
- "document_type": "Transaction", 
+ "autoname": "naming_series:",
+ "creation": "2013-05-24 19:29:09",
+ "docstatus": 0,
+ "doctype": "DocType",
+ "document_type": "Transaction",
  "fields": [
   {
-   "fieldname": "delivery_to_section", 
-   "fieldtype": "Section Break", 
-   "label": "Delivery To", 
-   "options": "icon-user", 
+   "fieldname": "delivery_to_section",
+   "fieldtype": "Section Break",
+   "label": "Delivery To",
+   "options": "icon-user",
    "permlevel": 0
-  }, 
+  },
   {
-   "fieldname": "column_break0", 
-   "fieldtype": "Column Break", 
-   "oldfieldtype": "Column Break", 
-   "permlevel": 0, 
-   "print_width": "50%", 
-   "read_only": 0, 
+   "fieldname": "column_break0",
+   "fieldtype": "Column Break",
+   "oldfieldtype": "Column Break",
+   "permlevel": 0,
+   "print_width": "50%",
+   "read_only": 0,
    "width": "50%"
-  }, 
+  },
   {
-   "fieldname": "naming_series", 
-   "fieldtype": "Select", 
-   "label": "Series", 
-   "no_copy": 1, 
-   "oldfieldname": "naming_series", 
-   "oldfieldtype": "Select", 
-   "options": "DN-", 
-   "permlevel": 0, 
-   "print_hide": 1, 
-   "read_only": 0, 
+   "fieldname": "naming_series",
+   "fieldtype": "Select",
+   "label": "Series",
+   "no_copy": 1,
+   "oldfieldname": "naming_series",
+   "oldfieldtype": "Select",
+   "options": "DN-",
+   "permlevel": 0,
+   "print_hide": 1,
+   "read_only": 0,
    "reqd": 1
-  }, 
+  },
   {
-   "fieldname": "customer", 
-   "fieldtype": "Link", 
-   "in_filter": 1, 
-   "label": "Customer", 
-   "oldfieldname": "customer", 
-   "oldfieldtype": "Link", 
-   "options": "Customer", 
-   "permlevel": 0, 
-   "print_hide": 1, 
-   "read_only": 0, 
-   "reqd": 1, 
+   "fieldname": "customer",
+   "fieldtype": "Link",
+   "in_filter": 1,
+   "label": "Customer",
+   "oldfieldname": "customer",
+   "oldfieldtype": "Link",
+   "options": "Customer",
+   "permlevel": 0,
+   "print_hide": 1,
+   "read_only": 0,
+   "reqd": 1,
    "search_index": 1
-  }, 
+  },
   {
-   "depends_on": "customer", 
-   "fieldname": "customer_name", 
-   "fieldtype": "Data", 
-   "hidden": 0, 
-   "in_list_view": 1, 
-   "label": "Customer Name", 
-   "permlevel": 0, 
+   "depends_on": "customer",
+   "fieldname": "customer_name",
+   "fieldtype": "Data",
+   "hidden": 0,
+   "in_list_view": 1,
+   "label": "Customer Name",
+   "permlevel": 0,
    "read_only": 1
-  }, 
+  },
   {
-   "depends_on": "customer", 
-   "fieldname": "customer_address", 
-   "fieldtype": "Link", 
-   "in_filter": 1, 
-   "label": "Billing Address Name", 
-   "options": "Address", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "depends_on": "customer",
+   "fieldname": "customer_address",
+   "fieldtype": "Link",
+   "in_filter": 1,
+   "label": "Billing Address Name",
+   "options": "Address",
+   "permlevel": 0,
+   "print_hide": 1,
    "read_only": 1
-  }, 
+  },
   {
-   "fieldname": "address_display", 
-   "fieldtype": "Small Text", 
-   "hidden": 1, 
-   "label": "Billing Address", 
-   "permlevel": 0, 
+   "fieldname": "address_display",
+   "fieldtype": "Small Text",
+   "hidden": 1,
+   "label": "Billing Address",
+   "permlevel": 0,
    "read_only": 1
-  }, 
+  },
   {
-   "fieldname": "shipping_address_name", 
-   "fieldtype": "Link", 
-   "label": "Shipping Address", 
-   "options": "Address", 
-   "permlevel": 0, 
+   "fieldname": "shipping_address_name",
+   "fieldtype": "Link",
+   "label": "Shipping Address",
+   "options": "Address",
+   "permlevel": 0,
    "print_hide": 1
-  }, 
+  },
   {
-   "fieldname": "shipping_address", 
-   "fieldtype": "Small Text", 
-   "hidden": 1, 
-   "label": "Shipping Address", 
-   "permlevel": 0, 
+   "fieldname": "shipping_address",
+   "fieldtype": "Small Text",
+   "hidden": 1,
+   "label": "Shipping Address",
+   "permlevel": 0,
    "read_only": 1
-  }, 
+  },
   {
-   "fieldname": "contact_display", 
-   "fieldtype": "Small Text", 
-   "hidden": 1, 
-   "label": "Contact", 
-   "permlevel": 0, 
+   "fieldname": "contact_display",
+   "fieldtype": "Small Text",
+   "hidden": 1,
+   "label": "Contact",
+   "permlevel": 0,
    "read_only": 1
-  }, 
+  },
   {
-   "fieldname": "contact_mobile", 
-   "fieldtype": "Small Text", 
-   "hidden": 1, 
-   "label": "Mobile No", 
-   "permlevel": 0, 
+   "fieldname": "contact_mobile",
+   "fieldtype": "Small Text",
+   "hidden": 1,
+   "label": "Mobile No",
+   "permlevel": 0,
    "read_only": 1
-  }, 
+  },
   {
-   "fieldname": "contact_email", 
-   "fieldtype": "Small Text", 
-   "hidden": 1, 
-   "label": "Contact Email", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "fieldname": "contact_email",
+   "fieldtype": "Small Text",
+   "hidden": 1,
+   "label": "Contact Email",
+   "permlevel": 0,
+   "print_hide": 1,
    "read_only": 1
-  }, 
+  },
   {
-   "fieldname": "column_break1", 
-   "fieldtype": "Column Break", 
-   "oldfieldtype": "Column Break", 
-   "permlevel": 0, 
+   "fieldname": "column_break1",
+   "fieldtype": "Column Break",
+   "oldfieldtype": "Column Break",
+   "permlevel": 0,
    "read_only": 0
-  }, 
+  },
   {
-   "allow_on_submit": 0, 
-   "fieldname": "amended_from", 
-   "fieldtype": "Link", 
-   "ignore_user_permissions": 1, 
-   "label": "Amended From", 
-   "no_copy": 1, 
-   "oldfieldname": "amended_from", 
-   "oldfieldtype": "Data", 
-   "options": "Delivery Note", 
-   "permlevel": 0, 
-   "print_hide": 1, 
-   "print_width": "150px", 
-   "read_only": 1, 
+   "allow_on_submit": 0,
+   "fieldname": "amended_from",
+   "fieldtype": "Link",
+   "ignore_user_permissions": 1,
+   "label": "Amended From",
+   "no_copy": 1,
+   "oldfieldname": "amended_from",
+   "oldfieldtype": "Data",
+   "options": "Delivery Note",
+   "permlevel": 0,
+   "print_hide": 1,
+   "print_width": "150px",
+   "read_only": 1,
    "width": "150px"
-  }, 
+  },
   {
-   "description": "Select the relevant company name if you have multiple companies", 
-   "fieldname": "company", 
-   "fieldtype": "Link", 
-   "in_filter": 1, 
-   "label": "Company", 
-   "oldfieldname": "company", 
-   "oldfieldtype": "Link", 
-   "options": "Company", 
-   "permlevel": 0, 
-   "print_hide": 1, 
-   "print_width": "150px", 
-   "read_only": 0, 
-   "reqd": 1, 
-   "search_index": 1, 
+   "description": "Select the relevant company name if you have multiple companies",
+   "fieldname": "company",
+   "fieldtype": "Link",
+   "in_filter": 1,
+   "label": "Company",
+   "oldfieldname": "company",
+   "oldfieldtype": "Link",
+   "options": "Company",
+   "permlevel": 0,
+   "print_hide": 1,
+   "print_width": "150px",
+   "read_only": 0,
+   "reqd": 1,
+   "search_index": 1,
    "width": "150px"
-  }, 
+  },
   {
-   "default": "Today", 
-   "fieldname": "posting_date", 
-   "fieldtype": "Date", 
-   "in_filter": 1, 
-   "label": "Date", 
-   "no_copy": 1, 
-   "oldfieldname": "posting_date", 
-   "oldfieldtype": "Date", 
-   "permlevel": 0, 
-   "print_hide": 0, 
-   "print_width": "100px", 
-   "read_only": 0, 
-   "reqd": 1, 
-   "search_index": 1, 
+   "default": "Today",
+   "fieldname": "posting_date",
+   "fieldtype": "Date",
+   "in_filter": 1,
+   "label": "Date",
+   "no_copy": 1,
+   "oldfieldname": "posting_date",
+   "oldfieldtype": "Date",
+   "permlevel": 0,
+   "print_hide": 0,
+   "print_width": "100px",
+   "read_only": 0,
+   "reqd": 1,
+   "search_index": 1,
    "width": "100px"
-  }, 
+  },
   {
-   "fieldname": "po_no", 
-   "fieldtype": "Data", 
-   "hidden": 1, 
-   "label": "Customer's Purchase Order No", 
-   "no_copy": 0, 
-   "oldfieldname": "po_no", 
-   "oldfieldtype": "Data", 
-   "permlevel": 0, 
-   "print_hide": 1, 
-   "print_width": "100px", 
-   "read_only": 1, 
+   "fieldname": "po_no",
+   "fieldtype": "Data",
+   "hidden": 0,
+   "label": "Customer's Purchase Order No",
+   "no_copy": 0,
+   "oldfieldname": "po_no",
+   "oldfieldtype": "Data",
+   "permlevel": 0,
+   "print_hide": 1,
+   "print_width": "100px",
+   "read_only": 1,
    "width": "100px"
-  }, 
+  },
   {
-   "depends_on": "eval:doc.po_no", 
-   "fieldname": "po_date", 
-   "fieldtype": "Date", 
-   "hidden": 0, 
-   "label": "Customer's Purchase Order Date", 
-   "no_copy": 0, 
-   "oldfieldname": "po_date", 
-   "oldfieldtype": "Data", 
-   "permlevel": 0, 
-   "print_hide": 1, 
-   "print_width": "100px", 
-   "read_only": 1, 
+   "depends_on": "eval:doc.po_no",
+   "fieldname": "po_date",
+   "fieldtype": "Date",
+   "hidden": 0,
+   "label": "Customer's Purchase Order Date",
+   "no_copy": 0,
+   "oldfieldname": "po_date",
+   "oldfieldtype": "Data",
+   "permlevel": 0,
+   "print_hide": 1,
+   "print_width": "100px",
+   "read_only": 1,
    "width": "100px"
-  }, 
+  },
   {
-   "fieldname": "sec_break25", 
-   "fieldtype": "Section Break", 
-   "label": "Currency and Price List", 
-   "options": "icon-tag", 
-   "permlevel": 0, 
+   "fieldname": "sec_break25",
+   "fieldtype": "Section Break",
+   "label": "Currency and Price List",
+   "options": "icon-tag",
+   "permlevel": 0,
    "read_only": 0
-  }, 
+  },
   {
-   "fieldname": "currency", 
-   "fieldtype": "Link", 
-   "label": "Currency", 
-   "oldfieldname": "currency", 
-   "oldfieldtype": "Select", 
-   "options": "Currency", 
-   "permlevel": 0, 
-   "print_hide": 1, 
-   "read_only": 0, 
+   "fieldname": "currency",
+   "fieldtype": "Link",
+   "label": "Currency",
+   "oldfieldname": "currency",
+   "oldfieldtype": "Select",
+   "options": "Currency",
+   "permlevel": 0,
+   "print_hide": 1,
+   "read_only": 0,
    "reqd": 1
-  }, 
+  },
   {
-   "description": "Rate at which customer's currency is converted to company's base currency", 
-   "fieldname": "conversion_rate", 
-   "fieldtype": "Float", 
-   "label": "Exchange Rate", 
-   "no_copy": 0, 
-   "oldfieldname": "conversion_rate", 
-   "oldfieldtype": "Currency", 
-   "permlevel": 0, 
-   "print_hide": 1, 
-   "read_only": 0, 
+   "description": "Rate at which customer's currency is converted to company's base currency",
+   "fieldname": "conversion_rate",
+   "fieldtype": "Float",
+   "label": "Exchange Rate",
+   "no_copy": 0,
+   "oldfieldname": "conversion_rate",
+   "oldfieldtype": "Currency",
+   "permlevel": 0,
+   "print_hide": 1,
+   "read_only": 0,
    "reqd": 1
-  }, 
+  },
   {
-   "fieldname": "col_break23", 
-   "fieldtype": "Column Break", 
-   "permlevel": 0, 
+   "fieldname": "col_break23",
+   "fieldtype": "Column Break",
+   "permlevel": 0,
    "read_only": 0
-  }, 
+  },
   {
-   "fieldname": "selling_price_list", 
-   "fieldtype": "Link", 
-   "label": "Price List", 
-   "oldfieldname": "price_list_name", 
-   "oldfieldtype": "Select", 
-   "options": "Price List", 
-   "permlevel": 0, 
-   "print_hide": 1, 
-   "read_only": 0, 
+   "fieldname": "selling_price_list",
+   "fieldtype": "Link",
+   "label": "Price List",
+   "oldfieldname": "price_list_name",
+   "oldfieldtype": "Select",
+   "options": "Price List",
+   "permlevel": 0,
+   "print_hide": 1,
+   "read_only": 0,
    "reqd": 1
-  }, 
+  },
   {
-   "fieldname": "price_list_currency", 
-   "fieldtype": "Link", 
-   "label": "Price List Currency", 
-   "options": "Currency", 
-   "permlevel": 0, 
-   "print_hide": 1, 
-   "read_only": 1, 
+   "fieldname": "price_list_currency",
+   "fieldtype": "Link",
+   "label": "Price List Currency",
+   "options": "Currency",
+   "permlevel": 0,
+   "print_hide": 1,
+   "read_only": 1,
    "reqd": 1
-  }, 
+  },
   {
-   "description": "Rate at which Price list currency is converted to company's base currency", 
-   "fieldname": "plc_conversion_rate", 
-   "fieldtype": "Float", 
-   "label": "Price List Exchange Rate", 
-   "permlevel": 0, 
-   "print_hide": 1, 
-   "read_only": 0, 
+   "description": "Rate at which Price list currency is converted to company's base currency",
+   "fieldname": "plc_conversion_rate",
+   "fieldtype": "Float",
+   "label": "Price List Exchange Rate",
+   "permlevel": 0,
+   "print_hide": 1,
+   "read_only": 0,
    "reqd": 1
-  }, 
+  },
   {
-   "fieldname": "ignore_pricing_rule", 
-   "fieldtype": "Check", 
-   "label": "Ignore Pricing Rule", 
-   "no_copy": 1, 
-   "permlevel": 1, 
+   "fieldname": "ignore_pricing_rule",
+   "fieldtype": "Check",
+   "label": "Ignore Pricing Rule",
+   "no_copy": 1,
+   "permlevel": 1,
    "print_hide": 1
-  }, 
+  },
   {
-   "fieldname": "items_section", 
-   "fieldtype": "Section Break", 
-   "label": "Items", 
-   "oldfieldtype": "Section Break", 
-   "options": "icon-shopping-cart", 
-   "permlevel": 0, 
+   "fieldname": "items_section",
+   "fieldtype": "Section Break",
+   "label": "Items",
+   "oldfieldtype": "Section Break",
+   "options": "icon-shopping-cart",
+   "permlevel": 0,
    "read_only": 0
-  }, 
+  },
   {
-   "allow_on_submit": 1, 
-   "fieldname": "items", 
-   "fieldtype": "Table", 
-   "label": "Items", 
-   "no_copy": 0, 
-   "oldfieldname": "delivery_note_details", 
-   "oldfieldtype": "Table", 
-   "options": "Delivery Note Item", 
-   "permlevel": 0, 
-   "print_hide": 0, 
-   "read_only": 0, 
+   "allow_on_submit": 1,
+   "fieldname": "items",
+   "fieldtype": "Table",
+   "label": "Items",
+   "no_copy": 0,
+   "oldfieldname": "delivery_note_details",
+   "oldfieldtype": "Table",
+   "options": "Delivery Note Item",
+   "permlevel": 0,
+   "print_hide": 0,
+   "read_only": 0,
    "reqd": 1
-  }, 
+  },
   {
-   "fieldname": "packing_list", 
-   "fieldtype": "Section Break", 
-   "label": "Packing List", 
-   "oldfieldtype": "Section Break", 
-   "options": "icon-suitcase", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "fieldname": "packing_list",
+   "fieldtype": "Section Break",
+   "label": "Packing List",
+   "oldfieldtype": "Section Break",
+   "options": "icon-suitcase",
+   "permlevel": 0,
+   "print_hide": 1,
    "read_only": 0
-  }, 
+  },
   {
-   "fieldname": "packed_items", 
-   "fieldtype": "Table", 
-   "label": "Packed Items", 
-   "oldfieldname": "packing_details", 
-   "oldfieldtype": "Table", 
-   "options": "Packed Item", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "fieldname": "packed_items",
+   "fieldtype": "Table",
+   "label": "Packed Items",
+   "oldfieldname": "packing_details",
+   "oldfieldtype": "Table",
+   "options": "Packed Item",
+   "permlevel": 0,
+   "print_hide": 1,
    "read_only": 1
-  }, 
+  },
   {
-   "fieldname": "sales_bom_help", 
-   "fieldtype": "HTML", 
-   "label": "Sales BOM Help", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "fieldname": "sales_bom_help",
+   "fieldtype": "HTML",
+   "label": "Sales BOM Help",
+   "permlevel": 0,
+   "print_hide": 1,
    "read_only": 0
-  }, 
+  },
   {
-   "fieldname": "section_break_31", 
-   "fieldtype": "Section Break", 
+   "fieldname": "section_break_31",
+   "fieldtype": "Section Break",
    "permlevel": 0
-  }, 
+  },
   {
-   "fieldname": "net_total", 
-   "fieldtype": "Currency", 
-   "label": "Net Total (Company Currency)", 
-   "no_copy": 0, 
-   "oldfieldname": "net_total", 
-   "oldfieldtype": "Currency", 
-   "options": "Company:company:default_currency", 
-   "permlevel": 0, 
-   "print_hide": 1, 
-   "print_width": "150px", 
-   "read_only": 1, 
-   "reqd": 0, 
+   "fieldname": "net_total",
+   "fieldtype": "Currency",
+   "label": "Net Total (Company Currency)",
+   "no_copy": 0,
+   "oldfieldname": "net_total",
+   "oldfieldtype": "Currency",
+   "options": "Company:company:default_currency",
+   "permlevel": 0,
+   "print_hide": 1,
+   "print_width": "150px",
+   "read_only": 1,
+   "reqd": 0,
    "width": "150px"
-  }, 
+  },
   {
-   "fieldname": "column_break_33", 
-   "fieldtype": "Column Break", 
+   "fieldname": "column_break_33",
+   "fieldtype": "Column Break",
    "permlevel": 0
-  }, 
+  },
   {
-   "fieldname": "net_total_export", 
-   "fieldtype": "Currency", 
-   "label": "Net Total", 
-   "options": "currency", 
-   "permlevel": 0, 
+   "fieldname": "net_total_export",
+   "fieldtype": "Currency",
+   "label": "Net Total",
+   "options": "currency",
+   "permlevel": 0,
    "read_only": 1
-  }, 
+  },
   {
-   "fieldname": "taxes_section", 
-   "fieldtype": "Section Break", 
-   "label": "Taxes and Charges", 
-   "oldfieldtype": "Section Break", 
-   "options": "icon-money", 
-   "permlevel": 0, 
+   "fieldname": "taxes_section",
+   "fieldtype": "Section Break",
+   "label": "Taxes and Charges",
+   "oldfieldtype": "Section Break",
+   "options": "icon-money",
+   "permlevel": 0,
    "read_only": 0
-  }, 
+  },
   {
-   "description": "If you have created a standard template in Sales Taxes and Charges Master, select one and click on the button below.", 
-   "fieldname": "taxes_and_charges", 
-   "fieldtype": "Link", 
-   "label": "Taxes and Charges", 
-   "oldfieldname": "charge", 
-   "oldfieldtype": "Link", 
-   "options": "Sales Taxes and Charges Master", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "description": "If you have created a standard template in Sales Taxes and Charges Master, select one and click on the button below.",
+   "fieldname": "taxes_and_charges",
+   "fieldtype": "Link",
+   "label": "Taxes and Charges",
+   "oldfieldname": "charge",
+   "oldfieldtype": "Link",
+   "options": "Sales Taxes and Charges Master",
+   "permlevel": 0,
+   "print_hide": 1,
    "read_only": 0
-  }, 
+  },
   {
-   "fieldname": "column_break_39", 
-   "fieldtype": "Column Break", 
+   "fieldname": "column_break_39",
+   "fieldtype": "Column Break",
    "permlevel": 0
-  }, 
+  },
   {
-   "fieldname": "shipping_rule", 
-   "fieldtype": "Link", 
-   "label": "Shipping Rule", 
-   "oldfieldtype": "Button", 
-   "options": "Shipping Rule", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "fieldname": "shipping_rule",
+   "fieldtype": "Link",
+   "label": "Shipping Rule",
+   "oldfieldtype": "Button",
+   "options": "Shipping Rule",
+   "permlevel": 0,
+   "print_hide": 1,
    "read_only": 0
-  }, 
+  },
   {
-   "fieldname": "section_break_41", 
-   "fieldtype": "Section Break", 
+   "fieldname": "section_break_41",
+   "fieldtype": "Section Break",
    "permlevel": 0
-  }, 
+  },
   {
-   "fieldname": "taxes", 
-   "fieldtype": "Table", 
-   "label": "Sales Taxes and Charges", 
-   "no_copy": 0, 
-   "oldfieldname": "other_charges", 
-   "oldfieldtype": "Table", 
-   "options": "Sales Taxes and Charges", 
-   "permlevel": 0, 
+   "fieldname": "taxes",
+   "fieldtype": "Table",
+   "label": "Sales Taxes and Charges",
+   "no_copy": 0,
+   "oldfieldname": "other_charges",
+   "oldfieldtype": "Table",
+   "options": "Sales Taxes and Charges",
+   "permlevel": 0,
    "read_only": 0
-  }, 
+  },
   {
-   "fieldname": "other_charges_calculation", 
-   "fieldtype": "HTML", 
-   "label": "Taxes and Charges Calculation", 
-   "oldfieldtype": "HTML", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "fieldname": "other_charges_calculation",
+   "fieldtype": "HTML",
+   "label": "Taxes and Charges Calculation",
+   "oldfieldtype": "HTML",
+   "permlevel": 0,
+   "print_hide": 1,
    "read_only": 0
-  }, 
+  },
   {
-   "fieldname": "section_break_44", 
-   "fieldtype": "Section Break", 
+   "fieldname": "section_break_44",
+   "fieldtype": "Section Break",
    "permlevel": 0
-  }, 
+  },
   {
-   "fieldname": "other_charges_total", 
-   "fieldtype": "Currency", 
-   "label": "Taxes and Charges Total (Company Currency)", 
-   "oldfieldname": "other_charges_total", 
-   "oldfieldtype": "Currency", 
-   "options": "Company:company:default_currency", 
-   "permlevel": 0, 
-   "print_hide": 1, 
-   "print_width": "150px", 
-   "read_only": 1, 
+   "fieldname": "other_charges_total",
+   "fieldtype": "Currency",
+   "label": "Taxes and Charges Total (Company Currency)",
+   "oldfieldname": "other_charges_total",
+   "oldfieldtype": "Currency",
+   "options": "Company:company:default_currency",
+   "permlevel": 0,
+   "print_hide": 1,
+   "print_width": "150px",
+   "read_only": 1,
    "width": "150px"
-  }, 
+  },
   {
-   "fieldname": "column_break_47", 
-   "fieldtype": "Column Break", 
+   "fieldname": "column_break_47",
+   "fieldtype": "Column Break",
    "permlevel": 0
-  }, 
+  },
   {
-   "fieldname": "other_charges_total_export", 
-   "fieldtype": "Currency", 
-   "label": "Taxes and Charges Total", 
-   "options": "Company:company:default_currency", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "fieldname": "other_charges_total_export",
+   "fieldtype": "Currency",
+   "label": "Taxes and Charges Total",
+   "options": "Company:company:default_currency",
+   "permlevel": 0,
+   "print_hide": 1,
    "read_only": 1
-  }, 
+  },
   {
-   "fieldname": "discount_amount", 
-   "fieldtype": "Currency", 
-   "label": "Discount Amount", 
-   "options": "Company:company:default_currency", 
+   "fieldname": "discount_amount",
+   "fieldtype": "Currency",
+   "label": "Discount Amount",
+   "options": "Company:company:default_currency",
    "permlevel": 0
-  }, 
+  },
   {
-   "fieldname": "totals", 
-   "fieldtype": "Section Break", 
-   "label": "Totals", 
-   "oldfieldtype": "Section Break", 
-   "options": "icon-money", 
-   "permlevel": 0, 
-   "print_hide": 0, 
+   "fieldname": "totals",
+   "fieldtype": "Section Break",
+   "label": "Totals",
+   "oldfieldtype": "Section Break",
+   "options": "icon-money",
+   "permlevel": 0,
+   "print_hide": 0,
    "read_only": 0
-  }, 
+  },
   {
-   "fieldname": "grand_total", 
-   "fieldtype": "Currency", 
-   "label": "Grand Total (Company Currency)", 
-   "no_copy": 0, 
-   "oldfieldname": "grand_total", 
-   "oldfieldtype": "Currency", 
-   "options": "Company:company:default_currency", 
-   "permlevel": 0, 
-   "print_hide": 1, 
-   "print_width": "150px", 
-   "read_only": 1, 
-   "reqd": 0, 
+   "fieldname": "grand_total",
+   "fieldtype": "Currency",
+   "label": "Grand Total (Company Currency)",
+   "no_copy": 0,
+   "oldfieldname": "grand_total",
+   "oldfieldtype": "Currency",
+   "options": "Company:company:default_currency",
+   "permlevel": 0,
+   "print_hide": 1,
+   "print_width": "150px",
+   "read_only": 1,
+   "reqd": 0,
    "width": "150px"
-  }, 
+  },
   {
-   "fieldname": "rounded_total", 
-   "fieldtype": "Currency", 
-   "label": "Rounded Total (Company Currency)", 
-   "no_copy": 0, 
-   "oldfieldname": "rounded_total", 
-   "oldfieldtype": "Currency", 
-   "options": "Company:company:default_currency", 
-   "permlevel": 0, 
-   "print_hide": 1, 
-   "print_width": "150px", 
-   "read_only": 1, 
+   "fieldname": "rounded_total",
+   "fieldtype": "Currency",
+   "label": "Rounded Total (Company Currency)",
+   "no_copy": 0,
+   "oldfieldname": "rounded_total",
+   "oldfieldtype": "Currency",
+   "options": "Company:company:default_currency",
+   "permlevel": 0,
+   "print_hide": 1,
+   "print_width": "150px",
+   "read_only": 1,
    "width": "150px"
-  }, 
+  },
   {
-   "description": "In Words will be visible once you save the Delivery Note.", 
-   "fieldname": "in_words", 
-   "fieldtype": "Data", 
-   "label": "In Words (Company Currency)", 
-   "no_copy": 0, 
-   "oldfieldname": "in_words", 
-   "oldfieldtype": "Data", 
-   "permlevel": 0, 
-   "print_hide": 1, 
-   "print_width": "200px", 
-   "read_only": 1, 
+   "description": "In Words will be visible once you save the Delivery Note.",
+   "fieldname": "in_words",
+   "fieldtype": "Data",
+   "label": "In Words (Company Currency)",
+   "no_copy": 0,
+   "oldfieldname": "in_words",
+   "oldfieldtype": "Data",
+   "permlevel": 0,
+   "print_hide": 1,
+   "print_width": "200px",
+   "read_only": 1,
    "width": "200px"
-  }, 
+  },
   {
-   "fieldname": "column_break3", 
-   "fieldtype": "Column Break", 
-   "oldfieldtype": "Column Break", 
-   "permlevel": 0, 
+   "fieldname": "column_break3",
+   "fieldtype": "Column Break",
+   "oldfieldtype": "Column Break",
+   "permlevel": 0,
    "read_only": 0
-  }, 
+  },
   {
-   "fieldname": "grand_total_export", 
-   "fieldtype": "Currency", 
-   "label": "Grand Total", 
-   "no_copy": 0, 
-   "oldfieldname": "grand_total_export", 
-   "oldfieldtype": "Currency", 
-   "options": "currency", 
-   "permlevel": 0, 
-   "print_hide": 0, 
-   "print_width": "150px", 
-   "read_only": 1, 
-   "reqd": 0, 
+   "fieldname": "grand_total_export",
+   "fieldtype": "Currency",
+   "label": "Grand Total",
+   "no_copy": 0,
+   "oldfieldname": "grand_total_export",
+   "oldfieldtype": "Currency",
+   "options": "currency",
+   "permlevel": 0,
+   "print_hide": 0,
+   "print_width": "150px",
+   "read_only": 1,
+   "reqd": 0,
    "width": "150px"
-  }, 
+  },
   {
-   "fieldname": "rounded_total_export", 
-   "fieldtype": "Currency", 
-   "label": "Rounded Total", 
-   "no_copy": 0, 
-   "oldfieldname": "rounded_total_export", 
-   "oldfieldtype": "Currency", 
-   "options": "currency", 
-   "permlevel": 0, 
-   "print_hide": 0, 
-   "print_width": "150px", 
-   "read_only": 1, 
+   "fieldname": "rounded_total_export",
+   "fieldtype": "Currency",
+   "label": "Rounded Total",
+   "no_copy": 0,
+   "oldfieldname": "rounded_total_export",
+   "oldfieldtype": "Currency",
+   "options": "currency",
+   "permlevel": 0,
+   "print_hide": 0,
+   "print_width": "150px",
+   "read_only": 1,
    "width": "150px"
-  }, 
+  },
   {
-   "description": "In Words (Export) will be visible once you save the Delivery Note.", 
-   "fieldname": "in_words_export", 
-   "fieldtype": "Data", 
-   "label": "In Words", 
-   "no_copy": 0, 
-   "oldfieldname": "in_words_export", 
-   "oldfieldtype": "Data", 
-   "permlevel": 0, 
-   "print_hide": 0, 
-   "print_width": "150px", 
-   "read_only": 1, 
+   "description": "In Words (Export) will be visible once you save the Delivery Note.",
+   "fieldname": "in_words_export",
+   "fieldtype": "Data",
+   "label": "In Words",
+   "no_copy": 0,
+   "oldfieldname": "in_words_export",
+   "oldfieldtype": "Data",
+   "permlevel": 0,
+   "print_hide": 0,
+   "print_width": "150px",
+   "read_only": 1,
    "width": "150px"
-  }, 
+  },
   {
-   "fieldname": "fold", 
-   "fieldtype": "Fold", 
+   "fieldname": "fold",
+   "fieldtype": "Fold",
    "permlevel": 0
-  }, 
+  },
   {
-   "fieldname": "terms_section_break", 
-   "fieldtype": "Section Break", 
-   "label": "Terms and Conditions", 
-   "oldfieldtype": "Section Break", 
-   "options": "icon-legal", 
-   "permlevel": 0, 
+   "fieldname": "terms_section_break",
+   "fieldtype": "Section Break",
+   "label": "Terms and Conditions",
+   "oldfieldtype": "Section Break",
+   "options": "icon-legal",
+   "permlevel": 0,
    "read_only": 0
-  }, 
+  },
   {
-   "fieldname": "tc_name", 
-   "fieldtype": "Link", 
-   "label": "Terms", 
-   "oldfieldname": "tc_name", 
-   "oldfieldtype": "Link", 
-   "options": "Terms and Conditions", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "fieldname": "tc_name",
+   "fieldtype": "Link",
+   "label": "Terms",
+   "oldfieldname": "tc_name",
+   "oldfieldtype": "Link",
+   "options": "Terms and Conditions",
+   "permlevel": 0,
+   "print_hide": 1,
    "read_only": 0
-  }, 
+  },
   {
-   "fieldname": "terms", 
-   "fieldtype": "Text Editor", 
-   "label": "Terms and Conditions Details", 
-   "oldfieldname": "terms", 
-   "oldfieldtype": "Text Editor", 
-   "permlevel": 0, 
+   "fieldname": "terms",
+   "fieldtype": "Text Editor",
+   "label": "Terms and Conditions Details",
+   "oldfieldname": "terms",
+   "oldfieldtype": "Text Editor",
+   "permlevel": 0,
    "read_only": 0
-  }, 
+  },
   {
-   "fieldname": "transporter_info", 
-   "fieldtype": "Section Break", 
-   "label": "Transporter Info", 
-   "options": "icon-truck", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "fieldname": "transporter_info",
+   "fieldtype": "Section Break",
+   "label": "Transporter Info",
+   "options": "icon-truck",
+   "permlevel": 0,
+   "print_hide": 1,
    "read_only": 0
-  }, 
+  },
   {
-   "fieldname": "transporter_name", 
-   "fieldtype": "Data", 
-   "label": "Transporter Name", 
-   "no_copy": 0, 
-   "oldfieldname": "transporter_name", 
-   "oldfieldtype": "Data", 
-   "permlevel": 0, 
-   "print_hide": 1, 
-   "print_width": "150px", 
-   "read_only": 0, 
-   "reqd": 0, 
+   "fieldname": "transporter_name",
+   "fieldtype": "Data",
+   "label": "Transporter Name",
+   "no_copy": 0,
+   "oldfieldname": "transporter_name",
+   "oldfieldtype": "Data",
+   "permlevel": 0,
+   "print_hide": 1,
+   "print_width": "150px",
+   "read_only": 0,
+   "reqd": 0,
    "width": "150px"
-  }, 
+  },
   {
-   "fieldname": "col_break34", 
-   "fieldtype": "Column Break", 
-   "permlevel": 0, 
-   "print_width": "50%", 
-   "read_only": 0, 
+   "fieldname": "col_break34",
+   "fieldtype": "Column Break",
+   "permlevel": 0,
+   "print_width": "50%",
+   "read_only": 0,
    "width": "50%"
-  }, 
+  },
   {
-   "description": "Transporter lorry number", 
-   "fieldname": "lr_no", 
-   "fieldtype": "Data", 
-   "label": "Vehicle No", 
-   "no_copy": 0, 
-   "oldfieldname": "lr_no", 
-   "oldfieldtype": "Data", 
-   "permlevel": 0, 
-   "print_hide": 1, 
-   "print_width": "100px", 
-   "read_only": 0, 
-   "reqd": 0, 
+   "description": "Transporter lorry number",
+   "fieldname": "lr_no",
+   "fieldtype": "Data",
+   "label": "Vehicle No",
+   "no_copy": 0,
+   "oldfieldname": "lr_no",
+   "oldfieldtype": "Data",
+   "permlevel": 0,
+   "print_hide": 1,
+   "print_width": "100px",
+   "read_only": 0,
+   "reqd": 0,
    "width": "100px"
-  }, 
+  },
   {
-   "default": "Today", 
-   "description": "Date on which lorry started from your warehouse", 
-   "fieldname": "lr_date", 
-   "fieldtype": "Date", 
-   "label": "Vehicle Dispatch Date", 
-   "no_copy": 0, 
-   "oldfieldname": "lr_date", 
-   "oldfieldtype": "Date", 
-   "permlevel": 0, 
-   "print_hide": 1, 
-   "print_width": "100px", 
-   "read_only": 0, 
+   "default": "Today",
+   "description": "Date on which lorry started from your warehouse",
+   "fieldname": "lr_date",
+   "fieldtype": "Date",
+   "label": "Vehicle Dispatch Date",
+   "no_copy": 0,
+   "oldfieldname": "lr_date",
+   "oldfieldtype": "Date",
+   "permlevel": 0,
+   "print_hide": 1,
+   "print_width": "100px",
+   "read_only": 0,
    "width": "100px"
-  }, 
+  },
   {
-   "depends_on": "customer", 
-   "fieldname": "contact_info", 
-   "fieldtype": "Section Break", 
-   "label": "Contact Info", 
-   "options": "icon-bullhorn", 
-   "permlevel": 0, 
+   "depends_on": "customer",
+   "fieldname": "contact_info",
+   "fieldtype": "Section Break",
+   "label": "Contact Info",
+   "options": "icon-bullhorn",
+   "permlevel": 0,
    "read_only": 0
-  }, 
+  },
   {
-   "description": "<a href=\"#Sales Browser/Territory\">Add / Edit</a>", 
-   "fieldname": "territory", 
-   "fieldtype": "Link", 
-   "hidden": 0, 
-   "in_filter": 1, 
-   "label": "Territory", 
-   "options": "Territory", 
-   "permlevel": 0, 
-   "print_hide": 1, 
-   "read_only": 0, 
-   "reqd": 1, 
+   "description": "<a href=\"#Sales Browser/Territory\">Add / Edit</a>",
+   "fieldname": "territory",
+   "fieldtype": "Link",
+   "hidden": 0,
+   "in_filter": 1,
+   "label": "Territory",
+   "options": "Territory",
+   "permlevel": 0,
+   "print_hide": 1,
+   "read_only": 0,
+   "reqd": 1,
    "search_index": 1
-  }, 
+  },
   {
-   "description": "<a href=\"#Sales Browser/Customer Group\">Add / Edit</a>", 
-   "fieldname": "customer_group", 
-   "fieldtype": "Link", 
-   "in_filter": 1, 
-   "label": "Customer Group", 
-   "options": "Customer Group", 
-   "permlevel": 0, 
-   "print_hide": 1, 
-   "read_only": 0, 
+   "description": "<a href=\"#Sales Browser/Customer Group\">Add / Edit</a>",
+   "fieldname": "customer_group",
+   "fieldtype": "Link",
+   "in_filter": 1,
+   "label": "Customer Group",
+   "options": "Customer Group",
+   "permlevel": 0,
+   "print_hide": 1,
+   "read_only": 0,
    "search_index": 1
-  }, 
+  },
   {
-   "fieldname": "col_break21", 
-   "fieldtype": "Column Break", 
-   "permlevel": 0, 
-   "print_width": "50%", 
-   "read_only": 0, 
+   "fieldname": "col_break21",
+   "fieldtype": "Column Break",
+   "permlevel": 0,
+   "print_width": "50%",
+   "read_only": 0,
    "width": "50%"
-  }, 
+  },
   {
-   "fieldname": "contact_person", 
-   "fieldtype": "Link", 
-   "in_filter": 1, 
-   "label": "Contact Person", 
-   "options": "Contact", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "fieldname": "contact_person",
+   "fieldtype": "Link",
+   "in_filter": 1,
+   "label": "Contact Person",
+   "options": "Contact",
+   "permlevel": 0,
+   "print_hide": 1,
    "read_only": 0
-  }, 
+  },
   {
-   "fieldname": "more_info", 
-   "fieldtype": "Section Break", 
-   "label": "More Info", 
-   "oldfieldtype": "Section Break", 
-   "options": "icon-file-text", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "fieldname": "more_info",
+   "fieldtype": "Section Break",
+   "label": "More Info",
+   "oldfieldtype": "Section Break",
+   "options": "icon-file-text",
+   "permlevel": 0,
+   "print_hide": 1,
    "read_only": 0
-  }, 
+  },
   {
-   "description": "Track this Delivery Note against any Project", 
-   "fieldname": "project_name", 
-   "fieldtype": "Link", 
-   "in_filter": 1, 
-   "label": "Project Name", 
-   "oldfieldname": "project_name", 
-   "oldfieldtype": "Link", 
-   "options": "Project", 
-   "permlevel": 0, 
-   "read_only": 0, 
+   "description": "Track this Delivery Note against any Project",
+   "fieldname": "project_name",
+   "fieldtype": "Link",
+   "in_filter": 1,
+   "label": "Project Name",
+   "oldfieldname": "project_name",
+   "oldfieldtype": "Link",
+   "options": "Project",
+   "permlevel": 0,
+   "read_only": 0,
    "search_index": 1
-  }, 
+  },
   {
-   "depends_on": "eval:doc.source == 'Campaign'", 
-   "fieldname": "campaign", 
-   "fieldtype": "Link", 
-   "label": "Campaign", 
-   "oldfieldname": "campaign", 
-   "oldfieldtype": "Link", 
-   "options": "Campaign", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "depends_on": "eval:doc.source == 'Campaign'",
+   "fieldname": "campaign",
+   "fieldtype": "Link",
+   "label": "Campaign",
+   "oldfieldname": "campaign",
+   "oldfieldtype": "Link",
+   "options": "Campaign",
+   "permlevel": 0,
+   "print_hide": 1,
    "read_only": 0
-  }, 
+  },
   {
-   "fieldname": "source", 
-   "fieldtype": "Select", 
-   "label": "Source", 
-   "oldfieldname": "source", 
-   "oldfieldtype": "Select", 
-   "options": "\nExisting Customer\nReference\nAdvertisement\nCold Calling\nExhibition\nSupplier Reference\nMass Mailing\nCustomer's Vendor\nCampaign", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "fieldname": "source",
+   "fieldtype": "Select",
+   "label": "Source",
+   "oldfieldname": "source",
+   "oldfieldtype": "Select",
+   "options": "\nExisting Customer\nReference\nAdvertisement\nCold Calling\nExhibition\nSupplier Reference\nMass Mailing\nCustomer's Vendor\nCampaign",
+   "permlevel": 0,
+   "print_hide": 1,
    "read_only": 0
-  }, 
+  },
   {
-   "fieldname": "column_break5", 
-   "fieldtype": "Column Break", 
-   "oldfieldtype": "Column Break", 
-   "permlevel": 0, 
-   "print_hide": 1, 
-   "print_width": "50%", 
-   "read_only": 0, 
+   "fieldname": "column_break5",
+   "fieldtype": "Column Break",
+   "oldfieldtype": "Column Break",
+   "permlevel": 0,
+   "print_hide": 1,
+   "print_width": "50%",
+   "read_only": 0,
    "width": "50%"
-  }, 
+  },
   {
-   "description": "Time at which items were delivered from warehouse", 
-   "fieldname": "posting_time", 
-   "fieldtype": "Time", 
-   "in_filter": 0, 
-   "label": "Posting Time", 
-   "oldfieldname": "posting_time", 
-   "oldfieldtype": "Time", 
-   "permlevel": 0, 
-   "print_hide": 1, 
-   "print_width": "100px", 
-   "read_only": 0, 
-   "reqd": 1, 
-   "search_index": 0, 
+   "description": "Time at which items were delivered from warehouse",
+   "fieldname": "posting_time",
+   "fieldtype": "Time",
+   "in_filter": 0,
+   "label": "Posting Time",
+   "oldfieldname": "posting_time",
+   "oldfieldtype": "Time",
+   "permlevel": 0,
+   "print_hide": 1,
+   "print_width": "100px",
+   "read_only": 0,
+   "reqd": 1,
+   "search_index": 0,
    "width": "100px"
-  }, 
+  },
   {
-   "fieldname": "fiscal_year", 
-   "fieldtype": "Link", 
-   "in_filter": 1, 
-   "label": "Fiscal Year", 
-   "oldfieldname": "fiscal_year", 
-   "oldfieldtype": "Select", 
-   "options": "Fiscal Year", 
-   "permlevel": 0, 
-   "print_hide": 1, 
-   "print_width": "150px", 
-   "read_only": 0, 
-   "reqd": 1, 
-   "search_index": 1, 
+   "fieldname": "fiscal_year",
+   "fieldtype": "Link",
+   "in_filter": 1,
+   "label": "Fiscal Year",
+   "oldfieldname": "fiscal_year",
+   "oldfieldtype": "Select",
+   "options": "Fiscal Year",
+   "permlevel": 0,
+   "print_hide": 1,
+   "print_width": "150px",
+   "read_only": 0,
+   "reqd": 1,
+   "search_index": 1,
    "width": "150px"
-  }, 
+  },
   {
-   "allow_on_submit": 1, 
-   "fieldname": "letter_head", 
-   "fieldtype": "Link", 
-   "label": "Letter Head", 
-   "oldfieldname": "letter_head", 
-   "oldfieldtype": "Link", 
-   "options": "Letter Head", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "allow_on_submit": 1,
+   "fieldname": "letter_head",
+   "fieldtype": "Link",
+   "label": "Letter Head",
+   "oldfieldname": "letter_head",
+   "oldfieldtype": "Link",
+   "options": "Letter Head",
+   "permlevel": 0,
+   "print_hide": 1,
    "read_only": 0
-  }, 
+  },
   {
-   "allow_on_submit": 1, 
-   "fieldname": "select_print_heading", 
-   "fieldtype": "Link", 
-   "label": "Print Heading", 
-   "no_copy": 1, 
-   "oldfieldname": "select_print_heading", 
-   "oldfieldtype": "Link", 
-   "options": "Print Heading", 
-   "permlevel": 0, 
-   "print_hide": 1, 
-   "read_only": 0, 
+   "allow_on_submit": 1,
+   "fieldname": "select_print_heading",
+   "fieldtype": "Link",
+   "label": "Print Heading",
+   "no_copy": 1,
+   "oldfieldname": "select_print_heading",
+   "oldfieldtype": "Link",
+   "options": "Print Heading",
+   "permlevel": 0,
+   "print_hide": 1,
+   "read_only": 0,
    "report_hide": 1
-  }, 
+  },
   {
-   "allow_on_submit": 1, 
-   "fieldname": "print_without_amount", 
-   "fieldtype": "Check", 
-   "label": "Print Without Amount", 
-   "oldfieldname": "print_without_amount", 
-   "oldfieldtype": "Check", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "allow_on_submit": 1,
+   "fieldname": "print_without_amount",
+   "fieldtype": "Check",
+   "label": "Print Without Amount",
+   "oldfieldname": "print_without_amount",
+   "oldfieldtype": "Check",
+   "permlevel": 0,
+   "print_hide": 1,
    "read_only": 0
-  }, 
+  },
   {
-   "fieldname": "section_break_83", 
-   "fieldtype": "Section Break", 
+   "fieldname": "section_break_83",
+   "fieldtype": "Section Break",
    "permlevel": 0
-  }, 
+  },
   {
-   "default": "Draft", 
-   "fieldname": "status", 
-   "fieldtype": "Select", 
-   "in_filter": 1, 
-   "label": "Status", 
-   "no_copy": 1, 
-   "oldfieldname": "status", 
-   "oldfieldtype": "Select", 
-   "options": "\nDraft\nSubmitted\nCancelled", 
-   "permlevel": 0, 
-   "print_hide": 1, 
-   "print_width": "150px", 
-   "read_only": 1, 
-   "reqd": 1, 
-   "search_index": 1, 
+   "default": "Draft",
+   "fieldname": "status",
+   "fieldtype": "Select",
+   "in_filter": 1,
+   "label": "Status",
+   "no_copy": 1,
+   "oldfieldname": "status",
+   "oldfieldtype": "Select",
+   "options": "\nDraft\nSubmitted\nCancelled",
+   "permlevel": 0,
+   "print_hide": 1,
+   "print_width": "150px",
+   "read_only": 1,
+   "reqd": 1,
+   "search_index": 1,
    "width": "150px"
-  }, 
+  },
   {
-   "depends_on": "eval:!doc.__islocal", 
-   "description": "% of materials delivered against this Delivery Note", 
-   "fieldname": "per_installed", 
-   "fieldtype": "Percent", 
-   "in_filter": 1, 
-   "in_list_view": 1, 
-   "label": "% Installed", 
-   "no_copy": 1, 
-   "oldfieldname": "per_installed", 
-   "oldfieldtype": "Currency", 
-   "permlevel": 0, 
-   "print_hide": 1, 
-   "read_only": 1, 
+   "depends_on": "eval:!doc.__islocal",
+   "description": "% of materials delivered against this Delivery Note",
+   "fieldname": "per_installed",
+   "fieldtype": "Percent",
+   "in_filter": 1,
+   "in_list_view": 1,
+   "label": "% Installed",
+   "no_copy": 1,
+   "oldfieldname": "per_installed",
+   "oldfieldtype": "Currency",
+   "permlevel": 0,
+   "print_hide": 1,
+   "read_only": 1,
    "search_index": 1
-  }, 
+  },
   {
-   "fieldname": "installation_status", 
-   "fieldtype": "Select", 
-   "hidden": 1, 
-   "label": "Installation Status", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "fieldname": "installation_status",
+   "fieldtype": "Select",
+   "hidden": 1,
+   "label": "Installation Status",
+   "permlevel": 0,
+   "print_hide": 1,
    "read_only": 0
-  }, 
+  },
   {
-   "fieldname": "column_break_89", 
-   "fieldtype": "Column Break", 
+   "fieldname": "column_break_89",
+   "fieldtype": "Column Break",
    "permlevel": 0
-  }, 
+  },
   {
-   "description": "Required only for sample item.", 
-   "fieldname": "to_warehouse", 
-   "fieldtype": "Link", 
-   "hidden": 0, 
-   "label": "To Warehouse", 
-   "no_copy": 1, 
-   "oldfieldname": "to_warehouse", 
-   "oldfieldtype": "Link", 
-   "options": "Warehouse", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "description": "Required only for sample item.",
+   "fieldname": "to_warehouse",
+   "fieldtype": "Link",
+   "hidden": 0,
+   "label": "To Warehouse",
+   "no_copy": 1,
+   "oldfieldname": "to_warehouse",
+   "oldfieldtype": "Link",
+   "options": "Warehouse",
+   "permlevel": 0,
+   "print_hide": 1,
    "read_only": 0
-  }, 
+  },
   {
-   "fieldname": "excise_page", 
-   "fieldtype": "Data", 
-   "hidden": 1, 
-   "label": "Excise Page Number", 
-   "oldfieldname": "excise_page", 
-   "oldfieldtype": "Data", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "fieldname": "excise_page",
+   "fieldtype": "Data",
+   "hidden": 1,
+   "label": "Excise Page Number",
+   "oldfieldname": "excise_page",
+   "oldfieldtype": "Data",
+   "permlevel": 0,
+   "print_hide": 1,
    "read_only": 0
-  }, 
+  },
   {
-   "fieldname": "instructions", 
-   "fieldtype": "Text", 
-   "label": "Instructions", 
-   "oldfieldname": "instructions", 
-   "oldfieldtype": "Text", 
-   "permlevel": 0, 
+   "fieldname": "instructions",
+   "fieldtype": "Text",
+   "label": "Instructions",
+   "oldfieldname": "instructions",
+   "oldfieldtype": "Text",
+   "permlevel": 0,
    "read_only": 0
-  }, 
+  },
   {
-   "fieldname": "sales_team_section_break", 
-   "fieldtype": "Section Break", 
-   "label": "Sales Team", 
-   "oldfieldtype": "Section Break", 
-   "options": "icon-group", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "fieldname": "sales_team_section_break",
+   "fieldtype": "Section Break",
+   "label": "Sales Team",
+   "oldfieldtype": "Section Break",
+   "options": "icon-group",
+   "permlevel": 0,
+   "print_hide": 1,
    "read_only": 0
-  }, 
+  },
   {
-   "fieldname": "sales_partner", 
-   "fieldtype": "Link", 
-   "label": "Sales Partner", 
-   "no_copy": 0, 
-   "oldfieldname": "sales_partner", 
-   "oldfieldtype": "Link", 
-   "options": "Sales Partner", 
-   "permlevel": 0, 
-   "print_hide": 1, 
-   "print_width": "150px", 
-   "read_only": 0, 
+   "fieldname": "sales_partner",
+   "fieldtype": "Link",
+   "label": "Sales Partner",
+   "no_copy": 0,
+   "oldfieldname": "sales_partner",
+   "oldfieldtype": "Link",
+   "options": "Sales Partner",
+   "permlevel": 0,
+   "print_hide": 1,
+   "print_width": "150px",
+   "read_only": 0,
    "width": "150px"
-  }, 
+  },
   {
-   "fieldname": "column_break7", 
-   "fieldtype": "Column Break", 
-   "permlevel": 0, 
-   "print_hide": 1, 
-   "print_width": "50%", 
-   "read_only": 0, 
+   "fieldname": "column_break7",
+   "fieldtype": "Column Break",
+   "permlevel": 0,
+   "print_hide": 1,
+   "print_width": "50%",
+   "read_only": 0,
    "width": "50%"
-  }, 
+  },
   {
-   "fieldname": "commission_rate", 
-   "fieldtype": "Float", 
-   "label": "Commission Rate (%)", 
-   "no_copy": 0, 
-   "oldfieldname": "commission_rate", 
-   "oldfieldtype": "Currency", 
-   "permlevel": 0, 
-   "print_hide": 1, 
-   "print_width": "100px", 
-   "read_only": 0, 
+   "fieldname": "commission_rate",
+   "fieldtype": "Float",
+   "label": "Commission Rate (%)",
+   "no_copy": 0,
+   "oldfieldname": "commission_rate",
+   "oldfieldtype": "Currency",
+   "permlevel": 0,
+   "print_hide": 1,
+   "print_width": "100px",
+   "read_only": 0,
    "width": "100px"
-  }, 
+  },
   {
-   "fieldname": "total_commission", 
-   "fieldtype": "Currency", 
-   "label": "Total Commission", 
-   "no_copy": 0, 
-   "oldfieldname": "total_commission", 
-   "oldfieldtype": "Currency", 
-   "options": "Company:company:default_currency", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "fieldname": "total_commission",
+   "fieldtype": "Currency",
+   "label": "Total Commission",
+   "no_copy": 0,
+   "oldfieldname": "total_commission",
+   "oldfieldtype": "Currency",
+   "options": "Company:company:default_currency",
+   "permlevel": 0,
+   "print_hide": 1,
    "read_only": 0
-  }, 
+  },
   {
-   "fieldname": "section_break1", 
-   "fieldtype": "Section Break", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "fieldname": "section_break1",
+   "fieldtype": "Section Break",
+   "permlevel": 0,
+   "print_hide": 1,
    "read_only": 0
-  }, 
+  },
   {
-   "fieldname": "sales_team", 
-   "fieldtype": "Table", 
-   "label": "Sales Team1", 
-   "oldfieldname": "sales_team", 
-   "oldfieldtype": "Table", 
-   "options": "Sales Team", 
-   "permlevel": 0, 
-   "print_hide": 1, 
+   "fieldname": "sales_team",
+   "fieldtype": "Table",
+   "label": "Sales Team1",
+   "oldfieldname": "sales_team",
+   "oldfieldtype": "Table",
+   "options": "Sales Team",
+   "permlevel": 0,
+   "print_hide": 1,
    "read_only": 0
   }
- ], 
- "hide_toolbar": 0, 
- "icon": "icon-truck", 
- "idx": 1, 
- "in_create": 0, 
- "is_submittable": 1, 
- "modified": "2014-12-24 14:26:18.627591", 
- "modified_by": "Administrator", 
- "module": "Stock", 
- "name": "Delivery Note", 
- "owner": "Administrator", 
+ ],
+ "hide_toolbar": 0,
+ "icon": "icon-truck",
+ "idx": 1,
+ "in_create": 0,
+ "is_submittable": 1,
+ "modified": "2014-12-24 14:26:18.627591",
+ "modified_by": "Administrator",
+ "module": "Stock",
+ "name": "Delivery Note",
+ "owner": "Administrator",
  "permissions": [
   {
-   "amend": 1, 
-   "apply_user_permissions": 1, 
-   "cancel": 1, 
-   "create": 1, 
-   "delete": 1, 
-   "email": 1, 
-   "permlevel": 0, 
-   "print": 1, 
-   "read": 1, 
-   "report": 1, 
-   "role": "Material User", 
-   "submit": 1, 
+   "amend": 1,
+   "apply_user_permissions": 1,
+   "cancel": 1,
+   "create": 1,
+   "delete": 1,
+   "email": 1,
+   "permlevel": 0,
+   "print": 1,
+   "read": 1,
+   "report": 1,
+   "role": "Material User",
+   "submit": 1,
    "write": 1
-  }, 
+  },
   {
-   "amend": 1, 
-   "cancel": 1, 
-   "create": 1, 
-   "delete": 1, 
-   "email": 1, 
-   "permlevel": 0, 
-   "print": 1, 
-   "read": 1, 
-   "report": 1, 
-   "role": "Material Manager", 
-   "submit": 1, 
+   "amend": 1,
+   "cancel": 1,
+   "create": 1,
+   "delete": 1,
+   "email": 1,
+   "permlevel": 0,
+   "print": 1,
+   "read": 1,
+   "report": 1,
+   "role": "Material Manager",
+   "submit": 1,
    "write": 1
-  }, 
+  },
   {
-   "amend": 1, 
-   "apply_user_permissions": 1, 
-   "cancel": 1, 
-   "create": 1, 
-   "delete": 1, 
-   "email": 1, 
-   "permlevel": 0, 
-   "print": 1, 
-   "read": 1, 
-   "report": 1, 
-   "role": "Sales User", 
-   "submit": 1, 
+   "amend": 1,
+   "apply_user_permissions": 1,
+   "cancel": 1,
+   "create": 1,
+   "delete": 1,
+   "email": 1,
+   "permlevel": 0,
+   "print": 1,
+   "read": 1,
+   "report": 1,
+   "role": "Sales User",
+   "submit": 1,
    "write": 1
-  }, 
+  },
   {
-   "apply_user_permissions": 1, 
-   "cancel": 0, 
-   "create": 0, 
-   "delete": 0, 
-   "email": 0, 
-   "permlevel": 0, 
-   "print": 0, 
-   "read": 1, 
-   "report": 1, 
-   "role": "Accounts User", 
-   "submit": 0, 
+   "apply_user_permissions": 1,
+   "cancel": 0,
+   "create": 0,
+   "delete": 0,
+   "email": 0,
+   "permlevel": 0,
+   "print": 0,
+   "read": 1,
+   "report": 1,
+   "role": "Accounts User",
+   "submit": 0,
    "write": 0
-  }, 
+  },
   {
-   "apply_user_permissions": 1, 
-   "cancel": 0, 
-   "delete": 0, 
-   "email": 1, 
-   "permlevel": 0, 
-   "print": 1, 
-   "read": 1, 
-   "report": 1, 
+   "apply_user_permissions": 1,
+   "cancel": 0,
+   "delete": 0,
+   "email": 1,
+   "permlevel": 0,
+   "print": 1,
+   "read": 1,
+   "report": 1,
    "role": "Customer"
-  }, 
+  },
   {
-   "permlevel": 1, 
-   "read": 1, 
-   "role": "Material Manager", 
+   "permlevel": 1,
+   "read": 1,
+   "role": "Material Manager",
    "write": 1
   }
- ], 
- "read_only_onload": 1, 
- "search_fields": "status,customer,customer_name, territory,grand_total", 
- "sort_field": "modified", 
+ ],
+ "read_only_onload": 1,
+ "search_fields": "status,customer,customer_name, territory,grand_total",
+ "sort_field": "modified",
  "sort_order": "DESC"
-}
\ No newline at end of file
+}
diff --git a/erpnext/stock/doctype/packed_item/packed_item.py b/erpnext/stock/doctype/packed_item/packed_item.py
index 4db77e0..5c6d820 100644
--- a/erpnext/stock/doctype/packed_item/packed_item.py
+++ b/erpnext/stock/doctype/packed_item/packed_item.py
@@ -27,7 +27,7 @@
 		where item_code = %s and warehouse = %s""", (item, warehouse), as_dict = 1)
 	return det and det[0] or ''
 
-def update_packing_list_item(obj, packing_item_code, qty, warehouse, line, packing_list_idx):
+def update_packing_list_item(obj, packing_item_code, qty, warehouse, line):
 	bin = get_bin_qty(packing_item_code, warehouse)
 	item = get_packing_item_details(packing_item_code)
 
@@ -54,9 +54,7 @@
 		pi.warehouse = warehouse
 	if not pi.batch_no:
 		pi.batch_no = cstr(line.get("batch_no"))
-	pi.idx = packing_list_idx
 
-	packing_list_idx += 1
 
 
 def make_packing_list(obj, item_table_fieldname):
@@ -64,13 +62,11 @@
 
 	if obj.get("_action") and obj._action == "update_after_submit": return
 
-	packing_list_idx = 0
 	parent_items = []
 	for d in obj.get(item_table_fieldname):
 		if frappe.db.get_value("Sales BOM", {"new_item_code": d.item_code}):
 			for i in get_sales_bom_items(d.item_code):
-				update_packing_list_item(obj, i['item_code'], flt(i['qty'])*flt(d.qty),
-					d.warehouse, d, packing_list_idx)
+				update_packing_list_item(obj, i['item_code'], flt(i['qty'])*flt(d.qty), d.warehouse, d)
 
 			if [d.item_code, d.name] not in parent_items:
 				parent_items.append([d.item_code, d.name])
diff --git a/erpnext/stock/doctype/stock_ledger_entry/stock_ledger_entry.py b/erpnext/stock/doctype/stock_ledger_entry/stock_ledger_entry.py
index a47878a..7b65a67 100644
--- a/erpnext/stock/doctype/stock_ledger_entry/stock_ledger_entry.py
+++ b/erpnext/stock/doctype/stock_ledger_entry/stock_ledger_entry.py
@@ -40,8 +40,8 @@
 				(self.warehouse, self.item_code, self.batch_no))[0][0])
 
 			if batch_bal_after_transaction < 0:
-				frappe.throw(_("Negative balance in Batch {0} for Item {1} at Warehouse {2} on {3} {4}").format(\
-					batch_bal_after_transaction - self.actual_qty, self.item_code, self.warehouse,
+				frappe.throw(_("Negative balance {0} in Batch {1} for Item {2} at Warehouse {3} on {4} {5}")
+					.format(batch_bal_after_transaction - self.actual_qty, self.batch_no, self.item_code, self.warehouse,
 						formatdate(self.posting_date), self.posting_time))
 
 	def validate_mandatory(self):
diff --git a/erpnext/templates/print_formats/includes/taxes.html b/erpnext/templates/print_formats/includes/taxes.html
index bd1e709..61a78a3 100644
--- a/erpnext/templates/print_formats/includes/taxes.html
+++ b/erpnext/templates/print_formats/includes/taxes.html
@@ -7,7 +7,7 @@
 				<div class="col-xs-5 text-right">
 					<label>{{ charge.get_formatted("description") }}</label></div>
 				<div class="col-xs-7 text-right">
-					{{ frappe.format_value(charge.tax_amount / doc.conversion_rate,
+					{{ frappe.format_value(frappe.utils.flt(charge.tax_amount) / doc.conversion_rate,
 						table_meta.get_field("tax_amount"), doc, currency=doc.currency) }}
 				</div>
 			</div>
diff --git a/erpnext/translations/ar.csv b/erpnext/translations/ar.csv
index 133348e..24ea3ca 100644
--- a/erpnext/translations/ar.csv
+++ b/erpnext/translations/ar.csv
@@ -85,7 +85,7 @@
 "Accounting entry frozen up to this date, nobody can do / modify entry except role specified below.",قيد محاسبي المجمدة تصل إلى هذا التاريخ، لا أحد يمكن أن تفعل / تعديل إدخال باستثناء دور المحددة أدناه.

 Accounting journal entries.,المحاسبة إدخالات دفتر اليومية.

 Accounts,حسابات

-Accounts Browser,متصفح الحسابات 

+Accounts Browser,متصفح الحسابات

 Accounts Frozen Upto,حسابات مجمدة حتي

 Accounts Payable,ذمم دائنة

 Accounts Receivable,حسابات القبض

@@ -253,8 +253,8 @@
 Approving Role cannot be same as role the rule is Applicable To,الموافقة دور لا يمكن أن يكون نفس دور القاعدة تنطبق على

 Approving User,الموافقة العضو

 Approving User cannot be same as user the rule is Applicable To,الموافقة العضو لا يمكن أن يكون نفس المستخدم القاعدة تنطبق على

-Are you sure you want to STOP ,Are you sure you want to STOP 

-Are you sure you want to UNSTOP ,Are you sure you want to UNSTOP 

+Are you sure you want to STOP ,Are you sure you want to STOP

+Are you sure you want to UNSTOP ,Are you sure you want to UNSTOP

 Arrear Amount,متأخرات المبلغ

 "As Production Order can be made for this item, it must be a stock item.",كما يمكن أن يتم ترتيب الإنتاج لهذا البند، يجب أن يكون بند الأوراق المالية .

 As per Stock UOM,وفقا للأوراق UOM

@@ -283,7 +283,7 @@
 Auto Material Request,السيارات مادة طلب

 Auto-raise Material Request if quantity goes below re-order level in a warehouse,لصناعة السيارات في رفع طلب المواد إذا كمية يذهب دون مستوى إعادة الطلب في مستودع

 Automatically compose message on submission of transactions.,يؤلف تلقائيا رسالة على تقديم المعاملات.

-Automatically extract Job Applicants from a mail box ,Automatically extract Job Applicants from a mail box 

+Automatically extract Job Applicants from a mail box ,Automatically extract Job Applicants from a mail box

 Automatically extract Leads from a mail box e.g.,استخراج الشراء تلقائيا من صندوق البريد على سبيل المثال

 Automatically updated via Stock Entry of type Manufacture/Repack,تحديثها تلقائيا عن طريق إدخال الأسهم الصنع نوع / أعد حزم

 Automotive,السيارات

@@ -410,8 +410,8 @@
 "Buying must be checked, if Applicable For is selected as {0}",يجب أن يتم التحقق الشراء، إذا تم تحديد مطبق للك {0}

 C-Form,نموذج C-

 C-Form Applicable,C-نموذج قابل للتطبيق

-C-Form Invoice Detail, تفاصيل الفاتورة نموذج - س 

-C-Form No,رقم النموذج - س 

+C-Form Invoice Detail, تفاصيل الفاتورة نموذج - س

+C-Form No,رقم النموذج - س

 C-Form records,سجلات النموذج - س

 CENVAT Capital Goods,CENVAT السلع الرأسمالية

 CENVAT Edu Cess,CENVAT ايدو سيس

@@ -510,8 +510,8 @@
 Clearance Date not mentioned,إزالة التاريخ لم يرد ذكرها

 Clearance date cannot be before check date in row {0},تاريخ التخليص لا يمكن أن يكون قبل تاريخ الاختيار في الصف {0}

 Click on 'Make Sales Invoice' button to create a new Sales Invoice.,انقر على &#39;جعل مبيعات الفاتورة &quot;الزر لإنشاء فاتورة مبيعات جديدة.

-Click on a link to get options to expand get options ,Click on a link to get options to expand get options 

-Client,عميل	

+Click on a link to get options to expand get options ,Click on a link to get options to expand get options

+Client,عميل

 Close Balance Sheet and book Profit or Loss.,وثيقة الميزانية العمومية و كتاب الربح أو الخسارة .

 Closed,مغلق

 Closing (Cr),إغلاق (الكروم)

@@ -840,13 +840,13 @@
 Divorced,المطلقات

 Do Not Contact,عدم الاتصال

 Do not show any symbol like $ etc next to currencies.,لا تظهر أي رمز مثل $ الخ بجانب العملات.

-Do really want to unstop production order: ,Do really want to unstop production order: 

-Do you really want to STOP ,Do you really want to STOP 

+Do really want to unstop production order: ,Do really want to unstop production order:

+Do you really want to STOP ,Do you really want to STOP

 Do you really want to STOP this Material Request?,هل تريد حقا لوقف هذا طلب المواد ؟

 Do you really want to Submit all Salary Slip for month {0} and year {1},هل تريد حقا لتقديم كل زلة الرواتب ل شهر {0} و السنة {1}

-Do you really want to UNSTOP ,Do you really want to UNSTOP 

+Do you really want to UNSTOP ,Do you really want to UNSTOP

 Do you really want to UNSTOP this Material Request?,هل تريد حقا أن نزع السدادة هذا طلب المواد ؟

-Do you really want to stop production order: ,Do you really want to stop production order: 

+Do you really want to stop production order: ,Do you really want to stop production order:

 Doc Name,اسم الوثيقة

 Doc Type,نوع الوثيقة

 Document Description,وصف الوثيقة

@@ -898,7 +898,7 @@
 Email,البريد الإلكتروني

 Email Digest,البريد الإلكتروني دايجست

 Email Digest Settings,البريد الإلكتروني إعدادات دايجست

-Email Digest: ,Email Digest: 

+Email Digest: ,Email Digest:

 Email Id,البريد الإلكتروني معرف

 "Email Id where a job applicant will email e.g. ""jobs@example.com""",معرف البريد الإلكتروني حيث طالب العمل سوف البريد الإلكتروني على سبيل المثال &quot;jobs@example.com&quot;

 Email Notifications,إشعارات البريد الإلكتروني

@@ -958,7 +958,7 @@
 Entertainment & Leisure,الترفيه وترفيهية

 Entertainment Expenses,مصاريف الترفيه

 Entries,مقالات

-Entries against ,Entries against 

+Entries against ,Entries against

 Entries are not allowed against this Fiscal Year if the year is closed.,لا يسمح مقالات ضد السنة المالية الحالية إذا تم إغلاق السنة.

 Equity,إنصاف

 Error: {0} > {1},الخطأ: {0} > {1}

@@ -1573,7 +1573,7 @@
 Maintenance Visit {0} must be cancelled before cancelling this Sales Order,صيانة زيارة {0} يجب أن يتم إلغاء هذا الأمر قبل إلغاء المبيعات

 Maintenance start date can not be before delivery date for Serial No {0},صيانة تاريخ بداية لا يمكن أن يكون قبل تاريخ التسليم لل رقم المسلسل {0}

 Major/Optional Subjects,الرئيسية / اختياري الموضوعات

-Make ,Make 

+Make ,Make

 Make Accounting Entry For Every Stock Movement,جعل الدخول المحاسبة للحصول على كل حركة الأسهم

 Make Bank Entry,جعل قسيمة البنك

 Make Credit Note,جعل الائتمان ملاحظة

@@ -1722,7 +1722,7 @@
 Net Weight of each Item,الوزن الصافي لكل بند

 Net pay cannot be negative,صافي الأجور لا يمكن أن تكون سلبية

 Never,أبدا

-New ,New 

+New ,New

 New Account,حساب جديد

 New Account Name,اسم الحساب الجديد

 New BOM,BOM جديدة

@@ -2448,7 +2448,7 @@
 Rounded Total,تقريب إجمالي

 Rounded Total (Company Currency),المشاركات تقريب (العملة الشركة)

 Row # ,الصف #

-Row # {0}: ,Row # {0}: 

+Row # {0}: ,Row # {0}:

 Row #{0}: Ordered qty can not less than item's minimum order qty (defined in item master).,الصف # {0}: الكمية المطلوبة لا يمكن أن أقل من الحد الأدنى الكمية النظام القطعة (المحددة في البند الرئيسي).

 Row #{0}: Please specify Serial No for Item {1},الصف # {0}: يرجى تحديد رقم التسلسلي للتاريخ {1}

 Row {0}: Account does not match with \						Purchase Invoice Credit To account,الصف {0}: الحساب لا يتطابق مع \ شراء فاتورة الائتمان لحساب

@@ -2750,7 +2750,7 @@
 Stock Analytics,الأسهم تحليلات

 Stock Assets,الموجودات الأسهم

 Stock Balance,الأسهم الرصيد

-Stock Entries already created for Production Order ,Stock Entries already created for Production Order 

+Stock Entries already created for Production Order ,Stock Entries already created for Production Order

 Stock Entry,الأسهم الدخول

 Stock Entry Detail,الأسهم إدخال التفاصيل

 Stock Expenses,مصاريف الأسهم

@@ -3300,24 +3300,24 @@
 {0} budget for Account {1} against Cost Center {2} will exceed by {3},{0} ميزانية الحساب {1} ضد مركز التكلفة {2} سيتجاوز التي كتبها {3}

 {0} can not be negative,{0} لا يمكن أن تكون سلبية

 {0} created,{0} خلق

-{0} does not belong to Company {1},{0} لا تنتمي إلى شركة {1}

+{0} does not belong to Company {1},{0} {لا تنتمي إلى شركة {1

 {0} entered twice in Item Tax,{0} دخلت مرتين في ضريبة المدينة

 {0} is an invalid email address in 'Notification Email Address',"{0} هو عنوان بريد إلكتروني غير صالح في ' عنوان البريد الإلكتروني إعلام """

 {0} is mandatory,{0} إلزامي

-{0} is mandatory for Item {1},{0} إلزامي القطعة ل {1}

+{0} is mandatory for Item {1},{0} {إلزامي القطعة ل {1

 {0} is mandatory. Maybe Currency Exchange record is not created for {1} to {2}.,{0} إلزامي. ربما لا يتم إنشاء سجل سعر صرف العملة ل{1} إلى {2}.

 {0} is not a stock Item,{0} ليس الأسهم الإغلاق

 {0} is not a valid Batch Number for Item {1},{0} ليس رقم الدفعة صالحة لل تفاصيل {1}

-{0} is not a valid Leave Approver. Removing row #{1}.,{0} ليس صحيحا اترك الموافق. إزالة الصف # {1}.

+{0} is not a valid Leave Approver. Removing row #{1}.,{0} {ليس صحيحا اترك الموافق. إزالة الصف # {1.

 {0} is not a valid email id,{0} ليس معرف بريد إلكتروني صحيح

 {0} is now the default Fiscal Year. Please refresh your browser for the change to take effect.,{0} الآن الافتراضي السنة المالية. يرجى تحديث المتصفح ل التغيير نافذ المفعول .

 {0} is required,{0} مطلوب

 {0} must be a Purchased or Sub-Contracted Item in row {1},{0} يجب أن يكون البند شراؤها أو التعاقد الفرعي في الصف {1}

 {0} must be reduced by {1} or you should increase overflow tolerance,{0} يجب تخفيض كتبها {1} أو يجب زيادة الفائض التسامح

 {0} must have role 'Leave Approver',{0} يجب أن يكون دور ' اترك الموافق '

-{0} valid serial nos for Item {1},{0} غ المسلسل صالحة لل تفاصيل {1}

-{0} {1} against Bill {2} dated {3},{0} {1} ضد بيل {2} بتاريخ {3}

-{0} {1} against Invoice {2},{0} {1} ضد الفاتورة {2}

+{0} valid serial nos for Item {1},{0} {غ المسلسل صالحة لل تفاصيل {1

+{0} {1} against Bill {2} dated {3},{0} {1} {ضد بيل {2} بتاريخ {3

+{0} {1} against Invoice {2},{0} {1} {ضد الفاتورة {2

 {0} {1} has already been submitted,{0} {1} وقد تم بالفعل قدمت

 {0} {1} has been modified. Please refresh.,{0} {1} تم تعديل . يرجى تحديث.

 {0} {1} is not submitted,{0} {1} لا تقدم

diff --git a/erpnext/translations/el.csv b/erpnext/translations/el.csv
index d17749a..cf8af0b 100644
--- a/erpnext/translations/el.csv
+++ b/erpnext/translations/el.csv
@@ -255,7 +255,7 @@
 Approving User,Έγκριση χρήστη

 Approving User cannot be same as user the rule is Applicable To,Την έγκριση του χρήστη δεν μπορεί να είναι ίδιο με το χρήστη ο κανόνας ισχύει για

 Are you sure you want to STOP ,Είσαστε σίγουροι πως θέλετε να σταματήσετε

-Are you sure you want to UNSTOP ,Are you sure you want to UNSTOP 

+Are you sure you want to UNSTOP ,Are you sure you want to UNSTOP

 Arrear Amount,Καθυστερήσεις Ποσό

 "As Production Order can be made for this item, it must be a stock item.","Όπως μπορεί να γίνει Παραγωγής παραγγελίας για το συγκεκριμένο προϊόν , θα πρέπει να είναι ένα στοιχείο υλικού."

 As per Stock UOM,Όπως ανά Διαθέσιμο UOM

@@ -284,7 +284,7 @@
 Auto Material Request,Αυτόματη Αίτηση Υλικό

 Auto-raise Material Request if quantity goes below re-order level in a warehouse,Auto-raise Αίτηση Υλικό εάν η ποσότητα πέσει κάτω εκ νέου για το επίπεδο σε μια αποθήκη

 Automatically compose message on submission of transactions.,Αυτόματη συνθέτουν το μήνυμα για την υποβολή των συναλλαγών .

-Automatically extract Job Applicants from a mail box ,Automatically extract Job Applicants from a mail box 

+Automatically extract Job Applicants from a mail box ,Automatically extract Job Applicants from a mail box

 Automatically extract Leads from a mail box e.g.,"Αυτόματη εξαγωγή οδηγεί από ένα κουτί αλληλογραφίας , π.χ."

 Automatically updated via Stock Entry of type Manufacture/Repack,Αυτόματη ενημέρωση μέσω είσοδο στα αποθέματα Κατασκευή Τύπος / Repack

 Automotive,Αυτοκίνητο

@@ -511,7 +511,7 @@
 Clearance Date not mentioned,Εκκαθάριση Ημερομηνία που δεν αναφέρονται

 Clearance date cannot be before check date in row {0},Ημερομηνία εκκαθάρισης δεν μπορεί να είναι πριν από την ημερομηνία άφιξης στη γραμμή {0}

 Click on 'Make Sales Invoice' button to create a new Sales Invoice.,Κάντε κλικ στο «Κάνε Πωλήσεις Τιμολόγιο» για να δημιουργηθεί μια νέα τιμολογίου πώλησης.

-Click on a link to get options to expand get options ,Click on a link to get options to expand get options 

+Click on a link to get options to expand get options ,Click on a link to get options to expand get options

 Client,Πελάτης

 Close Balance Sheet and book Profit or Loss.,Κλείσιμο Ισολογισμού και των Αποτελεσμάτων βιβλίο ή απώλεια .

 Closed,Κλειστό

@@ -841,13 +841,13 @@
 Divorced,Διαζευγμένος

 Do Not Contact,Μην Επικοινωνία

 Do not show any symbol like $ etc next to currencies.,Να μην εμφανίζεται κανένα σύμβολο όπως $ κλπ δίπλα σε νομίσματα.

-Do really want to unstop production order: ,Do really want to unstop production order: 

-Do you really want to STOP ,Do you really want to STOP 

+Do really want to unstop production order: ,Do really want to unstop production order:

+Do you really want to STOP ,Do you really want to STOP

 Do you really want to STOP this Material Request?,Θέλετε πραγματικά να σταματήσει αυτό το υλικό την Αίτηση Συμμετοχής;

 Do you really want to Submit all Salary Slip for month {0} and year {1},Θέλετε πραγματικά να υποβληθούν όλα τα Slip Μισθός για το μήνα {0} και {1 χρόνο }

-Do you really want to UNSTOP ,Do you really want to UNSTOP 

+Do you really want to UNSTOP ,Do you really want to UNSTOP

 Do you really want to UNSTOP this Material Request?,Θέλετε πραγματικά να ξεβουλώνω αυτό Υλικό Αίτηση Συμμετοχής;

-Do you really want to stop production order: ,Do you really want to stop production order: 

+Do you really want to stop production order: ,Do you really want to stop production order:

 Doc Name,Doc Name

 Doc Type,Doc Τύπος

 Document Description,Περιγραφή εγγράφου

@@ -899,7 +899,7 @@
 Email,Email

 Email Digest,Email Digest

 Email Digest Settings,Email Digest Ρυθμίσεις

-Email Digest: ,Email Digest: 

+Email Digest: ,Email Digest:

 Email Id,Id Email

 "Email Id where a job applicant will email e.g. ""jobs@example.com""","Email Id, όπου ένας υποψήφιος θα e-mail π.χ. &quot;jobs@example.com&quot;"

 Email Notifications,Ειδοποιήσεις μέσω ηλεκτρονικού ταχυδρομείου

@@ -959,7 +959,7 @@
 Entertainment & Leisure,Διασκέδαση & Leisure

 Entertainment Expenses,Έξοδα Ψυχαγωγία

 Entries,Καταχωρήσεις

-Entries against ,Entries against 

+Entries against ,Entries against

 Entries are not allowed against this Fiscal Year if the year is closed.,"Οι συμμετοχές δεν επιτρέπεται κατά το τρέχον οικονομικό έτος, εάν το έτος είναι κλειστή."

 Equity,δικαιοσύνη

 Error: {0} > {1},Σφάλμα : {0} > {1}

@@ -1574,7 +1574,7 @@
 Maintenance Visit {0} must be cancelled before cancelling this Sales Order,Συντήρηση Επίσκεψη {0} πρέπει να ακυρωθεί πριν από την ακύρωση αυτής της παραγγελίας πώλησης

 Maintenance start date can not be before delivery date for Serial No {0},Ημερομηνία έναρξης συντήρησης δεν μπορεί να είναι πριν από την ημερομηνία παράδοσης Αύξων αριθμός {0}

 Major/Optional Subjects,Σημαντικές / προαιρετικά μαθήματα

-Make ,Make 

+Make ,Make

 Make Accounting Entry For Every Stock Movement,Κάντε Λογιστική καταχώρηση για κάθε Κίνημα Χρηματιστήριο

 Make Bank Entry,Κάντε Voucher Bank

 Make Credit Note,Κάντε Πιστωτικό Σημείωμα

@@ -1723,7 +1723,7 @@
 Net Weight of each Item,Καθαρό βάρος κάθε είδους

 Net pay cannot be negative,Καθαρή αμοιβή δεν μπορεί να είναι αρνητική

 Never,Ποτέ

-New ,New 

+New ,New

 New Account,Νέος λογαριασμός

 New Account Name,Νέο Όνομα λογαριασμού

 New BOM,Νέα BOM

@@ -2449,7 +2449,7 @@
 Rounded Total,Στρογγυλεμένες Σύνολο

 Rounded Total (Company Currency),Στρογγυλεμένες Σύνολο (νόμισμα της Εταιρείας)

 Row # ,Row #

-Row # {0}: ,Row # {0}: 

+Row # {0}: ,Row # {0}:

 Row #{0}: Ordered qty can not less than item's minimum order qty (defined in item master).,Σειρά # {0}: Διέταξε ποσότητα δεν μπορεί να μικρότερη από την ελάχιστη ποσότητα σειρά στοιχείου (όπως ορίζεται στο σημείο master).

 Row #{0}: Please specify Serial No for Item {1},Σειρά # {0}: Παρακαλείστε να προσδιορίσετε Αύξων αριθμός για τη θέση {1}

 Row {0}: Account does not match with \						Purchase Invoice Credit To account,Σειρά {0}: Ο λογαριασμός δεν ταιριάζει με \ τιμολογίου αγοράς πίστωση του λογαριασμού

@@ -3317,7 +3317,7 @@
 {0} must be reduced by {1} or you should increase overflow tolerance,{0} πρέπει να μειωθεί κατά {1} ή θα πρέπει να αυξήσει την ανοχή υπερχείλισης

 {0} must have role 'Leave Approver',{0} πρέπει να έχει ρόλο « Αφήστε Έγκρισης »

 {0} valid serial nos for Item {1},{0} έγκυρο σειριακό nos για τη θέση {1}

-{0} {1} against Bill {2} dated {3},{0} {1} εναντίον Bill {2} { 3 με ημερομηνία }

+{0} {1} against Bill {2} dated {3},{0} {1} εναντίον Bill {2} {3} με ημερομηνία

 {0} {1} against Invoice {2},{0} {1} κατά Τιμολόγιο {2}

 {0} {1} has already been submitted,{0} {1} έχει ήδη υποβληθεί

 {0} {1} has been modified. Please refresh.,{0} {1} έχει τροποποιηθεί . Παρακαλώ ανανεώσετε .

diff --git a/erpnext/translations/es.csv b/erpnext/translations/es.csv
index 67c8975..1528ffa 100644
--- a/erpnext/translations/es.csv
+++ b/erpnext/translations/es.csv
@@ -31,7 +31,7 @@
 1 Currency = [?] FractionFor e.g. 1 USD = 100 Cent,"1 moneda = [?] Fracción  Por ejemplo, 1 USD = 100 Cent"

 1. To maintain the customer wise item code and to make them searchable based on their code use this option,1 . Para mantener el código del artículo sabia cliente y para efectuar búsquedas en ellos en función de su uso de código de esta opción

 "<a href=""#Sales Browser/Customer Group"">Add / Edit</a>","<a href=""#Sales Browser/Customer grupo""> Añadir / Editar < / a>"

-"<a href=""#Sales Browser/Item Group"">Add / Edit</a>","<a href=""#Sales Browser/Item grupo""> Añadir / Editar < / a>"

+"<a href=""#Sales Browser/Item Group"">Add / Edit</a>","<a href=""#Sales Browser/Item Group""> Añadir / Editar < / a>"

 "<a href=""#Sales Browser/Territory"">Add / Edit</a>","<a href=""#Sales Browser/Territory""> Añadir / Editar < / a>"

 "<h4>Default Template</h4><p>Uses <a href=""http://jinja.pocoo.org/docs/templates/"">Jinja Templating</a> and all the fields of Address (including Custom Fields if any) will be available</p><pre><code>{{ address_line1 }}&lt;br&gt;{% if address_line2 %}{{ address_line2 }}&lt;br&gt;{% endif -%}{{ city }}&lt;br&gt;{% if state %}{{ state }}&lt;br&gt;{% endif -%}{% if pincode %} PIN:  {{ pincode }}&lt;br&gt;{% endif -%}{{ country }}&lt;br&gt;{% if phone %}Phone: {{ phone }}&lt;br&gt;{% endif -%}{% if fax %}Fax: {{ fax }}&lt;br&gt;{% endif -%}{% if email_id %}Email: {{ email_id }}&lt;br&gt;{% endif -%}</code></pre>","<h4> defecto plantilla </ h4>  <p> Usos <a href=""http://jinja.pocoo.org/docs/templates/""> Jinja plantillas </ a> y todos los campos de la Dirección ( incluyendo campos personalizados en su caso) estará disponible </ p>  <pre> <code> {{}} address_line1 <br>  {% if address_line2%} {{}} address_line2 <br> { endif% -%}  {{city}} <br>  {% if estado%} {{Estado}} {% endif <br> -%}  {% if%} pincode PIN: {{pincode}} {% endif <br> -%}  {{país}} <br>  {% if%} de teléfono Teléfono: {{phone}} {<br> endif% -%}  {% if%} fax Fax: {{fax}} {% endif <br> -%}  {% if%} email_ID Email: {{}} email_ID <br> ; {% endif -%}  </ code> </ pre>"

 A Customer Group exists with same name please change the Customer name or rename the Customer Group,"Existe un Grupo de Clientes con el mismo nombre, por favor cambie el nombre del Cliente o cambie el nombre del Grupo de Clientes"

@@ -2745,7 +2745,7 @@
 Static Parameters,Parámetros estáticos

 Status,estado

 Status must be one of {0},Estado debe ser uno de {0}

-Status of {0} {1} is now {2},Situación de {0} {1} { 2 es ahora }

+Status of {0} {1} is now {2},Situación de {0} {1} {2} es ahora

 Status updated to {0},Estado actualizado a {0}

 Statutory info and other general information about your Supplier,Información legal y otra información general acerca de su proveedor

 Stay Updated,Manténgase actualizado

@@ -3322,7 +3322,7 @@
 {0} must be reduced by {1} or you should increase overflow tolerance,{0} debe reducirse en {1} o se debe aumentar la tolerancia de desbordamiento

 {0} must have role 'Leave Approver',{0} debe tener rol ' Dejar aprobador '

 {0} valid serial nos for Item {1},{0} nn serie válidos para el elemento {1}

-{0} {1} against Bill {2} dated {3},{0} {1} { 2 contra Bill } {3} de fecha

+{0} {1} against Bill {2} dated {3},{0} {1} {2} contra Bill {3} de fecha

 {0} {1} against Invoice {2},{0} {1} contra Factura {2}

 {0} {1} has already been submitted,{0} {1} ya ha sido presentado

 {0} {1} has been modified. Please refresh.,{0} {1} ha sido modificado. Por favor regenere .

diff --git a/erpnext/translations/fr.csv b/erpnext/translations/fr.csv
index 58bc947..a5d065f 100644
--- a/erpnext/translations/fr.csv
+++ b/erpnext/translations/fr.csv
@@ -3318,7 +3318,7 @@
 {0} must be reduced by {1} or you should increase overflow tolerance,{0} doit être réduite par {1} ou vous devez augmenter la tolérance de dépassement

 {0} must have role 'Leave Approver',Nouveau Stock UDM est nécessaire

 {0} valid serial nos for Item {1},BOM {0} pour objet {1} à la ligne {2} est inactif ou non soumis

-{0} {1} against Bill {2} dated {3},S'il vous plaît entrer le titre !

+{0} {1} against Bill {2} dated {3},{0} {1} contre le projet de loi en date du {2} {3}

 {0} {1} against Invoice {2},investissements

 {0} {1} has already been submitted,"S'il vous plaît entrer » est sous-traitée "" comme Oui ou Non"

 {0} {1} has been modified. Please refresh.,Point ou Entrepôt à la ligne {0} ne correspond pas à la Demande de Matériel