Fields added in all sales and purchase doctypes
diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json
index eb756de..bd8199c 100755
--- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json
+++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json
@@ -264,6 +264,16 @@
    "permlevel": 0
   }, 
   {
+   "fieldname": "base_total", 
+   "fieldtype": "Currency", 
+   "label": "Total (Company Currency)", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "precision": "", 
+   "print_hide": 1, 
+   "read_only": 1
+  }, 
+  {
    "description": "Will be calculated automatically when you enter the details", 
    "fieldname": "base_net_total", 
    "fieldtype": "Currency", 
@@ -281,6 +291,17 @@
    "permlevel": 0
   }, 
   {
+   "fieldname": "total", 
+   "fieldtype": "Currency", 
+   "hidden": 0, 
+   "label": "Total", 
+   "options": "currency", 
+   "permlevel": 0, 
+   "precision": "", 
+   "print_hide": 1, 
+   "read_only": 1
+  }, 
+  {
    "fieldname": "net_total", 
    "fieldtype": "Currency", 
    "label": "Net Total", 
@@ -373,35 +394,10 @@
    "read_only": 1
   }, 
   {
-   "fieldname": "base_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": "base_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", 
+   "fieldname": "column_break_40", 
    "fieldtype": "Column Break", 
-   "oldfieldtype": "Column Break", 
    "permlevel": 0, 
-   "print_hide": 1, 
-   "read_only": 0, 
-   "width": "50%"
+   "precision": ""
   }, 
   {
    "fieldname": "taxes_and_charges_added", 
@@ -434,6 +430,84 @@
    "precision": ""
   }, 
   {
+   "fieldname": "section_break_44", 
+   "fieldtype": "Section Break", 
+   "permlevel": 0, 
+   "precision": ""
+  }, 
+  {
+   "default": "Grand Total", 
+   "fieldname": "apply_discount_on", 
+   "fieldtype": "Select", 
+   "label": "Apply Discount On", 
+   "options": "\nGrand Total\nNet Total", 
+   "permlevel": 0, 
+   "precision": "", 
+   "print_hide": 1
+  }, 
+  {
+   "fieldname": "column_break_46", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0, 
+   "precision": ""
+  }, 
+  {
+   "fieldname": "discount_amount", 
+   "fieldtype": "Currency", 
+   "label": "Discount Amount", 
+   "options": "currency", 
+   "permlevel": 0, 
+   "precision": "", 
+   "print_hide": 1
+  }, 
+  {
+   "fieldname": "base_discount_amount", 
+   "fieldtype": "Currency", 
+   "label": "Discount Amount (Company Currency)", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "precision": "", 
+   "print_hide": 1, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "section_break_49", 
+   "fieldtype": "Section Break", 
+   "permlevel": 0, 
+   "precision": ""
+  }, 
+  {
+   "fieldname": "base_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": "base_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, 
+   "width": "50%"
+  }, 
+  {
    "fieldname": "grand_total", 
    "fieldtype": "Currency", 
    "in_list_view": 1, 
@@ -888,7 +962,7 @@
  "icon": "icon-file-text", 
  "idx": 1, 
  "is_submittable": 1, 
- "modified": "2015-02-20 05:16:22.693978", 
+ "modified": "2015-02-23 15:33:28.554922", 
  "modified_by": "Administrator", 
  "module": "Accounts", 
  "name": "Purchase Invoice", 
diff --git a/erpnext/accounts/doctype/purchase_invoice_item/purchase_invoice_item.json b/erpnext/accounts/doctype/purchase_invoice_item/purchase_invoice_item.json
index 33ccb27..54b633b 100755
--- a/erpnext/accounts/doctype/purchase_invoice_item/purchase_invoice_item.json
+++ b/erpnext/accounts/doctype/purchase_invoice_item/purchase_invoice_item.json
@@ -195,6 +195,58 @@
    "read_only": 1
   }, 
   {
+   "fieldname": "section_break_22", 
+   "fieldtype": "Section Break", 
+   "permlevel": 0, 
+   "precision": ""
+  }, 
+  {
+   "fieldname": "net_rate", 
+   "fieldtype": "Currency", 
+   "label": "Net Rate", 
+   "options": "currency", 
+   "permlevel": 0, 
+   "precision": "", 
+   "print_hide": 1, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "net_amount", 
+   "fieldtype": "Currency", 
+   "label": "Net Amount", 
+   "options": "currency", 
+   "permlevel": 0, 
+   "precision": "", 
+   "print_hide": 1, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "column_break_25", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0, 
+   "precision": ""
+  }, 
+  {
+   "fieldname": "base_net_rate", 
+   "fieldtype": "Currency", 
+   "label": "Net Rate (Company Currency)", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "precision": "", 
+   "print_hide": 1, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "base_net_amount", 
+   "fieldtype": "Currency", 
+   "label": "Net Amount (Company Currency)", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "precision": "", 
+   "print_hide": 1, 
+   "read_only": 1
+  }, 
+  {
    "fieldname": "accounting", 
    "fieldtype": "Section Break", 
    "label": "Accounting", 
@@ -399,7 +451,7 @@
  ], 
  "idx": 1, 
  "istable": 1, 
- "modified": "2015-02-19 01:07:01.060411", 
+ "modified": "2015-02-23 15:35:32.895515", 
  "modified_by": "Administrator", 
  "module": "Accounts", 
  "name": "Purchase Invoice Item", 
diff --git a/erpnext/accounts/doctype/purchase_taxes_and_charges/purchase_taxes_and_charges.json b/erpnext/accounts/doctype/purchase_taxes_and_charges/purchase_taxes_and_charges.json
index 8244d12..057383a 100644
--- a/erpnext/accounts/doctype/purchase_taxes_and_charges/purchase_taxes_and_charges.json
+++ b/erpnext/accounts/doctype/purchase_taxes_and_charges/purchase_taxes_and_charges.json
@@ -53,17 +53,13 @@
    "read_only": 0
   }, 
   {
-   "fieldname": "description", 
-   "fieldtype": "Small Text", 
-   "in_list_view": 1, 
-   "label": "Description", 
-   "oldfieldname": "description", 
-   "oldfieldtype": "Small Text", 
+   "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?", 
    "permlevel": 0, 
-   "print_width": "300px", 
-   "read_only": 0, 
-   "reqd": 1, 
-   "width": "300px"
+   "precision": "", 
+   "report_hide": 1
   }, 
   {
    "fieldname": "col_break1", 
@@ -95,6 +91,19 @@
    "read_only": 0
   }, 
   {
+   "fieldname": "description", 
+   "fieldtype": "Small Text", 
+   "in_list_view": 1, 
+   "label": "Description", 
+   "oldfieldname": "description", 
+   "oldfieldtype": "Small Text", 
+   "permlevel": 0, 
+   "print_width": "300px", 
+   "read_only": 0, 
+   "reqd": 1, 
+   "width": "300px"
+  }, 
+  {
    "fieldname": "rate", 
    "fieldtype": "Float", 
    "in_list_view": 1, 
@@ -106,25 +115,77 @@
    "reqd": 0
   }, 
   {
+   "fieldname": "section_break_9", 
+   "fieldtype": "Section Break", 
+   "permlevel": 0, 
+   "precision": ""
+  }, 
+  {
    "fieldname": "tax_amount", 
    "fieldtype": "Currency", 
    "in_list_view": 1, 
    "label": "Amount", 
    "oldfieldname": "tax_amount", 
    "oldfieldtype": "Currency", 
-   "options": "Company:company:default_currency", 
+   "options": "currency", 
    "permlevel": 0, 
    "read_only": 1, 
    "reqd": 0
   }, 
   {
+   "fieldname": "tax_amount_after_discount_amount", 
+   "fieldtype": "Currency", 
+   "label": "Tax Amount After Discount Amount", 
+   "options": "currency", 
+   "permlevel": 0, 
+   "precision": "", 
+   "print_hide": 1, 
+   "read_only": 1
+  }, 
+  {
    "fieldname": "total", 
    "fieldtype": "Currency", 
    "label": "Total", 
    "oldfieldname": "total", 
    "oldfieldtype": "Currency", 
+   "options": "currency", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "column_break_14", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0, 
+   "precision": ""
+  }, 
+  {
+   "fieldname": "base_tax_amount", 
+   "fieldtype": "Currency", 
+   "label": "Amount (Company Currency)", 
    "options": "Company:company:default_currency", 
    "permlevel": 0, 
+   "precision": "", 
+   "print_hide": 1, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "base_total", 
+   "fieldtype": "Currency", 
+   "hidden": 1, 
+   "label": "Total (Company Currency)", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "precision": "", 
+   "print_hide": 1
+  }, 
+  {
+   "fieldname": "base_tax_amount_after_discount_amount", 
+   "fieldtype": "Currency", 
+   "label": "Tax Amount After Discount Amount", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "precision": "", 
+   "print_hide": 1, 
    "read_only": 1
   }, 
   {
@@ -155,7 +216,7 @@
  "hide_heading": 1, 
  "idx": 1, 
  "istable": 1, 
- "modified": "2015-02-19 01:07:01.581115", 
+ "modified": "2015-02-23 15:01:31.895131", 
  "modified_by": "Administrator", 
  "module": "Accounts", 
  "name": "Purchase Taxes and Charges", 
diff --git a/erpnext/accounts/doctype/purchase_taxes_and_charges_master/purchase_taxes_and_charges_master.js b/erpnext/accounts/doctype/purchase_taxes_and_charges_master/purchase_taxes_and_charges_master.js
index 4493d52..09f2e8d 100644
--- a/erpnext/accounts/doctype/purchase_taxes_and_charges_master/purchase_taxes_and_charges_master.js
+++ b/erpnext/accounts/doctype/purchase_taxes_and_charges_master/purchase_taxes_and_charges_master.js
@@ -1,8 +1,6 @@
 // Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
-cur_frm.cscript.tax_table = "Purchase Taxes and Charges";
-
 {% include "public/js/controllers/accounts.js" %}
 
 frappe.ui.form.on("Purchase Taxes and Charges", "add_deduct_tax", function(doc, cdt, cdn) {
@@ -17,4 +15,4 @@
 		d.add_deduct_tax = '';
 	}
 	refresh_field('add_deduct_tax', d.name, 'taxes');
-}
+});
diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.json b/erpnext/accounts/doctype/sales_invoice/sales_invoice.json
index 61eb191..d7837a2 100644
--- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.json
+++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.json
@@ -332,6 +332,16 @@
    "permlevel": 0
   }, 
   {
+   "fieldname": "base_total", 
+   "fieldtype": "Currency", 
+   "label": "Total (Company Currency)", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "precision": "", 
+   "print_hide": 1, 
+   "read_only": 1
+  }, 
+  {
    "fieldname": "base_net_total", 
    "fieldtype": "Currency", 
    "label": "Net Total (Company Currency)", 
@@ -349,6 +359,16 @@
    "permlevel": 0
   }, 
   {
+   "fieldname": "total", 
+   "fieldtype": "Currency", 
+   "label": "Total", 
+   "options": "currency", 
+   "permlevel": 0, 
+   "precision": "", 
+   "print_hide": 1, 
+   "read_only": 1
+  }, 
+  {
    "fieldname": "net_total", 
    "fieldtype": "Currency", 
    "label": "Net Total", 
@@ -432,6 +452,12 @@
    "read_only": 1
   }, 
   {
+   "fieldname": "column_break_47", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0, 
+   "precision": ""
+  }, 
+  {
    "fieldname": "base_total_taxes_and_charges", 
    "fieldtype": "Currency", 
    "label": "Total Taxes and Charges (Company Currency)", 
@@ -443,7 +469,23 @@
    "read_only": 1
   }, 
   {
-   "fieldname": "column_break_45", 
+   "fieldname": "section_break_49", 
+   "fieldtype": "Section Break", 
+   "permlevel": 0, 
+   "precision": ""
+  }, 
+  {
+   "default": "Grand Total", 
+   "fieldname": "apply_discount_on", 
+   "fieldtype": "Select", 
+   "label": "Apply Discount On", 
+   "options": "\nGrand Total\nNet Total", 
+   "permlevel": 0, 
+   "precision": "", 
+   "print_hide": 1
+  }, 
+  {
+   "fieldname": "column_break_51", 
    "fieldtype": "Column Break", 
    "permlevel": 0
   }, 
@@ -1202,7 +1244,7 @@
  "icon": "icon-file-text", 
  "idx": 1, 
  "is_submittable": 1, 
- "modified": "2015-02-20 05:16:19.256361", 
+ "modified": "2015-02-23 15:53:37.894033", 
  "modified_by": "Administrator", 
  "module": "Accounts", 
  "name": "Sales Invoice", 
diff --git a/erpnext/accounts/doctype/sales_invoice_item/sales_invoice_item.json b/erpnext/accounts/doctype/sales_invoice_item/sales_invoice_item.json
index b87c632..e720f1b 100644
--- a/erpnext/accounts/doctype/sales_invoice_item/sales_invoice_item.json
+++ b/erpnext/accounts/doctype/sales_invoice_item/sales_invoice_item.json
@@ -202,6 +202,58 @@
    "read_only": 1
   }, 
   {
+   "fieldname": "section_break_21", 
+   "fieldtype": "Section Break", 
+   "permlevel": 0, 
+   "precision": ""
+  }, 
+  {
+   "fieldname": "net_rate", 
+   "fieldtype": "Currency", 
+   "label": "Net Rate", 
+   "options": "currency", 
+   "permlevel": 0, 
+   "precision": "", 
+   "print_hide": 1, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "net_amount", 
+   "fieldtype": "Currency", 
+   "label": "Net Amount", 
+   "options": "currency", 
+   "permlevel": 0, 
+   "precision": "", 
+   "print_hide": 1, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "column_break_24", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0, 
+   "precision": ""
+  }, 
+  {
+   "fieldname": "base_net_rate", 
+   "fieldtype": "Currency", 
+   "label": "Net Rate (Company Currency)", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "precision": "", 
+   "print_hide": 1, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "base_net_amount", 
+   "fieldtype": "Currency", 
+   "label": "Net Amount (Company Currency)", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "precision": "", 
+   "print_hide": 1, 
+   "read_only": 1
+  }, 
+  {
    "fieldname": "accounting", 
    "fieldtype": "Section Break", 
    "label": "Accounting", 
@@ -439,7 +491,7 @@
  ], 
  "idx": 1, 
  "istable": 1, 
- "modified": "2015-02-19 01:07:01.862525", 
+ "modified": "2015-02-23 15:55:23.143072", 
  "modified_by": "Administrator", 
  "module": "Accounts", 
  "name": "Sales Invoice Item", 
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 2a0f506..2322550 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,183 +1,195 @@
 {
- "autoname": "hash",
- "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,
-   "width": "300px"
-  },
-  {
-   "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",
-   "options": "currency",
-   "permlevel": 0,
-   "precision": ""
-  },
+   "fieldname": "col_break_1", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0, 
+   "width": "50%"
+  }, 
   {
-   "fieldname": "base_tax_amount",
-   "fieldtype": "Currency",
-   "in_list_view": 0,
-   "label": "Amount (Company Currency)",
-   "oldfieldname": "tax_amount",
-   "oldfieldtype": "Currency",
-   "options": "Company:company:default_currency",
-   "permlevel": 0,
-   "read_only": 1,
-   "reqd": 0
-  },
+   "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": "total",
-   "fieldtype": "Currency",
-   "label": "Total",
-   "options": "currency",
-   "permlevel": 0,
-   "precision": "",
-   "read_only": 1
-  },
-  {
-   "fieldname": "base_total",
-   "fieldtype": "Currency",
-   "label": "Total (Company Currency)",
-   "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",
-   "label": "Tax Amount After Discount Amount",
-   "options": "currency",
-   "permlevel": 0,
-   "precision": "",
+   "fieldname": "section_break_9", 
+   "fieldtype": "Section Break", 
+   "permlevel": 0, 
+   "precision": ""
+  }, 
+  {
+   "fieldname": "tax_amount", 
+   "fieldtype": "Currency", 
+   "in_list_view": 1, 
+   "label": "Amount", 
+   "options": "currency", 
+   "permlevel": 0, 
+   "precision": ""
+  }, 
+  {
+   "fieldname": "total", 
+   "fieldtype": "Currency", 
+   "label": "Total", 
+   "options": "currency", 
+   "permlevel": 0, 
+   "precision": "", 
    "read_only": 1
-  },
+  }, 
   {
-   "depends_on": "eval:parent.discount_amount",
-   "fieldname": "base_tax_amount_after_discount_amount",
-   "fieldtype": "Currency",
-   "hidden": 0,
-   "label": "Tax Amount After Discount Amount (Company Currency)",
-   "options": "Company:company:default_currency",
-   "permlevel": 0,
+   "fieldname": "tax_amount_after_discount_amount", 
+   "fieldtype": "Currency", 
+   "label": "Tax Amount After Discount Amount", 
+   "options": "currency", 
+   "permlevel": 0, 
+   "precision": "", 
    "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": "column_break_13", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0, 
+   "precision": ""
+  }, 
+  {
+   "fieldname": "base_tax_amount", 
+   "fieldtype": "Currency", 
+   "in_list_view": 0, 
+   "label": "Amount (Company Currency)", 
+   "oldfieldname": "tax_amount", 
+   "oldfieldtype": "Currency", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "read_only": 1, 
+   "reqd": 0
+  }, 
+  {
+   "fieldname": "base_total", 
+   "fieldtype": "Currency", 
+   "label": "Total (Company Currency)", 
+   "oldfieldname": "total", 
+   "oldfieldtype": "Currency", 
+   "options": "Company:company:default_currency", 
+   "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,
+   "depends_on": "eval:parent.discount_amount", 
+   "fieldname": "base_tax_amount_after_discount_amount", 
+   "fieldtype": "Currency", 
+   "hidden": 0, 
+   "label": "Tax Amount After Discount Amount (Company Currency)", 
+   "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, 
+   "read_only": 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": "2015-02-19 17:00:07.949352",
- "modified_by": "Administrator",
- "module": "Accounts",
- "name": "Sales Taxes and Charges",
- "owner": "Administrator",
+ ], 
+ "hide_heading": 1, 
+ "idx": 1, 
+ "istable": 1, 
+ "modified": "2015-02-23 12:36:02.213508", 
+ "modified_by": "Administrator", 
+ "module": "Accounts", 
+ "name": "Sales Taxes and Charges", 
+ "owner": "Administrator", 
  "permissions": []
-}
+}
\ No newline at end of file
diff --git a/erpnext/buying/doctype/purchase_common/purchase_common.js b/erpnext/buying/doctype/purchase_common/purchase_common.js
index dc3b3a3..414134a 100644
--- a/erpnext/buying/doctype/purchase_common/purchase_common.js
+++ b/erpnext/buying/doctype/purchase_common/purchase_common.js
@@ -1,10 +1,11 @@
 // Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
+frappe.provide("erpnext.buying");
+
 cur_frm.cscript.tax_table = "Purchase Taxes and Charges";
 {% include 'accounts/doctype/purchase_taxes_and_charges_master/purchase_taxes_and_charges_master.js' %}
 
-frappe.provide("erpnext.buying");
 frappe.require("assets/erpnext/js/controllers/transaction.js");
 
 cur_frm.email_field = "contact_email";
diff --git a/erpnext/buying/doctype/purchase_order/purchase_order.json b/erpnext/buying/doctype/purchase_order/purchase_order.json
index 2698f24..6776535 100644
--- a/erpnext/buying/doctype/purchase_order/purchase_order.json
+++ b/erpnext/buying/doctype/purchase_order/purchase_order.json
@@ -225,11 +225,29 @@
    "permlevel": 0
   }, 
   {
+   "fieldname": "get_last_purchase_rate", 
+   "fieldtype": "Button", 
+   "label": "Get Last Purchase Rate", 
+   "oldfieldtype": "Button", 
+   "permlevel": 0, 
+   "print_hide": 0
+  }, 
+  {
    "fieldname": "sb_last_purchase", 
    "fieldtype": "Section Break", 
    "permlevel": 0
   }, 
   {
+   "fieldname": "base_total", 
+   "fieldtype": "Currency", 
+   "label": "Total (Company Currency)", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "precision": "", 
+   "print_hide": 1, 
+   "read_only": 1
+  }, 
+  {
    "fieldname": "base_net_total", 
    "fieldtype": "Currency", 
    "label": "Net Total (Company Currency)", 
@@ -248,6 +266,16 @@
    "permlevel": 0
   }, 
   {
+   "fieldname": "total", 
+   "fieldtype": "Currency", 
+   "label": "Total", 
+   "options": "currency", 
+   "permlevel": 0, 
+   "precision": "", 
+   "print_hide": 1, 
+   "read_only": 1
+  }, 
+  {
    "fieldname": "net_total", 
    "fieldtype": "Currency", 
    "label": "Net Total", 
@@ -260,14 +288,6 @@
    "read_only": 1
   }, 
   {
-   "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", 
@@ -352,6 +372,93 @@
    "read_only": 1
   }, 
   {
+   "fieldname": "column_break_39", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0, 
+   "precision": ""
+  }, 
+  {
+   "fieldname": "taxes_and_charges_added", 
+   "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": "taxes_and_charges_deducted", 
+   "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": "total_taxes_and_charges", 
+   "fieldtype": "Currency", 
+   "label": "Total Taxes and Charges", 
+   "options": "currency", 
+   "permlevel": 0, 
+   "precision": "", 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "discount_section", 
+   "fieldtype": "Section Break", 
+   "permlevel": 0, 
+   "precision": ""
+  }, 
+  {
+   "default": "Grand Total", 
+   "fieldname": "apply_discount_on", 
+   "fieldtype": "Select", 
+   "label": "Apply Discount On", 
+   "options": "\nGrand Total\nNet Total", 
+   "permlevel": 0, 
+   "precision": ""
+  }, 
+  {
+   "fieldname": "column_break_45", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0, 
+   "precision": ""
+  }, 
+  {
+   "fieldname": "discount_amount", 
+   "fieldtype": "Currency", 
+   "label": "Discount Amount", 
+   "options": "currency", 
+   "permlevel": 0, 
+   "precision": "", 
+   "print_hide": 1
+  }, 
+  {
+   "fieldname": "base_discount_amount", 
+   "fieldtype": "Currency", 
+   "label": "Discount Amount (Company Currency)", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "precision": "", 
+   "print_hide": 1, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "totals_section", 
+   "fieldtype": "Section Break", 
+   "permlevel": 0, 
+   "precision": ""
+  }, 
+  {
    "fieldname": "base_grand_total", 
    "fieldtype": "Currency", 
    "label": "Grand Total (Company Currency)", 
@@ -401,40 +508,6 @@
    "print_hide": 0
   }, 
   {
-   "fieldname": "taxes_and_charges_added", 
-   "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": "taxes_and_charges_deducted", 
-   "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": "total_taxes_and_charges", 
-   "fieldtype": "Currency", 
-   "label": "Total Taxes and Charges", 
-   "options": "currency", 
-   "permlevel": 0, 
-   "precision": ""
-  }, 
-  {
    "fieldname": "grand_total", 
    "fieldtype": "Currency", 
    "in_list_view": 1, 
@@ -783,7 +856,7 @@
  "icon": "icon-file-text", 
  "idx": 1, 
  "is_submittable": 1, 
- "modified": "2015-02-20 05:16:19.990723", 
+ "modified": "2015-02-23 15:10:05.156787", 
  "modified_by": "Administrator", 
  "module": "Buying", 
  "name": "Purchase Order", 
diff --git a/erpnext/buying/doctype/purchase_order_item/purchase_order_item.json b/erpnext/buying/doctype/purchase_order_item/purchase_order_item.json
index b0ba316..58af076 100755
--- a/erpnext/buying/doctype/purchase_order_item/purchase_order_item.json
+++ b/erpnext/buying/doctype/purchase_order_item/purchase_order_item.json
@@ -282,6 +282,58 @@
    "read_only": 1
   }, 
   {
+   "fieldname": "section_break_29", 
+   "fieldtype": "Section Break", 
+   "permlevel": 0, 
+   "precision": ""
+  }, 
+  {
+   "fieldname": "net_rate", 
+   "fieldtype": "Currency", 
+   "label": "Net Rate", 
+   "options": "currency", 
+   "permlevel": 0, 
+   "precision": "", 
+   "print_hide": 1, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "net_amount", 
+   "fieldtype": "Currency", 
+   "label": "Net Amount", 
+   "options": "currency", 
+   "permlevel": 0, 
+   "precision": "", 
+   "print_hide": 1, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "column_break_32", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0, 
+   "precision": ""
+  }, 
+  {
+   "fieldname": "base_net_rate", 
+   "fieldtype": "Currency", 
+   "label": "Net Rate (Company Currency)", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "precision": "", 
+   "print_hide": 1, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "base_net_amount", 
+   "fieldtype": "Currency", 
+   "label": "Net Amount (Company Currency)", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "precision": "", 
+   "print_hide": 1, 
+   "read_only": 1
+  }, 
+  {
    "fieldname": "warehouse_and_reference", 
    "fieldtype": "Section Break", 
    "label": "Warehouse and Reference", 
@@ -484,7 +536,7 @@
  ], 
  "idx": 1, 
  "istable": 1, 
- "modified": "2015-02-19 01:07:01.224244", 
+ "modified": "2015-02-23 12:21:53.399279", 
  "modified_by": "Administrator", 
  "module": "Buying", 
  "name": "Purchase Order Item", 
diff --git a/erpnext/buying/doctype/supplier_quotation/supplier_quotation.json b/erpnext/buying/doctype/supplier_quotation/supplier_quotation.json
index 352178f..0ed6023 100644
--- a/erpnext/buying/doctype/supplier_quotation/supplier_quotation.json
+++ b/erpnext/buying/doctype/supplier_quotation/supplier_quotation.json
@@ -1,681 +1,754 @@
 {
- "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": 0,
-   "label": "Name",
-   "permlevel": 0,
+   "fieldname": "supplier_name", 
+   "fieldtype": "Data", 
+   "hidden": 0, 
+   "in_list_view": 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
-  },
+  }, 
   {
-   "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": "",
-   "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": "", 
+   "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_and_price_list",
-   "fieldtype": "Section Break",
-   "label": "",
-   "options": "icon-tag",
+   "fieldname": "currency_and_price_list", 
+   "fieldtype": "Section Break", 
+   "label": "", 
+   "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": 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",
-   "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": "",
-   "oldfieldtype": "Section Break",
-   "options": "icon-shopping-cart",
+   "fieldname": "items_section", 
+   "fieldtype": "Section Break", 
+   "label": "", 
+   "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": "base_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": "base_total", 
+   "fieldtype": "Currency", 
+   "label": "Total (Company Currency)", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "precision": "", 
+   "print_hide": 1, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "base_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",
-   "fieldtype": "Currency",
-   "label": "Net Total",
-   "no_copy": 0,
-   "oldfieldname": "net_total_import",
-   "oldfieldtype": "Currency",
-   "options": "currency",
-   "permlevel": 0,
-   "print_hide": 0,
+   "fieldname": "total", 
+   "fieldtype": "Currency", 
+   "label": "Total", 
+   "options": "currency", 
+   "permlevel": 0, 
+   "precision": "", 
+   "print_hide": 1, 
    "read_only": 1
-  },
+  }, 
   {
-   "fieldname": "taxes_section",
-   "fieldtype": "Section Break",
-   "label": "Taxes and Charges",
-   "oldfieldtype": "Section Break",
-   "options": "icon-money",
+   "fieldname": "net_total", 
+   "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", 
    "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": "",
-   "oldfieldtype": "Section Break",
-   "options": "icon-money",
+   "fieldname": "totals", 
+   "fieldtype": "Section Break", 
+   "label": "", 
+   "oldfieldtype": "Section Break", 
+   "options": "icon-money", 
    "permlevel": 0
-  },
+  }, 
   {
-   "fieldname": "base_taxes_and_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": "base_taxes_and_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": "base_taxes_and_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": "base_taxes_and_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": "base_total_taxes_and_charges",
-   "fieldtype": "Currency",
-   "label": "Total Taxes and Charges (Company Currency)",
-   "no_copy": 1,
-   "oldfieldname": "total_tax",
-   "oldfieldtype": "Currency",
-   "options": "Company:company:default_currency",
-   "permlevel": 0,
-   "print_hide": 1,
+   "fieldname": "base_total_taxes_and_charges", 
+   "fieldtype": "Currency", 
+   "label": "Total Taxes and Charges (Company Currency)", 
+   "no_copy": 1, 
+   "oldfieldname": "total_tax", 
+   "oldfieldtype": "Currency", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
    "read_only": 1
-  },
+  }, 
   {
-   "fieldname": "base_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": "column_break_37", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0, 
+   "precision": ""
+  }, 
+  {
+   "fieldname": "taxes_and_charges_added", 
+   "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": "taxes_and_charges_deducted", 
+   "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": "total_taxes_and_charges", 
+   "fieldtype": "Currency", 
+   "label": "Total Taxes and Charges", 
+   "options": "currency", 
+   "permlevel": 0, 
+   "precision": "", 
    "read_only": 1
-  },
+  }, 
   {
-   "fieldname": "base_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": "section_break_41", 
+   "fieldtype": "Section Break", 
+   "permlevel": 0, 
+   "precision": ""
+  }, 
+  {
+   "default": "Grand Total", 
+   "fieldname": "apply_discount_on", 
+   "fieldtype": "Select", 
+   "label": "Apply Discount On", 
+   "options": "\nGrand Total\nNet Total", 
+   "permlevel": 0, 
+   "precision": "", 
+   "print_hide": 1
+  }, 
+  {
+   "fieldname": "column_break_43", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0, 
+   "precision": ""
+  }, 
+  {
+   "fieldname": "discount_amount", 
+   "fieldtype": "Currency", 
+   "label": "Discount Amount", 
+   "options": "currency", 
+   "permlevel": 0, 
+   "precision": "", 
+   "print_hide": 1
+  }, 
+  {
+   "fieldname": "base_discount_amount", 
+   "fieldtype": "Currency", 
+   "label": "Discount Amount (Company Currency)", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "precision": "", 
+   "print_hide": 1, 
    "read_only": 1
-  },
+  }, 
   {
-   "description": "In Words will be visible once you save the Purchase Order.",
-   "fieldname": "base_in_words",
-   "fieldtype": "Data",
-   "label": "In Words (Company Currency)",
-   "oldfieldname": "in_words",
-   "oldfieldtype": "Data",
-   "permlevel": 0,
-   "print_hide": 1,
+   "fieldname": "section_break_46", 
+   "fieldtype": "Section Break", 
+   "permlevel": 0, 
+   "precision": ""
+  }, 
+  {
+   "fieldname": "base_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": "column_break4",
-   "fieldtype": "Column Break",
-   "oldfieldtype": "Column Break",
-   "permlevel": 0,
+   "description": "In Words will be visible once you save the Purchase Order.", 
+   "fieldname": "base_in_words", 
+   "fieldtype": "Data", 
+   "label": "In Words (Company Currency)", 
+   "oldfieldname": "in_words", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "base_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": "column_break4", 
+   "fieldtype": "Column Break", 
+   "oldfieldtype": "Column Break", 
+   "permlevel": 0, 
    "print_hide": 0
-  },
+  }, 
   {
-   "fieldname": "taxes_and_charges_added",
-   "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": "grand_total", 
+   "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": "taxes_and_charges_deducted",
-   "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": "total_taxes_and_charges",
-   "fieldtype": "Currency",
-   "label": "Total Taxes and Charges",
-   "options": "currency",
-   "permlevel": 0,
-   "precision": "",
+   "fieldname": "in_words", 
+   "fieldtype": "Data", 
+   "label": "In Words", 
+   "oldfieldname": "in_words_import", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "print_hide": 0, 
    "read_only": 1
-  },
+  }, 
   {
-   "fieldname": "grand_total",
-   "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",
-   "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": "2015-02-20 05:16:21.307774",
- "modified_by": "Administrator",
- "module": "Buying",
- "name": "Supplier Quotation",
- "owner": "Administrator",
+ ], 
+ "icon": "icon-shopping-cart", 
+ "idx": 1, 
+ "is_submittable": 1, 
+ "modified": "2015-02-23 15:24:02.428061", 
+ "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",
-   "share": 1,
-   "submit": 1,
+   "amend": 1, 
+   "cancel": 1, 
+   "create": 1, 
+   "delete": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Manufacturing Manager", 
+   "share": 1, 
+   "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",
-   "share": 1,
-   "submit": 1,
+   "amend": 1, 
+   "cancel": 1, 
+   "create": 1, 
+   "delete": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Purchase Manager", 
+   "share": 1, 
+   "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",
-   "share": 1,
-   "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", 
+   "share": 1, 
+   "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",
- "sort_order": "DESC",
+ ], 
+ "read_only_onload": 1, 
+ "search_fields": "status, transaction_date, supplier,grand_total", 
+ "sort_field": "modified", 
+ "sort_order": "DESC", 
  "title_field": "supplier_name"
-}
+}
\ No newline at end of file
diff --git a/erpnext/buying/doctype/supplier_quotation_item/supplier_quotation_item.json b/erpnext/buying/doctype/supplier_quotation_item/supplier_quotation_item.json
index 4e736de..59e3da4 100644
--- a/erpnext/buying/doctype/supplier_quotation_item/supplier_quotation_item.json
+++ b/erpnext/buying/doctype/supplier_quotation_item/supplier_quotation_item.json
@@ -226,6 +226,57 @@
    "read_only": 1
   }, 
   {
+   "fieldname": "section_break_24", 
+   "fieldtype": "Section Break", 
+   "permlevel": 0, 
+   "precision": ""
+  }, 
+  {
+   "fieldname": "net_rate", 
+   "fieldtype": "Currency", 
+   "label": "Net Rate", 
+   "permlevel": 0, 
+   "precision": "", 
+   "print_hide": 1, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "net_amount", 
+   "fieldtype": "Currency", 
+   "label": "Net Amount", 
+   "options": "currency", 
+   "permlevel": 0, 
+   "precision": "", 
+   "print_hide": 1, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "column_break_27", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0, 
+   "precision": ""
+  }, 
+  {
+   "fieldname": "base_net_rate", 
+   "fieldtype": "Currency", 
+   "label": "Net Rate (Company Currency)", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "precision": "", 
+   "print_hide": 1, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "base_net_amount", 
+   "fieldtype": "Currency", 
+   "label": "Net Amount (Company Currency)", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "precision": "", 
+   "print_hide": 1, 
+   "read_only": 1
+  }, 
+  {
    "fieldname": "warehouse_and_reference", 
    "fieldtype": "Section Break", 
    "label": "Warehouse and Reference", 
@@ -360,7 +411,7 @@
  ], 
  "idx": 1, 
  "istable": 1, 
- "modified": "2015-02-19 01:07:02.403267", 
+ "modified": "2015-02-23 15:28:03.712608", 
  "modified_by": "Administrator", 
  "module": "Buying", 
  "name": "Supplier Quotation Item", 
diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py
index 1765fbf..e486989 100644
--- a/erpnext/controllers/accounts_controller.py
+++ b/erpnext/controllers/accounts_controller.py
@@ -359,11 +359,9 @@
 			conversion_rate_label, currency, company_currency))
 
 def validate_taxes_and_charges(tax):
-	if not tax.charge_type and (tax.row_id or tax.rate or tax.tax_amount):
-		frappe.throw(_("Please select Charge Type first"))
-	elif tax.charge_type in ['Actual', 'On Net Total'] and tax.row_id:
+	if tax.charge_type in ['Actual', 'On Net Total'] and tax.row_id:
 		frappe.throw(_("Can refer row only if the charge type is 'On Previous Row Amount' or 'Previous Row Total'"))
-	elif tax.charge_type in ['On Previous Row Amount', 'On Previous Row Total'] and tax.row_id:
+	elif tax.charge_type in ['On Previous Row Amount', 'On Previous Row Total']:
 		if cint(tax.idx) == 1:
 			frappe.throw(_("Cannot select charge type as 'On Previous Row Amount' or 'On Previous Row Total' for first row"))
 		elif not tax.row_id:
diff --git a/erpnext/controllers/taxes_and_totals.py b/erpnext/controllers/taxes_and_totals.py
index eb397f8..24ca3c6 100644
--- a/erpnext/controllers/taxes_and_totals.py
+++ b/erpnext/controllers/taxes_and_totals.py
@@ -3,6 +3,8 @@
 
 from __future__ import unicode_literals
 import json
+import frappe
+from frappe import _
 from frappe.utils import cint, flt, rounded
 from erpnext.setup.utils import get_company_currency
 from erpnext.controllers.accounts_controller import validate_conversion_rate, \
@@ -89,9 +91,8 @@
 			self.doc.round_floats_in(tax)
 
 	def determine_exclusive_rate(self):
-		if not any((cint(tax.included_in_print_rate) for tax in self.doc.get("taxes"))) or \
-			self.doc.doctype not in ["Quotation", "Sales Order", "Delivery Note", "Sales Invoice"]:
-				return
+		if not any((cint(tax.included_in_print_rate) for tax in self.doc.get("taxes"))):
+			return
 
 		for item in self.doc.get("items"):
 			item_tax_map = self._load_item_tax_rate(item.item_tax_rate)
@@ -317,6 +318,9 @@
 
 	def apply_discount_amount(self):
 		if self.doc.discount_amount:
+			if not self.doc.apply_discount_on:
+				frappe.throw(_("Please select Apply Discount On"))
+
 			self.doc.base_discount_amount = flt(self.doc.discount_amount * self.doc.conversion_rate,
 				self.doc.precision("base_discount_amount"))
 
diff --git a/erpnext/public/js/controllers/taxes_and_totals.js b/erpnext/public/js/controllers/taxes_and_totals.js
index 4668398..a3fff91 100644
--- a/erpnext/public/js/controllers/taxes_and_totals.js
+++ b/erpnext/public/js/controllers/taxes_and_totals.js
@@ -107,8 +107,7 @@
 		$.each(me.frm.doc["taxes"] || [], function(i, row) {
 			if(cint(row.included_in_print_rate)) has_inclusive_tax = true;
 		})
-		if(has_inclusive_tax==false || !in_list(["Quotation", "Sales Order", "Delivery Note", "Sales Invoice"], this.frm.doc.doctype))
-			return;
+		if(has_inclusive_tax==false) return;
 
 		$.each(me.frm.doc["items"] || [], function(n, item) {
 			var item_tax_map = me._load_item_tax_rate(item.item_tax_rate);
@@ -402,6 +401,9 @@
 		var distributed_amount = 0.0;
 
 		if (this.frm.doc.discount_amount) {
+			if(!this.frm.doc.apply_discount_on)
+				frappe.throw(__("Please select Apply Discount On"));
+
 			this.frm.set_value("base_discount_amount",
 				flt(this.frm.doc.discount_amount * this.frm.doc.conversion_rate, precision("base_discount_amount")))
 
diff --git a/erpnext/public/js/controllers/transaction.js b/erpnext/public/js/controllers/transaction.js
index 88b4ac4..3f9846f 100644
--- a/erpnext/public/js/controllers/transaction.js
+++ b/erpnext/public/js/controllers/transaction.js
@@ -285,7 +285,6 @@
 		this.frm.refresh_fields();
 	},
 
-
 	change_form_labels: function(company_currency) {
 		var me = this;
 		var field_label_map = {};
@@ -302,8 +301,7 @@
 		setup_field_label_map(["base_total", "base_net_total", "base_total_taxes_and_charges",
 			"base_discount_amount", "base_grand_total", "base_rounded_total", "base_in_words",
 			"base_taxes_and_charges_added", "base_taxes_and_charges_deducted", "total_amount_to_pay",
-			"outstanding_amount", "total_advance", "paid_amount", "write_off_amount"],
-			company_currency);
+			"outstanding_amount", "total_advance", "paid_amount", "write_off_amount"], company_currency);
 
 		setup_field_label_map(["total", "net_total", "total_taxes_and_charges", "discount_amount",
 			"grand_total", "taxes_and_charges_added", "taxes_and_charges_deducted",
@@ -330,6 +328,7 @@
 		$.each(field_label_map, function(fname, label) {
 			me.frm.fields_dict[fname].set_label(label);
 		});
+
 	},
 
 	change_grid_labels: function(company_currency) {
@@ -500,9 +499,7 @@
 	apply_price_list: function(item) {
 		var me = this;
 		var args = this._get_args(item);
-		if(!args.item_list.length) {
-			return;
-		}
+
 		return this.frm.call({
 			method: "erpnext.stock.get_item_details.apply_price_list",
 			args: {	args: args },
@@ -512,7 +509,10 @@
 					me.frm.set_value("price_list_currency", r.message.parent.price_list_currency);
 					me.frm.set_value("plc_conversion_rate", r.message.parent.plc_conversion_rate);
 					me.in_apply_price_list = false;
-					me._set_values_for_item_list(r.message.children);
+
+					if(args.item_list.length) {
+						me._set_values_for_item_list(r.message.children);
+					}
 				}
 			}
 		});
@@ -704,3 +704,11 @@
 frappe.ui.form.on(cur_frm.cscript.tax_table, "included_in_print_rate", function(frm, cdt, cdn) {
 	cur_frm.cscript.calculate_taxes_and_totals();
 })
+
+frappe.ui.form.on(cur_frm.doctype, "apply_discount_on", function(frm) {
+	cur_frm.cscript.calculate_taxes_and_totals();
+})
+
+frappe.ui.form.on(cur_frm.doctype, "discount_amount", function(frm) {
+	cur_frm.cscript.calculate_taxes_and_totals();
+})
diff --git a/erpnext/selling/doctype/sales_order/sales_order.json b/erpnext/selling/doctype/sales_order/sales_order.json
index 07649a2..db7cc80 100644
--- a/erpnext/selling/doctype/sales_order/sales_order.json
+++ b/erpnext/selling/doctype/sales_order/sales_order.json
@@ -326,6 +326,16 @@
    "permlevel": 0
   }, 
   {
+   "fieldname": "base_total", 
+   "fieldtype": "Currency", 
+   "label": "Total (Company Currency)", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "precision": "", 
+   "print_hide": 1, 
+   "read_only": 1
+  }, 
+  {
    "fieldname": "base_net_total", 
    "fieldtype": "Currency", 
    "label": "Net Total (Company Currency)", 
@@ -344,6 +354,16 @@
    "permlevel": 0
   }, 
   {
+   "fieldname": "total", 
+   "fieldtype": "Currency", 
+   "label": "Total", 
+   "options": "currency", 
+   "permlevel": 0, 
+   "precision": "", 
+   "print_hide": 1, 
+   "read_only": 1
+  }, 
+  {
    "fieldname": "net_total", 
    "fieldtype": "Currency", 
    "label": "Net Total", 
@@ -421,6 +441,12 @@
    "read_only": 1
   }, 
   {
+   "fieldname": "column_break_46", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0, 
+   "precision": ""
+  }, 
+  {
    "fieldname": "base_total_taxes_and_charges", 
    "fieldtype": "Currency", 
    "label": "Total Taxes and Charges (Company Currency)", 
@@ -433,7 +459,23 @@
    "width": "150px"
   }, 
   {
-   "fieldname": "column_break_46", 
+   "fieldname": "section_break_48", 
+   "fieldtype": "Section Break", 
+   "permlevel": 0, 
+   "precision": ""
+  }, 
+  {
+   "default": "Grand Total", 
+   "fieldname": "apply_discount_on", 
+   "fieldtype": "Select", 
+   "label": "Apply Discount On", 
+   "options": "\nGrand Total\nNet Total", 
+   "permlevel": 0, 
+   "precision": "", 
+   "print_hide": 1
+  }, 
+  {
+   "fieldname": "column_break_50", 
    "fieldtype": "Column Break", 
    "permlevel": 0
   }, 
@@ -1034,7 +1076,7 @@
  "idx": 1, 
  "is_submittable": 1, 
  "issingle": 0, 
- "modified": "2015-02-20 05:16:18.207123", 
+ "modified": "2015-02-23 15:40:17.414233", 
  "modified_by": "Administrator", 
  "module": "Selling", 
  "name": "Sales Order", 
diff --git a/erpnext/selling/doctype/sales_order_item/sales_order_item.json b/erpnext/selling/doctype/sales_order_item/sales_order_item.json
index 131ec4d..6ef423b 100644
--- a/erpnext/selling/doctype/sales_order_item/sales_order_item.json
+++ b/erpnext/selling/doctype/sales_order_item/sales_order_item.json
@@ -1,455 +1,507 @@
 {
- "autoname": "hash",
- "creation": "2013-03-07 11:42:58",
- "docstatus": 0,
- "doctype": "DocType",
+ "autoname": "hash", 
+ "creation": "2013-03-07 11:42:58", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
  "fields": [
   {
-   "fieldname": "item_code",
-   "fieldtype": "Link",
-   "in_filter": 1,
-   "in_list_view": 1,
-   "label": "Item Code",
-   "oldfieldname": "item_code",
-   "oldfieldtype": "Link",
-   "options": "Item",
-   "permlevel": 0,
-   "print_width": "150px",
-   "read_only": 0,
-   "reqd": 1,
-   "search_index": 1,
+   "fieldname": "item_code", 
+   "fieldtype": "Link", 
+   "in_filter": 1, 
+   "in_list_view": 1, 
+   "label": "Item Code", 
+   "oldfieldname": "item_code", 
+   "oldfieldtype": "Link", 
+   "options": "Item", 
+   "permlevel": 0, 
+   "print_width": "150px", 
+   "read_only": 0, 
+   "reqd": 1, 
+   "search_index": 1, 
    "width": "150px"
-  },
+  }, 
   {
-   "fieldname": "customer_item_code",
-   "fieldtype": "Data",
-   "hidden": 1,
-   "label": "Customer's Item Code",
-   "permlevel": 0,
-   "print_hide": 1,
+   "fieldname": "customer_item_code", 
+   "fieldtype": "Data", 
+   "hidden": 1, 
+   "label": "Customer's Item Code", 
+   "permlevel": 0, 
+   "print_hide": 1, 
    "read_only": 1
-  },
+  }, 
   {
-   "fieldname": "col_break1",
-   "fieldtype": "Column Break",
+   "fieldname": "col_break1", 
+   "fieldtype": "Column Break", 
    "permlevel": 0
-  },
+  }, 
   {
-   "fieldname": "item_name",
-   "fieldtype": "Data",
-   "in_list_view": 1,
-   "label": "Item Name",
-   "oldfieldname": "item_name",
-   "oldfieldtype": "Data",
-   "permlevel": 0,
-   "print_hide": 1,
-   "print_width": "150",
-   "read_only": 0,
-   "reqd": 1,
+   "fieldname": "item_name", 
+   "fieldtype": "Data", 
+   "in_list_view": 1, 
+   "label": "Item Name", 
+   "oldfieldname": "item_name", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "print_width": "150", 
+   "read_only": 0, 
+   "reqd": 1, 
    "width": "150"
-  },
+  }, 
   {
-   "fieldname": "section_break_5",
-   "fieldtype": "Section Break",
-   "permlevel": 0,
+   "fieldname": "section_break_5", 
+   "fieldtype": "Section Break", 
+   "permlevel": 0, 
    "precision": ""
-  },
+  }, 
   {
-   "fieldname": "description",
-   "fieldtype": "Small Text",
-   "in_filter": 1,
-   "in_list_view": 1,
-   "label": "Description",
-   "oldfieldname": "description",
-   "oldfieldtype": "Small Text",
-   "permlevel": 0,
-   "print_width": "300px",
-   "read_only": 0,
-   "reqd": 1,
-   "search_index": 1,
+   "fieldname": "description", 
+   "fieldtype": "Small Text", 
+   "in_filter": 1, 
+   "in_list_view": 1, 
+   "label": "Description", 
+   "oldfieldname": "description", 
+   "oldfieldtype": "Small Text", 
+   "permlevel": 0, 
+   "print_width": "300px", 
+   "read_only": 0, 
+   "reqd": 1, 
+   "search_index": 1, 
    "width": "300px"
-  },
+  }, 
   {
-   "fieldname": "column_break_7",
-   "fieldtype": "Column Break",
-   "permlevel": 0,
+   "fieldname": "column_break_7", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0, 
    "precision": ""
-  },
+  }, 
   {
-   "fieldname": "image",
-   "fieldtype": "Attach",
-   "hidden": 1,
-   "label": "Image",
-   "permlevel": 0,
-   "precision": "",
+   "fieldname": "image", 
+   "fieldtype": "Attach", 
+   "hidden": 1, 
+   "label": "Image", 
+   "permlevel": 0, 
+   "precision": "", 
    "print_hide": 1
-  },
+  }, 
   {
-   "fieldname": "image_view",
-   "fieldtype": "Image",
-   "label": "Image View",
-   "options": "image",
-   "permlevel": 0,
+   "fieldname": "image_view", 
+   "fieldtype": "Image", 
+   "label": "Image View", 
+   "options": "image", 
+   "permlevel": 0, 
    "precision": ""
-  },
+  }, 
   {
-   "fieldname": "quantity_and_rate",
-   "fieldtype": "Section Break",
-   "label": "Quantity and Rate",
+   "fieldname": "quantity_and_rate", 
+   "fieldtype": "Section Break", 
+   "label": "Quantity and Rate", 
    "permlevel": 0
-  },
+  }, 
   {
-   "fieldname": "qty",
-   "fieldtype": "Float",
-   "in_list_view": 1,
-   "label": "Quantity",
-   "oldfieldname": "qty",
-   "oldfieldtype": "Currency",
-   "permlevel": 0,
-   "print_width": "100px",
-   "read_only": 0,
-   "reqd": 1,
+   "fieldname": "qty", 
+   "fieldtype": "Float", 
+   "in_list_view": 1, 
+   "label": "Quantity", 
+   "oldfieldname": "qty", 
+   "oldfieldtype": "Currency", 
+   "permlevel": 0, 
+   "print_width": "100px", 
+   "read_only": 0, 
+   "reqd": 1, 
    "width": "100px"
-  },
+  }, 
   {
-   "fieldname": "price_list_rate",
-   "fieldtype": "Currency",
-   "label": "Price List Rate",
-   "oldfieldname": "ref_rate",
-   "oldfieldtype": "Currency",
-   "options": "currency",
-   "permlevel": 0,
-   "print_hide": 1,
-   "print_width": "70px",
-   "read_only": 1,
-   "reqd": 0,
+   "fieldname": "price_list_rate", 
+   "fieldtype": "Currency", 
+   "label": "Price List Rate", 
+   "oldfieldname": "ref_rate", 
+   "oldfieldtype": "Currency", 
+   "options": "currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "print_width": "70px", 
+   "read_only": 1, 
+   "reqd": 0, 
    "width": "70px"
-  },
+  }, 
   {
-   "fieldname": "discount_percentage",
-   "fieldtype": "Percent",
-   "in_list_view": 1,
-   "label": "Discount(%)",
-   "oldfieldname": "adj_rate",
-   "oldfieldtype": "Float",
-   "permlevel": 0,
-   "print_hide": 1,
-   "print_width": "70px",
-   "read_only": 0,
+   "fieldname": "discount_percentage", 
+   "fieldtype": "Percent", 
+   "in_list_view": 1, 
+   "label": "Discount(%)", 
+   "oldfieldname": "adj_rate", 
+   "oldfieldtype": "Float", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "print_width": "70px", 
+   "read_only": 0, 
    "width": "70px"
-  },
+  }, 
   {
-   "fieldname": "col_break2",
-   "fieldtype": "Column Break",
+   "fieldname": "col_break2", 
+   "fieldtype": "Column Break", 
    "permlevel": 0
-  },
+  }, 
   {
-   "fieldname": "stock_uom",
-   "fieldtype": "Link",
-   "hidden": 0,
-   "in_list_view": 1,
-   "label": "UOM",
-   "oldfieldname": "stock_uom",
-   "oldfieldtype": "Data",
-   "options": "UOM",
-   "permlevel": 0,
-   "print_width": "70px",
-   "read_only": 1,
-   "reqd": 0,
+   "fieldname": "stock_uom", 
+   "fieldtype": "Link", 
+   "hidden": 0, 
+   "in_list_view": 1, 
+   "label": "UOM", 
+   "oldfieldname": "stock_uom", 
+   "oldfieldtype": "Data", 
+   "options": "UOM", 
+   "permlevel": 0, 
+   "print_width": "70px", 
+   "read_only": 1, 
+   "reqd": 0, 
    "width": "70px"
-  },
+  }, 
   {
-   "fieldname": "base_price_list_rate",
-   "fieldtype": "Currency",
-   "label": "Price List Rate (Company Currency)",
-   "oldfieldname": "base_ref_rate",
-   "oldfieldtype": "Currency",
-   "options": "Company:company:default_currency",
-   "permlevel": 0,
-   "print_hide": 1,
-   "print_width": "100px",
-   "read_only": 1,
+   "fieldname": "base_price_list_rate", 
+   "fieldtype": "Currency", 
+   "label": "Price List Rate (Company Currency)", 
+   "oldfieldname": "base_ref_rate", 
+   "oldfieldtype": "Currency", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "print_width": "100px", 
+   "read_only": 1, 
    "width": "100px"
-  },
+  }, 
   {
-   "fieldname": "section_break_simple1",
-   "fieldtype": "Section Break",
+   "fieldname": "section_break_simple1", 
+   "fieldtype": "Section Break", 
    "permlevel": 0
-  },
+  }, 
   {
-   "fieldname": "rate",
-   "fieldtype": "Currency",
-   "in_list_view": 1,
-   "label": "Rate",
-   "oldfieldname": "export_rate",
-   "oldfieldtype": "Currency",
-   "options": "currency",
-   "permlevel": 0,
-   "print_width": "100px",
-   "read_only": 0,
-   "reqd": 0,
+   "fieldname": "rate", 
+   "fieldtype": "Currency", 
+   "in_list_view": 1, 
+   "label": "Rate", 
+   "oldfieldname": "export_rate", 
+   "oldfieldtype": "Currency", 
+   "options": "currency", 
+   "permlevel": 0, 
+   "print_width": "100px", 
+   "read_only": 0, 
+   "reqd": 0, 
    "width": "100px"
-  },
+  }, 
   {
-   "fieldname": "amount",
-   "fieldtype": "Currency",
-   "in_list_view": 1,
-   "label": "Amount",
-   "no_copy": 0,
-   "oldfieldname": "export_amount",
-   "oldfieldtype": "Currency",
-   "options": "currency",
-   "permlevel": 0,
-   "print_width": "100px",
-   "read_only": 1,
-   "reqd": 0,
+   "fieldname": "amount", 
+   "fieldtype": "Currency", 
+   "in_list_view": 1, 
+   "label": "Amount", 
+   "no_copy": 0, 
+   "oldfieldname": "export_amount", 
+   "oldfieldtype": "Currency", 
+   "options": "currency", 
+   "permlevel": 0, 
+   "print_width": "100px", 
+   "read_only": 1, 
+   "reqd": 0, 
    "width": "100px"
-  },
+  }, 
   {
-   "fieldname": "col_break3",
-   "fieldtype": "Column Break",
+   "fieldname": "col_break3", 
+   "fieldtype": "Column Break", 
    "permlevel": 0
-  },
+  }, 
   {
-   "fieldname": "base_rate",
-   "fieldtype": "Currency",
-   "label": "Basic Rate (Company Currency)",
-   "oldfieldname": "basic_rate",
-   "oldfieldtype": "Currency",
-   "options": "Company:company:default_currency",
-   "permlevel": 0,
-   "print_hide": 1,
-   "print_width": "100px",
-   "read_only": 1,
-   "reqd": 0,
+   "fieldname": "base_rate", 
+   "fieldtype": "Currency", 
+   "label": "Basic Rate (Company Currency)", 
+   "oldfieldname": "basic_rate", 
+   "oldfieldtype": "Currency", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "print_width": "100px", 
+   "read_only": 1, 
+   "reqd": 0, 
    "width": "100px"
-  },
+  }, 
   {
-   "fieldname": "base_amount",
-   "fieldtype": "Currency",
-   "label": "Amount (Company Currency)",
-   "no_copy": 0,
-   "oldfieldname": "amount",
-   "oldfieldtype": "Currency",
-   "options": "Company:company:default_currency",
-   "permlevel": 0,
-   "print_hide": 1,
-   "print_width": "100px",
-   "read_only": 1,
-   "reqd": 0,
+   "fieldname": "base_amount", 
+   "fieldtype": "Currency", 
+   "label": "Amount (Company Currency)", 
+   "no_copy": 0, 
+   "oldfieldname": "amount", 
+   "oldfieldtype": "Currency", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "print_width": "100px", 
+   "read_only": 1, 
+   "reqd": 0, 
    "width": "100px"
-  },
+  }, 
   {
-   "fieldname": "pricing_rule",
-   "fieldtype": "Link",
-   "label": "Pricing Rule",
-   "options": "Pricing Rule",
-   "permlevel": 0,
+   "fieldname": "pricing_rule", 
+   "fieldtype": "Link", 
+   "label": "Pricing Rule", 
+   "options": "Pricing Rule", 
+   "permlevel": 0, 
    "read_only": 1
-  },
+  }, 
   {
-   "fieldname": "warehouse_and_reference",
-   "fieldtype": "Section Break",
-   "label": "Warehouse and Reference",
+   "fieldname": "section_break_24", 
+   "fieldtype": "Section Break", 
+   "permlevel": 0, 
+   "precision": ""
+  }, 
+  {
+   "fieldname": "net_rate", 
+   "fieldtype": "Currency", 
+   "label": "Net Rate", 
+   "options": "currency", 
+   "permlevel": 0, 
+   "precision": "", 
+   "print_hide": 1, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "net_amount", 
+   "fieldtype": "Currency", 
+   "label": "Net Amount", 
+   "options": "currency", 
+   "permlevel": 0, 
+   "precision": "", 
+   "print_hide": 1, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "column_break_27", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0, 
+   "precision": ""
+  }, 
+  {
+   "fieldname": "base_net_rate", 
+   "fieldtype": "Currency", 
+   "label": "Net Rate (Company Currency)", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "precision": "", 
+   "print_hide": 1, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "base_net_amount", 
+   "fieldtype": "Currency", 
+   "label": "Net Amount (Company Currency)", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "precision": "", 
+   "print_hide": 1, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "warehouse_and_reference", 
+   "fieldtype": "Section Break", 
+   "label": "Warehouse and Reference", 
    "permlevel": 0
-  },
+  }, 
   {
-   "fieldname": "warehouse",
-   "fieldtype": "Link",
-   "in_list_view": 1,
-   "label": "Reserved Warehouse",
-   "no_copy": 0,
-   "oldfieldname": "reserved_warehouse",
-   "oldfieldtype": "Link",
-   "options": "Warehouse",
-   "permlevel": 0,
-   "print_hide": 1,
-   "print_width": "150px",
-   "read_only": 0,
-   "reqd": 0,
+   "fieldname": "warehouse", 
+   "fieldtype": "Link", 
+   "in_list_view": 1, 
+   "label": "Reserved Warehouse", 
+   "no_copy": 0, 
+   "oldfieldname": "reserved_warehouse", 
+   "oldfieldtype": "Link", 
+   "options": "Warehouse", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "print_width": "150px", 
+   "read_only": 0, 
+   "reqd": 0, 
    "width": "150px"
-  },
+  }, 
   {
-   "fieldname": "prevdoc_docname",
-   "fieldtype": "Link",
-   "hidden": 0,
-   "in_filter": 1,
-   "label": "Quotation",
-   "no_copy": 1,
-   "oldfieldname": "prevdoc_docname",
-   "oldfieldtype": "Link",
-   "options": "Quotation",
-   "permlevel": 0,
-   "print_hide": 1,
-   "read_only": 1,
+   "fieldname": "prevdoc_docname", 
+   "fieldtype": "Link", 
+   "hidden": 0, 
+   "in_filter": 1, 
+   "label": "Quotation", 
+   "no_copy": 1, 
+   "oldfieldname": "prevdoc_docname", 
+   "oldfieldtype": "Link", 
+   "options": "Quotation", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1, 
    "search_index": 1
-  },
+  }, 
   {
-   "fieldname": "brand",
-   "fieldtype": "Link",
-   "hidden": 1,
-   "in_filter": 1,
-   "label": "Brand Name",
-   "oldfieldname": "brand",
-   "oldfieldtype": "Link",
-   "options": "Brand",
-   "permlevel": 0,
-   "print_hide": 1,
-   "read_only": 1,
+   "fieldname": "brand", 
+   "fieldtype": "Link", 
+   "hidden": 1, 
+   "in_filter": 1, 
+   "label": "Brand Name", 
+   "oldfieldname": "brand", 
+   "oldfieldtype": "Link", 
+   "options": "Brand", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1, 
    "search_index": 1
-  },
+  }, 
   {
-   "description": "",
-   "fieldname": "item_group",
-   "fieldtype": "Link",
-   "hidden": 1,
-   "in_filter": 1,
-   "label": "Item Group",
-   "oldfieldname": "item_group",
-   "oldfieldtype": "Link",
-   "options": "Item Group",
-   "permlevel": 0,
-   "print_hide": 1,
-   "read_only": 1,
+   "description": "", 
+   "fieldname": "item_group", 
+   "fieldtype": "Link", 
+   "hidden": 1, 
+   "in_filter": 1, 
+   "label": "Item Group", 
+   "oldfieldname": "item_group", 
+   "oldfieldtype": "Link", 
+   "options": "Item Group", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1, 
    "search_index": 1
-  },
+  }, 
   {
-   "allow_on_submit": 1,
-   "fieldname": "page_break",
-   "fieldtype": "Check",
-   "label": "Page Break",
-   "oldfieldname": "page_break",
-   "oldfieldtype": "Check",
-   "permlevel": 0,
-   "print_hide": 1,
-   "read_only": 0,
+   "allow_on_submit": 1, 
+   "fieldname": "page_break", 
+   "fieldtype": "Check", 
+   "label": "Page Break", 
+   "oldfieldname": "page_break", 
+   "oldfieldtype": "Check", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0, 
    "report_hide": 1
-  },
+  }, 
   {
-   "fieldname": "col_break4",
-   "fieldtype": "Column Break",
+   "fieldname": "col_break4", 
+   "fieldtype": "Column Break", 
    "permlevel": 0
-  },
+  }, 
   {
-   "allow_on_submit": 1,
-   "fieldname": "projected_qty",
-   "fieldtype": "Float",
-   "hidden": 0,
-   "label": "Projected Qty",
-   "no_copy": 1,
-   "oldfieldname": "projected_qty",
-   "oldfieldtype": "Currency",
-   "permlevel": 0,
-   "print_hide": 1,
-   "print_width": "70px",
-   "read_only": 1,
+   "allow_on_submit": 1, 
+   "fieldname": "projected_qty", 
+   "fieldtype": "Float", 
+   "hidden": 0, 
+   "label": "Projected Qty", 
+   "no_copy": 1, 
+   "oldfieldname": "projected_qty", 
+   "oldfieldtype": "Currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "print_width": "70px", 
+   "read_only": 1, 
    "width": "70px"
-  },
+  }, 
   {
-   "allow_on_submit": 1,
-   "fieldname": "actual_qty",
-   "fieldtype": "Float",
-   "label": "Actual Qty",
-   "no_copy": 1,
-   "permlevel": 0,
-   "print_hide": 1,
-   "print_width": "70px",
-   "read_only": 1,
+   "allow_on_submit": 1, 
+   "fieldname": "actual_qty", 
+   "fieldtype": "Float", 
+   "label": "Actual Qty", 
+   "no_copy": 1, 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "print_width": "70px", 
+   "read_only": 1, 
    "width": "70px"
-  },
+  }, 
   {
-   "fieldname": "delivered_qty",
-   "fieldtype": "Float",
-   "hidden": 0,
-   "in_filter": 0,
-   "label": "Delivered Qty",
-   "no_copy": 1,
-   "oldfieldname": "delivered_qty",
-   "oldfieldtype": "Currency",
-   "permlevel": 0,
-   "print_hide": 1,
-   "print_width": "100px",
-   "read_only": 1,
-   "search_index": 0,
+   "fieldname": "delivered_qty", 
+   "fieldtype": "Float", 
+   "hidden": 0, 
+   "in_filter": 0, 
+   "label": "Delivered Qty", 
+   "no_copy": 1, 
+   "oldfieldname": "delivered_qty", 
+   "oldfieldtype": "Currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "print_width": "100px", 
+   "read_only": 1, 
+   "search_index": 0, 
    "width": "100px"
-  },
+  }, 
   {
-   "fieldname": "billed_amt",
-   "fieldtype": "Currency",
-   "label": "Billed Amt",
-   "no_copy": 1,
-   "options": "currency",
-   "permlevel": 0,
-   "print_hide": 1,
+   "fieldname": "billed_amt", 
+   "fieldtype": "Currency", 
+   "label": "Billed Amt", 
+   "no_copy": 1, 
+   "options": "currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
    "read_only": 1
-  },
+  }, 
   {
-   "description": "For Production",
-   "fieldname": "planned_qty",
-   "fieldtype": "Float",
-   "hidden": 1,
-   "label": "Planned Quantity",
-   "no_copy": 1,
-   "oldfieldname": "planned_qty",
-   "oldfieldtype": "Currency",
-   "permlevel": 0,
-   "print_hide": 1,
-   "print_width": "50px",
-   "read_only": 1,
-   "report_hide": 1,
+   "description": "For Production", 
+   "fieldname": "planned_qty", 
+   "fieldtype": "Float", 
+   "hidden": 1, 
+   "label": "Planned Quantity", 
+   "no_copy": 1, 
+   "oldfieldname": "planned_qty", 
+   "oldfieldtype": "Currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "print_width": "50px", 
+   "read_only": 1, 
+   "report_hide": 1, 
    "width": "50px"
-  },
+  }, 
   {
-   "description": "For Production",
-   "fieldname": "produced_qty",
-   "fieldtype": "Float",
-   "hidden": 1,
-   "label": "Produced Quantity",
-   "oldfieldname": "produced_qty",
-   "oldfieldtype": "Currency",
-   "permlevel": 0,
-   "print_hide": 1,
-   "print_width": "50px",
-   "read_only": 1,
-   "report_hide": 1,
+   "description": "For Production", 
+   "fieldname": "produced_qty", 
+   "fieldtype": "Float", 
+   "hidden": 1, 
+   "label": "Produced Quantity", 
+   "oldfieldname": "produced_qty", 
+   "oldfieldtype": "Currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "print_width": "50px", 
+   "read_only": 1, 
+   "report_hide": 1, 
    "width": "50px"
-  },
+  }, 
   {
-   "fieldname": "item_tax_rate",
-   "fieldtype": "Small Text",
-   "hidden": 1,
-   "label": "Item Tax Rate",
-   "oldfieldname": "item_tax_rate",
-   "oldfieldtype": "Small Text",
-   "permlevel": 0,
-   "print_hide": 1,
-   "read_only": 1,
+   "fieldname": "item_tax_rate", 
+   "fieldtype": "Small Text", 
+   "hidden": 1, 
+   "label": "Item Tax Rate", 
+   "oldfieldname": "item_tax_rate", 
+   "oldfieldtype": "Small Text", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1, 
    "report_hide": 1
-  },
+  }, 
   {
-   "description": "Used for Production Plan",
-   "fieldname": "transaction_date",
-   "fieldtype": "Date",
-   "hidden": 1,
-   "in_filter": 0,
-   "label": "Sales Order Date",
-   "oldfieldname": "transaction_date",
-   "oldfieldtype": "Date",
-   "permlevel": 0,
-   "print_hide": 1,
-   "read_only": 1,
-   "report_hide": 1,
+   "description": "Used for Production Plan", 
+   "fieldname": "transaction_date", 
+   "fieldtype": "Date", 
+   "hidden": 1, 
+   "in_filter": 0, 
+   "label": "Sales Order Date", 
+   "oldfieldname": "transaction_date", 
+   "oldfieldtype": "Date", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1, 
+   "report_hide": 1, 
    "search_index": 0
   }
- ],
- "idx": 1,
- "istable": 1,
- "modified": "2015-02-19 01:07:02.025024",
- "modified_by": "Administrator",
- "module": "Selling",
- "name": "Sales Order Item",
- "owner": "Administrator",
- "permissions": [],
- "sort_field": "modified",
+ ], 
+ "idx": 1, 
+ "istable": 1, 
+ "modified": "2015-02-23 15:43:08.156543", 
+ "modified_by": "Administrator", 
+ "module": "Selling", 
+ "name": "Sales Order Item", 
+ "owner": "Administrator", 
+ "permissions": [], 
+ "sort_field": "modified", 
  "sort_order": "DESC"
-}
+}
\ No newline at end of file
diff --git a/erpnext/selling/sales_common.js b/erpnext/selling/sales_common.js
index 5d49e2f..f73b797 100644
--- a/erpnext/selling/sales_common.js
+++ b/erpnext/selling/sales_common.js
@@ -155,14 +155,6 @@
 		}
 	},
 
-	apply_discount_on: function() {
-		this.calculate_taxes_and_totals();
-	},
-
-	discount_amount: function() {
-		this.calculate_taxes_and_totals();
-	},
-
 	commission_rate: function() {
 		this.calculate_commission();
 		refresh_field("total_commission");
diff --git a/erpnext/stock/doctype/delivery_note/delivery_note.json b/erpnext/stock/doctype/delivery_note/delivery_note.json
index 6c8881e..a68f8cb 100644
--- a/erpnext/stock/doctype/delivery_note/delivery_note.json
+++ b/erpnext/stock/doctype/delivery_note/delivery_note.json
@@ -341,6 +341,16 @@
    "permlevel": 0
   }, 
   {
+   "fieldname": "base_total", 
+   "fieldtype": "Currency", 
+   "label": "Total (Company Currency)", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "precision": "", 
+   "print_hide": 1, 
+   "read_only": 1
+  }, 
+  {
    "fieldname": "base_net_total", 
    "fieldtype": "Currency", 
    "label": "Net Total (Company Currency)", 
@@ -361,6 +371,16 @@
    "permlevel": 0
   }, 
   {
+   "fieldname": "total", 
+   "fieldtype": "Currency", 
+   "label": "Total", 
+   "options": "currency", 
+   "permlevel": 0, 
+   "precision": "", 
+   "print_hide": 1, 
+   "read_only": 1
+  }, 
+  {
    "fieldname": "net_total", 
    "fieldtype": "Currency", 
    "label": "Net Total", 
@@ -444,6 +464,12 @@
    "read_only": 1
   }, 
   {
+   "fieldname": "column_break_47", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0, 
+   "precision": ""
+  }, 
+  {
    "fieldname": "base_total_taxes_and_charges", 
    "fieldtype": "Currency", 
    "label": "Total Taxes and Charges (Company Currency)", 
@@ -457,7 +483,22 @@
    "width": "150px"
   }, 
   {
-   "fieldname": "column_break_47", 
+   "fieldname": "section_break_49", 
+   "fieldtype": "Section Break", 
+   "permlevel": 0, 
+   "precision": ""
+  }, 
+  {
+   "default": "Grand Total", 
+   "fieldname": "apply_discount_on", 
+   "fieldtype": "Select", 
+   "label": "Apply Discount On", 
+   "options": "\nGrand Total\nNet Total", 
+   "permlevel": 0, 
+   "precision": ""
+  }, 
+  {
+   "fieldname": "column_break_51", 
    "fieldtype": "Column Break", 
    "permlevel": 0
   }, 
@@ -1024,7 +1065,7 @@
  "idx": 1, 
  "in_create": 0, 
  "is_submittable": 1, 
- "modified": "2015-02-20 05:16:21.997931", 
+ "modified": "2015-02-23 15:49:10.972483", 
  "modified_by": "Administrator", 
  "module": "Stock", 
  "name": "Delivery Note", 
diff --git a/erpnext/stock/doctype/delivery_note_item/delivery_note_item.json b/erpnext/stock/doctype/delivery_note_item/delivery_note_item.json
index ff13200..adcf258 100644
--- a/erpnext/stock/doctype/delivery_note_item/delivery_note_item.json
+++ b/erpnext/stock/doctype/delivery_note_item/delivery_note_item.json
@@ -255,6 +255,58 @@
    "read_only": 1
   }, 
   {
+   "fieldname": "section_break_25", 
+   "fieldtype": "Section Break", 
+   "permlevel": 0, 
+   "precision": ""
+  }, 
+  {
+   "fieldname": "net_rate", 
+   "fieldtype": "Currency", 
+   "label": "Net Rate", 
+   "options": "currency", 
+   "permlevel": 0, 
+   "precision": "", 
+   "print_hide": 1, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "net_amount", 
+   "fieldtype": "Currency", 
+   "label": "Net Amount", 
+   "options": "currency", 
+   "permlevel": 0, 
+   "precision": "", 
+   "print_hide": 1, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "column_break_28", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0, 
+   "precision": ""
+  }, 
+  {
+   "fieldname": "base_net_rate", 
+   "fieldtype": "Currency", 
+   "label": "Net Rate (Company Currency)", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "precision": "", 
+   "print_hide": 1, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "base_net_amount", 
+   "fieldtype": "Currency", 
+   "label": "Net Amount (Company Currency)", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "precision": "", 
+   "print_hide": 1, 
+   "read_only": 1
+  }, 
+  {
    "fieldname": "warehouse_and_reference", 
    "fieldtype": "Section Break", 
    "label": "Warehouse and Reference", 
@@ -456,7 +508,7 @@
  ], 
  "idx": 1, 
  "istable": 1, 
- "modified": "2015-02-23 00:06:50.441413", 
+ "modified": "2015-02-23 15:51:20.772564", 
  "modified_by": "Administrator", 
  "module": "Stock", 
  "name": "Delivery Note Item", 
diff --git a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.json b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.json
index 947c94c..7964dd2 100755
--- a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.json
+++ b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.json
@@ -223,12 +223,31 @@
    "reqd": 0
   }, 
   {
+   "fieldname": "get_current_stock", 
+   "fieldtype": "Button", 
+   "label": "Get Current Stock", 
+   "oldfieldtype": "Button", 
+   "options": "get_current_stock", 
+   "permlevel": 0, 
+   "print_hide": 1
+  }, 
+  {
    "fieldname": "section_break0", 
    "fieldtype": "Section Break", 
    "oldfieldtype": "Section Break", 
    "permlevel": 0
   }, 
   {
+   "fieldname": "base_total", 
+   "fieldtype": "Currency", 
+   "label": "Total (Company Currency)", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "precision": "", 
+   "print_hide": 1, 
+   "read_only": 1
+  }, 
+  {
    "fieldname": "base_net_total", 
    "fieldtype": "Currency", 
    "label": "Net Total (Company Currency)", 
@@ -243,20 +262,22 @@
    "width": "150px"
   }, 
   {
-   "fieldname": "get_current_stock", 
-   "fieldtype": "Button", 
-   "label": "Get Current Stock", 
-   "oldfieldtype": "Button", 
-   "options": "get_current_stock", 
-   "permlevel": 0, 
-   "print_hide": 1
-  }, 
-  {
    "fieldname": "column_break_27", 
    "fieldtype": "Column Break", 
    "permlevel": 0
   }, 
   {
+   "fieldname": "total", 
+   "fieldtype": "Currency", 
+   "hidden": 0, 
+   "label": "Total", 
+   "options": "currency", 
+   "permlevel": 0, 
+   "precision": "", 
+   "print_hide": 1, 
+   "read_only": 1
+  }, 
+  {
    "fieldname": "net_total", 
    "fieldtype": "Currency", 
    "label": "Net Total", 
@@ -347,39 +368,6 @@
    "read_only": 1
   }, 
   {
-   "fieldname": "base_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
-  }, 
-  {
-   "fieldname": "base_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 Receipt.", 
-   "fieldname": "base_in_words", 
-   "fieldtype": "Data", 
-   "label": "In Words (Company Currency)", 
-   "oldfieldname": "in_words", 
-   "oldfieldtype": "Data", 
-   "permlevel": 0, 
-   "print_hide": 1, 
-   "read_only": 1
-  }, 
-  {
    "fieldname": "column_break3", 
    "fieldtype": "Column Break", 
    "permlevel": 0, 
@@ -417,6 +405,92 @@
    "precision": ""
   }, 
   {
+   "fieldname": "section_break_42", 
+   "fieldtype": "Section Break", 
+   "permlevel": 0, 
+   "precision": ""
+  }, 
+  {
+   "default": "Grand Total", 
+   "fieldname": "apply_discount_on", 
+   "fieldtype": "Select", 
+   "label": "Apply Discount On", 
+   "options": "\nGrand Total\nNet Total", 
+   "permlevel": 0, 
+   "precision": "", 
+   "print_hide": 1
+  }, 
+  {
+   "fieldname": "column_break_44", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0, 
+   "precision": ""
+  }, 
+  {
+   "fieldname": "discount_amount", 
+   "fieldtype": "Currency", 
+   "label": "Discount Amount", 
+   "options": "currency", 
+   "permlevel": 0, 
+   "precision": "", 
+   "print_hide": 1, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "base_discount_amount", 
+   "fieldtype": "Currency", 
+   "label": "Discount Amount (Company Currency)", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "precision": "", 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "section_break_46", 
+   "fieldtype": "Section Break", 
+   "permlevel": 0, 
+   "precision": ""
+  }, 
+  {
+   "fieldname": "base_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 Receipt.", 
+   "fieldname": "base_in_words", 
+   "fieldtype": "Data", 
+   "label": "In Words (Company Currency)", 
+   "oldfieldname": "in_words", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "base_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": "column_break_50", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0, 
+   "precision": ""
+  }, 
+  {
    "fieldname": "grand_total", 
    "fieldtype": "Currency", 
    "in_list_view": 1, 
@@ -775,7 +849,7 @@
  "icon": "icon-truck", 
  "idx": 1, 
  "is_submittable": 1, 
- "modified": "2015-02-20 05:16:24.035630", 
+ "modified": "2015-02-23 15:16:36.617354", 
  "modified_by": "Administrator", 
  "module": "Stock", 
  "name": "Purchase Receipt", 
diff --git a/erpnext/stock/doctype/purchase_receipt_item/purchase_receipt_item.json b/erpnext/stock/doctype/purchase_receipt_item/purchase_receipt_item.json
index c29a270..e36686c 100755
--- a/erpnext/stock/doctype/purchase_receipt_item/purchase_receipt_item.json
+++ b/erpnext/stock/doctype/purchase_receipt_item/purchase_receipt_item.json
@@ -284,6 +284,58 @@
    "read_only": 1
   }, 
   {
+   "fieldname": "section_break_29", 
+   "fieldtype": "Section Break", 
+   "permlevel": 0, 
+   "precision": ""
+  }, 
+  {
+   "fieldname": "net_rate", 
+   "fieldtype": "Currency", 
+   "label": "Net Rate", 
+   "options": "currency", 
+   "permlevel": 0, 
+   "precision": "", 
+   "print_hide": 1, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "net_amount", 
+   "fieldtype": "Currency", 
+   "label": "Net Amount", 
+   "options": "currency", 
+   "permlevel": 0, 
+   "precision": "", 
+   "print_hide": 1, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "column_break_32", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0, 
+   "precision": ""
+  }, 
+  {
+   "fieldname": "base_net_rate", 
+   "fieldtype": "Currency", 
+   "label": "Net Rate (Company Currency)", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "precision": "", 
+   "print_hide": 1, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "base_net_amount", 
+   "fieldtype": "Currency", 
+   "label": "Net Amount (Company Currency)", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "precision": "", 
+   "print_hide": 1, 
+   "read_only": 1
+  }, 
+  {
    "fieldname": "warehouse_and_reference", 
    "fieldtype": "Section Break", 
    "label": "Warehouse and Reference", 
@@ -588,7 +640,7 @@
  ], 
  "idx": 1, 
  "istable": 1, 
- "modified": "2015-02-19 01:07:01.405923", 
+ "modified": "2015-02-23 15:19:26.294450", 
  "modified_by": "Administrator", 
  "module": "Stock", 
  "name": "Purchase Receipt Item",