frappe/frappe#478
diff --git a/erpnext/accounts/Print Format/Cheque Printing Format/Cheque Printing Format.txt b/erpnext/accounts/Print Format/Cheque Printing Format/Cheque Printing Format.txt
index 19456a9..a0a25cd 100755
--- a/erpnext/accounts/Print Format/Cheque Printing Format/Cheque Printing Format.txt
+++ b/erpnext/accounts/Print Format/Cheque Printing Format/Cheque Printing Format.txt
@@ -1,21 +1,14 @@
-[
- {
-  "owner": "Administrator", 
-  "docstatus": 0, 
-  "creation": "2012-04-11 13:16:56", 
-  "modified_by": "Administrator", 
-  "modified": "2012-04-13 12:24:20"
- }, 
- {
-  "doc_type": "Journal Voucher", 
-  "name": "__common__", 
-  "module": "Accounts", 
-  "doctype": "Print Format", 
-  "html": "<!--  p.big {line-height: 200%}  .noborder td { border: 0px solid #fff; }   -->\n<div style=\"position: relative;\">\n<h3><script>doc.company</script><br /> <br /> \n<hr />\nPAYMENT ADVICE</h3>\n<table class=\"noborder\" style=\"width: 100%;\">\n<tbody>\n<tr>\n<td style=\"vertical-align: top;\" width=\"50%\">To :<br />\n<script type=\"text/javascript\">// <![CDATA[\ndoc.pay_to_recd_from\n// ]]></script>\n</td>\n<td width=\"50%\">\n<table class=\"noborder\" width=\"100%\">\n<tbody>\n<tr>\n<td width=\"30%\">Voucher No :</td>\n<td width=\"70%\">\n<script type=\"text/javascript\">// <![CDATA[\ndoc.name\n// ]]></script>\n</td>\n</tr>\n<tr>\n<td width=\"30%\">Voucher Date :</td>\n<td width=\"70%\">\n<script type=\"text/javascript\">// <![CDATA[\ndate.str_to_user(doc.voucher_date)\n// ]]></script>\n</td>\n</tr>\n<tr>\n<td width=\"30%\">Cheque No :</td>\n<td width=\"70%\">\n<script type=\"text/javascript\">// <![CDATA[\ndate.str_to_user(doc.cheque_no)\n// ]]></script>\n</td>\n</tr>\n<tr>\n<td width=\"30%\">Cheque Date :</td>\n<td width=\"70%\">\n<script type=\"text/javascript\">// <![CDATA[\ndate.str_to_user(doc.cheque_date)\n// ]]></script>\n</td>\n</tr>\n</tbody>\n</table>\n</td>\n</tr>\n</tbody>\n</table>\n<br /> <strong>We are pleased to enclose our cheque in full/part Settlement of your under noted bills</strong> <br /> \n<hr />\n<table class=\"noborder\" width=\"100%\">\n<tbody>\n<tr>\n<td width=\"70%\">&nbsp;</td>\n<td width=\"15%\">Total :</td>\n<td class=\"pos_left\" width=\"15%\">\n<script type=\"text/javascript\">// <![CDATA[\ndoc.total_amount\n// ]]></script>\n</td>\n</tr>\n<tr>\n<td colspan=\"3\">Narration :\n<script type=\"text/javascript\">// <![CDATA[\nreplace_newlines(doc.remark)\n// ]]></script>\n<br /><br /><br /></td>\n</tr>\n</tbody>\n</table>\n<div style=\"position: absolute; top: 14cm; left: 0cm;\">Prepared By</div>\n<div style=\"position: absolute; top: 14cm; left: 5.5cm;\">Authorised Signatory</div>\n<div style=\"position: absolute; top: 14cm; left: 11cm;\">Received Payment as Above</div>\n<div style=\"position: absolute; top: 16.4cm; left: 5.9cm;\"><strong>_____________</strong></div>\n<div style=\"position: absolute; top: 16.7cm; left: 6cm;\"><strong>A/c Payee</strong></div>\n<div style=\"position: absolute; top: 16.7cm; left: 5.9cm;\"><strong>_____________</strong></div>\n<div style=\"position: absolute; top: 16.9cm; left: 12cm;\">\n<script type=\"text/javascript\">// <![CDATA[\ndate.str_to_user(doc.cheque_date)\n// ]]></script>\n</div>\n<div style=\"position: absolute; top: 17.9cm; left: 1cm;\">\n<script type=\"text/javascript\">// <![CDATA[\ndoc.pay_to_recd_from\n// ]]></script>\n</div>\n<div style=\"position: absolute; top: 18.6cm; left: 1cm; width: 7cm;\">\n<script type=\"text/javascript\">// <![CDATA[\ndoc.total_amount_in_words\n// ]]></script>\n</div>\n<div style=\"position: absolute; top: 19.7cm; left: 12cm;\">\n<script type=\"text/javascript\">// <![CDATA[\ndoc.total_amount\n// ]]></script>\n</div>\n</div>", 
-  "standard": "Yes"
- }, 
- {
-  "name": "Cheque Printing Format", 
-  "doctype": "Print Format"
- }
-]
\ No newline at end of file
+{
+ "creation": "2012-04-11 13:16:56", 
+ "doc_type": "Journal Voucher", 
+ "docstatus": 0, 
+ "doctype": "Print Format", 
+ "html": "<!--  p.big {line-height: 200%}  .noborder td { border: 0px solid #fff; }   -->\n<div style=\"position: relative;\">\n<h3><script>doc.company</script><br /> <br /> \n<hr />\nPAYMENT ADVICE</h3>\n<table class=\"noborder\" style=\"width: 100%;\">\n<tbody>\n<tr>\n<td style=\"vertical-align: top;\" width=\"50%\">To :<br />\n<script type=\"text/javascript\">// <![CDATA[\ndoc.pay_to_recd_from\n// ]]></script>\n</td>\n<td width=\"50%\">\n<table class=\"noborder\" width=\"100%\">\n<tbody>\n<tr>\n<td width=\"30%\">Voucher No :</td>\n<td width=\"70%\">\n<script type=\"text/javascript\">// <![CDATA[\ndoc.name\n// ]]></script>\n</td>\n</tr>\n<tr>\n<td width=\"30%\">Voucher Date :</td>\n<td width=\"70%\">\n<script type=\"text/javascript\">// <![CDATA[\ndate.str_to_user(doc.voucher_date)\n// ]]></script>\n</td>\n</tr>\n<tr>\n<td width=\"30%\">Cheque No :</td>\n<td width=\"70%\">\n<script type=\"text/javascript\">// <![CDATA[\ndate.str_to_user(doc.cheque_no)\n// ]]></script>\n</td>\n</tr>\n<tr>\n<td width=\"30%\">Cheque Date :</td>\n<td width=\"70%\">\n<script type=\"text/javascript\">// <![CDATA[\ndate.str_to_user(doc.cheque_date)\n// ]]></script>\n</td>\n</tr>\n</tbody>\n</table>\n</td>\n</tr>\n</tbody>\n</table>\n<br /> <strong>We are pleased to enclose our cheque in full/part Settlement of your under noted bills</strong> <br /> \n<hr />\n<table class=\"noborder\" width=\"100%\">\n<tbody>\n<tr>\n<td width=\"70%\">&nbsp;</td>\n<td width=\"15%\">Total :</td>\n<td class=\"pos_left\" width=\"15%\">\n<script type=\"text/javascript\">// <![CDATA[\ndoc.total_amount\n// ]]></script>\n</td>\n</tr>\n<tr>\n<td colspan=\"3\">Narration :\n<script type=\"text/javascript\">// <![CDATA[\nreplace_newlines(doc.remark)\n// ]]></script>\n<br /><br /><br /></td>\n</tr>\n</tbody>\n</table>\n<div style=\"position: absolute; top: 14cm; left: 0cm;\">Prepared By</div>\n<div style=\"position: absolute; top: 14cm; left: 5.5cm;\">Authorised Signatory</div>\n<div style=\"position: absolute; top: 14cm; left: 11cm;\">Received Payment as Above</div>\n<div style=\"position: absolute; top: 16.4cm; left: 5.9cm;\"><strong>_____________</strong></div>\n<div style=\"position: absolute; top: 16.7cm; left: 6cm;\"><strong>A/c Payee</strong></div>\n<div style=\"position: absolute; top: 16.7cm; left: 5.9cm;\"><strong>_____________</strong></div>\n<div style=\"position: absolute; top: 16.9cm; left: 12cm;\">\n<script type=\"text/javascript\">// <![CDATA[\ndate.str_to_user(doc.cheque_date)\n// ]]></script>\n</div>\n<div style=\"position: absolute; top: 17.9cm; left: 1cm;\">\n<script type=\"text/javascript\">// <![CDATA[\ndoc.pay_to_recd_from\n// ]]></script>\n</div>\n<div style=\"position: absolute; top: 18.6cm; left: 1cm; width: 7cm;\">\n<script type=\"text/javascript\">// <![CDATA[\ndoc.total_amount_in_words\n// ]]></script>\n</div>\n<div style=\"position: absolute; top: 19.7cm; left: 12cm;\">\n<script type=\"text/javascript\">// <![CDATA[\ndoc.total_amount\n// ]]></script>\n</div>\n</div>", 
+ "idx": 1, 
+ "modified": "2012-04-13 12:24:20", 
+ "modified_by": "Administrator", 
+ "module": "Accounts", 
+ "name": "Cheque Printing Format", 
+ "owner": "Administrator", 
+ "standard": "Yes"
+}
\ No newline at end of file
diff --git a/erpnext/accounts/Print Format/POS Invoice/POS Invoice.txt b/erpnext/accounts/Print Format/POS Invoice/POS Invoice.txt
index 4f20ac2..136856c 100644
--- a/erpnext/accounts/Print Format/POS Invoice/POS Invoice.txt
+++ b/erpnext/accounts/Print Format/POS Invoice/POS Invoice.txt
@@ -1,22 +1,15 @@
-[
- {
-  "creation": "2011-12-21 11:08:55", 
-  "docstatus": 0, 
-  "modified": "2014-01-27 17:26:10", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "doc_type": "Sales Invoice", 
-  "doctype": "Print Format", 
-  "html": "<html>\n\t<head>\n\n\t\t<!-- Style Settings -->\n\t\t<style>\n\t\t\ttable, tr, td, div, p {\n\t\t\t\tfont-family: Monospace;\n\t\t\t\tline-height: 200%;\n\t\t\t\tvertical-align: middle;\n\t\t\t}\n\t\t\t@media screen {\n\t\t\t\tbody {\n\t\t\t\t\twidth: 4in;\n\t\t\t\t}\n\t\t\t}\n\t\t</style>\n\n\t\t<!-- Javascript -->\n\t\t<script>\n\t\t\tfunction print_header() {\n\t\t\t\tvar header = '<table width=\"100%\" cellpadding=\"4\">';\n\n\t\t\t\theader += '<tr>\\\n\t\t\t\t\t<td colspan=\"2\" align=\"center\"><h3>' + (doc.select_print_heading || \"Invoice\") + '</h3></td>\\\n\t\t\t\t</tr>';\n\n\t\t\t\theader += '<tr>\\\n\t\t\t\t\t<td align=\"left\"><b>RECEIPT NO:</b> ' + doc.name + '</td>\\\n\t\t\t\t\t<td align=\"right\"><b>DATE:</b> ' + date.str_to_user(doc.posting_date) + '</td>\\\n\t\t\t\t</tr>\\\n\t\t\t\t<tr>\\\n\t\t\t\t\t<td colspan=\"2\"><b>M/s.</b> ' + doc.customer + '</td>\\\n\t\t\t\t</tr>';\n\n\t\t\t\treturn header + '</table>';\n\t\t\t}\n\n\t\t\tfunction print_items() {\n\t\t\t\tvar rows = '<table width=\"100%\" cellpadding=\"0\" class=\"cart\">';\n\n\t\t\t\trows += '<tr>\\\n\t\t\t\t\t<td colspan=\"3\"><hr></td>\\\n\t\t\t\t</tr>\\\n\t\t\t\t<tr>\\\n\t\t\t\t\t<td width=\"60%\" align=\"left\"><b>ITEM CODE / DESC.</b></td>\\\n\t\t\t\t\t<td width=\"10%\" align=\"right\"><b>QTY</b></td>\\\n\t\t\t\t\t<td width=\"30%\" align=\"right\"><b>RATE</b></td>\\\n\t\t\t\t</tr>\\\n\t\t\t\t<tr>\\\n\t\t\t\t\t<td colspan=\"3\"><hr></td>\\\n\t\t\t\t</tr>';\n\n\t\t\t\t// print items\n\t\t\t\tvar items = getchildren('Sales Invoice Item', doc.name, 'entries');\n\t\t\t\tfor (var x=0; x<items.length; x++) {\n\t\t\t\t\trows += '<tr>\\\n\t\t\t\t\t\t<td align=\"left\">' + items[x].item_code + '<br>' + items[x].item_name + '</td>\\\n\t\t\t\t\t\t<td align=\"right\" style=\"vertical-align:top;\">' + items[x].qty + '</td>\\\n\t\t\t\t\t\t<td align=\"right\" style=\"vertical-align:top;\">' + format_currency(items[x].amount) + '</td>\\\n\t\t\t\t\t</tr>';\n\t\t\t\t}\n\n\t\t\t\trows += '<tr>\\\n\t\t\t\t\t<td colspan=\"3\"><hr></td>\\\n\t\t\t\t</tr>';\n\n\t\t\t\treturn rows + '</table>';\n\t\t\t}\n\n\t\t\tfunction print_other_charges_and_totals() {\n\t\t\t\tvar totals = '<table width=\"100%\">';\n\t\t\t\t// print net total\n\t\t\t\ttotals +='<tr>\\\n\t\t\t\t\t<td align=\"right\" width=\"70%\">Net Total</td>\\\n\t\t\t\t\t<td align=\"right\">' + format_currency(doc.net_total_export) + '</td>\\\n\t\t\t\t</tr>';\n\n\t\t\t\t// print exclusive taxes\n\t\t\t\tvar taxes = frappe.model.get_children(\"Sales Taxes and Charges\", doc.name, \"other_charges\", \"Sales Invoice\");\n\t\t\t\tif (taxes) {\n\t\t\t\t\t$.each(taxes, function(i, d) {\n\t\t\t\t\t\tif (!d.included_in_print_rate && d.tax_amount) {\n\t\t\t\t\t\t\ttotals += '<tr>\\\n\t\t\t\t\t\t\t\t<td align=\"right\">' + d.description + '</td>\\\n\t\t\t\t\t\t\t\t<td align=\"right\">' + format_currency(d.tax_amount) + '</td>\\\n\t\t\t\t\t\t\t<tr>';\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\t// show discount amount\n\t\t\t\tif (doc.discount_amount) {\n\t\t\t\t\ttotals += '<tr>\\\n\t\t\t\t\t\t<td align=\"right\">Discount Amount</td>\\\n\t\t\t\t\t\t<td align=\"right\">' + format_currency(doc.discount_amount) + '</td>\\\n\t\t\t\t\t<tr>';\n\t\t\t\t}\n\n\t\t\t\t// print grand total\n\t\t\t\ttotals += '<tr>\\\n\t\t\t\t\t<td align=\"right\">Grand Total</td>\\\n\t\t\t\t\t<td align=\"right\"><hr width=\"90%\" align=\"right\">' + format_currency(doc.grand_total_export) + '<br>\\\n\t\t\t\t\t<hr width=\"90%\" align=\"right\"></td>\\\n\t\t\t\t</tr>';\n\n\t\t\t\treturn totals + '</table>';\n\t\t\t}\n\n\t\t\tfunction print_inclusive_taxes() {\n\t\t\t\tvar count = 0;\n\t\t\t\tvar inc_tax = '';\n\t\t\t\tvar taxes = frappe.model.get_children(\"Sales Taxes and Charges\", doc.name, \"other_charges\", \"Sales Invoice\");\n\t\t\t\tif (taxes) {\n\t\t\t\t\t$.each(taxes, function(i, d) {\n\t\t\t\t\t\tif (d.included_in_print_rate && d.tax_amount) {\n\t\t\t\t\t\t\tif (count == 0) {\n\t\t\t\t\t\t\t\tinc_tax = '<table width=\"100%\">\\\n\t\t\t\t\t\t\t\t\t<tr>\\\n\t\t\t\t\t\t\t\t\t\t<td colspan=\"2\"><b>Inclusive Taxes</b></td>\\\n\t\t\t\t\t\t\t\t\t</tr>';\n\t\t\t\t\t\t\t\tcount += 1;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tinc_tax += '<tr>\\\n\t\t\t\t\t\t\t\t<td width=\"60%\">' + d.description + '</td>\\\n\t\t\t\t\t\t\t\t<td>' + format_currency(d.tax_amount) + '</td>\\\n\t\t\t\t\t\t\t<tr>';\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\tif (inc_tax) {\n\t\t\t\t\tinc_tax += '<tr>\\\n\t\t\t\t\t\t<td colspan=\"2\"><hr></td>\\\n\t\t\t\t\t</tr></table>';\n\t\t\t\t}\n\n\t\t\t\treturn inc_tax;\n\t\t\t}\n\n\t\t\tfunction print_footer() {\n\t\t\t\tvar footer = '<table width=\"100%\">';\n\n\t\t\t\t// print terms\n\t\t\t\tif (doc.terms) {\n\t\t\t\t\tfooter += '<tr>\\\n\t\t\t\t\t\t<td align=\"center\">' + doc.terms + '</td>\\\n\t\t\t\t\t</tr>';\n\t\t\t\t}\n\n\t\t\t\tfooter +='<tr>\\\n\t\t\t\t\t<td align=\"center\">Thank You. Please visit again.</td>\\\n\t\t\t\t</tr>';\n\n\t\t\t\treturn footer + '</table>';\n\t\t\t}\n\t\t</script>\n\t</head>\n\n\t<body>\n\t\t<!--Headers, Item Table, Totals & Footer-->\n\t\t<div><script>print_header();</script></div>\n\t\t<div><script>print_items();</script></div>\n\t\t<div><script>print_inclusive_taxes();</script></div>\n\t\t<div><script>print_other_charges_and_totals();</script></div>\n\t\t<div><script>print_footer();</script></div>\n\t</body>\n</html>", 
-  "module": "Accounts", 
-  "name": "__common__", 
-  "print_format_type": "Client", 
-  "standard": "Yes"
- }, 
- {
-  "doctype": "Print Format", 
-  "name": "POS Invoice"
- }
-]
\ No newline at end of file
+{
+ "creation": "2011-12-21 11:08:55", 
+ "doc_type": "Sales Invoice", 
+ "docstatus": 0, 
+ "doctype": "Print Format", 
+ "html": "<html>\n\t<head>\n\n\t\t<!-- Style Settings -->\n\t\t<style>\n\t\t\ttable, tr, td, div, p {\n\t\t\t\tfont-family: Monospace;\n\t\t\t\tline-height: 200%;\n\t\t\t\tvertical-align: middle;\n\t\t\t}\n\t\t\t@media screen {\n\t\t\t\tbody {\n\t\t\t\t\twidth: 4in;\n\t\t\t\t}\n\t\t\t}\n\t\t</style>\n\n\t\t<!-- Javascript -->\n\t\t<script>\n\t\t\tfunction print_header() {\n\t\t\t\tvar header = '<table width=\"100%\" cellpadding=\"4\">';\n\n\t\t\t\theader += '<tr>\\\n\t\t\t\t\t<td colspan=\"2\" align=\"center\"><h3>' + (doc.select_print_heading || \"Invoice\") + '</h3></td>\\\n\t\t\t\t</tr>';\n\n\t\t\t\theader += '<tr>\\\n\t\t\t\t\t<td align=\"left\"><b>RECEIPT NO:</b> ' + doc.name + '</td>\\\n\t\t\t\t\t<td align=\"right\"><b>DATE:</b> ' + date.str_to_user(doc.posting_date) + '</td>\\\n\t\t\t\t</tr>\\\n\t\t\t\t<tr>\\\n\t\t\t\t\t<td colspan=\"2\"><b>M/s.</b> ' + doc.customer + '</td>\\\n\t\t\t\t</tr>';\n\n\t\t\t\treturn header + '</table>';\n\t\t\t}\n\n\t\t\tfunction print_items() {\n\t\t\t\tvar rows = '<table width=\"100%\" cellpadding=\"0\" class=\"cart\">';\n\n\t\t\t\trows += '<tr>\\\n\t\t\t\t\t<td colspan=\"3\"><hr></td>\\\n\t\t\t\t</tr>\\\n\t\t\t\t<tr>\\\n\t\t\t\t\t<td width=\"60%\" align=\"left\"><b>ITEM CODE / DESC.</b></td>\\\n\t\t\t\t\t<td width=\"10%\" align=\"right\"><b>QTY</b></td>\\\n\t\t\t\t\t<td width=\"30%\" align=\"right\"><b>RATE</b></td>\\\n\t\t\t\t</tr>\\\n\t\t\t\t<tr>\\\n\t\t\t\t\t<td colspan=\"3\"><hr></td>\\\n\t\t\t\t</tr>';\n\n\t\t\t\t// print items\n\t\t\t\tvar items = getchildren('Sales Invoice Item', doc.name, 'entries');\n\t\t\t\tfor (var x=0; x<items.length; x++) {\n\t\t\t\t\trows += '<tr>\\\n\t\t\t\t\t\t<td align=\"left\">' + items[x].item_code + '<br>' + items[x].item_name + '</td>\\\n\t\t\t\t\t\t<td align=\"right\" style=\"vertical-align:top;\">' + items[x].qty + '</td>\\\n\t\t\t\t\t\t<td align=\"right\" style=\"vertical-align:top;\">' + format_currency(items[x].amount) + '</td>\\\n\t\t\t\t\t</tr>';\n\t\t\t\t}\n\n\t\t\t\trows += '<tr>\\\n\t\t\t\t\t<td colspan=\"3\"><hr></td>\\\n\t\t\t\t</tr>';\n\n\t\t\t\treturn rows + '</table>';\n\t\t\t}\n\n\t\t\tfunction print_other_charges_and_totals() {\n\t\t\t\tvar totals = '<table width=\"100%\">';\n\t\t\t\t// print net total\n\t\t\t\ttotals +='<tr>\\\n\t\t\t\t\t<td align=\"right\" width=\"70%\">Net Total</td>\\\n\t\t\t\t\t<td align=\"right\">' + format_currency(doc.net_total_export) + '</td>\\\n\t\t\t\t</tr>';\n\n\t\t\t\t// print exclusive taxes\n\t\t\t\tvar taxes = frappe.model.get_children(\"Sales Taxes and Charges\", doc.name, \"other_charges\", \"Sales Invoice\");\n\t\t\t\tif (taxes) {\n\t\t\t\t\t$.each(taxes, function(i, d) {\n\t\t\t\t\t\tif (!d.included_in_print_rate && d.tax_amount) {\n\t\t\t\t\t\t\ttotals += '<tr>\\\n\t\t\t\t\t\t\t\t<td align=\"right\">' + d.description + '</td>\\\n\t\t\t\t\t\t\t\t<td align=\"right\">' + format_currency(d.tax_amount) + '</td>\\\n\t\t\t\t\t\t\t<tr>';\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\t// show discount amount\n\t\t\t\tif (doc.discount_amount) {\n\t\t\t\t\ttotals += '<tr>\\\n\t\t\t\t\t\t<td align=\"right\">Discount Amount</td>\\\n\t\t\t\t\t\t<td align=\"right\">' + format_currency(doc.discount_amount) + '</td>\\\n\t\t\t\t\t<tr>';\n\t\t\t\t}\n\n\t\t\t\t// print grand total\n\t\t\t\ttotals += '<tr>\\\n\t\t\t\t\t<td align=\"right\">Grand Total</td>\\\n\t\t\t\t\t<td align=\"right\"><hr width=\"90%\" align=\"right\">' + format_currency(doc.grand_total_export) + '<br>\\\n\t\t\t\t\t<hr width=\"90%\" align=\"right\"></td>\\\n\t\t\t\t</tr>';\n\n\t\t\t\treturn totals + '</table>';\n\t\t\t}\n\n\t\t\tfunction print_inclusive_taxes() {\n\t\t\t\tvar count = 0;\n\t\t\t\tvar inc_tax = '';\n\t\t\t\tvar taxes = frappe.model.get_children(\"Sales Taxes and Charges\", doc.name, \"other_charges\", \"Sales Invoice\");\n\t\t\t\tif (taxes) {\n\t\t\t\t\t$.each(taxes, function(i, d) {\n\t\t\t\t\t\tif (d.included_in_print_rate && d.tax_amount) {\n\t\t\t\t\t\t\tif (count == 0) {\n\t\t\t\t\t\t\t\tinc_tax = '<table width=\"100%\">\\\n\t\t\t\t\t\t\t\t\t<tr>\\\n\t\t\t\t\t\t\t\t\t\t<td colspan=\"2\"><b>Inclusive Taxes</b></td>\\\n\t\t\t\t\t\t\t\t\t</tr>';\n\t\t\t\t\t\t\t\tcount += 1;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tinc_tax += '<tr>\\\n\t\t\t\t\t\t\t\t<td width=\"60%\">' + d.description + '</td>\\\n\t\t\t\t\t\t\t\t<td>' + format_currency(d.tax_amount) + '</td>\\\n\t\t\t\t\t\t\t<tr>';\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\tif (inc_tax) {\n\t\t\t\t\tinc_tax += '<tr>\\\n\t\t\t\t\t\t<td colspan=\"2\"><hr></td>\\\n\t\t\t\t\t</tr></table>';\n\t\t\t\t}\n\n\t\t\t\treturn inc_tax;\n\t\t\t}\n\n\t\t\tfunction print_footer() {\n\t\t\t\tvar footer = '<table width=\"100%\">';\n\n\t\t\t\t// print terms\n\t\t\t\tif (doc.terms) {\n\t\t\t\t\tfooter += '<tr>\\\n\t\t\t\t\t\t<td align=\"center\">' + doc.terms + '</td>\\\n\t\t\t\t\t</tr>';\n\t\t\t\t}\n\n\t\t\t\tfooter +='<tr>\\\n\t\t\t\t\t<td align=\"center\">Thank You. Please visit again.</td>\\\n\t\t\t\t</tr>';\n\n\t\t\t\treturn footer + '</table>';\n\t\t\t}\n\t\t</script>\n\t</head>\n\n\t<body>\n\t\t<!--Headers, Item Table, Totals & Footer-->\n\t\t<div><script>print_header();</script></div>\n\t\t<div><script>print_items();</script></div>\n\t\t<div><script>print_inclusive_taxes();</script></div>\n\t\t<div><script>print_other_charges_and_totals();</script></div>\n\t\t<div><script>print_footer();</script></div>\n\t</body>\n</html>", 
+ "idx": 1, 
+ "modified": "2014-01-27 17:26:10", 
+ "modified_by": "Administrator", 
+ "module": "Accounts", 
+ "name": "POS Invoice", 
+ "owner": "Administrator", 
+ "print_format_type": "Client", 
+ "standard": "Yes"
+}
\ No newline at end of file
diff --git a/erpnext/accounts/Print Format/Payment Receipt Voucher/Payment Receipt Voucher.txt b/erpnext/accounts/Print Format/Payment Receipt Voucher/Payment Receipt Voucher.txt
index 73bc63b..da1bcd7 100755
--- a/erpnext/accounts/Print Format/Payment Receipt Voucher/Payment Receipt Voucher.txt
+++ b/erpnext/accounts/Print Format/Payment Receipt Voucher/Payment Receipt Voucher.txt
@@ -1,21 +1,14 @@
-[
- {
-  "creation": "2012-05-01 12:46:31", 
-  "docstatus": 0, 
-  "modified": "2013-01-21 18:40:20", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "doc_type": "Journal Voucher", 
-  "doctype": "Print Format", 
-  "html": "<h3 align=\"center\"><script>doc.select_print_heading || \"Payment Receipt Note\"</script></h3>\n\n<table class='simpletable'>\n<tr>\n<td><b> Receipt No.: </b></td>\n<td><script>doc.name</script></td>\n</tr>\n<tr>\n<td><b> Date : </b></td>\n<td><script>date.str_to_user(doc.voucher_date)</script></td>\n</tr>      \n<tr>\n<td><b> Remark: </b></td>\n<td><script> doc.remark </script></td>\n</tr>\n<tr>\n<td><b> Received From: </b></td>\n<td><b><script> doc.pay_to_recd_from </script></b></td>\n</tr>\n</table>\n<br>\n\n<div><b><script>doc.total_amount</script></b> </td></div><br>\n<div style=\"text-align:left\"><b><script>doc.total_amount_in_words</script></b></div><br>\n<br>\n<table class=\"noborder\">\n<tr>\n<td style = \"text-align = right;\"><h3>For <script>doc.company</script>,</h3><br><div>(Authorised Signatory)</div></td>\n</tr>\n</table>", 
-  "module": "Accounts", 
-  "name": "__common__", 
-  "standard": "Yes"
- }, 
- {
-  "doctype": "Print Format", 
-  "name": "Payment Receipt Voucher"
- }
-]
\ No newline at end of file
+{
+ "creation": "2012-05-01 12:46:31", 
+ "doc_type": "Journal Voucher", 
+ "docstatus": 0, 
+ "doctype": "Print Format", 
+ "html": "<h3 align=\"center\"><script>doc.select_print_heading || \"Payment Receipt Note\"</script></h3>\n\n<table class='simpletable'>\n<tr>\n<td><b> Receipt No.: </b></td>\n<td><script>doc.name</script></td>\n</tr>\n<tr>\n<td><b> Date : </b></td>\n<td><script>date.str_to_user(doc.voucher_date)</script></td>\n</tr>      \n<tr>\n<td><b> Remark: </b></td>\n<td><script> doc.remark </script></td>\n</tr>\n<tr>\n<td><b> Received From: </b></td>\n<td><b><script> doc.pay_to_recd_from </script></b></td>\n</tr>\n</table>\n<br>\n\n<div><b><script>doc.total_amount</script></b> </td></div><br>\n<div style=\"text-align:left\"><b><script>doc.total_amount_in_words</script></b></div><br>\n<br>\n<table class=\"noborder\">\n<tr>\n<td style = \"text-align = right;\"><h3>For <script>doc.company</script>,</h3><br><div>(Authorised Signatory)</div></td>\n</tr>\n</table>", 
+ "idx": 1, 
+ "modified": "2013-01-21 18:40:20", 
+ "modified_by": "Administrator", 
+ "module": "Accounts", 
+ "name": "Payment Receipt Voucher", 
+ "owner": "Administrator", 
+ "standard": "Yes"
+}
\ No newline at end of file
diff --git a/erpnext/accounts/Print Format/Sales Invoice Classic/Sales Invoice Classic.txt b/erpnext/accounts/Print Format/Sales Invoice Classic/Sales Invoice Classic.txt
index 5bf9bf3..cc3aef2 100644
--- a/erpnext/accounts/Print Format/Sales Invoice Classic/Sales Invoice Classic.txt
+++ b/erpnext/accounts/Print Format/Sales Invoice Classic/Sales Invoice Classic.txt
@@ -1,22 +1,15 @@
-[
- {
-  "creation": "2013-04-19 13:30:27", 
-  "docstatus": 0, 
-  "modified": "2014-02-11 17:33:08", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "doc_type": "Sales Invoice", 
-  "doctype": "Print Format", 
-  "html": "<!--\n\tSample Print Format for ERPNext\n\tPlease use at your own discretion\n\tFor suggestions and contributions:\n\t\thttps://github.com/frappe/erpnext-print-templates\n\n\tFreely usable under MIT license\n-->\n\n<!-- Style Settings -->\n<style>\n\t/*\n\t\tcommon style for whole page\n\t\tThis should include:\n\t\t+ page size related settings\n\t\t+ font family settings\n\t\t+ line spacing settings\n\t*/\n\t@media screen {\n\t\tbody {\n\t\t\twidth: 8.3in;\n\t\t}\n\t}\n\n\thtml, body, div, span, td {\n\t\tfont-family: \"Georgia\", serif;\n\t\tfont-size: 12px;\n\t}\n\n\tbody {\n\t\tpadding: 10px;\n\t\tmargin: auto;\n\t\tfont-size: 12px;\n\t}\n\n\t.common {\n\t\tfont-family: \"Georgia\", serif !important;\n\t\tfont-size: 12px;\n\t\tpadding: 10px 0px;\n\t}\n\n\ttable {\n\t\tborder-collapse: collapse;\n\t\twidth: 100%;\n\t\tvertical-align: top;\n\t}\n\n\ttable td {\n\t\tpadding: 2px 0px;\n\t}\n\t\n\ttable h1, h2, h3, h4, h5, h6 {\n\t\tpadding: 0px;\n\t\tmargin: 0px;\n\t}\n\n\ttable.header-table td {\n\t\tvertical-align: top;\n\t}\n\n\ttable.header-table thead {\n\t\tborder-bottom: 1px solid black;\n\t}\n\n\ttable.header-table h3 {\n\t\tcolor: gray;\n\t}\n\n\ttable.header-table thead td {\n\t\tpadding: 5px 0px;\n\t}\n\n\tdiv.page-body table td:nth-child(6),\n\tdiv.page-body table td:nth-child(7) {\n\t\ttext-align: right;\n\t}\n\n\ttable.footer-table td {\n\t\tvertical-align: top;\n\t}\n\n\ttable.footer-table td table td:nth-child(2),\n\ttable.footer-table td table td:nth-child(3) {\n\t\ttext-align: right;\n\t}\n</style>\n\n\n<!-- Javascript -->\n<script>\n\tsi_std = {\n\t\tprint_item_table: function() {\n\t\t\tvar table = print_table(\n\t\t\t\t'Sales Invoice',\n\t\t\t\tdoc.name,\n\t\t\t\t'entries',\n\t\t\t\t'Sales Invoice Item',\n\t\t\t\t[// Here specify the table columns to be displayed\n\t\t\t\t\t'SR', 'item_name', 'description', 'qty', 'stock_uom',\n\t\t\t\t\t'rate', 'amount'\n\t\t\t\t],\n\t\t\t\t[// Here specify the labels of column headings\n\t\t\t\t\t'Sr', 'Item Name', 'Description', 'Qty',\n\t\t\t\t\t'UoM', 'Basic Rate', 'Amount'\n\t\t\t\t],\n\t\t\t\t[// Here specify the column widths\n\t\t\t\t\t'3%', '20%', '37%', '5%',\n\t\t\t\t\t'5%', '15%', '15%'\n\t\t\t\t],\n\t\t\t\tnull,\n\t\t\t\tnull,\n\t\t\t\t{\n\t\t\t\t\t'description' : function(data_row) {\n\t\t\t\t\t\tif(data_row.discount_percentage) {\n\t\t\t\t\t\t\tvar to_append = '<div style=\"padding-left: 15px;\"><i>Discount: ' + \n\t\t\t\t\t\t\t\tdata_row.discount_percentage + '% on ' + \n\t\t\t\t\t\t\t\tformat_currency(data_row.price_list_rate, doc.currency) + '</i></div>';\n\t\t\t\t\t\t\tif(data_row.description.indexOf(to_append)==-1) {\n\t\t\t\t\t\t\t\treturn data_row.description + to_append;\n\t\t\t\t\t\t\t} else { return data_row.description; }\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\treturn data_row.description;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t);\n\n\t\t\t// This code takes care of page breaks\n\t\t\tif(table.appendChild) {\n\t\t\t\tout = table.innerHTML;\n\t\t\t} else {\n\t\t\t\tout = '';\n\t\t\t\tfor(var i=0; i < (table.length-1); i++) {\n\t\t\t\t\tout += table[i].innerHTML + \n\t\t\t\t\t\t'<div style = \"page-break-after: always;\" \\\n\t\t\t\t\t\tclass = \"page_break\"></div>\\\n\t\t\t\t\t\t<div class=\"page-settings\"></div>';\n\t\t\t\t}\n\t\t\t\tout += table[table.length-1].innerHTML;\n\t\t\t}\n\t\t\treturn out;\n\t\t},\n\n\n\t\tprint_other_charges: function(parent) {\n\t\t\tvar oc = getchildren('Sales Taxes and Charges', doc.name, 'other_charges');\n\t\t\tvar rows = '<table width=100%>\\n';\n\t\t\tfor(var i=0; i<oc.length; i++) {\n\t\t\t\tif(!oc[i].included_in_print_rate) {\n\t\t\t\t\trows +=\n\t\t\t\t\t\t'<tr>\\n' +\n\t\t\t\t\t\t\t'\\t<td>' + oc[i].description + '</td>\\n' +\n\t\t\t\t\t\t\t'\\t<td style=\"width: 38%; text-align: right;\">' + format_currency(oc[i].tax_amount/doc.conversion_rate, doc.currency) + '</td>\\n' +\n\t\t\t\t\t\t'</tr>\\n';\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(doc.discount_amount) {\n\t\t\t\trows += '<tr>\\n' + \n\t\t\t\t\t\t'\\t<td>Discount Amount</td>\\n' + \n\t\t\t\t\t\t'\\t<td style=\"width: 38%; text-align: right;\">' + format_currency(doc.discount_amount, doc.currency) + '</td>\\n' + \n\t\t\t\t\t'</tr>\\n';\n\t\t\t}\n\n\t\t\treturn rows + '</table>\\n';\n\t\t}\n\t};\n</script>\n\n\n<!-- Page Layout Settings -->\n<div class='common page-header'>\n\t<!-- \n\t\tPage Header will contain\n\t\t\t+ table 1\n\t\t\t\t+ table 1a\n\t\t\t\t\t- Name\n\t\t\t\t\t- Address\n\t\t\t\t\t- Contact\n\t\t\t\t\t- Mobile No\n\t\t\t\t+ table 1b\n\t\t\t\t\t- Voucher Date\n\t\t\t\t\t- Due Date\n\t-->\n\t<table class='header-table' cellspacing=0>\n\t\t<thead>\n\t\t\t<tr><td><script>'<h1>' + (doc.select_print_heading || 'Invoice') + '</h1>'</script></td></tr>\n\t\t\t<tr><td><h3><script>cur_frm.docname</script></h3></td></tr>\n\t\t</thead>\n\t\t<tbody>\n\t\t\t<tr>\n\t\t\t\t<td width=60%><table width=100% cellspacing=0><tbody>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td width=39%><b>Name</b></td>\n\t\t\t\t\t\t<td><script>doc.customer_name</script></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><b>Address</b></td>\n\t\t\t\t\t\t<td><script>replace_newlines(doc.address_display)</script></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><b>Contact</b></td>\n\t\t\t\t\t\t<td><script>doc.contact_display</script></td>\n\t\t\t\t\t</tr>\n\t\t\t\t</tbody></table></td>\n\t\t\t\t<td><table width=100% cellspacing=0><tbody>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td width=40%><b>Invoice Date</b></td>\n\t\t\t\t\t\t<td><script>date.str_to_user(doc.posting_date)</script></td>\n\t\t\t\t\t<tr>\n                    <tr>\n    \t\t\t\t\t<td width=40%><script>\n                            (doc.convert_into_recurring_invoice && doc.recurring_id)\n                            ?\"<b>Invoice Period</b>\"\n                            :\"\";\n    \t\t\t\t\t</script></td>\n\t\t\t\t\t\t<td><script>\n                            (doc.convert_into_recurring_invoice && doc.recurring_id)\n                            ?(date.str_to_user(doc.invoice_period_from_date) +\n                                ' to ' + date.str_to_user(doc.invoice_period_to_date))\n                            :\"\";\n                        </script></td>\n\t\t\t\t\t<tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><b>Due Date</b></td>\n\t\t\t\t\t\t<td><script>date.str_to_user(doc.due_date)</script></td>\n\t\t\t\t\t<tr>\t\t\t\t\t\n\t\t\t\t</tbody></table></td>\n\t\t\t</tr>\n\t\t</tbody>\n\t\t<tfoot>\n\t\t\n\t\t</tfoot>\n\t</table>\n</div>\n<div class='common page-body'>\n\t<!-- \n\t\tPage Body will contain\n\t\t\t+ table 2\n\t\t\t\t- Sales Invoice Data\n\t-->\n\t<script>si_std.print_item_table()</script>\n</div>\n<div class='common page-footer'>\n\t<!-- \n\t\tPage Footer will contain\n\t\t\t+ table 3\n\t\t\t\t- Terms and Conditions\n\t\t\t\t- Total Rounded Amount Calculation\n\t\t\t\t- Total Rounded Amount in Words\n\t-->\n\t<table class='footer-table' width=100% cellspacing=0>\n\t\t<thead>\n\t\t\t\n\t\t</thead>\n\t\t<tbody>\n\t\t\t<tr>\n\t\t\t\t<td width=60% style='padding-right: 10px;'>\n\t\t\t\t\t<b>Terms, Conditions &amp; Other Information:</b><br />\n\t\t\t\t\t<script>doc.terms</script>\n\t\t\t\t</td>\n\t\t\t\t<td>\n\t\t\t\t\t<table cellspacing=0 width=100%><tbody>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td>Net Total</td>\n\t\t\t\t\t\t\t<td style=\"width: 38%; text-align: right;\"><script>\n\t\t\t\t\t\t\t\tformat_currency(doc.net_total_export, doc.currency)\n\t\t\t\t\t\t\t</script></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr><td colspan=3><script>si_std.print_other_charges()</script></td></tr>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td>Grand Total</td>\n\t\t\t\t\t\t\t<td style=\"width: 38%; text-align: right;\"><script>\n\t\t\t\t\t\t\t\tformat_currency(doc.grand_total_export, doc.currency)\n\t\t\t\t\t\t\t</script></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr style='font-weight: bold'>\n\t\t\t\t\t\t\t<td>Rounded Total</td>\n\t\t\t\t\t\t\t<td style=\"width: 38%; text-align: right;\"><script>\n\t\t\t\t\t\t\t\tformat_currency(doc.rounded_total_export, doc.currency)\n\t\t\t\t\t\t\t</script></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t</tbody></table>\n\t\t\t\t\t<br /><b>In Words</b><br />\n\t\t\t\t\t<i><script>doc.in_words_export</script></i>\n\t\t\t\t</td>\n\t\t\t</tr>\t\t\n\t\t</tbody>\n\t\t<tfoot>\n\t\t\n\t\t</tfoot>\n\t</table>\n</div>", 
-  "module": "Accounts", 
-  "name": "__common__", 
-  "print_format_type": "Client", 
-  "standard": "Yes"
- }, 
- {
-  "doctype": "Print Format", 
-  "name": "Sales Invoice Classic"
- }
-]
\ No newline at end of file
+{
+ "creation": "2013-04-19 13:30:27", 
+ "doc_type": "Sales Invoice", 
+ "docstatus": 0, 
+ "doctype": "Print Format", 
+ "html": "<!--\n\tSample Print Format for ERPNext\n\tPlease use at your own discretion\n\tFor suggestions and contributions:\n\t\thttps://github.com/frappe/erpnext-print-templates\n\n\tFreely usable under MIT license\n-->\n\n<!-- Style Settings -->\n<style>\n\t/*\n\t\tcommon style for whole page\n\t\tThis should include:\n\t\t+ page size related settings\n\t\t+ font family settings\n\t\t+ line spacing settings\n\t*/\n\t@media screen {\n\t\tbody {\n\t\t\twidth: 8.3in;\n\t\t}\n\t}\n\n\thtml, body, div, span, td {\n\t\tfont-family: \"Georgia\", serif;\n\t\tfont-size: 12px;\n\t}\n\n\tbody {\n\t\tpadding: 10px;\n\t\tmargin: auto;\n\t\tfont-size: 12px;\n\t}\n\n\t.common {\n\t\tfont-family: \"Georgia\", serif !important;\n\t\tfont-size: 12px;\n\t\tpadding: 10px 0px;\n\t}\n\n\ttable {\n\t\tborder-collapse: collapse;\n\t\twidth: 100%;\n\t\tvertical-align: top;\n\t}\n\n\ttable td {\n\t\tpadding: 2px 0px;\n\t}\n\t\n\ttable h1, h2, h3, h4, h5, h6 {\n\t\tpadding: 0px;\n\t\tmargin: 0px;\n\t}\n\n\ttable.header-table td {\n\t\tvertical-align: top;\n\t}\n\n\ttable.header-table thead {\n\t\tborder-bottom: 1px solid black;\n\t}\n\n\ttable.header-table h3 {\n\t\tcolor: gray;\n\t}\n\n\ttable.header-table thead td {\n\t\tpadding: 5px 0px;\n\t}\n\n\tdiv.page-body table td:nth-child(6),\n\tdiv.page-body table td:nth-child(7) {\n\t\ttext-align: right;\n\t}\n\n\ttable.footer-table td {\n\t\tvertical-align: top;\n\t}\n\n\ttable.footer-table td table td:nth-child(2),\n\ttable.footer-table td table td:nth-child(3) {\n\t\ttext-align: right;\n\t}\n</style>\n\n\n<!-- Javascript -->\n<script>\n\tsi_std = {\n\t\tprint_item_table: function() {\n\t\t\tvar table = print_table(\n\t\t\t\t'Sales Invoice',\n\t\t\t\tdoc.name,\n\t\t\t\t'entries',\n\t\t\t\t'Sales Invoice Item',\n\t\t\t\t[// Here specify the table columns to be displayed\n\t\t\t\t\t'SR', 'item_name', 'description', 'qty', 'stock_uom',\n\t\t\t\t\t'rate', 'amount'\n\t\t\t\t],\n\t\t\t\t[// Here specify the labels of column headings\n\t\t\t\t\t'Sr', 'Item Name', 'Description', 'Qty',\n\t\t\t\t\t'UoM', 'Basic Rate', 'Amount'\n\t\t\t\t],\n\t\t\t\t[// Here specify the column widths\n\t\t\t\t\t'3%', '20%', '37%', '5%',\n\t\t\t\t\t'5%', '15%', '15%'\n\t\t\t\t],\n\t\t\t\tnull,\n\t\t\t\tnull,\n\t\t\t\t{\n\t\t\t\t\t'description' : function(data_row) {\n\t\t\t\t\t\tif(data_row.discount_percentage) {\n\t\t\t\t\t\t\tvar to_append = '<div style=\"padding-left: 15px;\"><i>Discount: ' + \n\t\t\t\t\t\t\t\tdata_row.discount_percentage + '% on ' + \n\t\t\t\t\t\t\t\tformat_currency(data_row.price_list_rate, doc.currency) + '</i></div>';\n\t\t\t\t\t\t\tif(data_row.description.indexOf(to_append)==-1) {\n\t\t\t\t\t\t\t\treturn data_row.description + to_append;\n\t\t\t\t\t\t\t} else { return data_row.description; }\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\treturn data_row.description;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t);\n\n\t\t\t// This code takes care of page breaks\n\t\t\tif(table.appendChild) {\n\t\t\t\tout = table.innerHTML;\n\t\t\t} else {\n\t\t\t\tout = '';\n\t\t\t\tfor(var i=0; i < (table.length-1); i++) {\n\t\t\t\t\tout += table[i].innerHTML + \n\t\t\t\t\t\t'<div style = \"page-break-after: always;\" \\\n\t\t\t\t\t\tclass = \"page_break\"></div>\\\n\t\t\t\t\t\t<div class=\"page-settings\"></div>';\n\t\t\t\t}\n\t\t\t\tout += table[table.length-1].innerHTML;\n\t\t\t}\n\t\t\treturn out;\n\t\t},\n\n\n\t\tprint_other_charges: function(parent) {\n\t\t\tvar oc = getchildren('Sales Taxes and Charges', doc.name, 'other_charges');\n\t\t\tvar rows = '<table width=100%>\\n';\n\t\t\tfor(var i=0; i<oc.length; i++) {\n\t\t\t\tif(!oc[i].included_in_print_rate) {\n\t\t\t\t\trows +=\n\t\t\t\t\t\t'<tr>\\n' +\n\t\t\t\t\t\t\t'\\t<td>' + oc[i].description + '</td>\\n' +\n\t\t\t\t\t\t\t'\\t<td style=\"width: 38%; text-align: right;\">' + format_currency(oc[i].tax_amount/doc.conversion_rate, doc.currency) + '</td>\\n' +\n\t\t\t\t\t\t'</tr>\\n';\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(doc.discount_amount) {\n\t\t\t\trows += '<tr>\\n' + \n\t\t\t\t\t\t'\\t<td>Discount Amount</td>\\n' + \n\t\t\t\t\t\t'\\t<td style=\"width: 38%; text-align: right;\">' + format_currency(doc.discount_amount, doc.currency) + '</td>\\n' + \n\t\t\t\t\t'</tr>\\n';\n\t\t\t}\n\n\t\t\treturn rows + '</table>\\n';\n\t\t}\n\t};\n</script>\n\n\n<!-- Page Layout Settings -->\n<div class='common page-header'>\n\t<!-- \n\t\tPage Header will contain\n\t\t\t+ table 1\n\t\t\t\t+ table 1a\n\t\t\t\t\t- Name\n\t\t\t\t\t- Address\n\t\t\t\t\t- Contact\n\t\t\t\t\t- Mobile No\n\t\t\t\t+ table 1b\n\t\t\t\t\t- Voucher Date\n\t\t\t\t\t- Due Date\n\t-->\n\t<table class='header-table' cellspacing=0>\n\t\t<thead>\n\t\t\t<tr><td><script>'<h1>' + (doc.select_print_heading || 'Invoice') + '</h1>'</script></td></tr>\n\t\t\t<tr><td><h3><script>cur_frm.docname</script></h3></td></tr>\n\t\t</thead>\n\t\t<tbody>\n\t\t\t<tr>\n\t\t\t\t<td width=60%><table width=100% cellspacing=0><tbody>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td width=39%><b>Name</b></td>\n\t\t\t\t\t\t<td><script>doc.customer_name</script></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><b>Address</b></td>\n\t\t\t\t\t\t<td><script>replace_newlines(doc.address_display)</script></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><b>Contact</b></td>\n\t\t\t\t\t\t<td><script>doc.contact_display</script></td>\n\t\t\t\t\t</tr>\n\t\t\t\t</tbody></table></td>\n\t\t\t\t<td><table width=100% cellspacing=0><tbody>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td width=40%><b>Invoice Date</b></td>\n\t\t\t\t\t\t<td><script>date.str_to_user(doc.posting_date)</script></td>\n\t\t\t\t\t<tr>\n                    <tr>\n    \t\t\t\t\t<td width=40%><script>\n                            (doc.convert_into_recurring_invoice && doc.recurring_id)\n                            ?\"<b>Invoice Period</b>\"\n                            :\"\";\n    \t\t\t\t\t</script></td>\n\t\t\t\t\t\t<td><script>\n                            (doc.convert_into_recurring_invoice && doc.recurring_id)\n                            ?(date.str_to_user(doc.invoice_period_from_date) +\n                                ' to ' + date.str_to_user(doc.invoice_period_to_date))\n                            :\"\";\n                        </script></td>\n\t\t\t\t\t<tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><b>Due Date</b></td>\n\t\t\t\t\t\t<td><script>date.str_to_user(doc.due_date)</script></td>\n\t\t\t\t\t<tr>\t\t\t\t\t\n\t\t\t\t</tbody></table></td>\n\t\t\t</tr>\n\t\t</tbody>\n\t\t<tfoot>\n\t\t\n\t\t</tfoot>\n\t</table>\n</div>\n<div class='common page-body'>\n\t<!-- \n\t\tPage Body will contain\n\t\t\t+ table 2\n\t\t\t\t- Sales Invoice Data\n\t-->\n\t<script>si_std.print_item_table()</script>\n</div>\n<div class='common page-footer'>\n\t<!-- \n\t\tPage Footer will contain\n\t\t\t+ table 3\n\t\t\t\t- Terms and Conditions\n\t\t\t\t- Total Rounded Amount Calculation\n\t\t\t\t- Total Rounded Amount in Words\n\t-->\n\t<table class='footer-table' width=100% cellspacing=0>\n\t\t<thead>\n\t\t\t\n\t\t</thead>\n\t\t<tbody>\n\t\t\t<tr>\n\t\t\t\t<td width=60% style='padding-right: 10px;'>\n\t\t\t\t\t<b>Terms, Conditions &amp; Other Information:</b><br />\n\t\t\t\t\t<script>doc.terms</script>\n\t\t\t\t</td>\n\t\t\t\t<td>\n\t\t\t\t\t<table cellspacing=0 width=100%><tbody>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td>Net Total</td>\n\t\t\t\t\t\t\t<td style=\"width: 38%; text-align: right;\"><script>\n\t\t\t\t\t\t\t\tformat_currency(doc.net_total_export, doc.currency)\n\t\t\t\t\t\t\t</script></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr><td colspan=3><script>si_std.print_other_charges()</script></td></tr>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td>Grand Total</td>\n\t\t\t\t\t\t\t<td style=\"width: 38%; text-align: right;\"><script>\n\t\t\t\t\t\t\t\tformat_currency(doc.grand_total_export, doc.currency)\n\t\t\t\t\t\t\t</script></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr style='font-weight: bold'>\n\t\t\t\t\t\t\t<td>Rounded Total</td>\n\t\t\t\t\t\t\t<td style=\"width: 38%; text-align: right;\"><script>\n\t\t\t\t\t\t\t\tformat_currency(doc.rounded_total_export, doc.currency)\n\t\t\t\t\t\t\t</script></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t</tbody></table>\n\t\t\t\t\t<br /><b>In Words</b><br />\n\t\t\t\t\t<i><script>doc.in_words_export</script></i>\n\t\t\t\t</td>\n\t\t\t</tr>\t\t\n\t\t</tbody>\n\t\t<tfoot>\n\t\t\n\t\t</tfoot>\n\t</table>\n</div>", 
+ "idx": 1, 
+ "modified": "2014-02-11 17:33:08", 
+ "modified_by": "Administrator", 
+ "module": "Accounts", 
+ "name": "Sales Invoice Classic", 
+ "owner": "Administrator", 
+ "print_format_type": "Client", 
+ "standard": "Yes"
+}
\ No newline at end of file
diff --git a/erpnext/accounts/Print Format/Sales Invoice Modern/Sales Invoice Modern.txt b/erpnext/accounts/Print Format/Sales Invoice Modern/Sales Invoice Modern.txt
index f36f4a5..e166ae4 100644
--- a/erpnext/accounts/Print Format/Sales Invoice Modern/Sales Invoice Modern.txt
+++ b/erpnext/accounts/Print Format/Sales Invoice Modern/Sales Invoice Modern.txt
@@ -1,22 +1,15 @@
-[
- {
-  "creation": "2013-04-19 13:30:27", 
-  "docstatus": 0, 
-  "modified": "2014-02-11 17:33:05", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "doc_type": "Sales Invoice", 
-  "doctype": "Print Format", 
-  "html": "<!--\n\tSample Print Format for ERPNext\n\tPlease use at your own discretion\n\tFor suggestions and contributions:\n\t\thttps://github.com/frappe/erpnext-print-templates\n\n\tFreely usable under MIT license\n-->\n\n<!-- Style Settings -->\n<style>\n\t/*\n\t\tcommon style for whole page\n\t\tThis should include:\n\t\t+ page size related settings\n\t\t+ font family settings\n\t\t+ line spacing settings\n\t*/\n\t@media screen {\n\t\tbody {\n\t\t\twidth: 8.3in;\n\t\t}\n\t}\n\n\thtml, body, div, span, td {\n\t\tfont-family: \"Helvetica\", \"Arial\", sans-serif;\n\t\tfont-size: 12px;\n\t}\n\n\tbody {\n\t\tpadding: 10px;\n\t\tmargin: auto;\n\t\tfont-size: 12px;\n        line-height: 150%;\n\t}\n\n\t.common {\n\t\tfont-family: \"Helvetica\", \"Arial\", sans-serif !important;\n\t\tfont-size: 12px;\n\t\tpadding: 10px 0px;\n\t}\n\n\ttable {\n\t\tborder-collapse: collapse;\n\t\twidth: 100%;\n\t\tvertical-align: top;\n\t\tborder-style: none !important;\n\t}\n\n\ttable td {\n\t\tpadding: 2px 0px;\n\t\tborder-style: none !important;\n\t}\n\t\n\ttable h1, h2, h3, h4, h5, h6 {\n\t\tpadding: 0px;\n\t\tmargin: 0px;\n\t}\n\n\ttable.header-table td {\n\t\tvertical-align: top;\n\t}\n\n\ttable.header-table h1 {\n\t\ttext-transform: uppercase;\n\t\tcolor: white;\n\t\tfont-size: 55px;\n\t\tfont-style: italic;\n\t}\n\n\ttable.header-table thead tr:nth-child(1) div {\n\t\theight: 24px;\n\t\tbackground-color: #696969;\n\t\tvertical-align: middle;\n\t\tpadding: 12px 0px 0px 0px;\n\t\twidth: 100%;\n\t}\n\n\tdiv.page-body table td:nth-child(6),\n\tdiv.page-body table td:nth-child(7) {\n\t\ttext-align: right;\n\t}\n\n\tdiv.page-body table tr td {\n\t\tbackground-color: #DCDCDC !important;\n\t}\n\n\tdiv.page-body table tr:nth-child(1) td {\n\t\tbackground-color: #696969 !important;\n\t\tcolor: white !important;\n\t}\n\n\ttable.footer-table td {\n\t\tvertical-align: top;\n\t}\n\n\ttable.footer-table td table td:nth-child(2),\n\ttable.footer-table td table td:nth-child(3) {\n\t\ttext-align: right;\n\t}\n\n\ttable.footer-table tfoot td {\n\t\tbackground-color: #696969;\n\t\theight: 10px;\n\t}\n\n\t.imp-details {\n\t\tbackground-color: #DCDCDC;\n\t}\n</style>\n\n\n<!-- Javascript -->\n<script>\n\tsi_std = {\n\t\tprint_item_table: function() {\n\t\t\tvar table = print_table(\n\t\t\t\t'Sales Invoice',\n\t\t\t\tdoc.name,\n\t\t\t\t'entries',\n\t\t\t\t'Sales Invoice Item',\n\t\t\t\t[// Here specify the table columns to be displayed\n\t\t\t\t\t'SR', 'item_name', 'description', 'qty', 'stock_uom',\n\t\t\t\t\t'rate', 'amount'\n\t\t\t\t],\n\t\t\t\t[// Here specify the labels of column headings\n\t\t\t\t\t'Sr', 'Item Name', 'Description', 'Qty',\n\t\t\t\t\t'UoM', 'Basic Rate', 'Amount'\n\t\t\t\t],\n\t\t\t\t[// Here specify the column widths\n\t\t\t\t\t'3%', '20%', '37%', '5%',\n\t\t\t\t\t'5%', '15%', '15%'\n\t\t\t\t],\n\t\t\t\tnull,\n\t\t\t\tnull,\n\t\t\t\t{\n\t\t\t\t\t'description' : function(data_row) {\n\t\t\t\t\t\tif(data_row.discount_percentage) {\n\t\t\t\t\t\t\tvar to_append = '<div style=\"padding-left: 15px;\"><i>Discount: ' + \n\t\t\t\t\t\t\t\tdata_row.discount_percentage + '% on ' + \n\t\t\t\t\t\t\t\tformat_currency(data_row.price_list_rate, doc.currency) + '</i></div>';\n\t\t\t\t\t\t\tif(data_row.description.indexOf(to_append)==-1) {\n\t\t\t\t\t\t\t\treturn data_row.description + to_append;\n\t\t\t\t\t\t\t} else { return data_row.description; }\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\treturn data_row.description;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t);\n\n\t\t\t// This code takes care of page breaks\n\t\t\tif(table.appendChild) {\n\t\t\t\tout = table.innerHTML;\n\t\t\t} else {\n\t\t\t\tout = '';\n\t\t\t\tfor(var i=0; i < (table.length-1); i++) {\n\t\t\t\t\tout += table[i].innerHTML + \n\t\t\t\t\t\t'<div style = \"page-break-after: always;\" \\\n\t\t\t\t\t\tclass = \"page_break\"></div>\\\n\t\t\t\t\t\t<div class=\"page-settings\"></div>';\n\t\t\t\t}\n\t\t\t\tout += table[table.length-1].innerHTML;\n\t\t\t}\n\t\t\treturn out;\n\t\t},\n\n\n\t\tprint_other_charges: function(parent) {\n\t\t\tvar oc = getchildren('Sales Taxes and Charges', doc.name, 'other_charges');\n\t\t\tvar rows = '<table width=100%>\\n';\n\t\t\tfor(var i=0; i<oc.length; i++) {\n\t\t\t\tif(!oc[i].included_in_print_rate) {\n\t\t\t\t\trows +=\n\t\t\t\t\t\t'<tr>\\n' +\n\t\t\t\t\t\t\t'\\t<td>' + oc[i].description + '</td>\\n' +\n\t\t\t\t\t\t\t'\\t<td style=\"width: 38%; text-align: right;\">' + format_currency(oc[i].tax_amount, doc.currency) + '</td>\\n' +\n\t\t\t\t\t\t'</tr>\\n';\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(doc.discount_amount) {\n\t\t\t\trows += '<tr>\\n' + \n\t\t\t\t\t\t'\\t<td>Discount Amount</td>\\n' + \n\t\t\t\t\t\t'\\t<td style=\"width: 38%; text-align: right;\">' + format_currency(doc.discount_amount, doc.currency) + '</td>\\n' + \n\t\t\t\t\t'</tr>\\n';\n\t\t\t}\n\n\t\t\treturn rows + '</table>\\n';\n\t\t}\n\t};\n</script>\n\n\n<!-- Page Layout Settings -->\n<div class='common page-header'>\n\t<!-- \n\t\tPage Header will contain\n\t\t\t+ table 1\n\t\t\t\t+ table 1a\n\t\t\t\t\t- Name\n\t\t\t\t\t- Address\n\t\t\t\t\t- Contact\n\t\t\t\t\t- Mobile No\n\t\t\t\t+ table 1b\n\t\t\t\t\t- Voucher Date\n\t\t\t\t\t- Due Date\n\t-->\n\t<table class='header-table' cellspacing=0>\n\t\t<thead>\n\t\t\t<tr><td colspan=2><div><script>'<h1>' + (doc.select_print_heading || 'Invoice') + '</h1>'</script></div></td></tr>\n\t\t\t<tr><td colspan=2><div style=\"height:15px\"></div></td></tr>\n\t\t</thead>\n\t\t<tbody>\n\t\t\t<tr>\n\t\t\t\t<td width=60%><table width=100% cellspacing=0><tbody>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td width=39%><b>Name</b></td>\n\t\t\t\t\t\t<td><script>doc.customer_name</script></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><b>Address</b></td>\n\t\t\t\t\t\t<td><script>replace_newlines(doc.address_display)</script></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><b>Contact</b></td>\n\t\t\t\t\t\t<td><script>doc.contact_display</script></td>\n\t\t\t\t\t</tr>\n\t\t\t\t</tbody></table></td>\n\t\t\t\t<td><table width=100% cellspacing=0><tbody>\n\t\t\t\t\t<tr class='imp-details'>\n\t\t\t\t\t\t<td><b>Invoice No.</b></td>\n\t\t\t\t\t\t<td><script>cur_frm.docname</script></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td width=40%><b>Invoice Date</b></td>\n\t\t\t\t\t\t<td><script>date.str_to_user(doc.posting_date)</script></td>\n\t\t\t\t\t<tr>\n                    <tr>\n        \t\t\t\t<td width=40%><script>\n                            (doc.convert_into_recurring_invoice && doc.recurring_id)\n                            ?\"<b>Invoice Period</b>\"\n                            :\"\";\n    \t\t\t\t\t</script></td>\n\t\t\t\t\t\t<td><script>\n                            (doc.convert_into_recurring_invoice && doc.recurring_id)\n                            ?(date.str_to_user(doc.invoice_period_from_date) +\n                                ' to ' + date.str_to_user(doc.invoice_period_to_date))\n                            :\"\";\n                        </script></td>\n\t\t\t\t\t<tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><b>Due Date</b></td>\n\t\t\t\t\t\t<td><script>date.str_to_user(doc.due_date)</script></td>\n\t\t\t\t\t<tr>\t\t\t\t\t\n\t\t\t\t</tbody></table></td>\n\t\t\t</tr>\n\t\t</tbody>\n\t\t<tfoot>\n\t\t\n\t\t</tfoot>\n\t</table>\n</div>\n<div class='common page-body'>\n\t<!-- \n\t\tPage Body will contain\n\t\t\t+ table 2\n\t\t\t\t- Sales Invoice Data\n\t-->\n\t<script>si_std.print_item_table()</script>\n</div>\n<div class='common page-footer'>\n\t<!-- \n\t\tPage Footer will contain\n\t\t\t+ table 3\n\t\t\t\t- Terms and Conditions\n\t\t\t\t- Total Rounded Amount Calculation\n\t\t\t\t- Total Rounded Amount in Words\n\t-->\n\t<table class='footer-table' width=100% cellspacing=0>\n\t\t<thead>\n\t\t\t\n\t\t</thead>\n\t\t<tbody>\n\t\t\t<tr>\n\t\t\t\t<td width=60% style='padding-right: 10px;'>\n\t\t\t\t\t<b>Terms, Conditions &amp; Other Information:</b><br />\n\t\t\t\t\t<script>doc.terms</script>\n\t\t\t\t</td>\n\t\t\t\t<td>\n\t\t\t\t\t<table cellspacing=0 width=100%><tbody>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td>Net Total</td>\n\t\t\t\t\t\t\t<td style=\"width: 38%; text-align: right;\"><script>\n\t\t\t\t\t\t\t\tformat_currency(doc.net_total_export, doc.currency)\n\t\t\t\t\t\t\t</script></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr><td colspan=3><script>si_std.print_other_charges()</script></td></tr>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td>Grand Total</td>\n\t\t\t\t\t\t\t<td style=\"width: 38%; text-align: right;\"><script>\n\t\t\t\t\t\t\t\tformat_currency(doc.grand_total_export, doc.currency)\n\t\t\t\t\t\t\t</script></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr style='font-weight: bold' class='imp-details'>\n\t\t\t\t\t\t\t<td>Rounded Total</td>\n\t\t\t\t\t\t\t<td style=\"width: 38%; text-align: right;\"><script>\n\t\t\t\t\t\t\t\tformat_currency(doc.rounded_total_export, doc.currency)\n\t\t\t\t\t\t\t</script></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t</tbody></table>\n\t\t\t\t\t<br /><b>In Words</b><br />\n\t\t\t\t\t<i><script>doc.in_words_export</script></i>\n\t\t\t\t</td>\n\t\t\t</tr>\t\t\n\t\t</tbody>\n\t\t<tfoot>\n\t\t\t<tr><td colspan=2><div></div></td><tr>\n\t\t</tfoot>\n\t</table>\n</div>", 
-  "module": "Accounts", 
-  "name": "__common__", 
-  "print_format_type": "Client", 
-  "standard": "Yes"
- }, 
- {
-  "doctype": "Print Format", 
-  "name": "Sales Invoice Modern"
- }
-]
\ No newline at end of file
+{
+ "creation": "2013-04-19 13:30:27", 
+ "doc_type": "Sales Invoice", 
+ "docstatus": 0, 
+ "doctype": "Print Format", 
+ "html": "<!--\n\tSample Print Format for ERPNext\n\tPlease use at your own discretion\n\tFor suggestions and contributions:\n\t\thttps://github.com/frappe/erpnext-print-templates\n\n\tFreely usable under MIT license\n-->\n\n<!-- Style Settings -->\n<style>\n\t/*\n\t\tcommon style for whole page\n\t\tThis should include:\n\t\t+ page size related settings\n\t\t+ font family settings\n\t\t+ line spacing settings\n\t*/\n\t@media screen {\n\t\tbody {\n\t\t\twidth: 8.3in;\n\t\t}\n\t}\n\n\thtml, body, div, span, td {\n\t\tfont-family: \"Helvetica\", \"Arial\", sans-serif;\n\t\tfont-size: 12px;\n\t}\n\n\tbody {\n\t\tpadding: 10px;\n\t\tmargin: auto;\n\t\tfont-size: 12px;\n        line-height: 150%;\n\t}\n\n\t.common {\n\t\tfont-family: \"Helvetica\", \"Arial\", sans-serif !important;\n\t\tfont-size: 12px;\n\t\tpadding: 10px 0px;\n\t}\n\n\ttable {\n\t\tborder-collapse: collapse;\n\t\twidth: 100%;\n\t\tvertical-align: top;\n\t\tborder-style: none !important;\n\t}\n\n\ttable td {\n\t\tpadding: 2px 0px;\n\t\tborder-style: none !important;\n\t}\n\t\n\ttable h1, h2, h3, h4, h5, h6 {\n\t\tpadding: 0px;\n\t\tmargin: 0px;\n\t}\n\n\ttable.header-table td {\n\t\tvertical-align: top;\n\t}\n\n\ttable.header-table h1 {\n\t\ttext-transform: uppercase;\n\t\tcolor: white;\n\t\tfont-size: 55px;\n\t\tfont-style: italic;\n\t}\n\n\ttable.header-table thead tr:nth-child(1) div {\n\t\theight: 24px;\n\t\tbackground-color: #696969;\n\t\tvertical-align: middle;\n\t\tpadding: 12px 0px 0px 0px;\n\t\twidth: 100%;\n\t}\n\n\tdiv.page-body table td:nth-child(6),\n\tdiv.page-body table td:nth-child(7) {\n\t\ttext-align: right;\n\t}\n\n\tdiv.page-body table tr td {\n\t\tbackground-color: #DCDCDC !important;\n\t}\n\n\tdiv.page-body table tr:nth-child(1) td {\n\t\tbackground-color: #696969 !important;\n\t\tcolor: white !important;\n\t}\n\n\ttable.footer-table td {\n\t\tvertical-align: top;\n\t}\n\n\ttable.footer-table td table td:nth-child(2),\n\ttable.footer-table td table td:nth-child(3) {\n\t\ttext-align: right;\n\t}\n\n\ttable.footer-table tfoot td {\n\t\tbackground-color: #696969;\n\t\theight: 10px;\n\t}\n\n\t.imp-details {\n\t\tbackground-color: #DCDCDC;\n\t}\n</style>\n\n\n<!-- Javascript -->\n<script>\n\tsi_std = {\n\t\tprint_item_table: function() {\n\t\t\tvar table = print_table(\n\t\t\t\t'Sales Invoice',\n\t\t\t\tdoc.name,\n\t\t\t\t'entries',\n\t\t\t\t'Sales Invoice Item',\n\t\t\t\t[// Here specify the table columns to be displayed\n\t\t\t\t\t'SR', 'item_name', 'description', 'qty', 'stock_uom',\n\t\t\t\t\t'rate', 'amount'\n\t\t\t\t],\n\t\t\t\t[// Here specify the labels of column headings\n\t\t\t\t\t'Sr', 'Item Name', 'Description', 'Qty',\n\t\t\t\t\t'UoM', 'Basic Rate', 'Amount'\n\t\t\t\t],\n\t\t\t\t[// Here specify the column widths\n\t\t\t\t\t'3%', '20%', '37%', '5%',\n\t\t\t\t\t'5%', '15%', '15%'\n\t\t\t\t],\n\t\t\t\tnull,\n\t\t\t\tnull,\n\t\t\t\t{\n\t\t\t\t\t'description' : function(data_row) {\n\t\t\t\t\t\tif(data_row.discount_percentage) {\n\t\t\t\t\t\t\tvar to_append = '<div style=\"padding-left: 15px;\"><i>Discount: ' + \n\t\t\t\t\t\t\t\tdata_row.discount_percentage + '% on ' + \n\t\t\t\t\t\t\t\tformat_currency(data_row.price_list_rate, doc.currency) + '</i></div>';\n\t\t\t\t\t\t\tif(data_row.description.indexOf(to_append)==-1) {\n\t\t\t\t\t\t\t\treturn data_row.description + to_append;\n\t\t\t\t\t\t\t} else { return data_row.description; }\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\treturn data_row.description;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t);\n\n\t\t\t// This code takes care of page breaks\n\t\t\tif(table.appendChild) {\n\t\t\t\tout = table.innerHTML;\n\t\t\t} else {\n\t\t\t\tout = '';\n\t\t\t\tfor(var i=0; i < (table.length-1); i++) {\n\t\t\t\t\tout += table[i].innerHTML + \n\t\t\t\t\t\t'<div style = \"page-break-after: always;\" \\\n\t\t\t\t\t\tclass = \"page_break\"></div>\\\n\t\t\t\t\t\t<div class=\"page-settings\"></div>';\n\t\t\t\t}\n\t\t\t\tout += table[table.length-1].innerHTML;\n\t\t\t}\n\t\t\treturn out;\n\t\t},\n\n\n\t\tprint_other_charges: function(parent) {\n\t\t\tvar oc = getchildren('Sales Taxes and Charges', doc.name, 'other_charges');\n\t\t\tvar rows = '<table width=100%>\\n';\n\t\t\tfor(var i=0; i<oc.length; i++) {\n\t\t\t\tif(!oc[i].included_in_print_rate) {\n\t\t\t\t\trows +=\n\t\t\t\t\t\t'<tr>\\n' +\n\t\t\t\t\t\t\t'\\t<td>' + oc[i].description + '</td>\\n' +\n\t\t\t\t\t\t\t'\\t<td style=\"width: 38%; text-align: right;\">' + format_currency(oc[i].tax_amount, doc.currency) + '</td>\\n' +\n\t\t\t\t\t\t'</tr>\\n';\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(doc.discount_amount) {\n\t\t\t\trows += '<tr>\\n' + \n\t\t\t\t\t\t'\\t<td>Discount Amount</td>\\n' + \n\t\t\t\t\t\t'\\t<td style=\"width: 38%; text-align: right;\">' + format_currency(doc.discount_amount, doc.currency) + '</td>\\n' + \n\t\t\t\t\t'</tr>\\n';\n\t\t\t}\n\n\t\t\treturn rows + '</table>\\n';\n\t\t}\n\t};\n</script>\n\n\n<!-- Page Layout Settings -->\n<div class='common page-header'>\n\t<!-- \n\t\tPage Header will contain\n\t\t\t+ table 1\n\t\t\t\t+ table 1a\n\t\t\t\t\t- Name\n\t\t\t\t\t- Address\n\t\t\t\t\t- Contact\n\t\t\t\t\t- Mobile No\n\t\t\t\t+ table 1b\n\t\t\t\t\t- Voucher Date\n\t\t\t\t\t- Due Date\n\t-->\n\t<table class='header-table' cellspacing=0>\n\t\t<thead>\n\t\t\t<tr><td colspan=2><div><script>'<h1>' + (doc.select_print_heading || 'Invoice') + '</h1>'</script></div></td></tr>\n\t\t\t<tr><td colspan=2><div style=\"height:15px\"></div></td></tr>\n\t\t</thead>\n\t\t<tbody>\n\t\t\t<tr>\n\t\t\t\t<td width=60%><table width=100% cellspacing=0><tbody>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td width=39%><b>Name</b></td>\n\t\t\t\t\t\t<td><script>doc.customer_name</script></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><b>Address</b></td>\n\t\t\t\t\t\t<td><script>replace_newlines(doc.address_display)</script></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><b>Contact</b></td>\n\t\t\t\t\t\t<td><script>doc.contact_display</script></td>\n\t\t\t\t\t</tr>\n\t\t\t\t</tbody></table></td>\n\t\t\t\t<td><table width=100% cellspacing=0><tbody>\n\t\t\t\t\t<tr class='imp-details'>\n\t\t\t\t\t\t<td><b>Invoice No.</b></td>\n\t\t\t\t\t\t<td><script>cur_frm.docname</script></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td width=40%><b>Invoice Date</b></td>\n\t\t\t\t\t\t<td><script>date.str_to_user(doc.posting_date)</script></td>\n\t\t\t\t\t<tr>\n                    <tr>\n        \t\t\t\t<td width=40%><script>\n                            (doc.convert_into_recurring_invoice && doc.recurring_id)\n                            ?\"<b>Invoice Period</b>\"\n                            :\"\";\n    \t\t\t\t\t</script></td>\n\t\t\t\t\t\t<td><script>\n                            (doc.convert_into_recurring_invoice && doc.recurring_id)\n                            ?(date.str_to_user(doc.invoice_period_from_date) +\n                                ' to ' + date.str_to_user(doc.invoice_period_to_date))\n                            :\"\";\n                        </script></td>\n\t\t\t\t\t<tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><b>Due Date</b></td>\n\t\t\t\t\t\t<td><script>date.str_to_user(doc.due_date)</script></td>\n\t\t\t\t\t<tr>\t\t\t\t\t\n\t\t\t\t</tbody></table></td>\n\t\t\t</tr>\n\t\t</tbody>\n\t\t<tfoot>\n\t\t\n\t\t</tfoot>\n\t</table>\n</div>\n<div class='common page-body'>\n\t<!-- \n\t\tPage Body will contain\n\t\t\t+ table 2\n\t\t\t\t- Sales Invoice Data\n\t-->\n\t<script>si_std.print_item_table()</script>\n</div>\n<div class='common page-footer'>\n\t<!-- \n\t\tPage Footer will contain\n\t\t\t+ table 3\n\t\t\t\t- Terms and Conditions\n\t\t\t\t- Total Rounded Amount Calculation\n\t\t\t\t- Total Rounded Amount in Words\n\t-->\n\t<table class='footer-table' width=100% cellspacing=0>\n\t\t<thead>\n\t\t\t\n\t\t</thead>\n\t\t<tbody>\n\t\t\t<tr>\n\t\t\t\t<td width=60% style='padding-right: 10px;'>\n\t\t\t\t\t<b>Terms, Conditions &amp; Other Information:</b><br />\n\t\t\t\t\t<script>doc.terms</script>\n\t\t\t\t</td>\n\t\t\t\t<td>\n\t\t\t\t\t<table cellspacing=0 width=100%><tbody>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td>Net Total</td>\n\t\t\t\t\t\t\t<td style=\"width: 38%; text-align: right;\"><script>\n\t\t\t\t\t\t\t\tformat_currency(doc.net_total_export, doc.currency)\n\t\t\t\t\t\t\t</script></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr><td colspan=3><script>si_std.print_other_charges()</script></td></tr>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td>Grand Total</td>\n\t\t\t\t\t\t\t<td style=\"width: 38%; text-align: right;\"><script>\n\t\t\t\t\t\t\t\tformat_currency(doc.grand_total_export, doc.currency)\n\t\t\t\t\t\t\t</script></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr style='font-weight: bold' class='imp-details'>\n\t\t\t\t\t\t\t<td>Rounded Total</td>\n\t\t\t\t\t\t\t<td style=\"width: 38%; text-align: right;\"><script>\n\t\t\t\t\t\t\t\tformat_currency(doc.rounded_total_export, doc.currency)\n\t\t\t\t\t\t\t</script></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t</tbody></table>\n\t\t\t\t\t<br /><b>In Words</b><br />\n\t\t\t\t\t<i><script>doc.in_words_export</script></i>\n\t\t\t\t</td>\n\t\t\t</tr>\t\t\n\t\t</tbody>\n\t\t<tfoot>\n\t\t\t<tr><td colspan=2><div></div></td><tr>\n\t\t</tfoot>\n\t</table>\n</div>", 
+ "idx": 1, 
+ "modified": "2014-02-11 17:33:05", 
+ "modified_by": "Administrator", 
+ "module": "Accounts", 
+ "name": "Sales Invoice Modern", 
+ "owner": "Administrator", 
+ "print_format_type": "Client", 
+ "standard": "Yes"
+}
\ No newline at end of file
diff --git a/erpnext/accounts/Print Format/Sales Invoice Spartan/Sales Invoice Spartan.txt b/erpnext/accounts/Print Format/Sales Invoice Spartan/Sales Invoice Spartan.txt
index e60f8a0..b56e547 100644
--- a/erpnext/accounts/Print Format/Sales Invoice Spartan/Sales Invoice Spartan.txt
+++ b/erpnext/accounts/Print Format/Sales Invoice Spartan/Sales Invoice Spartan.txt
@@ -1,22 +1,15 @@
-[
- {
-  "creation": "2013-04-19 13:30:27", 
-  "docstatus": 0, 
-  "modified": "2014-02-11 17:34:00", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "doc_type": "Sales Invoice", 
-  "doctype": "Print Format", 
-  "html": "<!--\n\tSample Print Format for ERPNext\n\tPlease use at your own discretion\n\tFor suggestions and contributions:\n\t\thttps://github.com/frappe/erpnext-print-templates\n\n\tFreely usable under MIT license\n-->\n\n<!-- Style Settings -->\n<style>\n\t/*\n\t\tcommon style for whole page\n\t\tThis should include:\n\t\t+ page size related settings\n\t\t+ font family settings\n\t\t+ line spacing settings\n\t*/\n\t@media screen {\n\t\tbody {\n\t\t\twidth: 8.3in;\n\t\t}\n\t}\n\n\thtml, body, div, span, td {\n\t\tfont-family: \"Arial\", sans-serif;\n\t\tfont-size: 12px;\n\t}\n\n\tbody {\n\t\tpadding: 10px;\n\t\tmargin: auto;\n\t\tfont-size: 12px;\n\t}\n\n\t.common {\n\t\tfont-family: \"Arial\", sans-serif !important;\n\t\tfont-size: 12px;\n\t\tpadding: 0px;\n\t}\n\n\ttable {\n\t\twidth: 100% !important;\n\t\tvertical-align: top;\n\t}\n\n\ttable td {\n\t\tpadding: 2px 0px;\n\t}\n\n\ttable, td {\n\t\tborder-collapse: collapse !important;\n\t\tpadding: 0px;\n\t\tmargin: 0px !important;\n\t}\n\t\n\ttable h1, h2, h3, h4, h5, h6 {\n\t\tpadding: 0px;\n\t\tmargin: 0px;\n\t}\n\n\ttable.header-table td {\n\t\tvertical-align: top;\n\t}\n\n\ttable.header-table h3 {\n\t\tcolor: gray;\n\t}\n\n\ttable.header-table thead td {\n\t\tpadding: 5px;\n\t}\n\n\ttable.header-table > thead,\n\ttable.header-table > tbody > tr > td,\n\ttable.footer-table > tbody > tr > td {\n\t\tborder: 1px solid black;\n\t\tpadding: 5px;\n\t}\n\n\ttable.footer-table > tbody,\n\ttable.header-table > thead {\n\t\tborder-bottom: 3px solid black;\n\t}\n\n\ttable.header-table > thead {\n\t\tborder-top: 3px solid black;\n\t}\n\n\tdiv.page-body table td:nth-child(6),\n\tdiv.page-body table td:nth-child(7) {\n\t\ttext-align: right;\n\t}\n\n\tdiv.page-body td {\n\t\tbackground-color: white !important;\n\t\tborder: 1px solid black !important;\n\t}\n\n\ttable.footer-table td {\n\t\tvertical-align: top;\n\t}\n\n\ttable.footer-table td table td:nth-child(2),\n\ttable.footer-table td table td:nth-child(3) {\n\t\ttext-align: right;\n\t}\n</style>\n\n\n<!-- Javascript -->\n<script>\n\tsi_std = {\n\t\tprint_item_table: function() {\n\t\t\tvar table = print_table(\n\t\t\t\t'Sales Invoice',\n\t\t\t\tdoc.name,\n\t\t\t\t'entries',\n\t\t\t\t'Sales Invoice Item',\n\t\t\t\t[// Here specify the table columns to be displayed\n\t\t\t\t\t'SR', 'item_name', 'description', 'qty', 'stock_uom',\n\t\t\t\t\t'rate', 'amount'\n\t\t\t\t],\n\t\t\t\t[// Here specify the labels of column headings\n\t\t\t\t\t'Sr', 'Item Name', 'Description', 'Qty',\n\t\t\t\t\t'UoM', 'Basic Rate', 'Amount'\n\t\t\t\t],\n\t\t\t\t[// Here specify the column widths\n\t\t\t\t\t'3%', '20%', '37%', '5%',\n\t\t\t\t\t'5%', '15%', '15%'\n\t\t\t\t],\n\t\t\t\tnull,\n\t\t\t\tnull,\n\t\t\t\t{\n\t\t\t\t\t'description' : function(data_row) {\n\t\t\t\t\t\tif(data_row.discount_percentage) {\n\t\t\t\t\t\t\tvar to_append = '<div style=\"padding-left: 15px;\"><i>Discount: ' + \n\t\t\t\t\t\t\t\tdata_row.discount_percentage + '% on ' + \n\t\t\t\t\t\t\t\tformat_currency(data_row.price_list_rate, doc.currency) + '</i></div>';\n\t\t\t\t\t\t\tif(data_row.description.indexOf(to_append)==-1) {\n\t\t\t\t\t\t\t\treturn data_row.description + to_append;\n\t\t\t\t\t\t\t} else { return data_row.description; }\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\treturn data_row.description;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t);\n\n\t\t\t// This code takes care of page breaks\n\t\t\tif(table.appendChild) {\n\t\t\t\tout = table.innerHTML;\n\t\t\t} else {\n\t\t\t\tout = '';\n\t\t\t\tfor(var i=0; i < (table.length-1); i++) {\n\t\t\t\t\tout += table[i].innerHTML + \n\t\t\t\t\t\t'<div style = \"page-break-after: always;\" \\\n\t\t\t\t\t\tclass = \"page_break\"></div>\\\n\t\t\t\t\t\t<div class=\"page-settings\"></div>';\n\t\t\t\t}\n\t\t\t\tout += table[table.length-1].innerHTML;\n\t\t\t}\n\t\t\treturn out;\n\t\t},\n\n\n\t\tprint_other_charges: function(parent) {\n\t\t\tvar oc = getchildren('Sales Taxes and Charges', doc.name, 'other_charges');\n\t\t\tvar rows = '<table width=100%>\\n';\n\t\t\tfor(var i=0; i<oc.length; i++) {\n\t\t\t\tif(!oc[i].included_in_print_rate) {\n\t\t\t\t\trows +=\n\t\t\t\t\t\t'<tr>\\n' +\n\t\t\t\t\t\t\t'\\t<td>' + oc[i].description + '</td>\\n' +\n\t\t\t\t\t\t\t'\\t<td></td>\\n' +\n\t\t\t\t\t\t\t'\\t<td style=\"width: 38%; text-align: right;\">' + format_currency(oc[i].tax_amount, doc.currency) + '</td>\\n' +\n\t\t\t\t\t\t'</tr>\\n';\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(doc.discount_amount) {\n\t\t\t\trows += '<tr>\\n' + \n\t\t\t\t\t\t'\\t<td>Discount Amount</td>\\n' + \n\t\t\t\t\t\t'\\t<td style=\"width: 38%; text-align: right;\">' + format_currency(doc.discount_amount, doc.currency) + '</td>\\n' + \n\t\t\t\t\t'</tr>\\n';\n\t\t\t}\n\n\t\t\treturn rows + '</table>\\n';\n\t\t}\n\t};\n</script>\n\n\n<!-- Page Layout Settings -->\n<div class='common page-header'>\n\t<!-- \n\t\tPage Header will contain\n\t\t\t+ table 1\n\t\t\t\t+ table 1a\n\t\t\t\t\t- Name\n\t\t\t\t\t- Address\n\t\t\t\t\t- Contact\n\t\t\t\t\t- Mobile No\n\t\t\t\t+ table 1b\n\t\t\t\t\t- Voucher Date\n\t\t\t\t\t- Due Date\n\t-->\n\t<table class='header-table' cellspacing=0>\n\t\t<thead>\n\t\t\t<tr><td colspan=2><script>'<h1>' + (doc.select_print_heading || 'Invoice') + '</h1>'</script></td></tr>\n\t\t\t<tr><td colspan=2><h3><script>cur_frm.docname</script></h3></td></tr>\n\t\t</thead>\n\t\t<tbody>\n\t\t\t<tr>\n\t\t\t\t<td width=60%><table width=100% cellspacing=0><tbody>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td width=39%><b>Name</b></td>\n\t\t\t\t\t\t<td><script>doc.customer_name</script></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><b>Address</b></td>\n\t\t\t\t\t\t<td><script>replace_newlines(doc.address_display)</script></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><b>Contact</b></td>\n\t\t\t\t\t\t<td><script>doc.contact_display</script></td>\n\t\t\t\t\t</tr>\n\t\t\t\t</tbody></table></td>\n\t\t\t\t<td><table width=100% cellspacing=0><tbody>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td width=40%><b>Invoice Date</b></td>\n\t\t\t\t\t\t<td><script>date.str_to_user(doc.posting_date)</script></td>\n\t\t\t\t\t<tr>\n                    <tr>\n        \t\t\t\t<td width=40%><script>\n                            (doc.convert_into_recurring_invoice && doc.recurring_id)\n                            ?\"<b>Invoice Period</b>\"\n                            :\"\";\n    \t\t\t\t\t</script></td>\n\t\t\t\t\t\t<td><script>\n                            (doc.convert_into_recurring_invoice && doc.recurring_id)\n                            ?(date.str_to_user(doc.invoice_period_from_date) +\n                                ' to ' + date.str_to_user(doc.invoice_period_to_date))\n                            :\"\";\n                        </script></td>\n\t\t\t\t\t<tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><b>Due Date</b></td>\n\t\t\t\t\t\t<td><script>date.str_to_user(doc.due_date)</script></td>\n\t\t\t\t\t<tr>\t\t\t\t\t\n\t\t\t\t</tbody></table></td>\n\t\t\t</tr>\n\t\t</tbody>\n\t\t<tfoot>\n\t\t\n\t\t</tfoot>\n\t</table>\n</div>\n<div class='common page-body'>\n\t<!-- \n\t\tPage Body will contain\n\t\t\t+ table 2\n\t\t\t\t- Sales Invoice Data\n\t-->\n\t<script>si_std.print_item_table()</script>\n</div>\n<div class='common page-footer'>\n\t<!-- \n\t\tPage Footer will contain\n\t\t\t+ table 3\n\t\t\t\t- Terms and Conditions\n\t\t\t\t- Total Rounded Amount Calculation\n\t\t\t\t- Total Rounded Amount in Words\n\t-->\n\t<table class='footer-table' width=100% cellspacing=0>\n\t\t<thead>\n\t\t\t\n\t\t</thead>\n\t\t<tbody>\n\t\t\t<tr>\n\t\t\t\t<td width=60% style='padding-right: 10px;'>\n\t\t\t\t\t<b>Terms, Conditions &amp; Other Information:</b><br />\n\t\t\t\t\t<script>doc.terms</script>\n\t\t\t\t</td>\n\t\t\t\t<td>\n\t\t\t\t\t<table cellspacing=0 width=100%><tbody>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td>Net Total</td>\n\t\t\t\t\t\t\t<td style=\"width: 38%; text-align: right;\"><script>\n\t\t\t\t\t\t\t\tformat_currency(doc.net_total_export, doc.currency)\n\t\t\t\t\t\t\t</script></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr><td colspan=3><script>si_std.print_other_charges()</script></td></tr>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td>Grand Total</td>\n\t\t\t\t\t\t\t<td style=\"width: 38%; text-align: right;\"><script>\n\t\t\t\t\t\t\t\tformat_currency(doc.grand_total_export, doc.currency)\n\t\t\t\t\t\t\t</script></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr style='font-weight: bold'>\n\t\t\t\t\t\t\t<td>Rounded Total</td>\n\t\t\t\t\t\t\t<td style=\"width: 38%; text-align: right;\"><script>\n\t\t\t\t\t\t\t\tformat_currency(doc.rounded_total_export, doc.currency)\n\t\t\t\t\t\t\t</script></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t</tbody></table>\n\t\t\t\t\t<br /><b>In Words</b><br />\n\t\t\t\t\t<i><script>doc.in_words_export</script></i>\n\t\t\t\t</td>\n\t\t\t</tr>\t\t\n\t\t</tbody>\n\t\t<tfoot>\n\t\t\n\t\t</tfoot>\n\t</table>\n</div>", 
-  "module": "Accounts", 
-  "name": "__common__", 
-  "print_format_type": "Client", 
-  "standard": "Yes"
- }, 
- {
-  "doctype": "Print Format", 
-  "name": "Sales Invoice Spartan"
- }
-]
\ No newline at end of file
+{
+ "creation": "2013-04-19 13:30:27", 
+ "doc_type": "Sales Invoice", 
+ "docstatus": 0, 
+ "doctype": "Print Format", 
+ "html": "<!--\n\tSample Print Format for ERPNext\n\tPlease use at your own discretion\n\tFor suggestions and contributions:\n\t\thttps://github.com/frappe/erpnext-print-templates\n\n\tFreely usable under MIT license\n-->\n\n<!-- Style Settings -->\n<style>\n\t/*\n\t\tcommon style for whole page\n\t\tThis should include:\n\t\t+ page size related settings\n\t\t+ font family settings\n\t\t+ line spacing settings\n\t*/\n\t@media screen {\n\t\tbody {\n\t\t\twidth: 8.3in;\n\t\t}\n\t}\n\n\thtml, body, div, span, td {\n\t\tfont-family: \"Arial\", sans-serif;\n\t\tfont-size: 12px;\n\t}\n\n\tbody {\n\t\tpadding: 10px;\n\t\tmargin: auto;\n\t\tfont-size: 12px;\n\t}\n\n\t.common {\n\t\tfont-family: \"Arial\", sans-serif !important;\n\t\tfont-size: 12px;\n\t\tpadding: 0px;\n\t}\n\n\ttable {\n\t\twidth: 100% !important;\n\t\tvertical-align: top;\n\t}\n\n\ttable td {\n\t\tpadding: 2px 0px;\n\t}\n\n\ttable, td {\n\t\tborder-collapse: collapse !important;\n\t\tpadding: 0px;\n\t\tmargin: 0px !important;\n\t}\n\t\n\ttable h1, h2, h3, h4, h5, h6 {\n\t\tpadding: 0px;\n\t\tmargin: 0px;\n\t}\n\n\ttable.header-table td {\n\t\tvertical-align: top;\n\t}\n\n\ttable.header-table h3 {\n\t\tcolor: gray;\n\t}\n\n\ttable.header-table thead td {\n\t\tpadding: 5px;\n\t}\n\n\ttable.header-table > thead,\n\ttable.header-table > tbody > tr > td,\n\ttable.footer-table > tbody > tr > td {\n\t\tborder: 1px solid black;\n\t\tpadding: 5px;\n\t}\n\n\ttable.footer-table > tbody,\n\ttable.header-table > thead {\n\t\tborder-bottom: 3px solid black;\n\t}\n\n\ttable.header-table > thead {\n\t\tborder-top: 3px solid black;\n\t}\n\n\tdiv.page-body table td:nth-child(6),\n\tdiv.page-body table td:nth-child(7) {\n\t\ttext-align: right;\n\t}\n\n\tdiv.page-body td {\n\t\tbackground-color: white !important;\n\t\tborder: 1px solid black !important;\n\t}\n\n\ttable.footer-table td {\n\t\tvertical-align: top;\n\t}\n\n\ttable.footer-table td table td:nth-child(2),\n\ttable.footer-table td table td:nth-child(3) {\n\t\ttext-align: right;\n\t}\n</style>\n\n\n<!-- Javascript -->\n<script>\n\tsi_std = {\n\t\tprint_item_table: function() {\n\t\t\tvar table = print_table(\n\t\t\t\t'Sales Invoice',\n\t\t\t\tdoc.name,\n\t\t\t\t'entries',\n\t\t\t\t'Sales Invoice Item',\n\t\t\t\t[// Here specify the table columns to be displayed\n\t\t\t\t\t'SR', 'item_name', 'description', 'qty', 'stock_uom',\n\t\t\t\t\t'rate', 'amount'\n\t\t\t\t],\n\t\t\t\t[// Here specify the labels of column headings\n\t\t\t\t\t'Sr', 'Item Name', 'Description', 'Qty',\n\t\t\t\t\t'UoM', 'Basic Rate', 'Amount'\n\t\t\t\t],\n\t\t\t\t[// Here specify the column widths\n\t\t\t\t\t'3%', '20%', '37%', '5%',\n\t\t\t\t\t'5%', '15%', '15%'\n\t\t\t\t],\n\t\t\t\tnull,\n\t\t\t\tnull,\n\t\t\t\t{\n\t\t\t\t\t'description' : function(data_row) {\n\t\t\t\t\t\tif(data_row.discount_percentage) {\n\t\t\t\t\t\t\tvar to_append = '<div style=\"padding-left: 15px;\"><i>Discount: ' + \n\t\t\t\t\t\t\t\tdata_row.discount_percentage + '% on ' + \n\t\t\t\t\t\t\t\tformat_currency(data_row.price_list_rate, doc.currency) + '</i></div>';\n\t\t\t\t\t\t\tif(data_row.description.indexOf(to_append)==-1) {\n\t\t\t\t\t\t\t\treturn data_row.description + to_append;\n\t\t\t\t\t\t\t} else { return data_row.description; }\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\treturn data_row.description;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t);\n\n\t\t\t// This code takes care of page breaks\n\t\t\tif(table.appendChild) {\n\t\t\t\tout = table.innerHTML;\n\t\t\t} else {\n\t\t\t\tout = '';\n\t\t\t\tfor(var i=0; i < (table.length-1); i++) {\n\t\t\t\t\tout += table[i].innerHTML + \n\t\t\t\t\t\t'<div style = \"page-break-after: always;\" \\\n\t\t\t\t\t\tclass = \"page_break\"></div>\\\n\t\t\t\t\t\t<div class=\"page-settings\"></div>';\n\t\t\t\t}\n\t\t\t\tout += table[table.length-1].innerHTML;\n\t\t\t}\n\t\t\treturn out;\n\t\t},\n\n\n\t\tprint_other_charges: function(parent) {\n\t\t\tvar oc = getchildren('Sales Taxes and Charges', doc.name, 'other_charges');\n\t\t\tvar rows = '<table width=100%>\\n';\n\t\t\tfor(var i=0; i<oc.length; i++) {\n\t\t\t\tif(!oc[i].included_in_print_rate) {\n\t\t\t\t\trows +=\n\t\t\t\t\t\t'<tr>\\n' +\n\t\t\t\t\t\t\t'\\t<td>' + oc[i].description + '</td>\\n' +\n\t\t\t\t\t\t\t'\\t<td></td>\\n' +\n\t\t\t\t\t\t\t'\\t<td style=\"width: 38%; text-align: right;\">' + format_currency(oc[i].tax_amount, doc.currency) + '</td>\\n' +\n\t\t\t\t\t\t'</tr>\\n';\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(doc.discount_amount) {\n\t\t\t\trows += '<tr>\\n' + \n\t\t\t\t\t\t'\\t<td>Discount Amount</td>\\n' + \n\t\t\t\t\t\t'\\t<td style=\"width: 38%; text-align: right;\">' + format_currency(doc.discount_amount, doc.currency) + '</td>\\n' + \n\t\t\t\t\t'</tr>\\n';\n\t\t\t}\n\n\t\t\treturn rows + '</table>\\n';\n\t\t}\n\t};\n</script>\n\n\n<!-- Page Layout Settings -->\n<div class='common page-header'>\n\t<!-- \n\t\tPage Header will contain\n\t\t\t+ table 1\n\t\t\t\t+ table 1a\n\t\t\t\t\t- Name\n\t\t\t\t\t- Address\n\t\t\t\t\t- Contact\n\t\t\t\t\t- Mobile No\n\t\t\t\t+ table 1b\n\t\t\t\t\t- Voucher Date\n\t\t\t\t\t- Due Date\n\t-->\n\t<table class='header-table' cellspacing=0>\n\t\t<thead>\n\t\t\t<tr><td colspan=2><script>'<h1>' + (doc.select_print_heading || 'Invoice') + '</h1>'</script></td></tr>\n\t\t\t<tr><td colspan=2><h3><script>cur_frm.docname</script></h3></td></tr>\n\t\t</thead>\n\t\t<tbody>\n\t\t\t<tr>\n\t\t\t\t<td width=60%><table width=100% cellspacing=0><tbody>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td width=39%><b>Name</b></td>\n\t\t\t\t\t\t<td><script>doc.customer_name</script></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><b>Address</b></td>\n\t\t\t\t\t\t<td><script>replace_newlines(doc.address_display)</script></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><b>Contact</b></td>\n\t\t\t\t\t\t<td><script>doc.contact_display</script></td>\n\t\t\t\t\t</tr>\n\t\t\t\t</tbody></table></td>\n\t\t\t\t<td><table width=100% cellspacing=0><tbody>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td width=40%><b>Invoice Date</b></td>\n\t\t\t\t\t\t<td><script>date.str_to_user(doc.posting_date)</script></td>\n\t\t\t\t\t<tr>\n                    <tr>\n        \t\t\t\t<td width=40%><script>\n                            (doc.convert_into_recurring_invoice && doc.recurring_id)\n                            ?\"<b>Invoice Period</b>\"\n                            :\"\";\n    \t\t\t\t\t</script></td>\n\t\t\t\t\t\t<td><script>\n                            (doc.convert_into_recurring_invoice && doc.recurring_id)\n                            ?(date.str_to_user(doc.invoice_period_from_date) +\n                                ' to ' + date.str_to_user(doc.invoice_period_to_date))\n                            :\"\";\n                        </script></td>\n\t\t\t\t\t<tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><b>Due Date</b></td>\n\t\t\t\t\t\t<td><script>date.str_to_user(doc.due_date)</script></td>\n\t\t\t\t\t<tr>\t\t\t\t\t\n\t\t\t\t</tbody></table></td>\n\t\t\t</tr>\n\t\t</tbody>\n\t\t<tfoot>\n\t\t\n\t\t</tfoot>\n\t</table>\n</div>\n<div class='common page-body'>\n\t<!-- \n\t\tPage Body will contain\n\t\t\t+ table 2\n\t\t\t\t- Sales Invoice Data\n\t-->\n\t<script>si_std.print_item_table()</script>\n</div>\n<div class='common page-footer'>\n\t<!-- \n\t\tPage Footer will contain\n\t\t\t+ table 3\n\t\t\t\t- Terms and Conditions\n\t\t\t\t- Total Rounded Amount Calculation\n\t\t\t\t- Total Rounded Amount in Words\n\t-->\n\t<table class='footer-table' width=100% cellspacing=0>\n\t\t<thead>\n\t\t\t\n\t\t</thead>\n\t\t<tbody>\n\t\t\t<tr>\n\t\t\t\t<td width=60% style='padding-right: 10px;'>\n\t\t\t\t\t<b>Terms, Conditions &amp; Other Information:</b><br />\n\t\t\t\t\t<script>doc.terms</script>\n\t\t\t\t</td>\n\t\t\t\t<td>\n\t\t\t\t\t<table cellspacing=0 width=100%><tbody>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td>Net Total</td>\n\t\t\t\t\t\t\t<td style=\"width: 38%; text-align: right;\"><script>\n\t\t\t\t\t\t\t\tformat_currency(doc.net_total_export, doc.currency)\n\t\t\t\t\t\t\t</script></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr><td colspan=3><script>si_std.print_other_charges()</script></td></tr>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td>Grand Total</td>\n\t\t\t\t\t\t\t<td style=\"width: 38%; text-align: right;\"><script>\n\t\t\t\t\t\t\t\tformat_currency(doc.grand_total_export, doc.currency)\n\t\t\t\t\t\t\t</script></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr style='font-weight: bold'>\n\t\t\t\t\t\t\t<td>Rounded Total</td>\n\t\t\t\t\t\t\t<td style=\"width: 38%; text-align: right;\"><script>\n\t\t\t\t\t\t\t\tformat_currency(doc.rounded_total_export, doc.currency)\n\t\t\t\t\t\t\t</script></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t</tbody></table>\n\t\t\t\t\t<br /><b>In Words</b><br />\n\t\t\t\t\t<i><script>doc.in_words_export</script></i>\n\t\t\t\t</td>\n\t\t\t</tr>\t\t\n\t\t</tbody>\n\t\t<tfoot>\n\t\t\n\t\t</tfoot>\n\t</table>\n</div>", 
+ "idx": 1, 
+ "modified": "2014-02-11 17:34:00", 
+ "modified_by": "Administrator", 
+ "module": "Accounts", 
+ "name": "Sales Invoice Spartan", 
+ "owner": "Administrator", 
+ "print_format_type": "Client", 
+ "standard": "Yes"
+}
\ No newline at end of file
diff --git a/erpnext/accounts/Print Format/SalesInvoice/SalesInvoice.txt b/erpnext/accounts/Print Format/SalesInvoice/SalesInvoice.txt
index d2b1cdb..60897e5 100644
--- a/erpnext/accounts/Print Format/SalesInvoice/SalesInvoice.txt
+++ b/erpnext/accounts/Print Format/SalesInvoice/SalesInvoice.txt
@@ -1,20 +1,13 @@
-[
- {
-  "creation": "2013-03-21 15:24:28", 
-  "docstatus": 0, 
-  "modified": "2013-03-21 15:26:21", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "doc_type": "Sales Invoice", 
-  "doctype": "Print Format", 
-  "module": "Accounts", 
-  "name": "__common__", 
-  "standard": "Yes"
- }, 
- {
-  "doctype": "Print Format", 
-  "name": "SalesInvoice"
- }
-]
\ No newline at end of file
+{
+ "creation": "2013-03-21 15:24:28", 
+ "doc_type": "Sales Invoice", 
+ "docstatus": 0, 
+ "doctype": "Print Format", 
+ "idx": 1, 
+ "modified": "2013-03-21 15:26:21", 
+ "modified_by": "Administrator", 
+ "module": "Accounts", 
+ "name": "SalesInvoice", 
+ "owner": "Administrator", 
+ "standard": "Yes"
+}
\ No newline at end of file
diff --git a/erpnext/accounts/doctype/account/account.txt b/erpnext/accounts/doctype/account/account.txt
index 17d77f9..5778d5a 100644
--- a/erpnext/accounts/doctype/account/account.txt
+++ b/erpnext/accounts/doctype/account/account.txt
@@ -1,317 +1,326 @@
-[
- {
-  "creation": "2013-01-30 12:49:46", 
-  "docstatus": 0, 
-  "modified": "2014-03-19 12:07:27", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "allow_copy": 1, 
-  "allow_rename": 1, 
-  "description": "Heads (or groups) against which Accounting Entries are made and balances are maintained.", 
-  "doctype": "DocType", 
-  "document_type": "Master", 
-  "icon": "icon-money", 
-  "in_create": 1, 
-  "module": "Accounts", 
-  "name": "__common__", 
-  "search_fields": "group_or_ledger"
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "Account", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "amend": 0, 
-  "cancel": 0, 
-  "doctype": "DocPerm", 
-  "name": "__common__", 
-  "parent": "Account", 
-  "parentfield": "permissions", 
-  "parenttype": "DocType", 
-  "read": 1, 
-  "report": 1, 
-  "submit": 0
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Account"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "properties", 
-  "fieldtype": "Section Break", 
-  "label": "Account Details", 
-  "oldfieldtype": "Section Break"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break0", 
-  "fieldtype": "Column Break", 
-  "width": "50%"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "account_name", 
-  "fieldtype": "Data", 
-  "in_filter": 1, 
-  "label": "Account Name", 
-  "no_copy": 1, 
-  "oldfieldname": "account_name", 
-  "oldfieldtype": "Data", 
-  "read_only": 1, 
-  "reqd": 1, 
-  "search_index": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "level", 
-  "fieldtype": "Int", 
-  "hidden": 1, 
-  "label": "Level", 
-  "oldfieldname": "level", 
-  "oldfieldtype": "Int", 
-  "print_hide": 1, 
-  "read_only": 1
- }, 
- {
-  "default": "Ledger", 
-  "doctype": "DocField", 
-  "fieldname": "group_or_ledger", 
-  "fieldtype": "Select", 
-  "in_filter": 1, 
-  "label": "Group or Ledger", 
-  "oldfieldname": "group_or_ledger", 
-  "oldfieldtype": "Select", 
-  "options": "\nLedger\nGroup", 
-  "read_only": 1, 
-  "reqd": 1, 
-  "search_index": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "company", 
-  "fieldtype": "Link", 
-  "in_filter": 1, 
-  "label": "Company", 
-  "oldfieldname": "company", 
-  "oldfieldtype": "Link", 
-  "options": "Company", 
-  "read_only": 1, 
-  "reqd": 1, 
-  "search_index": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break1", 
-  "fieldtype": "Column Break", 
-  "width": "50%"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "parent_account", 
-  "fieldtype": "Link", 
-  "ignore_restrictions": 1, 
-  "label": "Parent Account", 
-  "oldfieldname": "parent_account", 
-  "oldfieldtype": "Link", 
-  "options": "Account", 
-  "search_index": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "report_type", 
-  "fieldtype": "Select", 
-  "label": "Report Type", 
-  "options": "\nBalance Sheet\nProfit and Loss"
- }, 
- {
-  "description": "Setting Account Type helps in selecting this Account in transactions.", 
-  "doctype": "DocField", 
-  "fieldname": "account_type", 
-  "fieldtype": "Select", 
-  "in_filter": 1, 
-  "label": "Account Type", 
-  "oldfieldname": "account_type", 
-  "oldfieldtype": "Select", 
-  "options": "Bank\nCash\nTax\nChargeable\nWarehouse\nReceivable\nPayable\nEquity\nFixed Asset\nCost of Goods Sold\nExpense Account\nIncome Account\nStock Received But Not Billed\nExpenses Included In Valuation\nStock Adjustment", 
-  "search_index": 0
- }, 
- {
-  "description": "Rate at which this tax is applied", 
-  "doctype": "DocField", 
-  "fieldname": "tax_rate", 
-  "fieldtype": "Float", 
-  "hidden": 0, 
-  "label": "Rate", 
-  "oldfieldname": "tax_rate", 
-  "oldfieldtype": "Currency", 
-  "reqd": 0
- }, 
- {
-  "description": "If the account is frozen, entries are allowed to restricted users.", 
-  "doctype": "DocField", 
-  "fieldname": "freeze_account", 
-  "fieldtype": "Select", 
-  "label": "Frozen", 
-  "oldfieldname": "freeze_account", 
-  "oldfieldtype": "Select", 
-  "options": "No\nYes"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "credit_days", 
-  "fieldtype": "Int", 
-  "hidden": 1, 
-  "label": "Credit Days", 
-  "oldfieldname": "credit_days", 
-  "oldfieldtype": "Int", 
-  "print_hide": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "credit_limit", 
-  "fieldtype": "Currency", 
-  "hidden": 1, 
-  "label": "Credit Limit", 
-  "oldfieldname": "credit_limit", 
-  "oldfieldtype": "Currency", 
-  "options": "Company:company:default_currency", 
-  "print_hide": 1
- }, 
- {
-  "description": "If this Account represents a Customer, Supplier or Employee, set it here.", 
-  "doctype": "DocField", 
-  "fieldname": "master_type", 
-  "fieldtype": "Select", 
-  "label": "Master Type", 
-  "oldfieldname": "master_type", 
-  "oldfieldtype": "Select", 
-  "options": "\nSupplier\nCustomer\nEmployee"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "master_name", 
-  "fieldtype": "Link", 
-  "label": "Master Name", 
-  "oldfieldname": "master_name", 
-  "oldfieldtype": "Link", 
-  "options": "[Select]"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "balance_must_be", 
-  "fieldtype": "Select", 
-  "label": "Balance must be", 
-  "options": "\nDebit\nCredit"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "lft", 
-  "fieldtype": "Int", 
-  "hidden": 1, 
-  "label": "Lft", 
-  "print_hide": 1, 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "rgt", 
-  "fieldtype": "Int", 
-  "hidden": 1, 
-  "label": "Rgt", 
-  "print_hide": 1, 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "old_parent", 
-  "fieldtype": "Data", 
-  "hidden": 1, 
-  "label": "Old Parent", 
-  "print_hide": 1, 
-  "read_only": 1
- }, 
- {
-  "create": 1, 
-  "delete": 1, 
-  "doctype": "DocPerm", 
-  "email": 1, 
-  "permlevel": 0, 
-  "print": 1, 
-  "role": "Accounts User", 
-  "write": 1
- }, 
- {
-  "create": 0, 
-  "delete": 0, 
-  "doctype": "DocPerm", 
-  "email": 1, 
-  "permlevel": 0, 
-  "print": 1, 
-  "role": "Auditor", 
-  "write": 0
- }, 
- {
-  "create": 0, 
-  "delete": 0, 
-  "doctype": "DocPerm", 
-  "email": 1, 
-  "permlevel": 0, 
-  "print": 1, 
-  "role": "Sales User", 
-  "write": 0
- }, 
- {
-  "create": 0, 
-  "delete": 0, 
-  "doctype": "DocPerm", 
-  "email": 1, 
-  "permlevel": 0, 
-  "print": 1, 
-  "role": "Purchase User", 
-  "write": 0
- }, 
- {
-  "create": 0, 
-  "delete": 0, 
-  "doctype": "DocPerm", 
-  "permlevel": 2, 
-  "role": "Auditor", 
-  "write": 0
- }, 
- {
-  "create": 1, 
-  "delete": 1, 
-  "doctype": "DocPerm", 
-  "email": 1, 
-  "export": 0, 
-  "import": 0, 
-  "permlevel": 0, 
-  "print": 1, 
-  "restrict": 1, 
-  "role": "Accounts Manager", 
-  "write": 1
- }, 
- {
-  "create": 0, 
-  "delete": 0, 
-  "doctype": "DocPerm", 
-  "permlevel": 2, 
-  "role": "Accounts Manager", 
-  "write": 1
- }, 
- {
-  "create": 0, 
-  "delete": 0, 
-  "doctype": "DocPerm", 
-  "permlevel": 2, 
-  "role": "Accounts User", 
-  "write": 0
- }
-]
\ No newline at end of file
+{
+ "allow_copy": 1, 
+ "allow_rename": 1, 
+ "creation": "2013-01-30 12:49:46", 
+ "description": "Heads (or groups) against which Accounting Entries are made and balances are maintained.", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "document_type": "Master", 
+ "fields": [
+  {
+   "fieldname": "properties", 
+   "fieldtype": "Section Break", 
+   "label": "Account Details", 
+   "oldfieldtype": "Section Break", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "column_break0", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0, 
+   "width": "50%"
+  }, 
+  {
+   "fieldname": "account_name", 
+   "fieldtype": "Data", 
+   "in_filter": 1, 
+   "label": "Account Name", 
+   "no_copy": 1, 
+   "oldfieldname": "account_name", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "read_only": 1, 
+   "reqd": 1, 
+   "search_index": 1
+  }, 
+  {
+   "fieldname": "level", 
+   "fieldtype": "Int", 
+   "hidden": 1, 
+   "label": "Level", 
+   "oldfieldname": "level", 
+   "oldfieldtype": "Int", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1
+  }, 
+  {
+   "default": "Ledger", 
+   "fieldname": "group_or_ledger", 
+   "fieldtype": "Select", 
+   "in_filter": 1, 
+   "label": "Group or Ledger", 
+   "oldfieldname": "group_or_ledger", 
+   "oldfieldtype": "Select", 
+   "options": "\nLedger\nGroup", 
+   "permlevel": 0, 
+   "read_only": 1, 
+   "reqd": 1, 
+   "search_index": 1
+  }, 
+  {
+   "fieldname": "company", 
+   "fieldtype": "Link", 
+   "in_filter": 1, 
+   "label": "Company", 
+   "oldfieldname": "company", 
+   "oldfieldtype": "Link", 
+   "options": "Company", 
+   "permlevel": 0, 
+   "read_only": 1, 
+   "reqd": 1, 
+   "search_index": 1
+  }, 
+  {
+   "fieldname": "column_break1", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0, 
+   "width": "50%"
+  }, 
+  {
+   "fieldname": "parent_account", 
+   "fieldtype": "Link", 
+   "ignore_restrictions": 1, 
+   "label": "Parent Account", 
+   "oldfieldname": "parent_account", 
+   "oldfieldtype": "Link", 
+   "options": "Account", 
+   "permlevel": 0, 
+   "search_index": 1
+  }, 
+  {
+   "fieldname": "report_type", 
+   "fieldtype": "Select", 
+   "label": "Report Type", 
+   "options": "\nBalance Sheet\nProfit and Loss", 
+   "permlevel": 0
+  }, 
+  {
+   "description": "Setting Account Type helps in selecting this Account in transactions.", 
+   "fieldname": "account_type", 
+   "fieldtype": "Select", 
+   "in_filter": 1, 
+   "label": "Account Type", 
+   "oldfieldname": "account_type", 
+   "oldfieldtype": "Select", 
+   "options": "Bank\nCash\nTax\nChargeable\nWarehouse\nReceivable\nPayable\nEquity\nFixed Asset\nCost of Goods Sold\nExpense Account\nIncome Account\nStock Received But Not Billed\nExpenses Included In Valuation\nStock Adjustment", 
+   "permlevel": 0, 
+   "search_index": 0
+  }, 
+  {
+   "description": "Rate at which this tax is applied", 
+   "fieldname": "tax_rate", 
+   "fieldtype": "Float", 
+   "hidden": 0, 
+   "label": "Rate", 
+   "oldfieldname": "tax_rate", 
+   "oldfieldtype": "Currency", 
+   "permlevel": 0, 
+   "reqd": 0
+  }, 
+  {
+   "description": "If the account is frozen, entries are allowed to restricted users.", 
+   "fieldname": "freeze_account", 
+   "fieldtype": "Select", 
+   "label": "Frozen", 
+   "oldfieldname": "freeze_account", 
+   "oldfieldtype": "Select", 
+   "options": "No\nYes", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "credit_days", 
+   "fieldtype": "Int", 
+   "hidden": 1, 
+   "label": "Credit Days", 
+   "oldfieldname": "credit_days", 
+   "oldfieldtype": "Int", 
+   "permlevel": 0, 
+   "print_hide": 1
+  }, 
+  {
+   "fieldname": "credit_limit", 
+   "fieldtype": "Currency", 
+   "hidden": 1, 
+   "label": "Credit Limit", 
+   "oldfieldname": "credit_limit", 
+   "oldfieldtype": "Currency", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "print_hide": 1
+  }, 
+  {
+   "description": "If this Account represents a Customer, Supplier or Employee, set it here.", 
+   "fieldname": "master_type", 
+   "fieldtype": "Select", 
+   "label": "Master Type", 
+   "oldfieldname": "master_type", 
+   "oldfieldtype": "Select", 
+   "options": "\nSupplier\nCustomer\nEmployee", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "master_name", 
+   "fieldtype": "Link", 
+   "label": "Master Name", 
+   "oldfieldname": "master_name", 
+   "oldfieldtype": "Link", 
+   "options": "[Select]", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "balance_must_be", 
+   "fieldtype": "Select", 
+   "label": "Balance must be", 
+   "options": "\nDebit\nCredit", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "lft", 
+   "fieldtype": "Int", 
+   "hidden": 1, 
+   "label": "Lft", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "rgt", 
+   "fieldtype": "Int", 
+   "hidden": 1, 
+   "label": "Rgt", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "old_parent", 
+   "fieldtype": "Data", 
+   "hidden": 1, 
+   "label": "Old Parent", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1
+  }
+ ], 
+ "icon": "icon-money", 
+ "idx": 1, 
+ "in_create": 1, 
+ "modified": "2014-03-19 12:07:27", 
+ "modified_by": "Administrator", 
+ "module": "Accounts", 
+ "name": "Account", 
+ "owner": "Administrator", 
+ "permissions": [
+  {
+   "amend": 0, 
+   "cancel": 0, 
+   "create": 1, 
+   "delete": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Accounts User", 
+   "submit": 0, 
+   "write": 1
+  }, 
+  {
+   "amend": 0, 
+   "cancel": 0, 
+   "create": 0, 
+   "delete": 0, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Auditor", 
+   "submit": 0, 
+   "write": 0
+  }, 
+  {
+   "amend": 0, 
+   "cancel": 0, 
+   "create": 0, 
+   "delete": 0, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Sales User", 
+   "submit": 0, 
+   "write": 0
+  }, 
+  {
+   "amend": 0, 
+   "cancel": 0, 
+   "create": 0, 
+   "delete": 0, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Purchase User", 
+   "submit": 0, 
+   "write": 0
+  }, 
+  {
+   "amend": 0, 
+   "cancel": 0, 
+   "create": 0, 
+   "delete": 0, 
+   "permlevel": 2, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Auditor", 
+   "submit": 0, 
+   "write": 0
+  }, 
+  {
+   "amend": 0, 
+   "cancel": 0, 
+   "create": 1, 
+   "delete": 1, 
+   "email": 1, 
+   "export": 0, 
+   "import": 0, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "restrict": 1, 
+   "role": "Accounts Manager", 
+   "submit": 0, 
+   "write": 1
+  }, 
+  {
+   "amend": 0, 
+   "cancel": 0, 
+   "create": 0, 
+   "delete": 0, 
+   "permlevel": 2, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Accounts Manager", 
+   "submit": 0, 
+   "write": 1
+  }, 
+  {
+   "amend": 0, 
+   "cancel": 0, 
+   "create": 0, 
+   "delete": 0, 
+   "permlevel": 2, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Accounts User", 
+   "submit": 0, 
+   "write": 0
+  }
+ ], 
+ "search_fields": "group_or_ledger"
+}
\ No newline at end of file
diff --git a/erpnext/accounts/doctype/accounts_settings/accounts_settings.txt b/erpnext/accounts/doctype/accounts_settings/accounts_settings.txt
index f36e218..3264613 100644
--- a/erpnext/accounts/doctype/accounts_settings/accounts_settings.txt
+++ b/erpnext/accounts/doctype/accounts_settings/accounts_settings.txt
@@ -1,85 +1,66 @@
-[
- {
-  "creation": "2013-06-24 15:49:57", 
-  "docstatus": 0, 
-  "modified": "2013-12-20 19:22:52", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "description": "Settings for Accounts", 
-  "doctype": "DocType", 
-  "icon": "icon-cog", 
-  "issingle": 1, 
-  "module": "Accounts", 
-  "name": "__common__"
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "Accounts Settings", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "create": 1, 
-  "doctype": "DocPerm", 
-  "email": 1, 
-  "name": "__common__", 
-  "parent": "Accounts Settings", 
-  "parentfield": "permissions", 
-  "parenttype": "DocType", 
-  "permlevel": 0, 
-  "print": 1, 
-  "read": 1, 
-  "role": "Accounts Manager", 
-  "write": 1
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Accounts Settings"
- }, 
- {
-  "default": "1", 
-  "description": "If enabled, the system will post accounting entries for inventory automatically.", 
-  "doctype": "DocField", 
-  "fieldname": "auto_accounting_for_stock", 
-  "fieldtype": "Check", 
-  "label": "Make Accounting Entry For Every Stock Movement"
- }, 
- {
-  "description": "Accounting entry frozen up to this date, nobody can do / modify entry except role specified below.", 
-  "doctype": "DocField", 
-  "fieldname": "acc_frozen_upto", 
-  "fieldtype": "Date", 
-  "label": "Accounts Frozen Upto"
- }, 
- {
-  "description": "Users with this role are allowed to create / modify accounting entry before frozen date", 
-  "doctype": "DocField", 
-  "fieldname": "bde_auth_role", 
-  "fieldtype": "Link", 
-  "label": "Allowed Role to Edit Entries Before Frozen Date", 
-  "options": "Role"
- }, 
- {
-  "description": "Users with this role are allowed to set frozen accounts and create / modify accounting entries against frozen accounts", 
-  "doctype": "DocField", 
-  "fieldname": "frozen_accounts_modifier", 
-  "fieldtype": "Link", 
-  "label": "Frozen Accounts Modifier", 
-  "options": "Role"
- }, 
- {
-  "description": "Role that is allowed to submit transactions that exceed credit limits set.", 
-  "doctype": "DocField", 
-  "fieldname": "credit_controller", 
-  "fieldtype": "Link", 
-  "label": "Credit Controller", 
-  "options": "Role"
- }, 
- {
-  "doctype": "DocPerm"
- }
-]
\ No newline at end of file
+{
+ "creation": "2013-06-24 15:49:57", 
+ "description": "Settings for Accounts", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "fields": [
+  {
+   "default": "1", 
+   "description": "If enabled, the system will post accounting entries for inventory automatically.", 
+   "fieldname": "auto_accounting_for_stock", 
+   "fieldtype": "Check", 
+   "label": "Make Accounting Entry For Every Stock Movement", 
+   "permlevel": 0
+  }, 
+  {
+   "description": "Accounting entry frozen up to this date, nobody can do / modify entry except role specified below.", 
+   "fieldname": "acc_frozen_upto", 
+   "fieldtype": "Date", 
+   "label": "Accounts Frozen Upto", 
+   "permlevel": 0
+  }, 
+  {
+   "description": "Users with this role are allowed to create / modify accounting entry before frozen date", 
+   "fieldname": "bde_auth_role", 
+   "fieldtype": "Link", 
+   "label": "Allowed Role to Edit Entries Before Frozen Date", 
+   "options": "Role", 
+   "permlevel": 0
+  }, 
+  {
+   "description": "Users with this role are allowed to set frozen accounts and create / modify accounting entries against frozen accounts", 
+   "fieldname": "frozen_accounts_modifier", 
+   "fieldtype": "Link", 
+   "label": "Frozen Accounts Modifier", 
+   "options": "Role", 
+   "permlevel": 0
+  }, 
+  {
+   "description": "Role that is allowed to submit transactions that exceed credit limits set.", 
+   "fieldname": "credit_controller", 
+   "fieldtype": "Link", 
+   "label": "Credit Controller", 
+   "options": "Role", 
+   "permlevel": 0
+  }
+ ], 
+ "icon": "icon-cog", 
+ "idx": 1, 
+ "issingle": 1, 
+ "modified": "2013-12-20 19:22:52", 
+ "modified_by": "Administrator", 
+ "module": "Accounts", 
+ "name": "Accounts Settings", 
+ "owner": "Administrator", 
+ "permissions": [
+  {
+   "create": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "role": "Accounts Manager", 
+   "write": 1
+  }
+ ]
+}
\ No newline at end of file
diff --git a/erpnext/accounts/doctype/bank_reconciliation/bank_reconciliation.txt b/erpnext/accounts/doctype/bank_reconciliation/bank_reconciliation.txt
index 3cd385b..783c295 100644
--- a/erpnext/accounts/doctype/bank_reconciliation/bank_reconciliation.txt
+++ b/erpnext/accounts/doctype/bank_reconciliation/bank_reconciliation.txt
@@ -1,115 +1,96 @@
-[
- {
-  "creation": "2013-01-10 16:34:05", 
-  "docstatus": 0, 
-  "modified": "2013-07-05 14:26:22", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "allow_copy": 1, 
-  "allow_email": 1, 
-  "allow_print": 1, 
-  "doctype": "DocType", 
-  "hide_heading": 1, 
-  "hide_toolbar": 1, 
-  "icon": "icon-check", 
-  "issingle": 1, 
-  "module": "Accounts", 
-  "name": "__common__", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "Bank Reconciliation", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "amend": 0, 
-  "cancel": 0, 
-  "create": 1, 
-  "doctype": "DocPerm", 
-  "name": "__common__", 
-  "parent": "Bank Reconciliation", 
-  "parentfield": "permissions", 
-  "parenttype": "DocType", 
-  "permlevel": 0, 
-  "read": 1, 
-  "report": 0, 
-  "role": "Accounts User", 
-  "submit": 0, 
-  "write": 1
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Bank Reconciliation"
- }, 
- {
-  "description": "Select account head of the bank where cheque was deposited.", 
-  "doctype": "DocField", 
-  "fieldname": "bank_account", 
-  "fieldtype": "Link", 
-  "label": "Bank Account", 
-  "options": "Account", 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "company", 
-  "fieldtype": "Link", 
-  "hidden": 1, 
-  "label": "Company", 
-  "options": "Company", 
-  "print_hide": 1, 
-  "reqd": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "from_date", 
-  "fieldtype": "Date", 
-  "label": "From Date", 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "to_date", 
-  "fieldtype": "Date", 
-  "label": "To Date", 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "get_non_reconciled_entries", 
-  "fieldtype": "Button", 
-  "label": "Get Non Reconciled Entries", 
-  "options": "get_details"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "entries", 
-  "fieldtype": "Table", 
-  "label": "Entries", 
-  "options": "Bank Reconciliation Detail"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "update_clearance_date", 
-  "fieldtype": "Button", 
-  "label": "Update Clearance Date", 
-  "options": "update_details"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "total_amount", 
-  "fieldtype": "Currency", 
-  "label": "Total Amount", 
-  "options": "Company:company:default_currency", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocPerm"
- }
-]
\ No newline at end of file
+{
+ "allow_copy": 1, 
+ "allow_email": 1, 
+ "allow_print": 1, 
+ "creation": "2013-01-10 16:34:05", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "fields": [
+  {
+   "description": "Select account head of the bank where cheque was deposited.", 
+   "fieldname": "bank_account", 
+   "fieldtype": "Link", 
+   "label": "Bank Account", 
+   "options": "Account", 
+   "permlevel": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "company", 
+   "fieldtype": "Link", 
+   "hidden": 1, 
+   "label": "Company", 
+   "options": "Company", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "reqd": 0
+  }, 
+  {
+   "fieldname": "from_date", 
+   "fieldtype": "Date", 
+   "label": "From Date", 
+   "permlevel": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "to_date", 
+   "fieldtype": "Date", 
+   "label": "To Date", 
+   "permlevel": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "get_non_reconciled_entries", 
+   "fieldtype": "Button", 
+   "label": "Get Non Reconciled Entries", 
+   "options": "get_details", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "entries", 
+   "fieldtype": "Table", 
+   "label": "Entries", 
+   "options": "Bank Reconciliation Detail", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "update_clearance_date", 
+   "fieldtype": "Button", 
+   "label": "Update Clearance Date", 
+   "options": "update_details", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "total_amount", 
+   "fieldtype": "Currency", 
+   "label": "Total Amount", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "read_only": 1
+  }
+ ], 
+ "hide_heading": 1, 
+ "hide_toolbar": 1, 
+ "icon": "icon-check", 
+ "idx": 1, 
+ "issingle": 1, 
+ "modified": "2013-07-05 14:26:22", 
+ "modified_by": "Administrator", 
+ "module": "Accounts", 
+ "name": "Bank Reconciliation", 
+ "owner": "Administrator", 
+ "permissions": [
+  {
+   "amend": 0, 
+   "cancel": 0, 
+   "create": 1, 
+   "permlevel": 0, 
+   "read": 1, 
+   "report": 0, 
+   "role": "Accounts User", 
+   "submit": 0, 
+   "write": 1
+  }
+ ], 
+ "read_only": 1
+}
\ No newline at end of file
diff --git a/erpnext/accounts/doctype/bank_reconciliation_detail/bank_reconciliation_detail.txt b/erpnext/accounts/doctype/bank_reconciliation_detail/bank_reconciliation_detail.txt
index 47ff4f1..386e3b7 100644
--- a/erpnext/accounts/doctype/bank_reconciliation_detail/bank_reconciliation_detail.txt
+++ b/erpnext/accounts/doctype/bank_reconciliation_detail/bank_reconciliation_detail.txt
@@ -1,108 +1,109 @@
-[
- {
-  "creation": "2013-02-22 01:27:37", 
-  "docstatus": 0, 
-  "modified": "2013-12-20 19:22:55", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "doctype": "DocType", 
-  "istable": 1, 
-  "module": "Accounts", 
-  "name": "__common__"
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "no_copy": 0, 
-  "parent": "Bank Reconciliation Detail", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0, 
-  "search_index": 0
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Bank Reconciliation Detail"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "voucher_id", 
-  "fieldtype": "Link", 
-  "in_list_view": 1, 
-  "label": "Voucher ID", 
-  "oldfieldname": "voucher_id", 
-  "oldfieldtype": "Link", 
-  "options": "Journal Voucher"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "against_account", 
-  "fieldtype": "Data", 
-  "in_list_view": 1, 
-  "label": "Against Account", 
-  "oldfieldname": "against_account", 
-  "oldfieldtype": "Data", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "posting_date", 
-  "fieldtype": "Date", 
-  "in_list_view": 1, 
-  "label": "Posting Date", 
-  "oldfieldname": "posting_date", 
-  "oldfieldtype": "Date", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "clearance_date", 
-  "fieldtype": "Date", 
-  "in_list_view": 1, 
-  "label": "Clearance Date", 
-  "oldfieldname": "clearance_date", 
-  "oldfieldtype": "Date"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "cheque_number", 
-  "fieldtype": "Data", 
-  "in_list_view": 1, 
-  "label": "Cheque Number", 
-  "oldfieldname": "cheque_number", 
-  "oldfieldtype": "Data", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "cheque_date", 
-  "fieldtype": "Date", 
-  "in_list_view": 1, 
-  "label": "Cheque Date", 
-  "oldfieldname": "cheque_date", 
-  "oldfieldtype": "Date", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "debit", 
-  "fieldtype": "Currency", 
-  "label": "Debit", 
-  "oldfieldname": "debit", 
-  "oldfieldtype": "Currency", 
-  "options": "Company:company:default_currency", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "credit", 
-  "fieldtype": "Currency", 
-  "label": "Credit", 
-  "oldfieldname": "credit", 
-  "oldfieldtype": "Currency", 
-  "options": "Company:company:default_currency", 
-  "read_only": 1
- }
-]
\ No newline at end of file
+{
+ "creation": "2013-02-22 01:27:37", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "fields": [
+  {
+   "fieldname": "voucher_id", 
+   "fieldtype": "Link", 
+   "in_list_view": 1, 
+   "label": "Voucher ID", 
+   "no_copy": 0, 
+   "oldfieldname": "voucher_id", 
+   "oldfieldtype": "Link", 
+   "options": "Journal Voucher", 
+   "permlevel": 0, 
+   "search_index": 0
+  }, 
+  {
+   "fieldname": "against_account", 
+   "fieldtype": "Data", 
+   "in_list_view": 1, 
+   "label": "Against Account", 
+   "no_copy": 0, 
+   "oldfieldname": "against_account", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "read_only": 1, 
+   "search_index": 0
+  }, 
+  {
+   "fieldname": "posting_date", 
+   "fieldtype": "Date", 
+   "in_list_view": 1, 
+   "label": "Posting Date", 
+   "no_copy": 0, 
+   "oldfieldname": "posting_date", 
+   "oldfieldtype": "Date", 
+   "permlevel": 0, 
+   "read_only": 1, 
+   "search_index": 0
+  }, 
+  {
+   "fieldname": "clearance_date", 
+   "fieldtype": "Date", 
+   "in_list_view": 1, 
+   "label": "Clearance Date", 
+   "no_copy": 0, 
+   "oldfieldname": "clearance_date", 
+   "oldfieldtype": "Date", 
+   "permlevel": 0, 
+   "search_index": 0
+  }, 
+  {
+   "fieldname": "cheque_number", 
+   "fieldtype": "Data", 
+   "in_list_view": 1, 
+   "label": "Cheque Number", 
+   "no_copy": 0, 
+   "oldfieldname": "cheque_number", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "read_only": 1, 
+   "search_index": 0
+  }, 
+  {
+   "fieldname": "cheque_date", 
+   "fieldtype": "Date", 
+   "in_list_view": 1, 
+   "label": "Cheque Date", 
+   "no_copy": 0, 
+   "oldfieldname": "cheque_date", 
+   "oldfieldtype": "Date", 
+   "permlevel": 0, 
+   "read_only": 1, 
+   "search_index": 0
+  }, 
+  {
+   "fieldname": "debit", 
+   "fieldtype": "Currency", 
+   "label": "Debit", 
+   "no_copy": 0, 
+   "oldfieldname": "debit", 
+   "oldfieldtype": "Currency", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "read_only": 1, 
+   "search_index": 0
+  }, 
+  {
+   "fieldname": "credit", 
+   "fieldtype": "Currency", 
+   "label": "Credit", 
+   "no_copy": 0, 
+   "oldfieldname": "credit", 
+   "oldfieldtype": "Currency", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "read_only": 1, 
+   "search_index": 0
+  }
+ ], 
+ "idx": 1, 
+ "istable": 1, 
+ "modified": "2013-12-20 19:22:55", 
+ "modified_by": "Administrator", 
+ "module": "Accounts", 
+ "name": "Bank Reconciliation Detail", 
+ "owner": "Administrator"
+}
\ No newline at end of file
diff --git a/erpnext/accounts/doctype/budget_detail/budget_detail.txt b/erpnext/accounts/doctype/budget_detail/budget_detail.txt
index 31312c9..0a95bc1 100644
--- a/erpnext/accounts/doctype/budget_detail/budget_detail.txt
+++ b/erpnext/accounts/doctype/budget_detail/budget_detail.txt
@@ -1,61 +1,52 @@
-[
- {
-  "creation": "2013-03-07 11:55:04", 
-  "docstatus": 0, 
-  "modified": "2013-12-20 19:22:59", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "autoname": "CBD/.######", 
-  "doctype": "DocType", 
-  "istable": 1, 
-  "module": "Accounts", 
-  "name": "__common__"
- }, 
- {
-  "doctype": "DocField", 
-  "in_list_view": 1, 
-  "name": "__common__", 
-  "parent": "Budget Detail", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0, 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Budget Detail"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "account", 
-  "fieldtype": "Link", 
-  "in_filter": 1, 
-  "label": "Account", 
-  "oldfieldname": "account", 
-  "oldfieldtype": "Link", 
-  "options": "Account", 
-  "search_index": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "budget_allocated", 
-  "fieldtype": "Currency", 
-  "label": "Budget Allocated", 
-  "oldfieldname": "budget_allocated", 
-  "oldfieldtype": "Currency", 
-  "options": "Company:company:default_currency"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "fiscal_year", 
-  "fieldtype": "Select", 
-  "in_filter": 1, 
-  "label": "Fiscal Year", 
-  "oldfieldname": "fiscal_year", 
-  "oldfieldtype": "Select", 
-  "options": "link:Fiscal Year", 
-  "search_index": 1
- }
-]
\ No newline at end of file
+{
+ "autoname": "CBD/.######", 
+ "creation": "2013-03-07 11:55:04", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "fields": [
+  {
+   "fieldname": "account", 
+   "fieldtype": "Link", 
+   "in_filter": 1, 
+   "in_list_view": 1, 
+   "label": "Account", 
+   "oldfieldname": "account", 
+   "oldfieldtype": "Link", 
+   "options": "Account", 
+   "permlevel": 0, 
+   "reqd": 1, 
+   "search_index": 1
+  }, 
+  {
+   "fieldname": "budget_allocated", 
+   "fieldtype": "Currency", 
+   "in_list_view": 1, 
+   "label": "Budget Allocated", 
+   "oldfieldname": "budget_allocated", 
+   "oldfieldtype": "Currency", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "fiscal_year", 
+   "fieldtype": "Select", 
+   "in_filter": 1, 
+   "in_list_view": 1, 
+   "label": "Fiscal Year", 
+   "oldfieldname": "fiscal_year", 
+   "oldfieldtype": "Select", 
+   "options": "link:Fiscal Year", 
+   "permlevel": 0, 
+   "reqd": 1, 
+   "search_index": 1
+  }
+ ], 
+ "idx": 1, 
+ "istable": 1, 
+ "modified": "2013-12-20 19:22:59", 
+ "modified_by": "Administrator", 
+ "module": "Accounts", 
+ "name": "Budget Detail", 
+ "owner": "Administrator"
+}
\ No newline at end of file
diff --git a/erpnext/accounts/doctype/budget_distribution/budget_distribution.txt b/erpnext/accounts/doctype/budget_distribution/budget_distribution.txt
index 48d6e7b..4034b1d 100644
--- a/erpnext/accounts/doctype/budget_distribution/budget_distribution.txt
+++ b/erpnext/accounts/doctype/budget_distribution/budget_distribution.txt
@@ -1,96 +1,81 @@
-[
- {
-  "creation": "2013-01-10 16:34:05", 
-  "docstatus": 0, 
-  "modified": "2014-01-20 17:48:27", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "autoname": "field:distribution_id", 
-  "description": "**Budget Distribution** helps you distribute your budget across months if you have seasonality in your business.\n\nTo distribute a budget using this distribution, set this **Budget Distribution** in the **Cost Center**", 
-  "doctype": "DocType", 
-  "icon": "icon-bar-chart", 
-  "module": "Accounts", 
-  "name": "__common__", 
-  "name_case": "Title Case"
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "Budget Distribution", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "cancel": 0, 
-  "doctype": "DocPerm", 
-  "name": "__common__", 
-  "parent": "Budget Distribution", 
-  "parentfield": "permissions", 
-  "parenttype": "DocType", 
-  "read": 1, 
-  "report": 1, 
-  "role": "Accounts Manager", 
-  "submit": 0
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Budget Distribution"
- }, 
- {
-  "description": "Name of the Budget Distribution", 
-  "doctype": "DocField", 
-  "fieldname": "distribution_id", 
-  "fieldtype": "Data", 
-  "label": "Distribution Name", 
-  "oldfieldname": "distribution_id", 
-  "oldfieldtype": "Data", 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "fiscal_year", 
-  "fieldtype": "Select", 
-  "in_filter": 1, 
-  "label": "Fiscal Year", 
-  "oldfieldname": "fiscal_year", 
-  "oldfieldtype": "Select", 
-  "options": "link:Fiscal Year", 
-  "search_index": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "budget_distribution_details", 
-  "fieldtype": "Table", 
-  "label": "Budget Distribution Details", 
-  "oldfieldname": "budget_distribution_details", 
-  "oldfieldtype": "Table", 
-  "options": "Budget Distribution Detail"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "trash_reason", 
-  "fieldtype": "Small Text", 
-  "label": "Trash Reason", 
-  "oldfieldname": "trash_reason", 
-  "oldfieldtype": "Small Text", 
-  "read_only": 1
- }, 
- {
-  "amend": 0, 
-  "create": 1, 
-  "delete": 1, 
-  "doctype": "DocPerm", 
-  "email": 1, 
-  "permlevel": 0, 
-  "print": 1, 
-  "write": 1
- }, 
- {
-  "delete": 0, 
-  "doctype": "DocPerm", 
-  "permlevel": 2
- }
-]
\ No newline at end of file
+{
+ "autoname": "field:distribution_id", 
+ "creation": "2013-01-10 16:34:05", 
+ "description": "**Budget Distribution** helps you distribute your budget across months if you have seasonality in your business.\n\nTo distribute a budget using this distribution, set this **Budget Distribution** in the **Cost Center**", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "fields": [
+  {
+   "description": "Name of the Budget Distribution", 
+   "fieldname": "distribution_id", 
+   "fieldtype": "Data", 
+   "label": "Distribution Name", 
+   "oldfieldname": "distribution_id", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "fiscal_year", 
+   "fieldtype": "Select", 
+   "in_filter": 1, 
+   "label": "Fiscal Year", 
+   "oldfieldname": "fiscal_year", 
+   "oldfieldtype": "Select", 
+   "options": "link:Fiscal Year", 
+   "permlevel": 0, 
+   "search_index": 1
+  }, 
+  {
+   "fieldname": "budget_distribution_details", 
+   "fieldtype": "Table", 
+   "label": "Budget Distribution Details", 
+   "oldfieldname": "budget_distribution_details", 
+   "oldfieldtype": "Table", 
+   "options": "Budget Distribution Detail", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "trash_reason", 
+   "fieldtype": "Small Text", 
+   "label": "Trash Reason", 
+   "oldfieldname": "trash_reason", 
+   "oldfieldtype": "Small Text", 
+   "permlevel": 0, 
+   "read_only": 1
+  }
+ ], 
+ "icon": "icon-bar-chart", 
+ "idx": 1, 
+ "modified": "2014-01-20 17:48:27", 
+ "modified_by": "Administrator", 
+ "module": "Accounts", 
+ "name": "Budget Distribution", 
+ "name_case": "Title Case", 
+ "owner": "Administrator", 
+ "permissions": [
+  {
+   "amend": 0, 
+   "cancel": 0, 
+   "create": 1, 
+   "delete": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Accounts Manager", 
+   "submit": 0, 
+   "write": 1
+  }, 
+  {
+   "cancel": 0, 
+   "delete": 0, 
+   "permlevel": 2, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Accounts Manager", 
+   "submit": 0
+  }
+ ]
+}
\ No newline at end of file
diff --git a/erpnext/accounts/doctype/budget_distribution_detail/budget_distribution_detail.txt b/erpnext/accounts/doctype/budget_distribution_detail/budget_distribution_detail.txt
index a171bf6..a36dd17 100644
--- a/erpnext/accounts/doctype/budget_distribution_detail/budget_distribution_detail.txt
+++ b/erpnext/accounts/doctype/budget_distribution_detail/budget_distribution_detail.txt
@@ -1,47 +1,35 @@
-[
- {
-  "creation": "2013-02-22 01:27:38", 
-  "docstatus": 0, 
-  "modified": "2013-12-20 19:22:59", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "autoname": "BDD/.#####", 
-  "doctype": "DocType", 
-  "istable": 1, 
-  "module": "Accounts", 
-  "name": "__common__"
- }, 
- {
-  "doctype": "DocField", 
-  "in_list_view": 1, 
-  "name": "__common__", 
-  "parent": "Budget Distribution Detail", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Budget Distribution Detail"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "month", 
-  "fieldtype": "Data", 
-  "label": "Month", 
-  "oldfieldname": "month", 
-  "oldfieldtype": "Data", 
-  "read_only": 1, 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "percentage_allocation", 
-  "fieldtype": "Float", 
-  "label": "Percentage Allocation", 
-  "oldfieldname": "percentage_allocation", 
-  "oldfieldtype": "Currency"
- }
-]
\ No newline at end of file
+{
+ "autoname": "BDD/.#####", 
+ "creation": "2013-02-22 01:27:38", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "fields": [
+  {
+   "fieldname": "month", 
+   "fieldtype": "Data", 
+   "in_list_view": 1, 
+   "label": "Month", 
+   "oldfieldname": "month", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "read_only": 1, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "percentage_allocation", 
+   "fieldtype": "Float", 
+   "in_list_view": 1, 
+   "label": "Percentage Allocation", 
+   "oldfieldname": "percentage_allocation", 
+   "oldfieldtype": "Currency", 
+   "permlevel": 0
+  }
+ ], 
+ "idx": 1, 
+ "istable": 1, 
+ "modified": "2013-12-20 19:22:59", 
+ "modified_by": "Administrator", 
+ "module": "Accounts", 
+ "name": "Budget Distribution Detail", 
+ "owner": "Administrator"
+}
\ No newline at end of file
diff --git a/erpnext/accounts/doctype/c_form/c_form.txt b/erpnext/accounts/doctype/c_form/c_form.txt
index d5ff32b..6445aee 100644
--- a/erpnext/accounts/doctype/c_form/c_form.txt
+++ b/erpnext/accounts/doctype/c_form/c_form.txt
@@ -1,193 +1,178 @@
-[
- {
-  "creation": "2013-03-07 11:55:06", 
-  "docstatus": 0, 
-  "modified": "2013-12-20 19:23:58", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "allow_attach": 1, 
-  "autoname": "naming_series:", 
-  "doctype": "DocType", 
-  "icon": "icon-file-text", 
-  "is_submittable": 1, 
-  "max_attachments": 3, 
-  "module": "Accounts", 
-  "name": "__common__"
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "C-Form", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "doctype": "DocPerm", 
-  "name": "__common__", 
-  "parent": "C-Form", 
-  "parentfield": "permissions", 
-  "parenttype": "DocType", 
-  "read": 1, 
-  "report": 1, 
-  "submit": 0
- }, 
- {
-  "doctype": "DocType", 
-  "name": "C-Form"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break0", 
-  "fieldtype": "Column Break", 
-  "print_width": "50%", 
-  "read_only": 0, 
-  "width": "50%"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "naming_series", 
-  "fieldtype": "Select", 
-  "label": "Series", 
-  "options": "\nC-FORM/", 
-  "read_only": 0, 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "c_form_no", 
-  "fieldtype": "Data", 
-  "label": "C-Form No", 
-  "read_only": 0, 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "received_date", 
-  "fieldtype": "Date", 
-  "label": "Received Date", 
-  "read_only": 0, 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "customer", 
-  "fieldtype": "Link", 
-  "label": "Customer", 
-  "options": "Customer", 
-  "read_only": 0, 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break1", 
-  "fieldtype": "Column Break", 
-  "print_width": "50%", 
-  "read_only": 0, 
-  "width": "50%"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "company", 
-  "fieldtype": "Select", 
-  "label": "Company", 
-  "options": "link:Company", 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "fiscal_year", 
-  "fieldtype": "Select", 
-  "label": "Fiscal Year", 
-  "options": "link:Fiscal Year", 
-  "read_only": 0, 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "quarter", 
-  "fieldtype": "Select", 
-  "label": "Quarter", 
-  "options": "\nI\nII\nIII\nIV", 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "total_amount", 
-  "fieldtype": "Currency", 
-  "label": "Total Amount", 
-  "options": "Company:company:default_currency", 
-  "read_only": 0, 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "state", 
-  "fieldtype": "Data", 
-  "label": "State", 
-  "read_only": 0, 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "section_break0", 
-  "fieldtype": "Section Break", 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "invoice_details", 
-  "fieldtype": "Table", 
-  "label": "Invoice Details", 
-  "options": "C-Form Invoice Detail", 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "total_invoiced_amount", 
-  "fieldtype": "Currency", 
-  "label": "Total Invoiced Amount", 
-  "options": "Company:company:default_currency", 
-  "print_hide": 0, 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "amended_from", 
-  "fieldtype": "Link", 
-  "ignore_restrictions": 1, 
-  "label": "Amended From", 
-  "no_copy": 1, 
-  "options": "C-Form", 
-  "print_hide": 1, 
-  "read_only": 1
- }, 
- {
-  "create": 1, 
-  "doctype": "DocPerm", 
-  "email": 1, 
-  "permlevel": 0, 
-  "print": 1, 
-  "role": "Accounts User", 
-  "write": 1
- }, 
- {
-  "create": 1, 
-  "doctype": "DocPerm", 
-  "email": 1, 
-  "permlevel": 0, 
-  "print": 1, 
-  "role": "Accounts Manager", 
-  "write": 1
- }, 
- {
-  "amend": 0, 
-  "cancel": 0, 
-  "create": 0, 
-  "doctype": "DocPerm", 
-  "permlevel": 1, 
-  "role": "All"
- }
-]
\ No newline at end of file
+{
+ "allow_attach": 1, 
+ "autoname": "naming_series:", 
+ "creation": "2013-03-07 11:55:06", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "fields": [
+  {
+   "fieldname": "column_break0", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0, 
+   "print_width": "50%", 
+   "read_only": 0, 
+   "width": "50%"
+  }, 
+  {
+   "fieldname": "naming_series", 
+   "fieldtype": "Select", 
+   "label": "Series", 
+   "options": "\nC-FORM/", 
+   "permlevel": 0, 
+   "read_only": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "c_form_no", 
+   "fieldtype": "Data", 
+   "label": "C-Form No", 
+   "permlevel": 0, 
+   "read_only": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "received_date", 
+   "fieldtype": "Date", 
+   "label": "Received Date", 
+   "permlevel": 0, 
+   "read_only": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "customer", 
+   "fieldtype": "Link", 
+   "label": "Customer", 
+   "options": "Customer", 
+   "permlevel": 0, 
+   "read_only": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "column_break1", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0, 
+   "print_width": "50%", 
+   "read_only": 0, 
+   "width": "50%"
+  }, 
+  {
+   "fieldname": "company", 
+   "fieldtype": "Select", 
+   "label": "Company", 
+   "options": "link:Company", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "fiscal_year", 
+   "fieldtype": "Select", 
+   "label": "Fiscal Year", 
+   "options": "link:Fiscal Year", 
+   "permlevel": 0, 
+   "read_only": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "quarter", 
+   "fieldtype": "Select", 
+   "label": "Quarter", 
+   "options": "\nI\nII\nIII\nIV", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "total_amount", 
+   "fieldtype": "Currency", 
+   "label": "Total Amount", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "read_only": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "state", 
+   "fieldtype": "Data", 
+   "label": "State", 
+   "permlevel": 0, 
+   "read_only": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "section_break0", 
+   "fieldtype": "Section Break", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "invoice_details", 
+   "fieldtype": "Table", 
+   "label": "Invoice Details", 
+   "options": "C-Form Invoice Detail", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "total_invoiced_amount", 
+   "fieldtype": "Currency", 
+   "label": "Total Invoiced Amount", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "print_hide": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "amended_from", 
+   "fieldtype": "Link", 
+   "ignore_restrictions": 1, 
+   "label": "Amended From", 
+   "no_copy": 1, 
+   "options": "C-Form", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1
+  }
+ ], 
+ "icon": "icon-file-text", 
+ "idx": 1, 
+ "is_submittable": 1, 
+ "max_attachments": 3, 
+ "modified": "2013-12-20 19:23:58", 
+ "modified_by": "Administrator", 
+ "module": "Accounts", 
+ "name": "C-Form", 
+ "owner": "Administrator", 
+ "permissions": [
+  {
+   "create": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Accounts User", 
+   "submit": 0, 
+   "write": 1
+  }, 
+  {
+   "create": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Accounts Manager", 
+   "submit": 0, 
+   "write": 1
+  }, 
+  {
+   "amend": 0, 
+   "cancel": 0, 
+   "create": 0, 
+   "permlevel": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "All", 
+   "submit": 0
+  }
+ ]
+}
\ No newline at end of file
diff --git a/erpnext/accounts/doctype/c_form_invoice_detail/c_form_invoice_detail.txt b/erpnext/accounts/doctype/c_form_invoice_detail/c_form_invoice_detail.txt
index 77dfa72..97eef30 100644
--- a/erpnext/accounts/doctype/c_form_invoice_detail/c_form_invoice_detail.txt
+++ b/erpnext/accounts/doctype/c_form_invoice_detail/c_form_invoice_detail.txt
@@ -1,77 +1,68 @@
-[
- {
-  "creation": "2013-02-22 01:27:38", 
-  "docstatus": 0, 
-  "modified": "2013-12-20 19:23:00", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "doctype": "DocType", 
-  "istable": 1, 
-  "module": "Accounts", 
-  "name": "__common__"
- }, 
- {
-  "doctype": "DocField", 
-  "in_list_view": 1, 
-  "name": "__common__", 
-  "parent": "C-Form Invoice Detail", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "doctype": "DocType", 
-  "name": "C-Form Invoice Detail"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "invoice_no", 
-  "fieldtype": "Link", 
-  "label": "Invoice No", 
-  "options": "Sales Invoice", 
-  "print_width": "160px", 
-  "width": "160px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "invoice_date", 
-  "fieldtype": "Date", 
-  "label": "Invoice Date", 
-  "print_width": "120px", 
-  "read_only": 1, 
-  "width": "120px"
- }, 
- {
-  "description": "<a href=\"#Sales Browser/Territory\">Add / Edit</a>", 
-  "doctype": "DocField", 
-  "fieldname": "territory", 
-  "fieldtype": "Link", 
-  "label": "Territory", 
-  "options": "Territory", 
-  "print_width": "120px", 
-  "read_only": 1, 
-  "width": "120px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "net_total", 
-  "fieldtype": "Currency", 
-  "label": "Net Total", 
-  "options": "Company:company:default_currency", 
-  "print_width": "120px", 
-  "read_only": 1, 
-  "width": "120px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "grand_total", 
-  "fieldtype": "Currency", 
-  "label": "Grand Total", 
-  "options": "Company:company:default_currency", 
-  "print_width": "120px", 
-  "read_only": 1, 
-  "width": "120px"
- }
-]
\ No newline at end of file
+{
+ "creation": "2013-02-22 01:27:38", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "fields": [
+  {
+   "fieldname": "invoice_no", 
+   "fieldtype": "Link", 
+   "in_list_view": 1, 
+   "label": "Invoice No", 
+   "options": "Sales Invoice", 
+   "permlevel": 0, 
+   "print_width": "160px", 
+   "width": "160px"
+  }, 
+  {
+   "fieldname": "invoice_date", 
+   "fieldtype": "Date", 
+   "in_list_view": 1, 
+   "label": "Invoice Date", 
+   "permlevel": 0, 
+   "print_width": "120px", 
+   "read_only": 1, 
+   "width": "120px"
+  }, 
+  {
+   "description": "<a href=\"#Sales Browser/Territory\">Add / Edit</a>", 
+   "fieldname": "territory", 
+   "fieldtype": "Link", 
+   "in_list_view": 1, 
+   "label": "Territory", 
+   "options": "Territory", 
+   "permlevel": 0, 
+   "print_width": "120px", 
+   "read_only": 1, 
+   "width": "120px"
+  }, 
+  {
+   "fieldname": "net_total", 
+   "fieldtype": "Currency", 
+   "in_list_view": 1, 
+   "label": "Net Total", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "print_width": "120px", 
+   "read_only": 1, 
+   "width": "120px"
+  }, 
+  {
+   "fieldname": "grand_total", 
+   "fieldtype": "Currency", 
+   "in_list_view": 1, 
+   "label": "Grand Total", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "print_width": "120px", 
+   "read_only": 1, 
+   "width": "120px"
+  }
+ ], 
+ "idx": 1, 
+ "istable": 1, 
+ "modified": "2013-12-20 19:23:00", 
+ "modified_by": "Administrator", 
+ "module": "Accounts", 
+ "name": "C-Form Invoice Detail", 
+ "owner": "Administrator"
+}
\ No newline at end of file
diff --git a/erpnext/accounts/doctype/chart_of_accounts/chart_of_accounts.txt b/erpnext/accounts/doctype/chart_of_accounts/chart_of_accounts.txt
index fc2a742..4be1e9d 100644
--- a/erpnext/accounts/doctype/chart_of_accounts/chart_of_accounts.txt
+++ b/erpnext/accounts/doctype/chart_of_accounts/chart_of_accounts.txt
@@ -1,78 +1,59 @@
-[
- {
-  "creation": "2014-03-05 14:11:31", 
-  "docstatus": 0, 
-  "modified": "2014-03-05 14:51:05", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "autoname": "field:chart_name", 
-  "description": "Financial Chart of Accounts. Imported from file.", 
-  "doctype": "DocType", 
-  "document_type": "Master", 
-  "in_create": 1, 
-  "module": "Accounts", 
-  "name": "__common__"
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "Chart of Accounts", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "doctype": "DocPerm", 
-  "export": 0, 
-  "name": "__common__", 
-  "parent": "Chart of Accounts", 
-  "parentfield": "permissions", 
-  "parenttype": "DocType", 
-  "permlevel": 0, 
-  "print": 1, 
-  "read": 1, 
-  "report": 1, 
-  "role": "Accounts Manager"
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Chart of Accounts"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "chart_name", 
-  "fieldtype": "Data", 
-  "in_list_view": 0, 
-  "label": "Chart Name", 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "country", 
-  "fieldtype": "Link", 
-  "in_list_view": 1, 
-  "label": "Country", 
-  "options": "Country", 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "preview", 
-  "fieldtype": "HTML", 
-  "label": "Preview"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "source_file", 
-  "fieldtype": "Data", 
-  "hidden": 1, 
-  "label": "Source File", 
-  "read_only": 1, 
-  "reqd": 0
- }, 
- {
-  "doctype": "DocPerm"
- }
-]
\ No newline at end of file
+{
+ "autoname": "field:chart_name", 
+ "creation": "2014-03-05 14:11:31", 
+ "description": "Financial Chart of Accounts. Imported from file.", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "document_type": "Master", 
+ "fields": [
+  {
+   "fieldname": "chart_name", 
+   "fieldtype": "Data", 
+   "in_list_view": 0, 
+   "label": "Chart Name", 
+   "permlevel": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "country", 
+   "fieldtype": "Link", 
+   "in_list_view": 1, 
+   "label": "Country", 
+   "options": "Country", 
+   "permlevel": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "preview", 
+   "fieldtype": "HTML", 
+   "label": "Preview", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "source_file", 
+   "fieldtype": "Data", 
+   "hidden": 1, 
+   "label": "Source File", 
+   "permlevel": 0, 
+   "read_only": 1, 
+   "reqd": 0
+  }
+ ], 
+ "idx": 1, 
+ "in_create": 1, 
+ "modified": "2014-03-05 14:51:05", 
+ "modified_by": "Administrator", 
+ "module": "Accounts", 
+ "name": "Chart of Accounts", 
+ "owner": "Administrator", 
+ "permissions": [
+  {
+   "export": 0, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Accounts Manager"
+  }
+ ]
+}
\ No newline at end of file
diff --git a/erpnext/accounts/doctype/cost_center/cost_center.txt b/erpnext/accounts/doctype/cost_center/cost_center.txt
index 66864bc..8201d34 100644
--- a/erpnext/accounts/doctype/cost_center/cost_center.txt
+++ b/erpnext/accounts/doctype/cost_center/cost_center.txt
@@ -1,202 +1,190 @@
-[
- {
-  "creation": "2013-01-23 19:57:17", 
-  "docstatus": 0, 
-  "modified": "2014-01-20 17:48:30", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "allow_copy": 1, 
-  "allow_import": 1, 
-  "allow_rename": 1, 
-  "autoname": "field:cost_center_name", 
-  "description": "Track separate Income and Expense for product verticals or divisions.", 
-  "doctype": "DocType", 
-  "document_type": "Master", 
-  "icon": "icon-money", 
-  "in_create": 1, 
-  "module": "Accounts", 
-  "name": "__common__", 
-  "search_fields": "name,parent_cost_center"
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "Cost Center", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "amend": 0, 
-  "cancel": 0, 
-  "doctype": "DocPerm", 
-  "email": 1, 
-  "name": "__common__", 
-  "parent": "Cost Center", 
-  "parentfield": "permissions", 
-  "parenttype": "DocType", 
-  "permlevel": 0, 
-  "print": 1, 
-  "read": 1, 
-  "report": 1, 
-  "submit": 0
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Cost Center"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "sb0", 
-  "fieldtype": "Section Break", 
-  "label": "Cost Center Details"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "trash_reason", 
-  "fieldtype": "Small Text", 
-  "label": "Trash Reason", 
-  "oldfieldname": "trash_reason", 
-  "oldfieldtype": "Small Text", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "cost_center_name", 
-  "fieldtype": "Data", 
-  "in_filter": 0, 
-  "label": "Cost Center Name", 
-  "no_copy": 1, 
-  "oldfieldname": "cost_center_name", 
-  "oldfieldtype": "Data", 
-  "reqd": 1, 
-  "search_index": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "parent_cost_center", 
-  "fieldtype": "Link", 
-  "ignore_restrictions": 1, 
-  "label": "Parent Cost Center", 
-  "oldfieldname": "parent_cost_center", 
-  "oldfieldtype": "Link", 
-  "options": "Cost Center", 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "company", 
-  "fieldtype": "Link", 
-  "label": "Company", 
-  "oldfieldname": "company_name", 
-  "oldfieldtype": "Link", 
-  "options": "Company", 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "cb0", 
-  "fieldtype": "Column Break", 
-  "width": "50%"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "group_or_ledger", 
-  "fieldtype": "Select", 
-  "hidden": 0, 
-  "label": "Group or Ledger", 
-  "no_copy": 1, 
-  "oldfieldname": "group_or_ledger", 
-  "oldfieldtype": "Select", 
-  "options": "\nGroup\nLedger", 
-  "print_hide": 1, 
-  "report_hide": 1, 
-  "reqd": 1
- }, 
- {
-  "description": "Define Budget for this Cost Center. To set budget action, see <a href=\"#!List/Company\">Company Master</a>", 
-  "doctype": "DocField", 
-  "fieldname": "sb1", 
-  "fieldtype": "Section Break", 
-  "label": "Budget"
- }, 
- {
-  "description": "Select Budget Distribution, if you want to track based on seasonality.", 
-  "doctype": "DocField", 
-  "fieldname": "distribution_id", 
-  "fieldtype": "Link", 
-  "label": "Distribution Id", 
-  "oldfieldname": "distribution_id", 
-  "oldfieldtype": "Link", 
-  "options": "Budget Distribution"
- }, 
- {
-  "description": "Add rows to set annual budgets on Accounts.", 
-  "doctype": "DocField", 
-  "fieldname": "budget_details", 
-  "fieldtype": "Table", 
-  "label": "Budget Details", 
-  "oldfieldname": "budget_details", 
-  "oldfieldtype": "Table", 
-  "options": "Budget Detail"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "lft", 
-  "fieldtype": "Int", 
-  "hidden": 1, 
-  "in_filter": 1, 
-  "label": "lft", 
-  "no_copy": 1, 
-  "oldfieldname": "lft", 
-  "oldfieldtype": "Int", 
-  "print_hide": 1, 
-  "report_hide": 1, 
-  "search_index": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "rgt", 
-  "fieldtype": "Int", 
-  "hidden": 1, 
-  "in_filter": 1, 
-  "label": "rgt", 
-  "no_copy": 1, 
-  "oldfieldname": "rgt", 
-  "oldfieldtype": "Int", 
-  "print_hide": 1, 
-  "report_hide": 1, 
-  "reqd": 0, 
-  "search_index": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "old_parent", 
-  "fieldtype": "Link", 
-  "hidden": 1, 
-  "ignore_restrictions": 1, 
-  "label": "old_parent", 
-  "no_copy": 1, 
-  "oldfieldname": "old_parent", 
-  "oldfieldtype": "Data", 
-  "options": "Cost Center", 
-  "print_hide": 1, 
-  "report_hide": 1
- }, 
- {
-  "create": 1, 
-  "delete": 1, 
-  "doctype": "DocPerm", 
-  "role": "Accounts Manager", 
-  "write": 1
- }, 
- {
-  "create": 0, 
-  "delete": 0, 
-  "doctype": "DocPerm", 
-  "role": "Accounts User", 
-  "write": 0
- }
-]
\ No newline at end of file
+{
+ "allow_copy": 1, 
+ "allow_import": 1, 
+ "allow_rename": 1, 
+ "autoname": "field:cost_center_name", 
+ "creation": "2013-01-23 19:57:17", 
+ "description": "Track separate Income and Expense for product verticals or divisions.", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "document_type": "Master", 
+ "fields": [
+  {
+   "fieldname": "sb0", 
+   "fieldtype": "Section Break", 
+   "label": "Cost Center Details", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "trash_reason", 
+   "fieldtype": "Small Text", 
+   "label": "Trash Reason", 
+   "oldfieldname": "trash_reason", 
+   "oldfieldtype": "Small Text", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "cost_center_name", 
+   "fieldtype": "Data", 
+   "in_filter": 0, 
+   "label": "Cost Center Name", 
+   "no_copy": 1, 
+   "oldfieldname": "cost_center_name", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "reqd": 1, 
+   "search_index": 0
+  }, 
+  {
+   "fieldname": "parent_cost_center", 
+   "fieldtype": "Link", 
+   "ignore_restrictions": 1, 
+   "label": "Parent Cost Center", 
+   "oldfieldname": "parent_cost_center", 
+   "oldfieldtype": "Link", 
+   "options": "Cost Center", 
+   "permlevel": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "company", 
+   "fieldtype": "Link", 
+   "label": "Company", 
+   "oldfieldname": "company_name", 
+   "oldfieldtype": "Link", 
+   "options": "Company", 
+   "permlevel": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "cb0", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0, 
+   "width": "50%"
+  }, 
+  {
+   "fieldname": "group_or_ledger", 
+   "fieldtype": "Select", 
+   "hidden": 0, 
+   "label": "Group or Ledger", 
+   "no_copy": 1, 
+   "oldfieldname": "group_or_ledger", 
+   "oldfieldtype": "Select", 
+   "options": "\nGroup\nLedger", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "report_hide": 1, 
+   "reqd": 1
+  }, 
+  {
+   "description": "Define Budget for this Cost Center. To set budget action, see <a href=\"#!List/Company\">Company Master</a>", 
+   "fieldname": "sb1", 
+   "fieldtype": "Section Break", 
+   "label": "Budget", 
+   "permlevel": 0
+  }, 
+  {
+   "description": "Select Budget Distribution, if you want to track based on seasonality.", 
+   "fieldname": "distribution_id", 
+   "fieldtype": "Link", 
+   "label": "Distribution Id", 
+   "oldfieldname": "distribution_id", 
+   "oldfieldtype": "Link", 
+   "options": "Budget Distribution", 
+   "permlevel": 0
+  }, 
+  {
+   "description": "Add rows to set annual budgets on Accounts.", 
+   "fieldname": "budget_details", 
+   "fieldtype": "Table", 
+   "label": "Budget Details", 
+   "oldfieldname": "budget_details", 
+   "oldfieldtype": "Table", 
+   "options": "Budget Detail", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "lft", 
+   "fieldtype": "Int", 
+   "hidden": 1, 
+   "in_filter": 1, 
+   "label": "lft", 
+   "no_copy": 1, 
+   "oldfieldname": "lft", 
+   "oldfieldtype": "Int", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "report_hide": 1, 
+   "search_index": 1
+  }, 
+  {
+   "fieldname": "rgt", 
+   "fieldtype": "Int", 
+   "hidden": 1, 
+   "in_filter": 1, 
+   "label": "rgt", 
+   "no_copy": 1, 
+   "oldfieldname": "rgt", 
+   "oldfieldtype": "Int", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "report_hide": 1, 
+   "reqd": 0, 
+   "search_index": 1
+  }, 
+  {
+   "fieldname": "old_parent", 
+   "fieldtype": "Link", 
+   "hidden": 1, 
+   "ignore_restrictions": 1, 
+   "label": "old_parent", 
+   "no_copy": 1, 
+   "oldfieldname": "old_parent", 
+   "oldfieldtype": "Data", 
+   "options": "Cost Center", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "report_hide": 1
+  }
+ ], 
+ "icon": "icon-money", 
+ "idx": 1, 
+ "in_create": 1, 
+ "modified": "2014-01-20 17:48:30", 
+ "modified_by": "Administrator", 
+ "module": "Accounts", 
+ "name": "Cost Center", 
+ "owner": "Administrator", 
+ "permissions": [
+  {
+   "amend": 0, 
+   "cancel": 0, 
+   "create": 1, 
+   "delete": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Accounts Manager", 
+   "submit": 0, 
+   "write": 1
+  }, 
+  {
+   "amend": 0, 
+   "cancel": 0, 
+   "create": 0, 
+   "delete": 0, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Accounts User", 
+   "submit": 0, 
+   "write": 0
+  }
+ ], 
+ "search_fields": "name,parent_cost_center"
+}
\ No newline at end of file
diff --git a/erpnext/accounts/doctype/fiscal_year/fiscal_year.txt b/erpnext/accounts/doctype/fiscal_year/fiscal_year.txt
index 27fac8d..639b276 100644
--- a/erpnext/accounts/doctype/fiscal_year/fiscal_year.txt
+++ b/erpnext/accounts/doctype/fiscal_year/fiscal_year.txt
@@ -1,98 +1,82 @@
-[
- {
-  "creation": "2013-01-22 16:50:25", 
-  "docstatus": 0, 
-  "modified": "2014-01-20 17:48:46", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "allow_import": 1, 
-  "autoname": "field:year", 
-  "description": "**Fiscal Year** represents a Financial Year. All accounting entries and other major transactions are tracked against **Fiscal Year**.", 
-  "doctype": "DocType", 
-  "document_type": "Master", 
-  "icon": "icon-calendar", 
-  "module": "Accounts", 
-  "name": "__common__"
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "Fiscal Year", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "doctype": "DocPerm", 
-  "email": 1, 
-  "name": "__common__", 
-  "parent": "Fiscal Year", 
-  "parentfield": "permissions", 
-  "parenttype": "DocType", 
-  "permlevel": 0, 
-  "print": 1, 
-  "read": 1
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Fiscal Year"
- }, 
- {
-  "description": "For e.g. 2012, 2012-13", 
-  "doctype": "DocField", 
-  "fieldname": "year", 
-  "fieldtype": "Data", 
-  "label": "Year Name", 
-  "oldfieldname": "year", 
-  "oldfieldtype": "Data", 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "year_start_date", 
-  "fieldtype": "Date", 
-  "label": "Year Start Date", 
-  "no_copy": 1, 
-  "oldfieldname": "year_start_date", 
-  "oldfieldtype": "Date", 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "year_end_date", 
-  "fieldtype": "Date", 
-  "label": "Year End Date", 
-  "no_copy": 1, 
-  "reqd": 1
- }, 
- {
-  "default": "No", 
-  "description": "Entries are not allowed against this Fiscal Year if the year is closed.", 
-  "doctype": "DocField", 
-  "fieldname": "is_fiscal_year_closed", 
-  "fieldtype": "Select", 
-  "label": "Year Closed", 
-  "no_copy": 1, 
-  "oldfieldname": "is_fiscal_year_closed", 
-  "oldfieldtype": "Select", 
-  "options": "\nNo\nYes", 
-  "reqd": 0
- }, 
- {
-  "cancel": 0, 
-  "create": 1, 
-  "delete": 1, 
-  "doctype": "DocPerm", 
-  "report": 1, 
-  "role": "System Manager", 
-  "submit": 0, 
-  "write": 1
- }, 
- {
-  "delete": 0, 
-  "doctype": "DocPerm", 
-  "role": "All"
- }
-]
\ No newline at end of file
+{
+ "allow_import": 1, 
+ "autoname": "field:year", 
+ "creation": "2013-01-22 16:50:25", 
+ "description": "**Fiscal Year** represents a Financial Year. All accounting entries and other major transactions are tracked against **Fiscal Year**.", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "document_type": "Master", 
+ "fields": [
+  {
+   "description": "For e.g. 2012, 2012-13", 
+   "fieldname": "year", 
+   "fieldtype": "Data", 
+   "label": "Year Name", 
+   "oldfieldname": "year", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "year_start_date", 
+   "fieldtype": "Date", 
+   "label": "Year Start Date", 
+   "no_copy": 1, 
+   "oldfieldname": "year_start_date", 
+   "oldfieldtype": "Date", 
+   "permlevel": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "year_end_date", 
+   "fieldtype": "Date", 
+   "label": "Year End Date", 
+   "no_copy": 1, 
+   "permlevel": 0, 
+   "reqd": 1
+  }, 
+  {
+   "default": "No", 
+   "description": "Entries are not allowed against this Fiscal Year if the year is closed.", 
+   "fieldname": "is_fiscal_year_closed", 
+   "fieldtype": "Select", 
+   "label": "Year Closed", 
+   "no_copy": 1, 
+   "oldfieldname": "is_fiscal_year_closed", 
+   "oldfieldtype": "Select", 
+   "options": "\nNo\nYes", 
+   "permlevel": 0, 
+   "reqd": 0
+  }
+ ], 
+ "icon": "icon-calendar", 
+ "idx": 1, 
+ "modified": "2014-01-20 17:48:46", 
+ "modified_by": "Administrator", 
+ "module": "Accounts", 
+ "name": "Fiscal Year", 
+ "owner": "Administrator", 
+ "permissions": [
+  {
+   "cancel": 0, 
+   "create": 1, 
+   "delete": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "System Manager", 
+   "submit": 0, 
+   "write": 1
+  }, 
+  {
+   "delete": 0, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "role": "All"
+  }
+ ]
+}
\ No newline at end of file
diff --git a/erpnext/accounts/doctype/gl_entry/gl_entry.txt b/erpnext/accounts/doctype/gl_entry/gl_entry.txt
index 3ec5ec6..66c9f6c 100644
--- a/erpnext/accounts/doctype/gl_entry/gl_entry.txt
+++ b/erpnext/accounts/doctype/gl_entry/gl_entry.txt
@@ -1,234 +1,229 @@
-[
- {
-  "creation": "2013-01-10 16:34:06", 
-  "docstatus": 0, 
-  "modified": "2013-12-20 19:24:08", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "autoname": "GL.#######", 
-  "doctype": "DocType", 
-  "icon": "icon-list", 
-  "in_create": 1, 
-  "module": "Accounts", 
-  "name": "__common__", 
-  "search_fields": "voucher_no,account,posting_date,against_voucher"
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "GL Entry", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "create": 0, 
-  "doctype": "DocPerm", 
-  "email": 1, 
-  "name": "__common__", 
-  "parent": "GL Entry", 
-  "parentfield": "permissions", 
-  "parenttype": "DocType", 
-  "permlevel": 0, 
-  "print": 1, 
-  "read": 1, 
-  "report": 1, 
-  "submit": 0, 
-  "write": 0
- }, 
- {
-  "doctype": "DocType", 
-  "name": "GL Entry"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "posting_date", 
-  "fieldtype": "Date", 
-  "in_filter": 1, 
-  "label": "Posting Date", 
-  "oldfieldname": "posting_date", 
-  "oldfieldtype": "Date", 
-  "search_index": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "transaction_date", 
-  "fieldtype": "Date", 
-  "label": "Transaction Date", 
-  "oldfieldname": "transaction_date", 
-  "oldfieldtype": "Date"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "aging_date", 
-  "fieldtype": "Date", 
-  "in_filter": 1, 
-  "label": "Aging Date", 
-  "oldfieldname": "aging_date", 
-  "oldfieldtype": "Date", 
-  "search_index": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "account", 
-  "fieldtype": "Link", 
-  "in_filter": 1, 
-  "label": "Account", 
-  "oldfieldname": "account", 
-  "oldfieldtype": "Link", 
-  "options": "Account", 
-  "search_index": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "cost_center", 
-  "fieldtype": "Link", 
-  "in_filter": 1, 
-  "label": "Cost Center", 
-  "oldfieldname": "cost_center", 
-  "oldfieldtype": "Link", 
-  "options": "Cost Center", 
-  "search_index": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "debit", 
-  "fieldtype": "Currency", 
-  "label": "Debit Amt", 
-  "oldfieldname": "debit", 
-  "oldfieldtype": "Currency", 
-  "options": "Company:company:default_currency"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "credit", 
-  "fieldtype": "Currency", 
-  "label": "Credit Amt", 
-  "oldfieldname": "credit", 
-  "oldfieldtype": "Currency", 
-  "options": "Company:company:default_currency"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "against", 
-  "fieldtype": "Text", 
-  "in_filter": 1, 
-  "label": "Against", 
-  "oldfieldname": "against", 
-  "oldfieldtype": "Text"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "against_voucher", 
-  "fieldtype": "Data", 
-  "in_filter": 1, 
-  "label": "Against Voucher", 
-  "oldfieldname": "against_voucher", 
-  "oldfieldtype": "Data", 
-  "search_index": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "against_voucher_type", 
-  "fieldtype": "Data", 
-  "in_filter": 0, 
-  "label": "Against Voucher Type", 
-  "oldfieldname": "against_voucher_type", 
-  "oldfieldtype": "Data", 
-  "search_index": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "voucher_type", 
-  "fieldtype": "Select", 
-  "in_filter": 1, 
-  "label": "Voucher Type", 
-  "oldfieldname": "voucher_type", 
-  "oldfieldtype": "Select", 
-  "options": "Journal Voucher\nSales Invoice\nPurchase Invoice", 
-  "search_index": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "voucher_no", 
-  "fieldtype": "Data", 
-  "in_filter": 1, 
-  "label": "Voucher No", 
-  "oldfieldname": "voucher_no", 
-  "oldfieldtype": "Data", 
-  "search_index": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "remarks", 
-  "fieldtype": "Text", 
-  "in_filter": 1, 
-  "label": "Remarks", 
-  "no_copy": 1, 
-  "oldfieldname": "remarks", 
-  "oldfieldtype": "Text", 
-  "search_index": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "is_opening", 
-  "fieldtype": "Select", 
-  "in_filter": 1, 
-  "label": "Is Opening", 
-  "oldfieldname": "is_opening", 
-  "oldfieldtype": "Select", 
-  "options": "No\nYes", 
-  "search_index": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "is_advance", 
-  "fieldtype": "Select", 
-  "in_filter": 0, 
-  "label": "Is Advance", 
-  "oldfieldname": "is_advance", 
-  "oldfieldtype": "Select", 
-  "options": "No\nYes", 
-  "search_index": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "fiscal_year", 
-  "fieldtype": "Select", 
-  "in_filter": 1, 
-  "label": "Fiscal Year", 
-  "oldfieldname": "fiscal_year", 
-  "oldfieldtype": "Select", 
-  "options": "link:Fiscal Year", 
-  "search_index": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "company", 
-  "fieldtype": "Link", 
-  "in_filter": 1, 
-  "label": "Company", 
-  "oldfieldname": "company", 
-  "oldfieldtype": "Link", 
-  "options": "Company", 
-  "search_index": 0
- }, 
- {
-  "amend": 0, 
-  "cancel": 0, 
-  "doctype": "DocPerm", 
-  "role": "Accounts User"
- }, 
- {
-  "amend": 0, 
-  "cancel": 0, 
-  "doctype": "DocPerm", 
-  "role": "Accounts Manager"
- }, 
- {
-  "doctype": "DocPerm", 
-  "role": "System Manager"
- }
-]
\ No newline at end of file
+{
+ "autoname": "GL.#######", 
+ "creation": "2013-01-10 16:34:06", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "fields": [
+  {
+   "fieldname": "posting_date", 
+   "fieldtype": "Date", 
+   "in_filter": 1, 
+   "label": "Posting Date", 
+   "oldfieldname": "posting_date", 
+   "oldfieldtype": "Date", 
+   "permlevel": 0, 
+   "search_index": 1
+  }, 
+  {
+   "fieldname": "transaction_date", 
+   "fieldtype": "Date", 
+   "label": "Transaction Date", 
+   "oldfieldname": "transaction_date", 
+   "oldfieldtype": "Date", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "aging_date", 
+   "fieldtype": "Date", 
+   "in_filter": 1, 
+   "label": "Aging Date", 
+   "oldfieldname": "aging_date", 
+   "oldfieldtype": "Date", 
+   "permlevel": 0, 
+   "search_index": 0
+  }, 
+  {
+   "fieldname": "account", 
+   "fieldtype": "Link", 
+   "in_filter": 1, 
+   "label": "Account", 
+   "oldfieldname": "account", 
+   "oldfieldtype": "Link", 
+   "options": "Account", 
+   "permlevel": 0, 
+   "search_index": 1
+  }, 
+  {
+   "fieldname": "cost_center", 
+   "fieldtype": "Link", 
+   "in_filter": 1, 
+   "label": "Cost Center", 
+   "oldfieldname": "cost_center", 
+   "oldfieldtype": "Link", 
+   "options": "Cost Center", 
+   "permlevel": 0, 
+   "search_index": 0
+  }, 
+  {
+   "fieldname": "debit", 
+   "fieldtype": "Currency", 
+   "label": "Debit Amt", 
+   "oldfieldname": "debit", 
+   "oldfieldtype": "Currency", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "credit", 
+   "fieldtype": "Currency", 
+   "label": "Credit Amt", 
+   "oldfieldname": "credit", 
+   "oldfieldtype": "Currency", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "against", 
+   "fieldtype": "Text", 
+   "in_filter": 1, 
+   "label": "Against", 
+   "oldfieldname": "against", 
+   "oldfieldtype": "Text", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "against_voucher", 
+   "fieldtype": "Data", 
+   "in_filter": 1, 
+   "label": "Against Voucher", 
+   "oldfieldname": "against_voucher", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "search_index": 0
+  }, 
+  {
+   "fieldname": "against_voucher_type", 
+   "fieldtype": "Data", 
+   "in_filter": 0, 
+   "label": "Against Voucher Type", 
+   "oldfieldname": "against_voucher_type", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "search_index": 0
+  }, 
+  {
+   "fieldname": "voucher_type", 
+   "fieldtype": "Select", 
+   "in_filter": 1, 
+   "label": "Voucher Type", 
+   "oldfieldname": "voucher_type", 
+   "oldfieldtype": "Select", 
+   "options": "Journal Voucher\nSales Invoice\nPurchase Invoice", 
+   "permlevel": 0, 
+   "search_index": 0
+  }, 
+  {
+   "fieldname": "voucher_no", 
+   "fieldtype": "Data", 
+   "in_filter": 1, 
+   "label": "Voucher No", 
+   "oldfieldname": "voucher_no", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "search_index": 1
+  }, 
+  {
+   "fieldname": "remarks", 
+   "fieldtype": "Text", 
+   "in_filter": 1, 
+   "label": "Remarks", 
+   "no_copy": 1, 
+   "oldfieldname": "remarks", 
+   "oldfieldtype": "Text", 
+   "permlevel": 0, 
+   "search_index": 0
+  }, 
+  {
+   "fieldname": "is_opening", 
+   "fieldtype": "Select", 
+   "in_filter": 1, 
+   "label": "Is Opening", 
+   "oldfieldname": "is_opening", 
+   "oldfieldtype": "Select", 
+   "options": "No\nYes", 
+   "permlevel": 0, 
+   "search_index": 0
+  }, 
+  {
+   "fieldname": "is_advance", 
+   "fieldtype": "Select", 
+   "in_filter": 0, 
+   "label": "Is Advance", 
+   "oldfieldname": "is_advance", 
+   "oldfieldtype": "Select", 
+   "options": "No\nYes", 
+   "permlevel": 0, 
+   "search_index": 0
+  }, 
+  {
+   "fieldname": "fiscal_year", 
+   "fieldtype": "Select", 
+   "in_filter": 1, 
+   "label": "Fiscal Year", 
+   "oldfieldname": "fiscal_year", 
+   "oldfieldtype": "Select", 
+   "options": "link:Fiscal Year", 
+   "permlevel": 0, 
+   "search_index": 0
+  }, 
+  {
+   "fieldname": "company", 
+   "fieldtype": "Link", 
+   "in_filter": 1, 
+   "label": "Company", 
+   "oldfieldname": "company", 
+   "oldfieldtype": "Link", 
+   "options": "Company", 
+   "permlevel": 0, 
+   "search_index": 0
+  }
+ ], 
+ "icon": "icon-list", 
+ "idx": 1, 
+ "in_create": 1, 
+ "modified": "2013-12-20 19:24:08", 
+ "modified_by": "Administrator", 
+ "module": "Accounts", 
+ "name": "GL Entry", 
+ "owner": "Administrator", 
+ "permissions": [
+  {
+   "amend": 0, 
+   "cancel": 0, 
+   "create": 0, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Accounts User", 
+   "submit": 0, 
+   "write": 0
+  }, 
+  {
+   "amend": 0, 
+   "cancel": 0, 
+   "create": 0, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Accounts Manager", 
+   "submit": 0, 
+   "write": 0
+  }, 
+  {
+   "create": 0, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "System Manager", 
+   "submit": 0, 
+   "write": 0
+  }
+ ], 
+ "search_fields": "voucher_no,account,posting_date,against_voucher"
+}
\ No newline at end of file
diff --git a/erpnext/accounts/doctype/journal_voucher/journal_voucher.txt b/erpnext/accounts/doctype/journal_voucher/journal_voucher.txt
index 73710f9..72fdc48 100644
--- a/erpnext/accounts/doctype/journal_voucher/journal_voucher.txt
+++ b/erpnext/accounts/doctype/journal_voucher/journal_voucher.txt
@@ -1,503 +1,492 @@
-[
- {
-  "creation": "2013-03-25 10:53:52", 
-  "docstatus": 0, 
-  "modified": "2014-01-20 17:48:51", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "allow_import": 1, 
-  "autoname": "naming_series:", 
-  "doctype": "DocType", 
-  "icon": "icon-file-text", 
-  "is_submittable": 1, 
-  "module": "Accounts", 
-  "name": "__common__", 
-  "read_only_onload": 1, 
-  "search_fields": "voucher_type,posting_date, due_date, cheque_no"
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "Journal Voucher", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "doctype": "DocPerm", 
-  "email": 1, 
-  "name": "__common__", 
-  "parent": "Journal Voucher", 
-  "parentfield": "permissions", 
-  "parenttype": "DocType", 
-  "permlevel": 0, 
-  "print": 1, 
-  "read": 1, 
-  "report": 1
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Journal Voucher"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "voucher_type_and_date", 
-  "fieldtype": "Section Break", 
-  "label": "Voucher Type and Date", 
-  "options": "icon-flag"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break0", 
-  "fieldtype": "Column Break", 
-  "oldfieldtype": "Column Break", 
-  "read_only": 0, 
-  "width": "50%"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "naming_series", 
-  "fieldtype": "Select", 
-  "label": "Series", 
-  "no_copy": 1, 
-  "oldfieldname": "naming_series", 
-  "oldfieldtype": "Select", 
-  "options": "JV", 
-  "print_hide": 1, 
-  "read_only": 0, 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "voucher_type", 
-  "fieldtype": "Select", 
-  "in_filter": 1, 
-  "in_list_view": 1, 
-  "label": "Voucher Type", 
-  "oldfieldname": "voucher_type", 
-  "oldfieldtype": "Select", 
-  "options": "\nJournal Entry\nBank Voucher\nCash Voucher\nCredit Card Voucher\nDebit Note\nCredit Note\nContra Voucher\nExcise Voucher\nWrite Off Voucher\nOpening Entry", 
-  "print_hide": 0, 
-  "read_only": 0, 
-  "search_index": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break1", 
-  "fieldtype": "Column Break", 
-  "oldfieldtype": "Column Break", 
-  "read_only": 0, 
-  "width": "50%"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "posting_date", 
-  "fieldtype": "Date", 
-  "in_filter": 1, 
-  "in_list_view": 1, 
-  "label": "Posting Date", 
-  "no_copy": 1, 
-  "oldfieldname": "posting_date", 
-  "oldfieldtype": "Date", 
-  "read_only": 0, 
-  "reqd": 1, 
-  "search_index": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "2_add_edit_gl_entries", 
-  "fieldtype": "Section Break", 
-  "label": "Journal Entries", 
-  "oldfieldtype": "Section Break", 
-  "options": "icon-table", 
-  "read_only": 0
- }, 
- {
-  "allow_on_submit": 1, 
-  "doctype": "DocField", 
-  "fieldname": "entries", 
-  "fieldtype": "Table", 
-  "label": "Entries", 
-  "oldfieldname": "entries", 
-  "oldfieldtype": "Table", 
-  "options": "Journal Voucher Detail", 
-  "print_hide": 0, 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "section_break99", 
-  "fieldtype": "Section Break", 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "total_debit", 
-  "fieldtype": "Currency", 
-  "in_filter": 1, 
-  "in_list_view": 1, 
-  "label": "Total Debit", 
-  "no_copy": 1, 
-  "oldfieldname": "total_debit", 
-  "oldfieldtype": "Currency", 
-  "options": "Company:company:default_currency", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "total_credit", 
-  "fieldtype": "Currency", 
-  "in_filter": 1, 
-  "label": "Total Credit", 
-  "no_copy": 1, 
-  "oldfieldname": "total_credit", 
-  "oldfieldtype": "Currency", 
-  "options": "Company:company:default_currency", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break99", 
-  "fieldtype": "Column Break", 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "difference", 
-  "fieldtype": "Currency", 
-  "label": "Difference", 
-  "no_copy": 1, 
-  "oldfieldname": "difference", 
-  "oldfieldtype": "Currency", 
-  "options": "Company:company:default_currency", 
-  "print_hide": 1, 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "get_balance", 
-  "fieldtype": "Button", 
-  "label": "Make Difference Entry", 
-  "oldfieldtype": "Button", 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "reference", 
-  "fieldtype": "Section Break", 
-  "label": "Reference", 
-  "options": "icon-pushpin", 
-  "read_only": 0
- }, 
- {
-  "description": "eg. Cheque Number", 
-  "doctype": "DocField", 
-  "fieldname": "cheque_no", 
-  "fieldtype": "Data", 
-  "in_filter": 1, 
-  "in_list_view": 1, 
-  "label": "Reference Number", 
-  "no_copy": 1, 
-  "oldfieldname": "cheque_no", 
-  "oldfieldtype": "Data", 
-  "read_only": 0, 
-  "search_index": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "cheque_date", 
-  "fieldtype": "Date", 
-  "label": "Reference Date", 
-  "no_copy": 1, 
-  "oldfieldname": "cheque_date", 
-  "oldfieldtype": "Date", 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "clearance_date", 
-  "fieldtype": "Date", 
-  "in_filter": 1, 
-  "label": "Clearance Date", 
-  "no_copy": 1, 
-  "oldfieldname": "clearance_date", 
-  "oldfieldtype": "Date", 
-  "print_hide": 0, 
-  "read_only": 1, 
-  "search_index": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break98", 
-  "fieldtype": "Column Break", 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "user_remark", 
-  "fieldtype": "Small Text", 
-  "in_filter": 1, 
-  "label": "User Remark", 
-  "no_copy": 1, 
-  "oldfieldname": "user_remark", 
-  "oldfieldtype": "Small Text", 
-  "read_only": 0
- }, 
- {
-  "description": "User Remark will be added to Auto Remark", 
-  "doctype": "DocField", 
-  "fieldname": "remark", 
-  "fieldtype": "Small Text", 
-  "in_list_view": 0, 
-  "label": "Remark", 
-  "no_copy": 1, 
-  "oldfieldname": "remark", 
-  "oldfieldtype": "Small Text", 
-  "read_only": 1, 
-  "reqd": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "bill_no", 
-  "fieldtype": "Data", 
-  "in_list_view": 0, 
-  "label": "Bill No", 
-  "oldfieldname": "bill_no", 
-  "oldfieldtype": "Data", 
-  "print_hide": 1, 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "bill_date", 
-  "fieldtype": "Date", 
-  "label": "Bill Date", 
-  "oldfieldname": "bill_date", 
-  "oldfieldtype": "Date", 
-  "print_hide": 1, 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "due_date", 
-  "fieldtype": "Date", 
-  "label": "Due Date", 
-  "oldfieldname": "due_date", 
-  "oldfieldtype": "Date", 
-  "print_hide": 0, 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "addtional_info", 
-  "fieldtype": "Section Break", 
-  "label": "More Info", 
-  "oldfieldtype": "Section Break", 
-  "options": "icon-file-text", 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break2", 
-  "fieldtype": "Column Break", 
-  "oldfieldtype": "Column Break", 
-  "read_only": 0, 
-  "width": "50%"
- }, 
- {
-  "default": "No", 
-  "description": "Considered as Opening Balance", 
-  "doctype": "DocField", 
-  "fieldname": "is_opening", 
-  "fieldtype": "Select", 
-  "in_filter": 1, 
-  "label": "Is Opening", 
-  "oldfieldname": "is_opening", 
-  "oldfieldtype": "Select", 
-  "options": "No\nYes", 
-  "print_hide": 1, 
-  "read_only": 0, 
-  "search_index": 1
- }, 
- {
-  "description": "Actual Posting Date", 
-  "doctype": "DocField", 
-  "fieldname": "aging_date", 
-  "fieldtype": "Date", 
-  "label": "Aging Date", 
-  "no_copy": 0, 
-  "oldfieldname": "aging_date", 
-  "oldfieldtype": "Date", 
-  "print_hide": 1, 
-  "read_only": 0
- }, 
- {
-  "default": "Accounts Receivable", 
-  "depends_on": "eval:doc.voucher_type == 'Write Off Voucher'", 
-  "doctype": "DocField", 
-  "fieldname": "write_off_based_on", 
-  "fieldtype": "Select", 
-  "label": "Write Off Based On", 
-  "options": "Accounts Receivable\nAccounts Payable", 
-  "print_hide": 1, 
-  "read_only": 0, 
-  "report_hide": 1
- }, 
- {
-  "depends_on": "eval:doc.voucher_type == 'Write Off Voucher'", 
-  "doctype": "DocField", 
-  "fieldname": "write_off_amount", 
-  "fieldtype": "Currency", 
-  "label": "Write Off Amount <=", 
-  "options": "Company:company:default_currency", 
-  "print_hide": 1, 
-  "read_only": 0, 
-  "report_hide": 1
- }, 
- {
-  "depends_on": "eval:doc.voucher_type == 'Write Off Voucher'", 
-  "doctype": "DocField", 
-  "fieldname": "get_outstanding_invoices", 
-  "fieldtype": "Button", 
-  "label": "Get Outstanding Invoices", 
-  "options": "get_outstanding_invoices", 
-  "print_hide": 1, 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "letter_head", 
-  "fieldtype": "Link", 
-  "label": "Letter Head", 
-  "options": "Letter Head"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break3", 
-  "fieldtype": "Column Break", 
-  "oldfieldtype": "Column Break", 
-  "read_only": 0, 
-  "width": "50%"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "pay_to_recd_from", 
-  "fieldtype": "Data", 
-  "hidden": 0, 
-  "label": "Pay To / Recd From", 
-  "no_copy": 1, 
-  "print_hide": 0, 
-  "read_only": 0, 
-  "report_hide": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "total_amount", 
-  "fieldtype": "Data", 
-  "hidden": 1, 
-  "in_list_view": 0, 
-  "label": "Total Amount", 
-  "no_copy": 1, 
-  "print_hide": 1, 
-  "read_only": 1, 
-  "report_hide": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "total_amount_in_words", 
-  "fieldtype": "Data", 
-  "hidden": 1, 
-  "label": "Total Amount in Words", 
-  "no_copy": 1, 
-  "print_hide": 1, 
-  "read_only": 1, 
-  "report_hide": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "fiscal_year", 
-  "fieldtype": "Select", 
-  "in_filter": 1, 
-  "label": "Fiscal Year", 
-  "oldfieldname": "fiscal_year", 
-  "oldfieldtype": "Select", 
-  "options": "link:Fiscal Year", 
-  "print_hide": 1, 
-  "read_only": 0, 
-  "reqd": 1, 
-  "search_index": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "company", 
-  "fieldtype": "Link", 
-  "in_filter": 1, 
-  "label": "Company", 
-  "oldfieldname": "company", 
-  "oldfieldtype": "Link", 
-  "options": "Company", 
-  "print_hide": 1, 
-  "read_only": 0, 
-  "reqd": 1, 
-  "search_index": 1
- }, 
- {
-  "allow_on_submit": 1, 
-  "doctype": "DocField", 
-  "fieldname": "select_print_heading", 
-  "fieldtype": "Link", 
-  "label": "Print Heading", 
-  "no_copy": 1, 
-  "oldfieldname": "select_print_heading", 
-  "oldfieldtype": "Link", 
-  "options": "Print Heading", 
-  "print_hide": 1, 
-  "read_only": 0, 
-  "report_hide": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "amended_from", 
-  "fieldtype": "Link", 
-  "ignore_restrictions": 1, 
-  "label": "Amended From", 
-  "no_copy": 1, 
-  "oldfieldname": "amended_from", 
-  "oldfieldtype": "Link", 
-  "options": "Journal Voucher", 
-  "print_hide": 1, 
-  "read_only": 1
- }, 
- {
-  "amend": 1, 
-  "cancel": 1, 
-  "create": 1, 
-  "delete": 1, 
-  "doctype": "DocPerm", 
-  "role": "Accounts User", 
-  "submit": 1, 
-  "write": 1
- }, 
- {
-  "amend": 1, 
-  "cancel": 1, 
-  "create": 1, 
-  "delete": 1, 
-  "doctype": "DocPerm", 
-  "role": "Accounts Manager", 
-  "submit": 1, 
-  "write": 1
- }, 
- {
-  "amend": 0, 
-  "cancel": 0, 
-  "create": 0, 
-  "delete": 0, 
-  "doctype": "DocPerm", 
-  "role": "Auditor", 
-  "submit": 0, 
-  "write": 0
- }
-]
\ No newline at end of file
+{
+ "allow_import": 1, 
+ "autoname": "naming_series:", 
+ "creation": "2013-03-25 10:53:52", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "fields": [
+  {
+   "fieldname": "voucher_type_and_date", 
+   "fieldtype": "Section Break", 
+   "label": "Voucher Type and Date", 
+   "options": "icon-flag", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "column_break0", 
+   "fieldtype": "Column Break", 
+   "oldfieldtype": "Column Break", 
+   "permlevel": 0, 
+   "read_only": 0, 
+   "width": "50%"
+  }, 
+  {
+   "fieldname": "naming_series", 
+   "fieldtype": "Select", 
+   "label": "Series", 
+   "no_copy": 1, 
+   "oldfieldname": "naming_series", 
+   "oldfieldtype": "Select", 
+   "options": "JV", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "voucher_type", 
+   "fieldtype": "Select", 
+   "in_filter": 1, 
+   "in_list_view": 1, 
+   "label": "Voucher Type", 
+   "oldfieldname": "voucher_type", 
+   "oldfieldtype": "Select", 
+   "options": "\nJournal Entry\nBank Voucher\nCash Voucher\nCredit Card Voucher\nDebit Note\nCredit Note\nContra Voucher\nExcise Voucher\nWrite Off Voucher\nOpening Entry", 
+   "permlevel": 0, 
+   "print_hide": 0, 
+   "read_only": 0, 
+   "search_index": 1
+  }, 
+  {
+   "fieldname": "column_break1", 
+   "fieldtype": "Column Break", 
+   "oldfieldtype": "Column Break", 
+   "permlevel": 0, 
+   "read_only": 0, 
+   "width": "50%"
+  }, 
+  {
+   "fieldname": "posting_date", 
+   "fieldtype": "Date", 
+   "in_filter": 1, 
+   "in_list_view": 1, 
+   "label": "Posting Date", 
+   "no_copy": 1, 
+   "oldfieldname": "posting_date", 
+   "oldfieldtype": "Date", 
+   "permlevel": 0, 
+   "read_only": 0, 
+   "reqd": 1, 
+   "search_index": 1
+  }, 
+  {
+   "fieldname": "2_add_edit_gl_entries", 
+   "fieldtype": "Section Break", 
+   "label": "Journal Entries", 
+   "oldfieldtype": "Section Break", 
+   "options": "icon-table", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "allow_on_submit": 1, 
+   "fieldname": "entries", 
+   "fieldtype": "Table", 
+   "label": "Entries", 
+   "oldfieldname": "entries", 
+   "oldfieldtype": "Table", 
+   "options": "Journal Voucher Detail", 
+   "permlevel": 0, 
+   "print_hide": 0, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "section_break99", 
+   "fieldtype": "Section Break", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "total_debit", 
+   "fieldtype": "Currency", 
+   "in_filter": 1, 
+   "in_list_view": 1, 
+   "label": "Total Debit", 
+   "no_copy": 1, 
+   "oldfieldname": "total_debit", 
+   "oldfieldtype": "Currency", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "total_credit", 
+   "fieldtype": "Currency", 
+   "in_filter": 1, 
+   "label": "Total Credit", 
+   "no_copy": 1, 
+   "oldfieldname": "total_credit", 
+   "oldfieldtype": "Currency", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "column_break99", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "difference", 
+   "fieldtype": "Currency", 
+   "label": "Difference", 
+   "no_copy": 1, 
+   "oldfieldname": "difference", 
+   "oldfieldtype": "Currency", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "get_balance", 
+   "fieldtype": "Button", 
+   "label": "Make Difference Entry", 
+   "oldfieldtype": "Button", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "reference", 
+   "fieldtype": "Section Break", 
+   "label": "Reference", 
+   "options": "icon-pushpin", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "description": "eg. Cheque Number", 
+   "fieldname": "cheque_no", 
+   "fieldtype": "Data", 
+   "in_filter": 1, 
+   "in_list_view": 1, 
+   "label": "Reference Number", 
+   "no_copy": 1, 
+   "oldfieldname": "cheque_no", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "read_only": 0, 
+   "search_index": 1
+  }, 
+  {
+   "fieldname": "cheque_date", 
+   "fieldtype": "Date", 
+   "label": "Reference Date", 
+   "no_copy": 1, 
+   "oldfieldname": "cheque_date", 
+   "oldfieldtype": "Date", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "clearance_date", 
+   "fieldtype": "Date", 
+   "in_filter": 1, 
+   "label": "Clearance Date", 
+   "no_copy": 1, 
+   "oldfieldname": "clearance_date", 
+   "oldfieldtype": "Date", 
+   "permlevel": 0, 
+   "print_hide": 0, 
+   "read_only": 1, 
+   "search_index": 1
+  }, 
+  {
+   "fieldname": "column_break98", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "user_remark", 
+   "fieldtype": "Small Text", 
+   "in_filter": 1, 
+   "label": "User Remark", 
+   "no_copy": 1, 
+   "oldfieldname": "user_remark", 
+   "oldfieldtype": "Small Text", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "description": "User Remark will be added to Auto Remark", 
+   "fieldname": "remark", 
+   "fieldtype": "Small Text", 
+   "in_list_view": 0, 
+   "label": "Remark", 
+   "no_copy": 1, 
+   "oldfieldname": "remark", 
+   "oldfieldtype": "Small Text", 
+   "permlevel": 0, 
+   "read_only": 1, 
+   "reqd": 0
+  }, 
+  {
+   "fieldname": "bill_no", 
+   "fieldtype": "Data", 
+   "in_list_view": 0, 
+   "label": "Bill No", 
+   "oldfieldname": "bill_no", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "bill_date", 
+   "fieldtype": "Date", 
+   "label": "Bill Date", 
+   "oldfieldname": "bill_date", 
+   "oldfieldtype": "Date", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "due_date", 
+   "fieldtype": "Date", 
+   "label": "Due Date", 
+   "oldfieldname": "due_date", 
+   "oldfieldtype": "Date", 
+   "permlevel": 0, 
+   "print_hide": 0, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "addtional_info", 
+   "fieldtype": "Section Break", 
+   "label": "More Info", 
+   "oldfieldtype": "Section Break", 
+   "options": "icon-file-text", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "column_break2", 
+   "fieldtype": "Column Break", 
+   "oldfieldtype": "Column Break", 
+   "permlevel": 0, 
+   "read_only": 0, 
+   "width": "50%"
+  }, 
+  {
+   "default": "No", 
+   "description": "Considered as Opening Balance", 
+   "fieldname": "is_opening", 
+   "fieldtype": "Select", 
+   "in_filter": 1, 
+   "label": "Is Opening", 
+   "oldfieldname": "is_opening", 
+   "oldfieldtype": "Select", 
+   "options": "No\nYes", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0, 
+   "search_index": 1
+  }, 
+  {
+   "description": "Actual Posting Date", 
+   "fieldname": "aging_date", 
+   "fieldtype": "Date", 
+   "label": "Aging Date", 
+   "no_copy": 0, 
+   "oldfieldname": "aging_date", 
+   "oldfieldtype": "Date", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0
+  }, 
+  {
+   "default": "Accounts Receivable", 
+   "depends_on": "eval:doc.voucher_type == 'Write Off Voucher'", 
+   "fieldname": "write_off_based_on", 
+   "fieldtype": "Select", 
+   "label": "Write Off Based On", 
+   "options": "Accounts Receivable\nAccounts Payable", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0, 
+   "report_hide": 1
+  }, 
+  {
+   "depends_on": "eval:doc.voucher_type == 'Write Off Voucher'", 
+   "fieldname": "write_off_amount", 
+   "fieldtype": "Currency", 
+   "label": "Write Off Amount <=", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0, 
+   "report_hide": 1
+  }, 
+  {
+   "depends_on": "eval:doc.voucher_type == 'Write Off Voucher'", 
+   "fieldname": "get_outstanding_invoices", 
+   "fieldtype": "Button", 
+   "label": "Get Outstanding Invoices", 
+   "options": "get_outstanding_invoices", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "letter_head", 
+   "fieldtype": "Link", 
+   "label": "Letter Head", 
+   "options": "Letter Head", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "column_break3", 
+   "fieldtype": "Column Break", 
+   "oldfieldtype": "Column Break", 
+   "permlevel": 0, 
+   "read_only": 0, 
+   "width": "50%"
+  }, 
+  {
+   "fieldname": "pay_to_recd_from", 
+   "fieldtype": "Data", 
+   "hidden": 0, 
+   "label": "Pay To / Recd From", 
+   "no_copy": 1, 
+   "permlevel": 0, 
+   "print_hide": 0, 
+   "read_only": 0, 
+   "report_hide": 1
+  }, 
+  {
+   "fieldname": "total_amount", 
+   "fieldtype": "Data", 
+   "hidden": 1, 
+   "in_list_view": 0, 
+   "label": "Total Amount", 
+   "no_copy": 1, 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1, 
+   "report_hide": 1
+  }, 
+  {
+   "fieldname": "total_amount_in_words", 
+   "fieldtype": "Data", 
+   "hidden": 1, 
+   "label": "Total Amount in Words", 
+   "no_copy": 1, 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1, 
+   "report_hide": 1
+  }, 
+  {
+   "fieldname": "fiscal_year", 
+   "fieldtype": "Select", 
+   "in_filter": 1, 
+   "label": "Fiscal Year", 
+   "oldfieldname": "fiscal_year", 
+   "oldfieldtype": "Select", 
+   "options": "link:Fiscal Year", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0, 
+   "reqd": 1, 
+   "search_index": 1
+  }, 
+  {
+   "fieldname": "company", 
+   "fieldtype": "Link", 
+   "in_filter": 1, 
+   "label": "Company", 
+   "oldfieldname": "company", 
+   "oldfieldtype": "Link", 
+   "options": "Company", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0, 
+   "reqd": 1, 
+   "search_index": 1
+  }, 
+  {
+   "allow_on_submit": 1, 
+   "fieldname": "select_print_heading", 
+   "fieldtype": "Link", 
+   "label": "Print Heading", 
+   "no_copy": 1, 
+   "oldfieldname": "select_print_heading", 
+   "oldfieldtype": "Link", 
+   "options": "Print Heading", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0, 
+   "report_hide": 1
+  }, 
+  {
+   "fieldname": "amended_from", 
+   "fieldtype": "Link", 
+   "ignore_restrictions": 1, 
+   "label": "Amended From", 
+   "no_copy": 1, 
+   "oldfieldname": "amended_from", 
+   "oldfieldtype": "Link", 
+   "options": "Journal Voucher", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1
+  }
+ ], 
+ "icon": "icon-file-text", 
+ "idx": 1, 
+ "is_submittable": 1, 
+ "modified": "2014-01-20 17:48:51", 
+ "modified_by": "Administrator", 
+ "module": "Accounts", 
+ "name": "Journal Voucher", 
+ "owner": "Administrator", 
+ "permissions": [
+  {
+   "amend": 1, 
+   "cancel": 1, 
+   "create": 1, 
+   "delete": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Accounts User", 
+   "submit": 1, 
+   "write": 1
+  }, 
+  {
+   "amend": 1, 
+   "cancel": 1, 
+   "create": 1, 
+   "delete": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Accounts Manager", 
+   "submit": 1, 
+   "write": 1
+  }, 
+  {
+   "amend": 0, 
+   "cancel": 0, 
+   "create": 0, 
+   "delete": 0, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Auditor", 
+   "submit": 0, 
+   "write": 0
+  }
+ ], 
+ "read_only_onload": 1, 
+ "search_fields": "voucher_type,posting_date, due_date, cheque_no"
+}
\ No newline at end of file
diff --git a/erpnext/accounts/doctype/journal_voucher_detail/journal_voucher_detail.txt b/erpnext/accounts/doctype/journal_voucher_detail/journal_voucher_detail.txt
index c03e025..aa4dda6 100644
--- a/erpnext/accounts/doctype/journal_voucher_detail/journal_voucher_detail.txt
+++ b/erpnext/accounts/doctype/journal_voucher_detail/journal_voucher_detail.txt
@@ -1,179 +1,166 @@
-[
- {
-  "creation": "2013-02-22 01:27:39", 
-  "docstatus": 0, 
-  "modified": "2014-02-03 12:44:31", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "autoname": "JVD.######", 
-  "doctype": "DocType", 
-  "istable": 1, 
-  "module": "Accounts", 
-  "name": "__common__"
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "Journal Voucher Detail", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Journal Voucher Detail"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "account", 
-  "fieldtype": "Link", 
-  "in_filter": 1, 
-  "in_list_view": 1, 
-  "label": "Account", 
-  "oldfieldname": "account", 
-  "oldfieldtype": "Link", 
-  "options": "Account", 
-  "print_width": "250px", 
-  "reqd": 1, 
-  "search_index": 1, 
-  "width": "250px"
- }, 
- {
-  "default": ":Company", 
-  "description": "If Income or Expense", 
-  "doctype": "DocField", 
-  "fieldname": "cost_center", 
-  "fieldtype": "Link", 
-  "in_filter": 1, 
-  "in_list_view": 1, 
-  "label": "Cost Center", 
-  "oldfieldname": "cost_center", 
-  "oldfieldtype": "Link", 
-  "options": "Cost Center", 
-  "print_width": "180px", 
-  "search_index": 0, 
-  "width": "180px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "col_break1", 
-  "fieldtype": "Column Break"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "balance", 
-  "fieldtype": "Currency", 
-  "in_list_view": 1, 
-  "label": "Account Balance", 
-  "no_copy": 1, 
-  "oldfieldname": "balance", 
-  "oldfieldtype": "Data", 
-  "options": "Company:company:default_currency", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "sec_break1", 
-  "fieldtype": "Section Break"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "debit", 
-  "fieldtype": "Currency", 
-  "in_list_view": 1, 
-  "label": "Debit", 
-  "oldfieldname": "debit", 
-  "oldfieldtype": "Currency", 
-  "options": "Company:company:default_currency"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "col_break2", 
-  "fieldtype": "Column Break"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "credit", 
-  "fieldtype": "Currency", 
-  "in_list_view": 1, 
-  "label": "Credit", 
-  "oldfieldname": "credit", 
-  "oldfieldtype": "Currency", 
-  "options": "Company:company:default_currency"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "reference", 
-  "fieldtype": "Section Break", 
-  "label": "Reference"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "against_invoice", 
-  "fieldtype": "Link", 
-  "in_filter": 1, 
-  "label": "Against Sales Invoice", 
-  "no_copy": 1, 
-  "oldfieldname": "against_invoice", 
-  "oldfieldtype": "Link", 
-  "options": "Sales Invoice", 
-  "print_hide": 0, 
-  "search_index": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "against_voucher", 
-  "fieldtype": "Link", 
-  "in_filter": 1, 
-  "in_list_view": 1, 
-  "label": "Against Purchase Invoice", 
-  "no_copy": 1, 
-  "oldfieldname": "against_voucher", 
-  "oldfieldtype": "Link", 
-  "options": "Purchase Invoice", 
-  "print_hide": 0, 
-  "search_index": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "col_break3", 
-  "fieldtype": "Column Break"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "against_jv", 
-  "fieldtype": "Link", 
-  "in_filter": 1, 
-  "label": "Against Journal Voucher", 
-  "no_copy": 1, 
-  "oldfieldname": "against_jv", 
-  "oldfieldtype": "Link", 
-  "options": "Journal Voucher", 
-  "print_hide": 0, 
-  "search_index": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "is_advance", 
-  "fieldtype": "Select", 
-  "label": "Is Advance", 
-  "no_copy": 1, 
-  "oldfieldname": "is_advance", 
-  "oldfieldtype": "Select", 
-  "options": "No\nYes", 
-  "print_hide": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "against_account", 
-  "fieldtype": "Text", 
-  "hidden": 1, 
-  "label": "Against Account", 
-  "no_copy": 1, 
-  "oldfieldname": "against_account", 
-  "oldfieldtype": "Text", 
-  "print_hide": 1
- }
-]
\ No newline at end of file
+{
+ "autoname": "JVD.######", 
+ "creation": "2013-02-22 01:27:39", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "fields": [
+  {
+   "fieldname": "account", 
+   "fieldtype": "Link", 
+   "in_filter": 1, 
+   "in_list_view": 1, 
+   "label": "Account", 
+   "oldfieldname": "account", 
+   "oldfieldtype": "Link", 
+   "options": "Account", 
+   "permlevel": 0, 
+   "print_width": "250px", 
+   "reqd": 1, 
+   "search_index": 1, 
+   "width": "250px"
+  }, 
+  {
+   "default": ":Company", 
+   "description": "If Income or Expense", 
+   "fieldname": "cost_center", 
+   "fieldtype": "Link", 
+   "in_filter": 1, 
+   "in_list_view": 1, 
+   "label": "Cost Center", 
+   "oldfieldname": "cost_center", 
+   "oldfieldtype": "Link", 
+   "options": "Cost Center", 
+   "permlevel": 0, 
+   "print_width": "180px", 
+   "search_index": 0, 
+   "width": "180px"
+  }, 
+  {
+   "fieldname": "col_break1", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "balance", 
+   "fieldtype": "Currency", 
+   "in_list_view": 1, 
+   "label": "Account Balance", 
+   "no_copy": 1, 
+   "oldfieldname": "balance", 
+   "oldfieldtype": "Data", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "sec_break1", 
+   "fieldtype": "Section Break", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "debit", 
+   "fieldtype": "Currency", 
+   "in_list_view": 1, 
+   "label": "Debit", 
+   "oldfieldname": "debit", 
+   "oldfieldtype": "Currency", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "col_break2", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "credit", 
+   "fieldtype": "Currency", 
+   "in_list_view": 1, 
+   "label": "Credit", 
+   "oldfieldname": "credit", 
+   "oldfieldtype": "Currency", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "reference", 
+   "fieldtype": "Section Break", 
+   "label": "Reference", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "against_invoice", 
+   "fieldtype": "Link", 
+   "in_filter": 1, 
+   "label": "Against Sales Invoice", 
+   "no_copy": 1, 
+   "oldfieldname": "against_invoice", 
+   "oldfieldtype": "Link", 
+   "options": "Sales Invoice", 
+   "permlevel": 0, 
+   "print_hide": 0, 
+   "search_index": 1
+  }, 
+  {
+   "fieldname": "against_voucher", 
+   "fieldtype": "Link", 
+   "in_filter": 1, 
+   "in_list_view": 1, 
+   "label": "Against Purchase Invoice", 
+   "no_copy": 1, 
+   "oldfieldname": "against_voucher", 
+   "oldfieldtype": "Link", 
+   "options": "Purchase Invoice", 
+   "permlevel": 0, 
+   "print_hide": 0, 
+   "search_index": 1
+  }, 
+  {
+   "fieldname": "col_break3", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "against_jv", 
+   "fieldtype": "Link", 
+   "in_filter": 1, 
+   "label": "Against Journal Voucher", 
+   "no_copy": 1, 
+   "oldfieldname": "against_jv", 
+   "oldfieldtype": "Link", 
+   "options": "Journal Voucher", 
+   "permlevel": 0, 
+   "print_hide": 0, 
+   "search_index": 1
+  }, 
+  {
+   "fieldname": "is_advance", 
+   "fieldtype": "Select", 
+   "label": "Is Advance", 
+   "no_copy": 1, 
+   "oldfieldname": "is_advance", 
+   "oldfieldtype": "Select", 
+   "options": "No\nYes", 
+   "permlevel": 0, 
+   "print_hide": 1
+  }, 
+  {
+   "fieldname": "against_account", 
+   "fieldtype": "Text", 
+   "hidden": 1, 
+   "label": "Against Account", 
+   "no_copy": 1, 
+   "oldfieldname": "against_account", 
+   "oldfieldtype": "Text", 
+   "permlevel": 0, 
+   "print_hide": 1
+  }
+ ], 
+ "idx": 1, 
+ "istable": 1, 
+ "modified": "2014-02-03 12:44:31", 
+ "modified_by": "Administrator", 
+ "module": "Accounts", 
+ "name": "Journal Voucher Detail", 
+ "owner": "Administrator"
+}
\ No newline at end of file
diff --git a/erpnext/accounts/doctype/mode_of_payment/mode_of_payment.txt b/erpnext/accounts/doctype/mode_of_payment/mode_of_payment.txt
index 5830030..0dfe957 100644
--- a/erpnext/accounts/doctype/mode_of_payment/mode_of_payment.txt
+++ b/erpnext/accounts/doctype/mode_of_payment/mode_of_payment.txt
@@ -1,75 +1,58 @@
-[
- {
-  "creation": "2012-12-04 17:49:20", 
-  "docstatus": 0, 
-  "modified": "2013-12-20 19:24:14", 
-  "modified_by": "Administrator", 
-  "owner": "harshada@webnotestech.com"
- }, 
- {
-  "allow_import": 1, 
-  "allow_rename": 1, 
-  "autoname": "field:mode_of_payment", 
-  "doctype": "DocType", 
-  "document_type": "Master", 
-  "icon": "icon-credit-card", 
-  "module": "Accounts", 
-  "name": "__common__"
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "Mode of Payment", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0, 
-  "read_only": 0
- }, 
- {
-  "create": 1, 
-  "doctype": "DocPerm", 
-  "email": 1, 
-  "name": "__common__", 
-  "parent": "Mode of Payment", 
-  "parentfield": "permissions", 
-  "parenttype": "DocType", 
-  "permlevel": 0, 
-  "print": 1, 
-  "read": 1, 
-  "report": 1, 
-  "role": "Accounts Manager", 
-  "submit": 0, 
-  "write": 1
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Mode of Payment"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "mode_of_payment", 
-  "fieldtype": "Data", 
-  "label": "Mode of Payment", 
-  "oldfieldname": "mode_of_payment", 
-  "oldfieldtype": "Data", 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "company", 
-  "fieldtype": "Link", 
-  "label": "Company", 
-  "options": "Company"
- }, 
- {
-  "description": "Default Bank / Cash account will be automatically updated in POS Invoice when this mode is selected.", 
-  "doctype": "DocField", 
-  "fieldname": "default_account", 
-  "fieldtype": "Link", 
-  "label": "Default Account", 
-  "options": "Account"
- }, 
- {
-  "doctype": "DocPerm"
- }
-]
\ No newline at end of file
+{
+ "allow_import": 1, 
+ "allow_rename": 1, 
+ "autoname": "field:mode_of_payment", 
+ "creation": "2012-12-04 17:49:20", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "document_type": "Master", 
+ "fields": [
+  {
+   "fieldname": "mode_of_payment", 
+   "fieldtype": "Data", 
+   "label": "Mode of Payment", 
+   "oldfieldname": "mode_of_payment", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "read_only": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "company", 
+   "fieldtype": "Link", 
+   "label": "Company", 
+   "options": "Company", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "description": "Default Bank / Cash account will be automatically updated in POS Invoice when this mode is selected.", 
+   "fieldname": "default_account", 
+   "fieldtype": "Link", 
+   "label": "Default Account", 
+   "options": "Account", 
+   "permlevel": 0, 
+   "read_only": 0
+  }
+ ], 
+ "icon": "icon-credit-card", 
+ "idx": 1, 
+ "modified": "2013-12-20 19:24:14", 
+ "modified_by": "Administrator", 
+ "module": "Accounts", 
+ "name": "Mode of Payment", 
+ "owner": "harshada@webnotestech.com", 
+ "permissions": [
+  {
+   "create": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Accounts Manager", 
+   "submit": 0, 
+   "write": 1
+  }
+ ]
+}
\ No newline at end of file
diff --git a/erpnext/accounts/doctype/payment_to_invoice_matching_tool/payment_to_invoice_matching_tool.txt b/erpnext/accounts/doctype/payment_to_invoice_matching_tool/payment_to_invoice_matching_tool.txt
index bc4e0f7..42981de 100644
--- a/erpnext/accounts/doctype/payment_to_invoice_matching_tool/payment_to_invoice_matching_tool.txt
+++ b/erpnext/accounts/doctype/payment_to_invoice_matching_tool/payment_to_invoice_matching_tool.txt
@@ -1,198 +1,186 @@
-[
- {
-  "creation": "2013-01-30 12:49:46", 
-  "docstatus": 0, 
-  "modified": "2013-12-20 19:23:24", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "doctype": "DocType", 
-  "document_type": "Other", 
-  "hide_toolbar": 1, 
-  "icon": "icon-magic", 
-  "issingle": 1, 
-  "module": "Accounts", 
-  "name": "__common__"
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "Payment to Invoice Matching Tool", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "create": 1, 
-  "doctype": "DocPerm", 
-  "email": 1, 
-  "name": "__common__", 
-  "parent": "Payment to Invoice Matching Tool", 
-  "parentfield": "permissions", 
-  "parenttype": "DocType", 
-  "permlevel": 0, 
-  "print": 1, 
-  "read": 1, 
-  "report": 0, 
-  "submit": 0, 
-  "write": 1
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Payment to Invoice Matching Tool"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "account", 
-  "fieldtype": "Link", 
-  "label": "Account", 
-  "options": "Account", 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "account_type", 
-  "fieldtype": "Data", 
-  "hidden": 1, 
-  "label": "Account Type", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "company", 
-  "fieldtype": "Link", 
-  "hidden": 1, 
-  "label": "Company", 
-  "options": "Company", 
-  "print_hide": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "voucher_type", 
-  "fieldtype": "Select", 
-  "label": "Voucher Type", 
-  "options": "Sales Invoice\nPurchase Invoice\nJournal Voucher", 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "voucher_no", 
-  "fieldtype": "Link", 
-  "label": "Voucher No", 
-  "options": "[Select]", 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "pull_payment_entries", 
-  "fieldtype": "Button", 
-  "label": "Pull Payment Entries", 
-  "options": "get_payment_entries"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break1", 
-  "fieldtype": "Column Break", 
-  "print_width": "50%", 
-  "width": "50%"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "total_amount", 
-  "fieldtype": "Currency", 
-  "label": "Total Amount", 
-  "options": "Company:company:default_currency", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "pending_amt_to_reconcile", 
-  "fieldtype": "Currency", 
-  "label": "Outstanding Amount", 
-  "options": "Company:company:default_currency", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "payment_entries", 
-  "fieldtype": "Section Break", 
-  "label": "Payment Entries"
- }, 
- {
-  "description": "Update allocated amount in the above table and then click \"Allocate\" button", 
-  "doctype": "DocField", 
-  "fieldname": "ir_payment_details", 
-  "fieldtype": "Table", 
-  "label": "Payment Entries", 
-  "options": "Payment to Invoice Matching Tool Detail"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "reconcile", 
-  "fieldtype": "Button", 
-  "label": "Allocate", 
-  "options": "reconcile"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "section_break0", 
-  "fieldtype": "Section Break", 
-  "options": "Simple"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break2", 
-  "fieldtype": "Column Break", 
-  "label": "Filter By Date", 
-  "print_width": "50%", 
-  "width": "50%"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "from_date", 
-  "fieldtype": "Date", 
-  "label": "From Date"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "to_date", 
-  "fieldtype": "Date", 
-  "label": "To Date"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "help_html", 
-  "fieldtype": "HTML", 
-  "label": "Help HTML", 
-  "options": "Click \"Pull Payment Entries\" to refresh the table with filters."
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break3", 
-  "fieldtype": "Column Break", 
-  "label": "Filter By Amount", 
-  "print_width": "50%", 
-  "width": "50%"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "amt_greater_than", 
-  "fieldtype": "Data", 
-  "label": "Amount >="
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "amt_less_than", 
-  "fieldtype": "Data", 
-  "label": "Amount <="
- }, 
- {
-  "doctype": "DocPerm", 
-  "role": "Accounts Manager"
- }, 
- {
-  "doctype": "DocPerm", 
-  "role": "Accounts User"
- }
-]
\ No newline at end of file
+{
+ "creation": "2013-01-30 12:49:46", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "document_type": "Other", 
+ "fields": [
+  {
+   "fieldname": "account", 
+   "fieldtype": "Link", 
+   "label": "Account", 
+   "options": "Account", 
+   "permlevel": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "account_type", 
+   "fieldtype": "Data", 
+   "hidden": 1, 
+   "label": "Account Type", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "company", 
+   "fieldtype": "Link", 
+   "hidden": 1, 
+   "label": "Company", 
+   "options": "Company", 
+   "permlevel": 0, 
+   "print_hide": 1
+  }, 
+  {
+   "fieldname": "voucher_type", 
+   "fieldtype": "Select", 
+   "label": "Voucher Type", 
+   "options": "Sales Invoice\nPurchase Invoice\nJournal Voucher", 
+   "permlevel": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "voucher_no", 
+   "fieldtype": "Link", 
+   "label": "Voucher No", 
+   "options": "[Select]", 
+   "permlevel": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "pull_payment_entries", 
+   "fieldtype": "Button", 
+   "label": "Pull Payment Entries", 
+   "options": "get_payment_entries", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "column_break1", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0, 
+   "print_width": "50%", 
+   "width": "50%"
+  }, 
+  {
+   "fieldname": "total_amount", 
+   "fieldtype": "Currency", 
+   "label": "Total Amount", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "pending_amt_to_reconcile", 
+   "fieldtype": "Currency", 
+   "label": "Outstanding Amount", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "payment_entries", 
+   "fieldtype": "Section Break", 
+   "label": "Payment Entries", 
+   "permlevel": 0
+  }, 
+  {
+   "description": "Update allocated amount in the above table and then click \"Allocate\" button", 
+   "fieldname": "ir_payment_details", 
+   "fieldtype": "Table", 
+   "label": "Payment Entries", 
+   "options": "Payment to Invoice Matching Tool Detail", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "reconcile", 
+   "fieldtype": "Button", 
+   "label": "Allocate", 
+   "options": "reconcile", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "section_break0", 
+   "fieldtype": "Section Break", 
+   "options": "Simple", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "column_break2", 
+   "fieldtype": "Column Break", 
+   "label": "Filter By Date", 
+   "permlevel": 0, 
+   "print_width": "50%", 
+   "width": "50%"
+  }, 
+  {
+   "fieldname": "from_date", 
+   "fieldtype": "Date", 
+   "label": "From Date", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "to_date", 
+   "fieldtype": "Date", 
+   "label": "To Date", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "help_html", 
+   "fieldtype": "HTML", 
+   "label": "Help HTML", 
+   "options": "Click \"Pull Payment Entries\" to refresh the table with filters.", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "column_break3", 
+   "fieldtype": "Column Break", 
+   "label": "Filter By Amount", 
+   "permlevel": 0, 
+   "print_width": "50%", 
+   "width": "50%"
+  }, 
+  {
+   "fieldname": "amt_greater_than", 
+   "fieldtype": "Data", 
+   "label": "Amount >=", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "amt_less_than", 
+   "fieldtype": "Data", 
+   "label": "Amount <=", 
+   "permlevel": 0
+  }
+ ], 
+ "hide_toolbar": 1, 
+ "icon": "icon-magic", 
+ "idx": 1, 
+ "issingle": 1, 
+ "modified": "2013-12-20 19:23:24", 
+ "modified_by": "Administrator", 
+ "module": "Accounts", 
+ "name": "Payment to Invoice Matching Tool", 
+ "owner": "Administrator", 
+ "permissions": [
+  {
+   "create": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 0, 
+   "role": "Accounts Manager", 
+   "submit": 0, 
+   "write": 1
+  }, 
+  {
+   "create": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 0, 
+   "role": "Accounts User", 
+   "submit": 0, 
+   "write": 1
+  }
+ ]
+}
\ No newline at end of file
diff --git a/erpnext/accounts/doctype/payment_to_invoice_matching_tool_detail/payment_to_invoice_matching_tool_detail.txt b/erpnext/accounts/doctype/payment_to_invoice_matching_tool_detail/payment_to_invoice_matching_tool_detail.txt
index 1017a98..419ee52 100644
--- a/erpnext/accounts/doctype/payment_to_invoice_matching_tool_detail/payment_to_invoice_matching_tool_detail.txt
+++ b/erpnext/accounts/doctype/payment_to_invoice_matching_tool_detail/payment_to_invoice_matching_tool_detail.txt
@@ -1,101 +1,88 @@
-[
- {
-  "creation": "2013-02-22 01:27:39", 
-  "docstatus": 0, 
-  "modified": "2013-12-20 19:23:24", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "doctype": "DocType", 
-  "istable": 1, 
-  "module": "Accounts", 
-  "name": "__common__"
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "Payment to Invoice Matching Tool Detail", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Payment to Invoice Matching Tool Detail"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "voucher_no", 
-  "fieldtype": "Link", 
-  "in_list_view": 1, 
-  "label": "Voucher No", 
-  "options": "Journal Voucher", 
-  "print_width": "140px", 
-  "read_only": 1, 
-  "reqd": 0, 
-  "width": "140px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "amt_due", 
-  "fieldtype": "Currency", 
-  "in_list_view": 1, 
-  "label": "Unmatched Amount", 
-  "options": "Company:company:default_currency", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "amt_to_be_reconciled", 
-  "fieldtype": "Currency", 
-  "in_list_view": 1, 
-  "label": "Allocated Amount", 
-  "options": "Company:company:default_currency", 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "posting_date", 
-  "fieldtype": "Date", 
-  "in_list_view": 1, 
-  "label": "Posting Date", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "total_amt", 
-  "fieldtype": "Currency", 
-  "in_list_view": 1, 
-  "label": "Total Amount", 
-  "options": "Company:company:default_currency", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "against_account", 
-  "fieldtype": "Data", 
-  "in_list_view": 1, 
-  "label": "Against Account", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "remarks", 
-  "fieldtype": "Small Text", 
-  "label": "Remarks", 
-  "print_width": "200px", 
-  "read_only": 1, 
-  "width": "200px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "voucher_detail_no", 
-  "fieldtype": "Data", 
-  "hidden": 1, 
-  "label": "Voucher Detail No", 
-  "print_hide": 1, 
-  "read_only": 1, 
-  "reqd": 0
- }
-]
\ No newline at end of file
+{
+ "creation": "2013-02-22 01:27:39", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "fields": [
+  {
+   "fieldname": "voucher_no", 
+   "fieldtype": "Link", 
+   "in_list_view": 1, 
+   "label": "Voucher No", 
+   "options": "Journal Voucher", 
+   "permlevel": 0, 
+   "print_width": "140px", 
+   "read_only": 1, 
+   "reqd": 0, 
+   "width": "140px"
+  }, 
+  {
+   "fieldname": "amt_due", 
+   "fieldtype": "Currency", 
+   "in_list_view": 1, 
+   "label": "Unmatched Amount", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "amt_to_be_reconciled", 
+   "fieldtype": "Currency", 
+   "in_list_view": 1, 
+   "label": "Allocated Amount", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "posting_date", 
+   "fieldtype": "Date", 
+   "in_list_view": 1, 
+   "label": "Posting Date", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "total_amt", 
+   "fieldtype": "Currency", 
+   "in_list_view": 1, 
+   "label": "Total Amount", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "against_account", 
+   "fieldtype": "Data", 
+   "in_list_view": 1, 
+   "label": "Against Account", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "remarks", 
+   "fieldtype": "Small Text", 
+   "label": "Remarks", 
+   "permlevel": 0, 
+   "print_width": "200px", 
+   "read_only": 1, 
+   "width": "200px"
+  }, 
+  {
+   "fieldname": "voucher_detail_no", 
+   "fieldtype": "Data", 
+   "hidden": 1, 
+   "label": "Voucher Detail No", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1, 
+   "reqd": 0
+  }
+ ], 
+ "idx": 1, 
+ "istable": 1, 
+ "modified": "2013-12-20 19:23:24", 
+ "modified_by": "Administrator", 
+ "module": "Accounts", 
+ "name": "Payment to Invoice Matching Tool Detail", 
+ "owner": "Administrator"
+}
\ No newline at end of file
diff --git a/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.txt b/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.txt
index 170f49f..a4fa8b5 100644
--- a/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.txt
+++ b/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.txt
@@ -1,145 +1,136 @@
-[
- {
-  "creation": "2013-01-10 16:34:07", 
-  "docstatus": 0, 
-  "modified": "2014-01-20 17:48:59", 
-  "modified_by": "Administrator", 
-  "owner": "jai@webnotestech.com"
- }, 
- {
-  "autoname": "PCE/.###", 
-  "doctype": "DocType", 
-  "icon": "icon-file-text", 
-  "is_submittable": 1, 
-  "module": "Accounts", 
-  "name": "__common__", 
-  "search_fields": "posting_date, fiscal_year"
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "Period Closing Voucher", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "amend": 1, 
-  "cancel": 1, 
-  "create": 1, 
-  "delete": 1, 
-  "doctype": "DocPerm", 
-  "email": 1, 
-  "name": "__common__", 
-  "parent": "Period Closing Voucher", 
-  "parentfield": "permissions", 
-  "parenttype": "DocType", 
-  "permlevel": 0, 
-  "print": 1, 
-  "read": 1, 
-  "report": 1, 
-  "submit": 1, 
-  "write": 1
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Period Closing Voucher"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break0", 
-  "fieldtype": "Column Break", 
-  "oldfieldtype": "Column Break", 
-  "width": "50%"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "transaction_date", 
-  "fieldtype": "Date", 
-  "label": "Transaction Date", 
-  "oldfieldname": "transaction_date", 
-  "oldfieldtype": "Date"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "posting_date", 
-  "fieldtype": "Date", 
-  "label": "Posting Date", 
-  "oldfieldname": "posting_date", 
-  "oldfieldtype": "Date", 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "fiscal_year", 
-  "fieldtype": "Select", 
-  "label": "Closing Fiscal Year", 
-  "oldfieldname": "fiscal_year", 
-  "oldfieldtype": "Select", 
-  "options": "link:Fiscal Year", 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "amended_from", 
-  "fieldtype": "Data", 
-  "ignore_restrictions": 1, 
-  "label": "Amended From", 
-  "no_copy": 1, 
-  "oldfieldname": "amended_from", 
-  "oldfieldtype": "Data", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "company", 
-  "fieldtype": "Select", 
-  "label": "Company", 
-  "oldfieldname": "company", 
-  "oldfieldtype": "Select", 
-  "options": "link:Company", 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break1", 
-  "fieldtype": "Column Break", 
-  "oldfieldtype": "Column Break"
- }, 
- {
-  "description": "The account head under Liability, in which Profit/Loss will be booked", 
-  "doctype": "DocField", 
-  "fieldname": "closing_account_head", 
-  "fieldtype": "Link", 
-  "label": "Closing Account Head", 
-  "oldfieldname": "closing_account_head", 
-  "oldfieldtype": "Link", 
-  "options": "Account", 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "coa_help", 
-  "fieldtype": "HTML", 
-  "label": "CoA Help", 
-  "oldfieldtype": "HTML", 
-  "options": "<a href=\"#!Accounts Browser/Account\">To manage Account Head, click here</a>"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "remarks", 
-  "fieldtype": "Small Text", 
-  "label": "Remarks", 
-  "oldfieldname": "remarks", 
-  "oldfieldtype": "Small Text", 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocPerm", 
-  "role": "System Manager"
- }, 
- {
-  "doctype": "DocPerm", 
-  "role": "Accounts Manager"
- }
-]
\ No newline at end of file
+{
+ "autoname": "PCE/.###", 
+ "creation": "2013-01-10 16:34:07", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "fields": [
+  {
+   "fieldname": "column_break0", 
+   "fieldtype": "Column Break", 
+   "oldfieldtype": "Column Break", 
+   "permlevel": 0, 
+   "width": "50%"
+  }, 
+  {
+   "fieldname": "transaction_date", 
+   "fieldtype": "Date", 
+   "label": "Transaction Date", 
+   "oldfieldname": "transaction_date", 
+   "oldfieldtype": "Date", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "posting_date", 
+   "fieldtype": "Date", 
+   "label": "Posting Date", 
+   "oldfieldname": "posting_date", 
+   "oldfieldtype": "Date", 
+   "permlevel": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "fiscal_year", 
+   "fieldtype": "Select", 
+   "label": "Closing Fiscal Year", 
+   "oldfieldname": "fiscal_year", 
+   "oldfieldtype": "Select", 
+   "options": "link:Fiscal Year", 
+   "permlevel": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "amended_from", 
+   "fieldtype": "Data", 
+   "ignore_restrictions": 1, 
+   "label": "Amended From", 
+   "no_copy": 1, 
+   "oldfieldname": "amended_from", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "company", 
+   "fieldtype": "Select", 
+   "label": "Company", 
+   "oldfieldname": "company", 
+   "oldfieldtype": "Select", 
+   "options": "link:Company", 
+   "permlevel": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "column_break1", 
+   "fieldtype": "Column Break", 
+   "oldfieldtype": "Column Break", 
+   "permlevel": 0
+  }, 
+  {
+   "description": "The account head under Liability, in which Profit/Loss will be booked", 
+   "fieldname": "closing_account_head", 
+   "fieldtype": "Link", 
+   "label": "Closing Account Head", 
+   "oldfieldname": "closing_account_head", 
+   "oldfieldtype": "Link", 
+   "options": "Account", 
+   "permlevel": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "coa_help", 
+   "fieldtype": "HTML", 
+   "label": "CoA Help", 
+   "oldfieldtype": "HTML", 
+   "options": "<a href=\"#!Accounts Browser/Account\">To manage Account Head, click here</a>", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "remarks", 
+   "fieldtype": "Small Text", 
+   "label": "Remarks", 
+   "oldfieldname": "remarks", 
+   "oldfieldtype": "Small Text", 
+   "permlevel": 0, 
+   "reqd": 1
+  }
+ ], 
+ "icon": "icon-file-text", 
+ "idx": 1, 
+ "is_submittable": 1, 
+ "modified": "2014-01-20 17:48:59", 
+ "modified_by": "Administrator", 
+ "module": "Accounts", 
+ "name": "Period Closing Voucher", 
+ "owner": "jai@webnotestech.com", 
+ "permissions": [
+  {
+   "amend": 1, 
+   "cancel": 1, 
+   "create": 1, 
+   "delete": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "System Manager", 
+   "submit": 1, 
+   "write": 1
+  }, 
+  {
+   "amend": 1, 
+   "cancel": 1, 
+   "create": 1, 
+   "delete": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Accounts Manager", 
+   "submit": 1, 
+   "write": 1
+  }
+ ], 
+ "search_fields": "posting_date, fiscal_year"
+}
\ No newline at end of file
diff --git a/erpnext/accounts/doctype/pos_setting/pos_setting.txt b/erpnext/accounts/doctype/pos_setting/pos_setting.txt
index bad0d7e..03c984a 100755
--- a/erpnext/accounts/doctype/pos_setting/pos_setting.txt
+++ b/erpnext/accounts/doctype/pos_setting/pos_setting.txt
@@ -1,246 +1,234 @@
-[
- {
-  "creation": "2013-05-24 12:15:51", 
-  "docstatus": 0, 
-  "modified": "2014-01-29 13:08:25", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "autoname": "POS/.####", 
-  "doctype": "DocType", 
-  "icon": "icon-cog", 
-  "module": "Accounts", 
-  "name": "__common__"
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "POS Setting", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "cancel": 0, 
-  "delete": 0, 
-  "doctype": "DocPerm", 
-  "email": 1, 
-  "name": "__common__", 
-  "parent": "POS Setting", 
-  "parentfield": "permissions", 
-  "parenttype": "DocType", 
-  "permlevel": 0, 
-  "print": 1, 
-  "read": 1, 
-  "report": 1, 
-  "submit": 0
- }, 
- {
-  "doctype": "DocType", 
-  "name": "POS Setting"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "user", 
-  "fieldtype": "Link", 
-  "in_list_view": 1, 
-  "label": "User", 
-  "oldfieldname": "user", 
-  "oldfieldtype": "Link", 
-  "options": "User", 
-  "read_only": 0
- }, 
- {
-  "description": "<a href=\"#Sales Browser/Territory\">Add / Edit</a>", 
-  "doctype": "DocField", 
-  "fieldname": "territory", 
-  "fieldtype": "Link", 
-  "label": "Territory", 
-  "oldfieldname": "territory", 
-  "oldfieldtype": "Link", 
-  "options": "Territory", 
-  "read_only": 0, 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "naming_series", 
-  "fieldtype": "Select", 
-  "label": "Series", 
-  "no_copy": 1, 
-  "oldfieldname": "naming_series", 
-  "oldfieldtype": "Select", 
-  "read_only": 0, 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "currency", 
-  "fieldtype": "Link", 
-  "label": "Currency", 
-  "oldfieldname": "currency", 
-  "oldfieldtype": "Select", 
-  "options": "Currency", 
-  "read_only": 0, 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "selling_price_list", 
-  "fieldtype": "Link", 
-  "label": "Price List", 
-  "oldfieldname": "price_list_name", 
-  "oldfieldtype": "Select", 
-  "options": "Price List", 
-  "read_only": 0, 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "company", 
-  "fieldtype": "Link", 
-  "in_list_view": 1, 
-  "label": "Company", 
-  "oldfieldname": "company", 
-  "oldfieldtype": "Link", 
-  "options": "Company", 
-  "read_only": 0, 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break0", 
-  "fieldtype": "Column Break", 
-  "oldfieldtype": "Column Break", 
-  "read_only": 0
- }, 
- {
-  "default": "1", 
-  "description": "Create Stock Ledger Entries when you submit a Sales Invoice", 
-  "doctype": "DocField", 
-  "fieldname": "update_stock", 
-  "fieldtype": "Check", 
-  "label": "Update Stock", 
-  "reqd": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "customer", 
-  "fieldtype": "Link", 
-  "label": "Customer", 
-  "oldfieldname": "customer_account", 
-  "oldfieldtype": "Link", 
-  "options": "Customer", 
-  "read_only": 0, 
-  "reqd": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "cash_bank_account", 
-  "fieldtype": "Link", 
-  "label": "Cash/Bank Account", 
-  "oldfieldname": "cash_bank_account", 
-  "oldfieldtype": "Link", 
-  "options": "Account", 
-  "read_only": 0, 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "income_account", 
-  "fieldtype": "Link", 
-  "label": "Income Account", 
-  "oldfieldname": "income_account", 
-  "oldfieldtype": "Link", 
-  "options": "Account", 
-  "read_only": 0, 
-  "reqd": 1
- }, 
- {
-  "depends_on": "eval:cint(sys_defaults.auto_accounting_for_stock)", 
-  "doctype": "DocField", 
-  "fieldname": "expense_account", 
-  "fieldtype": "Link", 
-  "hidden": 0, 
-  "label": "Expense Account", 
-  "options": "Account", 
-  "print_hide": 1, 
-  "read_only": 0, 
-  "reqd": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "warehouse", 
-  "fieldtype": "Link", 
-  "label": "Warehouse", 
-  "oldfieldname": "warehouse", 
-  "oldfieldtype": "Link", 
-  "options": "Warehouse", 
-  "read_only": 0, 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "cost_center", 
-  "fieldtype": "Link", 
-  "label": "Cost Center", 
-  "oldfieldname": "cost_center", 
-  "oldfieldtype": "Link", 
-  "options": "Cost Center", 
-  "read_only": 0, 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "taxes_and_charges", 
-  "fieldtype": "Link", 
-  "label": "Taxes and Charges", 
-  "oldfieldname": "charge", 
-  "oldfieldtype": "Link", 
-  "options": "Sales Taxes and Charges Master", 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "letter_head", 
-  "fieldtype": "Select", 
-  "label": "Letter Head", 
-  "oldfieldname": "letter_head", 
-  "oldfieldtype": "Select", 
-  "options": "link:Letter Head", 
-  "print_hide": 1, 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "tc_name", 
-  "fieldtype": "Link", 
-  "label": "Terms and Conditions", 
-  "oldfieldname": "tc_name", 
-  "oldfieldtype": "Link", 
-  "options": "Terms and Conditions", 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "select_print_heading", 
-  "fieldtype": "Select", 
-  "in_filter": 0, 
-  "label": "Print Heading", 
-  "oldfieldname": "select_print_heading", 
-  "oldfieldtype": "Select", 
-  "options": "link:Print Heading", 
-  "read_only": 0
- }, 
- {
-  "create": 1, 
-  "doctype": "DocPerm", 
-  "role": "Accounts Manager", 
-  "write": 1
- }, 
- {
-  "doctype": "DocPerm", 
-  "role": "Accounts User"
- }
-]
\ No newline at end of file
+{
+ "autoname": "POS/.####", 
+ "creation": "2013-05-24 12:15:51", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "fields": [
+  {
+   "fieldname": "user", 
+   "fieldtype": "Link", 
+   "in_list_view": 1, 
+   "label": "User", 
+   "oldfieldname": "user", 
+   "oldfieldtype": "Link", 
+   "options": "User", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "description": "<a href=\"#Sales Browser/Territory\">Add / Edit</a>", 
+   "fieldname": "territory", 
+   "fieldtype": "Link", 
+   "label": "Territory", 
+   "oldfieldname": "territory", 
+   "oldfieldtype": "Link", 
+   "options": "Territory", 
+   "permlevel": 0, 
+   "read_only": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "naming_series", 
+   "fieldtype": "Select", 
+   "label": "Series", 
+   "no_copy": 1, 
+   "oldfieldname": "naming_series", 
+   "oldfieldtype": "Select", 
+   "permlevel": 0, 
+   "read_only": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "currency", 
+   "fieldtype": "Link", 
+   "label": "Currency", 
+   "oldfieldname": "currency", 
+   "oldfieldtype": "Select", 
+   "options": "Currency", 
+   "permlevel": 0, 
+   "read_only": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "selling_price_list", 
+   "fieldtype": "Link", 
+   "label": "Price List", 
+   "oldfieldname": "price_list_name", 
+   "oldfieldtype": "Select", 
+   "options": "Price List", 
+   "permlevel": 0, 
+   "read_only": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "company", 
+   "fieldtype": "Link", 
+   "in_list_view": 1, 
+   "label": "Company", 
+   "oldfieldname": "company", 
+   "oldfieldtype": "Link", 
+   "options": "Company", 
+   "permlevel": 0, 
+   "read_only": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "column_break0", 
+   "fieldtype": "Column Break", 
+   "oldfieldtype": "Column Break", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "default": "1", 
+   "description": "Create Stock Ledger Entries when you submit a Sales Invoice", 
+   "fieldname": "update_stock", 
+   "fieldtype": "Check", 
+   "label": "Update Stock", 
+   "permlevel": 0, 
+   "reqd": 0
+  }, 
+  {
+   "fieldname": "customer", 
+   "fieldtype": "Link", 
+   "label": "Customer", 
+   "oldfieldname": "customer_account", 
+   "oldfieldtype": "Link", 
+   "options": "Customer", 
+   "permlevel": 0, 
+   "read_only": 0, 
+   "reqd": 0
+  }, 
+  {
+   "fieldname": "cash_bank_account", 
+   "fieldtype": "Link", 
+   "label": "Cash/Bank Account", 
+   "oldfieldname": "cash_bank_account", 
+   "oldfieldtype": "Link", 
+   "options": "Account", 
+   "permlevel": 0, 
+   "read_only": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "income_account", 
+   "fieldtype": "Link", 
+   "label": "Income Account", 
+   "oldfieldname": "income_account", 
+   "oldfieldtype": "Link", 
+   "options": "Account", 
+   "permlevel": 0, 
+   "read_only": 0, 
+   "reqd": 1
+  }, 
+  {
+   "depends_on": "eval:cint(sys_defaults.auto_accounting_for_stock)", 
+   "fieldname": "expense_account", 
+   "fieldtype": "Link", 
+   "hidden": 0, 
+   "label": "Expense Account", 
+   "options": "Account", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0, 
+   "reqd": 0
+  }, 
+  {
+   "fieldname": "warehouse", 
+   "fieldtype": "Link", 
+   "label": "Warehouse", 
+   "oldfieldname": "warehouse", 
+   "oldfieldtype": "Link", 
+   "options": "Warehouse", 
+   "permlevel": 0, 
+   "read_only": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "cost_center", 
+   "fieldtype": "Link", 
+   "label": "Cost Center", 
+   "oldfieldname": "cost_center", 
+   "oldfieldtype": "Link", 
+   "options": "Cost Center", 
+   "permlevel": 0, 
+   "read_only": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "taxes_and_charges", 
+   "fieldtype": "Link", 
+   "label": "Taxes and Charges", 
+   "oldfieldname": "charge", 
+   "oldfieldtype": "Link", 
+   "options": "Sales Taxes and Charges Master", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "letter_head", 
+   "fieldtype": "Select", 
+   "label": "Letter Head", 
+   "oldfieldname": "letter_head", 
+   "oldfieldtype": "Select", 
+   "options": "link:Letter Head", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "tc_name", 
+   "fieldtype": "Link", 
+   "label": "Terms and Conditions", 
+   "oldfieldname": "tc_name", 
+   "oldfieldtype": "Link", 
+   "options": "Terms and Conditions", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "select_print_heading", 
+   "fieldtype": "Select", 
+   "in_filter": 0, 
+   "label": "Print Heading", 
+   "oldfieldname": "select_print_heading", 
+   "oldfieldtype": "Select", 
+   "options": "link:Print Heading", 
+   "permlevel": 0, 
+   "read_only": 0
+  }
+ ], 
+ "icon": "icon-cog", 
+ "idx": 1, 
+ "modified": "2014-01-29 13:08:25", 
+ "modified_by": "Administrator", 
+ "module": "Accounts", 
+ "name": "POS Setting", 
+ "owner": "Administrator", 
+ "permissions": [
+  {
+   "cancel": 0, 
+   "create": 1, 
+   "delete": 0, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Accounts Manager", 
+   "submit": 0, 
+   "write": 1
+  }, 
+  {
+   "cancel": 0, 
+   "delete": 0, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Accounts User", 
+   "submit": 0
+  }
+ ]
+}
\ No newline at end of file
diff --git a/erpnext/accounts/doctype/pricing_rule/pricing_rule.txt b/erpnext/accounts/doctype/pricing_rule/pricing_rule.txt
index 413405c..3094569 100644
--- a/erpnext/accounts/doctype/pricing_rule/pricing_rule.txt
+++ b/erpnext/accounts/doctype/pricing_rule/pricing_rule.txt
@@ -1,261 +1,258 @@
-[
- {
-  "creation": "2014-02-21 15:02:51", 
-  "docstatus": 0, 
-  "modified": "2014-03-05 18:23:34", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "autoname": "PRULE.#####", 
-  "doctype": "DocType", 
-  "document_type": "Master", 
-  "icon": "icon-gift", 
-  "istable": 0, 
-  "module": "Accounts", 
-  "name": "__common__"
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "Pricing Rule", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "create": 1, 
-  "delete": 1, 
-  "doctype": "DocPerm", 
-  "name": "__common__", 
-  "parent": "Pricing Rule", 
-  "parentfield": "permissions", 
-  "parenttype": "DocType", 
-  "permlevel": 0, 
-  "read": 1, 
-  "write": 1
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Pricing Rule"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "basic_section", 
-  "fieldtype": "Section Break", 
-  "label": "Basic Section"
- }, 
- {
-  "default": "Today", 
-  "doctype": "DocField", 
-  "fieldname": "valid_from", 
-  "fieldtype": "Date", 
-  "label": "Valid From"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "valid_upto", 
-  "fieldtype": "Date", 
-  "label": "Valid Upto"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "col_break1", 
-  "fieldtype": "Column Break"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "priority", 
-  "fieldtype": "Select", 
-  "label": "Priority", 
-  "options": "\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "disable", 
-  "fieldtype": "Check", 
-  "label": "Disable"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "price_discount_section", 
-  "fieldtype": "Section Break", 
-  "label": "Price / Discount"
- }, 
- {
-  "default": "Discount Percentage", 
-  "doctype": "DocField", 
-  "fieldname": "price_or_discount", 
-  "fieldtype": "Select", 
-  "label": "Price or Discount", 
-  "options": "\nPrice\nDiscount Percentage", 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "col_break2", 
-  "fieldtype": "Column Break"
- }, 
- {
-  "depends_on": "eval:doc.price_or_discount==\"Price\"", 
-  "doctype": "DocField", 
-  "fieldname": "price", 
-  "fieldtype": "Float", 
-  "label": "Price"
- }, 
- {
-  "depends_on": "eval:doc.price_or_discount==\"Discount Percentage\"", 
-  "doctype": "DocField", 
-  "fieldname": "discount_percentage", 
-  "fieldtype": "Float", 
-  "label": "Discount Percentage"
- }, 
- {
-  "depends_on": "eval:doc.price_or_discount==\"Discount Percentage\"", 
-  "doctype": "DocField", 
-  "fieldname": "for_price_list", 
-  "fieldtype": "Link", 
-  "label": "For Price List", 
-  "options": "Price List"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "applicability_section", 
-  "fieldtype": "Section Break", 
-  "label": "Applicability"
- }, 
- {
-  "default": "Item Code", 
-  "doctype": "DocField", 
-  "fieldname": "apply_on", 
-  "fieldtype": "Select", 
-  "label": "Apply On", 
-  "options": "\nItem Code\nItem Group\nBrand", 
-  "reqd": 1
- }, 
- {
-  "depends_on": "eval:doc.apply_on==\"Item Code\"", 
-  "doctype": "DocField", 
-  "fieldname": "item_code", 
-  "fieldtype": "Link", 
-  "label": "Item Code", 
-  "options": "Item", 
-  "reqd": 0
- }, 
- {
-  "depends_on": "eval:doc.apply_on==\"Item Group\"", 
-  "doctype": "DocField", 
-  "fieldname": "item_group", 
-  "fieldtype": "Link", 
-  "label": "Item Group", 
-  "options": "Item Group"
- }, 
- {
-  "depends_on": "eval:doc.apply_on==\"Brand\"", 
-  "doctype": "DocField", 
-  "fieldname": "brand", 
-  "fieldtype": "Link", 
-  "label": "Brand", 
-  "options": "Brand"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "col_break3", 
-  "fieldtype": "Column Break"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "applicable_for", 
-  "fieldtype": "Select", 
-  "label": "Applicable For", 
-  "options": "\nCustomer\nCustomer Group\nTerritory\nSales Partner\nCampaign\nSupplier\nSupplier Type"
- }, 
- {
-  "depends_on": "eval:doc.applicable_for==\"Customer\"", 
-  "doctype": "DocField", 
-  "fieldname": "customer", 
-  "fieldtype": "Link", 
-  "label": "Customer", 
-  "options": "Customer"
- }, 
- {
-  "depends_on": "eval:doc.applicable_for==\"Customer Group\"", 
-  "doctype": "DocField", 
-  "fieldname": "customer_group", 
-  "fieldtype": "Link", 
-  "label": "Customer Group", 
-  "options": "Customer Group"
- }, 
- {
-  "depends_on": "eval:doc.applicable_for==\"Territory\"", 
-  "doctype": "DocField", 
-  "fieldname": "territory", 
-  "fieldtype": "Link", 
-  "label": "Territory", 
-  "options": "Territory"
- }, 
- {
-  "depends_on": "eval:doc.applicable_for==\"Sales Partner\"", 
-  "doctype": "DocField", 
-  "fieldname": "sales_partner", 
-  "fieldtype": "Link", 
-  "label": "Sales Partner", 
-  "options": "Sales Partner"
- }, 
- {
-  "depends_on": "eval:doc.applicable_for==\"Campaign\"", 
-  "doctype": "DocField", 
-  "fieldname": "campaign", 
-  "fieldtype": "Link", 
-  "label": "Campaign", 
-  "options": "Campaign"
- }, 
- {
-  "depends_on": "eval:doc.applicable_for==\"Supplier\"", 
-  "doctype": "DocField", 
-  "fieldname": "supplier", 
-  "fieldtype": "Link", 
-  "label": "Supplier", 
-  "options": "Supplier"
- }, 
- {
-  "depends_on": "eval:doc.applicable_for==\"Supplier Type\"", 
-  "doctype": "DocField", 
-  "fieldname": "supplier_type", 
-  "fieldtype": "Link", 
-  "label": "Supplier Type", 
-  "options": "Supplier Type"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "min_qty", 
-  "fieldtype": "Float", 
-  "label": "Min Qty"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "max_qty", 
-  "fieldtype": "Float", 
-  "label": "Max Qty"
- }, 
- {
-  "doctype": "DocPerm", 
-  "role": "Accounts Manager"
- }, 
- {
-  "doctype": "DocPerm", 
-  "role": "Sales Manager"
- }, 
- {
-  "doctype": "DocPerm", 
-  "role": "Purchase Manager"
- }, 
- {
-  "doctype": "DocPerm", 
-  "role": "Website Manager"
- }, 
- {
-  "doctype": "DocPerm", 
-  "role": "System Manager"
- }
-]
\ No newline at end of file
+{
+ "autoname": "PRULE.#####", 
+ "creation": "2014-02-21 15:02:51", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "document_type": "Master", 
+ "fields": [
+  {
+   "fieldname": "basic_section", 
+   "fieldtype": "Section Break", 
+   "label": "Basic Section", 
+   "permlevel": 0
+  }, 
+  {
+   "default": "Today", 
+   "fieldname": "valid_from", 
+   "fieldtype": "Date", 
+   "label": "Valid From", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "valid_upto", 
+   "fieldtype": "Date", 
+   "label": "Valid Upto", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "col_break1", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "priority", 
+   "fieldtype": "Select", 
+   "label": "Priority", 
+   "options": "\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "disable", 
+   "fieldtype": "Check", 
+   "label": "Disable", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "price_discount_section", 
+   "fieldtype": "Section Break", 
+   "label": "Price / Discount", 
+   "permlevel": 0
+  }, 
+  {
+   "default": "Discount Percentage", 
+   "fieldname": "price_or_discount", 
+   "fieldtype": "Select", 
+   "label": "Price or Discount", 
+   "options": "\nPrice\nDiscount Percentage", 
+   "permlevel": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "col_break2", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0
+  }, 
+  {
+   "depends_on": "eval:doc.price_or_discount==\"Price\"", 
+   "fieldname": "price", 
+   "fieldtype": "Float", 
+   "label": "Price", 
+   "permlevel": 0
+  }, 
+  {
+   "depends_on": "eval:doc.price_or_discount==\"Discount Percentage\"", 
+   "fieldname": "discount_percentage", 
+   "fieldtype": "Float", 
+   "label": "Discount Percentage", 
+   "permlevel": 0
+  }, 
+  {
+   "depends_on": "eval:doc.price_or_discount==\"Discount Percentage\"", 
+   "fieldname": "for_price_list", 
+   "fieldtype": "Link", 
+   "label": "For Price List", 
+   "options": "Price List", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "applicability_section", 
+   "fieldtype": "Section Break", 
+   "label": "Applicability", 
+   "permlevel": 0
+  }, 
+  {
+   "default": "Item Code", 
+   "fieldname": "apply_on", 
+   "fieldtype": "Select", 
+   "label": "Apply On", 
+   "options": "\nItem Code\nItem Group\nBrand", 
+   "permlevel": 0, 
+   "reqd": 1
+  }, 
+  {
+   "depends_on": "eval:doc.apply_on==\"Item Code\"", 
+   "fieldname": "item_code", 
+   "fieldtype": "Link", 
+   "label": "Item Code", 
+   "options": "Item", 
+   "permlevel": 0, 
+   "reqd": 0
+  }, 
+  {
+   "depends_on": "eval:doc.apply_on==\"Item Group\"", 
+   "fieldname": "item_group", 
+   "fieldtype": "Link", 
+   "label": "Item Group", 
+   "options": "Item Group", 
+   "permlevel": 0
+  }, 
+  {
+   "depends_on": "eval:doc.apply_on==\"Brand\"", 
+   "fieldname": "brand", 
+   "fieldtype": "Link", 
+   "label": "Brand", 
+   "options": "Brand", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "col_break3", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "applicable_for", 
+   "fieldtype": "Select", 
+   "label": "Applicable For", 
+   "options": "\nCustomer\nCustomer Group\nTerritory\nSales Partner\nCampaign\nSupplier\nSupplier Type", 
+   "permlevel": 0
+  }, 
+  {
+   "depends_on": "eval:doc.applicable_for==\"Customer\"", 
+   "fieldname": "customer", 
+   "fieldtype": "Link", 
+   "label": "Customer", 
+   "options": "Customer", 
+   "permlevel": 0
+  }, 
+  {
+   "depends_on": "eval:doc.applicable_for==\"Customer Group\"", 
+   "fieldname": "customer_group", 
+   "fieldtype": "Link", 
+   "label": "Customer Group", 
+   "options": "Customer Group", 
+   "permlevel": 0
+  }, 
+  {
+   "depends_on": "eval:doc.applicable_for==\"Territory\"", 
+   "fieldname": "territory", 
+   "fieldtype": "Link", 
+   "label": "Territory", 
+   "options": "Territory", 
+   "permlevel": 0
+  }, 
+  {
+   "depends_on": "eval:doc.applicable_for==\"Sales Partner\"", 
+   "fieldname": "sales_partner", 
+   "fieldtype": "Link", 
+   "label": "Sales Partner", 
+   "options": "Sales Partner", 
+   "permlevel": 0
+  }, 
+  {
+   "depends_on": "eval:doc.applicable_for==\"Campaign\"", 
+   "fieldname": "campaign", 
+   "fieldtype": "Link", 
+   "label": "Campaign", 
+   "options": "Campaign", 
+   "permlevel": 0
+  }, 
+  {
+   "depends_on": "eval:doc.applicable_for==\"Supplier\"", 
+   "fieldname": "supplier", 
+   "fieldtype": "Link", 
+   "label": "Supplier", 
+   "options": "Supplier", 
+   "permlevel": 0
+  }, 
+  {
+   "depends_on": "eval:doc.applicable_for==\"Supplier Type\"", 
+   "fieldname": "supplier_type", 
+   "fieldtype": "Link", 
+   "label": "Supplier Type", 
+   "options": "Supplier Type", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "min_qty", 
+   "fieldtype": "Float", 
+   "label": "Min Qty", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "max_qty", 
+   "fieldtype": "Float", 
+   "label": "Max Qty", 
+   "permlevel": 0
+  }
+ ], 
+ "icon": "icon-gift", 
+ "idx": 1, 
+ "istable": 0, 
+ "modified": "2014-03-05 18:23:34", 
+ "modified_by": "Administrator", 
+ "module": "Accounts", 
+ "name": "Pricing Rule", 
+ "owner": "Administrator", 
+ "permissions": [
+  {
+   "create": 1, 
+   "delete": 1, 
+   "permlevel": 0, 
+   "read": 1, 
+   "role": "Accounts Manager", 
+   "write": 1
+  }, 
+  {
+   "create": 1, 
+   "delete": 1, 
+   "permlevel": 0, 
+   "read": 1, 
+   "role": "Sales Manager", 
+   "write": 1
+  }, 
+  {
+   "create": 1, 
+   "delete": 1, 
+   "permlevel": 0, 
+   "read": 1, 
+   "role": "Purchase Manager", 
+   "write": 1
+  }, 
+  {
+   "create": 1, 
+   "delete": 1, 
+   "permlevel": 0, 
+   "read": 1, 
+   "role": "Website Manager", 
+   "write": 1
+  }, 
+  {
+   "create": 1, 
+   "delete": 1, 
+   "permlevel": 0, 
+   "read": 1, 
+   "role": "System Manager", 
+   "write": 1
+  }
+ ]
+}
\ No newline at end of file
diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.txt b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.txt
index 1ad767e..c70cc6c 100755
--- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.txt
+++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.txt
@@ -1,829 +1,826 @@
-[
- {
-  "creation": "2013-05-21 16:16:39", 
-  "docstatus": 0, 
-  "modified": "2014-02-17 12:01:59", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "allow_attach": 1, 
-  "allow_import": 1, 
-  "autoname": "naming_series:", 
-  "doctype": "DocType", 
-  "icon": "icon-file-text", 
-  "is_submittable": 1, 
-  "module": "Accounts", 
-  "name": "__common__", 
-  "read_only_onload": 1, 
-  "search_fields": "posting_date, credit_to, fiscal_year, bill_no, grand_total, outstanding_amount"
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "Purchase Invoice", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "doctype": "DocPerm", 
-  "email": 1, 
-  "name": "__common__", 
-  "parent": "Purchase Invoice", 
-  "parentfield": "permissions", 
-  "parenttype": "DocType", 
-  "permlevel": 0, 
-  "print": 1, 
-  "read": 1, 
-  "report": 1
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Purchase Invoice"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "supplier_section", 
-  "fieldtype": "Section Break", 
-  "label": "Supplier", 
-  "options": "icon-user"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break0", 
-  "fieldtype": "Column Break", 
-  "oldfieldtype": "Column Break", 
-  "read_only": 0, 
-  "width": "50%"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "naming_series", 
-  "fieldtype": "Select", 
-  "label": "Series", 
-  "no_copy": 1, 
-  "oldfieldname": "naming_series", 
-  "oldfieldtype": "Select", 
-  "options": "BILL\nBILLJ", 
-  "print_hide": 1, 
-  "read_only": 0, 
-  "report_hide": 0, 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "supplier", 
-  "fieldtype": "Link", 
-  "hidden": 0, 
-  "label": "Supplier", 
-  "oldfieldname": "supplier", 
-  "oldfieldtype": "Link", 
-  "options": "Supplier", 
-  "print_hide": 1, 
-  "read_only": 0
- }, 
- {
-  "depends_on": "supplier", 
-  "doctype": "DocField", 
-  "fieldname": "supplier_name", 
-  "fieldtype": "Data", 
-  "hidden": 0, 
-  "in_list_view": 1, 
-  "label": "Name", 
-  "oldfieldname": "supplier_name", 
-  "oldfieldtype": "Data", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "address_display", 
-  "fieldtype": "Small Text", 
-  "hidden": 1, 
-  "label": "Address", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "contact_display", 
-  "fieldtype": "Small Text", 
-  "hidden": 1, 
-  "label": "Contact", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "contact_mobile", 
-  "fieldtype": "Text", 
-  "hidden": 1, 
-  "label": "Mobile No", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "contact_email", 
-  "fieldtype": "Text", 
-  "hidden": 1, 
-  "label": "Contact Email", 
-  "print_hide": 1, 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break1", 
-  "fieldtype": "Column Break", 
-  "oldfieldtype": "Column Break", 
-  "read_only": 0, 
-  "reqd": 0, 
-  "width": "50%"
- }, 
- {
-  "default": "Today", 
-  "doctype": "DocField", 
-  "fieldname": "posting_date", 
-  "fieldtype": "Date", 
-  "in_filter": 1, 
-  "label": "Posting Date", 
-  "no_copy": 0, 
-  "oldfieldname": "posting_date", 
-  "oldfieldtype": "Date", 
-  "print_hide": 1, 
-  "read_only": 0, 
-  "reqd": 1, 
-  "search_index": 1
- }, 
- {
-  "description": "If not applicable please enter: NA", 
-  "doctype": "DocField", 
-  "fieldname": "bill_no", 
-  "fieldtype": "Data", 
-  "in_filter": 1, 
-  "label": "Supplier Invoice No", 
-  "oldfieldname": "bill_no", 
-  "oldfieldtype": "Data", 
-  "print_hide": 1, 
-  "read_only": 0, 
-  "reqd": 1, 
-  "search_index": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "bill_date", 
-  "fieldtype": "Date", 
-  "in_filter": 1, 
-  "label": "Supplier Invoice Date", 
-  "oldfieldname": "bill_date", 
-  "oldfieldtype": "Date", 
-  "print_hide": 1, 
-  "read_only": 0, 
-  "reqd": 0, 
-  "search_index": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "amended_from", 
-  "fieldtype": "Link", 
-  "ignore_restrictions": 1, 
-  "label": "Amended From", 
-  "no_copy": 1, 
-  "oldfieldname": "amended_from", 
-  "oldfieldtype": "Link", 
-  "options": "Purchase Invoice", 
-  "print_hide": 1, 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "company", 
-  "fieldtype": "Link", 
-  "in_filter": 1, 
-  "label": "Company", 
-  "oldfieldname": "company", 
-  "oldfieldtype": "Link", 
-  "options": "Company", 
-  "print_hide": 1, 
-  "read_only": 0, 
-  "search_index": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "currency_price_list", 
-  "fieldtype": "Section Break", 
-  "label": "Currency and Price List", 
-  "options": "icon-tag", 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "currency", 
-  "fieldtype": "Link", 
-  "label": "Currency", 
-  "oldfieldname": "currency", 
-  "oldfieldtype": "Select", 
-  "options": "Currency", 
-  "print_hide": 1, 
-  "read_only": 0
- }, 
- {
-  "description": "The rate at which Bill Currency is converted into company's base currency", 
-  "doctype": "DocField", 
-  "fieldname": "conversion_rate", 
-  "fieldtype": "Float", 
-  "label": "Exchange Rate", 
-  "oldfieldname": "conversion_rate", 
-  "oldfieldtype": "Currency", 
-  "print_hide": 1, 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break2", 
-  "fieldtype": "Column Break", 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "buying_price_list", 
-  "fieldtype": "Link", 
-  "label": "Price List", 
-  "options": "Price List", 
-  "print_hide": 1, 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "price_list_currency", 
-  "fieldtype": "Link", 
-  "label": "Price List Currency", 
-  "options": "Currency", 
-  "print_hide": 1, 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "plc_conversion_rate", 
-  "fieldtype": "Float", 
-  "label": "Price List Exchange Rate", 
-  "print_hide": 1, 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "items", 
-  "fieldtype": "Section Break", 
-  "label": "Items", 
-  "oldfieldtype": "Section Break", 
-  "options": "icon-shopping-cart", 
-  "read_only": 0
- }, 
- {
-  "allow_on_submit": 1, 
-  "doctype": "DocField", 
-  "fieldname": "entries", 
-  "fieldtype": "Table", 
-  "label": "Entries", 
-  "oldfieldname": "entries", 
-  "oldfieldtype": "Table", 
-  "options": "Purchase Invoice Item", 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "section_break_26", 
-  "fieldtype": "Section Break"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "net_total_import", 
-  "fieldtype": "Currency", 
-  "label": "Net Total", 
-  "oldfieldname": "net_total_import", 
-  "oldfieldtype": "Currency", 
-  "options": "currency", 
-  "print_hide": 0, 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break_28", 
-  "fieldtype": "Column Break"
- }, 
- {
-  "description": "Will be calculated automatically when you enter the details", 
-  "doctype": "DocField", 
-  "fieldname": "net_total", 
-  "fieldtype": "Currency", 
-  "label": "Net Total (Company Currency)", 
-  "oldfieldname": "net_total", 
-  "oldfieldtype": "Currency", 
-  "options": "Company:company:default_currency", 
-  "print_hide": 1, 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "taxes", 
-  "fieldtype": "Section Break", 
-  "label": "Taxes and Charges", 
-  "oldfieldtype": "Section Break", 
-  "options": "icon-money", 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "taxes_and_charges", 
-  "fieldtype": "Link", 
-  "label": "Taxes and Charges", 
-  "oldfieldname": "purchase_other_charges", 
-  "oldfieldtype": "Link", 
-  "options": "Purchase Taxes and Charges Master", 
-  "print_hide": 1, 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "other_charges", 
-  "fieldtype": "Table", 
-  "label": "Purchase Taxes and Charges", 
-  "oldfieldname": "purchase_tax_details", 
-  "oldfieldtype": "Table", 
-  "options": "Purchase Taxes and Charges", 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "other_charges_calculation", 
-  "fieldtype": "HTML", 
-  "label": "Taxes and Charges Calculation", 
-  "oldfieldtype": "HTML", 
-  "print_hide": 1, 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "totals", 
-  "fieldtype": "Section Break", 
-  "label": "Totals", 
-  "oldfieldtype": "Section Break", 
-  "options": "icon-money", 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "other_charges_added_import", 
-  "fieldtype": "Currency", 
-  "label": "Taxes and Charges Added", 
-  "oldfieldname": "other_charges_added_import", 
-  "oldfieldtype": "Currency", 
-  "options": "currency", 
-  "print_hide": 1, 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "other_charges_deducted_import", 
-  "fieldtype": "Currency", 
-  "label": "Taxes and Charges Deducted", 
-  "oldfieldname": "other_charges_deducted_import", 
-  "oldfieldtype": "Currency", 
-  "options": "currency", 
-  "print_hide": 1, 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "grand_total_import", 
-  "fieldtype": "Currency", 
-  "in_list_view": 1, 
-  "label": "Grand Total", 
-  "oldfieldname": "grand_total_import", 
-  "oldfieldtype": "Currency", 
-  "options": "currency", 
-  "print_hide": 0, 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "in_words_import", 
-  "fieldtype": "Data", 
-  "label": "In Words", 
-  "oldfieldname": "in_words_import", 
-  "oldfieldtype": "Data", 
-  "print_hide": 0, 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "total_amount_to_pay", 
-  "fieldtype": "Currency", 
-  "hidden": 0, 
-  "label": "Total Amount To Pay", 
-  "no_copy": 1, 
-  "oldfieldname": "total_amount_to_pay", 
-  "oldfieldtype": "Currency", 
-  "options": "Company:company:default_currency", 
-  "print_hide": 1, 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "total_advance", 
-  "fieldtype": "Currency", 
-  "label": "Total Advance", 
-  "no_copy": 1, 
-  "oldfieldname": "total_advance", 
-  "oldfieldtype": "Currency", 
-  "options": "Company:company:default_currency", 
-  "print_hide": 1, 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "outstanding_amount", 
-  "fieldtype": "Currency", 
-  "in_filter": 1, 
-  "in_list_view": 1, 
-  "label": "Outstanding Amount", 
-  "no_copy": 1, 
-  "oldfieldname": "outstanding_amount", 
-  "oldfieldtype": "Currency", 
-  "options": "Company:company:default_currency", 
-  "print_hide": 1, 
-  "read_only": 1, 
-  "search_index": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break8", 
-  "fieldtype": "Column Break", 
-  "oldfieldtype": "Column Break", 
-  "print_hide": 1, 
-  "read_only": 0, 
-  "width": "50%"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "total_tax", 
-  "fieldtype": "Currency", 
-  "label": "Total Tax (Company Currency)", 
-  "oldfieldname": "total_tax", 
-  "oldfieldtype": "Currency", 
-  "options": "Company:company:default_currency", 
-  "print_hide": 1, 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "other_charges_added", 
-  "fieldtype": "Currency", 
-  "label": "Taxes and Charges Added (Company Currency)", 
-  "oldfieldname": "other_charges_added", 
-  "oldfieldtype": "Currency", 
-  "options": "Company:company:default_currency", 
-  "print_hide": 1, 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "other_charges_deducted", 
-  "fieldtype": "Currency", 
-  "label": "Taxes and Charges Deducted (Company Currency)", 
-  "oldfieldname": "other_charges_deducted", 
-  "oldfieldtype": "Currency", 
-  "options": "Company:company:default_currency", 
-  "print_hide": 1, 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "grand_total", 
-  "fieldtype": "Currency", 
-  "label": "Grand Total (Company Currency)", 
-  "oldfieldname": "grand_total", 
-  "oldfieldtype": "Currency", 
-  "options": "Company:company:default_currency", 
-  "print_hide": 1, 
-  "read_only": 1
- }, 
- {
-  "description": "In Words will be visible once you save the Purchase Invoice.", 
-  "doctype": "DocField", 
-  "fieldname": "in_words", 
-  "fieldtype": "Data", 
-  "label": "In Words (Company Currency)", 
-  "oldfieldname": "in_words", 
-  "oldfieldtype": "Data", 
-  "print_hide": 1, 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "write_off_amount", 
-  "fieldtype": "Currency", 
-  "label": "Write Off Amount", 
-  "no_copy": 1, 
-  "options": "Company:company:default_currency", 
-  "print_hide": 1, 
-  "read_only": 0
- }, 
- {
-  "depends_on": "eval:flt(doc.write_off_amount)!=0", 
-  "doctype": "DocField", 
-  "fieldname": "write_off_account", 
-  "fieldtype": "Link", 
-  "label": "Write Off Account", 
-  "no_copy": 1, 
-  "options": "Account", 
-  "print_hide": 1, 
-  "read_only": 0
- }, 
- {
-  "depends_on": "eval:flt(doc.write_off_amount)!=0", 
-  "doctype": "DocField", 
-  "fieldname": "write_off_cost_center", 
-  "fieldtype": "Link", 
-  "label": "Write Off Cost Center", 
-  "no_copy": 1, 
-  "options": "Cost Center", 
-  "print_hide": 1, 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "against_expense_account", 
-  "fieldtype": "Small Text", 
-  "hidden": 1, 
-  "label": "Against Expense Account", 
-  "no_copy": 1, 
-  "oldfieldname": "against_expense_account", 
-  "oldfieldtype": "Small Text", 
-  "print_hide": 1, 
-  "read_only": 0, 
-  "report_hide": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "advances", 
-  "fieldtype": "Section Break", 
-  "label": "Advances", 
-  "oldfieldtype": "Section Break", 
-  "options": "icon-money", 
-  "print_hide": 1, 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "get_advances_paid", 
-  "fieldtype": "Button", 
-  "label": "Get Advances Paid", 
-  "oldfieldtype": "Button", 
-  "options": "get_advances", 
-  "print_hide": 1, 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "advance_allocation_details", 
-  "fieldtype": "Table", 
-  "label": "Purchase Invoice Advances", 
-  "no_copy": 1, 
-  "oldfieldname": "advance_allocation_details", 
-  "oldfieldtype": "Table", 
-  "options": "Purchase Invoice Advance", 
-  "print_hide": 1, 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "terms_section_break", 
-  "fieldtype": "Section Break", 
-  "label": "Terms and Conditions", 
-  "options": "icon-legal"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "tc_name", 
-  "fieldtype": "Link", 
-  "label": "Terms", 
-  "options": "Terms and Conditions", 
-  "print_hide": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "terms", 
-  "fieldtype": "Text Editor", 
-  "label": "Terms and Conditions1"
- }, 
- {
-  "depends_on": "supplier", 
-  "doctype": "DocField", 
-  "fieldname": "contact_section", 
-  "fieldtype": "Section Break", 
-  "label": "Contact Info", 
-  "options": "icon-bullhorn", 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "supplier_address", 
-  "fieldtype": "Link", 
-  "label": "Supplier Address", 
-  "options": "Address", 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "col_break23", 
-  "fieldtype": "Column Break", 
-  "read_only": 0, 
-  "width": "50%"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "contact_person", 
-  "fieldtype": "Link", 
-  "label": "Contact Person", 
-  "options": "Contact", 
-  "print_hide": 1, 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "more_info", 
-  "fieldtype": "Section Break", 
-  "label": "More Info", 
-  "oldfieldtype": "Section Break", 
-  "options": "icon-file-text", 
-  "print_hide": 1, 
-  "read_only": 0
- }, 
- {
-  "description": "Supplier (Payable) Account", 
-  "doctype": "DocField", 
-  "fieldname": "credit_to", 
-  "fieldtype": "Link", 
-  "in_filter": 1, 
-  "label": "Credit To", 
-  "oldfieldname": "credit_to", 
-  "oldfieldtype": "Link", 
-  "options": "Account", 
-  "print_hide": 1, 
-  "read_only": 0, 
-  "reqd": 1, 
-  "search_index": 1
- }, 
- {
-  "default": "No", 
-  "description": "Considered as Opening Balance", 
-  "doctype": "DocField", 
-  "fieldname": "is_opening", 
-  "fieldtype": "Select", 
-  "in_filter": 1, 
-  "label": "Is Opening", 
-  "oldfieldname": "is_opening", 
-  "oldfieldtype": "Select", 
-  "options": "No\nYes", 
-  "print_hide": 1, 
-  "read_only": 0, 
-  "search_index": 1
- }, 
- {
-  "description": "Actual Invoice Date", 
-  "doctype": "DocField", 
-  "fieldname": "aging_date", 
-  "fieldtype": "Date", 
-  "label": "Aging Date", 
-  "oldfieldname": "aging_date", 
-  "oldfieldtype": "Date", 
-  "print_hide": 1, 
-  "read_only": 0, 
-  "search_index": 0
- }, 
- {
-  "allow_on_submit": 1, 
-  "doctype": "DocField", 
-  "fieldname": "select_print_heading", 
-  "fieldtype": "Link", 
-  "label": "Print Heading", 
-  "no_copy": 1, 
-  "oldfieldname": "select_print_heading", 
-  "oldfieldtype": "Link", 
-  "options": "Print Heading", 
-  "print_hide": 1, 
-  "read_only": 0, 
-  "report_hide": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "due_date", 
-  "fieldtype": "Date", 
-  "in_filter": 1, 
-  "label": "Due Date", 
-  "no_copy": 0, 
-  "oldfieldname": "due_date", 
-  "oldfieldtype": "Date", 
-  "print_hide": 0, 
-  "read_only": 0, 
-  "search_index": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "mode_of_payment", 
-  "fieldtype": "Select", 
-  "label": "Mode of Payment", 
-  "oldfieldname": "mode_of_payment", 
-  "oldfieldtype": "Select", 
-  "options": "link:Mode of Payment", 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break_63", 
-  "fieldtype": "Column Break", 
-  "read_only": 0
- }, 
- {
-  "allow_on_submit": 1, 
-  "doctype": "DocField", 
-  "fieldname": "letter_head", 
-  "fieldtype": "Select", 
-  "label": "Letter Head", 
-  "options": "link:Letter Head", 
-  "print_hide": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "fiscal_year", 
-  "fieldtype": "Select", 
-  "in_filter": 1, 
-  "label": "Fiscal Year", 
-  "oldfieldname": "fiscal_year", 
-  "oldfieldtype": "Select", 
-  "options": "link:Fiscal Year", 
-  "print_hide": 1, 
-  "read_only": 0, 
-  "search_index": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "remarks", 
-  "fieldtype": "Small Text", 
-  "label": "Remarks", 
-  "no_copy": 1, 
-  "oldfieldname": "remarks", 
-  "oldfieldtype": "Text", 
-  "print_hide": 1, 
-  "read_only": 0, 
-  "reqd": 0
- }, 
- {
-  "amend": 0, 
-  "cancel": 0, 
-  "create": 0, 
-  "delete": 0, 
-  "doctype": "DocPerm", 
-  "role": "Accounts User", 
-  "submit": 0, 
-  "write": 0
- }, 
- {
-  "amend": 0, 
-  "cancel": 0, 
-  "create": 0, 
-  "delete": 0, 
-  "doctype": "DocPerm", 
-  "role": "Purchase User", 
-  "submit": 0, 
-  "write": 0
- }, 
- {
-  "amend": 0, 
-  "cancel": 0, 
-  "create": 0, 
-  "delete": 0, 
-  "doctype": "DocPerm", 
-  "role": "Supplier", 
-  "submit": 0, 
-  "write": 0
- }, 
- {
-  "amend": 1, 
-  "cancel": 1, 
-  "create": 1, 
-  "delete": 1, 
-  "doctype": "DocPerm", 
-  "role": "Accounts Manager", 
-  "submit": 1, 
-  "write": 1
- }, 
- {
-  "amend": 0, 
-  "cancel": 0, 
-  "create": 0, 
-  "delete": 0, 
-  "doctype": "DocPerm", 
-  "role": "Auditor", 
-  "submit": 0, 
-  "write": 0
- }
-]
+{
+ "allow_attach": 1, 
+ "allow_import": 1, 
+ "autoname": "naming_series:", 
+ "creation": "2013-05-21 16:16:39", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "fields": [
+  {
+   "fieldname": "supplier_section", 
+   "fieldtype": "Section Break", 
+   "label": "Supplier", 
+   "options": "icon-user", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "column_break0", 
+   "fieldtype": "Column Break", 
+   "oldfieldtype": "Column Break", 
+   "permlevel": 0, 
+   "read_only": 0, 
+   "width": "50%"
+  }, 
+  {
+   "fieldname": "naming_series", 
+   "fieldtype": "Select", 
+   "label": "Series", 
+   "no_copy": 1, 
+   "oldfieldname": "naming_series", 
+   "oldfieldtype": "Select", 
+   "options": "BILL\nBILLJ", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0, 
+   "report_hide": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "supplier", 
+   "fieldtype": "Link", 
+   "hidden": 0, 
+   "label": "Supplier", 
+   "oldfieldname": "supplier", 
+   "oldfieldtype": "Link", 
+   "options": "Supplier", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0
+  }, 
+  {
+   "depends_on": "supplier", 
+   "fieldname": "supplier_name", 
+   "fieldtype": "Data", 
+   "hidden": 0, 
+   "in_list_view": 1, 
+   "label": "Name", 
+   "oldfieldname": "supplier_name", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "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, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "contact_mobile", 
+   "fieldtype": "Text", 
+   "hidden": 1, 
+   "label": "Mobile No", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "contact_email", 
+   "fieldtype": "Text", 
+   "hidden": 1, 
+   "label": "Contact Email", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "column_break1", 
+   "fieldtype": "Column Break", 
+   "oldfieldtype": "Column Break", 
+   "permlevel": 0, 
+   "read_only": 0, 
+   "reqd": 0, 
+   "width": "50%"
+  }, 
+  {
+   "default": "Today", 
+   "fieldname": "posting_date", 
+   "fieldtype": "Date", 
+   "in_filter": 1, 
+   "label": "Posting Date", 
+   "no_copy": 0, 
+   "oldfieldname": "posting_date", 
+   "oldfieldtype": "Date", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0, 
+   "reqd": 1, 
+   "search_index": 1
+  }, 
+  {
+   "description": "If not applicable please enter: NA", 
+   "fieldname": "bill_no", 
+   "fieldtype": "Data", 
+   "in_filter": 1, 
+   "label": "Supplier Invoice No", 
+   "oldfieldname": "bill_no", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0, 
+   "reqd": 1, 
+   "search_index": 1
+  }, 
+  {
+   "fieldname": "bill_date", 
+   "fieldtype": "Date", 
+   "in_filter": 1, 
+   "label": "Supplier Invoice Date", 
+   "oldfieldname": "bill_date", 
+   "oldfieldtype": "Date", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0, 
+   "reqd": 0, 
+   "search_index": 1
+  }, 
+  {
+   "fieldname": "amended_from", 
+   "fieldtype": "Link", 
+   "ignore_restrictions": 1, 
+   "label": "Amended From", 
+   "no_copy": 1, 
+   "oldfieldname": "amended_from", 
+   "oldfieldtype": "Link", 
+   "options": "Purchase Invoice", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "company", 
+   "fieldtype": "Link", 
+   "in_filter": 1, 
+   "label": "Company", 
+   "oldfieldname": "company", 
+   "oldfieldtype": "Link", 
+   "options": "Company", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0, 
+   "search_index": 1
+  }, 
+  {
+   "fieldname": "currency_price_list", 
+   "fieldtype": "Section Break", 
+   "label": "Currency and Price List", 
+   "options": "icon-tag", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "currency", 
+   "fieldtype": "Link", 
+   "label": "Currency", 
+   "oldfieldname": "currency", 
+   "oldfieldtype": "Select", 
+   "options": "Currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0
+  }, 
+  {
+   "description": "The rate at which Bill Currency is converted into company's base currency", 
+   "fieldname": "conversion_rate", 
+   "fieldtype": "Float", 
+   "label": "Exchange Rate", 
+   "oldfieldname": "conversion_rate", 
+   "oldfieldtype": "Currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "column_break2", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "buying_price_list", 
+   "fieldtype": "Link", 
+   "label": "Price List", 
+   "options": "Price List", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "price_list_currency", 
+   "fieldtype": "Link", 
+   "label": "Price List Currency", 
+   "options": "Currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "plc_conversion_rate", 
+   "fieldtype": "Float", 
+   "label": "Price List Exchange Rate", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "items", 
+   "fieldtype": "Section Break", 
+   "label": "Items", 
+   "oldfieldtype": "Section Break", 
+   "options": "icon-shopping-cart", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "allow_on_submit": 1, 
+   "fieldname": "entries", 
+   "fieldtype": "Table", 
+   "label": "Entries", 
+   "oldfieldname": "entries", 
+   "oldfieldtype": "Table", 
+   "options": "Purchase Invoice Item", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "section_break_26", 
+   "fieldtype": "Section Break", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "net_total_import", 
+   "fieldtype": "Currency", 
+   "label": "Net Total", 
+   "oldfieldname": "net_total_import", 
+   "oldfieldtype": "Currency", 
+   "options": "currency", 
+   "permlevel": 0, 
+   "print_hide": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "column_break_28", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0
+  }, 
+  {
+   "description": "Will be calculated automatically when you enter the details", 
+   "fieldname": "net_total", 
+   "fieldtype": "Currency", 
+   "label": "Net Total (Company Currency)", 
+   "oldfieldname": "net_total", 
+   "oldfieldtype": "Currency", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "taxes", 
+   "fieldtype": "Section Break", 
+   "label": "Taxes and Charges", 
+   "oldfieldtype": "Section Break", 
+   "options": "icon-money", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "taxes_and_charges", 
+   "fieldtype": "Link", 
+   "label": "Taxes and Charges", 
+   "oldfieldname": "purchase_other_charges", 
+   "oldfieldtype": "Link", 
+   "options": "Purchase Taxes and Charges Master", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "other_charges", 
+   "fieldtype": "Table", 
+   "label": "Purchase Taxes and Charges", 
+   "oldfieldname": "purchase_tax_details", 
+   "oldfieldtype": "Table", 
+   "options": "Purchase Taxes and Charges", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "other_charges_calculation", 
+   "fieldtype": "HTML", 
+   "label": "Taxes and Charges Calculation", 
+   "oldfieldtype": "HTML", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "totals", 
+   "fieldtype": "Section Break", 
+   "label": "Totals", 
+   "oldfieldtype": "Section Break", 
+   "options": "icon-money", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "other_charges_added_import", 
+   "fieldtype": "Currency", 
+   "label": "Taxes and Charges Added", 
+   "oldfieldname": "other_charges_added_import", 
+   "oldfieldtype": "Currency", 
+   "options": "currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "other_charges_deducted_import", 
+   "fieldtype": "Currency", 
+   "label": "Taxes and Charges Deducted", 
+   "oldfieldname": "other_charges_deducted_import", 
+   "oldfieldtype": "Currency", 
+   "options": "currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "grand_total_import", 
+   "fieldtype": "Currency", 
+   "in_list_view": 1, 
+   "label": "Grand Total", 
+   "oldfieldname": "grand_total_import", 
+   "oldfieldtype": "Currency", 
+   "options": "currency", 
+   "permlevel": 0, 
+   "print_hide": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "in_words_import", 
+   "fieldtype": "Data", 
+   "label": "In Words", 
+   "oldfieldname": "in_words_import", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "print_hide": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "total_amount_to_pay", 
+   "fieldtype": "Currency", 
+   "hidden": 0, 
+   "label": "Total Amount To Pay", 
+   "no_copy": 1, 
+   "oldfieldname": "total_amount_to_pay", 
+   "oldfieldtype": "Currency", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "total_advance", 
+   "fieldtype": "Currency", 
+   "label": "Total Advance", 
+   "no_copy": 1, 
+   "oldfieldname": "total_advance", 
+   "oldfieldtype": "Currency", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "outstanding_amount", 
+   "fieldtype": "Currency", 
+   "in_filter": 1, 
+   "in_list_view": 1, 
+   "label": "Outstanding Amount", 
+   "no_copy": 1, 
+   "oldfieldname": "outstanding_amount", 
+   "oldfieldtype": "Currency", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1, 
+   "search_index": 1
+  }, 
+  {
+   "fieldname": "column_break8", 
+   "fieldtype": "Column Break", 
+   "oldfieldtype": "Column Break", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0, 
+   "width": "50%"
+  }, 
+  {
+   "fieldname": "total_tax", 
+   "fieldtype": "Currency", 
+   "label": "Total Tax (Company Currency)", 
+   "oldfieldname": "total_tax", 
+   "oldfieldtype": "Currency", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "other_charges_added", 
+   "fieldtype": "Currency", 
+   "label": "Taxes and Charges Added (Company Currency)", 
+   "oldfieldname": "other_charges_added", 
+   "oldfieldtype": "Currency", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "other_charges_deducted", 
+   "fieldtype": "Currency", 
+   "label": "Taxes and Charges Deducted (Company Currency)", 
+   "oldfieldname": "other_charges_deducted", 
+   "oldfieldtype": "Currency", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "grand_total", 
+   "fieldtype": "Currency", 
+   "label": "Grand Total (Company Currency)", 
+   "oldfieldname": "grand_total", 
+   "oldfieldtype": "Currency", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1
+  }, 
+  {
+   "description": "In Words will be visible once you save the Purchase Invoice.", 
+   "fieldname": "in_words", 
+   "fieldtype": "Data", 
+   "label": "In Words (Company Currency)", 
+   "oldfieldname": "in_words", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "write_off_amount", 
+   "fieldtype": "Currency", 
+   "label": "Write Off Amount", 
+   "no_copy": 1, 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0
+  }, 
+  {
+   "depends_on": "eval:flt(doc.write_off_amount)!=0", 
+   "fieldname": "write_off_account", 
+   "fieldtype": "Link", 
+   "label": "Write Off Account", 
+   "no_copy": 1, 
+   "options": "Account", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0
+  }, 
+  {
+   "depends_on": "eval:flt(doc.write_off_amount)!=0", 
+   "fieldname": "write_off_cost_center", 
+   "fieldtype": "Link", 
+   "label": "Write Off Cost Center", 
+   "no_copy": 1, 
+   "options": "Cost Center", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "against_expense_account", 
+   "fieldtype": "Small Text", 
+   "hidden": 1, 
+   "label": "Against Expense Account", 
+   "no_copy": 1, 
+   "oldfieldname": "against_expense_account", 
+   "oldfieldtype": "Small Text", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0, 
+   "report_hide": 0
+  }, 
+  {
+   "fieldname": "advances", 
+   "fieldtype": "Section Break", 
+   "label": "Advances", 
+   "oldfieldtype": "Section Break", 
+   "options": "icon-money", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "get_advances_paid", 
+   "fieldtype": "Button", 
+   "label": "Get Advances Paid", 
+   "oldfieldtype": "Button", 
+   "options": "get_advances", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "advance_allocation_details", 
+   "fieldtype": "Table", 
+   "label": "Purchase Invoice Advances", 
+   "no_copy": 1, 
+   "oldfieldname": "advance_allocation_details", 
+   "oldfieldtype": "Table", 
+   "options": "Purchase Invoice Advance", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "terms_section_break", 
+   "fieldtype": "Section Break", 
+   "label": "Terms and Conditions", 
+   "options": "icon-legal", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "tc_name", 
+   "fieldtype": "Link", 
+   "label": "Terms", 
+   "options": "Terms and Conditions", 
+   "permlevel": 0, 
+   "print_hide": 1
+  }, 
+  {
+   "fieldname": "terms", 
+   "fieldtype": "Text Editor", 
+   "label": "Terms and Conditions1", 
+   "permlevel": 0
+  }, 
+  {
+   "depends_on": "supplier", 
+   "fieldname": "contact_section", 
+   "fieldtype": "Section Break", 
+   "label": "Contact Info", 
+   "options": "icon-bullhorn", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "supplier_address", 
+   "fieldtype": "Link", 
+   "label": "Supplier Address", 
+   "options": "Address", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "col_break23", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0, 
+   "read_only": 0, 
+   "width": "50%"
+  }, 
+  {
+   "fieldname": "contact_person", 
+   "fieldtype": "Link", 
+   "label": "Contact Person", 
+   "options": "Contact", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "more_info", 
+   "fieldtype": "Section Break", 
+   "label": "More Info", 
+   "oldfieldtype": "Section Break", 
+   "options": "icon-file-text", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0
+  }, 
+  {
+   "description": "Supplier (Payable) Account", 
+   "fieldname": "credit_to", 
+   "fieldtype": "Link", 
+   "in_filter": 1, 
+   "label": "Credit To", 
+   "oldfieldname": "credit_to", 
+   "oldfieldtype": "Link", 
+   "options": "Account", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0, 
+   "reqd": 1, 
+   "search_index": 1
+  }, 
+  {
+   "default": "No", 
+   "description": "Considered as Opening Balance", 
+   "fieldname": "is_opening", 
+   "fieldtype": "Select", 
+   "in_filter": 1, 
+   "label": "Is Opening", 
+   "oldfieldname": "is_opening", 
+   "oldfieldtype": "Select", 
+   "options": "No\nYes", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0, 
+   "search_index": 1
+  }, 
+  {
+   "description": "Actual Invoice Date", 
+   "fieldname": "aging_date", 
+   "fieldtype": "Date", 
+   "label": "Aging Date", 
+   "oldfieldname": "aging_date", 
+   "oldfieldtype": "Date", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0, 
+   "search_index": 0
+  }, 
+  {
+   "allow_on_submit": 1, 
+   "fieldname": "select_print_heading", 
+   "fieldtype": "Link", 
+   "label": "Print Heading", 
+   "no_copy": 1, 
+   "oldfieldname": "select_print_heading", 
+   "oldfieldtype": "Link", 
+   "options": "Print Heading", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0, 
+   "report_hide": 1
+  }, 
+  {
+   "fieldname": "due_date", 
+   "fieldtype": "Date", 
+   "in_filter": 1, 
+   "label": "Due Date", 
+   "no_copy": 0, 
+   "oldfieldname": "due_date", 
+   "oldfieldtype": "Date", 
+   "permlevel": 0, 
+   "print_hide": 0, 
+   "read_only": 0, 
+   "search_index": 1
+  }, 
+  {
+   "fieldname": "mode_of_payment", 
+   "fieldtype": "Select", 
+   "label": "Mode of Payment", 
+   "oldfieldname": "mode_of_payment", 
+   "oldfieldtype": "Select", 
+   "options": "link:Mode of Payment", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "column_break_63", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "allow_on_submit": 1, 
+   "fieldname": "letter_head", 
+   "fieldtype": "Select", 
+   "label": "Letter Head", 
+   "options": "link:Letter Head", 
+   "permlevel": 0, 
+   "print_hide": 1
+  }, 
+  {
+   "fieldname": "fiscal_year", 
+   "fieldtype": "Select", 
+   "in_filter": 1, 
+   "label": "Fiscal Year", 
+   "oldfieldname": "fiscal_year", 
+   "oldfieldtype": "Select", 
+   "options": "link:Fiscal Year", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0, 
+   "search_index": 1
+  }, 
+  {
+   "fieldname": "remarks", 
+   "fieldtype": "Small Text", 
+   "label": "Remarks", 
+   "no_copy": 1, 
+   "oldfieldname": "remarks", 
+   "oldfieldtype": "Text", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0, 
+   "reqd": 0
+  }
+ ], 
+ "icon": "icon-file-text", 
+ "idx": 1, 
+ "is_submittable": 1, 
+ "modified": "2014-02-17 12:01:59", 
+ "modified_by": "Administrator", 
+ "module": "Accounts", 
+ "name": "Purchase Invoice", 
+ "owner": "Administrator", 
+ "permissions": [
+  {
+   "amend": 0, 
+   "cancel": 0, 
+   "create": 0, 
+   "delete": 0, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Accounts User", 
+   "submit": 0, 
+   "write": 0
+  }, 
+  {
+   "amend": 0, 
+   "cancel": 0, 
+   "create": 0, 
+   "delete": 0, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Purchase User", 
+   "submit": 0, 
+   "write": 0
+  }, 
+  {
+   "amend": 0, 
+   "cancel": 0, 
+   "create": 0, 
+   "delete": 0, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Supplier", 
+   "submit": 0, 
+   "write": 0
+  }, 
+  {
+   "amend": 1, 
+   "cancel": 1, 
+   "create": 1, 
+   "delete": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Accounts Manager", 
+   "submit": 1, 
+   "write": 1
+  }, 
+  {
+   "amend": 0, 
+   "cancel": 0, 
+   "create": 0, 
+   "delete": 0, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Auditor", 
+   "submit": 0, 
+   "write": 0
+  }
+ ], 
+ "read_only_onload": 1, 
+ "search_fields": "posting_date, credit_to, fiscal_year, bill_no, grand_total, outstanding_amount"
+}
\ No newline at end of file
diff --git a/erpnext/accounts/doctype/purchase_invoice_advance/purchase_invoice_advance.txt b/erpnext/accounts/doctype/purchase_invoice_advance/purchase_invoice_advance.txt
index 98c8587..8b6c697 100644
--- a/erpnext/accounts/doctype/purchase_invoice_advance/purchase_invoice_advance.txt
+++ b/erpnext/accounts/doctype/purchase_invoice_advance/purchase_invoice_advance.txt
@@ -1,101 +1,88 @@
-[
- {
-  "creation": "2013-03-08 15:36:46", 
-  "docstatus": 0, 
-  "modified": "2014-02-03 12:38:24", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "doctype": "DocType", 
-  "istable": 1, 
-  "module": "Accounts", 
-  "name": "__common__"
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "Purchase Invoice Advance", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Purchase Invoice Advance"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "journal_voucher", 
-  "fieldtype": "Link", 
-  "in_list_view": 1, 
-  "label": "Journal Voucher", 
-  "no_copy": 1, 
-  "oldfieldname": "journal_voucher", 
-  "oldfieldtype": "Link", 
-  "options": "Journal Voucher", 
-  "print_width": "180px", 
-  "read_only": 1, 
-  "width": "180px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "jv_detail_no", 
-  "fieldtype": "Data", 
-  "hidden": 1, 
-  "in_list_view": 0, 
-  "label": "Journal Voucher Detail No", 
-  "no_copy": 1, 
-  "oldfieldname": "jv_detail_no", 
-  "oldfieldtype": "Date", 
-  "print_hide": 1, 
-  "print_width": "80px", 
-  "read_only": 1, 
-  "width": "80px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "remarks", 
-  "fieldtype": "Small Text", 
-  "in_list_view": 1, 
-  "label": "Remarks", 
-  "no_copy": 1, 
-  "oldfieldname": "remarks", 
-  "oldfieldtype": "Small Text", 
-  "print_width": "150px", 
-  "read_only": 1, 
-  "width": "150px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "col_break1", 
-  "fieldtype": "Column Break"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "advance_amount", 
-  "fieldtype": "Currency", 
-  "in_list_view": 1, 
-  "label": "Advance Amount", 
-  "no_copy": 1, 
-  "oldfieldname": "advance_amount", 
-  "oldfieldtype": "Currency", 
-  "options": "Company:company:default_currency", 
-  "print_width": "100px", 
-  "read_only": 1, 
-  "width": "100px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "allocated_amount", 
-  "fieldtype": "Currency", 
-  "in_list_view": 1, 
-  "label": "Allocated Amount", 
-  "no_copy": 1, 
-  "oldfieldname": "allocated_amount", 
-  "oldfieldtype": "Currency", 
-  "options": "Company:company:default_currency", 
-  "print_width": "100px", 
-  "width": "100px"
- }
-]
\ No newline at end of file
+{
+ "creation": "2013-03-08 15:36:46", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "fields": [
+  {
+   "fieldname": "journal_voucher", 
+   "fieldtype": "Link", 
+   "in_list_view": 1, 
+   "label": "Journal Voucher", 
+   "no_copy": 1, 
+   "oldfieldname": "journal_voucher", 
+   "oldfieldtype": "Link", 
+   "options": "Journal Voucher", 
+   "permlevel": 0, 
+   "print_width": "180px", 
+   "read_only": 1, 
+   "width": "180px"
+  }, 
+  {
+   "fieldname": "jv_detail_no", 
+   "fieldtype": "Data", 
+   "hidden": 1, 
+   "in_list_view": 0, 
+   "label": "Journal Voucher Detail No", 
+   "no_copy": 1, 
+   "oldfieldname": "jv_detail_no", 
+   "oldfieldtype": "Date", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "print_width": "80px", 
+   "read_only": 1, 
+   "width": "80px"
+  }, 
+  {
+   "fieldname": "remarks", 
+   "fieldtype": "Small Text", 
+   "in_list_view": 1, 
+   "label": "Remarks", 
+   "no_copy": 1, 
+   "oldfieldname": "remarks", 
+   "oldfieldtype": "Small Text", 
+   "permlevel": 0, 
+   "print_width": "150px", 
+   "read_only": 1, 
+   "width": "150px"
+  }, 
+  {
+   "fieldname": "col_break1", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "advance_amount", 
+   "fieldtype": "Currency", 
+   "in_list_view": 1, 
+   "label": "Advance Amount", 
+   "no_copy": 1, 
+   "oldfieldname": "advance_amount", 
+   "oldfieldtype": "Currency", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "print_width": "100px", 
+   "read_only": 1, 
+   "width": "100px"
+  }, 
+  {
+   "fieldname": "allocated_amount", 
+   "fieldtype": "Currency", 
+   "in_list_view": 1, 
+   "label": "Allocated Amount", 
+   "no_copy": 1, 
+   "oldfieldname": "allocated_amount", 
+   "oldfieldtype": "Currency", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "print_width": "100px", 
+   "width": "100px"
+  }
+ ], 
+ "idx": 1, 
+ "istable": 1, 
+ "modified": "2014-02-03 12:38:24", 
+ "modified_by": "Administrator", 
+ "module": "Accounts", 
+ "name": "Purchase Invoice Advance", 
+ "owner": "Administrator"
+}
\ No newline at end of file
diff --git a/erpnext/accounts/doctype/purchase_invoice_item/purchase_invoice_item.txt b/erpnext/accounts/doctype/purchase_invoice_item/purchase_invoice_item.txt
index b3562b3..1071f22 100755
--- a/erpnext/accounts/doctype/purchase_invoice_item/purchase_invoice_item.txt
+++ b/erpnext/accounts/doctype/purchase_invoice_item/purchase_invoice_item.txt
@@ -1,450 +1,437 @@
-[
- {
-  "creation": "2013-05-22 12:43:10", 
-  "docstatus": 0, 
-  "modified": "2014-02-28 11:27:53", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "autoname": "EVD.######", 
-  "doctype": "DocType", 
-  "istable": 1, 
-  "module": "Accounts", 
-  "name": "__common__"
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "Purchase Invoice Item", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Purchase Invoice Item"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "item_code", 
-  "fieldtype": "Link", 
-  "in_filter": 1, 
-  "in_list_view": 0, 
-  "label": "Item", 
-  "oldfieldname": "item_code", 
-  "oldfieldtype": "Link", 
-  "options": "Item", 
-  "print_hide": 1, 
-  "read_only": 0, 
-  "reqd": 0, 
-  "search_index": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "item_name", 
-  "fieldtype": "Data", 
-  "in_filter": 0, 
-  "in_list_view": 1, 
-  "label": "Item Name", 
-  "oldfieldname": "item_name", 
-  "oldfieldtype": "Data", 
-  "read_only": 0, 
-  "reqd": 1, 
-  "search_index": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "col_break1", 
-  "fieldtype": "Column Break"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "description", 
-  "fieldtype": "Text", 
-  "in_list_view": 1, 
-  "label": "Description", 
-  "oldfieldname": "description", 
-  "oldfieldtype": "Text", 
-  "print_width": "300px", 
-  "read_only": 0, 
-  "width": "300px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "quantity_and_rate", 
-  "fieldtype": "Section Break", 
-  "in_list_view": 0, 
-  "label": "Quantity and Rate"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "qty", 
-  "fieldtype": "Float", 
-  "in_list_view": 1, 
-  "label": "Qty", 
-  "oldfieldname": "qty", 
-  "oldfieldtype": "Currency", 
-  "print_hide": 0, 
-  "read_only": 0, 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "col_break2", 
-  "fieldtype": "Column Break"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "uom", 
-  "fieldtype": "Link", 
-  "in_list_view": 0, 
-  "label": "UOM", 
-  "options": "UOM", 
-  "print_hide": 1, 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "conversion_factor", 
-  "fieldtype": "Float", 
-  "in_list_view": 0, 
-  "label": "Conversion Factor", 
-  "print_hide": 1, 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "sec_break1", 
-  "fieldtype": "Section Break"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "price_list_rate", 
-  "fieldtype": "Currency", 
-  "in_list_view": 0, 
-  "label": "Price List Rate", 
-  "options": "currency", 
-  "print_hide": 1, 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "discount_percentage", 
-  "fieldtype": "Float", 
-  "in_list_view": 0, 
-  "label": "Discount %", 
-  "print_hide": 0, 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "col_break3", 
-  "fieldtype": "Column Break"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "base_price_list_rate", 
-  "fieldtype": "Currency", 
-  "in_list_view": 0, 
-  "label": "Price List Rate (Company Currency)", 
-  "options": "Company:company:default_currency", 
-  "print_hide": 1, 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "sec_break2", 
-  "fieldtype": "Section Break"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "rate", 
-  "fieldtype": "Currency", 
-  "in_list_view": 1, 
-  "label": "Rate ", 
-  "oldfieldname": "import_rate", 
-  "oldfieldtype": "Currency", 
-  "options": "currency", 
-  "print_hide": 0, 
-  "read_only": 0, 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "amount", 
-  "fieldtype": "Currency", 
-  "in_list_view": 1, 
-  "label": "Amount", 
-  "oldfieldname": "import_amount", 
-  "oldfieldtype": "Currency", 
-  "options": "currency", 
-  "read_only": 1, 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "col_break4", 
-  "fieldtype": "Column Break"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "base_rate", 
-  "fieldtype": "Currency", 
-  "in_list_view": 0, 
-  "label": "Rate (Company Currency)", 
-  "oldfieldname": "rate", 
-  "oldfieldtype": "Currency", 
-  "options": "Company:company:default_currency", 
-  "print_hide": 1, 
-  "read_only": 1, 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "base_amount", 
-  "fieldtype": "Currency", 
-  "in_list_view": 0, 
-  "label": "Amount (Company Currency)", 
-  "oldfieldname": "amount", 
-  "oldfieldtype": "Currency", 
-  "options": "Company:company:default_currency", 
-  "print_hide": 1, 
-  "read_only": 1, 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "pricing_rule_for_price", 
-  "fieldtype": "Link", 
-  "label": "Pricing Rule For Price", 
-  "options": "Pricing Rule", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "pricing_rule_for_discount", 
-  "fieldtype": "Link", 
-  "label": "Pricing Rule For Discount", 
-  "options": "Pricing Rule", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "accounting", 
-  "fieldtype": "Section Break", 
-  "in_list_view": 0, 
-  "label": "Accounting"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "expense_account", 
-  "fieldtype": "Link", 
-  "in_list_view": 0, 
-  "label": "Expense Head", 
-  "oldfieldname": "expense_head", 
-  "oldfieldtype": "Link", 
-  "options": "Account", 
-  "print_hide": 1, 
-  "print_width": "120px", 
-  "read_only": 0, 
-  "reqd": 0, 
-  "width": "120px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "col_break5", 
-  "fieldtype": "Column Break"
- }, 
- {
-  "default": ":Company", 
-  "doctype": "DocField", 
-  "fieldname": "cost_center", 
-  "fieldtype": "Link", 
-  "in_list_view": 0, 
-  "label": "Cost Center", 
-  "oldfieldname": "cost_center", 
-  "oldfieldtype": "Link", 
-  "options": "Cost Center", 
-  "print_hide": 1, 
-  "print_width": "120px", 
-  "read_only": 0, 
-  "width": "120px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "reference", 
-  "fieldtype": "Section Break", 
-  "in_list_view": 0, 
-  "label": "Reference"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "project_name", 
-  "fieldtype": "Link", 
-  "in_filter": 1, 
-  "in_list_view": 0, 
-  "label": "Project Name", 
-  "options": "Project", 
-  "print_hide": 1, 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "brand", 
-  "fieldtype": "Data", 
-  "hidden": 1, 
-  "in_list_view": 0, 
-  "label": "Brand", 
-  "oldfieldname": "brand", 
-  "oldfieldtype": "Data", 
-  "print_hide": 1, 
-  "read_only": 0
- }, 
- {
-  "description": "<a href=\"#Sales Browser/Item Group\">Add / Edit</a>", 
-  "doctype": "DocField", 
-  "fieldname": "item_group", 
-  "fieldtype": "Link", 
-  "hidden": 1, 
-  "in_filter": 1, 
-  "in_list_view": 0, 
-  "label": "Item Group", 
-  "oldfieldname": "item_group", 
-  "oldfieldtype": "Link", 
-  "options": "Item Group", 
-  "print_hide": 1, 
-  "read_only": 1, 
-  "search_index": 1
- }, 
- {
-  "description": "Tax detail table fetched from item master as a string and stored in this field.\nUsed for Taxes and Charges", 
-  "doctype": "DocField", 
-  "fieldname": "item_tax_rate", 
-  "fieldtype": "Small Text", 
-  "hidden": 1, 
-  "in_list_view": 0, 
-  "label": "Item Tax Rate", 
-  "oldfieldname": "item_tax_rate", 
-  "oldfieldtype": "Small Text", 
-  "print_hide": 1, 
-  "read_only": 1, 
-  "report_hide": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "item_tax_amount", 
-  "fieldtype": "Currency", 
-  "hidden": 1, 
-  "in_list_view": 0, 
-  "label": "Item Tax Amount", 
-  "no_copy": 1, 
-  "options": "Company:company:default_currency", 
-  "print_hide": 1, 
-  "print_width": "150px", 
-  "read_only": 1, 
-  "search_index": 0, 
-  "width": "150px"
- }, 
- {
-  "allow_on_submit": 1, 
-  "doctype": "DocField", 
-  "fieldname": "page_break", 
-  "fieldtype": "Check", 
-  "in_list_view": 0, 
-  "label": "Page Break", 
-  "no_copy": 1, 
-  "print_hide": 1, 
-  "read_only": 0, 
-  "report_hide": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "col_break6", 
-  "fieldtype": "Column Break"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "purchase_order", 
-  "fieldtype": "Link", 
-  "in_filter": 1, 
-  "in_list_view": 0, 
-  "label": "Purchase Order", 
-  "no_copy": 1, 
-  "oldfieldname": "purchase_order", 
-  "oldfieldtype": "Link", 
-  "options": "Purchase Order", 
-  "print_hide": 1, 
-  "read_only": 1, 
-  "search_index": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "po_detail", 
-  "fieldtype": "Data", 
-  "hidden": 1, 
-  "in_filter": 1, 
-  "in_list_view": 0, 
-  "label": "Purchase Order Item", 
-  "no_copy": 1, 
-  "oldfieldname": "po_detail", 
-  "oldfieldtype": "Data", 
-  "print_hide": 1, 
-  "read_only": 1, 
-  "search_index": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "purchase_receipt", 
-  "fieldtype": "Link", 
-  "in_filter": 1, 
-  "in_list_view": 0, 
-  "label": "Purchase Receipt", 
-  "no_copy": 1, 
-  "oldfieldname": "purchase_receipt", 
-  "oldfieldtype": "Link", 
-  "options": "Purchase Receipt", 
-  "print_hide": 1, 
-  "read_only": 1, 
-  "search_index": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "pr_detail", 
-  "fieldtype": "Data", 
-  "hidden": 1, 
-  "in_filter": 1, 
-  "in_list_view": 0, 
-  "label": "PR Detail", 
-  "no_copy": 1, 
-  "oldfieldname": "pr_detail", 
-  "oldfieldtype": "Data", 
-  "print_hide": 1, 
-  "read_only": 1, 
-  "search_index": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "valuation_rate", 
-  "fieldtype": "Currency", 
-  "hidden": 1, 
-  "in_list_view": 0, 
-  "label": "Valuation Rate", 
-  "no_copy": 1, 
-  "options": "Company:company:default_currency", 
-  "print_hide": 1, 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "rm_supp_cost", 
-  "fieldtype": "Currency", 
-  "hidden": 1, 
-  "in_list_view": 0, 
-  "label": "Raw Materials Supplied Cost", 
-  "no_copy": 1, 
-  "options": "Company:company:default_currency", 
-  "print_hide": 1, 
-  "read_only": 1
- }
-]
\ No newline at end of file
+{
+ "autoname": "EVD.######", 
+ "creation": "2013-05-22 12:43:10", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "fields": [
+  {
+   "fieldname": "item_code", 
+   "fieldtype": "Link", 
+   "in_filter": 1, 
+   "in_list_view": 0, 
+   "label": "Item", 
+   "oldfieldname": "item_code", 
+   "oldfieldtype": "Link", 
+   "options": "Item", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0, 
+   "reqd": 0, 
+   "search_index": 1
+  }, 
+  {
+   "fieldname": "item_name", 
+   "fieldtype": "Data", 
+   "in_filter": 0, 
+   "in_list_view": 1, 
+   "label": "Item Name", 
+   "oldfieldname": "item_name", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "read_only": 0, 
+   "reqd": 1, 
+   "search_index": 0
+  }, 
+  {
+   "fieldname": "col_break1", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "description", 
+   "fieldtype": "Text", 
+   "in_list_view": 1, 
+   "label": "Description", 
+   "oldfieldname": "description", 
+   "oldfieldtype": "Text", 
+   "permlevel": 0, 
+   "print_width": "300px", 
+   "read_only": 0, 
+   "width": "300px"
+  }, 
+  {
+   "fieldname": "quantity_and_rate", 
+   "fieldtype": "Section Break", 
+   "in_list_view": 0, 
+   "label": "Quantity and Rate", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "qty", 
+   "fieldtype": "Float", 
+   "in_list_view": 1, 
+   "label": "Qty", 
+   "oldfieldname": "qty", 
+   "oldfieldtype": "Currency", 
+   "permlevel": 0, 
+   "print_hide": 0, 
+   "read_only": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "col_break2", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "uom", 
+   "fieldtype": "Link", 
+   "in_list_view": 0, 
+   "label": "UOM", 
+   "options": "UOM", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "conversion_factor", 
+   "fieldtype": "Float", 
+   "in_list_view": 0, 
+   "label": "Conversion Factor", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "sec_break1", 
+   "fieldtype": "Section Break", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "price_list_rate", 
+   "fieldtype": "Currency", 
+   "in_list_view": 0, 
+   "label": "Price List Rate", 
+   "options": "currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "discount_percentage", 
+   "fieldtype": "Float", 
+   "in_list_view": 0, 
+   "label": "Discount %", 
+   "permlevel": 0, 
+   "print_hide": 0, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "col_break3", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "base_price_list_rate", 
+   "fieldtype": "Currency", 
+   "in_list_view": 0, 
+   "label": "Price List Rate (Company Currency)", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "sec_break2", 
+   "fieldtype": "Section Break", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "rate", 
+   "fieldtype": "Currency", 
+   "in_list_view": 1, 
+   "label": "Rate ", 
+   "oldfieldname": "import_rate", 
+   "oldfieldtype": "Currency", 
+   "options": "currency", 
+   "permlevel": 0, 
+   "print_hide": 0, 
+   "read_only": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "amount", 
+   "fieldtype": "Currency", 
+   "in_list_view": 1, 
+   "label": "Amount", 
+   "oldfieldname": "import_amount", 
+   "oldfieldtype": "Currency", 
+   "options": "currency", 
+   "permlevel": 0, 
+   "read_only": 1, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "col_break4", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "base_rate", 
+   "fieldtype": "Currency", 
+   "in_list_view": 0, 
+   "label": "Rate (Company Currency)", 
+   "oldfieldname": "rate", 
+   "oldfieldtype": "Currency", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "base_amount", 
+   "fieldtype": "Currency", 
+   "in_list_view": 0, 
+   "label": "Amount (Company Currency)", 
+   "oldfieldname": "amount", 
+   "oldfieldtype": "Currency", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "pricing_rule_for_price", 
+   "fieldtype": "Link", 
+   "label": "Pricing Rule For Price", 
+   "options": "Pricing Rule", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "pricing_rule_for_discount", 
+   "fieldtype": "Link", 
+   "label": "Pricing Rule For Discount", 
+   "options": "Pricing Rule", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "accounting", 
+   "fieldtype": "Section Break", 
+   "in_list_view": 0, 
+   "label": "Accounting", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "expense_account", 
+   "fieldtype": "Link", 
+   "in_list_view": 0, 
+   "label": "Expense Head", 
+   "oldfieldname": "expense_head", 
+   "oldfieldtype": "Link", 
+   "options": "Account", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "print_width": "120px", 
+   "read_only": 0, 
+   "reqd": 0, 
+   "width": "120px"
+  }, 
+  {
+   "fieldname": "col_break5", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0
+  }, 
+  {
+   "default": ":Company", 
+   "fieldname": "cost_center", 
+   "fieldtype": "Link", 
+   "in_list_view": 0, 
+   "label": "Cost Center", 
+   "oldfieldname": "cost_center", 
+   "oldfieldtype": "Link", 
+   "options": "Cost Center", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "print_width": "120px", 
+   "read_only": 0, 
+   "width": "120px"
+  }, 
+  {
+   "fieldname": "reference", 
+   "fieldtype": "Section Break", 
+   "in_list_view": 0, 
+   "label": "Reference", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "project_name", 
+   "fieldtype": "Link", 
+   "in_filter": 1, 
+   "in_list_view": 0, 
+   "label": "Project Name", 
+   "options": "Project", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "brand", 
+   "fieldtype": "Data", 
+   "hidden": 1, 
+   "in_list_view": 0, 
+   "label": "Brand", 
+   "oldfieldname": "brand", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0
+  }, 
+  {
+   "description": "<a href=\"#Sales Browser/Item Group\">Add / Edit</a>", 
+   "fieldname": "item_group", 
+   "fieldtype": "Link", 
+   "hidden": 1, 
+   "in_filter": 1, 
+   "in_list_view": 0, 
+   "label": "Item Group", 
+   "oldfieldname": "item_group", 
+   "oldfieldtype": "Link", 
+   "options": "Item Group", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1, 
+   "search_index": 1
+  }, 
+  {
+   "description": "Tax detail table fetched from item master as a string and stored in this field.\nUsed for Taxes and Charges", 
+   "fieldname": "item_tax_rate", 
+   "fieldtype": "Small Text", 
+   "hidden": 1, 
+   "in_list_view": 0, 
+   "label": "Item Tax Rate", 
+   "oldfieldname": "item_tax_rate", 
+   "oldfieldtype": "Small Text", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1, 
+   "report_hide": 1
+  }, 
+  {
+   "fieldname": "item_tax_amount", 
+   "fieldtype": "Currency", 
+   "hidden": 1, 
+   "in_list_view": 0, 
+   "label": "Item Tax Amount", 
+   "no_copy": 1, 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "print_width": "150px", 
+   "read_only": 1, 
+   "search_index": 0, 
+   "width": "150px"
+  }, 
+  {
+   "allow_on_submit": 1, 
+   "fieldname": "page_break", 
+   "fieldtype": "Check", 
+   "in_list_view": 0, 
+   "label": "Page Break", 
+   "no_copy": 1, 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0, 
+   "report_hide": 1
+  }, 
+  {
+   "fieldname": "col_break6", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "purchase_order", 
+   "fieldtype": "Link", 
+   "in_filter": 1, 
+   "in_list_view": 0, 
+   "label": "Purchase Order", 
+   "no_copy": 1, 
+   "oldfieldname": "purchase_order", 
+   "oldfieldtype": "Link", 
+   "options": "Purchase Order", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1, 
+   "search_index": 1
+  }, 
+  {
+   "fieldname": "po_detail", 
+   "fieldtype": "Data", 
+   "hidden": 1, 
+   "in_filter": 1, 
+   "in_list_view": 0, 
+   "label": "Purchase Order Item", 
+   "no_copy": 1, 
+   "oldfieldname": "po_detail", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1, 
+   "search_index": 1
+  }, 
+  {
+   "fieldname": "purchase_receipt", 
+   "fieldtype": "Link", 
+   "in_filter": 1, 
+   "in_list_view": 0, 
+   "label": "Purchase Receipt", 
+   "no_copy": 1, 
+   "oldfieldname": "purchase_receipt", 
+   "oldfieldtype": "Link", 
+   "options": "Purchase Receipt", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1, 
+   "search_index": 1
+  }, 
+  {
+   "fieldname": "pr_detail", 
+   "fieldtype": "Data", 
+   "hidden": 1, 
+   "in_filter": 1, 
+   "in_list_view": 0, 
+   "label": "PR Detail", 
+   "no_copy": 1, 
+   "oldfieldname": "pr_detail", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1, 
+   "search_index": 1
+  }, 
+  {
+   "fieldname": "valuation_rate", 
+   "fieldtype": "Currency", 
+   "hidden": 1, 
+   "in_list_view": 0, 
+   "label": "Valuation Rate", 
+   "no_copy": 1, 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "rm_supp_cost", 
+   "fieldtype": "Currency", 
+   "hidden": 1, 
+   "in_list_view": 0, 
+   "label": "Raw Materials Supplied Cost", 
+   "no_copy": 1, 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1
+  }
+ ], 
+ "idx": 1, 
+ "istable": 1, 
+ "modified": "2014-02-28 11:27:53", 
+ "modified_by": "Administrator", 
+ "module": "Accounts", 
+ "name": "Purchase Invoice Item", 
+ "owner": "Administrator"
+}
\ No newline at end of file
diff --git a/erpnext/accounts/doctype/purchase_taxes_and_charges/purchase_taxes_and_charges.txt b/erpnext/accounts/doctype/purchase_taxes_and_charges/purchase_taxes_and_charges.txt
index c5768c6..f95d361 100644
--- a/erpnext/accounts/doctype/purchase_taxes_and_charges/purchase_taxes_and_charges.txt
+++ b/erpnext/accounts/doctype/purchase_taxes_and_charges/purchase_taxes_and_charges.txt
@@ -1,175 +1,162 @@
-[
- {
-  "creation": "2013-05-21 16:16:04", 
-  "docstatus": 0, 
-  "modified": "2014-02-03 12:36:04", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "autoname": "PVTD.######", 
-  "doctype": "DocType", 
-  "hide_heading": 1, 
-  "istable": 1, 
-  "module": "Accounts", 
-  "name": "__common__"
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "Purchase Taxes and Charges", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Purchase Taxes and Charges"
- }, 
- {
-  "default": "Valuation and Total", 
-  "doctype": "DocField", 
-  "fieldname": "category", 
-  "fieldtype": "Select", 
-  "in_list_view": 0, 
-  "label": "Consider Tax or Charge for", 
-  "oldfieldname": "category", 
-  "oldfieldtype": "Select", 
-  "options": "Valuation and Total\nValuation\nTotal", 
-  "read_only": 0, 
-  "reqd": 1
- }, 
- {
-  "default": "Add", 
-  "doctype": "DocField", 
-  "fieldname": "add_deduct_tax", 
-  "fieldtype": "Select", 
-  "label": "Add or Deduct", 
-  "oldfieldname": "add_deduct_tax", 
-  "oldfieldtype": "Select", 
-  "options": "Add\nDeduct", 
-  "read_only": 0, 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "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", 
-  "read_only": 0, 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "row_id", 
-  "fieldtype": "Data", 
-  "hidden": 0, 
-  "label": "Enter Row", 
-  "oldfieldname": "row_id", 
-  "oldfieldtype": "Data", 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "description", 
-  "fieldtype": "Small Text", 
-  "in_list_view": 1, 
-  "label": "Description", 
-  "oldfieldname": "description", 
-  "oldfieldtype": "Small Text", 
-  "print_width": "300px", 
-  "read_only": 0, 
-  "reqd": 1, 
-  "width": "300px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "col_break1", 
-  "fieldtype": "Column Break"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "account_head", 
-  "fieldtype": "Link", 
-  "in_list_view": 0, 
-  "label": "Account Head", 
-  "oldfieldname": "account_head", 
-  "oldfieldtype": "Link", 
-  "options": "Account", 
-  "read_only": 0, 
-  "reqd": 1
- }, 
- {
-  "default": ":Company", 
-  "doctype": "DocField", 
-  "fieldname": "cost_center", 
-  "fieldtype": "Link", 
-  "in_list_view": 0, 
-  "label": "Cost Center", 
-  "oldfieldname": "cost_center", 
-  "oldfieldtype": "Link", 
-  "options": "Cost Center", 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "rate", 
-  "fieldtype": "Float", 
-  "in_list_view": 1, 
-  "label": "Rate", 
-  "oldfieldname": "rate", 
-  "oldfieldtype": "Currency", 
-  "read_only": 0, 
-  "reqd": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "tax_amount", 
-  "fieldtype": "Currency", 
-  "in_list_view": 1, 
-  "label": "Amount", 
-  "oldfieldname": "tax_amount", 
-  "oldfieldtype": "Currency", 
-  "options": "Company:company:default_currency", 
-  "read_only": 1, 
-  "reqd": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "total", 
-  "fieldtype": "Currency", 
-  "label": "Total", 
-  "oldfieldname": "total", 
-  "oldfieldtype": "Currency", 
-  "options": "Company:company:default_currency", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "item_wise_tax_detail", 
-  "fieldtype": "Small Text", 
-  "hidden": 1, 
-  "label": "Item Wise Tax Detail ", 
-  "oldfieldname": "item_wise_tax_detail", 
-  "oldfieldtype": "Small Text", 
-  "print_hide": 1, 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "parenttype", 
-  "fieldtype": "Data", 
-  "hidden": 1, 
-  "in_filter": 1, 
-  "label": "Parenttype", 
-  "oldfieldname": "parenttype", 
-  "oldfieldtype": "Data", 
-  "print_hide": 1, 
-  "read_only": 0, 
-  "search_index": 0
- }
-]
\ No newline at end of file
+{
+ "autoname": "PVTD.######", 
+ "creation": "2013-05-21 16:16:04", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "fields": [
+  {
+   "default": "Valuation and Total", 
+   "fieldname": "category", 
+   "fieldtype": "Select", 
+   "in_list_view": 0, 
+   "label": "Consider Tax or Charge for", 
+   "oldfieldname": "category", 
+   "oldfieldtype": "Select", 
+   "options": "Valuation and Total\nValuation\nTotal", 
+   "permlevel": 0, 
+   "read_only": 0, 
+   "reqd": 1
+  }, 
+  {
+   "default": "Add", 
+   "fieldname": "add_deduct_tax", 
+   "fieldtype": "Select", 
+   "label": "Add or Deduct", 
+   "oldfieldname": "add_deduct_tax", 
+   "oldfieldtype": "Select", 
+   "options": "Add\nDeduct", 
+   "permlevel": 0, 
+   "read_only": 0, 
+   "reqd": 1
+  }, 
+  {
+   "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, 
+   "read_only": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "row_id", 
+   "fieldtype": "Data", 
+   "hidden": 0, 
+   "label": "Enter Row", 
+   "oldfieldname": "row_id", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "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": "col_break1", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "account_head", 
+   "fieldtype": "Link", 
+   "in_list_view": 0, 
+   "label": "Account Head", 
+   "oldfieldname": "account_head", 
+   "oldfieldtype": "Link", 
+   "options": "Account", 
+   "permlevel": 0, 
+   "read_only": 0, 
+   "reqd": 1
+  }, 
+  {
+   "default": ":Company", 
+   "fieldname": "cost_center", 
+   "fieldtype": "Link", 
+   "in_list_view": 0, 
+   "label": "Cost Center", 
+   "oldfieldname": "cost_center", 
+   "oldfieldtype": "Link", 
+   "options": "Cost Center", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "rate", 
+   "fieldtype": "Float", 
+   "in_list_view": 1, 
+   "label": "Rate", 
+   "oldfieldname": "rate", 
+   "oldfieldtype": "Currency", 
+   "permlevel": 0, 
+   "read_only": 0, 
+   "reqd": 0
+  }, 
+  {
+   "fieldname": "tax_amount", 
+   "fieldtype": "Currency", 
+   "in_list_view": 1, 
+   "label": "Amount", 
+   "oldfieldname": "tax_amount", 
+   "oldfieldtype": "Currency", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "read_only": 1, 
+   "reqd": 0
+  }, 
+  {
+   "fieldname": "total", 
+   "fieldtype": "Currency", 
+   "label": "Total", 
+   "oldfieldname": "total", 
+   "oldfieldtype": "Currency", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "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, 
+   "print_hide": 1, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "parenttype", 
+   "fieldtype": "Data", 
+   "hidden": 1, 
+   "in_filter": 1, 
+   "label": "Parenttype", 
+   "oldfieldname": "parenttype", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0, 
+   "search_index": 0
+  }
+ ], 
+ "hide_heading": 1, 
+ "idx": 1, 
+ "istable": 1, 
+ "modified": "2014-02-03 12:36:04", 
+ "modified_by": "Administrator", 
+ "module": "Accounts", 
+ "name": "Purchase Taxes and Charges", 
+ "owner": "Administrator"
+}
\ No newline at end of file
diff --git a/erpnext/accounts/doctype/purchase_taxes_and_charges_master/purchase_taxes_and_charges_master.txt b/erpnext/accounts/doctype/purchase_taxes_and_charges_master/purchase_taxes_and_charges_master.txt
index 346dd0e..4edc055 100644
--- a/erpnext/accounts/doctype/purchase_taxes_and_charges_master/purchase_taxes_and_charges_master.txt
+++ b/erpnext/accounts/doctype/purchase_taxes_and_charges_master/purchase_taxes_and_charges_master.txt
@@ -1,96 +1,83 @@
-[
- {
-  "creation": "2013-01-10 16:34:08", 
-  "docstatus": 0, 
-  "modified": "2014-01-29 12:26:38", 
-  "modified_by": "Administrator", 
-  "owner": "wasim@webnotestech.com"
- }, 
- {
-  "allow_import": 1, 
-  "allow_rename": 1, 
-  "autoname": "field:title", 
-  "description": "Standard tax template that can be applied to all Purchase Transactions. This template can contain list of tax heads and also other expense heads like \"Shipping\", \"Insurance\", \"Handling\" etc.\n\n#### Note\n\nThe tax rate you define here will be the standard tax rate for all **Items**. If there are **Items** that have different rates, they must be added in the **Item Tax** table in the **Item** master.\n\n#### Description of Columns\n\n1. Calculation Type: \n    - This can be on **Net Total** (that is the sum of basic amount).\n    - **On Previous Row Total / Amount** (for cumulative taxes or charges). If you select this option, the tax will be applied as a percentage of the previous row (in the tax table) amount or total.\n    - **Actual** (as mentioned).\n2. Account Head: The Account ledger under which this tax will be booked\n3. Cost Center: If the tax / charge is an income (like shipping) or expense it needs to be booked against a Cost Center.\n4. Description: Description of the tax (that will be printed in invoices / quotes).\n5. Rate: Tax rate.\n6. Amount: Tax amount.\n7. Total: Cumulative total to this point.\n8. Enter Row: If based on \"Previous Row Total\" you can select the row number which will be taken as a base for this calculation (default is the previous row).\n9. Consider Tax or Charge for: In this section you can specify if the tax / charge is only for valuation (not a part of total) or only for total (does not add value to the item) or for both.\n10. Add or Deduct: Whether you want to add or deduct the tax.", 
-  "doctype": "DocType", 
-  "document_type": "Master", 
-  "icon": "icon-money", 
-  "module": "Accounts", 
-  "name": "__common__"
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "Purchase Taxes and Charges Master", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "cancel": 0, 
-  "doctype": "DocPerm", 
-  "email": 1, 
-  "name": "__common__", 
-  "parent": "Purchase Taxes and Charges Master", 
-  "parentfield": "permissions", 
-  "parenttype": "DocType", 
-  "permlevel": 0, 
-  "print": 1, 
-  "read": 1, 
-  "report": 1, 
-  "submit": 0
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Purchase Taxes and Charges Master"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "title", 
-  "fieldtype": "Data", 
-  "in_filter": 1, 
-  "label": "Title", 
-  "oldfieldname": "title", 
-  "oldfieldtype": "Data", 
-  "reqd": 1, 
-  "search_index": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "is_default", 
-  "fieldtype": "Check", 
-  "label": "Default"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "company", 
-  "fieldtype": "Link", 
-  "in_filter": 1, 
-  "label": "Company", 
-  "options": "Company", 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "other_charges", 
-  "fieldtype": "Table", 
-  "label": "Purchase Taxes and Charges", 
-  "oldfieldname": "purchase_tax_details", 
-  "oldfieldtype": "Table", 
-  "options": "Purchase Taxes and Charges"
- }, 
- {
-  "amend": 0, 
-  "create": 0, 
-  "delete": 0, 
-  "doctype": "DocPerm", 
-  "role": "Purchase Manager", 
-  "write": 0
- }, 
- {
-  "create": 1, 
-  "delete": 1, 
-  "doctype": "DocPerm", 
-  "role": "Purchase Master Manager", 
-  "write": 1
- }
-]
\ No newline at end of file
+{
+ "allow_import": 1, 
+ "allow_rename": 1, 
+ "autoname": "field:title", 
+ "creation": "2013-01-10 16:34:08", 
+ "description": "Standard tax template that can be applied to all Purchase Transactions. This template can contain list of tax heads and also other expense heads like \"Shipping\", \"Insurance\", \"Handling\" etc.\n\n#### Note\n\nThe tax rate you define here will be the standard tax rate for all **Items**. If there are **Items** that have different rates, they must be added in the **Item Tax** table in the **Item** master.\n\n#### Description of Columns\n\n1. Calculation Type: \n    - This can be on **Net Total** (that is the sum of basic amount).\n    - **On Previous Row Total / Amount** (for cumulative taxes or charges). If you select this option, the tax will be applied as a percentage of the previous row (in the tax table) amount or total.\n    - **Actual** (as mentioned).\n2. Account Head: The Account ledger under which this tax will be booked\n3. Cost Center: If the tax / charge is an income (like shipping) or expense it needs to be booked against a Cost Center.\n4. Description: Description of the tax (that will be printed in invoices / quotes).\n5. Rate: Tax rate.\n6. Amount: Tax amount.\n7. Total: Cumulative total to this point.\n8. Enter Row: If based on \"Previous Row Total\" you can select the row number which will be taken as a base for this calculation (default is the previous row).\n9. Consider Tax or Charge for: In this section you can specify if the tax / charge is only for valuation (not a part of total) or only for total (does not add value to the item) or for both.\n10. Add or Deduct: Whether you want to add or deduct the tax.", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "document_type": "Master", 
+ "fields": [
+  {
+   "fieldname": "title", 
+   "fieldtype": "Data", 
+   "in_filter": 1, 
+   "label": "Title", 
+   "oldfieldname": "title", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "reqd": 1, 
+   "search_index": 0
+  }, 
+  {
+   "fieldname": "is_default", 
+   "fieldtype": "Check", 
+   "label": "Default", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "company", 
+   "fieldtype": "Link", 
+   "in_filter": 1, 
+   "label": "Company", 
+   "options": "Company", 
+   "permlevel": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "other_charges", 
+   "fieldtype": "Table", 
+   "label": "Purchase Taxes and Charges", 
+   "oldfieldname": "purchase_tax_details", 
+   "oldfieldtype": "Table", 
+   "options": "Purchase Taxes and Charges", 
+   "permlevel": 0
+  }
+ ], 
+ "icon": "icon-money", 
+ "idx": 1, 
+ "modified": "2014-01-29 12:26:38", 
+ "modified_by": "Administrator", 
+ "module": "Accounts", 
+ "name": "Purchase Taxes and Charges Master", 
+ "owner": "wasim@webnotestech.com", 
+ "permissions": [
+  {
+   "amend": 0, 
+   "cancel": 0, 
+   "create": 0, 
+   "delete": 0, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Purchase Manager", 
+   "submit": 0, 
+   "write": 0
+  }, 
+  {
+   "cancel": 0, 
+   "create": 1, 
+   "delete": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Purchase Master Manager", 
+   "submit": 0, 
+   "write": 1
+  }
+ ]
+}
\ No newline at end of file
diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.txt b/erpnext/accounts/doctype/sales_invoice/sales_invoice.txt
index 49cc213..1da1c39 100644
--- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.txt
+++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.txt
@@ -1,1239 +1,1228 @@
-[
- {
-  "creation": "2013-05-24 19:29:05", 
-  "docstatus": 0, 
-  "modified": "2014-01-28 18:43:10", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "allow_attach": 1, 
-  "allow_import": 1, 
-  "autoname": "naming_series:", 
-  "default_print_format": "Standard", 
-  "doctype": "DocType", 
-  "document_type": "Transaction", 
-  "icon": "icon-file-text", 
-  "is_submittable": 1, 
-  "module": "Accounts", 
-  "name": "__common__", 
-  "read_only_onload": 1, 
-  "search_fields": "posting_date, due_date, debit_to, fiscal_year, grand_total, outstanding_amount"
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "Sales Invoice", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "doctype": "DocPerm", 
-  "email": 1, 
-  "name": "__common__", 
-  "parent": "Sales Invoice", 
-  "parentfield": "permissions", 
-  "parenttype": "DocType", 
-  "permlevel": 0, 
-  "print": 1, 
-  "read": 1, 
-  "report": 1
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Sales Invoice"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "customer_section", 
-  "fieldtype": "Section Break", 
-  "label": "Customer", 
-  "options": "icon-user"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "naming_series", 
-  "fieldtype": "Select", 
-  "label": "Series", 
-  "no_copy": 1, 
-  "oldfieldname": "naming_series", 
-  "oldfieldtype": "Select", 
-  "options": "INV\nINV/10-11/", 
-  "print_hide": 1, 
-  "read_only": 0, 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "customer", 
-  "fieldtype": "Link", 
-  "hidden": 0, 
-  "label": "Customer", 
-  "no_copy": 0, 
-  "oldfieldname": "customer", 
-  "oldfieldtype": "Link", 
-  "options": "Customer", 
-  "print_hide": 1, 
-  "read_only": 0
- }, 
- {
-  "depends_on": "customer", 
-  "doctype": "DocField", 
-  "fieldname": "customer_name", 
-  "fieldtype": "Data", 
-  "hidden": 0, 
-  "in_list_view": 1, 
-  "label": "Name", 
-  "oldfieldname": "customer_name", 
-  "oldfieldtype": "Data", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "address_display", 
-  "fieldtype": "Small Text", 
-  "hidden": 1, 
-  "label": "Address", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "contact_display", 
-  "fieldtype": "Small Text", 
-  "hidden": 1, 
-  "label": "Contact", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "contact_mobile", 
-  "fieldtype": "Text", 
-  "hidden": 1, 
-  "label": "Mobile No", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "contact_email", 
-  "fieldtype": "Text", 
-  "hidden": 1, 
-  "label": "Contact Email", 
-  "print_hide": 1, 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break1", 
-  "fieldtype": "Column Break", 
-  "oldfieldtype": "Column Break", 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "is_pos", 
-  "fieldtype": "Check", 
-  "label": "Is POS", 
-  "oldfieldname": "is_pos", 
-  "oldfieldtype": "Check", 
-  "print_hide": 1, 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "amended_from", 
-  "fieldtype": "Link", 
-  "ignore_restrictions": 1, 
-  "label": "Amended From", 
-  "no_copy": 1, 
-  "oldfieldname": "amended_from", 
-  "oldfieldtype": "Link", 
-  "options": "Sales Invoice", 
-  "print_hide": 1, 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "company", 
-  "fieldtype": "Link", 
-  "in_filter": 1, 
-  "label": "Company", 
-  "oldfieldname": "company", 
-  "oldfieldtype": "Link", 
-  "options": "Company", 
-  "print_hide": 1, 
-  "read_only": 0, 
-  "reqd": 1, 
-  "search_index": 0
- }, 
- {
-  "default": "Today", 
-  "doctype": "DocField", 
-  "fieldname": "posting_date", 
-  "fieldtype": "Date", 
-  "in_filter": 1, 
-  "label": "Posting Date", 
-  "no_copy": 1, 
-  "oldfieldname": "posting_date", 
-  "oldfieldtype": "Date", 
-  "print_hide": 0, 
-  "read_only": 0, 
-  "reqd": 1, 
-  "search_index": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "due_date", 
-  "fieldtype": "Date", 
-  "in_filter": 1, 
-  "label": "Payment Due Date", 
-  "no_copy": 1, 
-  "oldfieldname": "due_date", 
-  "oldfieldtype": "Date", 
-  "read_only": 0, 
-  "reqd": 1, 
-  "search_index": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "mode_of_payment", 
-  "fieldtype": "Select", 
-  "label": "Mode of Payment", 
-  "no_copy": 0, 
-  "oldfieldname": "mode_of_payment", 
-  "oldfieldtype": "Select", 
-  "options": "link:Mode of Payment", 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "currency_section", 
-  "fieldtype": "Section Break", 
-  "label": "Currency and Price List", 
-  "options": "icon-tag", 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "currency", 
-  "fieldtype": "Link", 
-  "label": "Currency", 
-  "oldfieldname": "currency", 
-  "oldfieldtype": "Select", 
-  "options": "Currency", 
-  "print_hide": 1, 
-  "read_only": 0, 
-  "reqd": 1
- }, 
- {
-  "description": "Rate at which Customer Currency is converted to customer's base currency", 
-  "doctype": "DocField", 
-  "fieldname": "conversion_rate", 
-  "fieldtype": "Float", 
-  "label": "Exchange Rate", 
-  "oldfieldname": "conversion_rate", 
-  "oldfieldtype": "Currency", 
-  "print_hide": 1, 
-  "read_only": 0, 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break2", 
-  "fieldtype": "Column Break", 
-  "read_only": 0, 
-  "width": "50%"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "selling_price_list", 
-  "fieldtype": "Link", 
-  "label": "Price List", 
-  "oldfieldname": "price_list_name", 
-  "oldfieldtype": "Select", 
-  "options": "Price List", 
-  "print_hide": 1, 
-  "read_only": 0, 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "price_list_currency", 
-  "fieldtype": "Link", 
-  "label": "Price List Currency", 
-  "options": "Currency", 
-  "print_hide": 1, 
-  "read_only": 1, 
-  "reqd": 1
- }, 
- {
-  "description": "Rate at which Price list currency is converted to customer's base currency", 
-  "doctype": "DocField", 
-  "fieldname": "plc_conversion_rate", 
-  "fieldtype": "Float", 
-  "label": "Price List Exchange Rate", 
-  "no_copy": 0, 
-  "print_hide": 1, 
-  "read_only": 0, 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "items", 
-  "fieldtype": "Section Break", 
-  "label": "Items", 
-  "oldfieldtype": "Section Break", 
-  "options": "icon-shopping-cart", 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "update_stock", 
-  "fieldtype": "Check", 
-  "label": "Update Stock", 
-  "oldfieldname": "update_stock", 
-  "oldfieldtype": "Check", 
-  "print_hide": 1, 
-  "read_only": 0
- }, 
- {
-  "allow_on_submit": 1, 
-  "doctype": "DocField", 
-  "fieldname": "entries", 
-  "fieldtype": "Table", 
-  "label": "Sales Invoice Items", 
-  "oldfieldname": "entries", 
-  "oldfieldtype": "Table", 
-  "options": "Sales Invoice Item", 
-  "read_only": 0, 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "packing_list", 
-  "fieldtype": "Section Break", 
-  "label": "Packing List", 
-  "options": "icon-suitcase", 
-  "print_hide": 1, 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "packing_details", 
-  "fieldtype": "Table", 
-  "label": "Packing Details", 
-  "options": "Packed Item", 
-  "print_hide": 1, 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "sales_bom_help", 
-  "fieldtype": "HTML", 
-  "label": "Sales BOM Help", 
-  "print_hide": 1, 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "section_break_30", 
-  "fieldtype": "Section Break"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "net_total_export", 
-  "fieldtype": "Currency", 
-  "label": "Net Total", 
-  "options": "currency", 
-  "print_hide": 0, 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break_32", 
-  "fieldtype": "Column Break"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "net_total", 
-  "fieldtype": "Currency", 
-  "label": "Net Total (Company Currency)", 
-  "oldfieldname": "net_total", 
-  "oldfieldtype": "Currency", 
-  "options": "Company:company:default_currency", 
-  "print_hide": 1, 
-  "read_only": 1, 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "taxes", 
-  "fieldtype": "Section Break", 
-  "label": "Taxes and Charges", 
-  "oldfieldtype": "Section Break", 
-  "options": "icon-money", 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "taxes_and_charges", 
-  "fieldtype": "Link", 
-  "label": "Taxes and Charges", 
-  "oldfieldname": "charge", 
-  "oldfieldtype": "Link", 
-  "options": "Sales Taxes and Charges Master", 
-  "print_hide": 1, 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break_38", 
-  "fieldtype": "Column Break"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "shipping_rule", 
-  "fieldtype": "Link", 
-  "label": "Shipping Rule", 
-  "oldfieldtype": "Button", 
-  "options": "Shipping Rule", 
-  "print_hide": 1, 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "section_break_40", 
-  "fieldtype": "Section Break"
- }, 
- {
-  "allow_on_submit": 1, 
-  "doctype": "DocField", 
-  "fieldname": "other_charges", 
-  "fieldtype": "Table", 
-  "label": "Sales Taxes and Charges", 
-  "oldfieldname": "other_charges", 
-  "oldfieldtype": "Table", 
-  "options": "Sales Taxes and Charges", 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "other_charges_calculation", 
-  "fieldtype": "HTML", 
-  "label": "Taxes and Charges Calculation", 
-  "oldfieldtype": "HTML", 
-  "print_hide": 1, 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "section_break_43", 
-  "fieldtype": "Section Break"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "other_charges_total_export", 
-  "fieldtype": "Currency", 
-  "label": "Total Taxes and Charges", 
-  "options": "currency", 
-  "print_hide": 1, 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break_45", 
-  "fieldtype": "Column Break"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "other_charges_total", 
-  "fieldtype": "Currency", 
-  "label": "Total Taxes and Charges (Company Currency)", 
-  "oldfieldname": "other_charges_total", 
-  "oldfieldtype": "Currency", 
-  "options": "Company:company:default_currency", 
-  "print_hide": 1, 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "discount_amount", 
-  "fieldtype": "Currency", 
-  "label": "Discount Amount", 
-  "options": "Company:company:default_currency", 
-  "print_hide": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "totals", 
-  "fieldtype": "Section Break", 
-  "label": "Totals", 
-  "oldfieldtype": "Section Break", 
-  "options": "icon-money", 
-  "print_hide": 1, 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "grand_total_export", 
-  "fieldtype": "Currency", 
-  "in_list_view": 1, 
-  "label": "Grand Total", 
-  "oldfieldname": "grand_total_export", 
-  "oldfieldtype": "Currency", 
-  "options": "currency", 
-  "print_hide": 0, 
-  "read_only": 1, 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "rounded_total_export", 
-  "fieldtype": "Currency", 
-  "label": "Rounded Total", 
-  "oldfieldname": "rounded_total_export", 
-  "oldfieldtype": "Currency", 
-  "options": "currency", 
-  "print_hide": 0, 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "in_words_export", 
-  "fieldtype": "Data", 
-  "label": "In Words", 
-  "oldfieldname": "in_words_export", 
-  "oldfieldtype": "Data", 
-  "print_hide": 0, 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "gross_profit", 
-  "fieldtype": "Currency", 
-  "label": "Gross Profit", 
-  "oldfieldname": "gross_profit", 
-  "oldfieldtype": "Currency", 
-  "options": "Company:company:default_currency", 
-  "print_hide": 1, 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "gross_profit_percent", 
-  "fieldtype": "Float", 
-  "label": "Gross Profit (%)", 
-  "oldfieldname": "gross_profit_percent", 
-  "oldfieldtype": "Currency", 
-  "print_hide": 1, 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break5", 
-  "fieldtype": "Column Break", 
-  "oldfieldtype": "Column Break", 
-  "print_hide": 1, 
-  "read_only": 0, 
-  "width": "50%"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "grand_total", 
-  "fieldtype": "Currency", 
-  "in_filter": 1, 
-  "label": "Grand Total (Company Currency)", 
-  "oldfieldname": "grand_total", 
-  "oldfieldtype": "Currency", 
-  "options": "Company:company:default_currency", 
-  "print_hide": 1, 
-  "read_only": 1, 
-  "reqd": 1, 
-  "search_index": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "rounded_total", 
-  "fieldtype": "Currency", 
-  "label": "Rounded Total (Company Currency)", 
-  "oldfieldname": "rounded_total", 
-  "oldfieldtype": "Currency", 
-  "options": "Company:company:default_currency", 
-  "print_hide": 1, 
-  "read_only": 1
- }, 
- {
-  "description": "In Words will be visible once you save the Sales Invoice.", 
-  "doctype": "DocField", 
-  "fieldname": "in_words", 
-  "fieldtype": "Data", 
-  "label": "In Words (Company Currency)", 
-  "oldfieldname": "in_words", 
-  "oldfieldtype": "Data", 
-  "print_hide": 1, 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "total_advance", 
-  "fieldtype": "Currency", 
-  "label": "Total Advance", 
-  "oldfieldname": "total_advance", 
-  "oldfieldtype": "Currency", 
-  "options": "Company:company:default_currency", 
-  "print_hide": 1, 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "outstanding_amount", 
-  "fieldtype": "Currency", 
-  "in_list_view": 1, 
-  "label": "Outstanding Amount", 
-  "no_copy": 1, 
-  "oldfieldname": "outstanding_amount", 
-  "oldfieldtype": "Currency", 
-  "options": "Company:company:default_currency", 
-  "print_hide": 1, 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "advances", 
-  "fieldtype": "Section Break", 
-  "label": "Advances", 
-  "oldfieldtype": "Section Break", 
-  "options": "icon-money", 
-  "print_hide": 1, 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "get_advances_received", 
-  "fieldtype": "Button", 
-  "label": "Get Advances Received", 
-  "oldfieldtype": "Button", 
-  "options": "get_advances", 
-  "print_hide": 1, 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "advance_adjustment_details", 
-  "fieldtype": "Table", 
-  "label": "Sales Invoice Advance", 
-  "oldfieldname": "advance_adjustment_details", 
-  "oldfieldtype": "Table", 
-  "options": "Sales Invoice Advance", 
-  "print_hide": 1, 
-  "read_only": 0
- }, 
- {
-  "depends_on": "is_pos", 
-  "doctype": "DocField", 
-  "fieldname": "payments_section", 
-  "fieldtype": "Section Break", 
-  "label": "Payments", 
-  "options": "icon-money", 
-  "read_only": 0
- }, 
- {
-  "depends_on": "is_pos", 
-  "doctype": "DocField", 
-  "fieldname": "column_break3", 
-  "fieldtype": "Column Break", 
-  "read_only": 0, 
-  "width": "50%"
- }, 
- {
-  "depends_on": "is_pos", 
-  "doctype": "DocField", 
-  "fieldname": "paid_amount", 
-  "fieldtype": "Currency", 
-  "label": "Paid Amount", 
-  "oldfieldname": "paid_amount", 
-  "oldfieldtype": "Currency", 
-  "options": "Company:company:default_currency", 
-  "print_hide": 1, 
-  "read_only": 0
- }, 
- {
-  "depends_on": "is_pos", 
-  "doctype": "DocField", 
-  "fieldname": "cash_bank_account", 
-  "fieldtype": "Link", 
-  "label": "Cash/Bank Account", 
-  "oldfieldname": "cash_bank_account", 
-  "oldfieldtype": "Link", 
-  "options": "Account", 
-  "print_hide": 1, 
-  "read_only": 0
- }, 
- {
-  "depends_on": "is_pos", 
-  "doctype": "DocField", 
-  "fieldname": "column_break4", 
-  "fieldtype": "Column Break", 
-  "read_only": 0, 
-  "width": "50%"
- }, 
- {
-  "depends_on": "is_pos", 
-  "doctype": "DocField", 
-  "fieldname": "write_off_outstanding_amount_automatically", 
-  "fieldtype": "Check", 
-  "label": "Write Off Outstanding Amount", 
-  "print_hide": 1, 
-  "read_only": 0
- }, 
- {
-  "depends_on": "is_pos", 
-  "doctype": "DocField", 
-  "fieldname": "write_off_amount", 
-  "fieldtype": "Currency", 
-  "label": "Write Off Amount", 
-  "options": "Company:company:default_currency", 
-  "print_hide": 1, 
-  "read_only": 0
- }, 
- {
-  "depends_on": "is_pos", 
-  "doctype": "DocField", 
-  "fieldname": "write_off_account", 
-  "fieldtype": "Link", 
-  "label": "Write Off Account", 
-  "options": "Account", 
-  "print_hide": 1, 
-  "read_only": 0
- }, 
- {
-  "depends_on": "is_pos", 
-  "doctype": "DocField", 
-  "fieldname": "write_off_cost_center", 
-  "fieldtype": "Link", 
-  "label": "Write Off Cost Center", 
-  "options": "Cost Center", 
-  "print_hide": 1, 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "terms_section_break", 
-  "fieldtype": "Section Break", 
-  "label": "Terms and Conditions", 
-  "oldfieldtype": "Section Break", 
-  "options": "icon-legal", 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "tc_name", 
-  "fieldtype": "Link", 
-  "label": "Terms", 
-  "oldfieldname": "tc_name", 
-  "oldfieldtype": "Link", 
-  "options": "Terms and Conditions", 
-  "print_hide": 1, 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "terms", 
-  "fieldtype": "Text Editor", 
-  "label": "Terms and Conditions Details", 
-  "oldfieldname": "terms", 
-  "oldfieldtype": "Text Editor", 
-  "read_only": 0
- }, 
- {
-  "depends_on": "customer", 
-  "doctype": "DocField", 
-  "fieldname": "contact_section", 
-  "fieldtype": "Section Break", 
-  "hidden": 0, 
-  "label": "Contact Info", 
-  "options": "icon-bullhorn", 
-  "read_only": 0
- }, 
- {
-  "description": "<a href=\"#Sales Browser/Territory\">Add / Edit</a>", 
-  "doctype": "DocField", 
-  "fieldname": "territory", 
-  "fieldtype": "Link", 
-  "in_filter": 1, 
-  "label": "Territory", 
-  "options": "Territory", 
-  "print_hide": 1, 
-  "read_only": 0, 
-  "reqd": 1, 
-  "search_index": 0
- }, 
- {
-  "description": "<a href=\"#Sales Browser/Customer Group\">Add / Edit</a>", 
-  "doctype": "DocField", 
-  "fieldname": "customer_group", 
-  "fieldtype": "Link", 
-  "in_filter": 1, 
-  "label": "Customer Group", 
-  "options": "Customer Group", 
-  "print_hide": 1, 
-  "read_only": 0, 
-  "search_index": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "col_break23", 
-  "fieldtype": "Column Break", 
-  "read_only": 0, 
-  "width": "50%"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "customer_address", 
-  "fieldtype": "Link", 
-  "label": "Customer Address", 
-  "options": "Address", 
-  "print_hide": 1, 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "contact_person", 
-  "fieldtype": "Link", 
-  "label": "Contact Person", 
-  "options": "Contact", 
-  "print_hide": 1, 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "more_info", 
-  "fieldtype": "Section Break", 
-  "label": "More Info", 
-  "oldfieldtype": "Section Break", 
-  "options": "icon-file-text", 
-  "print_hide": 1, 
-  "read_only": 0
- }, 
- {
-  "description": "Customer (Receivable) Account", 
-  "doctype": "DocField", 
-  "fieldname": "debit_to", 
-  "fieldtype": "Link", 
-  "in_filter": 1, 
-  "label": "Debit To", 
-  "oldfieldname": "debit_to", 
-  "oldfieldtype": "Link", 
-  "options": "Account", 
-  "print_hide": 1, 
-  "read_only": 0, 
-  "reqd": 1, 
-  "search_index": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "project_name", 
-  "fieldtype": "Link", 
-  "in_filter": 1, 
-  "label": "Project Name", 
-  "oldfieldname": "project_name", 
-  "oldfieldtype": "Link", 
-  "options": "Project", 
-  "read_only": 0, 
-  "search_index": 1
- }, 
- {
-  "depends_on": "eval:doc.source == 'Campaign'", 
-  "doctype": "DocField", 
-  "fieldname": "campaign", 
-  "fieldtype": "Link", 
-  "label": "Campaign", 
-  "oldfieldname": "campaign", 
-  "oldfieldtype": "Link", 
-  "options": "Campaign", 
-  "print_hide": 1, 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "source", 
-  "fieldtype": "Select", 
-  "label": "Source", 
-  "oldfieldname": "source", 
-  "oldfieldtype": "Select", 
-  "options": "\nExisting Customer\nReference\nAdvertisement\nCold Calling\nExhibition\nSupplier Reference\nMass Mailing\nCustomer's Vendor\nCampaign", 
-  "print_hide": 1, 
-  "read_only": 0
- }, 
- {
-  "default": "No", 
-  "description": "Considered as an Opening Balance", 
-  "doctype": "DocField", 
-  "fieldname": "is_opening", 
-  "fieldtype": "Select", 
-  "in_filter": 1, 
-  "label": "Is Opening Entry", 
-  "oldfieldname": "is_opening", 
-  "oldfieldtype": "Select", 
-  "options": "No\nYes", 
-  "print_hide": 1, 
-  "read_only": 0, 
-  "search_index": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "c_form_applicable", 
-  "fieldtype": "Select", 
-  "label": "C-Form Applicable", 
-  "no_copy": 1, 
-  "options": "No\nYes", 
-  "print_hide": 1, 
-  "read_only": 0, 
-  "report_hide": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "c_form_no", 
-  "fieldtype": "Link", 
-  "label": "C-Form No", 
-  "no_copy": 1, 
-  "options": "C-Form", 
-  "print_hide": 1, 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break8", 
-  "fieldtype": "Column Break", 
-  "oldfieldtype": "Column Break", 
-  "print_hide": 1, 
-  "read_only": 0
- }, 
- {
-  "allow_on_submit": 1, 
-  "doctype": "DocField", 
-  "fieldname": "letter_head", 
-  "fieldtype": "Select", 
-  "label": "Letter Head", 
-  "oldfieldname": "letter_head", 
-  "oldfieldtype": "Select", 
-  "options": "link:Letter Head", 
-  "print_hide": 1, 
-  "read_only": 0
- }, 
- {
-  "allow_on_submit": 1, 
-  "doctype": "DocField", 
-  "fieldname": "select_print_heading", 
-  "fieldtype": "Link", 
-  "label": "Print Heading", 
-  "no_copy": 1, 
-  "oldfieldname": "select_print_heading", 
-  "oldfieldtype": "Link", 
-  "options": "Print Heading", 
-  "print_hide": 1, 
-  "read_only": 0, 
-  "report_hide": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "posting_time", 
-  "fieldtype": "Time", 
-  "label": "Posting Time", 
-  "no_copy": 1, 
-  "oldfieldname": "posting_time", 
-  "oldfieldtype": "Time", 
-  "print_hide": 1, 
-  "read_only": 0
- }, 
- {
-  "description": "Actual Invoice Date", 
-  "doctype": "DocField", 
-  "fieldname": "aging_date", 
-  "fieldtype": "Date", 
-  "label": "Aging Date", 
-  "oldfieldname": "aging_date", 
-  "oldfieldtype": "Date", 
-  "print_hide": 1, 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "fiscal_year", 
-  "fieldtype": "Select", 
-  "in_filter": 1, 
-  "label": "Fiscal Year", 
-  "no_copy": 0, 
-  "oldfieldname": "fiscal_year", 
-  "oldfieldtype": "Select", 
-  "options": "link:Fiscal Year", 
-  "print_hide": 1, 
-  "read_only": 0, 
-  "reqd": 1, 
-  "search_index": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "remarks", 
-  "fieldtype": "Small Text", 
-  "label": "Remarks", 
-  "no_copy": 1, 
-  "oldfieldname": "remarks", 
-  "oldfieldtype": "Text", 
-  "print_hide": 1, 
-  "read_only": 0, 
-  "reqd": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "sales_team_section_break", 
-  "fieldtype": "Section Break", 
-  "label": "Sales Team", 
-  "oldfieldtype": "Section Break", 
-  "options": "icon-group", 
-  "print_hide": 1, 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break9", 
-  "fieldtype": "Column Break", 
-  "oldfieldtype": "Column Break", 
-  "print_hide": 1, 
-  "read_only": 0, 
-  "width": "50%"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "sales_partner", 
-  "fieldtype": "Link", 
-  "in_filter": 1, 
-  "label": "Sales Partner", 
-  "oldfieldname": "sales_partner", 
-  "oldfieldtype": "Link", 
-  "options": "Sales Partner", 
-  "print_hide": 1, 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break10", 
-  "fieldtype": "Column Break", 
-  "oldfieldtype": "Column Break", 
-  "print_hide": 1, 
-  "read_only": 0, 
-  "width": "50%"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "commission_rate", 
-  "fieldtype": "Float", 
-  "label": "Commission Rate (%)", 
-  "oldfieldname": "commission_rate", 
-  "oldfieldtype": "Currency", 
-  "print_hide": 1, 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "total_commission", 
-  "fieldtype": "Currency", 
-  "label": "Total Commission", 
-  "oldfieldname": "total_commission", 
-  "oldfieldtype": "Currency", 
-  "options": "Company:company:default_currency", 
-  "print_hide": 1, 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "section_break2", 
-  "fieldtype": "Section Break", 
-  "print_hide": 1, 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "sales_team", 
-  "fieldtype": "Table", 
-  "label": "Sales Team1", 
-  "oldfieldname": "sales_team", 
-  "oldfieldtype": "Table", 
-  "options": "Sales Team", 
-  "print_hide": 1, 
-  "read_only": 0
- }, 
- {
-  "depends_on": "eval:doc.docstatus<2", 
-  "doctype": "DocField", 
-  "fieldname": "recurring_invoice", 
-  "fieldtype": "Section Break", 
-  "label": "Recurring Invoice", 
-  "options": "icon-time", 
-  "print_hide": 1, 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break11", 
-  "fieldtype": "Column Break", 
-  "print_hide": 1, 
-  "read_only": 0, 
-  "width": "50%"
- }, 
- {
-  "allow_on_submit": 1, 
-  "depends_on": "eval:doc.docstatus<2", 
-  "description": "Check if recurring invoice, uncheck to stop recurring or put proper End Date", 
-  "doctype": "DocField", 
-  "fieldname": "convert_into_recurring_invoice", 
-  "fieldtype": "Check", 
-  "label": "Convert into Recurring Invoice", 
-  "no_copy": 1, 
-  "print_hide": 1, 
-  "read_only": 0
- }, 
- {
-  "allow_on_submit": 1, 
-  "depends_on": "eval:doc.convert_into_recurring_invoice==1", 
-  "description": "Select the period when the invoice will be generated automatically", 
-  "doctype": "DocField", 
-  "fieldname": "recurring_type", 
-  "fieldtype": "Select", 
-  "label": "Recurring Type", 
-  "no_copy": 1, 
-  "options": "\nMonthly\nQuarterly\nHalf-yearly\nYearly", 
-  "print_hide": 1, 
-  "read_only": 0
- }, 
- {
-  "allow_on_submit": 1, 
-  "depends_on": "eval:doc.convert_into_recurring_invoice==1", 
-  "description": "The day of the month on which auto invoice will be generated e.g. 05, 28 etc ", 
-  "doctype": "DocField", 
-  "fieldname": "repeat_on_day_of_month", 
-  "fieldtype": "Int", 
-  "label": "Repeat on Day of Month", 
-  "no_copy": 1, 
-  "print_hide": 1, 
-  "read_only": 0
- }, 
- {
-  "allow_on_submit": 1, 
-  "depends_on": "eval:doc.convert_into_recurring_invoice==1", 
-  "description": "Start date of current invoice's period", 
-  "doctype": "DocField", 
-  "fieldname": "invoice_period_from_date", 
-  "fieldtype": "Date", 
-  "label": "Invoice Period From Date", 
-  "no_copy": 1, 
-  "print_hide": 1, 
-  "read_only": 0
- }, 
- {
-  "allow_on_submit": 1, 
-  "depends_on": "eval:doc.convert_into_recurring_invoice==1", 
-  "description": "End date of current invoice's period", 
-  "doctype": "DocField", 
-  "fieldname": "invoice_period_to_date", 
-  "fieldtype": "Date", 
-  "label": "Invoice Period To Date", 
-  "no_copy": 1, 
-  "print_hide": 1, 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break12", 
-  "fieldtype": "Column Break", 
-  "no_copy": 0, 
-  "print_hide": 1, 
-  "read_only": 0, 
-  "width": "50%"
- }, 
- {
-  "allow_on_submit": 1, 
-  "depends_on": "eval:doc.convert_into_recurring_invoice==1", 
-  "description": "Enter email id separated by commas, invoice will be mailed automatically on particular date", 
-  "doctype": "DocField", 
-  "fieldname": "notification_email_address", 
-  "fieldtype": "Small Text", 
-  "label": "Notification Email Address", 
-  "no_copy": 1, 
-  "print_hide": 1, 
-  "read_only": 0
- }, 
- {
-  "depends_on": "eval:doc.convert_into_recurring_invoice==1", 
-  "description": "The unique id for tracking all recurring invoices.\u00a0It is generated on submit.", 
-  "doctype": "DocField", 
-  "fieldname": "recurring_id", 
-  "fieldtype": "Data", 
-  "label": "Recurring Id", 
-  "no_copy": 1, 
-  "print_hide": 1, 
-  "read_only": 1
- }, 
- {
-  "depends_on": "eval:doc.convert_into_recurring_invoice==1", 
-  "description": "The date on which next invoice will be generated. It is generated on submit.\n", 
-  "doctype": "DocField", 
-  "fieldname": "next_date", 
-  "fieldtype": "Date", 
-  "label": "Next Date", 
-  "no_copy": 1, 
-  "print_hide": 1, 
-  "read_only": 1
- }, 
- {
-  "allow_on_submit": 1, 
-  "depends_on": "eval:doc.convert_into_recurring_invoice==1", 
-  "description": "The date on which recurring invoice will be stop", 
-  "doctype": "DocField", 
-  "fieldname": "end_date", 
-  "fieldtype": "Date", 
-  "label": "End Date", 
-  "no_copy": 1, 
-  "print_hide": 1, 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "against_income_account", 
-  "fieldtype": "Small Text", 
-  "hidden": 1, 
-  "label": "Against Income Account", 
-  "no_copy": 1, 
-  "oldfieldname": "against_income_account", 
-  "oldfieldtype": "Small Text", 
-  "print_hide": 1, 
-  "read_only": 0, 
-  "report_hide": 1
- }, 
- {
-  "amend": 1, 
-  "cancel": 1, 
-  "create": 1, 
-  "delete": 1, 
-  "doctype": "DocPerm", 
-  "role": "Accounts Manager", 
-  "submit": 1, 
-  "write": 1
- }, 
- {
-  "amend": 1, 
-  "cancel": 0, 
-  "create": 1, 
-  "delete": 0, 
-  "doctype": "DocPerm", 
-  "role": "Accounts User", 
-  "submit": 1, 
-  "write": 1
- }, 
- {
-  "cancel": 0, 
-  "delete": 0, 
-  "doctype": "DocPerm", 
-  "role": "Customer"
- }
-]
\ No newline at end of file
+{
+ "allow_attach": 1, 
+ "allow_import": 1, 
+ "autoname": "naming_series:", 
+ "creation": "2013-05-24 19:29:05", 
+ "default_print_format": "Standard", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "document_type": "Transaction", 
+ "fields": [
+  {
+   "fieldname": "customer_section", 
+   "fieldtype": "Section Break", 
+   "label": "Customer", 
+   "options": "icon-user", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "naming_series", 
+   "fieldtype": "Select", 
+   "label": "Series", 
+   "no_copy": 1, 
+   "oldfieldname": "naming_series", 
+   "oldfieldtype": "Select", 
+   "options": "INV\nINV/10-11/", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "customer", 
+   "fieldtype": "Link", 
+   "hidden": 0, 
+   "label": "Customer", 
+   "no_copy": 0, 
+   "oldfieldname": "customer", 
+   "oldfieldtype": "Link", 
+   "options": "Customer", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0
+  }, 
+  {
+   "depends_on": "customer", 
+   "fieldname": "customer_name", 
+   "fieldtype": "Data", 
+   "hidden": 0, 
+   "in_list_view": 1, 
+   "label": "Name", 
+   "oldfieldname": "customer_name", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "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, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "contact_mobile", 
+   "fieldtype": "Text", 
+   "hidden": 1, 
+   "label": "Mobile No", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "contact_email", 
+   "fieldtype": "Text", 
+   "hidden": 1, 
+   "label": "Contact Email", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "column_break1", 
+   "fieldtype": "Column Break", 
+   "oldfieldtype": "Column Break", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "is_pos", 
+   "fieldtype": "Check", 
+   "label": "Is POS", 
+   "oldfieldname": "is_pos", 
+   "oldfieldtype": "Check", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "amended_from", 
+   "fieldtype": "Link", 
+   "ignore_restrictions": 1, 
+   "label": "Amended From", 
+   "no_copy": 1, 
+   "oldfieldname": "amended_from", 
+   "oldfieldtype": "Link", 
+   "options": "Sales Invoice", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "company", 
+   "fieldtype": "Link", 
+   "in_filter": 1, 
+   "label": "Company", 
+   "oldfieldname": "company", 
+   "oldfieldtype": "Link", 
+   "options": "Company", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0, 
+   "reqd": 1, 
+   "search_index": 0
+  }, 
+  {
+   "default": "Today", 
+   "fieldname": "posting_date", 
+   "fieldtype": "Date", 
+   "in_filter": 1, 
+   "label": "Posting Date", 
+   "no_copy": 1, 
+   "oldfieldname": "posting_date", 
+   "oldfieldtype": "Date", 
+   "permlevel": 0, 
+   "print_hide": 0, 
+   "read_only": 0, 
+   "reqd": 1, 
+   "search_index": 1
+  }, 
+  {
+   "fieldname": "due_date", 
+   "fieldtype": "Date", 
+   "in_filter": 1, 
+   "label": "Payment Due Date", 
+   "no_copy": 1, 
+   "oldfieldname": "due_date", 
+   "oldfieldtype": "Date", 
+   "permlevel": 0, 
+   "read_only": 0, 
+   "reqd": 1, 
+   "search_index": 0
+  }, 
+  {
+   "fieldname": "mode_of_payment", 
+   "fieldtype": "Select", 
+   "label": "Mode of Payment", 
+   "no_copy": 0, 
+   "oldfieldname": "mode_of_payment", 
+   "oldfieldtype": "Select", 
+   "options": "link:Mode of Payment", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "currency_section", 
+   "fieldtype": "Section Break", 
+   "label": "Currency and Price List", 
+   "options": "icon-tag", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "currency", 
+   "fieldtype": "Link", 
+   "label": "Currency", 
+   "oldfieldname": "currency", 
+   "oldfieldtype": "Select", 
+   "options": "Currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0, 
+   "reqd": 1
+  }, 
+  {
+   "description": "Rate at which Customer Currency is converted to customer's base currency", 
+   "fieldname": "conversion_rate", 
+   "fieldtype": "Float", 
+   "label": "Exchange Rate", 
+   "oldfieldname": "conversion_rate", 
+   "oldfieldtype": "Currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "column_break2", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0, 
+   "read_only": 0, 
+   "width": "50%"
+  }, 
+  {
+   "fieldname": "selling_price_list", 
+   "fieldtype": "Link", 
+   "label": "Price List", 
+   "oldfieldname": "price_list_name", 
+   "oldfieldtype": "Select", 
+   "options": "Price List", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "price_list_currency", 
+   "fieldtype": "Link", 
+   "label": "Price List Currency", 
+   "options": "Currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1, 
+   "reqd": 1
+  }, 
+  {
+   "description": "Rate at which Price list currency is converted to customer's base currency", 
+   "fieldname": "plc_conversion_rate", 
+   "fieldtype": "Float", 
+   "label": "Price List Exchange Rate", 
+   "no_copy": 0, 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "items", 
+   "fieldtype": "Section Break", 
+   "label": "Items", 
+   "oldfieldtype": "Section Break", 
+   "options": "icon-shopping-cart", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "update_stock", 
+   "fieldtype": "Check", 
+   "label": "Update Stock", 
+   "oldfieldname": "update_stock", 
+   "oldfieldtype": "Check", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0
+  }, 
+  {
+   "allow_on_submit": 1, 
+   "fieldname": "entries", 
+   "fieldtype": "Table", 
+   "label": "Sales Invoice Items", 
+   "oldfieldname": "entries", 
+   "oldfieldtype": "Table", 
+   "options": "Sales Invoice Item", 
+   "permlevel": 0, 
+   "read_only": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "packing_list", 
+   "fieldtype": "Section Break", 
+   "label": "Packing List", 
+   "options": "icon-suitcase", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "packing_details", 
+   "fieldtype": "Table", 
+   "label": "Packing Details", 
+   "options": "Packed Item", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "sales_bom_help", 
+   "fieldtype": "HTML", 
+   "label": "Sales BOM Help", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "section_break_30", 
+   "fieldtype": "Section Break", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "net_total_export", 
+   "fieldtype": "Currency", 
+   "label": "Net Total", 
+   "options": "currency", 
+   "permlevel": 0, 
+   "print_hide": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "column_break_32", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "net_total", 
+   "fieldtype": "Currency", 
+   "label": "Net Total (Company Currency)", 
+   "oldfieldname": "net_total", 
+   "oldfieldtype": "Currency", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "taxes", 
+   "fieldtype": "Section Break", 
+   "label": "Taxes and Charges", 
+   "oldfieldtype": "Section Break", 
+   "options": "icon-money", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "taxes_and_charges", 
+   "fieldtype": "Link", 
+   "label": "Taxes and Charges", 
+   "oldfieldname": "charge", 
+   "oldfieldtype": "Link", 
+   "options": "Sales Taxes and Charges Master", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "column_break_38", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "shipping_rule", 
+   "fieldtype": "Link", 
+   "label": "Shipping Rule", 
+   "oldfieldtype": "Button", 
+   "options": "Shipping Rule", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "section_break_40", 
+   "fieldtype": "Section Break", 
+   "permlevel": 0
+  }, 
+  {
+   "allow_on_submit": 1, 
+   "fieldname": "other_charges", 
+   "fieldtype": "Table", 
+   "label": "Sales Taxes and Charges", 
+   "oldfieldname": "other_charges", 
+   "oldfieldtype": "Table", 
+   "options": "Sales Taxes and Charges", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "other_charges_calculation", 
+   "fieldtype": "HTML", 
+   "label": "Taxes and Charges Calculation", 
+   "oldfieldtype": "HTML", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "section_break_43", 
+   "fieldtype": "Section Break", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "other_charges_total_export", 
+   "fieldtype": "Currency", 
+   "label": "Total Taxes and Charges", 
+   "options": "currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "column_break_45", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "other_charges_total", 
+   "fieldtype": "Currency", 
+   "label": "Total Taxes and Charges (Company Currency)", 
+   "oldfieldname": "other_charges_total", 
+   "oldfieldtype": "Currency", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "discount_amount", 
+   "fieldtype": "Currency", 
+   "label": "Discount Amount", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "print_hide": 0
+  }, 
+  {
+   "fieldname": "totals", 
+   "fieldtype": "Section Break", 
+   "label": "Totals", 
+   "oldfieldtype": "Section Break", 
+   "options": "icon-money", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "grand_total_export", 
+   "fieldtype": "Currency", 
+   "in_list_view": 1, 
+   "label": "Grand Total", 
+   "oldfieldname": "grand_total_export", 
+   "oldfieldtype": "Currency", 
+   "options": "currency", 
+   "permlevel": 0, 
+   "print_hide": 0, 
+   "read_only": 1, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "rounded_total_export", 
+   "fieldtype": "Currency", 
+   "label": "Rounded Total", 
+   "oldfieldname": "rounded_total_export", 
+   "oldfieldtype": "Currency", 
+   "options": "currency", 
+   "permlevel": 0, 
+   "print_hide": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "in_words_export", 
+   "fieldtype": "Data", 
+   "label": "In Words", 
+   "oldfieldname": "in_words_export", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "print_hide": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "gross_profit", 
+   "fieldtype": "Currency", 
+   "label": "Gross Profit", 
+   "oldfieldname": "gross_profit", 
+   "oldfieldtype": "Currency", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "gross_profit_percent", 
+   "fieldtype": "Float", 
+   "label": "Gross Profit (%)", 
+   "oldfieldname": "gross_profit_percent", 
+   "oldfieldtype": "Currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "column_break5", 
+   "fieldtype": "Column Break", 
+   "oldfieldtype": "Column Break", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0, 
+   "width": "50%"
+  }, 
+  {
+   "fieldname": "grand_total", 
+   "fieldtype": "Currency", 
+   "in_filter": 1, 
+   "label": "Grand Total (Company Currency)", 
+   "oldfieldname": "grand_total", 
+   "oldfieldtype": "Currency", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1, 
+   "reqd": 1, 
+   "search_index": 0
+  }, 
+  {
+   "fieldname": "rounded_total", 
+   "fieldtype": "Currency", 
+   "label": "Rounded Total (Company Currency)", 
+   "oldfieldname": "rounded_total", 
+   "oldfieldtype": "Currency", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1
+  }, 
+  {
+   "description": "In Words will be visible once you save the Sales Invoice.", 
+   "fieldname": "in_words", 
+   "fieldtype": "Data", 
+   "label": "In Words (Company Currency)", 
+   "oldfieldname": "in_words", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "total_advance", 
+   "fieldtype": "Currency", 
+   "label": "Total Advance", 
+   "oldfieldname": "total_advance", 
+   "oldfieldtype": "Currency", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "outstanding_amount", 
+   "fieldtype": "Currency", 
+   "in_list_view": 1, 
+   "label": "Outstanding Amount", 
+   "no_copy": 1, 
+   "oldfieldname": "outstanding_amount", 
+   "oldfieldtype": "Currency", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "advances", 
+   "fieldtype": "Section Break", 
+   "label": "Advances", 
+   "oldfieldtype": "Section Break", 
+   "options": "icon-money", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "get_advances_received", 
+   "fieldtype": "Button", 
+   "label": "Get Advances Received", 
+   "oldfieldtype": "Button", 
+   "options": "get_advances", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "advance_adjustment_details", 
+   "fieldtype": "Table", 
+   "label": "Sales Invoice Advance", 
+   "oldfieldname": "advance_adjustment_details", 
+   "oldfieldtype": "Table", 
+   "options": "Sales Invoice Advance", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0
+  }, 
+  {
+   "depends_on": "is_pos", 
+   "fieldname": "payments_section", 
+   "fieldtype": "Section Break", 
+   "label": "Payments", 
+   "options": "icon-money", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "depends_on": "is_pos", 
+   "fieldname": "column_break3", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0, 
+   "read_only": 0, 
+   "width": "50%"
+  }, 
+  {
+   "depends_on": "is_pos", 
+   "fieldname": "paid_amount", 
+   "fieldtype": "Currency", 
+   "label": "Paid Amount", 
+   "oldfieldname": "paid_amount", 
+   "oldfieldtype": "Currency", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0
+  }, 
+  {
+   "depends_on": "is_pos", 
+   "fieldname": "cash_bank_account", 
+   "fieldtype": "Link", 
+   "label": "Cash/Bank Account", 
+   "oldfieldname": "cash_bank_account", 
+   "oldfieldtype": "Link", 
+   "options": "Account", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0
+  }, 
+  {
+   "depends_on": "is_pos", 
+   "fieldname": "column_break4", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0, 
+   "read_only": 0, 
+   "width": "50%"
+  }, 
+  {
+   "depends_on": "is_pos", 
+   "fieldname": "write_off_outstanding_amount_automatically", 
+   "fieldtype": "Check", 
+   "label": "Write Off Outstanding Amount", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0
+  }, 
+  {
+   "depends_on": "is_pos", 
+   "fieldname": "write_off_amount", 
+   "fieldtype": "Currency", 
+   "label": "Write Off Amount", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0
+  }, 
+  {
+   "depends_on": "is_pos", 
+   "fieldname": "write_off_account", 
+   "fieldtype": "Link", 
+   "label": "Write Off Account", 
+   "options": "Account", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0
+  }, 
+  {
+   "depends_on": "is_pos", 
+   "fieldname": "write_off_cost_center", 
+   "fieldtype": "Link", 
+   "label": "Write Off Cost Center", 
+   "options": "Cost Center", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "terms_section_break", 
+   "fieldtype": "Section Break", 
+   "label": "Terms and Conditions", 
+   "oldfieldtype": "Section Break", 
+   "options": "icon-legal", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "tc_name", 
+   "fieldtype": "Link", 
+   "label": "Terms", 
+   "oldfieldname": "tc_name", 
+   "oldfieldtype": "Link", 
+   "options": "Terms and Conditions", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "terms", 
+   "fieldtype": "Text Editor", 
+   "label": "Terms and Conditions Details", 
+   "oldfieldname": "terms", 
+   "oldfieldtype": "Text Editor", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "depends_on": "customer", 
+   "fieldname": "contact_section", 
+   "fieldtype": "Section Break", 
+   "hidden": 0, 
+   "label": "Contact Info", 
+   "options": "icon-bullhorn", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "description": "<a href=\"#Sales Browser/Territory\">Add / Edit</a>", 
+   "fieldname": "territory", 
+   "fieldtype": "Link", 
+   "in_filter": 1, 
+   "label": "Territory", 
+   "options": "Territory", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0, 
+   "reqd": 1, 
+   "search_index": 0
+  }, 
+  {
+   "description": "<a href=\"#Sales Browser/Customer Group\">Add / Edit</a>", 
+   "fieldname": "customer_group", 
+   "fieldtype": "Link", 
+   "in_filter": 1, 
+   "label": "Customer Group", 
+   "options": "Customer Group", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0, 
+   "search_index": 0
+  }, 
+  {
+   "fieldname": "col_break23", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0, 
+   "read_only": 0, 
+   "width": "50%"
+  }, 
+  {
+   "fieldname": "customer_address", 
+   "fieldtype": "Link", 
+   "label": "Customer Address", 
+   "options": "Address", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "contact_person", 
+   "fieldtype": "Link", 
+   "label": "Contact Person", 
+   "options": "Contact", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "more_info", 
+   "fieldtype": "Section Break", 
+   "label": "More Info", 
+   "oldfieldtype": "Section Break", 
+   "options": "icon-file-text", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0
+  }, 
+  {
+   "description": "Customer (Receivable) Account", 
+   "fieldname": "debit_to", 
+   "fieldtype": "Link", 
+   "in_filter": 1, 
+   "label": "Debit To", 
+   "oldfieldname": "debit_to", 
+   "oldfieldtype": "Link", 
+   "options": "Account", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0, 
+   "reqd": 1, 
+   "search_index": 1
+  }, 
+  {
+   "fieldname": "project_name", 
+   "fieldtype": "Link", 
+   "in_filter": 1, 
+   "label": "Project Name", 
+   "oldfieldname": "project_name", 
+   "oldfieldtype": "Link", 
+   "options": "Project", 
+   "permlevel": 0, 
+   "read_only": 0, 
+   "search_index": 1
+  }, 
+  {
+   "depends_on": "eval:doc.source == 'Campaign'", 
+   "fieldname": "campaign", 
+   "fieldtype": "Link", 
+   "label": "Campaign", 
+   "oldfieldname": "campaign", 
+   "oldfieldtype": "Link", 
+   "options": "Campaign", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "source", 
+   "fieldtype": "Select", 
+   "label": "Source", 
+   "oldfieldname": "source", 
+   "oldfieldtype": "Select", 
+   "options": "\nExisting Customer\nReference\nAdvertisement\nCold Calling\nExhibition\nSupplier Reference\nMass Mailing\nCustomer's Vendor\nCampaign", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0
+  }, 
+  {
+   "default": "No", 
+   "description": "Considered as an Opening Balance", 
+   "fieldname": "is_opening", 
+   "fieldtype": "Select", 
+   "in_filter": 1, 
+   "label": "Is Opening Entry", 
+   "oldfieldname": "is_opening", 
+   "oldfieldtype": "Select", 
+   "options": "No\nYes", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0, 
+   "search_index": 0
+  }, 
+  {
+   "fieldname": "c_form_applicable", 
+   "fieldtype": "Select", 
+   "label": "C-Form Applicable", 
+   "no_copy": 1, 
+   "options": "No\nYes", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0, 
+   "report_hide": 0
+  }, 
+  {
+   "fieldname": "c_form_no", 
+   "fieldtype": "Link", 
+   "label": "C-Form No", 
+   "no_copy": 1, 
+   "options": "C-Form", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "column_break8", 
+   "fieldtype": "Column Break", 
+   "oldfieldtype": "Column Break", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0
+  }, 
+  {
+   "allow_on_submit": 1, 
+   "fieldname": "letter_head", 
+   "fieldtype": "Select", 
+   "label": "Letter Head", 
+   "oldfieldname": "letter_head", 
+   "oldfieldtype": "Select", 
+   "options": "link:Letter Head", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0
+  }, 
+  {
+   "allow_on_submit": 1, 
+   "fieldname": "select_print_heading", 
+   "fieldtype": "Link", 
+   "label": "Print Heading", 
+   "no_copy": 1, 
+   "oldfieldname": "select_print_heading", 
+   "oldfieldtype": "Link", 
+   "options": "Print Heading", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0, 
+   "report_hide": 1
+  }, 
+  {
+   "fieldname": "posting_time", 
+   "fieldtype": "Time", 
+   "label": "Posting Time", 
+   "no_copy": 1, 
+   "oldfieldname": "posting_time", 
+   "oldfieldtype": "Time", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0
+  }, 
+  {
+   "description": "Actual Invoice Date", 
+   "fieldname": "aging_date", 
+   "fieldtype": "Date", 
+   "label": "Aging Date", 
+   "oldfieldname": "aging_date", 
+   "oldfieldtype": "Date", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "fiscal_year", 
+   "fieldtype": "Select", 
+   "in_filter": 1, 
+   "label": "Fiscal Year", 
+   "no_copy": 0, 
+   "oldfieldname": "fiscal_year", 
+   "oldfieldtype": "Select", 
+   "options": "link:Fiscal Year", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0, 
+   "reqd": 1, 
+   "search_index": 0
+  }, 
+  {
+   "fieldname": "remarks", 
+   "fieldtype": "Small Text", 
+   "label": "Remarks", 
+   "no_copy": 1, 
+   "oldfieldname": "remarks", 
+   "oldfieldtype": "Text", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0, 
+   "reqd": 0
+  }, 
+  {
+   "fieldname": "sales_team_section_break", 
+   "fieldtype": "Section Break", 
+   "label": "Sales Team", 
+   "oldfieldtype": "Section Break", 
+   "options": "icon-group", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "column_break9", 
+   "fieldtype": "Column Break", 
+   "oldfieldtype": "Column Break", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0, 
+   "width": "50%"
+  }, 
+  {
+   "fieldname": "sales_partner", 
+   "fieldtype": "Link", 
+   "in_filter": 1, 
+   "label": "Sales Partner", 
+   "oldfieldname": "sales_partner", 
+   "oldfieldtype": "Link", 
+   "options": "Sales Partner", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "column_break10", 
+   "fieldtype": "Column Break", 
+   "oldfieldtype": "Column Break", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0, 
+   "width": "50%"
+  }, 
+  {
+   "fieldname": "commission_rate", 
+   "fieldtype": "Float", 
+   "label": "Commission Rate (%)", 
+   "oldfieldname": "commission_rate", 
+   "oldfieldtype": "Currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "total_commission", 
+   "fieldtype": "Currency", 
+   "label": "Total Commission", 
+   "oldfieldname": "total_commission", 
+   "oldfieldtype": "Currency", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "section_break2", 
+   "fieldtype": "Section Break", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "sales_team", 
+   "fieldtype": "Table", 
+   "label": "Sales Team1", 
+   "oldfieldname": "sales_team", 
+   "oldfieldtype": "Table", 
+   "options": "Sales Team", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0
+  }, 
+  {
+   "depends_on": "eval:doc.docstatus<2", 
+   "fieldname": "recurring_invoice", 
+   "fieldtype": "Section Break", 
+   "label": "Recurring Invoice", 
+   "options": "icon-time", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "column_break11", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0, 
+   "width": "50%"
+  }, 
+  {
+   "allow_on_submit": 1, 
+   "depends_on": "eval:doc.docstatus<2", 
+   "description": "Check if recurring invoice, uncheck to stop recurring or put proper End Date", 
+   "fieldname": "convert_into_recurring_invoice", 
+   "fieldtype": "Check", 
+   "label": "Convert into Recurring Invoice", 
+   "no_copy": 1, 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0
+  }, 
+  {
+   "allow_on_submit": 1, 
+   "depends_on": "eval:doc.convert_into_recurring_invoice==1", 
+   "description": "Select the period when the invoice will be generated automatically", 
+   "fieldname": "recurring_type", 
+   "fieldtype": "Select", 
+   "label": "Recurring Type", 
+   "no_copy": 1, 
+   "options": "\nMonthly\nQuarterly\nHalf-yearly\nYearly", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0
+  }, 
+  {
+   "allow_on_submit": 1, 
+   "depends_on": "eval:doc.convert_into_recurring_invoice==1", 
+   "description": "The day of the month on which auto invoice will be generated e.g. 05, 28 etc ", 
+   "fieldname": "repeat_on_day_of_month", 
+   "fieldtype": "Int", 
+   "label": "Repeat on Day of Month", 
+   "no_copy": 1, 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0
+  }, 
+  {
+   "allow_on_submit": 1, 
+   "depends_on": "eval:doc.convert_into_recurring_invoice==1", 
+   "description": "Start date of current invoice's period", 
+   "fieldname": "invoice_period_from_date", 
+   "fieldtype": "Date", 
+   "label": "Invoice Period From Date", 
+   "no_copy": 1, 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0
+  }, 
+  {
+   "allow_on_submit": 1, 
+   "depends_on": "eval:doc.convert_into_recurring_invoice==1", 
+   "description": "End date of current invoice's period", 
+   "fieldname": "invoice_period_to_date", 
+   "fieldtype": "Date", 
+   "label": "Invoice Period To Date", 
+   "no_copy": 1, 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "column_break12", 
+   "fieldtype": "Column Break", 
+   "no_copy": 0, 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0, 
+   "width": "50%"
+  }, 
+  {
+   "allow_on_submit": 1, 
+   "depends_on": "eval:doc.convert_into_recurring_invoice==1", 
+   "description": "Enter email id separated by commas, invoice will be mailed automatically on particular date", 
+   "fieldname": "notification_email_address", 
+   "fieldtype": "Small Text", 
+   "label": "Notification Email Address", 
+   "no_copy": 1, 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0
+  }, 
+  {
+   "depends_on": "eval:doc.convert_into_recurring_invoice==1", 
+   "description": "The unique id for tracking all recurring invoices.\u00a0It is generated on submit.", 
+   "fieldname": "recurring_id", 
+   "fieldtype": "Data", 
+   "label": "Recurring Id", 
+   "no_copy": 1, 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1
+  }, 
+  {
+   "depends_on": "eval:doc.convert_into_recurring_invoice==1", 
+   "description": "The date on which next invoice will be generated. It is generated on submit.\n", 
+   "fieldname": "next_date", 
+   "fieldtype": "Date", 
+   "label": "Next Date", 
+   "no_copy": 1, 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1
+  }, 
+  {
+   "allow_on_submit": 1, 
+   "depends_on": "eval:doc.convert_into_recurring_invoice==1", 
+   "description": "The date on which recurring invoice will be stop", 
+   "fieldname": "end_date", 
+   "fieldtype": "Date", 
+   "label": "End Date", 
+   "no_copy": 1, 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "against_income_account", 
+   "fieldtype": "Small Text", 
+   "hidden": 1, 
+   "label": "Against Income Account", 
+   "no_copy": 1, 
+   "oldfieldname": "against_income_account", 
+   "oldfieldtype": "Small Text", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0, 
+   "report_hide": 1
+  }
+ ], 
+ "icon": "icon-file-text", 
+ "idx": 1, 
+ "is_submittable": 1, 
+ "modified": "2014-01-28 18:43:10", 
+ "modified_by": "Administrator", 
+ "module": "Accounts", 
+ "name": "Sales Invoice", 
+ "owner": "Administrator", 
+ "permissions": [
+  {
+   "amend": 1, 
+   "cancel": 1, 
+   "create": 1, 
+   "delete": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Accounts Manager", 
+   "submit": 1, 
+   "write": 1
+  }, 
+  {
+   "amend": 1, 
+   "cancel": 0, 
+   "create": 1, 
+   "delete": 0, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Accounts User", 
+   "submit": 1, 
+   "write": 1
+  }, 
+  {
+   "cancel": 0, 
+   "delete": 0, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Customer"
+  }
+ ], 
+ "read_only_onload": 1, 
+ "search_fields": "posting_date, due_date, debit_to, fiscal_year, grand_total, outstanding_amount"
+}
\ No newline at end of file
diff --git a/erpnext/accounts/doctype/sales_invoice_advance/sales_invoice_advance.txt b/erpnext/accounts/doctype/sales_invoice_advance/sales_invoice_advance.txt
index f0f361d..13a5642 100644
--- a/erpnext/accounts/doctype/sales_invoice_advance/sales_invoice_advance.txt
+++ b/erpnext/accounts/doctype/sales_invoice_advance/sales_invoice_advance.txt
@@ -1,101 +1,88 @@
-[
- {
-  "creation": "2013-02-22 01:27:41", 
-  "docstatus": 0, 
-  "modified": "2014-02-03 12:38:53", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "doctype": "DocType", 
-  "istable": 1, 
-  "module": "Accounts", 
-  "name": "__common__"
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "Sales Invoice Advance", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Sales Invoice Advance"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "journal_voucher", 
-  "fieldtype": "Link", 
-  "in_list_view": 1, 
-  "label": "Journal Voucher", 
-  "no_copy": 1, 
-  "oldfieldname": "journal_voucher", 
-  "oldfieldtype": "Link", 
-  "options": "Journal Voucher", 
-  "print_width": "250px", 
-  "read_only": 1, 
-  "width": "250px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "remarks", 
-  "fieldtype": "Small Text", 
-  "in_list_view": 1, 
-  "label": "Remarks", 
-  "no_copy": 1, 
-  "oldfieldname": "remarks", 
-  "oldfieldtype": "Small Text", 
-  "print_width": "150px", 
-  "read_only": 1, 
-  "width": "150px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "jv_detail_no", 
-  "fieldtype": "Data", 
-  "hidden": 1, 
-  "in_list_view": 0, 
-  "label": "Journal Voucher Detail No", 
-  "no_copy": 1, 
-  "oldfieldname": "jv_detail_no", 
-  "oldfieldtype": "Data", 
-  "print_hide": 1, 
-  "print_width": "120px", 
-  "read_only": 1, 
-  "width": "120px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "col_break1", 
-  "fieldtype": "Column Break"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "advance_amount", 
-  "fieldtype": "Currency", 
-  "in_list_view": 1, 
-  "label": "Advance amount", 
-  "no_copy": 1, 
-  "oldfieldname": "advance_amount", 
-  "oldfieldtype": "Currency", 
-  "options": "Company:company:default_currency", 
-  "print_width": "120px", 
-  "read_only": 1, 
-  "width": "120px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "allocated_amount", 
-  "fieldtype": "Currency", 
-  "in_list_view": 1, 
-  "label": "Allocated amount", 
-  "no_copy": 1, 
-  "oldfieldname": "allocated_amount", 
-  "oldfieldtype": "Currency", 
-  "options": "Company:company:default_currency", 
-  "print_width": "120px", 
-  "width": "120px"
- }
-]
\ No newline at end of file
+{
+ "creation": "2013-02-22 01:27:41", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "fields": [
+  {
+   "fieldname": "journal_voucher", 
+   "fieldtype": "Link", 
+   "in_list_view": 1, 
+   "label": "Journal Voucher", 
+   "no_copy": 1, 
+   "oldfieldname": "journal_voucher", 
+   "oldfieldtype": "Link", 
+   "options": "Journal Voucher", 
+   "permlevel": 0, 
+   "print_width": "250px", 
+   "read_only": 1, 
+   "width": "250px"
+  }, 
+  {
+   "fieldname": "remarks", 
+   "fieldtype": "Small Text", 
+   "in_list_view": 1, 
+   "label": "Remarks", 
+   "no_copy": 1, 
+   "oldfieldname": "remarks", 
+   "oldfieldtype": "Small Text", 
+   "permlevel": 0, 
+   "print_width": "150px", 
+   "read_only": 1, 
+   "width": "150px"
+  }, 
+  {
+   "fieldname": "jv_detail_no", 
+   "fieldtype": "Data", 
+   "hidden": 1, 
+   "in_list_view": 0, 
+   "label": "Journal Voucher Detail No", 
+   "no_copy": 1, 
+   "oldfieldname": "jv_detail_no", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "print_width": "120px", 
+   "read_only": 1, 
+   "width": "120px"
+  }, 
+  {
+   "fieldname": "col_break1", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "advance_amount", 
+   "fieldtype": "Currency", 
+   "in_list_view": 1, 
+   "label": "Advance amount", 
+   "no_copy": 1, 
+   "oldfieldname": "advance_amount", 
+   "oldfieldtype": "Currency", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "print_width": "120px", 
+   "read_only": 1, 
+   "width": "120px"
+  }, 
+  {
+   "fieldname": "allocated_amount", 
+   "fieldtype": "Currency", 
+   "in_list_view": 1, 
+   "label": "Allocated amount", 
+   "no_copy": 1, 
+   "oldfieldname": "allocated_amount", 
+   "oldfieldtype": "Currency", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "print_width": "120px", 
+   "width": "120px"
+  }
+ ], 
+ "idx": 1, 
+ "istable": 1, 
+ "modified": "2014-02-03 12:38:53", 
+ "modified_by": "Administrator", 
+ "module": "Accounts", 
+ "name": "Sales Invoice Advance", 
+ "owner": "Administrator"
+}
\ No newline at end of file
diff --git a/erpnext/accounts/doctype/sales_invoice_item/sales_invoice_item.txt b/erpnext/accounts/doctype/sales_invoice_item/sales_invoice_item.txt
index 224f7b7..5c59ebc 100644
--- a/erpnext/accounts/doctype/sales_invoice_item/sales_invoice_item.txt
+++ b/erpnext/accounts/doctype/sales_invoice_item/sales_invoice_item.txt
@@ -1,477 +1,464 @@
-[
- {
-  "creation": "2013-06-04 11:02:19", 
-  "docstatus": 0, 
-  "modified": "2014-02-28 11:04:19", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "autoname": "INVD.######", 
-  "doctype": "DocType", 
-  "istable": 1, 
-  "module": "Accounts", 
-  "name": "__common__"
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "Sales Invoice Item", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Sales Invoice Item"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "barcode", 
-  "fieldtype": "Data", 
-  "in_list_view": 0, 
-  "label": "Barcode", 
-  "print_hide": 1, 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "item_code", 
-  "fieldtype": "Link", 
-  "in_filter": 1, 
-  "in_list_view": 1, 
-  "label": "Item", 
-  "oldfieldname": "item_code", 
-  "oldfieldtype": "Link", 
-  "options": "Item", 
-  "print_hide": 0, 
-  "read_only": 0, 
-  "reqd": 0, 
-  "search_index": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "item_name", 
-  "fieldtype": "Data", 
-  "in_filter": 0, 
-  "in_list_view": 0, 
-  "label": "Item Name", 
-  "oldfieldname": "item_name", 
-  "oldfieldtype": "Data", 
-  "print_hide": 1, 
-  "read_only": 0, 
-  "reqd": 1, 
-  "search_index": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "col_break1", 
-  "fieldtype": "Column Break"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "customer_item_code", 
-  "fieldtype": "Data", 
-  "hidden": 1, 
-  "in_list_view": 0, 
-  "label": "Customer's Item Code", 
-  "print_hide": 1, 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "description", 
-  "fieldtype": "Text", 
-  "in_list_view": 1, 
-  "label": "Description", 
-  "oldfieldname": "description", 
-  "oldfieldtype": "Text", 
-  "print_width": "200px", 
-  "read_only": 0, 
-  "reqd": 1, 
-  "width": "200px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "quantity_and_rate", 
-  "fieldtype": "Section Break", 
-  "in_list_view": 0, 
-  "label": "Quantity and Rate"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "qty", 
-  "fieldtype": "Float", 
-  "in_list_view": 1, 
-  "label": "Quantity", 
-  "oldfieldname": "qty", 
-  "oldfieldtype": "Currency", 
-  "read_only": 0, 
-  "reqd": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "price_list_rate", 
-  "fieldtype": "Currency", 
-  "in_list_view": 0, 
-  "label": "Price List Rate", 
-  "oldfieldname": "ref_rate", 
-  "oldfieldtype": "Currency", 
-  "options": "currency", 
-  "print_hide": 1, 
-  "read_only": 1, 
-  "reqd": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "discount_percentage", 
-  "fieldtype": "Float", 
-  "in_list_view": 0, 
-  "label": "Discount (%)", 
-  "oldfieldname": "adj_rate", 
-  "oldfieldtype": "Float", 
-  "print_hide": 1, 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "col_break2", 
-  "fieldtype": "Column Break"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "stock_uom", 
-  "fieldtype": "Link", 
-  "in_list_view": 0, 
-  "label": "UOM", 
-  "options": "UOM", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "base_price_list_rate", 
-  "fieldtype": "Currency", 
-  "in_list_view": 0, 
-  "label": "Price List Rate (Company Currency)", 
-  "oldfieldname": "base_ref_rate", 
-  "oldfieldtype": "Currency", 
-  "options": "Company:company:default_currency", 
-  "print_hide": 1, 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "section_break1", 
-  "fieldtype": "Section Break"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "rate", 
-  "fieldtype": "Currency", 
-  "in_list_view": 1, 
-  "label": "Rate", 
-  "oldfieldname": "export_rate", 
-  "oldfieldtype": "Currency", 
-  "options": "currency", 
-  "read_only": 0, 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "amount", 
-  "fieldtype": "Currency", 
-  "in_list_view": 1, 
-  "label": "Amount", 
-  "oldfieldname": "export_amount", 
-  "oldfieldtype": "Currency", 
-  "options": "currency", 
-  "read_only": 1, 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "col_break3", 
-  "fieldtype": "Column Break"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "base_rate", 
-  "fieldtype": "Currency", 
-  "in_filter": 0, 
-  "in_list_view": 0, 
-  "label": "Rate (Company Currency)", 
-  "oldfieldname": "basic_rate", 
-  "oldfieldtype": "Currency", 
-  "options": "Company:company:default_currency", 
-  "print_hide": 1, 
-  "read_only": 1, 
-  "reqd": 1, 
-  "search_index": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "base_amount", 
-  "fieldtype": "Currency", 
-  "in_list_view": 0, 
-  "label": "Amount (Company Currency)", 
-  "oldfieldname": "amount", 
-  "oldfieldtype": "Currency", 
-  "options": "Company:company:default_currency", 
-  "print_hide": 1, 
-  "read_only": 1, 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "pricing_rule_for_price", 
-  "fieldtype": "Link", 
-  "label": "Pricing Rule For Price", 
-  "options": "Pricing Rule", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "pricing_rule_for_discount", 
-  "fieldtype": "Link", 
-  "label": "Pricing Rule For Discount", 
-  "options": "Pricing Rule", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "accounting", 
-  "fieldtype": "Section Break", 
-  "in_list_view": 0, 
-  "label": "Accounting"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "income_account", 
-  "fieldtype": "Link", 
-  "in_filter": 1, 
-  "in_list_view": 0, 
-  "label": "Income Account", 
-  "oldfieldname": "income_account", 
-  "oldfieldtype": "Link", 
-  "options": "Account", 
-  "print_hide": 1, 
-  "print_width": "120px", 
-  "read_only": 0, 
-  "reqd": 1, 
-  "width": "120px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "expense_account", 
-  "fieldtype": "Link", 
-  "hidden": 0, 
-  "in_filter": 1, 
-  "in_list_view": 0, 
-  "label": "Expense Account", 
-  "options": "Account", 
-  "print_hide": 1, 
-  "read_only": 0, 
-  "width": "120px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "col_break4", 
-  "fieldtype": "Column Break"
- }, 
- {
-  "default": ":Company", 
-  "doctype": "DocField", 
-  "fieldname": "cost_center", 
-  "fieldtype": "Link", 
-  "in_filter": 1, 
-  "in_list_view": 0, 
-  "label": "Cost Center", 
-  "oldfieldname": "cost_center", 
-  "oldfieldtype": "Link", 
-  "options": "Cost Center", 
-  "print_hide": 1, 
-  "print_width": "120px", 
-  "read_only": 0, 
-  "reqd": 0, 
-  "width": "120px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "warehouse_and_reference", 
-  "fieldtype": "Section Break", 
-  "in_list_view": 0, 
-  "label": "Warehouse and Reference"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "warehouse", 
-  "fieldtype": "Link", 
-  "hidden": 0, 
-  "in_list_view": 0, 
-  "label": "Warehouse", 
-  "oldfieldname": "warehouse", 
-  "oldfieldtype": "Link", 
-  "options": "Warehouse", 
-  "print_hide": 1, 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "serial_no", 
-  "fieldtype": "Small Text", 
-  "in_filter": 1, 
-  "in_list_view": 1, 
-  "label": "Serial No", 
-  "oldfieldname": "serial_no", 
-  "oldfieldtype": "Small Text", 
-  "print_hide": 0, 
-  "read_only": 0, 
-  "reqd": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "batch_no", 
-  "fieldtype": "Link", 
-  "label": "Batch No", 
-  "options": "Batch", 
-  "print_hide": 1, 
-  "read_only": 0
- }, 
- {
-  "description": "<a href=\"#Sales Browser/Item Group\">Add / Edit</a>", 
-  "doctype": "DocField", 
-  "fieldname": "item_group", 
-  "fieldtype": "Link", 
-  "hidden": 1, 
-  "in_filter": 1, 
-  "label": "Item Group", 
-  "oldfieldname": "item_group", 
-  "oldfieldtype": "Link", 
-  "options": "Item Group", 
-  "print_hide": 1, 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "brand", 
-  "fieldtype": "Data", 
-  "hidden": 1, 
-  "in_filter": 1, 
-  "label": "Brand Name", 
-  "oldfieldname": "brand", 
-  "oldfieldtype": "Data", 
-  "print_hide": 1, 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "item_tax_rate", 
-  "fieldtype": "Small Text", 
-  "hidden": 1, 
-  "label": "Item Tax Rate", 
-  "oldfieldname": "item_tax_rate", 
-  "oldfieldtype": "Small Text", 
-  "print_hide": 1, 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "col_break5", 
-  "fieldtype": "Column Break"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "actual_qty", 
-  "fieldtype": "Float", 
-  "label": "Available Qty at Warehouse", 
-  "oldfieldname": "actual_qty", 
-  "oldfieldtype": "Currency", 
-  "print_hide": 1, 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "time_log_batch", 
-  "fieldtype": "Link", 
-  "label": "Time Log Batch", 
-  "options": "Time Log Batch", 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "sales_order", 
-  "fieldtype": "Link", 
-  "in_filter": 1, 
-  "label": "Sales Order", 
-  "no_copy": 1, 
-  "oldfieldname": "sales_order", 
-  "oldfieldtype": "Link", 
-  "options": "Sales Order", 
-  "print_hide": 1, 
-  "read_only": 1, 
-  "search_index": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "so_detail", 
-  "fieldtype": "Data", 
-  "hidden": 1, 
-  "in_filter": 1, 
-  "label": "Sales Order Item", 
-  "no_copy": 1, 
-  "oldfieldname": "so_detail", 
-  "oldfieldtype": "Data", 
-  "print_hide": 1, 
-  "read_only": 1, 
-  "search_index": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "delivery_note", 
-  "fieldtype": "Link", 
-  "in_filter": 1, 
-  "label": "Delivery Note", 
-  "no_copy": 1, 
-  "oldfieldname": "delivery_note", 
-  "oldfieldtype": "Link", 
-  "options": "Delivery Note", 
-  "print_hide": 1, 
-  "read_only": 1, 
-  "search_index": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "dn_detail", 
-  "fieldtype": "Data", 
-  "hidden": 1, 
-  "in_filter": 1, 
-  "label": "Delivery Note Item", 
-  "no_copy": 1, 
-  "oldfieldname": "dn_detail", 
-  "oldfieldtype": "Data", 
-  "print_hide": 1, 
-  "read_only": 1, 
-  "search_index": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "delivered_qty", 
-  "fieldtype": "Float", 
-  "label": "Delivered Qty", 
-  "oldfieldname": "delivered_qty", 
-  "oldfieldtype": "Currency", 
-  "print_hide": 1, 
-  "read_only": 1
- }, 
- {
-  "allow_on_submit": 1, 
-  "doctype": "DocField", 
-  "fieldname": "page_break", 
-  "fieldtype": "Check", 
-  "label": "Page Break", 
-  "no_copy": 1, 
-  "print_hide": 1, 
-  "read_only": 0, 
-  "report_hide": 1
- }
-]
\ No newline at end of file
+{
+ "autoname": "INVD.######", 
+ "creation": "2013-06-04 11:02:19", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "fields": [
+  {
+   "fieldname": "barcode", 
+   "fieldtype": "Data", 
+   "in_list_view": 0, 
+   "label": "Barcode", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "item_code", 
+   "fieldtype": "Link", 
+   "in_filter": 1, 
+   "in_list_view": 1, 
+   "label": "Item", 
+   "oldfieldname": "item_code", 
+   "oldfieldtype": "Link", 
+   "options": "Item", 
+   "permlevel": 0, 
+   "print_hide": 0, 
+   "read_only": 0, 
+   "reqd": 0, 
+   "search_index": 1
+  }, 
+  {
+   "fieldname": "item_name", 
+   "fieldtype": "Data", 
+   "in_filter": 0, 
+   "in_list_view": 0, 
+   "label": "Item Name", 
+   "oldfieldname": "item_name", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0, 
+   "reqd": 1, 
+   "search_index": 0
+  }, 
+  {
+   "fieldname": "col_break1", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "customer_item_code", 
+   "fieldtype": "Data", 
+   "hidden": 1, 
+   "in_list_view": 0, 
+   "label": "Customer's Item Code", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "description", 
+   "fieldtype": "Text", 
+   "in_list_view": 1, 
+   "label": "Description", 
+   "oldfieldname": "description", 
+   "oldfieldtype": "Text", 
+   "permlevel": 0, 
+   "print_width": "200px", 
+   "read_only": 0, 
+   "reqd": 1, 
+   "width": "200px"
+  }, 
+  {
+   "fieldname": "quantity_and_rate", 
+   "fieldtype": "Section Break", 
+   "in_list_view": 0, 
+   "label": "Quantity and Rate", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "qty", 
+   "fieldtype": "Float", 
+   "in_list_view": 1, 
+   "label": "Quantity", 
+   "oldfieldname": "qty", 
+   "oldfieldtype": "Currency", 
+   "permlevel": 0, 
+   "read_only": 0, 
+   "reqd": 0
+  }, 
+  {
+   "fieldname": "price_list_rate", 
+   "fieldtype": "Currency", 
+   "in_list_view": 0, 
+   "label": "Price List Rate", 
+   "oldfieldname": "ref_rate", 
+   "oldfieldtype": "Currency", 
+   "options": "currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1, 
+   "reqd": 0
+  }, 
+  {
+   "fieldname": "discount_percentage", 
+   "fieldtype": "Float", 
+   "in_list_view": 0, 
+   "label": "Discount (%)", 
+   "oldfieldname": "adj_rate", 
+   "oldfieldtype": "Float", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "col_break2", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "stock_uom", 
+   "fieldtype": "Link", 
+   "in_list_view": 0, 
+   "label": "UOM", 
+   "options": "UOM", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "base_price_list_rate", 
+   "fieldtype": "Currency", 
+   "in_list_view": 0, 
+   "label": "Price List Rate (Company Currency)", 
+   "oldfieldname": "base_ref_rate", 
+   "oldfieldtype": "Currency", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "section_break1", 
+   "fieldtype": "Section Break", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "rate", 
+   "fieldtype": "Currency", 
+   "in_list_view": 1, 
+   "label": "Rate", 
+   "oldfieldname": "export_rate", 
+   "oldfieldtype": "Currency", 
+   "options": "currency", 
+   "permlevel": 0, 
+   "read_only": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "amount", 
+   "fieldtype": "Currency", 
+   "in_list_view": 1, 
+   "label": "Amount", 
+   "oldfieldname": "export_amount", 
+   "oldfieldtype": "Currency", 
+   "options": "currency", 
+   "permlevel": 0, 
+   "read_only": 1, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "col_break3", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "base_rate", 
+   "fieldtype": "Currency", 
+   "in_filter": 0, 
+   "in_list_view": 0, 
+   "label": "Rate (Company Currency)", 
+   "oldfieldname": "basic_rate", 
+   "oldfieldtype": "Currency", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1, 
+   "reqd": 1, 
+   "search_index": 0
+  }, 
+  {
+   "fieldname": "base_amount", 
+   "fieldtype": "Currency", 
+   "in_list_view": 0, 
+   "label": "Amount (Company Currency)", 
+   "oldfieldname": "amount", 
+   "oldfieldtype": "Currency", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "pricing_rule_for_price", 
+   "fieldtype": "Link", 
+   "label": "Pricing Rule For Price", 
+   "options": "Pricing Rule", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "pricing_rule_for_discount", 
+   "fieldtype": "Link", 
+   "label": "Pricing Rule For Discount", 
+   "options": "Pricing Rule", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "accounting", 
+   "fieldtype": "Section Break", 
+   "in_list_view": 0, 
+   "label": "Accounting", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "income_account", 
+   "fieldtype": "Link", 
+   "in_filter": 1, 
+   "in_list_view": 0, 
+   "label": "Income Account", 
+   "oldfieldname": "income_account", 
+   "oldfieldtype": "Link", 
+   "options": "Account", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "print_width": "120px", 
+   "read_only": 0, 
+   "reqd": 1, 
+   "width": "120px"
+  }, 
+  {
+   "fieldname": "expense_account", 
+   "fieldtype": "Link", 
+   "hidden": 0, 
+   "in_filter": 1, 
+   "in_list_view": 0, 
+   "label": "Expense Account", 
+   "options": "Account", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0, 
+   "width": "120px"
+  }, 
+  {
+   "fieldname": "col_break4", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0
+  }, 
+  {
+   "default": ":Company", 
+   "fieldname": "cost_center", 
+   "fieldtype": "Link", 
+   "in_filter": 1, 
+   "in_list_view": 0, 
+   "label": "Cost Center", 
+   "oldfieldname": "cost_center", 
+   "oldfieldtype": "Link", 
+   "options": "Cost Center", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "print_width": "120px", 
+   "read_only": 0, 
+   "reqd": 0, 
+   "width": "120px"
+  }, 
+  {
+   "fieldname": "warehouse_and_reference", 
+   "fieldtype": "Section Break", 
+   "in_list_view": 0, 
+   "label": "Warehouse and Reference", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "warehouse", 
+   "fieldtype": "Link", 
+   "hidden": 0, 
+   "in_list_view": 0, 
+   "label": "Warehouse", 
+   "oldfieldname": "warehouse", 
+   "oldfieldtype": "Link", 
+   "options": "Warehouse", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "serial_no", 
+   "fieldtype": "Small Text", 
+   "in_filter": 1, 
+   "in_list_view": 1, 
+   "label": "Serial No", 
+   "oldfieldname": "serial_no", 
+   "oldfieldtype": "Small Text", 
+   "permlevel": 0, 
+   "print_hide": 0, 
+   "read_only": 0, 
+   "reqd": 0
+  }, 
+  {
+   "fieldname": "batch_no", 
+   "fieldtype": "Link", 
+   "label": "Batch No", 
+   "options": "Batch", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0
+  }, 
+  {
+   "description": "<a href=\"#Sales Browser/Item Group\">Add / Edit</a>", 
+   "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
+  }, 
+  {
+   "fieldname": "brand", 
+   "fieldtype": "Data", 
+   "hidden": 1, 
+   "in_filter": 1, 
+   "label": "Brand Name", 
+   "oldfieldname": "brand", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0
+  }, 
+  {
+   "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": "col_break5", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "actual_qty", 
+   "fieldtype": "Float", 
+   "label": "Available Qty at Warehouse", 
+   "oldfieldname": "actual_qty", 
+   "oldfieldtype": "Currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "time_log_batch", 
+   "fieldtype": "Link", 
+   "label": "Time Log Batch", 
+   "options": "Time Log Batch", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "sales_order", 
+   "fieldtype": "Link", 
+   "in_filter": 1, 
+   "label": "Sales Order", 
+   "no_copy": 1, 
+   "oldfieldname": "sales_order", 
+   "oldfieldtype": "Link", 
+   "options": "Sales Order", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1, 
+   "search_index": 1
+  }, 
+  {
+   "fieldname": "so_detail", 
+   "fieldtype": "Data", 
+   "hidden": 1, 
+   "in_filter": 1, 
+   "label": "Sales Order Item", 
+   "no_copy": 1, 
+   "oldfieldname": "so_detail", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1, 
+   "search_index": 1
+  }, 
+  {
+   "fieldname": "delivery_note", 
+   "fieldtype": "Link", 
+   "in_filter": 1, 
+   "label": "Delivery Note", 
+   "no_copy": 1, 
+   "oldfieldname": "delivery_note", 
+   "oldfieldtype": "Link", 
+   "options": "Delivery Note", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1, 
+   "search_index": 1
+  }, 
+  {
+   "fieldname": "dn_detail", 
+   "fieldtype": "Data", 
+   "hidden": 1, 
+   "in_filter": 1, 
+   "label": "Delivery Note Item", 
+   "no_copy": 1, 
+   "oldfieldname": "dn_detail", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1, 
+   "search_index": 1
+  }, 
+  {
+   "fieldname": "delivered_qty", 
+   "fieldtype": "Float", 
+   "label": "Delivered Qty", 
+   "oldfieldname": "delivered_qty", 
+   "oldfieldtype": "Currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1
+  }, 
+  {
+   "allow_on_submit": 1, 
+   "fieldname": "page_break", 
+   "fieldtype": "Check", 
+   "label": "Page Break", 
+   "no_copy": 1, 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0, 
+   "report_hide": 1
+  }
+ ], 
+ "idx": 1, 
+ "istable": 1, 
+ "modified": "2014-02-28 11:04:19", 
+ "modified_by": "Administrator", 
+ "module": "Accounts", 
+ "name": "Sales Invoice Item", 
+ "owner": "Administrator"
+}
\ No newline at end of file
diff --git a/erpnext/accounts/doctype/sales_taxes_and_charges/sales_taxes_and_charges.txt b/erpnext/accounts/doctype/sales_taxes_and_charges/sales_taxes_and_charges.txt
index 8bb154c..95241c6 100644
--- a/erpnext/accounts/doctype/sales_taxes_and_charges/sales_taxes_and_charges.txt
+++ b/erpnext/accounts/doctype/sales_taxes_and_charges/sales_taxes_and_charges.txt
@@ -1,166 +1,153 @@
-[
- {
-  "creation": "2013-04-24 11:39:32", 
-  "docstatus": 0, 
-  "modified": "2014-01-03 15:04:25", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "autoname": "INVTD.######", 
-  "doctype": "DocType", 
-  "hide_heading": 1, 
-  "istable": 1, 
-  "module": "Accounts", 
-  "name": "__common__"
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "Sales Taxes and Charges", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Sales Taxes and Charges"
- }, 
- {
-  "doctype": "DocField", 
-  "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", 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "row_id", 
-  "fieldtype": "Data", 
-  "hidden": 0, 
-  "label": "Enter Row", 
-  "oldfieldname": "row_id", 
-  "oldfieldtype": "Data"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "description", 
-  "fieldtype": "Small Text", 
-  "in_list_view": 1, 
-  "label": "Description", 
-  "oldfieldname": "description", 
-  "oldfieldtype": "Small Text", 
-  "print_width": "300px", 
-  "reqd": 1, 
-  "width": "300px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "col_break_1", 
-  "fieldtype": "Column Break", 
-  "width": "50%"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "account_head", 
-  "fieldtype": "Link", 
-  "in_list_view": 0, 
-  "label": "Account Head", 
-  "oldfieldname": "account_head", 
-  "oldfieldtype": "Link", 
-  "options": "Account", 
-  "reqd": 1, 
-  "search_index": 1
- }, 
- {
-  "default": ":Company", 
-  "doctype": "DocField", 
-  "fieldname": "cost_center", 
-  "fieldtype": "Link", 
-  "in_list_view": 0, 
-  "label": "Cost Center", 
-  "oldfieldname": "cost_center_other_charges", 
-  "oldfieldtype": "Link", 
-  "options": "Cost Center"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "rate", 
-  "fieldtype": "Float", 
-  "in_list_view": 1, 
-  "label": "Rate", 
-  "oldfieldname": "rate", 
-  "oldfieldtype": "Currency", 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "tax_amount", 
-  "fieldtype": "Currency", 
-  "in_list_view": 1, 
-  "label": "Amount", 
-  "oldfieldname": "tax_amount", 
-  "oldfieldtype": "Currency", 
-  "options": "Company:company:default_currency", 
-  "read_only": 1, 
-  "reqd": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "total", 
-  "fieldtype": "Currency", 
-  "label": "Total", 
-  "oldfieldname": "total", 
-  "oldfieldtype": "Currency", 
-  "options": "Company:company:default_currency", 
-  "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", 
-  "doctype": "DocField", 
-  "fieldname": "included_in_print_rate", 
-  "fieldtype": "Check", 
-  "label": "Is this Tax included in Basic Rate?", 
-  "no_copy": 0, 
-  "print_hide": 1, 
-  "print_width": "150px", 
-  "report_hide": 1, 
-  "width": "150px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "tax_amount_after_discount_amount", 
-  "fieldtype": "Currency", 
-  "hidden": 1, 
-  "label": "Tax Amount After Discount Amount", 
-  "options": "Company:company:default_currency", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "item_wise_tax_detail", 
-  "fieldtype": "Small Text", 
-  "hidden": 1, 
-  "label": "Item Wise Tax Detail", 
-  "oldfieldname": "item_wise_tax_detail", 
-  "oldfieldtype": "Small Text", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "parenttype", 
-  "fieldtype": "Data", 
-  "hidden": 1, 
-  "in_filter": 1, 
-  "label": "Parenttype", 
-  "oldfieldname": "parenttype", 
-  "oldfieldtype": "Data", 
-  "print_hide": 1, 
-  "search_index": 1
- }
-]
\ No newline at end of file
+{
+ "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, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "row_id", 
+   "fieldtype": "Data", 
+   "hidden": 0, 
+   "label": "Enter 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, 
+   "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", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "rate", 
+   "fieldtype": "Float", 
+   "in_list_view": 1, 
+   "label": "Rate", 
+   "oldfieldname": "rate", 
+   "oldfieldtype": "Currency", 
+   "permlevel": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "tax_amount", 
+   "fieldtype": "Currency", 
+   "in_list_view": 1, 
+   "label": "Amount", 
+   "oldfieldname": "tax_amount", 
+   "oldfieldtype": "Currency", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "read_only": 1, 
+   "reqd": 0
+  }, 
+  {
+   "fieldname": "total", 
+   "fieldtype": "Currency", 
+   "label": "Total", 
+   "oldfieldname": "total", 
+   "oldfieldtype": "Currency", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "allow_on_submit": 0, 
+   "description": "If checked, the tax amount will be considered as already included in the Print Rate / Print Amount", 
+   "fieldname": "included_in_print_rate", 
+   "fieldtype": "Check", 
+   "label": "Is this Tax included in Basic Rate?", 
+   "no_copy": 0, 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "print_width": "150px", 
+   "report_hide": 1, 
+   "width": "150px"
+  }, 
+  {
+   "fieldname": "tax_amount_after_discount_amount", 
+   "fieldtype": "Currency", 
+   "hidden": 1, 
+   "label": "Tax Amount After Discount Amount", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "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": "2014-01-03 15:04:25", 
+ "modified_by": "Administrator", 
+ "module": "Accounts", 
+ "name": "Sales Taxes and Charges", 
+ "owner": "Administrator"
+}
\ No newline at end of file
diff --git a/erpnext/accounts/doctype/sales_taxes_and_charges_master/sales_taxes_and_charges_master.txt b/erpnext/accounts/doctype/sales_taxes_and_charges_master/sales_taxes_and_charges_master.txt
index db83cce..a8cc0a2 100644
--- a/erpnext/accounts/doctype/sales_taxes_and_charges_master/sales_taxes_and_charges_master.txt
+++ b/erpnext/accounts/doctype/sales_taxes_and_charges_master/sales_taxes_and_charges_master.txt
@@ -1,126 +1,121 @@
-[
- {
-  "creation": "2013-01-10 16:34:09", 
-  "docstatus": 0, 
-  "modified": "2014-01-28 12:28:27", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "allow_import": 1, 
-  "allow_rename": 1, 
-  "autoname": "field:title", 
-  "description": "Standard tax template that can be applied to all Sales Transactions. This template can contain list of tax heads and also other expense / income heads like \"Shipping\", \"Insurance\", \"Handling\" etc.\n\n#### Note\n\nThe tax rate you define here will be the standard tax rate for all **Items**. If there are **Items** that have different rates, they must be added in the **Item Tax** table in the **Item** master.\n\n#### Description of Columns\n\n1. Calculation Type: \n    - This can be on **Net Total** (that is the sum of basic amount).\n    - **On Previous Row Total / Amount** (for cumulative taxes or charges). If you select this option, the tax will be applied as a percentage of the previous row (in the tax table) amount or total.\n    - **Actual** (as mentioned).\n2. Account Head: The Account ledger under which this tax will be booked\n3. Cost Center: If the tax / charge is an income (like shipping) or expense it needs to be booked against a Cost Center.\n4. Description: Description of the tax (that will be printed in invoices / quotes).\n5. Rate: Tax rate.\n6. Amount: Tax amount.\n7. Total: Cumulative total to this point.\n8. Enter Row: If based on \"Previous Row Total\" you can select the row number which will be taken as a base for this calculation (default is the previous row).\n9. Is this Tax included in Basic Rate?: If you check this, it means that this tax will not be shown below the item table, but will be included in the Basic Rate in your main item table. This is useful where you want give a flat price (inclusive of all taxes) price to customers.", 
-  "doctype": "DocType", 
-  "document_type": "Master", 
-  "icon": "icon-money", 
-  "module": "Accounts", 
-  "name": "__common__"
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "Sales Taxes and Charges Master", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "amend": 0, 
-  "cancel": 0, 
-  "doctype": "DocPerm", 
-  "email": 1, 
-  "name": "__common__", 
-  "parent": "Sales Taxes and Charges Master", 
-  "parentfield": "permissions", 
-  "parenttype": "DocType", 
-  "permlevel": 0, 
-  "print": 1, 
-  "read": 1, 
-  "report": 1, 
-  "submit": 0
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Sales Taxes and Charges Master"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "title", 
-  "fieldtype": "Data", 
-  "in_filter": 1, 
-  "label": "Title", 
-  "oldfieldname": "title", 
-  "oldfieldtype": "Data", 
-  "reqd": 1, 
-  "search_index": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "is_default", 
-  "fieldtype": "Check", 
-  "label": "Default"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break_3", 
-  "fieldtype": "Column Break"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "company", 
-  "fieldtype": "Link", 
-  "in_filter": 1, 
-  "label": "Company", 
-  "oldfieldname": "company", 
-  "oldfieldtype": "Link", 
-  "options": "Company", 
-  "reqd": 1, 
-  "search_index": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "section_break_5", 
-  "fieldtype": "Section Break"
- }, 
- {
-  "description": "* Will be calculated in the transaction.", 
-  "doctype": "DocField", 
-  "fieldname": "other_charges", 
-  "fieldtype": "Table", 
-  "label": "Sales Taxes and Charges Master", 
-  "oldfieldname": "other_charges", 
-  "oldfieldtype": "Table", 
-  "options": "Sales Taxes and Charges"
- }, 
- {
-  "description": "Specify a list of Territories, for which, this Taxes Master is valid", 
-  "doctype": "DocField", 
-  "fieldname": "valid_for_territories", 
-  "fieldtype": "Table", 
-  "label": "Valid for Territories", 
-  "options": "Applicable Territory", 
-  "reqd": 1
- }, 
- {
-  "create": 0, 
-  "delete": 0, 
-  "doctype": "DocPerm", 
-  "role": "Sales User", 
-  "write": 0
- }, 
- {
-  "create": 1, 
-  "delete": 1, 
-  "doctype": "DocPerm", 
-  "role": "Accounts Manager", 
-  "write": 1
- }, 
- {
-  "create": 1, 
-  "delete": 1, 
-  "doctype": "DocPerm", 
-  "role": "Sales Master Manager", 
-  "write": 1
- }
-]
\ No newline at end of file
+{
+ "allow_import": 1, 
+ "allow_rename": 1, 
+ "autoname": "field:title", 
+ "creation": "2013-01-10 16:34:09", 
+ "description": "Standard tax template that can be applied to all Sales Transactions. This template can contain list of tax heads and also other expense / income heads like \"Shipping\", \"Insurance\", \"Handling\" etc.\n\n#### Note\n\nThe tax rate you define here will be the standard tax rate for all **Items**. If there are **Items** that have different rates, they must be added in the **Item Tax** table in the **Item** master.\n\n#### Description of Columns\n\n1. Calculation Type: \n    - This can be on **Net Total** (that is the sum of basic amount).\n    - **On Previous Row Total / Amount** (for cumulative taxes or charges). If you select this option, the tax will be applied as a percentage of the previous row (in the tax table) amount or total.\n    - **Actual** (as mentioned).\n2. Account Head: The Account ledger under which this tax will be booked\n3. Cost Center: If the tax / charge is an income (like shipping) or expense it needs to be booked against a Cost Center.\n4. Description: Description of the tax (that will be printed in invoices / quotes).\n5. Rate: Tax rate.\n6. Amount: Tax amount.\n7. Total: Cumulative total to this point.\n8. Enter Row: If based on \"Previous Row Total\" you can select the row number which will be taken as a base for this calculation (default is the previous row).\n9. Is this Tax included in Basic Rate?: If you check this, it means that this tax will not be shown below the item table, but will be included in the Basic Rate in your main item table. This is useful where you want give a flat price (inclusive of all taxes) price to customers.", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "document_type": "Master", 
+ "fields": [
+  {
+   "fieldname": "title", 
+   "fieldtype": "Data", 
+   "in_filter": 1, 
+   "label": "Title", 
+   "oldfieldname": "title", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "reqd": 1, 
+   "search_index": 0
+  }, 
+  {
+   "fieldname": "is_default", 
+   "fieldtype": "Check", 
+   "label": "Default", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "column_break_3", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "company", 
+   "fieldtype": "Link", 
+   "in_filter": 1, 
+   "label": "Company", 
+   "oldfieldname": "company", 
+   "oldfieldtype": "Link", 
+   "options": "Company", 
+   "permlevel": 0, 
+   "reqd": 1, 
+   "search_index": 0
+  }, 
+  {
+   "fieldname": "section_break_5", 
+   "fieldtype": "Section Break", 
+   "permlevel": 0
+  }, 
+  {
+   "description": "* Will be calculated in the transaction.", 
+   "fieldname": "other_charges", 
+   "fieldtype": "Table", 
+   "label": "Sales Taxes and Charges Master", 
+   "oldfieldname": "other_charges", 
+   "oldfieldtype": "Table", 
+   "options": "Sales Taxes and Charges", 
+   "permlevel": 0
+  }, 
+  {
+   "description": "Specify a list of Territories, for which, this Taxes Master is valid", 
+   "fieldname": "valid_for_territories", 
+   "fieldtype": "Table", 
+   "label": "Valid for Territories", 
+   "options": "Applicable Territory", 
+   "permlevel": 0, 
+   "reqd": 1
+  }
+ ], 
+ "icon": "icon-money", 
+ "idx": 1, 
+ "modified": "2014-01-28 12:28:27", 
+ "modified_by": "Administrator", 
+ "module": "Accounts", 
+ "name": "Sales Taxes and Charges Master", 
+ "owner": "Administrator", 
+ "permissions": [
+  {
+   "amend": 0, 
+   "cancel": 0, 
+   "create": 0, 
+   "delete": 0, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Sales User", 
+   "submit": 0, 
+   "write": 0
+  }, 
+  {
+   "amend": 0, 
+   "cancel": 0, 
+   "create": 1, 
+   "delete": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Accounts Manager", 
+   "submit": 0, 
+   "write": 1
+  }, 
+  {
+   "amend": 0, 
+   "cancel": 0, 
+   "create": 1, 
+   "delete": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Sales Master Manager", 
+   "submit": 0, 
+   "write": 1
+  }
+ ]
+}
\ No newline at end of file
diff --git a/erpnext/accounts/doctype/shipping_rule/shipping_rule.txt b/erpnext/accounts/doctype/shipping_rule/shipping_rule.txt
index c1e2e90..a059c7b 100644
--- a/erpnext/accounts/doctype/shipping_rule/shipping_rule.txt
+++ b/erpnext/accounts/doctype/shipping_rule/shipping_rule.txt
@@ -1,161 +1,154 @@
-[
- {
-  "creation": "2013-06-25 11:48:03", 
-  "docstatus": 0, 
-  "modified": "2014-01-20 17:49:27", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "autoname": "Prompt", 
-  "description": "Specify conditions to calculate shipping amount", 
-  "doctype": "DocType", 
-  "icon": "icon-truck", 
-  "module": "Accounts", 
-  "name": "__common__"
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "Shipping Rule", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "doctype": "DocPerm", 
-  "email": 1, 
-  "name": "__common__", 
-  "parent": "Shipping Rule", 
-  "parentfield": "permissions", 
-  "parenttype": "DocType", 
-  "permlevel": 0, 
-  "print": 1, 
-  "read": 1, 
-  "report": 1
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Shipping Rule"
- }, 
- {
-  "description": "example: Next Day Shipping", 
-  "doctype": "DocField", 
-  "fieldname": "label", 
-  "fieldtype": "Data", 
-  "in_list_view": 1, 
-  "label": "Shipping Rule Label", 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break_2", 
-  "fieldtype": "Column Break"
- }, 
- {
-  "default": "Net Total", 
-  "doctype": "DocField", 
-  "fieldname": "calculate_based_on", 
-  "fieldtype": "Select", 
-  "hidden": 1, 
-  "in_list_view": 1, 
-  "label": "Calculate Based On", 
-  "options": "Net Total\nNet Weight", 
-  "read_only": 1, 
-  "reqd": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "rule_conditions_section", 
-  "fieldtype": "Section Break", 
-  "label": "Shipping Rule Conditions"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "shipping_rule_conditions", 
-  "fieldtype": "Table", 
-  "label": "Shipping Rule Conditions", 
-  "options": "Shipping Rule Condition", 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "section_break_6", 
-  "fieldtype": "Section Break"
- }, 
- {
-  "description": "Specify a list of Territories, for which, this Shipping Rule is valid", 
-  "doctype": "DocField", 
-  "fieldname": "valid_for_territories", 
-  "fieldtype": "Table", 
-  "label": "Valid For Territories", 
-  "options": "Applicable Territory", 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break_8", 
-  "fieldtype": "Column Break"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "company", 
-  "fieldtype": "Link", 
-  "in_list_view": 0, 
-  "label": "Company", 
-  "options": "Company", 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "section_break_10", 
-  "fieldtype": "Section Break"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "account", 
-  "fieldtype": "Link", 
-  "label": "Shipping Account", 
-  "options": "Account", 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break_12", 
-  "fieldtype": "Column Break"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "cost_center", 
-  "fieldtype": "Link", 
-  "label": "Cost Center", 
-  "options": "Cost Center", 
-  "reqd": 1
- }, 
- {
-  "delete": 0, 
-  "doctype": "DocPerm", 
-  "role": "Accounts User"
- }, 
- {
-  "delete": 0, 
-  "doctype": "DocPerm", 
-  "role": "Sales User"
- }, 
- {
-  "cancel": 1, 
-  "create": 1, 
-  "delete": 1, 
-  "doctype": "DocPerm", 
-  "role": "Accounts Manager", 
-  "write": 1
- }, 
- {
-  "cancel": 1, 
-  "create": 1, 
-  "delete": 1, 
-  "doctype": "DocPerm", 
-  "role": "Sales Master Manager", 
-  "write": 1
- }
-]
\ No newline at end of file
+{
+ "autoname": "Prompt", 
+ "creation": "2013-06-25 11:48:03", 
+ "description": "Specify conditions to calculate shipping amount", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "fields": [
+  {
+   "description": "example: Next Day Shipping", 
+   "fieldname": "label", 
+   "fieldtype": "Data", 
+   "in_list_view": 1, 
+   "label": "Shipping Rule Label", 
+   "permlevel": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "column_break_2", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0
+  }, 
+  {
+   "default": "Net Total", 
+   "fieldname": "calculate_based_on", 
+   "fieldtype": "Select", 
+   "hidden": 1, 
+   "in_list_view": 1, 
+   "label": "Calculate Based On", 
+   "options": "Net Total\nNet Weight", 
+   "permlevel": 0, 
+   "read_only": 1, 
+   "reqd": 0
+  }, 
+  {
+   "fieldname": "rule_conditions_section", 
+   "fieldtype": "Section Break", 
+   "label": "Shipping Rule Conditions", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "shipping_rule_conditions", 
+   "fieldtype": "Table", 
+   "label": "Shipping Rule Conditions", 
+   "options": "Shipping Rule Condition", 
+   "permlevel": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "section_break_6", 
+   "fieldtype": "Section Break", 
+   "permlevel": 0
+  }, 
+  {
+   "description": "Specify a list of Territories, for which, this Shipping Rule is valid", 
+   "fieldname": "valid_for_territories", 
+   "fieldtype": "Table", 
+   "label": "Valid For Territories", 
+   "options": "Applicable Territory", 
+   "permlevel": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "column_break_8", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "company", 
+   "fieldtype": "Link", 
+   "in_list_view": 0, 
+   "label": "Company", 
+   "options": "Company", 
+   "permlevel": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "section_break_10", 
+   "fieldtype": "Section Break", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "account", 
+   "fieldtype": "Link", 
+   "label": "Shipping Account", 
+   "options": "Account", 
+   "permlevel": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "column_break_12", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "cost_center", 
+   "fieldtype": "Link", 
+   "label": "Cost Center", 
+   "options": "Cost Center", 
+   "permlevel": 0, 
+   "reqd": 1
+  }
+ ], 
+ "icon": "icon-truck", 
+ "idx": 1, 
+ "modified": "2014-01-20 17:49:27", 
+ "modified_by": "Administrator", 
+ "module": "Accounts", 
+ "name": "Shipping Rule", 
+ "owner": "Administrator", 
+ "permissions": [
+  {
+   "delete": 0, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Accounts User"
+  }, 
+  {
+   "delete": 0, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Sales User"
+  }, 
+  {
+   "cancel": 1, 
+   "create": 1, 
+   "delete": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Accounts Manager", 
+   "write": 1
+  }, 
+  {
+   "cancel": 1, 
+   "create": 1, 
+   "delete": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Sales Master Manager", 
+   "write": 1
+  }
+ ]
+}
\ No newline at end of file
diff --git a/erpnext/accounts/doctype/shipping_rule_condition/shipping_rule_condition.txt b/erpnext/accounts/doctype/shipping_rule_condition/shipping_rule_condition.txt
index 22af554..6b3fd2b 100644
--- a/erpnext/accounts/doctype/shipping_rule_condition/shipping_rule_condition.txt
+++ b/erpnext/accounts/doctype/shipping_rule_condition/shipping_rule_condition.txt
@@ -1,51 +1,40 @@
-[
- {
-  "creation": "2013-06-25 11:54:50", 
-  "docstatus": 0, 
-  "modified": "2013-12-20 19:21:46", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "description": "A condition for a Shipping Rule", 
-  "doctype": "DocType", 
-  "istable": 1, 
-  "module": "Accounts", 
-  "name": "__common__"
- }, 
- {
-  "doctype": "DocField", 
-  "in_list_view": 1, 
-  "name": "__common__", 
-  "parent": "Shipping Rule Condition", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Shipping Rule Condition"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "from_value", 
-  "fieldtype": "Float", 
-  "label": "From Value", 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "to_value", 
-  "fieldtype": "Float", 
-  "label": "To Value", 
-  "reqd": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "shipping_amount", 
-  "fieldtype": "Currency", 
-  "label": "Shipping Amount", 
-  "options": "Company:company:default_currency", 
-  "reqd": 1
- }
-]
\ No newline at end of file
+{
+ "creation": "2013-06-25 11:54:50", 
+ "description": "A condition for a Shipping Rule", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "fields": [
+  {
+   "fieldname": "from_value", 
+   "fieldtype": "Float", 
+   "in_list_view": 1, 
+   "label": "From Value", 
+   "permlevel": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "to_value", 
+   "fieldtype": "Float", 
+   "in_list_view": 1, 
+   "label": "To Value", 
+   "permlevel": 0, 
+   "reqd": 0
+  }, 
+  {
+   "fieldname": "shipping_amount", 
+   "fieldtype": "Currency", 
+   "in_list_view": 1, 
+   "label": "Shipping Amount", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "reqd": 1
+  }
+ ], 
+ "idx": 1, 
+ "istable": 1, 
+ "modified": "2013-12-20 19:21:46", 
+ "modified_by": "Administrator", 
+ "module": "Accounts", 
+ "name": "Shipping Rule Condition", 
+ "owner": "Administrator"
+}
\ No newline at end of file
diff --git a/erpnext/accounts/page/accounts_browser/accounts_browser.txt b/erpnext/accounts/page/accounts_browser/accounts_browser.txt
index e83759c..d4b5f3c 100644
--- a/erpnext/accounts/page/accounts_browser/accounts_browser.txt
+++ b/erpnext/accounts/page/accounts_browser/accounts_browser.txt
@@ -1,36 +1,22 @@
-[
- {
-  "creation": "2012-06-14 15:07:28", 
-  "docstatus": 0, 
-  "modified": "2013-07-11 14:39:42", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "doctype": "Page", 
-  "icon": "icon-sitemap", 
-  "module": "Accounts", 
-  "name": "__common__", 
-  "page_name": "Accounts Browser", 
-  "standard": "Yes"
- }, 
- {
-  "doctype": "Page Role", 
-  "name": "__common__", 
-  "parent": "Accounts Browser", 
-  "parentfield": "roles", 
-  "parenttype": "Page"
- }, 
- {
-  "doctype": "Page", 
-  "name": "Accounts Browser"
- }, 
- {
-  "doctype": "Page Role", 
-  "role": "Accounts User"
- }, 
- {
-  "doctype": "Page Role", 
-  "role": "Accounts Manager"
- }
-]
\ No newline at end of file
+{
+ "creation": "2012-06-14 15:07:28", 
+ "docstatus": 0, 
+ "doctype": "Page", 
+ "icon": "icon-sitemap", 
+ "idx": 1, 
+ "modified": "2013-07-11 14:39:42", 
+ "modified_by": "Administrator", 
+ "module": "Accounts", 
+ "name": "Accounts Browser", 
+ "owner": "Administrator", 
+ "page_name": "Accounts Browser", 
+ "roles": [
+  {
+   "role": "Accounts User"
+  }, 
+  {
+   "role": "Accounts Manager"
+  }
+ ], 
+ "standard": "Yes"
+}
\ No newline at end of file
diff --git a/erpnext/accounts/page/financial_analytics/financial_analytics.txt b/erpnext/accounts/page/financial_analytics/financial_analytics.txt
index 94a9b8e..75642f3 100644
--- a/erpnext/accounts/page/financial_analytics/financial_analytics.txt
+++ b/erpnext/accounts/page/financial_analytics/financial_analytics.txt
@@ -1,37 +1,23 @@
-[
- {
-  "creation": "2013-01-27 16:30:52", 
-  "docstatus": 0, 
-  "modified": "2013-07-11 14:42:16", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "doctype": "Page", 
-  "icon": "icon-bar-chart", 
-  "module": "Accounts", 
-  "name": "__common__", 
-  "page_name": "financial-analytics", 
-  "standard": "Yes", 
-  "title": "Financial Analytics"
- }, 
- {
-  "doctype": "Page Role", 
-  "name": "__common__", 
-  "parent": "financial-analytics", 
-  "parentfield": "roles", 
-  "parenttype": "Page"
- }, 
- {
-  "doctype": "Page", 
-  "name": "financial-analytics"
- }, 
- {
-  "doctype": "Page Role", 
-  "role": "Analytics"
- }, 
- {
-  "doctype": "Page Role", 
-  "role": "Accounts Manager"
- }
-]
\ No newline at end of file
+{
+ "creation": "2013-01-27 16:30:52", 
+ "docstatus": 0, 
+ "doctype": "Page", 
+ "icon": "icon-bar-chart", 
+ "idx": 1, 
+ "modified": "2013-07-11 14:42:16", 
+ "modified_by": "Administrator", 
+ "module": "Accounts", 
+ "name": "financial-analytics", 
+ "owner": "Administrator", 
+ "page_name": "financial-analytics", 
+ "roles": [
+  {
+   "role": "Analytics"
+  }, 
+  {
+   "role": "Accounts Manager"
+  }
+ ], 
+ "standard": "Yes", 
+ "title": "Financial Analytics"
+}
\ No newline at end of file
diff --git a/erpnext/accounts/page/trial_balance/trial_balance.txt b/erpnext/accounts/page/trial_balance/trial_balance.txt
index f65146c..ed1dfdd 100644
--- a/erpnext/accounts/page/trial_balance/trial_balance.txt
+++ b/erpnext/accounts/page/trial_balance/trial_balance.txt
@@ -1,37 +1,23 @@
-[
- {
-  "creation": "2013-01-27 16:30:52", 
-  "docstatus": 0, 
-  "modified": "2013-07-11 14:44:49", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "doctype": "Page", 
-  "icon": "icon-table", 
-  "module": "Accounts", 
-  "name": "__common__", 
-  "page_name": "trial-balance", 
-  "standard": "Yes", 
-  "title": "Trial Balance"
- }, 
- {
-  "doctype": "Page Role", 
-  "name": "__common__", 
-  "parent": "trial-balance", 
-  "parentfield": "roles", 
-  "parenttype": "Page"
- }, 
- {
-  "doctype": "Page", 
-  "name": "trial-balance"
- }, 
- {
-  "doctype": "Page Role", 
-  "role": "Analytics"
- }, 
- {
-  "doctype": "Page Role", 
-  "role": "Accounts Manager"
- }
-]
\ No newline at end of file
+{
+ "creation": "2013-01-27 16:30:52", 
+ "docstatus": 0, 
+ "doctype": "Page", 
+ "icon": "icon-table", 
+ "idx": 1, 
+ "modified": "2013-07-11 14:44:49", 
+ "modified_by": "Administrator", 
+ "module": "Accounts", 
+ "name": "trial-balance", 
+ "owner": "Administrator", 
+ "page_name": "trial-balance", 
+ "roles": [
+  {
+   "role": "Analytics"
+  }, 
+  {
+   "role": "Accounts Manager"
+  }
+ ], 
+ "standard": "Yes", 
+ "title": "Trial Balance"
+}
\ No newline at end of file
diff --git a/erpnext/accounts/report/accounts_payable/accounts_payable.txt b/erpnext/accounts/report/accounts_payable/accounts_payable.txt
index 9d20510..41c63fc 100644
--- a/erpnext/accounts/report/accounts_payable/accounts_payable.txt
+++ b/erpnext/accounts/report/accounts_payable/accounts_payable.txt
@@ -1,23 +1,16 @@
-[
- {
-  "creation": "2013-04-22 16:16:03", 
-  "docstatus": 0, 
-  "modified": "2014-03-07 15:30:27", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "add_total_row": 1, 
-  "doctype": "Report", 
-  "is_standard": "Yes", 
-  "module": "Accounts", 
-  "name": "__common__", 
-  "ref_doctype": "Purchase Invoice", 
-  "report_name": "Accounts Payable", 
-  "report_type": "Report Builder"
- }, 
- {
-  "doctype": "Report", 
-  "name": "Accounts Payable"
- }
-]
\ No newline at end of file
+{
+ "add_total_row": 1, 
+ "creation": "2013-04-22 16:16:03", 
+ "docstatus": 0, 
+ "doctype": "Report", 
+ "idx": 1, 
+ "is_standard": "Yes", 
+ "modified": "2014-03-07 15:30:27", 
+ "modified_by": "Administrator", 
+ "module": "Accounts", 
+ "name": "Accounts Payable", 
+ "owner": "Administrator", 
+ "ref_doctype": "Purchase Invoice", 
+ "report_name": "Accounts Payable", 
+ "report_type": "Report Builder"
+}
\ No newline at end of file
diff --git a/erpnext/accounts/report/accounts_receivable/accounts_receivable.txt b/erpnext/accounts/report/accounts_receivable/accounts_receivable.txt
index 6da3088..3e6229d 100644
--- a/erpnext/accounts/report/accounts_receivable/accounts_receivable.txt
+++ b/erpnext/accounts/report/accounts_receivable/accounts_receivable.txt
@@ -1,23 +1,16 @@
-[
- {
-  "creation": "2013-04-16 11:31:13", 
-  "docstatus": 0, 
-  "modified": "2014-03-07 15:30:27", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "add_total_row": 1, 
-  "doctype": "Report", 
-  "is_standard": "Yes", 
-  "module": "Accounts", 
-  "name": "__common__", 
-  "ref_doctype": "Sales Invoice", 
-  "report_name": "Accounts Receivable", 
-  "report_type": "Script Report"
- }, 
- {
-  "doctype": "Report", 
-  "name": "Accounts Receivable"
- }
-]
\ No newline at end of file
+{
+ "add_total_row": 1, 
+ "creation": "2013-04-16 11:31:13", 
+ "docstatus": 0, 
+ "doctype": "Report", 
+ "idx": 1, 
+ "is_standard": "Yes", 
+ "modified": "2014-03-07 15:30:27", 
+ "modified_by": "Administrator", 
+ "module": "Accounts", 
+ "name": "Accounts Receivable", 
+ "owner": "Administrator", 
+ "ref_doctype": "Sales Invoice", 
+ "report_name": "Accounts Receivable", 
+ "report_type": "Script Report"
+}
\ No newline at end of file
diff --git a/erpnext/accounts/report/bank_clearance_summary/bank_clearance_summary.txt b/erpnext/accounts/report/bank_clearance_summary/bank_clearance_summary.txt
index 3b462a0..ab2bfe6 100644
--- a/erpnext/accounts/report/bank_clearance_summary/bank_clearance_summary.txt
+++ b/erpnext/accounts/report/bank_clearance_summary/bank_clearance_summary.txt
@@ -1,22 +1,15 @@
-[
- {
-  "creation": "2013-05-01 12:13:25", 
-  "docstatus": 0, 
-  "modified": "2014-03-07 15:30:27", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "doctype": "Report", 
-  "is_standard": "Yes", 
-  "module": "Accounts", 
-  "name": "__common__", 
-  "ref_doctype": "Journal Voucher", 
-  "report_name": "Bank Clearance Summary", 
-  "report_type": "Script Report"
- }, 
- {
-  "doctype": "Report", 
-  "name": "Bank Clearance Summary"
- }
-]
\ No newline at end of file
+{
+ "creation": "2013-05-01 12:13:25", 
+ "docstatus": 0, 
+ "doctype": "Report", 
+ "idx": 1, 
+ "is_standard": "Yes", 
+ "modified": "2014-03-07 15:30:27", 
+ "modified_by": "Administrator", 
+ "module": "Accounts", 
+ "name": "Bank Clearance Summary", 
+ "owner": "Administrator", 
+ "ref_doctype": "Journal Voucher", 
+ "report_name": "Bank Clearance Summary", 
+ "report_type": "Script Report"
+}
\ No newline at end of file
diff --git a/erpnext/accounts/report/bank_reconciliation_statement/bank_reconciliation_statement.txt b/erpnext/accounts/report/bank_reconciliation_statement/bank_reconciliation_statement.txt
index a2436a8..8eda364 100644
--- a/erpnext/accounts/report/bank_reconciliation_statement/bank_reconciliation_statement.txt
+++ b/erpnext/accounts/report/bank_reconciliation_statement/bank_reconciliation_statement.txt
@@ -1,23 +1,16 @@
-[
- {
-  "creation": "2013-04-30 18:30:21", 
-  "docstatus": 0, 
-  "modified": "2014-03-07 15:30:27", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "add_total_row": 0, 
-  "doctype": "Report", 
-  "is_standard": "Yes", 
-  "module": "Accounts", 
-  "name": "__common__", 
-  "ref_doctype": "Journal Voucher", 
-  "report_name": "Bank Reconciliation Statement", 
-  "report_type": "Script Report"
- }, 
- {
-  "doctype": "Report", 
-  "name": "Bank Reconciliation Statement"
- }
-]
\ No newline at end of file
+{
+ "add_total_row": 0, 
+ "creation": "2013-04-30 18:30:21", 
+ "docstatus": 0, 
+ "doctype": "Report", 
+ "idx": 1, 
+ "is_standard": "Yes", 
+ "modified": "2014-03-07 15:30:27", 
+ "modified_by": "Administrator", 
+ "module": "Accounts", 
+ "name": "Bank Reconciliation Statement", 
+ "owner": "Administrator", 
+ "ref_doctype": "Journal Voucher", 
+ "report_name": "Bank Reconciliation Statement", 
+ "report_type": "Script Report"
+}
\ No newline at end of file
diff --git a/erpnext/accounts/report/budget_variance_report/budget_variance_report.txt b/erpnext/accounts/report/budget_variance_report/budget_variance_report.txt
index be9ce13..6d738b6 100644
--- a/erpnext/accounts/report/budget_variance_report/budget_variance_report.txt
+++ b/erpnext/accounts/report/budget_variance_report/budget_variance_report.txt
@@ -1,22 +1,15 @@
-[
- {
-  "creation": "2013-06-18 12:56:36", 
-  "docstatus": 0, 
-  "modified": "2014-03-07 15:30:27", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "doctype": "Report", 
-  "is_standard": "Yes", 
-  "module": "Accounts", 
-  "name": "__common__", 
-  "ref_doctype": "Cost Center", 
-  "report_name": "Budget Variance Report", 
-  "report_type": "Script Report"
- }, 
- {
-  "doctype": "Report", 
-  "name": "Budget Variance Report"
- }
-]
\ No newline at end of file
+{
+ "creation": "2013-06-18 12:56:36", 
+ "docstatus": 0, 
+ "doctype": "Report", 
+ "idx": 1, 
+ "is_standard": "Yes", 
+ "modified": "2014-03-07 15:30:27", 
+ "modified_by": "Administrator", 
+ "module": "Accounts", 
+ "name": "Budget Variance Report", 
+ "owner": "Administrator", 
+ "ref_doctype": "Cost Center", 
+ "report_name": "Budget Variance Report", 
+ "report_type": "Script Report"
+}
\ No newline at end of file
diff --git a/erpnext/accounts/report/customer_account_head/customer_account_head.txt b/erpnext/accounts/report/customer_account_head/customer_account_head.txt
index c2a856b..c73a7f9 100644
--- a/erpnext/accounts/report/customer_account_head/customer_account_head.txt
+++ b/erpnext/accounts/report/customer_account_head/customer_account_head.txt
@@ -1,22 +1,15 @@
-[
- {
-  "creation": "2013-06-03 16:17:34", 
-  "docstatus": 0, 
-  "modified": "2014-03-07 15:30:27", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "doctype": "Report", 
-  "is_standard": "Yes", 
-  "module": "Accounts", 
-  "name": "__common__", 
-  "ref_doctype": "Account", 
-  "report_name": "Customer Account Head", 
-  "report_type": "Script Report"
- }, 
- {
-  "doctype": "Report", 
-  "name": "Customer Account Head"
- }
-]
\ No newline at end of file
+{
+ "creation": "2013-06-03 16:17:34", 
+ "docstatus": 0, 
+ "doctype": "Report", 
+ "idx": 1, 
+ "is_standard": "Yes", 
+ "modified": "2014-03-07 15:30:27", 
+ "modified_by": "Administrator", 
+ "module": "Accounts", 
+ "name": "Customer Account Head", 
+ "owner": "Administrator", 
+ "ref_doctype": "Account", 
+ "report_name": "Customer Account Head", 
+ "report_type": "Script Report"
+}
\ No newline at end of file
diff --git a/erpnext/accounts/report/delivered_items_to_be_billed/delivered_items_to_be_billed.txt b/erpnext/accounts/report/delivered_items_to_be_billed/delivered_items_to_be_billed.txt
index a525d2d..3d75039 100644
--- a/erpnext/accounts/report/delivered_items_to_be_billed/delivered_items_to_be_billed.txt
+++ b/erpnext/accounts/report/delivered_items_to_be_billed/delivered_items_to_be_billed.txt
@@ -1,23 +1,16 @@
-[
- {
-  "creation": "2013-07-30 17:28:49", 
-  "docstatus": 0, 
-  "modified": "2014-03-07 15:30:27", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "doctype": "Report", 
-  "is_standard": "Yes", 
-  "module": "Accounts", 
-  "name": "__common__", 
-  "query": "select\n    `tabDelivery Note`.`name` as \"Delivery Note:Link/Delivery Note:120\",\n\t`tabDelivery Note`.`customer` as \"Customer:Link/Customer:120\",\n\t`tabDelivery Note`.`posting_date` as \"Date:Date\",\n\t`tabDelivery Note`.`project_name` as \"Project\",\n\t`tabDelivery Note Item`.`item_code` as \"Item:Link/Item:120\",\n\t(`tabDelivery Note Item`.`qty` - ifnull((select sum(qty) from `tabSales Invoice Item` \n\t    where `tabSales Invoice Item`.docstatus=1 and \n            `tabSales Invoice Item`.delivery_note = `tabDelivery Note`.name and\n\t        `tabSales Invoice Item`.dn_detail = `tabDelivery Note Item`.name), 0))\n\t\tas \"Qty:Float:110\",\n\t(`tabDelivery Note Item`.`base_amount` - ifnull((select sum(base_amount) from `tabSales Invoice Item` \n        where `tabSales Invoice Item`.docstatus=1 and \n            `tabSales Invoice Item`.delivery_note = `tabDelivery Note`.name and\n            `tabSales Invoice Item`.dn_detail = `tabDelivery Note Item`.name), 0))\n\t\tas \"Amount:Currency:110\",\n\t`tabDelivery Note Item`.`item_name` as \"Item Name::150\",\n\t`tabDelivery Note Item`.`description` as \"Description::200\"\nfrom `tabDelivery Note`, `tabDelivery Note Item`\nwhere\n    `tabDelivery Note`.docstatus = 1 and\n\t`tabDelivery Note`.`status` != \"Stopped\" and\n    `tabDelivery Note`.name = `tabDelivery Note Item`.parent and\n    (`tabDelivery Note Item`.qty > ifnull((select sum(qty) from `tabSales Invoice Item` \n        where `tabSales Invoice Item`.docstatus=1 and \n            `tabSales Invoice Item`.delivery_note = `tabDelivery Note`.name and\n            `tabSales Invoice Item`.dn_detail = `tabDelivery Note Item`.name), 0))\norder by `tabDelivery Note`.`name` desc", 
-  "ref_doctype": "Sales Invoice", 
-  "report_name": "Delivered Items To Be Billed", 
-  "report_type": "Query Report"
- }, 
- {
-  "doctype": "Report", 
-  "name": "Delivered Items To Be Billed"
- }
-]
\ No newline at end of file
+{
+ "creation": "2013-07-30 17:28:49", 
+ "docstatus": 0, 
+ "doctype": "Report", 
+ "idx": 1, 
+ "is_standard": "Yes", 
+ "modified": "2014-03-07 15:30:27", 
+ "modified_by": "Administrator", 
+ "module": "Accounts", 
+ "name": "Delivered Items To Be Billed", 
+ "owner": "Administrator", 
+ "query": "select\n    `tabDelivery Note`.`name` as \"Delivery Note:Link/Delivery Note:120\",\n\t`tabDelivery Note`.`customer` as \"Customer:Link/Customer:120\",\n\t`tabDelivery Note`.`posting_date` as \"Date:Date\",\n\t`tabDelivery Note`.`project_name` as \"Project\",\n\t`tabDelivery Note Item`.`item_code` as \"Item:Link/Item:120\",\n\t(`tabDelivery Note Item`.`qty` - ifnull((select sum(qty) from `tabSales Invoice Item` \n\t    where `tabSales Invoice Item`.docstatus=1 and \n            `tabSales Invoice Item`.delivery_note = `tabDelivery Note`.name and\n\t        `tabSales Invoice Item`.dn_detail = `tabDelivery Note Item`.name), 0))\n\t\tas \"Qty:Float:110\",\n\t(`tabDelivery Note Item`.`base_amount` - ifnull((select sum(base_amount) from `tabSales Invoice Item` \n        where `tabSales Invoice Item`.docstatus=1 and \n            `tabSales Invoice Item`.delivery_note = `tabDelivery Note`.name and\n            `tabSales Invoice Item`.dn_detail = `tabDelivery Note Item`.name), 0))\n\t\tas \"Amount:Currency:110\",\n\t`tabDelivery Note Item`.`item_name` as \"Item Name::150\",\n\t`tabDelivery Note Item`.`description` as \"Description::200\"\nfrom `tabDelivery Note`, `tabDelivery Note Item`\nwhere\n    `tabDelivery Note`.docstatus = 1 and\n\t`tabDelivery Note`.`status` != \"Stopped\" and\n    `tabDelivery Note`.name = `tabDelivery Note Item`.parent and\n    (`tabDelivery Note Item`.qty > ifnull((select sum(qty) from `tabSales Invoice Item` \n        where `tabSales Invoice Item`.docstatus=1 and \n            `tabSales Invoice Item`.delivery_note = `tabDelivery Note`.name and\n            `tabSales Invoice Item`.dn_detail = `tabDelivery Note Item`.name), 0))\norder by `tabDelivery Note`.`name` desc", 
+ "ref_doctype": "Sales Invoice", 
+ "report_name": "Delivered Items To Be Billed", 
+ "report_type": "Query Report"
+}
\ No newline at end of file
diff --git a/erpnext/accounts/report/general_ledger/general_ledger.txt b/erpnext/accounts/report/general_ledger/general_ledger.txt
index cdfb033..04f020d 100644
--- a/erpnext/accounts/report/general_ledger/general_ledger.txt
+++ b/erpnext/accounts/report/general_ledger/general_ledger.txt
@@ -1,22 +1,15 @@
-[
- {
-  "creation": "2013-12-06 13:22:23", 
-  "docstatus": 0, 
-  "modified": "2014-03-07 15:30:27", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "doctype": "Report", 
-  "is_standard": "Yes", 
-  "module": "Accounts", 
-  "name": "__common__", 
-  "ref_doctype": "GL Entry", 
-  "report_name": "General Ledger", 
-  "report_type": "Script Report"
- }, 
- {
-  "doctype": "Report", 
-  "name": "General Ledger"
- }
-]
\ No newline at end of file
+{
+ "creation": "2013-12-06 13:22:23", 
+ "docstatus": 0, 
+ "doctype": "Report", 
+ "idx": 1, 
+ "is_standard": "Yes", 
+ "modified": "2014-03-07 15:30:27", 
+ "modified_by": "Administrator", 
+ "module": "Accounts", 
+ "name": "General Ledger", 
+ "owner": "Administrator", 
+ "ref_doctype": "GL Entry", 
+ "report_name": "General Ledger", 
+ "report_type": "Script Report"
+}
\ No newline at end of file
diff --git a/erpnext/accounts/report/gross_profit/gross_profit.txt b/erpnext/accounts/report/gross_profit/gross_profit.txt
index 5677660..c09d7b3 100644
--- a/erpnext/accounts/report/gross_profit/gross_profit.txt
+++ b/erpnext/accounts/report/gross_profit/gross_profit.txt
@@ -1,22 +1,15 @@
-[
- {
-  "creation": "2013-02-25 17:03:34", 
-  "docstatus": 0, 
-  "modified": "2014-03-07 15:30:27", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "doctype": "Report", 
-  "is_standard": "Yes", 
-  "module": "Accounts", 
-  "name": "__common__", 
-  "ref_doctype": "Sales Invoice", 
-  "report_name": "Gross Profit", 
-  "report_type": "Script Report"
- }, 
- {
-  "doctype": "Report", 
-  "name": "Gross Profit"
- }
-]
\ No newline at end of file
+{
+ "creation": "2013-02-25 17:03:34", 
+ "docstatus": 0, 
+ "doctype": "Report", 
+ "idx": 1, 
+ "is_standard": "Yes", 
+ "modified": "2014-03-07 15:30:27", 
+ "modified_by": "Administrator", 
+ "module": "Accounts", 
+ "name": "Gross Profit", 
+ "owner": "Administrator", 
+ "ref_doctype": "Sales Invoice", 
+ "report_name": "Gross Profit", 
+ "report_type": "Script Report"
+}
\ No newline at end of file
diff --git a/erpnext/accounts/report/item_wise_purchase_register/item_wise_purchase_register.txt b/erpnext/accounts/report/item_wise_purchase_register/item_wise_purchase_register.txt
index 3dbd536..9c1c55e 100644
--- a/erpnext/accounts/report/item_wise_purchase_register/item_wise_purchase_register.txt
+++ b/erpnext/accounts/report/item_wise_purchase_register/item_wise_purchase_register.txt
@@ -1,23 +1,16 @@
-[
- {
-  "creation": "2013-06-05 15:37:30", 
-  "docstatus": 0, 
-  "modified": "2014-03-07 15:30:27", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "add_total_row": 1, 
-  "doctype": "Report", 
-  "is_standard": "Yes", 
-  "module": "Accounts", 
-  "name": "__common__", 
-  "ref_doctype": "Purchase Invoice", 
-  "report_name": "Item-wise Purchase Register", 
-  "report_type": "Script Report"
- }, 
- {
-  "doctype": "Report", 
-  "name": "Item-wise Purchase Register"
- }
-]
\ No newline at end of file
+{
+ "add_total_row": 1, 
+ "creation": "2013-06-05 15:37:30", 
+ "docstatus": 0, 
+ "doctype": "Report", 
+ "idx": 1, 
+ "is_standard": "Yes", 
+ "modified": "2014-03-07 15:30:27", 
+ "modified_by": "Administrator", 
+ "module": "Accounts", 
+ "name": "Item-wise Purchase Register", 
+ "owner": "Administrator", 
+ "ref_doctype": "Purchase Invoice", 
+ "report_name": "Item-wise Purchase Register", 
+ "report_type": "Script Report"
+}
\ No newline at end of file
diff --git a/erpnext/accounts/report/item_wise_sales_register/item_wise_sales_register.txt b/erpnext/accounts/report/item_wise_sales_register/item_wise_sales_register.txt
index 8d30644..3a4f296 100644
--- a/erpnext/accounts/report/item_wise_sales_register/item_wise_sales_register.txt
+++ b/erpnext/accounts/report/item_wise_sales_register/item_wise_sales_register.txt
@@ -1,23 +1,16 @@
-[
- {
-  "creation": "2013-05-13 17:50:55", 
-  "docstatus": 0, 
-  "modified": "2014-03-07 15:30:27", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "add_total_row": 1, 
-  "doctype": "Report", 
-  "is_standard": "Yes", 
-  "module": "Accounts", 
-  "name": "__common__", 
-  "ref_doctype": "Sales Invoice", 
-  "report_name": "Item-wise Sales Register", 
-  "report_type": "Script Report"
- }, 
- {
-  "doctype": "Report", 
-  "name": "Item-wise Sales Register"
- }
-]
\ No newline at end of file
+{
+ "add_total_row": 1, 
+ "creation": "2013-05-13 17:50:55", 
+ "docstatus": 0, 
+ "doctype": "Report", 
+ "idx": 1, 
+ "is_standard": "Yes", 
+ "modified": "2014-03-07 15:30:27", 
+ "modified_by": "Administrator", 
+ "module": "Accounts", 
+ "name": "Item-wise Sales Register", 
+ "owner": "Administrator", 
+ "ref_doctype": "Sales Invoice", 
+ "report_name": "Item-wise Sales Register", 
+ "report_type": "Script Report"
+}
\ No newline at end of file
diff --git a/erpnext/accounts/report/ordered_items_to_be_billed/ordered_items_to_be_billed.txt b/erpnext/accounts/report/ordered_items_to_be_billed/ordered_items_to_be_billed.txt
index 09b6cff..cc62acd 100644
--- a/erpnext/accounts/report/ordered_items_to_be_billed/ordered_items_to_be_billed.txt
+++ b/erpnext/accounts/report/ordered_items_to_be_billed/ordered_items_to_be_billed.txt
@@ -1,23 +1,16 @@
-[
- {
-  "creation": "2013-02-21 14:26:44", 
-  "docstatus": 0, 
-  "modified": "2014-03-07 15:30:27", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "doctype": "Report", 
-  "is_standard": "Yes", 
-  "module": "Accounts", 
-  "name": "__common__", 
-  "query": "select \n `tabSales Order`.`name` as \"Sales Order:Link/Sales Order:120\",\n `tabSales Order`.`customer` as \"Customer:Link/Customer:120\",\n `tabSales Order`.`status` as \"Status\",\n `tabSales Order`.`transaction_date` as \"Date:Date\",\n `tabSales Order`.`project_name` as \"Project\",\n `tabSales Order Item`.item_code as \"Item:Link/Item:120\",\n `tabSales Order Item`.base_amount as \"Amount:Currency:110\",\n (`tabSales Order Item`.billed_amt * ifnull(`tabSales Order`.conversion_rate, 1)) as \"Billed Amount:Currency:110\",\n (ifnull(`tabSales Order Item`.base_amount, 0) - (ifnull(`tabSales Order Item`.billed_amt, 0) * ifnull(`tabSales Order`.conversion_rate, 1))) as \"Pending Amount:Currency:120\",\n `tabSales Order Item`.item_name as \"Item Name::150\",\n `tabSales Order Item`.description as \"Description::200\"\nfrom\n `tabSales Order`, `tabSales Order Item`\nwhere\n `tabSales Order Item`.`parent` = `tabSales Order`.`name`\n and `tabSales Order`.docstatus = 1\n and `tabSales Order`.status != \"Stopped\"\n and ifnull(`tabSales Order Item`.billed_amt,0) < ifnull(`tabSales Order Item`.amount,0)\norder by `tabSales Order`.transaction_date asc", 
-  "ref_doctype": "Sales Invoice", 
-  "report_name": "Ordered Items To Be Billed", 
-  "report_type": "Query Report"
- }, 
- {
-  "doctype": "Report", 
-  "name": "Ordered Items To Be Billed"
- }
-]
\ No newline at end of file
+{
+ "creation": "2013-02-21 14:26:44", 
+ "docstatus": 0, 
+ "doctype": "Report", 
+ "idx": 1, 
+ "is_standard": "Yes", 
+ "modified": "2014-03-07 15:30:27", 
+ "modified_by": "Administrator", 
+ "module": "Accounts", 
+ "name": "Ordered Items To Be Billed", 
+ "owner": "Administrator", 
+ "query": "select \n `tabSales Order`.`name` as \"Sales Order:Link/Sales Order:120\",\n `tabSales Order`.`customer` as \"Customer:Link/Customer:120\",\n `tabSales Order`.`status` as \"Status\",\n `tabSales Order`.`transaction_date` as \"Date:Date\",\n `tabSales Order`.`project_name` as \"Project\",\n `tabSales Order Item`.item_code as \"Item:Link/Item:120\",\n `tabSales Order Item`.base_amount as \"Amount:Currency:110\",\n (`tabSales Order Item`.billed_amt * ifnull(`tabSales Order`.conversion_rate, 1)) as \"Billed Amount:Currency:110\",\n (ifnull(`tabSales Order Item`.base_amount, 0) - (ifnull(`tabSales Order Item`.billed_amt, 0) * ifnull(`tabSales Order`.conversion_rate, 1))) as \"Pending Amount:Currency:120\",\n `tabSales Order Item`.item_name as \"Item Name::150\",\n `tabSales Order Item`.description as \"Description::200\"\nfrom\n `tabSales Order`, `tabSales Order Item`\nwhere\n `tabSales Order Item`.`parent` = `tabSales Order`.`name`\n and `tabSales Order`.docstatus = 1\n and `tabSales Order`.status != \"Stopped\"\n and ifnull(`tabSales Order Item`.billed_amt,0) < ifnull(`tabSales Order Item`.amount,0)\norder by `tabSales Order`.transaction_date asc", 
+ "ref_doctype": "Sales Invoice", 
+ "report_name": "Ordered Items To Be Billed", 
+ "report_type": "Query Report"
+}
\ No newline at end of file
diff --git a/erpnext/accounts/report/payment_period_based_on_invoice_date/payment_period_based_on_invoice_date.txt b/erpnext/accounts/report/payment_period_based_on_invoice_date/payment_period_based_on_invoice_date.txt
index e48ea69..9e3ce55 100644
--- a/erpnext/accounts/report/payment_period_based_on_invoice_date/payment_period_based_on_invoice_date.txt
+++ b/erpnext/accounts/report/payment_period_based_on_invoice_date/payment_period_based_on_invoice_date.txt
@@ -1,23 +1,16 @@
-[
- {
-  "creation": "2013-12-02 17:06:37", 
-  "docstatus": 0, 
-  "modified": "2014-03-07 15:30:27", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "add_total_row": 1, 
-  "doctype": "Report", 
-  "is_standard": "Yes", 
-  "module": "Accounts", 
-  "name": "__common__", 
-  "ref_doctype": "Journal Voucher", 
-  "report_name": "Payment Period Based On Invoice Date", 
-  "report_type": "Script Report"
- }, 
- {
-  "doctype": "Report", 
-  "name": "Payment Period Based On Invoice Date"
- }
-]
\ No newline at end of file
+{
+ "add_total_row": 1, 
+ "creation": "2013-12-02 17:06:37", 
+ "docstatus": 0, 
+ "doctype": "Report", 
+ "idx": 1, 
+ "is_standard": "Yes", 
+ "modified": "2014-03-07 15:30:27", 
+ "modified_by": "Administrator", 
+ "module": "Accounts", 
+ "name": "Payment Period Based On Invoice Date", 
+ "owner": "Administrator", 
+ "ref_doctype": "Journal Voucher", 
+ "report_name": "Payment Period Based On Invoice Date", 
+ "report_type": "Script Report"
+}
\ No newline at end of file
diff --git a/erpnext/accounts/report/purchase_invoice_trends/purchase_invoice_trends.txt b/erpnext/accounts/report/purchase_invoice_trends/purchase_invoice_trends.txt
index 20e5a53..36d0819 100644
--- a/erpnext/accounts/report/purchase_invoice_trends/purchase_invoice_trends.txt
+++ b/erpnext/accounts/report/purchase_invoice_trends/purchase_invoice_trends.txt
@@ -1,22 +1,15 @@
-[
- {
-  "creation": "2013-06-13 18:46:55", 
-  "docstatus": 0, 
-  "modified": "2014-03-07 15:30:27", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "doctype": "Report", 
-  "is_standard": "Yes", 
-  "module": "Accounts", 
-  "name": "__common__", 
-  "ref_doctype": "Purchase Invoice", 
-  "report_name": "Purchase Invoice Trends", 
-  "report_type": "Script Report"
- }, 
- {
-  "doctype": "Report", 
-  "name": "Purchase Invoice Trends"
- }
-]
\ No newline at end of file
+{
+ "creation": "2013-06-13 18:46:55", 
+ "docstatus": 0, 
+ "doctype": "Report", 
+ "idx": 1, 
+ "is_standard": "Yes", 
+ "modified": "2014-03-07 15:30:27", 
+ "modified_by": "Administrator", 
+ "module": "Accounts", 
+ "name": "Purchase Invoice Trends", 
+ "owner": "Administrator", 
+ "ref_doctype": "Purchase Invoice", 
+ "report_name": "Purchase Invoice Trends", 
+ "report_type": "Script Report"
+}
\ No newline at end of file
diff --git a/erpnext/accounts/report/purchase_order_items_to_be_billed/purchase_order_items_to_be_billed.txt b/erpnext/accounts/report/purchase_order_items_to_be_billed/purchase_order_items_to_be_billed.txt
index 88990cb..ed03bc0 100644
--- a/erpnext/accounts/report/purchase_order_items_to_be_billed/purchase_order_items_to_be_billed.txt
+++ b/erpnext/accounts/report/purchase_order_items_to_be_billed/purchase_order_items_to_be_billed.txt
@@ -1,24 +1,17 @@
-[
- {
-  "creation": "2013-05-28 15:54:16", 
-  "docstatus": 0, 
-  "modified": "2014-03-07 15:30:27", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "add_total_row": 1, 
-  "doctype": "Report", 
-  "is_standard": "Yes", 
-  "module": "Accounts", 
-  "name": "__common__", 
-  "query": "select \n    `tabPurchase Order`.`name` as \"Purchase Order:Link/Purchase Order:120\",\n    `tabPurchase Order`.`transaction_date` as \"Date:Date:100\",\n\t`tabPurchase Order`.`supplier` as \"Supplier:Link/Supplier:120\",\n\t`tabPurchase Order Item`.`project_name` as \"Project\",\n\t`tabPurchase Order Item`.item_code as \"Item Code:Link/Item:120\",\n\t`tabPurchase Order Item`.base_amount as \"Amount:Currency:100\",\n\t`tabPurchase Order Item`.billed_amt as \"Billed Amount:Currency:100\", \n\t(`tabPurchase Order Item`.base_amount - ifnull(`tabPurchase Order Item`.billed_amt, 0)) as \"Amount to Bill:Currency:100\",\n\t`tabPurchase Order Item`.item_name as \"Item Name::150\",\n\t`tabPurchase Order Item`.description as \"Description::200\"\nfrom\n\t`tabPurchase Order`, `tabPurchase Order Item`\nwhere\n\t`tabPurchase Order Item`.`parent` = `tabPurchase Order`.`name`\n\tand `tabPurchase Order`.docstatus = 1\n\tand `tabPurchase Order`.status != \"Stopped\"\n\tand ifnull(`tabPurchase Order Item`.billed_amt, 0) < ifnull(`tabPurchase Order Item`.base_amount, 0)\norder by `tabPurchase Order`.transaction_date asc", 
-  "ref_doctype": "Purchase Invoice", 
-  "report_name": "Purchase Order Items To Be Billed", 
-  "report_type": "Query Report"
- }, 
- {
-  "doctype": "Report", 
-  "name": "Purchase Order Items To Be Billed"
- }
-]
\ No newline at end of file
+{
+ "add_total_row": 1, 
+ "creation": "2013-05-28 15:54:16", 
+ "docstatus": 0, 
+ "doctype": "Report", 
+ "idx": 1, 
+ "is_standard": "Yes", 
+ "modified": "2014-03-07 15:30:27", 
+ "modified_by": "Administrator", 
+ "module": "Accounts", 
+ "name": "Purchase Order Items To Be Billed", 
+ "owner": "Administrator", 
+ "query": "select \n    `tabPurchase Order`.`name` as \"Purchase Order:Link/Purchase Order:120\",\n    `tabPurchase Order`.`transaction_date` as \"Date:Date:100\",\n\t`tabPurchase Order`.`supplier` as \"Supplier:Link/Supplier:120\",\n\t`tabPurchase Order Item`.`project_name` as \"Project\",\n\t`tabPurchase Order Item`.item_code as \"Item Code:Link/Item:120\",\n\t`tabPurchase Order Item`.base_amount as \"Amount:Currency:100\",\n\t`tabPurchase Order Item`.billed_amt as \"Billed Amount:Currency:100\", \n\t(`tabPurchase Order Item`.base_amount - ifnull(`tabPurchase Order Item`.billed_amt, 0)) as \"Amount to Bill:Currency:100\",\n\t`tabPurchase Order Item`.item_name as \"Item Name::150\",\n\t`tabPurchase Order Item`.description as \"Description::200\"\nfrom\n\t`tabPurchase Order`, `tabPurchase Order Item`\nwhere\n\t`tabPurchase Order Item`.`parent` = `tabPurchase Order`.`name`\n\tand `tabPurchase Order`.docstatus = 1\n\tand `tabPurchase Order`.status != \"Stopped\"\n\tand ifnull(`tabPurchase Order Item`.billed_amt, 0) < ifnull(`tabPurchase Order Item`.base_amount, 0)\norder by `tabPurchase Order`.transaction_date asc", 
+ "ref_doctype": "Purchase Invoice", 
+ "report_name": "Purchase Order Items To Be Billed", 
+ "report_type": "Query Report"
+}
\ No newline at end of file
diff --git a/erpnext/accounts/report/purchase_register/purchase_register.txt b/erpnext/accounts/report/purchase_register/purchase_register.txt
index f04f8e6..f6e603a 100644
--- a/erpnext/accounts/report/purchase_register/purchase_register.txt
+++ b/erpnext/accounts/report/purchase_register/purchase_register.txt
@@ -1,23 +1,16 @@
-[
- {
-  "creation": "2013-04-29 16:13:11", 
-  "docstatus": 0, 
-  "modified": "2014-03-07 15:30:27", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "add_total_row": 1, 
-  "doctype": "Report", 
-  "is_standard": "Yes", 
-  "module": "Accounts", 
-  "name": "__common__", 
-  "ref_doctype": "Purchase Invoice", 
-  "report_name": "Purchase Register", 
-  "report_type": "Script Report"
- }, 
- {
-  "doctype": "Report", 
-  "name": "Purchase Register"
- }
-]
\ No newline at end of file
+{
+ "add_total_row": 1, 
+ "creation": "2013-04-29 16:13:11", 
+ "docstatus": 0, 
+ "doctype": "Report", 
+ "idx": 1, 
+ "is_standard": "Yes", 
+ "modified": "2014-03-07 15:30:27", 
+ "modified_by": "Administrator", 
+ "module": "Accounts", 
+ "name": "Purchase Register", 
+ "owner": "Administrator", 
+ "ref_doctype": "Purchase Invoice", 
+ "report_name": "Purchase Register", 
+ "report_type": "Script Report"
+}
\ No newline at end of file
diff --git a/erpnext/accounts/report/received_items_to_be_billed/received_items_to_be_billed.txt b/erpnext/accounts/report/received_items_to_be_billed/received_items_to_be_billed.txt
index 3ecb2d8..b39b885 100644
--- a/erpnext/accounts/report/received_items_to_be_billed/received_items_to_be_billed.txt
+++ b/erpnext/accounts/report/received_items_to_be_billed/received_items_to_be_billed.txt
@@ -1,23 +1,16 @@
-[
- {
-  "creation": "2013-07-30 18:35:10", 
-  "docstatus": 0, 
-  "modified": "2014-03-07 15:30:27", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "doctype": "Report", 
-  "is_standard": "Yes", 
-  "module": "Accounts", 
-  "name": "__common__", 
-  "query": "select\n    `tabPurchase Receipt`.`name` as \"Purchase Receipt:Link/Purchase Receipt:120\",\n    `tabPurchase Receipt`.`supplier` as \"Supplier:Link/Supplier:120\",\n\t`tabPurchase Receipt`.`posting_date` as \"Date:Date\",\n\t`tabPurchase Receipt Item`.`project_name` as \"Project\",\n\t`tabPurchase Receipt Item`.`item_code` as \"Item:Link/Item:120\",\n\t(`tabPurchase Receipt Item`.`qty` - ifnull((select sum(qty) from `tabPurchase Invoice Item` \n\t    where `tabPurchase Invoice Item`.purchase_receipt = `tabPurchase Receipt`.name and\n\t        `tabPurchase Invoice Item`.pr_detail = `tabPurchase Receipt Item`.name), 0))\n\t\tas \"Qty:Float:110\",\n\t(`tabPurchase Receipt Item`.`base_amount` - ifnull((select sum(base_amount) from `tabPurchase Invoice Item` \n        where `tabPurchase Invoice Item`.purchase_receipt = `tabPurchase Receipt`.name and\n            `tabPurchase Invoice Item`.pr_detail = `tabPurchase Receipt Item`.name), 0))\n\t\tas \"Amount:Currency:110\",\n\t`tabPurchase Receipt Item`.`item_name` as \"Item Name::150\",\n\t`tabPurchase Receipt Item`.`description` as \"Description::200\"\nfrom `tabPurchase Receipt`, `tabPurchase Receipt Item`\nwhere\n    `tabPurchase Receipt`.docstatus = 1 and\n\t`tabPurchase Receipt`.`status` != \"Stopped\" and\n    `tabPurchase Receipt`.name = `tabPurchase Receipt Item`.parent and\n    (`tabPurchase Receipt Item`.qty > ifnull((select sum(qty) from `tabPurchase Invoice Item` \n        where `tabPurchase Invoice Item`.purchase_receipt = `tabPurchase Receipt`.name and\n            `tabPurchase Invoice Item`.pr_detail = `tabPurchase Receipt Item`.name), 0))\norder by `tabPurchase Receipt`.`name` desc", 
-  "ref_doctype": "Purchase Invoice", 
-  "report_name": "Received Items To Be Billed", 
-  "report_type": "Query Report"
- }, 
- {
-  "doctype": "Report", 
-  "name": "Received Items To Be Billed"
- }
-]
\ No newline at end of file
+{
+ "creation": "2013-07-30 18:35:10", 
+ "docstatus": 0, 
+ "doctype": "Report", 
+ "idx": 1, 
+ "is_standard": "Yes", 
+ "modified": "2014-03-07 15:30:27", 
+ "modified_by": "Administrator", 
+ "module": "Accounts", 
+ "name": "Received Items To Be Billed", 
+ "owner": "Administrator", 
+ "query": "select\n    `tabPurchase Receipt`.`name` as \"Purchase Receipt:Link/Purchase Receipt:120\",\n    `tabPurchase Receipt`.`supplier` as \"Supplier:Link/Supplier:120\",\n\t`tabPurchase Receipt`.`posting_date` as \"Date:Date\",\n\t`tabPurchase Receipt Item`.`project_name` as \"Project\",\n\t`tabPurchase Receipt Item`.`item_code` as \"Item:Link/Item:120\",\n\t(`tabPurchase Receipt Item`.`qty` - ifnull((select sum(qty) from `tabPurchase Invoice Item` \n\t    where `tabPurchase Invoice Item`.purchase_receipt = `tabPurchase Receipt`.name and\n\t        `tabPurchase Invoice Item`.pr_detail = `tabPurchase Receipt Item`.name), 0))\n\t\tas \"Qty:Float:110\",\n\t(`tabPurchase Receipt Item`.`base_amount` - ifnull((select sum(base_amount) from `tabPurchase Invoice Item` \n        where `tabPurchase Invoice Item`.purchase_receipt = `tabPurchase Receipt`.name and\n            `tabPurchase Invoice Item`.pr_detail = `tabPurchase Receipt Item`.name), 0))\n\t\tas \"Amount:Currency:110\",\n\t`tabPurchase Receipt Item`.`item_name` as \"Item Name::150\",\n\t`tabPurchase Receipt Item`.`description` as \"Description::200\"\nfrom `tabPurchase Receipt`, `tabPurchase Receipt Item`\nwhere\n    `tabPurchase Receipt`.docstatus = 1 and\n\t`tabPurchase Receipt`.`status` != \"Stopped\" and\n    `tabPurchase Receipt`.name = `tabPurchase Receipt Item`.parent and\n    (`tabPurchase Receipt Item`.qty > ifnull((select sum(qty) from `tabPurchase Invoice Item` \n        where `tabPurchase Invoice Item`.purchase_receipt = `tabPurchase Receipt`.name and\n            `tabPurchase Invoice Item`.pr_detail = `tabPurchase Receipt Item`.name), 0))\norder by `tabPurchase Receipt`.`name` desc", 
+ "ref_doctype": "Purchase Invoice", 
+ "report_name": "Received Items To Be Billed", 
+ "report_type": "Query Report"
+}
\ No newline at end of file
diff --git a/erpnext/accounts/report/sales_invoice_trends/sales_invoice_trends.txt b/erpnext/accounts/report/sales_invoice_trends/sales_invoice_trends.txt
index 4ffc349..e0df867 100644
--- a/erpnext/accounts/report/sales_invoice_trends/sales_invoice_trends.txt
+++ b/erpnext/accounts/report/sales_invoice_trends/sales_invoice_trends.txt
@@ -1,22 +1,15 @@
-[
- {
-  "creation": "2013-06-13 18:44:21", 
-  "docstatus": 0, 
-  "modified": "2014-03-07 15:30:27", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "doctype": "Report", 
-  "is_standard": "Yes", 
-  "module": "Accounts", 
-  "name": "__common__", 
-  "ref_doctype": "Sales Invoice", 
-  "report_name": "Sales Invoice Trends", 
-  "report_type": "Script Report"
- }, 
- {
-  "doctype": "Report", 
-  "name": "Sales Invoice Trends"
- }
-]
\ No newline at end of file
+{
+ "creation": "2013-06-13 18:44:21", 
+ "docstatus": 0, 
+ "doctype": "Report", 
+ "idx": 1, 
+ "is_standard": "Yes", 
+ "modified": "2014-03-07 15:30:27", 
+ "modified_by": "Administrator", 
+ "module": "Accounts", 
+ "name": "Sales Invoice Trends", 
+ "owner": "Administrator", 
+ "ref_doctype": "Sales Invoice", 
+ "report_name": "Sales Invoice Trends", 
+ "report_type": "Script Report"
+}
\ No newline at end of file
diff --git a/erpnext/accounts/report/sales_partners_commission/sales_partners_commission.txt b/erpnext/accounts/report/sales_partners_commission/sales_partners_commission.txt
index e79d415..d8785a3 100644
--- a/erpnext/accounts/report/sales_partners_commission/sales_partners_commission.txt
+++ b/erpnext/accounts/report/sales_partners_commission/sales_partners_commission.txt
@@ -1,23 +1,16 @@
-[
- {
-  "creation": "2013-05-06 12:28:23", 
-  "docstatus": 0, 
-  "modified": "2014-03-07 15:30:27", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "doctype": "Report", 
-  "is_standard": "Yes", 
-  "module": "Accounts", 
-  "name": "__common__", 
-  "query": "SELECT\n    sales_partner as \"Sales Partner:Link/Sales Partner:150\",\n\tsum(net_total) as \"Invoiced Amount (Exculsive Tax):Currency:210\",\n\tsum(total_commission) as \"Total Commission:Currency:150\",\n\tsum(total_commission)*100/sum(net_total) as \"Average Commission Rate:Currency:170\"\nFROM\n\t`tabSales Invoice`\nWHERE\n\tdocstatus = 1 and ifnull(net_total, 0) > 0 and ifnull(total_commission, 0) > 0\nGROUP BY\n\tsales_partner\nORDER BY\n\t\"Total Commission:Currency:120\"", 
-  "ref_doctype": "Sales Invoice", 
-  "report_name": "Sales Partners Commission", 
-  "report_type": "Query Report"
- }, 
- {
-  "doctype": "Report", 
-  "name": "Sales Partners Commission"
- }
-]
\ No newline at end of file
+{
+ "creation": "2013-05-06 12:28:23", 
+ "docstatus": 0, 
+ "doctype": "Report", 
+ "idx": 1, 
+ "is_standard": "Yes", 
+ "modified": "2014-03-07 15:30:27", 
+ "modified_by": "Administrator", 
+ "module": "Accounts", 
+ "name": "Sales Partners Commission", 
+ "owner": "Administrator", 
+ "query": "SELECT\n    sales_partner as \"Sales Partner:Link/Sales Partner:150\",\n\tsum(net_total) as \"Invoiced Amount (Exculsive Tax):Currency:210\",\n\tsum(total_commission) as \"Total Commission:Currency:150\",\n\tsum(total_commission)*100/sum(net_total) as \"Average Commission Rate:Currency:170\"\nFROM\n\t`tabSales Invoice`\nWHERE\n\tdocstatus = 1 and ifnull(net_total, 0) > 0 and ifnull(total_commission, 0) > 0\nGROUP BY\n\tsales_partner\nORDER BY\n\t\"Total Commission:Currency:120\"", 
+ "ref_doctype": "Sales Invoice", 
+ "report_name": "Sales Partners Commission", 
+ "report_type": "Query Report"
+}
\ No newline at end of file
diff --git a/erpnext/accounts/report/sales_register/sales_register.txt b/erpnext/accounts/report/sales_register/sales_register.txt
index 40ac3b5..b87c24d 100644
--- a/erpnext/accounts/report/sales_register/sales_register.txt
+++ b/erpnext/accounts/report/sales_register/sales_register.txt
@@ -1,23 +1,16 @@
-[
- {
-  "creation": "2013-04-23 18:15:29", 
-  "docstatus": 0, 
-  "modified": "2014-03-07 15:30:27", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "add_total_row": 1, 
-  "doctype": "Report", 
-  "is_standard": "Yes", 
-  "module": "Accounts", 
-  "name": "__common__", 
-  "ref_doctype": "Sales Invoice", 
-  "report_name": "Sales Register", 
-  "report_type": "Script Report"
- }, 
- {
-  "doctype": "Report", 
-  "name": "Sales Register"
- }
-]
\ No newline at end of file
+{
+ "add_total_row": 1, 
+ "creation": "2013-04-23 18:15:29", 
+ "docstatus": 0, 
+ "doctype": "Report", 
+ "idx": 1, 
+ "is_standard": "Yes", 
+ "modified": "2014-03-07 15:30:27", 
+ "modified_by": "Administrator", 
+ "module": "Accounts", 
+ "name": "Sales Register", 
+ "owner": "Administrator", 
+ "ref_doctype": "Sales Invoice", 
+ "report_name": "Sales Register", 
+ "report_type": "Script Report"
+}
\ No newline at end of file
diff --git a/erpnext/accounts/report/supplier_account_head/supplier_account_head.txt b/erpnext/accounts/report/supplier_account_head/supplier_account_head.txt
index cf6e322..5734bb7 100644
--- a/erpnext/accounts/report/supplier_account_head/supplier_account_head.txt
+++ b/erpnext/accounts/report/supplier_account_head/supplier_account_head.txt
@@ -1,22 +1,15 @@
-[
- {
-  "creation": "2013-06-04 12:56:17", 
-  "docstatus": 0, 
-  "modified": "2014-03-07 15:30:27", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "doctype": "Report", 
-  "is_standard": "Yes", 
-  "module": "Accounts", 
-  "name": "__common__", 
-  "ref_doctype": "Account", 
-  "report_name": "Supplier Account Head", 
-  "report_type": "Script Report"
- }, 
- {
-  "doctype": "Report", 
-  "name": "Supplier Account Head"
- }
-]
\ No newline at end of file
+{
+ "creation": "2013-06-04 12:56:17", 
+ "docstatus": 0, 
+ "doctype": "Report", 
+ "idx": 1, 
+ "is_standard": "Yes", 
+ "modified": "2014-03-07 15:30:27", 
+ "modified_by": "Administrator", 
+ "module": "Accounts", 
+ "name": "Supplier Account Head", 
+ "owner": "Administrator", 
+ "ref_doctype": "Account", 
+ "report_name": "Supplier Account Head", 
+ "report_type": "Script Report"
+}
\ No newline at end of file
diff --git a/erpnext/buying/Print Format/Purchase Order Classic/Purchase Order Classic.txt b/erpnext/buying/Print Format/Purchase Order Classic/Purchase Order Classic.txt
index 88d750e..58d95f8 100644
--- a/erpnext/buying/Print Format/Purchase Order Classic/Purchase Order Classic.txt
+++ b/erpnext/buying/Print Format/Purchase Order Classic/Purchase Order Classic.txt
@@ -1,22 +1,15 @@
-[
- {
-  "creation": "2012-04-17 11:29:12", 
-  "docstatus": 0, 
-  "modified": "2014-02-11 20:00:45", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "doc_type": "Purchase Order", 
-  "doctype": "Print Format", 
-  "html": "<!--\n\tSample Print Format for ERPNext\n\tPlease use at your own discretion\n\tFor suggestions and contributions:\n\t\thttps://github.com/frappe/erpnext-print-templates\n\n\tFreely usable under MIT license\n-->\n\n<!-- Style Settings -->\n<style>\n\t/*\n\t\tcommon style for whole page\n\t\tThis should include:\n\t\t+ page size related settings\n\t\t+ font family settings\n\t\t+ line spacing settings\n\t*/\n\t@media screen {\n\t\tbody {\n\t\t\twidth: 8.3in;\n\t\t}\n\t}\n\n\thtml, body, div, span, td {\n\t\tfont-family: \"Georgia\", serif;\n\t\tfont-size: 12px;\n\t}\n\n\tbody {\n\t\tpadding: 10px;\n\t\tmargin: auto;\n\t\tfont-size: 12px;\n\t}\n\n\t.common {\n\t\tfont-family: \"Georgia\", serif !important;\n\t\tfont-size: 12px;\n\t\tpadding: 10px 0px;\n\t}\n\n\ttable {\n\t\tborder-collapse: collapse;\n\t\twidth: 100%;\n\t\tvertical-align: top;\n\t}\n\n\ttable td {\n\t\tpadding: 2px 0px;\n\t}\n\t\n\ttable h1, h2, h3, h4, h5, h6 {\n\t\tpadding: 0px;\n\t\tmargin: 0px;\n\t}\n\n\ttable.header-table td {\n\t\tvertical-align: top;\n\t}\n\n\ttable.header-table thead {\n\t\tborder-bottom: 1px solid black;\n\t}\n\n\ttable.header-table h3 {\n\t\tcolor: gray;\n\t}\n\n\ttable.header-table thead td {\n\t\tpadding: 5px 0px;\n\t}\n\n\tdiv.page-body table td:nth-child(6),\n\tdiv.page-body table td:nth-child(7) {\n\t\ttext-align: right;\n\t}\n\n\ttable.footer-table td {\n\t\tvertical-align: top;\n\t}\n\n\ttable.footer-table td table td:nth-child(2),\n\ttable.footer-table td table td:nth-child(3) {\n\t\ttext-align: right;\n\t}\n</style>\n\n\n<!-- Javascript -->\n<script>\n\tsi_std = {\n\t\tprint_item_table: function() {\n\t\t\tvar table = print_table(\n\t\t\t\t'Purchase Order',\n\t\t\t\tdoc.name,\n\t\t\t\t'po_details',\n\t\t\t\t'Purchase Order Item',\n\t\t\t\t[// Here specify the table columns to be displayed\n\t\t\t\t\t'SR', 'item_code', 'item_name', 'description', 'qty', 'stock_uom',\n\t\t\t\t\t'rate', 'amount'\n\t\t\t\t],\n\t\t\t\t[// Here specify the labels of column headings\n\t\t\t\t\t'Sr', 'Item Code', 'Item Name', 'Description', 'Qty',\n\t\t\t\t\t'UoM', 'Basic Rate', 'Amount'\n\t\t\t\t],\n\t\t\t\t[// Here specify the column widths\n\t\t\t\t\t'3%', '10%', '15%', '32%', '5%',\n\t\t\t\t\t'5%', '15%', '15%'\n\t\t\t\t]\n\t\t\t);\n\n\t\t\t// This code takes care of page breaks\n\t\t\tif(table.appendChild) {\n\t\t\t\tout = table.innerHTML;\n\t\t\t} else {\n\t\t\t\tout = '';\n\t\t\t\tfor(var i=0; i < (table.length-1); i++) {\n\t\t\t\t\tout += table[i].innerHTML + \n\t\t\t\t\t\t'<div style = \"page-break-after: always;\" \\\n\t\t\t\t\t\tclass = \"page_break\"></div>\\\n\t\t\t\t\t\t<div class=\"page-settings\"></div>';\n\t\t\t\t}\n\t\t\t\tout += table[table.length-1].innerHTML;\n\t\t\t}\n\t\t\treturn out;\n\t\t},\n\n\n\t\tprint_other_charges: function(parent) {\n\t\t\tvar oc = getchildren('Purchase Taxes and Charges', doc.name, 'other_charges');\n\t\t\tvar rows = '<table width=100%>\\n';\n\t\t\tfor(var i=0; i<oc.length; i++) {\n\t\t\t\trows +=\n\t\t\t\t\t'<tr>\\n' +\n\t\t\t\t\t\t'\\t<td>' + oc[i].description + '</td>\\n' +\n\t\t\t\t\t\t'\\t<td style=\"width: 38%; text-align: right;\">' + format_currency(oc[i].tax_amount / (doc.conversion_rate || 1), doc.currency) + '</td>\\n' +\n\t\t\t\t\t'</tr>\\n';\n\t\t\t}\n\t\t\treturn rows + '</table>\\n';\n\t\t}\n\t};\n</script>\n\n\n<!-- Page Layout Settings -->\n<div class='common page-header'>\n\t<!-- \n\t\tPage Header will contain\n\t\t\t+ table 1\n\t\t\t\t+ table 1a\n\t\t\t\t\t- Name\n\t\t\t\t\t- Address\n\t\t\t\t\t- Contact\n\t\t\t\t\t- Mobile No\n\t\t\t\t+ table 1b\n\t\t\t\t\t- Voucher Date\n\t\t\t\t\t- Due Date\n\t-->\n\t<table class='header-table' cellspacing=0>\n\t\t<thead>\n\t\t\t<tr><td><script>'<h1>' + (doc.select_print_heading || 'Purchase Order') + '</h1>'</script></td></tr>\n\t\t\t<tr><td><h3><script>cur_frm.docname</script></h3></td></tr>\n\t\t</thead>\n\t\t<tbody>\n\t\t\t<tr>\n\t\t\t\t<td width=60%><table width=100% cellspacing=0><tbody>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td width=22%><b>Name</b></td>\n\t\t\t\t\t\t<td><script>doc.supplier_name</script></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><b>Address</b></td>\n\t\t\t\t\t\t<td><script>replace_newlines(doc.address_display)</script></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><b>Contact</b></td>\n\t\t\t\t\t\t<td><script>doc.contact_display</script></td>\n\t\t\t\t\t</tr>\n\t\t\t\t</tbody></table></td>\n\t\t\t\t<td><table width=100% cellspacing=0><tbody>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td width=63%><b>Purchase Order Date</b></td>\n\t\t\t\t\t\t<td><script>date.str_to_user(doc.transaction_date)</script></td>\n\t\t\t\t\t<tr>\t\t\t\t\t\n\t\t\t\t</tbody></table></td>\n\t\t\t</tr>\n\t\t</tbody>\n\t\t<tfoot>\n\t\t\n\t\t</tfoot>\n\t</table>\n</div>\n<div class='common page-body'>\n\t<!-- \n\t\tPage Body will contain\n\t\t\t+ table 2\n\t\t\t\t- Sales Invoice Data\n\t-->\n\t<script>si_std.print_item_table()</script>\n</div>\n<div class='common page-footer'>\n\t<!-- \n\t\tPage Footer will contain\n\t\t\t+ table 3\n\t\t\t\t- Terms and Conditions\n\t\t\t\t- Total Rounded Amount Calculation\n\t\t\t\t- Total Rounded Amount in Words\n\t-->\n\t<table class='footer-table' width=100% cellspacing=0>\n\t\t<thead>\n\t\t\t\n\t\t</thead>\n\t\t<tbody>\n\t\t\t<tr>\n\t\t\t\t<td width=60% style='padding-right: 10px;'>\n\t\t\t\t\t<b>Terms, Conditions &amp; Other Information:</b><br />\n\t\t\t\t\t<script>doc.terms</script>\n\t\t\t\t</td>\n\t\t\t\t<td>\n\t\t\t\t\t<table cellspacing=0 width=100%><tbody>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td>Net Total</td>\n\t\t\t\t\t\t\t<td style=\"width: 38%; text-align: right;\"><script>\n\t\t\t\t\t\t\t\tformat_currency(doc.net_total_import, doc.currency)\n\t\t\t\t\t\t\t</script></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr><td colspan=3><script>si_std.print_other_charges()</script></td></tr>\n\t\t\t\t\t\t<tr style='font-weight: bold'>\n\t\t\t\t\t\t\t<td>Grand Total</td>\n\t\t\t\t\t\t\t<td style=\"width: 38%; text-align: right;\"><script>\n\t\t\t\t\t\t\t\tformat_currency(doc.grand_total_import, doc.currency)\n\t\t\t\t\t\t\t</script></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t</tbody></table>\n\t\t\t\t\t<br /><b>In Words</b><br />\n\t\t\t\t\t<i><script>doc.in_words_import</script></i>\n\t\t\t\t</td>\n\t\t\t</tr>\t\t\n\t\t</tbody>\n\t\t<tfoot>\n\t\t\n\t\t</tfoot>\n\t</table>\n</div>\n", 
-  "module": "Buying", 
-  "name": "__common__", 
-  "print_format_type": "Client", 
-  "standard": "Yes"
- }, 
- {
-  "doctype": "Print Format", 
-  "name": "Purchase Order Classic"
- }
-]
\ No newline at end of file
+{
+ "creation": "2012-04-17 11:29:12", 
+ "doc_type": "Purchase Order", 
+ "docstatus": 0, 
+ "doctype": "Print Format", 
+ "html": "<!--\n\tSample Print Format for ERPNext\n\tPlease use at your own discretion\n\tFor suggestions and contributions:\n\t\thttps://github.com/frappe/erpnext-print-templates\n\n\tFreely usable under MIT license\n-->\n\n<!-- Style Settings -->\n<style>\n\t/*\n\t\tcommon style for whole page\n\t\tThis should include:\n\t\t+ page size related settings\n\t\t+ font family settings\n\t\t+ line spacing settings\n\t*/\n\t@media screen {\n\t\tbody {\n\t\t\twidth: 8.3in;\n\t\t}\n\t}\n\n\thtml, body, div, span, td {\n\t\tfont-family: \"Georgia\", serif;\n\t\tfont-size: 12px;\n\t}\n\n\tbody {\n\t\tpadding: 10px;\n\t\tmargin: auto;\n\t\tfont-size: 12px;\n\t}\n\n\t.common {\n\t\tfont-family: \"Georgia\", serif !important;\n\t\tfont-size: 12px;\n\t\tpadding: 10px 0px;\n\t}\n\n\ttable {\n\t\tborder-collapse: collapse;\n\t\twidth: 100%;\n\t\tvertical-align: top;\n\t}\n\n\ttable td {\n\t\tpadding: 2px 0px;\n\t}\n\t\n\ttable h1, h2, h3, h4, h5, h6 {\n\t\tpadding: 0px;\n\t\tmargin: 0px;\n\t}\n\n\ttable.header-table td {\n\t\tvertical-align: top;\n\t}\n\n\ttable.header-table thead {\n\t\tborder-bottom: 1px solid black;\n\t}\n\n\ttable.header-table h3 {\n\t\tcolor: gray;\n\t}\n\n\ttable.header-table thead td {\n\t\tpadding: 5px 0px;\n\t}\n\n\tdiv.page-body table td:nth-child(6),\n\tdiv.page-body table td:nth-child(7) {\n\t\ttext-align: right;\n\t}\n\n\ttable.footer-table td {\n\t\tvertical-align: top;\n\t}\n\n\ttable.footer-table td table td:nth-child(2),\n\ttable.footer-table td table td:nth-child(3) {\n\t\ttext-align: right;\n\t}\n</style>\n\n\n<!-- Javascript -->\n<script>\n\tsi_std = {\n\t\tprint_item_table: function() {\n\t\t\tvar table = print_table(\n\t\t\t\t'Purchase Order',\n\t\t\t\tdoc.name,\n\t\t\t\t'po_details',\n\t\t\t\t'Purchase Order Item',\n\t\t\t\t[// Here specify the table columns to be displayed\n\t\t\t\t\t'SR', 'item_code', 'item_name', 'description', 'qty', 'stock_uom',\n\t\t\t\t\t'rate', 'amount'\n\t\t\t\t],\n\t\t\t\t[// Here specify the labels of column headings\n\t\t\t\t\t'Sr', 'Item Code', 'Item Name', 'Description', 'Qty',\n\t\t\t\t\t'UoM', 'Basic Rate', 'Amount'\n\t\t\t\t],\n\t\t\t\t[// Here specify the column widths\n\t\t\t\t\t'3%', '10%', '15%', '32%', '5%',\n\t\t\t\t\t'5%', '15%', '15%'\n\t\t\t\t]\n\t\t\t);\n\n\t\t\t// This code takes care of page breaks\n\t\t\tif(table.appendChild) {\n\t\t\t\tout = table.innerHTML;\n\t\t\t} else {\n\t\t\t\tout = '';\n\t\t\t\tfor(var i=0; i < (table.length-1); i++) {\n\t\t\t\t\tout += table[i].innerHTML + \n\t\t\t\t\t\t'<div style = \"page-break-after: always;\" \\\n\t\t\t\t\t\tclass = \"page_break\"></div>\\\n\t\t\t\t\t\t<div class=\"page-settings\"></div>';\n\t\t\t\t}\n\t\t\t\tout += table[table.length-1].innerHTML;\n\t\t\t}\n\t\t\treturn out;\n\t\t},\n\n\n\t\tprint_other_charges: function(parent) {\n\t\t\tvar oc = getchildren('Purchase Taxes and Charges', doc.name, 'other_charges');\n\t\t\tvar rows = '<table width=100%>\\n';\n\t\t\tfor(var i=0; i<oc.length; i++) {\n\t\t\t\trows +=\n\t\t\t\t\t'<tr>\\n' +\n\t\t\t\t\t\t'\\t<td>' + oc[i].description + '</td>\\n' +\n\t\t\t\t\t\t'\\t<td style=\"width: 38%; text-align: right;\">' + format_currency(oc[i].tax_amount / (doc.conversion_rate || 1), doc.currency) + '</td>\\n' +\n\t\t\t\t\t'</tr>\\n';\n\t\t\t}\n\t\t\treturn rows + '</table>\\n';\n\t\t}\n\t};\n</script>\n\n\n<!-- Page Layout Settings -->\n<div class='common page-header'>\n\t<!-- \n\t\tPage Header will contain\n\t\t\t+ table 1\n\t\t\t\t+ table 1a\n\t\t\t\t\t- Name\n\t\t\t\t\t- Address\n\t\t\t\t\t- Contact\n\t\t\t\t\t- Mobile No\n\t\t\t\t+ table 1b\n\t\t\t\t\t- Voucher Date\n\t\t\t\t\t- Due Date\n\t-->\n\t<table class='header-table' cellspacing=0>\n\t\t<thead>\n\t\t\t<tr><td><script>'<h1>' + (doc.select_print_heading || 'Purchase Order') + '</h1>'</script></td></tr>\n\t\t\t<tr><td><h3><script>cur_frm.docname</script></h3></td></tr>\n\t\t</thead>\n\t\t<tbody>\n\t\t\t<tr>\n\t\t\t\t<td width=60%><table width=100% cellspacing=0><tbody>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td width=22%><b>Name</b></td>\n\t\t\t\t\t\t<td><script>doc.supplier_name</script></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><b>Address</b></td>\n\t\t\t\t\t\t<td><script>replace_newlines(doc.address_display)</script></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><b>Contact</b></td>\n\t\t\t\t\t\t<td><script>doc.contact_display</script></td>\n\t\t\t\t\t</tr>\n\t\t\t\t</tbody></table></td>\n\t\t\t\t<td><table width=100% cellspacing=0><tbody>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td width=63%><b>Purchase Order Date</b></td>\n\t\t\t\t\t\t<td><script>date.str_to_user(doc.transaction_date)</script></td>\n\t\t\t\t\t<tr>\t\t\t\t\t\n\t\t\t\t</tbody></table></td>\n\t\t\t</tr>\n\t\t</tbody>\n\t\t<tfoot>\n\t\t\n\t\t</tfoot>\n\t</table>\n</div>\n<div class='common page-body'>\n\t<!-- \n\t\tPage Body will contain\n\t\t\t+ table 2\n\t\t\t\t- Sales Invoice Data\n\t-->\n\t<script>si_std.print_item_table()</script>\n</div>\n<div class='common page-footer'>\n\t<!-- \n\t\tPage Footer will contain\n\t\t\t+ table 3\n\t\t\t\t- Terms and Conditions\n\t\t\t\t- Total Rounded Amount Calculation\n\t\t\t\t- Total Rounded Amount in Words\n\t-->\n\t<table class='footer-table' width=100% cellspacing=0>\n\t\t<thead>\n\t\t\t\n\t\t</thead>\n\t\t<tbody>\n\t\t\t<tr>\n\t\t\t\t<td width=60% style='padding-right: 10px;'>\n\t\t\t\t\t<b>Terms, Conditions &amp; Other Information:</b><br />\n\t\t\t\t\t<script>doc.terms</script>\n\t\t\t\t</td>\n\t\t\t\t<td>\n\t\t\t\t\t<table cellspacing=0 width=100%><tbody>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td>Net Total</td>\n\t\t\t\t\t\t\t<td style=\"width: 38%; text-align: right;\"><script>\n\t\t\t\t\t\t\t\tformat_currency(doc.net_total_import, doc.currency)\n\t\t\t\t\t\t\t</script></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr><td colspan=3><script>si_std.print_other_charges()</script></td></tr>\n\t\t\t\t\t\t<tr style='font-weight: bold'>\n\t\t\t\t\t\t\t<td>Grand Total</td>\n\t\t\t\t\t\t\t<td style=\"width: 38%; text-align: right;\"><script>\n\t\t\t\t\t\t\t\tformat_currency(doc.grand_total_import, doc.currency)\n\t\t\t\t\t\t\t</script></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t</tbody></table>\n\t\t\t\t\t<br /><b>In Words</b><br />\n\t\t\t\t\t<i><script>doc.in_words_import</script></i>\n\t\t\t\t</td>\n\t\t\t</tr>\t\t\n\t\t</tbody>\n\t\t<tfoot>\n\t\t\n\t\t</tfoot>\n\t</table>\n</div>\n", 
+ "idx": 1, 
+ "modified": "2014-02-11 20:00:45", 
+ "modified_by": "Administrator", 
+ "module": "Buying", 
+ "name": "Purchase Order Classic", 
+ "owner": "Administrator", 
+ "print_format_type": "Client", 
+ "standard": "Yes"
+}
\ No newline at end of file
diff --git a/erpnext/buying/Print Format/Purchase Order Modern/Purchase Order Modern.txt b/erpnext/buying/Print Format/Purchase Order Modern/Purchase Order Modern.txt
index 73f850a..7d46e25 100644
--- a/erpnext/buying/Print Format/Purchase Order Modern/Purchase Order Modern.txt
+++ b/erpnext/buying/Print Format/Purchase Order Modern/Purchase Order Modern.txt
@@ -1,22 +1,15 @@
-[
- {
-  "creation": "2012-04-17 11:29:12", 
-  "docstatus": 0, 
-  "modified": "2014-02-11 20:12:05", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "doc_type": "Purchase Order", 
-  "doctype": "Print Format", 
-  "html": "<!--\n    Sample Print Format for ERPNext\n\tPlease use at your own discretion\n\tFor suggestions and contributions:\n\t\thttps://github.com/frappe/erpnext-print-templates\n\n\tFreely usable under MIT license\n-->\n\n<!-- Style Settings -->\n<style>\n\t/*\n\t\tcommon style for whole page\n\t\tThis should include:\n\t\t+ page size related settings\n\t\t+ font family settings\n\t\t+ line spacing settings\n\t*/\n\t@media screen {\n\t\tbody {\n\t\t\twidth: 8.3in;\n\t\t}\n\t}\n\n\thtml, body, div, span, td {\n\t\tfont-family: \"Helvetica\", \"Arial\", sans-serif;\n\t\tfont-size: 12px;\n\t}\n\n\tbody {\n\t\tpadding: 10px;\n\t\tmargin: auto;\n\t\tfont-size: 12px;\n        line-height: 150%;\n\t}\n\n\t.common {\n\t\tfont-family: \"Helvetica\", \"Arial\", sans-serif !important;\n\t\tfont-size: 12px;\n\t\tpadding: 10px 0px;\n\t}\n\n\ttable {\n\t\tborder-collapse: collapse;\n\t\twidth: 100%;\n\t\tvertical-align: top;\n\t\tborder-style: none !important;\n\t}\n\n\ttable td {\n\t\tpadding: 2px 0px;\n\t\tborder-style: none !important;\n\t}\n\t\n\ttable h1, h2, h3, h4, h5, h6 {\n\t\tpadding: 0px;\n\t\tmargin: 0px;\n\t}\n\n\ttable.header-table td {\n\t\tvertical-align: top;\n\t}\n\n\ttable.header-table h1 {\n\t\ttext-transform: uppercase;\n\t\tcolor: white;\n\t\tfont-size: 55px;\n\t\tfont-style: italic;\n\t}\n\n\ttable.header-table thead tr:nth-child(1) div {\n\t\theight: 24px;\n\t\tbackground-color: #696969;\n\t\tvertical-align: middle;\n\t\tpadding: 12px 0px 0px 0px;\n\t\twidth: 100%;\n\t}\n\n\tdiv.page-body table td:nth-child(6),\n\tdiv.page-body table td:nth-child(7) {\n\t\ttext-align: right;\n\t}\n\n\tdiv.page-body table tr td {\n\t\tbackground-color: #DCDCDC !important;\n\t}\n\n\tdiv.page-body table tr:nth-child(1) td {\n\t\tbackground-color: #696969 !important;\n\t\tcolor: white !important;\n\t}\n\n\ttable.footer-table td {\n\t\tvertical-align: top;\n\t}\n\n\ttable.footer-table td table td:nth-child(2),\n\ttable.footer-table td table td:nth-child(3) {\n\t\ttext-align: right;\n\t}\n\n\ttable.footer-table tfoot td {\n\t\tbackground-color: #696969;\n\t\theight: 10px;\n\t}\n\n\t.imp-details {\n\t\tbackground-color: #DCDCDC;\n\t}\n</style>\n\n\n<!-- Javascript -->\n<script>\n\tsi_std = {\n\t\tprint_item_table: function() {\n\t\t\tvar table = print_table(\n\t\t\t\t'Purchase Order',\n\t\t\t\tdoc.name,\n\t\t\t\t'po_details',\n\t\t\t\t'Purchase Order Item',\n\t\t\t\t[// Here specify the table columns to be displayed\n\t\t\t\t\t'SR', 'item_code', 'item_name', 'description', 'qty', 'stock_uom',\n\t\t\t\t\t'rate', 'amount'\n\t\t\t\t],\n\t\t\t\t[// Here specify the labels of column headings\n\t\t\t\t\t'Sr', 'Item Code', 'Item Name', 'Description', 'Qty',\n\t\t\t\t\t'UoM', 'Basic Rate', 'Amount'\n\t\t\t\t],\n\t\t\t\t[// Here specify the column widths\n\t\t\t\t\t'3%', '10%', '15%', '32%', '5%',\n\t\t\t\t\t'5%', '15%', '15%'\n\t\t\t\t]\n\t\t\t);\n\n\t\t\t// This code takes care of page breaks\n\t\t\tif(table.appendChild) {\n\t\t\t\tout = table.innerHTML;\n\t\t\t} else {\n\t\t\t\tout = '';\n\t\t\t\tfor(var i=0; i < (table.length-1); i++) {\n\t\t\t\t\tout += table[i].innerHTML + \n\t\t\t\t\t\t'<div style = \"page-break-after: always;\" \\\n\t\t\t\t\t\tclass = \"page_break\"></div>\\\n\t\t\t\t\t\t<div class=\"page-settings\"></div>';\n\t\t\t\t}\n\t\t\t\tout += table[table.length-1].innerHTML;\n\t\t\t}\n\t\t\treturn out;\n\t\t},\n\n\n\t\tprint_other_charges: function(parent) {\n\t\t\tvar oc = getchildren('Purchase Taxes and Charges', doc.name, 'other_charges');\n\t\t\tvar rows = '<table width=100%>\\n';\n\t\t\tfor(var i=0; i<oc.length; i++) {\n\t\t\t\trows +=\n\t\t\t\t\t'<tr>\\n' +\n\t\t\t\t\t\t'\\t<td>' + oc[i].description + '</td>\\n' +\n\t\t\t\t\t\t'\\t<td style=\"width: 38%; text-align: right;\">' + format_currency(oc[i].tax_amount / (doc.conversion_rate || 1), doc.currency) + '</td>\\n' +\n\t\t\t\t\t'</tr>\\n';\n\t\t\t}\n\t\t\treturn rows + '</table>\\n';\n\t\t}\n\t};\n</script>\n\n\n<!-- Page Layout Settings -->\n<div class='common page-header'>\n\t<!-- \n\t\tPage Header will contain\n\t\t\t+ table 1\n\t\t\t\t+ table 1a\n\t\t\t\t\t- Name\n\t\t\t\t\t- Address\n\t\t\t\t\t- Contact\n\t\t\t\t\t- Mobile No\n\t\t\t\t+ table 1b\n\t\t\t\t\t- Voucher Date\n\t\t\t\t\t- Due Date\n\t-->\n\t<table class='header-table' cellspacing=0>\n\t\t<thead>\n\t\t\t<tr><td colspan=2><div><script>'<h1>' + (doc.select_print_heading || 'Purchase Order') + '</h1>'</script></div></td></tr>\n\t\t\t<tr><td colspan=2><div style=\"height:15px\"></div></td></tr>\n\t\t</thead>\n\t\t<tbody>\n\t\t\t<tr>\n\t\t\t\t<td width=60%><table width=100% cellspacing=0><tbody>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td width=22%><b>Name</b></td>\n\t\t\t\t\t\t<td><script>doc.supplier_name</script></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><b>Address</b></td>\n\t\t\t\t\t\t<td><script>replace_newlines(doc.address_display)</script></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><b>Contact</b></td>\n\t\t\t\t\t\t<td><script>doc.contact_display</script></td>\n\t\t\t\t\t</tr>\n\t\t\t\t</tbody></table></td>\n\t\t\t\t<td><table width=100% cellspacing=0><tbody>\n\t\t\t\t\t<tr class='imp-details'>\n\t\t\t\t\t\t<td><b>Purchase Order No.</b></td>\n\t\t\t\t\t\t<td><script>cur_frm.docname</script></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td width=63%><b>Purchase Order Date</b></td>\n\t\t\t\t\t\t<td><script>date.str_to_user(doc.transaction_date)</script></td>\n\t\t\t\t\t<tr>\t\t\t\t\t\n\t\t\t\t</tbody></table></td>\n\t\t\t</tr>\n\t\t</tbody>\n\t\t<tfoot>\n\t\t\n\t\t</tfoot>\n\t</table>\n</div>\n<div class='common page-body'>\n\t<!-- \n\t\tPage Body will contain\n\t\t\t+ table 2\n\t\t\t\t- Sales Invoice Data\n\t-->\n\t<script>si_std.print_item_table()</script>\n</div>\n<div class='common page-footer'>\n\t<!-- \n\t\tPage Footer will contain\n\t\t\t+ table 3\n\t\t\t\t- Terms and Conditions\n\t\t\t\t- Total Rounded Amount Calculation\n\t\t\t\t- Total Rounded Amount in Words\n\t-->\n\t<table class='footer-table' width=100% cellspacing=0>\n\t\t<thead>\n\t\t\t\n\t\t</thead>\n\t\t<tbody>\n\t\t\t<tr>\n\t\t\t\t<td width=60% style='padding-right: 10px;'>\n\t\t\t\t\t<b>Terms, Conditions &amp; Other Information:</b><br />\n\t\t\t\t\t<script>doc.terms</script>\n\t\t\t\t</td>\n\t\t\t\t<td>\n\t\t\t\t\t<table cellspacing=0 width=100%><tbody>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td>Net Total</td>\n\t\t\t\t\t\t\t<td style=\"width: 38%; text-align: right;\"><script>\n\t\t\t\t\t\t\t\tformat_currency(doc.net_total_import, doc.currency)\n\t\t\t\t\t\t\t</script></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr><td colspan=3><script>si_std.print_other_charges()</script></td></tr>\n\t\t\t\t\t\t<tr style='font-weight: bold' class='imp-details'>\n\t\t\t\t\t\t\t<td>Grand Total</td>\n\t\t\t\t\t\t\t<td style=\"width: 38%; text-align: right;\"><script>\n\t\t\t\t\t\t\t\tformat_currency(doc.grand_total_import, doc.currency)\n\t\t\t\t\t\t\t</script></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t</tbody></table>\n\t\t\t\t\t<br /><b>In Words</b><br />\n\t\t\t\t\t<i><script>doc.in_words_import</script></i>\n\t\t\t\t</td>\n\t\t\t</tr>\t\t\n\t\t</tbody>\n\t\t<tfoot>\n\t\t\t<tr><td colspan=2><div></div></td><tr>\n\t\t</tfoot>\n\t</table>\n</div>\n", 
-  "module": "Buying", 
-  "name": "__common__", 
-  "print_format_type": "Client", 
-  "standard": "Yes"
- }, 
- {
-  "doctype": "Print Format", 
-  "name": "Purchase Order Modern"
- }
-]
\ No newline at end of file
+{
+ "creation": "2012-04-17 11:29:12", 
+ "doc_type": "Purchase Order", 
+ "docstatus": 0, 
+ "doctype": "Print Format", 
+ "html": "<!--\n    Sample Print Format for ERPNext\n\tPlease use at your own discretion\n\tFor suggestions and contributions:\n\t\thttps://github.com/frappe/erpnext-print-templates\n\n\tFreely usable under MIT license\n-->\n\n<!-- Style Settings -->\n<style>\n\t/*\n\t\tcommon style for whole page\n\t\tThis should include:\n\t\t+ page size related settings\n\t\t+ font family settings\n\t\t+ line spacing settings\n\t*/\n\t@media screen {\n\t\tbody {\n\t\t\twidth: 8.3in;\n\t\t}\n\t}\n\n\thtml, body, div, span, td {\n\t\tfont-family: \"Helvetica\", \"Arial\", sans-serif;\n\t\tfont-size: 12px;\n\t}\n\n\tbody {\n\t\tpadding: 10px;\n\t\tmargin: auto;\n\t\tfont-size: 12px;\n        line-height: 150%;\n\t}\n\n\t.common {\n\t\tfont-family: \"Helvetica\", \"Arial\", sans-serif !important;\n\t\tfont-size: 12px;\n\t\tpadding: 10px 0px;\n\t}\n\n\ttable {\n\t\tborder-collapse: collapse;\n\t\twidth: 100%;\n\t\tvertical-align: top;\n\t\tborder-style: none !important;\n\t}\n\n\ttable td {\n\t\tpadding: 2px 0px;\n\t\tborder-style: none !important;\n\t}\n\t\n\ttable h1, h2, h3, h4, h5, h6 {\n\t\tpadding: 0px;\n\t\tmargin: 0px;\n\t}\n\n\ttable.header-table td {\n\t\tvertical-align: top;\n\t}\n\n\ttable.header-table h1 {\n\t\ttext-transform: uppercase;\n\t\tcolor: white;\n\t\tfont-size: 55px;\n\t\tfont-style: italic;\n\t}\n\n\ttable.header-table thead tr:nth-child(1) div {\n\t\theight: 24px;\n\t\tbackground-color: #696969;\n\t\tvertical-align: middle;\n\t\tpadding: 12px 0px 0px 0px;\n\t\twidth: 100%;\n\t}\n\n\tdiv.page-body table td:nth-child(6),\n\tdiv.page-body table td:nth-child(7) {\n\t\ttext-align: right;\n\t}\n\n\tdiv.page-body table tr td {\n\t\tbackground-color: #DCDCDC !important;\n\t}\n\n\tdiv.page-body table tr:nth-child(1) td {\n\t\tbackground-color: #696969 !important;\n\t\tcolor: white !important;\n\t}\n\n\ttable.footer-table td {\n\t\tvertical-align: top;\n\t}\n\n\ttable.footer-table td table td:nth-child(2),\n\ttable.footer-table td table td:nth-child(3) {\n\t\ttext-align: right;\n\t}\n\n\ttable.footer-table tfoot td {\n\t\tbackground-color: #696969;\n\t\theight: 10px;\n\t}\n\n\t.imp-details {\n\t\tbackground-color: #DCDCDC;\n\t}\n</style>\n\n\n<!-- Javascript -->\n<script>\n\tsi_std = {\n\t\tprint_item_table: function() {\n\t\t\tvar table = print_table(\n\t\t\t\t'Purchase Order',\n\t\t\t\tdoc.name,\n\t\t\t\t'po_details',\n\t\t\t\t'Purchase Order Item',\n\t\t\t\t[// Here specify the table columns to be displayed\n\t\t\t\t\t'SR', 'item_code', 'item_name', 'description', 'qty', 'stock_uom',\n\t\t\t\t\t'rate', 'amount'\n\t\t\t\t],\n\t\t\t\t[// Here specify the labels of column headings\n\t\t\t\t\t'Sr', 'Item Code', 'Item Name', 'Description', 'Qty',\n\t\t\t\t\t'UoM', 'Basic Rate', 'Amount'\n\t\t\t\t],\n\t\t\t\t[// Here specify the column widths\n\t\t\t\t\t'3%', '10%', '15%', '32%', '5%',\n\t\t\t\t\t'5%', '15%', '15%'\n\t\t\t\t]\n\t\t\t);\n\n\t\t\t// This code takes care of page breaks\n\t\t\tif(table.appendChild) {\n\t\t\t\tout = table.innerHTML;\n\t\t\t} else {\n\t\t\t\tout = '';\n\t\t\t\tfor(var i=0; i < (table.length-1); i++) {\n\t\t\t\t\tout += table[i].innerHTML + \n\t\t\t\t\t\t'<div style = \"page-break-after: always;\" \\\n\t\t\t\t\t\tclass = \"page_break\"></div>\\\n\t\t\t\t\t\t<div class=\"page-settings\"></div>';\n\t\t\t\t}\n\t\t\t\tout += table[table.length-1].innerHTML;\n\t\t\t}\n\t\t\treturn out;\n\t\t},\n\n\n\t\tprint_other_charges: function(parent) {\n\t\t\tvar oc = getchildren('Purchase Taxes and Charges', doc.name, 'other_charges');\n\t\t\tvar rows = '<table width=100%>\\n';\n\t\t\tfor(var i=0; i<oc.length; i++) {\n\t\t\t\trows +=\n\t\t\t\t\t'<tr>\\n' +\n\t\t\t\t\t\t'\\t<td>' + oc[i].description + '</td>\\n' +\n\t\t\t\t\t\t'\\t<td style=\"width: 38%; text-align: right;\">' + format_currency(oc[i].tax_amount / (doc.conversion_rate || 1), doc.currency) + '</td>\\n' +\n\t\t\t\t\t'</tr>\\n';\n\t\t\t}\n\t\t\treturn rows + '</table>\\n';\n\t\t}\n\t};\n</script>\n\n\n<!-- Page Layout Settings -->\n<div class='common page-header'>\n\t<!-- \n\t\tPage Header will contain\n\t\t\t+ table 1\n\t\t\t\t+ table 1a\n\t\t\t\t\t- Name\n\t\t\t\t\t- Address\n\t\t\t\t\t- Contact\n\t\t\t\t\t- Mobile No\n\t\t\t\t+ table 1b\n\t\t\t\t\t- Voucher Date\n\t\t\t\t\t- Due Date\n\t-->\n\t<table class='header-table' cellspacing=0>\n\t\t<thead>\n\t\t\t<tr><td colspan=2><div><script>'<h1>' + (doc.select_print_heading || 'Purchase Order') + '</h1>'</script></div></td></tr>\n\t\t\t<tr><td colspan=2><div style=\"height:15px\"></div></td></tr>\n\t\t</thead>\n\t\t<tbody>\n\t\t\t<tr>\n\t\t\t\t<td width=60%><table width=100% cellspacing=0><tbody>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td width=22%><b>Name</b></td>\n\t\t\t\t\t\t<td><script>doc.supplier_name</script></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><b>Address</b></td>\n\t\t\t\t\t\t<td><script>replace_newlines(doc.address_display)</script></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><b>Contact</b></td>\n\t\t\t\t\t\t<td><script>doc.contact_display</script></td>\n\t\t\t\t\t</tr>\n\t\t\t\t</tbody></table></td>\n\t\t\t\t<td><table width=100% cellspacing=0><tbody>\n\t\t\t\t\t<tr class='imp-details'>\n\t\t\t\t\t\t<td><b>Purchase Order No.</b></td>\n\t\t\t\t\t\t<td><script>cur_frm.docname</script></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td width=63%><b>Purchase Order Date</b></td>\n\t\t\t\t\t\t<td><script>date.str_to_user(doc.transaction_date)</script></td>\n\t\t\t\t\t<tr>\t\t\t\t\t\n\t\t\t\t</tbody></table></td>\n\t\t\t</tr>\n\t\t</tbody>\n\t\t<tfoot>\n\t\t\n\t\t</tfoot>\n\t</table>\n</div>\n<div class='common page-body'>\n\t<!-- \n\t\tPage Body will contain\n\t\t\t+ table 2\n\t\t\t\t- Sales Invoice Data\n\t-->\n\t<script>si_std.print_item_table()</script>\n</div>\n<div class='common page-footer'>\n\t<!-- \n\t\tPage Footer will contain\n\t\t\t+ table 3\n\t\t\t\t- Terms and Conditions\n\t\t\t\t- Total Rounded Amount Calculation\n\t\t\t\t- Total Rounded Amount in Words\n\t-->\n\t<table class='footer-table' width=100% cellspacing=0>\n\t\t<thead>\n\t\t\t\n\t\t</thead>\n\t\t<tbody>\n\t\t\t<tr>\n\t\t\t\t<td width=60% style='padding-right: 10px;'>\n\t\t\t\t\t<b>Terms, Conditions &amp; Other Information:</b><br />\n\t\t\t\t\t<script>doc.terms</script>\n\t\t\t\t</td>\n\t\t\t\t<td>\n\t\t\t\t\t<table cellspacing=0 width=100%><tbody>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td>Net Total</td>\n\t\t\t\t\t\t\t<td style=\"width: 38%; text-align: right;\"><script>\n\t\t\t\t\t\t\t\tformat_currency(doc.net_total_import, doc.currency)\n\t\t\t\t\t\t\t</script></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr><td colspan=3><script>si_std.print_other_charges()</script></td></tr>\n\t\t\t\t\t\t<tr style='font-weight: bold' class='imp-details'>\n\t\t\t\t\t\t\t<td>Grand Total</td>\n\t\t\t\t\t\t\t<td style=\"width: 38%; text-align: right;\"><script>\n\t\t\t\t\t\t\t\tformat_currency(doc.grand_total_import, doc.currency)\n\t\t\t\t\t\t\t</script></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t</tbody></table>\n\t\t\t\t\t<br /><b>In Words</b><br />\n\t\t\t\t\t<i><script>doc.in_words_import</script></i>\n\t\t\t\t</td>\n\t\t\t</tr>\t\t\n\t\t</tbody>\n\t\t<tfoot>\n\t\t\t<tr><td colspan=2><div></div></td><tr>\n\t\t</tfoot>\n\t</table>\n</div>\n", 
+ "idx": 1, 
+ "modified": "2014-02-11 20:12:05", 
+ "modified_by": "Administrator", 
+ "module": "Buying", 
+ "name": "Purchase Order Modern", 
+ "owner": "Administrator", 
+ "print_format_type": "Client", 
+ "standard": "Yes"
+}
\ No newline at end of file
diff --git a/erpnext/buying/Print Format/Purchase Order Spartan/Purchase Order Spartan.txt b/erpnext/buying/Print Format/Purchase Order Spartan/Purchase Order Spartan.txt
index 1d6168e..e5ce80a 100644
--- a/erpnext/buying/Print Format/Purchase Order Spartan/Purchase Order Spartan.txt
+++ b/erpnext/buying/Print Format/Purchase Order Spartan/Purchase Order Spartan.txt
@@ -1,22 +1,15 @@
-[
- {
-  "creation": "2012-04-17 11:29:12", 
-  "docstatus": 0, 
-  "modified": "2014-02-11 20:01:38", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "doc_type": "Purchase Order", 
-  "doctype": "Print Format", 
-  "html": "<!--\n\tSample Print Format for ERPNext\n\tPlease use at your own discretion\n\tFor suggestions and contributions:\n\t\thttps://github.com/frappe/erpnext-print-templates\n\n\tFreely usable under MIT license\n-->\n\n<!-- Style Settings -->\n<style>\n\t/*\n\t\tcommon style for whole page\n\t\tThis should include:\n\t\t+ page size related settings\n\t\t+ font family settings\n\t\t+ line spacing settings\n\t*/\n\t@media screen {\n\t\tbody {\n\t\t\twidth: 8.3in;\n\t\t}\n\t}\n\n\thtml, body, div, span, td {\n\t\tfont-family: \"Arial\", sans-serif;\n\t\tfont-size: 12px;\n\t}\n\n\tbody {\n\t\tpadding: 10px;\n\t\tmargin: auto;\n\t\tfont-size: 12px;\n\t}\n\n\t.common {\n\t\tfont-family: \"Arial\", sans-serif !important;\n\t\tfont-size: 12px;\n\t\tpadding: 0px;\n\t}\n\n\ttable {\n\t\twidth: 100% !important;\n\t\tvertical-align: top;\n\t}\n\n\ttable td {\n\t\tpadding: 2px 0px;\n\t}\n\n\ttable, td {\n\t\tborder-collapse: collapse !important;\n\t\tpadding: 0px;\n\t\tmargin: 0px !important;\n\t}\n\t\n\ttable h1, h2, h3, h4, h5, h6 {\n\t\tpadding: 0px;\n\t\tmargin: 0px;\n\t}\n\n\ttable.header-table td {\n\t\tvertical-align: top;\n\t}\n\n\ttable.header-table h3 {\n\t\tcolor: gray;\n\t}\n\n\ttable.header-table thead td {\n\t\tpadding: 5px;\n\t}\n\n\ttable.header-table > thead,\n\ttable.header-table > tbody > tr > td,\n\ttable.footer-table > tbody > tr > td {\n\t\tborder: 1px solid black;\n\t\tpadding: 5px;\n\t}\n\n\ttable.footer-table > tbody,\n\ttable.header-table > thead {\n\t\tborder-bottom: 3px solid black;\n\t}\n\n\ttable.header-table > thead {\n\t\tborder-top: 3px solid black;\n\t}\n\n\tdiv.page-body table td:nth-child(6),\n\tdiv.page-body table td:nth-child(7) {\n\t\ttext-align: right;\n\t}\n\n\tdiv.page-body td {\n\t\tbackground-color: white !important;\n\t\tborder: 1px solid black !important;\n\t}\n\n\ttable.footer-table td {\n\t\tvertical-align: top;\n\t}\n\n\ttable.footer-table td table td:nth-child(2),\n\ttable.footer-table td table td:nth-child(3) {\n\t\ttext-align: right;\n\t}\n</style>\n\n\n<!-- Javascript -->\n<script>\n\tsi_std = {\n\t\tprint_item_table: function() {\n\t\t\tvar table = print_table(\n\t\t\t\t'Purchase Order',\n\t\t\t\tdoc.name,\n\t\t\t\t'po_details',\n\t\t\t\t'Purchase Order Item',\n\t\t\t\t[// Here specify the table columns to be displayed\n\t\t\t\t\t'SR', 'item_code', 'item_name', 'description', 'qty', 'stock_uom',\n\t\t\t\t\t'rate', 'amount'\n\t\t\t\t],\n\t\t\t\t[// Here specify the labels of column headings\n\t\t\t\t\t'Sr', 'Item Code', 'Item Name', 'Description', 'Qty',\n\t\t\t\t\t'UoM', 'Basic Rate', 'Amount'\n\t\t\t\t],\n\t\t\t\t[// Here specify the column widths\n\t\t\t\t\t'3%', '10%', '15%', '32%', '5%',\n\t\t\t\t\t'5%', '15%', '15%'\n\t\t\t\t]\n\t\t\t);\n\n\t\t\t// This code takes care of page breaks\n\t\t\tif(table.appendChild) {\n\t\t\t\tout = table.innerHTML;\n\t\t\t} else {\n\t\t\t\tout = '';\n\t\t\t\tfor(var i=0; i < (table.length-1); i++) {\n\t\t\t\t\tout += table[i].innerHTML + \n\t\t\t\t\t\t'<div style = \"page-break-after: always;\" \\\n\t\t\t\t\t\tclass = \"page_break\"></div>\\\n\t\t\t\t\t\t<div class=\"page-settings\"></div>';\n\t\t\t\t}\n\t\t\t\tout += table[table.length-1].innerHTML;\n\t\t\t}\n\t\t\treturn out;\n\t\t},\n\n\n\t\tprint_other_charges: function(parent) {\n\t\t\tvar oc = getchildren('Purchase Taxes and Charges', doc.name, 'other_charges');\n\t\t\tvar rows = '<table width=100%>\\n';\n\t\t\tfor(var i=0; i<oc.length; i++) {\n\t\t\t\trows +=\n\t\t\t\t\t'<tr>\\n' +\n\t\t\t\t\t\t'\\t<td>' + oc[i].description + '</td>\\n' + \n\t\t\t\t\t\t'\\t<td style=\"width: 38%; text-align: right;\">' + format_currency(oc[i].tax_amount / (doc.conversion_rate || 1), doc.currency) + '</td>\\n' +\n\t\t\t\t\t'</tr>\\n';\n\t\t\t}\n\t\t\treturn rows + '</table>\\n';\n\t\t}\n\t};\n</script>\n\n\n<!-- Page Layout Settings -->\n<div class='common page-header'>\n\t<!-- \n\t\tPage Header will contain\n\t\t\t+ table 1\n\t\t\t\t+ table 1a\n\t\t\t\t\t- Name\n\t\t\t\t\t- Address\n\t\t\t\t\t- Contact\n\t\t\t\t\t- Mobile No\n\t\t\t\t+ table 1b\n\t\t\t\t\t- Voucher Date\n\t\t\t\t\t- Due Date\n\t-->\n\t<table class='header-table' cellspacing=0>\n\t\t<thead>\n\t\t\t<tr><td colspan=2><script>'<h1>' + (doc.select_print_heading || 'Purchase Order') + '</h1>'</script></td></tr>\n\t\t\t<tr><td colspan=2><h3><script>cur_frm.docname</script></h3></td></tr>\n\t\t</thead>\n\t\t<tbody>\n\t\t\t<tr>\n\t\t\t\t<td width=60%><table width=100% cellspacing=0><tbody>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td width=22%><b>Name</b></td>\n\t\t\t\t\t\t<td><script>doc.supplier_name</script></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><b>Address</b></td>\n\t\t\t\t\t\t<td><script>replace_newlines(doc.address_display)</script></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><b>Contact</b></td>\n\t\t\t\t\t\t<td><script>doc.contact_display</script></td>\n\t\t\t\t\t</tr>\n\t\t\t\t</tbody></table></td>\n\t\t\t\t<td><table width=100% cellspacing=0><tbody>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td width=63%><b>Purchase Order Date</b></td>\n\t\t\t\t\t\t<td><script>date.str_to_user(doc.transaction_date)</script></td>\n\t\t\t\t\t<tr>\t\t\t\t\t\n\t\t\t\t</tbody></table></td>\n\t\t\t</tr>\n\t\t</tbody>\n\t\t<tfoot>\n\t\t\n\t\t</tfoot>\n\t</table>\n</div>\n<div class='common page-body'>\n\t<!-- \n\t\tPage Body will contain\n\t\t\t+ table 2\n\t\t\t\t- Sales Invoice Data\n\t-->\n\t<script>si_std.print_item_table()</script>\n</div>\n<div class='common page-footer'>\n\t<!-- \n\t\tPage Footer will contain\n\t\t\t+ table 3\n\t\t\t\t- Terms and Conditions\n\t\t\t\t- Total Rounded Amount Calculation\n\t\t\t\t- Total Rounded Amount in Words\n\t-->\n\t<table class='footer-table' width=100% cellspacing=0>\n\t\t<thead>\n\t\t\t\n\t\t</thead>\n\t\t<tbody>\n\t\t\t<tr>\n\t\t\t\t<td width=60% style='padding-right: 10px;'>\n\t\t\t\t\t<b>Terms, Conditions &amp; Other Information:</b><br />\n\t\t\t\t\t<script>doc.terms</script>\n\t\t\t\t</td>\n\t\t\t\t<td>\n\t\t\t\t\t<table cellspacing=0 width=100%><tbody>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td>Net Total</td>\n\t\t\t\t\t\t\t<td style=\"width: 38%; text-align: right;\"><script>\n\t\t\t\t\t\t\t\tformat_currency(doc.net_total_import, doc.currency)\n\t\t\t\t\t\t\t</script></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr><td colspan=3><script>si_std.print_other_charges()</script></td></tr>\n\t\t\t\t\t\t<tr style='font-weight: bold'>\n\t\t\t\t\t\t\t<td>Grand Total</td>\n\t\t\t\t\t\t\t<td style=\"width: 38%; text-align: right;\"><script>\n\t\t\t\t\t\t\t\tformat_currency(doc.grand_total_import, doc.currency)\n\t\t\t\t\t\t\t</script></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t</tbody></table>\n\t\t\t\t\t<br /><b>In Words</b><br />\n\t\t\t\t\t<i><script>doc.in_words_import</script></i>\n\t\t\t\t</td>\n\t\t\t</tr>\t\t\n\t\t</tbody>\n\t\t<tfoot>\n\t\t\n\t\t</tfoot>\n\t</table>\n</div>\n", 
-  "module": "Buying", 
-  "name": "__common__", 
-  "print_format_type": "Client", 
-  "standard": "Yes"
- }, 
- {
-  "doctype": "Print Format", 
-  "name": "Purchase Order Spartan"
- }
-]
\ No newline at end of file
+{
+ "creation": "2012-04-17 11:29:12", 
+ "doc_type": "Purchase Order", 
+ "docstatus": 0, 
+ "doctype": "Print Format", 
+ "html": "<!--\n\tSample Print Format for ERPNext\n\tPlease use at your own discretion\n\tFor suggestions and contributions:\n\t\thttps://github.com/frappe/erpnext-print-templates\n\n\tFreely usable under MIT license\n-->\n\n<!-- Style Settings -->\n<style>\n\t/*\n\t\tcommon style for whole page\n\t\tThis should include:\n\t\t+ page size related settings\n\t\t+ font family settings\n\t\t+ line spacing settings\n\t*/\n\t@media screen {\n\t\tbody {\n\t\t\twidth: 8.3in;\n\t\t}\n\t}\n\n\thtml, body, div, span, td {\n\t\tfont-family: \"Arial\", sans-serif;\n\t\tfont-size: 12px;\n\t}\n\n\tbody {\n\t\tpadding: 10px;\n\t\tmargin: auto;\n\t\tfont-size: 12px;\n\t}\n\n\t.common {\n\t\tfont-family: \"Arial\", sans-serif !important;\n\t\tfont-size: 12px;\n\t\tpadding: 0px;\n\t}\n\n\ttable {\n\t\twidth: 100% !important;\n\t\tvertical-align: top;\n\t}\n\n\ttable td {\n\t\tpadding: 2px 0px;\n\t}\n\n\ttable, td {\n\t\tborder-collapse: collapse !important;\n\t\tpadding: 0px;\n\t\tmargin: 0px !important;\n\t}\n\t\n\ttable h1, h2, h3, h4, h5, h6 {\n\t\tpadding: 0px;\n\t\tmargin: 0px;\n\t}\n\n\ttable.header-table td {\n\t\tvertical-align: top;\n\t}\n\n\ttable.header-table h3 {\n\t\tcolor: gray;\n\t}\n\n\ttable.header-table thead td {\n\t\tpadding: 5px;\n\t}\n\n\ttable.header-table > thead,\n\ttable.header-table > tbody > tr > td,\n\ttable.footer-table > tbody > tr > td {\n\t\tborder: 1px solid black;\n\t\tpadding: 5px;\n\t}\n\n\ttable.footer-table > tbody,\n\ttable.header-table > thead {\n\t\tborder-bottom: 3px solid black;\n\t}\n\n\ttable.header-table > thead {\n\t\tborder-top: 3px solid black;\n\t}\n\n\tdiv.page-body table td:nth-child(6),\n\tdiv.page-body table td:nth-child(7) {\n\t\ttext-align: right;\n\t}\n\n\tdiv.page-body td {\n\t\tbackground-color: white !important;\n\t\tborder: 1px solid black !important;\n\t}\n\n\ttable.footer-table td {\n\t\tvertical-align: top;\n\t}\n\n\ttable.footer-table td table td:nth-child(2),\n\ttable.footer-table td table td:nth-child(3) {\n\t\ttext-align: right;\n\t}\n</style>\n\n\n<!-- Javascript -->\n<script>\n\tsi_std = {\n\t\tprint_item_table: function() {\n\t\t\tvar table = print_table(\n\t\t\t\t'Purchase Order',\n\t\t\t\tdoc.name,\n\t\t\t\t'po_details',\n\t\t\t\t'Purchase Order Item',\n\t\t\t\t[// Here specify the table columns to be displayed\n\t\t\t\t\t'SR', 'item_code', 'item_name', 'description', 'qty', 'stock_uom',\n\t\t\t\t\t'rate', 'amount'\n\t\t\t\t],\n\t\t\t\t[// Here specify the labels of column headings\n\t\t\t\t\t'Sr', 'Item Code', 'Item Name', 'Description', 'Qty',\n\t\t\t\t\t'UoM', 'Basic Rate', 'Amount'\n\t\t\t\t],\n\t\t\t\t[// Here specify the column widths\n\t\t\t\t\t'3%', '10%', '15%', '32%', '5%',\n\t\t\t\t\t'5%', '15%', '15%'\n\t\t\t\t]\n\t\t\t);\n\n\t\t\t// This code takes care of page breaks\n\t\t\tif(table.appendChild) {\n\t\t\t\tout = table.innerHTML;\n\t\t\t} else {\n\t\t\t\tout = '';\n\t\t\t\tfor(var i=0; i < (table.length-1); i++) {\n\t\t\t\t\tout += table[i].innerHTML + \n\t\t\t\t\t\t'<div style = \"page-break-after: always;\" \\\n\t\t\t\t\t\tclass = \"page_break\"></div>\\\n\t\t\t\t\t\t<div class=\"page-settings\"></div>';\n\t\t\t\t}\n\t\t\t\tout += table[table.length-1].innerHTML;\n\t\t\t}\n\t\t\treturn out;\n\t\t},\n\n\n\t\tprint_other_charges: function(parent) {\n\t\t\tvar oc = getchildren('Purchase Taxes and Charges', doc.name, 'other_charges');\n\t\t\tvar rows = '<table width=100%>\\n';\n\t\t\tfor(var i=0; i<oc.length; i++) {\n\t\t\t\trows +=\n\t\t\t\t\t'<tr>\\n' +\n\t\t\t\t\t\t'\\t<td>' + oc[i].description + '</td>\\n' + \n\t\t\t\t\t\t'\\t<td style=\"width: 38%; text-align: right;\">' + format_currency(oc[i].tax_amount / (doc.conversion_rate || 1), doc.currency) + '</td>\\n' +\n\t\t\t\t\t'</tr>\\n';\n\t\t\t}\n\t\t\treturn rows + '</table>\\n';\n\t\t}\n\t};\n</script>\n\n\n<!-- Page Layout Settings -->\n<div class='common page-header'>\n\t<!-- \n\t\tPage Header will contain\n\t\t\t+ table 1\n\t\t\t\t+ table 1a\n\t\t\t\t\t- Name\n\t\t\t\t\t- Address\n\t\t\t\t\t- Contact\n\t\t\t\t\t- Mobile No\n\t\t\t\t+ table 1b\n\t\t\t\t\t- Voucher Date\n\t\t\t\t\t- Due Date\n\t-->\n\t<table class='header-table' cellspacing=0>\n\t\t<thead>\n\t\t\t<tr><td colspan=2><script>'<h1>' + (doc.select_print_heading || 'Purchase Order') + '</h1>'</script></td></tr>\n\t\t\t<tr><td colspan=2><h3><script>cur_frm.docname</script></h3></td></tr>\n\t\t</thead>\n\t\t<tbody>\n\t\t\t<tr>\n\t\t\t\t<td width=60%><table width=100% cellspacing=0><tbody>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td width=22%><b>Name</b></td>\n\t\t\t\t\t\t<td><script>doc.supplier_name</script></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><b>Address</b></td>\n\t\t\t\t\t\t<td><script>replace_newlines(doc.address_display)</script></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><b>Contact</b></td>\n\t\t\t\t\t\t<td><script>doc.contact_display</script></td>\n\t\t\t\t\t</tr>\n\t\t\t\t</tbody></table></td>\n\t\t\t\t<td><table width=100% cellspacing=0><tbody>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td width=63%><b>Purchase Order Date</b></td>\n\t\t\t\t\t\t<td><script>date.str_to_user(doc.transaction_date)</script></td>\n\t\t\t\t\t<tr>\t\t\t\t\t\n\t\t\t\t</tbody></table></td>\n\t\t\t</tr>\n\t\t</tbody>\n\t\t<tfoot>\n\t\t\n\t\t</tfoot>\n\t</table>\n</div>\n<div class='common page-body'>\n\t<!-- \n\t\tPage Body will contain\n\t\t\t+ table 2\n\t\t\t\t- Sales Invoice Data\n\t-->\n\t<script>si_std.print_item_table()</script>\n</div>\n<div class='common page-footer'>\n\t<!-- \n\t\tPage Footer will contain\n\t\t\t+ table 3\n\t\t\t\t- Terms and Conditions\n\t\t\t\t- Total Rounded Amount Calculation\n\t\t\t\t- Total Rounded Amount in Words\n\t-->\n\t<table class='footer-table' width=100% cellspacing=0>\n\t\t<thead>\n\t\t\t\n\t\t</thead>\n\t\t<tbody>\n\t\t\t<tr>\n\t\t\t\t<td width=60% style='padding-right: 10px;'>\n\t\t\t\t\t<b>Terms, Conditions &amp; Other Information:</b><br />\n\t\t\t\t\t<script>doc.terms</script>\n\t\t\t\t</td>\n\t\t\t\t<td>\n\t\t\t\t\t<table cellspacing=0 width=100%><tbody>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td>Net Total</td>\n\t\t\t\t\t\t\t<td style=\"width: 38%; text-align: right;\"><script>\n\t\t\t\t\t\t\t\tformat_currency(doc.net_total_import, doc.currency)\n\t\t\t\t\t\t\t</script></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr><td colspan=3><script>si_std.print_other_charges()</script></td></tr>\n\t\t\t\t\t\t<tr style='font-weight: bold'>\n\t\t\t\t\t\t\t<td>Grand Total</td>\n\t\t\t\t\t\t\t<td style=\"width: 38%; text-align: right;\"><script>\n\t\t\t\t\t\t\t\tformat_currency(doc.grand_total_import, doc.currency)\n\t\t\t\t\t\t\t</script></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t</tbody></table>\n\t\t\t\t\t<br /><b>In Words</b><br />\n\t\t\t\t\t<i><script>doc.in_words_import</script></i>\n\t\t\t\t</td>\n\t\t\t</tr>\t\t\n\t\t</tbody>\n\t\t<tfoot>\n\t\t\n\t\t</tfoot>\n\t</table>\n</div>\n", 
+ "idx": 1, 
+ "modified": "2014-02-11 20:01:38", 
+ "modified_by": "Administrator", 
+ "module": "Buying", 
+ "name": "Purchase Order Spartan", 
+ "owner": "Administrator", 
+ "print_format_type": "Client", 
+ "standard": "Yes"
+}
\ No newline at end of file
diff --git a/erpnext/buying/doctype/buying_settings/buying_settings.txt b/erpnext/buying/doctype/buying_settings/buying_settings.txt
index fbbe367..53f4092 100644
--- a/erpnext/buying/doctype/buying_settings/buying_settings.txt
+++ b/erpnext/buying/doctype/buying_settings/buying_settings.txt
@@ -1,94 +1,75 @@
-[
- {
-  "creation": "2013-06-25 11:04:03", 
-  "docstatus": 0, 
-  "modified": "2014-02-19 19:02:00", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "description": "Settings for Buying Module", 
-  "doctype": "DocType", 
-  "document_type": "Other", 
-  "icon": "icon-cog", 
-  "issingle": 1, 
-  "module": "Buying", 
-  "name": "__common__"
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "Buying Settings", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "create": 1, 
-  "doctype": "DocPerm", 
-  "email": 1, 
-  "name": "__common__", 
-  "parent": "Buying Settings", 
-  "parentfield": "permissions", 
-  "parenttype": "DocType", 
-  "permlevel": 0, 
-  "print": 1, 
-  "read": 1, 
-  "role": "System Manager", 
-  "write": 1
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Buying Settings"
- }, 
- {
-  "default": "Supplier Name", 
-  "doctype": "DocField", 
-  "fieldname": "supp_master_name", 
-  "fieldtype": "Select", 
-  "label": "Supplier Naming By", 
-  "options": "Supplier Name\nNaming Series"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "supplier_type", 
-  "fieldtype": "Link", 
-  "label": "Default Supplier Type", 
-  "options": "Supplier Type"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "buying_price_list", 
-  "fieldtype": "Link", 
-  "label": "Default Buying Price List", 
-  "options": "Price List"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break_3", 
-  "fieldtype": "Column Break"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "maintain_same_rate", 
-  "fieldtype": "Check", 
-  "label": "Maintain same rate throughout purchase cycle"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "po_required", 
-  "fieldtype": "Select", 
-  "label": "Purchase Order Required", 
-  "options": "No\nYes"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "pr_required", 
-  "fieldtype": "Select", 
-  "label": "Purchase Receipt Required", 
-  "options": "No\nYes"
- }, 
- {
-  "doctype": "DocPerm"
- }
-]
\ No newline at end of file
+{
+ "creation": "2013-06-25 11:04:03", 
+ "description": "Settings for Buying Module", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "document_type": "Other", 
+ "fields": [
+  {
+   "default": "Supplier Name", 
+   "fieldname": "supp_master_name", 
+   "fieldtype": "Select", 
+   "label": "Supplier Naming By", 
+   "options": "Supplier Name\nNaming Series", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "supplier_type", 
+   "fieldtype": "Link", 
+   "label": "Default Supplier Type", 
+   "options": "Supplier Type", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "buying_price_list", 
+   "fieldtype": "Link", 
+   "label": "Default Buying Price List", 
+   "options": "Price List", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "column_break_3", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "maintain_same_rate", 
+   "fieldtype": "Check", 
+   "label": "Maintain same rate throughout purchase cycle", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "po_required", 
+   "fieldtype": "Select", 
+   "label": "Purchase Order Required", 
+   "options": "No\nYes", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "pr_required", 
+   "fieldtype": "Select", 
+   "label": "Purchase Receipt Required", 
+   "options": "No\nYes", 
+   "permlevel": 0
+  }
+ ], 
+ "icon": "icon-cog", 
+ "idx": 1, 
+ "issingle": 1, 
+ "modified": "2014-02-19 19:02:00", 
+ "modified_by": "Administrator", 
+ "module": "Buying", 
+ "name": "Buying Settings", 
+ "owner": "Administrator", 
+ "permissions": [
+  {
+   "create": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "role": "System Manager", 
+   "write": 1
+  }
+ ]
+}
\ No newline at end of file
diff --git a/erpnext/buying/doctype/purchase_common/purchase_common.txt b/erpnext/buying/doctype/purchase_common/purchase_common.txt
index c796c04..5a7de61 100644
--- a/erpnext/buying/doctype/purchase_common/purchase_common.txt
+++ b/erpnext/buying/doctype/purchase_common/purchase_common.txt
@@ -1,19 +1,12 @@
-[
- {
-  "creation": "2012-03-27 14:35:51", 
-  "docstatus": 0, 
-  "modified": "2013-12-20 19:23:27", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "doctype": "DocType", 
-  "issingle": 1, 
-  "module": "Buying", 
-  "name": "__common__"
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Purchase Common"
- }
-]
\ No newline at end of file
+{
+ "creation": "2012-03-27 14:35:51", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "idx": 1, 
+ "issingle": 1, 
+ "modified": "2013-12-20 19:23:27", 
+ "modified_by": "Administrator", 
+ "module": "Buying", 
+ "name": "Purchase Common", 
+ "owner": "Administrator"
+}
\ No newline at end of file
diff --git a/erpnext/buying/doctype/purchase_order/purchase_order.txt b/erpnext/buying/doctype/purchase_order/purchase_order.txt
index 2dbafd2..71a14f3 100644
--- a/erpnext/buying/doctype/purchase_order/purchase_order.txt
+++ b/erpnext/buying/doctype/purchase_order/purchase_order.txt
@@ -1,707 +1,700 @@
-[
- {
-  "creation": "2013-05-21 16:16:39", 
-  "docstatus": 0, 
-  "modified": "2014-01-29 15:26:21", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "allow_attach": 1, 
-  "allow_import": 1, 
-  "autoname": "naming_series:", 
-  "doctype": "DocType", 
-  "document_type": "Transaction", 
-  "icon": "icon-file-text", 
-  "is_submittable": 1, 
-  "module": "Buying", 
-  "name": "__common__", 
-  "read_only_onload": 1, 
-  "search_fields": "status, transaction_date, supplier,grand_total"
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "Purchase Order", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "doctype": "DocPerm", 
-  "email": 1, 
-  "name": "__common__", 
-  "parent": "Purchase Order", 
-  "parentfield": "permissions", 
-  "parenttype": "DocType", 
-  "permlevel": 0, 
-  "print": 1, 
-  "read": 1, 
-  "report": 1
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Purchase Order"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "supplier_section", 
-  "fieldtype": "Section Break", 
-  "label": "Supplier", 
-  "options": "icon-user"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "naming_series", 
-  "fieldtype": "Select", 
-  "label": "Series", 
-  "no_copy": 1, 
-  "oldfieldname": "naming_series", 
-  "oldfieldtype": "Select", 
-  "options": "\nPO", 
-  "print_hide": 1, 
-  "reqd": 1
- }, 
- {
-  "description": "Supplier (vendor) name as entered in supplier master", 
-  "doctype": "DocField", 
-  "fieldname": "supplier", 
-  "fieldtype": "Link", 
-  "in_filter": 1, 
-  "label": "Supplier", 
-  "oldfieldname": "supplier", 
-  "oldfieldtype": "Link", 
-  "options": "Supplier", 
-  "print_hide": 1, 
-  "reqd": 1, 
-  "search_index": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "supplier_name", 
-  "fieldtype": "Data", 
-  "hidden": 0, 
-  "in_list_view": 1, 
-  "label": "Name", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "address_display", 
-  "fieldtype": "Small Text", 
-  "hidden": 1, 
-  "label": "Address", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "contact_display", 
-  "fieldtype": "Small Text", 
-  "hidden": 1, 
-  "label": "Contact", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "contact_mobile", 
-  "fieldtype": "Text", 
-  "hidden": 1, 
-  "label": "Mobile No", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "contact_email", 
-  "fieldtype": "Text", 
-  "hidden": 1, 
-  "label": "Contact Email", 
-  "print_hide": 1, 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break1", 
-  "fieldtype": "Column Break", 
-  "oldfieldtype": "Column Break", 
-  "print_hide": 0, 
-  "print_width": "50%", 
-  "width": "50%"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "transaction_date", 
-  "fieldtype": "Date", 
-  "in_filter": 1, 
-  "label": "Purchase Order Date", 
-  "oldfieldname": "transaction_date", 
-  "oldfieldtype": "Date", 
-  "reqd": 1, 
-  "search_index": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "amended_from", 
-  "fieldtype": "Data", 
-  "hidden": 0, 
-  "ignore_restrictions": 1, 
-  "label": "Amended From", 
-  "no_copy": 1, 
-  "oldfieldname": "amended_from", 
-  "oldfieldtype": "Data", 
-  "print_hide": 1, 
-  "read_only": 1, 
-  "report_hide": 0
- }, 
- {
-  "description": "Select the relevant company name if you have multiple companies", 
-  "doctype": "DocField", 
-  "fieldname": "company", 
-  "fieldtype": "Link", 
-  "in_filter": 1, 
-  "label": "Company", 
-  "no_copy": 0, 
-  "oldfieldname": "company", 
-  "oldfieldtype": "Link", 
-  "options": "Company", 
-  "print_hide": 1, 
-  "reqd": 1, 
-  "search_index": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "price_list_and_currency", 
-  "fieldtype": "Section Break", 
-  "label": "Currency and Price List", 
-  "options": "icon-tag"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "cb_currency", 
-  "fieldtype": "Column Break"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "currency", 
-  "fieldtype": "Link", 
-  "label": "Currency", 
-  "no_copy": 0, 
-  "oldfieldname": "currency", 
-  "oldfieldtype": "Select", 
-  "options": "Currency", 
-  "print_hide": 1, 
-  "reqd": 1
- }, 
- {
-  "description": "Rate at which supplier's currency is converted to company's base currency", 
-  "doctype": "DocField", 
-  "fieldname": "conversion_rate", 
-  "fieldtype": "Float", 
-  "hidden": 0, 
-  "label": "Exchange Rate", 
-  "no_copy": 0, 
-  "oldfieldname": "conversion_rate", 
-  "oldfieldtype": "Currency", 
-  "print_hide": 1, 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "cb_price_list", 
-  "fieldtype": "Column Break"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "buying_price_list", 
-  "fieldtype": "Link", 
-  "label": "Price List", 
-  "options": "Price List", 
-  "print_hide": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "price_list_currency", 
-  "fieldtype": "Link", 
-  "label": "Price List Currency", 
-  "options": "Currency", 
-  "print_hide": 1, 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "plc_conversion_rate", 
-  "fieldtype": "Float", 
-  "label": "Price List Exchange Rate", 
-  "print_hide": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "items", 
-  "fieldtype": "Section Break", 
-  "label": "Items", 
-  "oldfieldtype": "Section Break", 
-  "options": "icon-shopping-cart"
- }, 
- {
-  "allow_on_submit": 1, 
-  "doctype": "DocField", 
-  "fieldname": "po_details", 
-  "fieldtype": "Table", 
-  "label": "Purchase Order Items", 
-  "no_copy": 0, 
-  "oldfieldname": "po_details", 
-  "oldfieldtype": "Table", 
-  "options": "Purchase Order Item"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "sb_last_purchase", 
-  "fieldtype": "Section Break"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "net_total_import", 
-  "fieldtype": "Currency", 
-  "label": "Net Total", 
-  "no_copy": 0, 
-  "oldfieldname": "net_total_import", 
-  "oldfieldtype": "Currency", 
-  "options": "currency", 
-  "print_hide": 0, 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "get_last_purchase_rate", 
-  "fieldtype": "Button", 
-  "label": "Get Last Purchase Rate", 
-  "oldfieldtype": "Button", 
-  "print_hide": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break_26", 
-  "fieldtype": "Column Break"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "net_total", 
-  "fieldtype": "Currency", 
-  "label": "Net Total (Company Currency)", 
-  "no_copy": 1, 
-  "oldfieldname": "net_total", 
-  "oldfieldtype": "Currency", 
-  "options": "Company:company:default_currency", 
-  "print_hide": 1, 
-  "read_only": 1, 
-  "reqd": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "taxes", 
-  "fieldtype": "Section Break", 
-  "label": "Taxes and Charges", 
-  "oldfieldtype": "Section Break", 
-  "options": "icon-money", 
-  "print_hide": 0
- }, 
- {
-  "description": "If you have created a standard template in Purchase Taxes and Charges Master, select one and click on the button below.", 
-  "doctype": "DocField", 
-  "fieldname": "taxes_and_charges", 
-  "fieldtype": "Link", 
-  "label": "Taxes and Charges", 
-  "no_copy": 0, 
-  "oldfieldname": "purchase_other_charges", 
-  "oldfieldtype": "Link", 
-  "options": "Purchase Taxes and Charges Master", 
-  "print_hide": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "other_charges", 
-  "fieldtype": "Table", 
-  "label": "Purchase Taxes and Charges", 
-  "no_copy": 0, 
-  "oldfieldname": "purchase_tax_details", 
-  "oldfieldtype": "Table", 
-  "options": "Purchase Taxes and Charges"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "other_charges_calculation", 
-  "fieldtype": "HTML", 
-  "label": "Taxes and Charges Calculation", 
-  "no_copy": 1, 
-  "oldfieldtype": "HTML", 
-  "print_hide": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "totals", 
-  "fieldtype": "Section Break", 
-  "label": "Totals", 
-  "oldfieldtype": "Section Break", 
-  "options": "icon-money"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "other_charges_added_import", 
-  "fieldtype": "Currency", 
-  "label": "Taxes and Charges Added", 
-  "no_copy": 0, 
-  "oldfieldname": "other_charges_added_import", 
-  "oldfieldtype": "Currency", 
-  "options": "currency", 
-  "print_hide": 1, 
-  "read_only": 1, 
-  "report_hide": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "other_charges_deducted_import", 
-  "fieldtype": "Currency", 
-  "label": "Taxes and Charges Deducted", 
-  "no_copy": 0, 
-  "oldfieldname": "other_charges_deducted_import", 
-  "oldfieldtype": "Currency", 
-  "options": "currency", 
-  "print_hide": 1, 
-  "read_only": 1, 
-  "report_hide": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "grand_total_import", 
-  "fieldtype": "Currency", 
-  "in_list_view": 1, 
-  "label": "Grand Total", 
-  "no_copy": 0, 
-  "oldfieldname": "grand_total_import", 
-  "oldfieldtype": "Currency", 
-  "options": "currency", 
-  "print_hide": 0, 
-  "read_only": 1, 
-  "report_hide": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "in_words_import", 
-  "fieldtype": "Data", 
-  "label": "In Words", 
-  "oldfieldname": "in_words_import", 
-  "oldfieldtype": "Data", 
-  "print_hide": 0, 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break4", 
-  "fieldtype": "Column Break", 
-  "oldfieldtype": "Column Break", 
-  "print_hide": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "other_charges_added", 
-  "fieldtype": "Currency", 
-  "label": "Taxes and Charges Added (Company Currency)", 
-  "no_copy": 0, 
-  "oldfieldname": "other_charges_added", 
-  "oldfieldtype": "Currency", 
-  "options": "Company:company:default_currency", 
-  "print_hide": 1, 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "other_charges_deducted", 
-  "fieldtype": "Currency", 
-  "label": "Taxes and Charges Deducted (Company Currency)", 
-  "no_copy": 0, 
-  "oldfieldname": "other_charges_deducted", 
-  "oldfieldtype": "Currency", 
-  "options": "Company:company:default_currency", 
-  "print_hide": 1, 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "total_tax", 
-  "fieldtype": "Currency", 
-  "label": "Total Tax (Company Currency)", 
-  "no_copy": 1, 
-  "oldfieldname": "total_tax", 
-  "oldfieldtype": "Currency", 
-  "options": "Company:company:default_currency", 
-  "print_hide": 1, 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "grand_total", 
-  "fieldtype": "Currency", 
-  "label": "Grand Total (Company Currency)", 
-  "no_copy": 1, 
-  "oldfieldname": "grand_total", 
-  "oldfieldtype": "Currency", 
-  "options": "Company:company:default_currency", 
-  "print_hide": 1, 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "rounded_total", 
-  "fieldtype": "Currency", 
-  "label": "Rounded Total (Company Currency)", 
-  "oldfieldname": "rounded_total", 
-  "oldfieldtype": "Currency", 
-  "options": "Company:company:default_currency", 
-  "print_hide": 1, 
-  "read_only": 1
- }, 
- {
-  "description": "In Words will be visible once you save the Purchase Order.", 
-  "doctype": "DocField", 
-  "fieldname": "in_words", 
-  "fieldtype": "Data", 
-  "label": "In Words (Company Currency)", 
-  "oldfieldname": "in_words", 
-  "oldfieldtype": "Data", 
-  "print_hide": 1, 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "terms_section_break", 
-  "fieldtype": "Section Break", 
-  "label": "Terms and Conditions", 
-  "oldfieldtype": "Section Break", 
-  "options": "icon-legal"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "tc_name", 
-  "fieldtype": "Link", 
-  "label": "Terms", 
-  "oldfieldname": "tc_name", 
-  "oldfieldtype": "Link", 
-  "options": "Terms and Conditions", 
-  "print_hide": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "terms", 
-  "fieldtype": "Text Editor", 
-  "label": "Terms and Conditions", 
-  "oldfieldname": "terms", 
-  "oldfieldtype": "Text Editor"
- }, 
- {
-  "depends_on": "supplier", 
-  "doctype": "DocField", 
-  "fieldname": "contact_section", 
-  "fieldtype": "Section Break", 
-  "label": "Contact Info", 
-  "options": "icon-bullhorn"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "supplier_address", 
-  "fieldtype": "Link", 
-  "in_filter": 1, 
-  "label": "Supplier Address", 
-  "options": "Address", 
-  "print_hide": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "cb_contact", 
-  "fieldtype": "Column Break"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "contact_person", 
-  "fieldtype": "Link", 
-  "in_filter": 1, 
-  "label": "Contact Person", 
-  "options": "Contact", 
-  "print_hide": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "more_info", 
-  "fieldtype": "Section Break", 
-  "label": "More Info", 
-  "oldfieldtype": "Section Break"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "status", 
-  "fieldtype": "Select", 
-  "in_filter": 1, 
-  "label": "Status", 
-  "no_copy": 1, 
-  "oldfieldname": "status", 
-  "oldfieldtype": "Select", 
-  "options": "\nDraft\nSubmitted\nStopped\nCancelled", 
-  "print_hide": 1, 
-  "read_only": 1, 
-  "reqd": 1, 
-  "search_index": 1
- }, 
- {
-  "default": "No", 
-  "doctype": "DocField", 
-  "fieldname": "is_subcontracted", 
-  "fieldtype": "Select", 
-  "label": "Is Subcontracted", 
-  "options": "\nYes\nNo", 
-  "print_hide": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "ref_sq", 
-  "fieldtype": "Data", 
-  "hidden": 1, 
-  "label": "Ref SQ", 
-  "no_copy": 1, 
-  "oldfieldname": "ref_sq", 
-  "oldfieldtype": "Data", 
-  "print_hide": 1, 
-  "read_only": 1
- }, 
- {
-  "allow_on_submit": 1, 
-  "doctype": "DocField", 
-  "fieldname": "letter_head", 
-  "fieldtype": "Select", 
-  "label": "Letter Head", 
-  "oldfieldname": "letter_head", 
-  "oldfieldtype": "Select", 
-  "options": "link:Letter Head", 
-  "print_hide": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "fiscal_year", 
-  "fieldtype": "Select", 
-  "in_filter": 1, 
-  "label": "Fiscal Year", 
-  "no_copy": 0, 
-  "oldfieldname": "fiscal_year", 
-  "oldfieldtype": "Select", 
-  "options": "link:Fiscal Year", 
-  "print_hide": 1, 
-  "reqd": 1, 
-  "search_index": 1
- }, 
- {
-  "allow_on_submit": 1, 
-  "doctype": "DocField", 
-  "fieldname": "select_print_heading", 
-  "fieldtype": "Link", 
-  "label": "Print Heading", 
-  "no_copy": 1, 
-  "oldfieldname": "select_print_heading", 
-  "oldfieldtype": "Link", 
-  "options": "Print Heading", 
-  "print_hide": 1, 
-  "report_hide": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break5", 
-  "fieldtype": "Column Break", 
-  "oldfieldtype": "Column Break", 
-  "print_hide": 1, 
-  "print_width": "50%", 
-  "width": "50%"
- }, 
- {
-  "depends_on": "eval:!doc.__islocal", 
-  "description": "% of materials received against this Purchase Order", 
-  "doctype": "DocField", 
-  "fieldname": "per_received", 
-  "fieldtype": "Percent", 
-  "in_list_view": 1, 
-  "label": "% Received", 
-  "no_copy": 1, 
-  "oldfieldname": "per_received", 
-  "oldfieldtype": "Currency", 
-  "print_hide": 1, 
-  "read_only": 1
- }, 
- {
-  "depends_on": "eval:!doc.__islocal", 
-  "description": "% of materials billed against this Purchase Order.", 
-  "doctype": "DocField", 
-  "fieldname": "per_billed", 
-  "fieldtype": "Percent", 
-  "in_list_view": 1, 
-  "label": "% Billed", 
-  "no_copy": 1, 
-  "oldfieldname": "per_billed", 
-  "oldfieldtype": "Currency", 
-  "print_hide": 1, 
-  "read_only": 1
- }, 
- {
-  "description": "Required raw materials issued to the supplier for producing a sub - contracted item.", 
-  "doctype": "DocField", 
-  "fieldname": "raw_material_details", 
-  "fieldtype": "Section Break", 
-  "label": "Raw Materials Supplied", 
-  "oldfieldtype": "Section Break", 
-  "options": "icon-truck", 
-  "print_hide": 1
- }, 
- {
-  "allow_on_submit": 1, 
-  "doctype": "DocField", 
-  "fieldname": "po_raw_material_details", 
-  "fieldtype": "Table", 
-  "label": "Purchase Order Items Supplied", 
-  "no_copy": 0, 
-  "oldfieldname": "po_raw_material_details", 
-  "oldfieldtype": "Table", 
-  "options": "Purchase Order Item Supplied", 
-  "print_hide": 1, 
-  "read_only": 1
- }, 
- {
-  "amend": 0, 
-  "cancel": 0, 
-  "create": 0, 
-  "delete": 0, 
-  "doctype": "DocPerm", 
-  "role": "Material User", 
-  "submit": 0, 
-  "write": 0
- }, 
- {
-  "amend": 1, 
-  "cancel": 1, 
-  "create": 1, 
-  "delete": 1, 
-  "doctype": "DocPerm", 
-  "role": "Purchase Manager", 
-  "submit": 1, 
-  "write": 1
- }, 
- {
-  "amend": 1, 
-  "cancel": 1, 
-  "create": 1, 
-  "delete": 1, 
-  "doctype": "DocPerm", 
-  "role": "Purchase User", 
-  "submit": 1, 
-  "write": 1
- }, 
- {
-  "cancel": 0, 
-  "delete": 0, 
-  "doctype": "DocPerm", 
-  "role": "Supplier"
- }
-]
\ No newline at end of file
+{
+ "allow_attach": 1, 
+ "allow_import": 1, 
+ "autoname": "naming_series:", 
+ "creation": "2013-05-21 16:16:39", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "document_type": "Transaction", 
+ "fields": [
+  {
+   "fieldname": "supplier_section", 
+   "fieldtype": "Section Break", 
+   "label": "Supplier", 
+   "options": "icon-user", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "naming_series", 
+   "fieldtype": "Select", 
+   "label": "Series", 
+   "no_copy": 1, 
+   "oldfieldname": "naming_series", 
+   "oldfieldtype": "Select", 
+   "options": "\nPO", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "reqd": 1
+  }, 
+  {
+   "description": "Supplier (vendor) name as entered in supplier master", 
+   "fieldname": "supplier", 
+   "fieldtype": "Link", 
+   "in_filter": 1, 
+   "label": "Supplier", 
+   "oldfieldname": "supplier", 
+   "oldfieldtype": "Link", 
+   "options": "Supplier", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "reqd": 1, 
+   "search_index": 1
+  }, 
+  {
+   "fieldname": "supplier_name", 
+   "fieldtype": "Data", 
+   "hidden": 0, 
+   "in_list_view": 1, 
+   "label": "Name", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "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, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "contact_mobile", 
+   "fieldtype": "Text", 
+   "hidden": 1, 
+   "label": "Mobile No", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "contact_email", 
+   "fieldtype": "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%", 
+   "width": "50%"
+  }, 
+  {
+   "fieldname": "transaction_date", 
+   "fieldtype": "Date", 
+   "in_filter": 1, 
+   "label": "Purchase Order Date", 
+   "oldfieldname": "transaction_date", 
+   "oldfieldtype": "Date", 
+   "permlevel": 0, 
+   "reqd": 1, 
+   "search_index": 1
+  }, 
+  {
+   "fieldname": "amended_from", 
+   "fieldtype": "Data", 
+   "hidden": 0, 
+   "ignore_restrictions": 1, 
+   "label": "Amended From", 
+   "no_copy": 1, 
+   "oldfieldname": "amended_from", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1, 
+   "report_hide": 0
+  }, 
+  {
+   "description": "Select the relevant company name if you have multiple companies", 
+   "fieldname": "company", 
+   "fieldtype": "Link", 
+   "in_filter": 1, 
+   "label": "Company", 
+   "no_copy": 0, 
+   "oldfieldname": "company", 
+   "oldfieldtype": "Link", 
+   "options": "Company", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "reqd": 1, 
+   "search_index": 1
+  }, 
+  {
+   "fieldname": "price_list_and_currency", 
+   "fieldtype": "Section Break", 
+   "label": "Currency and Price List", 
+   "options": "icon-tag", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "cb_currency", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "currency", 
+   "fieldtype": "Link", 
+   "label": "Currency", 
+   "no_copy": 0, 
+   "oldfieldname": "currency", 
+   "oldfieldtype": "Select", 
+   "options": "Currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "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, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "cb_price_list", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "buying_price_list", 
+   "fieldtype": "Link", 
+   "label": "Price List", 
+   "options": "Price List", 
+   "permlevel": 0, 
+   "print_hide": 1
+  }, 
+  {
+   "fieldname": "price_list_currency", 
+   "fieldtype": "Link", 
+   "label": "Price List Currency", 
+   "options": "Currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "plc_conversion_rate", 
+   "fieldtype": "Float", 
+   "label": "Price List Exchange Rate", 
+   "permlevel": 0, 
+   "print_hide": 1
+  }, 
+  {
+   "fieldname": "items", 
+   "fieldtype": "Section Break", 
+   "label": "Items", 
+   "oldfieldtype": "Section Break", 
+   "options": "icon-shopping-cart", 
+   "permlevel": 0
+  }, 
+  {
+   "allow_on_submit": 1, 
+   "fieldname": "po_details", 
+   "fieldtype": "Table", 
+   "label": "Purchase Order Items", 
+   "no_copy": 0, 
+   "oldfieldname": "po_details", 
+   "oldfieldtype": "Table", 
+   "options": "Purchase Order Item", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "sb_last_purchase", 
+   "fieldtype": "Section Break", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "net_total_import", 
+   "fieldtype": "Currency", 
+   "label": "Net Total", 
+   "no_copy": 0, 
+   "oldfieldname": "net_total_import", 
+   "oldfieldtype": "Currency", 
+   "options": "currency", 
+   "permlevel": 0, 
+   "print_hide": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "get_last_purchase_rate", 
+   "fieldtype": "Button", 
+   "label": "Get Last Purchase Rate", 
+   "oldfieldtype": "Button", 
+   "permlevel": 0, 
+   "print_hide": 0
+  }, 
+  {
+   "fieldname": "column_break_26", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "net_total", 
+   "fieldtype": "Currency", 
+   "label": "Net Total (Company Currency)", 
+   "no_copy": 1, 
+   "oldfieldname": "net_total", 
+   "oldfieldtype": "Currency", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1, 
+   "reqd": 0
+  }, 
+  {
+   "fieldname": "taxes", 
+   "fieldtype": "Section Break", 
+   "label": "Taxes and Charges", 
+   "oldfieldtype": "Section Break", 
+   "options": "icon-money", 
+   "permlevel": 0, 
+   "print_hide": 0
+  }, 
+  {
+   "description": "If you have created a standard template in Purchase Taxes and Charges Master, select one and click on the button below.", 
+   "fieldname": "taxes_and_charges", 
+   "fieldtype": "Link", 
+   "label": "Taxes and Charges", 
+   "no_copy": 0, 
+   "oldfieldname": "purchase_other_charges", 
+   "oldfieldtype": "Link", 
+   "options": "Purchase Taxes and Charges Master", 
+   "permlevel": 0, 
+   "print_hide": 1
+  }, 
+  {
+   "fieldname": "other_charges", 
+   "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, 
+   "print_hide": 1
+  }, 
+  {
+   "fieldname": "totals", 
+   "fieldtype": "Section Break", 
+   "label": "Totals", 
+   "oldfieldtype": "Section Break", 
+   "options": "icon-money", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "other_charges_added_import", 
+   "fieldtype": "Currency", 
+   "label": "Taxes and Charges Added", 
+   "no_copy": 0, 
+   "oldfieldname": "other_charges_added_import", 
+   "oldfieldtype": "Currency", 
+   "options": "currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1, 
+   "report_hide": 0
+  }, 
+  {
+   "fieldname": "other_charges_deducted_import", 
+   "fieldtype": "Currency", 
+   "label": "Taxes and Charges Deducted", 
+   "no_copy": 0, 
+   "oldfieldname": "other_charges_deducted_import", 
+   "oldfieldtype": "Currency", 
+   "options": "currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1, 
+   "report_hide": 0
+  }, 
+  {
+   "fieldname": "grand_total_import", 
+   "fieldtype": "Currency", 
+   "in_list_view": 1, 
+   "label": "Grand Total", 
+   "no_copy": 0, 
+   "oldfieldname": "grand_total_import", 
+   "oldfieldtype": "Currency", 
+   "options": "currency", 
+   "permlevel": 0, 
+   "print_hide": 0, 
+   "read_only": 1, 
+   "report_hide": 0
+  }, 
+  {
+   "fieldname": "in_words_import", 
+   "fieldtype": "Data", 
+   "label": "In Words", 
+   "oldfieldname": "in_words_import", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "print_hide": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "column_break4", 
+   "fieldtype": "Column Break", 
+   "oldfieldtype": "Column Break", 
+   "permlevel": 0, 
+   "print_hide": 0
+  }, 
+  {
+   "fieldname": "other_charges_added", 
+   "fieldtype": "Currency", 
+   "label": "Taxes and Charges Added (Company Currency)", 
+   "no_copy": 0, 
+   "oldfieldname": "other_charges_added", 
+   "oldfieldtype": "Currency", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "other_charges_deducted", 
+   "fieldtype": "Currency", 
+   "label": "Taxes and Charges Deducted (Company Currency)", 
+   "no_copy": 0, 
+   "oldfieldname": "other_charges_deducted", 
+   "oldfieldtype": "Currency", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "total_tax", 
+   "fieldtype": "Currency", 
+   "label": "Total Tax (Company Currency)", 
+   "no_copy": 1, 
+   "oldfieldname": "total_tax", 
+   "oldfieldtype": "Currency", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "grand_total", 
+   "fieldtype": "Currency", 
+   "label": "Grand Total (Company Currency)", 
+   "no_copy": 1, 
+   "oldfieldname": "grand_total", 
+   "oldfieldtype": "Currency", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "rounded_total", 
+   "fieldtype": "Currency", 
+   "label": "Rounded Total (Company Currency)", 
+   "oldfieldname": "rounded_total", 
+   "oldfieldtype": "Currency", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1
+  }, 
+  {
+   "description": "In Words will be visible once you save the Purchase Order.", 
+   "fieldname": "in_words", 
+   "fieldtype": "Data", 
+   "label": "In Words (Company Currency)", 
+   "oldfieldname": "in_words", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "terms_section_break", 
+   "fieldtype": "Section Break", 
+   "label": "Terms and Conditions", 
+   "oldfieldtype": "Section Break", 
+   "options": "icon-legal", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "tc_name", 
+   "fieldtype": "Link", 
+   "label": "Terms", 
+   "oldfieldname": "tc_name", 
+   "oldfieldtype": "Link", 
+   "options": "Terms and Conditions", 
+   "permlevel": 0, 
+   "print_hide": 1
+  }, 
+  {
+   "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", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "supplier_address", 
+   "fieldtype": "Link", 
+   "in_filter": 1, 
+   "label": "Supplier Address", 
+   "options": "Address", 
+   "permlevel": 0, 
+   "print_hide": 1
+  }, 
+  {
+   "fieldname": "cb_contact", 
+   "fieldtype": "Column Break", 
+   "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", 
+   "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, 
+   "search_index": 1
+  }, 
+  {
+   "default": "No", 
+   "fieldname": "is_subcontracted", 
+   "fieldtype": "Select", 
+   "label": "Is Subcontracted", 
+   "options": "\nYes\nNo", 
+   "permlevel": 0, 
+   "print_hide": 1
+  }, 
+  {
+   "fieldname": "ref_sq", 
+   "fieldtype": "Data", 
+   "hidden": 1, 
+   "label": "Ref SQ", 
+   "no_copy": 1, 
+   "oldfieldname": "ref_sq", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1
+  }, 
+  {
+   "allow_on_submit": 1, 
+   "fieldname": "letter_head", 
+   "fieldtype": "Select", 
+   "label": "Letter Head", 
+   "oldfieldname": "letter_head", 
+   "oldfieldtype": "Select", 
+   "options": "link:Letter Head", 
+   "permlevel": 0, 
+   "print_hide": 1
+  }, 
+  {
+   "fieldname": "fiscal_year", 
+   "fieldtype": "Select", 
+   "in_filter": 1, 
+   "label": "Fiscal Year", 
+   "no_copy": 0, 
+   "oldfieldname": "fiscal_year", 
+   "oldfieldtype": "Select", 
+   "options": "link: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, 
+   "report_hide": 1
+  }, 
+  {
+   "fieldname": "column_break5", 
+   "fieldtype": "Column Break", 
+   "oldfieldtype": "Column Break", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "print_width": "50%", 
+   "width": "50%"
+  }, 
+  {
+   "depends_on": "eval:!doc.__islocal", 
+   "description": "% of materials received against this Purchase Order", 
+   "fieldname": "per_received", 
+   "fieldtype": "Percent", 
+   "in_list_view": 1, 
+   "label": "% Received", 
+   "no_copy": 1, 
+   "oldfieldname": "per_received", 
+   "oldfieldtype": "Currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1
+  }, 
+  {
+   "depends_on": "eval:!doc.__islocal", 
+   "description": "% of materials billed against this Purchase Order.", 
+   "fieldname": "per_billed", 
+   "fieldtype": "Percent", 
+   "in_list_view": 1, 
+   "label": "% Billed", 
+   "no_copy": 1, 
+   "oldfieldname": "per_billed", 
+   "oldfieldtype": "Currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1
+  }, 
+  {
+   "description": "Required raw materials issued to the supplier for producing a sub - contracted item.", 
+   "fieldname": "raw_material_details", 
+   "fieldtype": "Section Break", 
+   "label": "Raw Materials Supplied", 
+   "oldfieldtype": "Section Break", 
+   "options": "icon-truck", 
+   "permlevel": 0, 
+   "print_hide": 1
+  }, 
+  {
+   "allow_on_submit": 1, 
+   "fieldname": "po_raw_material_details", 
+   "fieldtype": "Table", 
+   "label": "Purchase Order Items Supplied", 
+   "no_copy": 0, 
+   "oldfieldname": "po_raw_material_details", 
+   "oldfieldtype": "Table", 
+   "options": "Purchase Order Item Supplied", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1
+  }
+ ], 
+ "icon": "icon-file-text", 
+ "idx": 1, 
+ "is_submittable": 1, 
+ "modified": "2014-01-29 15:26:21", 
+ "modified_by": "Administrator", 
+ "module": "Buying", 
+ "name": "Purchase Order", 
+ "owner": "Administrator", 
+ "permissions": [
+  {
+   "amend": 0, 
+   "cancel": 0, 
+   "create": 0, 
+   "delete": 0, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Material User", 
+   "submit": 0, 
+   "write": 0
+  }, 
+  {
+   "amend": 1, 
+   "cancel": 1, 
+   "create": 1, 
+   "delete": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Purchase Manager", 
+   "submit": 1, 
+   "write": 1
+  }, 
+  {
+   "amend": 1, 
+   "cancel": 1, 
+   "create": 1, 
+   "delete": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Purchase User", 
+   "submit": 1, 
+   "write": 1
+  }, 
+  {
+   "cancel": 0, 
+   "delete": 0, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Supplier"
+  }
+ ], 
+ "read_only_onload": 1, 
+ "search_fields": "status, transaction_date, supplier,grand_total"
+}
\ No newline at end of file
diff --git a/erpnext/buying/doctype/purchase_order_item/purchase_order_item.txt b/erpnext/buying/doctype/purchase_order_item/purchase_order_item.txt
index 192b206..fc41a7b 100755
--- a/erpnext/buying/doctype/purchase_order_item/purchase_order_item.txt
+++ b/erpnext/buying/doctype/purchase_order_item/purchase_order_item.txt
@@ -1,495 +1,482 @@
-[
- {
-  "creation": "2013-05-24 19:29:06", 
-  "docstatus": 0, 
-  "modified": "2014-02-28 11:26:25", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "autoname": "POD/.#####", 
-  "doctype": "DocType", 
-  "istable": 1, 
-  "module": "Buying", 
-  "name": "__common__"
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "Purchase Order Item", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Purchase Order Item"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "item_code", 
-  "fieldtype": "Link", 
-  "in_filter": 1, 
-  "in_list_view": 1, 
-  "label": "Item Code", 
-  "oldfieldname": "item_code", 
-  "oldfieldtype": "Link", 
-  "options": "Item", 
-  "print_hide": 0, 
-  "read_only": 0, 
-  "reqd": 1, 
-  "search_index": 1
- }, 
- {
-  "description": "If Supplier Part Number exists for given Item, it gets stored here", 
-  "doctype": "DocField", 
-  "fieldname": "supplier_part_no", 
-  "fieldtype": "Data", 
-  "hidden": 1, 
-  "in_list_view": 0, 
-  "label": "Supplier Part Number", 
-  "print_hide": 1, 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "item_name", 
-  "fieldtype": "Data", 
-  "hidden": 0, 
-  "in_filter": 1, 
-  "in_list_view": 0, 
-  "label": "Item Name", 
-  "oldfieldname": "item_name", 
-  "oldfieldtype": "Data", 
-  "print_hide": 1, 
-  "read_only": 0, 
-  "reqd": 1, 
-  "search_index": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "schedule_date", 
-  "fieldtype": "Date", 
-  "hidden": 0, 
-  "in_filter": 1, 
-  "in_list_view": 0, 
-  "label": "Reqd By Date", 
-  "no_copy": 0, 
-  "oldfieldname": "schedule_date", 
-  "oldfieldtype": "Date", 
-  "print_hide": 1, 
-  "read_only": 0, 
-  "reqd": 1, 
-  "search_index": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "col_break1", 
-  "fieldtype": "Column Break"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "description", 
-  "fieldtype": "Small Text", 
-  "in_list_view": 1, 
-  "label": "Description", 
-  "oldfieldname": "description", 
-  "oldfieldtype": "Small Text", 
-  "print_width": "300px", 
-  "read_only": 0, 
-  "reqd": 1, 
-  "width": "300px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "quantity_and_rate", 
-  "fieldtype": "Section Break", 
-  "in_list_view": 0, 
-  "label": "Quantity and Rate"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "qty", 
-  "fieldtype": "Float", 
-  "in_list_view": 1, 
-  "label": "Quantity", 
-  "oldfieldname": "qty", 
-  "oldfieldtype": "Currency", 
-  "print_width": "60px", 
-  "read_only": 0, 
-  "reqd": 1, 
-  "width": "60px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "uom", 
-  "fieldtype": "Link", 
-  "in_list_view": 0, 
-  "label": "UOM", 
-  "oldfieldname": "uom", 
-  "oldfieldtype": "Link", 
-  "options": "UOM", 
-  "print_hide": 0, 
-  "print_width": "100px", 
-  "read_only": 0, 
-  "reqd": 1, 
-  "width": "100px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "col_break2", 
-  "fieldtype": "Column Break"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "stock_uom", 
-  "fieldtype": "Link", 
-  "hidden": 0, 
-  "in_list_view": 0, 
-  "label": "Stock UOM", 
-  "oldfieldname": "stock_uom", 
-  "oldfieldtype": "Data", 
-  "options": "UOM", 
-  "print_hide": 1, 
-  "print_width": "100px", 
-  "read_only": 1, 
-  "reqd": 1, 
-  "width": "100px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "conversion_factor", 
-  "fieldtype": "Float", 
-  "hidden": 0, 
-  "in_list_view": 0, 
-  "label": "UOM Conversion Factor", 
-  "oldfieldname": "conversion_factor", 
-  "oldfieldtype": "Currency", 
-  "print_hide": 1, 
-  "print_width": "100px", 
-  "read_only": 0, 
-  "reqd": 1, 
-  "width": "100px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "sec_break1", 
-  "fieldtype": "Section Break"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "price_list_rate", 
-  "fieldtype": "Currency", 
-  "in_list_view": 0, 
-  "label": "Price List Rate", 
-  "options": "currency", 
-  "print_hide": 1, 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "discount_percentage", 
-  "fieldtype": "Float", 
-  "in_list_view": 0, 
-  "label": "Discount %", 
-  "print_hide": 0, 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "col_break3", 
-  "fieldtype": "Column Break"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "base_price_list_rate", 
-  "fieldtype": "Currency", 
-  "in_list_view": 0, 
-  "label": "Price List Rate (Company Currency)", 
-  "options": "Company:company:default_currency", 
-  "print_hide": 1, 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "sec_break2", 
-  "fieldtype": "Section Break"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "rate", 
-  "fieldtype": "Currency", 
-  "hidden": 0, 
-  "in_list_view": 1, 
-  "label": "Rate ", 
-  "oldfieldname": "import_rate", 
-  "oldfieldtype": "Currency", 
-  "options": "currency", 
-  "print_hide": 0, 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "amount", 
-  "fieldtype": "Currency", 
-  "in_list_view": 1, 
-  "label": "Amount", 
-  "oldfieldname": "import_amount", 
-  "oldfieldtype": "Currency", 
-  "options": "currency", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "col_break4", 
-  "fieldtype": "Column Break"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "base_rate", 
-  "fieldtype": "Currency", 
-  "in_list_view": 0, 
-  "label": "Rate (Company Currency)", 
-  "oldfieldname": "purchase_rate", 
-  "oldfieldtype": "Currency", 
-  "options": "Company:company:default_currency", 
-  "print_hide": 1, 
-  "print_width": "100px", 
-  "read_only": 1, 
-  "reqd": 1, 
-  "width": "100px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "base_amount", 
-  "fieldtype": "Currency", 
-  "in_list_view": 0, 
-  "label": "Amount (Company Currency)", 
-  "oldfieldname": "amount", 
-  "oldfieldtype": "Currency", 
-  "options": "Company:company:default_currency", 
-  "print_hide": 1, 
-  "read_only": 1, 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "pricing_rule_for_price", 
-  "fieldtype": "Link", 
-  "label": "Pricing Rule For Price", 
-  "options": "Pricing Rule", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "pricing_rule_for_discount", 
-  "fieldtype": "Link", 
-  "label": "Pricing Rule For Discount", 
-  "options": "Pricing Rule", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "warehouse_and_reference", 
-  "fieldtype": "Section Break", 
-  "in_list_view": 0, 
-  "label": "Warehouse and Reference"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "warehouse", 
-  "fieldtype": "Link", 
-  "hidden": 0, 
-  "in_list_view": 0, 
-  "label": "Warehouse", 
-  "oldfieldname": "warehouse", 
-  "oldfieldtype": "Link", 
-  "options": "Warehouse", 
-  "print_hide": 1, 
-  "read_only": 0, 
-  "reqd": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "project_name", 
-  "fieldtype": "Link", 
-  "in_filter": 1, 
-  "in_list_view": 0, 
-  "label": "Project Name", 
-  "options": "Project", 
-  "print_hide": 1, 
-  "read_only": 0, 
-  "report_hide": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "prevdoc_doctype", 
-  "fieldtype": "Data", 
-  "hidden": 1, 
-  "in_list_view": 0, 
-  "label": "Prevdoc DocType", 
-  "no_copy": 1, 
-  "oldfieldname": "prevdoc_doctype", 
-  "oldfieldtype": "Data", 
-  "print_hide": 1, 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "prevdoc_docname", 
-  "fieldtype": "Link", 
-  "hidden": 0, 
-  "in_filter": 1, 
-  "in_list_view": 0, 
-  "label": "Material Request No", 
-  "no_copy": 1, 
-  "oldfieldname": "prevdoc_docname", 
-  "oldfieldtype": "Link", 
-  "options": "Material Request", 
-  "print_hide": 1, 
-  "print_width": "120px", 
-  "read_only": 1, 
-  "search_index": 1, 
-  "width": "120px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "prevdoc_detail_docname", 
-  "fieldtype": "Data", 
-  "hidden": 1, 
-  "in_filter": 1, 
-  "in_list_view": 0, 
-  "label": "Material Request Detail No", 
-  "no_copy": 1, 
-  "oldfieldname": "prevdoc_detail_docname", 
-  "oldfieldtype": "Data", 
-  "print_hide": 1, 
-  "read_only": 1, 
-  "search_index": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "supplier_quotation", 
-  "fieldtype": "Link", 
-  "hidden": 0, 
-  "in_filter": 0, 
-  "in_list_view": 0, 
-  "label": "Supplier Quotation", 
-  "no_copy": 1, 
-  "options": "Supplier Quotation", 
-  "read_only": 1, 
-  "search_index": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "supplier_quotation_item", 
-  "fieldtype": "Link", 
-  "hidden": 1, 
-  "in_list_view": 1, 
-  "label": "Supplier Quotation Item", 
-  "no_copy": 1, 
-  "options": "Supplier Quotation Item", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "col_break5", 
-  "fieldtype": "Column Break"
- }, 
- {
-  "description": "<a href=\"#Sales Browser/Item Group\">Add / Edit</a>", 
-  "doctype": "DocField", 
-  "fieldname": "item_group", 
-  "fieldtype": "Link", 
-  "hidden": 1, 
-  "in_filter": 1, 
-  "in_list_view": 1, 
-  "label": "Item Group", 
-  "oldfieldname": "item_group", 
-  "oldfieldtype": "Link", 
-  "options": "Item Group", 
-  "print_hide": 1, 
-  "read_only": 1, 
-  "search_index": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "brand", 
-  "fieldtype": "Link", 
-  "hidden": 1, 
-  "in_list_view": 1, 
-  "label": "Brand", 
-  "oldfieldname": "brand", 
-  "oldfieldtype": "Link", 
-  "options": "Brand", 
-  "print_hide": 1, 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "stock_qty", 
-  "fieldtype": "Float", 
-  "hidden": 0, 
-  "in_list_view": 1, 
-  "label": "Qty as per Stock UOM", 
-  "no_copy": 1, 
-  "oldfieldname": "stock_qty", 
-  "oldfieldtype": "Currency", 
-  "print_hide": 1, 
-  "print_width": "100px", 
-  "read_only": 1, 
-  "width": "100px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "received_qty", 
-  "fieldtype": "Float", 
-  "hidden": 0, 
-  "in_list_view": 1, 
-  "label": "Received Qty", 
-  "no_copy": 1, 
-  "oldfieldname": "received_qty", 
-  "oldfieldtype": "Currency", 
-  "print_hide": 1, 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "billed_amt", 
-  "fieldtype": "Currency", 
-  "in_list_view": 1, 
-  "label": "Billed Amt", 
-  "no_copy": 1, 
-  "options": "currency", 
-  "print_hide": 1, 
-  "read_only": 1
- }, 
- {
-  "description": "Tax detail table fetched from item master as a string and stored in this field.\nUsed for Taxes and Charges", 
-  "doctype": "DocField", 
-  "fieldname": "item_tax_rate", 
-  "fieldtype": "Small Text", 
-  "hidden": 1, 
-  "in_list_view": 1, 
-  "label": "Item Tax Rate", 
-  "oldfieldname": "item_tax_rate", 
-  "oldfieldtype": "Small Text", 
-  "print_hide": 1, 
-  "read_only": 1, 
-  "report_hide": 1
- }, 
- {
-  "allow_on_submit": 1, 
-  "doctype": "DocField", 
-  "fieldname": "page_break", 
-  "fieldtype": "Check", 
-  "hidden": 0, 
-  "in_list_view": 1, 
-  "label": "Page Break", 
-  "no_copy": 1, 
-  "oldfieldname": "page_break", 
-  "oldfieldtype": "Check", 
-  "print_hide": 1, 
-  "read_only": 0
- }
-]
\ No newline at end of file
+{
+ "autoname": "POD/.#####", 
+ "creation": "2013-05-24 19:29:06", 
+ "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_hide": 0, 
+   "read_only": 0, 
+   "reqd": 1, 
+   "search_index": 1
+  }, 
+  {
+   "description": "If Supplier Part Number exists for given Item, it gets stored here", 
+   "fieldname": "supplier_part_no", 
+   "fieldtype": "Data", 
+   "hidden": 1, 
+   "in_list_view": 0, 
+   "label": "Supplier Part Number", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "item_name", 
+   "fieldtype": "Data", 
+   "hidden": 0, 
+   "in_filter": 1, 
+   "in_list_view": 0, 
+   "label": "Item Name", 
+   "oldfieldname": "item_name", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0, 
+   "reqd": 1, 
+   "search_index": 1
+  }, 
+  {
+   "fieldname": "schedule_date", 
+   "fieldtype": "Date", 
+   "hidden": 0, 
+   "in_filter": 1, 
+   "in_list_view": 0, 
+   "label": "Reqd By Date", 
+   "no_copy": 0, 
+   "oldfieldname": "schedule_date", 
+   "oldfieldtype": "Date", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0, 
+   "reqd": 1, 
+   "search_index": 1
+  }, 
+  {
+   "fieldname": "col_break1", 
+   "fieldtype": "Column Break", 
+   "permlevel": 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": "quantity_and_rate", 
+   "fieldtype": "Section Break", 
+   "in_list_view": 0, 
+   "label": "Quantity and Rate", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "qty", 
+   "fieldtype": "Float", 
+   "in_list_view": 1, 
+   "label": "Quantity", 
+   "oldfieldname": "qty", 
+   "oldfieldtype": "Currency", 
+   "permlevel": 0, 
+   "print_width": "60px", 
+   "read_only": 0, 
+   "reqd": 1, 
+   "width": "60px"
+  }, 
+  {
+   "fieldname": "uom", 
+   "fieldtype": "Link", 
+   "in_list_view": 0, 
+   "label": "UOM", 
+   "oldfieldname": "uom", 
+   "oldfieldtype": "Link", 
+   "options": "UOM", 
+   "permlevel": 0, 
+   "print_hide": 0, 
+   "print_width": "100px", 
+   "read_only": 0, 
+   "reqd": 1, 
+   "width": "100px"
+  }, 
+  {
+   "fieldname": "col_break2", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "stock_uom", 
+   "fieldtype": "Link", 
+   "hidden": 0, 
+   "in_list_view": 0, 
+   "label": "Stock UOM", 
+   "oldfieldname": "stock_uom", 
+   "oldfieldtype": "Data", 
+   "options": "UOM", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "print_width": "100px", 
+   "read_only": 1, 
+   "reqd": 1, 
+   "width": "100px"
+  }, 
+  {
+   "fieldname": "conversion_factor", 
+   "fieldtype": "Float", 
+   "hidden": 0, 
+   "in_list_view": 0, 
+   "label": "UOM Conversion Factor", 
+   "oldfieldname": "conversion_factor", 
+   "oldfieldtype": "Currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "print_width": "100px", 
+   "read_only": 0, 
+   "reqd": 1, 
+   "width": "100px"
+  }, 
+  {
+   "fieldname": "sec_break1", 
+   "fieldtype": "Section Break", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "price_list_rate", 
+   "fieldtype": "Currency", 
+   "in_list_view": 0, 
+   "label": "Price List Rate", 
+   "options": "currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "discount_percentage", 
+   "fieldtype": "Float", 
+   "in_list_view": 0, 
+   "label": "Discount %", 
+   "permlevel": 0, 
+   "print_hide": 0, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "col_break3", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "base_price_list_rate", 
+   "fieldtype": "Currency", 
+   "in_list_view": 0, 
+   "label": "Price List Rate (Company Currency)", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "sec_break2", 
+   "fieldtype": "Section Break", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "rate", 
+   "fieldtype": "Currency", 
+   "hidden": 0, 
+   "in_list_view": 1, 
+   "label": "Rate ", 
+   "oldfieldname": "import_rate", 
+   "oldfieldtype": "Currency", 
+   "options": "currency", 
+   "permlevel": 0, 
+   "print_hide": 0, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "amount", 
+   "fieldtype": "Currency", 
+   "in_list_view": 1, 
+   "label": "Amount", 
+   "oldfieldname": "import_amount", 
+   "oldfieldtype": "Currency", 
+   "options": "currency", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "col_break4", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "base_rate", 
+   "fieldtype": "Currency", 
+   "in_list_view": 0, 
+   "label": "Rate (Company Currency)", 
+   "oldfieldname": "purchase_rate", 
+   "oldfieldtype": "Currency", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "print_width": "100px", 
+   "read_only": 1, 
+   "reqd": 1, 
+   "width": "100px"
+  }, 
+  {
+   "fieldname": "base_amount", 
+   "fieldtype": "Currency", 
+   "in_list_view": 0, 
+   "label": "Amount (Company Currency)", 
+   "oldfieldname": "amount", 
+   "oldfieldtype": "Currency", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "pricing_rule_for_price", 
+   "fieldtype": "Link", 
+   "label": "Pricing Rule For Price", 
+   "options": "Pricing Rule", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "pricing_rule_for_discount", 
+   "fieldtype": "Link", 
+   "label": "Pricing Rule For Discount", 
+   "options": "Pricing Rule", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "warehouse_and_reference", 
+   "fieldtype": "Section Break", 
+   "in_list_view": 0, 
+   "label": "Warehouse and Reference", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "warehouse", 
+   "fieldtype": "Link", 
+   "hidden": 0, 
+   "in_list_view": 0, 
+   "label": "Warehouse", 
+   "oldfieldname": "warehouse", 
+   "oldfieldtype": "Link", 
+   "options": "Warehouse", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0, 
+   "reqd": 0
+  }, 
+  {
+   "fieldname": "project_name", 
+   "fieldtype": "Link", 
+   "in_filter": 1, 
+   "in_list_view": 0, 
+   "label": "Project Name", 
+   "options": "Project", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0, 
+   "report_hide": 0
+  }, 
+  {
+   "fieldname": "prevdoc_doctype", 
+   "fieldtype": "Data", 
+   "hidden": 1, 
+   "in_list_view": 0, 
+   "label": "Prevdoc DocType", 
+   "no_copy": 1, 
+   "oldfieldname": "prevdoc_doctype", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "prevdoc_docname", 
+   "fieldtype": "Link", 
+   "hidden": 0, 
+   "in_filter": 1, 
+   "in_list_view": 0, 
+   "label": "Material Request No", 
+   "no_copy": 1, 
+   "oldfieldname": "prevdoc_docname", 
+   "oldfieldtype": "Link", 
+   "options": "Material Request", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "print_width": "120px", 
+   "read_only": 1, 
+   "search_index": 1, 
+   "width": "120px"
+  }, 
+  {
+   "fieldname": "prevdoc_detail_docname", 
+   "fieldtype": "Data", 
+   "hidden": 1, 
+   "in_filter": 1, 
+   "in_list_view": 0, 
+   "label": "Material Request Detail No", 
+   "no_copy": 1, 
+   "oldfieldname": "prevdoc_detail_docname", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1, 
+   "search_index": 1
+  }, 
+  {
+   "fieldname": "supplier_quotation", 
+   "fieldtype": "Link", 
+   "hidden": 0, 
+   "in_filter": 0, 
+   "in_list_view": 0, 
+   "label": "Supplier Quotation", 
+   "no_copy": 1, 
+   "options": "Supplier Quotation", 
+   "permlevel": 0, 
+   "read_only": 1, 
+   "search_index": 0
+  }, 
+  {
+   "fieldname": "supplier_quotation_item", 
+   "fieldtype": "Link", 
+   "hidden": 1, 
+   "in_list_view": 1, 
+   "label": "Supplier Quotation Item", 
+   "no_copy": 1, 
+   "options": "Supplier Quotation Item", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "col_break5", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0
+  }, 
+  {
+   "description": "<a href=\"#Sales Browser/Item Group\">Add / Edit</a>", 
+   "fieldname": "item_group", 
+   "fieldtype": "Link", 
+   "hidden": 1, 
+   "in_filter": 1, 
+   "in_list_view": 1, 
+   "label": "Item Group", 
+   "oldfieldname": "item_group", 
+   "oldfieldtype": "Link", 
+   "options": "Item Group", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1, 
+   "search_index": 0
+  }, 
+  {
+   "fieldname": "brand", 
+   "fieldtype": "Link", 
+   "hidden": 1, 
+   "in_list_view": 1, 
+   "label": "Brand", 
+   "oldfieldname": "brand", 
+   "oldfieldtype": "Link", 
+   "options": "Brand", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "stock_qty", 
+   "fieldtype": "Float", 
+   "hidden": 0, 
+   "in_list_view": 1, 
+   "label": "Qty as per Stock UOM", 
+   "no_copy": 1, 
+   "oldfieldname": "stock_qty", 
+   "oldfieldtype": "Currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "print_width": "100px", 
+   "read_only": 1, 
+   "width": "100px"
+  }, 
+  {
+   "fieldname": "received_qty", 
+   "fieldtype": "Float", 
+   "hidden": 0, 
+   "in_list_view": 1, 
+   "label": "Received Qty", 
+   "no_copy": 1, 
+   "oldfieldname": "received_qty", 
+   "oldfieldtype": "Currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "billed_amt", 
+   "fieldtype": "Currency", 
+   "in_list_view": 1, 
+   "label": "Billed Amt", 
+   "no_copy": 1, 
+   "options": "currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1
+  }, 
+  {
+   "description": "Tax detail table fetched from item master as a string and stored in this field.\nUsed for Taxes and Charges", 
+   "fieldname": "item_tax_rate", 
+   "fieldtype": "Small Text", 
+   "hidden": 1, 
+   "in_list_view": 1, 
+   "label": "Item Tax Rate", 
+   "oldfieldname": "item_tax_rate", 
+   "oldfieldtype": "Small Text", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1, 
+   "report_hide": 1
+  }, 
+  {
+   "allow_on_submit": 1, 
+   "fieldname": "page_break", 
+   "fieldtype": "Check", 
+   "hidden": 0, 
+   "in_list_view": 1, 
+   "label": "Page Break", 
+   "no_copy": 1, 
+   "oldfieldname": "page_break", 
+   "oldfieldtype": "Check", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0
+  }
+ ], 
+ "idx": 1, 
+ "istable": 1, 
+ "modified": "2014-02-28 11:26:25", 
+ "modified_by": "Administrator", 
+ "module": "Buying", 
+ "name": "Purchase Order Item", 
+ "owner": "Administrator"
+}
\ No newline at end of file
diff --git a/erpnext/buying/doctype/purchase_order_item_supplied/purchase_order_item_supplied.txt b/erpnext/buying/doctype/purchase_order_item_supplied/purchase_order_item_supplied.txt
index f2860cd..3bcd474 100644
--- a/erpnext/buying/doctype/purchase_order_item_supplied/purchase_order_item_supplied.txt
+++ b/erpnext/buying/doctype/purchase_order_item_supplied/purchase_order_item_supplied.txt
@@ -1,121 +1,108 @@
-[
- {
-  "creation": "2013-02-22 01:27:42", 
-  "docstatus": 0, 
-  "modified": "2013-12-20 19:23:33", 
-  "modified_by": "Administrator", 
-  "owner": "dhanalekshmi@webnotestech.com"
- }, 
- {
-  "doctype": "DocType", 
-  "hide_toolbar": 1, 
-  "istable": 1, 
-  "module": "Buying", 
-  "name": "__common__"
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "Purchase Order Item Supplied", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Purchase Order Item Supplied"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "reference_name", 
-  "fieldtype": "Data", 
-  "hidden": 0, 
-  "in_filter": 0, 
-  "in_list_view": 1, 
-  "label": "Reference Name", 
-  "oldfieldname": "reference_name", 
-  "oldfieldtype": "Data", 
-  "read_only": 1, 
-  "search_index": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "bom_detail_no", 
-  "fieldtype": "Data", 
-  "in_list_view": 1, 
-  "label": "BOM Detail No", 
-  "oldfieldname": "bom_detail_no", 
-  "oldfieldtype": "Data", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "main_item_code", 
-  "fieldtype": "Data", 
-  "in_list_view": 1, 
-  "label": "Item Code", 
-  "oldfieldname": "main_item_code", 
-  "oldfieldtype": "Data", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "rm_item_code", 
-  "fieldtype": "Data", 
-  "in_list_view": 1, 
-  "label": "Raw Material Item Code", 
-  "oldfieldname": "rm_item_code", 
-  "oldfieldtype": "Data", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "required_qty", 
-  "fieldtype": "Float", 
-  "in_list_view": 1, 
-  "label": "Required Qty", 
-  "oldfieldname": "required_qty", 
-  "oldfieldtype": "Currency", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "rate", 
-  "fieldtype": "Currency", 
-  "in_list_view": 1, 
-  "label": "Rate", 
-  "oldfieldname": "rate", 
-  "oldfieldtype": "Currency", 
-  "options": "Company:company:default_currency"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "amount", 
-  "fieldtype": "Currency", 
-  "label": "Amount", 
-  "oldfieldname": "amount", 
-  "oldfieldtype": "Currency", 
-  "options": "Company:company:default_currency", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "conversion_factor", 
-  "fieldtype": "Float", 
-  "hidden": 1, 
-  "label": "Conversion Factor", 
-  "oldfieldname": "conversion_factor", 
-  "oldfieldtype": "Currency", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "stock_uom", 
-  "fieldtype": "Link", 
-  "label": "Stock Uom", 
-  "oldfieldname": "stock_uom", 
-  "oldfieldtype": "Data", 
-  "options": "UOM", 
-  "read_only": 1
- }
-]
\ No newline at end of file
+{
+ "creation": "2013-02-22 01:27:42", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "fields": [
+  {
+   "fieldname": "reference_name", 
+   "fieldtype": "Data", 
+   "hidden": 0, 
+   "in_filter": 0, 
+   "in_list_view": 1, 
+   "label": "Reference Name", 
+   "oldfieldname": "reference_name", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "read_only": 1, 
+   "search_index": 0
+  }, 
+  {
+   "fieldname": "bom_detail_no", 
+   "fieldtype": "Data", 
+   "in_list_view": 1, 
+   "label": "BOM Detail No", 
+   "oldfieldname": "bom_detail_no", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "main_item_code", 
+   "fieldtype": "Data", 
+   "in_list_view": 1, 
+   "label": "Item Code", 
+   "oldfieldname": "main_item_code", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "rm_item_code", 
+   "fieldtype": "Data", 
+   "in_list_view": 1, 
+   "label": "Raw Material Item Code", 
+   "oldfieldname": "rm_item_code", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "required_qty", 
+   "fieldtype": "Float", 
+   "in_list_view": 1, 
+   "label": "Required Qty", 
+   "oldfieldname": "required_qty", 
+   "oldfieldtype": "Currency", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "rate", 
+   "fieldtype": "Currency", 
+   "in_list_view": 1, 
+   "label": "Rate", 
+   "oldfieldname": "rate", 
+   "oldfieldtype": "Currency", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "amount", 
+   "fieldtype": "Currency", 
+   "label": "Amount", 
+   "oldfieldname": "amount", 
+   "oldfieldtype": "Currency", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "conversion_factor", 
+   "fieldtype": "Float", 
+   "hidden": 1, 
+   "label": "Conversion Factor", 
+   "oldfieldname": "conversion_factor", 
+   "oldfieldtype": "Currency", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "stock_uom", 
+   "fieldtype": "Link", 
+   "label": "Stock Uom", 
+   "oldfieldname": "stock_uom", 
+   "oldfieldtype": "Data", 
+   "options": "UOM", 
+   "permlevel": 0, 
+   "read_only": 1
+  }
+ ], 
+ "hide_toolbar": 1, 
+ "idx": 1, 
+ "istable": 1, 
+ "modified": "2013-12-20 19:23:33", 
+ "modified_by": "Administrator", 
+ "module": "Buying", 
+ "name": "Purchase Order Item Supplied", 
+ "owner": "dhanalekshmi@webnotestech.com"
+}
\ No newline at end of file
diff --git a/erpnext/buying/doctype/purchase_receipt_item_supplied/purchase_receipt_item_supplied.txt b/erpnext/buying/doctype/purchase_receipt_item_supplied/purchase_receipt_item_supplied.txt
index e28bdb7..8bee52e 100644
--- a/erpnext/buying/doctype/purchase_receipt_item_supplied/purchase_receipt_item_supplied.txt
+++ b/erpnext/buying/doctype/purchase_receipt_item_supplied/purchase_receipt_item_supplied.txt
@@ -1,158 +1,145 @@
-[
- {
-  "creation": "2013-02-22 01:27:42", 
-  "docstatus": 0, 
-  "modified": "2014-02-13 11:29:35", 
-  "modified_by": "Administrator", 
-  "owner": "wasim@webnotestech.com"
- }, 
- {
-  "doctype": "DocType", 
-  "hide_toolbar": 0, 
-  "istable": 1, 
-  "module": "Buying", 
-  "name": "__common__"
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "Purchase Receipt Item Supplied", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Purchase Receipt Item Supplied"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "main_item_code", 
-  "fieldtype": "Data", 
-  "in_list_view": 1, 
-  "label": "Item Code", 
-  "oldfieldname": "main_item_code", 
-  "oldfieldtype": "Data", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "rm_item_code", 
-  "fieldtype": "Data", 
-  "in_list_view": 1, 
-  "label": "Raw Material Item Code", 
-  "oldfieldname": "rm_item_code", 
-  "oldfieldtype": "Data", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "description", 
-  "fieldtype": "Text", 
-  "in_list_view": 1, 
-  "label": "Description", 
-  "oldfieldname": "description", 
-  "oldfieldtype": "Data", 
-  "print_width": "300px", 
-  "read_only": 1, 
-  "width": "300px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "col_break1", 
-  "fieldtype": "Column Break"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "required_qty", 
-  "fieldtype": "Float", 
-  "in_list_view": 1, 
-  "label": "Required Qty", 
-  "oldfieldname": "required_qty", 
-  "oldfieldtype": "Currency", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "consumed_qty", 
-  "fieldtype": "Float", 
-  "label": "Consumed Qty", 
-  "oldfieldname": "consumed_qty", 
-  "oldfieldtype": "Currency", 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "stock_uom", 
-  "fieldtype": "Link", 
-  "label": "Stock Uom", 
-  "oldfieldname": "stock_uom", 
-  "oldfieldtype": "Data", 
-  "options": "UOM", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "rate", 
-  "fieldtype": "Currency", 
-  "label": "Rate", 
-  "oldfieldname": "rate", 
-  "oldfieldtype": "Currency", 
-  "options": "Company:company:default_currency", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "amount", 
-  "fieldtype": "Currency", 
-  "label": "Amount", 
-  "oldfieldname": "amount", 
-  "oldfieldtype": "Currency", 
-  "options": "Company:company:default_currency", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "conversion_factor", 
-  "fieldtype": "Float", 
-  "hidden": 1, 
-  "label": "Conversion Factor", 
-  "oldfieldname": "conversion_factor", 
-  "oldfieldtype": "Currency", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "current_stock", 
-  "fieldtype": "Float", 
-  "hidden": 1, 
-  "label": "Current Stock", 
-  "oldfieldname": "current_stock", 
-  "oldfieldtype": "Currency", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "reference_name", 
-  "fieldtype": "Data", 
-  "hidden": 1, 
-  "in_filter": 0, 
-  "in_list_view": 1, 
-  "label": "Reference Name", 
-  "oldfieldname": "reference_name", 
-  "oldfieldtype": "Data", 
-  "read_only": 1, 
-  "search_index": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "bom_detail_no", 
-  "fieldtype": "Data", 
-  "hidden": 1, 
-  "in_list_view": 1, 
-  "label": "BOM Detail No", 
-  "oldfieldname": "bom_detail_no", 
-  "oldfieldtype": "Data", 
-  "read_only": 1
- }
-]
\ No newline at end of file
+{
+ "creation": "2013-02-22 01:27:42", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "fields": [
+  {
+   "fieldname": "main_item_code", 
+   "fieldtype": "Data", 
+   "in_list_view": 1, 
+   "label": "Item Code", 
+   "oldfieldname": "main_item_code", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "rm_item_code", 
+   "fieldtype": "Data", 
+   "in_list_view": 1, 
+   "label": "Raw Material Item Code", 
+   "oldfieldname": "rm_item_code", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "description", 
+   "fieldtype": "Text", 
+   "in_list_view": 1, 
+   "label": "Description", 
+   "oldfieldname": "description", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "print_width": "300px", 
+   "read_only": 1, 
+   "width": "300px"
+  }, 
+  {
+   "fieldname": "col_break1", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "required_qty", 
+   "fieldtype": "Float", 
+   "in_list_view": 1, 
+   "label": "Required Qty", 
+   "oldfieldname": "required_qty", 
+   "oldfieldtype": "Currency", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "consumed_qty", 
+   "fieldtype": "Float", 
+   "label": "Consumed Qty", 
+   "oldfieldname": "consumed_qty", 
+   "oldfieldtype": "Currency", 
+   "permlevel": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "stock_uom", 
+   "fieldtype": "Link", 
+   "label": "Stock Uom", 
+   "oldfieldname": "stock_uom", 
+   "oldfieldtype": "Data", 
+   "options": "UOM", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "rate", 
+   "fieldtype": "Currency", 
+   "label": "Rate", 
+   "oldfieldname": "rate", 
+   "oldfieldtype": "Currency", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "amount", 
+   "fieldtype": "Currency", 
+   "label": "Amount", 
+   "oldfieldname": "amount", 
+   "oldfieldtype": "Currency", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "conversion_factor", 
+   "fieldtype": "Float", 
+   "hidden": 1, 
+   "label": "Conversion Factor", 
+   "oldfieldname": "conversion_factor", 
+   "oldfieldtype": "Currency", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "current_stock", 
+   "fieldtype": "Float", 
+   "hidden": 1, 
+   "label": "Current Stock", 
+   "oldfieldname": "current_stock", 
+   "oldfieldtype": "Currency", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "reference_name", 
+   "fieldtype": "Data", 
+   "hidden": 1, 
+   "in_filter": 0, 
+   "in_list_view": 1, 
+   "label": "Reference Name", 
+   "oldfieldname": "reference_name", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "read_only": 1, 
+   "search_index": 0
+  }, 
+  {
+   "fieldname": "bom_detail_no", 
+   "fieldtype": "Data", 
+   "hidden": 1, 
+   "in_list_view": 1, 
+   "label": "BOM Detail No", 
+   "oldfieldname": "bom_detail_no", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "read_only": 1
+  }
+ ], 
+ "hide_toolbar": 0, 
+ "idx": 1, 
+ "istable": 1, 
+ "modified": "2014-02-13 11:29:35", 
+ "modified_by": "Administrator", 
+ "module": "Buying", 
+ "name": "Purchase Receipt Item Supplied", 
+ "owner": "wasim@webnotestech.com"
+}
\ No newline at end of file
diff --git a/erpnext/buying/doctype/quality_inspection/quality_inspection.txt b/erpnext/buying/doctype/quality_inspection/quality_inspection.txt
index 899d3f8..a3e68ae 100644
--- a/erpnext/buying/doctype/quality_inspection/quality_inspection.txt
+++ b/erpnext/buying/doctype/quality_inspection/quality_inspection.txt
@@ -1,247 +1,228 @@
-[
- {
-  "creation": "2013-04-30 13:13:03", 
-  "docstatus": 0, 
-  "modified": "2014-01-20 17:49:14", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "autoname": "naming_series:", 
-  "doctype": "DocType", 
-  "icon": "icon-search", 
-  "is_submittable": 1, 
-  "module": "Buying", 
-  "name": "__common__", 
-  "search_fields": "item_code, report_date, purchase_receipt_no, delivery_note_no"
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "Quality Inspection", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "amend": 1, 
-  "cancel": 1, 
-  "create": 1, 
-  "delete": 1, 
-  "doctype": "DocPerm", 
-  "email": 1, 
-  "name": "__common__", 
-  "parent": "Quality Inspection", 
-  "parentfield": "permissions", 
-  "parenttype": "DocType", 
-  "permlevel": 0, 
-  "print": 1, 
-  "read": 1, 
-  "report": 1, 
-  "role": "Quality Manager", 
-  "submit": 1, 
-  "write": 1
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Quality Inspection"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "qa_inspection", 
-  "fieldtype": "Section Break", 
-  "label": "QA Inspection", 
-  "no_copy": 0, 
-  "oldfieldtype": "Section Break"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break0", 
-  "fieldtype": "Column Break", 
-  "oldfieldtype": "Column Break", 
-  "width": "50%"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "naming_series", 
-  "fieldtype": "Select", 
-  "label": "Series", 
-  "no_copy": 1, 
-  "options": "\nQAI/11-12/", 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "inspection_type", 
-  "fieldtype": "Select", 
-  "in_filter": 1, 
-  "label": "Inspection Type", 
-  "oldfieldname": "inspection_type", 
-  "oldfieldtype": "Select", 
-  "options": "\nIncoming\nOutgoing\nIn Process", 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "report_date", 
-  "fieldtype": "Date", 
-  "in_filter": 1, 
-  "label": "Report Date", 
-  "oldfieldname": "report_date", 
-  "oldfieldtype": "Date", 
-  "reqd": 1, 
-  "search_index": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "item_code", 
-  "fieldtype": "Link", 
-  "hidden": 0, 
-  "in_filter": 1, 
-  "label": "Item Code", 
-  "oldfieldname": "item_code", 
-  "oldfieldtype": "Link", 
-  "options": "Item", 
-  "reqd": 1, 
-  "search_index": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "sample_size", 
-  "fieldtype": "Float", 
-  "in_filter": 0, 
-  "label": "Sample Size", 
-  "oldfieldname": "sample_size", 
-  "oldfieldtype": "Currency", 
-  "reqd": 1, 
-  "search_index": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "description", 
-  "fieldtype": "Small Text", 
-  "in_filter": 1, 
-  "label": "Description", 
-  "oldfieldname": "description", 
-  "oldfieldtype": "Small Text", 
-  "search_index": 0, 
-  "width": "300px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break1", 
-  "fieldtype": "Column Break", 
-  "oldfieldtype": "Column Break", 
-  "width": "50%"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "item_serial_no", 
-  "fieldtype": "Link", 
-  "hidden": 0, 
-  "label": "Item Serial No", 
-  "oldfieldname": "item_serial_no", 
-  "oldfieldtype": "Link", 
-  "options": "Serial No", 
-  "print_hide": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "batch_no", 
-  "fieldtype": "Link", 
-  "label": "Batch No", 
-  "oldfieldname": "batch_no", 
-  "oldfieldtype": "Link", 
-  "options": "Batch"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "purchase_receipt_no", 
-  "fieldtype": "Link", 
-  "hidden": 0, 
-  "in_filter": 1, 
-  "label": "Purchase Receipt No", 
-  "oldfieldname": "purchase_receipt_no", 
-  "oldfieldtype": "Link", 
-  "options": "Purchase Receipt", 
-  "search_index": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "delivery_note_no", 
-  "fieldtype": "Link", 
-  "hidden": 0, 
-  "in_filter": 1, 
-  "label": "Delivery Note No", 
-  "oldfieldname": "delivery_note_no", 
-  "oldfieldtype": "Link", 
-  "options": "Delivery Note", 
-  "print_hide": 0, 
-  "search_index": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "inspected_by", 
-  "fieldtype": "Data", 
-  "label": "Inspected By", 
-  "oldfieldname": "inspected_by", 
-  "oldfieldtype": "Data", 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "remarks", 
-  "fieldtype": "Text", 
-  "label": "Remarks", 
-  "no_copy": 1, 
-  "oldfieldname": "remarks", 
-  "oldfieldtype": "Text"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "verified_by", 
-  "fieldtype": "Data", 
-  "label": "Verified By", 
-  "oldfieldname": "verified_by", 
-  "oldfieldtype": "Data"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "amended_from", 
-  "fieldtype": "Data", 
-  "ignore_restrictions": 1, 
-  "label": "Amended From", 
-  "no_copy": 1, 
-  "oldfieldname": "amended_from", 
-  "oldfieldtype": "Data", 
-  "print_hide": 1, 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "specification_details", 
-  "fieldtype": "Section Break", 
-  "label": "Specification Details", 
-  "oldfieldtype": "Section Break", 
-  "options": "Simple"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "get_specification_details", 
-  "fieldtype": "Button", 
-  "label": "Get Specification Details", 
-  "options": "get_item_specification_details"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "qa_specification_details", 
-  "fieldtype": "Table", 
-  "label": "Quality Inspection Readings", 
-  "oldfieldname": "qa_specification_details", 
-  "oldfieldtype": "Table", 
-  "options": "Quality Inspection Reading"
- }, 
- {
-  "doctype": "DocPerm"
- }
-]
\ No newline at end of file
+{
+ "autoname": "naming_series:", 
+ "creation": "2013-04-30 13:13:03", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "fields": [
+  {
+   "fieldname": "qa_inspection", 
+   "fieldtype": "Section Break", 
+   "label": "QA Inspection", 
+   "no_copy": 0, 
+   "oldfieldtype": "Section Break", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "column_break0", 
+   "fieldtype": "Column Break", 
+   "oldfieldtype": "Column Break", 
+   "permlevel": 0, 
+   "width": "50%"
+  }, 
+  {
+   "fieldname": "naming_series", 
+   "fieldtype": "Select", 
+   "label": "Series", 
+   "no_copy": 1, 
+   "options": "\nQAI/11-12/", 
+   "permlevel": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "inspection_type", 
+   "fieldtype": "Select", 
+   "in_filter": 1, 
+   "label": "Inspection Type", 
+   "oldfieldname": "inspection_type", 
+   "oldfieldtype": "Select", 
+   "options": "\nIncoming\nOutgoing\nIn Process", 
+   "permlevel": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "report_date", 
+   "fieldtype": "Date", 
+   "in_filter": 1, 
+   "label": "Report Date", 
+   "oldfieldname": "report_date", 
+   "oldfieldtype": "Date", 
+   "permlevel": 0, 
+   "reqd": 1, 
+   "search_index": 1
+  }, 
+  {
+   "fieldname": "item_code", 
+   "fieldtype": "Link", 
+   "hidden": 0, 
+   "in_filter": 1, 
+   "label": "Item Code", 
+   "oldfieldname": "item_code", 
+   "oldfieldtype": "Link", 
+   "options": "Item", 
+   "permlevel": 0, 
+   "reqd": 1, 
+   "search_index": 1
+  }, 
+  {
+   "fieldname": "sample_size", 
+   "fieldtype": "Float", 
+   "in_filter": 0, 
+   "label": "Sample Size", 
+   "oldfieldname": "sample_size", 
+   "oldfieldtype": "Currency", 
+   "permlevel": 0, 
+   "reqd": 1, 
+   "search_index": 0
+  }, 
+  {
+   "fieldname": "description", 
+   "fieldtype": "Small Text", 
+   "in_filter": 1, 
+   "label": "Description", 
+   "oldfieldname": "description", 
+   "oldfieldtype": "Small Text", 
+   "permlevel": 0, 
+   "search_index": 0, 
+   "width": "300px"
+  }, 
+  {
+   "fieldname": "column_break1", 
+   "fieldtype": "Column Break", 
+   "oldfieldtype": "Column Break", 
+   "permlevel": 0, 
+   "width": "50%"
+  }, 
+  {
+   "fieldname": "item_serial_no", 
+   "fieldtype": "Link", 
+   "hidden": 0, 
+   "label": "Item Serial No", 
+   "oldfieldname": "item_serial_no", 
+   "oldfieldtype": "Link", 
+   "options": "Serial No", 
+   "permlevel": 0, 
+   "print_hide": 0
+  }, 
+  {
+   "fieldname": "batch_no", 
+   "fieldtype": "Link", 
+   "label": "Batch No", 
+   "oldfieldname": "batch_no", 
+   "oldfieldtype": "Link", 
+   "options": "Batch", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "purchase_receipt_no", 
+   "fieldtype": "Link", 
+   "hidden": 0, 
+   "in_filter": 1, 
+   "label": "Purchase Receipt No", 
+   "oldfieldname": "purchase_receipt_no", 
+   "oldfieldtype": "Link", 
+   "options": "Purchase Receipt", 
+   "permlevel": 0, 
+   "search_index": 1
+  }, 
+  {
+   "fieldname": "delivery_note_no", 
+   "fieldtype": "Link", 
+   "hidden": 0, 
+   "in_filter": 1, 
+   "label": "Delivery Note No", 
+   "oldfieldname": "delivery_note_no", 
+   "oldfieldtype": "Link", 
+   "options": "Delivery Note", 
+   "permlevel": 0, 
+   "print_hide": 0, 
+   "search_index": 1
+  }, 
+  {
+   "fieldname": "inspected_by", 
+   "fieldtype": "Data", 
+   "label": "Inspected By", 
+   "oldfieldname": "inspected_by", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "remarks", 
+   "fieldtype": "Text", 
+   "label": "Remarks", 
+   "no_copy": 1, 
+   "oldfieldname": "remarks", 
+   "oldfieldtype": "Text", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "verified_by", 
+   "fieldtype": "Data", 
+   "label": "Verified By", 
+   "oldfieldname": "verified_by", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "amended_from", 
+   "fieldtype": "Data", 
+   "ignore_restrictions": 1, 
+   "label": "Amended From", 
+   "no_copy": 1, 
+   "oldfieldname": "amended_from", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "specification_details", 
+   "fieldtype": "Section Break", 
+   "label": "Specification Details", 
+   "oldfieldtype": "Section Break", 
+   "options": "Simple", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "get_specification_details", 
+   "fieldtype": "Button", 
+   "label": "Get Specification Details", 
+   "options": "get_item_specification_details", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "qa_specification_details", 
+   "fieldtype": "Table", 
+   "label": "Quality Inspection Readings", 
+   "oldfieldname": "qa_specification_details", 
+   "oldfieldtype": "Table", 
+   "options": "Quality Inspection Reading", 
+   "permlevel": 0
+  }
+ ], 
+ "icon": "icon-search", 
+ "idx": 1, 
+ "is_submittable": 1, 
+ "modified": "2014-01-20 17:49:14", 
+ "modified_by": "Administrator", 
+ "module": "Buying", 
+ "name": "Quality Inspection", 
+ "owner": "Administrator", 
+ "permissions": [
+  {
+   "amend": 1, 
+   "cancel": 1, 
+   "create": 1, 
+   "delete": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Quality Manager", 
+   "submit": 1, 
+   "write": 1
+  }
+ ], 
+ "search_fields": "item_code, report_date, purchase_receipt_no, delivery_note_no"
+}
\ No newline at end of file
diff --git a/erpnext/buying/doctype/quality_inspection_reading/quality_inspection_reading.txt b/erpnext/buying/doctype/quality_inspection_reading/quality_inspection_reading.txt
index f08e7cd..2ca4d92 100644
--- a/erpnext/buying/doctype/quality_inspection_reading/quality_inspection_reading.txt
+++ b/erpnext/buying/doctype/quality_inspection_reading/quality_inspection_reading.txt
@@ -1,141 +1,128 @@
-[
- {
-  "creation": "2013-02-22 01:27:43", 
-  "docstatus": 0, 
-  "modified": "2013-12-20 19:23:39", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "autoname": "QASD/.#####", 
-  "doctype": "DocType", 
-  "istable": 1, 
-  "module": "Buying", 
-  "name": "__common__"
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "Quality Inspection Reading", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Quality Inspection Reading"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "specification", 
-  "fieldtype": "Data", 
-  "in_list_view": 1, 
-  "label": "Parameter", 
-  "oldfieldname": "specification", 
-  "oldfieldtype": "Data", 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "value", 
-  "fieldtype": "Data", 
-  "in_list_view": 1, 
-  "label": "Acceptance Criteria", 
-  "oldfieldname": "value", 
-  "oldfieldtype": "Data"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "reading_1", 
-  "fieldtype": "Data", 
-  "in_list_view": 1, 
-  "label": "Reading 1", 
-  "oldfieldname": "reading_1", 
-  "oldfieldtype": "Data"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "reading_2", 
-  "fieldtype": "Data", 
-  "in_list_view": 1, 
-  "label": "Reading 2", 
-  "oldfieldname": "reading_2", 
-  "oldfieldtype": "Data"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "reading_3", 
-  "fieldtype": "Data", 
-  "in_list_view": 1, 
-  "label": "Reading 3", 
-  "oldfieldname": "reading_3", 
-  "oldfieldtype": "Data"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "reading_4", 
-  "fieldtype": "Data", 
-  "in_list_view": 1, 
-  "label": "Reading 4", 
-  "oldfieldname": "reading_4", 
-  "oldfieldtype": "Data"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "reading_5", 
-  "fieldtype": "Data", 
-  "label": "Reading 5", 
-  "oldfieldname": "reading_5", 
-  "oldfieldtype": "Data"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "reading_6", 
-  "fieldtype": "Data", 
-  "label": "Reading 6", 
-  "oldfieldname": "reading_6", 
-  "oldfieldtype": "Data"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "reading_7", 
-  "fieldtype": "Data", 
-  "label": "Reading 7", 
-  "oldfieldname": "reading_7", 
-  "oldfieldtype": "Data"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "reading_8", 
-  "fieldtype": "Data", 
-  "label": "Reading 8", 
-  "oldfieldname": "reading_8", 
-  "oldfieldtype": "Data"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "reading_9", 
-  "fieldtype": "Data", 
-  "label": "Reading 9", 
-  "oldfieldname": "reading_9", 
-  "oldfieldtype": "Data"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "reading_10", 
-  "fieldtype": "Data", 
-  "label": "Reading 10", 
-  "oldfieldname": "reading_10", 
-  "oldfieldtype": "Data"
- }, 
- {
-  "default": "Accepted", 
-  "doctype": "DocField", 
-  "fieldname": "status", 
-  "fieldtype": "Select", 
-  "label": "Status", 
-  "oldfieldname": "status", 
-  "oldfieldtype": "Select", 
-  "options": "Accepted\nRejected"
- }
-]
\ No newline at end of file
+{
+ "autoname": "QASD/.#####", 
+ "creation": "2013-02-22 01:27:43", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "fields": [
+  {
+   "fieldname": "specification", 
+   "fieldtype": "Data", 
+   "in_list_view": 1, 
+   "label": "Parameter", 
+   "oldfieldname": "specification", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "value", 
+   "fieldtype": "Data", 
+   "in_list_view": 1, 
+   "label": "Acceptance Criteria", 
+   "oldfieldname": "value", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "reading_1", 
+   "fieldtype": "Data", 
+   "in_list_view": 1, 
+   "label": "Reading 1", 
+   "oldfieldname": "reading_1", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "reading_2", 
+   "fieldtype": "Data", 
+   "in_list_view": 1, 
+   "label": "Reading 2", 
+   "oldfieldname": "reading_2", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "reading_3", 
+   "fieldtype": "Data", 
+   "in_list_view": 1, 
+   "label": "Reading 3", 
+   "oldfieldname": "reading_3", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "reading_4", 
+   "fieldtype": "Data", 
+   "in_list_view": 1, 
+   "label": "Reading 4", 
+   "oldfieldname": "reading_4", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "reading_5", 
+   "fieldtype": "Data", 
+   "label": "Reading 5", 
+   "oldfieldname": "reading_5", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "reading_6", 
+   "fieldtype": "Data", 
+   "label": "Reading 6", 
+   "oldfieldname": "reading_6", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "reading_7", 
+   "fieldtype": "Data", 
+   "label": "Reading 7", 
+   "oldfieldname": "reading_7", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "reading_8", 
+   "fieldtype": "Data", 
+   "label": "Reading 8", 
+   "oldfieldname": "reading_8", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "reading_9", 
+   "fieldtype": "Data", 
+   "label": "Reading 9", 
+   "oldfieldname": "reading_9", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "reading_10", 
+   "fieldtype": "Data", 
+   "label": "Reading 10", 
+   "oldfieldname": "reading_10", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0
+  }, 
+  {
+   "default": "Accepted", 
+   "fieldname": "status", 
+   "fieldtype": "Select", 
+   "label": "Status", 
+   "oldfieldname": "status", 
+   "oldfieldtype": "Select", 
+   "options": "Accepted\nRejected", 
+   "permlevel": 0
+  }
+ ], 
+ "idx": 1, 
+ "istable": 1, 
+ "modified": "2013-12-20 19:23:39", 
+ "modified_by": "Administrator", 
+ "module": "Buying", 
+ "name": "Quality Inspection Reading", 
+ "owner": "Administrator"
+}
\ No newline at end of file
diff --git a/erpnext/buying/doctype/supplier/supplier.txt b/erpnext/buying/doctype/supplier/supplier.txt
index a5d100f..f241278 100644
--- a/erpnext/buying/doctype/supplier/supplier.txt
+++ b/erpnext/buying/doctype/supplier/supplier.txt
@@ -1,234 +1,222 @@
-[
- {
-  "creation": "2013-01-10 16:34:11", 
-  "docstatus": 0, 
-  "modified": "2014-01-28 19:05:55", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "allow_import": 1, 
-  "allow_rename": 1, 
-  "autoname": "naming_series:", 
-  "description": "Supplier of Goods or Services.", 
-  "doctype": "DocType", 
-  "document_type": "Master", 
-  "icon": "icon-user", 
-  "module": "Buying", 
-  "name": "__common__", 
-  "search_fields": "supplier_name,supplier_type"
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "Supplier", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "amend": 0, 
-  "cancel": 0, 
-  "doctype": "DocPerm", 
-  "email": 1, 
-  "name": "__common__", 
-  "parent": "Supplier", 
-  "parentfield": "permissions", 
-  "parenttype": "DocType", 
-  "permlevel": 0, 
-  "print": 1, 
-  "read": 1, 
-  "report": 1, 
-  "submit": 0
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Supplier"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "basic_info", 
-  "fieldtype": "Section Break", 
-  "label": "Basic Info", 
-  "oldfieldtype": "Section Break", 
-  "options": "icon-user"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "naming_series", 
-  "fieldtype": "Select", 
-  "label": "Series", 
-  "no_copy": 1, 
-  "oldfieldname": "naming_series", 
-  "oldfieldtype": "Select", 
-  "options": "\nSUPP\nSUPP/10-11/"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "supplier_name", 
-  "fieldtype": "Data", 
-  "in_list_view": 1, 
-  "label": "Supplier Name", 
-  "no_copy": 1, 
-  "oldfieldname": "supplier_name", 
-  "oldfieldtype": "Data", 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break0", 
-  "fieldtype": "Column Break", 
-  "width": "50%"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "supplier_type", 
-  "fieldtype": "Link", 
-  "in_list_view": 1, 
-  "label": "Supplier Type", 
-  "oldfieldname": "supplier_type", 
-  "oldfieldtype": "Link", 
-  "options": "Supplier Type", 
-  "reqd": 1
- }, 
- {
-  "depends_on": "eval:!doc.__islocal", 
-  "doctype": "DocField", 
-  "fieldname": "address_contacts", 
-  "fieldtype": "Section Break", 
-  "label": "Address & Contacts", 
-  "oldfieldtype": "Column Break", 
-  "options": "icon-map-marker"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "address_html", 
-  "fieldtype": "HTML", 
-  "label": "Address HTML", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break1", 
-  "fieldtype": "Column Break", 
-  "width": "50%"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "contact_html", 
-  "fieldtype": "HTML", 
-  "label": "Contact HTML", 
-  "read_only": 1
- }, 
- {
-  "depends_on": "eval:!doc.__islocal", 
-  "doctype": "DocField", 
-  "fieldname": "communication_history", 
-  "fieldtype": "Section Break", 
-  "label": "Communication History", 
-  "options": "icon-comments", 
-  "print_hide": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "communication_html", 
-  "fieldtype": "HTML", 
-  "label": "Communication HTML", 
-  "print_hide": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "more_info", 
-  "fieldtype": "Section Break", 
-  "label": "More Info", 
-  "oldfieldtype": "Section Break", 
-  "options": "icon-file-text"
- }, 
- {
-  "description": "Enter the company name under which Account Head will be created for this Supplier", 
-  "doctype": "DocField", 
-  "fieldname": "company", 
-  "fieldtype": "Link", 
-  "in_filter": 1, 
-  "label": "Company", 
-  "oldfieldname": "company", 
-  "oldfieldtype": "Link", 
-  "options": "Company", 
-  "reqd": 1, 
-  "search_index": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "default_currency", 
-  "fieldtype": "Link", 
-  "label": "Default Currency", 
-  "no_copy": 1, 
-  "options": "Currency"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "default_price_list", 
-  "fieldtype": "Link", 
-  "label": "Price List", 
-  "options": "Price List"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "default_taxes_and_charges", 
-  "fieldtype": "Link", 
-  "label": "Taxes and Charges", 
-  "options": "Purchase Taxes and Charges Master"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "credit_days", 
-  "fieldtype": "Int", 
-  "label": "Credit Days"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break2", 
-  "fieldtype": "Column Break", 
-  "width": "50%"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "website", 
-  "fieldtype": "Data", 
-  "label": "Website", 
-  "oldfieldname": "website", 
-  "oldfieldtype": "Data"
- }, 
- {
-  "description": "Statutory info and other general information about your Supplier", 
-  "doctype": "DocField", 
-  "fieldname": "supplier_details", 
-  "fieldtype": "Text", 
-  "label": "Supplier Details", 
-  "oldfieldname": "supplier_details", 
-  "oldfieldtype": "Code"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "communications", 
-  "fieldtype": "Table", 
-  "hidden": 1, 
-  "label": "Communications", 
-  "options": "Communication", 
-  "print_hide": 1
- }, 
- {
-  "create": 0, 
-  "delete": 0, 
-  "doctype": "DocPerm", 
-  "role": "Purchase Manager", 
-  "write": 0
- }, 
- {
-  "create": 1, 
-  "delete": 1, 
-  "doctype": "DocPerm", 
-  "role": "Purchase Master Manager", 
-  "write": 1
- }
-]
\ No newline at end of file
+{
+ "allow_import": 1, 
+ "allow_rename": 1, 
+ "autoname": "naming_series:", 
+ "creation": "2013-01-10 16:34:11", 
+ "description": "Supplier of Goods or Services.", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "document_type": "Master", 
+ "fields": [
+  {
+   "fieldname": "basic_info", 
+   "fieldtype": "Section Break", 
+   "label": "Basic Info", 
+   "oldfieldtype": "Section Break", 
+   "options": "icon-user", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "naming_series", 
+   "fieldtype": "Select", 
+   "label": "Series", 
+   "no_copy": 1, 
+   "oldfieldname": "naming_series", 
+   "oldfieldtype": "Select", 
+   "options": "\nSUPP\nSUPP/10-11/", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "supplier_name", 
+   "fieldtype": "Data", 
+   "in_list_view": 1, 
+   "label": "Supplier Name", 
+   "no_copy": 1, 
+   "oldfieldname": "supplier_name", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "column_break0", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0, 
+   "width": "50%"
+  }, 
+  {
+   "fieldname": "supplier_type", 
+   "fieldtype": "Link", 
+   "in_list_view": 1, 
+   "label": "Supplier Type", 
+   "oldfieldname": "supplier_type", 
+   "oldfieldtype": "Link", 
+   "options": "Supplier Type", 
+   "permlevel": 0, 
+   "reqd": 1
+  }, 
+  {
+   "depends_on": "eval:!doc.__islocal", 
+   "fieldname": "address_contacts", 
+   "fieldtype": "Section Break", 
+   "label": "Address & Contacts", 
+   "oldfieldtype": "Column Break", 
+   "options": "icon-map-marker", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "address_html", 
+   "fieldtype": "HTML", 
+   "label": "Address HTML", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "column_break1", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0, 
+   "width": "50%"
+  }, 
+  {
+   "fieldname": "contact_html", 
+   "fieldtype": "HTML", 
+   "label": "Contact HTML", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "depends_on": "eval:!doc.__islocal", 
+   "fieldname": "communication_history", 
+   "fieldtype": "Section Break", 
+   "label": "Communication History", 
+   "options": "icon-comments", 
+   "permlevel": 0, 
+   "print_hide": 1
+  }, 
+  {
+   "fieldname": "communication_html", 
+   "fieldtype": "HTML", 
+   "label": "Communication HTML", 
+   "permlevel": 0, 
+   "print_hide": 1
+  }, 
+  {
+   "fieldname": "more_info", 
+   "fieldtype": "Section Break", 
+   "label": "More Info", 
+   "oldfieldtype": "Section Break", 
+   "options": "icon-file-text", 
+   "permlevel": 0
+  }, 
+  {
+   "description": "Enter the company name under which Account Head will be created for this Supplier", 
+   "fieldname": "company", 
+   "fieldtype": "Link", 
+   "in_filter": 1, 
+   "label": "Company", 
+   "oldfieldname": "company", 
+   "oldfieldtype": "Link", 
+   "options": "Company", 
+   "permlevel": 0, 
+   "reqd": 1, 
+   "search_index": 0
+  }, 
+  {
+   "fieldname": "default_currency", 
+   "fieldtype": "Link", 
+   "label": "Default Currency", 
+   "no_copy": 1, 
+   "options": "Currency", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "default_price_list", 
+   "fieldtype": "Link", 
+   "label": "Price List", 
+   "options": "Price List", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "default_taxes_and_charges", 
+   "fieldtype": "Link", 
+   "label": "Taxes and Charges", 
+   "options": "Purchase Taxes and Charges Master", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "credit_days", 
+   "fieldtype": "Int", 
+   "label": "Credit Days", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "column_break2", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0, 
+   "width": "50%"
+  }, 
+  {
+   "fieldname": "website", 
+   "fieldtype": "Data", 
+   "label": "Website", 
+   "oldfieldname": "website", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0
+  }, 
+  {
+   "description": "Statutory info and other general information about your Supplier", 
+   "fieldname": "supplier_details", 
+   "fieldtype": "Text", 
+   "label": "Supplier Details", 
+   "oldfieldname": "supplier_details", 
+   "oldfieldtype": "Code", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "communications", 
+   "fieldtype": "Table", 
+   "hidden": 1, 
+   "label": "Communications", 
+   "options": "Communication", 
+   "permlevel": 0, 
+   "print_hide": 1
+  }
+ ], 
+ "icon": "icon-user", 
+ "idx": 1, 
+ "modified": "2014-01-28 19:05:55", 
+ "modified_by": "Administrator", 
+ "module": "Buying", 
+ "name": "Supplier", 
+ "owner": "Administrator", 
+ "permissions": [
+  {
+   "amend": 0, 
+   "cancel": 0, 
+   "create": 0, 
+   "delete": 0, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Purchase Manager", 
+   "submit": 0, 
+   "write": 0
+  }, 
+  {
+   "amend": 0, 
+   "cancel": 0, 
+   "create": 1, 
+   "delete": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Purchase Master Manager", 
+   "submit": 0, 
+   "write": 1
+  }
+ ], 
+ "search_fields": "supplier_name,supplier_type"
+}
\ No newline at end of file
diff --git a/erpnext/buying/doctype/supplier_quotation/supplier_quotation.txt b/erpnext/buying/doctype/supplier_quotation/supplier_quotation.txt
index 0a4a3ec..d59283b 100644
--- a/erpnext/buying/doctype/supplier_quotation/supplier_quotation.txt
+++ b/erpnext/buying/doctype/supplier_quotation/supplier_quotation.txt
@@ -1,647 +1,644 @@
-[
- {
-  "creation": "2013-05-21 16:16:45", 
-  "docstatus": 0, 
-  "modified": "2014-01-29 15:25:52", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "allow_attach": 1, 
-  "allow_import": 1, 
-  "autoname": "naming_series:", 
-  "doctype": "DocType", 
-  "document_type": "Transaction", 
-  "icon": "icon-shopping-cart", 
-  "is_submittable": 1, 
-  "module": "Buying", 
-  "name": "__common__", 
-  "read_only_onload": 1, 
-  "search_fields": "status, transaction_date, supplier,grand_total"
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "Supplier Quotation", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "doctype": "DocPerm", 
-  "email": 1, 
-  "name": "__common__", 
-  "parent": "Supplier Quotation", 
-  "parentfield": "permissions", 
-  "parenttype": "DocType", 
-  "permlevel": 0, 
-  "print": 1, 
-  "read": 1, 
-  "report": 1
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Supplier Quotation"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "supplier_section", 
-  "fieldtype": "Section Break", 
-  "label": "Supplier", 
-  "options": "icon-user"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "naming_series", 
-  "fieldtype": "Select", 
-  "label": "Series", 
-  "no_copy": 1, 
-  "oldfieldname": "naming_series", 
-  "oldfieldtype": "Select", 
-  "options": "SQTN", 
-  "print_hide": 1, 
-  "reqd": 1
- }, 
- {
-  "description": "Supplier (vendor) name as entered in supplier master", 
-  "doctype": "DocField", 
-  "fieldname": "supplier", 
-  "fieldtype": "Link", 
-  "in_filter": 1, 
-  "label": "Supplier", 
-  "oldfieldname": "supplier", 
-  "oldfieldtype": "Link", 
-  "options": "Supplier", 
-  "print_hide": 1, 
-  "reqd": 1, 
-  "search_index": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "supplier_name", 
-  "fieldtype": "Data", 
-  "hidden": 0, 
-  "in_list_view": 1, 
-  "label": "Name", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "address_display", 
-  "fieldtype": "Small Text", 
-  "hidden": 1, 
-  "label": "Address", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "contact_display", 
-  "fieldtype": "Small Text", 
-  "hidden": 1, 
-  "label": "Contact", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "contact_mobile", 
-  "fieldtype": "Text", 
-  "hidden": 1, 
-  "label": "Mobile No", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "contact_email", 
-  "fieldtype": "Text", 
-  "hidden": 1, 
-  "label": "Contact Email", 
-  "print_hide": 1, 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break1", 
-  "fieldtype": "Column Break", 
-  "oldfieldtype": "Column Break", 
-  "print_hide": 0, 
-  "print_width": "50%", 
-  "width": "50%"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "transaction_date", 
-  "fieldtype": "Date", 
-  "in_filter": 1, 
-  "label": "Quotation Date", 
-  "oldfieldname": "transaction_date", 
-  "oldfieldtype": "Date", 
-  "reqd": 1, 
-  "search_index": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "amended_from", 
-  "fieldtype": "Data", 
-  "hidden": 1, 
-  "ignore_restrictions": 1, 
-  "label": "Amended From", 
-  "no_copy": 1, 
-  "oldfieldname": "amended_from", 
-  "oldfieldtype": "Data", 
-  "print_hide": 1, 
-  "read_only": 1, 
-  "report_hide": 0
- }, 
- {
-  "description": "Select the relevant company name if you have multiple companies", 
-  "doctype": "DocField", 
-  "fieldname": "company", 
-  "fieldtype": "Link", 
-  "in_filter": 1, 
-  "label": "Company", 
-  "no_copy": 0, 
-  "oldfieldname": "company", 
-  "oldfieldtype": "Link", 
-  "options": "Company", 
-  "print_hide": 1, 
-  "reqd": 1, 
-  "search_index": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "currency_price_list", 
-  "fieldtype": "Section Break", 
-  "label": "Currency and Price List", 
-  "options": "icon-tag"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "currency", 
-  "fieldtype": "Link", 
-  "label": "Currency", 
-  "no_copy": 0, 
-  "oldfieldname": "currency", 
-  "oldfieldtype": "Select", 
-  "options": "Currency", 
-  "print_hide": 1, 
-  "reqd": 1
- }, 
- {
-  "description": "Rate at which supplier's currency is converted to company's base currency", 
-  "doctype": "DocField", 
-  "fieldname": "conversion_rate", 
-  "fieldtype": "Float", 
-  "hidden": 0, 
-  "label": "Exchange Rate", 
-  "no_copy": 1, 
-  "oldfieldname": "conversion_rate", 
-  "oldfieldtype": "Currency", 
-  "print_hide": 1, 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "cb_price_list", 
-  "fieldtype": "Column Break", 
-  "print_width": "50%", 
-  "width": "50%"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "buying_price_list", 
-  "fieldtype": "Link", 
-  "label": "Price List", 
-  "options": "Price List", 
-  "print_hide": 1
- }, 
- {
-  "depends_on": "buying_price_list", 
-  "doctype": "DocField", 
-  "fieldname": "price_list_currency", 
-  "fieldtype": "Link", 
-  "label": "Price List Currency", 
-  "options": "Currency", 
-  "print_hide": 1, 
-  "read_only": 1
- }, 
- {
-  "depends_on": "buying_price_list", 
-  "doctype": "DocField", 
-  "fieldname": "plc_conversion_rate", 
-  "fieldtype": "Float", 
-  "label": "Price List Exchange Rate", 
-  "print_hide": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "items", 
-  "fieldtype": "Section Break", 
-  "label": "Items", 
-  "oldfieldtype": "Section Break", 
-  "options": "icon-shopping-cart"
- }, 
- {
-  "allow_on_submit": 1, 
-  "doctype": "DocField", 
-  "fieldname": "quotation_items", 
-  "fieldtype": "Table", 
-  "label": "Quotation Items", 
-  "no_copy": 0, 
-  "oldfieldname": "po_details", 
-  "oldfieldtype": "Table", 
-  "options": "Supplier Quotation Item"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "section_break_22", 
-  "fieldtype": "Section Break"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "net_total_import", 
-  "fieldtype": "Currency", 
-  "label": "Net Total", 
-  "no_copy": 0, 
-  "oldfieldname": "net_total_import", 
-  "oldfieldtype": "Currency", 
-  "options": "currency", 
-  "print_hide": 0, 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break_24", 
-  "fieldtype": "Column Break"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "net_total", 
-  "fieldtype": "Currency", 
-  "label": "Net Total (Company Currency)", 
-  "no_copy": 1, 
-  "oldfieldname": "net_total", 
-  "oldfieldtype": "Currency", 
-  "options": "Company:company:default_currency", 
-  "print_hide": 1, 
-  "read_only": 1, 
-  "reqd": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "taxes", 
-  "fieldtype": "Section Break", 
-  "label": "Taxes and Charges", 
-  "oldfieldtype": "Section Break", 
-  "options": "icon-money"
- }, 
- {
-  "description": "If you have created a standard template in Purchase Taxes and Charges Master, select one and click on the button below.", 
-  "doctype": "DocField", 
-  "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", 
-  "print_hide": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "other_charges", 
-  "fieldtype": "Table", 
-  "label": "Purchase Taxes and Charges", 
-  "no_copy": 0, 
-  "oldfieldname": "purchase_tax_details", 
-  "oldfieldtype": "Table", 
-  "options": "Purchase Taxes and Charges"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "other_charges_calculation", 
-  "fieldtype": "HTML", 
-  "label": "Taxes and Charges Calculation", 
-  "no_copy": 1, 
-  "oldfieldtype": "HTML", 
-  "print_hide": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "totals", 
-  "fieldtype": "Section Break", 
-  "label": "Totals", 
-  "oldfieldtype": "Section Break", 
-  "options": "icon-money"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "other_charges_added_import", 
-  "fieldtype": "Currency", 
-  "label": "Taxes and Charges Added", 
-  "no_copy": 0, 
-  "oldfieldname": "other_charges_added_import", 
-  "oldfieldtype": "Currency", 
-  "options": "currency", 
-  "print_hide": 1, 
-  "read_only": 1, 
-  "report_hide": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "other_charges_deducted_import", 
-  "fieldtype": "Currency", 
-  "label": "Taxes and Charges Deducted", 
-  "no_copy": 0, 
-  "oldfieldname": "other_charges_deducted_import", 
-  "oldfieldtype": "Currency", 
-  "options": "currency", 
-  "print_hide": 1, 
-  "read_only": 1, 
-  "report_hide": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "grand_total_import", 
-  "fieldtype": "Currency", 
-  "in_list_view": 1, 
-  "label": "Grand Total", 
-  "no_copy": 0, 
-  "oldfieldname": "grand_total_import", 
-  "oldfieldtype": "Currency", 
-  "options": "currency", 
-  "print_hide": 0, 
-  "read_only": 1, 
-  "report_hide": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "in_words_import", 
-  "fieldtype": "Data", 
-  "label": "In Words", 
-  "oldfieldname": "in_words_import", 
-  "oldfieldtype": "Data", 
-  "print_hide": 0, 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break4", 
-  "fieldtype": "Column Break", 
-  "oldfieldtype": "Column Break", 
-  "print_hide": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "other_charges_added", 
-  "fieldtype": "Currency", 
-  "label": "Taxes and Charges Added (Company Currency)", 
-  "no_copy": 0, 
-  "oldfieldname": "other_charges_added", 
-  "oldfieldtype": "Currency", 
-  "options": "Company:company:default_currency", 
-  "print_hide": 1, 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "other_charges_deducted", 
-  "fieldtype": "Currency", 
-  "label": "Taxes and Charges Deducted (Company Currency)", 
-  "no_copy": 0, 
-  "oldfieldname": "other_charges_deducted", 
-  "oldfieldtype": "Currency", 
-  "options": "Company:company:default_currency", 
-  "print_hide": 1, 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "total_tax", 
-  "fieldtype": "Currency", 
-  "label": "Total Tax (Company Currency)", 
-  "no_copy": 1, 
-  "oldfieldname": "total_tax", 
-  "oldfieldtype": "Currency", 
-  "options": "Company:company:default_currency", 
-  "print_hide": 1, 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "grand_total", 
-  "fieldtype": "Currency", 
-  "label": "Grand Total (Company Currency)", 
-  "no_copy": 1, 
-  "oldfieldname": "grand_total", 
-  "oldfieldtype": "Currency", 
-  "options": "Company:company:default_currency", 
-  "print_hide": 1, 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "rounded_total", 
-  "fieldtype": "Currency", 
-  "label": "Rounded Total (Company Currency)", 
-  "oldfieldname": "rounded_total", 
-  "oldfieldtype": "Currency", 
-  "options": "Company:company:default_currency", 
-  "print_hide": 1, 
-  "read_only": 1
- }, 
- {
-  "description": "In Words will be visible once you save the Purchase Order.", 
-  "doctype": "DocField", 
-  "fieldname": "in_words", 
-  "fieldtype": "Data", 
-  "label": "In Words (Company Currency)", 
-  "oldfieldname": "in_words", 
-  "oldfieldtype": "Data", 
-  "print_hide": 1, 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "terms_section_break", 
-  "fieldtype": "Section Break", 
-  "label": "Terms and Conditions", 
-  "oldfieldtype": "Section Break", 
-  "options": "icon-legal"
- }, 
- {
-  "allow_on_submit": 1, 
-  "doctype": "DocField", 
-  "fieldname": "letter_head", 
-  "fieldtype": "Select", 
-  "label": "Letter Head", 
-  "oldfieldname": "letter_head", 
-  "oldfieldtype": "Select", 
-  "options": "link:Letter Head", 
-  "print_hide": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "tc_name", 
-  "fieldtype": "Link", 
-  "label": "Terms", 
-  "oldfieldname": "tc_name", 
-  "oldfieldtype": "Link", 
-  "options": "Terms and Conditions", 
-  "print_hide": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "get_terms", 
-  "fieldtype": "Button", 
-  "label": "Get Terms and Conditions", 
-  "oldfieldtype": "Button"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "terms", 
-  "fieldtype": "Text Editor", 
-  "label": "Terms and Conditions", 
-  "oldfieldname": "terms", 
-  "oldfieldtype": "Text Editor"
- }, 
- {
-  "depends_on": "supplier", 
-  "doctype": "DocField", 
-  "fieldname": "contact_section", 
-  "fieldtype": "Section Break", 
-  "label": "Contact Info", 
-  "options": "icon-bullhorn"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "supplier_address", 
-  "fieldtype": "Link", 
-  "in_filter": 1, 
-  "label": "Supplier Address", 
-  "options": "Address", 
-  "print_hide": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "contact_person", 
-  "fieldtype": "Link", 
-  "in_filter": 1, 
-  "label": "Contact Person", 
-  "options": "Contact", 
-  "print_hide": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "more_info", 
-  "fieldtype": "Section Break", 
-  "label": "More Info", 
-  "oldfieldtype": "Section Break", 
-  "options": "icon-file-text"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "status", 
-  "fieldtype": "Select", 
-  "in_filter": 1, 
-  "label": "Status", 
-  "no_copy": 1, 
-  "oldfieldname": "status", 
-  "oldfieldtype": "Select", 
-  "options": "\nDraft\nSubmitted\nStopped\nCancelled", 
-  "print_hide": 1, 
-  "read_only": 1, 
-  "reqd": 1, 
-  "search_index": 1
- }, 
- {
-  "default": "No", 
-  "doctype": "DocField", 
-  "fieldname": "is_subcontracted", 
-  "fieldtype": "Select", 
-  "label": "Is Subcontracted", 
-  "options": "\nYes\nNo", 
-  "print_hide": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break_57", 
-  "fieldtype": "Column Break"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "fiscal_year", 
-  "fieldtype": "Select", 
-  "in_filter": 1, 
-  "label": "Fiscal Year", 
-  "no_copy": 0, 
-  "oldfieldname": "fiscal_year", 
-  "oldfieldtype": "Select", 
-  "options": "link:Fiscal Year", 
-  "print_hide": 1, 
-  "reqd": 1, 
-  "search_index": 1
- }, 
- {
-  "allow_on_submit": 1, 
-  "doctype": "DocField", 
-  "fieldname": "select_print_heading", 
-  "fieldtype": "Link", 
-  "label": "Print Heading", 
-  "no_copy": 1, 
-  "oldfieldname": "select_print_heading", 
-  "oldfieldtype": "Link", 
-  "options": "Print Heading", 
-  "print_hide": 1, 
-  "report_hide": 1
- }, 
- {
-  "amend": 1, 
-  "cancel": 1, 
-  "create": 1, 
-  "delete": 1, 
-  "doctype": "DocPerm", 
-  "role": "Manufacturing Manager", 
-  "submit": 1, 
-  "write": 1
- }, 
- {
-  "amend": 1, 
-  "cancel": 1, 
-  "create": 1, 
-  "delete": 1, 
-  "doctype": "DocPerm", 
-  "role": "Purchase Manager", 
-  "submit": 1, 
-  "write": 1
- }, 
- {
-  "amend": 1, 
-  "cancel": 0, 
-  "create": 1, 
-  "delete": 0, 
-  "doctype": "DocPerm", 
-  "role": "Purchase User", 
-  "submit": 0, 
-  "write": 1
- }, 
- {
-  "amend": 0, 
-  "cancel": 0, 
-  "create": 0, 
-  "delete": 0, 
-  "doctype": "DocPerm", 
-  "role": "Material User", 
-  "submit": 0, 
-  "write": 0
- }, 
- {
-  "amend": 0, 
-  "cancel": 0, 
-  "create": 0, 
-  "delete": 0, 
-  "doctype": "DocPerm", 
-  "role": "Supplier", 
-  "submit": 0, 
-  "write": 0
- }
-]
\ No newline at end of file
+{
+ "allow_attach": 1, 
+ "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", 
+   "permlevel": 0
+  }, 
+  {
+   "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, 
+   "search_index": 1
+  }, 
+  {
+   "fieldname": "supplier_name", 
+   "fieldtype": "Data", 
+   "hidden": 0, 
+   "in_list_view": 1, 
+   "label": "Name", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "address_display", 
+   "fieldtype": "Small Text", 
+   "hidden": 1, 
+   "label": "Address", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "contact_display", 
+   "fieldtype": "Small Text", 
+   "hidden": 1, 
+   "label": "Contact", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "contact_mobile", 
+   "fieldtype": "Text", 
+   "hidden": 1, 
+   "label": "Mobile No", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "contact_email", 
+   "fieldtype": "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%", 
+   "width": "50%"
+  }, 
+  {
+   "fieldname": "transaction_date", 
+   "fieldtype": "Date", 
+   "in_filter": 1, 
+   "label": "Quotation Date", 
+   "oldfieldname": "transaction_date", 
+   "oldfieldtype": "Date", 
+   "permlevel": 0, 
+   "reqd": 1, 
+   "search_index": 1
+  }, 
+  {
+   "fieldname": "amended_from", 
+   "fieldtype": "Data", 
+   "hidden": 1, 
+   "ignore_restrictions": 1, 
+   "label": "Amended From", 
+   "no_copy": 1, 
+   "oldfieldname": "amended_from", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1, 
+   "report_hide": 0
+  }, 
+  {
+   "description": "Select the relevant company name if you have multiple companies", 
+   "fieldname": "company", 
+   "fieldtype": "Link", 
+   "in_filter": 1, 
+   "label": "Company", 
+   "no_copy": 0, 
+   "oldfieldname": "company", 
+   "oldfieldtype": "Link", 
+   "options": "Company", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "reqd": 1, 
+   "search_index": 1
+  }, 
+  {
+   "fieldname": "currency_price_list", 
+   "fieldtype": "Section Break", 
+   "label": "Currency and Price List", 
+   "options": "icon-tag", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "currency", 
+   "fieldtype": "Link", 
+   "label": "Currency", 
+   "no_copy": 0, 
+   "oldfieldname": "currency", 
+   "oldfieldtype": "Select", 
+   "options": "Currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "reqd": 1
+  }, 
+  {
+   "description": "Rate at which supplier's currency is converted to company's base currency", 
+   "fieldname": "conversion_rate", 
+   "fieldtype": "Float", 
+   "hidden": 0, 
+   "label": "Exchange Rate", 
+   "no_copy": 1, 
+   "oldfieldname": "conversion_rate", 
+   "oldfieldtype": "Currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "reqd": 1
+  }, 
+  {
+   "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, 
+   "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, 
+   "print_hide": 1
+  }, 
+  {
+   "fieldname": "items", 
+   "fieldtype": "Section Break", 
+   "label": "Items", 
+   "oldfieldtype": "Section Break", 
+   "options": "icon-shopping-cart", 
+   "permlevel": 0
+  }, 
+  {
+   "allow_on_submit": 1, 
+   "fieldname": "quotation_items", 
+   "fieldtype": "Table", 
+   "label": "Quotation Items", 
+   "no_copy": 0, 
+   "oldfieldname": "po_details", 
+   "oldfieldtype": "Table", 
+   "options": "Supplier Quotation Item", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "section_break_22", 
+   "fieldtype": "Section Break", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "net_total_import", 
+   "fieldtype": "Currency", 
+   "label": "Net Total", 
+   "no_copy": 0, 
+   "oldfieldname": "net_total_import", 
+   "oldfieldtype": "Currency", 
+   "options": "currency", 
+   "permlevel": 0, 
+   "print_hide": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "column_break_24", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "net_total", 
+   "fieldtype": "Currency", 
+   "label": "Net Total (Company Currency)", 
+   "no_copy": 1, 
+   "oldfieldname": "net_total", 
+   "oldfieldtype": "Currency", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1, 
+   "reqd": 0
+  }, 
+  {
+   "fieldname": "taxes", 
+   "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, 
+   "print_hide": 1
+  }, 
+  {
+   "fieldname": "other_charges", 
+   "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, 
+   "print_hide": 1
+  }, 
+  {
+   "fieldname": "totals", 
+   "fieldtype": "Section Break", 
+   "label": "Totals", 
+   "oldfieldtype": "Section Break", 
+   "options": "icon-money", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "other_charges_added_import", 
+   "fieldtype": "Currency", 
+   "label": "Taxes and Charges Added", 
+   "no_copy": 0, 
+   "oldfieldname": "other_charges_added_import", 
+   "oldfieldtype": "Currency", 
+   "options": "currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1, 
+   "report_hide": 0
+  }, 
+  {
+   "fieldname": "other_charges_deducted_import", 
+   "fieldtype": "Currency", 
+   "label": "Taxes and Charges Deducted", 
+   "no_copy": 0, 
+   "oldfieldname": "other_charges_deducted_import", 
+   "oldfieldtype": "Currency", 
+   "options": "currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1, 
+   "report_hide": 0
+  }, 
+  {
+   "fieldname": "grand_total_import", 
+   "fieldtype": "Currency", 
+   "in_list_view": 1, 
+   "label": "Grand Total", 
+   "no_copy": 0, 
+   "oldfieldname": "grand_total_import", 
+   "oldfieldtype": "Currency", 
+   "options": "currency", 
+   "permlevel": 0, 
+   "print_hide": 0, 
+   "read_only": 1, 
+   "report_hide": 0
+  }, 
+  {
+   "fieldname": "in_words_import", 
+   "fieldtype": "Data", 
+   "label": "In Words", 
+   "oldfieldname": "in_words_import", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "print_hide": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "column_break4", 
+   "fieldtype": "Column Break", 
+   "oldfieldtype": "Column Break", 
+   "permlevel": 0, 
+   "print_hide": 0
+  }, 
+  {
+   "fieldname": "other_charges_added", 
+   "fieldtype": "Currency", 
+   "label": "Taxes and Charges Added (Company Currency)", 
+   "no_copy": 0, 
+   "oldfieldname": "other_charges_added", 
+   "oldfieldtype": "Currency", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "other_charges_deducted", 
+   "fieldtype": "Currency", 
+   "label": "Taxes and Charges Deducted (Company Currency)", 
+   "no_copy": 0, 
+   "oldfieldname": "other_charges_deducted", 
+   "oldfieldtype": "Currency", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "total_tax", 
+   "fieldtype": "Currency", 
+   "label": "Total Tax (Company Currency)", 
+   "no_copy": 1, 
+   "oldfieldname": "total_tax", 
+   "oldfieldtype": "Currency", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "grand_total", 
+   "fieldtype": "Currency", 
+   "label": "Grand Total (Company Currency)", 
+   "no_copy": 1, 
+   "oldfieldname": "grand_total", 
+   "oldfieldtype": "Currency", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "rounded_total", 
+   "fieldtype": "Currency", 
+   "label": "Rounded Total (Company Currency)", 
+   "oldfieldname": "rounded_total", 
+   "oldfieldtype": "Currency", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1
+  }, 
+  {
+   "description": "In Words will be visible once you save the Purchase Order.", 
+   "fieldname": "in_words", 
+   "fieldtype": "Data", 
+   "label": "In Words (Company Currency)", 
+   "oldfieldname": "in_words", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "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": "Select", 
+   "label": "Letter Head", 
+   "oldfieldname": "letter_head", 
+   "oldfieldtype": "Select", 
+   "options": "link: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, 
+   "print_hide": 1
+  }, 
+  {
+   "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", 
+   "permlevel": 0
+  }, 
+  {
+   "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, 
+   "print_hide": 1
+  }, 
+  {
+   "fieldname": "contact_person", 
+   "fieldtype": "Link", 
+   "in_filter": 1, 
+   "label": "Contact Person", 
+   "options": "Contact", 
+   "permlevel": 0, 
+   "print_hide": 1
+  }, 
+  {
+   "fieldname": "more_info", 
+   "fieldtype": "Section Break", 
+   "label": "More Info", 
+   "oldfieldtype": "Section Break", 
+   "options": "icon-file-text", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "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, 
+   "print_hide": 1
+  }, 
+  {
+   "fieldname": "column_break_57", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "fiscal_year", 
+   "fieldtype": "Select", 
+   "in_filter": 1, 
+   "label": "Fiscal Year", 
+   "no_copy": 0, 
+   "oldfieldname": "fiscal_year", 
+   "oldfieldtype": "Select", 
+   "options": "link: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, 
+   "report_hide": 1
+  }
+ ], 
+ "icon": "icon-shopping-cart", 
+ "idx": 1, 
+ "is_submittable": 1, 
+ "modified": "2014-01-29 15:25:52", 
+ "modified_by": "Administrator", 
+ "module": "Buying", 
+ "name": "Supplier Quotation", 
+ "owner": "Administrator", 
+ "permissions": [
+  {
+   "amend": 1, 
+   "cancel": 1, 
+   "create": 1, 
+   "delete": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Manufacturing Manager", 
+   "submit": 1, 
+   "write": 1
+  }, 
+  {
+   "amend": 1, 
+   "cancel": 1, 
+   "create": 1, 
+   "delete": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Purchase Manager", 
+   "submit": 1, 
+   "write": 1
+  }, 
+  {
+   "amend": 1, 
+   "cancel": 0, 
+   "create": 1, 
+   "delete": 0, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Purchase User", 
+   "submit": 0, 
+   "write": 1
+  }, 
+  {
+   "amend": 0, 
+   "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, 
+   "cancel": 0, 
+   "create": 0, 
+   "delete": 0, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Supplier", 
+   "submit": 0, 
+   "write": 0
+  }
+ ], 
+ "read_only_onload": 1, 
+ "search_fields": "status, transaction_date, supplier,grand_total"
+}
\ No newline at end of file
diff --git a/erpnext/buying/doctype/supplier_quotation_item/supplier_quotation_item.txt b/erpnext/buying/doctype/supplier_quotation_item/supplier_quotation_item.txt
index 18b9216..8ede81d 100644
--- a/erpnext/buying/doctype/supplier_quotation_item/supplier_quotation_item.txt
+++ b/erpnext/buying/doctype/supplier_quotation_item/supplier_quotation_item.txt
@@ -1,375 +1,362 @@
-[
- {
-  "creation": "2013-05-22 12:43:10", 
-  "docstatus": 0, 
-  "modified": "2014-02-28 11:25:38", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "autoname": "SQI-.#####", 
-  "doctype": "DocType", 
-  "istable": 1, 
-  "module": "Buying", 
-  "name": "__common__"
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "Supplier Quotation Item", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Supplier Quotation Item"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "item_code", 
-  "fieldtype": "Link", 
-  "in_filter": 1, 
-  "in_list_view": 1, 
-  "label": "Item Code", 
-  "oldfieldname": "item_code", 
-  "oldfieldtype": "Link", 
-  "options": "Item", 
-  "print_hide": 0, 
-  "read_only": 0, 
-  "reqd": 1, 
-  "search_index": 1
- }, 
- {
-  "description": "If Supplier Part Number exists for given Item, it gets stored here", 
-  "doctype": "DocField", 
-  "fieldname": "supplier_part_no", 
-  "fieldtype": "Data", 
-  "hidden": 1, 
-  "in_list_view": 0, 
-  "label": "Supplier Part Number", 
-  "print_hide": 1, 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "item_name", 
-  "fieldtype": "Data", 
-  "hidden": 0, 
-  "in_filter": 1, 
-  "in_list_view": 0, 
-  "label": "Item Name", 
-  "oldfieldname": "item_name", 
-  "oldfieldtype": "Data", 
-  "print_hide": 1, 
-  "read_only": 0, 
-  "reqd": 1, 
-  "search_index": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "col_break1", 
-  "fieldtype": "Column Break"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "description", 
-  "fieldtype": "Small Text", 
-  "in_list_view": 1, 
-  "label": "Description", 
-  "oldfieldname": "description", 
-  "oldfieldtype": "Small Text", 
-  "print_width": "300px", 
-  "read_only": 0, 
-  "reqd": 1, 
-  "width": "300px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "quantity_and_rate", 
-  "fieldtype": "Section Break", 
-  "in_list_view": 0, 
-  "label": "Quantity and Rate"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "qty", 
-  "fieldtype": "Float", 
-  "in_list_view": 1, 
-  "label": "Quantity", 
-  "oldfieldname": "qty", 
-  "oldfieldtype": "Currency", 
-  "print_width": "60px", 
-  "read_only": 0, 
-  "reqd": 1, 
-  "width": "60px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "price_list_rate", 
-  "fieldtype": "Currency", 
-  "in_list_view": 0, 
-  "label": "Price List Rate", 
-  "options": "currency", 
-  "print_hide": 1, 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "discount_percentage", 
-  "fieldtype": "Float", 
-  "in_list_view": 0, 
-  "label": "Discount %", 
-  "print_hide": 0, 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "col_break2", 
-  "fieldtype": "Column Break"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "uom", 
-  "fieldtype": "Link", 
-  "in_list_view": 0, 
-  "label": "UOM", 
-  "oldfieldname": "uom", 
-  "oldfieldtype": "Link", 
-  "options": "UOM", 
-  "print_hide": 0, 
-  "print_width": "100px", 
-  "read_only": 0, 
-  "reqd": 1, 
-  "width": "100px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "base_price_list_rate", 
-  "fieldtype": "Currency", 
-  "in_list_view": 0, 
-  "label": "Price List Rate (Company Currency)", 
-  "options": "Company:company:default_currency", 
-  "print_hide": 1, 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "sec_break1", 
-  "fieldtype": "Section Break"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "rate", 
-  "fieldtype": "Currency", 
-  "hidden": 0, 
-  "in_list_view": 1, 
-  "label": "Rate ", 
-  "oldfieldname": "import_rate", 
-  "oldfieldtype": "Currency", 
-  "options": "currency", 
-  "print_hide": 0, 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "amount", 
-  "fieldtype": "Currency", 
-  "in_list_view": 1, 
-  "label": "Amount", 
-  "oldfieldname": "import_amount", 
-  "oldfieldtype": "Currency", 
-  "options": "currency", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "col_break3", 
-  "fieldtype": "Column Break"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "base_rate", 
-  "fieldtype": "Currency", 
-  "in_list_view": 0, 
-  "label": "Rate (Company Currency)", 
-  "oldfieldname": "purchase_rate", 
-  "oldfieldtype": "Currency", 
-  "options": "Company:company:default_currency", 
-  "print_hide": 1, 
-  "print_width": "100px", 
-  "read_only": 1, 
-  "reqd": 1, 
-  "width": "100px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "base_amount", 
-  "fieldtype": "Currency", 
-  "in_list_view": 0, 
-  "label": "Amount (Company Currency)", 
-  "oldfieldname": "amount", 
-  "oldfieldtype": "Currency", 
-  "options": "Company:company:default_currency", 
-  "print_hide": 1, 
-  "read_only": 1, 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "pricing_rule_for_price", 
-  "fieldtype": "Link", 
-  "label": "Pricing Rule For Price", 
-  "options": "Pricing Rule", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "pricing_rule_for_discount", 
-  "fieldtype": "Link", 
-  "label": "Pricing Rule For Discount", 
-  "options": "Pricing Rule", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "warehouse_and_reference", 
-  "fieldtype": "Section Break", 
-  "in_list_view": 0, 
-  "label": "Warehouse and Reference"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "warehouse", 
-  "fieldtype": "Link", 
-  "hidden": 0, 
-  "in_list_view": 0, 
-  "label": "Warehouse", 
-  "oldfieldname": "warehouse", 
-  "oldfieldtype": "Link", 
-  "options": "Warehouse", 
-  "print_hide": 1, 
-  "read_only": 0, 
-  "reqd": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "project_name", 
-  "fieldtype": "Link", 
-  "in_filter": 1, 
-  "in_list_view": 0, 
-  "label": "Project Name", 
-  "options": "Project", 
-  "print_hide": 1, 
-  "read_only": 0, 
-  "report_hide": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "prevdoc_doctype", 
-  "fieldtype": "Data", 
-  "hidden": 1, 
-  "in_list_view": 0, 
-  "label": "Prevdoc DocType", 
-  "no_copy": 1, 
-  "oldfieldname": "prevdoc_doctype", 
-  "oldfieldtype": "Data", 
-  "print_hide": 1, 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "prevdoc_docname", 
-  "fieldtype": "Link", 
-  "hidden": 0, 
-  "in_filter": 1, 
-  "in_list_view": 0, 
-  "label": "Material Request No", 
-  "no_copy": 1, 
-  "oldfieldname": "prevdoc_docname", 
-  "oldfieldtype": "Link", 
-  "options": "Material Request", 
-  "print_hide": 1, 
-  "print_width": "120px", 
-  "read_only": 1, 
-  "search_index": 1, 
-  "width": "120px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "col_break4", 
-  "fieldtype": "Column Break"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "prevdoc_detail_docname", 
-  "fieldtype": "Data", 
-  "hidden": 1, 
-  "in_filter": 1, 
-  "in_list_view": 0, 
-  "label": "Material Request Detail No", 
-  "no_copy": 1, 
-  "oldfieldname": "prevdoc_detail_docname", 
-  "oldfieldtype": "Data", 
-  "print_hide": 1, 
-  "read_only": 1, 
-  "search_index": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "brand", 
-  "fieldtype": "Link", 
-  "hidden": 0, 
-  "in_list_view": 0, 
-  "label": "Brand", 
-  "oldfieldname": "brand", 
-  "oldfieldtype": "Link", 
-  "options": "Brand", 
-  "print_hide": 1, 
-  "read_only": 1
- }, 
- {
-  "description": "<a href=\"#Sales Browser/Item Group\">Add / Edit</a>", 
-  "doctype": "DocField", 
-  "fieldname": "item_group", 
-  "fieldtype": "Link", 
-  "hidden": 0, 
-  "in_filter": 1, 
-  "in_list_view": 0, 
-  "label": "Item Group", 
-  "oldfieldname": "item_group", 
-  "oldfieldtype": "Link", 
-  "options": "Item Group", 
-  "print_hide": 1, 
-  "read_only": 1, 
-  "search_index": 0
- }, 
- {
-  "description": "Tax detail table fetched from item master as a string and stored in this field.\nUsed for Taxes and Charges", 
-  "doctype": "DocField", 
-  "fieldname": "item_tax_rate", 
-  "fieldtype": "Small Text", 
-  "hidden": 1, 
-  "in_list_view": 0, 
-  "label": "Item Tax Rate", 
-  "oldfieldname": "item_tax_rate", 
-  "oldfieldtype": "Small Text", 
-  "print_hide": 1, 
-  "read_only": 1, 
-  "report_hide": 1
- }, 
- {
-  "allow_on_submit": 1, 
-  "doctype": "DocField", 
-  "fieldname": "page_break", 
-  "fieldtype": "Check", 
-  "hidden": 0, 
-  "in_list_view": 0, 
-  "label": "Page Break", 
-  "no_copy": 1, 
-  "oldfieldname": "page_break", 
-  "oldfieldtype": "Check", 
-  "print_hide": 1, 
-  "read_only": 0
- }
-]
\ No newline at end of file
+{
+ "autoname": "SQI-.#####", 
+ "creation": "2013-05-22 12:43:10", 
+ "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_hide": 0, 
+   "read_only": 0, 
+   "reqd": 1, 
+   "search_index": 1
+  }, 
+  {
+   "description": "If Supplier Part Number exists for given Item, it gets stored here", 
+   "fieldname": "supplier_part_no", 
+   "fieldtype": "Data", 
+   "hidden": 1, 
+   "in_list_view": 0, 
+   "label": "Supplier Part Number", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "item_name", 
+   "fieldtype": "Data", 
+   "hidden": 0, 
+   "in_filter": 1, 
+   "in_list_view": 0, 
+   "label": "Item Name", 
+   "oldfieldname": "item_name", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0, 
+   "reqd": 1, 
+   "search_index": 1
+  }, 
+  {
+   "fieldname": "col_break1", 
+   "fieldtype": "Column Break", 
+   "permlevel": 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": "quantity_and_rate", 
+   "fieldtype": "Section Break", 
+   "in_list_view": 0, 
+   "label": "Quantity and Rate", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "qty", 
+   "fieldtype": "Float", 
+   "in_list_view": 1, 
+   "label": "Quantity", 
+   "oldfieldname": "qty", 
+   "oldfieldtype": "Currency", 
+   "permlevel": 0, 
+   "print_width": "60px", 
+   "read_only": 0, 
+   "reqd": 1, 
+   "width": "60px"
+  }, 
+  {
+   "fieldname": "price_list_rate", 
+   "fieldtype": "Currency", 
+   "in_list_view": 0, 
+   "label": "Price List Rate", 
+   "options": "currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "discount_percentage", 
+   "fieldtype": "Float", 
+   "in_list_view": 0, 
+   "label": "Discount %", 
+   "permlevel": 0, 
+   "print_hide": 0, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "col_break2", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "uom", 
+   "fieldtype": "Link", 
+   "in_list_view": 0, 
+   "label": "UOM", 
+   "oldfieldname": "uom", 
+   "oldfieldtype": "Link", 
+   "options": "UOM", 
+   "permlevel": 0, 
+   "print_hide": 0, 
+   "print_width": "100px", 
+   "read_only": 0, 
+   "reqd": 1, 
+   "width": "100px"
+  }, 
+  {
+   "fieldname": "base_price_list_rate", 
+   "fieldtype": "Currency", 
+   "in_list_view": 0, 
+   "label": "Price List Rate (Company Currency)", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "sec_break1", 
+   "fieldtype": "Section Break", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "rate", 
+   "fieldtype": "Currency", 
+   "hidden": 0, 
+   "in_list_view": 1, 
+   "label": "Rate ", 
+   "oldfieldname": "import_rate", 
+   "oldfieldtype": "Currency", 
+   "options": "currency", 
+   "permlevel": 0, 
+   "print_hide": 0, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "amount", 
+   "fieldtype": "Currency", 
+   "in_list_view": 1, 
+   "label": "Amount", 
+   "oldfieldname": "import_amount", 
+   "oldfieldtype": "Currency", 
+   "options": "currency", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "col_break3", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "base_rate", 
+   "fieldtype": "Currency", 
+   "in_list_view": 0, 
+   "label": "Rate (Company Currency)", 
+   "oldfieldname": "purchase_rate", 
+   "oldfieldtype": "Currency", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "print_width": "100px", 
+   "read_only": 1, 
+   "reqd": 1, 
+   "width": "100px"
+  }, 
+  {
+   "fieldname": "base_amount", 
+   "fieldtype": "Currency", 
+   "in_list_view": 0, 
+   "label": "Amount (Company Currency)", 
+   "oldfieldname": "amount", 
+   "oldfieldtype": "Currency", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "pricing_rule_for_price", 
+   "fieldtype": "Link", 
+   "label": "Pricing Rule For Price", 
+   "options": "Pricing Rule", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "pricing_rule_for_discount", 
+   "fieldtype": "Link", 
+   "label": "Pricing Rule For Discount", 
+   "options": "Pricing Rule", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "warehouse_and_reference", 
+   "fieldtype": "Section Break", 
+   "in_list_view": 0, 
+   "label": "Warehouse and Reference", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "warehouse", 
+   "fieldtype": "Link", 
+   "hidden": 0, 
+   "in_list_view": 0, 
+   "label": "Warehouse", 
+   "oldfieldname": "warehouse", 
+   "oldfieldtype": "Link", 
+   "options": "Warehouse", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0, 
+   "reqd": 0
+  }, 
+  {
+   "fieldname": "project_name", 
+   "fieldtype": "Link", 
+   "in_filter": 1, 
+   "in_list_view": 0, 
+   "label": "Project Name", 
+   "options": "Project", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0, 
+   "report_hide": 0
+  }, 
+  {
+   "fieldname": "prevdoc_doctype", 
+   "fieldtype": "Data", 
+   "hidden": 1, 
+   "in_list_view": 0, 
+   "label": "Prevdoc DocType", 
+   "no_copy": 1, 
+   "oldfieldname": "prevdoc_doctype", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "prevdoc_docname", 
+   "fieldtype": "Link", 
+   "hidden": 0, 
+   "in_filter": 1, 
+   "in_list_view": 0, 
+   "label": "Material Request No", 
+   "no_copy": 1, 
+   "oldfieldname": "prevdoc_docname", 
+   "oldfieldtype": "Link", 
+   "options": "Material Request", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "print_width": "120px", 
+   "read_only": 1, 
+   "search_index": 1, 
+   "width": "120px"
+  }, 
+  {
+   "fieldname": "col_break4", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "prevdoc_detail_docname", 
+   "fieldtype": "Data", 
+   "hidden": 1, 
+   "in_filter": 1, 
+   "in_list_view": 0, 
+   "label": "Material Request Detail No", 
+   "no_copy": 1, 
+   "oldfieldname": "prevdoc_detail_docname", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1, 
+   "search_index": 1
+  }, 
+  {
+   "fieldname": "brand", 
+   "fieldtype": "Link", 
+   "hidden": 0, 
+   "in_list_view": 0, 
+   "label": "Brand", 
+   "oldfieldname": "brand", 
+   "oldfieldtype": "Link", 
+   "options": "Brand", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1
+  }, 
+  {
+   "description": "<a href=\"#Sales Browser/Item Group\">Add / Edit</a>", 
+   "fieldname": "item_group", 
+   "fieldtype": "Link", 
+   "hidden": 0, 
+   "in_filter": 1, 
+   "in_list_view": 0, 
+   "label": "Item Group", 
+   "oldfieldname": "item_group", 
+   "oldfieldtype": "Link", 
+   "options": "Item Group", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1, 
+   "search_index": 0
+  }, 
+  {
+   "description": "Tax detail table fetched from item master as a string and stored in this field.\nUsed for Taxes and Charges", 
+   "fieldname": "item_tax_rate", 
+   "fieldtype": "Small Text", 
+   "hidden": 1, 
+   "in_list_view": 0, 
+   "label": "Item Tax Rate", 
+   "oldfieldname": "item_tax_rate", 
+   "oldfieldtype": "Small Text", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1, 
+   "report_hide": 1
+  }, 
+  {
+   "allow_on_submit": 1, 
+   "fieldname": "page_break", 
+   "fieldtype": "Check", 
+   "hidden": 0, 
+   "in_list_view": 0, 
+   "label": "Page Break", 
+   "no_copy": 1, 
+   "oldfieldname": "page_break", 
+   "oldfieldtype": "Check", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0
+  }
+ ], 
+ "idx": 1, 
+ "istable": 1, 
+ "modified": "2014-02-28 11:25:38", 
+ "modified_by": "Administrator", 
+ "module": "Buying", 
+ "name": "Supplier Quotation Item", 
+ "owner": "Administrator"
+}
\ No newline at end of file
diff --git a/erpnext/buying/page/purchase_analytics/purchase_analytics.txt b/erpnext/buying/page/purchase_analytics/purchase_analytics.txt
index 34ba8e1..1bf216e 100644
--- a/erpnext/buying/page/purchase_analytics/purchase_analytics.txt
+++ b/erpnext/buying/page/purchase_analytics/purchase_analytics.txt
@@ -1,37 +1,23 @@
-[
- {
-  "creation": "2012-09-21 20:15:16", 
-  "docstatus": 0, 
-  "modified": "2013-07-11 14:43:52", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "doctype": "Page", 
-  "icon": "icon-bar-chart", 
-  "module": "Buying", 
-  "name": "__common__", 
-  "page_name": "purchase-analytics", 
-  "standard": "Yes", 
-  "title": "Purchase Analytics"
- }, 
- {
-  "doctype": "Page Role", 
-  "name": "__common__", 
-  "parent": "purchase-analytics", 
-  "parentfield": "roles", 
-  "parenttype": "Page"
- }, 
- {
-  "doctype": "Page", 
-  "name": "purchase-analytics"
- }, 
- {
-  "doctype": "Page Role", 
-  "role": "Analytics"
- }, 
- {
-  "doctype": "Page Role", 
-  "role": "Purchase Manager"
- }
-]
\ No newline at end of file
+{
+ "creation": "2012-09-21 20:15:16", 
+ "docstatus": 0, 
+ "doctype": "Page", 
+ "icon": "icon-bar-chart", 
+ "idx": 1, 
+ "modified": "2013-07-11 14:43:52", 
+ "modified_by": "Administrator", 
+ "module": "Buying", 
+ "name": "purchase-analytics", 
+ "owner": "Administrator", 
+ "page_name": "purchase-analytics", 
+ "roles": [
+  {
+   "role": "Analytics"
+  }, 
+  {
+   "role": "Purchase Manager"
+  }
+ ], 
+ "standard": "Yes", 
+ "title": "Purchase Analytics"
+}
\ No newline at end of file
diff --git a/erpnext/buying/report/item_wise_purchase_history/item_wise_purchase_history.txt b/erpnext/buying/report/item_wise_purchase_history/item_wise_purchase_history.txt
index 1995990..59b28eb 100644
--- a/erpnext/buying/report/item_wise_purchase_history/item_wise_purchase_history.txt
+++ b/erpnext/buying/report/item_wise_purchase_history/item_wise_purchase_history.txt
@@ -1,24 +1,17 @@
-[
- {
-  "creation": "2013-05-03 14:55:53", 
-  "docstatus": 0, 
-  "modified": "2014-03-07 15:30:27", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "add_total_row": 1, 
-  "doctype": "Report", 
-  "is_standard": "Yes", 
-  "module": "Buying", 
-  "name": "__common__", 
-  "query": "select\n    po_item.item_code as \"Item Code:Link/Item:120\",\n\tpo_item.item_name as \"Item Name::120\",\n\tpo_item.description as \"Description::150\",\n\tpo_item.qty as \"Qty:Float:100\",\n\tpo_item.stock_uom as \"UOM:Link/UOM:80\",\n\tpo_item.base_rate as \"Rate:Currency:120\",\n\tpo_item.base_amount as \"Amount:Currency:120\",\n\tpo.name as \"Purchase Order:Link/Purchase Order:120\",\n\tpo.transaction_date as \"Transaction Date:Date:140\",\n\tpo.supplier as \"Supplier:Link/Supplier:130\",\n\tpo_item.project_name as \"Project:Link/Project:130\",\n\tifnull(po_item.received_qty, 0) as \"Received Qty:Float:120\"\nfrom\n\t`tabPurchase Order` po, `tabPurchase Order Item` po_item\nwhere\n\tpo.name = po_item.parent and po.docstatus = 1\norder by po.name desc", 
-  "ref_doctype": "Purchase Order", 
-  "report_name": "Item-wise Purchase History", 
-  "report_type": "Query Report"
- }, 
- {
-  "doctype": "Report", 
-  "name": "Item-wise Purchase History"
- }
-]
\ No newline at end of file
+{
+ "add_total_row": 1, 
+ "creation": "2013-05-03 14:55:53", 
+ "docstatus": 0, 
+ "doctype": "Report", 
+ "idx": 1, 
+ "is_standard": "Yes", 
+ "modified": "2014-03-07 15:30:27", 
+ "modified_by": "Administrator", 
+ "module": "Buying", 
+ "name": "Item-wise Purchase History", 
+ "owner": "Administrator", 
+ "query": "select\n    po_item.item_code as \"Item Code:Link/Item:120\",\n\tpo_item.item_name as \"Item Name::120\",\n\tpo_item.description as \"Description::150\",\n\tpo_item.qty as \"Qty:Float:100\",\n\tpo_item.stock_uom as \"UOM:Link/UOM:80\",\n\tpo_item.base_rate as \"Rate:Currency:120\",\n\tpo_item.base_amount as \"Amount:Currency:120\",\n\tpo.name as \"Purchase Order:Link/Purchase Order:120\",\n\tpo.transaction_date as \"Transaction Date:Date:140\",\n\tpo.supplier as \"Supplier:Link/Supplier:130\",\n\tpo_item.project_name as \"Project:Link/Project:130\",\n\tifnull(po_item.received_qty, 0) as \"Received Qty:Float:120\"\nfrom\n\t`tabPurchase Order` po, `tabPurchase Order Item` po_item\nwhere\n\tpo.name = po_item.parent and po.docstatus = 1\norder by po.name desc", 
+ "ref_doctype": "Purchase Order", 
+ "report_name": "Item-wise Purchase History", 
+ "report_type": "Query Report"
+}
\ No newline at end of file
diff --git a/erpnext/buying/report/purchase_order_trends/purchase_order_trends.txt b/erpnext/buying/report/purchase_order_trends/purchase_order_trends.txt
index 683279f..57eccc2 100644
--- a/erpnext/buying/report/purchase_order_trends/purchase_order_trends.txt
+++ b/erpnext/buying/report/purchase_order_trends/purchase_order_trends.txt
@@ -1,22 +1,15 @@
-[
- {
-  "creation": "2013-06-13 18:45:01", 
-  "docstatus": 0, 
-  "modified": "2014-03-07 15:30:27", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "doctype": "Report", 
-  "is_standard": "Yes", 
-  "module": "Buying", 
-  "name": "__common__", 
-  "ref_doctype": "Purchase Order", 
-  "report_name": "Purchase Order Trends", 
-  "report_type": "Script Report"
- }, 
- {
-  "doctype": "Report", 
-  "name": "Purchase Order Trends"
- }
-]
\ No newline at end of file
+{
+ "creation": "2013-06-13 18:45:01", 
+ "docstatus": 0, 
+ "doctype": "Report", 
+ "idx": 1, 
+ "is_standard": "Yes", 
+ "modified": "2014-03-07 15:30:27", 
+ "modified_by": "Administrator", 
+ "module": "Buying", 
+ "name": "Purchase Order Trends", 
+ "owner": "Administrator", 
+ "ref_doctype": "Purchase Order", 
+ "report_name": "Purchase Order Trends", 
+ "report_type": "Script Report"
+}
\ No newline at end of file
diff --git a/erpnext/buying/report/requested_items_to_be_ordered/requested_items_to_be_ordered.txt b/erpnext/buying/report/requested_items_to_be_ordered/requested_items_to_be_ordered.txt
index c3e91ae..11cd432 100644
--- a/erpnext/buying/report/requested_items_to_be_ordered/requested_items_to_be_ordered.txt
+++ b/erpnext/buying/report/requested_items_to_be_ordered/requested_items_to_be_ordered.txt
@@ -1,24 +1,17 @@
-[
- {
-  "creation": "2013-05-13 16:10:02", 
-  "docstatus": 0, 
-  "modified": "2014-03-07 15:30:27", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "add_total_row": 1, 
-  "doctype": "Report", 
-  "is_standard": "Yes", 
-  "module": "Buying", 
-  "name": "__common__", 
-  "query": "select \n    mr.name as \"Material Request:Link/Material Request:120\",\n\tmr.transaction_date as \"Date:Date:100\",\n\tmr_item.item_code as \"Item Code:Link/Item:120\",\n\tsum(ifnull(mr_item.qty, 0)) as \"Qty:Float:100\",\n\tsum(ifnull(mr_item.ordered_qty, 0)) as \"Ordered Qty:Float:100\", \n\t(sum(mr_item.qty) - sum(ifnull(mr_item.ordered_qty, 0))) as \"Qty to Order:Float:100\",\n\tmr_item.item_name as \"Item Name::150\",\n\tmr_item.description as \"Description::200\"\nfrom\n\t`tabMaterial Request` mr, `tabMaterial Request Item` mr_item\nwhere\n\tmr_item.parent = mr.name\n\tand mr.material_request_type = \"Purchase\"\n\tand mr.docstatus = 1\n\tand mr.status != \"Stopped\"\ngroup by mr.name, mr_item.item_code\nhaving\n\tsum(ifnull(mr_item.ordered_qty, 0)) < sum(ifnull(mr_item.qty, 0))\norder by mr.transaction_date asc", 
-  "ref_doctype": "Purchase Order", 
-  "report_name": "Requested Items To Be Ordered", 
-  "report_type": "Query Report"
- }, 
- {
-  "doctype": "Report", 
-  "name": "Requested Items To Be Ordered"
- }
-]
\ No newline at end of file
+{
+ "add_total_row": 1, 
+ "creation": "2013-05-13 16:10:02", 
+ "docstatus": 0, 
+ "doctype": "Report", 
+ "idx": 1, 
+ "is_standard": "Yes", 
+ "modified": "2014-03-07 15:30:27", 
+ "modified_by": "Administrator", 
+ "module": "Buying", 
+ "name": "Requested Items To Be Ordered", 
+ "owner": "Administrator", 
+ "query": "select \n    mr.name as \"Material Request:Link/Material Request:120\",\n\tmr.transaction_date as \"Date:Date:100\",\n\tmr_item.item_code as \"Item Code:Link/Item:120\",\n\tsum(ifnull(mr_item.qty, 0)) as \"Qty:Float:100\",\n\tsum(ifnull(mr_item.ordered_qty, 0)) as \"Ordered Qty:Float:100\", \n\t(sum(mr_item.qty) - sum(ifnull(mr_item.ordered_qty, 0))) as \"Qty to Order:Float:100\",\n\tmr_item.item_name as \"Item Name::150\",\n\tmr_item.description as \"Description::200\"\nfrom\n\t`tabMaterial Request` mr, `tabMaterial Request Item` mr_item\nwhere\n\tmr_item.parent = mr.name\n\tand mr.material_request_type = \"Purchase\"\n\tand mr.docstatus = 1\n\tand mr.status != \"Stopped\"\ngroup by mr.name, mr_item.item_code\nhaving\n\tsum(ifnull(mr_item.ordered_qty, 0)) < sum(ifnull(mr_item.qty, 0))\norder by mr.transaction_date asc", 
+ "ref_doctype": "Purchase Order", 
+ "report_name": "Requested Items To Be Ordered", 
+ "report_type": "Query Report"
+}
\ No newline at end of file
diff --git a/erpnext/buying/report/supplier_addresses_and_contacts/supplier_addresses_and_contacts.txt b/erpnext/buying/report/supplier_addresses_and_contacts/supplier_addresses_and_contacts.txt
index 25c11e7..e2a62b4 100644
--- a/erpnext/buying/report/supplier_addresses_and_contacts/supplier_addresses_and_contacts.txt
+++ b/erpnext/buying/report/supplier_addresses_and_contacts/supplier_addresses_and_contacts.txt
@@ -1,23 +1,16 @@
-[
- {
-  "creation": "2013-10-09 10:38:40", 
-  "docstatus": 0, 
-  "modified": "2014-03-07 15:30:27", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "doctype": "Report", 
-  "is_standard": "Yes", 
-  "module": "Buying", 
-  "name": "__common__", 
-  "query": "SELECT\n    `tabSupplier`.name as \"Supplier:Link/Supplier:120\",\n\t`tabSupplier`.supplier_name as \"Supplier Name::120\",\n\t`tabSupplier`.supplier_type as \"Supplier Type:Link/Supplier Type:120\",\n\tconcat_ws(', ', \n\t\ttrim(',' from `tabAddress`.address_line1), \n\t\ttrim(',' from tabAddress.address_line2), \n\t\ttabAddress.state, tabAddress.pincode, tabAddress.country\n\t) as 'Address::180',\n    concat_ws(', ', `tabContact`.first_name, `tabContact`.last_name) as 'Contact Name::180',\n\t`tabContact`.phone as \"Phone\",\n\t`tabContact`.mobile_no as \"Mobile No\",\n\t`tabContact`.email_id as \"Email Id::120\",\n\t`tabContact`.is_primary_contact as \"Is Primary Contact::120\"\nFROM\n\t`tabSupplier`\n\tleft join `tabAddress` on (\n\t\t`tabAddress`.supplier=`tabSupplier`.name\n\t)\n\tleft join `tabContact` on (\n\t\t`tabContact`.supplier=`tabSupplier`.name\n\t)\nWHERE\n\t`tabSupplier`.docstatus<2\nORDER BY\n\t`tabSupplier`.name asc", 
-  "ref_doctype": "Supplier", 
-  "report_name": "Supplier Addresses and Contacts", 
-  "report_type": "Query Report"
- }, 
- {
-  "doctype": "Report", 
-  "name": "Supplier Addresses and Contacts"
- }
-]
\ No newline at end of file
+{
+ "creation": "2013-10-09 10:38:40", 
+ "docstatus": 0, 
+ "doctype": "Report", 
+ "idx": 1, 
+ "is_standard": "Yes", 
+ "modified": "2014-03-07 15:30:27", 
+ "modified_by": "Administrator", 
+ "module": "Buying", 
+ "name": "Supplier Addresses and Contacts", 
+ "owner": "Administrator", 
+ "query": "SELECT\n    `tabSupplier`.name as \"Supplier:Link/Supplier:120\",\n\t`tabSupplier`.supplier_name as \"Supplier Name::120\",\n\t`tabSupplier`.supplier_type as \"Supplier Type:Link/Supplier Type:120\",\n\tconcat_ws(', ', \n\t\ttrim(',' from `tabAddress`.address_line1), \n\t\ttrim(',' from tabAddress.address_line2), \n\t\ttabAddress.state, tabAddress.pincode, tabAddress.country\n\t) as 'Address::180',\n    concat_ws(', ', `tabContact`.first_name, `tabContact`.last_name) as 'Contact Name::180',\n\t`tabContact`.phone as \"Phone\",\n\t`tabContact`.mobile_no as \"Mobile No\",\n\t`tabContact`.email_id as \"Email Id::120\",\n\t`tabContact`.is_primary_contact as \"Is Primary Contact::120\"\nFROM\n\t`tabSupplier`\n\tleft join `tabAddress` on (\n\t\t`tabAddress`.supplier=`tabSupplier`.name\n\t)\n\tleft join `tabContact` on (\n\t\t`tabContact`.supplier=`tabSupplier`.name\n\t)\nWHERE\n\t`tabSupplier`.docstatus<2\nORDER BY\n\t`tabSupplier`.name asc", 
+ "ref_doctype": "Supplier", 
+ "report_name": "Supplier Addresses and Contacts", 
+ "report_type": "Query Report"
+}
\ No newline at end of file
diff --git a/erpnext/home/doctype/feed/feed.txt b/erpnext/home/doctype/feed/feed.txt
index 8821b7d..725d941 100644
--- a/erpnext/home/doctype/feed/feed.txt
+++ b/erpnext/home/doctype/feed/feed.txt
@@ -1,80 +1,61 @@
-[
- {
-  "creation": "2012-07-03 13:29:42", 
-  "docstatus": 0, 
-  "modified": "2013-12-20 19:24:07", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "autoname": "_FEED.#####", 
-  "doctype": "DocType", 
-  "icon": "icon-rss", 
-  "module": "Home", 
-  "name": "__common__"
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "Feed", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "doctype": "DocPerm", 
-  "email": 1, 
-  "name": "__common__", 
-  "parent": "Feed", 
-  "parentfield": "permissions", 
-  "parenttype": "DocType", 
-  "permlevel": 0, 
-  "print": 1, 
-  "read": 1, 
-  "report": 1, 
-  "role": "System Manager"
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Feed"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "feed_type", 
-  "fieldtype": "Select", 
-  "label": "Feed Type"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "doc_type", 
-  "fieldtype": "Data", 
-  "label": "Doc Type"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "doc_name", 
-  "fieldtype": "Data", 
-  "label": "Doc Name"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "subject", 
-  "fieldtype": "Data", 
-  "label": "Subject"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "color", 
-  "fieldtype": "Data", 
-  "label": "Color"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "full_name", 
-  "fieldtype": "Data", 
-  "label": "Full Name"
- }, 
- {
-  "doctype": "DocPerm"
- }
-]
\ No newline at end of file
+{
+ "autoname": "_FEED.#####", 
+ "creation": "2012-07-03 13:29:42", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "fields": [
+  {
+   "fieldname": "feed_type", 
+   "fieldtype": "Select", 
+   "label": "Feed Type", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "doc_type", 
+   "fieldtype": "Data", 
+   "label": "Doc Type", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "doc_name", 
+   "fieldtype": "Data", 
+   "label": "Doc Name", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "subject", 
+   "fieldtype": "Data", 
+   "label": "Subject", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "color", 
+   "fieldtype": "Data", 
+   "label": "Color", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "full_name", 
+   "fieldtype": "Data", 
+   "label": "Full Name", 
+   "permlevel": 0
+  }
+ ], 
+ "icon": "icon-rss", 
+ "idx": 1, 
+ "modified": "2013-12-20 19:24:07", 
+ "modified_by": "Administrator", 
+ "module": "Home", 
+ "name": "Feed", 
+ "owner": "Administrator", 
+ "permissions": [
+  {
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "System Manager"
+  }
+ ]
+}
\ No newline at end of file
diff --git a/erpnext/home/page/activity/activity.txt b/erpnext/home/page/activity/activity.txt
index 7c9783d..8f967fd 100644
--- a/erpnext/home/page/activity/activity.txt
+++ b/erpnext/home/page/activity/activity.txt
@@ -1,33 +1,20 @@
-[
- {
-  "creation": "2013-04-09 11:45:31", 
-  "docstatus": 0, 
-  "modified": "2013-07-11 14:40:20", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "doctype": "Page", 
-  "icon": "icon-play", 
-  "module": "Home", 
-  "name": "__common__", 
-  "page_name": "activity", 
-  "standard": "Yes", 
-  "title": "Activity"
- }, 
- {
-  "doctype": "Page Role", 
-  "name": "__common__", 
-  "parent": "activity", 
-  "parentfield": "roles", 
-  "parenttype": "Page", 
-  "role": "All"
- }, 
- {
-  "doctype": "Page", 
-  "name": "activity"
- }, 
- {
-  "doctype": "Page Role"
- }
-]
\ No newline at end of file
+{
+ "creation": "2013-04-09 11:45:31", 
+ "docstatus": 0, 
+ "doctype": "Page", 
+ "icon": "icon-play", 
+ "idx": 1, 
+ "modified": "2013-07-11 14:40:20", 
+ "modified_by": "Administrator", 
+ "module": "Home", 
+ "name": "activity", 
+ "owner": "Administrator", 
+ "page_name": "activity", 
+ "roles": [
+  {
+   "role": "All"
+  }
+ ], 
+ "standard": "Yes", 
+ "title": "Activity"
+}
\ No newline at end of file
diff --git a/erpnext/hr/doctype/appraisal/appraisal.txt b/erpnext/hr/doctype/appraisal/appraisal.txt
index da57097..fc63bca 100644
--- a/erpnext/hr/doctype/appraisal/appraisal.txt
+++ b/erpnext/hr/doctype/appraisal/appraisal.txt
@@ -1,256 +1,249 @@
-[
- {
-  "creation": "2013-01-10 16:34:12", 
-  "docstatus": 0, 
-  "modified": "2014-01-22 16:05:34", 
-  "modified_by": "Administrator", 
-  "owner": "ashwini@webnotestech.com"
- }, 
- {
-  "autoname": "APRSL.#####", 
-  "doctype": "DocType", 
-  "icon": "icon-thumbs-up", 
-  "is_submittable": 1, 
-  "module": "HR", 
-  "name": "__common__", 
-  "search_fields": "status, employee, employee_name"
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "Appraisal", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "create": 1, 
-  "doctype": "DocPerm", 
-  "email": 1, 
-  "name": "__common__", 
-  "parent": "Appraisal", 
-  "parentfield": "permissions", 
-  "parenttype": "DocType", 
-  "permlevel": 0, 
-  "print": 1, 
-  "read": 1, 
-  "report": 1, 
-  "write": 1
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Appraisal"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "employee_details", 
-  "fieldtype": "Section Break", 
-  "label": "Employee Details", 
-  "oldfieldtype": "Section Break"
- }, 
- {
-  "description": "Select template from which you want to get the Goals", 
-  "doctype": "DocField", 
-  "fieldname": "kra_template", 
-  "fieldtype": "Link", 
-  "label": "Appraisal Template", 
-  "oldfieldname": "kra_template", 
-  "oldfieldtype": "Link", 
-  "options": "Appraisal Template", 
-  "reqd": 1
- }, 
- {
-  "depends_on": "kra_template", 
-  "description": "Select the Employee for whom you are creating the Appraisal.", 
-  "doctype": "DocField", 
-  "fieldname": "employee", 
-  "fieldtype": "Link", 
-  "in_filter": 1, 
-  "label": "For Employee", 
-  "oldfieldname": "employee", 
-  "oldfieldtype": "Link", 
-  "options": "Employee", 
-  "reqd": 1, 
-  "search_index": 1
- }, 
- {
-  "depends_on": "kra_template", 
-  "doctype": "DocField", 
-  "fieldname": "employee_name", 
-  "fieldtype": "Data", 
-  "in_filter": 1, 
-  "in_list_view": 1, 
-  "label": "For Employee Name", 
-  "oldfieldname": "employee_name", 
-  "oldfieldtype": "Data", 
-  "read_only": 1
- }, 
- {
-  "depends_on": "kra_template", 
-  "doctype": "DocField", 
-  "fieldname": "column_break0", 
-  "fieldtype": "Column Break", 
-  "oldfieldtype": "Column Break", 
-  "width": "50%"
- }, 
- {
-  "default": "Draft", 
-  "depends_on": "kra_template", 
-  "doctype": "DocField", 
-  "fieldname": "status", 
-  "fieldtype": "Select", 
-  "in_filter": 1, 
-  "in_list_view": 1, 
-  "label": "Status", 
-  "no_copy": 1, 
-  "oldfieldname": "status", 
-  "oldfieldtype": "Select", 
-  "options": "\nDraft\nSubmitted\nCompleted\nCancelled", 
-  "read_only": 1, 
-  "reqd": 1, 
-  "search_index": 1
- }, 
- {
-  "depends_on": "kra_template", 
-  "doctype": "DocField", 
-  "fieldname": "start_date", 
-  "fieldtype": "Date", 
-  "in_filter": 1, 
-  "in_list_view": 1, 
-  "label": "Start Date", 
-  "oldfieldname": "start_date", 
-  "oldfieldtype": "Date", 
-  "reqd": 1
- }, 
- {
-  "depends_on": "kra_template", 
-  "doctype": "DocField", 
-  "fieldname": "end_date", 
-  "fieldtype": "Date", 
-  "in_filter": 1, 
-  "label": "End Date", 
-  "oldfieldname": "end_date", 
-  "oldfieldtype": "Date", 
-  "reqd": 1
- }, 
- {
-  "depends_on": "kra_template", 
-  "doctype": "DocField", 
-  "fieldname": "section_break0", 
-  "fieldtype": "Section Break", 
-  "label": "Goals", 
-  "oldfieldtype": "Section Break", 
-  "options": "Simple"
- }, 
- {
-  "allow_on_submit": 0, 
-  "doctype": "DocField", 
-  "fieldname": "appraisal_details", 
-  "fieldtype": "Table", 
-  "label": "Appraisal Goals", 
-  "oldfieldname": "appraisal_details", 
-  "oldfieldtype": "Table", 
-  "options": "Appraisal Goal"
- }, 
- {
-  "allow_on_submit": 0, 
-  "doctype": "DocField", 
-  "fieldname": "calculate_total_score", 
-  "fieldtype": "Button", 
-  "label": "Calculate Total Score", 
-  "oldfieldtype": "Button", 
-  "options": "calculate_total"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "total_score", 
-  "fieldtype": "Float", 
-  "in_list_view": 1, 
-  "label": "Total Score (Out of 5)", 
-  "no_copy": 1, 
-  "oldfieldname": "total_score", 
-  "oldfieldtype": "Currency", 
-  "read_only": 1
- }, 
- {
-  "depends_on": "kra_template", 
-  "doctype": "DocField", 
-  "fieldname": "section_break1", 
-  "fieldtype": "Section Break"
- }, 
- {
-  "description": "Any other comments, noteworthy effort that should go in the records.", 
-  "doctype": "DocField", 
-  "fieldname": "comments", 
-  "fieldtype": "Text", 
-  "label": "Comments"
- }, 
- {
-  "depends_on": "kra_template", 
-  "doctype": "DocField", 
-  "fieldname": "other_details", 
-  "fieldtype": "Section Break", 
-  "label": "Other Details"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "company", 
-  "fieldtype": "Select", 
-  "in_filter": 1, 
-  "label": "Company", 
-  "oldfieldname": "company", 
-  "oldfieldtype": "Link", 
-  "options": "link:Company", 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "fiscal_year", 
-  "fieldtype": "Select", 
-  "in_filter": 1, 
-  "label": "Fiscal Year", 
-  "oldfieldname": "fiscal_year", 
-  "oldfieldtype": "Select", 
-  "options": "link:Fiscal Year", 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "amended_from", 
-  "fieldtype": "Data", 
-  "hidden": 1, 
-  "ignore_restrictions": 1, 
-  "label": "Amended From", 
-  "no_copy": 1, 
-  "oldfieldname": "amended_from", 
-  "oldfieldtype": "Data", 
-  "print_hide": 1, 
-  "read_only": 1, 
-  "report_hide": 1, 
-  "width": "150px"
- }, 
- {
-  "cancel": 0, 
-  "delete": 0, 
-  "doctype": "DocPerm", 
-  "restricted": 1, 
-  "role": "Employee", 
-  "submit": 0
- }, 
- {
-  "amend": 1, 
-  "cancel": 1, 
-  "delete": 1, 
-  "doctype": "DocPerm", 
-  "role": "System Manager", 
-  "submit": 1
- }, 
- {
-  "amend": 1, 
-  "cancel": 1, 
-  "delete": 1, 
-  "doctype": "DocPerm", 
-  "role": "HR User", 
-  "submit": 1
- }
-]
\ No newline at end of file
+{
+ "autoname": "APRSL.#####", 
+ "creation": "2013-01-10 16:34:12", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "fields": [
+  {
+   "fieldname": "employee_details", 
+   "fieldtype": "Section Break", 
+   "label": "Employee Details", 
+   "oldfieldtype": "Section Break", 
+   "permlevel": 0
+  }, 
+  {
+   "description": "Select template from which you want to get the Goals", 
+   "fieldname": "kra_template", 
+   "fieldtype": "Link", 
+   "label": "Appraisal Template", 
+   "oldfieldname": "kra_template", 
+   "oldfieldtype": "Link", 
+   "options": "Appraisal Template", 
+   "permlevel": 0, 
+   "reqd": 1
+  }, 
+  {
+   "depends_on": "kra_template", 
+   "description": "Select the Employee for whom you are creating the Appraisal.", 
+   "fieldname": "employee", 
+   "fieldtype": "Link", 
+   "in_filter": 1, 
+   "label": "For Employee", 
+   "oldfieldname": "employee", 
+   "oldfieldtype": "Link", 
+   "options": "Employee", 
+   "permlevel": 0, 
+   "reqd": 1, 
+   "search_index": 1
+  }, 
+  {
+   "depends_on": "kra_template", 
+   "fieldname": "employee_name", 
+   "fieldtype": "Data", 
+   "in_filter": 1, 
+   "in_list_view": 1, 
+   "label": "For Employee Name", 
+   "oldfieldname": "employee_name", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "depends_on": "kra_template", 
+   "fieldname": "column_break0", 
+   "fieldtype": "Column Break", 
+   "oldfieldtype": "Column Break", 
+   "permlevel": 0, 
+   "width": "50%"
+  }, 
+  {
+   "default": "Draft", 
+   "depends_on": "kra_template", 
+   "fieldname": "status", 
+   "fieldtype": "Select", 
+   "in_filter": 1, 
+   "in_list_view": 1, 
+   "label": "Status", 
+   "no_copy": 1, 
+   "oldfieldname": "status", 
+   "oldfieldtype": "Select", 
+   "options": "\nDraft\nSubmitted\nCompleted\nCancelled", 
+   "permlevel": 0, 
+   "read_only": 1, 
+   "reqd": 1, 
+   "search_index": 1
+  }, 
+  {
+   "depends_on": "kra_template", 
+   "fieldname": "start_date", 
+   "fieldtype": "Date", 
+   "in_filter": 1, 
+   "in_list_view": 1, 
+   "label": "Start Date", 
+   "oldfieldname": "start_date", 
+   "oldfieldtype": "Date", 
+   "permlevel": 0, 
+   "reqd": 1
+  }, 
+  {
+   "depends_on": "kra_template", 
+   "fieldname": "end_date", 
+   "fieldtype": "Date", 
+   "in_filter": 1, 
+   "label": "End Date", 
+   "oldfieldname": "end_date", 
+   "oldfieldtype": "Date", 
+   "permlevel": 0, 
+   "reqd": 1
+  }, 
+  {
+   "depends_on": "kra_template", 
+   "fieldname": "section_break0", 
+   "fieldtype": "Section Break", 
+   "label": "Goals", 
+   "oldfieldtype": "Section Break", 
+   "options": "Simple", 
+   "permlevel": 0
+  }, 
+  {
+   "allow_on_submit": 0, 
+   "fieldname": "appraisal_details", 
+   "fieldtype": "Table", 
+   "label": "Appraisal Goals", 
+   "oldfieldname": "appraisal_details", 
+   "oldfieldtype": "Table", 
+   "options": "Appraisal Goal", 
+   "permlevel": 0
+  }, 
+  {
+   "allow_on_submit": 0, 
+   "fieldname": "calculate_total_score", 
+   "fieldtype": "Button", 
+   "label": "Calculate Total Score", 
+   "oldfieldtype": "Button", 
+   "options": "calculate_total", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "total_score", 
+   "fieldtype": "Float", 
+   "in_list_view": 1, 
+   "label": "Total Score (Out of 5)", 
+   "no_copy": 1, 
+   "oldfieldname": "total_score", 
+   "oldfieldtype": "Currency", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "depends_on": "kra_template", 
+   "fieldname": "section_break1", 
+   "fieldtype": "Section Break", 
+   "permlevel": 0
+  }, 
+  {
+   "description": "Any other comments, noteworthy effort that should go in the records.", 
+   "fieldname": "comments", 
+   "fieldtype": "Text", 
+   "label": "Comments", 
+   "permlevel": 0
+  }, 
+  {
+   "depends_on": "kra_template", 
+   "fieldname": "other_details", 
+   "fieldtype": "Section Break", 
+   "label": "Other Details", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "company", 
+   "fieldtype": "Select", 
+   "in_filter": 1, 
+   "label": "Company", 
+   "oldfieldname": "company", 
+   "oldfieldtype": "Link", 
+   "options": "link:Company", 
+   "permlevel": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "fiscal_year", 
+   "fieldtype": "Select", 
+   "in_filter": 1, 
+   "label": "Fiscal Year", 
+   "oldfieldname": "fiscal_year", 
+   "oldfieldtype": "Select", 
+   "options": "link:Fiscal Year", 
+   "permlevel": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "amended_from", 
+   "fieldtype": "Data", 
+   "hidden": 1, 
+   "ignore_restrictions": 1, 
+   "label": "Amended From", 
+   "no_copy": 1, 
+   "oldfieldname": "amended_from", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1, 
+   "report_hide": 1, 
+   "width": "150px"
+  }
+ ], 
+ "icon": "icon-thumbs-up", 
+ "idx": 1, 
+ "is_submittable": 1, 
+ "modified": "2014-01-22 16:05:34", 
+ "modified_by": "Administrator", 
+ "module": "HR", 
+ "name": "Appraisal", 
+ "owner": "ashwini@webnotestech.com", 
+ "permissions": [
+  {
+   "cancel": 0, 
+   "create": 1, 
+   "delete": 0, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "restricted": 1, 
+   "role": "Employee", 
+   "submit": 0, 
+   "write": 1
+  }, 
+  {
+   "amend": 1, 
+   "cancel": 1, 
+   "create": 1, 
+   "delete": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "System Manager", 
+   "submit": 1, 
+   "write": 1
+  }, 
+  {
+   "amend": 1, 
+   "cancel": 1, 
+   "create": 1, 
+   "delete": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "HR User", 
+   "submit": 1, 
+   "write": 1
+  }
+ ], 
+ "search_fields": "status, employee, employee_name"
+}
\ No newline at end of file
diff --git a/erpnext/hr/doctype/appraisal_goal/appraisal_goal.txt b/erpnext/hr/doctype/appraisal_goal/appraisal_goal.txt
index 5c15ac6..f075f76 100644
--- a/erpnext/hr/doctype/appraisal_goal/appraisal_goal.txt
+++ b/erpnext/hr/doctype/appraisal_goal/appraisal_goal.txt
@@ -1,77 +1,67 @@
-[
- {
-  "creation": "2013-02-22 01:27:44", 
-  "docstatus": 0, 
-  "modified": "2013-12-20 19:22:53", 
-  "modified_by": "Administrator", 
-  "owner": "ashwini@webnotestech.com"
- }, 
- {
-  "autoname": "APRSLD.#####", 
-  "doctype": "DocType", 
-  "istable": 1, 
-  "module": "HR", 
-  "name": "__common__"
- }, 
- {
-  "doctype": "DocField", 
-  "in_list_view": 1, 
-  "name": "__common__", 
-  "parent": "Appraisal Goal", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Appraisal Goal"
- }, 
- {
-  "description": "Key Responsibility Area", 
-  "doctype": "DocField", 
-  "fieldname": "kra", 
-  "fieldtype": "Small Text", 
-  "label": "Goal", 
-  "oldfieldname": "kra", 
-  "oldfieldtype": "Small Text", 
-  "print_width": "240px", 
-  "reqd": 1, 
-  "width": "240px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "per_weightage", 
-  "fieldtype": "Float", 
-  "label": "Weightage (%)", 
-  "oldfieldname": "per_weightage", 
-  "oldfieldtype": "Currency", 
-  "print_width": "70px", 
-  "reqd": 1, 
-  "width": "70px"
- }, 
- {
-  "allow_on_submit": 1, 
-  "doctype": "DocField", 
-  "fieldname": "score", 
-  "fieldtype": "Float", 
-  "label": "Score (0-5)", 
-  "no_copy": 1, 
-  "oldfieldname": "score", 
-  "oldfieldtype": "Select", 
-  "options": "\n0\n1\n2\n3\n4\n5", 
-  "print_width": "70px", 
-  "width": "70px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "score_earned", 
-  "fieldtype": "Float", 
-  "label": "Score Earned", 
-  "no_copy": 1, 
-  "oldfieldname": "score_earned", 
-  "oldfieldtype": "Currency", 
-  "print_width": "70px", 
-  "read_only": 1, 
-  "width": "70px"
- }
-]
\ No newline at end of file
+{
+ "autoname": "APRSLD.#####", 
+ "creation": "2013-02-22 01:27:44", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "fields": [
+  {
+   "description": "Key Responsibility Area", 
+   "fieldname": "kra", 
+   "fieldtype": "Small Text", 
+   "in_list_view": 1, 
+   "label": "Goal", 
+   "oldfieldname": "kra", 
+   "oldfieldtype": "Small Text", 
+   "permlevel": 0, 
+   "print_width": "240px", 
+   "reqd": 1, 
+   "width": "240px"
+  }, 
+  {
+   "fieldname": "per_weightage", 
+   "fieldtype": "Float", 
+   "in_list_view": 1, 
+   "label": "Weightage (%)", 
+   "oldfieldname": "per_weightage", 
+   "oldfieldtype": "Currency", 
+   "permlevel": 0, 
+   "print_width": "70px", 
+   "reqd": 1, 
+   "width": "70px"
+  }, 
+  {
+   "allow_on_submit": 1, 
+   "fieldname": "score", 
+   "fieldtype": "Float", 
+   "in_list_view": 1, 
+   "label": "Score (0-5)", 
+   "no_copy": 1, 
+   "oldfieldname": "score", 
+   "oldfieldtype": "Select", 
+   "options": "\n0\n1\n2\n3\n4\n5", 
+   "permlevel": 0, 
+   "print_width": "70px", 
+   "width": "70px"
+  }, 
+  {
+   "fieldname": "score_earned", 
+   "fieldtype": "Float", 
+   "in_list_view": 1, 
+   "label": "Score Earned", 
+   "no_copy": 1, 
+   "oldfieldname": "score_earned", 
+   "oldfieldtype": "Currency", 
+   "permlevel": 0, 
+   "print_width": "70px", 
+   "read_only": 1, 
+   "width": "70px"
+  }
+ ], 
+ "idx": 1, 
+ "istable": 1, 
+ "modified": "2013-12-20 19:22:53", 
+ "modified_by": "Administrator", 
+ "module": "HR", 
+ "name": "Appraisal Goal", 
+ "owner": "ashwini@webnotestech.com"
+}
\ No newline at end of file
diff --git a/erpnext/hr/doctype/appraisal_template/appraisal_template.txt b/erpnext/hr/doctype/appraisal_template/appraisal_template.txt
index ff887c4..5b543cf 100644
--- a/erpnext/hr/doctype/appraisal_template/appraisal_template.txt
+++ b/erpnext/hr/doctype/appraisal_template/appraisal_template.txt
@@ -1,82 +1,63 @@
-[
- {
-  "creation": "2012-07-03 13:30:39", 
-  "docstatus": 0, 
-  "modified": "2013-12-20 19:23:55", 
-  "modified_by": "Administrator", 
-  "owner": "ashwini@webnotestech.com"
- }, 
- {
-  "allow_import": 1, 
-  "autoname": "field:kra_title", 
-  "doctype": "DocType", 
-  "document_type": "Master", 
-  "icon": "icon-file-text", 
-  "module": "HR", 
-  "name": "__common__"
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "Appraisal Template", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "create": 1, 
-  "doctype": "DocPerm", 
-  "email": 1, 
-  "name": "__common__", 
-  "parent": "Appraisal Template", 
-  "parentfield": "permissions", 
-  "parenttype": "DocType", 
-  "permlevel": 0, 
-  "print": 1, 
-  "read": 1, 
-  "report": 1, 
-  "role": "HR User", 
-  "write": 1
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Appraisal Template"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "kra_title", 
-  "fieldtype": "Data", 
-  "label": "Appraisal Template Title", 
-  "oldfieldname": "kra_title", 
-  "oldfieldtype": "Data", 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "description", 
-  "fieldtype": "Small Text", 
-  "label": "Description", 
-  "oldfieldname": "description", 
-  "oldfieldtype": "Small Text", 
-  "print_width": "300px", 
-  "width": "300px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "kra_sheet", 
-  "fieldtype": "Table", 
-  "label": "Appraisal Template Goal", 
-  "oldfieldname": "kra_sheet", 
-  "oldfieldtype": "Table", 
-  "options": "Appraisal Template Goal"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "total_points", 
-  "fieldtype": "Int", 
-  "label": "Total Points"
- }, 
- {
-  "doctype": "DocPerm"
- }
-]
\ No newline at end of file
+{
+ "allow_import": 1, 
+ "autoname": "field:kra_title", 
+ "creation": "2012-07-03 13:30:39", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "document_type": "Master", 
+ "fields": [
+  {
+   "fieldname": "kra_title", 
+   "fieldtype": "Data", 
+   "label": "Appraisal Template Title", 
+   "oldfieldname": "kra_title", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "description", 
+   "fieldtype": "Small Text", 
+   "label": "Description", 
+   "oldfieldname": "description", 
+   "oldfieldtype": "Small Text", 
+   "permlevel": 0, 
+   "print_width": "300px", 
+   "width": "300px"
+  }, 
+  {
+   "fieldname": "kra_sheet", 
+   "fieldtype": "Table", 
+   "label": "Appraisal Template Goal", 
+   "oldfieldname": "kra_sheet", 
+   "oldfieldtype": "Table", 
+   "options": "Appraisal Template Goal", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "total_points", 
+   "fieldtype": "Int", 
+   "label": "Total Points", 
+   "permlevel": 0
+  }
+ ], 
+ "icon": "icon-file-text", 
+ "idx": 1, 
+ "modified": "2013-12-20 19:23:55", 
+ "modified_by": "Administrator", 
+ "module": "HR", 
+ "name": "Appraisal Template", 
+ "owner": "ashwini@webnotestech.com", 
+ "permissions": [
+  {
+   "create": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "HR User", 
+   "write": 1
+  }
+ ]
+}
\ No newline at end of file
diff --git a/erpnext/hr/doctype/appraisal_template_goal/appraisal_template_goal.txt b/erpnext/hr/doctype/appraisal_template_goal/appraisal_template_goal.txt
index 0657f64..70e4d9f 100644
--- a/erpnext/hr/doctype/appraisal_template_goal/appraisal_template_goal.txt
+++ b/erpnext/hr/doctype/appraisal_template_goal/appraisal_template_goal.txt
@@ -1,51 +1,40 @@
-[
- {
-  "creation": "2013-02-22 01:27:44", 
-  "docstatus": 0, 
-  "modified": "2013-12-20 19:22:54", 
-  "modified_by": "Administrator", 
-  "owner": "ashwini@webnotestech.com"
- }, 
- {
-  "autoname": "KSHEET.#####", 
-  "doctype": "DocType", 
-  "istable": 1, 
-  "module": "HR", 
-  "name": "__common__"
- }, 
- {
-  "doctype": "DocField", 
-  "in_list_view": 1, 
-  "name": "__common__", 
-  "parent": "Appraisal Template Goal", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0, 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Appraisal Template Goal"
- }, 
- {
-  "description": "Key Performance Area", 
-  "doctype": "DocField", 
-  "fieldname": "kra", 
-  "fieldtype": "Small Text", 
-  "label": "KRA", 
-  "oldfieldname": "kra", 
-  "oldfieldtype": "Small Text", 
-  "print_width": "200px", 
-  "width": "200px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "per_weightage", 
-  "fieldtype": "Float", 
-  "label": "Weightage (%)", 
-  "oldfieldname": "per_weightage", 
-  "oldfieldtype": "Currency", 
-  "print_width": "100px", 
-  "width": "100px"
- }
-]
\ No newline at end of file
+{
+ "autoname": "KSHEET.#####", 
+ "creation": "2013-02-22 01:27:44", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "fields": [
+  {
+   "description": "Key Performance Area", 
+   "fieldname": "kra", 
+   "fieldtype": "Small Text", 
+   "in_list_view": 1, 
+   "label": "KRA", 
+   "oldfieldname": "kra", 
+   "oldfieldtype": "Small Text", 
+   "permlevel": 0, 
+   "print_width": "200px", 
+   "reqd": 1, 
+   "width": "200px"
+  }, 
+  {
+   "fieldname": "per_weightage", 
+   "fieldtype": "Float", 
+   "in_list_view": 1, 
+   "label": "Weightage (%)", 
+   "oldfieldname": "per_weightage", 
+   "oldfieldtype": "Currency", 
+   "permlevel": 0, 
+   "print_width": "100px", 
+   "reqd": 1, 
+   "width": "100px"
+  }
+ ], 
+ "idx": 1, 
+ "istable": 1, 
+ "modified": "2013-12-20 19:22:54", 
+ "modified_by": "Administrator", 
+ "module": "HR", 
+ "name": "Appraisal Template Goal", 
+ "owner": "ashwini@webnotestech.com"
+}
\ No newline at end of file
diff --git a/erpnext/hr/doctype/attendance/attendance.txt b/erpnext/hr/doctype/attendance/attendance.txt
index 894e981..952dcfe 100644
--- a/erpnext/hr/doctype/attendance/attendance.txt
+++ b/erpnext/hr/doctype/attendance/attendance.txt
@@ -1,180 +1,179 @@
-[
- {
-  "creation": "2013-01-10 16:34:13", 
-  "docstatus": 0, 
-  "modified": "2014-01-20 17:48:23", 
-  "modified_by": "Administrator", 
-  "owner": "ashwini@webnotestech.com"
- }, 
- {
-  "allow_import": 1, 
-  "autoname": "naming_series:", 
-  "doctype": "DocType", 
-  "document_type": "Master", 
-  "icon": "icon-ok", 
-  "is_submittable": 1, 
-  "module": "HR", 
-  "name": "__common__", 
-  "search_fields": "employee, employee_name, att_date, status"
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "Attendance", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "cancel": 1, 
-  "create": 1, 
-  "delete": 1, 
-  "doctype": "DocPerm", 
-  "email": 1, 
-  "name": "__common__", 
-  "parent": "Attendance", 
-  "parentfield": "permissions", 
-  "parenttype": "DocType", 
-  "permlevel": 0, 
-  "print": 1, 
-  "read": 1, 
-  "report": 1, 
-  "submit": 1, 
-  "write": 1
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Attendance"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "attendance_details", 
-  "fieldtype": "Section Break", 
-  "label": "Attendance Details", 
-  "oldfieldtype": "Section Break", 
-  "options": "Simple"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "naming_series", 
-  "fieldtype": "Select", 
-  "label": "Series", 
-  "no_copy": 1, 
-  "oldfieldname": "naming_series", 
-  "oldfieldtype": "Select", 
-  "options": "ATT", 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "employee", 
-  "fieldtype": "Link", 
-  "in_filter": 1, 
-  "label": "Employee", 
-  "oldfieldname": "employee", 
-  "oldfieldtype": "Link", 
-  "options": "Employee", 
-  "reqd": 1, 
-  "search_index": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "employee_name", 
-  "fieldtype": "Data", 
-  "in_list_view": 1, 
-  "label": "Employee Name", 
-  "oldfieldname": "employee_name", 
-  "oldfieldtype": "Data"
- }, 
- {
-  "default": "Present", 
-  "doctype": "DocField", 
-  "fieldname": "status", 
-  "fieldtype": "Select", 
-  "in_filter": 1, 
-  "in_list_view": 1, 
-  "label": "Status", 
-  "no_copy": 1, 
-  "oldfieldname": "status", 
-  "oldfieldtype": "Select", 
-  "options": "\nPresent\nAbsent\nHalf Day", 
-  "reqd": 1, 
-  "search_index": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "leave_type", 
-  "fieldtype": "Link", 
-  "hidden": 1, 
-  "in_list_view": 1, 
-  "label": "Leave Type", 
-  "oldfieldname": "leave_type", 
-  "oldfieldtype": "Link", 
-  "options": "Leave Type", 
-  "print_hide": 1, 
-  "report_hide": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break0", 
-  "fieldtype": "Column Break", 
-  "oldfieldtype": "Column Break", 
-  "width": "50%"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "att_date", 
-  "fieldtype": "Date", 
-  "in_filter": 1, 
-  "label": "Attendance Date", 
-  "oldfieldname": "att_date", 
-  "oldfieldtype": "Date", 
-  "reqd": 1, 
-  "search_index": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "fiscal_year", 
-  "fieldtype": "Select", 
-  "in_filter": 1, 
-  "label": "Fiscal Year", 
-  "oldfieldname": "fiscal_year", 
-  "oldfieldtype": "Select", 
-  "options": "link:Fiscal Year", 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "company", 
-  "fieldtype": "Select", 
-  "in_filter": 1, 
-  "label": "Company", 
-  "oldfieldname": "company", 
-  "oldfieldtype": "Link", 
-  "options": "link:Company", 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "amended_from", 
-  "fieldtype": "Link", 
-  "ignore_restrictions": 1, 
-  "label": "Amended From", 
-  "no_copy": 1, 
-  "options": "Attendance", 
-  "print_hide": 1, 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocPerm", 
-  "role": "System Manager"
- }, 
- {
-  "doctype": "DocPerm", 
-  "role": "HR User"
- }, 
- {
-  "doctype": "DocPerm", 
-  "role": "HR Manager"
- }
-]
\ No newline at end of file
+{
+ "allow_import": 1, 
+ "autoname": "naming_series:", 
+ "creation": "2013-01-10 16:34:13", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "document_type": "Master", 
+ "fields": [
+  {
+   "fieldname": "attendance_details", 
+   "fieldtype": "Section Break", 
+   "label": "Attendance Details", 
+   "oldfieldtype": "Section Break", 
+   "options": "Simple", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "naming_series", 
+   "fieldtype": "Select", 
+   "label": "Series", 
+   "no_copy": 1, 
+   "oldfieldname": "naming_series", 
+   "oldfieldtype": "Select", 
+   "options": "ATT", 
+   "permlevel": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "employee", 
+   "fieldtype": "Link", 
+   "in_filter": 1, 
+   "label": "Employee", 
+   "oldfieldname": "employee", 
+   "oldfieldtype": "Link", 
+   "options": "Employee", 
+   "permlevel": 0, 
+   "reqd": 1, 
+   "search_index": 1
+  }, 
+  {
+   "fieldname": "employee_name", 
+   "fieldtype": "Data", 
+   "in_list_view": 1, 
+   "label": "Employee Name", 
+   "oldfieldname": "employee_name", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0
+  }, 
+  {
+   "default": "Present", 
+   "fieldname": "status", 
+   "fieldtype": "Select", 
+   "in_filter": 1, 
+   "in_list_view": 1, 
+   "label": "Status", 
+   "no_copy": 1, 
+   "oldfieldname": "status", 
+   "oldfieldtype": "Select", 
+   "options": "\nPresent\nAbsent\nHalf Day", 
+   "permlevel": 0, 
+   "reqd": 1, 
+   "search_index": 1
+  }, 
+  {
+   "fieldname": "leave_type", 
+   "fieldtype": "Link", 
+   "hidden": 1, 
+   "in_list_view": 1, 
+   "label": "Leave Type", 
+   "oldfieldname": "leave_type", 
+   "oldfieldtype": "Link", 
+   "options": "Leave Type", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "report_hide": 1
+  }, 
+  {
+   "fieldname": "column_break0", 
+   "fieldtype": "Column Break", 
+   "oldfieldtype": "Column Break", 
+   "permlevel": 0, 
+   "width": "50%"
+  }, 
+  {
+   "fieldname": "att_date", 
+   "fieldtype": "Date", 
+   "in_filter": 1, 
+   "label": "Attendance Date", 
+   "oldfieldname": "att_date", 
+   "oldfieldtype": "Date", 
+   "permlevel": 0, 
+   "reqd": 1, 
+   "search_index": 0
+  }, 
+  {
+   "fieldname": "fiscal_year", 
+   "fieldtype": "Select", 
+   "in_filter": 1, 
+   "label": "Fiscal Year", 
+   "oldfieldname": "fiscal_year", 
+   "oldfieldtype": "Select", 
+   "options": "link:Fiscal Year", 
+   "permlevel": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "company", 
+   "fieldtype": "Select", 
+   "in_filter": 1, 
+   "label": "Company", 
+   "oldfieldname": "company", 
+   "oldfieldtype": "Link", 
+   "options": "link:Company", 
+   "permlevel": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "amended_from", 
+   "fieldtype": "Link", 
+   "ignore_restrictions": 1, 
+   "label": "Amended From", 
+   "no_copy": 1, 
+   "options": "Attendance", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1
+  }
+ ], 
+ "icon": "icon-ok", 
+ "idx": 1, 
+ "is_submittable": 1, 
+ "modified": "2014-01-20 17:48:23", 
+ "modified_by": "Administrator", 
+ "module": "HR", 
+ "name": "Attendance", 
+ "owner": "ashwini@webnotestech.com", 
+ "permissions": [
+  {
+   "cancel": 1, 
+   "create": 1, 
+   "delete": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "System Manager", 
+   "submit": 1, 
+   "write": 1
+  }, 
+  {
+   "cancel": 1, 
+   "create": 1, 
+   "delete": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "HR User", 
+   "submit": 1, 
+   "write": 1
+  }, 
+  {
+   "cancel": 1, 
+   "create": 1, 
+   "delete": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "HR Manager", 
+   "submit": 1, 
+   "write": 1
+  }
+ ], 
+ "search_fields": "employee, employee_name, att_date, status"
+}
\ No newline at end of file
diff --git a/erpnext/hr/doctype/branch/branch.txt b/erpnext/hr/doctype/branch/branch.txt
index 6ef13e2..f4cc5d0 100644
--- a/erpnext/hr/doctype/branch/branch.txt
+++ b/erpnext/hr/doctype/branch/branch.txt
@@ -1,74 +1,64 @@
-[
- {
-  "creation": "2013-01-10 16:34:13", 
-  "docstatus": 0, 
-  "modified": "2014-01-20 17:48:26", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "allow_import": 1, 
-  "allow_rename": 1, 
-  "autoname": "field:branch", 
-  "doctype": "DocType", 
-  "document_type": "Master", 
-  "icon": "icon-code-fork", 
-  "module": "HR", 
-  "name": "__common__"
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "Branch", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "cancel": 0, 
-  "create": 1, 
-  "delete": 1, 
-  "doctype": "DocPerm", 
-  "email": 1, 
-  "name": "__common__", 
-  "parent": "Branch", 
-  "parentfield": "permissions", 
-  "parenttype": "DocType", 
-  "permlevel": 0, 
-  "print": 1, 
-  "read": 1, 
-  "report": 1, 
-  "submit": 0, 
-  "write": 1
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Branch"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "trash_reason", 
-  "fieldtype": "Small Text", 
-  "label": "Trash Reason", 
-  "oldfieldname": "trash_reason", 
-  "oldfieldtype": "Small Text", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "branch", 
-  "fieldtype": "Data", 
-  "label": "Branch", 
-  "oldfieldname": "branch", 
-  "oldfieldtype": "Data", 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocPerm", 
-  "role": "HR User"
- }, 
- {
-  "doctype": "DocPerm", 
-  "role": "HR Manager"
- }
-]
\ No newline at end of file
+{
+ "allow_import": 1, 
+ "allow_rename": 1, 
+ "autoname": "field:branch", 
+ "creation": "2013-01-10 16:34:13", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "document_type": "Master", 
+ "fields": [
+  {
+   "fieldname": "trash_reason", 
+   "fieldtype": "Small Text", 
+   "label": "Trash Reason", 
+   "oldfieldname": "trash_reason", 
+   "oldfieldtype": "Small Text", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "branch", 
+   "fieldtype": "Data", 
+   "label": "Branch", 
+   "oldfieldname": "branch", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "reqd": 1
+  }
+ ], 
+ "icon": "icon-code-fork", 
+ "idx": 1, 
+ "modified": "2014-01-20 17:48:26", 
+ "modified_by": "Administrator", 
+ "module": "HR", 
+ "name": "Branch", 
+ "owner": "Administrator", 
+ "permissions": [
+  {
+   "cancel": 0, 
+   "create": 1, 
+   "delete": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "HR User", 
+   "submit": 0, 
+   "write": 1
+  }, 
+  {
+   "cancel": 0, 
+   "create": 1, 
+   "delete": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "HR Manager", 
+   "submit": 0, 
+   "write": 1
+  }
+ ]
+}
\ No newline at end of file
diff --git a/erpnext/hr/doctype/deduction_type/deduction_type.txt b/erpnext/hr/doctype/deduction_type/deduction_type.txt
index b70cf35..af93bcd 100644
--- a/erpnext/hr/doctype/deduction_type/deduction_type.txt
+++ b/erpnext/hr/doctype/deduction_type/deduction_type.txt
@@ -1,79 +1,60 @@
-[
- {
-  "creation": "2013-01-22 16:50:30", 
-  "docstatus": 0, 
-  "modified": "2014-01-20 17:48:34", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "allow_import": 1, 
-  "allow_rename": 1, 
-  "autoname": "field:deduction_name", 
-  "doctype": "DocType", 
-  "document_type": "Master", 
-  "icon": "icon-flag", 
-  "module": "HR", 
-  "name": "__common__"
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "Deduction Type", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "cancel": 0, 
-  "create": 1, 
-  "delete": 1, 
-  "doctype": "DocPerm", 
-  "email": 1, 
-  "name": "__common__", 
-  "parent": "Deduction Type", 
-  "parentfield": "permissions", 
-  "parenttype": "DocType", 
-  "permlevel": 0, 
-  "print": 1, 
-  "read": 1, 
-  "report": 1, 
-  "role": "HR User", 
-  "submit": 0, 
-  "write": 1
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Deduction Type"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "trash_reason", 
-  "fieldtype": "Small Text", 
-  "label": "Trash Reason", 
-  "oldfieldname": "trash_reason", 
-  "oldfieldtype": "Small Text", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "deduction_name", 
-  "fieldtype": "Data", 
-  "label": "Name", 
-  "oldfieldname": "deduction_name", 
-  "oldfieldtype": "Data", 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "description", 
-  "fieldtype": "Small Text", 
-  "label": "Description", 
-  "oldfieldname": "description", 
-  "oldfieldtype": "Small Text", 
-  "width": "300px"
- }, 
- {
-  "doctype": "DocPerm"
- }
-]
\ No newline at end of file
+{
+ "allow_import": 1, 
+ "allow_rename": 1, 
+ "autoname": "field:deduction_name", 
+ "creation": "2013-01-22 16:50:30", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "document_type": "Master", 
+ "fields": [
+  {
+   "fieldname": "trash_reason", 
+   "fieldtype": "Small Text", 
+   "label": "Trash Reason", 
+   "oldfieldname": "trash_reason", 
+   "oldfieldtype": "Small Text", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "deduction_name", 
+   "fieldtype": "Data", 
+   "label": "Name", 
+   "oldfieldname": "deduction_name", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "description", 
+   "fieldtype": "Small Text", 
+   "label": "Description", 
+   "oldfieldname": "description", 
+   "oldfieldtype": "Small Text", 
+   "permlevel": 0, 
+   "width": "300px"
+  }
+ ], 
+ "icon": "icon-flag", 
+ "idx": 1, 
+ "modified": "2014-01-20 17:48:34", 
+ "modified_by": "Administrator", 
+ "module": "HR", 
+ "name": "Deduction Type", 
+ "owner": "Administrator", 
+ "permissions": [
+  {
+   "cancel": 0, 
+   "create": 1, 
+   "delete": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "HR User", 
+   "submit": 0, 
+   "write": 1
+  }
+ ]
+}
\ No newline at end of file
diff --git a/erpnext/hr/doctype/department/department.txt b/erpnext/hr/doctype/department/department.txt
index 269afa7..3e43d7d 100644
--- a/erpnext/hr/doctype/department/department.txt
+++ b/erpnext/hr/doctype/department/department.txt
@@ -1,77 +1,58 @@
-[
- {
-  "creation": "2013-02-05 11:48:26", 
-  "docstatus": 0, 
-  "modified": "2014-01-20 17:48:38", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "allow_import": 1, 
-  "autoname": "field:department_name", 
-  "doctype": "DocType", 
-  "document_type": "Master", 
-  "icon": "icon-sitemap", 
-  "module": "HR", 
-  "name": "__common__"
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "Department", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "cancel": 0, 
-  "create": 1, 
-  "delete": 1, 
-  "doctype": "DocPerm", 
-  "email": 1, 
-  "name": "__common__", 
-  "parent": "Department", 
-  "parentfield": "permissions", 
-  "parenttype": "DocType", 
-  "permlevel": 0, 
-  "print": 1, 
-  "read": 1, 
-  "report": 1, 
-  "role": "HR User", 
-  "submit": 0, 
-  "write": 1
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Department"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "trash_reason", 
-  "fieldtype": "Small Text", 
-  "label": "Trash Reason", 
-  "oldfieldname": "trash_reason", 
-  "oldfieldtype": "Small Text", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "department_name", 
-  "fieldtype": "Data", 
-  "label": "Department", 
-  "oldfieldname": "department_name", 
-  "oldfieldtype": "Data", 
-  "reqd": 1
- }, 
- {
-  "description": "Days for which Holidays are blocked for this department.", 
-  "doctype": "DocField", 
-  "fieldname": "leave_block_list", 
-  "fieldtype": "Link", 
-  "label": "Leave Block List", 
-  "options": "Leave Block List"
- }, 
- {
-  "doctype": "DocPerm"
- }
-]
\ No newline at end of file
+{
+ "allow_import": 1, 
+ "autoname": "field:department_name", 
+ "creation": "2013-02-05 11:48:26", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "document_type": "Master", 
+ "fields": [
+  {
+   "fieldname": "trash_reason", 
+   "fieldtype": "Small Text", 
+   "label": "Trash Reason", 
+   "oldfieldname": "trash_reason", 
+   "oldfieldtype": "Small Text", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "department_name", 
+   "fieldtype": "Data", 
+   "label": "Department", 
+   "oldfieldname": "department_name", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "reqd": 1
+  }, 
+  {
+   "description": "Days for which Holidays are blocked for this department.", 
+   "fieldname": "leave_block_list", 
+   "fieldtype": "Link", 
+   "label": "Leave Block List", 
+   "options": "Leave Block List", 
+   "permlevel": 0
+  }
+ ], 
+ "icon": "icon-sitemap", 
+ "idx": 1, 
+ "modified": "2014-01-20 17:48:38", 
+ "modified_by": "Administrator", 
+ "module": "HR", 
+ "name": "Department", 
+ "owner": "Administrator", 
+ "permissions": [
+  {
+   "cancel": 0, 
+   "create": 1, 
+   "delete": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "HR User", 
+   "submit": 0, 
+   "write": 1
+  }
+ ]
+}
\ No newline at end of file
diff --git a/erpnext/hr/doctype/designation/designation.txt b/erpnext/hr/doctype/designation/designation.txt
index e8debd1..9fa591c 100644
--- a/erpnext/hr/doctype/designation/designation.txt
+++ b/erpnext/hr/doctype/designation/designation.txt
@@ -1,70 +1,51 @@
-[
- {
-  "creation": "2013-01-10 16:34:13", 
-  "docstatus": 0, 
-  "modified": "2014-01-20 17:48:38", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "allow_import": 1, 
-  "allow_rename": 1, 
-  "autoname": "field:designation_name", 
-  "doctype": "DocType", 
-  "document_type": "Master", 
-  "icon": "icon-bookmark", 
-  "module": "HR", 
-  "name": "__common__"
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "Designation", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "cancel": 0, 
-  "create": 1, 
-  "delete": 1, 
-  "doctype": "DocPerm", 
-  "email": 1, 
-  "name": "__common__", 
-  "parent": "Designation", 
-  "parentfield": "permissions", 
-  "parenttype": "DocType", 
-  "permlevel": 0, 
-  "print": 1, 
-  "read": 1, 
-  "report": 1, 
-  "role": "HR User", 
-  "submit": 0, 
-  "write": 1
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Designation"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "trash_reason", 
-  "fieldtype": "Small Text", 
-  "label": "Trash Reason", 
-  "oldfieldname": "trash_reason", 
-  "oldfieldtype": "Small Text", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "designation_name", 
-  "fieldtype": "Data", 
-  "label": "Designation", 
-  "oldfieldname": "designation_name", 
-  "oldfieldtype": "Data", 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocPerm"
- }
-]
\ No newline at end of file
+{
+ "allow_import": 1, 
+ "allow_rename": 1, 
+ "autoname": "field:designation_name", 
+ "creation": "2013-01-10 16:34:13", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "document_type": "Master", 
+ "fields": [
+  {
+   "fieldname": "trash_reason", 
+   "fieldtype": "Small Text", 
+   "label": "Trash Reason", 
+   "oldfieldname": "trash_reason", 
+   "oldfieldtype": "Small Text", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "designation_name", 
+   "fieldtype": "Data", 
+   "label": "Designation", 
+   "oldfieldname": "designation_name", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "reqd": 1
+  }
+ ], 
+ "icon": "icon-bookmark", 
+ "idx": 1, 
+ "modified": "2014-01-20 17:48:38", 
+ "modified_by": "Administrator", 
+ "module": "HR", 
+ "name": "Designation", 
+ "owner": "Administrator", 
+ "permissions": [
+  {
+   "cancel": 0, 
+   "create": 1, 
+   "delete": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "HR User", 
+   "submit": 0, 
+   "write": 1
+  }
+ ]
+}
\ No newline at end of file
diff --git a/erpnext/hr/doctype/earning_type/earning_type.txt b/erpnext/hr/doctype/earning_type/earning_type.txt
index 9d3b90f..0d23a36 100644
--- a/erpnext/hr/doctype/earning_type/earning_type.txt
+++ b/erpnext/hr/doctype/earning_type/earning_type.txt
@@ -1,100 +1,81 @@
-[
- {
-  "creation": "2013-01-24 11:03:32", 
-  "docstatus": 0, 
-  "modified": "2014-01-20 17:48:38", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "allow_import": 1, 
-  "allow_rename": 1, 
-  "autoname": "field:earning_name", 
-  "doctype": "DocType", 
-  "document_type": "Master", 
-  "icon": "icon-flag", 
-  "module": "HR", 
-  "name": "__common__"
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "Earning Type", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "cancel": 0, 
-  "create": 1, 
-  "delete": 1, 
-  "doctype": "DocPerm", 
-  "email": 1, 
-  "name": "__common__", 
-  "parent": "Earning Type", 
-  "parentfield": "permissions", 
-  "parenttype": "DocType", 
-  "permlevel": 0, 
-  "print": 1, 
-  "read": 1, 
-  "report": 1, 
-  "role": "HR User", 
-  "submit": 0, 
-  "write": 1
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Earning Type"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "trash_reason", 
-  "fieldtype": "Small Text", 
-  "label": "Trash Reason", 
-  "oldfieldname": "trash_reason", 
-  "oldfieldtype": "Small Text", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "earning_name", 
-  "fieldtype": "Data", 
-  "label": "Name", 
-  "oldfieldname": "earning_name", 
-  "oldfieldtype": "Data", 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "description", 
-  "fieldtype": "Small Text", 
-  "label": "Description", 
-  "oldfieldname": "description", 
-  "oldfieldtype": "Small Text", 
-  "reqd": 0, 
-  "width": "300px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "taxable", 
-  "fieldtype": "Select", 
-  "label": "Taxable", 
-  "oldfieldname": "taxable", 
-  "oldfieldtype": "Select", 
-  "options": "\nYes\nNo", 
-  "reqd": 1
- }, 
- {
-  "depends_on": "eval:doc.taxable=='No'", 
-  "doctype": "DocField", 
-  "fieldname": "exemption_limit", 
-  "fieldtype": "Float", 
-  "hidden": 0, 
-  "label": "Exemption Limit", 
-  "oldfieldname": "exemption_limit", 
-  "oldfieldtype": "Currency"
- }, 
- {
-  "doctype": "DocPerm"
- }
-]
\ No newline at end of file
+{
+ "allow_import": 1, 
+ "allow_rename": 1, 
+ "autoname": "field:earning_name", 
+ "creation": "2013-01-24 11:03:32", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "document_type": "Master", 
+ "fields": [
+  {
+   "fieldname": "trash_reason", 
+   "fieldtype": "Small Text", 
+   "label": "Trash Reason", 
+   "oldfieldname": "trash_reason", 
+   "oldfieldtype": "Small Text", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "earning_name", 
+   "fieldtype": "Data", 
+   "label": "Name", 
+   "oldfieldname": "earning_name", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "description", 
+   "fieldtype": "Small Text", 
+   "label": "Description", 
+   "oldfieldname": "description", 
+   "oldfieldtype": "Small Text", 
+   "permlevel": 0, 
+   "reqd": 0, 
+   "width": "300px"
+  }, 
+  {
+   "fieldname": "taxable", 
+   "fieldtype": "Select", 
+   "label": "Taxable", 
+   "oldfieldname": "taxable", 
+   "oldfieldtype": "Select", 
+   "options": "\nYes\nNo", 
+   "permlevel": 0, 
+   "reqd": 1
+  }, 
+  {
+   "depends_on": "eval:doc.taxable=='No'", 
+   "fieldname": "exemption_limit", 
+   "fieldtype": "Float", 
+   "hidden": 0, 
+   "label": "Exemption Limit", 
+   "oldfieldname": "exemption_limit", 
+   "oldfieldtype": "Currency", 
+   "permlevel": 0
+  }
+ ], 
+ "icon": "icon-flag", 
+ "idx": 1, 
+ "modified": "2014-01-20 17:48:38", 
+ "modified_by": "Administrator", 
+ "module": "HR", 
+ "name": "Earning Type", 
+ "owner": "Administrator", 
+ "permissions": [
+  {
+   "cancel": 0, 
+   "create": 1, 
+   "delete": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "HR User", 
+   "submit": 0, 
+   "write": 1
+  }
+ ]
+}
\ No newline at end of file
diff --git a/erpnext/hr/doctype/employee/employee.txt b/erpnext/hr/doctype/employee/employee.txt
index bc21ff9..f8f32db 100644
--- a/erpnext/hr/doctype/employee/employee.txt
+++ b/erpnext/hr/doctype/employee/employee.txt
@@ -1,782 +1,777 @@
-[
- {
-  "creation": "2013-03-07 09:04:18", 
-  "docstatus": 0, 
-  "modified": "2014-02-03 18:06:04", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "allow_attach": 1, 
-  "allow_import": 1, 
-  "allow_rename": 1, 
-  "autoname": "naming_series:", 
-  "doctype": "DocType", 
-  "document_type": "Master", 
-  "icon": "icon-user", 
-  "module": "HR", 
-  "name": "__common__", 
-  "search_fields": "employee_name"
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "Employee", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "amend": 0, 
-  "cancel": 0, 
-  "doctype": "DocPerm", 
-  "email": 1, 
-  "name": "__common__", 
-  "parent": "Employee", 
-  "parentfield": "permissions", 
-  "parenttype": "DocType", 
-  "permlevel": 0, 
-  "print": 1, 
-  "read": 1, 
-  "report": 1, 
-  "submit": 0
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Employee"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "basic_information", 
-  "fieldtype": "Section Break", 
-  "label": "Basic Information", 
-  "oldfieldtype": "Section Break"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break0", 
-  "fieldtype": "Column Break", 
-  "width": "50%"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "image_view", 
-  "fieldtype": "Image", 
-  "in_list_view": 0, 
-  "label": "Image View", 
-  "options": "image"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "employee", 
-  "fieldtype": "Data", 
-  "hidden": 1, 
-  "label": "Employee", 
-  "no_copy": 1, 
-  "print_hide": 1, 
-  "report_hide": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "naming_series", 
-  "fieldtype": "Select", 
-  "label": "Series", 
-  "no_copy": 1, 
-  "oldfieldname": "naming_series", 
-  "oldfieldtype": "Select", 
-  "options": "EMP/", 
-  "reqd": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "salutation", 
-  "fieldtype": "Select", 
-  "label": "Salutation", 
-  "oldfieldname": "salutation", 
-  "oldfieldtype": "Select", 
-  "options": "\nMr\nMs", 
-  "search_index": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "employee_name", 
-  "fieldtype": "Data", 
-  "in_list_view": 1, 
-  "label": "Full Name", 
-  "oldfieldname": "employee_name", 
-  "oldfieldtype": "Data", 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "image", 
-  "fieldtype": "Select", 
-  "label": "Image", 
-  "options": "attach_files:"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break1", 
-  "fieldtype": "Column Break", 
-  "width": "50%"
- }, 
- {
-  "description": "System User (login) ID. If set, it will become default for all HR forms.", 
-  "doctype": "DocField", 
-  "fieldname": "user_id", 
-  "fieldtype": "Link", 
-  "label": "User ID", 
-  "options": "User"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "employee_number", 
-  "fieldtype": "Data", 
-  "in_filter": 1, 
-  "label": "Employee Number", 
-  "oldfieldname": "employee_number", 
-  "oldfieldtype": "Data", 
-  "search_index": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "date_of_joining", 
-  "fieldtype": "Date", 
-  "label": "Date of Joining", 
-  "oldfieldname": "date_of_joining", 
-  "oldfieldtype": "Date", 
-  "reqd": 1
- }, 
- {
-  "description": "You can enter any date manually", 
-  "doctype": "DocField", 
-  "fieldname": "date_of_birth", 
-  "fieldtype": "Date", 
-  "in_filter": 1, 
-  "label": "Date of Birth", 
-  "oldfieldname": "date_of_birth", 
-  "oldfieldtype": "Date", 
-  "reqd": 1, 
-  "search_index": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "gender", 
-  "fieldtype": "Select", 
-  "in_filter": 1, 
-  "label": "Gender", 
-  "oldfieldname": "gender", 
-  "oldfieldtype": "Select", 
-  "options": "\nMale\nFemale", 
-  "reqd": 1, 
-  "search_index": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "company", 
-  "fieldtype": "Select", 
-  "in_filter": 1, 
-  "label": "Company", 
-  "options": "link:Company", 
-  "print_hide": 1, 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "employment_details", 
-  "fieldtype": "Section Break", 
-  "label": "Employment Details"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "col_break_21", 
-  "fieldtype": "Column Break"
- }, 
- {
-  "default": "Active", 
-  "doctype": "DocField", 
-  "fieldname": "status", 
-  "fieldtype": "Select", 
-  "in_filter": 1, 
-  "in_list_view": 1, 
-  "label": "Status", 
-  "oldfieldname": "status", 
-  "oldfieldtype": "Select", 
-  "options": "\nActive\nLeft", 
-  "reqd": 1, 
-  "search_index": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "employment_type", 
-  "fieldtype": "Link", 
-  "in_filter": 1, 
-  "in_list_view": 1, 
-  "label": "Employment Type", 
-  "oldfieldname": "employment_type", 
-  "oldfieldtype": "Link", 
-  "options": "Employment Type", 
-  "search_index": 0
- }, 
- {
-  "description": "Applicable Holiday List", 
-  "doctype": "DocField", 
-  "fieldname": "holiday_list", 
-  "fieldtype": "Link", 
-  "label": "Holiday List", 
-  "oldfieldname": "holiday_list", 
-  "oldfieldtype": "Link", 
-  "options": "Holiday List"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "col_break_22", 
-  "fieldtype": "Column Break"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "scheduled_confirmation_date", 
-  "fieldtype": "Date", 
-  "in_filter": 1, 
-  "label": "Offer Date", 
-  "oldfieldname": "scheduled_confirmation_date", 
-  "oldfieldtype": "Date", 
-  "search_index": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "final_confirmation_date", 
-  "fieldtype": "Date", 
-  "label": "Confirmation Date", 
-  "oldfieldname": "final_confirmation_date", 
-  "oldfieldtype": "Date", 
-  "search_index": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "contract_end_date", 
-  "fieldtype": "Date", 
-  "in_filter": 1, 
-  "label": "Contract End Date", 
-  "oldfieldname": "contract_end_date", 
-  "oldfieldtype": "Date", 
-  "search_index": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "date_of_retirement", 
-  "fieldtype": "Date", 
-  "label": "Date Of Retirement", 
-  "oldfieldname": "date_of_retirement", 
-  "oldfieldtype": "Date"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "job_profile", 
-  "fieldtype": "Section Break", 
-  "label": "Job Profile"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break2", 
-  "fieldtype": "Column Break", 
-  "width": "50%"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "branch", 
-  "fieldtype": "Link", 
-  "in_filter": 1, 
-  "label": "Branch", 
-  "oldfieldname": "branch", 
-  "oldfieldtype": "Link", 
-  "options": "Branch", 
-  "reqd": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "department", 
-  "fieldtype": "Link", 
-  "in_filter": 1, 
-  "label": "Department", 
-  "oldfieldname": "department", 
-  "oldfieldtype": "Link", 
-  "options": "Department", 
-  "reqd": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "designation", 
-  "fieldtype": "Link", 
-  "in_filter": 1, 
-  "label": "Designation", 
-  "oldfieldname": "designation", 
-  "oldfieldtype": "Link", 
-  "options": "Designation", 
-  "reqd": 0, 
-  "search_index": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "grade", 
-  "fieldtype": "Link", 
-  "in_filter": 1, 
-  "label": "Grade", 
-  "oldfieldname": "grade", 
-  "oldfieldtype": "Link", 
-  "options": "Grade", 
-  "reqd": 0
- }, 
- {
-  "description": "Provide email id registered in company", 
-  "doctype": "DocField", 
-  "fieldname": "company_email", 
-  "fieldtype": "Data", 
-  "in_filter": 1, 
-  "label": "Company Email", 
-  "oldfieldname": "company_email", 
-  "oldfieldtype": "Data", 
-  "reqd": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "notice_number_of_days", 
-  "fieldtype": "Int", 
-  "label": "Notice (days)", 
-  "oldfieldname": "notice_number_of_days", 
-  "oldfieldtype": "Int"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "salary_information", 
-  "fieldtype": "Column Break", 
-  "label": "Salary Information", 
-  "oldfieldtype": "Section Break", 
-  "width": "50%"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "salary_mode", 
-  "fieldtype": "Select", 
-  "label": "Salary Mode", 
-  "oldfieldname": "salary_mode", 
-  "oldfieldtype": "Select", 
-  "options": "\nBank\nCash\nCheque"
- }, 
- {
-  "depends_on": "eval:doc.salary_mode == 'Bank'", 
-  "doctype": "DocField", 
-  "fieldname": "bank_name", 
-  "fieldtype": "Data", 
-  "hidden": 0, 
-  "in_filter": 1, 
-  "label": "Bank Name", 
-  "oldfieldname": "bank_name", 
-  "oldfieldtype": "Link", 
-  "options": "Suggest"
- }, 
- {
-  "depends_on": "eval:doc.salary_mode == 'Bank'", 
-  "doctype": "DocField", 
-  "fieldname": "bank_ac_no", 
-  "fieldtype": "Data", 
-  "hidden": 0, 
-  "label": "Bank A/C No.", 
-  "oldfieldname": "bank_ac_no", 
-  "oldfieldtype": "Data"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "esic_card_no", 
-  "fieldtype": "Data", 
-  "label": "ESIC CARD No", 
-  "oldfieldname": "esic_card_no", 
-  "oldfieldtype": "Data"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "pf_number", 
-  "fieldtype": "Data", 
-  "label": "PF Number", 
-  "oldfieldname": "pf_number", 
-  "oldfieldtype": "Data"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "gratuity_lic_id", 
-  "fieldtype": "Data", 
-  "label": "Gratuity LIC ID", 
-  "oldfieldname": "gratuity_lic_id", 
-  "oldfieldtype": "Data"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "organization_profile", 
-  "fieldtype": "Section Break", 
-  "label": "Organization Profile"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "reports_to", 
-  "fieldtype": "Link", 
-  "ignore_restrictions": 1, 
-  "label": "Reports to", 
-  "oldfieldname": "reports_to", 
-  "oldfieldtype": "Link", 
-  "options": "Employee"
- }, 
- {
-  "description": "The first Leave Approver in the list will be set as the default Leave Approver", 
-  "doctype": "DocField", 
-  "fieldname": "employee_leave_approvers", 
-  "fieldtype": "Table", 
-  "label": "Leave Approvers", 
-  "options": "Employee Leave Approver"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "contact_details", 
-  "fieldtype": "Section Break", 
-  "label": "Contact Details"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break3", 
-  "fieldtype": "Column Break", 
-  "width": "50%"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "cell_number", 
-  "fieldtype": "Data", 
-  "label": "Cell Number"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "personal_email", 
-  "fieldtype": "Data", 
-  "label": "Personal Email"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "unsubscribed", 
-  "fieldtype": "Check", 
-  "label": "Unsubscribed"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "emergency_contact_details", 
-  "fieldtype": "HTML", 
-  "label": "Emergency Contact Details", 
-  "options": "<h4 class=\"text-muted\">Emergency Contact Details</h4>"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "person_to_be_contacted", 
-  "fieldtype": "Data", 
-  "label": "Emergency Contact"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "relation", 
-  "fieldtype": "Data", 
-  "label": "Relation"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "emergency_phone_number", 
-  "fieldtype": "Data", 
-  "label": "Emergency Phone"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break4", 
-  "fieldtype": "Column Break", 
-  "width": "50%"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "permanent_accommodation_type", 
-  "fieldtype": "Select", 
-  "label": "Permanent Address Is", 
-  "options": "\nRented\nOwned"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "permanent_address", 
-  "fieldtype": "Small Text", 
-  "label": "Permanent Address"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "current_accommodation_type", 
-  "fieldtype": "Select", 
-  "label": "Current Address Is", 
-  "options": "\nRented\nOwned"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "current_address", 
-  "fieldtype": "Small Text", 
-  "label": "Current Address"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "sb53", 
-  "fieldtype": "Section Break", 
-  "label": "Bio"
- }, 
- {
-  "description": "Short biography for website and other publications.", 
-  "doctype": "DocField", 
-  "fieldname": "bio", 
-  "fieldtype": "Text Editor", 
-  "label": "Bio"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "personal_details", 
-  "fieldtype": "Section Break", 
-  "label": "Personal Details"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break5", 
-  "fieldtype": "Column Break", 
-  "width": "50%"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "pan_number", 
-  "fieldtype": "Data", 
-  "label": "PAN Number"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "passport_number", 
-  "fieldtype": "Data", 
-  "label": "Passport Number"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "date_of_issue", 
-  "fieldtype": "Date", 
-  "label": "Date of Issue"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "valid_upto", 
-  "fieldtype": "Date", 
-  "label": "Valid Upto"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "place_of_issue", 
-  "fieldtype": "Data", 
-  "label": "Place of Issue"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break6", 
-  "fieldtype": "Column Break", 
-  "width": "50%"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "marital_status", 
-  "fieldtype": "Select", 
-  "label": "Marital Status", 
-  "options": "\nSingle\nMarried\nDivorced\nWidowed"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "blood_group", 
-  "fieldtype": "Select", 
-  "label": "Blood Group", 
-  "options": "\nA+\nA-\nB+\nB-\nAB+\nAB-\nO+\nO-"
- }, 
- {
-  "description": "Here you can maintain family details like name and occupation of parent, spouse and children", 
-  "doctype": "DocField", 
-  "fieldname": "family_background", 
-  "fieldtype": "Small Text", 
-  "label": "Family Background"
- }, 
- {
-  "description": "Here you can maintain height, weight, allergies, medical concerns etc", 
-  "doctype": "DocField", 
-  "fieldname": "health_details", 
-  "fieldtype": "Small Text", 
-  "label": "Health Details"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "educational_qualification", 
-  "fieldtype": "Section Break", 
-  "label": "Educational Qualification"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "educational_qualification_details", 
-  "fieldtype": "Table", 
-  "label": "Educational Qualification Details", 
-  "options": "Employee Education"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "previous_work_experience", 
-  "fieldtype": "Section Break", 
-  "label": "Previous Work Experience", 
-  "options": "Simple"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "previous_experience_details", 
-  "fieldtype": "Table", 
-  "label": "Employee External Work History", 
-  "options": "Employee External Work History"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "history_in_company", 
-  "fieldtype": "Section Break", 
-  "label": "History In Company", 
-  "options": "Simple"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "experience_in_company_details", 
-  "fieldtype": "Table", 
-  "label": "Employee Internal Work Historys", 
-  "options": "Employee Internal Work History"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "exit", 
-  "fieldtype": "Section Break", 
-  "label": "Exit", 
-  "oldfieldtype": "Section Break"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break7", 
-  "fieldtype": "Column Break", 
-  "width": "50%"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "resignation_letter_date", 
-  "fieldtype": "Date", 
-  "label": "Resignation Letter Date", 
-  "oldfieldname": "resignation_letter_date", 
-  "oldfieldtype": "Date"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "relieving_date", 
-  "fieldtype": "Date", 
-  "in_filter": 1, 
-  "label": "Relieving Date", 
-  "oldfieldname": "relieving_date", 
-  "oldfieldtype": "Date"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "reason_for_leaving", 
-  "fieldtype": "Data", 
-  "label": "Reason for Leaving", 
-  "oldfieldname": "reason_for_leaving", 
-  "oldfieldtype": "Data"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "leave_encashed", 
-  "fieldtype": "Select", 
-  "label": "Leave Encashed?", 
-  "oldfieldname": "leave_encashed", 
-  "oldfieldtype": "Select", 
-  "options": "\nYes\nNo"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "encashment_date", 
-  "fieldtype": "Date", 
-  "label": "Encashment Date", 
-  "oldfieldname": "encashment_date", 
-  "oldfieldtype": "Date"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "exit_interview_details", 
-  "fieldtype": "Column Break", 
-  "label": "Exit Interview Details", 
-  "oldfieldname": "col_brk6", 
-  "oldfieldtype": "Column Break", 
-  "width": "50%"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "held_on", 
-  "fieldtype": "Date", 
-  "label": "Held On", 
-  "oldfieldname": "held_on", 
-  "oldfieldtype": "Date"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "reason_for_resignation", 
-  "fieldtype": "Select", 
-  "label": "Reason for Resignation", 
-  "oldfieldname": "reason_for_resignation", 
-  "oldfieldtype": "Select", 
-  "options": "\nBetter Prospects\nHealth Concerns"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "new_workplace", 
-  "fieldtype": "Data", 
-  "label": "New Workplace", 
-  "oldfieldname": "new_workplace", 
-  "oldfieldtype": "Data"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "feedback", 
-  "fieldtype": "Small Text", 
-  "label": "Feedback", 
-  "oldfieldname": "feedback", 
-  "oldfieldtype": "Text"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "trash_reason", 
-  "fieldtype": "Small Text", 
-  "label": "Trash Reason", 
-  "oldfieldname": "trash_reason", 
-  "oldfieldtype": "Small Text", 
-  "read_only": 1
- }, 
- {
-  "create": 0, 
-  "delete": 0, 
-  "doctype": "DocPerm", 
-  "role": "Employee", 
-  "write": 0
- }, 
- {
-  "create": 1, 
-  "delete": 1, 
-  "doctype": "DocPerm", 
-  "restrict": 0, 
-  "role": "HR User", 
-  "write": 1
- }, 
- {
-  "create": 1, 
-  "delete": 1, 
-  "doctype": "DocPerm", 
-  "restrict": 1, 
-  "role": "HR Manager", 
-  "write": 1
- }
-]
\ No newline at end of file
+{
+ "allow_attach": 1, 
+ "allow_import": 1, 
+ "allow_rename": 1, 
+ "autoname": "naming_series:", 
+ "creation": "2013-03-07 09:04:18", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "document_type": "Master", 
+ "fields": [
+  {
+   "fieldname": "basic_information", 
+   "fieldtype": "Section Break", 
+   "label": "Basic Information", 
+   "oldfieldtype": "Section Break", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "column_break0", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0, 
+   "width": "50%"
+  }, 
+  {
+   "fieldname": "image_view", 
+   "fieldtype": "Image", 
+   "in_list_view": 0, 
+   "label": "Image View", 
+   "options": "image", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "employee", 
+   "fieldtype": "Data", 
+   "hidden": 1, 
+   "label": "Employee", 
+   "no_copy": 1, 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "report_hide": 1
+  }, 
+  {
+   "fieldname": "naming_series", 
+   "fieldtype": "Select", 
+   "label": "Series", 
+   "no_copy": 1, 
+   "oldfieldname": "naming_series", 
+   "oldfieldtype": "Select", 
+   "options": "EMP/", 
+   "permlevel": 0, 
+   "reqd": 0
+  }, 
+  {
+   "fieldname": "salutation", 
+   "fieldtype": "Select", 
+   "label": "Salutation", 
+   "oldfieldname": "salutation", 
+   "oldfieldtype": "Select", 
+   "options": "\nMr\nMs", 
+   "permlevel": 0, 
+   "search_index": 0
+  }, 
+  {
+   "fieldname": "employee_name", 
+   "fieldtype": "Data", 
+   "in_list_view": 1, 
+   "label": "Full Name", 
+   "oldfieldname": "employee_name", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "image", 
+   "fieldtype": "Select", 
+   "label": "Image", 
+   "options": "attach_files:", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "column_break1", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0, 
+   "width": "50%"
+  }, 
+  {
+   "description": "System User (login) ID. If set, it will become default for all HR forms.", 
+   "fieldname": "user_id", 
+   "fieldtype": "Link", 
+   "label": "User ID", 
+   "options": "User", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "employee_number", 
+   "fieldtype": "Data", 
+   "in_filter": 1, 
+   "label": "Employee Number", 
+   "oldfieldname": "employee_number", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "search_index": 0
+  }, 
+  {
+   "fieldname": "date_of_joining", 
+   "fieldtype": "Date", 
+   "label": "Date of Joining", 
+   "oldfieldname": "date_of_joining", 
+   "oldfieldtype": "Date", 
+   "permlevel": 0, 
+   "reqd": 1
+  }, 
+  {
+   "description": "You can enter any date manually", 
+   "fieldname": "date_of_birth", 
+   "fieldtype": "Date", 
+   "in_filter": 1, 
+   "label": "Date of Birth", 
+   "oldfieldname": "date_of_birth", 
+   "oldfieldtype": "Date", 
+   "permlevel": 0, 
+   "reqd": 1, 
+   "search_index": 0
+  }, 
+  {
+   "fieldname": "gender", 
+   "fieldtype": "Select", 
+   "in_filter": 1, 
+   "label": "Gender", 
+   "oldfieldname": "gender", 
+   "oldfieldtype": "Select", 
+   "options": "\nMale\nFemale", 
+   "permlevel": 0, 
+   "reqd": 1, 
+   "search_index": 0
+  }, 
+  {
+   "fieldname": "company", 
+   "fieldtype": "Select", 
+   "in_filter": 1, 
+   "label": "Company", 
+   "options": "link:Company", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "employment_details", 
+   "fieldtype": "Section Break", 
+   "label": "Employment Details", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "col_break_21", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0
+  }, 
+  {
+   "default": "Active", 
+   "fieldname": "status", 
+   "fieldtype": "Select", 
+   "in_filter": 1, 
+   "in_list_view": 1, 
+   "label": "Status", 
+   "oldfieldname": "status", 
+   "oldfieldtype": "Select", 
+   "options": "\nActive\nLeft", 
+   "permlevel": 0, 
+   "reqd": 1, 
+   "search_index": 1
+  }, 
+  {
+   "fieldname": "employment_type", 
+   "fieldtype": "Link", 
+   "in_filter": 1, 
+   "in_list_view": 1, 
+   "label": "Employment Type", 
+   "oldfieldname": "employment_type", 
+   "oldfieldtype": "Link", 
+   "options": "Employment Type", 
+   "permlevel": 0, 
+   "search_index": 0
+  }, 
+  {
+   "description": "Applicable Holiday List", 
+   "fieldname": "holiday_list", 
+   "fieldtype": "Link", 
+   "label": "Holiday List", 
+   "oldfieldname": "holiday_list", 
+   "oldfieldtype": "Link", 
+   "options": "Holiday List", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "col_break_22", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "scheduled_confirmation_date", 
+   "fieldtype": "Date", 
+   "in_filter": 1, 
+   "label": "Offer Date", 
+   "oldfieldname": "scheduled_confirmation_date", 
+   "oldfieldtype": "Date", 
+   "permlevel": 0, 
+   "search_index": 0
+  }, 
+  {
+   "fieldname": "final_confirmation_date", 
+   "fieldtype": "Date", 
+   "label": "Confirmation Date", 
+   "oldfieldname": "final_confirmation_date", 
+   "oldfieldtype": "Date", 
+   "permlevel": 0, 
+   "search_index": 0
+  }, 
+  {
+   "fieldname": "contract_end_date", 
+   "fieldtype": "Date", 
+   "in_filter": 1, 
+   "label": "Contract End Date", 
+   "oldfieldname": "contract_end_date", 
+   "oldfieldtype": "Date", 
+   "permlevel": 0, 
+   "search_index": 0
+  }, 
+  {
+   "fieldname": "date_of_retirement", 
+   "fieldtype": "Date", 
+   "label": "Date Of Retirement", 
+   "oldfieldname": "date_of_retirement", 
+   "oldfieldtype": "Date", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "job_profile", 
+   "fieldtype": "Section Break", 
+   "label": "Job Profile", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "column_break2", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0, 
+   "width": "50%"
+  }, 
+  {
+   "fieldname": "branch", 
+   "fieldtype": "Link", 
+   "in_filter": 1, 
+   "label": "Branch", 
+   "oldfieldname": "branch", 
+   "oldfieldtype": "Link", 
+   "options": "Branch", 
+   "permlevel": 0, 
+   "reqd": 0
+  }, 
+  {
+   "fieldname": "department", 
+   "fieldtype": "Link", 
+   "in_filter": 1, 
+   "label": "Department", 
+   "oldfieldname": "department", 
+   "oldfieldtype": "Link", 
+   "options": "Department", 
+   "permlevel": 0, 
+   "reqd": 0
+  }, 
+  {
+   "fieldname": "designation", 
+   "fieldtype": "Link", 
+   "in_filter": 1, 
+   "label": "Designation", 
+   "oldfieldname": "designation", 
+   "oldfieldtype": "Link", 
+   "options": "Designation", 
+   "permlevel": 0, 
+   "reqd": 0, 
+   "search_index": 1
+  }, 
+  {
+   "fieldname": "grade", 
+   "fieldtype": "Link", 
+   "in_filter": 1, 
+   "label": "Grade", 
+   "oldfieldname": "grade", 
+   "oldfieldtype": "Link", 
+   "options": "Grade", 
+   "permlevel": 0, 
+   "reqd": 0
+  }, 
+  {
+   "description": "Provide email id registered in company", 
+   "fieldname": "company_email", 
+   "fieldtype": "Data", 
+   "in_filter": 1, 
+   "label": "Company Email", 
+   "oldfieldname": "company_email", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "reqd": 0
+  }, 
+  {
+   "fieldname": "notice_number_of_days", 
+   "fieldtype": "Int", 
+   "label": "Notice (days)", 
+   "oldfieldname": "notice_number_of_days", 
+   "oldfieldtype": "Int", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "salary_information", 
+   "fieldtype": "Column Break", 
+   "label": "Salary Information", 
+   "oldfieldtype": "Section Break", 
+   "permlevel": 0, 
+   "width": "50%"
+  }, 
+  {
+   "fieldname": "salary_mode", 
+   "fieldtype": "Select", 
+   "label": "Salary Mode", 
+   "oldfieldname": "salary_mode", 
+   "oldfieldtype": "Select", 
+   "options": "\nBank\nCash\nCheque", 
+   "permlevel": 0
+  }, 
+  {
+   "depends_on": "eval:doc.salary_mode == 'Bank'", 
+   "fieldname": "bank_name", 
+   "fieldtype": "Data", 
+   "hidden": 0, 
+   "in_filter": 1, 
+   "label": "Bank Name", 
+   "oldfieldname": "bank_name", 
+   "oldfieldtype": "Link", 
+   "options": "Suggest", 
+   "permlevel": 0
+  }, 
+  {
+   "depends_on": "eval:doc.salary_mode == 'Bank'", 
+   "fieldname": "bank_ac_no", 
+   "fieldtype": "Data", 
+   "hidden": 0, 
+   "label": "Bank A/C No.", 
+   "oldfieldname": "bank_ac_no", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "esic_card_no", 
+   "fieldtype": "Data", 
+   "label": "ESIC CARD No", 
+   "oldfieldname": "esic_card_no", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "pf_number", 
+   "fieldtype": "Data", 
+   "label": "PF Number", 
+   "oldfieldname": "pf_number", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "gratuity_lic_id", 
+   "fieldtype": "Data", 
+   "label": "Gratuity LIC ID", 
+   "oldfieldname": "gratuity_lic_id", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "organization_profile", 
+   "fieldtype": "Section Break", 
+   "label": "Organization Profile", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "reports_to", 
+   "fieldtype": "Link", 
+   "ignore_restrictions": 1, 
+   "label": "Reports to", 
+   "oldfieldname": "reports_to", 
+   "oldfieldtype": "Link", 
+   "options": "Employee", 
+   "permlevel": 0
+  }, 
+  {
+   "description": "The first Leave Approver in the list will be set as the default Leave Approver", 
+   "fieldname": "employee_leave_approvers", 
+   "fieldtype": "Table", 
+   "label": "Leave Approvers", 
+   "options": "Employee Leave Approver", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "contact_details", 
+   "fieldtype": "Section Break", 
+   "label": "Contact Details", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "column_break3", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0, 
+   "width": "50%"
+  }, 
+  {
+   "fieldname": "cell_number", 
+   "fieldtype": "Data", 
+   "label": "Cell Number", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "personal_email", 
+   "fieldtype": "Data", 
+   "label": "Personal Email", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "unsubscribed", 
+   "fieldtype": "Check", 
+   "label": "Unsubscribed", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "emergency_contact_details", 
+   "fieldtype": "HTML", 
+   "label": "Emergency Contact Details", 
+   "options": "<h4 class=\"text-muted\">Emergency Contact Details</h4>", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "person_to_be_contacted", 
+   "fieldtype": "Data", 
+   "label": "Emergency Contact", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "relation", 
+   "fieldtype": "Data", 
+   "label": "Relation", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "emergency_phone_number", 
+   "fieldtype": "Data", 
+   "label": "Emergency Phone", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "column_break4", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0, 
+   "width": "50%"
+  }, 
+  {
+   "fieldname": "permanent_accommodation_type", 
+   "fieldtype": "Select", 
+   "label": "Permanent Address Is", 
+   "options": "\nRented\nOwned", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "permanent_address", 
+   "fieldtype": "Small Text", 
+   "label": "Permanent Address", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "current_accommodation_type", 
+   "fieldtype": "Select", 
+   "label": "Current Address Is", 
+   "options": "\nRented\nOwned", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "current_address", 
+   "fieldtype": "Small Text", 
+   "label": "Current Address", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "sb53", 
+   "fieldtype": "Section Break", 
+   "label": "Bio", 
+   "permlevel": 0
+  }, 
+  {
+   "description": "Short biography for website and other publications.", 
+   "fieldname": "bio", 
+   "fieldtype": "Text Editor", 
+   "label": "Bio", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "personal_details", 
+   "fieldtype": "Section Break", 
+   "label": "Personal Details", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "column_break5", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0, 
+   "width": "50%"
+  }, 
+  {
+   "fieldname": "pan_number", 
+   "fieldtype": "Data", 
+   "label": "PAN Number", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "passport_number", 
+   "fieldtype": "Data", 
+   "label": "Passport Number", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "date_of_issue", 
+   "fieldtype": "Date", 
+   "label": "Date of Issue", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "valid_upto", 
+   "fieldtype": "Date", 
+   "label": "Valid Upto", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "place_of_issue", 
+   "fieldtype": "Data", 
+   "label": "Place of Issue", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "column_break6", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0, 
+   "width": "50%"
+  }, 
+  {
+   "fieldname": "marital_status", 
+   "fieldtype": "Select", 
+   "label": "Marital Status", 
+   "options": "\nSingle\nMarried\nDivorced\nWidowed", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "blood_group", 
+   "fieldtype": "Select", 
+   "label": "Blood Group", 
+   "options": "\nA+\nA-\nB+\nB-\nAB+\nAB-\nO+\nO-", 
+   "permlevel": 0
+  }, 
+  {
+   "description": "Here you can maintain family details like name and occupation of parent, spouse and children", 
+   "fieldname": "family_background", 
+   "fieldtype": "Small Text", 
+   "label": "Family Background", 
+   "permlevel": 0
+  }, 
+  {
+   "description": "Here you can maintain height, weight, allergies, medical concerns etc", 
+   "fieldname": "health_details", 
+   "fieldtype": "Small Text", 
+   "label": "Health Details", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "educational_qualification", 
+   "fieldtype": "Section Break", 
+   "label": "Educational Qualification", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "educational_qualification_details", 
+   "fieldtype": "Table", 
+   "label": "Educational Qualification Details", 
+   "options": "Employee Education", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "previous_work_experience", 
+   "fieldtype": "Section Break", 
+   "label": "Previous Work Experience", 
+   "options": "Simple", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "previous_experience_details", 
+   "fieldtype": "Table", 
+   "label": "Employee External Work History", 
+   "options": "Employee External Work History", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "history_in_company", 
+   "fieldtype": "Section Break", 
+   "label": "History In Company", 
+   "options": "Simple", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "experience_in_company_details", 
+   "fieldtype": "Table", 
+   "label": "Employee Internal Work Historys", 
+   "options": "Employee Internal Work History", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "exit", 
+   "fieldtype": "Section Break", 
+   "label": "Exit", 
+   "oldfieldtype": "Section Break", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "column_break7", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0, 
+   "width": "50%"
+  }, 
+  {
+   "fieldname": "resignation_letter_date", 
+   "fieldtype": "Date", 
+   "label": "Resignation Letter Date", 
+   "oldfieldname": "resignation_letter_date", 
+   "oldfieldtype": "Date", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "relieving_date", 
+   "fieldtype": "Date", 
+   "in_filter": 1, 
+   "label": "Relieving Date", 
+   "oldfieldname": "relieving_date", 
+   "oldfieldtype": "Date", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "reason_for_leaving", 
+   "fieldtype": "Data", 
+   "label": "Reason for Leaving", 
+   "oldfieldname": "reason_for_leaving", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "leave_encashed", 
+   "fieldtype": "Select", 
+   "label": "Leave Encashed?", 
+   "oldfieldname": "leave_encashed", 
+   "oldfieldtype": "Select", 
+   "options": "\nYes\nNo", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "encashment_date", 
+   "fieldtype": "Date", 
+   "label": "Encashment Date", 
+   "oldfieldname": "encashment_date", 
+   "oldfieldtype": "Date", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "exit_interview_details", 
+   "fieldtype": "Column Break", 
+   "label": "Exit Interview Details", 
+   "oldfieldname": "col_brk6", 
+   "oldfieldtype": "Column Break", 
+   "permlevel": 0, 
+   "width": "50%"
+  }, 
+  {
+   "fieldname": "held_on", 
+   "fieldtype": "Date", 
+   "label": "Held On", 
+   "oldfieldname": "held_on", 
+   "oldfieldtype": "Date", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "reason_for_resignation", 
+   "fieldtype": "Select", 
+   "label": "Reason for Resignation", 
+   "oldfieldname": "reason_for_resignation", 
+   "oldfieldtype": "Select", 
+   "options": "\nBetter Prospects\nHealth Concerns", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "new_workplace", 
+   "fieldtype": "Data", 
+   "label": "New Workplace", 
+   "oldfieldname": "new_workplace", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "feedback", 
+   "fieldtype": "Small Text", 
+   "label": "Feedback", 
+   "oldfieldname": "feedback", 
+   "oldfieldtype": "Text", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "trash_reason", 
+   "fieldtype": "Small Text", 
+   "label": "Trash Reason", 
+   "oldfieldname": "trash_reason", 
+   "oldfieldtype": "Small Text", 
+   "permlevel": 0, 
+   "read_only": 1
+  }
+ ], 
+ "icon": "icon-user", 
+ "idx": 1, 
+ "modified": "2014-02-03 18:06:04", 
+ "modified_by": "Administrator", 
+ "module": "HR", 
+ "name": "Employee", 
+ "owner": "Administrator", 
+ "permissions": [
+  {
+   "amend": 0, 
+   "cancel": 0, 
+   "create": 0, 
+   "delete": 0, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Employee", 
+   "submit": 0, 
+   "write": 0
+  }, 
+  {
+   "amend": 0, 
+   "cancel": 0, 
+   "create": 1, 
+   "delete": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "restrict": 0, 
+   "role": "HR User", 
+   "submit": 0, 
+   "write": 1
+  }, 
+  {
+   "amend": 0, 
+   "cancel": 0, 
+   "create": 1, 
+   "delete": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "restrict": 1, 
+   "role": "HR Manager", 
+   "submit": 0, 
+   "write": 1
+  }
+ ], 
+ "search_fields": "employee_name"
+}
\ No newline at end of file
diff --git a/erpnext/hr/doctype/employee_education/employee_education.txt b/erpnext/hr/doctype/employee_education/employee_education.txt
index 9204c63..08b93cb 100644
--- a/erpnext/hr/doctype/employee_education/employee_education.txt
+++ b/erpnext/hr/doctype/employee_education/employee_education.txt
@@ -1,79 +1,71 @@
-[
- {
-  "creation": "2013-02-22 01:27:45", 
-  "docstatus": 0, 
-  "modified": "2013-12-20 19:23:12", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "doctype": "DocType", 
-  "istable": 1, 
-  "module": "HR", 
-  "name": "__common__"
- }, 
- {
-  "doctype": "DocField", 
-  "in_list_view": 1, 
-  "name": "__common__", 
-  "parent": "Employee Education", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Employee Education"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "school_univ", 
-  "fieldtype": "Small Text", 
-  "label": "School/University", 
-  "oldfieldname": "school_univ", 
-  "oldfieldtype": "Small Text"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "qualification", 
-  "fieldtype": "Data", 
-  "label": "Qualification", 
-  "oldfieldname": "qualification", 
-  "oldfieldtype": "Data", 
-  "print_width": "100px", 
-  "width": "100px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "level", 
-  "fieldtype": "Select", 
-  "label": "Level", 
-  "oldfieldname": "level", 
-  "oldfieldtype": "Select", 
-  "options": "Graduate\nPost Graduate\nUnder Graduate"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "year_of_passing", 
-  "fieldtype": "Int", 
-  "label": "Year of Passing", 
-  "oldfieldname": "year_of_passing", 
-  "oldfieldtype": "Int"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "class_per", 
-  "fieldtype": "Data", 
-  "label": "Class / Percentage", 
-  "oldfieldname": "class_per", 
-  "oldfieldtype": "Data"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "maj_opt_subj", 
-  "fieldtype": "Text", 
-  "label": "Major/Optional Subjects", 
-  "oldfieldname": "maj_opt_subj", 
-  "oldfieldtype": "Text"
- }
-]
\ No newline at end of file
+{
+ "creation": "2013-02-22 01:27:45", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "fields": [
+  {
+   "fieldname": "school_univ", 
+   "fieldtype": "Small Text", 
+   "in_list_view": 1, 
+   "label": "School/University", 
+   "oldfieldname": "school_univ", 
+   "oldfieldtype": "Small Text", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "qualification", 
+   "fieldtype": "Data", 
+   "in_list_view": 1, 
+   "label": "Qualification", 
+   "oldfieldname": "qualification", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "print_width": "100px", 
+   "width": "100px"
+  }, 
+  {
+   "fieldname": "level", 
+   "fieldtype": "Select", 
+   "in_list_view": 1, 
+   "label": "Level", 
+   "oldfieldname": "level", 
+   "oldfieldtype": "Select", 
+   "options": "Graduate\nPost Graduate\nUnder Graduate", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "year_of_passing", 
+   "fieldtype": "Int", 
+   "in_list_view": 1, 
+   "label": "Year of Passing", 
+   "oldfieldname": "year_of_passing", 
+   "oldfieldtype": "Int", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "class_per", 
+   "fieldtype": "Data", 
+   "in_list_view": 1, 
+   "label": "Class / Percentage", 
+   "oldfieldname": "class_per", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "maj_opt_subj", 
+   "fieldtype": "Text", 
+   "in_list_view": 1, 
+   "label": "Major/Optional Subjects", 
+   "oldfieldname": "maj_opt_subj", 
+   "oldfieldtype": "Text", 
+   "permlevel": 0
+  }
+ ], 
+ "idx": 1, 
+ "istable": 1, 
+ "modified": "2013-12-20 19:23:12", 
+ "modified_by": "Administrator", 
+ "module": "HR", 
+ "name": "Employee Education", 
+ "owner": "Administrator"
+}
\ No newline at end of file
diff --git a/erpnext/hr/doctype/employee_external_work_history/employee_external_work_history.txt b/erpnext/hr/doctype/employee_external_work_history/employee_external_work_history.txt
index 962c981..7ad2d8c 100644
--- a/erpnext/hr/doctype/employee_external_work_history/employee_external_work_history.txt
+++ b/erpnext/hr/doctype/employee_external_work_history/employee_external_work_history.txt
@@ -1,77 +1,69 @@
-[
- {
-  "creation": "2013-02-22 01:27:45", 
-  "docstatus": 0, 
-  "modified": "2013-12-20 19:23:12", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "doctype": "DocType", 
-  "istable": 1, 
-  "module": "HR", 
-  "name": "__common__"
- }, 
- {
-  "doctype": "DocField", 
-  "in_list_view": 1, 
-  "name": "__common__", 
-  "parent": "Employee External Work History", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Employee External Work History"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "company_name", 
-  "fieldtype": "Data", 
-  "label": "Company", 
-  "oldfieldname": "company_name", 
-  "oldfieldtype": "Data"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "designation", 
-  "fieldtype": "Data", 
-  "label": "Designation", 
-  "oldfieldname": "designation", 
-  "oldfieldtype": "Data"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "salary", 
-  "fieldtype": "Currency", 
-  "label": "Salary", 
-  "oldfieldname": "salary", 
-  "oldfieldtype": "Currency", 
-  "options": "Company:company:default_currency"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "address", 
-  "fieldtype": "Small Text", 
-  "label": "Address", 
-  "oldfieldname": "address", 
-  "oldfieldtype": "Small Text"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "contact", 
-  "fieldtype": "Data", 
-  "label": "Contact", 
-  "oldfieldname": "contact", 
-  "oldfieldtype": "Data"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "total_experience", 
-  "fieldtype": "Data", 
-  "label": "Total Experience", 
-  "oldfieldname": "total_experience", 
-  "oldfieldtype": "Data"
- }
-]
\ No newline at end of file
+{
+ "creation": "2013-02-22 01:27:45", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "fields": [
+  {
+   "fieldname": "company_name", 
+   "fieldtype": "Data", 
+   "in_list_view": 1, 
+   "label": "Company", 
+   "oldfieldname": "company_name", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "designation", 
+   "fieldtype": "Data", 
+   "in_list_view": 1, 
+   "label": "Designation", 
+   "oldfieldname": "designation", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "salary", 
+   "fieldtype": "Currency", 
+   "in_list_view": 1, 
+   "label": "Salary", 
+   "oldfieldname": "salary", 
+   "oldfieldtype": "Currency", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "address", 
+   "fieldtype": "Small Text", 
+   "in_list_view": 1, 
+   "label": "Address", 
+   "oldfieldname": "address", 
+   "oldfieldtype": "Small Text", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "contact", 
+   "fieldtype": "Data", 
+   "in_list_view": 1, 
+   "label": "Contact", 
+   "oldfieldname": "contact", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "total_experience", 
+   "fieldtype": "Data", 
+   "in_list_view": 1, 
+   "label": "Total Experience", 
+   "oldfieldname": "total_experience", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0
+  }
+ ], 
+ "idx": 1, 
+ "istable": 1, 
+ "modified": "2013-12-20 19:23:12", 
+ "modified_by": "Administrator", 
+ "module": "HR", 
+ "name": "Employee External Work History", 
+ "owner": "Administrator"
+}
\ No newline at end of file
diff --git a/erpnext/hr/doctype/employee_internal_work_history/employee_internal_work_history.txt b/erpnext/hr/doctype/employee_internal_work_history/employee_internal_work_history.txt
index 2c964fa..c9a9ab0 100644
--- a/erpnext/hr/doctype/employee_internal_work_history/employee_internal_work_history.txt
+++ b/erpnext/hr/doctype/employee_internal_work_history/employee_internal_work_history.txt
@@ -1,80 +1,72 @@
-[
- {
-  "creation": "2013-02-22 01:27:45", 
-  "docstatus": 0, 
-  "modified": "2013-12-20 19:23:12", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "doctype": "DocType", 
-  "istable": 1, 
-  "module": "HR", 
-  "name": "__common__"
- }, 
- {
-  "doctype": "DocField", 
-  "in_list_view": 1, 
-  "name": "__common__", 
-  "parent": "Employee Internal Work History", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Employee Internal Work History"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "branch", 
-  "fieldtype": "Select", 
-  "label": "Branch", 
-  "oldfieldname": "branch", 
-  "oldfieldtype": "Select", 
-  "options": "link:Branch"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "department", 
-  "fieldtype": "Select", 
-  "label": "Department", 
-  "oldfieldname": "department", 
-  "oldfieldtype": "Select", 
-  "options": "link:Department"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "designation", 
-  "fieldtype": "Select", 
-  "label": "Designation", 
-  "oldfieldname": "designation", 
-  "oldfieldtype": "Select", 
-  "options": "link:Designation"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "grade", 
-  "fieldtype": "Select", 
-  "label": "Grade", 
-  "oldfieldname": "grade", 
-  "oldfieldtype": "Select", 
-  "options": "link:Grade"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "from_date", 
-  "fieldtype": "Date", 
-  "label": "From Date", 
-  "oldfieldname": "from_date", 
-  "oldfieldtype": "Date"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "to_date", 
-  "fieldtype": "Date", 
-  "label": "To Date", 
-  "oldfieldname": "to_date", 
-  "oldfieldtype": "Date"
- }
-]
\ No newline at end of file
+{
+ "creation": "2013-02-22 01:27:45", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "fields": [
+  {
+   "fieldname": "branch", 
+   "fieldtype": "Select", 
+   "in_list_view": 1, 
+   "label": "Branch", 
+   "oldfieldname": "branch", 
+   "oldfieldtype": "Select", 
+   "options": "link:Branch", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "department", 
+   "fieldtype": "Select", 
+   "in_list_view": 1, 
+   "label": "Department", 
+   "oldfieldname": "department", 
+   "oldfieldtype": "Select", 
+   "options": "link:Department", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "designation", 
+   "fieldtype": "Select", 
+   "in_list_view": 1, 
+   "label": "Designation", 
+   "oldfieldname": "designation", 
+   "oldfieldtype": "Select", 
+   "options": "link:Designation", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "grade", 
+   "fieldtype": "Select", 
+   "in_list_view": 1, 
+   "label": "Grade", 
+   "oldfieldname": "grade", 
+   "oldfieldtype": "Select", 
+   "options": "link:Grade", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "from_date", 
+   "fieldtype": "Date", 
+   "in_list_view": 1, 
+   "label": "From Date", 
+   "oldfieldname": "from_date", 
+   "oldfieldtype": "Date", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "to_date", 
+   "fieldtype": "Date", 
+   "in_list_view": 1, 
+   "label": "To Date", 
+   "oldfieldname": "to_date", 
+   "oldfieldtype": "Date", 
+   "permlevel": 0
+  }
+ ], 
+ "idx": 1, 
+ "istable": 1, 
+ "modified": "2013-12-20 19:23:12", 
+ "modified_by": "Administrator", 
+ "module": "HR", 
+ "name": "Employee Internal Work History", 
+ "owner": "Administrator"
+}
\ No newline at end of file
diff --git a/erpnext/hr/doctype/employee_leave_approver/employee_leave_approver.txt b/erpnext/hr/doctype/employee_leave_approver/employee_leave_approver.txt
index 4b176d1..f3b2c29 100644
--- a/erpnext/hr/doctype/employee_leave_approver/employee_leave_approver.txt
+++ b/erpnext/hr/doctype/employee_leave_approver/employee_leave_approver.txt
@@ -1,40 +1,27 @@
-[
- {
-  "creation": "2013-04-12 06:56:15", 
-  "docstatus": 0, 
-  "modified": "2013-12-20 19:23:12", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "allow_import": 0, 
-  "autoname": "LAPPR-/.#####", 
-  "description": "Users who can approve a specific employee's leave applications", 
-  "doctype": "DocType", 
-  "istable": 1, 
-  "module": "HR", 
-  "name": "__common__"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "leave_approver", 
-  "fieldtype": "Select", 
-  "in_list_view": 1, 
-  "label": "Leave Approver", 
-  "name": "__common__", 
-  "parent": "Employee Leave Approver", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0, 
-  "print_hide": 1, 
-  "reqd": 1, 
-  "width": "200"
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Employee Leave Approver"
- }, 
- {
-  "doctype": "DocField"
- }
-]
\ No newline at end of file
+{
+ "allow_import": 0, 
+ "autoname": "LAPPR-/.#####", 
+ "creation": "2013-04-12 06:56:15", 
+ "description": "Users who can approve a specific employee's leave applications", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "fields": [
+  {
+   "fieldname": "leave_approver", 
+   "fieldtype": "Select", 
+   "in_list_view": 1, 
+   "label": "Leave Approver", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "reqd": 1, 
+   "width": "200"
+  }
+ ], 
+ "idx": 1, 
+ "istable": 1, 
+ "modified": "2013-12-20 19:23:12", 
+ "modified_by": "Administrator", 
+ "module": "HR", 
+ "name": "Employee Leave Approver", 
+ "owner": "Administrator"
+}
\ No newline at end of file
diff --git a/erpnext/hr/doctype/employment_type/employment_type.txt b/erpnext/hr/doctype/employment_type/employment_type.txt
index a91e145..435e366 100644
--- a/erpnext/hr/doctype/employment_type/employment_type.txt
+++ b/erpnext/hr/doctype/employment_type/employment_type.txt
@@ -1,73 +1,63 @@
-[
- {
-  "creation": "2013-01-10 16:34:14", 
-  "docstatus": 0, 
-  "modified": "2014-01-20 17:48:43", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "allow_import": 1, 
-  "autoname": "field:employee_type_name", 
-  "doctype": "DocType", 
-  "document_type": "Master", 
-  "icon": "icon-flag", 
-  "module": "HR", 
-  "name": "__common__"
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "Employment Type", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "cancel": 0, 
-  "create": 1, 
-  "delete": 1, 
-  "doctype": "DocPerm", 
-  "email": 1, 
-  "name": "__common__", 
-  "parent": "Employment Type", 
-  "parentfield": "permissions", 
-  "parenttype": "DocType", 
-  "permlevel": 0, 
-  "print": 1, 
-  "read": 1, 
-  "report": 1, 
-  "submit": 0, 
-  "write": 1
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Employment Type"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "employee_type_name", 
-  "fieldtype": "Data", 
-  "label": "Employment Type", 
-  "oldfieldname": "employee_type_name", 
-  "oldfieldtype": "Data", 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "trash_reason", 
-  "fieldtype": "Small Text", 
-  "label": "Trash Reason", 
-  "oldfieldname": "trash_reason", 
-  "oldfieldtype": "Small Text", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocPerm", 
-  "role": "HR User"
- }, 
- {
-  "doctype": "DocPerm", 
-  "role": "HR Manager"
- }
-]
\ No newline at end of file
+{
+ "allow_import": 1, 
+ "autoname": "field:employee_type_name", 
+ "creation": "2013-01-10 16:34:14", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "document_type": "Master", 
+ "fields": [
+  {
+   "fieldname": "employee_type_name", 
+   "fieldtype": "Data", 
+   "label": "Employment Type", 
+   "oldfieldname": "employee_type_name", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "trash_reason", 
+   "fieldtype": "Small Text", 
+   "label": "Trash Reason", 
+   "oldfieldname": "trash_reason", 
+   "oldfieldtype": "Small Text", 
+   "permlevel": 0, 
+   "read_only": 1
+  }
+ ], 
+ "icon": "icon-flag", 
+ "idx": 1, 
+ "modified": "2014-01-20 17:48:43", 
+ "modified_by": "Administrator", 
+ "module": "HR", 
+ "name": "Employment Type", 
+ "owner": "Administrator", 
+ "permissions": [
+  {
+   "cancel": 0, 
+   "create": 1, 
+   "delete": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "HR User", 
+   "submit": 0, 
+   "write": 1
+  }, 
+  {
+   "cancel": 0, 
+   "create": 1, 
+   "delete": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "HR Manager", 
+   "submit": 0, 
+   "write": 1
+  }
+ ]
+}
\ No newline at end of file
diff --git a/erpnext/hr/doctype/expense_claim/expense_claim.txt b/erpnext/hr/doctype/expense_claim/expense_claim.txt
index ac7f788..b735948 100644
--- a/erpnext/hr/doctype/expense_claim/expense_claim.txt
+++ b/erpnext/hr/doctype/expense_claim/expense_claim.txt
@@ -1,245 +1,238 @@
-[
- {
-  "creation": "2013-01-10 16:34:14", 
-  "docstatus": 0, 
-  "modified": "2014-01-22 16:05:34", 
-  "modified_by": "Administrator", 
-  "owner": "harshada@webnotestech.com"
- }, 
- {
-  "autoname": "EXP.######", 
-  "doctype": "DocType", 
-  "icon": "icon-money", 
-  "is_submittable": 1, 
-  "module": "HR", 
-  "name": "__common__", 
-  "search_fields": "approval_status,employee,employee_name"
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "Expense Claim", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "create": 1, 
-  "doctype": "DocPerm", 
-  "email": 1, 
-  "name": "__common__", 
-  "parent": "Expense Claim", 
-  "parentfield": "permissions", 
-  "parenttype": "DocType", 
-  "permlevel": 0, 
-  "print": 1, 
-  "read": 1, 
-  "report": 1, 
-  "write": 1
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Expense Claim"
- }, 
- {
-  "default": "Draft", 
-  "depends_on": "eval:!doc.__islocal", 
-  "doctype": "DocField", 
-  "fieldname": "approval_status", 
-  "fieldtype": "Select", 
-  "in_filter": 1, 
-  "in_list_view": 1, 
-  "label": "Approval Status", 
-  "no_copy": 1, 
-  "oldfieldname": "approval_status", 
-  "oldfieldtype": "Select", 
-  "options": "Draft\nApproved\nRejected", 
-  "search_index": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "exp_approver", 
-  "fieldtype": "Select", 
-  "label": "Approver", 
-  "oldfieldname": "exp_approver", 
-  "oldfieldtype": "Select", 
-  "width": "160px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break0", 
-  "fieldtype": "Column Break", 
-  "oldfieldtype": "Column Break", 
-  "width": "50%"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "total_claimed_amount", 
-  "fieldtype": "Currency", 
-  "in_filter": 0, 
-  "in_list_view": 1, 
-  "label": "Total Claimed Amount", 
-  "no_copy": 1, 
-  "oldfieldname": "total_claimed_amount", 
-  "oldfieldtype": "Currency", 
-  "options": "Company:company:default_currency", 
-  "read_only": 1, 
-  "reqd": 0, 
-  "width": "160px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "total_sanctioned_amount", 
-  "fieldtype": "Currency", 
-  "in_filter": 0, 
-  "in_list_view": 1, 
-  "label": "Total Sanctioned Amount", 
-  "no_copy": 1, 
-  "oldfieldname": "total_sanctioned_amount", 
-  "oldfieldtype": "Currency", 
-  "options": "Company:company:default_currency", 
-  "read_only": 1, 
-  "width": "160px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "expense_details", 
-  "fieldtype": "Section Break", 
-  "label": "Expense Details", 
-  "oldfieldtype": "Section Break"
- }, 
- {
-  "allow_on_submit": 0, 
-  "doctype": "DocField", 
-  "fieldname": "expense_voucher_details", 
-  "fieldtype": "Table", 
-  "label": "Expense Claim Details", 
-  "oldfieldname": "expense_voucher_details", 
-  "oldfieldtype": "Table", 
-  "options": "Expense Claim Detail"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "sb1", 
-  "fieldtype": "Section Break", 
-  "options": "Simple"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "employee", 
-  "fieldtype": "Link", 
-  "in_filter": 1, 
-  "label": "From Employee", 
-  "oldfieldname": "employee", 
-  "oldfieldtype": "Link", 
-  "options": "Employee", 
-  "reqd": 1, 
-  "search_index": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "employee_name", 
-  "fieldtype": "Data", 
-  "in_filter": 1, 
-  "in_list_view": 1, 
-  "label": "Employee Name", 
-  "oldfieldname": "employee_name", 
-  "oldfieldtype": "Data", 
-  "read_only": 1, 
-  "search_index": 0, 
-  "width": "150px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "fiscal_year", 
-  "fieldtype": "Select", 
-  "in_filter": 1, 
-  "label": "Fiscal Year", 
-  "oldfieldname": "fiscal_year", 
-  "oldfieldtype": "Select", 
-  "options": "link:Fiscal Year", 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "company", 
-  "fieldtype": "Select", 
-  "in_filter": 1, 
-  "label": "Company", 
-  "oldfieldname": "company", 
-  "oldfieldtype": "Link", 
-  "options": "link:Company", 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "cb1", 
-  "fieldtype": "Column Break"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "posting_date", 
-  "fieldtype": "Date", 
-  "in_filter": 1, 
-  "label": "Posting Date", 
-  "oldfieldname": "posting_date", 
-  "oldfieldtype": "Date", 
-  "reqd": 1
- }, 
- {
-  "allow_on_submit": 0, 
-  "doctype": "DocField", 
-  "fieldname": "remark", 
-  "fieldtype": "Small Text", 
-  "label": "Remark", 
-  "no_copy": 1, 
-  "oldfieldname": "remark", 
-  "oldfieldtype": "Small Text"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "email_id", 
-  "fieldtype": "Data", 
-  "hidden": 1, 
-  "label": "Employees Email Id", 
-  "oldfieldname": "email_id", 
-  "oldfieldtype": "Data", 
-  "print_hide": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "amended_from", 
-  "fieldtype": "Data", 
-  "ignore_restrictions": 1, 
-  "label": "Amended From", 
-  "no_copy": 1, 
-  "oldfieldname": "amended_from", 
-  "oldfieldtype": "Data", 
-  "print_hide": 1, 
-  "read_only": 1, 
-  "report_hide": 1, 
-  "width": "160px"
- }, 
- {
-  "delete": 0, 
-  "doctype": "DocPerm", 
-  "restricted": 1, 
-  "role": "Employee"
- }, 
- {
-  "amend": 1, 
-  "cancel": 1, 
-  "delete": 1, 
-  "doctype": "DocPerm", 
-  "role": "Expense Approver", 
-  "submit": 1
- }, 
- {
-  "amend": 1, 
-  "cancel": 1, 
-  "delete": 1, 
-  "doctype": "DocPerm", 
-  "role": "HR User", 
-  "submit": 1
- }
-]
\ No newline at end of file
+{
+ "autoname": "EXP.######", 
+ "creation": "2013-01-10 16:34:14", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "fields": [
+  {
+   "default": "Draft", 
+   "depends_on": "eval:!doc.__islocal", 
+   "fieldname": "approval_status", 
+   "fieldtype": "Select", 
+   "in_filter": 1, 
+   "in_list_view": 1, 
+   "label": "Approval Status", 
+   "no_copy": 1, 
+   "oldfieldname": "approval_status", 
+   "oldfieldtype": "Select", 
+   "options": "Draft\nApproved\nRejected", 
+   "permlevel": 0, 
+   "search_index": 1
+  }, 
+  {
+   "fieldname": "exp_approver", 
+   "fieldtype": "Select", 
+   "label": "Approver", 
+   "oldfieldname": "exp_approver", 
+   "oldfieldtype": "Select", 
+   "permlevel": 0, 
+   "width": "160px"
+  }, 
+  {
+   "fieldname": "column_break0", 
+   "fieldtype": "Column Break", 
+   "oldfieldtype": "Column Break", 
+   "permlevel": 0, 
+   "width": "50%"
+  }, 
+  {
+   "fieldname": "total_claimed_amount", 
+   "fieldtype": "Currency", 
+   "in_filter": 0, 
+   "in_list_view": 1, 
+   "label": "Total Claimed Amount", 
+   "no_copy": 1, 
+   "oldfieldname": "total_claimed_amount", 
+   "oldfieldtype": "Currency", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "read_only": 1, 
+   "reqd": 0, 
+   "width": "160px"
+  }, 
+  {
+   "fieldname": "total_sanctioned_amount", 
+   "fieldtype": "Currency", 
+   "in_filter": 0, 
+   "in_list_view": 1, 
+   "label": "Total Sanctioned Amount", 
+   "no_copy": 1, 
+   "oldfieldname": "total_sanctioned_amount", 
+   "oldfieldtype": "Currency", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "read_only": 1, 
+   "width": "160px"
+  }, 
+  {
+   "fieldname": "expense_details", 
+   "fieldtype": "Section Break", 
+   "label": "Expense Details", 
+   "oldfieldtype": "Section Break", 
+   "permlevel": 0
+  }, 
+  {
+   "allow_on_submit": 0, 
+   "fieldname": "expense_voucher_details", 
+   "fieldtype": "Table", 
+   "label": "Expense Claim Details", 
+   "oldfieldname": "expense_voucher_details", 
+   "oldfieldtype": "Table", 
+   "options": "Expense Claim Detail", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "sb1", 
+   "fieldtype": "Section Break", 
+   "options": "Simple", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "employee", 
+   "fieldtype": "Link", 
+   "in_filter": 1, 
+   "label": "From Employee", 
+   "oldfieldname": "employee", 
+   "oldfieldtype": "Link", 
+   "options": "Employee", 
+   "permlevel": 0, 
+   "reqd": 1, 
+   "search_index": 1
+  }, 
+  {
+   "fieldname": "employee_name", 
+   "fieldtype": "Data", 
+   "in_filter": 1, 
+   "in_list_view": 1, 
+   "label": "Employee Name", 
+   "oldfieldname": "employee_name", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "read_only": 1, 
+   "search_index": 0, 
+   "width": "150px"
+  }, 
+  {
+   "fieldname": "fiscal_year", 
+   "fieldtype": "Select", 
+   "in_filter": 1, 
+   "label": "Fiscal Year", 
+   "oldfieldname": "fiscal_year", 
+   "oldfieldtype": "Select", 
+   "options": "link:Fiscal Year", 
+   "permlevel": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "company", 
+   "fieldtype": "Select", 
+   "in_filter": 1, 
+   "label": "Company", 
+   "oldfieldname": "company", 
+   "oldfieldtype": "Link", 
+   "options": "link:Company", 
+   "permlevel": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "cb1", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "posting_date", 
+   "fieldtype": "Date", 
+   "in_filter": 1, 
+   "label": "Posting Date", 
+   "oldfieldname": "posting_date", 
+   "oldfieldtype": "Date", 
+   "permlevel": 0, 
+   "reqd": 1
+  }, 
+  {
+   "allow_on_submit": 0, 
+   "fieldname": "remark", 
+   "fieldtype": "Small Text", 
+   "label": "Remark", 
+   "no_copy": 1, 
+   "oldfieldname": "remark", 
+   "oldfieldtype": "Small Text", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "email_id", 
+   "fieldtype": "Data", 
+   "hidden": 1, 
+   "label": "Employees Email Id", 
+   "oldfieldname": "email_id", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "print_hide": 1
+  }, 
+  {
+   "fieldname": "amended_from", 
+   "fieldtype": "Data", 
+   "ignore_restrictions": 1, 
+   "label": "Amended From", 
+   "no_copy": 1, 
+   "oldfieldname": "amended_from", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1, 
+   "report_hide": 1, 
+   "width": "160px"
+  }
+ ], 
+ "icon": "icon-money", 
+ "idx": 1, 
+ "is_submittable": 1, 
+ "modified": "2014-01-22 16:05:34", 
+ "modified_by": "Administrator", 
+ "module": "HR", 
+ "name": "Expense Claim", 
+ "owner": "harshada@webnotestech.com", 
+ "permissions": [
+  {
+   "create": 1, 
+   "delete": 0, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "restricted": 1, 
+   "role": "Employee", 
+   "write": 1
+  }, 
+  {
+   "amend": 1, 
+   "cancel": 1, 
+   "create": 1, 
+   "delete": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Expense Approver", 
+   "submit": 1, 
+   "write": 1
+  }, 
+  {
+   "amend": 1, 
+   "cancel": 1, 
+   "create": 1, 
+   "delete": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "HR User", 
+   "submit": 1, 
+   "write": 1
+  }
+ ], 
+ "search_fields": "approval_status,employee,employee_name"
+}
\ No newline at end of file
diff --git a/erpnext/hr/doctype/expense_claim_detail/expense_claim_detail.txt b/erpnext/hr/doctype/expense_claim_detail/expense_claim_detail.txt
index 18b8036..c04a2be 100644
--- a/erpnext/hr/doctype/expense_claim_detail/expense_claim_detail.txt
+++ b/erpnext/hr/doctype/expense_claim_detail/expense_claim_detail.txt
@@ -1,86 +1,77 @@
-[
- {
-  "creation": "2013-02-22 01:27:46", 
-  "docstatus": 0, 
-  "modified": "2013-12-20 19:23:13", 
-  "modified_by": "Administrator", 
-  "owner": "harshada@webnotestech.com"
- }, 
- {
-  "doctype": "DocType", 
-  "istable": 1, 
-  "module": "HR", 
-  "name": "__common__"
- }, 
- {
-  "doctype": "DocField", 
-  "in_list_view": 1, 
-  "name": "__common__", 
-  "parent": "Expense Claim Detail", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Expense Claim Detail"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "expense_date", 
-  "fieldtype": "Date", 
-  "label": "Expense Date", 
-  "oldfieldname": "expense_date", 
-  "oldfieldtype": "Date", 
-  "print_width": "150px", 
-  "reqd": 0, 
-  "width": "150px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "expense_type", 
-  "fieldtype": "Select", 
-  "label": "Expense Claim Type", 
-  "oldfieldname": "expense_type", 
-  "oldfieldtype": "Link", 
-  "options": "link:Expense Claim Type", 
-  "print_width": "150px", 
-  "reqd": 1, 
-  "width": "150px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "description", 
-  "fieldtype": "Small Text", 
-  "label": "Description", 
-  "oldfieldname": "description", 
-  "oldfieldtype": "Small Text", 
-  "print_width": "300px", 
-  "width": "300px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "claim_amount", 
-  "fieldtype": "Currency", 
-  "label": "Claim Amount", 
-  "oldfieldname": "claim_amount", 
-  "oldfieldtype": "Currency", 
-  "options": "Company:company:default_currency", 
-  "print_width": "150px", 
-  "reqd": 1, 
-  "width": "150px"
- }, 
- {
-  "allow_on_submit": 0, 
-  "doctype": "DocField", 
-  "fieldname": "sanctioned_amount", 
-  "fieldtype": "Currency", 
-  "label": "Sanctioned Amount", 
-  "no_copy": 1, 
-  "oldfieldname": "sanctioned_amount", 
-  "oldfieldtype": "Currency", 
-  "options": "Company:company:default_currency", 
-  "print_width": "150px", 
-  "width": "150px"
- }
-]
\ No newline at end of file
+{
+ "creation": "2013-02-22 01:27:46", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "fields": [
+  {
+   "fieldname": "expense_date", 
+   "fieldtype": "Date", 
+   "in_list_view": 1, 
+   "label": "Expense Date", 
+   "oldfieldname": "expense_date", 
+   "oldfieldtype": "Date", 
+   "permlevel": 0, 
+   "print_width": "150px", 
+   "reqd": 0, 
+   "width": "150px"
+  }, 
+  {
+   "fieldname": "expense_type", 
+   "fieldtype": "Select", 
+   "in_list_view": 1, 
+   "label": "Expense Claim Type", 
+   "oldfieldname": "expense_type", 
+   "oldfieldtype": "Link", 
+   "options": "link:Expense Claim Type", 
+   "permlevel": 0, 
+   "print_width": "150px", 
+   "reqd": 1, 
+   "width": "150px"
+  }, 
+  {
+   "fieldname": "description", 
+   "fieldtype": "Small Text", 
+   "in_list_view": 1, 
+   "label": "Description", 
+   "oldfieldname": "description", 
+   "oldfieldtype": "Small Text", 
+   "permlevel": 0, 
+   "print_width": "300px", 
+   "width": "300px"
+  }, 
+  {
+   "fieldname": "claim_amount", 
+   "fieldtype": "Currency", 
+   "in_list_view": 1, 
+   "label": "Claim Amount", 
+   "oldfieldname": "claim_amount", 
+   "oldfieldtype": "Currency", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "print_width": "150px", 
+   "reqd": 1, 
+   "width": "150px"
+  }, 
+  {
+   "allow_on_submit": 0, 
+   "fieldname": "sanctioned_amount", 
+   "fieldtype": "Currency", 
+   "in_list_view": 1, 
+   "label": "Sanctioned Amount", 
+   "no_copy": 1, 
+   "oldfieldname": "sanctioned_amount", 
+   "oldfieldtype": "Currency", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "print_width": "150px", 
+   "width": "150px"
+  }
+ ], 
+ "idx": 1, 
+ "istable": 1, 
+ "modified": "2013-12-20 19:23:13", 
+ "modified_by": "Administrator", 
+ "module": "HR", 
+ "name": "Expense Claim Detail", 
+ "owner": "harshada@webnotestech.com"
+}
\ No newline at end of file
diff --git a/erpnext/hr/doctype/expense_claim_type/expense_claim_type.txt b/erpnext/hr/doctype/expense_claim_type/expense_claim_type.txt
index 689da6e..7f08f3b 100644
--- a/erpnext/hr/doctype/expense_claim_type/expense_claim_type.txt
+++ b/erpnext/hr/doctype/expense_claim_type/expense_claim_type.txt
@@ -1,68 +1,49 @@
-[
- {
-  "creation": "2012-03-27 14:35:55", 
-  "docstatus": 0, 
-  "modified": "2013-12-20 19:24:07", 
-  "modified_by": "Administrator", 
-  "owner": "harshada@webnotestech.com"
- }, 
- {
-  "allow_import": 1, 
-  "autoname": "field:expense_type", 
-  "doctype": "DocType", 
-  "document_type": "Master", 
-  "icon": "icon-flag", 
-  "module": "HR", 
-  "name": "__common__"
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "Expense Claim Type", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "create": 1, 
-  "doctype": "DocPerm", 
-  "email": 1, 
-  "name": "__common__", 
-  "parent": "Expense Claim Type", 
-  "parentfield": "permissions", 
-  "parenttype": "DocType", 
-  "permlevel": 0, 
-  "print": 1, 
-  "read": 1, 
-  "report": 1, 
-  "role": "HR Manager", 
-  "write": 1
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Expense Claim Type"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "expense_type", 
-  "fieldtype": "Data", 
-  "in_filter": 0, 
-  "label": "Expense Claim Type", 
-  "oldfieldname": "expense_type", 
-  "oldfieldtype": "Data", 
-  "reqd": 1, 
-  "search_index": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "description", 
-  "fieldtype": "Small Text", 
-  "label": "Description", 
-  "oldfieldname": "description", 
-  "oldfieldtype": "Small Text", 
-  "width": "300px"
- }, 
- {
-  "doctype": "DocPerm"
- }
-]
\ No newline at end of file
+{
+ "allow_import": 1, 
+ "autoname": "field:expense_type", 
+ "creation": "2012-03-27 14:35:55", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "document_type": "Master", 
+ "fields": [
+  {
+   "fieldname": "expense_type", 
+   "fieldtype": "Data", 
+   "in_filter": 0, 
+   "label": "Expense Claim Type", 
+   "oldfieldname": "expense_type", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "reqd": 1, 
+   "search_index": 0
+  }, 
+  {
+   "fieldname": "description", 
+   "fieldtype": "Small Text", 
+   "label": "Description", 
+   "oldfieldname": "description", 
+   "oldfieldtype": "Small Text", 
+   "permlevel": 0, 
+   "width": "300px"
+  }
+ ], 
+ "icon": "icon-flag", 
+ "idx": 1, 
+ "modified": "2013-12-20 19:24:07", 
+ "modified_by": "Administrator", 
+ "module": "HR", 
+ "name": "Expense Claim Type", 
+ "owner": "harshada@webnotestech.com", 
+ "permissions": [
+  {
+   "create": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "HR Manager", 
+   "write": 1
+  }
+ ]
+}
\ No newline at end of file
diff --git a/erpnext/hr/doctype/grade/grade.txt b/erpnext/hr/doctype/grade/grade.txt
index dcadd63..1f56bda 100644
--- a/erpnext/hr/doctype/grade/grade.txt
+++ b/erpnext/hr/doctype/grade/grade.txt
@@ -1,60 +1,41 @@
-[
- {
-  "creation": "2013-01-10 16:34:14", 
-  "docstatus": 0, 
-  "modified": "2014-01-20 17:48:46", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "allow_import": 1, 
-  "autoname": "field:grade_name", 
-  "doctype": "DocType", 
-  "document_type": "Master", 
-  "icon": "icon-star-half-empty", 
-  "module": "HR", 
-  "name": "__common__"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "grade_name", 
-  "fieldtype": "Data", 
-  "label": "Grade", 
-  "name": "__common__", 
-  "oldfieldname": "grade_name", 
-  "oldfieldtype": "Data", 
-  "parent": "Grade", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0, 
-  "reqd": 1
- }, 
- {
-  "cancel": 0, 
-  "create": 1, 
-  "delete": 1, 
-  "doctype": "DocPerm", 
-  "email": 1, 
-  "name": "__common__", 
-  "parent": "Grade", 
-  "parentfield": "permissions", 
-  "parenttype": "DocType", 
-  "permlevel": 0, 
-  "print": 1, 
-  "read": 1, 
-  "report": 1, 
-  "role": "HR User", 
-  "submit": 0, 
-  "write": 1
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Grade"
- }, 
- {
-  "doctype": "DocField"
- }, 
- {
-  "doctype": "DocPerm"
- }
-]
\ No newline at end of file
+{
+ "allow_import": 1, 
+ "autoname": "field:grade_name", 
+ "creation": "2013-01-10 16:34:14", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "document_type": "Master", 
+ "fields": [
+  {
+   "fieldname": "grade_name", 
+   "fieldtype": "Data", 
+   "label": "Grade", 
+   "oldfieldname": "grade_name", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "reqd": 1
+  }
+ ], 
+ "icon": "icon-star-half-empty", 
+ "idx": 1, 
+ "modified": "2014-01-20 17:48:46", 
+ "modified_by": "Administrator", 
+ "module": "HR", 
+ "name": "Grade", 
+ "owner": "Administrator", 
+ "permissions": [
+  {
+   "cancel": 0, 
+   "create": 1, 
+   "delete": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "HR User", 
+   "submit": 0, 
+   "write": 1
+  }
+ ]
+}
\ No newline at end of file
diff --git a/erpnext/hr/doctype/holiday/holiday.txt b/erpnext/hr/doctype/holiday/holiday.txt
index ad8ddb0..39f9383 100644
--- a/erpnext/hr/doctype/holiday/holiday.txt
+++ b/erpnext/hr/doctype/holiday/holiday.txt
@@ -1,44 +1,32 @@
-[
- {
-  "creation": "2013-02-22 01:27:46", 
-  "docstatus": 0, 
-  "modified": "2013-12-20 19:23:14", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "doctype": "DocType", 
-  "istable": 1, 
-  "module": "HR", 
-  "name": "__common__"
- }, 
- {
-  "doctype": "DocField", 
-  "in_list_view": 1, 
-  "name": "__common__", 
-  "parent": "Holiday", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Holiday"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "description", 
-  "fieldtype": "Small Text", 
-  "label": "Description", 
-  "print_width": "300px", 
-  "width": "300px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "holiday_date", 
-  "fieldtype": "Date", 
-  "label": "Date", 
-  "oldfieldname": "holiday_date", 
-  "oldfieldtype": "Date"
- }
-]
\ No newline at end of file
+{
+ "creation": "2013-02-22 01:27:46", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "fields": [
+  {
+   "fieldname": "description", 
+   "fieldtype": "Small Text", 
+   "in_list_view": 1, 
+   "label": "Description", 
+   "permlevel": 0, 
+   "print_width": "300px", 
+   "width": "300px"
+  }, 
+  {
+   "fieldname": "holiday_date", 
+   "fieldtype": "Date", 
+   "in_list_view": 1, 
+   "label": "Date", 
+   "oldfieldname": "holiday_date", 
+   "oldfieldtype": "Date", 
+   "permlevel": 0
+  }
+ ], 
+ "idx": 1, 
+ "istable": 1, 
+ "modified": "2013-12-20 19:23:14", 
+ "modified_by": "Administrator", 
+ "module": "HR", 
+ "name": "Holiday", 
+ "owner": "Administrator"
+}
\ No newline at end of file
diff --git a/erpnext/hr/doctype/holiday_list/holiday_list.txt b/erpnext/hr/doctype/holiday_list/holiday_list.txt
index 3122583..66e57fc 100644
--- a/erpnext/hr/doctype/holiday_list/holiday_list.txt
+++ b/erpnext/hr/doctype/holiday_list/holiday_list.txt
@@ -1,119 +1,100 @@
-[
- {
-  "creation": "2013-01-10 16:34:14", 
-  "docstatus": 0, 
-  "modified": "2014-01-20 17:48:46", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "allow_import": 1, 
-  "doctype": "DocType", 
-  "document_type": "Master", 
-  "icon": "icon-calendar", 
-  "module": "HR", 
-  "name": "__common__"
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "Holiday List", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "cancel": 0, 
-  "create": 1, 
-  "delete": 1, 
-  "doctype": "DocPerm", 
-  "email": 1, 
-  "name": "__common__", 
-  "parent": "Holiday List", 
-  "parentfield": "permissions", 
-  "parenttype": "DocType", 
-  "permlevel": 0, 
-  "print": 1, 
-  "read": 1, 
-  "report": 1, 
-  "role": "HR Manager", 
-  "submit": 0, 
-  "write": 1
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Holiday List"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "trash_reason", 
-  "fieldtype": "Small Text", 
-  "label": "Trash Reason", 
-  "oldfieldname": "trash_reason", 
-  "oldfieldtype": "Small Text", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "holiday_list_name", 
-  "fieldtype": "Data", 
-  "label": "Holiday List Name", 
-  "oldfieldname": "holiday_list_name", 
-  "oldfieldtype": "Data", 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "is_default", 
-  "fieldtype": "Check", 
-  "label": "Default"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "fiscal_year", 
-  "fieldtype": "Select", 
-  "in_filter": 1, 
-  "label": "Fiscal Year", 
-  "oldfieldname": "fiscal_year", 
-  "oldfieldtype": "Link", 
-  "options": "link:Fiscal Year", 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "weekly_off", 
-  "fieldtype": "Select", 
-  "label": "Weekly Off", 
-  "no_copy": 1, 
-  "options": "\nSunday\nMonday\nTuesday\nWednesday\nThursday\nFriday\nSaturday", 
-  "print_hide": 1, 
-  "report_hide": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "get_weekly_off_dates", 
-  "fieldtype": "Button", 
-  "label": "Get Weekly Off Dates", 
-  "options": "get_weekly_off_dates"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "holiday_list_details", 
-  "fieldtype": "Table", 
-  "label": "Holidays", 
-  "oldfieldname": "holiday_list_details", 
-  "oldfieldtype": "Table", 
-  "options": "Holiday", 
-  "reqd": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "clear_table", 
-  "fieldtype": "Button", 
-  "label": "Clear Table", 
-  "options": "clear_table"
- }, 
- {
-  "doctype": "DocPerm"
- }
-]
\ No newline at end of file
+{
+ "allow_import": 1, 
+ "creation": "2013-01-10 16:34:14", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "document_type": "Master", 
+ "fields": [
+  {
+   "fieldname": "trash_reason", 
+   "fieldtype": "Small Text", 
+   "label": "Trash Reason", 
+   "oldfieldname": "trash_reason", 
+   "oldfieldtype": "Small Text", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "holiday_list_name", 
+   "fieldtype": "Data", 
+   "label": "Holiday List Name", 
+   "oldfieldname": "holiday_list_name", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "is_default", 
+   "fieldtype": "Check", 
+   "label": "Default", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "fiscal_year", 
+   "fieldtype": "Select", 
+   "in_filter": 1, 
+   "label": "Fiscal Year", 
+   "oldfieldname": "fiscal_year", 
+   "oldfieldtype": "Link", 
+   "options": "link:Fiscal Year", 
+   "permlevel": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "weekly_off", 
+   "fieldtype": "Select", 
+   "label": "Weekly Off", 
+   "no_copy": 1, 
+   "options": "\nSunday\nMonday\nTuesday\nWednesday\nThursday\nFriday\nSaturday", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "report_hide": 1
+  }, 
+  {
+   "fieldname": "get_weekly_off_dates", 
+   "fieldtype": "Button", 
+   "label": "Get Weekly Off Dates", 
+   "options": "get_weekly_off_dates", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "holiday_list_details", 
+   "fieldtype": "Table", 
+   "label": "Holidays", 
+   "oldfieldname": "holiday_list_details", 
+   "oldfieldtype": "Table", 
+   "options": "Holiday", 
+   "permlevel": 0, 
+   "reqd": 0
+  }, 
+  {
+   "fieldname": "clear_table", 
+   "fieldtype": "Button", 
+   "label": "Clear Table", 
+   "options": "clear_table", 
+   "permlevel": 0
+  }
+ ], 
+ "icon": "icon-calendar", 
+ "idx": 1, 
+ "modified": "2014-01-20 17:48:46", 
+ "modified_by": "Administrator", 
+ "module": "HR", 
+ "name": "Holiday List", 
+ "owner": "Administrator", 
+ "permissions": [
+  {
+   "cancel": 0, 
+   "create": 1, 
+   "delete": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "HR Manager", 
+   "submit": 0, 
+   "write": 1
+  }
+ ]
+}
\ No newline at end of file
diff --git a/erpnext/hr/doctype/hr_settings/hr_settings.txt b/erpnext/hr/doctype/hr_settings/hr_settings.txt
index d30dc0a..2b94c0b 100644
--- a/erpnext/hr/doctype/hr_settings/hr_settings.txt
+++ b/erpnext/hr/doctype/hr_settings/hr_settings.txt
@@ -1,81 +1,62 @@
-[
- {
-  "creation": "2013-08-02 13:45:23", 
-  "docstatus": 0, 
-  "modified": "2014-02-19 17:40:18", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "doctype": "DocType", 
-  "document_type": "Other", 
-  "icon": "icon-cog", 
-  "issingle": 1, 
-  "module": "HR", 
-  "name": "__common__"
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "HR Settings", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "create": 1, 
-  "doctype": "DocPerm", 
-  "email": 1, 
-  "name": "__common__", 
-  "parent": "HR Settings", 
-  "parentfield": "permissions", 
-  "parenttype": "DocType", 
-  "permlevel": 0, 
-  "print": 1, 
-  "read": 1, 
-  "role": "System Manager", 
-  "write": 1
- }, 
- {
-  "doctype": "DocType", 
-  "name": "HR Settings"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "employee_settings", 
-  "fieldtype": "Section Break", 
-  "label": "Employee Settings"
- }, 
- {
-  "default": "Naming Series", 
-  "description": "Employee record is created using selected field. ", 
-  "doctype": "DocField", 
-  "fieldname": "emp_created_by", 
-  "fieldtype": "Select", 
-  "label": "Employee Records to be created by", 
-  "options": "Naming Series\nEmployee Number"
- }, 
- {
-  "description": "Don't send Employee Birthday Reminders", 
-  "doctype": "DocField", 
-  "fieldname": "stop_birthday_reminders", 
-  "fieldtype": "Check", 
-  "label": "Stop Birthday Reminders"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "payroll_settings", 
-  "fieldtype": "Section Break", 
-  "label": "Payroll Settings"
- }, 
- {
-  "description": "If checked, Total no. of Working Days will include holidays, and this will reduce the value of Salary Per Day", 
-  "doctype": "DocField", 
-  "fieldname": "include_holidays_in_total_working_days", 
-  "fieldtype": "Check", 
-  "label": "Include holidays in Total no. of Working Days"
- }, 
- {
-  "doctype": "DocPerm"
- }
-]
\ No newline at end of file
+{
+ "creation": "2013-08-02 13:45:23", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "document_type": "Other", 
+ "fields": [
+  {
+   "fieldname": "employee_settings", 
+   "fieldtype": "Section Break", 
+   "label": "Employee Settings", 
+   "permlevel": 0
+  }, 
+  {
+   "default": "Naming Series", 
+   "description": "Employee record is created using selected field. ", 
+   "fieldname": "emp_created_by", 
+   "fieldtype": "Select", 
+   "label": "Employee Records to be created by", 
+   "options": "Naming Series\nEmployee Number", 
+   "permlevel": 0
+  }, 
+  {
+   "description": "Don't send Employee Birthday Reminders", 
+   "fieldname": "stop_birthday_reminders", 
+   "fieldtype": "Check", 
+   "label": "Stop Birthday Reminders", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "payroll_settings", 
+   "fieldtype": "Section Break", 
+   "label": "Payroll Settings", 
+   "permlevel": 0
+  }, 
+  {
+   "description": "If checked, Total no. of Working Days will include holidays, and this will reduce the value of Salary Per Day", 
+   "fieldname": "include_holidays_in_total_working_days", 
+   "fieldtype": "Check", 
+   "label": "Include holidays in Total no. of Working Days", 
+   "permlevel": 0
+  }
+ ], 
+ "icon": "icon-cog", 
+ "idx": 1, 
+ "issingle": 1, 
+ "modified": "2014-02-19 17:40:18", 
+ "modified_by": "Administrator", 
+ "module": "HR", 
+ "name": "HR Settings", 
+ "owner": "Administrator", 
+ "permissions": [
+  {
+   "create": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "role": "System Manager", 
+   "write": 1
+  }
+ ]
+}
\ No newline at end of file
diff --git a/erpnext/hr/doctype/job_applicant/job_applicant.txt b/erpnext/hr/doctype/job_applicant/job_applicant.txt
index fd463fb..a7edcff 100644
--- a/erpnext/hr/doctype/job_applicant/job_applicant.txt
+++ b/erpnext/hr/doctype/job_applicant/job_applicant.txt
@@ -1,107 +1,88 @@
-[
- {
-  "creation": "2013-01-29 19:25:37", 
-  "docstatus": 0, 
-  "modified": "2014-01-20 17:48:50", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "allow_attach": 1, 
-  "autoname": "field:applicant_name", 
-  "description": "Applicant for a Job", 
-  "doctype": "DocType", 
-  "document_type": "Transaction", 
-  "icon": "icon-user", 
-  "module": "HR", 
-  "name": "__common__"
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "Job Applicant", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "cancel": 1, 
-  "create": 1, 
-  "delete": 1, 
-  "doctype": "DocPerm", 
-  "email": 1, 
-  "name": "__common__", 
-  "parent": "Job Applicant", 
-  "parentfield": "permissions", 
-  "parenttype": "DocType", 
-  "permlevel": 0, 
-  "print": 1, 
-  "read": 1, 
-  "report": 1, 
-  "role": "HR User", 
-  "write": 1
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Job Applicant"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "applicant_name", 
-  "fieldtype": "Data", 
-  "in_list_view": 1, 
-  "label": "Applicant Name", 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "email_id", 
-  "fieldtype": "Data", 
-  "label": "Email Id"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "status", 
-  "fieldtype": "Select", 
-  "in_list_view": 1, 
-  "label": "Status", 
-  "options": "Open\nReplied\nRejected\nHold"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break_3", 
-  "fieldtype": "Column Break", 
-  "width": "50%"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "job_opening", 
-  "fieldtype": "Link", 
-  "in_list_view": 1, 
-  "label": "Job Opening", 
-  "options": "Job Opening"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "section_break_5", 
-  "fieldtype": "Section Break"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "thread_html", 
-  "fieldtype": "HTML", 
-  "label": "Thread HTML"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "communications", 
-  "fieldtype": "Table", 
-  "hidden": 1, 
-  "label": "Communications", 
-  "options": "Communication", 
-  "print_hide": 1
- }, 
- {
-  "doctype": "DocPerm"
- }
-]
\ No newline at end of file
+{
+ "allow_attach": 1, 
+ "autoname": "field:applicant_name", 
+ "creation": "2013-01-29 19:25:37", 
+ "description": "Applicant for a Job", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "document_type": "Transaction", 
+ "fields": [
+  {
+   "fieldname": "applicant_name", 
+   "fieldtype": "Data", 
+   "in_list_view": 1, 
+   "label": "Applicant Name", 
+   "permlevel": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "email_id", 
+   "fieldtype": "Data", 
+   "label": "Email Id", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "status", 
+   "fieldtype": "Select", 
+   "in_list_view": 1, 
+   "label": "Status", 
+   "options": "Open\nReplied\nRejected\nHold", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "column_break_3", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0, 
+   "width": "50%"
+  }, 
+  {
+   "fieldname": "job_opening", 
+   "fieldtype": "Link", 
+   "in_list_view": 1, 
+   "label": "Job Opening", 
+   "options": "Job Opening", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "section_break_5", 
+   "fieldtype": "Section Break", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "thread_html", 
+   "fieldtype": "HTML", 
+   "label": "Thread HTML", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "communications", 
+   "fieldtype": "Table", 
+   "hidden": 1, 
+   "label": "Communications", 
+   "options": "Communication", 
+   "permlevel": 0, 
+   "print_hide": 1
+  }
+ ], 
+ "icon": "icon-user", 
+ "idx": 1, 
+ "modified": "2014-01-20 17:48:50", 
+ "modified_by": "Administrator", 
+ "module": "HR", 
+ "name": "Job Applicant", 
+ "owner": "Administrator", 
+ "permissions": [
+  {
+   "cancel": 1, 
+   "create": 1, 
+   "delete": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "HR User", 
+   "write": 1
+  }
+ ]
+}
\ No newline at end of file
diff --git a/erpnext/hr/doctype/job_opening/job_opening.txt b/erpnext/hr/doctype/job_opening/job_opening.txt
index b118b6a..827f94c 100644
--- a/erpnext/hr/doctype/job_opening/job_opening.txt
+++ b/erpnext/hr/doctype/job_opening/job_opening.txt
@@ -1,71 +1,52 @@
-[
- {
-  "creation": "2013-01-15 16:13:36", 
-  "docstatus": 0, 
-  "modified": "2014-01-20 17:48:51", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "autoname": "field:job_title", 
-  "description": "Description of a Job Opening", 
-  "doctype": "DocType", 
-  "document_type": "Transaction", 
-  "icon": "icon-bookmark", 
-  "module": "HR", 
-  "name": "__common__"
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "Job Opening", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "cancel": 1, 
-  "create": 1, 
-  "delete": 1, 
-  "doctype": "DocPerm", 
-  "email": 1, 
-  "name": "__common__", 
-  "parent": "Job Opening", 
-  "parentfield": "permissions", 
-  "parenttype": "DocType", 
-  "permlevel": 0, 
-  "print": 1, 
-  "read": 1, 
-  "report": 1, 
-  "role": "HR User", 
-  "write": 1
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Job Opening"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "job_title", 
-  "fieldtype": "Data", 
-  "label": "Job Title", 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "status", 
-  "fieldtype": "Select", 
-  "label": "Status", 
-  "options": "Open\nClosed"
- }, 
- {
-  "description": "Job profile, qualifications required etc.", 
-  "doctype": "DocField", 
-  "fieldname": "description", 
-  "fieldtype": "Text Editor", 
-  "label": "Description"
- }, 
- {
-  "doctype": "DocPerm"
- }
-]
\ No newline at end of file
+{
+ "autoname": "field:job_title", 
+ "creation": "2013-01-15 16:13:36", 
+ "description": "Description of a Job Opening", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "document_type": "Transaction", 
+ "fields": [
+  {
+   "fieldname": "job_title", 
+   "fieldtype": "Data", 
+   "label": "Job Title", 
+   "permlevel": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "status", 
+   "fieldtype": "Select", 
+   "label": "Status", 
+   "options": "Open\nClosed", 
+   "permlevel": 0
+  }, 
+  {
+   "description": "Job profile, qualifications required etc.", 
+   "fieldname": "description", 
+   "fieldtype": "Text Editor", 
+   "label": "Description", 
+   "permlevel": 0
+  }
+ ], 
+ "icon": "icon-bookmark", 
+ "idx": 1, 
+ "modified": "2014-01-20 17:48:51", 
+ "modified_by": "Administrator", 
+ "module": "HR", 
+ "name": "Job Opening", 
+ "owner": "Administrator", 
+ "permissions": [
+  {
+   "cancel": 1, 
+   "create": 1, 
+   "delete": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "HR User", 
+   "write": 1
+  }
+ ]
+}
\ No newline at end of file
diff --git a/erpnext/hr/doctype/leave_allocation/leave_allocation.txt b/erpnext/hr/doctype/leave_allocation/leave_allocation.txt
index 60f2523..bf57630 100644
--- a/erpnext/hr/doctype/leave_allocation/leave_allocation.txt
+++ b/erpnext/hr/doctype/leave_allocation/leave_allocation.txt
@@ -1,181 +1,172 @@
-[
- {
-  "creation": "2013-02-20 19:10:38", 
-  "docstatus": 0, 
-  "modified": "2014-01-22 16:05:35", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "allow_import": 1, 
-  "autoname": "LAL/.#####", 
-  "doctype": "DocType", 
-  "icon": "icon-ok", 
-  "is_submittable": 1, 
-  "module": "HR", 
-  "name": "__common__", 
-  "search_fields": "employee,employee_name,leave_type,total_leaves_allocated,fiscal_year"
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "Leave Allocation", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "amend": 1, 
-  "cancel": 1, 
-  "create": 1, 
-  "delete": 1, 
-  "doctype": "DocPerm", 
-  "email": 1, 
-  "name": "__common__", 
-  "parent": "Leave Allocation", 
-  "parentfield": "permissions", 
-  "parenttype": "DocType", 
-  "permlevel": 0, 
-  "print": 1, 
-  "read": 1, 
-  "report": 1, 
-  "submit": 1, 
-  "write": 1
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Leave Allocation"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break0", 
-  "fieldtype": "Column Break", 
-  "width": "50%"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "employee", 
-  "fieldtype": "Link", 
-  "in_filter": 1, 
-  "label": "Employee", 
-  "oldfieldname": "employee", 
-  "oldfieldtype": "Link", 
-  "options": "Employee", 
-  "reqd": 1, 
-  "search_index": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "employee_name", 
-  "fieldtype": "Data", 
-  "in_filter": 1, 
-  "label": "Employee Name", 
-  "read_only": 1, 
-  "search_index": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "leave_type", 
-  "fieldtype": "Select", 
-  "in_filter": 1, 
-  "label": "Leave Type", 
-  "oldfieldname": "leave_type", 
-  "oldfieldtype": "Link", 
-  "options": "link:Leave Type", 
-  "reqd": 1, 
-  "search_index": 1
- }, 
- {
-  "default": "Today", 
-  "doctype": "DocField", 
-  "fieldname": "posting_date", 
-  "fieldtype": "Date", 
-  "hidden": 0, 
-  "label": "Posting Date", 
-  "no_copy": 1, 
-  "oldfieldname": "date", 
-  "oldfieldtype": "Date", 
-  "read_only": 1, 
-  "reqd": 1, 
-  "search_index": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "fiscal_year", 
-  "fieldtype": "Select", 
-  "in_filter": 1, 
-  "label": "Fiscal Year", 
-  "oldfieldname": "fiscal_year", 
-  "oldfieldtype": "Data", 
-  "options": "link:Fiscal Year", 
-  "reqd": 1, 
-  "search_index": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "description", 
-  "fieldtype": "Small Text", 
-  "hidden": 0, 
-  "label": "Description", 
-  "oldfieldname": "reason", 
-  "oldfieldtype": "Small Text", 
-  "width": "300px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break1", 
-  "fieldtype": "Column Break", 
-  "width": "50%"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "carry_forward", 
-  "fieldtype": "Check", 
-  "label": "Carry Forward"
- }, 
- {
-  "depends_on": "carry_forward", 
-  "doctype": "DocField", 
-  "fieldname": "carry_forwarded_leaves", 
-  "fieldtype": "Float", 
-  "label": "Carry Forwarded Leaves", 
-  "read_only": 1
- }, 
- {
-  "allow_on_submit": 1, 
-  "doctype": "DocField", 
-  "fieldname": "new_leaves_allocated", 
-  "fieldtype": "Float", 
-  "label": "New Leaves Allocated"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "total_leaves_allocated", 
-  "fieldtype": "Float", 
-  "label": "Total Leaves Allocated", 
-  "read_only": 1, 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "amended_from", 
-  "fieldtype": "Data", 
-  "hidden": 0, 
-  "ignore_restrictions": 1, 
-  "label": "Amended From", 
-  "no_copy": 1, 
-  "oldfieldname": "amended_from", 
-  "oldfieldtype": "Data", 
-  "print_hide": 1, 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocPerm", 
-  "restricted": 1, 
-  "role": "HR User"
- }, 
- {
-  "doctype": "DocPerm", 
-  "role": "HR Manager"
- }
-]
\ No newline at end of file
+{
+ "allow_import": 1, 
+ "autoname": "LAL/.#####", 
+ "creation": "2013-02-20 19:10:38", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "fields": [
+  {
+   "fieldname": "column_break0", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0, 
+   "width": "50%"
+  }, 
+  {
+   "fieldname": "employee", 
+   "fieldtype": "Link", 
+   "in_filter": 1, 
+   "label": "Employee", 
+   "oldfieldname": "employee", 
+   "oldfieldtype": "Link", 
+   "options": "Employee", 
+   "permlevel": 0, 
+   "reqd": 1, 
+   "search_index": 1
+  }, 
+  {
+   "fieldname": "employee_name", 
+   "fieldtype": "Data", 
+   "in_filter": 1, 
+   "label": "Employee Name", 
+   "permlevel": 0, 
+   "read_only": 1, 
+   "search_index": 1
+  }, 
+  {
+   "fieldname": "leave_type", 
+   "fieldtype": "Select", 
+   "in_filter": 1, 
+   "label": "Leave Type", 
+   "oldfieldname": "leave_type", 
+   "oldfieldtype": "Link", 
+   "options": "link:Leave Type", 
+   "permlevel": 0, 
+   "reqd": 1, 
+   "search_index": 1
+  }, 
+  {
+   "default": "Today", 
+   "fieldname": "posting_date", 
+   "fieldtype": "Date", 
+   "hidden": 0, 
+   "label": "Posting Date", 
+   "no_copy": 1, 
+   "oldfieldname": "date", 
+   "oldfieldtype": "Date", 
+   "permlevel": 0, 
+   "read_only": 1, 
+   "reqd": 1, 
+   "search_index": 0
+  }, 
+  {
+   "fieldname": "fiscal_year", 
+   "fieldtype": "Select", 
+   "in_filter": 1, 
+   "label": "Fiscal Year", 
+   "oldfieldname": "fiscal_year", 
+   "oldfieldtype": "Data", 
+   "options": "link:Fiscal Year", 
+   "permlevel": 0, 
+   "reqd": 1, 
+   "search_index": 1
+  }, 
+  {
+   "fieldname": "description", 
+   "fieldtype": "Small Text", 
+   "hidden": 0, 
+   "label": "Description", 
+   "oldfieldname": "reason", 
+   "oldfieldtype": "Small Text", 
+   "permlevel": 0, 
+   "width": "300px"
+  }, 
+  {
+   "fieldname": "column_break1", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0, 
+   "width": "50%"
+  }, 
+  {
+   "fieldname": "carry_forward", 
+   "fieldtype": "Check", 
+   "label": "Carry Forward", 
+   "permlevel": 0
+  }, 
+  {
+   "depends_on": "carry_forward", 
+   "fieldname": "carry_forwarded_leaves", 
+   "fieldtype": "Float", 
+   "label": "Carry Forwarded Leaves", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "allow_on_submit": 1, 
+   "fieldname": "new_leaves_allocated", 
+   "fieldtype": "Float", 
+   "label": "New Leaves Allocated", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "total_leaves_allocated", 
+   "fieldtype": "Float", 
+   "label": "Total Leaves Allocated", 
+   "permlevel": 0, 
+   "read_only": 1, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "amended_from", 
+   "fieldtype": "Data", 
+   "hidden": 0, 
+   "ignore_restrictions": 1, 
+   "label": "Amended From", 
+   "no_copy": 1, 
+   "oldfieldname": "amended_from", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1
+  }
+ ], 
+ "icon": "icon-ok", 
+ "idx": 1, 
+ "is_submittable": 1, 
+ "modified": "2014-01-22 16:05:35", 
+ "modified_by": "Administrator", 
+ "module": "HR", 
+ "name": "Leave Allocation", 
+ "owner": "Administrator", 
+ "permissions": [
+  {
+   "amend": 1, 
+   "cancel": 1, 
+   "create": 1, 
+   "delete": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "restricted": 1, 
+   "role": "HR User", 
+   "submit": 1, 
+   "write": 1
+  }, 
+  {
+   "amend": 1, 
+   "cancel": 1, 
+   "create": 1, 
+   "delete": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "HR Manager", 
+   "submit": 1, 
+   "write": 1
+  }
+ ], 
+ "search_fields": "employee,employee_name,leave_type,total_leaves_allocated,fiscal_year"
+}
\ No newline at end of file
diff --git a/erpnext/hr/doctype/leave_application/leave_application.txt b/erpnext/hr/doctype/leave_application/leave_application.txt
index b56a0ed..38160cc 100644
--- a/erpnext/hr/doctype/leave_application/leave_application.txt
+++ b/erpnext/hr/doctype/leave_application/leave_application.txt
@@ -1,305 +1,267 @@
-[
- {
-  "creation": "2013-02-20 11:18:11", 
-  "docstatus": 0, 
-  "modified": "2014-01-20 17:48:56", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "allow_attach": 1, 
-  "autoname": "LAP/.#####", 
-  "description": "Apply / Approve Leaves", 
-  "doctype": "DocType", 
-  "document_type": "Transaction", 
-  "icon": "icon-calendar", 
-  "is_submittable": 1, 
-  "max_attachments": 3, 
-  "module": "HR", 
-  "name": "__common__", 
-  "search_fields": "employee,employee_name,leave_type,from_date,to_date,total_leave_days,fiscal_year"
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "Leave Application", 
-  "parentfield": "fields", 
-  "parenttype": "DocType"
- }, 
- {
-  "doctype": "DocPerm", 
-  "name": "__common__", 
-  "parent": "Leave Application", 
-  "parentfield": "permissions", 
-  "parenttype": "DocType", 
-  "read": 1
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Leave Application"
- }, 
- {
-  "default": "Open", 
-  "doctype": "DocField", 
-  "fieldname": "status", 
-  "fieldtype": "Select", 
-  "in_list_view": 1, 
-  "label": "Status", 
-  "no_copy": 1, 
-  "options": "Open\nApproved\nRejected", 
-  "permlevel": 1
- }, 
- {
-  "description": "Leave can be approved by users with Role, \"Leave Approver\"", 
-  "doctype": "DocField", 
-  "fieldname": "leave_approver", 
-  "fieldtype": "Select", 
-  "label": "Leave Approver", 
-  "options": "link:User", 
-  "permlevel": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "leave_type", 
-  "fieldtype": "Select", 
-  "in_filter": 1, 
-  "in_list_view": 1, 
-  "label": "Leave Type", 
-  "options": "link:Leave Type", 
-  "permlevel": 0, 
-  "reqd": 1, 
-  "search_index": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "from_date", 
-  "fieldtype": "Date", 
-  "in_list_view": 1, 
-  "label": "From Date", 
-  "permlevel": 0, 
-  "reqd": 1, 
-  "search_index": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "to_date", 
-  "fieldtype": "Date", 
-  "in_list_view": 0, 
-  "label": "To Date", 
-  "permlevel": 0, 
-  "reqd": 1, 
-  "search_index": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "half_day", 
-  "fieldtype": "Check", 
-  "label": "Half Day", 
-  "permlevel": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break1", 
-  "fieldtype": "Column Break", 
-  "permlevel": 0, 
-  "print_width": "50%", 
-  "width": "50%"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "description", 
-  "fieldtype": "Small Text", 
-  "label": "Reason", 
-  "permlevel": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "employee", 
-  "fieldtype": "Link", 
-  "in_filter": 1, 
-  "label": "Employee", 
-  "options": "Employee", 
-  "permlevel": 0, 
-  "reqd": 1, 
-  "search_index": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "employee_name", 
-  "fieldtype": "Data", 
-  "in_filter": 1, 
-  "in_list_view": 1, 
-  "label": "Employee Name", 
-  "permlevel": 0, 
-  "read_only": 1, 
-  "search_index": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "leave_balance", 
-  "fieldtype": "Float", 
-  "label": "Leave Balance Before Application", 
-  "no_copy": 1, 
-  "permlevel": 0, 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "total_leave_days", 
-  "fieldtype": "Float", 
-  "label": "Total Leave Days", 
-  "no_copy": 1, 
-  "permlevel": 0, 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "sb10", 
-  "fieldtype": "Section Break", 
-  "label": "More Info", 
-  "permlevel": 0
- }, 
- {
-  "allow_on_submit": 1, 
-  "default": "1", 
-  "doctype": "DocField", 
-  "fieldname": "follow_via_email", 
-  "fieldtype": "Check", 
-  "label": "Follow via Email", 
-  "permlevel": 0, 
-  "print_hide": 1
- }, 
- {
-  "default": "Today", 
-  "doctype": "DocField", 
-  "fieldname": "posting_date", 
-  "fieldtype": "Date", 
-  "label": "Posting Date", 
-  "no_copy": 1, 
-  "permlevel": 0, 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "fiscal_year", 
-  "fieldtype": "Select", 
-  "in_filter": 1, 
-  "label": "Fiscal Year", 
-  "options": "link:Fiscal Year", 
-  "permlevel": 0, 
-  "read_only": 0, 
-  "reqd": 1, 
-  "search_index": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break_17", 
-  "fieldtype": "Column Break", 
-  "permlevel": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "company", 
-  "fieldtype": "Link", 
-  "label": "Company", 
-  "options": "Company", 
-  "permlevel": 0, 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "letter_head", 
-  "fieldtype": "Link", 
-  "label": "Letter Head", 
-  "options": "Letter Head", 
-  "permlevel": 0, 
-  "print_hide": 1, 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "amended_from", 
-  "fieldtype": "Link", 
-  "ignore_restrictions": 1, 
-  "label": "Amended From", 
-  "no_copy": 1, 
-  "options": "Leave Application", 
-  "permlevel": 0, 
-  "print_hide": 1, 
-  "read_only": 1
- }, 
- {
-  "create": 1, 
-  "delete": 0, 
-  "doctype": "DocPerm", 
-  "email": 1, 
-  "permlevel": 0, 
-  "print": 1, 
-  "report": 1, 
-  "role": "Employee", 
-  "write": 1
- }, 
- {
-  "amend": 0, 
-  "cancel": 0, 
-  "create": 0, 
-  "delete": 0, 
-  "doctype": "DocPerm", 
-  "permlevel": 1, 
-  "role": "All", 
-  "submit": 0
- }, 
- {
-  "amend": 1, 
-  "cancel": 1, 
-  "create": 1, 
-  "delete": 1, 
-  "doctype": "DocPerm", 
-  "email": 1, 
-  "permlevel": 0, 
-  "print": 1, 
-  "report": 1, 
-  "restrict": 1, 
-  "role": "HR User", 
-  "submit": 1, 
-  "write": 1
- }, 
- {
-  "amend": 1, 
-  "cancel": 0, 
-  "create": 0, 
-  "delete": 0, 
-  "doctype": "DocPerm", 
-  "email": 1, 
-  "permlevel": 0, 
-  "print": 1, 
-  "report": 1, 
-  "role": "Leave Approver", 
-  "submit": 1, 
-  "write": 1
- }, 
- {
-  "amend": 0, 
-  "cancel": 0, 
-  "create": 0, 
-  "delete": 0, 
-  "doctype": "DocPerm", 
-  "permlevel": 1, 
-  "report": 1, 
-  "role": "HR User", 
-  "submit": 0, 
-  "write": 1
- }, 
- {
-  "amend": 0, 
-  "cancel": 0, 
-  "create": 0, 
-  "delete": 0, 
-  "doctype": "DocPerm", 
-  "permlevel": 1, 
-  "report": 1, 
-  "role": "Leave Approver", 
-  "submit": 0, 
-  "write": 1
- }
-]
\ No newline at end of file
+{
+ "allow_attach": 1, 
+ "autoname": "LAP/.#####", 
+ "creation": "2013-02-20 11:18:11", 
+ "description": "Apply / Approve Leaves", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "document_type": "Transaction", 
+ "fields": [
+  {
+   "default": "Open", 
+   "fieldname": "status", 
+   "fieldtype": "Select", 
+   "in_list_view": 1, 
+   "label": "Status", 
+   "no_copy": 1, 
+   "options": "Open\nApproved\nRejected", 
+   "permlevel": 1
+  }, 
+  {
+   "description": "Leave can be approved by users with Role, \"Leave Approver\"", 
+   "fieldname": "leave_approver", 
+   "fieldtype": "Select", 
+   "label": "Leave Approver", 
+   "options": "link:User", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "leave_type", 
+   "fieldtype": "Select", 
+   "in_filter": 1, 
+   "in_list_view": 1, 
+   "label": "Leave Type", 
+   "options": "link:Leave Type", 
+   "permlevel": 0, 
+   "reqd": 1, 
+   "search_index": 1
+  }, 
+  {
+   "fieldname": "from_date", 
+   "fieldtype": "Date", 
+   "in_list_view": 1, 
+   "label": "From Date", 
+   "permlevel": 0, 
+   "reqd": 1, 
+   "search_index": 1
+  }, 
+  {
+   "fieldname": "to_date", 
+   "fieldtype": "Date", 
+   "in_list_view": 0, 
+   "label": "To Date", 
+   "permlevel": 0, 
+   "reqd": 1, 
+   "search_index": 1
+  }, 
+  {
+   "fieldname": "half_day", 
+   "fieldtype": "Check", 
+   "label": "Half Day", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "column_break1", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0, 
+   "print_width": "50%", 
+   "width": "50%"
+  }, 
+  {
+   "fieldname": "description", 
+   "fieldtype": "Small Text", 
+   "label": "Reason", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "employee", 
+   "fieldtype": "Link", 
+   "in_filter": 1, 
+   "label": "Employee", 
+   "options": "Employee", 
+   "permlevel": 0, 
+   "reqd": 1, 
+   "search_index": 1
+  }, 
+  {
+   "fieldname": "employee_name", 
+   "fieldtype": "Data", 
+   "in_filter": 1, 
+   "in_list_view": 1, 
+   "label": "Employee Name", 
+   "permlevel": 0, 
+   "read_only": 1, 
+   "search_index": 0
+  }, 
+  {
+   "fieldname": "leave_balance", 
+   "fieldtype": "Float", 
+   "label": "Leave Balance Before Application", 
+   "no_copy": 1, 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "total_leave_days", 
+   "fieldtype": "Float", 
+   "label": "Total Leave Days", 
+   "no_copy": 1, 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "sb10", 
+   "fieldtype": "Section Break", 
+   "label": "More Info", 
+   "permlevel": 0
+  }, 
+  {
+   "allow_on_submit": 1, 
+   "default": "1", 
+   "fieldname": "follow_via_email", 
+   "fieldtype": "Check", 
+   "label": "Follow via Email", 
+   "permlevel": 0, 
+   "print_hide": 1
+  }, 
+  {
+   "default": "Today", 
+   "fieldname": "posting_date", 
+   "fieldtype": "Date", 
+   "label": "Posting Date", 
+   "no_copy": 1, 
+   "permlevel": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "fiscal_year", 
+   "fieldtype": "Select", 
+   "in_filter": 1, 
+   "label": "Fiscal Year", 
+   "options": "link:Fiscal Year", 
+   "permlevel": 0, 
+   "read_only": 0, 
+   "reqd": 1, 
+   "search_index": 0
+  }, 
+  {
+   "fieldname": "column_break_17", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "company", 
+   "fieldtype": "Link", 
+   "label": "Company", 
+   "options": "Company", 
+   "permlevel": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "letter_head", 
+   "fieldtype": "Link", 
+   "label": "Letter Head", 
+   "options": "Letter Head", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "amended_from", 
+   "fieldtype": "Link", 
+   "ignore_restrictions": 1, 
+   "label": "Amended From", 
+   "no_copy": 1, 
+   "options": "Leave Application", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1
+  }
+ ], 
+ "icon": "icon-calendar", 
+ "idx": 1, 
+ "is_submittable": 1, 
+ "max_attachments": 3, 
+ "modified": "2014-01-20 17:48:56", 
+ "modified_by": "Administrator", 
+ "module": "HR", 
+ "name": "Leave Application", 
+ "owner": "Administrator", 
+ "permissions": [
+  {
+   "create": 1, 
+   "delete": 0, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Employee", 
+   "write": 1
+  }, 
+  {
+   "amend": 0, 
+   "cancel": 0, 
+   "create": 0, 
+   "delete": 0, 
+   "permlevel": 1, 
+   "read": 1, 
+   "role": "All", 
+   "submit": 0
+  }, 
+  {
+   "amend": 1, 
+   "cancel": 1, 
+   "create": 1, 
+   "delete": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "restrict": 1, 
+   "role": "HR User", 
+   "submit": 1, 
+   "write": 1
+  }, 
+  {
+   "amend": 1, 
+   "cancel": 0, 
+   "create": 0, 
+   "delete": 0, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Leave Approver", 
+   "submit": 1, 
+   "write": 1
+  }, 
+  {
+   "amend": 0, 
+   "cancel": 0, 
+   "create": 0, 
+   "delete": 0, 
+   "permlevel": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "HR User", 
+   "submit": 0, 
+   "write": 1
+  }, 
+  {
+   "amend": 0, 
+   "cancel": 0, 
+   "create": 0, 
+   "delete": 0, 
+   "permlevel": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Leave Approver", 
+   "submit": 0, 
+   "write": 1
+  }
+ ], 
+ "search_fields": "employee,employee_name,leave_type,from_date,to_date,total_leave_days,fiscal_year"
+}
\ No newline at end of file
diff --git a/erpnext/hr/doctype/leave_block_list/leave_block_list.txt b/erpnext/hr/doctype/leave_block_list/leave_block_list.txt
index 6f331b0..0ddab07 100644
--- a/erpnext/hr/doctype/leave_block_list/leave_block_list.txt
+++ b/erpnext/hr/doctype/leave_block_list/leave_block_list.txt
@@ -1,106 +1,87 @@
-[
- {
-  "creation": "2013-02-18 17:43:12", 
-  "docstatus": 0, 
-  "modified": "2013-12-20 19:24:13", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "allow_import": 1, 
-  "autoname": "field:leave_block_list_name", 
-  "description": "Block Holidays on important days.", 
-  "doctype": "DocType", 
-  "document_type": "Master", 
-  "icon": "icon-calendar", 
-  "module": "HR", 
-  "name": "__common__"
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "Leave Block List", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "create": 1, 
-  "doctype": "DocPerm", 
-  "email": 1, 
-  "name": "__common__", 
-  "parent": "Leave Block List", 
-  "parentfield": "permissions", 
-  "parenttype": "DocType", 
-  "permlevel": 0, 
-  "print": 1, 
-  "read": 1, 
-  "role": "HR User", 
-  "write": 1
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Leave Block List"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "leave_block_list_name", 
-  "fieldtype": "Data", 
-  "label": "Leave Block List Name", 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "year", 
-  "fieldtype": "Link", 
-  "label": "Year", 
-  "options": "Fiscal Year", 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "company", 
-  "fieldtype": "Link", 
-  "label": "Company", 
-  "options": "Company", 
-  "reqd": 1
- }, 
- {
-  "description": "If not checked, the list will have to be added to each Department where it has to be applied.", 
-  "doctype": "DocField", 
-  "fieldname": "applies_to_all_departments", 
-  "fieldtype": "Check", 
-  "label": "Applies to Company"
- }, 
- {
-  "description": "Stop users from making Leave Applications on following days.", 
-  "doctype": "DocField", 
-  "fieldname": "block_days", 
-  "fieldtype": "Section Break", 
-  "label": "Block Days"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "leave_block_list_dates", 
-  "fieldtype": "Table", 
-  "label": "Leave Block List Dates", 
-  "options": "Leave Block List Date"
- }, 
- {
-  "description": "Allow the following users to approve Leave Applications for block days.", 
-  "doctype": "DocField", 
-  "fieldname": "allow_list", 
-  "fieldtype": "Section Break", 
-  "label": "Allow Users"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "leave_block_list_allowed", 
-  "fieldtype": "Table", 
-  "label": "Leave Block List Allowed", 
-  "options": "Leave Block List Allow"
- }, 
- {
-  "doctype": "DocPerm"
- }
-]
\ No newline at end of file
+{
+ "allow_import": 1, 
+ "autoname": "field:leave_block_list_name", 
+ "creation": "2013-02-18 17:43:12", 
+ "description": "Block Holidays on important days.", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "document_type": "Master", 
+ "fields": [
+  {
+   "fieldname": "leave_block_list_name", 
+   "fieldtype": "Data", 
+   "label": "Leave Block List Name", 
+   "permlevel": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "year", 
+   "fieldtype": "Link", 
+   "label": "Year", 
+   "options": "Fiscal Year", 
+   "permlevel": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "company", 
+   "fieldtype": "Link", 
+   "label": "Company", 
+   "options": "Company", 
+   "permlevel": 0, 
+   "reqd": 1
+  }, 
+  {
+   "description": "If not checked, the list will have to be added to each Department where it has to be applied.", 
+   "fieldname": "applies_to_all_departments", 
+   "fieldtype": "Check", 
+   "label": "Applies to Company", 
+   "permlevel": 0
+  }, 
+  {
+   "description": "Stop users from making Leave Applications on following days.", 
+   "fieldname": "block_days", 
+   "fieldtype": "Section Break", 
+   "label": "Block Days", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "leave_block_list_dates", 
+   "fieldtype": "Table", 
+   "label": "Leave Block List Dates", 
+   "options": "Leave Block List Date", 
+   "permlevel": 0
+  }, 
+  {
+   "description": "Allow the following users to approve Leave Applications for block days.", 
+   "fieldname": "allow_list", 
+   "fieldtype": "Section Break", 
+   "label": "Allow Users", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "leave_block_list_allowed", 
+   "fieldtype": "Table", 
+   "label": "Leave Block List Allowed", 
+   "options": "Leave Block List Allow", 
+   "permlevel": 0
+  }
+ ], 
+ "icon": "icon-calendar", 
+ "idx": 1, 
+ "modified": "2013-12-20 19:24:13", 
+ "modified_by": "Administrator", 
+ "module": "HR", 
+ "name": "Leave Block List", 
+ "owner": "Administrator", 
+ "permissions": [
+  {
+   "create": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "role": "HR User", 
+   "write": 1
+  }
+ ]
+}
\ No newline at end of file
diff --git a/erpnext/hr/doctype/leave_block_list_allow/leave_block_list_allow.txt b/erpnext/hr/doctype/leave_block_list_allow/leave_block_list_allow.txt
index ea54800..d0f3855 100644
--- a/erpnext/hr/doctype/leave_block_list_allow/leave_block_list_allow.txt
+++ b/erpnext/hr/doctype/leave_block_list_allow/leave_block_list_allow.txt
@@ -1,38 +1,25 @@
-[
- {
-  "creation": "2013-02-22 01:27:47", 
-  "docstatus": 0, 
-  "modified": "2013-12-20 19:23:18", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "doctype": "DocType", 
-  "istable": 1, 
-  "module": "HR", 
-  "name": "__common__"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "allow_user", 
-  "fieldtype": "Link", 
-  "in_list_view": 1, 
-  "label": "Allow User", 
-  "name": "__common__", 
-  "options": "User", 
-  "parent": "Leave Block List Allow", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0, 
-  "print_width": "200px", 
-  "reqd": 1, 
-  "width": "200px"
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Leave Block List Allow"
- }, 
- {
-  "doctype": "DocField"
- }
-]
\ No newline at end of file
+{
+ "creation": "2013-02-22 01:27:47", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "fields": [
+  {
+   "fieldname": "allow_user", 
+   "fieldtype": "Link", 
+   "in_list_view": 1, 
+   "label": "Allow User", 
+   "options": "User", 
+   "permlevel": 0, 
+   "print_width": "200px", 
+   "reqd": 1, 
+   "width": "200px"
+  }
+ ], 
+ "idx": 1, 
+ "istable": 1, 
+ "modified": "2013-12-20 19:23:18", 
+ "modified_by": "Administrator", 
+ "module": "HR", 
+ "name": "Leave Block List Allow", 
+ "owner": "Administrator"
+}
\ No newline at end of file
diff --git a/erpnext/hr/doctype/leave_block_list_date/leave_block_list_date.txt b/erpnext/hr/doctype/leave_block_list_date/leave_block_list_date.txt
index 138c9e4..dd068a8 100644
--- a/erpnext/hr/doctype/leave_block_list_date/leave_block_list_date.txt
+++ b/erpnext/hr/doctype/leave_block_list_date/leave_block_list_date.txt
@@ -1,43 +1,34 @@
-[
- {
-  "creation": "2013-02-22 01:27:47", 
-  "docstatus": 0, 
-  "modified": "2013-12-20 19:23:19", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "doctype": "DocType", 
-  "istable": 1, 
-  "module": "HR", 
-  "name": "__common__"
- }, 
- {
-  "doctype": "DocField", 
-  "in_list_view": 1, 
-  "name": "__common__", 
-  "parent": "Leave Block List Date", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0, 
-  "print_width": "200px", 
-  "reqd": 1, 
-  "width": "200px"
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Leave Block List Date"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "block_date", 
-  "fieldtype": "Date", 
-  "label": "Block Date"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "reason", 
-  "fieldtype": "Text", 
-  "label": "Reason"
- }
-]
\ No newline at end of file
+{
+ "creation": "2013-02-22 01:27:47", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "fields": [
+  {
+   "fieldname": "block_date", 
+   "fieldtype": "Date", 
+   "in_list_view": 1, 
+   "label": "Block Date", 
+   "permlevel": 0, 
+   "print_width": "200px", 
+   "reqd": 1, 
+   "width": "200px"
+  }, 
+  {
+   "fieldname": "reason", 
+   "fieldtype": "Text", 
+   "in_list_view": 1, 
+   "label": "Reason", 
+   "permlevel": 0, 
+   "print_width": "200px", 
+   "reqd": 1, 
+   "width": "200px"
+  }
+ ], 
+ "idx": 1, 
+ "istable": 1, 
+ "modified": "2013-12-20 19:23:19", 
+ "modified_by": "Administrator", 
+ "module": "HR", 
+ "name": "Leave Block List Date", 
+ "owner": "Administrator"
+}
\ No newline at end of file
diff --git a/erpnext/hr/doctype/leave_control_panel/leave_control_panel.txt b/erpnext/hr/doctype/leave_control_panel/leave_control_panel.txt
index bee3123..adef0d5 100644
--- a/erpnext/hr/doctype/leave_control_panel/leave_control_panel.txt
+++ b/erpnext/hr/doctype/leave_control_panel/leave_control_panel.txt
@@ -1,141 +1,122 @@
-[
- {
-  "creation": "2013-01-10 16:34:15", 
-  "docstatus": 0, 
-  "modified": "2013-07-05 14:44:50", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "allow_copy": 1, 
-  "allow_email": 1, 
-  "allow_print": 1, 
-  "doctype": "DocType", 
-  "hide_heading": 0, 
-  "hide_toolbar": 0, 
-  "icon": "icon-cog", 
-  "issingle": 1, 
-  "module": "HR", 
-  "name": "__common__", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "Leave Control Panel", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "create": 1, 
-  "doctype": "DocPerm", 
-  "name": "__common__", 
-  "parent": "Leave Control Panel", 
-  "parentfield": "permissions", 
-  "parenttype": "DocType", 
-  "permlevel": 0, 
-  "read": 1, 
-  "report": 0, 
-  "role": "HR User", 
-  "submit": 0, 
-  "write": 1
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Leave Control Panel"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break0", 
-  "fieldtype": "Column Break", 
-  "width": "50%"
- }, 
- {
-  "description": "Leave blank if considered for all employee types", 
-  "doctype": "DocField", 
-  "fieldname": "employee_type", 
-  "fieldtype": "Select", 
-  "label": "Employee Type", 
-  "options": "link:Employment Type"
- }, 
- {
-  "description": "Leave blank if considered for all branches", 
-  "doctype": "DocField", 
-  "fieldname": "branch", 
-  "fieldtype": "Select", 
-  "label": "Branch", 
-  "options": "link:Branch"
- }, 
- {
-  "description": "Leave blank if considered for all departments", 
-  "doctype": "DocField", 
-  "fieldname": "department", 
-  "fieldtype": "Select", 
-  "label": "Department", 
-  "options": "link:Department"
- }, 
- {
-  "description": "Leave blank if considered for all designations", 
-  "doctype": "DocField", 
-  "fieldname": "designation", 
-  "fieldtype": "Select", 
-  "label": "Designation", 
-  "options": "link:Designation"
- }, 
- {
-  "description": "Leave blank if considered for all grades", 
-  "doctype": "DocField", 
-  "fieldname": "grade", 
-  "fieldtype": "Select", 
-  "label": "Grade", 
-  "options": "link:Grade"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break1", 
-  "fieldtype": "Column Break", 
-  "width": "50%"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "fiscal_year", 
-  "fieldtype": "Select", 
-  "in_filter": 1, 
-  "label": "Fiscal Year", 
-  "options": "link:Fiscal Year", 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "leave_type", 
-  "fieldtype": "Select", 
-  "label": "Leave Type", 
-  "options": "link:Leave Type", 
-  "reqd": 1
- }, 
- {
-  "description": "Please select Carry Forward if you also want to include previous fiscal year's balance leaves to this fiscal year", 
-  "doctype": "DocField", 
-  "fieldname": "carry_forward", 
-  "fieldtype": "Check", 
-  "label": "Carry Forward"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "no_of_days", 
-  "fieldtype": "Float", 
-  "label": "New Leaves Allocated (In Days)", 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "allocate", 
-  "fieldtype": "Button", 
-  "label": "Allocate", 
-  "options": "allocate_leave"
- }, 
- {
-  "doctype": "DocPerm"
- }
-]
\ No newline at end of file
+{
+ "allow_copy": 1, 
+ "allow_email": 1, 
+ "allow_print": 1, 
+ "creation": "2013-01-10 16:34:15", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "fields": [
+  {
+   "fieldname": "column_break0", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0, 
+   "width": "50%"
+  }, 
+  {
+   "description": "Leave blank if considered for all employee types", 
+   "fieldname": "employee_type", 
+   "fieldtype": "Select", 
+   "label": "Employee Type", 
+   "options": "link:Employment Type", 
+   "permlevel": 0
+  }, 
+  {
+   "description": "Leave blank if considered for all branches", 
+   "fieldname": "branch", 
+   "fieldtype": "Select", 
+   "label": "Branch", 
+   "options": "link:Branch", 
+   "permlevel": 0
+  }, 
+  {
+   "description": "Leave blank if considered for all departments", 
+   "fieldname": "department", 
+   "fieldtype": "Select", 
+   "label": "Department", 
+   "options": "link:Department", 
+   "permlevel": 0
+  }, 
+  {
+   "description": "Leave blank if considered for all designations", 
+   "fieldname": "designation", 
+   "fieldtype": "Select", 
+   "label": "Designation", 
+   "options": "link:Designation", 
+   "permlevel": 0
+  }, 
+  {
+   "description": "Leave blank if considered for all grades", 
+   "fieldname": "grade", 
+   "fieldtype": "Select", 
+   "label": "Grade", 
+   "options": "link:Grade", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "column_break1", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0, 
+   "width": "50%"
+  }, 
+  {
+   "fieldname": "fiscal_year", 
+   "fieldtype": "Select", 
+   "in_filter": 1, 
+   "label": "Fiscal Year", 
+   "options": "link:Fiscal Year", 
+   "permlevel": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "leave_type", 
+   "fieldtype": "Select", 
+   "label": "Leave Type", 
+   "options": "link:Leave Type", 
+   "permlevel": 0, 
+   "reqd": 1
+  }, 
+  {
+   "description": "Please select Carry Forward if you also want to include previous fiscal year's balance leaves to this fiscal year", 
+   "fieldname": "carry_forward", 
+   "fieldtype": "Check", 
+   "label": "Carry Forward", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "no_of_days", 
+   "fieldtype": "Float", 
+   "label": "New Leaves Allocated (In Days)", 
+   "permlevel": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "allocate", 
+   "fieldtype": "Button", 
+   "label": "Allocate", 
+   "options": "allocate_leave", 
+   "permlevel": 0
+  }
+ ], 
+ "hide_heading": 0, 
+ "hide_toolbar": 0, 
+ "icon": "icon-cog", 
+ "idx": 1, 
+ "issingle": 1, 
+ "modified": "2013-07-05 14:44:50", 
+ "modified_by": "Administrator", 
+ "module": "HR", 
+ "name": "Leave Control Panel", 
+ "owner": "Administrator", 
+ "permissions": [
+  {
+   "create": 1, 
+   "permlevel": 0, 
+   "read": 1, 
+   "report": 0, 
+   "role": "HR User", 
+   "submit": 0, 
+   "write": 1
+  }
+ ], 
+ "read_only": 1
+}
\ No newline at end of file
diff --git a/erpnext/hr/doctype/leave_type/leave_type.txt b/erpnext/hr/doctype/leave_type/leave_type.txt
index 13d7e72..19eb7e7 100644
--- a/erpnext/hr/doctype/leave_type/leave_type.txt
+++ b/erpnext/hr/doctype/leave_type/leave_type.txt
@@ -1,113 +1,103 @@
-[
- {
-  "creation": "2013-02-21 09:55:58", 
-  "docstatus": 0, 
-  "modified": "2014-01-20 17:48:56", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "allow_import": 1, 
-  "autoname": "field:leave_type_name", 
-  "doctype": "DocType", 
-  "document_type": "Master", 
-  "icon": "icon-flag", 
-  "module": "HR", 
-  "name": "__common__"
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "Leave Type", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "cancel": 0, 
-  "create": 1, 
-  "delete": 1, 
-  "doctype": "DocPerm", 
-  "email": 1, 
-  "name": "__common__", 
-  "parent": "Leave Type", 
-  "parentfield": "permissions", 
-  "parenttype": "DocType", 
-  "permlevel": 0, 
-  "print": 1, 
-  "read": 1, 
-  "report": 1, 
-  "submit": 0, 
-  "write": 1
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Leave Type"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "trash_reason", 
-  "fieldtype": "Small Text", 
-  "label": "Trash Reason", 
-  "oldfieldname": "trash_reason", 
-  "oldfieldtype": "Small Text", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "leave_type_name", 
-  "fieldtype": "Data", 
-  "label": "Leave Type Name", 
-  "oldfieldname": "leave_type_name", 
-  "oldfieldtype": "Data", 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "max_days_allowed", 
-  "fieldtype": "Data", 
-  "label": "Max Days Leave Allowed", 
-  "oldfieldname": "max_days_allowed", 
-  "oldfieldtype": "Data", 
-  "reqd": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "is_carry_forward", 
-  "fieldtype": "Check", 
-  "label": "Is Carry Forward", 
-  "oldfieldname": "is_carry_forward", 
-  "oldfieldtype": "Check"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "is_encash", 
-  "fieldtype": "Check", 
-  "hidden": 1, 
-  "label": "Is Encash", 
-  "oldfieldname": "is_encash", 
-  "oldfieldtype": "Check", 
-  "print_hide": 1, 
-  "report_hide": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "is_lwp", 
-  "fieldtype": "Check", 
-  "label": "Is LWP"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "allow_negative", 
-  "fieldtype": "Check", 
-  "label": "Allow Negative Balance"
- }, 
- {
-  "doctype": "DocPerm", 
-  "role": "HR User"
- }, 
- {
-  "doctype": "DocPerm", 
-  "role": "HR Manager"
- }
-]
\ No newline at end of file
+{
+ "allow_import": 1, 
+ "autoname": "field:leave_type_name", 
+ "creation": "2013-02-21 09:55:58", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "document_type": "Master", 
+ "fields": [
+  {
+   "fieldname": "trash_reason", 
+   "fieldtype": "Small Text", 
+   "label": "Trash Reason", 
+   "oldfieldname": "trash_reason", 
+   "oldfieldtype": "Small Text", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "leave_type_name", 
+   "fieldtype": "Data", 
+   "label": "Leave Type Name", 
+   "oldfieldname": "leave_type_name", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "max_days_allowed", 
+   "fieldtype": "Data", 
+   "label": "Max Days Leave Allowed", 
+   "oldfieldname": "max_days_allowed", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "reqd": 0
+  }, 
+  {
+   "fieldname": "is_carry_forward", 
+   "fieldtype": "Check", 
+   "label": "Is Carry Forward", 
+   "oldfieldname": "is_carry_forward", 
+   "oldfieldtype": "Check", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "is_encash", 
+   "fieldtype": "Check", 
+   "hidden": 1, 
+   "label": "Is Encash", 
+   "oldfieldname": "is_encash", 
+   "oldfieldtype": "Check", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "report_hide": 1
+  }, 
+  {
+   "fieldname": "is_lwp", 
+   "fieldtype": "Check", 
+   "label": "Is LWP", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "allow_negative", 
+   "fieldtype": "Check", 
+   "label": "Allow Negative Balance", 
+   "permlevel": 0
+  }
+ ], 
+ "icon": "icon-flag", 
+ "idx": 1, 
+ "modified": "2014-01-20 17:48:56", 
+ "modified_by": "Administrator", 
+ "module": "HR", 
+ "name": "Leave Type", 
+ "owner": "Administrator", 
+ "permissions": [
+  {
+   "cancel": 0, 
+   "create": 1, 
+   "delete": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "HR User", 
+   "submit": 0, 
+   "write": 1
+  }, 
+  {
+   "cancel": 0, 
+   "create": 1, 
+   "delete": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "HR Manager", 
+   "submit": 0, 
+   "write": 1
+  }
+ ]
+}
\ No newline at end of file
diff --git a/erpnext/hr/doctype/salary_manager/salary_manager.txt b/erpnext/hr/doctype/salary_manager/salary_manager.txt
index 423e789..aa86e06 100644
--- a/erpnext/hr/doctype/salary_manager/salary_manager.txt
+++ b/erpnext/hr/doctype/salary_manager/salary_manager.txt
@@ -1,185 +1,166 @@
-[
- {
-  "creation": "2012-03-27 14:35:59", 
-  "docstatus": 0, 
-  "modified": "2013-07-22 15:22:58", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "allow_copy": 1, 
-  "allow_email": 1, 
-  "allow_print": 1, 
-  "doctype": "DocType", 
-  "document_type": "Other", 
-  "icon": "icon-cog", 
-  "issingle": 1, 
-  "module": "HR", 
-  "name": "__common__"
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "Salary Manager", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "create": 1, 
-  "doctype": "DocPerm", 
-  "name": "__common__", 
-  "parent": "Salary Manager", 
-  "parentfield": "permissions", 
-  "parenttype": "DocType", 
-  "permlevel": 0, 
-  "read": 1, 
-  "role": "HR Manager", 
-  "write": 1
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Salary Manager"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "document_description", 
-  "fieldtype": "HTML", 
-  "label": "Document Description", 
-  "options": "<div class=\"field_description\">You can generate multiple salary slips based on the selected criteria, submit and mail those to the employee directly from here</div>"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "section_break0", 
-  "fieldtype": "Section Break"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break0", 
-  "fieldtype": "Column Break", 
-  "width": "50%"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "company", 
-  "fieldtype": "Select", 
-  "label": "Company", 
-  "options": "link:Company", 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "branch", 
-  "fieldtype": "Link", 
-  "label": "Branch", 
-  "options": "Branch"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "department", 
-  "fieldtype": "Link", 
-  "label": "Department", 
-  "options": "Department"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "designation", 
-  "fieldtype": "Link", 
-  "label": "Designation", 
-  "options": "Designation"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break1", 
-  "fieldtype": "Column Break", 
-  "width": "50%"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "grade", 
-  "fieldtype": "Select", 
-  "label": "Grade", 
-  "options": "link:Grade"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "fiscal_year", 
-  "fieldtype": "Select", 
-  "label": "Fiscal Year", 
-  "options": "link:Fiscal Year", 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "month", 
-  "fieldtype": "Select", 
-  "label": "Month", 
-  "options": "\n01\n02\n03\n04\n05\n06\n07\n08\n09\n10\n11\n12", 
-  "reqd": 1
- }, 
- {
-  "description": "Check if you want to send salary slip in mail to each employee while submitting salary slip", 
-  "doctype": "DocField", 
-  "fieldname": "send_email", 
-  "fieldtype": "Check", 
-  "label": "Send Email"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "section_break1", 
-  "fieldtype": "Section Break"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break2", 
-  "fieldtype": "Column Break", 
-  "width": "50%"
- }, 
- {
-  "description": "Creates salary slip for above mentioned criteria.", 
-  "doctype": "DocField", 
-  "fieldname": "create_salary_slip", 
-  "fieldtype": "Button", 
-  "label": "Create Salary Slip"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break3", 
-  "fieldtype": "Column Break", 
-  "width": "25%"
- }, 
- {
-  "description": "Submit all salary slips for the above selected criteria", 
-  "doctype": "DocField", 
-  "fieldname": "submit_salary_slip", 
-  "fieldtype": "Button", 
-  "label": "Submit Salary Slip"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break4", 
-  "fieldtype": "Column Break", 
-  "width": "25%"
- }, 
- {
-  "description": "Create Bank Voucher for the total salary paid for the above selected criteria", 
-  "doctype": "DocField", 
-  "fieldname": "make_bank_voucher", 
-  "fieldtype": "Button", 
-  "label": "Make Bank Voucher"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "section_break2", 
-  "fieldtype": "Section Break"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "activity_log", 
-  "fieldtype": "HTML", 
-  "label": "Activity Log"
- }, 
- {
-  "doctype": "DocPerm"
- }
-]
\ No newline at end of file
+{
+ "allow_copy": 1, 
+ "allow_email": 1, 
+ "allow_print": 1, 
+ "creation": "2012-03-27 14:35:59", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "document_type": "Other", 
+ "fields": [
+  {
+   "fieldname": "document_description", 
+   "fieldtype": "HTML", 
+   "label": "Document Description", 
+   "options": "<div class=\"field_description\">You can generate multiple salary slips based on the selected criteria, submit and mail those to the employee directly from here</div>", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "section_break0", 
+   "fieldtype": "Section Break", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "column_break0", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0, 
+   "width": "50%"
+  }, 
+  {
+   "fieldname": "company", 
+   "fieldtype": "Select", 
+   "label": "Company", 
+   "options": "link:Company", 
+   "permlevel": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "branch", 
+   "fieldtype": "Link", 
+   "label": "Branch", 
+   "options": "Branch", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "department", 
+   "fieldtype": "Link", 
+   "label": "Department", 
+   "options": "Department", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "designation", 
+   "fieldtype": "Link", 
+   "label": "Designation", 
+   "options": "Designation", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "column_break1", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0, 
+   "width": "50%"
+  }, 
+  {
+   "fieldname": "grade", 
+   "fieldtype": "Select", 
+   "label": "Grade", 
+   "options": "link:Grade", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "fiscal_year", 
+   "fieldtype": "Select", 
+   "label": "Fiscal Year", 
+   "options": "link:Fiscal Year", 
+   "permlevel": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "month", 
+   "fieldtype": "Select", 
+   "label": "Month", 
+   "options": "\n01\n02\n03\n04\n05\n06\n07\n08\n09\n10\n11\n12", 
+   "permlevel": 0, 
+   "reqd": 1
+  }, 
+  {
+   "description": "Check if you want to send salary slip in mail to each employee while submitting salary slip", 
+   "fieldname": "send_email", 
+   "fieldtype": "Check", 
+   "label": "Send Email", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "section_break1", 
+   "fieldtype": "Section Break", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "column_break2", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0, 
+   "width": "50%"
+  }, 
+  {
+   "description": "Creates salary slip for above mentioned criteria.", 
+   "fieldname": "create_salary_slip", 
+   "fieldtype": "Button", 
+   "label": "Create Salary Slip", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "column_break3", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0, 
+   "width": "25%"
+  }, 
+  {
+   "description": "Submit all salary slips for the above selected criteria", 
+   "fieldname": "submit_salary_slip", 
+   "fieldtype": "Button", 
+   "label": "Submit Salary Slip", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "column_break4", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0, 
+   "width": "25%"
+  }, 
+  {
+   "description": "Create Bank Voucher for the total salary paid for the above selected criteria", 
+   "fieldname": "make_bank_voucher", 
+   "fieldtype": "Button", 
+   "label": "Make Bank Voucher", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "section_break2", 
+   "fieldtype": "Section Break", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "activity_log", 
+   "fieldtype": "HTML", 
+   "label": "Activity Log", 
+   "permlevel": 0
+  }
+ ], 
+ "icon": "icon-cog", 
+ "idx": 1, 
+ "issingle": 1, 
+ "modified": "2013-07-22 15:22:58", 
+ "modified_by": "Administrator", 
+ "module": "HR", 
+ "name": "Salary Manager", 
+ "owner": "Administrator", 
+ "permissions": [
+  {
+   "create": 1, 
+   "permlevel": 0, 
+   "read": 1, 
+   "role": "HR Manager", 
+   "write": 1
+  }
+ ]
+}
\ No newline at end of file
diff --git a/erpnext/hr/doctype/salary_slip/salary_slip.txt b/erpnext/hr/doctype/salary_slip/salary_slip.txt
index e47e8d8..5077964 100644
--- a/erpnext/hr/doctype/salary_slip/salary_slip.txt
+++ b/erpnext/hr/doctype/salary_slip/salary_slip.txt
@@ -1,404 +1,392 @@
-[
- {
-  "creation": "2013-01-10 16:34:15", 
-  "docstatus": 0, 
-  "modified": "2014-01-20 17:49:18", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "doctype": "DocType", 
-  "icon": "icon-file-text", 
-  "is_submittable": 1, 
-  "module": "HR", 
-  "name": "__common__"
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "Salary Slip", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "create": 1, 
-  "doctype": "DocPerm", 
-  "email": 1, 
-  "name": "__common__", 
-  "parent": "Salary Slip", 
-  "parentfield": "permissions", 
-  "parenttype": "DocType", 
-  "permlevel": 0, 
-  "print": 1, 
-  "read": 1, 
-  "report": 1, 
-  "submit": 1, 
-  "write": 1
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Salary Slip"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break0", 
-  "fieldtype": "Column Break", 
-  "oldfieldtype": "Column Break", 
-  "width": "50%"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "employee", 
-  "fieldtype": "Link", 
-  "in_filter": 1, 
-  "label": "Employee", 
-  "oldfieldname": "employee", 
-  "oldfieldtype": "Link", 
-  "options": "Employee", 
-  "reqd": 1, 
-  "search_index": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "employee_name", 
-  "fieldtype": "Data", 
-  "in_filter": 1, 
-  "in_list_view": 1, 
-  "label": "Employee Name", 
-  "oldfieldname": "employee_name", 
-  "oldfieldtype": "Data", 
-  "read_only": 1, 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "department", 
-  "fieldtype": "Link", 
-  "in_filter": 1, 
-  "label": "Department", 
-  "oldfieldname": "department", 
-  "oldfieldtype": "Link", 
-  "options": "Department", 
-  "read_only": 1, 
-  "reqd": 0, 
-  "search_index": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "designation", 
-  "fieldtype": "Link", 
-  "in_filter": 1, 
-  "label": "Designation", 
-  "oldfieldname": "designation", 
-  "oldfieldtype": "Link", 
-  "options": "Designation", 
-  "read_only": 1, 
-  "search_index": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "branch", 
-  "fieldtype": "Link", 
-  "in_filter": 1, 
-  "label": "Branch", 
-  "oldfieldname": "branch", 
-  "oldfieldtype": "Link", 
-  "options": "Branch", 
-  "read_only": 1, 
-  "search_index": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "grade", 
-  "fieldtype": "Link", 
-  "in_filter": 1, 
-  "label": "Grade", 
-  "oldfieldname": "grade", 
-  "oldfieldtype": "Link", 
-  "options": "Grade", 
-  "read_only": 1, 
-  "search_index": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "pf_no", 
-  "fieldtype": "Data", 
-  "label": "PF No.", 
-  "oldfieldname": "pf_no", 
-  "oldfieldtype": "Data", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "esic_no", 
-  "fieldtype": "Data", 
-  "label": "ESIC No.", 
-  "oldfieldname": "esic_no", 
-  "oldfieldtype": "Data", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "letter_head", 
-  "fieldtype": "Link", 
-  "label": "Letter Head", 
-  "options": "Letter Head"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break1", 
-  "fieldtype": "Column Break", 
-  "oldfieldtype": "Column Break", 
-  "width": "50%"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "fiscal_year", 
-  "fieldtype": "Link", 
-  "in_filter": 1, 
-  "in_list_view": 1, 
-  "label": "Fiscal Year", 
-  "oldfieldname": "fiscal_year", 
-  "oldfieldtype": "Data", 
-  "options": "Fiscal Year", 
-  "reqd": 1, 
-  "search_index": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "company", 
-  "fieldtype": "Select", 
-  "in_filter": 1, 
-  "label": "Company", 
-  "options": "link:Company", 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "month", 
-  "fieldtype": "Select", 
-  "in_filter": 1, 
-  "in_list_view": 1, 
-  "label": "Month", 
-  "oldfieldname": "month", 
-  "oldfieldtype": "Select", 
-  "options": "\n01\n02\n03\n04\n05\n06\n07\n08\n09\n10\n11\n12", 
-  "reqd": 1, 
-  "search_index": 1, 
-  "width": "37%"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "total_days_in_month", 
-  "fieldtype": "Data", 
-  "label": "Total Working Days In The Month", 
-  "oldfieldname": "total_days_in_month", 
-  "oldfieldtype": "Int", 
-  "read_only": 1, 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "leave_without_pay", 
-  "fieldtype": "Float", 
-  "label": "Leave Without Pay", 
-  "oldfieldname": "leave_without_pay", 
-  "oldfieldtype": "Currency"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "payment_days", 
-  "fieldtype": "Float", 
-  "label": "Payment Days", 
-  "oldfieldname": "payment_days", 
-  "oldfieldtype": "Float", 
-  "read_only": 1, 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "bank_name", 
-  "fieldtype": "Data", 
-  "label": "Bank Name", 
-  "oldfieldname": "bank_name", 
-  "oldfieldtype": "Data", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "bank_account_no", 
-  "fieldtype": "Data", 
-  "label": "Bank Account No.", 
-  "oldfieldname": "bank_account_no", 
-  "oldfieldtype": "Data", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "email_check", 
-  "fieldtype": "Check", 
-  "label": "Email", 
-  "no_copy": 1, 
-  "oldfieldname": "email_check", 
-  "oldfieldtype": "Check", 
-  "print_hide": 1, 
-  "report_hide": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "amended_from", 
-  "fieldtype": "Data", 
-  "hidden": 0, 
-  "ignore_restrictions": 1, 
-  "label": "Amended From", 
-  "no_copy": 1, 
-  "oldfieldname": "amended_from", 
-  "oldfieldtype": "Data", 
-  "print_hide": 1, 
-  "report_hide": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "earning_deduction", 
-  "fieldtype": "Section Break", 
-  "label": "Earning & Deduction", 
-  "oldfieldtype": "Section Break"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "earning", 
-  "fieldtype": "Column Break", 
-  "label": "Earning", 
-  "oldfieldtype": "Column Break", 
-  "reqd": 0, 
-  "width": "50%"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "earning_details", 
-  "fieldtype": "Table", 
-  "label": "Salary Structure Earnings", 
-  "oldfieldname": "earning_details", 
-  "oldfieldtype": "Table", 
-  "options": "Salary Slip Earning"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "deduction", 
-  "fieldtype": "Column Break", 
-  "label": "Deduction", 
-  "oldfieldtype": "Column Break", 
-  "width": "50%"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "deduction_details", 
-  "fieldtype": "Table", 
-  "label": "Deductions", 
-  "oldfieldname": "deduction_details", 
-  "oldfieldtype": "Table", 
-  "options": "Salary Slip Deduction"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "totals", 
-  "fieldtype": "Section Break", 
-  "label": "Totals", 
-  "oldfieldtype": "Section Break"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break2", 
-  "fieldtype": "Column Break", 
-  "oldfieldtype": "Column Break", 
-  "width": "50%"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "arrear_amount", 
-  "fieldtype": "Currency", 
-  "label": "Arrear Amount", 
-  "oldfieldname": "arrear_amount", 
-  "oldfieldtype": "Currency", 
-  "options": "Company:company:default_currency"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "leave_encashment_amount", 
-  "fieldtype": "Currency", 
-  "label": "Leave Encashment Amount", 
-  "oldfieldname": "encashment_amount", 
-  "oldfieldtype": "Currency", 
-  "options": "Company:company:default_currency"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "gross_pay", 
-  "fieldtype": "Currency", 
-  "label": "Gross Pay", 
-  "oldfieldname": "gross_pay", 
-  "oldfieldtype": "Currency", 
-  "options": "Company:company:default_currency", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "total_deduction", 
-  "fieldtype": "Currency", 
-  "label": "Total Deduction", 
-  "oldfieldname": "total_deduction", 
-  "oldfieldtype": "Currency", 
-  "options": "Company:company:default_currency", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break3", 
-  "fieldtype": "Column Break", 
-  "oldfieldtype": "Column Break", 
-  "width": "50%"
- }, 
- {
-  "description": "Gross Pay + Arrear Amount +Encashment Amount - Total Deduction", 
-  "doctype": "DocField", 
-  "fieldname": "net_pay", 
-  "fieldtype": "Currency", 
-  "label": "Net Pay", 
-  "oldfieldname": "net_pay", 
-  "oldfieldtype": "Currency", 
-  "options": "Company:company:default_currency", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "rounded_total", 
-  "fieldtype": "Currency", 
-  "label": "Rounded Total", 
-  "options": "Company:company:default_currency", 
-  "read_only": 1
- }, 
- {
-  "description": "Net Pay (in words) will be visible once you save the Salary Slip.", 
-  "doctype": "DocField", 
-  "fieldname": "total_in_words", 
-  "fieldtype": "Data", 
-  "label": "Total in words", 
-  "oldfieldname": "net_pay_in_words", 
-  "oldfieldtype": "Data", 
-  "read_only": 1
- }, 
- {
-  "amend": 0, 
-  "delete": 0, 
-  "doctype": "DocPerm", 
-  "role": "HR User"
- }, 
- {
-  "amend": 1, 
-  "cancel": 1, 
-  "delete": 1, 
-  "doctype": "DocPerm", 
-  "role": "HR Manager"
- }
-]
\ No newline at end of file
+{
+ "creation": "2013-01-10 16:34:15", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "fields": [
+  {
+   "fieldname": "column_break0", 
+   "fieldtype": "Column Break", 
+   "oldfieldtype": "Column Break", 
+   "permlevel": 0, 
+   "width": "50%"
+  }, 
+  {
+   "fieldname": "employee", 
+   "fieldtype": "Link", 
+   "in_filter": 1, 
+   "label": "Employee", 
+   "oldfieldname": "employee", 
+   "oldfieldtype": "Link", 
+   "options": "Employee", 
+   "permlevel": 0, 
+   "reqd": 1, 
+   "search_index": 1
+  }, 
+  {
+   "fieldname": "employee_name", 
+   "fieldtype": "Data", 
+   "in_filter": 1, 
+   "in_list_view": 1, 
+   "label": "Employee Name", 
+   "oldfieldname": "employee_name", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "read_only": 1, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "department", 
+   "fieldtype": "Link", 
+   "in_filter": 1, 
+   "label": "Department", 
+   "oldfieldname": "department", 
+   "oldfieldtype": "Link", 
+   "options": "Department", 
+   "permlevel": 0, 
+   "read_only": 1, 
+   "reqd": 0, 
+   "search_index": 0
+  }, 
+  {
+   "fieldname": "designation", 
+   "fieldtype": "Link", 
+   "in_filter": 1, 
+   "label": "Designation", 
+   "oldfieldname": "designation", 
+   "oldfieldtype": "Link", 
+   "options": "Designation", 
+   "permlevel": 0, 
+   "read_only": 1, 
+   "search_index": 0
+  }, 
+  {
+   "fieldname": "branch", 
+   "fieldtype": "Link", 
+   "in_filter": 1, 
+   "label": "Branch", 
+   "oldfieldname": "branch", 
+   "oldfieldtype": "Link", 
+   "options": "Branch", 
+   "permlevel": 0, 
+   "read_only": 1, 
+   "search_index": 0
+  }, 
+  {
+   "fieldname": "grade", 
+   "fieldtype": "Link", 
+   "in_filter": 1, 
+   "label": "Grade", 
+   "oldfieldname": "grade", 
+   "oldfieldtype": "Link", 
+   "options": "Grade", 
+   "permlevel": 0, 
+   "read_only": 1, 
+   "search_index": 0
+  }, 
+  {
+   "fieldname": "pf_no", 
+   "fieldtype": "Data", 
+   "label": "PF No.", 
+   "oldfieldname": "pf_no", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "esic_no", 
+   "fieldtype": "Data", 
+   "label": "ESIC No.", 
+   "oldfieldname": "esic_no", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "letter_head", 
+   "fieldtype": "Link", 
+   "label": "Letter Head", 
+   "options": "Letter Head", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "column_break1", 
+   "fieldtype": "Column Break", 
+   "oldfieldtype": "Column Break", 
+   "permlevel": 0, 
+   "width": "50%"
+  }, 
+  {
+   "fieldname": "fiscal_year", 
+   "fieldtype": "Link", 
+   "in_filter": 1, 
+   "in_list_view": 1, 
+   "label": "Fiscal Year", 
+   "oldfieldname": "fiscal_year", 
+   "oldfieldtype": "Data", 
+   "options": "Fiscal Year", 
+   "permlevel": 0, 
+   "reqd": 1, 
+   "search_index": 0
+  }, 
+  {
+   "fieldname": "company", 
+   "fieldtype": "Select", 
+   "in_filter": 1, 
+   "label": "Company", 
+   "options": "link:Company", 
+   "permlevel": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "month", 
+   "fieldtype": "Select", 
+   "in_filter": 1, 
+   "in_list_view": 1, 
+   "label": "Month", 
+   "oldfieldname": "month", 
+   "oldfieldtype": "Select", 
+   "options": "\n01\n02\n03\n04\n05\n06\n07\n08\n09\n10\n11\n12", 
+   "permlevel": 0, 
+   "reqd": 1, 
+   "search_index": 1, 
+   "width": "37%"
+  }, 
+  {
+   "fieldname": "total_days_in_month", 
+   "fieldtype": "Data", 
+   "label": "Total Working Days In The Month", 
+   "oldfieldname": "total_days_in_month", 
+   "oldfieldtype": "Int", 
+   "permlevel": 0, 
+   "read_only": 1, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "leave_without_pay", 
+   "fieldtype": "Float", 
+   "label": "Leave Without Pay", 
+   "oldfieldname": "leave_without_pay", 
+   "oldfieldtype": "Currency", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "payment_days", 
+   "fieldtype": "Float", 
+   "label": "Payment Days", 
+   "oldfieldname": "payment_days", 
+   "oldfieldtype": "Float", 
+   "permlevel": 0, 
+   "read_only": 1, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "bank_name", 
+   "fieldtype": "Data", 
+   "label": "Bank Name", 
+   "oldfieldname": "bank_name", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "bank_account_no", 
+   "fieldtype": "Data", 
+   "label": "Bank Account No.", 
+   "oldfieldname": "bank_account_no", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "email_check", 
+   "fieldtype": "Check", 
+   "label": "Email", 
+   "no_copy": 1, 
+   "oldfieldname": "email_check", 
+   "oldfieldtype": "Check", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "report_hide": 1
+  }, 
+  {
+   "fieldname": "amended_from", 
+   "fieldtype": "Data", 
+   "hidden": 0, 
+   "ignore_restrictions": 1, 
+   "label": "Amended From", 
+   "no_copy": 1, 
+   "oldfieldname": "amended_from", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "report_hide": 0
+  }, 
+  {
+   "fieldname": "earning_deduction", 
+   "fieldtype": "Section Break", 
+   "label": "Earning & Deduction", 
+   "oldfieldtype": "Section Break", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "earning", 
+   "fieldtype": "Column Break", 
+   "label": "Earning", 
+   "oldfieldtype": "Column Break", 
+   "permlevel": 0, 
+   "reqd": 0, 
+   "width": "50%"
+  }, 
+  {
+   "fieldname": "earning_details", 
+   "fieldtype": "Table", 
+   "label": "Salary Structure Earnings", 
+   "oldfieldname": "earning_details", 
+   "oldfieldtype": "Table", 
+   "options": "Salary Slip Earning", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "deduction", 
+   "fieldtype": "Column Break", 
+   "label": "Deduction", 
+   "oldfieldtype": "Column Break", 
+   "permlevel": 0, 
+   "width": "50%"
+  }, 
+  {
+   "fieldname": "deduction_details", 
+   "fieldtype": "Table", 
+   "label": "Deductions", 
+   "oldfieldname": "deduction_details", 
+   "oldfieldtype": "Table", 
+   "options": "Salary Slip Deduction", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "totals", 
+   "fieldtype": "Section Break", 
+   "label": "Totals", 
+   "oldfieldtype": "Section Break", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "column_break2", 
+   "fieldtype": "Column Break", 
+   "oldfieldtype": "Column Break", 
+   "permlevel": 0, 
+   "width": "50%"
+  }, 
+  {
+   "fieldname": "arrear_amount", 
+   "fieldtype": "Currency", 
+   "label": "Arrear Amount", 
+   "oldfieldname": "arrear_amount", 
+   "oldfieldtype": "Currency", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "leave_encashment_amount", 
+   "fieldtype": "Currency", 
+   "label": "Leave Encashment Amount", 
+   "oldfieldname": "encashment_amount", 
+   "oldfieldtype": "Currency", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "gross_pay", 
+   "fieldtype": "Currency", 
+   "label": "Gross Pay", 
+   "oldfieldname": "gross_pay", 
+   "oldfieldtype": "Currency", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "total_deduction", 
+   "fieldtype": "Currency", 
+   "label": "Total Deduction", 
+   "oldfieldname": "total_deduction", 
+   "oldfieldtype": "Currency", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "column_break3", 
+   "fieldtype": "Column Break", 
+   "oldfieldtype": "Column Break", 
+   "permlevel": 0, 
+   "width": "50%"
+  }, 
+  {
+   "description": "Gross Pay + Arrear Amount +Encashment Amount - Total Deduction", 
+   "fieldname": "net_pay", 
+   "fieldtype": "Currency", 
+   "label": "Net Pay", 
+   "oldfieldname": "net_pay", 
+   "oldfieldtype": "Currency", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "rounded_total", 
+   "fieldtype": "Currency", 
+   "label": "Rounded Total", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "description": "Net Pay (in words) will be visible once you save the Salary Slip.", 
+   "fieldname": "total_in_words", 
+   "fieldtype": "Data", 
+   "label": "Total in words", 
+   "oldfieldname": "net_pay_in_words", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "read_only": 1
+  }
+ ], 
+ "icon": "icon-file-text", 
+ "idx": 1, 
+ "is_submittable": 1, 
+ "modified": "2014-01-20 17:49:18", 
+ "modified_by": "Administrator", 
+ "module": "HR", 
+ "name": "Salary Slip", 
+ "owner": "Administrator", 
+ "permissions": [
+  {
+   "amend": 0, 
+   "create": 1, 
+   "delete": 0, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "HR User", 
+   "submit": 1, 
+   "write": 1
+  }, 
+  {
+   "amend": 1, 
+   "cancel": 1, 
+   "create": 1, 
+   "delete": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "HR Manager", 
+   "submit": 1, 
+   "write": 1
+  }
+ ]
+}
\ No newline at end of file
diff --git a/erpnext/hr/doctype/salary_slip_deduction/salary_slip_deduction.txt b/erpnext/hr/doctype/salary_slip_deduction/salary_slip_deduction.txt
index 2b29090..23693ce 100644
--- a/erpnext/hr/doctype/salary_slip_deduction/salary_slip_deduction.txt
+++ b/erpnext/hr/doctype/salary_slip_deduction/salary_slip_deduction.txt
@@ -1,62 +1,52 @@
-[
- {
-  "creation": "2013-02-22 01:27:48", 
-  "docstatus": 0, 
-  "modified": "2013-12-20 19:23:42", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "doctype": "DocType", 
-  "istable": 1, 
-  "module": "HR", 
-  "name": "__common__"
- }, 
- {
-  "doctype": "DocField", 
-  "in_list_view": 1, 
-  "name": "__common__", 
-  "parent": "Salary Slip Deduction", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Salary Slip Deduction"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "d_type", 
-  "fieldtype": "Link", 
-  "label": "Type", 
-  "oldfieldname": "d_type", 
-  "oldfieldtype": "Data", 
-  "options": "Deduction Type", 
-  "print_width": "200px", 
-  "width": "200px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "d_amount", 
-  "fieldtype": "Currency", 
-  "label": "Amount", 
-  "oldfieldname": "d_amount", 
-  "oldfieldtype": "Currency", 
-  "options": "Company:company:default_currency", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "d_modified_amount", 
-  "fieldtype": "Currency", 
-  "label": "Modified Amount", 
-  "options": "Company:company:default_currency"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "d_depends_on_lwp", 
-  "fieldtype": "Check", 
-  "label": "Depends on LWP"
- }
-]
\ No newline at end of file
+{
+ "creation": "2013-02-22 01:27:48", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "fields": [
+  {
+   "fieldname": "d_type", 
+   "fieldtype": "Link", 
+   "in_list_view": 1, 
+   "label": "Type", 
+   "oldfieldname": "d_type", 
+   "oldfieldtype": "Data", 
+   "options": "Deduction Type", 
+   "permlevel": 0, 
+   "print_width": "200px", 
+   "width": "200px"
+  }, 
+  {
+   "fieldname": "d_amount", 
+   "fieldtype": "Currency", 
+   "in_list_view": 1, 
+   "label": "Amount", 
+   "oldfieldname": "d_amount", 
+   "oldfieldtype": "Currency", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "d_modified_amount", 
+   "fieldtype": "Currency", 
+   "in_list_view": 1, 
+   "label": "Modified Amount", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "d_depends_on_lwp", 
+   "fieldtype": "Check", 
+   "in_list_view": 1, 
+   "label": "Depends on LWP", 
+   "permlevel": 0
+  }
+ ], 
+ "idx": 1, 
+ "istable": 1, 
+ "modified": "2013-12-20 19:23:42", 
+ "modified_by": "Administrator", 
+ "module": "HR", 
+ "name": "Salary Slip Deduction", 
+ "owner": "Administrator"
+}
\ No newline at end of file
diff --git a/erpnext/hr/doctype/salary_slip_earning/salary_slip_earning.txt b/erpnext/hr/doctype/salary_slip_earning/salary_slip_earning.txt
index 3375ab5..bc9684a 100644
--- a/erpnext/hr/doctype/salary_slip_earning/salary_slip_earning.txt
+++ b/erpnext/hr/doctype/salary_slip_earning/salary_slip_earning.txt
@@ -1,62 +1,52 @@
-[
- {
-  "creation": "2013-02-22 01:27:48", 
-  "docstatus": 0, 
-  "modified": "2013-12-20 19:23:43", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "doctype": "DocType", 
-  "istable": 1, 
-  "module": "HR", 
-  "name": "__common__"
- }, 
- {
-  "doctype": "DocField", 
-  "in_list_view": 1, 
-  "name": "__common__", 
-  "parent": "Salary Slip Earning", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Salary Slip Earning"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "e_type", 
-  "fieldtype": "Link", 
-  "label": "Type", 
-  "oldfieldname": "e_type", 
-  "oldfieldtype": "Data", 
-  "options": "Earning Type", 
-  "print_width": "200px", 
-  "width": "200px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "e_amount", 
-  "fieldtype": "Currency", 
-  "label": "Amount", 
-  "oldfieldname": "e_amount", 
-  "oldfieldtype": "Currency", 
-  "options": "Company:company:default_currency", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "e_modified_amount", 
-  "fieldtype": "Currency", 
-  "label": "Modified Amount", 
-  "options": "Company:company:default_currency"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "e_depends_on_lwp", 
-  "fieldtype": "Check", 
-  "label": "Depends on LWP"
- }
-]
\ No newline at end of file
+{
+ "creation": "2013-02-22 01:27:48", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "fields": [
+  {
+   "fieldname": "e_type", 
+   "fieldtype": "Link", 
+   "in_list_view": 1, 
+   "label": "Type", 
+   "oldfieldname": "e_type", 
+   "oldfieldtype": "Data", 
+   "options": "Earning Type", 
+   "permlevel": 0, 
+   "print_width": "200px", 
+   "width": "200px"
+  }, 
+  {
+   "fieldname": "e_amount", 
+   "fieldtype": "Currency", 
+   "in_list_view": 1, 
+   "label": "Amount", 
+   "oldfieldname": "e_amount", 
+   "oldfieldtype": "Currency", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "e_modified_amount", 
+   "fieldtype": "Currency", 
+   "in_list_view": 1, 
+   "label": "Modified Amount", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "e_depends_on_lwp", 
+   "fieldtype": "Check", 
+   "in_list_view": 1, 
+   "label": "Depends on LWP", 
+   "permlevel": 0
+  }
+ ], 
+ "idx": 1, 
+ "istable": 1, 
+ "modified": "2013-12-20 19:23:43", 
+ "modified_by": "Administrator", 
+ "module": "HR", 
+ "name": "Salary Slip Earning", 
+ "owner": "Administrator"
+}
\ No newline at end of file
diff --git a/erpnext/hr/doctype/salary_structure/salary_structure.txt b/erpnext/hr/doctype/salary_structure/salary_structure.txt
index e54ebd7..6aae2fb 100644
--- a/erpnext/hr/doctype/salary_structure/salary_structure.txt
+++ b/erpnext/hr/doctype/salary_structure/salary_structure.txt
@@ -1,284 +1,273 @@
-[
- {
-  "creation": "2013-03-07 18:50:29", 
-  "docstatus": 0, 
-  "modified": "2013-12-20 19:24:28", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "allow_import": 1, 
-  "doctype": "DocType", 
-  "icon": "icon-file-text", 
-  "module": "HR", 
-  "name": "__common__"
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "Salary Structure", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "amend": 0, 
-  "create": 1, 
-  "doctype": "DocPerm", 
-  "email": 1, 
-  "name": "__common__", 
-  "parent": "Salary Structure", 
-  "parentfield": "permissions", 
-  "parenttype": "DocType", 
-  "permlevel": 0, 
-  "print": 1, 
-  "read": 1, 
-  "report": 1, 
-  "submit": 0, 
-  "write": 1
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Salary Structure"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break0", 
-  "fieldtype": "Column Break", 
-  "read_only": 0, 
-  "width": "50%"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "employee", 
-  "fieldtype": "Link", 
-  "in_filter": 1, 
-  "label": "Employee", 
-  "oldfieldname": "employee", 
-  "oldfieldtype": "Link", 
-  "options": "Employee", 
-  "read_only": 0, 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "employee_name", 
-  "fieldtype": "Data", 
-  "in_list_view": 1, 
-  "label": "Employee Name", 
-  "oldfieldname": "employee_name", 
-  "oldfieldtype": "Data", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "branch", 
-  "fieldtype": "Select", 
-  "in_filter": 1, 
-  "label": "Branch", 
-  "oldfieldname": "branch", 
-  "oldfieldtype": "Select", 
-  "options": "link:Branch", 
-  "read_only": 1, 
-  "reqd": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "designation", 
-  "fieldtype": "Select", 
-  "in_filter": 1, 
-  "label": "Designation", 
-  "oldfieldname": "designation", 
-  "oldfieldtype": "Select", 
-  "options": "link:Designation", 
-  "read_only": 1, 
-  "reqd": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "department", 
-  "fieldtype": "Select", 
-  "in_filter": 1, 
-  "label": "Department", 
-  "oldfieldname": "department", 
-  "oldfieldtype": "Select", 
-  "options": "link:Department", 
-  "read_only": 1, 
-  "reqd": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "grade", 
-  "fieldtype": "Select", 
-  "in_filter": 1, 
-  "label": "Grade", 
-  "oldfieldname": "grade", 
-  "oldfieldtype": "Select", 
-  "options": "link:Grade", 
-  "read_only": 1, 
-  "reqd": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break1", 
-  "fieldtype": "Column Break", 
-  "read_only": 0, 
-  "width": "50%"
- }, 
- {
-  "default": "Yes", 
-  "doctype": "DocField", 
-  "fieldname": "is_active", 
-  "fieldtype": "Select", 
-  "in_filter": 1, 
-  "in_list_view": 1, 
-  "label": "Is Active", 
-  "oldfieldname": "is_active", 
-  "oldfieldtype": "Select", 
-  "options": "\nYes\nNo", 
-  "read_only": 0, 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "from_date", 
-  "fieldtype": "Date", 
-  "in_list_view": 1, 
-  "label": "From Date", 
-  "oldfieldname": "from_date", 
-  "oldfieldtype": "Date", 
-  "read_only": 0, 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "to_date", 
-  "fieldtype": "Date", 
-  "in_list_view": 1, 
-  "label": "To Date", 
-  "oldfieldname": "to_date", 
-  "oldfieldtype": "Date", 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "company", 
-  "fieldtype": "Select", 
-  "in_filter": 1, 
-  "label": "Company", 
-  "options": "link:Company", 
-  "read_only": 0, 
-  "reqd": 1
- }, 
- {
-  "description": "Salary breakup based on Earning and Deduction.", 
-  "doctype": "DocField", 
-  "fieldname": "earning_deduction", 
-  "fieldtype": "Section Break", 
-  "label": "Monthly Earning & Deduction", 
-  "oldfieldname": "earning_deduction", 
-  "oldfieldtype": "Section Break", 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "earning", 
-  "fieldtype": "Column Break", 
-  "hidden": 0, 
-  "label": "Earning", 
-  "oldfieldname": "col_brk2", 
-  "oldfieldtype": "Column Break", 
-  "read_only": 0, 
-  "width": "50%"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "earning_details", 
-  "fieldtype": "Table", 
-  "hidden": 0, 
-  "label": "Earning1", 
-  "oldfieldname": "earning_details", 
-  "oldfieldtype": "Table", 
-  "options": "Salary Structure Earning", 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "deduction", 
-  "fieldtype": "Column Break", 
-  "hidden": 0, 
-  "label": "Deduction", 
-  "oldfieldname": "col_brk3", 
-  "oldfieldtype": "Column Break", 
-  "read_only": 0, 
-  "width": "50%"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "deduction_details", 
-  "fieldtype": "Table", 
-  "hidden": 0, 
-  "label": "Deduction1", 
-  "oldfieldname": "deduction_details", 
-  "oldfieldtype": "Table", 
-  "options": "Salary Structure Deduction", 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "section_break0", 
-  "fieldtype": "Section Break", 
-  "options": "Simple", 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break2", 
-  "fieldtype": "Column Break", 
-  "read_only": 0, 
-  "width": "50%"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "total_earning", 
-  "fieldtype": "Currency", 
-  "label": "Total Earning", 
-  "oldfieldname": "total_earning", 
-  "oldfieldtype": "Currency", 
-  "options": "Company:company:default_currency", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "total_deduction", 
-  "fieldtype": "Currency", 
-  "label": "Total Deduction", 
-  "oldfieldname": "total_deduction", 
-  "oldfieldtype": "Currency", 
-  "options": "Company:company:default_currency", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break3", 
-  "fieldtype": "Column Break", 
-  "read_only": 0, 
-  "width": "50%"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "net_pay", 
-  "fieldtype": "Currency", 
-  "label": "Net Pay", 
-  "options": "Company:company:default_currency", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocPerm", 
-  "role": "HR User"
- }, 
- {
-  "doctype": "DocPerm", 
-  "role": "HR Manager"
- }
-]
\ No newline at end of file
+{
+ "allow_import": 1, 
+ "creation": "2013-03-07 18:50:29", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "fields": [
+  {
+   "fieldname": "column_break0", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0, 
+   "read_only": 0, 
+   "width": "50%"
+  }, 
+  {
+   "fieldname": "employee", 
+   "fieldtype": "Link", 
+   "in_filter": 1, 
+   "label": "Employee", 
+   "oldfieldname": "employee", 
+   "oldfieldtype": "Link", 
+   "options": "Employee", 
+   "permlevel": 0, 
+   "read_only": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "employee_name", 
+   "fieldtype": "Data", 
+   "in_list_view": 1, 
+   "label": "Employee Name", 
+   "oldfieldname": "employee_name", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "branch", 
+   "fieldtype": "Select", 
+   "in_filter": 1, 
+   "label": "Branch", 
+   "oldfieldname": "branch", 
+   "oldfieldtype": "Select", 
+   "options": "link:Branch", 
+   "permlevel": 0, 
+   "read_only": 1, 
+   "reqd": 0
+  }, 
+  {
+   "fieldname": "designation", 
+   "fieldtype": "Select", 
+   "in_filter": 1, 
+   "label": "Designation", 
+   "oldfieldname": "designation", 
+   "oldfieldtype": "Select", 
+   "options": "link:Designation", 
+   "permlevel": 0, 
+   "read_only": 1, 
+   "reqd": 0
+  }, 
+  {
+   "fieldname": "department", 
+   "fieldtype": "Select", 
+   "in_filter": 1, 
+   "label": "Department", 
+   "oldfieldname": "department", 
+   "oldfieldtype": "Select", 
+   "options": "link:Department", 
+   "permlevel": 0, 
+   "read_only": 1, 
+   "reqd": 0
+  }, 
+  {
+   "fieldname": "grade", 
+   "fieldtype": "Select", 
+   "in_filter": 1, 
+   "label": "Grade", 
+   "oldfieldname": "grade", 
+   "oldfieldtype": "Select", 
+   "options": "link:Grade", 
+   "permlevel": 0, 
+   "read_only": 1, 
+   "reqd": 0
+  }, 
+  {
+   "fieldname": "column_break1", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0, 
+   "read_only": 0, 
+   "width": "50%"
+  }, 
+  {
+   "default": "Yes", 
+   "fieldname": "is_active", 
+   "fieldtype": "Select", 
+   "in_filter": 1, 
+   "in_list_view": 1, 
+   "label": "Is Active", 
+   "oldfieldname": "is_active", 
+   "oldfieldtype": "Select", 
+   "options": "\nYes\nNo", 
+   "permlevel": 0, 
+   "read_only": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "from_date", 
+   "fieldtype": "Date", 
+   "in_list_view": 1, 
+   "label": "From Date", 
+   "oldfieldname": "from_date", 
+   "oldfieldtype": "Date", 
+   "permlevel": 0, 
+   "read_only": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "to_date", 
+   "fieldtype": "Date", 
+   "in_list_view": 1, 
+   "label": "To Date", 
+   "oldfieldname": "to_date", 
+   "oldfieldtype": "Date", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "company", 
+   "fieldtype": "Select", 
+   "in_filter": 1, 
+   "label": "Company", 
+   "options": "link:Company", 
+   "permlevel": 0, 
+   "read_only": 0, 
+   "reqd": 1
+  }, 
+  {
+   "description": "Salary breakup based on Earning and Deduction.", 
+   "fieldname": "earning_deduction", 
+   "fieldtype": "Section Break", 
+   "label": "Monthly Earning & Deduction", 
+   "oldfieldname": "earning_deduction", 
+   "oldfieldtype": "Section Break", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "earning", 
+   "fieldtype": "Column Break", 
+   "hidden": 0, 
+   "label": "Earning", 
+   "oldfieldname": "col_brk2", 
+   "oldfieldtype": "Column Break", 
+   "permlevel": 0, 
+   "read_only": 0, 
+   "width": "50%"
+  }, 
+  {
+   "fieldname": "earning_details", 
+   "fieldtype": "Table", 
+   "hidden": 0, 
+   "label": "Earning1", 
+   "oldfieldname": "earning_details", 
+   "oldfieldtype": "Table", 
+   "options": "Salary Structure Earning", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "deduction", 
+   "fieldtype": "Column Break", 
+   "hidden": 0, 
+   "label": "Deduction", 
+   "oldfieldname": "col_brk3", 
+   "oldfieldtype": "Column Break", 
+   "permlevel": 0, 
+   "read_only": 0, 
+   "width": "50%"
+  }, 
+  {
+   "fieldname": "deduction_details", 
+   "fieldtype": "Table", 
+   "hidden": 0, 
+   "label": "Deduction1", 
+   "oldfieldname": "deduction_details", 
+   "oldfieldtype": "Table", 
+   "options": "Salary Structure Deduction", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "section_break0", 
+   "fieldtype": "Section Break", 
+   "options": "Simple", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "column_break2", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0, 
+   "read_only": 0, 
+   "width": "50%"
+  }, 
+  {
+   "fieldname": "total_earning", 
+   "fieldtype": "Currency", 
+   "label": "Total Earning", 
+   "oldfieldname": "total_earning", 
+   "oldfieldtype": "Currency", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "total_deduction", 
+   "fieldtype": "Currency", 
+   "label": "Total Deduction", 
+   "oldfieldname": "total_deduction", 
+   "oldfieldtype": "Currency", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "column_break3", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0, 
+   "read_only": 0, 
+   "width": "50%"
+  }, 
+  {
+   "fieldname": "net_pay", 
+   "fieldtype": "Currency", 
+   "label": "Net Pay", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "read_only": 1
+  }
+ ], 
+ "icon": "icon-file-text", 
+ "idx": 1, 
+ "modified": "2013-12-20 19:24:28", 
+ "modified_by": "Administrator", 
+ "module": "HR", 
+ "name": "Salary Structure", 
+ "owner": "Administrator", 
+ "permissions": [
+  {
+   "amend": 0, 
+   "create": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "HR User", 
+   "submit": 0, 
+   "write": 1
+  }, 
+  {
+   "amend": 0, 
+   "create": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "HR Manager", 
+   "submit": 0, 
+   "write": 1
+  }
+ ]
+}
\ No newline at end of file
diff --git a/erpnext/hr/doctype/salary_structure_deduction/salary_structure_deduction.txt b/erpnext/hr/doctype/salary_structure_deduction/salary_structure_deduction.txt
index 845a70f..7b31d86 100644
--- a/erpnext/hr/doctype/salary_structure_deduction/salary_structure_deduction.txt
+++ b/erpnext/hr/doctype/salary_structure_deduction/salary_structure_deduction.txt
@@ -1,59 +1,46 @@
-[
- {
-  "creation": "2013-02-22 01:27:48", 
-  "docstatus": 0, 
-  "modified": "2013-12-20 19:23:43", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "doctype": "DocType", 
-  "istable": 1, 
-  "module": "HR", 
-  "name": "__common__"
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "Salary Structure Deduction", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Salary Structure Deduction"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "d_type", 
-  "fieldtype": "Link", 
-  "in_list_view": 1, 
-  "label": "Type", 
-  "oldfieldname": "d_type", 
-  "oldfieldtype": "Select", 
-  "options": "Deduction Type", 
-  "print_width": "200px", 
-  "reqd": 1, 
-  "width": "200px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "d_modified_amt", 
-  "fieldtype": "Currency", 
-  "in_list_view": 1, 
-  "label": "Amount", 
-  "oldfieldname": "d_modified_amt", 
-  "oldfieldtype": "Currency", 
-  "options": "Company:company:default_currency"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "depend_on_lwp", 
-  "fieldtype": "Check", 
-  "in_list_view": 0, 
-  "label": "Reduce Deduction for Leave Without Pay (LWP)", 
-  "oldfieldname": "depend_on_lwp", 
-  "oldfieldtype": "Check"
- }
-]
\ No newline at end of file
+{
+ "creation": "2013-02-22 01:27:48", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "fields": [
+  {
+   "fieldname": "d_type", 
+   "fieldtype": "Link", 
+   "in_list_view": 1, 
+   "label": "Type", 
+   "oldfieldname": "d_type", 
+   "oldfieldtype": "Select", 
+   "options": "Deduction Type", 
+   "permlevel": 0, 
+   "print_width": "200px", 
+   "reqd": 1, 
+   "width": "200px"
+  }, 
+  {
+   "fieldname": "d_modified_amt", 
+   "fieldtype": "Currency", 
+   "in_list_view": 1, 
+   "label": "Amount", 
+   "oldfieldname": "d_modified_amt", 
+   "oldfieldtype": "Currency", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "depend_on_lwp", 
+   "fieldtype": "Check", 
+   "in_list_view": 0, 
+   "label": "Reduce Deduction for Leave Without Pay (LWP)", 
+   "oldfieldname": "depend_on_lwp", 
+   "oldfieldtype": "Check", 
+   "permlevel": 0
+  }
+ ], 
+ "idx": 1, 
+ "istable": 1, 
+ "modified": "2013-12-20 19:23:43", 
+ "modified_by": "Administrator", 
+ "module": "HR", 
+ "name": "Salary Structure Deduction", 
+ "owner": "Administrator"
+}
\ No newline at end of file
diff --git a/erpnext/hr/doctype/salary_structure_earning/salary_structure_earning.txt b/erpnext/hr/doctype/salary_structure_earning/salary_structure_earning.txt
index d90c3cd..b0e91bf 100644
--- a/erpnext/hr/doctype/salary_structure_earning/salary_structure_earning.txt
+++ b/erpnext/hr/doctype/salary_structure_earning/salary_structure_earning.txt
@@ -1,61 +1,48 @@
-[
- {
-  "creation": "2013-02-22 01:27:48", 
-  "docstatus": 0, 
-  "modified": "2013-12-20 19:23:43", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "doctype": "DocType", 
-  "hide_heading": 0, 
-  "hide_toolbar": 0, 
-  "istable": 1, 
-  "module": "HR", 
-  "name": "__common__"
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "Salary Structure Earning", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Salary Structure Earning"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "e_type", 
-  "fieldtype": "Link", 
-  "in_list_view": 1, 
-  "label": "Type", 
-  "oldfieldname": "e_type", 
-  "oldfieldtype": "Data", 
-  "options": "Earning Type", 
-  "print_width": "200px", 
-  "reqd": 1, 
-  "width": "200px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "modified_value", 
-  "fieldtype": "Currency", 
-  "in_list_view": 1, 
-  "label": "Amount", 
-  "oldfieldname": "modified_value", 
-  "oldfieldtype": "Currency", 
-  "options": "Company:company:default_currency"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "depend_on_lwp", 
-  "fieldtype": "Check", 
-  "in_list_view": 0, 
-  "label": "Reduce Earning for Leave Without Pay (LWP)", 
-  "oldfieldname": "depend_on_lwp", 
-  "oldfieldtype": "Check"
- }
-]
\ No newline at end of file
+{
+ "creation": "2013-02-22 01:27:48", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "fields": [
+  {
+   "fieldname": "e_type", 
+   "fieldtype": "Link", 
+   "in_list_view": 1, 
+   "label": "Type", 
+   "oldfieldname": "e_type", 
+   "oldfieldtype": "Data", 
+   "options": "Earning Type", 
+   "permlevel": 0, 
+   "print_width": "200px", 
+   "reqd": 1, 
+   "width": "200px"
+  }, 
+  {
+   "fieldname": "modified_value", 
+   "fieldtype": "Currency", 
+   "in_list_view": 1, 
+   "label": "Amount", 
+   "oldfieldname": "modified_value", 
+   "oldfieldtype": "Currency", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "depend_on_lwp", 
+   "fieldtype": "Check", 
+   "in_list_view": 0, 
+   "label": "Reduce Earning for Leave Without Pay (LWP)", 
+   "oldfieldname": "depend_on_lwp", 
+   "oldfieldtype": "Check", 
+   "permlevel": 0
+  }
+ ], 
+ "hide_heading": 0, 
+ "hide_toolbar": 0, 
+ "idx": 1, 
+ "istable": 1, 
+ "modified": "2013-12-20 19:23:43", 
+ "modified_by": "Administrator", 
+ "module": "HR", 
+ "name": "Salary Structure Earning", 
+ "owner": "Administrator"
+}
\ No newline at end of file
diff --git a/erpnext/hr/doctype/upload_attendance/upload_attendance.txt b/erpnext/hr/doctype/upload_attendance/upload_attendance.txt
index 5c72761..a1b632a 100644
--- a/erpnext/hr/doctype/upload_attendance/upload_attendance.txt
+++ b/erpnext/hr/doctype/upload_attendance/upload_attendance.txt
@@ -1,102 +1,90 @@
-[
- {
-  "creation": "2013-01-25 11:34:53", 
-  "docstatus": 0, 
-  "modified": "2013-12-20 19:21:54", 
-  "modified_by": "Administrator", 
-  "owner": "harshada@webnotestech.com"
- }, 
- {
-  "allow_attach": 0, 
-  "doctype": "DocType", 
-  "icon": "icon-upload-alt", 
-  "issingle": 1, 
-  "max_attachments": 1, 
-  "module": "HR", 
-  "name": "__common__"
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "Upload Attendance", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "create": 1, 
-  "doctype": "DocPerm", 
-  "email": 1, 
-  "name": "__common__", 
-  "parent": "Upload Attendance", 
-  "parentfield": "permissions", 
-  "parenttype": "DocType", 
-  "permlevel": 0, 
-  "print": 1, 
-  "read": 1, 
-  "report": 0, 
-  "submit": 0, 
-  "write": 1
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Upload Attendance"
- }, 
- {
-  "description": "Download the Template, fill appropriate data and attach the modified file.\nAll dates and employee combination in the selected period will come in the template, with existing attendance records", 
-  "doctype": "DocField", 
-  "fieldname": "download_template", 
-  "fieldtype": "Section Break", 
-  "label": "Download Template"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "att_fr_date", 
-  "fieldtype": "Date", 
-  "label": "Attendance From Date", 
-  "oldfieldname": "attenadnce_date", 
-  "oldfieldtype": "Date", 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "att_to_date", 
-  "fieldtype": "Date", 
-  "label": "Attendance To Date", 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "get_template", 
-  "fieldtype": "Button", 
-  "label": "Get Template", 
-  "oldfieldtype": "Button"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "upload_attendance_data", 
-  "fieldtype": "Section Break", 
-  "label": "Import Attendance"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "upload_html", 
-  "fieldtype": "HTML", 
-  "label": "Upload HTML"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "import_log", 
-  "fieldtype": "HTML", 
-  "hidden": 0, 
-  "label": "Import Log"
- }, 
- {
-  "doctype": "DocPerm", 
-  "role": "HR User"
- }, 
- {
-  "doctype": "DocPerm", 
-  "role": "HR Manager"
- }
-]
\ No newline at end of file
+{
+ "allow_attach": 0, 
+ "creation": "2013-01-25 11:34:53", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "fields": [
+  {
+   "description": "Download the Template, fill appropriate data and attach the modified file.\nAll dates and employee combination in the selected period will come in the template, with existing attendance records", 
+   "fieldname": "download_template", 
+   "fieldtype": "Section Break", 
+   "label": "Download Template", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "att_fr_date", 
+   "fieldtype": "Date", 
+   "label": "Attendance From Date", 
+   "oldfieldname": "attenadnce_date", 
+   "oldfieldtype": "Date", 
+   "permlevel": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "att_to_date", 
+   "fieldtype": "Date", 
+   "label": "Attendance To Date", 
+   "permlevel": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "get_template", 
+   "fieldtype": "Button", 
+   "label": "Get Template", 
+   "oldfieldtype": "Button", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "upload_attendance_data", 
+   "fieldtype": "Section Break", 
+   "label": "Import Attendance", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "upload_html", 
+   "fieldtype": "HTML", 
+   "label": "Upload HTML", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "import_log", 
+   "fieldtype": "HTML", 
+   "hidden": 0, 
+   "label": "Import Log", 
+   "permlevel": 0
+  }
+ ], 
+ "icon": "icon-upload-alt", 
+ "idx": 1, 
+ "issingle": 1, 
+ "max_attachments": 1, 
+ "modified": "2013-12-20 19:21:54", 
+ "modified_by": "Administrator", 
+ "module": "HR", 
+ "name": "Upload Attendance", 
+ "owner": "harshada@webnotestech.com", 
+ "permissions": [
+  {
+   "create": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 0, 
+   "role": "HR User", 
+   "submit": 0, 
+   "write": 1
+  }, 
+  {
+   "create": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 0, 
+   "role": "HR Manager", 
+   "submit": 0, 
+   "write": 1
+  }
+ ]
+}
\ No newline at end of file
diff --git a/erpnext/hr/report/employee_birthday/employee_birthday.txt b/erpnext/hr/report/employee_birthday/employee_birthday.txt
index a114e5c..8bff51c 100644
--- a/erpnext/hr/report/employee_birthday/employee_birthday.txt
+++ b/erpnext/hr/report/employee_birthday/employee_birthday.txt
@@ -1,22 +1,15 @@
-[
- {
-  "creation": "2013-05-06 17:56:03", 
-  "docstatus": 0, 
-  "modified": "2014-03-07 15:30:27", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "doctype": "Report", 
-  "is_standard": "Yes", 
-  "module": "HR", 
-  "name": "__common__", 
-  "ref_doctype": "Employee", 
-  "report_name": "Employee Birthday", 
-  "report_type": "Script Report"
- }, 
- {
-  "doctype": "Report", 
-  "name": "Employee Birthday"
- }
-]
\ No newline at end of file
+{
+ "creation": "2013-05-06 17:56:03", 
+ "docstatus": 0, 
+ "doctype": "Report", 
+ "idx": 1, 
+ "is_standard": "Yes", 
+ "modified": "2014-03-07 15:30:27", 
+ "modified_by": "Administrator", 
+ "module": "HR", 
+ "name": "Employee Birthday", 
+ "owner": "Administrator", 
+ "ref_doctype": "Employee", 
+ "report_name": "Employee Birthday", 
+ "report_type": "Script Report"
+}
\ No newline at end of file
diff --git a/erpnext/hr/report/employee_information/employee_information.txt b/erpnext/hr/report/employee_information/employee_information.txt
index 8bd3c4c..a92d581 100644
--- a/erpnext/hr/report/employee_information/employee_information.txt
+++ b/erpnext/hr/report/employee_information/employee_information.txt
@@ -1,23 +1,16 @@
-[
- {
-  "creation": "2013-05-06 18:43:53", 
-  "docstatus": 0, 
-  "modified": "2014-03-07 15:30:27", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "doctype": "Report", 
-  "is_standard": "Yes", 
-  "json": "{\"filters\":[],\"columns\":[[\"name\",\"Employee\"],[\"employee_number\",\"Employee\"],[\"date_of_joining\",\"Employee\"],[\"branch\",\"Employee\"],[\"department\",\"Employee\"],[\"designation\",\"Employee\"],[\"gender\",\"Employee\"],[\"status\",\"Employee\"],[\"company\",\"Employee\"],[\"employment_type\",\"Employee\"],[\"grade\",\"Employee\"],[\"reports_to\",\"Employee\"],[\"company_email\",\"Employee\"]],\"sort_by\":\"Employee.bank_ac_no\",\"sort_order\":\"desc\",\"sort_by_next\":\"\",\"sort_order_next\":\"desc\"}", 
-  "module": "HR", 
-  "name": "__common__", 
-  "ref_doctype": "Employee", 
-  "report_name": "Employee Information", 
-  "report_type": "Report Builder"
- }, 
- {
-  "doctype": "Report", 
-  "name": "Employee Information"
- }
-]
\ No newline at end of file
+{
+ "creation": "2013-05-06 18:43:53", 
+ "docstatus": 0, 
+ "doctype": "Report", 
+ "idx": 1, 
+ "is_standard": "Yes", 
+ "json": "{\"filters\":[],\"columns\":[[\"name\",\"Employee\"],[\"employee_number\",\"Employee\"],[\"date_of_joining\",\"Employee\"],[\"branch\",\"Employee\"],[\"department\",\"Employee\"],[\"designation\",\"Employee\"],[\"gender\",\"Employee\"],[\"status\",\"Employee\"],[\"company\",\"Employee\"],[\"employment_type\",\"Employee\"],[\"grade\",\"Employee\"],[\"reports_to\",\"Employee\"],[\"company_email\",\"Employee\"]],\"sort_by\":\"Employee.bank_ac_no\",\"sort_order\":\"desc\",\"sort_by_next\":\"\",\"sort_order_next\":\"desc\"}", 
+ "modified": "2014-03-07 15:30:27", 
+ "modified_by": "Administrator", 
+ "module": "HR", 
+ "name": "Employee Information", 
+ "owner": "Administrator", 
+ "ref_doctype": "Employee", 
+ "report_name": "Employee Information", 
+ "report_type": "Report Builder"
+}
\ No newline at end of file
diff --git a/erpnext/hr/report/employee_leave_balance/employee_leave_balance.txt b/erpnext/hr/report/employee_leave_balance/employee_leave_balance.txt
index f682c64..dfee82d 100644
--- a/erpnext/hr/report/employee_leave_balance/employee_leave_balance.txt
+++ b/erpnext/hr/report/employee_leave_balance/employee_leave_balance.txt
@@ -1,22 +1,15 @@
-[
- {
-  "creation": "2013-02-22 15:29:34", 
-  "docstatus": 0, 
-  "modified": "2014-03-07 15:30:27", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "doctype": "Report", 
-  "is_standard": "Yes", 
-  "module": "HR", 
-  "name": "__common__", 
-  "ref_doctype": "Employee", 
-  "report_name": "Employee Leave Balance", 
-  "report_type": "Script Report"
- }, 
- {
-  "doctype": "Report", 
-  "name": "Employee Leave Balance"
- }
-]
\ No newline at end of file
+{
+ "creation": "2013-02-22 15:29:34", 
+ "docstatus": 0, 
+ "doctype": "Report", 
+ "idx": 1, 
+ "is_standard": "Yes", 
+ "modified": "2014-03-07 15:30:27", 
+ "modified_by": "Administrator", 
+ "module": "HR", 
+ "name": "Employee Leave Balance", 
+ "owner": "Administrator", 
+ "ref_doctype": "Employee", 
+ "report_name": "Employee Leave Balance", 
+ "report_type": "Script Report"
+}
\ No newline at end of file
diff --git a/erpnext/hr/report/monthly_attendance_sheet/monthly_attendance_sheet.txt b/erpnext/hr/report/monthly_attendance_sheet/monthly_attendance_sheet.txt
index 5c51c4b..2bc4e86 100644
--- a/erpnext/hr/report/monthly_attendance_sheet/monthly_attendance_sheet.txt
+++ b/erpnext/hr/report/monthly_attendance_sheet/monthly_attendance_sheet.txt
@@ -1,23 +1,16 @@
-[
- {
-  "creation": "2013-05-13 14:04:03", 
-  "docstatus": 0, 
-  "modified": "2014-03-07 15:30:27", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "add_total_row": 0, 
-  "doctype": "Report", 
-  "is_standard": "Yes", 
-  "module": "HR", 
-  "name": "__common__", 
-  "ref_doctype": "Attendance", 
-  "report_name": "Monthly Attendance Sheet", 
-  "report_type": "Script Report"
- }, 
- {
-  "doctype": "Report", 
-  "name": "Monthly Attendance Sheet"
- }
-]
\ No newline at end of file
+{
+ "add_total_row": 0, 
+ "creation": "2013-05-13 14:04:03", 
+ "docstatus": 0, 
+ "doctype": "Report", 
+ "idx": 1, 
+ "is_standard": "Yes", 
+ "modified": "2014-03-07 15:30:27", 
+ "modified_by": "Administrator", 
+ "module": "HR", 
+ "name": "Monthly Attendance Sheet", 
+ "owner": "Administrator", 
+ "ref_doctype": "Attendance", 
+ "report_name": "Monthly Attendance Sheet", 
+ "report_type": "Script Report"
+}
\ No newline at end of file
diff --git a/erpnext/hr/report/monthly_salary_register/monthly_salary_register.txt b/erpnext/hr/report/monthly_salary_register/monthly_salary_register.txt
index 80b0c13..f03fdee 100644
--- a/erpnext/hr/report/monthly_salary_register/monthly_salary_register.txt
+++ b/erpnext/hr/report/monthly_salary_register/monthly_salary_register.txt
@@ -1,23 +1,16 @@
-[
- {
-  "creation": "2013-05-07 18:09:42", 
-  "docstatus": 0, 
-  "modified": "2014-03-07 15:30:27", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "add_total_row": 1, 
-  "doctype": "Report", 
-  "is_standard": "Yes", 
-  "module": "HR", 
-  "name": "__common__", 
-  "ref_doctype": "Salary Slip", 
-  "report_name": "Monthly Salary Register", 
-  "report_type": "Script Report"
- }, 
- {
-  "doctype": "Report", 
-  "name": "Monthly Salary Register"
- }
-]
\ No newline at end of file
+{
+ "add_total_row": 1, 
+ "creation": "2013-05-07 18:09:42", 
+ "docstatus": 0, 
+ "doctype": "Report", 
+ "idx": 1, 
+ "is_standard": "Yes", 
+ "modified": "2014-03-07 15:30:27", 
+ "modified_by": "Administrator", 
+ "module": "HR", 
+ "name": "Monthly Salary Register", 
+ "owner": "Administrator", 
+ "ref_doctype": "Salary Slip", 
+ "report_name": "Monthly Salary Register", 
+ "report_type": "Script Report"
+}
\ No newline at end of file
diff --git a/erpnext/manufacturing/doctype/bom/bom.txt b/erpnext/manufacturing/doctype/bom/bom.txt
index 4afc160..14f8dd4 100644
--- a/erpnext/manufacturing/doctype/bom/bom.txt
+++ b/erpnext/manufacturing/doctype/bom/bom.txt
@@ -1,281 +1,271 @@
-[
- {
-  "creation": "2013-01-22 15:11:38", 
-  "docstatus": 0, 
-  "modified": "2014-01-20 17:48:26", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "allow_attach": 0, 
-  "allow_copy": 0, 
-  "allow_import": 1, 
-  "allow_rename": 0, 
-  "doctype": "DocType", 
-  "document_type": "Master", 
-  "hide_heading": 0, 
-  "hide_toolbar": 0, 
-  "icon": "icon-sitemap", 
-  "in_create": 0, 
-  "is_submittable": 1, 
-  "issingle": 0, 
-  "istable": 0, 
-  "module": "Manufacturing", 
-  "name": "__common__", 
-  "read_only": 0, 
-  "search_fields": "item"
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "BOM", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "cancel": 1, 
-  "create": 1, 
-  "delete": 1, 
-  "doctype": "DocPerm", 
-  "email": 1, 
-  "name": "__common__", 
-  "parent": "BOM", 
-  "parentfield": "permissions", 
-  "parenttype": "DocType", 
-  "permlevel": 0, 
-  "print": 1, 
-  "read": 1, 
-  "report": 1, 
-  "submit": 1, 
-  "write": 1
- }, 
- {
-  "doctype": "DocType", 
-  "name": "BOM"
- }, 
- {
-  "description": "Item to be manufactured or repacked", 
-  "doctype": "DocField", 
-  "fieldname": "item", 
-  "fieldtype": "Link", 
-  "in_filter": 1, 
-  "in_list_view": 0, 
-  "label": "Item", 
-  "oldfieldname": "item", 
-  "oldfieldtype": "Link", 
-  "options": "Item", 
-  "reqd": 1, 
-  "search_index": 1
- }, 
- {
-  "allow_on_submit": 1, 
-  "default": "1", 
-  "doctype": "DocField", 
-  "fieldname": "is_active", 
-  "fieldtype": "Check", 
-  "hidden": 0, 
-  "in_list_view": 1, 
-  "label": "Is Active", 
-  "no_copy": 1, 
-  "oldfieldname": "is_active", 
-  "oldfieldtype": "Select", 
-  "reqd": 0
- }, 
- {
-  "allow_on_submit": 1, 
-  "default": "1", 
-  "doctype": "DocField", 
-  "fieldname": "is_default", 
-  "fieldtype": "Check", 
-  "in_list_view": 1, 
-  "label": "Is Default", 
-  "no_copy": 1, 
-  "oldfieldname": "is_default", 
-  "oldfieldtype": "Check"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "cb0", 
-  "fieldtype": "Column Break"
- }, 
- {
-  "description": "Manage cost of operations", 
-  "doctype": "DocField", 
-  "fieldname": "with_operations", 
-  "fieldtype": "Check", 
-  "label": "With Operations"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "rm_cost_as_per", 
-  "fieldtype": "Select", 
-  "label": "Rate Of Materials Based On", 
-  "options": "Valuation Rate\nLast Purchase Rate\nPrice List"
- }, 
- {
-  "depends_on": "eval:doc.rm_cost_as_per===\"Price List\"", 
-  "doctype": "DocField", 
-  "fieldname": "buying_price_list", 
-  "fieldtype": "Link", 
-  "label": "Price List", 
-  "options": "Price List"
- }, 
- {
-  "depends_on": "with_operations", 
-  "description": "Specify the operations, operating cost and give a unique Operation no to your operations.", 
-  "doctype": "DocField", 
-  "fieldname": "operations", 
-  "fieldtype": "Section Break", 
-  "label": "Operations", 
-  "oldfieldtype": "Section Break"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "bom_operations", 
-  "fieldtype": "Table", 
-  "label": "BOM Operations", 
-  "oldfieldname": "bom_operations", 
-  "oldfieldtype": "Table", 
-  "options": "BOM Operation"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "materials", 
-  "fieldtype": "Section Break", 
-  "label": "Materials", 
-  "oldfieldtype": "Section Break"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "bom_materials", 
-  "fieldtype": "Table", 
-  "label": "BOM Item", 
-  "oldfieldname": "bom_materials", 
-  "oldfieldtype": "Table", 
-  "options": "BOM Item"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "costing", 
-  "fieldtype": "Section Break", 
-  "label": "Costing", 
-  "oldfieldtype": "Section Break"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "total_cost", 
-  "fieldtype": "Float", 
-  "in_list_view": 1, 
-  "label": "Total Cost", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "cb1", 
-  "fieldtype": "Column Break"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "raw_material_cost", 
-  "fieldtype": "Float", 
-  "label": "Total Raw Material Cost", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "operating_cost", 
-  "fieldtype": "Float", 
-  "label": "Total Operating Cost", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "more_info_section", 
-  "fieldtype": "Section Break", 
-  "label": "More Info"
- }, 
- {
-  "default": "1", 
-  "description": "Quantity of item obtained after manufacturing / repacking from given quantities of raw materials", 
-  "doctype": "DocField", 
-  "fieldname": "quantity", 
-  "fieldtype": "Float", 
-  "label": "Quantity", 
-  "oldfieldname": "quantity", 
-  "oldfieldtype": "Currency", 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "uom", 
-  "fieldtype": "Select", 
-  "label": "Item UOM", 
-  "options": "link:UOM", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "col_break23", 
-  "fieldtype": "Column Break"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "project_name", 
-  "fieldtype": "Link", 
-  "in_filter": 1, 
-  "label": "Project Name", 
-  "oldfieldname": "project_name", 
-  "oldfieldtype": "Link", 
-  "options": "Project"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "description", 
-  "fieldtype": "Small Text", 
-  "in_list_view": 1, 
-  "label": "Item Desription", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "amended_from", 
-  "fieldtype": "Link", 
-  "ignore_restrictions": 1, 
-  "label": "Amended From", 
-  "no_copy": 1, 
-  "options": "BOM", 
-  "print_hide": 1, 
-  "read_only": 1
- }, 
- {
-  "depends_on": "eval:!doc.__islocal", 
-  "doctype": "DocField", 
-  "fieldname": "section_break0", 
-  "fieldtype": "Section Break", 
-  "hidden": 0, 
-  "label": "Materials Required (Exploded)", 
-  "print_hide": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "flat_bom_details", 
-  "fieldtype": "Table", 
-  "hidden": 0, 
-  "label": "Materials Required (Exploded)", 
-  "no_copy": 1, 
-  "oldfieldname": "flat_bom_details", 
-  "oldfieldtype": "Table", 
-  "options": "BOM Explosion Item", 
-  "print_hide": 1, 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocPerm", 
-  "role": "Manufacturing Manager"
- }, 
- {
-  "doctype": "DocPerm", 
-  "role": "Manufacturing User"
- }
-]
\ No newline at end of file
+{
+ "allow_attach": 0, 
+ "allow_copy": 0, 
+ "allow_import": 1, 
+ "allow_rename": 0, 
+ "creation": "2013-01-22 15:11:38", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "document_type": "Master", 
+ "fields": [
+  {
+   "description": "Item to be manufactured or repacked", 
+   "fieldname": "item", 
+   "fieldtype": "Link", 
+   "in_filter": 1, 
+   "in_list_view": 0, 
+   "label": "Item", 
+   "oldfieldname": "item", 
+   "oldfieldtype": "Link", 
+   "options": "Item", 
+   "permlevel": 0, 
+   "reqd": 1, 
+   "search_index": 1
+  }, 
+  {
+   "allow_on_submit": 1, 
+   "default": "1", 
+   "fieldname": "is_active", 
+   "fieldtype": "Check", 
+   "hidden": 0, 
+   "in_list_view": 1, 
+   "label": "Is Active", 
+   "no_copy": 1, 
+   "oldfieldname": "is_active", 
+   "oldfieldtype": "Select", 
+   "permlevel": 0, 
+   "reqd": 0
+  }, 
+  {
+   "allow_on_submit": 1, 
+   "default": "1", 
+   "fieldname": "is_default", 
+   "fieldtype": "Check", 
+   "in_list_view": 1, 
+   "label": "Is Default", 
+   "no_copy": 1, 
+   "oldfieldname": "is_default", 
+   "oldfieldtype": "Check", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "cb0", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0
+  }, 
+  {
+   "description": "Manage cost of operations", 
+   "fieldname": "with_operations", 
+   "fieldtype": "Check", 
+   "label": "With Operations", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "rm_cost_as_per", 
+   "fieldtype": "Select", 
+   "label": "Rate Of Materials Based On", 
+   "options": "Valuation Rate\nLast Purchase Rate\nPrice List", 
+   "permlevel": 0
+  }, 
+  {
+   "depends_on": "eval:doc.rm_cost_as_per===\"Price List\"", 
+   "fieldname": "buying_price_list", 
+   "fieldtype": "Link", 
+   "label": "Price List", 
+   "options": "Price List", 
+   "permlevel": 0
+  }, 
+  {
+   "depends_on": "with_operations", 
+   "description": "Specify the operations, operating cost and give a unique Operation no to your operations.", 
+   "fieldname": "operations", 
+   "fieldtype": "Section Break", 
+   "label": "Operations", 
+   "oldfieldtype": "Section Break", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "bom_operations", 
+   "fieldtype": "Table", 
+   "label": "BOM Operations", 
+   "oldfieldname": "bom_operations", 
+   "oldfieldtype": "Table", 
+   "options": "BOM Operation", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "materials", 
+   "fieldtype": "Section Break", 
+   "label": "Materials", 
+   "oldfieldtype": "Section Break", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "bom_materials", 
+   "fieldtype": "Table", 
+   "label": "BOM Item", 
+   "oldfieldname": "bom_materials", 
+   "oldfieldtype": "Table", 
+   "options": "BOM Item", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "costing", 
+   "fieldtype": "Section Break", 
+   "label": "Costing", 
+   "oldfieldtype": "Section Break", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "total_cost", 
+   "fieldtype": "Float", 
+   "in_list_view": 1, 
+   "label": "Total Cost", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "cb1", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "raw_material_cost", 
+   "fieldtype": "Float", 
+   "label": "Total Raw Material Cost", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "operating_cost", 
+   "fieldtype": "Float", 
+   "label": "Total Operating Cost", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "more_info_section", 
+   "fieldtype": "Section Break", 
+   "label": "More Info", 
+   "permlevel": 0
+  }, 
+  {
+   "default": "1", 
+   "description": "Quantity of item obtained after manufacturing / repacking from given quantities of raw materials", 
+   "fieldname": "quantity", 
+   "fieldtype": "Float", 
+   "label": "Quantity", 
+   "oldfieldname": "quantity", 
+   "oldfieldtype": "Currency", 
+   "permlevel": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "uom", 
+   "fieldtype": "Select", 
+   "label": "Item UOM", 
+   "options": "link:UOM", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "col_break23", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "project_name", 
+   "fieldtype": "Link", 
+   "in_filter": 1, 
+   "label": "Project Name", 
+   "oldfieldname": "project_name", 
+   "oldfieldtype": "Link", 
+   "options": "Project", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "description", 
+   "fieldtype": "Small Text", 
+   "in_list_view": 1, 
+   "label": "Item Desription", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "amended_from", 
+   "fieldtype": "Link", 
+   "ignore_restrictions": 1, 
+   "label": "Amended From", 
+   "no_copy": 1, 
+   "options": "BOM", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1
+  }, 
+  {
+   "depends_on": "eval:!doc.__islocal", 
+   "fieldname": "section_break0", 
+   "fieldtype": "Section Break", 
+   "hidden": 0, 
+   "label": "Materials Required (Exploded)", 
+   "permlevel": 0, 
+   "print_hide": 0
+  }, 
+  {
+   "fieldname": "flat_bom_details", 
+   "fieldtype": "Table", 
+   "hidden": 0, 
+   "label": "Materials Required (Exploded)", 
+   "no_copy": 1, 
+   "oldfieldname": "flat_bom_details", 
+   "oldfieldtype": "Table", 
+   "options": "BOM Explosion Item", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1
+  }
+ ], 
+ "hide_heading": 0, 
+ "hide_toolbar": 0, 
+ "icon": "icon-sitemap", 
+ "idx": 1, 
+ "in_create": 0, 
+ "is_submittable": 1, 
+ "issingle": 0, 
+ "istable": 0, 
+ "modified": "2014-01-20 17:48:26", 
+ "modified_by": "Administrator", 
+ "module": "Manufacturing", 
+ "name": "BOM", 
+ "owner": "Administrator", 
+ "permissions": [
+  {
+   "cancel": 1, 
+   "create": 1, 
+   "delete": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Manufacturing Manager", 
+   "submit": 1, 
+   "write": 1
+  }, 
+  {
+   "cancel": 1, 
+   "create": 1, 
+   "delete": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Manufacturing User", 
+   "submit": 1, 
+   "write": 1
+  }
+ ], 
+ "read_only": 0, 
+ "search_fields": "item"
+}
\ No newline at end of file
diff --git a/erpnext/manufacturing/doctype/bom_explosion_item/bom_explosion_item.txt b/erpnext/manufacturing/doctype/bom_explosion_item/bom_explosion_item.txt
index 55342aa..c0bd779 100644
--- a/erpnext/manufacturing/doctype/bom_explosion_item/bom_explosion_item.txt
+++ b/erpnext/manufacturing/doctype/bom_explosion_item/bom_explosion_item.txt
@@ -1,98 +1,91 @@
-[
- {
-  "creation": "2013-03-07 11:42:57", 
-  "docstatus": 0, 
-  "modified": "2013-12-20 19:22:57", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "autoname": "FBD/.######", 
-  "default_print_format": "Standard", 
-  "doctype": "DocType", 
-  "istable": 1, 
-  "module": "Manufacturing", 
-  "name": "__common__", 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "BOM Explosion Item", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0, 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocType", 
-  "name": "BOM Explosion Item"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "item_code", 
-  "fieldtype": "Link", 
-  "in_list_view": 1, 
-  "label": "Item Code", 
-  "oldfieldname": "item_code", 
-  "oldfieldtype": "Link", 
-  "options": "Item"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "description", 
-  "fieldtype": "Text", 
-  "in_list_view": 1, 
-  "label": "Description", 
-  "oldfieldname": "description", 
-  "oldfieldtype": "Text", 
-  "print_width": "300px", 
-  "width": "300px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "qty", 
-  "fieldtype": "Float", 
-  "in_list_view": 1, 
-  "label": "Qty", 
-  "oldfieldname": "qty", 
-  "oldfieldtype": "Currency"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "rate", 
-  "fieldtype": "Float", 
-  "in_list_view": 1, 
-  "label": "Rate", 
-  "oldfieldname": "standard_rate", 
-  "oldfieldtype": "Currency"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "amount", 
-  "fieldtype": "Float", 
-  "in_list_view": 1, 
-  "label": "Amount", 
-  "oldfieldname": "amount_as_per_sr", 
-  "oldfieldtype": "Currency"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "stock_uom", 
-  "fieldtype": "Link", 
-  "in_list_view": 0, 
-  "label": "Stock UOM", 
-  "oldfieldname": "stock_uom", 
-  "oldfieldtype": "Link", 
-  "options": "UOM"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "qty_consumed_per_unit", 
-  "fieldtype": "Float", 
-  "hidden": 0, 
-  "in_list_view": 1, 
-  "label": "Qty Consumed Per Unit", 
-  "no_copy": 0
- }
-]
\ No newline at end of file
+{
+ "autoname": "FBD/.######", 
+ "creation": "2013-03-07 11:42:57", 
+ "default_print_format": "Standard", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "fields": [
+  {
+   "fieldname": "item_code", 
+   "fieldtype": "Link", 
+   "in_list_view": 1, 
+   "label": "Item Code", 
+   "oldfieldname": "item_code", 
+   "oldfieldtype": "Link", 
+   "options": "Item", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "description", 
+   "fieldtype": "Text", 
+   "in_list_view": 1, 
+   "label": "Description", 
+   "oldfieldname": "description", 
+   "oldfieldtype": "Text", 
+   "permlevel": 0, 
+   "print_width": "300px", 
+   "read_only": 1, 
+   "width": "300px"
+  }, 
+  {
+   "fieldname": "qty", 
+   "fieldtype": "Float", 
+   "in_list_view": 1, 
+   "label": "Qty", 
+   "oldfieldname": "qty", 
+   "oldfieldtype": "Currency", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "rate", 
+   "fieldtype": "Float", 
+   "in_list_view": 1, 
+   "label": "Rate", 
+   "oldfieldname": "standard_rate", 
+   "oldfieldtype": "Currency", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "amount", 
+   "fieldtype": "Float", 
+   "in_list_view": 1, 
+   "label": "Amount", 
+   "oldfieldname": "amount_as_per_sr", 
+   "oldfieldtype": "Currency", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "stock_uom", 
+   "fieldtype": "Link", 
+   "in_list_view": 0, 
+   "label": "Stock UOM", 
+   "oldfieldname": "stock_uom", 
+   "oldfieldtype": "Link", 
+   "options": "UOM", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "qty_consumed_per_unit", 
+   "fieldtype": "Float", 
+   "hidden": 0, 
+   "in_list_view": 1, 
+   "label": "Qty Consumed Per Unit", 
+   "no_copy": 0, 
+   "permlevel": 0, 
+   "read_only": 1
+  }
+ ], 
+ "idx": 1, 
+ "istable": 1, 
+ "modified": "2013-12-20 19:22:57", 
+ "modified_by": "Administrator", 
+ "module": "Manufacturing", 
+ "name": "BOM Explosion Item", 
+ "owner": "Administrator", 
+ "read_only": 0
+}
\ No newline at end of file
diff --git a/erpnext/manufacturing/doctype/bom_item/bom_item.txt b/erpnext/manufacturing/doctype/bom_item/bom_item.txt
index 6949b75..2e50435 100644
--- a/erpnext/manufacturing/doctype/bom_item/bom_item.txt
+++ b/erpnext/manufacturing/doctype/bom_item/bom_item.txt
@@ -1,154 +1,141 @@
-[
- {
-  "creation": "2013-02-22 01:27:49", 
-  "docstatus": 0, 
-  "modified": "2014-02-03 12:47:39", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "doctype": "DocType", 
-  "istable": 1, 
-  "module": "Manufacturing", 
-  "name": "__common__"
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "BOM Item", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "doctype": "DocType", 
-  "name": "BOM Item"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "operation_no", 
-  "fieldtype": "Select", 
-  "in_list_view": 1, 
-  "label": "Operation No", 
-  "oldfieldname": "operation_no", 
-  "oldfieldtype": "Data", 
-  "reqd": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "item_code", 
-  "fieldtype": "Link", 
-  "in_filter": 1, 
-  "in_list_view": 1, 
-  "label": "Item Code", 
-  "oldfieldname": "item_code", 
-  "oldfieldtype": "Link", 
-  "options": "Item", 
-  "reqd": 1, 
-  "search_index": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "bom_no", 
-  "fieldtype": "Link", 
-  "in_filter": 1, 
-  "in_list_view": 1, 
-  "label": "BOM No", 
-  "oldfieldname": "bom_no", 
-  "oldfieldtype": "Link", 
-  "options": "BOM", 
-  "print_width": "150px", 
-  "reqd": 0, 
-  "search_index": 1, 
-  "width": "150px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "col_break1", 
-  "fieldtype": "Column Break"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "description", 
-  "fieldtype": "Text", 
-  "label": "Item Description", 
-  "oldfieldname": "description", 
-  "oldfieldtype": "Text", 
-  "print_width": "250px", 
-  "reqd": 0, 
-  "width": "250px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "quantity_and_rate", 
-  "fieldtype": "Section Break", 
-  "label": "Quantity and Rate"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "qty", 
-  "fieldtype": "Float", 
-  "in_list_view": 1, 
-  "label": "Qty", 
-  "oldfieldname": "qty", 
-  "oldfieldtype": "Currency", 
-  "reqd": 1
- }, 
- {
-  "description": "See \"Rate Of Materials Based On\" in Costing Section", 
-  "doctype": "DocField", 
-  "fieldname": "rate", 
-  "fieldtype": "Float", 
-  "in_list_view": 1, 
-  "label": "Rate"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "col_break2", 
-  "fieldtype": "Column Break"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "stock_uom", 
-  "fieldtype": "Link", 
-  "in_list_view": 0, 
-  "label": "Stock UOM", 
-  "oldfieldname": "stock_uom", 
-  "oldfieldtype": "Data", 
-  "options": "UOM", 
-  "read_only": 1, 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "amount", 
-  "fieldtype": "Float", 
-  "in_list_view": 1, 
-  "label": "Amount", 
-  "oldfieldname": "amount_as_per_mar", 
-  "oldfieldtype": "Currency", 
-  "print_width": "150px", 
-  "read_only": 1, 
-  "width": "150px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "scrap", 
-  "fieldtype": "Float", 
-  "label": "Scrap %", 
-  "oldfieldname": "scrap", 
-  "oldfieldtype": "Currency", 
-  "print_hide": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "qty_consumed_per_unit", 
-  "fieldtype": "Float", 
-  "hidden": 1, 
-  "label": "Qty Consumed Per Unit", 
-  "oldfieldname": "qty_consumed_per_unit", 
-  "oldfieldtype": "Float", 
-  "print_hide": 1, 
-  "read_only": 1
- }
-]
\ No newline at end of file
+{
+ "creation": "2013-02-22 01:27:49", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "fields": [
+  {
+   "fieldname": "operation_no", 
+   "fieldtype": "Select", 
+   "in_list_view": 1, 
+   "label": "Operation No", 
+   "oldfieldname": "operation_no", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "reqd": 0
+  }, 
+  {
+   "fieldname": "item_code", 
+   "fieldtype": "Link", 
+   "in_filter": 1, 
+   "in_list_view": 1, 
+   "label": "Item Code", 
+   "oldfieldname": "item_code", 
+   "oldfieldtype": "Link", 
+   "options": "Item", 
+   "permlevel": 0, 
+   "reqd": 1, 
+   "search_index": 1
+  }, 
+  {
+   "fieldname": "bom_no", 
+   "fieldtype": "Link", 
+   "in_filter": 1, 
+   "in_list_view": 1, 
+   "label": "BOM No", 
+   "oldfieldname": "bom_no", 
+   "oldfieldtype": "Link", 
+   "options": "BOM", 
+   "permlevel": 0, 
+   "print_width": "150px", 
+   "reqd": 0, 
+   "search_index": 1, 
+   "width": "150px"
+  }, 
+  {
+   "fieldname": "col_break1", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "description", 
+   "fieldtype": "Text", 
+   "label": "Item Description", 
+   "oldfieldname": "description", 
+   "oldfieldtype": "Text", 
+   "permlevel": 0, 
+   "print_width": "250px", 
+   "reqd": 0, 
+   "width": "250px"
+  }, 
+  {
+   "fieldname": "quantity_and_rate", 
+   "fieldtype": "Section Break", 
+   "label": "Quantity and Rate", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "qty", 
+   "fieldtype": "Float", 
+   "in_list_view": 1, 
+   "label": "Qty", 
+   "oldfieldname": "qty", 
+   "oldfieldtype": "Currency", 
+   "permlevel": 0, 
+   "reqd": 1
+  }, 
+  {
+   "description": "See \"Rate Of Materials Based On\" in Costing Section", 
+   "fieldname": "rate", 
+   "fieldtype": "Float", 
+   "in_list_view": 1, 
+   "label": "Rate", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "col_break2", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "stock_uom", 
+   "fieldtype": "Link", 
+   "in_list_view": 0, 
+   "label": "Stock UOM", 
+   "oldfieldname": "stock_uom", 
+   "oldfieldtype": "Data", 
+   "options": "UOM", 
+   "permlevel": 0, 
+   "read_only": 1, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "amount", 
+   "fieldtype": "Float", 
+   "in_list_view": 1, 
+   "label": "Amount", 
+   "oldfieldname": "amount_as_per_mar", 
+   "oldfieldtype": "Currency", 
+   "permlevel": 0, 
+   "print_width": "150px", 
+   "read_only": 1, 
+   "width": "150px"
+  }, 
+  {
+   "fieldname": "scrap", 
+   "fieldtype": "Float", 
+   "label": "Scrap %", 
+   "oldfieldname": "scrap", 
+   "oldfieldtype": "Currency", 
+   "permlevel": 0, 
+   "print_hide": 1
+  }, 
+  {
+   "fieldname": "qty_consumed_per_unit", 
+   "fieldtype": "Float", 
+   "hidden": 1, 
+   "label": "Qty Consumed Per Unit", 
+   "oldfieldname": "qty_consumed_per_unit", 
+   "oldfieldtype": "Float", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1
+  }
+ ], 
+ "idx": 1, 
+ "istable": 1, 
+ "modified": "2014-02-03 12:47:39", 
+ "modified_by": "Administrator", 
+ "module": "Manufacturing", 
+ "name": "BOM Item", 
+ "owner": "Administrator"
+}
\ No newline at end of file
diff --git a/erpnext/manufacturing/doctype/bom_operation/bom_operation.txt b/erpnext/manufacturing/doctype/bom_operation/bom_operation.txt
index b2628c1..e164e10 100644
--- a/erpnext/manufacturing/doctype/bom_operation/bom_operation.txt
+++ b/erpnext/manufacturing/doctype/bom_operation/bom_operation.txt
@@ -1,94 +1,81 @@
-[
- {
-  "creation": "2013-02-22 01:27:49", 
-  "docstatus": 0, 
-  "modified": "2014-02-03 12:53:03", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "doctype": "DocType", 
-  "istable": 1, 
-  "module": "Manufacturing", 
-  "name": "__common__"
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "BOM Operation", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "doctype": "DocType", 
-  "name": "BOM Operation"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "operation_no", 
-  "fieldtype": "Data", 
-  "in_list_view": 1, 
-  "label": "Operation No", 
-  "oldfieldname": "operation_no", 
-  "oldfieldtype": "Data", 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "opn_description", 
-  "fieldtype": "Text", 
-  "in_list_view": 1, 
-  "label": "Operation Description", 
-  "oldfieldname": "opn_description", 
-  "oldfieldtype": "Text", 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "col_break1", 
-  "fieldtype": "Column Break"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "workstation", 
-  "fieldtype": "Link", 
-  "in_list_view": 1, 
-  "label": "Workstation", 
-  "oldfieldname": "workstation", 
-  "oldfieldtype": "Link", 
-  "options": "Workstation", 
-  "reqd": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "hour_rate", 
-  "fieldtype": "Float", 
-  "in_list_view": 0, 
-  "label": "Hour Rate", 
-  "oldfieldname": "hour_rate", 
-  "oldfieldtype": "Currency", 
-  "reqd": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "time_in_mins", 
-  "fieldtype": "Float", 
-  "in_list_view": 0, 
-  "label": "Operation Time (mins)", 
-  "oldfieldname": "time_in_mins", 
-  "oldfieldtype": "Currency", 
-  "reqd": 0
- }, 
- {
-  "allow_on_submit": 0, 
-  "doctype": "DocField", 
-  "fieldname": "operating_cost", 
-  "fieldtype": "Float", 
-  "in_list_view": 1, 
-  "label": "Operating Cost", 
-  "oldfieldname": "operating_cost", 
-  "oldfieldtype": "Currency", 
-  "reqd": 0
- }
-]
\ No newline at end of file
+{
+ "creation": "2013-02-22 01:27:49", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "fields": [
+  {
+   "fieldname": "operation_no", 
+   "fieldtype": "Data", 
+   "in_list_view": 1, 
+   "label": "Operation No", 
+   "oldfieldname": "operation_no", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "opn_description", 
+   "fieldtype": "Text", 
+   "in_list_view": 1, 
+   "label": "Operation Description", 
+   "oldfieldname": "opn_description", 
+   "oldfieldtype": "Text", 
+   "permlevel": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "col_break1", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "workstation", 
+   "fieldtype": "Link", 
+   "in_list_view": 1, 
+   "label": "Workstation", 
+   "oldfieldname": "workstation", 
+   "oldfieldtype": "Link", 
+   "options": "Workstation", 
+   "permlevel": 0, 
+   "reqd": 0
+  }, 
+  {
+   "fieldname": "hour_rate", 
+   "fieldtype": "Float", 
+   "in_list_view": 0, 
+   "label": "Hour Rate", 
+   "oldfieldname": "hour_rate", 
+   "oldfieldtype": "Currency", 
+   "permlevel": 0, 
+   "reqd": 0
+  }, 
+  {
+   "fieldname": "time_in_mins", 
+   "fieldtype": "Float", 
+   "in_list_view": 0, 
+   "label": "Operation Time (mins)", 
+   "oldfieldname": "time_in_mins", 
+   "oldfieldtype": "Currency", 
+   "permlevel": 0, 
+   "reqd": 0
+  }, 
+  {
+   "allow_on_submit": 0, 
+   "fieldname": "operating_cost", 
+   "fieldtype": "Float", 
+   "in_list_view": 1, 
+   "label": "Operating Cost", 
+   "oldfieldname": "operating_cost", 
+   "oldfieldtype": "Currency", 
+   "permlevel": 0, 
+   "reqd": 0
+  }
+ ], 
+ "idx": 1, 
+ "istable": 1, 
+ "modified": "2014-02-03 12:53:03", 
+ "modified_by": "Administrator", 
+ "module": "Manufacturing", 
+ "name": "BOM Operation", 
+ "owner": "Administrator"
+}
\ No newline at end of file
diff --git a/erpnext/manufacturing/doctype/bom_replace_tool/bom_replace_tool.txt b/erpnext/manufacturing/doctype/bom_replace_tool/bom_replace_tool.txt
index cdb65ee..872881b 100644
--- a/erpnext/manufacturing/doctype/bom_replace_tool/bom_replace_tool.txt
+++ b/erpnext/manufacturing/doctype/bom_replace_tool/bom_replace_tool.txt
@@ -1,80 +1,63 @@
-[
- {
-  "creation": "2012-12-06 12:10:10", 
-  "docstatus": 0, 
-  "modified": "2013-07-05 14:27:52", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "allow_copy": 1, 
-  "allow_email": 1, 
-  "allow_print": 1, 
-  "description": "Replace a particular BOM in all other BOMs where it is used. It will replace the old BOM link, update cost and regenerate \"BOM Explosion Item\" table as per new BOM", 
-  "doctype": "DocType", 
-  "document_type": "Other", 
-  "hide_heading": 1, 
-  "hide_toolbar": 1, 
-  "icon": "icon-magic", 
-  "in_create": 1, 
-  "issingle": 1, 
-  "module": "Manufacturing", 
-  "name": "__common__", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "BOM Replace Tool", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0, 
-  "read_only": 0
- }, 
- {
-  "create": 1, 
-  "doctype": "DocPerm", 
-  "name": "__common__", 
-  "parent": "BOM Replace Tool", 
-  "parentfield": "permissions", 
-  "parenttype": "DocType", 
-  "permlevel": 0, 
-  "read": 1, 
-  "report": 0, 
-  "role": "Manufacturing Manager", 
-  "submit": 0, 
-  "write": 1
- }, 
- {
-  "doctype": "DocType", 
-  "name": "BOM Replace Tool"
- }, 
- {
-  "description": "The BOM which will be replaced", 
-  "doctype": "DocField", 
-  "fieldname": "current_bom", 
-  "fieldtype": "Link", 
-  "label": "Current BOM", 
-  "options": "BOM", 
-  "reqd": 1
- }, 
- {
-  "description": "The new BOM after replacement", 
-  "doctype": "DocField", 
-  "fieldname": "new_bom", 
-  "fieldtype": "Link", 
-  "label": "New BOM", 
-  "options": "BOM", 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "replace", 
-  "fieldtype": "Button", 
-  "label": "Replace", 
-  "options": "replace_bom"
- }, 
- {
-  "doctype": "DocPerm"
- }
-]
\ No newline at end of file
+{
+ "allow_copy": 1, 
+ "allow_email": 1, 
+ "allow_print": 1, 
+ "creation": "2012-12-06 12:10:10", 
+ "description": "Replace a particular BOM in all other BOMs where it is used. It will replace the old BOM link, update cost and regenerate \"BOM Explosion Item\" table as per new BOM", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "document_type": "Other", 
+ "fields": [
+  {
+   "description": "The BOM which will be replaced", 
+   "fieldname": "current_bom", 
+   "fieldtype": "Link", 
+   "label": "Current BOM", 
+   "options": "BOM", 
+   "permlevel": 0, 
+   "read_only": 0, 
+   "reqd": 1
+  }, 
+  {
+   "description": "The new BOM after replacement", 
+   "fieldname": "new_bom", 
+   "fieldtype": "Link", 
+   "label": "New BOM", 
+   "options": "BOM", 
+   "permlevel": 0, 
+   "read_only": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "replace", 
+   "fieldtype": "Button", 
+   "label": "Replace", 
+   "options": "replace_bom", 
+   "permlevel": 0, 
+   "read_only": 0
+  }
+ ], 
+ "hide_heading": 1, 
+ "hide_toolbar": 1, 
+ "icon": "icon-magic", 
+ "idx": 1, 
+ "in_create": 1, 
+ "issingle": 1, 
+ "modified": "2013-07-05 14:27:52", 
+ "modified_by": "Administrator", 
+ "module": "Manufacturing", 
+ "name": "BOM Replace Tool", 
+ "owner": "Administrator", 
+ "permissions": [
+  {
+   "create": 1, 
+   "permlevel": 0, 
+   "read": 1, 
+   "report": 0, 
+   "role": "Manufacturing Manager", 
+   "submit": 0, 
+   "write": 1
+  }
+ ], 
+ "read_only": 1
+}
\ No newline at end of file
diff --git a/erpnext/manufacturing/doctype/production_order/production_order.txt b/erpnext/manufacturing/doctype/production_order/production_order.txt
index 41ef1ce..539d919 100644
--- a/erpnext/manufacturing/doctype/production_order/production_order.txt
+++ b/erpnext/manufacturing/doctype/production_order/production_order.txt
@@ -1,267 +1,248 @@
-[
- {
-  "creation": "2013-01-10 16:34:16", 
-  "docstatus": 0, 
-  "modified": "2014-01-20 17:49:01", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "allow_import": 1, 
-  "autoname": "naming_series:", 
-  "doctype": "DocType", 
-  "icon": "icon-cogs", 
-  "in_create": 0, 
-  "is_submittable": 1, 
-  "module": "Manufacturing", 
-  "name": "__common__"
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "Production Order", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "amend": 1, 
-  "cancel": 1, 
-  "create": 1, 
-  "delete": 1, 
-  "doctype": "DocPerm", 
-  "email": 1, 
-  "name": "__common__", 
-  "parent": "Production Order", 
-  "parentfield": "permissions", 
-  "parenttype": "DocType", 
-  "permlevel": 0, 
-  "print": 1, 
-  "read": 1, 
-  "report": 1, 
-  "role": "Manufacturing User", 
-  "submit": 1, 
-  "write": 1
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Production Order"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "item", 
-  "fieldtype": "Section Break", 
-  "label": "Item", 
-  "options": "icon-gift"
- }, 
- {
-  "default": "PRO", 
-  "doctype": "DocField", 
-  "fieldname": "naming_series", 
-  "fieldtype": "Select", 
-  "label": "Series", 
-  "options": "\nPRO", 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "production_item", 
-  "fieldtype": "Link", 
-  "in_filter": 1, 
-  "in_list_view": 1, 
-  "label": "Item To Manufacture", 
-  "oldfieldname": "production_item", 
-  "oldfieldtype": "Link", 
-  "options": "Item", 
-  "read_only": 0, 
-  "reqd": 1
- }, 
- {
-  "depends_on": "production_item", 
-  "description": "Bill of Material to be considered for manufacturing", 
-  "doctype": "DocField", 
-  "fieldname": "bom_no", 
-  "fieldtype": "Link", 
-  "in_list_view": 1, 
-  "label": "BOM No", 
-  "oldfieldname": "bom_no", 
-  "oldfieldtype": "Link", 
-  "options": "BOM", 
-  "read_only": 0, 
-  "reqd": 1
- }, 
- {
-  "default": "1", 
-  "description": "If checked, BOM for sub-assembly items will be considered for getting raw materials. Otherwise, all sub-assembly items will be treated as a raw material.", 
-  "doctype": "DocField", 
-  "fieldname": "use_multi_level_bom", 
-  "fieldtype": "Check", 
-  "label": "Use Multi-Level BOM"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break1", 
-  "fieldtype": "Column Break", 
-  "oldfieldtype": "Column Break", 
-  "read_only": 0, 
-  "width": "50%"
- }, 
- {
-  "description": "Manufacture against Sales Order", 
-  "doctype": "DocField", 
-  "fieldname": "sales_order", 
-  "fieldtype": "Link", 
-  "label": "Sales Order", 
-  "options": "Sales Order", 
-  "read_only": 0
- }, 
- {
-  "depends_on": "production_item", 
-  "doctype": "DocField", 
-  "fieldname": "qty", 
-  "fieldtype": "Float", 
-  "in_list_view": 1, 
-  "label": "Qty To Manufacture", 
-  "oldfieldname": "qty", 
-  "oldfieldtype": "Currency", 
-  "read_only": 0, 
-  "reqd": 1
- }, 
- {
-  "depends_on": "eval:doc.docstatus==1", 
-  "description": "Automatically updated via Stock Entry of type Manufacture/Repack", 
-  "doctype": "DocField", 
-  "fieldname": "produced_qty", 
-  "fieldtype": "Float", 
-  "label": "Manufactured Qty", 
-  "no_copy": 1, 
-  "oldfieldname": "produced_qty", 
-  "oldfieldtype": "Currency", 
-  "read_only": 1
- }, 
- {
-  "depends_on": "sales_order", 
-  "doctype": "DocField", 
-  "fieldname": "expected_delivery_date", 
-  "fieldtype": "Date", 
-  "label": "Expected Delivery Date", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "warehouses", 
-  "fieldtype": "Section Break", 
-  "label": "Warehouses", 
-  "options": "icon-building"
- }, 
- {
-  "depends_on": "production_item", 
-  "description": "Manufactured quantity will be updated in this warehouse", 
-  "doctype": "DocField", 
-  "fieldname": "fg_warehouse", 
-  "fieldtype": "Link", 
-  "in_list_view": 1, 
-  "label": "For Warehouse", 
-  "options": "Warehouse", 
-  "read_only": 0, 
-  "reqd": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break_12", 
-  "fieldtype": "Column Break"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "wip_warehouse", 
-  "fieldtype": "Link", 
-  "label": "Work-in-Progress Warehouse", 
-  "options": "Warehouse", 
-  "reqd": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "more_info", 
-  "fieldtype": "Section Break", 
-  "label": "More Info", 
-  "options": "icon-file-text", 
-  "read_only": 0
- }, 
- {
-  "depends_on": "eval:!doc.__islocal", 
-  "doctype": "DocField", 
-  "fieldname": "status", 
-  "fieldtype": "Select", 
-  "in_filter": 1, 
-  "in_list_view": 1, 
-  "label": "Status", 
-  "no_copy": 1, 
-  "oldfieldname": "status", 
-  "oldfieldtype": "Select", 
-  "options": "\nDraft\nSubmitted\nStopped\nIn Process\nCompleted\nCancelled", 
-  "read_only": 1, 
-  "reqd": 1, 
-  "search_index": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "description", 
-  "fieldtype": "Small Text", 
-  "label": "Item Description", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "project_name", 
-  "fieldtype": "Link", 
-  "in_filter": 1, 
-  "label": "Project Name", 
-  "oldfieldname": "project_name", 
-  "oldfieldtype": "Link", 
-  "options": "Project", 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break2", 
-  "fieldtype": "Column Break", 
-  "read_only": 0, 
-  "width": "50%"
- }, 
- {
-  "depends_on": "production_item", 
-  "doctype": "DocField", 
-  "fieldname": "stock_uom", 
-  "fieldtype": "Link", 
-  "label": "Stock UOM", 
-  "oldfieldname": "stock_uom", 
-  "oldfieldtype": "Data", 
-  "options": "UOM", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "company", 
-  "fieldtype": "Link", 
-  "label": "Company", 
-  "oldfieldname": "company", 
-  "oldfieldtype": "Link", 
-  "options": "Company", 
-  "read_only": 0, 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "amended_from", 
-  "fieldtype": "Data", 
-  "ignore_restrictions": 1, 
-  "label": "Amended From", 
-  "no_copy": 1, 
-  "oldfieldname": "amended_from", 
-  "oldfieldtype": "Data", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocPerm"
- }
-]
\ No newline at end of file
+{
+ "allow_import": 1, 
+ "autoname": "naming_series:", 
+ "creation": "2013-01-10 16:34:16", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "fields": [
+  {
+   "fieldname": "item", 
+   "fieldtype": "Section Break", 
+   "label": "Item", 
+   "options": "icon-gift", 
+   "permlevel": 0
+  }, 
+  {
+   "default": "PRO", 
+   "fieldname": "naming_series", 
+   "fieldtype": "Select", 
+   "label": "Series", 
+   "options": "\nPRO", 
+   "permlevel": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "production_item", 
+   "fieldtype": "Link", 
+   "in_filter": 1, 
+   "in_list_view": 1, 
+   "label": "Item To Manufacture", 
+   "oldfieldname": "production_item", 
+   "oldfieldtype": "Link", 
+   "options": "Item", 
+   "permlevel": 0, 
+   "read_only": 0, 
+   "reqd": 1
+  }, 
+  {
+   "depends_on": "production_item", 
+   "description": "Bill of Material to be considered for manufacturing", 
+   "fieldname": "bom_no", 
+   "fieldtype": "Link", 
+   "in_list_view": 1, 
+   "label": "BOM No", 
+   "oldfieldname": "bom_no", 
+   "oldfieldtype": "Link", 
+   "options": "BOM", 
+   "permlevel": 0, 
+   "read_only": 0, 
+   "reqd": 1
+  }, 
+  {
+   "default": "1", 
+   "description": "If checked, BOM for sub-assembly items will be considered for getting raw materials. Otherwise, all sub-assembly items will be treated as a raw material.", 
+   "fieldname": "use_multi_level_bom", 
+   "fieldtype": "Check", 
+   "label": "Use Multi-Level BOM", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "column_break1", 
+   "fieldtype": "Column Break", 
+   "oldfieldtype": "Column Break", 
+   "permlevel": 0, 
+   "read_only": 0, 
+   "width": "50%"
+  }, 
+  {
+   "description": "Manufacture against Sales Order", 
+   "fieldname": "sales_order", 
+   "fieldtype": "Link", 
+   "label": "Sales Order", 
+   "options": "Sales Order", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "depends_on": "production_item", 
+   "fieldname": "qty", 
+   "fieldtype": "Float", 
+   "in_list_view": 1, 
+   "label": "Qty To Manufacture", 
+   "oldfieldname": "qty", 
+   "oldfieldtype": "Currency", 
+   "permlevel": 0, 
+   "read_only": 0, 
+   "reqd": 1
+  }, 
+  {
+   "depends_on": "eval:doc.docstatus==1", 
+   "description": "Automatically updated via Stock Entry of type Manufacture/Repack", 
+   "fieldname": "produced_qty", 
+   "fieldtype": "Float", 
+   "label": "Manufactured Qty", 
+   "no_copy": 1, 
+   "oldfieldname": "produced_qty", 
+   "oldfieldtype": "Currency", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "depends_on": "sales_order", 
+   "fieldname": "expected_delivery_date", 
+   "fieldtype": "Date", 
+   "label": "Expected Delivery Date", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "warehouses", 
+   "fieldtype": "Section Break", 
+   "label": "Warehouses", 
+   "options": "icon-building", 
+   "permlevel": 0
+  }, 
+  {
+   "depends_on": "production_item", 
+   "description": "Manufactured quantity will be updated in this warehouse", 
+   "fieldname": "fg_warehouse", 
+   "fieldtype": "Link", 
+   "in_list_view": 1, 
+   "label": "For Warehouse", 
+   "options": "Warehouse", 
+   "permlevel": 0, 
+   "read_only": 0, 
+   "reqd": 0
+  }, 
+  {
+   "fieldname": "column_break_12", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "wip_warehouse", 
+   "fieldtype": "Link", 
+   "label": "Work-in-Progress Warehouse", 
+   "options": "Warehouse", 
+   "permlevel": 0, 
+   "reqd": 0
+  }, 
+  {
+   "fieldname": "more_info", 
+   "fieldtype": "Section Break", 
+   "label": "More Info", 
+   "options": "icon-file-text", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "depends_on": "eval:!doc.__islocal", 
+   "fieldname": "status", 
+   "fieldtype": "Select", 
+   "in_filter": 1, 
+   "in_list_view": 1, 
+   "label": "Status", 
+   "no_copy": 1, 
+   "oldfieldname": "status", 
+   "oldfieldtype": "Select", 
+   "options": "\nDraft\nSubmitted\nStopped\nIn Process\nCompleted\nCancelled", 
+   "permlevel": 0, 
+   "read_only": 1, 
+   "reqd": 1, 
+   "search_index": 1
+  }, 
+  {
+   "fieldname": "description", 
+   "fieldtype": "Small Text", 
+   "label": "Item Description", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "project_name", 
+   "fieldtype": "Link", 
+   "in_filter": 1, 
+   "label": "Project Name", 
+   "oldfieldname": "project_name", 
+   "oldfieldtype": "Link", 
+   "options": "Project", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "column_break2", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0, 
+   "read_only": 0, 
+   "width": "50%"
+  }, 
+  {
+   "depends_on": "production_item", 
+   "fieldname": "stock_uom", 
+   "fieldtype": "Link", 
+   "label": "Stock UOM", 
+   "oldfieldname": "stock_uom", 
+   "oldfieldtype": "Data", 
+   "options": "UOM", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "company", 
+   "fieldtype": "Link", 
+   "label": "Company", 
+   "oldfieldname": "company", 
+   "oldfieldtype": "Link", 
+   "options": "Company", 
+   "permlevel": 0, 
+   "read_only": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "amended_from", 
+   "fieldtype": "Data", 
+   "ignore_restrictions": 1, 
+   "label": "Amended From", 
+   "no_copy": 1, 
+   "oldfieldname": "amended_from", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "read_only": 1
+  }
+ ], 
+ "icon": "icon-cogs", 
+ "idx": 1, 
+ "in_create": 0, 
+ "is_submittable": 1, 
+ "modified": "2014-01-20 17:49:01", 
+ "modified_by": "Administrator", 
+ "module": "Manufacturing", 
+ "name": "Production Order", 
+ "owner": "Administrator", 
+ "permissions": [
+  {
+   "amend": 1, 
+   "cancel": 1, 
+   "create": 1, 
+   "delete": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Manufacturing User", 
+   "submit": 1, 
+   "write": 1
+  }
+ ]
+}
\ No newline at end of file
diff --git a/erpnext/manufacturing/doctype/production_plan_item/production_plan_item.txt b/erpnext/manufacturing/doctype/production_plan_item/production_plan_item.txt
index 2068188..16ff141 100644
--- a/erpnext/manufacturing/doctype/production_plan_item/production_plan_item.txt
+++ b/erpnext/manufacturing/doctype/production_plan_item/production_plan_item.txt
@@ -1,125 +1,112 @@
-[
- {
-  "creation": "2013-02-22 01:27:49", 
-  "docstatus": 0, 
-  "modified": "2013-12-20 19:23:25", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "autoname": "PPID/.#####", 
-  "doctype": "DocType", 
-  "istable": 1, 
-  "module": "Manufacturing", 
-  "name": "__common__"
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "Production Plan Item", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Production Plan Item"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "item_code", 
-  "fieldtype": "Link", 
-  "in_list_view": 1, 
-  "label": "Item Code", 
-  "oldfieldname": "item_code", 
-  "oldfieldtype": "Link", 
-  "options": "Item", 
-  "print_width": "150px", 
-  "reqd": 1, 
-  "width": "150px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "bom_no", 
-  "fieldtype": "Link", 
-  "in_list_view": 1, 
-  "label": "BOM No", 
-  "oldfieldname": "bom_no", 
-  "oldfieldtype": "Link", 
-  "options": "BOM", 
-  "print_width": "100px", 
-  "reqd": 1, 
-  "width": "100px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "planned_qty", 
-  "fieldtype": "Float", 
-  "in_list_view": 1, 
-  "label": "Planned Qty", 
-  "oldfieldname": "planned_qty", 
-  "oldfieldtype": "Currency", 
-  "print_width": "100px", 
-  "reqd": 1, 
-  "width": "100px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "sales_order", 
-  "fieldtype": "Link", 
-  "in_list_view": 1, 
-  "label": "Sales Order", 
-  "oldfieldname": "source_docname", 
-  "oldfieldtype": "Data", 
-  "options": "Sales Order", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "so_pending_qty", 
-  "fieldtype": "Float", 
-  "in_list_view": 1, 
-  "label": "SO Pending Qty", 
-  "oldfieldname": "prevdoc_reqd_qty", 
-  "oldfieldtype": "Currency", 
-  "print_width": "100px", 
-  "read_only": 1, 
-  "reqd": 0, 
-  "width": "100px"
- }, 
- {
-  "description": "Reserved Warehouse in Sales Order / Finished Goods Warehouse", 
-  "doctype": "DocField", 
-  "fieldname": "warehouse", 
-  "fieldtype": "Link", 
-  "label": "Warehouse", 
-  "options": "Warehouse", 
-  "reqd": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "stock_uom", 
-  "fieldtype": "Link", 
-  "in_list_view": 0, 
-  "label": "UOM", 
-  "oldfieldname": "stock_uom", 
-  "oldfieldtype": "Data", 
-  "options": "UOM", 
-  "print_width": "80px", 
-  "read_only": 1, 
-  "reqd": 1, 
-  "width": "80px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "description", 
-  "fieldtype": "Text", 
-  "in_list_view": 1, 
-  "label": "Description", 
-  "oldfieldname": "description", 
-  "oldfieldtype": "Text", 
-  "print_width": "200px", 
-  "read_only": 1, 
-  "width": "200px"
- }
-]
\ No newline at end of file
+{
+ "autoname": "PPID/.#####", 
+ "creation": "2013-02-22 01:27:49", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "fields": [
+  {
+   "fieldname": "item_code", 
+   "fieldtype": "Link", 
+   "in_list_view": 1, 
+   "label": "Item Code", 
+   "oldfieldname": "item_code", 
+   "oldfieldtype": "Link", 
+   "options": "Item", 
+   "permlevel": 0, 
+   "print_width": "150px", 
+   "reqd": 1, 
+   "width": "150px"
+  }, 
+  {
+   "fieldname": "bom_no", 
+   "fieldtype": "Link", 
+   "in_list_view": 1, 
+   "label": "BOM No", 
+   "oldfieldname": "bom_no", 
+   "oldfieldtype": "Link", 
+   "options": "BOM", 
+   "permlevel": 0, 
+   "print_width": "100px", 
+   "reqd": 1, 
+   "width": "100px"
+  }, 
+  {
+   "fieldname": "planned_qty", 
+   "fieldtype": "Float", 
+   "in_list_view": 1, 
+   "label": "Planned Qty", 
+   "oldfieldname": "planned_qty", 
+   "oldfieldtype": "Currency", 
+   "permlevel": 0, 
+   "print_width": "100px", 
+   "reqd": 1, 
+   "width": "100px"
+  }, 
+  {
+   "fieldname": "sales_order", 
+   "fieldtype": "Link", 
+   "in_list_view": 1, 
+   "label": "Sales Order", 
+   "oldfieldname": "source_docname", 
+   "oldfieldtype": "Data", 
+   "options": "Sales Order", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "so_pending_qty", 
+   "fieldtype": "Float", 
+   "in_list_view": 1, 
+   "label": "SO Pending Qty", 
+   "oldfieldname": "prevdoc_reqd_qty", 
+   "oldfieldtype": "Currency", 
+   "permlevel": 0, 
+   "print_width": "100px", 
+   "read_only": 1, 
+   "reqd": 0, 
+   "width": "100px"
+  }, 
+  {
+   "description": "Reserved Warehouse in Sales Order / Finished Goods Warehouse", 
+   "fieldname": "warehouse", 
+   "fieldtype": "Link", 
+   "label": "Warehouse", 
+   "options": "Warehouse", 
+   "permlevel": 0, 
+   "reqd": 0
+  }, 
+  {
+   "fieldname": "stock_uom", 
+   "fieldtype": "Link", 
+   "in_list_view": 0, 
+   "label": "UOM", 
+   "oldfieldname": "stock_uom", 
+   "oldfieldtype": "Data", 
+   "options": "UOM", 
+   "permlevel": 0, 
+   "print_width": "80px", 
+   "read_only": 1, 
+   "reqd": 1, 
+   "width": "80px"
+  }, 
+  {
+   "fieldname": "description", 
+   "fieldtype": "Text", 
+   "in_list_view": 1, 
+   "label": "Description", 
+   "oldfieldname": "description", 
+   "oldfieldtype": "Text", 
+   "permlevel": 0, 
+   "print_width": "200px", 
+   "read_only": 1, 
+   "width": "200px"
+  }
+ ], 
+ "idx": 1, 
+ "istable": 1, 
+ "modified": "2013-12-20 19:23:25", 
+ "modified_by": "Administrator", 
+ "module": "Manufacturing", 
+ "name": "Production Plan Item", 
+ "owner": "Administrator"
+}
\ No newline at end of file
diff --git a/erpnext/manufacturing/doctype/production_plan_sales_order/production_plan_sales_order.txt b/erpnext/manufacturing/doctype/production_plan_sales_order/production_plan_sales_order.txt
index 11a02a5..38241ea 100644
--- a/erpnext/manufacturing/doctype/production_plan_sales_order/production_plan_sales_order.txt
+++ b/erpnext/manufacturing/doctype/production_plan_sales_order/production_plan_sales_order.txt
@@ -1,71 +1,61 @@
-[
- {
-  "creation": "2013-02-22 01:27:49", 
-  "docstatus": 0, 
-  "modified": "2013-12-20 19:23:25", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "autoname": "PP/.SO/.#####", 
-  "doctype": "DocType", 
-  "istable": 1, 
-  "module": "Manufacturing", 
-  "name": "__common__"
- }, 
- {
-  "doctype": "DocField", 
-  "in_list_view": 1, 
-  "name": "__common__", 
-  "parent": "Production Plan Sales Order", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Production Plan Sales Order"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "sales_order", 
-  "fieldtype": "Link", 
-  "label": "Sales Order", 
-  "oldfieldname": "prevdoc_docname", 
-  "oldfieldtype": "Data", 
-  "options": "Sales Order", 
-  "print_width": "150px", 
-  "width": "150px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "sales_order_date", 
-  "fieldtype": "Date", 
-  "label": "SO Date", 
-  "oldfieldname": "document_date", 
-  "oldfieldtype": "Date", 
-  "print_width": "120px", 
-  "read_only": 1, 
-  "width": "120px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "customer", 
-  "fieldtype": "Link", 
-  "label": "Customer", 
-  "options": "Customer", 
-  "print_width": "150px", 
-  "read_only": 1, 
-  "width": "150px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "grand_total", 
-  "fieldtype": "Currency", 
-  "label": "Grand Total", 
-  "options": "Company:company:default_currency", 
-  "print_width": "120px", 
-  "read_only": 1, 
-  "width": "120px"
- }
-]
\ No newline at end of file
+{
+ "autoname": "PP/.SO/.#####", 
+ "creation": "2013-02-22 01:27:49", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "fields": [
+  {
+   "fieldname": "sales_order", 
+   "fieldtype": "Link", 
+   "in_list_view": 1, 
+   "label": "Sales Order", 
+   "oldfieldname": "prevdoc_docname", 
+   "oldfieldtype": "Data", 
+   "options": "Sales Order", 
+   "permlevel": 0, 
+   "print_width": "150px", 
+   "width": "150px"
+  }, 
+  {
+   "fieldname": "sales_order_date", 
+   "fieldtype": "Date", 
+   "in_list_view": 1, 
+   "label": "SO Date", 
+   "oldfieldname": "document_date", 
+   "oldfieldtype": "Date", 
+   "permlevel": 0, 
+   "print_width": "120px", 
+   "read_only": 1, 
+   "width": "120px"
+  }, 
+  {
+   "fieldname": "customer", 
+   "fieldtype": "Link", 
+   "in_list_view": 1, 
+   "label": "Customer", 
+   "options": "Customer", 
+   "permlevel": 0, 
+   "print_width": "150px", 
+   "read_only": 1, 
+   "width": "150px"
+  }, 
+  {
+   "fieldname": "grand_total", 
+   "fieldtype": "Currency", 
+   "in_list_view": 1, 
+   "label": "Grand Total", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "print_width": "120px", 
+   "read_only": 1, 
+   "width": "120px"
+  }
+ ], 
+ "idx": 1, 
+ "istable": 1, 
+ "modified": "2013-12-20 19:23:25", 
+ "modified_by": "Administrator", 
+ "module": "Manufacturing", 
+ "name": "Production Plan Sales Order", 
+ "owner": "Administrator"
+}
\ No newline at end of file
diff --git a/erpnext/manufacturing/doctype/production_planning_tool/production_planning_tool.txt b/erpnext/manufacturing/doctype/production_planning_tool/production_planning_tool.txt
index 4c3b065..b758c1a 100644
--- a/erpnext/manufacturing/doctype/production_planning_tool/production_planning_tool.txt
+++ b/erpnext/manufacturing/doctype/production_planning_tool/production_planning_tool.txt
@@ -1,196 +1,177 @@
-[
- {
-  "creation": "2013-01-21 12:03:47", 
-  "docstatus": 0, 
-  "modified": "2013-12-20 19:23:25", 
-  "modified_by": "Administrator", 
-  "owner": "jai@webnotestech.com"
- }, 
- {
-  "default_print_format": "Standard", 
-  "doctype": "DocType", 
-  "icon": "icon-calendar", 
-  "in_create": 1, 
-  "issingle": 1, 
-  "module": "Manufacturing", 
-  "name": "__common__", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "Production Planning Tool", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "create": 1, 
-  "doctype": "DocPerm", 
-  "email": 1, 
-  "name": "__common__", 
-  "parent": "Production Planning Tool", 
-  "parentfield": "permissions", 
-  "parenttype": "DocType", 
-  "permlevel": 0, 
-  "print": 1, 
-  "read": 1, 
-  "report": 0, 
-  "role": "Manufacturing User", 
-  "submit": 0, 
-  "write": 1
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Production Planning Tool"
- }, 
- {
-  "description": "Select Sales Orders from which you want to create Production Orders.", 
-  "doctype": "DocField", 
-  "fieldname": "select_sales_orders", 
-  "fieldtype": "Section Break", 
-  "label": "Select Sales Orders"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break0", 
-  "fieldtype": "Column Break", 
-  "width": "50%"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "fg_item", 
-  "fieldtype": "Link", 
-  "label": "Filter based on item", 
-  "options": "Item"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "customer", 
-  "fieldtype": "Link", 
-  "label": "Filter based on customer", 
-  "options": "Customer"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "company", 
-  "fieldtype": "Link", 
-  "label": "Company", 
-  "options": "Company", 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break1", 
-  "fieldtype": "Column Break", 
-  "width": "50%"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "from_date", 
-  "fieldtype": "Date", 
-  "label": "From Date"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "to_date", 
-  "fieldtype": "Date", 
-  "label": "To Date"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "section_break1", 
-  "fieldtype": "Section Break", 
-  "options": "Simple"
- }, 
- {
-  "description": "Pull sales orders (pending to deliver) based on the above criteria", 
-  "doctype": "DocField", 
-  "fieldname": "get_sales_orders", 
-  "fieldtype": "Button", 
-  "label": "Get Sales Orders", 
-  "options": "get_open_sales_orders"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "pp_so_details", 
-  "fieldtype": "Table", 
-  "label": "Production Plan Sales Orders", 
-  "options": "Production Plan Sales Order"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "items_for_production", 
-  "fieldtype": "Section Break", 
-  "label": "Select Items"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "get_items_from_so", 
-  "fieldtype": "Button", 
-  "label": "Get Items From Sales Orders", 
-  "options": "get_items_from_so"
- }, 
- {
-  "default": "1", 
-  "description": "If checked, BOM for sub-assembly items will be considered for getting raw materials. Otherwise, all sub-assembly items will be treated as a raw material.", 
-  "doctype": "DocField", 
-  "fieldname": "use_multi_level_bom", 
-  "fieldtype": "Check", 
-  "label": "Use Multi-Level BOM", 
-  "reqd": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "pp_details", 
-  "fieldtype": "Table", 
-  "label": "Production Plan Items", 
-  "options": "Production Plan Item"
- }, 
- {
-  "description": "Enter items and planned qty for which you want to raise production orders or download raw materials for analysis.", 
-  "doctype": "DocField", 
-  "fieldname": "create_production_orders", 
-  "fieldtype": "Section Break", 
-  "label": "Production Orders"
- }, 
- {
-  "description": "Separate production order will be created for each finished good item.", 
-  "doctype": "DocField", 
-  "fieldname": "raise_production_order", 
-  "fieldtype": "Button", 
-  "label": "Create Production Orders", 
-  "options": "raise_production_order"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "sb5", 
-  "fieldtype": "Section Break", 
-  "label": "Material Requirement"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "purchase_request_for_warehouse", 
-  "fieldtype": "Link", 
-  "label": "Material Request For Warehouse", 
-  "options": "Warehouse"
- }, 
- {
-  "description": "Items to be requested which are \"Out of Stock\" considering all warehouses based on projected qty and minimum order qty", 
-  "doctype": "DocField", 
-  "fieldname": "raise_purchase_request", 
-  "fieldtype": "Button", 
-  "label": "Create Material Requests", 
-  "options": "raise_purchase_request"
- }, 
- {
-  "description": "Download a report containing all raw materials with their latest inventory status", 
-  "doctype": "DocField", 
-  "fieldname": "download_materials_required", 
-  "fieldtype": "Button", 
-  "label": "Download Materials Required"
- }, 
- {
-  "doctype": "DocPerm"
- }
-]
\ No newline at end of file
+{
+ "creation": "2013-01-21 12:03:47", 
+ "default_print_format": "Standard", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "fields": [
+  {
+   "description": "Select Sales Orders from which you want to create Production Orders.", 
+   "fieldname": "select_sales_orders", 
+   "fieldtype": "Section Break", 
+   "label": "Select Sales Orders", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "column_break0", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0, 
+   "width": "50%"
+  }, 
+  {
+   "fieldname": "fg_item", 
+   "fieldtype": "Link", 
+   "label": "Filter based on item", 
+   "options": "Item", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "customer", 
+   "fieldtype": "Link", 
+   "label": "Filter based on customer", 
+   "options": "Customer", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "company", 
+   "fieldtype": "Link", 
+   "label": "Company", 
+   "options": "Company", 
+   "permlevel": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "column_break1", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0, 
+   "width": "50%"
+  }, 
+  {
+   "fieldname": "from_date", 
+   "fieldtype": "Date", 
+   "label": "From Date", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "to_date", 
+   "fieldtype": "Date", 
+   "label": "To Date", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "section_break1", 
+   "fieldtype": "Section Break", 
+   "options": "Simple", 
+   "permlevel": 0
+  }, 
+  {
+   "description": "Pull sales orders (pending to deliver) based on the above criteria", 
+   "fieldname": "get_sales_orders", 
+   "fieldtype": "Button", 
+   "label": "Get Sales Orders", 
+   "options": "get_open_sales_orders", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "pp_so_details", 
+   "fieldtype": "Table", 
+   "label": "Production Plan Sales Orders", 
+   "options": "Production Plan Sales Order", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "items_for_production", 
+   "fieldtype": "Section Break", 
+   "label": "Select Items", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "get_items_from_so", 
+   "fieldtype": "Button", 
+   "label": "Get Items From Sales Orders", 
+   "options": "get_items_from_so", 
+   "permlevel": 0
+  }, 
+  {
+   "default": "1", 
+   "description": "If checked, BOM for sub-assembly items will be considered for getting raw materials. Otherwise, all sub-assembly items will be treated as a raw material.", 
+   "fieldname": "use_multi_level_bom", 
+   "fieldtype": "Check", 
+   "label": "Use Multi-Level BOM", 
+   "permlevel": 0, 
+   "reqd": 0
+  }, 
+  {
+   "fieldname": "pp_details", 
+   "fieldtype": "Table", 
+   "label": "Production Plan Items", 
+   "options": "Production Plan Item", 
+   "permlevel": 0
+  }, 
+  {
+   "description": "Enter items and planned qty for which you want to raise production orders or download raw materials for analysis.", 
+   "fieldname": "create_production_orders", 
+   "fieldtype": "Section Break", 
+   "label": "Production Orders", 
+   "permlevel": 0
+  }, 
+  {
+   "description": "Separate production order will be created for each finished good item.", 
+   "fieldname": "raise_production_order", 
+   "fieldtype": "Button", 
+   "label": "Create Production Orders", 
+   "options": "raise_production_order", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "sb5", 
+   "fieldtype": "Section Break", 
+   "label": "Material Requirement", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "purchase_request_for_warehouse", 
+   "fieldtype": "Link", 
+   "label": "Material Request For Warehouse", 
+   "options": "Warehouse", 
+   "permlevel": 0
+  }, 
+  {
+   "description": "Items to be requested which are \"Out of Stock\" considering all warehouses based on projected qty and minimum order qty", 
+   "fieldname": "raise_purchase_request", 
+   "fieldtype": "Button", 
+   "label": "Create Material Requests", 
+   "options": "raise_purchase_request", 
+   "permlevel": 0
+  }, 
+  {
+   "description": "Download a report containing all raw materials with their latest inventory status", 
+   "fieldname": "download_materials_required", 
+   "fieldtype": "Button", 
+   "label": "Download Materials Required", 
+   "permlevel": 0
+  }
+ ], 
+ "icon": "icon-calendar", 
+ "idx": 1, 
+ "in_create": 1, 
+ "issingle": 1, 
+ "modified": "2013-12-20 19:23:25", 
+ "modified_by": "Administrator", 
+ "module": "Manufacturing", 
+ "name": "Production Planning Tool", 
+ "owner": "jai@webnotestech.com", 
+ "permissions": [
+  {
+   "create": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 0, 
+   "role": "Manufacturing User", 
+   "submit": 0, 
+   "write": 1
+  }
+ ], 
+ "read_only": 1
+}
\ No newline at end of file
diff --git a/erpnext/manufacturing/doctype/workstation/workstation.txt b/erpnext/manufacturing/doctype/workstation/workstation.txt
index b8355bf..d4da586 100644
--- a/erpnext/manufacturing/doctype/workstation/workstation.txt
+++ b/erpnext/manufacturing/doctype/workstation/workstation.txt
@@ -1,168 +1,149 @@
-[
- {
-  "creation": "2013-01-10 16:34:17", 
-  "docstatus": 0, 
-  "modified": "2014-01-20 17:49:35", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "allow_import": 1, 
-  "autoname": "field:workstation_name", 
-  "doctype": "DocType", 
-  "document_type": "Master", 
-  "icon": "icon-wrench", 
-  "module": "Manufacturing", 
-  "name": "__common__"
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "Workstation", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "cancel": 0, 
-  "create": 1, 
-  "delete": 1, 
-  "doctype": "DocPerm", 
-  "email": 1, 
-  "name": "__common__", 
-  "parent": "Workstation", 
-  "parentfield": "permissions", 
-  "parenttype": "DocType", 
-  "permlevel": 0, 
-  "print": 1, 
-  "read": 1, 
-  "report": 1, 
-  "role": "Manufacturing User", 
-  "submit": 0, 
-  "write": 1
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Workstation"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "workstation_name", 
-  "fieldtype": "Data", 
-  "label": "Workstation Name", 
-  "oldfieldname": "workstation_name", 
-  "oldfieldtype": "Data", 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "warehouse", 
-  "fieldtype": "Link", 
-  "label": "Warehouse", 
-  "oldfieldname": "warehouse", 
-  "oldfieldtype": "Link", 
-  "options": "Warehouse", 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "description", 
-  "fieldtype": "Text", 
-  "label": "Description", 
-  "oldfieldname": "description", 
-  "oldfieldtype": "Text", 
-  "width": "300px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "capacity", 
-  "fieldtype": "Data", 
-  "hidden": 1, 
-  "label": "Capacity", 
-  "oldfieldname": "capacity", 
-  "oldfieldtype": "Data", 
-  "reqd": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "capacity_units", 
-  "fieldtype": "Select", 
-  "hidden": 1, 
-  "label": "Capacity Units", 
-  "oldfieldname": "capacity_units", 
-  "oldfieldtype": "Select", 
-  "options": "\nUnits/Shifts\nUnits/Hour", 
-  "reqd": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "hour_rate_labour", 
-  "fieldtype": "Float", 
-  "label": "Hour Rate Labour", 
-  "oldfieldname": "hour_rate_labour", 
-  "oldfieldtype": "Currency", 
-  "reqd": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "over_heads", 
-  "fieldtype": "Section Break", 
-  "label": "Overheads", 
-  "oldfieldtype": "Section Break"
- }, 
- {
-  "description": "Electricity cost per hour", 
-  "doctype": "DocField", 
-  "fieldname": "hour_rate_electricity", 
-  "fieldtype": "Float", 
-  "label": "Electricity Cost", 
-  "oldfieldname": "hour_rate_electricity", 
-  "oldfieldtype": "Currency"
- }, 
- {
-  "description": "Consumable cost per hour", 
-  "doctype": "DocField", 
-  "fieldname": "hour_rate_consumable", 
-  "fieldtype": "Float", 
-  "label": "Consumable Cost", 
-  "oldfieldname": "hour_rate_consumable", 
-  "oldfieldtype": "Currency"
- }, 
- {
-  "description": "Rent per hour", 
-  "doctype": "DocField", 
-  "fieldname": "hour_rate_rent", 
-  "fieldtype": "Float", 
-  "label": "Rent Cost", 
-  "oldfieldname": "hour_rate_rent", 
-  "oldfieldtype": "Currency"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "overhead", 
-  "fieldtype": "Float", 
-  "label": "Overhead", 
-  "oldfieldname": "overhead", 
-  "oldfieldtype": "Currency", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "hour_rate_section_break", 
-  "fieldtype": "Section Break", 
-  "label": "Hour Rate", 
-  "oldfieldtype": "Section Break"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "hour_rate", 
-  "fieldtype": "Float", 
-  "label": "Hour Rate", 
-  "oldfieldname": "hour_rate", 
-  "oldfieldtype": "Currency", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocPerm"
- }
-]
\ No newline at end of file
+{
+ "allow_import": 1, 
+ "autoname": "field:workstation_name", 
+ "creation": "2013-01-10 16:34:17", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "document_type": "Master", 
+ "fields": [
+  {
+   "fieldname": "workstation_name", 
+   "fieldtype": "Data", 
+   "label": "Workstation Name", 
+   "oldfieldname": "workstation_name", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "warehouse", 
+   "fieldtype": "Link", 
+   "label": "Warehouse", 
+   "oldfieldname": "warehouse", 
+   "oldfieldtype": "Link", 
+   "options": "Warehouse", 
+   "permlevel": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "description", 
+   "fieldtype": "Text", 
+   "label": "Description", 
+   "oldfieldname": "description", 
+   "oldfieldtype": "Text", 
+   "permlevel": 0, 
+   "width": "300px"
+  }, 
+  {
+   "fieldname": "capacity", 
+   "fieldtype": "Data", 
+   "hidden": 1, 
+   "label": "Capacity", 
+   "oldfieldname": "capacity", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "reqd": 0
+  }, 
+  {
+   "fieldname": "capacity_units", 
+   "fieldtype": "Select", 
+   "hidden": 1, 
+   "label": "Capacity Units", 
+   "oldfieldname": "capacity_units", 
+   "oldfieldtype": "Select", 
+   "options": "\nUnits/Shifts\nUnits/Hour", 
+   "permlevel": 0, 
+   "reqd": 0
+  }, 
+  {
+   "fieldname": "hour_rate_labour", 
+   "fieldtype": "Float", 
+   "label": "Hour Rate Labour", 
+   "oldfieldname": "hour_rate_labour", 
+   "oldfieldtype": "Currency", 
+   "permlevel": 0, 
+   "reqd": 0
+  }, 
+  {
+   "fieldname": "over_heads", 
+   "fieldtype": "Section Break", 
+   "label": "Overheads", 
+   "oldfieldtype": "Section Break", 
+   "permlevel": 0
+  }, 
+  {
+   "description": "Electricity cost per hour", 
+   "fieldname": "hour_rate_electricity", 
+   "fieldtype": "Float", 
+   "label": "Electricity Cost", 
+   "oldfieldname": "hour_rate_electricity", 
+   "oldfieldtype": "Currency", 
+   "permlevel": 0
+  }, 
+  {
+   "description": "Consumable cost per hour", 
+   "fieldname": "hour_rate_consumable", 
+   "fieldtype": "Float", 
+   "label": "Consumable Cost", 
+   "oldfieldname": "hour_rate_consumable", 
+   "oldfieldtype": "Currency", 
+   "permlevel": 0
+  }, 
+  {
+   "description": "Rent per hour", 
+   "fieldname": "hour_rate_rent", 
+   "fieldtype": "Float", 
+   "label": "Rent Cost", 
+   "oldfieldname": "hour_rate_rent", 
+   "oldfieldtype": "Currency", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "overhead", 
+   "fieldtype": "Float", 
+   "label": "Overhead", 
+   "oldfieldname": "overhead", 
+   "oldfieldtype": "Currency", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "hour_rate_section_break", 
+   "fieldtype": "Section Break", 
+   "label": "Hour Rate", 
+   "oldfieldtype": "Section Break", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "hour_rate", 
+   "fieldtype": "Float", 
+   "label": "Hour Rate", 
+   "oldfieldname": "hour_rate", 
+   "oldfieldtype": "Currency", 
+   "permlevel": 0, 
+   "read_only": 1
+  }
+ ], 
+ "icon": "icon-wrench", 
+ "idx": 1, 
+ "modified": "2014-01-20 17:49:35", 
+ "modified_by": "Administrator", 
+ "module": "Manufacturing", 
+ "name": "Workstation", 
+ "owner": "Administrator", 
+ "permissions": [
+  {
+   "cancel": 0, 
+   "create": 1, 
+   "delete": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Manufacturing User", 
+   "submit": 0, 
+   "write": 1
+  }
+ ]
+}
\ No newline at end of file
diff --git a/erpnext/manufacturing/report/completed_production_orders/completed_production_orders.txt b/erpnext/manufacturing/report/completed_production_orders/completed_production_orders.txt
index 558ef3e..7fd4847 100644
--- a/erpnext/manufacturing/report/completed_production_orders/completed_production_orders.txt
+++ b/erpnext/manufacturing/report/completed_production_orders/completed_production_orders.txt
@@ -1,23 +1,16 @@
-[
- {
-  "creation": "2013-08-12 12:44:27", 
-  "docstatus": 0, 
-  "modified": "2014-03-07 15:30:27", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "doctype": "Report", 
-  "is_standard": "Yes", 
-  "module": "Manufacturing", 
-  "name": "__common__", 
-  "query": "SELECT\n  `tabProduction Order`.name as \"Production Order:Link/Production Order:200\",\n  `tabProduction Order`.creation as \"Date:Date:120\",\n  `tabProduction Order`.production_item as \"Item:Link/Item:150\",\n  `tabProduction Order`.qty as \"To Produce:Int:100\",\n  `tabProduction Order`.produced_qty as \"Produced:Int:100\"\nFROM\n  `tabProduction Order`\nWHERE\n  `tabProduction Order`.docstatus=1\n  AND ifnull(`tabProduction Order`.produced_qty,0) = `tabProduction Order`.qty", 
-  "ref_doctype": "Production Order", 
-  "report_name": "Completed Production Orders", 
-  "report_type": "Query Report"
- }, 
- {
-  "doctype": "Report", 
-  "name": "Completed Production Orders"
- }
-]
\ No newline at end of file
+{
+ "creation": "2013-08-12 12:44:27", 
+ "docstatus": 0, 
+ "doctype": "Report", 
+ "idx": 1, 
+ "is_standard": "Yes", 
+ "modified": "2014-03-07 15:30:27", 
+ "modified_by": "Administrator", 
+ "module": "Manufacturing", 
+ "name": "Completed Production Orders", 
+ "owner": "Administrator", 
+ "query": "SELECT\n  `tabProduction Order`.name as \"Production Order:Link/Production Order:200\",\n  `tabProduction Order`.creation as \"Date:Date:120\",\n  `tabProduction Order`.production_item as \"Item:Link/Item:150\",\n  `tabProduction Order`.qty as \"To Produce:Int:100\",\n  `tabProduction Order`.produced_qty as \"Produced:Int:100\"\nFROM\n  `tabProduction Order`\nWHERE\n  `tabProduction Order`.docstatus=1\n  AND ifnull(`tabProduction Order`.produced_qty,0) = `tabProduction Order`.qty", 
+ "ref_doctype": "Production Order", 
+ "report_name": "Completed Production Orders", 
+ "report_type": "Query Report"
+}
\ No newline at end of file
diff --git a/erpnext/manufacturing/report/issued_items_against_production_order/issued_items_against_production_order.txt b/erpnext/manufacturing/report/issued_items_against_production_order/issued_items_against_production_order.txt
index cb0808b..032db0b 100644
--- a/erpnext/manufacturing/report/issued_items_against_production_order/issued_items_against_production_order.txt
+++ b/erpnext/manufacturing/report/issued_items_against_production_order/issued_items_against_production_order.txt
@@ -1,24 +1,17 @@
-[
- {
-  "creation": "2013-05-03 17:48:46", 
-  "docstatus": 0, 
-  "modified": "2014-03-07 15:30:27", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "add_total_row": 0, 
-  "doctype": "Report", 
-  "is_standard": "Yes", 
-  "module": "Manufacturing", 
-  "name": "__common__", 
-  "query": "select\n    ste.production_order as \"Production Order:Link/Production Order:120\",\n    ste.posting_date as \"Issue Date:Date:140\",\n    ste_item.item_code as \"Item Code:Link/Item:120\",\n\tste_item.description as \"Description::150\",\n\tste_item.transfer_qty as \"Qty:Float:100\",\n\tste_item.stock_uom as \"UOM:Link/UOM:80\",\n\tste_item.amount as \"Amount:Currency:120\",\n\tste_item.serial_no as \"Serial No:Link/Serial No:80\",\n\tste_item.s_warehouse as \"Source Warehouse:Link/Warehouse:120\",\n\tste_item.t_warehouse as \"Target Warehouse:Link/Warehouse:120\",\n\tpro.production_item as \"Finished Goods:Link/Item:120\", \n\tste.name as \"Stock Entry:Link/Stock Entry:120\"\nfrom\n\t`tabStock Entry` ste, `tabStock Entry Detail` ste_item, `tabProduction Order` pro\nwhere\n\tifnull(ste.production_order, '') != '' and ste.name = ste_item.parent \n\tand ste.production_order = pro.name and ste.docstatus = 1 \n\tand ste.purpose = 'Manufacture/Repack'\norder by ste.posting_date, ste.production_order, ste_item.item_code", 
-  "ref_doctype": "Production Order", 
-  "report_name": "Issued Items Against Production Order", 
-  "report_type": "Query Report"
- }, 
- {
-  "doctype": "Report", 
-  "name": "Issued Items Against Production Order"
- }
-]
\ No newline at end of file
+{
+ "add_total_row": 0, 
+ "creation": "2013-05-03 17:48:46", 
+ "docstatus": 0, 
+ "doctype": "Report", 
+ "idx": 1, 
+ "is_standard": "Yes", 
+ "modified": "2014-03-07 15:30:27", 
+ "modified_by": "Administrator", 
+ "module": "Manufacturing", 
+ "name": "Issued Items Against Production Order", 
+ "owner": "Administrator", 
+ "query": "select\n    ste.production_order as \"Production Order:Link/Production Order:120\",\n    ste.posting_date as \"Issue Date:Date:140\",\n    ste_item.item_code as \"Item Code:Link/Item:120\",\n\tste_item.description as \"Description::150\",\n\tste_item.transfer_qty as \"Qty:Float:100\",\n\tste_item.stock_uom as \"UOM:Link/UOM:80\",\n\tste_item.amount as \"Amount:Currency:120\",\n\tste_item.serial_no as \"Serial No:Link/Serial No:80\",\n\tste_item.s_warehouse as \"Source Warehouse:Link/Warehouse:120\",\n\tste_item.t_warehouse as \"Target Warehouse:Link/Warehouse:120\",\n\tpro.production_item as \"Finished Goods:Link/Item:120\", \n\tste.name as \"Stock Entry:Link/Stock Entry:120\"\nfrom\n\t`tabStock Entry` ste, `tabStock Entry Detail` ste_item, `tabProduction Order` pro\nwhere\n\tifnull(ste.production_order, '') != '' and ste.name = ste_item.parent \n\tand ste.production_order = pro.name and ste.docstatus = 1 \n\tand ste.purpose = 'Manufacture/Repack'\norder by ste.posting_date, ste.production_order, ste_item.item_code", 
+ "ref_doctype": "Production Order", 
+ "report_name": "Issued Items Against Production Order", 
+ "report_type": "Query Report"
+}
\ No newline at end of file
diff --git a/erpnext/manufacturing/report/open_production_orders/open_production_orders.txt b/erpnext/manufacturing/report/open_production_orders/open_production_orders.txt
index 8613925..e952a20 100644
--- a/erpnext/manufacturing/report/open_production_orders/open_production_orders.txt
+++ b/erpnext/manufacturing/report/open_production_orders/open_production_orders.txt
@@ -1,23 +1,16 @@
-[
- {
-  "creation": "2013-08-12 12:32:30", 
-  "docstatus": 0, 
-  "modified": "2014-03-07 15:30:27", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "doctype": "Report", 
-  "is_standard": "Yes", 
-  "module": "Manufacturing", 
-  "name": "__common__", 
-  "query": "SELECT\n  `tabProduction Order`.name as \"Production Order:Link/Production Order:200\",\n  `tabProduction Order`.creation as \"Date:Date:120\",\n  `tabProduction Order`.production_item as \"Item:Link/Item:150\",\n  `tabProduction Order`.qty as \"To Produce:Int:100\",\n  `tabProduction Order`.produced_qty as \"Produced:Int:100\"\nFROM\n  `tabProduction Order`\nWHERE\n  `tabProduction Order`.docstatus=1\n  AND ifnull(`tabProduction Order`.produced_qty,0) < `tabProduction Order`.qty\n  AND NOT EXISTS (SELECT name from `tabStock Entry` where production_order =`tabProduction Order`.name) ", 
-  "ref_doctype": "Production Order", 
-  "report_name": "Open Production Orders", 
-  "report_type": "Query Report"
- }, 
- {
-  "doctype": "Report", 
-  "name": "Open Production Orders"
- }
-]
\ No newline at end of file
+{
+ "creation": "2013-08-12 12:32:30", 
+ "docstatus": 0, 
+ "doctype": "Report", 
+ "idx": 1, 
+ "is_standard": "Yes", 
+ "modified": "2014-03-07 15:30:27", 
+ "modified_by": "Administrator", 
+ "module": "Manufacturing", 
+ "name": "Open Production Orders", 
+ "owner": "Administrator", 
+ "query": "SELECT\n  `tabProduction Order`.name as \"Production Order:Link/Production Order:200\",\n  `tabProduction Order`.creation as \"Date:Date:120\",\n  `tabProduction Order`.production_item as \"Item:Link/Item:150\",\n  `tabProduction Order`.qty as \"To Produce:Int:100\",\n  `tabProduction Order`.produced_qty as \"Produced:Int:100\"\nFROM\n  `tabProduction Order`\nWHERE\n  `tabProduction Order`.docstatus=1\n  AND ifnull(`tabProduction Order`.produced_qty,0) < `tabProduction Order`.qty\n  AND NOT EXISTS (SELECT name from `tabStock Entry` where production_order =`tabProduction Order`.name) ", 
+ "ref_doctype": "Production Order", 
+ "report_name": "Open Production Orders", 
+ "report_type": "Query Report"
+}
\ No newline at end of file
diff --git a/erpnext/manufacturing/report/production_orders_in_progress/production_orders_in_progress.txt b/erpnext/manufacturing/report/production_orders_in_progress/production_orders_in_progress.txt
index 8c4e1d2..b041207 100644
--- a/erpnext/manufacturing/report/production_orders_in_progress/production_orders_in_progress.txt
+++ b/erpnext/manufacturing/report/production_orders_in_progress/production_orders_in_progress.txt
@@ -1,23 +1,16 @@
-[
- {
-  "creation": "2013-08-12 12:43:47", 
-  "docstatus": 0, 
-  "modified": "2014-03-07 15:30:27", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "doctype": "Report", 
-  "is_standard": "Yes", 
-  "module": "Manufacturing", 
-  "name": "__common__", 
-  "query": "SELECT\n  `tabProduction Order`.name as \"Production Order:Link/Production Order:200\",\n  `tabProduction Order`.creation as \"Date:Date:120\",\n  `tabProduction Order`.production_item as \"Item:Link/Item:150\",\n  `tabProduction Order`.qty as \"To Produce:Int:100\",\n  `tabProduction Order`.produced_qty as \"Produced:Int:100\"\nFROM\n  `tabProduction Order`\nWHERE\n  `tabProduction Order`.docstatus=1\n  AND ifnull(`tabProduction Order`.produced_qty,0) < `tabProduction Order`.qty\n  AND EXISTS (SELECT name from `tabStock Entry` where production_order =`tabProduction Order`.name) ", 
-  "ref_doctype": "Production Order", 
-  "report_name": "Production Orders in Progress", 
-  "report_type": "Query Report"
- }, 
- {
-  "doctype": "Report", 
-  "name": "Production Orders in Progress"
- }
-]
\ No newline at end of file
+{
+ "creation": "2013-08-12 12:43:47", 
+ "docstatus": 0, 
+ "doctype": "Report", 
+ "idx": 1, 
+ "is_standard": "Yes", 
+ "modified": "2014-03-07 15:30:27", 
+ "modified_by": "Administrator", 
+ "module": "Manufacturing", 
+ "name": "Production Orders in Progress", 
+ "owner": "Administrator", 
+ "query": "SELECT\n  `tabProduction Order`.name as \"Production Order:Link/Production Order:200\",\n  `tabProduction Order`.creation as \"Date:Date:120\",\n  `tabProduction Order`.production_item as \"Item:Link/Item:150\",\n  `tabProduction Order`.qty as \"To Produce:Int:100\",\n  `tabProduction Order`.produced_qty as \"Produced:Int:100\"\nFROM\n  `tabProduction Order`\nWHERE\n  `tabProduction Order`.docstatus=1\n  AND ifnull(`tabProduction Order`.produced_qty,0) < `tabProduction Order`.qty\n  AND EXISTS (SELECT name from `tabStock Entry` where production_order =`tabProduction Order`.name) ", 
+ "ref_doctype": "Production Order", 
+ "report_name": "Production Orders in Progress", 
+ "report_type": "Query Report"
+}
\ No newline at end of file
diff --git a/erpnext/projects/doctype/activity_type/activity_type.txt b/erpnext/projects/doctype/activity_type/activity_type.txt
index d8a50c5..7f76abc 100644
--- a/erpnext/projects/doctype/activity_type/activity_type.txt
+++ b/erpnext/projects/doctype/activity_type/activity_type.txt
@@ -1,60 +1,47 @@
-[
- {
-  "creation": "2013-03-05 10:14:59", 
-  "docstatus": 0, 
-  "modified": "2013-12-20 19:23:54", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "allow_import": 1, 
-  "autoname": "field:activity_type", 
-  "doctype": "DocType", 
-  "document_type": "Master", 
-  "icon": "icon-flag", 
-  "in_dialog": 0, 
-  "module": "Projects", 
-  "name": "__common__"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "activity_type", 
-  "fieldtype": "Data", 
-  "label": "Activity Type", 
-  "name": "__common__", 
-  "parent": "Activity Type", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0, 
-  "reqd": 1
- }, 
- {
-  "create": 1, 
-  "doctype": "DocPerm", 
-  "email": 1, 
-  "name": "__common__", 
-  "parent": "Activity Type", 
-  "parentfield": "permissions", 
-  "parenttype": "DocType", 
-  "permlevel": 0, 
-  "print": 1, 
-  "read": 1, 
-  "report": 1, 
-  "write": 1
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Activity Type"
- }, 
- {
-  "doctype": "DocField"
- }, 
- {
-  "doctype": "DocPerm", 
-  "role": "System Manager"
- }, 
- {
-  "doctype": "DocPerm", 
-  "role": "Projects User"
- }
-]
\ No newline at end of file
+{
+ "allow_import": 1, 
+ "autoname": "field:activity_type", 
+ "creation": "2013-03-05 10:14:59", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "document_type": "Master", 
+ "fields": [
+  {
+   "fieldname": "activity_type", 
+   "fieldtype": "Data", 
+   "label": "Activity Type", 
+   "permlevel": 0, 
+   "reqd": 1
+  }
+ ], 
+ "icon": "icon-flag", 
+ "idx": 1, 
+ "in_dialog": 0, 
+ "modified": "2013-12-20 19:23:54", 
+ "modified_by": "Administrator", 
+ "module": "Projects", 
+ "name": "Activity Type", 
+ "owner": "Administrator", 
+ "permissions": [
+  {
+   "create": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "System Manager", 
+   "write": 1
+  }, 
+  {
+   "create": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Projects User", 
+   "write": 1
+  }
+ ]
+}
\ No newline at end of file
diff --git a/erpnext/projects/doctype/project/project.txt b/erpnext/projects/doctype/project/project.txt
index 4f7e38d..e1b2414 100644
--- a/erpnext/projects/doctype/project/project.txt
+++ b/erpnext/projects/doctype/project/project.txt
@@ -1,309 +1,294 @@
-[
- {
-  "creation": "2013-03-07 11:55:07", 
-  "docstatus": 0, 
-  "modified": "2014-01-20 17:49:02", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "allow_attach": 1, 
-  "allow_import": 1, 
-  "autoname": "field:project_name", 
-  "doctype": "DocType", 
-  "document_type": "Master", 
-  "icon": "icon-puzzle-piece", 
-  "max_attachments": 4, 
-  "module": "Projects", 
-  "name": "__common__", 
-  "search_fields": "customer, status, priority, is_active"
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "Project", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "amend": 0, 
-  "cancel": 0, 
-  "doctype": "DocPerm", 
-  "name": "__common__", 
-  "parent": "Project", 
-  "parentfield": "permissions", 
-  "parenttype": "DocType", 
-  "read": 1, 
-  "report": 1, 
-  "submit": 0
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Project"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "overview", 
-  "fieldtype": "Section Break", 
-  "label": "Overview", 
-  "options": "icon-file"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "cb_project_status", 
-  "fieldtype": "Column Break", 
-  "label": "Status"
- }, 
- {
-  "description": "Project will get saved and will be searchable with project name given", 
-  "doctype": "DocField", 
-  "fieldname": "project_name", 
-  "fieldtype": "Data", 
-  "label": "Project Name", 
-  "no_copy": 0, 
-  "oldfieldname": "project_name", 
-  "oldfieldtype": "Data", 
-  "reqd": 1
- }, 
- {
-  "default": "Open", 
-  "doctype": "DocField", 
-  "fieldname": "status", 
-  "fieldtype": "Select", 
-  "in_filter": 1, 
-  "label": "Status", 
-  "no_copy": 1, 
-  "oldfieldname": "status", 
-  "oldfieldtype": "Select", 
-  "options": "Open\nCompleted\nCancelled", 
-  "reqd": 1, 
-  "search_index": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "is_active", 
-  "fieldtype": "Select", 
-  "label": "Is Active", 
-  "no_copy": 0, 
-  "oldfieldname": "is_active", 
-  "oldfieldtype": "Select", 
-  "options": "Yes\nNo", 
-  "search_index": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "priority", 
-  "fieldtype": "Select", 
-  "label": "Priority", 
-  "no_copy": 0, 
-  "oldfieldname": "priority", 
-  "oldfieldtype": "Select", 
-  "options": "Medium\nLow\nHigh", 
-  "search_index": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "cb_project_dates", 
-  "fieldtype": "Column Break", 
-  "label": "Dates"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "project_start_date", 
-  "fieldtype": "Date", 
-  "in_filter": 1, 
-  "label": "Project Start Date", 
-  "no_copy": 0, 
-  "oldfieldname": "project_start_date", 
-  "oldfieldtype": "Date", 
-  "search_index": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "completion_date", 
-  "fieldtype": "Date", 
-  "label": "Completion Date", 
-  "no_copy": 0, 
-  "oldfieldname": "completion_date", 
-  "oldfieldtype": "Date", 
-  "search_index": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "act_completion_date", 
-  "fieldtype": "Date", 
-  "label": "Actual Completion Date", 
-  "no_copy": 0, 
-  "oldfieldname": "act_completion_date", 
-  "oldfieldtype": "Date", 
-  "search_index": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "project_type", 
-  "fieldtype": "Select", 
-  "label": "Project Type", 
-  "no_copy": 0, 
-  "oldfieldname": "project_type", 
-  "oldfieldtype": "Data", 
-  "options": "Internal\nExternal\nOther", 
-  "search_index": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "sb_milestones", 
-  "fieldtype": "Section Break", 
-  "label": "Milestones", 
-  "oldfieldtype": "Section Break", 
-  "options": "icon-flag"
- }, 
- {
-  "description": "Milestones will be added as Events in the Calendar", 
-  "doctype": "DocField", 
-  "fieldname": "project_milestones", 
-  "fieldtype": "Table", 
-  "label": "Project Milestones", 
-  "no_copy": 0, 
-  "oldfieldname": "project_milestones", 
-  "oldfieldtype": "Table", 
-  "options": "Project Milestone", 
-  "search_index": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "section_break0", 
-  "fieldtype": "Section Break", 
-  "label": "Project Details", 
-  "oldfieldtype": "Section Break", 
-  "options": "icon-list"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "notes", 
-  "fieldtype": "Text Editor", 
-  "label": "Notes", 
-  "no_copy": 0, 
-  "oldfieldname": "notes", 
-  "oldfieldtype": "Text Editor", 
-  "search_index": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "percent_complete", 
-  "fieldtype": "Percent", 
-  "in_list_view": 1, 
-  "label": "Percent Complete", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "company", 
-  "fieldtype": "Link", 
-  "label": "Company", 
-  "options": "Company"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "project_details", 
-  "fieldtype": "Section Break", 
-  "label": "Project Costing", 
-  "oldfieldtype": "Section Break", 
-  "options": "icon-money"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "project_value", 
-  "fieldtype": "Currency", 
-  "in_list_view": 1, 
-  "label": "Project Value", 
-  "no_copy": 0, 
-  "oldfieldname": "project_value", 
-  "oldfieldtype": "Currency", 
-  "options": "Company:company:default_currency", 
-  "reqd": 0, 
-  "search_index": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "est_material_cost", 
-  "fieldtype": "Currency", 
-  "label": "Estimated Material Cost", 
-  "no_copy": 0, 
-  "oldfieldname": "est_material_cost", 
-  "oldfieldtype": "Currency", 
-  "options": "Company:company:default_currency", 
-  "search_index": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break0", 
-  "fieldtype": "Column Break", 
-  "label": "Margin", 
-  "oldfieldtype": "Column Break", 
-  "width": "50%"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "gross_margin_value", 
-  "fieldtype": "Currency", 
-  "label": "Gross Margin Value", 
-  "no_copy": 0, 
-  "oldfieldname": "gross_margin_value", 
-  "oldfieldtype": "Currency", 
-  "options": "Company:company:default_currency", 
-  "reqd": 0, 
-  "search_index": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "per_gross_margin", 
-  "fieldtype": "Currency", 
-  "label": "Gross Margin %", 
-  "no_copy": 0, 
-  "oldfieldname": "per_gross_margin", 
-  "oldfieldtype": "Currency", 
-  "options": "Company:company:default_currency", 
-  "reqd": 0, 
-  "search_index": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "customer_details", 
-  "fieldtype": "Section Break", 
-  "label": "Customer Details", 
-  "oldfieldtype": "Section Break", 
-  "options": "icon-user"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "customer", 
-  "fieldtype": "Link", 
-  "in_filter": 1, 
-  "label": "Customer", 
-  "no_copy": 0, 
-  "oldfieldname": "customer", 
-  "oldfieldtype": "Link", 
-  "options": "Customer", 
-  "print_hide": 1, 
-  "reqd": 0, 
-  "search_index": 1
- }, 
- {
-  "create": 1, 
-  "delete": 1, 
-  "doctype": "DocPerm", 
-  "email": 1, 
-  "permlevel": 0, 
-  "print": 1, 
-  "role": "Projects User", 
-  "write": 1
- }, 
- {
-  "create": 0, 
-  "delete": 0, 
-  "doctype": "DocPerm", 
-  "permlevel": 1, 
-  "role": "All"
- }
-]
\ No newline at end of file
+{
+ "allow_attach": 1, 
+ "allow_import": 1, 
+ "autoname": "field:project_name", 
+ "creation": "2013-03-07 11:55:07", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "document_type": "Master", 
+ "fields": [
+  {
+   "fieldname": "overview", 
+   "fieldtype": "Section Break", 
+   "label": "Overview", 
+   "options": "icon-file", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "cb_project_status", 
+   "fieldtype": "Column Break", 
+   "label": "Status", 
+   "permlevel": 0
+  }, 
+  {
+   "description": "Project will get saved and will be searchable with project name given", 
+   "fieldname": "project_name", 
+   "fieldtype": "Data", 
+   "label": "Project Name", 
+   "no_copy": 0, 
+   "oldfieldname": "project_name", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "reqd": 1
+  }, 
+  {
+   "default": "Open", 
+   "fieldname": "status", 
+   "fieldtype": "Select", 
+   "in_filter": 1, 
+   "label": "Status", 
+   "no_copy": 1, 
+   "oldfieldname": "status", 
+   "oldfieldtype": "Select", 
+   "options": "Open\nCompleted\nCancelled", 
+   "permlevel": 0, 
+   "reqd": 1, 
+   "search_index": 1
+  }, 
+  {
+   "fieldname": "is_active", 
+   "fieldtype": "Select", 
+   "label": "Is Active", 
+   "no_copy": 0, 
+   "oldfieldname": "is_active", 
+   "oldfieldtype": "Select", 
+   "options": "Yes\nNo", 
+   "permlevel": 0, 
+   "search_index": 0
+  }, 
+  {
+   "fieldname": "priority", 
+   "fieldtype": "Select", 
+   "label": "Priority", 
+   "no_copy": 0, 
+   "oldfieldname": "priority", 
+   "oldfieldtype": "Select", 
+   "options": "Medium\nLow\nHigh", 
+   "permlevel": 0, 
+   "search_index": 0
+  }, 
+  {
+   "fieldname": "cb_project_dates", 
+   "fieldtype": "Column Break", 
+   "label": "Dates", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "project_start_date", 
+   "fieldtype": "Date", 
+   "in_filter": 1, 
+   "label": "Project Start Date", 
+   "no_copy": 0, 
+   "oldfieldname": "project_start_date", 
+   "oldfieldtype": "Date", 
+   "permlevel": 0, 
+   "search_index": 0
+  }, 
+  {
+   "fieldname": "completion_date", 
+   "fieldtype": "Date", 
+   "label": "Completion Date", 
+   "no_copy": 0, 
+   "oldfieldname": "completion_date", 
+   "oldfieldtype": "Date", 
+   "permlevel": 0, 
+   "search_index": 0
+  }, 
+  {
+   "fieldname": "act_completion_date", 
+   "fieldtype": "Date", 
+   "label": "Actual Completion Date", 
+   "no_copy": 0, 
+   "oldfieldname": "act_completion_date", 
+   "oldfieldtype": "Date", 
+   "permlevel": 0, 
+   "search_index": 0
+  }, 
+  {
+   "fieldname": "project_type", 
+   "fieldtype": "Select", 
+   "label": "Project Type", 
+   "no_copy": 0, 
+   "oldfieldname": "project_type", 
+   "oldfieldtype": "Data", 
+   "options": "Internal\nExternal\nOther", 
+   "permlevel": 0, 
+   "search_index": 0
+  }, 
+  {
+   "fieldname": "sb_milestones", 
+   "fieldtype": "Section Break", 
+   "label": "Milestones", 
+   "oldfieldtype": "Section Break", 
+   "options": "icon-flag", 
+   "permlevel": 0
+  }, 
+  {
+   "description": "Milestones will be added as Events in the Calendar", 
+   "fieldname": "project_milestones", 
+   "fieldtype": "Table", 
+   "label": "Project Milestones", 
+   "no_copy": 0, 
+   "oldfieldname": "project_milestones", 
+   "oldfieldtype": "Table", 
+   "options": "Project Milestone", 
+   "permlevel": 0, 
+   "search_index": 0
+  }, 
+  {
+   "fieldname": "section_break0", 
+   "fieldtype": "Section Break", 
+   "label": "Project Details", 
+   "oldfieldtype": "Section Break", 
+   "options": "icon-list", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "notes", 
+   "fieldtype": "Text Editor", 
+   "label": "Notes", 
+   "no_copy": 0, 
+   "oldfieldname": "notes", 
+   "oldfieldtype": "Text Editor", 
+   "permlevel": 0, 
+   "search_index": 0
+  }, 
+  {
+   "fieldname": "percent_complete", 
+   "fieldtype": "Percent", 
+   "in_list_view": 1, 
+   "label": "Percent Complete", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "company", 
+   "fieldtype": "Link", 
+   "label": "Company", 
+   "options": "Company", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "project_details", 
+   "fieldtype": "Section Break", 
+   "label": "Project Costing", 
+   "oldfieldtype": "Section Break", 
+   "options": "icon-money", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "project_value", 
+   "fieldtype": "Currency", 
+   "in_list_view": 1, 
+   "label": "Project Value", 
+   "no_copy": 0, 
+   "oldfieldname": "project_value", 
+   "oldfieldtype": "Currency", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "reqd": 0, 
+   "search_index": 0
+  }, 
+  {
+   "fieldname": "est_material_cost", 
+   "fieldtype": "Currency", 
+   "label": "Estimated Material Cost", 
+   "no_copy": 0, 
+   "oldfieldname": "est_material_cost", 
+   "oldfieldtype": "Currency", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "search_index": 0
+  }, 
+  {
+   "fieldname": "column_break0", 
+   "fieldtype": "Column Break", 
+   "label": "Margin", 
+   "oldfieldtype": "Column Break", 
+   "permlevel": 0, 
+   "width": "50%"
+  }, 
+  {
+   "fieldname": "gross_margin_value", 
+   "fieldtype": "Currency", 
+   "label": "Gross Margin Value", 
+   "no_copy": 0, 
+   "oldfieldname": "gross_margin_value", 
+   "oldfieldtype": "Currency", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "reqd": 0, 
+   "search_index": 0
+  }, 
+  {
+   "fieldname": "per_gross_margin", 
+   "fieldtype": "Currency", 
+   "label": "Gross Margin %", 
+   "no_copy": 0, 
+   "oldfieldname": "per_gross_margin", 
+   "oldfieldtype": "Currency", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "reqd": 0, 
+   "search_index": 0
+  }, 
+  {
+   "fieldname": "customer_details", 
+   "fieldtype": "Section Break", 
+   "label": "Customer Details", 
+   "oldfieldtype": "Section Break", 
+   "options": "icon-user", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "customer", 
+   "fieldtype": "Link", 
+   "in_filter": 1, 
+   "label": "Customer", 
+   "no_copy": 0, 
+   "oldfieldname": "customer", 
+   "oldfieldtype": "Link", 
+   "options": "Customer", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "reqd": 0, 
+   "search_index": 1
+  }
+ ], 
+ "icon": "icon-puzzle-piece", 
+ "idx": 1, 
+ "max_attachments": 4, 
+ "modified": "2014-01-20 17:49:02", 
+ "modified_by": "Administrator", 
+ "module": "Projects", 
+ "name": "Project", 
+ "owner": "Administrator", 
+ "permissions": [
+  {
+   "amend": 0, 
+   "cancel": 0, 
+   "create": 1, 
+   "delete": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Projects User", 
+   "submit": 0, 
+   "write": 1
+  }, 
+  {
+   "amend": 0, 
+   "cancel": 0, 
+   "create": 0, 
+   "delete": 0, 
+   "permlevel": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "All", 
+   "submit": 0
+  }
+ ], 
+ "search_fields": "customer, status, priority, is_active"
+}
\ No newline at end of file
diff --git a/erpnext/projects/doctype/project_milestone/project_milestone.txt b/erpnext/projects/doctype/project_milestone/project_milestone.txt
index d5be81e..3c79108 100644
--- a/erpnext/projects/doctype/project_milestone/project_milestone.txt
+++ b/erpnext/projects/doctype/project_milestone/project_milestone.txt
@@ -1,56 +1,45 @@
-[
- {
-  "creation": "2013-02-22 01:27:50", 
-  "docstatus": 0, 
-  "modified": "2013-12-20 19:23:27", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "doctype": "DocType", 
-  "istable": 1, 
-  "module": "Projects", 
-  "name": "__common__"
- }, 
- {
-  "doctype": "DocField", 
-  "in_list_view": 1, 
-  "name": "__common__", 
-  "parent": "Project Milestone", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Project Milestone"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "milestone_date", 
-  "fieldtype": "Date", 
-  "label": "Milestone Date", 
-  "oldfieldname": "milestone_date", 
-  "oldfieldtype": "Date"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "milestone", 
-  "fieldtype": "Text", 
-  "label": "Milestone", 
-  "oldfieldname": "milestone", 
-  "oldfieldtype": "Text", 
-  "print_width": "300px", 
-  "width": "300px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "status", 
-  "fieldtype": "Select", 
-  "label": "Status", 
-  "no_copy": 1, 
-  "oldfieldname": "status", 
-  "oldfieldtype": "Select", 
-  "options": "Pending\nCompleted"
- }
-]
\ No newline at end of file
+{
+ "creation": "2013-02-22 01:27:50", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "fields": [
+  {
+   "fieldname": "milestone_date", 
+   "fieldtype": "Date", 
+   "in_list_view": 1, 
+   "label": "Milestone Date", 
+   "oldfieldname": "milestone_date", 
+   "oldfieldtype": "Date", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "milestone", 
+   "fieldtype": "Text", 
+   "in_list_view": 1, 
+   "label": "Milestone", 
+   "oldfieldname": "milestone", 
+   "oldfieldtype": "Text", 
+   "permlevel": 0, 
+   "print_width": "300px", 
+   "width": "300px"
+  }, 
+  {
+   "fieldname": "status", 
+   "fieldtype": "Select", 
+   "in_list_view": 1, 
+   "label": "Status", 
+   "no_copy": 1, 
+   "oldfieldname": "status", 
+   "oldfieldtype": "Select", 
+   "options": "Pending\nCompleted", 
+   "permlevel": 0
+  }
+ ], 
+ "idx": 1, 
+ "istable": 1, 
+ "modified": "2013-12-20 19:23:27", 
+ "modified_by": "Administrator", 
+ "module": "Projects", 
+ "name": "Project Milestone", 
+ "owner": "Administrator"
+}
\ No newline at end of file
diff --git a/erpnext/projects/doctype/task/task.txt b/erpnext/projects/doctype/task/task.txt
index 2dce94f..6dbd0a4 100644
--- a/erpnext/projects/doctype/task/task.txt
+++ b/erpnext/projects/doctype/task/task.txt
@@ -1,262 +1,243 @@
-[
- {
-  "creation": "2013-01-29 19:25:50", 
-  "docstatus": 0, 
-  "modified": "2014-01-24 13:01:46", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "allow_attach": 1, 
-  "allow_import": 1, 
-  "autoname": "TASK.#####", 
-  "doctype": "DocType", 
-  "document_type": "Master", 
-  "icon": "icon-check", 
-  "max_attachments": 5, 
-  "module": "Projects", 
-  "name": "__common__", 
-  "search_fields": "subject", 
-  "title_field": "subject"
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "Task", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "cancel": 0, 
-  "create": 1, 
-  "delete": 1, 
-  "doctype": "DocPerm", 
-  "email": 1, 
-  "name": "__common__", 
-  "parent": "Task", 
-  "parentfield": "permissions", 
-  "parenttype": "DocType", 
-  "permlevel": 0, 
-  "print": 1, 
-  "read": 1, 
-  "report": 1, 
-  "role": "Projects User", 
-  "submit": 0, 
-  "write": 1
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Task"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "task_details", 
-  "fieldtype": "Section Break", 
-  "label": "Task Details", 
-  "oldfieldtype": "Section Break", 
-  "print_width": "50%", 
-  "search_index": 0, 
-  "width": "50%"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "subject", 
-  "fieldtype": "Data", 
-  "in_filter": 1, 
-  "in_list_view": 1, 
-  "label": "Subject", 
-  "oldfieldname": "subject", 
-  "oldfieldtype": "Data", 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "exp_start_date", 
-  "fieldtype": "Date", 
-  "label": "Expected Start Date", 
-  "oldfieldname": "exp_start_date", 
-  "oldfieldtype": "Date", 
-  "reqd": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "exp_end_date", 
-  "fieldtype": "Date", 
-  "in_filter": 1, 
-  "label": "Expected End Date", 
-  "oldfieldname": "exp_end_date", 
-  "oldfieldtype": "Date", 
-  "reqd": 0, 
-  "search_index": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break0", 
-  "fieldtype": "Column Break", 
-  "oldfieldtype": "Column Break", 
-  "print_width": "50%", 
-  "width": "50%"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "project", 
-  "fieldtype": "Link", 
-  "in_list_view": 1, 
-  "label": "Project", 
-  "oldfieldname": "project", 
-  "oldfieldtype": "Link", 
-  "options": "Project"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "status", 
-  "fieldtype": "Select", 
-  "in_list_view": 1, 
-  "label": "Status", 
-  "no_copy": 1, 
-  "oldfieldname": "status", 
-  "oldfieldtype": "Select", 
-  "options": "Open\nWorking\nPending Review\nClosed\nCancelled"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "priority", 
-  "fieldtype": "Select", 
-  "in_filter": 1, 
-  "in_list_view": 1, 
-  "label": "Priority", 
-  "oldfieldname": "priority", 
-  "oldfieldtype": "Select", 
-  "options": "Low\nMedium\nHigh\nUrgent", 
-  "reqd": 0, 
-  "search_index": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "section_break0", 
-  "fieldtype": "Section Break", 
-  "oldfieldtype": "Section Break", 
-  "options": "Simple"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "description", 
-  "fieldtype": "Text Editor", 
-  "label": "Details", 
-  "oldfieldname": "description", 
-  "oldfieldtype": "Text Editor", 
-  "print_width": "300px", 
-  "reqd": 0, 
-  "width": "300px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "time_and_budget", 
-  "fieldtype": "Section Break", 
-  "label": "Time and Budget", 
-  "oldfieldtype": "Section Break"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "expected", 
-  "fieldtype": "Column Break", 
-  "label": "Expected", 
-  "oldfieldtype": "Column Break", 
-  "print_width": "50%", 
-  "width": "50%"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "exp_total_hrs", 
-  "fieldtype": "Data", 
-  "label": "Total Hours (Expected)", 
-  "oldfieldname": "exp_total_hrs", 
-  "oldfieldtype": "Data", 
-  "reqd": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "allocated_budget", 
-  "fieldtype": "Currency", 
-  "label": "Allocated Budget", 
-  "oldfieldname": "allocated_budget", 
-  "oldfieldtype": "Currency", 
-  "options": "Company:company:default_currency"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "actual", 
-  "fieldtype": "Column Break", 
-  "label": "Actual", 
-  "oldfieldtype": "Column Break", 
-  "print_width": "50%", 
-  "width": "50%"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "act_start_date", 
-  "fieldtype": "Date", 
-  "label": "Actual Start Date", 
-  "oldfieldname": "act_start_date", 
-  "oldfieldtype": "Date"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "act_end_date", 
-  "fieldtype": "Date", 
-  "label": "Actual End Date", 
-  "oldfieldname": "act_end_date", 
-  "oldfieldtype": "Date"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "actual_budget", 
-  "fieldtype": "Currency", 
-  "label": "Actual Budget", 
-  "oldfieldname": "actual_budget", 
-  "oldfieldtype": "Currency", 
-  "options": "Company:company:default_currency"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "more_details", 
-  "fieldtype": "Section Break", 
-  "label": "More Details"
- }, 
- {
-  "depends_on": "eval:doc.status == \"Closed\" || doc.status == \"Pending Review\"", 
-  "doctype": "DocField", 
-  "fieldname": "review_date", 
-  "fieldtype": "Date", 
-  "hidden": 0, 
-  "label": "Review Date", 
-  "oldfieldname": "review_date", 
-  "oldfieldtype": "Date"
- }, 
- {
-  "depends_on": "eval:doc.status == \"Closed\"", 
-  "doctype": "DocField", 
-  "fieldname": "closing_date", 
-  "fieldtype": "Date", 
-  "hidden": 0, 
-  "label": "Closing Date", 
-  "oldfieldname": "closing_date", 
-  "oldfieldtype": "Date"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break_22", 
-  "fieldtype": "Column Break"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "company", 
-  "fieldtype": "Link", 
-  "label": "Company", 
-  "options": "Company"
- }, 
- {
-  "doctype": "DocPerm"
- }
-]
\ No newline at end of file
+{
+ "allow_attach": 1, 
+ "allow_import": 1, 
+ "autoname": "TASK.#####", 
+ "creation": "2013-01-29 19:25:50", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "document_type": "Master", 
+ "fields": [
+  {
+   "fieldname": "task_details", 
+   "fieldtype": "Section Break", 
+   "label": "Task Details", 
+   "oldfieldtype": "Section Break", 
+   "permlevel": 0, 
+   "print_width": "50%", 
+   "search_index": 0, 
+   "width": "50%"
+  }, 
+  {
+   "fieldname": "subject", 
+   "fieldtype": "Data", 
+   "in_filter": 1, 
+   "in_list_view": 1, 
+   "label": "Subject", 
+   "oldfieldname": "subject", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "exp_start_date", 
+   "fieldtype": "Date", 
+   "label": "Expected Start Date", 
+   "oldfieldname": "exp_start_date", 
+   "oldfieldtype": "Date", 
+   "permlevel": 0, 
+   "reqd": 0
+  }, 
+  {
+   "fieldname": "exp_end_date", 
+   "fieldtype": "Date", 
+   "in_filter": 1, 
+   "label": "Expected End Date", 
+   "oldfieldname": "exp_end_date", 
+   "oldfieldtype": "Date", 
+   "permlevel": 0, 
+   "reqd": 0, 
+   "search_index": 1
+  }, 
+  {
+   "fieldname": "column_break0", 
+   "fieldtype": "Column Break", 
+   "oldfieldtype": "Column Break", 
+   "permlevel": 0, 
+   "print_width": "50%", 
+   "width": "50%"
+  }, 
+  {
+   "fieldname": "project", 
+   "fieldtype": "Link", 
+   "in_list_view": 1, 
+   "label": "Project", 
+   "oldfieldname": "project", 
+   "oldfieldtype": "Link", 
+   "options": "Project", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "status", 
+   "fieldtype": "Select", 
+   "in_list_view": 1, 
+   "label": "Status", 
+   "no_copy": 1, 
+   "oldfieldname": "status", 
+   "oldfieldtype": "Select", 
+   "options": "Open\nWorking\nPending Review\nClosed\nCancelled", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "priority", 
+   "fieldtype": "Select", 
+   "in_filter": 1, 
+   "in_list_view": 1, 
+   "label": "Priority", 
+   "oldfieldname": "priority", 
+   "oldfieldtype": "Select", 
+   "options": "Low\nMedium\nHigh\nUrgent", 
+   "permlevel": 0, 
+   "reqd": 0, 
+   "search_index": 1
+  }, 
+  {
+   "fieldname": "section_break0", 
+   "fieldtype": "Section Break", 
+   "oldfieldtype": "Section Break", 
+   "options": "Simple", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "description", 
+   "fieldtype": "Text Editor", 
+   "label": "Details", 
+   "oldfieldname": "description", 
+   "oldfieldtype": "Text Editor", 
+   "permlevel": 0, 
+   "print_width": "300px", 
+   "reqd": 0, 
+   "width": "300px"
+  }, 
+  {
+   "fieldname": "time_and_budget", 
+   "fieldtype": "Section Break", 
+   "label": "Time and Budget", 
+   "oldfieldtype": "Section Break", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "expected", 
+   "fieldtype": "Column Break", 
+   "label": "Expected", 
+   "oldfieldtype": "Column Break", 
+   "permlevel": 0, 
+   "print_width": "50%", 
+   "width": "50%"
+  }, 
+  {
+   "fieldname": "exp_total_hrs", 
+   "fieldtype": "Data", 
+   "label": "Total Hours (Expected)", 
+   "oldfieldname": "exp_total_hrs", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "reqd": 0
+  }, 
+  {
+   "fieldname": "allocated_budget", 
+   "fieldtype": "Currency", 
+   "label": "Allocated Budget", 
+   "oldfieldname": "allocated_budget", 
+   "oldfieldtype": "Currency", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "actual", 
+   "fieldtype": "Column Break", 
+   "label": "Actual", 
+   "oldfieldtype": "Column Break", 
+   "permlevel": 0, 
+   "print_width": "50%", 
+   "width": "50%"
+  }, 
+  {
+   "fieldname": "act_start_date", 
+   "fieldtype": "Date", 
+   "label": "Actual Start Date", 
+   "oldfieldname": "act_start_date", 
+   "oldfieldtype": "Date", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "act_end_date", 
+   "fieldtype": "Date", 
+   "label": "Actual End Date", 
+   "oldfieldname": "act_end_date", 
+   "oldfieldtype": "Date", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "actual_budget", 
+   "fieldtype": "Currency", 
+   "label": "Actual Budget", 
+   "oldfieldname": "actual_budget", 
+   "oldfieldtype": "Currency", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "more_details", 
+   "fieldtype": "Section Break", 
+   "label": "More Details", 
+   "permlevel": 0
+  }, 
+  {
+   "depends_on": "eval:doc.status == \"Closed\" || doc.status == \"Pending Review\"", 
+   "fieldname": "review_date", 
+   "fieldtype": "Date", 
+   "hidden": 0, 
+   "label": "Review Date", 
+   "oldfieldname": "review_date", 
+   "oldfieldtype": "Date", 
+   "permlevel": 0
+  }, 
+  {
+   "depends_on": "eval:doc.status == \"Closed\"", 
+   "fieldname": "closing_date", 
+   "fieldtype": "Date", 
+   "hidden": 0, 
+   "label": "Closing Date", 
+   "oldfieldname": "closing_date", 
+   "oldfieldtype": "Date", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "column_break_22", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "company", 
+   "fieldtype": "Link", 
+   "label": "Company", 
+   "options": "Company", 
+   "permlevel": 0
+  }
+ ], 
+ "icon": "icon-check", 
+ "idx": 1, 
+ "max_attachments": 5, 
+ "modified": "2014-01-24 13:01:46", 
+ "modified_by": "Administrator", 
+ "module": "Projects", 
+ "name": "Task", 
+ "owner": "Administrator", 
+ "permissions": [
+  {
+   "cancel": 0, 
+   "create": 1, 
+   "delete": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Projects User", 
+   "submit": 0, 
+   "write": 1
+  }
+ ], 
+ "search_fields": "subject", 
+ "title_field": "subject"
+}
\ No newline at end of file
diff --git a/erpnext/projects/doctype/time_log/time_log.txt b/erpnext/projects/doctype/time_log/time_log.txt
index 11fa7d6..137ad86 100644
--- a/erpnext/projects/doctype/time_log/time_log.txt
+++ b/erpnext/projects/doctype/time_log/time_log.txt
@@ -1,215 +1,189 @@
-[
- {
-  "creation": "2013-04-03 16:38:41", 
-  "docstatus": 0, 
-  "modified": "2014-01-22 16:05:35", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "allow_attach": 1, 
-  "allow_import": 1, 
-  "autoname": "naming_series:", 
-  "description": "Log of Activities performed by users against Tasks that can be used for tracking time, billing.", 
-  "doctype": "DocType", 
-  "document_type": "Master", 
-  "icon": "icon-time", 
-  "is_submittable": 1, 
-  "module": "Projects", 
-  "name": "__common__"
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "Time Log", 
-  "parentfield": "fields", 
-  "parenttype": "DocType"
- }, 
- {
-  "amend": 1, 
-  "cancel": 1, 
-  "delete": 1, 
-  "doctype": "DocPerm", 
-  "email": 1, 
-  "name": "__common__", 
-  "parent": "Time Log", 
-  "parentfield": "permissions", 
-  "parenttype": "DocType", 
-  "permlevel": 0, 
-  "print": 1, 
-  "read": 1, 
-  "report": 1, 
-  "submit": 1, 
-  "write": 1
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Time Log"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "naming_series", 
-  "fieldtype": "Select", 
-  "label": "Series", 
-  "options": "TL-", 
-  "permlevel": 0, 
-  "read_only": 0, 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "from_time", 
-  "fieldtype": "Datetime", 
-  "in_list_view": 1, 
-  "label": "From Time", 
-  "permlevel": 0, 
-  "read_only": 0, 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "to_time", 
-  "fieldtype": "Datetime", 
-  "in_list_view": 0, 
-  "label": "To Time", 
-  "permlevel": 0, 
-  "read_only": 0, 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "hours", 
-  "fieldtype": "Float", 
-  "label": "Hours", 
-  "permlevel": 0, 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break_3", 
-  "fieldtype": "Column Break", 
-  "permlevel": 0, 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "status", 
-  "fieldtype": "Select", 
-  "in_list_view": 1, 
-  "label": "Status", 
-  "options": "Draft\nSubmitted\nBatched for Billing\nBilled\nCancelled", 
-  "permlevel": 0, 
-  "read_only": 1, 
-  "reqd": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "activity_type", 
-  "fieldtype": "Link", 
-  "in_list_view": 1, 
-  "label": "Activity Type", 
-  "options": "Activity Type", 
-  "permlevel": 0, 
-  "read_only": 0, 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "task", 
-  "fieldtype": "Link", 
-  "label": "Task", 
-  "options": "Task", 
-  "permlevel": 0, 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "billable", 
-  "fieldtype": "Check", 
-  "in_list_view": 1, 
-  "label": "Billable", 
-  "permlevel": 0, 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "section_break_7", 
-  "fieldtype": "Section Break", 
-  "permlevel": 0, 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "note", 
-  "fieldtype": "Text Editor", 
-  "label": "Note", 
-  "permlevel": 0, 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "section_break_9", 
-  "fieldtype": "Section Break", 
-  "permlevel": 0, 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "project", 
-  "fieldtype": "Link", 
-  "in_list_view": 1, 
-  "label": "Project", 
-  "options": "Project", 
-  "permlevel": 0, 
-  "read_only": 0
- }, 
- {
-  "description": "Will be updated when batched.", 
-  "doctype": "DocField", 
-  "fieldname": "time_log_batch", 
-  "fieldtype": "Link", 
-  "label": "Time Log Batch", 
-  "options": "Time Log Batch", 
-  "permlevel": 0, 
-  "read_only": 1
- }, 
- {
-  "description": "Will be updated when billed.", 
-  "doctype": "DocField", 
-  "fieldname": "sales_invoice", 
-  "fieldtype": "Link", 
-  "label": "Sales Invoice", 
-  "options": "Sales Invoice", 
-  "permlevel": 0, 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break_16", 
-  "fieldtype": "Column Break", 
-  "permlevel": 0, 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "amended_from", 
-  "fieldtype": "Link", 
-  "ignore_restrictions": 1, 
-  "label": "Amended From", 
-  "no_copy": 1, 
-  "options": "Time Log", 
-  "permlevel": 1, 
-  "print_hide": 1, 
-  "read_only": 0
- }, 
- {
-  "create": 1, 
-  "doctype": "DocPerm", 
-  "restricted": 1, 
-  "role": "Projects User"
- }, 
- {
-  "doctype": "DocPerm", 
-  "role": "Projects Manager"
- }
-]
\ No newline at end of file
+{
+ "allow_attach": 1, 
+ "allow_import": 1, 
+ "autoname": "naming_series:", 
+ "creation": "2013-04-03 16:38:41", 
+ "description": "Log of Activities performed by users against Tasks that can be used for tracking time, billing.", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "document_type": "Master", 
+ "fields": [
+  {
+   "fieldname": "naming_series", 
+   "fieldtype": "Select", 
+   "label": "Series", 
+   "options": "TL-", 
+   "permlevel": 0, 
+   "read_only": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "from_time", 
+   "fieldtype": "Datetime", 
+   "in_list_view": 1, 
+   "label": "From Time", 
+   "permlevel": 0, 
+   "read_only": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "to_time", 
+   "fieldtype": "Datetime", 
+   "in_list_view": 0, 
+   "label": "To Time", 
+   "permlevel": 0, 
+   "read_only": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "hours", 
+   "fieldtype": "Float", 
+   "label": "Hours", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "column_break_3", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "status", 
+   "fieldtype": "Select", 
+   "in_list_view": 1, 
+   "label": "Status", 
+   "options": "Draft\nSubmitted\nBatched for Billing\nBilled\nCancelled", 
+   "permlevel": 0, 
+   "read_only": 1, 
+   "reqd": 0
+  }, 
+  {
+   "fieldname": "activity_type", 
+   "fieldtype": "Link", 
+   "in_list_view": 1, 
+   "label": "Activity Type", 
+   "options": "Activity Type", 
+   "permlevel": 0, 
+   "read_only": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "task", 
+   "fieldtype": "Link", 
+   "label": "Task", 
+   "options": "Task", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "billable", 
+   "fieldtype": "Check", 
+   "in_list_view": 1, 
+   "label": "Billable", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "section_break_7", 
+   "fieldtype": "Section Break", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "note", 
+   "fieldtype": "Text Editor", 
+   "label": "Note", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "section_break_9", 
+   "fieldtype": "Section Break", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "project", 
+   "fieldtype": "Link", 
+   "in_list_view": 1, 
+   "label": "Project", 
+   "options": "Project", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "description": "Will be updated when batched.", 
+   "fieldname": "time_log_batch", 
+   "fieldtype": "Link", 
+   "label": "Time Log Batch", 
+   "options": "Time Log Batch", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "description": "Will be updated when billed.", 
+   "fieldname": "sales_invoice", 
+   "fieldtype": "Link", 
+   "label": "Sales Invoice", 
+   "options": "Sales Invoice", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "column_break_16", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "amended_from", 
+   "fieldtype": "Link", 
+   "ignore_restrictions": 1, 
+   "label": "Amended From", 
+   "no_copy": 1, 
+   "options": "Time Log", 
+   "permlevel": 1, 
+   "print_hide": 1, 
+   "read_only": 0
+  }
+ ], 
+ "icon": "icon-time", 
+ "idx": 1, 
+ "is_submittable": 1, 
+ "modified": "2014-01-22 16:05:35", 
+ "modified_by": "Administrator", 
+ "module": "Projects", 
+ "name": "Time Log", 
+ "owner": "Administrator", 
+ "permissions": [
+  {
+   "amend": 1, 
+   "cancel": 1, 
+   "create": 1, 
+   "delete": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "restricted": 1, 
+   "role": "Projects User", 
+   "submit": 1, 
+   "write": 1
+  }, 
+  {
+   "amend": 1, 
+   "cancel": 1, 
+   "delete": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Projects Manager", 
+   "submit": 1, 
+   "write": 1
+  }
+ ]
+}
\ No newline at end of file
diff --git a/erpnext/projects/doctype/time_log_batch/time_log_batch.txt b/erpnext/projects/doctype/time_log_batch/time_log_batch.txt
index bc803ea..3676117 100644
--- a/erpnext/projects/doctype/time_log_batch/time_log_batch.txt
+++ b/erpnext/projects/doctype/time_log_batch/time_log_batch.txt
@@ -1,126 +1,107 @@
-[
- {
-  "creation": "2013-02-28 17:57:33", 
-  "docstatus": 0, 
-  "modified": "2014-01-20 17:49:34", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "autoname": "naming_series:", 
-  "description": "Batch Time Logs for Billing.", 
-  "doctype": "DocType", 
-  "document_type": "Transaction", 
-  "icon": "icon-time", 
-  "is_submittable": 1, 
-  "module": "Projects", 
-  "name": "__common__"
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "Time Log Batch", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "amend": 1, 
-  "cancel": 1, 
-  "create": 1, 
-  "delete": 1, 
-  "doctype": "DocPerm", 
-  "email": 1, 
-  "name": "__common__", 
-  "parent": "Time Log Batch", 
-  "parentfield": "permissions", 
-  "parenttype": "DocType", 
-  "permlevel": 0, 
-  "print": 1, 
-  "read": 1, 
-  "report": 1, 
-  "role": "Projects User", 
-  "submit": 1, 
-  "write": 1
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Time Log Batch"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "naming_series", 
-  "fieldtype": "Select", 
-  "label": "Series", 
-  "options": "TLB-", 
-  "reqd": 1
- }, 
- {
-  "description": "For Sales Invoice", 
-  "doctype": "DocField", 
-  "fieldname": "rate", 
-  "fieldtype": "Currency", 
-  "label": "Rate"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break_3", 
-  "fieldtype": "Column Break"
- }, 
- {
-  "default": "Draft", 
-  "doctype": "DocField", 
-  "fieldname": "status", 
-  "fieldtype": "Select", 
-  "in_list_view": 1, 
-  "label": "Status", 
-  "options": "Draft\nSubmitted\nBilled\nCancelled", 
-  "read_only": 1
- }, 
- {
-  "description": "Will be updated after Sales Invoice is Submitted.", 
-  "doctype": "DocField", 
-  "fieldname": "sales_invoice", 
-  "fieldtype": "Link", 
-  "in_list_view": 1, 
-  "label": "Sales Invoice", 
-  "options": "Sales Invoice", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "section_break_5", 
-  "fieldtype": "Section Break"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "time_log_batch_details", 
-  "fieldtype": "Table", 
-  "label": "Time Log Batch Details", 
-  "options": "Time Log Batch Detail", 
-  "reqd": 1
- }, 
- {
-  "description": "In Hours", 
-  "doctype": "DocField", 
-  "fieldname": "total_hours", 
-  "fieldtype": "Float", 
-  "in_list_view": 1, 
-  "label": "Total Hours", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "amended_from", 
-  "fieldtype": "Link", 
-  "ignore_restrictions": 1, 
-  "label": "Amended From", 
-  "no_copy": 1, 
-  "options": "Time Log Batch", 
-  "print_hide": 1, 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocPerm"
- }
-]
\ No newline at end of file
+{
+ "autoname": "naming_series:", 
+ "creation": "2013-02-28 17:57:33", 
+ "description": "Batch Time Logs for Billing.", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "document_type": "Transaction", 
+ "fields": [
+  {
+   "fieldname": "naming_series", 
+   "fieldtype": "Select", 
+   "label": "Series", 
+   "options": "TLB-", 
+   "permlevel": 0, 
+   "reqd": 1
+  }, 
+  {
+   "description": "For Sales Invoice", 
+   "fieldname": "rate", 
+   "fieldtype": "Currency", 
+   "label": "Rate", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "column_break_3", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0
+  }, 
+  {
+   "default": "Draft", 
+   "fieldname": "status", 
+   "fieldtype": "Select", 
+   "in_list_view": 1, 
+   "label": "Status", 
+   "options": "Draft\nSubmitted\nBilled\nCancelled", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "description": "Will be updated after Sales Invoice is Submitted.", 
+   "fieldname": "sales_invoice", 
+   "fieldtype": "Link", 
+   "in_list_view": 1, 
+   "label": "Sales Invoice", 
+   "options": "Sales Invoice", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "section_break_5", 
+   "fieldtype": "Section Break", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "time_log_batch_details", 
+   "fieldtype": "Table", 
+   "label": "Time Log Batch Details", 
+   "options": "Time Log Batch Detail", 
+   "permlevel": 0, 
+   "reqd": 1
+  }, 
+  {
+   "description": "In Hours", 
+   "fieldname": "total_hours", 
+   "fieldtype": "Float", 
+   "in_list_view": 1, 
+   "label": "Total Hours", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "amended_from", 
+   "fieldtype": "Link", 
+   "ignore_restrictions": 1, 
+   "label": "Amended From", 
+   "no_copy": 1, 
+   "options": "Time Log Batch", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1
+  }
+ ], 
+ "icon": "icon-time", 
+ "idx": 1, 
+ "is_submittable": 1, 
+ "modified": "2014-01-20 17:49:34", 
+ "modified_by": "Administrator", 
+ "module": "Projects", 
+ "name": "Time Log Batch", 
+ "owner": "Administrator", 
+ "permissions": [
+  {
+   "amend": 1, 
+   "cancel": 1, 
+   "create": 1, 
+   "delete": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Projects User", 
+   "submit": 1, 
+   "write": 1
+  }
+ ]
+}
\ No newline at end of file
diff --git a/erpnext/projects/doctype/time_log_batch_detail/time_log_batch_detail.txt b/erpnext/projects/doctype/time_log_batch_detail/time_log_batch_detail.txt
index 3531a87..565402a 100644
--- a/erpnext/projects/doctype/time_log_batch_detail/time_log_batch_detail.txt
+++ b/erpnext/projects/doctype/time_log_batch_detail/time_log_batch_detail.txt
@@ -1,59 +1,49 @@
-[
- {
-  "creation": "2013-03-05 09:11:06", 
-  "docstatus": 0, 
-  "modified": "2013-12-20 19:21:54", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "doctype": "DocType", 
-  "istable": 1, 
-  "module": "Projects", 
-  "name": "__common__"
- }, 
- {
-  "doctype": "DocField", 
-  "in_list_view": 1, 
-  "name": "__common__", 
-  "parent": "Time Log Batch Detail", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Time Log Batch Detail"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "time_log", 
-  "fieldtype": "Link", 
-  "label": "Time Log", 
-  "options": "Time Log", 
-  "print_width": "200px", 
-  "reqd": 1, 
-  "width": "200px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "created_by", 
-  "fieldtype": "Link", 
-  "label": "Created By", 
-  "options": "User", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "activity_type", 
-  "fieldtype": "Data", 
-  "label": "Activity Type", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "hours", 
-  "fieldtype": "Float", 
-  "label": "Hours"
- }
-]
\ No newline at end of file
+{
+ "creation": "2013-03-05 09:11:06", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "fields": [
+  {
+   "fieldname": "time_log", 
+   "fieldtype": "Link", 
+   "in_list_view": 1, 
+   "label": "Time Log", 
+   "options": "Time Log", 
+   "permlevel": 0, 
+   "print_width": "200px", 
+   "reqd": 1, 
+   "width": "200px"
+  }, 
+  {
+   "fieldname": "created_by", 
+   "fieldtype": "Link", 
+   "in_list_view": 1, 
+   "label": "Created By", 
+   "options": "User", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "activity_type", 
+   "fieldtype": "Data", 
+   "in_list_view": 1, 
+   "label": "Activity Type", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "hours", 
+   "fieldtype": "Float", 
+   "in_list_view": 1, 
+   "label": "Hours", 
+   "permlevel": 0
+  }
+ ], 
+ "idx": 1, 
+ "istable": 1, 
+ "modified": "2013-12-20 19:21:54", 
+ "modified_by": "Administrator", 
+ "module": "Projects", 
+ "name": "Time Log Batch Detail", 
+ "owner": "Administrator"
+}
\ No newline at end of file
diff --git a/erpnext/projects/report/daily_time_log_summary/daily_time_log_summary.txt b/erpnext/projects/report/daily_time_log_summary/daily_time_log_summary.txt
index fe8feb0..3422010 100644
--- a/erpnext/projects/report/daily_time_log_summary/daily_time_log_summary.txt
+++ b/erpnext/projects/report/daily_time_log_summary/daily_time_log_summary.txt
@@ -1,22 +1,15 @@
-[
- {
-  "creation": "2013-04-03 11:27:52", 
-  "docstatus": 0, 
-  "modified": "2014-03-07 15:30:27", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "doctype": "Report", 
-  "is_standard": "Yes", 
-  "module": "Projects", 
-  "name": "__common__", 
-  "ref_doctype": "Time Log", 
-  "report_name": "Daily Time Log Summary", 
-  "report_type": "Script Report"
- }, 
- {
-  "doctype": "Report", 
-  "name": "Daily Time Log Summary"
- }
-]
\ No newline at end of file
+{
+ "creation": "2013-04-03 11:27:52", 
+ "docstatus": 0, 
+ "doctype": "Report", 
+ "idx": 1, 
+ "is_standard": "Yes", 
+ "modified": "2014-03-07 15:30:27", 
+ "modified_by": "Administrator", 
+ "module": "Projects", 
+ "name": "Daily Time Log Summary", 
+ "owner": "Administrator", 
+ "ref_doctype": "Time Log", 
+ "report_name": "Daily Time Log Summary", 
+ "report_type": "Script Report"
+}
\ No newline at end of file
diff --git a/erpnext/projects/report/project_wise_stock_tracking/project_wise_stock_tracking.txt b/erpnext/projects/report/project_wise_stock_tracking/project_wise_stock_tracking.txt
index 4a89536..5296920 100644
--- a/erpnext/projects/report/project_wise_stock_tracking/project_wise_stock_tracking.txt
+++ b/erpnext/projects/report/project_wise_stock_tracking/project_wise_stock_tracking.txt
@@ -1,22 +1,15 @@
-[
- {
-  "creation": "2013-06-03 17:37:41", 
-  "docstatus": 0, 
-  "modified": "2014-03-07 15:30:27", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "doctype": "Report", 
-  "is_standard": "Yes", 
-  "module": "Projects", 
-  "name": "__common__", 
-  "ref_doctype": "Project", 
-  "report_name": "Project wise Stock Tracking ", 
-  "report_type": "Report Builder"
- }, 
- {
-  "doctype": "Report", 
-  "name": "Project wise Stock Tracking"
- }
-]
\ No newline at end of file
+{
+ "creation": "2013-06-03 17:37:41", 
+ "docstatus": 0, 
+ "doctype": "Report", 
+ "idx": 1, 
+ "is_standard": "Yes", 
+ "modified": "2014-03-07 15:30:27", 
+ "modified_by": "Administrator", 
+ "module": "Projects", 
+ "name": "Project wise Stock Tracking", 
+ "owner": "Administrator", 
+ "ref_doctype": "Project", 
+ "report_name": "Project wise Stock Tracking ", 
+ "report_type": "Report Builder"
+}
\ No newline at end of file
diff --git a/erpnext/selling/Print Format/Quotation Classic/Quotation Classic.txt b/erpnext/selling/Print Format/Quotation Classic/Quotation Classic.txt
index c858c26..220f1ea 100644
--- a/erpnext/selling/Print Format/Quotation Classic/Quotation Classic.txt
+++ b/erpnext/selling/Print Format/Quotation Classic/Quotation Classic.txt
@@ -1,22 +1,15 @@
-[
- {
-  "creation": "2013-04-19 13:30:51", 
-  "docstatus": 0, 
-  "modified": "2014-02-11 17:45:37", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "doc_type": "Quotation", 
-  "doctype": "Print Format", 
-  "html": "<!--\n\tSample Print Format for ERPNext\n\tPlease use at your own discretion\n\tFor suggestions and contributions:\n\t\thttps://github.com/frappe/erpnext-print-templates\n\n\tFreely usable under MIT license\n-->\n\n<!-- Style Settings -->\n<style>\n\t/*\n\t\tcommon style for whole page\n\t\tThis should include:\n\t\t+ page size related settings\n\t\t+ font family settings\n\t\t+ line spacing settings\n\t*/\n\t@media screen {\n\t\tbody {\n\t\t\twidth: 8.3in;\n\t\t}\n\t}\n\n\thtml, body, div, span, td {\n\t\tfont-family: \"Georgia\", serif;\n\t\tfont-size: 12px;\n\t}\n\n\tbody {\n\t\tpadding: 10px;\n\t\tmargin: auto;\n\t\tfont-size: 12px;\n\t}\n\n\t.common {\n\t\tfont-family: \"Georgia\", serif !important;\n\t\tfont-size: 12px;\n\t\tpadding: 10px 0px;\n\t}\n\n\ttable {\n\t\tborder-collapse: collapse;\n\t\twidth: 100%;\n\t\tvertical-align: top;\n\t}\n\n\ttable td {\n\t\tpadding: 2px 0px;\n\t}\n\t\n\ttable h1, h2, h3, h4, h5, h6 {\n\t\tpadding: 0px;\n\t\tmargin: 0px;\n\t}\n\n\ttable.header-table td {\n\t\tvertical-align: top;\n\t}\n\n\ttable.header-table thead {\n\t\tborder-bottom: 1px solid black;\n\t}\n\n\ttable.header-table h3 {\n\t\tcolor: gray;\n\t}\n\n\ttable.header-table thead td {\n\t\tpadding: 5px 0px;\n\t}\n\n\tdiv.page-body table td:nth-child(6),\n\tdiv.page-body table td:nth-child(7) {\n\t\ttext-align: right;\n\t}\n\n\ttable.footer-table td {\n\t\tvertical-align: top;\n\t}\n\n\ttable.footer-table td table td:nth-child(2),\n\ttable.footer-table td table td:nth-child(3) {\n\t\ttext-align: right;\n\t}\n</style>\n\n\n<!-- Javascript -->\n<script>\n\tsi_std = {\n\t\tprint_item_table: function() {\n\t\t\tvar table = print_table(\n\t\t\t\t'Quotation',\n\t\t\t\tdoc.name,\n\t\t\t\t'quotation_details',\n\t\t\t\t'Quotation Item',\n\t\t\t\t[// Here specify the table columns to be displayed\n\t\t\t\t\t'SR', 'item_code', 'item_name', 'description', 'qty', 'stock_uom',\n\t\t\t\t\t'rate', 'amount'\n\t\t\t\t],\n\t\t\t\t[// Here specify the labels of column headings\n\t\t\t\t\t'Sr', 'Item Code', 'Item Name', 'Description', 'Qty',\n\t\t\t\t\t'UoM', 'Basic Rate', 'Amount'\n\t\t\t\t],\n\t\t\t\t[// Here specify the column widths\n\t\t\t\t\t'3%', '10%', '15%', '32%', '5%',\n\t\t\t\t\t'5%', '15%', '15%'\n\t\t\t\t],\n\t\t\t\tnull,\n\t\t\t\tnull,\n\t\t\t\t{\n\t\t\t\t\t'description' : function(data_row) {\n\t\t\t\t\t\tif(data_row.discount_percentage) {\n\t\t\t\t\t\t\tvar to_append = '<div style=\"padding-left: 15px;\"><i>Discount: ' + \n\t\t\t\t\t\t\t\tdata_row.discount_percentage + '% on ' + \n\t\t\t\t\t\t\t\tformat_currency(data_row.price_list_rate, doc.currency) + '</i></div>';\n\t\t\t\t\t\t\tif(data_row.description.indexOf(to_append)==-1) {\n\t\t\t\t\t\t\t\treturn data_row.description + to_append;\n\t\t\t\t\t\t\t} else { return data_row.description; }\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\treturn data_row.description;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t);\n\n\t\t\t// This code takes care of page breaks\n\t\t\tif(table.appendChild) {\n\t\t\t\tout = table.innerHTML;\n\t\t\t} else {\n\t\t\t\tout = '';\n\t\t\t\tfor(var i=0; i < (table.length-1); i++) {\n\t\t\t\t\tout += table[i].innerHTML + \n\t\t\t\t\t\t'<div style = \"page-break-after: always;\" \\\n\t\t\t\t\t\tclass = \"page_break\"></div>\\\n\t\t\t\t\t\t<div class=\"page-settings\"></div>';\n\t\t\t\t}\n\t\t\t\tout += table[table.length-1].innerHTML;\n\t\t\t}\n\t\t\treturn out;\n\t\t},\n\n\n\t\tprint_other_charges: function(parent) {\n\t\t\tvar oc = getchildren('Sales Taxes and Charges', doc.name, 'other_charges');\n\t\t\tvar rows = '<table width=100%>\\n';\n\t\t\tfor(var i=0; i<oc.length; i++) {\n\t\t\t\tif(!oc[i].included_in_print_rate) {\n\t\t\t\t\trows +=\n\t\t\t\t\t\t'<tr>\\n' +\n\t\t\t\t\t\t\t'\\t<td>' + oc[i].description + '</td>\\n' +\n\t\t\t\t\t\t\t'\\t<td></td>\\n' +\n\t\t\t\t\t\t\t'\\t<td style=\"width: 38%; text-align: right;\">' + format_currency(oc[i].tax_amount/doc.conversion_rate, doc.currency) + '</td>\\n' +\n\t\t\t\t\t\t'</tr>\\n';\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(doc.discount_amount) {\n\t\t\t\trows += '<tr>\\n' + \n\t\t\t\t\t\t'\\t<td>Discount Amount</td>\\n' + \n\t\t\t\t\t\t'\\t<td style=\"width: 38%; text-align: right;\">' + format_currency(doc.discount_amount, doc.currency) + '</td>\\n' + \n\t\t\t\t\t'</tr>\\n';\n\t\t\t}\n\n\t\t\treturn rows + '</table>\\n';\n\t\t}\n\t};\n</script>\n\n\n<!-- Page Layout Settings -->\n<div class='common page-header'>\n\t<!-- \n\t\tPage Header will contain\n\t\t\t+ table 1\n\t\t\t\t+ table 1a\n\t\t\t\t\t- Name\n\t\t\t\t\t- Address\n\t\t\t\t\t- Contact\n\t\t\t\t\t- Mobile No\n\t\t\t\t+ table 1b\n\t\t\t\t\t- Voucher Date\n\t\t\t\t\t- Due Date\n\t-->\n\t<table class='header-table' cellspacing=0>\n\t\t<thead>\n\t\t\t<tr><td>\n\t\t\t\t\t<script>'<h1>' + (doc.select_print_heading || 'Quotation') + '</h1>'</script>\n\t\t\t</td></tr>\n\t\t\t<tr><td><h3><script>cur_frm.docname</script></h3></td></tr>\n\t\t</thead>\n\t\t<tbody>\n\t\t\t<tr>\n\t\t\t\t<td width=60%><table width=100% cellspacing=0><tbody>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td width=39%><b>Name</b></td>\n\t\t\t\t\t\t<td><script>doc.customer_name</script></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><b>Address</b></td>\n\t\t\t\t\t\t<td><script>replace_newlines(doc.address_display)</script></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><b>Contact</b></td>\n\t\t\t\t\t\t<td><script>doc.contact_display</script></td>\n\t\t\t\t\t</tr>\n\t\t\t\t</tbody></table></td>\n\t\t\t\t<td><table width=100% cellspacing=0><tbody>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td width=63%><b>Quotation Date</b></td>\n\t\t\t\t\t\t<td><script>date.str_to_user(doc.transaction_date)</script></td>\n\t\t\t\t\t<tr>\t\t\t\t\t\n\t\t\t\t</tbody></table></td>\n\t\t\t</tr>\n\t\t</tbody>\n\t\t<tfoot>\n\t\t\n\t\t</tfoot>\n\t</table>\n</div>\n<div class='common page-body'>\n\t<!-- \n\t\tPage Body will contain\n\t\t\t+ table 2\n\t\t\t\t- Sales Invoice Data\n\t-->\n\t<script>si_std.print_item_table()</script>\n</div>\n<div class='common page-footer'>\n\t<!-- \n\t\tPage Footer will contain\n\t\t\t+ table 3\n\t\t\t\t- Terms and Conditions\n\t\t\t\t- Total Rounded Amount Calculation\n\t\t\t\t- Total Rounded Amount in Words\n\t-->\n\t<table class='footer-table' width=100% cellspacing=0>\n\t\t<thead>\n\t\t\t\n\t\t</thead>\n\t\t<tbody>\n\t\t\t<tr>\n\t\t\t\t<td width=60% style='padding-right: 10px;'>\n\t\t\t\t\t<b>Terms, Conditions &amp; Other Information:</b><br />\n\t\t\t\t\t<script>doc.terms</script>\n\t\t\t\t</td>\n\t\t\t\t<td>\n\t\t\t\t\t<table cellspacing=0 width=100%><tbody>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td>Net Total</td>\n\t\t\t\t\t\t\t<td style=\"width: 38%; text-align: right;\"><script>\n\t\t\t\t\t\t\t\tformat_currency(doc.net_total_export, doc.currency)\n\t\t\t\t\t\t\t</script></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr><td colspan=3><script>si_std.print_other_charges()</script></td></tr>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td>Grand Total</td>\n\t\t\t\t\t\t\t<td style=\"width: 38%; text-align: right;\"><script>\n\t\t\t\t\t\t\t\tformat_currency(doc.grand_total_export, doc.currency)\n\t\t\t\t\t\t\t</script></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr style='font-weight: bold'>\n\t\t\t\t\t\t\t<td>Rounded Total</td>\n\t\t\t\t\t\t\t<td style=\"width: 38%; text-align: right;\"><script>\n\t\t\t\t\t\t\t\tformat_currency(doc.rounded_total_export, doc.currency)\n\t\t\t\t\t\t\t</script></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t</tbody></table>\n\t\t\t\t\t<br /><b>In Words</b><br />\n\t\t\t\t\t<i><script>doc.in_words_export</script></i>\n\t\t\t\t</td>\n\t\t\t</tr>\t\t\n\t\t</tbody>\n\t\t<tfoot>\n\t\t\n\t\t</tfoot>\n\t</table>\n</div>", 
-  "module": "Selling", 
-  "name": "__common__", 
-  "print_format_type": "Client", 
-  "standard": "Yes"
- }, 
- {
-  "doctype": "Print Format", 
-  "name": "Quotation Classic"
- }
-]
\ No newline at end of file
+{
+ "creation": "2013-04-19 13:30:51", 
+ "doc_type": "Quotation", 
+ "docstatus": 0, 
+ "doctype": "Print Format", 
+ "html": "<!--\n\tSample Print Format for ERPNext\n\tPlease use at your own discretion\n\tFor suggestions and contributions:\n\t\thttps://github.com/frappe/erpnext-print-templates\n\n\tFreely usable under MIT license\n-->\n\n<!-- Style Settings -->\n<style>\n\t/*\n\t\tcommon style for whole page\n\t\tThis should include:\n\t\t+ page size related settings\n\t\t+ font family settings\n\t\t+ line spacing settings\n\t*/\n\t@media screen {\n\t\tbody {\n\t\t\twidth: 8.3in;\n\t\t}\n\t}\n\n\thtml, body, div, span, td {\n\t\tfont-family: \"Georgia\", serif;\n\t\tfont-size: 12px;\n\t}\n\n\tbody {\n\t\tpadding: 10px;\n\t\tmargin: auto;\n\t\tfont-size: 12px;\n\t}\n\n\t.common {\n\t\tfont-family: \"Georgia\", serif !important;\n\t\tfont-size: 12px;\n\t\tpadding: 10px 0px;\n\t}\n\n\ttable {\n\t\tborder-collapse: collapse;\n\t\twidth: 100%;\n\t\tvertical-align: top;\n\t}\n\n\ttable td {\n\t\tpadding: 2px 0px;\n\t}\n\t\n\ttable h1, h2, h3, h4, h5, h6 {\n\t\tpadding: 0px;\n\t\tmargin: 0px;\n\t}\n\n\ttable.header-table td {\n\t\tvertical-align: top;\n\t}\n\n\ttable.header-table thead {\n\t\tborder-bottom: 1px solid black;\n\t}\n\n\ttable.header-table h3 {\n\t\tcolor: gray;\n\t}\n\n\ttable.header-table thead td {\n\t\tpadding: 5px 0px;\n\t}\n\n\tdiv.page-body table td:nth-child(6),\n\tdiv.page-body table td:nth-child(7) {\n\t\ttext-align: right;\n\t}\n\n\ttable.footer-table td {\n\t\tvertical-align: top;\n\t}\n\n\ttable.footer-table td table td:nth-child(2),\n\ttable.footer-table td table td:nth-child(3) {\n\t\ttext-align: right;\n\t}\n</style>\n\n\n<!-- Javascript -->\n<script>\n\tsi_std = {\n\t\tprint_item_table: function() {\n\t\t\tvar table = print_table(\n\t\t\t\t'Quotation',\n\t\t\t\tdoc.name,\n\t\t\t\t'quotation_details',\n\t\t\t\t'Quotation Item',\n\t\t\t\t[// Here specify the table columns to be displayed\n\t\t\t\t\t'SR', 'item_code', 'item_name', 'description', 'qty', 'stock_uom',\n\t\t\t\t\t'rate', 'amount'\n\t\t\t\t],\n\t\t\t\t[// Here specify the labels of column headings\n\t\t\t\t\t'Sr', 'Item Code', 'Item Name', 'Description', 'Qty',\n\t\t\t\t\t'UoM', 'Basic Rate', 'Amount'\n\t\t\t\t],\n\t\t\t\t[// Here specify the column widths\n\t\t\t\t\t'3%', '10%', '15%', '32%', '5%',\n\t\t\t\t\t'5%', '15%', '15%'\n\t\t\t\t],\n\t\t\t\tnull,\n\t\t\t\tnull,\n\t\t\t\t{\n\t\t\t\t\t'description' : function(data_row) {\n\t\t\t\t\t\tif(data_row.discount_percentage) {\n\t\t\t\t\t\t\tvar to_append = '<div style=\"padding-left: 15px;\"><i>Discount: ' + \n\t\t\t\t\t\t\t\tdata_row.discount_percentage + '% on ' + \n\t\t\t\t\t\t\t\tformat_currency(data_row.price_list_rate, doc.currency) + '</i></div>';\n\t\t\t\t\t\t\tif(data_row.description.indexOf(to_append)==-1) {\n\t\t\t\t\t\t\t\treturn data_row.description + to_append;\n\t\t\t\t\t\t\t} else { return data_row.description; }\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\treturn data_row.description;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t);\n\n\t\t\t// This code takes care of page breaks\n\t\t\tif(table.appendChild) {\n\t\t\t\tout = table.innerHTML;\n\t\t\t} else {\n\t\t\t\tout = '';\n\t\t\t\tfor(var i=0; i < (table.length-1); i++) {\n\t\t\t\t\tout += table[i].innerHTML + \n\t\t\t\t\t\t'<div style = \"page-break-after: always;\" \\\n\t\t\t\t\t\tclass = \"page_break\"></div>\\\n\t\t\t\t\t\t<div class=\"page-settings\"></div>';\n\t\t\t\t}\n\t\t\t\tout += table[table.length-1].innerHTML;\n\t\t\t}\n\t\t\treturn out;\n\t\t},\n\n\n\t\tprint_other_charges: function(parent) {\n\t\t\tvar oc = getchildren('Sales Taxes and Charges', doc.name, 'other_charges');\n\t\t\tvar rows = '<table width=100%>\\n';\n\t\t\tfor(var i=0; i<oc.length; i++) {\n\t\t\t\tif(!oc[i].included_in_print_rate) {\n\t\t\t\t\trows +=\n\t\t\t\t\t\t'<tr>\\n' +\n\t\t\t\t\t\t\t'\\t<td>' + oc[i].description + '</td>\\n' +\n\t\t\t\t\t\t\t'\\t<td></td>\\n' +\n\t\t\t\t\t\t\t'\\t<td style=\"width: 38%; text-align: right;\">' + format_currency(oc[i].tax_amount/doc.conversion_rate, doc.currency) + '</td>\\n' +\n\t\t\t\t\t\t'</tr>\\n';\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(doc.discount_amount) {\n\t\t\t\trows += '<tr>\\n' + \n\t\t\t\t\t\t'\\t<td>Discount Amount</td>\\n' + \n\t\t\t\t\t\t'\\t<td style=\"width: 38%; text-align: right;\">' + format_currency(doc.discount_amount, doc.currency) + '</td>\\n' + \n\t\t\t\t\t'</tr>\\n';\n\t\t\t}\n\n\t\t\treturn rows + '</table>\\n';\n\t\t}\n\t};\n</script>\n\n\n<!-- Page Layout Settings -->\n<div class='common page-header'>\n\t<!-- \n\t\tPage Header will contain\n\t\t\t+ table 1\n\t\t\t\t+ table 1a\n\t\t\t\t\t- Name\n\t\t\t\t\t- Address\n\t\t\t\t\t- Contact\n\t\t\t\t\t- Mobile No\n\t\t\t\t+ table 1b\n\t\t\t\t\t- Voucher Date\n\t\t\t\t\t- Due Date\n\t-->\n\t<table class='header-table' cellspacing=0>\n\t\t<thead>\n\t\t\t<tr><td>\n\t\t\t\t\t<script>'<h1>' + (doc.select_print_heading || 'Quotation') + '</h1>'</script>\n\t\t\t</td></tr>\n\t\t\t<tr><td><h3><script>cur_frm.docname</script></h3></td></tr>\n\t\t</thead>\n\t\t<tbody>\n\t\t\t<tr>\n\t\t\t\t<td width=60%><table width=100% cellspacing=0><tbody>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td width=39%><b>Name</b></td>\n\t\t\t\t\t\t<td><script>doc.customer_name</script></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><b>Address</b></td>\n\t\t\t\t\t\t<td><script>replace_newlines(doc.address_display)</script></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><b>Contact</b></td>\n\t\t\t\t\t\t<td><script>doc.contact_display</script></td>\n\t\t\t\t\t</tr>\n\t\t\t\t</tbody></table></td>\n\t\t\t\t<td><table width=100% cellspacing=0><tbody>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td width=63%><b>Quotation Date</b></td>\n\t\t\t\t\t\t<td><script>date.str_to_user(doc.transaction_date)</script></td>\n\t\t\t\t\t<tr>\t\t\t\t\t\n\t\t\t\t</tbody></table></td>\n\t\t\t</tr>\n\t\t</tbody>\n\t\t<tfoot>\n\t\t\n\t\t</tfoot>\n\t</table>\n</div>\n<div class='common page-body'>\n\t<!-- \n\t\tPage Body will contain\n\t\t\t+ table 2\n\t\t\t\t- Sales Invoice Data\n\t-->\n\t<script>si_std.print_item_table()</script>\n</div>\n<div class='common page-footer'>\n\t<!-- \n\t\tPage Footer will contain\n\t\t\t+ table 3\n\t\t\t\t- Terms and Conditions\n\t\t\t\t- Total Rounded Amount Calculation\n\t\t\t\t- Total Rounded Amount in Words\n\t-->\n\t<table class='footer-table' width=100% cellspacing=0>\n\t\t<thead>\n\t\t\t\n\t\t</thead>\n\t\t<tbody>\n\t\t\t<tr>\n\t\t\t\t<td width=60% style='padding-right: 10px;'>\n\t\t\t\t\t<b>Terms, Conditions &amp; Other Information:</b><br />\n\t\t\t\t\t<script>doc.terms</script>\n\t\t\t\t</td>\n\t\t\t\t<td>\n\t\t\t\t\t<table cellspacing=0 width=100%><tbody>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td>Net Total</td>\n\t\t\t\t\t\t\t<td style=\"width: 38%; text-align: right;\"><script>\n\t\t\t\t\t\t\t\tformat_currency(doc.net_total_export, doc.currency)\n\t\t\t\t\t\t\t</script></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr><td colspan=3><script>si_std.print_other_charges()</script></td></tr>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td>Grand Total</td>\n\t\t\t\t\t\t\t<td style=\"width: 38%; text-align: right;\"><script>\n\t\t\t\t\t\t\t\tformat_currency(doc.grand_total_export, doc.currency)\n\t\t\t\t\t\t\t</script></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr style='font-weight: bold'>\n\t\t\t\t\t\t\t<td>Rounded Total</td>\n\t\t\t\t\t\t\t<td style=\"width: 38%; text-align: right;\"><script>\n\t\t\t\t\t\t\t\tformat_currency(doc.rounded_total_export, doc.currency)\n\t\t\t\t\t\t\t</script></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t</tbody></table>\n\t\t\t\t\t<br /><b>In Words</b><br />\n\t\t\t\t\t<i><script>doc.in_words_export</script></i>\n\t\t\t\t</td>\n\t\t\t</tr>\t\t\n\t\t</tbody>\n\t\t<tfoot>\n\t\t\n\t\t</tfoot>\n\t</table>\n</div>", 
+ "idx": 1, 
+ "modified": "2014-02-11 17:45:37", 
+ "modified_by": "Administrator", 
+ "module": "Selling", 
+ "name": "Quotation Classic", 
+ "owner": "Administrator", 
+ "print_format_type": "Client", 
+ "standard": "Yes"
+}
\ No newline at end of file
diff --git a/erpnext/selling/Print Format/Quotation Modern/Quotation Modern.txt b/erpnext/selling/Print Format/Quotation Modern/Quotation Modern.txt
index b7c3830..2073a9e 100644
--- a/erpnext/selling/Print Format/Quotation Modern/Quotation Modern.txt
+++ b/erpnext/selling/Print Format/Quotation Modern/Quotation Modern.txt
@@ -1,22 +1,15 @@
-[
- {
-  "creation": "2013-04-19 13:30:51", 
-  "docstatus": 0, 
-  "modified": "2014-02-11 17:45:15", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "doc_type": "Quotation", 
-  "doctype": "Print Format", 
-  "html": "<!--\n\tSample Print Format for ERPNext\n\tPlease use at your own discretion\n\tFor suggestions and contributions:\n\t\thttps://github.com/frappe/erpnext-print-templates\n\n\tFreely usable under MIT license\n-->\n\n<!-- Style Settings -->\n<style>\n\t/*\n\t\tcommon style for whole page\n\t\tThis should include:\n\t\t+ page size related settings\n\t\t+ font family settings\n\t\t+ line spacing settings\n\t*/\n\t@media screen {\n\t\tbody {\n\t\t\twidth: 8.3in;\n\t\t}\n\t}\n\n\thtml, body, div, span, td {\n\t\tfont-family: \"Helvetica\", \"Arial\", sans-serif;\n\t\tfont-size: 12px;\n\t}\n\n\tbody {\n\t\tpadding: 10px;\n\t\tmargin: auto;\n\t\tfont-size: 12px;\n        line-height: 150%;\n\t}\n\n\t.common {\n\t\tfont-family: \"Helvetica\", \"Arial\", sans-serif !important;\n\t\tfont-size: 12px;\n\t\tpadding: 10px 0px;\n\t}\n\n\ttable {\n\t\tborder-collapse: collapse;\n\t\twidth: 100%;\n\t\tvertical-align: top;\n\t\tborder-style: none !important;\n\t}\n\n\ttable td {\n\t\tpadding: 2px 0px;\n\t\tborder-style: none !important;\n\t}\n\t\n\ttable h1, h2, h3, h4, h5, h6 {\n\t\tpadding: 0px;\n\t\tmargin: 0px;\n\t}\n\n\ttable.header-table td {\n\t\tvertical-align: top;\n\t}\n\n\ttable.header-table h1 {\n\t\ttext-transform: uppercase;\n\t\tcolor: white;\n\t\tfont-size: 55px;\n\t\tfont-style: italic;\n\t}\n\n\ttable.header-table thead tr:nth-child(1) div {\n\t\theight: 24px;\n\t\tbackground-color: #696969;\n\t\tvertical-align: middle;\n\t\tpadding: 12px 0px 0px 0px;\n\t\twidth: 100%;\n\t}\n\n\tdiv.page-body table td:nth-child(6),\n\tdiv.page-body table td:nth-child(7) {\n\t\ttext-align: right;\n\t}\n\n\tdiv.page-body table tr td {\n\t\tbackground-color: #DCDCDC !important;\n\t}\n\n\tdiv.page-body table tr:nth-child(1) td {\n\t\tbackground-color: #696969 !important;\n\t\tcolor: white !important;\n\t}\n\n\ttable.footer-table td {\n\t\tvertical-align: top;\n\t}\n\n\ttable.footer-table td table td:nth-child(2),\n\ttable.footer-table td table td:nth-child(3) {\n\t\ttext-align: right;\n\t}\n\n\ttable.footer-table tfoot td {\n\t\tbackground-color: #696969;\n\t\theight: 10px;\n\t}\n\n\t.imp-details {\n\t\tbackground-color: #DCDCDC;\n\t}\n</style>\n\n\n<!-- Javascript -->\n<script>\n\tsi_std = {\n\t\tprint_item_table: function() {\n\t\t\tvar table = print_table(\n\t\t\t\t'Quotation',\n\t\t\t\tdoc.name,\n\t\t\t\t'quotation_details',\n\t\t\t\t'Quotation Item',\n\t\t\t\t[// Here specify the table columns to be displayed\n\t\t\t\t\t'SR', 'item_code', 'item_name', 'description', 'qty', 'stock_uom',\n\t\t\t\t\t'rate', 'amount'\n\t\t\t\t],\n\t\t\t\t[// Here specify the labels of column headings\n\t\t\t\t\t'Sr', 'Item Code', 'Item Name', 'Description', 'Qty',\n\t\t\t\t\t'UoM', 'Basic Rate', 'Amount'\n\t\t\t\t],\n\t\t\t\t[// Here specify the column widths\n\t\t\t\t\t'3%', '10%', '15%', '32%', '5%',\n\t\t\t\t\t'5%', '15%', '15%'\n\t\t\t\t],\n\t\t\t\tnull,\n\t\t\t\tnull,\n\t\t\t\t{\n\t\t\t\t\t'description' : function(data_row) {\n\t\t\t\t\t\tif(data_row.discount_percentage) {\n\t\t\t\t\t\t\tvar to_append = '<div style=\"padding-left: 15px;\"><i>Discount: ' + \n\t\t\t\t\t\t\t\tdata_row.discount_percentage + '% on ' + \n\t\t\t\t\t\t\t\tformat_currency(data_row.price_list_rate, doc.currency) + '</i></div>';\n\t\t\t\t\t\t\tif(data_row.description.indexOf(to_append)==-1) {\n\t\t\t\t\t\t\t\treturn data_row.description + to_append;\n\t\t\t\t\t\t\t} else { return data_row.description; }\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\treturn data_row.description;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t);\n\n\t\t\t// This code takes care of page breaks\n\t\t\tif(table.appendChild) {\n\t\t\t\tout = table.innerHTML;\n\t\t\t} else {\n\t\t\t\tout = '';\n\t\t\t\tfor(var i=0; i < (table.length-1); i++) {\n\t\t\t\t\tout += table[i].innerHTML + \n\t\t\t\t\t\t'<div style = \"page-break-after: always;\" \\\n\t\t\t\t\t\tclass = \"page_break\"></div>\\\n\t\t\t\t\t\t<div class=\"page-settings\"></div>';\n\t\t\t\t}\n\t\t\t\tout += table[table.length-1].innerHTML;\n\t\t\t}\n\t\t\treturn out;\n\t\t},\n\n\n\t\tprint_other_charges: function(parent) {\n\t\t\tvar oc = getchildren('Sales Taxes and Charges', doc.name, 'other_charges');\n\t\t\tvar rows = '<table width=100%>\\n';\n\t\t\tfor(var i=0; i<oc.length; i++) {\n\t\t\t\tif(!oc[i].included_in_print_rate) {\n\t\t\t\t\trows +=\n\t\t\t\t\t\t'<tr>\\n' +\n\t\t\t\t\t\t\t'\\t<td>' + oc[i].description + '</td>\\n' +\n\t\t\t\t\t\t\t'\\t<td></td>\\n' +\n\t\t\t\t\t\t\t'\\t<td style=\"width: 38%; text-align: right;\">' + format_currency(oc[i].tax_amount/doc.conversion_rate, doc.currency) + '</td>\\n' +\n\t\t\t\t\t\t'</tr>\\n';\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(doc.discount_amount) {\n\t\t\t\trows += '<tr>\\n' + \n\t\t\t\t\t\t'\\t<td>Discount Amount</td>\\n' + \n\t\t\t\t\t\t'\\t<td style=\"width: 38%; text-align: right;\">' + format_currency(doc.discount_amount, doc.currency) + '</td>\\n' + \n\t\t\t\t\t'</tr>\\n';\n\t\t\t}\n\n\t\t\treturn rows + '</table>\\n';\n\t\t}\n\t};\n</script>\n\n\n<!-- Page Layout Settings -->\n<div class='common page-header'>\n\t<!-- \n\t\tPage Header will contain\n\t\t\t+ table 1\n\t\t\t\t+ table 1a\n\t\t\t\t\t- Name\n\t\t\t\t\t- Address\n\t\t\t\t\t- Contact\n\t\t\t\t\t- Mobile No\n\t\t\t\t+ table 1b\n\t\t\t\t\t- Voucher Date\n\t\t\t\t\t- Due Date\n\t-->\n\t<table class='header-table' cellspacing=0>\n\t\t<thead>\n\t\t\t<tr><td colspan=2><div><script>'<h1>' + (doc.select_print_heading || 'Quotation') + '</h1>'</script></div></td></tr>\n\t\t\t<tr><td colspan=2><div style=\"height:15px\"></div></td></tr>\n\t\t</thead>\n\t\t<tbody>\n\t\t\t<tr>\n\t\t\t\t<td width=60%><table width=100% cellspacing=0><tbody>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td width=39%><b>Name</b></td>\n\t\t\t\t\t\t<td><script>doc.customer_name</script></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><b>Address</b></td>\n\t\t\t\t\t\t<td><script>replace_newlines(doc.address_display)</script></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><b>Contact</b></td>\n\t\t\t\t\t\t<td><script>doc.contact_display</script></td>\n\t\t\t\t\t</tr>\n\t\t\t\t</tbody></table></td>\n\t\t\t\t<td><table width=100% cellspacing=0><tbody>\n\t\t\t\t\t<tr class='imp-details'>\n\t\t\t\t\t\t<td><b>Quotation No.</b></td>\n\t\t\t\t\t\t<td><script>cur_frm.docname</script></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td width=63%><b>Quotation Date</b></td>\n\t\t\t\t\t\t<td><script>date.str_to_user(doc.transaction_date)</script></td>\n\t\t\t\t\t<tr>\t\t\t\t\t\n\t\t\t\t</tbody></table></td>\n\t\t\t</tr>\n\t\t</tbody>\n\t\t<tfoot>\n\t\t\n\t\t</tfoot>\n\t</table>\n</div>\n<div class='common page-body'>\n\t<!-- \n\t\tPage Body will contain\n\t\t\t+ table 2\n\t\t\t\t- Sales Invoice Data\n\t-->\n\t<script>si_std.print_item_table()</script>\n</div>\n<div class='common page-footer'>\n\t<!-- \n\t\tPage Footer will contain\n\t\t\t+ table 3\n\t\t\t\t- Terms and Conditions\n\t\t\t\t- Total Rounded Amount Calculation\n\t\t\t\t- Total Rounded Amount in Words\n\t-->\n\t<table class='footer-table' width=100% cellspacing=0>\n\t\t<thead>\n\t\t\t\n\t\t</thead>\n\t\t<tbody>\n\t\t\t<tr>\n\t\t\t\t<td width=60% style='padding-right: 10px;'>\n\t\t\t\t\t<b>Terms, Conditions &amp; Other Information:</b><br />\n\t\t\t\t\t<script>doc.terms</script>\n\t\t\t\t</td>\n\t\t\t\t<td>\n\t\t\t\t\t<table cellspacing=0 width=100%><tbody>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td>Net Total</td>\n\t\t\t\t\t\t\t<td style=\"width: 38%; text-align: right;\"><script>\n\t\t\t\t\t\t\t\tformat_currency(doc.net_total_export, doc.currency)\n\t\t\t\t\t\t\t</script></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr><td colspan=3><script>si_std.print_other_charges()</script></td></tr>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td>Grand Total</td>\n\t\t\t\t\t\t\t<td style=\"width: 38%; text-align: right;\"><script>\n\t\t\t\t\t\t\t\tformat_currency(doc.grand_total_export, doc.currency)\n\t\t\t\t\t\t\t</script></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr style='font-weight: bold' class='imp-details'>\n\t\t\t\t\t\t\t<td>Rounded Total</td>\n\t\t\t\t\t\t\t<td style=\"width: 38%; text-align: right;\"><script>\n\t\t\t\t\t\t\t\tformat_currency(doc.rounded_total_export, doc.currency)\n\t\t\t\t\t\t\t</script></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t</tbody></table>\n\t\t\t\t\t<br /><b>In Words</b><br />\n\t\t\t\t\t<i><script>doc.in_words_export</script></i>\n\t\t\t\t</td>\n\t\t\t</tr>\t\t\n\t\t</tbody>\n\t\t<tfoot>\n\t\t\t<tr><td colspan=2><div></div></td><tr>\n\t\t</tfoot>\n\t</table>\n</div>", 
-  "module": "Selling", 
-  "name": "__common__", 
-  "print_format_type": "Client", 
-  "standard": "Yes"
- }, 
- {
-  "doctype": "Print Format", 
-  "name": "Quotation Modern"
- }
-]
\ No newline at end of file
+{
+ "creation": "2013-04-19 13:30:51", 
+ "doc_type": "Quotation", 
+ "docstatus": 0, 
+ "doctype": "Print Format", 
+ "html": "<!--\n\tSample Print Format for ERPNext\n\tPlease use at your own discretion\n\tFor suggestions and contributions:\n\t\thttps://github.com/frappe/erpnext-print-templates\n\n\tFreely usable under MIT license\n-->\n\n<!-- Style Settings -->\n<style>\n\t/*\n\t\tcommon style for whole page\n\t\tThis should include:\n\t\t+ page size related settings\n\t\t+ font family settings\n\t\t+ line spacing settings\n\t*/\n\t@media screen {\n\t\tbody {\n\t\t\twidth: 8.3in;\n\t\t}\n\t}\n\n\thtml, body, div, span, td {\n\t\tfont-family: \"Helvetica\", \"Arial\", sans-serif;\n\t\tfont-size: 12px;\n\t}\n\n\tbody {\n\t\tpadding: 10px;\n\t\tmargin: auto;\n\t\tfont-size: 12px;\n        line-height: 150%;\n\t}\n\n\t.common {\n\t\tfont-family: \"Helvetica\", \"Arial\", sans-serif !important;\n\t\tfont-size: 12px;\n\t\tpadding: 10px 0px;\n\t}\n\n\ttable {\n\t\tborder-collapse: collapse;\n\t\twidth: 100%;\n\t\tvertical-align: top;\n\t\tborder-style: none !important;\n\t}\n\n\ttable td {\n\t\tpadding: 2px 0px;\n\t\tborder-style: none !important;\n\t}\n\t\n\ttable h1, h2, h3, h4, h5, h6 {\n\t\tpadding: 0px;\n\t\tmargin: 0px;\n\t}\n\n\ttable.header-table td {\n\t\tvertical-align: top;\n\t}\n\n\ttable.header-table h1 {\n\t\ttext-transform: uppercase;\n\t\tcolor: white;\n\t\tfont-size: 55px;\n\t\tfont-style: italic;\n\t}\n\n\ttable.header-table thead tr:nth-child(1) div {\n\t\theight: 24px;\n\t\tbackground-color: #696969;\n\t\tvertical-align: middle;\n\t\tpadding: 12px 0px 0px 0px;\n\t\twidth: 100%;\n\t}\n\n\tdiv.page-body table td:nth-child(6),\n\tdiv.page-body table td:nth-child(7) {\n\t\ttext-align: right;\n\t}\n\n\tdiv.page-body table tr td {\n\t\tbackground-color: #DCDCDC !important;\n\t}\n\n\tdiv.page-body table tr:nth-child(1) td {\n\t\tbackground-color: #696969 !important;\n\t\tcolor: white !important;\n\t}\n\n\ttable.footer-table td {\n\t\tvertical-align: top;\n\t}\n\n\ttable.footer-table td table td:nth-child(2),\n\ttable.footer-table td table td:nth-child(3) {\n\t\ttext-align: right;\n\t}\n\n\ttable.footer-table tfoot td {\n\t\tbackground-color: #696969;\n\t\theight: 10px;\n\t}\n\n\t.imp-details {\n\t\tbackground-color: #DCDCDC;\n\t}\n</style>\n\n\n<!-- Javascript -->\n<script>\n\tsi_std = {\n\t\tprint_item_table: function() {\n\t\t\tvar table = print_table(\n\t\t\t\t'Quotation',\n\t\t\t\tdoc.name,\n\t\t\t\t'quotation_details',\n\t\t\t\t'Quotation Item',\n\t\t\t\t[// Here specify the table columns to be displayed\n\t\t\t\t\t'SR', 'item_code', 'item_name', 'description', 'qty', 'stock_uom',\n\t\t\t\t\t'rate', 'amount'\n\t\t\t\t],\n\t\t\t\t[// Here specify the labels of column headings\n\t\t\t\t\t'Sr', 'Item Code', 'Item Name', 'Description', 'Qty',\n\t\t\t\t\t'UoM', 'Basic Rate', 'Amount'\n\t\t\t\t],\n\t\t\t\t[// Here specify the column widths\n\t\t\t\t\t'3%', '10%', '15%', '32%', '5%',\n\t\t\t\t\t'5%', '15%', '15%'\n\t\t\t\t],\n\t\t\t\tnull,\n\t\t\t\tnull,\n\t\t\t\t{\n\t\t\t\t\t'description' : function(data_row) {\n\t\t\t\t\t\tif(data_row.discount_percentage) {\n\t\t\t\t\t\t\tvar to_append = '<div style=\"padding-left: 15px;\"><i>Discount: ' + \n\t\t\t\t\t\t\t\tdata_row.discount_percentage + '% on ' + \n\t\t\t\t\t\t\t\tformat_currency(data_row.price_list_rate, doc.currency) + '</i></div>';\n\t\t\t\t\t\t\tif(data_row.description.indexOf(to_append)==-1) {\n\t\t\t\t\t\t\t\treturn data_row.description + to_append;\n\t\t\t\t\t\t\t} else { return data_row.description; }\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\treturn data_row.description;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t);\n\n\t\t\t// This code takes care of page breaks\n\t\t\tif(table.appendChild) {\n\t\t\t\tout = table.innerHTML;\n\t\t\t} else {\n\t\t\t\tout = '';\n\t\t\t\tfor(var i=0; i < (table.length-1); i++) {\n\t\t\t\t\tout += table[i].innerHTML + \n\t\t\t\t\t\t'<div style = \"page-break-after: always;\" \\\n\t\t\t\t\t\tclass = \"page_break\"></div>\\\n\t\t\t\t\t\t<div class=\"page-settings\"></div>';\n\t\t\t\t}\n\t\t\t\tout += table[table.length-1].innerHTML;\n\t\t\t}\n\t\t\treturn out;\n\t\t},\n\n\n\t\tprint_other_charges: function(parent) {\n\t\t\tvar oc = getchildren('Sales Taxes and Charges', doc.name, 'other_charges');\n\t\t\tvar rows = '<table width=100%>\\n';\n\t\t\tfor(var i=0; i<oc.length; i++) {\n\t\t\t\tif(!oc[i].included_in_print_rate) {\n\t\t\t\t\trows +=\n\t\t\t\t\t\t'<tr>\\n' +\n\t\t\t\t\t\t\t'\\t<td>' + oc[i].description + '</td>\\n' +\n\t\t\t\t\t\t\t'\\t<td></td>\\n' +\n\t\t\t\t\t\t\t'\\t<td style=\"width: 38%; text-align: right;\">' + format_currency(oc[i].tax_amount/doc.conversion_rate, doc.currency) + '</td>\\n' +\n\t\t\t\t\t\t'</tr>\\n';\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(doc.discount_amount) {\n\t\t\t\trows += '<tr>\\n' + \n\t\t\t\t\t\t'\\t<td>Discount Amount</td>\\n' + \n\t\t\t\t\t\t'\\t<td style=\"width: 38%; text-align: right;\">' + format_currency(doc.discount_amount, doc.currency) + '</td>\\n' + \n\t\t\t\t\t'</tr>\\n';\n\t\t\t}\n\n\t\t\treturn rows + '</table>\\n';\n\t\t}\n\t};\n</script>\n\n\n<!-- Page Layout Settings -->\n<div class='common page-header'>\n\t<!-- \n\t\tPage Header will contain\n\t\t\t+ table 1\n\t\t\t\t+ table 1a\n\t\t\t\t\t- Name\n\t\t\t\t\t- Address\n\t\t\t\t\t- Contact\n\t\t\t\t\t- Mobile No\n\t\t\t\t+ table 1b\n\t\t\t\t\t- Voucher Date\n\t\t\t\t\t- Due Date\n\t-->\n\t<table class='header-table' cellspacing=0>\n\t\t<thead>\n\t\t\t<tr><td colspan=2><div><script>'<h1>' + (doc.select_print_heading || 'Quotation') + '</h1>'</script></div></td></tr>\n\t\t\t<tr><td colspan=2><div style=\"height:15px\"></div></td></tr>\n\t\t</thead>\n\t\t<tbody>\n\t\t\t<tr>\n\t\t\t\t<td width=60%><table width=100% cellspacing=0><tbody>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td width=39%><b>Name</b></td>\n\t\t\t\t\t\t<td><script>doc.customer_name</script></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><b>Address</b></td>\n\t\t\t\t\t\t<td><script>replace_newlines(doc.address_display)</script></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><b>Contact</b></td>\n\t\t\t\t\t\t<td><script>doc.contact_display</script></td>\n\t\t\t\t\t</tr>\n\t\t\t\t</tbody></table></td>\n\t\t\t\t<td><table width=100% cellspacing=0><tbody>\n\t\t\t\t\t<tr class='imp-details'>\n\t\t\t\t\t\t<td><b>Quotation No.</b></td>\n\t\t\t\t\t\t<td><script>cur_frm.docname</script></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td width=63%><b>Quotation Date</b></td>\n\t\t\t\t\t\t<td><script>date.str_to_user(doc.transaction_date)</script></td>\n\t\t\t\t\t<tr>\t\t\t\t\t\n\t\t\t\t</tbody></table></td>\n\t\t\t</tr>\n\t\t</tbody>\n\t\t<tfoot>\n\t\t\n\t\t</tfoot>\n\t</table>\n</div>\n<div class='common page-body'>\n\t<!-- \n\t\tPage Body will contain\n\t\t\t+ table 2\n\t\t\t\t- Sales Invoice Data\n\t-->\n\t<script>si_std.print_item_table()</script>\n</div>\n<div class='common page-footer'>\n\t<!-- \n\t\tPage Footer will contain\n\t\t\t+ table 3\n\t\t\t\t- Terms and Conditions\n\t\t\t\t- Total Rounded Amount Calculation\n\t\t\t\t- Total Rounded Amount in Words\n\t-->\n\t<table class='footer-table' width=100% cellspacing=0>\n\t\t<thead>\n\t\t\t\n\t\t</thead>\n\t\t<tbody>\n\t\t\t<tr>\n\t\t\t\t<td width=60% style='padding-right: 10px;'>\n\t\t\t\t\t<b>Terms, Conditions &amp; Other Information:</b><br />\n\t\t\t\t\t<script>doc.terms</script>\n\t\t\t\t</td>\n\t\t\t\t<td>\n\t\t\t\t\t<table cellspacing=0 width=100%><tbody>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td>Net Total</td>\n\t\t\t\t\t\t\t<td style=\"width: 38%; text-align: right;\"><script>\n\t\t\t\t\t\t\t\tformat_currency(doc.net_total_export, doc.currency)\n\t\t\t\t\t\t\t</script></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr><td colspan=3><script>si_std.print_other_charges()</script></td></tr>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td>Grand Total</td>\n\t\t\t\t\t\t\t<td style=\"width: 38%; text-align: right;\"><script>\n\t\t\t\t\t\t\t\tformat_currency(doc.grand_total_export, doc.currency)\n\t\t\t\t\t\t\t</script></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr style='font-weight: bold' class='imp-details'>\n\t\t\t\t\t\t\t<td>Rounded Total</td>\n\t\t\t\t\t\t\t<td style=\"width: 38%; text-align: right;\"><script>\n\t\t\t\t\t\t\t\tformat_currency(doc.rounded_total_export, doc.currency)\n\t\t\t\t\t\t\t</script></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t</tbody></table>\n\t\t\t\t\t<br /><b>In Words</b><br />\n\t\t\t\t\t<i><script>doc.in_words_export</script></i>\n\t\t\t\t</td>\n\t\t\t</tr>\t\t\n\t\t</tbody>\n\t\t<tfoot>\n\t\t\t<tr><td colspan=2><div></div></td><tr>\n\t\t</tfoot>\n\t</table>\n</div>", 
+ "idx": 1, 
+ "modified": "2014-02-11 17:45:15", 
+ "modified_by": "Administrator", 
+ "module": "Selling", 
+ "name": "Quotation Modern", 
+ "owner": "Administrator", 
+ "print_format_type": "Client", 
+ "standard": "Yes"
+}
\ No newline at end of file
diff --git a/erpnext/selling/Print Format/Quotation Spartan/Quotation Spartan.txt b/erpnext/selling/Print Format/Quotation Spartan/Quotation Spartan.txt
index f4be36e..1ace246 100644
--- a/erpnext/selling/Print Format/Quotation Spartan/Quotation Spartan.txt
+++ b/erpnext/selling/Print Format/Quotation Spartan/Quotation Spartan.txt
@@ -1,22 +1,15 @@
-[
- {
-  "creation": "2013-04-19 13:30:51", 
-  "docstatus": 0, 
-  "modified": "2014-02-11 17:45:50", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "doc_type": "Quotation", 
-  "doctype": "Print Format", 
-  "html": "<!--\n\tSample Print Format for ERPNext\n\tPlease use at your own discretion\n\tFor suggestions and contributions:\n\t\thttps://github.com/frappe/erpnext-print-templates\n\n\tFreely usable under MIT license\n-->\n\n<!-- Style Settings -->\n<style>\n\t/*\n\t\tcommon style for whole page\n\t\tThis should include:\n\t\t+ page size related settings\n\t\t+ font family settings\n\t\t+ line spacing settings\n\t*/\n\t@media screen {\n\t\tbody {\n\t\t\twidth: 8.3in;\n\t\t}\n\t}\n\n\thtml, body, div, span, td {\n\t\tfont-family: \"Arial\", sans-serif;\n\t\tfont-size: 12px;\n\t}\n\n\tbody {\n\t\tpadding: 10px;\n\t\tmargin: auto;\n\t\tfont-size: 12px;\n\t}\n\n\t.common {\n\t\tfont-family: \"Arial\", sans-serif !important;\n\t\tfont-size: 12px;\n\t\tpadding: 0px;\n\t}\n\n\ttable {\n\t\twidth: 100% !important;\n\t\tvertical-align: top;\n\t}\n\n\ttable td {\n\t\tpadding: 2px 0px;\n\t}\n\n\ttable, td {\n\t\tborder-collapse: collapse !important;\n\t\tpadding: 0px;\n\t\tmargin: 0px !important;\n\t}\n\t\n\ttable h1, h2, h3, h4, h5, h6 {\n\t\tpadding: 0px;\n\t\tmargin: 0px;\n\t}\n\n\ttable.header-table td {\n\t\tvertical-align: top;\n\t}\n\n\ttable.header-table h3 {\n\t\tcolor: gray;\n\t}\n\n\ttable.header-table thead td {\n\t\tpadding: 5px;\n\t}\n\n\ttable.header-table > thead,\n\ttable.header-table > tbody > tr > td,\n\ttable.footer-table > tbody > tr > td {\n\t\tborder: 1px solid black;\n\t\tpadding: 5px;\n\t}\n\n\ttable.footer-table > tbody,\n\ttable.header-table > thead {\n\t\tborder-bottom: 3px solid black;\n\t}\n\n\ttable.header-table > thead {\n\t\tborder-top: 3px solid black;\n\t}\n\n\tdiv.page-body table td:nth-child(6),\n\tdiv.page-body table td:nth-child(7) {\n\t\ttext-align: right;\n\t}\n\n\tdiv.page-body td {\n\t\tbackground-color: white !important;\n\t\tborder: 1px solid black !important;\n\t}\n\n\ttable.footer-table td {\n\t\tvertical-align: top;\n\t}\n\n\ttable.footer-table td table td:nth-child(2),\n\ttable.footer-table td table td:nth-child(3) {\n\t\ttext-align: right;\n\t}\n</style>\n\n\n<!-- Javascript -->\n<script>\n\tsi_std = {\n\t\tprint_item_table: function() {\n\t\t\tvar table = print_table(\n\t\t\t\t'Quotation',\n\t\t\t\tdoc.name,\n\t\t\t\t'quotation_details',\n\t\t\t\t'Quotation Item',\n\t\t\t\t[// Here specify the table columns to be displayed\n\t\t\t\t\t'SR', 'item_code', 'item_name', 'description', 'qty', 'stock_uom',\n\t\t\t\t\t'rate', 'amount'\n\t\t\t\t],\n\t\t\t\t[// Here specify the labels of column headings\n\t\t\t\t\t'Sr', 'Item Code', 'Item Name', 'Description', 'Qty',\n\t\t\t\t\t'UoM', 'Basic Rate', 'Amount'\n\t\t\t\t],\n\t\t\t\t[// Here specify the column widths\n\t\t\t\t\t'3%', '10%', '15%', '32%', '5%',\n\t\t\t\t\t'5%', '15%', '15%'\n\t\t\t\t],\n\t\t\t\tnull,\n\t\t\t\tnull,\n\t\t\t\t{\n\t\t\t\t\t'description' : function(data_row) {\n\t\t\t\t\t\tif(data_row.discount_percentage) {\n\t\t\t\t\t\t\tvar to_append = '<div style=\"padding-left: 15px;\"><i>Discount: ' + \n\t\t\t\t\t\t\t\tdata_row.discount_percentage + '% on ' + \n\t\t\t\t\t\t\t\tformat_currency(data_row.price_list_rate, doc.currency) + '</i></div>';\n\t\t\t\t\t\t\tif(data_row.description.indexOf(to_append)==-1) {\n\t\t\t\t\t\t\t\treturn data_row.description + to_append;\n\t\t\t\t\t\t\t} else { return data_row.description; }\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\treturn data_row.description;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t);\n\n\t\t\t// This code takes care of page breaks\n\t\t\tif(table.appendChild) {\n\t\t\t\tout = table.innerHTML;\n\t\t\t} else {\n\t\t\t\tout = '';\n\t\t\t\tfor(var i=0; i < (table.length-1); i++) {\n\t\t\t\t\tout += table[i].innerHTML + \n\t\t\t\t\t\t'<div style = \"page-break-after: always;\" \\\n\t\t\t\t\t\tclass = \"page_break\"></div>\\\n\t\t\t\t\t\t<div class=\"page-settings\"></div>';\n\t\t\t\t}\n\t\t\t\tout += table[table.length-1].innerHTML;\n\t\t\t}\n\t\t\treturn out;\n\t\t},\n\n\n\t\tprint_other_charges: function(parent) {\n\t\t\tvar oc = getchildren('Sales Taxes and Charges', doc.name, 'other_charges');\n\t\t\tvar rows = '<table width=100%>\\n';\n\t\t\tfor(var i=0; i<oc.length; i++) {\n\t\t\t\tif(!oc[i].included_in_print_rate) {\n\t\t\t\t\trows +=\n\t\t\t\t\t\t'<tr>\\n' +\n\t\t\t\t\t\t\t'\\t<td>' + oc[i].description + '</td>\\n' +\n\t\t\t\t\t\t\t'\\t<td></td>\\n' +\n\t\t\t\t\t\t\t'\\t<td style=\"width: 38%; text-align: right;\">' + format_currency(oc[i].tax_amount/doc.conversion_rate, doc.currency) + '</td>\\n' +\n\t\t\t\t\t\t'</tr>\\n';\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(doc.discount_amount) {\n\t\t\t\trows += '<tr>\\n' + \n\t\t\t\t\t\t'\\t<td>Discount Amount</td>\\n' + \n\t\t\t\t\t\t'\\t<td style=\"width: 38%; text-align: right;\">' + format_currency(doc.discount_amount, doc.currency) + '</td>\\n' + \n\t\t\t\t\t'</tr>\\n';\n\t\t\t}\n\n\t\t\treturn rows + '</table>\\n';\n\t\t}\n\t};\n</script>\n\n\n<!-- Page Layout Settings -->\n<div class='common page-header'>\n\t<!-- \n\t\tPage Header will contain\n\t\t\t+ table 1\n\t\t\t\t+ table 1a\n\t\t\t\t\t- Name\n\t\t\t\t\t- Address\n\t\t\t\t\t- Contact\n\t\t\t\t\t- Mobile No\n\t\t\t\t+ table 1b\n\t\t\t\t\t- Voucher Date\n\t\t\t\t\t- Due Date\n\t-->\n\t<table class='header-table' cellspacing=0>\n\t\t<thead>\n\t\t\t<tr><td colspan=2><script>'<h1>' + (doc.select_print_heading || 'Quotation') + '</h1>'</script></td></tr>\n\t\t\t<tr><td colspan=2><h3><script>cur_frm.docname</script></h3></td></tr>\n\t\t</thead>\n\t\t<tbody>\n\t\t\t<tr>\n\t\t\t\t<td width=60%><table width=100% cellspacing=0><tbody>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td width=39%><b>Name</b></td>\n\t\t\t\t\t\t<td><script>doc.customer_name</script></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><b>Address</b></td>\n\t\t\t\t\t\t<td><script>replace_newlines(doc.address_display)</script></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><b>Contact</b></td>\n\t\t\t\t\t\t<td><script>doc.contact_display</script></td>\n\t\t\t\t\t</tr>\n\t\t\t\t</tbody></table></td>\n\t\t\t\t<td><table width=100% cellspacing=0><tbody>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td width=63%><b>Quotation Date</b></td>\n\t\t\t\t\t\t<td><script>date.str_to_user(doc.transaction_date)</script></td>\n\t\t\t\t\t<tr>\t\t\t\t\t\n\t\t\t\t</tbody></table></td>\n\t\t\t</tr>\n\t\t</tbody>\n\t\t<tfoot>\n\t\t\n\t\t</tfoot>\n\t</table>\n</div>\n<div class='common page-body'>\n\t<!-- \n\t\tPage Body will contain\n\t\t\t+ table 2\n\t\t\t\t- Sales Invoice Data\n\t-->\n\t<script>si_std.print_item_table()</script>\n</div>\n<div class='common page-footer'>\n\t<!-- \n\t\tPage Footer will contain\n\t\t\t+ table 3\n\t\t\t\t- Terms and Conditions\n\t\t\t\t- Total Rounded Amount Calculation\n\t\t\t\t- Total Rounded Amount in Words\n\t-->\n\t<table class='footer-table' width=100% cellspacing=0>\n\t\t<thead>\n\t\t\t\n\t\t</thead>\n\t\t<tbody>\n\t\t\t<tr>\n\t\t\t\t<td width=60% style='padding-right: 10px;'>\n\t\t\t\t\t<b>Terms, Conditions &amp; Other Information:</b><br />\n\t\t\t\t\t<script>doc.terms</script>\n\t\t\t\t</td>\n\t\t\t\t<td>\n\t\t\t\t\t<table cellspacing=0 width=100%><tbody>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td>Net Total</td>\n\t\t\t\t\t\t\t<td style=\"width: 38%; text-align: right;\"><script>\n\t\t\t\t\t\t\t\tformat_currency(doc.net_total_export, doc.currency)\n\t\t\t\t\t\t\t</script></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr><td colspan=3><script>si_std.print_other_charges()</script></td></tr>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td>Grand Total</td>\n\t\t\t\t\t\t\t<td style=\"width: 38%; text-align: right;\"><script>\n\t\t\t\t\t\t\t\tformat_currency(doc.grand_total_export, doc.currency)\n\t\t\t\t\t\t\t</script></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr style='font-weight: bold'>\n\t\t\t\t\t\t\t<td>Rounded Total</td>\n\t\t\t\t\t\t\t<td style=\"width: 38%; text-align: right;\"><script>\n\t\t\t\t\t\t\t\tformat_currency(doc.rounded_total_export, doc.currency)\n\t\t\t\t\t\t\t</script></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t</tbody></table>\n\t\t\t\t\t<br /><b>In Words</b><br />\n\t\t\t\t\t<i><script>doc.in_words_export</script></i>\n\t\t\t\t</td>\n\t\t\t</tr>\t\t\n\t\t</tbody>\n\t\t<tfoot>\n\t\t\n\t\t</tfoot>\n\t</table>\n</div>", 
-  "module": "Selling", 
-  "name": "__common__", 
-  "print_format_type": "Client", 
-  "standard": "Yes"
- }, 
- {
-  "doctype": "Print Format", 
-  "name": "Quotation Spartan"
- }
-]
\ No newline at end of file
+{
+ "creation": "2013-04-19 13:30:51", 
+ "doc_type": "Quotation", 
+ "docstatus": 0, 
+ "doctype": "Print Format", 
+ "html": "<!--\n\tSample Print Format for ERPNext\n\tPlease use at your own discretion\n\tFor suggestions and contributions:\n\t\thttps://github.com/frappe/erpnext-print-templates\n\n\tFreely usable under MIT license\n-->\n\n<!-- Style Settings -->\n<style>\n\t/*\n\t\tcommon style for whole page\n\t\tThis should include:\n\t\t+ page size related settings\n\t\t+ font family settings\n\t\t+ line spacing settings\n\t*/\n\t@media screen {\n\t\tbody {\n\t\t\twidth: 8.3in;\n\t\t}\n\t}\n\n\thtml, body, div, span, td {\n\t\tfont-family: \"Arial\", sans-serif;\n\t\tfont-size: 12px;\n\t}\n\n\tbody {\n\t\tpadding: 10px;\n\t\tmargin: auto;\n\t\tfont-size: 12px;\n\t}\n\n\t.common {\n\t\tfont-family: \"Arial\", sans-serif !important;\n\t\tfont-size: 12px;\n\t\tpadding: 0px;\n\t}\n\n\ttable {\n\t\twidth: 100% !important;\n\t\tvertical-align: top;\n\t}\n\n\ttable td {\n\t\tpadding: 2px 0px;\n\t}\n\n\ttable, td {\n\t\tborder-collapse: collapse !important;\n\t\tpadding: 0px;\n\t\tmargin: 0px !important;\n\t}\n\t\n\ttable h1, h2, h3, h4, h5, h6 {\n\t\tpadding: 0px;\n\t\tmargin: 0px;\n\t}\n\n\ttable.header-table td {\n\t\tvertical-align: top;\n\t}\n\n\ttable.header-table h3 {\n\t\tcolor: gray;\n\t}\n\n\ttable.header-table thead td {\n\t\tpadding: 5px;\n\t}\n\n\ttable.header-table > thead,\n\ttable.header-table > tbody > tr > td,\n\ttable.footer-table > tbody > tr > td {\n\t\tborder: 1px solid black;\n\t\tpadding: 5px;\n\t}\n\n\ttable.footer-table > tbody,\n\ttable.header-table > thead {\n\t\tborder-bottom: 3px solid black;\n\t}\n\n\ttable.header-table > thead {\n\t\tborder-top: 3px solid black;\n\t}\n\n\tdiv.page-body table td:nth-child(6),\n\tdiv.page-body table td:nth-child(7) {\n\t\ttext-align: right;\n\t}\n\n\tdiv.page-body td {\n\t\tbackground-color: white !important;\n\t\tborder: 1px solid black !important;\n\t}\n\n\ttable.footer-table td {\n\t\tvertical-align: top;\n\t}\n\n\ttable.footer-table td table td:nth-child(2),\n\ttable.footer-table td table td:nth-child(3) {\n\t\ttext-align: right;\n\t}\n</style>\n\n\n<!-- Javascript -->\n<script>\n\tsi_std = {\n\t\tprint_item_table: function() {\n\t\t\tvar table = print_table(\n\t\t\t\t'Quotation',\n\t\t\t\tdoc.name,\n\t\t\t\t'quotation_details',\n\t\t\t\t'Quotation Item',\n\t\t\t\t[// Here specify the table columns to be displayed\n\t\t\t\t\t'SR', 'item_code', 'item_name', 'description', 'qty', 'stock_uom',\n\t\t\t\t\t'rate', 'amount'\n\t\t\t\t],\n\t\t\t\t[// Here specify the labels of column headings\n\t\t\t\t\t'Sr', 'Item Code', 'Item Name', 'Description', 'Qty',\n\t\t\t\t\t'UoM', 'Basic Rate', 'Amount'\n\t\t\t\t],\n\t\t\t\t[// Here specify the column widths\n\t\t\t\t\t'3%', '10%', '15%', '32%', '5%',\n\t\t\t\t\t'5%', '15%', '15%'\n\t\t\t\t],\n\t\t\t\tnull,\n\t\t\t\tnull,\n\t\t\t\t{\n\t\t\t\t\t'description' : function(data_row) {\n\t\t\t\t\t\tif(data_row.discount_percentage) {\n\t\t\t\t\t\t\tvar to_append = '<div style=\"padding-left: 15px;\"><i>Discount: ' + \n\t\t\t\t\t\t\t\tdata_row.discount_percentage + '% on ' + \n\t\t\t\t\t\t\t\tformat_currency(data_row.price_list_rate, doc.currency) + '</i></div>';\n\t\t\t\t\t\t\tif(data_row.description.indexOf(to_append)==-1) {\n\t\t\t\t\t\t\t\treturn data_row.description + to_append;\n\t\t\t\t\t\t\t} else { return data_row.description; }\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\treturn data_row.description;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t);\n\n\t\t\t// This code takes care of page breaks\n\t\t\tif(table.appendChild) {\n\t\t\t\tout = table.innerHTML;\n\t\t\t} else {\n\t\t\t\tout = '';\n\t\t\t\tfor(var i=0; i < (table.length-1); i++) {\n\t\t\t\t\tout += table[i].innerHTML + \n\t\t\t\t\t\t'<div style = \"page-break-after: always;\" \\\n\t\t\t\t\t\tclass = \"page_break\"></div>\\\n\t\t\t\t\t\t<div class=\"page-settings\"></div>';\n\t\t\t\t}\n\t\t\t\tout += table[table.length-1].innerHTML;\n\t\t\t}\n\t\t\treturn out;\n\t\t},\n\n\n\t\tprint_other_charges: function(parent) {\n\t\t\tvar oc = getchildren('Sales Taxes and Charges', doc.name, 'other_charges');\n\t\t\tvar rows = '<table width=100%>\\n';\n\t\t\tfor(var i=0; i<oc.length; i++) {\n\t\t\t\tif(!oc[i].included_in_print_rate) {\n\t\t\t\t\trows +=\n\t\t\t\t\t\t'<tr>\\n' +\n\t\t\t\t\t\t\t'\\t<td>' + oc[i].description + '</td>\\n' +\n\t\t\t\t\t\t\t'\\t<td></td>\\n' +\n\t\t\t\t\t\t\t'\\t<td style=\"width: 38%; text-align: right;\">' + format_currency(oc[i].tax_amount/doc.conversion_rate, doc.currency) + '</td>\\n' +\n\t\t\t\t\t\t'</tr>\\n';\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(doc.discount_amount) {\n\t\t\t\trows += '<tr>\\n' + \n\t\t\t\t\t\t'\\t<td>Discount Amount</td>\\n' + \n\t\t\t\t\t\t'\\t<td style=\"width: 38%; text-align: right;\">' + format_currency(doc.discount_amount, doc.currency) + '</td>\\n' + \n\t\t\t\t\t'</tr>\\n';\n\t\t\t}\n\n\t\t\treturn rows + '</table>\\n';\n\t\t}\n\t};\n</script>\n\n\n<!-- Page Layout Settings -->\n<div class='common page-header'>\n\t<!-- \n\t\tPage Header will contain\n\t\t\t+ table 1\n\t\t\t\t+ table 1a\n\t\t\t\t\t- Name\n\t\t\t\t\t- Address\n\t\t\t\t\t- Contact\n\t\t\t\t\t- Mobile No\n\t\t\t\t+ table 1b\n\t\t\t\t\t- Voucher Date\n\t\t\t\t\t- Due Date\n\t-->\n\t<table class='header-table' cellspacing=0>\n\t\t<thead>\n\t\t\t<tr><td colspan=2><script>'<h1>' + (doc.select_print_heading || 'Quotation') + '</h1>'</script></td></tr>\n\t\t\t<tr><td colspan=2><h3><script>cur_frm.docname</script></h3></td></tr>\n\t\t</thead>\n\t\t<tbody>\n\t\t\t<tr>\n\t\t\t\t<td width=60%><table width=100% cellspacing=0><tbody>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td width=39%><b>Name</b></td>\n\t\t\t\t\t\t<td><script>doc.customer_name</script></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><b>Address</b></td>\n\t\t\t\t\t\t<td><script>replace_newlines(doc.address_display)</script></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><b>Contact</b></td>\n\t\t\t\t\t\t<td><script>doc.contact_display</script></td>\n\t\t\t\t\t</tr>\n\t\t\t\t</tbody></table></td>\n\t\t\t\t<td><table width=100% cellspacing=0><tbody>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td width=63%><b>Quotation Date</b></td>\n\t\t\t\t\t\t<td><script>date.str_to_user(doc.transaction_date)</script></td>\n\t\t\t\t\t<tr>\t\t\t\t\t\n\t\t\t\t</tbody></table></td>\n\t\t\t</tr>\n\t\t</tbody>\n\t\t<tfoot>\n\t\t\n\t\t</tfoot>\n\t</table>\n</div>\n<div class='common page-body'>\n\t<!-- \n\t\tPage Body will contain\n\t\t\t+ table 2\n\t\t\t\t- Sales Invoice Data\n\t-->\n\t<script>si_std.print_item_table()</script>\n</div>\n<div class='common page-footer'>\n\t<!-- \n\t\tPage Footer will contain\n\t\t\t+ table 3\n\t\t\t\t- Terms and Conditions\n\t\t\t\t- Total Rounded Amount Calculation\n\t\t\t\t- Total Rounded Amount in Words\n\t-->\n\t<table class='footer-table' width=100% cellspacing=0>\n\t\t<thead>\n\t\t\t\n\t\t</thead>\n\t\t<tbody>\n\t\t\t<tr>\n\t\t\t\t<td width=60% style='padding-right: 10px;'>\n\t\t\t\t\t<b>Terms, Conditions &amp; Other Information:</b><br />\n\t\t\t\t\t<script>doc.terms</script>\n\t\t\t\t</td>\n\t\t\t\t<td>\n\t\t\t\t\t<table cellspacing=0 width=100%><tbody>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td>Net Total</td>\n\t\t\t\t\t\t\t<td style=\"width: 38%; text-align: right;\"><script>\n\t\t\t\t\t\t\t\tformat_currency(doc.net_total_export, doc.currency)\n\t\t\t\t\t\t\t</script></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr><td colspan=3><script>si_std.print_other_charges()</script></td></tr>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td>Grand Total</td>\n\t\t\t\t\t\t\t<td style=\"width: 38%; text-align: right;\"><script>\n\t\t\t\t\t\t\t\tformat_currency(doc.grand_total_export, doc.currency)\n\t\t\t\t\t\t\t</script></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr style='font-weight: bold'>\n\t\t\t\t\t\t\t<td>Rounded Total</td>\n\t\t\t\t\t\t\t<td style=\"width: 38%; text-align: right;\"><script>\n\t\t\t\t\t\t\t\tformat_currency(doc.rounded_total_export, doc.currency)\n\t\t\t\t\t\t\t</script></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t</tbody></table>\n\t\t\t\t\t<br /><b>In Words</b><br />\n\t\t\t\t\t<i><script>doc.in_words_export</script></i>\n\t\t\t\t</td>\n\t\t\t</tr>\t\t\n\t\t</tbody>\n\t\t<tfoot>\n\t\t\n\t\t</tfoot>\n\t</table>\n</div>", 
+ "idx": 1, 
+ "modified": "2014-02-11 17:45:50", 
+ "modified_by": "Administrator", 
+ "module": "Selling", 
+ "name": "Quotation Spartan", 
+ "owner": "Administrator", 
+ "print_format_type": "Client", 
+ "standard": "Yes"
+}
\ No newline at end of file
diff --git a/erpnext/selling/Print Format/Sales Order Classic/Sales Order Classic.txt b/erpnext/selling/Print Format/Sales Order Classic/Sales Order Classic.txt
index 8c0b807..2e9abb3 100644
--- a/erpnext/selling/Print Format/Sales Order Classic/Sales Order Classic.txt
+++ b/erpnext/selling/Print Format/Sales Order Classic/Sales Order Classic.txt
@@ -1,22 +1,15 @@
-[
- {
-  "creation": "2013-04-19 13:30:51", 
-  "docstatus": 0, 
-  "modified": "2014-02-11 17:35:51", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "doc_type": "Sales Order", 
-  "doctype": "Print Format", 
-  "html": "<!--\n\tSample Print Format for ERPNext\n\tPlease use at your own discretion\n\tFor suggestions and contributions:\n\t\thttps://github.com/frappe/erpnext-print-templates\n\n\tFreely usable under MIT license\n-->\n\n<!-- Style Settings -->\n<style>\n\t/*\n\t\tcommon style for whole page\n\t\tThis should include:\n\t\t+ page size related settings\n\t\t+ font family settings\n\t\t+ line spacing settings\n\t*/\n\t@media screen {\n\t\tbody {\n\t\t\twidth: 8.3in;\n\t\t}\n\t}\n\n\thtml, body, div, span, td {\n\t\tfont-family: \"Georgia\", serif;\n\t\tfont-size: 12px;\n\t}\n\n\tbody {\n\t\tpadding: 10px;\n\t\tmargin: auto;\n\t\tfont-size: 12px;\n\t}\n\n\t.common {\n\t\tfont-family: \"Georgia\", serif !important;\n\t\tfont-size: 12px;\n\t\tpadding: 10px 0px;\n\t}\n\n\ttable {\n\t\tborder-collapse: collapse;\n\t\twidth: 100%;\n\t\tvertical-align: top;\n\t}\n\n\ttable td {\n\t\tpadding: 2px 0px;\n\t}\n\t\n\ttable h1, h2, h3, h4, h5, h6 {\n\t\tpadding: 0px;\n\t\tmargin: 0px;\n\t}\n\n\ttable.header-table td {\n\t\tvertical-align: top;\n\t}\n\n\ttable.header-table thead {\n\t\tborder-bottom: 1px solid black;\n\t}\n\n\ttable.header-table h3 {\n\t\tcolor: gray;\n\t}\n\n\ttable.header-table thead td {\n\t\tpadding: 5px 0px;\n\t}\n\n\tdiv.page-body table td:nth-child(6),\n\tdiv.page-body table td:nth-child(7) {\n\t\ttext-align: right;\n\t}\n\n\ttable.footer-table td {\n\t\tvertical-align: top;\n\t}\n\n\ttable.footer-table td table td:nth-child(2),\n\ttable.footer-table td table td:nth-child(3) {\n\t\ttext-align: right;\n\t}\n</style>\n\n\n<!-- Javascript -->\n<script>\n\tsi_std = {\n\t\tprint_item_table: function() {\n\t\t\tvar table = print_table(\n\t\t\t\t'Sales Order',\n\t\t\t\tdoc.name,\n\t\t\t\t'sales_order_details',\n\t\t\t\t'Sales Order Item',\n\t\t\t\t[// Here specify the table columns to be displayed\n\t\t\t\t\t'SR', 'item_code', 'description', 'qty', 'stock_uom',\n\t\t\t\t\t'base_rate', 'amount'\n\t\t\t\t],\n\t\t\t\t[// Here specify the labels of column headings\n\t\t\t\t\t'Sr', 'Item Code', 'Description', 'Qty',\n\t\t\t\t\t'UoM', 'Basic Rate', 'Amount'\n\t\t\t\t],\n\t\t\t\t[// Here specify the column widths\n\t\t\t\t\t'3%', '20%', '37%', '5%',\n\t\t\t\t\t'5%', '15%', '15%'\n\t\t\t\t],\n\t\t\t\tnull,\n\t\t\t\tnull,\n\t\t\t\t{\n\t\t\t\t\t'description' : function(data_row) {\n\t\t\t\t\t\tif(data_row.discount_percentage) {\n\t\t\t\t\t\t\tvar to_append = '<div style=\"padding-left: 15px;\"><i>Discount: ' + \n\t\t\t\t\t\t\t\tdata_row.discount_percentage + '% on ' + \n\t\t\t\t\t\t\t\tformat_currency(data_row.price_list_rate, doc.currency) + '</i></div>';\n\t\t\t\t\t\t\tif(data_row.description.indexOf(to_append)==-1) {\n\t\t\t\t\t\t\t\treturn data_row.description + to_append;\n\t\t\t\t\t\t\t} else { return data_row.description; }\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\treturn data_row.description;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t);\n\n\t\t\t// This code takes care of page breaks\n\t\t\tif(table.appendChild) {\n\t\t\t\tout = table.innerHTML;\n\t\t\t} else {\n\t\t\t\tout = '';\n\t\t\t\tfor(var i=0; i < (table.length-1); i++) {\n\t\t\t\t\tout += table[i].innerHTML + \n\t\t\t\t\t\t'<div style = \"page-break-after: always;\" \\\n\t\t\t\t\t\tclass = \"page_break\"></div>\\\n\t\t\t\t\t\t<div class=\"page-settings\"></div>';\n\t\t\t\t}\n\t\t\t\tout += table[table.length-1].innerHTML;\n\t\t\t}\n\t\t\treturn out;\n\t\t},\n\n\n\t\tprint_other_charges: function(parent) {\n\t\t\tvar oc = getchildren('Sales Taxes and Charges', doc.name, 'other_charges');\n\t\t\tvar rows = '<table width=100%>\\n';\n\t\t\tfor(var i=0; i<oc.length; i++) {\n\t\t\t\tif(!oc[i].included_in_print_rate) {\n\t\t\t\t\trows +=\n\t\t\t\t\t\t'<tr>\\n' +\n\t\t\t\t\t\t\t'\\t<td>' + oc[i].description + '</td>\\n' +\n\t\t\t\t\t\t\t'\\t<td style=\"width: 38%; text-align: right;\">' + format_currency(oc[i].tax_amount/doc.conversion_rate, doc.currency) + '</td>\\n' +\n\t\t\t\t\t\t'</tr>\\n';\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(doc.discount_amount) {\n\t\t\t\trows += '<tr>\\n' + \n\t\t\t\t\t\t'\\t<td>Discount Amount</td>\\n' + \n\t\t\t\t\t\t'\\t<td style=\"width: 38%; text-align: right;\">' + format_currency(doc.discount_amount, doc.currency) + '</td>\\n' + \n\t\t\t\t\t'</tr>\\n';\n\t\t\t}\n\n\t\t\treturn rows + '</table>\\n';\n\t\t}\n\t};\n</script>\n\n\n<!-- Page Layout Settings -->\n<div class='common page-header'>\n\t<!-- \n\t\tPage Header will contain\n\t\t\t+ table 1\n\t\t\t\t+ table 1a\n\t\t\t\t\t- Name\n\t\t\t\t\t- Address\n\t\t\t\t\t- Contact\n\t\t\t\t\t- Mobile No\n\t\t\t\t+ table 1b\n\t\t\t\t\t- Voucher Date\n\t\t\t\t\t- Due Date\n\t-->\n\t<table class='header-table' cellspacing=0>\n\t\t<thead>\n\t\t\t<tr><td><script>'<h1>' + (doc.select_print_heading || 'Sales Order') + '</h1>'</script></td></tr>\n\t\t\t<tr><td><h3><script>cur_frm.docname</script></h3></td></tr>\n\t\t</thead>\n\t\t<tbody>\n\t\t\t<tr>\n\t\t\t\t<td width=60%><table width=100% cellspacing=0><tbody>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td width=39%><b>Name</b></td>\n\t\t\t\t\t\t<td><script>doc.customer_name</script></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><b>Address</b></td>\n\t\t\t\t\t\t<td><script>replace_newlines(doc.address_display)</script></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><b>Contact</b></td>\n\t\t\t\t\t\t<td><script>doc.contact_display</script></td>\n\t\t\t\t\t</tr>\n\t\t\t\t</tbody></table></td>\n\t\t\t\t<td><table width=100% cellspacing=0><tbody>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td width=63%><b>Sales Order Date</b></td>\n\t\t\t\t\t\t<td><script>date.str_to_user(doc.transaction_date)</script></td>\n\t\t\t\t\t<tr>\t\t\t\t\t\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><b>Delivery Date</b></td>\n\t\t\t\t\t\t<td><script>date.str_to_user(doc.delivery_date)</script></td>\n\t\t\t\t\t<tr>\t\t\t\t\t\n\t\t\t\t</tbody></table></td>\n\t\t\t</tr>\n\t\t</tbody>\n\t\t<tfoot>\n\t\t\n\t\t</tfoot>\n\t</table>\n</div>\n<div class='common page-body'>\n\t<!-- \n\t\tPage Body will contain\n\t\t\t+ table 2\n\t\t\t\t- Sales Invoice Data\n\t-->\n\t<script>si_std.print_item_table()</script>\n</div>\n<div class='common page-footer'>\n\t<!-- \n\t\tPage Footer will contain\n\t\t\t+ table 3\n\t\t\t\t- Terms and Conditions\n\t\t\t\t- Total Rounded Amount Calculation\n\t\t\t\t- Total Rounded Amount in Words\n\t-->\n\t<table class='footer-table' width=100% cellspacing=0>\n\t\t<thead>\n\t\t\t\n\t\t</thead>\n\t\t<tbody>\n\t\t\t<tr>\n\t\t\t\t<td width=60% style='padding-right: 10px;'>\n\t\t\t\t\t<b>Terms, Conditions &amp; Other Information:</b><br />\n\t\t\t\t\t<script>doc.terms</script>\n\t\t\t\t</td>\n\t\t\t\t<td>\n\t\t\t\t\t<table cellspacing=0 width=100%><tbody>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td>Net Total</td>\n\t\t\t\t\t\t\t<td style=\"width: 38%; text-align: right;\"><script>\n\t\t\t\t\t\t\t\tformat_currency(doc.net_total_export, doc.currency)\n\t\t\t\t\t\t\t</script></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr><td colspan=3><script>si_std.print_other_charges()</script></td></tr>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td>Grand Total</td>\n\t\t\t\t\t\t\t<td style=\"width: 38%; text-align: right;\"><script>\n\t\t\t\t\t\t\t\tformat_currency(doc.grand_total_export, doc.currency)\n\t\t\t\t\t\t\t</script></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr style='font-weight: bold'>\n\t\t\t\t\t\t\t<td>Rounded Total</td>\n\t\t\t\t\t\t\t<td style=\"width: 38%; text-align: right;\"><script>\n\t\t\t\t\t\t\t\tformat_currency(doc.rounded_total_export, doc.currency)\n\t\t\t\t\t\t\t</script></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t</tbody></table>\n\t\t\t\t\t<br /><b>In Words</b><br />\n\t\t\t\t\t<i><script>doc.in_words_export</script></i>\n\t\t\t\t</td>\n\t\t\t</tr>\t\t\n\t\t</tbody>\n\t\t<tfoot>\n\t\t\n\t\t</tfoot>\n\t</table>\n</div>", 
-  "module": "Selling", 
-  "name": "__common__", 
-  "print_format_type": "Client", 
-  "standard": "Yes"
- }, 
- {
-  "doctype": "Print Format", 
-  "name": "Sales Order Classic"
- }
-]
\ No newline at end of file
+{
+ "creation": "2013-04-19 13:30:51", 
+ "doc_type": "Sales Order", 
+ "docstatus": 0, 
+ "doctype": "Print Format", 
+ "html": "<!--\n\tSample Print Format for ERPNext\n\tPlease use at your own discretion\n\tFor suggestions and contributions:\n\t\thttps://github.com/frappe/erpnext-print-templates\n\n\tFreely usable under MIT license\n-->\n\n<!-- Style Settings -->\n<style>\n\t/*\n\t\tcommon style for whole page\n\t\tThis should include:\n\t\t+ page size related settings\n\t\t+ font family settings\n\t\t+ line spacing settings\n\t*/\n\t@media screen {\n\t\tbody {\n\t\t\twidth: 8.3in;\n\t\t}\n\t}\n\n\thtml, body, div, span, td {\n\t\tfont-family: \"Georgia\", serif;\n\t\tfont-size: 12px;\n\t}\n\n\tbody {\n\t\tpadding: 10px;\n\t\tmargin: auto;\n\t\tfont-size: 12px;\n\t}\n\n\t.common {\n\t\tfont-family: \"Georgia\", serif !important;\n\t\tfont-size: 12px;\n\t\tpadding: 10px 0px;\n\t}\n\n\ttable {\n\t\tborder-collapse: collapse;\n\t\twidth: 100%;\n\t\tvertical-align: top;\n\t}\n\n\ttable td {\n\t\tpadding: 2px 0px;\n\t}\n\t\n\ttable h1, h2, h3, h4, h5, h6 {\n\t\tpadding: 0px;\n\t\tmargin: 0px;\n\t}\n\n\ttable.header-table td {\n\t\tvertical-align: top;\n\t}\n\n\ttable.header-table thead {\n\t\tborder-bottom: 1px solid black;\n\t}\n\n\ttable.header-table h3 {\n\t\tcolor: gray;\n\t}\n\n\ttable.header-table thead td {\n\t\tpadding: 5px 0px;\n\t}\n\n\tdiv.page-body table td:nth-child(6),\n\tdiv.page-body table td:nth-child(7) {\n\t\ttext-align: right;\n\t}\n\n\ttable.footer-table td {\n\t\tvertical-align: top;\n\t}\n\n\ttable.footer-table td table td:nth-child(2),\n\ttable.footer-table td table td:nth-child(3) {\n\t\ttext-align: right;\n\t}\n</style>\n\n\n<!-- Javascript -->\n<script>\n\tsi_std = {\n\t\tprint_item_table: function() {\n\t\t\tvar table = print_table(\n\t\t\t\t'Sales Order',\n\t\t\t\tdoc.name,\n\t\t\t\t'sales_order_details',\n\t\t\t\t'Sales Order Item',\n\t\t\t\t[// Here specify the table columns to be displayed\n\t\t\t\t\t'SR', 'item_code', 'description', 'qty', 'stock_uom',\n\t\t\t\t\t'base_rate', 'amount'\n\t\t\t\t],\n\t\t\t\t[// Here specify the labels of column headings\n\t\t\t\t\t'Sr', 'Item Code', 'Description', 'Qty',\n\t\t\t\t\t'UoM', 'Basic Rate', 'Amount'\n\t\t\t\t],\n\t\t\t\t[// Here specify the column widths\n\t\t\t\t\t'3%', '20%', '37%', '5%',\n\t\t\t\t\t'5%', '15%', '15%'\n\t\t\t\t],\n\t\t\t\tnull,\n\t\t\t\tnull,\n\t\t\t\t{\n\t\t\t\t\t'description' : function(data_row) {\n\t\t\t\t\t\tif(data_row.discount_percentage) {\n\t\t\t\t\t\t\tvar to_append = '<div style=\"padding-left: 15px;\"><i>Discount: ' + \n\t\t\t\t\t\t\t\tdata_row.discount_percentage + '% on ' + \n\t\t\t\t\t\t\t\tformat_currency(data_row.price_list_rate, doc.currency) + '</i></div>';\n\t\t\t\t\t\t\tif(data_row.description.indexOf(to_append)==-1) {\n\t\t\t\t\t\t\t\treturn data_row.description + to_append;\n\t\t\t\t\t\t\t} else { return data_row.description; }\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\treturn data_row.description;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t);\n\n\t\t\t// This code takes care of page breaks\n\t\t\tif(table.appendChild) {\n\t\t\t\tout = table.innerHTML;\n\t\t\t} else {\n\t\t\t\tout = '';\n\t\t\t\tfor(var i=0; i < (table.length-1); i++) {\n\t\t\t\t\tout += table[i].innerHTML + \n\t\t\t\t\t\t'<div style = \"page-break-after: always;\" \\\n\t\t\t\t\t\tclass = \"page_break\"></div>\\\n\t\t\t\t\t\t<div class=\"page-settings\"></div>';\n\t\t\t\t}\n\t\t\t\tout += table[table.length-1].innerHTML;\n\t\t\t}\n\t\t\treturn out;\n\t\t},\n\n\n\t\tprint_other_charges: function(parent) {\n\t\t\tvar oc = getchildren('Sales Taxes and Charges', doc.name, 'other_charges');\n\t\t\tvar rows = '<table width=100%>\\n';\n\t\t\tfor(var i=0; i<oc.length; i++) {\n\t\t\t\tif(!oc[i].included_in_print_rate) {\n\t\t\t\t\trows +=\n\t\t\t\t\t\t'<tr>\\n' +\n\t\t\t\t\t\t\t'\\t<td>' + oc[i].description + '</td>\\n' +\n\t\t\t\t\t\t\t'\\t<td style=\"width: 38%; text-align: right;\">' + format_currency(oc[i].tax_amount/doc.conversion_rate, doc.currency) + '</td>\\n' +\n\t\t\t\t\t\t'</tr>\\n';\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(doc.discount_amount) {\n\t\t\t\trows += '<tr>\\n' + \n\t\t\t\t\t\t'\\t<td>Discount Amount</td>\\n' + \n\t\t\t\t\t\t'\\t<td style=\"width: 38%; text-align: right;\">' + format_currency(doc.discount_amount, doc.currency) + '</td>\\n' + \n\t\t\t\t\t'</tr>\\n';\n\t\t\t}\n\n\t\t\treturn rows + '</table>\\n';\n\t\t}\n\t};\n</script>\n\n\n<!-- Page Layout Settings -->\n<div class='common page-header'>\n\t<!-- \n\t\tPage Header will contain\n\t\t\t+ table 1\n\t\t\t\t+ table 1a\n\t\t\t\t\t- Name\n\t\t\t\t\t- Address\n\t\t\t\t\t- Contact\n\t\t\t\t\t- Mobile No\n\t\t\t\t+ table 1b\n\t\t\t\t\t- Voucher Date\n\t\t\t\t\t- Due Date\n\t-->\n\t<table class='header-table' cellspacing=0>\n\t\t<thead>\n\t\t\t<tr><td><script>'<h1>' + (doc.select_print_heading || 'Sales Order') + '</h1>'</script></td></tr>\n\t\t\t<tr><td><h3><script>cur_frm.docname</script></h3></td></tr>\n\t\t</thead>\n\t\t<tbody>\n\t\t\t<tr>\n\t\t\t\t<td width=60%><table width=100% cellspacing=0><tbody>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td width=39%><b>Name</b></td>\n\t\t\t\t\t\t<td><script>doc.customer_name</script></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><b>Address</b></td>\n\t\t\t\t\t\t<td><script>replace_newlines(doc.address_display)</script></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><b>Contact</b></td>\n\t\t\t\t\t\t<td><script>doc.contact_display</script></td>\n\t\t\t\t\t</tr>\n\t\t\t\t</tbody></table></td>\n\t\t\t\t<td><table width=100% cellspacing=0><tbody>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td width=63%><b>Sales Order Date</b></td>\n\t\t\t\t\t\t<td><script>date.str_to_user(doc.transaction_date)</script></td>\n\t\t\t\t\t<tr>\t\t\t\t\t\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><b>Delivery Date</b></td>\n\t\t\t\t\t\t<td><script>date.str_to_user(doc.delivery_date)</script></td>\n\t\t\t\t\t<tr>\t\t\t\t\t\n\t\t\t\t</tbody></table></td>\n\t\t\t</tr>\n\t\t</tbody>\n\t\t<tfoot>\n\t\t\n\t\t</tfoot>\n\t</table>\n</div>\n<div class='common page-body'>\n\t<!-- \n\t\tPage Body will contain\n\t\t\t+ table 2\n\t\t\t\t- Sales Invoice Data\n\t-->\n\t<script>si_std.print_item_table()</script>\n</div>\n<div class='common page-footer'>\n\t<!-- \n\t\tPage Footer will contain\n\t\t\t+ table 3\n\t\t\t\t- Terms and Conditions\n\t\t\t\t- Total Rounded Amount Calculation\n\t\t\t\t- Total Rounded Amount in Words\n\t-->\n\t<table class='footer-table' width=100% cellspacing=0>\n\t\t<thead>\n\t\t\t\n\t\t</thead>\n\t\t<tbody>\n\t\t\t<tr>\n\t\t\t\t<td width=60% style='padding-right: 10px;'>\n\t\t\t\t\t<b>Terms, Conditions &amp; Other Information:</b><br />\n\t\t\t\t\t<script>doc.terms</script>\n\t\t\t\t</td>\n\t\t\t\t<td>\n\t\t\t\t\t<table cellspacing=0 width=100%><tbody>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td>Net Total</td>\n\t\t\t\t\t\t\t<td style=\"width: 38%; text-align: right;\"><script>\n\t\t\t\t\t\t\t\tformat_currency(doc.net_total_export, doc.currency)\n\t\t\t\t\t\t\t</script></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr><td colspan=3><script>si_std.print_other_charges()</script></td></tr>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td>Grand Total</td>\n\t\t\t\t\t\t\t<td style=\"width: 38%; text-align: right;\"><script>\n\t\t\t\t\t\t\t\tformat_currency(doc.grand_total_export, doc.currency)\n\t\t\t\t\t\t\t</script></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr style='font-weight: bold'>\n\t\t\t\t\t\t\t<td>Rounded Total</td>\n\t\t\t\t\t\t\t<td style=\"width: 38%; text-align: right;\"><script>\n\t\t\t\t\t\t\t\tformat_currency(doc.rounded_total_export, doc.currency)\n\t\t\t\t\t\t\t</script></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t</tbody></table>\n\t\t\t\t\t<br /><b>In Words</b><br />\n\t\t\t\t\t<i><script>doc.in_words_export</script></i>\n\t\t\t\t</td>\n\t\t\t</tr>\t\t\n\t\t</tbody>\n\t\t<tfoot>\n\t\t\n\t\t</tfoot>\n\t</table>\n</div>", 
+ "idx": 1, 
+ "modified": "2014-02-11 17:35:51", 
+ "modified_by": "Administrator", 
+ "module": "Selling", 
+ "name": "Sales Order Classic", 
+ "owner": "Administrator", 
+ "print_format_type": "Client", 
+ "standard": "Yes"
+}
\ No newline at end of file
diff --git a/erpnext/selling/Print Format/Sales Order Modern/Sales Order Modern.txt b/erpnext/selling/Print Format/Sales Order Modern/Sales Order Modern.txt
index a901ae2..1a7432c 100644
--- a/erpnext/selling/Print Format/Sales Order Modern/Sales Order Modern.txt
+++ b/erpnext/selling/Print Format/Sales Order Modern/Sales Order Modern.txt
@@ -1,22 +1,15 @@
-[
- {
-  "creation": "2013-04-19 13:30:51", 
-  "docstatus": 0, 
-  "modified": "2014-02-11 17:34:24", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "doc_type": "Sales Order", 
-  "doctype": "Print Format", 
-  "html": "<!--\n\tSample Print Format for ERPNext\n\tPlease use at your own discretion\n\tFor suggestions and contributions:\n\t\thttps://github.com/frappe/erpnext-print-templates\n\n\tFreely usable under MIT license\n-->\n\n<!-- Style Settings -->\n<style>\n\t/*\n\t\tcommon style for whole page\n\t\tThis should include:\n\t\t+ page size related settings\n\t\t+ font family settings\n\t\t+ line spacing settings\n\t*/\n\t@media screen {\n\t\tbody {\n\t\t\twidth: 8.3in;\n\t\t}\n\t}\n\n\thtml, body, div, span, td {\n\t\tfont-family: \"Helvetica\", \"Arial\", sans-serif;\n\t\tfont-size: 12px;\n\t}\n\n\tbody {\n\t\tpadding: 10px;\n\t\tmargin: auto;\n\t\tfont-size: 12px;\n        line-height: 150%;\n\t}\n\n\t.common {\n\t\tfont-family: \"Helvetica\", \"Arial\", sans-serif !important;\n\t\tfont-size: 12px;\n\t\tpadding: 10px 0px;\n\t}\n\n\ttable {\n\t\tborder-collapse: collapse;\n\t\twidth: 100%;\n\t\tvertical-align: top;\n\t\tborder-style: none !important;\n\t}\n\n\ttable td {\n\t\tpadding: 2px 0px;\n\t\tborder-style: none !important;\n\t}\n\t\n\ttable h1, h2, h3, h4, h5, h6 {\n\t\tpadding: 0px;\n\t\tmargin: 0px;\n\t}\n\n\ttable.header-table td {\n\t\tvertical-align: top;\n\t}\n\n\ttable.header-table h1 {\n\t\ttext-transform: uppercase;\n\t\tcolor: white;\n\t\tfont-size: 55px;\n\t\tfont-style: italic;\n\t}\n\n\ttable.header-table thead tr:nth-child(1) div {\n\t\theight: 24px;\n\t\tbackground-color: #696969;\n\t\tvertical-align: middle;\n\t\tpadding: 12px 0px 0px 0px;\n\t\twidth: 100%;\n\t}\n\n\tdiv.page-body table td:nth-child(6),\n\tdiv.page-body table td:nth-child(7) {\n\t\ttext-align: right;\n\t}\n\n\tdiv.page-body table tr td {\n\t\tbackground-color: #DCDCDC !important;\n\t}\n\n\tdiv.page-body table tr:nth-child(1) td {\n\t\tbackground-color: #696969 !important;\n\t\tcolor: white !important;\n\t}\n\n\ttable.footer-table td {\n\t\tvertical-align: top;\n\t}\n\n\ttable.footer-table td table td:nth-child(2),\n\ttable.footer-table td table td:nth-child(3) {\n\t\ttext-align: right;\n\t}\n\n\ttable.footer-table tfoot td {\n\t\tbackground-color: #696969;\n\t\theight: 10px;\n\t}\n\n\t.imp-details {\n\t\tbackground-color: #DCDCDC;\n\t}\n</style>\n\n\n<!-- Javascript -->\n<script>\n\tsi_std = {\n\t\tprint_item_table: function() {\n\t\t\tvar table = print_table(\n\t\t\t\t'Sales Order',\n\t\t\t\tdoc.name,\n\t\t\t\t'sales_order_details',\n\t\t\t\t'Sales Order Item',\n\t\t\t\t[// Here specify the table columns to be displayed\n\t\t\t\t\t'SR', 'item_code', 'description', 'qty', 'stock_uom',\n\t\t\t\t\t'base_rate', 'amount'\n\t\t\t\t],\n\t\t\t\t[// Here specify the labels of column headings\n\t\t\t\t\t'Sr', 'Item Code', 'Description', 'Qty',\n\t\t\t\t\t'UoM', 'Basic Rate', 'Amount'\n\t\t\t\t],\n\t\t\t\t[// Here specify the column widths\n\t\t\t\t\t'3%', '20%', '37%', '5%',\n\t\t\t\t\t'5%', '15%', '15%'\n\t\t\t\t],\n\t\t\t\tnull,\n\t\t\t\tnull,\n\t\t\t\t{\n\t\t\t\t\t'description' : function(data_row) {\n\t\t\t\t\t\tif(data_row.discount_percentage) {\n\t\t\t\t\t\t\tvar to_append = '<div style=\"padding-left: 15px;\"><i>Discount: ' + \n\t\t\t\t\t\t\t\tdata_row.discount_percentage + '% on ' + \n\t\t\t\t\t\t\t\tformat_currency(data_row.price_list_rate, doc.currency) + '</i></div>';\n\t\t\t\t\t\t\tif(data_row.description.indexOf(to_append)==-1) {\n\t\t\t\t\t\t\t\treturn data_row.description + to_append;\n\t\t\t\t\t\t\t} else { return data_row.description; }\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\treturn data_row.description;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t);\n\n\t\t\t// This code takes care of page breaks\n\t\t\tif(table.appendChild) {\n\t\t\t\tout = table.innerHTML;\n\t\t\t} else {\n\t\t\t\tout = '';\n\t\t\t\tfor(var i=0; i < (table.length-1); i++) {\n\t\t\t\t\tout += table[i].innerHTML + \n\t\t\t\t\t\t'<div style = \"page-break-after: always;\" \\\n\t\t\t\t\t\tclass = \"page_break\"></div>\\\n\t\t\t\t\t\t<div class=\"page-settings\"></div>';\n\t\t\t\t}\n\t\t\t\tout += table[table.length-1].innerHTML;\n\t\t\t}\n\t\t\treturn out;\n\t\t},\n\n\n\t\tprint_other_charges: function(parent) {\n\t\t\tvar oc = getchildren('Sales Taxes and Charges', doc.name, 'other_charges');\n\t\t\tvar rows = '<table width=100%>\\n';\n\t\t\tfor(var i=0; i<oc.length; i++) {\n\t\t\t\tif(!oc[i].included_in_print_rate) {\n\t\t\t\t\trows +=\n\t\t\t\t\t\t'<tr>\\n' +\n\t\t\t\t\t\t\t'\\t<td>' + oc[i].description + '</td>\\n' +\n\t\t\t\t\t\t\t'\\t<td style=\"width: 38%; text-align: right;\">' + format_currency(oc[i].tax_amount/doc.conversion_rate, doc.currency) + '</td>\\n' +\n\t\t\t\t\t\t'</tr>\\n';\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(doc.discount_amount) {\n\t\t\t\trows += '<tr>\\n' + \n\t\t\t\t\t\t'\\t<td>Discount Amount</td>\\n' + \n\t\t\t\t\t\t'\\t<td style=\"width: 38%; text-align: right;\">' + format_currency(doc.discount_amount, doc.currency) + '</td>\\n' + \n\t\t\t\t\t'</tr>\\n';\n\t\t\t}\n\n\t\t\treturn rows + '</table>\\n';\n\t\t}\n\t};\n</script>\n\n\n<!-- Page Layout Settings -->\n<div class='common page-header'>\n\t<!-- \n\t\tPage Header will contain\n\t\t\t+ table 1\n\t\t\t\t+ table 1a\n\t\t\t\t\t- Name\n\t\t\t\t\t- Address\n\t\t\t\t\t- Contact\n\t\t\t\t\t- Mobile No\n\t\t\t\t+ table 1b\n\t\t\t\t\t- Voucher Date\n\t\t\t\t\t- Due Date\n\t-->\n\t<table class='header-table' cellspacing=0>\n\t\t<thead>\n\t\t\t<tr><td colspan=2><div><script>'<h1>' + (doc.select_print_heading || 'Sales Order') + '</h1>'</script></div></td></tr>\n\t\t\t<tr><td colspan=2><div style=\"height:15px\"></div></td></tr>\n\t\t</thead>\n\t\t<tbody>\n\t\t\t<tr>\n\t\t\t\t<td width=60%><table width=100% cellspacing=0><tbody>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td width=39%><b>Name</b></td>\n\t\t\t\t\t\t<td><script>doc.customer_name</script></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><b>Address</b></td>\n\t\t\t\t\t\t<td><script>replace_newlines(doc.address_display)</script></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><b>Contact</b></td>\n\t\t\t\t\t\t<td><script>doc.contact_display</script></td>\n\t\t\t\t\t</tr>\n\t\t\t\t</tbody></table></td>\n\t\t\t\t<td><table width=100% cellspacing=0><tbody>\n\t\t\t\t\t<tr class='imp-details'>\n\t\t\t\t\t\t<td><b>Sales Order No.</b></td>\n\t\t\t\t\t\t<td><script>cur_frm.docname</script></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td width=63%><b>Sales Order Date</b></td>\n\t\t\t\t\t\t<td><script>date.str_to_user(doc.transaction_date)</script></td>\n\t\t\t\t\t<tr>\t\t\t\t\t\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><b>Delivery Date</b></td>\n\t\t\t\t\t\t<td><script>date.str_to_user(doc.delivery_date)</script></td>\n\t\t\t\t\t<tr>\t\t\t\t\t\n\t\t\t\t</tbody></table></td>\n\t\t\t</tr>\n\t\t</tbody>\n\t\t<tfoot>\n\t\t\n\t\t</tfoot>\n\t</table>\n</div>\n<div class='common page-body'>\n\t<!-- \n\t\tPage Body will contain\n\t\t\t+ table 2\n\t\t\t\t- Sales Invoice Data\n\t-->\n\t<script>si_std.print_item_table()</script>\n</div>\n<div class='common page-footer'>\n\t<!-- \n\t\tPage Footer will contain\n\t\t\t+ table 3\n\t\t\t\t- Terms and Conditions\n\t\t\t\t- Total Rounded Amount Calculation\n\t\t\t\t- Total Rounded Amount in Words\n\t-->\n\t<table class='footer-table' width=100% cellspacing=0>\n\t\t<thead>\n\t\t\t\n\t\t</thead>\n\t\t<tbody>\n\t\t\t<tr>\n\t\t\t\t<td width=60% style='padding-right: 10px;'>\n\t\t\t\t\t<b>Terms, Conditions &amp; Other Information:</b><br />\n\t\t\t\t\t<script>doc.terms</script>\n\t\t\t\t</td>\n\t\t\t\t<td>\n\t\t\t\t\t<table cellspacing=0 width=100%><tbody>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td>Net Total</td>\n\t\t\t\t\t\t\t<td style=\"width: 38%; text-align: right;\"><script>\n\t\t\t\t\t\t\t\tformat_currency(doc.net_total_export, doc.currency)\n\t\t\t\t\t\t\t</script></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr><td colspan=3><script>si_std.print_other_charges()</script></td></tr>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td>Grand Total</td>\n\t\t\t\t\t\t\t<td style=\"width: 38%; text-align: right;\"><script>\n\t\t\t\t\t\t\t\tformat_currency(doc.grand_total_export, doc.currency)\n\t\t\t\t\t\t\t</script></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr style='font-weight: bold' class='imp-details'>\n\t\t\t\t\t\t\t<td>Rounded Total</td>\n\t\t\t\t\t\t\t<td style=\"width: 38%; text-align: right;\"><script>\n\t\t\t\t\t\t\t\tformat_currency(doc.rounded_total_export, doc.currency)\n\t\t\t\t\t\t\t</script></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t</tbody></table>\n\t\t\t\t\t<br /><b>In Words</b><br />\n\t\t\t\t\t<i><script>doc.in_words_export</script></i>\n\t\t\t\t</td>\n\t\t\t</tr>\t\t\n\t\t</tbody>\n\t\t<tfoot>\n\t\t\t<tr><td colspan=2><div></div></td><tr>\n\t\t</tfoot>\n\t</table>\n</div>", 
-  "module": "Selling", 
-  "name": "__common__", 
-  "print_format_type": "Client", 
-  "standard": "Yes"
- }, 
- {
-  "doctype": "Print Format", 
-  "name": "Sales Order Modern"
- }
-]
\ No newline at end of file
+{
+ "creation": "2013-04-19 13:30:51", 
+ "doc_type": "Sales Order", 
+ "docstatus": 0, 
+ "doctype": "Print Format", 
+ "html": "<!--\n\tSample Print Format for ERPNext\n\tPlease use at your own discretion\n\tFor suggestions and contributions:\n\t\thttps://github.com/frappe/erpnext-print-templates\n\n\tFreely usable under MIT license\n-->\n\n<!-- Style Settings -->\n<style>\n\t/*\n\t\tcommon style for whole page\n\t\tThis should include:\n\t\t+ page size related settings\n\t\t+ font family settings\n\t\t+ line spacing settings\n\t*/\n\t@media screen {\n\t\tbody {\n\t\t\twidth: 8.3in;\n\t\t}\n\t}\n\n\thtml, body, div, span, td {\n\t\tfont-family: \"Helvetica\", \"Arial\", sans-serif;\n\t\tfont-size: 12px;\n\t}\n\n\tbody {\n\t\tpadding: 10px;\n\t\tmargin: auto;\n\t\tfont-size: 12px;\n        line-height: 150%;\n\t}\n\n\t.common {\n\t\tfont-family: \"Helvetica\", \"Arial\", sans-serif !important;\n\t\tfont-size: 12px;\n\t\tpadding: 10px 0px;\n\t}\n\n\ttable {\n\t\tborder-collapse: collapse;\n\t\twidth: 100%;\n\t\tvertical-align: top;\n\t\tborder-style: none !important;\n\t}\n\n\ttable td {\n\t\tpadding: 2px 0px;\n\t\tborder-style: none !important;\n\t}\n\t\n\ttable h1, h2, h3, h4, h5, h6 {\n\t\tpadding: 0px;\n\t\tmargin: 0px;\n\t}\n\n\ttable.header-table td {\n\t\tvertical-align: top;\n\t}\n\n\ttable.header-table h1 {\n\t\ttext-transform: uppercase;\n\t\tcolor: white;\n\t\tfont-size: 55px;\n\t\tfont-style: italic;\n\t}\n\n\ttable.header-table thead tr:nth-child(1) div {\n\t\theight: 24px;\n\t\tbackground-color: #696969;\n\t\tvertical-align: middle;\n\t\tpadding: 12px 0px 0px 0px;\n\t\twidth: 100%;\n\t}\n\n\tdiv.page-body table td:nth-child(6),\n\tdiv.page-body table td:nth-child(7) {\n\t\ttext-align: right;\n\t}\n\n\tdiv.page-body table tr td {\n\t\tbackground-color: #DCDCDC !important;\n\t}\n\n\tdiv.page-body table tr:nth-child(1) td {\n\t\tbackground-color: #696969 !important;\n\t\tcolor: white !important;\n\t}\n\n\ttable.footer-table td {\n\t\tvertical-align: top;\n\t}\n\n\ttable.footer-table td table td:nth-child(2),\n\ttable.footer-table td table td:nth-child(3) {\n\t\ttext-align: right;\n\t}\n\n\ttable.footer-table tfoot td {\n\t\tbackground-color: #696969;\n\t\theight: 10px;\n\t}\n\n\t.imp-details {\n\t\tbackground-color: #DCDCDC;\n\t}\n</style>\n\n\n<!-- Javascript -->\n<script>\n\tsi_std = {\n\t\tprint_item_table: function() {\n\t\t\tvar table = print_table(\n\t\t\t\t'Sales Order',\n\t\t\t\tdoc.name,\n\t\t\t\t'sales_order_details',\n\t\t\t\t'Sales Order Item',\n\t\t\t\t[// Here specify the table columns to be displayed\n\t\t\t\t\t'SR', 'item_code', 'description', 'qty', 'stock_uom',\n\t\t\t\t\t'base_rate', 'amount'\n\t\t\t\t],\n\t\t\t\t[// Here specify the labels of column headings\n\t\t\t\t\t'Sr', 'Item Code', 'Description', 'Qty',\n\t\t\t\t\t'UoM', 'Basic Rate', 'Amount'\n\t\t\t\t],\n\t\t\t\t[// Here specify the column widths\n\t\t\t\t\t'3%', '20%', '37%', '5%',\n\t\t\t\t\t'5%', '15%', '15%'\n\t\t\t\t],\n\t\t\t\tnull,\n\t\t\t\tnull,\n\t\t\t\t{\n\t\t\t\t\t'description' : function(data_row) {\n\t\t\t\t\t\tif(data_row.discount_percentage) {\n\t\t\t\t\t\t\tvar to_append = '<div style=\"padding-left: 15px;\"><i>Discount: ' + \n\t\t\t\t\t\t\t\tdata_row.discount_percentage + '% on ' + \n\t\t\t\t\t\t\t\tformat_currency(data_row.price_list_rate, doc.currency) + '</i></div>';\n\t\t\t\t\t\t\tif(data_row.description.indexOf(to_append)==-1) {\n\t\t\t\t\t\t\t\treturn data_row.description + to_append;\n\t\t\t\t\t\t\t} else { return data_row.description; }\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\treturn data_row.description;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t);\n\n\t\t\t// This code takes care of page breaks\n\t\t\tif(table.appendChild) {\n\t\t\t\tout = table.innerHTML;\n\t\t\t} else {\n\t\t\t\tout = '';\n\t\t\t\tfor(var i=0; i < (table.length-1); i++) {\n\t\t\t\t\tout += table[i].innerHTML + \n\t\t\t\t\t\t'<div style = \"page-break-after: always;\" \\\n\t\t\t\t\t\tclass = \"page_break\"></div>\\\n\t\t\t\t\t\t<div class=\"page-settings\"></div>';\n\t\t\t\t}\n\t\t\t\tout += table[table.length-1].innerHTML;\n\t\t\t}\n\t\t\treturn out;\n\t\t},\n\n\n\t\tprint_other_charges: function(parent) {\n\t\t\tvar oc = getchildren('Sales Taxes and Charges', doc.name, 'other_charges');\n\t\t\tvar rows = '<table width=100%>\\n';\n\t\t\tfor(var i=0; i<oc.length; i++) {\n\t\t\t\tif(!oc[i].included_in_print_rate) {\n\t\t\t\t\trows +=\n\t\t\t\t\t\t'<tr>\\n' +\n\t\t\t\t\t\t\t'\\t<td>' + oc[i].description + '</td>\\n' +\n\t\t\t\t\t\t\t'\\t<td style=\"width: 38%; text-align: right;\">' + format_currency(oc[i].tax_amount/doc.conversion_rate, doc.currency) + '</td>\\n' +\n\t\t\t\t\t\t'</tr>\\n';\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(doc.discount_amount) {\n\t\t\t\trows += '<tr>\\n' + \n\t\t\t\t\t\t'\\t<td>Discount Amount</td>\\n' + \n\t\t\t\t\t\t'\\t<td style=\"width: 38%; text-align: right;\">' + format_currency(doc.discount_amount, doc.currency) + '</td>\\n' + \n\t\t\t\t\t'</tr>\\n';\n\t\t\t}\n\n\t\t\treturn rows + '</table>\\n';\n\t\t}\n\t};\n</script>\n\n\n<!-- Page Layout Settings -->\n<div class='common page-header'>\n\t<!-- \n\t\tPage Header will contain\n\t\t\t+ table 1\n\t\t\t\t+ table 1a\n\t\t\t\t\t- Name\n\t\t\t\t\t- Address\n\t\t\t\t\t- Contact\n\t\t\t\t\t- Mobile No\n\t\t\t\t+ table 1b\n\t\t\t\t\t- Voucher Date\n\t\t\t\t\t- Due Date\n\t-->\n\t<table class='header-table' cellspacing=0>\n\t\t<thead>\n\t\t\t<tr><td colspan=2><div><script>'<h1>' + (doc.select_print_heading || 'Sales Order') + '</h1>'</script></div></td></tr>\n\t\t\t<tr><td colspan=2><div style=\"height:15px\"></div></td></tr>\n\t\t</thead>\n\t\t<tbody>\n\t\t\t<tr>\n\t\t\t\t<td width=60%><table width=100% cellspacing=0><tbody>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td width=39%><b>Name</b></td>\n\t\t\t\t\t\t<td><script>doc.customer_name</script></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><b>Address</b></td>\n\t\t\t\t\t\t<td><script>replace_newlines(doc.address_display)</script></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><b>Contact</b></td>\n\t\t\t\t\t\t<td><script>doc.contact_display</script></td>\n\t\t\t\t\t</tr>\n\t\t\t\t</tbody></table></td>\n\t\t\t\t<td><table width=100% cellspacing=0><tbody>\n\t\t\t\t\t<tr class='imp-details'>\n\t\t\t\t\t\t<td><b>Sales Order No.</b></td>\n\t\t\t\t\t\t<td><script>cur_frm.docname</script></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td width=63%><b>Sales Order Date</b></td>\n\t\t\t\t\t\t<td><script>date.str_to_user(doc.transaction_date)</script></td>\n\t\t\t\t\t<tr>\t\t\t\t\t\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><b>Delivery Date</b></td>\n\t\t\t\t\t\t<td><script>date.str_to_user(doc.delivery_date)</script></td>\n\t\t\t\t\t<tr>\t\t\t\t\t\n\t\t\t\t</tbody></table></td>\n\t\t\t</tr>\n\t\t</tbody>\n\t\t<tfoot>\n\t\t\n\t\t</tfoot>\n\t</table>\n</div>\n<div class='common page-body'>\n\t<!-- \n\t\tPage Body will contain\n\t\t\t+ table 2\n\t\t\t\t- Sales Invoice Data\n\t-->\n\t<script>si_std.print_item_table()</script>\n</div>\n<div class='common page-footer'>\n\t<!-- \n\t\tPage Footer will contain\n\t\t\t+ table 3\n\t\t\t\t- Terms and Conditions\n\t\t\t\t- Total Rounded Amount Calculation\n\t\t\t\t- Total Rounded Amount in Words\n\t-->\n\t<table class='footer-table' width=100% cellspacing=0>\n\t\t<thead>\n\t\t\t\n\t\t</thead>\n\t\t<tbody>\n\t\t\t<tr>\n\t\t\t\t<td width=60% style='padding-right: 10px;'>\n\t\t\t\t\t<b>Terms, Conditions &amp; Other Information:</b><br />\n\t\t\t\t\t<script>doc.terms</script>\n\t\t\t\t</td>\n\t\t\t\t<td>\n\t\t\t\t\t<table cellspacing=0 width=100%><tbody>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td>Net Total</td>\n\t\t\t\t\t\t\t<td style=\"width: 38%; text-align: right;\"><script>\n\t\t\t\t\t\t\t\tformat_currency(doc.net_total_export, doc.currency)\n\t\t\t\t\t\t\t</script></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr><td colspan=3><script>si_std.print_other_charges()</script></td></tr>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td>Grand Total</td>\n\t\t\t\t\t\t\t<td style=\"width: 38%; text-align: right;\"><script>\n\t\t\t\t\t\t\t\tformat_currency(doc.grand_total_export, doc.currency)\n\t\t\t\t\t\t\t</script></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr style='font-weight: bold' class='imp-details'>\n\t\t\t\t\t\t\t<td>Rounded Total</td>\n\t\t\t\t\t\t\t<td style=\"width: 38%; text-align: right;\"><script>\n\t\t\t\t\t\t\t\tformat_currency(doc.rounded_total_export, doc.currency)\n\t\t\t\t\t\t\t</script></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t</tbody></table>\n\t\t\t\t\t<br /><b>In Words</b><br />\n\t\t\t\t\t<i><script>doc.in_words_export</script></i>\n\t\t\t\t</td>\n\t\t\t</tr>\t\t\n\t\t</tbody>\n\t\t<tfoot>\n\t\t\t<tr><td colspan=2><div></div></td><tr>\n\t\t</tfoot>\n\t</table>\n</div>", 
+ "idx": 1, 
+ "modified": "2014-02-11 17:34:24", 
+ "modified_by": "Administrator", 
+ "module": "Selling", 
+ "name": "Sales Order Modern", 
+ "owner": "Administrator", 
+ "print_format_type": "Client", 
+ "standard": "Yes"
+}
\ No newline at end of file
diff --git a/erpnext/selling/Print Format/Sales Order Spartan/Sales Order Spartan.txt b/erpnext/selling/Print Format/Sales Order Spartan/Sales Order Spartan.txt
index 481da0d..1e51dd3 100644
--- a/erpnext/selling/Print Format/Sales Order Spartan/Sales Order Spartan.txt
+++ b/erpnext/selling/Print Format/Sales Order Spartan/Sales Order Spartan.txt
@@ -1,22 +1,15 @@
-[
- {
-  "creation": "2013-04-19 13:30:51", 
-  "docstatus": 0, 
-  "modified": "2014-02-11 17:35:29", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "doc_type": "Sales Order", 
-  "doctype": "Print Format", 
-  "html": "<!--\n\tSample Print Format for ERPNext\n\tPlease use at your own discretion\n\tFor suggestions and contributions:\n\t\thttps://github.com/frappe/erpnext-print-templates\n\n\tFreely usable under MIT license\n-->\n\n<!-- Style Settings -->\n<style>\n\t/*\n\t\tcommon style for whole page\n\t\tThis should include:\n\t\t+ page size related settings\n\t\t+ font family settings\n\t\t+ line spacing settings\n\t*/\n\t@media screen {\n\t\tbody {\n\t\t\twidth: 8.3in;\n\t\t}\n\t}\n\n\thtml, body, div, span, td {\n\t\tfont-family: \"Arial\", sans-serif;\n\t\tfont-size: 12px;\n\t}\n\n\tbody {\n\t\tpadding: 10px;\n\t\tmargin: auto;\n\t\tfont-size: 12px;\n\t}\n\n\t.common {\n\t\tfont-family: \"Arial\", sans-serif !important;\n\t\tfont-size: 12px;\n\t\tpadding: 0px;\n\t}\n\n\ttable {\n\t\twidth: 100% !important;\n\t\tvertical-align: top;\n\t}\n\n\ttable td {\n\t\tpadding: 2px 0px;\n\t}\n\n\ttable, td {\n\t\tborder-collapse: collapse !important;\n\t\tpadding: 0px;\n\t\tmargin: 0px !important;\n\t}\n\t\n\ttable h1, h2, h3, h4, h5, h6 {\n\t\tpadding: 0px;\n\t\tmargin: 0px;\n\t}\n\n\ttable.header-table td {\n\t\tvertical-align: top;\n\t}\n\n\ttable.header-table h3 {\n\t\tcolor: gray;\n\t}\n\n\ttable.header-table thead td {\n\t\tpadding: 5px;\n\t}\n\n\ttable.header-table > thead,\n\ttable.header-table > tbody > tr > td,\n\ttable.footer-table > tbody > tr > td {\n\t\tborder: 1px solid black;\n\t\tpadding: 5px;\n\t}\n\n\ttable.footer-table > tbody,\n\ttable.header-table > thead {\n\t\tborder-bottom: 3px solid black;\n\t}\n\n\ttable.header-table > thead {\n\t\tborder-top: 3px solid black;\n\t}\n\n\tdiv.page-body table td:nth-child(6),\n\tdiv.page-body table td:nth-child(7) {\n\t\ttext-align: right;\n\t}\n\n\tdiv.page-body td {\n\t\tbackground-color: white !important;\n\t\tborder: 1px solid black !important;\n\t}\n\n\ttable.footer-table td {\n\t\tvertical-align: top;\n\t}\n\n\ttable.footer-table td table td:nth-child(2),\n\ttable.footer-table td table td:nth-child(3) {\n\t\ttext-align: right;\n\t}\n</style>\n\n\n<!-- Javascript -->\n<script>\n\tsi_std = {\n\t\tprint_item_table: function() {\n\t\t\tvar table = print_table(\n\t\t\t\t'Sales Order',\n\t\t\t\tdoc.name,\n\t\t\t\t'sales_order_details',\n\t\t\t\t'Sales Order Item',\n\t\t\t\t[// Here specify the table columns to be displayed\n\t\t\t\t\t'SR', 'item_code', 'description', 'qty', 'stock_uom',\n\t\t\t\t\t'base_rate', 'amount'\n\t\t\t\t],\n\t\t\t\t[// Here specify the labels of column headings\n\t\t\t\t\t'Sr', 'Item Code', 'Description', 'Qty',\n\t\t\t\t\t'UoM', 'Basic Rate', 'Amount'\n\t\t\t\t],\n\t\t\t\t[// Here specify the column widths\n\t\t\t\t\t'3%', '20%', '37%', '5%',\n\t\t\t\t\t'5%', '15%', '15%'\n\t\t\t\t],\n\t\t\t\tnull,\n\t\t\t\tnull,\n\t\t\t\t{\n\t\t\t\t\t'description' : function(data_row) {\n\t\t\t\t\t\tif(data_row.discount_percentage) {\n\t\t\t\t\t\t\tvar to_append = '<div style=\"padding-left: 15px;\"><i>Discount: ' + \n\t\t\t\t\t\t\t\tdata_row.discount_percentage + '% on ' + \n\t\t\t\t\t\t\t\tformat_currency(data_row.price_list_rate, doc.currency) + '</i></div>';\n\t\t\t\t\t\t\tif(data_row.description.indexOf(to_append)==-1) {\n\t\t\t\t\t\t\t\treturn data_row.description + to_append;\n\t\t\t\t\t\t\t} else { return data_row.description; }\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\treturn data_row.description;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t);\n\n\t\t\t// This code takes care of page breaks\n\t\t\tif(table.appendChild) {\n\t\t\t\tout = table.innerHTML;\n\t\t\t} else {\n\t\t\t\tout = '';\n\t\t\t\tfor(var i=0; i < (table.length-1); i++) {\n\t\t\t\t\tout += table[i].innerHTML + \n\t\t\t\t\t\t'<div style = \"page-break-after: always;\" \\\n\t\t\t\t\t\tclass = \"page_break\"></div>\\\n\t\t\t\t\t\t<div class=\"page-settings\"></div>';\n\t\t\t\t}\n\t\t\t\tout += table[table.length-1].innerHTML;\n\t\t\t}\n\t\t\treturn out;\n\t\t},\n\n\n\t\tprint_other_charges: function(parent) {\n\t\t\tvar oc = getchildren('Sales Taxes and Charges', doc.name, 'other_charges');\n\t\t\tvar rows = '<table width=100%>\\n';\n\t\t\tfor(var i=0; i<oc.length; i++) {\n\t\t\t\tif(!oc[i].included_in_print_rate) {\n\t\t\t\t\trows +=\n\t\t\t\t\t\t'<tr>\\n' +\n\t\t\t\t\t\t\t'\\t<td>' + oc[i].description + '</td>\\n' +\n\t\t\t\t\t\t\t'\\t<td style=\"width: 38%; text-align: right;\">' + format_currency(oc[i].tax_amount/doc.conversion_rate, doc.currency) + '</td>\\n' +\n\t\t\t\t\t\t'</tr>\\n';\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(doc.discount_amount) {\n\t\t\t\trows += '<tr>\\n' + \n\t\t\t\t\t\t'\\t<td>Discount Amount</td>\\n' + \n\t\t\t\t\t\t'\\t<td style=\"width: 38%; text-align: right;\">' + format_currency(doc.discount_amount, doc.currency) + '</td>\\n' + \n\t\t\t\t\t'</tr>\\n';\n\t\t\t}\n\n\t\t\treturn rows + '</table>\\n';\n\t\t}\n\t};\n</script>\n\n\n<!-- Page Layout Settings -->\n<div class='common page-header'>\n\t<!-- \n\t\tPage Header will contain\n\t\t\t+ table 1\n\t\t\t\t+ table 1a\n\t\t\t\t\t- Name\n\t\t\t\t\t- Address\n\t\t\t\t\t- Contact\n\t\t\t\t\t- Mobile No\n\t\t\t\t+ table 1b\n\t\t\t\t\t- Voucher Date\n\t\t\t\t\t- Due Date\n\t-->\n\t<table class='header-table' cellspacing=0>\n\t\t<thead>\n\t\t\t<tr><td colspan=2><script>'<h1>' + (doc.select_print_heading || 'Sales Order') + '</h1>'</script></td></tr>\n\t\t\t<tr><td colspan=2><h3><script>cur_frm.docname</script></h3></td></tr>\n\t\t</thead>\n\t\t<tbody>\n\t\t\t<tr>\n\t\t\t\t<td width=60%><table width=100% cellspacing=0><tbody>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td width=39%><b>Name</b></td>\n\t\t\t\t\t\t<td><script>doc.customer_name</script></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><b>Address</b></td>\n\t\t\t\t\t\t<td><script>replace_newlines(doc.address_display)</script></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><b>Contact</b></td>\n\t\t\t\t\t\t<td><script>doc.contact_display</script></td>\n\t\t\t\t\t</tr>\n\t\t\t\t</tbody></table></td>\n\t\t\t\t<td><table width=100% cellspacing=0><tbody>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td width=63%><b>Sales Order Date</b></td>\n\t\t\t\t\t\t<td><script>date.str_to_user(doc.transaction_date)</script></td>\n\t\t\t\t\t<tr>\t\t\t\t\t\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><b>Delivery Date</b></td>\n\t\t\t\t\t\t<td><script>date.str_to_user(doc.delivery_date)</script></td>\n\t\t\t\t\t<tr>\t\t\t\t\t\n\t\t\t\t</tbody></table></td>\n\t\t\t</tr>\n\t\t</tbody>\n\t\t<tfoot>\n\t\t\n\t\t</tfoot>\n\t</table>\n</div>\n<div class='common page-body'>\n\t<!-- \n\t\tPage Body will contain\n\t\t\t+ table 2\n\t\t\t\t- Sales Invoice Data\n\t-->\n\t<script>si_std.print_item_table()</script>\n</div>\n<div class='common page-footer'>\n\t<!-- \n\t\tPage Footer will contain\n\t\t\t+ table 3\n\t\t\t\t- Terms and Conditions\n\t\t\t\t- Total Rounded Amount Calculation\n\t\t\t\t- Total Rounded Amount in Words\n\t-->\n\t<table class='footer-table' width=100% cellspacing=0>\n\t\t<thead>\n\t\t\t\n\t\t</thead>\n\t\t<tbody>\n\t\t\t<tr>\n\t\t\t\t<td width=60% style='padding-right: 10px;'>\n\t\t\t\t\t<b>Terms, Conditions &amp; Other Information:</b><br />\n\t\t\t\t\t<script>doc.terms</script>\n\t\t\t\t</td>\n\t\t\t\t<td>\n\t\t\t\t\t<table cellspacing=0 width=100%><tbody>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td>Net Total</td>\n\t\t\t\t\t\t\t<td style=\"width: 38%; text-align: right;\"><script>\n\t\t\t\t\t\t\t\tformat_currency(doc.net_total_export, doc.currency)\n\t\t\t\t\t\t\t</script></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr><td colspan=3><script>si_std.print_other_charges()</script></td></tr>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td>Grand Total</td>\n\t\t\t\t\t\t\t<td style=\"width: 38%; text-align: right;\"><script>\n\t\t\t\t\t\t\t\tformat_currency(doc.grand_total_export, doc.currency)\n\t\t\t\t\t\t\t</script></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr style='font-weight: bold'>\n\t\t\t\t\t\t\t<td>Rounded Total</td>\n\t\t\t\t\t\t\t<td style=\"width: 38%; text-align: right;\"><script>\n\t\t\t\t\t\t\t\tformat_currency(doc.rounded_total_export, doc.currency)\n\t\t\t\t\t\t\t</script></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t</tbody></table>\n\t\t\t\t\t<br /><b>In Words</b><br />\n\t\t\t\t\t<i><script>doc.in_words_export</script></i>\n\t\t\t\t</td>\n\t\t\t</tr>\t\t\n\t\t</tbody>\n\t\t<tfoot>\n\t\t\n\t\t</tfoot>\n\t</table>\n</div>", 
-  "module": "Selling", 
-  "name": "__common__", 
-  "print_format_type": "Client", 
-  "standard": "Yes"
- }, 
- {
-  "doctype": "Print Format", 
-  "name": "Sales Order Spartan"
- }
-]
\ No newline at end of file
+{
+ "creation": "2013-04-19 13:30:51", 
+ "doc_type": "Sales Order", 
+ "docstatus": 0, 
+ "doctype": "Print Format", 
+ "html": "<!--\n\tSample Print Format for ERPNext\n\tPlease use at your own discretion\n\tFor suggestions and contributions:\n\t\thttps://github.com/frappe/erpnext-print-templates\n\n\tFreely usable under MIT license\n-->\n\n<!-- Style Settings -->\n<style>\n\t/*\n\t\tcommon style for whole page\n\t\tThis should include:\n\t\t+ page size related settings\n\t\t+ font family settings\n\t\t+ line spacing settings\n\t*/\n\t@media screen {\n\t\tbody {\n\t\t\twidth: 8.3in;\n\t\t}\n\t}\n\n\thtml, body, div, span, td {\n\t\tfont-family: \"Arial\", sans-serif;\n\t\tfont-size: 12px;\n\t}\n\n\tbody {\n\t\tpadding: 10px;\n\t\tmargin: auto;\n\t\tfont-size: 12px;\n\t}\n\n\t.common {\n\t\tfont-family: \"Arial\", sans-serif !important;\n\t\tfont-size: 12px;\n\t\tpadding: 0px;\n\t}\n\n\ttable {\n\t\twidth: 100% !important;\n\t\tvertical-align: top;\n\t}\n\n\ttable td {\n\t\tpadding: 2px 0px;\n\t}\n\n\ttable, td {\n\t\tborder-collapse: collapse !important;\n\t\tpadding: 0px;\n\t\tmargin: 0px !important;\n\t}\n\t\n\ttable h1, h2, h3, h4, h5, h6 {\n\t\tpadding: 0px;\n\t\tmargin: 0px;\n\t}\n\n\ttable.header-table td {\n\t\tvertical-align: top;\n\t}\n\n\ttable.header-table h3 {\n\t\tcolor: gray;\n\t}\n\n\ttable.header-table thead td {\n\t\tpadding: 5px;\n\t}\n\n\ttable.header-table > thead,\n\ttable.header-table > tbody > tr > td,\n\ttable.footer-table > tbody > tr > td {\n\t\tborder: 1px solid black;\n\t\tpadding: 5px;\n\t}\n\n\ttable.footer-table > tbody,\n\ttable.header-table > thead {\n\t\tborder-bottom: 3px solid black;\n\t}\n\n\ttable.header-table > thead {\n\t\tborder-top: 3px solid black;\n\t}\n\n\tdiv.page-body table td:nth-child(6),\n\tdiv.page-body table td:nth-child(7) {\n\t\ttext-align: right;\n\t}\n\n\tdiv.page-body td {\n\t\tbackground-color: white !important;\n\t\tborder: 1px solid black !important;\n\t}\n\n\ttable.footer-table td {\n\t\tvertical-align: top;\n\t}\n\n\ttable.footer-table td table td:nth-child(2),\n\ttable.footer-table td table td:nth-child(3) {\n\t\ttext-align: right;\n\t}\n</style>\n\n\n<!-- Javascript -->\n<script>\n\tsi_std = {\n\t\tprint_item_table: function() {\n\t\t\tvar table = print_table(\n\t\t\t\t'Sales Order',\n\t\t\t\tdoc.name,\n\t\t\t\t'sales_order_details',\n\t\t\t\t'Sales Order Item',\n\t\t\t\t[// Here specify the table columns to be displayed\n\t\t\t\t\t'SR', 'item_code', 'description', 'qty', 'stock_uom',\n\t\t\t\t\t'base_rate', 'amount'\n\t\t\t\t],\n\t\t\t\t[// Here specify the labels of column headings\n\t\t\t\t\t'Sr', 'Item Code', 'Description', 'Qty',\n\t\t\t\t\t'UoM', 'Basic Rate', 'Amount'\n\t\t\t\t],\n\t\t\t\t[// Here specify the column widths\n\t\t\t\t\t'3%', '20%', '37%', '5%',\n\t\t\t\t\t'5%', '15%', '15%'\n\t\t\t\t],\n\t\t\t\tnull,\n\t\t\t\tnull,\n\t\t\t\t{\n\t\t\t\t\t'description' : function(data_row) {\n\t\t\t\t\t\tif(data_row.discount_percentage) {\n\t\t\t\t\t\t\tvar to_append = '<div style=\"padding-left: 15px;\"><i>Discount: ' + \n\t\t\t\t\t\t\t\tdata_row.discount_percentage + '% on ' + \n\t\t\t\t\t\t\t\tformat_currency(data_row.price_list_rate, doc.currency) + '</i></div>';\n\t\t\t\t\t\t\tif(data_row.description.indexOf(to_append)==-1) {\n\t\t\t\t\t\t\t\treturn data_row.description + to_append;\n\t\t\t\t\t\t\t} else { return data_row.description; }\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\treturn data_row.description;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t);\n\n\t\t\t// This code takes care of page breaks\n\t\t\tif(table.appendChild) {\n\t\t\t\tout = table.innerHTML;\n\t\t\t} else {\n\t\t\t\tout = '';\n\t\t\t\tfor(var i=0; i < (table.length-1); i++) {\n\t\t\t\t\tout += table[i].innerHTML + \n\t\t\t\t\t\t'<div style = \"page-break-after: always;\" \\\n\t\t\t\t\t\tclass = \"page_break\"></div>\\\n\t\t\t\t\t\t<div class=\"page-settings\"></div>';\n\t\t\t\t}\n\t\t\t\tout += table[table.length-1].innerHTML;\n\t\t\t}\n\t\t\treturn out;\n\t\t},\n\n\n\t\tprint_other_charges: function(parent) {\n\t\t\tvar oc = getchildren('Sales Taxes and Charges', doc.name, 'other_charges');\n\t\t\tvar rows = '<table width=100%>\\n';\n\t\t\tfor(var i=0; i<oc.length; i++) {\n\t\t\t\tif(!oc[i].included_in_print_rate) {\n\t\t\t\t\trows +=\n\t\t\t\t\t\t'<tr>\\n' +\n\t\t\t\t\t\t\t'\\t<td>' + oc[i].description + '</td>\\n' +\n\t\t\t\t\t\t\t'\\t<td style=\"width: 38%; text-align: right;\">' + format_currency(oc[i].tax_amount/doc.conversion_rate, doc.currency) + '</td>\\n' +\n\t\t\t\t\t\t'</tr>\\n';\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(doc.discount_amount) {\n\t\t\t\trows += '<tr>\\n' + \n\t\t\t\t\t\t'\\t<td>Discount Amount</td>\\n' + \n\t\t\t\t\t\t'\\t<td style=\"width: 38%; text-align: right;\">' + format_currency(doc.discount_amount, doc.currency) + '</td>\\n' + \n\t\t\t\t\t'</tr>\\n';\n\t\t\t}\n\n\t\t\treturn rows + '</table>\\n';\n\t\t}\n\t};\n</script>\n\n\n<!-- Page Layout Settings -->\n<div class='common page-header'>\n\t<!-- \n\t\tPage Header will contain\n\t\t\t+ table 1\n\t\t\t\t+ table 1a\n\t\t\t\t\t- Name\n\t\t\t\t\t- Address\n\t\t\t\t\t- Contact\n\t\t\t\t\t- Mobile No\n\t\t\t\t+ table 1b\n\t\t\t\t\t- Voucher Date\n\t\t\t\t\t- Due Date\n\t-->\n\t<table class='header-table' cellspacing=0>\n\t\t<thead>\n\t\t\t<tr><td colspan=2><script>'<h1>' + (doc.select_print_heading || 'Sales Order') + '</h1>'</script></td></tr>\n\t\t\t<tr><td colspan=2><h3><script>cur_frm.docname</script></h3></td></tr>\n\t\t</thead>\n\t\t<tbody>\n\t\t\t<tr>\n\t\t\t\t<td width=60%><table width=100% cellspacing=0><tbody>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td width=39%><b>Name</b></td>\n\t\t\t\t\t\t<td><script>doc.customer_name</script></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><b>Address</b></td>\n\t\t\t\t\t\t<td><script>replace_newlines(doc.address_display)</script></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><b>Contact</b></td>\n\t\t\t\t\t\t<td><script>doc.contact_display</script></td>\n\t\t\t\t\t</tr>\n\t\t\t\t</tbody></table></td>\n\t\t\t\t<td><table width=100% cellspacing=0><tbody>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td width=63%><b>Sales Order Date</b></td>\n\t\t\t\t\t\t<td><script>date.str_to_user(doc.transaction_date)</script></td>\n\t\t\t\t\t<tr>\t\t\t\t\t\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><b>Delivery Date</b></td>\n\t\t\t\t\t\t<td><script>date.str_to_user(doc.delivery_date)</script></td>\n\t\t\t\t\t<tr>\t\t\t\t\t\n\t\t\t\t</tbody></table></td>\n\t\t\t</tr>\n\t\t</tbody>\n\t\t<tfoot>\n\t\t\n\t\t</tfoot>\n\t</table>\n</div>\n<div class='common page-body'>\n\t<!-- \n\t\tPage Body will contain\n\t\t\t+ table 2\n\t\t\t\t- Sales Invoice Data\n\t-->\n\t<script>si_std.print_item_table()</script>\n</div>\n<div class='common page-footer'>\n\t<!-- \n\t\tPage Footer will contain\n\t\t\t+ table 3\n\t\t\t\t- Terms and Conditions\n\t\t\t\t- Total Rounded Amount Calculation\n\t\t\t\t- Total Rounded Amount in Words\n\t-->\n\t<table class='footer-table' width=100% cellspacing=0>\n\t\t<thead>\n\t\t\t\n\t\t</thead>\n\t\t<tbody>\n\t\t\t<tr>\n\t\t\t\t<td width=60% style='padding-right: 10px;'>\n\t\t\t\t\t<b>Terms, Conditions &amp; Other Information:</b><br />\n\t\t\t\t\t<script>doc.terms</script>\n\t\t\t\t</td>\n\t\t\t\t<td>\n\t\t\t\t\t<table cellspacing=0 width=100%><tbody>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td>Net Total</td>\n\t\t\t\t\t\t\t<td style=\"width: 38%; text-align: right;\"><script>\n\t\t\t\t\t\t\t\tformat_currency(doc.net_total_export, doc.currency)\n\t\t\t\t\t\t\t</script></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr><td colspan=3><script>si_std.print_other_charges()</script></td></tr>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td>Grand Total</td>\n\t\t\t\t\t\t\t<td style=\"width: 38%; text-align: right;\"><script>\n\t\t\t\t\t\t\t\tformat_currency(doc.grand_total_export, doc.currency)\n\t\t\t\t\t\t\t</script></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr style='font-weight: bold'>\n\t\t\t\t\t\t\t<td>Rounded Total</td>\n\t\t\t\t\t\t\t<td style=\"width: 38%; text-align: right;\"><script>\n\t\t\t\t\t\t\t\tformat_currency(doc.rounded_total_export, doc.currency)\n\t\t\t\t\t\t\t</script></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t</tbody></table>\n\t\t\t\t\t<br /><b>In Words</b><br />\n\t\t\t\t\t<i><script>doc.in_words_export</script></i>\n\t\t\t\t</td>\n\t\t\t</tr>\t\t\n\t\t</tbody>\n\t\t<tfoot>\n\t\t\n\t\t</tfoot>\n\t</table>\n</div>", 
+ "idx": 1, 
+ "modified": "2014-02-11 17:35:29", 
+ "modified_by": "Administrator", 
+ "module": "Selling", 
+ "name": "Sales Order Spartan", 
+ "owner": "Administrator", 
+ "print_format_type": "Client", 
+ "standard": "Yes"
+}
\ No newline at end of file
diff --git a/erpnext/selling/doctype/campaign/campaign.txt b/erpnext/selling/doctype/campaign/campaign.txt
index 55c459c..f7895fc 100644
--- a/erpnext/selling/doctype/campaign/campaign.txt
+++ b/erpnext/selling/doctype/campaign/campaign.txt
@@ -1,105 +1,98 @@
-[
- {
-  "creation": "2013-01-10 16:34:18", 
-  "docstatus": 0, 
-  "modified": "2014-01-20 17:48:27", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "allow_import": 1, 
-  "allow_rename": 1, 
-  "autoname": "field:campaign_name", 
-  "description": "Keep Track of Sales Campaigns. Keep track of Leads, Quotations, Sales Order etc from Campaigns to gauge Return on Investment. ", 
-  "doctype": "DocType", 
-  "document_type": "Master", 
-  "icon": "icon-bullhorn", 
-  "module": "Selling", 
-  "name": "__common__"
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "Campaign", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "amend": 0, 
-  "cancel": 0, 
-  "doctype": "DocPerm", 
-  "email": 1, 
-  "name": "__common__", 
-  "parent": "Campaign", 
-  "parentfield": "permissions", 
-  "parenttype": "DocType", 
-  "permlevel": 0, 
-  "print": 1, 
-  "read": 1, 
-  "submit": 0
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Campaign"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "trash_reason", 
-  "fieldtype": "Small Text", 
-  "label": "Trash Reason", 
-  "oldfieldname": "trash_reason", 
-  "oldfieldtype": "Small Text", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "campaign", 
-  "fieldtype": "Section Break", 
-  "label": "Campaign", 
-  "oldfieldtype": "Section Break"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "campaign_name", 
-  "fieldtype": "Data", 
-  "label": "Campaign Name", 
-  "oldfieldname": "campaign_name", 
-  "oldfieldtype": "Data", 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "description", 
-  "fieldtype": "Text", 
-  "label": "Description", 
-  "oldfieldname": "description", 
-  "oldfieldtype": "Text", 
-  "width": "300px"
- }, 
- {
-  "create": 0, 
-  "delete": 0, 
-  "doctype": "DocPerm", 
-  "import": 0, 
-  "report": 0, 
-  "role": "Sales Manager", 
-  "write": 0
- }, 
- {
-  "create": 0, 
-  "delete": 0, 
-  "doctype": "DocPerm", 
-  "report": 1, 
-  "role": "Sales User", 
-  "write": 0
- }, 
- {
-  "create": 1, 
-  "delete": 1, 
-  "doctype": "DocPerm", 
-  "report": 1, 
-  "role": "Sales Master Manager", 
-  "write": 1
- }
-]
\ No newline at end of file
+{
+ "allow_import": 1, 
+ "allow_rename": 1, 
+ "autoname": "field:campaign_name", 
+ "creation": "2013-01-10 16:34:18", 
+ "description": "Keep Track of Sales Campaigns. Keep track of Leads, Quotations, Sales Order etc from Campaigns to gauge Return on Investment. ", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "document_type": "Master", 
+ "fields": [
+  {
+   "fieldname": "trash_reason", 
+   "fieldtype": "Small Text", 
+   "label": "Trash Reason", 
+   "oldfieldname": "trash_reason", 
+   "oldfieldtype": "Small Text", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "campaign", 
+   "fieldtype": "Section Break", 
+   "label": "Campaign", 
+   "oldfieldtype": "Section Break", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "campaign_name", 
+   "fieldtype": "Data", 
+   "label": "Campaign Name", 
+   "oldfieldname": "campaign_name", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "description", 
+   "fieldtype": "Text", 
+   "label": "Description", 
+   "oldfieldname": "description", 
+   "oldfieldtype": "Text", 
+   "permlevel": 0, 
+   "width": "300px"
+  }
+ ], 
+ "icon": "icon-bullhorn", 
+ "idx": 1, 
+ "modified": "2014-01-20 17:48:27", 
+ "modified_by": "Administrator", 
+ "module": "Selling", 
+ "name": "Campaign", 
+ "owner": "Administrator", 
+ "permissions": [
+  {
+   "amend": 0, 
+   "cancel": 0, 
+   "create": 0, 
+   "delete": 0, 
+   "email": 1, 
+   "import": 0, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 0, 
+   "role": "Sales Manager", 
+   "submit": 0, 
+   "write": 0
+  }, 
+  {
+   "amend": 0, 
+   "cancel": 0, 
+   "create": 0, 
+   "delete": 0, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Sales User", 
+   "submit": 0, 
+   "write": 0
+  }, 
+  {
+   "amend": 0, 
+   "cancel": 0, 
+   "create": 1, 
+   "delete": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Sales Master Manager", 
+   "submit": 0, 
+   "write": 1
+  }
+ ]
+}
\ No newline at end of file
diff --git a/erpnext/selling/doctype/customer/customer.txt b/erpnext/selling/doctype/customer/customer.txt
index 56051d5..a2afe64 100644
--- a/erpnext/selling/doctype/customer/customer.txt
+++ b/erpnext/selling/doctype/customer/customer.txt
@@ -1,378 +1,333 @@
-[
- {
-  "creation": "2013-06-11 14:26:44", 
-  "docstatus": 0, 
-  "modified": "2014-03-03 19:05:58", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "allow_import": 1, 
-  "allow_rename": 1, 
-  "autoname": "naming_series:", 
-  "description": "Buyer of Goods and Services.", 
-  "doctype": "DocType", 
-  "document_type": "Master", 
-  "icon": "icon-user", 
-  "module": "Selling", 
-  "name": "__common__", 
-  "search_fields": "customer_name,customer_group,territory"
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "Customer", 
-  "parentfield": "fields", 
-  "parenttype": "DocType"
- }, 
- {
-  "cancel": 0, 
-  "doctype": "DocPerm", 
-  "name": "__common__", 
-  "parent": "Customer", 
-  "parentfield": "permissions", 
-  "parenttype": "DocType", 
-  "read": 1
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Customer"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "basic_info", 
-  "fieldtype": "Section Break", 
-  "label": "Basic Info", 
-  "oldfieldtype": "Section Break", 
-  "options": "icon-user", 
-  "permlevel": 0, 
-  "reqd": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "naming_series", 
-  "fieldtype": "Select", 
-  "label": "Series", 
-  "no_copy": 1, 
-  "options": "\nCUST\nCUSTMUM", 
-  "permlevel": 0, 
-  "print_hide": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "customer_name", 
-  "fieldtype": "Data", 
-  "hidden": 0, 
-  "in_filter": 1, 
-  "in_list_view": 1, 
-  "label": "Full Name", 
-  "no_copy": 1, 
-  "oldfieldname": "customer_name", 
-  "oldfieldtype": "Data", 
-  "permlevel": 0, 
-  "print_hide": 0, 
-  "report_hide": 0, 
-  "reqd": 1, 
-  "search_index": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "customer_type", 
-  "fieldtype": "Select", 
-  "label": "Type", 
-  "oldfieldname": "customer_type", 
-  "oldfieldtype": "Select", 
-  "options": "\nCompany\nIndividual", 
-  "permlevel": 0, 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "lead_name", 
-  "fieldtype": "Link", 
-  "hidden": 0, 
-  "in_filter": 1, 
-  "label": "From Lead", 
-  "no_copy": 1, 
-  "oldfieldname": "lead_name", 
-  "oldfieldtype": "Link", 
-  "options": "Lead", 
-  "permlevel": 0, 
-  "print_hide": 1, 
-  "report_hide": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break0", 
-  "fieldtype": "Column Break", 
-  "permlevel": 0, 
-  "width": "50%"
- }, 
- {
-  "description": "<a href=\"#Sales Browser/Customer Group\">Add / Edit</a>", 
-  "doctype": "DocField", 
-  "fieldname": "customer_group", 
-  "fieldtype": "Link", 
-  "hidden": 0, 
-  "in_filter": 1, 
-  "label": "Group", 
-  "oldfieldname": "customer_group", 
-  "oldfieldtype": "Link", 
-  "options": "Customer Group", 
-  "permlevel": 0, 
-  "print_hide": 0, 
-  "reqd": 1, 
-  "search_index": 1
- }, 
- {
-  "description": "<a href=\"#Sales Browser/Territory\">Add / Edit</a>", 
-  "doctype": "DocField", 
-  "fieldname": "territory", 
-  "fieldtype": "Link", 
-  "in_list_view": 1, 
-  "label": "Territory", 
-  "oldfieldname": "territory", 
-  "oldfieldtype": "Link", 
-  "options": "Territory", 
-  "permlevel": 0, 
-  "print_hide": 1, 
-  "reqd": 1
- }, 
- {
-  "depends_on": "eval:!doc.__islocal", 
-  "doctype": "DocField", 
-  "fieldname": "address_contacts", 
-  "fieldtype": "Section Break", 
-  "label": "Address & Contacts", 
-  "options": "icon-map-marker", 
-  "permlevel": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "address_html", 
-  "fieldtype": "HTML", 
-  "label": "Address HTML", 
-  "permlevel": 0, 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break1", 
-  "fieldtype": "Column Break", 
-  "permlevel": 0, 
-  "width": "50%"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "contact_html", 
-  "fieldtype": "HTML", 
-  "label": "Contact HTML", 
-  "oldfieldtype": "HTML", 
-  "permlevel": 0, 
-  "read_only": 1
- }, 
- {
-  "depends_on": "eval:!doc.__islocal", 
-  "doctype": "DocField", 
-  "fieldname": "communication_history", 
-  "fieldtype": "Section Break", 
-  "label": "Communication History", 
-  "options": "icon-comments", 
-  "permlevel": 0, 
-  "print_hide": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "communication_html", 
-  "fieldtype": "HTML", 
-  "label": "Communication HTML", 
-  "permlevel": 0, 
-  "print_hide": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "more_info", 
-  "fieldtype": "Section Break", 
-  "label": "More Info", 
-  "oldfieldtype": "Section Break", 
-  "options": "icon-file-text", 
-  "permlevel": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break2", 
-  "fieldtype": "Column Break", 
-  "permlevel": 0, 
-  "width": "50%"
- }, 
- {
-  "description": "To create an Account Head under a different company, select the company and save customer.", 
-  "doctype": "DocField", 
-  "fieldname": "company", 
-  "fieldtype": "Link", 
-  "in_filter": 1, 
-  "label": "Company", 
-  "oldfieldname": "company", 
-  "oldfieldtype": "Link", 
-  "options": "Company", 
-  "permlevel": 0, 
-  "reqd": 1, 
-  "search_index": 1
- }, 
- {
-  "description": "Your Customer's TAX registration numbers (if applicable) or any general information", 
-  "doctype": "DocField", 
-  "fieldname": "customer_details", 
-  "fieldtype": "Text", 
-  "label": "Customer Details", 
-  "oldfieldname": "customer_details", 
-  "oldfieldtype": "Code", 
-  "permlevel": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break3", 
-  "fieldtype": "Column Break", 
-  "permlevel": 0, 
-  "width": "50%"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "default_currency", 
-  "fieldtype": "Link", 
-  "label": "Currency", 
-  "no_copy": 1, 
-  "options": "Currency", 
-  "permlevel": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "default_price_list", 
-  "fieldtype": "Link", 
-  "label": "Price List", 
-  "options": "Price List", 
-  "permlevel": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "default_taxes_and_charges", 
-  "fieldtype": "Link", 
-  "label": "Taxes and Charges", 
-  "options": "Sales Taxes and Charges Master", 
-  "permlevel": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "credit_days", 
-  "fieldtype": "Int", 
-  "label": "Credit Days", 
-  "oldfieldname": "credit_days", 
-  "oldfieldtype": "Int", 
-  "permlevel": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "credit_limit", 
-  "fieldtype": "Currency", 
-  "label": "Credit Limit", 
-  "oldfieldname": "credit_limit", 
-  "oldfieldtype": "Currency", 
-  "options": "Company:company:default_currency", 
-  "permlevel": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "website", 
-  "fieldtype": "Data", 
-  "label": "Website", 
-  "permlevel": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "sales_team_section_break", 
-  "fieldtype": "Section Break", 
-  "label": "Sales Team", 
-  "oldfieldtype": "Section Break", 
-  "options": "icon-group", 
-  "permlevel": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "default_sales_partner", 
-  "fieldtype": "Link", 
-  "label": "Sales Partner", 
-  "oldfieldname": "default_sales_partner", 
-  "oldfieldtype": "Link", 
-  "options": "Sales Partner", 
-  "permlevel": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "default_commission_rate", 
-  "fieldtype": "Float", 
-  "label": "Commission Rate", 
-  "oldfieldname": "default_commission_rate", 
-  "oldfieldtype": "Currency", 
-  "permlevel": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "sales_team", 
-  "fieldtype": "Table", 
-  "label": "Sales Team Details", 
-  "oldfieldname": "sales_team", 
-  "oldfieldtype": "Table", 
-  "options": "Sales Team", 
-  "permlevel": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "communications", 
-  "fieldtype": "Table", 
-  "hidden": 1, 
-  "label": "Communications", 
-  "options": "Communication", 
-  "permlevel": 0, 
-  "print_hide": 1
- }, 
- {
-  "amend": 0, 
-  "create": 1, 
-  "delete": 0, 
-  "doctype": "DocPerm", 
-  "email": 1, 
-  "permlevel": 0, 
-  "print": 1, 
-  "report": 1, 
-  "role": "Sales User", 
-  "submit": 0, 
-  "write": 1
- }, 
- {
-  "delete": 0, 
-  "doctype": "DocPerm", 
-  "permlevel": 1, 
-  "role": "Sales User"
- }, 
- {
-  "amend": 0, 
-  "create": 1, 
-  "delete": 1, 
-  "doctype": "DocPerm", 
-  "email": 1, 
-  "permlevel": 0, 
-  "print": 1, 
-  "report": 1, 
-  "restrict": 1, 
-  "role": "Sales Master Manager", 
-  "submit": 0, 
-  "write": 1
- }, 
- {
-  "delete": 0, 
-  "doctype": "DocPerm", 
-  "permlevel": 1, 
-  "role": "Sales Master Manager", 
-  "write": 1
- }
-]
\ No newline at end of file
+{
+ "allow_import": 1, 
+ "allow_rename": 1, 
+ "autoname": "naming_series:", 
+ "creation": "2013-06-11 14:26:44", 
+ "description": "Buyer of Goods and Services.", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "document_type": "Master", 
+ "fields": [
+  {
+   "fieldname": "basic_info", 
+   "fieldtype": "Section Break", 
+   "label": "Basic Info", 
+   "oldfieldtype": "Section Break", 
+   "options": "icon-user", 
+   "permlevel": 0, 
+   "reqd": 0
+  }, 
+  {
+   "fieldname": "naming_series", 
+   "fieldtype": "Select", 
+   "label": "Series", 
+   "no_copy": 1, 
+   "options": "\nCUST\nCUSTMUM", 
+   "permlevel": 0, 
+   "print_hide": 0
+  }, 
+  {
+   "fieldname": "customer_name", 
+   "fieldtype": "Data", 
+   "hidden": 0, 
+   "in_filter": 1, 
+   "in_list_view": 1, 
+   "label": "Full Name", 
+   "no_copy": 1, 
+   "oldfieldname": "customer_name", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "print_hide": 0, 
+   "report_hide": 0, 
+   "reqd": 1, 
+   "search_index": 1
+  }, 
+  {
+   "fieldname": "customer_type", 
+   "fieldtype": "Select", 
+   "label": "Type", 
+   "oldfieldname": "customer_type", 
+   "oldfieldtype": "Select", 
+   "options": "\nCompany\nIndividual", 
+   "permlevel": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "lead_name", 
+   "fieldtype": "Link", 
+   "hidden": 0, 
+   "in_filter": 1, 
+   "label": "From Lead", 
+   "no_copy": 1, 
+   "oldfieldname": "lead_name", 
+   "oldfieldtype": "Link", 
+   "options": "Lead", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "report_hide": 1
+  }, 
+  {
+   "fieldname": "column_break0", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0, 
+   "width": "50%"
+  }, 
+  {
+   "description": "<a href=\"#Sales Browser/Customer Group\">Add / Edit</a>", 
+   "fieldname": "customer_group", 
+   "fieldtype": "Link", 
+   "hidden": 0, 
+   "in_filter": 1, 
+   "label": "Group", 
+   "oldfieldname": "customer_group", 
+   "oldfieldtype": "Link", 
+   "options": "Customer Group", 
+   "permlevel": 0, 
+   "print_hide": 0, 
+   "reqd": 1, 
+   "search_index": 1
+  }, 
+  {
+   "description": "<a href=\"#Sales Browser/Territory\">Add / Edit</a>", 
+   "fieldname": "territory", 
+   "fieldtype": "Link", 
+   "in_list_view": 1, 
+   "label": "Territory", 
+   "oldfieldname": "territory", 
+   "oldfieldtype": "Link", 
+   "options": "Territory", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "reqd": 1
+  }, 
+  {
+   "depends_on": "eval:!doc.__islocal", 
+   "fieldname": "address_contacts", 
+   "fieldtype": "Section Break", 
+   "label": "Address & Contacts", 
+   "options": "icon-map-marker", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "address_html", 
+   "fieldtype": "HTML", 
+   "label": "Address HTML", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "column_break1", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0, 
+   "width": "50%"
+  }, 
+  {
+   "fieldname": "contact_html", 
+   "fieldtype": "HTML", 
+   "label": "Contact HTML", 
+   "oldfieldtype": "HTML", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "depends_on": "eval:!doc.__islocal", 
+   "fieldname": "communication_history", 
+   "fieldtype": "Section Break", 
+   "label": "Communication History", 
+   "options": "icon-comments", 
+   "permlevel": 0, 
+   "print_hide": 1
+  }, 
+  {
+   "fieldname": "communication_html", 
+   "fieldtype": "HTML", 
+   "label": "Communication HTML", 
+   "permlevel": 0, 
+   "print_hide": 1
+  }, 
+  {
+   "fieldname": "more_info", 
+   "fieldtype": "Section Break", 
+   "label": "More Info", 
+   "oldfieldtype": "Section Break", 
+   "options": "icon-file-text", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "column_break2", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0, 
+   "width": "50%"
+  }, 
+  {
+   "description": "To create an Account Head under a different company, select the company and save customer.", 
+   "fieldname": "company", 
+   "fieldtype": "Link", 
+   "in_filter": 1, 
+   "label": "Company", 
+   "oldfieldname": "company", 
+   "oldfieldtype": "Link", 
+   "options": "Company", 
+   "permlevel": 0, 
+   "reqd": 1, 
+   "search_index": 1
+  }, 
+  {
+   "description": "Your Customer's TAX registration numbers (if applicable) or any general information", 
+   "fieldname": "customer_details", 
+   "fieldtype": "Text", 
+   "label": "Customer Details", 
+   "oldfieldname": "customer_details", 
+   "oldfieldtype": "Code", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "column_break3", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0, 
+   "width": "50%"
+  }, 
+  {
+   "fieldname": "default_currency", 
+   "fieldtype": "Link", 
+   "label": "Currency", 
+   "no_copy": 1, 
+   "options": "Currency", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "default_price_list", 
+   "fieldtype": "Link", 
+   "label": "Price List", 
+   "options": "Price List", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "default_taxes_and_charges", 
+   "fieldtype": "Link", 
+   "label": "Taxes and Charges", 
+   "options": "Sales Taxes and Charges Master", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "credit_days", 
+   "fieldtype": "Int", 
+   "label": "Credit Days", 
+   "oldfieldname": "credit_days", 
+   "oldfieldtype": "Int", 
+   "permlevel": 1
+  }, 
+  {
+   "fieldname": "credit_limit", 
+   "fieldtype": "Currency", 
+   "label": "Credit Limit", 
+   "oldfieldname": "credit_limit", 
+   "oldfieldtype": "Currency", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 1
+  }, 
+  {
+   "fieldname": "website", 
+   "fieldtype": "Data", 
+   "label": "Website", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "sales_team_section_break", 
+   "fieldtype": "Section Break", 
+   "label": "Sales Team", 
+   "oldfieldtype": "Section Break", 
+   "options": "icon-group", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "default_sales_partner", 
+   "fieldtype": "Link", 
+   "label": "Sales Partner", 
+   "oldfieldname": "default_sales_partner", 
+   "oldfieldtype": "Link", 
+   "options": "Sales Partner", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "default_commission_rate", 
+   "fieldtype": "Float", 
+   "label": "Commission Rate", 
+   "oldfieldname": "default_commission_rate", 
+   "oldfieldtype": "Currency", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "sales_team", 
+   "fieldtype": "Table", 
+   "label": "Sales Team Details", 
+   "oldfieldname": "sales_team", 
+   "oldfieldtype": "Table", 
+   "options": "Sales Team", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "communications", 
+   "fieldtype": "Table", 
+   "hidden": 1, 
+   "label": "Communications", 
+   "options": "Communication", 
+   "permlevel": 0, 
+   "print_hide": 1
+  }
+ ], 
+ "icon": "icon-user", 
+ "idx": 1, 
+ "modified": "2014-03-03 19:05:58", 
+ "modified_by": "Administrator", 
+ "module": "Selling", 
+ "name": "Customer", 
+ "owner": "Administrator", 
+ "permissions": [
+  {
+   "amend": 0, 
+   "cancel": 0, 
+   "create": 1, 
+   "delete": 0, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Sales User", 
+   "submit": 0, 
+   "write": 1
+  }, 
+  {
+   "cancel": 0, 
+   "delete": 0, 
+   "permlevel": 1, 
+   "read": 1, 
+   "role": "Sales User"
+  }, 
+  {
+   "amend": 0, 
+   "cancel": 0, 
+   "create": 1, 
+   "delete": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "restrict": 1, 
+   "role": "Sales Master Manager", 
+   "submit": 0, 
+   "write": 1
+  }, 
+  {
+   "cancel": 0, 
+   "delete": 0, 
+   "permlevel": 1, 
+   "read": 1, 
+   "role": "Sales Master Manager", 
+   "write": 1
+  }
+ ], 
+ "search_fields": "customer_name,customer_group,territory"
+}
\ No newline at end of file
diff --git a/erpnext/selling/doctype/industry_type/industry_type.txt b/erpnext/selling/doctype/industry_type/industry_type.txt
index e65fc38..f55a941 100644
--- a/erpnext/selling/doctype/industry_type/industry_type.txt
+++ b/erpnext/selling/doctype/industry_type/industry_type.txt
@@ -1,67 +1,56 @@
-[
- {
-  "creation": "2012-03-27 14:36:09", 
-  "docstatus": 0, 
-  "modified": "2013-12-20 19:24:08", 
-  "modified_by": "Administrator", 
-  "owner": "harshada@webnotestech.com"
- }, 
- {
-  "allow_import": 1, 
-  "autoname": "field:industry", 
-  "doctype": "DocType", 
-  "document_type": "Master", 
-  "icon": "icon-flag", 
-  "module": "Selling", 
-  "name": "__common__"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "industry", 
-  "fieldtype": "Data", 
-  "label": "Industry", 
-  "name": "__common__", 
-  "oldfieldname": "industry", 
-  "oldfieldtype": "Data", 
-  "parent": "Industry Type", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0, 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocPerm", 
-  "email": 1, 
-  "name": "__common__", 
-  "parent": "Industry Type", 
-  "parentfield": "permissions", 
-  "parenttype": "DocType", 
-  "permlevel": 0, 
-  "print": 1, 
-  "read": 1, 
-  "report": 1
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Industry Type"
- }, 
- {
-  "doctype": "DocField"
- }, 
- {
-  "create": 1, 
-  "doctype": "DocPerm", 
-  "role": "Sales Manager", 
-  "write": 1
- }, 
- {
-  "doctype": "DocPerm", 
-  "role": "Sales User"
- }, 
- {
-  "create": 1, 
-  "doctype": "DocPerm", 
-  "role": "Sales Master Manager", 
-  "write": 1
- }
-]
\ No newline at end of file
+{
+ "allow_import": 1, 
+ "autoname": "field:industry", 
+ "creation": "2012-03-27 14:36:09", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "document_type": "Master", 
+ "fields": [
+  {
+   "fieldname": "industry", 
+   "fieldtype": "Data", 
+   "label": "Industry", 
+   "oldfieldname": "industry", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "reqd": 1
+  }
+ ], 
+ "icon": "icon-flag", 
+ "idx": 1, 
+ "modified": "2013-12-20 19:24:08", 
+ "modified_by": "Administrator", 
+ "module": "Selling", 
+ "name": "Industry Type", 
+ "owner": "harshada@webnotestech.com", 
+ "permissions": [
+  {
+   "create": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Sales Manager", 
+   "write": 1
+  }, 
+  {
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Sales User"
+  }, 
+  {
+   "create": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Sales Master Manager", 
+   "write": 1
+  }
+ ]
+}
\ No newline at end of file
diff --git a/erpnext/selling/doctype/installation_note/installation_note.txt b/erpnext/selling/doctype/installation_note/installation_note.txt
index 5e51982..c3e3410 100644
--- a/erpnext/selling/doctype/installation_note/installation_note.txt
+++ b/erpnext/selling/doctype/installation_note/installation_note.txt
@@ -1,285 +1,268 @@
-[
- {
-  "creation": "2013-04-30 13:13:06", 
-  "docstatus": 0, 
-  "modified": "2014-01-20 17:48:47", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "autoname": "naming_series:", 
-  "doctype": "DocType", 
-  "icon": "icon-wrench", 
-  "is_submittable": 1, 
-  "module": "Selling", 
-  "name": "__common__"
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "Installation Note", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "doctype": "DocPerm", 
-  "name": "__common__", 
-  "parent": "Installation Note", 
-  "parentfield": "permissions", 
-  "parenttype": "DocType", 
-  "read": 1, 
-  "report": 1, 
-  "role": "Sales User"
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Installation Note"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "installation_note", 
-  "fieldtype": "Section Break", 
-  "label": "Installation Note", 
-  "oldfieldtype": "Section Break"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break0", 
-  "fieldtype": "Column Break", 
-  "oldfieldtype": "Column Break", 
-  "width": "50%"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "naming_series", 
-  "fieldtype": "Select", 
-  "label": "Series", 
-  "no_copy": 1, 
-  "oldfieldname": "naming_series", 
-  "oldfieldtype": "Select", 
-  "options": "\nIN", 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "customer", 
-  "fieldtype": "Link", 
-  "label": "Customer", 
-  "oldfieldname": "customer", 
-  "oldfieldtype": "Link", 
-  "options": "Customer", 
-  "print_hide": 1, 
-  "reqd": 1, 
-  "search_index": 1
- }, 
- {
-  "depends_on": "customer", 
-  "doctype": "DocField", 
-  "fieldname": "customer_address", 
-  "fieldtype": "Link", 
-  "label": "Customer Address", 
-  "options": "Address", 
-  "print_hide": 1
- }, 
- {
-  "depends_on": "customer", 
-  "doctype": "DocField", 
-  "fieldname": "contact_person", 
-  "fieldtype": "Link", 
-  "label": "Contact Person", 
-  "options": "Contact", 
-  "print_hide": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "customer_name", 
-  "fieldtype": "Data", 
-  "label": "Name", 
-  "oldfieldname": "customer_name", 
-  "oldfieldtype": "Data", 
-  "read_only": 1, 
-  "reqd": 0, 
-  "search_index": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "address_display", 
-  "fieldtype": "Small Text", 
-  "hidden": 1, 
-  "label": "Address", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "contact_display", 
-  "fieldtype": "Small Text", 
-  "hidden": 1, 
-  "label": "Contact", 
-  "read_only": 1
- }, 
- {
-  "depends_on": "customer", 
-  "doctype": "DocField", 
-  "fieldname": "contact_mobile", 
-  "fieldtype": "Text", 
-  "label": "Mobile No", 
-  "read_only": 1
- }, 
- {
-  "depends_on": "customer", 
-  "doctype": "DocField", 
-  "fieldname": "contact_email", 
-  "fieldtype": "Text", 
-  "label": "Contact Email", 
-  "print_hide": 1, 
-  "read_only": 1
- }, 
- {
-  "depends_on": "customer", 
-  "description": "<a href=\"#Sales Browser/Territory\">Add / Edit</a>", 
-  "doctype": "DocField", 
-  "fieldname": "territory", 
-  "fieldtype": "Link", 
-  "in_filter": 1, 
-  "label": "Territory", 
-  "options": "Territory", 
-  "print_hide": 1, 
-  "reqd": 1, 
-  "search_index": 1
- }, 
- {
-  "depends_on": "customer", 
-  "description": "<a href=\"#Sales Browser/Customer Group\">Add / Edit</a>", 
-  "doctype": "DocField", 
-  "fieldname": "customer_group", 
-  "fieldtype": "Link", 
-  "label": "Customer Group", 
-  "options": "Customer Group", 
-  "print_hide": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break1", 
-  "fieldtype": "Column Break", 
-  "oldfieldtype": "Column Break", 
-  "width": "50%"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "inst_date", 
-  "fieldtype": "Date", 
-  "label": "Installation Date", 
-  "oldfieldname": "inst_date", 
-  "oldfieldtype": "Date", 
-  "reqd": 1, 
-  "search_index": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "inst_time", 
-  "fieldtype": "Time", 
-  "label": "Installation Time", 
-  "oldfieldname": "inst_time", 
-  "oldfieldtype": "Time"
- }, 
- {
-  "default": "Draft", 
-  "doctype": "DocField", 
-  "fieldname": "status", 
-  "fieldtype": "Select", 
-  "label": "Status", 
-  "no_copy": 1, 
-  "oldfieldname": "status", 
-  "oldfieldtype": "Select", 
-  "options": "Draft\nSubmitted\nCancelled", 
-  "print_hide": 1, 
-  "read_only": 1, 
-  "reqd": 1
- }, 
- {
-  "description": "Select the relevant company name if you have multiple companies.", 
-  "doctype": "DocField", 
-  "fieldname": "company", 
-  "fieldtype": "Select", 
-  "in_filter": 1, 
-  "label": "Company", 
-  "oldfieldname": "company", 
-  "oldfieldtype": "Select", 
-  "options": "link:Company", 
-  "print_hide": 1, 
-  "reqd": 1, 
-  "search_index": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "fiscal_year", 
-  "fieldtype": "Select", 
-  "in_filter": 1, 
-  "label": "Fiscal Year", 
-  "oldfieldname": "fiscal_year", 
-  "oldfieldtype": "Select", 
-  "options": "link:Fiscal Year", 
-  "print_hide": 1, 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "amended_from", 
-  "fieldtype": "Data", 
-  "ignore_restrictions": 1, 
-  "label": "Amended From", 
-  "no_copy": 1, 
-  "oldfieldname": "amended_from", 
-  "oldfieldtype": "Data", 
-  "print_hide": 1, 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "remarks", 
-  "fieldtype": "Small Text", 
-  "label": "Remarks", 
-  "oldfieldname": "remarks", 
-  "oldfieldtype": "Small Text", 
-  "print_hide": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "item_details", 
-  "fieldtype": "Section Break", 
-  "label": "Item Details", 
-  "oldfieldtype": "Section Break", 
-  "options": "Simple"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "installed_item_details", 
-  "fieldtype": "Table", 
-  "label": "Installation Note Item", 
-  "oldfieldname": "installed_item_details", 
-  "oldfieldtype": "Table", 
-  "options": "Installation Note Item"
- }, 
- {
-  "amend": 1, 
-  "cancel": 1, 
-  "create": 1, 
-  "delete": 1, 
-  "doctype": "DocPerm", 
-  "email": 1, 
-  "permlevel": 0, 
-  "print": 1, 
-  "submit": 1, 
-  "write": 1
- }, 
- {
-  "amend": 0, 
-  "cancel": 0, 
-  "create": 0, 
-  "delete": 0, 
-  "doctype": "DocPerm", 
-  "permlevel": 1, 
-  "submit": 0
- }
-]
\ No newline at end of file
+{
+ "autoname": "naming_series:", 
+ "creation": "2013-04-30 13:13:06", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "fields": [
+  {
+   "fieldname": "installation_note", 
+   "fieldtype": "Section Break", 
+   "label": "Installation Note", 
+   "oldfieldtype": "Section Break", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "column_break0", 
+   "fieldtype": "Column Break", 
+   "oldfieldtype": "Column Break", 
+   "permlevel": 0, 
+   "width": "50%"
+  }, 
+  {
+   "fieldname": "naming_series", 
+   "fieldtype": "Select", 
+   "label": "Series", 
+   "no_copy": 1, 
+   "oldfieldname": "naming_series", 
+   "oldfieldtype": "Select", 
+   "options": "\nIN", 
+   "permlevel": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "customer", 
+   "fieldtype": "Link", 
+   "label": "Customer", 
+   "oldfieldname": "customer", 
+   "oldfieldtype": "Link", 
+   "options": "Customer", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "reqd": 1, 
+   "search_index": 1
+  }, 
+  {
+   "depends_on": "customer", 
+   "fieldname": "customer_address", 
+   "fieldtype": "Link", 
+   "label": "Customer Address", 
+   "options": "Address", 
+   "permlevel": 0, 
+   "print_hide": 1
+  }, 
+  {
+   "depends_on": "customer", 
+   "fieldname": "contact_person", 
+   "fieldtype": "Link", 
+   "label": "Contact Person", 
+   "options": "Contact", 
+   "permlevel": 0, 
+   "print_hide": 1
+  }, 
+  {
+   "fieldname": "customer_name", 
+   "fieldtype": "Data", 
+   "label": "Name", 
+   "oldfieldname": "customer_name", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "read_only": 1, 
+   "reqd": 0, 
+   "search_index": 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, 
+   "read_only": 1
+  }, 
+  {
+   "depends_on": "customer", 
+   "fieldname": "contact_mobile", 
+   "fieldtype": "Text", 
+   "label": "Mobile No", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "depends_on": "customer", 
+   "fieldname": "contact_email", 
+   "fieldtype": "Text", 
+   "label": "Contact Email", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1
+  }, 
+  {
+   "depends_on": "customer", 
+   "description": "<a href=\"#Sales Browser/Territory\">Add / Edit</a>", 
+   "fieldname": "territory", 
+   "fieldtype": "Link", 
+   "in_filter": 1, 
+   "label": "Territory", 
+   "options": "Territory", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "reqd": 1, 
+   "search_index": 1
+  }, 
+  {
+   "depends_on": "customer", 
+   "description": "<a href=\"#Sales Browser/Customer Group\">Add / Edit</a>", 
+   "fieldname": "customer_group", 
+   "fieldtype": "Link", 
+   "label": "Customer Group", 
+   "options": "Customer Group", 
+   "permlevel": 0, 
+   "print_hide": 1
+  }, 
+  {
+   "fieldname": "column_break1", 
+   "fieldtype": "Column Break", 
+   "oldfieldtype": "Column Break", 
+   "permlevel": 0, 
+   "width": "50%"
+  }, 
+  {
+   "fieldname": "inst_date", 
+   "fieldtype": "Date", 
+   "label": "Installation Date", 
+   "oldfieldname": "inst_date", 
+   "oldfieldtype": "Date", 
+   "permlevel": 0, 
+   "reqd": 1, 
+   "search_index": 1
+  }, 
+  {
+   "fieldname": "inst_time", 
+   "fieldtype": "Time", 
+   "label": "Installation Time", 
+   "oldfieldname": "inst_time", 
+   "oldfieldtype": "Time", 
+   "permlevel": 0
+  }, 
+  {
+   "default": "Draft", 
+   "fieldname": "status", 
+   "fieldtype": "Select", 
+   "label": "Status", 
+   "no_copy": 1, 
+   "oldfieldname": "status", 
+   "oldfieldtype": "Select", 
+   "options": "Draft\nSubmitted\nCancelled", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1, 
+   "reqd": 1
+  }, 
+  {
+   "description": "Select the relevant company name if you have multiple companies.", 
+   "fieldname": "company", 
+   "fieldtype": "Select", 
+   "in_filter": 1, 
+   "label": "Company", 
+   "oldfieldname": "company", 
+   "oldfieldtype": "Select", 
+   "options": "link:Company", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "reqd": 1, 
+   "search_index": 0
+  }, 
+  {
+   "fieldname": "fiscal_year", 
+   "fieldtype": "Select", 
+   "in_filter": 1, 
+   "label": "Fiscal Year", 
+   "oldfieldname": "fiscal_year", 
+   "oldfieldtype": "Select", 
+   "options": "link:Fiscal Year", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "amended_from", 
+   "fieldtype": "Data", 
+   "ignore_restrictions": 1, 
+   "label": "Amended From", 
+   "no_copy": 1, 
+   "oldfieldname": "amended_from", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "remarks", 
+   "fieldtype": "Small Text", 
+   "label": "Remarks", 
+   "oldfieldname": "remarks", 
+   "oldfieldtype": "Small Text", 
+   "permlevel": 0, 
+   "print_hide": 1
+  }, 
+  {
+   "fieldname": "item_details", 
+   "fieldtype": "Section Break", 
+   "label": "Item Details", 
+   "oldfieldtype": "Section Break", 
+   "options": "Simple", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "installed_item_details", 
+   "fieldtype": "Table", 
+   "label": "Installation Note Item", 
+   "oldfieldname": "installed_item_details", 
+   "oldfieldtype": "Table", 
+   "options": "Installation Note Item", 
+   "permlevel": 0
+  }
+ ], 
+ "icon": "icon-wrench", 
+ "idx": 1, 
+ "is_submittable": 1, 
+ "modified": "2014-01-20 17:48:47", 
+ "modified_by": "Administrator", 
+ "module": "Selling", 
+ "name": "Installation Note", 
+ "owner": "Administrator", 
+ "permissions": [
+  {
+   "amend": 1, 
+   "cancel": 1, 
+   "create": 1, 
+   "delete": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Sales User", 
+   "submit": 1, 
+   "write": 1
+  }, 
+  {
+   "amend": 0, 
+   "cancel": 0, 
+   "create": 0, 
+   "delete": 0, 
+   "permlevel": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Sales User", 
+   "submit": 0
+  }
+ ]
+}
\ No newline at end of file
diff --git a/erpnext/selling/doctype/installation_note_item/installation_note_item.txt b/erpnext/selling/doctype/installation_note_item/installation_note_item.txt
index 94f648e..79b0980 100644
--- a/erpnext/selling/doctype/installation_note_item/installation_note_item.txt
+++ b/erpnext/selling/doctype/installation_note_item/installation_note_item.txt
@@ -1,121 +1,108 @@
-[
- {
-  "creation": "2013-02-22 01:27:51", 
-  "docstatus": 0, 
-  "modified": "2013-12-20 19:23:14", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "autoname": "IID/.#####", 
-  "doctype": "DocType", 
-  "istable": 1, 
-  "module": "Selling", 
-  "name": "__common__"
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "Installation Note Item", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Installation Note Item"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "item_code", 
-  "fieldtype": "Link", 
-  "in_list_view": 1, 
-  "label": "Item Code", 
-  "oldfieldname": "item_code", 
-  "oldfieldtype": "Link", 
-  "options": "Item", 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "description", 
-  "fieldtype": "Data", 
-  "in_list_view": 1, 
-  "label": "Description", 
-  "oldfieldname": "description", 
-  "oldfieldtype": "Data", 
-  "print_width": "300px", 
-  "read_only": 1, 
-  "width": "300px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "serial_no", 
-  "fieldtype": "Small Text", 
-  "in_list_view": 1, 
-  "label": "Serial No", 
-  "oldfieldname": "serial_no", 
-  "oldfieldtype": "Small Text", 
-  "print_width": "180px", 
-  "width": "180px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "prevdoc_detail_docname", 
-  "fieldtype": "Data", 
-  "hidden": 1, 
-  "in_list_view": 0, 
-  "label": "Against Document Detail No", 
-  "no_copy": 1, 
-  "oldfieldname": "prevdoc_detail_docname", 
-  "oldfieldtype": "Data", 
-  "print_hide": 1, 
-  "print_width": "150px", 
-  "read_only": 1, 
-  "width": "150px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "prevdoc_docname", 
-  "fieldtype": "Data", 
-  "hidden": 1, 
-  "in_filter": 1, 
-  "in_list_view": 0, 
-  "label": "Against Document No", 
-  "no_copy": 1, 
-  "oldfieldname": "prevdoc_docname", 
-  "oldfieldtype": "Data", 
-  "print_hide": 1, 
-  "print_width": "150px", 
-  "read_only": 1, 
-  "search_index": 1, 
-  "width": "150px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "prevdoc_doctype", 
-  "fieldtype": "Data", 
-  "hidden": 1, 
-  "in_filter": 1, 
-  "in_list_view": 0, 
-  "label": "Document Type", 
-  "no_copy": 1, 
-  "oldfieldname": "prevdoc_doctype", 
-  "oldfieldtype": "Data", 
-  "print_hide": 1, 
-  "print_width": "150px", 
-  "read_only": 1, 
-  "search_index": 1, 
-  "width": "150px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "qty", 
-  "fieldtype": "Float", 
-  "in_list_view": 1, 
-  "label": "Installed Qty", 
-  "oldfieldname": "qty", 
-  "oldfieldtype": "Currency", 
-  "reqd": 1
- }
-]
\ No newline at end of file
+{
+ "autoname": "IID/.#####", 
+ "creation": "2013-02-22 01:27:51", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "fields": [
+  {
+   "fieldname": "item_code", 
+   "fieldtype": "Link", 
+   "in_list_view": 1, 
+   "label": "Item Code", 
+   "oldfieldname": "item_code", 
+   "oldfieldtype": "Link", 
+   "options": "Item", 
+   "permlevel": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "description", 
+   "fieldtype": "Data", 
+   "in_list_view": 1, 
+   "label": "Description", 
+   "oldfieldname": "description", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "print_width": "300px", 
+   "read_only": 1, 
+   "width": "300px"
+  }, 
+  {
+   "fieldname": "serial_no", 
+   "fieldtype": "Small Text", 
+   "in_list_view": 1, 
+   "label": "Serial No", 
+   "oldfieldname": "serial_no", 
+   "oldfieldtype": "Small Text", 
+   "permlevel": 0, 
+   "print_width": "180px", 
+   "width": "180px"
+  }, 
+  {
+   "fieldname": "prevdoc_detail_docname", 
+   "fieldtype": "Data", 
+   "hidden": 1, 
+   "in_list_view": 0, 
+   "label": "Against Document Detail No", 
+   "no_copy": 1, 
+   "oldfieldname": "prevdoc_detail_docname", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "print_width": "150px", 
+   "read_only": 1, 
+   "width": "150px"
+  }, 
+  {
+   "fieldname": "prevdoc_docname", 
+   "fieldtype": "Data", 
+   "hidden": 1, 
+   "in_filter": 1, 
+   "in_list_view": 0, 
+   "label": "Against Document No", 
+   "no_copy": 1, 
+   "oldfieldname": "prevdoc_docname", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "print_width": "150px", 
+   "read_only": 1, 
+   "search_index": 1, 
+   "width": "150px"
+  }, 
+  {
+   "fieldname": "prevdoc_doctype", 
+   "fieldtype": "Data", 
+   "hidden": 1, 
+   "in_filter": 1, 
+   "in_list_view": 0, 
+   "label": "Document Type", 
+   "no_copy": 1, 
+   "oldfieldname": "prevdoc_doctype", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "print_width": "150px", 
+   "read_only": 1, 
+   "search_index": 1, 
+   "width": "150px"
+  }, 
+  {
+   "fieldname": "qty", 
+   "fieldtype": "Float", 
+   "in_list_view": 1, 
+   "label": "Installed Qty", 
+   "oldfieldname": "qty", 
+   "oldfieldtype": "Currency", 
+   "permlevel": 0, 
+   "reqd": 1
+  }
+ ], 
+ "idx": 1, 
+ "istable": 1, 
+ "modified": "2013-12-20 19:23:14", 
+ "modified_by": "Administrator", 
+ "module": "Selling", 
+ "name": "Installation Note Item", 
+ "owner": "Administrator"
+}
\ No newline at end of file
diff --git a/erpnext/selling/doctype/lead/lead.txt b/erpnext/selling/doctype/lead/lead.txt
index ba04cb9..01845e8 100644
--- a/erpnext/selling/doctype/lead/lead.txt
+++ b/erpnext/selling/doctype/lead/lead.txt
@@ -1,411 +1,401 @@
-[
- {
-  "creation": "2013-04-10 11:45:37", 
-  "docstatus": 0, 
-  "modified": "2014-01-20 17:48:54", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "allow_import": 1, 
-  "autoname": "naming_series:", 
-  "doctype": "DocType", 
-  "document_type": "Master", 
-  "icon": "icon-user", 
-  "module": "Selling", 
-  "name": "__common__", 
-  "search_fields": "lead_name,lead_owner,status"
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "Lead", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "amend": 0, 
-  "cancel": 0, 
-  "create": 1, 
-  "doctype": "DocPerm", 
-  "email": 1, 
-  "name": "__common__", 
-  "parent": "Lead", 
-  "parentfield": "permissions", 
-  "parenttype": "DocType", 
-  "permlevel": 0, 
-  "print": 1, 
-  "read": 1, 
-  "report": 1, 
-  "submit": 0, 
-  "write": 1
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Lead"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "lead_details", 
-  "fieldtype": "Section Break", 
-  "label": "Lead Details", 
-  "options": "icon-user"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "naming_series", 
-  "fieldtype": "Select", 
-  "label": "Series", 
-  "no_copy": 1, 
-  "oldfieldname": "naming_series", 
-  "oldfieldtype": "Select", 
-  "options": "LEAD\nLEAD/10-11/\nLEAD/MUMBAI/", 
-  "reqd": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "lead_name", 
-  "fieldtype": "Data", 
-  "in_filter": 1, 
-  "in_list_view": 1, 
-  "label": "Contact Name", 
-  "oldfieldname": "lead_name", 
-  "oldfieldtype": "Data", 
-  "reqd": 1, 
-  "search_index": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "company_name", 
-  "fieldtype": "Data", 
-  "in_filter": 1, 
-  "in_list_view": 1, 
-  "label": "Organization Name", 
-  "oldfieldname": "company_name", 
-  "oldfieldtype": "Data", 
-  "reqd": 0, 
-  "search_index": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "email_id", 
-  "fieldtype": "Data", 
-  "label": "Email Id", 
-  "oldfieldname": "email_id", 
-  "oldfieldtype": "Data", 
-  "reqd": 0, 
-  "search_index": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "cb6", 
-  "fieldtype": "Column Break"
- }, 
- {
-  "default": "Lead", 
-  "doctype": "DocField", 
-  "fieldname": "status", 
-  "fieldtype": "Select", 
-  "in_filter": 1, 
-  "in_list_view": 1, 
-  "label": "Status", 
-  "no_copy": 1, 
-  "oldfieldname": "status", 
-  "oldfieldtype": "Select", 
-  "options": "Lead\nOpen\nReplied\nOpportunity\nInterested\nConverted\nDo Not Contact", 
-  "reqd": 1, 
-  "search_index": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "source", 
-  "fieldtype": "Select", 
-  "in_filter": 1, 
-  "in_list_view": 1, 
-  "label": "Source", 
-  "no_copy": 1, 
-  "oldfieldname": "source", 
-  "oldfieldtype": "Select", 
-  "options": "\nAdvertisement\nBlog Post\nCampaign\nCall\nCustomer\nExhibition\nSupplier\nWebsite\nEmail", 
-  "reqd": 0, 
-  "search_index": 0
- }, 
- {
-  "depends_on": "eval:doc.source == 'Customer'", 
-  "doctype": "DocField", 
-  "fieldname": "customer", 
-  "fieldtype": "Link", 
-  "hidden": 0, 
-  "label": "From Customer", 
-  "oldfieldname": "customer", 
-  "oldfieldtype": "Link", 
-  "options": "Customer"
- }, 
- {
-  "depends_on": "eval:doc.source == 'Campaign'", 
-  "description": "Enter campaign name if the source of lead is campaign.", 
-  "doctype": "DocField", 
-  "fieldname": "campaign_name", 
-  "fieldtype": "Link", 
-  "hidden": 0, 
-  "label": "Campaign Name", 
-  "oldfieldname": "campaign_name", 
-  "oldfieldtype": "Link", 
-  "options": "Campaign"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "communication_history", 
-  "fieldtype": "Section Break", 
-  "label": "Communication", 
-  "options": "icon-comments", 
-  "print_hide": 1
- }, 
- {
-  "default": "__user", 
-  "doctype": "DocField", 
-  "fieldname": "lead_owner", 
-  "fieldtype": "Link", 
-  "in_filter": 1, 
-  "label": "Lead Owner", 
-  "oldfieldname": "lead_owner", 
-  "oldfieldtype": "Link", 
-  "options": "User", 
-  "search_index": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "col_break123", 
-  "fieldtype": "Column Break", 
-  "width": "50%"
- }, 
- {
-  "allow_on_submit": 0, 
-  "doctype": "DocField", 
-  "fieldname": "contact_by", 
-  "fieldtype": "Link", 
-  "hidden": 0, 
-  "in_filter": 1, 
-  "label": "Next Contact By", 
-  "oldfieldname": "contact_by", 
-  "oldfieldtype": "Link", 
-  "options": "User", 
-  "print_hide": 0, 
-  "reqd": 0, 
-  "width": "100px"
- }, 
- {
-  "allow_on_submit": 0, 
-  "description": "Add to calendar on this date", 
-  "doctype": "DocField", 
-  "fieldname": "contact_date", 
-  "fieldtype": "Date", 
-  "in_filter": 1, 
-  "label": "Next Contact Date", 
-  "no_copy": 1, 
-  "oldfieldname": "contact_date", 
-  "oldfieldtype": "Date", 
-  "reqd": 0, 
-  "width": "100px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "sec_break123", 
-  "fieldtype": "Section Break", 
-  "options": "Simple"
- }, 
- {
-  "allow_on_submit": 0, 
-  "doctype": "DocField", 
-  "fieldname": "communication_html", 
-  "fieldtype": "HTML", 
-  "label": "Communication HTML", 
-  "oldfieldname": "follow_up", 
-  "oldfieldtype": "Table"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "contact_info", 
-  "fieldtype": "Section Break", 
-  "label": "Address & Contact", 
-  "oldfieldtype": "Column Break", 
-  "options": "icon-map-marker"
- }, 
- {
-  "depends_on": "eval:doc.__islocal", 
-  "doctype": "DocField", 
-  "fieldname": "address_desc", 
-  "fieldtype": "HTML", 
-  "hidden": 0, 
-  "label": "Address Desc", 
-  "options": "<em>Addresses will appear only when you save the lead</em>", 
-  "print_hide": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "address_html", 
-  "fieldtype": "HTML", 
-  "hidden": 0, 
-  "label": "Address HTML", 
-  "print_hide": 0, 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break2", 
-  "fieldtype": "Column Break"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "phone", 
-  "fieldtype": "Data", 
-  "label": "Phone", 
-  "oldfieldname": "contact_no", 
-  "oldfieldtype": "Data", 
-  "reqd": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "mobile_no", 
-  "fieldtype": "Data", 
-  "label": "Mobile No.", 
-  "oldfieldname": "mobile_no", 
-  "oldfieldtype": "Data"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "fax", 
-  "fieldtype": "Data", 
-  "label": "Fax", 
-  "oldfieldname": "fax", 
-  "oldfieldtype": "Data"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "website", 
-  "fieldtype": "Data", 
-  "label": "Website", 
-  "oldfieldname": "website", 
-  "oldfieldtype": "Data"
- }, 
- {
-  "description": "<a href=\"#Sales Browser/Territory\">Add / Edit</a>", 
-  "doctype": "DocField", 
-  "fieldname": "territory", 
-  "fieldtype": "Link", 
-  "label": "Territory", 
-  "oldfieldname": "territory", 
-  "oldfieldtype": "Link", 
-  "options": "Territory", 
-  "print_hide": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "more_info", 
-  "fieldtype": "Section Break", 
-  "label": "More Info", 
-  "oldfieldtype": "Section Break", 
-  "options": "icon-file-text"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "type", 
-  "fieldtype": "Select", 
-  "in_filter": 1, 
-  "label": "Lead Type", 
-  "oldfieldname": "type", 
-  "oldfieldtype": "Select", 
-  "options": "\nClient\nChannel Partner\nConsultant"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "market_segment", 
-  "fieldtype": "Select", 
-  "hidden": 0, 
-  "in_filter": 1, 
-  "label": "Market Segment", 
-  "oldfieldname": "market_segment", 
-  "oldfieldtype": "Select", 
-  "options": "\nLower Income\nMiddle Income\nUpper Income", 
-  "reqd": 0, 
-  "search_index": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "industry", 
-  "fieldtype": "Link", 
-  "label": "Industry", 
-  "oldfieldname": "industry", 
-  "oldfieldtype": "Link", 
-  "options": "Industry Type"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "request_type", 
-  "fieldtype": "Select", 
-  "label": "Request Type", 
-  "oldfieldname": "request_type", 
-  "oldfieldtype": "Select", 
-  "options": "\nProduct Enquiry\nRequest for Information\nSuggestions\nOther"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "fiscal_year", 
-  "fieldtype": "Select", 
-  "hidden": 1, 
-  "in_filter": 1, 
-  "label": "Fiscal Year", 
-  "oldfieldname": "fiscal_year", 
-  "oldfieldtype": "Select", 
-  "options": "link:Fiscal Year"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break3", 
-  "fieldtype": "Column Break", 
-  "oldfieldtype": "Column Break", 
-  "width": "50%"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "company", 
-  "fieldtype": "Link", 
-  "label": "Company", 
-  "oldfieldname": "company", 
-  "oldfieldtype": "Link", 
-  "options": "Company", 
-  "reqd": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "unsubscribed", 
-  "fieldtype": "Check", 
-  "label": "Unsubscribed"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "blog_subscriber", 
-  "fieldtype": "Check", 
-  "label": "Blog Subscriber"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "communications", 
-  "fieldtype": "Table", 
-  "hidden": 1, 
-  "label": "Communications", 
-  "options": "Communication", 
-  "print_hide": 1
- }, 
- {
-  "delete": 1, 
-  "doctype": "DocPerm", 
-  "role": "Sales Manager"
- }, 
- {
-  "delete": 0, 
-  "doctype": "DocPerm", 
-  "role": "Sales User"
- }
-]
\ No newline at end of file
+{
+ "allow_import": 1, 
+ "autoname": "naming_series:", 
+ "creation": "2013-04-10 11:45:37", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "document_type": "Master", 
+ "fields": [
+  {
+   "fieldname": "lead_details", 
+   "fieldtype": "Section Break", 
+   "label": "Lead Details", 
+   "options": "icon-user", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "naming_series", 
+   "fieldtype": "Select", 
+   "label": "Series", 
+   "no_copy": 1, 
+   "oldfieldname": "naming_series", 
+   "oldfieldtype": "Select", 
+   "options": "LEAD\nLEAD/10-11/\nLEAD/MUMBAI/", 
+   "permlevel": 0, 
+   "reqd": 0
+  }, 
+  {
+   "fieldname": "lead_name", 
+   "fieldtype": "Data", 
+   "in_filter": 1, 
+   "in_list_view": 1, 
+   "label": "Contact Name", 
+   "oldfieldname": "lead_name", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "reqd": 1, 
+   "search_index": 1
+  }, 
+  {
+   "fieldname": "company_name", 
+   "fieldtype": "Data", 
+   "in_filter": 1, 
+   "in_list_view": 1, 
+   "label": "Organization Name", 
+   "oldfieldname": "company_name", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "reqd": 0, 
+   "search_index": 0
+  }, 
+  {
+   "fieldname": "email_id", 
+   "fieldtype": "Data", 
+   "label": "Email Id", 
+   "oldfieldname": "email_id", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "reqd": 0, 
+   "search_index": 1
+  }, 
+  {
+   "fieldname": "cb6", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0
+  }, 
+  {
+   "default": "Lead", 
+   "fieldname": "status", 
+   "fieldtype": "Select", 
+   "in_filter": 1, 
+   "in_list_view": 1, 
+   "label": "Status", 
+   "no_copy": 1, 
+   "oldfieldname": "status", 
+   "oldfieldtype": "Select", 
+   "options": "Lead\nOpen\nReplied\nOpportunity\nInterested\nConverted\nDo Not Contact", 
+   "permlevel": 0, 
+   "reqd": 1, 
+   "search_index": 1
+  }, 
+  {
+   "fieldname": "source", 
+   "fieldtype": "Select", 
+   "in_filter": 1, 
+   "in_list_view": 1, 
+   "label": "Source", 
+   "no_copy": 1, 
+   "oldfieldname": "source", 
+   "oldfieldtype": "Select", 
+   "options": "\nAdvertisement\nBlog Post\nCampaign\nCall\nCustomer\nExhibition\nSupplier\nWebsite\nEmail", 
+   "permlevel": 0, 
+   "reqd": 0, 
+   "search_index": 0
+  }, 
+  {
+   "depends_on": "eval:doc.source == 'Customer'", 
+   "fieldname": "customer", 
+   "fieldtype": "Link", 
+   "hidden": 0, 
+   "label": "From Customer", 
+   "oldfieldname": "customer", 
+   "oldfieldtype": "Link", 
+   "options": "Customer", 
+   "permlevel": 0
+  }, 
+  {
+   "depends_on": "eval:doc.source == 'Campaign'", 
+   "description": "Enter campaign name if the source of lead is campaign.", 
+   "fieldname": "campaign_name", 
+   "fieldtype": "Link", 
+   "hidden": 0, 
+   "label": "Campaign Name", 
+   "oldfieldname": "campaign_name", 
+   "oldfieldtype": "Link", 
+   "options": "Campaign", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "communication_history", 
+   "fieldtype": "Section Break", 
+   "label": "Communication", 
+   "options": "icon-comments", 
+   "permlevel": 0, 
+   "print_hide": 1
+  }, 
+  {
+   "default": "__user", 
+   "fieldname": "lead_owner", 
+   "fieldtype": "Link", 
+   "in_filter": 1, 
+   "label": "Lead Owner", 
+   "oldfieldname": "lead_owner", 
+   "oldfieldtype": "Link", 
+   "options": "User", 
+   "permlevel": 0, 
+   "search_index": 1
+  }, 
+  {
+   "fieldname": "col_break123", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0, 
+   "width": "50%"
+  }, 
+  {
+   "allow_on_submit": 0, 
+   "fieldname": "contact_by", 
+   "fieldtype": "Link", 
+   "hidden": 0, 
+   "in_filter": 1, 
+   "label": "Next Contact By", 
+   "oldfieldname": "contact_by", 
+   "oldfieldtype": "Link", 
+   "options": "User", 
+   "permlevel": 0, 
+   "print_hide": 0, 
+   "reqd": 0, 
+   "width": "100px"
+  }, 
+  {
+   "allow_on_submit": 0, 
+   "description": "Add to calendar on this date", 
+   "fieldname": "contact_date", 
+   "fieldtype": "Date", 
+   "in_filter": 1, 
+   "label": "Next Contact Date", 
+   "no_copy": 1, 
+   "oldfieldname": "contact_date", 
+   "oldfieldtype": "Date", 
+   "permlevel": 0, 
+   "reqd": 0, 
+   "width": "100px"
+  }, 
+  {
+   "fieldname": "sec_break123", 
+   "fieldtype": "Section Break", 
+   "options": "Simple", 
+   "permlevel": 0
+  }, 
+  {
+   "allow_on_submit": 0, 
+   "fieldname": "communication_html", 
+   "fieldtype": "HTML", 
+   "label": "Communication HTML", 
+   "oldfieldname": "follow_up", 
+   "oldfieldtype": "Table", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "contact_info", 
+   "fieldtype": "Section Break", 
+   "label": "Address & Contact", 
+   "oldfieldtype": "Column Break", 
+   "options": "icon-map-marker", 
+   "permlevel": 0
+  }, 
+  {
+   "depends_on": "eval:doc.__islocal", 
+   "fieldname": "address_desc", 
+   "fieldtype": "HTML", 
+   "hidden": 0, 
+   "label": "Address Desc", 
+   "options": "<em>Addresses will appear only when you save the lead</em>", 
+   "permlevel": 0, 
+   "print_hide": 1
+  }, 
+  {
+   "fieldname": "address_html", 
+   "fieldtype": "HTML", 
+   "hidden": 0, 
+   "label": "Address HTML", 
+   "permlevel": 0, 
+   "print_hide": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "column_break2", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "phone", 
+   "fieldtype": "Data", 
+   "label": "Phone", 
+   "oldfieldname": "contact_no", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "reqd": 0
+  }, 
+  {
+   "fieldname": "mobile_no", 
+   "fieldtype": "Data", 
+   "label": "Mobile No.", 
+   "oldfieldname": "mobile_no", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "fax", 
+   "fieldtype": "Data", 
+   "label": "Fax", 
+   "oldfieldname": "fax", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "website", 
+   "fieldtype": "Data", 
+   "label": "Website", 
+   "oldfieldname": "website", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0
+  }, 
+  {
+   "description": "<a href=\"#Sales Browser/Territory\">Add / Edit</a>", 
+   "fieldname": "territory", 
+   "fieldtype": "Link", 
+   "label": "Territory", 
+   "oldfieldname": "territory", 
+   "oldfieldtype": "Link", 
+   "options": "Territory", 
+   "permlevel": 0, 
+   "print_hide": 1
+  }, 
+  {
+   "fieldname": "more_info", 
+   "fieldtype": "Section Break", 
+   "label": "More Info", 
+   "oldfieldtype": "Section Break", 
+   "options": "icon-file-text", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "type", 
+   "fieldtype": "Select", 
+   "in_filter": 1, 
+   "label": "Lead Type", 
+   "oldfieldname": "type", 
+   "oldfieldtype": "Select", 
+   "options": "\nClient\nChannel Partner\nConsultant", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "market_segment", 
+   "fieldtype": "Select", 
+   "hidden": 0, 
+   "in_filter": 1, 
+   "label": "Market Segment", 
+   "oldfieldname": "market_segment", 
+   "oldfieldtype": "Select", 
+   "options": "\nLower Income\nMiddle Income\nUpper Income", 
+   "permlevel": 0, 
+   "reqd": 0, 
+   "search_index": 0
+  }, 
+  {
+   "fieldname": "industry", 
+   "fieldtype": "Link", 
+   "label": "Industry", 
+   "oldfieldname": "industry", 
+   "oldfieldtype": "Link", 
+   "options": "Industry Type", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "request_type", 
+   "fieldtype": "Select", 
+   "label": "Request Type", 
+   "oldfieldname": "request_type", 
+   "oldfieldtype": "Select", 
+   "options": "\nProduct Enquiry\nRequest for Information\nSuggestions\nOther", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "fiscal_year", 
+   "fieldtype": "Select", 
+   "hidden": 1, 
+   "in_filter": 1, 
+   "label": "Fiscal Year", 
+   "oldfieldname": "fiscal_year", 
+   "oldfieldtype": "Select", 
+   "options": "link:Fiscal Year", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "column_break3", 
+   "fieldtype": "Column Break", 
+   "oldfieldtype": "Column Break", 
+   "permlevel": 0, 
+   "width": "50%"
+  }, 
+  {
+   "fieldname": "company", 
+   "fieldtype": "Link", 
+   "label": "Company", 
+   "oldfieldname": "company", 
+   "oldfieldtype": "Link", 
+   "options": "Company", 
+   "permlevel": 0, 
+   "reqd": 0
+  }, 
+  {
+   "fieldname": "unsubscribed", 
+   "fieldtype": "Check", 
+   "label": "Unsubscribed", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "blog_subscriber", 
+   "fieldtype": "Check", 
+   "label": "Blog Subscriber", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "communications", 
+   "fieldtype": "Table", 
+   "hidden": 1, 
+   "label": "Communications", 
+   "options": "Communication", 
+   "permlevel": 0, 
+   "print_hide": 1
+  }
+ ], 
+ "icon": "icon-user", 
+ "idx": 1, 
+ "modified": "2014-01-20 17:48:54", 
+ "modified_by": "Administrator", 
+ "module": "Selling", 
+ "name": "Lead", 
+ "owner": "Administrator", 
+ "permissions": [
+  {
+   "amend": 0, 
+   "cancel": 0, 
+   "create": 1, 
+   "delete": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Sales Manager", 
+   "submit": 0, 
+   "write": 1
+  }, 
+  {
+   "amend": 0, 
+   "cancel": 0, 
+   "create": 1, 
+   "delete": 0, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Sales User", 
+   "submit": 0, 
+   "write": 1
+  }
+ ], 
+ "search_fields": "lead_name,lead_owner,status"
+}
\ No newline at end of file
diff --git a/erpnext/selling/doctype/opportunity/opportunity.txt b/erpnext/selling/doctype/opportunity/opportunity.txt
index fd59a31..e98648d 100644
--- a/erpnext/selling/doctype/opportunity/opportunity.txt
+++ b/erpnext/selling/doctype/opportunity/opportunity.txt
@@ -1,457 +1,448 @@
-[
- {
-  "creation": "2013-03-07 18:50:30", 
-  "docstatus": 0, 
-  "modified": "2014-01-20 17:48:59", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "allow_import": 1, 
-  "autoname": "naming_series:", 
-  "description": "Potential Sales Deal", 
-  "doctype": "DocType", 
-  "document_type": "Transaction", 
-  "icon": "icon-info-sign", 
-  "is_submittable": 1, 
-  "module": "Selling", 
-  "name": "__common__", 
-  "search_fields": "status,transaction_date,customer,lead,enquiry_type,territory,company"
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "Opportunity", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "amend": 1, 
-  "cancel": 1, 
-  "create": 1, 
-  "delete": 1, 
-  "doctype": "DocPerm", 
-  "email": 1, 
-  "name": "__common__", 
-  "parent": "Opportunity", 
-  "parentfield": "permissions", 
-  "parenttype": "DocType", 
-  "permlevel": 0, 
-  "print": 1, 
-  "read": 1, 
-  "report": 1, 
-  "submit": 1, 
-  "write": 1
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Opportunity"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "from_section", 
-  "fieldtype": "Section Break", 
-  "label": "From", 
-  "options": "icon-user"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "naming_series", 
-  "fieldtype": "Select", 
-  "label": "Series", 
-  "no_copy": 1, 
-  "oldfieldname": "naming_series", 
-  "oldfieldtype": "Select", 
-  "options": "OPPT", 
-  "read_only": 0, 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "enquiry_from", 
-  "fieldtype": "Select", 
-  "label": "Opportunity From", 
-  "oldfieldname": "enquiry_from", 
-  "oldfieldtype": "Select", 
-  "options": "\nLead\nCustomer", 
-  "print_hide": 1, 
-  "read_only": 0, 
-  "report_hide": 0, 
-  "reqd": 1
- }, 
- {
-  "depends_on": "eval:doc.enquiry_from===\"Customer\"", 
-  "doctype": "DocField", 
-  "fieldname": "customer", 
-  "fieldtype": "Link", 
-  "hidden": 0, 
-  "in_filter": 1, 
-  "in_list_view": 1, 
-  "label": "Customer", 
-  "oldfieldname": "customer", 
-  "oldfieldtype": "Link", 
-  "options": "Customer", 
-  "print_hide": 1, 
-  "read_only": 0, 
-  "reqd": 0, 
-  "search_index": 0
- }, 
- {
-  "depends_on": "eval:doc.enquiry_from===\"Lead\"", 
-  "doctype": "DocField", 
-  "fieldname": "lead", 
-  "fieldtype": "Link", 
-  "hidden": 0, 
-  "in_filter": 1, 
-  "in_list_view": 1, 
-  "label": "Lead", 
-  "oldfieldname": "lead", 
-  "oldfieldtype": "Link", 
-  "options": "Lead", 
-  "print_hide": 1, 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break0", 
-  "fieldtype": "Column Break", 
-  "oldfieldtype": "Column Break", 
-  "read_only": 0, 
-  "width": "50%"
- }, 
- {
-  "default": "Draft", 
-  "doctype": "DocField", 
-  "fieldname": "status", 
-  "fieldtype": "Select", 
-  "in_list_view": 1, 
-  "label": "Status", 
-  "no_copy": 1, 
-  "oldfieldname": "status", 
-  "oldfieldtype": "Select", 
-  "options": "Draft\nSubmitted\nQuotation\nLost\nCancelled\nReplied\nOpen", 
-  "read_only": 1, 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "enquiry_type", 
-  "fieldtype": "Select", 
-  "label": "Opportunity Type", 
-  "oldfieldname": "enquiry_type", 
-  "oldfieldtype": "Select", 
-  "options": "\nSales\nMaintenance", 
-  "read_only": 0, 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "items", 
-  "fieldtype": "Section Break", 
-  "label": "Items", 
-  "oldfieldtype": "Section Break", 
-  "options": "icon-shopping-cart", 
-  "read_only": 0
- }, 
- {
-  "description": "Items which do not exist in Item master can also be entered on customer's request", 
-  "doctype": "DocField", 
-  "fieldname": "enquiry_details", 
-  "fieldtype": "Table", 
-  "label": "Opportunity Items", 
-  "oldfieldname": "enquiry_details", 
-  "oldfieldtype": "Table", 
-  "options": "Opportunity Item", 
-  "read_only": 0
- }, 
- {
-  "description": "Keep a track of communication related to this enquiry which will help for future reference.", 
-  "doctype": "DocField", 
-  "fieldname": "communication_history", 
-  "fieldtype": "Section Break", 
-  "label": "Communication History", 
-  "oldfieldtype": "Section Break", 
-  "options": "icon-comments", 
-  "read_only": 0
- }, 
- {
-  "allow_on_submit": 1, 
-  "doctype": "DocField", 
-  "fieldname": "communication_html", 
-  "fieldtype": "HTML", 
-  "label": "Communication HTML", 
-  "oldfieldname": "follow_up", 
-  "oldfieldtype": "Table", 
-  "read_only": 0
- }, 
- {
-  "depends_on": "eval:doc.lead || doc.customer", 
-  "doctype": "DocField", 
-  "fieldname": "contact_info", 
-  "fieldtype": "Section Break", 
-  "label": "Contact Info", 
-  "options": "icon-bullhorn", 
-  "read_only": 0
- }, 
- {
-  "depends_on": "eval:doc.customer || doc.lead", 
-  "doctype": "DocField", 
-  "fieldname": "customer_address", 
-  "fieldtype": "Link", 
-  "in_filter": 1, 
-  "label": "Customer / Lead Address", 
-  "options": "Address", 
-  "print_hide": 1, 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "address_display", 
-  "fieldtype": "Small Text", 
-  "hidden": 1, 
-  "label": "Address", 
-  "oldfieldname": "address", 
-  "oldfieldtype": "Small Text", 
-  "read_only": 1
- }, 
- {
-  "depends_on": "customer", 
-  "description": "<a href=\"#Sales Browser/Territory\">Add / Edit</a>", 
-  "doctype": "DocField", 
-  "fieldname": "territory", 
-  "fieldtype": "Link", 
-  "in_filter": 1, 
-  "label": "Territory", 
-  "options": "Territory", 
-  "print_hide": 1, 
-  "read_only": 0, 
-  "reqd": 0, 
-  "search_index": 1
- }, 
- {
-  "depends_on": "customer", 
-  "description": "<a href=\"#Sales Browser/Customer Group\">Add / Edit</a>", 
-  "doctype": "DocField", 
-  "fieldname": "customer_group", 
-  "fieldtype": "Link", 
-  "hidden": 0, 
-  "in_filter": 1, 
-  "label": "Customer Group", 
-  "oldfieldname": "customer_group", 
-  "oldfieldtype": "Link", 
-  "options": "Customer Group", 
-  "print_hide": 1, 
-  "read_only": 0, 
-  "reqd": 0, 
-  "search_index": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break3", 
-  "fieldtype": "Column Break", 
-  "read_only": 0
- }, 
- {
-  "depends_on": "customer", 
-  "doctype": "DocField", 
-  "fieldname": "customer_name", 
-  "fieldtype": "Data", 
-  "label": "Customer Name", 
-  "print_hide": 0, 
-  "read_only": 1
- }, 
- {
-  "depends_on": "eval:doc.lead || doc.customer", 
-  "doctype": "DocField", 
-  "fieldname": "contact_person", 
-  "fieldtype": "Link", 
-  "in_filter": 1, 
-  "label": "Contact Person", 
-  "options": "Contact", 
-  "print_hide": 1, 
-  "read_only": 0
- }, 
- {
-  "depends_on": "customer", 
-  "doctype": "DocField", 
-  "fieldname": "contact_display", 
-  "fieldtype": "Small Text", 
-  "label": "Contact", 
-  "read_only": 1
- }, 
- {
-  "depends_on": "eval:doc.lead || doc.customer", 
-  "doctype": "DocField", 
-  "fieldname": "contact_email", 
-  "fieldtype": "Text", 
-  "label": "Contact Email", 
-  "read_only": 1
- }, 
- {
-  "depends_on": "eval:doc.lead || doc.customer", 
-  "doctype": "DocField", 
-  "fieldname": "contact_mobile", 
-  "fieldtype": "Text", 
-  "label": "Contact Mobile No", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "more_info", 
-  "fieldtype": "Section Break", 
-  "label": "More Info", 
-  "oldfieldtype": "Section Break", 
-  "options": "icon-file-text", 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break1", 
-  "fieldtype": "Column Break", 
-  "oldfieldtype": "Column Break", 
-  "read_only": 0, 
-  "width": "50%"
- }, 
- {
-  "default": "Today", 
-  "doctype": "DocField", 
-  "fieldname": "transaction_date", 
-  "fieldtype": "Date", 
-  "label": "Opportunity Date", 
-  "oldfieldname": "transaction_date", 
-  "oldfieldtype": "Date", 
-  "read_only": 0, 
-  "reqd": 1, 
-  "width": "50px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "fiscal_year", 
-  "fieldtype": "Select", 
-  "in_filter": 1, 
-  "label": "Fiscal Year", 
-  "oldfieldname": "fiscal_year", 
-  "oldfieldtype": "Select", 
-  "options": "link:Fiscal Year", 
-  "print_hide": 1, 
-  "read_only": 0, 
-  "reqd": 1, 
-  "search_index": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "source", 
-  "fieldtype": "Select", 
-  "label": "Source", 
-  "oldfieldname": "source", 
-  "oldfieldtype": "Select", 
-  "options": "\nExisting Customer\nReference\nAdvertisement\nCold Calling\nExhibition\nSupplier Reference\nMass Mailing\nCustomer's Vendor\nCampaign\nWalk In", 
-  "read_only": 0
- }, 
- {
-  "description": "Enter name of campaign if source of enquiry is campaign", 
-  "doctype": "DocField", 
-  "fieldname": "campaign", 
-  "fieldtype": "Link", 
-  "label": "Campaign", 
-  "oldfieldname": "campaign", 
-  "oldfieldtype": "Link", 
-  "options": "Campaign", 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "company", 
-  "fieldtype": "Link", 
-  "in_filter": 1, 
-  "label": "Company", 
-  "oldfieldname": "company", 
-  "oldfieldtype": "Link", 
-  "options": "Company", 
-  "print_hide": 1, 
-  "read_only": 0, 
-  "reqd": 1, 
-  "search_index": 1
- }, 
- {
-  "depends_on": "eval:!doc.__islocal", 
-  "doctype": "DocField", 
-  "fieldname": "order_lost_reason", 
-  "fieldtype": "Text", 
-  "label": "Lost Reason", 
-  "no_copy": 1, 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break2", 
-  "fieldtype": "Column Break", 
-  "oldfieldtype": "Column Break", 
-  "read_only": 0, 
-  "width": "50%"
- }, 
- {
-  "description": "Your sales person who will contact the customer in future", 
-  "doctype": "DocField", 
-  "fieldname": "contact_by", 
-  "fieldtype": "Link", 
-  "in_filter": 1, 
-  "label": "Next Contact By", 
-  "oldfieldname": "contact_by", 
-  "oldfieldtype": "Link", 
-  "options": "User", 
-  "read_only": 0, 
-  "width": "75px"
- }, 
- {
-  "description": "Your sales person will get a reminder on this date to contact the customer", 
-  "doctype": "DocField", 
-  "fieldname": "contact_date", 
-  "fieldtype": "Date", 
-  "label": "Next Contact Date", 
-  "oldfieldname": "contact_date", 
-  "oldfieldtype": "Date", 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "to_discuss", 
-  "fieldtype": "Small Text", 
-  "label": "To Discuss", 
-  "no_copy": 1, 
-  "oldfieldname": "to_discuss", 
-  "oldfieldtype": "Small Text", 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "amended_from", 
-  "fieldtype": "Data", 
-  "ignore_restrictions": 1, 
-  "label": "Amended From", 
-  "no_copy": 1, 
-  "oldfieldname": "amended_from", 
-  "oldfieldtype": "Data", 
-  "print_hide": 1, 
-  "read_only": 1, 
-  "width": "150px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "communications", 
-  "fieldtype": "Table", 
-  "hidden": 1, 
-  "label": "Communications", 
-  "options": "Communication", 
-  "print_hide": 1
- }, 
- {
-  "doctype": "DocPerm", 
-  "role": "Sales User"
- }, 
- {
-  "doctype": "DocPerm", 
-  "role": "Sales Manager"
- }
-]
\ No newline at end of file
+{
+ "allow_import": 1, 
+ "autoname": "naming_series:", 
+ "creation": "2013-03-07 18:50:30", 
+ "description": "Potential Sales Deal", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "document_type": "Transaction", 
+ "fields": [
+  {
+   "fieldname": "from_section", 
+   "fieldtype": "Section Break", 
+   "label": "From", 
+   "options": "icon-user", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "naming_series", 
+   "fieldtype": "Select", 
+   "label": "Series", 
+   "no_copy": 1, 
+   "oldfieldname": "naming_series", 
+   "oldfieldtype": "Select", 
+   "options": "OPPT", 
+   "permlevel": 0, 
+   "read_only": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "enquiry_from", 
+   "fieldtype": "Select", 
+   "label": "Opportunity From", 
+   "oldfieldname": "enquiry_from", 
+   "oldfieldtype": "Select", 
+   "options": "\nLead\nCustomer", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0, 
+   "report_hide": 0, 
+   "reqd": 1
+  }, 
+  {
+   "depends_on": "eval:doc.enquiry_from===\"Customer\"", 
+   "fieldname": "customer", 
+   "fieldtype": "Link", 
+   "hidden": 0, 
+   "in_filter": 1, 
+   "in_list_view": 1, 
+   "label": "Customer", 
+   "oldfieldname": "customer", 
+   "oldfieldtype": "Link", 
+   "options": "Customer", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0, 
+   "reqd": 0, 
+   "search_index": 0
+  }, 
+  {
+   "depends_on": "eval:doc.enquiry_from===\"Lead\"", 
+   "fieldname": "lead", 
+   "fieldtype": "Link", 
+   "hidden": 0, 
+   "in_filter": 1, 
+   "in_list_view": 1, 
+   "label": "Lead", 
+   "oldfieldname": "lead", 
+   "oldfieldtype": "Link", 
+   "options": "Lead", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "column_break0", 
+   "fieldtype": "Column Break", 
+   "oldfieldtype": "Column Break", 
+   "permlevel": 0, 
+   "read_only": 0, 
+   "width": "50%"
+  }, 
+  {
+   "default": "Draft", 
+   "fieldname": "status", 
+   "fieldtype": "Select", 
+   "in_list_view": 1, 
+   "label": "Status", 
+   "no_copy": 1, 
+   "oldfieldname": "status", 
+   "oldfieldtype": "Select", 
+   "options": "Draft\nSubmitted\nQuotation\nLost\nCancelled\nReplied\nOpen", 
+   "permlevel": 0, 
+   "read_only": 1, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "enquiry_type", 
+   "fieldtype": "Select", 
+   "label": "Opportunity Type", 
+   "oldfieldname": "enquiry_type", 
+   "oldfieldtype": "Select", 
+   "options": "\nSales\nMaintenance", 
+   "permlevel": 0, 
+   "read_only": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "items", 
+   "fieldtype": "Section Break", 
+   "label": "Items", 
+   "oldfieldtype": "Section Break", 
+   "options": "icon-shopping-cart", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "description": "Items which do not exist in Item master can also be entered on customer's request", 
+   "fieldname": "enquiry_details", 
+   "fieldtype": "Table", 
+   "label": "Opportunity Items", 
+   "oldfieldname": "enquiry_details", 
+   "oldfieldtype": "Table", 
+   "options": "Opportunity Item", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "description": "Keep a track of communication related to this enquiry which will help for future reference.", 
+   "fieldname": "communication_history", 
+   "fieldtype": "Section Break", 
+   "label": "Communication History", 
+   "oldfieldtype": "Section Break", 
+   "options": "icon-comments", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "allow_on_submit": 1, 
+   "fieldname": "communication_html", 
+   "fieldtype": "HTML", 
+   "label": "Communication HTML", 
+   "oldfieldname": "follow_up", 
+   "oldfieldtype": "Table", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "depends_on": "eval:doc.lead || doc.customer", 
+   "fieldname": "contact_info", 
+   "fieldtype": "Section Break", 
+   "label": "Contact Info", 
+   "options": "icon-bullhorn", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "depends_on": "eval:doc.customer || doc.lead", 
+   "fieldname": "customer_address", 
+   "fieldtype": "Link", 
+   "in_filter": 1, 
+   "label": "Customer / Lead Address", 
+   "options": "Address", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "address_display", 
+   "fieldtype": "Small Text", 
+   "hidden": 1, 
+   "label": "Address", 
+   "oldfieldname": "address", 
+   "oldfieldtype": "Small Text", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "depends_on": "customer", 
+   "description": "<a href=\"#Sales Browser/Territory\">Add / Edit</a>", 
+   "fieldname": "territory", 
+   "fieldtype": "Link", 
+   "in_filter": 1, 
+   "label": "Territory", 
+   "options": "Territory", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0, 
+   "reqd": 0, 
+   "search_index": 1
+  }, 
+  {
+   "depends_on": "customer", 
+   "description": "<a href=\"#Sales Browser/Customer Group\">Add / Edit</a>", 
+   "fieldname": "customer_group", 
+   "fieldtype": "Link", 
+   "hidden": 0, 
+   "in_filter": 1, 
+   "label": "Customer Group", 
+   "oldfieldname": "customer_group", 
+   "oldfieldtype": "Link", 
+   "options": "Customer Group", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0, 
+   "reqd": 0, 
+   "search_index": 1
+  }, 
+  {
+   "fieldname": "column_break3", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "depends_on": "customer", 
+   "fieldname": "customer_name", 
+   "fieldtype": "Data", 
+   "label": "Customer Name", 
+   "permlevel": 0, 
+   "print_hide": 0, 
+   "read_only": 1
+  }, 
+  {
+   "depends_on": "eval:doc.lead || doc.customer", 
+   "fieldname": "contact_person", 
+   "fieldtype": "Link", 
+   "in_filter": 1, 
+   "label": "Contact Person", 
+   "options": "Contact", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0
+  }, 
+  {
+   "depends_on": "customer", 
+   "fieldname": "contact_display", 
+   "fieldtype": "Small Text", 
+   "label": "Contact", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "depends_on": "eval:doc.lead || doc.customer", 
+   "fieldname": "contact_email", 
+   "fieldtype": "Text", 
+   "label": "Contact Email", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "depends_on": "eval:doc.lead || doc.customer", 
+   "fieldname": "contact_mobile", 
+   "fieldtype": "Text", 
+   "label": "Contact Mobile No", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "more_info", 
+   "fieldtype": "Section Break", 
+   "label": "More Info", 
+   "oldfieldtype": "Section Break", 
+   "options": "icon-file-text", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "column_break1", 
+   "fieldtype": "Column Break", 
+   "oldfieldtype": "Column Break", 
+   "permlevel": 0, 
+   "read_only": 0, 
+   "width": "50%"
+  }, 
+  {
+   "default": "Today", 
+   "fieldname": "transaction_date", 
+   "fieldtype": "Date", 
+   "label": "Opportunity Date", 
+   "oldfieldname": "transaction_date", 
+   "oldfieldtype": "Date", 
+   "permlevel": 0, 
+   "read_only": 0, 
+   "reqd": 1, 
+   "width": "50px"
+  }, 
+  {
+   "fieldname": "fiscal_year", 
+   "fieldtype": "Select", 
+   "in_filter": 1, 
+   "label": "Fiscal Year", 
+   "oldfieldname": "fiscal_year", 
+   "oldfieldtype": "Select", 
+   "options": "link:Fiscal Year", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0, 
+   "reqd": 1, 
+   "search_index": 1
+  }, 
+  {
+   "fieldname": "source", 
+   "fieldtype": "Select", 
+   "label": "Source", 
+   "oldfieldname": "source", 
+   "oldfieldtype": "Select", 
+   "options": "\nExisting Customer\nReference\nAdvertisement\nCold Calling\nExhibition\nSupplier Reference\nMass Mailing\nCustomer's Vendor\nCampaign\nWalk In", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "description": "Enter name of campaign if source of enquiry is campaign", 
+   "fieldname": "campaign", 
+   "fieldtype": "Link", 
+   "label": "Campaign", 
+   "oldfieldname": "campaign", 
+   "oldfieldtype": "Link", 
+   "options": "Campaign", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "company", 
+   "fieldtype": "Link", 
+   "in_filter": 1, 
+   "label": "Company", 
+   "oldfieldname": "company", 
+   "oldfieldtype": "Link", 
+   "options": "Company", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0, 
+   "reqd": 1, 
+   "search_index": 1
+  }, 
+  {
+   "depends_on": "eval:!doc.__islocal", 
+   "fieldname": "order_lost_reason", 
+   "fieldtype": "Text", 
+   "label": "Lost Reason", 
+   "no_copy": 1, 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "column_break2", 
+   "fieldtype": "Column Break", 
+   "oldfieldtype": "Column Break", 
+   "permlevel": 0, 
+   "read_only": 0, 
+   "width": "50%"
+  }, 
+  {
+   "description": "Your sales person who will contact the customer in future", 
+   "fieldname": "contact_by", 
+   "fieldtype": "Link", 
+   "in_filter": 1, 
+   "label": "Next Contact By", 
+   "oldfieldname": "contact_by", 
+   "oldfieldtype": "Link", 
+   "options": "User", 
+   "permlevel": 0, 
+   "read_only": 0, 
+   "width": "75px"
+  }, 
+  {
+   "description": "Your sales person will get a reminder on this date to contact the customer", 
+   "fieldname": "contact_date", 
+   "fieldtype": "Date", 
+   "label": "Next Contact Date", 
+   "oldfieldname": "contact_date", 
+   "oldfieldtype": "Date", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "to_discuss", 
+   "fieldtype": "Small Text", 
+   "label": "To Discuss", 
+   "no_copy": 1, 
+   "oldfieldname": "to_discuss", 
+   "oldfieldtype": "Small Text", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "amended_from", 
+   "fieldtype": "Data", 
+   "ignore_restrictions": 1, 
+   "label": "Amended From", 
+   "no_copy": 1, 
+   "oldfieldname": "amended_from", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1, 
+   "width": "150px"
+  }, 
+  {
+   "fieldname": "communications", 
+   "fieldtype": "Table", 
+   "hidden": 1, 
+   "label": "Communications", 
+   "options": "Communication", 
+   "permlevel": 0, 
+   "print_hide": 1
+  }
+ ], 
+ "icon": "icon-info-sign", 
+ "idx": 1, 
+ "is_submittable": 1, 
+ "modified": "2014-01-20 17:48:59", 
+ "modified_by": "Administrator", 
+ "module": "Selling", 
+ "name": "Opportunity", 
+ "owner": "Administrator", 
+ "permissions": [
+  {
+   "amend": 1, 
+   "cancel": 1, 
+   "create": 1, 
+   "delete": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Sales User", 
+   "submit": 1, 
+   "write": 1
+  }, 
+  {
+   "amend": 1, 
+   "cancel": 1, 
+   "create": 1, 
+   "delete": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Sales Manager", 
+   "submit": 1, 
+   "write": 1
+  }
+ ], 
+ "search_fields": "status,transaction_date,customer,lead,enquiry_type,territory,company"
+}
\ No newline at end of file
diff --git a/erpnext/selling/doctype/opportunity_item/opportunity_item.txt b/erpnext/selling/doctype/opportunity_item/opportunity_item.txt
index 22023ed..e16731b 100644
--- a/erpnext/selling/doctype/opportunity_item/opportunity_item.txt
+++ b/erpnext/selling/doctype/opportunity_item/opportunity_item.txt
@@ -1,136 +1,123 @@
-[
- {
-  "creation": "2013-02-22 01:27:51", 
-  "docstatus": 0, 
-  "modified": "2014-02-03 12:40:44", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "doctype": "DocType", 
-  "istable": 1, 
-  "module": "Selling", 
-  "name": "__common__"
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "Opportunity Item", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Opportunity Item"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "item_code", 
-  "fieldtype": "Link", 
-  "in_list_view": 1, 
-  "label": "Item Code", 
-  "oldfieldname": "item_code", 
-  "oldfieldtype": "Link", 
-  "options": "Item", 
-  "reqd": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "item_name", 
-  "fieldtype": "Data", 
-  "in_list_view": 1, 
-  "label": "Item Name", 
-  "oldfieldname": "item_name", 
-  "oldfieldtype": "Data", 
-  "reqd": 1
- }, 
- {
-  "description": "<a href=\"#Sales Browser/Item Group\">Add / Edit</a>", 
-  "doctype": "DocField", 
-  "fieldname": "item_group", 
-  "fieldtype": "Link", 
-  "hidden": 1, 
-  "in_list_view": 0, 
-  "label": "Item Group", 
-  "oldfieldname": "item_group", 
-  "oldfieldtype": "Link", 
-  "options": "Item Group", 
-  "print_hide": 1, 
-  "search_index": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "brand", 
-  "fieldtype": "Link", 
-  "hidden": 1, 
-  "in_list_view": 0, 
-  "label": "Brand", 
-  "oldfieldname": "brand", 
-  "oldfieldtype": "Link", 
-  "options": "Brand", 
-  "print_hide": 1, 
-  "search_index": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "col_break1", 
-  "fieldtype": "Column Break"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "description", 
-  "fieldtype": "Text", 
-  "in_list_view": 1, 
-  "label": "Description", 
-  "oldfieldname": "description", 
-  "oldfieldtype": "Text", 
-  "print_width": "300px", 
-  "reqd": 1, 
-  "width": "300px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "quantity_and_rate", 
-  "fieldtype": "Section Break", 
-  "in_list_view": 0, 
-  "label": "Quantity and Rate"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "qty", 
-  "fieldtype": "Float", 
-  "in_list_view": 1, 
-  "label": "Qty", 
-  "oldfieldname": "qty", 
-  "oldfieldtype": "Currency"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "basic_rate", 
-  "fieldtype": "Currency", 
-  "hidden": 1, 
-  "in_list_view": 0, 
-  "label": "Basic Rate", 
-  "oldfieldname": "basic_rate", 
-  "oldfieldtype": "Currency", 
-  "options": "Company:company:default_currency", 
-  "print_hide": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "col_break2", 
-  "fieldtype": "Column Break"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "uom", 
-  "fieldtype": "Link", 
-  "in_list_view": 0, 
-  "label": "UOM", 
-  "oldfieldname": "uom", 
-  "oldfieldtype": "Link", 
-  "options": "UOM", 
-  "search_index": 0
- }
-]
\ No newline at end of file
+{
+ "creation": "2013-02-22 01:27:51", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "fields": [
+  {
+   "fieldname": "item_code", 
+   "fieldtype": "Link", 
+   "in_list_view": 1, 
+   "label": "Item Code", 
+   "oldfieldname": "item_code", 
+   "oldfieldtype": "Link", 
+   "options": "Item", 
+   "permlevel": 0, 
+   "reqd": 0
+  }, 
+  {
+   "fieldname": "item_name", 
+   "fieldtype": "Data", 
+   "in_list_view": 1, 
+   "label": "Item Name", 
+   "oldfieldname": "item_name", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "reqd": 1
+  }, 
+  {
+   "description": "<a href=\"#Sales Browser/Item Group\">Add / Edit</a>", 
+   "fieldname": "item_group", 
+   "fieldtype": "Link", 
+   "hidden": 1, 
+   "in_list_view": 0, 
+   "label": "Item Group", 
+   "oldfieldname": "item_group", 
+   "oldfieldtype": "Link", 
+   "options": "Item Group", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "search_index": 0
+  }, 
+  {
+   "fieldname": "brand", 
+   "fieldtype": "Link", 
+   "hidden": 1, 
+   "in_list_view": 0, 
+   "label": "Brand", 
+   "oldfieldname": "brand", 
+   "oldfieldtype": "Link", 
+   "options": "Brand", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "search_index": 0
+  }, 
+  {
+   "fieldname": "col_break1", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "description", 
+   "fieldtype": "Text", 
+   "in_list_view": 1, 
+   "label": "Description", 
+   "oldfieldname": "description", 
+   "oldfieldtype": "Text", 
+   "permlevel": 0, 
+   "print_width": "300px", 
+   "reqd": 1, 
+   "width": "300px"
+  }, 
+  {
+   "fieldname": "quantity_and_rate", 
+   "fieldtype": "Section Break", 
+   "in_list_view": 0, 
+   "label": "Quantity and Rate", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "qty", 
+   "fieldtype": "Float", 
+   "in_list_view": 1, 
+   "label": "Qty", 
+   "oldfieldname": "qty", 
+   "oldfieldtype": "Currency", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "basic_rate", 
+   "fieldtype": "Currency", 
+   "hidden": 1, 
+   "in_list_view": 0, 
+   "label": "Basic Rate", 
+   "oldfieldname": "basic_rate", 
+   "oldfieldtype": "Currency", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "print_hide": 1
+  }, 
+  {
+   "fieldname": "col_break2", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "uom", 
+   "fieldtype": "Link", 
+   "in_list_view": 0, 
+   "label": "UOM", 
+   "oldfieldname": "uom", 
+   "oldfieldtype": "Link", 
+   "options": "UOM", 
+   "permlevel": 0, 
+   "search_index": 0
+  }
+ ], 
+ "idx": 1, 
+ "istable": 1, 
+ "modified": "2014-02-03 12:40:44", 
+ "modified_by": "Administrator", 
+ "module": "Selling", 
+ "name": "Opportunity Item", 
+ "owner": "Administrator"
+}
\ No newline at end of file
diff --git a/erpnext/selling/doctype/quotation/quotation.txt b/erpnext/selling/doctype/quotation/quotation.txt
index 0508e5d..753b344 100644
--- a/erpnext/selling/doctype/quotation/quotation.txt
+++ b/erpnext/selling/doctype/quotation/quotation.txt
@@ -1,903 +1,900 @@
-[
- {
-  "creation": "2013-05-24 19:29:08", 
-  "docstatus": 0, 
-  "modified": "2014-01-31 19:43:00", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "allow_attach": 1, 
-  "allow_import": 1, 
-  "autoname": "naming_series:", 
-  "doctype": "DocType", 
-  "document_type": "Transaction", 
-  "hide_toolbar": 0, 
-  "icon": "icon-shopping-cart", 
-  "is_submittable": 1, 
-  "max_attachments": 1, 
-  "module": "Selling", 
-  "name": "__common__", 
-  "read_only_onload": 1, 
-  "search_fields": "status,transaction_date,customer,lead,order_type"
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "Quotation", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "doctype": "DocPerm", 
-  "email": 1, 
-  "name": "__common__", 
-  "parent": "Quotation", 
-  "parentfield": "permissions", 
-  "parenttype": "DocType", 
-  "permlevel": 0, 
-  "print": 1, 
-  "read": 1, 
-  "report": 1
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Quotation"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "customer_section", 
-  "fieldtype": "Section Break", 
-  "label": "Customer", 
-  "options": "icon-user"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break0", 
-  "fieldtype": "Column Break", 
-  "read_only": 0, 
-  "width": "50%"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "naming_series", 
-  "fieldtype": "Select", 
-  "label": "Series", 
-  "no_copy": 1, 
-  "oldfieldname": "naming_series", 
-  "oldfieldtype": "Select", 
-  "options": "QTN", 
-  "print_hide": 1, 
-  "read_only": 0, 
-  "reqd": 1
- }, 
- {
-  "default": "Customer", 
-  "doctype": "DocField", 
-  "fieldname": "quotation_to", 
-  "fieldtype": "Select", 
-  "in_filter": 1, 
-  "label": "Quotation To", 
-  "oldfieldname": "quotation_to", 
-  "oldfieldtype": "Select", 
-  "options": "\nLead\nCustomer", 
-  "print_hide": 1, 
-  "read_only": 0, 
-  "report_hide": 0, 
-  "reqd": 1
- }, 
- {
-  "depends_on": "eval:doc.quotation_to == \"Customer\"", 
-  "doctype": "DocField", 
-  "fieldname": "customer", 
-  "fieldtype": "Link", 
-  "hidden": 0, 
-  "in_filter": 1, 
-  "label": "Customer", 
-  "oldfieldname": "customer", 
-  "oldfieldtype": "Link", 
-  "options": "Customer", 
-  "print_hide": 1, 
-  "read_only": 0, 
-  "search_index": 1
- }, 
- {
-  "depends_on": "eval:doc.quotation_to == \"Lead\"", 
-  "doctype": "DocField", 
-  "fieldname": "lead", 
-  "fieldtype": "Link", 
-  "hidden": 0, 
-  "in_filter": 1, 
-  "label": "Lead", 
-  "oldfieldname": "lead", 
-  "oldfieldtype": "Link", 
-  "options": "Lead", 
-  "print_hide": 1, 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "customer_name", 
-  "fieldtype": "Data", 
-  "hidden": 1, 
-  "in_list_view": 1, 
-  "label": "Customer Name", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "address_display", 
-  "fieldtype": "Small Text", 
-  "hidden": 1, 
-  "in_filter": 0, 
-  "label": "Address", 
-  "oldfieldname": "customer_address", 
-  "oldfieldtype": "Small Text", 
-  "print_hide": 0, 
-  "read_only": 1, 
-  "reqd": 0, 
-  "search_index": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "contact_display", 
-  "fieldtype": "Small Text", 
-  "hidden": 1, 
-  "in_filter": 0, 
-  "label": "Contact", 
-  "print_hide": 0, 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "contact_mobile", 
-  "fieldtype": "Text", 
-  "hidden": 1, 
-  "label": "Mobile No", 
-  "print_hide": 0, 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "contact_email", 
-  "fieldtype": "Text", 
-  "hidden": 1, 
-  "label": "Contact Email", 
-  "print_hide": 1, 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break1", 
-  "fieldtype": "Column Break", 
-  "oldfieldtype": "Column Break", 
-  "read_only": 0, 
-  "width": "50%"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "amended_from", 
-  "fieldtype": "Data", 
-  "ignore_restrictions": 1, 
-  "label": "Amended From", 
-  "no_copy": 1, 
-  "oldfieldname": "amended_from", 
-  "oldfieldtype": "Data", 
-  "print_hide": 1, 
-  "read_only": 1, 
-  "width": "150px"
- }, 
- {
-  "description": "Select the relevant company name if you have multiple companies.", 
-  "doctype": "DocField", 
-  "fieldname": "company", 
-  "fieldtype": "Link", 
-  "in_filter": 1, 
-  "label": "Company", 
-  "oldfieldname": "company", 
-  "oldfieldtype": "Link", 
-  "options": "Company", 
-  "print_hide": 1, 
-  "read_only": 0, 
-  "reqd": 1, 
-  "search_index": 0, 
-  "width": "150px"
- }, 
- {
-  "default": "Today", 
-  "doctype": "DocField", 
-  "fieldname": "transaction_date", 
-  "fieldtype": "Date", 
-  "in_filter": 1, 
-  "label": "Quotation Date", 
-  "no_copy": 1, 
-  "oldfieldname": "transaction_date", 
-  "oldfieldtype": "Date", 
-  "read_only": 0, 
-  "reqd": 1, 
-  "search_index": 1, 
-  "width": "100px"
- }, 
- {
-  "default": "Sales", 
-  "doctype": "DocField", 
-  "fieldname": "order_type", 
-  "fieldtype": "Select", 
-  "in_filter": 1, 
-  "label": "Order Type", 
-  "oldfieldname": "order_type", 
-  "oldfieldtype": "Select", 
-  "options": "\nSales\nMaintenance\nShopping Cart", 
-  "print_hide": 1, 
-  "read_only": 0, 
-  "reqd": 1, 
-  "search_index": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "section_break0", 
-  "fieldtype": "Section Break", 
-  "label": "Currency and Price List", 
-  "options": "icon-tag", 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "currency", 
-  "fieldtype": "Link", 
-  "in_filter": 1, 
-  "label": "Currency", 
-  "oldfieldname": "currency", 
-  "oldfieldtype": "Select", 
-  "options": "Currency", 
-  "print_hide": 1, 
-  "read_only": 0, 
-  "reqd": 1, 
-  "search_index": 0, 
-  "width": "100px"
- }, 
- {
-  "description": "Rate at which customer's currency is converted to company's base currency", 
-  "doctype": "DocField", 
-  "fieldname": "conversion_rate", 
-  "fieldtype": "Float", 
-  "label": "Exchange Rate", 
-  "oldfieldname": "conversion_rate", 
-  "oldfieldtype": "Currency", 
-  "print_hide": 1, 
-  "read_only": 0, 
-  "reqd": 1, 
-  "width": "100px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break2", 
-  "fieldtype": "Column Break", 
-  "read_only": 0, 
-  "width": "50%"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "selling_price_list", 
-  "fieldtype": "Link", 
-  "in_filter": 1, 
-  "label": "Price List", 
-  "oldfieldname": "price_list_name", 
-  "oldfieldtype": "Select", 
-  "options": "Price List", 
-  "print_hide": 1, 
-  "read_only": 0, 
-  "reqd": 1, 
-  "search_index": 0, 
-  "width": "100px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "price_list_currency", 
-  "fieldtype": "Link", 
-  "label": "Price List Currency", 
-  "options": "Currency", 
-  "print_hide": 1, 
-  "read_only": 1, 
-  "reqd": 1
- }, 
- {
-  "description": "Rate at which Price list currency is converted to company's base currency", 
-  "doctype": "DocField", 
-  "fieldname": "plc_conversion_rate", 
-  "fieldtype": "Float", 
-  "label": "Price List Exchange Rate", 
-  "print_hide": 1, 
-  "read_only": 0, 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "items", 
-  "fieldtype": "Section Break", 
-  "label": "Items", 
-  "oldfieldtype": "Section Break", 
-  "options": "icon-shopping-cart", 
-  "print_hide": 0, 
-  "read_only": 0, 
-  "search_index": 0
- }, 
- {
-  "allow_on_submit": 1, 
-  "doctype": "DocField", 
-  "fieldname": "quotation_details", 
-  "fieldtype": "Table", 
-  "label": "Quotation Items", 
-  "oldfieldname": "quotation_details", 
-  "oldfieldtype": "Table", 
-  "options": "Quotation Item", 
-  "read_only": 0, 
-  "reqd": 0, 
-  "width": "40px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "sec_break23", 
-  "fieldtype": "Section Break", 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "net_total_export", 
-  "fieldtype": "Currency", 
-  "label": "Net Total", 
-  "options": "currency", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break_28", 
-  "fieldtype": "Column Break"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "net_total", 
-  "fieldtype": "Currency", 
-  "label": "Net Total (Company Currency)", 
-  "no_copy": 0, 
-  "oldfieldname": "net_total", 
-  "oldfieldtype": "Currency", 
-  "options": "Company:company:default_currency", 
-  "print_hide": 1, 
-  "read_only": 1, 
-  "reqd": 0, 
-  "width": "100px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "taxes", 
-  "fieldtype": "Section Break", 
-  "label": "Taxes and Charges", 
-  "oldfieldtype": "Section Break", 
-  "options": "icon-money", 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "taxes_and_charges", 
-  "fieldtype": "Link", 
-  "hidden": 0, 
-  "label": "Taxes and Charges", 
-  "oldfieldname": "charge", 
-  "oldfieldtype": "Link", 
-  "options": "Sales Taxes and Charges Master", 
-  "print_hide": 1, 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break_34", 
-  "fieldtype": "Column Break"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "shipping_rule", 
-  "fieldtype": "Link", 
-  "hidden": 0, 
-  "label": "Shipping Rule", 
-  "oldfieldtype": "Button", 
-  "options": "Shipping Rule", 
-  "print_hide": 1, 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "section_break_36", 
-  "fieldtype": "Section Break"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "other_charges", 
-  "fieldtype": "Table", 
-  "label": "Sales Taxes and Charges", 
-  "oldfieldname": "other_charges", 
-  "oldfieldtype": "Table", 
-  "options": "Sales Taxes and Charges", 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "other_charges_calculation", 
-  "fieldtype": "HTML", 
-  "label": "Taxes and Charges Calculation", 
-  "oldfieldtype": "HTML", 
-  "print_hide": 1, 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "section_break_39", 
-  "fieldtype": "Section Break"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "other_charges_total_export", 
-  "fieldtype": "Currency", 
-  "label": "Taxes and Charges Total", 
-  "options": "currency", 
-  "print_hide": 1, 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break_42", 
-  "fieldtype": "Column Break"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "other_charges_total", 
-  "fieldtype": "Currency", 
-  "label": "Taxes and Charges Total (Company Currency)", 
-  "oldfieldname": "other_charges_total", 
-  "oldfieldtype": "Currency", 
-  "options": "Company:company:default_currency", 
-  "print_hide": 1, 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "discount_amount", 
-  "fieldtype": "Currency", 
-  "label": "Discount Amount", 
-  "options": "Company:company:default_currency"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "totals", 
-  "fieldtype": "Section Break", 
-  "label": "Totals", 
-  "oldfieldtype": "Section Break", 
-  "options": "icon-money", 
-  "print_hide": 1, 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "grand_total_export", 
-  "fieldtype": "Currency", 
-  "in_list_view": 1, 
-  "label": "Grand Total", 
-  "no_copy": 0, 
-  "oldfieldname": "grand_total_export", 
-  "oldfieldtype": "Currency", 
-  "options": "currency", 
-  "print_hide": 0, 
-  "read_only": 1, 
-  "reqd": 0, 
-  "width": "200px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "rounded_total_export", 
-  "fieldtype": "Currency", 
-  "label": "Rounded Total", 
-  "no_copy": 0, 
-  "oldfieldname": "rounded_total_export", 
-  "oldfieldtype": "Currency", 
-  "options": "currency", 
-  "print_hide": 0, 
-  "read_only": 1, 
-  "reqd": 0, 
-  "width": "200px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "in_words_export", 
-  "fieldtype": "Data", 
-  "label": "In Words", 
-  "no_copy": 0, 
-  "oldfieldname": "in_words_export", 
-  "oldfieldtype": "Data", 
-  "print_hide": 0, 
-  "read_only": 1, 
-  "width": "200px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break3", 
-  "fieldtype": "Column Break", 
-  "oldfieldtype": "Column Break", 
-  "print_hide": 1, 
-  "read_only": 0, 
-  "width": "50%"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "grand_total", 
-  "fieldtype": "Currency", 
-  "label": "Grand Total (Company Currency)", 
-  "no_copy": 0, 
-  "oldfieldname": "grand_total", 
-  "oldfieldtype": "Currency", 
-  "options": "Company:company:default_currency", 
-  "print_hide": 1, 
-  "read_only": 1, 
-  "reqd": 0, 
-  "width": "200px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "rounded_total", 
-  "fieldtype": "Currency", 
-  "label": "Rounded Total (Company Currency)", 
-  "no_copy": 0, 
-  "oldfieldname": "rounded_total", 
-  "oldfieldtype": "Currency", 
-  "options": "Company:company:default_currency", 
-  "print_hide": 1, 
-  "read_only": 1, 
-  "width": "200px"
- }, 
- {
-  "description": "In Words will be visible once you save the Quotation.", 
-  "doctype": "DocField", 
-  "fieldname": "in_words", 
-  "fieldtype": "Data", 
-  "label": "In Words (Company Currency)", 
-  "no_copy": 0, 
-  "oldfieldname": "in_words", 
-  "oldfieldtype": "Data", 
-  "print_hide": 1, 
-  "read_only": 1, 
-  "width": "200px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "terms_section_break", 
-  "fieldtype": "Section Break", 
-  "label": "Terms and Conditions", 
-  "oldfieldtype": "Section Break", 
-  "options": "icon-legal", 
-  "print_hide": 0, 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "tc_name", 
-  "fieldtype": "Link", 
-  "label": "Terms", 
-  "oldfieldname": "tc_name", 
-  "oldfieldtype": "Link", 
-  "options": "Terms and Conditions", 
-  "print_hide": 1, 
-  "read_only": 0, 
-  "report_hide": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "terms", 
-  "fieldtype": "Text Editor", 
-  "label": "Term Details", 
-  "oldfieldname": "terms", 
-  "oldfieldtype": "Text Editor", 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "contact_section", 
-  "fieldtype": "Section Break", 
-  "label": "Contact Info", 
-  "options": "icon-bullhorn", 
-  "read_only": 0
- }, 
- {
-  "description": "<a href=\"#Sales Browser/Territory\">Add / Edit</a>", 
-  "doctype": "DocField", 
-  "fieldname": "territory", 
-  "fieldtype": "Link", 
-  "hidden": 0, 
-  "in_filter": 1, 
-  "label": "Territory", 
-  "options": "Territory", 
-  "print_hide": 1, 
-  "read_only": 0, 
-  "reqd": 1, 
-  "search_index": 0
- }, 
- {
-  "depends_on": "customer", 
-  "description": "<a href=\"#Sales Browser/Customer Group\">Add / Edit</a>", 
-  "doctype": "DocField", 
-  "fieldname": "customer_group", 
-  "fieldtype": "Link", 
-  "in_filter": 1, 
-  "label": "Customer Group", 
-  "oldfieldname": "customer_group", 
-  "oldfieldtype": "Link", 
-  "options": "Customer Group", 
-  "print_hide": 1, 
-  "read_only": 0, 
-  "reqd": 0, 
-  "search_index": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "shipping_address_name", 
-  "fieldtype": "Link", 
-  "hidden": 0, 
-  "label": "Shipping Address", 
-  "options": "Address", 
-  "print_hide": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "shipping_address", 
-  "fieldtype": "Small Text", 
-  "hidden": 1, 
-  "label": "Shipping Address", 
-  "print_hide": 1, 
-  "read_only": 1
- }, 
- {
-  "depends_on": "customer", 
-  "doctype": "DocField", 
-  "fieldname": "col_break98", 
-  "fieldtype": "Column Break", 
-  "read_only": 0, 
-  "width": "50%"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "customer_address", 
-  "fieldtype": "Link", 
-  "hidden": 0, 
-  "in_filter": 1, 
-  "label": "Customer Address", 
-  "options": "Address", 
-  "print_hide": 1, 
-  "read_only": 0
- }, 
- {
-  "depends_on": "eval:doc.customer", 
-  "doctype": "DocField", 
-  "fieldname": "contact_person", 
-  "fieldtype": "Link", 
-  "hidden": 0, 
-  "in_filter": 1, 
-  "label": "Contact Person", 
-  "oldfieldname": "contact_person", 
-  "oldfieldtype": "Link", 
-  "options": "Contact", 
-  "print_hide": 1, 
-  "read_only": 0, 
-  "reqd": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "more_info", 
-  "fieldtype": "Section Break", 
-  "label": "More Info", 
-  "oldfieldtype": "Section Break", 
-  "options": "icon-file-text", 
-  "print_hide": 1, 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "campaign", 
-  "fieldtype": "Link", 
-  "hidden": 0, 
-  "label": "Campaign", 
-  "no_copy": 0, 
-  "oldfieldname": "campaign", 
-  "oldfieldtype": "Link", 
-  "options": "Campaign", 
-  "print_hide": 1, 
-  "read_only": 0, 
-  "report_hide": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "source", 
-  "fieldtype": "Select", 
-  "hidden": 0, 
-  "label": "Source", 
-  "no_copy": 0, 
-  "oldfieldname": "source", 
-  "oldfieldtype": "Select", 
-  "options": "\nExisting Customer\nReference\nAdvertisement\nCold Calling\nExhibition\nSupplier Reference\nMass Mailing\nCustomer's Vendor\nCampaign", 
-  "print_hide": 1, 
-  "read_only": 0, 
-  "report_hide": 0
- }, 
- {
-  "allow_on_submit": 0, 
-  "default": "Draft", 
-  "doctype": "DocField", 
-  "fieldname": "status", 
-  "fieldtype": "Select", 
-  "in_filter": 1, 
-  "in_list_view": 1, 
-  "label": "Status", 
-  "no_copy": 1, 
-  "oldfieldname": "status", 
-  "oldfieldtype": "Select", 
-  "options": "Draft\nSubmitted\nOrdered\nLost\nCancelled", 
-  "print_hide": 1, 
-  "read_only": 1, 
-  "reqd": 1, 
-  "search_index": 0
- }, 
- {
-  "allow_on_submit": 1, 
-  "doctype": "DocField", 
-  "fieldname": "order_lost_reason", 
-  "fieldtype": "Small Text", 
-  "label": "Quotation Lost Reason", 
-  "no_copy": 1, 
-  "oldfieldname": "order_lost_reason", 
-  "oldfieldtype": "Small Text", 
-  "print_hide": 1, 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break4", 
-  "fieldtype": "Column Break", 
-  "oldfieldtype": "Column Break", 
-  "print_hide": 1, 
-  "read_only": 0, 
-  "width": "50%"
- }, 
- {
-  "allow_on_submit": 1, 
-  "doctype": "DocField", 
-  "fieldname": "letter_head", 
-  "fieldtype": "Select", 
-  "label": "Letter Head", 
-  "oldfieldname": "letter_head", 
-  "oldfieldtype": "Select", 
-  "options": "link:Letter Head", 
-  "print_hide": 1, 
-  "read_only": 0
- }, 
- {
-  "allow_on_submit": 1, 
-  "doctype": "DocField", 
-  "fieldname": "select_print_heading", 
-  "fieldtype": "Link", 
-  "label": "Print Heading", 
-  "no_copy": 1, 
-  "oldfieldname": "select_print_heading", 
-  "oldfieldtype": "Link", 
-  "options": "Print Heading", 
-  "print_hide": 1, 
-  "read_only": 0, 
-  "report_hide": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "fiscal_year", 
-  "fieldtype": "Select", 
-  "in_filter": 1, 
-  "label": "Fiscal Year", 
-  "oldfieldname": "fiscal_year", 
-  "oldfieldtype": "Select", 
-  "options": "link:Fiscal Year", 
-  "print_hide": 1, 
-  "read_only": 0, 
-  "reqd": 1, 
-  "search_index": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "enq_det", 
-  "fieldtype": "Text", 
-  "hidden": 1, 
-  "label": "Opportunity Item", 
-  "no_copy": 0, 
-  "oldfieldname": "enq_det", 
-  "oldfieldtype": "Text", 
-  "print_hide": 1, 
-  "read_only": 1, 
-  "report_hide": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "communication_history", 
-  "fieldtype": "Section Break", 
-  "label": "Communication History", 
-  "oldfieldtype": "Section Break", 
-  "options": "icon-comments", 
-  "print_hide": 1, 
-  "read_only": 0
- }, 
- {
-  "allow_on_submit": 1, 
-  "depends_on": "eval:!doc.__islocal", 
-  "doctype": "DocField", 
-  "fieldname": "communication_html", 
-  "fieldtype": "HTML", 
-  "label": "Communication HTML", 
-  "oldfieldname": "follow_up", 
-  "oldfieldtype": "Table", 
-  "print_hide": 1, 
-  "read_only": 0, 
-  "width": "40px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "communications", 
-  "fieldtype": "Table", 
-  "hidden": 1, 
-  "label": "Communications", 
-  "options": "Communication", 
-  "print_hide": 1
- }, 
- {
-  "amend": 1, 
-  "cancel": 1, 
-  "create": 1, 
-  "delete": 1, 
-  "doctype": "DocPerm", 
-  "role": "Sales Manager", 
-  "submit": 1, 
-  "write": 1
- }, 
- {
-  "amend": 1, 
-  "cancel": 1, 
-  "create": 1, 
-  "delete": 1, 
-  "doctype": "DocPerm", 
-  "role": "Sales User", 
-  "submit": 1, 
-  "write": 1
- }, 
- {
-  "amend": 0, 
-  "cancel": 0, 
-  "create": 0, 
-  "delete": 0, 
-  "doctype": "DocPerm", 
-  "role": "Customer", 
-  "submit": 0, 
-  "write": 0
- }, 
- {
-  "amend": 1, 
-  "cancel": 1, 
-  "create": 1, 
-  "delete": 1, 
-  "doctype": "DocPerm", 
-  "role": "Maintenance Manager", 
-  "submit": 1, 
-  "write": 1
- }, 
- {
-  "amend": 1, 
-  "cancel": 1, 
-  "create": 1, 
-  "delete": 1, 
-  "doctype": "DocPerm", 
-  "role": "Maintenance User", 
-  "submit": 1, 
-  "write": 1
- }
-]
\ No newline at end of file
+{
+ "allow_attach": 1, 
+ "allow_import": 1, 
+ "autoname": "naming_series:", 
+ "creation": "2013-05-24 19:29:08", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "document_type": "Transaction", 
+ "fields": [
+  {
+   "fieldname": "customer_section", 
+   "fieldtype": "Section Break", 
+   "label": "Customer", 
+   "options": "icon-user", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "column_break0", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0, 
+   "read_only": 0, 
+   "width": "50%"
+  }, 
+  {
+   "fieldname": "naming_series", 
+   "fieldtype": "Select", 
+   "label": "Series", 
+   "no_copy": 1, 
+   "oldfieldname": "naming_series", 
+   "oldfieldtype": "Select", 
+   "options": "QTN", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0, 
+   "reqd": 1
+  }, 
+  {
+   "default": "Customer", 
+   "fieldname": "quotation_to", 
+   "fieldtype": "Select", 
+   "in_filter": 1, 
+   "label": "Quotation To", 
+   "oldfieldname": "quotation_to", 
+   "oldfieldtype": "Select", 
+   "options": "\nLead\nCustomer", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0, 
+   "report_hide": 0, 
+   "reqd": 1
+  }, 
+  {
+   "depends_on": "eval:doc.quotation_to == \"Customer\"", 
+   "fieldname": "customer", 
+   "fieldtype": "Link", 
+   "hidden": 0, 
+   "in_filter": 1, 
+   "label": "Customer", 
+   "oldfieldname": "customer", 
+   "oldfieldtype": "Link", 
+   "options": "Customer", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0, 
+   "search_index": 1
+  }, 
+  {
+   "depends_on": "eval:doc.quotation_to == \"Lead\"", 
+   "fieldname": "lead", 
+   "fieldtype": "Link", 
+   "hidden": 0, 
+   "in_filter": 1, 
+   "label": "Lead", 
+   "oldfieldname": "lead", 
+   "oldfieldtype": "Link", 
+   "options": "Lead", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "customer_name", 
+   "fieldtype": "Data", 
+   "hidden": 1, 
+   "in_list_view": 1, 
+   "label": "Customer Name", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "address_display", 
+   "fieldtype": "Small Text", 
+   "hidden": 1, 
+   "in_filter": 0, 
+   "label": "Address", 
+   "oldfieldname": "customer_address", 
+   "oldfieldtype": "Small Text", 
+   "permlevel": 0, 
+   "print_hide": 0, 
+   "read_only": 1, 
+   "reqd": 0, 
+   "search_index": 0
+  }, 
+  {
+   "fieldname": "contact_display", 
+   "fieldtype": "Small Text", 
+   "hidden": 1, 
+   "in_filter": 0, 
+   "label": "Contact", 
+   "permlevel": 0, 
+   "print_hide": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "contact_mobile", 
+   "fieldtype": "Text", 
+   "hidden": 1, 
+   "label": "Mobile No", 
+   "permlevel": 0, 
+   "print_hide": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "contact_email", 
+   "fieldtype": "Text", 
+   "hidden": 1, 
+   "label": "Contact Email", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "column_break1", 
+   "fieldtype": "Column Break", 
+   "oldfieldtype": "Column Break", 
+   "permlevel": 0, 
+   "read_only": 0, 
+   "width": "50%"
+  }, 
+  {
+   "fieldname": "amended_from", 
+   "fieldtype": "Data", 
+   "ignore_restrictions": 1, 
+   "label": "Amended From", 
+   "no_copy": 1, 
+   "oldfieldname": "amended_from", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1, 
+   "width": "150px"
+  }, 
+  {
+   "description": "Select the relevant company name if you have multiple companies.", 
+   "fieldname": "company", 
+   "fieldtype": "Link", 
+   "in_filter": 1, 
+   "label": "Company", 
+   "oldfieldname": "company", 
+   "oldfieldtype": "Link", 
+   "options": "Company", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0, 
+   "reqd": 1, 
+   "search_index": 0, 
+   "width": "150px"
+  }, 
+  {
+   "default": "Today", 
+   "fieldname": "transaction_date", 
+   "fieldtype": "Date", 
+   "in_filter": 1, 
+   "label": "Quotation Date", 
+   "no_copy": 1, 
+   "oldfieldname": "transaction_date", 
+   "oldfieldtype": "Date", 
+   "permlevel": 0, 
+   "read_only": 0, 
+   "reqd": 1, 
+   "search_index": 1, 
+   "width": "100px"
+  }, 
+  {
+   "default": "Sales", 
+   "fieldname": "order_type", 
+   "fieldtype": "Select", 
+   "in_filter": 1, 
+   "label": "Order Type", 
+   "oldfieldname": "order_type", 
+   "oldfieldtype": "Select", 
+   "options": "\nSales\nMaintenance\nShopping Cart", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0, 
+   "reqd": 1, 
+   "search_index": 0
+  }, 
+  {
+   "fieldname": "section_break0", 
+   "fieldtype": "Section Break", 
+   "label": "Currency and Price List", 
+   "options": "icon-tag", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "currency", 
+   "fieldtype": "Link", 
+   "in_filter": 1, 
+   "label": "Currency", 
+   "oldfieldname": "currency", 
+   "oldfieldtype": "Select", 
+   "options": "Currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0, 
+   "reqd": 1, 
+   "search_index": 0, 
+   "width": "100px"
+  }, 
+  {
+   "description": "Rate at which customer's currency is converted to company's base currency", 
+   "fieldname": "conversion_rate", 
+   "fieldtype": "Float", 
+   "label": "Exchange Rate", 
+   "oldfieldname": "conversion_rate", 
+   "oldfieldtype": "Currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0, 
+   "reqd": 1, 
+   "width": "100px"
+  }, 
+  {
+   "fieldname": "column_break2", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0, 
+   "read_only": 0, 
+   "width": "50%"
+  }, 
+  {
+   "fieldname": "selling_price_list", 
+   "fieldtype": "Link", 
+   "in_filter": 1, 
+   "label": "Price List", 
+   "oldfieldname": "price_list_name", 
+   "oldfieldtype": "Select", 
+   "options": "Price List", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0, 
+   "reqd": 1, 
+   "search_index": 0, 
+   "width": "100px"
+  }, 
+  {
+   "fieldname": "price_list_currency", 
+   "fieldtype": "Link", 
+   "label": "Price List Currency", 
+   "options": "Currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1, 
+   "reqd": 1
+  }, 
+  {
+   "description": "Rate at which Price list currency is converted to company's base currency", 
+   "fieldname": "plc_conversion_rate", 
+   "fieldtype": "Float", 
+   "label": "Price List Exchange Rate", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "items", 
+   "fieldtype": "Section Break", 
+   "label": "Items", 
+   "oldfieldtype": "Section Break", 
+   "options": "icon-shopping-cart", 
+   "permlevel": 0, 
+   "print_hide": 0, 
+   "read_only": 0, 
+   "search_index": 0
+  }, 
+  {
+   "allow_on_submit": 1, 
+   "fieldname": "quotation_details", 
+   "fieldtype": "Table", 
+   "label": "Quotation Items", 
+   "oldfieldname": "quotation_details", 
+   "oldfieldtype": "Table", 
+   "options": "Quotation Item", 
+   "permlevel": 0, 
+   "read_only": 0, 
+   "reqd": 0, 
+   "width": "40px"
+  }, 
+  {
+   "fieldname": "sec_break23", 
+   "fieldtype": "Section Break", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "net_total_export", 
+   "fieldtype": "Currency", 
+   "label": "Net Total", 
+   "options": "currency", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "column_break_28", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "net_total", 
+   "fieldtype": "Currency", 
+   "label": "Net Total (Company Currency)", 
+   "no_copy": 0, 
+   "oldfieldname": "net_total", 
+   "oldfieldtype": "Currency", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1, 
+   "reqd": 0, 
+   "width": "100px"
+  }, 
+  {
+   "fieldname": "taxes", 
+   "fieldtype": "Section Break", 
+   "label": "Taxes and Charges", 
+   "oldfieldtype": "Section Break", 
+   "options": "icon-money", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "taxes_and_charges", 
+   "fieldtype": "Link", 
+   "hidden": 0, 
+   "label": "Taxes and Charges", 
+   "oldfieldname": "charge", 
+   "oldfieldtype": "Link", 
+   "options": "Sales Taxes and Charges Master", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "column_break_34", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "shipping_rule", 
+   "fieldtype": "Link", 
+   "hidden": 0, 
+   "label": "Shipping Rule", 
+   "oldfieldtype": "Button", 
+   "options": "Shipping Rule", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "section_break_36", 
+   "fieldtype": "Section Break", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "other_charges", 
+   "fieldtype": "Table", 
+   "label": "Sales Taxes and Charges", 
+   "oldfieldname": "other_charges", 
+   "oldfieldtype": "Table", 
+   "options": "Sales Taxes and Charges", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "other_charges_calculation", 
+   "fieldtype": "HTML", 
+   "label": "Taxes and Charges Calculation", 
+   "oldfieldtype": "HTML", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "section_break_39", 
+   "fieldtype": "Section Break", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "other_charges_total_export", 
+   "fieldtype": "Currency", 
+   "label": "Taxes and Charges Total", 
+   "options": "currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "column_break_42", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "other_charges_total", 
+   "fieldtype": "Currency", 
+   "label": "Taxes and Charges Total (Company Currency)", 
+   "oldfieldname": "other_charges_total", 
+   "oldfieldtype": "Currency", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "discount_amount", 
+   "fieldtype": "Currency", 
+   "label": "Discount Amount", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "totals", 
+   "fieldtype": "Section Break", 
+   "label": "Totals", 
+   "oldfieldtype": "Section Break", 
+   "options": "icon-money", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "grand_total_export", 
+   "fieldtype": "Currency", 
+   "in_list_view": 1, 
+   "label": "Grand Total", 
+   "no_copy": 0, 
+   "oldfieldname": "grand_total_export", 
+   "oldfieldtype": "Currency", 
+   "options": "currency", 
+   "permlevel": 0, 
+   "print_hide": 0, 
+   "read_only": 1, 
+   "reqd": 0, 
+   "width": "200px"
+  }, 
+  {
+   "fieldname": "rounded_total_export", 
+   "fieldtype": "Currency", 
+   "label": "Rounded Total", 
+   "no_copy": 0, 
+   "oldfieldname": "rounded_total_export", 
+   "oldfieldtype": "Currency", 
+   "options": "currency", 
+   "permlevel": 0, 
+   "print_hide": 0, 
+   "read_only": 1, 
+   "reqd": 0, 
+   "width": "200px"
+  }, 
+  {
+   "fieldname": "in_words_export", 
+   "fieldtype": "Data", 
+   "label": "In Words", 
+   "no_copy": 0, 
+   "oldfieldname": "in_words_export", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "print_hide": 0, 
+   "read_only": 1, 
+   "width": "200px"
+  }, 
+  {
+   "fieldname": "column_break3", 
+   "fieldtype": "Column Break", 
+   "oldfieldtype": "Column Break", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0, 
+   "width": "50%"
+  }, 
+  {
+   "fieldname": "grand_total", 
+   "fieldtype": "Currency", 
+   "label": "Grand Total (Company Currency)", 
+   "no_copy": 0, 
+   "oldfieldname": "grand_total", 
+   "oldfieldtype": "Currency", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1, 
+   "reqd": 0, 
+   "width": "200px"
+  }, 
+  {
+   "fieldname": "rounded_total", 
+   "fieldtype": "Currency", 
+   "label": "Rounded Total (Company Currency)", 
+   "no_copy": 0, 
+   "oldfieldname": "rounded_total", 
+   "oldfieldtype": "Currency", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1, 
+   "width": "200px"
+  }, 
+  {
+   "description": "In Words will be visible once you save the Quotation.", 
+   "fieldname": "in_words", 
+   "fieldtype": "Data", 
+   "label": "In Words (Company Currency)", 
+   "no_copy": 0, 
+   "oldfieldname": "in_words", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1, 
+   "width": "200px"
+  }, 
+  {
+   "fieldname": "terms_section_break", 
+   "fieldtype": "Section Break", 
+   "label": "Terms and Conditions", 
+   "oldfieldtype": "Section Break", 
+   "options": "icon-legal", 
+   "permlevel": 0, 
+   "print_hide": 0, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "tc_name", 
+   "fieldtype": "Link", 
+   "label": "Terms", 
+   "oldfieldname": "tc_name", 
+   "oldfieldtype": "Link", 
+   "options": "Terms and Conditions", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0, 
+   "report_hide": 1
+  }, 
+  {
+   "fieldname": "terms", 
+   "fieldtype": "Text Editor", 
+   "label": "Term Details", 
+   "oldfieldname": "terms", 
+   "oldfieldtype": "Text Editor", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "contact_section", 
+   "fieldtype": "Section Break", 
+   "label": "Contact Info", 
+   "options": "icon-bullhorn", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "description": "<a href=\"#Sales Browser/Territory\">Add / Edit</a>", 
+   "fieldname": "territory", 
+   "fieldtype": "Link", 
+   "hidden": 0, 
+   "in_filter": 1, 
+   "label": "Territory", 
+   "options": "Territory", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0, 
+   "reqd": 1, 
+   "search_index": 0
+  }, 
+  {
+   "depends_on": "customer", 
+   "description": "<a href=\"#Sales Browser/Customer Group\">Add / Edit</a>", 
+   "fieldname": "customer_group", 
+   "fieldtype": "Link", 
+   "in_filter": 1, 
+   "label": "Customer Group", 
+   "oldfieldname": "customer_group", 
+   "oldfieldtype": "Link", 
+   "options": "Customer Group", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0, 
+   "reqd": 0, 
+   "search_index": 0
+  }, 
+  {
+   "fieldname": "shipping_address_name", 
+   "fieldtype": "Link", 
+   "hidden": 0, 
+   "label": "Shipping Address", 
+   "options": "Address", 
+   "permlevel": 0, 
+   "print_hide": 1
+  }, 
+  {
+   "fieldname": "shipping_address", 
+   "fieldtype": "Small Text", 
+   "hidden": 1, 
+   "label": "Shipping Address", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1
+  }, 
+  {
+   "depends_on": "customer", 
+   "fieldname": "col_break98", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0, 
+   "read_only": 0, 
+   "width": "50%"
+  }, 
+  {
+   "fieldname": "customer_address", 
+   "fieldtype": "Link", 
+   "hidden": 0, 
+   "in_filter": 1, 
+   "label": "Customer Address", 
+   "options": "Address", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0
+  }, 
+  {
+   "depends_on": "eval:doc.customer", 
+   "fieldname": "contact_person", 
+   "fieldtype": "Link", 
+   "hidden": 0, 
+   "in_filter": 1, 
+   "label": "Contact Person", 
+   "oldfieldname": "contact_person", 
+   "oldfieldtype": "Link", 
+   "options": "Contact", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0, 
+   "reqd": 0
+  }, 
+  {
+   "fieldname": "more_info", 
+   "fieldtype": "Section Break", 
+   "label": "More Info", 
+   "oldfieldtype": "Section Break", 
+   "options": "icon-file-text", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "campaign", 
+   "fieldtype": "Link", 
+   "hidden": 0, 
+   "label": "Campaign", 
+   "no_copy": 0, 
+   "oldfieldname": "campaign", 
+   "oldfieldtype": "Link", 
+   "options": "Campaign", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0, 
+   "report_hide": 0
+  }, 
+  {
+   "fieldname": "source", 
+   "fieldtype": "Select", 
+   "hidden": 0, 
+   "label": "Source", 
+   "no_copy": 0, 
+   "oldfieldname": "source", 
+   "oldfieldtype": "Select", 
+   "options": "\nExisting Customer\nReference\nAdvertisement\nCold Calling\nExhibition\nSupplier Reference\nMass Mailing\nCustomer's Vendor\nCampaign", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0, 
+   "report_hide": 0
+  }, 
+  {
+   "allow_on_submit": 0, 
+   "default": "Draft", 
+   "fieldname": "status", 
+   "fieldtype": "Select", 
+   "in_filter": 1, 
+   "in_list_view": 1, 
+   "label": "Status", 
+   "no_copy": 1, 
+   "oldfieldname": "status", 
+   "oldfieldtype": "Select", 
+   "options": "Draft\nSubmitted\nOrdered\nLost\nCancelled", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1, 
+   "reqd": 1, 
+   "search_index": 0
+  }, 
+  {
+   "allow_on_submit": 1, 
+   "fieldname": "order_lost_reason", 
+   "fieldtype": "Small Text", 
+   "label": "Quotation Lost Reason", 
+   "no_copy": 1, 
+   "oldfieldname": "order_lost_reason", 
+   "oldfieldtype": "Small Text", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "column_break4", 
+   "fieldtype": "Column Break", 
+   "oldfieldtype": "Column Break", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0, 
+   "width": "50%"
+  }, 
+  {
+   "allow_on_submit": 1, 
+   "fieldname": "letter_head", 
+   "fieldtype": "Select", 
+   "label": "Letter Head", 
+   "oldfieldname": "letter_head", 
+   "oldfieldtype": "Select", 
+   "options": "link:Letter Head", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0
+  }, 
+  {
+   "allow_on_submit": 1, 
+   "fieldname": "select_print_heading", 
+   "fieldtype": "Link", 
+   "label": "Print Heading", 
+   "no_copy": 1, 
+   "oldfieldname": "select_print_heading", 
+   "oldfieldtype": "Link", 
+   "options": "Print Heading", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0, 
+   "report_hide": 1
+  }, 
+  {
+   "fieldname": "fiscal_year", 
+   "fieldtype": "Select", 
+   "in_filter": 1, 
+   "label": "Fiscal Year", 
+   "oldfieldname": "fiscal_year", 
+   "oldfieldtype": "Select", 
+   "options": "link:Fiscal Year", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0, 
+   "reqd": 1, 
+   "search_index": 0
+  }, 
+  {
+   "fieldname": "enq_det", 
+   "fieldtype": "Text", 
+   "hidden": 1, 
+   "label": "Opportunity Item", 
+   "no_copy": 0, 
+   "oldfieldname": "enq_det", 
+   "oldfieldtype": "Text", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1, 
+   "report_hide": 0
+  }, 
+  {
+   "fieldname": "communication_history", 
+   "fieldtype": "Section Break", 
+   "label": "Communication History", 
+   "oldfieldtype": "Section Break", 
+   "options": "icon-comments", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0
+  }, 
+  {
+   "allow_on_submit": 1, 
+   "depends_on": "eval:!doc.__islocal", 
+   "fieldname": "communication_html", 
+   "fieldtype": "HTML", 
+   "label": "Communication HTML", 
+   "oldfieldname": "follow_up", 
+   "oldfieldtype": "Table", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0, 
+   "width": "40px"
+  }, 
+  {
+   "fieldname": "communications", 
+   "fieldtype": "Table", 
+   "hidden": 1, 
+   "label": "Communications", 
+   "options": "Communication", 
+   "permlevel": 0, 
+   "print_hide": 1
+  }
+ ], 
+ "hide_toolbar": 0, 
+ "icon": "icon-shopping-cart", 
+ "idx": 1, 
+ "is_submittable": 1, 
+ "max_attachments": 1, 
+ "modified": "2014-01-31 19:43:00", 
+ "modified_by": "Administrator", 
+ "module": "Selling", 
+ "name": "Quotation", 
+ "owner": "Administrator", 
+ "permissions": [
+  {
+   "amend": 1, 
+   "cancel": 1, 
+   "create": 1, 
+   "delete": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Sales Manager", 
+   "submit": 1, 
+   "write": 1
+  }, 
+  {
+   "amend": 1, 
+   "cancel": 1, 
+   "create": 1, 
+   "delete": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Sales User", 
+   "submit": 1, 
+   "write": 1
+  }, 
+  {
+   "amend": 0, 
+   "cancel": 0, 
+   "create": 0, 
+   "delete": 0, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Customer", 
+   "submit": 0, 
+   "write": 0
+  }, 
+  {
+   "amend": 1, 
+   "cancel": 1, 
+   "create": 1, 
+   "delete": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Maintenance Manager", 
+   "submit": 1, 
+   "write": 1
+  }, 
+  {
+   "amend": 1, 
+   "cancel": 1, 
+   "create": 1, 
+   "delete": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Maintenance User", 
+   "submit": 1, 
+   "write": 1
+  }
+ ], 
+ "read_only_onload": 1, 
+ "search_fields": "status,transaction_date,customer,lead,order_type"
+}
\ No newline at end of file
diff --git a/erpnext/selling/doctype/quotation_item/quotation_item.txt b/erpnext/selling/doctype/quotation_item/quotation_item.txt
index bbf953a..fccbc5a 100644
--- a/erpnext/selling/doctype/quotation_item/quotation_item.txt
+++ b/erpnext/selling/doctype/quotation_item/quotation_item.txt
@@ -1,374 +1,361 @@
-[
- {
-  "creation": "2013-03-07 11:42:57", 
-  "docstatus": 0, 
-  "modified": "2014-02-28 11:20:34", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "autoname": "QUOD/.#####", 
-  "doctype": "DocType", 
-  "istable": 1, 
-  "module": "Selling", 
-  "name": "__common__"
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "Quotation Item", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Quotation Item"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "item_code", 
-  "fieldtype": "Link", 
-  "hidden": 0, 
-  "in_filter": 1, 
-  "in_list_view": 1, 
-  "label": "Item Code", 
-  "oldfieldname": "item_code", 
-  "oldfieldtype": "Link", 
-  "options": "Item", 
-  "print_hide": 0, 
-  "print_width": "150px", 
-  "read_only": 0, 
-  "reqd": 1, 
-  "search_index": 1, 
-  "width": "150px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "customer_item_code", 
-  "fieldtype": "Data", 
-  "hidden": 1, 
-  "in_list_view": 0, 
-  "label": "Customer's Item Code", 
-  "print_hide": 1, 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "item_name", 
-  "fieldtype": "Data", 
-  "in_filter": 1, 
-  "in_list_view": 0, 
-  "label": "Item Name", 
-  "oldfieldname": "item_name", 
-  "oldfieldtype": "Data", 
-  "print_hide": 1, 
-  "print_width": "150px", 
-  "read_only": 0, 
-  "reqd": 1, 
-  "search_index": 1, 
-  "width": "150px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "col_break1", 
-  "fieldtype": "Column Break"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "description", 
-  "fieldtype": "Small Text", 
-  "in_list_view": 1, 
-  "label": "Description", 
-  "oldfieldname": "description", 
-  "oldfieldtype": "Small Text", 
-  "print_hide": 0, 
-  "print_width": "300px", 
-  "read_only": 0, 
-  "reqd": 1, 
-  "width": "300px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "quantity_and_rate", 
-  "fieldtype": "Section Break", 
-  "in_list_view": 0, 
-  "label": "Quantity and Rate"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "qty", 
-  "fieldtype": "Float", 
-  "in_filter": 0, 
-  "in_list_view": 1, 
-  "label": "Quantity", 
-  "oldfieldname": "qty", 
-  "oldfieldtype": "Currency", 
-  "print_hide": 0, 
-  "print_width": "100px", 
-  "read_only": 0, 
-  "reqd": 1, 
-  "search_index": 0, 
-  "width": "100px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "price_list_rate", 
-  "fieldtype": "Currency", 
-  "in_list_view": 0, 
-  "label": "Price List Rate", 
-  "oldfieldname": "ref_rate", 
-  "oldfieldtype": "Currency", 
-  "options": "currency", 
-  "print_hide": 1, 
-  "print_width": "100px", 
-  "read_only": 1, 
-  "reqd": 0, 
-  "width": "100px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "discount_percentage", 
-  "fieldtype": "Float", 
-  "in_list_view": 0, 
-  "label": "Discount (%)", 
-  "oldfieldname": "adj_rate", 
-  "oldfieldtype": "Float", 
-  "print_hide": 1, 
-  "print_width": "100px", 
-  "read_only": 0, 
-  "width": "100px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "col_break2", 
-  "fieldtype": "Column Break"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "stock_uom", 
-  "fieldtype": "Link", 
-  "in_list_view": 0, 
-  "label": "UOM", 
-  "oldfieldname": "stock_uom", 
-  "oldfieldtype": "Data", 
-  "options": "UOM", 
-  "print_hide": 0, 
-  "print_width": "100px", 
-  "read_only": 1, 
-  "reqd": 0, 
-  "width": "100px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "base_price_list_rate", 
-  "fieldtype": "Currency", 
-  "in_list_view": 0, 
-  "label": "Price List Rate (Company Currency)", 
-  "oldfieldname": "base_ref_rate", 
-  "oldfieldtype": "Currency", 
-  "options": "Company:company:default_currency", 
-  "print_hide": 1, 
-  "print_width": "100px", 
-  "read_only": 1, 
-  "width": "100px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "Section_break1", 
-  "fieldtype": "Section Break"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "rate", 
-  "fieldtype": "Currency", 
-  "in_filter": 0, 
-  "in_list_view": 1, 
-  "label": "Rate", 
-  "oldfieldname": "export_rate", 
-  "oldfieldtype": "Currency", 
-  "options": "currency", 
-  "print_hide": 0, 
-  "print_width": "100px", 
-  "read_only": 0, 
-  "reqd": 0, 
-  "search_index": 0, 
-  "width": "100px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "amount", 
-  "fieldtype": "Currency", 
-  "in_filter": 0, 
-  "in_list_view": 1, 
-  "label": "Amount", 
-  "oldfieldname": "export_amount", 
-  "oldfieldtype": "Currency", 
-  "options": "currency", 
-  "print_hide": 0, 
-  "print_width": "100px", 
-  "read_only": 1, 
-  "reqd": 0, 
-  "search_index": 0, 
-  "width": "100px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "col_break3", 
-  "fieldtype": "Column Break"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "base_rate", 
-  "fieldtype": "Currency", 
-  "in_filter": 0, 
-  "in_list_view": 0, 
-  "label": "Basic Rate (Company Currency)", 
-  "oldfieldname": "basic_rate", 
-  "oldfieldtype": "Currency", 
-  "options": "Company:company:default_currency", 
-  "print_hide": 1, 
-  "print_width": "100px", 
-  "read_only": 1, 
-  "reqd": 0, 
-  "search_index": 0, 
-  "width": "100px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "base_amount", 
-  "fieldtype": "Currency", 
-  "in_filter": 0, 
-  "in_list_view": 0, 
-  "label": "Amount (Company Currency)", 
-  "oldfieldname": "amount", 
-  "oldfieldtype": "Currency", 
-  "options": "Company:company:default_currency", 
-  "print_hide": 1, 
-  "print_width": "100px", 
-  "read_only": 1, 
-  "reqd": 0, 
-  "search_index": 0, 
-  "width": "100px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "pricing_rule_for_price", 
-  "fieldtype": "Link", 
-  "label": "Pricing Rule For Price", 
-  "options": "Pricing Rule", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "pricing_rule_for_discount", 
-  "fieldtype": "Link", 
-  "label": "Pricing Rule For Discount", 
-  "options": "Pricing Rule", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "reference", 
-  "fieldtype": "Section Break", 
-  "in_list_view": 0, 
-  "label": "Reference"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "prevdoc_doctype", 
-  "fieldtype": "Data", 
-  "hidden": 1, 
-  "in_list_view": 0, 
-  "label": "Against Doctype", 
-  "no_copy": 1, 
-  "oldfieldname": "prevdoc_doctype", 
-  "oldfieldtype": "Data", 
-  "print_hide": 1, 
-  "print_width": "150px", 
-  "read_only": 1, 
-  "report_hide": 0, 
-  "width": "150px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "prevdoc_docname", 
-  "fieldtype": "Data", 
-  "in_list_view": 0, 
-  "label": "Against Docname", 
-  "no_copy": 1, 
-  "oldfieldname": "prevdoc_docname", 
-  "oldfieldtype": "Data", 
-  "print_hide": 1, 
-  "print_width": "150px", 
-  "read_only": 1, 
-  "report_hide": 0, 
-  "width": "150px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "item_tax_rate", 
-  "fieldtype": "Small Text", 
-  "hidden": 1, 
-  "in_list_view": 0, 
-  "label": "Item Tax Rate", 
-  "oldfieldname": "item_tax_rate", 
-  "oldfieldtype": "Small Text", 
-  "print_hide": 1, 
-  "read_only": 1, 
-  "report_hide": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "col_break4", 
-  "fieldtype": "Column Break"
- }, 
- {
-  "allow_on_submit": 1, 
-  "doctype": "DocField", 
-  "fieldname": "page_break", 
-  "fieldtype": "Check", 
-  "hidden": 0, 
-  "in_list_view": 0, 
-  "label": "Page Break", 
-  "no_copy": 1, 
-  "oldfieldname": "page_break", 
-  "oldfieldtype": "Check", 
-  "print_hide": 1, 
-  "read_only": 0, 
-  "report_hide": 1
- }, 
- {
-  "description": "<a href=\"#Sales Browser/Item Group\">Add / Edit</a>", 
-  "doctype": "DocField", 
-  "fieldname": "item_group", 
-  "fieldtype": "Link", 
-  "hidden": 1, 
-  "in_filter": 1, 
-  "in_list_view": 0, 
-  "label": "Item Group", 
-  "oldfieldname": "item_group", 
-  "oldfieldtype": "Link", 
-  "options": "Item Group", 
-  "print_hide": 1, 
-  "read_only": 1, 
-  "search_index": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "brand", 
-  "fieldtype": "Link", 
-  "hidden": 1, 
-  "in_filter": 1, 
-  "in_list_view": 0, 
-  "label": "Brand", 
-  "oldfieldname": "brand", 
-  "oldfieldtype": "Link", 
-  "options": "Brand", 
-  "print_hide": 1, 
-  "print_width": "150px", 
-  "read_only": 1, 
-  "search_index": 1, 
-  "width": "150px"
- }
-]
\ No newline at end of file
+{
+ "autoname": "QUOD/.#####", 
+ "creation": "2013-03-07 11:42:57", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "fields": [
+  {
+   "fieldname": "item_code", 
+   "fieldtype": "Link", 
+   "hidden": 0, 
+   "in_filter": 1, 
+   "in_list_view": 1, 
+   "label": "Item Code", 
+   "oldfieldname": "item_code", 
+   "oldfieldtype": "Link", 
+   "options": "Item", 
+   "permlevel": 0, 
+   "print_hide": 0, 
+   "print_width": "150px", 
+   "read_only": 0, 
+   "reqd": 1, 
+   "search_index": 1, 
+   "width": "150px"
+  }, 
+  {
+   "fieldname": "customer_item_code", 
+   "fieldtype": "Data", 
+   "hidden": 1, 
+   "in_list_view": 0, 
+   "label": "Customer's Item Code", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "item_name", 
+   "fieldtype": "Data", 
+   "in_filter": 1, 
+   "in_list_view": 0, 
+   "label": "Item Name", 
+   "oldfieldname": "item_name", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "print_width": "150px", 
+   "read_only": 0, 
+   "reqd": 1, 
+   "search_index": 1, 
+   "width": "150px"
+  }, 
+  {
+   "fieldname": "col_break1", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "description", 
+   "fieldtype": "Small Text", 
+   "in_list_view": 1, 
+   "label": "Description", 
+   "oldfieldname": "description", 
+   "oldfieldtype": "Small Text", 
+   "permlevel": 0, 
+   "print_hide": 0, 
+   "print_width": "300px", 
+   "read_only": 0, 
+   "reqd": 1, 
+   "width": "300px"
+  }, 
+  {
+   "fieldname": "quantity_and_rate", 
+   "fieldtype": "Section Break", 
+   "in_list_view": 0, 
+   "label": "Quantity and Rate", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "qty", 
+   "fieldtype": "Float", 
+   "in_filter": 0, 
+   "in_list_view": 1, 
+   "label": "Quantity", 
+   "oldfieldname": "qty", 
+   "oldfieldtype": "Currency", 
+   "permlevel": 0, 
+   "print_hide": 0, 
+   "print_width": "100px", 
+   "read_only": 0, 
+   "reqd": 1, 
+   "search_index": 0, 
+   "width": "100px"
+  }, 
+  {
+   "fieldname": "price_list_rate", 
+   "fieldtype": "Currency", 
+   "in_list_view": 0, 
+   "label": "Price List Rate", 
+   "oldfieldname": "ref_rate", 
+   "oldfieldtype": "Currency", 
+   "options": "currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "print_width": "100px", 
+   "read_only": 1, 
+   "reqd": 0, 
+   "width": "100px"
+  }, 
+  {
+   "fieldname": "discount_percentage", 
+   "fieldtype": "Float", 
+   "in_list_view": 0, 
+   "label": "Discount (%)", 
+   "oldfieldname": "adj_rate", 
+   "oldfieldtype": "Float", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "print_width": "100px", 
+   "read_only": 0, 
+   "width": "100px"
+  }, 
+  {
+   "fieldname": "col_break2", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "stock_uom", 
+   "fieldtype": "Link", 
+   "in_list_view": 0, 
+   "label": "UOM", 
+   "oldfieldname": "stock_uom", 
+   "oldfieldtype": "Data", 
+   "options": "UOM", 
+   "permlevel": 0, 
+   "print_hide": 0, 
+   "print_width": "100px", 
+   "read_only": 1, 
+   "reqd": 0, 
+   "width": "100px"
+  }, 
+  {
+   "fieldname": "base_price_list_rate", 
+   "fieldtype": "Currency", 
+   "in_list_view": 0, 
+   "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_break1", 
+   "fieldtype": "Section Break", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "rate", 
+   "fieldtype": "Currency", 
+   "in_filter": 0, 
+   "in_list_view": 1, 
+   "label": "Rate", 
+   "oldfieldname": "export_rate", 
+   "oldfieldtype": "Currency", 
+   "options": "currency", 
+   "permlevel": 0, 
+   "print_hide": 0, 
+   "print_width": "100px", 
+   "read_only": 0, 
+   "reqd": 0, 
+   "search_index": 0, 
+   "width": "100px"
+  }, 
+  {
+   "fieldname": "amount", 
+   "fieldtype": "Currency", 
+   "in_filter": 0, 
+   "in_list_view": 1, 
+   "label": "Amount", 
+   "oldfieldname": "export_amount", 
+   "oldfieldtype": "Currency", 
+   "options": "currency", 
+   "permlevel": 0, 
+   "print_hide": 0, 
+   "print_width": "100px", 
+   "read_only": 1, 
+   "reqd": 0, 
+   "search_index": 0, 
+   "width": "100px"
+  }, 
+  {
+   "fieldname": "col_break3", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "base_rate", 
+   "fieldtype": "Currency", 
+   "in_filter": 0, 
+   "in_list_view": 0, 
+   "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, 
+   "search_index": 0, 
+   "width": "100px"
+  }, 
+  {
+   "fieldname": "base_amount", 
+   "fieldtype": "Currency", 
+   "in_filter": 0, 
+   "in_list_view": 0, 
+   "label": "Amount (Company Currency)", 
+   "oldfieldname": "amount", 
+   "oldfieldtype": "Currency", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "print_width": "100px", 
+   "read_only": 1, 
+   "reqd": 0, 
+   "search_index": 0, 
+   "width": "100px"
+  }, 
+  {
+   "fieldname": "pricing_rule_for_price", 
+   "fieldtype": "Link", 
+   "label": "Pricing Rule For Price", 
+   "options": "Pricing Rule", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "pricing_rule_for_discount", 
+   "fieldtype": "Link", 
+   "label": "Pricing Rule For Discount", 
+   "options": "Pricing Rule", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "reference", 
+   "fieldtype": "Section Break", 
+   "in_list_view": 0, 
+   "label": "Reference", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "prevdoc_doctype", 
+   "fieldtype": "Data", 
+   "hidden": 1, 
+   "in_list_view": 0, 
+   "label": "Against Doctype", 
+   "no_copy": 1, 
+   "oldfieldname": "prevdoc_doctype", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "print_width": "150px", 
+   "read_only": 1, 
+   "report_hide": 0, 
+   "width": "150px"
+  }, 
+  {
+   "fieldname": "prevdoc_docname", 
+   "fieldtype": "Data", 
+   "in_list_view": 0, 
+   "label": "Against Docname", 
+   "no_copy": 1, 
+   "oldfieldname": "prevdoc_docname", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "print_width": "150px", 
+   "read_only": 1, 
+   "report_hide": 0, 
+   "width": "150px"
+  }, 
+  {
+   "fieldname": "item_tax_rate", 
+   "fieldtype": "Small Text", 
+   "hidden": 1, 
+   "in_list_view": 0, 
+   "label": "Item Tax Rate", 
+   "oldfieldname": "item_tax_rate", 
+   "oldfieldtype": "Small Text", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1, 
+   "report_hide": 1
+  }, 
+  {
+   "fieldname": "col_break4", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0
+  }, 
+  {
+   "allow_on_submit": 1, 
+   "fieldname": "page_break", 
+   "fieldtype": "Check", 
+   "hidden": 0, 
+   "in_list_view": 0, 
+   "label": "Page Break", 
+   "no_copy": 1, 
+   "oldfieldname": "page_break", 
+   "oldfieldtype": "Check", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0, 
+   "report_hide": 1
+  }, 
+  {
+   "description": "<a href=\"#Sales Browser/Item Group\">Add / Edit</a>", 
+   "fieldname": "item_group", 
+   "fieldtype": "Link", 
+   "hidden": 1, 
+   "in_filter": 1, 
+   "in_list_view": 0, 
+   "label": "Item Group", 
+   "oldfieldname": "item_group", 
+   "oldfieldtype": "Link", 
+   "options": "Item Group", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1, 
+   "search_index": 1
+  }, 
+  {
+   "fieldname": "brand", 
+   "fieldtype": "Link", 
+   "hidden": 1, 
+   "in_filter": 1, 
+   "in_list_view": 0, 
+   "label": "Brand", 
+   "oldfieldname": "brand", 
+   "oldfieldtype": "Link", 
+   "options": "Brand", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "print_width": "150px", 
+   "read_only": 1, 
+   "search_index": 1, 
+   "width": "150px"
+  }
+ ], 
+ "idx": 1, 
+ "istable": 1, 
+ "modified": "2014-02-28 11:20:34", 
+ "modified_by": "Administrator", 
+ "module": "Selling", 
+ "name": "Quotation Item", 
+ "owner": "Administrator"
+}
\ No newline at end of file
diff --git a/erpnext/selling/doctype/sales_bom/sales_bom.txt b/erpnext/selling/doctype/sales_bom/sales_bom.txt
index ae40e10..c747615 100644
--- a/erpnext/selling/doctype/sales_bom/sales_bom.txt
+++ b/erpnext/selling/doctype/sales_bom/sales_bom.txt
@@ -1,102 +1,97 @@
-[
- {
-  "creation": "2013-06-20 11:53:21", 
-  "docstatus": 0, 
-  "modified": "2014-01-20 17:49:19", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "allow_import": 1, 
-  "description": "Aggregate group of **Items** into another **Item**. This is useful if you are bundling a certain **Items** into a package and you maintain stock of the packed **Items** and not the aggregate **Item**. \n\nThe package **Item** will have \"Is Stock Item\" as \"No\" and \"Is Sales Item\" as \"Yes\".\n\nFor Example: If you are selling Laptops and Backpacks separately and have a special price if the customer buys both, then the Laptop + Backpack will be a new Sales BOM Item.\n\nNote: BOM = Bill of Materials", 
-  "doctype": "DocType", 
-  "document_type": "Master", 
-  "icon": "icon-sitemap", 
-  "is_submittable": 0, 
-  "module": "Selling", 
-  "name": "__common__"
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "Sales BOM", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "amend": 0, 
-  "cancel": 0, 
-  "doctype": "DocPerm", 
-  "email": 1, 
-  "name": "__common__", 
-  "parent": "Sales BOM", 
-  "parentfield": "permissions", 
-  "parenttype": "DocType", 
-  "permlevel": 0, 
-  "print": 1, 
-  "read": 1, 
-  "report": 1, 
-  "submit": 0
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Sales BOM"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "basic_section", 
-  "fieldtype": "Section Break", 
-  "label": "Sales BOM Item"
- }, 
- {
-  "description": "The Item that represents the Package. This Item must have \"Is Stock Item\" as \"No\" and \"Is Sales Item\" as \"Yes\"", 
-  "doctype": "DocField", 
-  "fieldname": "new_item_code", 
-  "fieldtype": "Link", 
-  "label": "Parent Item", 
-  "no_copy": 1, 
-  "oldfieldname": "new_item_code", 
-  "oldfieldtype": "Data", 
-  "options": "Item", 
-  "reqd": 1
- }, 
- {
-  "description": "List items that form the package.", 
-  "doctype": "DocField", 
-  "fieldname": "item_section", 
-  "fieldtype": "Section Break", 
-  "label": "Package Items"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "sales_bom_items", 
-  "fieldtype": "Table", 
-  "label": "Sales BOM Items", 
-  "oldfieldname": "sales_bom_items", 
-  "oldfieldtype": "Table", 
-  "options": "Sales BOM Item", 
-  "reqd": 1
- }, 
- {
-  "create": 1, 
-  "delete": 1, 
-  "doctype": "DocPerm", 
-  "role": "Material Manager", 
-  "write": 1
- }, 
- {
-  "create": 0, 
-  "delete": 0, 
-  "doctype": "DocPerm", 
-  "role": "Material User", 
-  "write": 0
- }, 
- {
-  "create": 1, 
-  "delete": 1, 
-  "doctype": "DocPerm", 
-  "role": "Sales User", 
-  "write": 1
- }
-]
\ No newline at end of file
+{
+ "allow_import": 1, 
+ "creation": "2013-06-20 11:53:21", 
+ "description": "Aggregate group of **Items** into another **Item**. This is useful if you are bundling a certain **Items** into a package and you maintain stock of the packed **Items** and not the aggregate **Item**. \n\nThe package **Item** will have \"Is Stock Item\" as \"No\" and \"Is Sales Item\" as \"Yes\".\n\nFor Example: If you are selling Laptops and Backpacks separately and have a special price if the customer buys both, then the Laptop + Backpack will be a new Sales BOM Item.\n\nNote: BOM = Bill of Materials", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "document_type": "Master", 
+ "fields": [
+  {
+   "fieldname": "basic_section", 
+   "fieldtype": "Section Break", 
+   "label": "Sales BOM Item", 
+   "permlevel": 0
+  }, 
+  {
+   "description": "The Item that represents the Package. This Item must have \"Is Stock Item\" as \"No\" and \"Is Sales Item\" as \"Yes\"", 
+   "fieldname": "new_item_code", 
+   "fieldtype": "Link", 
+   "label": "Parent Item", 
+   "no_copy": 1, 
+   "oldfieldname": "new_item_code", 
+   "oldfieldtype": "Data", 
+   "options": "Item", 
+   "permlevel": 0, 
+   "reqd": 1
+  }, 
+  {
+   "description": "List items that form the package.", 
+   "fieldname": "item_section", 
+   "fieldtype": "Section Break", 
+   "label": "Package Items", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "sales_bom_items", 
+   "fieldtype": "Table", 
+   "label": "Sales BOM Items", 
+   "oldfieldname": "sales_bom_items", 
+   "oldfieldtype": "Table", 
+   "options": "Sales BOM Item", 
+   "permlevel": 0, 
+   "reqd": 1
+  }
+ ], 
+ "icon": "icon-sitemap", 
+ "idx": 1, 
+ "is_submittable": 0, 
+ "modified": "2014-01-20 17:49:19", 
+ "modified_by": "Administrator", 
+ "module": "Selling", 
+ "name": "Sales BOM", 
+ "owner": "Administrator", 
+ "permissions": [
+  {
+   "amend": 0, 
+   "cancel": 0, 
+   "create": 1, 
+   "delete": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Material Manager", 
+   "submit": 0, 
+   "write": 1
+  }, 
+  {
+   "amend": 0, 
+   "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, 
+   "cancel": 0, 
+   "create": 1, 
+   "delete": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Sales User", 
+   "submit": 0, 
+   "write": 1
+  }
+ ]
+}
\ No newline at end of file
diff --git a/erpnext/selling/doctype/sales_bom_item/sales_bom_item.txt b/erpnext/selling/doctype/sales_bom_item/sales_bom_item.txt
index e06d8f8..57642c3 100644
--- a/erpnext/selling/doctype/sales_bom_item/sales_bom_item.txt
+++ b/erpnext/selling/doctype/sales_bom_item/sales_bom_item.txt
@@ -1,81 +1,68 @@
-[
- {
-  "creation": "2013-05-23 16:55:51", 
-  "docstatus": 0, 
-  "modified": "2013-12-20 19:21:38", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "doctype": "DocType", 
-  "istable": 1, 
-  "module": "Selling", 
-  "name": "__common__"
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "Sales BOM Item", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Sales BOM Item"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "item_code", 
-  "fieldtype": "Link", 
-  "in_list_view": 1, 
-  "label": "Item", 
-  "oldfieldname": "item_code", 
-  "oldfieldtype": "Link", 
-  "options": "Item", 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "qty", 
-  "fieldtype": "Float", 
-  "in_list_view": 1, 
-  "label": "Qty", 
-  "oldfieldname": "qty", 
-  "oldfieldtype": "Currency", 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "description", 
-  "fieldtype": "Text", 
-  "in_list_view": 1, 
-  "label": "Description", 
-  "oldfieldname": "description", 
-  "oldfieldtype": "Text", 
-  "print_width": "300px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "rate", 
-  "fieldtype": "Float", 
-  "hidden": 1, 
-  "in_list_view": 0, 
-  "label": "Rate", 
-  "oldfieldname": "rate", 
-  "oldfieldtype": "Currency", 
-  "print_hide": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "uom", 
-  "fieldtype": "Link", 
-  "in_list_view": 0, 
-  "label": "UOM", 
-  "oldfieldname": "uom", 
-  "oldfieldtype": "Link", 
-  "options": "UOM", 
-  "read_only": 1, 
-  "search_index": 0
- }
-]
\ No newline at end of file
+{
+ "creation": "2013-05-23 16:55:51", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "fields": [
+  {
+   "fieldname": "item_code", 
+   "fieldtype": "Link", 
+   "in_list_view": 1, 
+   "label": "Item", 
+   "oldfieldname": "item_code", 
+   "oldfieldtype": "Link", 
+   "options": "Item", 
+   "permlevel": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "qty", 
+   "fieldtype": "Float", 
+   "in_list_view": 1, 
+   "label": "Qty", 
+   "oldfieldname": "qty", 
+   "oldfieldtype": "Currency", 
+   "permlevel": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "description", 
+   "fieldtype": "Text", 
+   "in_list_view": 1, 
+   "label": "Description", 
+   "oldfieldname": "description", 
+   "oldfieldtype": "Text", 
+   "permlevel": 0, 
+   "print_width": "300px"
+  }, 
+  {
+   "fieldname": "rate", 
+   "fieldtype": "Float", 
+   "hidden": 1, 
+   "in_list_view": 0, 
+   "label": "Rate", 
+   "oldfieldname": "rate", 
+   "oldfieldtype": "Currency", 
+   "permlevel": 0, 
+   "print_hide": 1
+  }, 
+  {
+   "fieldname": "uom", 
+   "fieldtype": "Link", 
+   "in_list_view": 0, 
+   "label": "UOM", 
+   "oldfieldname": "uom", 
+   "oldfieldtype": "Link", 
+   "options": "UOM", 
+   "permlevel": 0, 
+   "read_only": 1, 
+   "search_index": 0
+  }
+ ], 
+ "idx": 1, 
+ "istable": 1, 
+ "modified": "2013-12-20 19:21:38", 
+ "modified_by": "Administrator", 
+ "module": "Selling", 
+ "name": "Sales BOM Item", 
+ "owner": "Administrator"
+}
\ No newline at end of file
diff --git a/erpnext/selling/doctype/sales_order/sales_order.txt b/erpnext/selling/doctype/sales_order/sales_order.txt
index 01c2817..a856a53 100644
--- a/erpnext/selling/doctype/sales_order/sales_order.txt
+++ b/erpnext/selling/doctype/sales_order/sales_order.txt
@@ -1,942 +1,932 @@
-[
- {
-  "creation": "2013-06-18 12:39:59", 
-  "docstatus": 0, 
-  "modified": "2014-01-28 18:47:42", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "allow_attach": 1, 
-  "allow_import": 1, 
-  "autoname": "naming_series:", 
-  "doctype": "DocType", 
-  "document_type": "Transaction", 
-  "icon": "icon-file-text", 
-  "is_submittable": 1, 
-  "issingle": 0, 
-  "module": "Selling", 
-  "name": "__common__", 
-  "read_only_onload": 1, 
-  "search_fields": "status,transaction_date,customer,customer_name, territory,order_type,company"
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "Sales Order", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "doctype": "DocPerm", 
-  "email": 1, 
-  "name": "__common__", 
-  "parent": "Sales Order", 
-  "parentfield": "permissions", 
-  "parenttype": "DocType", 
-  "permlevel": 0, 
-  "print": 1, 
-  "read": 1
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Sales Order"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "customer_section", 
-  "fieldtype": "Section Break", 
-  "label": "Customer", 
-  "options": "icon-user"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break0", 
-  "fieldtype": "Column Break", 
-  "in_filter": 0, 
-  "oldfieldtype": "Column Break", 
-  "search_index": 0, 
-  "width": "50%"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "naming_series", 
-  "fieldtype": "Select", 
-  "label": "Series", 
-  "no_copy": 1, 
-  "oldfieldname": "naming_series", 
-  "oldfieldtype": "Select", 
-  "options": "PI/2011/\nSO\nSO/10-11/\nSO1112", 
-  "print_hide": 1, 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "customer", 
-  "fieldtype": "Link", 
-  "in_filter": 1, 
-  "in_list_view": 1, 
-  "label": "Customer", 
-  "oldfieldname": "customer", 
-  "oldfieldtype": "Link", 
-  "options": "Customer", 
-  "print_hide": 1, 
-  "reqd": 1, 
-  "search_index": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "customer_name", 
-  "fieldtype": "Data", 
-  "hidden": 0, 
-  "label": "Name", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "address_display", 
-  "fieldtype": "Small Text", 
-  "hidden": 1, 
-  "label": "Address", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "contact_display", 
-  "fieldtype": "Small Text", 
-  "hidden": 1, 
-  "label": "Contact", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "contact_mobile", 
-  "fieldtype": "Text", 
-  "hidden": 1, 
-  "label": "Mobile No", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "contact_email", 
-  "fieldtype": "Text", 
-  "hidden": 1, 
-  "label": "Contact Email", 
-  "print_hide": 1, 
-  "read_only": 1
- }, 
- {
-  "default": "Sales", 
-  "doctype": "DocField", 
-  "fieldname": "order_type", 
-  "fieldtype": "Select", 
-  "in_list_view": 1, 
-  "label": "Order Type", 
-  "oldfieldname": "order_type", 
-  "oldfieldtype": "Select", 
-  "options": "\nSales\nMaintenance", 
-  "print_hide": 1, 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break1", 
-  "fieldtype": "Column Break", 
-  "oldfieldtype": "Column Break", 
-  "width": "50%"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "amended_from", 
-  "fieldtype": "Data", 
-  "hidden": 1, 
-  "ignore_restrictions": 1, 
-  "label": "Amended From", 
-  "no_copy": 1, 
-  "oldfieldname": "amended_from", 
-  "oldfieldtype": "Data", 
-  "print_hide": 1, 
-  "read_only": 1, 
-  "width": "150px"
- }, 
- {
-  "description": "Select the relevant company name if you have multiple companies.", 
-  "doctype": "DocField", 
-  "fieldname": "company", 
-  "fieldtype": "Link", 
-  "in_filter": 1, 
-  "label": "Company", 
-  "oldfieldname": "company", 
-  "oldfieldtype": "Link", 
-  "options": "Company", 
-  "print_hide": 1, 
-  "reqd": 1, 
-  "search_index": 1, 
-  "width": "150px"
- }, 
- {
-  "default": "Today", 
-  "doctype": "DocField", 
-  "fieldname": "transaction_date", 
-  "fieldtype": "Date", 
-  "in_filter": 1, 
-  "label": "Sales Order Date", 
-  "no_copy": 1, 
-  "oldfieldname": "transaction_date", 
-  "oldfieldtype": "Date", 
-  "print_hide": 0, 
-  "reqd": 1, 
-  "search_index": 1, 
-  "width": "160px"
- }, 
- {
-  "depends_on": "eval:doc.order_type == 'Sales'", 
-  "doctype": "DocField", 
-  "fieldname": "delivery_date", 
-  "fieldtype": "Date", 
-  "hidden": 0, 
-  "in_filter": 1, 
-  "label": "Delivery Date", 
-  "oldfieldname": "delivery_date", 
-  "oldfieldtype": "Date", 
-  "print_hide": 1, 
-  "reqd": 0, 
-  "search_index": 1, 
-  "width": "160px"
- }, 
- {
-  "description": "Customer's Purchase Order Number", 
-  "doctype": "DocField", 
-  "fieldname": "po_no", 
-  "fieldtype": "Data", 
-  "hidden": 0, 
-  "label": "PO No", 
-  "oldfieldname": "po_no", 
-  "oldfieldtype": "Data", 
-  "print_hide": 0, 
-  "reqd": 0, 
-  "width": "100px"
- }, 
- {
-  "depends_on": "eval:doc.po_no", 
-  "description": "Customer's Purchase Order Date", 
-  "doctype": "DocField", 
-  "fieldname": "po_date", 
-  "fieldtype": "Date", 
-  "hidden": 0, 
-  "label": "PO Date", 
-  "oldfieldname": "po_date", 
-  "oldfieldtype": "Date", 
-  "print_hide": 0, 
-  "reqd": 0, 
-  "width": "100px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "shipping_address_name", 
-  "fieldtype": "Link", 
-  "hidden": 1, 
-  "in_filter": 1, 
-  "label": "Shipping Address", 
-  "options": "Address", 
-  "print_hide": 1, 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "shipping_address", 
-  "fieldtype": "Small Text", 
-  "hidden": 1, 
-  "in_filter": 0, 
-  "label": "Shipping Address", 
-  "print_hide": 1, 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "sec_break45", 
-  "fieldtype": "Section Break", 
-  "label": "Currency and Price List", 
-  "options": "icon-tag"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "currency", 
-  "fieldtype": "Link", 
-  "label": "Currency", 
-  "oldfieldname": "currency", 
-  "oldfieldtype": "Select", 
-  "options": "Currency", 
-  "print_hide": 1, 
-  "reqd": 1, 
-  "width": "100px"
- }, 
- {
-  "description": "Rate at which customer's currency is converted to company's base currency", 
-  "doctype": "DocField", 
-  "fieldname": "conversion_rate", 
-  "fieldtype": "Float", 
-  "label": "Exchange Rate", 
-  "oldfieldname": "conversion_rate", 
-  "oldfieldtype": "Currency", 
-  "print_hide": 1, 
-  "reqd": 1, 
-  "width": "100px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break2", 
-  "fieldtype": "Column Break", 
-  "width": "50%"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "selling_price_list", 
-  "fieldtype": "Link", 
-  "label": "Price List", 
-  "oldfieldname": "price_list_name", 
-  "oldfieldtype": "Select", 
-  "options": "Price List", 
-  "print_hide": 1, 
-  "reqd": 1, 
-  "width": "100px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "price_list_currency", 
-  "fieldtype": "Link", 
-  "label": "Price List Currency", 
-  "options": "Currency", 
-  "print_hide": 1, 
-  "read_only": 1, 
-  "reqd": 1
- }, 
- {
-  "description": "Rate at which Price list currency is converted to company's base currency", 
-  "doctype": "DocField", 
-  "fieldname": "plc_conversion_rate", 
-  "fieldtype": "Float", 
-  "label": "Price List Exchange Rate", 
-  "print_hide": 1, 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "items", 
-  "fieldtype": "Section Break", 
-  "label": "Items", 
-  "oldfieldtype": "Section Break", 
-  "options": "icon-shopping-cart"
- }, 
- {
-  "allow_on_submit": 1, 
-  "doctype": "DocField", 
-  "fieldname": "sales_order_details", 
-  "fieldtype": "Table", 
-  "label": "Sales Order Items", 
-  "oldfieldname": "sales_order_details", 
-  "oldfieldtype": "Table", 
-  "options": "Sales Order Item", 
-  "print_hide": 0, 
-  "reqd": 1
- }, 
- {
-  "description": "Display all the individual items delivered with the main items", 
-  "doctype": "DocField", 
-  "fieldname": "packing_list", 
-  "fieldtype": "Section Break", 
-  "hidden": 0, 
-  "label": "Packing List", 
-  "oldfieldtype": "Section Break", 
-  "options": "icon-suitcase", 
-  "print_hide": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "packing_details", 
-  "fieldtype": "Table", 
-  "label": "Packing Details", 
-  "oldfieldname": "packing_details", 
-  "oldfieldtype": "Table", 
-  "options": "Packed Item", 
-  "print_hide": 1, 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "section_break_31", 
-  "fieldtype": "Section Break"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "net_total_export", 
-  "fieldtype": "Currency", 
-  "label": "Net Total", 
-  "options": "currency", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break_33", 
-  "fieldtype": "Column Break"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "net_total", 
-  "fieldtype": "Currency", 
-  "label": "Net Total (Company Currency)", 
-  "oldfieldname": "net_total", 
-  "oldfieldtype": "Currency", 
-  "options": "Company:company:default_currency", 
-  "print_hide": 1, 
-  "read_only": 1, 
-  "reqd": 0, 
-  "width": "150px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "taxes", 
-  "fieldtype": "Section Break", 
-  "label": "Taxes and Charges", 
-  "oldfieldtype": "Section Break", 
-  "options": "icon-money", 
-  "print_hide": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "taxes_and_charges", 
-  "fieldtype": "Link", 
-  "label": "Taxes and Charges", 
-  "oldfieldname": "charge", 
-  "oldfieldtype": "Link", 
-  "options": "Sales Taxes and Charges Master", 
-  "print_hide": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break_38", 
-  "fieldtype": "Column Break"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "shipping_rule", 
-  "fieldtype": "Link", 
-  "label": "Shipping Rule", 
-  "oldfieldtype": "Button", 
-  "options": "Shipping Rule", 
-  "print_hide": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "section_break_40", 
-  "fieldtype": "Section Break"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "other_charges", 
-  "fieldtype": "Table", 
-  "label": "Sales Taxes and Charges", 
-  "oldfieldname": "other_charges", 
-  "oldfieldtype": "Table", 
-  "options": "Sales Taxes and Charges"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "other_charges_calculation", 
-  "fieldtype": "HTML", 
-  "label": "Taxes and Charges Calculation", 
-  "oldfieldtype": "HTML", 
-  "print_hide": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "section_break_43", 
-  "fieldtype": "Section Break"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "other_charges_total_export", 
-  "fieldtype": "Currency", 
-  "label": "Taxes and Charges Total", 
-  "options": "currency", 
-  "print_hide": 1, 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break_46", 
-  "fieldtype": "Column Break"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "other_charges_total", 
-  "fieldtype": "Currency", 
-  "label": "Taxes and Charges Total (Company Currency)", 
-  "oldfieldname": "other_charges_total", 
-  "oldfieldtype": "Currency", 
-  "options": "Company:company:default_currency", 
-  "print_hide": 1, 
-  "read_only": 1, 
-  "width": "150px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "discount_amount", 
-  "fieldtype": "Currency", 
-  "label": "Discount Amount", 
-  "options": "Company:company:default_currency"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "totals", 
-  "fieldtype": "Section Break", 
-  "label": "Totals", 
-  "oldfieldtype": "Section Break", 
-  "options": "icon-money", 
-  "print_hide": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "grand_total_export", 
-  "fieldtype": "Currency", 
-  "label": "Grand Total", 
-  "oldfieldname": "grand_total_export", 
-  "oldfieldtype": "Currency", 
-  "options": "currency", 
-  "print_hide": 0, 
-  "read_only": 1, 
-  "reqd": 0, 
-  "width": "150px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "rounded_total_export", 
-  "fieldtype": "Currency", 
-  "label": "Rounded Total", 
-  "oldfieldname": "rounded_total_export", 
-  "oldfieldtype": "Currency", 
-  "options": "currency", 
-  "print_hide": 0, 
-  "read_only": 1, 
-  "width": "150px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "in_words_export", 
-  "fieldtype": "Data", 
-  "label": "In Words", 
-  "oldfieldname": "in_words_export", 
-  "oldfieldtype": "Data", 
-  "print_hide": 0, 
-  "read_only": 1, 
-  "width": "200px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break3", 
-  "fieldtype": "Column Break", 
-  "oldfieldtype": "Column Break", 
-  "print_hide": 1, 
-  "width": "50%"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "grand_total", 
-  "fieldtype": "Currency", 
-  "label": "Grand Total (Company Currency)", 
-  "oldfieldname": "grand_total", 
-  "oldfieldtype": "Currency", 
-  "options": "Company:company:default_currency", 
-  "print_hide": 1, 
-  "read_only": 1, 
-  "reqd": 0, 
-  "width": "150px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "rounded_total", 
-  "fieldtype": "Currency", 
-  "label": "Rounded Total (Company Currency)", 
-  "oldfieldname": "rounded_total", 
-  "oldfieldtype": "Currency", 
-  "options": "Company:company:default_currency", 
-  "print_hide": 1, 
-  "read_only": 1, 
-  "width": "150px"
- }, 
- {
-  "description": "In Words will be visible once you save the Sales Order.", 
-  "doctype": "DocField", 
-  "fieldname": "in_words", 
-  "fieldtype": "Data", 
-  "label": "In Words (Company Currency)", 
-  "oldfieldname": "in_words", 
-  "oldfieldtype": "Data", 
-  "print_hide": 1, 
-  "read_only": 1, 
-  "width": "200px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "terms_section_break", 
-  "fieldtype": "Section Break", 
-  "label": "Terms and Conditions", 
-  "oldfieldtype": "Section Break", 
-  "options": "icon-legal", 
-  "print_hide": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "tc_name", 
-  "fieldtype": "Link", 
-  "label": "Terms", 
-  "oldfieldname": "tc_name", 
-  "oldfieldtype": "Link", 
-  "options": "Terms and Conditions", 
-  "print_hide": 1, 
-  "search_index": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "terms", 
-  "fieldtype": "Text Editor", 
-  "label": "Terms and Conditions Details", 
-  "oldfieldname": "terms", 
-  "oldfieldtype": "Text Editor", 
-  "print_hide": 0
- }, 
- {
-  "depends_on": "customer", 
-  "doctype": "DocField", 
-  "fieldname": "contact_info", 
-  "fieldtype": "Section Break", 
-  "label": "Contact Info", 
-  "options": "icon-bullhorn"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "col_break45", 
-  "fieldtype": "Column Break", 
-  "width": "50%"
- }, 
- {
-  "description": "<a href=\"#Sales Browser/Territory\">Add / Edit</a>", 
-  "doctype": "DocField", 
-  "fieldname": "territory", 
-  "fieldtype": "Link", 
-  "in_filter": 1, 
-  "label": "Territory", 
-  "options": "Territory", 
-  "print_hide": 1, 
-  "reqd": 1, 
-  "search_index": 1
- }, 
- {
-  "description": "<a href=\"#Sales Browser/Customer Group\">Add / Edit</a>", 
-  "doctype": "DocField", 
-  "fieldname": "customer_group", 
-  "fieldtype": "Link", 
-  "in_filter": 1, 
-  "label": "Customer Group", 
-  "options": "Customer Group", 
-  "print_hide": 1, 
-  "reqd": 1, 
-  "search_index": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "col_break46", 
-  "fieldtype": "Column Break", 
-  "width": "50%"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "customer_address", 
-  "fieldtype": "Link", 
-  "hidden": 0, 
-  "in_filter": 1, 
-  "label": "Customer Address", 
-  "options": "Address", 
-  "print_hide": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "contact_person", 
-  "fieldtype": "Link", 
-  "in_filter": 1, 
-  "label": "Contact Person", 
-  "options": "Contact", 
-  "print_hide": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "more_info", 
-  "fieldtype": "Section Break", 
-  "label": "More Info", 
-  "oldfieldtype": "Section Break", 
-  "options": "icon-file-text", 
-  "print_hide": 1
- }, 
- {
-  "description": "Track this Sales Order against any Project", 
-  "doctype": "DocField", 
-  "fieldname": "project_name", 
-  "fieldtype": "Link", 
-  "in_filter": 1, 
-  "label": "Project Name", 
-  "oldfieldname": "project_name", 
-  "oldfieldtype": "Link", 
-  "options": "Project", 
-  "search_index": 1
- }, 
- {
-  "depends_on": "eval:doc.source == 'Campaign'", 
-  "doctype": "DocField", 
-  "fieldname": "campaign", 
-  "fieldtype": "Link", 
-  "label": "Campaign", 
-  "oldfieldname": "campaign", 
-  "oldfieldtype": "Link", 
-  "options": "Campaign", 
-  "print_hide": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "source", 
-  "fieldtype": "Select", 
-  "label": "Source", 
-  "oldfieldname": "source", 
-  "oldfieldtype": "Select", 
-  "options": "\nExisting Customer\nReference\nAdvertisement\nCold Calling\nExhibition\nSupplier Reference\nMass Mailing\nCustomer's Vendor\nCampaign", 
-  "print_hide": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break4", 
-  "fieldtype": "Column Break", 
-  "oldfieldtype": "Column Break", 
-  "print_hide": 1, 
-  "width": "50%"
- }, 
- {
-  "allow_on_submit": 1, 
-  "doctype": "DocField", 
-  "fieldname": "letter_head", 
-  "fieldtype": "Select", 
-  "label": "Letter Head", 
-  "oldfieldname": "letter_head", 
-  "oldfieldtype": "Select", 
-  "options": "link:Letter Head", 
-  "print_hide": 1
- }, 
- {
-  "allow_on_submit": 1, 
-  "doctype": "DocField", 
-  "fieldname": "select_print_heading", 
-  "fieldtype": "Link", 
-  "label": "Print Heading", 
-  "no_copy": 1, 
-  "oldfieldname": "select_print_heading", 
-  "oldfieldtype": "Link", 
-  "options": "Print Heading", 
-  "print_hide": 1, 
-  "report_hide": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "fiscal_year", 
-  "fieldtype": "Select", 
-  "in_filter": 1, 
-  "label": "Fiscal Year", 
-  "oldfieldname": "fiscal_year", 
-  "oldfieldtype": "Select", 
-  "options": "link:Fiscal Year", 
-  "print_hide": 1, 
-  "reqd": 1, 
-  "search_index": 1, 
-  "width": "150px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "section_break_78", 
-  "fieldtype": "Section Break", 
-  "oldfieldtype": "Column Break", 
-  "print_hide": 1, 
-  "width": "50%"
- }, 
- {
-  "default": "Draft", 
-  "doctype": "DocField", 
-  "fieldname": "status", 
-  "fieldtype": "Select", 
-  "in_filter": 1, 
-  "in_list_view": 1, 
-  "label": "Status", 
-  "no_copy": 1, 
-  "oldfieldname": "status", 
-  "oldfieldtype": "Select", 
-  "options": "\nDraft\nSubmitted\nStopped\nCancelled", 
-  "print_hide": 1, 
-  "read_only": 1, 
-  "reqd": 1, 
-  "search_index": 1, 
-  "width": "100px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "delivery_status", 
-  "fieldtype": "Select", 
-  "hidden": 1, 
-  "label": "Delivery Status", 
-  "no_copy": 1, 
-  "options": "Delivered\nNot Delivered\nPartly Delivered\nClosed\nNot Applicable", 
-  "print_hide": 1
- }, 
- {
-  "depends_on": "eval:!doc.__islocal", 
-  "description": "% of materials delivered against this Sales Order", 
-  "doctype": "DocField", 
-  "fieldname": "per_delivered", 
-  "fieldtype": "Percent", 
-  "in_filter": 1, 
-  "in_list_view": 1, 
-  "label": "%  Delivered", 
-  "no_copy": 1, 
-  "oldfieldname": "per_delivered", 
-  "oldfieldtype": "Currency", 
-  "print_hide": 1, 
-  "read_only": 1, 
-  "width": "100px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break_81", 
-  "fieldtype": "Column Break"
- }, 
- {
-  "depends_on": "eval:!doc.__islocal", 
-  "description": "% of materials billed against this Sales Order", 
-  "doctype": "DocField", 
-  "fieldname": "per_billed", 
-  "fieldtype": "Percent", 
-  "in_filter": 1, 
-  "in_list_view": 1, 
-  "label": "% Amount Billed", 
-  "no_copy": 1, 
-  "oldfieldname": "per_billed", 
-  "oldfieldtype": "Currency", 
-  "print_hide": 1, 
-  "read_only": 1, 
-  "width": "100px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "billing_status", 
-  "fieldtype": "Select", 
-  "hidden": 1, 
-  "label": "Billing Status", 
-  "no_copy": 1, 
-  "options": "Billed\nNot Billed\nPartly Billed\nClosed", 
-  "print_hide": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "sales_team_section_break", 
-  "fieldtype": "Section Break", 
-  "label": "Sales Team", 
-  "oldfieldtype": "Section Break", 
-  "options": "icon-group", 
-  "print_hide": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "sales_partner", 
-  "fieldtype": "Link", 
-  "in_filter": 1, 
-  "label": "Sales Partner", 
-  "oldfieldname": "sales_partner", 
-  "oldfieldtype": "Link", 
-  "options": "Sales Partner", 
-  "print_hide": 1, 
-  "search_index": 1, 
-  "width": "150px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break7", 
-  "fieldtype": "Column Break", 
-  "print_hide": 1, 
-  "width": "50%"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "commission_rate", 
-  "fieldtype": "Float", 
-  "label": "Commission Rate", 
-  "oldfieldname": "commission_rate", 
-  "oldfieldtype": "Currency", 
-  "print_hide": 1, 
-  "width": "100px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "total_commission", 
-  "fieldtype": "Currency", 
-  "label": "Total Commission", 
-  "oldfieldname": "total_commission", 
-  "oldfieldtype": "Currency", 
-  "options": "Company:company:default_currency", 
-  "print_hide": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "section_break1", 
-  "fieldtype": "Section Break", 
-  "print_hide": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "sales_team", 
-  "fieldtype": "Table", 
-  "label": "Sales Team1", 
-  "oldfieldname": "sales_team", 
-  "oldfieldtype": "Table", 
-  "options": "Sales Team", 
-  "print_hide": 1
- }, 
- {
-  "amend": 1, 
-  "cancel": 1, 
-  "create": 1, 
-  "delete": 1, 
-  "doctype": "DocPerm", 
-  "report": 1, 
-  "role": "Sales User", 
-  "submit": 1, 
-  "write": 1
- }, 
- {
-  "amend": 1, 
-  "cancel": 1, 
-  "create": 1, 
-  "delete": 1, 
-  "doctype": "DocPerm", 
-  "report": 1, 
-  "role": "Maintenance User", 
-  "submit": 1, 
-  "write": 1
- }, 
- {
-  "cancel": 0, 
-  "delete": 0, 
-  "doctype": "DocPerm", 
-  "role": "Accounts User"
- }, 
- {
-  "cancel": 0, 
-  "delete": 0, 
-  "doctype": "DocPerm", 
-  "role": "Customer"
- }
-]
\ No newline at end of file
+{
+ "allow_attach": 1, 
+ "allow_import": 1, 
+ "autoname": "naming_series:", 
+ "creation": "2013-06-18 12:39:59", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "document_type": "Transaction", 
+ "fields": [
+  {
+   "fieldname": "customer_section", 
+   "fieldtype": "Section Break", 
+   "label": "Customer", 
+   "options": "icon-user", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "column_break0", 
+   "fieldtype": "Column Break", 
+   "in_filter": 0, 
+   "oldfieldtype": "Column Break", 
+   "permlevel": 0, 
+   "search_index": 0, 
+   "width": "50%"
+  }, 
+  {
+   "fieldname": "naming_series", 
+   "fieldtype": "Select", 
+   "label": "Series", 
+   "no_copy": 1, 
+   "oldfieldname": "naming_series", 
+   "oldfieldtype": "Select", 
+   "options": "PI/2011/\nSO\nSO/10-11/\nSO1112", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "customer", 
+   "fieldtype": "Link", 
+   "in_filter": 1, 
+   "in_list_view": 1, 
+   "label": "Customer", 
+   "oldfieldname": "customer", 
+   "oldfieldtype": "Link", 
+   "options": "Customer", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "reqd": 1, 
+   "search_index": 1
+  }, 
+  {
+   "fieldname": "customer_name", 
+   "fieldtype": "Data", 
+   "hidden": 0, 
+   "label": "Name", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "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, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "contact_mobile", 
+   "fieldtype": "Text", 
+   "hidden": 1, 
+   "label": "Mobile No", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "contact_email", 
+   "fieldtype": "Text", 
+   "hidden": 1, 
+   "label": "Contact Email", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1
+  }, 
+  {
+   "default": "Sales", 
+   "fieldname": "order_type", 
+   "fieldtype": "Select", 
+   "in_list_view": 1, 
+   "label": "Order Type", 
+   "oldfieldname": "order_type", 
+   "oldfieldtype": "Select", 
+   "options": "\nSales\nMaintenance", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "column_break1", 
+   "fieldtype": "Column Break", 
+   "oldfieldtype": "Column Break", 
+   "permlevel": 0, 
+   "width": "50%"
+  }, 
+  {
+   "fieldname": "amended_from", 
+   "fieldtype": "Data", 
+   "hidden": 1, 
+   "ignore_restrictions": 1, 
+   "label": "Amended From", 
+   "no_copy": 1, 
+   "oldfieldname": "amended_from", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1, 
+   "width": "150px"
+  }, 
+  {
+   "description": "Select the relevant company name if you have multiple companies.", 
+   "fieldname": "company", 
+   "fieldtype": "Link", 
+   "in_filter": 1, 
+   "label": "Company", 
+   "oldfieldname": "company", 
+   "oldfieldtype": "Link", 
+   "options": "Company", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "reqd": 1, 
+   "search_index": 1, 
+   "width": "150px"
+  }, 
+  {
+   "default": "Today", 
+   "fieldname": "transaction_date", 
+   "fieldtype": "Date", 
+   "in_filter": 1, 
+   "label": "Sales Order Date", 
+   "no_copy": 1, 
+   "oldfieldname": "transaction_date", 
+   "oldfieldtype": "Date", 
+   "permlevel": 0, 
+   "print_hide": 0, 
+   "reqd": 1, 
+   "search_index": 1, 
+   "width": "160px"
+  }, 
+  {
+   "depends_on": "eval:doc.order_type == 'Sales'", 
+   "fieldname": "delivery_date", 
+   "fieldtype": "Date", 
+   "hidden": 0, 
+   "in_filter": 1, 
+   "label": "Delivery Date", 
+   "oldfieldname": "delivery_date", 
+   "oldfieldtype": "Date", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "reqd": 0, 
+   "search_index": 1, 
+   "width": "160px"
+  }, 
+  {
+   "description": "Customer's Purchase Order Number", 
+   "fieldname": "po_no", 
+   "fieldtype": "Data", 
+   "hidden": 0, 
+   "label": "PO No", 
+   "oldfieldname": "po_no", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "print_hide": 0, 
+   "reqd": 0, 
+   "width": "100px"
+  }, 
+  {
+   "depends_on": "eval:doc.po_no", 
+   "description": "Customer's Purchase Order Date", 
+   "fieldname": "po_date", 
+   "fieldtype": "Date", 
+   "hidden": 0, 
+   "label": "PO Date", 
+   "oldfieldname": "po_date", 
+   "oldfieldtype": "Date", 
+   "permlevel": 0, 
+   "print_hide": 0, 
+   "reqd": 0, 
+   "width": "100px"
+  }, 
+  {
+   "fieldname": "shipping_address_name", 
+   "fieldtype": "Link", 
+   "hidden": 1, 
+   "in_filter": 1, 
+   "label": "Shipping Address", 
+   "options": "Address", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "shipping_address", 
+   "fieldtype": "Small Text", 
+   "hidden": 1, 
+   "in_filter": 0, 
+   "label": "Shipping Address", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "sec_break45", 
+   "fieldtype": "Section Break", 
+   "label": "Currency and Price List", 
+   "options": "icon-tag", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "currency", 
+   "fieldtype": "Link", 
+   "label": "Currency", 
+   "oldfieldname": "currency", 
+   "oldfieldtype": "Select", 
+   "options": "Currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "reqd": 1, 
+   "width": "100px"
+  }, 
+  {
+   "description": "Rate at which customer's currency is converted to company's base currency", 
+   "fieldname": "conversion_rate", 
+   "fieldtype": "Float", 
+   "label": "Exchange Rate", 
+   "oldfieldname": "conversion_rate", 
+   "oldfieldtype": "Currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "reqd": 1, 
+   "width": "100px"
+  }, 
+  {
+   "fieldname": "column_break2", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0, 
+   "width": "50%"
+  }, 
+  {
+   "fieldname": "selling_price_list", 
+   "fieldtype": "Link", 
+   "label": "Price List", 
+   "oldfieldname": "price_list_name", 
+   "oldfieldtype": "Select", 
+   "options": "Price List", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "reqd": 1, 
+   "width": "100px"
+  }, 
+  {
+   "fieldname": "price_list_currency", 
+   "fieldtype": "Link", 
+   "label": "Price List Currency", 
+   "options": "Currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1, 
+   "reqd": 1
+  }, 
+  {
+   "description": "Rate at which Price list currency is converted to company's base currency", 
+   "fieldname": "plc_conversion_rate", 
+   "fieldtype": "Float", 
+   "label": "Price List Exchange Rate", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "items", 
+   "fieldtype": "Section Break", 
+   "label": "Items", 
+   "oldfieldtype": "Section Break", 
+   "options": "icon-shopping-cart", 
+   "permlevel": 0
+  }, 
+  {
+   "allow_on_submit": 1, 
+   "fieldname": "sales_order_details", 
+   "fieldtype": "Table", 
+   "label": "Sales Order Items", 
+   "oldfieldname": "sales_order_details", 
+   "oldfieldtype": "Table", 
+   "options": "Sales Order Item", 
+   "permlevel": 0, 
+   "print_hide": 0, 
+   "reqd": 1
+  }, 
+  {
+   "description": "Display all the individual items delivered with the main items", 
+   "fieldname": "packing_list", 
+   "fieldtype": "Section Break", 
+   "hidden": 0, 
+   "label": "Packing List", 
+   "oldfieldtype": "Section Break", 
+   "options": "icon-suitcase", 
+   "permlevel": 0, 
+   "print_hide": 1
+  }, 
+  {
+   "fieldname": "packing_details", 
+   "fieldtype": "Table", 
+   "label": "Packing Details", 
+   "oldfieldname": "packing_details", 
+   "oldfieldtype": "Table", 
+   "options": "Packed Item", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "section_break_31", 
+   "fieldtype": "Section Break", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "net_total_export", 
+   "fieldtype": "Currency", 
+   "label": "Net Total", 
+   "options": "currency", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "column_break_33", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "net_total", 
+   "fieldtype": "Currency", 
+   "label": "Net Total (Company Currency)", 
+   "oldfieldname": "net_total", 
+   "oldfieldtype": "Currency", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1, 
+   "reqd": 0, 
+   "width": "150px"
+  }, 
+  {
+   "fieldname": "taxes", 
+   "fieldtype": "Section Break", 
+   "label": "Taxes and Charges", 
+   "oldfieldtype": "Section Break", 
+   "options": "icon-money", 
+   "permlevel": 0, 
+   "print_hide": 0
+  }, 
+  {
+   "fieldname": "taxes_and_charges", 
+   "fieldtype": "Link", 
+   "label": "Taxes and Charges", 
+   "oldfieldname": "charge", 
+   "oldfieldtype": "Link", 
+   "options": "Sales Taxes and Charges Master", 
+   "permlevel": 0, 
+   "print_hide": 1
+  }, 
+  {
+   "fieldname": "column_break_38", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "shipping_rule", 
+   "fieldtype": "Link", 
+   "label": "Shipping Rule", 
+   "oldfieldtype": "Button", 
+   "options": "Shipping Rule", 
+   "permlevel": 0, 
+   "print_hide": 1
+  }, 
+  {
+   "fieldname": "section_break_40", 
+   "fieldtype": "Section Break", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "other_charges", 
+   "fieldtype": "Table", 
+   "label": "Sales Taxes and Charges", 
+   "oldfieldname": "other_charges", 
+   "oldfieldtype": "Table", 
+   "options": "Sales Taxes and Charges", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "other_charges_calculation", 
+   "fieldtype": "HTML", 
+   "label": "Taxes and Charges Calculation", 
+   "oldfieldtype": "HTML", 
+   "permlevel": 0, 
+   "print_hide": 0
+  }, 
+  {
+   "fieldname": "section_break_43", 
+   "fieldtype": "Section Break", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "other_charges_total_export", 
+   "fieldtype": "Currency", 
+   "label": "Taxes and Charges Total", 
+   "options": "currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "column_break_46", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "other_charges_total", 
+   "fieldtype": "Currency", 
+   "label": "Taxes and Charges Total (Company Currency)", 
+   "oldfieldname": "other_charges_total", 
+   "oldfieldtype": "Currency", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1, 
+   "width": "150px"
+  }, 
+  {
+   "fieldname": "discount_amount", 
+   "fieldtype": "Currency", 
+   "label": "Discount Amount", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "totals", 
+   "fieldtype": "Section Break", 
+   "label": "Totals", 
+   "oldfieldtype": "Section Break", 
+   "options": "icon-money", 
+   "permlevel": 0, 
+   "print_hide": 1
+  }, 
+  {
+   "fieldname": "grand_total_export", 
+   "fieldtype": "Currency", 
+   "label": "Grand Total", 
+   "oldfieldname": "grand_total_export", 
+   "oldfieldtype": "Currency", 
+   "options": "currency", 
+   "permlevel": 0, 
+   "print_hide": 0, 
+   "read_only": 1, 
+   "reqd": 0, 
+   "width": "150px"
+  }, 
+  {
+   "fieldname": "rounded_total_export", 
+   "fieldtype": "Currency", 
+   "label": "Rounded Total", 
+   "oldfieldname": "rounded_total_export", 
+   "oldfieldtype": "Currency", 
+   "options": "currency", 
+   "permlevel": 0, 
+   "print_hide": 0, 
+   "read_only": 1, 
+   "width": "150px"
+  }, 
+  {
+   "fieldname": "in_words_export", 
+   "fieldtype": "Data", 
+   "label": "In Words", 
+   "oldfieldname": "in_words_export", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "print_hide": 0, 
+   "read_only": 1, 
+   "width": "200px"
+  }, 
+  {
+   "fieldname": "column_break3", 
+   "fieldtype": "Column Break", 
+   "oldfieldtype": "Column Break", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "width": "50%"
+  }, 
+  {
+   "fieldname": "grand_total", 
+   "fieldtype": "Currency", 
+   "label": "Grand Total (Company Currency)", 
+   "oldfieldname": "grand_total", 
+   "oldfieldtype": "Currency", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1, 
+   "reqd": 0, 
+   "width": "150px"
+  }, 
+  {
+   "fieldname": "rounded_total", 
+   "fieldtype": "Currency", 
+   "label": "Rounded Total (Company Currency)", 
+   "oldfieldname": "rounded_total", 
+   "oldfieldtype": "Currency", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1, 
+   "width": "150px"
+  }, 
+  {
+   "description": "In Words will be visible once you save the Sales Order.", 
+   "fieldname": "in_words", 
+   "fieldtype": "Data", 
+   "label": "In Words (Company Currency)", 
+   "oldfieldname": "in_words", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1, 
+   "width": "200px"
+  }, 
+  {
+   "fieldname": "terms_section_break", 
+   "fieldtype": "Section Break", 
+   "label": "Terms and Conditions", 
+   "oldfieldtype": "Section Break", 
+   "options": "icon-legal", 
+   "permlevel": 0, 
+   "print_hide": 0
+  }, 
+  {
+   "fieldname": "tc_name", 
+   "fieldtype": "Link", 
+   "label": "Terms", 
+   "oldfieldname": "tc_name", 
+   "oldfieldtype": "Link", 
+   "options": "Terms and Conditions", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "search_index": 0
+  }, 
+  {
+   "fieldname": "terms", 
+   "fieldtype": "Text Editor", 
+   "label": "Terms and Conditions Details", 
+   "oldfieldname": "terms", 
+   "oldfieldtype": "Text Editor", 
+   "permlevel": 0, 
+   "print_hide": 0
+  }, 
+  {
+   "depends_on": "customer", 
+   "fieldname": "contact_info", 
+   "fieldtype": "Section Break", 
+   "label": "Contact Info", 
+   "options": "icon-bullhorn", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "col_break45", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0, 
+   "width": "50%"
+  }, 
+  {
+   "description": "<a href=\"#Sales Browser/Territory\">Add / Edit</a>", 
+   "fieldname": "territory", 
+   "fieldtype": "Link", 
+   "in_filter": 1, 
+   "label": "Territory", 
+   "options": "Territory", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "reqd": 1, 
+   "search_index": 1
+  }, 
+  {
+   "description": "<a href=\"#Sales Browser/Customer Group\">Add / Edit</a>", 
+   "fieldname": "customer_group", 
+   "fieldtype": "Link", 
+   "in_filter": 1, 
+   "label": "Customer Group", 
+   "options": "Customer Group", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "reqd": 1, 
+   "search_index": 1
+  }, 
+  {
+   "fieldname": "col_break46", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0, 
+   "width": "50%"
+  }, 
+  {
+   "fieldname": "customer_address", 
+   "fieldtype": "Link", 
+   "hidden": 0, 
+   "in_filter": 1, 
+   "label": "Customer Address", 
+   "options": "Address", 
+   "permlevel": 0, 
+   "print_hide": 1
+  }, 
+  {
+   "fieldname": "contact_person", 
+   "fieldtype": "Link", 
+   "in_filter": 1, 
+   "label": "Contact Person", 
+   "options": "Contact", 
+   "permlevel": 0, 
+   "print_hide": 1
+  }, 
+  {
+   "fieldname": "more_info", 
+   "fieldtype": "Section Break", 
+   "label": "More Info", 
+   "oldfieldtype": "Section Break", 
+   "options": "icon-file-text", 
+   "permlevel": 0, 
+   "print_hide": 1
+  }, 
+  {
+   "description": "Track this Sales Order against any Project", 
+   "fieldname": "project_name", 
+   "fieldtype": "Link", 
+   "in_filter": 1, 
+   "label": "Project Name", 
+   "oldfieldname": "project_name", 
+   "oldfieldtype": "Link", 
+   "options": "Project", 
+   "permlevel": 0, 
+   "search_index": 1
+  }, 
+  {
+   "depends_on": "eval:doc.source == 'Campaign'", 
+   "fieldname": "campaign", 
+   "fieldtype": "Link", 
+   "label": "Campaign", 
+   "oldfieldname": "campaign", 
+   "oldfieldtype": "Link", 
+   "options": "Campaign", 
+   "permlevel": 0, 
+   "print_hide": 1
+  }, 
+  {
+   "fieldname": "source", 
+   "fieldtype": "Select", 
+   "label": "Source", 
+   "oldfieldname": "source", 
+   "oldfieldtype": "Select", 
+   "options": "\nExisting Customer\nReference\nAdvertisement\nCold Calling\nExhibition\nSupplier Reference\nMass Mailing\nCustomer's Vendor\nCampaign", 
+   "permlevel": 0, 
+   "print_hide": 1
+  }, 
+  {
+   "fieldname": "column_break4", 
+   "fieldtype": "Column Break", 
+   "oldfieldtype": "Column Break", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "width": "50%"
+  }, 
+  {
+   "allow_on_submit": 1, 
+   "fieldname": "letter_head", 
+   "fieldtype": "Select", 
+   "label": "Letter Head", 
+   "oldfieldname": "letter_head", 
+   "oldfieldtype": "Select", 
+   "options": "link:Letter Head", 
+   "permlevel": 0, 
+   "print_hide": 1
+  }, 
+  {
+   "allow_on_submit": 1, 
+   "fieldname": "select_print_heading", 
+   "fieldtype": "Link", 
+   "label": "Print Heading", 
+   "no_copy": 1, 
+   "oldfieldname": "select_print_heading", 
+   "oldfieldtype": "Link", 
+   "options": "Print Heading", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "report_hide": 1
+  }, 
+  {
+   "fieldname": "fiscal_year", 
+   "fieldtype": "Select", 
+   "in_filter": 1, 
+   "label": "Fiscal Year", 
+   "oldfieldname": "fiscal_year", 
+   "oldfieldtype": "Select", 
+   "options": "link:Fiscal Year", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "reqd": 1, 
+   "search_index": 1, 
+   "width": "150px"
+  }, 
+  {
+   "fieldname": "section_break_78", 
+   "fieldtype": "Section Break", 
+   "oldfieldtype": "Column Break", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "width": "50%"
+  }, 
+  {
+   "default": "Draft", 
+   "fieldname": "status", 
+   "fieldtype": "Select", 
+   "in_filter": 1, 
+   "in_list_view": 1, 
+   "label": "Status", 
+   "no_copy": 1, 
+   "oldfieldname": "status", 
+   "oldfieldtype": "Select", 
+   "options": "\nDraft\nSubmitted\nStopped\nCancelled", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1, 
+   "reqd": 1, 
+   "search_index": 1, 
+   "width": "100px"
+  }, 
+  {
+   "fieldname": "delivery_status", 
+   "fieldtype": "Select", 
+   "hidden": 1, 
+   "label": "Delivery Status", 
+   "no_copy": 1, 
+   "options": "Delivered\nNot Delivered\nPartly Delivered\nClosed\nNot Applicable", 
+   "permlevel": 0, 
+   "print_hide": 1
+  }, 
+  {
+   "depends_on": "eval:!doc.__islocal", 
+   "description": "% of materials delivered against this Sales Order", 
+   "fieldname": "per_delivered", 
+   "fieldtype": "Percent", 
+   "in_filter": 1, 
+   "in_list_view": 1, 
+   "label": "%  Delivered", 
+   "no_copy": 1, 
+   "oldfieldname": "per_delivered", 
+   "oldfieldtype": "Currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1, 
+   "width": "100px"
+  }, 
+  {
+   "fieldname": "column_break_81", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0
+  }, 
+  {
+   "depends_on": "eval:!doc.__islocal", 
+   "description": "% of materials billed against this Sales Order", 
+   "fieldname": "per_billed", 
+   "fieldtype": "Percent", 
+   "in_filter": 1, 
+   "in_list_view": 1, 
+   "label": "% Amount Billed", 
+   "no_copy": 1, 
+   "oldfieldname": "per_billed", 
+   "oldfieldtype": "Currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1, 
+   "width": "100px"
+  }, 
+  {
+   "fieldname": "billing_status", 
+   "fieldtype": "Select", 
+   "hidden": 1, 
+   "label": "Billing Status", 
+   "no_copy": 1, 
+   "options": "Billed\nNot Billed\nPartly Billed\nClosed", 
+   "permlevel": 0, 
+   "print_hide": 1
+  }, 
+  {
+   "fieldname": "sales_team_section_break", 
+   "fieldtype": "Section Break", 
+   "label": "Sales Team", 
+   "oldfieldtype": "Section Break", 
+   "options": "icon-group", 
+   "permlevel": 0, 
+   "print_hide": 1
+  }, 
+  {
+   "fieldname": "sales_partner", 
+   "fieldtype": "Link", 
+   "in_filter": 1, 
+   "label": "Sales Partner", 
+   "oldfieldname": "sales_partner", 
+   "oldfieldtype": "Link", 
+   "options": "Sales Partner", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "search_index": 1, 
+   "width": "150px"
+  }, 
+  {
+   "fieldname": "column_break7", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "width": "50%"
+  }, 
+  {
+   "fieldname": "commission_rate", 
+   "fieldtype": "Float", 
+   "label": "Commission Rate", 
+   "oldfieldname": "commission_rate", 
+   "oldfieldtype": "Currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "width": "100px"
+  }, 
+  {
+   "fieldname": "total_commission", 
+   "fieldtype": "Currency", 
+   "label": "Total Commission", 
+   "oldfieldname": "total_commission", 
+   "oldfieldtype": "Currency", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "print_hide": 1
+  }, 
+  {
+   "fieldname": "section_break1", 
+   "fieldtype": "Section Break", 
+   "permlevel": 0, 
+   "print_hide": 1
+  }, 
+  {
+   "fieldname": "sales_team", 
+   "fieldtype": "Table", 
+   "label": "Sales Team1", 
+   "oldfieldname": "sales_team", 
+   "oldfieldtype": "Table", 
+   "options": "Sales Team", 
+   "permlevel": 0, 
+   "print_hide": 1
+  }
+ ], 
+ "icon": "icon-file-text", 
+ "idx": 1, 
+ "is_submittable": 1, 
+ "issingle": 0, 
+ "modified": "2014-01-28 18:47:42", 
+ "modified_by": "Administrator", 
+ "module": "Selling", 
+ "name": "Sales Order", 
+ "owner": "Administrator", 
+ "permissions": [
+  {
+   "amend": 1, 
+   "cancel": 1, 
+   "create": 1, 
+   "delete": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Sales User", 
+   "submit": 1, 
+   "write": 1
+  }, 
+  {
+   "amend": 1, 
+   "cancel": 1, 
+   "create": 1, 
+   "delete": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Maintenance User", 
+   "submit": 1, 
+   "write": 1
+  }, 
+  {
+   "cancel": 0, 
+   "delete": 0, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "role": "Accounts User"
+  }, 
+  {
+   "cancel": 0, 
+   "delete": 0, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "role": "Customer"
+  }
+ ], 
+ "read_only_onload": 1, 
+ "search_fields": "status,transaction_date,customer,customer_name, territory,order_type,company"
+}
\ No newline at end of file
diff --git a/erpnext/selling/doctype/sales_order_item/sales_order_item.txt b/erpnext/selling/doctype/sales_order_item/sales_order_item.txt
index 7e471e4..d5b4d78 100644
--- a/erpnext/selling/doctype/sales_order_item/sales_order_item.txt
+++ b/erpnext/selling/doctype/sales_order_item/sales_order_item.txt
@@ -1,460 +1,447 @@
-[
- {
-  "creation": "2013-03-07 11:42:58", 
-  "docstatus": 0, 
-  "modified": "2014-02-28 11:20:05", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "autoname": "SOD/.#####", 
-  "doctype": "DocType", 
-  "istable": 1, 
-  "module": "Selling", 
-  "name": "__common__"
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "Sales Order Item", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Sales Order Item"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "item_code", 
-  "fieldtype": "Link", 
-  "in_filter": 1, 
-  "in_list_view": 1, 
-  "label": "Item Code", 
-  "oldfieldname": "item_code", 
-  "oldfieldtype": "Link", 
-  "options": "Item", 
-  "print_width": "150px", 
-  "read_only": 0, 
-  "reqd": 1, 
-  "search_index": 1, 
-  "width": "150px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "customer_item_code", 
-  "fieldtype": "Data", 
-  "hidden": 1, 
-  "in_list_view": 0, 
-  "label": "Customer's Item Code", 
-  "print_hide": 1, 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "item_name", 
-  "fieldtype": "Data", 
-  "in_list_view": 0, 
-  "label": "Item Name", 
-  "oldfieldname": "item_name", 
-  "oldfieldtype": "Data", 
-  "print_hide": 1, 
-  "print_width": "150", 
-  "read_only": 0, 
-  "reqd": 1, 
-  "width": "150"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "col_break1", 
-  "fieldtype": "Column Break"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "description", 
-  "fieldtype": "Small Text", 
-  "in_filter": 1, 
-  "in_list_view": 1, 
-  "label": "Description", 
-  "oldfieldname": "description", 
-  "oldfieldtype": "Small Text", 
-  "print_width": "300px", 
-  "read_only": 0, 
-  "reqd": 1, 
-  "search_index": 1, 
-  "width": "300px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "quantity_and_rate", 
-  "fieldtype": "Section Break", 
-  "in_list_view": 0, 
-  "label": "Quantity and Rate"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "qty", 
-  "fieldtype": "Float", 
-  "in_list_view": 1, 
-  "label": "Quantity", 
-  "oldfieldname": "qty", 
-  "oldfieldtype": "Currency", 
-  "print_width": "100px", 
-  "read_only": 0, 
-  "reqd": 1, 
-  "width": "100px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "price_list_rate", 
-  "fieldtype": "Currency", 
-  "in_list_view": 0, 
-  "label": "Price List Rate", 
-  "oldfieldname": "ref_rate", 
-  "oldfieldtype": "Currency", 
-  "options": "currency", 
-  "print_hide": 1, 
-  "print_width": "70px", 
-  "read_only": 1, 
-  "reqd": 0, 
-  "width": "70px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "discount_percentage", 
-  "fieldtype": "Float", 
-  "in_list_view": 0, 
-  "label": "Discount(%)", 
-  "oldfieldname": "adj_rate", 
-  "oldfieldtype": "Float", 
-  "print_hide": 1, 
-  "print_width": "70px", 
-  "read_only": 0, 
-  "width": "70px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "col_break2", 
-  "fieldtype": "Column Break"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "stock_uom", 
-  "fieldtype": "Link", 
-  "hidden": 0, 
-  "in_list_view": 0, 
-  "label": "UOM", 
-  "oldfieldname": "stock_uom", 
-  "oldfieldtype": "Data", 
-  "options": "UOM", 
-  "print_width": "70px", 
-  "read_only": 1, 
-  "reqd": 0, 
-  "width": "70px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "base_price_list_rate", 
-  "fieldtype": "Currency", 
-  "in_list_view": 0, 
-  "label": "Price List Rate (Company Currency)", 
-  "oldfieldname": "base_ref_rate", 
-  "oldfieldtype": "Currency", 
-  "options": "Company:company:default_currency", 
-  "print_hide": 1, 
-  "print_width": "100px", 
-  "read_only": 1, 
-  "width": "100px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "section_break_simple1", 
-  "fieldtype": "Section Break"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "rate", 
-  "fieldtype": "Currency", 
-  "in_list_view": 1, 
-  "label": "Rate", 
-  "oldfieldname": "export_rate", 
-  "oldfieldtype": "Currency", 
-  "options": "currency", 
-  "print_width": "100px", 
-  "read_only": 0, 
-  "reqd": 0, 
-  "width": "100px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "amount", 
-  "fieldtype": "Currency", 
-  "in_list_view": 1, 
-  "label": "Amount", 
-  "no_copy": 0, 
-  "oldfieldname": "export_amount", 
-  "oldfieldtype": "Currency", 
-  "options": "currency", 
-  "print_width": "100px", 
-  "read_only": 1, 
-  "reqd": 0, 
-  "width": "100px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "col_break3", 
-  "fieldtype": "Column Break"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "base_rate", 
-  "fieldtype": "Currency", 
-  "in_list_view": 0, 
-  "label": "Basic Rate (Company Currency)", 
-  "oldfieldname": "basic_rate", 
-  "oldfieldtype": "Currency", 
-  "options": "Company:company:default_currency", 
-  "print_hide": 1, 
-  "print_width": "100px", 
-  "read_only": 1, 
-  "reqd": 0, 
-  "width": "100px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "base_amount", 
-  "fieldtype": "Currency", 
-  "in_list_view": 0, 
-  "label": "Amount (Company Currency)", 
-  "no_copy": 0, 
-  "oldfieldname": "amount", 
-  "oldfieldtype": "Currency", 
-  "options": "Company:company:default_currency", 
-  "print_hide": 1, 
-  "print_width": "100px", 
-  "read_only": 1, 
-  "reqd": 0, 
-  "width": "100px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "pricing_rule_for_price", 
-  "fieldtype": "Link", 
-  "label": "Pricing Rule For Price", 
-  "options": "Pricing Rule", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "pricing_rule_for_discount", 
-  "fieldtype": "Link", 
-  "label": "Pricing Rule For Discount", 
-  "options": "Pricing Rule", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "warehouse_and_reference", 
-  "fieldtype": "Section Break", 
-  "in_list_view": 0, 
-  "label": "Warehouse and Reference"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "warehouse", 
-  "fieldtype": "Link", 
-  "in_list_view": 0, 
-  "label": "Reserved Warehouse", 
-  "no_copy": 0, 
-  "oldfieldname": "reserved_warehouse", 
-  "oldfieldtype": "Link", 
-  "options": "Warehouse", 
-  "print_hide": 1, 
-  "print_width": "150px", 
-  "read_only": 0, 
-  "reqd": 0, 
-  "width": "150px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "prevdoc_docname", 
-  "fieldtype": "Link", 
-  "hidden": 0, 
-  "in_filter": 1, 
-  "in_list_view": 0, 
-  "label": "Quotation", 
-  "no_copy": 1, 
-  "oldfieldname": "prevdoc_docname", 
-  "oldfieldtype": "Link", 
-  "options": "Quotation", 
-  "print_hide": 1, 
-  "read_only": 1, 
-  "search_index": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "brand", 
-  "fieldtype": "Link", 
-  "hidden": 1, 
-  "in_filter": 1, 
-  "in_list_view": 0, 
-  "label": "Brand Name", 
-  "oldfieldname": "brand", 
-  "oldfieldtype": "Link", 
-  "options": "Brand", 
-  "print_hide": 1, 
-  "read_only": 1, 
-  "search_index": 1
- }, 
- {
-  "description": "<a href=\"#Sales Browser/Item Group\">Add / Edit</a>", 
-  "doctype": "DocField", 
-  "fieldname": "item_group", 
-  "fieldtype": "Link", 
-  "hidden": 1, 
-  "in_filter": 1, 
-  "in_list_view": 0, 
-  "label": "Item Group", 
-  "oldfieldname": "item_group", 
-  "oldfieldtype": "Link", 
-  "options": "Item Group", 
-  "print_hide": 1, 
-  "read_only": 1, 
-  "search_index": 1
- }, 
- {
-  "allow_on_submit": 1, 
-  "doctype": "DocField", 
-  "fieldname": "page_break", 
-  "fieldtype": "Check", 
-  "in_list_view": 0, 
-  "label": "Page Break", 
-  "oldfieldname": "page_break", 
-  "oldfieldtype": "Check", 
-  "print_hide": 1, 
-  "read_only": 0, 
-  "report_hide": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "col_break4", 
-  "fieldtype": "Column Break"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "projected_qty", 
-  "fieldtype": "Float", 
-  "hidden": 1, 
-  "in_list_view": 0, 
-  "label": "Projected Qty", 
-  "no_copy": 1, 
-  "oldfieldname": "projected_qty", 
-  "oldfieldtype": "Currency", 
-  "print_hide": 1, 
-  "print_width": "70px", 
-  "read_only": 1, 
-  "width": "70px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "actual_qty", 
-  "fieldtype": "Float", 
-  "in_list_view": 0, 
-  "label": "Actual Qty", 
-  "no_copy": 1, 
-  "print_hide": 1, 
-  "print_width": "70px", 
-  "read_only": 1, 
-  "width": "70px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "delivered_qty", 
-  "fieldtype": "Float", 
-  "hidden": 0, 
-  "in_filter": 0, 
-  "in_list_view": 0, 
-  "label": "Delivered Qty", 
-  "no_copy": 1, 
-  "oldfieldname": "delivered_qty", 
-  "oldfieldtype": "Currency", 
-  "print_hide": 1, 
-  "print_width": "100px", 
-  "read_only": 1, 
-  "search_index": 0, 
-  "width": "100px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "billed_amt", 
-  "fieldtype": "Currency", 
-  "in_list_view": 0, 
-  "label": "Billed Amt", 
-  "no_copy": 1, 
-  "options": "currency", 
-  "print_hide": 1, 
-  "read_only": 1
- }, 
- {
-  "description": "For Production", 
-  "doctype": "DocField", 
-  "fieldname": "planned_qty", 
-  "fieldtype": "Float", 
-  "hidden": 1, 
-  "in_list_view": 0, 
-  "label": "Planned Quantity", 
-  "no_copy": 1, 
-  "oldfieldname": "planned_qty", 
-  "oldfieldtype": "Currency", 
-  "print_hide": 1, 
-  "print_width": "50px", 
-  "read_only": 1, 
-  "report_hide": 1, 
-  "width": "50px"
- }, 
- {
-  "description": "For Production", 
-  "doctype": "DocField", 
-  "fieldname": "produced_qty", 
-  "fieldtype": "Float", 
-  "hidden": 1, 
-  "in_list_view": 0, 
-  "label": "Produced Quantity", 
-  "oldfieldname": "produced_qty", 
-  "oldfieldtype": "Currency", 
-  "print_hide": 1, 
-  "print_width": "50px", 
-  "read_only": 1, 
-  "report_hide": 1, 
-  "width": "50px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "item_tax_rate", 
-  "fieldtype": "Small Text", 
-  "hidden": 1, 
-  "in_list_view": 0, 
-  "label": "Item Tax Rate", 
-  "oldfieldname": "item_tax_rate", 
-  "oldfieldtype": "Small Text", 
-  "print_hide": 1, 
-  "read_only": 1, 
-  "report_hide": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "transaction_date", 
-  "fieldtype": "Date", 
-  "hidden": 1, 
-  "in_filter": 0, 
-  "in_list_view": 0, 
-  "label": "Sales Order Date", 
-  "oldfieldname": "transaction_date", 
-  "oldfieldtype": "Date", 
-  "print_hide": 1, 
-  "read_only": 1, 
-  "report_hide": 1, 
-  "search_index": 0
- }
-]
\ No newline at end of file
+{
+ "autoname": "SOD/.#####", 
+ "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, 
+   "width": "150px"
+  }, 
+  {
+   "fieldname": "customer_item_code", 
+   "fieldtype": "Data", 
+   "hidden": 1, 
+   "in_list_view": 0, 
+   "label": "Customer's Item Code", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "item_name", 
+   "fieldtype": "Data", 
+   "in_list_view": 0, 
+   "label": "Item Name", 
+   "oldfieldname": "item_name", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "print_width": "150", 
+   "read_only": 0, 
+   "reqd": 1, 
+   "width": "150"
+  }, 
+  {
+   "fieldname": "col_break1", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0
+  }, 
+  {
+   "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": "quantity_and_rate", 
+   "fieldtype": "Section Break", 
+   "in_list_view": 0, 
+   "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, 
+   "width": "100px"
+  }, 
+  {
+   "fieldname": "price_list_rate", 
+   "fieldtype": "Currency", 
+   "in_list_view": 0, 
+   "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": "Float", 
+   "in_list_view": 0, 
+   "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", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "stock_uom", 
+   "fieldtype": "Link", 
+   "hidden": 0, 
+   "in_list_view": 0, 
+   "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", 
+   "in_list_view": 0, 
+   "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", 
+   "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, 
+   "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, 
+   "width": "100px"
+  }, 
+  {
+   "fieldname": "col_break3", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "base_rate", 
+   "fieldtype": "Currency", 
+   "in_list_view": 0, 
+   "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", 
+   "in_list_view": 0, 
+   "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_for_price", 
+   "fieldtype": "Link", 
+   "label": "Pricing Rule For Price", 
+   "options": "Pricing Rule", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "pricing_rule_for_discount", 
+   "fieldtype": "Link", 
+   "label": "Pricing Rule For Discount", 
+   "options": "Pricing Rule", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "warehouse_and_reference", 
+   "fieldtype": "Section Break", 
+   "in_list_view": 0, 
+   "label": "Warehouse and Reference", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "warehouse", 
+   "fieldtype": "Link", 
+   "in_list_view": 0, 
+   "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, 
+   "in_list_view": 0, 
+   "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, 
+   "in_list_view": 0, 
+   "label": "Brand Name", 
+   "oldfieldname": "brand", 
+   "oldfieldtype": "Link", 
+   "options": "Brand", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1, 
+   "search_index": 1
+  }, 
+  {
+   "description": "<a href=\"#Sales Browser/Item Group\">Add / Edit</a>", 
+   "fieldname": "item_group", 
+   "fieldtype": "Link", 
+   "hidden": 1, 
+   "in_filter": 1, 
+   "in_list_view": 0, 
+   "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", 
+   "in_list_view": 0, 
+   "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", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "projected_qty", 
+   "fieldtype": "Float", 
+   "hidden": 1, 
+   "in_list_view": 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"
+  }, 
+  {
+   "fieldname": "actual_qty", 
+   "fieldtype": "Float", 
+   "in_list_view": 0, 
+   "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, 
+   "in_list_view": 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", 
+   "in_list_view": 0, 
+   "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, 
+   "in_list_view": 0, 
+   "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, 
+   "in_list_view": 0, 
+   "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, 
+   "in_list_view": 0, 
+   "label": "Item Tax Rate", 
+   "oldfieldname": "item_tax_rate", 
+   "oldfieldtype": "Small Text", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1, 
+   "report_hide": 1
+  }, 
+  {
+   "fieldname": "transaction_date", 
+   "fieldtype": "Date", 
+   "hidden": 1, 
+   "in_filter": 0, 
+   "in_list_view": 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": "2014-02-28 11:20:05", 
+ "modified_by": "Administrator", 
+ "module": "Selling", 
+ "name": "Sales Order Item", 
+ "owner": "Administrator"
+}
\ No newline at end of file
diff --git a/erpnext/selling/doctype/sales_team/sales_team.txt b/erpnext/selling/doctype/sales_team/sales_team.txt
index d012cb4..11bf544 100644
--- a/erpnext/selling/doctype/sales_team/sales_team.txt
+++ b/erpnext/selling/doctype/sales_team/sales_team.txt
@@ -1,120 +1,107 @@
-[
- {
-  "creation": "2013-04-19 13:30:51", 
-  "docstatus": 0, 
-  "modified": "2013-12-31 19:00:14", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "doctype": "DocType", 
-  "istable": 1, 
-  "module": "Selling", 
-  "name": "__common__"
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "Sales Team", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Sales Team"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "sales_person", 
-  "fieldtype": "Link", 
-  "in_filter": 1, 
-  "in_list_view": 1, 
-  "label": "Sales Person", 
-  "oldfieldname": "sales_person", 
-  "oldfieldtype": "Link", 
-  "options": "Sales Person", 
-  "print_width": "200px", 
-  "reqd": 1, 
-  "search_index": 1, 
-  "width": "200px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "sales_designation", 
-  "fieldtype": "Data", 
-  "hidden": 0, 
-  "in_list_view": 1, 
-  "label": "Designation", 
-  "oldfieldname": "sales_designation", 
-  "oldfieldtype": "Data", 
-  "print_width": "100px", 
-  "width": "100px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "contact_no", 
-  "fieldtype": "Data", 
-  "hidden": 1, 
-  "in_list_view": 1, 
-  "label": "Contact No.", 
-  "oldfieldname": "contact_no", 
-  "oldfieldtype": "Data", 
-  "print_width": "100px", 
-  "width": "100px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "col_break1", 
-  "fieldtype": "Column Break"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "allocated_percentage", 
-  "fieldtype": "Float", 
-  "in_list_view": 1, 
-  "label": "Contribution (%)", 
-  "oldfieldname": "allocated_percentage", 
-  "oldfieldtype": "Currency", 
-  "print_width": "100px", 
-  "reqd": 0, 
-  "width": "100px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "allocated_amount", 
-  "fieldtype": "Currency", 
-  "in_list_view": 1, 
-  "label": "Contribution to Net Total", 
-  "oldfieldname": "allocated_amount", 
-  "oldfieldtype": "Currency", 
-  "options": "Company:company:default_currency", 
-  "print_width": "120px", 
-  "read_only": 1, 
-  "reqd": 0, 
-  "width": "120px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "incentives", 
-  "fieldtype": "Currency", 
-  "in_list_view": 1, 
-  "label": "Incentives", 
-  "oldfieldname": "incentives", 
-  "oldfieldtype": "Currency", 
-  "options": "Company:company:default_currency"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "parenttype", 
-  "fieldtype": "Data", 
-  "hidden": 1, 
-  "in_filter": 1, 
-  "in_list_view": 0, 
-  "label": "Parenttype", 
-  "oldfieldname": "parenttype", 
-  "oldfieldtype": "Data", 
-  "print_hide": 1, 
-  "search_index": 1
- }
-]
\ No newline at end of file
+{
+ "creation": "2013-04-19 13:30:51", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "fields": [
+  {
+   "fieldname": "sales_person", 
+   "fieldtype": "Link", 
+   "in_filter": 1, 
+   "in_list_view": 1, 
+   "label": "Sales Person", 
+   "oldfieldname": "sales_person", 
+   "oldfieldtype": "Link", 
+   "options": "Sales Person", 
+   "permlevel": 0, 
+   "print_width": "200px", 
+   "reqd": 1, 
+   "search_index": 1, 
+   "width": "200px"
+  }, 
+  {
+   "fieldname": "sales_designation", 
+   "fieldtype": "Data", 
+   "hidden": 0, 
+   "in_list_view": 1, 
+   "label": "Designation", 
+   "oldfieldname": "sales_designation", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "print_width": "100px", 
+   "width": "100px"
+  }, 
+  {
+   "fieldname": "contact_no", 
+   "fieldtype": "Data", 
+   "hidden": 1, 
+   "in_list_view": 1, 
+   "label": "Contact No.", 
+   "oldfieldname": "contact_no", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "print_width": "100px", 
+   "width": "100px"
+  }, 
+  {
+   "fieldname": "col_break1", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "allocated_percentage", 
+   "fieldtype": "Float", 
+   "in_list_view": 1, 
+   "label": "Contribution (%)", 
+   "oldfieldname": "allocated_percentage", 
+   "oldfieldtype": "Currency", 
+   "permlevel": 0, 
+   "print_width": "100px", 
+   "reqd": 0, 
+   "width": "100px"
+  }, 
+  {
+   "fieldname": "allocated_amount", 
+   "fieldtype": "Currency", 
+   "in_list_view": 1, 
+   "label": "Contribution to Net Total", 
+   "oldfieldname": "allocated_amount", 
+   "oldfieldtype": "Currency", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "print_width": "120px", 
+   "read_only": 1, 
+   "reqd": 0, 
+   "width": "120px"
+  }, 
+  {
+   "fieldname": "incentives", 
+   "fieldtype": "Currency", 
+   "in_list_view": 1, 
+   "label": "Incentives", 
+   "oldfieldname": "incentives", 
+   "oldfieldtype": "Currency", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "parenttype", 
+   "fieldtype": "Data", 
+   "hidden": 1, 
+   "in_filter": 1, 
+   "in_list_view": 0, 
+   "label": "Parenttype", 
+   "oldfieldname": "parenttype", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "search_index": 1
+  }
+ ], 
+ "idx": 1, 
+ "istable": 1, 
+ "modified": "2013-12-31 19:00:14", 
+ "modified_by": "Administrator", 
+ "module": "Selling", 
+ "name": "Sales Team", 
+ "owner": "Administrator"
+}
\ No newline at end of file
diff --git a/erpnext/selling/doctype/selling_settings/selling_settings.txt b/erpnext/selling/doctype/selling_settings/selling_settings.txt
index 24d5c28..cee3a5c 100644
--- a/erpnext/selling/doctype/selling_settings/selling_settings.txt
+++ b/erpnext/selling/doctype/selling_settings/selling_settings.txt
@@ -1,109 +1,90 @@
-[
- {
-  "creation": "2013-06-25 10:25:16", 
-  "docstatus": 0, 
-  "modified": "2014-02-19 18:35:36", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "description": "Settings for Selling Module", 
-  "doctype": "DocType", 
-  "document_type": "Other", 
-  "icon": "icon-cog", 
-  "issingle": 1, 
-  "module": "Selling", 
-  "name": "__common__"
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "Selling Settings", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "create": 1, 
-  "doctype": "DocPerm", 
-  "email": 1, 
-  "name": "__common__", 
-  "parent": "Selling Settings", 
-  "parentfield": "permissions", 
-  "parenttype": "DocType", 
-  "permlevel": 0, 
-  "print": 1, 
-  "read": 1, 
-  "role": "System Manager", 
-  "write": 1
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Selling Settings"
- }, 
- {
-  "default": "Customer Name", 
-  "doctype": "DocField", 
-  "fieldname": "cust_master_name", 
-  "fieldtype": "Select", 
-  "label": "Customer Naming By", 
-  "options": "Customer Name\nNaming Series"
- }, 
- {
-  "description": "<a href=\"#Sales Browser/Customer Group\">Add / Edit</a>", 
-  "doctype": "DocField", 
-  "fieldname": "customer_group", 
-  "fieldtype": "Link", 
-  "label": "Default Customer Group", 
-  "options": "Customer Group"
- }, 
- {
-  "description": "<a href=\"#Sales Browser/Territory\">Add / Edit</a>", 
-  "doctype": "DocField", 
-  "fieldname": "territory", 
-  "fieldtype": "Link", 
-  "label": "Default Territory", 
-  "options": "Territory"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "selling_price_list", 
-  "fieldtype": "Link", 
-  "label": "Default Price List", 
-  "options": "Price List"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break_5", 
-  "fieldtype": "Column Break"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "so_required", 
-  "fieldtype": "Select", 
-  "label": "Sales Order Required", 
-  "options": "No\nYes"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "dn_required", 
-  "fieldtype": "Select", 
-  "label": "Delivery Note Required", 
-  "options": "No\nYes"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "maintain_same_sales_rate", 
-  "fieldtype": "Check", 
-  "label": "Maintain Same Rate Throughout Sales Cycle"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "editable_price_list_rate", 
-  "fieldtype": "Check", 
-  "label": "Allow user to edit Price List Rate in transactions"
- }, 
- {
-  "doctype": "DocPerm"
- }
-]
\ No newline at end of file
+{
+ "creation": "2013-06-25 10:25:16", 
+ "description": "Settings for Selling Module", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "document_type": "Other", 
+ "fields": [
+  {
+   "default": "Customer Name", 
+   "fieldname": "cust_master_name", 
+   "fieldtype": "Select", 
+   "label": "Customer Naming By", 
+   "options": "Customer Name\nNaming Series", 
+   "permlevel": 0
+  }, 
+  {
+   "description": "<a href=\"#Sales Browser/Customer Group\">Add / Edit</a>", 
+   "fieldname": "customer_group", 
+   "fieldtype": "Link", 
+   "label": "Default Customer Group", 
+   "options": "Customer Group", 
+   "permlevel": 0
+  }, 
+  {
+   "description": "<a href=\"#Sales Browser/Territory\">Add / Edit</a>", 
+   "fieldname": "territory", 
+   "fieldtype": "Link", 
+   "label": "Default Territory", 
+   "options": "Territory", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "selling_price_list", 
+   "fieldtype": "Link", 
+   "label": "Default Price List", 
+   "options": "Price List", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "column_break_5", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "so_required", 
+   "fieldtype": "Select", 
+   "label": "Sales Order Required", 
+   "options": "No\nYes", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "dn_required", 
+   "fieldtype": "Select", 
+   "label": "Delivery Note Required", 
+   "options": "No\nYes", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "maintain_same_sales_rate", 
+   "fieldtype": "Check", 
+   "label": "Maintain Same Rate Throughout Sales Cycle", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "editable_price_list_rate", 
+   "fieldtype": "Check", 
+   "label": "Allow user to edit Price List Rate in transactions", 
+   "permlevel": 0
+  }
+ ], 
+ "icon": "icon-cog", 
+ "idx": 1, 
+ "issingle": 1, 
+ "modified": "2014-02-19 18:35:36", 
+ "modified_by": "Administrator", 
+ "module": "Selling", 
+ "name": "Selling Settings", 
+ "owner": "Administrator", 
+ "permissions": [
+  {
+   "create": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "role": "System Manager", 
+   "write": 1
+  }
+ ]
+}
\ No newline at end of file
diff --git a/erpnext/selling/doctype/sms_center/sms_center.txt b/erpnext/selling/doctype/sms_center/sms_center.txt
index efa7a45..98e630d 100644
--- a/erpnext/selling/doctype/sms_center/sms_center.txt
+++ b/erpnext/selling/doctype/sms_center/sms_center.txt
@@ -1,148 +1,129 @@
-[
- {
-  "creation": "2013-01-10 16:34:22", 
-  "docstatus": 0, 
-  "modified": "2014-01-30 15:29:04", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "allow_attach": 0, 
-  "allow_copy": 1, 
-  "doctype": "DocType", 
-  "hide_heading": 0, 
-  "hide_toolbar": 0, 
-  "icon": "icon-mobile-phone", 
-  "in_create": 0, 
-  "issingle": 1, 
-  "module": "Selling", 
-  "name": "__common__", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "SMS Center", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "cancel": 0, 
-  "create": 1, 
-  "delete": 0, 
-  "doctype": "DocPerm", 
-  "export": 0, 
-  "import": 0, 
-  "name": "__common__", 
-  "parent": "SMS Center", 
-  "parentfield": "permissions", 
-  "parenttype": "DocType", 
-  "permlevel": 0, 
-  "read": 1, 
-  "report": 0, 
-  "role": "System Manager", 
-  "submit": 0, 
-  "write": 1
- }, 
- {
-  "doctype": "DocType", 
-  "name": "SMS Center"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break1", 
-  "fieldtype": "Column Break", 
-  "width": "50%"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "send_to", 
-  "fieldtype": "Select", 
-  "label": "Send To", 
-  "options": "\nAll Contact\nAll Customer Contact\nAll Supplier Contact\nAll Sales Partner Contact\nAll Lead (Open)\nAll Employee (Active)\nAll Sales Person"
- }, 
- {
-  "depends_on": "eval:doc.send_to=='All Customer Contact'", 
-  "doctype": "DocField", 
-  "fieldname": "customer", 
-  "fieldtype": "Link", 
-  "label": "Customer", 
-  "options": "Customer"
- }, 
- {
-  "depends_on": "eval:doc.send_to=='All Supplier Contact'", 
-  "doctype": "DocField", 
-  "fieldname": "supplier", 
-  "fieldtype": "Link", 
-  "label": "Supplier", 
-  "options": "Supplier"
- }, 
- {
-  "depends_on": "eval:doc.send_to=='All Employee (Active)'", 
-  "doctype": "DocField", 
-  "fieldname": "department", 
-  "fieldtype": "Select", 
-  "label": "Department", 
-  "options": "link:Department"
- }, 
- {
-  "depends_on": "eval:doc.send_to=='All Employee (Active)'", 
-  "doctype": "DocField", 
-  "fieldname": "branch", 
-  "fieldtype": "Select", 
-  "label": "Branch", 
-  "options": "link:Branch"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "create_receiver_list", 
-  "fieldtype": "Button", 
-  "label": "Create Receiver List", 
-  "options": "create_receiver_list"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "receiver_list", 
-  "fieldtype": "Code", 
-  "label": "Receiver List"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break9", 
-  "fieldtype": "Column Break", 
-  "width": "50%"
- }, 
- {
-  "description": "Messages greater than 160 characters will be split into multiple messages", 
-  "doctype": "DocField", 
-  "fieldname": "message", 
-  "fieldtype": "Text", 
-  "label": "Message", 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "total_words", 
-  "fieldtype": "Int", 
-  "label": "Total Words", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "total_messages", 
-  "fieldtype": "Int", 
-  "label": "Total Message(s)", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "send_sms", 
-  "fieldtype": "Button", 
-  "label": "Send SMS", 
-  "options": "send_sms"
- }, 
- {
-  "doctype": "DocPerm"
- }
-]
\ No newline at end of file
+{
+ "allow_attach": 0, 
+ "allow_copy": 1, 
+ "creation": "2013-01-10 16:34:22", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "fields": [
+  {
+   "fieldname": "column_break1", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0, 
+   "width": "50%"
+  }, 
+  {
+   "fieldname": "send_to", 
+   "fieldtype": "Select", 
+   "label": "Send To", 
+   "options": "\nAll Contact\nAll Customer Contact\nAll Supplier Contact\nAll Sales Partner Contact\nAll Lead (Open)\nAll Employee (Active)\nAll Sales Person", 
+   "permlevel": 0
+  }, 
+  {
+   "depends_on": "eval:doc.send_to=='All Customer Contact'", 
+   "fieldname": "customer", 
+   "fieldtype": "Link", 
+   "label": "Customer", 
+   "options": "Customer", 
+   "permlevel": 0
+  }, 
+  {
+   "depends_on": "eval:doc.send_to=='All Supplier Contact'", 
+   "fieldname": "supplier", 
+   "fieldtype": "Link", 
+   "label": "Supplier", 
+   "options": "Supplier", 
+   "permlevel": 0
+  }, 
+  {
+   "depends_on": "eval:doc.send_to=='All Employee (Active)'", 
+   "fieldname": "department", 
+   "fieldtype": "Select", 
+   "label": "Department", 
+   "options": "link:Department", 
+   "permlevel": 0
+  }, 
+  {
+   "depends_on": "eval:doc.send_to=='All Employee (Active)'", 
+   "fieldname": "branch", 
+   "fieldtype": "Select", 
+   "label": "Branch", 
+   "options": "link:Branch", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "create_receiver_list", 
+   "fieldtype": "Button", 
+   "label": "Create Receiver List", 
+   "options": "create_receiver_list", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "receiver_list", 
+   "fieldtype": "Code", 
+   "label": "Receiver List", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "column_break9", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0, 
+   "width": "50%"
+  }, 
+  {
+   "description": "Messages greater than 160 characters will be split into multiple messages", 
+   "fieldname": "message", 
+   "fieldtype": "Text", 
+   "label": "Message", 
+   "permlevel": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "total_words", 
+   "fieldtype": "Int", 
+   "label": "Total Words", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "total_messages", 
+   "fieldtype": "Int", 
+   "label": "Total Message(s)", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "send_sms", 
+   "fieldtype": "Button", 
+   "label": "Send SMS", 
+   "options": "send_sms", 
+   "permlevel": 0
+  }
+ ], 
+ "hide_heading": 0, 
+ "hide_toolbar": 0, 
+ "icon": "icon-mobile-phone", 
+ "idx": 1, 
+ "in_create": 0, 
+ "issingle": 1, 
+ "modified": "2014-01-30 15:29:04", 
+ "modified_by": "Administrator", 
+ "module": "Selling", 
+ "name": "SMS Center", 
+ "owner": "Administrator", 
+ "permissions": [
+  {
+   "cancel": 0, 
+   "create": 1, 
+   "delete": 0, 
+   "export": 0, 
+   "import": 0, 
+   "permlevel": 0, 
+   "read": 1, 
+   "report": 0, 
+   "role": "System Manager", 
+   "submit": 0, 
+   "write": 1
+  }
+ ], 
+ "read_only": 1
+}
\ No newline at end of file
diff --git a/erpnext/selling/page/sales_analytics/sales_analytics.txt b/erpnext/selling/page/sales_analytics/sales_analytics.txt
index 8753be6..113d432 100644
--- a/erpnext/selling/page/sales_analytics/sales_analytics.txt
+++ b/erpnext/selling/page/sales_analytics/sales_analytics.txt
@@ -1,41 +1,26 @@
-[
- {
-  "creation": "2012-09-21 20:15:12", 
-  "docstatus": 0, 
-  "modified": "2013-07-11 14:43:59", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "doctype": "Page", 
-  "icon": "icon-bar-chart", 
-  "module": "Selling", 
-  "name": "__common__", 
-  "page_name": "sales-analytics", 
-  "standard": "Yes", 
-  "title": "Sales Analytics"
- }, 
- {
-  "doctype": "Page Role", 
-  "name": "__common__", 
-  "parent": "sales-analytics", 
-  "parentfield": "roles", 
-  "parenttype": "Page"
- }, 
- {
-  "doctype": "Page", 
-  "name": "sales-analytics"
- }, 
- {
-  "doctype": "Page Role", 
-  "role": "Analytics"
- }, 
- {
-  "doctype": "Page Role", 
-  "role": "Sales Manager"
- }, 
- {
-  "doctype": "Page Role", 
-  "role": "Maintenance Manager"
- }
-]
\ No newline at end of file
+{
+ "creation": "2012-09-21 20:15:12", 
+ "docstatus": 0, 
+ "doctype": "Page", 
+ "icon": "icon-bar-chart", 
+ "idx": 1, 
+ "modified": "2013-07-11 14:43:59", 
+ "modified_by": "Administrator", 
+ "module": "Selling", 
+ "name": "sales-analytics", 
+ "owner": "Administrator", 
+ "page_name": "sales-analytics", 
+ "roles": [
+  {
+   "role": "Analytics"
+  }, 
+  {
+   "role": "Sales Manager"
+  }, 
+  {
+   "role": "Maintenance Manager"
+  }
+ ], 
+ "standard": "Yes", 
+ "title": "Sales Analytics"
+}
\ No newline at end of file
diff --git a/erpnext/selling/page/sales_browser/sales_browser.txt b/erpnext/selling/page/sales_browser/sales_browser.txt
index 5a047e2..d950d90 100644
--- a/erpnext/selling/page/sales_browser/sales_browser.txt
+++ b/erpnext/selling/page/sales_browser/sales_browser.txt
@@ -1,56 +1,37 @@
-[
- {
-  "creation": "2012-06-14 15:07:26", 
-  "docstatus": 0, 
-  "modified": "2013-07-11 14:43:56", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "doctype": "Page", 
-  "icon": "icon-sitemap", 
-  "module": "Selling", 
-  "name": "__common__", 
-  "page_name": "Sales Browser", 
-  "standard": "Yes"
- }, 
- {
-  "doctype": "Page Role", 
-  "name": "__common__", 
-  "parent": "Sales Browser", 
-  "parentfield": "roles", 
-  "parenttype": "Page"
- }, 
- {
-  "doctype": "Page", 
-  "name": "Sales Browser"
- }, 
- {
-  "doctype": "Page Role", 
-  "role": "Sales Master Manager"
- }, 
- {
-  "doctype": "Page Role", 
-  "role": "Material Master Manager"
- }, 
- {
-  "doctype": "Page Role", 
-  "role": "Accounts Manager"
- }, 
- {
-  "doctype": "Page Role", 
-  "role": "Sales Master Manager"
- }, 
- {
-  "doctype": "Page Role", 
-  "role": "Purchase Manager"
- }, 
- {
-  "doctype": "Page Role", 
-  "role": "Purchase Master Manager"
- }, 
- {
-  "doctype": "Page Role", 
-  "role": "Material Manager"
- }
-]
\ No newline at end of file
+{
+ "creation": "2012-06-14 15:07:26", 
+ "docstatus": 0, 
+ "doctype": "Page", 
+ "icon": "icon-sitemap", 
+ "idx": 1, 
+ "modified": "2013-07-11 14:43:56", 
+ "modified_by": "Administrator", 
+ "module": "Selling", 
+ "name": "Sales Browser", 
+ "owner": "Administrator", 
+ "page_name": "Sales Browser", 
+ "roles": [
+  {
+   "role": "Sales Master Manager"
+  }, 
+  {
+   "role": "Material Master Manager"
+  }, 
+  {
+   "role": "Accounts Manager"
+  }, 
+  {
+   "role": "Sales Master Manager"
+  }, 
+  {
+   "role": "Purchase Manager"
+  }, 
+  {
+   "role": "Purchase Master Manager"
+  }, 
+  {
+   "role": "Material Manager"
+  }
+ ], 
+ "standard": "Yes"
+}
\ No newline at end of file
diff --git a/erpnext/selling/page/sales_funnel/sales_funnel.txt b/erpnext/selling/page/sales_funnel/sales_funnel.txt
index b841f20..2e61c0e 100644
--- a/erpnext/selling/page/sales_funnel/sales_funnel.txt
+++ b/erpnext/selling/page/sales_funnel/sales_funnel.txt
@@ -1,33 +1,20 @@
-[
- {
-  "creation": "2013-10-04 13:17:18", 
-  "docstatus": 0, 
-  "modified": "2013-10-04 13:17:18", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "doctype": "Page", 
-  "icon": "icon-filter", 
-  "module": "Selling", 
-  "name": "__common__", 
-  "page_name": "sales-funnel", 
-  "standard": "Yes", 
-  "title": "Sales Funnel"
- }, 
- {
-  "doctype": "Page Role", 
-  "name": "__common__", 
-  "parent": "sales-funnel", 
-  "parentfield": "roles", 
-  "parenttype": "Page", 
-  "role": "Sales Manager"
- }, 
- {
-  "doctype": "Page", 
-  "name": "sales-funnel"
- }, 
- {
-  "doctype": "Page Role"
- }
-]
\ No newline at end of file
+{
+ "creation": "2013-10-04 13:17:18", 
+ "docstatus": 0, 
+ "doctype": "Page", 
+ "icon": "icon-filter", 
+ "idx": 1, 
+ "modified": "2013-10-04 13:17:18", 
+ "modified_by": "Administrator", 
+ "module": "Selling", 
+ "name": "sales-funnel", 
+ "owner": "Administrator", 
+ "page_name": "sales-funnel", 
+ "roles": [
+  {
+   "role": "Sales Manager"
+  }
+ ], 
+ "standard": "Yes", 
+ "title": "Sales Funnel"
+}
\ No newline at end of file
diff --git a/erpnext/selling/report/available_stock_for_packing_items/available_stock_for_packing_items.txt b/erpnext/selling/report/available_stock_for_packing_items/available_stock_for_packing_items.txt
index 6655caa..c81e8d3 100644
--- a/erpnext/selling/report/available_stock_for_packing_items/available_stock_for_packing_items.txt
+++ b/erpnext/selling/report/available_stock_for_packing_items/available_stock_for_packing_items.txt
@@ -1,22 +1,15 @@
-[
- {
-  "creation": "2013-06-21 13:40:05", 
-  "docstatus": 0, 
-  "modified": "2014-03-07 15:30:27", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "doctype": "Report", 
-  "is_standard": "Yes", 
-  "module": "Selling", 
-  "name": "__common__", 
-  "ref_doctype": "Sales BOM", 
-  "report_name": "Available Stock for Packing Items", 
-  "report_type": "Script Report"
- }, 
- {
-  "doctype": "Report", 
-  "name": "Available Stock for Packing Items"
- }
-]
\ No newline at end of file
+{
+ "creation": "2013-06-21 13:40:05", 
+ "docstatus": 0, 
+ "doctype": "Report", 
+ "idx": 1, 
+ "is_standard": "Yes", 
+ "modified": "2014-03-07 15:30:27", 
+ "modified_by": "Administrator", 
+ "module": "Selling", 
+ "name": "Available Stock for Packing Items", 
+ "owner": "Administrator", 
+ "ref_doctype": "Sales BOM", 
+ "report_name": "Available Stock for Packing Items", 
+ "report_type": "Script Report"
+}
\ No newline at end of file
diff --git a/erpnext/selling/report/customer_acquisition_and_loyalty/customer_acquisition_and_loyalty.txt b/erpnext/selling/report/customer_acquisition_and_loyalty/customer_acquisition_and_loyalty.txt
index 98ef3a9..6805f90 100644
--- a/erpnext/selling/report/customer_acquisition_and_loyalty/customer_acquisition_and_loyalty.txt
+++ b/erpnext/selling/report/customer_acquisition_and_loyalty/customer_acquisition_and_loyalty.txt
@@ -1,23 +1,16 @@
-[
- {
-  "creation": "2013-11-28 14:58:06", 
-  "docstatus": 0, 
-  "modified": "2014-03-07 15:30:27", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "add_total_row": 1, 
-  "doctype": "Report", 
-  "is_standard": "Yes", 
-  "module": "Selling", 
-  "name": "__common__", 
-  "ref_doctype": "Customer", 
-  "report_name": "Customer Acquisition and Loyalty", 
-  "report_type": "Script Report"
- }, 
- {
-  "doctype": "Report", 
-  "name": "Customer Acquisition and Loyalty"
- }
-]
\ No newline at end of file
+{
+ "add_total_row": 1, 
+ "creation": "2013-11-28 14:58:06", 
+ "docstatus": 0, 
+ "doctype": "Report", 
+ "idx": 1, 
+ "is_standard": "Yes", 
+ "modified": "2014-03-07 15:30:27", 
+ "modified_by": "Administrator", 
+ "module": "Selling", 
+ "name": "Customer Acquisition and Loyalty", 
+ "owner": "Administrator", 
+ "ref_doctype": "Customer", 
+ "report_name": "Customer Acquisition and Loyalty", 
+ "report_type": "Script Report"
+}
\ No newline at end of file
diff --git a/erpnext/selling/report/customer_addresses_and_contacts/customer_addresses_and_contacts.txt b/erpnext/selling/report/customer_addresses_and_contacts/customer_addresses_and_contacts.txt
index fbe5b77..a2805c5 100644
--- a/erpnext/selling/report/customer_addresses_and_contacts/customer_addresses_and_contacts.txt
+++ b/erpnext/selling/report/customer_addresses_and_contacts/customer_addresses_and_contacts.txt
@@ -1,23 +1,16 @@
-[
- {
-  "creation": "2012-10-04 18:45:27", 
-  "docstatus": 0, 
-  "modified": "2014-03-07 15:30:27", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "doctype": "Report", 
-  "is_standard": "Yes", 
-  "module": "Selling", 
-  "name": "__common__", 
-  "query": "SELECT\n\t`tabCustomer`.name as customer_id,\n\t`tabCustomer`.customer_name,\n\t`tabCustomer`.customer_group,\n\t`tabAddress`.address_line1,\n\t`tabAddress`.address_line2,\n\t`tabAddress`.city,\n\t`tabAddress`.state,\n\t`tabAddress`.pincode,\n\t`tabAddress`.country,\n\t`tabAddress`.is_primary_address, \n\t`tabContact`.first_name,\n\t`tabContact`.last_name,\n\t`tabContact`.phone,\n\t`tabContact`.mobile_no,\n\t`tabContact`.email_id,\n\t`tabContact`.is_primary_contact\nFROM\n\t`tabCustomer`\n\tleft join `tabAddress` on (\n\t\t`tabAddress`.customer=`tabCustomer`.name\n\t)\n\tleft join `tabContact` on (\n\t\t`tabContact`.customer=`tabCustomer`.name\n\t)\nWHERE\n\t`tabCustomer`.docstatus<2\nORDER BY\n\t`tabCustomer`.name asc", 
-  "ref_doctype": "Customer", 
-  "report_name": "Customer Addresses And Contacts", 
-  "report_type": "Query Report"
- }, 
- {
-  "doctype": "Report", 
-  "name": "Customer Addresses And Contacts"
- }
-]
\ No newline at end of file
+{
+ "creation": "2012-10-04 18:45:27", 
+ "docstatus": 0, 
+ "doctype": "Report", 
+ "idx": 1, 
+ "is_standard": "Yes", 
+ "modified": "2014-03-07 15:30:27", 
+ "modified_by": "Administrator", 
+ "module": "Selling", 
+ "name": "Customer Addresses And Contacts", 
+ "owner": "Administrator", 
+ "query": "SELECT\n\t`tabCustomer`.name as customer_id,\n\t`tabCustomer`.customer_name,\n\t`tabCustomer`.customer_group,\n\t`tabAddress`.address_line1,\n\t`tabAddress`.address_line2,\n\t`tabAddress`.city,\n\t`tabAddress`.state,\n\t`tabAddress`.pincode,\n\t`tabAddress`.country,\n\t`tabAddress`.is_primary_address, \n\t`tabContact`.first_name,\n\t`tabContact`.last_name,\n\t`tabContact`.phone,\n\t`tabContact`.mobile_no,\n\t`tabContact`.email_id,\n\t`tabContact`.is_primary_contact\nFROM\n\t`tabCustomer`\n\tleft join `tabAddress` on (\n\t\t`tabAddress`.customer=`tabCustomer`.name\n\t)\n\tleft join `tabContact` on (\n\t\t`tabContact`.customer=`tabCustomer`.name\n\t)\nWHERE\n\t`tabCustomer`.docstatus<2\nORDER BY\n\t`tabCustomer`.name asc", 
+ "ref_doctype": "Customer", 
+ "report_name": "Customer Addresses And Contacts", 
+ "report_type": "Query Report"
+}
\ No newline at end of file
diff --git a/erpnext/selling/report/customers_not_buying_since_long_time/customers_not_buying_since_long_time.txt b/erpnext/selling/report/customers_not_buying_since_long_time/customers_not_buying_since_long_time.txt
index 54ea37e..62d523c 100644
--- a/erpnext/selling/report/customers_not_buying_since_long_time/customers_not_buying_since_long_time.txt
+++ b/erpnext/selling/report/customers_not_buying_since_long_time/customers_not_buying_since_long_time.txt
@@ -1,22 +1,15 @@
-[
- {
-  "creation": "2013-06-07 12:27:07", 
-  "docstatus": 0, 
-  "modified": "2014-03-07 15:30:27", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "doctype": "Report", 
-  "is_standard": "Yes", 
-  "module": "Selling", 
-  "name": "__common__", 
-  "ref_doctype": "Sales Order", 
-  "report_name": "Customers Not Buying Since Long Time ", 
-  "report_type": "Script Report"
- }, 
- {
-  "doctype": "Report", 
-  "name": "Customers Not Buying Since Long Time"
- }
-]
\ No newline at end of file
+{
+ "creation": "2013-06-07 12:27:07", 
+ "docstatus": 0, 
+ "doctype": "Report", 
+ "idx": 1, 
+ "is_standard": "Yes", 
+ "modified": "2014-03-07 15:30:27", 
+ "modified_by": "Administrator", 
+ "module": "Selling", 
+ "name": "Customers Not Buying Since Long Time", 
+ "owner": "Administrator", 
+ "ref_doctype": "Sales Order", 
+ "report_name": "Customers Not Buying Since Long Time ", 
+ "report_type": "Script Report"
+}
\ No newline at end of file
diff --git a/erpnext/selling/report/item_wise_sales_history/item_wise_sales_history.txt b/erpnext/selling/report/item_wise_sales_history/item_wise_sales_history.txt
index d03ca92..0e4551b 100644
--- a/erpnext/selling/report/item_wise_sales_history/item_wise_sales_history.txt
+++ b/erpnext/selling/report/item_wise_sales_history/item_wise_sales_history.txt
@@ -1,25 +1,18 @@
-[
- {
-  "creation": "2013-05-23 17:42:24", 
-  "docstatus": 0, 
-  "modified": "2014-03-07 15:30:27", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "add_total_row": 1, 
-  "disabled": 0, 
-  "doctype": "Report", 
-  "is_standard": "Yes", 
-  "module": "Selling", 
-  "name": "__common__", 
-  "query": "select\n    so_item.item_code as \"Item Code:Link/Item:120\",\n\tso_item.item_name as \"Item Name::120\",\n\tso_item.description as \"Description::150\",\n\tso_item.qty as \"Qty:Float:100\",\n\tso_item.stock_uom as \"UOM:Link/UOM:80\",\n\tso_item.base_rate as \"Rate:Currency:120\",\n\tso_item.base_amount as \"Amount:Currency:120\",\n\tso.name as \"Sales Order:Link/Sales Order:120\",\n\tso.transaction_date as \"Transaction Date:Date:140\",\n\tso.customer as \"Customer:Link/Customer:130\",\n\tso.territory as \"Territory:Link/Territory:130\",\n    so.project_name as \"Project:Link/Project:130\",\n\tifnull(so_item.delivered_qty, 0) as \"Delivered Qty:Float:120\",\n\tifnull(so_item.billed_amt, 0) as \"Billed Amount:Currency:120\"\nfrom\n\t`tabSales Order` so, `tabSales Order Item` so_item\nwhere\n\tso.name = so_item.parent\n\tand so.docstatus = 1\norder by so.name desc", 
-  "ref_doctype": "Sales Order", 
-  "report_name": "Item-wise Sales History", 
-  "report_type": "Query Report"
- }, 
- {
-  "doctype": "Report", 
-  "name": "Item-wise Sales History"
- }
-]
\ No newline at end of file
+{
+ "add_total_row": 1, 
+ "creation": "2013-05-23 17:42:24", 
+ "disabled": 0, 
+ "docstatus": 0, 
+ "doctype": "Report", 
+ "idx": 1, 
+ "is_standard": "Yes", 
+ "modified": "2014-03-07 15:30:27", 
+ "modified_by": "Administrator", 
+ "module": "Selling", 
+ "name": "Item-wise Sales History", 
+ "owner": "Administrator", 
+ "query": "select\n    so_item.item_code as \"Item Code:Link/Item:120\",\n\tso_item.item_name as \"Item Name::120\",\n\tso_item.description as \"Description::150\",\n\tso_item.qty as \"Qty:Float:100\",\n\tso_item.stock_uom as \"UOM:Link/UOM:80\",\n\tso_item.base_rate as \"Rate:Currency:120\",\n\tso_item.base_amount as \"Amount:Currency:120\",\n\tso.name as \"Sales Order:Link/Sales Order:120\",\n\tso.transaction_date as \"Transaction Date:Date:140\",\n\tso.customer as \"Customer:Link/Customer:130\",\n\tso.territory as \"Territory:Link/Territory:130\",\n    so.project_name as \"Project:Link/Project:130\",\n\tifnull(so_item.delivered_qty, 0) as \"Delivered Qty:Float:120\",\n\tifnull(so_item.billed_amt, 0) as \"Billed Amount:Currency:120\"\nfrom\n\t`tabSales Order` so, `tabSales Order Item` so_item\nwhere\n\tso.name = so_item.parent\n\tand so.docstatus = 1\norder by so.name desc", 
+ "ref_doctype": "Sales Order", 
+ "report_name": "Item-wise Sales History", 
+ "report_type": "Query Report"
+}
\ No newline at end of file
diff --git a/erpnext/selling/report/lead_details/lead_details.txt b/erpnext/selling/report/lead_details/lead_details.txt
index 8c9f170..4c1021f 100644
--- a/erpnext/selling/report/lead_details/lead_details.txt
+++ b/erpnext/selling/report/lead_details/lead_details.txt
@@ -1,23 +1,16 @@
-[
- {
-  "creation": "2013-10-22 11:58:16", 
-  "docstatus": 0, 
-  "modified": "2014-03-07 15:30:27", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "doctype": "Report", 
-  "is_standard": "Yes", 
-  "module": "Selling", 
-  "name": "__common__", 
-  "query": "SELECT\n    `tabLead`.name as \"Lead Id:Link/Lead:120\",\n    `tabLead`.lead_name as \"Lead Name::120\",\n\t`tabLead`.company_name as \"Company Name::120\",\n\t`tabLead`.status as \"Status::120\",\n\tconcat_ws(', ', \n\t\ttrim(',' from `tabAddress`.address_line1), \n\t\ttrim(',' from tabAddress.address_line2), \n\t\ttabAddress.state, tabAddress.pincode, tabAddress.country\n\t) as 'Address::180',\n\t`tabLead`.phone as \"Phone::100\",\n\t`tabLead`.mobile_no as \"Mobile No::100\",\n\t`tabLead`.email_id as \"Email Id::120\",\n\t`tabLead`.lead_owner as \"Lead Owner::120\",\n\t`tabLead`.source as \"Source::120\",\n\t`tabLead`.territory as \"Territory::120\",\n    `tabLead`.owner as \"Owner:Link/User:120\"\nFROM\n\t`tabLead`\n\tleft join `tabAddress` on (\n\t\t`tabAddress`.lead=`tabLead`.name\n\t)\nWHERE\n\t`tabLead`.docstatus<2\nORDER BY\n\t`tabLead`.name asc", 
-  "ref_doctype": "Lead", 
-  "report_name": "Lead Details", 
-  "report_type": "Query Report"
- }, 
- {
-  "doctype": "Report", 
-  "name": "Lead Details"
- }
-]
\ No newline at end of file
+{
+ "creation": "2013-10-22 11:58:16", 
+ "docstatus": 0, 
+ "doctype": "Report", 
+ "idx": 1, 
+ "is_standard": "Yes", 
+ "modified": "2014-03-07 15:30:27", 
+ "modified_by": "Administrator", 
+ "module": "Selling", 
+ "name": "Lead Details", 
+ "owner": "Administrator", 
+ "query": "SELECT\n    `tabLead`.name as \"Lead Id:Link/Lead:120\",\n    `tabLead`.lead_name as \"Lead Name::120\",\n\t`tabLead`.company_name as \"Company Name::120\",\n\t`tabLead`.status as \"Status::120\",\n\tconcat_ws(', ', \n\t\ttrim(',' from `tabAddress`.address_line1), \n\t\ttrim(',' from tabAddress.address_line2), \n\t\ttabAddress.state, tabAddress.pincode, tabAddress.country\n\t) as 'Address::180',\n\t`tabLead`.phone as \"Phone::100\",\n\t`tabLead`.mobile_no as \"Mobile No::100\",\n\t`tabLead`.email_id as \"Email Id::120\",\n\t`tabLead`.lead_owner as \"Lead Owner::120\",\n\t`tabLead`.source as \"Source::120\",\n\t`tabLead`.territory as \"Territory::120\",\n    `tabLead`.owner as \"Owner:Link/User:120\"\nFROM\n\t`tabLead`\n\tleft join `tabAddress` on (\n\t\t`tabAddress`.lead=`tabLead`.name\n\t)\nWHERE\n\t`tabLead`.docstatus<2\nORDER BY\n\t`tabLead`.name asc", 
+ "ref_doctype": "Lead", 
+ "report_name": "Lead Details", 
+ "report_type": "Query Report"
+}
\ No newline at end of file
diff --git a/erpnext/selling/report/pending_so_items_for_purchase_request/pending_so_items_for_purchase_request.txt b/erpnext/selling/report/pending_so_items_for_purchase_request/pending_so_items_for_purchase_request.txt
index 07b524b..1c84245 100644
--- a/erpnext/selling/report/pending_so_items_for_purchase_request/pending_so_items_for_purchase_request.txt
+++ b/erpnext/selling/report/pending_so_items_for_purchase_request/pending_so_items_for_purchase_request.txt
@@ -1,23 +1,16 @@
-[
- {
-  "creation": "2013-06-21 16:46:45", 
-  "docstatus": 0, 
-  "modified": "2014-03-07 15:30:27", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "doctype": "Report", 
-  "is_standard": "Yes", 
-  "module": "Selling", 
-  "name": "__common__", 
-  "query": "select \n so_item.item_code as \"Item Code:Link/Item:120\",\n so_item.item_name as \"Item Name::120\",\n so_item.description as \"Description::120\",\n so.`name` as \"S.O. No.:Link/Sales Order:120\",\n so.`transaction_date` as \"Date:Date:120\",\n mr.name as \"Material Request:Link/Material Request:120\",\n so.customer as \"Customer:Link/Customer:120\",\n so.territory as \"Terretory:Link/Territory:120\",\n sum(so_item.qty) as \"SO Qty:Float:100 \",\n sum(mr_item.qty) as \"Requested Qty:Float:100\"\nfrom\n `tabSales Order` so, `tabSales Order Item` so_item, \n `tabMaterial Request` mr, `tabMaterial Request Item` mr_item\nwhere\n so_item.`parent` = so.`name` and mr_item.sales_order_no = so.name\n and mr_item.parent = mr.name \n and so.docstatus = 1 and so.status != \"Stopped\" \n and mr.docstatus = 1 and mr.status != \"Stopped\"\ngroup by so.name, so_item.item_code\norder by so.name desc, so_item.item_code asc", 
-  "ref_doctype": "Sales Order", 
-  "report_name": "Pending SO Items For Purchase Request", 
-  "report_type": "Query Report"
- }, 
- {
-  "doctype": "Report", 
-  "name": "Pending SO Items For Purchase Request"
- }
-]
\ No newline at end of file
+{
+ "creation": "2013-06-21 16:46:45", 
+ "docstatus": 0, 
+ "doctype": "Report", 
+ "idx": 1, 
+ "is_standard": "Yes", 
+ "modified": "2014-03-07 15:30:27", 
+ "modified_by": "Administrator", 
+ "module": "Selling", 
+ "name": "Pending SO Items For Purchase Request", 
+ "owner": "Administrator", 
+ "query": "select \n so_item.item_code as \"Item Code:Link/Item:120\",\n so_item.item_name as \"Item Name::120\",\n so_item.description as \"Description::120\",\n so.`name` as \"S.O. No.:Link/Sales Order:120\",\n so.`transaction_date` as \"Date:Date:120\",\n mr.name as \"Material Request:Link/Material Request:120\",\n so.customer as \"Customer:Link/Customer:120\",\n so.territory as \"Terretory:Link/Territory:120\",\n sum(so_item.qty) as \"SO Qty:Float:100 \",\n sum(mr_item.qty) as \"Requested Qty:Float:100\"\nfrom\n `tabSales Order` so, `tabSales Order Item` so_item, \n `tabMaterial Request` mr, `tabMaterial Request Item` mr_item\nwhere\n so_item.`parent` = so.`name` and mr_item.sales_order_no = so.name\n and mr_item.parent = mr.name \n and so.docstatus = 1 and so.status != \"Stopped\" \n and mr.docstatus = 1 and mr.status != \"Stopped\"\ngroup by so.name, so_item.item_code\norder by so.name desc, so_item.item_code asc", 
+ "ref_doctype": "Sales Order", 
+ "report_name": "Pending SO Items For Purchase Request", 
+ "report_type": "Query Report"
+}
\ No newline at end of file
diff --git a/erpnext/selling/report/quotation_trends/quotation_trends.txt b/erpnext/selling/report/quotation_trends/quotation_trends.txt
index 5db150f..0a1ca8a 100644
--- a/erpnext/selling/report/quotation_trends/quotation_trends.txt
+++ b/erpnext/selling/report/quotation_trends/quotation_trends.txt
@@ -1,23 +1,16 @@
-[
- {
-  "creation": "2013-06-07 16:01:16", 
-  "docstatus": 0, 
-  "modified": "2014-03-07 15:30:27", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "add_total_row": 0, 
-  "doctype": "Report", 
-  "is_standard": "Yes", 
-  "module": "Selling", 
-  "name": "__common__", 
-  "ref_doctype": "Quotation", 
-  "report_name": "Quotation Trends", 
-  "report_type": "Script Report"
- }, 
- {
-  "doctype": "Report", 
-  "name": "Quotation Trends"
- }
-]
\ No newline at end of file
+{
+ "add_total_row": 0, 
+ "creation": "2013-06-07 16:01:16", 
+ "docstatus": 0, 
+ "doctype": "Report", 
+ "idx": 1, 
+ "is_standard": "Yes", 
+ "modified": "2014-03-07 15:30:27", 
+ "modified_by": "Administrator", 
+ "module": "Selling", 
+ "name": "Quotation Trends", 
+ "owner": "Administrator", 
+ "ref_doctype": "Quotation", 
+ "report_name": "Quotation Trends", 
+ "report_type": "Script Report"
+}
\ No newline at end of file
diff --git a/erpnext/selling/report/sales_order_trends/sales_order_trends.txt b/erpnext/selling/report/sales_order_trends/sales_order_trends.txt
index 6ac7595..9624889 100644
--- a/erpnext/selling/report/sales_order_trends/sales_order_trends.txt
+++ b/erpnext/selling/report/sales_order_trends/sales_order_trends.txt
@@ -1,22 +1,15 @@
-[
- {
-  "creation": "2013-06-13 18:43:30", 
-  "docstatus": 0, 
-  "modified": "2014-03-07 15:30:27", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "doctype": "Report", 
-  "is_standard": "Yes", 
-  "module": "Selling", 
-  "name": "__common__", 
-  "ref_doctype": "Sales Order", 
-  "report_name": "Sales Order Trends", 
-  "report_type": "Script Report"
- }, 
- {
-  "doctype": "Report", 
-  "name": "Sales Order Trends"
- }
-]
\ No newline at end of file
+{
+ "creation": "2013-06-13 18:43:30", 
+ "docstatus": 0, 
+ "doctype": "Report", 
+ "idx": 1, 
+ "is_standard": "Yes", 
+ "modified": "2014-03-07 15:30:27", 
+ "modified_by": "Administrator", 
+ "module": "Selling", 
+ "name": "Sales Order Trends", 
+ "owner": "Administrator", 
+ "ref_doctype": "Sales Order", 
+ "report_name": "Sales Order Trends", 
+ "report_type": "Script Report"
+}
\ No newline at end of file
diff --git a/erpnext/selling/report/sales_person_target_variance_item_group_wise/sales_person_target_variance_item_group_wise.txt b/erpnext/selling/report/sales_person_target_variance_item_group_wise/sales_person_target_variance_item_group_wise.txt
index 56674e1..ed1f64e 100644
--- a/erpnext/selling/report/sales_person_target_variance_item_group_wise/sales_person_target_variance_item_group_wise.txt
+++ b/erpnext/selling/report/sales_person_target_variance_item_group_wise/sales_person_target_variance_item_group_wise.txt
@@ -1,22 +1,15 @@
-[
- {
-  "creation": "2013-06-21 12:14:15", 
-  "docstatus": 0, 
-  "modified": "2014-03-07 15:30:27", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "doctype": "Report", 
-  "is_standard": "Yes", 
-  "module": "Selling", 
-  "name": "__common__", 
-  "ref_doctype": "Sales Order", 
-  "report_name": "Sales Person Target Variance Item Group-Wise", 
-  "report_type": "Script Report"
- }, 
- {
-  "doctype": "Report", 
-  "name": "Sales Person Target Variance Item Group-Wise"
- }
-]
\ No newline at end of file
+{
+ "creation": "2013-06-21 12:14:15", 
+ "docstatus": 0, 
+ "doctype": "Report", 
+ "idx": 1, 
+ "is_standard": "Yes", 
+ "modified": "2014-03-07 15:30:27", 
+ "modified_by": "Administrator", 
+ "module": "Selling", 
+ "name": "Sales Person Target Variance Item Group-Wise", 
+ "owner": "Administrator", 
+ "ref_doctype": "Sales Order", 
+ "report_name": "Sales Person Target Variance Item Group-Wise", 
+ "report_type": "Script Report"
+}
\ No newline at end of file
diff --git a/erpnext/selling/report/sales_person_wise_transaction_summary/sales_person_wise_transaction_summary.txt b/erpnext/selling/report/sales_person_wise_transaction_summary/sales_person_wise_transaction_summary.txt
index b1334c6..3b1b3f2 100644
--- a/erpnext/selling/report/sales_person_wise_transaction_summary/sales_person_wise_transaction_summary.txt
+++ b/erpnext/selling/report/sales_person_wise_transaction_summary/sales_person_wise_transaction_summary.txt
@@ -1,23 +1,16 @@
-[
- {
-  "creation": "2013-05-03 11:31:05", 
-  "docstatus": 0, 
-  "modified": "2014-03-07 15:30:27", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "add_total_row": 1, 
-  "doctype": "Report", 
-  "is_standard": "Yes", 
-  "module": "Selling", 
-  "name": "__common__", 
-  "ref_doctype": "Sales Order", 
-  "report_name": "Sales Person-wise Transaction Summary", 
-  "report_type": "Script Report"
- }, 
- {
-  "doctype": "Report", 
-  "name": "Sales Person-wise Transaction Summary"
- }
-]
\ No newline at end of file
+{
+ "add_total_row": 1, 
+ "creation": "2013-05-03 11:31:05", 
+ "docstatus": 0, 
+ "doctype": "Report", 
+ "idx": 1, 
+ "is_standard": "Yes", 
+ "modified": "2014-03-07 15:30:27", 
+ "modified_by": "Administrator", 
+ "module": "Selling", 
+ "name": "Sales Person-wise Transaction Summary", 
+ "owner": "Administrator", 
+ "ref_doctype": "Sales Order", 
+ "report_name": "Sales Person-wise Transaction Summary", 
+ "report_type": "Script Report"
+}
\ No newline at end of file
diff --git a/erpnext/selling/report/territory_target_variance_item_group_wise/territory_target_variance_item_group_wise.txt b/erpnext/selling/report/territory_target_variance_item_group_wise/territory_target_variance_item_group_wise.txt
index 5bce007..321a5fe 100644
--- a/erpnext/selling/report/territory_target_variance_item_group_wise/territory_target_variance_item_group_wise.txt
+++ b/erpnext/selling/report/territory_target_variance_item_group_wise/territory_target_variance_item_group_wise.txt
@@ -1,22 +1,15 @@
-[
- {
-  "creation": "2013-06-21 12:15:00", 
-  "docstatus": 0, 
-  "modified": "2014-03-07 15:30:27", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "doctype": "Report", 
-  "is_standard": "Yes", 
-  "module": "Selling", 
-  "name": "__common__", 
-  "ref_doctype": "Sales Order", 
-  "report_name": "Territory Target Variance Item Group-Wise", 
-  "report_type": "Script Report"
- }, 
- {
-  "doctype": "Report", 
-  "name": "Territory Target Variance Item Group-Wise"
- }
-]
\ No newline at end of file
+{
+ "creation": "2013-06-21 12:15:00", 
+ "docstatus": 0, 
+ "doctype": "Report", 
+ "idx": 1, 
+ "is_standard": "Yes", 
+ "modified": "2014-03-07 15:30:27", 
+ "modified_by": "Administrator", 
+ "module": "Selling", 
+ "name": "Territory Target Variance Item Group-Wise", 
+ "owner": "Administrator", 
+ "ref_doctype": "Sales Order", 
+ "report_name": "Territory Target Variance Item Group-Wise", 
+ "report_type": "Script Report"
+}
\ No newline at end of file
diff --git a/erpnext/setup/doctype/applicable_territory/applicable_territory.txt b/erpnext/setup/doctype/applicable_territory/applicable_territory.txt
index 3a5b0f3..572015c 100644
--- a/erpnext/setup/doctype/applicable_territory/applicable_territory.txt
+++ b/erpnext/setup/doctype/applicable_territory/applicable_territory.txt
@@ -1,37 +1,24 @@
-[
- {
-  "creation": "2013-06-20 12:48:38", 
-  "docstatus": 0, 
-  "modified": "2013-12-20 19:22:53", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "doctype": "DocType", 
-  "istable": 1, 
-  "module": "Setup", 
-  "name": "__common__"
- }, 
- {
-  "description": "<a href=\"#Sales Browser/Territory\">Add / Edit</a>", 
-  "doctype": "DocField", 
-  "fieldname": "territory", 
-  "fieldtype": "Link", 
-  "in_list_view": 1, 
-  "label": "Territory", 
-  "name": "__common__", 
-  "options": "Territory", 
-  "parent": "Applicable Territory", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0, 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Applicable Territory"
- }, 
- {
-  "doctype": "DocField"
- }
-]
\ No newline at end of file
+{
+ "creation": "2013-06-20 12:48:38", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "fields": [
+  {
+   "description": "<a href=\"#Sales Browser/Territory\">Add / Edit</a>", 
+   "fieldname": "territory", 
+   "fieldtype": "Link", 
+   "in_list_view": 1, 
+   "label": "Territory", 
+   "options": "Territory", 
+   "permlevel": 0, 
+   "reqd": 1
+  }
+ ], 
+ "idx": 1, 
+ "istable": 1, 
+ "modified": "2013-12-20 19:22:53", 
+ "modified_by": "Administrator", 
+ "module": "Setup", 
+ "name": "Applicable Territory", 
+ "owner": "Administrator"
+}
\ No newline at end of file
diff --git a/erpnext/setup/doctype/authorization_control/authorization_control.txt b/erpnext/setup/doctype/authorization_control/authorization_control.txt
index c5628d2..66db33a 100644
--- a/erpnext/setup/doctype/authorization_control/authorization_control.txt
+++ b/erpnext/setup/doctype/authorization_control/authorization_control.txt
@@ -1,19 +1,12 @@
-[
- {
-  "creation": "2012-03-27 14:36:18", 
-  "docstatus": 0, 
-  "modified": "2013-12-20 19:22:54", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "doctype": "DocType", 
-  "issingle": 1, 
-  "module": "Setup", 
-  "name": "__common__"
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Authorization Control"
- }
-]
\ No newline at end of file
+{
+ "creation": "2012-03-27 14:36:18", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "idx": 1, 
+ "issingle": 1, 
+ "modified": "2013-12-20 19:22:54", 
+ "modified_by": "Administrator", 
+ "module": "Setup", 
+ "name": "Authorization Control", 
+ "owner": "Administrator"
+}
\ No newline at end of file
diff --git a/erpnext/setup/doctype/authorization_rule/authorization_rule.txt b/erpnext/setup/doctype/authorization_rule/authorization_rule.txt
index bd852d0..5d88cb6 100644
--- a/erpnext/setup/doctype/authorization_rule/authorization_rule.txt
+++ b/erpnext/setup/doctype/authorization_rule/authorization_rule.txt
@@ -1,166 +1,147 @@
-[
- {
-  "creation": "2013-01-10 16:34:22", 
-  "docstatus": 0, 
-  "modified": "2014-01-20 17:48:25", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "allow_import": 1, 
-  "autoname": "AR.####", 
-  "doctype": "DocType", 
-  "document_type": "Master", 
-  "icon": "icon-shield", 
-  "module": "Setup", 
-  "name": "__common__", 
-  "search_fields": "transaction,based_on,system_user,system_role,approving_user,approving_role"
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "Authorization Rule", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "cancel": 0, 
-  "create": 1, 
-  "delete": 1, 
-  "doctype": "DocPerm", 
-  "email": 1, 
-  "name": "__common__", 
-  "parent": "Authorization Rule", 
-  "parentfield": "permissions", 
-  "parenttype": "DocType", 
-  "permlevel": 0, 
-  "print": 1, 
-  "read": 1, 
-  "report": 1, 
-  "role": "System Manager", 
-  "submit": 0, 
-  "write": 1
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Authorization Rule"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "company", 
-  "fieldtype": "Link", 
-  "label": "Company", 
-  "oldfieldname": "company", 
-  "oldfieldtype": "Link", 
-  "options": "Company", 
-  "reqd": 0, 
-  "search_index": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "transaction", 
-  "fieldtype": "Select", 
-  "label": "Transaction", 
-  "oldfieldname": "transaction", 
-  "oldfieldtype": "Select", 
-  "options": "\nDelivery Note\nPurchase Invoice\nPurchase Order\nPurchase Receipt\nQuotation\nSales Invoice\nSales Order\nAppraisal", 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "based_on", 
-  "fieldtype": "Select", 
-  "label": "Based On", 
-  "oldfieldname": "based_on", 
-  "oldfieldtype": "Select", 
-  "options": "\nGrand Total\nAverage Discount\nCustomerwise Discount\nItemwise Discount\nNot Applicable", 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "master_name", 
-  "fieldtype": "Link", 
-  "label": "Customer / Item Name", 
-  "oldfieldname": "master_name", 
-  "oldfieldtype": "Link", 
-  "options": "[Select]"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "system_role", 
-  "fieldtype": "Link", 
-  "label": "Applicable To (Role)", 
-  "oldfieldname": "system_role", 
-  "oldfieldtype": "Link", 
-  "options": "Role"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "system_user", 
-  "fieldtype": "Link", 
-  "label": "Applicable To (User)", 
-  "oldfieldname": "system_user", 
-  "oldfieldtype": "Link", 
-  "options": "User"
- }, 
- {
-  "description": "This will be used for setting rule in HR module", 
-  "doctype": "DocField", 
-  "fieldname": "to_emp", 
-  "fieldtype": "Link", 
-  "label": "Applicable To (Employee)", 
-  "oldfieldname": "to_emp", 
-  "oldfieldtype": "Link", 
-  "options": "Employee", 
-  "search_index": 0
- }, 
- {
-  "description": "This will be used for setting rule in HR module", 
-  "doctype": "DocField", 
-  "fieldname": "to_designation", 
-  "fieldtype": "Link", 
-  "label": "Applicable To (Designation)", 
-  "oldfieldname": "to_designation", 
-  "oldfieldtype": "Link", 
-  "options": "Designation", 
-  "search_index": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "approving_role", 
-  "fieldtype": "Link", 
-  "label": "Approving Role", 
-  "oldfieldname": "approving_role", 
-  "oldfieldtype": "Link", 
-  "options": "Role"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "approving_user", 
-  "fieldtype": "Link", 
-  "label": "Approving User", 
-  "oldfieldname": "approving_user", 
-  "oldfieldtype": "Link", 
-  "options": "User"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "value", 
-  "fieldtype": "Float", 
-  "label": "Above Value", 
-  "oldfieldname": "value", 
-  "oldfieldtype": "Currency"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "trash_reason", 
-  "fieldtype": "Small Text", 
-  "label": "Trash Reason", 
-  "oldfieldname": "trash_reason", 
-  "oldfieldtype": "Small Text"
- }, 
- {
-  "doctype": "DocPerm"
- }
-]
\ No newline at end of file
+{
+ "allow_import": 1, 
+ "autoname": "AR.####", 
+ "creation": "2013-01-10 16:34:22", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "document_type": "Master", 
+ "fields": [
+  {
+   "fieldname": "company", 
+   "fieldtype": "Link", 
+   "label": "Company", 
+   "oldfieldname": "company", 
+   "oldfieldtype": "Link", 
+   "options": "Company", 
+   "permlevel": 0, 
+   "reqd": 0, 
+   "search_index": 0
+  }, 
+  {
+   "fieldname": "transaction", 
+   "fieldtype": "Select", 
+   "label": "Transaction", 
+   "oldfieldname": "transaction", 
+   "oldfieldtype": "Select", 
+   "options": "\nDelivery Note\nPurchase Invoice\nPurchase Order\nPurchase Receipt\nQuotation\nSales Invoice\nSales Order\nAppraisal", 
+   "permlevel": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "based_on", 
+   "fieldtype": "Select", 
+   "label": "Based On", 
+   "oldfieldname": "based_on", 
+   "oldfieldtype": "Select", 
+   "options": "\nGrand Total\nAverage Discount\nCustomerwise Discount\nItemwise Discount\nNot Applicable", 
+   "permlevel": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "master_name", 
+   "fieldtype": "Link", 
+   "label": "Customer / Item Name", 
+   "oldfieldname": "master_name", 
+   "oldfieldtype": "Link", 
+   "options": "[Select]", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "system_role", 
+   "fieldtype": "Link", 
+   "label": "Applicable To (Role)", 
+   "oldfieldname": "system_role", 
+   "oldfieldtype": "Link", 
+   "options": "Role", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "system_user", 
+   "fieldtype": "Link", 
+   "label": "Applicable To (User)", 
+   "oldfieldname": "system_user", 
+   "oldfieldtype": "Link", 
+   "options": "User", 
+   "permlevel": 0
+  }, 
+  {
+   "description": "This will be used for setting rule in HR module", 
+   "fieldname": "to_emp", 
+   "fieldtype": "Link", 
+   "label": "Applicable To (Employee)", 
+   "oldfieldname": "to_emp", 
+   "oldfieldtype": "Link", 
+   "options": "Employee", 
+   "permlevel": 0, 
+   "search_index": 0
+  }, 
+  {
+   "description": "This will be used for setting rule in HR module", 
+   "fieldname": "to_designation", 
+   "fieldtype": "Link", 
+   "label": "Applicable To (Designation)", 
+   "oldfieldname": "to_designation", 
+   "oldfieldtype": "Link", 
+   "options": "Designation", 
+   "permlevel": 0, 
+   "search_index": 0
+  }, 
+  {
+   "fieldname": "approving_role", 
+   "fieldtype": "Link", 
+   "label": "Approving Role", 
+   "oldfieldname": "approving_role", 
+   "oldfieldtype": "Link", 
+   "options": "Role", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "approving_user", 
+   "fieldtype": "Link", 
+   "label": "Approving User", 
+   "oldfieldname": "approving_user", 
+   "oldfieldtype": "Link", 
+   "options": "User", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "value", 
+   "fieldtype": "Float", 
+   "label": "Above Value", 
+   "oldfieldname": "value", 
+   "oldfieldtype": "Currency", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "trash_reason", 
+   "fieldtype": "Small Text", 
+   "label": "Trash Reason", 
+   "oldfieldname": "trash_reason", 
+   "oldfieldtype": "Small Text", 
+   "permlevel": 0
+  }
+ ], 
+ "icon": "icon-shield", 
+ "idx": 1, 
+ "modified": "2014-01-20 17:48:25", 
+ "modified_by": "Administrator", 
+ "module": "Setup", 
+ "name": "Authorization Rule", 
+ "owner": "Administrator", 
+ "permissions": [
+  {
+   "cancel": 0, 
+   "create": 1, 
+   "delete": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "System Manager", 
+   "submit": 0, 
+   "write": 1
+  }
+ ], 
+ "search_fields": "transaction,based_on,system_user,system_role,approving_user,approving_role"
+}
\ No newline at end of file
diff --git a/erpnext/setup/doctype/backup_manager/backup_manager.txt b/erpnext/setup/doctype/backup_manager/backup_manager.txt
index 259bf37..ddb7096 100644
--- a/erpnext/setup/doctype/backup_manager/backup_manager.txt
+++ b/erpnext/setup/doctype/backup_manager/backup_manager.txt
@@ -1,178 +1,159 @@
-[
- {
-  "creation": "2013-04-30 12:58:38", 
-  "docstatus": 0, 
-  "modified": "2013-12-20 19:22:55", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "description": "System for managing Backups", 
-  "doctype": "DocType", 
-  "document_type": "System", 
-  "icon": "icon-cloud-upload", 
-  "issingle": 1, 
-  "module": "Setup", 
-  "name": "__common__"
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "Backup Manager", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "create": 1, 
-  "doctype": "DocPerm", 
-  "email": 1, 
-  "name": "__common__", 
-  "parent": "Backup Manager", 
-  "parentfield": "permissions", 
-  "parenttype": "DocType", 
-  "permlevel": 0, 
-  "print": 1, 
-  "read": 1, 
-  "role": "System Manager", 
-  "write": 1
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Backup Manager"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "setup", 
-  "fieldtype": "Section Break", 
-  "label": "Setup"
- }, 
- {
-  "description": "Email ids separated by commas.", 
-  "doctype": "DocField", 
-  "fieldname": "send_notifications_to", 
-  "fieldtype": "Data", 
-  "label": "Send Notifications To", 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "backup_right_now", 
-  "fieldtype": "Button", 
-  "hidden": 1, 
-  "label": "Backup Right Now", 
-  "read_only": 1
- }, 
- {
-  "description": "Note: Backups and files are not deleted from Dropbox, you will have to delete them manually.", 
-  "doctype": "DocField", 
-  "fieldname": "sync_with_dropbox", 
-  "fieldtype": "Section Break", 
-  "label": "Sync with Dropbox"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "upload_backups_to_dropbox", 
-  "fieldtype": "Select", 
-  "label": "Upload Backups to Dropbox", 
-  "options": "Never\nWeekly\nDaily"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "dropbox_access_key", 
-  "fieldtype": "Data", 
-  "hidden": 1, 
-  "label": "Dropbox Access Key", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "dropbox_access_secret", 
-  "fieldtype": "Data", 
-  "hidden": 1, 
-  "label": "Dropbox Access Secret", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "dropbox_access_allowed", 
-  "fieldtype": "Check", 
-  "hidden": 1, 
-  "label": "Dropbox Access Allowed", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "allow_dropbox_access", 
-  "fieldtype": "Button", 
-  "label": "Allow Dropbox Access"
- }, 
- {
-  "description": "Note: Backups and files are not deleted from Google Drive, you will have to delete them manually.", 
-  "doctype": "DocField", 
-  "fieldname": "sync_with_gdrive", 
-  "fieldtype": "Section Break", 
-  "hidden": 1, 
-  "label": "Sync with Google Drive"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "upload_backups_to_gdrive", 
-  "fieldtype": "Select", 
-  "label": "Upload Backups to Google Drive", 
-  "options": "Never\nDaily\nWeekly"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "allow_gdrive_access", 
-  "fieldtype": "Button", 
-  "label": "Allow Google Drive Access"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "verification_code", 
-  "fieldtype": "Data", 
-  "label": "Enter Verification Code"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "validate_gdrive", 
-  "fieldtype": "Button", 
-  "label": "Validate"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "gdrive_access_allowed", 
-  "fieldtype": "Check", 
-  "hidden": 1, 
-  "label": "Google Drive Access Allowed", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "gdrive_credentials", 
-  "fieldtype": "Text", 
-  "hidden": 1, 
-  "label": "Credentials", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "database_folder_id", 
-  "fieldtype": "Data", 
-  "hidden": 1, 
-  "label": "Database Folder ID", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "files_folder_id", 
-  "fieldtype": "Data", 
-  "hidden": 1, 
-  "label": "Files Folder ID", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocPerm"
- }
-]
\ No newline at end of file
+{
+ "creation": "2013-04-30 12:58:38", 
+ "description": "System for managing Backups", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "document_type": "System", 
+ "fields": [
+  {
+   "fieldname": "setup", 
+   "fieldtype": "Section Break", 
+   "label": "Setup", 
+   "permlevel": 0
+  }, 
+  {
+   "description": "Email ids separated by commas.", 
+   "fieldname": "send_notifications_to", 
+   "fieldtype": "Data", 
+   "label": "Send Notifications To", 
+   "permlevel": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "backup_right_now", 
+   "fieldtype": "Button", 
+   "hidden": 1, 
+   "label": "Backup Right Now", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "description": "Note: Backups and files are not deleted from Dropbox, you will have to delete them manually.", 
+   "fieldname": "sync_with_dropbox", 
+   "fieldtype": "Section Break", 
+   "label": "Sync with Dropbox", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "upload_backups_to_dropbox", 
+   "fieldtype": "Select", 
+   "label": "Upload Backups to Dropbox", 
+   "options": "Never\nWeekly\nDaily", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "dropbox_access_key", 
+   "fieldtype": "Data", 
+   "hidden": 1, 
+   "label": "Dropbox Access Key", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "dropbox_access_secret", 
+   "fieldtype": "Data", 
+   "hidden": 1, 
+   "label": "Dropbox Access Secret", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "dropbox_access_allowed", 
+   "fieldtype": "Check", 
+   "hidden": 1, 
+   "label": "Dropbox Access Allowed", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "allow_dropbox_access", 
+   "fieldtype": "Button", 
+   "label": "Allow Dropbox Access", 
+   "permlevel": 0
+  }, 
+  {
+   "description": "Note: Backups and files are not deleted from Google Drive, you will have to delete them manually.", 
+   "fieldname": "sync_with_gdrive", 
+   "fieldtype": "Section Break", 
+   "hidden": 1, 
+   "label": "Sync with Google Drive", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "upload_backups_to_gdrive", 
+   "fieldtype": "Select", 
+   "label": "Upload Backups to Google Drive", 
+   "options": "Never\nDaily\nWeekly", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "allow_gdrive_access", 
+   "fieldtype": "Button", 
+   "label": "Allow Google Drive Access", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "verification_code", 
+   "fieldtype": "Data", 
+   "label": "Enter Verification Code", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "validate_gdrive", 
+   "fieldtype": "Button", 
+   "label": "Validate", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "gdrive_access_allowed", 
+   "fieldtype": "Check", 
+   "hidden": 1, 
+   "label": "Google Drive Access Allowed", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "gdrive_credentials", 
+   "fieldtype": "Text", 
+   "hidden": 1, 
+   "label": "Credentials", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "database_folder_id", 
+   "fieldtype": "Data", 
+   "hidden": 1, 
+   "label": "Database Folder ID", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "files_folder_id", 
+   "fieldtype": "Data", 
+   "hidden": 1, 
+   "label": "Files Folder ID", 
+   "permlevel": 0, 
+   "read_only": 1
+  }
+ ], 
+ "icon": "icon-cloud-upload", 
+ "idx": 1, 
+ "issingle": 1, 
+ "modified": "2013-12-20 19:22:55", 
+ "modified_by": "Administrator", 
+ "module": "Setup", 
+ "name": "Backup Manager", 
+ "owner": "Administrator", 
+ "permissions": [
+  {
+   "create": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "role": "System Manager", 
+   "write": 1
+  }
+ ]
+}
\ No newline at end of file
diff --git a/erpnext/setup/doctype/brand/brand.txt b/erpnext/setup/doctype/brand/brand.txt
index 3e67b9f..7fa15c1 100644
--- a/erpnext/setup/doctype/brand/brand.txt
+++ b/erpnext/setup/doctype/brand/brand.txt
@@ -1,95 +1,93 @@
-[
- {
-  "creation": "2013-02-22 01:27:54", 
-  "docstatus": 0, 
-  "modified": "2014-01-20 17:48:27", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "allow_import": 1, 
-  "autoname": "field:brand", 
-  "doctype": "DocType", 
-  "document_type": "Master", 
-  "icon": "icon-certificate", 
-  "in_dialog": 0, 
-  "module": "Setup", 
-  "name": "__common__"
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "Brand", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0, 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocPerm", 
-  "email": 1, 
-  "name": "__common__", 
-  "parent": "Brand", 
-  "parentfield": "permissions", 
-  "parenttype": "DocType", 
-  "permlevel": 0, 
-  "print": 1, 
-  "read": 1, 
-  "report": 1
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Brand"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "brand", 
-  "fieldtype": "Data", 
-  "label": "Brand Name", 
-  "oldfieldname": "brand", 
-  "oldfieldtype": "Data", 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "description", 
-  "fieldtype": "Text", 
-  "label": "Description", 
-  "oldfieldname": "description", 
-  "oldfieldtype": "Text", 
-  "width": "300px"
- }, 
- {
-  "cancel": 1, 
-  "create": 1, 
-  "delete": 1, 
-  "doctype": "DocPerm", 
-  "role": "Material Master Manager", 
-  "write": 1
- }, 
- {
-  "amend": 0, 
-  "cancel": 0, 
-  "create": 0, 
-  "delete": 0, 
-  "doctype": "DocPerm", 
-  "role": "Material User", 
-  "submit": 0, 
-  "write": 0
- }, 
- {
-  "delete": 0, 
-  "doctype": "DocPerm", 
-  "role": "Sales User"
- }, 
- {
-  "delete": 0, 
-  "doctype": "DocPerm", 
-  "role": "Purchase User"
- }, 
- {
-  "delete": 0, 
-  "doctype": "DocPerm", 
-  "role": "Accounts User"
- }
-]
\ No newline at end of file
+{
+ "allow_import": 1, 
+ "autoname": "field:brand", 
+ "creation": "2013-02-22 01:27:54", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "document_type": "Master", 
+ "fields": [
+  {
+   "fieldname": "brand", 
+   "fieldtype": "Data", 
+   "label": "Brand Name", 
+   "oldfieldname": "brand", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "read_only": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "description", 
+   "fieldtype": "Text", 
+   "label": "Description", 
+   "oldfieldname": "description", 
+   "oldfieldtype": "Text", 
+   "permlevel": 0, 
+   "read_only": 0, 
+   "width": "300px"
+  }
+ ], 
+ "icon": "icon-certificate", 
+ "idx": 1, 
+ "in_dialog": 0, 
+ "modified": "2014-01-20 17:48:27", 
+ "modified_by": "Administrator", 
+ "module": "Setup", 
+ "name": "Brand", 
+ "owner": "Administrator", 
+ "permissions": [
+  {
+   "cancel": 1, 
+   "create": 1, 
+   "delete": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Material Master Manager", 
+   "write": 1
+  }, 
+  {
+   "amend": 0, 
+   "cancel": 0, 
+   "create": 0, 
+   "delete": 0, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Material User", 
+   "submit": 0, 
+   "write": 0
+  }, 
+  {
+   "delete": 0, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Sales User"
+  }, 
+  {
+   "delete": 0, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Purchase User"
+  }, 
+  {
+   "delete": 0, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Accounts User"
+  }
+ ]
+}
\ No newline at end of file
diff --git a/erpnext/setup/doctype/company/company.txt b/erpnext/setup/doctype/company/company.txt
index 3aca525..5bd408e 100644
--- a/erpnext/setup/doctype/company/company.txt
+++ b/erpnext/setup/doctype/company/company.txt
@@ -1,393 +1,377 @@
-[
- {
-  "creation": "2013-04-10 08:35:39", 
-  "docstatus": 0, 
-  "modified": "2014-03-05 14:54:29", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "allow_import": 1, 
-  "allow_rename": 1, 
-  "autoname": "field:company_name", 
-  "description": "Legal Entity / Subsidiary with a separate Chart of Accounts belonging to the Organization.", 
-  "doctype": "DocType", 
-  "document_type": "Master", 
-  "icon": "icon-building", 
-  "module": "Setup", 
-  "name": "__common__"
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "Company", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "doctype": "DocPerm", 
-  "email": 1, 
-  "name": "__common__", 
-  "parent": "Company", 
-  "parentfield": "permissions", 
-  "parenttype": "DocType", 
-  "permlevel": 0, 
-  "print": 1, 
-  "read": 1
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Company"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "details", 
-  "fieldtype": "Section Break", 
-  "label": "Company Details", 
-  "oldfieldtype": "Section Break", 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "company_name", 
-  "fieldtype": "Data", 
-  "label": "Company", 
-  "no_copy": 0, 
-  "oldfieldname": "company_name", 
-  "oldfieldtype": "Data", 
-  "read_only": 0, 
-  "reqd": 1
- }, 
- {
-  "description": "Please Enter Abbreviation or Short Name properly as it will be added as Suffix to all Account Heads.", 
-  "doctype": "DocField", 
-  "fieldname": "abbr", 
-  "fieldtype": "Data", 
-  "label": "Abbr", 
-  "no_copy": 0, 
-  "oldfieldname": "abbr", 
-  "oldfieldtype": "Data", 
-  "read_only": 0, 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "cb0", 
-  "fieldtype": "Column Break", 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "domain", 
-  "fieldtype": "Select", 
-  "label": "Domain", 
-  "options": "Distribution\nManufacturing\nRetail\nServices", 
-  "reqd": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "charts_section", 
-  "fieldtype": "Section Break", 
-  "label": "Chart of Accounts"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "country", 
-  "fieldtype": "Link", 
-  "in_list_view": 1, 
-  "label": "Country", 
-  "options": "Country", 
-  "reqd": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "chart_of_accounts", 
-  "fieldtype": "Link", 
-  "label": "Chart of Accounts", 
-  "options": "Chart of Accounts"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "default_settings", 
-  "fieldtype": "Section Break", 
-  "label": "Default Settings", 
-  "oldfieldtype": "Section Break", 
-  "read_only": 0
- }, 
- {
-  "depends_on": "eval:!doc.__islocal", 
-  "doctype": "DocField", 
-  "fieldname": "default_bank_account", 
-  "fieldtype": "Link", 
-  "label": "Default Bank Account", 
-  "no_copy": 1, 
-  "oldfieldname": "default_bank_account", 
-  "oldfieldtype": "Link", 
-  "options": "Account", 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "default_cash_account", 
-  "fieldtype": "Link", 
-  "label": "Default Cash Account", 
-  "no_copy": 1, 
-  "options": "Account", 
-  "read_only": 0
- }, 
- {
-  "depends_on": "eval:!doc.__islocal", 
-  "doctype": "DocField", 
-  "fieldname": "receivables_group", 
-  "fieldtype": "Link", 
-  "label": "Receivables Group", 
-  "no_copy": 1, 
-  "oldfieldname": "receivables_group", 
-  "oldfieldtype": "Link", 
-  "options": "Account", 
-  "read_only": 0
- }, 
- {
-  "depends_on": "eval:!doc.__islocal", 
-  "doctype": "DocField", 
-  "fieldname": "payables_group", 
-  "fieldtype": "Link", 
-  "label": "Payables Group", 
-  "no_copy": 1, 
-  "oldfieldname": "payables_group", 
-  "oldfieldtype": "Link", 
-  "options": "Account", 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "default_expense_account", 
-  "fieldtype": "Link", 
-  "label": "Default Expense Account", 
-  "no_copy": 1, 
-  "options": "Account"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "default_income_account", 
-  "fieldtype": "Link", 
-  "label": "Default Income Account", 
-  "no_copy": 1, 
-  "options": "Account"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break0", 
-  "fieldtype": "Column Break", 
-  "oldfieldtype": "Column Break", 
-  "read_only": 0, 
-  "width": "50%"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "default_currency", 
-  "fieldtype": "Link", 
-  "label": "Default Currency", 
-  "options": "Currency", 
-  "read_only": 0, 
-  "reqd": 1
- }, 
- {
-  "depends_on": "eval:!doc.__islocal", 
-  "doctype": "DocField", 
-  "fieldname": "cost_center", 
-  "fieldtype": "Link", 
-  "label": "Cost Center", 
-  "no_copy": 1, 
-  "options": "Cost Center"
- }, 
- {
-  "depends_on": "eval:!doc.__islocal", 
-  "doctype": "DocField", 
-  "fieldname": "credit_days", 
-  "fieldtype": "Int", 
-  "label": "Credit Days", 
-  "oldfieldname": "credit_days", 
-  "oldfieldtype": "Int", 
-  "read_only": 0
- }, 
- {
-  "depends_on": "eval:!doc.__islocal", 
-  "doctype": "DocField", 
-  "fieldname": "credit_limit", 
-  "fieldtype": "Currency", 
-  "label": "Credit Limit", 
-  "oldfieldname": "credit_limit", 
-  "oldfieldtype": "Currency", 
-  "options": "default_currency", 
-  "read_only": 0
- }, 
- {
-  "depends_on": "eval:!doc.__islocal", 
-  "doctype": "DocField", 
-  "fieldname": "yearly_bgt_flag", 
-  "fieldtype": "Select", 
-  "label": "If Yearly Budget Exceeded", 
-  "oldfieldname": "yearly_bgt_flag", 
-  "oldfieldtype": "Select", 
-  "options": "\nWarn\nIgnore\nStop", 
-  "read_only": 0
- }, 
- {
-  "depends_on": "eval:!doc.__islocal", 
-  "doctype": "DocField", 
-  "fieldname": "monthly_bgt_flag", 
-  "fieldtype": "Select", 
-  "label": "If Monthly Budget Exceeded", 
-  "oldfieldname": "monthly_bgt_flag", 
-  "oldfieldtype": "Select", 
-  "options": "\nWarn\nIgnore\nStop", 
-  "read_only": 0
- }, 
- {
-  "depends_on": "eval:!doc.__islocal", 
-  "doctype": "DocField", 
-  "fieldname": "auto_accounting_for_stock_settings", 
-  "fieldtype": "Section Break", 
-  "label": "Auto Accounting For Stock Settings", 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "stock_received_but_not_billed", 
-  "fieldtype": "Link", 
-  "label": "Stock Received But Not Billed", 
-  "no_copy": 1, 
-  "options": "Account", 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "stock_adjustment_account", 
-  "fieldtype": "Link", 
-  "label": "Stock Adjustment Account", 
-  "no_copy": 1, 
-  "options": "Account", 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "expenses_included_in_valuation", 
-  "fieldtype": "Link", 
-  "label": "Expenses Included In Valuation", 
-  "no_copy": 1, 
-  "options": "Account", 
-  "read_only": 0
- }, 
- {
-  "description": "For reference only.", 
-  "doctype": "DocField", 
-  "fieldname": "company_info", 
-  "fieldtype": "Section Break", 
-  "label": "Company Info", 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "address", 
-  "fieldtype": "Small Text", 
-  "label": "Address", 
-  "oldfieldname": "address", 
-  "oldfieldtype": "Small Text", 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break1", 
-  "fieldtype": "Column Break", 
-  "oldfieldtype": "Column Break", 
-  "read_only": 0, 
-  "width": "50%"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "phone_no", 
-  "fieldtype": "Data", 
-  "label": "Phone No", 
-  "oldfieldname": "phone_no", 
-  "oldfieldtype": "Data", 
-  "options": "Phone", 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "fax", 
-  "fieldtype": "Data", 
-  "label": "Fax", 
-  "oldfieldname": "fax", 
-  "oldfieldtype": "Data", 
-  "options": "Phone", 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "email", 
-  "fieldtype": "Data", 
-  "label": "Email", 
-  "oldfieldname": "email", 
-  "oldfieldtype": "Data", 
-  "options": "Email", 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "website", 
-  "fieldtype": "Data", 
-  "label": "Website", 
-  "oldfieldname": "website", 
-  "oldfieldtype": "Data", 
-  "read_only": 0
- }, 
- {
-  "description": "Company registration numbers for your reference. Example: VAT Registration Numbers etc.", 
-  "doctype": "DocField", 
-  "fieldname": "registration_info", 
-  "fieldtype": "Section Break", 
-  "label": "Registration Info", 
-  "oldfieldtype": "Section Break", 
-  "read_only": 0, 
-  "width": "50%"
- }, 
- {
-  "description": "Company registration numbers for your reference. Tax numbers etc.", 
-  "doctype": "DocField", 
-  "fieldname": "registration_details", 
-  "fieldtype": "Code", 
-  "label": "Registration Details", 
-  "oldfieldname": "registration_details", 
-  "oldfieldtype": "Code", 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "trash_reason", 
-  "fieldtype": "Small Text", 
-  "label": "Trash Reason", 
-  "no_copy": 1, 
-  "oldfieldname": "trash_reason", 
-  "oldfieldtype": "Small Text", 
-  "read_only": 1
- }, 
- {
-  "amend": 0, 
-  "cancel": 0, 
-  "create": 1, 
-  "delete": 1, 
-  "doctype": "DocPerm", 
-  "report": 1, 
-  "role": "System Manager", 
-  "submit": 0, 
-  "write": 1
- }, 
- {
-  "delete": 0, 
-  "doctype": "DocPerm", 
-  "role": "All"
- }
-]
\ No newline at end of file
+{
+ "allow_import": 1, 
+ "allow_rename": 1, 
+ "autoname": "field:company_name", 
+ "creation": "2013-04-10 08:35:39", 
+ "description": "Legal Entity / Subsidiary with a separate Chart of Accounts belonging to the Organization.", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "document_type": "Master", 
+ "fields": [
+  {
+   "fieldname": "details", 
+   "fieldtype": "Section Break", 
+   "label": "Company Details", 
+   "oldfieldtype": "Section Break", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "company_name", 
+   "fieldtype": "Data", 
+   "label": "Company", 
+   "no_copy": 0, 
+   "oldfieldname": "company_name", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "read_only": 0, 
+   "reqd": 1
+  }, 
+  {
+   "description": "Please Enter Abbreviation or Short Name properly as it will be added as Suffix to all Account Heads.", 
+   "fieldname": "abbr", 
+   "fieldtype": "Data", 
+   "label": "Abbr", 
+   "no_copy": 0, 
+   "oldfieldname": "abbr", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "read_only": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "cb0", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "domain", 
+   "fieldtype": "Select", 
+   "label": "Domain", 
+   "options": "Distribution\nManufacturing\nRetail\nServices", 
+   "permlevel": 0, 
+   "reqd": 0
+  }, 
+  {
+   "fieldname": "charts_section", 
+   "fieldtype": "Section Break", 
+   "label": "Chart of Accounts", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "country", 
+   "fieldtype": "Link", 
+   "in_list_view": 1, 
+   "label": "Country", 
+   "options": "Country", 
+   "permlevel": 0, 
+   "reqd": 0
+  }, 
+  {
+   "fieldname": "chart_of_accounts", 
+   "fieldtype": "Link", 
+   "label": "Chart of Accounts", 
+   "options": "Chart of Accounts", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "default_settings", 
+   "fieldtype": "Section Break", 
+   "label": "Default Settings", 
+   "oldfieldtype": "Section Break", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "depends_on": "eval:!doc.__islocal", 
+   "fieldname": "default_bank_account", 
+   "fieldtype": "Link", 
+   "label": "Default Bank Account", 
+   "no_copy": 1, 
+   "oldfieldname": "default_bank_account", 
+   "oldfieldtype": "Link", 
+   "options": "Account", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "default_cash_account", 
+   "fieldtype": "Link", 
+   "label": "Default Cash Account", 
+   "no_copy": 1, 
+   "options": "Account", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "depends_on": "eval:!doc.__islocal", 
+   "fieldname": "receivables_group", 
+   "fieldtype": "Link", 
+   "label": "Receivables Group", 
+   "no_copy": 1, 
+   "oldfieldname": "receivables_group", 
+   "oldfieldtype": "Link", 
+   "options": "Account", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "depends_on": "eval:!doc.__islocal", 
+   "fieldname": "payables_group", 
+   "fieldtype": "Link", 
+   "label": "Payables Group", 
+   "no_copy": 1, 
+   "oldfieldname": "payables_group", 
+   "oldfieldtype": "Link", 
+   "options": "Account", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "default_expense_account", 
+   "fieldtype": "Link", 
+   "label": "Default Expense Account", 
+   "no_copy": 1, 
+   "options": "Account", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "default_income_account", 
+   "fieldtype": "Link", 
+   "label": "Default Income Account", 
+   "no_copy": 1, 
+   "options": "Account", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "column_break0", 
+   "fieldtype": "Column Break", 
+   "oldfieldtype": "Column Break", 
+   "permlevel": 0, 
+   "read_only": 0, 
+   "width": "50%"
+  }, 
+  {
+   "fieldname": "default_currency", 
+   "fieldtype": "Link", 
+   "label": "Default Currency", 
+   "options": "Currency", 
+   "permlevel": 0, 
+   "read_only": 0, 
+   "reqd": 1
+  }, 
+  {
+   "depends_on": "eval:!doc.__islocal", 
+   "fieldname": "cost_center", 
+   "fieldtype": "Link", 
+   "label": "Cost Center", 
+   "no_copy": 1, 
+   "options": "Cost Center", 
+   "permlevel": 0
+  }, 
+  {
+   "depends_on": "eval:!doc.__islocal", 
+   "fieldname": "credit_days", 
+   "fieldtype": "Int", 
+   "label": "Credit Days", 
+   "oldfieldname": "credit_days", 
+   "oldfieldtype": "Int", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "depends_on": "eval:!doc.__islocal", 
+   "fieldname": "credit_limit", 
+   "fieldtype": "Currency", 
+   "label": "Credit Limit", 
+   "oldfieldname": "credit_limit", 
+   "oldfieldtype": "Currency", 
+   "options": "default_currency", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "depends_on": "eval:!doc.__islocal", 
+   "fieldname": "yearly_bgt_flag", 
+   "fieldtype": "Select", 
+   "label": "If Yearly Budget Exceeded", 
+   "oldfieldname": "yearly_bgt_flag", 
+   "oldfieldtype": "Select", 
+   "options": "\nWarn\nIgnore\nStop", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "depends_on": "eval:!doc.__islocal", 
+   "fieldname": "monthly_bgt_flag", 
+   "fieldtype": "Select", 
+   "label": "If Monthly Budget Exceeded", 
+   "oldfieldname": "monthly_bgt_flag", 
+   "oldfieldtype": "Select", 
+   "options": "\nWarn\nIgnore\nStop", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "depends_on": "eval:!doc.__islocal", 
+   "fieldname": "auto_accounting_for_stock_settings", 
+   "fieldtype": "Section Break", 
+   "label": "Auto Accounting For Stock Settings", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "stock_received_but_not_billed", 
+   "fieldtype": "Link", 
+   "label": "Stock Received But Not Billed", 
+   "no_copy": 1, 
+   "options": "Account", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "stock_adjustment_account", 
+   "fieldtype": "Link", 
+   "label": "Stock Adjustment Account", 
+   "no_copy": 1, 
+   "options": "Account", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "expenses_included_in_valuation", 
+   "fieldtype": "Link", 
+   "label": "Expenses Included In Valuation", 
+   "no_copy": 1, 
+   "options": "Account", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "description": "For reference only.", 
+   "fieldname": "company_info", 
+   "fieldtype": "Section Break", 
+   "label": "Company Info", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "address", 
+   "fieldtype": "Small Text", 
+   "label": "Address", 
+   "oldfieldname": "address", 
+   "oldfieldtype": "Small Text", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "column_break1", 
+   "fieldtype": "Column Break", 
+   "oldfieldtype": "Column Break", 
+   "permlevel": 0, 
+   "read_only": 0, 
+   "width": "50%"
+  }, 
+  {
+   "fieldname": "phone_no", 
+   "fieldtype": "Data", 
+   "label": "Phone No", 
+   "oldfieldname": "phone_no", 
+   "oldfieldtype": "Data", 
+   "options": "Phone", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "fax", 
+   "fieldtype": "Data", 
+   "label": "Fax", 
+   "oldfieldname": "fax", 
+   "oldfieldtype": "Data", 
+   "options": "Phone", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "email", 
+   "fieldtype": "Data", 
+   "label": "Email", 
+   "oldfieldname": "email", 
+   "oldfieldtype": "Data", 
+   "options": "Email", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "website", 
+   "fieldtype": "Data", 
+   "label": "Website", 
+   "oldfieldname": "website", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "description": "Company registration numbers for your reference. Example: VAT Registration Numbers etc.", 
+   "fieldname": "registration_info", 
+   "fieldtype": "Section Break", 
+   "label": "Registration Info", 
+   "oldfieldtype": "Section Break", 
+   "permlevel": 0, 
+   "read_only": 0, 
+   "width": "50%"
+  }, 
+  {
+   "description": "Company registration numbers for your reference. Tax numbers etc.", 
+   "fieldname": "registration_details", 
+   "fieldtype": "Code", 
+   "label": "Registration Details", 
+   "oldfieldname": "registration_details", 
+   "oldfieldtype": "Code", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "trash_reason", 
+   "fieldtype": "Small Text", 
+   "label": "Trash Reason", 
+   "no_copy": 1, 
+   "oldfieldname": "trash_reason", 
+   "oldfieldtype": "Small Text", 
+   "permlevel": 0, 
+   "read_only": 1
+  }
+ ], 
+ "icon": "icon-building", 
+ "idx": 1, 
+ "modified": "2014-03-05 14:54:29", 
+ "modified_by": "Administrator", 
+ "module": "Setup", 
+ "name": "Company", 
+ "owner": "Administrator", 
+ "permissions": [
+  {
+   "amend": 0, 
+   "cancel": 0, 
+   "create": 1, 
+   "delete": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "System Manager", 
+   "submit": 0, 
+   "write": 1
+  }, 
+  {
+   "delete": 0, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "role": "All"
+  }
+ ]
+}
\ No newline at end of file
diff --git a/erpnext/setup/doctype/contact_control/contact_control.txt b/erpnext/setup/doctype/contact_control/contact_control.txt
index a5a0d01..7c6768a 100644
--- a/erpnext/setup/doctype/contact_control/contact_control.txt
+++ b/erpnext/setup/doctype/contact_control/contact_control.txt
@@ -1,63 +1,48 @@
-[
- {
-  "creation": "2012-03-27 14:36:19", 
-  "docstatus": 0, 
-  "modified": "2013-12-20 19:23:02", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "doctype": "DocType", 
-  "in_create": 1, 
-  "issingle": 1, 
-  "module": "Setup", 
-  "name": "__common__", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldtype": "Text", 
-  "in_list_view": 1, 
-  "name": "__common__", 
-  "parent": "Contact Control", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "create": 0, 
-  "doctype": "DocPerm", 
-  "email": 1, 
-  "name": "__common__", 
-  "parent": "Contact Control", 
-  "parentfield": "permissions", 
-  "parenttype": "DocType", 
-  "permlevel": 0, 
-  "print": 1, 
-  "read": 1, 
-  "role": "System Manager", 
-  "write": 1
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Contact Control"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "header", 
-  "label": "Header"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "customer_intro", 
-  "label": "Customer Intro"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "supplier_intro", 
-  "label": "Supplier Intro"
- }, 
- {
-  "doctype": "DocPerm"
- }
-]
\ No newline at end of file
+{
+ "creation": "2012-03-27 14:36:19", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "fields": [
+  {
+   "fieldname": "header", 
+   "fieldtype": "Text", 
+   "in_list_view": 1, 
+   "label": "Header", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "customer_intro", 
+   "fieldtype": "Text", 
+   "in_list_view": 1, 
+   "label": "Customer Intro", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "supplier_intro", 
+   "fieldtype": "Text", 
+   "in_list_view": 1, 
+   "label": "Supplier Intro", 
+   "permlevel": 0
+  }
+ ], 
+ "idx": 1, 
+ "in_create": 1, 
+ "issingle": 1, 
+ "modified": "2013-12-20 19:23:02", 
+ "modified_by": "Administrator", 
+ "module": "Setup", 
+ "name": "Contact Control", 
+ "owner": "Administrator", 
+ "permissions": [
+  {
+   "create": 0, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "role": "System Manager", 
+   "write": 1
+  }
+ ], 
+ "read_only": 1
+}
\ No newline at end of file
diff --git a/erpnext/setup/doctype/country/country.txt b/erpnext/setup/doctype/country/country.txt
index 57d2025..1652d59 100644
--- a/erpnext/setup/doctype/country/country.txt
+++ b/erpnext/setup/doctype/country/country.txt
@@ -1,105 +1,102 @@
-[
- {
-  "creation": "2013-01-19 10:23:30", 
-  "docstatus": 0, 
-  "modified": "2014-03-05 14:36:16", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "allow_import": 1, 
-  "autoname": "field:country_name", 
-  "doctype": "DocType", 
-  "document_type": "Master", 
-  "icon": "icon-globe", 
-  "in_create": 0, 
-  "module": "Setup", 
-  "name": "__common__", 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "Country", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "doctype": "DocPerm", 
-  "email": 1, 
-  "name": "__common__", 
-  "parent": "Country", 
-  "parentfield": "permissions", 
-  "parenttype": "DocType", 
-  "permlevel": 0, 
-  "print": 1, 
-  "read": 1, 
-  "report": 1
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Country"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "country_name", 
-  "fieldtype": "Data", 
-  "label": "Country Name", 
-  "oldfieldname": "country_name", 
-  "oldfieldtype": "Data", 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "date_format", 
-  "fieldtype": "Data", 
-  "label": "Date Format"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "time_zones", 
-  "fieldtype": "Text", 
-  "label": "Time Zones"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "code", 
-  "fieldtype": "Data", 
-  "label": "Code"
- }, 
- {
-  "amend": 0, 
-  "cancel": 0, 
-  "create": 1, 
-  "doctype": "DocPerm", 
-  "role": "Sales Master Manager", 
-  "submit": 0, 
-  "write": 1
- }, 
- {
-  "create": 1, 
-  "doctype": "DocPerm", 
-  "role": "Purchase Master Manager", 
-  "submit": 0, 
-  "write": 1
- }, 
- {
-  "create": 1, 
-  "doctype": "DocPerm", 
-  "role": "HR User", 
-  "submit": 0, 
-  "write": 1
- }, 
- {
-  "create": 1, 
-  "doctype": "DocPerm", 
-  "role": "HR Manager", 
-  "submit": 0, 
-  "write": 1
- }, 
- {
-  "doctype": "DocPerm", 
-  "role": "All"
- }
-]
\ No newline at end of file
+{
+ "allow_import": 1, 
+ "autoname": "field:country_name", 
+ "creation": "2013-01-19 10:23:30", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "document_type": "Master", 
+ "fields": [
+  {
+   "fieldname": "country_name", 
+   "fieldtype": "Data", 
+   "label": "Country Name", 
+   "oldfieldname": "country_name", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "date_format", 
+   "fieldtype": "Data", 
+   "label": "Date Format", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "time_zones", 
+   "fieldtype": "Text", 
+   "label": "Time Zones", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "code", 
+   "fieldtype": "Data", 
+   "label": "Code", 
+   "permlevel": 0
+  }
+ ], 
+ "icon": "icon-globe", 
+ "idx": 1, 
+ "in_create": 0, 
+ "modified": "2014-03-05 14:36:16", 
+ "modified_by": "Administrator", 
+ "module": "Setup", 
+ "name": "Country", 
+ "owner": "Administrator", 
+ "permissions": [
+  {
+   "amend": 0, 
+   "cancel": 0, 
+   "create": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Sales Master Manager", 
+   "submit": 0, 
+   "write": 1
+  }, 
+  {
+   "create": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Purchase Master Manager", 
+   "submit": 0, 
+   "write": 1
+  }, 
+  {
+   "create": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "HR User", 
+   "submit": 0, 
+   "write": 1
+  }, 
+  {
+   "create": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "HR Manager", 
+   "submit": 0, 
+   "write": 1
+  }, 
+  {
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "All"
+  }
+ ], 
+ "read_only": 0
+}
\ No newline at end of file
diff --git a/erpnext/setup/doctype/currency/currency.txt b/erpnext/setup/doctype/currency/currency.txt
index 6bd2b1c..d3cbc27 100644
--- a/erpnext/setup/doctype/currency/currency.txt
+++ b/erpnext/setup/doctype/currency/currency.txt
@@ -1,126 +1,119 @@
-[
- {
-  "creation": "2013-01-28 10:06:02", 
-  "docstatus": 0, 
-  "modified": "2014-01-20 17:48:31", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "autoname": "field:currency_name", 
-  "description": "**Currency** Master", 
-  "doctype": "DocType", 
-  "icon": "icon-bitcoin", 
-  "in_create": 0, 
-  "module": "Setup", 
-  "name": "__common__", 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "Currency", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "doctype": "DocPerm", 
-  "email": 1, 
-  "name": "__common__", 
-  "parent": "Currency", 
-  "parentfield": "permissions", 
-  "parenttype": "DocType", 
-  "permlevel": 0, 
-  "print": 1, 
-  "read": 1, 
-  "report": 1
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Currency"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "currency_name", 
-  "fieldtype": "Data", 
-  "label": "Currency Name", 
-  "oldfieldname": "currency_name", 
-  "oldfieldtype": "Data", 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "enabled", 
-  "fieldtype": "Check", 
-  "in_list_view": 1, 
-  "label": "Enabled"
- }, 
- {
-  "description": "Sub-currency. For e.g. \"Cent\"", 
-  "doctype": "DocField", 
-  "fieldname": "fraction", 
-  "fieldtype": "Data", 
-  "in_list_view": 1, 
-  "label": "Fraction"
- }, 
- {
-  "description": "1 Currency = [?] Fraction\nFor e.g. 1 USD = 100 Cent", 
-  "doctype": "DocField", 
-  "fieldname": "fraction_units", 
-  "fieldtype": "Int", 
-  "in_list_view": 1, 
-  "label": "Fraction Units"
- }, 
- {
-  "description": "A symbol for this currency. For e.g. $", 
-  "doctype": "DocField", 
-  "fieldname": "symbol", 
-  "fieldtype": "Data", 
-  "in_list_view": 1, 
-  "label": "Symbol"
- }, 
- {
-  "description": "How should this currency be formatted? If not set, will use system defaults", 
-  "doctype": "DocField", 
-  "fieldname": "number_format", 
-  "fieldtype": "Select", 
-  "in_list_view": 1, 
-  "label": "Number Format", 
-  "options": "\n#,###.##\n#.###,##\n# ###.##\n#,###.###\n#,##,###.##\n#.###\n#,###"
- }, 
- {
-  "cancel": 0, 
-  "create": 1, 
-  "delete": 1, 
-  "doctype": "DocPerm", 
-  "role": "Accounts Manager", 
-  "submit": 0, 
-  "write": 1
- }, 
- {
-  "amend": 0, 
-  "cancel": 0, 
-  "create": 1, 
-  "delete": 1, 
-  "doctype": "DocPerm", 
-  "role": "Sales Master Manager", 
-  "submit": 0, 
-  "write": 1
- }, 
- {
-  "amend": 0, 
-  "cancel": 0, 
-  "create": 1, 
-  "delete": 0, 
-  "doctype": "DocPerm", 
-  "role": "Purchase Master Manager", 
-  "submit": 0, 
-  "write": 1
- }, 
- {
-  "delete": 0, 
-  "doctype": "DocPerm", 
-  "role": "All"
- }
-]
\ No newline at end of file
+{
+ "autoname": "field:currency_name", 
+ "creation": "2013-01-28 10:06:02", 
+ "description": "**Currency** Master", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "fields": [
+  {
+   "fieldname": "currency_name", 
+   "fieldtype": "Data", 
+   "label": "Currency Name", 
+   "oldfieldname": "currency_name", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "enabled", 
+   "fieldtype": "Check", 
+   "in_list_view": 1, 
+   "label": "Enabled", 
+   "permlevel": 0
+  }, 
+  {
+   "description": "Sub-currency. For e.g. \"Cent\"", 
+   "fieldname": "fraction", 
+   "fieldtype": "Data", 
+   "in_list_view": 1, 
+   "label": "Fraction", 
+   "permlevel": 0
+  }, 
+  {
+   "description": "1 Currency = [?] Fraction\nFor e.g. 1 USD = 100 Cent", 
+   "fieldname": "fraction_units", 
+   "fieldtype": "Int", 
+   "in_list_view": 1, 
+   "label": "Fraction Units", 
+   "permlevel": 0
+  }, 
+  {
+   "description": "A symbol for this currency. For e.g. $", 
+   "fieldname": "symbol", 
+   "fieldtype": "Data", 
+   "in_list_view": 1, 
+   "label": "Symbol", 
+   "permlevel": 0
+  }, 
+  {
+   "description": "How should this currency be formatted? If not set, will use system defaults", 
+   "fieldname": "number_format", 
+   "fieldtype": "Select", 
+   "in_list_view": 1, 
+   "label": "Number Format", 
+   "options": "\n#,###.##\n#.###,##\n# ###.##\n#,###.###\n#,##,###.##\n#.###\n#,###", 
+   "permlevel": 0
+  }
+ ], 
+ "icon": "icon-bitcoin", 
+ "idx": 1, 
+ "in_create": 0, 
+ "modified": "2014-01-20 17:48:31", 
+ "modified_by": "Administrator", 
+ "module": "Setup", 
+ "name": "Currency", 
+ "owner": "Administrator", 
+ "permissions": [
+  {
+   "cancel": 0, 
+   "create": 1, 
+   "delete": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Accounts Manager", 
+   "submit": 0, 
+   "write": 1
+  }, 
+  {
+   "amend": 0, 
+   "cancel": 0, 
+   "create": 1, 
+   "delete": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Sales Master Manager", 
+   "submit": 0, 
+   "write": 1
+  }, 
+  {
+   "amend": 0, 
+   "cancel": 0, 
+   "create": 1, 
+   "delete": 0, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Purchase Master Manager", 
+   "submit": 0, 
+   "write": 1
+  }, 
+  {
+   "delete": 0, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "All"
+  }
+ ], 
+ "read_only": 0
+}
\ No newline at end of file
diff --git a/erpnext/setup/doctype/currency_exchange/currency_exchange.txt b/erpnext/setup/doctype/currency_exchange/currency_exchange.txt
index adaf125..2172c13 100644
--- a/erpnext/setup/doctype/currency_exchange/currency_exchange.txt
+++ b/erpnext/setup/doctype/currency_exchange/currency_exchange.txt
@@ -1,86 +1,81 @@
-[
- {
-  "creation": "2013-06-20 15:40:29", 
-  "docstatus": 0, 
-  "modified": "2014-01-20 17:48:31", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "allow_import": 1, 
-  "description": "Specify Exchange Rate to convert one currency into another", 
-  "doctype": "DocType", 
-  "document_type": "Master", 
-  "icon": "icon-exchange", 
-  "module": "Setup", 
-  "name": "__common__"
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "Currency Exchange", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0, 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocPerm", 
-  "email": 1, 
-  "name": "__common__", 
-  "parent": "Currency Exchange", 
-  "parentfield": "permissions", 
-  "parenttype": "DocType", 
-  "permlevel": 0, 
-  "print": 1, 
-  "read": 1, 
-  "report": 1
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Currency Exchange"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "from_currency", 
-  "fieldtype": "Link", 
-  "label": "From Currency", 
-  "options": "Currency"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "to_currency", 
-  "fieldtype": "Link", 
-  "label": "To Currency", 
-  "options": "Currency"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "exchange_rate", 
-  "fieldtype": "Float", 
-  "label": "Exchange Rate"
- }, 
- {
-  "cancel": 1, 
-  "create": 1, 
-  "delete": 1, 
-  "doctype": "DocPerm", 
-  "role": "Accounts Manager", 
-  "write": 1
- }, 
- {
-  "delete": 0, 
-  "doctype": "DocPerm", 
-  "role": "Accounts User"
- }, 
- {
-  "delete": 0, 
-  "doctype": "DocPerm", 
-  "role": "Sales User"
- }, 
- {
-  "delete": 0, 
-  "doctype": "DocPerm", 
-  "role": "Purchase User"
- }
-]
\ No newline at end of file
+{
+ "allow_import": 1, 
+ "creation": "2013-06-20 15:40:29", 
+ "description": "Specify Exchange Rate to convert one currency into another", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "document_type": "Master", 
+ "fields": [
+  {
+   "fieldname": "from_currency", 
+   "fieldtype": "Link", 
+   "label": "From Currency", 
+   "options": "Currency", 
+   "permlevel": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "to_currency", 
+   "fieldtype": "Link", 
+   "label": "To Currency", 
+   "options": "Currency", 
+   "permlevel": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "exchange_rate", 
+   "fieldtype": "Float", 
+   "label": "Exchange Rate", 
+   "permlevel": 0, 
+   "reqd": 1
+  }
+ ], 
+ "icon": "icon-exchange", 
+ "idx": 1, 
+ "modified": "2014-01-20 17:48:31", 
+ "modified_by": "Administrator", 
+ "module": "Setup", 
+ "name": "Currency Exchange", 
+ "owner": "Administrator", 
+ "permissions": [
+  {
+   "cancel": 1, 
+   "create": 1, 
+   "delete": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Accounts Manager", 
+   "write": 1
+  }, 
+  {
+   "delete": 0, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Accounts User"
+  }, 
+  {
+   "delete": 0, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Sales User"
+  }, 
+  {
+   "delete": 0, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Purchase User"
+  }
+ ]
+}
\ No newline at end of file
diff --git a/erpnext/setup/doctype/customer_group/customer_group.txt b/erpnext/setup/doctype/customer_group/customer_group.txt
index 59f52c6..d26f8e5 100644
--- a/erpnext/setup/doctype/customer_group/customer_group.txt
+++ b/erpnext/setup/doctype/customer_group/customer_group.txt
@@ -1,165 +1,160 @@
-[
- {
-  "creation": "2013-01-10 16:34:23", 
-  "docstatus": 0, 
-  "modified": "2014-01-20 17:48:33", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "allow_import": 1, 
-  "allow_rename": 1, 
-  "autoname": "field:customer_group_name", 
-  "doctype": "DocType", 
-  "document_type": "Master", 
-  "icon": "icon-sitemap", 
-  "in_create": 1, 
-  "module": "Setup", 
-  "name": "__common__", 
-  "read_only": 1, 
-  "search_fields": "name,parent_customer_group"
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "Customer Group", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "amend": 0, 
-  "cancel": 0, 
-  "doctype": "DocPerm", 
-  "email": 1, 
-  "name": "__common__", 
-  "parent": "Customer Group", 
-  "parentfield": "permissions", 
-  "parenttype": "DocType", 
-  "permlevel": 0, 
-  "print": 1, 
-  "read": 1, 
-  "report": 1, 
-  "submit": 0
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Customer Group"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "trash_reason", 
-  "fieldtype": "Small Text", 
-  "label": "Trash Reason", 
-  "oldfieldname": "trash_reason", 
-  "oldfieldtype": "Small Text", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "customer_group_name", 
-  "fieldtype": "Data", 
-  "label": "Customer Group Name", 
-  "no_copy": 1, 
-  "oldfieldname": "customer_group_name", 
-  "oldfieldtype": "Data", 
-  "reqd": 1
- }, 
- {
-  "description": "<a href=\"#Sales Browser/Customer Group\">Add / Edit</a>", 
-  "doctype": "DocField", 
-  "fieldname": "parent_customer_group", 
-  "fieldtype": "Link", 
-  "ignore_restrictions": 1, 
-  "label": "Parent Customer Group", 
-  "oldfieldname": "parent_customer_group", 
-  "oldfieldtype": "Link", 
-  "options": "Customer Group", 
-  "reqd": 0
- }, 
- {
-  "description": "Only leaf nodes are allowed in transaction", 
-  "doctype": "DocField", 
-  "fieldname": "is_group", 
-  "fieldtype": "Select", 
-  "label": "Has Child Node", 
-  "oldfieldname": "is_group", 
-  "oldfieldtype": "Select", 
-  "options": "\nYes\nNo", 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "cb0", 
-  "fieldtype": "Column Break"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "default_price_list", 
-  "fieldtype": "Link", 
-  "label": "Default Price List", 
-  "options": "Price List"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "lft", 
-  "fieldtype": "Int", 
-  "hidden": 1, 
-  "label": "lft", 
-  "no_copy": 1, 
-  "oldfieldname": "lft", 
-  "oldfieldtype": "Int", 
-  "print_hide": 1, 
-  "report_hide": 1, 
-  "search_index": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "rgt", 
-  "fieldtype": "Int", 
-  "hidden": 1, 
-  "label": "rgt", 
-  "no_copy": 1, 
-  "oldfieldname": "rgt", 
-  "oldfieldtype": "Int", 
-  "print_hide": 1, 
-  "report_hide": 1, 
-  "search_index": 1
- }, 
- {
-  "description": "<a href=\"#Sales Browser/Customer Group\">Add / Edit</a>", 
-  "doctype": "DocField", 
-  "fieldname": "old_parent", 
-  "fieldtype": "Link", 
-  "hidden": 1, 
-  "ignore_restrictions": 1, 
-  "label": "old_parent", 
-  "no_copy": 1, 
-  "oldfieldname": "old_parent", 
-  "oldfieldtype": "Data", 
-  "options": "Customer Group", 
-  "print_hide": 1, 
-  "report_hide": 1
- }, 
- {
-  "create": 0, 
-  "delete": 0, 
-  "doctype": "DocPerm", 
-  "role": "Sales Manager", 
-  "write": 0
- }, 
- {
-  "create": 0, 
-  "delete": 0, 
-  "doctype": "DocPerm", 
-  "role": "Sales User", 
-  "write": 0
- }, 
- {
-  "create": 1, 
-  "delete": 1, 
-  "doctype": "DocPerm", 
-  "role": "Sales Master Manager", 
-  "write": 1
- }
-]
\ No newline at end of file
+{
+ "allow_import": 1, 
+ "allow_rename": 1, 
+ "autoname": "field:customer_group_name", 
+ "creation": "2013-01-10 16:34:23", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "document_type": "Master", 
+ "fields": [
+  {
+   "fieldname": "trash_reason", 
+   "fieldtype": "Small Text", 
+   "label": "Trash Reason", 
+   "oldfieldname": "trash_reason", 
+   "oldfieldtype": "Small Text", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "customer_group_name", 
+   "fieldtype": "Data", 
+   "label": "Customer Group Name", 
+   "no_copy": 1, 
+   "oldfieldname": "customer_group_name", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "reqd": 1
+  }, 
+  {
+   "description": "<a href=\"#Sales Browser/Customer Group\">Add / Edit</a>", 
+   "fieldname": "parent_customer_group", 
+   "fieldtype": "Link", 
+   "ignore_restrictions": 1, 
+   "label": "Parent Customer Group", 
+   "oldfieldname": "parent_customer_group", 
+   "oldfieldtype": "Link", 
+   "options": "Customer Group", 
+   "permlevel": 0, 
+   "reqd": 0
+  }, 
+  {
+   "description": "Only leaf nodes are allowed in transaction", 
+   "fieldname": "is_group", 
+   "fieldtype": "Select", 
+   "label": "Has Child Node", 
+   "oldfieldname": "is_group", 
+   "oldfieldtype": "Select", 
+   "options": "\nYes\nNo", 
+   "permlevel": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "cb0", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "default_price_list", 
+   "fieldtype": "Link", 
+   "label": "Default Price List", 
+   "options": "Price List", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "lft", 
+   "fieldtype": "Int", 
+   "hidden": 1, 
+   "label": "lft", 
+   "no_copy": 1, 
+   "oldfieldname": "lft", 
+   "oldfieldtype": "Int", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "report_hide": 1, 
+   "search_index": 1
+  }, 
+  {
+   "fieldname": "rgt", 
+   "fieldtype": "Int", 
+   "hidden": 1, 
+   "label": "rgt", 
+   "no_copy": 1, 
+   "oldfieldname": "rgt", 
+   "oldfieldtype": "Int", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "report_hide": 1, 
+   "search_index": 1
+  }, 
+  {
+   "description": "<a href=\"#Sales Browser/Customer Group\">Add / Edit</a>", 
+   "fieldname": "old_parent", 
+   "fieldtype": "Link", 
+   "hidden": 1, 
+   "ignore_restrictions": 1, 
+   "label": "old_parent", 
+   "no_copy": 1, 
+   "oldfieldname": "old_parent", 
+   "oldfieldtype": "Data", 
+   "options": "Customer Group", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "report_hide": 1
+  }
+ ], 
+ "icon": "icon-sitemap", 
+ "idx": 1, 
+ "in_create": 1, 
+ "modified": "2014-01-20 17:48:33", 
+ "modified_by": "Administrator", 
+ "module": "Setup", 
+ "name": "Customer Group", 
+ "owner": "Administrator", 
+ "permissions": [
+  {
+   "amend": 0, 
+   "cancel": 0, 
+   "create": 0, 
+   "delete": 0, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Sales Manager", 
+   "submit": 0, 
+   "write": 0
+  }, 
+  {
+   "amend": 0, 
+   "cancel": 0, 
+   "create": 0, 
+   "delete": 0, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Sales User", 
+   "submit": 0, 
+   "write": 0
+  }, 
+  {
+   "amend": 0, 
+   "cancel": 0, 
+   "create": 1, 
+   "delete": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Sales Master Manager", 
+   "submit": 0, 
+   "write": 1
+  }
+ ], 
+ "read_only": 1, 
+ "search_fields": "name,parent_customer_group"
+}
\ No newline at end of file
diff --git a/erpnext/setup/doctype/email_digest/email_digest.txt b/erpnext/setup/doctype/email_digest/email_digest.txt
index 6660c25..55b334e 100644
--- a/erpnext/setup/doctype/email_digest/email_digest.txt
+++ b/erpnext/setup/doctype/email_digest/email_digest.txt
@@ -1,368 +1,352 @@
-[
- {
-  "creation": "2013-02-21 14:15:31", 
-  "docstatus": 0, 
-  "modified": "2014-03-19 11:39:27", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "autoname": "Prompt", 
-  "description": "Send regular summary reports via Email.", 
-  "doctype": "DocType", 
-  "document_type": "System", 
-  "icon": "icon-envelope", 
-  "module": "Setup", 
-  "name": "__common__"
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "Email Digest", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "cancel": 0, 
-  "doctype": "DocPerm", 
-  "name": "__common__", 
-  "parent": "Email Digest", 
-  "parentfield": "permissions", 
-  "parenttype": "DocType", 
-  "read": 1, 
-  "role": "System Manager", 
-  "submit": 0
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Email Digest"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "settings", 
-  "fieldtype": "Section Break", 
-  "label": "Email Digest Settings"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break0", 
-  "fieldtype": "Column Break"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "enabled", 
-  "fieldtype": "Check", 
-  "label": "Enabled"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "company", 
-  "fieldtype": "Select", 
-  "label": "For Company", 
-  "options": "link:Company", 
-  "reqd": 1
- }, 
- {
-  "allow_on_submit": 0, 
-  "doctype": "DocField", 
-  "fieldname": "frequency", 
-  "fieldtype": "Select", 
-  "label": "How frequently?", 
-  "options": "Daily\nWeekly\nMonthly", 
-  "reqd": 1
- }, 
- {
-  "depends_on": "eval:doc.enabled", 
-  "doctype": "DocField", 
-  "fieldname": "next_send", 
-  "fieldtype": "Data", 
-  "label": "Next email will be sent on:", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break1", 
-  "fieldtype": "Column Break"
- }, 
- {
-  "description": "Note: Email will not be sent to disabled users", 
-  "doctype": "DocField", 
-  "fieldname": "recipient_list", 
-  "fieldtype": "Text", 
-  "label": "Recipients", 
-  "read_only": 1, 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "addremove_recipients", 
-  "fieldtype": "Button", 
-  "label": "Add/Remove Recipients"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "accounts", 
-  "fieldtype": "Section Break", 
-  "label": "Accounts"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "accounts_module", 
-  "fieldtype": "Column Break", 
-  "label": "Income / Expense"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "income_year_to_date", 
-  "fieldtype": "Check", 
-  "label": "Income Year to Date"
- }, 
- {
-  "description": "Balances of Accounts of type \"Bank\" or \"Cash\"", 
-  "doctype": "DocField", 
-  "fieldname": "bank_balance", 
-  "fieldtype": "Check", 
-  "label": "Bank/Cash Balance"
- }, 
- {
-  "description": "Income booked for the digest period", 
-  "doctype": "DocField", 
-  "fieldname": "income", 
-  "fieldtype": "Check", 
-  "label": "Income Booked"
- }, 
- {
-  "description": "Expenses booked for the digest period", 
-  "doctype": "DocField", 
-  "fieldname": "expenses_booked", 
-  "fieldtype": "Check", 
-  "label": "Expenses Booked"
- }, 
- {
-  "description": "Receivable / Payable account will be identified based on the field Master Type", 
-  "doctype": "DocField", 
-  "fieldname": "column_break_16", 
-  "fieldtype": "Column Break", 
-  "label": "Receivables / Payables"
- }, 
- {
-  "description": "Payments received during the digest period", 
-  "doctype": "DocField", 
-  "fieldname": "collections", 
-  "fieldtype": "Check", 
-  "label": "Payments Received"
- }, 
- {
-  "description": "Payments made during the digest period", 
-  "doctype": "DocField", 
-  "fieldname": "payments", 
-  "fieldtype": "Check", 
-  "label": "Payments Made"
- }, 
- {
-  "description": "Total amount of invoices sent to the customer during the digest period", 
-  "doctype": "DocField", 
-  "fieldname": "invoiced_amount", 
-  "fieldtype": "Check", 
-  "label": "Receivables"
- }, 
- {
-  "description": "Total amount of invoices received from suppliers during the digest period", 
-  "doctype": "DocField", 
-  "fieldname": "payables", 
-  "fieldtype": "Check", 
-  "label": "Payables"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "section_break_20", 
-  "fieldtype": "Section Break", 
-  "label": "Buying & Selling"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "buying_module", 
-  "fieldtype": "Column Break", 
-  "label": "Buying"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "new_purchase_requests", 
-  "fieldtype": "Check", 
-  "label": "New Material Requests"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "new_supplier_quotations", 
-  "fieldtype": "Check", 
-  "label": "New Supplier Quotations"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "new_purchase_orders", 
-  "fieldtype": "Check", 
-  "label": "New Purchase Orders"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "selling_module", 
-  "fieldtype": "Column Break", 
-  "label": "Selling"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "new_leads", 
-  "fieldtype": "Check", 
-  "label": "New Leads"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "new_enquiries", 
-  "fieldtype": "Check", 
-  "label": "New Enquiries"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "new_quotations", 
-  "fieldtype": "Check", 
-  "label": "New Quotations"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "new_sales_orders", 
-  "fieldtype": "Check", 
-  "label": "New Sales Orders"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "section_break_34", 
-  "fieldtype": "Section Break", 
-  "label": "Inventory & Support"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "stock_module", 
-  "fieldtype": "Column Break", 
-  "label": "Stock"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "new_delivery_notes", 
-  "fieldtype": "Check", 
-  "label": "New Delivery Notes"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "new_purchase_receipts", 
-  "fieldtype": "Check", 
-  "label": "New Purchase Receipts"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "new_stock_entries", 
-  "fieldtype": "Check", 
-  "label": "New Stock Entries"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "support_module", 
-  "fieldtype": "Column Break", 
-  "label": "Support"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "new_support_tickets", 
-  "fieldtype": "Check", 
-  "label": "New Support Tickets"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "open_tickets", 
-  "fieldtype": "Check", 
-  "label": "Open Tickets"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "new_communications", 
-  "fieldtype": "Check", 
-  "label": "New Communications"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "section_break_40", 
-  "fieldtype": "Section Break", 
-  "label": "Projects & System"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "projects_module", 
-  "fieldtype": "Column Break", 
-  "label": "Projects"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "new_projects", 
-  "fieldtype": "Check", 
-  "label": "New Projects"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "core_module", 
-  "fieldtype": "Column Break", 
-  "label": "System"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "scheduler_errors", 
-  "fieldtype": "Check", 
-  "label": "Scheduler Failed Events"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "user_specific", 
-  "fieldtype": "Section Break", 
-  "label": "User Specific"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "general", 
-  "fieldtype": "Column Break", 
-  "label": "General"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "calendar_events", 
-  "fieldtype": "Check", 
-  "label": "Calendar Events"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "todo_list", 
-  "fieldtype": "Check", 
-  "label": "To Do List"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "stub", 
-  "fieldtype": "Column Break", 
-  "label": "Stub"
- }, 
- {
-  "create": 1, 
-  "delete": 1, 
-  "doctype": "DocPerm", 
-  "email": 1, 
-  "permlevel": 0, 
-  "print": 1, 
-  "report": 1, 
-  "write": 1
- }, 
- {
-  "amend": 0, 
-  "create": 0, 
-  "delete": 0, 
-  "doctype": "DocPerm", 
-  "permlevel": 1
- }
-]
\ No newline at end of file
+{
+ "autoname": "Prompt", 
+ "creation": "2013-02-21 14:15:31", 
+ "description": "Send regular summary reports via Email.", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "document_type": "System", 
+ "fields": [
+  {
+   "fieldname": "settings", 
+   "fieldtype": "Section Break", 
+   "label": "Email Digest Settings", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "column_break0", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "enabled", 
+   "fieldtype": "Check", 
+   "label": "Enabled", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "company", 
+   "fieldtype": "Select", 
+   "label": "For Company", 
+   "options": "link:Company", 
+   "permlevel": 0, 
+   "reqd": 1
+  }, 
+  {
+   "allow_on_submit": 0, 
+   "fieldname": "frequency", 
+   "fieldtype": "Select", 
+   "label": "How frequently?", 
+   "options": "Daily\nWeekly\nMonthly", 
+   "permlevel": 0, 
+   "reqd": 1
+  }, 
+  {
+   "depends_on": "eval:doc.enabled", 
+   "fieldname": "next_send", 
+   "fieldtype": "Data", 
+   "label": "Next email will be sent on:", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "column_break1", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0
+  }, 
+  {
+   "description": "Note: Email will not be sent to disabled users", 
+   "fieldname": "recipient_list", 
+   "fieldtype": "Text", 
+   "label": "Recipients", 
+   "permlevel": 0, 
+   "read_only": 1, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "addremove_recipients", 
+   "fieldtype": "Button", 
+   "label": "Add/Remove Recipients", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "accounts", 
+   "fieldtype": "Section Break", 
+   "label": "Accounts", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "accounts_module", 
+   "fieldtype": "Column Break", 
+   "label": "Income / Expense", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "income_year_to_date", 
+   "fieldtype": "Check", 
+   "label": "Income Year to Date", 
+   "permlevel": 0
+  }, 
+  {
+   "description": "Balances of Accounts of type \"Bank\" or \"Cash\"", 
+   "fieldname": "bank_balance", 
+   "fieldtype": "Check", 
+   "label": "Bank/Cash Balance", 
+   "permlevel": 0
+  }, 
+  {
+   "description": "Income booked for the digest period", 
+   "fieldname": "income", 
+   "fieldtype": "Check", 
+   "label": "Income Booked", 
+   "permlevel": 0
+  }, 
+  {
+   "description": "Expenses booked for the digest period", 
+   "fieldname": "expenses_booked", 
+   "fieldtype": "Check", 
+   "label": "Expenses Booked", 
+   "permlevel": 0
+  }, 
+  {
+   "description": "Receivable / Payable account will be identified based on the field Master Type", 
+   "fieldname": "column_break_16", 
+   "fieldtype": "Column Break", 
+   "label": "Receivables / Payables", 
+   "permlevel": 0
+  }, 
+  {
+   "description": "Payments received during the digest period", 
+   "fieldname": "collections", 
+   "fieldtype": "Check", 
+   "label": "Payments Received", 
+   "permlevel": 0
+  }, 
+  {
+   "description": "Payments made during the digest period", 
+   "fieldname": "payments", 
+   "fieldtype": "Check", 
+   "label": "Payments Made", 
+   "permlevel": 0
+  }, 
+  {
+   "description": "Total amount of invoices sent to the customer during the digest period", 
+   "fieldname": "invoiced_amount", 
+   "fieldtype": "Check", 
+   "label": "Receivables", 
+   "permlevel": 0
+  }, 
+  {
+   "description": "Total amount of invoices received from suppliers during the digest period", 
+   "fieldname": "payables", 
+   "fieldtype": "Check", 
+   "label": "Payables", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "section_break_20", 
+   "fieldtype": "Section Break", 
+   "label": "Buying & Selling", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "buying_module", 
+   "fieldtype": "Column Break", 
+   "label": "Buying", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "new_purchase_requests", 
+   "fieldtype": "Check", 
+   "label": "New Material Requests", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "new_supplier_quotations", 
+   "fieldtype": "Check", 
+   "label": "New Supplier Quotations", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "new_purchase_orders", 
+   "fieldtype": "Check", 
+   "label": "New Purchase Orders", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "selling_module", 
+   "fieldtype": "Column Break", 
+   "label": "Selling", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "new_leads", 
+   "fieldtype": "Check", 
+   "label": "New Leads", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "new_enquiries", 
+   "fieldtype": "Check", 
+   "label": "New Enquiries", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "new_quotations", 
+   "fieldtype": "Check", 
+   "label": "New Quotations", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "new_sales_orders", 
+   "fieldtype": "Check", 
+   "label": "New Sales Orders", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "section_break_34", 
+   "fieldtype": "Section Break", 
+   "label": "Inventory & Support", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "stock_module", 
+   "fieldtype": "Column Break", 
+   "label": "Stock", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "new_delivery_notes", 
+   "fieldtype": "Check", 
+   "label": "New Delivery Notes", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "new_purchase_receipts", 
+   "fieldtype": "Check", 
+   "label": "New Purchase Receipts", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "new_stock_entries", 
+   "fieldtype": "Check", 
+   "label": "New Stock Entries", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "support_module", 
+   "fieldtype": "Column Break", 
+   "label": "Support", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "new_support_tickets", 
+   "fieldtype": "Check", 
+   "label": "New Support Tickets", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "open_tickets", 
+   "fieldtype": "Check", 
+   "label": "Open Tickets", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "new_communications", 
+   "fieldtype": "Check", 
+   "label": "New Communications", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "section_break_40", 
+   "fieldtype": "Section Break", 
+   "label": "Projects & System", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "projects_module", 
+   "fieldtype": "Column Break", 
+   "label": "Projects", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "new_projects", 
+   "fieldtype": "Check", 
+   "label": "New Projects", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "core_module", 
+   "fieldtype": "Column Break", 
+   "label": "System", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "scheduler_errors", 
+   "fieldtype": "Check", 
+   "label": "Scheduler Failed Events", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "user_specific", 
+   "fieldtype": "Section Break", 
+   "label": "User Specific", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "general", 
+   "fieldtype": "Column Break", 
+   "label": "General", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "calendar_events", 
+   "fieldtype": "Check", 
+   "label": "Calendar Events", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "todo_list", 
+   "fieldtype": "Check", 
+   "label": "To Do List", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "stub", 
+   "fieldtype": "Column Break", 
+   "label": "Stub", 
+   "permlevel": 0
+  }
+ ], 
+ "icon": "icon-envelope", 
+ "idx": 1, 
+ "modified": "2014-03-19 11:39:27", 
+ "modified_by": "Administrator", 
+ "module": "Setup", 
+ "name": "Email Digest", 
+ "owner": "Administrator", 
+ "permissions": [
+  {
+   "cancel": 0, 
+   "create": 1, 
+   "delete": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "System Manager", 
+   "submit": 0, 
+   "write": 1
+  }, 
+  {
+   "amend": 0, 
+   "cancel": 0, 
+   "create": 0, 
+   "delete": 0, 
+   "permlevel": 1, 
+   "read": 1, 
+   "role": "System Manager", 
+   "submit": 0
+  }
+ ]
+}
\ No newline at end of file
diff --git a/erpnext/setup/doctype/features_setup/features_setup.txt b/erpnext/setup/doctype/features_setup/features_setup.txt
index dd2df02..fd2db4e 100644
--- a/erpnext/setup/doctype/features_setup/features_setup.txt
+++ b/erpnext/setup/doctype/features_setup/features_setup.txt
@@ -1,253 +1,241 @@
-[
- {
-  "creation": "2012-12-20 12:50:49", 
-  "docstatus": 0, 
-  "modified": "2013-12-24 11:40:19", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "doctype": "DocType", 
-  "icon": "icon-glass", 
-  "issingle": 1, 
-  "module": "Setup", 
-  "name": "__common__", 
-  "name_case": "Title Case"
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "Features Setup", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "create": 1, 
-  "doctype": "DocPerm", 
-  "email": 1, 
-  "name": "__common__", 
-  "parent": "Features Setup", 
-  "parentfield": "permissions", 
-  "parenttype": "DocType", 
-  "permlevel": 0, 
-  "print": 1, 
-  "read": 1, 
-  "report": 0, 
-  "submit": 0, 
-  "write": 1
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Features Setup"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "materials", 
-  "fieldtype": "Section Break", 
-  "label": "Materials"
- }, 
- {
-  "description": "To track item in sales and purchase documents based on their serial nos. This is can also used to track warranty details of the product.", 
-  "doctype": "DocField", 
-  "fieldname": "fs_item_serial_nos", 
-  "fieldtype": "Check", 
-  "label": "Item Serial Nos"
- }, 
- {
-  "description": "To track items in sales and purchase documents with batch nos<br><b>Preferred Industry: Chemicals etc</b>", 
-  "doctype": "DocField", 
-  "fieldname": "fs_item_batch_nos", 
-  "fieldtype": "Check", 
-  "label": "Item Batch Nos"
- }, 
- {
-  "description": "To track brand name in the following documents<br>\nDelivery Note, Enuiry, Material Request, Item, Purchase Order, Purchase Voucher, Purchaser Receipt, Quotation, Sales Invoice, Sales BOM, Sales Order, Serial No", 
-  "doctype": "DocField", 
-  "fieldname": "fs_brands", 
-  "fieldtype": "Check", 
-  "label": "Brands"
- }, 
- {
-  "description": "To track items using barcode. You will be able to enter items in Delivery Note and Sales Invoice by scanning barcode of item.", 
-  "doctype": "DocField", 
-  "fieldname": "fs_item_barcode", 
-  "fieldtype": "Check", 
-  "label": "Item Barcode"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break0", 
-  "fieldtype": "Column Break"
- }, 
- {
-  "description": "1. To maintain the customer wise item code and to make them searchable based on their code use this option", 
-  "doctype": "DocField", 
-  "fieldname": "fs_item_advanced", 
-  "fieldtype": "Check", 
-  "label": "Item Advanced"
- }, 
- {
-  "description": "If Sale BOM is defined, the actual BOM of the Pack is displayed as table.\nAvailable in Delivery Note and Sales Order", 
-  "doctype": "DocField", 
-  "fieldname": "fs_packing_details", 
-  "fieldtype": "Check", 
-  "label": "Packing Details"
- }, 
- {
-  "description": "To get Item Group in details table", 
-  "doctype": "DocField", 
-  "fieldname": "fs_item_group_in_details", 
-  "fieldtype": "Check", 
-  "label": "Item Groups in Details"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "sales_and_purchase", 
-  "fieldtype": "Section Break", 
-  "label": "Sales and Purchase"
- }, 
- {
-  "description": "All export related fields like currency, conversion rate, export total, export grand total etc are available in <br>\nDelivery Note, POS, Quotation, Sales Invoice, Sales Order etc.", 
-  "doctype": "DocField", 
-  "fieldname": "fs_exports", 
-  "fieldtype": "Check", 
-  "label": "Exports"
- }, 
- {
-  "description": "All import related fields like currency, conversion rate, import total, import grand total etc are available in <br>\nPurchase Receipt, Supplier Quotation, Purchase Invoice, Purchase Order etc.", 
-  "doctype": "DocField", 
-  "fieldname": "fs_imports", 
-  "fieldtype": "Check", 
-  "label": "Imports"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break1", 
-  "fieldtype": "Column Break"
- }, 
- {
-  "description": "Field available in Delivery Note, Quotation, Sales Invoice, Sales Order", 
-  "doctype": "DocField", 
-  "fieldname": "fs_discounts", 
-  "fieldtype": "Check", 
-  "label": "Sales Discounts"
- }, 
- {
-  "description": "Discount Fields will be available in Purchase Order, Purchase Receipt, Purchase Invoice", 
-  "doctype": "DocField", 
-  "fieldname": "fs_purchase_discounts", 
-  "fieldtype": "Check", 
-  "label": "Purchase Discounts"
- }, 
- {
-  "description": "To track any installation or commissioning related work after sales", 
-  "doctype": "DocField", 
-  "fieldname": "fs_after_sales_installations", 
-  "fieldtype": "Check", 
-  "label": "After Sale Installations"
- }, 
- {
-  "description": "Available in \nBOM, Delivery Note, Purchase Invoice, Production Order, Purchase Order, Purchase Receipt, Sales Invoice, Sales Order, Stock Entry, Timesheet", 
-  "doctype": "DocField", 
-  "fieldname": "fs_projects", 
-  "fieldtype": "Check", 
-  "label": "Projects"
- }, 
- {
-  "description": "If you have Sales Team and Sale Partners (Channel Partners)  they can be tagged and maintain their contribution in the sales activity", 
-  "doctype": "DocField", 
-  "fieldname": "fs_sales_extras", 
-  "fieldtype": "Check", 
-  "label": "Sales Extras"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "accounts", 
-  "fieldtype": "Section Break", 
-  "label": "Accounts"
- }, 
- {
-  "description": "Check if you need automatic recurring invoices. After submitting any sales invoice, Recurring section will be visible.", 
-  "doctype": "DocField", 
-  "fieldname": "fs_recurring_invoice", 
-  "fieldtype": "Check", 
-  "label": "Recurring Invoice"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break2", 
-  "fieldtype": "Column Break"
- }, 
- {
-  "description": "To enable <b>Point of Sale</b> features", 
-  "doctype": "DocField", 
-  "fieldname": "fs_pos", 
-  "fieldtype": "Check", 
-  "label": "Point of Sale"
- }, 
- {
-  "description": "To enable <b>Point of Sale</b> view", 
-  "doctype": "DocField", 
-  "fieldname": "fs_pos_view", 
-  "fieldtype": "Check", 
-  "label": "POS View"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "production", 
-  "fieldtype": "Section Break", 
-  "label": "Manufacturing"
- }, 
- {
-  "description": "If you involve in manufacturing activity<br>\nEnables item <b>Is Manufactured</b>", 
-  "doctype": "DocField", 
-  "fieldname": "fs_manufacturing", 
-  "fieldtype": "Check", 
-  "label": "Manufacturing"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break3", 
-  "fieldtype": "Column Break"
- }, 
- {
-  "description": "If you follow Quality Inspection<br>\nEnables item QA Required and QA No in Purchase Receipt", 
-  "doctype": "DocField", 
-  "fieldname": "fs_quality", 
-  "fieldtype": "Check", 
-  "label": "Quality"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "miscelleneous", 
-  "fieldtype": "Section Break", 
-  "label": "Miscelleneous"
- }, 
- {
-  "description": "If you have long print formats, this feature can be used to split the page to be printed on multiple pages with all headers and footers on each page", 
-  "doctype": "DocField", 
-  "fieldname": "fs_page_break", 
-  "fieldtype": "Check", 
-  "label": "Page Break"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break4", 
-  "fieldtype": "Column Break"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "fs_more_info", 
-  "fieldtype": "Check", 
-  "label": "More Info"
- }, 
- {
-  "doctype": "DocPerm", 
-  "role": "System Manager"
- }, 
- {
-  "doctype": "DocPerm", 
-  "role": "Administrator"
- }
-]
\ No newline at end of file
+{
+ "creation": "2012-12-20 12:50:49", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "fields": [
+  {
+   "fieldname": "materials", 
+   "fieldtype": "Section Break", 
+   "label": "Materials", 
+   "permlevel": 0
+  }, 
+  {
+   "description": "To track item in sales and purchase documents based on their serial nos. This is can also used to track warranty details of the product.", 
+   "fieldname": "fs_item_serial_nos", 
+   "fieldtype": "Check", 
+   "label": "Item Serial Nos", 
+   "permlevel": 0
+  }, 
+  {
+   "description": "To track items in sales and purchase documents with batch nos<br><b>Preferred Industry: Chemicals etc</b>", 
+   "fieldname": "fs_item_batch_nos", 
+   "fieldtype": "Check", 
+   "label": "Item Batch Nos", 
+   "permlevel": 0
+  }, 
+  {
+   "description": "To track brand name in the following documents<br>\nDelivery Note, Enuiry, Material Request, Item, Purchase Order, Purchase Voucher, Purchaser Receipt, Quotation, Sales Invoice, Sales BOM, Sales Order, Serial No", 
+   "fieldname": "fs_brands", 
+   "fieldtype": "Check", 
+   "label": "Brands", 
+   "permlevel": 0
+  }, 
+  {
+   "description": "To track items using barcode. You will be able to enter items in Delivery Note and Sales Invoice by scanning barcode of item.", 
+   "fieldname": "fs_item_barcode", 
+   "fieldtype": "Check", 
+   "label": "Item Barcode", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "column_break0", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0
+  }, 
+  {
+   "description": "1. To maintain the customer wise item code and to make them searchable based on their code use this option", 
+   "fieldname": "fs_item_advanced", 
+   "fieldtype": "Check", 
+   "label": "Item Advanced", 
+   "permlevel": 0
+  }, 
+  {
+   "description": "If Sale BOM is defined, the actual BOM of the Pack is displayed as table.\nAvailable in Delivery Note and Sales Order", 
+   "fieldname": "fs_packing_details", 
+   "fieldtype": "Check", 
+   "label": "Packing Details", 
+   "permlevel": 0
+  }, 
+  {
+   "description": "To get Item Group in details table", 
+   "fieldname": "fs_item_group_in_details", 
+   "fieldtype": "Check", 
+   "label": "Item Groups in Details", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "sales_and_purchase", 
+   "fieldtype": "Section Break", 
+   "label": "Sales and Purchase", 
+   "permlevel": 0
+  }, 
+  {
+   "description": "All export related fields like currency, conversion rate, export total, export grand total etc are available in <br>\nDelivery Note, POS, Quotation, Sales Invoice, Sales Order etc.", 
+   "fieldname": "fs_exports", 
+   "fieldtype": "Check", 
+   "label": "Exports", 
+   "permlevel": 0
+  }, 
+  {
+   "description": "All import related fields like currency, conversion rate, import total, import grand total etc are available in <br>\nPurchase Receipt, Supplier Quotation, Purchase Invoice, Purchase Order etc.", 
+   "fieldname": "fs_imports", 
+   "fieldtype": "Check", 
+   "label": "Imports", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "column_break1", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0
+  }, 
+  {
+   "description": "Field available in Delivery Note, Quotation, Sales Invoice, Sales Order", 
+   "fieldname": "fs_discounts", 
+   "fieldtype": "Check", 
+   "label": "Sales Discounts", 
+   "permlevel": 0
+  }, 
+  {
+   "description": "Discount Fields will be available in Purchase Order, Purchase Receipt, Purchase Invoice", 
+   "fieldname": "fs_purchase_discounts", 
+   "fieldtype": "Check", 
+   "label": "Purchase Discounts", 
+   "permlevel": 0
+  }, 
+  {
+   "description": "To track any installation or commissioning related work after sales", 
+   "fieldname": "fs_after_sales_installations", 
+   "fieldtype": "Check", 
+   "label": "After Sale Installations", 
+   "permlevel": 0
+  }, 
+  {
+   "description": "Available in \nBOM, Delivery Note, Purchase Invoice, Production Order, Purchase Order, Purchase Receipt, Sales Invoice, Sales Order, Stock Entry, Timesheet", 
+   "fieldname": "fs_projects", 
+   "fieldtype": "Check", 
+   "label": "Projects", 
+   "permlevel": 0
+  }, 
+  {
+   "description": "If you have Sales Team and Sale Partners (Channel Partners)  they can be tagged and maintain their contribution in the sales activity", 
+   "fieldname": "fs_sales_extras", 
+   "fieldtype": "Check", 
+   "label": "Sales Extras", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "accounts", 
+   "fieldtype": "Section Break", 
+   "label": "Accounts", 
+   "permlevel": 0
+  }, 
+  {
+   "description": "Check if you need automatic recurring invoices. After submitting any sales invoice, Recurring section will be visible.", 
+   "fieldname": "fs_recurring_invoice", 
+   "fieldtype": "Check", 
+   "label": "Recurring Invoice", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "column_break2", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0
+  }, 
+  {
+   "description": "To enable <b>Point of Sale</b> features", 
+   "fieldname": "fs_pos", 
+   "fieldtype": "Check", 
+   "label": "Point of Sale", 
+   "permlevel": 0
+  }, 
+  {
+   "description": "To enable <b>Point of Sale</b> view", 
+   "fieldname": "fs_pos_view", 
+   "fieldtype": "Check", 
+   "label": "POS View", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "production", 
+   "fieldtype": "Section Break", 
+   "label": "Manufacturing", 
+   "permlevel": 0
+  }, 
+  {
+   "description": "If you involve in manufacturing activity<br>\nEnables item <b>Is Manufactured</b>", 
+   "fieldname": "fs_manufacturing", 
+   "fieldtype": "Check", 
+   "label": "Manufacturing", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "column_break3", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0
+  }, 
+  {
+   "description": "If you follow Quality Inspection<br>\nEnables item QA Required and QA No in Purchase Receipt", 
+   "fieldname": "fs_quality", 
+   "fieldtype": "Check", 
+   "label": "Quality", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "miscelleneous", 
+   "fieldtype": "Section Break", 
+   "label": "Miscelleneous", 
+   "permlevel": 0
+  }, 
+  {
+   "description": "If you have long print formats, this feature can be used to split the page to be printed on multiple pages with all headers and footers on each page", 
+   "fieldname": "fs_page_break", 
+   "fieldtype": "Check", 
+   "label": "Page Break", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "column_break4", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "fs_more_info", 
+   "fieldtype": "Check", 
+   "label": "More Info", 
+   "permlevel": 0
+  }
+ ], 
+ "icon": "icon-glass", 
+ "idx": 1, 
+ "issingle": 1, 
+ "modified": "2013-12-24 11:40:19", 
+ "modified_by": "Administrator", 
+ "module": "Setup", 
+ "name": "Features Setup", 
+ "name_case": "Title Case", 
+ "owner": "Administrator", 
+ "permissions": [
+  {
+   "create": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 0, 
+   "role": "System Manager", 
+   "submit": 0, 
+   "write": 1
+  }, 
+  {
+   "create": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 0, 
+   "role": "Administrator", 
+   "submit": 0, 
+   "write": 1
+  }
+ ]
+}
\ No newline at end of file
diff --git a/erpnext/setup/doctype/global_defaults/global_defaults.txt b/erpnext/setup/doctype/global_defaults/global_defaults.txt
index 31ba0df..adf82a5 100644
--- a/erpnext/setup/doctype/global_defaults/global_defaults.txt
+++ b/erpnext/setup/doctype/global_defaults/global_defaults.txt
@@ -1,193 +1,174 @@
-[
- {
-  "creation": "2013-05-02 17:53:24", 
-  "docstatus": 0, 
-  "modified": "2014-02-19 19:11:58", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "allow_copy": 1, 
-  "doctype": "DocType", 
-  "hide_toolbar": 0, 
-  "icon": "icon-cog", 
-  "in_create": 1, 
-  "issingle": 1, 
-  "module": "Setup", 
-  "name": "__common__", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "Global Defaults", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "amend": 0, 
-  "cancel": 0, 
-  "create": 1, 
-  "doctype": "DocPerm", 
-  "name": "__common__", 
-  "parent": "Global Defaults", 
-  "parentfield": "permissions", 
-  "parenttype": "DocType", 
-  "permlevel": 0, 
-  "read": 1, 
-  "report": 0, 
-  "role": "System Manager", 
-  "submit": 0, 
-  "write": 1
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Global Defaults"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "date_and_number_settings", 
-  "fieldtype": "Section Break", 
-  "label": "Date and Number Settings"
- }, 
- {
-  "default": "dd-mm-yyyy", 
-  "doctype": "DocField", 
-  "fieldname": "date_format", 
-  "fieldtype": "Select", 
-  "label": "Date Format", 
-  "options": "yyyy-mm-dd\ndd-mm-yyyy\ndd/mm/yyyy\nmm/dd/yyyy\nmm-dd-yyyy", 
-  "read_only": 0
- }, 
- {
-  "description": "This is the default number format. For currencies, please set the number format in the currency master.", 
-  "doctype": "DocField", 
-  "fieldname": "number_format", 
-  "fieldtype": "Select", 
-  "label": "Number Format", 
-  "options": "\n#,###.##\n#.###,##\n# ###.##\n#,###.###\n#,##,###.##\n#.###\n#,###", 
-  "read_only": 0
- }, 
- {
-  "default": "3", 
-  "description": "Precision for Float fields (quantities, discounts, percentages etc). Floats will be rounded up to specified decimals. Default = 3", 
-  "doctype": "DocField", 
-  "fieldname": "float_precision", 
-  "fieldtype": "Select", 
-  "label": "Float Precision", 
-  "options": "\n2\n3\n4\n5\n6", 
-  "read_only": 0
- }, 
- {
-  "description": "If disable, 'Rounded Total' field will not be visible in any transaction", 
-  "doctype": "DocField", 
-  "fieldname": "disable_rounded_total", 
-  "fieldtype": "Check", 
-  "label": "Disable Rounded Total", 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "currency_settings", 
-  "fieldtype": "Section Break", 
-  "label": "Currency Settings"
- }, 
- {
-  "default": "INR", 
-  "doctype": "DocField", 
-  "fieldname": "default_currency", 
-  "fieldtype": "Link", 
-  "label": "Default Currency", 
-  "options": "Currency", 
-  "read_only": 0, 
-  "reqd": 1
- }, 
- {
-  "description": "Do not show any symbol like $ etc next to currencies.", 
-  "doctype": "DocField", 
-  "fieldname": "hide_currency_symbol", 
-  "fieldtype": "Select", 
-  "label": "Hide Currency Symbol", 
-  "options": "\nNo\nYes", 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "company", 
-  "fieldtype": "Section Break", 
-  "label": "Company Settings", 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "default_company", 
-  "fieldtype": "Link", 
-  "label": "Default Company", 
-  "options": "Company", 
-  "read_only": 0, 
-  "reqd": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "current_fiscal_year", 
-  "fieldtype": "Link", 
-  "label": "Current Fiscal Year", 
-  "options": "Fiscal Year", 
-  "read_only": 0, 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "system", 
-  "fieldtype": "Section Break", 
-  "label": "System Settings", 
-  "read_only": 0
- }, 
- {
-  "description": "Session Expiry in Hours e.g. 06:00", 
-  "doctype": "DocField", 
-  "fieldname": "session_expiry", 
-  "fieldtype": "Data", 
-  "label": "Session Expiry", 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "country", 
-  "fieldtype": "Select", 
-  "label": "Country", 
-  "options": "link:Country"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "sms_sender_name", 
-  "fieldtype": "Data", 
-  "label": "SMS Sender Name", 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break_3", 
-  "fieldtype": "Column Break", 
-  "read_only": 0
- }, 
- {
-  "description": "For Server Side Print Formats", 
-  "doctype": "DocField", 
-  "fieldname": "print_style", 
-  "fieldtype": "Select", 
-  "label": "Print Format Style", 
-  "options": "Standard\nClassic\nModern\nSpartan", 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "time_zone", 
-  "fieldtype": "Select", 
-  "label": "Time Zone"
- }, 
- {
-  "doctype": "DocPerm"
- }
-]
\ No newline at end of file
+{
+ "allow_copy": 1, 
+ "creation": "2013-05-02 17:53:24", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "fields": [
+  {
+   "fieldname": "date_and_number_settings", 
+   "fieldtype": "Section Break", 
+   "label": "Date and Number Settings", 
+   "permlevel": 0
+  }, 
+  {
+   "default": "dd-mm-yyyy", 
+   "fieldname": "date_format", 
+   "fieldtype": "Select", 
+   "label": "Date Format", 
+   "options": "yyyy-mm-dd\ndd-mm-yyyy\ndd/mm/yyyy\nmm/dd/yyyy\nmm-dd-yyyy", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "description": "This is the default number format. For currencies, please set the number format in the currency master.", 
+   "fieldname": "number_format", 
+   "fieldtype": "Select", 
+   "label": "Number Format", 
+   "options": "\n#,###.##\n#.###,##\n# ###.##\n#,###.###\n#,##,###.##\n#.###\n#,###", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "default": "3", 
+   "description": "Precision for Float fields (quantities, discounts, percentages etc). Floats will be rounded up to specified decimals. Default = 3", 
+   "fieldname": "float_precision", 
+   "fieldtype": "Select", 
+   "label": "Float Precision", 
+   "options": "\n2\n3\n4\n5\n6", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "description": "If disable, 'Rounded Total' field will not be visible in any transaction", 
+   "fieldname": "disable_rounded_total", 
+   "fieldtype": "Check", 
+   "label": "Disable Rounded Total", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "currency_settings", 
+   "fieldtype": "Section Break", 
+   "label": "Currency Settings", 
+   "permlevel": 0
+  }, 
+  {
+   "default": "INR", 
+   "fieldname": "default_currency", 
+   "fieldtype": "Link", 
+   "label": "Default Currency", 
+   "options": "Currency", 
+   "permlevel": 0, 
+   "read_only": 0, 
+   "reqd": 1
+  }, 
+  {
+   "description": "Do not show any symbol like $ etc next to currencies.", 
+   "fieldname": "hide_currency_symbol", 
+   "fieldtype": "Select", 
+   "label": "Hide Currency Symbol", 
+   "options": "\nNo\nYes", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "company", 
+   "fieldtype": "Section Break", 
+   "label": "Company Settings", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "default_company", 
+   "fieldtype": "Link", 
+   "label": "Default Company", 
+   "options": "Company", 
+   "permlevel": 0, 
+   "read_only": 0, 
+   "reqd": 0
+  }, 
+  {
+   "fieldname": "current_fiscal_year", 
+   "fieldtype": "Link", 
+   "label": "Current Fiscal Year", 
+   "options": "Fiscal Year", 
+   "permlevel": 0, 
+   "read_only": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "system", 
+   "fieldtype": "Section Break", 
+   "label": "System Settings", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "description": "Session Expiry in Hours e.g. 06:00", 
+   "fieldname": "session_expiry", 
+   "fieldtype": "Data", 
+   "label": "Session Expiry", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "country", 
+   "fieldtype": "Select", 
+   "label": "Country", 
+   "options": "link:Country", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "sms_sender_name", 
+   "fieldtype": "Data", 
+   "label": "SMS Sender Name", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "column_break_3", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "description": "For Server Side Print Formats", 
+   "fieldname": "print_style", 
+   "fieldtype": "Select", 
+   "label": "Print Format Style", 
+   "options": "Standard\nClassic\nModern\nSpartan", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "time_zone", 
+   "fieldtype": "Select", 
+   "label": "Time Zone", 
+   "permlevel": 0
+  }
+ ], 
+ "hide_toolbar": 0, 
+ "icon": "icon-cog", 
+ "idx": 1, 
+ "in_create": 1, 
+ "issingle": 1, 
+ "modified": "2014-02-19 19:11:58", 
+ "modified_by": "Administrator", 
+ "module": "Setup", 
+ "name": "Global Defaults", 
+ "owner": "Administrator", 
+ "permissions": [
+  {
+   "amend": 0, 
+   "cancel": 0, 
+   "create": 1, 
+   "permlevel": 0, 
+   "read": 1, 
+   "report": 0, 
+   "role": "System Manager", 
+   "submit": 0, 
+   "write": 1
+  }
+ ], 
+ "read_only": 1
+}
\ No newline at end of file
diff --git a/erpnext/setup/doctype/item_group/item_group.txt b/erpnext/setup/doctype/item_group/item_group.txt
index 8bd9e7f..b463cb0 100644
--- a/erpnext/setup/doctype/item_group/item_group.txt
+++ b/erpnext/setup/doctype/item_group/item_group.txt
@@ -1,228 +1,239 @@
-[
- {
-  "creation": "2013-03-28 10:35:29", 
-  "docstatus": 0, 
-  "modified": "2014-02-20 18:29:57", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "allow_attach": 1, 
-  "allow_import": 1, 
-  "allow_rename": 1, 
-  "autoname": "field:item_group_name", 
-  "description": "Item Classification", 
-  "doctype": "DocType", 
-  "document_type": "Master", 
-  "icon": "icon-sitemap", 
-  "in_create": 1, 
-  "issingle": 0, 
-  "max_attachments": 3, 
-  "module": "Setup", 
-  "name": "__common__", 
-  "search_fields": "parent_item_group"
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "Item Group", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "cancel": 0, 
-  "delete": 0, 
-  "doctype": "DocPerm", 
-  "email": 1, 
-  "name": "__common__", 
-  "parent": "Item Group", 
-  "parentfield": "permissions", 
-  "parenttype": "DocType", 
-  "permlevel": 0, 
-  "print": 1, 
-  "read": 1, 
-  "report": 1
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Item Group"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "item_group_name", 
-  "fieldtype": "Data", 
-  "label": "Item Group Name", 
-  "no_copy": 0, 
-  "oldfieldname": "item_group_name", 
-  "oldfieldtype": "Data", 
-  "reqd": 1, 
-  "search_index": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "page_name", 
-  "fieldtype": "Data", 
-  "label": "Page Name", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "cb0", 
-  "fieldtype": "Column Break"
- }, 
- {
-  "description": "<a href=\"#Sales Browser/Item Group\">Add / Edit</a>", 
-  "doctype": "DocField", 
-  "fieldname": "parent_item_group", 
-  "fieldtype": "Link", 
-  "ignore_restrictions": 1, 
-  "label": "Parent Item Group", 
-  "no_copy": 0, 
-  "oldfieldname": "parent_item_group", 
-  "oldfieldtype": "Link", 
-  "options": "Item Group", 
-  "reqd": 0, 
-  "search_index": 0
- }, 
- {
-  "description": "Only leaf nodes are allowed in transaction", 
-  "doctype": "DocField", 
-  "fieldname": "is_group", 
-  "fieldtype": "Select", 
-  "label": "Has Child Node", 
-  "no_copy": 0, 
-  "oldfieldname": "is_group", 
-  "oldfieldtype": "Select", 
-  "options": "\nYes\nNo", 
-  "reqd": 1, 
-  "search_index": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "sb9", 
-  "fieldtype": "Section Break", 
-  "label": "Website Settings"
- }, 
- {
-  "description": "Check this if you want to show in website", 
-  "doctype": "DocField", 
-  "fieldname": "show_in_website", 
-  "fieldtype": "Check", 
-  "label": "Show in Website", 
-  "no_copy": 0, 
-  "search_index": 0
- }, 
- {
-  "depends_on": "show_in_website", 
-  "doctype": "DocField", 
-  "fieldname": "parent_website_route", 
-  "fieldtype": "Link", 
-  "label": "Parent Website Page", 
-  "options": "Website Route"
- }, 
- {
-  "depends_on": "show_in_website", 
-  "description": "Show this slideshow at the top of the page", 
-  "doctype": "DocField", 
-  "fieldname": "slideshow", 
-  "fieldtype": "Link", 
-  "label": "Slideshow", 
-  "options": "Website Slideshow"
- }, 
- {
-  "depends_on": "show_in_website", 
-  "description": "HTML / Banner that will show on the top of product list.", 
-  "doctype": "DocField", 
-  "fieldname": "description", 
-  "fieldtype": "Text Editor", 
-  "label": "Description"
- }, 
- {
-  "depends_on": "show_in_website", 
-  "doctype": "DocField", 
-  "fieldname": "item_website_specifications", 
-  "fieldtype": "Table", 
-  "label": "Item Website Specifications", 
-  "options": "Item Website Specification"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "lft", 
-  "fieldtype": "Int", 
-  "hidden": 1, 
-  "in_filter": 1, 
-  "label": "lft", 
-  "no_copy": 1, 
-  "oldfieldname": "lft", 
-  "oldfieldtype": "Int", 
-  "print_hide": 1, 
-  "report_hide": 0, 
-  "search_index": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "rgt", 
-  "fieldtype": "Int", 
-  "hidden": 1, 
-  "in_filter": 1, 
-  "label": "rgt", 
-  "no_copy": 1, 
-  "oldfieldname": "rgt", 
-  "oldfieldtype": "Int", 
-  "print_hide": 1, 
-  "report_hide": 0, 
-  "search_index": 1
- }, 
- {
-  "description": "<a href=\"#Sales Browser/Item Group\">Add / Edit</a>", 
-  "doctype": "DocField", 
-  "fieldname": "old_parent", 
-  "fieldtype": "Link", 
-  "hidden": 1, 
-  "ignore_restrictions": 1, 
-  "label": "old_parent", 
-  "no_copy": 1, 
-  "oldfieldname": "old_parent", 
-  "oldfieldtype": "Data", 
-  "options": "Item Group", 
-  "print_hide": 1, 
-  "report_hide": 1, 
-  "search_index": 0
- }, 
- {
-  "amend": 0, 
-  "create": 0, 
-  "doctype": "DocPerm", 
-  "role": "Material Manager", 
-  "submit": 0, 
-  "write": 0
- }, 
- {
-  "amend": 0, 
-  "create": 0, 
-  "doctype": "DocPerm", 
-  "role": "Material User", 
-  "submit": 0, 
-  "write": 0
- }, 
- {
-  "create": 1, 
-  "doctype": "DocPerm", 
-  "role": "Material Master Manager", 
-  "submit": 0, 
-  "write": 1
- }, 
- {
-  "doctype": "DocPerm", 
-  "role": "Sales User"
- }, 
- {
-  "doctype": "DocPerm", 
-  "role": "Purchase User"
- }, 
- {
-  "doctype": "DocPerm", 
-  "role": "Accounts User"
- }
-]
\ No newline at end of file
+{
+ "allow_attach": 1, 
+ "allow_import": 1, 
+ "allow_rename": 1, 
+ "autoname": "field:item_group_name", 
+ "creation": "2013-03-28 10:35:29", 
+ "description": "Item Classification", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "document_type": "Master", 
+ "fields": [
+  {
+   "fieldname": "item_group_name", 
+   "fieldtype": "Data", 
+   "label": "Item Group Name", 
+   "no_copy": 0, 
+   "oldfieldname": "item_group_name", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "reqd": 1, 
+   "search_index": 0
+  }, 
+  {
+   "fieldname": "page_name", 
+   "fieldtype": "Data", 
+   "label": "Page Name", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "cb0", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0
+  }, 
+  {
+   "description": "<a href=\"#Sales Browser/Item Group\">Add / Edit</a>", 
+   "fieldname": "parent_item_group", 
+   "fieldtype": "Link", 
+   "ignore_restrictions": 1, 
+   "label": "Parent Item Group", 
+   "no_copy": 0, 
+   "oldfieldname": "parent_item_group", 
+   "oldfieldtype": "Link", 
+   "options": "Item Group", 
+   "permlevel": 0, 
+   "reqd": 0, 
+   "search_index": 0
+  }, 
+  {
+   "description": "Only leaf nodes are allowed in transaction", 
+   "fieldname": "is_group", 
+   "fieldtype": "Select", 
+   "label": "Has Child Node", 
+   "no_copy": 0, 
+   "oldfieldname": "is_group", 
+   "oldfieldtype": "Select", 
+   "options": "\nYes\nNo", 
+   "permlevel": 0, 
+   "reqd": 1, 
+   "search_index": 0
+  }, 
+  {
+   "fieldname": "sb9", 
+   "fieldtype": "Section Break", 
+   "label": "Website Settings", 
+   "permlevel": 0
+  }, 
+  {
+   "description": "Check this if you want to show in website", 
+   "fieldname": "show_in_website", 
+   "fieldtype": "Check", 
+   "label": "Show in Website", 
+   "no_copy": 0, 
+   "permlevel": 0, 
+   "search_index": 0
+  }, 
+  {
+   "depends_on": "show_in_website", 
+   "fieldname": "parent_website_route", 
+   "fieldtype": "Link", 
+   "label": "Parent Website Page", 
+   "options": "Website Route", 
+   "permlevel": 0
+  }, 
+  {
+   "depends_on": "show_in_website", 
+   "description": "Show this slideshow at the top of the page", 
+   "fieldname": "slideshow", 
+   "fieldtype": "Link", 
+   "label": "Slideshow", 
+   "options": "Website Slideshow", 
+   "permlevel": 0
+  }, 
+  {
+   "depends_on": "show_in_website", 
+   "description": "HTML / Banner that will show on the top of product list.", 
+   "fieldname": "description", 
+   "fieldtype": "Text Editor", 
+   "label": "Description", 
+   "permlevel": 0
+  }, 
+  {
+   "depends_on": "show_in_website", 
+   "fieldname": "item_website_specifications", 
+   "fieldtype": "Table", 
+   "label": "Item Website Specifications", 
+   "options": "Item Website Specification", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "lft", 
+   "fieldtype": "Int", 
+   "hidden": 1, 
+   "in_filter": 1, 
+   "label": "lft", 
+   "no_copy": 1, 
+   "oldfieldname": "lft", 
+   "oldfieldtype": "Int", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "report_hide": 0, 
+   "search_index": 1
+  }, 
+  {
+   "fieldname": "rgt", 
+   "fieldtype": "Int", 
+   "hidden": 1, 
+   "in_filter": 1, 
+   "label": "rgt", 
+   "no_copy": 1, 
+   "oldfieldname": "rgt", 
+   "oldfieldtype": "Int", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "report_hide": 0, 
+   "search_index": 1
+  }, 
+  {
+   "description": "<a href=\"#Sales Browser/Item Group\">Add / Edit</a>", 
+   "fieldname": "old_parent", 
+   "fieldtype": "Link", 
+   "hidden": 1, 
+   "ignore_restrictions": 1, 
+   "label": "old_parent", 
+   "no_copy": 1, 
+   "oldfieldname": "old_parent", 
+   "oldfieldtype": "Data", 
+   "options": "Item Group", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "report_hide": 1, 
+   "search_index": 0
+  }
+ ], 
+ "icon": "icon-sitemap", 
+ "idx": 1, 
+ "in_create": 1, 
+ "issingle": 0, 
+ "max_attachments": 3, 
+ "modified": "2014-02-20 18:29:57", 
+ "modified_by": "Administrator", 
+ "module": "Setup", 
+ "name": "Item Group", 
+ "owner": "Administrator", 
+ "permissions": [
+  {
+   "amend": 0, 
+   "cancel": 0, 
+   "create": 0, 
+   "delete": 0, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Material Manager", 
+   "submit": 0, 
+   "write": 0
+  }, 
+  {
+   "amend": 0, 
+   "cancel": 0, 
+   "create": 0, 
+   "delete": 0, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Material User", 
+   "submit": 0, 
+   "write": 0
+  }, 
+  {
+   "cancel": 0, 
+   "create": 1, 
+   "delete": 0, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Material Master Manager", 
+   "submit": 0, 
+   "write": 1
+  }, 
+  {
+   "cancel": 0, 
+   "delete": 0, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Sales User"
+  }, 
+  {
+   "cancel": 0, 
+   "delete": 0, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Purchase User"
+  }, 
+  {
+   "cancel": 0, 
+   "delete": 0, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Accounts User"
+  }
+ ], 
+ "search_fields": "parent_item_group"
+}
\ No newline at end of file
diff --git a/erpnext/setup/doctype/jobs_email_settings/jobs_email_settings.txt b/erpnext/setup/doctype/jobs_email_settings/jobs_email_settings.txt
index 24a4240..18f71fe 100644
--- a/erpnext/setup/doctype/jobs_email_settings/jobs_email_settings.txt
+++ b/erpnext/setup/doctype/jobs_email_settings/jobs_email_settings.txt
@@ -1,92 +1,73 @@
-[
- {
-  "creation": "2013-01-15 16:50:01", 
-  "docstatus": 0, 
-  "modified": "2013-12-20 19:23:16", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "description": "Email settings for jobs email id \"jobs@example.com\"", 
-  "doctype": "DocType", 
-  "icon": "icon-cog", 
-  "issingle": 1, 
-  "module": "Setup", 
-  "name": "__common__"
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "Jobs Email Settings", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "create": 1, 
-  "doctype": "DocPerm", 
-  "email": 1, 
-  "name": "__common__", 
-  "parent": "Jobs Email Settings", 
-  "parentfield": "permissions", 
-  "parenttype": "DocType", 
-  "permlevel": 0, 
-  "print": 1, 
-  "read": 1, 
-  "role": "System Manager", 
-  "write": 1
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Jobs Email Settings"
- }, 
- {
-  "description": "Settings to extract Job Applicants from a mailbox e.g. \"jobs@example.com\"", 
-  "doctype": "DocField", 
-  "fieldname": "pop3_mail_settings", 
-  "fieldtype": "Section Break", 
-  "label": "POP3 Mail Settings"
- }, 
- {
-  "description": "Check to activate", 
-  "doctype": "DocField", 
-  "fieldname": "extract_emails", 
-  "fieldtype": "Check", 
-  "label": "Extract Emails"
- }, 
- {
-  "description": "Email Id where a job applicant will email e.g. \"jobs@example.com\"", 
-  "doctype": "DocField", 
-  "fieldname": "email_id", 
-  "fieldtype": "Data", 
-  "label": "Email Id"
- }, 
- {
-  "description": "POP3 server e.g. (pop.gmail.com)", 
-  "doctype": "DocField", 
-  "fieldname": "host", 
-  "fieldtype": "Data", 
-  "label": "Host"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "use_ssl", 
-  "fieldtype": "Check", 
-  "label": "Use SSL"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "username", 
-  "fieldtype": "Data", 
-  "label": "Username"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "password", 
-  "fieldtype": "Password", 
-  "label": "Password"
- }, 
- {
-  "doctype": "DocPerm"
- }
-]
\ No newline at end of file
+{
+ "creation": "2013-01-15 16:50:01", 
+ "description": "Email settings for jobs email id \"jobs@example.com\"", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "fields": [
+  {
+   "description": "Settings to extract Job Applicants from a mailbox e.g. \"jobs@example.com\"", 
+   "fieldname": "pop3_mail_settings", 
+   "fieldtype": "Section Break", 
+   "label": "POP3 Mail Settings", 
+   "permlevel": 0
+  }, 
+  {
+   "description": "Check to activate", 
+   "fieldname": "extract_emails", 
+   "fieldtype": "Check", 
+   "label": "Extract Emails", 
+   "permlevel": 0
+  }, 
+  {
+   "description": "Email Id where a job applicant will email e.g. \"jobs@example.com\"", 
+   "fieldname": "email_id", 
+   "fieldtype": "Data", 
+   "label": "Email Id", 
+   "permlevel": 0
+  }, 
+  {
+   "description": "POP3 server e.g. (pop.gmail.com)", 
+   "fieldname": "host", 
+   "fieldtype": "Data", 
+   "label": "Host", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "use_ssl", 
+   "fieldtype": "Check", 
+   "label": "Use SSL", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "username", 
+   "fieldtype": "Data", 
+   "label": "Username", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "password", 
+   "fieldtype": "Password", 
+   "label": "Password", 
+   "permlevel": 0
+  }
+ ], 
+ "icon": "icon-cog", 
+ "idx": 1, 
+ "issingle": 1, 
+ "modified": "2013-12-20 19:23:16", 
+ "modified_by": "Administrator", 
+ "module": "Setup", 
+ "name": "Jobs Email Settings", 
+ "owner": "Administrator", 
+ "permissions": [
+  {
+   "create": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "role": "System Manager", 
+   "write": 1
+  }
+ ]
+}
\ No newline at end of file
diff --git a/erpnext/setup/doctype/naming_series/naming_series.txt b/erpnext/setup/doctype/naming_series/naming_series.txt
index dd28eac..36b1184 100644
--- a/erpnext/setup/doctype/naming_series/naming_series.txt
+++ b/erpnext/setup/doctype/naming_series/naming_series.txt
@@ -1,117 +1,98 @@
-[
- {
-  "creation": "2013-01-25 11:35:08", 
-  "docstatus": 0, 
-  "modified": "2013-12-20 19:23:21", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "description": "Set prefix for numbering series on your transactions", 
-  "doctype": "DocType", 
-  "hide_heading": 0, 
-  "hide_toolbar": 1, 
-  "icon": "icon-sort-by-order", 
-  "issingle": 1, 
-  "module": "Setup", 
-  "name": "__common__", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "Naming Series", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "create": 1, 
-  "doctype": "DocPerm", 
-  "email": 1, 
-  "name": "__common__", 
-  "parent": "Naming Series", 
-  "parentfield": "permissions", 
-  "parenttype": "DocType", 
-  "permlevel": 0, 
-  "print": 1, 
-  "read": 1, 
-  "report": 0, 
-  "role": "System Manager", 
-  "submit": 0, 
-  "write": 1
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Naming Series"
- }, 
- {
-  "description": "Set prefix for numbering series on your transactions", 
-  "doctype": "DocField", 
-  "fieldname": "setup_series", 
-  "fieldtype": "Section Break", 
-  "label": "Setup Series"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "select_doc_for_series", 
-  "fieldtype": "Select", 
-  "label": "Select Transaction"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "help_html", 
-  "fieldtype": "HTML", 
-  "label": "Help HTML", 
-  "options": "<div class=\"well\">\nEdit list of Series in the box below. Rules:\n<ul>\n<li>Each Series Prefix on a new line.</li>\n<li>Allowed special characters are \"/\" and \"-\"</li>\n<li>Optionally, set the number of digits in the series using dot (.) followed by hashes (#). For example, \".####\" means that the series will have four digits. Default is five digits.</li>\n</ul>\nExamples:<br>\nINV-<br>\nINV-10-<br>\nINVK-<br>\nINV-.####<br>\n</div>"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "set_options", 
-  "fieldtype": "Text", 
-  "label": "Series List for this Transaction"
- }, 
- {
-  "description": "Check this if you want to force the user to select a series before saving. There will be no default if you check this.", 
-  "doctype": "DocField", 
-  "fieldname": "user_must_always_select", 
-  "fieldtype": "Check", 
-  "label": "User must always select"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "update", 
-  "fieldtype": "Button", 
-  "label": "Update"
- }, 
- {
-  "description": "Change the starting / current sequence number of an existing series.", 
-  "doctype": "DocField", 
-  "fieldname": "update_series", 
-  "fieldtype": "Section Break", 
-  "label": "Update Series"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "prefix", 
-  "fieldtype": "Select", 
-  "label": "Prefix"
- }, 
- {
-  "description": "This is the number of the last created transaction with this prefix", 
-  "doctype": "DocField", 
-  "fieldname": "current_value", 
-  "fieldtype": "Int", 
-  "label": "Current Value"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "update_series_start", 
-  "fieldtype": "Button", 
-  "label": "Update Series Number", 
-  "options": "update_series_start"
- }, 
- {
-  "doctype": "DocPerm"
- }
-]
\ No newline at end of file
+{
+ "creation": "2013-01-25 11:35:08", 
+ "description": "Set prefix for numbering series on your transactions", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "fields": [
+  {
+   "description": "Set prefix for numbering series on your transactions", 
+   "fieldname": "setup_series", 
+   "fieldtype": "Section Break", 
+   "label": "Setup Series", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "select_doc_for_series", 
+   "fieldtype": "Select", 
+   "label": "Select Transaction", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "help_html", 
+   "fieldtype": "HTML", 
+   "label": "Help HTML", 
+   "options": "<div class=\"well\">\nEdit list of Series in the box below. Rules:\n<ul>\n<li>Each Series Prefix on a new line.</li>\n<li>Allowed special characters are \"/\" and \"-\"</li>\n<li>Optionally, set the number of digits in the series using dot (.) followed by hashes (#). For example, \".####\" means that the series will have four digits. Default is five digits.</li>\n</ul>\nExamples:<br>\nINV-<br>\nINV-10-<br>\nINVK-<br>\nINV-.####<br>\n</div>", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "set_options", 
+   "fieldtype": "Text", 
+   "label": "Series List for this Transaction", 
+   "permlevel": 0
+  }, 
+  {
+   "description": "Check this if you want to force the user to select a series before saving. There will be no default if you check this.", 
+   "fieldname": "user_must_always_select", 
+   "fieldtype": "Check", 
+   "label": "User must always select", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "update", 
+   "fieldtype": "Button", 
+   "label": "Update", 
+   "permlevel": 0
+  }, 
+  {
+   "description": "Change the starting / current sequence number of an existing series.", 
+   "fieldname": "update_series", 
+   "fieldtype": "Section Break", 
+   "label": "Update Series", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "prefix", 
+   "fieldtype": "Select", 
+   "label": "Prefix", 
+   "permlevel": 0
+  }, 
+  {
+   "description": "This is the number of the last created transaction with this prefix", 
+   "fieldname": "current_value", 
+   "fieldtype": "Int", 
+   "label": "Current Value", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "update_series_start", 
+   "fieldtype": "Button", 
+   "label": "Update Series Number", 
+   "options": "update_series_start", 
+   "permlevel": 0
+  }
+ ], 
+ "hide_heading": 0, 
+ "hide_toolbar": 1, 
+ "icon": "icon-sort-by-order", 
+ "idx": 1, 
+ "issingle": 1, 
+ "modified": "2013-12-20 19:23:21", 
+ "modified_by": "Administrator", 
+ "module": "Setup", 
+ "name": "Naming Series", 
+ "owner": "Administrator", 
+ "permissions": [
+  {
+   "create": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 0, 
+   "role": "System Manager", 
+   "submit": 0, 
+   "write": 1
+  }
+ ], 
+ "read_only": 1
+}
\ No newline at end of file
diff --git a/erpnext/setup/doctype/notification_control/notification_control.txt b/erpnext/setup/doctype/notification_control/notification_control.txt
index 81e08a5..628db77 100644
--- a/erpnext/setup/doctype/notification_control/notification_control.txt
+++ b/erpnext/setup/doctype/notification_control/notification_control.txt
@@ -1,218 +1,200 @@
-[
- {
-  "creation": "2012-07-12 23:29:45", 
-  "docstatus": 0, 
-  "modified": "2013-07-10 19:24:07", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "allow_copy": 1, 
-  "allow_email": 1, 
-  "allow_print": 1, 
-  "description": "Send automatic emails to Contacts on Submitting transactions.", 
-  "doctype": "DocType", 
-  "icon": "icon-envelope", 
-  "issingle": 1, 
-  "module": "Setup", 
-  "name": "__common__"
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "Notification Control", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "doctype": "DocPerm", 
-  "name": "__common__", 
-  "parent": "Notification Control", 
-  "parentfield": "permissions", 
-  "parenttype": "DocType", 
-  "permlevel": 0, 
-  "read": 1
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Notification Control"
- }, 
- {
-  "description": "When any of the checked transactions are \"Submitted\", an email pop-up automatically opened to send an email to the associated \"Contact\" in that transaction, with the transaction as an attachment. The user may or may not send the email.", 
-  "doctype": "DocField", 
-  "fieldname": "send_autonotification_for", 
-  "fieldtype": "Section Break", 
-  "in_list_view": 0, 
-  "label": "Prompt for Email on Submission of"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "sales", 
-  "fieldtype": "Column Break", 
-  "in_list_view": 0, 
-  "label": "Sales", 
-  "print_width": "50%", 
-  "width": "50%"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "quotation", 
-  "fieldtype": "Check", 
-  "in_list_view": 1, 
-  "label": "Quotation"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "sales_order", 
-  "fieldtype": "Check", 
-  "in_list_view": 1, 
-  "label": "Sales Order"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "delivery_note", 
-  "fieldtype": "Check", 
-  "in_list_view": 1, 
-  "label": "Delivery Note"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "sales_invoice", 
-  "fieldtype": "Check", 
-  "in_list_view": 1, 
-  "label": "Sales Invoice"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "purchase", 
-  "fieldtype": "Column Break", 
-  "in_list_view": 0, 
-  "label": "Purchase", 
-  "print_width": "50%", 
-  "width": "50%"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "purchase_order", 
-  "fieldtype": "Check", 
-  "in_list_view": 1, 
-  "label": "Purchase Order"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "purchase_receipt", 
-  "fieldtype": "Check", 
-  "in_list_view": 1, 
-  "label": "Purchase Receipt"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "expense_claim", 
-  "fieldtype": "Check", 
-  "label": "Expense Claim"
- }, 
- {
-  "description": "Customize the introductory text that goes as a part of that email. Each transaction has a separate introductory text.", 
-  "doctype": "DocField", 
-  "fieldname": "customize_the_notification", 
-  "fieldtype": "Section Break", 
-  "label": "Customize the Notification"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "select_transaction", 
-  "fieldtype": "Select", 
-  "label": "Select Transaction", 
-  "options": "\nQuotation\nSales Order\nDelivery Note\nSales Invoice\nPurchase Order\nPurchase Receipt\nExpense Claim\nExpense Claim Approved\nExpense Claim Rejected"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "custom_message", 
-  "fieldtype": "Text Editor", 
-  "label": "Custom Message"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "update", 
-  "fieldtype": "Button", 
-  "label": "Update", 
-  "options": "set_message"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "quotation_message", 
-  "fieldtype": "Text", 
-  "hidden": 1, 
-  "label": "Quotation Message", 
-  "print_hide": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "sales_order_message", 
-  "fieldtype": "Text", 
-  "hidden": 1, 
-  "label": "Sales Order Message", 
-  "print_hide": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "delivery_note_message", 
-  "fieldtype": "Text", 
-  "hidden": 1, 
-  "label": "Delivery Note Message", 
-  "print_hide": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "sales_invoice_message", 
-  "fieldtype": "Text", 
-  "hidden": 1, 
-  "label": "Sales Invoice Message", 
-  "print_hide": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "purchase_order_message", 
-  "fieldtype": "Text", 
-  "hidden": 1, 
-  "label": "Purchase Order Message", 
-  "print_hide": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "purchase_receipt_message", 
-  "fieldtype": "Text", 
-  "hidden": 1, 
-  "label": "Purchase Receipt Message", 
-  "print_hide": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "expense_claim_approved_message", 
-  "fieldtype": "Text", 
-  "hidden": 1, 
-  "label": "Expense Claim Approved Message", 
-  "print_hide": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "expense_claim_rejected_message", 
-  "fieldtype": "Text", 
-  "hidden": 1, 
-  "label": "Expense Claim Rejected Message", 
-  "print_hide": 1
- }, 
- {
-  "create": 0, 
-  "doctype": "DocPerm", 
-  "role": "Guest", 
-  "write": 0
- }, 
- {
-  "create": 1, 
-  "doctype": "DocPerm", 
-  "role": "System Manager", 
-  "write": 1
- }
-]
\ No newline at end of file
+{
+ "allow_copy": 1, 
+ "allow_email": 1, 
+ "allow_print": 1, 
+ "creation": "2012-07-12 23:29:45", 
+ "description": "Send automatic emails to Contacts on Submitting transactions.", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "fields": [
+  {
+   "description": "When any of the checked transactions are \"Submitted\", an email pop-up automatically opened to send an email to the associated \"Contact\" in that transaction, with the transaction as an attachment. The user may or may not send the email.", 
+   "fieldname": "send_autonotification_for", 
+   "fieldtype": "Section Break", 
+   "in_list_view": 0, 
+   "label": "Prompt for Email on Submission of", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "sales", 
+   "fieldtype": "Column Break", 
+   "in_list_view": 0, 
+   "label": "Sales", 
+   "permlevel": 0, 
+   "print_width": "50%", 
+   "width": "50%"
+  }, 
+  {
+   "fieldname": "quotation", 
+   "fieldtype": "Check", 
+   "in_list_view": 1, 
+   "label": "Quotation", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "sales_order", 
+   "fieldtype": "Check", 
+   "in_list_view": 1, 
+   "label": "Sales Order", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "delivery_note", 
+   "fieldtype": "Check", 
+   "in_list_view": 1, 
+   "label": "Delivery Note", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "sales_invoice", 
+   "fieldtype": "Check", 
+   "in_list_view": 1, 
+   "label": "Sales Invoice", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "purchase", 
+   "fieldtype": "Column Break", 
+   "in_list_view": 0, 
+   "label": "Purchase", 
+   "permlevel": 0, 
+   "print_width": "50%", 
+   "width": "50%"
+  }, 
+  {
+   "fieldname": "purchase_order", 
+   "fieldtype": "Check", 
+   "in_list_view": 1, 
+   "label": "Purchase Order", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "purchase_receipt", 
+   "fieldtype": "Check", 
+   "in_list_view": 1, 
+   "label": "Purchase Receipt", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "expense_claim", 
+   "fieldtype": "Check", 
+   "label": "Expense Claim", 
+   "permlevel": 0
+  }, 
+  {
+   "description": "Customize the introductory text that goes as a part of that email. Each transaction has a separate introductory text.", 
+   "fieldname": "customize_the_notification", 
+   "fieldtype": "Section Break", 
+   "label": "Customize the Notification", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "select_transaction", 
+   "fieldtype": "Select", 
+   "label": "Select Transaction", 
+   "options": "\nQuotation\nSales Order\nDelivery Note\nSales Invoice\nPurchase Order\nPurchase Receipt\nExpense Claim\nExpense Claim Approved\nExpense Claim Rejected", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "custom_message", 
+   "fieldtype": "Text Editor", 
+   "label": "Custom Message", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "update", 
+   "fieldtype": "Button", 
+   "label": "Update", 
+   "options": "set_message", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "quotation_message", 
+   "fieldtype": "Text", 
+   "hidden": 1, 
+   "label": "Quotation Message", 
+   "permlevel": 0, 
+   "print_hide": 1
+  }, 
+  {
+   "fieldname": "sales_order_message", 
+   "fieldtype": "Text", 
+   "hidden": 1, 
+   "label": "Sales Order Message", 
+   "permlevel": 0, 
+   "print_hide": 1
+  }, 
+  {
+   "fieldname": "delivery_note_message", 
+   "fieldtype": "Text", 
+   "hidden": 1, 
+   "label": "Delivery Note Message", 
+   "permlevel": 0, 
+   "print_hide": 1
+  }, 
+  {
+   "fieldname": "sales_invoice_message", 
+   "fieldtype": "Text", 
+   "hidden": 1, 
+   "label": "Sales Invoice Message", 
+   "permlevel": 0, 
+   "print_hide": 1
+  }, 
+  {
+   "fieldname": "purchase_order_message", 
+   "fieldtype": "Text", 
+   "hidden": 1, 
+   "label": "Purchase Order Message", 
+   "permlevel": 0, 
+   "print_hide": 1
+  }, 
+  {
+   "fieldname": "purchase_receipt_message", 
+   "fieldtype": "Text", 
+   "hidden": 1, 
+   "label": "Purchase Receipt Message", 
+   "permlevel": 0, 
+   "print_hide": 1
+  }, 
+  {
+   "fieldname": "expense_claim_approved_message", 
+   "fieldtype": "Text", 
+   "hidden": 1, 
+   "label": "Expense Claim Approved Message", 
+   "permlevel": 0, 
+   "print_hide": 1
+  }, 
+  {
+   "fieldname": "expense_claim_rejected_message", 
+   "fieldtype": "Text", 
+   "hidden": 1, 
+   "label": "Expense Claim Rejected Message", 
+   "permlevel": 0, 
+   "print_hide": 1
+  }
+ ], 
+ "icon": "icon-envelope", 
+ "idx": 1, 
+ "issingle": 1, 
+ "modified": "2013-07-10 19:24:07", 
+ "modified_by": "Administrator", 
+ "module": "Setup", 
+ "name": "Notification Control", 
+ "owner": "Administrator", 
+ "permissions": [
+  {
+   "create": 0, 
+   "permlevel": 0, 
+   "read": 1, 
+   "role": "Guest", 
+   "write": 0
+  }, 
+  {
+   "create": 1, 
+   "permlevel": 0, 
+   "read": 1, 
+   "role": "System Manager", 
+   "write": 1
+  }
+ ]
+}
\ No newline at end of file
diff --git a/erpnext/setup/doctype/print_heading/print_heading.txt b/erpnext/setup/doctype/print_heading/print_heading.txt
index d566f8d..9724f62 100644
--- a/erpnext/setup/doctype/print_heading/print_heading.txt
+++ b/erpnext/setup/doctype/print_heading/print_heading.txt
@@ -1,80 +1,61 @@
-[
- {
-  "creation": "2013-01-10 16:34:24", 
-  "docstatus": 0, 
-  "modified": "2014-01-20 17:49:01", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "allow_import": 1, 
-  "autoname": "field:print_heading", 
-  "doctype": "DocType", 
-  "document_type": "Master", 
-  "icon": "icon-font", 
-  "module": "Setup", 
-  "name": "__common__", 
-  "search_fields": "print_heading"
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "Print Heading", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "cancel": 0, 
-  "create": 1, 
-  "delete": 1, 
-  "doctype": "DocPerm", 
-  "email": 1, 
-  "name": "__common__", 
-  "parent": "Print Heading", 
-  "parentfield": "permissions", 
-  "parenttype": "DocType", 
-  "permlevel": 0, 
-  "print": 1, 
-  "read": 1, 
-  "report": 1, 
-  "role": "All", 
-  "submit": 0, 
-  "write": 1
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Print Heading"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "trash_reason", 
-  "fieldtype": "Small Text", 
-  "label": "Trash Reason", 
-  "oldfieldname": "trash_reason", 
-  "oldfieldtype": "Small Text", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "print_heading", 
-  "fieldtype": "Data", 
-  "in_filter": 1, 
-  "label": "Print Heading", 
-  "oldfieldname": "print_heading", 
-  "oldfieldtype": "Data", 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "description", 
-  "fieldtype": "Small Text", 
-  "label": "Description", 
-  "oldfieldname": "description", 
-  "oldfieldtype": "Small Text", 
-  "width": "300px"
- }, 
- {
-  "doctype": "DocPerm"
- }
-]
\ No newline at end of file
+{
+ "allow_import": 1, 
+ "autoname": "field:print_heading", 
+ "creation": "2013-01-10 16:34:24", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "document_type": "Master", 
+ "fields": [
+  {
+   "fieldname": "trash_reason", 
+   "fieldtype": "Small Text", 
+   "label": "Trash Reason", 
+   "oldfieldname": "trash_reason", 
+   "oldfieldtype": "Small Text", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "print_heading", 
+   "fieldtype": "Data", 
+   "in_filter": 1, 
+   "label": "Print Heading", 
+   "oldfieldname": "print_heading", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "description", 
+   "fieldtype": "Small Text", 
+   "label": "Description", 
+   "oldfieldname": "description", 
+   "oldfieldtype": "Small Text", 
+   "permlevel": 0, 
+   "width": "300px"
+  }
+ ], 
+ "icon": "icon-font", 
+ "idx": 1, 
+ "modified": "2014-01-20 17:49:01", 
+ "modified_by": "Administrator", 
+ "module": "Setup", 
+ "name": "Print Heading", 
+ "owner": "Administrator", 
+ "permissions": [
+  {
+   "cancel": 0, 
+   "create": 1, 
+   "delete": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "All", 
+   "submit": 0, 
+   "write": 1
+  }
+ ], 
+ "search_fields": "print_heading"
+}
\ No newline at end of file
diff --git a/erpnext/setup/doctype/quotation_lost_reason/quotation_lost_reason.txt b/erpnext/setup/doctype/quotation_lost_reason/quotation_lost_reason.txt
index 00e9c6e..b27d349 100644
--- a/erpnext/setup/doctype/quotation_lost_reason/quotation_lost_reason.txt
+++ b/erpnext/setup/doctype/quotation_lost_reason/quotation_lost_reason.txt
@@ -1,70 +1,51 @@
-[
- {
-  "creation": "2013-01-10 16:34:24", 
-  "docstatus": 0, 
-  "modified": "2014-01-20 17:49:17", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "allow_import": 1, 
-  "autoname": "field:order_lost_reason", 
-  "doctype": "DocType", 
-  "document_type": "Master", 
-  "icon": "icon-flag", 
-  "module": "Setup", 
-  "name": "__common__"
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "Quotation Lost Reason", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "amend": 0, 
-  "cancel": 0, 
-  "create": 1, 
-  "delete": 1, 
-  "doctype": "DocPerm", 
-  "email": 1, 
-  "name": "__common__", 
-  "parent": "Quotation Lost Reason", 
-  "parentfield": "permissions", 
-  "parenttype": "DocType", 
-  "permlevel": 0, 
-  "print": 1, 
-  "read": 1, 
-  "report": 1, 
-  "role": "Sales Master Manager", 
-  "submit": 0, 
-  "write": 1
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Quotation Lost Reason"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "trash_reason", 
-  "fieldtype": "Small Text", 
-  "label": "Trash Reason", 
-  "oldfieldname": "trash_reason", 
-  "oldfieldtype": "Small Text", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "order_lost_reason", 
-  "fieldtype": "Data", 
-  "label": "Quotation Lost Reason", 
-  "oldfieldname": "order_lost_reason", 
-  "oldfieldtype": "Data", 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocPerm"
- }
-]
\ No newline at end of file
+{
+ "allow_import": 1, 
+ "autoname": "field:order_lost_reason", 
+ "creation": "2013-01-10 16:34:24", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "document_type": "Master", 
+ "fields": [
+  {
+   "fieldname": "trash_reason", 
+   "fieldtype": "Small Text", 
+   "label": "Trash Reason", 
+   "oldfieldname": "trash_reason", 
+   "oldfieldtype": "Small Text", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "order_lost_reason", 
+   "fieldtype": "Data", 
+   "label": "Quotation Lost Reason", 
+   "oldfieldname": "order_lost_reason", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "reqd": 1
+  }
+ ], 
+ "icon": "icon-flag", 
+ "idx": 1, 
+ "modified": "2014-01-20 17:49:17", 
+ "modified_by": "Administrator", 
+ "module": "Setup", 
+ "name": "Quotation Lost Reason", 
+ "owner": "Administrator", 
+ "permissions": [
+  {
+   "amend": 0, 
+   "cancel": 0, 
+   "create": 1, 
+   "delete": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Sales Master Manager", 
+   "submit": 0, 
+   "write": 1
+  }
+ ]
+}
\ No newline at end of file
diff --git a/erpnext/setup/doctype/sales_email_settings/sales_email_settings.txt b/erpnext/setup/doctype/sales_email_settings/sales_email_settings.txt
index f5f8a97..4e0891e 100644
--- a/erpnext/setup/doctype/sales_email_settings/sales_email_settings.txt
+++ b/erpnext/setup/doctype/sales_email_settings/sales_email_settings.txt
@@ -1,92 +1,73 @@
-[
- {
-  "creation": "2013-01-16 10:25:26", 
-  "docstatus": 0, 
-  "modified": "2013-12-20 19:21:38", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "description": "Email settings to extract Leads from sales email id e.g. \"sales@example.com\"", 
-  "doctype": "DocType", 
-  "icon": "icon-cog", 
-  "issingle": 1, 
-  "module": "Setup", 
-  "name": "__common__"
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "Sales Email Settings", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "create": 1, 
-  "doctype": "DocPerm", 
-  "email": 1, 
-  "name": "__common__", 
-  "parent": "Sales Email Settings", 
-  "parentfield": "permissions", 
-  "parenttype": "DocType", 
-  "permlevel": 0, 
-  "print": 1, 
-  "read": 1, 
-  "role": "System Manager", 
-  "write": 1
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Sales Email Settings"
- }, 
- {
-  "description": "Email settings to extract Leads from sales email id e.g. \"sales@example.com\"", 
-  "doctype": "DocField", 
-  "fieldname": "pop3_mail_settings", 
-  "fieldtype": "Section Break", 
-  "label": "POP3 Mail Settings"
- }, 
- {
-  "description": "Check to activate", 
-  "doctype": "DocField", 
-  "fieldname": "extract_emails", 
-  "fieldtype": "Check", 
-  "label": "Extract Emails"
- }, 
- {
-  "description": "Email Id where a job applicant will email e.g. \"jobs@example.com\"", 
-  "doctype": "DocField", 
-  "fieldname": "email_id", 
-  "fieldtype": "Data", 
-  "label": "Email Id"
- }, 
- {
-  "description": "POP3 server e.g. (pop.gmail.com)", 
-  "doctype": "DocField", 
-  "fieldname": "host", 
-  "fieldtype": "Data", 
-  "label": "Host"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "use_ssl", 
-  "fieldtype": "Check", 
-  "label": "Use SSL"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "username", 
-  "fieldtype": "Data", 
-  "label": "Username"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "password", 
-  "fieldtype": "Password", 
-  "label": "Password"
- }, 
- {
-  "doctype": "DocPerm"
- }
-]
\ No newline at end of file
+{
+ "creation": "2013-01-16 10:25:26", 
+ "description": "Email settings to extract Leads from sales email id e.g. \"sales@example.com\"", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "fields": [
+  {
+   "description": "Email settings to extract Leads from sales email id e.g. \"sales@example.com\"", 
+   "fieldname": "pop3_mail_settings", 
+   "fieldtype": "Section Break", 
+   "label": "POP3 Mail Settings", 
+   "permlevel": 0
+  }, 
+  {
+   "description": "Check to activate", 
+   "fieldname": "extract_emails", 
+   "fieldtype": "Check", 
+   "label": "Extract Emails", 
+   "permlevel": 0
+  }, 
+  {
+   "description": "Email Id where a job applicant will email e.g. \"jobs@example.com\"", 
+   "fieldname": "email_id", 
+   "fieldtype": "Data", 
+   "label": "Email Id", 
+   "permlevel": 0
+  }, 
+  {
+   "description": "POP3 server e.g. (pop.gmail.com)", 
+   "fieldname": "host", 
+   "fieldtype": "Data", 
+   "label": "Host", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "use_ssl", 
+   "fieldtype": "Check", 
+   "label": "Use SSL", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "username", 
+   "fieldtype": "Data", 
+   "label": "Username", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "password", 
+   "fieldtype": "Password", 
+   "label": "Password", 
+   "permlevel": 0
+  }
+ ], 
+ "icon": "icon-cog", 
+ "idx": 1, 
+ "issingle": 1, 
+ "modified": "2013-12-20 19:21:38", 
+ "modified_by": "Administrator", 
+ "module": "Setup", 
+ "name": "Sales Email Settings", 
+ "owner": "Administrator", 
+ "permissions": [
+  {
+   "create": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "role": "System Manager", 
+   "write": 1
+  }
+ ]
+}
\ No newline at end of file
diff --git a/erpnext/setup/doctype/sales_partner/sales_partner.txt b/erpnext/setup/doctype/sales_partner/sales_partner.txt
index 25ae9a0..4563fe5 100644
--- a/erpnext/setup/doctype/sales_partner/sales_partner.txt
+++ b/erpnext/setup/doctype/sales_partner/sales_partner.txt
@@ -1,250 +1,247 @@
-[
- {
-  "creation": "2013-04-12 15:34:06", 
-  "docstatus": 0, 
-  "modified": "2014-02-20 18:30:32", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "allow_import": 1, 
-  "autoname": "field:partner_name", 
-  "description": "A third party distributor / dealer / commission agent / affiliate / reseller who sells the companies products for a commission.", 
-  "doctype": "DocType", 
-  "document_type": "Master", 
-  "icon": "icon-user", 
-  "in_create": 0, 
-  "module": "Setup", 
-  "name": "__common__", 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "Sales Partner", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "amend": 0, 
-  "cancel": 0, 
-  "delete": 0, 
-  "doctype": "DocPerm", 
-  "email": 1, 
-  "name": "__common__", 
-  "parent": "Sales Partner", 
-  "parentfield": "permissions", 
-  "parenttype": "DocType", 
-  "permlevel": 0, 
-  "print": 1, 
-  "read": 1, 
-  "report": 1, 
-  "submit": 0
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Sales Partner"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "partner_name", 
-  "fieldtype": "Data", 
-  "in_filter": 1, 
-  "label": "Sales Partner Name", 
-  "oldfieldname": "partner_name", 
-  "oldfieldtype": "Data", 
-  "reqd": 1, 
-  "search_index": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "partner_type", 
-  "fieldtype": "Select", 
-  "in_filter": 1, 
-  "label": "Partner Type", 
-  "oldfieldname": "partner_type", 
-  "oldfieldtype": "Select", 
-  "options": "\nChannel Partner\nDistributor\nDealer\nAgent\nRetailer\nImplementation Partner\nReseller", 
-  "search_index": 0
- }, 
- {
-  "description": "<a href=\"#Sales Browser/Territory\">Add / Edit</a>", 
-  "doctype": "DocField", 
-  "fieldname": "territory", 
-  "fieldtype": "Link", 
-  "label": "Territory", 
-  "options": "Territory", 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break0", 
-  "fieldtype": "Column Break", 
-  "oldfieldtype": "Column Break", 
-  "width": "50%"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "commission_rate", 
-  "fieldtype": "Float", 
-  "label": "Commission Rate", 
-  "oldfieldname": "commission_rate", 
-  "oldfieldtype": "Currency", 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "address_contacts", 
-  "fieldtype": "Section Break", 
-  "label": "Address & Contacts"
- }, 
- {
-  "depends_on": "eval:doc.__islocal", 
-  "doctype": "DocField", 
-  "fieldname": "address_desc", 
-  "fieldtype": "HTML", 
-  "label": "Address Desc", 
-  "options": "<em>Addresses will appear only when you save the customer</em>"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "address_html", 
-  "fieldtype": "HTML", 
-  "label": "Address HTML", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break1", 
-  "fieldtype": "Column Break"
- }, 
- {
-  "depends_on": "eval:doc.__islocal", 
-  "doctype": "DocField", 
-  "fieldname": "contact_desc", 
-  "fieldtype": "HTML", 
-  "label": "Contact Desc", 
-  "options": "<em>Contact Details will appear only when you save the customer</em>"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "contact_html", 
-  "fieldtype": "HTML", 
-  "label": "Contact HTML", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "partner_target_details_section_break", 
-  "fieldtype": "Section Break", 
-  "label": "Sales Partner Target", 
-  "oldfieldtype": "Section Break"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "partner_target_details", 
-  "fieldtype": "Table", 
-  "label": "Partner Target Detail", 
-  "oldfieldname": "partner_target_details", 
-  "oldfieldtype": "Table", 
-  "options": "Target Detail", 
-  "reqd": 0
- }, 
- {
-  "description": "Select Budget Distribution to unevenly distribute targets across months.", 
-  "doctype": "DocField", 
-  "fieldname": "distribution_id", 
-  "fieldtype": "Link", 
-  "label": "Target Distribution", 
-  "oldfieldname": "distribution_id", 
-  "oldfieldtype": "Link", 
-  "options": "Budget Distribution"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "website", 
-  "fieldtype": "Section Break", 
-  "label": "Website"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "show_in_website", 
-  "fieldtype": "Check", 
-  "label": "Show In Website"
- }, 
- {
-  "depends_on": "eval:cint(doc.show_in_website)", 
-  "doctype": "DocField", 
-  "fieldname": "section_break_17", 
-  "fieldtype": "Section Break"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "logo", 
-  "fieldtype": "Select", 
-  "label": "Logo", 
-  "options": "attach_files:"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "partner_website", 
-  "fieldtype": "Data", 
-  "label": "Partner's Website"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break_20", 
-  "fieldtype": "Column Break"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "page_name", 
-  "fieldtype": "Data", 
-  "label": "Page Name", 
-  "read_only": 1
- }, 
- {
-  "depends_on": "eval:cint(doc.show_in_website)", 
-  "doctype": "DocField", 
-  "fieldname": "section_break_22", 
-  "fieldtype": "Section Break"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "introduction", 
-  "fieldtype": "Text", 
-  "label": "Introduction"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "description", 
-  "fieldtype": "Text Editor", 
-  "label": "Description"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "parent_website_route", 
-  "fieldtype": "Link", 
-  "label": "Parent Website Route", 
-  "options": "Website Route"
- }, 
- {
-  "create": 0, 
-  "doctype": "DocPerm", 
-  "role": "Sales Manager", 
-  "write": 0
- }, 
- {
-  "create": 0, 
-  "doctype": "DocPerm", 
-  "role": "Sales User", 
-  "write": 0
- }, 
- {
-  "create": 1, 
-  "doctype": "DocPerm", 
-  "role": "Sales Master Manager", 
-  "write": 1
- }
-]
\ No newline at end of file
+{
+ "allow_import": 1, 
+ "autoname": "field:partner_name", 
+ "creation": "2013-04-12 15:34:06", 
+ "description": "A third party distributor / dealer / commission agent / affiliate / reseller who sells the companies products for a commission.", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "document_type": "Master", 
+ "fields": [
+  {
+   "fieldname": "partner_name", 
+   "fieldtype": "Data", 
+   "in_filter": 1, 
+   "label": "Sales Partner Name", 
+   "oldfieldname": "partner_name", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "reqd": 1, 
+   "search_index": 1
+  }, 
+  {
+   "fieldname": "partner_type", 
+   "fieldtype": "Select", 
+   "in_filter": 1, 
+   "label": "Partner Type", 
+   "oldfieldname": "partner_type", 
+   "oldfieldtype": "Select", 
+   "options": "\nChannel Partner\nDistributor\nDealer\nAgent\nRetailer\nImplementation Partner\nReseller", 
+   "permlevel": 0, 
+   "search_index": 0
+  }, 
+  {
+   "description": "<a href=\"#Sales Browser/Territory\">Add / Edit</a>", 
+   "fieldname": "territory", 
+   "fieldtype": "Link", 
+   "label": "Territory", 
+   "options": "Territory", 
+   "permlevel": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "column_break0", 
+   "fieldtype": "Column Break", 
+   "oldfieldtype": "Column Break", 
+   "permlevel": 0, 
+   "width": "50%"
+  }, 
+  {
+   "fieldname": "commission_rate", 
+   "fieldtype": "Float", 
+   "label": "Commission Rate", 
+   "oldfieldname": "commission_rate", 
+   "oldfieldtype": "Currency", 
+   "permlevel": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "address_contacts", 
+   "fieldtype": "Section Break", 
+   "label": "Address & Contacts", 
+   "permlevel": 0
+  }, 
+  {
+   "depends_on": "eval:doc.__islocal", 
+   "fieldname": "address_desc", 
+   "fieldtype": "HTML", 
+   "label": "Address Desc", 
+   "options": "<em>Addresses will appear only when you save the customer</em>", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "address_html", 
+   "fieldtype": "HTML", 
+   "label": "Address HTML", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "column_break1", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0
+  }, 
+  {
+   "depends_on": "eval:doc.__islocal", 
+   "fieldname": "contact_desc", 
+   "fieldtype": "HTML", 
+   "label": "Contact Desc", 
+   "options": "<em>Contact Details will appear only when you save the customer</em>", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "contact_html", 
+   "fieldtype": "HTML", 
+   "label": "Contact HTML", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "partner_target_details_section_break", 
+   "fieldtype": "Section Break", 
+   "label": "Sales Partner Target", 
+   "oldfieldtype": "Section Break", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "partner_target_details", 
+   "fieldtype": "Table", 
+   "label": "Partner Target Detail", 
+   "oldfieldname": "partner_target_details", 
+   "oldfieldtype": "Table", 
+   "options": "Target Detail", 
+   "permlevel": 0, 
+   "reqd": 0
+  }, 
+  {
+   "description": "Select Budget Distribution to unevenly distribute targets across months.", 
+   "fieldname": "distribution_id", 
+   "fieldtype": "Link", 
+   "label": "Target Distribution", 
+   "oldfieldname": "distribution_id", 
+   "oldfieldtype": "Link", 
+   "options": "Budget Distribution", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "website", 
+   "fieldtype": "Section Break", 
+   "label": "Website", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "show_in_website", 
+   "fieldtype": "Check", 
+   "label": "Show In Website", 
+   "permlevel": 0
+  }, 
+  {
+   "depends_on": "eval:cint(doc.show_in_website)", 
+   "fieldname": "section_break_17", 
+   "fieldtype": "Section Break", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "logo", 
+   "fieldtype": "Select", 
+   "label": "Logo", 
+   "options": "attach_files:", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "partner_website", 
+   "fieldtype": "Data", 
+   "label": "Partner's Website", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "column_break_20", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "page_name", 
+   "fieldtype": "Data", 
+   "label": "Page Name", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "depends_on": "eval:cint(doc.show_in_website)", 
+   "fieldname": "section_break_22", 
+   "fieldtype": "Section Break", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "introduction", 
+   "fieldtype": "Text", 
+   "label": "Introduction", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "description", 
+   "fieldtype": "Text Editor", 
+   "label": "Description", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "parent_website_route", 
+   "fieldtype": "Link", 
+   "label": "Parent Website Route", 
+   "options": "Website Route", 
+   "permlevel": 0
+  }
+ ], 
+ "icon": "icon-user", 
+ "idx": 1, 
+ "in_create": 0, 
+ "modified": "2014-02-20 18:30:32", 
+ "modified_by": "Administrator", 
+ "module": "Setup", 
+ "name": "Sales Partner", 
+ "owner": "Administrator", 
+ "permissions": [
+  {
+   "amend": 0, 
+   "cancel": 0, 
+   "create": 0, 
+   "delete": 0, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Sales Manager", 
+   "submit": 0, 
+   "write": 0
+  }, 
+  {
+   "amend": 0, 
+   "cancel": 0, 
+   "create": 0, 
+   "delete": 0, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Sales User", 
+   "submit": 0, 
+   "write": 0
+  }, 
+  {
+   "amend": 0, 
+   "cancel": 0, 
+   "create": 1, 
+   "delete": 0, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Sales Master Manager", 
+   "submit": 0, 
+   "write": 1
+  }
+ ], 
+ "read_only": 0
+}
\ No newline at end of file
diff --git a/erpnext/setup/doctype/sales_person/sales_person.txt b/erpnext/setup/doctype/sales_person/sales_person.txt
index 724dc4c..e321390 100644
--- a/erpnext/setup/doctype/sales_person/sales_person.txt
+++ b/erpnext/setup/doctype/sales_person/sales_person.txt
@@ -1,198 +1,193 @@
-[
- {
-  "creation": "2013-01-10 16:34:24", 
-  "docstatus": 0, 
-  "modified": "2014-01-20 17:49:25", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "allow_import": 1, 
-  "allow_rename": 1, 
-  "autoname": "field:sales_person_name", 
-  "description": "All Sales Transactions can be tagged against multiple **Sales Persons** so that you can set and monitor targets.", 
-  "doctype": "DocType", 
-  "document_type": "Master", 
-  "icon": "icon-user", 
-  "in_create": 1, 
-  "module": "Setup", 
-  "name": "__common__", 
-  "search_fields": "name,parent_sales_person"
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "Sales Person", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "amend": 0, 
-  "cancel": 0, 
-  "doctype": "DocPerm", 
-  "email": 1, 
-  "name": "__common__", 
-  "parent": "Sales Person", 
-  "parentfield": "permissions", 
-  "parenttype": "DocType", 
-  "permlevel": 0, 
-  "print": 1, 
-  "read": 1, 
-  "report": 1, 
-  "submit": 0
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Sales Person"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "name_and_employee_id", 
-  "fieldtype": "Section Break", 
-  "label": "Name and Employee ID", 
-  "options": "icon-user"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "sales_person_name", 
-  "fieldtype": "Data", 
-  "in_filter": 1, 
-  "label": "Sales Person Name", 
-  "oldfieldname": "sales_person_name", 
-  "oldfieldtype": "Data", 
-  "reqd": 1, 
-  "search_index": 0
- }, 
- {
-  "description": "Select company name first.", 
-  "doctype": "DocField", 
-  "fieldname": "parent_sales_person", 
-  "fieldtype": "Link", 
-  "ignore_restrictions": 1, 
-  "label": "Parent Sales Person", 
-  "oldfieldname": "parent_sales_person", 
-  "oldfieldtype": "Link", 
-  "options": "Sales Person", 
-  "reqd": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "is_group", 
-  "fieldtype": "Select", 
-  "label": "Has Child Node", 
-  "oldfieldname": "is_group", 
-  "oldfieldtype": "Select", 
-  "options": "\nYes\nNo", 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "cb0", 
-  "fieldtype": "Column Break"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "employee", 
-  "fieldtype": "Link", 
-  "label": "Employee", 
-  "options": "Employee", 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "lft", 
-  "fieldtype": "Int", 
-  "hidden": 1, 
-  "in_filter": 1, 
-  "label": "lft", 
-  "no_copy": 1, 
-  "oldfieldname": "lft", 
-  "oldfieldtype": "Int", 
-  "print_hide": 1, 
-  "search_index": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "rgt", 
-  "fieldtype": "Int", 
-  "hidden": 1, 
-  "in_filter": 1, 
-  "label": "rgt", 
-  "no_copy": 1, 
-  "oldfieldname": "rgt", 
-  "oldfieldtype": "Int", 
-  "print_hide": 1, 
-  "search_index": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "old_parent", 
-  "fieldtype": "Data", 
-  "hidden": 1, 
-  "label": "old_parent", 
-  "no_copy": 1, 
-  "oldfieldname": "old_parent", 
-  "oldfieldtype": "Data", 
-  "print_hide": 1
- }, 
- {
-  "description": "Set targets Item Group-wise for this Sales Person.", 
-  "doctype": "DocField", 
-  "fieldname": "target_details_section_break", 
-  "fieldtype": "Section Break", 
-  "label": "Sales Person Targets", 
-  "oldfieldtype": "Section Break", 
-  "options": "icon-bullseye"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "target_details", 
-  "fieldtype": "Table", 
-  "label": "Target Details1", 
-  "oldfieldname": "target_details", 
-  "oldfieldtype": "Table", 
-  "options": "Target Detail"
- }, 
- {
-  "description": "Select Budget Distribution to unevenly distribute targets across months.", 
-  "doctype": "DocField", 
-  "fieldname": "distribution_id", 
-  "fieldtype": "Link", 
-  "label": "Target Distribution", 
-  "oldfieldname": "distribution_id", 
-  "oldfieldtype": "Link", 
-  "options": "Budget Distribution", 
-  "search_index": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "communications", 
-  "fieldtype": "Table", 
-  "hidden": 1, 
-  "label": "Communications", 
-  "options": "Communication", 
-  "print_hide": 1
- }, 
- {
-  "create": 0, 
-  "delete": 0, 
-  "doctype": "DocPerm", 
-  "role": "Sales Manager", 
-  "write": 0
- }, 
- {
-  "create": 0, 
-  "delete": 0, 
-  "doctype": "DocPerm", 
-  "role": "Sales User", 
-  "write": 0
- }, 
- {
-  "create": 1, 
-  "delete": 1, 
-  "doctype": "DocPerm", 
-  "role": "Sales Master Manager", 
-  "write": 1
- }
-]
\ No newline at end of file
+{
+ "allow_import": 1, 
+ "allow_rename": 1, 
+ "autoname": "field:sales_person_name", 
+ "creation": "2013-01-10 16:34:24", 
+ "description": "All Sales Transactions can be tagged against multiple **Sales Persons** so that you can set and monitor targets.", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "document_type": "Master", 
+ "fields": [
+  {
+   "fieldname": "name_and_employee_id", 
+   "fieldtype": "Section Break", 
+   "label": "Name and Employee ID", 
+   "options": "icon-user", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "sales_person_name", 
+   "fieldtype": "Data", 
+   "in_filter": 1, 
+   "label": "Sales Person Name", 
+   "oldfieldname": "sales_person_name", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "reqd": 1, 
+   "search_index": 0
+  }, 
+  {
+   "description": "Select company name first.", 
+   "fieldname": "parent_sales_person", 
+   "fieldtype": "Link", 
+   "ignore_restrictions": 1, 
+   "label": "Parent Sales Person", 
+   "oldfieldname": "parent_sales_person", 
+   "oldfieldtype": "Link", 
+   "options": "Sales Person", 
+   "permlevel": 0, 
+   "reqd": 0
+  }, 
+  {
+   "fieldname": "is_group", 
+   "fieldtype": "Select", 
+   "label": "Has Child Node", 
+   "oldfieldname": "is_group", 
+   "oldfieldtype": "Select", 
+   "options": "\nYes\nNo", 
+   "permlevel": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "cb0", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "employee", 
+   "fieldtype": "Link", 
+   "label": "Employee", 
+   "options": "Employee", 
+   "permlevel": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "lft", 
+   "fieldtype": "Int", 
+   "hidden": 1, 
+   "in_filter": 1, 
+   "label": "lft", 
+   "no_copy": 1, 
+   "oldfieldname": "lft", 
+   "oldfieldtype": "Int", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "search_index": 1
+  }, 
+  {
+   "fieldname": "rgt", 
+   "fieldtype": "Int", 
+   "hidden": 1, 
+   "in_filter": 1, 
+   "label": "rgt", 
+   "no_copy": 1, 
+   "oldfieldname": "rgt", 
+   "oldfieldtype": "Int", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "search_index": 1
+  }, 
+  {
+   "fieldname": "old_parent", 
+   "fieldtype": "Data", 
+   "hidden": 1, 
+   "label": "old_parent", 
+   "no_copy": 1, 
+   "oldfieldname": "old_parent", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "print_hide": 1
+  }, 
+  {
+   "description": "Set targets Item Group-wise for this Sales Person.", 
+   "fieldname": "target_details_section_break", 
+   "fieldtype": "Section Break", 
+   "label": "Sales Person Targets", 
+   "oldfieldtype": "Section Break", 
+   "options": "icon-bullseye", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "target_details", 
+   "fieldtype": "Table", 
+   "label": "Target Details1", 
+   "oldfieldname": "target_details", 
+   "oldfieldtype": "Table", 
+   "options": "Target Detail", 
+   "permlevel": 0
+  }, 
+  {
+   "description": "Select Budget Distribution to unevenly distribute targets across months.", 
+   "fieldname": "distribution_id", 
+   "fieldtype": "Link", 
+   "label": "Target Distribution", 
+   "oldfieldname": "distribution_id", 
+   "oldfieldtype": "Link", 
+   "options": "Budget Distribution", 
+   "permlevel": 0, 
+   "search_index": 0
+  }, 
+  {
+   "fieldname": "communications", 
+   "fieldtype": "Table", 
+   "hidden": 1, 
+   "label": "Communications", 
+   "options": "Communication", 
+   "permlevel": 0, 
+   "print_hide": 1
+  }
+ ], 
+ "icon": "icon-user", 
+ "idx": 1, 
+ "in_create": 1, 
+ "modified": "2014-01-20 17:49:25", 
+ "modified_by": "Administrator", 
+ "module": "Setup", 
+ "name": "Sales Person", 
+ "owner": "Administrator", 
+ "permissions": [
+  {
+   "amend": 0, 
+   "cancel": 0, 
+   "create": 0, 
+   "delete": 0, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Sales Manager", 
+   "submit": 0, 
+   "write": 0
+  }, 
+  {
+   "amend": 0, 
+   "cancel": 0, 
+   "create": 0, 
+   "delete": 0, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Sales User", 
+   "submit": 0, 
+   "write": 0
+  }, 
+  {
+   "amend": 0, 
+   "cancel": 0, 
+   "create": 1, 
+   "delete": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Sales Master Manager", 
+   "submit": 0, 
+   "write": 1
+  }
+ ], 
+ "search_fields": "name,parent_sales_person"
+}
\ No newline at end of file
diff --git a/erpnext/setup/doctype/sms_parameter/sms_parameter.txt b/erpnext/setup/doctype/sms_parameter/sms_parameter.txt
index c4ebb8f..5c08bc0 100755
--- a/erpnext/setup/doctype/sms_parameter/sms_parameter.txt
+++ b/erpnext/setup/doctype/sms_parameter/sms_parameter.txt
@@ -1,42 +1,34 @@
-[
- {
-  "creation": "2013-02-22 01:27:58", 
-  "docstatus": 0, 
-  "modified": "2013-12-20 19:21:47", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "doctype": "DocType", 
-  "istable": 1, 
-  "module": "Setup", 
-  "name": "__common__"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldtype": "Data", 
-  "in_list_view": 1, 
-  "name": "__common__", 
-  "parent": "SMS Parameter", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0, 
-  "print_width": "150px", 
-  "reqd": 1, 
-  "width": "150px"
- }, 
- {
-  "doctype": "DocType", 
-  "name": "SMS Parameter"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "parameter", 
-  "label": "Parameter"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "value", 
-  "label": "Value"
- }
-]
\ No newline at end of file
+{
+ "creation": "2013-02-22 01:27:58", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "fields": [
+  {
+   "fieldname": "parameter", 
+   "fieldtype": "Data", 
+   "in_list_view": 1, 
+   "label": "Parameter", 
+   "permlevel": 0, 
+   "print_width": "150px", 
+   "reqd": 1, 
+   "width": "150px"
+  }, 
+  {
+   "fieldname": "value", 
+   "fieldtype": "Data", 
+   "in_list_view": 1, 
+   "label": "Value", 
+   "permlevel": 0, 
+   "print_width": "150px", 
+   "reqd": 1, 
+   "width": "150px"
+  }
+ ], 
+ "idx": 1, 
+ "istable": 1, 
+ "modified": "2013-12-20 19:21:47", 
+ "modified_by": "Administrator", 
+ "module": "Setup", 
+ "name": "SMS Parameter", 
+ "owner": "Administrator"
+}
\ No newline at end of file
diff --git a/erpnext/setup/doctype/sms_settings/sms_settings.txt b/erpnext/setup/doctype/sms_settings/sms_settings.txt
index 20c0a62..f8e49fe 100755
--- a/erpnext/setup/doctype/sms_settings/sms_settings.txt
+++ b/erpnext/setup/doctype/sms_settings/sms_settings.txt
@@ -1,94 +1,75 @@
-[
- {
-  "creation": "2013-01-10 16:34:24", 
-  "docstatus": 0, 
-  "modified": "2013-09-10 17:20:25", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "allow_copy": 1, 
-  "allow_email": 1, 
-  "allow_print": 1, 
-  "doctype": "DocType", 
-  "icon": "icon-cog", 
-  "in_create": 0, 
-  "issingle": 1, 
-  "module": "Setup", 
-  "name": "__common__", 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "SMS Settings", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "create": 1, 
-  "doctype": "DocPerm", 
-  "name": "__common__", 
-  "parent": "SMS Settings", 
-  "parentfield": "permissions", 
-  "parenttype": "DocType", 
-  "permlevel": 0, 
-  "read": 1, 
-  "report": 0, 
-  "role": "System Manager", 
-  "submit": 0, 
-  "write": 1
- }, 
- {
-  "doctype": "DocType", 
-  "name": "SMS Settings"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break0", 
-  "fieldtype": "Column Break", 
-  "width": "50%"
- }, 
- {
-  "description": "Eg. smsgateway.com/api/send_sms.cgi", 
-  "doctype": "DocField", 
-  "fieldname": "sms_gateway_url", 
-  "fieldtype": "Data", 
-  "label": "SMS Gateway URL", 
-  "reqd": 1
- }, 
- {
-  "description": "Enter url parameter for message", 
-  "doctype": "DocField", 
-  "fieldname": "message_parameter", 
-  "fieldtype": "Data", 
-  "label": "Message Parameter", 
-  "reqd": 1
- }, 
- {
-  "description": "Enter url parameter for receiver nos", 
-  "doctype": "DocField", 
-  "fieldname": "receiver_parameter", 
-  "fieldtype": "Data", 
-  "label": "Receiver Parameter", 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "static_parameters", 
-  "fieldtype": "Column Break", 
-  "width": "50%"
- }, 
- {
-  "description": "Enter static url parameters here (Eg. sender=ERPNext, username=ERPNext, password=1234 etc.)", 
-  "doctype": "DocField", 
-  "fieldname": "static_parameter_details", 
-  "fieldtype": "Table", 
-  "label": "Static Parameters", 
-  "options": "SMS Parameter"
- }, 
- {
-  "doctype": "DocPerm"
- }
-]
\ No newline at end of file
+{
+ "allow_copy": 1, 
+ "allow_email": 1, 
+ "allow_print": 1, 
+ "creation": "2013-01-10 16:34:24", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "fields": [
+  {
+   "fieldname": "column_break0", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0, 
+   "width": "50%"
+  }, 
+  {
+   "description": "Eg. smsgateway.com/api/send_sms.cgi", 
+   "fieldname": "sms_gateway_url", 
+   "fieldtype": "Data", 
+   "label": "SMS Gateway URL", 
+   "permlevel": 0, 
+   "reqd": 1
+  }, 
+  {
+   "description": "Enter url parameter for message", 
+   "fieldname": "message_parameter", 
+   "fieldtype": "Data", 
+   "label": "Message Parameter", 
+   "permlevel": 0, 
+   "reqd": 1
+  }, 
+  {
+   "description": "Enter url parameter for receiver nos", 
+   "fieldname": "receiver_parameter", 
+   "fieldtype": "Data", 
+   "label": "Receiver Parameter", 
+   "permlevel": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "static_parameters", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0, 
+   "width": "50%"
+  }, 
+  {
+   "description": "Enter static url parameters here (Eg. sender=ERPNext, username=ERPNext, password=1234 etc.)", 
+   "fieldname": "static_parameter_details", 
+   "fieldtype": "Table", 
+   "label": "Static Parameters", 
+   "options": "SMS Parameter", 
+   "permlevel": 0
+  }
+ ], 
+ "icon": "icon-cog", 
+ "idx": 1, 
+ "in_create": 0, 
+ "issingle": 1, 
+ "modified": "2013-09-10 17:20:25", 
+ "modified_by": "Administrator", 
+ "module": "Setup", 
+ "name": "SMS Settings", 
+ "owner": "Administrator", 
+ "permissions": [
+  {
+   "create": 1, 
+   "permlevel": 0, 
+   "read": 1, 
+   "report": 0, 
+   "role": "System Manager", 
+   "submit": 0, 
+   "write": 1
+  }
+ ], 
+ "read_only": 0
+}
\ No newline at end of file
diff --git a/erpnext/setup/doctype/supplier_type/supplier_type.txt b/erpnext/setup/doctype/supplier_type/supplier_type.txt
index 5154f15..aeb90c8 100644
--- a/erpnext/setup/doctype/supplier_type/supplier_type.txt
+++ b/erpnext/setup/doctype/supplier_type/supplier_type.txt
@@ -1,85 +1,80 @@
-[
- {
-  "creation": "2013-01-10 16:34:24", 
-  "docstatus": 0, 
-  "modified": "2014-01-20 17:49:31", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "allow_import": 1, 
-  "allow_rename": 1, 
-  "autoname": "field:supplier_type", 
-  "doctype": "DocType", 
-  "document_type": "Master", 
-  "icon": "icon-flag", 
-  "module": "Setup", 
-  "name": "__common__"
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "Supplier Type", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "amend": 0, 
-  "cancel": 0, 
-  "doctype": "DocPerm", 
-  "email": 1, 
-  "name": "__common__", 
-  "parent": "Supplier Type", 
-  "parentfield": "permissions", 
-  "parenttype": "DocType", 
-  "permlevel": 0, 
-  "print": 1, 
-  "read": 1, 
-  "report": 1, 
-  "submit": 0
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Supplier Type"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "trash_reason", 
-  "fieldtype": "Small Text", 
-  "label": "Trash Reason", 
-  "oldfieldname": "trash_reason", 
-  "oldfieldtype": "Small Text", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "supplier_type", 
-  "fieldtype": "Data", 
-  "label": "Supplier Type", 
-  "oldfieldname": "supplier_type", 
-  "oldfieldtype": "Data", 
-  "reqd": 1
- }, 
- {
-  "create": 0, 
-  "delete": 0, 
-  "doctype": "DocPerm", 
-  "role": "Purchase Manager", 
-  "write": 0
- }, 
- {
-  "create": 0, 
-  "delete": 0, 
-  "doctype": "DocPerm", 
-  "role": "Purchase User", 
-  "write": 0
- }, 
- {
-  "create": 1, 
-  "delete": 1, 
-  "doctype": "DocPerm", 
-  "role": "Purchase Master Manager", 
-  "write": 1
- }
-]
\ No newline at end of file
+{
+ "allow_import": 1, 
+ "allow_rename": 1, 
+ "autoname": "field:supplier_type", 
+ "creation": "2013-01-10 16:34:24", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "document_type": "Master", 
+ "fields": [
+  {
+   "fieldname": "trash_reason", 
+   "fieldtype": "Small Text", 
+   "label": "Trash Reason", 
+   "oldfieldname": "trash_reason", 
+   "oldfieldtype": "Small Text", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "supplier_type", 
+   "fieldtype": "Data", 
+   "label": "Supplier Type", 
+   "oldfieldname": "supplier_type", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "reqd": 1
+  }
+ ], 
+ "icon": "icon-flag", 
+ "idx": 1, 
+ "modified": "2014-01-20 17:49:31", 
+ "modified_by": "Administrator", 
+ "module": "Setup", 
+ "name": "Supplier Type", 
+ "owner": "Administrator", 
+ "permissions": [
+  {
+   "amend": 0, 
+   "cancel": 0, 
+   "create": 0, 
+   "delete": 0, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Purchase Manager", 
+   "submit": 0, 
+   "write": 0
+  }, 
+  {
+   "amend": 0, 
+   "cancel": 0, 
+   "create": 0, 
+   "delete": 0, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Purchase User", 
+   "submit": 0, 
+   "write": 0
+  }, 
+  {
+   "amend": 0, 
+   "cancel": 0, 
+   "create": 1, 
+   "delete": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Purchase Master Manager", 
+   "submit": 0, 
+   "write": 1
+  }
+ ]
+}
\ No newline at end of file
diff --git a/erpnext/setup/doctype/target_detail/target_detail.txt b/erpnext/setup/doctype/target_detail/target_detail.txt
index 3ae395f..55667c2 100644
--- a/erpnext/setup/doctype/target_detail/target_detail.txt
+++ b/erpnext/setup/doctype/target_detail/target_detail.txt
@@ -1,72 +1,62 @@
-[
- {
-  "creation": "2013-02-22 01:27:58", 
-  "docstatus": 0, 
-  "modified": "2013-12-20 19:21:51", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "doctype": "DocType", 
-  "istable": 1, 
-  "module": "Setup", 
-  "name": "__common__"
- }, 
- {
-  "doctype": "DocField", 
-  "in_list_view": 1, 
-  "name": "__common__", 
-  "parent": "Target Detail", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Target Detail"
- }, 
- {
-  "description": "<a href=\"#Sales Browser/Item Group\">Add / Edit</a>", 
-  "doctype": "DocField", 
-  "fieldname": "item_group", 
-  "fieldtype": "Link", 
-  "in_filter": 1, 
-  "label": "Item Group", 
-  "oldfieldname": "item_group", 
-  "oldfieldtype": "Link", 
-  "options": "Item Group", 
-  "reqd": 0, 
-  "search_index": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "fiscal_year", 
-  "fieldtype": "Select", 
-  "in_filter": 1, 
-  "label": "Fiscal Year", 
-  "oldfieldname": "fiscal_year", 
-  "oldfieldtype": "Select", 
-  "options": "link:Fiscal Year", 
-  "reqd": 1, 
-  "search_index": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "target_qty", 
-  "fieldtype": "Float", 
-  "label": "Target Qty", 
-  "oldfieldname": "target_qty", 
-  "oldfieldtype": "Currency"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "target_amount", 
-  "fieldtype": "Float", 
-  "in_filter": 1, 
-  "label": "Target  Amount", 
-  "oldfieldname": "target_amount", 
-  "oldfieldtype": "Currency", 
-  "reqd": 0, 
-  "search_index": 1
- }
-]
\ No newline at end of file
+{
+ "creation": "2013-02-22 01:27:58", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "fields": [
+  {
+   "description": "<a href=\"#Sales Browser/Item Group\">Add / Edit</a>", 
+   "fieldname": "item_group", 
+   "fieldtype": "Link", 
+   "in_filter": 1, 
+   "in_list_view": 1, 
+   "label": "Item Group", 
+   "oldfieldname": "item_group", 
+   "oldfieldtype": "Link", 
+   "options": "Item Group", 
+   "permlevel": 0, 
+   "reqd": 0, 
+   "search_index": 1
+  }, 
+  {
+   "fieldname": "fiscal_year", 
+   "fieldtype": "Select", 
+   "in_filter": 1, 
+   "in_list_view": 1, 
+   "label": "Fiscal Year", 
+   "oldfieldname": "fiscal_year", 
+   "oldfieldtype": "Select", 
+   "options": "link:Fiscal Year", 
+   "permlevel": 0, 
+   "reqd": 1, 
+   "search_index": 1
+  }, 
+  {
+   "fieldname": "target_qty", 
+   "fieldtype": "Float", 
+   "in_list_view": 1, 
+   "label": "Target Qty", 
+   "oldfieldname": "target_qty", 
+   "oldfieldtype": "Currency", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "target_amount", 
+   "fieldtype": "Float", 
+   "in_filter": 1, 
+   "in_list_view": 1, 
+   "label": "Target  Amount", 
+   "oldfieldname": "target_amount", 
+   "oldfieldtype": "Currency", 
+   "permlevel": 0, 
+   "reqd": 0, 
+   "search_index": 1
+  }
+ ], 
+ "idx": 1, 
+ "istable": 1, 
+ "modified": "2013-12-20 19:21:51", 
+ "modified_by": "Administrator", 
+ "module": "Setup", 
+ "name": "Target Detail", 
+ "owner": "Administrator"
+}
\ No newline at end of file
diff --git a/erpnext/setup/doctype/terms_and_conditions/terms_and_conditions.txt b/erpnext/setup/doctype/terms_and_conditions/terms_and_conditions.txt
index 1649379..4076ecd 100644
--- a/erpnext/setup/doctype/terms_and_conditions/terms_and_conditions.txt
+++ b/erpnext/setup/doctype/terms_and_conditions/terms_and_conditions.txt
@@ -1,104 +1,103 @@
-[
- {
-  "creation": "2013-01-10 16:34:24", 
-  "docstatus": 0, 
-  "modified": "2014-01-20 17:49:33", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "allow_import": 1, 
-  "allow_rename": 1, 
-  "autoname": "field:title", 
-  "description": "Standard Terms and Conditions that can be added to Sales and Purchases.\n\nExamples:\n\n1. Validity of the offer.\n1. Payment Terms (In Advance, On Credit, part advance etc).\n1. What is extra (or payable by the Customer).\n1. Safety / usage warning.\n1. Warranty if any.\n1. Returns Policy.\n1. Terms of shipping, if applicable.\n1. Ways of addressing disputes, indemnity, liability, etc.\n1. Address and Contact of your Company.", 
-  "doctype": "DocType", 
-  "document_type": "Master", 
-  "icon": "icon-legal", 
-  "module": "Setup", 
-  "name": "__common__"
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "Terms and Conditions", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "cancel": 0, 
-  "doctype": "DocPerm", 
-  "email": 1, 
-  "name": "__common__", 
-  "parent": "Terms and Conditions", 
-  "parentfield": "permissions", 
-  "parenttype": "DocType", 
-  "permlevel": 0, 
-  "print": 1, 
-  "read": 1, 
-  "report": 1, 
-  "submit": 0
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Terms and Conditions"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "trash_reason", 
-  "fieldtype": "Small Text", 
-  "label": "Trash Reason", 
-  "oldfieldname": "trash_reason", 
-  "oldfieldtype": "Small Text", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "title", 
-  "fieldtype": "Data", 
-  "in_filter": 1, 
-  "label": "Title", 
-  "oldfieldname": "title", 
-  "oldfieldtype": "Data", 
-  "reqd": 1, 
-  "search_index": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "terms", 
-  "fieldtype": "Text Editor", 
-  "label": "Terms and Conditions", 
-  "oldfieldname": "terms", 
-  "oldfieldtype": "Text Editor"
- }, 
- {
-  "amend": 0, 
-  "create": 1, 
-  "delete": 1, 
-  "doctype": "DocPerm", 
-  "role": "Sales Master Manager", 
-  "write": 1
- }, 
- {
-  "amend": 0, 
-  "create": 0, 
-  "delete": 0, 
-  "doctype": "DocPerm", 
-  "role": "Sales User", 
-  "write": 0
- }, 
- {
-  "create": 1, 
-  "delete": 1, 
-  "doctype": "DocPerm", 
-  "role": "System Manager", 
-  "write": 1
- }, 
- {
-  "create": 1, 
-  "delete": 1, 
-  "doctype": "DocPerm", 
-  "role": "Accounts User", 
-  "write": 1
- }
-]
\ No newline at end of file
+{
+ "allow_import": 1, 
+ "allow_rename": 1, 
+ "autoname": "field:title", 
+ "creation": "2013-01-10 16:34:24", 
+ "description": "Standard Terms and Conditions that can be added to Sales and Purchases.\n\nExamples:\n\n1. Validity of the offer.\n1. Payment Terms (In Advance, On Credit, part advance etc).\n1. What is extra (or payable by the Customer).\n1. Safety / usage warning.\n1. Warranty if any.\n1. Returns Policy.\n1. Terms of shipping, if applicable.\n1. Ways of addressing disputes, indemnity, liability, etc.\n1. Address and Contact of your Company.", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "document_type": "Master", 
+ "fields": [
+  {
+   "fieldname": "trash_reason", 
+   "fieldtype": "Small Text", 
+   "label": "Trash Reason", 
+   "oldfieldname": "trash_reason", 
+   "oldfieldtype": "Small Text", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "title", 
+   "fieldtype": "Data", 
+   "in_filter": 1, 
+   "label": "Title", 
+   "oldfieldname": "title", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "reqd": 1, 
+   "search_index": 0
+  }, 
+  {
+   "fieldname": "terms", 
+   "fieldtype": "Text Editor", 
+   "label": "Terms and Conditions", 
+   "oldfieldname": "terms", 
+   "oldfieldtype": "Text Editor", 
+   "permlevel": 0
+  }
+ ], 
+ "icon": "icon-legal", 
+ "idx": 1, 
+ "modified": "2014-01-20 17:49:33", 
+ "modified_by": "Administrator", 
+ "module": "Setup", 
+ "name": "Terms and Conditions", 
+ "owner": "Administrator", 
+ "permissions": [
+  {
+   "amend": 0, 
+   "cancel": 0, 
+   "create": 1, 
+   "delete": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Sales Master Manager", 
+   "submit": 0, 
+   "write": 1
+  }, 
+  {
+   "amend": 0, 
+   "cancel": 0, 
+   "create": 0, 
+   "delete": 0, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Sales User", 
+   "submit": 0, 
+   "write": 0
+  }, 
+  {
+   "cancel": 0, 
+   "create": 1, 
+   "delete": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "System Manager", 
+   "submit": 0, 
+   "write": 1
+  }, 
+  {
+   "cancel": 0, 
+   "create": 1, 
+   "delete": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Accounts User", 
+   "submit": 0, 
+   "write": 1
+  }
+ ]
+}
\ No newline at end of file
diff --git a/erpnext/setup/doctype/territory/territory.txt b/erpnext/setup/doctype/territory/territory.txt
index 3eb766d..a3ed0b2 100644
--- a/erpnext/setup/doctype/territory/territory.txt
+++ b/erpnext/setup/doctype/territory/territory.txt
@@ -1,201 +1,196 @@
-[
- {
-  "creation": "2013-01-10 16:34:24", 
-  "docstatus": 0, 
-  "modified": "2014-01-20 17:49:33", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "allow_import": 1, 
-  "allow_rename": 1, 
-  "autoname": "field:territory_name", 
-  "description": "Classification of Customers by region", 
-  "doctype": "DocType", 
-  "document_type": "Master", 
-  "icon": "icon-map-marker", 
-  "in_create": 1, 
-  "module": "Setup", 
-  "name": "__common__", 
-  "name_case": "Title Case", 
-  "read_only": 1, 
-  "search_fields": "name,parent_territory,territory_manager"
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "Territory", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "amend": 0, 
-  "cancel": 0, 
-  "doctype": "DocPerm", 
-  "email": 1, 
-  "name": "__common__", 
-  "parent": "Territory", 
-  "parentfield": "permissions", 
-  "parenttype": "DocType", 
-  "permlevel": 0, 
-  "print": 1, 
-  "read": 1, 
-  "report": 1, 
-  "submit": 0
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Territory"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "trash_reason", 
-  "fieldtype": "Small Text", 
-  "label": "Trash Reason", 
-  "oldfieldname": "trash_reason", 
-  "oldfieldtype": "Small Text", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "territory_name", 
-  "fieldtype": "Data", 
-  "label": "Territory Name", 
-  "no_copy": 1, 
-  "oldfieldname": "territory_name", 
-  "oldfieldtype": "Data", 
-  "reqd": 1
- }, 
- {
-  "description": "<a href=\"#Sales Browser/Territory\">Add / Edit</a>", 
-  "doctype": "DocField", 
-  "fieldname": "parent_territory", 
-  "fieldtype": "Link", 
-  "ignore_restrictions": 1, 
-  "label": "Parent Territory", 
-  "oldfieldname": "parent_territory", 
-  "oldfieldtype": "Link", 
-  "options": "Territory", 
-  "reqd": 0
- }, 
- {
-  "description": "Only leaf nodes are allowed in transaction", 
-  "doctype": "DocField", 
-  "fieldname": "is_group", 
-  "fieldtype": "Select", 
-  "label": "Has Child Node", 
-  "oldfieldname": "is_group", 
-  "oldfieldtype": "Select", 
-  "options": "\nYes\nNo", 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "cb0", 
-  "fieldtype": "Column Break"
- }, 
- {
-  "description": "For reference", 
-  "doctype": "DocField", 
-  "fieldname": "territory_manager", 
-  "fieldtype": "Link", 
-  "in_filter": 1, 
-  "label": "Territory Manager", 
-  "oldfieldname": "territory_manager", 
-  "oldfieldtype": "Link", 
-  "options": "Sales Person", 
-  "search_index": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "lft", 
-  "fieldtype": "Int", 
-  "hidden": 1, 
-  "in_filter": 1, 
-  "label": "lft", 
-  "no_copy": 1, 
-  "oldfieldname": "lft", 
-  "oldfieldtype": "Int", 
-  "print_hide": 1, 
-  "report_hide": 0, 
-  "search_index": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "rgt", 
-  "fieldtype": "Int", 
-  "hidden": 1, 
-  "in_filter": 1, 
-  "label": "rgt", 
-  "no_copy": 1, 
-  "oldfieldname": "rgt", 
-  "oldfieldtype": "Int", 
-  "print_hide": 1, 
-  "report_hide": 0, 
-  "search_index": 1
- }, 
- {
-  "description": "<a href=\"#Sales Browser/Territory\">Add / Edit</a>", 
-  "doctype": "DocField", 
-  "fieldname": "old_parent", 
-  "fieldtype": "Link", 
-  "hidden": 1, 
-  "ignore_restrictions": 1, 
-  "label": "old_parent", 
-  "no_copy": 1, 
-  "oldfieldname": "old_parent", 
-  "oldfieldtype": "Data", 
-  "options": "Territory", 
-  "print_hide": 1, 
-  "report_hide": 1
- }, 
- {
-  "description": "Set Item Group-wise budgets on this Territory. You can also include seasonality by setting the Distribution.", 
-  "doctype": "DocField", 
-  "fieldname": "target_details_section_break", 
-  "fieldtype": "Section Break", 
-  "label": "Territory Targets", 
-  "oldfieldtype": "Section Break"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "target_details", 
-  "fieldtype": "Table", 
-  "label": "Target Details", 
-  "oldfieldname": "target_details", 
-  "oldfieldtype": "Table", 
-  "options": "Target Detail"
- }, 
- {
-  "description": "Select Budget Distribution to unevenly distribute targets across months.", 
-  "doctype": "DocField", 
-  "fieldname": "distribution_id", 
-  "fieldtype": "Link", 
-  "label": "Target Distribution", 
-  "oldfieldname": "distribution_id", 
-  "oldfieldtype": "Link", 
-  "options": "Budget Distribution"
- }, 
- {
-  "create": 0, 
-  "delete": 0, 
-  "doctype": "DocPerm", 
-  "role": "Sales Manager", 
-  "write": 0
- }, 
- {
-  "create": 0, 
-  "delete": 0, 
-  "doctype": "DocPerm", 
-  "role": "Sales User", 
-  "write": 0
- }, 
- {
-  "create": 1, 
-  "delete": 1, 
-  "doctype": "DocPerm", 
-  "role": "Sales Master Manager", 
-  "write": 1
- }
-]
\ No newline at end of file
+{
+ "allow_import": 1, 
+ "allow_rename": 1, 
+ "autoname": "field:territory_name", 
+ "creation": "2013-01-10 16:34:24", 
+ "description": "Classification of Customers by region", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "document_type": "Master", 
+ "fields": [
+  {
+   "fieldname": "trash_reason", 
+   "fieldtype": "Small Text", 
+   "label": "Trash Reason", 
+   "oldfieldname": "trash_reason", 
+   "oldfieldtype": "Small Text", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "territory_name", 
+   "fieldtype": "Data", 
+   "label": "Territory Name", 
+   "no_copy": 1, 
+   "oldfieldname": "territory_name", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "reqd": 1
+  }, 
+  {
+   "description": "<a href=\"#Sales Browser/Territory\">Add / Edit</a>", 
+   "fieldname": "parent_territory", 
+   "fieldtype": "Link", 
+   "ignore_restrictions": 1, 
+   "label": "Parent Territory", 
+   "oldfieldname": "parent_territory", 
+   "oldfieldtype": "Link", 
+   "options": "Territory", 
+   "permlevel": 0, 
+   "reqd": 0
+  }, 
+  {
+   "description": "Only leaf nodes are allowed in transaction", 
+   "fieldname": "is_group", 
+   "fieldtype": "Select", 
+   "label": "Has Child Node", 
+   "oldfieldname": "is_group", 
+   "oldfieldtype": "Select", 
+   "options": "\nYes\nNo", 
+   "permlevel": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "cb0", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0
+  }, 
+  {
+   "description": "For reference", 
+   "fieldname": "territory_manager", 
+   "fieldtype": "Link", 
+   "in_filter": 1, 
+   "label": "Territory Manager", 
+   "oldfieldname": "territory_manager", 
+   "oldfieldtype": "Link", 
+   "options": "Sales Person", 
+   "permlevel": 0, 
+   "search_index": 1
+  }, 
+  {
+   "fieldname": "lft", 
+   "fieldtype": "Int", 
+   "hidden": 1, 
+   "in_filter": 1, 
+   "label": "lft", 
+   "no_copy": 1, 
+   "oldfieldname": "lft", 
+   "oldfieldtype": "Int", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "report_hide": 0, 
+   "search_index": 1
+  }, 
+  {
+   "fieldname": "rgt", 
+   "fieldtype": "Int", 
+   "hidden": 1, 
+   "in_filter": 1, 
+   "label": "rgt", 
+   "no_copy": 1, 
+   "oldfieldname": "rgt", 
+   "oldfieldtype": "Int", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "report_hide": 0, 
+   "search_index": 1
+  }, 
+  {
+   "description": "<a href=\"#Sales Browser/Territory\">Add / Edit</a>", 
+   "fieldname": "old_parent", 
+   "fieldtype": "Link", 
+   "hidden": 1, 
+   "ignore_restrictions": 1, 
+   "label": "old_parent", 
+   "no_copy": 1, 
+   "oldfieldname": "old_parent", 
+   "oldfieldtype": "Data", 
+   "options": "Territory", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "report_hide": 1
+  }, 
+  {
+   "description": "Set Item Group-wise budgets on this Territory. You can also include seasonality by setting the Distribution.", 
+   "fieldname": "target_details_section_break", 
+   "fieldtype": "Section Break", 
+   "label": "Territory Targets", 
+   "oldfieldtype": "Section Break", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "target_details", 
+   "fieldtype": "Table", 
+   "label": "Target Details", 
+   "oldfieldname": "target_details", 
+   "oldfieldtype": "Table", 
+   "options": "Target Detail", 
+   "permlevel": 0
+  }, 
+  {
+   "description": "Select Budget Distribution to unevenly distribute targets across months.", 
+   "fieldname": "distribution_id", 
+   "fieldtype": "Link", 
+   "label": "Target Distribution", 
+   "oldfieldname": "distribution_id", 
+   "oldfieldtype": "Link", 
+   "options": "Budget Distribution", 
+   "permlevel": 0
+  }
+ ], 
+ "icon": "icon-map-marker", 
+ "idx": 1, 
+ "in_create": 1, 
+ "modified": "2014-01-20 17:49:33", 
+ "modified_by": "Administrator", 
+ "module": "Setup", 
+ "name": "Territory", 
+ "name_case": "Title Case", 
+ "owner": "Administrator", 
+ "permissions": [
+  {
+   "amend": 0, 
+   "cancel": 0, 
+   "create": 0, 
+   "delete": 0, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Sales Manager", 
+   "submit": 0, 
+   "write": 0
+  }, 
+  {
+   "amend": 0, 
+   "cancel": 0, 
+   "create": 0, 
+   "delete": 0, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Sales User", 
+   "submit": 0, 
+   "write": 0
+  }, 
+  {
+   "amend": 0, 
+   "cancel": 0, 
+   "create": 1, 
+   "delete": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Sales Master Manager", 
+   "submit": 0, 
+   "write": 1
+  }
+ ], 
+ "read_only": 1, 
+ "search_fields": "name,parent_territory,territory_manager"
+}
\ No newline at end of file
diff --git a/erpnext/setup/doctype/uom/uom.txt b/erpnext/setup/doctype/uom/uom.txt
index edff5b1..ee07559 100644
--- a/erpnext/setup/doctype/uom/uom.txt
+++ b/erpnext/setup/doctype/uom/uom.txt
@@ -1,82 +1,77 @@
-[
- {
-  "creation": "2013-01-10 16:34:24", 
-  "docstatus": 0, 
-  "modified": "2014-01-20 17:49:34", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "allow_import": 1, 
-  "autoname": "field:uom_name", 
-  "doctype": "DocType", 
-  "document_type": "Master", 
-  "icon": "icon-compass", 
-  "module": "Setup", 
-  "name": "__common__"
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "UOM", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "amend": 0, 
-  "cancel": 0, 
-  "doctype": "DocPerm", 
-  "email": 1, 
-  "name": "__common__", 
-  "parent": "UOM", 
-  "parentfield": "permissions", 
-  "parenttype": "DocType", 
-  "permlevel": 0, 
-  "print": 1, 
-  "read": 1, 
-  "report": 1, 
-  "submit": 0
- }, 
- {
-  "doctype": "DocType", 
-  "name": "UOM"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "uom_name", 
-  "fieldtype": "Data", 
-  "label": "UOM Name", 
-  "oldfieldname": "uom_name", 
-  "oldfieldtype": "Data", 
-  "reqd": 1
- }, 
- {
-  "description": "Check this to disallow fractions. (for Nos)", 
-  "doctype": "DocField", 
-  "fieldname": "must_be_whole_number", 
-  "fieldtype": "Check", 
-  "label": "Must be Whole Number"
- }, 
- {
-  "create": 1, 
-  "delete": 1, 
-  "doctype": "DocPerm", 
-  "role": "Material Master Manager", 
-  "write": 1
- }, 
- {
-  "create": 0, 
-  "delete": 0, 
-  "doctype": "DocPerm", 
-  "role": "Material Manager", 
-  "write": 0
- }, 
- {
-  "create": 0, 
-  "delete": 0, 
-  "doctype": "DocPerm", 
-  "role": "Material User", 
-  "write": 0
- }
-]
\ No newline at end of file
+{
+ "allow_import": 1, 
+ "autoname": "field:uom_name", 
+ "creation": "2013-01-10 16:34:24", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "document_type": "Master", 
+ "fields": [
+  {
+   "fieldname": "uom_name", 
+   "fieldtype": "Data", 
+   "label": "UOM Name", 
+   "oldfieldname": "uom_name", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "reqd": 1
+  }, 
+  {
+   "description": "Check this to disallow fractions. (for Nos)", 
+   "fieldname": "must_be_whole_number", 
+   "fieldtype": "Check", 
+   "label": "Must be Whole Number", 
+   "permlevel": 0
+  }
+ ], 
+ "icon": "icon-compass", 
+ "idx": 1, 
+ "modified": "2014-01-20 17:49:34", 
+ "modified_by": "Administrator", 
+ "module": "Setup", 
+ "name": "UOM", 
+ "owner": "Administrator", 
+ "permissions": [
+  {
+   "amend": 0, 
+   "cancel": 0, 
+   "create": 1, 
+   "delete": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Material Master Manager", 
+   "submit": 0, 
+   "write": 1
+  }, 
+  {
+   "amend": 0, 
+   "cancel": 0, 
+   "create": 0, 
+   "delete": 0, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Material Manager", 
+   "submit": 0, 
+   "write": 0
+  }, 
+  {
+   "amend": 0, 
+   "cancel": 0, 
+   "create": 0, 
+   "delete": 0, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Material User", 
+   "submit": 0, 
+   "write": 0
+  }
+ ]
+}
\ No newline at end of file
diff --git a/erpnext/setup/doctype/website_item_group/website_item_group.txt b/erpnext/setup/doctype/website_item_group/website_item_group.txt
index ff731a1..6d3a801 100644
--- a/erpnext/setup/doctype/website_item_group/website_item_group.txt
+++ b/erpnext/setup/doctype/website_item_group/website_item_group.txt
@@ -1,39 +1,26 @@
-[
- {
-  "creation": "2013-02-22 01:28:09", 
-  "docstatus": 0, 
-  "modified": "2014-02-28 13:00:07", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "description": "Cross Listing of Item in multiple groups", 
-  "doctype": "DocType", 
-  "document_type": "Other", 
-  "istable": 1, 
-  "module": "Setup", 
-  "name": "__common__"
- }, 
- {
-  "description": "<a href=\"#Sales Browser/Item Group\">Add / Edit</a>", 
-  "doctype": "DocField", 
-  "fieldname": "item_group", 
-  "fieldtype": "Link", 
-  "in_list_view": 1, 
-  "label": "Item Group", 
-  "name": "__common__", 
-  "options": "Item Group", 
-  "parent": "Website Item Group", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0, 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Website Item Group"
- }, 
- {
-  "doctype": "DocField"
- }
-]
\ No newline at end of file
+{
+ "creation": "2013-02-22 01:28:09", 
+ "description": "Cross Listing of Item in multiple groups", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "document_type": "Other", 
+ "fields": [
+  {
+   "description": "<a href=\"#Sales Browser/Item Group\">Add / Edit</a>", 
+   "fieldname": "item_group", 
+   "fieldtype": "Link", 
+   "in_list_view": 1, 
+   "label": "Item Group", 
+   "options": "Item Group", 
+   "permlevel": 0, 
+   "reqd": 1
+  }
+ ], 
+ "idx": 1, 
+ "istable": 1, 
+ "modified": "2014-02-28 13:00:07", 
+ "modified_by": "Administrator", 
+ "module": "Setup", 
+ "name": "Website Item Group", 
+ "owner": "Administrator"
+}
\ No newline at end of file
diff --git a/erpnext/setup/page/setup_wizard/setup_wizard.txt b/erpnext/setup/page/setup_wizard/setup_wizard.txt
index 996fd1a..fcb8e38 100644
--- a/erpnext/setup/page/setup_wizard/setup_wizard.txt
+++ b/erpnext/setup/page/setup_wizard/setup_wizard.txt
@@ -1,32 +1,19 @@
-[
- {
-  "creation": "2013-10-04 13:49:33", 
-  "docstatus": 0, 
-  "modified": "2013-10-04 13:49:33", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "doctype": "Page", 
-  "module": "Setup", 
-  "name": "__common__", 
-  "page_name": "setup-wizard", 
-  "standard": "Yes", 
-  "title": "Setup Wizard"
- }, 
- {
-  "doctype": "Page Role", 
-  "name": "__common__", 
-  "parent": "setup-wizard", 
-  "parentfield": "roles", 
-  "parenttype": "Page", 
-  "role": "System Manager"
- }, 
- {
-  "doctype": "Page", 
-  "name": "setup-wizard"
- }, 
- {
-  "doctype": "Page Role"
- }
-]
\ No newline at end of file
+{
+ "creation": "2013-10-04 13:49:33", 
+ "docstatus": 0, 
+ "doctype": "Page", 
+ "idx": 1, 
+ "modified": "2013-10-04 13:49:33", 
+ "modified_by": "Administrator", 
+ "module": "Setup", 
+ "name": "setup-wizard", 
+ "owner": "Administrator", 
+ "page_name": "setup-wizard", 
+ "roles": [
+  {
+   "role": "System Manager"
+  }
+ ], 
+ "standard": "Yes", 
+ "title": "Setup Wizard"
+}
\ No newline at end of file
diff --git a/erpnext/stock/Print Format/Delivery Note Classic/Delivery Note Classic.txt b/erpnext/stock/Print Format/Delivery Note Classic/Delivery Note Classic.txt
index 3f29d61..6eeef25 100644
--- a/erpnext/stock/Print Format/Delivery Note Classic/Delivery Note Classic.txt
+++ b/erpnext/stock/Print Format/Delivery Note Classic/Delivery Note Classic.txt
@@ -1,22 +1,15 @@
-[
- {
-  "creation": "2013-04-19 13:31:11", 
-  "docstatus": 0, 
-  "modified": "2014-02-11 17:36:51", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "doc_type": "Delivery Note", 
-  "doctype": "Print Format", 
-  "html": "<!--\n\tSample Print Format for ERPNext\n\tPlease use at your own discretion\n\tFor suggestions and contributions:\n\t\thttps://github.com/frappe/erpnext-print-templates\n\n\tFreely usable under MIT license\n-->\n\n<!-- Style Settings -->\n<style>\n\t/*\n\t\tcommon style for whole page\n\t\tThis should include:\n\t\t+ page size related settings\n\t\t+ font family settings\n\t\t+ line spacing settings\n\t*/\n\t@media screen {\n\t\tbody {\n\t\t\twidth: 8.3in;\n\t\t}\n\t}\n\n\thtml, body, div, span, td {\n\t\tfont-family: \"Georgia\", serif;\n\t\tfont-size: 12px;\n\t}\n\n\tbody {\n\t\tpadding: 10px;\n\t\tmargin: auto;\n\t\tfont-size: 12px;\n\t}\n\n\t.common {\n\t\tfont-family: \"Georgia\", serif !important;\n\t\tfont-size: 12px;\n\t\tpadding: 10px 0px;\n\t}\n\n\ttable {\n\t\tborder-collapse: collapse;\n\t\twidth: 100%;\n\t\tvertical-align: top;\n\t}\n\n\ttable td {\n\t\tpadding: 2px 0px;\n\t}\n\t\n\ttable h1, h2, h3, h4, h5, h6 {\n\t\tpadding: 0px;\n\t\tmargin: 0px;\n\t}\n\n\ttable.header-table td {\n\t\tvertical-align: top;\n\t}\n\n\ttable.header-table thead {\n\t\tborder-bottom: 1px solid black;\n\t}\n\n\ttable.header-table h3 {\n\t\tcolor: gray;\n\t}\n\n\ttable.header-table thead td {\n\t\tpadding: 5px 0px;\n\t}\n\n\tdiv.page-body table td:nth-child(6),\n\tdiv.page-body table td:nth-child(7) {\n\t\ttext-align: right;\n\t}\n\n\ttable.footer-table td {\n\t\tvertical-align: top;\n\t}\n\n\ttable.footer-table td table td:nth-child(2),\n\ttable.footer-table td table td:nth-child(3) {\n\t\ttext-align: right;\n\t}\n</style>\n\n\n<!-- Javascript -->\n<script>\n\tsi_std = {\n\t\tprint_item_table: function() {\n\t\t\tvar table = print_table(\n\t\t\t\t'Delivery Note',\n\t\t\t\tdoc.name,\n\t\t\t\t'delivery_note_details',\n\t\t\t\t'Delivery Note Item',\n\t\t\t\t[// Here specify the table columns to be displayed\n\t\t\t\t\t'SR', 'item_code', 'item_name', 'description', 'qty', 'stock_uom',\n\t\t\t\t\t'base_rate', 'amount'\n\t\t\t\t],\n\t\t\t\t[// Here specify the labels of column headings\n\t\t\t\t\t'Sr', 'Item Code', 'Item Name', 'Description', 'Qty',\n\t\t\t\t\t'UoM', 'Basic Rate', 'Amount'\n\t\t\t\t],\n\t\t\t\t[// Here specify the column widths\n\t\t\t\t\t'3%', '10%', '15%', '32%', '5%',\n\t\t\t\t\t'5%', '15%', '15%'\n\t\t\t\t],\n\t\t\t\tnull,\n\t\t\t\tnull,\n\t\t\t\t{\n\t\t\t\t\t'description' : function(data_row) {\n\t\t\t\t\t\tvar to_append = ''\n\t\t\t\t\t\tif(data_row.discount_percentage){\n\t\t\t\t\t\t\tto_append = '<div style=\"padding-left: 15px;\"><i>Discount: ' + \n\t\t\t\t\t\t\t\tdata_row.discount_percentage + '% on ' +\n\t\t\t\t\t\t\t\tformat_currency(data_row.price_list_rate, doc.currency) + '</i></div>';\n\t\t\t\t\t\t\tif(data_row.description.indexOf(to_append)==-1) {\n\t\t\t\t\t\t\t\tdata_row.description = data_row.description + to_append;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(data_row.serial_no) {\n\t\t\t\t\t\t\tto_append = '<div style=\"padding-left: 15px;\"><i>Serial No.:' + \n\t\t\t\t\t\t\t\t((data_row.serial_no.indexOf('\\n')>-1)?'<br />':'&nbsp;') + \n\t\t\t\t\t\t\t\tdata_row.serial_no + '</i></div>';\n\t\t\t\t\t\t\tif(data_row.description.indexOf(to_append)==-1) {\n\t\t\t\t\t\t\t\tdata_row.description = data_row.description + to_append;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\n\t\t\t\t\t\treturn data_row.description;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t);\n\n\t\t\t// This code takes care of page breaks\n\t\t\tif(table.appendChild) {\n\t\t\t\tout = table.innerHTML;\n\t\t\t} else {\n\t\t\t\tout = '';\n\t\t\t\tfor(var i=0; i < (table.length-1); i++) {\n\t\t\t\t\tout += table[i].innerHTML + \n\t\t\t\t\t\t'<div style = \"page-break-after: always;\" \\\n\t\t\t\t\t\tclass = \"page_break\"></div>\\\n\t\t\t\t\t\t<div class=\"page-settings\"></div>';\n\t\t\t\t}\n\t\t\t\tout += table[table.length-1].innerHTML;\n\t\t\t}\n\t\t\treturn out;\n\t\t},\n\n\n\t\tprint_other_charges: function(parent) {\n\t\t\tvar oc = getchildren('Sales Taxes and Charges', doc.name, 'other_charges');\n\t\t\tvar rows = '<table width=100%>\\n';\n\t\t\tfor(var i=0; i<oc.length; i++) {\n\t\t\t\tif(!oc[i].included_in_print_rate) {\n\t\t\t\t\trows +=\n\t\t\t\t\t\t'<tr>\\n' +\n\t\t\t\t\t\t\t'\\t<td>' + oc[i].description + '</td>\\n' +\n\t\t\t\t\t\t\t'\\t<td style=\"width: 38%; text-align: right;\">' + format_currency(oc[i].tax_amount/doc.conversion_rate, doc.currency) + '</td>\\n' +\n\t\t\t\t\t\t'</tr>\\n';\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(doc.discount_amount) {\n\t\t\t\trows += '<tr>\\n' + \n\t\t\t\t\t\t'\\t<td>Discount Amount</td>\\n' + \n\t\t\t\t\t\t'\\t<td style=\"width: 38%; text-align: right;\">' + format_currency(doc.discount_amount, doc.currency) + '</td>\\n' + \n\t\t\t\t\t'</tr>\\n';\n\t\t\t}\n\n\t\t\treturn rows + '</table>\\n';\n\t\t}\n\t};\n</script>\n\n\n<!-- Page Layout Settings -->\n<div class='common page-header'>\n\t<!-- \n\t\tPage Header will contain\n\t\t\t+ table 1\n\t\t\t\t+ table 1a\n\t\t\t\t\t- Name\n\t\t\t\t\t- Address\n\t\t\t\t\t- Contact\n\t\t\t\t\t- Mobile No\n\t\t\t\t+ table 1b\n\t\t\t\t\t- Voucher Date\n\t\t\t\t\t- Due Date\n\t-->\n\t<table class='header-table' cellspacing=0>\n\t\t<thead>\n\t\t\t<tr><td><script>'<h1>' + (doc.select_print_heading || 'Delivery Note') + '</h1>'</script></td></tr>\n\t\t\t<tr><td><h3><script>cur_frm.docname</script></h3></td></tr>\n\t\t</thead>\n\t\t<tbody>\n\t\t\t<tr>\n\t\t\t\t<td width=60%><table width=100% cellspacing=0><tbody>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td width=22%><b>Name</b></td>\n\t\t\t\t\t\t<td><script>doc.customer_name</script></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><b>Address</b></td>\n\t\t\t\t\t\t<td><script>replace_newlines(doc.address_display)</script></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><b>Contact</b></td>\n\t\t\t\t\t\t<td><script>doc.contact_display</script></td>\n\t\t\t\t\t</tr>\n\t\t\t\t</tbody></table></td>\n\t\t\t\t<td><table width=100% cellspacing=0><tbody>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td width=63%><b>Delivery Note Date</b></td>\n\t\t\t\t\t\t<td><script>date.str_to_user(doc.transaction_date)</script></td>\n\t\t\t\t\t<tr>\t\t\t\t\t\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><b>Sales Order No.</b></td>\n\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t<script>doc.sales_order_no</script><br />\n\t\t\t\t\t\t\t<i>(<script>date.str_to_user(doc.posting_date)</script>)</i>\n\t\t\t\t\t\t</td>\n\t\t\t\t\t<tr>\t\t\t\t\t\n\t\t\t\t</tbody></table></td>\n\t\t\t</tr>\n\t\t</tbody>\n\t\t<tfoot>\n\t\t\n\t\t</tfoot>\n\t</table>\n</div>\n<div class='common page-body'>\n\t<!-- \n\t\tPage Body will contain\n\t\t\t+ table 2\n\t\t\t\t- Sales Invoice Data\n\t-->\n\t<script>si_std.print_item_table()</script>\n</div>\n<div class='common page-footer'>\n\t<!-- \n\t\tPage Footer will contain\n\t\t\t+ table 3\n\t\t\t\t- Terms and Conditions\n\t\t\t\t- Total Rounded Amount Calculation\n\t\t\t\t- Total Rounded Amount in Words\n\t-->\n\t<table class='footer-table' width=100% cellspacing=0>\n\t\t<thead>\n\t\t\t\n\t\t</thead>\n\t\t<tbody>\n\t\t\t<tr>\n\t\t\t\t<td width=60% style='padding-right: 10px;'>\n\t\t\t\t\t<b>Terms, Conditions &amp; Other Information:</b><br />\n\t\t\t\t\t<script>doc.terms</script>\n\t\t\t\t</td>\n\t\t\t\t<td>\n\t\t\t\t\t<table cellspacing=0 width=100%><tbody>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td>Net Total</td>\n\t\t\t\t\t\t\t<td style=\"width: 38%; text-align: right;\"><script>\n\t\t\t\t\t\t\t\tformat_currency(doc.net_total_export, doc.currency)\n\t\t\t\t\t\t\t</script></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr><td colspan=3><script>si_std.print_other_charges()</script></td></tr>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td>Grand Total</td>\n\t\t\t\t\t\t\t<td style=\"width: 38%; text-align: right;\"><script>\n\t\t\t\t\t\t\t\tformat_currency(doc.grand_total_export, doc.currency)\n\t\t\t\t\t\t\t</script></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr style='font-weight: bold'>\n\t\t\t\t\t\t\t<td>Rounded Total</td>\n\t\t\t\t\t\t\t<td style=\"width: 38%; text-align: right;\"><script>\n\t\t\t\t\t\t\t\tformat_currency(doc.rounded_total_export, doc.currency)\n\t\t\t\t\t\t\t</script></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t</tbody></table>\n\t\t\t\t\t<br /><b>In Words</b><br />\n\t\t\t\t\t<i><script>doc.in_words_export</script></i>\n\t\t\t\t</td>\n\t\t\t</tr>\t\t\n\t\t</tbody>\n\t\t<tfoot>\n\t\t\n\t\t</tfoot>\n\t</table>\n</div>", 
-  "module": "Stock", 
-  "name": "__common__", 
-  "print_format_type": "Client", 
-  "standard": "Yes"
- }, 
- {
-  "doctype": "Print Format", 
-  "name": "Delivery Note Classic"
- }
-]
\ No newline at end of file
+{
+ "creation": "2013-04-19 13:31:11", 
+ "doc_type": "Delivery Note", 
+ "docstatus": 0, 
+ "doctype": "Print Format", 
+ "html": "<!--\n\tSample Print Format for ERPNext\n\tPlease use at your own discretion\n\tFor suggestions and contributions:\n\t\thttps://github.com/frappe/erpnext-print-templates\n\n\tFreely usable under MIT license\n-->\n\n<!-- Style Settings -->\n<style>\n\t/*\n\t\tcommon style for whole page\n\t\tThis should include:\n\t\t+ page size related settings\n\t\t+ font family settings\n\t\t+ line spacing settings\n\t*/\n\t@media screen {\n\t\tbody {\n\t\t\twidth: 8.3in;\n\t\t}\n\t}\n\n\thtml, body, div, span, td {\n\t\tfont-family: \"Georgia\", serif;\n\t\tfont-size: 12px;\n\t}\n\n\tbody {\n\t\tpadding: 10px;\n\t\tmargin: auto;\n\t\tfont-size: 12px;\n\t}\n\n\t.common {\n\t\tfont-family: \"Georgia\", serif !important;\n\t\tfont-size: 12px;\n\t\tpadding: 10px 0px;\n\t}\n\n\ttable {\n\t\tborder-collapse: collapse;\n\t\twidth: 100%;\n\t\tvertical-align: top;\n\t}\n\n\ttable td {\n\t\tpadding: 2px 0px;\n\t}\n\t\n\ttable h1, h2, h3, h4, h5, h6 {\n\t\tpadding: 0px;\n\t\tmargin: 0px;\n\t}\n\n\ttable.header-table td {\n\t\tvertical-align: top;\n\t}\n\n\ttable.header-table thead {\n\t\tborder-bottom: 1px solid black;\n\t}\n\n\ttable.header-table h3 {\n\t\tcolor: gray;\n\t}\n\n\ttable.header-table thead td {\n\t\tpadding: 5px 0px;\n\t}\n\n\tdiv.page-body table td:nth-child(6),\n\tdiv.page-body table td:nth-child(7) {\n\t\ttext-align: right;\n\t}\n\n\ttable.footer-table td {\n\t\tvertical-align: top;\n\t}\n\n\ttable.footer-table td table td:nth-child(2),\n\ttable.footer-table td table td:nth-child(3) {\n\t\ttext-align: right;\n\t}\n</style>\n\n\n<!-- Javascript -->\n<script>\n\tsi_std = {\n\t\tprint_item_table: function() {\n\t\t\tvar table = print_table(\n\t\t\t\t'Delivery Note',\n\t\t\t\tdoc.name,\n\t\t\t\t'delivery_note_details',\n\t\t\t\t'Delivery Note Item',\n\t\t\t\t[// Here specify the table columns to be displayed\n\t\t\t\t\t'SR', 'item_code', 'item_name', 'description', 'qty', 'stock_uom',\n\t\t\t\t\t'base_rate', 'amount'\n\t\t\t\t],\n\t\t\t\t[// Here specify the labels of column headings\n\t\t\t\t\t'Sr', 'Item Code', 'Item Name', 'Description', 'Qty',\n\t\t\t\t\t'UoM', 'Basic Rate', 'Amount'\n\t\t\t\t],\n\t\t\t\t[// Here specify the column widths\n\t\t\t\t\t'3%', '10%', '15%', '32%', '5%',\n\t\t\t\t\t'5%', '15%', '15%'\n\t\t\t\t],\n\t\t\t\tnull,\n\t\t\t\tnull,\n\t\t\t\t{\n\t\t\t\t\t'description' : function(data_row) {\n\t\t\t\t\t\tvar to_append = ''\n\t\t\t\t\t\tif(data_row.discount_percentage){\n\t\t\t\t\t\t\tto_append = '<div style=\"padding-left: 15px;\"><i>Discount: ' + \n\t\t\t\t\t\t\t\tdata_row.discount_percentage + '% on ' +\n\t\t\t\t\t\t\t\tformat_currency(data_row.price_list_rate, doc.currency) + '</i></div>';\n\t\t\t\t\t\t\tif(data_row.description.indexOf(to_append)==-1) {\n\t\t\t\t\t\t\t\tdata_row.description = data_row.description + to_append;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(data_row.serial_no) {\n\t\t\t\t\t\t\tto_append = '<div style=\"padding-left: 15px;\"><i>Serial No.:' + \n\t\t\t\t\t\t\t\t((data_row.serial_no.indexOf('\\n')>-1)?'<br />':'&nbsp;') + \n\t\t\t\t\t\t\t\tdata_row.serial_no + '</i></div>';\n\t\t\t\t\t\t\tif(data_row.description.indexOf(to_append)==-1) {\n\t\t\t\t\t\t\t\tdata_row.description = data_row.description + to_append;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\n\t\t\t\t\t\treturn data_row.description;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t);\n\n\t\t\t// This code takes care of page breaks\n\t\t\tif(table.appendChild) {\n\t\t\t\tout = table.innerHTML;\n\t\t\t} else {\n\t\t\t\tout = '';\n\t\t\t\tfor(var i=0; i < (table.length-1); i++) {\n\t\t\t\t\tout += table[i].innerHTML + \n\t\t\t\t\t\t'<div style = \"page-break-after: always;\" \\\n\t\t\t\t\t\tclass = \"page_break\"></div>\\\n\t\t\t\t\t\t<div class=\"page-settings\"></div>';\n\t\t\t\t}\n\t\t\t\tout += table[table.length-1].innerHTML;\n\t\t\t}\n\t\t\treturn out;\n\t\t},\n\n\n\t\tprint_other_charges: function(parent) {\n\t\t\tvar oc = getchildren('Sales Taxes and Charges', doc.name, 'other_charges');\n\t\t\tvar rows = '<table width=100%>\\n';\n\t\t\tfor(var i=0; i<oc.length; i++) {\n\t\t\t\tif(!oc[i].included_in_print_rate) {\n\t\t\t\t\trows +=\n\t\t\t\t\t\t'<tr>\\n' +\n\t\t\t\t\t\t\t'\\t<td>' + oc[i].description + '</td>\\n' +\n\t\t\t\t\t\t\t'\\t<td style=\"width: 38%; text-align: right;\">' + format_currency(oc[i].tax_amount/doc.conversion_rate, doc.currency) + '</td>\\n' +\n\t\t\t\t\t\t'</tr>\\n';\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(doc.discount_amount) {\n\t\t\t\trows += '<tr>\\n' + \n\t\t\t\t\t\t'\\t<td>Discount Amount</td>\\n' + \n\t\t\t\t\t\t'\\t<td style=\"width: 38%; text-align: right;\">' + format_currency(doc.discount_amount, doc.currency) + '</td>\\n' + \n\t\t\t\t\t'</tr>\\n';\n\t\t\t}\n\n\t\t\treturn rows + '</table>\\n';\n\t\t}\n\t};\n</script>\n\n\n<!-- Page Layout Settings -->\n<div class='common page-header'>\n\t<!-- \n\t\tPage Header will contain\n\t\t\t+ table 1\n\t\t\t\t+ table 1a\n\t\t\t\t\t- Name\n\t\t\t\t\t- Address\n\t\t\t\t\t- Contact\n\t\t\t\t\t- Mobile No\n\t\t\t\t+ table 1b\n\t\t\t\t\t- Voucher Date\n\t\t\t\t\t- Due Date\n\t-->\n\t<table class='header-table' cellspacing=0>\n\t\t<thead>\n\t\t\t<tr><td><script>'<h1>' + (doc.select_print_heading || 'Delivery Note') + '</h1>'</script></td></tr>\n\t\t\t<tr><td><h3><script>cur_frm.docname</script></h3></td></tr>\n\t\t</thead>\n\t\t<tbody>\n\t\t\t<tr>\n\t\t\t\t<td width=60%><table width=100% cellspacing=0><tbody>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td width=22%><b>Name</b></td>\n\t\t\t\t\t\t<td><script>doc.customer_name</script></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><b>Address</b></td>\n\t\t\t\t\t\t<td><script>replace_newlines(doc.address_display)</script></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><b>Contact</b></td>\n\t\t\t\t\t\t<td><script>doc.contact_display</script></td>\n\t\t\t\t\t</tr>\n\t\t\t\t</tbody></table></td>\n\t\t\t\t<td><table width=100% cellspacing=0><tbody>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td width=63%><b>Delivery Note Date</b></td>\n\t\t\t\t\t\t<td><script>date.str_to_user(doc.transaction_date)</script></td>\n\t\t\t\t\t<tr>\t\t\t\t\t\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><b>Sales Order No.</b></td>\n\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t<script>doc.sales_order_no</script><br />\n\t\t\t\t\t\t\t<i>(<script>date.str_to_user(doc.posting_date)</script>)</i>\n\t\t\t\t\t\t</td>\n\t\t\t\t\t<tr>\t\t\t\t\t\n\t\t\t\t</tbody></table></td>\n\t\t\t</tr>\n\t\t</tbody>\n\t\t<tfoot>\n\t\t\n\t\t</tfoot>\n\t</table>\n</div>\n<div class='common page-body'>\n\t<!-- \n\t\tPage Body will contain\n\t\t\t+ table 2\n\t\t\t\t- Sales Invoice Data\n\t-->\n\t<script>si_std.print_item_table()</script>\n</div>\n<div class='common page-footer'>\n\t<!-- \n\t\tPage Footer will contain\n\t\t\t+ table 3\n\t\t\t\t- Terms and Conditions\n\t\t\t\t- Total Rounded Amount Calculation\n\t\t\t\t- Total Rounded Amount in Words\n\t-->\n\t<table class='footer-table' width=100% cellspacing=0>\n\t\t<thead>\n\t\t\t\n\t\t</thead>\n\t\t<tbody>\n\t\t\t<tr>\n\t\t\t\t<td width=60% style='padding-right: 10px;'>\n\t\t\t\t\t<b>Terms, Conditions &amp; Other Information:</b><br />\n\t\t\t\t\t<script>doc.terms</script>\n\t\t\t\t</td>\n\t\t\t\t<td>\n\t\t\t\t\t<table cellspacing=0 width=100%><tbody>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td>Net Total</td>\n\t\t\t\t\t\t\t<td style=\"width: 38%; text-align: right;\"><script>\n\t\t\t\t\t\t\t\tformat_currency(doc.net_total_export, doc.currency)\n\t\t\t\t\t\t\t</script></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr><td colspan=3><script>si_std.print_other_charges()</script></td></tr>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td>Grand Total</td>\n\t\t\t\t\t\t\t<td style=\"width: 38%; text-align: right;\"><script>\n\t\t\t\t\t\t\t\tformat_currency(doc.grand_total_export, doc.currency)\n\t\t\t\t\t\t\t</script></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr style='font-weight: bold'>\n\t\t\t\t\t\t\t<td>Rounded Total</td>\n\t\t\t\t\t\t\t<td style=\"width: 38%; text-align: right;\"><script>\n\t\t\t\t\t\t\t\tformat_currency(doc.rounded_total_export, doc.currency)\n\t\t\t\t\t\t\t</script></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t</tbody></table>\n\t\t\t\t\t<br /><b>In Words</b><br />\n\t\t\t\t\t<i><script>doc.in_words_export</script></i>\n\t\t\t\t</td>\n\t\t\t</tr>\t\t\n\t\t</tbody>\n\t\t<tfoot>\n\t\t\n\t\t</tfoot>\n\t</table>\n</div>", 
+ "idx": 1, 
+ "modified": "2014-02-11 17:36:51", 
+ "modified_by": "Administrator", 
+ "module": "Stock", 
+ "name": "Delivery Note Classic", 
+ "owner": "Administrator", 
+ "print_format_type": "Client", 
+ "standard": "Yes"
+}
\ No newline at end of file
diff --git a/erpnext/stock/Print Format/Delivery Note Modern/Delivery Note Modern.txt b/erpnext/stock/Print Format/Delivery Note Modern/Delivery Note Modern.txt
index 2c66867..907c3b5 100644
--- a/erpnext/stock/Print Format/Delivery Note Modern/Delivery Note Modern.txt
+++ b/erpnext/stock/Print Format/Delivery Note Modern/Delivery Note Modern.txt
@@ -1,22 +1,15 @@
-[
- {
-  "creation": "2013-04-19 13:31:11", 
-  "docstatus": 0, 
-  "modified": "2014-02-11 17:36:26", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "doc_type": "Delivery Note", 
-  "doctype": "Print Format", 
-  "html": "<!--\n\tSample Print Format for ERPNext\n\tPlease use at your own discretion\n\tFor suggestions and contributions:\n\t\thttps://github.com/frappe/erpnext-print-templates\n\n\tFreely usable under MIT license\n-->\n\n<!-- Style Settings -->\n<style>\n\t/*\n\t\tcommon style for whole page\n\t\tThis should include:\n\t\t+ page size related settings\n\t\t+ font family settings\n\t\t+ line spacing settings\n\t*/\n\t@media screen {\n\t\tbody {\n\t\t\twidth: 8.3in;\n\t\t}\n\t}\n\n\thtml, body, div, span, td {\n\t\tfont-family: \"Helvetica\", \"Arial\", sans-serif;\n\t\tfont-size: 12px;\n\t}\n\n\tbody {\n\t\tpadding: 10px;\n\t\tmargin: auto;\n\t\tfont-size: 12px;\n        line-height: 150%;\n\t}\n\n\t.common {\n\t\tfont-family: \"Helvetica\", \"Arial\", sans-serif !important;\n\t\tfont-size: 12px;\n\t\tpadding: 10px 0px;\n\t}\n\n\ttable {\n\t\tborder-collapse: collapse;\n\t\twidth: 100%;\n\t\tvertical-align: top;\n\t\tborder-style: none !important;\n\t}\n\n\ttable td {\n\t\tpadding: 2px 0px;\n\t\tborder-style: none !important;\n\t}\n\t\n\ttable h1, h2, h3, h4, h5, h6 {\n\t\tpadding: 0px;\n\t\tmargin: 0px;\n\t}\n\n\ttable.header-table td {\n\t\tvertical-align: top;\n\t}\n\n\ttable.header-table h1 {\n\t\ttext-transform: uppercase;\n\t\tcolor: white;\n\t\tfont-size: 55px;\n\t\tfont-style: italic;\n\t}\n\n\ttable.header-table thead tr:nth-child(1) div {\n\t\theight: 24px;\n\t\tbackground-color: #696969;\n\t\tvertical-align: middle;\n\t\tpadding: 12px 0px 0px 0px;\n\t\twidth: 100%;\n\t}\n\n\tdiv.page-body table td:nth-child(6),\n\tdiv.page-body table td:nth-child(7) {\n\t\ttext-align: right;\n\t}\n\n\tdiv.page-body table tr td {\n\t\tbackground-color: #DCDCDC !important;\n\t}\n\n\tdiv.page-body table tr:nth-child(1) td {\n\t\tbackground-color: #696969 !important;\n\t\tcolor: white !important;\n\t}\n\n\ttable.footer-table td {\n\t\tvertical-align: top;\n\t}\n\n\ttable.footer-table td table td:nth-child(2),\n\ttable.footer-table td table td:nth-child(3) {\n\t\ttext-align: right;\n\t}\n\n\ttable.footer-table tfoot td {\n\t\tbackground-color: #696969;\n\t\theight: 10px;\n\t}\n\n\t.imp-details {\n\t\tbackground-color: #DCDCDC;\n\t}\n</style>\n\n\n<!-- Javascript -->\n<script>\n\tsi_std = {\n\t\tprint_item_table: function() {\n\t\t\tvar table = print_table(\n\t\t\t\t'Delivery Note',\n\t\t\t\tdoc.name,\n\t\t\t\t'delivery_note_details',\n\t\t\t\t'Delivery Note Item',\n\t\t\t\t[// Here specify the table columns to be displayed\n\t\t\t\t\t'SR', 'item_code', 'item_name', 'description', 'qty', 'stock_uom',\n\t\t\t\t\t'base_rate', 'amount'\n\t\t\t\t],\n\t\t\t\t[// Here specify the labels of column headings\n\t\t\t\t\t'Sr', 'Item Code', 'Item Name', 'Description', 'Qty',\n\t\t\t\t\t'UoM', 'Basic Rate', 'Amount'\n\t\t\t\t],\n\t\t\t\t[// Here specify the column widths\n\t\t\t\t\t'3%', '10%', '15%', '32%', '5%',\n\t\t\t\t\t'5%', '15%', '15%'\n\t\t\t\t],\n\t\t\t\tnull,\n\t\t\t\tnull,\n\t\t\t\t{\n\t\t\t\t\t'description' : function(data_row) {\n\t\t\t\t\t\tvar to_append = ''\n\t\t\t\t\t\tif(data_row.discount_percentage){\n\t\t\t\t\t\t\tto_append = '<div style=\"padding-left: 15px;\"><i>Discount: ' + \n\t\t\t\t\t\t\t\tdata_row.discount_percentage + '% on ' +\n\t\t\t\t\t\t\t\tformat_currency(data_row.price_list_rate, doc.currency) + '</i></div>';\n\t\t\t\t\t\t\tif(data_row.description.indexOf(to_append)==-1) {\n\t\t\t\t\t\t\t\tdata_row.description = data_row.description + to_append;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(data_row.serial_no) {\n\t\t\t\t\t\t\tto_append = '<div style=\"padding-left: 15px;\"><i>Serial No.:' + \n\t\t\t\t\t\t\t\t((data_row.serial_no.indexOf('\\n')>-1)?'<br />':'&nbsp;') + \n\t\t\t\t\t\t\t\tdata_row.serial_no + '</i></div>';\n\t\t\t\t\t\t\tif(data_row.description.indexOf(to_append)==-1) {\n\t\t\t\t\t\t\t\tdata_row.description = data_row.description + to_append;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\n\t\t\t\t\t\treturn data_row.description;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t);\n\n\t\t\t// This code takes care of page breaks\n\t\t\tif(table.appendChild) {\n\t\t\t\tout = table.innerHTML;\n\t\t\t} else {\n\t\t\t\tout = '';\n\t\t\t\tfor(var i=0; i < (table.length-1); i++) {\n\t\t\t\t\tout += table[i].innerHTML + \n\t\t\t\t\t\t'<div style = \"page-break-after: always;\" \\\n\t\t\t\t\t\tclass = \"page_break\"></div>\\\n\t\t\t\t\t\t<div class=\"page-settings\"></div>';\n\t\t\t\t}\n\t\t\t\tout += table[table.length-1].innerHTML;\n\t\t\t}\n\t\t\treturn out;\n\t\t},\n\n\n\t\tprint_other_charges: function(parent) {\n\t\t\tvar oc = getchildren('Sales Taxes and Charges', doc.name, 'other_charges');\n\t\t\tvar rows = '<table width=100%>\\n';\n\t\t\tfor(var i=0; i<oc.length; i++) {\n\t\t\t\tif(!oc[i].included_in_print_rate) {\n\t\t\t\t\trows +=\n\t\t\t\t\t\t'<tr>\\n' +\n\t\t\t\t\t\t\t'\\t<td>' + oc[i].description + '</td>\\n' +\n\t\t\t\t\t\t\t'\\t<td style=\"width: 38%; text-align: right;\">' + format_currency(oc[i].tax_amount/doc.conversion_rate, doc.currency) + '</td>\\n' +\n\t\t\t\t\t\t'</tr>\\n';\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(doc.discount_amount) {\n\t\t\t\trows += '<tr>\\n' + \n\t\t\t\t\t\t'\\t<td>Discount Amount</td>\\n' + \n\t\t\t\t\t\t'\\t<td style=\"width: 38%; text-align: right;\">' + format_currency(doc.discount_amount, doc.currency) + '</td>\\n' + \n\t\t\t\t\t'</tr>\\n';\n\t\t\t}\n\n\t\t\treturn rows + '</table>\\n';\n\t\t}\n\t};\n</script>\n\n\n<!-- Page Layout Settings -->\n<div class='common page-header'>\n\t<!-- \n\t\tPage Header will contain\n\t\t\t+ table 1\n\t\t\t\t+ table 1a\n\t\t\t\t\t- Name\n\t\t\t\t\t- Address\n\t\t\t\t\t- Contact\n\t\t\t\t\t- Mobile No\n\t\t\t\t+ table 1b\n\t\t\t\t\t- Voucher Date\n\t\t\t\t\t- Due Date\n\t-->\n\t<table class='header-table' cellspacing=0>\n\t\t<thead>\n\t\t\t<tr><td colspan=2><div><script>'<h1>' + (doc.select_print_heading || 'Delivery Note') + '</h1>'</script></div></td></tr>\n\t\t\t<tr><td colspan=2><div style=\"height:15px\"></div></td></tr>\n\t\t</thead>\n\t\t<tbody>\n\t\t\t<tr>\n\t\t\t\t<td width=60%><table width=100% cellspacing=0><tbody>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td width=22%><b>Name</b></td>\n\t\t\t\t\t\t<td><script>doc.customer_name</script></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><b>Address</b></td>\n\t\t\t\t\t\t<td><script>replace_newlines(doc.address_display)</script></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><b>Contact</b></td>\n\t\t\t\t\t\t<td><script>doc.contact_display</script></td>\n\t\t\t\t\t</tr>\n\t\t\t\t</tbody></table></td>\n\t\t\t\t<td><table width=100% cellspacing=0><tbody>\n\t\t\t\t\t<tr class='imp-details'>\n\t\t\t\t\t\t<td><b>Delivery Note No.</b></td>\n\t\t\t\t\t\t<td><script>cur_frm.docname</script></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td width=63%><b>Delivery Note Date</b></td>\n\t\t\t\t\t\t<td><script>date.str_to_user(doc.transaction_date)</script></td>\n\t\t\t\t\t<tr>\t\t\t\t\t\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><b>Sales Order No.</b></td>\n\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t<script>doc.sales_order_no</script><br />\n\t\t\t\t\t\t\t<i>(<script>date.str_to_user(doc.posting_date)</script>)</i>\n\t\t\t\t\t\t</td>\n\t\t\t\t\t<tr>\t\t\t\t\t\n\t\t\t\t</tbody></table></td>\n\t\t\t</tr>\n\t\t</tbody>\n\t\t<tfoot>\n\t\t\n\t\t</tfoot>\n\t</table>\n</div>\n<div class='common page-body'>\n\t<!-- \n\t\tPage Body will contain\n\t\t\t+ table 2\n\t\t\t\t- Sales Invoice Data\n\t-->\n\t<script>si_std.print_item_table()</script>\n</div>\n<div class='common page-footer'>\n\t<!-- \n\t\tPage Footer will contain\n\t\t\t+ table 3\n\t\t\t\t- Terms and Conditions\n\t\t\t\t- Total Rounded Amount Calculation\n\t\t\t\t- Total Rounded Amount in Words\n\t-->\n\t<table class='footer-table' width=100% cellspacing=0>\n\t\t<thead>\n\t\t\t\n\t\t</thead>\n\t\t<tbody>\n\t\t\t<tr>\n\t\t\t\t<td width=60% style='padding-right: 10px;'>\n\t\t\t\t\t<b>Terms, Conditions &amp; Other Information:</b><br />\n\t\t\t\t\t<script>doc.terms</script>\n\t\t\t\t</td>\n\t\t\t\t<td>\n\t\t\t\t\t<table cellspacing=0 width=100%><tbody>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td>Net Total</td>\n\t\t\t\t\t\t\t<td style=\"width: 38%; text-align: right;\"><script>\n\t\t\t\t\t\t\t\tformat_currency(doc.net_total_export, doc.currency)\n\t\t\t\t\t\t\t</script></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr><td colspan=3><script>si_std.print_other_charges()</script></td></tr>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td>Grand Total</td>\n\t\t\t\t\t\t\t<td style=\"width: 38%; text-align: right;\"><script>\n\t\t\t\t\t\t\t\tformat_currency(doc.grand_total_export, doc.currency)\n\t\t\t\t\t\t\t</script></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr style='font-weight: bold' class='imp-details'>\n\t\t\t\t\t\t\t<td>Rounded Total</td>\n\t\t\t\t\t\t\t<td style=\"width: 38%; text-align: right;\"><script>\n\t\t\t\t\t\t\t\tformat_currency(doc.rounded_total_export, doc.currency)\n\t\t\t\t\t\t\t</script></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t</tbody></table>\n\t\t\t\t\t<br /><b>In Words</b><br />\n\t\t\t\t\t<i><script>doc.in_words_export</script></i>\n\t\t\t\t</td>\n\t\t\t</tr>\t\t\n\t\t</tbody>\n\t\t<tfoot>\n\t\t\t<tr><td colspan=2><div></div></td><tr>\n\t\t</tfoot>\n\t</table>\n</div>", 
-  "module": "Stock", 
-  "name": "__common__", 
-  "print_format_type": "Client", 
-  "standard": "Yes"
- }, 
- {
-  "doctype": "Print Format", 
-  "name": "Delivery Note Modern"
- }
-]
\ No newline at end of file
+{
+ "creation": "2013-04-19 13:31:11", 
+ "doc_type": "Delivery Note", 
+ "docstatus": 0, 
+ "doctype": "Print Format", 
+ "html": "<!--\n\tSample Print Format for ERPNext\n\tPlease use at your own discretion\n\tFor suggestions and contributions:\n\t\thttps://github.com/frappe/erpnext-print-templates\n\n\tFreely usable under MIT license\n-->\n\n<!-- Style Settings -->\n<style>\n\t/*\n\t\tcommon style for whole page\n\t\tThis should include:\n\t\t+ page size related settings\n\t\t+ font family settings\n\t\t+ line spacing settings\n\t*/\n\t@media screen {\n\t\tbody {\n\t\t\twidth: 8.3in;\n\t\t}\n\t}\n\n\thtml, body, div, span, td {\n\t\tfont-family: \"Helvetica\", \"Arial\", sans-serif;\n\t\tfont-size: 12px;\n\t}\n\n\tbody {\n\t\tpadding: 10px;\n\t\tmargin: auto;\n\t\tfont-size: 12px;\n        line-height: 150%;\n\t}\n\n\t.common {\n\t\tfont-family: \"Helvetica\", \"Arial\", sans-serif !important;\n\t\tfont-size: 12px;\n\t\tpadding: 10px 0px;\n\t}\n\n\ttable {\n\t\tborder-collapse: collapse;\n\t\twidth: 100%;\n\t\tvertical-align: top;\n\t\tborder-style: none !important;\n\t}\n\n\ttable td {\n\t\tpadding: 2px 0px;\n\t\tborder-style: none !important;\n\t}\n\t\n\ttable h1, h2, h3, h4, h5, h6 {\n\t\tpadding: 0px;\n\t\tmargin: 0px;\n\t}\n\n\ttable.header-table td {\n\t\tvertical-align: top;\n\t}\n\n\ttable.header-table h1 {\n\t\ttext-transform: uppercase;\n\t\tcolor: white;\n\t\tfont-size: 55px;\n\t\tfont-style: italic;\n\t}\n\n\ttable.header-table thead tr:nth-child(1) div {\n\t\theight: 24px;\n\t\tbackground-color: #696969;\n\t\tvertical-align: middle;\n\t\tpadding: 12px 0px 0px 0px;\n\t\twidth: 100%;\n\t}\n\n\tdiv.page-body table td:nth-child(6),\n\tdiv.page-body table td:nth-child(7) {\n\t\ttext-align: right;\n\t}\n\n\tdiv.page-body table tr td {\n\t\tbackground-color: #DCDCDC !important;\n\t}\n\n\tdiv.page-body table tr:nth-child(1) td {\n\t\tbackground-color: #696969 !important;\n\t\tcolor: white !important;\n\t}\n\n\ttable.footer-table td {\n\t\tvertical-align: top;\n\t}\n\n\ttable.footer-table td table td:nth-child(2),\n\ttable.footer-table td table td:nth-child(3) {\n\t\ttext-align: right;\n\t}\n\n\ttable.footer-table tfoot td {\n\t\tbackground-color: #696969;\n\t\theight: 10px;\n\t}\n\n\t.imp-details {\n\t\tbackground-color: #DCDCDC;\n\t}\n</style>\n\n\n<!-- Javascript -->\n<script>\n\tsi_std = {\n\t\tprint_item_table: function() {\n\t\t\tvar table = print_table(\n\t\t\t\t'Delivery Note',\n\t\t\t\tdoc.name,\n\t\t\t\t'delivery_note_details',\n\t\t\t\t'Delivery Note Item',\n\t\t\t\t[// Here specify the table columns to be displayed\n\t\t\t\t\t'SR', 'item_code', 'item_name', 'description', 'qty', 'stock_uom',\n\t\t\t\t\t'base_rate', 'amount'\n\t\t\t\t],\n\t\t\t\t[// Here specify the labels of column headings\n\t\t\t\t\t'Sr', 'Item Code', 'Item Name', 'Description', 'Qty',\n\t\t\t\t\t'UoM', 'Basic Rate', 'Amount'\n\t\t\t\t],\n\t\t\t\t[// Here specify the column widths\n\t\t\t\t\t'3%', '10%', '15%', '32%', '5%',\n\t\t\t\t\t'5%', '15%', '15%'\n\t\t\t\t],\n\t\t\t\tnull,\n\t\t\t\tnull,\n\t\t\t\t{\n\t\t\t\t\t'description' : function(data_row) {\n\t\t\t\t\t\tvar to_append = ''\n\t\t\t\t\t\tif(data_row.discount_percentage){\n\t\t\t\t\t\t\tto_append = '<div style=\"padding-left: 15px;\"><i>Discount: ' + \n\t\t\t\t\t\t\t\tdata_row.discount_percentage + '% on ' +\n\t\t\t\t\t\t\t\tformat_currency(data_row.price_list_rate, doc.currency) + '</i></div>';\n\t\t\t\t\t\t\tif(data_row.description.indexOf(to_append)==-1) {\n\t\t\t\t\t\t\t\tdata_row.description = data_row.description + to_append;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(data_row.serial_no) {\n\t\t\t\t\t\t\tto_append = '<div style=\"padding-left: 15px;\"><i>Serial No.:' + \n\t\t\t\t\t\t\t\t((data_row.serial_no.indexOf('\\n')>-1)?'<br />':'&nbsp;') + \n\t\t\t\t\t\t\t\tdata_row.serial_no + '</i></div>';\n\t\t\t\t\t\t\tif(data_row.description.indexOf(to_append)==-1) {\n\t\t\t\t\t\t\t\tdata_row.description = data_row.description + to_append;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\n\t\t\t\t\t\treturn data_row.description;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t);\n\n\t\t\t// This code takes care of page breaks\n\t\t\tif(table.appendChild) {\n\t\t\t\tout = table.innerHTML;\n\t\t\t} else {\n\t\t\t\tout = '';\n\t\t\t\tfor(var i=0; i < (table.length-1); i++) {\n\t\t\t\t\tout += table[i].innerHTML + \n\t\t\t\t\t\t'<div style = \"page-break-after: always;\" \\\n\t\t\t\t\t\tclass = \"page_break\"></div>\\\n\t\t\t\t\t\t<div class=\"page-settings\"></div>';\n\t\t\t\t}\n\t\t\t\tout += table[table.length-1].innerHTML;\n\t\t\t}\n\t\t\treturn out;\n\t\t},\n\n\n\t\tprint_other_charges: function(parent) {\n\t\t\tvar oc = getchildren('Sales Taxes and Charges', doc.name, 'other_charges');\n\t\t\tvar rows = '<table width=100%>\\n';\n\t\t\tfor(var i=0; i<oc.length; i++) {\n\t\t\t\tif(!oc[i].included_in_print_rate) {\n\t\t\t\t\trows +=\n\t\t\t\t\t\t'<tr>\\n' +\n\t\t\t\t\t\t\t'\\t<td>' + oc[i].description + '</td>\\n' +\n\t\t\t\t\t\t\t'\\t<td style=\"width: 38%; text-align: right;\">' + format_currency(oc[i].tax_amount/doc.conversion_rate, doc.currency) + '</td>\\n' +\n\t\t\t\t\t\t'</tr>\\n';\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(doc.discount_amount) {\n\t\t\t\trows += '<tr>\\n' + \n\t\t\t\t\t\t'\\t<td>Discount Amount</td>\\n' + \n\t\t\t\t\t\t'\\t<td style=\"width: 38%; text-align: right;\">' + format_currency(doc.discount_amount, doc.currency) + '</td>\\n' + \n\t\t\t\t\t'</tr>\\n';\n\t\t\t}\n\n\t\t\treturn rows + '</table>\\n';\n\t\t}\n\t};\n</script>\n\n\n<!-- Page Layout Settings -->\n<div class='common page-header'>\n\t<!-- \n\t\tPage Header will contain\n\t\t\t+ table 1\n\t\t\t\t+ table 1a\n\t\t\t\t\t- Name\n\t\t\t\t\t- Address\n\t\t\t\t\t- Contact\n\t\t\t\t\t- Mobile No\n\t\t\t\t+ table 1b\n\t\t\t\t\t- Voucher Date\n\t\t\t\t\t- Due Date\n\t-->\n\t<table class='header-table' cellspacing=0>\n\t\t<thead>\n\t\t\t<tr><td colspan=2><div><script>'<h1>' + (doc.select_print_heading || 'Delivery Note') + '</h1>'</script></div></td></tr>\n\t\t\t<tr><td colspan=2><div style=\"height:15px\"></div></td></tr>\n\t\t</thead>\n\t\t<tbody>\n\t\t\t<tr>\n\t\t\t\t<td width=60%><table width=100% cellspacing=0><tbody>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td width=22%><b>Name</b></td>\n\t\t\t\t\t\t<td><script>doc.customer_name</script></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><b>Address</b></td>\n\t\t\t\t\t\t<td><script>replace_newlines(doc.address_display)</script></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><b>Contact</b></td>\n\t\t\t\t\t\t<td><script>doc.contact_display</script></td>\n\t\t\t\t\t</tr>\n\t\t\t\t</tbody></table></td>\n\t\t\t\t<td><table width=100% cellspacing=0><tbody>\n\t\t\t\t\t<tr class='imp-details'>\n\t\t\t\t\t\t<td><b>Delivery Note No.</b></td>\n\t\t\t\t\t\t<td><script>cur_frm.docname</script></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td width=63%><b>Delivery Note Date</b></td>\n\t\t\t\t\t\t<td><script>date.str_to_user(doc.transaction_date)</script></td>\n\t\t\t\t\t<tr>\t\t\t\t\t\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><b>Sales Order No.</b></td>\n\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t<script>doc.sales_order_no</script><br />\n\t\t\t\t\t\t\t<i>(<script>date.str_to_user(doc.posting_date)</script>)</i>\n\t\t\t\t\t\t</td>\n\t\t\t\t\t<tr>\t\t\t\t\t\n\t\t\t\t</tbody></table></td>\n\t\t\t</tr>\n\t\t</tbody>\n\t\t<tfoot>\n\t\t\n\t\t</tfoot>\n\t</table>\n</div>\n<div class='common page-body'>\n\t<!-- \n\t\tPage Body will contain\n\t\t\t+ table 2\n\t\t\t\t- Sales Invoice Data\n\t-->\n\t<script>si_std.print_item_table()</script>\n</div>\n<div class='common page-footer'>\n\t<!-- \n\t\tPage Footer will contain\n\t\t\t+ table 3\n\t\t\t\t- Terms and Conditions\n\t\t\t\t- Total Rounded Amount Calculation\n\t\t\t\t- Total Rounded Amount in Words\n\t-->\n\t<table class='footer-table' width=100% cellspacing=0>\n\t\t<thead>\n\t\t\t\n\t\t</thead>\n\t\t<tbody>\n\t\t\t<tr>\n\t\t\t\t<td width=60% style='padding-right: 10px;'>\n\t\t\t\t\t<b>Terms, Conditions &amp; Other Information:</b><br />\n\t\t\t\t\t<script>doc.terms</script>\n\t\t\t\t</td>\n\t\t\t\t<td>\n\t\t\t\t\t<table cellspacing=0 width=100%><tbody>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td>Net Total</td>\n\t\t\t\t\t\t\t<td style=\"width: 38%; text-align: right;\"><script>\n\t\t\t\t\t\t\t\tformat_currency(doc.net_total_export, doc.currency)\n\t\t\t\t\t\t\t</script></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr><td colspan=3><script>si_std.print_other_charges()</script></td></tr>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td>Grand Total</td>\n\t\t\t\t\t\t\t<td style=\"width: 38%; text-align: right;\"><script>\n\t\t\t\t\t\t\t\tformat_currency(doc.grand_total_export, doc.currency)\n\t\t\t\t\t\t\t</script></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr style='font-weight: bold' class='imp-details'>\n\t\t\t\t\t\t\t<td>Rounded Total</td>\n\t\t\t\t\t\t\t<td style=\"width: 38%; text-align: right;\"><script>\n\t\t\t\t\t\t\t\tformat_currency(doc.rounded_total_export, doc.currency)\n\t\t\t\t\t\t\t</script></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t</tbody></table>\n\t\t\t\t\t<br /><b>In Words</b><br />\n\t\t\t\t\t<i><script>doc.in_words_export</script></i>\n\t\t\t\t</td>\n\t\t\t</tr>\t\t\n\t\t</tbody>\n\t\t<tfoot>\n\t\t\t<tr><td colspan=2><div></div></td><tr>\n\t\t</tfoot>\n\t</table>\n</div>", 
+ "idx": 1, 
+ "modified": "2014-02-11 17:36:26", 
+ "modified_by": "Administrator", 
+ "module": "Stock", 
+ "name": "Delivery Note Modern", 
+ "owner": "Administrator", 
+ "print_format_type": "Client", 
+ "standard": "Yes"
+}
\ No newline at end of file
diff --git a/erpnext/stock/Print Format/Delivery Note Packing List Wise/Delivery Note Packing List Wise.txt b/erpnext/stock/Print Format/Delivery Note Packing List Wise/Delivery Note Packing List Wise.txt
index 1d33833..b0976c2 100644
--- a/erpnext/stock/Print Format/Delivery Note Packing List Wise/Delivery Note Packing List Wise.txt
+++ b/erpnext/stock/Print Format/Delivery Note Packing List Wise/Delivery Note Packing List Wise.txt
@@ -1,20 +1,13 @@
-[
- {
-  "owner": "Administrator", 
-  "docstatus": 0, 
-  "creation": "2011-08-23 16:49:40", 
-  "modified_by": "Administrator", 
-  "modified": "2011-10-19 14:12:11"
- }, 
- {
-  "name": "__common__", 
-  "module": "Stock", 
-  "standard": "Yes", 
-  "html": "<html>\n<head>\n\n<script>\nfunction replaceAll(s,s1,s2){ return s.split(s1).join(s2);}\n\nfunction get_letter_head() {\n\t// add letter head\n\tvar cp = locals['Control Panel']['Control Panel'];\n\tif(doc.letter_head)\n\t\tvar lh= cstr(_p.letter_heads[doc.letter_head]);\n\telse if(cp.letter_head)\n\t\tvar lh= cp.letter_head;\n\telse \n\t\tvar lh= '';\n\t\t\n\treturn lh;\n}\n\n</script>\n<style>\n.cust_tbl { border-collapse:collapse; }\n.cust_tbl td { border:1px solid #848484; font-size: 13px}\n.large_font td {font-size: 13px}\n</style>\n</head>\n\n<body>\n<script>\nreplaceAll(doc.print_packing_slip,'[HEADER GOES HERE]',get_letter_head());\n</script>\n</body>\n</html>", 
-  "doctype": "Print Format"
- }, 
- {
-  "name": "Delivery Note Packing List Wise", 
-  "doctype": "Print Format"
- }
-]
\ No newline at end of file
+{
+ "creation": "2011-08-23 16:49:40", 
+ "docstatus": 0, 
+ "doctype": "Print Format", 
+ "html": "<html>\n<head>\n\n<script>\nfunction replaceAll(s,s1,s2){ return s.split(s1).join(s2);}\n\nfunction get_letter_head() {\n\t// add letter head\n\tvar cp = locals['Control Panel']['Control Panel'];\n\tif(doc.letter_head)\n\t\tvar lh= cstr(_p.letter_heads[doc.letter_head]);\n\telse if(cp.letter_head)\n\t\tvar lh= cp.letter_head;\n\telse \n\t\tvar lh= '';\n\t\t\n\treturn lh;\n}\n\n</script>\n<style>\n.cust_tbl { border-collapse:collapse; }\n.cust_tbl td { border:1px solid #848484; font-size: 13px}\n.large_font td {font-size: 13px}\n</style>\n</head>\n\n<body>\n<script>\nreplaceAll(doc.print_packing_slip,'[HEADER GOES HERE]',get_letter_head());\n</script>\n</body>\n</html>", 
+ "idx": 1, 
+ "modified": "2011-10-19 14:12:11", 
+ "modified_by": "Administrator", 
+ "module": "Stock", 
+ "name": "Delivery Note Packing List Wise", 
+ "owner": "Administrator", 
+ "standard": "Yes"
+}
\ No newline at end of file
diff --git a/erpnext/stock/Print Format/Delivery Note Spartan/Delivery Note Spartan.txt b/erpnext/stock/Print Format/Delivery Note Spartan/Delivery Note Spartan.txt
index 4b62d70..5e341f3 100644
--- a/erpnext/stock/Print Format/Delivery Note Spartan/Delivery Note Spartan.txt
+++ b/erpnext/stock/Print Format/Delivery Note Spartan/Delivery Note Spartan.txt
@@ -1,22 +1,15 @@
-[
- {
-  "creation": "2013-04-19 13:31:11", 
-  "docstatus": 0, 
-  "modified": "2014-02-11 17:37:14", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "doc_type": "Delivery Note", 
-  "doctype": "Print Format", 
-  "html": "<!--\n\tSample Print Format for ERPNext\n\tPlease use at your own discretion\n\tFor suggestions and contributions:\n\t\thttps://github.com/frappe/erpnext-print-templates\n\n\tFreely usable under MIT license\n-->\n\n<!-- Style Settings -->\n<style>\n\t/*\n\t\tcommon style for whole page\n\t\tThis should include:\n\t\t+ page size related settings\n\t\t+ font family settings\n\t\t+ line spacing settings\n\t*/\n\t@media screen {\n\t\tbody {\n\t\t\twidth: 8.3in;\n\t\t}\n\t}\n\n\thtml, body, div, span, td {\n\t\tfont-family: \"Arial\", sans-serif;\n\t\tfont-size: 12px;\n\t}\n\n\tbody {\n\t\tpadding: 10px;\n\t\tmargin: auto;\n\t\tfont-size: 12px;\n\t}\n\n\t.common {\n\t\tfont-family: \"Arial\", sans-serif !important;\n\t\tfont-size: 12px;\n\t\tpadding: 0px;\n\t}\n\n\ttable {\n\t\twidth: 100% !important;\n\t\tvertical-align: top;\n\t}\n\n\ttable td {\n\t\tpadding: 2px 0px;\n\t}\n\n\ttable, td {\n\t\tborder-collapse: collapse !important;\n\t\tpadding: 0px;\n\t\tmargin: 0px !important;\n\t}\n\t\n\ttable h1, h2, h3, h4, h5, h6 {\n\t\tpadding: 0px;\n\t\tmargin: 0px;\n\t}\n\n\ttable.header-table td {\n\t\tvertical-align: top;\n\t}\n\n\ttable.header-table h3 {\n\t\tcolor: gray;\n\t}\n\n\ttable.header-table thead td {\n\t\tpadding: 5px;\n\t}\n\n\ttable.header-table > thead,\n\ttable.header-table > tbody > tr > td,\n\ttable.footer-table > tbody > tr > td {\n\t\tborder: 1px solid black;\n\t\tpadding: 5px;\n\t}\n\n\ttable.footer-table > tbody,\n\ttable.header-table > thead {\n\t\tborder-bottom: 3px solid black;\n\t}\n\n\ttable.header-table > thead {\n\t\tborder-top: 3px solid black;\n\t}\n\n\tdiv.page-body table td:nth-child(6),\n\tdiv.page-body table td:nth-child(7) {\n\t\ttext-align: right;\n\t}\n\n\tdiv.page-body td {\n\t\tbackground-color: white !important;\n\t\tborder: 1px solid black !important;\n\t}\n\n\ttable.footer-table td {\n\t\tvertical-align: top;\n\t}\n\n\ttable.footer-table td table td:nth-child(2),\n\ttable.footer-table td table td:nth-child(3) {\n\t\ttext-align: right;\n\t}\n</style>\n\n\n<!-- Javascript -->\n<script>\n\tsi_std = {\n\t\tprint_item_table: function() {\n\t\t\tvar table = print_table(\n\t\t\t\t'Delivery Note',\n\t\t\t\tdoc.name,\n\t\t\t\t'delivery_note_details',\n\t\t\t\t'Delivery Note Item',\n\t\t\t\t[// Here specify the table columns to be displayed\n\t\t\t\t\t'SR', 'item_code', 'item_name', 'description', 'qty', 'stock_uom',\n\t\t\t\t\t'base_rate', 'amount'\n\t\t\t\t],\n\t\t\t\t[// Here specify the labels of column headings\n\t\t\t\t\t'Sr', 'Item Code', 'Item Name', 'Description', 'Qty',\n\t\t\t\t\t'UoM', 'Basic Rate', 'Amount'\n\t\t\t\t],\n\t\t\t\t[// Here specify the column widths\n\t\t\t\t\t'3%', '10%', '15%', '32%', '5%',\n\t\t\t\t\t'5%', '15%', '15%'\n\t\t\t\t],\n\t\t\t\tnull,\n\t\t\t\tnull,\n\t\t\t\t{\n\t\t\t\t\t'description' : function(data_row) {\n\t\t\t\t\t\tvar to_append = ''\n\t\t\t\t\t\tif(data_row.discount_percentage){\n\t\t\t\t\t\t\tto_append = '<div style=\"padding-left: 15px;\"><i>Discount: ' + \n\t\t\t\t\t\t\t\tdata_row.discount_percentage + '% on ' +\n\t\t\t\t\t\t\t\tformat_currency(data_row.price_list_rate, doc.currency) + '</i></div>';\n\t\t\t\t\t\t\tif(data_row.description.indexOf(to_append)==-1) {\n\t\t\t\t\t\t\t\tdata_row.description = data_row.description + to_append;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(data_row.serial_no) {\n\t\t\t\t\t\t\tto_append = '<div style=\"padding-left: 15px;\"><i>Serial No.:' + \n\t\t\t\t\t\t\t\t((data_row.serial_no.indexOf('\\n')>-1)?'<br />':'&nbsp;') + \n\t\t\t\t\t\t\t\tdata_row.serial_no + '</i></div>';\n\t\t\t\t\t\t\tif(data_row.description.indexOf(to_append)==-1) {\n\t\t\t\t\t\t\t\tdata_row.description = data_row.description + to_append;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\n\t\t\t\t\t\treturn data_row.description;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t);\n\n\t\t\t// This code takes care of page breaks\n\t\t\tif(table.appendChild) {\n\t\t\t\tout = table.innerHTML;\n\t\t\t} else {\n\t\t\t\tout = '';\n\t\t\t\tfor(var i=0; i < (table.length-1); i++) {\n\t\t\t\t\tout += table[i].innerHTML + \n\t\t\t\t\t\t'<div style = \"page-break-after: always;\" \\\n\t\t\t\t\t\tclass = \"page_break\"></div>\\\n\t\t\t\t\t\t<div class=\"page-settings\"></div>';\n\t\t\t\t}\n\t\t\t\tout += table[table.length-1].innerHTML;\n\t\t\t}\n\t\t\treturn out;\n\t\t},\n\n\n\t\tprint_other_charges: function(parent) {\n\t\t\tvar oc = getchildren('Sales Taxes and Charges', doc.name, 'other_charges');\n\t\t\tvar rows = '<table width=100%>\\n';\n\t\t\tfor(var i=0; i<oc.length; i++) {\n\t\t\t\tif(!oc[i].included_in_print_rate) {\n\t\t\t\t\trows +=\n\t\t\t\t\t\t'<tr>\\n' +\n\t\t\t\t\t\t\t'\\t<td>' + oc[i].description + '</td>\\n' +\n\t\t\t\t\t\t\t'\\t<td style=\"width: 38%; text-align: right;\">' + format_currency(oc[i].tax_amount/doc.conversion_rate, doc.currency) + '</td>\\n' +\n\t\t\t\t\t\t'</tr>\\n';\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(doc.discount_amount) {\n\t\t\t\trows += '<tr>\\n' + \n\t\t\t\t\t\t'\\t<td>Discount Amount</td>\\n' + \n\t\t\t\t\t\t'\\t<td style=\"width: 38%; text-align: right;\">' + format_currency(doc.discount_amount, doc.currency) + '</td>\\n' + \n\t\t\t\t\t'</tr>\\n';\n\t\t\t}\n\n\t\t\treturn rows + '</table>\\n';\n\t\t}\n\t};\n</script>\n\n\n<!-- Page Layout Settings -->\n<div class='common page-header'>\n\t<!-- \n\t\tPage Header will contain\n\t\t\t+ table 1\n\t\t\t\t+ table 1a\n\t\t\t\t\t- Name\n\t\t\t\t\t- Address\n\t\t\t\t\t- Contact\n\t\t\t\t\t- Mobile No\n\t\t\t\t+ table 1b\n\t\t\t\t\t- Voucher Date\n\t\t\t\t\t- Due Date\n\t-->\n\t<table class='header-table' cellspacing=0>\n\t\t<thead>\n\t\t\t<tr><td colspan=2><script>'<h1>' + (doc.select_print_heading || 'Delivery Note') + '</h1>'</script></td></tr>\n\t\t\t<tr><td colspan=2><h3><script>cur_frm.docname</script></h3></td></tr>\n\t\t</thead>\n\t\t<tbody>\n\t\t\t<tr>\n\t\t\t\t<td width=60%><table width=100% cellspacing=0><tbody>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td width=22%><b>Name</b></td>\n\t\t\t\t\t\t<td><script>doc.customer_name</script></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><b>Address</b></td>\n\t\t\t\t\t\t<td><script>replace_newlines(doc.address_display)</script></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><b>Contact</b></td>\n\t\t\t\t\t\t<td><script>doc.contact_display</script></td>\n\t\t\t\t\t</tr>\n\t\t\t\t</tbody></table></td>\n\t\t\t\t<td><table width=100% cellspacing=0><tbody>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td width=63%><b>Delivery Note Date</b></td>\n\t\t\t\t\t\t<td><script>date.str_to_user(doc.transaction_date)</script></td>\n\t\t\t\t\t<tr>\t\t\t\t\t\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><b>Sales Order No.</b></td>\n\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t<script>doc.sales_order_no</script><br />\n\t\t\t\t\t\t\t<i>(<script>date.str_to_user(doc.posting_date)</script>)</i>\n\t\t\t\t\t\t</td>\n\t\t\t\t\t<tr>\t\t\t\t\t\n\t\t\t\t</tbody></table></td>\n\t\t\t</tr>\n\t\t</tbody>\n\t\t<tfoot>\n\t\t\n\t\t</tfoot>\n\t</table>\n</div>\n<div class='common page-body'>\n\t<!-- \n\t\tPage Body will contain\n\t\t\t+ table 2\n\t\t\t\t- Sales Invoice Data\n\t-->\n\t<script>si_std.print_item_table()</script>\n</div>\n<div class='common page-footer'>\n\t<!-- \n\t\tPage Footer will contain\n\t\t\t+ table 3\n\t\t\t\t- Terms and Conditions\n\t\t\t\t- Total Rounded Amount Calculation\n\t\t\t\t- Total Rounded Amount in Words\n\t-->\n\t<table class='footer-table' width=100% cellspacing=0>\n\t\t<thead>\n\t\t\t\n\t\t</thead>\n\t\t<tbody>\n\t\t\t<tr>\n\t\t\t\t<td width=60% style='padding-right: 10px;'>\n\t\t\t\t\t<b>Terms, Conditions &amp; Other Information:</b><br />\n\t\t\t\t\t<script>doc.terms</script>\n\t\t\t\t</td>\n\t\t\t\t<td>\n\t\t\t\t\t<table cellspacing=0 width=100%><tbody>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td>Net Total</td>\n\t\t\t\t\t\t\t<td style=\"width: 38%; text-align: right;\"><script>\n\t\t\t\t\t\t\t\tformat_currency(doc.net_total_export, doc.currency)\n\t\t\t\t\t\t\t</script></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr><td colspan=3><script>si_std.print_other_charges()</script></td></tr>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td>Grand Total</td>\n\t\t\t\t\t\t\t<td style=\"width: 38%; text-align: right;\"><script>\n\t\t\t\t\t\t\t\tformat_currency(doc.grand_total_export, doc.currency)\n\t\t\t\t\t\t\t</script></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr style='font-weight: bold'>\n\t\t\t\t\t\t\t<td>Rounded Total</td>\n\t\t\t\t\t\t\t<td style=\"width: 38%; text-align: right;\"><script>\n\t\t\t\t\t\t\t\tformat_currency(doc.rounded_total_export, doc.currency)\n\t\t\t\t\t\t\t</script></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t</tbody></table>\n\t\t\t\t\t<br /><b>In Words</b><br />\n\t\t\t\t\t<i><script>doc.in_words_export</script></i>\n\t\t\t\t</td>\n\t\t\t</tr>\t\t\n\t\t</tbody>\n\t\t<tfoot>\n\t\t\n\t\t</tfoot>\n\t</table>\n</div>", 
-  "module": "Stock", 
-  "name": "__common__", 
-  "print_format_type": "Client", 
-  "standard": "Yes"
- }, 
- {
-  "doctype": "Print Format", 
-  "name": "Delivery Note Spartan"
- }
-]
\ No newline at end of file
+{
+ "creation": "2013-04-19 13:31:11", 
+ "doc_type": "Delivery Note", 
+ "docstatus": 0, 
+ "doctype": "Print Format", 
+ "html": "<!--\n\tSample Print Format for ERPNext\n\tPlease use at your own discretion\n\tFor suggestions and contributions:\n\t\thttps://github.com/frappe/erpnext-print-templates\n\n\tFreely usable under MIT license\n-->\n\n<!-- Style Settings -->\n<style>\n\t/*\n\t\tcommon style for whole page\n\t\tThis should include:\n\t\t+ page size related settings\n\t\t+ font family settings\n\t\t+ line spacing settings\n\t*/\n\t@media screen {\n\t\tbody {\n\t\t\twidth: 8.3in;\n\t\t}\n\t}\n\n\thtml, body, div, span, td {\n\t\tfont-family: \"Arial\", sans-serif;\n\t\tfont-size: 12px;\n\t}\n\n\tbody {\n\t\tpadding: 10px;\n\t\tmargin: auto;\n\t\tfont-size: 12px;\n\t}\n\n\t.common {\n\t\tfont-family: \"Arial\", sans-serif !important;\n\t\tfont-size: 12px;\n\t\tpadding: 0px;\n\t}\n\n\ttable {\n\t\twidth: 100% !important;\n\t\tvertical-align: top;\n\t}\n\n\ttable td {\n\t\tpadding: 2px 0px;\n\t}\n\n\ttable, td {\n\t\tborder-collapse: collapse !important;\n\t\tpadding: 0px;\n\t\tmargin: 0px !important;\n\t}\n\t\n\ttable h1, h2, h3, h4, h5, h6 {\n\t\tpadding: 0px;\n\t\tmargin: 0px;\n\t}\n\n\ttable.header-table td {\n\t\tvertical-align: top;\n\t}\n\n\ttable.header-table h3 {\n\t\tcolor: gray;\n\t}\n\n\ttable.header-table thead td {\n\t\tpadding: 5px;\n\t}\n\n\ttable.header-table > thead,\n\ttable.header-table > tbody > tr > td,\n\ttable.footer-table > tbody > tr > td {\n\t\tborder: 1px solid black;\n\t\tpadding: 5px;\n\t}\n\n\ttable.footer-table > tbody,\n\ttable.header-table > thead {\n\t\tborder-bottom: 3px solid black;\n\t}\n\n\ttable.header-table > thead {\n\t\tborder-top: 3px solid black;\n\t}\n\n\tdiv.page-body table td:nth-child(6),\n\tdiv.page-body table td:nth-child(7) {\n\t\ttext-align: right;\n\t}\n\n\tdiv.page-body td {\n\t\tbackground-color: white !important;\n\t\tborder: 1px solid black !important;\n\t}\n\n\ttable.footer-table td {\n\t\tvertical-align: top;\n\t}\n\n\ttable.footer-table td table td:nth-child(2),\n\ttable.footer-table td table td:nth-child(3) {\n\t\ttext-align: right;\n\t}\n</style>\n\n\n<!-- Javascript -->\n<script>\n\tsi_std = {\n\t\tprint_item_table: function() {\n\t\t\tvar table = print_table(\n\t\t\t\t'Delivery Note',\n\t\t\t\tdoc.name,\n\t\t\t\t'delivery_note_details',\n\t\t\t\t'Delivery Note Item',\n\t\t\t\t[// Here specify the table columns to be displayed\n\t\t\t\t\t'SR', 'item_code', 'item_name', 'description', 'qty', 'stock_uom',\n\t\t\t\t\t'base_rate', 'amount'\n\t\t\t\t],\n\t\t\t\t[// Here specify the labels of column headings\n\t\t\t\t\t'Sr', 'Item Code', 'Item Name', 'Description', 'Qty',\n\t\t\t\t\t'UoM', 'Basic Rate', 'Amount'\n\t\t\t\t],\n\t\t\t\t[// Here specify the column widths\n\t\t\t\t\t'3%', '10%', '15%', '32%', '5%',\n\t\t\t\t\t'5%', '15%', '15%'\n\t\t\t\t],\n\t\t\t\tnull,\n\t\t\t\tnull,\n\t\t\t\t{\n\t\t\t\t\t'description' : function(data_row) {\n\t\t\t\t\t\tvar to_append = ''\n\t\t\t\t\t\tif(data_row.discount_percentage){\n\t\t\t\t\t\t\tto_append = '<div style=\"padding-left: 15px;\"><i>Discount: ' + \n\t\t\t\t\t\t\t\tdata_row.discount_percentage + '% on ' +\n\t\t\t\t\t\t\t\tformat_currency(data_row.price_list_rate, doc.currency) + '</i></div>';\n\t\t\t\t\t\t\tif(data_row.description.indexOf(to_append)==-1) {\n\t\t\t\t\t\t\t\tdata_row.description = data_row.description + to_append;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(data_row.serial_no) {\n\t\t\t\t\t\t\tto_append = '<div style=\"padding-left: 15px;\"><i>Serial No.:' + \n\t\t\t\t\t\t\t\t((data_row.serial_no.indexOf('\\n')>-1)?'<br />':'&nbsp;') + \n\t\t\t\t\t\t\t\tdata_row.serial_no + '</i></div>';\n\t\t\t\t\t\t\tif(data_row.description.indexOf(to_append)==-1) {\n\t\t\t\t\t\t\t\tdata_row.description = data_row.description + to_append;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\n\t\t\t\t\t\treturn data_row.description;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t);\n\n\t\t\t// This code takes care of page breaks\n\t\t\tif(table.appendChild) {\n\t\t\t\tout = table.innerHTML;\n\t\t\t} else {\n\t\t\t\tout = '';\n\t\t\t\tfor(var i=0; i < (table.length-1); i++) {\n\t\t\t\t\tout += table[i].innerHTML + \n\t\t\t\t\t\t'<div style = \"page-break-after: always;\" \\\n\t\t\t\t\t\tclass = \"page_break\"></div>\\\n\t\t\t\t\t\t<div class=\"page-settings\"></div>';\n\t\t\t\t}\n\t\t\t\tout += table[table.length-1].innerHTML;\n\t\t\t}\n\t\t\treturn out;\n\t\t},\n\n\n\t\tprint_other_charges: function(parent) {\n\t\t\tvar oc = getchildren('Sales Taxes and Charges', doc.name, 'other_charges');\n\t\t\tvar rows = '<table width=100%>\\n';\n\t\t\tfor(var i=0; i<oc.length; i++) {\n\t\t\t\tif(!oc[i].included_in_print_rate) {\n\t\t\t\t\trows +=\n\t\t\t\t\t\t'<tr>\\n' +\n\t\t\t\t\t\t\t'\\t<td>' + oc[i].description + '</td>\\n' +\n\t\t\t\t\t\t\t'\\t<td style=\"width: 38%; text-align: right;\">' + format_currency(oc[i].tax_amount/doc.conversion_rate, doc.currency) + '</td>\\n' +\n\t\t\t\t\t\t'</tr>\\n';\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(doc.discount_amount) {\n\t\t\t\trows += '<tr>\\n' + \n\t\t\t\t\t\t'\\t<td>Discount Amount</td>\\n' + \n\t\t\t\t\t\t'\\t<td style=\"width: 38%; text-align: right;\">' + format_currency(doc.discount_amount, doc.currency) + '</td>\\n' + \n\t\t\t\t\t'</tr>\\n';\n\t\t\t}\n\n\t\t\treturn rows + '</table>\\n';\n\t\t}\n\t};\n</script>\n\n\n<!-- Page Layout Settings -->\n<div class='common page-header'>\n\t<!-- \n\t\tPage Header will contain\n\t\t\t+ table 1\n\t\t\t\t+ table 1a\n\t\t\t\t\t- Name\n\t\t\t\t\t- Address\n\t\t\t\t\t- Contact\n\t\t\t\t\t- Mobile No\n\t\t\t\t+ table 1b\n\t\t\t\t\t- Voucher Date\n\t\t\t\t\t- Due Date\n\t-->\n\t<table class='header-table' cellspacing=0>\n\t\t<thead>\n\t\t\t<tr><td colspan=2><script>'<h1>' + (doc.select_print_heading || 'Delivery Note') + '</h1>'</script></td></tr>\n\t\t\t<tr><td colspan=2><h3><script>cur_frm.docname</script></h3></td></tr>\n\t\t</thead>\n\t\t<tbody>\n\t\t\t<tr>\n\t\t\t\t<td width=60%><table width=100% cellspacing=0><tbody>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td width=22%><b>Name</b></td>\n\t\t\t\t\t\t<td><script>doc.customer_name</script></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><b>Address</b></td>\n\t\t\t\t\t\t<td><script>replace_newlines(doc.address_display)</script></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><b>Contact</b></td>\n\t\t\t\t\t\t<td><script>doc.contact_display</script></td>\n\t\t\t\t\t</tr>\n\t\t\t\t</tbody></table></td>\n\t\t\t\t<td><table width=100% cellspacing=0><tbody>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td width=63%><b>Delivery Note Date</b></td>\n\t\t\t\t\t\t<td><script>date.str_to_user(doc.transaction_date)</script></td>\n\t\t\t\t\t<tr>\t\t\t\t\t\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><b>Sales Order No.</b></td>\n\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t<script>doc.sales_order_no</script><br />\n\t\t\t\t\t\t\t<i>(<script>date.str_to_user(doc.posting_date)</script>)</i>\n\t\t\t\t\t\t</td>\n\t\t\t\t\t<tr>\t\t\t\t\t\n\t\t\t\t</tbody></table></td>\n\t\t\t</tr>\n\t\t</tbody>\n\t\t<tfoot>\n\t\t\n\t\t</tfoot>\n\t</table>\n</div>\n<div class='common page-body'>\n\t<!-- \n\t\tPage Body will contain\n\t\t\t+ table 2\n\t\t\t\t- Sales Invoice Data\n\t-->\n\t<script>si_std.print_item_table()</script>\n</div>\n<div class='common page-footer'>\n\t<!-- \n\t\tPage Footer will contain\n\t\t\t+ table 3\n\t\t\t\t- Terms and Conditions\n\t\t\t\t- Total Rounded Amount Calculation\n\t\t\t\t- Total Rounded Amount in Words\n\t-->\n\t<table class='footer-table' width=100% cellspacing=0>\n\t\t<thead>\n\t\t\t\n\t\t</thead>\n\t\t<tbody>\n\t\t\t<tr>\n\t\t\t\t<td width=60% style='padding-right: 10px;'>\n\t\t\t\t\t<b>Terms, Conditions &amp; Other Information:</b><br />\n\t\t\t\t\t<script>doc.terms</script>\n\t\t\t\t</td>\n\t\t\t\t<td>\n\t\t\t\t\t<table cellspacing=0 width=100%><tbody>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td>Net Total</td>\n\t\t\t\t\t\t\t<td style=\"width: 38%; text-align: right;\"><script>\n\t\t\t\t\t\t\t\tformat_currency(doc.net_total_export, doc.currency)\n\t\t\t\t\t\t\t</script></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr><td colspan=3><script>si_std.print_other_charges()</script></td></tr>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td>Grand Total</td>\n\t\t\t\t\t\t\t<td style=\"width: 38%; text-align: right;\"><script>\n\t\t\t\t\t\t\t\tformat_currency(doc.grand_total_export, doc.currency)\n\t\t\t\t\t\t\t</script></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr style='font-weight: bold'>\n\t\t\t\t\t\t\t<td>Rounded Total</td>\n\t\t\t\t\t\t\t<td style=\"width: 38%; text-align: right;\"><script>\n\t\t\t\t\t\t\t\tformat_currency(doc.rounded_total_export, doc.currency)\n\t\t\t\t\t\t\t</script></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t</tbody></table>\n\t\t\t\t\t<br /><b>In Words</b><br />\n\t\t\t\t\t<i><script>doc.in_words_export</script></i>\n\t\t\t\t</td>\n\t\t\t</tr>\t\t\n\t\t</tbody>\n\t\t<tfoot>\n\t\t\n\t\t</tfoot>\n\t</table>\n</div>", 
+ "idx": 1, 
+ "modified": "2014-02-11 17:37:14", 
+ "modified_by": "Administrator", 
+ "module": "Stock", 
+ "name": "Delivery Note Spartan", 
+ "owner": "Administrator", 
+ "print_format_type": "Client", 
+ "standard": "Yes"
+}
\ No newline at end of file
diff --git a/erpnext/stock/doctype/batch/batch.txt b/erpnext/stock/doctype/batch/batch.txt
index c08573b..b5a1e64 100644
--- a/erpnext/stock/doctype/batch/batch.txt
+++ b/erpnext/stock/doctype/batch/batch.txt
@@ -1,109 +1,90 @@
-[
- {
-  "creation": "2013-03-05 14:50:38", 
-  "docstatus": 0, 
-  "modified": "2014-01-20 17:48:24", 
-  "modified_by": "Administrator", 
-  "owner": "harshada@webnotestech.com"
- }, 
- {
-  "allow_attach": 1, 
-  "allow_import": 1, 
-  "autoname": "field:batch_id", 
-  "doctype": "DocType", 
-  "document_type": "Master", 
-  "icon": "icon-archive", 
-  "max_attachments": 5, 
-  "module": "Stock", 
-  "name": "__common__"
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "Batch", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "cancel": 0, 
-  "create": 1, 
-  "delete": 1, 
-  "doctype": "DocPerm", 
-  "email": 1, 
-  "name": "__common__", 
-  "parent": "Batch", 
-  "parentfield": "permissions", 
-  "parenttype": "DocType", 
-  "permlevel": 0, 
-  "print": 1, 
-  "read": 1, 
-  "report": 1, 
-  "role": "Material Master Manager", 
-  "submit": 0, 
-  "write": 1
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Batch"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "batch_id", 
-  "fieldtype": "Data", 
-  "label": "Batch ID", 
-  "no_copy": 1, 
-  "oldfieldname": "batch_id", 
-  "oldfieldtype": "Data", 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "item", 
-  "fieldtype": "Link", 
-  "in_list_view": 1, 
-  "label": "Item", 
-  "oldfieldname": "item", 
-  "oldfieldtype": "Link", 
-  "options": "Item", 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "description", 
-  "fieldtype": "Small Text", 
-  "in_list_view": 1, 
-  "label": "Description", 
-  "oldfieldname": "description", 
-  "oldfieldtype": "Small Text", 
-  "width": "300px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "expiry_date", 
-  "fieldtype": "Date", 
-  "in_list_view": 1, 
-  "label": "Expiry Date", 
-  "oldfieldname": "expiry_date", 
-  "oldfieldtype": "Date"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "start_date", 
-  "fieldtype": "Date", 
-  "label": "Batch Started Date", 
-  "oldfieldname": "start_date", 
-  "oldfieldtype": "Date"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "finished_date", 
-  "fieldtype": "Date", 
-  "label": "Batch Finished Date", 
-  "oldfieldname": "finished_date", 
-  "oldfieldtype": "Date"
- }, 
- {
-  "doctype": "DocPerm"
- }
-]
\ No newline at end of file
+{
+ "allow_attach": 1, 
+ "allow_import": 1, 
+ "autoname": "field:batch_id", 
+ "creation": "2013-03-05 14:50:38", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "document_type": "Master", 
+ "fields": [
+  {
+   "fieldname": "batch_id", 
+   "fieldtype": "Data", 
+   "label": "Batch ID", 
+   "no_copy": 1, 
+   "oldfieldname": "batch_id", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "item", 
+   "fieldtype": "Link", 
+   "in_list_view": 1, 
+   "label": "Item", 
+   "oldfieldname": "item", 
+   "oldfieldtype": "Link", 
+   "options": "Item", 
+   "permlevel": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "description", 
+   "fieldtype": "Small Text", 
+   "in_list_view": 1, 
+   "label": "Description", 
+   "oldfieldname": "description", 
+   "oldfieldtype": "Small Text", 
+   "permlevel": 0, 
+   "width": "300px"
+  }, 
+  {
+   "fieldname": "expiry_date", 
+   "fieldtype": "Date", 
+   "in_list_view": 1, 
+   "label": "Expiry Date", 
+   "oldfieldname": "expiry_date", 
+   "oldfieldtype": "Date", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "start_date", 
+   "fieldtype": "Date", 
+   "label": "Batch Started Date", 
+   "oldfieldname": "start_date", 
+   "oldfieldtype": "Date", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "finished_date", 
+   "fieldtype": "Date", 
+   "label": "Batch Finished Date", 
+   "oldfieldname": "finished_date", 
+   "oldfieldtype": "Date", 
+   "permlevel": 0
+  }
+ ], 
+ "icon": "icon-archive", 
+ "idx": 1, 
+ "max_attachments": 5, 
+ "modified": "2014-01-20 17:48:24", 
+ "modified_by": "Administrator", 
+ "module": "Stock", 
+ "name": "Batch", 
+ "owner": "harshada@webnotestech.com", 
+ "permissions": [
+  {
+   "cancel": 0, 
+   "create": 1, 
+   "delete": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Material Master Manager", 
+   "submit": 0, 
+   "write": 1
+  }
+ ]
+}
\ No newline at end of file
diff --git a/erpnext/stock/doctype/bin/bin.txt b/erpnext/stock/doctype/bin/bin.txt
index 2775191..b2ce6e9 100644
--- a/erpnext/stock/doctype/bin/bin.txt
+++ b/erpnext/stock/doctype/bin/bin.txt
@@ -1,202 +1,205 @@
-[
- {
-  "creation": "2013-01-10 16:34:25", 
-  "docstatus": 0, 
-  "modified": "2013-12-20 19:23:56", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "autoname": "BIN/.#######", 
-  "doctype": "DocType", 
-  "hide_toolbar": 1, 
-  "in_create": 1, 
-  "module": "Stock", 
-  "name": "__common__", 
-  "read_only": 0, 
-  "search_fields": "item_code,warehouse"
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "Bin", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0, 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocPerm", 
-  "email": 1, 
-  "name": "__common__", 
-  "parent": "Bin", 
-  "parentfield": "permissions", 
-  "parenttype": "DocType", 
-  "permlevel": 0, 
-  "print": 1, 
-  "read": 1, 
-  "report": 1, 
-  "submit": 0
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Bin"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "warehouse", 
-  "fieldtype": "Link", 
-  "in_filter": 1, 
-  "in_list_view": 1, 
-  "label": "Warehouse", 
-  "oldfieldname": "warehouse", 
-  "oldfieldtype": "Link", 
-  "options": "Warehouse", 
-  "search_index": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "item_code", 
-  "fieldtype": "Link", 
-  "in_filter": 1, 
-  "in_list_view": 1, 
-  "label": "Item Code", 
-  "oldfieldname": "item_code", 
-  "oldfieldtype": "Link", 
-  "options": "Item", 
-  "search_index": 1
- }, 
- {
-  "default": "0.00", 
-  "doctype": "DocField", 
-  "fieldname": "reserved_qty", 
-  "fieldtype": "Float", 
-  "in_filter": 0, 
-  "in_list_view": 1, 
-  "label": "Reserved Quantity", 
-  "oldfieldname": "reserved_qty", 
-  "oldfieldtype": "Currency", 
-  "search_index": 0
- }, 
- {
-  "default": "0.00", 
-  "doctype": "DocField", 
-  "fieldname": "actual_qty", 
-  "fieldtype": "Float", 
-  "in_filter": 1, 
-  "in_list_view": 1, 
-  "label": "Actual Quantity", 
-  "oldfieldname": "actual_qty", 
-  "oldfieldtype": "Currency", 
-  "search_index": 0
- }, 
- {
-  "default": "0.00", 
-  "doctype": "DocField", 
-  "fieldname": "ordered_qty", 
-  "fieldtype": "Float", 
-  "in_filter": 0, 
-  "in_list_view": 1, 
-  "label": "Ordered Quantity", 
-  "oldfieldname": "ordered_qty", 
-  "oldfieldtype": "Currency", 
-  "search_index": 0
- }, 
- {
-  "default": "0.00", 
-  "doctype": "DocField", 
-  "fieldname": "indented_qty", 
-  "fieldtype": "Float", 
-  "in_filter": 0, 
-  "label": "Quantity Requested for Purchase", 
-  "oldfieldname": "indented_qty", 
-  "oldfieldtype": "Currency", 
-  "search_index": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "planned_qty", 
-  "fieldtype": "Float", 
-  "in_filter": 0, 
-  "label": "Planned Qty", 
-  "oldfieldname": "planned_qty", 
-  "oldfieldtype": "Currency", 
-  "search_index": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "projected_qty", 
-  "fieldtype": "Float", 
-  "in_filter": 0, 
-  "label": "Projected Qty", 
-  "oldfieldname": "projected_qty", 
-  "oldfieldtype": "Currency"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "ma_rate", 
-  "fieldtype": "Float", 
-  "hidden": 1, 
-  "in_filter": 0, 
-  "label": "Moving Average Rate", 
-  "oldfieldname": "ma_rate", 
-  "oldfieldtype": "Currency", 
-  "print_hide": 1, 
-  "report_hide": 1, 
-  "search_index": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "stock_uom", 
-  "fieldtype": "Link", 
-  "in_filter": 1, 
-  "label": "UOM", 
-  "oldfieldname": "stock_uom", 
-  "oldfieldtype": "Data", 
-  "options": "UOM", 
-  "search_index": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "fcfs_rate", 
-  "fieldtype": "Float", 
-  "hidden": 1, 
-  "label": "FCFS Rate", 
-  "oldfieldname": "fcfs_rate", 
-  "oldfieldtype": "Currency", 
-  "print_hide": 1, 
-  "report_hide": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "valuation_rate", 
-  "fieldtype": "Float", 
-  "label": "Valuation Rate", 
-  "oldfieldname": "valuation_rate", 
-  "oldfieldtype": "Currency"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "stock_value", 
-  "fieldtype": "Float", 
-  "label": "Stock Value", 
-  "oldfieldname": "stock_value", 
-  "oldfieldtype": "Currency"
- }, 
- {
-  "doctype": "DocPerm", 
-  "role": "Sales User"
- }, 
- {
-  "doctype": "DocPerm", 
-  "role": "Purchase User"
- }, 
- {
-  "amend": 0, 
-  "cancel": 0, 
-  "create": 0, 
-  "doctype": "DocPerm", 
-  "role": "Material User", 
-  "write": 0
- }
-]
\ No newline at end of file
+{
+ "autoname": "BIN/.#######", 
+ "creation": "2013-01-10 16:34:25", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "fields": [
+  {
+   "fieldname": "warehouse", 
+   "fieldtype": "Link", 
+   "in_filter": 1, 
+   "in_list_view": 1, 
+   "label": "Warehouse", 
+   "oldfieldname": "warehouse", 
+   "oldfieldtype": "Link", 
+   "options": "Warehouse", 
+   "permlevel": 0, 
+   "read_only": 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, 
+   "read_only": 1, 
+   "search_index": 1
+  }, 
+  {
+   "default": "0.00", 
+   "fieldname": "reserved_qty", 
+   "fieldtype": "Float", 
+   "in_filter": 0, 
+   "in_list_view": 1, 
+   "label": "Reserved Quantity", 
+   "oldfieldname": "reserved_qty", 
+   "oldfieldtype": "Currency", 
+   "permlevel": 0, 
+   "read_only": 1, 
+   "search_index": 0
+  }, 
+  {
+   "default": "0.00", 
+   "fieldname": "actual_qty", 
+   "fieldtype": "Float", 
+   "in_filter": 1, 
+   "in_list_view": 1, 
+   "label": "Actual Quantity", 
+   "oldfieldname": "actual_qty", 
+   "oldfieldtype": "Currency", 
+   "permlevel": 0, 
+   "read_only": 1, 
+   "search_index": 0
+  }, 
+  {
+   "default": "0.00", 
+   "fieldname": "ordered_qty", 
+   "fieldtype": "Float", 
+   "in_filter": 0, 
+   "in_list_view": 1, 
+   "label": "Ordered Quantity", 
+   "oldfieldname": "ordered_qty", 
+   "oldfieldtype": "Currency", 
+   "permlevel": 0, 
+   "read_only": 1, 
+   "search_index": 0
+  }, 
+  {
+   "default": "0.00", 
+   "fieldname": "indented_qty", 
+   "fieldtype": "Float", 
+   "in_filter": 0, 
+   "label": "Quantity Requested for Purchase", 
+   "oldfieldname": "indented_qty", 
+   "oldfieldtype": "Currency", 
+   "permlevel": 0, 
+   "read_only": 1, 
+   "search_index": 0
+  }, 
+  {
+   "fieldname": "planned_qty", 
+   "fieldtype": "Float", 
+   "in_filter": 0, 
+   "label": "Planned Qty", 
+   "oldfieldname": "planned_qty", 
+   "oldfieldtype": "Currency", 
+   "permlevel": 0, 
+   "read_only": 1, 
+   "search_index": 0
+  }, 
+  {
+   "fieldname": "projected_qty", 
+   "fieldtype": "Float", 
+   "in_filter": 0, 
+   "label": "Projected Qty", 
+   "oldfieldname": "projected_qty", 
+   "oldfieldtype": "Currency", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "ma_rate", 
+   "fieldtype": "Float", 
+   "hidden": 1, 
+   "in_filter": 0, 
+   "label": "Moving Average Rate", 
+   "oldfieldname": "ma_rate", 
+   "oldfieldtype": "Currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1, 
+   "report_hide": 1, 
+   "search_index": 0
+  }, 
+  {
+   "fieldname": "stock_uom", 
+   "fieldtype": "Link", 
+   "in_filter": 1, 
+   "label": "UOM", 
+   "oldfieldname": "stock_uom", 
+   "oldfieldtype": "Data", 
+   "options": "UOM", 
+   "permlevel": 0, 
+   "read_only": 1, 
+   "search_index": 0
+  }, 
+  {
+   "fieldname": "fcfs_rate", 
+   "fieldtype": "Float", 
+   "hidden": 1, 
+   "label": "FCFS Rate", 
+   "oldfieldname": "fcfs_rate", 
+   "oldfieldtype": "Currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1, 
+   "report_hide": 1
+  }, 
+  {
+   "fieldname": "valuation_rate", 
+   "fieldtype": "Float", 
+   "label": "Valuation Rate", 
+   "oldfieldname": "valuation_rate", 
+   "oldfieldtype": "Currency", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "stock_value", 
+   "fieldtype": "Float", 
+   "label": "Stock Value", 
+   "oldfieldname": "stock_value", 
+   "oldfieldtype": "Currency", 
+   "permlevel": 0, 
+   "read_only": 1
+  }
+ ], 
+ "hide_toolbar": 1, 
+ "idx": 1, 
+ "in_create": 1, 
+ "modified": "2013-12-20 19:23:56", 
+ "modified_by": "Administrator", 
+ "module": "Stock", 
+ "name": "Bin", 
+ "owner": "Administrator", 
+ "permissions": [
+  {
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Sales User", 
+   "submit": 0
+  }, 
+  {
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Purchase User", 
+   "submit": 0
+  }, 
+  {
+   "amend": 0, 
+   "cancel": 0, 
+   "create": 0, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Material User", 
+   "submit": 0, 
+   "write": 0
+  }
+ ], 
+ "read_only": 0, 
+ "search_fields": "item_code,warehouse"
+}
\ No newline at end of file
diff --git a/erpnext/stock/doctype/delivery_note/delivery_note.txt b/erpnext/stock/doctype/delivery_note/delivery_note.txt
index a20723d..e4ad47d 100644
--- a/erpnext/stock/doctype/delivery_note/delivery_note.txt
+++ b/erpnext/stock/doctype/delivery_note/delivery_note.txt
@@ -1,1079 +1,1076 @@
-[
- {
-  "creation": "2013-05-24 19:29:09", 
-  "docstatus": 0, 
-  "modified": "2014-01-28 18:51:42", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "allow_attach": 1, 
-  "autoname": "naming_series:", 
-  "doctype": "DocType", 
-  "document_type": "Transaction", 
-  "hide_toolbar": 0, 
-  "icon": "icon-truck", 
-  "in_create": 0, 
-  "is_submittable": 1, 
-  "module": "Stock", 
-  "name": "__common__", 
-  "read_only_onload": 1, 
-  "search_fields": "status,customer,customer_name, territory,grand_total"
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "Delivery Note", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "doctype": "DocPerm", 
-  "email": 1, 
-  "name": "__common__", 
-  "parent": "Delivery Note", 
-  "parentfield": "permissions", 
-  "parenttype": "DocType", 
-  "permlevel": 0, 
-  "print": 1, 
-  "read": 1, 
-  "report": 1
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Delivery Note"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "delivery_to_section", 
-  "fieldtype": "Section Break", 
-  "label": "Delivery To", 
-  "options": "icon-user"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break0", 
-  "fieldtype": "Column Break", 
-  "oldfieldtype": "Column Break", 
-  "print_width": "50%", 
-  "read_only": 0, 
-  "width": "50%"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "naming_series", 
-  "fieldtype": "Select", 
-  "label": "Series", 
-  "no_copy": 1, 
-  "oldfieldname": "naming_series", 
-  "oldfieldtype": "Select", 
-  "options": "DN", 
-  "print_hide": 1, 
-  "read_only": 0, 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "customer", 
-  "fieldtype": "Link", 
-  "in_filter": 1, 
-  "label": "Customer", 
-  "oldfieldname": "customer", 
-  "oldfieldtype": "Link", 
-  "options": "Customer", 
-  "print_hide": 1, 
-  "read_only": 0, 
-  "reqd": 1, 
-  "search_index": 1
- }, 
- {
-  "depends_on": "customer", 
-  "doctype": "DocField", 
-  "fieldname": "customer_name", 
-  "fieldtype": "Data", 
-  "hidden": 0, 
-  "in_list_view": 1, 
-  "label": "Customer Name", 
-  "read_only": 1
- }, 
- {
-  "depends_on": "customer", 
-  "doctype": "DocField", 
-  "fieldname": "customer_address", 
-  "fieldtype": "Link", 
-  "in_filter": 1, 
-  "label": "Billing Address Name", 
-  "options": "Address", 
-  "print_hide": 1, 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "address_display", 
-  "fieldtype": "Small Text", 
-  "hidden": 1, 
-  "label": "Billing Address", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "shipping_address_name", 
-  "fieldtype": "Link", 
-  "label": "Shipping Address", 
-  "options": "Address", 
-  "print_hide": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "shipping_address", 
-  "fieldtype": "Small Text", 
-  "hidden": 1, 
-  "label": "Shipping Address", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "contact_display", 
-  "fieldtype": "Small Text", 
-  "hidden": 1, 
-  "label": "Contact", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "contact_mobile", 
-  "fieldtype": "Text", 
-  "hidden": 1, 
-  "label": "Mobile No", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "contact_email", 
-  "fieldtype": "Text", 
-  "hidden": 1, 
-  "label": "Contact Email", 
-  "print_hide": 1, 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break1", 
-  "fieldtype": "Column Break", 
-  "oldfieldtype": "Column Break", 
-  "read_only": 0
- }, 
- {
-  "allow_on_submit": 0, 
-  "doctype": "DocField", 
-  "fieldname": "amended_from", 
-  "fieldtype": "Data", 
-  "ignore_restrictions": 1, 
-  "label": "Amended From", 
-  "no_copy": 1, 
-  "oldfieldname": "amended_from", 
-  "oldfieldtype": "Data", 
-  "print_hide": 1, 
-  "print_width": "150px", 
-  "read_only": 1, 
-  "width": "150px"
- }, 
- {
-  "description": "Select the relevant company name if you have multiple companies", 
-  "doctype": "DocField", 
-  "fieldname": "company", 
-  "fieldtype": "Link", 
-  "in_filter": 1, 
-  "label": "Company", 
-  "oldfieldname": "company", 
-  "oldfieldtype": "Link", 
-  "options": "Company", 
-  "print_hide": 1, 
-  "print_width": "150px", 
-  "read_only": 0, 
-  "reqd": 1, 
-  "search_index": 1, 
-  "width": "150px"
- }, 
- {
-  "default": "Today", 
-  "doctype": "DocField", 
-  "fieldname": "posting_date", 
-  "fieldtype": "Date", 
-  "in_filter": 1, 
-  "label": "Posting Date", 
-  "no_copy": 1, 
-  "oldfieldname": "posting_date", 
-  "oldfieldtype": "Date", 
-  "print_hide": 0, 
-  "print_width": "100px", 
-  "read_only": 0, 
-  "reqd": 1, 
-  "search_index": 1, 
-  "width": "100px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "po_no", 
-  "fieldtype": "Data", 
-  "hidden": 1, 
-  "label": "Customer's Purchase Order No", 
-  "no_copy": 0, 
-  "oldfieldname": "po_no", 
-  "oldfieldtype": "Data", 
-  "print_hide": 1, 
-  "print_width": "100px", 
-  "read_only": 1, 
-  "width": "100px"
- }, 
- {
-  "depends_on": "eval:doc.po_no", 
-  "doctype": "DocField", 
-  "fieldname": "po_date", 
-  "fieldtype": "Date", 
-  "hidden": 0, 
-  "label": "Customer's Purchase Order Date", 
-  "no_copy": 0, 
-  "oldfieldname": "po_date", 
-  "oldfieldtype": "Data", 
-  "print_hide": 1, 
-  "print_width": "100px", 
-  "read_only": 1, 
-  "width": "100px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "sec_break25", 
-  "fieldtype": "Section Break", 
-  "label": "Currency and Price List", 
-  "options": "icon-tag", 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "currency", 
-  "fieldtype": "Link", 
-  "label": "Currency", 
-  "oldfieldname": "currency", 
-  "oldfieldtype": "Select", 
-  "options": "Currency", 
-  "print_hide": 1, 
-  "read_only": 0, 
-  "reqd": 1
- }, 
- {
-  "description": "Rate at which customer's currency is converted to company's base currency", 
-  "doctype": "DocField", 
-  "fieldname": "conversion_rate", 
-  "fieldtype": "Float", 
-  "label": "Exchange Rate", 
-  "no_copy": 0, 
-  "oldfieldname": "conversion_rate", 
-  "oldfieldtype": "Currency", 
-  "print_hide": 1, 
-  "read_only": 0, 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "col_break23", 
-  "fieldtype": "Column Break", 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "selling_price_list", 
-  "fieldtype": "Link", 
-  "label": "Price List", 
-  "oldfieldname": "price_list_name", 
-  "oldfieldtype": "Select", 
-  "options": "Price List", 
-  "print_hide": 1, 
-  "read_only": 0, 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "price_list_currency", 
-  "fieldtype": "Link", 
-  "label": "Price List Currency", 
-  "options": "Currency", 
-  "print_hide": 1, 
-  "read_only": 1, 
-  "reqd": 1
- }, 
- {
-  "description": "Rate at which Price list currency is converted to company's base currency", 
-  "doctype": "DocField", 
-  "fieldname": "plc_conversion_rate", 
-  "fieldtype": "Float", 
-  "label": "Price List Exchange Rate", 
-  "print_hide": 1, 
-  "read_only": 0, 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "items", 
-  "fieldtype": "Section Break", 
-  "label": "Items", 
-  "oldfieldtype": "Section Break", 
-  "options": "icon-shopping-cart", 
-  "read_only": 0
- }, 
- {
-  "allow_on_submit": 1, 
-  "doctype": "DocField", 
-  "fieldname": "delivery_note_details", 
-  "fieldtype": "Table", 
-  "label": "Delivery Note Items", 
-  "no_copy": 0, 
-  "oldfieldname": "delivery_note_details", 
-  "oldfieldtype": "Table", 
-  "options": "Delivery Note Item", 
-  "print_hide": 0, 
-  "read_only": 0, 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "packing_list", 
-  "fieldtype": "Section Break", 
-  "label": "Packing List", 
-  "oldfieldtype": "Section Break", 
-  "options": "icon-suitcase", 
-  "print_hide": 1, 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "packing_details", 
-  "fieldtype": "Table", 
-  "label": "Packing Details", 
-  "oldfieldname": "packing_details", 
-  "oldfieldtype": "Table", 
-  "options": "Packed Item", 
-  "print_hide": 1, 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "sales_bom_help", 
-  "fieldtype": "HTML", 
-  "label": "Sales BOM Help", 
-  "print_hide": 1, 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "section_break_31", 
-  "fieldtype": "Section Break"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "net_total_export", 
-  "fieldtype": "Currency", 
-  "label": "Net Total", 
-  "options": "currency", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break_33", 
-  "fieldtype": "Column Break"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "net_total", 
-  "fieldtype": "Currency", 
-  "label": "Net Total (Company Currency)", 
-  "no_copy": 0, 
-  "oldfieldname": "net_total", 
-  "oldfieldtype": "Currency", 
-  "options": "Company:company:default_currency", 
-  "print_hide": 1, 
-  "print_width": "150px", 
-  "read_only": 1, 
-  "reqd": 0, 
-  "width": "150px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "taxes", 
-  "fieldtype": "Section Break", 
-  "label": "Taxes and Charges", 
-  "oldfieldtype": "Section Break", 
-  "options": "icon-money", 
-  "read_only": 0
- }, 
- {
-  "description": "If you have created a standard template in Sales Taxes and Charges Master, select one and click on the button below.", 
-  "doctype": "DocField", 
-  "fieldname": "taxes_and_charges", 
-  "fieldtype": "Link", 
-  "label": "Taxes and Charges", 
-  "oldfieldname": "charge", 
-  "oldfieldtype": "Link", 
-  "options": "Sales Taxes and Charges Master", 
-  "print_hide": 1, 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break_39", 
-  "fieldtype": "Column Break"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "shipping_rule", 
-  "fieldtype": "Link", 
-  "label": "Shipping Rule", 
-  "oldfieldtype": "Button", 
-  "options": "Shipping Rule", 
-  "print_hide": 1, 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "section_break_41", 
-  "fieldtype": "Section Break"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "other_charges", 
-  "fieldtype": "Table", 
-  "label": "Sales Taxes and Charges", 
-  "no_copy": 0, 
-  "oldfieldname": "other_charges", 
-  "oldfieldtype": "Table", 
-  "options": "Sales Taxes and Charges", 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "other_charges_calculation", 
-  "fieldtype": "HTML", 
-  "label": "Taxes and Charges Calculation", 
-  "oldfieldtype": "HTML", 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "section_break_44", 
-  "fieldtype": "Section Break"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "other_charges_total_export", 
-  "fieldtype": "Currency", 
-  "label": "Taxes and Charges Total", 
-  "options": "Company:company:default_currency", 
-  "print_hide": 1, 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break_47", 
-  "fieldtype": "Column Break"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "other_charges_total", 
-  "fieldtype": "Currency", 
-  "label": "Taxes and Charges Total (Company Currency)", 
-  "oldfieldname": "other_charges_total", 
-  "oldfieldtype": "Currency", 
-  "options": "Company:company:default_currency", 
-  "print_hide": 1, 
-  "print_width": "150px", 
-  "read_only": 1, 
-  "width": "150px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "discount_amount", 
-  "fieldtype": "Currency", 
-  "label": "Discount Amount", 
-  "options": "Company:company:default_currency"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "totals", 
-  "fieldtype": "Section Break", 
-  "label": "Totals", 
-  "oldfieldtype": "Section Break", 
-  "options": "icon-money", 
-  "print_hide": 0, 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "grand_total_export", 
-  "fieldtype": "Currency", 
-  "label": "Grand Total", 
-  "no_copy": 0, 
-  "oldfieldname": "grand_total_export", 
-  "oldfieldtype": "Currency", 
-  "options": "currency", 
-  "print_hide": 0, 
-  "print_width": "150px", 
-  "read_only": 1, 
-  "reqd": 0, 
-  "width": "150px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "rounded_total_export", 
-  "fieldtype": "Currency", 
-  "label": "Rounded Total", 
-  "no_copy": 0, 
-  "oldfieldname": "rounded_total_export", 
-  "oldfieldtype": "Currency", 
-  "options": "currency", 
-  "print_hide": 0, 
-  "print_width": "150px", 
-  "read_only": 1, 
-  "width": "150px"
- }, 
- {
-  "description": "In Words (Export) will be visible once you save the Delivery Note.", 
-  "doctype": "DocField", 
-  "fieldname": "in_words_export", 
-  "fieldtype": "Data", 
-  "label": "In Words", 
-  "no_copy": 0, 
-  "oldfieldname": "in_words_export", 
-  "oldfieldtype": "Data", 
-  "print_hide": 0, 
-  "print_width": "150px", 
-  "read_only": 1, 
-  "width": "150px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break3", 
-  "fieldtype": "Column Break", 
-  "oldfieldtype": "Column Break", 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "grand_total", 
-  "fieldtype": "Currency", 
-  "label": "Grand Total (Company Currency)", 
-  "no_copy": 0, 
-  "oldfieldname": "grand_total", 
-  "oldfieldtype": "Currency", 
-  "options": "Company:company:default_currency", 
-  "print_hide": 1, 
-  "print_width": "150px", 
-  "read_only": 1, 
-  "reqd": 0, 
-  "width": "150px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "rounded_total", 
-  "fieldtype": "Currency", 
-  "label": "Rounded Total (Company Currency)", 
-  "no_copy": 0, 
-  "oldfieldname": "rounded_total", 
-  "oldfieldtype": "Currency", 
-  "options": "Company:company:default_currency", 
-  "print_hide": 1, 
-  "print_width": "150px", 
-  "read_only": 1, 
-  "width": "150px"
- }, 
- {
-  "description": "In Words will be visible once you save the Delivery Note.", 
-  "doctype": "DocField", 
-  "fieldname": "in_words", 
-  "fieldtype": "Data", 
-  "label": "In Words (Company Currency)", 
-  "no_copy": 0, 
-  "oldfieldname": "in_words", 
-  "oldfieldtype": "Data", 
-  "print_hide": 1, 
-  "print_width": "200px", 
-  "read_only": 1, 
-  "width": "200px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "terms_section_break", 
-  "fieldtype": "Section Break", 
-  "label": "Terms and Conditions", 
-  "oldfieldtype": "Section Break", 
-  "options": "icon-legal", 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "tc_name", 
-  "fieldtype": "Link", 
-  "label": "Terms", 
-  "oldfieldname": "tc_name", 
-  "oldfieldtype": "Link", 
-  "options": "Terms and Conditions", 
-  "print_hide": 1, 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "terms", 
-  "fieldtype": "Text Editor", 
-  "label": "Terms and Conditions Details", 
-  "oldfieldname": "terms", 
-  "oldfieldtype": "Text Editor", 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "transporter_info", 
-  "fieldtype": "Section Break", 
-  "label": "Transporter Info", 
-  "options": "icon-truck", 
-  "print_hide": 1, 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "transporter_name", 
-  "fieldtype": "Data", 
-  "label": "Transporter Name", 
-  "no_copy": 0, 
-  "oldfieldname": "transporter_name", 
-  "oldfieldtype": "Data", 
-  "print_hide": 1, 
-  "print_width": "150px", 
-  "read_only": 0, 
-  "reqd": 0, 
-  "width": "150px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "col_break34", 
-  "fieldtype": "Column Break", 
-  "print_width": "50%", 
-  "read_only": 0, 
-  "width": "50%"
- }, 
- {
-  "description": "Transporter lorry number", 
-  "doctype": "DocField", 
-  "fieldname": "lr_no", 
-  "fieldtype": "Data", 
-  "label": "Vehicle No", 
-  "no_copy": 0, 
-  "oldfieldname": "lr_no", 
-  "oldfieldtype": "Data", 
-  "print_hide": 1, 
-  "print_width": "100px", 
-  "read_only": 0, 
-  "reqd": 0, 
-  "width": "100px"
- }, 
- {
-  "default": "Today", 
-  "description": "Date on which lorry started from your warehouse", 
-  "doctype": "DocField", 
-  "fieldname": "lr_date", 
-  "fieldtype": "Date", 
-  "label": "Vehicle Dispatch Date", 
-  "no_copy": 0, 
-  "oldfieldname": "lr_date", 
-  "oldfieldtype": "Date", 
-  "print_hide": 1, 
-  "print_width": "100px", 
-  "read_only": 0, 
-  "width": "100px"
- }, 
- {
-  "depends_on": "customer", 
-  "doctype": "DocField", 
-  "fieldname": "contact_info", 
-  "fieldtype": "Section Break", 
-  "label": "Contact Info", 
-  "options": "icon-bullhorn", 
-  "read_only": 0
- }, 
- {
-  "description": "<a href=\"#Sales Browser/Territory\">Add / Edit</a>", 
-  "doctype": "DocField", 
-  "fieldname": "territory", 
-  "fieldtype": "Link", 
-  "hidden": 0, 
-  "in_filter": 1, 
-  "label": "Territory", 
-  "options": "Territory", 
-  "print_hide": 1, 
-  "read_only": 0, 
-  "reqd": 1, 
-  "search_index": 1
- }, 
- {
-  "description": "<a href=\"#Sales Browser/Customer Group\">Add / Edit</a>", 
-  "doctype": "DocField", 
-  "fieldname": "customer_group", 
-  "fieldtype": "Link", 
-  "in_filter": 1, 
-  "label": "Customer Group", 
-  "options": "Customer Group", 
-  "print_hide": 1, 
-  "read_only": 0, 
-  "search_index": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "col_break21", 
-  "fieldtype": "Column Break", 
-  "print_width": "50%", 
-  "read_only": 0, 
-  "width": "50%"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "contact_person", 
-  "fieldtype": "Link", 
-  "in_filter": 1, 
-  "label": "Contact Person", 
-  "options": "Contact", 
-  "print_hide": 1, 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "more_info", 
-  "fieldtype": "Section Break", 
-  "label": "More Info", 
-  "oldfieldtype": "Section Break", 
-  "options": "icon-file-text", 
-  "print_hide": 1, 
-  "read_only": 0
- }, 
- {
-  "description": "Track this Delivery Note against any Project", 
-  "doctype": "DocField", 
-  "fieldname": "project_name", 
-  "fieldtype": "Link", 
-  "in_filter": 1, 
-  "label": "Project Name", 
-  "oldfieldname": "project_name", 
-  "oldfieldtype": "Link", 
-  "options": "Project", 
-  "read_only": 0, 
-  "search_index": 1
- }, 
- {
-  "depends_on": "eval:doc.source == 'Campaign'", 
-  "doctype": "DocField", 
-  "fieldname": "campaign", 
-  "fieldtype": "Link", 
-  "label": "Campaign", 
-  "oldfieldname": "campaign", 
-  "oldfieldtype": "Link", 
-  "options": "Campaign", 
-  "print_hide": 1, 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "source", 
-  "fieldtype": "Select", 
-  "label": "Source", 
-  "oldfieldname": "source", 
-  "oldfieldtype": "Select", 
-  "options": "\nExisting Customer\nReference\nAdvertisement\nCold Calling\nExhibition\nSupplier Reference\nMass Mailing\nCustomer's Vendor\nCampaign", 
-  "print_hide": 1, 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break5", 
-  "fieldtype": "Column Break", 
-  "oldfieldtype": "Column Break", 
-  "print_hide": 1, 
-  "print_width": "50%", 
-  "read_only": 0, 
-  "width": "50%"
- }, 
- {
-  "description": "Time at which items were delivered from warehouse", 
-  "doctype": "DocField", 
-  "fieldname": "posting_time", 
-  "fieldtype": "Time", 
-  "in_filter": 0, 
-  "label": "Posting Time", 
-  "oldfieldname": "posting_time", 
-  "oldfieldtype": "Time", 
-  "print_hide": 1, 
-  "print_width": "100px", 
-  "read_only": 0, 
-  "reqd": 1, 
-  "search_index": 0, 
-  "width": "100px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "fiscal_year", 
-  "fieldtype": "Select", 
-  "in_filter": 1, 
-  "label": "Fiscal Year", 
-  "oldfieldname": "fiscal_year", 
-  "oldfieldtype": "Select", 
-  "options": "link:Fiscal Year", 
-  "print_hide": 1, 
-  "print_width": "150px", 
-  "read_only": 0, 
-  "reqd": 1, 
-  "search_index": 1, 
-  "width": "150px"
- }, 
- {
-  "allow_on_submit": 1, 
-  "doctype": "DocField", 
-  "fieldname": "letter_head", 
-  "fieldtype": "Select", 
-  "label": "Letter Head", 
-  "oldfieldname": "letter_head", 
-  "oldfieldtype": "Link", 
-  "options": "link:Letter Head", 
-  "print_hide": 1, 
-  "read_only": 0
- }, 
- {
-  "allow_on_submit": 1, 
-  "doctype": "DocField", 
-  "fieldname": "select_print_heading", 
-  "fieldtype": "Link", 
-  "label": "Print Heading", 
-  "no_copy": 1, 
-  "oldfieldname": "select_print_heading", 
-  "oldfieldtype": "Link", 
-  "options": "Print Heading", 
-  "print_hide": 1, 
-  "read_only": 0, 
-  "report_hide": 1
- }, 
- {
-  "allow_on_submit": 1, 
-  "doctype": "DocField", 
-  "fieldname": "print_without_amount", 
-  "fieldtype": "Check", 
-  "label": "Print Without Amount", 
-  "oldfieldname": "print_without_amount", 
-  "oldfieldtype": "Check", 
-  "print_hide": 1, 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "section_break_83", 
-  "fieldtype": "Section Break"
- }, 
- {
-  "default": "Draft", 
-  "doctype": "DocField", 
-  "fieldname": "status", 
-  "fieldtype": "Select", 
-  "in_filter": 1, 
-  "label": "Status", 
-  "no_copy": 1, 
-  "oldfieldname": "status", 
-  "oldfieldtype": "Select", 
-  "options": "\nDraft\nSubmitted\nCancelled", 
-  "print_hide": 1, 
-  "print_width": "150px", 
-  "read_only": 1, 
-  "reqd": 1, 
-  "search_index": 1, 
-  "width": "150px"
- }, 
- {
-  "depends_on": "eval:!doc.__islocal", 
-  "description": "% of materials delivered against this Delivery Note", 
-  "doctype": "DocField", 
-  "fieldname": "per_installed", 
-  "fieldtype": "Percent", 
-  "in_filter": 1, 
-  "in_list_view": 1, 
-  "label": "% Installed", 
-  "no_copy": 1, 
-  "oldfieldname": "per_installed", 
-  "oldfieldtype": "Currency", 
-  "print_hide": 1, 
-  "read_only": 1, 
-  "search_index": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "installation_status", 
-  "fieldtype": "Select", 
-  "hidden": 1, 
-  "label": "Installation Status", 
-  "print_hide": 1, 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break_89", 
-  "fieldtype": "Column Break"
- }, 
- {
-  "description": "Required only for sample item.", 
-  "doctype": "DocField", 
-  "fieldname": "to_warehouse", 
-  "fieldtype": "Link", 
-  "hidden": 0, 
-  "label": "To Warehouse", 
-  "no_copy": 1, 
-  "oldfieldname": "to_warehouse", 
-  "oldfieldtype": "Link", 
-  "options": "Warehouse", 
-  "print_hide": 1, 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "excise_page", 
-  "fieldtype": "Data", 
-  "hidden": 1, 
-  "label": "Excise Page Number", 
-  "oldfieldname": "excise_page", 
-  "oldfieldtype": "Data", 
-  "print_hide": 1, 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "instructions", 
-  "fieldtype": "Text", 
-  "label": "Instructions", 
-  "oldfieldname": "instructions", 
-  "oldfieldtype": "Text", 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "sales_team_section_break", 
-  "fieldtype": "Section Break", 
-  "label": "Sales Team", 
-  "oldfieldtype": "Section Break", 
-  "options": "icon-group", 
-  "print_hide": 1, 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "sales_partner", 
-  "fieldtype": "Link", 
-  "label": "Sales Partner", 
-  "no_copy": 0, 
-  "oldfieldname": "sales_partner", 
-  "oldfieldtype": "Link", 
-  "options": "Sales Partner", 
-  "print_hide": 1, 
-  "print_width": "150px", 
-  "read_only": 0, 
-  "width": "150px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break7", 
-  "fieldtype": "Column Break", 
-  "print_hide": 1, 
-  "print_width": "50%", 
-  "read_only": 0, 
-  "width": "50%"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "commission_rate", 
-  "fieldtype": "Float", 
-  "label": "Commission Rate (%)", 
-  "no_copy": 0, 
-  "oldfieldname": "commission_rate", 
-  "oldfieldtype": "Currency", 
-  "print_hide": 1, 
-  "print_width": "100px", 
-  "read_only": 0, 
-  "width": "100px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "total_commission", 
-  "fieldtype": "Currency", 
-  "label": "Total Commission", 
-  "no_copy": 0, 
-  "oldfieldname": "total_commission", 
-  "oldfieldtype": "Currency", 
-  "options": "Company:company:default_currency", 
-  "print_hide": 1, 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "section_break1", 
-  "fieldtype": "Section Break", 
-  "print_hide": 1, 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "sales_team", 
-  "fieldtype": "Table", 
-  "label": "Sales Team1", 
-  "oldfieldname": "sales_team", 
-  "oldfieldtype": "Table", 
-  "options": "Sales Team", 
-  "print_hide": 1, 
-  "read_only": 0
- }, 
- {
-  "amend": 1, 
-  "cancel": 1, 
-  "create": 1, 
-  "delete": 1, 
-  "doctype": "DocPerm", 
-  "role": "Material User", 
-  "submit": 1, 
-  "write": 1
- }, 
- {
-  "amend": 1, 
-  "cancel": 1, 
-  "create": 1, 
-  "delete": 1, 
-  "doctype": "DocPerm", 
-  "role": "Material Manager", 
-  "submit": 1, 
-  "write": 1
- }, 
- {
-  "amend": 1, 
-  "cancel": 1, 
-  "create": 1, 
-  "delete": 1, 
-  "doctype": "DocPerm", 
-  "role": "Sales User", 
-  "submit": 1, 
-  "write": 1
- }, 
- {
-  "cancel": 0, 
-  "create": 0, 
-  "delete": 0, 
-  "doctype": "DocPerm", 
-  "role": "Accounts User", 
-  "submit": 0, 
-  "write": 0
- }, 
- {
-  "cancel": 0, 
-  "delete": 0, 
-  "doctype": "DocPerm", 
-  "role": "Customer"
- }
-]
\ No newline at end of file
+{
+ "allow_attach": 1, 
+ "autoname": "naming_series:", 
+ "creation": "2013-05-24 19:29:09", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "document_type": "Transaction", 
+ "fields": [
+  {
+   "fieldname": "delivery_to_section", 
+   "fieldtype": "Section Break", 
+   "label": "Delivery To", 
+   "options": "icon-user", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "column_break0", 
+   "fieldtype": "Column Break", 
+   "oldfieldtype": "Column Break", 
+   "permlevel": 0, 
+   "print_width": "50%", 
+   "read_only": 0, 
+   "width": "50%"
+  }, 
+  {
+   "fieldname": "naming_series", 
+   "fieldtype": "Select", 
+   "label": "Series", 
+   "no_copy": 1, 
+   "oldfieldname": "naming_series", 
+   "oldfieldtype": "Select", 
+   "options": "DN", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "customer", 
+   "fieldtype": "Link", 
+   "in_filter": 1, 
+   "label": "Customer", 
+   "oldfieldname": "customer", 
+   "oldfieldtype": "Link", 
+   "options": "Customer", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0, 
+   "reqd": 1, 
+   "search_index": 1
+  }, 
+  {
+   "depends_on": "customer", 
+   "fieldname": "customer_name", 
+   "fieldtype": "Data", 
+   "hidden": 0, 
+   "in_list_view": 1, 
+   "label": "Customer Name", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "depends_on": "customer", 
+   "fieldname": "customer_address", 
+   "fieldtype": "Link", 
+   "in_filter": 1, 
+   "label": "Billing Address Name", 
+   "options": "Address", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "address_display", 
+   "fieldtype": "Small Text", 
+   "hidden": 1, 
+   "label": "Billing Address", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "shipping_address_name", 
+   "fieldtype": "Link", 
+   "label": "Shipping Address", 
+   "options": "Address", 
+   "permlevel": 0, 
+   "print_hide": 1
+  }, 
+  {
+   "fieldname": "shipping_address", 
+   "fieldtype": "Small Text", 
+   "hidden": 1, 
+   "label": "Shipping Address", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "contact_display", 
+   "fieldtype": "Small Text", 
+   "hidden": 1, 
+   "label": "Contact", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "contact_mobile", 
+   "fieldtype": "Text", 
+   "hidden": 1, 
+   "label": "Mobile No", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "contact_email", 
+   "fieldtype": "Text", 
+   "hidden": 1, 
+   "label": "Contact Email", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "column_break1", 
+   "fieldtype": "Column Break", 
+   "oldfieldtype": "Column Break", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "allow_on_submit": 0, 
+   "fieldname": "amended_from", 
+   "fieldtype": "Data", 
+   "ignore_restrictions": 1, 
+   "label": "Amended From", 
+   "no_copy": 1, 
+   "oldfieldname": "amended_from", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "print_width": "150px", 
+   "read_only": 1, 
+   "width": "150px"
+  }, 
+  {
+   "description": "Select the relevant company name if you have multiple companies", 
+   "fieldname": "company", 
+   "fieldtype": "Link", 
+   "in_filter": 1, 
+   "label": "Company", 
+   "oldfieldname": "company", 
+   "oldfieldtype": "Link", 
+   "options": "Company", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "print_width": "150px", 
+   "read_only": 0, 
+   "reqd": 1, 
+   "search_index": 1, 
+   "width": "150px"
+  }, 
+  {
+   "default": "Today", 
+   "fieldname": "posting_date", 
+   "fieldtype": "Date", 
+   "in_filter": 1, 
+   "label": "Posting Date", 
+   "no_copy": 1, 
+   "oldfieldname": "posting_date", 
+   "oldfieldtype": "Date", 
+   "permlevel": 0, 
+   "print_hide": 0, 
+   "print_width": "100px", 
+   "read_only": 0, 
+   "reqd": 1, 
+   "search_index": 1, 
+   "width": "100px"
+  }, 
+  {
+   "fieldname": "po_no", 
+   "fieldtype": "Data", 
+   "hidden": 1, 
+   "label": "Customer's Purchase Order No", 
+   "no_copy": 0, 
+   "oldfieldname": "po_no", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "print_width": "100px", 
+   "read_only": 1, 
+   "width": "100px"
+  }, 
+  {
+   "depends_on": "eval:doc.po_no", 
+   "fieldname": "po_date", 
+   "fieldtype": "Date", 
+   "hidden": 0, 
+   "label": "Customer's Purchase Order Date", 
+   "no_copy": 0, 
+   "oldfieldname": "po_date", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "print_width": "100px", 
+   "read_only": 1, 
+   "width": "100px"
+  }, 
+  {
+   "fieldname": "sec_break25", 
+   "fieldtype": "Section Break", 
+   "label": "Currency and Price List", 
+   "options": "icon-tag", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "currency", 
+   "fieldtype": "Link", 
+   "label": "Currency", 
+   "oldfieldname": "currency", 
+   "oldfieldtype": "Select", 
+   "options": "Currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0, 
+   "reqd": 1
+  }, 
+  {
+   "description": "Rate at which customer's currency is converted to company's base currency", 
+   "fieldname": "conversion_rate", 
+   "fieldtype": "Float", 
+   "label": "Exchange Rate", 
+   "no_copy": 0, 
+   "oldfieldname": "conversion_rate", 
+   "oldfieldtype": "Currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "col_break23", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "selling_price_list", 
+   "fieldtype": "Link", 
+   "label": "Price List", 
+   "oldfieldname": "price_list_name", 
+   "oldfieldtype": "Select", 
+   "options": "Price List", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "price_list_currency", 
+   "fieldtype": "Link", 
+   "label": "Price List Currency", 
+   "options": "Currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1, 
+   "reqd": 1
+  }, 
+  {
+   "description": "Rate at which Price list currency is converted to company's base currency", 
+   "fieldname": "plc_conversion_rate", 
+   "fieldtype": "Float", 
+   "label": "Price List Exchange Rate", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "items", 
+   "fieldtype": "Section Break", 
+   "label": "Items", 
+   "oldfieldtype": "Section Break", 
+   "options": "icon-shopping-cart", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "allow_on_submit": 1, 
+   "fieldname": "delivery_note_details", 
+   "fieldtype": "Table", 
+   "label": "Delivery Note Items", 
+   "no_copy": 0, 
+   "oldfieldname": "delivery_note_details", 
+   "oldfieldtype": "Table", 
+   "options": "Delivery Note Item", 
+   "permlevel": 0, 
+   "print_hide": 0, 
+   "read_only": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "packing_list", 
+   "fieldtype": "Section Break", 
+   "label": "Packing List", 
+   "oldfieldtype": "Section Break", 
+   "options": "icon-suitcase", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "packing_details", 
+   "fieldtype": "Table", 
+   "label": "Packing Details", 
+   "oldfieldname": "packing_details", 
+   "oldfieldtype": "Table", 
+   "options": "Packed Item", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "sales_bom_help", 
+   "fieldtype": "HTML", 
+   "label": "Sales BOM Help", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "section_break_31", 
+   "fieldtype": "Section Break", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "net_total_export", 
+   "fieldtype": "Currency", 
+   "label": "Net Total", 
+   "options": "currency", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "column_break_33", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "net_total", 
+   "fieldtype": "Currency", 
+   "label": "Net Total (Company Currency)", 
+   "no_copy": 0, 
+   "oldfieldname": "net_total", 
+   "oldfieldtype": "Currency", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "print_width": "150px", 
+   "read_only": 1, 
+   "reqd": 0, 
+   "width": "150px"
+  }, 
+  {
+   "fieldname": "taxes", 
+   "fieldtype": "Section Break", 
+   "label": "Taxes and Charges", 
+   "oldfieldtype": "Section Break", 
+   "options": "icon-money", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "description": "If you have created a standard template in Sales Taxes and Charges Master, select one and click on the button below.", 
+   "fieldname": "taxes_and_charges", 
+   "fieldtype": "Link", 
+   "label": "Taxes and Charges", 
+   "oldfieldname": "charge", 
+   "oldfieldtype": "Link", 
+   "options": "Sales Taxes and Charges Master", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "column_break_39", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "shipping_rule", 
+   "fieldtype": "Link", 
+   "label": "Shipping Rule", 
+   "oldfieldtype": "Button", 
+   "options": "Shipping Rule", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "section_break_41", 
+   "fieldtype": "Section Break", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "other_charges", 
+   "fieldtype": "Table", 
+   "label": "Sales Taxes and Charges", 
+   "no_copy": 0, 
+   "oldfieldname": "other_charges", 
+   "oldfieldtype": "Table", 
+   "options": "Sales Taxes and Charges", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "other_charges_calculation", 
+   "fieldtype": "HTML", 
+   "label": "Taxes and Charges Calculation", 
+   "oldfieldtype": "HTML", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "section_break_44", 
+   "fieldtype": "Section Break", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "other_charges_total_export", 
+   "fieldtype": "Currency", 
+   "label": "Taxes and Charges Total", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "column_break_47", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "other_charges_total", 
+   "fieldtype": "Currency", 
+   "label": "Taxes and Charges Total (Company Currency)", 
+   "oldfieldname": "other_charges_total", 
+   "oldfieldtype": "Currency", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "print_width": "150px", 
+   "read_only": 1, 
+   "width": "150px"
+  }, 
+  {
+   "fieldname": "discount_amount", 
+   "fieldtype": "Currency", 
+   "label": "Discount Amount", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "totals", 
+   "fieldtype": "Section Break", 
+   "label": "Totals", 
+   "oldfieldtype": "Section Break", 
+   "options": "icon-money", 
+   "permlevel": 0, 
+   "print_hide": 0, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "grand_total_export", 
+   "fieldtype": "Currency", 
+   "label": "Grand Total", 
+   "no_copy": 0, 
+   "oldfieldname": "grand_total_export", 
+   "oldfieldtype": "Currency", 
+   "options": "currency", 
+   "permlevel": 0, 
+   "print_hide": 0, 
+   "print_width": "150px", 
+   "read_only": 1, 
+   "reqd": 0, 
+   "width": "150px"
+  }, 
+  {
+   "fieldname": "rounded_total_export", 
+   "fieldtype": "Currency", 
+   "label": "Rounded Total", 
+   "no_copy": 0, 
+   "oldfieldname": "rounded_total_export", 
+   "oldfieldtype": "Currency", 
+   "options": "currency", 
+   "permlevel": 0, 
+   "print_hide": 0, 
+   "print_width": "150px", 
+   "read_only": 1, 
+   "width": "150px"
+  }, 
+  {
+   "description": "In Words (Export) will be visible once you save the Delivery Note.", 
+   "fieldname": "in_words_export", 
+   "fieldtype": "Data", 
+   "label": "In Words", 
+   "no_copy": 0, 
+   "oldfieldname": "in_words_export", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "print_hide": 0, 
+   "print_width": "150px", 
+   "read_only": 1, 
+   "width": "150px"
+  }, 
+  {
+   "fieldname": "column_break3", 
+   "fieldtype": "Column Break", 
+   "oldfieldtype": "Column Break", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "grand_total", 
+   "fieldtype": "Currency", 
+   "label": "Grand Total (Company Currency)", 
+   "no_copy": 0, 
+   "oldfieldname": "grand_total", 
+   "oldfieldtype": "Currency", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "print_width": "150px", 
+   "read_only": 1, 
+   "reqd": 0, 
+   "width": "150px"
+  }, 
+  {
+   "fieldname": "rounded_total", 
+   "fieldtype": "Currency", 
+   "label": "Rounded Total (Company Currency)", 
+   "no_copy": 0, 
+   "oldfieldname": "rounded_total", 
+   "oldfieldtype": "Currency", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "print_width": "150px", 
+   "read_only": 1, 
+   "width": "150px"
+  }, 
+  {
+   "description": "In Words will be visible once you save the Delivery Note.", 
+   "fieldname": "in_words", 
+   "fieldtype": "Data", 
+   "label": "In Words (Company Currency)", 
+   "no_copy": 0, 
+   "oldfieldname": "in_words", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "print_width": "200px", 
+   "read_only": 1, 
+   "width": "200px"
+  }, 
+  {
+   "fieldname": "terms_section_break", 
+   "fieldtype": "Section Break", 
+   "label": "Terms and Conditions", 
+   "oldfieldtype": "Section Break", 
+   "options": "icon-legal", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "tc_name", 
+   "fieldtype": "Link", 
+   "label": "Terms", 
+   "oldfieldname": "tc_name", 
+   "oldfieldtype": "Link", 
+   "options": "Terms and Conditions", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "terms", 
+   "fieldtype": "Text Editor", 
+   "label": "Terms and Conditions Details", 
+   "oldfieldname": "terms", 
+   "oldfieldtype": "Text Editor", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "transporter_info", 
+   "fieldtype": "Section Break", 
+   "label": "Transporter Info", 
+   "options": "icon-truck", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "transporter_name", 
+   "fieldtype": "Data", 
+   "label": "Transporter Name", 
+   "no_copy": 0, 
+   "oldfieldname": "transporter_name", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "print_width": "150px", 
+   "read_only": 0, 
+   "reqd": 0, 
+   "width": "150px"
+  }, 
+  {
+   "fieldname": "col_break34", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0, 
+   "print_width": "50%", 
+   "read_only": 0, 
+   "width": "50%"
+  }, 
+  {
+   "description": "Transporter lorry number", 
+   "fieldname": "lr_no", 
+   "fieldtype": "Data", 
+   "label": "Vehicle No", 
+   "no_copy": 0, 
+   "oldfieldname": "lr_no", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "print_width": "100px", 
+   "read_only": 0, 
+   "reqd": 0, 
+   "width": "100px"
+  }, 
+  {
+   "default": "Today", 
+   "description": "Date on which lorry started from your warehouse", 
+   "fieldname": "lr_date", 
+   "fieldtype": "Date", 
+   "label": "Vehicle Dispatch Date", 
+   "no_copy": 0, 
+   "oldfieldname": "lr_date", 
+   "oldfieldtype": "Date", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "print_width": "100px", 
+   "read_only": 0, 
+   "width": "100px"
+  }, 
+  {
+   "depends_on": "customer", 
+   "fieldname": "contact_info", 
+   "fieldtype": "Section Break", 
+   "label": "Contact Info", 
+   "options": "icon-bullhorn", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "description": "<a href=\"#Sales Browser/Territory\">Add / Edit</a>", 
+   "fieldname": "territory", 
+   "fieldtype": "Link", 
+   "hidden": 0, 
+   "in_filter": 1, 
+   "label": "Territory", 
+   "options": "Territory", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0, 
+   "reqd": 1, 
+   "search_index": 1
+  }, 
+  {
+   "description": "<a href=\"#Sales Browser/Customer Group\">Add / Edit</a>", 
+   "fieldname": "customer_group", 
+   "fieldtype": "Link", 
+   "in_filter": 1, 
+   "label": "Customer Group", 
+   "options": "Customer Group", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0, 
+   "search_index": 1
+  }, 
+  {
+   "fieldname": "col_break21", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0, 
+   "print_width": "50%", 
+   "read_only": 0, 
+   "width": "50%"
+  }, 
+  {
+   "fieldname": "contact_person", 
+   "fieldtype": "Link", 
+   "in_filter": 1, 
+   "label": "Contact Person", 
+   "options": "Contact", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "more_info", 
+   "fieldtype": "Section Break", 
+   "label": "More Info", 
+   "oldfieldtype": "Section Break", 
+   "options": "icon-file-text", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0
+  }, 
+  {
+   "description": "Track this Delivery Note against any Project", 
+   "fieldname": "project_name", 
+   "fieldtype": "Link", 
+   "in_filter": 1, 
+   "label": "Project Name", 
+   "oldfieldname": "project_name", 
+   "oldfieldtype": "Link", 
+   "options": "Project", 
+   "permlevel": 0, 
+   "read_only": 0, 
+   "search_index": 1
+  }, 
+  {
+   "depends_on": "eval:doc.source == 'Campaign'", 
+   "fieldname": "campaign", 
+   "fieldtype": "Link", 
+   "label": "Campaign", 
+   "oldfieldname": "campaign", 
+   "oldfieldtype": "Link", 
+   "options": "Campaign", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "source", 
+   "fieldtype": "Select", 
+   "label": "Source", 
+   "oldfieldname": "source", 
+   "oldfieldtype": "Select", 
+   "options": "\nExisting Customer\nReference\nAdvertisement\nCold Calling\nExhibition\nSupplier Reference\nMass Mailing\nCustomer's Vendor\nCampaign", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "column_break5", 
+   "fieldtype": "Column Break", 
+   "oldfieldtype": "Column Break", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "print_width": "50%", 
+   "read_only": 0, 
+   "width": "50%"
+  }, 
+  {
+   "description": "Time at which items were delivered from warehouse", 
+   "fieldname": "posting_time", 
+   "fieldtype": "Time", 
+   "in_filter": 0, 
+   "label": "Posting Time", 
+   "oldfieldname": "posting_time", 
+   "oldfieldtype": "Time", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "print_width": "100px", 
+   "read_only": 0, 
+   "reqd": 1, 
+   "search_index": 0, 
+   "width": "100px"
+  }, 
+  {
+   "fieldname": "fiscal_year", 
+   "fieldtype": "Select", 
+   "in_filter": 1, 
+   "label": "Fiscal Year", 
+   "oldfieldname": "fiscal_year", 
+   "oldfieldtype": "Select", 
+   "options": "link:Fiscal Year", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "print_width": "150px", 
+   "read_only": 0, 
+   "reqd": 1, 
+   "search_index": 1, 
+   "width": "150px"
+  }, 
+  {
+   "allow_on_submit": 1, 
+   "fieldname": "letter_head", 
+   "fieldtype": "Select", 
+   "label": "Letter Head", 
+   "oldfieldname": "letter_head", 
+   "oldfieldtype": "Link", 
+   "options": "link:Letter Head", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0
+  }, 
+  {
+   "allow_on_submit": 1, 
+   "fieldname": "select_print_heading", 
+   "fieldtype": "Link", 
+   "label": "Print Heading", 
+   "no_copy": 1, 
+   "oldfieldname": "select_print_heading", 
+   "oldfieldtype": "Link", 
+   "options": "Print Heading", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0, 
+   "report_hide": 1
+  }, 
+  {
+   "allow_on_submit": 1, 
+   "fieldname": "print_without_amount", 
+   "fieldtype": "Check", 
+   "label": "Print Without Amount", 
+   "oldfieldname": "print_without_amount", 
+   "oldfieldtype": "Check", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "section_break_83", 
+   "fieldtype": "Section Break", 
+   "permlevel": 0
+  }, 
+  {
+   "default": "Draft", 
+   "fieldname": "status", 
+   "fieldtype": "Select", 
+   "in_filter": 1, 
+   "label": "Status", 
+   "no_copy": 1, 
+   "oldfieldname": "status", 
+   "oldfieldtype": "Select", 
+   "options": "\nDraft\nSubmitted\nCancelled", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "print_width": "150px", 
+   "read_only": 1, 
+   "reqd": 1, 
+   "search_index": 1, 
+   "width": "150px"
+  }, 
+  {
+   "depends_on": "eval:!doc.__islocal", 
+   "description": "% of materials delivered against this Delivery Note", 
+   "fieldname": "per_installed", 
+   "fieldtype": "Percent", 
+   "in_filter": 1, 
+   "in_list_view": 1, 
+   "label": "% Installed", 
+   "no_copy": 1, 
+   "oldfieldname": "per_installed", 
+   "oldfieldtype": "Currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1, 
+   "search_index": 1
+  }, 
+  {
+   "fieldname": "installation_status", 
+   "fieldtype": "Select", 
+   "hidden": 1, 
+   "label": "Installation Status", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "column_break_89", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0
+  }, 
+  {
+   "description": "Required only for sample item.", 
+   "fieldname": "to_warehouse", 
+   "fieldtype": "Link", 
+   "hidden": 0, 
+   "label": "To Warehouse", 
+   "no_copy": 1, 
+   "oldfieldname": "to_warehouse", 
+   "oldfieldtype": "Link", 
+   "options": "Warehouse", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "excise_page", 
+   "fieldtype": "Data", 
+   "hidden": 1, 
+   "label": "Excise Page Number", 
+   "oldfieldname": "excise_page", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "instructions", 
+   "fieldtype": "Text", 
+   "label": "Instructions", 
+   "oldfieldname": "instructions", 
+   "oldfieldtype": "Text", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "sales_team_section_break", 
+   "fieldtype": "Section Break", 
+   "label": "Sales Team", 
+   "oldfieldtype": "Section Break", 
+   "options": "icon-group", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "sales_partner", 
+   "fieldtype": "Link", 
+   "label": "Sales Partner", 
+   "no_copy": 0, 
+   "oldfieldname": "sales_partner", 
+   "oldfieldtype": "Link", 
+   "options": "Sales Partner", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "print_width": "150px", 
+   "read_only": 0, 
+   "width": "150px"
+  }, 
+  {
+   "fieldname": "column_break7", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "print_width": "50%", 
+   "read_only": 0, 
+   "width": "50%"
+  }, 
+  {
+   "fieldname": "commission_rate", 
+   "fieldtype": "Float", 
+   "label": "Commission Rate (%)", 
+   "no_copy": 0, 
+   "oldfieldname": "commission_rate", 
+   "oldfieldtype": "Currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "print_width": "100px", 
+   "read_only": 0, 
+   "width": "100px"
+  }, 
+  {
+   "fieldname": "total_commission", 
+   "fieldtype": "Currency", 
+   "label": "Total Commission", 
+   "no_copy": 0, 
+   "oldfieldname": "total_commission", 
+   "oldfieldtype": "Currency", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "section_break1", 
+   "fieldtype": "Section Break", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "sales_team", 
+   "fieldtype": "Table", 
+   "label": "Sales Team1", 
+   "oldfieldname": "sales_team", 
+   "oldfieldtype": "Table", 
+   "options": "Sales Team", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0
+  }
+ ], 
+ "hide_toolbar": 0, 
+ "icon": "icon-truck", 
+ "idx": 1, 
+ "in_create": 0, 
+ "is_submittable": 1, 
+ "modified": "2014-01-28 18:51:42", 
+ "modified_by": "Administrator", 
+ "module": "Stock", 
+ "name": "Delivery Note", 
+ "owner": "Administrator", 
+ "permissions": [
+  {
+   "amend": 1, 
+   "cancel": 1, 
+   "create": 1, 
+   "delete": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Material User", 
+   "submit": 1, 
+   "write": 1
+  }, 
+  {
+   "amend": 1, 
+   "cancel": 1, 
+   "create": 1, 
+   "delete": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Material Manager", 
+   "submit": 1, 
+   "write": 1
+  }, 
+  {
+   "amend": 1, 
+   "cancel": 1, 
+   "create": 1, 
+   "delete": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Sales User", 
+   "submit": 1, 
+   "write": 1
+  }, 
+  {
+   "cancel": 0, 
+   "create": 0, 
+   "delete": 0, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Accounts User", 
+   "submit": 0, 
+   "write": 0
+  }, 
+  {
+   "cancel": 0, 
+   "delete": 0, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Customer"
+  }
+ ], 
+ "read_only_onload": 1, 
+ "search_fields": "status,customer,customer_name, territory,grand_total"
+}
\ No newline at end of file
diff --git a/erpnext/stock/doctype/delivery_note_item/delivery_note_item.txt b/erpnext/stock/doctype/delivery_note_item/delivery_note_item.txt
index f5f7712..e7be79f 100644
--- a/erpnext/stock/doctype/delivery_note_item/delivery_note_item.txt
+++ b/erpnext/stock/doctype/delivery_note_item/delivery_note_item.txt
@@ -1,458 +1,445 @@
-[
- {
-  "creation": "2013-04-22 13:15:44", 
-  "docstatus": 0, 
-  "modified": "2014-02-28 11:20:58", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "autoname": "DND/.#######", 
-  "doctype": "DocType", 
-  "istable": 1, 
-  "module": "Stock", 
-  "name": "__common__"
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "Delivery Note Item", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Delivery Note Item"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "barcode", 
-  "fieldtype": "Data", 
-  "in_list_view": 0, 
-  "label": "Barcode", 
-  "print_hide": 1, 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "item_code", 
-  "fieldtype": "Link", 
-  "in_filter": 1, 
-  "in_list_view": 1, 
-  "label": "Item Code", 
-  "oldfieldname": "item_code", 
-  "oldfieldtype": "Link", 
-  "options": "Item", 
-  "print_width": "150px", 
-  "read_only": 0, 
-  "reqd": 1, 
-  "search_index": 1, 
-  "width": "150px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "item_name", 
-  "fieldtype": "Data", 
-  "in_list_view": 0, 
-  "label": "Item Name", 
-  "oldfieldname": "item_name", 
-  "oldfieldtype": "Data", 
-  "print_hide": 1, 
-  "print_width": "150px", 
-  "read_only": 0, 
-  "reqd": 1, 
-  "width": "150px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "col_break1", 
-  "fieldtype": "Column Break"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "customer_item_code", 
-  "fieldtype": "Data", 
-  "hidden": 1, 
-  "in_list_view": 0, 
-  "label": "Customer's Item Code", 
-  "print_hide": 1, 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "description", 
-  "fieldtype": "Small Text", 
-  "in_list_view": 1, 
-  "label": "Description", 
-  "oldfieldname": "description", 
-  "oldfieldtype": "Small Text", 
-  "print_width": "300px", 
-  "read_only": 0, 
-  "reqd": 1, 
-  "width": "300px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "quantity_and_rate", 
-  "fieldtype": "Section Break", 
-  "in_list_view": 0, 
-  "label": "Quantity and Rate"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "qty", 
-  "fieldtype": "Float", 
-  "in_list_view": 1, 
-  "label": "Quantity", 
-  "oldfieldname": "qty", 
-  "oldfieldtype": "Currency", 
-  "print_width": "100px", 
-  "read_only": 0, 
-  "reqd": 1, 
-  "width": "100px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "price_list_rate", 
-  "fieldtype": "Currency", 
-  "in_list_view": 0, 
-  "label": "Price List Rate", 
-  "no_copy": 0, 
-  "oldfieldname": "ref_rate", 
-  "oldfieldtype": "Currency", 
-  "options": "currency", 
-  "print_hide": 1, 
-  "print_width": "100px", 
-  "read_only": 1, 
-  "reqd": 0, 
-  "width": "100px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "discount_percentage", 
-  "fieldtype": "Float", 
-  "in_list_view": 0, 
-  "label": "Discount (%)", 
-  "oldfieldname": "adj_rate", 
-  "oldfieldtype": "Float", 
-  "print_hide": 1, 
-  "print_width": "100px", 
-  "read_only": 0, 
-  "width": "100px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "col_break2", 
-  "fieldtype": "Column Break"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "stock_uom", 
-  "fieldtype": "Link", 
-  "in_list_view": 0, 
-  "label": "UOM", 
-  "oldfieldname": "stock_uom", 
-  "oldfieldtype": "Data", 
-  "options": "UOM", 
-  "print_hide": 0, 
-  "print_width": "50px", 
-  "read_only": 1, 
-  "reqd": 1, 
-  "width": "50px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "base_price_list_rate", 
-  "fieldtype": "Currency", 
-  "in_list_view": 0, 
-  "label": "Price List Rate (Company Currency)", 
-  "oldfieldname": "base_ref_rate", 
-  "oldfieldtype": "Currency", 
-  "options": "Company:company:default_currency", 
-  "print_hide": 1, 
-  "print_width": "100px", 
-  "read_only": 1, 
-  "width": "100px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "section_break_1", 
-  "fieldtype": "Section Break"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "rate", 
-  "fieldtype": "Currency", 
-  "in_list_view": 1, 
-  "label": "Rate", 
-  "oldfieldname": "export_rate", 
-  "oldfieldtype": "Currency", 
-  "options": "currency", 
-  "print_hide": 0, 
-  "print_width": "150px", 
-  "read_only": 0, 
-  "reqd": 0, 
-  "width": "150px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "amount", 
-  "fieldtype": "Currency", 
-  "in_list_view": 1, 
-  "label": "Amount", 
-  "oldfieldname": "export_amount", 
-  "oldfieldtype": "Currency", 
-  "options": "currency", 
-  "print_hide": 0, 
-  "print_width": "100px", 
-  "read_only": 1, 
-  "reqd": 0, 
-  "width": "100px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "col_break3", 
-  "fieldtype": "Column Break"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "base_rate", 
-  "fieldtype": "Currency", 
-  "in_list_view": 0, 
-  "label": "Rate (Company Currency)", 
-  "oldfieldname": "basic_rate", 
-  "oldfieldtype": "Currency", 
-  "options": "Company:company:default_currency", 
-  "print_hide": 1, 
-  "print_width": "150px", 
-  "read_only": 1, 
-  "reqd": 0, 
-  "width": "150px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "base_amount", 
-  "fieldtype": "Currency", 
-  "in_list_view": 0, 
-  "label": "Amount (Company Currency)", 
-  "oldfieldname": "amount", 
-  "oldfieldtype": "Currency", 
-  "options": "Company:company:default_currency", 
-  "print_hide": 1, 
-  "print_width": "100px", 
-  "read_only": 1, 
-  "reqd": 0, 
-  "width": "100px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "pricing_rule_for_price", 
-  "fieldtype": "Link", 
-  "label": "Pricing Rule For Price", 
-  "options": "Pricing Rule", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "pricing_rule_for_discount", 
-  "fieldtype": "Link", 
-  "label": "Pricing Rule For Discount", 
-  "options": "Pricing Rule", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "warehouse_and_reference", 
-  "fieldtype": "Section Break", 
-  "in_list_view": 0, 
-  "label": "Warehouse and Reference"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "warehouse", 
-  "fieldtype": "Link", 
-  "in_list_view": 0, 
-  "label": "Warehouse", 
-  "oldfieldname": "warehouse", 
-  "oldfieldtype": "Link", 
-  "options": "Warehouse", 
-  "print_hide": 1, 
-  "print_width": "100px", 
-  "read_only": 0, 
-  "width": "100px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "serial_no", 
-  "fieldtype": "Text", 
-  "in_filter": 1, 
-  "in_list_view": 1, 
-  "label": "Serial No", 
-  "no_copy": 1, 
-  "oldfieldname": "serial_no", 
-  "oldfieldtype": "Text", 
-  "print_hide": 0, 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "batch_no", 
-  "fieldtype": "Link", 
-  "hidden": 0, 
-  "label": "Batch No", 
-  "oldfieldname": "batch_no", 
-  "oldfieldtype": "Link", 
-  "options": "Batch", 
-  "print_hide": 1, 
-  "read_only": 0
- }, 
- {
-  "description": "<a href=\"#Sales Browser/Item Group\">Add / Edit</a>", 
-  "doctype": "DocField", 
-  "fieldname": "item_group", 
-  "fieldtype": "Link", 
-  "hidden": 1, 
-  "label": "Item Group", 
-  "oldfieldname": "item_group", 
-  "oldfieldtype": "Link", 
-  "options": "Item Group", 
-  "print_hide": 1, 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "brand", 
-  "fieldtype": "Link", 
-  "hidden": 1, 
-  "label": "Brand Name", 
-  "oldfieldname": "brand", 
-  "oldfieldtype": "Link", 
-  "options": "Brand", 
-  "print_hide": 1, 
-  "print_width": "150px", 
-  "read_only": 1, 
-  "width": "150px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "item_tax_rate", 
-  "fieldtype": "Small Text", 
-  "hidden": 1, 
-  "label": "Item Tax Rate", 
-  "oldfieldname": "item_tax_rate", 
-  "oldfieldtype": "Small Text", 
-  "print_hide": 1, 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "col_break4", 
-  "fieldtype": "Column Break"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "actual_qty", 
-  "fieldtype": "Float", 
-  "label": "Available Qty at Warehouse", 
-  "no_copy": 1, 
-  "oldfieldname": "actual_qty", 
-  "oldfieldtype": "Currency", 
-  "print_hide": 1, 
-  "print_width": "150px", 
-  "read_only": 1, 
-  "width": "150px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "expense_account", 
-  "fieldtype": "Link", 
-  "hidden": 0, 
-  "label": "Expense Account", 
-  "no_copy": 1, 
-  "options": "Account", 
-  "print_hide": 1, 
-  "read_only": 0, 
-  "width": "120px"
- }, 
- {
-  "default": ":Company", 
-  "doctype": "DocField", 
-  "fieldname": "cost_center", 
-  "fieldtype": "Link", 
-  "hidden": 0, 
-  "label": "Cost Center", 
-  "no_copy": 1, 
-  "options": "Cost Center", 
-  "print_hide": 1, 
-  "read_only": 0, 
-  "width": "120px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "against_sales_order", 
-  "fieldtype": "Link", 
-  "label": "Against Sales Order", 
-  "options": "Sales Order", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "against_sales_invoice", 
-  "fieldtype": "Link", 
-  "label": "Against Sales Invoice", 
-  "options": "Sales Invoice", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "prevdoc_detail_docname", 
-  "fieldtype": "Data", 
-  "hidden": 1, 
-  "in_filter": 1, 
-  "label": "Against Document Detail No", 
-  "no_copy": 1, 
-  "oldfieldname": "prevdoc_detail_docname", 
-  "oldfieldtype": "Data", 
-  "print_hide": 1, 
-  "print_width": "150px", 
-  "read_only": 1, 
-  "search_index": 0, 
-  "width": "150px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "installed_qty", 
-  "fieldtype": "Float", 
-  "label": "Installed Qty", 
-  "no_copy": 1, 
-  "oldfieldname": "installed_qty", 
-  "oldfieldtype": "Currency", 
-  "print_hide": 1, 
-  "print_width": "150px", 
-  "read_only": 1, 
-  "width": "150px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "buying_amount", 
-  "fieldtype": "Currency", 
-  "hidden": 1, 
-  "label": "Buying Amount", 
-  "no_copy": 1, 
-  "options": "Company:company:default_currency", 
-  "print_hide": 1, 
-  "read_only": 1
- }, 
- {
-  "allow_on_submit": 1, 
-  "doctype": "DocField", 
-  "fieldname": "page_break", 
-  "fieldtype": "Check", 
-  "label": "Page Break", 
-  "oldfieldname": "page_break", 
-  "oldfieldtype": "Check", 
-  "print_hide": 1, 
-  "read_only": 0
- }
-]
\ No newline at end of file
+{
+ "autoname": "DND/.#######", 
+ "creation": "2013-04-22 13:15:44", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "fields": [
+  {
+   "fieldname": "barcode", 
+   "fieldtype": "Data", 
+   "in_list_view": 0, 
+   "label": "Barcode", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0
+  }, 
+  {
+   "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": "item_name", 
+   "fieldtype": "Data", 
+   "in_list_view": 0, 
+   "label": "Item Name", 
+   "oldfieldname": "item_name", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "print_width": "150px", 
+   "read_only": 0, 
+   "reqd": 1, 
+   "width": "150px"
+  }, 
+  {
+   "fieldname": "col_break1", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "customer_item_code", 
+   "fieldtype": "Data", 
+   "hidden": 1, 
+   "in_list_view": 0, 
+   "label": "Customer's Item Code", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1
+  }, 
+  {
+   "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": "quantity_and_rate", 
+   "fieldtype": "Section Break", 
+   "in_list_view": 0, 
+   "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, 
+   "width": "100px"
+  }, 
+  {
+   "fieldname": "price_list_rate", 
+   "fieldtype": "Currency", 
+   "in_list_view": 0, 
+   "label": "Price List Rate", 
+   "no_copy": 0, 
+   "oldfieldname": "ref_rate", 
+   "oldfieldtype": "Currency", 
+   "options": "currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "print_width": "100px", 
+   "read_only": 1, 
+   "reqd": 0, 
+   "width": "100px"
+  }, 
+  {
+   "fieldname": "discount_percentage", 
+   "fieldtype": "Float", 
+   "in_list_view": 0, 
+   "label": "Discount (%)", 
+   "oldfieldname": "adj_rate", 
+   "oldfieldtype": "Float", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "print_width": "100px", 
+   "read_only": 0, 
+   "width": "100px"
+  }, 
+  {
+   "fieldname": "col_break2", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "stock_uom", 
+   "fieldtype": "Link", 
+   "in_list_view": 0, 
+   "label": "UOM", 
+   "oldfieldname": "stock_uom", 
+   "oldfieldtype": "Data", 
+   "options": "UOM", 
+   "permlevel": 0, 
+   "print_hide": 0, 
+   "print_width": "50px", 
+   "read_only": 1, 
+   "reqd": 1, 
+   "width": "50px"
+  }, 
+  {
+   "fieldname": "base_price_list_rate", 
+   "fieldtype": "Currency", 
+   "in_list_view": 0, 
+   "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_1", 
+   "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_hide": 0, 
+   "print_width": "150px", 
+   "read_only": 0, 
+   "reqd": 0, 
+   "width": "150px"
+  }, 
+  {
+   "fieldname": "amount", 
+   "fieldtype": "Currency", 
+   "in_list_view": 1, 
+   "label": "Amount", 
+   "oldfieldname": "export_amount", 
+   "oldfieldtype": "Currency", 
+   "options": "currency", 
+   "permlevel": 0, 
+   "print_hide": 0, 
+   "print_width": "100px", 
+   "read_only": 1, 
+   "reqd": 0, 
+   "width": "100px"
+  }, 
+  {
+   "fieldname": "col_break3", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "base_rate", 
+   "fieldtype": "Currency", 
+   "in_list_view": 0, 
+   "label": "Rate (Company Currency)", 
+   "oldfieldname": "basic_rate", 
+   "oldfieldtype": "Currency", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "print_width": "150px", 
+   "read_only": 1, 
+   "reqd": 0, 
+   "width": "150px"
+  }, 
+  {
+   "fieldname": "base_amount", 
+   "fieldtype": "Currency", 
+   "in_list_view": 0, 
+   "label": "Amount (Company Currency)", 
+   "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_for_price", 
+   "fieldtype": "Link", 
+   "label": "Pricing Rule For Price", 
+   "options": "Pricing Rule", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "pricing_rule_for_discount", 
+   "fieldtype": "Link", 
+   "label": "Pricing Rule For Discount", 
+   "options": "Pricing Rule", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "warehouse_and_reference", 
+   "fieldtype": "Section Break", 
+   "in_list_view": 0, 
+   "label": "Warehouse and Reference", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "warehouse", 
+   "fieldtype": "Link", 
+   "in_list_view": 0, 
+   "label": "Warehouse", 
+   "oldfieldname": "warehouse", 
+   "oldfieldtype": "Link", 
+   "options": "Warehouse", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "print_width": "100px", 
+   "read_only": 0, 
+   "width": "100px"
+  }, 
+  {
+   "fieldname": "serial_no", 
+   "fieldtype": "Text", 
+   "in_filter": 1, 
+   "in_list_view": 1, 
+   "label": "Serial No", 
+   "no_copy": 1, 
+   "oldfieldname": "serial_no", 
+   "oldfieldtype": "Text", 
+   "permlevel": 0, 
+   "print_hide": 0, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "batch_no", 
+   "fieldtype": "Link", 
+   "hidden": 0, 
+   "label": "Batch No", 
+   "oldfieldname": "batch_no", 
+   "oldfieldtype": "Link", 
+   "options": "Batch", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0
+  }, 
+  {
+   "description": "<a href=\"#Sales Browser/Item Group\">Add / Edit</a>", 
+   "fieldname": "item_group", 
+   "fieldtype": "Link", 
+   "hidden": 1, 
+   "label": "Item Group", 
+   "oldfieldname": "item_group", 
+   "oldfieldtype": "Link", 
+   "options": "Item Group", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "brand", 
+   "fieldtype": "Link", 
+   "hidden": 1, 
+   "label": "Brand Name", 
+   "oldfieldname": "brand", 
+   "oldfieldtype": "Link", 
+   "options": "Brand", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "print_width": "150px", 
+   "read_only": 1, 
+   "width": "150px"
+  }, 
+  {
+   "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": "col_break4", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "actual_qty", 
+   "fieldtype": "Float", 
+   "label": "Available Qty at Warehouse", 
+   "no_copy": 1, 
+   "oldfieldname": "actual_qty", 
+   "oldfieldtype": "Currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "print_width": "150px", 
+   "read_only": 1, 
+   "width": "150px"
+  }, 
+  {
+   "fieldname": "expense_account", 
+   "fieldtype": "Link", 
+   "hidden": 0, 
+   "label": "Expense Account", 
+   "no_copy": 1, 
+   "options": "Account", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0, 
+   "width": "120px"
+  }, 
+  {
+   "default": ":Company", 
+   "fieldname": "cost_center", 
+   "fieldtype": "Link", 
+   "hidden": 0, 
+   "label": "Cost Center", 
+   "no_copy": 1, 
+   "options": "Cost Center", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0, 
+   "width": "120px"
+  }, 
+  {
+   "fieldname": "against_sales_order", 
+   "fieldtype": "Link", 
+   "label": "Against Sales Order", 
+   "options": "Sales Order", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "against_sales_invoice", 
+   "fieldtype": "Link", 
+   "label": "Against Sales Invoice", 
+   "options": "Sales Invoice", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "prevdoc_detail_docname", 
+   "fieldtype": "Data", 
+   "hidden": 1, 
+   "in_filter": 1, 
+   "label": "Against Document Detail No", 
+   "no_copy": 1, 
+   "oldfieldname": "prevdoc_detail_docname", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "print_width": "150px", 
+   "read_only": 1, 
+   "search_index": 0, 
+   "width": "150px"
+  }, 
+  {
+   "fieldname": "installed_qty", 
+   "fieldtype": "Float", 
+   "label": "Installed Qty", 
+   "no_copy": 1, 
+   "oldfieldname": "installed_qty", 
+   "oldfieldtype": "Currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "print_width": "150px", 
+   "read_only": 1, 
+   "width": "150px"
+  }, 
+  {
+   "fieldname": "buying_amount", 
+   "fieldtype": "Currency", 
+   "hidden": 1, 
+   "label": "Buying Amount", 
+   "no_copy": 1, 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 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
+  }
+ ], 
+ "idx": 1, 
+ "istable": 1, 
+ "modified": "2014-02-28 11:20:58", 
+ "modified_by": "Administrator", 
+ "module": "Stock", 
+ "name": "Delivery Note Item", 
+ "owner": "Administrator"
+}
\ No newline at end of file
diff --git a/erpnext/stock/doctype/item/item.txt b/erpnext/stock/doctype/item/item.txt
index 229fa97..7aac35c 100644
--- a/erpnext/stock/doctype/item/item.txt
+++ b/erpnext/stock/doctype/item/item.txt
@@ -1,892 +1,885 @@
-[
- {
-  "creation": "2013-05-03 10:45:46", 
-  "docstatus": 0, 
-  "modified": "2014-03-13 15:54:09", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "allow_attach": 1, 
-  "allow_import": 1, 
-  "allow_rename": 1, 
-  "autoname": "field:item_code", 
-  "default_print_format": "Standard", 
-  "description": "A Product or a Service that is bought, sold or kept in stock.", 
-  "doctype": "DocType", 
-  "document_type": "Master", 
-  "icon": "icon-tag", 
-  "max_attachments": 1, 
-  "module": "Stock", 
-  "name": "__common__", 
-  "search_fields": "item_name,description,item_group,customer_code"
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "Item", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "cancel": 0, 
-  "doctype": "DocPerm", 
-  "email": 1, 
-  "name": "__common__", 
-  "parent": "Item", 
-  "parentfield": "permissions", 
-  "parenttype": "DocType", 
-  "permlevel": 0, 
-  "print": 1, 
-  "read": 1, 
-  "report": 1, 
-  "submit": 0
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Item"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "name_and_description_section", 
-  "fieldtype": "Section Break", 
-  "label": "Name and Description", 
-  "no_copy": 0, 
-  "oldfieldtype": "Section Break", 
-  "options": "icon-flag", 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "naming_series", 
-  "fieldtype": "Select", 
-  "label": "Series", 
-  "options": "\nITEM", 
-  "read_only": 0
- }, 
- {
-  "description": "Item will be saved by this name in the data base.", 
-  "doctype": "DocField", 
-  "fieldname": "item_code", 
-  "fieldtype": "Data", 
-  "in_filter": 0, 
-  "label": "Item Code", 
-  "no_copy": 1, 
-  "oldfieldname": "item_code", 
-  "oldfieldtype": "Data", 
-  "read_only": 0, 
-  "reqd": 0, 
-  "search_index": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "item_name", 
-  "fieldtype": "Data", 
-  "in_filter": 1, 
-  "in_list_view": 1, 
-  "label": "Item Name", 
-  "oldfieldname": "item_name", 
-  "oldfieldtype": "Data", 
-  "read_only": 0, 
-  "reqd": 1, 
-  "search_index": 1
- }, 
- {
-  "description": "<a href=\"#Sales Browser/Item Group\">Add / Edit</a>", 
-  "doctype": "DocField", 
-  "fieldname": "item_group", 
-  "fieldtype": "Link", 
-  "in_filter": 1, 
-  "label": "Item Group", 
-  "oldfieldname": "item_group", 
-  "oldfieldtype": "Link", 
-  "options": "Item Group", 
-  "read_only": 0, 
-  "reqd": 1
- }, 
- {
-  "description": "Unit of measurement of this item (e.g. Kg, Unit, No, Pair).", 
-  "doctype": "DocField", 
-  "fieldname": "stock_uom", 
-  "fieldtype": "Link", 
-  "ignore_restrictions": 1, 
-  "label": "Default Unit of Measure", 
-  "oldfieldname": "stock_uom", 
-  "oldfieldtype": "Link", 
-  "options": "UOM", 
-  "read_only": 0, 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "brand", 
-  "fieldtype": "Link", 
-  "hidden": 0, 
-  "label": "Brand", 
-  "oldfieldname": "brand", 
-  "oldfieldtype": "Link", 
-  "options": "Brand", 
-  "print_hide": 1, 
-  "read_only": 0, 
-  "reqd": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "barcode", 
-  "fieldtype": "Data", 
-  "label": "Barcode", 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break0", 
-  "fieldtype": "Column Break", 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "image", 
-  "fieldtype": "Select", 
-  "label": "Image", 
-  "options": "attach_files:", 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "image_view", 
-  "fieldtype": "Image", 
-  "in_list_view": 1, 
-  "label": "Image View", 
-  "options": "image", 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "description", 
-  "fieldtype": "Small Text", 
-  "in_filter": 0, 
-  "in_list_view": 1, 
-  "label": "Description", 
-  "oldfieldname": "description", 
-  "oldfieldtype": "Text", 
-  "read_only": 0, 
-  "reqd": 1, 
-  "search_index": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "description_html", 
-  "fieldtype": "Small Text", 
-  "label": "Description HTML", 
-  "read_only": 0
- }, 
- {
-  "description": "Generates HTML to include selected image in the description", 
-  "doctype": "DocField", 
-  "fieldname": "add_image", 
-  "fieldtype": "Button", 
-  "label": "Generate Description HTML", 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "inventory", 
-  "fieldtype": "Section Break", 
-  "label": "Inventory", 
-  "oldfieldtype": "Section Break", 
-  "options": "icon-truck", 
-  "read_only": 0
- }, 
- {
-  "default": "Yes", 
-  "description": "Select \"Yes\" if you are maintaining stock of this item in your Inventory.", 
-  "doctype": "DocField", 
-  "fieldname": "is_stock_item", 
-  "fieldtype": "Select", 
-  "label": "Is Stock Item", 
-  "oldfieldname": "is_stock_item", 
-  "oldfieldtype": "Select", 
-  "options": "Yes\nNo", 
-  "read_only": 0, 
-  "reqd": 1
- }, 
- {
-  "depends_on": "eval:doc.is_stock_item==\"Yes\"", 
-  "description": "Mandatory if Stock Item is \"Yes\". Also the default warehouse where reserved quantity is set from Sales Order.", 
-  "doctype": "DocField", 
-  "fieldname": "default_warehouse", 
-  "fieldtype": "Link", 
-  "ignore_restrictions": 1, 
-  "label": "Default Warehouse", 
-  "oldfieldname": "default_warehouse", 
-  "oldfieldtype": "Link", 
-  "options": "Warehouse", 
-  "read_only": 0
- }, 
- {
-  "depends_on": "eval:doc.is_stock_item==\"Yes\"", 
-  "description": "Percentage variation in quantity to be allowed while receiving or delivering this item.", 
-  "doctype": "DocField", 
-  "fieldname": "tolerance", 
-  "fieldtype": "Float", 
-  "label": "Allowance Percent", 
-  "oldfieldname": "tolerance", 
-  "oldfieldtype": "Currency", 
-  "read_only": 0
- }, 
- {
-  "depends_on": "eval:doc.is_stock_item==\"Yes\"", 
-  "doctype": "DocField", 
-  "fieldname": "valuation_method", 
-  "fieldtype": "Select", 
-  "label": "Valuation Method", 
-  "options": "\nFIFO\nMoving Average", 
-  "read_only": 0
- }, 
- {
-  "default": "0.00", 
-  "depends_on": "eval:doc.is_stock_item==\"Yes\"", 
-  "description": "You can enter the minimum quantity of this item to be ordered.", 
-  "doctype": "DocField", 
-  "fieldname": "min_order_qty", 
-  "fieldtype": "Float", 
-  "hidden": 0, 
-  "label": "Minimum Order Qty", 
-  "oldfieldname": "min_order_qty", 
-  "oldfieldtype": "Currency", 
-  "read_only": 0
- }, 
- {
-  "depends_on": "eval:doc.is_stock_item==\"Yes\"", 
-  "doctype": "DocField", 
-  "fieldname": "column_break1", 
-  "fieldtype": "Column Break", 
-  "oldfieldtype": "Column Break", 
-  "read_only": 0, 
-  "width": "50%"
- }, 
- {
-  "default": "No", 
-  "depends_on": "eval:doc.is_stock_item==\"Yes\"", 
-  "description": "Select \"Yes\" if this item is used for some internal purpose in your company.", 
-  "doctype": "DocField", 
-  "fieldname": "is_asset_item", 
-  "fieldtype": "Select", 
-  "label": "Is Fixed Asset Item", 
-  "oldfieldname": "is_asset_item", 
-  "oldfieldtype": "Select", 
-  "options": "Yes\nNo", 
-  "read_only": 0, 
-  "reqd": 1
- }, 
- {
-  "default": "No", 
-  "depends_on": "eval:doc.is_stock_item==\"Yes\"", 
-  "doctype": "DocField", 
-  "fieldname": "has_batch_no", 
-  "fieldtype": "Select", 
-  "label": "Has Batch No", 
-  "oldfieldname": "has_batch_no", 
-  "oldfieldtype": "Select", 
-  "options": "Yes\nNo", 
-  "read_only": 0, 
-  "reqd": 1
- }, 
- {
-  "default": "No", 
-  "depends_on": "eval:doc.is_stock_item==\"Yes\"", 
-  "description": "Selecting \"Yes\" will give a unique identity to each entity of this item which can be viewed in the Serial No master.", 
-  "doctype": "DocField", 
-  "fieldname": "has_serial_no", 
-  "fieldtype": "Select", 
-  "in_filter": 1, 
-  "label": "Has Serial No", 
-  "oldfieldname": "has_serial_no", 
-  "oldfieldtype": "Select", 
-  "options": "Yes\nNo", 
-  "read_only": 0, 
-  "reqd": 1
- }, 
- {
-  "depends_on": "eval: doc.has_serial_no===\"Yes\"", 
-  "description": "Example: ABCD.#####\nIf series is set and Serial No is not mentioned in transactions, then automatic serial number will be created based on this series. If you always want to explicitly mention Serial Nos for this item. leave this blank.", 
-  "doctype": "DocField", 
-  "fieldname": "serial_no_series", 
-  "fieldtype": "Data", 
-  "label": "Serial Number Series"
- }, 
- {
-  "depends_on": "eval:doc.is_stock_item==\"Yes\"", 
-  "doctype": "DocField", 
-  "fieldname": "warranty_period", 
-  "fieldtype": "Data", 
-  "label": "Warranty Period (in days)", 
-  "oldfieldname": "warranty_period", 
-  "oldfieldtype": "Data", 
-  "read_only": 0
- }, 
- {
-  "depends_on": "eval:doc.is_stock_item==\"Yes\"", 
-  "doctype": "DocField", 
-  "fieldname": "end_of_life", 
-  "fieldtype": "Date", 
-  "label": "End of Life", 
-  "oldfieldname": "end_of_life", 
-  "oldfieldtype": "Date", 
-  "read_only": 0
- }, 
- {
-  "depends_on": "eval:doc.is_stock_item==\"Yes\"", 
-  "description": "Net Weight of each Item", 
-  "doctype": "DocField", 
-  "fieldname": "net_weight", 
-  "fieldtype": "Float", 
-  "label": "Net Weight", 
-  "read_only": 0
- }, 
- {
-  "depends_on": "eval:doc.is_stock_item==\"Yes\"", 
-  "doctype": "DocField", 
-  "fieldname": "weight_uom", 
-  "fieldtype": "Link", 
-  "ignore_restrictions": 1, 
-  "label": "Weight UOM", 
-  "options": "UOM", 
-  "read_only": 0
- }, 
- {
-  "description": "Auto-raise Material Request if quantity goes below re-order level in a warehouse", 
-  "doctype": "DocField", 
-  "fieldname": "reorder_section", 
-  "fieldtype": "Section Break", 
-  "label": "Re-order", 
-  "options": "icon-rss", 
-  "read_only": 0
- }, 
- {
-  "depends_on": "eval:doc.is_stock_item==\"Yes\"", 
-  "doctype": "DocField", 
-  "fieldname": "re_order_level", 
-  "fieldtype": "Float", 
-  "label": "Re-Order Level", 
-  "oldfieldname": "re_order_level", 
-  "oldfieldtype": "Currency", 
-  "read_only": 0
- }, 
- {
-  "depends_on": "eval:doc.is_stock_item==\"Yes\"", 
-  "doctype": "DocField", 
-  "fieldname": "re_order_qty", 
-  "fieldtype": "Float", 
-  "label": "Re-Order Qty", 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "section_break_31", 
-  "fieldtype": "Section Break", 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "item_reorder", 
-  "fieldtype": "Table", 
-  "label": "Warehouse-wise Item Reorder", 
-  "options": "Item Reorder", 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "purchase_details", 
-  "fieldtype": "Section Break", 
-  "label": "Purchase Details", 
-  "oldfieldtype": "Section Break", 
-  "options": "icon-shopping-cart", 
-  "read_only": 0
- }, 
- {
-  "default": "Yes", 
-  "description": "Selecting \"Yes\" will allow this item to appear in Purchase Order , Purchase Receipt.", 
-  "doctype": "DocField", 
-  "fieldname": "is_purchase_item", 
-  "fieldtype": "Select", 
-  "label": "Is Purchase Item", 
-  "oldfieldname": "is_purchase_item", 
-  "oldfieldtype": "Select", 
-  "options": "Yes\nNo", 
-  "read_only": 0, 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "default_supplier", 
-  "fieldtype": "Link", 
-  "ignore_restrictions": 1, 
-  "label": "Default Supplier", 
-  "options": "Supplier"
- }, 
- {
-  "depends_on": "eval:doc.is_purchase_item==\"Yes\"", 
-  "description": "Lead Time days is number of days by which this item is expected in your warehouse. This days is fetched in Material Request when you select this item.", 
-  "doctype": "DocField", 
-  "fieldname": "lead_time_days", 
-  "fieldtype": "Int", 
-  "label": "Lead Time Days", 
-  "no_copy": 1, 
-  "oldfieldname": "lead_time_days", 
-  "oldfieldtype": "Int", 
-  "read_only": 0
- }, 
- {
-  "depends_on": "eval:doc.is_purchase_item==\"Yes\"", 
-  "description": "Default Purchase Account in which cost of the item will be debited.", 
-  "doctype": "DocField", 
-  "fieldname": "expense_account", 
-  "fieldtype": "Link", 
-  "ignore_restrictions": 1, 
-  "label": "Default Expense Account", 
-  "oldfieldname": "purchase_account", 
-  "oldfieldtype": "Link", 
-  "options": "Account", 
-  "read_only": 0
- }, 
- {
-  "depends_on": "eval:doc.is_purchase_item==\"Yes\"", 
-  "description": "Default Cost Center for tracking expense for this item.", 
-  "doctype": "DocField", 
-  "fieldname": "buying_cost_center", 
-  "fieldtype": "Link", 
-  "ignore_restrictions": 1, 
-  "label": "Default Buying Cost Center", 
-  "oldfieldname": "cost_center", 
-  "oldfieldtype": "Link", 
-  "options": "Cost Center", 
-  "read_only": 0
- }, 
- {
-  "depends_on": "eval:doc.is_purchase_item==\"Yes\"", 
-  "doctype": "DocField", 
-  "fieldname": "last_purchase_rate", 
-  "fieldtype": "Float", 
-  "label": "Last Purchase Rate", 
-  "no_copy": 1, 
-  "oldfieldname": "last_purchase_rate", 
-  "oldfieldtype": "Currency", 
-  "read_only": 1
- }, 
- {
-  "depends_on": "eval:doc.is_purchase_item==\"Yes\"", 
-  "doctype": "DocField", 
-  "fieldname": "standard_rate", 
-  "fieldtype": "Float", 
-  "label": "Standard Rate", 
-  "oldfieldname": "standard_rate", 
-  "oldfieldtype": "Currency", 
-  "read_only": 0
- }, 
- {
-  "depends_on": "eval:doc.is_purchase_item==\"Yes\"", 
-  "doctype": "DocField", 
-  "fieldname": "column_break2", 
-  "fieldtype": "Column Break", 
-  "oldfieldtype": "Column Break", 
-  "read_only": 0, 
-  "width": "50%"
- }, 
- {
-  "depends_on": "eval:doc.is_purchase_item==\"Yes\"", 
-  "doctype": "DocField", 
-  "fieldname": "uom_conversion_details", 
-  "fieldtype": "Table", 
-  "label": "UOM Conversion Details", 
-  "no_copy": 1, 
-  "oldfieldname": "uom_conversion_details", 
-  "oldfieldtype": "Table", 
-  "options": "UOM Conversion Detail", 
-  "read_only": 0
- }, 
- {
-  "depends_on": "eval:doc.is_purchase_item==\"Yes\"", 
-  "doctype": "DocField", 
-  "fieldname": "manufacturer", 
-  "fieldtype": "Data", 
-  "label": "Manufacturer", 
-  "read_only": 0
- }, 
- {
-  "depends_on": "eval:doc.is_purchase_item==\"Yes\"", 
-  "doctype": "DocField", 
-  "fieldname": "manufacturer_part_no", 
-  "fieldtype": "Data", 
-  "label": "Manufacturer Part Number", 
-  "read_only": 0
- }, 
- {
-  "depends_on": "eval:doc.is_purchase_item==\"Yes\"", 
-  "doctype": "DocField", 
-  "fieldname": "item_supplier_details", 
-  "fieldtype": "Table", 
-  "label": "Item Supplier Details", 
-  "options": "Item Supplier", 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "sales_details", 
-  "fieldtype": "Section Break", 
-  "label": "Sales Details", 
-  "oldfieldtype": "Section Break", 
-  "options": "icon-tag", 
-  "read_only": 0
- }, 
- {
-  "default": "Yes", 
-  "description": "Selecting \"Yes\" will allow this item to figure in Sales Order, Delivery Note", 
-  "doctype": "DocField", 
-  "fieldname": "is_sales_item", 
-  "fieldtype": "Select", 
-  "in_filter": 1, 
-  "label": "Is Sales Item", 
-  "oldfieldname": "is_sales_item", 
-  "oldfieldtype": "Select", 
-  "options": "Yes\nNo", 
-  "read_only": 0, 
-  "reqd": 1
- }, 
- {
-  "default": "No", 
-  "depends_on": "eval:doc.is_sales_item==\"Yes\"", 
-  "description": "Select \"Yes\" if this item represents some work like training, designing, consulting etc.", 
-  "doctype": "DocField", 
-  "fieldname": "is_service_item", 
-  "fieldtype": "Select", 
-  "in_filter": 1, 
-  "label": "Is Service Item", 
-  "oldfieldname": "is_service_item", 
-  "oldfieldtype": "Select", 
-  "options": "Yes\nNo", 
-  "read_only": 0, 
-  "reqd": 1
- }, 
- {
-  "depends_on": "eval:doc.is_sales_item==\"Yes\"", 
-  "doctype": "DocField", 
-  "fieldname": "max_discount", 
-  "fieldtype": "Float", 
-  "label": "Max Discount (%)", 
-  "oldfieldname": "max_discount", 
-  "oldfieldtype": "Currency", 
-  "read_only": 0
- }, 
- {
-  "depends_on": "eval:doc.is_sales_item==\"Yes\"", 
-  "doctype": "DocField", 
-  "fieldname": "income_account", 
-  "fieldtype": "Link", 
-  "ignore_restrictions": 1, 
-  "label": "Default Income Account", 
-  "options": "Account", 
-  "read_only": 0
- }, 
- {
-  "depends_on": "eval:doc.is_sales_item==\"Yes\"", 
-  "doctype": "DocField", 
-  "fieldname": "selling_cost_center", 
-  "fieldtype": "Link", 
-  "ignore_restrictions": 1, 
-  "label": "Default Selling Cost Center", 
-  "options": "Cost Center", 
-  "read_only": 0
- }, 
- {
-  "depends_on": "eval:doc.is_sales_item==\"Yes\"", 
-  "doctype": "DocField", 
-  "fieldname": "column_break3", 
-  "fieldtype": "Column Break", 
-  "oldfieldtype": "Column Break", 
-  "read_only": 0, 
-  "width": "50%"
- }, 
- {
-  "depends_on": "eval:doc.is_sales_item==\"Yes\"", 
-  "description": "For the convenience of customers, these codes can be used in print formats like Invoices and Delivery Notes", 
-  "doctype": "DocField", 
-  "fieldname": "item_customer_details", 
-  "fieldtype": "Table", 
-  "label": "Customer Codes", 
-  "options": "Item Customer Detail", 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "item_tax_section_break", 
-  "fieldtype": "Section Break", 
-  "label": "Item Tax", 
-  "oldfieldtype": "Section Break", 
-  "options": "icon-money", 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "item_tax", 
-  "fieldtype": "Table", 
-  "label": "Item Tax1", 
-  "oldfieldname": "item_tax", 
-  "oldfieldtype": "Table", 
-  "options": "Item Tax", 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "inspection_criteria", 
-  "fieldtype": "Section Break", 
-  "label": "Inspection Criteria", 
-  "oldfieldtype": "Section Break", 
-  "options": "icon-search", 
-  "read_only": 0
- }, 
- {
-  "default": "No", 
-  "doctype": "DocField", 
-  "fieldname": "inspection_required", 
-  "fieldtype": "Select", 
-  "label": "Inspection Required", 
-  "no_copy": 0, 
-  "oldfieldname": "inspection_required", 
-  "oldfieldtype": "Select", 
-  "options": "\nYes\nNo", 
-  "read_only": 0, 
-  "reqd": 1
- }, 
- {
-  "depends_on": "eval:doc.inspection_required==\"Yes\"", 
-  "description": "Quality Inspection Parameters", 
-  "doctype": "DocField", 
-  "fieldname": "item_specification_details", 
-  "fieldtype": "Table", 
-  "label": "Item Quality Inspection Parameter", 
-  "oldfieldname": "item_specification_details", 
-  "oldfieldtype": "Table", 
-  "options": "Item Quality Inspection Parameter", 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "manufacturing", 
-  "fieldtype": "Section Break", 
-  "label": "Manufacturing", 
-  "oldfieldtype": "Section Break", 
-  "options": "icon-cogs", 
-  "read_only": 0
- }, 
- {
-  "default": "No", 
-  "description": "Selecting \"Yes\" will allow you to create Bill of Material showing raw material and operational costs incurred to manufacture this item.", 
-  "doctype": "DocField", 
-  "fieldname": "is_manufactured_item", 
-  "fieldtype": "Select", 
-  "label": "Allow Bill of Materials", 
-  "oldfieldname": "is_manufactured_item", 
-  "oldfieldtype": "Select", 
-  "options": "Yes\nNo", 
-  "read_only": 0, 
-  "reqd": 1
- }, 
- {
-  "depends_on": "eval:doc.is_manufactured_item==\"Yes\"", 
-  "doctype": "DocField", 
-  "fieldname": "default_bom", 
-  "fieldtype": "Link", 
-  "ignore_restrictions": 1, 
-  "label": "Default BOM", 
-  "no_copy": 1, 
-  "oldfieldname": "default_bom", 
-  "oldfieldtype": "Link", 
-  "options": "BOM", 
-  "read_only": 1
- }, 
- {
-  "default": "No", 
-  "depends_on": "eval:doc.is_manufactured_item==\"Yes\"", 
-  "description": "Selecting \"Yes\" will allow you to make a Production Order for this item.", 
-  "doctype": "DocField", 
-  "fieldname": "is_pro_applicable", 
-  "fieldtype": "Select", 
-  "label": "Allow Production Order", 
-  "oldfieldname": "is_pro_applicable", 
-  "oldfieldtype": "Select", 
-  "options": "Yes\nNo", 
-  "read_only": 0, 
-  "reqd": 1
- }, 
- {
-  "default": "No", 
-  "description": "Select \"Yes\" if you supply raw materials to your supplier to manufacture this item.", 
-  "doctype": "DocField", 
-  "fieldname": "is_sub_contracted_item", 
-  "fieldtype": "Select", 
-  "label": "Is Sub Contracted Item", 
-  "oldfieldname": "is_sub_contracted_item", 
-  "oldfieldtype": "Select", 
-  "options": "Yes\nNo", 
-  "read_only": 0, 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "customer_code", 
-  "fieldtype": "Data", 
-  "hidden": 1, 
-  "in_filter": 1, 
-  "label": "Customer Code", 
-  "no_copy": 1, 
-  "print_hide": 1, 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "website_section", 
-  "fieldtype": "Section Break", 
-  "label": "Website", 
-  "options": "icon-globe", 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "show_in_website", 
-  "fieldtype": "Check", 
-  "label": "Show in Website", 
-  "read_only": 0
- }, 
- {
-  "depends_on": "show_in_website", 
-  "description": "website page link", 
-  "doctype": "DocField", 
-  "fieldname": "page_name", 
-  "fieldtype": "Data", 
-  "label": "Page Name", 
-  "read_only": 1
- }, 
- {
-  "depends_on": "show_in_website", 
-  "description": "Products will be sorted by weight-age in default searches. More the weight-age, higher the product will appear in the list.", 
-  "doctype": "DocField", 
-  "fieldname": "weightage", 
-  "fieldtype": "Int", 
-  "label": "Weightage", 
-  "read_only": 0, 
-  "search_index": 1
- }, 
- {
-  "depends_on": "show_in_website", 
-  "description": "Show a slideshow at the top of the page", 
-  "doctype": "DocField", 
-  "fieldname": "slideshow", 
-  "fieldtype": "Link", 
-  "label": "Slideshow", 
-  "options": "Website Slideshow", 
-  "read_only": 0
- }, 
- {
-  "depends_on": "show_in_website", 
-  "description": "Item Image (if not slideshow)", 
-  "doctype": "DocField", 
-  "fieldname": "website_image", 
-  "fieldtype": "Select", 
-  "label": "Image", 
-  "options": "attach_files:", 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "cb72", 
-  "fieldtype": "Column Break", 
-  "read_only": 0
- }, 
- {
-  "depends_on": "show_in_website", 
-  "description": "Show \"In Stock\" or \"Not in Stock\" based on stock available in this warehouse.", 
-  "doctype": "DocField", 
-  "fieldname": "website_warehouse", 
-  "fieldtype": "Link", 
-  "ignore_restrictions": 1, 
-  "label": "Website Warehouse", 
-  "options": "Warehouse", 
-  "read_only": 0
- }, 
- {
-  "depends_on": "show_in_website", 
-  "description": "List this Item in multiple groups on the website.", 
-  "doctype": "DocField", 
-  "fieldname": "website_item_groups", 
-  "fieldtype": "Table", 
-  "label": "Website Item Groups", 
-  "options": "Website Item Group", 
-  "read_only": 0
- }, 
- {
-  "depends_on": "show_in_website", 
-  "doctype": "DocField", 
-  "fieldname": "sb72", 
-  "fieldtype": "Section Break", 
-  "read_only": 0
- }, 
- {
-  "depends_on": "show_in_website", 
-  "doctype": "DocField", 
-  "fieldname": "copy_from_item_group", 
-  "fieldtype": "Button", 
-  "label": "Copy From Item Group", 
-  "read_only": 0
- }, 
- {
-  "depends_on": "show_in_website", 
-  "doctype": "DocField", 
-  "fieldname": "item_website_specifications", 
-  "fieldtype": "Table", 
-  "label": "Item Website Specifications", 
-  "options": "Item Website Specification", 
-  "read_only": 0
- }, 
- {
-  "depends_on": "show_in_website", 
-  "doctype": "DocField", 
-  "fieldname": "web_long_description", 
-  "fieldtype": "Text Editor", 
-  "label": "Website Description", 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "parent_website_route", 
-  "fieldtype": "Link", 
-  "ignore_restrictions": 1, 
-  "label": "Parent Website Route", 
-  "options": "Website Route"
- }, 
- {
-  "create": 1, 
-  "delete": 1, 
-  "doctype": "DocPerm", 
-  "import": 1, 
-  "role": "Material Master Manager", 
-  "write": 1
- }, 
- {
-  "amend": 0, 
-  "create": 0, 
-  "delete": 0, 
-  "doctype": "DocPerm", 
-  "role": "Material Manager", 
-  "write": 0
- }, 
- {
-  "amend": 0, 
-  "create": 0, 
-  "delete": 0, 
-  "doctype": "DocPerm", 
-  "role": "Material User", 
-  "write": 0
- }
-]
\ No newline at end of file
+{
+ "allow_attach": 1, 
+ "allow_import": 1, 
+ "allow_rename": 1, 
+ "autoname": "field:item_code", 
+ "creation": "2013-05-03 10:45:46", 
+ "default_print_format": "Standard", 
+ "description": "A Product or a Service that is bought, sold or kept in stock.", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "document_type": "Master", 
+ "fields": [
+  {
+   "fieldname": "name_and_description_section", 
+   "fieldtype": "Section Break", 
+   "label": "Name and Description", 
+   "no_copy": 0, 
+   "oldfieldtype": "Section Break", 
+   "options": "icon-flag", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "naming_series", 
+   "fieldtype": "Select", 
+   "label": "Series", 
+   "options": "\nITEM", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "description": "Item will be saved by this name in the data base.", 
+   "fieldname": "item_code", 
+   "fieldtype": "Data", 
+   "in_filter": 0, 
+   "label": "Item Code", 
+   "no_copy": 1, 
+   "oldfieldname": "item_code", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "read_only": 0, 
+   "reqd": 0, 
+   "search_index": 0
+  }, 
+  {
+   "fieldname": "item_name", 
+   "fieldtype": "Data", 
+   "in_filter": 1, 
+   "in_list_view": 1, 
+   "label": "Item Name", 
+   "oldfieldname": "item_name", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "read_only": 0, 
+   "reqd": 1, 
+   "search_index": 1
+  }, 
+  {
+   "description": "<a href=\"#Sales Browser/Item Group\">Add / Edit</a>", 
+   "fieldname": "item_group", 
+   "fieldtype": "Link", 
+   "in_filter": 1, 
+   "label": "Item Group", 
+   "oldfieldname": "item_group", 
+   "oldfieldtype": "Link", 
+   "options": "Item Group", 
+   "permlevel": 0, 
+   "read_only": 0, 
+   "reqd": 1
+  }, 
+  {
+   "description": "Unit of measurement of this item (e.g. Kg, Unit, No, Pair).", 
+   "fieldname": "stock_uom", 
+   "fieldtype": "Link", 
+   "ignore_restrictions": 1, 
+   "label": "Default Unit of Measure", 
+   "oldfieldname": "stock_uom", 
+   "oldfieldtype": "Link", 
+   "options": "UOM", 
+   "permlevel": 0, 
+   "read_only": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "brand", 
+   "fieldtype": "Link", 
+   "hidden": 0, 
+   "label": "Brand", 
+   "oldfieldname": "brand", 
+   "oldfieldtype": "Link", 
+   "options": "Brand", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0, 
+   "reqd": 0
+  }, 
+  {
+   "fieldname": "barcode", 
+   "fieldtype": "Data", 
+   "label": "Barcode", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "column_break0", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "image", 
+   "fieldtype": "Select", 
+   "label": "Image", 
+   "options": "attach_files:", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "image_view", 
+   "fieldtype": "Image", 
+   "in_list_view": 1, 
+   "label": "Image View", 
+   "options": "image", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "description", 
+   "fieldtype": "Small Text", 
+   "in_filter": 0, 
+   "in_list_view": 1, 
+   "label": "Description", 
+   "oldfieldname": "description", 
+   "oldfieldtype": "Text", 
+   "permlevel": 0, 
+   "read_only": 0, 
+   "reqd": 1, 
+   "search_index": 0
+  }, 
+  {
+   "fieldname": "description_html", 
+   "fieldtype": "Small Text", 
+   "label": "Description HTML", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "description": "Generates HTML to include selected image in the description", 
+   "fieldname": "add_image", 
+   "fieldtype": "Button", 
+   "label": "Generate Description HTML", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "inventory", 
+   "fieldtype": "Section Break", 
+   "label": "Inventory", 
+   "oldfieldtype": "Section Break", 
+   "options": "icon-truck", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "default": "Yes", 
+   "description": "Select \"Yes\" if you are maintaining stock of this item in your Inventory.", 
+   "fieldname": "is_stock_item", 
+   "fieldtype": "Select", 
+   "label": "Is Stock Item", 
+   "oldfieldname": "is_stock_item", 
+   "oldfieldtype": "Select", 
+   "options": "Yes\nNo", 
+   "permlevel": 0, 
+   "read_only": 0, 
+   "reqd": 1
+  }, 
+  {
+   "depends_on": "eval:doc.is_stock_item==\"Yes\"", 
+   "description": "Mandatory if Stock Item is \"Yes\". Also the default warehouse where reserved quantity is set from Sales Order.", 
+   "fieldname": "default_warehouse", 
+   "fieldtype": "Link", 
+   "ignore_restrictions": 1, 
+   "label": "Default Warehouse", 
+   "oldfieldname": "default_warehouse", 
+   "oldfieldtype": "Link", 
+   "options": "Warehouse", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "depends_on": "eval:doc.is_stock_item==\"Yes\"", 
+   "description": "Percentage variation in quantity to be allowed while receiving or delivering this item.", 
+   "fieldname": "tolerance", 
+   "fieldtype": "Float", 
+   "label": "Allowance Percent", 
+   "oldfieldname": "tolerance", 
+   "oldfieldtype": "Currency", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "depends_on": "eval:doc.is_stock_item==\"Yes\"", 
+   "fieldname": "valuation_method", 
+   "fieldtype": "Select", 
+   "label": "Valuation Method", 
+   "options": "\nFIFO\nMoving Average", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "default": "0.00", 
+   "depends_on": "eval:doc.is_stock_item==\"Yes\"", 
+   "description": "You can enter the minimum quantity of this item to be ordered.", 
+   "fieldname": "min_order_qty", 
+   "fieldtype": "Float", 
+   "hidden": 0, 
+   "label": "Minimum Order Qty", 
+   "oldfieldname": "min_order_qty", 
+   "oldfieldtype": "Currency", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "depends_on": "eval:doc.is_stock_item==\"Yes\"", 
+   "fieldname": "column_break1", 
+   "fieldtype": "Column Break", 
+   "oldfieldtype": "Column Break", 
+   "permlevel": 0, 
+   "read_only": 0, 
+   "width": "50%"
+  }, 
+  {
+   "default": "No", 
+   "depends_on": "eval:doc.is_stock_item==\"Yes\"", 
+   "description": "Select \"Yes\" if this item is used for some internal purpose in your company.", 
+   "fieldname": "is_asset_item", 
+   "fieldtype": "Select", 
+   "label": "Is Fixed Asset Item", 
+   "oldfieldname": "is_asset_item", 
+   "oldfieldtype": "Select", 
+   "options": "Yes\nNo", 
+   "permlevel": 0, 
+   "read_only": 0, 
+   "reqd": 1
+  }, 
+  {
+   "default": "No", 
+   "depends_on": "eval:doc.is_stock_item==\"Yes\"", 
+   "fieldname": "has_batch_no", 
+   "fieldtype": "Select", 
+   "label": "Has Batch No", 
+   "oldfieldname": "has_batch_no", 
+   "oldfieldtype": "Select", 
+   "options": "Yes\nNo", 
+   "permlevel": 0, 
+   "read_only": 0, 
+   "reqd": 1
+  }, 
+  {
+   "default": "No", 
+   "depends_on": "eval:doc.is_stock_item==\"Yes\"", 
+   "description": "Selecting \"Yes\" will give a unique identity to each entity of this item which can be viewed in the Serial No master.", 
+   "fieldname": "has_serial_no", 
+   "fieldtype": "Select", 
+   "in_filter": 1, 
+   "label": "Has Serial No", 
+   "oldfieldname": "has_serial_no", 
+   "oldfieldtype": "Select", 
+   "options": "Yes\nNo", 
+   "permlevel": 0, 
+   "read_only": 0, 
+   "reqd": 1
+  }, 
+  {
+   "depends_on": "eval: doc.has_serial_no===\"Yes\"", 
+   "description": "Example: ABCD.#####\nIf series is set and Serial No is not mentioned in transactions, then automatic serial number will be created based on this series. If you always want to explicitly mention Serial Nos for this item. leave this blank.", 
+   "fieldname": "serial_no_series", 
+   "fieldtype": "Data", 
+   "label": "Serial Number Series", 
+   "permlevel": 0
+  }, 
+  {
+   "depends_on": "eval:doc.is_stock_item==\"Yes\"", 
+   "fieldname": "warranty_period", 
+   "fieldtype": "Data", 
+   "label": "Warranty Period (in days)", 
+   "oldfieldname": "warranty_period", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "depends_on": "eval:doc.is_stock_item==\"Yes\"", 
+   "fieldname": "end_of_life", 
+   "fieldtype": "Date", 
+   "label": "End of Life", 
+   "oldfieldname": "end_of_life", 
+   "oldfieldtype": "Date", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "depends_on": "eval:doc.is_stock_item==\"Yes\"", 
+   "description": "Net Weight of each Item", 
+   "fieldname": "net_weight", 
+   "fieldtype": "Float", 
+   "label": "Net Weight", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "depends_on": "eval:doc.is_stock_item==\"Yes\"", 
+   "fieldname": "weight_uom", 
+   "fieldtype": "Link", 
+   "ignore_restrictions": 1, 
+   "label": "Weight UOM", 
+   "options": "UOM", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "description": "Auto-raise Material Request if quantity goes below re-order level in a warehouse", 
+   "fieldname": "reorder_section", 
+   "fieldtype": "Section Break", 
+   "label": "Re-order", 
+   "options": "icon-rss", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "depends_on": "eval:doc.is_stock_item==\"Yes\"", 
+   "fieldname": "re_order_level", 
+   "fieldtype": "Float", 
+   "label": "Re-Order Level", 
+   "oldfieldname": "re_order_level", 
+   "oldfieldtype": "Currency", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "depends_on": "eval:doc.is_stock_item==\"Yes\"", 
+   "fieldname": "re_order_qty", 
+   "fieldtype": "Float", 
+   "label": "Re-Order Qty", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "section_break_31", 
+   "fieldtype": "Section Break", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "item_reorder", 
+   "fieldtype": "Table", 
+   "label": "Warehouse-wise Item Reorder", 
+   "options": "Item Reorder", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "purchase_details", 
+   "fieldtype": "Section Break", 
+   "label": "Purchase Details", 
+   "oldfieldtype": "Section Break", 
+   "options": "icon-shopping-cart", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "default": "Yes", 
+   "description": "Selecting \"Yes\" will allow this item to appear in Purchase Order , Purchase Receipt.", 
+   "fieldname": "is_purchase_item", 
+   "fieldtype": "Select", 
+   "label": "Is Purchase Item", 
+   "oldfieldname": "is_purchase_item", 
+   "oldfieldtype": "Select", 
+   "options": "Yes\nNo", 
+   "permlevel": 0, 
+   "read_only": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "default_supplier", 
+   "fieldtype": "Link", 
+   "ignore_restrictions": 1, 
+   "label": "Default Supplier", 
+   "options": "Supplier", 
+   "permlevel": 0
+  }, 
+  {
+   "depends_on": "eval:doc.is_purchase_item==\"Yes\"", 
+   "description": "Lead Time days is number of days by which this item is expected in your warehouse. This days is fetched in Material Request when you select this item.", 
+   "fieldname": "lead_time_days", 
+   "fieldtype": "Int", 
+   "label": "Lead Time Days", 
+   "no_copy": 1, 
+   "oldfieldname": "lead_time_days", 
+   "oldfieldtype": "Int", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "depends_on": "eval:doc.is_purchase_item==\"Yes\"", 
+   "description": "Default Purchase Account in which cost of the item will be debited.", 
+   "fieldname": "expense_account", 
+   "fieldtype": "Link", 
+   "ignore_restrictions": 1, 
+   "label": "Default Expense Account", 
+   "oldfieldname": "purchase_account", 
+   "oldfieldtype": "Link", 
+   "options": "Account", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "depends_on": "eval:doc.is_purchase_item==\"Yes\"", 
+   "description": "Default Cost Center for tracking expense for this item.", 
+   "fieldname": "buying_cost_center", 
+   "fieldtype": "Link", 
+   "ignore_restrictions": 1, 
+   "label": "Default Buying Cost Center", 
+   "oldfieldname": "cost_center", 
+   "oldfieldtype": "Link", 
+   "options": "Cost Center", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "depends_on": "eval:doc.is_purchase_item==\"Yes\"", 
+   "fieldname": "last_purchase_rate", 
+   "fieldtype": "Float", 
+   "label": "Last Purchase Rate", 
+   "no_copy": 1, 
+   "oldfieldname": "last_purchase_rate", 
+   "oldfieldtype": "Currency", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "depends_on": "eval:doc.is_purchase_item==\"Yes\"", 
+   "fieldname": "standard_rate", 
+   "fieldtype": "Float", 
+   "label": "Standard Rate", 
+   "oldfieldname": "standard_rate", 
+   "oldfieldtype": "Currency", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "depends_on": "eval:doc.is_purchase_item==\"Yes\"", 
+   "fieldname": "column_break2", 
+   "fieldtype": "Column Break", 
+   "oldfieldtype": "Column Break", 
+   "permlevel": 0, 
+   "read_only": 0, 
+   "width": "50%"
+  }, 
+  {
+   "depends_on": "eval:doc.is_purchase_item==\"Yes\"", 
+   "fieldname": "uom_conversion_details", 
+   "fieldtype": "Table", 
+   "label": "UOM Conversion Details", 
+   "no_copy": 1, 
+   "oldfieldname": "uom_conversion_details", 
+   "oldfieldtype": "Table", 
+   "options": "UOM Conversion Detail", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "depends_on": "eval:doc.is_purchase_item==\"Yes\"", 
+   "fieldname": "manufacturer", 
+   "fieldtype": "Data", 
+   "label": "Manufacturer", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "depends_on": "eval:doc.is_purchase_item==\"Yes\"", 
+   "fieldname": "manufacturer_part_no", 
+   "fieldtype": "Data", 
+   "label": "Manufacturer Part Number", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "depends_on": "eval:doc.is_purchase_item==\"Yes\"", 
+   "fieldname": "item_supplier_details", 
+   "fieldtype": "Table", 
+   "label": "Item Supplier Details", 
+   "options": "Item Supplier", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "sales_details", 
+   "fieldtype": "Section Break", 
+   "label": "Sales Details", 
+   "oldfieldtype": "Section Break", 
+   "options": "icon-tag", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "default": "Yes", 
+   "description": "Selecting \"Yes\" will allow this item to figure in Sales Order, Delivery Note", 
+   "fieldname": "is_sales_item", 
+   "fieldtype": "Select", 
+   "in_filter": 1, 
+   "label": "Is Sales Item", 
+   "oldfieldname": "is_sales_item", 
+   "oldfieldtype": "Select", 
+   "options": "Yes\nNo", 
+   "permlevel": 0, 
+   "read_only": 0, 
+   "reqd": 1
+  }, 
+  {
+   "default": "No", 
+   "depends_on": "eval:doc.is_sales_item==\"Yes\"", 
+   "description": "Select \"Yes\" if this item represents some work like training, designing, consulting etc.", 
+   "fieldname": "is_service_item", 
+   "fieldtype": "Select", 
+   "in_filter": 1, 
+   "label": "Is Service Item", 
+   "oldfieldname": "is_service_item", 
+   "oldfieldtype": "Select", 
+   "options": "Yes\nNo", 
+   "permlevel": 0, 
+   "read_only": 0, 
+   "reqd": 1
+  }, 
+  {
+   "depends_on": "eval:doc.is_sales_item==\"Yes\"", 
+   "fieldname": "max_discount", 
+   "fieldtype": "Float", 
+   "label": "Max Discount (%)", 
+   "oldfieldname": "max_discount", 
+   "oldfieldtype": "Currency", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "depends_on": "eval:doc.is_sales_item==\"Yes\"", 
+   "fieldname": "income_account", 
+   "fieldtype": "Link", 
+   "ignore_restrictions": 1, 
+   "label": "Default Income Account", 
+   "options": "Account", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "depends_on": "eval:doc.is_sales_item==\"Yes\"", 
+   "fieldname": "selling_cost_center", 
+   "fieldtype": "Link", 
+   "ignore_restrictions": 1, 
+   "label": "Default Selling Cost Center", 
+   "options": "Cost Center", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "depends_on": "eval:doc.is_sales_item==\"Yes\"", 
+   "fieldname": "column_break3", 
+   "fieldtype": "Column Break", 
+   "oldfieldtype": "Column Break", 
+   "permlevel": 0, 
+   "read_only": 0, 
+   "width": "50%"
+  }, 
+  {
+   "depends_on": "eval:doc.is_sales_item==\"Yes\"", 
+   "description": "For the convenience of customers, these codes can be used in print formats like Invoices and Delivery Notes", 
+   "fieldname": "item_customer_details", 
+   "fieldtype": "Table", 
+   "label": "Customer Codes", 
+   "options": "Item Customer Detail", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "item_tax_section_break", 
+   "fieldtype": "Section Break", 
+   "label": "Item Tax", 
+   "oldfieldtype": "Section Break", 
+   "options": "icon-money", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "item_tax", 
+   "fieldtype": "Table", 
+   "label": "Item Tax1", 
+   "oldfieldname": "item_tax", 
+   "oldfieldtype": "Table", 
+   "options": "Item Tax", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "inspection_criteria", 
+   "fieldtype": "Section Break", 
+   "label": "Inspection Criteria", 
+   "oldfieldtype": "Section Break", 
+   "options": "icon-search", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "default": "No", 
+   "fieldname": "inspection_required", 
+   "fieldtype": "Select", 
+   "label": "Inspection Required", 
+   "no_copy": 0, 
+   "oldfieldname": "inspection_required", 
+   "oldfieldtype": "Select", 
+   "options": "\nYes\nNo", 
+   "permlevel": 0, 
+   "read_only": 0, 
+   "reqd": 1
+  }, 
+  {
+   "depends_on": "eval:doc.inspection_required==\"Yes\"", 
+   "description": "Quality Inspection Parameters", 
+   "fieldname": "item_specification_details", 
+   "fieldtype": "Table", 
+   "label": "Item Quality Inspection Parameter", 
+   "oldfieldname": "item_specification_details", 
+   "oldfieldtype": "Table", 
+   "options": "Item Quality Inspection Parameter", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "manufacturing", 
+   "fieldtype": "Section Break", 
+   "label": "Manufacturing", 
+   "oldfieldtype": "Section Break", 
+   "options": "icon-cogs", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "default": "No", 
+   "description": "Selecting \"Yes\" will allow you to create Bill of Material showing raw material and operational costs incurred to manufacture this item.", 
+   "fieldname": "is_manufactured_item", 
+   "fieldtype": "Select", 
+   "label": "Allow Bill of Materials", 
+   "oldfieldname": "is_manufactured_item", 
+   "oldfieldtype": "Select", 
+   "options": "Yes\nNo", 
+   "permlevel": 0, 
+   "read_only": 0, 
+   "reqd": 1
+  }, 
+  {
+   "depends_on": "eval:doc.is_manufactured_item==\"Yes\"", 
+   "fieldname": "default_bom", 
+   "fieldtype": "Link", 
+   "ignore_restrictions": 1, 
+   "label": "Default BOM", 
+   "no_copy": 1, 
+   "oldfieldname": "default_bom", 
+   "oldfieldtype": "Link", 
+   "options": "BOM", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "default": "No", 
+   "depends_on": "eval:doc.is_manufactured_item==\"Yes\"", 
+   "description": "Selecting \"Yes\" will allow you to make a Production Order for this item.", 
+   "fieldname": "is_pro_applicable", 
+   "fieldtype": "Select", 
+   "label": "Allow Production Order", 
+   "oldfieldname": "is_pro_applicable", 
+   "oldfieldtype": "Select", 
+   "options": "Yes\nNo", 
+   "permlevel": 0, 
+   "read_only": 0, 
+   "reqd": 1
+  }, 
+  {
+   "default": "No", 
+   "description": "Select \"Yes\" if you supply raw materials to your supplier to manufacture this item.", 
+   "fieldname": "is_sub_contracted_item", 
+   "fieldtype": "Select", 
+   "label": "Is Sub Contracted Item", 
+   "oldfieldname": "is_sub_contracted_item", 
+   "oldfieldtype": "Select", 
+   "options": "Yes\nNo", 
+   "permlevel": 0, 
+   "read_only": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "customer_code", 
+   "fieldtype": "Data", 
+   "hidden": 1, 
+   "in_filter": 1, 
+   "label": "Customer Code", 
+   "no_copy": 1, 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "website_section", 
+   "fieldtype": "Section Break", 
+   "label": "Website", 
+   "options": "icon-globe", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "show_in_website", 
+   "fieldtype": "Check", 
+   "label": "Show in Website", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "depends_on": "show_in_website", 
+   "description": "website page link", 
+   "fieldname": "page_name", 
+   "fieldtype": "Data", 
+   "label": "Page Name", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "depends_on": "show_in_website", 
+   "description": "Products will be sorted by weight-age in default searches. More the weight-age, higher the product will appear in the list.", 
+   "fieldname": "weightage", 
+   "fieldtype": "Int", 
+   "label": "Weightage", 
+   "permlevel": 0, 
+   "read_only": 0, 
+   "search_index": 1
+  }, 
+  {
+   "depends_on": "show_in_website", 
+   "description": "Show a slideshow at the top of the page", 
+   "fieldname": "slideshow", 
+   "fieldtype": "Link", 
+   "label": "Slideshow", 
+   "options": "Website Slideshow", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "depends_on": "show_in_website", 
+   "description": "Item Image (if not slideshow)", 
+   "fieldname": "website_image", 
+   "fieldtype": "Select", 
+   "label": "Image", 
+   "options": "attach_files:", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "cb72", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "depends_on": "show_in_website", 
+   "description": "Show \"In Stock\" or \"Not in Stock\" based on stock available in this warehouse.", 
+   "fieldname": "website_warehouse", 
+   "fieldtype": "Link", 
+   "ignore_restrictions": 1, 
+   "label": "Website Warehouse", 
+   "options": "Warehouse", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "depends_on": "show_in_website", 
+   "description": "List this Item in multiple groups on the website.", 
+   "fieldname": "website_item_groups", 
+   "fieldtype": "Table", 
+   "label": "Website Item Groups", 
+   "options": "Website Item Group", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "depends_on": "show_in_website", 
+   "fieldname": "sb72", 
+   "fieldtype": "Section Break", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "depends_on": "show_in_website", 
+   "fieldname": "copy_from_item_group", 
+   "fieldtype": "Button", 
+   "label": "Copy From Item Group", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "depends_on": "show_in_website", 
+   "fieldname": "item_website_specifications", 
+   "fieldtype": "Table", 
+   "label": "Item Website Specifications", 
+   "options": "Item Website Specification", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "depends_on": "show_in_website", 
+   "fieldname": "web_long_description", 
+   "fieldtype": "Text Editor", 
+   "label": "Website Description", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "parent_website_route", 
+   "fieldtype": "Link", 
+   "ignore_restrictions": 1, 
+   "label": "Parent Website Route", 
+   "options": "Website Route", 
+   "permlevel": 0
+  }
+ ], 
+ "icon": "icon-tag", 
+ "idx": 1, 
+ "max_attachments": 1, 
+ "modified": "2014-03-13 15:54:09", 
+ "modified_by": "Administrator", 
+ "module": "Stock", 
+ "name": "Item", 
+ "owner": "Administrator", 
+ "permissions": [
+  {
+   "cancel": 0, 
+   "create": 1, 
+   "delete": 1, 
+   "email": 1, 
+   "import": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Material Master Manager", 
+   "submit": 0, 
+   "write": 1
+  }, 
+  {
+   "amend": 0, 
+   "cancel": 0, 
+   "create": 0, 
+   "delete": 0, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Material Manager", 
+   "submit": 0, 
+   "write": 0
+  }, 
+  {
+   "amend": 0, 
+   "cancel": 0, 
+   "create": 0, 
+   "delete": 0, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Material User", 
+   "submit": 0, 
+   "write": 0
+  }
+ ], 
+ "search_fields": "item_name,description,item_group,customer_code"
+}
\ No newline at end of file
diff --git a/erpnext/stock/doctype/item_customer_detail/item_customer_detail.txt b/erpnext/stock/doctype/item_customer_detail/item_customer_detail.txt
index 9d9b6ca..b3a5753 100644
--- a/erpnext/stock/doctype/item_customer_detail/item_customer_detail.txt
+++ b/erpnext/stock/doctype/item_customer_detail/item_customer_detail.txt
@@ -1,56 +1,47 @@
-[
- {
-  "creation": "2013-03-08 15:37:16", 
-  "docstatus": 0, 
-  "modified": "2013-12-20 19:23:16", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "autoname": "ITEMCUST/.#####", 
-  "description": "For the convenience of customers, these codes can be used in print formats like Invoices and Delivery Notes", 
-  "doctype": "DocType", 
-  "in_create": 0, 
-  "istable": 1, 
-  "module": "Stock", 
-  "name": "__common__", 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "in_filter": 1, 
-  "in_list_view": 1, 
-  "name": "__common__", 
-  "parent": "Item Customer Detail", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0, 
-  "reqd": 1, 
-  "search_index": 1
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Item Customer Detail"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "customer_name", 
-  "fieldtype": "Link", 
-  "label": "Customer Name", 
-  "oldfieldname": "price_list_name", 
-  "oldfieldtype": "Select", 
-  "options": "Customer", 
-  "print_width": "180px", 
-  "width": "180px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "ref_code", 
-  "fieldtype": "Data", 
-  "label": "Ref Code", 
-  "oldfieldname": "ref_rate", 
-  "oldfieldtype": "Currency", 
-  "print_width": "120px", 
-  "width": "120px"
- }
-]
\ No newline at end of file
+{
+ "autoname": "ITEMCUST/.#####", 
+ "creation": "2013-03-08 15:37:16", 
+ "description": "For the convenience of customers, these codes can be used in print formats like Invoices and Delivery Notes", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "fields": [
+  {
+   "fieldname": "customer_name", 
+   "fieldtype": "Link", 
+   "in_filter": 1, 
+   "in_list_view": 1, 
+   "label": "Customer Name", 
+   "oldfieldname": "price_list_name", 
+   "oldfieldtype": "Select", 
+   "options": "Customer", 
+   "permlevel": 0, 
+   "print_width": "180px", 
+   "reqd": 1, 
+   "search_index": 1, 
+   "width": "180px"
+  }, 
+  {
+   "fieldname": "ref_code", 
+   "fieldtype": "Data", 
+   "in_filter": 1, 
+   "in_list_view": 1, 
+   "label": "Ref Code", 
+   "oldfieldname": "ref_rate", 
+   "oldfieldtype": "Currency", 
+   "permlevel": 0, 
+   "print_width": "120px", 
+   "reqd": 1, 
+   "search_index": 1, 
+   "width": "120px"
+  }
+ ], 
+ "idx": 1, 
+ "in_create": 0, 
+ "istable": 1, 
+ "modified": "2013-12-20 19:23:16", 
+ "modified_by": "Administrator", 
+ "module": "Stock", 
+ "name": "Item Customer Detail", 
+ "owner": "Administrator", 
+ "read_only": 0
+}
\ No newline at end of file
diff --git a/erpnext/stock/doctype/item_price/item_price.txt b/erpnext/stock/doctype/item_price/item_price.txt
index 8b18876..8ff8b2e 100644
--- a/erpnext/stock/doctype/item_price/item_price.txt
+++ b/erpnext/stock/doctype/item_price/item_price.txt
@@ -1,151 +1,140 @@
-[
- {
-  "creation": "2013-05-02 16:29:48", 
-  "docstatus": 0, 
-  "modified": "2014-02-10 17:27:32", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "allow_import": 1, 
-  "autoname": "RFD/.#####", 
-  "description": "Multiple Item prices.", 
-  "doctype": "DocType", 
-  "document_type": "Master", 
-  "icon": "icon-flag", 
-  "in_create": 0, 
-  "istable": 0, 
-  "module": "Stock", 
-  "name": "__common__", 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "Item Price", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "cancel": 0, 
-  "create": 1, 
-  "delete": 1, 
-  "doctype": "DocPerm", 
-  "email": 1, 
-  "name": "__common__", 
-  "parent": "Item Price", 
-  "parentfield": "permissions", 
-  "parenttype": "DocType", 
-  "permlevel": 0, 
-  "print": 1, 
-  "read": 1, 
-  "report": 1, 
-  "write": 1
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Item Price"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "price_list_details", 
-  "fieldtype": "Section Break", 
-  "label": "Price List", 
-  "options": "icon-tags"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "price_list", 
-  "fieldtype": "Link", 
-  "in_filter": 1, 
-  "label": "Price List", 
-  "options": "Price List", 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "buying", 
-  "fieldtype": "Check", 
-  "in_list_view": 1, 
-  "label": "Buying", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "selling", 
-  "fieldtype": "Check", 
-  "in_list_view": 1, 
-  "label": "Selling", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "item_details", 
-  "fieldtype": "Section Break", 
-  "label": "Item", 
-  "options": "icon-tag"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "item_code", 
-  "fieldtype": "Link", 
-  "in_filter": 1, 
-  "in_list_view": 1, 
-  "label": "Item Code", 
-  "oldfieldname": "price_list_name", 
-  "oldfieldtype": "Select", 
-  "options": "Item", 
-  "reqd": 1, 
-  "search_index": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "price_list_rate", 
-  "fieldtype": "Currency", 
-  "in_filter": 1, 
-  "in_list_view": 1, 
-  "label": "Rate", 
-  "oldfieldname": "ref_rate", 
-  "oldfieldtype": "Currency", 
-  "options": "currency", 
-  "reqd": 1, 
-  "search_index": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "col_br_1", 
-  "fieldtype": "Column Break"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "item_name", 
-  "fieldtype": "Data", 
-  "label": "Item Name", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "item_description", 
-  "fieldtype": "Text", 
-  "label": "Item Description", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "currency", 
-  "fieldtype": "Link", 
-  "hidden": 1, 
-  "label": "Currency", 
-  "options": "Currency", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocPerm", 
-  "role": "Sales Master Manager"
- }, 
- {
-  "doctype": "DocPerm", 
-  "role": "Purchase Master Manager"
- }
-]
\ No newline at end of file
+{
+ "allow_import": 1, 
+ "autoname": "RFD/.#####", 
+ "creation": "2013-05-02 16:29:48", 
+ "description": "Multiple Item prices.", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "document_type": "Master", 
+ "fields": [
+  {
+   "fieldname": "price_list_details", 
+   "fieldtype": "Section Break", 
+   "label": "Price List", 
+   "options": "icon-tags", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "price_list", 
+   "fieldtype": "Link", 
+   "in_filter": 1, 
+   "label": "Price List", 
+   "options": "Price List", 
+   "permlevel": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "buying", 
+   "fieldtype": "Check", 
+   "in_list_view": 1, 
+   "label": "Buying", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "selling", 
+   "fieldtype": "Check", 
+   "in_list_view": 1, 
+   "label": "Selling", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "item_details", 
+   "fieldtype": "Section Break", 
+   "label": "Item", 
+   "options": "icon-tag", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "item_code", 
+   "fieldtype": "Link", 
+   "in_filter": 1, 
+   "in_list_view": 1, 
+   "label": "Item Code", 
+   "oldfieldname": "price_list_name", 
+   "oldfieldtype": "Select", 
+   "options": "Item", 
+   "permlevel": 0, 
+   "reqd": 1, 
+   "search_index": 1
+  }, 
+  {
+   "fieldname": "price_list_rate", 
+   "fieldtype": "Currency", 
+   "in_filter": 1, 
+   "in_list_view": 1, 
+   "label": "Rate", 
+   "oldfieldname": "ref_rate", 
+   "oldfieldtype": "Currency", 
+   "options": "currency", 
+   "permlevel": 0, 
+   "reqd": 1, 
+   "search_index": 0
+  }, 
+  {
+   "fieldname": "col_br_1", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "item_name", 
+   "fieldtype": "Data", 
+   "label": "Item Name", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "item_description", 
+   "fieldtype": "Text", 
+   "label": "Item Description", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "currency", 
+   "fieldtype": "Link", 
+   "hidden": 1, 
+   "label": "Currency", 
+   "options": "Currency", 
+   "permlevel": 0, 
+   "read_only": 1
+  }
+ ], 
+ "icon": "icon-flag", 
+ "idx": 1, 
+ "in_create": 0, 
+ "istable": 0, 
+ "modified": "2014-02-10 17:27:32", 
+ "modified_by": "Administrator", 
+ "module": "Stock", 
+ "name": "Item Price", 
+ "owner": "Administrator", 
+ "permissions": [
+  {
+   "cancel": 0, 
+   "create": 1, 
+   "delete": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Sales Master Manager", 
+   "write": 1
+  }, 
+  {
+   "cancel": 0, 
+   "create": 1, 
+   "delete": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Purchase Master Manager", 
+   "write": 1
+  }
+ ], 
+ "read_only": 0
+}
\ No newline at end of file
diff --git a/erpnext/stock/doctype/item_quality_inspection_parameter/item_quality_inspection_parameter.txt b/erpnext/stock/doctype/item_quality_inspection_parameter/item_quality_inspection_parameter.txt
index 8ec87d7..9f48329 100644
--- a/erpnext/stock/doctype/item_quality_inspection_parameter/item_quality_inspection_parameter.txt
+++ b/erpnext/stock/doctype/item_quality_inspection_parameter/item_quality_inspection_parameter.txt
@@ -1,48 +1,38 @@
-[
- {
-  "creation": "2013-02-22 01:28:01", 
-  "docstatus": 0, 
-  "modified": "2013-12-20 19:23:16", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "autoname": "IISD/.#####", 
-  "doctype": "DocType", 
-  "istable": 1, 
-  "module": "Stock", 
-  "name": "__common__"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldtype": "Data", 
-  "in_list_view": 1, 
-  "name": "__common__", 
-  "oldfieldtype": "Data", 
-  "parent": "Item Quality Inspection Parameter", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Item Quality Inspection Parameter"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "specification", 
-  "in_filter": 0, 
-  "label": "Parameter", 
-  "oldfieldname": "specification", 
-  "print_width": "200px", 
-  "reqd": 1, 
-  "search_index": 0, 
-  "width": "200px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "value", 
-  "label": "Acceptance Criteria", 
-  "oldfieldname": "value"
- }
-]
\ No newline at end of file
+{
+ "autoname": "IISD/.#####", 
+ "creation": "2013-02-22 01:28:01", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "fields": [
+  {
+   "fieldname": "specification", 
+   "fieldtype": "Data", 
+   "in_filter": 0, 
+   "in_list_view": 1, 
+   "label": "Parameter", 
+   "oldfieldname": "specification", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "print_width": "200px", 
+   "reqd": 1, 
+   "search_index": 0, 
+   "width": "200px"
+  }, 
+  {
+   "fieldname": "value", 
+   "fieldtype": "Data", 
+   "in_list_view": 1, 
+   "label": "Acceptance Criteria", 
+   "oldfieldname": "value", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0
+  }
+ ], 
+ "idx": 1, 
+ "istable": 1, 
+ "modified": "2013-12-20 19:23:16", 
+ "modified_by": "Administrator", 
+ "module": "Stock", 
+ "name": "Item Quality Inspection Parameter", 
+ "owner": "Administrator"
+}
\ No newline at end of file
diff --git a/erpnext/stock/doctype/item_reorder/item_reorder.txt b/erpnext/stock/doctype/item_reorder/item_reorder.txt
index 74df09a..d029e49 100644
--- a/erpnext/stock/doctype/item_reorder/item_reorder.txt
+++ b/erpnext/stock/doctype/item_reorder/item_reorder.txt
@@ -1,60 +1,53 @@
-[
- {
-  "creation": "2013-03-07 11:42:59", 
-  "docstatus": 0, 
-  "modified": "2013-12-20 19:23:16", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "autoname": "REORD-.#####", 
-  "doctype": "DocType", 
-  "in_create": 1, 
-  "istable": 1, 
-  "module": "Stock", 
-  "name": "__common__"
- }, 
- {
-  "doctype": "DocField", 
-  "in_list_view": 1, 
-  "name": "__common__", 
-  "parent": "Item Reorder", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0, 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Item Reorder"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "warehouse", 
-  "fieldtype": "Link", 
-  "label": "Warehouse", 
-  "options": "Warehouse", 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "warehouse_reorder_level", 
-  "fieldtype": "Float", 
-  "label": "Re-order Level", 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "warehouse_reorder_qty", 
-  "fieldtype": "Float", 
-  "label": "Re-order Qty"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "material_request_type", 
-  "fieldtype": "Select", 
-  "label": "Material Request Type", 
-  "options": "Purchase\nTransfer", 
-  "reqd": 1
- }
-]
\ No newline at end of file
+{
+ "autoname": "REORD-.#####", 
+ "creation": "2013-03-07 11:42:59", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "fields": [
+  {
+   "fieldname": "warehouse", 
+   "fieldtype": "Link", 
+   "in_list_view": 1, 
+   "label": "Warehouse", 
+   "options": "Warehouse", 
+   "permlevel": 0, 
+   "read_only": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "warehouse_reorder_level", 
+   "fieldtype": "Float", 
+   "in_list_view": 1, 
+   "label": "Re-order Level", 
+   "permlevel": 0, 
+   "read_only": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "warehouse_reorder_qty", 
+   "fieldtype": "Float", 
+   "in_list_view": 1, 
+   "label": "Re-order Qty", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "material_request_type", 
+   "fieldtype": "Select", 
+   "in_list_view": 1, 
+   "label": "Material Request Type", 
+   "options": "Purchase\nTransfer", 
+   "permlevel": 0, 
+   "read_only": 0, 
+   "reqd": 1
+  }
+ ], 
+ "idx": 1, 
+ "in_create": 1, 
+ "istable": 1, 
+ "modified": "2013-12-20 19:23:16", 
+ "modified_by": "Administrator", 
+ "module": "Stock", 
+ "name": "Item Reorder", 
+ "owner": "Administrator"
+}
\ No newline at end of file
diff --git a/erpnext/stock/doctype/item_supplier/item_supplier.txt b/erpnext/stock/doctype/item_supplier/item_supplier.txt
index 02e0bd7..64d32d6 100644
--- a/erpnext/stock/doctype/item_supplier/item_supplier.txt
+++ b/erpnext/stock/doctype/item_supplier/item_supplier.txt
@@ -1,43 +1,31 @@
-[
- {
-  "creation": "2013-02-22 01:28:01", 
-  "docstatus": 0, 
-  "modified": "2013-12-20 19:23:16", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "doctype": "DocType", 
-  "istable": 1, 
-  "module": "Stock", 
-  "name": "__common__"
- }, 
- {
-  "doctype": "DocField", 
-  "in_list_view": 1, 
-  "name": "__common__", 
-  "parent": "Item Supplier", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Item Supplier"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "supplier", 
-  "fieldtype": "Link", 
-  "label": "Supplier", 
-  "options": "Supplier"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "supplier_part_no", 
-  "fieldtype": "Data", 
-  "label": "Supplier Part Number", 
-  "print_width": "200px", 
-  "width": "200px"
- }
-]
\ No newline at end of file
+{
+ "creation": "2013-02-22 01:28:01", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "fields": [
+  {
+   "fieldname": "supplier", 
+   "fieldtype": "Link", 
+   "in_list_view": 1, 
+   "label": "Supplier", 
+   "options": "Supplier", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "supplier_part_no", 
+   "fieldtype": "Data", 
+   "in_list_view": 1, 
+   "label": "Supplier Part Number", 
+   "permlevel": 0, 
+   "print_width": "200px", 
+   "width": "200px"
+  }
+ ], 
+ "idx": 1, 
+ "istable": 1, 
+ "modified": "2013-12-20 19:23:16", 
+ "modified_by": "Administrator", 
+ "module": "Stock", 
+ "name": "Item Supplier", 
+ "owner": "Administrator"
+}
\ No newline at end of file
diff --git a/erpnext/stock/doctype/item_tax/item_tax.txt b/erpnext/stock/doctype/item_tax/item_tax.txt
index 243ee1f..c2df321 100644
--- a/erpnext/stock/doctype/item_tax/item_tax.txt
+++ b/erpnext/stock/doctype/item_tax/item_tax.txt
@@ -1,47 +1,35 @@
-[
- {
-  "creation": "2013-02-22 01:28:01", 
-  "docstatus": 0, 
-  "modified": "2013-12-20 19:23:16", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "doctype": "DocType", 
-  "istable": 1, 
-  "module": "Stock", 
-  "name": "__common__"
- }, 
- {
-  "doctype": "DocField", 
-  "in_list_view": 1, 
-  "name": "__common__", 
-  "parent": "Item Tax", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Item Tax"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "tax_type", 
-  "fieldtype": "Link", 
-  "label": "Tax", 
-  "oldfieldname": "tax_type", 
-  "oldfieldtype": "Link", 
-  "options": "Account", 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "tax_rate", 
-  "fieldtype": "Float", 
-  "label": "Tax Rate", 
-  "oldfieldname": "tax_rate", 
-  "oldfieldtype": "Currency", 
-  "reqd": 0
- }
-]
\ No newline at end of file
+{
+ "creation": "2013-02-22 01:28:01", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "fields": [
+  {
+   "fieldname": "tax_type", 
+   "fieldtype": "Link", 
+   "in_list_view": 1, 
+   "label": "Tax", 
+   "oldfieldname": "tax_type", 
+   "oldfieldtype": "Link", 
+   "options": "Account", 
+   "permlevel": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "tax_rate", 
+   "fieldtype": "Float", 
+   "in_list_view": 1, 
+   "label": "Tax Rate", 
+   "oldfieldname": "tax_rate", 
+   "oldfieldtype": "Currency", 
+   "permlevel": 0, 
+   "reqd": 0
+  }
+ ], 
+ "idx": 1, 
+ "istable": 1, 
+ "modified": "2013-12-20 19:23:16", 
+ "modified_by": "Administrator", 
+ "module": "Stock", 
+ "name": "Item Tax", 
+ "owner": "Administrator"
+}
\ No newline at end of file
diff --git a/erpnext/stock/doctype/item_website_specification/item_website_specification.txt b/erpnext/stock/doctype/item_website_specification/item_website_specification.txt
index 164da81..87e5dd7 100644
--- a/erpnext/stock/doctype/item_website_specification/item_website_specification.txt
+++ b/erpnext/stock/doctype/item_website_specification/item_website_specification.txt
@@ -1,45 +1,33 @@
-[
- {
-  "creation": "2013-02-22 01:28:01", 
-  "docstatus": 0, 
-  "modified": "2013-12-20 19:23:16", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "description": "Table for Item that will be shown in Web Site", 
-  "doctype": "DocType", 
-  "istable": 1, 
-  "module": "Stock", 
-  "name": "__common__"
- }, 
- {
-  "doctype": "DocField", 
-  "in_list_view": 1, 
-  "name": "__common__", 
-  "parent": "Item Website Specification", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Item Website Specification"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "label", 
-  "fieldtype": "Data", 
-  "label": "Label", 
-  "print_width": "150px", 
-  "width": "150px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "description", 
-  "fieldtype": "Text", 
-  "label": "Description", 
-  "print_width": "300px", 
-  "width": "300px"
- }
-]
\ No newline at end of file
+{
+ "creation": "2013-02-22 01:28:01", 
+ "description": "Table for Item that will be shown in Web Site", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "fields": [
+  {
+   "fieldname": "label", 
+   "fieldtype": "Data", 
+   "in_list_view": 1, 
+   "label": "Label", 
+   "permlevel": 0, 
+   "print_width": "150px", 
+   "width": "150px"
+  }, 
+  {
+   "fieldname": "description", 
+   "fieldtype": "Text", 
+   "in_list_view": 1, 
+   "label": "Description", 
+   "permlevel": 0, 
+   "print_width": "300px", 
+   "width": "300px"
+  }
+ ], 
+ "idx": 1, 
+ "istable": 1, 
+ "modified": "2013-12-20 19:23:16", 
+ "modified_by": "Administrator", 
+ "module": "Stock", 
+ "name": "Item Website Specification", 
+ "owner": "Administrator"
+}
\ No newline at end of file
diff --git a/erpnext/stock/doctype/landed_cost_item/landed_cost_item.txt b/erpnext/stock/doctype/landed_cost_item/landed_cost_item.txt
index bf8af3a..0eab747 100644
--- a/erpnext/stock/doctype/landed_cost_item/landed_cost_item.txt
+++ b/erpnext/stock/doctype/landed_cost_item/landed_cost_item.txt
@@ -1,67 +1,57 @@
-[
- {
-  "creation": "2013-02-22 01:28:02", 
-  "docstatus": 0, 
-  "modified": "2013-12-20 19:23:18", 
-  "modified_by": "Administrator", 
-  "owner": "wasim@webnotestech.com"
- }, 
- {
-  "doctype": "DocType", 
-  "istable": 1, 
-  "module": "Stock", 
-  "name": "__common__"
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "Landed Cost Item", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0, 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Landed Cost Item"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "account_head", 
-  "fieldtype": "Link", 
-  "in_list_view": 1, 
-  "label": "Account Head", 
-  "oldfieldname": "account_head", 
-  "oldfieldtype": "Link", 
-  "options": "Account", 
-  "search_index": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "cost_center", 
-  "fieldtype": "Link", 
-  "label": "Cost Center", 
-  "options": "Cost Center"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "description", 
-  "fieldtype": "Data", 
-  "in_list_view": 1, 
-  "label": "Description", 
-  "oldfieldname": "description", 
-  "oldfieldtype": "Data", 
-  "print_width": "300px", 
-  "width": "300px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "amount", 
-  "fieldtype": "Currency", 
-  "in_list_view": 1, 
-  "label": "Amount", 
-  "oldfieldname": "amount", 
-  "oldfieldtype": "Currency", 
-  "options": "currency"
- }
-]
\ No newline at end of file
+{
+ "creation": "2013-02-22 01:28:02", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "fields": [
+  {
+   "fieldname": "account_head", 
+   "fieldtype": "Link", 
+   "in_list_view": 1, 
+   "label": "Account Head", 
+   "oldfieldname": "account_head", 
+   "oldfieldtype": "Link", 
+   "options": "Account", 
+   "permlevel": 0, 
+   "reqd": 1, 
+   "search_index": 1
+  }, 
+  {
+   "fieldname": "cost_center", 
+   "fieldtype": "Link", 
+   "label": "Cost Center", 
+   "options": "Cost Center", 
+   "permlevel": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "description", 
+   "fieldtype": "Data", 
+   "in_list_view": 1, 
+   "label": "Description", 
+   "oldfieldname": "description", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "print_width": "300px", 
+   "reqd": 1, 
+   "width": "300px"
+  }, 
+  {
+   "fieldname": "amount", 
+   "fieldtype": "Currency", 
+   "in_list_view": 1, 
+   "label": "Amount", 
+   "oldfieldname": "amount", 
+   "oldfieldtype": "Currency", 
+   "options": "currency", 
+   "permlevel": 0, 
+   "reqd": 1
+  }
+ ], 
+ "idx": 1, 
+ "istable": 1, 
+ "modified": "2013-12-20 19:23:18", 
+ "modified_by": "Administrator", 
+ "module": "Stock", 
+ "name": "Landed Cost Item", 
+ "owner": "wasim@webnotestech.com"
+}
\ No newline at end of file
diff --git a/erpnext/stock/doctype/landed_cost_purchase_receipt/landed_cost_purchase_receipt.txt b/erpnext/stock/doctype/landed_cost_purchase_receipt/landed_cost_purchase_receipt.txt
index 8d02e3a..904c20d 100644
--- a/erpnext/stock/doctype/landed_cost_purchase_receipt/landed_cost_purchase_receipt.txt
+++ b/erpnext/stock/doctype/landed_cost_purchase_receipt/landed_cost_purchase_receipt.txt
@@ -1,39 +1,26 @@
-[
- {
-  "creation": "2013-02-22 01:28:02", 
-  "docstatus": 0, 
-  "modified": "2013-12-20 19:23:18", 
-  "modified_by": "Administrator", 
-  "owner": "wasim@webnotestech.com"
- }, 
- {
-  "doctype": "DocType", 
-  "istable": 1, 
-  "module": "Stock", 
-  "name": "__common__"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "purchase_receipt", 
-  "fieldtype": "Link", 
-  "in_list_view": 1, 
-  "label": "Purchase Receipt", 
-  "name": "__common__", 
-  "oldfieldname": "purchase_receipt_no", 
-  "oldfieldtype": "Link", 
-  "options": "Purchase Receipt", 
-  "parent": "Landed Cost Purchase Receipt", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0, 
-  "print_width": "220px", 
-  "width": "220px"
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Landed Cost Purchase Receipt"
- }, 
- {
-  "doctype": "DocField"
- }
-]
\ No newline at end of file
+{
+ "creation": "2013-02-22 01:28:02", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "fields": [
+  {
+   "fieldname": "purchase_receipt", 
+   "fieldtype": "Link", 
+   "in_list_view": 1, 
+   "label": "Purchase Receipt", 
+   "oldfieldname": "purchase_receipt_no", 
+   "oldfieldtype": "Link", 
+   "options": "Purchase Receipt", 
+   "permlevel": 0, 
+   "print_width": "220px", 
+   "width": "220px"
+  }
+ ], 
+ "idx": 1, 
+ "istable": 1, 
+ "modified": "2013-12-20 19:23:18", 
+ "modified_by": "Administrator", 
+ "module": "Stock", 
+ "name": "Landed Cost Purchase Receipt", 
+ "owner": "wasim@webnotestech.com"
+}
\ No newline at end of file
diff --git a/erpnext/stock/doctype/landed_cost_wizard/landed_cost_wizard.txt b/erpnext/stock/doctype/landed_cost_wizard/landed_cost_wizard.txt
index 587d0e3..461c909 100644
--- a/erpnext/stock/doctype/landed_cost_wizard/landed_cost_wizard.txt
+++ b/erpnext/stock/doctype/landed_cost_wizard/landed_cost_wizard.txt
@@ -1,95 +1,83 @@
-[
- {
-  "creation": "2013-01-22 16:50:39", 
-  "docstatus": 0, 
-  "modified": "2013-12-20 19:23:18", 
-  "modified_by": "Administrator", 
-  "owner": "wasim@webnotestech.com"
- }, 
- {
-  "doctype": "DocType", 
-  "icon": "icon-magic", 
-  "issingle": 1, 
-  "module": "Stock", 
-  "name": "__common__"
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "Landed Cost Wizard", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "create": 1, 
-  "doctype": "DocPerm", 
-  "email": 1, 
-  "name": "__common__", 
-  "parent": "Landed Cost Wizard", 
-  "parentfield": "permissions", 
-  "parenttype": "DocType", 
-  "permlevel": 0, 
-  "print": 1, 
-  "read": 1, 
-  "report": 0, 
-  "submit": 0, 
-  "write": 1
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Landed Cost Wizard"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "company", 
-  "fieldtype": "Link", 
-  "label": "Company", 
-  "options": "Company", 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "section_break0", 
-  "fieldtype": "Section Break", 
-  "label": "Select Purchase Receipts", 
-  "options": "Simple"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "lc_pr_details", 
-  "fieldtype": "Table", 
-  "label": "Landed Cost Purchase Receipts", 
-  "options": "Landed Cost Purchase Receipt"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "section_break1", 
-  "fieldtype": "Section Break", 
-  "label": "Add Taxes and Charges"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "landed_cost_details", 
-  "fieldtype": "Table", 
-  "label": "Landed Cost Items", 
-  "options": "Landed Cost Item"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "update_landed_cost", 
-  "fieldtype": "Button", 
-  "label": "Update Landed Cost", 
-  "options": "update_landed_cost"
- }, 
- {
-  "amend": 0, 
-  "cancel": 0, 
-  "doctype": "DocPerm", 
-  "role": "Purchase Manager"
- }, 
- {
-  "doctype": "DocPerm", 
-  "role": "Purchase User"
- }
-]
\ No newline at end of file
+{
+ "creation": "2013-01-22 16:50:39", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "fields": [
+  {
+   "fieldname": "company", 
+   "fieldtype": "Link", 
+   "label": "Company", 
+   "options": "Company", 
+   "permlevel": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "section_break0", 
+   "fieldtype": "Section Break", 
+   "label": "Select Purchase Receipts", 
+   "options": "Simple", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "lc_pr_details", 
+   "fieldtype": "Table", 
+   "label": "Landed Cost Purchase Receipts", 
+   "options": "Landed Cost Purchase Receipt", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "section_break1", 
+   "fieldtype": "Section Break", 
+   "label": "Add Taxes and Charges", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "landed_cost_details", 
+   "fieldtype": "Table", 
+   "label": "Landed Cost Items", 
+   "options": "Landed Cost Item", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "update_landed_cost", 
+   "fieldtype": "Button", 
+   "label": "Update Landed Cost", 
+   "options": "update_landed_cost", 
+   "permlevel": 0
+  }
+ ], 
+ "icon": "icon-magic", 
+ "idx": 1, 
+ "issingle": 1, 
+ "modified": "2013-12-20 19:23:18", 
+ "modified_by": "Administrator", 
+ "module": "Stock", 
+ "name": "Landed Cost Wizard", 
+ "owner": "wasim@webnotestech.com", 
+ "permissions": [
+  {
+   "amend": 0, 
+   "cancel": 0, 
+   "create": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 0, 
+   "role": "Purchase Manager", 
+   "submit": 0, 
+   "write": 1
+  }, 
+  {
+   "create": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 0, 
+   "role": "Purchase User", 
+   "submit": 0, 
+   "write": 1
+  }
+ ]
+}
\ No newline at end of file
diff --git a/erpnext/stock/doctype/material_request/material_request.txt b/erpnext/stock/doctype/material_request/material_request.txt
index cb02791..efff224 100644
--- a/erpnext/stock/doctype/material_request/material_request.txt
+++ b/erpnext/stock/doctype/material_request/material_request.txt
@@ -1,286 +1,297 @@
-[
- {
-  "creation": "2013-03-07 14:48:38", 
-  "docstatus": 0, 
-  "modified": "2014-01-20 17:48:57", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "allow_attach": 1, 
-  "allow_import": 1, 
-  "autoname": "naming_series:", 
-  "doctype": "DocType", 
-  "icon": "icon-ticket", 
-  "is_submittable": 1, 
-  "module": "Stock", 
-  "name": "__common__", 
-  "read_only_onload": 1, 
-  "search_fields": "status,transaction_date"
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "Material Request", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "amend": 1, 
-  "cancel": 1, 
-  "create": 1, 
-  "delete": 1, 
-  "doctype": "DocPerm", 
-  "email": 1, 
-  "name": "__common__", 
-  "parent": "Material Request", 
-  "parentfield": "permissions", 
-  "parenttype": "DocType", 
-  "permlevel": 0, 
-  "print": 1, 
-  "read": 1, 
-  "report": 1, 
-  "submit": 1, 
-  "write": 1
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Material Request"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "type_section", 
-  "fieldtype": "Section Break", 
-  "label": "Basic Info", 
-  "options": "icon-pushpin"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "material_request_type", 
-  "fieldtype": "Select", 
-  "in_list_view": 1, 
-  "label": "Type", 
-  "options": "Purchase\nTransfer", 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break_2", 
-  "fieldtype": "Column Break"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "naming_series", 
-  "fieldtype": "Select", 
-  "label": "Series", 
-  "no_copy": 1, 
-  "oldfieldname": "naming_series", 
-  "oldfieldtype": "Select", 
-  "options": "MREQ-\nIDT", 
-  "print_hide": 1, 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "amended_from", 
-  "fieldtype": "Data", 
-  "ignore_restrictions": 1, 
-  "label": "Amended From", 
-  "no_copy": 1, 
-  "oldfieldname": "amended_from", 
-  "oldfieldtype": "Data", 
-  "print_hide": 1, 
-  "print_width": "150px", 
-  "read_only": 1, 
-  "width": "150px"
- }, 
- {
-  "description": "Select the relevant company name if you have multiple companies", 
-  "doctype": "DocField", 
-  "fieldname": "company", 
-  "fieldtype": "Link", 
-  "in_filter": 1, 
-  "label": "Company", 
-  "oldfieldname": "company", 
-  "oldfieldtype": "Link", 
-  "options": "Company", 
-  "print_hide": 1, 
-  "print_width": "150px", 
-  "reqd": 1, 
-  "search_index": 1, 
-  "width": "150px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "items", 
-  "fieldtype": "Section Break", 
-  "label": "Items", 
-  "oldfieldtype": "Section Break", 
-  "options": "icon-shopping-cart"
- }, 
- {
-  "allow_on_submit": 0, 
-  "doctype": "DocField", 
-  "fieldname": "indent_details", 
-  "fieldtype": "Table", 
-  "label": "Material Request Items", 
-  "no_copy": 0, 
-  "oldfieldname": "indent_details", 
-  "oldfieldtype": "Table", 
-  "options": "Material Request Item"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "more_info", 
-  "fieldtype": "Section Break", 
-  "label": "More Info", 
-  "oldfieldtype": "Section Break", 
-  "options": "icon-file-text"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break1", 
-  "fieldtype": "Column Break", 
-  "oldfieldtype": "Column Break", 
-  "print_width": "50%", 
-  "width": "50%"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "requested_by", 
-  "fieldtype": "Data", 
-  "label": "Requested For"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "transaction_date", 
-  "fieldtype": "Date", 
-  "in_filter": 1, 
-  "label": "Transaction Date", 
-  "no_copy": 1, 
-  "oldfieldname": "transaction_date", 
-  "oldfieldtype": "Date", 
-  "print_width": "100px", 
-  "reqd": 1, 
-  "search_index": 1, 
-  "width": "100px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "fiscal_year", 
-  "fieldtype": "Select", 
-  "in_filter": 1, 
-  "label": "Fiscal Year", 
-  "oldfieldname": "fiscal_year", 
-  "oldfieldtype": "Select", 
-  "options": "link:Fiscal Year", 
-  "print_hide": 1, 
-  "print_width": "150px", 
-  "reqd": 1, 
-  "search_index": 1, 
-  "width": "150px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break2", 
-  "fieldtype": "Column Break", 
-  "oldfieldtype": "Column Break", 
-  "print_width": "50%", 
-  "width": "50%"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "status", 
-  "fieldtype": "Select", 
-  "in_filter": 1, 
-  "in_list_view": 1, 
-  "label": "Status", 
-  "no_copy": 1, 
-  "oldfieldname": "status", 
-  "oldfieldtype": "Select", 
-  "options": "\nDraft\nSubmitted\nStopped\nCancelled", 
-  "print_hide": 1, 
-  "print_width": "100px", 
-  "read_only": 1, 
-  "reqd": 0, 
-  "search_index": 1, 
-  "width": "100px"
- }, 
- {
-  "allow_on_submit": 1, 
-  "doctype": "DocField", 
-  "fieldname": "letter_head", 
-  "fieldtype": "Select", 
-  "label": "Letter Head", 
-  "oldfieldname": "letter_head", 
-  "oldfieldtype": "Select", 
-  "options": "link:Letter Head", 
-  "print_hide": 1
- }, 
- {
-  "allow_on_submit": 1, 
-  "doctype": "DocField", 
-  "fieldname": "select_print_heading", 
-  "fieldtype": "Link", 
-  "label": "Print Heading", 
-  "options": "Print Heading", 
-  "print_hide": 1
- }, 
- {
-  "description": "% of materials ordered against this Material Request", 
-  "doctype": "DocField", 
-  "fieldname": "per_ordered", 
-  "fieldtype": "Percent", 
-  "in_list_view": 1, 
-  "label": "% Completed", 
-  "no_copy": 1, 
-  "oldfieldname": "per_ordered", 
-  "oldfieldtype": "Currency", 
-  "print_hide": 1, 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "terms_section_break", 
-  "fieldtype": "Section Break", 
-  "label": "Terms and Conditions", 
-  "oldfieldtype": "Section Break", 
-  "options": "icon-legal"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "tc_name", 
-  "fieldtype": "Link", 
-  "label": "Terms", 
-  "oldfieldname": "tc_name", 
-  "oldfieldtype": "Link", 
-  "options": "Terms and Conditions", 
-  "print_hide": 1, 
-  "report_hide": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "terms", 
-  "fieldtype": "Text Editor", 
-  "label": "Terms and Conditions Content", 
-  "oldfieldname": "terms", 
-  "oldfieldtype": "Text Editor"
- }, 
- {
-  "doctype": "DocPerm", 
-  "role": "Purchase Manager"
- }, 
- {
-  "doctype": "DocPerm", 
-  "role": "Material Manager"
- }, 
- {
-  "doctype": "DocPerm", 
-  "role": "Material User"
- }, 
- {
-  "doctype": "DocPerm", 
-  "role": "Purchase User"
- }
-]
\ No newline at end of file
+{
+ "allow_attach": 1, 
+ "allow_import": 1, 
+ "autoname": "naming_series:", 
+ "creation": "2013-03-07 14:48:38", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "fields": [
+  {
+   "fieldname": "type_section", 
+   "fieldtype": "Section Break", 
+   "label": "Basic Info", 
+   "options": "icon-pushpin", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "material_request_type", 
+   "fieldtype": "Select", 
+   "in_list_view": 1, 
+   "label": "Type", 
+   "options": "Purchase\nTransfer", 
+   "permlevel": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "column_break_2", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "naming_series", 
+   "fieldtype": "Select", 
+   "label": "Series", 
+   "no_copy": 1, 
+   "oldfieldname": "naming_series", 
+   "oldfieldtype": "Select", 
+   "options": "MREQ-\nIDT", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "amended_from", 
+   "fieldtype": "Data", 
+   "ignore_restrictions": 1, 
+   "label": "Amended From", 
+   "no_copy": 1, 
+   "oldfieldname": "amended_from", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "print_width": "150px", 
+   "read_only": 1, 
+   "width": "150px"
+  }, 
+  {
+   "description": "Select the relevant company name if you have multiple companies", 
+   "fieldname": "company", 
+   "fieldtype": "Link", 
+   "in_filter": 1, 
+   "label": "Company", 
+   "oldfieldname": "company", 
+   "oldfieldtype": "Link", 
+   "options": "Company", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "print_width": "150px", 
+   "reqd": 1, 
+   "search_index": 1, 
+   "width": "150px"
+  }, 
+  {
+   "fieldname": "items", 
+   "fieldtype": "Section Break", 
+   "label": "Items", 
+   "oldfieldtype": "Section Break", 
+   "options": "icon-shopping-cart", 
+   "permlevel": 0
+  }, 
+  {
+   "allow_on_submit": 0, 
+   "fieldname": "indent_details", 
+   "fieldtype": "Table", 
+   "label": "Material Request Items", 
+   "no_copy": 0, 
+   "oldfieldname": "indent_details", 
+   "oldfieldtype": "Table", 
+   "options": "Material Request Item", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "more_info", 
+   "fieldtype": "Section Break", 
+   "label": "More Info", 
+   "oldfieldtype": "Section Break", 
+   "options": "icon-file-text", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "column_break1", 
+   "fieldtype": "Column Break", 
+   "oldfieldtype": "Column Break", 
+   "permlevel": 0, 
+   "print_width": "50%", 
+   "width": "50%"
+  }, 
+  {
+   "fieldname": "requested_by", 
+   "fieldtype": "Data", 
+   "label": "Requested For", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "transaction_date", 
+   "fieldtype": "Date", 
+   "in_filter": 1, 
+   "label": "Transaction Date", 
+   "no_copy": 1, 
+   "oldfieldname": "transaction_date", 
+   "oldfieldtype": "Date", 
+   "permlevel": 0, 
+   "print_width": "100px", 
+   "reqd": 1, 
+   "search_index": 1, 
+   "width": "100px"
+  }, 
+  {
+   "fieldname": "fiscal_year", 
+   "fieldtype": "Select", 
+   "in_filter": 1, 
+   "label": "Fiscal Year", 
+   "oldfieldname": "fiscal_year", 
+   "oldfieldtype": "Select", 
+   "options": "link:Fiscal Year", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "print_width": "150px", 
+   "reqd": 1, 
+   "search_index": 1, 
+   "width": "150px"
+  }, 
+  {
+   "fieldname": "column_break2", 
+   "fieldtype": "Column Break", 
+   "oldfieldtype": "Column Break", 
+   "permlevel": 0, 
+   "print_width": "50%", 
+   "width": "50%"
+  }, 
+  {
+   "fieldname": "status", 
+   "fieldtype": "Select", 
+   "in_filter": 1, 
+   "in_list_view": 1, 
+   "label": "Status", 
+   "no_copy": 1, 
+   "oldfieldname": "status", 
+   "oldfieldtype": "Select", 
+   "options": "\nDraft\nSubmitted\nStopped\nCancelled", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "print_width": "100px", 
+   "read_only": 1, 
+   "reqd": 0, 
+   "search_index": 1, 
+   "width": "100px"
+  }, 
+  {
+   "allow_on_submit": 1, 
+   "fieldname": "letter_head", 
+   "fieldtype": "Select", 
+   "label": "Letter Head", 
+   "oldfieldname": "letter_head", 
+   "oldfieldtype": "Select", 
+   "options": "link:Letter Head", 
+   "permlevel": 0, 
+   "print_hide": 1
+  }, 
+  {
+   "allow_on_submit": 1, 
+   "fieldname": "select_print_heading", 
+   "fieldtype": "Link", 
+   "label": "Print Heading", 
+   "options": "Print Heading", 
+   "permlevel": 0, 
+   "print_hide": 1
+  }, 
+  {
+   "description": "% of materials ordered against this Material Request", 
+   "fieldname": "per_ordered", 
+   "fieldtype": "Percent", 
+   "in_list_view": 1, 
+   "label": "% Completed", 
+   "no_copy": 1, 
+   "oldfieldname": "per_ordered", 
+   "oldfieldtype": "Currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "terms_section_break", 
+   "fieldtype": "Section Break", 
+   "label": "Terms and Conditions", 
+   "oldfieldtype": "Section Break", 
+   "options": "icon-legal", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "tc_name", 
+   "fieldtype": "Link", 
+   "label": "Terms", 
+   "oldfieldname": "tc_name", 
+   "oldfieldtype": "Link", 
+   "options": "Terms and Conditions", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "report_hide": 1
+  }, 
+  {
+   "fieldname": "terms", 
+   "fieldtype": "Text Editor", 
+   "label": "Terms and Conditions Content", 
+   "oldfieldname": "terms", 
+   "oldfieldtype": "Text Editor", 
+   "permlevel": 0
+  }
+ ], 
+ "icon": "icon-ticket", 
+ "idx": 1, 
+ "is_submittable": 1, 
+ "modified": "2014-01-20 17:48:57", 
+ "modified_by": "Administrator", 
+ "module": "Stock", 
+ "name": "Material Request", 
+ "owner": "Administrator", 
+ "permissions": [
+  {
+   "amend": 1, 
+   "cancel": 1, 
+   "create": 1, 
+   "delete": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Purchase Manager", 
+   "submit": 1, 
+   "write": 1
+  }, 
+  {
+   "amend": 1, 
+   "cancel": 1, 
+   "create": 1, 
+   "delete": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Material Manager", 
+   "submit": 1, 
+   "write": 1
+  }, 
+  {
+   "amend": 1, 
+   "cancel": 1, 
+   "create": 1, 
+   "delete": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Material User", 
+   "submit": 1, 
+   "write": 1
+  }, 
+  {
+   "amend": 1, 
+   "cancel": 1, 
+   "create": 1, 
+   "delete": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Purchase User", 
+   "submit": 1, 
+   "write": 1
+  }
+ ], 
+ "read_only_onload": 1, 
+ "search_fields": "status,transaction_date"
+}
\ No newline at end of file
diff --git a/erpnext/stock/doctype/material_request_item/material_request_item.txt b/erpnext/stock/doctype/material_request_item/material_request_item.txt
index 56a4976..bd916a8 100644
--- a/erpnext/stock/doctype/material_request_item/material_request_item.txt
+++ b/erpnext/stock/doctype/material_request_item/material_request_item.txt
@@ -1,253 +1,240 @@
-[
- {
-  "creation": "2013-02-22 01:28:02", 
-  "docstatus": 0, 
-  "modified": "2014-02-03 11:35:26", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "autoname": "MREQD-.#####", 
-  "doctype": "DocType", 
-  "istable": 1, 
-  "module": "Stock", 
-  "name": "__common__"
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "Material Request Item", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Material Request Item"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "item_code", 
-  "fieldtype": "Link", 
-  "in_filter": 1, 
-  "in_list_view": 1, 
-  "label": "Item Code", 
-  "oldfieldname": "item_code", 
-  "oldfieldtype": "Link", 
-  "options": "Item", 
-  "print_width": "100px", 
-  "reqd": 1, 
-  "search_index": 1, 
-  "width": "100px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "item_name", 
-  "fieldtype": "Data", 
-  "in_filter": 1, 
-  "in_list_view": 0, 
-  "label": "Item Name", 
-  "oldfieldname": "item_name", 
-  "oldfieldtype": "Data", 
-  "print_width": "100px", 
-  "reqd": 0, 
-  "search_index": 1, 
-  "width": "100px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "col_break1", 
-  "fieldtype": "Column Break"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "description", 
-  "fieldtype": "Text", 
-  "in_list_view": 1, 
-  "label": "Description", 
-  "oldfieldname": "description", 
-  "oldfieldtype": "Text", 
-  "print_width": "250px", 
-  "reqd": 1, 
-  "width": "250px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "quantity_and_warehouse", 
-  "fieldtype": "Section Break", 
-  "in_list_view": 0, 
-  "label": "Quantity and Warehouse"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "qty", 
-  "fieldtype": "Float", 
-  "in_list_view": 1, 
-  "label": "Quantity", 
-  "no_copy": 0, 
-  "oldfieldname": "qty", 
-  "oldfieldtype": "Currency", 
-  "print_width": "80px", 
-  "reqd": 1, 
-  "width": "80px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "warehouse", 
-  "fieldtype": "Link", 
-  "in_list_view": 1, 
-  "label": "For Warehouse", 
-  "oldfieldname": "warehouse", 
-  "oldfieldtype": "Link", 
-  "options": "Warehouse", 
-  "print_hide": 0, 
-  "print_width": "100px", 
-  "reqd": 0, 
-  "width": "100px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "col_break2", 
-  "fieldtype": "Column Break"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "uom", 
-  "fieldtype": "Link", 
-  "in_list_view": 1, 
-  "label": "Stock UOM", 
-  "no_copy": 0, 
-  "oldfieldname": "uom", 
-  "oldfieldtype": "Link", 
-  "options": "UOM", 
-  "print_width": "70px", 
-  "read_only": 1, 
-  "reqd": 1, 
-  "width": "70px"
- }, 
- {
-  "allow_on_submit": 0, 
-  "doctype": "DocField", 
-  "fieldname": "schedule_date", 
-  "fieldtype": "Date", 
-  "in_list_view": 1, 
-  "label": "Required Date", 
-  "no_copy": 0, 
-  "oldfieldname": "schedule_date", 
-  "oldfieldtype": "Date", 
-  "print_hide": 0, 
-  "print_width": "100px", 
-  "reqd": 1, 
-  "width": "100px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "more_info", 
-  "fieldtype": "Section Break", 
-  "label": "More Info"
- }, 
- {
-  "description": "<a href=\"#Sales Browser/Item Group\">Add / Edit</a>", 
-  "doctype": "DocField", 
-  "fieldname": "item_group", 
-  "fieldtype": "Link", 
-  "in_filter": 1, 
-  "label": "Item Group", 
-  "no_copy": 0, 
-  "oldfieldname": "item_group", 
-  "oldfieldtype": "Link", 
-  "options": "Item Group", 
-  "print_hide": 1, 
-  "read_only": 1, 
-  "reqd": 0, 
-  "search_index": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "brand", 
-  "fieldtype": "Link", 
-  "label": "Brand", 
-  "oldfieldname": "brand", 
-  "oldfieldtype": "Link", 
-  "options": "Brand", 
-  "print_hide": 1, 
-  "print_width": "100px", 
-  "read_only": 1, 
-  "width": "100px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "lead_time_date", 
-  "fieldtype": "Date", 
-  "in_list_view": 0, 
-  "label": "Lead Time Date", 
-  "no_copy": 1, 
-  "oldfieldname": "lead_time_date", 
-  "oldfieldtype": "Date", 
-  "print_hide": 1, 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "sales_order_no", 
-  "fieldtype": "Link", 
-  "label": "Sales Order No", 
-  "no_copy": 0, 
-  "options": "Sales Order", 
-  "print_hide": 1, 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "col_break3", 
-  "fieldtype": "Column Break"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "min_order_qty", 
-  "fieldtype": "Float", 
-  "label": "Min Order Qty", 
-  "no_copy": 1, 
-  "oldfieldname": "min_order_qty", 
-  "oldfieldtype": "Currency", 
-  "print_hide": 1, 
-  "print_width": "70px", 
-  "read_only": 1, 
-  "reqd": 0, 
-  "width": "70px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "projected_qty", 
-  "fieldtype": "Float", 
-  "label": "Projected Qty", 
-  "no_copy": 1, 
-  "oldfieldname": "projected_qty", 
-  "oldfieldtype": "Currency", 
-  "print_hide": 1, 
-  "print_width": "70px", 
-  "read_only": 1, 
-  "width": "70px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "ordered_qty", 
-  "fieldtype": "Float", 
-  "label": "Completed Qty", 
-  "no_copy": 1, 
-  "oldfieldname": "ordered_qty", 
-  "oldfieldtype": "Currency", 
-  "read_only": 1
- }, 
- {
-  "allow_on_submit": 1, 
-  "doctype": "DocField", 
-  "fieldname": "page_break", 
-  "fieldtype": "Check", 
-  "label": "Page Break", 
-  "no_copy": 1, 
-  "oldfieldname": "page_break", 
-  "oldfieldtype": "Check", 
-  "print_hide": 1
- }
-]
\ No newline at end of file
+{
+ "autoname": "MREQD-.#####", 
+ "creation": "2013-02-22 01:28:02", 
+ "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": "100px", 
+   "reqd": 1, 
+   "search_index": 1, 
+   "width": "100px"
+  }, 
+  {
+   "fieldname": "item_name", 
+   "fieldtype": "Data", 
+   "in_filter": 1, 
+   "in_list_view": 0, 
+   "label": "Item Name", 
+   "oldfieldname": "item_name", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "print_width": "100px", 
+   "reqd": 0, 
+   "search_index": 1, 
+   "width": "100px"
+  }, 
+  {
+   "fieldname": "col_break1", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "description", 
+   "fieldtype": "Text", 
+   "in_list_view": 1, 
+   "label": "Description", 
+   "oldfieldname": "description", 
+   "oldfieldtype": "Text", 
+   "permlevel": 0, 
+   "print_width": "250px", 
+   "reqd": 1, 
+   "width": "250px"
+  }, 
+  {
+   "fieldname": "quantity_and_warehouse", 
+   "fieldtype": "Section Break", 
+   "in_list_view": 0, 
+   "label": "Quantity and Warehouse", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "qty", 
+   "fieldtype": "Float", 
+   "in_list_view": 1, 
+   "label": "Quantity", 
+   "no_copy": 0, 
+   "oldfieldname": "qty", 
+   "oldfieldtype": "Currency", 
+   "permlevel": 0, 
+   "print_width": "80px", 
+   "reqd": 1, 
+   "width": "80px"
+  }, 
+  {
+   "fieldname": "warehouse", 
+   "fieldtype": "Link", 
+   "in_list_view": 1, 
+   "label": "For Warehouse", 
+   "oldfieldname": "warehouse", 
+   "oldfieldtype": "Link", 
+   "options": "Warehouse", 
+   "permlevel": 0, 
+   "print_hide": 0, 
+   "print_width": "100px", 
+   "reqd": 0, 
+   "width": "100px"
+  }, 
+  {
+   "fieldname": "col_break2", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "uom", 
+   "fieldtype": "Link", 
+   "in_list_view": 1, 
+   "label": "Stock UOM", 
+   "no_copy": 0, 
+   "oldfieldname": "uom", 
+   "oldfieldtype": "Link", 
+   "options": "UOM", 
+   "permlevel": 0, 
+   "print_width": "70px", 
+   "read_only": 1, 
+   "reqd": 1, 
+   "width": "70px"
+  }, 
+  {
+   "allow_on_submit": 0, 
+   "fieldname": "schedule_date", 
+   "fieldtype": "Date", 
+   "in_list_view": 1, 
+   "label": "Required Date", 
+   "no_copy": 0, 
+   "oldfieldname": "schedule_date", 
+   "oldfieldtype": "Date", 
+   "permlevel": 0, 
+   "print_hide": 0, 
+   "print_width": "100px", 
+   "reqd": 1, 
+   "width": "100px"
+  }, 
+  {
+   "fieldname": "more_info", 
+   "fieldtype": "Section Break", 
+   "label": "More Info", 
+   "permlevel": 0
+  }, 
+  {
+   "description": "<a href=\"#Sales Browser/Item Group\">Add / Edit</a>", 
+   "fieldname": "item_group", 
+   "fieldtype": "Link", 
+   "in_filter": 1, 
+   "label": "Item Group", 
+   "no_copy": 0, 
+   "oldfieldname": "item_group", 
+   "oldfieldtype": "Link", 
+   "options": "Item Group", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1, 
+   "reqd": 0, 
+   "search_index": 1
+  }, 
+  {
+   "fieldname": "brand", 
+   "fieldtype": "Link", 
+   "label": "Brand", 
+   "oldfieldname": "brand", 
+   "oldfieldtype": "Link", 
+   "options": "Brand", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "print_width": "100px", 
+   "read_only": 1, 
+   "width": "100px"
+  }, 
+  {
+   "fieldname": "lead_time_date", 
+   "fieldtype": "Date", 
+   "in_list_view": 0, 
+   "label": "Lead Time Date", 
+   "no_copy": 1, 
+   "oldfieldname": "lead_time_date", 
+   "oldfieldtype": "Date", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "sales_order_no", 
+   "fieldtype": "Link", 
+   "label": "Sales Order No", 
+   "no_copy": 0, 
+   "options": "Sales Order", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "col_break3", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "min_order_qty", 
+   "fieldtype": "Float", 
+   "label": "Min Order Qty", 
+   "no_copy": 1, 
+   "oldfieldname": "min_order_qty", 
+   "oldfieldtype": "Currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "print_width": "70px", 
+   "read_only": 1, 
+   "reqd": 0, 
+   "width": "70px"
+  }, 
+  {
+   "fieldname": "projected_qty", 
+   "fieldtype": "Float", 
+   "label": "Projected Qty", 
+   "no_copy": 1, 
+   "oldfieldname": "projected_qty", 
+   "oldfieldtype": "Currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "print_width": "70px", 
+   "read_only": 1, 
+   "width": "70px"
+  }, 
+  {
+   "fieldname": "ordered_qty", 
+   "fieldtype": "Float", 
+   "label": "Completed Qty", 
+   "no_copy": 1, 
+   "oldfieldname": "ordered_qty", 
+   "oldfieldtype": "Currency", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "allow_on_submit": 1, 
+   "fieldname": "page_break", 
+   "fieldtype": "Check", 
+   "label": "Page Break", 
+   "no_copy": 1, 
+   "oldfieldname": "page_break", 
+   "oldfieldtype": "Check", 
+   "permlevel": 0, 
+   "print_hide": 1
+  }
+ ], 
+ "idx": 1, 
+ "istable": 1, 
+ "modified": "2014-02-03 11:35:26", 
+ "modified_by": "Administrator", 
+ "module": "Stock", 
+ "name": "Material Request Item", 
+ "owner": "Administrator"
+}
\ No newline at end of file
diff --git a/erpnext/stock/doctype/packed_item/packed_item.txt b/erpnext/stock/doctype/packed_item/packed_item.txt
index 45a1d4d..57d32cd 100644
--- a/erpnext/stock/doctype/packed_item/packed_item.txt
+++ b/erpnext/stock/doctype/packed_item/packed_item.txt
@@ -1,170 +1,157 @@
-[
- {
-  "creation": "2013-02-22 01:28:00", 
-  "docstatus": 0, 
-  "modified": "2013-12-20 19:23:23", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "doctype": "DocType", 
-  "istable": 1, 
-  "module": "Stock", 
-  "name": "__common__"
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "Packed Item", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Packed Item"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "parent_item", 
-  "fieldtype": "Link", 
-  "in_list_view": 1, 
-  "label": "Parent Item", 
-  "oldfieldname": "parent_item", 
-  "oldfieldtype": "Link", 
-  "options": "Item", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "item_code", 
-  "fieldtype": "Link", 
-  "in_filter": 1, 
-  "in_list_view": 1, 
-  "label": "Item Code", 
-  "oldfieldname": "item_code", 
-  "oldfieldtype": "Link", 
-  "options": "Item", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "item_name", 
-  "fieldtype": "Data", 
-  "in_filter": 1, 
-  "in_list_view": 1, 
-  "label": "Item Name", 
-  "oldfieldname": "item_name", 
-  "oldfieldtype": "Data", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "parent_detail_docname", 
-  "fieldtype": "Data", 
-  "hidden": 1, 
-  "in_list_view": 0, 
-  "label": "Parent Detail docname", 
-  "no_copy": 1, 
-  "oldfieldname": "parent_detail_docname", 
-  "oldfieldtype": "Data", 
-  "print_hide": 1, 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "description", 
-  "fieldtype": "Text", 
-  "in_list_view": 1, 
-  "label": "Description", 
-  "oldfieldname": "description", 
-  "oldfieldtype": "Text", 
-  "print_width": "300px", 
-  "read_only": 1, 
-  "width": "300px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "warehouse", 
-  "fieldtype": "Link", 
-  "in_list_view": 1, 
-  "label": "Warehouse", 
-  "oldfieldname": "warehouse", 
-  "oldfieldtype": "Link", 
-  "options": "Warehouse"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "qty", 
-  "fieldtype": "Float", 
-  "in_list_view": 1, 
-  "label": "Qty", 
-  "oldfieldname": "qty", 
-  "oldfieldtype": "Currency", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "serial_no", 
-  "fieldtype": "Text", 
-  "label": "Serial No"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "batch_no", 
-  "fieldtype": "Data", 
-  "label": "Batch No"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "actual_qty", 
-  "fieldtype": "Float", 
-  "label": "Actual Qty", 
-  "no_copy": 1, 
-  "oldfieldname": "actual_qty", 
-  "oldfieldtype": "Currency", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "projected_qty", 
-  "fieldtype": "Float", 
-  "label": "Projected Qty", 
-  "no_copy": 1, 
-  "oldfieldname": "projected_qty", 
-  "oldfieldtype": "Currency", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "uom", 
-  "fieldtype": "Link", 
-  "label": "UOM", 
-  "oldfieldname": "uom", 
-  "oldfieldtype": "Link", 
-  "options": "UOM", 
-  "read_only": 1, 
-  "search_index": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "prevdoc_doctype", 
-  "fieldtype": "Data", 
-  "hidden": 1, 
-  "label": "Prevdoc DocType", 
-  "oldfieldname": "prevdoc_doctype", 
-  "oldfieldtype": "Data", 
-  "print_hide": 1, 
-  "read_only": 1
- }, 
- {
-  "allow_on_submit": 1, 
-  "doctype": "DocField", 
-  "fieldname": "page_break", 
-  "fieldtype": "Check", 
-  "label": "Page Break", 
-  "oldfieldname": "page_break", 
-  "oldfieldtype": "Check", 
-  "read_only": 1
- }
-]
\ No newline at end of file
+{
+ "creation": "2013-02-22 01:28:00", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "fields": [
+  {
+   "fieldname": "parent_item", 
+   "fieldtype": "Link", 
+   "in_list_view": 1, 
+   "label": "Parent Item", 
+   "oldfieldname": "parent_item", 
+   "oldfieldtype": "Link", 
+   "options": "Item", 
+   "permlevel": 0, 
+   "read_only": 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, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "item_name", 
+   "fieldtype": "Data", 
+   "in_filter": 1, 
+   "in_list_view": 1, 
+   "label": "Item Name", 
+   "oldfieldname": "item_name", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "parent_detail_docname", 
+   "fieldtype": "Data", 
+   "hidden": 1, 
+   "in_list_view": 0, 
+   "label": "Parent Detail docname", 
+   "no_copy": 1, 
+   "oldfieldname": "parent_detail_docname", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "description", 
+   "fieldtype": "Text", 
+   "in_list_view": 1, 
+   "label": "Description", 
+   "oldfieldname": "description", 
+   "oldfieldtype": "Text", 
+   "permlevel": 0, 
+   "print_width": "300px", 
+   "read_only": 1, 
+   "width": "300px"
+  }, 
+  {
+   "fieldname": "warehouse", 
+   "fieldtype": "Link", 
+   "in_list_view": 1, 
+   "label": "Warehouse", 
+   "oldfieldname": "warehouse", 
+   "oldfieldtype": "Link", 
+   "options": "Warehouse", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "qty", 
+   "fieldtype": "Float", 
+   "in_list_view": 1, 
+   "label": "Qty", 
+   "oldfieldname": "qty", 
+   "oldfieldtype": "Currency", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "serial_no", 
+   "fieldtype": "Text", 
+   "label": "Serial No", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "batch_no", 
+   "fieldtype": "Data", 
+   "label": "Batch No", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "actual_qty", 
+   "fieldtype": "Float", 
+   "label": "Actual Qty", 
+   "no_copy": 1, 
+   "oldfieldname": "actual_qty", 
+   "oldfieldtype": "Currency", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "projected_qty", 
+   "fieldtype": "Float", 
+   "label": "Projected Qty", 
+   "no_copy": 1, 
+   "oldfieldname": "projected_qty", 
+   "oldfieldtype": "Currency", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "uom", 
+   "fieldtype": "Link", 
+   "label": "UOM", 
+   "oldfieldname": "uom", 
+   "oldfieldtype": "Link", 
+   "options": "UOM", 
+   "permlevel": 0, 
+   "read_only": 1, 
+   "search_index": 0
+  }, 
+  {
+   "fieldname": "prevdoc_doctype", 
+   "fieldtype": "Data", 
+   "hidden": 1, 
+   "label": "Prevdoc DocType", 
+   "oldfieldname": "prevdoc_doctype", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1
+  }, 
+  {
+   "allow_on_submit": 1, 
+   "fieldname": "page_break", 
+   "fieldtype": "Check", 
+   "label": "Page Break", 
+   "oldfieldname": "page_break", 
+   "oldfieldtype": "Check", 
+   "permlevel": 0, 
+   "read_only": 1
+  }
+ ], 
+ "idx": 1, 
+ "istable": 1, 
+ "modified": "2013-12-20 19:23:23", 
+ "modified_by": "Administrator", 
+ "module": "Stock", 
+ "name": "Packed Item", 
+ "owner": "Administrator"
+}
\ No newline at end of file
diff --git a/erpnext/stock/doctype/packing_slip/packing_slip.txt b/erpnext/stock/doctype/packing_slip/packing_slip.txt
index 2f8ccc3..2cba25b 100644
--- a/erpnext/stock/doctype/packing_slip/packing_slip.txt
+++ b/erpnext/stock/doctype/packing_slip/packing_slip.txt
@@ -1,238 +1,259 @@
-[
- {
-  "creation": "2013-04-11 15:32:24", 
-  "docstatus": 0, 
-  "modified": "2014-01-20 17:48:59", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "autoname": "PS.#######", 
-  "description": "Generate packing slips for packages to be delivered. Used to notify package number, package contents and its weight.", 
-  "doctype": "DocType", 
-  "document_type": "Transaction", 
-  "icon": "icon-suitcase", 
-  "is_submittable": 1, 
-  "module": "Stock", 
-  "name": "__common__", 
-  "read_only_onload": 1, 
-  "search_fields": "delivery_note"
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "Packing Slip", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "amend": 1, 
-  "cancel": 1, 
-  "create": 1, 
-  "delete": 1, 
-  "doctype": "DocPerm", 
-  "email": 1, 
-  "name": "__common__", 
-  "parent": "Packing Slip", 
-  "parentfield": "permissions", 
-  "parenttype": "DocType", 
-  "permlevel": 0, 
-  "print": 1, 
-  "read": 1, 
-  "report": 1, 
-  "submit": 1, 
-  "write": 1
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Packing Slip"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "packing_slip_details", 
-  "fieldtype": "Section Break", 
-  "label": "Packing Slip Items", 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break0", 
-  "fieldtype": "Column Break", 
-  "read_only": 0
- }, 
- {
-  "description": "Indicates that the package is a part of this delivery", 
-  "doctype": "DocField", 
-  "fieldname": "delivery_note", 
-  "fieldtype": "Link", 
-  "label": "Delivery Note", 
-  "options": "Delivery Note", 
-  "read_only": 0, 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break1", 
-  "fieldtype": "Column Break", 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "naming_series", 
-  "fieldtype": "Select", 
-  "label": "Series", 
-  "no_copy": 0, 
-  "options": "PS", 
-  "print_hide": 1, 
-  "read_only": 0, 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "section_break0", 
-  "fieldtype": "Section Break", 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break2", 
-  "fieldtype": "Column Break", 
-  "read_only": 0
- }, 
- {
-  "description": "Identification of the package for the delivery (for print)", 
-  "doctype": "DocField", 
-  "fieldname": "from_case_no", 
-  "fieldtype": "Data", 
-  "label": "From Package No.", 
-  "no_copy": 1, 
-  "read_only": 0, 
-  "reqd": 1, 
-  "width": "50px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break3", 
-  "fieldtype": "Column Break", 
-  "read_only": 0
- }, 
- {
-  "description": "If more than one package of the same type (for print)", 
-  "doctype": "DocField", 
-  "fieldname": "to_case_no", 
-  "fieldtype": "Data", 
-  "label": "To Package No.", 
-  "no_copy": 1, 
-  "read_only": 0, 
-  "width": "50px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "package_item_details", 
-  "fieldtype": "Section Break", 
-  "label": "Package Item Details", 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "get_items", 
-  "fieldtype": "Button", 
-  "label": "Get Items"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "item_details", 
-  "fieldtype": "Table", 
-  "label": "Items", 
-  "options": "Packing Slip Item", 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "package_weight_details", 
-  "fieldtype": "Section Break", 
-  "label": "Package Weight Details", 
-  "read_only": 0
- }, 
- {
-  "description": "The net weight of this package. (calculated automatically as sum of net weight of items)", 
-  "doctype": "DocField", 
-  "fieldname": "net_weight_pkg", 
-  "fieldtype": "Float", 
-  "label": "Net Weight", 
-  "no_copy": 1, 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "net_weight_uom", 
-  "fieldtype": "Link", 
-  "label": "Net Weight UOM", 
-  "no_copy": 1, 
-  "options": "UOM", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break4", 
-  "fieldtype": "Column Break", 
-  "read_only": 0
- }, 
- {
-  "description": "The gross weight of the package. Usually net weight + packaging material weight. (for print)", 
-  "doctype": "DocField", 
-  "fieldname": "gross_weight_pkg", 
-  "fieldtype": "Float", 
-  "label": "Gross Weight", 
-  "no_copy": 1, 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "gross_weight_uom", 
-  "fieldtype": "Link", 
-  "label": "Gross Weight UOM", 
-  "no_copy": 1, 
-  "options": "UOM", 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "misc_details", 
-  "fieldtype": "Section Break", 
-  "label": "Misc Details", 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "amended_from", 
-  "fieldtype": "Link", 
-  "ignore_restrictions": 1, 
-  "label": "Amended From", 
-  "no_copy": 1, 
-  "options": "Packing Slip", 
-  "print_hide": 1, 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocPerm", 
-  "role": "Material User"
- }, 
- {
-  "doctype": "DocPerm", 
-  "role": "Sales User"
- }, 
- {
-  "doctype": "DocPerm", 
-  "role": "Material Master Manager"
- }, 
- {
-  "doctype": "DocPerm", 
-  "role": "Material Manager"
- }, 
- {
-  "doctype": "DocPerm", 
-  "role": "Sales Manager"
- }
-]
\ No newline at end of file
+{
+ "autoname": "PS.#######", 
+ "creation": "2013-04-11 15:32:24", 
+ "description": "Generate packing slips for packages to be delivered. Used to notify package number, package contents and its weight.", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "document_type": "Transaction", 
+ "fields": [
+  {
+   "fieldname": "packing_slip_details", 
+   "fieldtype": "Section Break", 
+   "label": "Packing Slip Items", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "column_break0", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "description": "Indicates that the package is a part of this delivery", 
+   "fieldname": "delivery_note", 
+   "fieldtype": "Link", 
+   "label": "Delivery Note", 
+   "options": "Delivery Note", 
+   "permlevel": 0, 
+   "read_only": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "column_break1", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "naming_series", 
+   "fieldtype": "Select", 
+   "label": "Series", 
+   "no_copy": 0, 
+   "options": "PS", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "section_break0", 
+   "fieldtype": "Section Break", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "column_break2", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "description": "Identification of the package for the delivery (for print)", 
+   "fieldname": "from_case_no", 
+   "fieldtype": "Data", 
+   "label": "From Package No.", 
+   "no_copy": 1, 
+   "permlevel": 0, 
+   "read_only": 0, 
+   "reqd": 1, 
+   "width": "50px"
+  }, 
+  {
+   "fieldname": "column_break3", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "description": "If more than one package of the same type (for print)", 
+   "fieldname": "to_case_no", 
+   "fieldtype": "Data", 
+   "label": "To Package No.", 
+   "no_copy": 1, 
+   "permlevel": 0, 
+   "read_only": 0, 
+   "width": "50px"
+  }, 
+  {
+   "fieldname": "package_item_details", 
+   "fieldtype": "Section Break", 
+   "label": "Package Item Details", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "get_items", 
+   "fieldtype": "Button", 
+   "label": "Get Items", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "item_details", 
+   "fieldtype": "Table", 
+   "label": "Items", 
+   "options": "Packing Slip Item", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "package_weight_details", 
+   "fieldtype": "Section Break", 
+   "label": "Package Weight Details", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "description": "The net weight of this package. (calculated automatically as sum of net weight of items)", 
+   "fieldname": "net_weight_pkg", 
+   "fieldtype": "Float", 
+   "label": "Net Weight", 
+   "no_copy": 1, 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "net_weight_uom", 
+   "fieldtype": "Link", 
+   "label": "Net Weight UOM", 
+   "no_copy": 1, 
+   "options": "UOM", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "column_break4", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "description": "The gross weight of the package. Usually net weight + packaging material weight. (for print)", 
+   "fieldname": "gross_weight_pkg", 
+   "fieldtype": "Float", 
+   "label": "Gross Weight", 
+   "no_copy": 1, 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "gross_weight_uom", 
+   "fieldtype": "Link", 
+   "label": "Gross Weight UOM", 
+   "no_copy": 1, 
+   "options": "UOM", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "misc_details", 
+   "fieldtype": "Section Break", 
+   "label": "Misc Details", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "amended_from", 
+   "fieldtype": "Link", 
+   "ignore_restrictions": 1, 
+   "label": "Amended From", 
+   "no_copy": 1, 
+   "options": "Packing Slip", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1
+  }
+ ], 
+ "icon": "icon-suitcase", 
+ "idx": 1, 
+ "is_submittable": 1, 
+ "modified": "2014-01-20 17:48:59", 
+ "modified_by": "Administrator", 
+ "module": "Stock", 
+ "name": "Packing Slip", 
+ "owner": "Administrator", 
+ "permissions": [
+  {
+   "amend": 1, 
+   "cancel": 1, 
+   "create": 1, 
+   "delete": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Material User", 
+   "submit": 1, 
+   "write": 1
+  }, 
+  {
+   "amend": 1, 
+   "cancel": 1, 
+   "create": 1, 
+   "delete": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Sales User", 
+   "submit": 1, 
+   "write": 1
+  }, 
+  {
+   "amend": 1, 
+   "cancel": 1, 
+   "create": 1, 
+   "delete": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Material Master Manager", 
+   "submit": 1, 
+   "write": 1
+  }, 
+  {
+   "amend": 1, 
+   "cancel": 1, 
+   "create": 1, 
+   "delete": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Material Manager", 
+   "submit": 1, 
+   "write": 1
+  }, 
+  {
+   "amend": 1, 
+   "cancel": 1, 
+   "create": 1, 
+   "delete": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Sales Manager", 
+   "submit": 1, 
+   "write": 1
+  }
+ ], 
+ "read_only_onload": 1, 
+ "search_fields": "delivery_note"
+}
\ No newline at end of file
diff --git a/erpnext/stock/doctype/packing_slip_item/packing_slip_item.txt b/erpnext/stock/doctype/packing_slip_item/packing_slip_item.txt
index 54e6991..8844754 100644
--- a/erpnext/stock/doctype/packing_slip_item/packing_slip_item.txt
+++ b/erpnext/stock/doctype/packing_slip_item/packing_slip_item.txt
@@ -1,110 +1,97 @@
-[
- {
-  "creation": "2013-04-08 13:10:16", 
-  "docstatus": 0, 
-  "modified": "2013-12-20 19:23:23", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "autoname": "PSD/.#######", 
-  "doctype": "DocType", 
-  "istable": 1, 
-  "module": "Stock", 
-  "name": "__common__"
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "Packing Slip Item", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Packing Slip Item"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "item_code", 
-  "fieldtype": "Link", 
-  "in_list_view": 1, 
-  "label": "Item Code", 
-  "options": "Item", 
-  "print_width": "100px", 
-  "read_only": 0, 
-  "reqd": 1, 
-  "width": "100px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "item_name", 
-  "fieldtype": "Data", 
-  "in_list_view": 1, 
-  "label": "Item Name", 
-  "print_width": "200px", 
-  "read_only": 1, 
-  "width": "200px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "qty", 
-  "fieldtype": "Float", 
-  "in_list_view": 1, 
-  "label": "Quantity", 
-  "print_width": "100px", 
-  "read_only": 0, 
-  "reqd": 1, 
-  "width": "100px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "stock_uom", 
-  "fieldtype": "Link", 
-  "in_list_view": 0, 
-  "label": "UOM", 
-  "options": "UOM", 
-  "print_width": "100px", 
-  "read_only": 1, 
-  "width": "100px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "net_weight", 
-  "fieldtype": "Float", 
-  "in_list_view": 1, 
-  "label": "Net Weight", 
-  "print_width": "100px", 
-  "read_only": 0, 
-  "width": "100px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "weight_uom", 
-  "fieldtype": "Link", 
-  "in_list_view": 0, 
-  "label": "Weight UOM", 
-  "options": "UOM", 
-  "print_width": "100px", 
-  "read_only": 0, 
-  "width": "100px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "page_break", 
-  "fieldtype": "Check", 
-  "in_list_view": 1, 
-  "label": "Page Break", 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "dn_detail", 
-  "fieldtype": "Data", 
-  "hidden": 1, 
-  "in_list_view": 1, 
-  "label": "DN Detail", 
-  "read_only": 0
- }
-]
\ No newline at end of file
+{
+ "autoname": "PSD/.#######", 
+ "creation": "2013-04-08 13:10:16", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "fields": [
+  {
+   "fieldname": "item_code", 
+   "fieldtype": "Link", 
+   "in_list_view": 1, 
+   "label": "Item Code", 
+   "options": "Item", 
+   "permlevel": 0, 
+   "print_width": "100px", 
+   "read_only": 0, 
+   "reqd": 1, 
+   "width": "100px"
+  }, 
+  {
+   "fieldname": "item_name", 
+   "fieldtype": "Data", 
+   "in_list_view": 1, 
+   "label": "Item Name", 
+   "permlevel": 0, 
+   "print_width": "200px", 
+   "read_only": 1, 
+   "width": "200px"
+  }, 
+  {
+   "fieldname": "qty", 
+   "fieldtype": "Float", 
+   "in_list_view": 1, 
+   "label": "Quantity", 
+   "permlevel": 0, 
+   "print_width": "100px", 
+   "read_only": 0, 
+   "reqd": 1, 
+   "width": "100px"
+  }, 
+  {
+   "fieldname": "stock_uom", 
+   "fieldtype": "Link", 
+   "in_list_view": 0, 
+   "label": "UOM", 
+   "options": "UOM", 
+   "permlevel": 0, 
+   "print_width": "100px", 
+   "read_only": 1, 
+   "width": "100px"
+  }, 
+  {
+   "fieldname": "net_weight", 
+   "fieldtype": "Float", 
+   "in_list_view": 1, 
+   "label": "Net Weight", 
+   "permlevel": 0, 
+   "print_width": "100px", 
+   "read_only": 0, 
+   "width": "100px"
+  }, 
+  {
+   "fieldname": "weight_uom", 
+   "fieldtype": "Link", 
+   "in_list_view": 0, 
+   "label": "Weight UOM", 
+   "options": "UOM", 
+   "permlevel": 0, 
+   "print_width": "100px", 
+   "read_only": 0, 
+   "width": "100px"
+  }, 
+  {
+   "fieldname": "page_break", 
+   "fieldtype": "Check", 
+   "in_list_view": 1, 
+   "label": "Page Break", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "dn_detail", 
+   "fieldtype": "Data", 
+   "hidden": 1, 
+   "in_list_view": 1, 
+   "label": "DN Detail", 
+   "permlevel": 0, 
+   "read_only": 0
+  }
+ ], 
+ "idx": 1, 
+ "istable": 1, 
+ "modified": "2013-12-20 19:23:23", 
+ "modified_by": "Administrator", 
+ "module": "Stock", 
+ "name": "Packing Slip Item", 
+ "owner": "Administrator"
+}
\ No newline at end of file
diff --git a/erpnext/stock/doctype/price_list/price_list.txt b/erpnext/stock/doctype/price_list/price_list.txt
index 253dce7..c22355a 100644
--- a/erpnext/stock/doctype/price_list/price_list.txt
+++ b/erpnext/stock/doctype/price_list/price_list.txt
@@ -1,139 +1,126 @@
-[
- {
-  "creation": "2013-01-25 11:35:09", 
-  "docstatus": 0, 
-  "modified": "2014-01-27 11:11:08", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "allow_attach": 0, 
-  "allow_copy": 0, 
-  "allow_import": 1, 
-  "allow_email": 1, 
-  "allow_print": 1, 
-  "allow_rename": 1, 
-  "autoname": "field:price_list_name", 
-  "description": "Price List Master", 
-  "doctype": "DocType", 
-  "document_type": "Master", 
-  "icon": "icon-tags", 
-  "max_attachments": 1, 
-  "module": "Stock", 
-  "name": "__common__"
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "Price List", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "doctype": "DocPerm", 
-  "name": "__common__", 
-  "parent": "Price List", 
-  "parentfield": "permissions", 
-  "parenttype": "DocType", 
-  "permlevel": 0, 
-  "read": 1, 
-  "report": 1
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Price List"
- }, 
- {
-  "default": "1", 
-  "doctype": "DocField", 
-  "fieldname": "enabled", 
-  "fieldtype": "Check", 
-  "label": "Enabled"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "sb_1", 
-  "fieldtype": "Section Break"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "price_list_name", 
-  "fieldtype": "Data", 
-  "label": "Price List Name", 
-  "oldfieldname": "price_list_name", 
-  "oldfieldtype": "Data", 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "currency", 
-  "fieldtype": "Link", 
-  "in_list_view": 1, 
-  "label": "Currency", 
-  "options": "Currency", 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "buying", 
-  "fieldtype": "Check", 
-  "in_list_view": 1, 
-  "label": "Buying"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "selling", 
-  "fieldtype": "Check", 
-  "in_list_view": 1, 
-  "label": "Selling", 
-  "reqd": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break_3", 
-  "fieldtype": "Column Break"
- }, 
- {
-  "description": "Specify a list of Territories, for which, this Price List is valid", 
-  "doctype": "DocField", 
-  "fieldname": "valid_for_territories", 
-  "fieldtype": "Table", 
-  "label": "Valid for Territories", 
-  "options": "Applicable Territory", 
-  "reqd": 1
- }, 
- {
-  "amend": 0, 
-  "cancel": 0, 
-  "create": 0, 
-  "delete": 0, 
-  "doctype": "DocPerm", 
-  "role": "Sales User", 
-  "submit": 0, 
-  "write": 0
- }, 
- {
-  "amend": 0, 
-  "cancel": 0, 
-  "create": 1, 
-  "delete": 1, 
-  "doctype": "DocPerm", 
-  "role": "Sales Master Manager", 
-  "submit": 0, 
-  "write": 1
- }, 
- {
-  "delete": 0, 
-  "doctype": "DocPerm", 
-  "role": "Purchase User"
- }, 
- {
-  "cancel": 1, 
-  "create": 1, 
-  "delete": 1, 
-  "doctype": "DocPerm", 
-  "role": "Purchase Master Manager", 
-  "write": 1
- }
-]
\ No newline at end of file
+{
+ "allow_attach": 0, 
+ "allow_copy": 0, 
+ "allow_email": 1, 
+ "allow_import": 1, 
+ "allow_print": 1, 
+ "allow_rename": 1, 
+ "autoname": "field:price_list_name", 
+ "creation": "2013-01-25 11:35:09", 
+ "description": "Price List Master", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "document_type": "Master", 
+ "fields": [
+  {
+   "default": "1", 
+   "fieldname": "enabled", 
+   "fieldtype": "Check", 
+   "label": "Enabled", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "sb_1", 
+   "fieldtype": "Section Break", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "price_list_name", 
+   "fieldtype": "Data", 
+   "label": "Price List Name", 
+   "oldfieldname": "price_list_name", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "currency", 
+   "fieldtype": "Link", 
+   "in_list_view": 1, 
+   "label": "Currency", 
+   "options": "Currency", 
+   "permlevel": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "buying", 
+   "fieldtype": "Check", 
+   "in_list_view": 1, 
+   "label": "Buying", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "selling", 
+   "fieldtype": "Check", 
+   "in_list_view": 1, 
+   "label": "Selling", 
+   "permlevel": 0, 
+   "reqd": 0
+  }, 
+  {
+   "fieldname": "column_break_3", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0
+  }, 
+  {
+   "description": "Specify a list of Territories, for which, this Price List is valid", 
+   "fieldname": "valid_for_territories", 
+   "fieldtype": "Table", 
+   "label": "Valid for Territories", 
+   "options": "Applicable Territory", 
+   "permlevel": 0, 
+   "reqd": 1
+  }
+ ], 
+ "icon": "icon-tags", 
+ "idx": 1, 
+ "max_attachments": 1, 
+ "modified": "2014-01-27 11:11:08", 
+ "modified_by": "Administrator", 
+ "module": "Stock", 
+ "name": "Price List", 
+ "owner": "Administrator", 
+ "permissions": [
+  {
+   "amend": 0, 
+   "cancel": 0, 
+   "create": 0, 
+   "delete": 0, 
+   "permlevel": 0, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Sales User", 
+   "submit": 0, 
+   "write": 0
+  }, 
+  {
+   "amend": 0, 
+   "cancel": 0, 
+   "create": 1, 
+   "delete": 1, 
+   "permlevel": 0, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Sales Master Manager", 
+   "submit": 0, 
+   "write": 1
+  }, 
+  {
+   "delete": 0, 
+   "permlevel": 0, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Purchase User"
+  }, 
+  {
+   "cancel": 1, 
+   "create": 1, 
+   "delete": 1, 
+   "permlevel": 0, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Purchase Master Manager", 
+   "write": 1
+  }
+ ]
+}
\ No newline at end of file
diff --git a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.txt b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.txt
index 5b83710..7d81392 100755
--- a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.txt
+++ b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.txt
@@ -1,853 +1,846 @@
-[
- {
-  "creation": "2013-05-21 16:16:39", 
-  "docstatus": 0, 
-  "modified": "2014-02-17 12:01:00", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "allow_attach": 1, 
-  "autoname": "naming_series:", 
-  "doctype": "DocType", 
-  "document_type": "Transaction", 
-  "icon": "icon-truck", 
-  "is_submittable": 1, 
-  "module": "Stock", 
-  "name": "__common__", 
-  "read_only_onload": 1, 
-  "search_fields": "status, posting_date, supplier"
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "Purchase Receipt", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "doctype": "DocPerm", 
-  "email": 1, 
-  "name": "__common__", 
-  "parent": "Purchase Receipt", 
-  "parentfield": "permissions", 
-  "parenttype": "DocType", 
-  "permlevel": 0, 
-  "print": 1, 
-  "read": 1, 
-  "report": 1
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Purchase Receipt"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "supplier_section", 
-  "fieldtype": "Section Break", 
-  "label": "Supplier", 
-  "options": "icon-user"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break0", 
-  "fieldtype": "Column Break", 
-  "oldfieldtype": "Column Break", 
-  "print_width": "50%", 
-  "width": "50%"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "naming_series", 
-  "fieldtype": "Select", 
-  "label": "Series", 
-  "no_copy": 1, 
-  "oldfieldname": "naming_series", 
-  "oldfieldtype": "Select", 
-  "options": "\nGRN", 
-  "print_hide": 1, 
-  "reqd": 1
- }, 
- {
-  "allow_on_submit": 0, 
-  "doctype": "DocField", 
-  "fieldname": "supplier", 
-  "fieldtype": "Link", 
-  "in_filter": 1, 
-  "label": "Supplier", 
-  "oldfieldname": "supplier", 
-  "oldfieldtype": "Link", 
-  "options": "Supplier", 
-  "print_hide": 1, 
-  "print_width": "150px", 
-  "reqd": 1, 
-  "search_index": 1, 
-  "width": "150px"
- }, 
- {
-  "depends_on": "supplier", 
-  "doctype": "DocField", 
-  "fieldname": "supplier_name", 
-  "fieldtype": "Data", 
-  "hidden": 0, 
-  "in_list_view": 1, 
-  "label": "Supplier Name", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "address_display", 
-  "fieldtype": "Small Text", 
-  "hidden": 1, 
-  "label": "Address", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "contact_display", 
-  "fieldtype": "Small Text", 
-  "hidden": 1, 
-  "label": "Contact", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "contact_mobile", 
-  "fieldtype": "Text", 
-  "hidden": 1, 
-  "label": "Mobile No", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "contact_email", 
-  "fieldtype": "Text", 
-  "hidden": 1, 
-  "label": "Contact Email", 
-  "print_hide": 1, 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break1", 
-  "fieldtype": "Column Break", 
-  "oldfieldtype": "Column Break", 
-  "print_width": "50%", 
-  "width": "50%"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "posting_date", 
-  "fieldtype": "Date", 
-  "in_filter": 1, 
-  "label": "Posting Date", 
-  "no_copy": 1, 
-  "oldfieldname": "posting_date", 
-  "oldfieldtype": "Date", 
-  "print_hide": 1, 
-  "print_width": "100px", 
-  "reqd": 1, 
-  "search_index": 1, 
-  "width": "100px"
- }, 
- {
-  "description": "Time at which materials were received", 
-  "doctype": "DocField", 
-  "fieldname": "posting_time", 
-  "fieldtype": "Time", 
-  "in_filter": 0, 
-  "label": "Posting Time", 
-  "no_copy": 1, 
-  "oldfieldname": "posting_time", 
-  "oldfieldtype": "Time", 
-  "print_hide": 1, 
-  "print_width": "100px", 
-  "reqd": 1, 
-  "search_index": 0, 
-  "width": "100px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "challan_no", 
-  "fieldtype": "Data", 
-  "hidden": 1, 
-  "label": "Supplier Shipment No", 
-  "no_copy": 1, 
-  "oldfieldname": "challan_no", 
-  "oldfieldtype": "Data", 
-  "print_hide": 0, 
-  "print_width": "100px", 
-  "reqd": 0, 
-  "width": "100px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "challan_date", 
-  "fieldtype": "Date", 
-  "hidden": 1, 
-  "label": "Supplier Shipment Date", 
-  "no_copy": 1, 
-  "oldfieldname": "challan_date", 
-  "oldfieldtype": "Date", 
-  "print_hide": 0, 
-  "print_width": "100px", 
-  "reqd": 0, 
-  "width": "100px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "currency_price_list", 
-  "fieldtype": "Section Break", 
-  "label": "Currency and Price List", 
-  "options": "icon-tag"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "currency", 
-  "fieldtype": "Link", 
-  "label": "Currency", 
-  "oldfieldname": "currency", 
-  "oldfieldtype": "Select", 
-  "options": "Currency", 
-  "print_hide": 1, 
-  "reqd": 1
- }, 
- {
-  "description": "Rate at which supplier's currency is converted to company's base currency", 
-  "doctype": "DocField", 
-  "fieldname": "conversion_rate", 
-  "fieldtype": "Float", 
-  "label": "Exchange Rate", 
-  "oldfieldname": "conversion_rate", 
-  "oldfieldtype": "Currency", 
-  "print_hide": 1, 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break2", 
-  "fieldtype": "Column Break", 
-  "oldfieldtype": "Column Break", 
-  "print_width": "50%", 
-  "width": "50%"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "buying_price_list", 
-  "fieldtype": "Link", 
-  "label": "Price List", 
-  "options": "Price List", 
-  "print_hide": 1
- }, 
- {
-  "depends_on": "buying_price_list", 
-  "doctype": "DocField", 
-  "fieldname": "price_list_currency", 
-  "fieldtype": "Link", 
-  "hidden": 0, 
-  "label": "Price List Currency", 
-  "options": "Currency", 
-  "print_hide": 1, 
-  "read_only": 1
- }, 
- {
-  "depends_on": "buying_price_list", 
-  "doctype": "DocField", 
-  "fieldname": "plc_conversion_rate", 
-  "fieldtype": "Float", 
-  "label": "Price List Exchange Rate", 
-  "print_hide": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "items", 
-  "fieldtype": "Section Break", 
-  "label": "Items", 
-  "oldfieldtype": "Section Break", 
-  "options": "icon-shopping-cart"
- }, 
- {
-  "allow_on_submit": 1, 
-  "doctype": "DocField", 
-  "fieldname": "purchase_receipt_details", 
-  "fieldtype": "Table", 
-  "label": "Purchase Receipt Items", 
-  "oldfieldname": "purchase_receipt_details", 
-  "oldfieldtype": "Table", 
-  "options": "Purchase Receipt Item", 
-  "print_hide": 0, 
-  "reqd": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "section_break0", 
-  "fieldtype": "Section Break", 
-  "oldfieldtype": "Section Break"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "net_total_import", 
-  "fieldtype": "Currency", 
-  "label": "Net Total", 
-  "oldfieldname": "net_total_import", 
-  "oldfieldtype": "Currency", 
-  "options": "currency", 
-  "print_hide": 0, 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "get_current_stock", 
-  "fieldtype": "Button", 
-  "label": "Get Current Stock", 
-  "oldfieldtype": "Button", 
-  "options": "get_current_stock", 
-  "print_hide": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break_27", 
-  "fieldtype": "Column Break"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "net_total", 
-  "fieldtype": "Currency", 
-  "label": "Net Total (Company Currency)", 
-  "oldfieldname": "net_total", 
-  "oldfieldtype": "Currency", 
-  "options": "Company:company:default_currency", 
-  "print_hide": 1, 
-  "print_width": "150px", 
-  "read_only": 1, 
-  "reqd": 1, 
-  "width": "150px"
- }, 
- {
-  "description": "Add / Edit Taxes and Charges", 
-  "doctype": "DocField", 
-  "fieldname": "taxes", 
-  "fieldtype": "Section Break", 
-  "label": "Taxes and Charges", 
-  "oldfieldtype": "Section Break", 
-  "options": "icon-money"
- }, 
- {
-  "description": "If you have created a standard template in Purchase Taxes and Charges Master, select one and click on the button below.", 
-  "doctype": "DocField", 
-  "fieldname": "taxes_and_charges", 
-  "fieldtype": "Link", 
-  "label": "Taxes and Charges", 
-  "oldfieldname": "purchase_other_charges", 
-  "oldfieldtype": "Link", 
-  "options": "Purchase Taxes and Charges Master", 
-  "print_hide": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "other_charges", 
-  "fieldtype": "Table", 
-  "label": "Purchase Taxes and Charges", 
-  "oldfieldname": "purchase_tax_details", 
-  "oldfieldtype": "Table", 
-  "options": "Purchase Taxes and Charges"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "other_charges_calculation", 
-  "fieldtype": "HTML", 
-  "label": "Taxes and Charges Calculation", 
-  "oldfieldtype": "HTML", 
-  "print_hide": 1
- }, 
- {
-  "description": "Detailed Breakup of the totals", 
-  "doctype": "DocField", 
-  "fieldname": "totals", 
-  "fieldtype": "Section Break", 
-  "label": "Totals", 
-  "oldfieldtype": "Section Break", 
-  "options": "icon-money"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "other_charges_added_import", 
-  "fieldtype": "Currency", 
-  "label": "Taxes and Charges Added", 
-  "oldfieldname": "other_charges_added_import", 
-  "oldfieldtype": "Currency", 
-  "options": "currency", 
-  "print_hide": 1, 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "other_charges_deducted_import", 
-  "fieldtype": "Currency", 
-  "label": "Taxes and Charges Deducted", 
-  "oldfieldname": "other_charges_deducted_import", 
-  "oldfieldtype": "Currency", 
-  "options": "currency", 
-  "print_hide": 1, 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "grand_total_import", 
-  "fieldtype": "Currency", 
-  "label": "Grand Total", 
-  "oldfieldname": "grand_total_import", 
-  "oldfieldtype": "Currency", 
-  "options": "currency", 
-  "print_hide": 0, 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "in_words_import", 
-  "fieldtype": "Data", 
-  "label": "In Words", 
-  "oldfieldname": "in_words_import", 
-  "oldfieldtype": "Data", 
-  "print_hide": 0, 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break3", 
-  "fieldtype": "Column Break", 
-  "print_width": "50%", 
-  "width": "50%"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "other_charges_added", 
-  "fieldtype": "Currency", 
-  "label": "Taxes and Charges Added (Company Currency)", 
-  "oldfieldname": "other_charges_added", 
-  "oldfieldtype": "Currency", 
-  "options": "Company:company:default_currency", 
-  "print_hide": 1, 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "other_charges_deducted", 
-  "fieldtype": "Currency", 
-  "label": "Taxes and Charges Deducted (Company Currency)", 
-  "oldfieldname": "other_charges_deducted", 
-  "oldfieldtype": "Currency", 
-  "options": "Company:company:default_currency", 
-  "print_hide": 1, 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "total_tax", 
-  "fieldtype": "Currency", 
-  "label": "Total Tax (Company Currency)", 
-  "oldfieldname": "total_tax", 
-  "oldfieldtype": "Currency", 
-  "options": "Company:company:default_currency", 
-  "print_hide": 1, 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "grand_total", 
-  "fieldtype": "Currency", 
-  "label": "Grand Total (Company Currency)", 
-  "oldfieldname": "grand_total", 
-  "oldfieldtype": "Currency", 
-  "options": "Company:company:default_currency", 
-  "print_hide": 1, 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "rounded_total", 
-  "fieldtype": "Currency", 
-  "label": "Rounded Total (Company Currency)", 
-  "oldfieldname": "rounded_total", 
-  "oldfieldtype": "Currency", 
-  "options": "Company:company:default_currency", 
-  "print_hide": 1, 
-  "read_only": 1
- }, 
- {
-  "description": "In Words will be visible once you save the Purchase Receipt.", 
-  "doctype": "DocField", 
-  "fieldname": "in_words", 
-  "fieldtype": "Data", 
-  "label": "In Words (Company Currency)", 
-  "oldfieldname": "in_words", 
-  "oldfieldtype": "Data", 
-  "print_hide": 1, 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "terms_section_break", 
-  "fieldtype": "Section Break", 
-  "label": "Terms and Conditions", 
-  "oldfieldtype": "Section Break", 
-  "options": "icon-legal"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "tc_name", 
-  "fieldtype": "Link", 
-  "label": "Terms", 
-  "oldfieldname": "tc_name", 
-  "oldfieldtype": "Link", 
-  "options": "Terms and Conditions", 
-  "print_hide": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "terms", 
-  "fieldtype": "Text Editor", 
-  "label": "Terms and Conditions1", 
-  "oldfieldname": "terms", 
-  "oldfieldtype": "Text Editor"
- }, 
- {
-  "depends_on": "supplier", 
-  "doctype": "DocField", 
-  "fieldname": "contact_section", 
-  "fieldtype": "Section Break", 
-  "label": "Contact Info", 
-  "options": "icon-bullhorn"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "supplier_address", 
-  "fieldtype": "Link", 
-  "label": "Supplier Address", 
-  "options": "Address", 
-  "print_hide": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break_57", 
-  "fieldtype": "Column Break"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "contact_person", 
-  "fieldtype": "Link", 
-  "label": "Contact Person", 
-  "options": "Contact", 
-  "print_hide": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "more_info", 
-  "fieldtype": "Section Break", 
-  "label": "More Info", 
-  "oldfieldtype": "Section Break", 
-  "options": "icon-file-text"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "status", 
-  "fieldtype": "Select", 
-  "in_filter": 1, 
-  "label": "Status", 
-  "no_copy": 1, 
-  "oldfieldname": "status", 
-  "oldfieldtype": "Select", 
-  "options": "\nDraft\nSubmitted\nCancelled", 
-  "print_hide": 1, 
-  "print_width": "150px", 
-  "read_only": 1, 
-  "reqd": 1, 
-  "search_index": 1, 
-  "width": "150px"
- }, 
- {
-  "default": "No", 
-  "description": "Select \"Yes\" for sub - contracting items", 
-  "doctype": "DocField", 
-  "fieldname": "is_subcontracted", 
-  "fieldtype": "Select", 
-  "label": "Is Subcontracted", 
-  "oldfieldname": "is_subcontracted", 
-  "oldfieldtype": "Select", 
-  "options": "\nYes\nNo", 
-  "print_hide": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "amended_from", 
-  "fieldtype": "Data", 
-  "hidden": 1, 
-  "ignore_restrictions": 1, 
-  "label": "Amended From", 
-  "no_copy": 1, 
-  "oldfieldname": "amended_from", 
-  "oldfieldtype": "Data", 
-  "options": "Purchase Receipt", 
-  "print_hide": 1, 
-  "print_width": "150px", 
-  "read_only": 1, 
-  "width": "150px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "range", 
-  "fieldtype": "Data", 
-  "hidden": 1, 
-  "label": "Range", 
-  "oldfieldname": "range", 
-  "oldfieldtype": "Data", 
-  "print_hide": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "bill_no", 
-  "fieldtype": "Data", 
-  "hidden": 1, 
-  "label": "Bill No", 
-  "oldfieldname": "bill_no", 
-  "oldfieldtype": "Data", 
-  "print_hide": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "bill_date", 
-  "fieldtype": "Date", 
-  "hidden": 1, 
-  "label": "Bill Date", 
-  "oldfieldname": "bill_date", 
-  "oldfieldtype": "Date", 
-  "print_hide": 1
- }, 
- {
-  "allow_on_submit": 1, 
-  "doctype": "DocField", 
-  "fieldname": "letter_head", 
-  "fieldtype": "Select", 
-  "label": "Letter Head", 
-  "options": "link:Letter Head", 
-  "print_hide": 1
- }, 
- {
-  "allow_on_submit": 1, 
-  "doctype": "DocField", 
-  "fieldname": "select_print_heading", 
-  "fieldtype": "Link", 
-  "label": "Print Heading", 
-  "no_copy": 1, 
-  "oldfieldname": "select_print_heading", 
-  "oldfieldtype": "Link", 
-  "options": "Print Heading", 
-  "print_hide": 1, 
-  "report_hide": 1
- }, 
- {
-  "description": "Select the relevant company name if you have multiple companies", 
-  "doctype": "DocField", 
-  "fieldname": "company", 
-  "fieldtype": "Link", 
-  "hidden": 0, 
-  "in_filter": 1, 
-  "label": "Company", 
-  "no_copy": 0, 
-  "oldfieldname": "company", 
-  "oldfieldtype": "Link", 
-  "options": "Company", 
-  "print_hide": 1, 
-  "print_width": "150px", 
-  "reqd": 1, 
-  "search_index": 1, 
-  "width": "150px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "fiscal_year", 
-  "fieldtype": "Select", 
-  "in_filter": 1, 
-  "label": "Fiscal Year", 
-  "oldfieldname": "fiscal_year", 
-  "oldfieldtype": "Select", 
-  "options": "link:Fiscal Year", 
-  "print_hide": 1, 
-  "print_width": "150px", 
-  "reqd": 1, 
-  "search_index": 1, 
-  "width": "150px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break4", 
-  "fieldtype": "Column Break", 
-  "oldfieldtype": "Column Break", 
-  "print_hide": 1, 
-  "print_width": "50%", 
-  "width": "50%"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "other_details", 
-  "fieldtype": "HTML", 
-  "hidden": 1, 
-  "label": "Other Details", 
-  "oldfieldtype": "HTML", 
-  "options": "<div class='columnHeading'>Other Details</div>", 
-  "print_hide": 1, 
-  "print_width": "30%", 
-  "reqd": 0, 
-  "width": "30%"
- }, 
- {
-  "description": "Warehouse where you are maintaining stock of rejected items", 
-  "doctype": "DocField", 
-  "fieldname": "rejected_warehouse", 
-  "fieldtype": "Link", 
-  "label": "Rejected Warehouse", 
-  "no_copy": 1, 
-  "oldfieldname": "rejected_warehouse", 
-  "oldfieldtype": "Link", 
-  "options": "Warehouse", 
-  "print_hide": 1, 
-  "reqd": 0
- }, 
- {
-  "description": "Supplier warehouse where you have issued raw materials for sub - contracting", 
-  "doctype": "DocField", 
-  "fieldname": "supplier_warehouse", 
-  "fieldtype": "Link", 
-  "label": "Supplier Warehouse", 
-  "no_copy": 1, 
-  "oldfieldname": "supplier_warehouse", 
-  "oldfieldtype": "Link", 
-  "options": "Warehouse", 
-  "print_hide": 1, 
-  "print_width": "50px", 
-  "width": "50px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "instructions", 
-  "fieldtype": "Small Text", 
-  "label": "Instructions", 
-  "oldfieldname": "instructions", 
-  "oldfieldtype": "Text"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "remarks", 
-  "fieldtype": "Small Text", 
-  "label": "Remarks", 
-  "print_hide": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "transporter_info", 
-  "fieldtype": "Section Break", 
-  "label": "Transporter Info", 
-  "options": "icon-truck"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "transporter_name", 
-  "fieldtype": "Data", 
-  "label": "Transporter Name", 
-  "oldfieldname": "transporter_name", 
-  "oldfieldtype": "Data"
- }, 
- {
-  "description": "Transporter lorry number", 
-  "doctype": "DocField", 
-  "fieldname": "lr_no", 
-  "fieldtype": "Data", 
-  "label": "LR No", 
-  "no_copy": 1, 
-  "oldfieldname": "lr_no", 
-  "oldfieldtype": "Data", 
-  "print_hide": 0, 
-  "print_width": "100px", 
-  "width": "100px"
- }, 
- {
-  "description": "Date on which lorry started from supplier warehouse", 
-  "doctype": "DocField", 
-  "fieldname": "lr_date", 
-  "fieldtype": "Date", 
-  "label": "LR Date", 
-  "no_copy": 1, 
-  "oldfieldname": "lr_date", 
-  "oldfieldtype": "Date", 
-  "print_hide": 0, 
-  "print_width": "100px", 
-  "width": "100px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break5", 
-  "fieldtype": "Column Break", 
-  "print_width": "50%", 
-  "width": "50%"
- }, 
- {
-  "description": "Following table will show values if items are sub - contracted. These values will be fetched from the master of \"Bill of Materials\" of sub - contracted items.", 
-  "doctype": "DocField", 
-  "fieldname": "raw_material_details", 
-  "fieldtype": "Section Break", 
-  "label": "Raw Materials Supplied", 
-  "oldfieldtype": "Section Break", 
-  "options": "icon-table", 
-  "print_hide": 1, 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "pr_raw_material_details", 
-  "fieldtype": "Table", 
-  "label": "Purchase Receipt Item Supplieds", 
-  "no_copy": 1, 
-  "oldfieldname": "pr_raw_material_details", 
-  "oldfieldtype": "Table", 
-  "options": "Purchase Receipt Item Supplied", 
-  "print_hide": 1, 
-  "read_only": 1
- }, 
- {
-  "amend": 1, 
-  "cancel": 1, 
-  "create": 1, 
-  "delete": 1, 
-  "doctype": "DocPerm", 
-  "role": "Material Manager", 
-  "submit": 1, 
-  "write": 1
- }, 
- {
-  "amend": 1, 
-  "cancel": 1, 
-  "create": 1, 
-  "delete": 1, 
-  "doctype": "DocPerm", 
-  "role": "Material User", 
-  "submit": 1, 
-  "write": 1
- }, 
- {
-  "amend": 1, 
-  "cancel": 1, 
-  "create": 1, 
-  "delete": 1, 
-  "doctype": "DocPerm", 
-  "role": "Purchase User", 
-  "submit": 1, 
-  "write": 1
- }, 
- {
-  "cancel": 0, 
-  "delete": 0, 
-  "doctype": "DocPerm", 
-  "role": "Supplier"
- }
-]
+{
+ "allow_attach": 1, 
+ "autoname": "naming_series:", 
+ "creation": "2013-05-21 16:16:39", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "document_type": "Transaction", 
+ "fields": [
+  {
+   "fieldname": "supplier_section", 
+   "fieldtype": "Section Break", 
+   "label": "Supplier", 
+   "options": "icon-user", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "column_break0", 
+   "fieldtype": "Column Break", 
+   "oldfieldtype": "Column Break", 
+   "permlevel": 0, 
+   "print_width": "50%", 
+   "width": "50%"
+  }, 
+  {
+   "fieldname": "naming_series", 
+   "fieldtype": "Select", 
+   "label": "Series", 
+   "no_copy": 1, 
+   "oldfieldname": "naming_series", 
+   "oldfieldtype": "Select", 
+   "options": "\nGRN", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "reqd": 1
+  }, 
+  {
+   "allow_on_submit": 0, 
+   "fieldname": "supplier", 
+   "fieldtype": "Link", 
+   "in_filter": 1, 
+   "label": "Supplier", 
+   "oldfieldname": "supplier", 
+   "oldfieldtype": "Link", 
+   "options": "Supplier", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "print_width": "150px", 
+   "reqd": 1, 
+   "search_index": 1, 
+   "width": "150px"
+  }, 
+  {
+   "depends_on": "supplier", 
+   "fieldname": "supplier_name", 
+   "fieldtype": "Data", 
+   "hidden": 0, 
+   "in_list_view": 1, 
+   "label": "Supplier Name", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "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, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "contact_mobile", 
+   "fieldtype": "Text", 
+   "hidden": 1, 
+   "label": "Mobile No", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "contact_email", 
+   "fieldtype": "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_width": "50%", 
+   "width": "50%"
+  }, 
+  {
+   "fieldname": "posting_date", 
+   "fieldtype": "Date", 
+   "in_filter": 1, 
+   "label": "Posting Date", 
+   "no_copy": 1, 
+   "oldfieldname": "posting_date", 
+   "oldfieldtype": "Date", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "print_width": "100px", 
+   "reqd": 1, 
+   "search_index": 1, 
+   "width": "100px"
+  }, 
+  {
+   "description": "Time at which materials were received", 
+   "fieldname": "posting_time", 
+   "fieldtype": "Time", 
+   "in_filter": 0, 
+   "label": "Posting Time", 
+   "no_copy": 1, 
+   "oldfieldname": "posting_time", 
+   "oldfieldtype": "Time", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "print_width": "100px", 
+   "reqd": 1, 
+   "search_index": 0, 
+   "width": "100px"
+  }, 
+  {
+   "fieldname": "challan_no", 
+   "fieldtype": "Data", 
+   "hidden": 1, 
+   "label": "Supplier Shipment No", 
+   "no_copy": 1, 
+   "oldfieldname": "challan_no", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "print_hide": 0, 
+   "print_width": "100px", 
+   "reqd": 0, 
+   "width": "100px"
+  }, 
+  {
+   "fieldname": "challan_date", 
+   "fieldtype": "Date", 
+   "hidden": 1, 
+   "label": "Supplier Shipment Date", 
+   "no_copy": 1, 
+   "oldfieldname": "challan_date", 
+   "oldfieldtype": "Date", 
+   "permlevel": 0, 
+   "print_hide": 0, 
+   "print_width": "100px", 
+   "reqd": 0, 
+   "width": "100px"
+  }, 
+  {
+   "fieldname": "currency_price_list", 
+   "fieldtype": "Section Break", 
+   "label": "Currency and Price List", 
+   "options": "icon-tag", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "currency", 
+   "fieldtype": "Link", 
+   "label": "Currency", 
+   "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", 
+   "label": "Exchange Rate", 
+   "oldfieldname": "conversion_rate", 
+   "oldfieldtype": "Currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "column_break2", 
+   "fieldtype": "Column Break", 
+   "oldfieldtype": "Column Break", 
+   "permlevel": 0, 
+   "print_width": "50%", 
+   "width": "50%"
+  }, 
+  {
+   "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", 
+   "hidden": 0, 
+   "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, 
+   "print_hide": 1
+  }, 
+  {
+   "fieldname": "items", 
+   "fieldtype": "Section Break", 
+   "label": "Items", 
+   "oldfieldtype": "Section Break", 
+   "options": "icon-shopping-cart", 
+   "permlevel": 0
+  }, 
+  {
+   "allow_on_submit": 1, 
+   "fieldname": "purchase_receipt_details", 
+   "fieldtype": "Table", 
+   "label": "Purchase Receipt Items", 
+   "oldfieldname": "purchase_receipt_details", 
+   "oldfieldtype": "Table", 
+   "options": "Purchase Receipt Item", 
+   "permlevel": 0, 
+   "print_hide": 0, 
+   "reqd": 0
+  }, 
+  {
+   "fieldname": "section_break0", 
+   "fieldtype": "Section Break", 
+   "oldfieldtype": "Section Break", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "net_total_import", 
+   "fieldtype": "Currency", 
+   "label": "Net Total", 
+   "oldfieldname": "net_total_import", 
+   "oldfieldtype": "Currency", 
+   "options": "currency", 
+   "permlevel": 0, 
+   "print_hide": 0, 
+   "read_only": 1
+  }, 
+  {
+   "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": "net_total", 
+   "fieldtype": "Currency", 
+   "label": "Net Total (Company Currency)", 
+   "oldfieldname": "net_total", 
+   "oldfieldtype": "Currency", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "print_width": "150px", 
+   "read_only": 1, 
+   "reqd": 1, 
+   "width": "150px"
+  }, 
+  {
+   "description": "Add / Edit Taxes and Charges", 
+   "fieldname": "taxes", 
+   "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", 
+   "oldfieldname": "purchase_other_charges", 
+   "oldfieldtype": "Link", 
+   "options": "Purchase Taxes and Charges Master", 
+   "permlevel": 0, 
+   "print_hide": 1
+  }, 
+  {
+   "fieldname": "other_charges", 
+   "fieldtype": "Table", 
+   "label": "Purchase Taxes and Charges", 
+   "oldfieldname": "purchase_tax_details", 
+   "oldfieldtype": "Table", 
+   "options": "Purchase Taxes and Charges", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "other_charges_calculation", 
+   "fieldtype": "HTML", 
+   "label": "Taxes and Charges Calculation", 
+   "oldfieldtype": "HTML", 
+   "permlevel": 0, 
+   "print_hide": 1
+  }, 
+  {
+   "description": "Detailed Breakup of the totals", 
+   "fieldname": "totals", 
+   "fieldtype": "Section Break", 
+   "label": "Totals", 
+   "oldfieldtype": "Section Break", 
+   "options": "icon-money", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "other_charges_added_import", 
+   "fieldtype": "Currency", 
+   "label": "Taxes and Charges Added", 
+   "oldfieldname": "other_charges_added_import", 
+   "oldfieldtype": "Currency", 
+   "options": "currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "other_charges_deducted_import", 
+   "fieldtype": "Currency", 
+   "label": "Taxes and Charges Deducted", 
+   "oldfieldname": "other_charges_deducted_import", 
+   "oldfieldtype": "Currency", 
+   "options": "currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "grand_total_import", 
+   "fieldtype": "Currency", 
+   "label": "Grand Total", 
+   "oldfieldname": "grand_total_import", 
+   "oldfieldtype": "Currency", 
+   "options": "currency", 
+   "permlevel": 0, 
+   "print_hide": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "in_words_import", 
+   "fieldtype": "Data", 
+   "label": "In Words", 
+   "oldfieldname": "in_words_import", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "print_hide": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "column_break3", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0, 
+   "print_width": "50%", 
+   "width": "50%"
+  }, 
+  {
+   "fieldname": "other_charges_added", 
+   "fieldtype": "Currency", 
+   "label": "Taxes and Charges Added (Company Currency)", 
+   "oldfieldname": "other_charges_added", 
+   "oldfieldtype": "Currency", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "other_charges_deducted", 
+   "fieldtype": "Currency", 
+   "label": "Taxes and Charges Deducted (Company Currency)", 
+   "oldfieldname": "other_charges_deducted", 
+   "oldfieldtype": "Currency", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "total_tax", 
+   "fieldtype": "Currency", 
+   "label": "Total Tax (Company Currency)", 
+   "oldfieldname": "total_tax", 
+   "oldfieldtype": "Currency", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "grand_total", 
+   "fieldtype": "Currency", 
+   "label": "Grand Total (Company Currency)", 
+   "oldfieldname": "grand_total", 
+   "oldfieldtype": "Currency", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "rounded_total", 
+   "fieldtype": "Currency", 
+   "label": "Rounded Total (Company Currency)", 
+   "oldfieldname": "rounded_total", 
+   "oldfieldtype": "Currency", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1
+  }, 
+  {
+   "description": "In Words will be visible once you save the Purchase Receipt.", 
+   "fieldname": "in_words", 
+   "fieldtype": "Data", 
+   "label": "In Words (Company Currency)", 
+   "oldfieldname": "in_words", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "terms_section_break", 
+   "fieldtype": "Section Break", 
+   "label": "Terms and Conditions", 
+   "oldfieldtype": "Section Break", 
+   "options": "icon-legal", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "tc_name", 
+   "fieldtype": "Link", 
+   "label": "Terms", 
+   "oldfieldname": "tc_name", 
+   "oldfieldtype": "Link", 
+   "options": "Terms and Conditions", 
+   "permlevel": 0, 
+   "print_hide": 1
+  }, 
+  {
+   "fieldname": "terms", 
+   "fieldtype": "Text Editor", 
+   "label": "Terms and Conditions1", 
+   "oldfieldname": "terms", 
+   "oldfieldtype": "Text Editor", 
+   "permlevel": 0
+  }, 
+  {
+   "depends_on": "supplier", 
+   "fieldname": "contact_section", 
+   "fieldtype": "Section Break", 
+   "label": "Contact Info", 
+   "options": "icon-bullhorn", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "supplier_address", 
+   "fieldtype": "Link", 
+   "label": "Supplier Address", 
+   "options": "Address", 
+   "permlevel": 0, 
+   "print_hide": 1
+  }, 
+  {
+   "fieldname": "column_break_57", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "contact_person", 
+   "fieldtype": "Link", 
+   "label": "Contact Person", 
+   "options": "Contact", 
+   "permlevel": 0, 
+   "print_hide": 1
+  }, 
+  {
+   "fieldname": "more_info", 
+   "fieldtype": "Section Break", 
+   "label": "More Info", 
+   "oldfieldtype": "Section Break", 
+   "options": "icon-file-text", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "status", 
+   "fieldtype": "Select", 
+   "in_filter": 1, 
+   "label": "Status", 
+   "no_copy": 1, 
+   "oldfieldname": "status", 
+   "oldfieldtype": "Select", 
+   "options": "\nDraft\nSubmitted\nCancelled", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "print_width": "150px", 
+   "read_only": 1, 
+   "reqd": 1, 
+   "search_index": 1, 
+   "width": "150px"
+  }, 
+  {
+   "default": "No", 
+   "description": "Select \"Yes\" for sub - contracting items", 
+   "fieldname": "is_subcontracted", 
+   "fieldtype": "Select", 
+   "label": "Is Subcontracted", 
+   "oldfieldname": "is_subcontracted", 
+   "oldfieldtype": "Select", 
+   "options": "\nYes\nNo", 
+   "permlevel": 0, 
+   "print_hide": 1
+  }, 
+  {
+   "fieldname": "amended_from", 
+   "fieldtype": "Data", 
+   "hidden": 1, 
+   "ignore_restrictions": 1, 
+   "label": "Amended From", 
+   "no_copy": 1, 
+   "oldfieldname": "amended_from", 
+   "oldfieldtype": "Data", 
+   "options": "Purchase Receipt", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "print_width": "150px", 
+   "read_only": 1, 
+   "width": "150px"
+  }, 
+  {
+   "fieldname": "range", 
+   "fieldtype": "Data", 
+   "hidden": 1, 
+   "label": "Range", 
+   "oldfieldname": "range", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "print_hide": 1
+  }, 
+  {
+   "fieldname": "bill_no", 
+   "fieldtype": "Data", 
+   "hidden": 1, 
+   "label": "Bill No", 
+   "oldfieldname": "bill_no", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "print_hide": 1
+  }, 
+  {
+   "fieldname": "bill_date", 
+   "fieldtype": "Date", 
+   "hidden": 1, 
+   "label": "Bill Date", 
+   "oldfieldname": "bill_date", 
+   "oldfieldtype": "Date", 
+   "permlevel": 0, 
+   "print_hide": 1
+  }, 
+  {
+   "allow_on_submit": 1, 
+   "fieldname": "letter_head", 
+   "fieldtype": "Select", 
+   "label": "Letter Head", 
+   "options": "link:Letter Head", 
+   "permlevel": 0, 
+   "print_hide": 1
+  }, 
+  {
+   "allow_on_submit": 1, 
+   "fieldname": "select_print_heading", 
+   "fieldtype": "Link", 
+   "label": "Print Heading", 
+   "no_copy": 1, 
+   "oldfieldname": "select_print_heading", 
+   "oldfieldtype": "Link", 
+   "options": "Print Heading", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "report_hide": 1
+  }, 
+  {
+   "description": "Select the relevant company name if you have multiple companies", 
+   "fieldname": "company", 
+   "fieldtype": "Link", 
+   "hidden": 0, 
+   "in_filter": 1, 
+   "label": "Company", 
+   "no_copy": 0, 
+   "oldfieldname": "company", 
+   "oldfieldtype": "Link", 
+   "options": "Company", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "print_width": "150px", 
+   "reqd": 1, 
+   "search_index": 1, 
+   "width": "150px"
+  }, 
+  {
+   "fieldname": "fiscal_year", 
+   "fieldtype": "Select", 
+   "in_filter": 1, 
+   "label": "Fiscal Year", 
+   "oldfieldname": "fiscal_year", 
+   "oldfieldtype": "Select", 
+   "options": "link:Fiscal Year", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "print_width": "150px", 
+   "reqd": 1, 
+   "search_index": 1, 
+   "width": "150px"
+  }, 
+  {
+   "fieldname": "column_break4", 
+   "fieldtype": "Column Break", 
+   "oldfieldtype": "Column Break", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "print_width": "50%", 
+   "width": "50%"
+  }, 
+  {
+   "fieldname": "other_details", 
+   "fieldtype": "HTML", 
+   "hidden": 1, 
+   "label": "Other Details", 
+   "oldfieldtype": "HTML", 
+   "options": "<div class='columnHeading'>Other Details</div>", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "print_width": "30%", 
+   "reqd": 0, 
+   "width": "30%"
+  }, 
+  {
+   "description": "Warehouse where you are maintaining stock of rejected items", 
+   "fieldname": "rejected_warehouse", 
+   "fieldtype": "Link", 
+   "label": "Rejected Warehouse", 
+   "no_copy": 1, 
+   "oldfieldname": "rejected_warehouse", 
+   "oldfieldtype": "Link", 
+   "options": "Warehouse", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "reqd": 0
+  }, 
+  {
+   "description": "Supplier warehouse where you have issued raw materials for sub - contracting", 
+   "fieldname": "supplier_warehouse", 
+   "fieldtype": "Link", 
+   "label": "Supplier Warehouse", 
+   "no_copy": 1, 
+   "oldfieldname": "supplier_warehouse", 
+   "oldfieldtype": "Link", 
+   "options": "Warehouse", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "print_width": "50px", 
+   "width": "50px"
+  }, 
+  {
+   "fieldname": "instructions", 
+   "fieldtype": "Small Text", 
+   "label": "Instructions", 
+   "oldfieldname": "instructions", 
+   "oldfieldtype": "Text", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "remarks", 
+   "fieldtype": "Small Text", 
+   "label": "Remarks", 
+   "permlevel": 0, 
+   "print_hide": 1
+  }, 
+  {
+   "fieldname": "transporter_info", 
+   "fieldtype": "Section Break", 
+   "label": "Transporter Info", 
+   "options": "icon-truck", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "transporter_name", 
+   "fieldtype": "Data", 
+   "label": "Transporter Name", 
+   "oldfieldname": "transporter_name", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0
+  }, 
+  {
+   "description": "Transporter lorry number", 
+   "fieldname": "lr_no", 
+   "fieldtype": "Data", 
+   "label": "LR No", 
+   "no_copy": 1, 
+   "oldfieldname": "lr_no", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "print_hide": 0, 
+   "print_width": "100px", 
+   "width": "100px"
+  }, 
+  {
+   "description": "Date on which lorry started from supplier warehouse", 
+   "fieldname": "lr_date", 
+   "fieldtype": "Date", 
+   "label": "LR Date", 
+   "no_copy": 1, 
+   "oldfieldname": "lr_date", 
+   "oldfieldtype": "Date", 
+   "permlevel": 0, 
+   "print_hide": 0, 
+   "print_width": "100px", 
+   "width": "100px"
+  }, 
+  {
+   "fieldname": "column_break5", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0, 
+   "print_width": "50%", 
+   "width": "50%"
+  }, 
+  {
+   "description": "Following table will show values if items are sub - contracted. These values will be fetched from the master of \"Bill of Materials\" of sub - contracted items.", 
+   "fieldname": "raw_material_details", 
+   "fieldtype": "Section Break", 
+   "label": "Raw Materials Supplied", 
+   "oldfieldtype": "Section Break", 
+   "options": "icon-table", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "pr_raw_material_details", 
+   "fieldtype": "Table", 
+   "label": "Purchase Receipt Item Supplieds", 
+   "no_copy": 1, 
+   "oldfieldname": "pr_raw_material_details", 
+   "oldfieldtype": "Table", 
+   "options": "Purchase Receipt Item Supplied", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1
+  }
+ ], 
+ "icon": "icon-truck", 
+ "idx": 1, 
+ "is_submittable": 1, 
+ "modified": "2014-02-17 12:01:00", 
+ "modified_by": "Administrator", 
+ "module": "Stock", 
+ "name": "Purchase Receipt", 
+ "owner": "Administrator", 
+ "permissions": [
+  {
+   "amend": 1, 
+   "cancel": 1, 
+   "create": 1, 
+   "delete": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Material Manager", 
+   "submit": 1, 
+   "write": 1
+  }, 
+  {
+   "amend": 1, 
+   "cancel": 1, 
+   "create": 1, 
+   "delete": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Material User", 
+   "submit": 1, 
+   "write": 1
+  }, 
+  {
+   "amend": 1, 
+   "cancel": 1, 
+   "create": 1, 
+   "delete": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Purchase User", 
+   "submit": 1, 
+   "write": 1
+  }, 
+  {
+   "cancel": 0, 
+   "delete": 0, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Supplier"
+  }
+ ], 
+ "read_only_onload": 1, 
+ "search_fields": "status, posting_date, supplier"
+}
\ No newline at end of file
diff --git a/erpnext/stock/doctype/purchase_receipt_item/purchase_receipt_item.txt b/erpnext/stock/doctype/purchase_receipt_item/purchase_receipt_item.txt
index cde7911..f2c69e9 100755
--- a/erpnext/stock/doctype/purchase_receipt_item/purchase_receipt_item.txt
+++ b/erpnext/stock/doctype/purchase_receipt_item/purchase_receipt_item.txt
@@ -1,574 +1,561 @@
-[
- {
-  "creation": "2013-05-24 19:29:10", 
-  "docstatus": 0, 
-  "modified": "2014-02-28 11:27:09", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "autoname": "GRND/.#######", 
-  "doctype": "DocType", 
-  "istable": 1, 
-  "module": "Stock", 
-  "name": "__common__"
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "Purchase Receipt Item", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Purchase Receipt Item"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "item_code", 
-  "fieldtype": "Link", 
-  "in_filter": 1, 
-  "in_list_view": 1, 
-  "label": "Item Code", 
-  "oldfieldname": "item_code", 
-  "oldfieldtype": "Link", 
-  "options": "Item", 
-  "print_width": "100px", 
-  "read_only": 0, 
-  "reqd": 1, 
-  "search_index": 1, 
-  "width": "100px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "item_name", 
-  "fieldtype": "Data", 
-  "in_filter": 0, 
-  "in_list_view": 0, 
-  "label": "Item Name", 
-  "oldfieldname": "item_name", 
-  "oldfieldtype": "Data", 
-  "print_hide": 1, 
-  "read_only": 0, 
-  "reqd": 1, 
-  "search_index": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "col_break1", 
-  "fieldtype": "Column Break"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "description", 
-  "fieldtype": "Text", 
-  "in_list_view": 1, 
-  "label": "Description", 
-  "oldfieldname": "description", 
-  "oldfieldtype": "Text", 
-  "print_width": "300px", 
-  "read_only": 0, 
-  "reqd": 1, 
-  "width": "300px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "received_and_accepted", 
-  "fieldtype": "Section Break", 
-  "in_list_view": 0, 
-  "label": "Received and Accepted"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "received_qty", 
-  "fieldtype": "Float", 
-  "in_list_view": 0, 
-  "label": "Recd Quantity", 
-  "oldfieldname": "received_qty", 
-  "oldfieldtype": "Currency", 
-  "print_hide": 1, 
-  "print_width": "100px", 
-  "read_only": 0, 
-  "reqd": 1, 
-  "width": "100px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "qty", 
-  "fieldtype": "Float", 
-  "in_list_view": 1, 
-  "label": "Accepted Quantity", 
-  "oldfieldname": "qty", 
-  "oldfieldtype": "Currency", 
-  "print_width": "100px", 
-  "read_only": 0, 
-  "width": "100px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "rejected_qty", 
-  "fieldtype": "Float", 
-  "in_filter": 0, 
-  "in_list_view": 0, 
-  "label": "Rejected Quantity", 
-  "oldfieldname": "rejected_qty", 
-  "oldfieldtype": "Currency", 
-  "print_hide": 1, 
-  "print_width": "100px", 
-  "read_only": 0, 
-  "search_index": 0, 
-  "width": "100px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "col_break2", 
-  "fieldtype": "Column Break"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "uom", 
-  "fieldtype": "Link", 
-  "in_list_view": 0, 
-  "label": "UOM", 
-  "oldfieldname": "uom", 
-  "oldfieldtype": "Link", 
-  "options": "UOM", 
-  "print_hide": 1, 
-  "print_width": "100px", 
-  "read_only": 0, 
-  "reqd": 1, 
-  "width": "100px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "stock_uom", 
-  "fieldtype": "Link", 
-  "in_list_view": 0, 
-  "label": "Stock UOM", 
-  "oldfieldname": "stock_uom", 
-  "oldfieldtype": "Data", 
-  "options": "UOM", 
-  "print_hide": 1, 
-  "print_width": "100px", 
-  "read_only": 1, 
-  "reqd": 1, 
-  "width": "100px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "conversion_factor", 
-  "fieldtype": "Float", 
-  "in_list_view": 0, 
-  "label": "Conversion Factor", 
-  "oldfieldname": "conversion_factor", 
-  "oldfieldtype": "Currency", 
-  "print_hide": 1, 
-  "print_width": "100px", 
-  "read_only": 0, 
-  "reqd": 1, 
-  "width": "100px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "rate_and_amount", 
-  "fieldtype": "Section Break", 
-  "in_list_view": 0, 
-  "label": "Rate and Amount"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "price_list_rate", 
-  "fieldtype": "Currency", 
-  "in_list_view": 0, 
-  "label": "Price List Rate", 
-  "options": "currency", 
-  "print_hide": 1, 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "discount_percentage", 
-  "fieldtype": "Float", 
-  "in_list_view": 0, 
-  "label": "Discount  %", 
-  "print_hide": 1, 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "col_break3", 
-  "fieldtype": "Column Break"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "base_price_list_rate", 
-  "fieldtype": "Currency", 
-  "in_list_view": 0, 
-  "label": "Price List Rate (Company Currency)", 
-  "options": "Company:company:default_currency", 
-  "print_hide": 1, 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "sec_break1", 
-  "fieldtype": "Section Break"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "rate", 
-  "fieldtype": "Currency", 
-  "in_list_view": 1, 
-  "label": "Rate", 
-  "oldfieldname": "import_rate", 
-  "oldfieldtype": "Currency", 
-  "options": "currency", 
-  "print_hide": 0, 
-  "print_width": "100px", 
-  "read_only": 0, 
-  "width": "100px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "amount", 
-  "fieldtype": "Currency", 
-  "in_list_view": 1, 
-  "label": "Amount", 
-  "oldfieldname": "import_amount", 
-  "oldfieldtype": "Currency", 
-  "options": "currency", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "col_break4", 
-  "fieldtype": "Column Break"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "base_rate", 
-  "fieldtype": "Currency", 
-  "in_list_view": 0, 
-  "label": "Rate (Company Currency)", 
-  "oldfieldname": "purchase_rate", 
-  "oldfieldtype": "Currency", 
-  "options": "Company:company:default_currency", 
-  "print_hide": 1, 
-  "print_width": "100px", 
-  "read_only": 1, 
-  "reqd": 1, 
-  "width": "100px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "base_amount", 
-  "fieldtype": "Currency", 
-  "in_list_view": 0, 
-  "label": "Amount (Company Currency)", 
-  "oldfieldname": "amount", 
-  "oldfieldtype": "Currency", 
-  "options": "Company:company:default_currency", 
-  "print_hide": 1, 
-  "print_width": "100px", 
-  "read_only": 1, 
-  "reqd": 0, 
-  "width": "100px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "pricing_rule_for_price", 
-  "fieldtype": "Link", 
-  "label": "Pricing Rule For Price", 
-  "options": "Pricing Rule", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "pricing_rule_for_discount", 
-  "fieldtype": "Link", 
-  "label": "Pricing Rule For Discount", 
-  "options": "Pricing Rule", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "warehouse_and_reference", 
-  "fieldtype": "Section Break", 
-  "in_list_view": 0, 
-  "label": "Warehouse and Reference"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "warehouse", 
-  "fieldtype": "Link", 
-  "hidden": 0, 
-  "in_list_view": 0, 
-  "label": "Accepted Warehouse", 
-  "oldfieldname": "warehouse", 
-  "oldfieldtype": "Link", 
-  "options": "Warehouse", 
-  "print_hide": 1, 
-  "print_width": "100px", 
-  "read_only": 0, 
-  "width": "100px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "rejected_warehouse", 
-  "fieldtype": "Link", 
-  "hidden": 0, 
-  "label": "Rejected Warehouse", 
-  "no_copy": 1, 
-  "oldfieldname": "rejected_warehouse", 
-  "oldfieldtype": "Link", 
-  "options": "Warehouse", 
-  "print_hide": 1, 
-  "print_width": "100px", 
-  "read_only": 0, 
-  "width": "100px"
- }, 
- {
-  "default": ":Company", 
-  "depends_on": "eval:cint(sys_defaults.auto_accounting_for_stock)", 
-  "doctype": "DocField", 
-  "fieldname": "cost_center", 
-  "fieldtype": "Link", 
-  "label": "Cost Center", 
-  "options": "Cost Center", 
-  "print_hide": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "project_name", 
-  "fieldtype": "Link", 
-  "in_filter": 1, 
-  "label": "Project Name", 
-  "options": "Project", 
-  "print_hide": 1, 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "qa_no", 
-  "fieldtype": "Link", 
-  "label": "Quality Inspection", 
-  "no_copy": 1, 
-  "oldfieldname": "qa_no", 
-  "oldfieldtype": "Link", 
-  "options": "Quality Inspection", 
-  "print_hide": 1, 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "schedule_date", 
-  "fieldtype": "Date", 
-  "label": "Required By", 
-  "no_copy": 0, 
-  "oldfieldname": "schedule_date", 
-  "oldfieldtype": "Date", 
-  "print_hide": 1, 
-  "read_only": 1, 
-  "report_hide": 0, 
-  "reqd": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "stock_qty", 
-  "fieldtype": "Float", 
-  "label": "Qty as per Stock UOM", 
-  "oldfieldname": "stock_qty", 
-  "oldfieldtype": "Currency", 
-  "print_hide": 1, 
-  "print_width": "100px", 
-  "read_only": 1, 
-  "width": "100px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "prevdoc_doctype", 
-  "fieldtype": "Data", 
-  "hidden": 1, 
-  "label": "Prevdoc Doctype", 
-  "no_copy": 1, 
-  "oldfieldname": "prevdoc_doctype", 
-  "oldfieldtype": "Data", 
-  "print_hide": 1, 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "prevdoc_docname", 
-  "fieldtype": "Link", 
-  "hidden": 0, 
-  "in_filter": 1, 
-  "label": "Purchase Order", 
-  "no_copy": 1, 
-  "oldfieldname": "prevdoc_docname", 
-  "oldfieldtype": "Link", 
-  "options": "Purchase Order", 
-  "print_hide": 1, 
-  "print_width": "150px", 
-  "read_only": 1, 
-  "reqd": 0, 
-  "search_index": 1, 
-  "width": "150px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "prevdoc_detail_docname", 
-  "fieldtype": "Data", 
-  "hidden": 1, 
-  "in_filter": 1, 
-  "label": "Purchase Order Item No", 
-  "no_copy": 1, 
-  "oldfieldname": "prevdoc_detail_docname", 
-  "oldfieldtype": "Data", 
-  "print_hide": 1, 
-  "print_width": "150px", 
-  "read_only": 1, 
-  "search_index": 1, 
-  "width": "150px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "col_break5", 
-  "fieldtype": "Column Break"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "serial_no", 
-  "fieldtype": "Text", 
-  "in_filter": 1, 
-  "in_list_view": 1, 
-  "label": "Serial No", 
-  "no_copy": 1, 
-  "oldfieldname": "serial_no", 
-  "oldfieldtype": "Text", 
-  "print_hide": 0, 
-  "read_only": 0, 
-  "report_hide": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "rejected_serial_no", 
-  "fieldtype": "Text", 
-  "label": "Rejected Serial No", 
-  "print_hide": 1, 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "batch_no", 
-  "fieldtype": "Link", 
-  "label": "Batch No", 
-  "oldfieldname": "batch_no", 
-  "oldfieldtype": "Link", 
-  "options": "Batch", 
-  "print_hide": 1, 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "brand", 
-  "fieldtype": "Link", 
-  "hidden": 1, 
-  "label": "Brand", 
-  "oldfieldname": "brand", 
-  "oldfieldtype": "Link", 
-  "options": "Brand", 
-  "print_hide": 1, 
-  "read_only": 1
- }, 
- {
-  "description": "<a href=\"#Sales Browser/Item Group\">Add / Edit</a>", 
-  "doctype": "DocField", 
-  "fieldname": "item_group", 
-  "fieldtype": "Link", 
-  "hidden": 1, 
-  "in_filter": 1, 
-  "label": "Item Group", 
-  "oldfieldname": "item_group", 
-  "oldfieldtype": "Link", 
-  "options": "Item Group", 
-  "print_hide": 1, 
-  "read_only": 1, 
-  "search_index": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "rm_supp_cost", 
-  "fieldtype": "Currency", 
-  "hidden": 1, 
-  "in_filter": 0, 
-  "label": "Raw Materials Supplied Cost", 
-  "no_copy": 1, 
-  "oldfieldname": "rm_supp_cost", 
-  "oldfieldtype": "Currency", 
-  "options": "Company:company:default_currency", 
-  "print_hide": 1, 
-  "print_width": "150px", 
-  "read_only": 1, 
-  "width": "150px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "item_tax_amount", 
-  "fieldtype": "Currency", 
-  "hidden": 1, 
-  "label": "Item Tax Amount", 
-  "no_copy": 1, 
-  "oldfieldname": "item_tax_amount", 
-  "oldfieldtype": "Currency", 
-  "options": "Company:company:default_currency", 
-  "print_hide": 1, 
-  "print_width": "150px", 
-  "read_only": 1, 
-  "reqd": 0, 
-  "search_index": 0, 
-  "width": "150px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "valuation_rate", 
-  "fieldtype": "Currency", 
-  "hidden": 1, 
-  "in_filter": 0, 
-  "label": "Valuation Rate", 
-  "no_copy": 1, 
-  "oldfieldname": "valuation_rate", 
-  "oldfieldtype": "Currency", 
-  "options": "Company:company:default_currency", 
-  "print_hide": 1, 
-  "print_width": "80px", 
-  "read_only": 1, 
-  "width": "80px"
- }, 
- {
-  "description": "Tax detail table fetched from item master as a string and stored in this field.\nUsed for Taxes and Charges", 
-  "doctype": "DocField", 
-  "fieldname": "item_tax_rate", 
-  "fieldtype": "Small Text", 
-  "hidden": 1, 
-  "in_filter": 0, 
-  "label": "Item Tax Rate", 
-  "oldfieldname": "item_tax_rate", 
-  "oldfieldtype": "Small Text", 
-  "print_hide": 1, 
-  "read_only": 1, 
-  "report_hide": 1
- }, 
- {
-  "allow_on_submit": 1, 
-  "doctype": "DocField", 
-  "fieldname": "page_break", 
-  "fieldtype": "Check", 
-  "label": "Page Break", 
-  "oldfieldname": "page_break", 
-  "oldfieldtype": "Check", 
-  "print_hide": 1, 
-  "read_only": 0
- }
-]
\ No newline at end of file
+{
+ "autoname": "GRND/.#######", 
+ "creation": "2013-05-24 19:29:10", 
+ "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": "100px", 
+   "read_only": 0, 
+   "reqd": 1, 
+   "search_index": 1, 
+   "width": "100px"
+  }, 
+  {
+   "fieldname": "item_name", 
+   "fieldtype": "Data", 
+   "in_filter": 0, 
+   "in_list_view": 0, 
+   "label": "Item Name", 
+   "oldfieldname": "item_name", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0, 
+   "reqd": 1, 
+   "search_index": 0
+  }, 
+  {
+   "fieldname": "col_break1", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "description", 
+   "fieldtype": "Text", 
+   "in_list_view": 1, 
+   "label": "Description", 
+   "oldfieldname": "description", 
+   "oldfieldtype": "Text", 
+   "permlevel": 0, 
+   "print_width": "300px", 
+   "read_only": 0, 
+   "reqd": 1, 
+   "width": "300px"
+  }, 
+  {
+   "fieldname": "received_and_accepted", 
+   "fieldtype": "Section Break", 
+   "in_list_view": 0, 
+   "label": "Received and Accepted", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "received_qty", 
+   "fieldtype": "Float", 
+   "in_list_view": 0, 
+   "label": "Recd Quantity", 
+   "oldfieldname": "received_qty", 
+   "oldfieldtype": "Currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "print_width": "100px", 
+   "read_only": 0, 
+   "reqd": 1, 
+   "width": "100px"
+  }, 
+  {
+   "fieldname": "qty", 
+   "fieldtype": "Float", 
+   "in_list_view": 1, 
+   "label": "Accepted Quantity", 
+   "oldfieldname": "qty", 
+   "oldfieldtype": "Currency", 
+   "permlevel": 0, 
+   "print_width": "100px", 
+   "read_only": 0, 
+   "width": "100px"
+  }, 
+  {
+   "fieldname": "rejected_qty", 
+   "fieldtype": "Float", 
+   "in_filter": 0, 
+   "in_list_view": 0, 
+   "label": "Rejected Quantity", 
+   "oldfieldname": "rejected_qty", 
+   "oldfieldtype": "Currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "print_width": "100px", 
+   "read_only": 0, 
+   "search_index": 0, 
+   "width": "100px"
+  }, 
+  {
+   "fieldname": "col_break2", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "uom", 
+   "fieldtype": "Link", 
+   "in_list_view": 0, 
+   "label": "UOM", 
+   "oldfieldname": "uom", 
+   "oldfieldtype": "Link", 
+   "options": "UOM", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "print_width": "100px", 
+   "read_only": 0, 
+   "reqd": 1, 
+   "width": "100px"
+  }, 
+  {
+   "fieldname": "stock_uom", 
+   "fieldtype": "Link", 
+   "in_list_view": 0, 
+   "label": "Stock UOM", 
+   "oldfieldname": "stock_uom", 
+   "oldfieldtype": "Data", 
+   "options": "UOM", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "print_width": "100px", 
+   "read_only": 1, 
+   "reqd": 1, 
+   "width": "100px"
+  }, 
+  {
+   "fieldname": "conversion_factor", 
+   "fieldtype": "Float", 
+   "in_list_view": 0, 
+   "label": "Conversion Factor", 
+   "oldfieldname": "conversion_factor", 
+   "oldfieldtype": "Currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "print_width": "100px", 
+   "read_only": 0, 
+   "reqd": 1, 
+   "width": "100px"
+  }, 
+  {
+   "fieldname": "rate_and_amount", 
+   "fieldtype": "Section Break", 
+   "in_list_view": 0, 
+   "label": "Rate and Amount", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "price_list_rate", 
+   "fieldtype": "Currency", 
+   "in_list_view": 0, 
+   "label": "Price List Rate", 
+   "options": "currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "discount_percentage", 
+   "fieldtype": "Float", 
+   "in_list_view": 0, 
+   "label": "Discount  %", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "col_break3", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "base_price_list_rate", 
+   "fieldtype": "Currency", 
+   "in_list_view": 0, 
+   "label": "Price List Rate (Company Currency)", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "sec_break1", 
+   "fieldtype": "Section Break", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "rate", 
+   "fieldtype": "Currency", 
+   "in_list_view": 1, 
+   "label": "Rate", 
+   "oldfieldname": "import_rate", 
+   "oldfieldtype": "Currency", 
+   "options": "currency", 
+   "permlevel": 0, 
+   "print_hide": 0, 
+   "print_width": "100px", 
+   "read_only": 0, 
+   "width": "100px"
+  }, 
+  {
+   "fieldname": "amount", 
+   "fieldtype": "Currency", 
+   "in_list_view": 1, 
+   "label": "Amount", 
+   "oldfieldname": "import_amount", 
+   "oldfieldtype": "Currency", 
+   "options": "currency", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "col_break4", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "base_rate", 
+   "fieldtype": "Currency", 
+   "in_list_view": 0, 
+   "label": "Rate (Company Currency)", 
+   "oldfieldname": "purchase_rate", 
+   "oldfieldtype": "Currency", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "print_width": "100px", 
+   "read_only": 1, 
+   "reqd": 1, 
+   "width": "100px"
+  }, 
+  {
+   "fieldname": "base_amount", 
+   "fieldtype": "Currency", 
+   "in_list_view": 0, 
+   "label": "Amount (Company Currency)", 
+   "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_for_price", 
+   "fieldtype": "Link", 
+   "label": "Pricing Rule For Price", 
+   "options": "Pricing Rule", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "pricing_rule_for_discount", 
+   "fieldtype": "Link", 
+   "label": "Pricing Rule For Discount", 
+   "options": "Pricing Rule", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "warehouse_and_reference", 
+   "fieldtype": "Section Break", 
+   "in_list_view": 0, 
+   "label": "Warehouse and Reference", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "warehouse", 
+   "fieldtype": "Link", 
+   "hidden": 0, 
+   "in_list_view": 0, 
+   "label": "Accepted Warehouse", 
+   "oldfieldname": "warehouse", 
+   "oldfieldtype": "Link", 
+   "options": "Warehouse", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "print_width": "100px", 
+   "read_only": 0, 
+   "width": "100px"
+  }, 
+  {
+   "fieldname": "rejected_warehouse", 
+   "fieldtype": "Link", 
+   "hidden": 0, 
+   "label": "Rejected Warehouse", 
+   "no_copy": 1, 
+   "oldfieldname": "rejected_warehouse", 
+   "oldfieldtype": "Link", 
+   "options": "Warehouse", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "print_width": "100px", 
+   "read_only": 0, 
+   "width": "100px"
+  }, 
+  {
+   "default": ":Company", 
+   "depends_on": "eval:cint(sys_defaults.auto_accounting_for_stock)", 
+   "fieldname": "cost_center", 
+   "fieldtype": "Link", 
+   "label": "Cost Center", 
+   "options": "Cost Center", 
+   "permlevel": 0, 
+   "print_hide": 1
+  }, 
+  {
+   "fieldname": "project_name", 
+   "fieldtype": "Link", 
+   "in_filter": 1, 
+   "label": "Project Name", 
+   "options": "Project", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "qa_no", 
+   "fieldtype": "Link", 
+   "label": "Quality Inspection", 
+   "no_copy": 1, 
+   "oldfieldname": "qa_no", 
+   "oldfieldtype": "Link", 
+   "options": "Quality Inspection", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "schedule_date", 
+   "fieldtype": "Date", 
+   "label": "Required By", 
+   "no_copy": 0, 
+   "oldfieldname": "schedule_date", 
+   "oldfieldtype": "Date", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1, 
+   "report_hide": 0, 
+   "reqd": 0
+  }, 
+  {
+   "fieldname": "stock_qty", 
+   "fieldtype": "Float", 
+   "label": "Qty as per Stock UOM", 
+   "oldfieldname": "stock_qty", 
+   "oldfieldtype": "Currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "print_width": "100px", 
+   "read_only": 1, 
+   "width": "100px"
+  }, 
+  {
+   "fieldname": "prevdoc_doctype", 
+   "fieldtype": "Data", 
+   "hidden": 1, 
+   "label": "Prevdoc Doctype", 
+   "no_copy": 1, 
+   "oldfieldname": "prevdoc_doctype", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "prevdoc_docname", 
+   "fieldtype": "Link", 
+   "hidden": 0, 
+   "in_filter": 1, 
+   "label": "Purchase Order", 
+   "no_copy": 1, 
+   "oldfieldname": "prevdoc_docname", 
+   "oldfieldtype": "Link", 
+   "options": "Purchase Order", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "print_width": "150px", 
+   "read_only": 1, 
+   "reqd": 0, 
+   "search_index": 1, 
+   "width": "150px"
+  }, 
+  {
+   "fieldname": "prevdoc_detail_docname", 
+   "fieldtype": "Data", 
+   "hidden": 1, 
+   "in_filter": 1, 
+   "label": "Purchase Order Item No", 
+   "no_copy": 1, 
+   "oldfieldname": "prevdoc_detail_docname", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "print_width": "150px", 
+   "read_only": 1, 
+   "search_index": 1, 
+   "width": "150px"
+  }, 
+  {
+   "fieldname": "col_break5", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "serial_no", 
+   "fieldtype": "Text", 
+   "in_filter": 1, 
+   "in_list_view": 1, 
+   "label": "Serial No", 
+   "no_copy": 1, 
+   "oldfieldname": "serial_no", 
+   "oldfieldtype": "Text", 
+   "permlevel": 0, 
+   "print_hide": 0, 
+   "read_only": 0, 
+   "report_hide": 0
+  }, 
+  {
+   "fieldname": "rejected_serial_no", 
+   "fieldtype": "Text", 
+   "label": "Rejected Serial No", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "batch_no", 
+   "fieldtype": "Link", 
+   "label": "Batch No", 
+   "oldfieldname": "batch_no", 
+   "oldfieldtype": "Link", 
+   "options": "Batch", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "brand", 
+   "fieldtype": "Link", 
+   "hidden": 1, 
+   "label": "Brand", 
+   "oldfieldname": "brand", 
+   "oldfieldtype": "Link", 
+   "options": "Brand", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1
+  }, 
+  {
+   "description": "<a href=\"#Sales Browser/Item Group\">Add / Edit</a>", 
+   "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
+  }, 
+  {
+   "fieldname": "rm_supp_cost", 
+   "fieldtype": "Currency", 
+   "hidden": 1, 
+   "in_filter": 0, 
+   "label": "Raw Materials Supplied Cost", 
+   "no_copy": 1, 
+   "oldfieldname": "rm_supp_cost", 
+   "oldfieldtype": "Currency", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "print_width": "150px", 
+   "read_only": 1, 
+   "width": "150px"
+  }, 
+  {
+   "fieldname": "item_tax_amount", 
+   "fieldtype": "Currency", 
+   "hidden": 1, 
+   "label": "Item Tax Amount", 
+   "no_copy": 1, 
+   "oldfieldname": "item_tax_amount", 
+   "oldfieldtype": "Currency", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "print_width": "150px", 
+   "read_only": 1, 
+   "reqd": 0, 
+   "search_index": 0, 
+   "width": "150px"
+  }, 
+  {
+   "fieldname": "valuation_rate", 
+   "fieldtype": "Currency", 
+   "hidden": 1, 
+   "in_filter": 0, 
+   "label": "Valuation Rate", 
+   "no_copy": 1, 
+   "oldfieldname": "valuation_rate", 
+   "oldfieldtype": "Currency", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "print_width": "80px", 
+   "read_only": 1, 
+   "width": "80px"
+  }, 
+  {
+   "description": "Tax detail table fetched from item master as a string and stored in this field.\nUsed for Taxes and Charges", 
+   "fieldname": "item_tax_rate", 
+   "fieldtype": "Small Text", 
+   "hidden": 1, 
+   "in_filter": 0, 
+   "label": "Item Tax Rate", 
+   "oldfieldname": "item_tax_rate", 
+   "oldfieldtype": "Small Text", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1, 
+   "report_hide": 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
+  }
+ ], 
+ "idx": 1, 
+ "istable": 1, 
+ "modified": "2014-02-28 11:27:09", 
+ "modified_by": "Administrator", 
+ "module": "Stock", 
+ "name": "Purchase Receipt Item", 
+ "owner": "Administrator"
+}
\ No newline at end of file
diff --git a/erpnext/stock/doctype/serial_no/serial_no.txt b/erpnext/stock/doctype/serial_no/serial_no.txt
index 3588493..cb1b5ad 100644
--- a/erpnext/stock/doctype/serial_no/serial_no.txt
+++ b/erpnext/stock/doctype/serial_no/serial_no.txt
@@ -1,477 +1,470 @@
-[
- {
-  "creation": "2013-05-16 10:59:15", 
-  "docstatus": 0, 
-  "modified": "2014-01-20 17:49:26", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "allow_attach": 1, 
-  "allow_import": 1, 
-  "allow_rename": 1, 
-  "autoname": "field:serial_no", 
-  "description": "Distinct unit of an Item", 
-  "doctype": "DocType", 
-  "document_type": "Master", 
-  "icon": "icon-barcode", 
-  "in_create": 0, 
-  "module": "Stock", 
-  "name": "__common__", 
-  "search_fields": "item_code,status"
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "Serial No", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "cancel": 0, 
-  "doctype": "DocPerm", 
-  "email": 1, 
-  "name": "__common__", 
-  "parent": "Serial No", 
-  "parentfield": "permissions", 
-  "parenttype": "DocType", 
-  "permlevel": 0, 
-  "print": 1, 
-  "read": 1, 
-  "report": 1, 
-  "submit": 0
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Serial No"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "details", 
-  "fieldtype": "Section Break", 
-  "label": "Details", 
-  "oldfieldtype": "Section Break", 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break0", 
-  "fieldtype": "Column Break", 
-  "read_only": 0
- }, 
- {
-  "default": "In Store", 
-  "description": "Only Serial Nos with status \"Available\" can be delivered.", 
-  "doctype": "DocField", 
-  "fieldname": "status", 
-  "fieldtype": "Select", 
-  "in_filter": 1, 
-  "in_list_view": 1, 
-  "label": "Status", 
-  "no_copy": 1, 
-  "oldfieldname": "status", 
-  "oldfieldtype": "Select", 
-  "options": "\nAvailable\nNot Available\nDelivered\nPurchase Returned\nSales Returned", 
-  "read_only": 0, 
-  "reqd": 1, 
-  "search_index": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "serial_no", 
-  "fieldtype": "Data", 
-  "in_filter": 0, 
-  "label": "Serial No", 
-  "no_copy": 1, 
-  "oldfieldname": "serial_no", 
-  "oldfieldtype": "Data", 
-  "read_only": 0, 
-  "reqd": 1, 
-  "search_index": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "item_code", 
-  "fieldtype": "Link", 
-  "in_filter": 1, 
-  "in_list_view": 1, 
-  "label": "Item Code", 
-  "oldfieldname": "item_code", 
-  "oldfieldtype": "Link", 
-  "options": "Item", 
-  "read_only": 0, 
-  "reqd": 1, 
-  "search_index": 0
- }, 
- {
-  "description": "Warehouse can only be changed via Stock Entry / Delivery Note / Purchase Receipt", 
-  "doctype": "DocField", 
-  "fieldname": "warehouse", 
-  "fieldtype": "Link", 
-  "in_filter": 1, 
-  "in_list_view": 1, 
-  "label": "Warehouse", 
-  "no_copy": 1, 
-  "oldfieldname": "warehouse", 
-  "oldfieldtype": "Link", 
-  "options": "Warehouse", 
-  "read_only": 1, 
-  "reqd": 0, 
-  "search_index": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break1", 
-  "fieldtype": "Column Break", 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "item_name", 
-  "fieldtype": "Data", 
-  "in_list_view": 1, 
-  "label": "Item Name", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "description", 
-  "fieldtype": "Text", 
-  "in_filter": 1, 
-  "label": "Description", 
-  "oldfieldname": "description", 
-  "oldfieldtype": "Text", 
-  "read_only": 1, 
-  "search_index": 0, 
-  "width": "300px"
- }, 
- {
-  "description": "<a href=\"#Sales Browser/Item Group\">Add / Edit</a>", 
-  "doctype": "DocField", 
-  "fieldname": "item_group", 
-  "fieldtype": "Link", 
-  "in_filter": 0, 
-  "label": "Item Group", 
-  "oldfieldname": "item_group", 
-  "oldfieldtype": "Link", 
-  "options": "Item Group", 
-  "read_only": 1, 
-  "reqd": 0, 
-  "search_index": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "brand", 
-  "fieldtype": "Link", 
-  "in_filter": 0, 
-  "label": "Brand", 
-  "oldfieldname": "brand", 
-  "oldfieldtype": "Link", 
-  "options": "Brand", 
-  "read_only": 1, 
-  "reqd": 0, 
-  "search_index": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "purchase_details", 
-  "fieldtype": "Section Break", 
-  "label": "Purchase / Manufacture Details", 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break2", 
-  "fieldtype": "Column Break", 
-  "read_only": 0, 
-  "width": "50%"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "purchase_document_type", 
-  "fieldtype": "Select", 
-  "label": "Creation Document Type", 
-  "no_copy": 1, 
-  "options": "\nPurchase Receipt\nStock Entry", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "purchase_document_no", 
-  "fieldtype": "Data", 
-  "hidden": 0, 
-  "label": "Creation Document No", 
-  "no_copy": 1, 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "purchase_date", 
-  "fieldtype": "Date", 
-  "in_filter": 1, 
-  "label": "Creation Date", 
-  "no_copy": 1, 
-  "oldfieldname": "purchase_date", 
-  "oldfieldtype": "Date", 
-  "read_only": 1, 
-  "reqd": 0, 
-  "search_index": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "purchase_time", 
-  "fieldtype": "Time", 
-  "label": "Creation Time", 
-  "no_copy": 1, 
-  "read_only": 1, 
-  "reqd": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "purchase_rate", 
-  "fieldtype": "Currency", 
-  "in_filter": 0, 
-  "label": "Incoming Rate", 
-  "no_copy": 1, 
-  "oldfieldname": "purchase_rate", 
-  "oldfieldtype": "Currency", 
-  "options": "Company:company:default_currency", 
-  "read_only": 1, 
-  "reqd": 0, 
-  "search_index": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break3", 
-  "fieldtype": "Column Break", 
-  "read_only": 0, 
-  "width": "50%"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "supplier", 
-  "fieldtype": "Link", 
-  "in_filter": 1, 
-  "label": "Supplier", 
-  "no_copy": 1, 
-  "options": "Supplier", 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "supplier_name", 
-  "fieldtype": "Data", 
-  "in_filter": 1, 
-  "label": "Supplier Name", 
-  "no_copy": 1, 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "delivery_details", 
-  "fieldtype": "Section Break", 
-  "label": "Delivery Details", 
-  "oldfieldtype": "Column Break", 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "delivery_document_type", 
-  "fieldtype": "Select", 
-  "in_filter": 1, 
-  "label": "Delivery Document Type", 
-  "no_copy": 1, 
-  "options": "\nDelivery Note\nSales Invoice\nStock Entry", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "delivery_document_no", 
-  "fieldtype": "Data", 
-  "in_filter": 1, 
-  "label": "Delivery Document No", 
-  "no_copy": 1, 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "delivery_date", 
-  "fieldtype": "Date", 
-  "label": "Delivery Date", 
-  "no_copy": 1, 
-  "oldfieldname": "delivery_date", 
-  "oldfieldtype": "Date", 
-  "read_only": 1, 
-  "search_index": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "delivery_time", 
-  "fieldtype": "Time", 
-  "label": "Delivery Time", 
-  "no_copy": 1, 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "is_cancelled", 
-  "fieldtype": "Select", 
-  "hidden": 1, 
-  "label": "Is Cancelled", 
-  "oldfieldname": "is_cancelled", 
-  "oldfieldtype": "Select", 
-  "options": "\nYes\nNo", 
-  "read_only": 0, 
-  "report_hide": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break5", 
-  "fieldtype": "Column Break", 
-  "read_only": 0, 
-  "width": "50%"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "customer", 
-  "fieldtype": "Link", 
-  "in_filter": 1, 
-  "label": "Customer", 
-  "no_copy": 1, 
-  "oldfieldname": "customer", 
-  "oldfieldtype": "Link", 
-  "options": "Customer", 
-  "print_hide": 1, 
-  "read_only": 0, 
-  "search_index": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "customer_name", 
-  "fieldtype": "Data", 
-  "in_filter": 1, 
-  "label": "Customer Name", 
-  "no_copy": 1, 
-  "oldfieldname": "customer_name", 
-  "oldfieldtype": "Data", 
-  "read_only": 1, 
-  "search_index": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "warranty_amc_details", 
-  "fieldtype": "Section Break", 
-  "label": "Warranty / AMC Details", 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break6", 
-  "fieldtype": "Column Break", 
-  "read_only": 0, 
-  "width": "50%"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "maintenance_status", 
-  "fieldtype": "Select", 
-  "in_filter": 1, 
-  "label": "Maintenance Status", 
-  "no_copy": 0, 
-  "oldfieldname": "maintenance_status", 
-  "oldfieldtype": "Select", 
-  "options": "\nUnder Warranty\nOut of Warranty\nUnder AMC\nOut of AMC", 
-  "read_only": 0, 
-  "search_index": 1, 
-  "width": "150px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "warranty_period", 
-  "fieldtype": "Int", 
-  "label": "Warranty Period (Days)", 
-  "oldfieldname": "warranty_period", 
-  "oldfieldtype": "Int", 
-  "read_only": 0, 
-  "width": "150px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break7", 
-  "fieldtype": "Column Break", 
-  "read_only": 0, 
-  "width": "50%"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "warranty_expiry_date", 
-  "fieldtype": "Date", 
-  "in_filter": 1, 
-  "label": "Warranty Expiry Date", 
-  "oldfieldname": "warranty_expiry_date", 
-  "oldfieldtype": "Date", 
-  "read_only": 0, 
-  "width": "150px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "amc_expiry_date", 
-  "fieldtype": "Date", 
-  "in_filter": 1, 
-  "label": "AMC Expiry Date", 
-  "oldfieldname": "amc_expiry_date", 
-  "oldfieldtype": "Date", 
-  "read_only": 0, 
-  "search_index": 0, 
-  "width": "150px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "more_info", 
-  "fieldtype": "Section Break", 
-  "label": "More Info", 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "serial_no_details", 
-  "fieldtype": "Text Editor", 
-  "label": "Serial No Details", 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "company", 
-  "fieldtype": "Select", 
-  "in_filter": 1, 
-  "label": "Company", 
-  "options": "link:Company", 
-  "read_only": 1, 
-  "reqd": 1, 
-  "search_index": 1
- }, 
- {
-  "create": 1, 
-  "delete": 1, 
-  "doctype": "DocPerm", 
-  "role": "Material Master Manager", 
-  "write": 1
- }, 
- {
-  "amend": 0, 
-  "create": 0, 
-  "delete": 0, 
-  "doctype": "DocPerm", 
-  "role": "Material Manager", 
-  "write": 0
- }, 
- {
-  "amend": 0, 
-  "create": 0, 
-  "delete": 0, 
-  "doctype": "DocPerm", 
-  "role": "Material User", 
-  "write": 0
- }
-]
\ No newline at end of file
+{
+ "allow_attach": 1, 
+ "allow_import": 1, 
+ "allow_rename": 1, 
+ "autoname": "field:serial_no", 
+ "creation": "2013-05-16 10:59:15", 
+ "description": "Distinct unit of an Item", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "document_type": "Master", 
+ "fields": [
+  {
+   "fieldname": "details", 
+   "fieldtype": "Section Break", 
+   "label": "Details", 
+   "oldfieldtype": "Section Break", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "column_break0", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "default": "In Store", 
+   "description": "Only Serial Nos with status \"Available\" can be delivered.", 
+   "fieldname": "status", 
+   "fieldtype": "Select", 
+   "in_filter": 1, 
+   "in_list_view": 1, 
+   "label": "Status", 
+   "no_copy": 1, 
+   "oldfieldname": "status", 
+   "oldfieldtype": "Select", 
+   "options": "\nAvailable\nNot Available\nDelivered\nPurchase Returned\nSales Returned", 
+   "permlevel": 0, 
+   "read_only": 0, 
+   "reqd": 1, 
+   "search_index": 1
+  }, 
+  {
+   "fieldname": "serial_no", 
+   "fieldtype": "Data", 
+   "in_filter": 0, 
+   "label": "Serial No", 
+   "no_copy": 1, 
+   "oldfieldname": "serial_no", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "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, 
+   "read_only": 0, 
+   "reqd": 1, 
+   "search_index": 0
+  }, 
+  {
+   "description": "Warehouse can only be changed via Stock Entry / Delivery Note / Purchase Receipt", 
+   "fieldname": "warehouse", 
+   "fieldtype": "Link", 
+   "in_filter": 1, 
+   "in_list_view": 1, 
+   "label": "Warehouse", 
+   "no_copy": 1, 
+   "oldfieldname": "warehouse", 
+   "oldfieldtype": "Link", 
+   "options": "Warehouse", 
+   "permlevel": 0, 
+   "read_only": 1, 
+   "reqd": 0, 
+   "search_index": 1
+  }, 
+  {
+   "fieldname": "column_break1", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "item_name", 
+   "fieldtype": "Data", 
+   "in_list_view": 1, 
+   "label": "Item Name", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "description", 
+   "fieldtype": "Text", 
+   "in_filter": 1, 
+   "label": "Description", 
+   "oldfieldname": "description", 
+   "oldfieldtype": "Text", 
+   "permlevel": 0, 
+   "read_only": 1, 
+   "search_index": 0, 
+   "width": "300px"
+  }, 
+  {
+   "description": "<a href=\"#Sales Browser/Item Group\">Add / Edit</a>", 
+   "fieldname": "item_group", 
+   "fieldtype": "Link", 
+   "in_filter": 0, 
+   "label": "Item Group", 
+   "oldfieldname": "item_group", 
+   "oldfieldtype": "Link", 
+   "options": "Item Group", 
+   "permlevel": 0, 
+   "read_only": 1, 
+   "reqd": 0, 
+   "search_index": 0
+  }, 
+  {
+   "fieldname": "brand", 
+   "fieldtype": "Link", 
+   "in_filter": 0, 
+   "label": "Brand", 
+   "oldfieldname": "brand", 
+   "oldfieldtype": "Link", 
+   "options": "Brand", 
+   "permlevel": 0, 
+   "read_only": 1, 
+   "reqd": 0, 
+   "search_index": 0
+  }, 
+  {
+   "fieldname": "purchase_details", 
+   "fieldtype": "Section Break", 
+   "label": "Purchase / Manufacture Details", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "column_break2", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0, 
+   "read_only": 0, 
+   "width": "50%"
+  }, 
+  {
+   "fieldname": "purchase_document_type", 
+   "fieldtype": "Select", 
+   "label": "Creation Document Type", 
+   "no_copy": 1, 
+   "options": "\nPurchase Receipt\nStock Entry", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "purchase_document_no", 
+   "fieldtype": "Data", 
+   "hidden": 0, 
+   "label": "Creation Document No", 
+   "no_copy": 1, 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "purchase_date", 
+   "fieldtype": "Date", 
+   "in_filter": 1, 
+   "label": "Creation Date", 
+   "no_copy": 1, 
+   "oldfieldname": "purchase_date", 
+   "oldfieldtype": "Date", 
+   "permlevel": 0, 
+   "read_only": 1, 
+   "reqd": 0, 
+   "search_index": 0
+  }, 
+  {
+   "fieldname": "purchase_time", 
+   "fieldtype": "Time", 
+   "label": "Creation Time", 
+   "no_copy": 1, 
+   "permlevel": 0, 
+   "read_only": 1, 
+   "reqd": 0
+  }, 
+  {
+   "fieldname": "purchase_rate", 
+   "fieldtype": "Currency", 
+   "in_filter": 0, 
+   "label": "Incoming Rate", 
+   "no_copy": 1, 
+   "oldfieldname": "purchase_rate", 
+   "oldfieldtype": "Currency", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "read_only": 1, 
+   "reqd": 0, 
+   "search_index": 0
+  }, 
+  {
+   "fieldname": "column_break3", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0, 
+   "read_only": 0, 
+   "width": "50%"
+  }, 
+  {
+   "fieldname": "supplier", 
+   "fieldtype": "Link", 
+   "in_filter": 1, 
+   "label": "Supplier", 
+   "no_copy": 1, 
+   "options": "Supplier", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "supplier_name", 
+   "fieldtype": "Data", 
+   "in_filter": 1, 
+   "label": "Supplier Name", 
+   "no_copy": 1, 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "delivery_details", 
+   "fieldtype": "Section Break", 
+   "label": "Delivery Details", 
+   "oldfieldtype": "Column Break", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "delivery_document_type", 
+   "fieldtype": "Select", 
+   "in_filter": 1, 
+   "label": "Delivery Document Type", 
+   "no_copy": 1, 
+   "options": "\nDelivery Note\nSales Invoice\nStock Entry", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "delivery_document_no", 
+   "fieldtype": "Data", 
+   "in_filter": 1, 
+   "label": "Delivery Document No", 
+   "no_copy": 1, 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "delivery_date", 
+   "fieldtype": "Date", 
+   "label": "Delivery Date", 
+   "no_copy": 1, 
+   "oldfieldname": "delivery_date", 
+   "oldfieldtype": "Date", 
+   "permlevel": 0, 
+   "read_only": 1, 
+   "search_index": 0
+  }, 
+  {
+   "fieldname": "delivery_time", 
+   "fieldtype": "Time", 
+   "label": "Delivery Time", 
+   "no_copy": 1, 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "is_cancelled", 
+   "fieldtype": "Select", 
+   "hidden": 1, 
+   "label": "Is Cancelled", 
+   "oldfieldname": "is_cancelled", 
+   "oldfieldtype": "Select", 
+   "options": "\nYes\nNo", 
+   "permlevel": 0, 
+   "read_only": 0, 
+   "report_hide": 1
+  }, 
+  {
+   "fieldname": "column_break5", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0, 
+   "read_only": 0, 
+   "width": "50%"
+  }, 
+  {
+   "fieldname": "customer", 
+   "fieldtype": "Link", 
+   "in_filter": 1, 
+   "label": "Customer", 
+   "no_copy": 1, 
+   "oldfieldname": "customer", 
+   "oldfieldtype": "Link", 
+   "options": "Customer", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0, 
+   "search_index": 0
+  }, 
+  {
+   "fieldname": "customer_name", 
+   "fieldtype": "Data", 
+   "in_filter": 1, 
+   "label": "Customer Name", 
+   "no_copy": 1, 
+   "oldfieldname": "customer_name", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "read_only": 1, 
+   "search_index": 0
+  }, 
+  {
+   "fieldname": "warranty_amc_details", 
+   "fieldtype": "Section Break", 
+   "label": "Warranty / AMC Details", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "column_break6", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0, 
+   "read_only": 0, 
+   "width": "50%"
+  }, 
+  {
+   "fieldname": "maintenance_status", 
+   "fieldtype": "Select", 
+   "in_filter": 1, 
+   "label": "Maintenance Status", 
+   "no_copy": 0, 
+   "oldfieldname": "maintenance_status", 
+   "oldfieldtype": "Select", 
+   "options": "\nUnder Warranty\nOut of Warranty\nUnder AMC\nOut of AMC", 
+   "permlevel": 0, 
+   "read_only": 0, 
+   "search_index": 1, 
+   "width": "150px"
+  }, 
+  {
+   "fieldname": "warranty_period", 
+   "fieldtype": "Int", 
+   "label": "Warranty Period (Days)", 
+   "oldfieldname": "warranty_period", 
+   "oldfieldtype": "Int", 
+   "permlevel": 0, 
+   "read_only": 0, 
+   "width": "150px"
+  }, 
+  {
+   "fieldname": "column_break7", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0, 
+   "read_only": 0, 
+   "width": "50%"
+  }, 
+  {
+   "fieldname": "warranty_expiry_date", 
+   "fieldtype": "Date", 
+   "in_filter": 1, 
+   "label": "Warranty Expiry Date", 
+   "oldfieldname": "warranty_expiry_date", 
+   "oldfieldtype": "Date", 
+   "permlevel": 0, 
+   "read_only": 0, 
+   "width": "150px"
+  }, 
+  {
+   "fieldname": "amc_expiry_date", 
+   "fieldtype": "Date", 
+   "in_filter": 1, 
+   "label": "AMC Expiry Date", 
+   "oldfieldname": "amc_expiry_date", 
+   "oldfieldtype": "Date", 
+   "permlevel": 0, 
+   "read_only": 0, 
+   "search_index": 0, 
+   "width": "150px"
+  }, 
+  {
+   "fieldname": "more_info", 
+   "fieldtype": "Section Break", 
+   "label": "More Info", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "serial_no_details", 
+   "fieldtype": "Text Editor", 
+   "label": "Serial No Details", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "company", 
+   "fieldtype": "Select", 
+   "in_filter": 1, 
+   "label": "Company", 
+   "options": "link:Company", 
+   "permlevel": 0, 
+   "read_only": 1, 
+   "reqd": 1, 
+   "search_index": 1
+  }
+ ], 
+ "icon": "icon-barcode", 
+ "idx": 1, 
+ "in_create": 0, 
+ "modified": "2014-01-20 17:49:26", 
+ "modified_by": "Administrator", 
+ "module": "Stock", 
+ "name": "Serial No", 
+ "owner": "Administrator", 
+ "permissions": [
+  {
+   "cancel": 0, 
+   "create": 1, 
+   "delete": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Material Master Manager", 
+   "submit": 0, 
+   "write": 1
+  }, 
+  {
+   "amend": 0, 
+   "cancel": 0, 
+   "create": 0, 
+   "delete": 0, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Material Manager", 
+   "submit": 0, 
+   "write": 0
+  }, 
+  {
+   "amend": 0, 
+   "cancel": 0, 
+   "create": 0, 
+   "delete": 0, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Material User", 
+   "submit": 0, 
+   "write": 0
+  }
+ ], 
+ "search_fields": "item_code,status"
+}
\ No newline at end of file
diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.txt b/erpnext/stock/doctype/stock_entry/stock_entry.txt
index a8cf16b..ef537e0 100644
--- a/erpnext/stock/doctype/stock_entry/stock_entry.txt
+++ b/erpnext/stock/doctype/stock_entry/stock_entry.txt
@@ -1,638 +1,649 @@
-[
- {
-  "creation": "2013-04-09 11:43:55", 
-  "docstatus": 0, 
-  "modified": "2014-02-26 10:59:19", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "allow_attach": 0, 
-  "allow_copy": 0, 
-  "allow_import": 1, 
-  "allow_rename": 0, 
-  "autoname": "naming_series:", 
-  "doctype": "DocType", 
-  "hide_heading": 0, 
-  "hide_toolbar": 0, 
-  "icon": "icon-file-text", 
-  "in_create": 0, 
-  "in_dialog": 0, 
-  "is_submittable": 1, 
-  "issingle": 0, 
-  "max_attachments": 0, 
-  "module": "Stock", 
-  "name": "__common__", 
-  "read_only": 0, 
-  "read_only_onload": 0, 
-  "search_fields": "transfer_date, from_warehouse, to_warehouse, purpose, remarks"
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "Stock Entry", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "amend": 1, 
-  "cancel": 1, 
-  "create": 1, 
-  "delete": 1, 
-  "doctype": "DocPerm", 
-  "email": 1, 
-  "name": "__common__", 
-  "parent": "Stock Entry", 
-  "parentfield": "permissions", 
-  "parenttype": "DocType", 
-  "permlevel": 0, 
-  "print": 1, 
-  "read": 1, 
-  "report": 1, 
-  "submit": 1, 
-  "write": 1
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Stock Entry"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "col1", 
-  "fieldtype": "Column Break", 
-  "oldfieldtype": "Column Break", 
-  "print_width": "50%", 
-  "read_only": 0, 
-  "width": "50%"
- }, 
- {
-  "allow_on_submit": 0, 
-  "doctype": "DocField", 
-  "fieldname": "naming_series", 
-  "fieldtype": "Select", 
-  "hidden": 0, 
-  "in_filter": 0, 
-  "label": "Series", 
-  "no_copy": 1, 
-  "oldfieldname": "naming_series", 
-  "oldfieldtype": "Select", 
-  "options": "\nSTE", 
-  "print_hide": 1, 
-  "read_only": 0, 
-  "report_hide": 0, 
-  "reqd": 1, 
-  "search_index": 0
- }, 
- {
-  "allow_on_submit": 0, 
-  "default": "Material Issue", 
-  "doctype": "DocField", 
-  "fieldname": "purpose", 
-  "fieldtype": "Select", 
-  "hidden": 0, 
-  "in_filter": 1, 
-  "in_list_view": 1, 
-  "label": "Purpose", 
-  "no_copy": 0, 
-  "oldfieldname": "purpose", 
-  "oldfieldtype": "Select", 
-  "options": "Material Issue\nMaterial Receipt\nMaterial Transfer\nManufacture/Repack\nSubcontract\nSales Return\nPurchase Return", 
-  "print_hide": 0, 
-  "read_only": 0, 
-  "report_hide": 0, 
-  "reqd": 1, 
-  "search_index": 0
- }, 
- {
-  "allow_on_submit": 0, 
-  "depends_on": "eval:doc.purpose==\"Sales Return\"", 
-  "doctype": "DocField", 
-  "fieldname": "delivery_note_no", 
-  "fieldtype": "Link", 
-  "hidden": 0, 
-  "in_filter": 0, 
-  "label": "Delivery Note No", 
-  "no_copy": 1, 
-  "oldfieldname": "delivery_note_no", 
-  "oldfieldtype": "Link", 
-  "options": "Delivery Note", 
-  "print_hide": 1, 
-  "read_only": 0, 
-  "report_hide": 0, 
-  "reqd": 0, 
-  "search_index": 1
- }, 
- {
-  "depends_on": "eval:doc.purpose==\"Sales Return\"", 
-  "doctype": "DocField", 
-  "fieldname": "sales_invoice_no", 
-  "fieldtype": "Link", 
-  "hidden": 0, 
-  "label": "Sales Invoice No", 
-  "no_copy": 1, 
-  "options": "Sales Invoice", 
-  "print_hide": 1, 
-  "read_only": 0
- }, 
- {
-  "allow_on_submit": 0, 
-  "depends_on": "eval:doc.purpose==\"Purchase Return\"", 
-  "doctype": "DocField", 
-  "fieldname": "purchase_receipt_no", 
-  "fieldtype": "Link", 
-  "hidden": 0, 
-  "in_filter": 0, 
-  "label": "Purchase Receipt No", 
-  "no_copy": 1, 
-  "oldfieldname": "purchase_receipt_no", 
-  "oldfieldtype": "Link", 
-  "options": "Purchase Receipt", 
-  "print_hide": 1, 
-  "read_only": 0, 
-  "report_hide": 0, 
-  "reqd": 0, 
-  "search_index": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "col2", 
-  "fieldtype": "Column Break", 
-  "oldfieldtype": "Column Break", 
-  "print_width": "50%", 
-  "read_only": 0, 
-  "width": "50%"
- }, 
- {
-  "allow_on_submit": 0, 
-  "default": "Today", 
-  "doctype": "DocField", 
-  "fieldname": "posting_date", 
-  "fieldtype": "Date", 
-  "hidden": 0, 
-  "in_filter": 1, 
-  "in_list_view": 0, 
-  "label": "Posting Date", 
-  "no_copy": 1, 
-  "oldfieldname": "posting_date", 
-  "oldfieldtype": "Date", 
-  "print_hide": 1, 
-  "read_only": 0, 
-  "report_hide": 0, 
-  "reqd": 1, 
-  "search_index": 1
- }, 
- {
-  "allow_on_submit": 0, 
-  "doctype": "DocField", 
-  "fieldname": "posting_time", 
-  "fieldtype": "Time", 
-  "hidden": 0, 
-  "in_filter": 0, 
-  "label": "Posting Time", 
-  "no_copy": 1, 
-  "oldfieldname": "posting_time", 
-  "oldfieldtype": "Time", 
-  "print_hide": 1, 
-  "read_only": 0, 
-  "report_hide": 0, 
-  "reqd": 1, 
-  "search_index": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "items_section", 
-  "fieldtype": "Section Break", 
-  "label": "Items", 
-  "oldfieldtype": "Section Break", 
-  "read_only": 0
- }, 
- {
-  "allow_on_submit": 0, 
-  "doctype": "DocField", 
-  "fieldname": "from_warehouse", 
-  "fieldtype": "Link", 
-  "hidden": 0, 
-  "in_filter": 0, 
-  "in_list_view": 1, 
-  "label": "Default Source Warehouse", 
-  "no_copy": 1, 
-  "oldfieldname": "from_warehouse", 
-  "oldfieldtype": "Link", 
-  "options": "Warehouse", 
-  "print_hide": 1, 
-  "read_only": 0, 
-  "report_hide": 0, 
-  "reqd": 0, 
-  "search_index": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "cb0", 
-  "fieldtype": "Column Break", 
-  "read_only": 0
- }, 
- {
-  "allow_on_submit": 0, 
-  "doctype": "DocField", 
-  "fieldname": "to_warehouse", 
-  "fieldtype": "Link", 
-  "hidden": 0, 
-  "in_filter": 0, 
-  "in_list_view": 1, 
-  "label": "Default Target Warehouse", 
-  "no_copy": 1, 
-  "oldfieldname": "to_warehouse", 
-  "oldfieldtype": "Link", 
-  "options": "Warehouse", 
-  "print_hide": 1, 
-  "read_only": 0, 
-  "report_hide": 0, 
-  "reqd": 0, 
-  "search_index": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "sb0", 
-  "fieldtype": "Section Break", 
-  "options": "Simple", 
-  "read_only": 0
- }, 
- {
-  "allow_on_submit": 0, 
-  "doctype": "DocField", 
-  "fieldname": "mtn_details", 
-  "fieldtype": "Table", 
-  "hidden": 0, 
-  "in_filter": 0, 
-  "label": "MTN Details", 
-  "no_copy": 0, 
-  "oldfieldname": "mtn_details", 
-  "oldfieldtype": "Table", 
-  "options": "Stock Entry Detail", 
-  "print_hide": 0, 
-  "read_only": 0, 
-  "report_hide": 0, 
-  "reqd": 0, 
-  "search_index": 0
- }, 
- {
-  "description": "Get valuation rate and available stock at source/target warehouse on mentioned posting date-time. If serialized item, please press this button after entering serial nos.", 
-  "doctype": "DocField", 
-  "fieldname": "get_stock_and_rate", 
-  "fieldtype": "Button", 
-  "label": "Get Stock and Rate", 
-  "oldfieldtype": "Button", 
-  "options": "get_stock_and_rate", 
-  "print_hide": 1, 
-  "read_only": 0
- }, 
- {
-  "depends_on": "eval:(doc.purpose!==\"Sales Return\" && doc.purpose!==\"Purchase Return\")", 
-  "doctype": "DocField", 
-  "fieldname": "sb1", 
-  "fieldtype": "Section Break", 
-  "label": "From Bill of Materials", 
-  "read_only": 0
- }, 
- {
-  "allow_on_submit": 0, 
-  "depends_on": "eval:inList([\"Material Transfer\", \"Manufacture/Repack\"], doc.purpose)", 
-  "doctype": "DocField", 
-  "fieldname": "production_order", 
-  "fieldtype": "Link", 
-  "hidden": 0, 
-  "in_filter": 1, 
-  "label": "Production Order", 
-  "no_copy": 0, 
-  "oldfieldname": "production_order", 
-  "oldfieldtype": "Link", 
-  "options": "Production Order", 
-  "print_hide": 1, 
-  "read_only": 0, 
-  "report_hide": 0, 
-  "reqd": 0, 
-  "search_index": 1
- }, 
- {
-  "depends_on": "eval:!inList([\"Sales Return\", \"Purchase Return\"], doc.purpose)", 
-  "doctype": "DocField", 
-  "fieldname": "bom_no", 
-  "fieldtype": "Link", 
-  "label": "BOM No", 
-  "options": "BOM", 
-  "read_only": 0
- }, 
- {
-  "allow_on_submit": 0, 
-  "depends_on": "eval:!inList([\"Sales Return\", \"Purchase Return\"], doc.purpose)", 
-  "description": "As per Stock UOM", 
-  "doctype": "DocField", 
-  "fieldname": "fg_completed_qty", 
-  "fieldtype": "Float", 
-  "hidden": 0, 
-  "in_filter": 0, 
-  "label": "Manufacturing Quantity", 
-  "no_copy": 0, 
-  "oldfieldname": "fg_completed_qty", 
-  "oldfieldtype": "Currency", 
-  "print_hide": 1, 
-  "read_only": 0, 
-  "report_hide": 0, 
-  "reqd": 0, 
-  "search_index": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "cb1", 
-  "fieldtype": "Column Break", 
-  "read_only": 0
- }, 
- {
-  "default": "1", 
-  "depends_on": "eval:!inList([\"Sales Return\", \"Purchase Return\"], doc.purpose)", 
-  "description": "If checked, BOM for sub-assembly items will be considered for getting raw materials. Otherwise, all sub-assembly items will be treated as a raw material.", 
-  "doctype": "DocField", 
-  "fieldname": "use_multi_level_bom", 
-  "fieldtype": "Check", 
-  "label": "Use Multi-Level BOM", 
-  "read_only": 0
- }, 
- {
-  "allow_on_submit": 0, 
-  "depends_on": "eval:!inList([\"Sales Return\", \"Purchase Return\"], doc.purpose)", 
-  "doctype": "DocField", 
-  "fieldname": "get_items", 
-  "fieldtype": "Button", 
-  "hidden": 0, 
-  "in_filter": 0, 
-  "label": "Get Items", 
-  "no_copy": 0, 
-  "oldfieldtype": "Button", 
-  "print_hide": 1, 
-  "read_only": 0, 
-  "report_hide": 0, 
-  "reqd": 0, 
-  "search_index": 0
- }, 
- {
-  "depends_on": "eval:(doc.purpose==\"Sales Return\" || doc.purpose==\"Purchase Return\")", 
-  "doctype": "DocField", 
-  "fieldname": "contact_section", 
-  "fieldtype": "Section Break", 
-  "label": "Contact Info", 
-  "read_only": 0
- }, 
- {
-  "allow_on_submit": 0, 
-  "depends_on": "eval:doc.purpose==\"Purchase Return\"", 
-  "doctype": "DocField", 
-  "fieldname": "supplier", 
-  "fieldtype": "Link", 
-  "hidden": 0, 
-  "in_filter": 0, 
-  "label": "Supplier", 
-  "no_copy": 1, 
-  "oldfieldname": "supplier", 
-  "oldfieldtype": "Link", 
-  "options": "Supplier", 
-  "print_hide": 1, 
-  "read_only": 0, 
-  "report_hide": 0, 
-  "reqd": 0, 
-  "search_index": 0
- }, 
- {
-  "allow_on_submit": 0, 
-  "depends_on": "eval:doc.purpose==\"Purchase Return\"", 
-  "doctype": "DocField", 
-  "fieldname": "supplier_name", 
-  "fieldtype": "Data", 
-  "hidden": 0, 
-  "in_filter": 0, 
-  "label": "Supplier Name", 
-  "no_copy": 1, 
-  "oldfieldname": "supplier_name", 
-  "oldfieldtype": "Data", 
-  "print_hide": 0, 
-  "read_only": 1, 
-  "report_hide": 0, 
-  "reqd": 0, 
-  "search_index": 0
- }, 
- {
-  "allow_on_submit": 0, 
-  "depends_on": "eval:doc.purpose==\"Purchase Return\"", 
-  "doctype": "DocField", 
-  "fieldname": "supplier_address", 
-  "fieldtype": "Small Text", 
-  "hidden": 0, 
-  "in_filter": 0, 
-  "label": "Supplier Address", 
-  "no_copy": 1, 
-  "oldfieldname": "supplier_address", 
-  "oldfieldtype": "Small Text", 
-  "print_hide": 0, 
-  "read_only": 0, 
-  "report_hide": 0, 
-  "reqd": 0, 
-  "search_index": 0
- }, 
- {
-  "allow_on_submit": 0, 
-  "depends_on": "eval:doc.purpose==\"Sales Return\"", 
-  "doctype": "DocField", 
-  "fieldname": "customer", 
-  "fieldtype": "Link", 
-  "hidden": 0, 
-  "in_filter": 0, 
-  "label": "Customer", 
-  "no_copy": 1, 
-  "oldfieldname": "customer", 
-  "oldfieldtype": "Link", 
-  "options": "Customer", 
-  "print_hide": 1, 
-  "read_only": 0, 
-  "report_hide": 0, 
-  "reqd": 0, 
-  "search_index": 0
- }, 
- {
-  "allow_on_submit": 0, 
-  "depends_on": "eval:doc.purpose==\"Sales Return\"", 
-  "doctype": "DocField", 
-  "fieldname": "customer_name", 
-  "fieldtype": "Data", 
-  "hidden": 0, 
-  "in_filter": 0, 
-  "label": "Customer Name", 
-  "no_copy": 1, 
-  "oldfieldname": "customer_name", 
-  "oldfieldtype": "Data", 
-  "print_hide": 0, 
-  "read_only": 1, 
-  "report_hide": 0, 
-  "reqd": 0, 
-  "search_index": 0
- }, 
- {
-  "allow_on_submit": 0, 
-  "depends_on": "eval:doc.purpose==\"Sales Return\"", 
-  "doctype": "DocField", 
-  "fieldname": "customer_address", 
-  "fieldtype": "Small Text", 
-  "hidden": 0, 
-  "in_filter": 0, 
-  "label": "Customer Address", 
-  "no_copy": 1, 
-  "oldfieldname": "customer_address", 
-  "oldfieldtype": "Small Text", 
-  "print_hide": 0, 
-  "read_only": 0, 
-  "report_hide": 0, 
-  "reqd": 0, 
-  "search_index": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "more_info", 
-  "fieldtype": "Section Break", 
-  "label": "More Info", 
-  "oldfieldtype": "Section Break", 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "col4", 
-  "fieldtype": "Column Break", 
-  "print_width": "50%", 
-  "read_only": 0, 
-  "width": "50%"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "total_amount", 
-  "fieldtype": "Currency", 
-  "label": "Total Amount", 
-  "options": "Company:company:default_currency", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "project_name", 
-  "fieldtype": "Link", 
-  "in_filter": 1, 
-  "label": "Project Name", 
-  "oldfieldname": "project_name", 
-  "oldfieldtype": "Link", 
-  "options": "Project", 
-  "read_only": 0
- }, 
- {
-  "allow_on_submit": 0, 
-  "doctype": "DocField", 
-  "fieldname": "select_print_heading", 
-  "fieldtype": "Link", 
-  "hidden": 0, 
-  "in_filter": 0, 
-  "label": "Print Heading", 
-  "no_copy": 0, 
-  "oldfieldname": "select_print_heading", 
-  "oldfieldtype": "Link", 
-  "options": "Print Heading", 
-  "print_hide": 0, 
-  "read_only": 0, 
-  "report_hide": 0, 
-  "reqd": 0, 
-  "search_index": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "fiscal_year", 
-  "fieldtype": "Select", 
-  "in_filter": 0, 
-  "label": "Fiscal Year", 
-  "options": "link:Fiscal Year", 
-  "print_hide": 1, 
-  "read_only": 0, 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "col5", 
-  "fieldtype": "Column Break", 
-  "print_width": "50%", 
-  "read_only": 0, 
-  "width": "50%"
- }, 
- {
-  "allow_on_submit": 0, 
-  "doctype": "DocField", 
-  "fieldname": "company", 
-  "fieldtype": "Link", 
-  "hidden": 0, 
-  "in_filter": 1, 
-  "label": "Company", 
-  "no_copy": 0, 
-  "oldfieldname": "company", 
-  "oldfieldtype": "Link", 
-  "options": "Company", 
-  "print_hide": 1, 
-  "read_only": 0, 
-  "report_hide": 0, 
-  "reqd": 1, 
-  "search_index": 0
- }, 
- {
-  "allow_on_submit": 0, 
-  "doctype": "DocField", 
-  "fieldname": "amended_from", 
-  "fieldtype": "Link", 
-  "hidden": 0, 
-  "ignore_restrictions": 1, 
-  "in_filter": 0, 
-  "label": "Amended From", 
-  "no_copy": 1, 
-  "oldfieldname": "amended_from", 
-  "oldfieldtype": "Link", 
-  "options": "Stock Entry", 
-  "print_hide": 1, 
-  "read_only": 1, 
-  "report_hide": 0, 
-  "reqd": 0, 
-  "search_index": 0
- }, 
- {
-  "allow_on_submit": 0, 
-  "doctype": "DocField", 
-  "fieldname": "remarks", 
-  "fieldtype": "Text", 
-  "hidden": 0, 
-  "in_filter": 0, 
-  "label": "Remarks", 
-  "no_copy": 1, 
-  "oldfieldname": "remarks", 
-  "oldfieldtype": "Text", 
-  "print_hide": 1, 
-  "read_only": 0, 
-  "report_hide": 0, 
-  "reqd": 0, 
-  "search_index": 0
- }, 
- {
-  "doctype": "DocPerm", 
-  "role": "Material User"
- }, 
- {
-  "doctype": "DocPerm", 
-  "role": "Manufacturing User"
- }, 
- {
-  "doctype": "DocPerm", 
-  "role": "Manufacturing Manager"
- }, 
- {
-  "doctype": "DocPerm", 
-  "role": "Material Manager"
- }
-]
\ No newline at end of file
+{
+ "allow_attach": 0, 
+ "allow_copy": 0, 
+ "allow_import": 1, 
+ "allow_rename": 0, 
+ "autoname": "naming_series:", 
+ "creation": "2013-04-09 11:43:55", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "fields": [
+  {
+   "fieldname": "col1", 
+   "fieldtype": "Column Break", 
+   "oldfieldtype": "Column Break", 
+   "permlevel": 0, 
+   "print_width": "50%", 
+   "read_only": 0, 
+   "width": "50%"
+  }, 
+  {
+   "allow_on_submit": 0, 
+   "fieldname": "naming_series", 
+   "fieldtype": "Select", 
+   "hidden": 0, 
+   "in_filter": 0, 
+   "label": "Series", 
+   "no_copy": 1, 
+   "oldfieldname": "naming_series", 
+   "oldfieldtype": "Select", 
+   "options": "\nSTE", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0, 
+   "report_hide": 0, 
+   "reqd": 1, 
+   "search_index": 0
+  }, 
+  {
+   "allow_on_submit": 0, 
+   "default": "Material Issue", 
+   "fieldname": "purpose", 
+   "fieldtype": "Select", 
+   "hidden": 0, 
+   "in_filter": 1, 
+   "in_list_view": 1, 
+   "label": "Purpose", 
+   "no_copy": 0, 
+   "oldfieldname": "purpose", 
+   "oldfieldtype": "Select", 
+   "options": "Material Issue\nMaterial Receipt\nMaterial Transfer\nManufacture/Repack\nSubcontract\nSales Return\nPurchase Return", 
+   "permlevel": 0, 
+   "print_hide": 0, 
+   "read_only": 0, 
+   "report_hide": 0, 
+   "reqd": 1, 
+   "search_index": 0
+  }, 
+  {
+   "allow_on_submit": 0, 
+   "depends_on": "eval:doc.purpose==\"Sales Return\"", 
+   "fieldname": "delivery_note_no", 
+   "fieldtype": "Link", 
+   "hidden": 0, 
+   "in_filter": 0, 
+   "label": "Delivery Note No", 
+   "no_copy": 1, 
+   "oldfieldname": "delivery_note_no", 
+   "oldfieldtype": "Link", 
+   "options": "Delivery Note", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0, 
+   "report_hide": 0, 
+   "reqd": 0, 
+   "search_index": 1
+  }, 
+  {
+   "depends_on": "eval:doc.purpose==\"Sales Return\"", 
+   "fieldname": "sales_invoice_no", 
+   "fieldtype": "Link", 
+   "hidden": 0, 
+   "label": "Sales Invoice No", 
+   "no_copy": 1, 
+   "options": "Sales Invoice", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0
+  }, 
+  {
+   "allow_on_submit": 0, 
+   "depends_on": "eval:doc.purpose==\"Purchase Return\"", 
+   "fieldname": "purchase_receipt_no", 
+   "fieldtype": "Link", 
+   "hidden": 0, 
+   "in_filter": 0, 
+   "label": "Purchase Receipt No", 
+   "no_copy": 1, 
+   "oldfieldname": "purchase_receipt_no", 
+   "oldfieldtype": "Link", 
+   "options": "Purchase Receipt", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0, 
+   "report_hide": 0, 
+   "reqd": 0, 
+   "search_index": 1
+  }, 
+  {
+   "fieldname": "col2", 
+   "fieldtype": "Column Break", 
+   "oldfieldtype": "Column Break", 
+   "permlevel": 0, 
+   "print_width": "50%", 
+   "read_only": 0, 
+   "width": "50%"
+  }, 
+  {
+   "allow_on_submit": 0, 
+   "default": "Today", 
+   "fieldname": "posting_date", 
+   "fieldtype": "Date", 
+   "hidden": 0, 
+   "in_filter": 1, 
+   "in_list_view": 0, 
+   "label": "Posting Date", 
+   "no_copy": 1, 
+   "oldfieldname": "posting_date", 
+   "oldfieldtype": "Date", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0, 
+   "report_hide": 0, 
+   "reqd": 1, 
+   "search_index": 1
+  }, 
+  {
+   "allow_on_submit": 0, 
+   "fieldname": "posting_time", 
+   "fieldtype": "Time", 
+   "hidden": 0, 
+   "in_filter": 0, 
+   "label": "Posting Time", 
+   "no_copy": 1, 
+   "oldfieldname": "posting_time", 
+   "oldfieldtype": "Time", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0, 
+   "report_hide": 0, 
+   "reqd": 1, 
+   "search_index": 0
+  }, 
+  {
+   "fieldname": "items_section", 
+   "fieldtype": "Section Break", 
+   "label": "Items", 
+   "oldfieldtype": "Section Break", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "allow_on_submit": 0, 
+   "fieldname": "from_warehouse", 
+   "fieldtype": "Link", 
+   "hidden": 0, 
+   "in_filter": 0, 
+   "in_list_view": 1, 
+   "label": "Default Source Warehouse", 
+   "no_copy": 1, 
+   "oldfieldname": "from_warehouse", 
+   "oldfieldtype": "Link", 
+   "options": "Warehouse", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0, 
+   "report_hide": 0, 
+   "reqd": 0, 
+   "search_index": 0
+  }, 
+  {
+   "fieldname": "cb0", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "allow_on_submit": 0, 
+   "fieldname": "to_warehouse", 
+   "fieldtype": "Link", 
+   "hidden": 0, 
+   "in_filter": 0, 
+   "in_list_view": 1, 
+   "label": "Default Target Warehouse", 
+   "no_copy": 1, 
+   "oldfieldname": "to_warehouse", 
+   "oldfieldtype": "Link", 
+   "options": "Warehouse", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0, 
+   "report_hide": 0, 
+   "reqd": 0, 
+   "search_index": 0
+  }, 
+  {
+   "fieldname": "sb0", 
+   "fieldtype": "Section Break", 
+   "options": "Simple", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "allow_on_submit": 0, 
+   "fieldname": "mtn_details", 
+   "fieldtype": "Table", 
+   "hidden": 0, 
+   "in_filter": 0, 
+   "label": "MTN Details", 
+   "no_copy": 0, 
+   "oldfieldname": "mtn_details", 
+   "oldfieldtype": "Table", 
+   "options": "Stock Entry Detail", 
+   "permlevel": 0, 
+   "print_hide": 0, 
+   "read_only": 0, 
+   "report_hide": 0, 
+   "reqd": 0, 
+   "search_index": 0
+  }, 
+  {
+   "description": "Get valuation rate and available stock at source/target warehouse on mentioned posting date-time. If serialized item, please press this button after entering serial nos.", 
+   "fieldname": "get_stock_and_rate", 
+   "fieldtype": "Button", 
+   "label": "Get Stock and Rate", 
+   "oldfieldtype": "Button", 
+   "options": "get_stock_and_rate", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0
+  }, 
+  {
+   "depends_on": "eval:(doc.purpose!==\"Sales Return\" && doc.purpose!==\"Purchase Return\")", 
+   "fieldname": "sb1", 
+   "fieldtype": "Section Break", 
+   "label": "From Bill of Materials", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "allow_on_submit": 0, 
+   "depends_on": "eval:inList([\"Material Transfer\", \"Manufacture/Repack\"], doc.purpose)", 
+   "fieldname": "production_order", 
+   "fieldtype": "Link", 
+   "hidden": 0, 
+   "in_filter": 1, 
+   "label": "Production Order", 
+   "no_copy": 0, 
+   "oldfieldname": "production_order", 
+   "oldfieldtype": "Link", 
+   "options": "Production Order", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0, 
+   "report_hide": 0, 
+   "reqd": 0, 
+   "search_index": 1
+  }, 
+  {
+   "depends_on": "eval:!inList([\"Sales Return\", \"Purchase Return\"], doc.purpose)", 
+   "fieldname": "bom_no", 
+   "fieldtype": "Link", 
+   "label": "BOM No", 
+   "options": "BOM", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "allow_on_submit": 0, 
+   "depends_on": "eval:!inList([\"Sales Return\", \"Purchase Return\"], doc.purpose)", 
+   "description": "As per Stock UOM", 
+   "fieldname": "fg_completed_qty", 
+   "fieldtype": "Float", 
+   "hidden": 0, 
+   "in_filter": 0, 
+   "label": "Manufacturing Quantity", 
+   "no_copy": 0, 
+   "oldfieldname": "fg_completed_qty", 
+   "oldfieldtype": "Currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0, 
+   "report_hide": 0, 
+   "reqd": 0, 
+   "search_index": 0
+  }, 
+  {
+   "fieldname": "cb1", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "default": "1", 
+   "depends_on": "eval:!inList([\"Sales Return\", \"Purchase Return\"], doc.purpose)", 
+   "description": "If checked, BOM for sub-assembly items will be considered for getting raw materials. Otherwise, all sub-assembly items will be treated as a raw material.", 
+   "fieldname": "use_multi_level_bom", 
+   "fieldtype": "Check", 
+   "label": "Use Multi-Level BOM", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "allow_on_submit": 0, 
+   "depends_on": "eval:!inList([\"Sales Return\", \"Purchase Return\"], doc.purpose)", 
+   "fieldname": "get_items", 
+   "fieldtype": "Button", 
+   "hidden": 0, 
+   "in_filter": 0, 
+   "label": "Get Items", 
+   "no_copy": 0, 
+   "oldfieldtype": "Button", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0, 
+   "report_hide": 0, 
+   "reqd": 0, 
+   "search_index": 0
+  }, 
+  {
+   "depends_on": "eval:(doc.purpose==\"Sales Return\" || doc.purpose==\"Purchase Return\")", 
+   "fieldname": "contact_section", 
+   "fieldtype": "Section Break", 
+   "label": "Contact Info", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "allow_on_submit": 0, 
+   "depends_on": "eval:doc.purpose==\"Purchase Return\"", 
+   "fieldname": "supplier", 
+   "fieldtype": "Link", 
+   "hidden": 0, 
+   "in_filter": 0, 
+   "label": "Supplier", 
+   "no_copy": 1, 
+   "oldfieldname": "supplier", 
+   "oldfieldtype": "Link", 
+   "options": "Supplier", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0, 
+   "report_hide": 0, 
+   "reqd": 0, 
+   "search_index": 0
+  }, 
+  {
+   "allow_on_submit": 0, 
+   "depends_on": "eval:doc.purpose==\"Purchase Return\"", 
+   "fieldname": "supplier_name", 
+   "fieldtype": "Data", 
+   "hidden": 0, 
+   "in_filter": 0, 
+   "label": "Supplier Name", 
+   "no_copy": 1, 
+   "oldfieldname": "supplier_name", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "print_hide": 0, 
+   "read_only": 1, 
+   "report_hide": 0, 
+   "reqd": 0, 
+   "search_index": 0
+  }, 
+  {
+   "allow_on_submit": 0, 
+   "depends_on": "eval:doc.purpose==\"Purchase Return\"", 
+   "fieldname": "supplier_address", 
+   "fieldtype": "Small Text", 
+   "hidden": 0, 
+   "in_filter": 0, 
+   "label": "Supplier Address", 
+   "no_copy": 1, 
+   "oldfieldname": "supplier_address", 
+   "oldfieldtype": "Small Text", 
+   "permlevel": 0, 
+   "print_hide": 0, 
+   "read_only": 0, 
+   "report_hide": 0, 
+   "reqd": 0, 
+   "search_index": 0
+  }, 
+  {
+   "allow_on_submit": 0, 
+   "depends_on": "eval:doc.purpose==\"Sales Return\"", 
+   "fieldname": "customer", 
+   "fieldtype": "Link", 
+   "hidden": 0, 
+   "in_filter": 0, 
+   "label": "Customer", 
+   "no_copy": 1, 
+   "oldfieldname": "customer", 
+   "oldfieldtype": "Link", 
+   "options": "Customer", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0, 
+   "report_hide": 0, 
+   "reqd": 0, 
+   "search_index": 0
+  }, 
+  {
+   "allow_on_submit": 0, 
+   "depends_on": "eval:doc.purpose==\"Sales Return\"", 
+   "fieldname": "customer_name", 
+   "fieldtype": "Data", 
+   "hidden": 0, 
+   "in_filter": 0, 
+   "label": "Customer Name", 
+   "no_copy": 1, 
+   "oldfieldname": "customer_name", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "print_hide": 0, 
+   "read_only": 1, 
+   "report_hide": 0, 
+   "reqd": 0, 
+   "search_index": 0
+  }, 
+  {
+   "allow_on_submit": 0, 
+   "depends_on": "eval:doc.purpose==\"Sales Return\"", 
+   "fieldname": "customer_address", 
+   "fieldtype": "Small Text", 
+   "hidden": 0, 
+   "in_filter": 0, 
+   "label": "Customer Address", 
+   "no_copy": 1, 
+   "oldfieldname": "customer_address", 
+   "oldfieldtype": "Small Text", 
+   "permlevel": 0, 
+   "print_hide": 0, 
+   "read_only": 0, 
+   "report_hide": 0, 
+   "reqd": 0, 
+   "search_index": 0
+  }, 
+  {
+   "fieldname": "more_info", 
+   "fieldtype": "Section Break", 
+   "label": "More Info", 
+   "oldfieldtype": "Section Break", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "col4", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0, 
+   "print_width": "50%", 
+   "read_only": 0, 
+   "width": "50%"
+  }, 
+  {
+   "fieldname": "total_amount", 
+   "fieldtype": "Currency", 
+   "label": "Total Amount", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "project_name", 
+   "fieldtype": "Link", 
+   "in_filter": 1, 
+   "label": "Project Name", 
+   "oldfieldname": "project_name", 
+   "oldfieldtype": "Link", 
+   "options": "Project", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "allow_on_submit": 0, 
+   "fieldname": "select_print_heading", 
+   "fieldtype": "Link", 
+   "hidden": 0, 
+   "in_filter": 0, 
+   "label": "Print Heading", 
+   "no_copy": 0, 
+   "oldfieldname": "select_print_heading", 
+   "oldfieldtype": "Link", 
+   "options": "Print Heading", 
+   "permlevel": 0, 
+   "print_hide": 0, 
+   "read_only": 0, 
+   "report_hide": 0, 
+   "reqd": 0, 
+   "search_index": 0
+  }, 
+  {
+   "fieldname": "fiscal_year", 
+   "fieldtype": "Select", 
+   "in_filter": 0, 
+   "label": "Fiscal Year", 
+   "options": "link:Fiscal Year", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "col5", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0, 
+   "print_width": "50%", 
+   "read_only": 0, 
+   "width": "50%"
+  }, 
+  {
+   "allow_on_submit": 0, 
+   "fieldname": "company", 
+   "fieldtype": "Link", 
+   "hidden": 0, 
+   "in_filter": 1, 
+   "label": "Company", 
+   "no_copy": 0, 
+   "oldfieldname": "company", 
+   "oldfieldtype": "Link", 
+   "options": "Company", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0, 
+   "report_hide": 0, 
+   "reqd": 1, 
+   "search_index": 0
+  }, 
+  {
+   "allow_on_submit": 0, 
+   "fieldname": "amended_from", 
+   "fieldtype": "Link", 
+   "hidden": 0, 
+   "ignore_restrictions": 1, 
+   "in_filter": 0, 
+   "label": "Amended From", 
+   "no_copy": 1, 
+   "oldfieldname": "amended_from", 
+   "oldfieldtype": "Link", 
+   "options": "Stock Entry", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1, 
+   "report_hide": 0, 
+   "reqd": 0, 
+   "search_index": 0
+  }, 
+  {
+   "allow_on_submit": 0, 
+   "fieldname": "remarks", 
+   "fieldtype": "Text", 
+   "hidden": 0, 
+   "in_filter": 0, 
+   "label": "Remarks", 
+   "no_copy": 1, 
+   "oldfieldname": "remarks", 
+   "oldfieldtype": "Text", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0, 
+   "report_hide": 0, 
+   "reqd": 0, 
+   "search_index": 0
+  }
+ ], 
+ "hide_heading": 0, 
+ "hide_toolbar": 0, 
+ "icon": "icon-file-text", 
+ "idx": 1, 
+ "in_create": 0, 
+ "in_dialog": 0, 
+ "is_submittable": 1, 
+ "issingle": 0, 
+ "max_attachments": 0, 
+ "modified": "2014-02-26 10:59:19", 
+ "modified_by": "Administrator", 
+ "module": "Stock", 
+ "name": "Stock Entry", 
+ "owner": "Administrator", 
+ "permissions": [
+  {
+   "amend": 1, 
+   "cancel": 1, 
+   "create": 1, 
+   "delete": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Material User", 
+   "submit": 1, 
+   "write": 1
+  }, 
+  {
+   "amend": 1, 
+   "cancel": 1, 
+   "create": 1, 
+   "delete": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Manufacturing User", 
+   "submit": 1, 
+   "write": 1
+  }, 
+  {
+   "amend": 1, 
+   "cancel": 1, 
+   "create": 1, 
+   "delete": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Manufacturing Manager", 
+   "submit": 1, 
+   "write": 1
+  }, 
+  {
+   "amend": 1, 
+   "cancel": 1, 
+   "create": 1, 
+   "delete": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Material Manager", 
+   "submit": 1, 
+   "write": 1
+  }
+ ], 
+ "read_only": 0, 
+ "read_only_onload": 0, 
+ "search_fields": "transfer_date, from_warehouse, to_warehouse, purpose, remarks"
+}
\ No newline at end of file
diff --git a/erpnext/stock/doctype/stock_entry_detail/stock_entry_detail.txt b/erpnext/stock/doctype/stock_entry_detail/stock_entry_detail.txt
index 3bc1695..b141aa4 100644
--- a/erpnext/stock/doctype/stock_entry_detail/stock_entry_detail.txt
+++ b/erpnext/stock/doctype/stock_entry_detail/stock_entry_detail.txt
@@ -1,321 +1,308 @@
-[
- {
-  "creation": "2013-03-29 18:22:12", 
-  "docstatus": 0, 
-  "modified": "2014-02-03 12:59:27", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "autoname": "MTND/.######", 
-  "doctype": "DocType", 
-  "istable": 1, 
-  "module": "Stock", 
-  "name": "__common__"
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "Stock Entry Detail", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Stock Entry Detail"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "s_warehouse", 
-  "fieldtype": "Link", 
-  "in_filter": 1, 
-  "in_list_view": 1, 
-  "label": "Source Warehouse", 
-  "no_copy": 1, 
-  "oldfieldname": "s_warehouse", 
-  "oldfieldtype": "Link", 
-  "options": "Warehouse", 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "col_break1", 
-  "fieldtype": "Column Break"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "t_warehouse", 
-  "fieldtype": "Link", 
-  "in_filter": 1, 
-  "in_list_view": 1, 
-  "label": "Target Warehouse", 
-  "no_copy": 1, 
-  "oldfieldname": "t_warehouse", 
-  "oldfieldtype": "Link", 
-  "options": "Warehouse", 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "sec_break1", 
-  "fieldtype": "Section Break"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "item_code", 
-  "fieldtype": "Link", 
-  "in_filter": 1, 
-  "in_list_view": 1, 
-  "label": "Item Code", 
-  "oldfieldname": "item_code", 
-  "oldfieldtype": "Link", 
-  "options": "Item", 
-  "read_only": 0, 
-  "reqd": 1, 
-  "search_index": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "item_name", 
-  "fieldtype": "Data", 
-  "label": "Item Name", 
-  "print_hide": 1, 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "col_break2", 
-  "fieldtype": "Column Break"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "description", 
-  "fieldtype": "Text", 
-  "in_list_view": 1, 
-  "label": "Description", 
-  "oldfieldname": "description", 
-  "oldfieldtype": "Text", 
-  "print_width": "300px", 
-  "read_only": 0, 
-  "width": "300px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "quantity_and_rate", 
-  "fieldtype": "Section Break", 
-  "label": "Quantity and Rate"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "qty", 
-  "fieldtype": "Float", 
-  "in_list_view": 1, 
-  "label": "Qty", 
-  "oldfieldname": "qty", 
-  "oldfieldtype": "Currency", 
-  "read_only": 0, 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "uom", 
-  "fieldtype": "Link", 
-  "in_list_view": 0, 
-  "label": "UOM", 
-  "oldfieldname": "uom", 
-  "oldfieldtype": "Link", 
-  "options": "UOM", 
-  "read_only": 0, 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "incoming_rate", 
-  "fieldtype": "Currency", 
-  "in_list_view": 1, 
-  "label": "Valuation Rate", 
-  "oldfieldname": "incoming_rate", 
-  "oldfieldtype": "Currency", 
-  "options": "Company:company:default_currency", 
-  "read_only": 0, 
-  "reqd": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "col_break3", 
-  "fieldtype": "Column Break"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "stock_uom", 
-  "fieldtype": "Link", 
-  "in_filter": 0, 
-  "label": "Stock UOM", 
-  "oldfieldname": "stock_uom", 
-  "oldfieldtype": "Link", 
-  "options": "UOM", 
-  "print_hide": 1, 
-  "read_only": 1, 
-  "reqd": 1, 
-  "search_index": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "conversion_factor", 
-  "fieldtype": "Float", 
-  "label": "Conversion Factor", 
-  "oldfieldname": "conversion_factor", 
-  "oldfieldtype": "Currency", 
-  "print_hide": 1, 
-  "read_only": 1, 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "amount", 
-  "fieldtype": "Currency", 
-  "label": "Amount", 
-  "oldfieldname": "amount", 
-  "oldfieldtype": "Currency", 
-  "options": "Company:company:default_currency", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "serial_no_batch", 
-  "fieldtype": "Section Break", 
-  "label": "Serial No / Batch"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "serial_no", 
-  "fieldtype": "Text", 
-  "label": "Serial No", 
-  "no_copy": 1, 
-  "oldfieldname": "serial_no", 
-  "oldfieldtype": "Text", 
-  "read_only": 0, 
-  "reqd": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "col_break4", 
-  "fieldtype": "Column Break"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "batch_no", 
-  "fieldtype": "Link", 
-  "label": "Batch No", 
-  "oldfieldname": "batch_no", 
-  "oldfieldtype": "Link", 
-  "options": "Batch", 
-  "print_hide": 1, 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "accounting", 
-  "fieldtype": "Section Break", 
-  "label": "Accounting"
- }, 
- {
-  "depends_on": "eval:cint(sys_defaults.auto_accounting_for_stock)", 
-  "doctype": "DocField", 
-  "fieldname": "expense_account", 
-  "fieldtype": "Link", 
-  "label": "Difference Account", 
-  "options": "Account", 
-  "print_hide": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "col_break5", 
-  "fieldtype": "Column Break"
- }, 
- {
-  "default": ":Company", 
-  "depends_on": "eval:cint(sys_defaults.auto_accounting_for_stock)", 
-  "doctype": "DocField", 
-  "fieldname": "cost_center", 
-  "fieldtype": "Link", 
-  "hidden": 0, 
-  "label": "Cost Center", 
-  "options": "Cost Center", 
-  "print_hide": 1, 
-  "read_only": 0, 
-  "reqd": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "more_info", 
-  "fieldtype": "Section Break", 
-  "label": "More Info"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "actual_qty", 
-  "fieldtype": "Float", 
-  "in_filter": 1, 
-  "label": "Actual Qty (at source/target)", 
-  "no_copy": 1, 
-  "oldfieldname": "actual_qty", 
-  "oldfieldtype": "Read Only", 
-  "print_hide": 1, 
-  "read_only": 1, 
-  "reqd": 0, 
-  "search_index": 1
- }, 
- {
-  "description": "BOM No. for a Finished Good Item", 
-  "doctype": "DocField", 
-  "fieldname": "bom_no", 
-  "fieldtype": "Link", 
-  "hidden": 1, 
-  "label": "BOM No", 
-  "no_copy": 0, 
-  "options": "BOM", 
-  "print_hide": 1, 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "col_break6", 
-  "fieldtype": "Column Break"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "transfer_qty", 
-  "fieldtype": "Float", 
-  "label": "Qty as per Stock UOM", 
-  "oldfieldname": "transfer_qty", 
-  "oldfieldtype": "Currency", 
-  "print_hide": 1, 
-  "read_only": 1, 
-  "reqd": 1
- }, 
- {
-  "description": "Material Request used to make this Stock Entry", 
-  "doctype": "DocField", 
-  "fieldname": "material_request", 
-  "fieldtype": "Link", 
-  "hidden": 1, 
-  "label": "Material Request", 
-  "no_copy": 1, 
-  "options": "Material Request", 
-  "print_hide": 1, 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "material_request_item", 
-  "fieldtype": "Link", 
-  "hidden": 1, 
-  "label": "Material Request Item", 
-  "no_copy": 1, 
-  "options": "Material Request Item", 
-  "print_hide": 1, 
-  "read_only": 1
- }
-]
\ No newline at end of file
+{
+ "autoname": "MTND/.######", 
+ "creation": "2013-03-29 18:22:12", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "fields": [
+  {
+   "fieldname": "s_warehouse", 
+   "fieldtype": "Link", 
+   "in_filter": 1, 
+   "in_list_view": 1, 
+   "label": "Source Warehouse", 
+   "no_copy": 1, 
+   "oldfieldname": "s_warehouse", 
+   "oldfieldtype": "Link", 
+   "options": "Warehouse", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "col_break1", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "t_warehouse", 
+   "fieldtype": "Link", 
+   "in_filter": 1, 
+   "in_list_view": 1, 
+   "label": "Target Warehouse", 
+   "no_copy": 1, 
+   "oldfieldname": "t_warehouse", 
+   "oldfieldtype": "Link", 
+   "options": "Warehouse", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "sec_break1", 
+   "fieldtype": "Section Break", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "item_code", 
+   "fieldtype": "Link", 
+   "in_filter": 1, 
+   "in_list_view": 1, 
+   "label": "Item Code", 
+   "oldfieldname": "item_code", 
+   "oldfieldtype": "Link", 
+   "options": "Item", 
+   "permlevel": 0, 
+   "read_only": 0, 
+   "reqd": 1, 
+   "search_index": 1
+  }, 
+  {
+   "fieldname": "item_name", 
+   "fieldtype": "Data", 
+   "label": "Item Name", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "col_break2", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "description", 
+   "fieldtype": "Text", 
+   "in_list_view": 1, 
+   "label": "Description", 
+   "oldfieldname": "description", 
+   "oldfieldtype": "Text", 
+   "permlevel": 0, 
+   "print_width": "300px", 
+   "read_only": 0, 
+   "width": "300px"
+  }, 
+  {
+   "fieldname": "quantity_and_rate", 
+   "fieldtype": "Section Break", 
+   "label": "Quantity and Rate", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "qty", 
+   "fieldtype": "Float", 
+   "in_list_view": 1, 
+   "label": "Qty", 
+   "oldfieldname": "qty", 
+   "oldfieldtype": "Currency", 
+   "permlevel": 0, 
+   "read_only": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "uom", 
+   "fieldtype": "Link", 
+   "in_list_view": 0, 
+   "label": "UOM", 
+   "oldfieldname": "uom", 
+   "oldfieldtype": "Link", 
+   "options": "UOM", 
+   "permlevel": 0, 
+   "read_only": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "incoming_rate", 
+   "fieldtype": "Currency", 
+   "in_list_view": 1, 
+   "label": "Valuation Rate", 
+   "oldfieldname": "incoming_rate", 
+   "oldfieldtype": "Currency", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "read_only": 0, 
+   "reqd": 0
+  }, 
+  {
+   "fieldname": "col_break3", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "stock_uom", 
+   "fieldtype": "Link", 
+   "in_filter": 0, 
+   "label": "Stock UOM", 
+   "oldfieldname": "stock_uom", 
+   "oldfieldtype": "Link", 
+   "options": "UOM", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1, 
+   "reqd": 1, 
+   "search_index": 0
+  }, 
+  {
+   "fieldname": "conversion_factor", 
+   "fieldtype": "Float", 
+   "label": "Conversion Factor", 
+   "oldfieldname": "conversion_factor", 
+   "oldfieldtype": "Currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "amount", 
+   "fieldtype": "Currency", 
+   "label": "Amount", 
+   "oldfieldname": "amount", 
+   "oldfieldtype": "Currency", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "serial_no_batch", 
+   "fieldtype": "Section Break", 
+   "label": "Serial No / Batch", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "serial_no", 
+   "fieldtype": "Text", 
+   "label": "Serial No", 
+   "no_copy": 1, 
+   "oldfieldname": "serial_no", 
+   "oldfieldtype": "Text", 
+   "permlevel": 0, 
+   "read_only": 0, 
+   "reqd": 0
+  }, 
+  {
+   "fieldname": "col_break4", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "batch_no", 
+   "fieldtype": "Link", 
+   "label": "Batch No", 
+   "oldfieldname": "batch_no", 
+   "oldfieldtype": "Link", 
+   "options": "Batch", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "accounting", 
+   "fieldtype": "Section Break", 
+   "label": "Accounting", 
+   "permlevel": 0
+  }, 
+  {
+   "depends_on": "eval:cint(sys_defaults.auto_accounting_for_stock)", 
+   "fieldname": "expense_account", 
+   "fieldtype": "Link", 
+   "label": "Difference Account", 
+   "options": "Account", 
+   "permlevel": 0, 
+   "print_hide": 1
+  }, 
+  {
+   "fieldname": "col_break5", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0
+  }, 
+  {
+   "default": ":Company", 
+   "depends_on": "eval:cint(sys_defaults.auto_accounting_for_stock)", 
+   "fieldname": "cost_center", 
+   "fieldtype": "Link", 
+   "hidden": 0, 
+   "label": "Cost Center", 
+   "options": "Cost Center", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0, 
+   "reqd": 0
+  }, 
+  {
+   "fieldname": "more_info", 
+   "fieldtype": "Section Break", 
+   "label": "More Info", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "actual_qty", 
+   "fieldtype": "Float", 
+   "in_filter": 1, 
+   "label": "Actual Qty (at source/target)", 
+   "no_copy": 1, 
+   "oldfieldname": "actual_qty", 
+   "oldfieldtype": "Read Only", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1, 
+   "reqd": 0, 
+   "search_index": 1
+  }, 
+  {
+   "description": "BOM No. for a Finished Good Item", 
+   "fieldname": "bom_no", 
+   "fieldtype": "Link", 
+   "hidden": 1, 
+   "label": "BOM No", 
+   "no_copy": 0, 
+   "options": "BOM", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "col_break6", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "transfer_qty", 
+   "fieldtype": "Float", 
+   "label": "Qty as per Stock UOM", 
+   "oldfieldname": "transfer_qty", 
+   "oldfieldtype": "Currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1, 
+   "reqd": 1
+  }, 
+  {
+   "description": "Material Request used to make this Stock Entry", 
+   "fieldname": "material_request", 
+   "fieldtype": "Link", 
+   "hidden": 1, 
+   "label": "Material Request", 
+   "no_copy": 1, 
+   "options": "Material Request", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "material_request_item", 
+   "fieldtype": "Link", 
+   "hidden": 1, 
+   "label": "Material Request Item", 
+   "no_copy": 1, 
+   "options": "Material Request Item", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1
+  }
+ ], 
+ "idx": 1, 
+ "istable": 1, 
+ "modified": "2014-02-03 12:59:27", 
+ "modified_by": "Administrator", 
+ "module": "Stock", 
+ "name": "Stock Entry Detail", 
+ "owner": "Administrator"
+}
\ No newline at end of file
diff --git a/erpnext/stock/doctype/stock_ledger_entry/stock_ledger_entry.txt b/erpnext/stock/doctype/stock_ledger_entry/stock_ledger_entry.txt
index 641a68c..68fd18c 100644
--- a/erpnext/stock/doctype/stock_ledger_entry/stock_ledger_entry.txt
+++ b/erpnext/stock/doctype/stock_ledger_entry/stock_ledger_entry.txt
@@ -1,303 +1,287 @@
-[
- {
-  "creation": "2013-01-29 19:25:42", 
-  "docstatus": 0, 
-  "modified": "2013-11-03 14:11:43", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "allow_copy": 1, 
-  "allow_email": 1, 
-  "allow_print": 1, 
-  "autoname": "SLE/.########", 
-  "doctype": "DocType", 
-  "document_type": "Other", 
-  "hide_toolbar": 1, 
-  "icon": "icon-list", 
-  "in_create": 1, 
-  "module": "Stock", 
-  "name": "__common__"
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "Stock Ledger Entry", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "doctype": "DocPerm", 
-  "name": "__common__", 
-  "parent": "Stock Ledger Entry", 
-  "parentfield": "permissions", 
-  "parenttype": "DocType", 
-  "permlevel": 0, 
-  "read": 1, 
-  "report": 1, 
-  "submit": 0
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Stock Ledger Entry"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "item_code", 
-  "fieldtype": "Link", 
-  "in_filter": 1, 
-  "label": "Item Code", 
-  "oldfieldname": "item_code", 
-  "oldfieldtype": "Link", 
-  "options": "Item", 
-  "print_width": "100px", 
-  "read_only": 1, 
-  "reqd": 0, 
-  "search_index": 1, 
-  "width": "100px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "serial_no", 
-  "fieldtype": "Text", 
-  "in_filter": 0, 
-  "label": "Serial No", 
-  "print_width": "100px", 
-  "read_only": 1, 
-  "search_index": 0, 
-  "width": "100px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "batch_no", 
-  "fieldtype": "Data", 
-  "label": "Batch No", 
-  "oldfieldname": "batch_no", 
-  "oldfieldtype": "Data", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "warehouse", 
-  "fieldtype": "Link", 
-  "in_filter": 1, 
-  "label": "Warehouse", 
-  "oldfieldname": "warehouse", 
-  "oldfieldtype": "Link", 
-  "options": "Warehouse", 
-  "print_width": "100px", 
-  "read_only": 1, 
-  "search_index": 1, 
-  "width": "100px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "posting_date", 
-  "fieldtype": "Date", 
-  "in_filter": 1, 
-  "label": "Posting Date", 
-  "oldfieldname": "posting_date", 
-  "oldfieldtype": "Date", 
-  "print_width": "100px", 
-  "read_only": 1, 
-  "reqd": 0, 
-  "search_index": 1, 
-  "width": "100px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "posting_time", 
-  "fieldtype": "Time", 
-  "in_filter": 0, 
-  "label": "Posting Time", 
-  "oldfieldname": "posting_time", 
-  "oldfieldtype": "Time", 
-  "print_width": "100px", 
-  "read_only": 1, 
-  "search_index": 0, 
-  "width": "100px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "voucher_type", 
-  "fieldtype": "Data", 
-  "in_filter": 1, 
-  "label": "Voucher Type", 
-  "oldfieldname": "voucher_type", 
-  "oldfieldtype": "Data", 
-  "print_width": "150px", 
-  "read_only": 1, 
-  "search_index": 0, 
-  "width": "150px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "voucher_no", 
-  "fieldtype": "Data", 
-  "in_filter": 1, 
-  "label": "Voucher No", 
-  "oldfieldname": "voucher_no", 
-  "oldfieldtype": "Data", 
-  "print_width": "150px", 
-  "read_only": 1, 
-  "search_index": 0, 
-  "width": "150px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "voucher_detail_no", 
-  "fieldtype": "Data", 
-  "label": "Voucher Detail No", 
-  "oldfieldname": "voucher_detail_no", 
-  "oldfieldtype": "Data", 
-  "print_width": "150px", 
-  "read_only": 1, 
-  "width": "150px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "actual_qty", 
-  "fieldtype": "Float", 
-  "in_filter": 1, 
-  "label": "Actual Quantity", 
-  "oldfieldname": "actual_qty", 
-  "oldfieldtype": "Currency", 
-  "print_width": "150px", 
-  "read_only": 1, 
-  "width": "150px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "incoming_rate", 
-  "fieldtype": "Currency", 
-  "label": "Incoming Rate", 
-  "oldfieldname": "incoming_rate", 
-  "oldfieldtype": "Currency", 
-  "options": "Company:company:default_currency", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "stock_uom", 
-  "fieldtype": "Link", 
-  "label": "Stock UOM", 
-  "oldfieldname": "stock_uom", 
-  "oldfieldtype": "Data", 
-  "options": "UOM", 
-  "print_width": "150px", 
-  "read_only": 1, 
-  "width": "150px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "qty_after_transaction", 
-  "fieldtype": "Float", 
-  "in_filter": 1, 
-  "label": "Actual Qty After Transaction", 
-  "oldfieldname": "bin_aqat", 
-  "oldfieldtype": "Currency", 
-  "print_width": "150px", 
-  "read_only": 1, 
-  "width": "150px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "valuation_rate", 
-  "fieldtype": "Currency", 
-  "label": "Valuation Rate", 
-  "oldfieldname": "valuation_rate", 
-  "oldfieldtype": "Currency", 
-  "options": "Company:company:default_currency", 
-  "print_width": "150px", 
-  "read_only": 1, 
-  "width": "150px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "stock_value", 
-  "fieldtype": "Currency", 
-  "label": "Stock Value", 
-  "oldfieldname": "stock_value", 
-  "oldfieldtype": "Currency", 
-  "options": "Company:company:default_currency", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "stock_value_difference", 
-  "fieldtype": "Currency", 
-  "label": "Stock Value Difference", 
-  "options": "Company:company:default_currency", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "stock_queue", 
-  "fieldtype": "Text", 
-  "hidden": 1, 
-  "in_filter": 0, 
-  "label": "Stock Queue (FIFO)", 
-  "oldfieldname": "fcfs_stack", 
-  "oldfieldtype": "Text", 
-  "print_hide": 1, 
-  "read_only": 1, 
-  "report_hide": 1, 
-  "search_index": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "project", 
-  "fieldtype": "Link", 
-  "label": "Project", 
-  "options": "Project"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "company", 
-  "fieldtype": "Select", 
-  "in_filter": 1, 
-  "label": "Company", 
-  "oldfieldname": "company", 
-  "oldfieldtype": "Data", 
-  "options": "link:Company", 
-  "print_width": "150px", 
-  "read_only": 1, 
-  "search_index": 0, 
-  "width": "150px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "fiscal_year", 
-  "fieldtype": "Data", 
-  "in_filter": 1, 
-  "label": "Fiscal Year", 
-  "oldfieldname": "fiscal_year", 
-  "oldfieldtype": "Data", 
-  "print_width": "150px", 
-  "read_only": 1, 
-  "search_index": 0, 
-  "width": "150px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "is_cancelled", 
-  "fieldtype": "Select", 
-  "hidden": 1, 
-  "label": "Is Cancelled", 
-  "options": "\nNo\nYes", 
-  "report_hide": 1
- }, 
- {
-  "amend": 0, 
-  "cancel": 0, 
-  "create": 0, 
-  "doctype": "DocPerm", 
-  "role": "Material User", 
-  "write": 0
- }, 
- {
-  "doctype": "DocPerm", 
-  "role": "Accounts Manager"
- }
-]
\ No newline at end of file
+{
+ "allow_copy": 1, 
+ "allow_email": 1, 
+ "allow_print": 1, 
+ "autoname": "SLE/.########", 
+ "creation": "2013-01-29 19:25:42", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "document_type": "Other", 
+ "fields": [
+  {
+   "fieldname": "item_code", 
+   "fieldtype": "Link", 
+   "in_filter": 1, 
+   "label": "Item Code", 
+   "oldfieldname": "item_code", 
+   "oldfieldtype": "Link", 
+   "options": "Item", 
+   "permlevel": 0, 
+   "print_width": "100px", 
+   "read_only": 1, 
+   "reqd": 0, 
+   "search_index": 1, 
+   "width": "100px"
+  }, 
+  {
+   "fieldname": "serial_no", 
+   "fieldtype": "Text", 
+   "in_filter": 0, 
+   "label": "Serial No", 
+   "permlevel": 0, 
+   "print_width": "100px", 
+   "read_only": 1, 
+   "search_index": 0, 
+   "width": "100px"
+  }, 
+  {
+   "fieldname": "batch_no", 
+   "fieldtype": "Data", 
+   "label": "Batch No", 
+   "oldfieldname": "batch_no", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "warehouse", 
+   "fieldtype": "Link", 
+   "in_filter": 1, 
+   "label": "Warehouse", 
+   "oldfieldname": "warehouse", 
+   "oldfieldtype": "Link", 
+   "options": "Warehouse", 
+   "permlevel": 0, 
+   "print_width": "100px", 
+   "read_only": 1, 
+   "search_index": 1, 
+   "width": "100px"
+  }, 
+  {
+   "fieldname": "posting_date", 
+   "fieldtype": "Date", 
+   "in_filter": 1, 
+   "label": "Posting Date", 
+   "oldfieldname": "posting_date", 
+   "oldfieldtype": "Date", 
+   "permlevel": 0, 
+   "print_width": "100px", 
+   "read_only": 1, 
+   "reqd": 0, 
+   "search_index": 1, 
+   "width": "100px"
+  }, 
+  {
+   "fieldname": "posting_time", 
+   "fieldtype": "Time", 
+   "in_filter": 0, 
+   "label": "Posting Time", 
+   "oldfieldname": "posting_time", 
+   "oldfieldtype": "Time", 
+   "permlevel": 0, 
+   "print_width": "100px", 
+   "read_only": 1, 
+   "search_index": 0, 
+   "width": "100px"
+  }, 
+  {
+   "fieldname": "voucher_type", 
+   "fieldtype": "Data", 
+   "in_filter": 1, 
+   "label": "Voucher Type", 
+   "oldfieldname": "voucher_type", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "print_width": "150px", 
+   "read_only": 1, 
+   "search_index": 0, 
+   "width": "150px"
+  }, 
+  {
+   "fieldname": "voucher_no", 
+   "fieldtype": "Data", 
+   "in_filter": 1, 
+   "label": "Voucher No", 
+   "oldfieldname": "voucher_no", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "print_width": "150px", 
+   "read_only": 1, 
+   "search_index": 0, 
+   "width": "150px"
+  }, 
+  {
+   "fieldname": "voucher_detail_no", 
+   "fieldtype": "Data", 
+   "label": "Voucher Detail No", 
+   "oldfieldname": "voucher_detail_no", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "print_width": "150px", 
+   "read_only": 1, 
+   "width": "150px"
+  }, 
+  {
+   "fieldname": "actual_qty", 
+   "fieldtype": "Float", 
+   "in_filter": 1, 
+   "label": "Actual Quantity", 
+   "oldfieldname": "actual_qty", 
+   "oldfieldtype": "Currency", 
+   "permlevel": 0, 
+   "print_width": "150px", 
+   "read_only": 1, 
+   "width": "150px"
+  }, 
+  {
+   "fieldname": "incoming_rate", 
+   "fieldtype": "Currency", 
+   "label": "Incoming Rate", 
+   "oldfieldname": "incoming_rate", 
+   "oldfieldtype": "Currency", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "stock_uom", 
+   "fieldtype": "Link", 
+   "label": "Stock UOM", 
+   "oldfieldname": "stock_uom", 
+   "oldfieldtype": "Data", 
+   "options": "UOM", 
+   "permlevel": 0, 
+   "print_width": "150px", 
+   "read_only": 1, 
+   "width": "150px"
+  }, 
+  {
+   "fieldname": "qty_after_transaction", 
+   "fieldtype": "Float", 
+   "in_filter": 1, 
+   "label": "Actual Qty After Transaction", 
+   "oldfieldname": "bin_aqat", 
+   "oldfieldtype": "Currency", 
+   "permlevel": 0, 
+   "print_width": "150px", 
+   "read_only": 1, 
+   "width": "150px"
+  }, 
+  {
+   "fieldname": "valuation_rate", 
+   "fieldtype": "Currency", 
+   "label": "Valuation Rate", 
+   "oldfieldname": "valuation_rate", 
+   "oldfieldtype": "Currency", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "print_width": "150px", 
+   "read_only": 1, 
+   "width": "150px"
+  }, 
+  {
+   "fieldname": "stock_value", 
+   "fieldtype": "Currency", 
+   "label": "Stock Value", 
+   "oldfieldname": "stock_value", 
+   "oldfieldtype": "Currency", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "stock_value_difference", 
+   "fieldtype": "Currency", 
+   "label": "Stock Value Difference", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "stock_queue", 
+   "fieldtype": "Text", 
+   "hidden": 1, 
+   "in_filter": 0, 
+   "label": "Stock Queue (FIFO)", 
+   "oldfieldname": "fcfs_stack", 
+   "oldfieldtype": "Text", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1, 
+   "report_hide": 1, 
+   "search_index": 0
+  }, 
+  {
+   "fieldname": "project", 
+   "fieldtype": "Link", 
+   "label": "Project", 
+   "options": "Project", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "company", 
+   "fieldtype": "Select", 
+   "in_filter": 1, 
+   "label": "Company", 
+   "oldfieldname": "company", 
+   "oldfieldtype": "Data", 
+   "options": "link:Company", 
+   "permlevel": 0, 
+   "print_width": "150px", 
+   "read_only": 1, 
+   "search_index": 0, 
+   "width": "150px"
+  }, 
+  {
+   "fieldname": "fiscal_year", 
+   "fieldtype": "Data", 
+   "in_filter": 1, 
+   "label": "Fiscal Year", 
+   "oldfieldname": "fiscal_year", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "print_width": "150px", 
+   "read_only": 1, 
+   "search_index": 0, 
+   "width": "150px"
+  }, 
+  {
+   "fieldname": "is_cancelled", 
+   "fieldtype": "Select", 
+   "hidden": 1, 
+   "label": "Is Cancelled", 
+   "options": "\nNo\nYes", 
+   "permlevel": 0, 
+   "report_hide": 1
+  }
+ ], 
+ "hide_toolbar": 1, 
+ "icon": "icon-list", 
+ "idx": 1, 
+ "in_create": 1, 
+ "modified": "2013-11-03 14:11:43", 
+ "modified_by": "Administrator", 
+ "module": "Stock", 
+ "name": "Stock Ledger Entry", 
+ "owner": "Administrator", 
+ "permissions": [
+  {
+   "amend": 0, 
+   "cancel": 0, 
+   "create": 0, 
+   "permlevel": 0, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Material User", 
+   "submit": 0, 
+   "write": 0
+  }, 
+  {
+   "permlevel": 0, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Accounts Manager", 
+   "submit": 0
+  }
+ ]
+}
\ No newline at end of file
diff --git a/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.txt b/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.txt
index 90f5bc8..784f99e 100644
--- a/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.txt
+++ b/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.txt
@@ -1,162 +1,143 @@
-[
- {
-  "creation": "2013-03-28 10:35:31", 
-  "docstatus": 0, 
-  "modified": "2014-01-20 17:49:28", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "allow_attach": 0, 
-  "allow_copy": 1, 
-  "autoname": "SR/.######", 
-  "description": "This tool helps you to update or fix the quantity and valuation of stock in the system. It is typically used to synchronise the system values and what actually exists in your warehouses.", 
-  "doctype": "DocType", 
-  "icon": "icon-upload-alt", 
-  "is_submittable": 1, 
-  "max_attachments": 1, 
-  "module": "Stock", 
-  "name": "__common__", 
-  "read_only_onload": 0, 
-  "search_fields": "posting_date"
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "Stock Reconciliation", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "amend": 0, 
-  "cancel": 1, 
-  "create": 1, 
-  "delete": 1, 
-  "doctype": "DocPerm", 
-  "name": "__common__", 
-  "parent": "Stock Reconciliation", 
-  "parentfield": "permissions", 
-  "parenttype": "DocType", 
-  "permlevel": 0, 
-  "read": 1, 
-  "report": 1, 
-  "role": "Material Manager", 
-  "submit": 1, 
-  "write": 1
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Stock Reconciliation"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "posting_date", 
-  "fieldtype": "Date", 
-  "in_filter": 0, 
-  "in_list_view": 1, 
-  "label": "Posting Date", 
-  "oldfieldname": "reconciliation_date", 
-  "oldfieldtype": "Date", 
-  "read_only": 0, 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "posting_time", 
-  "fieldtype": "Time", 
-  "in_filter": 0, 
-  "in_list_view": 1, 
-  "label": "Posting Time", 
-  "oldfieldname": "reconciliation_time", 
-  "oldfieldtype": "Time", 
-  "read_only": 0, 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "amended_from", 
-  "fieldtype": "Link", 
-  "ignore_restrictions": 1, 
-  "label": "Amended From", 
-  "no_copy": 1, 
-  "options": "Stock Reconciliation", 
-  "print_hide": 1, 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "fiscal_year", 
-  "fieldtype": "Select", 
-  "label": "Fiscal Year", 
-  "options": "link:Fiscal Year", 
-  "print_hide": 1, 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "company", 
-  "fieldtype": "Link", 
-  "label": "Company", 
-  "options": "Company", 
-  "reqd": 1
- }, 
- {
-  "depends_on": "eval:cint(sys_defaults.auto_accounting_for_stock)", 
-  "doctype": "DocField", 
-  "fieldname": "expense_account", 
-  "fieldtype": "Link", 
-  "label": "Difference Account", 
-  "options": "Account"
- }, 
- {
-  "depends_on": "eval:cint(sys_defaults.auto_accounting_for_stock)", 
-  "doctype": "DocField", 
-  "fieldname": "cost_center", 
-  "fieldtype": "Link", 
-  "label": "Cost Center", 
-  "options": "Cost Center"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "col1", 
-  "fieldtype": "Column Break"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "upload_html", 
-  "fieldtype": "HTML", 
-  "label": "Upload HTML", 
-  "print_hide": 1, 
-  "read_only": 1
- }, 
- {
-  "depends_on": "reconciliation_json", 
-  "doctype": "DocField", 
-  "fieldname": "sb2", 
-  "fieldtype": "Section Break", 
-  "label": "Reconciliation Data"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "reconciliation_html", 
-  "fieldtype": "HTML", 
-  "hidden": 0, 
-  "label": "Reconciliation HTML", 
-  "print_hide": 0, 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "reconciliation_json", 
-  "fieldtype": "Long Text", 
-  "hidden": 1, 
-  "label": "Reconciliation JSON", 
-  "no_copy": 1, 
-  "print_hide": 1, 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocPerm"
- }
-]
\ No newline at end of file
+{
+ "allow_attach": 0, 
+ "allow_copy": 1, 
+ "autoname": "SR/.######", 
+ "creation": "2013-03-28 10:35:31", 
+ "description": "This tool helps you to update or fix the quantity and valuation of stock in the system. It is typically used to synchronise the system values and what actually exists in your warehouses.", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "fields": [
+  {
+   "fieldname": "posting_date", 
+   "fieldtype": "Date", 
+   "in_filter": 0, 
+   "in_list_view": 1, 
+   "label": "Posting Date", 
+   "oldfieldname": "reconciliation_date", 
+   "oldfieldtype": "Date", 
+   "permlevel": 0, 
+   "read_only": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "posting_time", 
+   "fieldtype": "Time", 
+   "in_filter": 0, 
+   "in_list_view": 1, 
+   "label": "Posting Time", 
+   "oldfieldname": "reconciliation_time", 
+   "oldfieldtype": "Time", 
+   "permlevel": 0, 
+   "read_only": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "amended_from", 
+   "fieldtype": "Link", 
+   "ignore_restrictions": 1, 
+   "label": "Amended From", 
+   "no_copy": 1, 
+   "options": "Stock Reconciliation", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "fiscal_year", 
+   "fieldtype": "Select", 
+   "label": "Fiscal Year", 
+   "options": "link:Fiscal Year", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "company", 
+   "fieldtype": "Link", 
+   "label": "Company", 
+   "options": "Company", 
+   "permlevel": 0, 
+   "reqd": 1
+  }, 
+  {
+   "depends_on": "eval:cint(sys_defaults.auto_accounting_for_stock)", 
+   "fieldname": "expense_account", 
+   "fieldtype": "Link", 
+   "label": "Difference Account", 
+   "options": "Account", 
+   "permlevel": 0
+  }, 
+  {
+   "depends_on": "eval:cint(sys_defaults.auto_accounting_for_stock)", 
+   "fieldname": "cost_center", 
+   "fieldtype": "Link", 
+   "label": "Cost Center", 
+   "options": "Cost Center", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "col1", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "upload_html", 
+   "fieldtype": "HTML", 
+   "label": "Upload HTML", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1
+  }, 
+  {
+   "depends_on": "reconciliation_json", 
+   "fieldname": "sb2", 
+   "fieldtype": "Section Break", 
+   "label": "Reconciliation Data", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "reconciliation_html", 
+   "fieldtype": "HTML", 
+   "hidden": 0, 
+   "label": "Reconciliation HTML", 
+   "permlevel": 0, 
+   "print_hide": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "reconciliation_json", 
+   "fieldtype": "Long Text", 
+   "hidden": 1, 
+   "label": "Reconciliation JSON", 
+   "no_copy": 1, 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1
+  }
+ ], 
+ "icon": "icon-upload-alt", 
+ "idx": 1, 
+ "is_submittable": 1, 
+ "max_attachments": 1, 
+ "modified": "2014-01-20 17:49:28", 
+ "modified_by": "Administrator", 
+ "module": "Stock", 
+ "name": "Stock Reconciliation", 
+ "owner": "Administrator", 
+ "permissions": [
+  {
+   "amend": 0, 
+   "cancel": 1, 
+   "create": 1, 
+   "delete": 1, 
+   "permlevel": 0, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Material Manager", 
+   "submit": 1, 
+   "write": 1
+  }
+ ], 
+ "read_only_onload": 0, 
+ "search_fields": "posting_date"
+}
\ No newline at end of file
diff --git a/erpnext/stock/doctype/stock_settings/stock_settings.txt b/erpnext/stock/doctype/stock_settings/stock_settings.txt
index 556420c..8f5fc03 100644
--- a/erpnext/stock/doctype/stock_settings/stock_settings.txt
+++ b/erpnext/stock/doctype/stock_settings/stock_settings.txt
@@ -1,137 +1,118 @@
-[
- {
-  "creation": "2013-06-24 16:37:54", 
-  "docstatus": 0, 
-  "modified": "2014-02-19 19:02:23", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "description": "Settings", 
-  "doctype": "DocType", 
-  "icon": "icon-cog", 
-  "issingle": 1, 
-  "module": "Stock", 
-  "name": "__common__"
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "Stock Settings", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "create": 1, 
-  "doctype": "DocPerm", 
-  "email": 1, 
-  "name": "__common__", 
-  "parent": "Stock Settings", 
-  "parentfield": "permissions", 
-  "parenttype": "DocType", 
-  "permlevel": 0, 
-  "print": 1, 
-  "read": 1, 
-  "role": "Material Manager", 
-  "write": 1
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Stock Settings"
- }, 
- {
-  "default": "Item Code", 
-  "doctype": "DocField", 
-  "fieldname": "item_naming_by", 
-  "fieldtype": "Select", 
-  "label": "Item Naming By", 
-  "options": "Item Code\nNaming Series"
- }, 
- {
-  "description": "<a href=\"#Sales Browser/Item Group\">Add / Edit</a>", 
-  "doctype": "DocField", 
-  "fieldname": "item_group", 
-  "fieldtype": "Link", 
-  "label": "Default Item Group", 
-  "options": "Item Group"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "stock_uom", 
-  "fieldtype": "Link", 
-  "label": "Default Stock UOM", 
-  "options": "UOM"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break_4", 
-  "fieldtype": "Column Break"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "allow_negative_stock", 
-  "fieldtype": "Check", 
-  "label": "Allow Negative Stock"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "valuation_method", 
-  "fieldtype": "Select", 
-  "label": "Default Valuation Method", 
-  "options": "FIFO\nMoving Average"
- }, 
- {
-  "description": "Percentage you are allowed to receive or deliver more against the quantity ordered. For example: If you have ordered 100 units. and your Allowance is 10% then you are allowed to receive 110 units.", 
-  "doctype": "DocField", 
-  "fieldname": "tolerance", 
-  "fieldtype": "Float", 
-  "label": "Allowance Percent"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "auto_material_request", 
-  "fieldtype": "Section Break", 
-  "label": "Auto Material Request"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "auto_indent", 
-  "fieldtype": "Check", 
-  "label": "Raise Material Request when stock reaches re-order level"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "reorder_email_notify", 
-  "fieldtype": "Check", 
-  "label": "Notify by Email on creation of automatic Material Request"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "freeze_stock_entries", 
-  "fieldtype": "Section Break", 
-  "label": "Freeze Stock Entries"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "stock_frozen_upto", 
-  "fieldtype": "Date", 
-  "label": "Stock Frozen Upto"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "stock_frozen_upto_days", 
-  "fieldtype": "Int", 
-  "label": "Freeze Stocks Older Than [Days]"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "stock_auth_role", 
-  "fieldtype": "Link", 
-  "label": "Role Allowed to edit frozen stock", 
-  "options": "Role"
- }, 
- {
-  "doctype": "DocPerm"
- }
-]
\ No newline at end of file
+{
+ "creation": "2013-06-24 16:37:54", 
+ "description": "Settings", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "fields": [
+  {
+   "default": "Item Code", 
+   "fieldname": "item_naming_by", 
+   "fieldtype": "Select", 
+   "label": "Item Naming By", 
+   "options": "Item Code\nNaming Series", 
+   "permlevel": 0
+  }, 
+  {
+   "description": "<a href=\"#Sales Browser/Item Group\">Add / Edit</a>", 
+   "fieldname": "item_group", 
+   "fieldtype": "Link", 
+   "label": "Default Item Group", 
+   "options": "Item Group", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "stock_uom", 
+   "fieldtype": "Link", 
+   "label": "Default Stock UOM", 
+   "options": "UOM", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "column_break_4", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "allow_negative_stock", 
+   "fieldtype": "Check", 
+   "label": "Allow Negative Stock", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "valuation_method", 
+   "fieldtype": "Select", 
+   "label": "Default Valuation Method", 
+   "options": "FIFO\nMoving Average", 
+   "permlevel": 0
+  }, 
+  {
+   "description": "Percentage you are allowed to receive or deliver more against the quantity ordered. For example: If you have ordered 100 units. and your Allowance is 10% then you are allowed to receive 110 units.", 
+   "fieldname": "tolerance", 
+   "fieldtype": "Float", 
+   "label": "Allowance Percent", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "auto_material_request", 
+   "fieldtype": "Section Break", 
+   "label": "Auto Material Request", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "auto_indent", 
+   "fieldtype": "Check", 
+   "label": "Raise Material Request when stock reaches re-order level", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "reorder_email_notify", 
+   "fieldtype": "Check", 
+   "label": "Notify by Email on creation of automatic Material Request", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "freeze_stock_entries", 
+   "fieldtype": "Section Break", 
+   "label": "Freeze Stock Entries", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "stock_frozen_upto", 
+   "fieldtype": "Date", 
+   "label": "Stock Frozen Upto", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "stock_frozen_upto_days", 
+   "fieldtype": "Int", 
+   "label": "Freeze Stocks Older Than [Days]", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "stock_auth_role", 
+   "fieldtype": "Link", 
+   "label": "Role Allowed to edit frozen stock", 
+   "options": "Role", 
+   "permlevel": 0
+  }
+ ], 
+ "icon": "icon-cog", 
+ "idx": 1, 
+ "issingle": 1, 
+ "modified": "2014-02-19 19:02:23", 
+ "modified_by": "Administrator", 
+ "module": "Stock", 
+ "name": "Stock Settings", 
+ "owner": "Administrator", 
+ "permissions": [
+  {
+   "create": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "role": "Material Manager", 
+   "write": 1
+  }
+ ]
+}
\ No newline at end of file
diff --git a/erpnext/stock/doctype/stock_uom_replace_utility/stock_uom_replace_utility.txt b/erpnext/stock/doctype/stock_uom_replace_utility/stock_uom_replace_utility.txt
index a4f368e..5814268 100644
--- a/erpnext/stock/doctype/stock_uom_replace_utility/stock_uom_replace_utility.txt
+++ b/erpnext/stock/doctype/stock_uom_replace_utility/stock_uom_replace_utility.txt
@@ -1,88 +1,76 @@
-[
- {
-  "creation": "2013-01-10 16:34:30", 
-  "docstatus": 0, 
-  "modified": "2013-12-20 19:21:48", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "doctype": "DocType", 
-  "icon": "icon-magic", 
-  "in_create": 0, 
-  "issingle": 1, 
-  "module": "Stock", 
-  "name": "__common__", 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "Stock UOM Replace Utility", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "create": 1, 
-  "doctype": "DocPerm", 
-  "email": 1, 
-  "name": "__common__", 
-  "parent": "Stock UOM Replace Utility", 
-  "parentfield": "permissions", 
-  "parenttype": "DocType", 
-  "permlevel": 0, 
-  "print": 1, 
-  "read": 1, 
-  "report": 0, 
-  "submit": 0, 
-  "write": 1
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Stock UOM Replace Utility"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "item_code", 
-  "fieldtype": "Link", 
-  "label": "Item", 
-  "options": "Item"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "current_stock_uom", 
-  "fieldtype": "Link", 
-  "label": "Current Stock UOM", 
-  "options": "UOM", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "new_stock_uom", 
-  "fieldtype": "Link", 
-  "label": "New Stock UOM", 
-  "options": "UOM"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "conversion_factor", 
-  "fieldtype": "Float", 
-  "label": "Conversion Factor"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "update", 
-  "fieldtype": "Button", 
-  "label": "Update", 
-  "options": "update_stock_uom"
- }, 
- {
-  "doctype": "DocPerm", 
-  "role": "Material Master Manager"
- }, 
- {
-  "doctype": "DocPerm", 
-  "role": "Material Manager"
- }
-]
\ No newline at end of file
+{
+ "creation": "2013-01-10 16:34:30", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "fields": [
+  {
+   "fieldname": "item_code", 
+   "fieldtype": "Link", 
+   "label": "Item", 
+   "options": "Item", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "current_stock_uom", 
+   "fieldtype": "Link", 
+   "label": "Current Stock UOM", 
+   "options": "UOM", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "new_stock_uom", 
+   "fieldtype": "Link", 
+   "label": "New Stock UOM", 
+   "options": "UOM", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "conversion_factor", 
+   "fieldtype": "Float", 
+   "label": "Conversion Factor", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "update", 
+   "fieldtype": "Button", 
+   "label": "Update", 
+   "options": "update_stock_uom", 
+   "permlevel": 0
+  }
+ ], 
+ "icon": "icon-magic", 
+ "idx": 1, 
+ "in_create": 0, 
+ "issingle": 1, 
+ "modified": "2013-12-20 19:21:48", 
+ "modified_by": "Administrator", 
+ "module": "Stock", 
+ "name": "Stock UOM Replace Utility", 
+ "owner": "Administrator", 
+ "permissions": [
+  {
+   "create": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 0, 
+   "role": "Material Master Manager", 
+   "submit": 0, 
+   "write": 1
+  }, 
+  {
+   "create": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 0, 
+   "role": "Material Manager", 
+   "submit": 0, 
+   "write": 1
+  }
+ ], 
+ "read_only": 0
+}
\ No newline at end of file
diff --git a/erpnext/stock/doctype/uom_conversion_detail/uom_conversion_detail.txt b/erpnext/stock/doctype/uom_conversion_detail/uom_conversion_detail.txt
index 0843921..b64d057 100644
--- a/erpnext/stock/doctype/uom_conversion_detail/uom_conversion_detail.txt
+++ b/erpnext/stock/doctype/uom_conversion_detail/uom_conversion_detail.txt
@@ -1,46 +1,34 @@
-[
- {
-  "creation": "2013-02-22 01:28:04", 
-  "docstatus": 0, 
-  "modified": "2013-12-20 19:21:53", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "autoname": "UCDD/.#####", 
-  "doctype": "DocType", 
-  "istable": 1, 
-  "module": "Stock", 
-  "name": "__common__"
- }, 
- {
-  "doctype": "DocField", 
-  "in_list_view": 1, 
-  "name": "__common__", 
-  "parent": "UOM Conversion Detail", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "doctype": "DocType", 
-  "name": "UOM Conversion Detail"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "uom", 
-  "fieldtype": "Link", 
-  "label": "UOM", 
-  "oldfieldname": "uom", 
-  "oldfieldtype": "Link", 
-  "options": "UOM"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "conversion_factor", 
-  "fieldtype": "Float", 
-  "label": "Conversion Factor", 
-  "oldfieldname": "conversion_factor", 
-  "oldfieldtype": "Float"
- }
-]
\ No newline at end of file
+{
+ "autoname": "UCDD/.#####", 
+ "creation": "2013-02-22 01:28:04", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "fields": [
+  {
+   "fieldname": "uom", 
+   "fieldtype": "Link", 
+   "in_list_view": 1, 
+   "label": "UOM", 
+   "oldfieldname": "uom", 
+   "oldfieldtype": "Link", 
+   "options": "UOM", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "conversion_factor", 
+   "fieldtype": "Float", 
+   "in_list_view": 1, 
+   "label": "Conversion Factor", 
+   "oldfieldname": "conversion_factor", 
+   "oldfieldtype": "Float", 
+   "permlevel": 0
+  }
+ ], 
+ "idx": 1, 
+ "istable": 1, 
+ "modified": "2013-12-20 19:21:53", 
+ "modified_by": "Administrator", 
+ "module": "Stock", 
+ "name": "UOM Conversion Detail", 
+ "owner": "Administrator"
+}
\ No newline at end of file
diff --git a/erpnext/stock/doctype/warehouse/warehouse.txt b/erpnext/stock/doctype/warehouse/warehouse.txt
index 589fa99..1831f35 100644
--- a/erpnext/stock/doctype/warehouse/warehouse.txt
+++ b/erpnext/stock/doctype/warehouse/warehouse.txt
@@ -1,218 +1,215 @@
-[
- {
-  "creation": "2013-03-07 18:50:32", 
-  "docstatus": 0, 
-  "modified": "2014-03-13 16:26:29", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "allow_import": 1, 
-  "allow_rename": 1, 
-  "description": "A logical Warehouse against which stock entries are made.", 
-  "doctype": "DocType", 
-  "document_type": "Master", 
-  "icon": "icon-building", 
-  "module": "Stock", 
-  "name": "__common__"
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "Warehouse", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "doctype": "DocPerm", 
-  "email": 1, 
-  "name": "__common__", 
-  "parent": "Warehouse", 
-  "parentfield": "permissions", 
-  "parenttype": "DocType", 
-  "permlevel": 0, 
-  "print": 1, 
-  "read": 1, 
-  "report": 1
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Warehouse"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "warehouse_detail", 
-  "fieldtype": "Section Break", 
-  "label": "Warehouse Detail", 
-  "oldfieldtype": "Section Break", 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "warehouse_name", 
-  "fieldtype": "Data", 
-  "label": "Warehouse Name", 
-  "oldfieldname": "warehouse_name", 
-  "oldfieldtype": "Data", 
-  "read_only": 0, 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "company", 
-  "fieldtype": "Link", 
-  "in_filter": 1, 
-  "label": "Company", 
-  "oldfieldname": "company", 
-  "oldfieldtype": "Link", 
-  "options": "Company", 
-  "read_only": 0, 
-  "reqd": 1, 
-  "search_index": 1
- }, 
- {
-  "depends_on": "eval:sys_defaults.auto_accounting_for_stock", 
-  "description": "Account for the warehouse (Perpetual Inventory) will be created under this Account.", 
-  "doctype": "DocField", 
-  "fieldname": "create_account_under", 
-  "fieldtype": "Link", 
-  "label": "Parent Account", 
-  "options": "Account"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "disabled", 
-  "fieldtype": "Check", 
-  "label": "Disabled"
- }, 
- {
-  "description": "For Reference Only.", 
-  "doctype": "DocField", 
-  "fieldname": "warehouse_contact_info", 
-  "fieldtype": "Section Break", 
-  "label": "Warehouse Contact Info", 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "email_id", 
-  "fieldtype": "Data", 
-  "hidden": 1, 
-  "label": "Email Id", 
-  "oldfieldname": "email_id", 
-  "oldfieldtype": "Data", 
-  "print_hide": 0, 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "phone_no", 
-  "fieldtype": "Data", 
-  "label": "Phone No", 
-  "oldfieldname": "phone_no", 
-  "oldfieldtype": "Int", 
-  "options": "Phone", 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "mobile_no", 
-  "fieldtype": "Data", 
-  "label": "Mobile No", 
-  "oldfieldname": "mobile_no", 
-  "oldfieldtype": "Int", 
-  "options": "Phone", 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break0", 
-  "fieldtype": "Column Break", 
-  "oldfieldtype": "Column Break", 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "address_line_1", 
-  "fieldtype": "Data", 
-  "label": "Address Line 1", 
-  "oldfieldname": "address_line_1", 
-  "oldfieldtype": "Data", 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "address_line_2", 
-  "fieldtype": "Data", 
-  "label": "Address Line 2", 
-  "oldfieldname": "address_line_2", 
-  "oldfieldtype": "Data", 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "city", 
-  "fieldtype": "Data", 
-  "in_list_view": 1, 
-  "label": "City", 
-  "oldfieldname": "city", 
-  "oldfieldtype": "Data", 
-  "read_only": 0, 
-  "reqd": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "state", 
-  "fieldtype": "Data", 
-  "label": "State", 
-  "oldfieldname": "state", 
-  "oldfieldtype": "Select", 
-  "options": "Suggest", 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "pin", 
-  "fieldtype": "Int", 
-  "label": "PIN", 
-  "oldfieldname": "pin", 
-  "oldfieldtype": "Int", 
-  "read_only": 0
- }, 
- {
-  "amend": 0, 
-  "cancel": 0, 
-  "create": 1, 
-  "delete": 1, 
-  "doctype": "DocPerm", 
-  "role": "Material Master Manager", 
-  "submit": 0, 
-  "write": 1
- }, 
- {
-  "amend": 0, 
-  "cancel": 0, 
-  "create": 0, 
-  "delete": 0, 
-  "doctype": "DocPerm", 
-  "role": "Material User", 
-  "submit": 0, 
-  "write": 0
- }, 
- {
-  "delete": 0, 
-  "doctype": "DocPerm", 
-  "role": "Sales User"
- }, 
- {
-  "delete": 0, 
-  "doctype": "DocPerm", 
-  "role": "Purchase User"
- }, 
- {
-  "delete": 0, 
-  "doctype": "DocPerm", 
-  "role": "Accounts User"
- }
-]
\ No newline at end of file
+{
+ "allow_import": 1, 
+ "allow_rename": 1, 
+ "creation": "2013-03-07 18:50:32", 
+ "description": "A logical Warehouse against which stock entries are made.", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "document_type": "Master", 
+ "fields": [
+  {
+   "fieldname": "warehouse_detail", 
+   "fieldtype": "Section Break", 
+   "label": "Warehouse Detail", 
+   "oldfieldtype": "Section Break", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "warehouse_name", 
+   "fieldtype": "Data", 
+   "label": "Warehouse Name", 
+   "oldfieldname": "warehouse_name", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "read_only": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "company", 
+   "fieldtype": "Link", 
+   "in_filter": 1, 
+   "label": "Company", 
+   "oldfieldname": "company", 
+   "oldfieldtype": "Link", 
+   "options": "Company", 
+   "permlevel": 0, 
+   "read_only": 0, 
+   "reqd": 1, 
+   "search_index": 1
+  }, 
+  {
+   "depends_on": "eval:sys_defaults.auto_accounting_for_stock", 
+   "description": "Account for the warehouse (Perpetual Inventory) will be created under this Account.", 
+   "fieldname": "create_account_under", 
+   "fieldtype": "Link", 
+   "label": "Parent Account", 
+   "options": "Account", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "disabled", 
+   "fieldtype": "Check", 
+   "label": "Disabled", 
+   "permlevel": 0
+  }, 
+  {
+   "description": "For Reference Only.", 
+   "fieldname": "warehouse_contact_info", 
+   "fieldtype": "Section Break", 
+   "label": "Warehouse Contact Info", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "email_id", 
+   "fieldtype": "Data", 
+   "hidden": 1, 
+   "label": "Email Id", 
+   "oldfieldname": "email_id", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "print_hide": 0, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "phone_no", 
+   "fieldtype": "Data", 
+   "label": "Phone No", 
+   "oldfieldname": "phone_no", 
+   "oldfieldtype": "Int", 
+   "options": "Phone", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "mobile_no", 
+   "fieldtype": "Data", 
+   "label": "Mobile No", 
+   "oldfieldname": "mobile_no", 
+   "oldfieldtype": "Int", 
+   "options": "Phone", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "column_break0", 
+   "fieldtype": "Column Break", 
+   "oldfieldtype": "Column Break", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "address_line_1", 
+   "fieldtype": "Data", 
+   "label": "Address Line 1", 
+   "oldfieldname": "address_line_1", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "address_line_2", 
+   "fieldtype": "Data", 
+   "label": "Address Line 2", 
+   "oldfieldname": "address_line_2", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "city", 
+   "fieldtype": "Data", 
+   "in_list_view": 1, 
+   "label": "City", 
+   "oldfieldname": "city", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "read_only": 0, 
+   "reqd": 0
+  }, 
+  {
+   "fieldname": "state", 
+   "fieldtype": "Data", 
+   "label": "State", 
+   "oldfieldname": "state", 
+   "oldfieldtype": "Select", 
+   "options": "Suggest", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "pin", 
+   "fieldtype": "Int", 
+   "label": "PIN", 
+   "oldfieldname": "pin", 
+   "oldfieldtype": "Int", 
+   "permlevel": 0, 
+   "read_only": 0
+  }
+ ], 
+ "icon": "icon-building", 
+ "idx": 1, 
+ "modified": "2014-03-13 16:26:29", 
+ "modified_by": "Administrator", 
+ "module": "Stock", 
+ "name": "Warehouse", 
+ "owner": "Administrator", 
+ "permissions": [
+  {
+   "amend": 0, 
+   "cancel": 0, 
+   "create": 1, 
+   "delete": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Material Master Manager", 
+   "submit": 0, 
+   "write": 1
+  }, 
+  {
+   "amend": 0, 
+   "cancel": 0, 
+   "create": 0, 
+   "delete": 0, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Material User", 
+   "submit": 0, 
+   "write": 0
+  }, 
+  {
+   "delete": 0, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Sales User"
+  }, 
+  {
+   "delete": 0, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Purchase User"
+  }, 
+  {
+   "delete": 0, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Accounts User"
+  }
+ ]
+}
\ No newline at end of file
diff --git a/erpnext/stock/doctype/warehouse_user/warehouse_user.txt b/erpnext/stock/doctype/warehouse_user/warehouse_user.txt
index ae22eec..8c34697 100644
--- a/erpnext/stock/doctype/warehouse_user/warehouse_user.txt
+++ b/erpnext/stock/doctype/warehouse_user/warehouse_user.txt
@@ -1,38 +1,25 @@
-[
- {
-  "creation": "2013-02-22 01:28:05", 
-  "docstatus": 0, 
-  "modified": "2013-12-20 19:21:54", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "doctype": "DocType", 
-  "document_type": "Other", 
-  "istable": 1, 
-  "module": "Stock", 
-  "name": "__common__"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "user", 
-  "fieldtype": "Link", 
-  "in_list_view": 1, 
-  "label": "User", 
-  "name": "__common__", 
-  "options": "User", 
-  "parent": "Warehouse User", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0, 
-  "print_width": "200px", 
-  "width": "200px"
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Warehouse User"
- }, 
- {
-  "doctype": "DocField"
- }
-]
\ No newline at end of file
+{
+ "creation": "2013-02-22 01:28:05", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "document_type": "Other", 
+ "fields": [
+  {
+   "fieldname": "user", 
+   "fieldtype": "Link", 
+   "in_list_view": 1, 
+   "label": "User", 
+   "options": "User", 
+   "permlevel": 0, 
+   "print_width": "200px", 
+   "width": "200px"
+  }
+ ], 
+ "idx": 1, 
+ "istable": 1, 
+ "modified": "2013-12-20 19:21:54", 
+ "modified_by": "Administrator", 
+ "module": "Stock", 
+ "name": "Warehouse User", 
+ "owner": "Administrator"
+}
\ No newline at end of file
diff --git a/erpnext/stock/page/stock_ageing/stock_ageing.txt b/erpnext/stock/page/stock_ageing/stock_ageing.txt
index cd1cfbd..29d52ff 100644
--- a/erpnext/stock/page/stock_ageing/stock_ageing.txt
+++ b/erpnext/stock/page/stock_ageing/stock_ageing.txt
@@ -1,37 +1,23 @@
-[
- {
-  "creation": "2012-09-21 20:15:14", 
-  "docstatus": 0, 
-  "modified": "2013-07-11 14:44:08", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "doctype": "Page", 
-  "icon": "icon-table", 
-  "module": "Stock", 
-  "name": "__common__", 
-  "page_name": "stock-ageing", 
-  "standard": "Yes", 
-  "title": "Stock Ageing"
- }, 
- {
-  "doctype": "Page Role", 
-  "name": "__common__", 
-  "parent": "stock-ageing", 
-  "parentfield": "roles", 
-  "parenttype": "Page"
- }, 
- {
-  "doctype": "Page", 
-  "name": "stock-ageing"
- }, 
- {
-  "doctype": "Page Role", 
-  "role": "Analytics"
- }, 
- {
-  "doctype": "Page Role", 
-  "role": "Material Manager"
- }
-]
\ No newline at end of file
+{
+ "creation": "2012-09-21 20:15:14", 
+ "docstatus": 0, 
+ "doctype": "Page", 
+ "icon": "icon-table", 
+ "idx": 1, 
+ "modified": "2013-07-11 14:44:08", 
+ "modified_by": "Administrator", 
+ "module": "Stock", 
+ "name": "stock-ageing", 
+ "owner": "Administrator", 
+ "page_name": "stock-ageing", 
+ "roles": [
+  {
+   "role": "Analytics"
+  }, 
+  {
+   "role": "Material Manager"
+  }
+ ], 
+ "standard": "Yes", 
+ "title": "Stock Ageing"
+}
\ No newline at end of file
diff --git a/erpnext/stock/page/stock_analytics/stock_analytics.txt b/erpnext/stock/page/stock_analytics/stock_analytics.txt
index 140b102..f732a9a 100644
--- a/erpnext/stock/page/stock_analytics/stock_analytics.txt
+++ b/erpnext/stock/page/stock_analytics/stock_analytics.txt
@@ -1,37 +1,23 @@
-[
- {
-  "creation": "2012-09-21 20:15:14", 
-  "docstatus": 0, 
-  "modified": "2013-07-11 14:44:10", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "doctype": "Page", 
-  "icon": "icon-bar-chart", 
-  "module": "Stock", 
-  "name": "__common__", 
-  "page_name": "stock-analytics", 
-  "standard": "Yes", 
-  "title": "Stock Analytics"
- }, 
- {
-  "doctype": "Page Role", 
-  "name": "__common__", 
-  "parent": "stock-analytics", 
-  "parentfield": "roles", 
-  "parenttype": "Page"
- }, 
- {
-  "doctype": "Page", 
-  "name": "stock-analytics"
- }, 
- {
-  "doctype": "Page Role", 
-  "role": "Analytics"
- }, 
- {
-  "doctype": "Page Role", 
-  "role": "Material Manager"
- }
-]
\ No newline at end of file
+{
+ "creation": "2012-09-21 20:15:14", 
+ "docstatus": 0, 
+ "doctype": "Page", 
+ "icon": "icon-bar-chart", 
+ "idx": 1, 
+ "modified": "2013-07-11 14:44:10", 
+ "modified_by": "Administrator", 
+ "module": "Stock", 
+ "name": "stock-analytics", 
+ "owner": "Administrator", 
+ "page_name": "stock-analytics", 
+ "roles": [
+  {
+   "role": "Analytics"
+  }, 
+  {
+   "role": "Material Manager"
+  }
+ ], 
+ "standard": "Yes", 
+ "title": "Stock Analytics"
+}
\ No newline at end of file
diff --git a/erpnext/stock/page/stock_balance/stock_balance.txt b/erpnext/stock/page/stock_balance/stock_balance.txt
index 536448c..4c99474 100644
--- a/erpnext/stock/page/stock_balance/stock_balance.txt
+++ b/erpnext/stock/page/stock_balance/stock_balance.txt
@@ -1,37 +1,23 @@
-[
- {
-  "creation": "2012-12-27 18:57:47", 
-  "docstatus": 0, 
-  "modified": "2013-07-11 14:44:15", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "doctype": "Page", 
-  "icon": "icon-table", 
-  "module": "Stock", 
-  "name": "__common__", 
-  "page_name": "stock-balance", 
-  "standard": "Yes", 
-  "title": "Stock Balance"
- }, 
- {
-  "doctype": "Page Role", 
-  "name": "__common__", 
-  "parent": "stock-balance", 
-  "parentfield": "roles", 
-  "parenttype": "Page"
- }, 
- {
-  "doctype": "Page", 
-  "name": "stock-balance"
- }, 
- {
-  "doctype": "Page Role", 
-  "role": "Material Manager"
- }, 
- {
-  "doctype": "Page Role", 
-  "role": "Analytics"
- }
-]
\ No newline at end of file
+{
+ "creation": "2012-12-27 18:57:47", 
+ "docstatus": 0, 
+ "doctype": "Page", 
+ "icon": "icon-table", 
+ "idx": 1, 
+ "modified": "2013-07-11 14:44:15", 
+ "modified_by": "Administrator", 
+ "module": "Stock", 
+ "name": "stock-balance", 
+ "owner": "Administrator", 
+ "page_name": "stock-balance", 
+ "roles": [
+  {
+   "role": "Material Manager"
+  }, 
+  {
+   "role": "Analytics"
+  }
+ ], 
+ "standard": "Yes", 
+ "title": "Stock Balance"
+}
\ No newline at end of file
diff --git a/erpnext/stock/page/stock_ledger/stock_ledger.txt b/erpnext/stock/page/stock_ledger/stock_ledger.txt
index 9c2a4b7..f031627 100644
--- a/erpnext/stock/page/stock_ledger/stock_ledger.txt
+++ b/erpnext/stock/page/stock_ledger/stock_ledger.txt
@@ -1,41 +1,26 @@
-[
- {
-  "creation": "2012-09-21 20:15:14", 
-  "docstatus": 0, 
-  "modified": "2013-07-11 14:44:19", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "doctype": "Page", 
-  "icon": "icon-table", 
-  "module": "Stock", 
-  "name": "__common__", 
-  "page_name": "stock-ledger", 
-  "standard": "Yes", 
-  "title": "Stock Ledger"
- }, 
- {
-  "doctype": "Page Role", 
-  "name": "__common__", 
-  "parent": "stock-ledger", 
-  "parentfield": "roles", 
-  "parenttype": "Page"
- }, 
- {
-  "doctype": "Page", 
-  "name": "stock-ledger"
- }, 
- {
-  "doctype": "Page Role", 
-  "role": "Analytics"
- }, 
- {
-  "doctype": "Page Role", 
-  "role": "Material Manager"
- }, 
- {
-  "doctype": "Page Role", 
-  "role": "Material User"
- }
-]
\ No newline at end of file
+{
+ "creation": "2012-09-21 20:15:14", 
+ "docstatus": 0, 
+ "doctype": "Page", 
+ "icon": "icon-table", 
+ "idx": 1, 
+ "modified": "2013-07-11 14:44:19", 
+ "modified_by": "Administrator", 
+ "module": "Stock", 
+ "name": "stock-ledger", 
+ "owner": "Administrator", 
+ "page_name": "stock-ledger", 
+ "roles": [
+  {
+   "role": "Analytics"
+  }, 
+  {
+   "role": "Material Manager"
+  }, 
+  {
+   "role": "Material User"
+  }
+ ], 
+ "standard": "Yes", 
+ "title": "Stock Ledger"
+}
\ No newline at end of file
diff --git a/erpnext/stock/page/stock_level/stock_level.txt b/erpnext/stock/page/stock_level/stock_level.txt
index bae3d9c..2026d1d 100644
--- a/erpnext/stock/page/stock_level/stock_level.txt
+++ b/erpnext/stock/page/stock_level/stock_level.txt
@@ -1,37 +1,23 @@
-[
- {
-  "creation": "2012-12-31 10:52:14", 
-  "docstatus": 0, 
-  "modified": "2013-07-11 14:44:21", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "doctype": "Page", 
-  "icon": "icon-table", 
-  "module": "Stock", 
-  "name": "__common__", 
-  "page_name": "stock-level", 
-  "standard": "Yes", 
-  "title": "Stock Level"
- }, 
- {
-  "doctype": "Page Role", 
-  "name": "__common__", 
-  "parent": "stock-level", 
-  "parentfield": "roles", 
-  "parenttype": "Page"
- }, 
- {
-  "doctype": "Page", 
-  "name": "stock-level"
- }, 
- {
-  "doctype": "Page Role", 
-  "role": "Material Manager"
- }, 
- {
-  "doctype": "Page Role", 
-  "role": "Analytics"
- }
-]
\ No newline at end of file
+{
+ "creation": "2012-12-31 10:52:14", 
+ "docstatus": 0, 
+ "doctype": "Page", 
+ "icon": "icon-table", 
+ "idx": 1, 
+ "modified": "2013-07-11 14:44:21", 
+ "modified_by": "Administrator", 
+ "module": "Stock", 
+ "name": "stock-level", 
+ "owner": "Administrator", 
+ "page_name": "stock-level", 
+ "roles": [
+  {
+   "role": "Material Manager"
+  }, 
+  {
+   "role": "Analytics"
+  }
+ ], 
+ "standard": "Yes", 
+ "title": "Stock Level"
+}
\ No newline at end of file
diff --git a/erpnext/stock/report/batch_wise_balance_history/batch_wise_balance_history.txt b/erpnext/stock/report/batch_wise_balance_history/batch_wise_balance_history.txt
index 6a70042..6fdbf93 100644
--- a/erpnext/stock/report/batch_wise_balance_history/batch_wise_balance_history.txt
+++ b/erpnext/stock/report/batch_wise_balance_history/batch_wise_balance_history.txt
@@ -1,22 +1,15 @@
-[
- {
-  "creation": "2013-06-04 11:03:47", 
-  "docstatus": 0, 
-  "modified": "2014-03-07 15:30:27", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "doctype": "Report", 
-  "is_standard": "Yes", 
-  "module": "Stock", 
-  "name": "__common__", 
-  "ref_doctype": "Stock Ledger Entry", 
-  "report_name": "Batch-Wise Balance History", 
-  "report_type": "Script Report"
- }, 
- {
-  "doctype": "Report", 
-  "name": "Batch-Wise Balance History"
- }
-]
\ No newline at end of file
+{
+ "creation": "2013-06-04 11:03:47", 
+ "docstatus": 0, 
+ "doctype": "Report", 
+ "idx": 1, 
+ "is_standard": "Yes", 
+ "modified": "2014-03-07 15:30:27", 
+ "modified_by": "Administrator", 
+ "module": "Stock", 
+ "name": "Batch-Wise Balance History", 
+ "owner": "Administrator", 
+ "ref_doctype": "Stock Ledger Entry", 
+ "report_name": "Batch-Wise Balance History", 
+ "report_type": "Script Report"
+}
\ No newline at end of file
diff --git a/erpnext/stock/report/delivery_note_trends/delivery_note_trends.txt b/erpnext/stock/report/delivery_note_trends/delivery_note_trends.txt
index 2d7c953..99c086d 100644
--- a/erpnext/stock/report/delivery_note_trends/delivery_note_trends.txt
+++ b/erpnext/stock/report/delivery_note_trends/delivery_note_trends.txt
@@ -1,22 +1,15 @@
-[
- {
-  "creation": "2013-06-13 18:42:11", 
-  "docstatus": 0, 
-  "modified": "2014-03-07 15:30:27", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "doctype": "Report", 
-  "is_standard": "Yes", 
-  "module": "Stock", 
-  "name": "__common__", 
-  "ref_doctype": "Delivery Note", 
-  "report_name": "Delivery Note Trends", 
-  "report_type": "Script Report"
- }, 
- {
-  "doctype": "Report", 
-  "name": "Delivery Note Trends"
- }
-]
\ No newline at end of file
+{
+ "creation": "2013-06-13 18:42:11", 
+ "docstatus": 0, 
+ "doctype": "Report", 
+ "idx": 1, 
+ "is_standard": "Yes", 
+ "modified": "2014-03-07 15:30:27", 
+ "modified_by": "Administrator", 
+ "module": "Stock", 
+ "name": "Delivery Note Trends", 
+ "owner": "Administrator", 
+ "ref_doctype": "Delivery Note", 
+ "report_name": "Delivery Note Trends", 
+ "report_type": "Script Report"
+}
\ No newline at end of file
diff --git a/erpnext/stock/report/item_prices/item_prices.txt b/erpnext/stock/report/item_prices/item_prices.txt
index e5e9634..8e62bcd 100644
--- a/erpnext/stock/report/item_prices/item_prices.txt
+++ b/erpnext/stock/report/item_prices/item_prices.txt
@@ -1,22 +1,15 @@
-[
- {
-  "creation": "2013-06-05 11:43:30", 
-  "docstatus": 0, 
-  "modified": "2014-03-07 15:30:27", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "doctype": "Report", 
-  "is_standard": "Yes", 
-  "module": "Stock", 
-  "name": "__common__", 
-  "ref_doctype": "Stock Ledger Entry", 
-  "report_name": "Item Prices", 
-  "report_type": "Script Report"
- }, 
- {
-  "doctype": "Report", 
-  "name": "Item Prices"
- }
-]
\ No newline at end of file
+{
+ "creation": "2013-06-05 11:43:30", 
+ "docstatus": 0, 
+ "doctype": "Report", 
+ "idx": 1, 
+ "is_standard": "Yes", 
+ "modified": "2014-03-07 15:30:27", 
+ "modified_by": "Administrator", 
+ "module": "Stock", 
+ "name": "Item Prices", 
+ "owner": "Administrator", 
+ "ref_doctype": "Stock Ledger Entry", 
+ "report_name": "Item Prices", 
+ "report_type": "Script Report"
+}
\ No newline at end of file
diff --git a/erpnext/stock/report/item_shortage_report/item_shortage_report.txt b/erpnext/stock/report/item_shortage_report/item_shortage_report.txt
index 615c373..4a505cc 100644
--- a/erpnext/stock/report/item_shortage_report/item_shortage_report.txt
+++ b/erpnext/stock/report/item_shortage_report/item_shortage_report.txt
@@ -1,23 +1,16 @@
-[
- {
-  "creation": "2013-08-20 13:43:30", 
-  "docstatus": 0, 
-  "modified": "2014-03-07 15:30:27", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "doctype": "Report", 
-  "is_standard": "Yes", 
-  "json": "{\"filters\":[[\"Bin\",\"projected_qty\",\"<\",\"0\"]],\"columns\":[[\"warehouse\",\"Bin\"],[\"item_code\",\"Bin\"],[\"actual_qty\",\"Bin\"],[\"ordered_qty\",\"Bin\"],[\"planned_qty\",\"Bin\"],[\"reserved_qty\",\"Bin\"],[\"projected_qty\",\"Bin\"]],\"sort_by\":\"Bin.projected_qty\",\"sort_order\":\"asc\",\"sort_by_next\":\"\",\"sort_order_next\":\"desc\"}", 
-  "module": "Stock", 
-  "name": "__common__", 
-  "ref_doctype": "Bin", 
-  "report_name": "Item Shortage Report", 
-  "report_type": "Report Builder"
- }, 
- {
-  "doctype": "Report", 
-  "name": "Item Shortage Report"
- }
-]
\ No newline at end of file
+{
+ "creation": "2013-08-20 13:43:30", 
+ "docstatus": 0, 
+ "doctype": "Report", 
+ "idx": 1, 
+ "is_standard": "Yes", 
+ "json": "{\"filters\":[[\"Bin\",\"projected_qty\",\"<\",\"0\"]],\"columns\":[[\"warehouse\",\"Bin\"],[\"item_code\",\"Bin\"],[\"actual_qty\",\"Bin\"],[\"ordered_qty\",\"Bin\"],[\"planned_qty\",\"Bin\"],[\"reserved_qty\",\"Bin\"],[\"projected_qty\",\"Bin\"]],\"sort_by\":\"Bin.projected_qty\",\"sort_order\":\"asc\",\"sort_by_next\":\"\",\"sort_order_next\":\"desc\"}", 
+ "modified": "2014-03-07 15:30:27", 
+ "modified_by": "Administrator", 
+ "module": "Stock", 
+ "name": "Item Shortage Report", 
+ "owner": "Administrator", 
+ "ref_doctype": "Bin", 
+ "report_name": "Item Shortage Report", 
+ "report_type": "Report Builder"
+}
\ No newline at end of file
diff --git a/erpnext/stock/report/item_wise_price_list_rate/item_wise_price_list_rate.txt b/erpnext/stock/report/item_wise_price_list_rate/item_wise_price_list_rate.txt
index 14b0872..962db374 100644
--- a/erpnext/stock/report/item_wise_price_list_rate/item_wise_price_list_rate.txt
+++ b/erpnext/stock/report/item_wise_price_list_rate/item_wise_price_list_rate.txt
@@ -1,23 +1,16 @@
-[
- {
-  "creation": "2013-09-25 10:21:15", 
-  "docstatus": 0, 
-  "modified": "2014-03-07 15:30:27", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "doctype": "Report", 
-  "is_standard": "Yes", 
-  "json": "{\"filters\":[[\"Item Price\",\"price_list\",\"like\",\"%\"],[\"Item Price\",\"item_code\",\"like\",\"%\"]],\"columns\":[[\"name\",\"Item Price\"],[\"price_list\",\"Item Price\"],[\"item_code\",\"Item Price\"],[\"item_name\",\"Item Price\"],[\"item_description\",\"Item Price\"],[\"ref_rate\",\"Item Price\"],[\"buying\",\"Item Price\"],[\"selling\",\"Item Price\"],[\"currency\",\"Item Price\"]],\"sort_by\":\"Item Price.modified\",\"sort_order\":\"desc\",\"sort_by_next\":\"\",\"sort_order_next\":\"desc\"}", 
-  "module": "Stock", 
-  "name": "__common__", 
-  "ref_doctype": "Price List", 
-  "report_name": "Item-wise Price List Rate", 
-  "report_type": "Report Builder"
- }, 
- {
-  "doctype": "Report", 
-  "name": "Item-wise Price List Rate"
- }
-]
\ No newline at end of file
+{
+ "creation": "2013-09-25 10:21:15", 
+ "docstatus": 0, 
+ "doctype": "Report", 
+ "idx": 1, 
+ "is_standard": "Yes", 
+ "json": "{\"filters\":[[\"Item Price\",\"price_list\",\"like\",\"%\"],[\"Item Price\",\"item_code\",\"like\",\"%\"]],\"columns\":[[\"name\",\"Item Price\"],[\"price_list\",\"Item Price\"],[\"item_code\",\"Item Price\"],[\"item_name\",\"Item Price\"],[\"item_description\",\"Item Price\"],[\"ref_rate\",\"Item Price\"],[\"buying\",\"Item Price\"],[\"selling\",\"Item Price\"],[\"currency\",\"Item Price\"]],\"sort_by\":\"Item Price.modified\",\"sort_order\":\"desc\",\"sort_by_next\":\"\",\"sort_order_next\":\"desc\"}", 
+ "modified": "2014-03-07 15:30:27", 
+ "modified_by": "Administrator", 
+ "module": "Stock", 
+ "name": "Item-wise Price List Rate", 
+ "owner": "Administrator", 
+ "ref_doctype": "Price List", 
+ "report_name": "Item-wise Price List Rate", 
+ "report_type": "Report Builder"
+}
\ No newline at end of file
diff --git a/erpnext/stock/report/items_to_be_requested/items_to_be_requested.txt b/erpnext/stock/report/items_to_be_requested/items_to_be_requested.txt
index 97f45ce..f392693 100644
--- a/erpnext/stock/report/items_to_be_requested/items_to_be_requested.txt
+++ b/erpnext/stock/report/items_to_be_requested/items_to_be_requested.txt
@@ -1,23 +1,16 @@
-[
- {
-  "creation": "2013-08-20 15:08:10", 
-  "docstatus": 0, 
-  "modified": "2014-03-07 15:30:27", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "doctype": "Report", 
-  "is_standard": "Yes", 
-  "module": "Stock", 
-  "name": "__common__", 
-  "query": "SELECT\n    tabBin.item_code as \"Item:Link/Item:120\",\n    tabBin.warehouse as \"Warehouse:Link/Warehouse:120\",\n    tabBin.actual_qty as \"Actual:Float:90\",\n    tabBin.indented_qty as \"Requested:Float:90\",\n    tabBin.reserved_qty as \"Reserved:Float:90\",\n    tabBin.ordered_qty as \"Ordered:Float:90\",\n    tabBin.projected_qty as \"Projected:Float:90\"\nFROM\n    tabBin, tabItem\nWHERE\n    tabBin.item_code = tabItem.name\n    AND tabItem.is_purchase_item = \"Yes\"\n    AND tabBin.projected_qty < 0\nORDER BY\n    tabBin.projected_qty ASC", 
-  "ref_doctype": "Item", 
-  "report_name": "Items To Be Requested", 
-  "report_type": "Query Report"
- }, 
- {
-  "doctype": "Report", 
-  "name": "Items To Be Requested"
- }
-]
\ No newline at end of file
+{
+ "creation": "2013-08-20 15:08:10", 
+ "docstatus": 0, 
+ "doctype": "Report", 
+ "idx": 1, 
+ "is_standard": "Yes", 
+ "modified": "2014-03-07 15:30:27", 
+ "modified_by": "Administrator", 
+ "module": "Stock", 
+ "name": "Items To Be Requested", 
+ "owner": "Administrator", 
+ "query": "SELECT\n    tabBin.item_code as \"Item:Link/Item:120\",\n    tabBin.warehouse as \"Warehouse:Link/Warehouse:120\",\n    tabBin.actual_qty as \"Actual:Float:90\",\n    tabBin.indented_qty as \"Requested:Float:90\",\n    tabBin.reserved_qty as \"Reserved:Float:90\",\n    tabBin.ordered_qty as \"Ordered:Float:90\",\n    tabBin.projected_qty as \"Projected:Float:90\"\nFROM\n    tabBin, tabItem\nWHERE\n    tabBin.item_code = tabItem.name\n    AND tabItem.is_purchase_item = \"Yes\"\n    AND tabBin.projected_qty < 0\nORDER BY\n    tabBin.projected_qty ASC", 
+ "ref_doctype": "Item", 
+ "report_name": "Items To Be Requested", 
+ "report_type": "Query Report"
+}
\ No newline at end of file
diff --git a/erpnext/stock/report/itemwise_recommended_reorder_level/itemwise_recommended_reorder_level.txt b/erpnext/stock/report/itemwise_recommended_reorder_level/itemwise_recommended_reorder_level.txt
index 5f6cad9..b728422 100644
--- a/erpnext/stock/report/itemwise_recommended_reorder_level/itemwise_recommended_reorder_level.txt
+++ b/erpnext/stock/report/itemwise_recommended_reorder_level/itemwise_recommended_reorder_level.txt
@@ -1,22 +1,15 @@
-[
- {
-  "creation": "2013-06-07 12:47:22", 
-  "docstatus": 0, 
-  "modified": "2014-03-07 15:30:27", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "doctype": "Report", 
-  "is_standard": "Yes", 
-  "module": "Stock", 
-  "name": "__common__", 
-  "ref_doctype": "Item", 
-  "report_name": "Itemwise Recommended Reorder Level", 
-  "report_type": "Script Report"
- }, 
- {
-  "doctype": "Report", 
-  "name": "Itemwise Recommended Reorder Level"
- }
-]
\ No newline at end of file
+{
+ "creation": "2013-06-07 12:47:22", 
+ "docstatus": 0, 
+ "doctype": "Report", 
+ "idx": 1, 
+ "is_standard": "Yes", 
+ "modified": "2014-03-07 15:30:27", 
+ "modified_by": "Administrator", 
+ "module": "Stock", 
+ "name": "Itemwise Recommended Reorder Level", 
+ "owner": "Administrator", 
+ "ref_doctype": "Item", 
+ "report_name": "Itemwise Recommended Reorder Level", 
+ "report_type": "Script Report"
+}
\ No newline at end of file
diff --git a/erpnext/stock/report/material_requests_for_which_supplier_quotations_are_not_created/material_requests_for_which_supplier_quotations_are_not_created.txt b/erpnext/stock/report/material_requests_for_which_supplier_quotations_are_not_created/material_requests_for_which_supplier_quotations_are_not_created.txt
index 05f7afb..af1a310 100644
--- a/erpnext/stock/report/material_requests_for_which_supplier_quotations_are_not_created/material_requests_for_which_supplier_quotations_are_not_created.txt
+++ b/erpnext/stock/report/material_requests_for_which_supplier_quotations_are_not_created/material_requests_for_which_supplier_quotations_are_not_created.txt
@@ -1,23 +1,16 @@
-[
- {
-  "creation": "2013-08-09 12:20:58", 
-  "docstatus": 0, 
-  "modified": "2014-03-07 15:30:27", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "doctype": "Report", 
-  "is_standard": "Yes", 
-  "module": "Stock", 
-  "name": "__common__", 
-  "query": "select \n    mr.name as \"Material Request:Link/Material Request:120\",\n    mr.transaction_date as \"Date:Date:100\",\n\tmr_item.item_code as \"Item Code:Link/Item:120\",\n\tmr_item.qty as \"Qty:Float:100\",\n\tmr_item.item_name as \"Item Name::150\",\n\tmr_item.description as \"Description::200\"\nfrom\n\t`tabMaterial Request` mr, `tabMaterial Request Item` mr_item\nwhere\n\tmr_item.parent = mr.name\n\tand mr.material_request_type = \"Purchase\"\n\tand mr.docstatus = 1\n\tand mr.status != \"Stopped\"\n\tand not exists(select name from `tabSupplier Quotation Item` where prevdoc_docname=mr.name)\norder by mr.transaction_date asc", 
-  "ref_doctype": "Material Request", 
-  "report_name": "Material Requests for which Supplier Quotations are not created", 
-  "report_type": "Query Report"
- }, 
- {
-  "doctype": "Report", 
-  "name": "Material Requests for which Supplier Quotations are not created"
- }
-]
\ No newline at end of file
+{
+ "creation": "2013-08-09 12:20:58", 
+ "docstatus": 0, 
+ "doctype": "Report", 
+ "idx": 1, 
+ "is_standard": "Yes", 
+ "modified": "2014-03-07 15:30:27", 
+ "modified_by": "Administrator", 
+ "module": "Stock", 
+ "name": "Material Requests for which Supplier Quotations are not created", 
+ "owner": "Administrator", 
+ "query": "select \n    mr.name as \"Material Request:Link/Material Request:120\",\n    mr.transaction_date as \"Date:Date:100\",\n\tmr_item.item_code as \"Item Code:Link/Item:120\",\n\tmr_item.qty as \"Qty:Float:100\",\n\tmr_item.item_name as \"Item Name::150\",\n\tmr_item.description as \"Description::200\"\nfrom\n\t`tabMaterial Request` mr, `tabMaterial Request Item` mr_item\nwhere\n\tmr_item.parent = mr.name\n\tand mr.material_request_type = \"Purchase\"\n\tand mr.docstatus = 1\n\tand mr.status != \"Stopped\"\n\tand not exists(select name from `tabSupplier Quotation Item` where prevdoc_docname=mr.name)\norder by mr.transaction_date asc", 
+ "ref_doctype": "Material Request", 
+ "report_name": "Material Requests for which Supplier Quotations are not created", 
+ "report_type": "Query Report"
+}
\ No newline at end of file
diff --git a/erpnext/stock/report/ordered_items_to_be_delivered/ordered_items_to_be_delivered.txt b/erpnext/stock/report/ordered_items_to_be_delivered/ordered_items_to_be_delivered.txt
index a0a34b9..a8f4cdf 100644
--- a/erpnext/stock/report/ordered_items_to_be_delivered/ordered_items_to_be_delivered.txt
+++ b/erpnext/stock/report/ordered_items_to_be_delivered/ordered_items_to_be_delivered.txt
@@ -1,23 +1,16 @@
-[
- {
-  "creation": "2013-02-22 18:01:55", 
-  "docstatus": 0, 
-  "modified": "2014-03-07 15:30:27", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "doctype": "Report", 
-  "is_standard": "Yes", 
-  "module": "Stock", 
-  "name": "__common__", 
-  "query": "select \n `tabSales Order`.`name` as \"Sales Order:Link/Sales Order:120\",\n `tabSales Order`.`customer` as \"Customer:Link/Customer:120\",\n `tabSales Order`.`transaction_date` as \"Date:Date\",\n `tabSales Order`.`project_name` as \"Project\",\n `tabSales Order Item`.item_code as \"Item:Link/Item:120\",\n `tabSales Order Item`.qty as \"Qty:Float:140\",\n `tabSales Order Item`.delivered_qty as \"Delivered Qty:Float:140\",\n (`tabSales Order Item`.qty - ifnull(`tabSales Order Item`.delivered_qty, 0)) as \"Qty to Deliver:Float:140\",\n `tabSales Order Item`.base_amount as \"Amount:Float:140\",\n `tabSales Order`.`delivery_date` as \"Expected Delivery Date:Date:120\",\n `tabSales Order Item`.item_name as \"Item Name::150\",\n `tabSales Order Item`.description as \"Description::200\",\n `tabSales Order Item`.item_group as \"Item Group:Link/Item Group:120\"\nfrom\n `tabSales Order`, `tabSales Order Item`\nwhere\n `tabSales Order Item`.`parent` = `tabSales Order`.`name`\n and `tabSales Order`.docstatus = 1\n and `tabSales Order`.status != \"Stopped\"\n and ifnull(`tabSales Order Item`.delivered_qty,0) < ifnull(`tabSales Order Item`.qty,0)\norder by `tabSales Order`.transaction_date asc", 
-  "ref_doctype": "Delivery Note", 
-  "report_name": "Ordered Items To Be Delivered", 
-  "report_type": "Query Report"
- }, 
- {
-  "doctype": "Report", 
-  "name": "Ordered Items To Be Delivered"
- }
-]
\ No newline at end of file
+{
+ "creation": "2013-02-22 18:01:55", 
+ "docstatus": 0, 
+ "doctype": "Report", 
+ "idx": 1, 
+ "is_standard": "Yes", 
+ "modified": "2014-03-07 15:30:27", 
+ "modified_by": "Administrator", 
+ "module": "Stock", 
+ "name": "Ordered Items To Be Delivered", 
+ "owner": "Administrator", 
+ "query": "select \n `tabSales Order`.`name` as \"Sales Order:Link/Sales Order:120\",\n `tabSales Order`.`customer` as \"Customer:Link/Customer:120\",\n `tabSales Order`.`transaction_date` as \"Date:Date\",\n `tabSales Order`.`project_name` as \"Project\",\n `tabSales Order Item`.item_code as \"Item:Link/Item:120\",\n `tabSales Order Item`.qty as \"Qty:Float:140\",\n `tabSales Order Item`.delivered_qty as \"Delivered Qty:Float:140\",\n (`tabSales Order Item`.qty - ifnull(`tabSales Order Item`.delivered_qty, 0)) as \"Qty to Deliver:Float:140\",\n `tabSales Order Item`.base_amount as \"Amount:Float:140\",\n `tabSales Order`.`delivery_date` as \"Expected Delivery Date:Date:120\",\n `tabSales Order Item`.item_name as \"Item Name::150\",\n `tabSales Order Item`.description as \"Description::200\",\n `tabSales Order Item`.item_group as \"Item Group:Link/Item Group:120\"\nfrom\n `tabSales Order`, `tabSales Order Item`\nwhere\n `tabSales Order Item`.`parent` = `tabSales Order`.`name`\n and `tabSales Order`.docstatus = 1\n and `tabSales Order`.status != \"Stopped\"\n and ifnull(`tabSales Order Item`.delivered_qty,0) < ifnull(`tabSales Order Item`.qty,0)\norder by `tabSales Order`.transaction_date asc", 
+ "ref_doctype": "Delivery Note", 
+ "report_name": "Ordered Items To Be Delivered", 
+ "report_type": "Query Report"
+}
\ No newline at end of file
diff --git a/erpnext/stock/report/purchase_in_transit/purchase_in_transit.txt b/erpnext/stock/report/purchase_in_transit/purchase_in_transit.txt
index d0e17e0..c88b366 100644
--- a/erpnext/stock/report/purchase_in_transit/purchase_in_transit.txt
+++ b/erpnext/stock/report/purchase_in_transit/purchase_in_transit.txt
@@ -1,23 +1,16 @@
-[
- {
-  "creation": "2013-05-06 12:09:05", 
-  "docstatus": 0, 
-  "modified": "2014-03-07 15:30:27", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "doctype": "Report", 
-  "is_standard": "Yes", 
-  "module": "Stock", 
-  "name": "__common__", 
-  "query": "SELECT\n    pi.name as \"Purchase Invoice:Link/Purchase Invoice:120\",\n\tpi.posting_date as \"Posting Date:Date:100\",\n\tpi.credit_to as \"Supplier Account:Link/Account:120\",\n\tpi_item.item_code as \"Item Code:Link/Item:120\",\n\tpi_item.description as \"Description:Data:140\",\n\tpi_item.qty as \"Qty:Float:120\",\n\tpi_item.base_amount as \"Amount:Currency:120\",\n\tpi_item.purchase_order as \"Purchase Order:Link/Purchase Order:120\",\n\tpi_item.purchase_receipt as \"Purchase Receipt:Link/Purchase Receipt:120\",\n\tpr.posting_date as \"PR Posting Date:Date:130\",\n\tpi.company as \"Company:Link/Company:120\"\nFROM\n\t`tabPurchase Invoice` pi, `tabPurchase Invoice Item` pi_item, `tabPurchase Receipt` pr\nWHERE\n\tpi.name = pi_item.parent and pi_item.purchase_receipt = pr.name\n\tand pi.docstatus = 1 and pr.posting_date > pi.posting_date\nORDER BY\n\tpi.name desc", 
-  "ref_doctype": "Purchase Receipt", 
-  "report_name": "Purchase In Transit", 
-  "report_type": "Query Report"
- }, 
- {
-  "doctype": "Report", 
-  "name": "Purchase In Transit"
- }
-]
\ No newline at end of file
+{
+ "creation": "2013-05-06 12:09:05", 
+ "docstatus": 0, 
+ "doctype": "Report", 
+ "idx": 1, 
+ "is_standard": "Yes", 
+ "modified": "2014-03-07 15:30:27", 
+ "modified_by": "Administrator", 
+ "module": "Stock", 
+ "name": "Purchase In Transit", 
+ "owner": "Administrator", 
+ "query": "SELECT\n    pi.name as \"Purchase Invoice:Link/Purchase Invoice:120\",\n\tpi.posting_date as \"Posting Date:Date:100\",\n\tpi.credit_to as \"Supplier Account:Link/Account:120\",\n\tpi_item.item_code as \"Item Code:Link/Item:120\",\n\tpi_item.description as \"Description:Data:140\",\n\tpi_item.qty as \"Qty:Float:120\",\n\tpi_item.base_amount as \"Amount:Currency:120\",\n\tpi_item.purchase_order as \"Purchase Order:Link/Purchase Order:120\",\n\tpi_item.purchase_receipt as \"Purchase Receipt:Link/Purchase Receipt:120\",\n\tpr.posting_date as \"PR Posting Date:Date:130\",\n\tpi.company as \"Company:Link/Company:120\"\nFROM\n\t`tabPurchase Invoice` pi, `tabPurchase Invoice Item` pi_item, `tabPurchase Receipt` pr\nWHERE\n\tpi.name = pi_item.parent and pi_item.purchase_receipt = pr.name\n\tand pi.docstatus = 1 and pr.posting_date > pi.posting_date\nORDER BY\n\tpi.name desc", 
+ "ref_doctype": "Purchase Receipt", 
+ "report_name": "Purchase In Transit", 
+ "report_type": "Query Report"
+}
\ No newline at end of file
diff --git a/erpnext/stock/report/purchase_order_items_to_be_received/purchase_order_items_to_be_received.txt b/erpnext/stock/report/purchase_order_items_to_be_received/purchase_order_items_to_be_received.txt
index 41aa05e..529544a 100644
--- a/erpnext/stock/report/purchase_order_items_to_be_received/purchase_order_items_to_be_received.txt
+++ b/erpnext/stock/report/purchase_order_items_to_be_received/purchase_order_items_to_be_received.txt
@@ -1,24 +1,17 @@
-[
- {
-  "creation": "2013-02-22 18:01:55", 
-  "docstatus": 0, 
-  "modified": "2014-03-07 15:30:27", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "add_total_row": 1, 
-  "doctype": "Report", 
-  "is_standard": "Yes", 
-  "module": "Stock", 
-  "name": "__common__", 
-  "query": "select \n    `tabPurchase Order`.`name` as \"Purchase Order:Link/Purchase Order:120\",\n\t`tabPurchase Order`.`transaction_date` as \"Date:Date:100\",\n\t`tabPurchase Order`.`supplier` as \"Supplier:Link/Supplier:120\",\n\t`tabPurchase Order Item`.`project_name` as \"Project\",\n\t`tabPurchase Order Item`.item_code as \"Item Code:Link/Item:120\",\n\t`tabPurchase Order Item`.qty as \"Qty:Float:100\",\n\t`tabPurchase Order Item`.received_qty as \"Received Qty:Float:100\", \n\t(`tabPurchase Order Item`.qty - ifnull(`tabPurchase Order Item`.received_qty, 0)) as \"Qty to Receive:Float:100\",\n    `tabPurchase Order Item`.warehouse as \"Warehouse:Link/Warehouse:150\",\n\t`tabPurchase Order Item`.item_name as \"Item Name::150\",\n\t`tabPurchase Order Item`.description as \"Description::200\",\n    `tabPurchase Order Item`.brand as \"Brand::100\"\nfrom\n\t`tabPurchase Order`, `tabPurchase Order Item`\nwhere\n\t`tabPurchase Order Item`.`parent` = `tabPurchase Order`.`name`\n\tand `tabPurchase Order`.docstatus = 1\n\tand `tabPurchase Order`.status != \"Stopped\"\n\tand ifnull(`tabPurchase Order Item`.received_qty, 0) < ifnull(`tabPurchase Order Item`.qty, 0)\norder by `tabPurchase Order`.transaction_date asc", 
-  "ref_doctype": "Purchase Receipt", 
-  "report_name": "Purchase Order Items To Be Received", 
-  "report_type": "Query Report"
- }, 
- {
-  "doctype": "Report", 
-  "name": "Purchase Order Items To Be Received"
- }
-]
\ No newline at end of file
+{
+ "add_total_row": 1, 
+ "creation": "2013-02-22 18:01:55", 
+ "docstatus": 0, 
+ "doctype": "Report", 
+ "idx": 1, 
+ "is_standard": "Yes", 
+ "modified": "2014-03-07 15:30:27", 
+ "modified_by": "Administrator", 
+ "module": "Stock", 
+ "name": "Purchase Order Items To Be Received", 
+ "owner": "Administrator", 
+ "query": "select \n    `tabPurchase Order`.`name` as \"Purchase Order:Link/Purchase Order:120\",\n\t`tabPurchase Order`.`transaction_date` as \"Date:Date:100\",\n\t`tabPurchase Order`.`supplier` as \"Supplier:Link/Supplier:120\",\n\t`tabPurchase Order Item`.`project_name` as \"Project\",\n\t`tabPurchase Order Item`.item_code as \"Item Code:Link/Item:120\",\n\t`tabPurchase Order Item`.qty as \"Qty:Float:100\",\n\t`tabPurchase Order Item`.received_qty as \"Received Qty:Float:100\", \n\t(`tabPurchase Order Item`.qty - ifnull(`tabPurchase Order Item`.received_qty, 0)) as \"Qty to Receive:Float:100\",\n    `tabPurchase Order Item`.warehouse as \"Warehouse:Link/Warehouse:150\",\n\t`tabPurchase Order Item`.item_name as \"Item Name::150\",\n\t`tabPurchase Order Item`.description as \"Description::200\",\n    `tabPurchase Order Item`.brand as \"Brand::100\"\nfrom\n\t`tabPurchase Order`, `tabPurchase Order Item`\nwhere\n\t`tabPurchase Order Item`.`parent` = `tabPurchase Order`.`name`\n\tand `tabPurchase Order`.docstatus = 1\n\tand `tabPurchase Order`.status != \"Stopped\"\n\tand ifnull(`tabPurchase Order Item`.received_qty, 0) < ifnull(`tabPurchase Order Item`.qty, 0)\norder by `tabPurchase Order`.transaction_date asc", 
+ "ref_doctype": "Purchase Receipt", 
+ "report_name": "Purchase Order Items To Be Received", 
+ "report_type": "Query Report"
+}
\ No newline at end of file
diff --git a/erpnext/stock/report/purchase_receipt_trends/purchase_receipt_trends.txt b/erpnext/stock/report/purchase_receipt_trends/purchase_receipt_trends.txt
index 11e0592..da2dcea 100644
--- a/erpnext/stock/report/purchase_receipt_trends/purchase_receipt_trends.txt
+++ b/erpnext/stock/report/purchase_receipt_trends/purchase_receipt_trends.txt
@@ -1,22 +1,15 @@
-[
- {
-  "creation": "2013-06-13 18:45:44", 
-  "docstatus": 0, 
-  "modified": "2014-03-07 15:30:27", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "doctype": "Report", 
-  "is_standard": "Yes", 
-  "module": "Stock", 
-  "name": "__common__", 
-  "ref_doctype": "Purchase Receipt", 
-  "report_name": "Purchase Receipt Trends", 
-  "report_type": "Script Report"
- }, 
- {
-  "doctype": "Report", 
-  "name": "Purchase Receipt Trends"
- }
-]
\ No newline at end of file
+{
+ "creation": "2013-06-13 18:45:44", 
+ "docstatus": 0, 
+ "doctype": "Report", 
+ "idx": 1, 
+ "is_standard": "Yes", 
+ "modified": "2014-03-07 15:30:27", 
+ "modified_by": "Administrator", 
+ "module": "Stock", 
+ "name": "Purchase Receipt Trends", 
+ "owner": "Administrator", 
+ "ref_doctype": "Purchase Receipt", 
+ "report_name": "Purchase Receipt Trends", 
+ "report_type": "Script Report"
+}
\ No newline at end of file
diff --git a/erpnext/stock/report/requested_items_to_be_transferred/requested_items_to_be_transferred.txt b/erpnext/stock/report/requested_items_to_be_transferred/requested_items_to_be_transferred.txt
index c86de91..b699507 100644
--- a/erpnext/stock/report/requested_items_to_be_transferred/requested_items_to_be_transferred.txt
+++ b/erpnext/stock/report/requested_items_to_be_transferred/requested_items_to_be_transferred.txt
@@ -1,24 +1,17 @@
-[
- {
-  "creation": "2013-05-13 16:23:05", 
-  "docstatus": 0, 
-  "modified": "2014-03-07 15:30:27", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "add_total_row": 1, 
-  "doctype": "Report", 
-  "is_standard": "Yes", 
-  "module": "Stock", 
-  "name": "__common__", 
-  "query": "select \n    mr.name as \"Material Request:Link/Material Request:120\",\n\tmr.transaction_date as \"Date:Date:100\",\n\tmr_item.item_code as \"Item Code:Link/Item:120\",\n\tmr_item.qty as \"Qty:Float:100\",\n\tmr_item.ordered_qty as \"Transferred Qty:Float:100\", \n\t(mr_item.qty - ifnull(mr_item.ordered_qty, 0)) as \"Qty to Transfer:Float:100\",\n\tmr_item.item_name as \"Item Name::150\",\n\tmr_item.description as \"Description::200\"\nfrom\n\t`tabMaterial Request` mr, `tabMaterial Request Item` mr_item\nwhere\n\tmr_item.parent = mr.name\n\tand mr.material_request_type = \"Transfer\"\n\tand mr.docstatus = 1\n\tand mr.status != \"Stopped\"\n\tand ifnull(mr_item.ordered_qty, 0) < ifnull(mr_item.qty, 0)\norder by mr.transaction_date asc", 
-  "ref_doctype": "Stock Entry", 
-  "report_name": "Requested Items To Be Transferred", 
-  "report_type": "Query Report"
- }, 
- {
-  "doctype": "Report", 
-  "name": "Requested Items To Be Transferred"
- }
-]
\ No newline at end of file
+{
+ "add_total_row": 1, 
+ "creation": "2013-05-13 16:23:05", 
+ "docstatus": 0, 
+ "doctype": "Report", 
+ "idx": 1, 
+ "is_standard": "Yes", 
+ "modified": "2014-03-07 15:30:27", 
+ "modified_by": "Administrator", 
+ "module": "Stock", 
+ "name": "Requested Items To Be Transferred", 
+ "owner": "Administrator", 
+ "query": "select \n    mr.name as \"Material Request:Link/Material Request:120\",\n\tmr.transaction_date as \"Date:Date:100\",\n\tmr_item.item_code as \"Item Code:Link/Item:120\",\n\tmr_item.qty as \"Qty:Float:100\",\n\tmr_item.ordered_qty as \"Transferred Qty:Float:100\", \n\t(mr_item.qty - ifnull(mr_item.ordered_qty, 0)) as \"Qty to Transfer:Float:100\",\n\tmr_item.item_name as \"Item Name::150\",\n\tmr_item.description as \"Description::200\"\nfrom\n\t`tabMaterial Request` mr, `tabMaterial Request Item` mr_item\nwhere\n\tmr_item.parent = mr.name\n\tand mr.material_request_type = \"Transfer\"\n\tand mr.docstatus = 1\n\tand mr.status != \"Stopped\"\n\tand ifnull(mr_item.ordered_qty, 0) < ifnull(mr_item.qty, 0)\norder by mr.transaction_date asc", 
+ "ref_doctype": "Stock Entry", 
+ "report_name": "Requested Items To Be Transferred", 
+ "report_type": "Query Report"
+}
\ No newline at end of file
diff --git a/erpnext/stock/report/serial_no_service_contract_expiry/serial_no_service_contract_expiry.txt b/erpnext/stock/report/serial_no_service_contract_expiry/serial_no_service_contract_expiry.txt
index b37b601..b971833 100644
--- a/erpnext/stock/report/serial_no_service_contract_expiry/serial_no_service_contract_expiry.txt
+++ b/erpnext/stock/report/serial_no_service_contract_expiry/serial_no_service_contract_expiry.txt
@@ -1,23 +1,16 @@
-[
- {
-  "creation": "2013-01-14 10:52:58", 
-  "docstatus": 0, 
-  "modified": "2014-03-07 15:30:27", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "doctype": "Report", 
-  "is_standard": "Yes", 
-  "json": "{\"filters\":[[\"Serial No\",\"status\",\"=\",\"Delivered\"]],\"columns\":[[\"name\",\"Serial No\"],[\"item_code\",\"Serial No\"],[\"amc_expiry_date\",\"Serial No\"],[\"maintenance_status\",\"Serial No\"],[\"delivery_document_no\",\"Serial No\"],[\"customer\",\"Serial No\"],[\"customer_name\",\"Serial No\"],[\"item_name\",\"Serial No\"],[\"description\",\"Serial No\"],[\"item_group\",\"Serial No\"],[\"brand\",\"Serial No\"]],\"sort_by\":\"Serial No.amc_expiry_date\",\"sort_order\":\"asc\",\"sort_by_next\":\"\",\"sort_order_next\":\"desc\"}", 
-  "module": "Stock", 
-  "name": "__common__", 
-  "ref_doctype": "Serial No", 
-  "report_name": "Serial No Service Contract Expiry", 
-  "report_type": "Report Builder"
- }, 
- {
-  "doctype": "Report", 
-  "name": "Serial No Service Contract Expiry"
- }
-]
\ No newline at end of file
+{
+ "creation": "2013-01-14 10:52:58", 
+ "docstatus": 0, 
+ "doctype": "Report", 
+ "idx": 1, 
+ "is_standard": "Yes", 
+ "json": "{\"filters\":[[\"Serial No\",\"status\",\"=\",\"Delivered\"]],\"columns\":[[\"name\",\"Serial No\"],[\"item_code\",\"Serial No\"],[\"amc_expiry_date\",\"Serial No\"],[\"maintenance_status\",\"Serial No\"],[\"delivery_document_no\",\"Serial No\"],[\"customer\",\"Serial No\"],[\"customer_name\",\"Serial No\"],[\"item_name\",\"Serial No\"],[\"description\",\"Serial No\"],[\"item_group\",\"Serial No\"],[\"brand\",\"Serial No\"]],\"sort_by\":\"Serial No.amc_expiry_date\",\"sort_order\":\"asc\",\"sort_by_next\":\"\",\"sort_order_next\":\"desc\"}", 
+ "modified": "2014-03-07 15:30:27", 
+ "modified_by": "Administrator", 
+ "module": "Stock", 
+ "name": "Serial No Service Contract Expiry", 
+ "owner": "Administrator", 
+ "ref_doctype": "Serial No", 
+ "report_name": "Serial No Service Contract Expiry", 
+ "report_type": "Report Builder"
+}
\ No newline at end of file
diff --git a/erpnext/stock/report/serial_no_status/serial_no_status.txt b/erpnext/stock/report/serial_no_status/serial_no_status.txt
index 68e4c2e..83bdcd6 100644
--- a/erpnext/stock/report/serial_no_status/serial_no_status.txt
+++ b/erpnext/stock/report/serial_no_status/serial_no_status.txt
@@ -1,23 +1,16 @@
-[
- {
-  "creation": "2013-01-14 10:52:58", 
-  "docstatus": 0, 
-  "modified": "2014-03-07 15:30:27", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "doctype": "Report", 
-  "is_standard": "Yes", 
-  "json": "{\"filters\":[],\"columns\":[[\"name\",\"Serial No\"],[\"item_code\",\"Serial No\"],[\"warehouse\",\"Serial No\"],[\"status\",\"Serial No\"],[\"item_name\",\"Serial No\"],[\"description\",\"Serial No\"],[\"item_group\",\"Serial No\"],[\"brand\",\"Serial No\"],[\"purchase_document_no\",\"Serial No\"],[\"purchase_date\",\"Serial No\"],[\"customer\",\"Serial No\"],[\"customer_name\",\"Serial No\"],[\"purchase_rate\",\"Serial No\"],[\"delivery_document_no\",\"Serial No\"],[\"delivery_date\",\"Serial No\"],[\"supplier\",\"Serial No\"],[\"supplier_name\",\"Serial No\"]],\"sort_by\":\"Serial No.name\",\"sort_order\":\"desc\",\"sort_by_next\":\"\",\"sort_order_next\":\"desc\"}", 
-  "module": "Stock", 
-  "name": "__common__", 
-  "ref_doctype": "Serial No", 
-  "report_name": "Serial No Status", 
-  "report_type": "Report Builder"
- }, 
- {
-  "doctype": "Report", 
-  "name": "Serial No Status"
- }
-]
\ No newline at end of file
+{
+ "creation": "2013-01-14 10:52:58", 
+ "docstatus": 0, 
+ "doctype": "Report", 
+ "idx": 1, 
+ "is_standard": "Yes", 
+ "json": "{\"filters\":[],\"columns\":[[\"name\",\"Serial No\"],[\"item_code\",\"Serial No\"],[\"warehouse\",\"Serial No\"],[\"status\",\"Serial No\"],[\"item_name\",\"Serial No\"],[\"description\",\"Serial No\"],[\"item_group\",\"Serial No\"],[\"brand\",\"Serial No\"],[\"purchase_document_no\",\"Serial No\"],[\"purchase_date\",\"Serial No\"],[\"customer\",\"Serial No\"],[\"customer_name\",\"Serial No\"],[\"purchase_rate\",\"Serial No\"],[\"delivery_document_no\",\"Serial No\"],[\"delivery_date\",\"Serial No\"],[\"supplier\",\"Serial No\"],[\"supplier_name\",\"Serial No\"]],\"sort_by\":\"Serial No.name\",\"sort_order\":\"desc\",\"sort_by_next\":\"\",\"sort_order_next\":\"desc\"}", 
+ "modified": "2014-03-07 15:30:27", 
+ "modified_by": "Administrator", 
+ "module": "Stock", 
+ "name": "Serial No Status", 
+ "owner": "Administrator", 
+ "ref_doctype": "Serial No", 
+ "report_name": "Serial No Status", 
+ "report_type": "Report Builder"
+}
\ No newline at end of file
diff --git a/erpnext/stock/report/serial_no_warranty_expiry/serial_no_warranty_expiry.txt b/erpnext/stock/report/serial_no_warranty_expiry/serial_no_warranty_expiry.txt
index 6471a58..4b9da02 100644
--- a/erpnext/stock/report/serial_no_warranty_expiry/serial_no_warranty_expiry.txt
+++ b/erpnext/stock/report/serial_no_warranty_expiry/serial_no_warranty_expiry.txt
@@ -1,23 +1,16 @@
-[
- {
-  "creation": "2013-01-14 10:52:58", 
-  "docstatus": 0, 
-  "modified": "2014-03-07 15:30:27", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "doctype": "Report", 
-  "is_standard": "Yes", 
-  "json": "{\"filters\":[[\"Serial No\",\"status\",\"=\",\"Delivered\"]],\"columns\":[[\"name\",\"Serial No\"],[\"item_code\",\"Serial No\"],[\"warranty_expiry_date\",\"Serial No\"],[\"warranty_period\",\"Serial No\"],[\"maintenance_status\",\"Serial No\"],[\"purchase_document_no\",\"Serial No\"],[\"purchase_date\",\"Serial No\"],[\"supplier\",\"Serial No\"],[\"supplier_name\",\"Serial No\"],[\"delivery_document_no\",\"Serial No\"],[\"delivery_date\",\"Serial No\"],[\"customer\",\"Serial No\"],[\"customer_name\",\"Serial No\"],[\"item_name\",\"Serial No\"],[\"description\",\"Serial No\"],[\"item_group\",\"Serial No\"],[\"brand\",\"Serial No\"]],\"sort_by\":\"Serial No.warranty_expiry_date\",\"sort_order\":\"asc\",\"sort_by_next\":\"\",\"sort_order_next\":\"asc\"}", 
-  "module": "Stock", 
-  "name": "__common__", 
-  "ref_doctype": "Serial No", 
-  "report_name": "Serial No Warranty Expiry", 
-  "report_type": "Report Builder"
- }, 
- {
-  "doctype": "Report", 
-  "name": "Serial No Warranty Expiry"
- }
-]
\ No newline at end of file
+{
+ "creation": "2013-01-14 10:52:58", 
+ "docstatus": 0, 
+ "doctype": "Report", 
+ "idx": 1, 
+ "is_standard": "Yes", 
+ "json": "{\"filters\":[[\"Serial No\",\"status\",\"=\",\"Delivered\"]],\"columns\":[[\"name\",\"Serial No\"],[\"item_code\",\"Serial No\"],[\"warranty_expiry_date\",\"Serial No\"],[\"warranty_period\",\"Serial No\"],[\"maintenance_status\",\"Serial No\"],[\"purchase_document_no\",\"Serial No\"],[\"purchase_date\",\"Serial No\"],[\"supplier\",\"Serial No\"],[\"supplier_name\",\"Serial No\"],[\"delivery_document_no\",\"Serial No\"],[\"delivery_date\",\"Serial No\"],[\"customer\",\"Serial No\"],[\"customer_name\",\"Serial No\"],[\"item_name\",\"Serial No\"],[\"description\",\"Serial No\"],[\"item_group\",\"Serial No\"],[\"brand\",\"Serial No\"]],\"sort_by\":\"Serial No.warranty_expiry_date\",\"sort_order\":\"asc\",\"sort_by_next\":\"\",\"sort_order_next\":\"asc\"}", 
+ "modified": "2014-03-07 15:30:27", 
+ "modified_by": "Administrator", 
+ "module": "Stock", 
+ "name": "Serial No Warranty Expiry", 
+ "owner": "Administrator", 
+ "ref_doctype": "Serial No", 
+ "report_name": "Serial No Warranty Expiry", 
+ "report_type": "Report Builder"
+}
\ No newline at end of file
diff --git a/erpnext/stock/report/stock_ageing/stock_ageing.txt b/erpnext/stock/report/stock_ageing/stock_ageing.txt
index 18a7ec8..bb594e6 100644
--- a/erpnext/stock/report/stock_ageing/stock_ageing.txt
+++ b/erpnext/stock/report/stock_ageing/stock_ageing.txt
@@ -1,22 +1,15 @@
-[
- {
-  "creation": "2013-12-02 17:09:31", 
-  "docstatus": 0, 
-  "modified": "2014-03-07 15:30:27", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "doctype": "Report", 
-  "is_standard": "Yes", 
-  "module": "Stock", 
-  "name": "__common__", 
-  "ref_doctype": "Item", 
-  "report_name": "Stock Ageing", 
-  "report_type": "Script Report"
- }, 
- {
-  "doctype": "Report", 
-  "name": "Stock Ageing"
- }
-]
\ No newline at end of file
+{
+ "creation": "2013-12-02 17:09:31", 
+ "docstatus": 0, 
+ "doctype": "Report", 
+ "idx": 1, 
+ "is_standard": "Yes", 
+ "modified": "2014-03-07 15:30:27", 
+ "modified_by": "Administrator", 
+ "module": "Stock", 
+ "name": "Stock Ageing", 
+ "owner": "Administrator", 
+ "ref_doctype": "Item", 
+ "report_name": "Stock Ageing", 
+ "report_type": "Script Report"
+}
\ No newline at end of file
diff --git a/erpnext/stock/report/stock_ledger/stock_ledger.txt b/erpnext/stock/report/stock_ledger/stock_ledger.txt
index 7da9f93..96604cb 100644
--- a/erpnext/stock/report/stock_ledger/stock_ledger.txt
+++ b/erpnext/stock/report/stock_ledger/stock_ledger.txt
@@ -1,22 +1,15 @@
-[
- {
-  "creation": "2013-11-29 17:08:23", 
-  "docstatus": 0, 
-  "modified": "2014-03-07 15:30:27", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "doctype": "Report", 
-  "is_standard": "Yes", 
-  "module": "Stock", 
-  "name": "__common__", 
-  "ref_doctype": "Stock Ledger Entry", 
-  "report_name": "Stock Ledger", 
-  "report_type": "Script Report"
- }, 
- {
-  "doctype": "Report", 
-  "name": "Stock Ledger"
- }
-]
\ No newline at end of file
+{
+ "creation": "2013-11-29 17:08:23", 
+ "docstatus": 0, 
+ "doctype": "Report", 
+ "idx": 1, 
+ "is_standard": "Yes", 
+ "modified": "2014-03-07 15:30:27", 
+ "modified_by": "Administrator", 
+ "module": "Stock", 
+ "name": "Stock Ledger", 
+ "owner": "Administrator", 
+ "ref_doctype": "Stock Ledger Entry", 
+ "report_name": "Stock Ledger", 
+ "report_type": "Script Report"
+}
\ No newline at end of file
diff --git a/erpnext/stock/report/stock_projected_qty/stock_projected_qty.txt b/erpnext/stock/report/stock_projected_qty/stock_projected_qty.txt
index 4eb46c5..db603d5 100644
--- a/erpnext/stock/report/stock_projected_qty/stock_projected_qty.txt
+++ b/erpnext/stock/report/stock_projected_qty/stock_projected_qty.txt
@@ -1,23 +1,16 @@
-[
- {
-  "creation": "2013-12-04 18:21:56", 
-  "docstatus": 0, 
-  "modified": "2014-03-07 15:30:27", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "add_total_row": 1, 
-  "doctype": "Report", 
-  "is_standard": "Yes", 
-  "module": "Stock", 
-  "name": "__common__", 
-  "ref_doctype": "Item", 
-  "report_name": "Stock Projected Qty", 
-  "report_type": "Script Report"
- }, 
- {
-  "doctype": "Report", 
-  "name": "Stock Projected Qty"
- }
-]
\ No newline at end of file
+{
+ "add_total_row": 1, 
+ "creation": "2013-12-04 18:21:56", 
+ "docstatus": 0, 
+ "doctype": "Report", 
+ "idx": 1, 
+ "is_standard": "Yes", 
+ "modified": "2014-03-07 15:30:27", 
+ "modified_by": "Administrator", 
+ "module": "Stock", 
+ "name": "Stock Projected Qty", 
+ "owner": "Administrator", 
+ "ref_doctype": "Item", 
+ "report_name": "Stock Projected Qty", 
+ "report_type": "Script Report"
+}
\ No newline at end of file
diff --git a/erpnext/stock/report/supplier_wise_sales_analytics/supplier_wise_sales_analytics.txt b/erpnext/stock/report/supplier_wise_sales_analytics/supplier_wise_sales_analytics.txt
index 53eeca7..a5ccf34 100644
--- a/erpnext/stock/report/supplier_wise_sales_analytics/supplier_wise_sales_analytics.txt
+++ b/erpnext/stock/report/supplier_wise_sales_analytics/supplier_wise_sales_analytics.txt
@@ -1,23 +1,16 @@
-[
- {
-  "creation": "2013-11-29 15:45:39", 
-  "docstatus": 0, 
-  "modified": "2014-03-07 15:30:27", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "add_total_row": 1, 
-  "doctype": "Report", 
-  "is_standard": "Yes", 
-  "module": "Stock", 
-  "name": "__common__", 
-  "ref_doctype": "Stock Ledger Entry", 
-  "report_name": "Supplier-Wise Sales Analytics", 
-  "report_type": "Script Report"
- }, 
- {
-  "doctype": "Report", 
-  "name": "Supplier-Wise Sales Analytics"
- }
-]
\ No newline at end of file
+{
+ "add_total_row": 1, 
+ "creation": "2013-11-29 15:45:39", 
+ "docstatus": 0, 
+ "doctype": "Report", 
+ "idx": 1, 
+ "is_standard": "Yes", 
+ "modified": "2014-03-07 15:30:27", 
+ "modified_by": "Administrator", 
+ "module": "Stock", 
+ "name": "Supplier-Wise Sales Analytics", 
+ "owner": "Administrator", 
+ "ref_doctype": "Stock Ledger Entry", 
+ "report_name": "Supplier-Wise Sales Analytics", 
+ "report_type": "Script Report"
+}
\ No newline at end of file
diff --git a/erpnext/stock/report/warehouse_wise_stock_balance/warehouse_wise_stock_balance.txt b/erpnext/stock/report/warehouse_wise_stock_balance/warehouse_wise_stock_balance.txt
index c8e36eb..09a3777 100644
--- a/erpnext/stock/report/warehouse_wise_stock_balance/warehouse_wise_stock_balance.txt
+++ b/erpnext/stock/report/warehouse_wise_stock_balance/warehouse_wise_stock_balance.txt
@@ -1,22 +1,15 @@
-[
- {
-  "creation": "2013-06-05 11:00:31", 
-  "docstatus": 0, 
-  "modified": "2014-03-07 15:30:28", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "doctype": "Report", 
-  "is_standard": "Yes", 
-  "module": "Stock", 
-  "name": "__common__", 
-  "ref_doctype": "Stock Ledger Entry", 
-  "report_name": "Warehouse-Wise Stock Balance", 
-  "report_type": "Script Report"
- }, 
- {
-  "doctype": "Report", 
-  "name": "Warehouse-Wise Stock Balance"
- }
-]
\ No newline at end of file
+{
+ "creation": "2013-06-05 11:00:31", 
+ "docstatus": 0, 
+ "doctype": "Report", 
+ "idx": 1, 
+ "is_standard": "Yes", 
+ "modified": "2014-03-07 15:30:28", 
+ "modified_by": "Administrator", 
+ "module": "Stock", 
+ "name": "Warehouse-Wise Stock Balance", 
+ "owner": "Administrator", 
+ "ref_doctype": "Stock Ledger Entry", 
+ "report_name": "Warehouse-Wise Stock Balance", 
+ "report_type": "Script Report"
+}
\ No newline at end of file
diff --git a/erpnext/support/doctype/customer_issue/customer_issue.txt b/erpnext/support/doctype/customer_issue/customer_issue.txt
index 90ac593..b1d14c4 100644
--- a/erpnext/support/doctype/customer_issue/customer_issue.txt
+++ b/erpnext/support/doctype/customer_issue/customer_issue.txt
@@ -1,438 +1,419 @@
-[
- {
-  "creation": "2013-01-10 16:34:30", 
-  "docstatus": 0, 
-  "modified": "2014-01-20 17:48:35", 
-  "modified_by": "Administrator", 
-  "owner": "harshada@webnotestech.com"
- }, 
- {
-  "allow_import": 1, 
-  "autoname": "naming_series:", 
-  "doctype": "DocType", 
-  "icon": "icon-bug", 
-  "is_submittable": 0, 
-  "module": "Support", 
-  "name": "__common__", 
-  "search_fields": "status,customer,customer_name,territory"
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "Customer Issue", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "amend": 0, 
-  "cancel": 0, 
-  "create": 1, 
-  "delete": 1, 
-  "doctype": "DocPerm", 
-  "email": 1, 
-  "name": "__common__", 
-  "parent": "Customer Issue", 
-  "parentfield": "permissions", 
-  "parenttype": "DocType", 
-  "permlevel": 0, 
-  "print": 1, 
-  "read": 1, 
-  "report": 1, 
-  "role": "Maintenance User", 
-  "submit": 0, 
-  "write": 1
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Customer Issue"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "customer_section", 
-  "fieldtype": "Section Break", 
-  "label": "Customer", 
-  "options": "icon-user"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "naming_series", 
-  "fieldtype": "Select", 
-  "in_filter": 0, 
-  "label": "Series", 
-  "no_copy": 1, 
-  "oldfieldname": "naming_series", 
-  "oldfieldtype": "Select", 
-  "options": "\nCI/2010-2011/", 
-  "reqd": 1, 
-  "search_index": 0
- }, 
- {
-  "default": "Open", 
-  "doctype": "DocField", 
-  "fieldname": "status", 
-  "fieldtype": "Select", 
-  "in_filter": 1, 
-  "in_list_view": 1, 
-  "label": "Status", 
-  "no_copy": 1, 
-  "oldfieldname": "status", 
-  "oldfieldtype": "Select", 
-  "options": "\nOpen\nClosed\nWork In Progress\nCancelled", 
-  "reqd": 1, 
-  "search_index": 1
- }, 
- {
-  "default": "Today", 
-  "doctype": "DocField", 
-  "fieldname": "complaint_date", 
-  "fieldtype": "Date", 
-  "in_filter": 1, 
-  "label": "Issue Date", 
-  "oldfieldname": "complaint_date", 
-  "oldfieldtype": "Date", 
-  "reqd": 1, 
-  "search_index": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break0", 
-  "fieldtype": "Column Break", 
-  "oldfieldtype": "Column Break", 
-  "width": "50%"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "customer", 
-  "fieldtype": "Link", 
-  "in_filter": 1, 
-  "in_list_view": 1, 
-  "label": "Customer", 
-  "oldfieldname": "customer", 
-  "oldfieldtype": "Link", 
-  "options": "Customer", 
-  "print_hide": 1, 
-  "reqd": 1, 
-  "search_index": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "customer_address", 
-  "fieldtype": "Link", 
-  "label": "Customer Address", 
-  "options": "Address", 
-  "print_hide": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "contact_person", 
-  "fieldtype": "Link", 
-  "label": "Contact Person", 
-  "options": "Contact", 
-  "print_hide": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "issue_details", 
-  "fieldtype": "Section Break", 
-  "label": "Issue Details", 
-  "oldfieldtype": "Section Break", 
-  "options": "icon-ticket"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "complaint", 
-  "fieldtype": "Small Text", 
-  "label": "Issue", 
-  "no_copy": 1, 
-  "oldfieldname": "complaint", 
-  "oldfieldtype": "Small Text", 
-  "reqd": 1
- }, 
- {
-  "description": "Item, Warranty, AMC (Annual Maintenance Contract) details will be automatically fetched when Serial Number is selected.", 
-  "doctype": "DocField", 
-  "fieldname": "serial_no", 
-  "fieldtype": "Link", 
-  "in_list_view": 0, 
-  "label": "Serial No", 
-  "options": "Serial No"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "item_code", 
-  "fieldtype": "Link", 
-  "in_filter": 1, 
-  "in_list_view": 1, 
-  "label": "Item Code", 
-  "oldfieldname": "item_code", 
-  "oldfieldtype": "Link", 
-  "options": "Item", 
-  "reqd": 0, 
-  "search_index": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break1", 
-  "fieldtype": "Column Break", 
-  "oldfieldtype": "Column Break", 
-  "width": "50%"
- }, 
- {
-  "depends_on": "eval:doc.item_code", 
-  "doctype": "DocField", 
-  "fieldname": "item_name", 
-  "fieldtype": "Data", 
-  "label": "Item Name", 
-  "oldfieldname": "item_name", 
-  "oldfieldtype": "Data", 
-  "read_only": 1
- }, 
- {
-  "depends_on": "eval:doc.item_code", 
-  "doctype": "DocField", 
-  "fieldname": "description", 
-  "fieldtype": "Small Text", 
-  "label": "Description", 
-  "oldfieldname": "description", 
-  "oldfieldtype": "Small Text", 
-  "read_only": 1, 
-  "width": "300px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "warranty_amc_status", 
-  "fieldtype": "Select", 
-  "hidden": 0, 
-  "in_filter": 1, 
-  "in_list_view": 1, 
-  "label": "Warranty / AMC Status", 
-  "options": "\nUnder Warranty\nOut of Warranty\nUnder AMC\nOut of AMC"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "warranty_expiry_date", 
-  "fieldtype": "Date", 
-  "label": "Warranty Expiry Date"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "amc_expiry_date", 
-  "fieldtype": "Date", 
-  "label": "AMC Expiry Date"
- }, 
- {
-  "description": "To assign this issue, use the \"Assign\" button in the sidebar.", 
-  "doctype": "DocField", 
-  "fieldname": "resolution_section", 
-  "fieldtype": "Section Break", 
-  "label": "Resolution", 
-  "oldfieldtype": "Section Break", 
-  "options": "icon-thumbs-up"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "resolution_date", 
-  "fieldtype": "Datetime", 
-  "in_filter": 1, 
-  "label": "Resolution Date", 
-  "no_copy": 1, 
-  "oldfieldname": "resolution_date", 
-  "oldfieldtype": "Date", 
-  "search_index": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "resolved_by", 
-  "fieldtype": "Link", 
-  "in_filter": 1, 
-  "label": "Resolved By", 
-  "no_copy": 1, 
-  "oldfieldname": "resolved_by", 
-  "oldfieldtype": "Link", 
-  "options": "User", 
-  "search_index": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "resolution_details", 
-  "fieldtype": "Text", 
-  "label": "Resolution Details", 
-  "no_copy": 1, 
-  "oldfieldname": "resolution_details", 
-  "oldfieldtype": "Text"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "contact_info", 
-  "fieldtype": "Section Break", 
-  "label": "Contact Info", 
-  "options": "icon-bullhorn"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "col_break3", 
-  "fieldtype": "Column Break", 
-  "width": "50%"
- }, 
- {
-  "depends_on": "customer", 
-  "doctype": "DocField", 
-  "fieldname": "customer_name", 
-  "fieldtype": "Data", 
-  "label": "Customer Name", 
-  "read_only": 1
- }, 
- {
-  "depends_on": "customer", 
-  "description": "<a href=\"#Sales Browser/Customer Group\">Add / Edit</a>", 
-  "doctype": "DocField", 
-  "fieldname": "customer_group", 
-  "fieldtype": "Link", 
-  "label": "Customer Group", 
-  "options": "Customer Group", 
-  "print_hide": 1, 
-  "reqd": 0
- }, 
- {
-  "depends_on": "customer", 
-  "description": "<a href=\"#Sales Browser/Territory\">Add / Edit</a>", 
-  "doctype": "DocField", 
-  "fieldname": "territory", 
-  "fieldtype": "Link", 
-  "in_filter": 1, 
-  "label": "Territory", 
-  "oldfieldname": "territory", 
-  "oldfieldtype": "Link", 
-  "options": "Territory", 
-  "print_hide": 1, 
-  "reqd": 0, 
-  "search_index": 1
- }, 
- {
-  "depends_on": "customer", 
-  "doctype": "DocField", 
-  "fieldname": "contact_display", 
-  "fieldtype": "Small Text", 
-  "label": "Contact", 
-  "read_only": 1
- }, 
- {
-  "depends_on": "customer", 
-  "doctype": "DocField", 
-  "fieldname": "contact_mobile", 
-  "fieldtype": "Data", 
-  "label": "Mobile No", 
-  "read_only": 1
- }, 
- {
-  "depends_on": "customer", 
-  "doctype": "DocField", 
-  "fieldname": "contact_email", 
-  "fieldtype": "Data", 
-  "label": "Contact Email", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "col_break4", 
-  "fieldtype": "Column Break", 
-  "width": "50%"
- }, 
- {
-  "depends_on": "customer", 
-  "description": "If different than customer address", 
-  "doctype": "DocField", 
-  "fieldname": "service_address", 
-  "fieldtype": "Small Text", 
-  "label": "Service Address", 
-  "oldfieldname": "service_address", 
-  "oldfieldtype": "Small Text"
- }, 
- {
-  "depends_on": "customer", 
-  "doctype": "DocField", 
-  "fieldname": "address_display", 
-  "fieldtype": "Small Text", 
-  "hidden": 0, 
-  "label": "Address", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "more_info", 
-  "fieldtype": "Section Break", 
-  "label": "More Info", 
-  "options": "icon-file-text"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "col_break5", 
-  "fieldtype": "Column Break", 
-  "width": "50%"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "company", 
-  "fieldtype": "Link", 
-  "in_filter": 1, 
-  "label": "Company", 
-  "oldfieldname": "company", 
-  "oldfieldtype": "Link", 
-  "options": "Company", 
-  "print_hide": 1, 
-  "reqd": 1, 
-  "search_index": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "fiscal_year", 
-  "fieldtype": "Select", 
-  "in_filter": 1, 
-  "label": "Fiscal Year", 
-  "oldfieldname": "fiscal_year", 
-  "oldfieldtype": "Select", 
-  "options": "link:Fiscal Year", 
-  "print_hide": 1, 
-  "reqd": 1, 
-  "search_index": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "col_break6", 
-  "fieldtype": "Column Break", 
-  "width": "50%"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "complaint_raised_by", 
-  "fieldtype": "Data", 
-  "label": "Raised By", 
-  "oldfieldname": "complaint_raised_by", 
-  "oldfieldtype": "Data"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "from_company", 
-  "fieldtype": "Data", 
-  "label": "From Company", 
-  "oldfieldname": "from_company", 
-  "oldfieldtype": "Data"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "amended_from", 
-  "fieldtype": "Data", 
-  "hidden": 1, 
-  "ignore_restrictions": 1, 
-  "label": "Amended From", 
-  "no_copy": 1, 
-  "oldfieldname": "amended_from", 
-  "oldfieldtype": "Data", 
-  "print_hide": 1, 
-  "width": "150px"
- }, 
- {
-  "doctype": "DocPerm"
- }
-]
\ No newline at end of file
+{
+ "allow_import": 1, 
+ "autoname": "naming_series:", 
+ "creation": "2013-01-10 16:34:30", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "fields": [
+  {
+   "fieldname": "customer_section", 
+   "fieldtype": "Section Break", 
+   "label": "Customer", 
+   "options": "icon-user", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "naming_series", 
+   "fieldtype": "Select", 
+   "in_filter": 0, 
+   "label": "Series", 
+   "no_copy": 1, 
+   "oldfieldname": "naming_series", 
+   "oldfieldtype": "Select", 
+   "options": "\nCI/2010-2011/", 
+   "permlevel": 0, 
+   "reqd": 1, 
+   "search_index": 0
+  }, 
+  {
+   "default": "Open", 
+   "fieldname": "status", 
+   "fieldtype": "Select", 
+   "in_filter": 1, 
+   "in_list_view": 1, 
+   "label": "Status", 
+   "no_copy": 1, 
+   "oldfieldname": "status", 
+   "oldfieldtype": "Select", 
+   "options": "\nOpen\nClosed\nWork In Progress\nCancelled", 
+   "permlevel": 0, 
+   "reqd": 1, 
+   "search_index": 1
+  }, 
+  {
+   "default": "Today", 
+   "fieldname": "complaint_date", 
+   "fieldtype": "Date", 
+   "in_filter": 1, 
+   "label": "Issue Date", 
+   "oldfieldname": "complaint_date", 
+   "oldfieldtype": "Date", 
+   "permlevel": 0, 
+   "reqd": 1, 
+   "search_index": 1
+  }, 
+  {
+   "fieldname": "column_break0", 
+   "fieldtype": "Column Break", 
+   "oldfieldtype": "Column Break", 
+   "permlevel": 0, 
+   "width": "50%"
+  }, 
+  {
+   "fieldname": "customer", 
+   "fieldtype": "Link", 
+   "in_filter": 1, 
+   "in_list_view": 1, 
+   "label": "Customer", 
+   "oldfieldname": "customer", 
+   "oldfieldtype": "Link", 
+   "options": "Customer", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "reqd": 1, 
+   "search_index": 1
+  }, 
+  {
+   "fieldname": "customer_address", 
+   "fieldtype": "Link", 
+   "label": "Customer Address", 
+   "options": "Address", 
+   "permlevel": 0, 
+   "print_hide": 1
+  }, 
+  {
+   "fieldname": "contact_person", 
+   "fieldtype": "Link", 
+   "label": "Contact Person", 
+   "options": "Contact", 
+   "permlevel": 0, 
+   "print_hide": 1
+  }, 
+  {
+   "fieldname": "issue_details", 
+   "fieldtype": "Section Break", 
+   "label": "Issue Details", 
+   "oldfieldtype": "Section Break", 
+   "options": "icon-ticket", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "complaint", 
+   "fieldtype": "Small Text", 
+   "label": "Issue", 
+   "no_copy": 1, 
+   "oldfieldname": "complaint", 
+   "oldfieldtype": "Small Text", 
+   "permlevel": 0, 
+   "reqd": 1
+  }, 
+  {
+   "description": "Item, Warranty, AMC (Annual Maintenance Contract) details will be automatically fetched when Serial Number is selected.", 
+   "fieldname": "serial_no", 
+   "fieldtype": "Link", 
+   "in_list_view": 0, 
+   "label": "Serial No", 
+   "options": "Serial No", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "item_code", 
+   "fieldtype": "Link", 
+   "in_filter": 1, 
+   "in_list_view": 1, 
+   "label": "Item Code", 
+   "oldfieldname": "item_code", 
+   "oldfieldtype": "Link", 
+   "options": "Item", 
+   "permlevel": 0, 
+   "reqd": 0, 
+   "search_index": 1
+  }, 
+  {
+   "fieldname": "column_break1", 
+   "fieldtype": "Column Break", 
+   "oldfieldtype": "Column Break", 
+   "permlevel": 0, 
+   "width": "50%"
+  }, 
+  {
+   "depends_on": "eval:doc.item_code", 
+   "fieldname": "item_name", 
+   "fieldtype": "Data", 
+   "label": "Item Name", 
+   "oldfieldname": "item_name", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "depends_on": "eval:doc.item_code", 
+   "fieldname": "description", 
+   "fieldtype": "Small Text", 
+   "label": "Description", 
+   "oldfieldname": "description", 
+   "oldfieldtype": "Small Text", 
+   "permlevel": 0, 
+   "read_only": 1, 
+   "width": "300px"
+  }, 
+  {
+   "fieldname": "warranty_amc_status", 
+   "fieldtype": "Select", 
+   "hidden": 0, 
+   "in_filter": 1, 
+   "in_list_view": 1, 
+   "label": "Warranty / AMC Status", 
+   "options": "\nUnder Warranty\nOut of Warranty\nUnder AMC\nOut of AMC", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "warranty_expiry_date", 
+   "fieldtype": "Date", 
+   "label": "Warranty Expiry Date", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "amc_expiry_date", 
+   "fieldtype": "Date", 
+   "label": "AMC Expiry Date", 
+   "permlevel": 0
+  }, 
+  {
+   "description": "To assign this issue, use the \"Assign\" button in the sidebar.", 
+   "fieldname": "resolution_section", 
+   "fieldtype": "Section Break", 
+   "label": "Resolution", 
+   "oldfieldtype": "Section Break", 
+   "options": "icon-thumbs-up", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "resolution_date", 
+   "fieldtype": "Datetime", 
+   "in_filter": 1, 
+   "label": "Resolution Date", 
+   "no_copy": 1, 
+   "oldfieldname": "resolution_date", 
+   "oldfieldtype": "Date", 
+   "permlevel": 0, 
+   "search_index": 1
+  }, 
+  {
+   "fieldname": "resolved_by", 
+   "fieldtype": "Link", 
+   "in_filter": 1, 
+   "label": "Resolved By", 
+   "no_copy": 1, 
+   "oldfieldname": "resolved_by", 
+   "oldfieldtype": "Link", 
+   "options": "User", 
+   "permlevel": 0, 
+   "search_index": 1
+  }, 
+  {
+   "fieldname": "resolution_details", 
+   "fieldtype": "Text", 
+   "label": "Resolution Details", 
+   "no_copy": 1, 
+   "oldfieldname": "resolution_details", 
+   "oldfieldtype": "Text", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "contact_info", 
+   "fieldtype": "Section Break", 
+   "label": "Contact Info", 
+   "options": "icon-bullhorn", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "col_break3", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0, 
+   "width": "50%"
+  }, 
+  {
+   "depends_on": "customer", 
+   "fieldname": "customer_name", 
+   "fieldtype": "Data", 
+   "label": "Customer Name", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "depends_on": "customer", 
+   "description": "<a href=\"#Sales Browser/Customer Group\">Add / Edit</a>", 
+   "fieldname": "customer_group", 
+   "fieldtype": "Link", 
+   "label": "Customer Group", 
+   "options": "Customer Group", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "reqd": 0
+  }, 
+  {
+   "depends_on": "customer", 
+   "description": "<a href=\"#Sales Browser/Territory\">Add / Edit</a>", 
+   "fieldname": "territory", 
+   "fieldtype": "Link", 
+   "in_filter": 1, 
+   "label": "Territory", 
+   "oldfieldname": "territory", 
+   "oldfieldtype": "Link", 
+   "options": "Territory", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "reqd": 0, 
+   "search_index": 1
+  }, 
+  {
+   "depends_on": "customer", 
+   "fieldname": "contact_display", 
+   "fieldtype": "Small Text", 
+   "label": "Contact", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "depends_on": "customer", 
+   "fieldname": "contact_mobile", 
+   "fieldtype": "Data", 
+   "label": "Mobile No", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "depends_on": "customer", 
+   "fieldname": "contact_email", 
+   "fieldtype": "Data", 
+   "label": "Contact Email", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "col_break4", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0, 
+   "width": "50%"
+  }, 
+  {
+   "depends_on": "customer", 
+   "description": "If different than customer address", 
+   "fieldname": "service_address", 
+   "fieldtype": "Small Text", 
+   "label": "Service Address", 
+   "oldfieldname": "service_address", 
+   "oldfieldtype": "Small Text", 
+   "permlevel": 0
+  }, 
+  {
+   "depends_on": "customer", 
+   "fieldname": "address_display", 
+   "fieldtype": "Small Text", 
+   "hidden": 0, 
+   "label": "Address", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "more_info", 
+   "fieldtype": "Section Break", 
+   "label": "More Info", 
+   "options": "icon-file-text", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "col_break5", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0, 
+   "width": "50%"
+  }, 
+  {
+   "fieldname": "company", 
+   "fieldtype": "Link", 
+   "in_filter": 1, 
+   "label": "Company", 
+   "oldfieldname": "company", 
+   "oldfieldtype": "Link", 
+   "options": "Company", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "reqd": 1, 
+   "search_index": 1
+  }, 
+  {
+   "fieldname": "fiscal_year", 
+   "fieldtype": "Select", 
+   "in_filter": 1, 
+   "label": "Fiscal Year", 
+   "oldfieldname": "fiscal_year", 
+   "oldfieldtype": "Select", 
+   "options": "link:Fiscal Year", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "reqd": 1, 
+   "search_index": 1
+  }, 
+  {
+   "fieldname": "col_break6", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0, 
+   "width": "50%"
+  }, 
+  {
+   "fieldname": "complaint_raised_by", 
+   "fieldtype": "Data", 
+   "label": "Raised By", 
+   "oldfieldname": "complaint_raised_by", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "from_company", 
+   "fieldtype": "Data", 
+   "label": "From Company", 
+   "oldfieldname": "from_company", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "amended_from", 
+   "fieldtype": "Data", 
+   "hidden": 1, 
+   "ignore_restrictions": 1, 
+   "label": "Amended From", 
+   "no_copy": 1, 
+   "oldfieldname": "amended_from", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "width": "150px"
+  }
+ ], 
+ "icon": "icon-bug", 
+ "idx": 1, 
+ "is_submittable": 0, 
+ "modified": "2014-01-20 17:48:35", 
+ "modified_by": "Administrator", 
+ "module": "Support", 
+ "name": "Customer Issue", 
+ "owner": "harshada@webnotestech.com", 
+ "permissions": [
+  {
+   "amend": 0, 
+   "cancel": 0, 
+   "create": 1, 
+   "delete": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Maintenance User", 
+   "submit": 0, 
+   "write": 1
+  }
+ ], 
+ "search_fields": "status,customer,customer_name,territory"
+}
\ No newline at end of file
diff --git a/erpnext/support/doctype/maintenance_schedule/maintenance_schedule.txt b/erpnext/support/doctype/maintenance_schedule/maintenance_schedule.txt
index 5627889..ac9d997 100644
--- a/erpnext/support/doctype/maintenance_schedule/maintenance_schedule.txt
+++ b/erpnext/support/doctype/maintenance_schedule/maintenance_schedule.txt
@@ -1,262 +1,243 @@
-[
- {
-  "creation": "2013-01-10 16:34:30", 
-  "docstatus": 0, 
-  "modified": "2014-01-20 17:48:56", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "autoname": "MS.#####", 
-  "doctype": "DocType", 
-  "icon": "icon-calendar", 
-  "is_submittable": 1, 
-  "module": "Support", 
-  "name": "__common__", 
-  "search_fields": "status,customer,customer_name, sales_order_no"
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "Maintenance Schedule", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "amend": 1, 
-  "cancel": 1, 
-  "create": 1, 
-  "delete": 1, 
-  "doctype": "DocPerm", 
-  "email": 1, 
-  "name": "__common__", 
-  "parent": "Maintenance Schedule", 
-  "parentfield": "permissions", 
-  "parenttype": "DocType", 
-  "permlevel": 0, 
-  "print": 1, 
-  "read": 1, 
-  "report": 1, 
-  "role": "Maintenance Manager", 
-  "submit": 1, 
-  "write": 1
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Maintenance Schedule"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "customer_details", 
-  "fieldtype": "Section Break", 
-  "label": "Customer Details", 
-  "oldfieldtype": "Section Break", 
-  "options": "icon-user"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "customer", 
-  "fieldtype": "Link", 
-  "in_filter": 1, 
-  "in_list_view": 0, 
-  "label": "Customer", 
-  "oldfieldname": "customer", 
-  "oldfieldtype": "Link", 
-  "options": "Customer", 
-  "print_hide": 1, 
-  "reqd": 1, 
-  "search_index": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break0", 
-  "fieldtype": "Column Break", 
-  "oldfieldtype": "Column Break"
- }, 
- {
-  "default": "Draft", 
-  "doctype": "DocField", 
-  "fieldname": "status", 
-  "fieldtype": "Select", 
-  "in_filter": 1, 
-  "label": "Status", 
-  "no_copy": 1, 
-  "oldfieldname": "status", 
-  "oldfieldtype": "Select", 
-  "options": "\nDraft\nSubmitted\nCancelled", 
-  "read_only": 1, 
-  "reqd": 1, 
-  "search_index": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "transaction_date", 
-  "fieldtype": "Date", 
-  "in_filter": 1, 
-  "label": "Transaction Date", 
-  "oldfieldname": "transaction_date", 
-  "oldfieldtype": "Date", 
-  "reqd": 1, 
-  "search_index": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "items", 
-  "fieldtype": "Section Break", 
-  "label": "Items", 
-  "oldfieldtype": "Section Break", 
-  "options": "icon-shopping-cart"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "item_maintenance_detail", 
-  "fieldtype": "Table", 
-  "label": "Maintenance Schedule Item", 
-  "oldfieldname": "item_maintenance_detail", 
-  "oldfieldtype": "Table", 
-  "options": "Maintenance Schedule Item"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "schedule", 
-  "fieldtype": "Section Break", 
-  "label": "Schedule", 
-  "oldfieldtype": "Section Break", 
-  "options": "icon-time"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "generate_schedule", 
-  "fieldtype": "Button", 
-  "label": "Generate Schedule", 
-  "oldfieldtype": "Button"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "maintenance_schedule_detail", 
-  "fieldtype": "Table", 
-  "label": "Maintenance Schedule Detail", 
-  "oldfieldname": "maintenance_schedule_detail", 
-  "oldfieldtype": "Table", 
-  "options": "Maintenance Schedule Detail", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "contact_info", 
-  "fieldtype": "Section Break", 
-  "label": "Contact Info"
- }, 
- {
-  "depends_on": "customer", 
-  "doctype": "DocField", 
-  "fieldname": "customer_name", 
-  "fieldtype": "Data", 
-  "in_filter": 1, 
-  "in_list_view": 1, 
-  "label": "Customer Name", 
-  "oldfieldname": "customer_name", 
-  "oldfieldtype": "Data", 
-  "read_only": 1, 
-  "reqd": 0, 
-  "search_index": 0
- }, 
- {
-  "depends_on": "customer", 
-  "doctype": "DocField", 
-  "fieldname": "contact_person", 
-  "fieldtype": "Link", 
-  "label": "Contact Person", 
-  "options": "Contact", 
-  "print_hide": 1
- }, 
- {
-  "depends_on": "customer", 
-  "doctype": "DocField", 
-  "fieldname": "contact_mobile", 
-  "fieldtype": "Data", 
-  "hidden": 1, 
-  "label": "Mobile No", 
-  "read_only": 1
- }, 
- {
-  "depends_on": "customer", 
-  "doctype": "DocField", 
-  "fieldname": "contact_email", 
-  "fieldtype": "Data", 
-  "hidden": 1, 
-  "label": "Contact Email", 
-  "print_hide": 1, 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "contact_display", 
-  "fieldtype": "Small Text", 
-  "hidden": 1, 
-  "label": "Contact", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break_17", 
-  "fieldtype": "Column Break"
- }, 
- {
-  "depends_on": "customer", 
-  "doctype": "DocField", 
-  "fieldname": "customer_address", 
-  "fieldtype": "Link", 
-  "label": "Customer Address", 
-  "options": "Address", 
-  "print_hide": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "address_display", 
-  "fieldtype": "Small Text", 
-  "hidden": 1, 
-  "label": "Address", 
-  "read_only": 1
- }, 
- {
-  "depends_on": "customer", 
-  "description": "<a href=\"#Sales Browser/Territory\">Add / Edit</a>", 
-  "doctype": "DocField", 
-  "fieldname": "territory", 
-  "fieldtype": "Link", 
-  "in_filter": 1, 
-  "label": "Territory", 
-  "oldfieldname": "territory", 
-  "oldfieldtype": "Link", 
-  "options": "Territory", 
-  "reqd": 1, 
-  "search_index": 0
- }, 
- {
-  "depends_on": "customer", 
-  "description": "<a href=\"#Sales Browser/Customer Group\">Add / Edit</a>", 
-  "doctype": "DocField", 
-  "fieldname": "customer_group", 
-  "fieldtype": "Link", 
-  "label": "Customer Group", 
-  "options": "Customer Group", 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "company", 
-  "fieldtype": "Link", 
-  "in_filter": 1, 
-  "label": "Company", 
-  "oldfieldname": "company", 
-  "oldfieldtype": "Link", 
-  "options": "Company", 
-  "reqd": 1, 
-  "search_index": 0
- }, 
- {
-  "doctype": "DocPerm"
- }
-]
\ No newline at end of file
+{
+ "autoname": "MS.#####", 
+ "creation": "2013-01-10 16:34:30", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "fields": [
+  {
+   "fieldname": "customer_details", 
+   "fieldtype": "Section Break", 
+   "label": "Customer Details", 
+   "oldfieldtype": "Section Break", 
+   "options": "icon-user", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "customer", 
+   "fieldtype": "Link", 
+   "in_filter": 1, 
+   "in_list_view": 0, 
+   "label": "Customer", 
+   "oldfieldname": "customer", 
+   "oldfieldtype": "Link", 
+   "options": "Customer", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "reqd": 1, 
+   "search_index": 1
+  }, 
+  {
+   "fieldname": "column_break0", 
+   "fieldtype": "Column Break", 
+   "oldfieldtype": "Column Break", 
+   "permlevel": 0
+  }, 
+  {
+   "default": "Draft", 
+   "fieldname": "status", 
+   "fieldtype": "Select", 
+   "in_filter": 1, 
+   "label": "Status", 
+   "no_copy": 1, 
+   "oldfieldname": "status", 
+   "oldfieldtype": "Select", 
+   "options": "\nDraft\nSubmitted\nCancelled", 
+   "permlevel": 0, 
+   "read_only": 1, 
+   "reqd": 1, 
+   "search_index": 0
+  }, 
+  {
+   "fieldname": "transaction_date", 
+   "fieldtype": "Date", 
+   "in_filter": 1, 
+   "label": "Transaction Date", 
+   "oldfieldname": "transaction_date", 
+   "oldfieldtype": "Date", 
+   "permlevel": 0, 
+   "reqd": 1, 
+   "search_index": 0
+  }, 
+  {
+   "fieldname": "items", 
+   "fieldtype": "Section Break", 
+   "label": "Items", 
+   "oldfieldtype": "Section Break", 
+   "options": "icon-shopping-cart", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "item_maintenance_detail", 
+   "fieldtype": "Table", 
+   "label": "Maintenance Schedule Item", 
+   "oldfieldname": "item_maintenance_detail", 
+   "oldfieldtype": "Table", 
+   "options": "Maintenance Schedule Item", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "schedule", 
+   "fieldtype": "Section Break", 
+   "label": "Schedule", 
+   "oldfieldtype": "Section Break", 
+   "options": "icon-time", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "generate_schedule", 
+   "fieldtype": "Button", 
+   "label": "Generate Schedule", 
+   "oldfieldtype": "Button", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "maintenance_schedule_detail", 
+   "fieldtype": "Table", 
+   "label": "Maintenance Schedule Detail", 
+   "oldfieldname": "maintenance_schedule_detail", 
+   "oldfieldtype": "Table", 
+   "options": "Maintenance Schedule Detail", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "contact_info", 
+   "fieldtype": "Section Break", 
+   "label": "Contact Info", 
+   "permlevel": 0
+  }, 
+  {
+   "depends_on": "customer", 
+   "fieldname": "customer_name", 
+   "fieldtype": "Data", 
+   "in_filter": 1, 
+   "in_list_view": 1, 
+   "label": "Customer Name", 
+   "oldfieldname": "customer_name", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "read_only": 1, 
+   "reqd": 0, 
+   "search_index": 0
+  }, 
+  {
+   "depends_on": "customer", 
+   "fieldname": "contact_person", 
+   "fieldtype": "Link", 
+   "label": "Contact Person", 
+   "options": "Contact", 
+   "permlevel": 0, 
+   "print_hide": 1
+  }, 
+  {
+   "depends_on": "customer", 
+   "fieldname": "contact_mobile", 
+   "fieldtype": "Data", 
+   "hidden": 1, 
+   "label": "Mobile No", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "depends_on": "customer", 
+   "fieldname": "contact_email", 
+   "fieldtype": "Data", 
+   "hidden": 1, 
+   "label": "Contact Email", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "contact_display", 
+   "fieldtype": "Small Text", 
+   "hidden": 1, 
+   "label": "Contact", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "column_break_17", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0
+  }, 
+  {
+   "depends_on": "customer", 
+   "fieldname": "customer_address", 
+   "fieldtype": "Link", 
+   "label": "Customer Address", 
+   "options": "Address", 
+   "permlevel": 0, 
+   "print_hide": 1
+  }, 
+  {
+   "fieldname": "address_display", 
+   "fieldtype": "Small Text", 
+   "hidden": 1, 
+   "label": "Address", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "depends_on": "customer", 
+   "description": "<a href=\"#Sales Browser/Territory\">Add / Edit</a>", 
+   "fieldname": "territory", 
+   "fieldtype": "Link", 
+   "in_filter": 1, 
+   "label": "Territory", 
+   "oldfieldname": "territory", 
+   "oldfieldtype": "Link", 
+   "options": "Territory", 
+   "permlevel": 0, 
+   "reqd": 1, 
+   "search_index": 0
+  }, 
+  {
+   "depends_on": "customer", 
+   "description": "<a href=\"#Sales Browser/Customer Group\">Add / Edit</a>", 
+   "fieldname": "customer_group", 
+   "fieldtype": "Link", 
+   "label": "Customer Group", 
+   "options": "Customer Group", 
+   "permlevel": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "company", 
+   "fieldtype": "Link", 
+   "in_filter": 1, 
+   "label": "Company", 
+   "oldfieldname": "company", 
+   "oldfieldtype": "Link", 
+   "options": "Company", 
+   "permlevel": 0, 
+   "reqd": 1, 
+   "search_index": 0
+  }
+ ], 
+ "icon": "icon-calendar", 
+ "idx": 1, 
+ "is_submittable": 1, 
+ "modified": "2014-01-20 17:48:56", 
+ "modified_by": "Administrator", 
+ "module": "Support", 
+ "name": "Maintenance Schedule", 
+ "owner": "Administrator", 
+ "permissions": [
+  {
+   "amend": 1, 
+   "cancel": 1, 
+   "create": 1, 
+   "delete": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Maintenance Manager", 
+   "submit": 1, 
+   "write": 1
+  }
+ ], 
+ "search_fields": "status,customer,customer_name, sales_order_no"
+}
\ No newline at end of file
diff --git a/erpnext/support/doctype/maintenance_schedule_detail/maintenance_schedule_detail.txt b/erpnext/support/doctype/maintenance_schedule_detail/maintenance_schedule_detail.txt
index 8ed6856..09098f0 100644
--- a/erpnext/support/doctype/maintenance_schedule_detail/maintenance_schedule_detail.txt
+++ b/erpnext/support/doctype/maintenance_schedule_detail/maintenance_schedule_detail.txt
@@ -1,110 +1,97 @@
-[
- {
-  "creation": "2013-02-22 01:28:05", 
-  "docstatus": 0, 
-  "modified": "2013-12-31 12:13:38", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "autoname": "MSD.#####", 
-  "doctype": "DocType", 
-  "istable": 1, 
-  "module": "Support", 
-  "name": "__common__"
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "Maintenance Schedule Detail", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Maintenance Schedule Detail"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "item_code", 
-  "fieldtype": "Link", 
-  "in_filter": 1, 
-  "in_list_view": 1, 
-  "label": "Item Code", 
-  "oldfieldname": "item_code", 
-  "oldfieldtype": "Link", 
-  "options": "Item", 
-  "read_only": 1, 
-  "reqd": 0, 
-  "search_index": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "item_name", 
-  "fieldtype": "Data", 
-  "in_filter": 0, 
-  "in_list_view": 1, 
-  "label": "Item Name", 
-  "oldfieldname": "item_name", 
-  "oldfieldtype": "Data", 
-  "read_only": 1, 
-  "search_index": 0
- }, 
- {
-  "allow_on_submit": 0, 
-  "doctype": "DocField", 
-  "fieldname": "scheduled_date", 
-  "fieldtype": "Date", 
-  "in_filter": 1, 
-  "in_list_view": 1, 
-  "label": "Scheduled Date", 
-  "oldfieldname": "scheduled_date", 
-  "oldfieldtype": "Date", 
-  "reqd": 1, 
-  "search_index": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "actual_date", 
-  "fieldtype": "Date", 
-  "hidden": 1, 
-  "in_list_view": 0, 
-  "label": "Actual Date", 
-  "no_copy": 1, 
-  "oldfieldname": "actual_date", 
-  "oldfieldtype": "Date", 
-  "print_hide": 1, 
-  "read_only": 0, 
-  "report_hide": 1
- }, 
- {
-  "allow_on_submit": 0, 
-  "doctype": "DocField", 
-  "fieldname": "sales_person", 
-  "fieldtype": "Link", 
-  "in_filter": 1, 
-  "in_list_view": 1, 
-  "label": "Sales Person", 
-  "oldfieldname": "incharge_name", 
-  "oldfieldtype": "Link", 
-  "options": "Sales Person", 
-  "reqd": 1, 
-  "search_index": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "serial_no", 
-  "fieldtype": "Small Text", 
-  "in_filter": 1, 
-  "in_list_view": 1, 
-  "label": "Serial No", 
-  "no_copy": 0, 
-  "oldfieldname": "serial_no", 
-  "oldfieldtype": "Small Text", 
-  "print_width": "160px", 
-  "read_only": 1, 
-  "search_index": 0, 
-  "width": "160px"
- }
-]
\ No newline at end of file
+{
+ "autoname": "MSD.#####", 
+ "creation": "2013-02-22 01:28:05", 
+ "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, 
+   "read_only": 1, 
+   "reqd": 0, 
+   "search_index": 1
+  }, 
+  {
+   "fieldname": "item_name", 
+   "fieldtype": "Data", 
+   "in_filter": 0, 
+   "in_list_view": 1, 
+   "label": "Item Name", 
+   "oldfieldname": "item_name", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "read_only": 1, 
+   "search_index": 0
+  }, 
+  {
+   "allow_on_submit": 0, 
+   "fieldname": "scheduled_date", 
+   "fieldtype": "Date", 
+   "in_filter": 1, 
+   "in_list_view": 1, 
+   "label": "Scheduled Date", 
+   "oldfieldname": "scheduled_date", 
+   "oldfieldtype": "Date", 
+   "permlevel": 0, 
+   "reqd": 1, 
+   "search_index": 1
+  }, 
+  {
+   "fieldname": "actual_date", 
+   "fieldtype": "Date", 
+   "hidden": 1, 
+   "in_list_view": 0, 
+   "label": "Actual Date", 
+   "no_copy": 1, 
+   "oldfieldname": "actual_date", 
+   "oldfieldtype": "Date", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0, 
+   "report_hide": 1
+  }, 
+  {
+   "allow_on_submit": 0, 
+   "fieldname": "sales_person", 
+   "fieldtype": "Link", 
+   "in_filter": 1, 
+   "in_list_view": 1, 
+   "label": "Sales Person", 
+   "oldfieldname": "incharge_name", 
+   "oldfieldtype": "Link", 
+   "options": "Sales Person", 
+   "permlevel": 0, 
+   "reqd": 1, 
+   "search_index": 0
+  }, 
+  {
+   "fieldname": "serial_no", 
+   "fieldtype": "Small Text", 
+   "in_filter": 1, 
+   "in_list_view": 1, 
+   "label": "Serial No", 
+   "no_copy": 0, 
+   "oldfieldname": "serial_no", 
+   "oldfieldtype": "Small Text", 
+   "permlevel": 0, 
+   "print_width": "160px", 
+   "read_only": 1, 
+   "search_index": 0, 
+   "width": "160px"
+  }
+ ], 
+ "idx": 1, 
+ "istable": 1, 
+ "modified": "2013-12-31 12:13:38", 
+ "modified_by": "Administrator", 
+ "module": "Support", 
+ "name": "Maintenance Schedule Detail", 
+ "owner": "Administrator"
+}
\ No newline at end of file
diff --git a/erpnext/support/doctype/maintenance_schedule_item/maintenance_schedule_item.txt b/erpnext/support/doctype/maintenance_schedule_item/maintenance_schedule_item.txt
index 43d281d..076317a 100644
--- a/erpnext/support/doctype/maintenance_schedule_item/maintenance_schedule_item.txt
+++ b/erpnext/support/doctype/maintenance_schedule_item/maintenance_schedule_item.txt
@@ -1,154 +1,141 @@
-[
- {
-  "creation": "2013-02-22 01:28:05", 
-  "docstatus": 0, 
-  "modified": "2013-12-31 12:08:32", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "autoname": "IMD.#####", 
-  "doctype": "DocType", 
-  "istable": 1, 
-  "module": "Support", 
-  "name": "__common__"
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "Maintenance Schedule Item", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Maintenance Schedule Item"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "item_code", 
-  "fieldtype": "Link", 
-  "in_filter": 1, 
-  "in_list_view": 1, 
-  "label": "Item Code", 
-  "oldfieldname": "item_code", 
-  "oldfieldtype": "Link", 
-  "options": "Item", 
-  "reqd": 1, 
-  "search_index": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "item_name", 
-  "fieldtype": "Data", 
-  "in_list_view": 1, 
-  "label": "Item Name", 
-  "oldfieldname": "item_name", 
-  "oldfieldtype": "Data", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "description", 
-  "fieldtype": "Data", 
-  "in_list_view": 1, 
-  "label": "Description", 
-  "oldfieldname": "description", 
-  "oldfieldtype": "Data", 
-  "print_width": "300px", 
-  "read_only": 1, 
-  "width": "300px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "schedule_details", 
-  "fieldtype": "Section Break", 
-  "in_list_view": 0, 
-  "label": "Schedule Details"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "start_date", 
-  "fieldtype": "Date", 
-  "in_filter": 1, 
-  "in_list_view": 1, 
-  "label": "Start Date", 
-  "oldfieldname": "start_date", 
-  "oldfieldtype": "Date", 
-  "reqd": 1, 
-  "search_index": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "end_date", 
-  "fieldtype": "Date", 
-  "in_filter": 1, 
-  "in_list_view": 1, 
-  "label": "End Date", 
-  "oldfieldname": "end_date", 
-  "oldfieldtype": "Date", 
-  "reqd": 1, 
-  "search_index": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "periodicity", 
-  "fieldtype": "Select", 
-  "in_list_view": 1, 
-  "label": "Periodicity", 
-  "oldfieldname": "periodicity", 
-  "oldfieldtype": "Select", 
-  "options": "\nWeekly\nMonthly\nQuarterly\nHalf Yearly\nYearly\nRandom"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "no_of_visits", 
-  "fieldtype": "Int", 
-  "label": "No of Visits", 
-  "oldfieldname": "no_of_visits", 
-  "oldfieldtype": "Int", 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "sales_person", 
-  "fieldtype": "Link", 
-  "in_filter": 1, 
-  "label": "Sales Person", 
-  "oldfieldname": "incharge_name", 
-  "oldfieldtype": "Link", 
-  "options": "Sales Person", 
-  "reqd": 1, 
-  "search_index": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "reference", 
-  "fieldtype": "Section Break", 
-  "label": "Reference"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "serial_no", 
-  "fieldtype": "Small Text", 
-  "label": "Serial No", 
-  "oldfieldname": "serial_no", 
-  "oldfieldtype": "Small Text"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "prevdoc_docname", 
-  "fieldtype": "Data", 
-  "in_filter": 1, 
-  "label": "Against Docname", 
-  "no_copy": 1, 
-  "oldfieldname": "prevdoc_docname", 
-  "oldfieldtype": "Data", 
-  "print_hide": 1, 
-  "print_width": "150px", 
-  "read_only": 1, 
-  "search_index": 1, 
-  "width": "150px"
- }
-]
\ No newline at end of file
+{
+ "autoname": "IMD.#####", 
+ "creation": "2013-02-22 01:28:05", 
+ "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, 
+   "reqd": 1, 
+   "search_index": 1
+  }, 
+  {
+   "fieldname": "item_name", 
+   "fieldtype": "Data", 
+   "in_list_view": 1, 
+   "label": "Item Name", 
+   "oldfieldname": "item_name", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "description", 
+   "fieldtype": "Data", 
+   "in_list_view": 1, 
+   "label": "Description", 
+   "oldfieldname": "description", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "print_width": "300px", 
+   "read_only": 1, 
+   "width": "300px"
+  }, 
+  {
+   "fieldname": "schedule_details", 
+   "fieldtype": "Section Break", 
+   "in_list_view": 0, 
+   "label": "Schedule Details", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "start_date", 
+   "fieldtype": "Date", 
+   "in_filter": 1, 
+   "in_list_view": 1, 
+   "label": "Start Date", 
+   "oldfieldname": "start_date", 
+   "oldfieldtype": "Date", 
+   "permlevel": 0, 
+   "reqd": 1, 
+   "search_index": 1
+  }, 
+  {
+   "fieldname": "end_date", 
+   "fieldtype": "Date", 
+   "in_filter": 1, 
+   "in_list_view": 1, 
+   "label": "End Date", 
+   "oldfieldname": "end_date", 
+   "oldfieldtype": "Date", 
+   "permlevel": 0, 
+   "reqd": 1, 
+   "search_index": 1
+  }, 
+  {
+   "fieldname": "periodicity", 
+   "fieldtype": "Select", 
+   "in_list_view": 1, 
+   "label": "Periodicity", 
+   "oldfieldname": "periodicity", 
+   "oldfieldtype": "Select", 
+   "options": "\nWeekly\nMonthly\nQuarterly\nHalf Yearly\nYearly\nRandom", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "no_of_visits", 
+   "fieldtype": "Int", 
+   "label": "No of Visits", 
+   "oldfieldname": "no_of_visits", 
+   "oldfieldtype": "Int", 
+   "permlevel": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "sales_person", 
+   "fieldtype": "Link", 
+   "in_filter": 1, 
+   "label": "Sales Person", 
+   "oldfieldname": "incharge_name", 
+   "oldfieldtype": "Link", 
+   "options": "Sales Person", 
+   "permlevel": 0, 
+   "reqd": 1, 
+   "search_index": 0
+  }, 
+  {
+   "fieldname": "reference", 
+   "fieldtype": "Section Break", 
+   "label": "Reference", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "serial_no", 
+   "fieldtype": "Small Text", 
+   "label": "Serial No", 
+   "oldfieldname": "serial_no", 
+   "oldfieldtype": "Small Text", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "prevdoc_docname", 
+   "fieldtype": "Data", 
+   "in_filter": 1, 
+   "label": "Against Docname", 
+   "no_copy": 1, 
+   "oldfieldname": "prevdoc_docname", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "print_width": "150px", 
+   "read_only": 1, 
+   "search_index": 1, 
+   "width": "150px"
+  }
+ ], 
+ "idx": 1, 
+ "istable": 1, 
+ "modified": "2013-12-31 12:08:32", 
+ "modified_by": "Administrator", 
+ "module": "Support", 
+ "name": "Maintenance Schedule Item", 
+ "owner": "Administrator"
+}
\ No newline at end of file
diff --git a/erpnext/support/doctype/maintenance_visit/maintenance_visit.txt b/erpnext/support/doctype/maintenance_visit/maintenance_visit.txt
index 6a03292..fde4bbd 100644
--- a/erpnext/support/doctype/maintenance_visit/maintenance_visit.txt
+++ b/erpnext/support/doctype/maintenance_visit/maintenance_visit.txt
@@ -1,321 +1,302 @@
-[
- {
-  "creation": "2013-01-10 16:34:31", 
-  "docstatus": 0, 
-  "modified": "2014-01-20 17:48:57", 
-  "modified_by": "Administrator", 
-  "owner": "ashwini@webnotestech.com"
- }, 
- {
-  "autoname": "MV.#####", 
-  "doctype": "DocType", 
-  "icon": "icon-file-text", 
-  "is_submittable": 1, 
-  "module": "Support", 
-  "name": "__common__", 
-  "search_fields": "status,maintenance_type,customer,customer_name, address,mntc_date,company,fiscal_year"
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "Maintenance Visit", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "amend": 1, 
-  "cancel": 1, 
-  "create": 1, 
-  "delete": 1, 
-  "doctype": "DocPerm", 
-  "email": 1, 
-  "name": "__common__", 
-  "parent": "Maintenance Visit", 
-  "parentfield": "permissions", 
-  "parenttype": "DocType", 
-  "permlevel": 0, 
-  "print": 1, 
-  "read": 1, 
-  "report": 1, 
-  "role": "Maintenance User", 
-  "submit": 1, 
-  "write": 1
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Maintenance Visit"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "customer_details", 
-  "fieldtype": "Section Break", 
-  "label": "Customer Details", 
-  "oldfieldtype": "Section Break", 
-  "options": "icon-user"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break0", 
-  "fieldtype": "Column Break", 
-  "oldfieldtype": "Column Break"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "customer", 
-  "fieldtype": "Link", 
-  "in_filter": 1, 
-  "label": "Customer", 
-  "oldfieldname": "customer", 
-  "oldfieldtype": "Link", 
-  "options": "Customer", 
-  "print_hide": 1, 
-  "reqd": 1, 
-  "search_index": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "customer_name", 
-  "fieldtype": "Data", 
-  "hidden": 1, 
-  "in_list_view": 1, 
-  "label": "Customer Name", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "address_display", 
-  "fieldtype": "Small Text", 
-  "hidden": 1, 
-  "label": "Address", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "contact_display", 
-  "fieldtype": "Small Text", 
-  "hidden": 1, 
-  "label": "Contact", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "contact_mobile", 
-  "fieldtype": "Data", 
-  "hidden": 1, 
-  "label": "Mobile No", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "contact_email", 
-  "fieldtype": "Data", 
-  "hidden": 1, 
-  "label": "Contact Email", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break1", 
-  "fieldtype": "Column Break", 
-  "oldfieldtype": "Column Break", 
-  "width": "50%"
- }, 
- {
-  "default": "Today", 
-  "doctype": "DocField", 
-  "fieldname": "mntc_date", 
-  "fieldtype": "Date", 
-  "label": "Maintenance Date", 
-  "no_copy": 1, 
-  "oldfieldname": "mntc_date", 
-  "oldfieldtype": "Date", 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "mntc_time", 
-  "fieldtype": "Time", 
-  "label": "Maintenance Time", 
-  "no_copy": 1, 
-  "oldfieldname": "mntc_time", 
-  "oldfieldtype": "Time"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "maintenance_details", 
-  "fieldtype": "Section Break", 
-  "label": "Maintenance Details", 
-  "oldfieldtype": "Section Break", 
-  "options": "icon-wrench"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "completion_status", 
-  "fieldtype": "Select", 
-  "in_list_view": 1, 
-  "label": "Completion Status", 
-  "oldfieldname": "completion_status", 
-  "oldfieldtype": "Select", 
-  "options": "\nPartially Completed\nFully Completed", 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break_14", 
-  "fieldtype": "Column Break"
- }, 
- {
-  "default": "Unscheduled", 
-  "doctype": "DocField", 
-  "fieldname": "maintenance_type", 
-  "fieldtype": "Select", 
-  "in_filter": 1, 
-  "in_list_view": 1, 
-  "label": "Maintenance Type", 
-  "oldfieldname": "maintenance_type", 
-  "oldfieldtype": "Select", 
-  "options": "\nScheduled\nUnscheduled\nBreakdown", 
-  "reqd": 1, 
-  "search_index": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "section_break0", 
-  "fieldtype": "Section Break", 
-  "oldfieldtype": "Section Break", 
-  "options": "icon-wrench"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "maintenance_visit_details", 
-  "fieldtype": "Table", 
-  "label": "Maintenance Visit Purpose", 
-  "oldfieldname": "maintenance_visit_details", 
-  "oldfieldtype": "Table", 
-  "options": "Maintenance Visit Purpose"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "more_info", 
-  "fieldtype": "Section Break", 
-  "label": "More Info", 
-  "oldfieldtype": "Section Break", 
-  "options": "icon-file-text"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "customer_feedback", 
-  "fieldtype": "Small Text", 
-  "label": "Customer Feedback", 
-  "oldfieldname": "customer_feedback", 
-  "oldfieldtype": "Small Text"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "col_break3", 
-  "fieldtype": "Column Break"
- }, 
- {
-  "default": "Draft", 
-  "doctype": "DocField", 
-  "fieldname": "status", 
-  "fieldtype": "Data", 
-  "label": "Status", 
-  "no_copy": 1, 
-  "oldfieldname": "status", 
-  "oldfieldtype": "Data", 
-  "options": "\nDraft\nCancelled\nSubmitted", 
-  "read_only": 1, 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "amended_from", 
-  "fieldtype": "Data", 
-  "ignore_restrictions": 1, 
-  "label": "Amended From", 
-  "no_copy": 1, 
-  "oldfieldname": "amended_from", 
-  "oldfieldtype": "Data", 
-  "print_hide": 1, 
-  "read_only": 1, 
-  "width": "150px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "company", 
-  "fieldtype": "Select", 
-  "in_filter": 1, 
-  "label": "Company", 
-  "oldfieldname": "company", 
-  "oldfieldtype": "Select", 
-  "options": "link:Company", 
-  "print_hide": 1, 
-  "reqd": 1, 
-  "search_index": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "fiscal_year", 
-  "fieldtype": "Select", 
-  "in_filter": 1, 
-  "label": "Fiscal Year", 
-  "oldfieldname": "fiscal_year", 
-  "oldfieldtype": "Select", 
-  "options": "link:Fiscal Year", 
-  "print_hide": 1, 
-  "reqd": 1, 
-  "search_index": 0
- }, 
- {
-  "depends_on": "customer", 
-  "doctype": "DocField", 
-  "fieldname": "contact_info_section", 
-  "fieldtype": "Section Break", 
-  "label": "Contact Info", 
-  "options": "icon-bullhorn"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "customer_address", 
-  "fieldtype": "Link", 
-  "label": "Customer Address", 
-  "options": "Address", 
-  "print_hide": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "contact_person", 
-  "fieldtype": "Link", 
-  "label": "Contact Person", 
-  "options": "Contact", 
-  "print_hide": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "col_break4", 
-  "fieldtype": "Column Break"
- }, 
- {
-  "description": "<a href=\"#Sales Browser/Territory\">Add / Edit</a>", 
-  "doctype": "DocField", 
-  "fieldname": "territory", 
-  "fieldtype": "Link", 
-  "label": "Territory", 
-  "options": "Territory", 
-  "print_hide": 1
- }, 
- {
-  "description": "<a href=\"#Sales Browser/Customer Group\">Add / Edit</a>", 
-  "doctype": "DocField", 
-  "fieldname": "customer_group", 
-  "fieldtype": "Link", 
-  "label": "Customer Group", 
-  "options": "Customer Group", 
-  "print_hide": 1
- }, 
- {
-  "doctype": "DocPerm"
- }
-]
\ No newline at end of file
+{
+ "autoname": "MV.#####", 
+ "creation": "2013-01-10 16:34:31", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "fields": [
+  {
+   "fieldname": "customer_details", 
+   "fieldtype": "Section Break", 
+   "label": "Customer Details", 
+   "oldfieldtype": "Section Break", 
+   "options": "icon-user", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "column_break0", 
+   "fieldtype": "Column Break", 
+   "oldfieldtype": "Column Break", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "customer", 
+   "fieldtype": "Link", 
+   "in_filter": 1, 
+   "label": "Customer", 
+   "oldfieldname": "customer", 
+   "oldfieldtype": "Link", 
+   "options": "Customer", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "reqd": 1, 
+   "search_index": 0
+  }, 
+  {
+   "fieldname": "customer_name", 
+   "fieldtype": "Data", 
+   "hidden": 1, 
+   "in_list_view": 1, 
+   "label": "Customer Name", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "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, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "contact_mobile", 
+   "fieldtype": "Data", 
+   "hidden": 1, 
+   "label": "Mobile No", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "contact_email", 
+   "fieldtype": "Data", 
+   "hidden": 1, 
+   "label": "Contact Email", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "column_break1", 
+   "fieldtype": "Column Break", 
+   "oldfieldtype": "Column Break", 
+   "permlevel": 0, 
+   "width": "50%"
+  }, 
+  {
+   "default": "Today", 
+   "fieldname": "mntc_date", 
+   "fieldtype": "Date", 
+   "label": "Maintenance Date", 
+   "no_copy": 1, 
+   "oldfieldname": "mntc_date", 
+   "oldfieldtype": "Date", 
+   "permlevel": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "mntc_time", 
+   "fieldtype": "Time", 
+   "label": "Maintenance Time", 
+   "no_copy": 1, 
+   "oldfieldname": "mntc_time", 
+   "oldfieldtype": "Time", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "maintenance_details", 
+   "fieldtype": "Section Break", 
+   "label": "Maintenance Details", 
+   "oldfieldtype": "Section Break", 
+   "options": "icon-wrench", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "completion_status", 
+   "fieldtype": "Select", 
+   "in_list_view": 1, 
+   "label": "Completion Status", 
+   "oldfieldname": "completion_status", 
+   "oldfieldtype": "Select", 
+   "options": "\nPartially Completed\nFully Completed", 
+   "permlevel": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "column_break_14", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0
+  }, 
+  {
+   "default": "Unscheduled", 
+   "fieldname": "maintenance_type", 
+   "fieldtype": "Select", 
+   "in_filter": 1, 
+   "in_list_view": 1, 
+   "label": "Maintenance Type", 
+   "oldfieldname": "maintenance_type", 
+   "oldfieldtype": "Select", 
+   "options": "\nScheduled\nUnscheduled\nBreakdown", 
+   "permlevel": 0, 
+   "reqd": 1, 
+   "search_index": 0
+  }, 
+  {
+   "fieldname": "section_break0", 
+   "fieldtype": "Section Break", 
+   "oldfieldtype": "Section Break", 
+   "options": "icon-wrench", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "maintenance_visit_details", 
+   "fieldtype": "Table", 
+   "label": "Maintenance Visit Purpose", 
+   "oldfieldname": "maintenance_visit_details", 
+   "oldfieldtype": "Table", 
+   "options": "Maintenance Visit Purpose", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "more_info", 
+   "fieldtype": "Section Break", 
+   "label": "More Info", 
+   "oldfieldtype": "Section Break", 
+   "options": "icon-file-text", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "customer_feedback", 
+   "fieldtype": "Small Text", 
+   "label": "Customer Feedback", 
+   "oldfieldname": "customer_feedback", 
+   "oldfieldtype": "Small Text", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "col_break3", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0
+  }, 
+  {
+   "default": "Draft", 
+   "fieldname": "status", 
+   "fieldtype": "Data", 
+   "label": "Status", 
+   "no_copy": 1, 
+   "oldfieldname": "status", 
+   "oldfieldtype": "Data", 
+   "options": "\nDraft\nCancelled\nSubmitted", 
+   "permlevel": 0, 
+   "read_only": 1, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "amended_from", 
+   "fieldtype": "Data", 
+   "ignore_restrictions": 1, 
+   "label": "Amended From", 
+   "no_copy": 1, 
+   "oldfieldname": "amended_from", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 1, 
+   "width": "150px"
+  }, 
+  {
+   "fieldname": "company", 
+   "fieldtype": "Select", 
+   "in_filter": 1, 
+   "label": "Company", 
+   "oldfieldname": "company", 
+   "oldfieldtype": "Select", 
+   "options": "link:Company", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "reqd": 1, 
+   "search_index": 0
+  }, 
+  {
+   "fieldname": "fiscal_year", 
+   "fieldtype": "Select", 
+   "in_filter": 1, 
+   "label": "Fiscal Year", 
+   "oldfieldname": "fiscal_year", 
+   "oldfieldtype": "Select", 
+   "options": "link:Fiscal Year", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "reqd": 1, 
+   "search_index": 0
+  }, 
+  {
+   "depends_on": "customer", 
+   "fieldname": "contact_info_section", 
+   "fieldtype": "Section Break", 
+   "label": "Contact Info", 
+   "options": "icon-bullhorn", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "customer_address", 
+   "fieldtype": "Link", 
+   "label": "Customer Address", 
+   "options": "Address", 
+   "permlevel": 0, 
+   "print_hide": 1
+  }, 
+  {
+   "fieldname": "contact_person", 
+   "fieldtype": "Link", 
+   "label": "Contact Person", 
+   "options": "Contact", 
+   "permlevel": 0, 
+   "print_hide": 1
+  }, 
+  {
+   "fieldname": "col_break4", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0
+  }, 
+  {
+   "description": "<a href=\"#Sales Browser/Territory\">Add / Edit</a>", 
+   "fieldname": "territory", 
+   "fieldtype": "Link", 
+   "label": "Territory", 
+   "options": "Territory", 
+   "permlevel": 0, 
+   "print_hide": 1
+  }, 
+  {
+   "description": "<a href=\"#Sales Browser/Customer Group\">Add / Edit</a>", 
+   "fieldname": "customer_group", 
+   "fieldtype": "Link", 
+   "label": "Customer Group", 
+   "options": "Customer Group", 
+   "permlevel": 0, 
+   "print_hide": 1
+  }
+ ], 
+ "icon": "icon-file-text", 
+ "idx": 1, 
+ "is_submittable": 1, 
+ "modified": "2014-01-20 17:48:57", 
+ "modified_by": "Administrator", 
+ "module": "Support", 
+ "name": "Maintenance Visit", 
+ "owner": "ashwini@webnotestech.com", 
+ "permissions": [
+  {
+   "amend": 1, 
+   "cancel": 1, 
+   "create": 1, 
+   "delete": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Maintenance User", 
+   "submit": 1, 
+   "write": 1
+  }
+ ], 
+ "search_fields": "status,maintenance_type,customer,customer_name, address,mntc_date,company,fiscal_year"
+}
\ No newline at end of file
diff --git a/erpnext/support/doctype/maintenance_visit_purpose/maintenance_visit_purpose.txt b/erpnext/support/doctype/maintenance_visit_purpose/maintenance_visit_purpose.txt
index 6a45e55..d0b6850 100644
--- a/erpnext/support/doctype/maintenance_visit_purpose/maintenance_visit_purpose.txt
+++ b/erpnext/support/doctype/maintenance_visit_purpose/maintenance_visit_purpose.txt
@@ -1,142 +1,129 @@
-[
- {
-  "creation": "2013-02-22 01:28:06", 
-  "docstatus": 0, 
-  "modified": "2013-12-20 19:23:20", 
-  "modified_by": "Administrator", 
-  "owner": "ashwini@webnotestech.com"
- }, 
- {
-  "autoname": "MVD.#####", 
-  "doctype": "DocType", 
-  "istable": 1, 
-  "module": "Support", 
-  "name": "__common__"
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "Maintenance Visit Purpose", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Maintenance Visit Purpose"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "item_code", 
-  "fieldtype": "Link", 
-  "in_list_view": 1, 
-  "label": "Item Code", 
-  "oldfieldname": "item_code", 
-  "oldfieldtype": "Link", 
-  "options": "Item"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "item_name", 
-  "fieldtype": "Data", 
-  "in_list_view": 1, 
-  "label": "Item Name", 
-  "oldfieldname": "item_name", 
-  "oldfieldtype": "Data", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "serial_no", 
-  "fieldtype": "Small Text", 
-  "in_list_view": 1, 
-  "label": "Serial No", 
-  "oldfieldname": "serial_no", 
-  "oldfieldtype": "Small Text"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "description", 
-  "fieldtype": "Small Text", 
-  "in_list_view": 1, 
-  "label": "Description", 
-  "oldfieldname": "description", 
-  "oldfieldtype": "Small Text", 
-  "print_width": "300px", 
-  "reqd": 1, 
-  "width": "300px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "work_details", 
-  "fieldtype": "Section Break", 
-  "in_list_view": 0, 
-  "label": "Work Details"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "service_person", 
-  "fieldtype": "Link", 
-  "in_list_view": 1, 
-  "label": "Sales Person", 
-  "oldfieldname": "service_person", 
-  "oldfieldtype": "Link", 
-  "options": "Sales Person", 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "work_done", 
-  "fieldtype": "Small Text", 
-  "in_list_view": 1, 
-  "label": "Work Done", 
-  "oldfieldname": "work_done", 
-  "oldfieldtype": "Small Text", 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "prevdoc_docname", 
-  "fieldtype": "Data", 
-  "hidden": 0, 
-  "label": "Against Document No", 
-  "no_copy": 1, 
-  "oldfieldname": "prevdoc_docname", 
-  "oldfieldtype": "Data", 
-  "print_hide": 1, 
-  "print_width": "160px", 
-  "read_only": 1, 
-  "report_hide": 1, 
-  "width": "160px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "prevdoc_detail_docname", 
-  "fieldtype": "Data", 
-  "hidden": 1, 
-  "label": "Against Document Detail No", 
-  "no_copy": 1, 
-  "oldfieldname": "prevdoc_detail_docname", 
-  "oldfieldtype": "Data", 
-  "print_hide": 1, 
-  "print_width": "160px", 
-  "read_only": 1, 
-  "report_hide": 1, 
-  "width": "160px"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "prevdoc_doctype", 
-  "fieldtype": "Data", 
-  "hidden": 0, 
-  "label": "Document Type", 
-  "no_copy": 1, 
-  "oldfieldname": "prevdoc_doctype", 
-  "oldfieldtype": "Data", 
-  "print_hide": 1, 
-  "print_width": "150px", 
-  "read_only": 1, 
-  "report_hide": 1, 
-  "width": "150px"
- }
-]
\ No newline at end of file
+{
+ "autoname": "MVD.#####", 
+ "creation": "2013-02-22 01:28:06", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "fields": [
+  {
+   "fieldname": "item_code", 
+   "fieldtype": "Link", 
+   "in_list_view": 1, 
+   "label": "Item Code", 
+   "oldfieldname": "item_code", 
+   "oldfieldtype": "Link", 
+   "options": "Item", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "item_name", 
+   "fieldtype": "Data", 
+   "in_list_view": 1, 
+   "label": "Item Name", 
+   "oldfieldname": "item_name", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "serial_no", 
+   "fieldtype": "Small Text", 
+   "in_list_view": 1, 
+   "label": "Serial No", 
+   "oldfieldname": "serial_no", 
+   "oldfieldtype": "Small Text", 
+   "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": "work_details", 
+   "fieldtype": "Section Break", 
+   "in_list_view": 0, 
+   "label": "Work Details", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "service_person", 
+   "fieldtype": "Link", 
+   "in_list_view": 1, 
+   "label": "Sales Person", 
+   "oldfieldname": "service_person", 
+   "oldfieldtype": "Link", 
+   "options": "Sales Person", 
+   "permlevel": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "work_done", 
+   "fieldtype": "Small Text", 
+   "in_list_view": 1, 
+   "label": "Work Done", 
+   "oldfieldname": "work_done", 
+   "oldfieldtype": "Small Text", 
+   "permlevel": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "prevdoc_docname", 
+   "fieldtype": "Data", 
+   "hidden": 0, 
+   "label": "Against Document No", 
+   "no_copy": 1, 
+   "oldfieldname": "prevdoc_docname", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "print_width": "160px", 
+   "read_only": 1, 
+   "report_hide": 1, 
+   "width": "160px"
+  }, 
+  {
+   "fieldname": "prevdoc_detail_docname", 
+   "fieldtype": "Data", 
+   "hidden": 1, 
+   "label": "Against Document Detail No", 
+   "no_copy": 1, 
+   "oldfieldname": "prevdoc_detail_docname", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "print_width": "160px", 
+   "read_only": 1, 
+   "report_hide": 1, 
+   "width": "160px"
+  }, 
+  {
+   "fieldname": "prevdoc_doctype", 
+   "fieldtype": "Data", 
+   "hidden": 0, 
+   "label": "Document Type", 
+   "no_copy": 1, 
+   "oldfieldname": "prevdoc_doctype", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "print_width": "150px", 
+   "read_only": 1, 
+   "report_hide": 1, 
+   "width": "150px"
+  }
+ ], 
+ "idx": 1, 
+ "istable": 1, 
+ "modified": "2013-12-20 19:23:20", 
+ "modified_by": "Administrator", 
+ "module": "Support", 
+ "name": "Maintenance Visit Purpose", 
+ "owner": "ashwini@webnotestech.com"
+}
\ No newline at end of file
diff --git a/erpnext/support/doctype/newsletter/newsletter.txt b/erpnext/support/doctype/newsletter/newsletter.txt
index d0ce1f4..1c76270 100644
--- a/erpnext/support/doctype/newsletter/newsletter.txt
+++ b/erpnext/support/doctype/newsletter/newsletter.txt
@@ -1,179 +1,169 @@
-[
- {
-  "creation": "2013-01-10 16:34:31", 
-  "docstatus": 0, 
-  "modified": "2014-02-03 11:32:22", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "autoname": "naming_series:", 
-  "description": "Create and Send Newsletters", 
-  "doctype": "DocType", 
-  "document_type": "Other", 
-  "icon": "icon-envelope", 
-  "module": "Support", 
-  "name": "__common__", 
-  "title_field": "subject"
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "Newsletter", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "cancel": 0, 
-  "create": 1, 
-  "delete": 1, 
-  "doctype": "DocPerm", 
-  "email": 0, 
-  "name": "__common__", 
-  "parent": "Newsletter", 
-  "parentfield": "permissions", 
-  "parenttype": "DocType", 
-  "permlevel": 0, 
-  "print": 0, 
-  "read": 1, 
-  "report": 0, 
-  "submit": 0, 
-  "write": 1
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Newsletter"
- }, 
- {
-  "description": "Select who you want to send this newsletter to", 
-  "doctype": "DocField", 
-  "fieldname": "send_to", 
-  "fieldtype": "Section Break", 
-  "label": "Send To"
- }, 
- {
-  "default": "NL-", 
-  "doctype": "DocField", 
-  "fieldname": "naming_series", 
-  "fieldtype": "Select", 
-  "label": "Series", 
-  "options": "NL-", 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "send_to_type", 
-  "fieldtype": "Select", 
-  "label": "Send To Type", 
-  "options": "Lead\nContact\nEmployee\nCustom"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break1", 
-  "fieldtype": "Column Break"
- }, 
- {
-  "depends_on": "eval:doc.send_to_type==\"Lead\"", 
-  "doctype": "DocField", 
-  "fieldname": "lead_source", 
-  "fieldtype": "Select", 
-  "label": "Lead Source"
- }, 
- {
-  "depends_on": "eval:doc.send_to_type==\"Lead\"", 
-  "doctype": "DocField", 
-  "fieldname": "lead_status", 
-  "fieldtype": "Select", 
-  "label": "Lead Status"
- }, 
- {
-  "depends_on": "eval:doc.send_to_type==\"Contact\"", 
-  "doctype": "DocField", 
-  "fieldname": "contact_type", 
-  "fieldtype": "Select", 
-  "label": "Contact Type", 
-  "options": "Customer\nSupplier"
- }, 
- {
-  "depends_on": "eval:doc.send_to_type==\"Custom\"", 
-  "description": "Comma separated list of email addresses", 
-  "doctype": "DocField", 
-  "fieldname": "email_list", 
-  "fieldtype": "Text", 
-  "label": "Send to this list"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "newsletter_content", 
-  "fieldtype": "Section Break", 
-  "label": "Newsletter Content"
- }, 
- {
-  "description": "If specified, send the newsletter using this email address", 
-  "doctype": "DocField", 
-  "fieldname": "send_from", 
-  "fieldtype": "Data", 
-  "label": "Send From", 
-  "no_copy": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "subject", 
-  "fieldtype": "Small Text", 
-  "in_list_view": 1, 
-  "label": "Subject", 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "message", 
-  "fieldtype": "Text Editor", 
-  "label": "Message", 
-  "reqd": 0
- }, 
- {
-  "description": "Check how the newsletter looks in an email by sending it to your email.", 
-  "doctype": "DocField", 
-  "fieldname": "test_the_newsletter", 
-  "fieldtype": "Section Break", 
-  "label": "Test the Newsletter"
- }, 
- {
-  "description": "A Lead with this email id should exist", 
-  "doctype": "DocField", 
-  "fieldname": "test_email_id", 
-  "fieldtype": "Data", 
-  "label": "Test Email Id"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "test_send", 
-  "fieldtype": "Button", 
-  "label": "Test", 
-  "options": "test_send"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "newsletter_status", 
-  "fieldtype": "Section Break", 
-  "label": "Newsletter Status"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "email_sent", 
-  "fieldtype": "Check", 
-  "in_list_view": 1, 
-  "label": "Email Sent?", 
-  "no_copy": 1, 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocPerm", 
-  "role": "Sales Manager"
- }, 
- {
-  "doctype": "DocPerm", 
-  "role": "Support Manager"
- }
-]
\ No newline at end of file
+{
+ "autoname": "naming_series:", 
+ "creation": "2013-01-10 16:34:31", 
+ "description": "Create and Send Newsletters", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "document_type": "Other", 
+ "fields": [
+  {
+   "description": "Select who you want to send this newsletter to", 
+   "fieldname": "send_to", 
+   "fieldtype": "Section Break", 
+   "label": "Send To", 
+   "permlevel": 0
+  }, 
+  {
+   "default": "NL-", 
+   "fieldname": "naming_series", 
+   "fieldtype": "Select", 
+   "label": "Series", 
+   "options": "NL-", 
+   "permlevel": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "send_to_type", 
+   "fieldtype": "Select", 
+   "label": "Send To Type", 
+   "options": "Lead\nContact\nEmployee\nCustom", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "column_break1", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0
+  }, 
+  {
+   "depends_on": "eval:doc.send_to_type==\"Lead\"", 
+   "fieldname": "lead_source", 
+   "fieldtype": "Select", 
+   "label": "Lead Source", 
+   "permlevel": 0
+  }, 
+  {
+   "depends_on": "eval:doc.send_to_type==\"Lead\"", 
+   "fieldname": "lead_status", 
+   "fieldtype": "Select", 
+   "label": "Lead Status", 
+   "permlevel": 0
+  }, 
+  {
+   "depends_on": "eval:doc.send_to_type==\"Contact\"", 
+   "fieldname": "contact_type", 
+   "fieldtype": "Select", 
+   "label": "Contact Type", 
+   "options": "Customer\nSupplier", 
+   "permlevel": 0
+  }, 
+  {
+   "depends_on": "eval:doc.send_to_type==\"Custom\"", 
+   "description": "Comma separated list of email addresses", 
+   "fieldname": "email_list", 
+   "fieldtype": "Text", 
+   "label": "Send to this list", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "newsletter_content", 
+   "fieldtype": "Section Break", 
+   "label": "Newsletter Content", 
+   "permlevel": 0
+  }, 
+  {
+   "description": "If specified, send the newsletter using this email address", 
+   "fieldname": "send_from", 
+   "fieldtype": "Data", 
+   "label": "Send From", 
+   "no_copy": 1, 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "subject", 
+   "fieldtype": "Small Text", 
+   "in_list_view": 1, 
+   "label": "Subject", 
+   "permlevel": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "message", 
+   "fieldtype": "Text Editor", 
+   "label": "Message", 
+   "permlevel": 0, 
+   "reqd": 0
+  }, 
+  {
+   "description": "Check how the newsletter looks in an email by sending it to your email.", 
+   "fieldname": "test_the_newsletter", 
+   "fieldtype": "Section Break", 
+   "label": "Test the Newsletter", 
+   "permlevel": 0
+  }, 
+  {
+   "description": "A Lead with this email id should exist", 
+   "fieldname": "test_email_id", 
+   "fieldtype": "Data", 
+   "label": "Test Email Id", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "test_send", 
+   "fieldtype": "Button", 
+   "label": "Test", 
+   "options": "test_send", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "newsletter_status", 
+   "fieldtype": "Section Break", 
+   "label": "Newsletter Status", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "email_sent", 
+   "fieldtype": "Check", 
+   "in_list_view": 1, 
+   "label": "Email Sent?", 
+   "no_copy": 1, 
+   "permlevel": 0, 
+   "read_only": 1
+  }
+ ], 
+ "icon": "icon-envelope", 
+ "idx": 1, 
+ "modified": "2014-02-03 11:32:22", 
+ "modified_by": "Administrator", 
+ "module": "Support", 
+ "name": "Newsletter", 
+ "owner": "Administrator", 
+ "permissions": [
+  {
+   "cancel": 0, 
+   "create": 1, 
+   "delete": 1, 
+   "email": 0, 
+   "permlevel": 0, 
+   "print": 0, 
+   "read": 1, 
+   "report": 0, 
+   "role": "Sales Manager", 
+   "submit": 0, 
+   "write": 1
+  }, 
+  {
+   "cancel": 0, 
+   "create": 1, 
+   "delete": 1, 
+   "email": 0, 
+   "permlevel": 0, 
+   "print": 0, 
+   "read": 1, 
+   "report": 0, 
+   "role": "Support Manager", 
+   "submit": 0, 
+   "write": 1
+  }
+ ], 
+ "title_field": "subject"
+}
\ No newline at end of file
diff --git a/erpnext/support/doctype/support_email_settings/support_email_settings.txt b/erpnext/support/doctype/support_email_settings/support_email_settings.txt
index 5775c28..2b90a85 100644
--- a/erpnext/support/doctype/support_email_settings/support_email_settings.txt
+++ b/erpnext/support/doctype/support_email_settings/support_email_settings.txt
@@ -1,111 +1,92 @@
-[
- {
-  "creation": "2014-03-03 19:48:46", 
-  "docstatus": 0, 
-  "modified": "2014-03-03 20:20:34", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "allow_copy": 1, 
-  "description": "Email Settings for Outgoing and Incoming Emails.", 
-  "doctype": "DocType", 
-  "icon": "icon-cog", 
-  "in_create": 1, 
-  "issingle": 1, 
-  "module": "Support", 
-  "name": "__common__"
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "Support Email Settings", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "create": 1, 
-  "doctype": "DocPerm", 
-  "name": "__common__", 
-  "parent": "Support Email Settings", 
-  "parentfield": "permissions", 
-  "parenttype": "DocType", 
-  "permlevel": 0, 
-  "read": 1, 
-  "role": "System Manager", 
-  "write": 1
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Support Email Settings"
- }, 
- {
-  "description": "Check this to pull emails from your mailbox", 
-  "doctype": "DocField", 
-  "fieldname": "sync_support_mails", 
-  "fieldtype": "Check", 
-  "label": "Sync Support Mails"
- }, 
- {
-  "description": "Your support email id - must be a valid email - this is where your emails will come!", 
-  "doctype": "DocField", 
-  "fieldname": "support_email", 
-  "fieldtype": "Data", 
-  "label": "Support Email"
- }, 
- {
-  "description": "POP3 mail server (e.g. pop.gmail.com)", 
-  "doctype": "DocField", 
-  "fieldname": "mail_server", 
-  "fieldtype": "Data", 
-  "label": "POP3 Mail Server"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "use_ssl", 
-  "fieldtype": "Check", 
-  "label": "Use SSL"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "mail_login", 
-  "fieldtype": "Data", 
-  "label": "User Name"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "mail_password", 
-  "fieldtype": "Password", 
-  "label": "Support Password"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "cb1", 
-  "fieldtype": "Column Break"
- }, 
- {
-  "description": "Signature to be appended at the end of every email", 
-  "doctype": "DocField", 
-  "fieldname": "support_signature", 
-  "fieldtype": "Text", 
-  "label": "Signature"
- }, 
- {
-  "default": "1", 
-  "doctype": "DocField", 
-  "fieldname": "send_autoreply", 
-  "fieldtype": "Check", 
-  "label": "Send Autoreply"
- }, 
- {
-  "description": "Autoreply when a new mail is received", 
-  "doctype": "DocField", 
-  "fieldname": "support_autoreply", 
-  "fieldtype": "Text", 
-  "label": "Custom Autoreply Message"
- }, 
- {
-  "doctype": "DocPerm"
- }
-]
\ No newline at end of file
+{
+ "allow_copy": 1, 
+ "creation": "2014-03-03 19:48:46", 
+ "description": "Email Settings for Outgoing and Incoming Emails.", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "fields": [
+  {
+   "description": "Check this to pull emails from your mailbox", 
+   "fieldname": "sync_support_mails", 
+   "fieldtype": "Check", 
+   "label": "Sync Support Mails", 
+   "permlevel": 0
+  }, 
+  {
+   "description": "Your support email id - must be a valid email - this is where your emails will come!", 
+   "fieldname": "support_email", 
+   "fieldtype": "Data", 
+   "label": "Support Email", 
+   "permlevel": 0
+  }, 
+  {
+   "description": "POP3 mail server (e.g. pop.gmail.com)", 
+   "fieldname": "mail_server", 
+   "fieldtype": "Data", 
+   "label": "POP3 Mail Server", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "use_ssl", 
+   "fieldtype": "Check", 
+   "label": "Use SSL", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "mail_login", 
+   "fieldtype": "Data", 
+   "label": "User Name", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "mail_password", 
+   "fieldtype": "Password", 
+   "label": "Support Password", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "cb1", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0
+  }, 
+  {
+   "description": "Signature to be appended at the end of every email", 
+   "fieldname": "support_signature", 
+   "fieldtype": "Text", 
+   "label": "Signature", 
+   "permlevel": 0
+  }, 
+  {
+   "default": "1", 
+   "fieldname": "send_autoreply", 
+   "fieldtype": "Check", 
+   "label": "Send Autoreply", 
+   "permlevel": 0
+  }, 
+  {
+   "description": "Autoreply when a new mail is received", 
+   "fieldname": "support_autoreply", 
+   "fieldtype": "Text", 
+   "label": "Custom Autoreply Message", 
+   "permlevel": 0
+  }
+ ], 
+ "icon": "icon-cog", 
+ "idx": 1, 
+ "in_create": 1, 
+ "issingle": 1, 
+ "modified": "2014-03-03 20:20:34", 
+ "modified_by": "Administrator", 
+ "module": "Support", 
+ "name": "Support Email Settings", 
+ "owner": "Administrator", 
+ "permissions": [
+  {
+   "create": 1, 
+   "permlevel": 0, 
+   "read": 1, 
+   "role": "System Manager", 
+   "write": 1
+  }
+ ]
+}
\ No newline at end of file
diff --git a/erpnext/support/doctype/support_ticket/support_ticket.txt b/erpnext/support/doctype/support_ticket/support_ticket.txt
index 2eac196..7ffbbb8 100644
--- a/erpnext/support/doctype/support_ticket/support_ticket.txt
+++ b/erpnext/support/doctype/support_ticket/support_ticket.txt
@@ -1,291 +1,290 @@
-[
- {
-  "creation": "2013-02-01 10:36:25", 
-  "docstatus": 0, 
-  "modified": "2014-01-20 17:49:31", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "allow_attach": 1, 
-  "autoname": "naming_series:", 
-  "doctype": "DocType", 
-  "icon": "icon-ticket", 
-  "module": "Support", 
-  "name": "__common__", 
-  "search_fields": "status,customer,allocated_to,subject,raised_by"
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "Support Ticket", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "amend": 0, 
-  "cancel": 0, 
-  "create": 1, 
-  "doctype": "DocPerm", 
-  "email": 1, 
-  "name": "__common__", 
-  "parent": "Support Ticket", 
-  "parentfield": "permissions", 
-  "parenttype": "DocType", 
-  "permlevel": 0, 
-  "print": 1, 
-  "read": 1, 
-  "report": 1, 
-  "submit": 0, 
-  "write": 1
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Support Ticket"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "subject_section", 
-  "fieldtype": "Section Break", 
-  "label": "Subject", 
-  "options": "icon-flag"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "naming_series", 
-  "fieldtype": "Select", 
-  "hidden": 0, 
-  "label": "Series", 
-  "no_copy": 1, 
-  "options": "SUP", 
-  "print_hide": 1, 
-  "reqd": 0, 
-  "search_index": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "subject", 
-  "fieldtype": "Data", 
-  "in_filter": 1, 
-  "in_list_view": 1, 
-  "label": "Subject", 
-  "report_hide": 0, 
-  "reqd": 1, 
-  "search_index": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "cb00", 
-  "fieldtype": "Column Break"
- }, 
- {
-  "default": "Open", 
-  "doctype": "DocField", 
-  "fieldname": "status", 
-  "fieldtype": "Select", 
-  "in_filter": 0, 
-  "in_list_view": 1, 
-  "label": "Status", 
-  "no_copy": 1, 
-  "oldfieldname": "status", 
-  "oldfieldtype": "Select", 
-  "options": "Open\nReplied\nHold\nClosed", 
-  "read_only": 0, 
-  "reqd": 0, 
-  "search_index": 1
- }, 
- {
-  "depends_on": "eval:doc.__islocal", 
-  "doctype": "DocField", 
-  "fieldname": "raised_by", 
-  "fieldtype": "Data", 
-  "in_filter": 1, 
-  "in_list_view": 1, 
-  "label": "Raised By (Email)", 
-  "oldfieldname": "raised_by", 
-  "oldfieldtype": "Data", 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "sb00", 
-  "fieldtype": "Section Break", 
-  "label": "Messages", 
-  "options": "icon-comments"
- }, 
- {
-  "depends_on": "eval:doc.__islocal", 
-  "doctype": "DocField", 
-  "fieldname": "description", 
-  "fieldtype": "Text", 
-  "label": "Description", 
-  "oldfieldname": "problem_description", 
-  "oldfieldtype": "Text", 
-  "reqd": 0
- }, 
- {
-  "depends_on": "eval:!doc.__islocal", 
-  "doctype": "DocField", 
-  "fieldname": "thread_html", 
-  "fieldtype": "HTML", 
-  "label": "Thread HTML", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "additional_info", 
-  "fieldtype": "Section Break", 
-  "label": "Reference", 
-  "options": "icon-pushpin", 
-  "read_only": 1
- }, 
- {
-  "depends_on": "eval:!doc.__islocal", 
-  "doctype": "DocField", 
-  "fieldname": "column_break0", 
-  "fieldtype": "Column Break", 
-  "oldfieldtype": "Column Break", 
-  "read_only": 1, 
-  "width": "50%"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "lead", 
-  "fieldtype": "Link", 
-  "label": "Lead", 
-  "options": "Lead"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "contact", 
-  "fieldtype": "Link", 
-  "label": "Contact", 
-  "options": "Contact"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "customer", 
-  "fieldtype": "Link", 
-  "in_filter": 1, 
-  "label": "Customer", 
-  "oldfieldname": "customer", 
-  "oldfieldtype": "Link", 
-  "options": "Customer", 
-  "print_hide": 1, 
-  "read_only": 0, 
-  "reqd": 0, 
-  "search_index": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "customer_name", 
-  "fieldtype": "Data", 
-  "in_filter": 1, 
-  "label": "Customer Name", 
-  "oldfieldname": "customer_name", 
-  "oldfieldtype": "Data", 
-  "read_only": 1, 
-  "reqd": 0, 
-  "search_index": 0
- }, 
- {
-  "default": "Today", 
-  "doctype": "DocField", 
-  "fieldname": "opening_date", 
-  "fieldtype": "Date", 
-  "label": "Opening Date", 
-  "no_copy": 1, 
-  "oldfieldname": "opening_date", 
-  "oldfieldtype": "Date", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "opening_time", 
-  "fieldtype": "Time", 
-  "label": "Opening Time", 
-  "no_copy": 1, 
-  "oldfieldname": "opening_time", 
-  "oldfieldtype": "Time", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "company", 
-  "fieldtype": "Link", 
-  "label": "Company", 
-  "options": "Company", 
-  "print_hide": 1, 
-  "reqd": 0
- }, 
- {
-  "depends_on": "eval:!doc.__islocal", 
-  "doctype": "DocField", 
-  "fieldname": "column_break1", 
-  "fieldtype": "Column Break", 
-  "oldfieldtype": "Column Break", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "first_responded_on", 
-  "fieldtype": "Datetime", 
-  "label": "First Responded On"
- }, 
- {
-  "depends_on": "eval:!doc.__islocal", 
-  "doctype": "DocField", 
-  "fieldname": "resolution_date", 
-  "fieldtype": "Datetime", 
-  "in_filter": 0, 
-  "label": "Resolution Date", 
-  "no_copy": 1, 
-  "oldfieldname": "resolution_date", 
-  "oldfieldtype": "Date", 
-  "read_only": 1, 
-  "search_index": 0
- }, 
- {
-  "depends_on": "eval:!doc.__islocal", 
-  "doctype": "DocField", 
-  "fieldname": "resolution_details", 
-  "fieldtype": "Small Text", 
-  "label": "Resolution Details", 
-  "no_copy": 1, 
-  "oldfieldname": "resolution_details", 
-  "oldfieldtype": "Text", 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "content_type", 
-  "fieldtype": "Data", 
-  "hidden": 1, 
-  "label": "Content Type"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "communications", 
-  "fieldtype": "Table", 
-  "hidden": 1, 
-  "label": "Communications", 
-  "options": "Communication", 
-  "print_hide": 1
- }, 
- {
-  "delete": 0, 
-  "doctype": "DocPerm", 
-  "role": "Guest"
- }, 
- {
-  "delete": 0, 
-  "doctype": "DocPerm", 
-  "role": "Customer"
- }, 
- {
-  "delete": 1, 
-  "doctype": "DocPerm", 
-  "role": "Support Team"
- }
-]
\ No newline at end of file
+{
+ "allow_attach": 1, 
+ "autoname": "naming_series:", 
+ "creation": "2013-02-01 10:36:25", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "fields": [
+  {
+   "fieldname": "subject_section", 
+   "fieldtype": "Section Break", 
+   "label": "Subject", 
+   "options": "icon-flag", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "naming_series", 
+   "fieldtype": "Select", 
+   "hidden": 0, 
+   "label": "Series", 
+   "no_copy": 1, 
+   "options": "SUP", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "reqd": 0, 
+   "search_index": 0
+  }, 
+  {
+   "fieldname": "subject", 
+   "fieldtype": "Data", 
+   "in_filter": 1, 
+   "in_list_view": 1, 
+   "label": "Subject", 
+   "permlevel": 0, 
+   "report_hide": 0, 
+   "reqd": 1, 
+   "search_index": 0
+  }, 
+  {
+   "fieldname": "cb00", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0
+  }, 
+  {
+   "default": "Open", 
+   "fieldname": "status", 
+   "fieldtype": "Select", 
+   "in_filter": 0, 
+   "in_list_view": 1, 
+   "label": "Status", 
+   "no_copy": 1, 
+   "oldfieldname": "status", 
+   "oldfieldtype": "Select", 
+   "options": "Open\nReplied\nHold\nClosed", 
+   "permlevel": 0, 
+   "read_only": 0, 
+   "reqd": 0, 
+   "search_index": 1
+  }, 
+  {
+   "depends_on": "eval:doc.__islocal", 
+   "fieldname": "raised_by", 
+   "fieldtype": "Data", 
+   "in_filter": 1, 
+   "in_list_view": 1, 
+   "label": "Raised By (Email)", 
+   "oldfieldname": "raised_by", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "sb00", 
+   "fieldtype": "Section Break", 
+   "label": "Messages", 
+   "options": "icon-comments", 
+   "permlevel": 0
+  }, 
+  {
+   "depends_on": "eval:doc.__islocal", 
+   "fieldname": "description", 
+   "fieldtype": "Text", 
+   "label": "Description", 
+   "oldfieldname": "problem_description", 
+   "oldfieldtype": "Text", 
+   "permlevel": 0, 
+   "reqd": 0
+  }, 
+  {
+   "depends_on": "eval:!doc.__islocal", 
+   "fieldname": "thread_html", 
+   "fieldtype": "HTML", 
+   "label": "Thread HTML", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "additional_info", 
+   "fieldtype": "Section Break", 
+   "label": "Reference", 
+   "options": "icon-pushpin", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "depends_on": "eval:!doc.__islocal", 
+   "fieldname": "column_break0", 
+   "fieldtype": "Column Break", 
+   "oldfieldtype": "Column Break", 
+   "permlevel": 0, 
+   "read_only": 1, 
+   "width": "50%"
+  }, 
+  {
+   "fieldname": "lead", 
+   "fieldtype": "Link", 
+   "label": "Lead", 
+   "options": "Lead", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "contact", 
+   "fieldtype": "Link", 
+   "label": "Contact", 
+   "options": "Contact", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "customer", 
+   "fieldtype": "Link", 
+   "in_filter": 1, 
+   "label": "Customer", 
+   "oldfieldname": "customer", 
+   "oldfieldtype": "Link", 
+   "options": "Customer", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "read_only": 0, 
+   "reqd": 0, 
+   "search_index": 1
+  }, 
+  {
+   "fieldname": "customer_name", 
+   "fieldtype": "Data", 
+   "in_filter": 1, 
+   "label": "Customer Name", 
+   "oldfieldname": "customer_name", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "read_only": 1, 
+   "reqd": 0, 
+   "search_index": 0
+  }, 
+  {
+   "default": "Today", 
+   "fieldname": "opening_date", 
+   "fieldtype": "Date", 
+   "label": "Opening Date", 
+   "no_copy": 1, 
+   "oldfieldname": "opening_date", 
+   "oldfieldtype": "Date", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "opening_time", 
+   "fieldtype": "Time", 
+   "label": "Opening Time", 
+   "no_copy": 1, 
+   "oldfieldname": "opening_time", 
+   "oldfieldtype": "Time", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "company", 
+   "fieldtype": "Link", 
+   "label": "Company", 
+   "options": "Company", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "reqd": 0
+  }, 
+  {
+   "depends_on": "eval:!doc.__islocal", 
+   "fieldname": "column_break1", 
+   "fieldtype": "Column Break", 
+   "oldfieldtype": "Column Break", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "first_responded_on", 
+   "fieldtype": "Datetime", 
+   "label": "First Responded On", 
+   "permlevel": 0
+  }, 
+  {
+   "depends_on": "eval:!doc.__islocal", 
+   "fieldname": "resolution_date", 
+   "fieldtype": "Datetime", 
+   "in_filter": 0, 
+   "label": "Resolution Date", 
+   "no_copy": 1, 
+   "oldfieldname": "resolution_date", 
+   "oldfieldtype": "Date", 
+   "permlevel": 0, 
+   "read_only": 1, 
+   "search_index": 0
+  }, 
+  {
+   "depends_on": "eval:!doc.__islocal", 
+   "fieldname": "resolution_details", 
+   "fieldtype": "Small Text", 
+   "label": "Resolution Details", 
+   "no_copy": 1, 
+   "oldfieldname": "resolution_details", 
+   "oldfieldtype": "Text", 
+   "permlevel": 0, 
+   "read_only": 0
+  }, 
+  {
+   "fieldname": "content_type", 
+   "fieldtype": "Data", 
+   "hidden": 1, 
+   "label": "Content Type", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "communications", 
+   "fieldtype": "Table", 
+   "hidden": 1, 
+   "label": "Communications", 
+   "options": "Communication", 
+   "permlevel": 0, 
+   "print_hide": 1
+  }
+ ], 
+ "icon": "icon-ticket", 
+ "idx": 1, 
+ "modified": "2014-01-20 17:49:31", 
+ "modified_by": "Administrator", 
+ "module": "Support", 
+ "name": "Support Ticket", 
+ "owner": "Administrator", 
+ "permissions": [
+  {
+   "amend": 0, 
+   "cancel": 0, 
+   "create": 1, 
+   "delete": 0, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Guest", 
+   "submit": 0, 
+   "write": 1
+  }, 
+  {
+   "amend": 0, 
+   "cancel": 0, 
+   "create": 1, 
+   "delete": 0, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Customer", 
+   "submit": 0, 
+   "write": 1
+  }, 
+  {
+   "amend": 0, 
+   "cancel": 0, 
+   "create": 1, 
+   "delete": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Support Team", 
+   "submit": 0, 
+   "write": 1
+  }
+ ], 
+ "search_fields": "status,customer,allocated_to,subject,raised_by"
+}
\ No newline at end of file
diff --git a/erpnext/support/page/support_analytics/support_analytics.txt b/erpnext/support/page/support_analytics/support_analytics.txt
index 3b9f190..899f49c 100644
--- a/erpnext/support/page/support_analytics/support_analytics.txt
+++ b/erpnext/support/page/support_analytics/support_analytics.txt
@@ -1,33 +1,20 @@
-[
- {
-  "creation": "2013-01-04 15:31:45", 
-  "docstatus": 0, 
-  "modified": "2013-07-11 14:44:24", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "doctype": "Page", 
-  "icon": "icon-bar-chart", 
-  "module": "Support", 
-  "name": "__common__", 
-  "page_name": "support-analytics", 
-  "standard": "Yes", 
-  "title": "Support Analytics"
- }, 
- {
-  "doctype": "Page Role", 
-  "name": "__common__", 
-  "parent": "support-analytics", 
-  "parentfield": "roles", 
-  "parenttype": "Page", 
-  "role": "Support Team"
- }, 
- {
-  "doctype": "Page", 
-  "name": "support-analytics"
- }, 
- {
-  "doctype": "Page Role"
- }
-]
\ No newline at end of file
+{
+ "creation": "2013-01-04 15:31:45", 
+ "docstatus": 0, 
+ "doctype": "Page", 
+ "icon": "icon-bar-chart", 
+ "idx": 1, 
+ "modified": "2013-07-11 14:44:24", 
+ "modified_by": "Administrator", 
+ "module": "Support", 
+ "name": "support-analytics", 
+ "owner": "Administrator", 
+ "page_name": "support-analytics", 
+ "roles": [
+  {
+   "role": "Support Team"
+  }
+ ], 
+ "standard": "Yes", 
+ "title": "Support Analytics"
+}
\ No newline at end of file
diff --git a/erpnext/support/report/maintenance_schedules/maintenance_schedules.txt b/erpnext/support/report/maintenance_schedules/maintenance_schedules.txt
index a4c6fdb..b891aed 100644
--- a/erpnext/support/report/maintenance_schedules/maintenance_schedules.txt
+++ b/erpnext/support/report/maintenance_schedules/maintenance_schedules.txt
@@ -1,23 +1,16 @@
-[
- {
-  "creation": "2013-05-06 14:25:21", 
-  "docstatus": 0, 
-  "modified": "2014-03-07 15:30:27", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "doctype": "Report", 
-  "is_standard": "Yes", 
-  "module": "Support", 
-  "name": "__common__", 
-  "query": "SELECT\n    ms_sch.scheduled_date as \"Schedule Date:Date:120\",\n\tms_sch.item_code as \"Item Code:Link/Item:120\",\n\tms_sch.item_name as \"Item Name::120\",\n\tms_sch.serial_no as \"Serial No::120\",\n\tms_sch.sales_person as \"Sales Person::120\",\n\tms.customer_name as \"Customer:Link/Customer:120\",\n\tms.address_display as \"Customer Address::120\",\n\tms_item.prevdoc_docname as \"Sales Order:Link/Sales Order:120\",\n\tms.company as \"Company:Link/Company:120\"\n\t\nFROM\n\t`tabMaintenance Schedule` ms, \n    `tabMaintenance Schedule Detail` ms_sch, \n    `tabMaintenance Schedule Item` ms_item\nWHERE\n\tms.name = ms_sch.parent and ms.name = ms_item.parent and ms.docstatus = 1\nORDER BY\n\tms_sch.scheduled_date asc, ms_sch.item_code asc", 
-  "ref_doctype": "Maintenance Schedule", 
-  "report_name": "Maintenance Schedules", 
-  "report_type": "Query Report"
- }, 
- {
-  "doctype": "Report", 
-  "name": "Maintenance Schedules"
- }
-]
\ No newline at end of file
+{
+ "creation": "2013-05-06 14:25:21", 
+ "docstatus": 0, 
+ "doctype": "Report", 
+ "idx": 1, 
+ "is_standard": "Yes", 
+ "modified": "2014-03-07 15:30:27", 
+ "modified_by": "Administrator", 
+ "module": "Support", 
+ "name": "Maintenance Schedules", 
+ "owner": "Administrator", 
+ "query": "SELECT\n    ms_sch.scheduled_date as \"Schedule Date:Date:120\",\n\tms_sch.item_code as \"Item Code:Link/Item:120\",\n\tms_sch.item_name as \"Item Name::120\",\n\tms_sch.serial_no as \"Serial No::120\",\n\tms_sch.sales_person as \"Sales Person::120\",\n\tms.customer_name as \"Customer:Link/Customer:120\",\n\tms.address_display as \"Customer Address::120\",\n\tms_item.prevdoc_docname as \"Sales Order:Link/Sales Order:120\",\n\tms.company as \"Company:Link/Company:120\"\n\t\nFROM\n\t`tabMaintenance Schedule` ms, \n    `tabMaintenance Schedule Detail` ms_sch, \n    `tabMaintenance Schedule Item` ms_item\nWHERE\n\tms.name = ms_sch.parent and ms.name = ms_item.parent and ms.docstatus = 1\nORDER BY\n\tms_sch.scheduled_date asc, ms_sch.item_code asc", 
+ "ref_doctype": "Maintenance Schedule", 
+ "report_name": "Maintenance Schedules", 
+ "report_type": "Query Report"
+}
\ No newline at end of file
diff --git a/erpnext/utilities/doctype/address/address.txt b/erpnext/utilities/doctype/address/address.txt
index aa9230d..a958c57 100644
--- a/erpnext/utilities/doctype/address/address.txt
+++ b/erpnext/utilities/doctype/address/address.txt
@@ -1,254 +1,262 @@
-[
- {
-  "creation": "2013-01-10 16:34:32", 
-  "docstatus": 0, 
-  "modified": "2014-01-27 11:19:06", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "allow_import": 1, 
-  "allow_rename": 1, 
-  "doctype": "DocType", 
-  "document_type": "Master", 
-  "icon": "icon-map-marker", 
-  "in_dialog": 0, 
-  "module": "Utilities", 
-  "name": "__common__", 
-  "search_fields": "customer, supplier, sales_partner, country, state"
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "Address", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "cancel": 0, 
-  "create": 1, 
-  "delete": 0, 
-  "doctype": "DocPerm", 
-  "email": 1, 
-  "name": "__common__", 
-  "parent": "Address", 
-  "parentfield": "permissions", 
-  "parenttype": "DocType", 
-  "permlevel": 0, 
-  "print": 1, 
-  "read": 1, 
-  "report": 1, 
-  "submit": 0, 
-  "write": 1
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Address"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "address_details", 
-  "fieldtype": "Section Break", 
-  "label": "Address Details", 
-  "options": "icon-map-marker"
- }, 
- {
-  "description": "Name of person or organization that this address belongs to.", 
-  "doctype": "DocField", 
-  "fieldname": "address_title", 
-  "fieldtype": "Data", 
-  "in_list_view": 1, 
-  "label": "Address Title", 
-  "reqd": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "address_type", 
-  "fieldtype": "Select", 
-  "label": "Address Type", 
-  "options": "Billing\nShipping\nOffice\nPersonal\nPlant\nPostal\nShop\nSubsidiary\nWarehouse\nOther", 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "address_line1", 
-  "fieldtype": "Data", 
-  "label": "Address Line 1", 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "address_line2", 
-  "fieldtype": "Data", 
-  "label": "Address Line 2"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "city", 
-  "fieldtype": "Data", 
-  "in_filter": 1, 
-  "in_list_view": 1, 
-  "label": "City/Town", 
-  "reqd": 1, 
-  "search_index": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "state", 
-  "fieldtype": "Data", 
-  "in_filter": 1, 
-  "in_list_view": 1, 
-  "label": "State", 
-  "options": "Suggest", 
-  "search_index": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "pincode", 
-  "fieldtype": "Data", 
-  "in_filter": 1, 
-  "in_list_view": 1, 
-  "label": "Pincode", 
-  "search_index": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "country", 
-  "fieldtype": "Select", 
-  "in_filter": 1, 
-  "in_list_view": 1, 
-  "label": "Country", 
-  "options": "link:Country", 
-  "reqd": 1, 
-  "search_index": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break0", 
-  "fieldtype": "Column Break", 
-  "print_hide": 0, 
-  "width": "50%"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "email_id", 
-  "fieldtype": "Data", 
-  "label": "Email Id"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "phone", 
-  "fieldtype": "Data", 
-  "label": "Phone", 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "fax", 
-  "fieldtype": "Data", 
-  "in_filter": 1, 
-  "label": "Fax"
- }, 
- {
-  "default": "0", 
-  "description": "Check to make primary address", 
-  "doctype": "DocField", 
-  "fieldname": "is_primary_address", 
-  "fieldtype": "Check", 
-  "label": "Preferred Billing Address"
- }, 
- {
-  "default": "0", 
-  "description": "Check to make Shipping Address", 
-  "doctype": "DocField", 
-  "fieldname": "is_shipping_address", 
-  "fieldtype": "Check", 
-  "in_list_view": 1, 
-  "label": "Preferred Shipping Address"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "linked_with", 
-  "fieldtype": "Section Break", 
-  "label": "Reference", 
-  "options": "icon-pushpin"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "customer", 
-  "fieldtype": "Link", 
-  "label": "Customer", 
-  "options": "Customer"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "customer_name", 
-  "fieldtype": "Data", 
-  "in_filter": 1, 
-  "in_list_view": 0, 
-  "label": "Customer Name", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "supplier", 
-  "fieldtype": "Link", 
-  "label": "Supplier", 
-  "options": "Supplier"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "supplier_name", 
-  "fieldtype": "Data", 
-  "in_filter": 1, 
-  "in_list_view": 0, 
-  "label": "Supplier Name", 
-  "read_only": 1, 
-  "search_index": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "sales_partner", 
-  "fieldtype": "Link", 
-  "label": "Sales Partner", 
-  "options": "Sales Partner"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break_22", 
-  "fieldtype": "Column Break"
- }, 
- {
-  "depends_on": "eval:!doc.supplier && !doc.sales_partner", 
-  "doctype": "DocField", 
-  "fieldname": "lead", 
-  "fieldtype": "Link", 
-  "label": "Lead", 
-  "options": "Lead"
- }, 
- {
-  "depends_on": "eval:!doc.supplier && !doc.sales_partner", 
-  "doctype": "DocField", 
-  "fieldname": "lead_name", 
-  "fieldtype": "Data", 
-  "label": "Lead Name", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocPerm", 
-  "role": "Sales User"
- }, 
- {
-  "doctype": "DocPerm", 
-  "role": "Purchase User"
- }, 
- {
-  "doctype": "DocPerm", 
-  "role": "Maintenance User"
- }, 
- {
-  "doctype": "DocPerm", 
-  "role": "Accounts User"
- }
-]
\ No newline at end of file
+{
+ "allow_import": 1, 
+ "allow_rename": 1, 
+ "creation": "2013-01-10 16:34:32", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "document_type": "Master", 
+ "fields": [
+  {
+   "fieldname": "address_details", 
+   "fieldtype": "Section Break", 
+   "label": "Address Details", 
+   "options": "icon-map-marker", 
+   "permlevel": 0
+  }, 
+  {
+   "description": "Name of person or organization that this address belongs to.", 
+   "fieldname": "address_title", 
+   "fieldtype": "Data", 
+   "in_list_view": 1, 
+   "label": "Address Title", 
+   "permlevel": 0, 
+   "reqd": 0
+  }, 
+  {
+   "fieldname": "address_type", 
+   "fieldtype": "Select", 
+   "label": "Address Type", 
+   "options": "Billing\nShipping\nOffice\nPersonal\nPlant\nPostal\nShop\nSubsidiary\nWarehouse\nOther", 
+   "permlevel": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "address_line1", 
+   "fieldtype": "Data", 
+   "label": "Address Line 1", 
+   "permlevel": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "address_line2", 
+   "fieldtype": "Data", 
+   "label": "Address Line 2", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "city", 
+   "fieldtype": "Data", 
+   "in_filter": 1, 
+   "in_list_view": 1, 
+   "label": "City/Town", 
+   "permlevel": 0, 
+   "reqd": 1, 
+   "search_index": 1
+  }, 
+  {
+   "fieldname": "state", 
+   "fieldtype": "Data", 
+   "in_filter": 1, 
+   "in_list_view": 1, 
+   "label": "State", 
+   "options": "Suggest", 
+   "permlevel": 0, 
+   "search_index": 0
+  }, 
+  {
+   "fieldname": "pincode", 
+   "fieldtype": "Data", 
+   "in_filter": 1, 
+   "in_list_view": 1, 
+   "label": "Pincode", 
+   "permlevel": 0, 
+   "search_index": 1
+  }, 
+  {
+   "fieldname": "country", 
+   "fieldtype": "Select", 
+   "in_filter": 1, 
+   "in_list_view": 1, 
+   "label": "Country", 
+   "options": "link:Country", 
+   "permlevel": 0, 
+   "reqd": 1, 
+   "search_index": 1
+  }, 
+  {
+   "fieldname": "column_break0", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0, 
+   "print_hide": 0, 
+   "width": "50%"
+  }, 
+  {
+   "fieldname": "email_id", 
+   "fieldtype": "Data", 
+   "label": "Email Id", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "phone", 
+   "fieldtype": "Data", 
+   "label": "Phone", 
+   "permlevel": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "fax", 
+   "fieldtype": "Data", 
+   "in_filter": 1, 
+   "label": "Fax", 
+   "permlevel": 0
+  }, 
+  {
+   "default": "0", 
+   "description": "Check to make primary address", 
+   "fieldname": "is_primary_address", 
+   "fieldtype": "Check", 
+   "label": "Preferred Billing Address", 
+   "permlevel": 0
+  }, 
+  {
+   "default": "0", 
+   "description": "Check to make Shipping Address", 
+   "fieldname": "is_shipping_address", 
+   "fieldtype": "Check", 
+   "in_list_view": 1, 
+   "label": "Preferred Shipping Address", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "linked_with", 
+   "fieldtype": "Section Break", 
+   "label": "Reference", 
+   "options": "icon-pushpin", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "customer", 
+   "fieldtype": "Link", 
+   "label": "Customer", 
+   "options": "Customer", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "customer_name", 
+   "fieldtype": "Data", 
+   "in_filter": 1, 
+   "in_list_view": 0, 
+   "label": "Customer Name", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "supplier", 
+   "fieldtype": "Link", 
+   "label": "Supplier", 
+   "options": "Supplier", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "supplier_name", 
+   "fieldtype": "Data", 
+   "in_filter": 1, 
+   "in_list_view": 0, 
+   "label": "Supplier Name", 
+   "permlevel": 0, 
+   "read_only": 1, 
+   "search_index": 0
+  }, 
+  {
+   "fieldname": "sales_partner", 
+   "fieldtype": "Link", 
+   "label": "Sales Partner", 
+   "options": "Sales Partner", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "column_break_22", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0
+  }, 
+  {
+   "depends_on": "eval:!doc.supplier && !doc.sales_partner", 
+   "fieldname": "lead", 
+   "fieldtype": "Link", 
+   "label": "Lead", 
+   "options": "Lead", 
+   "permlevel": 0
+  }, 
+  {
+   "depends_on": "eval:!doc.supplier && !doc.sales_partner", 
+   "fieldname": "lead_name", 
+   "fieldtype": "Data", 
+   "label": "Lead Name", 
+   "permlevel": 0, 
+   "read_only": 1
+  }
+ ], 
+ "icon": "icon-map-marker", 
+ "idx": 1, 
+ "in_dialog": 0, 
+ "modified": "2014-01-27 11:19:06", 
+ "modified_by": "Administrator", 
+ "module": "Utilities", 
+ "name": "Address", 
+ "owner": "Administrator", 
+ "permissions": [
+  {
+   "cancel": 0, 
+   "create": 1, 
+   "delete": 0, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Sales User", 
+   "submit": 0, 
+   "write": 1
+  }, 
+  {
+   "cancel": 0, 
+   "create": 1, 
+   "delete": 0, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Purchase User", 
+   "submit": 0, 
+   "write": 1
+  }, 
+  {
+   "cancel": 0, 
+   "create": 1, 
+   "delete": 0, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Maintenance User", 
+   "submit": 0, 
+   "write": 1
+  }, 
+  {
+   "cancel": 0, 
+   "create": 1, 
+   "delete": 0, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Accounts User", 
+   "submit": 0, 
+   "write": 1
+  }
+ ], 
+ "search_fields": "customer, supplier, sales_partner, country, state"
+}
\ No newline at end of file
diff --git a/erpnext/utilities/doctype/contact/contact.txt b/erpnext/utilities/doctype/contact/contact.txt
index 5a3e32d..ab828f9 100644
--- a/erpnext/utilities/doctype/contact/contact.txt
+++ b/erpnext/utilities/doctype/contact/contact.txt
@@ -1,301 +1,362 @@
-[
- {
-  "creation": "2013-01-10 16:34:32", 
-  "docstatus": 0, 
-  "modified": "2014-01-20 17:48:29", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "allow_import": 1, 
-  "allow_rename": 1, 
-  "doctype": "DocType", 
-  "document_type": "Master", 
-  "icon": "icon-user", 
-  "in_create": 0, 
-  "in_dialog": 0, 
-  "module": "Utilities", 
-  "name": "__common__"
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "Contact", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "cancel": 0, 
-  "create": 1, 
-  "doctype": "DocPerm", 
-  "email": 1, 
-  "name": "__common__", 
-  "parent": "Contact", 
-  "parentfield": "permissions", 
-  "parenttype": "DocType", 
-  "permlevel": 0, 
-  "print": 1, 
-  "read": 1, 
-  "report": 1, 
-  "submit": 0, 
-  "write": 1
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Contact"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "contact_section", 
-  "fieldtype": "Section Break", 
-  "label": "Contact Details", 
-  "options": "icon-user"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "first_name", 
-  "fieldtype": "Data", 
-  "label": "First Name", 
-  "oldfieldname": "first_name", 
-  "oldfieldtype": "Data", 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "last_name", 
-  "fieldtype": "Data", 
-  "label": "Last Name", 
-  "oldfieldname": "last_name", 
-  "oldfieldtype": "Data"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "cb00", 
-  "fieldtype": "Column Break"
- }, 
- {
-  "default": "Passive", 
-  "doctype": "DocField", 
-  "fieldname": "status", 
-  "fieldtype": "Select", 
-  "label": "Status", 
-  "options": "Passive\nOpen\nReplied"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "email_id", 
-  "fieldtype": "Data", 
-  "in_list_view": 1, 
-  "label": "Email Id", 
-  "oldfieldname": "email_id", 
-  "oldfieldtype": "Data", 
-  "reqd": 0, 
-  "search_index": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "phone", 
-  "fieldtype": "Data", 
-  "label": "Phone", 
-  "oldfieldname": "contact_no", 
-  "oldfieldtype": "Data", 
-  "reqd": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "sb00", 
-  "fieldtype": "Section Break", 
-  "label": "Communication History", 
-  "options": "icon-comments", 
-  "print_hide": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "communication_html", 
-  "fieldtype": "HTML", 
-  "label": "Communication HTML", 
-  "print_hide": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "contact_details", 
-  "fieldtype": "Section Break", 
-  "label": "Reference", 
-  "options": "icon-pushpin"
- }, 
- {
-  "depends_on": "eval:!doc.supplier && !doc.sales_partner", 
-  "doctype": "DocField", 
-  "fieldname": "customer", 
-  "fieldtype": "Link", 
-  "label": "Customer", 
-  "oldfieldname": "customer", 
-  "oldfieldtype": "Link", 
-  "options": "Customer", 
-  "print_hide": 0
- }, 
- {
-  "depends_on": "eval:!doc.supplier && !doc.sales_partner", 
-  "doctype": "DocField", 
-  "fieldname": "customer_name", 
-  "fieldtype": "Data", 
-  "in_list_view": 1, 
-  "label": "Customer Name", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break1", 
-  "fieldtype": "Column Break", 
-  "oldfieldtype": "Column Break", 
-  "width": "50%"
- }, 
- {
-  "depends_on": "eval:!doc.customer && !doc.sales_partner", 
-  "doctype": "DocField", 
-  "fieldname": "supplier", 
-  "fieldtype": "Link", 
-  "label": "Supplier", 
-  "options": "Supplier"
- }, 
- {
-  "allow_on_submit": 0, 
-  "depends_on": "eval:!doc.customer && !doc.sales_partner", 
-  "doctype": "DocField", 
-  "fieldname": "supplier_name", 
-  "fieldtype": "Data", 
-  "in_list_view": 1, 
-  "label": "Supplier Name", 
-  "read_only": 1
- }, 
- {
-  "depends_on": "eval:!doc.customer && !doc.supplier", 
-  "doctype": "DocField", 
-  "fieldname": "sales_partner", 
-  "fieldtype": "Link", 
-  "label": "Sales Partner", 
-  "options": "Sales Partner"
- }, 
- {
-  "default": "0", 
-  "depends_on": "eval:(doc.customer || doc.supplier || doc.sales_partner)", 
-  "doctype": "DocField", 
-  "fieldname": "is_primary_contact", 
-  "fieldtype": "Check", 
-  "label": "Is Primary Contact", 
-  "oldfieldname": "is_primary_contact", 
-  "oldfieldtype": "Select"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "more_info", 
-  "fieldtype": "Section Break", 
-  "label": "More Info", 
-  "options": "icon-file-text"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "mobile_no", 
-  "fieldtype": "Data", 
-  "label": "Mobile No", 
-  "oldfieldname": "mobile_no", 
-  "oldfieldtype": "Data"
- }, 
- {
-  "description": "Enter department to which this Contact belongs", 
-  "doctype": "DocField", 
-  "fieldname": "department", 
-  "fieldtype": "Data", 
-  "label": "Department", 
-  "options": "Suggest"
- }, 
- {
-  "description": "Enter designation of this Contact", 
-  "doctype": "DocField", 
-  "fieldname": "designation", 
-  "fieldtype": "Data", 
-  "label": "Designation", 
-  "options": "Suggest"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "unsubscribed", 
-  "fieldtype": "Check", 
-  "label": "Unsubscribed"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "trash_reason", 
-  "fieldtype": "Small Text", 
-  "label": "Trash Reason", 
-  "oldfieldname": "trash_reason", 
-  "oldfieldtype": "Small Text", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "communications", 
-  "fieldtype": "Table", 
-  "hidden": 1, 
-  "label": "Communications", 
-  "options": "Communication", 
-  "print_hide": 1
- }, 
- {
-  "delete": 1, 
-  "doctype": "DocPerm", 
-  "role": "System Manager"
- }, 
- {
-  "amend": 0, 
-  "delete": 1, 
-  "doctype": "DocPerm", 
-  "role": "Sales Master Manager"
- }, 
- {
-  "delete": 1, 
-  "doctype": "DocPerm", 
-  "role": "Purchase Master Manager"
- }, 
- {
-  "delete": 0, 
-  "doctype": "DocPerm", 
-  "role": "Sales Manager"
- }, 
- {
-  "delete": 0, 
-  "doctype": "DocPerm", 
-  "role": "Purchase Manager"
- }, 
- {
-  "delete": 0, 
-  "doctype": "DocPerm", 
-  "role": "Maintenance Manager"
- }, 
- {
-  "delete": 0, 
-  "doctype": "DocPerm", 
-  "role": "Accounts Manager"
- }, 
- {
-  "delete": 0, 
-  "doctype": "DocPerm", 
-  "role": "Sales User"
- }, 
- {
-  "delete": 0, 
-  "doctype": "DocPerm", 
-  "role": "Purchase User"
- }, 
- {
-  "delete": 0, 
-  "doctype": "DocPerm", 
-  "role": "Maintenance User"
- }, 
- {
-  "delete": 0, 
-  "doctype": "DocPerm", 
-  "role": "Accounts User"
- }
-]
\ No newline at end of file
+{
+ "allow_import": 1, 
+ "allow_rename": 1, 
+ "creation": "2013-01-10 16:34:32", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "document_type": "Master", 
+ "fields": [
+  {
+   "fieldname": "contact_section", 
+   "fieldtype": "Section Break", 
+   "label": "Contact Details", 
+   "options": "icon-user", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "first_name", 
+   "fieldtype": "Data", 
+   "label": "First Name", 
+   "oldfieldname": "first_name", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "reqd": 1
+  }, 
+  {
+   "fieldname": "last_name", 
+   "fieldtype": "Data", 
+   "label": "Last Name", 
+   "oldfieldname": "last_name", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "cb00", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0
+  }, 
+  {
+   "default": "Passive", 
+   "fieldname": "status", 
+   "fieldtype": "Select", 
+   "label": "Status", 
+   "options": "Passive\nOpen\nReplied", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "email_id", 
+   "fieldtype": "Data", 
+   "in_list_view": 1, 
+   "label": "Email Id", 
+   "oldfieldname": "email_id", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "reqd": 0, 
+   "search_index": 1
+  }, 
+  {
+   "fieldname": "phone", 
+   "fieldtype": "Data", 
+   "label": "Phone", 
+   "oldfieldname": "contact_no", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "reqd": 0
+  }, 
+  {
+   "fieldname": "sb00", 
+   "fieldtype": "Section Break", 
+   "label": "Communication History", 
+   "options": "icon-comments", 
+   "permlevel": 0, 
+   "print_hide": 1
+  }, 
+  {
+   "fieldname": "communication_html", 
+   "fieldtype": "HTML", 
+   "label": "Communication HTML", 
+   "permlevel": 0, 
+   "print_hide": 1
+  }, 
+  {
+   "fieldname": "contact_details", 
+   "fieldtype": "Section Break", 
+   "label": "Reference", 
+   "options": "icon-pushpin", 
+   "permlevel": 0
+  }, 
+  {
+   "depends_on": "eval:!doc.supplier && !doc.sales_partner", 
+   "fieldname": "customer", 
+   "fieldtype": "Link", 
+   "label": "Customer", 
+   "oldfieldname": "customer", 
+   "oldfieldtype": "Link", 
+   "options": "Customer", 
+   "permlevel": 0, 
+   "print_hide": 0
+  }, 
+  {
+   "depends_on": "eval:!doc.supplier && !doc.sales_partner", 
+   "fieldname": "customer_name", 
+   "fieldtype": "Data", 
+   "in_list_view": 1, 
+   "label": "Customer Name", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "column_break1", 
+   "fieldtype": "Column Break", 
+   "oldfieldtype": "Column Break", 
+   "permlevel": 0, 
+   "width": "50%"
+  }, 
+  {
+   "depends_on": "eval:!doc.customer && !doc.sales_partner", 
+   "fieldname": "supplier", 
+   "fieldtype": "Link", 
+   "label": "Supplier", 
+   "options": "Supplier", 
+   "permlevel": 0
+  }, 
+  {
+   "allow_on_submit": 0, 
+   "depends_on": "eval:!doc.customer && !doc.sales_partner", 
+   "fieldname": "supplier_name", 
+   "fieldtype": "Data", 
+   "in_list_view": 1, 
+   "label": "Supplier Name", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "depends_on": "eval:!doc.customer && !doc.supplier", 
+   "fieldname": "sales_partner", 
+   "fieldtype": "Link", 
+   "label": "Sales Partner", 
+   "options": "Sales Partner", 
+   "permlevel": 0
+  }, 
+  {
+   "default": "0", 
+   "depends_on": "eval:(doc.customer || doc.supplier || doc.sales_partner)", 
+   "fieldname": "is_primary_contact", 
+   "fieldtype": "Check", 
+   "label": "Is Primary Contact", 
+   "oldfieldname": "is_primary_contact", 
+   "oldfieldtype": "Select", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "more_info", 
+   "fieldtype": "Section Break", 
+   "label": "More Info", 
+   "options": "icon-file-text", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "mobile_no", 
+   "fieldtype": "Data", 
+   "label": "Mobile No", 
+   "oldfieldname": "mobile_no", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0
+  }, 
+  {
+   "description": "Enter department to which this Contact belongs", 
+   "fieldname": "department", 
+   "fieldtype": "Data", 
+   "label": "Department", 
+   "options": "Suggest", 
+   "permlevel": 0
+  }, 
+  {
+   "description": "Enter designation of this Contact", 
+   "fieldname": "designation", 
+   "fieldtype": "Data", 
+   "label": "Designation", 
+   "options": "Suggest", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "unsubscribed", 
+   "fieldtype": "Check", 
+   "label": "Unsubscribed", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "trash_reason", 
+   "fieldtype": "Small Text", 
+   "label": "Trash Reason", 
+   "oldfieldname": "trash_reason", 
+   "oldfieldtype": "Small Text", 
+   "permlevel": 0, 
+   "read_only": 1
+  }, 
+  {
+   "fieldname": "communications", 
+   "fieldtype": "Table", 
+   "hidden": 1, 
+   "label": "Communications", 
+   "options": "Communication", 
+   "permlevel": 0, 
+   "print_hide": 1
+  }
+ ], 
+ "icon": "icon-user", 
+ "idx": 1, 
+ "in_create": 0, 
+ "in_dialog": 0, 
+ "modified": "2014-01-20 17:48:29", 
+ "modified_by": "Administrator", 
+ "module": "Utilities", 
+ "name": "Contact", 
+ "owner": "Administrator", 
+ "permissions": [
+  {
+   "cancel": 0, 
+   "create": 1, 
+   "delete": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "System Manager", 
+   "submit": 0, 
+   "write": 1
+  }, 
+  {
+   "amend": 0, 
+   "cancel": 0, 
+   "create": 1, 
+   "delete": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Sales Master Manager", 
+   "submit": 0, 
+   "write": 1
+  }, 
+  {
+   "cancel": 0, 
+   "create": 1, 
+   "delete": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Purchase Master Manager", 
+   "submit": 0, 
+   "write": 1
+  }, 
+  {
+   "cancel": 0, 
+   "create": 1, 
+   "delete": 0, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Sales Manager", 
+   "submit": 0, 
+   "write": 1
+  }, 
+  {
+   "cancel": 0, 
+   "create": 1, 
+   "delete": 0, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Purchase Manager", 
+   "submit": 0, 
+   "write": 1
+  }, 
+  {
+   "cancel": 0, 
+   "create": 1, 
+   "delete": 0, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Maintenance Manager", 
+   "submit": 0, 
+   "write": 1
+  }, 
+  {
+   "cancel": 0, 
+   "create": 1, 
+   "delete": 0, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Accounts Manager", 
+   "submit": 0, 
+   "write": 1
+  }, 
+  {
+   "cancel": 0, 
+   "create": 1, 
+   "delete": 0, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Sales User", 
+   "submit": 0, 
+   "write": 1
+  }, 
+  {
+   "cancel": 0, 
+   "create": 1, 
+   "delete": 0, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Purchase User", 
+   "submit": 0, 
+   "write": 1
+  }, 
+  {
+   "cancel": 0, 
+   "create": 1, 
+   "delete": 0, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Maintenance User", 
+   "submit": 0, 
+   "write": 1
+  }, 
+  {
+   "cancel": 0, 
+   "create": 1, 
+   "delete": 0, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Accounts User", 
+   "submit": 0, 
+   "write": 1
+  }
+ ]
+}
\ No newline at end of file
diff --git a/erpnext/utilities/doctype/note/note.txt b/erpnext/utilities/doctype/note/note.txt
index 94e5a0f..e281f6c 100644
--- a/erpnext/utilities/doctype/note/note.txt
+++ b/erpnext/utilities/doctype/note/note.txt
@@ -1,88 +1,69 @@
-[
- {
-  "creation": "2013-05-24 13:41:00", 
-  "docstatus": 0, 
-  "modified": "2014-01-22 16:05:35", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "allow_rename": 1, 
-  "description": "Note is a free page where users can share documents / notes", 
-  "doctype": "DocType", 
-  "document_type": "Transaction", 
-  "icon": "icon-file-text", 
-  "module": "Utilities", 
-  "name": "__common__", 
-  "read_only_onload": 1
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "Note", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "cancel": 0, 
-  "create": 1, 
-  "delete": 1, 
-  "doctype": "DocPerm", 
-  "email": 1, 
-  "name": "__common__", 
-  "parent": "Note", 
-  "parentfield": "permissions", 
-  "parenttype": "DocType", 
-  "permlevel": 0, 
-  "print": 1, 
-  "read": 1, 
-  "restricted": 1, 
-  "role": "All", 
-  "write": 1
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Note"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "title", 
-  "fieldtype": "Data", 
-  "label": "Title", 
-  "print_hide": 1
- }, 
- {
-  "description": "Help: To link to another record in the system, use \"#Form/Note/[Note Name]\" as the Link URL. (don't use \"http://\")", 
-  "doctype": "DocField", 
-  "fieldname": "content", 
-  "fieldtype": "Text Editor", 
-  "in_list_view": 0, 
-  "label": "Content"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "share", 
-  "fieldtype": "Section Break", 
-  "label": "Share"
- }, 
- {
-  "description": "Everyone can read", 
-  "doctype": "DocField", 
-  "fieldname": "public", 
-  "fieldtype": "Check", 
-  "label": "Public", 
-  "print_hide": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "share_with", 
-  "fieldtype": "Table", 
-  "label": "Share With", 
-  "options": "Note User", 
-  "print_hide": 1
- }, 
- {
-  "doctype": "DocPerm"
- }
-]
\ No newline at end of file
+{
+ "allow_rename": 1, 
+ "creation": "2013-05-24 13:41:00", 
+ "description": "Note is a free page where users can share documents / notes", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "document_type": "Transaction", 
+ "fields": [
+  {
+   "fieldname": "title", 
+   "fieldtype": "Data", 
+   "label": "Title", 
+   "permlevel": 0, 
+   "print_hide": 1
+  }, 
+  {
+   "description": "Help: To link to another record in the system, use \"#Form/Note/[Note Name]\" as the Link URL. (don't use \"http://\")", 
+   "fieldname": "content", 
+   "fieldtype": "Text Editor", 
+   "in_list_view": 0, 
+   "label": "Content", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "share", 
+   "fieldtype": "Section Break", 
+   "label": "Share", 
+   "permlevel": 0
+  }, 
+  {
+   "description": "Everyone can read", 
+   "fieldname": "public", 
+   "fieldtype": "Check", 
+   "label": "Public", 
+   "permlevel": 0, 
+   "print_hide": 1
+  }, 
+  {
+   "fieldname": "share_with", 
+   "fieldtype": "Table", 
+   "label": "Share With", 
+   "options": "Note User", 
+   "permlevel": 0, 
+   "print_hide": 1
+  }
+ ], 
+ "icon": "icon-file-text", 
+ "idx": 1, 
+ "modified": "2014-01-22 16:05:35", 
+ "modified_by": "Administrator", 
+ "module": "Utilities", 
+ "name": "Note", 
+ "owner": "Administrator", 
+ "permissions": [
+  {
+   "cancel": 0, 
+   "create": 1, 
+   "delete": 1, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "restricted": 1, 
+   "role": "All", 
+   "write": 1
+  }
+ ], 
+ "read_only_onload": 1
+}
\ No newline at end of file
diff --git a/erpnext/utilities/doctype/note_user/note_user.txt b/erpnext/utilities/doctype/note_user/note_user.txt
index 6ae80de..09bfb69 100644
--- a/erpnext/utilities/doctype/note_user/note_user.txt
+++ b/erpnext/utilities/doctype/note_user/note_user.txt
@@ -1,46 +1,34 @@
-[
- {
-  "creation": "2013-05-24 14:24:48", 
-  "docstatus": 0, 
-  "modified": "2013-12-20 19:23:23", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "description": "List of users who can edit a particular Note", 
-  "doctype": "DocType", 
-  "document_type": "Other", 
-  "istable": 1, 
-  "module": "Utilities", 
-  "name": "__common__"
- }, 
- {
-  "doctype": "DocField", 
-  "in_list_view": 1, 
-  "name": "__common__", 
-  "parent": "Note User", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Note User"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "user", 
-  "fieldtype": "Link", 
-  "label": "User", 
-  "options": "User", 
-  "reqd": 1
- }, 
- {
-  "default": "Edit", 
-  "doctype": "DocField", 
-  "fieldname": "permission", 
-  "fieldtype": "Select", 
-  "label": "Permission", 
-  "options": "Edit\nRead"
- }
-]
\ No newline at end of file
+{
+ "creation": "2013-05-24 14:24:48", 
+ "description": "List of users who can edit a particular Note", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "document_type": "Other", 
+ "fields": [
+  {
+   "fieldname": "user", 
+   "fieldtype": "Link", 
+   "in_list_view": 1, 
+   "label": "User", 
+   "options": "User", 
+   "permlevel": 0, 
+   "reqd": 1
+  }, 
+  {
+   "default": "Edit", 
+   "fieldname": "permission", 
+   "fieldtype": "Select", 
+   "in_list_view": 1, 
+   "label": "Permission", 
+   "options": "Edit\nRead", 
+   "permlevel": 0
+  }
+ ], 
+ "idx": 1, 
+ "istable": 1, 
+ "modified": "2013-12-20 19:23:23", 
+ "modified_by": "Administrator", 
+ "module": "Utilities", 
+ "name": "Note User", 
+ "owner": "Administrator"
+}
\ No newline at end of file
diff --git a/erpnext/utilities/doctype/rename_tool/rename_tool.txt b/erpnext/utilities/doctype/rename_tool/rename_tool.txt
index e397cf3..4c09d90 100644
--- a/erpnext/utilities/doctype/rename_tool/rename_tool.txt
+++ b/erpnext/utilities/doctype/rename_tool/rename_tool.txt
@@ -1,70 +1,51 @@
-[
- {
-  "creation": "2012-12-03 10:25:59", 
-  "docstatus": 0, 
-  "modified": "2013-07-05 14:52:51", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "allow_attach": 0, 
-  "allow_email": 1, 
-  "allow_print": 1, 
-  "doctype": "DocType", 
-  "hide_heading": 0, 
-  "hide_toolbar": 1, 
-  "icon": "icon-magic", 
-  "issingle": 1, 
-  "max_attachments": 1, 
-  "module": "Utilities", 
-  "name": "__common__"
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "Rename Tool", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "create": 1, 
-  "doctype": "DocPerm", 
-  "name": "__common__", 
-  "parent": "Rename Tool", 
-  "parentfield": "permissions", 
-  "parenttype": "DocType", 
-  "permlevel": 0, 
-  "read": 1, 
-  "report": 0, 
-  "role": "System Manager", 
-  "submit": 0, 
-  "write": 1
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Rename Tool"
- }, 
- {
-  "description": "Type of document to rename.", 
-  "doctype": "DocField", 
-  "fieldname": "select_doctype", 
-  "fieldtype": "Select", 
-  "label": "Select DocType"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "upload_html", 
-  "fieldtype": "HTML", 
-  "label": "Upload HTML"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "rename_log", 
-  "fieldtype": "HTML", 
-  "label": "Rename Log"
- }, 
- {
-  "doctype": "DocPerm"
- }
-]
\ No newline at end of file
+{
+ "allow_attach": 0, 
+ "allow_email": 1, 
+ "allow_print": 1, 
+ "creation": "2012-12-03 10:25:59", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "fields": [
+  {
+   "description": "Type of document to rename.", 
+   "fieldname": "select_doctype", 
+   "fieldtype": "Select", 
+   "label": "Select DocType", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "upload_html", 
+   "fieldtype": "HTML", 
+   "label": "Upload HTML", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "rename_log", 
+   "fieldtype": "HTML", 
+   "label": "Rename Log", 
+   "permlevel": 0
+  }
+ ], 
+ "hide_heading": 0, 
+ "hide_toolbar": 1, 
+ "icon": "icon-magic", 
+ "idx": 1, 
+ "issingle": 1, 
+ "max_attachments": 1, 
+ "modified": "2013-07-05 14:52:51", 
+ "modified_by": "Administrator", 
+ "module": "Utilities", 
+ "name": "Rename Tool", 
+ "owner": "Administrator", 
+ "permissions": [
+  {
+   "create": 1, 
+   "permlevel": 0, 
+   "read": 1, 
+   "report": 0, 
+   "role": "System Manager", 
+   "submit": 0, 
+   "write": 1
+  }
+ ]
+}
\ No newline at end of file
diff --git a/erpnext/utilities/doctype/sms_control/sms_control.txt b/erpnext/utilities/doctype/sms_control/sms_control.txt
index f8e0fae..80c4ef2 100644
--- a/erpnext/utilities/doctype/sms_control/sms_control.txt
+++ b/erpnext/utilities/doctype/sms_control/sms_control.txt
@@ -1,42 +1,29 @@
-[
- {
-  "creation": "2013-01-10 16:34:32", 
-  "docstatus": 0, 
-  "modified": "2013-12-20 19:21:47", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "doctype": "DocType", 
-  "icon": "icon-mobile-phone", 
-  "in_create": 0, 
-  "issingle": 1, 
-  "module": "Utilities", 
-  "name": "__common__"
- }, 
- {
-  "create": 1, 
-  "doctype": "DocPerm", 
-  "email": 1, 
-  "export": 0, 
-  "import": 0, 
-  "name": "__common__", 
-  "parent": "SMS Control", 
-  "parentfield": "permissions", 
-  "parenttype": "DocType", 
-  "permlevel": 0, 
-  "print": 1, 
-  "read": 1, 
-  "report": 0, 
-  "role": "System Manager", 
-  "submit": 0, 
-  "write": 1
- }, 
- {
-  "doctype": "DocType", 
-  "name": "SMS Control"
- }, 
- {
-  "doctype": "DocPerm"
- }
-]
\ No newline at end of file
+{
+ "creation": "2013-01-10 16:34:32", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "icon": "icon-mobile-phone", 
+ "idx": 1, 
+ "in_create": 0, 
+ "issingle": 1, 
+ "modified": "2013-12-20 19:21:47", 
+ "modified_by": "Administrator", 
+ "module": "Utilities", 
+ "name": "SMS Control", 
+ "owner": "Administrator", 
+ "permissions": [
+  {
+   "create": 1, 
+   "email": 1, 
+   "export": 0, 
+   "import": 0, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 0, 
+   "role": "System Manager", 
+   "submit": 0, 
+   "write": 1
+  }
+ ]
+}
\ No newline at end of file
diff --git a/erpnext/utilities/doctype/sms_log/sms_log.txt b/erpnext/utilities/doctype/sms_log/sms_log.txt
index 43cb1ff..a60eb1a 100644
--- a/erpnext/utilities/doctype/sms_log/sms_log.txt
+++ b/erpnext/utilities/doctype/sms_log/sms_log.txt
@@ -1,94 +1,75 @@
-[
- {
-  "creation": "2012-03-27 14:36:47", 
-  "docstatus": 0, 
-  "modified": "2013-12-20 19:24:35", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "autoname": "SMSLOG/.########", 
-  "doctype": "DocType", 
-  "icon": "icon-mobile-phone", 
-  "module": "Utilities", 
-  "name": "__common__"
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "SMS Log", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "create": 0, 
-  "doctype": "DocPerm", 
-  "email": 1, 
-  "name": "__common__", 
-  "parent": "SMS Log", 
-  "parentfield": "permissions", 
-  "parenttype": "DocType", 
-  "permlevel": 0, 
-  "print": 1, 
-  "read": 1, 
-  "report": 1, 
-  "role": "System Manager", 
-  "write": 0
- }, 
- {
-  "doctype": "DocType", 
-  "name": "SMS Log"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break0", 
-  "fieldtype": "Column Break", 
-  "width": "50%"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "sender_name", 
-  "fieldtype": "Data", 
-  "label": "Sender Name"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "sent_on", 
-  "fieldtype": "Date", 
-  "label": "Sent On"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "receiver_list", 
-  "fieldtype": "Small Text", 
-  "label": "Receiver List"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "column_break1", 
-  "fieldtype": "Column Break", 
-  "width": "50%"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "no_of_requested_sms", 
-  "fieldtype": "Int", 
-  "label": "No of Requested SMS"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "no_of_sent_sms", 
-  "fieldtype": "Int", 
-  "label": "No of Sent SMS"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "message", 
-  "fieldtype": "Small Text", 
-  "label": "Message"
- }, 
- {
-  "doctype": "DocPerm"
- }
-]
\ No newline at end of file
+{
+ "autoname": "SMSLOG/.########", 
+ "creation": "2012-03-27 14:36:47", 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "fields": [
+  {
+   "fieldname": "column_break0", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0, 
+   "width": "50%"
+  }, 
+  {
+   "fieldname": "sender_name", 
+   "fieldtype": "Data", 
+   "label": "Sender Name", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "sent_on", 
+   "fieldtype": "Date", 
+   "label": "Sent On", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "receiver_list", 
+   "fieldtype": "Small Text", 
+   "label": "Receiver List", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "column_break1", 
+   "fieldtype": "Column Break", 
+   "permlevel": 0, 
+   "width": "50%"
+  }, 
+  {
+   "fieldname": "no_of_requested_sms", 
+   "fieldtype": "Int", 
+   "label": "No of Requested SMS", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "no_of_sent_sms", 
+   "fieldtype": "Int", 
+   "label": "No of Sent SMS", 
+   "permlevel": 0
+  }, 
+  {
+   "fieldname": "message", 
+   "fieldtype": "Small Text", 
+   "label": "Message", 
+   "permlevel": 0
+  }
+ ], 
+ "icon": "icon-mobile-phone", 
+ "idx": 1, 
+ "modified": "2013-12-20 19:24:35", 
+ "modified_by": "Administrator", 
+ "module": "Utilities", 
+ "name": "SMS Log", 
+ "owner": "Administrator", 
+ "permissions": [
+  {
+   "create": 0, 
+   "email": 1, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "System Manager", 
+   "write": 0
+  }
+ ]
+}
\ No newline at end of file