Merge branch 'master' of github.com:webnotes/erpnext into responsive
diff --git a/accounts/Print Format/Sales Invoice Classic/Sales Invoice Classic.txt b/accounts/Print Format/Sales Invoice Classic/Sales Invoice Classic.txt
index d72c847..5aefa81 100644
--- a/accounts/Print Format/Sales Invoice Classic/Sales Invoice Classic.txt
+++ b/accounts/Print Format/Sales Invoice Classic/Sales Invoice Classic.txt
@@ -1,17 +1,18 @@
[
{
- "creation": "2013-02-01 14:16:04",
+ "creation": "2013-04-19 13:30:27",
"docstatus": 0,
- "modified": "2013-02-26 11:11:20",
+ "modified": "2013-05-28 17:19:38",
"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/webnotes/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\tline-height: 150%;\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'export_rate', 'export_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.adj_rate) {\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.adj_rate + '% on ' + doc.currency + ' ' +\n\t\t\t\t\t\t\t\tfmt_money(data_row.ref_rate) + '</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 width=38%>' + fmt_money(oc[i].tax_amount/doc.conversion_rate) + '</td>\\n' +\n\t\t\t\t\t\t'</tr>\\n';\n\t\t\t\t}\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 || '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 & 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></td>\n\t\t\t\t\t\t\t<td width=38%><script>\n\t\t\t\t\t\t\t\tfmt_money(doc.net_total/doc.conversion_rate)\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></td>\n\t\t\t\t\t\t\t<td><script>\n\t\t\t\t\t\t\t\tfmt_money(doc.grand_total_export)\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><script>doc.currency</script></td>\n\t\t\t\t\t\t\t<td><script>\n\t\t\t\t\t\t\t\tfmt_money(doc.rounded_total_export)\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>\n",
+ "html": "<!--\n\tSample Print Format for ERPNext\n\tPlease use at your own discretion\n\tFor suggestions and contributions:\n\t\thttps://github.com/webnotes/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\tline-height: 150%;\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'export_rate', 'export_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.adj_rate) {\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.adj_rate + '% on ' + doc.currency + ' ' +\n\t\t\t\t\t\t\t\tfmt_money(data_row.ref_rate) + '</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 width=38%>' + fmt_money(oc[i].tax_amount/doc.conversion_rate) + '</td>\\n' +\n\t\t\t\t\t\t'</tr>\\n';\n\t\t\t\t}\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 || '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 & 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></td>\n\t\t\t\t\t\t\t<td width=38%><script>\n\t\t\t\t\t\t\t\tfmt_money(doc.net_total_export)\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></td>\n\t\t\t\t\t\t\t<td><script>\n\t\t\t\t\t\t\t\tfmt_money(doc.grand_total_export)\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><script>doc.currency</script></td>\n\t\t\t\t\t\t\t<td><script>\n\t\t\t\t\t\t\t\tfmt_money(doc.rounded_total_export)\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>\n",
"module": "Accounts",
"name": "__common__",
+ "print_format_type": "Client",
"standard": "Yes"
},
{
diff --git a/accounts/Print Format/Sales Invoice Modern/Sales Invoice Modern.txt b/accounts/Print Format/Sales Invoice Modern/Sales Invoice Modern.txt
index 97c50fd..2f6251c 100644
--- a/accounts/Print Format/Sales Invoice Modern/Sales Invoice Modern.txt
+++ b/accounts/Print Format/Sales Invoice Modern/Sales Invoice Modern.txt
@@ -1,17 +1,18 @@
[
{
- "creation": "2012-05-15 18:39:02",
+ "creation": "2013-04-19 13:30:27",
"docstatus": 0,
- "modified": "2013-02-26 11:10:58",
+ "modified": "2013-05-28 17:19:52",
"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/webnotes/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\t\tline-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'export_rate', 'export_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.adj_rate) {\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.adj_rate + '% on ' + doc.currency + ' ' +\n\t\t\t\t\t\t\t\tfmt_money(data_row.ref_rate) + '</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 width=38%>' + fmt_money(oc[i].tax_amount) + '</td>\\n' +\n\t\t\t\t\t\t'</tr>\\n';\n\t\t\t\t}\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 || '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 & 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></td>\n\t\t\t\t\t\t\t<td width=38%><script>\n\t\t\t\t\t\t\t\tfmt_money(doc.net_total/doc.conversion_rate)\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></td>\n\t\t\t\t\t\t\t<td><script>\n\t\t\t\t\t\t\t\tfmt_money(doc.grand_total_export)\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><script>doc.currency</script></td>\n\t\t\t\t\t\t\t<td><script>\n\t\t\t\t\t\t\t\tfmt_money(doc.rounded_total_export)\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>\n",
+ "html": "<!--\n\tSample Print Format for ERPNext\n\tPlease use at your own discretion\n\tFor suggestions and contributions:\n\t\thttps://github.com/webnotes/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\t\tline-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'export_rate', 'export_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.adj_rate) {\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.adj_rate + '% on ' + doc.currency + ' ' +\n\t\t\t\t\t\t\t\tfmt_money(data_row.ref_rate) + '</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 width=38%>' + fmt_money(oc[i].tax_amount) + '</td>\\n' +\n\t\t\t\t\t\t'</tr>\\n';\n\t\t\t\t}\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 || '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 & 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></td>\n\t\t\t\t\t\t\t<td width=38%><script>\n\t\t\t\t\t\t\t\tfmt_money(doc.net_total_export)\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></td>\n\t\t\t\t\t\t\t<td><script>\n\t\t\t\t\t\t\t\tfmt_money(doc.grand_total_export)\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><script>doc.currency</script></td>\n\t\t\t\t\t\t\t<td><script>\n\t\t\t\t\t\t\t\tfmt_money(doc.rounded_total_export)\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>\n",
"module": "Accounts",
"name": "__common__",
+ "print_format_type": "Client",
"standard": "Yes"
},
{
diff --git a/accounts/Print Format/Sales Invoice Spartan/Sales Invoice Spartan.txt b/accounts/Print Format/Sales Invoice Spartan/Sales Invoice Spartan.txt
index 6be83d4..b00b3d8 100644
--- a/accounts/Print Format/Sales Invoice Spartan/Sales Invoice Spartan.txt
+++ b/accounts/Print Format/Sales Invoice Spartan/Sales Invoice Spartan.txt
@@ -1,17 +1,18 @@
[
{
- "creation": "2012-05-15 18:39:02",
+ "creation": "2013-04-19 13:30:27",
"docstatus": 0,
- "modified": "2013-02-26 11:11:40",
+ "modified": "2013-05-28 17:19:22",
"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/webnotes/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\tline-height: 150%;\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'export_rate', 'export_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.adj_rate) {\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.adj_rate + '% on ' + doc.currency + ' ' +\n\t\t\t\t\t\t\t\tfmt_money(data_row.ref_rate) + '</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 width=38%>' + fmt_money(oc[i].tax_amount) + '</td>\\n' +\n\t\t\t\t\t\t'</tr>\\n';\n\t\t\t\t}\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 || '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 & 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></td>\n\t\t\t\t\t\t\t<td width=38%><script>\n\t\t\t\t\t\t\t\tfmt_money(doc.net_total/doc.conversion_rate)\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></td>\n\t\t\t\t\t\t\t<td><script>\n\t\t\t\t\t\t\t\tfmt_money(doc.grand_total_export)\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><script>doc.currency</script></td>\n\t\t\t\t\t\t\t<td><script>\n\t\t\t\t\t\t\t\tfmt_money(doc.rounded_total_export)\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>\n",
+ "html": "<!--\n\tSample Print Format for ERPNext\n\tPlease use at your own discretion\n\tFor suggestions and contributions:\n\t\thttps://github.com/webnotes/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\tline-height: 150%;\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'export_rate', 'export_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.adj_rate) {\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.adj_rate + '% on ' + doc.currency + ' ' +\n\t\t\t\t\t\t\t\tfmt_money(data_row.ref_rate) + '</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 width=38%>' + fmt_money(oc[i].tax_amount) + '</td>\\n' +\n\t\t\t\t\t\t'</tr>\\n';\n\t\t\t\t}\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 || '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 & 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></td>\n\t\t\t\t\t\t\t<td width=38%><script>\n\t\t\t\t\t\t\t\tfmt_money(doc.net_total_export)\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></td>\n\t\t\t\t\t\t\t<td><script>\n\t\t\t\t\t\t\t\tfmt_money(doc.grand_total_export)\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><script>doc.currency</script></td>\n\t\t\t\t\t\t\t<td><script>\n\t\t\t\t\t\t\t\tfmt_money(doc.rounded_total_export)\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>\n",
"module": "Accounts",
"name": "__common__",
+ "print_format_type": "Client",
"standard": "Yes"
},
{
diff --git a/accounts/README.md b/accounts/README.md
new file mode 100644
index 0000000..10a99e5
--- /dev/null
+++ b/accounts/README.md
@@ -0,0 +1,13 @@
+Accounts module contains masters and transactions to manage a traditional
+double entry accounting system.
+
+Accounting heads are called "Accounts" and they can be groups in a tree like
+"Chart of Accounts"
+
+Entries are:
+
+- Journal Vouchers
+- Sales Invoice (Itemised)
+- Purchase Invoice (Itemised)
+
+All accounting entries are stored in the `General Ledger`
\ No newline at end of file
diff --git a/accounts/doctype/account/README.md b/accounts/doctype/account/README.md
new file mode 100644
index 0000000..44cdf50
--- /dev/null
+++ b/accounts/doctype/account/README.md
@@ -0,0 +1,11 @@
+Account DocType represents an Accounting Ledger or Group.
+
+Follows a composite model. `parent_account` represents the parent of an Account except
+a root account.
+There can be only 4 root accounts: Income, Expense, Assets and Liabilities in a company.
+
+Other features:
+
+- It can be of type Debit or Credit.
+- A Group is a collection of groups or ledgers
+
diff --git a/accounts/doctype/account/account.py b/accounts/doctype/account/account.py
index bdc26e4..45b02a8 100644
--- a/accounts/doctype/account/account.py
+++ b/accounts/doctype/account/account.py
@@ -29,6 +29,7 @@
self.nsm_parent_field = 'parent_account'
def autoname(self):
+ """Append abbreviation to company on naming"""
self.doc.name = self.doc.account_name.strip() + ' - ' + \
webnotes.conn.get_value("Company", self.doc.company, "abbr")
@@ -37,6 +38,7 @@
return {'address': address}
def validate_master_name(self):
+ """Remind to add master name"""
if (self.doc.master_type == 'Customer' or self.doc.master_type == 'Supplier') \
and not self.doc.master_name:
msgprint("Message: Please enter Master Name once the account is created.")
@@ -62,6 +64,7 @@
self.doc.debit_or_credit = par[0][3]
def validate_max_root_accounts(self):
+ """Raise exception if there are more than 4 root accounts"""
if webnotes.conn.sql("""select count(*) from tabAccount where
company=%s and ifnull(parent_account,'')='' and docstatus != 2""",
self.doc.company)[0][0] > 4:
@@ -69,7 +72,6 @@
raise_exception=1)
def validate_duplicate_account(self):
-
if self.doc.fields.get('__islocal') or not self.doc.name:
company_abbr = webnotes.conn.get_value("Company", self.doc.company, "abbr")
if sql("""select name from tabAccount where name=%s""",
@@ -134,6 +136,7 @@
self.doc.parent_account = ''
def update_nsm_model(self):
+ """update lft, rgt indices for nested set model"""
import webnotes
import webnotes.utils.nestedset
webnotes.utils.nestedset.update_nsm(self)
diff --git a/accounts/doctype/bank_reconciliation/README.md b/accounts/doctype/bank_reconciliation/README.md
new file mode 100644
index 0000000..bf51373
--- /dev/null
+++ b/accounts/doctype/bank_reconciliation/README.md
@@ -0,0 +1 @@
+Tool to update realization dates for banking transactions.
\ No newline at end of file
diff --git a/accounts/doctype/bank_reconciliation_detail/README.md b/accounts/doctype/bank_reconciliation_detail/README.md
new file mode 100644
index 0000000..07d0731
--- /dev/null
+++ b/accounts/doctype/bank_reconciliation_detail/README.md
@@ -0,0 +1 @@
+Detail of transaction for parent Bank Reconciliation.
\ No newline at end of file
diff --git a/accounts/doctype/budget_control/README.md b/accounts/doctype/budget_control/README.md
new file mode 100644
index 0000000..2821015
--- /dev/null
+++ b/accounts/doctype/budget_control/README.md
@@ -0,0 +1 @@
+Backend scripts for Budget Management.
\ No newline at end of file
diff --git a/accounts/doctype/budget_detail/README.md b/accounts/doctype/budget_detail/README.md
new file mode 100644
index 0000000..42c7621
--- /dev/null
+++ b/accounts/doctype/budget_detail/README.md
@@ -0,0 +1 @@
+Budget amounts for year and distribution for parent Cost Center.
\ No newline at end of file
diff --git a/accounts/doctype/budget_distribution/README.md b/accounts/doctype/budget_distribution/README.md
new file mode 100644
index 0000000..6853482
--- /dev/null
+++ b/accounts/doctype/budget_distribution/README.md
@@ -0,0 +1 @@
+Budget distribution master to manage manage budget seasonality.
\ No newline at end of file
diff --git a/accounts/doctype/budget_distribution_detail/README.md b/accounts/doctype/budget_distribution_detail/README.md
new file mode 100644
index 0000000..daa462a
--- /dev/null
+++ b/accounts/doctype/budget_distribution_detail/README.md
@@ -0,0 +1 @@
+Percent allocation for month for parent Budget Distribution.
\ No newline at end of file
diff --git a/accounts/doctype/c_form/README.md b/accounts/doctype/c_form/README.md
new file mode 100644
index 0000000..25c13b0
--- /dev/null
+++ b/accounts/doctype/c_form/README.md
@@ -0,0 +1 @@
+C Form (India specific only) - Will be deprecated.
\ No newline at end of file
diff --git a/accounts/doctype/c_form/c_form.txt b/accounts/doctype/c_form/c_form.txt
index 9243d36..79556ab 100644
--- a/accounts/doctype/c_form/c_form.txt
+++ b/accounts/doctype/c_form/c_form.txt
@@ -1,8 +1,8 @@
[
{
- "creation": "2013-03-07 14:48:29",
+ "creation": "2013-03-07 11:55:06",
"docstatus": 0,
- "modified": "2013-02-13 11:29:18",
+ "modified": "2013-06-11 12:10:33",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -30,6 +30,7 @@
"parentfield": "permissions",
"parenttype": "DocType",
"read": 1,
+ "report": 1,
"submit": 0
},
{
@@ -123,9 +124,8 @@
{
"doctype": "DocField",
"fieldname": "state",
- "fieldtype": "Link",
+ "fieldtype": "Data",
"label": "State",
- "options": "State",
"read_only": 0,
"reqd": 1
},
@@ -166,7 +166,6 @@
"create": 1,
"doctype": "DocPerm",
"permlevel": 0,
- "report": 1,
"role": "Accounts User",
"write": 1
},
@@ -174,7 +173,6 @@
"create": 1,
"doctype": "DocPerm",
"permlevel": 0,
- "report": 1,
"role": "Accounts Manager",
"write": 1
},
@@ -183,7 +181,6 @@
"cancel": 0,
"create": 0,
"doctype": "DocPerm",
- "match": "",
"permlevel": 1,
"role": "All"
}
diff --git a/accounts/doctype/c_form_invoice_detail/README.md b/accounts/doctype/c_form_invoice_detail/README.md
new file mode 100644
index 0000000..3b260ac
--- /dev/null
+++ b/accounts/doctype/c_form_invoice_detail/README.md
@@ -0,0 +1 @@
+Invoice detail for parent C-Form.
\ No newline at end of file
diff --git a/accounts/doctype/cost_center/README.md b/accounts/doctype/cost_center/README.md
new file mode 100644
index 0000000..5fc308b
--- /dev/null
+++ b/accounts/doctype/cost_center/README.md
@@ -0,0 +1 @@
+Cost center master (tree).
\ No newline at end of file
diff --git a/accounts/doctype/fiscal_year/README.md b/accounts/doctype/fiscal_year/README.md
new file mode 100644
index 0000000..24f81c7
--- /dev/null
+++ b/accounts/doctype/fiscal_year/README.md
@@ -0,0 +1 @@
+Accounting year. Fiscal Year is tagged in all accounting transactions.
\ No newline at end of file
diff --git a/accounts/doctype/gl_control/locale/_messages_doc.json b/accounts/doctype/gl_control/locale/_messages_doc.json
deleted file mode 100644
index e7bfed9..0000000
--- a/accounts/doctype/gl_control/locale/_messages_doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-[
- "GL Control",
- "Accounts"
-]
\ No newline at end of file
diff --git a/accounts/doctype/gl_control/locale/ar-doc.json b/accounts/doctype/gl_control/locale/ar-doc.json
deleted file mode 100644
index 779b94f..0000000
--- a/accounts/doctype/gl_control/locale/ar-doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "Accounts": "\u062d\u0633\u0627\u0628\u0627\u062a",
- "GL Control": "GL \u0627\u0644\u062a\u062d\u0643\u0645"
-}
\ No newline at end of file
diff --git a/accounts/doctype/gl_control/locale/de-doc.json b/accounts/doctype/gl_control/locale/de-doc.json
deleted file mode 100644
index 39eaf86..0000000
--- a/accounts/doctype/gl_control/locale/de-doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "Accounts": "Konten",
- "GL Control": "GL Steuerung"
-}
\ No newline at end of file
diff --git a/accounts/doctype/gl_control/locale/es-doc.json b/accounts/doctype/gl_control/locale/es-doc.json
deleted file mode 100644
index f7a8eee..0000000
--- a/accounts/doctype/gl_control/locale/es-doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "Accounts": "Cuentas",
- "GL Control": "GL control"
-}
\ No newline at end of file
diff --git a/accounts/doctype/gl_control/locale/fr-doc.json b/accounts/doctype/gl_control/locale/fr-doc.json
deleted file mode 100644
index a7d3b17..0000000
--- a/accounts/doctype/gl_control/locale/fr-doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "Accounts": "Comptes",
- "GL Control": "GL contr\u00f4le"
-}
\ No newline at end of file
diff --git a/accounts/doctype/gl_control/locale/hi-doc.json b/accounts/doctype/gl_control/locale/hi-doc.json
deleted file mode 100644
index ab677fa..0000000
--- a/accounts/doctype/gl_control/locale/hi-doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "Accounts": "\u0932\u0947\u0916\u093e",
- "GL Control": "\u091c\u0940\u090f\u0932 \u0928\u093f\u092f\u0902\u0924\u094d\u0930\u0923"
-}
\ No newline at end of file
diff --git a/accounts/doctype/gl_control/locale/hr-doc.json b/accounts/doctype/gl_control/locale/hr-doc.json
deleted file mode 100644
index fd9e5bf..0000000
--- a/accounts/doctype/gl_control/locale/hr-doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "Accounts": "Ra\u010duni",
- "GL Control": "GL kontrola"
-}
\ No newline at end of file
diff --git a/accounts/doctype/gl_control/locale/nl-doc.json b/accounts/doctype/gl_control/locale/nl-doc.json
deleted file mode 100644
index af964d5..0000000
--- a/accounts/doctype/gl_control/locale/nl-doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "Accounts": "Accounts",
- "GL Control": "GL Controle"
-}
\ No newline at end of file
diff --git a/accounts/doctype/gl_control/locale/pt-BR-doc.json b/accounts/doctype/gl_control/locale/pt-BR-doc.json
deleted file mode 100644
index bac28e1..0000000
--- a/accounts/doctype/gl_control/locale/pt-BR-doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "Accounts": "Contas",
- "GL Control": "GL Controle"
-}
\ No newline at end of file
diff --git a/accounts/doctype/gl_control/locale/pt-doc.json b/accounts/doctype/gl_control/locale/pt-doc.json
deleted file mode 100644
index bac28e1..0000000
--- a/accounts/doctype/gl_control/locale/pt-doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "Accounts": "Contas",
- "GL Control": "GL Controle"
-}
\ No newline at end of file
diff --git a/accounts/doctype/gl_control/locale/th-doc.json b/accounts/doctype/gl_control/locale/th-doc.json
deleted file mode 100644
index 74d66fd..0000000
--- a/accounts/doctype/gl_control/locale/th-doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "Accounts": "\u0e1a\u0e31\u0e0d\u0e0a\u0e35",
- "GL Control": "\u0e04\u0e27\u0e1a\u0e04\u0e38\u0e21 GL"
-}
\ No newline at end of file
diff --git a/accounts/doctype/gl_entry/README.md b/accounts/doctype/gl_entry/README.md
new file mode 100644
index 0000000..48561fe
--- /dev/null
+++ b/accounts/doctype/gl_entry/README.md
@@ -0,0 +1 @@
+All accounting entries are consolidated / aggregated in GL Entry (General Ledger Entry) DocType. All reports are generated from this DocType.
\ No newline at end of file
diff --git a/accounts/doctype/journal_voucher/README.md b/accounts/doctype/journal_voucher/README.md
new file mode 100644
index 0000000..2b8a17e
--- /dev/null
+++ b/accounts/doctype/journal_voucher/README.md
@@ -0,0 +1 @@
+Journal entry for accounting entries including payments.
\ No newline at end of file
diff --git a/accounts/doctype/journal_voucher/journal_voucher.py b/accounts/doctype/journal_voucher/journal_voucher.py
index a5a4f10..2c5cd4f 100644
--- a/accounts/doctype/journal_voucher/journal_voucher.py
+++ b/accounts/doctype/journal_voucher/journal_voucher.py
@@ -158,7 +158,7 @@
if r:
self.doc.remark = ("\n").join(r)
else:
- webnotes.msgprint("Remarks is mandatory", raise_exception=1)
+ webnotes.msgprint("User Remarks is mandatory", raise_exception=1)
def set_aging_date(self):
if self.doc.is_opening != 'Yes':
diff --git a/accounts/doctype/journal_voucher/journal_voucher.txt b/accounts/doctype/journal_voucher/journal_voucher.txt
index 471b9f2..d0163e6 100644
--- a/accounts/doctype/journal_voucher/journal_voucher.txt
+++ b/accounts/doctype/journal_voucher/journal_voucher.txt
@@ -2,7 +2,7 @@
{
"creation": "2013-03-25 10:53:52",
"docstatus": 0,
- "modified": "2013-04-05 11:10:35",
+ "modified": "2013-06-11 16:04:20",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -460,29 +460,6 @@
"read_only": 1
},
{
- "description": "The date at which current entry is corrected in the system.",
- "doctype": "DocField",
- "fieldname": "amendment_date",
- "fieldtype": "Date",
- "label": "Amendment Date",
- "no_copy": 1,
- "oldfieldname": "amendment_date",
- "oldfieldtype": "Date",
- "print_hide": 1,
- "read_only": 0
- },
- {
- "doctype": "DocField",
- "fieldname": "cancel_reason",
- "fieldtype": "Data",
- "label": "Cancel Reason",
- "no_copy": 1,
- "oldfieldname": "cancel_reason",
- "oldfieldtype": "Data",
- "print_hide": 1,
- "read_only": 1
- },
- {
"amend": 1,
"cancel": 1,
"create": 1,
diff --git a/accounts/doctype/journal_voucher_detail/README.md b/accounts/doctype/journal_voucher_detail/README.md
new file mode 100644
index 0000000..e6f9b43
--- /dev/null
+++ b/accounts/doctype/journal_voucher_detail/README.md
@@ -0,0 +1 @@
+Individual entry for parent Journal Voucher.
\ No newline at end of file
diff --git a/accounts/doctype/mis_control/README.md b/accounts/doctype/mis_control/README.md
new file mode 100644
index 0000000..65c851f
--- /dev/null
+++ b/accounts/doctype/mis_control/README.md
@@ -0,0 +1 @@
+Backend scripts for Financial Statements (to be deprecated)
\ No newline at end of file
diff --git a/accounts/doctype/mode_of_payment/README.md b/accounts/doctype/mode_of_payment/README.md
new file mode 100644
index 0000000..eedc332
--- /dev/null
+++ b/accounts/doctype/mode_of_payment/README.md
@@ -0,0 +1,8 @@
+Master for modes of payment.
+
+e.g.
+
+- Cash
+- Credit Card
+- Bank Transfer
+- Check
\ No newline at end of file
diff --git a/accounts/doctype/multi_ledger_report_detail/__init__.py b/accounts/doctype/multi_ledger_report_detail/__init__.py
deleted file mode 100755
index baffc48..0000000
--- a/accounts/doctype/multi_ledger_report_detail/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-from __future__ import unicode_literals
diff --git a/accounts/doctype/multi_ledger_report_detail/locale/_messages_doc.json b/accounts/doctype/multi_ledger_report_detail/locale/_messages_doc.json
deleted file mode 100644
index ee7393e..0000000
--- a/accounts/doctype/multi_ledger_report_detail/locale/_messages_doc.json
+++ /dev/null
@@ -1,5 +0,0 @@
-[
- "Multi Ledger Report Detail",
- "Account",
- "Accounts"
-]
\ No newline at end of file
diff --git a/accounts/doctype/multi_ledger_report_detail/locale/ar-doc.json b/accounts/doctype/multi_ledger_report_detail/locale/ar-doc.json
deleted file mode 100644
index 2317a7a..0000000
--- a/accounts/doctype/multi_ledger_report_detail/locale/ar-doc.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "Account": "\u062d\u0633\u0627\u0628",
- "Accounts": "\u062d\u0633\u0627\u0628\u0627\u062a",
- "Multi Ledger Report Detail": "\u0645\u0648\u0636\u0648\u0639 \u062a\u0642\u0631\u064a\u0631 \u062a\u0641\u0635\u064a\u0644\u064a \u0644\u064a\u062f\u062c\u0631"
-}
\ No newline at end of file
diff --git a/accounts/doctype/multi_ledger_report_detail/locale/de-doc.json b/accounts/doctype/multi_ledger_report_detail/locale/de-doc.json
deleted file mode 100644
index c7f0317..0000000
--- a/accounts/doctype/multi_ledger_report_detail/locale/de-doc.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "Account": "Konto",
- "Accounts": "Konten",
- "Multi Ledger Report Detail": "Multi Ledger Detail Report"
-}
\ No newline at end of file
diff --git a/accounts/doctype/multi_ledger_report_detail/locale/es-doc.json b/accounts/doctype/multi_ledger_report_detail/locale/es-doc.json
deleted file mode 100644
index be093b6..0000000
--- a/accounts/doctype/multi_ledger_report_detail/locale/es-doc.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "Account": "Cuenta",
- "Accounts": "Cuentas",
- "Multi Ledger Report Detail": "M\u00faltiples Ledger Informe detallado"
-}
\ No newline at end of file
diff --git a/accounts/doctype/multi_ledger_report_detail/locale/fr-doc.json b/accounts/doctype/multi_ledger_report_detail/locale/fr-doc.json
deleted file mode 100644
index 78f209f..0000000
--- a/accounts/doctype/multi_ledger_report_detail/locale/fr-doc.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "Account": "Compte",
- "Accounts": "Comptes",
- "Multi Ledger Report Detail": "Multi D\u00e9tail Rapport Ledger"
-}
\ No newline at end of file
diff --git a/accounts/doctype/multi_ledger_report_detail/locale/hi-doc.json b/accounts/doctype/multi_ledger_report_detail/locale/hi-doc.json
deleted file mode 100644
index 9ee1fec..0000000
--- a/accounts/doctype/multi_ledger_report_detail/locale/hi-doc.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "Account": "\u0916\u093e\u0924\u093e",
- "Accounts": "\u0932\u0947\u0916\u093e",
- "Multi Ledger Report Detail": "\u092e\u0932\u094d\u091f\u0940 \u0932\u0947\u091c\u0930 \u0930\u093f\u092a\u094b\u0930\u094d\u091f \u0935\u093f\u0938\u094d\u0924\u093e\u0930"
-}
\ No newline at end of file
diff --git a/accounts/doctype/multi_ledger_report_detail/locale/hr-doc.json b/accounts/doctype/multi_ledger_report_detail/locale/hr-doc.json
deleted file mode 100644
index 76c520c..0000000
--- a/accounts/doctype/multi_ledger_report_detail/locale/hr-doc.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "Account": "Ra\u010dun",
- "Accounts": "Ra\u010duni",
- "Multi Ledger Report Detail": "Multi knjiga Izvje\u0161\u0107e Detalj"
-}
\ No newline at end of file
diff --git a/accounts/doctype/multi_ledger_report_detail/locale/nl-doc.json b/accounts/doctype/multi_ledger_report_detail/locale/nl-doc.json
deleted file mode 100644
index 8526cab..0000000
--- a/accounts/doctype/multi_ledger_report_detail/locale/nl-doc.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "Account": "Rekening",
- "Accounts": "Accounts",
- "Multi Ledger Report Detail": "Multi Ledger Report Detail"
-}
\ No newline at end of file
diff --git a/accounts/doctype/multi_ledger_report_detail/locale/pt-BR-doc.json b/accounts/doctype/multi_ledger_report_detail/locale/pt-BR-doc.json
deleted file mode 100644
index 3ddf7ba..0000000
--- a/accounts/doctype/multi_ledger_report_detail/locale/pt-BR-doc.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "Account": "Conta",
- "Accounts": "Contas",
- "Multi Ledger Report Detail": "Detalhe do Relat\u00f3rio de m\u00faltiplos Livros-Raz\u00e3o"
-}
\ No newline at end of file
diff --git a/accounts/doctype/multi_ledger_report_detail/locale/pt-doc.json b/accounts/doctype/multi_ledger_report_detail/locale/pt-doc.json
deleted file mode 100644
index e50bcdb..0000000
--- a/accounts/doctype/multi_ledger_report_detail/locale/pt-doc.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "Account": "Conta",
- "Accounts": "Contas",
- "Multi Ledger Report Detail": "Detalhes do Relat\u00f3rio de multi Ledger"
-}
\ No newline at end of file
diff --git a/accounts/doctype/multi_ledger_report_detail/locale/sr-doc.json b/accounts/doctype/multi_ledger_report_detail/locale/sr-doc.json
deleted file mode 100644
index 6998aec..0000000
--- a/accounts/doctype/multi_ledger_report_detail/locale/sr-doc.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "Account": "\u0420\u0430\u0447\u0443\u043d",
- "Accounts": "\u0420\u0430\u0447\u0443\u043d\u0438",
- "Multi Ledger Report Detail": "\u041c\u0443\u043b\u0442\u0438 \u041b\u0435\u045f\u0435\u0440 \u0418\u0437\u0432\u0435\u0448\u0442\u0430\u0458 \u0414\u0435\u0442\u0430\u0459"
-}
\ No newline at end of file
diff --git a/accounts/doctype/multi_ledger_report_detail/locale/ta-doc.json b/accounts/doctype/multi_ledger_report_detail/locale/ta-doc.json
deleted file mode 100644
index d7ff26c..0000000
--- a/accounts/doctype/multi_ledger_report_detail/locale/ta-doc.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "Account": "\u0b95\u0ba3\u0b95\u0bcd\u0b95\u0bc1",
- "Accounts": "\u0b95\u0ba3\u0b95\u0bcd\u0b95\u0bc1\u0b95\u0bb3\u0bcd",
- "Multi Ledger Report Detail": "\u0baa\u0bb2 \u0bb2\u0bc6\u0b9f\u0bcd\u0b9c\u0bb0\u0bcd \u0b85\u0bb1\u0bbf\u0b95\u0bcd\u0b95\u0bc8 \u0bb5\u0bbf\u0bb0\u0bbf\u0bb5\u0bbe\u0b95"
-}
\ No newline at end of file
diff --git a/accounts/doctype/multi_ledger_report_detail/locale/th-doc.json b/accounts/doctype/multi_ledger_report_detail/locale/th-doc.json
deleted file mode 100644
index b4d2869..0000000
--- a/accounts/doctype/multi_ledger_report_detail/locale/th-doc.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "Account": "\u0e1a\u0e31\u0e0d\u0e0a\u0e35",
- "Accounts": "\u0e1a\u0e31\u0e0d\u0e0a\u0e35",
- "Multi Ledger Report Detail": "\u0e2b\u0e25\u0e32\u0e22\u0e23\u0e32\u0e22\u0e25\u0e30\u0e40\u0e2d\u0e35\u0e22\u0e14\u0e02\u0e2d\u0e07\u0e23\u0e32\u0e22\u0e07\u0e32\u0e19\u0e1a\u0e31\u0e0d\u0e0a\u0e35\u0e41\u0e22\u0e01\u0e1b\u0e23\u0e30\u0e40\u0e20\u0e17"
-}
\ No newline at end of file
diff --git a/accounts/doctype/multi_ledger_report_detail/multi_ledger_report_detail.py b/accounts/doctype/multi_ledger_report_detail/multi_ledger_report_detail.py
deleted file mode 100644
index 7f48feb..0000000
--- a/accounts/doctype/multi_ledger_report_detail/multi_ledger_report_detail.py
+++ /dev/null
@@ -1,22 +0,0 @@
-# ERPNext - web based ERP (http://erpnext.com)
-# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-from __future__ import unicode_literals
-import webnotes
-
-class DocType:
- def __init__(self, d, dl):
- self.doc, self.doclist = d, dl
\ No newline at end of file
diff --git a/accounts/doctype/multi_ledger_report_detail/multi_ledger_report_detail.txt b/accounts/doctype/multi_ledger_report_detail/multi_ledger_report_detail.txt
deleted file mode 100755
index 46563dd..0000000
--- a/accounts/doctype/multi_ledger_report_detail/multi_ledger_report_detail.txt
+++ /dev/null
@@ -1,37 +0,0 @@
-[
- {
- "creation": "2013-02-22 01:27:39",
- "docstatus": 0,
- "modified": "2013-03-07 07:03:26",
- "modified_by": "Administrator",
- "owner": "Administrator"
- },
- {
- "doctype": "DocType",
- "istable": 1,
- "module": "Accounts",
- "name": "__common__"
- },
- {
- "doctype": "DocField",
- "fieldname": "account",
- "fieldtype": "Link",
- "label": "Account",
- "name": "__common__",
- "options": "Account",
- "parent": "Multi Ledger Report Detail",
- "parentfield": "fields",
- "parenttype": "DocType",
- "permlevel": 0,
- "print_width": "300px",
- "reqd": 1,
- "width": "300px"
- },
- {
- "doctype": "DocType",
- "name": "Multi Ledger Report Detail"
- },
- {
- "doctype": "DocField"
- }
-]
\ No newline at end of file
diff --git a/accounts/doctype/payment_to_invoice_matching_tool/README.md b/accounts/doctype/payment_to_invoice_matching_tool/README.md
new file mode 100644
index 0000000..bcde4b3
--- /dev/null
+++ b/accounts/doctype/payment_to_invoice_matching_tool/README.md
@@ -0,0 +1 @@
+Tool for mapping (cancelling) unpaid invoices and payments.
\ No newline at end of file
diff --git a/accounts/doctype/payment_to_invoice_matching_tool_detail/README.md b/accounts/doctype/payment_to_invoice_matching_tool_detail/README.md
new file mode 100644
index 0000000..ed32991
--- /dev/null
+++ b/accounts/doctype/payment_to_invoice_matching_tool_detail/README.md
@@ -0,0 +1 @@
+Journal Voucher (payment) detail for matching to invoice.
\ No newline at end of file
diff --git a/accounts/doctype/period_closing_voucher/README.md b/accounts/doctype/period_closing_voucher/README.md
new file mode 100644
index 0000000..6eaa560
--- /dev/null
+++ b/accounts/doctype/period_closing_voucher/README.md
@@ -0,0 +1 @@
+Entry to close all Profit and Loss (P&L) accounts at the end of a financial period.
\ No newline at end of file
diff --git a/accounts/doctype/period_closing_voucher/period_closing_voucher.py b/accounts/doctype/period_closing_voucher/period_closing_voucher.py
index 9269661..09ed07d 100644
--- a/accounts/doctype/period_closing_voucher/period_closing_voucher.py
+++ b/accounts/doctype/period_closing_voucher/period_closing_voucher.py
@@ -187,7 +187,7 @@
# Swap Debit & Credit Column and make gl entry
for gl in gl_entries:
- fdict = {'account': gl[0], 'cost_center': '', 'against': '', 'debit': flt(gl[2]), 'credit' : flt(gl[1]), 'remarks': self.doc.cancel_reason, 'voucher_type': self.doc.doctype, 'voucher_no': self.doc.name, 'transaction_date': self.doc.transaction_date, 'posting_date': self.doc.posting_date, 'fiscal_year': self.doc.fiscal_year, 'against_voucher': '', 'against_voucher_type': '', 'company': self.doc.company, 'is_opening': 'No', 'aging_date': 'self.doc.posting_date'}
+ fdict = {'account': gl[0], 'cost_center': '', 'against': '', 'debit': flt(gl[2]), 'credit' : flt(gl[1]), 'remarks': "cancelled", 'voucher_type': self.doc.doctype, 'voucher_no': self.doc.name, 'transaction_date': self.doc.transaction_date, 'posting_date': self.doc.posting_date, 'fiscal_year': self.doc.fiscal_year, 'against_voucher': '', 'against_voucher_type': '', 'company': self.doc.company, 'is_opening': 'No', 'aging_date': 'self.doc.posting_date'}
self.save_entry(fdict, is_cancel = 'Yes')
# Update is_cancelled = 'Yes' to all gl entries for current voucher
diff --git a/accounts/doctype/period_closing_voucher/period_closing_voucher.txt b/accounts/doctype/period_closing_voucher/period_closing_voucher.txt
index d7ac07a..ac4b71d 100644
--- a/accounts/doctype/period_closing_voucher/period_closing_voucher.txt
+++ b/accounts/doctype/period_closing_voucher/period_closing_voucher.txt
@@ -2,7 +2,7 @@
{
"creation": "2013-01-10 16:34:07",
"docstatus": 0,
- "modified": "2013-01-22 14:47:50",
+ "modified": "2013-06-11 16:04:45",
"modified_by": "Administrator",
"owner": "jai@webnotestech.com"
},
@@ -87,16 +87,6 @@
},
{
"doctype": "DocField",
- "fieldname": "amendment_date",
- "fieldtype": "Date",
- "label": "Amendment Date",
- "no_copy": 1,
- "oldfieldname": "amendment_date",
- "oldfieldtype": "Date",
- "read_only": 1
- },
- {
- "doctype": "DocField",
"fieldname": "company",
"fieldtype": "Select",
"label": "Company",
@@ -139,17 +129,6 @@
"reqd": 1
},
{
- "doctype": "DocField",
- "fieldname": "cancel_reason",
- "fieldtype": "Small Text",
- "hidden": 1,
- "label": "Cancel Reason",
- "oldfieldname": "cancel_reason",
- "oldfieldtype": "Small Text",
- "print_hide": 1,
- "search_index": 0
- },
- {
"doctype": "DocPerm",
"role": "System Manager"
},
diff --git a/accounts/doctype/pos_setting/README.md b/accounts/doctype/pos_setting/README.md
new file mode 100644
index 0000000..2ddef78
--- /dev/null
+++ b/accounts/doctype/pos_setting/README.md
@@ -0,0 +1 @@
+Standard settings for Point of Sales (POS) type of Sales Invoice.
\ No newline at end of file
diff --git a/accounts/doctype/pos_setting/pos_setting.txt b/accounts/doctype/pos_setting/pos_setting.txt
index 788af9e..accb29e 100755
--- a/accounts/doctype/pos_setting/pos_setting.txt
+++ b/accounts/doctype/pos_setting/pos_setting.txt
@@ -1,8 +1,8 @@
[
{
- "creation": "2013-05-09 13:16:11",
+ "creation": "2013-05-24 12:15:51",
"docstatus": 0,
- "modified": "2013-05-23 12:52:09",
+ "modified": "2013-05-30 12:09:39",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -18,8 +18,7 @@
"parent": "POS Setting",
"parentfield": "fields",
"parenttype": "DocType",
- "permlevel": 0,
- "read_only": 0
+ "permlevel": 0
},
{
"doctype": "DocPerm",
@@ -44,7 +43,8 @@
"label": "User",
"oldfieldname": "user",
"oldfieldtype": "Link",
- "options": "Profile"
+ "options": "Profile",
+ "read_only": 0
},
{
"doctype": "DocField",
@@ -54,6 +54,7 @@
"oldfieldname": "territory",
"oldfieldtype": "Link",
"options": "Territory",
+ "read_only": 0,
"reqd": 1
},
{
@@ -64,6 +65,7 @@
"no_copy": 1,
"oldfieldname": "naming_series",
"oldfieldtype": "Select",
+ "read_only": 0,
"reqd": 1
},
{
@@ -74,6 +76,7 @@
"oldfieldname": "currency",
"oldfieldtype": "Select",
"options": "Currency",
+ "read_only": 0,
"reqd": 1
},
{
@@ -84,6 +87,7 @@
"label": "Conversion Rate",
"oldfieldname": "conversion_rate",
"oldfieldtype": "Currency",
+ "read_only": 0,
"reqd": 1
},
{
@@ -94,6 +98,7 @@
"oldfieldname": "price_list_name",
"oldfieldtype": "Select",
"options": "link:Price List",
+ "read_only": 0,
"reqd": 1
},
{
@@ -105,13 +110,24 @@
"oldfieldname": "company",
"oldfieldtype": "Link",
"options": "Company",
+ "read_only": 0,
"reqd": 1
},
{
"doctype": "DocField",
"fieldname": "column_break0",
"fieldtype": "Column Break",
- "oldfieldtype": "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",
@@ -121,6 +137,7 @@
"oldfieldname": "customer_account",
"oldfieldtype": "Link",
"options": "Account",
+ "read_only": 0,
"reqd": 0
},
{
@@ -131,6 +148,7 @@
"oldfieldname": "cash_bank_account",
"oldfieldtype": "Link",
"options": "Account",
+ "read_only": 0,
"reqd": 1
},
{
@@ -141,6 +159,7 @@
"oldfieldname": "income_account",
"oldfieldtype": "Link",
"options": "Account",
+ "read_only": 0,
"reqd": 1
},
{
@@ -152,6 +171,7 @@
"label": "Expense Account",
"options": "Account",
"print_hide": 1,
+ "read_only": 0,
"reqd": 0
},
{
@@ -162,6 +182,7 @@
"oldfieldname": "warehouse",
"oldfieldtype": "Link",
"options": "Warehouse",
+ "read_only": 0,
"reqd": 1
},
{
@@ -172,6 +193,7 @@
"oldfieldname": "cost_center",
"oldfieldtype": "Link",
"options": "Cost Center",
+ "read_only": 0,
"reqd": 1
},
{
@@ -181,7 +203,8 @@
"label": "Charge",
"oldfieldname": "charge",
"oldfieldtype": "Link",
- "options": "Sales Taxes and Charges Master"
+ "options": "Sales Taxes and Charges Master",
+ "read_only": 0
},
{
"doctype": "DocField",
@@ -191,7 +214,8 @@
"oldfieldname": "letter_head",
"oldfieldtype": "Select",
"options": "link:Letter Head",
- "print_hide": 1
+ "print_hide": 1,
+ "read_only": 0
},
{
"doctype": "DocField",
@@ -200,7 +224,8 @@
"label": "Terms and Conditions",
"oldfieldname": "tc_name",
"oldfieldtype": "Link",
- "options": "Terms and Conditions"
+ "options": "Terms and Conditions",
+ "read_only": 0
},
{
"doctype": "DocField",
@@ -210,17 +235,10 @@
"label": "Select Print Heading",
"oldfieldname": "select_print_heading",
"oldfieldtype": "Select",
- "options": "link:Print Heading"
+ "options": "link:Print Heading",
+ "read_only": 0
},
{
- "cancel": 1,
- "create": 1,
- "doctype": "DocPerm",
- "role": "System Manager",
- "write": 1
- },
- {
- "cancel": 1,
"create": 1,
"doctype": "DocPerm",
"role": "Accounts Manager",
diff --git a/accounts/doctype/purchase_invoice/README.md b/accounts/doctype/purchase_invoice/README.md
new file mode 100644
index 0000000..4845d5d
--- /dev/null
+++ b/accounts/doctype/purchase_invoice/README.md
@@ -0,0 +1 @@
+Itemized invoice raised by Supplier.
\ No newline at end of file
diff --git a/accounts/doctype/purchase_invoice/purchase_invoice.js b/accounts/doctype/purchase_invoice/purchase_invoice.js
index 92f1748..c6a787e 100644
--- a/accounts/doctype/purchase_invoice/purchase_invoice.js
+++ b/accounts/doctype/purchase_invoice/purchase_invoice.js
@@ -17,86 +17,56 @@
cur_frm.cscript.tname = "Purchase Invoice Item";
cur_frm.cscript.fname = "entries";
cur_frm.cscript.other_fname = "purchase_tax_details";
+
+wn.provide("erpnext.accounts");
wn.require('app/accounts/doctype/purchase_taxes_and_charges_master/purchase_taxes_and_charges_master.js');
wn.require('app/buying/doctype/purchase_common/purchase_common.js');
-erpnext.buying.PurchaseInvoiceController = erpnext.buying.BuyingController.extend({
+erpnext.accounts.PurchaseInvoiceController = erpnext.buying.BuyingController.extend({
+ onload: function() {
+ this._super();
+
+ if(!this.frm.doc.__islocal) {
+ // show credit_to in print format
+ if(!this.frm.doc.supplier && this.frm.doc.credit_to) {
+ this.frm.set_df_property("credit_to", "print_hide", 0);
+ }
+ }
+ },
+
refresh: function(doc) {
this._super();
// Show / Hide button
if(doc.docstatus==1 && doc.outstanding_amount > 0)
- cur_frm.add_custom_button('Make Payment Entry', cur_frm.cscript.make_bank_voucher);
+ this.frm.add_custom_button('Make Payment Entry', this.make_bank_voucher);
if(doc.docstatus==1) {
- cur_frm.add_custom_button('View Ledger', cur_frm.cscript.view_ledger_entry);
+ this.frm.add_custom_button('View Ledger', this.view_ledger_entry);
}
- cur_frm.cscript.is_opening(doc);
+ this.is_opening(doc);
},
- onload_post_render: function(doc, dt, dn) {
- var me = this;
- var callback1 = function(doc, dt, dn) {
- var callback2 = function(doc, dt, dn) {
- if(doc.__islocal && doc.supplier) cur_frm.cscript.supplier(doc, dt, dn);
- }
- me.update_item_details(doc, dt, dn, callback2);
- }
-
- // TODO: improve this
- if(this.frm.doc.__islocal) {
- if (this.frm.fields_dict.price_list_name && this.frm.doc.price_list_name) {
- this.price_list_name(callback1);
- } else {
- callback1(doc, dt, dn);
- }
- }
+
+ credit_to: function() {
+ this.supplier();
+ },
+
+ write_off_amount: function() {
+ this.calculate_outstanding_amount();
+ this.frm.refresh_fields();
+ },
+
+ allocated_amount: function() {
+ this.calculate_total_advance("Purchase Invoice", "advance_allocation_details");
+ this.frm.refresh_fields();
}
});
-var new_cscript = new erpnext.buying.PurchaseInvoiceController({frm: cur_frm});
-
// for backward compatibility: combine new and previous states
-$.extend(cur_frm.cscript, new_cscript);
+$.extend(cur_frm.cscript, new erpnext.accounts.PurchaseInvoiceController({frm: cur_frm}));
-cur_frm.cscript.onload = function(doc,dt,dn) {
- if(!doc.posting_date) set_multiple(dt,dn,{posting_date:get_today()});
-}
-
-cur_frm.cscript.supplier = function(doc,dt,dn) {
- var callback = function(r,rt) {
- var doc = locals[cur_frm.doctype][cur_frm.docname];
- get_server_fields('get_credit_to','','',doc, dt, dn, 0, callback2);
- }
-
- var callback2 = function(r,rt){
- var doc = locals[cur_frm.doctype][cur_frm.docname];
- var el = getchildren('Purchase Invoice Item',doc.name,'entries');
- for(var i in el){
- if(el[i].item_code && (!el[i].expense_head || !el[i].cost_center)){
- args = {
- item_code: el[i].item_code,
- expense_head: el[i].expense_head,
- cost_center: el[i].cost_center
- };
- get_server_fields('get_default_values', JSON.stringify(args), 'entries', doc, el[i].doctype, el[i].name, 1);
- }
- }
- cur_frm.cscript.calc_amount(doc, 1);
- }
-
- if (doc.supplier) {
- get_server_fields('get_default_supplier_address',
- JSON.stringify({ supplier: doc.supplier }),'', doc, dt, dn, 1, function(doc, dt, dn) {
- cur_frm.refresh();
- callback(doc, dt, dn);
- });
- unhide_field(['supplier_address','contact_person']);
- }
-
-}
-
cur_frm.cscript.supplier_address = cur_frm.cscript.contact_person = function(doc,dt,dn) {
if(doc.supplier) get_server_fields('get_supplier_address', JSON.stringify({supplier: doc.supplier, address: doc.supplier_address, contact: doc.contact_person}),'', doc, dt, dn, 1);
}
@@ -112,23 +82,6 @@
}
-cur_frm.cscript.credit_to = function(doc,dt,dn) {
-
- var callback = function(doc, dt, dn) {
- var doc = locals[doc.doctype][doc.name];
- if(doc.supplier) {
- get_server_fields('get_default_supplier_address',
- JSON.stringify({ supplier: doc.supplier }), '', doc, dt, dn, 1, function() {
- cur_frm.refresh();
- });
- unhide_field(['supplier_address','contact_person']);
- }
- cur_frm.refresh();
- }
-
- get_server_fields('get_cust', '', '', doc, dt, dn, 1, callback);
-}
-
cur_frm.fields_dict['entries'].grid.onrowadd = function(doc, cdt, cdn){
cl = getchildren('Purchase Invoice Item', doc.name, cur_frm.cscript.fname, doc.doctype);
@@ -152,17 +105,6 @@
if (doc.is_opening == 'Yes') unhide_field('aging_date');
}
-cur_frm.cscript.write_off_amount = function(doc) {
- doc.total_amount_to_pay = flt(doc.grand_total) - flt(doc.write_off_amount);
- doc.outstanding_amount = flt(doc.total_amount_to_pay) - flt(doc.total_advance);
- refresh_many(['outstanding_amount', 'total_amount_to_pay']);
-}
-
-cur_frm.cscript.recalculate = function(doc, cdt, cdn) {
- cur_frm.cscript.calculate_tax(doc,cdt,cdn);
- calc_total_advance(doc,cdt,cdn);
-}
-
cur_frm.cscript.get_items = function(doc, dt, dn) {
var callback = function(r,rt) {
unhide_field(['supplier_address', 'contact_person']);
@@ -171,11 +113,6 @@
$c_obj(make_doclist(dt,dn),'pull_details','',callback);
}
-cur_frm.cscript.allocated_amount = function(doc,cdt,cdn) {
- calc_total_advance(doc, cdt, cdn);
-}
-
-
cur_frm.cscript.make_bank_voucher = function() {
wn.call({
method: "accounts.doctype.journal_voucher.journal_voucher.get_default_bank_cash_account",
@@ -261,21 +198,6 @@
refresh_field('entries');
}
-calc_total_advance = function(doc,cdt,cdn) {
- var doc = locals[doc.doctype][doc.name];
- var el = getchildren('Purchase Invoice Advance',doc.name,'advance_allocation_details')
- var total_advance = 0;
- for(var i in el) {
- if (! el[i].allocated_amount == 0) {
- total_advance += flt(el[i].allocated_amount);
- }
- }
- doc.total_amount_to_pay = flt(doc.grand_total) - flt(doc.write_off_amount);
- doc.total_advance = flt(total_advance);
- doc.outstanding_amount = flt(doc.total_amount_to_pay) - flt(total_advance);
- refresh_many(['total_advance','outstanding_amount', 'total_amount_to_pay']);
-}
-
cur_frm.cscript.make_jv = function(doc, dt, dn, bank_account) {
var jv = wn.model.make_new_doc_and_get_name('Journal Voucher');
jv = locals['Journal Voucher'][jv];
diff --git a/accounts/doctype/purchase_invoice/purchase_invoice.py b/accounts/doctype/purchase_invoice/purchase_invoice.py
index 32a46cf..56d6075 100644
--- a/accounts/doctype/purchase_invoice/purchase_invoice.py
+++ b/accounts/doctype/purchase_invoice/purchase_invoice.py
@@ -33,6 +33,28 @@
self.doc, self.doclist = d, dl
self.tname = 'Purchase Invoice Item'
self.fname = 'entries'
+ self.status_updater = [{
+ 'source_dt': 'Purchase Invoice Item',
+ 'target_dt': 'Purchase Order Item',
+ 'join_field': 'po_detail',
+ 'target_field': 'billed_amt',
+ 'target_parent_dt': 'Purchase Order',
+ 'target_parent_field': 'per_billed',
+ 'target_ref_field': 'import_amount',
+ 'source_field': 'import_amount',
+ 'percent_join_field': 'purchase_order',
+ },
+ {
+ 'source_dt': 'Purchase Invoice Item',
+ 'target_dt': 'Purchase Receipt Item',
+ 'join_field': 'pr_detail',
+ 'target_field': 'billed_amt',
+ 'target_parent_dt': 'Purchase Receipt',
+ 'target_parent_field': 'per_billed',
+ 'target_ref_field': 'import_amount',
+ 'source_field': 'import_amount',
+ 'percent_join_field': 'purchase_receipt',
+ }]
def validate(self):
super(DocType, self).validate()
@@ -91,6 +113,11 @@
msgprint("%s does not have an Account Head in %s. You must first create it from the Supplier Master" % (self.doc.supplier, self.doc.company))
return ret
+ def set_supplier_defaults(self):
+ self.doc.fields.update(self.get_cust())
+ self.doc.fields.update(self.get_credit_to())
+ super(DocType, self).set_supplier_defaults()
+
def get_cust(self):
ret = {}
if self.doc.credit_to:
@@ -100,31 +127,6 @@
return ret
- def get_default_values(self, args):
- if isinstance(args, basestring):
- import json
- args = json.loads(args)
-
- out = webnotes._dict()
-
- item = webnotes.conn.sql("""select name, purchase_account, cost_center,
- is_stock_item from `tabItem` where name=%s""", args.get("item_code"), as_dict=1)
-
- if item and item[0]:
- item = item[0]
-
- if cint(webnotes.defaults.get_global_default("auto_inventory_accounting")) and \
- item.is_stock_item == "Yes":
- # unset expense head for stock item and auto inventory accounting
- out.expense_head = out.cost_center = None
- else:
- if not args.get("expense_head"):
- out.expense_head = item.purchase_account
- if not args.get("cost_center"):
- out.cost_center = item.cost_center
-
- return out
-
def pull_details(self):
if self.doc.purchase_receipt_main:
self.validate_duplicate_docname('purchase_receipt')
@@ -152,14 +154,6 @@
def get_rate(self,arg):
return get_obj('Purchase Common').get_rate(arg,self)
- def load_default_taxes(self):
- self.doclist = get_obj('Purchase Common').load_default_taxes(self)
-
-
- def get_purchase_tax_details(self):
- self.doclist = get_obj('Purchase Common').get_purchase_tax_details(self)
-
-
def get_rate1(self,acc):
rate = sql("select tax_rate from `tabAccount` where name='%s'"%(acc))
ret={'add_tax_rate' :rate and flt(rate[0][0]) or 0 }
@@ -411,8 +405,8 @@
self.make_gl_entries()
self.update_against_document_in_jv()
- purchase_controller.update_prevdoc_detail(self, is_submit = 1)
-
+
+ self.update_prevdoc_status()
def make_gl_entries(self):
from accounts.general_ledger import make_gl_entries
@@ -466,8 +460,9 @@
# expense will be booked in sales invoice
stock_item_and_auto_inventory_accounting = True
- valuation_amt = (flt(item.amount) + flt(item.item_tax_amount) +
- flt(item.rm_supp_cost))
+ valuation_amt = (flt(item.amount, self.precision("amount", item)) +
+ flt(item.item_tax_amount, self.precision("item_tax_amount", item)) +
+ flt(item.rm_supp_cost, self.precision("rm_supp_cost", item)))
gl_entries.append(
self.get_gl_dict({
@@ -522,7 +517,8 @@
def on_cancel(self):
from accounts.utils import remove_against_link_from_jv
remove_against_link_from_jv(self.doc.doctype, self.doc.name, "against_voucher")
- get_obj(dt = 'Purchase Common').update_prevdoc_detail(self, is_submit = 0)
+
+ self.update_prevdoc_status()
self.make_cancel_gl_entries()
diff --git a/accounts/doctype/purchase_invoice/purchase_invoice.txt b/accounts/doctype/purchase_invoice/purchase_invoice.txt
index 283c612..c3b5061 100755
--- a/accounts/doctype/purchase_invoice/purchase_invoice.txt
+++ b/accounts/doctype/purchase_invoice/purchase_invoice.txt
@@ -1,8 +1,8 @@
[
{
- "creation": "2013-05-07 13:50:30",
+ "creation": "2013-05-21 16:16:39",
"docstatus": 0,
- "modified": "2013-05-13 11:12:56",
+ "modified": "2013-06-11 16:16:38",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -89,10 +89,11 @@
"read_only": 0
},
{
+ "depends_on": "supplier",
"doctype": "DocField",
"fieldname": "supplier_name",
"fieldtype": "Text",
- "hidden": 1,
+ "hidden": 0,
"in_list_view": 1,
"label": "Name",
"oldfieldname": "supplier_name",
@@ -100,34 +101,38 @@
"read_only": 1
},
{
+ "depends_on": "supplier",
"doctype": "DocField",
"fieldname": "address_display",
"fieldtype": "Small Text",
- "hidden": 1,
+ "hidden": 0,
"label": "Address",
"read_only": 1
},
{
+ "depends_on": "supplier",
"doctype": "DocField",
"fieldname": "contact_display",
"fieldtype": "Small Text",
- "hidden": 1,
+ "hidden": 0,
"label": "Contact",
"read_only": 1
},
{
+ "depends_on": "supplier",
"doctype": "DocField",
"fieldname": "contact_mobile",
"fieldtype": "Text",
- "hidden": 1,
+ "hidden": 0,
"label": "Mobile No",
"read_only": 1
},
{
+ "depends_on": "supplier",
"doctype": "DocField",
"fieldname": "contact_email",
"fieldtype": "Text",
- "hidden": 1,
+ "hidden": 0,
"label": "Contact Email",
"print_hide": 1,
"read_only": 1
@@ -392,6 +397,7 @@
"read_only": 1
},
{
+ "depends_on": "supplier",
"doctype": "DocField",
"fieldname": "contact_section",
"fieldtype": "Section Break",
@@ -399,7 +405,6 @@
"read_only": 0
},
{
- "depends_on": "eval:doc.supplier",
"doctype": "DocField",
"fieldname": "supplier_address",
"fieldtype": "Link",
@@ -415,7 +420,6 @@
"width": "50%"
},
{
- "depends_on": "eval:doc.supplier",
"doctype": "DocField",
"fieldname": "contact_person",
"fieldtype": "Link",
@@ -670,6 +674,32 @@
},
{
"doctype": "DocField",
+ "fieldname": "terms_section_break",
+ "fieldtype": "Section Break",
+ "label": "Terms and Conditions"
+ },
+ {
+ "doctype": "DocField",
+ "fieldname": "tc_name",
+ "fieldtype": "Link",
+ "label": "Select Terms and Conditions",
+ "options": "Terms and Conditions",
+ "print_hide": 1
+ },
+ {
+ "doctype": "DocField",
+ "fieldname": "get_terms",
+ "fieldtype": "Button",
+ "label": "Get Terms and Conditions"
+ },
+ {
+ "doctype": "DocField",
+ "fieldname": "terms",
+ "fieldtype": "Text Editor",
+ "label": "Terms and Conditions1"
+ },
+ {
+ "doctype": "DocField",
"fieldname": "more_info",
"fieldtype": "Section Break",
"label": "More Info",
@@ -786,18 +816,6 @@
"search_index": 1
},
{
- "depends_on": "eval:!doc.__islocal",
- "doctype": "DocField",
- "fieldname": "cancel_reason",
- "fieldtype": "Data",
- "label": "Cancel Reason",
- "no_copy": 1,
- "oldfieldname": "cancel_reason",
- "oldfieldtype": "Data",
- "print_hide": 1,
- "read_only": 1
- },
- {
"doctype": "DocField",
"fieldname": "remarks",
"fieldtype": "Small Text",
diff --git a/accounts/doctype/purchase_invoice/test_purchase_invoice.py b/accounts/doctype/purchase_invoice/test_purchase_invoice.py
index a70c932..2ae569b 100644
--- a/accounts/doctype/purchase_invoice/test_purchase_invoice.py
+++ b/accounts/doctype/purchase_invoice/test_purchase_invoice.py
@@ -24,6 +24,7 @@
import webnotes.defaults
test_dependencies = ["Item", "Cost Center"]
+test_ignore = ["Serial No"]
class TestPurchaseInvoice(unittest.TestCase):
def test_gl_entries_without_auto_inventory_accounting(self):
@@ -119,25 +120,6 @@
wrapper.insert()
wrapper.load_from_db()
- self.assertEqual(wrapper.doclist[0].net_total, 1250)
-
- # tax amounts
- expected_values = [
- ["_Test Account Shipping Charges - _TC", 100, 1350],
- ["_Test Account Customs Duty - _TC", 125, 1350],
- ["_Test Account Excise Duty - _TC", 140, 1490],
- ["_Test Account Education Cess - _TC", 2.8, 1492.8],
- ["_Test Account S&H Education Cess - _TC", 1.4, 1494.2],
- ["_Test Account CST - _TC", 29.88, 1524.08],
- ["_Test Account VAT - _TC", 156.25, 1680.33],
- ["_Test Account Discount - _TC", 168.03, 1512.30],
- ]
-
- for i, tax in enumerate(wrapper.doclist.get({"parentfield": "purchase_tax_details"})):
- self.assertEqual(tax.account_head, expected_values[i][0])
- self.assertEqual(tax.tax_amount, expected_values[i][1])
- self.assertEqual(tax.total, expected_values[i][2])
-
expected_values = [
["_Test Item Home Desktop 100", 90, 59],
["_Test Item Home Desktop 200", 135, 177]
@@ -147,13 +129,41 @@
self.assertEqual(item.item_tax_amount, expected_values[i][1])
self.assertEqual(item.valuation_rate, expected_values[i][2])
+ self.assertEqual(wrapper.doclist[0].net_total, 1250)
+
+ # tax amounts
+ expected_values = [
+ ["_Test Account Shipping Charges - _TC", 100, 1350],
+ ["_Test Account Customs Duty - _TC", 125, 1350],
+ ["_Test Account Excise Duty - _TC", 140, 1490],
+ ["_Test Account Education Cess - _TC", 2.8, 1492.8],
+ ["_Test Account S&H Education Cess - _TC", 1.4, 1494.2],
+ ["_Test Account CST - _TC", 29.88, 1524.08],
+ ["_Test Account VAT - _TC", 156.25, 1680.33],
+ ["_Test Account Discount - _TC", 168.03, 1512.30],
+ ]
+
+ for i, tax in enumerate(wrapper.doclist.get({"parentfield": "purchase_tax_details"})):
+ self.assertEqual(tax.account_head, expected_values[i][0])
+ self.assertEqual(tax.tax_amount, expected_values[i][1])
+ self.assertEqual(tax.total, expected_values[i][2])
+
def test_purchase_invoice_with_subcontracted_item(self):
wrapper = webnotes.bean(copy=test_records[0])
wrapper.doclist[1].item_code = "_Test FG Item"
wrapper.run_method("calculate_taxes_and_totals")
wrapper.insert()
wrapper.load_from_db()
-
+
+ expected_values = [
+ ["_Test FG Item", 90, 7059],
+ ["_Test Item Home Desktop 200", 135, 177]
+ ]
+ for i, item in enumerate(wrapper.doclist.get({"parentfield": "entries"})):
+ self.assertEqual(item.item_code, expected_values[i][0])
+ self.assertEqual(item.item_tax_amount, expected_values[i][1])
+ self.assertEqual(item.valuation_rate, expected_values[i][2])
+
self.assertEqual(wrapper.doclist[0].net_total, 1250)
# tax amounts
@@ -172,15 +182,6 @@
self.assertEqual(tax.account_head, expected_values[i][0])
self.assertEqual(tax.tax_amount, expected_values[i][1])
self.assertEqual(tax.total, expected_values[i][2])
-
- expected_values = [
- ["_Test FG Item", 90, 7059],
- ["_Test Item Home Desktop 200", 135, 177]
- ]
- for i, item in enumerate(wrapper.doclist.get({"parentfield": "entries"})):
- self.assertEqual(item.item_code, expected_values[i][0])
- self.assertEqual(item.item_tax_amount, expected_values[i][1])
- self.assertEqual(item.valuation_rate, expected_values[i][2])
def test_purchase_invoice_with_advance(self):
from accounts.doctype.journal_voucher.test_journal_voucher \
diff --git a/accounts/doctype/purchase_invoice_advance/README.md b/accounts/doctype/purchase_invoice_advance/README.md
new file mode 100644
index 0000000..974900c
--- /dev/null
+++ b/accounts/doctype/purchase_invoice_advance/README.md
@@ -0,0 +1 @@
+Detail of advance paid against Purchase Invoice.
\ No newline at end of file
diff --git a/accounts/doctype/purchase_invoice_item/README.md b/accounts/doctype/purchase_invoice_item/README.md
new file mode 100644
index 0000000..e490189
--- /dev/null
+++ b/accounts/doctype/purchase_invoice_item/README.md
@@ -0,0 +1 @@
+Item detail in parent Purchase Invoice.
\ No newline at end of file
diff --git a/accounts/doctype/purchase_taxes_and_charges/README.md b/accounts/doctype/purchase_taxes_and_charges/README.md
new file mode 100644
index 0000000..7528a85
--- /dev/null
+++ b/accounts/doctype/purchase_taxes_and_charges/README.md
@@ -0,0 +1 @@
+Tax details for all Purchase Transactions.
\ No newline at end of file
diff --git a/accounts/doctype/purchase_taxes_and_charges/purchase_taxes_and_charges.txt b/accounts/doctype/purchase_taxes_and_charges/purchase_taxes_and_charges.txt
index 619aed1..d6d2a92 100644
--- a/accounts/doctype/purchase_taxes_and_charges/purchase_taxes_and_charges.txt
+++ b/accounts/doctype/purchase_taxes_and_charges/purchase_taxes_and_charges.txt
@@ -1,8 +1,8 @@
[
{
- "creation": "2013-04-19 11:00:06",
+ "creation": "2013-05-21 16:16:04",
"docstatus": 0,
- "modified": "2013-05-07 11:23:56",
+ "modified": "2013-05-28 12:02:02",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -101,7 +101,7 @@
"oldfieldname": "tax_amount",
"oldfieldtype": "Currency",
"options": "Company:company:default_currency",
- "read_only": 0,
+ "read_only": 1,
"reqd": 0
},
{
@@ -159,35 +159,5 @@
"print_hide": 1,
"read_only": 0,
"search_index": 0
- },
- {
- "description": "Cheating Field\nPlease do not delete ",
- "doctype": "DocField",
- "fieldname": "total_tax_amount",
- "fieldtype": "Currency",
- "hidden": 1,
- "label": "Total +Tax",
- "no_copy": 1,
- "oldfieldname": "total_tax_amount",
- "oldfieldtype": "Currency",
- "options": "Company:company:default_currency",
- "print_hide": 1,
- "read_only": 0,
- "report_hide": 1
- },
- {
- "description": "Cheating Field\nPlease do not delete ",
- "doctype": "DocField",
- "fieldname": "total_amount",
- "fieldtype": "Currency",
- "hidden": 1,
- "label": "Tax Amount",
- "no_copy": 1,
- "oldfieldname": "total_amount",
- "oldfieldtype": "Currency",
- "options": "Company:company:default_currency",
- "print_hide": 1,
- "read_only": 0,
- "report_hide": 1
}
]
\ No newline at end of file
diff --git a/accounts/doctype/purchase_taxes_and_charges_master/README.md b/accounts/doctype/purchase_taxes_and_charges_master/README.md
new file mode 100644
index 0000000..20f481a
--- /dev/null
+++ b/accounts/doctype/purchase_taxes_and_charges_master/README.md
@@ -0,0 +1 @@
+Template for tax structure in purchase transactions.
\ No newline at end of file
diff --git a/accounts/doctype/sales_invoice/README.md b/accounts/doctype/sales_invoice/README.md
new file mode 100644
index 0000000..9593147
--- /dev/null
+++ b/accounts/doctype/sales_invoice/README.md
@@ -0,0 +1 @@
+Itemized invoice raised to Customers.
\ No newline at end of file
diff --git a/accounts/doctype/sales_invoice/sales_invoice.js b/accounts/doctype/sales_invoice/sales_invoice.js
index be6ec3d..f776db5 100644
--- a/accounts/doctype/sales_invoice/sales_invoice.js
+++ b/accounts/doctype/sales_invoice/sales_invoice.js
@@ -22,52 +22,90 @@
// print heading
cur_frm.pformat.print_heading = 'Invoice';
-wn.require('app/selling/doctype/sales_common/sales_common.js');
wn.require('app/accounts/doctype/sales_taxes_and_charges_master/sales_taxes_and_charges_master.js');
wn.require('app/utilities/doctype/sms_control/sms_control.js');
+wn.require('app/selling/doctype/sales_common/sales_common.js');
-// On Load
-// -------
-cur_frm.cscript.onload = function(doc,dt,dn) {
- cur_frm.cscript.manage_rounded_total();
- if(!doc.customer && doc.debit_to) wn.meta.get_docfield(dt, 'debit_to', dn).print_hide = 0;
- if (doc.__islocal) {
- if(!doc.due_date) set_multiple(dt,dn,{due_date:get_today()});
- if(!doc.posting_date) set_multiple(dt,dn,{posting_date:get_today()});
- if(!doc.currency && sys_defaults.currency) set_multiple(dt,dn,{currency:sys_defaults.currency});
- if(!doc.price_list_currency) set_multiple(dt, dn, {price_list_currency: doc.currency, plc_conversion_rate: 1});
-
- }
-}
-
-cur_frm.cscript.onload_post_render = function(doc, dt, dn) {
- var callback = function(doc, dt, dn) {
- // called from mapper, update the account names for items and customer
- var callback2 = function(doc, dt, dn) {
- if(doc.customer && doc.__islocal) {
- $c_obj(make_doclist(doc.doctype,doc.name),
- 'load_default_accounts','',
- function(r,rt) {
- refresh_field('entries');
- cur_frm.cscript.customer(doc,dt,dn,onload=true);
- }
- );
+wn.provide("erpnext.accounts");
+erpnext.accounts.SalesInvoiceController = erpnext.selling.SellingController.extend({
+ onload: function() {
+ this._super();
+
+ if(!this.frm.doc.__islocal) {
+ // show debit_to in print format
+ if(!this.frm.doc.customer && this.frm.doc.debit_to) {
+ this.frm.set_df_property("debit_to", "print_hide", 0);
}
}
- // defined in sales_common.js
- var callback1 = function(doc, dt, dn) {
- //for previously created sales invoice, set required field related to pos
- cur_frm.cscript.update_item_details(doc, dt, dn, callback2);
+ },
+
+ refresh: function(doc, dt, dn) {
+ this._super();
+
+ cur_frm.cscript.is_opening(doc, dt, dn);
+
+ if(doc.docstatus==1) {
+ cur_frm.add_custom_button('View Ledger', cur_frm.cscript.view_ledger_entry);
+ cur_frm.add_custom_button('Send SMS', cur_frm.cscript.send_sms);
+
+ if(doc.is_pos==1 && doc.update_stock!=1)
+ cur_frm.add_custom_button('Make Delivery', cur_frm.cscript['Make Delivery Note']);
+
+ if(doc.outstanding_amount!=0)
+ cur_frm.add_custom_button('Make Payment Entry', cur_frm.cscript.make_bank_voucher);
+ }
+ cur_frm.cscript.hide_fields(doc, dt, dn);
+ },
+
+ is_pos: function() {
+ if(cint(this.frm.doc.is_pos)) {
+ if(!this.frm.doc.company) {
+ this.frm.set_value("is_pos", 0);
+ msgprint(wn._("Please specify Company to proceed"));
+ } else {
+ var me = this;
+ this.frm.call({
+ doc: me.frm.doc,
+ method: "set_missing_values",
+ });
+ }
}
- if(doc.is_pos ==1) cur_frm.cscript.is_pos(doc, dt, dn,callback1);
- else cur_frm.cscript.update_item_details(doc, dt, dn, callback2);
- }
+ // TODO toggle display of fields
+ },
+
+ debit_to: function() {
+ this.customer();
+ },
+
+ allocated_amount: function() {
+ this.calculate_total_advance("Sales Invoice", "advance_adjustment_details");
+ this.frm.refresh_fields();
+ },
+
+ write_off_outstanding_amount_automatically: function() {
+ if(cint(this.frm.doc.write_off_outstanding_amount_automatically)) {
+ wn.model.round_floats_in(this.frm.doc, ["grand_total", "paid_amount"]);
+ // this will make outstanding amount 0
+ this.frm.set_value("write_off_amount",
+ flt(this.frm.doc.grand_total - this.frm.doc.paid_amount), precision("write_off_amount"));
+ }
+
+ this.frm.runclientscript("write_off_amount");
+ },
+
+ write_off_amount: function() {
+ this.calculate_outstanding_amount();
+ this.frm.refresh_fields();
+ },
+
+ paid_amount: function() {
+ this.write_off_outstanding_amount_automatically();
+ },
+});
- cur_frm.cscript.hide_price_list_currency(doc, dt, dn, callback);
-
-}
-
+// for backward compatibility: combine new and previous states
+$.extend(cur_frm.cscript, new erpnext.accounts.SalesInvoiceController({frm: cur_frm}));
// Hide Fields
// ------------
@@ -87,15 +125,12 @@
hide_field(par_flds);
unhide_field('payments_section');
for(f in item_flds_normal) cur_frm.fields_dict['entries'].grid.set_column_disp(item_flds_normal[f], false);
- for(f in item_flds_pos) cur_frm.fields_dict['entries'].grid.set_column_disp(item_flds_pos[f], (doc.update_stock==1?true:false));
} else {
hide_field('payments_section');
unhide_field(par_flds);
for(f in item_flds_normal) cur_frm.fields_dict['entries'].grid.set_column_disp(item_flds_normal[f], true);
- for(f in item_flds_pos) cur_frm.fields_dict['entries'].grid.set_column_disp(item_flds_pos[f], false);
}
-
- cur_frm.toggle_display("contact_section", doc.customer);
+ for(f in item_flds_pos) cur_frm.fields_dict['entries'].grid.set_column_disp(item_flds_pos[f], (cint(doc.update_stock)==1?true:false));
// India related fields
var cp = wn.control_panel;
@@ -104,50 +139,6 @@
}
-// Refresh
-// -------
-cur_frm.cscript.refresh = function(doc, dt, dn) {
- cur_frm.cscript.is_opening(doc, dt, dn);
- erpnext.hide_naming_series();
-
- // Show / Hide button
- cur_frm.clear_custom_buttons();
- if (!cur_frm.cscript.is_onload) cur_frm.cscript.hide_price_list_currency(doc, dt, dn);
-
- if(doc.docstatus==1) {
- cur_frm.add_custom_button('View Ledger', cur_frm.cscript.view_ledger_entry);
- cur_frm.add_custom_button('Send SMS', cur_frm.cscript.send_sms);
-
- if(doc.is_pos==1 && doc.update_stock!=1)
- cur_frm.add_custom_button('Make Delivery', cur_frm.cscript['Make Delivery Note']);
-
- if(doc.outstanding_amount!=0)
- cur_frm.add_custom_button('Make Payment Entry', cur_frm.cscript.make_bank_voucher);
- }
- cur_frm.cscript.hide_fields(doc, dt, dn);
-
-}
-
-//fetch retail transaction related fields
-//--------------------------------------------
-cur_frm.cscript.is_pos = function(doc,dt,dn,callback){
- cur_frm.cscript.hide_fields(doc, dt, dn);
- if(doc.is_pos == 1){
- if (!doc.company) {
- msgprint("Please select company to proceed");
- doc.is_pos = 0;
- refresh_field('is_pos');
- }
- else {
- var callback1 = function(r,rt){
- if(callback) callback(doc, dt, dn);
- cur_frm.refresh();
- }
- $c_obj(make_doclist(dt,dn),'set_pos_fields','',callback1);
- }
- }
-}
-
cur_frm.cscript.mode_of_payment = function(doc) {
cur_frm.call({
method: "get_bank_cash_account",
@@ -159,94 +150,10 @@
cur_frm.cscript.hide_fields(doc, dt, dn);
}
-cur_frm.cscript.warehouse = function(doc, cdt , cdn) {
- var d = locals[cdt][cdn];
- if (!d.item_code) { msgprint("please enter item code first"); return };
- if (d.warehouse) {
- arg = "{'item_code':'" + d.item_code + "','warehouse':'" + d.warehouse +"'}";
- get_server_fields('get_actual_qty',arg,'entries',doc,cdt,cdn,1);
- }
-}
-
-
-
-//Customer
-cur_frm.cscript.customer = function(doc,dt,dn,onload) {
- cur_frm.toggle_display("contact_section", doc.customer);
-
- var pl = doc.price_list_name;
- var callback = function(r,rt) {
- var callback2 = function(doc, dt, dn) {
- doc = locals[dt][dn];
- if(doc.debit_to && doc.posting_date){
- get_server_fields('get_cust_and_due_date','','',doc,dt,dn,1,
- function(doc, dt, dn) {
- cur_frm.refresh();
- if (!onload && (pl != doc.price_list_name)) cur_frm.cscript.price_list_name(doc, dt, dn);
- });
-
- }
- }
- var doc = locals[cur_frm.doctype][cur_frm.docname];
- get_server_fields('get_debit_to','','',doc, dt, dn, 0, callback2);
- }
- var args = onload ? 'onload':''
- if(doc.customer) $c_obj(make_doclist(doc.doctype, doc.name), 'get_default_customer_address', args, callback);
-
-}
-
-
-
cur_frm.cscript.customer_address = cur_frm.cscript.contact_person = function(doc,dt,dn) {
if(doc.customer) get_server_fields('get_customer_address', JSON.stringify({customer: doc.customer, address: doc.customer_address, contact: doc.contact_person}),'', doc, dt, dn, 1);
}
-// Set Due Date = posting date + credit days
-cur_frm.cscript.debit_to = function(doc,dt,dn) {
-
- var callback2 = function(r,rt) {
- var doc = locals[cur_frm.doctype][cur_frm.docname];
- cur_frm.refresh();
- }
-
- var callback = function(r,rt) {
- var doc = locals[cur_frm.doctype][cur_frm.docname];
- if(doc.customer) $c_obj(make_doclist(dt,dn), 'get_default_customer_address', '', callback2);
- cur_frm.toggle_display("contact_section", doc.customer);
-
- cur_frm.refresh();
- }
-
- if(doc.debit_to && doc.posting_date){
- get_server_fields('get_cust_and_due_date','','',doc,dt,dn,1,callback);
- }
-}
-
-
-
-//refresh advance amount
-//-------------------------------------------------
-
-
-cur_frm.cscript.write_off_outstanding_amount_automatically = function(doc) {
- if (doc.write_off_outstanding_amount_automatically == 1)
- doc.write_off_amount = flt(doc.grand_total) - flt(doc.paid_amount);
-
- doc.outstanding_amount = flt(doc.grand_total) - flt(doc.paid_amount) - flt(doc.write_off_amount);
- refresh_field(['write_off_amount', 'outstanding_amount']);
-}
-
-cur_frm.cscript.paid_amount = function(doc) {
- cur_frm.cscript.write_off_outstanding_amount_automatically(doc);
-}
-
-cur_frm.cscript.write_off_amount = function(doc) {
- cur_frm.cscript.write_off_outstanding_amount_automatically(doc);
-}
-
-
-//Set debit and credit to zero on adding new row
-//----------------------------------------------
cur_frm.fields_dict['entries'].grid.onrowadd = function(doc, cdt, cdn){
cl = getchildren('Sales Invoice Item', doc.name, cur_frm.cscript.fname, doc.doctype);
@@ -282,12 +189,6 @@
-// Allocated Amount in advances table
-// -----------------------------------
-cur_frm.cscript.allocated_amount = function(doc,cdt,cdn){
- cur_frm.cscript.calc_adjustment_amount(doc,cdt,cdn);
-}
-
//Make Delivery Note Button
//-----------------------------
@@ -452,19 +353,6 @@
refresh_field(cur_frm.cscript.fname);
}
-cur_frm.cscript.calc_adjustment_amount = function(doc,cdt,cdn) {
- var doc = locals[doc.doctype][doc.name];
- var el = getchildren('Sales Invoice Advance',doc.name,'advance_adjustment_details');
- var total_adjustment_amt = 0
- for(var i in el) {
- total_adjustment_amt += flt(el[i].allocated_amount)
- }
- doc.total_advance = flt(total_adjustment_amt);
- doc.outstanding_amount = flt(doc.grand_total) - flt(total_adjustment_amt) - flt(doc.paid_amount) - flt(doc.write_off_amount);
- refresh_many(['total_advance','outstanding_amount']);
-}
-
-
// Make Journal Voucher
// --------------------
cur_frm.cscript.make_jv = function(doc, dt, dn, bank_account) {
diff --git a/accounts/doctype/sales_invoice/sales_invoice.py b/accounts/doctype/sales_invoice/sales_invoice.py
index c17654a..2d4de49 100644
--- a/accounts/doctype/sales_invoice/sales_invoice.py
+++ b/accounts/doctype/sales_invoice/sales_invoice.py
@@ -38,10 +38,38 @@
self.log = []
self.tname = 'Sales Invoice Item'
self.fname = 'entries'
+ self.status_updater = [{
+ 'source_dt': 'Sales Invoice Item',
+ 'target_field': 'billed_amt',
+ 'target_ref_field': 'export_amount',
+ 'target_dt': 'Sales Order Item',
+ 'join_field': 'so_detail',
+ 'target_parent_dt': 'Sales Order',
+ 'target_parent_field': 'per_billed',
+ 'source_field': 'export_amount',
+ 'join_field': 'so_detail',
+ 'percent_join_field': 'sales_order',
+ 'status_field': 'billing_status',
+ 'keyword': 'Billed'
+ },
+ {
+ 'source_dt': 'Sales Invoice Item',
+ 'target_dt': 'Delivery Note Item',
+ 'join_field': 'dn_detail',
+ 'target_field': 'billed_amt',
+ 'target_parent_dt': 'Delivery Note',
+ 'target_parent_field': 'per_billed',
+ 'target_ref_field': 'export_amount',
+ 'source_field': 'export_amount',
+ 'percent_join_field': 'delivery_note',
+ 'status_field': 'billing_status',
+ 'keyword': 'Billed',
+ 'no_tolerance': True,
+ }]
+
def validate(self):
super(DocType, self).validate()
- self.fetch_missing_values()
self.validate_posting_time()
self.so_dn_required()
self.validate_proj_cust()
@@ -50,7 +78,6 @@
sales_com_obj.check_active_sales_items(self)
sales_com_obj.check_conversion_rate(self)
sales_com_obj.validate_max_discount(self, 'entries')
- sales_com_obj.get_allocated_sum(self)
sales_com_obj.validate_fiscal_year(self.doc.fiscal_year,
self.doc.posting_date,'Posting Date')
self.validate_customer()
@@ -59,18 +86,22 @@
self.validate_fixed_asset_account()
self.clear_unallocated_advances("Sales Invoice Advance", "advance_adjustment_details")
self.add_remarks()
+
if cint(self.doc.is_pos):
self.validate_pos()
self.validate_write_off_account()
- if cint(self.doc.update_stock):
- sl = get_obj('Stock Ledger')
- sl.validate_serial_no(self, 'entries')
- sl.validate_serial_no(self, 'packing_details')
- self.validate_item_code()
- self.update_current_stock()
- self.validate_delivery_note()
+
+ if cint(self.doc.update_stock):
+ sl = get_obj('Stock Ledger')
+ sl.validate_serial_no(self, 'entries')
+ sl.validate_serial_no(self, 'packing_details')
+ self.validate_item_code()
+ self.update_current_stock()
+ self.validate_delivery_note()
+
if not self.doc.is_opening:
self.doc.is_opening = 'No'
+
self.set_aging_date()
self.set_against_income_account()
self.validate_c_form()
@@ -80,16 +111,15 @@
def on_submit(self):
- if cint(self.doc.is_pos) == 1:
- if cint(self.doc.update_stock) == 1:
- sl_obj = get_obj("Stock Ledger")
- sl_obj.validate_serial_no_warehouse(self, 'entries')
- sl_obj.validate_serial_no_warehouse(self, 'packing_details')
-
- sl_obj.update_serial_record(self, 'entries', is_submit = 1, is_incoming = 0)
- sl_obj.update_serial_record(self, 'packing_details', is_submit = 1, is_incoming = 0)
-
- self.update_stock_ledger(update_stock=1)
+ if cint(self.doc.update_stock) == 1:
+ sl_obj = get_obj("Stock Ledger")
+ sl_obj.validate_serial_no_warehouse(self, 'entries')
+ sl_obj.validate_serial_no_warehouse(self, 'packing_details')
+
+ sl_obj.update_serial_record(self, 'entries', is_submit = 1, is_incoming = 0)
+ sl_obj.update_serial_record(self, 'packing_details', is_submit = 1, is_incoming = 0)
+
+ self.update_stock_ledger(update_stock=1)
else:
# Check for Approving Authority
if not self.doc.recurring_id:
@@ -98,7 +128,9 @@
self.set_buying_amount()
self.check_prev_docstatus()
- get_obj("Sales Common").update_prevdoc_detail(1,self)
+
+ self.update_status_updater_args()
+ self.update_prevdoc_status()
# this sequence because outstanding may get -ve
self.make_gl_entries()
@@ -114,13 +146,12 @@
self.update_time_log_batch(None)
def on_cancel(self):
- if cint(self.doc.is_pos) == 1:
- if cint(self.doc.update_stock) == 1:
- sl = get_obj('Stock Ledger')
- sl.update_serial_record(self, 'entries', is_submit = 0, is_incoming = 0)
- sl.update_serial_record(self, 'packing_details', is_submit = 0, is_incoming = 0)
-
- self.update_stock_ledger(update_stock = -1)
+ if cint(self.doc.update_stock) == 1:
+ sl = get_obj('Stock Ledger')
+ sl.update_serial_record(self, 'entries', is_submit = 0, is_incoming = 0)
+ sl.update_serial_record(self, 'packing_details', is_submit = 0, is_incoming = 0)
+
+ self.update_stock_ledger(update_stock = -1)
sales_com_obj = get_obj(dt = 'Sales Common')
sales_com_obj.check_stop_sales_order(self)
@@ -128,33 +159,44 @@
from accounts.utils import remove_against_link_from_jv
remove_against_link_from_jv(self.doc.doctype, self.doc.name, "against_invoice")
- sales_com_obj.update_prevdoc_detail(0, self)
+ self.update_status_updater_args()
+ self.update_prevdoc_status()
self.make_cancel_gl_entries()
+ def update_status_updater_args(self):
+ if cint(self.doc.is_pos) and cint(self.doc.update_stock):
+ self.status_updater.append({
+ 'source_dt':'Sales Invoice Item',
+ 'target_dt':'Sales Order Item',
+ 'target_parent_dt':'Sales Order',
+ 'target_parent_field':'per_delivered',
+ 'target_field':'delivered_qty',
+ 'target_ref_field':'qty',
+ 'source_field':'qty',
+ 'join_field':'so_detail',
+ 'percent_join_field':'sales_order',
+ 'status_field':'delivery_status',
+ 'keyword':'Delivered',
+ 'second_source_dt': 'Delivery Note Item',
+ 'second_source_field': 'qty',
+ 'second_join_field': 'prevdoc_detail_docname'
+ })
+
def on_update_after_submit(self):
self.validate_recurring_invoice()
self.convert_to_recurring()
- def fetch_missing_values(self):
- # fetch contact and address details for customer, if they are not mentioned
- if not (self.doc.contact_person and self.doc.customer_address):
- for fieldname, val in self.get_default_address_and_contact("customer").items():
- if not self.doc.fields.get(fieldname) and self.meta.get_field(fieldname):
- self.doc.fields[fieldname] = val
-
- # fetch missing item values
- for item in self.doclist.get({"parentfield": "entries"}):
- if item.fields.get("item_code"):
- ret = get_obj('Sales Common').get_item_details(item.fields, self)
- for fieldname, value in ret.items():
- if self.meta.get_field(fieldname, parentfield="entries") and \
- not item.fields.get(fieldname):
- item.fields[fieldname] = value
+ def set_missing_values(self, for_validate=False):
+ super(DocType, self).set_missing_values(for_validate)
+ self.set_pos_fields(for_validate)
- # fetch pos details, if they are not fetched
- if cint(self.doc.is_pos):
- self.set_pos_fields(for_validate=True)
+ def set_customer_defaults(self):
+ # TODO cleanup these methods
+ self.doc.fields.update(self.get_debit_to())
+ self.get_cust_and_due_date()
+
+ super(DocType, self).set_customer_defaults()
def update_time_log_batch(self, sales_invoice):
for d in self.doclist.get({"doctype":"Sales Invoice Item"}):
@@ -175,10 +217,11 @@
"""Set retail related fields from pos settings"""
if cint(self.doc.is_pos) != 1:
return
+
+ from selling.utils import get_pos_settings, apply_pos_settings
+ pos = get_pos_settings(self.doc.company)
- if self.pos_settings:
- pos = self.pos_settings[0]
-
+ if pos:
self.doc.conversion_rate = flt(pos.conversion_rate)
if not self.doc.debit_to:
@@ -191,21 +234,24 @@
'price_list_name', 'company', 'select_print_heading', 'cash_bank_account'):
if (not for_validate) or (for_validate and not self.doc.fields.get(fieldname)):
self.doc.fields[fieldname] = pos.get(fieldname)
+
+ if not for_validate:
+ self.doc.update_stock = cint(pos.get("update_stock"))
# set pos values in items
for item in self.doclist.get({"parentfield": "entries"}):
if item.fields.get('item_code'):
- for fieldname, val in self.apply_pos_settings(item.fields).items():
+ for fieldname, val in apply_pos_settings(pos, item.fields).items():
if (not for_validate) or (for_validate and not item.fields.get(fieldname)):
item.fields[fieldname] = val
# fetch terms
if self.doc.tc_name and not self.doc.terms:
- self.get_tc_details()
+ self.doc.terms = webnotes.conn.get_value("Terms and Conditions", self.doc.tc_name, "terms")
# fetch charges
if self.doc.charge and not len(self.doclist.get({"parentfield": "other_charges"})):
- self.get_other_charges()
+ self.set_taxes()
def get_customer_account(self):
"""Get Account Head to which amount needs to be Debited based on Customer"""
@@ -274,86 +320,6 @@
ret = self.get_debit_to()
self.doc.debit_to = ret.get('debit_to')
-
-
- def load_default_accounts(self):
- """
- Loads default accounts from items, customer when called from mapper
- """
- self.get_income_expense_account('entries')
-
-
- def get_income_expense_account(self,doctype):
- for d in getlist(self.doclist, doctype):
- if d.item_code:
- item = webnotes.conn.get_value("Item", d.item_code, ["default_income_account",
- "default_sales_cost_center", "purchase_account"], as_dict=True)
- d.income_account = item['default_income_account'] or ""
- d.cost_center = item['default_sales_cost_center'] or ""
-
- if cint(webnotes.defaults.get_global_default("auto_inventory_accounting")) \
- and cint(self.doc.is_pos) and cint(self.doc.update_stock):
- d.expense_account = item['purchase_account'] or ""
-
- def get_item_details(self, args=None):
- import json
- args = args and json.loads(args) or {}
- if args.get('item_code'):
- ret = get_obj('Sales Common').get_item_details(args, self)
-
- if cint(self.doc.is_pos) == 1 and self.pos_settings:
- ret = self.apply_pos_settings(args, ret)
-
- return ret
-
- elif cint(self.doc.is_pos) == 1 and self.pos_settings:
- for doc in self.doclist.get({"parentfield": "entries"}):
- if doc.fields.get('item_code'):
- ret = self.apply_pos_settings(doc.fields)
- for r in ret:
- if not doc.fields.get(r):
- doc.fields[r] = ret[r]
-
- @property
- def pos_settings(self):
- if not hasattr(self, "_pos_settings"):
- dtl = webnotes.conn.sql("""select * from `tabPOS Setting` where user = %s
- and company = %s""", (webnotes.session['user'], self.doc.company), as_dict=1)
- if not dtl:
- dtl = webnotes.conn.sql("""select * from `tabPOS Setting`
- where ifnull(user,'') = '' and company = %s""", self.doc.company, as_dict=1)
- self._pos_settings = dtl
-
- return self._pos_settings
-
- def apply_pos_settings(self, args, ret=None):
- if not ret: ret = {}
-
- pos = self.pos_settings[0]
-
- item = webnotes.conn.sql("""select default_income_account, default_sales_cost_center,
- default_warehouse, purchase_account from tabItem where name = %s""",
- args.get('item_code'), as_dict=1)
-
- if item:
- item = item[0]
-
- ret.update({
- "income_account": item.get("default_income_account") \
- or pos.get("income_account") or args.get("income_account"),
- "cost_center": item.get("default_sales_cost_center") \
- or pos.get("cost_center") or args.get("cost_center"),
- "warehouse": item.get("default_warehouse") \
- or pos.get("warehouse") or args.get("warehouse"),
- "expense_account": item.get("purchase_account") \
- or pos.get("expense_account") or args.get("expense_account")
- })
-
- if ret.get("warehouse"):
- ret["actual_qty"] = flt(webnotes.conn.get_value("Bin",
- {"item_code": args.get("item_code"), "warehouse": ret.get("warehouse")},
- "actual_qty"))
- return ret
def get_barcode_details(self, barcode):
return get_obj('Sales Common').get_barcode_details(barcode)
@@ -373,19 +339,6 @@
"""Get Commission rate of Sales Partner"""
return get_obj('Sales Common').get_comm_rate(sales_partner, self)
-
- def get_tc_details(self):
- return get_obj('Sales Common').get_tc_details(self)
-
-
- def load_default_taxes(self):
- self.doclist = get_obj('Sales Common').load_default_taxes(self)
-
-
- def get_other_charges(self):
- self.doclist = get_obj('Sales Common').get_other_charges(self)
-
-
def get_advances(self):
super(DocType, self).get_advances(self.doc.debit_to,
"Sales Invoice Advance", "advance_adjustment_details", "credit")
@@ -534,13 +487,13 @@
def validate_item_code(self):
for d in getlist(self.doclist, 'entries'):
if not d.item_code:
- msgprint("Please enter Item Code at line no : %s to update stock for POS or remove check from Update Stock in Basic Info Tab." % (d.idx))
- raise Exception
+ msgprint("Please enter Item Code at line no : %s to update stock or remove check from Update Stock in Basic Info Tab." % (d.idx),
+ raise_exception=True)
def validate_delivery_note(self):
for d in self.doclist.get({"parentfield": "entries"}):
if d.delivery_note:
- msgprint("""POS can not be made against Delivery Note""", raise_exception=1)
+ msgprint("""Stock update can not be made against Delivery Note""", raise_exception=1)
def validate_write_off_account(self):
@@ -606,36 +559,28 @@
def on_update(self):
- # Set default warehouse from pos setting
- if cint(self.doc.is_pos) == 1:
- if cint(self.doc.update_stock) == 1:
+ if cint(self.doc.update_stock) == 1:
+ # Set default warehouse from pos setting
+ if cint(self.doc.is_pos) == 1:
w = self.get_warehouse()
if w:
for d in getlist(self.doclist, 'entries'):
if not d.warehouse:
d.warehouse = cstr(w)
-
- self.make_packing_list()
- else:
- self.doclist = self.doc.clear_table(self.doclist, 'packing_details')
- if flt(self.doc.paid_amount) == 0:
- if self.doc.cash_bank_account:
- webnotes.conn.set(self.doc, 'paid_amount',
- (flt(self.doc.grand_total) - flt(self.doc.write_off_amount)))
- else:
- # show message that the amount is not paid
- webnotes.conn.set(self.doc,'paid_amount',0)
- webnotes.msgprint("Note: Payment Entry will not be created since 'Cash/Bank Account' was not specified.")
+ if flt(self.doc.paid_amount) == 0:
+ if self.doc.cash_bank_account:
+ webnotes.conn.set(self.doc, 'paid_amount',
+ (flt(self.doc.grand_total) - flt(self.doc.write_off_amount)))
+ else:
+ # show message that the amount is not paid
+ webnotes.conn.set(self.doc,'paid_amount',0)
+ webnotes.msgprint("Note: Payment Entry will not be created since 'Cash/Bank Account' was not specified.")
+ self.make_packing_list()
else:
self.doclist = self.doc.clear_table(self.doclist, 'packing_details')
webnotes.conn.set(self.doc,'paid_amount',0)
-
- webnotes.conn.set(self.doc, 'outstanding_amount',
- flt(self.doc.grand_total) - flt(self.doc.total_advance) -
- flt(self.doc.paid_amount) - flt(self.doc.write_off_amount))
-
def check_prev_docstatus(self):
for d in getlist(self.doclist,'entries'):
@@ -689,15 +634,6 @@
get_obj('Stock Ledger', 'Stock Ledger').update_stock(self.values)
- def get_actual_qty(self,args):
- args = eval(args)
- actual_qty = webnotes.conn.sql("select actual_qty from `tabBin` where item_code = '%s' and warehouse = '%s'" % (args['item_code'], args['warehouse']), as_dict=1)
- ret = {
- 'actual_qty' : actual_qty and flt(actual_qty[0]['actual_qty']) or 0
- }
- return ret
-
-
def make_gl_entries(self):
from accounts.general_ledger import make_gl_entries, merge_similar_entries
@@ -742,7 +678,7 @@
"against": self.doc.debit_to,
"credit": flt(tax.tax_amount),
"remarks": self.doc.remarks,
- "cost_center": tax.cost_center_other_charges
+ "cost_center": tax.cost_center
})
)
@@ -762,7 +698,7 @@
# expense account gl entries
if cint(webnotes.defaults.get_global_default("auto_inventory_accounting")) \
- and cint(self.doc.is_pos) and cint(self.doc.update_stock):
+ and cint(self.doc.update_stock):
for item in self.doclist.get({"parentfield": "entries"}):
self.check_expense_account(item)
diff --git a/accounts/doctype/sales_invoice/sales_invoice.txt b/accounts/doctype/sales_invoice/sales_invoice.txt
index a2c422f..f5eb356 100644
--- a/accounts/doctype/sales_invoice/sales_invoice.txt
+++ b/accounts/doctype/sales_invoice/sales_invoice.txt
@@ -1,8 +1,8 @@
[
{
- "creation": "2013-04-19 11:00:14",
+ "creation": "2013-05-24 19:29:05",
"docstatus": 0,
- "modified": "2013-04-22 11:59:28",
+ "modified": "2013-06-05 18:53:03",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -10,6 +10,7 @@
"allow_attach": 1,
"autoname": "naming_series:",
"doctype": "DocType",
+ "document_type": "Transaction",
"is_submittable": 1,
"module": "Accounts",
"name": "__common__",
@@ -30,7 +31,9 @@
"parent": "Sales Invoice",
"parentfield": "permissions",
"parenttype": "DocType",
- "read": 1
+ "permlevel": 0,
+ "read": 1,
+ "report": 1
},
{
"doctype": "DocType",
@@ -46,15 +49,6 @@
"read_only": 0
},
{
- "doctype": "DocField",
- "fieldname": "column_break0",
- "fieldtype": "Column Break",
- "oldfieldtype": "Column Break",
- "print_hide": 0,
- "read_only": 0,
- "width": "50%"
- },
- {
"description": "To manage multiple series please go to Setup > Manage Series",
"doctype": "DocField",
"fieldname": "naming_series",
@@ -69,27 +63,6 @@
"reqd": 1
},
{
- "doctype": "DocField",
- "fieldname": "is_pos",
- "fieldtype": "Check",
- "label": "Is POS",
- "oldfieldname": "is_pos",
- "oldfieldtype": "Check",
- "print_hide": 1,
- "read_only": 0
- },
- {
- "depends_on": "eval:doc.is_pos==1",
- "doctype": "DocField",
- "fieldname": "update_stock",
- "fieldtype": "Check",
- "label": "Update Stock",
- "oldfieldname": "update_stock",
- "oldfieldtype": "Check",
- "print_hide": 1,
- "read_only": 0
- },
- {
"description": "The account to which you will pay (have paid) the money to.",
"doctype": "DocField",
"fieldname": "debit_to",
@@ -118,10 +91,11 @@
"read_only": 0
},
{
+ "depends_on": "customer",
"doctype": "DocField",
"fieldname": "customer_name",
"fieldtype": "Data",
- "hidden": 1,
+ "hidden": 0,
"in_list_view": 1,
"label": "Name",
"oldfieldname": "customer_name",
@@ -129,34 +103,38 @@
"read_only": 1
},
{
+ "depends_on": "customer",
"doctype": "DocField",
"fieldname": "address_display",
"fieldtype": "Small Text",
- "hidden": 1,
+ "hidden": 0,
"label": "Address",
"read_only": 1
},
{
+ "depends_on": "customer",
"doctype": "DocField",
"fieldname": "contact_display",
"fieldtype": "Small Text",
- "hidden": 1,
+ "hidden": 0,
"label": "Contact",
"read_only": 1
},
{
+ "depends_on": "customer",
"doctype": "DocField",
"fieldname": "contact_mobile",
"fieldtype": "Text",
- "hidden": 1,
+ "hidden": 0,
"label": "Mobile No",
"read_only": 1
},
{
+ "depends_on": "customer",
"doctype": "DocField",
"fieldname": "contact_email",
"fieldtype": "Text",
- "hidden": 1,
+ "hidden": 0,
"label": "Contact Email",
"print_hide": 1,
"read_only": 1
@@ -169,6 +147,32 @@
"read_only": 0
},
{
+ "doctype": "DocField",
+ "fieldname": "amended_from",
+ "fieldtype": "Link",
+ "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",
"description": "The date at which current entry will get or has actually executed.",
"doctype": "DocField",
@@ -204,6 +208,7 @@
"fieldname": "mode_of_payment",
"fieldtype": "Select",
"label": "Mode of Payment",
+ "no_copy": 0,
"oldfieldname": "mode_of_payment",
"oldfieldtype": "Select",
"options": "link:Mode of Payment",
@@ -211,6 +216,99 @@
},
{
"doctype": "DocField",
+ "fieldname": "is_pos",
+ "fieldtype": "Check",
+ "label": "Is POS",
+ "oldfieldname": "is_pos",
+ "oldfieldtype": "Check",
+ "print_hide": 1,
+ "read_only": 0
+ },
+ {
+ "doctype": "DocField",
+ "fieldname": "update_stock",
+ "fieldtype": "Check",
+ "label": "Update Stock",
+ "oldfieldname": "update_stock",
+ "oldfieldtype": "Check",
+ "print_hide": 1,
+ "read_only": 0
+ },
+ {
+ "doctype": "DocField",
+ "fieldname": "currency_section",
+ "fieldtype": "Section Break",
+ "label": "Price List and Currency",
+ "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
+ },
+ {
+ "default": "1.00",
+ "description": "Rate at which Customer Currency is converted to customer's base currency",
+ "doctype": "DocField",
+ "fieldname": "conversion_rate",
+ "fieldtype": "Float",
+ "label": "Conversion 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": "price_list_name",
+ "fieldtype": "Select",
+ "label": "Price List",
+ "oldfieldname": "price_list_name",
+ "oldfieldtype": "Select",
+ "options": "link:Price List",
+ "print_hide": 1,
+ "read_only": 0,
+ "reqd": 1
+ },
+ {
+ "description": "Select the currency in which price list is maintained",
+ "doctype": "DocField",
+ "fieldname": "price_list_currency",
+ "fieldtype": "Link",
+ "label": "Price List Currency",
+ "options": "Currency",
+ "print_hide": 1,
+ "read_only": 0,
+ "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 Currency Conversion Rate",
+ "no_copy": 0,
+ "print_hide": 1,
+ "read_only": 0,
+ "reqd": 1
+ },
+ {
+ "doctype": "DocField",
"fieldname": "items",
"fieldtype": "Section Break",
"label": "Items",
@@ -222,10 +320,28 @@
"doctype": "DocField",
"fieldname": "entries",
"fieldtype": "Table",
- "label": "Entries",
+ "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",
+ "print_hide": 1,
+ "read_only": 0
+ },
+ {
+ "doctype": "DocField",
+ "fieldname": "packing_details",
+ "fieldtype": "Table",
+ "label": "Packing Details",
+ "options": "Delivery Note Packing Item",
+ "print_hide": 1,
"read_only": 0
},
{
@@ -244,42 +360,6 @@
"read_only": 0
},
{
- "doctype": "DocField",
- "fieldname": "col_break26",
- "fieldtype": "Column Break",
- "read_only": 0,
- "width": "50%"
- },
- {
- "description": "Will be calculated automatically when you enter the details",
- "doctype": "DocField",
- "fieldname": "net_total",
- "fieldtype": "Currency",
- "label": "Net Total*",
- "oldfieldname": "net_total",
- "oldfieldtype": "Currency",
- "options": "Company:company:default_currency",
- "print_hide": 0,
- "read_only": 1,
- "reqd": 1
- },
- {
- "doctype": "DocField",
- "fieldname": "recalculate_values",
- "fieldtype": "Button",
- "label": "Re-Calculate Values",
- "oldfieldtype": "Button",
- "print_hide": 1,
- "read_only": 0
- },
- {
- "doctype": "DocField",
- "fieldname": "col_break25",
- "fieldtype": "Column Break",
- "read_only": 0,
- "width": "50%"
- },
- {
"description": "Select Items from Sales Order",
"doctype": "DocField",
"fieldname": "sales_order_main",
@@ -314,85 +394,43 @@
},
{
"doctype": "DocField",
- "fieldname": "currency_section",
- "fieldtype": "Section Break",
- "label": "Price List and Currency",
- "read_only": 0
- },
- {
- "doctype": "DocField",
- "fieldname": "col_break27",
+ "fieldname": "col_break25",
"fieldtype": "Column Break",
"read_only": 0,
"width": "50%"
},
{
"doctype": "DocField",
- "fieldname": "price_list_name",
- "fieldtype": "Select",
- "label": "Price List",
- "oldfieldname": "price_list_name",
- "oldfieldtype": "Select",
- "options": "link:Price List",
- "print_hide": 1,
- "read_only": 0,
- "reqd": 1
- },
- {
- "description": "Select the currency in which price list is maintained",
- "doctype": "DocField",
- "fieldname": "price_list_currency",
- "fieldtype": "Link",
- "label": "Price List Currency",
- "options": "Currency",
- "print_hide": 1,
- "read_only": 0,
- "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 Currency Conversion Rate",
- "print_hide": 1,
- "read_only": 0,
- "reqd": 1
+ "fieldname": "net_total_export",
+ "fieldtype": "Currency",
+ "label": "Net Total (Export)",
+ "options": "currency",
+ "print_hide": 0,
+ "read_only": 1
},
{
"doctype": "DocField",
- "fieldname": "column_break2",
- "fieldtype": "Column Break",
- "read_only": 0,
- "width": "50%"
- },
- {
- "doctype": "DocField",
- "fieldname": "currency",
- "fieldtype": "Link",
- "label": "Currency",
- "oldfieldname": "currency",
- "oldfieldtype": "Select",
- "options": "Currency",
- "print_hide": 1,
- "read_only": 0,
- "reqd": 1
- },
- {
- "default": "1.00",
- "description": "Rate at which Customer Currency is converted to customer's base currency",
- "doctype": "DocField",
- "fieldname": "conversion_rate",
- "fieldtype": "Float",
- "label": "Conversion Rate",
- "oldfieldname": "conversion_rate",
+ "fieldname": "net_total",
+ "fieldtype": "Currency",
+ "label": "Net Total*",
+ "oldfieldname": "net_total",
"oldfieldtype": "Currency",
+ "options": "Company:company:default_currency",
"print_hide": 1,
- "read_only": 0,
+ "read_only": 1,
"reqd": 1
},
{
"doctype": "DocField",
+ "fieldname": "recalculate_values",
+ "fieldtype": "Button",
+ "label": "Re-Calculate Values",
+ "oldfieldtype": "Button",
+ "print_hide": 1,
+ "read_only": 0
+ },
+ {
+ "doctype": "DocField",
"fieldname": "taxes",
"fieldtype": "Section Break",
"label": "Taxes and Charges",
@@ -412,6 +450,11 @@
},
{
"doctype": "DocField",
+ "fieldname": "column_break_38",
+ "fieldtype": "Column Break"
+ },
+ {
+ "doctype": "DocField",
"fieldname": "get_charges",
"fieldtype": "Button",
"label": "Get Taxes and Charges",
@@ -420,6 +463,11 @@
"read_only": 0
},
{
+ "doctype": "DocField",
+ "fieldname": "section_break_40",
+ "fieldtype": "Section Break"
+ },
+ {
"allow_on_submit": 1,
"doctype": "DocField",
"fieldname": "other_charges",
@@ -432,15 +480,29 @@
},
{
"doctype": "DocField",
- "fieldname": "calculate_charges",
- "fieldtype": "Button",
- "label": "Calculate Taxes and Charges",
- "oldfieldtype": "Button",
+ "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 (Export)",
+ "options": "currency",
+ "print_hide": 1,
+ "read_only": 1
+ },
+ {
+ "doctype": "DocField",
"fieldname": "other_charges_total",
"fieldtype": "Currency",
"label": "Total Taxes and Charges",
@@ -452,10 +514,15 @@
},
{
"doctype": "DocField",
- "fieldname": "other_charges_calculation",
- "fieldtype": "HTML",
- "label": "Taxes and Charges Calculation",
- "oldfieldtype": "HTML",
+ "fieldname": "column_break_45",
+ "fieldtype": "Column Break"
+ },
+ {
+ "doctype": "DocField",
+ "fieldname": "calculate_charges",
+ "fieldtype": "Button",
+ "label": "Calculate Taxes and Charges",
+ "oldfieldtype": "Button",
"print_hide": 1,
"read_only": 0
},
@@ -470,6 +537,61 @@
},
{
"doctype": "DocField",
+ "fieldname": "grand_total_export",
+ "fieldtype": "Currency",
+ "in_list_view": 1,
+ "label": "Grand Total (Export)",
+ "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 (Export)",
+ "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 (Export)",
+ "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",
@@ -539,67 +661,33 @@
},
{
"doctype": "DocField",
- "fieldname": "column_break6",
- "fieldtype": "Column Break",
- "oldfieldtype": "Column Break",
+ "fieldname": "advances",
+ "fieldtype": "Section Break",
+ "label": "Advances",
+ "oldfieldtype": "Section Break",
"print_hide": 1,
- "read_only": 0,
- "width": "50%"
+ "read_only": 0
},
{
"doctype": "DocField",
- "fieldname": "grand_total_export",
- "fieldtype": "Currency",
- "in_list_view": 1,
- "label": "Grand Total (Export)",
- "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 (Export)",
- "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 (Export)",
- "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",
+ "fieldname": "get_advances_received",
+ "fieldtype": "Button",
+ "label": "Get Advances Received",
+ "oldfieldtype": "Button",
+ "options": "get_advances",
"print_hide": 1,
- "read_only": 1
+ "read_only": 0
},
{
"doctype": "DocField",
- "fieldname": "gross_profit_percent",
- "fieldtype": "Float",
- "label": "Gross Profit (%)",
- "oldfieldname": "gross_profit_percent",
- "oldfieldtype": "Currency",
+ "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": 1
+ "read_only": 0
},
{
"doctype": "DocField",
@@ -700,23 +788,22 @@
},
{
"doctype": "DocField",
+ "fieldname": "column_break_71",
+ "fieldtype": "Column Break"
+ },
+ {
+ "doctype": "DocField",
"fieldname": "get_terms",
"fieldtype": "Button",
"label": "Get Terms and Conditions",
"oldfieldtype": "Button",
- "options": "get_tc_details",
"print_hide": 1,
"read_only": 0
},
{
"doctype": "DocField",
- "fieldname": "terms_html",
- "fieldtype": "HTML",
- "label": "Terms and Conditions HTML",
- "oldfieldtype": "HTML",
- "options": "You can add Terms and Notes that will be printed in the Transaction",
- "print_hide": 1,
- "read_only": 0
+ "fieldname": "section_break_73",
+ "fieldtype": "Section Break"
},
{
"doctype": "DocField",
@@ -728,14 +815,39 @@
"read_only": 0
},
{
+ "depends_on": "customer",
"doctype": "DocField",
"fieldname": "contact_section",
"fieldtype": "Section Break",
+ "hidden": 0,
"label": "Contact Info",
"read_only": 0
},
{
"doctype": "DocField",
+ "fieldname": "territory",
+ "fieldtype": "Link",
+ "in_filter": 1,
+ "label": "Territory",
+ "options": "Territory",
+ "print_hide": 1,
+ "read_only": 0,
+ "reqd": 1,
+ "search_index": 0
+ },
+ {
+ "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,
@@ -761,36 +873,6 @@
},
{
"doctype": "DocField",
- "fieldname": "col_break24",
- "fieldtype": "Column Break",
- "read_only": 0,
- "width": "50%"
- },
- {
- "doctype": "DocField",
- "fieldname": "territory",
- "fieldtype": "Link",
- "in_filter": 1,
- "label": "Territory",
- "options": "Territory",
- "print_hide": 1,
- "read_only": 0,
- "reqd": 1,
- "search_index": 0
- },
- {
- "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": "more_info",
"fieldtype": "Section Break",
"label": "More Info",
@@ -799,13 +881,40 @@
"read_only": 0
},
{
+ "description": "Track this Sales Invoice against any Project",
"doctype": "DocField",
- "fieldname": "column_break7",
- "fieldtype": "Column Break",
- "oldfieldtype": "Column Break",
- "print_hide": 1,
+ "fieldname": "project_name",
+ "fieldtype": "Link",
+ "in_filter": 1,
+ "label": "Project Name",
+ "oldfieldname": "project_name",
+ "oldfieldtype": "Link",
+ "options": "Project",
"read_only": 0,
- "width": "50%"
+ "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",
@@ -823,40 +932,6 @@
"search_index": 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": "posting_time",
- "fieldtype": "Time",
- "label": "Posting Time",
- "no_copy": 1,
- "oldfieldname": "posting_time",
- "oldfieldtype": "Time",
- "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
- },
- {
"doctype": "DocField",
"fieldname": "c_form_applicable",
"fieldtype": "Select",
@@ -878,29 +953,24 @@
"read_only": 1
},
{
- "depends_on": "eval:doc.source == 'Campaign'",
"doctype": "DocField",
- "fieldname": "campaign",
- "fieldtype": "Link",
- "label": "Campaign",
- "oldfieldname": "campaign",
- "oldfieldtype": "Link",
- "options": "Campaign",
+ "fieldname": "column_break8",
+ "fieldtype": "Column Break",
+ "oldfieldtype": "Column Break",
"print_hide": 1,
"read_only": 0
},
{
- "description": "Track this Sales Invoice against any Project",
+ "allow_on_submit": 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
+ "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,
@@ -918,39 +988,28 @@
},
{
"doctype": "DocField",
- "fieldname": "column_break8",
- "fieldtype": "Column Break",
- "oldfieldtype": "Column Break",
+ "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": "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",
+ "fieldname": "aging_date",
+ "fieldtype": "Date",
+ "label": "Aging Date",
+ "oldfieldname": "aging_date",
+ "oldfieldtype": "Date",
"print_hide": 1,
"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": 0
- },
- {
- "doctype": "DocField",
"fieldname": "fiscal_year",
"fieldtype": "Select",
"in_filter": 1,
@@ -966,41 +1025,6 @@
},
{
"doctype": "DocField",
- "fieldname": "amended_from",
- "fieldtype": "Link",
- "label": "Amended From",
- "no_copy": 1,
- "oldfieldname": "amended_from",
- "oldfieldtype": "Link",
- "options": "Sales Invoice",
- "print_hide": 1,
- "read_only": 1
- },
- {
- "description": "The date at which current entry is corrected in the system.",
- "doctype": "DocField",
- "fieldname": "amendment_date",
- "fieldtype": "Date",
- "label": "Amendment Date",
- "no_copy": 1,
- "oldfieldname": "amendment_date",
- "oldfieldtype": "Date",
- "print_hide": 1,
- "read_only": 0
- },
- {
- "depends_on": "eval:!doc.__islocal",
- "doctype": "DocField",
- "fieldname": "cancel_reason",
- "fieldtype": "Data",
- "label": "Cancel Reason",
- "oldfieldname": "cancel_reason",
- "oldfieldtype": "Data",
- "print_hide": 1,
- "read_only": 1
- },
- {
- "doctype": "DocField",
"fieldname": "remarks",
"fieldtype": "Small Text",
"label": "Remarks",
@@ -1013,53 +1037,6 @@
},
{
"doctype": "DocField",
- "fieldname": "advances",
- "fieldtype": "Section Break",
- "label": "Advances",
- "oldfieldtype": "Section Break",
- "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
- },
- {
- "doctype": "DocField",
- "fieldname": "packing_list",
- "fieldtype": "Section Break",
- "label": "Packing List",
- "print_hide": 1,
- "read_only": 0
- },
- {
- "doctype": "DocField",
- "fieldname": "packing_details",
- "fieldtype": "Table",
- "label": "Packing Details",
- "options": "Delivery Note Packing Item",
- "print_hide": 1,
- "read_only": 0
- },
- {
- "doctype": "DocField",
"fieldname": "sales_team_section_break",
"fieldtype": "Section Break",
"label": "Sales Team",
@@ -1288,8 +1265,15 @@
"cancel": 1,
"create": 1,
"doctype": "DocPerm",
- "permlevel": 0,
- "report": 1,
+ "role": "Accounts Manager",
+ "submit": 1,
+ "write": 1
+ },
+ {
+ "amend": 1,
+ "cancel": 0,
+ "create": 1,
+ "doctype": "DocPerm",
"role": "Accounts User",
"submit": 1,
"write": 1
@@ -1297,8 +1281,6 @@
{
"doctype": "DocPerm",
"match": "customer",
- "permlevel": 0,
- "report": 1,
"role": "Customer"
- },
+ }
]
\ No newline at end of file
diff --git a/accounts/doctype/sales_invoice/test_sales_invoice.py b/accounts/doctype/sales_invoice/test_sales_invoice.py
index b46cdd1..dfc61eb 100644
--- a/accounts/doctype/sales_invoice/test_sales_invoice.py
+++ b/accounts/doctype/sales_invoice/test_sales_invoice.py
@@ -1,12 +1,226 @@
import webnotes
-import unittest
+import unittest, json
+from webnotes.utils import flt, cint
class TestSalesInvoice(unittest.TestCase):
def make(self):
- w = webnotes.bean(webnotes.copy_doclist(test_records[0]))
+ w = webnotes.bean(copy=test_records[0])
w.insert()
w.submit()
return w
+
+ def test_sales_invoice_calculation_base_currency(self):
+ si = webnotes.bean(copy=test_records[2])
+ si.run_method("calculate_taxes_and_totals")
+ si.insert()
+
+ expected_values = {
+ "keys": ["ref_rate", "adj_rate", "export_rate", "export_amount",
+ "base_ref_rate", "basic_rate", "amount"],
+ "_Test Item Home Desktop 100": [50, 0, 50, 500, 50, 50, 500],
+ "_Test Item Home Desktop 200": [150, 0, 150, 750, 150, 150, 750],
+ }
+
+ # check if children are saved
+ self.assertEquals(len(si.doclist.get({"parentfield": "entries"})),
+ len(expected_values)-1)
+
+ # check if item values are calculated
+ for d in si.doclist.get({"parentfield": "entries"}):
+ for i, k in enumerate(expected_values["keys"]):
+ self.assertEquals(d.fields.get(k), expected_values[d.item_code][i])
+
+ # check net total
+ self.assertEquals(si.doc.net_total, 1250)
+ self.assertEquals(si.doc.net_total_export, 1250)
+
+ # check tax calculation
+ expected_values = {
+ "keys": ["tax_amount", "total"],
+ "_Test Account Shipping Charges - _TC": [100, 1350],
+ "_Test Account Customs Duty - _TC": [125, 1475],
+ "_Test Account Excise Duty - _TC": [140, 1615],
+ "_Test Account Education Cess - _TC": [2.8, 1617.8],
+ "_Test Account S&H Education Cess - _TC": [1.4, 1619.2],
+ "_Test Account CST - _TC": [32.38, 1651.58],
+ "_Test Account VAT - _TC": [156.25, 1807.83],
+ "_Test Account Discount - _TC": [-180.78, 1627.05]
+ }
+
+ for d in si.doclist.get({"parentfield": "other_charges"}):
+ for i, k in enumerate(expected_values["keys"]):
+ self.assertEquals(d.fields.get(k), expected_values[d.account_head][i])
+
+ self.assertEquals(si.doc.grand_total, 1627.05)
+ self.assertEquals(si.doc.grand_total_export, 1627.05)
+
+ def test_sales_invoice_calculation_export_currency(self):
+ si = webnotes.bean(copy=test_records[2])
+ si.doc.currency = "USD"
+ si.doc.conversion_rate = 50
+ si.doclist[1].export_rate = 1
+ si.doclist[1].ref_rate = 1
+ si.doclist[2].export_rate = 3
+ si.doclist[2].ref_rate = 3
+ si.run_method("calculate_taxes_and_totals")
+ si.insert()
+
+ expected_values = {
+ "keys": ["ref_rate", "adj_rate", "export_rate", "export_amount",
+ "base_ref_rate", "basic_rate", "amount"],
+ "_Test Item Home Desktop 100": [1, 0, 1, 10, 50, 50, 500],
+ "_Test Item Home Desktop 200": [3, 0, 3, 15, 150, 150, 750],
+ }
+
+ # check if children are saved
+ self.assertEquals(len(si.doclist.get({"parentfield": "entries"})),
+ len(expected_values)-1)
+
+ # check if item values are calculated
+ for d in si.doclist.get({"parentfield": "entries"}):
+ for i, k in enumerate(expected_values["keys"]):
+ self.assertEquals(d.fields.get(k), expected_values[d.item_code][i])
+
+ # check net total
+ self.assertEquals(si.doc.net_total, 1250)
+ self.assertEquals(si.doc.net_total_export, 25)
+
+ # check tax calculation
+ expected_values = {
+ "keys": ["tax_amount", "total"],
+ "_Test Account Shipping Charges - _TC": [100, 1350],
+ "_Test Account Customs Duty - _TC": [125, 1475],
+ "_Test Account Excise Duty - _TC": [140, 1615],
+ "_Test Account Education Cess - _TC": [2.8, 1617.8],
+ "_Test Account S&H Education Cess - _TC": [1.4, 1619.2],
+ "_Test Account CST - _TC": [32.38, 1651.58],
+ "_Test Account VAT - _TC": [156.25, 1807.83],
+ "_Test Account Discount - _TC": [-180.78, 1627.05]
+ }
+
+ for d in si.doclist.get({"parentfield": "other_charges"}):
+ for i, k in enumerate(expected_values["keys"]):
+ self.assertEquals(d.fields.get(k), expected_values[d.account_head][i])
+
+ self.assertEquals(si.doc.grand_total, 1627.05)
+ self.assertEquals(si.doc.grand_total_export, 32.54)
+
+ def test_inclusive_rate_validations(self):
+ si = webnotes.bean(copy=test_records[2])
+ for i, tax in enumerate(si.doclist.get({"parentfield": "other_charges"})):
+ tax.idx = i+1
+
+ si.doclist[1].ref_rate = 62.5
+ si.doclist[1].ref_rate = 191
+ for i in [3, 5, 6, 7, 8, 9]:
+ si.doclist[i].included_in_print_rate = 1
+
+ # tax type "Actual" cannot be inclusive
+ self.assertRaises(webnotes.ValidationError, si.run_method, "calculate_taxes_and_totals")
+
+ # taxes above included type 'On Previous Row Total' should also be included
+ si.doclist[3].included_in_print_rate = 0
+ self.assertRaises(webnotes.ValidationError, si.run_method, "calculate_taxes_and_totals")
+
+ def test_sales_invoice_calculation_base_currency_with_tax_inclusive_price(self):
+ # prepare
+ si = webnotes.bean(copy=test_records[3])
+ si.run_method("calculate_taxes_and_totals")
+ si.insert()
+
+ expected_values = {
+ "keys": ["ref_rate", "adj_rate", "export_rate", "export_amount",
+ "base_ref_rate", "basic_rate", "amount"],
+ "_Test Item Home Desktop 100": [62.5, 0, 62.5, 625.0, 50, 50, 500],
+ "_Test Item Home Desktop 200": [190.66, 0, 190.66, 953.3, 150, 150, 750],
+ }
+
+ # check if children are saved
+ self.assertEquals(len(si.doclist.get({"parentfield": "entries"})),
+ len(expected_values)-1)
+
+ # check if item values are calculated
+ for d in si.doclist.get({"parentfield": "entries"}):
+ for i, k in enumerate(expected_values["keys"]):
+ self.assertEquals(d.fields.get(k), expected_values[d.item_code][i])
+
+ # check net total
+ self.assertEquals(si.doc.net_total, 1250)
+ self.assertEquals(si.doc.net_total_export, 1578.3)
+
+ # check tax calculation
+ expected_values = {
+ "keys": ["tax_amount", "total"],
+ "_Test Account Excise Duty - _TC": [140, 1390],
+ "_Test Account Education Cess - _TC": [2.8, 1392.8],
+ "_Test Account S&H Education Cess - _TC": [1.4, 1394.2],
+ "_Test Account CST - _TC": [27.88, 1422.08],
+ "_Test Account VAT - _TC": [156.25, 1578.33],
+ "_Test Account Customs Duty - _TC": [125, 1703.33],
+ "_Test Account Shipping Charges - _TC": [100, 1803.33],
+ "_Test Account Discount - _TC": [-180.33, 1623]
+ }
+
+ for d in si.doclist.get({"parentfield": "other_charges"}):
+ for i, k in enumerate(expected_values["keys"]):
+ self.assertEquals(flt(d.fields.get(k), 6), expected_values[d.account_head][i])
+
+ self.assertEquals(si.doc.grand_total, 1623)
+ self.assertEquals(si.doc.grand_total_export, 1623)
+
+ def test_sales_invoice_calculation_export_currency_with_tax_inclusive_price(self):
+ # prepare
+ si = webnotes.bean(copy=test_records[3])
+ si.doc.currency = "USD"
+ si.doc.conversion_rate = 50
+ si.doclist[1].ref_rate = 55.56
+ si.doclist[1].adj_rate = 10
+ si.doclist[2].ref_rate = 187.5
+ si.doclist[2].adj_rate = 20
+ si.doclist[9].rate = 5000
+
+ si.run_method("calculate_taxes_and_totals")
+ si.insert()
+
+ expected_values = {
+ "keys": ["ref_rate", "adj_rate", "export_rate", "export_amount",
+ "base_ref_rate", "basic_rate", "amount"],
+ "_Test Item Home Desktop 100": [55.56, 10, 50, 500, 2222.11, 1999.9, 19999.0],
+ "_Test Item Home Desktop 200": [187.5, 20, 150, 750, 7375.66, 5900.53, 29502.65],
+ }
+
+ # check if children are saved
+ self.assertEquals(len(si.doclist.get({"parentfield": "entries"})),
+ len(expected_values)-1)
+
+ # check if item values are calculated
+ for d in si.doclist.get({"parentfield": "entries"}):
+ for i, k in enumerate(expected_values["keys"]):
+ self.assertEquals(d.fields.get(k), expected_values[d.item_code][i])
+
+ # check net total
+ self.assertEquals(si.doc.net_total, 49501.65)
+ self.assertEquals(si.doc.net_total_export, 1250)
+
+ # check tax calculation
+ expected_values = {
+ "keys": ["tax_amount", "total"],
+ "_Test Account Excise Duty - _TC": [5540.22, 55041.87],
+ "_Test Account Education Cess - _TC": [110.81, 55152.68],
+ "_Test Account S&H Education Cess - _TC": [55.4, 55208.08],
+ "_Test Account CST - _TC": [1104.16, 56312.24],
+ "_Test Account VAT - _TC": [6187.71, 62499.95],
+ "_Test Account Customs Duty - _TC": [4950.17, 67450.12],
+ "_Test Account Shipping Charges - _TC": [5000, 72450.12],
+ "_Test Account Discount - _TC": [-7245.01, 65205.11]
+ }
+
+ for d in si.doclist.get({"parentfield": "other_charges"}):
+ for i, k in enumerate(expected_values["keys"]):
+ self.assertEquals(flt(d.fields.get(k), 6), expected_values[d.account_head][i])
+
+ self.assertEquals(si.doc.grand_total, 65205.11)
+ self.assertEquals(si.doc.grand_total_export, 1304.1)
def test_outstanding(self):
w = self.make()
@@ -103,7 +317,7 @@
pos[0]["cash_bank_account"] = "_Test Account Bank Account - _TC"
pos[0]["paid_amount"] = 600.0
- si = webnotes.bean(pos)
+ si = webnotes.bean(copy=pos)
si.insert()
si.submit()
@@ -113,7 +327,7 @@
si.doc.name, as_dict=1)[0]
self.assertTrue(sle)
self.assertEquals([sle.item_code, sle.warehouse, sle.actual_qty],
- ["_Test Item", "_Test Warehouse", -5.0])
+ ["_Test Item", "_Test Warehouse", -1.0])
# check gl entries
stock_in_hand_account = webnotes.conn.get_value("Company", "_Test Company",
@@ -126,11 +340,11 @@
expected_gl_entries = sorted([
[si.doc.debit_to, 630.0, 0.0],
- [test_records[1][1]["income_account"], 0.0, 500.0],
- [test_records[1][2]["account_head"], 0.0, 80.0],
- [test_records[1][3]["account_head"], 0.0, 50.0],
- [stock_in_hand_account, 0.0, 375.0],
- [test_records[1][1]["expense_account"], 375.0, 0.0],
+ [pos[1]["income_account"], 0.0, 500.0],
+ [pos[2]["account_head"], 0.0, 80.0],
+ [pos[3]["account_head"], 0.0, 50.0],
+ [stock_in_hand_account, 0.0, 75.0],
+ [pos[1]["expense_account"], 75.0, 0.0],
[si.doc.debit_to, 0.0, 600.0],
["_Test Account Bank Account - _TC", 600.0, 0.0]
])
@@ -444,7 +658,7 @@
"description": "VAT",
"doctype": "Sales Taxes and Charges",
"parentfield": "other_charges",
- "tax_amount": 30.0,
+ "rate": 6,
},
{
"account_head": "_Test Account Service Tax - _TC",
@@ -452,7 +666,7 @@
"description": "Service Tax",
"doctype": "Sales Taxes and Charges",
"parentfield": "other_charges",
- "tax_amount": 31.8,
+ "rate": 6.36,
},
{
"parentfield": "sales_team",
@@ -494,7 +708,7 @@
"description": "_Test Item",
"doctype": "Sales Invoice Item",
"parentfield": "entries",
- "qty": 5.0,
+ "qty": 1.0,
"basic_rate": 500.0,
"amount": 500.0,
"export_rate": 500.0,
@@ -509,7 +723,7 @@
"description": "VAT",
"doctype": "Sales Taxes and Charges",
"parentfield": "other_charges",
- "tax_amount": 80.0,
+ "rate": 16,
},
{
"account_head": "_Test Account Service Tax - _TC",
@@ -517,7 +731,270 @@
"description": "Service Tax",
"doctype": "Sales Taxes and Charges",
"parentfield": "other_charges",
- "tax_amount": 50.0,
+ "rate": 10
}
],
+ [
+ {
+ "naming_series": "_T-Sales Invoice-",
+ "company": "_Test Company",
+ "conversion_rate": 1.0,
+ "currency": "INR",
+ "debit_to": "_Test Customer - _TC",
+ "customer": "_Test Customer",
+ "customer_name": "_Test Customer",
+ "doctype": "Sales Invoice",
+ "due_date": "2013-01-23",
+ "fiscal_year": "_Test Fiscal Year 2013",
+ "grand_total_export": 0,
+ "plc_conversion_rate": 1.0,
+ "posting_date": "2013-01-23",
+ "price_list_currency": "INR",
+ "price_list_name": "_Test Price List",
+ "territory": "_Test Territory",
+ },
+ # items
+ {
+ "doctype": "Sales Invoice Item",
+ "parentfield": "entries",
+ "item_code": "_Test Item Home Desktop 100",
+ "item_name": "_Test Item Home Desktop 100",
+ "qty": 10,
+ "ref_rate": 50,
+ "export_rate": 50,
+ "stock_uom": "_Test UOM",
+ "item_tax_rate": json.dumps({"_Test Account Excise Duty - _TC": 10}),
+ "income_account": "Sales - _TC",
+ "cost_center": "_Test Cost Center - _TC",
+
+ },
+ {
+ "doctype": "Sales Invoice Item",
+ "parentfield": "entries",
+ "item_code": "_Test Item Home Desktop 200",
+ "item_name": "_Test Item Home Desktop 200",
+ "qty": 5,
+ "ref_rate": 150,
+ "export_rate": 150,
+ "stock_uom": "_Test UOM",
+ "income_account": "Sales - _TC",
+ "cost_center": "_Test Cost Center - _TC",
+
+ },
+ # taxes
+ {
+ "doctype": "Sales Taxes and Charges",
+ "parentfield": "other_charges",
+ "charge_type": "Actual",
+ "account_head": "_Test Account Shipping Charges - _TC",
+ "cost_center": "_Test Cost Center - _TC",
+ "description": "Shipping Charges",
+ "rate": 100
+ },
+ {
+ "doctype": "Sales Taxes and Charges",
+ "parentfield": "other_charges",
+ "charge_type": "On Net Total",
+ "account_head": "_Test Account Customs Duty - _TC",
+ "cost_center": "_Test Cost Center - _TC",
+ "description": "Customs Duty",
+ "rate": 10
+ },
+ {
+ "doctype": "Sales Taxes and Charges",
+ "parentfield": "other_charges",
+ "charge_type": "On Net Total",
+ "account_head": "_Test Account Excise Duty - _TC",
+ "cost_center": "_Test Cost Center - _TC",
+ "description": "Excise Duty",
+ "rate": 12
+ },
+ {
+ "doctype": "Sales Taxes and Charges",
+ "parentfield": "other_charges",
+ "charge_type": "On Previous Row Amount",
+ "account_head": "_Test Account Education Cess - _TC",
+ "cost_center": "_Test Cost Center - _TC",
+ "description": "Education Cess",
+ "rate": 2,
+ "row_id": 3
+ },
+ {
+ "doctype": "Sales Taxes and Charges",
+ "parentfield": "other_charges",
+ "charge_type": "On Previous Row Amount",
+ "account_head": "_Test Account S&H Education Cess - _TC",
+ "cost_center": "_Test Cost Center - _TC",
+ "description": "S&H Education Cess",
+ "rate": 1,
+ "row_id": 3
+ },
+ {
+ "doctype": "Sales Taxes and Charges",
+ "parentfield": "other_charges",
+ "charge_type": "On Previous Row Total",
+ "account_head": "_Test Account CST - _TC",
+ "cost_center": "_Test Cost Center - _TC",
+ "description": "CST",
+ "rate": 2,
+ "row_id": 5
+ },
+ {
+ "doctype": "Sales Taxes and Charges",
+ "parentfield": "other_charges",
+ "charge_type": "On Net Total",
+ "account_head": "_Test Account VAT - _TC",
+ "cost_center": "_Test Cost Center - _TC",
+ "description": "VAT",
+ "rate": 12.5
+ },
+ {
+ "doctype": "Sales Taxes and Charges",
+ "parentfield": "other_charges",
+ "charge_type": "On Previous Row Total",
+ "account_head": "_Test Account Discount - _TC",
+ "cost_center": "_Test Cost Center - _TC",
+ "description": "Discount",
+ "rate": -10,
+ "row_id": 7
+ },
+ ],
+ [
+ {
+ "naming_series": "_T-Sales Invoice-",
+ "company": "_Test Company",
+ "conversion_rate": 1.0,
+ "currency": "INR",
+ "debit_to": "_Test Customer - _TC",
+ "customer": "_Test Customer",
+ "customer_name": "_Test Customer",
+ "doctype": "Sales Invoice",
+ "due_date": "2013-01-23",
+ "fiscal_year": "_Test Fiscal Year 2013",
+ "grand_total_export": 0,
+ "plc_conversion_rate": 1.0,
+ "posting_date": "2013-01-23",
+ "price_list_currency": "INR",
+ "price_list_name": "_Test Price List",
+ "territory": "_Test Territory",
+ },
+ # items
+ {
+ "doctype": "Sales Invoice Item",
+ "parentfield": "entries",
+ "item_code": "_Test Item Home Desktop 100",
+ "item_name": "_Test Item Home Desktop 100",
+ "qty": 10,
+ "ref_rate": 62.5,
+ "export_rate": 62.5,
+ "stock_uom": "_Test UOM",
+ "item_tax_rate": json.dumps({"_Test Account Excise Duty - _TC": 10}),
+ "income_account": "Sales - _TC",
+ "cost_center": "_Test Cost Center - _TC",
+
+ },
+ {
+ "doctype": "Sales Invoice Item",
+ "parentfield": "entries",
+ "item_code": "_Test Item Home Desktop 200",
+ "item_name": "_Test Item Home Desktop 200",
+ "qty": 5,
+ "ref_rate": 190.66,
+ "export_rate": 190.66,
+ "stock_uom": "_Test UOM",
+ "income_account": "Sales - _TC",
+ "cost_center": "_Test Cost Center - _TC",
+
+ },
+ # taxes
+ {
+ "doctype": "Sales Taxes and Charges",
+ "parentfield": "other_charges",
+ "charge_type": "On Net Total",
+ "account_head": "_Test Account Excise Duty - _TC",
+ "cost_center": "_Test Cost Center - _TC",
+ "description": "Excise Duty",
+ "rate": 12,
+ "included_in_print_rate": 1,
+ "idx": 1
+ },
+ {
+ "doctype": "Sales Taxes and Charges",
+ "parentfield": "other_charges",
+ "charge_type": "On Previous Row Amount",
+ "account_head": "_Test Account Education Cess - _TC",
+ "cost_center": "_Test Cost Center - _TC",
+ "description": "Education Cess",
+ "rate": 2,
+ "row_id": 1,
+ "included_in_print_rate": 1,
+ "idx": 2
+ },
+ {
+ "doctype": "Sales Taxes and Charges",
+ "parentfield": "other_charges",
+ "charge_type": "On Previous Row Amount",
+ "account_head": "_Test Account S&H Education Cess - _TC",
+ "cost_center": "_Test Cost Center - _TC",
+ "description": "S&H Education Cess",
+ "rate": 1,
+ "row_id": 1,
+ "included_in_print_rate": 1,
+ "idx": 3
+ },
+ {
+ "doctype": "Sales Taxes and Charges",
+ "parentfield": "other_charges",
+ "charge_type": "On Previous Row Total",
+ "account_head": "_Test Account CST - _TC",
+ "cost_center": "_Test Cost Center - _TC",
+ "description": "CST",
+ "rate": 2,
+ "row_id": 3,
+ "included_in_print_rate": 1,
+ "idx": 4
+ },
+ {
+ "doctype": "Sales Taxes and Charges",
+ "parentfield": "other_charges",
+ "charge_type": "On Net Total",
+ "account_head": "_Test Account VAT - _TC",
+ "cost_center": "_Test Cost Center - _TC",
+ "description": "VAT",
+ "rate": 12.5,
+ "included_in_print_rate": 1,
+ "idx": 5
+ },
+ {
+ "doctype": "Sales Taxes and Charges",
+ "parentfield": "other_charges",
+ "charge_type": "On Net Total",
+ "account_head": "_Test Account Customs Duty - _TC",
+ "cost_center": "_Test Cost Center - _TC",
+ "description": "Customs Duty",
+ "rate": 10,
+ "idx": 6
+ },
+ {
+ "doctype": "Sales Taxes and Charges",
+ "parentfield": "other_charges",
+ "charge_type": "Actual",
+ "account_head": "_Test Account Shipping Charges - _TC",
+ "cost_center": "_Test Cost Center - _TC",
+ "description": "Shipping Charges",
+ "rate": 100,
+ "idx": 7
+ },
+ {
+ "doctype": "Sales Taxes and Charges",
+ "parentfield": "other_charges",
+ "charge_type": "On Previous Row Total",
+ "account_head": "_Test Account Discount - _TC",
+ "cost_center": "_Test Cost Center - _TC",
+ "description": "Discount",
+ "rate": -10,
+ "row_id": 7,
+ "idx": 8
+ },
+ ],
]
\ No newline at end of file
diff --git a/accounts/doctype/sales_invoice_advance/README.md b/accounts/doctype/sales_invoice_advance/README.md
new file mode 100644
index 0000000..e4a8062
--- /dev/null
+++ b/accounts/doctype/sales_invoice_advance/README.md
@@ -0,0 +1 @@
+Details of advances paid by Customers against Sales Invoice.
\ No newline at end of file
diff --git a/accounts/doctype/sales_invoice_item/README.md b/accounts/doctype/sales_invoice_item/README.md
new file mode 100644
index 0000000..ff82835
--- /dev/null
+++ b/accounts/doctype/sales_invoice_item/README.md
@@ -0,0 +1 @@
+Item details of parent Sales Invoice.
\ No newline at end of file
diff --git a/accounts/doctype/sales_invoice_item/sales_invoice_item.txt b/accounts/doctype/sales_invoice_item/sales_invoice_item.txt
index 89c86f8..014a9f4 100644
--- a/accounts/doctype/sales_invoice_item/sales_invoice_item.txt
+++ b/accounts/doctype/sales_invoice_item/sales_invoice_item.txt
@@ -2,7 +2,7 @@
{
"creation": "2013-04-19 11:00:07",
"docstatus": 0,
- "modified": "2013-05-22 12:06:15",
+ "modified": "2013-05-22 12:07:00",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -107,7 +107,7 @@
"oldfieldtype": "Currency",
"options": "currency",
"print_hide": 1,
- "read_only": 0,
+ "read_only": 1,
"reqd": 0
},
{
@@ -163,7 +163,7 @@
"oldfieldtype": "Currency",
"options": "Company:company:default_currency",
"print_hide": 1,
- "read_only": 0,
+ "read_only": 1,
"reqd": 1,
"search_index": 0
},
diff --git a/accounts/doctype/sales_taxes_and_charges/README.md b/accounts/doctype/sales_taxes_and_charges/README.md
new file mode 100644
index 0000000..947bc18
--- /dev/null
+++ b/accounts/doctype/sales_taxes_and_charges/README.md
@@ -0,0 +1 @@
+Tax details for all sales transactions.
\ No newline at end of file
diff --git a/accounts/doctype/sales_taxes_and_charges/sales_taxes_and_charges.txt b/accounts/doctype/sales_taxes_and_charges/sales_taxes_and_charges.txt
index 161eb00..ba9f907 100644
--- a/accounts/doctype/sales_taxes_and_charges/sales_taxes_and_charges.txt
+++ b/accounts/doctype/sales_taxes_and_charges/sales_taxes_and_charges.txt
@@ -1,8 +1,8 @@
[
{
- "creation": "2013-02-22 01:27:41",
+ "creation": "2013-04-24 11:39:32",
"docstatus": 0,
- "modified": "2013-04-17 14:05:18",
+ "modified": "2013-05-28 11:59:02",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -50,7 +50,7 @@
{
"default": ":Company",
"doctype": "DocField",
- "fieldname": "cost_center_other_charges",
+ "fieldname": "cost_center",
"fieldtype": "Link",
"label": "Cost Center",
"oldfieldname": "cost_center_other_charges",
@@ -85,6 +85,7 @@
"oldfieldname": "tax_amount",
"oldfieldtype": "Currency",
"options": "Company:company:default_currency",
+ "read_only": 1,
"reqd": 0
},
{
@@ -129,34 +130,6 @@
"search_index": 1
},
{
- "description": "Cheating Field\nPlease do not delete ",
- "doctype": "DocField",
- "fieldname": "total_tax_amount",
- "fieldtype": "Currency",
- "hidden": 1,
- "label": "Total Tax Amount",
- "no_copy": 1,
- "oldfieldname": "total_tax_amount",
- "oldfieldtype": "Currency",
- "options": "Company:company:default_currency",
- "print_hide": 1,
- "report_hide": 1
- },
- {
- "description": "Cheating Field\nPlease do not delete ",
- "doctype": "DocField",
- "fieldname": "total_amount",
- "fieldtype": "Currency",
- "hidden": 1,
- "label": "Total Amount",
- "no_copy": 1,
- "oldfieldname": "total_amount",
- "oldfieldtype": "Currency",
- "options": "Company:company:default_currency",
- "print_hide": 1,
- "report_hide": 1
- },
- {
"allow_on_submit": 0,
"description": "If checked, the tax amount will be considered as already included in the Print Rate / Print Amount",
"doctype": "DocField",
diff --git a/accounts/doctype/sales_taxes_and_charges_master/README.md b/accounts/doctype/sales_taxes_and_charges_master/README.md
new file mode 100644
index 0000000..600a6bf
--- /dev/null
+++ b/accounts/doctype/sales_taxes_and_charges_master/README.md
@@ -0,0 +1 @@
+Template for tax structure in sales transactions.
\ No newline at end of file
diff --git a/accounts/doctype/sales_taxes_and_charges_master/sales_taxes_and_charges_master.js b/accounts/doctype/sales_taxes_and_charges_master/sales_taxes_and_charges_master.js
index 1e72010..5787427 100644
--- a/accounts/doctype/sales_taxes_and_charges_master/sales_taxes_and_charges_master.js
+++ b/accounts/doctype/sales_taxes_and_charges_master/sales_taxes_and_charges_master.js
@@ -140,7 +140,7 @@
return 'SELECT tabAccount.name FROM tabAccount WHERE tabAccount.group_or_ledger="Ledger" AND tabAccount.docstatus != 2 AND tabAccount.account_type in ("Tax", "Chargeable", "Income Account") AND tabAccount.company = "'+doc.company+'" AND tabAccount.name LIKE "%s"'
}
-cur_frm.fields_dict['other_charges'].grid.get_field("cost_center_other_charges").get_query = function(doc) {
+cur_frm.fields_dict['other_charges'].grid.get_field("cost_center").get_query = function(doc) {
return 'SELECT `tabCost Center`.`name` FROM `tabCost Center` WHERE `tabCost Center`.`company_name` = "' +doc.company+'" AND `tabCost Center`.%(key)s LIKE "%s" AND `tabCost Center`.`group_or_ledger` = "Ledger" AND `tabCost Center`.`docstatus`!= 2 ORDER BY `tabCost Center`.`name` ASC LIMIT 50';
}
diff --git a/accounts/doctype/trend_analyzer_control/__init__.py b/accounts/doctype/trend_analyzer_control/__init__.py
deleted file mode 100755
index baffc48..0000000
--- a/accounts/doctype/trend_analyzer_control/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-from __future__ import unicode_literals
diff --git a/accounts/doctype/trend_analyzer_control/locale/_messages_doc.json b/accounts/doctype/trend_analyzer_control/locale/_messages_doc.json
deleted file mode 100644
index 9a2dc73..0000000
--- a/accounts/doctype/trend_analyzer_control/locale/_messages_doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-[
- "Trend Analyzer Control",
- "Accounts"
-]
\ No newline at end of file
diff --git a/accounts/doctype/trend_analyzer_control/locale/ar-doc.json b/accounts/doctype/trend_analyzer_control/locale/ar-doc.json
deleted file mode 100644
index d608292..0000000
--- a/accounts/doctype/trend_analyzer_control/locale/ar-doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "Accounts": "\u062d\u0633\u0627\u0628\u0627\u062a",
- "Trend Analyzer Control": "\u0627\u0644\u0627\u062a\u062c\u0627\u0647 \u0645\u062d\u0644\u0644 \u0627\u0644\u062a\u062d\u0643\u0645"
-}
\ No newline at end of file
diff --git a/accounts/doctype/trend_analyzer_control/locale/de-doc.json b/accounts/doctype/trend_analyzer_control/locale/de-doc.json
deleted file mode 100644
index ef575dd..0000000
--- a/accounts/doctype/trend_analyzer_control/locale/de-doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "Accounts": "Konten",
- "Trend Analyzer Control": "Trend Analyzer Steuerung"
-}
\ No newline at end of file
diff --git a/accounts/doctype/trend_analyzer_control/locale/es-doc.json b/accounts/doctype/trend_analyzer_control/locale/es-doc.json
deleted file mode 100644
index d06a536..0000000
--- a/accounts/doctype/trend_analyzer_control/locale/es-doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "Accounts": "Cuentas",
- "Trend Analyzer Control": "Trend Control Analizador"
-}
\ No newline at end of file
diff --git a/accounts/doctype/trend_analyzer_control/locale/fr-doc.json b/accounts/doctype/trend_analyzer_control/locale/fr-doc.json
deleted file mode 100644
index 12fe511..0000000
--- a/accounts/doctype/trend_analyzer_control/locale/fr-doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "Accounts": "Comptes",
- "Trend Analyzer Control": "Contr\u00f4le Analyseur de tendance"
-}
\ No newline at end of file
diff --git a/accounts/doctype/trend_analyzer_control/locale/hi-doc.json b/accounts/doctype/trend_analyzer_control/locale/hi-doc.json
deleted file mode 100644
index e2c7f08..0000000
--- a/accounts/doctype/trend_analyzer_control/locale/hi-doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "Accounts": "\u0932\u0947\u0916\u093e",
- "Trend Analyzer Control": "\u0930\u0941\u091d\u093e\u0928 \u0935\u093f\u0936\u094d\u0932\u0947\u0937\u0915 \u0928\u093f\u092f\u0902\u0924\u094d\u0930\u0923"
-}
\ No newline at end of file
diff --git a/accounts/doctype/trend_analyzer_control/locale/hr-doc.json b/accounts/doctype/trend_analyzer_control/locale/hr-doc.json
deleted file mode 100644
index 18ecc73..0000000
--- a/accounts/doctype/trend_analyzer_control/locale/hr-doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "Accounts": "Ra\u010duni",
- "Trend Analyzer Control": "Trend Analyzer kontrola"
-}
\ No newline at end of file
diff --git a/accounts/doctype/trend_analyzer_control/locale/nl-doc.json b/accounts/doctype/trend_analyzer_control/locale/nl-doc.json
deleted file mode 100644
index 60c0274..0000000
--- a/accounts/doctype/trend_analyzer_control/locale/nl-doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "Accounts": "Accounts",
- "Trend Analyzer Control": "Trendanalyse Controle"
-}
\ No newline at end of file
diff --git a/accounts/doctype/trend_analyzer_control/locale/pt-BR-doc.json b/accounts/doctype/trend_analyzer_control/locale/pt-BR-doc.json
deleted file mode 100644
index 9f99885..0000000
--- a/accounts/doctype/trend_analyzer_control/locale/pt-BR-doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "Accounts": "Contas",
- "Trend Analyzer Control": "Controle do Analisador de tend\u00eancia"
-}
\ No newline at end of file
diff --git a/accounts/doctype/trend_analyzer_control/locale/pt-doc.json b/accounts/doctype/trend_analyzer_control/locale/pt-doc.json
deleted file mode 100644
index ee95c40..0000000
--- a/accounts/doctype/trend_analyzer_control/locale/pt-doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "Accounts": "Contas",
- "Trend Analyzer Control": "Controlo Analyzer tend\u00eancia"
-}
\ No newline at end of file
diff --git a/accounts/doctype/trend_analyzer_control/locale/sr-doc.json b/accounts/doctype/trend_analyzer_control/locale/sr-doc.json
deleted file mode 100644
index 06ee34c..0000000
--- a/accounts/doctype/trend_analyzer_control/locale/sr-doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "Accounts": "\u0420\u0430\u0447\u0443\u043d\u0438",
- "Trend Analyzer Control": "\u0422\u0440\u0435\u043d\u0434 \u0410\u043d\u0430\u043b\u0438\u0437\u0435\u0440 \u041a\u043e\u043d\u0442\u0440\u043e\u043b\u0430"
-}
\ No newline at end of file
diff --git a/accounts/doctype/trend_analyzer_control/locale/ta-doc.json b/accounts/doctype/trend_analyzer_control/locale/ta-doc.json
deleted file mode 100644
index eea8f0e..0000000
--- a/accounts/doctype/trend_analyzer_control/locale/ta-doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "Accounts": "\u0b95\u0ba3\u0b95\u0bcd\u0b95\u0bc1\u0b95\u0bb3\u0bcd",
- "Trend Analyzer Control": "\u0baa\u0bc7\u0bbe\u0b95\u0bcd\u0b95\u0bc1 \u0baa\u0b95\u0bc1\u0baa\u0bcd\u0baa\u0bbe\u0baf\u0bcd\u0bb5\u0bbf \u0b95\u0b9f\u0bcd\u0b9f\u0bc1\u0baa\u0bcd\u0baa\u0bbe\u0b9f\u0bc1"
-}
\ No newline at end of file
diff --git a/accounts/doctype/trend_analyzer_control/locale/th-doc.json b/accounts/doctype/trend_analyzer_control/locale/th-doc.json
deleted file mode 100644
index 23eaa1a..0000000
--- a/accounts/doctype/trend_analyzer_control/locale/th-doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "Accounts": "\u0e1a\u0e31\u0e0d\u0e0a\u0e35",
- "Trend Analyzer Control": "\u0e04\u0e27\u0e1a\u0e04\u0e38\u0e21\u0e27\u0e34\u0e40\u0e04\u0e23\u0e32\u0e30\u0e2b\u0e4c\u0e41\u0e19\u0e27\u0e42\u0e19\u0e49\u0e21"
-}
\ No newline at end of file
diff --git a/accounts/doctype/trend_analyzer_control/trend_analyzer_control.py b/accounts/doctype/trend_analyzer_control/trend_analyzer_control.py
deleted file mode 100755
index 8c9f227..0000000
--- a/accounts/doctype/trend_analyzer_control/trend_analyzer_control.py
+++ /dev/null
@@ -1,115 +0,0 @@
-# ERPNext - web based ERP (http://erpnext.com)
-# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-from __future__ import unicode_literals
-import webnotes
-
-from webnotes.utils import add_days, add_months, cint, cstr
-from webnotes.model import db_exists
-from webnotes.model.bean import copy_doclist
-
-sql = webnotes.conn.sql
-
-
-class DocType:
- def __init__(self, d, dl):
- self.doc, self.doclist = d, dl
-
-
- # Define Globals
- # ---------------
- def define_globals(self, trans, fiscal_year):
- self.month_name = ['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec']
-
- if trans == 'Purchase Receipt' or trans == 'Delivery Note' or trans == 'Purchase Invoice' or trans == 'Sales Invoice':
- self.trans_date = 'posting_date'
- else:
- self.trans_date = 'transaction_date'
-
- ysd = sql("select year_start_date from `tabFiscal Year` where name = %s",fiscal_year)[0][0]
- self.year_start_date = ysd.strftime('%Y-%m-%d')
- self.start_month = cint(self.year_start_date.split('-')[1])
-
-
- # Get Column Names and Query for Annual Trend
- # ---------------------------------------------
- def get_annual_trend_details(self, fiscal_year):
- col_names = [fiscal_year+' (Qty)', fiscal_year+' (Amt)']
- query_val = 'SUM(t2.qty) ,SUM(t2.amount),'
- return col_names, query_val
-
-
- # Get Column Names and Query for Half Yearly Trend
- # --------------------------------------------------
- def get_half_yearly_trend_details(self):
- first_half_start = self.year_start_date
- first_half_end = add_days(add_months(first_half_start,6),-1)
- second_half_start = add_days(first_half_end,1)
- second_half_end = add_days(add_months(second_half_start,6),-1)
-
- col_names = ['First Half (Qty)', 'First Half (Amt)', 'Second Half (Qty)', 'Second Half (Amt)']
-
- query_val = 'SUM(CASE WHEN t1.'+self.trans_date+' BETWEEN "'+first_half_start+'" AND "'+first_half_end+'" THEN t2.qty ELSE NULL END), SUM(CASE WHEN t1.'+self.trans_date+' BETWEEN "'+first_half_start+'" AND "'+first_half_end+'" THEN t2.amount ELSE NULL END), SUM(CASE WHEN t1.'+self.trans_date+' BETWEEN "'+second_half_start+'" AND "'+second_half_end+'" THEN t2.qty ELSE NULL END), SUM(CASE WHEN t1.'+self.trans_date+' BETWEEN "'+second_half_start+'" AND "'+second_half_end+'" THEN t2.amount ELSE NULL END),'
-
- return col_names, query_val
-
-
- # Get Column Names and Query for Quarterly Trend
- # ------------------------------------------------
- def get_quarterly_trend_details(self):
- first_qsd, second_qsd, third_qsd, fourth_qsd = self.year_start_date, add_months(self.year_start_date,3), add_months(self.year_start_date,6), add_months(self.year_start_date,9)
-
- first_qed, second_qed, third_qed, fourth_qed = add_days(add_months(first_qsd,3),-1), add_days(add_months(second_qsd,3),-1), add_days(add_months(third_qsd,3),-1), add_days(add_months(fourth_qsd,3),-1)
-
- col_names = ['Q1 (Qty)','Q1 (Amt)','Q2 (Qty)','Q2 (Amt)','Q3 (Qty)','Q3 (Amt)','Q4 (Qty)','Q4 (Amt)']
- query_val = ''
- bet_dates = [[first_qsd,first_qed],[second_qsd,second_qed],[third_qsd,third_qed],[fourth_qsd,fourth_qed]]
-
- for d in bet_dates:
- query_val += 'SUM(CASE WHEN t1.'+self.trans_date+' BETWEEN "'+d[0]+'" AND "'+d[1]+'" THEN t2.qty ELSE NULL END), SUM(CASE WHEN t1.'+self.trans_date+' BETWEEN "'+d[0]+'" AND "'+d[1]+'" THEN t2.amount ELSE NULL END),'
-
- return col_names, query_val
-
-
- # Get Column Names and Query for Monthly Trend
- # -----------------------------------------------
- def get_monthly_trend_details(self):
- col_names, query_val = [], ''
- for i in range(self.start_month-1, len(self.month_name)):
- col_names.append(self.month_name[i]+' (Qty)')
- col_names.append(self.month_name[i]+' (Amt)')
- query_val += 'SUM(CASE WHEN MONTH(t1.'+self.trans_date+') = '+cstr(i+1)+' THEN t2.qty ELSE NULL END), SUM(CASE WHEN MONTH(t1.'+self.trans_date+') = '+cstr(i+1)+' THEN t2.amount ELSE NULL END),'
-
- for i in range(0, self.start_month-1):
- col_names.append(self.month_name[i]+' (Qty)')
- col_names.append(self.month_name[i]+' (Amt)')
- query_val += 'SUM(CASE WHEN MONTH(t1.'+self.trans_date+') = '+cstr(i+1)+' THEN t2.qty ELSE NULL END), SUM(CASE WHEN MONTH(t1.'+self.trans_date+') = '+cstr(i+1)+' THEN t2.amount ELSE NULL END),'
-
- return col_names, query_val
-
-
- # Get Single Year Trend's Query and Columns
- # -------------------------------------------
- def get_single_year_query_value(self, fiscal_year, period, trans, trans_det):
- self.define_globals(trans, fiscal_year)
- if period == 'Annual':
- return self.get_annual_trend_details(fiscal_year)
- elif period == 'Half Yearly':
- return self.get_half_yearly_trend_details()
- elif period == 'Quarterly':
- return self.get_quarterly_trend_details()
- elif period == 'Monthly':
- return self.get_monthly_trend_details()
diff --git a/accounts/doctype/trend_analyzer_control/trend_analyzer_control.txt b/accounts/doctype/trend_analyzer_control/trend_analyzer_control.txt
deleted file mode 100755
index 67c91ee..0000000
--- a/accounts/doctype/trend_analyzer_control/trend_analyzer_control.txt
+++ /dev/null
@@ -1,23 +0,0 @@
-[
- {
- "creation": "2012-03-27 14:35:49",
- "docstatus": 0,
- "modified": "2012-03-27 14:35:49",
- "modified_by": "Administrator",
- "owner": "saumil@webnotestech.com"
- },
- {
- "doctype": "DocType",
- "in_create": 1,
- "issingle": 1,
- "module": "Accounts",
- "name": "__common__",
- "read_only": 1,
- "section_style": "Simple",
- "version": 11
- },
- {
- "doctype": "DocType",
- "name": "Trend Analyzer Control"
- }
-]
\ No newline at end of file
diff --git a/accounts/page/accounts_browser/README.md b/accounts/page/accounts_browser/README.md
new file mode 100644
index 0000000..b879561
--- /dev/null
+++ b/accounts/page/accounts_browser/README.md
@@ -0,0 +1 @@
+Tree view browser for Chart of Accounts and Chart of Cost Centers
\ No newline at end of file
diff --git a/accounts/page/accounts_browser/accounts_browser.html b/accounts/page/accounts_browser/accounts_browser.html
deleted file mode 100644
index 91a1e26..0000000
--- a/accounts/page/accounts_browser/accounts_browser.html
+++ /dev/null
@@ -1,18 +0,0 @@
-<div class="layout-wrapper layout-wrapper-background">
- <div class="appframe-area"></div>
- <div class="layout-main">
- <div class="tree-area"></div>
- <hr>
- <div class="well">
- <h4>Quick Help</h4>
- <ol>
- <li>To add child nodes, explore tree and click on the node under which you want to add more nodes.
- <li>Accounting Entries can be made against leaf nodes, called <b>Ledgers</b>. Entries against <b>Groups</b> are not allowed.
- <li>Please do NOT create Account (Ledgers) for Customers and Suppliers. They are created directly from the Customer / Supplier masters.
- <li><b>To create a Bank Account:</b> Go to the appropriate group (usually Application of Funds > Current Assets > Bank Accounts) and create a new Account Ledger (by clicking on Add Child) of type "Bank or Cash"
- <li><b>To create a Tax Account:</b> Go to the appropriate group (usually Source of Funds > Current Liabilities > Taxes and Duties) and create a new Account Ledger (by clicking on Add Child) of type "Tax" and do mention the Tax rate.
- </ol>
- <p>Please setup your chart of accounts before you start Accounting Entries</p>
- </div>
- </div>
-</div>
\ No newline at end of file
diff --git a/accounts/page/accounts_browser/accounts_browser.js b/accounts/page/accounts_browser/accounts_browser.js
index 2e8cc82..534201a 100644
--- a/accounts/page/accounts_browser/accounts_browser.js
+++ b/accounts/page/accounts_browser/accounts_browser.js
@@ -21,9 +21,37 @@
// see ledger
pscript['onload_Accounts Browser'] = function(wrapper){
- wrapper.appframe = new wn.ui.AppFrame($(wrapper).find('.appframe-area'));
- wrapper.appframe.add_home_breadcrumb()
- wrapper.appframe.add_module_breadcrumb("Accounts")
+ wn.ui.make_app_page({
+ parent: wrapper,
+ single_column: true
+ })
+
+ wrapper.appframe.add_module_icon("Accounts");
+
+ var main = $(wrapper).find(".layout-main"),
+ chart_area = $("<div>")
+ .css({"margin-bottom": "15px"})
+ .appendTo(main),
+ help_area = $('<div class="well">\
+ <h4>Quick Help</h4>\
+ <ol>\
+ <li>To add child nodes, explore tree and click on the node under which you \
+ want to add more nodes.\
+ <li>Accounting Entries can be made against leaf nodes, called <b>Ledgers</b>.\
+ Entries against <b>Groups</b> are not allowed.\
+ <li>Please do NOT create Account (Ledgers) for Customers and Suppliers. \
+ They are created directly from the Customer / Supplier masters.\
+ <li><b>To create a Bank Account:</b> Go to the appropriate group \
+ (usually Application of Funds > Current Assets > Bank Accounts)\
+ and create a new Account Ledger (by clicking on Add Child) of \
+ type "Bank or Cash"\
+ <li><b>To create a Tax Account:</b> Go to the appropriate group \
+ (usually Source of Funds > Current Liabilities > Taxes and Duties) \
+ and create a new Account Ledger (by clicking on Add Child) of type\
+ "Tax" and do mention the Tax rate.\
+ </ol>\
+ <p>Please setup your chart of accounts before you start Accounting Entries</p>\
+ </div>').appendTo(main);
if (wn.boot.profile.can_create.indexOf("Company") !== -1) {
wrapper.appframe.add_button('New Company', function() { newdoc('Company'); },
@@ -35,13 +63,13 @@
}, 'icon-refresh');
// company-select
- wrapper.$company_select = $('<select class="accbrowser-company-select"></select>')
+ wrapper.$company_select = wrapper.appframe.add_select("Company", [])
.change(function() {
var ctype = wn.get_route()[1] || 'Account';
- erpnext.account_chart = new erpnext.AccountsChart(ctype, $(this).val(), wrapper);
+ erpnext.account_chart = new erpnext.AccountsChart(ctype, $(this).val(),
+ chart_area.get(0));
pscript.set_title(wrapper, ctype, $(this).val());
})
- .appendTo(wrapper.appframe.$w.find('.appframe-toolbar'));
// load up companies
wn.call({
@@ -77,7 +105,7 @@
erpnext.AccountsChart = Class.extend({
init: function(ctype, company, wrapper) {
- $(wrapper).find('.tree-area').empty();
+ $(wrapper).empty();
var me = this;
me.ctype = ctype;
me.can_create = wn.model.can_create(this.ctype);
@@ -87,7 +115,7 @@
me.company = company;
this.tree = new wn.ui.Tree({
- parent: $(wrapper).find('.tree-area'),
+ parent: $(wrapper),
label: company,
args: {ctype: ctype, comp: company},
method: 'accounts.page.accounts_browser.accounts_browser.get_children',
diff --git a/accounts/page/financial_analytics/README.md b/accounts/page/financial_analytics/README.md
new file mode 100644
index 0000000..ccb56bb
--- /dev/null
+++ b/accounts/page/financial_analytics/README.md
@@ -0,0 +1 @@
+Trends (multi-year) for account balances including.
\ No newline at end of file
diff --git a/accounts/page/financial_analytics/financial_analytics.js b/accounts/page/financial_analytics/financial_analytics.js
index f714549..aac7076 100644
--- a/accounts/page/financial_analytics/financial_analytics.js
+++ b/accounts/page/financial_analytics/financial_analytics.js
@@ -25,7 +25,7 @@
erpnext.trial_balance = new erpnext.FinancialAnalytics(wrapper, 'Financial Analytics');
wrapper.appframe.add_home_breadcrumb()
- wrapper.appframe.add_module_breadcrumb("Accounts")
+ wrapper.appframe.add_module_icon("Accounts")
wrapper.appframe.add_breadcrumb("icon-bar-chart")
}
diff --git a/accounts/page/financial_statements/README.md b/accounts/page/financial_statements/README.md
new file mode 100644
index 0000000..1493ac9
--- /dev/null
+++ b/accounts/page/financial_statements/README.md
@@ -0,0 +1 @@
+Generate provisional Balance Sheet and Profit and Loss statements.
\ No newline at end of file
diff --git a/accounts/page/financial_statements/financial_statements.html b/accounts/page/financial_statements/financial_statements.html
index e6735fa..bc2fce0 100644
--- a/accounts/page/financial_statements/financial_statements.html
+++ b/accounts/page/financial_statements/financial_statements.html
@@ -1,28 +1,5 @@
-<div class="layout_wrapper">
+<div class="appframe col col-lg-12">
<div id="fs_header"></div>
-<!-- table.statement td { vertical-align: middle; } table.statement td select { width: 100px; } table.stmt_table { table-layout: fixed; border-collapse: collapse; } table.stmt_table td { vertical-align: middle; padding: 2px; } td.stmt_level0 { font-weight: bold; font-size: 14px; border-bottom: 1px solid #AAA; } td.stmt_level1 { font-weight: bold; font-size: 12px; } td.stmt_level2 { font-size: 11px; } td.stmt_level3 { font-size: 11px; } td.stmt_level4 { font-size: 12px; font-weight: bold; border-bottom: 1px solid #000; } td.stmt_level5 { color: BLUE; font-size: 11px; } --> <!--
-<div style="border: 1px solid #cccccc; padding: 4px; margin-top: 8px; background-color: #eeeeee; width: 98%;">
-<table class="statement" border="0" cellspacing="2px">
-<tbody>
-<tr>
-<td>Statement:</td>
-<td style="padding-right: 8px;" mce_style="padding-right: 8px;"><select id="stmt_type"></select></td>
-<td>Company:</td>
-<td style="padding-right: 8px;" mce_style="padding-right: 8px;"><select id="stmt_company"></select></td>
-<td>Period Type:</td>
-<td style="padding-right: 8px;" mce_style="padding-right: 8px;"><select id="stmt_period"></select></td>
-<td>Fiscal Year:</td>
-<td style="padding-right: 8px;" mce_style="padding-right: 8px;"><select id="stmt_fiscal_year"></select></td>
-<td style="padding-right: 8px;" mce_style="padding-right: 8px;">
-<div id="stmt_new"></div>
-</td>
-</tr>
-</tbody>
-</table>
-</div>
---> <!--
-<div style="margin:10px 0px 10px 0px" mce_style="margin:10px 0px 10px 0px"><button class="button" onclick="pscript.print_statement();">Print</button></div>
--->
<div id="print_html">
<div id="stmt_title1" style="margin:16px 0px 4px 0px; font-size: 16px; font-weight: bold; color: #888;"></div>
<div id="stmt_title2" style="margin:0px 0px 8px 0px; font-size: 16px; font-weight: bold;"></div>
diff --git a/accounts/page/general_ledger/README.md b/accounts/page/general_ledger/README.md
new file mode 100644
index 0000000..8c51e91
--- /dev/null
+++ b/accounts/page/general_ledger/README.md
@@ -0,0 +1 @@
+General Ledger report (for all transactions and accounts).
\ No newline at end of file
diff --git a/accounts/page/general_ledger/general_ledger.js b/accounts/page/general_ledger/general_ledger.js
index a462b70..6a7d604 100644
--- a/accounts/page/general_ledger/general_ledger.js
+++ b/accounts/page/general_ledger/general_ledger.js
@@ -24,7 +24,7 @@
erpnext.general_ledger = new erpnext.GeneralLedger(wrapper);
wrapper.appframe.add_home_breadcrumb()
- wrapper.appframe.add_module_breadcrumb("Accounts")
+ wrapper.appframe.add_module_icon("Accounts")
wrapper.appframe.add_breadcrumb("icon-bar-chart")
}
diff --git a/accounts/page/trial_balance/README.md b/accounts/page/trial_balance/README.md
new file mode 100644
index 0000000..cba659d
--- /dev/null
+++ b/accounts/page/trial_balance/README.md
@@ -0,0 +1 @@
+Period wise opening and closing balance of all transactions.
\ No newline at end of file
diff --git a/accounts/page/trial_balance/trial_balance.js b/accounts/page/trial_balance/trial_balance.js
index c64075f..9c4c50a 100644
--- a/accounts/page/trial_balance/trial_balance.js
+++ b/accounts/page/trial_balance/trial_balance.js
@@ -59,6 +59,6 @@
erpnext.trial_balance = new TrialBalance(wrapper, 'Trial Balance');
wrapper.appframe.add_home_breadcrumb()
- wrapper.appframe.add_module_breadcrumb("Accounts")
+ wrapper.appframe.add_module_icon("Accounts")
wrapper.appframe.add_breadcrumb("icon-bar-chart")
}
\ No newline at end of file
diff --git a/accounts/page/voucher_import_tool/README.md b/accounts/page/voucher_import_tool/README.md
new file mode 100644
index 0000000..84561ad
--- /dev/null
+++ b/accounts/page/voucher_import_tool/README.md
@@ -0,0 +1 @@
+Import accounting entries by uploading a csv file.
\ No newline at end of file
diff --git a/accounts/report/gross_profit/gross_profit.py b/accounts/report/gross_profit/gross_profit.py
index 9ccd320..798c718 100644
--- a/accounts/report/gross_profit/gross_profit.py
+++ b/accounts/report/gross_profit/gross_profit.py
@@ -92,7 +92,7 @@
timestamp(si.posting_date, si.posting_time) as posting_datetime
from `tabSales Invoice` si, `tabSales Invoice Item` item
where item.parent = si.name and si.docstatus = 1 %s
- and si.is_pos = 1 and si.update_stock = 1
+ and si.update_stock = 1
order by si.posting_date desc, si.posting_time desc""" % (conditions,), filters, as_dict=1)
source = delivery_note_items + sales_invoice_items
diff --git a/accounts/report/purchase_order_items_to_be_billed/purchase_order_items_to_be_billed.txt b/accounts/report/purchase_order_items_to_be_billed/purchase_order_items_to_be_billed.txt
index 7a9ec36..6b3bcf7 100644
--- a/accounts/report/purchase_order_items_to_be_billed/purchase_order_items_to_be_billed.txt
+++ b/accounts/report/purchase_order_items_to_be_billed/purchase_order_items_to_be_billed.txt
@@ -2,7 +2,7 @@
{
"creation": "2013-05-28 15:54:16",
"docstatus": 0,
- "modified": "2013-05-28 16:02:57",
+ "modified": "2013-06-05 13:01:05",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -11,7 +11,7 @@
"doctype": "Report",
"is_standard": "Yes",
"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`.qty as \"Qty:Float:100\",\n\t`tabPurchase Order Item`.billed_qty as \"Billed Qty:Float:100\", \n\t(`tabPurchase Order Item`.qty - ifnull(`tabPurchase Order Item`.billed_qty, 0)) as \"Qty to Bill:Float: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_qty, 0) < ifnull(`tabPurchase Order Item`.qty, 0)\norder by `tabPurchase Order`.transaction_date asc",
+ "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`.amount as \"Amount:Currency:100\",\n\t`tabPurchase Order Item`.billed_amt as \"Billed Amount:Currency:100\", \n\t(`tabPurchase Order Item`.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`.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"
diff --git a/accounts/report/received_items_to_be_billed/received_items_to_be_billed.txt b/accounts/report/received_items_to_be_billed/received_items_to_be_billed.txt
index 554e0f0..90617f8 100644
--- a/accounts/report/received_items_to_be_billed/received_items_to_be_billed.txt
+++ b/accounts/report/received_items_to_be_billed/received_items_to_be_billed.txt
@@ -2,7 +2,7 @@
{
"creation": "2013-05-28 15:57:59",
"docstatus": 0,
- "modified": "2013-05-28 17:34:05",
+ "modified": "2013-06-05 12:59:17",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -11,7 +11,7 @@
"doctype": "Report",
"is_standard": "Yes",
"name": "__common__",
- "query": "select \n `tabPurchase Receipt`.`name` as \"Purchase Receipt:Link/Purchase Receipt:120\",\n `tabPurchase Receipt`.`posting_date` as \"Date:Date:100\",\n `tabPurchase Receipt`.`supplier` as \"Supplier:Link/Supplier:120\",\n `tabPurchase Receipt Item`.`project_name` as \"Project\",\n\t`tabPurchase Receipt Item`.item_code as \"Item Code:Link/Item:120\",\n\t`tabPurchase Receipt Item`.qty as \"Qty:Float:100\",\n\t`tabPurchase Receipt Item`.billed_qty as \"Billed Qty:Float:100\", \n\t(`tabPurchase Receipt Item`.qty - ifnull(`tabPurchase Receipt Item`.billed_qty, 0)) as \"Qty to Bill:Float:100\",\n\t`tabPurchase Receipt Item`.item_name as \"Item Name::150\",\n\t`tabPurchase Receipt Item`.description as \"Description::200\"\nfrom\n\t`tabPurchase Receipt`, `tabPurchase Receipt Item`\nwhere\n\t`tabPurchase Receipt Item`.`parent` = `tabPurchase Receipt`.`name`\n\tand `tabPurchase Receipt`.docstatus = 1\n\tand `tabPurchase Receipt`.status != \"Stopped\"\n\tand ifnull(`tabPurchase Receipt Item`.billed_qty, 0) < ifnull(`tabPurchase Receipt Item`.qty, 0)\norder by `tabPurchase Receipt`.posting_date asc",
+ "query": "select \n `tabPurchase Receipt`.`name` as \"Purchase Receipt:Link/Purchase Receipt:120\",\n `tabPurchase Receipt`.`posting_date` as \"Date:Date:100\",\n `tabPurchase Receipt`.`supplier` as \"Supplier:Link/Supplier:120\",\n `tabPurchase Receipt Item`.`project_name` as \"Project\",\n\t`tabPurchase Receipt Item`.item_code as \"Item Code:Link/Item:120\",\n\t`tabPurchase Receipt Item`.amount as \"Amount:Currency:100\",\n\t`tabPurchase Receipt Item`.billed_amt as \"Billed Amount:Currency:100\", \n\t(`tabPurchase Receipt Item`.amount - ifnull(`tabPurchase Receipt Item`.billed_amt, 0)) as \"Amount to Bill:Currency:100\",\n\t`tabPurchase Receipt Item`.item_name as \"Item Name::150\",\n\t`tabPurchase Receipt Item`.description as \"Description::200\"\nfrom\n\t`tabPurchase Receipt`, `tabPurchase Receipt Item`\nwhere\n\t`tabPurchase Receipt Item`.`parent` = `tabPurchase Receipt`.`name`\n\tand `tabPurchase Receipt`.docstatus = 1\n\tand `tabPurchase Receipt`.status != \"Stopped\"\n\tand ifnull(`tabPurchase Receipt Item`.billed_amt, 0) < ifnull(`tabPurchase Receipt Item`.amount, 0)\norder by `tabPurchase Receipt`.posting_date asc",
"ref_doctype": "Purchase Invoice",
"report_name": "Received Items To Be Billed",
"report_type": "Query Report"
diff --git a/accounts/search_criteria/__init__.py b/accounts/search_criteria/__init__.py
deleted file mode 100644
index baffc48..0000000
--- a/accounts/search_criteria/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-from __future__ import unicode_literals
diff --git a/accounts/search_criteria/accounts_payable/__init__.py b/accounts/search_criteria/accounts_payable/__init__.py
deleted file mode 100644
index baffc48..0000000
--- a/accounts/search_criteria/accounts_payable/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-from __future__ import unicode_literals
diff --git a/accounts/search_criteria/accounts_payable/accounts_payable.js b/accounts/search_criteria/accounts_payable/accounts_payable.js
deleted file mode 100644
index 8d8f1ab..0000000
--- a/accounts/search_criteria/accounts_payable/accounts_payable.js
+++ /dev/null
@@ -1,37 +0,0 @@
-// ERPNext - web based ERP (http://erpnext.com)
-// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-report.customize_filters = function() {
- this.hide_all_filters();
-
- this.filter_fields_dict['GL Entry'+FILTER_SEP +'Company'].df.filter_hide = 0;
- this.filter_fields_dict['GL Entry'+FILTER_SEP +'From Posting Date'].df.filter_hide = 1;
- this.filter_fields_dict['GL Entry'+FILTER_SEP +'To Posting Date'].df.filter_hide = 0;
- this.filter_fields_dict['GL Entry'+FILTER_SEP +'Account'].df.filter_hide = 0;
-
- this.add_filter({fieldname:'aging_based_on', label:'Aging Based On', fieldtype:'Select', options:NEWLINE+'Aging Date'+NEWLINE+'Due Date',ignore : 1, parent:'Purchase Invoice', report_default:'Aging Date'});
- this.add_filter({fieldname:'range_1', label:'Range 1', fieldtype:'Data', ignore : 1, parent:'GL Entry', report_default:30});
- this.add_filter({fieldname:'range_2', label:'Range 2', fieldtype:'Data', ignore : 1, parent:'GL Entry', report_default:45});
- this.add_filter({fieldname:'range_3', label:'Range 3', fieldtype:'Data', ignore : 1, parent:'GL Entry', report_default:60});
- this.add_filter({fieldname:'range_4', label:'Range 4', fieldtype:'Data', ignore : 1, parent:'GL Entry', report_default:90});
-
- this.filter_fields_dict['GL Entry'+FILTER_SEP +'To Posting Date'].df['report_default']=dateutil.obj_to_str(new Date());
- this.filter_fields_dict['GL Entry'+FILTER_SEP +'Company'].df['report_default']=sys_defaults.company;
-
- this.dt.set_no_limit(1);
-}
-
-this.mytabs.items['Select Columns'].hide()
\ No newline at end of file
diff --git a/accounts/search_criteria/accounts_payable/accounts_payable.py b/accounts/search_criteria/accounts_payable/accounts_payable.py
deleted file mode 100644
index 3a5b899..0000000
--- a/accounts/search_criteria/accounts_payable/accounts_payable.py
+++ /dev/null
@@ -1,183 +0,0 @@
-# ERPNext - web based ERP (http://erpnext.com)
-# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-# Check mandatory filters
-# ------------------------------------------------------------------
-
-from __future__ import unicode_literals
-if not filter_values.get('posting_date1'):
- msgprint("Please select To Posting Date ")
- raise Exception
-else:
- to_date = filter_values.get('posting_date1')
-
-if not filter_values['range_1'] or not filter_values['range_2'] \
- or not filter_values['range_3'] or not filter_values['range_4']:
- msgprint("Please select aging ranges in no of days in 'More Filters' ")
- raise Exception
-
-# validate Range
-range_list = ['range_1','range_2','range_3','range_4']
-for r in range(len(range_list)-1):
- if not cint(filter_values[range_list[r]]) < cint(filter_values[range_list[r + 1]]):
- msgprint("Range %s should be less than Range %s." % (cstr(r+1),cstr(r+2)))
- raise Exception
-
-
-# Add columns
-# ------------------------------------------------------------------
-data = [['Aging Date','Date','80px',''],
- ['Account','Data','120px',''],
- ['Against Voucher Type','Data','120px',''],
- ['Against Voucher','Data','120px',''],
- ['Voucher Type','Data','120px',''],
- ['Voucher No','Data','120px',''],
- ['Remarks','Data','160px',''],
- ['Supplier Type', 'Data', '80px', ''],
- ['Due Date', 'Data', '80px', ''],
- ['Bill No','Data','80px',''],
- ['Bill Date','Data','80px',''],
- ['Opening Amt','Currency','120px',''],
- ['Outstanding Amt','Currency','120px',''],
- ['Age (Days)', 'Currency', '150px', ''],
- ['0-'+cstr(filter_values['range_1']),'Currency','100px',''],
- [cstr(cint(filter_values['range_1']) + 1)+ '-' +cstr(filter_values['range_2']),'Currency','100px',''],
- [cstr(cint(filter_values['range_2']) + 1)+ '-' +cstr(filter_values['range_3']),'Currency','100px',''],
- [cstr(cint(filter_values['range_3']) + 1)+ '-' +cstr(filter_values['range_4']),'Currency','100px',''],
- [cstr(filter_values['range_4']) + '-Above','Currency','100px','']]
-
-
-for d in data:
- colnames.append(d[0])
- coltypes.append(d[1])
- colwidths.append(d[2])
- coloptions.append(d[3])
- col_idx[d[0]] = len(colnames)-1
-
-# ageing based on
-# ------------------------------------------------------------------
-aging_based_on = 'Aging Date'
-if filter_values.has_key('aging_based_on') and filter_values['aging_based_on']:
- aging_based_on = filter_values['aging_based_on'].split(NEWLINE)[-1]
-
-if len(res) > 2000 and from_export == 0:
- msgprint("""This is a very large report and cannot be shown in the browser
- as it is likely to make your browser very slow.
- Please select Account or click on 'Export' to open in excel""", raise_exception=1)
-
-# get supplier type
-supp_type_dict = {}
-for each in sql("""select t2.name, t1.supplier_type from tabSupplier t1, tabAccount t2
- where t1.name = t2.account_name group by t2.name"""):
- supp_type_dict[each[0]] = each[1]
-
-# get due_date, bill_no, bill_date from PV
-pv_dict = {}
-for t in sql("""select name, due_date, bill_no, bill_date
- from `tabPurchase Invoice` group by name"""):
- pv_dict[t[0]] = [cstr(t[1]), t[2], cstr(t[3])]
-
-# pv after to-date
-pv_after_to_date = [d[0] for d in sql("""select distinct name from `tabPurchase Invoice`
- where posting_date > %s and docstatus = 1""", (to_date,))]
-
-
-from webnotes.utils import nowdate
-
-out = []
-total_booking_amt, total_outstanding_amt = 0,0
-
-for r in res:
- outstanding_amt, due_date, bill_no, bill_date, cond = 0, '','','', ''
- booking_amt = r.pop(7)
-
- # supplier type
- r.append(supp_type_dict.get(r[col_idx['Account']], ''))
-
- if r[col_idx['Voucher Type']] == 'Purchase Invoice':
- r += pv_dict.get(r[col_idx['Voucher No']], ['', '', ''])
- else:
- r += ['', '', '']
-
- # if entry against Purchase Invoice
- if r[col_idx['Against Voucher']] and r[col_idx['Voucher Type']] == 'Purchase Invoice':
- cond = " and ifnull(against_voucher, '') = '%s'" % r[col_idx['Against Voucher']]
-
- # if entry against JV & and not adjusted within period
- elif r[col_idx['Against Voucher Type']] == 'Purchase Invoice' \
- and r[col_idx['Against Voucher']] in pv_after_to_date:
- booking_amt = 0
- cond = """ and voucher_no = '%s' and ifnull(against_voucher, '') = '%s'""" \
- % (r[col_idx['Voucher No']], r[col_idx['Against Voucher']])
-
- # if un-adjusted
- elif not r[col_idx['Against Voucher']]:
- booking_amt = 0
- cond = """ and ((voucher_no = '%s' and ifnull(against_voucher, '') = '')
- or (ifnull(against_voucher, '') = '%s' and voucher_type = 'Journal Voucher'))""" \
- % (r[col_idx['Voucher No']], r[col_idx['Voucher No']])
-
- if cond:
- outstanding_amt = flt(sql("""select sum(ifnull(credit, 0))-sum(ifnull(debit, 0))
- from `tabGL Entry` where account = %s and ifnull(is_cancelled, 'No') = 'No'
- and posting_date <= %s %s"""
- % ('%s', '%s', cond), (r[col_idx['Account']], to_date,))[0][0] or 0)
-
- # add to total outstanding
- total_outstanding_amt += flt(outstanding_amt)
-
- # add to total booking amount
- if outstanding_amt and r[col_idx['Voucher Type']] == 'Purchase Invoice' \
- and r[col_idx['Against Voucher']]:
- total_booking_amt += flt(booking_amt)
-
- r += [booking_amt, outstanding_amt]
-
- # split into date ranges
- val_l1 = val_l2 = val_l3 = val_l4 = val_l5_above= 0
- if r[col_idx[aging_based_on]]:
- if getdate(to_date) > getdate(nowdate()):
- to_date = nowdate()
- diff = (getdate(to_date) - getdate(r[col_idx[aging_based_on]])).days
- if diff < cint(filter_values['range_1']):
- val_l1 = outstanding_amt
- if diff >= cint(filter_values['range_1']) and diff < cint(filter_values['range_2']):
- val_l2 = outstanding_amt
- if diff >= cint(filter_values['range_2']) and diff < cint(filter_values['range_3']):
- val_l3 = outstanding_amt
- if diff >= cint(filter_values['range_3']) and diff < cint(filter_values['range_4']):
- val_l4 = outstanding_amt
- if diff >= cint(filter_values['range_4']):
- val_l5_above = outstanding_amt
-
- r += [diff, val_l1, val_l2, val_l3, val_l4, val_l5_above]
-
- # Only show that entry which has outstanding
- if abs(flt(outstanding_amt)) > 0.001:
- out.append(r)
-
-if len(out) > 300 and from_export == 0:
- msgprint("This is a very large report and cannot be shown in the browser as it is likely to make your browser very slow.Please select Account or click on 'Export' to open in excel")
- raise Exception
-
-
-# Append Extra rows to RES
-# ------------------------------------------------------------------
-t_row = ['' for i in range(len(colnames))]
-t_row[col_idx['Voucher No']] = 'Total'
-t_row[col_idx['Opening Amt']] = total_booking_amt
-t_row[col_idx['Outstanding Amt']] = total_outstanding_amt
-out.append(t_row)
diff --git a/accounts/search_criteria/accounts_payable/accounts_payable.sql b/accounts/search_criteria/accounts_payable/accounts_payable.sql
deleted file mode 100644
index 56ff4cf..0000000
--- a/accounts/search_criteria/accounts_payable/accounts_payable.sql
+++ /dev/null
@@ -1,16 +0,0 @@
-SELECT DISTINCT
- `tabGL Entry`.`Aging_date`,`tabGL Entry`.`account`, `tabGL Entry`.`against_voucher_type`,
- `tabGL Entry`.`against_voucher`,`tabGL Entry`.`voucher_type`,`tabGL Entry`.`voucher_no`,
- `tabGL Entry`.`remarks`, `tabGL Entry`.`credit`
-FROM
- `tabGL Entry`,`tabAccount`
-WHERE
- `tabGL Entry`.`posting_date`<= '%(posting_date1)s'
- AND `tabGL Entry`.`account` LIKE '%(account)s%%'
- AND `tabGL Entry`.`company` LIKE '%(company)s%%'
- AND ((ifnull(`tabGL Entry`.`voucher_type`,'') = 'Purchase Invoice'
- AND `tabGL Entry`.`credit`>0) OR `tabGL Entry`.voucher_type = 'Journal Voucher')
- AND `tabGL Entry`.`is_cancelled` = 'No'
- AND `tabAccount`.master_type = 'Supplier'
- AND `tabAccount`.name = `tabGL Entry`.account
-ORDER BY `tabGL Entry`.`posting_date`
diff --git a/accounts/search_criteria/accounts_payable/accounts_payable.txt b/accounts/search_criteria/accounts_payable/accounts_payable.txt
deleted file mode 100644
index 7f9151c..0000000
--- a/accounts/search_criteria/accounts_payable/accounts_payable.txt
+++ /dev/null
@@ -1,26 +0,0 @@
-[
- {
- "owner": "Administrator",
- "docstatus": 0,
- "creation": "2012-05-14 18:05:41",
- "modified_by": "Administrator",
- "modified": "2012-10-17 10:51:41"
- },
- {
- "module": "Accounts",
- "standard": "Yes",
- "sort_order": "DESC",
- "filters": "{\"GL Entry\\u0001Voucher Type\":[\"\"],\"GL Entry\\u0001Is Cancelled\":[\"\"],\"GL Entry\\u0001Is Opening\":[\"\"],\"GL Entry\\u0001Fiscal Year\":[\"\"],\"Purchase Invoice\\u0001Aging Based On\":[\"Aging Date\"],\"GL Entry\\u0001Range 1\":\"30\",\"GL Entry\\u0001Range 2\":\"45\",\"GL Entry\\u0001Range 3\":\"60\",\"GL Entry\\u0001Range 4\":\"90\"}",
- "doctype": "Search Criteria",
- "doc_type": "GL Entry",
- "name": "__common__",
- "sort_by": "`tabGL Entry`.`name`",
- "page_len": 50,
- "criteria_name": "Accounts Payable",
- "columns": "GL Entry\u0001Posting Date,GL Entry\u0001Account,GL Entry\u0001Against Voucher,GL Entry\u0001Voucher No"
- },
- {
- "name": "accounts_payable",
- "doctype": "Search Criteria"
- }
-]
\ No newline at end of file
diff --git a/accounts/search_criteria/accounts_receivable/__init__.py b/accounts/search_criteria/accounts_receivable/__init__.py
deleted file mode 100644
index baffc48..0000000
--- a/accounts/search_criteria/accounts_receivable/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-from __future__ import unicode_literals
diff --git a/accounts/search_criteria/accounts_receivable/accounts_receivable.js b/accounts/search_criteria/accounts_receivable/accounts_receivable.js
deleted file mode 100644
index e8ed3e3..0000000
--- a/accounts/search_criteria/accounts_receivable/accounts_receivable.js
+++ /dev/null
@@ -1,35 +0,0 @@
-// ERPNext - web based ERP (http://erpnext.com)
-// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-report.customize_filters = function() {
- this.hide_all_filters();
-
- this.filter_fields_dict['GL Entry'+FILTER_SEP +'Company'].df.filter_hide = 0;
- this.filter_fields_dict['GL Entry'+FILTER_SEP +'From Posting Date'].df.filter_hide = 1;
- this.filter_fields_dict['GL Entry'+FILTER_SEP +'To Posting Date'].df.filter_hide = 0;
- this.filter_fields_dict['GL Entry'+FILTER_SEP +'Account'].df.filter_hide = 0;
-
- this.add_filter({fieldname:'aging_based_on', label:'Aging Based On', fieldtype:'Select', options:NEWLINE+'Aging Date'+NEWLINE+'Due Date',ignore : 1, parent:'Sales Invoice', report_default:'Aging Date'});
- this.add_filter({fieldname:'range_1', label:'Range 1', fieldtype:'Data', ignore : 1, parent:'GL Entry'});
- this.add_filter({fieldname:'range_2', label:'Range 2', fieldtype:'Data', ignore : 1, parent:'GL Entry'});
- this.add_filter({fieldname:'range_3', label:'Range 3', fieldtype:'Data', ignore : 1, parent:'GL Entry'});
- this.add_filter({fieldname:'range_4', label:'Range 4', fieldtype:'Data', ignore : 1, parent:'GL Entry'});
-
- this.filter_fields_dict['GL Entry'+FILTER_SEP +'To Posting Date'].df['report_default']=dateutil.obj_to_str(new Date());
- this.filter_fields_dict['GL Entry'+FILTER_SEP +'Company'].df['report_default']=sys_defaults.company;
-
- this.dt.set_no_limit(1);
-}
\ No newline at end of file
diff --git a/accounts/search_criteria/accounts_receivable/accounts_receivable.py b/accounts/search_criteria/accounts_receivable/accounts_receivable.py
deleted file mode 100644
index 34aafe5..0000000
--- a/accounts/search_criteria/accounts_receivable/accounts_receivable.py
+++ /dev/null
@@ -1,168 +0,0 @@
-# ERPNext - web based ERP (http://erpnext.com)
-# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-
-# Check mandatory filters
-#------------------------------
-from __future__ import unicode_literals
-if not filter_values.get('posting_date1'):
- msgprint("Please select To Posting Date", raise_exception=1)
-else:
- to_date = filter_values.get('posting_date1')
-
-if not filter_values['range_1'] or not filter_values['range_2'] or \
- not filter_values['range_3'] or not filter_values['range_4']:
- msgprint("Please select aging ranges in no of days in 'More Filters' section")
- raise Exception
-
-# validate Range
-range_list = ['range_1','range_2','range_3','range_4']
-for r in range(len(range_list)-1):
- if not cint(filter_values[range_list[r]]) < cint(filter_values[range_list[r + 1]]):
- msgprint("Range %s should be less than Range %s." % (cstr(r+1),cstr(r+2)))
- raise Exception
-
-
-# Add columns
-# -----------
-data = [['Aging Date','Date','80px',''],
- ['Account','Data','120px',''],
- ['Against Voucher Type','Data','120px',''],
- ['Against Voucher','Data','120px',''],
- ['Voucher Type','Data','120px',''],
- ['Voucher No','Data','120px',''],
- ['Remarks','Data','160px',''],
- ['Territory','Data','120px',''],
- ['Due Date', 'Date', '80px', ''],
- ['Opening Amt','Currency','120px',''],
- ['Outstanding Amt','Currency','120px',''],
- ['Age (Days)', 'Data', '60px', ''],
- ['0-'+cstr(filter_values['range_1']),'Currency','100px',''],
- [cstr(cint(filter_values['range_1']) + 1)+ '-' +cstr(filter_values['range_2']),'Currency','100px',''],
- [cstr(cint(filter_values['range_2']) + 1)+ '-' +cstr(filter_values['range_3']),'Currency','100px',''],
- [cstr(cint(filter_values['range_3']) + 1)+ '-' +cstr(filter_values['range_4']),'Currency','100px',''],
- [cstr(filter_values['range_4']) + '-Above','Currency','100px','']]
-
-
-for d in data:
- colnames.append(d[0])
- coltypes.append(d[1])
- colwidths.append(d[2])
- coloptions.append(d[3])
- col_idx[d[0]] = len(colnames)-1
-
-# ageing based on
-aging_based_on = filter_values.get('aging_based_on') and filter_values['aging_based_on'].split(NEWLINE)[-1] or 'Aging Date'
-
-if len(res) > 2000 and from_export == 0:
- msgprint("This is a very large report and cannot be shown in the browser as it is likely to make your browser very slow.Please select Account or click on 'Export' to open in excel")
- raise Exception
-
-
-# get supplier type
-territory_dict = {}
-for each in sql("""select t2.name, t1.territory from `tabCustomer` t1, `tabAccount` t2
- where t1.name = t2.master_name group by t2.name"""):
- territory_dict[each[0]] = each[1]
-
-# get due_date from sales invoice
-si_dict = {}
-for t in sql("""select name, due_date from `tabSales Invoice` group by name"""):
- si_dict[t[0]] = t[1]
-
-# sales invoice after to-date
-si_after_to_date = [d[0] for d in sql("""select distinct name from `tabSales Invoice`
- where posting_date > %s and docstatus = 1""", (to_date,))]
-
-
-from webnotes.utils import nowdate
-out = []
-total_booking_amt, total_outstanding_amt = 0,0
-for r in res:
- outstanding_amt = 0
- cond = due_date = ''
- booking_amt = r.pop(7)
-
- # get customer territory
- r.append(territory_dict.get(r[col_idx['Account']], ''))
-
- # if entry against Sales Invoice
- if r[col_idx['Against Voucher']] and r[col_idx['Voucher Type']] == 'Sales Invoice':
- # get due date
- due_date = si_dict.get(r[col_idx['Voucher No']], '')
- cond = """ and ifnull(against_voucher, '') = '%s'""" % r[col_idx['Against Voucher']]
-
- # if entry against JV & and not adjusted within period
- elif r[col_idx['Against Voucher Type']] == 'Sales Invoice' \
- and r[col_idx['Against Voucher']] in si_after_to_date:
- booking_amt = 0
- cond = """ and voucher_no = '%s' and ifnull(against_voucher, '') = '%s'""" \
- % (r[col_idx['Voucher No']], r[col_idx['Against Voucher']])
- # if entry against JV and unadjusted
- elif not r[col_idx['Against Voucher']]:
- booking_amt = 0
- cond = """ and ((voucher_no = '%s' and ifnull(against_voucher, '') = '')
- or (ifnull(against_voucher, '') = '%s' and voucher_type = 'Journal Voucher'))""" \
- % (r[col_idx['Voucher No']], r[col_idx['Voucher No']])
-
- if cond:
- outstanding_amt = flt(sql("""select ifnull(sum(debit),0) - ifnull(sum(credit),0)
- from `tabGL Entry` where account = %s and ifnull(is_cancelled, 'No') = 'No'
- and posting_date <= %s %s"""
- % ('%s', '%s', cond), (r[col_idx['Account']], to_date,))[0][0] or 0)
-
- # add to total outstanding
- total_outstanding_amt += flt(outstanding_amt)
- # add to total booking amount
- if outstanding_amt and r[col_idx['Voucher Type']] == 'Sales Invoice' and r[col_idx['Against Voucher']]:
- total_booking_amt += flt(booking_amt)
-
- r += [due_date, booking_amt, outstanding_amt]
-
- #Ageing Outstanding
- val_l1 = val_l2 = val_l3 = val_l4 = val_l5_above = 0
- diff = 0
- if r[col_idx[aging_based_on]]:
- if getdate(to_date) > getdate(nowdate()):
- to_date = nowdate()
- diff = (getdate(to_date) - getdate(r[col_idx[aging_based_on]])).days
- if diff <= cint(filter_values['range_1']):
- val_l1 = outstanding_amt
- if diff > cint(filter_values['range_1']) and diff <= cint(filter_values['range_2']):
- val_l2 = outstanding_amt
- if diff > cint(filter_values['range_2']) and diff <= cint(filter_values['range_3']):
- val_l3 = outstanding_amt
- if diff > cint(filter_values['range_3']) and diff <= cint(filter_values['range_4']):
- val_l4 = outstanding_amt
- if diff > cint(filter_values['range_4']):
- val_l5_above = outstanding_amt
- r += [diff, val_l1, val_l2, val_l3, val_l4, val_l5_above]
-
- # Only show that entry which has outstanding
- if abs(flt(outstanding_amt)) > 0.001:
- out.append(r)
-
-if len(out) > 500 and from_export == 0:
- msgprint("This is a very large report and cannot be shown in the browser as it is likely to make your browser very slow.Please select Account or click on 'Export' to open in excel")
- raise Exception
-
-# Append Extra rows to res
-if len(out) > 0:
- t_row = ['' for i in range(len(colnames))]
- t_row[col_idx['Voucher No']] = 'Total'
- t_row[col_idx['Opening Amt']] = total_booking_amt
- t_row[col_idx['Outstanding Amt']] = total_outstanding_amt
- out.append(t_row)
\ No newline at end of file
diff --git a/accounts/search_criteria/accounts_receivable/accounts_receivable.sql b/accounts/search_criteria/accounts_receivable/accounts_receivable.sql
deleted file mode 100644
index 6f1c459..0000000
--- a/accounts/search_criteria/accounts_receivable/accounts_receivable.sql
+++ /dev/null
@@ -1,16 +0,0 @@
-SELECT
- `tabGL Entry`.`aging_date`,`tabGL Entry`.`account`, `tabGL Entry`.`against_voucher_type`,
- `tabGL Entry`.`against_voucher`,`tabGL Entry`.`voucher_type`,`tabGL Entry`.`voucher_no`,
- `tabGL Entry`.`remarks`, `tabGL Entry`.`debit`
-FROM
- `tabGL Entry`,`tabAccount`
-WHERE
- `tabGL Entry`.`posting_date`<= '%(posting_date1)s'
- AND `tabGL Entry`.`account` LIKE '%(account)s%%'
- AND `tabGL Entry`.`company` LIKE '%(company)s%%'
- AND ((`tabGL Entry`.`voucher_type` = 'Sales Invoice' and `tabGL Entry`.`debit`>0)
- OR `tabGL Entry`.`voucher_type` = 'Journal Voucher')
- AND `tabGL Entry`.`is_cancelled` = 'No'
- AND `tabAccount`.`master_type` = 'Customer'
- AND `tabAccount`.`name` = `tabGL Entry`.`account`
-ORDER BY `tabGL Entry`.`posting_date`, `tabGL Entry`.`account`
diff --git a/accounts/search_criteria/accounts_receivable/accounts_receivable.txt b/accounts/search_criteria/accounts_receivable/accounts_receivable.txt
deleted file mode 100644
index cfa496e..0000000
--- a/accounts/search_criteria/accounts_receivable/accounts_receivable.txt
+++ /dev/null
@@ -1,25 +0,0 @@
-[
- {
- "owner": "Administrator",
- "docstatus": 0,
- "creation": "2012-04-03 12:49:50",
- "modified_by": "Administrator",
- "modified": "2012-04-03 12:49:50"
- },
- {
- "module": "Accounts",
- "standard": "Yes",
- "sort_order": "ASC",
- "filters": "{'GL Entry\u0001Is Cancelled':'No','GL Entry\u0001Fiscal Year':'','GL Entry\u0001Company':'','GL Entry\u0001Range 1':'30','GL Entry\u0001Range 2':'45','GL Entry\u0001Range 3':'60','GL Entry\u0001Range 4':'90'}",
- "doctype": "Search Criteria",
- "doc_type": "GL Entry",
- "name": "__common__",
- "sort_by": "`tabGL Entry`.`name`",
- "criteria_name": "Accounts Receivable",
- "columns": "GL Entry\u0001Posting Date,GL Entry\u0001Transaction Date,GL Entry\u0001Account,GL Entry\u0001Against Voucher,GL Entry\u0001Voucher No"
- },
- {
- "name": "accounts_receivable",
- "doctype": "Search Criteria"
- }
-]
\ No newline at end of file
diff --git a/accounts/search_criteria/bank_clearance_report/__init__.py b/accounts/search_criteria/bank_clearance_report/__init__.py
deleted file mode 100644
index baffc48..0000000
--- a/accounts/search_criteria/bank_clearance_report/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-from __future__ import unicode_literals
diff --git a/accounts/search_criteria/bank_clearance_report/bank_clearance_report.js b/accounts/search_criteria/bank_clearance_report/bank_clearance_report.js
deleted file mode 100644
index b5f9ffd..0000000
--- a/accounts/search_criteria/bank_clearance_report/bank_clearance_report.js
+++ /dev/null
@@ -1,50 +0,0 @@
-// ERPNext - web based ERP (http://erpnext.com)
-// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-report.customize_filters = function() {
- this.filter_fields_dict['Journal Voucher'+FILTER_SEP +'From Posting Date'].df['report_default'] = sys_defaults.year_start_date;
- this.filter_fields_dict['Journal Voucher'+FILTER_SEP +'To Posting Date'].df['report_default'] = dateutil.obj_to_str(new Date());
- this.filter_fields_dict['Journal Voucher'+FILTER_SEP +'Company'].df['report_default'] = sys_defaults.company;
-
- this.filter_fields_dict['Journal Voucher'+FILTER_SEP +'Voucher Type'].df.in_first_page = 0;
- this.filter_fields_dict['Journal Voucher'+FILTER_SEP +'From Clearance Date'].df.in_first_page = 1;
- this.filter_fields_dict['Journal Voucher'+FILTER_SEP +'To Clearance Date'].df.in_first_page = 1;
- this.filter_fields_dict['Journal Voucher Detail'+FILTER_SEP +'Account'].df.in_first_page = 1;
- this.filter_fields_dict['Journal Voucher'+FILTER_SEP +'Company'].df.in_first_page = 1;
-
- this.filter_fields_dict['Journal Voucher'+FILTER_SEP +'ID'].df.filter_hide = 1;
- this.filter_fields_dict['Journal Voucher'+FILTER_SEP +'Owner'].df.filter_hide = 1;
- this.filter_fields_dict['Journal Voucher'+FILTER_SEP +'Saved'].df.filter_hide = 1;
- this.filter_fields_dict['Journal Voucher'+FILTER_SEP +'Submitted'].df.filter_hide = 1;
- this.filter_fields_dict['Journal Voucher'+FILTER_SEP +'Cancelled'].df.filter_hide = 1;
- this.filter_fields_dict['Journal Voucher Detail'+FILTER_SEP +'Against Receivable'].df.filter_hide = 1;
- this.filter_fields_dict['Journal Voucher'+FILTER_SEP +'TDS Category'].df.filter_hide = 1;
- this.filter_fields_dict['Journal Voucher Detail'+FILTER_SEP +'Cost Center'].df.filter_hide = 1;
- this.filter_fields_dict['Journal Voucher Detail'+FILTER_SEP +'Against Payable'].df.filter_hide = 1;
- this.filter_fields_dict['Journal Voucher'+FILTER_SEP +'Owner'].df.filter_hide = 1;
- this.filter_fields_dict['Journal Voucher'+FILTER_SEP +'TDS Applicable'].df.filter_hide = 1;
- this.filter_fields_dict['Journal Voucher'+FILTER_SEP +'Is Opening'].df.filter_hide = 1;
- this.filter_fields_dict['Journal Voucher'+FILTER_SEP +'Total Debit >='].df.filter_hide = 1;
- this.filter_fields_dict['Journal Voucher'+FILTER_SEP +'Total Debit <='].df.filter_hide = 1;
- this.filter_fields_dict['Journal Voucher'+FILTER_SEP +'Total Credit >='].df.filter_hide = 1;
- this.filter_fields_dict['Journal Voucher'+FILTER_SEP +'Total Credit <='].df.filter_hide = 1;
- this.filter_fields_dict['Journal Voucher'+FILTER_SEP +'Fiscal Year'].df.filter_hide = 1;
- this.filter_fields_dict['Journal Voucher'+FILTER_SEP +'User Remark'].df.filter_hide = 1;
- this.filter_fields_dict['Journal Voucher'+FILTER_SEP +'From Voucher Date'].df.filter_hide = 1;
- this.filter_fields_dict['Journal Voucher'+FILTER_SEP +'To Voucher Date'].df.filter_hide = 1;
-}
-
-this.mytabs.items['More Filters'].hide()
\ No newline at end of file
diff --git a/accounts/search_criteria/bank_clearance_report/bank_clearance_report.txt b/accounts/search_criteria/bank_clearance_report/bank_clearance_report.txt
deleted file mode 100644
index 8aa94bf..0000000
--- a/accounts/search_criteria/bank_clearance_report/bank_clearance_report.txt
+++ /dev/null
@@ -1,32 +0,0 @@
-[
- {
- "creation": "2012-05-14 18:05:41",
- "docstatus": 0,
- "modified": "2013-04-30 14:49:06",
- "modified_by": "Administrator",
- "owner": "Administrator"
- },
- {
- "columns": "Journal Voucher\u0001ID,Journal Voucher Detail\u0001Account,Journal Voucher Detail\u0001Debit,Journal Voucher Detail\u0001Credit,Journal Voucher\u0001Clearance Date,Journal Voucher\u0001Cheque No,Journal Voucher\u0001Cheque Date,Journal Voucher\u0001Voucher Date,Journal Voucher\u0001Posting Date,Journal Voucher Detail\u0001Against Payable,Journal Voucher Detail\u0001Against Receivable",
- "criteria_name": "Bank Clearance report",
- "custom_query": "",
- "description": "Bank Clearance report",
- "dis_filters": "fiscal_year",
- "disabled": 0,
- "doc_type": "Journal Voucher Detail",
- "doctype": "Search Criteria",
- "filters": "{'Journal Voucher\u0001Submitted':1,'Journal Voucher\u0001Voucher Type':'','Journal Voucher\u0001Is Opening':'','Journal Voucher\u0001Fiscal Year':'','Journal Voucher\u0001Company':'','Journal Voucher\u0001TDS Applicable':'','Journal Voucher\u0001TDS Category':''}",
- "module": "Accounts",
- "name": "__common__",
- "page_len": 50,
- "parent_doc_type": "Journal Voucher",
- "report_script": null,
- "sort_by": "ID",
- "sort_order": "DESC",
- "standard": "Yes"
- },
- {
- "doctype": "Search Criteria",
- "name": "bank_clearance_report"
- }
-]
\ No newline at end of file
diff --git a/accounts/search_criteria/bank_reconciliation_statement/__init__.py b/accounts/search_criteria/bank_reconciliation_statement/__init__.py
deleted file mode 100644
index baffc48..0000000
--- a/accounts/search_criteria/bank_reconciliation_statement/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-from __future__ import unicode_literals
diff --git a/accounts/search_criteria/bank_reconciliation_statement/bank_reconciliation_statement.js b/accounts/search_criteria/bank_reconciliation_statement/bank_reconciliation_statement.js
deleted file mode 100644
index f6bec4b..0000000
--- a/accounts/search_criteria/bank_reconciliation_statement/bank_reconciliation_statement.js
+++ /dev/null
@@ -1,34 +0,0 @@
-// ERPNext - web based ERP (http://erpnext.com)
-// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-report.customize_filters = function() {
- this.hide_all_filters();
-
- this.filter_fields_dict['Journal Voucher Detail'+FILTER_SEP +'Account'].df.filter_hide = 0;
- this.filter_fields_dict['Journal Voucher'+FILTER_SEP +'To Clearance Date'].df.filter_hide = 0;
- this.filter_fields_dict['Journal Voucher'+FILTER_SEP +'Company'].df.filter_hide = 0;
-
- this.filter_fields_dict['Journal Voucher Detail'+FILTER_SEP +'Account'].df.in_first_page = 1;
- this.filter_fields_dict['Journal Voucher'+FILTER_SEP +'To Clearance Date'].df.in_first_page = 1;
- this.filter_fields_dict['Journal Voucher'+FILTER_SEP +'Company'].df.in_first_page = 1;
-
- this.filter_fields_dict['Journal Voucher'+FILTER_SEP +'Company'].df['report_default']=sys_defaults.company;
- this.filter_fields_dict['Journal Voucher'+FILTER_SEP +'To Clearance Date'].df['report_default'] = dateutil.obj_to_str(new Date());
-
- this.dt.set_no_limit(1);
-}
-
-this.mytabs.items['More Filters'].hide();
\ No newline at end of file
diff --git a/accounts/search_criteria/bank_reconciliation_statement/bank_reconciliation_statement.py b/accounts/search_criteria/bank_reconciliation_statement/bank_reconciliation_statement.py
deleted file mode 100644
index 1ab94a4..0000000
--- a/accounts/search_criteria/bank_reconciliation_statement/bank_reconciliation_statement.py
+++ /dev/null
@@ -1,66 +0,0 @@
-# ERPNext - web based ERP (http://erpnext.com)
-# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-#get company
-from __future__ import unicode_literals
-
-import webnotes.defaults
-company = filter_values.get('company') or webnotes.defaults.get_user_default('company')
-
-# To date
-if not filter_values.get('clearance_date1'):
- msgprint('Please enter To Clearance Date')
- raise Exception
-else:
- to_date = filter_values['clearance_date1']
-
-
-#Fiscal year and year start date
-#----------------------------------
-ysd, fiscal_year = sql("select year_start_date, name from `tabFiscal Year` where %s between year_start_date and date_add(year_start_date,interval 1 year)",to_date)[0]
-# Account
-if not filter_values.get('account'):
- msgprint('Please select Account in filter section')
- raise Exception
-else:
- acc_name = filter_values.get('account')
-
-
-if len(res) > 300 and from_export == 0:
- msgprint("This is a very large report and cannot be shown in the browser as it is likely to make your browser very slow.Please select Account or click on 'Export' to open in excel")
- raise Exception
-
-acc = sql("select debit_or_credit, is_pl_account, lft, rgt from tabAccount where name = '%s'" % acc_name)
-
-from accounts.utils import get_balance_on
-opening = get_balance_on(acc_name, to_date)
-
-total_debit, total_credit = 0,0
-out = []
-
-for r in res:
- total_debit = flt(total_debit) + flt(r[col_idx['Debit']])
- total_credit = flt(total_credit) + flt(r[col_idx['Credit']])
- out.append(r)
-
-if acc and acc[0][0] == 'Debit':
- bank_bal = flt(opening)-flt(total_debit)+flt(total_credit)
-else:
- bank_bal = flt(opening)+flt(total_debit)-flt(total_credit)
-
-out.append(['','','','<font color = "#000"><b>Balance as per Company Books: </b></font>', opening,'', ''])
-out.append(['','','','<font color = "#000"><b>Amounts not reflected in Bank: </b></font>', total_debit,total_credit,''])
-out.append(['','','','<font color = "#000"><b>Balance as per Bank: </b></font>', bank_bal,'',''])
diff --git a/accounts/search_criteria/bank_reconciliation_statement/bank_reconciliation_statement.txt b/accounts/search_criteria/bank_reconciliation_statement/bank_reconciliation_statement.txt
deleted file mode 100644
index 4d5d5fc..0000000
--- a/accounts/search_criteria/bank_reconciliation_statement/bank_reconciliation_statement.txt
+++ /dev/null
@@ -1,29 +0,0 @@
-[
- {
- "owner": "Administrator",
- "docstatus": 0,
- "creation": "2012-04-03 12:49:50",
- "modified_by": "Administrator",
- "modified": "2012-04-03 12:49:50"
- },
- {
- "parent_doc_type": "Journal Voucher",
- "module": "Accounts",
- "standard": "Yes",
- "sort_order": "DESC",
- "filters": "{'Journal Voucher\u0001Submitted':1,'Journal Voucher\u0001Voucher Type':'','Journal Voucher\u0001Is Opening':'','Journal Voucher\u0001Company':'','Journal Voucher\u0001TDS Applicable':'','Journal Voucher\u0001TDS Category':''}",
- "dis_filters": "clearance_date\nfiscal_year",
- "doc_type": "Journal Voucher Detail",
- "name": "__common__",
- "add_cond": "(`tabJournal Voucher Detail`.credit >= 0 or `tabJournal Voucher Detail`.credit is null)\n(`tabJournal Voucher`.cheque_no is not null or `tabJournal Voucher`.cheque_no != '')\n(ifnull(`tabJournal Voucher`.clearance_date, '0000-00-00') >'%(clearance_date1)s' or `tabJournal Voucher`.clearance_date is null or `tabJournal Voucher`.clearance_date = '0000-00-00')\n(`tabJournal Voucher`.posting_date <= '%(clearance_date1)s')",
- "doctype": "Search Criteria",
- "sort_by": "`tabJournal Voucher`.`name`",
- "page_len": 50,
- "criteria_name": "Bank Reconciliation Statement",
- "columns": "Journal Voucher\u0001ID,Journal Voucher\u0001Posting Date,Journal Voucher\u0001Cheque No,Journal Voucher\u0001Cheque Date,Journal Voucher\u0001Clearance Date,Journal Voucher Detail\u0001Account,Journal Voucher Detail\u0001Debit,Journal Voucher Detail\u0001Credit,Journal Voucher Detail\u0001Against Account"
- },
- {
- "name": "bank_reconciliation_statement",
- "doctype": "Search Criteria"
- }
-]
\ No newline at end of file
diff --git a/accounts/search_criteria/budget_variance_report/__init__.py b/accounts/search_criteria/budget_variance_report/__init__.py
deleted file mode 100644
index baffc48..0000000
--- a/accounts/search_criteria/budget_variance_report/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-from __future__ import unicode_literals
diff --git a/accounts/search_criteria/budget_variance_report/budget_variance_report.js b/accounts/search_criteria/budget_variance_report/budget_variance_report.js
deleted file mode 100644
index 5cc644c..0000000
--- a/accounts/search_criteria/budget_variance_report/budget_variance_report.js
+++ /dev/null
@@ -1,31 +0,0 @@
-// ERPNext - web based ERP (http://erpnext.com)
-// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-report.customize_filters = function() {
- this.add_filter({fieldname:'period', label:'Period', fieldtype:'Select', options:'Monthly'+NEWLINE+'Quarterly'+NEWLINE+'Half Yearly'+NEWLINE+'Annual',report_default:'Quarterly',ignore : 1, parent:'Budget Detail'});
- this.add_filter({fieldname:'company', label:'Company', fieldtype:'Link', options:'Company', report_default:sys_defaults.company, ignore : 1, parent:'Budget Detail', in_first_page:1});
- this.filter_fields_dict['Budget Detail'+FILTER_SEP +'Fiscal Year'].df.in_first_page = 1;
- this.filter_fields_dict['Budget Detail'+FILTER_SEP +'Period'].df.in_first_page = 1;
-
- this.filter_fields_dict['Budget Detail'+FILTER_SEP +'Fiscal Year'].df['report_default'] = sys_defaults.fiscal_year;
-}
-
-report.aftertableprint = function(t) {
- $yt(t,'*',1,{whiteSpace:'pre'});
-}
-
-this.mytabs.items['More Filters'].hide();
-this.mytabs.items['Select Columns'].hide();
diff --git a/accounts/search_criteria/budget_variance_report/budget_variance_report.py b/accounts/search_criteria/budget_variance_report/budget_variance_report.py
deleted file mode 100644
index 301c19a..0000000
--- a/accounts/search_criteria/budget_variance_report/budget_variance_report.py
+++ /dev/null
@@ -1,184 +0,0 @@
-# ERPNext - web based ERP (http://erpnext.com)
-# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-# validate Filters
-from __future__ import unicode_literals
-flt_dict = {'fiscal_year': 'Fiscal Year', 'period': 'Period'}
-for f in flt_dict:
- if not filter_values.get(f):
- msgprint("Please Select " + cstr(flt_dict[f]))
- raise Exception
-
-# Get Values from fliters
-fiscal_year = filter_values.get('fiscal_year')
-period = filter_values.get('period')
-under = "GL Entry"
-based_on = "Cost Center"
-
-#add distributed id field
-col = []
-col.append([based_on,'Date','150px',''])
-col.append(['Budget Allocated','Currency','150px',''])
-col.append(['Distribution Id','Date','150px',''])
-
-for c in col:
- colnames.append(c[0])
- coltypes.append(c[1])
- colwidths.append(c[2])
- coloptions.append(c[3])
-
- col_idx[c[0]] = len(colnames)-1
-
-def make_child_lst(based_on,name):
- rg = sql("select lft, rgt from `tab%s` where name = '%s'"%(based_on,name))
- ch_name = sql("select name from `tab%s` where lft between %d and %d"%(based_on,int(rg[0][0]),int(rg[0][1])))
- chl ='('
- flag = 1
- for c in ch_name:
- if flag == 1:
- chl += "'%s'"%c[0]
- flag = 2
- else:
- chl +=",'%s'"%c[0]
-
- chl +=")"
- return chl
-
-
-
-for r in res:
-
- cond1 =" t1.fiscal_year ='%s' and t1.parent=t2.name and t1.parenttype = '%s' and t1.docstatus !=2"
-
- q = "select t1.name from `tabBudget Detail` t1, `tab%s` t2 where "+cond1+" and t2.name = '%s'"
- ch = sql(q%(based_on,fiscal_year,based_on,r[0].strip()))
- q1 = "select sum(t1.budget_allocated) from `tabBudget Detail` t1, `tab%s` t2, `tabAccount` t3 where "
- cond2 = " t3.is_pl_account = 'Yes' and t3.debit_or_credit = 'Debit' and t3.name = t1.account and t1.docstatus != 2 and "
- if ch:
- qur = q1+cond2+cond1+" and t2.name = '%s'"
- ret_amt = sql(qur%(based_on,fiscal_year,based_on,r[0].strip()))
-
-
- #----------------------------------------------------------------
- else:
- node_lst = make_child_lst(based_on,r[0].strip())
- qur = q1+cond1+' and '+cond2+" t2.name in %s"
-
- ret_amt = sql(qur%(based_on,fiscal_year,based_on,node_lst))
-
- #----------------------------------------------------------------
- ret_dis_id = sql("select distribution_id from `tab%s` where name = '%s'"%(based_on,r[0].strip()))
-
- target_amt = ret_amt and flt(ret_amt[0][0]) or 0
- dis_id = ret_dis_id and ret_dis_id[0][0] or ''
-
- r.append(target_amt)
- r.append(dis_id)
-
-
-
-# Set required field names
-based_on_fn = 'cost_center'
-
-date_fn = 'posting_date'
-
-mon_list = []
-
-data = {'start_date':0, 'end_date':1}
-
-def make_month_list(append_colnames, start_date, mon_list, period, colnames, coltypes, colwidths, coloptions, col_idx):
- count = 1
- if period == 'Quarterly' or period == 'Half Yearly' or period == 'Annual': mon_list.append([str(start_date)])
- for m in range(12):
- # get last date
- last_date = str(sql("select LAST_DAY('%s')" % start_date)[0][0])
-
- # make mon_list for Monthly Period
- if period == 'Monthly' :
- mon_list.append([start_date, last_date])
- # add months as Column names
- month_name = sql("select MONTHNAME('%s')" % start_date)[0][0]
- append_colnames(str(month_name)[:3], colnames, coltypes, colwidths, coloptions, col_idx)
-
- # get start date
- start_date = str(sql("select DATE_ADD('%s',INTERVAL 1 DAY)" % last_date)[0][0])
-
- # make mon_list for Quaterly Period
- if period == 'Quarterly' and count % 3 == 0:
- mon_list[len(mon_list) - 1 ].append(last_date)
- # add Column names
- append_colnames('Q '+ str(count / 3), colnames, coltypes, colwidths, coloptions, col_idx)
- if count != 12: mon_list.append([start_date])
-
- # make mon_list for Half Yearly Period
- if period == 'Half Yearly' and count % 6 == 0 :
- mon_list[len(mon_list) - 1 ].append(last_date)
- # add Column Names
- append_colnames('H'+str(count / 6), colnames, coltypes, colwidths, coloptions, col_idx)
- if count != 12: mon_list.append([start_date])
-
- # make mon_list for Annual Period
- if period == 'Annual' and count % 12 == 0:
- mon_list[len(mon_list) - 1 ].append(last_date)
- # add Column Names
- append_colnames('', colnames, coltypes, colwidths, coloptions, col_idx)
- count = count +1
-
-def append_colnames(name, colnames, coltypes, colwidths, coloptions, col_idx):
- col = ['Target', 'Actual', 'Variance']
- for c in col:
- n = str(name) and ' (' + str(name) +')' or ''
- colnames.append(str(c) + n)
- coltypes.append('Currency')
- colwidths.append('150px')
- coloptions.append('')
- col_idx[str(c) + n ] = len(colnames) - 1
-
-
-# get start date
-start_date = webnotes.conn.get_value('Fiscal Year', fiscal_year, 'year_start_date')
-if not start_date:
- msgprint("Please Define Year Start Date for Fiscal Year " + str(fiscal_year))
- raise Exception
-start_date = start_date.strftime('%Y-%m-%d')
-
-# make month list and columns
-make_month_list(append_colnames, start_date, mon_list, period, colnames, coltypes, colwidths, coloptions, col_idx)
-
-
-bc_obj = get_obj('Budget Control')
-for r in res:
- count = 0
-
- for idx in range(3, len(colnames), 3):
- cidx = 2
-
- # ================= Calculate Target ==========================================
- r.append(bc_obj.get_monthly_budget( r[cidx], fiscal_year, mon_list[count][data['start_date']], mon_list[count][data['end_date']], r[cidx-1]))
-
- #================== Actual Amount =============================================
- actual = 0
-
- ch = make_child_lst(based_on,r[0].strip())
-
- actual = sql("select sum(ifnull(t1.debit,0))-sum(ifnull(t1.credit,0)) from `tabGL Entry` t1, `tabAccount` t2 where ifnull(t2.is_pl_account, 'No') = 'Yes' and ifnull(t1.is_cancelled, 'No') = 'No' and t1.cost_center in %s and t2.debit_or_credit = 'Debit' and t1.posting_date between '%s' and '%s' and t1.account = t2.name"%(ch, mon_list[count][data['start_date']], mon_list[count][data['end_date']]))
-
- #----------------------------------------------------------
- actual = flt(actual[0][0])
- r.append(actual)
- # ================ Variance ===================================================
- r.append(r[idx] - r[idx + 1])
- count = count +1
diff --git a/accounts/search_criteria/budget_variance_report/budget_variance_report.sql b/accounts/search_criteria/budget_variance_report/budget_variance_report.sql
deleted file mode 100644
index 575fbfb..0000000
--- a/accounts/search_criteria/budget_variance_report/budget_variance_report.sql
+++ /dev/null
@@ -1,10 +0,0 @@
-SELECT
- CONCAT(REPEAT(' ', COUNT(parent.name) - 1), node.name) AS name
-FROM
- `tabCost Center` AS node,`tabCost Center` AS parent
-WHERE
- node.lft BETWEEN parent.lft AND parent.rgt
- AND node.docstatus !=2
- AND node.company_name like '%(company)s%%'
-GROUP BY node.name
-ORDER BY node.lft
diff --git a/accounts/search_criteria/budget_variance_report/budget_variance_report.txt b/accounts/search_criteria/budget_variance_report/budget_variance_report.txt
deleted file mode 100644
index 2c079a0..0000000
--- a/accounts/search_criteria/budget_variance_report/budget_variance_report.txt
+++ /dev/null
@@ -1,26 +0,0 @@
-[
- {
- "owner": "harshada@webnotestech.com",
- "docstatus": 0,
- "creation": "2012-04-03 12:49:50",
- "modified_by": "Administrator",
- "modified": "2012-04-03 12:49:50"
- },
- {
- "parent_doc_type": "Cost Center",
- "module": "Accounts",
- "doctype": "Search Criteria",
- "sort_order": "DESC",
- "filters": "{'Budget Detail\u0001Fiscal Year':''}",
- "standard": "Yes",
- "doc_type": "Budget Detail",
- "name": "__common__",
- "sort_by": "`tabCost Center`.`lft`",
- "page_len": 50,
- "criteria_name": "Budget Variance Report"
- },
- {
- "name": "budget_variance_report",
- "doctype": "Search Criteria"
- }
-]
\ No newline at end of file
diff --git a/accounts/search_criteria/business_associate_commission_report/__init__.py b/accounts/search_criteria/business_associate_commission_report/__init__.py
deleted file mode 100644
index baffc48..0000000
--- a/accounts/search_criteria/business_associate_commission_report/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-from __future__ import unicode_literals
diff --git a/accounts/search_criteria/business_associate_commission_report/business_associate_commission_report.js b/accounts/search_criteria/business_associate_commission_report/business_associate_commission_report.js
deleted file mode 100644
index 272327b..0000000
--- a/accounts/search_criteria/business_associate_commission_report/business_associate_commission_report.js
+++ /dev/null
@@ -1,26 +0,0 @@
-// ERPNext - web based ERP (http://erpnext.com)
-// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-report.customize_filters = function() {
- this.hide_all_filters();
- this.filter_fields_dict['Sales Invoice'+FILTER_SEP +'Sales Partner'].df.filter_hide = 0;
- this.filter_fields_dict['Sales Invoice'+FILTER_SEP +'Sales Partner'].df.in_first_page = 1;
-
-}
-
-
-this.mytabs.items['Select Columns'].hide();
-this.mytabs.items['More Filters'].hide();
\ No newline at end of file
diff --git a/accounts/search_criteria/business_associate_commission_report/business_associate_commission_report.py b/accounts/search_criteria/business_associate_commission_report/business_associate_commission_report.py
deleted file mode 100644
index 6aa7529..0000000
--- a/accounts/search_criteria/business_associate_commission_report/business_associate_commission_report.py
+++ /dev/null
@@ -1,27 +0,0 @@
-# ERPNext - web based ERP (http://erpnext.com)
-# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-from __future__ import unicode_literals
-colwidths[col_idx['Business Associate']] = '200px'
-
-coltypes[col_idx['Average Commission Rate']] = 'Currency'
-colwidths[col_idx['Average Commission Rate']] = '200px'
-
-coltypes[col_idx['Net Total']] = 'Currency'
-colwidths[col_idx['Net Total']] = '150px'
-
-coltypes[col_idx['Total Commission']] = 'Currency'
-colwidths[col_idx['Total Commission']] = '150px'
\ No newline at end of file
diff --git a/accounts/search_criteria/business_associate_commission_report/business_associate_commission_report.txt b/accounts/search_criteria/business_associate_commission_report/business_associate_commission_report.txt
deleted file mode 100644
index ffc6422..0000000
--- a/accounts/search_criteria/business_associate_commission_report/business_associate_commission_report.txt
+++ /dev/null
@@ -1,29 +0,0 @@
-[
- {
- "owner": "saumil@webnotestech.com",
- "docstatus": 0,
- "creation": "2012-04-03 12:49:50",
- "modified_by": "Administrator",
- "modified": "2012-04-03 12:49:50"
- },
- {
- "add_col": "SUM(`tabSales Invoice`.`total_commission`) AS 'Total Commission'\nSUM(`tabSales Invoice`.`net_total`) AS 'Net Total'\n((SUM(`tabSales Invoice`.`total_commission`) / SUM(`tabSales Invoice`.`net_total`)) * 100) AS 'Average Commission Rate'",
- "module": "Accounts",
- "standard": "Yes",
- "sort_order": "DESC",
- "filters": "{'Sales Invoice\u0001Submitted':1}",
- "description": "Track total commission given to your Business Associate",
- "doc_type": "Sales Invoice",
- "name": "__common__",
- "add_cond": "`tabSales Invoice`.`net_total` > 0\n`tabSales Invoice`.`total_commission` > 0",
- "doctype": "Search Criteria",
- "group_by": "`tabSales Invoice`.sales_partner",
- "page_len": 50,
- "criteria_name": "Business Associate Commission Report",
- "columns": "Sales Invoice\u0001Business Associate"
- },
- {
- "name": "business_associate_commission_report",
- "doctype": "Search Criteria"
- }
-]
\ No newline at end of file
diff --git a/accounts/search_criteria/collection_report/__init__.py b/accounts/search_criteria/collection_report/__init__.py
deleted file mode 100644
index baffc48..0000000
--- a/accounts/search_criteria/collection_report/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-from __future__ import unicode_literals
diff --git a/accounts/search_criteria/collection_report/collection_report.js b/accounts/search_criteria/collection_report/collection_report.js
deleted file mode 100644
index dfa58a6..0000000
--- a/accounts/search_criteria/collection_report/collection_report.js
+++ /dev/null
@@ -1,40 +0,0 @@
-// ERPNext - web based ERP (http://erpnext.com)
-// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-report.customize_filters = function() {
- this.hide_all_filters();
-
- this.filter_fields_dict['Journal Voucher'+FILTER_SEP +'Is Opening'].df.filter_hide = 0;
- this.filter_fields_dict['Journal Voucher'+FILTER_SEP +'Company'].df.filter_hide = 0;
- this.filter_fields_dict['Journal Voucher'+FILTER_SEP +'From Posting Date'].df.filter_hide = 0;
- this.filter_fields_dict['Journal Voucher'+FILTER_SEP +'To Posting Date'].df.filter_hide = 0;
- this.filter_fields_dict['Journal Voucher Detail'+FILTER_SEP +'Account'].df.filter_hide = 0;
-
- this.add_filter({fieldname:'range_1', label:'Range 1', fieldtype:'Data', ignore : 1, parent:'GL Entry'});
- this.add_filter({fieldname:'range_2', label:'Range 2', fieldtype:'Data', ignore : 1, parent:'GL Entry'});
- this.add_filter({fieldname:'range_3', label:'Range 3', fieldtype:'Data', ignore : 1, parent:'GL Entry'});
- this.add_filter({fieldname:'range_4', label:'Range 4', fieldtype:'Data', ignore : 1, parent:'GL Entry'});
-
- this.add_filter({fieldname:'aging_based_on', label:'Aging Based On', fieldtype:'Select', options:NEWLINE+'Transaction Date'+NEWLINE+'Aging Date',ignore : 1, parent:'Sales Invoice', 'report_default': 'Aging Date'});
- this.filter_fields_dict['Journal Voucher'+FILTER_SEP +'From Posting Date'].df.in_first_page = 1;
- this.filter_fields_dict['Journal Voucher'+FILTER_SEP +'To Posting Date'].df.in_first_page = 1;
- this.filter_fields_dict['Journal Voucher Detail'+FILTER_SEP +'Account'].df.in_first_page = 1;
-
- this.filter_fields_dict['Journal Voucher'+FILTER_SEP +'From Posting Date'].df['report_default'] = sys_defaults.year_start_date;
- this.filter_fields_dict['Journal Voucher'+FILTER_SEP +'To Posting Date'].df['report_default'] = dateutil.obj_to_str(new Date());
- this.filter_fields_dict['Journal Voucher'+FILTER_SEP +'Company'].df['report_default']=sys_defaults.company;
-}
-this.mytabs.items['Select Columns'].hide()
\ No newline at end of file
diff --git a/accounts/search_criteria/collection_report/collection_report.py b/accounts/search_criteria/collection_report/collection_report.py
deleted file mode 100644
index bc40a69..0000000
--- a/accounts/search_criteria/collection_report/collection_report.py
+++ /dev/null
@@ -1,107 +0,0 @@
-# ERPNext - web based ERP (http://erpnext.com)
-# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-#check mandatory
-from __future__ import unicode_literals
-if not filter_values.get('posting_date') or not filter_values.get('posting_date1'):
- msgprint("Please select From Posting Date and To Posting Date ")
- raise Exception
-else:
- from_date = filter_values.get('posting_date')
- to_date = filter_values.get('posting_date1')
-
-if not filter_values['range_1'] or not filter_values['range_2'] or not filter_values['range_3'] or not filter_values['range_4']:
- msgprint("Please select aging ranges in no of days in 'Set Filters' section")
- raise Exception
-
-# ageing based on
-aging_based_on = 'Aging Date'
-if filter_values.get('aging_based_on'):
- aging_based_on = filter_values['aging_based_on'].split(NEWLINE)[-1]
-
-
-# Add columns
-# -----------
-row_list = [['ID','Data','150px',''],
- ['Account','Data','150px',''],
- ['Credit','Data','150px',''],
- ['Debit','Data','150px',''],
- ['Against Receivable','Data','150px',''],
- ['Is Advance','Data','150px',''],
- ['Transaction Date','Date','150px',''],
- ['Aging Date','Date','150px',''],
- ['Company','Data','150px',''],
- ['Cheque No','Data','100px',''],
- ['Cheque Date','Date','150px',''],
- ['Territory','Data','150px',''],
- ['Remark','Data','250px',''],
- ['Advance','Data','250px',''],
- ['RV Transaction Date','Date','150px',''],
- ['RV Aging Date','Date','150px',''],
- ['Age (Days)','Data','50px',''],
- ['0-'+cstr(filter_values['range_1']),'Currency','100px',''],
- [cstr(cint(filter_values['range_1']) + 1)+ '-' +cstr(filter_values['range_2']),'Currency','100px',''],
- [cstr(cint(filter_values['range_2']) + 1)+ '-' +cstr(filter_values['range_3']),'Currency','100px',''],
- [cstr(cint(filter_values['range_3']) + 1)+ '-' +cstr(filter_values['range_4']),'Currency','100px',''],
- [cstr(filter_values['range_4']) + '-Above','Currency','100px','']]
-
-for r in row_list:
- colnames.append(r[0])
- coltypes.append(r[1])
- colwidths.append(r[2])
- coloptions.append(r[3])
- col_idx[r[0]] = len(colnames)-1
-
-for r in res:
- if r[col_idx['Against Receivable']]:
- dt=sql("select date(modified), Aging_date from `tabSales Invoice` where name='%s'"%r[col_idx['Against Receivable']])
- r.append('')
- r.append(dt and cstr(dt[0][0]) or '')
- r.append(dt and cstr(dt[0][1]) or '')
- else:
- r.append(r[col_idx['Credit']])
- r.append('')
- r.append('')
-
-
- # Aging Credit Amount
- val_l1 = val_l2 = val_l3 = val_l4 = val_l5_above = diff = 0
-
- if r[col_idx['Against Receivable']]:
- amt = flt(r[col_idx['Credit']]) or (-1)*flt(r[col_idx['Debit']])
-
- if aging_based_on == 'Transaction Date' and r[col_idx['RV Transaction Date']]:
- diff = (getdate(r[col_idx['Transaction Date']]) - getdate(r[col_idx['RV Transaction Date']])).days
- elif aging_based_on == 'Aging Date' and r[col_idx['RV Aging Date']]:
- diff = (getdate(r[col_idx['Aging Date']]) - getdate(r[col_idx['RV Aging Date']])).days
-
- if diff < cint(filter_values['range_1']):
- val_l1 = amt
- if diff >= cint(filter_values['range_1']) and diff < cint(filter_values['range_2']):
- val_l2 = amt
- if diff >= cint(filter_values['range_2']) and diff < cint(filter_values['range_3']):
- val_l3 = amt
- if diff >= cint(filter_values['range_3']) and diff < cint(filter_values['range_4']):
- val_l4 = amt
- if diff >= cint(filter_values['range_4']):
- val_l5_above = amt
-
- r.append(diff)
- r.append(val_l1)
- r.append(val_l2)
- r.append(val_l3)
- r.append(val_l4)
- r.append(val_l5_above)
diff --git a/accounts/search_criteria/collection_report/collection_report.sql b/accounts/search_criteria/collection_report/collection_report.sql
deleted file mode 100644
index 8743b88..0000000
--- a/accounts/search_criteria/collection_report/collection_report.sql
+++ /dev/null
@@ -1,13 +0,0 @@
-SELECT `tabJournal Voucher`.`name`,`tabJournal Voucher Detail`.`account`,`tabJournal Voucher Detail`.`credit`,`tabJournal Voucher Detail`.`debit`,`tabJournal Voucher Detail`.`against_invoice`,`tabJournal Voucher Detail`.`is_advance`,`tabJournal Voucher`.`voucher_date`,`tabJournal Voucher`.`aging_date`,`tabJournal Voucher`.`company`,`tabJournal Voucher`.`cheque_no`,`tabJournal Voucher`.`cheque_date`,`tabCustomer`.`territory`, `tabJournal Voucher`.`remark`
- FROM `tabJournal Voucher Detail`,`tabJournal Voucher`,`tabAccount`,`tabCustomer`
- WHERE `tabJournal Voucher`.docstatus=1
- AND `tabJournal Voucher`.`posting_date`>='%(posting_date)s'
- AND `tabJournal Voucher`.`posting_date`<='%(posting_date1)s'
- AND `tabJournal Voucher`.`company` LIKE '%(company)s%%'
- AND `tabJournal Voucher`.`is_opening` LIKE '%(is_opening)s%%'
- AND `tabJournal Voucher Detail`.`account` LIKE '%(account)s%%'
- AND `tabAccount`.master_type = 'Customer'
- AND `tabAccount`.`account_name` = `tabCustomer`.`name`
- AND `tabJournal Voucher Detail`.`account` = `tabAccount`.`name`
- AND `tabJournal Voucher Detail`.`parent` = `tabJournal Voucher`.`name`
- ORDER BY `tabJournal Voucher`.`name`
\ No newline at end of file
diff --git a/accounts/search_criteria/collection_report/collection_report.txt b/accounts/search_criteria/collection_report/collection_report.txt
deleted file mode 100644
index 781e74c..0000000
--- a/accounts/search_criteria/collection_report/collection_report.txt
+++ /dev/null
@@ -1,26 +0,0 @@
-[
- {
- "owner": "Administrator",
- "docstatus": 0,
- "creation": "2012-04-03 12:49:50",
- "modified_by": "Administrator",
- "modified": "2012-04-03 12:49:50"
- },
- {
- "parent_doc_type": "Journal Voucher",
- "module": "Accounts",
- "doctype": "Search Criteria",
- "sort_order": "DESC",
- "filters": "{'Journal Voucher\u0001Saved':1,'Journal Voucher\u0001Submitted':1,'Journal Voucher\u0001Voucher Type':'','Journal Voucher\u0001Is Opening':'','Journal Voucher\u0001Company':'','Journal Voucher\u0001TDS Applicable':'','Journal Voucher\u0001TDS Category':'','GL Entry\u0001Range 1':'30','GL Entry\u0001Range 2':'45','GL Entry\u0001Range 3':'60','GL Entry\u0001Range 4':'90'}",
- "standard": "Yes",
- "doc_type": "Journal Voucher Detail",
- "name": "__common__",
- "sort_by": "`tabJournal Voucher`.`name`",
- "criteria_name": "Collection Report",
- "columns": "Journal Voucher\u0001ID,Journal Voucher\u0001Posting Date,Journal Voucher\u0001Company,Journal Voucher\u0001Cheque No,Journal Voucher\u0001Cheque Date,Journal Voucher Detail\u0001Account,Journal Voucher Detail\u0001Credit,Journal Voucher Detail\u0001Against Receivable,Journal Voucher Detail\u0001Is Advance"
- },
- {
- "name": "collection_report",
- "doctype": "Search Criteria"
- }
-]
\ No newline at end of file
diff --git a/accounts/search_criteria/cost_center_wise_expense/__init__.py b/accounts/search_criteria/cost_center_wise_expense/__init__.py
deleted file mode 100644
index baffc48..0000000
--- a/accounts/search_criteria/cost_center_wise_expense/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-from __future__ import unicode_literals
diff --git a/accounts/search_criteria/cost_center_wise_expense/cost_center_wise_expense.js b/accounts/search_criteria/cost_center_wise_expense/cost_center_wise_expense.js
deleted file mode 100644
index d33a4e8..0000000
--- a/accounts/search_criteria/cost_center_wise_expense/cost_center_wise_expense.js
+++ /dev/null
@@ -1,39 +0,0 @@
-// ERPNext - web based ERP (http://erpnext.com)
-// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-report.customize_filters = function() {
- this.hide_all_filters();
-
- this.filter_fields_dict['GL Entry'+FILTER_SEP +'Cost Center'].df.filter_hide = 0;
- this.filter_fields_dict['GL Entry'+FILTER_SEP +'Company'].df.filter_hide = 0;
- this.filter_fields_dict['GL Entry'+FILTER_SEP +'From Posting Date'].df.filter_hide = 0;
- this.filter_fields_dict['GL Entry'+FILTER_SEP +'To Posting Date'].df.filter_hide = 0;
- this.filter_fields_dict['GL Entry'+FILTER_SEP +'Account'].df.filter_hide = 0;
-
- this.filter_fields_dict['GL Entry'+FILTER_SEP +'From Posting Date'].df.in_first_page = 1;
- this.filter_fields_dict['GL Entry'+FILTER_SEP +'To Posting Date'].df.in_first_page = 1;
- this.filter_fields_dict['GL Entry'+FILTER_SEP +'Account'].df.in_first_page = 1;
- this.filter_fields_dict['GL Entry'+FILTER_SEP +'Cost Center'].df.in_first_page = 1;
- this.filter_fields_dict['GL Entry'+FILTER_SEP +'Company'].df.in_first_page = 1;
-
-
- this.filter_fields_dict['GL Entry'+FILTER_SEP +'From Posting Date'].df['report_default'] = sys_defaults.year_start_date;
- this.filter_fields_dict['GL Entry'+FILTER_SEP +'To Posting Date'].df['report_default'] = dateutil.obj_to_str(new Date());
- this.filter_fields_dict['GL Entry'+FILTER_SEP +'Company'].df['report_default'] = sys_defaults.company;
-
-}
-this.mytabs.items['Select Columns'].hide();
-this.mytabs.items['More Filters'].hide();
\ No newline at end of file
diff --git a/accounts/search_criteria/cost_center_wise_expense/cost_center_wise_expense.py b/accounts/search_criteria/cost_center_wise_expense/cost_center_wise_expense.py
deleted file mode 100644
index 1c73501..0000000
--- a/accounts/search_criteria/cost_center_wise_expense/cost_center_wise_expense.py
+++ /dev/null
@@ -1,30 +0,0 @@
-# ERPNext - web based ERP (http://erpnext.com)
-# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-# Add columns
-# -----------
-from __future__ import unicode_literals
-row_list = [['Cost Center','Data','160px'],
- ['Account','Data','160px'],
- ['Debit','Currency','120px'],
- ['Credit','Currency','120px'],
- ['Expense','Currency','120px']]
-
-for r in row_list:
- colnames.append(r[0])
- coltypes.append(r[1])
- colwidths.append(r[2])
- col_idx[r[0]] = len(colnames)-1
\ No newline at end of file
diff --git a/accounts/search_criteria/cost_center_wise_expense/cost_center_wise_expense.sql b/accounts/search_criteria/cost_center_wise_expense/cost_center_wise_expense.sql
deleted file mode 100644
index b5fbb7c..0000000
--- a/accounts/search_criteria/cost_center_wise_expense/cost_center_wise_expense.sql
+++ /dev/null
@@ -1,20 +0,0 @@
-SELECT
- `tabGL Entry`.`cost_center`,
- `tabAccount`.`parent_account`,
- sum(ifnull(`tabGL Entry`.`debit`, 0)),
- sum(ifnull(`tabGL Entry`.`credit`, 0)),
- sum(ifnull(`tabGL Entry`.`debit`,0))-sum(ifnull(`tabGL Entry`.`credit`, 0))
- FROM
- `tabGL Entry`,`tabAccount`
- WHERE
- `tabGL Entry`.`account`=`tabAccount`.`name`
- AND ifnull(`tabGL Entry`.`is_cancelled`,'No')='No'
- AND `tabAccount`.is_pl_account='Yes'
- AND `tabAccount`.debit_or_credit='Debit'
- AND `tabGL Entry`.`posting_date`>='%(posting_date)s'
- AND `tabGL Entry`.`posting_date`<='%(posting_date1)s'
- AND `tabGL Entry`.`company` LIKE '%(company)s%%'
- AND `tabAccount`.`parent_account` LIKE '%(account)s%%'
- AND `tabGL Entry`.`cost_center` LIKE '%(cost_center)s%%'
- GROUP BY
- `tabGL Entry`.`cost_center` , `tabAccount`.`parent_account`
\ No newline at end of file
diff --git a/accounts/search_criteria/cost_center_wise_expense/cost_center_wise_expense.txt b/accounts/search_criteria/cost_center_wise_expense/cost_center_wise_expense.txt
deleted file mode 100644
index 98e3b08..0000000
--- a/accounts/search_criteria/cost_center_wise_expense/cost_center_wise_expense.txt
+++ /dev/null
@@ -1,26 +0,0 @@
-[
- {
- "owner": "swarnalata@webnotestech.com",
- "docstatus": 0,
- "creation": "2012-04-03 12:49:50",
- "modified_by": "Administrator",
- "modified": "2012-04-03 12:49:50"
- },
- {
- "module": "Accounts",
- "standard": "Yes",
- "sort_order": "DESC",
- "filters": "{'GL Entry\u0001Voucher Type':'','GL Entry\u0001Is Cancelled':'','GL Entry\u0001Fiscal Year':'','GL Entry\u0001Company':''}",
- "doctype": "Search Criteria",
- "dis_filters": "fiscal_year",
- "doc_type": "GL Entry",
- "name": "__common__",
- "sort_by": "`tabGL Entry`.`name`",
- "page_len": 50,
- "criteria_name": "Cost Center wise Expense"
- },
- {
- "name": "cost_center_wise_expense",
- "doctype": "Search Criteria"
- }
-]
\ No newline at end of file
diff --git a/accounts/search_criteria/creditors_ledger/__init__.py b/accounts/search_criteria/creditors_ledger/__init__.py
deleted file mode 100644
index baffc48..0000000
--- a/accounts/search_criteria/creditors_ledger/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-from __future__ import unicode_literals
diff --git a/accounts/search_criteria/creditors_ledger/creditors_ledger.js b/accounts/search_criteria/creditors_ledger/creditors_ledger.js
deleted file mode 100644
index b3f1a09..0000000
--- a/accounts/search_criteria/creditors_ledger/creditors_ledger.js
+++ /dev/null
@@ -1,40 +0,0 @@
-// ERPNext - web based ERP (http://erpnext.com)
-// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-report.customize_filters = function() {
-
- //to hide all filters
- this.hide_all_filters();
- field_list=['Voucher Type', 'Voucher No', 'From Posting Date','To Posting Date','Account','Company', 'Remarks', 'Is Cancelled', 'Is Opening']
- for(var i=0;i<field_list.length;i++){
- this.filter_fields_dict['GL Entry'+FILTER_SEP +field_list[i]].df.filter_hide = 0;
- }
-
- this.filter_fields_dict['GL Entry'+FILTER_SEP +'Account'].df.in_first_page = 1;
- this.filter_fields_dict['GL Entry'+FILTER_SEP +'From Posting Date'].df.in_first_page = 1;
- this.filter_fields_dict['GL Entry'+FILTER_SEP +'To Posting Date'].df.in_first_page = 1;
-
- this.filter_fields_dict['GL Entry'+FILTER_SEP +'From Posting Date'].df['report_default'] = sys_defaults.year_start_date;
- this.filter_fields_dict['GL Entry'+FILTER_SEP +'To Posting Date'].df['report_default'] = dateutil.obj_to_str(new Date());
- this.filter_fields_dict['GL Entry'+FILTER_SEP +'Company'].df['report_default'] = sys_defaults.company;
-}
-
-this.mytabs.tabs['Select Columns'].hide()
-
-report.aftertableprint = function(t) {
- $yt(t,'*',2,{whiteSpace:'pre'});
- $yt(t,'*',3,{whiteSpace:'pre'});
-}
\ No newline at end of file
diff --git a/accounts/search_criteria/creditors_ledger/creditors_ledger.py b/accounts/search_criteria/creditors_ledger/creditors_ledger.py
deleted file mode 100644
index cba3993..0000000
--- a/accounts/search_criteria/creditors_ledger/creditors_ledger.py
+++ /dev/null
@@ -1,134 +0,0 @@
-# ERPNext - web based ERP (http://erpnext.com)
-# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-#get company
-from __future__ import unicode_literals
-
-import webnotes.defaults
-company = filter_values.get('company') or webnotes.defaults.get_user_default('company')
-
-#get company letter head
-l_head = sql("select letter_head from `tabCompany` where name='%s'" % company)
-l_head = l_head and l_head[0][0] or ''
-
-# Posting date, fiscal year and year start date
-#-----------------------------------------------
-if not filter_values.get('posting_date') or not filter_values.get('posting_date1'):
- msgprint("Please enter From Date and To Date")
- raise Exception
-else:
- from_date = filter_values['posting_date']
- to_date = filter_values['posting_date1']
-
-ysd, from_date_year = sql("select year_start_date, name from `tabFiscal Year` where %s between year_start_date and date_add(year_start_date,interval 1 year)",from_date)[0]
-
-
-# define columns
-#---------------
-col = []
-col.append(['Date','Date','80px',''])
-col.append(['Detail','Text','475px',''])
-col.append(['Debit','Currency','75px',''])
-col.append(['Credit','Currency','75px',''])
-
-for c in col:
- colnames.append(c[0])
- coltypes.append(c[1])
- colwidths.append(c[2])
- coloptions.append(c[3])
- col_idx[c[0]] = len(colnames)
-
-
-total_debit, total_credit, total_opening, total_diff = 0,0,0,0
-
-#total query
-q = query.split('WHERE')[1].split('LIMIT')
-if len(q) > 2:
- query_where_clause = 'LIMIT'.join(q[:-1])
-else:
- query_where_clause = q[0]
-
-tot = sql('select sum(`tabGL Entry`.debit),sum(`tabGL Entry`.credit) from `tabGL Entry`, tabAccount where %s' % query_where_clause)
-
-for t in tot:
- total_debit += t and flt(t[0]) or 0
- total_credit += t and flt(t[1]) or 0
-
-total_diff = total_debit - total_credit
-
-# opening
-account = filter_values.get('account')
-if account:
- acc_det = sql("select debit_or_credit, is_pl_account, lft, rgt, group_or_ledger from tabAccount where name = '%s'" % account)
- from accounts.utils import get_balance_on
- opening_bal = get_balance_on(account, add_days(from_date, -1))
-
- if acc_det[0][0] == 'Credit':
- opening_bal = -1*opening_bal
-
-
-out = []
-count = 0
-for r in res:
- count +=1
- det = r[1].split('~~~')
- if from_export == 1:
- a = "Account: " + det[0] + NEWLINE + det[1] + NEWLINE + "Against: " + det[2] + NEWLINE + "Voucher No: " + det[4]
- else:
- a = "Account: <b>" + det[0]+ "</b>" + NEWLINE + "<div class='comment'>" +det[1]+ "</div><div class = 'comment' style='padding-left:12px'>Against: <b>" + det[2] + "</b></div><div class = 'comment' style='padding-left:12px'>Voucher No: <span class='link_type' onclick='loaddoc(" + '"' + det[3] +'", ' + '"' + det[4] +'"' + ")'>" + det[4] + "</span></div>"
- r[1] = a
- out.append(r)
-
-if total_debit != 0 or total_credit != 0:
- # Total debit/credit
- t_row = ['' for i in range(len(colnames))]
- t_row[1] = 'Total'
- t_row[col_idx['Debit']-1] = total_debit
- t_row[col_idx['Credit']-1] = total_credit
- out.append(t_row)
-
- # opening
- if account:
- t_row = ['' for i in range(len(colnames))]
- t_row[1] = 'Opening Balance on '+ from_date
- t_row[col_idx['Debit']-1] = opening_bal
- out.append(t_row)
-
- # diffrence (dr-cr)
- t_row = ['' for i in range(len(colnames))]
- t_row[1] = 'Total(Dr-Cr)'
- t_row[col_idx['Debit']-1] = total_diff
- out.append(t_row)
-
- # closing
- if account:
- t_row = ['' for i in range(len(colnames))]
- t_row[1] = 'Closing Balance on ' + to_date
- t_row[col_idx['Debit']-1] = flt(opening_bal) + flt(total_diff )
- out.append(t_row)
-
-# Print Format
-myheader = """<table width = '100%%'><tr><td>"""+l_head+"""</td>
-</tr>
-<tr> <td>
-<div><h3> %(acc)s </h3></div>
-<div>Ledger Between %(fdt)s and %(tdt)s </div></td></tr></table><br>
-
- """ % {'acc':account,
- 'fdt':from_date,
- 'tdt':to_date}
-
-page_template = myheader+"<div>%(table)s</div>"
\ No newline at end of file
diff --git a/accounts/search_criteria/creditors_ledger/creditors_ledger.sql b/accounts/search_criteria/creditors_ledger/creditors_ledger.sql
deleted file mode 100644
index 03784b9..0000000
--- a/accounts/search_criteria/creditors_ledger/creditors_ledger.sql
+++ /dev/null
@@ -1,15 +0,0 @@
-SELECT `tabGL Entry`.`posting_date`, CONCAT(`tabGL Entry`.`account`, "~~~", ifnull(`tabGL Entry`.`remarks`, ''), "~~~", ifnull(`tabGL Entry`.`against`,''), "~~~", ifnull(`tabGL Entry`.`voucher_type`, ''), "~~~", ifnull(`tabGL Entry`.`voucher_no`, '')), sum(`tabGL Entry`.`debit`), sum(`tabGL Entry`.`credit`)
- FROM `tabGL Entry`, `tabAccount`
- WHERE `tabGL Entry`.`is_cancelled` LIKE '%(is_cancelled)s%%'
- AND `tabGL Entry`.`posting_date`>='%(posting_date)s'
- AND `tabGL Entry`.`posting_date`<='%(posting_date1)s'
- AND `tabGL Entry`.`company` LIKE '%(company)s%%'
- AND `tabGL Entry`.`account` LIKE '%(account)s%%'
- AND `tabGL Entry`.`remarks` LIKE '%(remarks)s%%'
- AND `tabGL Entry`.`is_opening` LIKE '%(is_opening)s%%'
- AND `tabGL Entry`.`voucher_no` LIKE '%(voucher_no)s%%'
- AND `tabGL Entry`.`voucher_type` LIKE '%(voucher_type)s%%'
- AND `tabGL Entry`.`account` = `tabAccount`.`name`
- AND `tabAccount`.`master_type` = 'Supplier'
- GROUP BY `tabGL Entry`.`voucher_no`,`tabGL Entry`.`account`
- ORDER BY `tabGL Entry`.`posting_date` DESC
\ No newline at end of file
diff --git a/accounts/search_criteria/creditors_ledger/creditors_ledger.txt b/accounts/search_criteria/creditors_ledger/creditors_ledger.txt
deleted file mode 100644
index 7f44ab4c..0000000
--- a/accounts/search_criteria/creditors_ledger/creditors_ledger.txt
+++ /dev/null
@@ -1,27 +0,0 @@
-[
- {
- "owner": "nabin@erpnext.com",
- "docstatus": 0,
- "creation": "2012-05-14 18:05:41",
- "modified_by": "nabin@erpnext.com",
- "modified": "2012-12-06 11:36:10"
- },
- {
- "custom_query": null,
- "report_script": null,
- "page_len": 50,
- "module": "Accounts",
- "standard": "Yes",
- "sort_order": "DESC",
- "filters": "{\"GL Entry\\u0001Voucher Type\":[],\"GL Entry\\u0001Is Cancelled\":[\"No\"],\"GL Entry\\u0001Is Opening\":[\"\"],\"GL Entry\\u0001Fiscal Year\":[\"\"]}",
- "doc_type": "GL Entry",
- "name": "__common__",
- "doctype": "Search Criteria",
- "sort_by": "`tabGL Entry`.`name`",
- "criteria_name": "Creditors Ledger"
- },
- {
- "name": "creditors_ledger",
- "doctype": "Search Criteria"
- }
-]
\ No newline at end of file
diff --git a/accounts/search_criteria/debtors_ledger/__init__.py b/accounts/search_criteria/debtors_ledger/__init__.py
deleted file mode 100644
index baffc48..0000000
--- a/accounts/search_criteria/debtors_ledger/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-from __future__ import unicode_literals
diff --git a/accounts/search_criteria/debtors_ledger/debtors_ledger.js b/accounts/search_criteria/debtors_ledger/debtors_ledger.js
deleted file mode 100644
index b3f1a09..0000000
--- a/accounts/search_criteria/debtors_ledger/debtors_ledger.js
+++ /dev/null
@@ -1,40 +0,0 @@
-// ERPNext - web based ERP (http://erpnext.com)
-// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-report.customize_filters = function() {
-
- //to hide all filters
- this.hide_all_filters();
- field_list=['Voucher Type', 'Voucher No', 'From Posting Date','To Posting Date','Account','Company', 'Remarks', 'Is Cancelled', 'Is Opening']
- for(var i=0;i<field_list.length;i++){
- this.filter_fields_dict['GL Entry'+FILTER_SEP +field_list[i]].df.filter_hide = 0;
- }
-
- this.filter_fields_dict['GL Entry'+FILTER_SEP +'Account'].df.in_first_page = 1;
- this.filter_fields_dict['GL Entry'+FILTER_SEP +'From Posting Date'].df.in_first_page = 1;
- this.filter_fields_dict['GL Entry'+FILTER_SEP +'To Posting Date'].df.in_first_page = 1;
-
- this.filter_fields_dict['GL Entry'+FILTER_SEP +'From Posting Date'].df['report_default'] = sys_defaults.year_start_date;
- this.filter_fields_dict['GL Entry'+FILTER_SEP +'To Posting Date'].df['report_default'] = dateutil.obj_to_str(new Date());
- this.filter_fields_dict['GL Entry'+FILTER_SEP +'Company'].df['report_default'] = sys_defaults.company;
-}
-
-this.mytabs.tabs['Select Columns'].hide()
-
-report.aftertableprint = function(t) {
- $yt(t,'*',2,{whiteSpace:'pre'});
- $yt(t,'*',3,{whiteSpace:'pre'});
-}
\ No newline at end of file
diff --git a/accounts/search_criteria/debtors_ledger/debtors_ledger.py b/accounts/search_criteria/debtors_ledger/debtors_ledger.py
deleted file mode 100644
index a2e3c36..0000000
--- a/accounts/search_criteria/debtors_ledger/debtors_ledger.py
+++ /dev/null
@@ -1,133 +0,0 @@
-# ERPNext - web based ERP (http://erpnext.com)
-# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-#get company
-from __future__ import unicode_literals
-
-import webnotes.defaults
-company = filter_values.get('company') or webnotes.defaults.get_user_default('company')
-
-#get company letter head
-l_head = sql("select letter_head from `tabCompany` where name='%s'" % company)
-l_head = l_head and l_head[0][0] or ''
-
-# Posting date, fiscal year and year start date
-#-----------------------------------------------
-if not filter_values.get('posting_date') or not filter_values.get('posting_date1'):
- msgprint("Please enter From Date and To Date")
- raise Exception
-else:
- from_date = filter_values['posting_date']
- to_date = filter_values['posting_date1']
-
-ysd, from_date_year = sql("select year_start_date, name from `tabFiscal Year` where %s between year_start_date and date_add(year_start_date,interval 1 year)",from_date)[0]
-
-
-# define columns
-#---------------
-col = []
-col.append(['Date','Date','80px',''])
-col.append(['Detail','Text','475px',''])
-col.append(['Debit','Currency','75px',''])
-col.append(['Credit','Currency','75px',''])
-
-for c in col:
- colnames.append(c[0])
- coltypes.append(c[1])
- colwidths.append(c[2])
- coloptions.append(c[3])
- col_idx[c[0]] = len(colnames)
-
-
-total_debit, total_credit, total_opening, total_diff = 0,0,0,0
-
-#total query
-q = query.split('WHERE')[1].split('LIMIT')
-if len(q) > 2:
- query_where_clause = 'LIMIT'.join(q[:-1])
-else:
- query_where_clause = q[0]
-
-tot = sql('select sum(`tabGL Entry`.debit),sum(`tabGL Entry`.credit) from `tabGL Entry`, tabAccount where %s' % query_where_clause)
-
-for t in tot:
- total_debit += t and flt(t[0]) or 0
- total_credit += t and flt(t[1]) or 0
-
-total_diff = total_debit - total_credit
-
-# opening
-account = filter_values.get('account')
-if account:
- acc_det = sql("select debit_or_credit, is_pl_account, lft, rgt, group_or_ledger from tabAccount where name = '%s'" % account)
- from accounts.utils import get_balance_on
- opening_bal = get_balance_on(account, add_days(from_date, -1))
- if acc_det[0][0] == 'Credit':
- opening_bal = -1*opening_bal
-
-
-out = []
-count = 0
-for r in res:
- count +=1
- det = r[1].split('~~~')
- if from_export == 1:
- a = "Account: " + det[0] + NEWLINE + det[1] + NEWLINE + "Against: " + det[2] + NEWLINE + "Voucher No: " + det[4]
- else:
- a = "Account: <b>" + det[0]+ "</b>" + NEWLINE + "<div class='comment'>" +det[1]+ "</div><div class = 'comment' style='padding-left:12px'>Against: <b>" + det[2] + "</b></div><div class = 'comment' style='padding-left:12px'>Voucher No: <span class='link_type' onclick='loaddoc(" + '"' + det[3] +'", ' + '"' + det[4] +'"' + ")'>" + det[4] + "</span></div>"
- r[1] = a
- out.append(r)
-
-if total_debit != 0 or total_credit != 0:
- # Total debit/credit
- t_row = ['' for i in range(len(colnames))]
- t_row[1] = 'Total'
- t_row[col_idx['Debit']-1] = total_debit
- t_row[col_idx['Credit']-1] = total_credit
- out.append(t_row)
-
- # opening
- if account:
- t_row = ['' for i in range(len(colnames))]
- t_row[1] = 'Opening Balance on '+ from_date
- t_row[col_idx['Debit']-1] = opening_bal
- out.append(t_row)
-
- # diffrence (dr-cr)
- t_row = ['' for i in range(len(colnames))]
- t_row[1] = 'Total(Dr-Cr)'
- t_row[col_idx['Debit']-1] = total_diff
- out.append(t_row)
-
- # closing
- if account:
- t_row = ['' for i in range(len(colnames))]
- t_row[1] = 'Closing Balance on ' + to_date
- t_row[col_idx['Debit']-1] = flt(opening_bal) + flt(total_diff )
- out.append(t_row)
-
-# Print Format
-myheader = """<table width = '100%%'><tr><td>"""+l_head+"""</td>
-</tr>
-<tr> <td>
-<div><h3> %(acc)s </h3></div>
-<div>Ledger Between %(fdt)s and %(tdt)s </div></td></tr></table><br>
-
- """ % {'acc':account,
- 'fdt':from_date,
- 'tdt':to_date}
-
-page_template = myheader+"<div>%(table)s</div>"
\ No newline at end of file
diff --git a/accounts/search_criteria/debtors_ledger/debtors_ledger.sql b/accounts/search_criteria/debtors_ledger/debtors_ledger.sql
deleted file mode 100644
index 59103fd..0000000
--- a/accounts/search_criteria/debtors_ledger/debtors_ledger.sql
+++ /dev/null
@@ -1,15 +0,0 @@
-SELECT `tabGL Entry`.`posting_date`, CONCAT(`tabGL Entry`.`account`, "~~~", ifnull(`tabGL Entry`.`remarks`, ''), "~~~", ifnull(`tabGL Entry`.`against`,''), "~~~", ifnull(`tabGL Entry`.`voucher_type`, ''), "~~~", ifnull(`tabGL Entry`.`voucher_no`, '')), sum(`tabGL Entry`.`debit`), sum(`tabGL Entry`.`credit`)
- FROM `tabGL Entry`, `tabAccount`
- WHERE `tabGL Entry`.`is_cancelled` LIKE '%(is_cancelled)s%%'
- AND `tabGL Entry`.`posting_date`>='%(posting_date)s'
- AND `tabGL Entry`.`posting_date`<='%(posting_date1)s'
- AND `tabGL Entry`.`company` LIKE '%(company)s%%'
- AND `tabGL Entry`.`account` LIKE '%(account)s%%'
- AND `tabGL Entry`.`remarks` LIKE '%(remarks)s%%'
- AND `tabGL Entry`.`is_opening` LIKE '%(is_opening)s%%'
- AND `tabGL Entry`.`voucher_no` LIKE '%(voucher_no)s%%'
- AND `tabGL Entry`.`voucher_type` LIKE '%(voucher_type)s%%'
- AND `tabGL Entry`.`account` = `tabAccount`.`name`
- AND `tabAccount`.`master_type` = 'Customer'
- GROUP BY `tabGL Entry`.`voucher_no`,`tabGL Entry`.`account`
- ORDER BY `tabGL Entry`.`posting_date` DESC
\ No newline at end of file
diff --git a/accounts/search_criteria/debtors_ledger/debtors_ledger.txt b/accounts/search_criteria/debtors_ledger/debtors_ledger.txt
deleted file mode 100644
index e04492f..0000000
--- a/accounts/search_criteria/debtors_ledger/debtors_ledger.txt
+++ /dev/null
@@ -1,27 +0,0 @@
-[
- {
- "owner": "nabin@erpnext.com",
- "docstatus": 0,
- "creation": "2012-05-14 18:05:42",
- "modified_by": "nabin@erpnext.com",
- "modified": "2012-12-06 11:37:16"
- },
- {
- "custom_query": null,
- "report_script": null,
- "page_len": 50,
- "module": "Accounts",
- "standard": "Yes",
- "sort_order": "DESC",
- "filters": "{\"GL Entry\\u0001Voucher Type\":[],\"GL Entry\\u0001Is Cancelled\":[\"No\"],\"GL Entry\\u0001Is Opening\":[],\"GL Entry\\u0001Fiscal Year\":[]}",
- "doc_type": "GL Entry",
- "name": "__common__",
- "doctype": "Search Criteria",
- "sort_by": "`tabGL Entry`.`name`",
- "criteria_name": "Debtors Ledger"
- },
- {
- "name": "debtors_ledger",
- "doctype": "Search Criteria"
- }
-]
\ No newline at end of file
diff --git a/accounts/search_criteria/general_ledger/__init__.py b/accounts/search_criteria/general_ledger/__init__.py
deleted file mode 100644
index baffc48..0000000
--- a/accounts/search_criteria/general_ledger/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-from __future__ import unicode_literals
diff --git a/accounts/search_criteria/general_ledger/general_ledger.js b/accounts/search_criteria/general_ledger/general_ledger.js
deleted file mode 100644
index 3d6505f..0000000
--- a/accounts/search_criteria/general_ledger/general_ledger.js
+++ /dev/null
@@ -1,39 +0,0 @@
-// ERPNext - web based ERP (http://erpnext.com)
-// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-report.customize_filters = function() {
- this.mytabs.tabs['Select Columns'].hide();
- //to hide all filters
- this.hide_all_filters();
- field_list=['Voucher Type', 'Voucher No', 'From Posting Date','To Posting Date','Account','Company', 'Remarks', 'Is Cancelled', 'Is Opening']
- for(var i=0;i<field_list.length;i++){
- this.filter_fields_dict['GL Entry'+FILTER_SEP +field_list[i]].df.filter_hide = 0;
- }
-
- this.filter_fields_dict['GL Entry'+FILTER_SEP +'Account'].df.in_first_page = 1;
- this.filter_fields_dict['GL Entry'+FILTER_SEP +'From Posting Date'].df.in_first_page = 1;
- this.filter_fields_dict['GL Entry'+FILTER_SEP +'To Posting Date'].df.in_first_page = 1;
-
- this.filter_fields_dict['GL Entry'+FILTER_SEP +'From Posting Date'].df['report_default'] = sys_defaults.year_start_date;
- this.filter_fields_dict['GL Entry'+FILTER_SEP +'To Posting Date'].df['report_default'] = dateutil.obj_to_str(new Date());
- this.filter_fields_dict['GL Entry'+FILTER_SEP +'Company'].df['report_default'] = sys_defaults.company;
-}
-
-
-report.aftertableprint = function(t) {
- $yt(t,'*',2,{whiteSpace:'pre'});
- $yt(t,'*',3,{whiteSpace:'pre'});
-}
diff --git a/accounts/search_criteria/general_ledger/general_ledger.py b/accounts/search_criteria/general_ledger/general_ledger.py
deleted file mode 100644
index 11ab7c3..0000000
--- a/accounts/search_criteria/general_ledger/general_ledger.py
+++ /dev/null
@@ -1,141 +0,0 @@
-# ERPNext - web based ERP (http://erpnext.com)
-# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-#get company letter head
-#---------------------------------------------------------------------
-from __future__ import unicode_literals
-l_head = sql("select content from `tabLetter Head` where ifnull(is_default, 0) = 1 and ifnull(disabled, 0) = 0")
-l_head = l_head and l_head[0][0] or ''
-
-
-# Posting date, fiscal year and year start date
-#---------------------------------------------------------------------
-if not filter_values.get('posting_date') or not filter_values.get('posting_date1'):
- msgprint("Please enter From Date and To Date")
- raise Exception
-else:
- from_date = filter_values['posting_date']
- to_date = filter_values['posting_date1']
-
-# define columns
-#---------------------------------------------------------------------
-col = []
-col.append(['Date','Date','80px',''])
-col.append(['Detail','Text','475px',''])
-col.append(['Debit','Currency','75px',''])
-col.append(['Credit','Currency','75px',''])
-
-for c in col:
- colnames.append(c[0])
- coltypes.append(c[1])
- colwidths.append(c[2])
- coloptions.append(c[3])
- col_idx[c[0]] = len(colnames)
-
-
-#total query
-#---------------------------------------------------------------------
-total_debit, total_credit, total_opening, total_diff = 0,0,0,0
-q = query.split('WHERE')[1].split('LIMIT')
-if len(q) > 2:
- query_where_clause = 'LIMIT'.join(q[:-1])
-else:
- query_where_clause = q[0]
-
-tot = sql('select sum(debit),sum(credit) from `tabGL Entry` where %s' % query_where_clause)
-
-for t in tot:
- total_debit += t and flt(t[0]) or 0
- total_credit += t and flt(t[1]) or 0
-
-total_diff = total_debit - total_credit
-
-out = []
-
-
-# If account mentioned, show opening and closing
-#---------------------------------------------------------------------
-account = filter_values.get('account')
-
-if account and (total_debit != 0 or total_credit != 0):
- acc_det = sql("select debit_or_credit, is_pl_account, lft, rgt, group_or_ledger from tabAccount where name = '%s'" % account)
-
- from accounts.utils import get_balance_on
- opening_bal = get_balance_on(account, add_days(from_date, -1))
- closing_bal = get_balance_on(account, to_date)
-
- if acc_det[0][0] == 'Credit':
- closing_bal = -1*closing_bal
- opening_bal = -1*opening_bal
-
- # add opening row
- t_row = ['' for i in range(len(colnames))]
- t_row[1] = 'Opening as on '+formatdate(from_date)
- t_row[col_idx['Debit']-1] = opening_bal
- out.append(t_row)
-
-
-# table output
-#---------------------------------------------------------------------
-count = 0
-for r in res:
- count +=1
- det = r[1].split('~~~')
- if from_export == 1:
- a = "Account: " + det[0] + NEWLINE + det[1] + NEWLINE + "Against: " + det[2] + NEWLINE + "Voucher No: " + det[4]
- else:
- a = "Account: <b>" + det[0]+ "</b>" + NEWLINE + "<div class='comment'>" +det[1]+ "</div><div class = 'comment' style='padding-left:12px'>Against: <b>" + det[2] + "</b></div><div class = 'comment' style='padding-left:12px'>Voucher No: <span class='link_type' onclick='loaddoc(" + '"' + det[3] +'", ' + '"' + det[4] +'"' + ")'>" + det[4] + "</span></div>"
- r[1] = a
- out.append(r)
-
-
-# Total, Difference and closing balance
-#---------------------------------------------------------------------
-if total_debit != 0 or total_credit != 0:
- # Total debit/credit
- t_row = ['' for i in range(len(colnames))]
- t_row[1] = 'Total'
- t_row[col_idx['Debit']-1] = total_debit
- t_row[col_idx['Credit']-1] = total_credit
- out.append(t_row)
-
- # diffrence (dr-cr)
- t_row = ['' for i in range(len(colnames))]
- t_row[1] = 'Total(Dr-Cr)'
- t_row[col_idx['Debit']-1] = total_diff
- out.append(t_row)
-
- # closing
- if account:
- t_row = ['' for i in range(len(colnames))]
- t_row[1] = 'Closing Balance on ' + formatdate(to_date)
- t_row[col_idx['Debit']-1] = flt(closing_bal)
- out.append(t_row)
-
-
-# Print Format
-#---------------------------------------------------------------------
-myheader = """<table width = '100%%'><tr><td>"""+l_head+"""</td>
-</tr>
-<tr> <td>
-<div><h3> %(acc)s </h3></div>
-<div>Ledger Between %(fdt)s and %(tdt)s </div></td></tr></table><br>
-
- """ % {'acc':account,
- 'fdt':from_date,
- 'tdt':to_date}
-
-page_template = myheader+"<div>%(table)s</div>"
diff --git a/accounts/search_criteria/general_ledger/general_ledger.sql b/accounts/search_criteria/general_ledger/general_ledger.sql
deleted file mode 100644
index 51123cd..0000000
--- a/accounts/search_criteria/general_ledger/general_ledger.sql
+++ /dev/null
@@ -1,13 +0,0 @@
-SELECT `tabGL Entry`.`posting_date`, CONCAT(`tabGL Entry`.`account`, "~~~", ifnull(`tabGL Entry`.`remarks`, ''), "~~~", ifnull(`tabGL Entry`.`against`,''), "~~~", ifnull(`tabGL Entry`.`voucher_type`, ''), "~~~", ifnull(`tabGL Entry`.`voucher_no`, '')), sum(`tabGL Entry`.`debit`), sum(`tabGL Entry`.`credit`)
- FROM `tabGL Entry`
- WHERE `tabGL Entry`.`is_cancelled` LIKE '%(is_cancelled)s%%'
- AND `tabGL Entry`.`posting_date`>='%(posting_date)s'
- AND `tabGL Entry`.`posting_date`<='%(posting_date1)s'
- AND `tabGL Entry`.`company` LIKE '%(company)s%%'
- AND `tabGL Entry`.`account` LIKE '%(account)s%%'
- AND `tabGL Entry`.`remarks` LIKE '%(remarks)s%%'
- AND `tabGL Entry`.`is_opening` LIKE '%(is_opening)s%%'
- AND `tabGL Entry`.`voucher_no` LIKE '%(voucher_no)s%%'
- AND `tabGL Entry`.`voucher_type` LIKE '%(voucher_type)s%%'
- GROUP BY `tabGL Entry`.`voucher_no`,`tabGL Entry`.`account`
- ORDER BY `tabGL Entry`.`posting_date` DESC
\ No newline at end of file
diff --git a/accounts/search_criteria/general_ledger/general_ledger.txt b/accounts/search_criteria/general_ledger/general_ledger.txt
deleted file mode 100644
index 939b8a3..0000000
--- a/accounts/search_criteria/general_ledger/general_ledger.txt
+++ /dev/null
@@ -1,25 +0,0 @@
-[
- {
- "owner": "Administrator",
- "docstatus": 0,
- "creation": "2012-04-03 12:49:51",
- "modified_by": "Administrator",
- "modified": "2012-04-03 12:49:51"
- },
- {
- "module": "Accounts",
- "sort_order": "DESC",
- "filters": "{'GL Entry\u0001From Posting Date\u0001lower':'','GL Entry\u0001To Posting Date\u0001upper':'','GL Entry\u0001Voucher Type':'','GL Entry\u0001Is Cancelled':'No','GL Entry\u0001Is Opening':'','GL Entry\u0001Fiscal Year':'','GL Entry\u0001Company':''}",
- "standard": "Yes",
- "doc_type": "GL Entry",
- "name": "__common__",
- "doctype": "Search Criteria",
- "sort_by": "`tabGL Entry`.`name`",
- "page_len": 50,
- "criteria_name": "General Ledger"
- },
- {
- "name": "general_ledger",
- "doctype": "Search Criteria"
- }
-]
\ No newline at end of file
diff --git a/accounts/search_criteria/invoices_overdue/__init__.py b/accounts/search_criteria/invoices_overdue/__init__.py
deleted file mode 100644
index baffc48..0000000
--- a/accounts/search_criteria/invoices_overdue/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-from __future__ import unicode_literals
diff --git a/accounts/search_criteria/invoices_overdue/invoices_overdue.txt b/accounts/search_criteria/invoices_overdue/invoices_overdue.txt
deleted file mode 100644
index 514afac..0000000
--- a/accounts/search_criteria/invoices_overdue/invoices_overdue.txt
+++ /dev/null
@@ -1,27 +0,0 @@
-[
- {
- "owner": "Administrator",
- "docstatus": 0,
- "creation": "2012-04-03 12:49:51",
- "modified_by": "Administrator",
- "modified": "2012-04-03 12:49:51"
- },
- {
- "module": "Accounts",
- "standard": "Yes",
- "sort_order": "DESC",
- "filters": "{'Sales Invoice\u0001Saved':1,'Sales Invoice\u0001Submitted':1,'Sales Invoice\u0001Is Opening':'','Sales Invoice\u0001Fiscal Year':''}",
- "doc_type": "Sales Invoice",
- "name": "__common__",
- "add_cond": "`tabSales Invoice`.due_date<now()\n`tabSales Invoice`.outstanding_amount!=0\n`tabSales Invoice`.docstatus=1",
- "doctype": "Search Criteria",
- "sort_by": "`tabSales Invoice`.`name`",
- "page_len": 50,
- "criteria_name": "Invoices-Overdue",
- "columns": "Sales Invoice\u0001ID,Sales Invoice\u0001Debit To,Sales Invoice\u0001Voucher Date,Sales Invoice\u0001Due Date,Sales Invoice\u0001Outstanding Amount"
- },
- {
- "name": "invoices-overdue",
- "doctype": "Search Criteria"
- }
-]
\ No newline at end of file
diff --git a/accounts/search_criteria/itemwise_purchase_register/__init__.py b/accounts/search_criteria/itemwise_purchase_register/__init__.py
deleted file mode 100644
index baffc48..0000000
--- a/accounts/search_criteria/itemwise_purchase_register/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-from __future__ import unicode_literals
diff --git a/accounts/search_criteria/itemwise_purchase_register/itemwise_purchase_register.js b/accounts/search_criteria/itemwise_purchase_register/itemwise_purchase_register.js
deleted file mode 100644
index 7f47fc3..0000000
--- a/accounts/search_criteria/itemwise_purchase_register/itemwise_purchase_register.js
+++ /dev/null
@@ -1,43 +0,0 @@
-// ERPNext - web based ERP (http://erpnext.com)
-// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-report.customize_filters = function() {
- var me = this;
- var set_filter_property = function(dt, field, property, value) {
- if (me.filter_fields_dict[dt + FILTER_SEP + field])
- me.filter_fields_dict[dt + FILTER_SEP + field].df[property] = value;
- }
-
- this.hide_all_filters();
- filter_list = ['Credit To', 'Is Opening',
- 'From Posting Date', 'To Posting Date', "Company"]
-
- for(var i=0;i<filter_list.length;i++) {
- set_filter_property("Purchase Invoice", filter_list[i], "filter_hide", 0);
- }
- set_filter_property("Purchase Invoice Item", "Item", "filter_hide", 0);
-
- set_filter_property("Purchase Invoice", "From Posting Date", "in_first_page", 1);
- set_filter_property("Purchase Invoice", "To Posting Date", "in_first_page", 1);
- set_filter_property("Purchase Invoice Item", "Item", "in_first_page", 1);
-
- set_filter_property("Purchase Invoice", "From Posting Date",
- "report_default", sys_defaults.year_start_date);
- set_filter_property("Purchase Invoice", "To Posting Date",
- "report_default", dateutil.obj_to_str(new Date()));
- set_filter_property("Purchase Invoice", "Company",
- "report_default", sys_defaults.company);
-}
diff --git a/accounts/search_criteria/itemwise_purchase_register/itemwise_purchase_register.txt b/accounts/search_criteria/itemwise_purchase_register/itemwise_purchase_register.txt
deleted file mode 100644
index 93977f9..0000000
--- a/accounts/search_criteria/itemwise_purchase_register/itemwise_purchase_register.txt
+++ /dev/null
@@ -1,29 +0,0 @@
-[
- {
- "owner": "Administrator",
- "docstatus": 0,
- "creation": "2012-04-03 12:49:51",
- "modified_by": "Administrator",
- "modified": "2012-04-03 12:49:51"
- },
- {
- "description": "Itemwise Purchase Register",
- "parent_doc_type": "Purchase Invoice",
- "module": "Accounts",
- "standard": "Yes",
- "sort_order": "DESC",
- "filters": "{'Purchase Invoice\u0001Submitted':1,'Purchase Invoice\u0001Is Opening':'No','Purchase Invoice\u0001Company':'','Purchase Invoice\u0001Fiscal Year':''}",
- "dis_filters": "fiscal_year",
- "doc_type": "Purchase Invoice Item",
- "name": "__common__",
- "doctype": "Search Criteria",
- "sort_by": "`tabPurchase Invoice`.`name`",
- "page_len": 50,
- "criteria_name": "Itemwise Purchase Register",
- "columns": "Purchase Invoice\u0001ID,Purchase Invoice\u0001Credit To,Purchase Invoice\u0001Company,Purchase Invoice Item\u0001Item,Purchase Invoice Item\u0001Item Name,Purchase Invoice Item\u0001Expense Head,Purchase Invoice Item\u0001Cost Center,Purchase Invoice Item\u0001Qty,Purchase Invoice Item\u0001Rate (Default Curr.),Purchase Invoice Item\u0001Amount (Default Curr.)"
- },
- {
- "name": "itemwise_purchase_register",
- "doctype": "Search Criteria"
- }
-]
\ No newline at end of file
diff --git a/accounts/search_criteria/itemwise_sales_register/__init__.py b/accounts/search_criteria/itemwise_sales_register/__init__.py
deleted file mode 100644
index baffc48..0000000
--- a/accounts/search_criteria/itemwise_sales_register/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-from __future__ import unicode_literals
diff --git a/accounts/search_criteria/itemwise_sales_register/itemwise_sales_register.js b/accounts/search_criteria/itemwise_sales_register/itemwise_sales_register.js
deleted file mode 100755
index b52b472..0000000
--- a/accounts/search_criteria/itemwise_sales_register/itemwise_sales_register.js
+++ /dev/null
@@ -1,43 +0,0 @@
-// ERPNext - web based ERP (http://erpnext.com)
-// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-report.customize_filters = function() {
- var me = this;
- var set_filter_property = function(dt, field, property, value) {
- if (me.filter_fields_dict[dt + FILTER_SEP + field])
- me.filter_fields_dict[dt + FILTER_SEP + field].df[property] = value;
- }
-
- this.hide_all_filters();
- filter_list_main = ['Debit To', 'From Posting Date', 'To Posting Date', "Company"]
- for(var i=0;i<filter_list_main.length;i++) {
- set_filter_property("Sales Invoice", filter_list_main[i], "filter_hide", 0);
- }
- filter_list_item = ["Item", "Item Group", "Brand Name", "Cost Center"]
- for(var i=0;i<filter_list_item.length;i++) {
- set_filter_property("Sales Invoice Item", filter_list_item[i], "filter_hide", 0);
- }
- set_filter_property("Sales Invoice", "From Posting Date", "in_first_page", 1);
- set_filter_property("Sales Invoice", "To Posting Date", "in_first_page", 1);
- set_filter_property("Sales Invoice Item", "Item", "in_first_page", 1);
-
- set_filter_property("Sales Invoice", "From Posting Date",
- "report_default", sys_defaults.year_start_date);
- set_filter_property("Sales Invoice", "To Posting Date",
- "report_default", dateutil.obj_to_str(new Date()));
- set_filter_property("Sales Invoice", "Company",
- "report_default", sys_defaults.company);
-}
diff --git a/accounts/search_criteria/itemwise_sales_register/itemwise_sales_register.txt b/accounts/search_criteria/itemwise_sales_register/itemwise_sales_register.txt
deleted file mode 100644
index 9819845..0000000
--- a/accounts/search_criteria/itemwise_sales_register/itemwise_sales_register.txt
+++ /dev/null
@@ -1,27 +0,0 @@
-[
- {
- "owner": "Administrator",
- "docstatus": 0,
- "creation": "2012-04-03 12:49:51",
- "modified_by": "Administrator",
- "modified": "2012-04-03 12:49:51"
- },
- {
- "parent_doc_type": "Sales Invoice",
- "module": "Accounts",
- "standard": "Yes",
- "sort_order": "DESC",
- "filters": "{'Sales Invoice\u0001Submitted':1,'Sales Invoice\u0001From Posting Date\u0001lower':'','Sales Invoice\u0001To Posting Date\u0001upper':'','Sales Invoice\u0001Is Opening':'','Sales Invoice\u0001Company':'','Sales Invoice\u0001Fiscal Year':''}",
- "doc_type": "Sales Invoice Item",
- "name": "__common__",
- "doctype": "Search Criteria",
- "sort_by": "`tabSales Invoice Item`.`income_account`",
- "page_len": 50,
- "criteria_name": "Itemwise Sales Register",
- "columns": "Sales Invoice Item\u0001Item,Sales Invoice Item\u0001Item Name,Sales Invoice Item\u0001Item Group,Sales Invoice\u0001ID,Sales Invoice\u0001Voucher Date,Sales Invoice\u0001Posting Date,Sales Invoice\u0001Debit To,Sales Invoice Item\u0001Cost Center,Sales Invoice\u0001Territory,Sales Invoice Item\u0001Income Account,Sales Invoice Item\u0001Qty,Sales Invoice Item\u0001Basic Rate*,Sales Invoice Item\u0001Amount*"
- },
- {
- "name": "itemwise_sales_register",
- "doctype": "Search Criteria"
- }
-]
\ No newline at end of file
diff --git a/accounts/search_criteria/monthly_transaction_summary/__init__.py b/accounts/search_criteria/monthly_transaction_summary/__init__.py
deleted file mode 100644
index baffc48..0000000
--- a/accounts/search_criteria/monthly_transaction_summary/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-from __future__ import unicode_literals
diff --git a/accounts/search_criteria/monthly_transaction_summary/monthly_transaction_summary.js b/accounts/search_criteria/monthly_transaction_summary/monthly_transaction_summary.js
deleted file mode 100644
index bc33d33..0000000
--- a/accounts/search_criteria/monthly_transaction_summary/monthly_transaction_summary.js
+++ /dev/null
@@ -1,29 +0,0 @@
-// ERPNext - web based ERP (http://erpnext.com)
-// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-
-
-report.customize_filters = function() {
- this.mytabs.items['Select Columns'].hide()
- this.hide_all_filters();
- this.add_filter({fieldname:'fiscal_year', label:'Fiscal Year', fieldtype:'Link', options:'Fiscal Year', report_default:sys_defaults.fiscal_year, ignore : 1, parent:'DocType'});
- this.add_filter({fieldname:'company', label:'Company', fieldtype:'Link', options:'Company', report_default:sys_defaults.company, ignore : 1, parent:'DocType'});
- this.add_filter({fieldname:'period', label:'Period', fieldtype:'Select', options:'Monthly'+NEWLINE+'Quarterly'+NEWLINE+'Half Yearly'+NEWLINE+'Annual',ignore : 1, parent:'DocType'});
-}
-
-report.aftertableprint = function(t) {
- $yt(t,'*',1,{NEWLINE:'<br>'});
-}
\ No newline at end of file
diff --git a/accounts/search_criteria/monthly_transaction_summary/monthly_transaction_summary.py b/accounts/search_criteria/monthly_transaction_summary/monthly_transaction_summary.py
deleted file mode 100644
index 7660fe9..0000000
--- a/accounts/search_criteria/monthly_transaction_summary/monthly_transaction_summary.py
+++ /dev/null
@@ -1,168 +0,0 @@
-# ERPNext - web based ERP (http://erpnext.com)
-# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-from __future__ import unicode_literals
-if filter_values.get('period'):
- period_values = filter_values.get('period').split(NEWLINE)
-
-if not filter_values.get('fiscal_year'):
- msgprint("Please Select Fiscal Year")
- raise Exception
-elif not filter_values.get('period'):
- msgprint("Please Select Period")
- raise Exception
-elif len(period_values) > 2:
- msgprint("You can view report only for one period. Please select only one value in period.")
- raise Exception
-else:
- fiscal_year = filter_values.get('fiscal_year')
- period = filter_values.get('period')
- company = filter_values.get('company')
-
-# get fiscal year start date and start month
-# ---------------------------------------------------------
-year_start_date = sql("select year_start_date,MONTH(year_start_date) from `tabFiscal Year` where name = %s",fiscal_year)
-start_date = year_start_date and year_start_date[0][0] or ''
-start_month = year_start_date and year_start_date[0][1] or ''
-month_name = ['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec']
-
-# Add columns based on period
-# --------------------------------
-columns = []
-columns.append(['ID','Data','150px',''])
-columns.append(['Description','Data','150px',''])
-# ================ Annual ======================
-if period == 'Annual':
- columns.append([fiscal_year,'Currency','150px',''])
-
-# =========== Half Yearly ======================
-elif period == 'Half Yearly':
- columns.append([month_name[start_month-1]+' to '+month_name[start_month+4],'Currency','150px','']) # first half
- if start_month == 1: # this is case when fiscal year starts with JAN
- columns.append([month_name[start_month+5]+' to '+month_name[start_month+11],'Currency','150px',''])
- else: #this is case when fiscal year starts with other than JAN
- columns.append([month_name[start_month+5]+' to '+month_name[start_month-2],'Currency','150px',''])
- columns.append(['Total','Currency','150px',''])
-
-# ================ Quarterly ===================
-elif period == 'Quarterly':
- length_1 = (len(month_name) - start_month + 1) / 3 #this gives the total no. of times we need to iterate for quarter
- val = length_1 % 4
- q_no = 1
- for i in range(length_1):
- value = 3*i + val
- columns.append(['Q'+cstr(q_no)+' ('+month_name[value]+' to '+month_name[value+2]+')','Currency','150px',''])
- q_no += 1
- length_2 = (start_month - 1) / 3 #this gives the total no. of times we need to iterate for quarter (this is required only if fiscal year starts from april)
- for i in range(length_2):
- columns.append(['Q'+cstr(q_no)+' ('+month_name[3*i]+' to '+month_name[3*i+2]+')','Currency','150px',''])
- q_no += 1;
- columns.append(['Total','Currency','150px',''])
-
-# =============== Monthly ======================
-elif period == 'Monthly':
- for i in range(start_month-1,len(month_name)):
- columns.append([month_name[i],'Currency','150px',''])
- for i in range(start_month-1):
- columns.append([month_name[i],'Currency','150px',''])
- columns.append(['Total','Currency','150px',''])
-
-for c in columns:
- colnames.append(c[0])
- coltypes.append(c[1])
- colwidths.append(c[2])
- coloptions.append(c[3])
- col_idx[c[0]] = len(colnames)-1
-
-out = []
-if company:
- condition = 'docstatus = 1 and fiscal_year = "'+fiscal_year+'" and company = "'+company+'"'
-else:
- condition = 'docstatus = 1 and fiscal_year = "'+fiscal_year+'"'
-
-for r in res:
- det = ''
- list_range = 0
- query = ''
- # ================= Annual Report ===============
- if period == 'Annual':
- # Main Query
- det = sql("SELECT count(*), SUM(net_total), MIN(net_total), MAX(net_total), AVG(net_total) from `tab%s` where %s" %(r[col_idx['ID']],condition))
- list_range = 1
-
- # ============ Half Yearly Report ===============
- elif period == 'Half Yearly':
- # first half
- query += 'COUNT(CASE WHEN MONTH(transaction_date) BETWEEN '+cstr(start_month)+' AND '+cstr(start_month+5)+' THEN name ELSE NULL END),SUM(CASE WHEN MONTH(transaction_date) BETWEEN '+cstr(start_month)+' AND '+cstr(start_month+5)+' THEN net_total ELSE NULL END),MIN(CASE WHEN MONTH(transaction_date) BETWEEN '+cstr(start_month)+' AND '+cstr(start_month+5)+' THEN net_total ELSE NULL END),MAX(CASE WHEN MONTH(transaction_date) BETWEEN '+cstr(start_month)+' AND '+cstr(start_month+5)+' THEN net_total ELSE NULL END),AVG(CASE WHEN MONTH(transaction_date) BETWEEN '+cstr(start_month)+' AND '+cstr(start_month+5)+' THEN net_total ELSE NULL END),'
- # second half
- query += 'COUNT(CASE WHEN MONTH(transaction_date) NOT BETWEEN '+cstr(start_month)+' AND '+cstr(start_month+5)+' THEN name ELSE NULL END),SUM(CASE WHEN MONTH(transaction_date) NOT BETWEEN '+cstr(start_month)+' AND '+cstr(start_month+5)+' THEN net_total ELSE NULL END),MIN(CASE WHEN MONTH(transaction_date) NOT BETWEEN '+cstr(start_month)+' AND '+cstr(start_month+5)+' THEN net_total ELSE NULL END),MAX(CASE WHEN MONTH(transaction_date) NOT BETWEEN '+cstr(start_month)+' AND '+cstr(start_month+5)+' THEN net_total ELSE NULL END),AVG(CASE WHEN MONTH(transaction_date) NOT BETWEEN '+cstr(start_month)+' AND '+cstr(start_month+5)+' THEN net_total ELSE NULL END),'
-
- # Main Query
- det = sql("SELECT %s count(*), SUM(net_total), MIN(net_total), MAX(net_total), AVG(net_total) from `tab%s` where %s and transaction_date > CAST('%s' AS DATE)" %(query,r[col_idx['ID']],condition,start_date))
- list_range = 3
-
- # =============== Quarterly Report ==============
- elif period == 'Quarterly':
- length_1 = (len(month_name) - start_month + 1) / 3; #this gives the total no. of times we need to iterate for quarter
- val = length_1 % 4;
- for i in range(length_1):
- value = 3*i + val;
- query += 'COUNT(CASE WHEN MONTH(transaction_date) BETWEEN '+cstr(value+1)+' AND '+cstr(value+3)+' THEN name ELSE NULL END),SUM(CASE WHEN MONTH(transaction_date) BETWEEN '+cstr(value+1)+' AND '+cstr(value+3)+' THEN net_total ELSE NULL END),MIN(CASE WHEN MONTH(transaction_date) BETWEEN '+cstr(value+1)+' AND '+cstr(value+3)+' THEN net_total ELSE NULL END),MAX(CASE WHEN MONTH(transaction_date) BETWEEN '+cstr(value+1)+' AND '+cstr(value+3)+' THEN net_total ELSE NULL END),AVG(CASE WHEN MONTH(transaction_date) BETWEEN '+cstr(value+1)+' AND '+cstr(value+3)+' THEN net_total ELSE NULL END),'
- length_2 = (start_month - 1) / 3; #this gives the total no. of times we need to iterate for quarter (this is required only if fiscal year starts from april)
- for i in range(length_2):
- query += 'COUNT(CASE WHEN MONTH(transaction_date) BETWEEN '+cstr(3*i+1)+' AND '+cstr(3*i+3)+' THEN name ELSE NULL END),SUM(CASE WHEN MONTH(transaction_date) BETWEEN '+cstr(3*i+1)+' AND '+cstr(3*i+3)+' THEN net_total ELSE NULL END),MIN(CASE WHEN MONTH(transaction_date) BETWEEN '+cstr(3*i+1)+' AND '+cstr(3*i+3)+' THEN net_total ELSE NULL END),MAX(CASE WHEN MONTH(transaction_date) BETWEEN '+cstr(3*i+1)+' AND '+cstr(3*i+3)+' THEN net_total ELSE NULL END),AVG(CASE WHEN MONTH(transaction_date) BETWEEN '+cstr(3*i+1)+' AND '+cstr(3*i+3)+' THEN net_total ELSE NULL END),';
- # Main Query
- det = sql("SELECT %s count(*), SUM(net_total), MIN(net_total), MAX(net_total), AVG(net_total) from `tab%s` where %s and transaction_date > CAST('%s' AS DATE)" %(query,r[col_idx['ID']],condition,start_date))
- list_range = 5
-
- # ================ Monthly Report ===============
- elif period == 'Monthly':
- # for loop is required twice coz fiscal year starts from April (this will also work if fiscal year starts in January)
- for i in range(start_month-1,len(month_name)):
- query += 'COUNT(CASE WHEN MONTH(transaction_date) = '+cstr(i+1)+' THEN name ELSE NULL END), SUM(CASE WHEN MONTH(transaction_date) = '+cstr(i+1)+' THEN net_total ELSE NULL END),MIN(CASE WHEN MONTH(transaction_date) = '+cstr(i+1)+' THEN net_total ELSE NULL END), MAX(CASE WHEN MONTH(transaction_date) = '+cstr(i+1)+' THEN net_total ELSE NULL END), AVG(CASE WHEN MONTH(transaction_date) = '+cstr(i+1)+' THEN net_total ELSE NULL END),'
- # the above query calculates total_no, total_amt, min_amt, max_amt, avg_amt of doctypes in monthwise
- for i in range(start_month-1):
- query += 'COUNT(CASE WHEN MONTH(transaction_date) = '+cstr(i+1)+' THEN name ELSE NULL END), SUM(CASE WHEN MONTH(transaction_date) = '+cstr(i+1)+' THEN net_total ELSE NULL END),MIN(CASE WHEN MONTH(transaction_date) = '+cstr(i+1)+' THEN net_total ELSE NULL END), MAX(CASE WHEN MONTH(transaction_date) = '+cstr(i+1)+' THEN net_total ELSE NULL END), AVG(CASE WHEN MONTH(transaction_date) = '+cstr(i+1)+' THEN net_total ELSE NULL END),'
-
- # Main Query
- det = sql("SELECT %s count(*), SUM(net_total), MIN(net_total), MAX(net_total), AVG(net_total) from `tab%s` where %s and transaction_date > CAST('%s' AS DATE)" %(query,r[col_idx['ID']],condition,start_date))
- list_range = 13
-
- # bifurcate all values and append them in list
- total_no,total_amt,min_amt,max_amt,avg_amt = [],[],[],[],[]
-
- count = 0
- # append values to list
- for i in range(list_range):
- total_no.append(cstr(det and det[0][count] or 0))
- total_amt.append(cstr(det and det[0][count+1] or 0))
- min_amt.append(cstr(det and det[0][count+2] or 0))
- max_amt.append(cstr(det and det[0][count+3] or 0))
- avg_amt.append(cstr(det and det[0][count+4] or 0))
- count += 5
-
- for col in range(len(colnames)-1): # this would make all first row blank. just for look
- r.append('')
- out.append(r)
-
- d = [['Total No',total_no],['Total Amount',total_amt],['Min Amount',min_amt],['Max Amount',max_amt],['Avg Amount',avg_amt]]
-
- for des in range(5):
- t_row = ['' for i in range(len(colnames))]
- t_row[col_idx['Description']] = d[des][0]
- for v in range(list_range):
- t_row[col_idx[colnames[v+2]]] = flt(d[des][1][v])
- out.append(t_row)
\ No newline at end of file
diff --git a/accounts/search_criteria/monthly_transaction_summary/monthly_transaction_summary.sql b/accounts/search_criteria/monthly_transaction_summary/monthly_transaction_summary.sql
deleted file mode 100644
index b05de58..0000000
--- a/accounts/search_criteria/monthly_transaction_summary/monthly_transaction_summary.sql
+++ /dev/null
@@ -1 +0,0 @@
-SELECT DISTINCT name FROM tabDocType WHERE document_type="Transaction" AND ifnull(istable,0) = 0
\ No newline at end of file
diff --git a/accounts/search_criteria/monthly_transaction_summary/monthly_transaction_summary.txt b/accounts/search_criteria/monthly_transaction_summary/monthly_transaction_summary.txt
deleted file mode 100644
index 1c6c60b..0000000
--- a/accounts/search_criteria/monthly_transaction_summary/monthly_transaction_summary.txt
+++ /dev/null
@@ -1,25 +0,0 @@
-[
- {
- "owner": "Administrator",
- "docstatus": 0,
- "creation": "2012-04-03 12:49:51",
- "modified_by": "Administrator",
- "modified": "2012-04-03 12:49:51"
- },
- {
- "module": "Accounts",
- "standard": "Yes",
- "sort_order": "DESC",
- "filters": "{'DocType\u0001Period':'Monthly'}",
- "doctype": "Search Criteria",
- "doc_type": "Profile",
- "name": "__common__",
- "sort_by": "`tabProfile`.`name`",
- "criteria_name": "Monthly Transaction Summary",
- "columns": "Profile\u0001ID"
- },
- {
- "name": "monthly_transaction_summary",
- "doctype": "Search Criteria"
- }
-]
\ No newline at end of file
diff --git a/accounts/search_criteria/payment_receipt_report/__init__.py b/accounts/search_criteria/payment_receipt_report/__init__.py
deleted file mode 100644
index baffc48..0000000
--- a/accounts/search_criteria/payment_receipt_report/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-from __future__ import unicode_literals
diff --git a/accounts/search_criteria/payment_receipt_report/payment_receipt_report.py b/accounts/search_criteria/payment_receipt_report/payment_receipt_report.py
deleted file mode 100644
index 84cbbec..0000000
--- a/accounts/search_criteria/payment_receipt_report/payment_receipt_report.py
+++ /dev/null
@@ -1,41 +0,0 @@
-# ERPNext - web based ERP (http://erpnext.com)
-# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-from __future__ import unicode_literals
-if not filter_values.get('posting_date'):
- msgprint("Enter From Posting Date.")
- raise Exception
-
-if not filter_values.get('posting_date1'):
- msgprint("Enter To Posting Date.")
- raise Exception
-
-if not filter_values.get('company'):
- msgprint("Select Company to proceed.")
- raise Exception
-
-
-
-col_list = [['Account', 'Link', '150px', 'Account']
- ,['Total', 'Currency', '150px', '']
- ]
-
-for c in col_list:
- colnames.append(c[0])
- coltypes.append(c[1])
- colwidths.append(c[2])
- coloptions.append(c[3])
- col_idx[c[0]] = len(colnames) - 1
diff --git a/accounts/search_criteria/payment_receipt_report/payment_receipt_report.sql b/accounts/search_criteria/payment_receipt_report/payment_receipt_report.sql
deleted file mode 100644
index a4132b7..0000000
--- a/accounts/search_criteria/payment_receipt_report/payment_receipt_report.sql
+++ /dev/null
@@ -1 +0,0 @@
-select t1.account, sum(if(t2.debit_or_credit = 'Debit', ifnull(t1.debit,0) - ifnull(t1.credit,0), ifnull(t1.credit,0) - ifnull(t1.debit,0))) from `tabGL Entry` t1, `tabAccount` t2 where t1.account = t2.name and t2.account_type != 'Bank or Cash' and t1.name in (select t1.name from `tabGL Entry` t1, `tabAccount` t2 where t1.against = t2.name and t2.account_type = 'Bank or Cash' and posting_date >= '%(posting_date)s' and posting_date <= '%(posting_date1)s') group by t1.account
\ No newline at end of file
diff --git a/accounts/search_criteria/payment_receipt_report/payment_receipt_report.txt b/accounts/search_criteria/payment_receipt_report/payment_receipt_report.txt
deleted file mode 100644
index 2e039e2..0000000
--- a/accounts/search_criteria/payment_receipt_report/payment_receipt_report.txt
+++ /dev/null
@@ -1,26 +0,0 @@
-[
- {
- "owner": "jai@webnotestech.com",
- "docstatus": 0,
- "creation": "2012-04-03 12:49:51",
- "modified_by": "Administrator",
- "modified": "2012-04-03 12:49:51"
- },
- {
- "module": "Accounts",
- "standard": "Yes",
- "sort_order": "DESC",
- "filters": "{'GL Entry\u0001Voucher Type':'','GL Entry\u0001Is Cancelled':'','GL Entry\u0001Is Opening':'','GL Entry\u0001Fiscal Year':''}",
- "doctype": "Search Criteria",
- "doc_type": "GL Entry",
- "name": "__common__",
- "sort_by": "`tabGL Entry`.`name`",
- "page_len": 50,
- "criteria_name": "Payment Receipt Report",
- "columns": "GL Entry\u0001ID,GL Entry\u0001Owner,GL Entry\u0001Posting Date,GL Entry\u0001Account,GL Entry\u0001Cost Center,GL Entry\u0001Against Voucher,GL Entry\u0001Voucher Type,GL Entry\u0001Voucher No,GL Entry\u0001Remarks,GL Entry\u0001Is Cancelled,GL Entry\u0001Is Opening,GL Entry\u0001Fiscal Year,GL Entry\u0001Company"
- },
- {
- "name": "payment_receipt_report",
- "doctype": "Search Criteria"
- }
-]
\ No newline at end of file
diff --git a/accounts/search_criteria/purchase_register/__init__.py b/accounts/search_criteria/purchase_register/__init__.py
deleted file mode 100644
index baffc48..0000000
--- a/accounts/search_criteria/purchase_register/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-from __future__ import unicode_literals
diff --git a/accounts/search_criteria/purchase_register/purchase_register.py b/accounts/search_criteria/purchase_register/purchase_register.py
deleted file mode 100644
index 82ab047..0000000
--- a/accounts/search_criteria/purchase_register/purchase_register.py
+++ /dev/null
@@ -1,97 +0,0 @@
-# ERPNext - web based ERP (http://erpnext.com)
-# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-# add expense head columns
-from __future__ import unicode_literals
-from webnotes.utils import flt
-
-expense_acc = [c[0] for c in sql("""select distinct expense_head
- from `tabPurchase Invoice Item`
- where parenttype='Purchase Invoice'
- and docstatus=1
- order by expense_head asc""")]
-
-expense_acc.append('Net Total')
-
-for i in expense_acc:
- colnames.append(i)
- coltypes.append('Currency')
- colwidths.append('100px')
- coloptions.append('')
-
-# Add tax head columns
-tax_acc = [c[0] for c in sql("""select distinct account_head
- from `tabPurchase Taxes and Charges`
- where parenttype = 'Purchase Invoice'
- and add_deduct_tax = 'Add'
- and category in ('Total', 'Valuation and Total')
- and docstatus=1
- order by account_head asc""")]
-
-tax_acc.append('Total Tax')
-tax_acc.append('Grand Total')
-
-for c in tax_acc:
- if c:
- colnames.append(c)
- coltypes.append('Currency')
- colwidths.append('100px')
- coloptions.append('')
-
-# remove total columns from the list
-expense_acc = expense_acc[:-1]
-tax_acc = tax_acc[:-2]
-
-# add the values
-for r in res:
- #Get amounts for expense heads
- exp_head_amount = sql("""select expense_head, sum(amount)
- from `tabPurchase Invoice Item`
- where parent = %s and parenttype='Purchase Invoice'
- group by expense_head""", (r[col_idx['ID']]))
-
- #convert the result to dictionary for easy retrieval
- exp_head_amount_dict = {}
- for e in exp_head_amount:
- exp_head_amount_dict[e[0]] = e[1]
-
- net_total = 0
- # get expense amount
- for i in expense_acc:
- val = exp_head_amount_dict.get(i, 0)
- net_total += val
- r.append(val)
- r.append(net_total)
-
- #Get tax for account heads
- acc_head_tax = sql("""select account_head,
- sum(if(add_deduct_tax='Add', tax_amount, -tax_amount))
- from `tabPurchase Taxes and Charges` where parent = %s and parenttype = 'Purchase Invoice'
- and category in ('Total', 'Valuation and Total') group by account_head""", r[col_idx['ID']])
-
- #Convert the result to dictionary for easy retrieval
- acc_head_tax_dict = {}
- for a in acc_head_tax:
- acc_head_tax_dict[a[0]] = flt(a[1])
-
- # get tax amount
- total_tax = 0
- for c in tax_acc:
- val = acc_head_tax_dict.get(c, 0)
- total_tax += val
- r.append(val)
- r.append(total_tax)
- r.append(flt(total_tax)+ flt(net_total)) # grand total
\ No newline at end of file
diff --git a/accounts/search_criteria/purchase_register/purchase_register.txt b/accounts/search_criteria/purchase_register/purchase_register.txt
deleted file mode 100644
index f4fdb36..0000000
--- a/accounts/search_criteria/purchase_register/purchase_register.txt
+++ /dev/null
@@ -1,24 +0,0 @@
-[
- {
- "owner": "Administrator",
- "docstatus": 0,
- "creation": "2012-04-03 12:49:52",
- "modified_by": "Administrator",
- "modified": "2012-04-03 12:49:52"
- },
- {
- "doc_type": "Purchase Invoice",
- "name": "__common__",
- "add_cond": "`tabPurchase Invoice`.is_opening != 'Yes'\n`tabPurchase Invoice`.name not like 'OP/%'",
- "module": "Accounts",
- "standard": "Yes",
- "filters": "{'Purchase Invoice\u0001Submitted':1}",
- "doctype": "Search Criteria",
- "criteria_name": "Purchase Register",
- "columns": "Purchase Invoice\u0001ID,Purchase Invoice\u0001Voucher Date,Purchase Invoice\u0001Posting Date,Purchase Invoice\u0001Credit To,Purchase Invoice\u0001Expense Head"
- },
- {
- "name": "purchase_register",
- "doctype": "Search Criteria"
- }
-]
\ No newline at end of file
diff --git a/accounts/search_criteria/sales_register/__init__.py b/accounts/search_criteria/sales_register/__init__.py
deleted file mode 100644
index baffc48..0000000
--- a/accounts/search_criteria/sales_register/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-from __future__ import unicode_literals
diff --git a/accounts/search_criteria/sales_register/sales_register.js b/accounts/search_criteria/sales_register/sales_register.js
deleted file mode 100644
index 872e198..0000000
--- a/accounts/search_criteria/sales_register/sales_register.js
+++ /dev/null
@@ -1,32 +0,0 @@
-// ERPNext - web based ERP (http://erpnext.com)
-// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-report.customize_filters = function() {
-
- this.filter_fields_dict['Sales Invoice'+FILTER_SEP +'From Posting Date'].df['report_default'] = sys_defaults.year_start_date;
- this.filter_fields_dict['Sales Invoice'+FILTER_SEP +'To Posting Date'].df['report_default'] = dateutil.obj_to_str(new Date());
- this.filter_fields_dict['Sales Invoice'+FILTER_SEP +'Company'].df['report_default'] = sys_defaults.company;
- this.filter_fields_dict['Sales Invoice'+FILTER_SEP +'ID'].df.filter_hide = 1;
- this.filter_fields_dict['Sales Invoice'+FILTER_SEP +'Owner'].df.filter_hide = 1;
- this.filter_fields_dict['Sales Invoice'+FILTER_SEP +'Saved'].df.filter_hide = 1;
- this.filter_fields_dict['Sales Invoice'+FILTER_SEP +'Submitted'].df.filter_hide = 1;
- this.filter_fields_dict['Sales Invoice'+FILTER_SEP +'Cancelled'].df.filter_hide = 1;
- this.filter_fields_dict['Sales Invoice'+FILTER_SEP +'Grand Total >='].df.filter_hide = 1;
- this.filter_fields_dict['Sales Invoice'+FILTER_SEP +'Grand Total <='].df.filter_hide = 1;
- this.filter_fields_dict['Sales Invoice'+FILTER_SEP +'Fiscal Year'].df.filter_hide = 1;
- this.filter_fields_dict['Sales Invoice'+FILTER_SEP +'Sales Partner'].df.filter_hide = 1;
- this.filter_fields_dict['Sales Invoice'+FILTER_SEP +'Is Opening Entry'].df.filter_hide = 1;
-}
diff --git a/accounts/search_criteria/sales_register/sales_register.py b/accounts/search_criteria/sales_register/sales_register.py
deleted file mode 100644
index f9cbc5d..0000000
--- a/accounts/search_criteria/sales_register/sales_register.py
+++ /dev/null
@@ -1,93 +0,0 @@
-# ERPNext - web based ERP (http://erpnext.com)
-# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-# add additional columns
-from __future__ import unicode_literals
-from webnotes.utils import flt
-
-cl = [c[0] for c in sql("""select distinct account_head
- from `tabSales Taxes and Charges`
- where parenttype='Sales Invoice'
- and docstatus=1
- order by account_head asc""")]
-
-income_acc = [c[0] for c in sql("""select distinct income_account
- from `tabSales Invoice Item`
- where parenttype='Sales Invoice'
- and docstatus=1
- order by income_account asc""")]
-
-income_acc.append('Net Total')
-
-for i in income_acc:
- colnames.append(i)
- coltypes.append('Currency')
- colwidths.append('100px')
- coloptions.append('')
-
-cl.append('Total Tax')
-cl.append('Grand Total')
-for c in cl:
- colnames.append(c)
- coltypes.append('Currency')
- colwidths.append('100px')
- coloptions.append('')
-
-income_acc = income_acc[:-1]
-cl = cl[:-2]
-
-
-# add the values
-for r in res:
-
- #Get amounts for income account
- income_acc_list = sql("""select income_account, sum(amount)
- from `tabSales Invoice Item`
- where parent = %s
- and parenttype='Sales Invoice'
- group by income_account""", (r[col_idx['ID']],))
-
- #convert the result to dictionary for easy retrieval
- income_acc_dict = {}
- for ia in income_acc_list:
- income_acc_dict[ia[0]] = flt(ia[1])
-
- net_total = 0
- for i in income_acc:
- val = income_acc_dict.get(i, 0)
- net_total += val
- r.append(val)
- r.append(net_total)
-
- #Get tax for account heads
- acc_head_tax = sql("""select account_head, sum(tax_amount)
- from `tabSales Taxes and Charges`
- where parent = '%s'
- and parenttype = 'Sales Invoice'
- group by account_head""" %(r[col_idx['ID']],))
-
- #Convert the result to dictionary for easy retrieval
- acc_head_tax_dict = {}
- for a in acc_head_tax:
- acc_head_tax_dict[a[0]] = flt(a[1])
-
- total_tax = 0
- for c in cl:
- val = acc_head_tax_dict.get(c, 0)
- total_tax += val
- r.append(val)
- r.append(total_tax)
- r.append(net_total+total_tax)
\ No newline at end of file
diff --git a/accounts/search_criteria/sales_register/sales_register.txt b/accounts/search_criteria/sales_register/sales_register.txt
deleted file mode 100644
index b7b63f0..0000000
--- a/accounts/search_criteria/sales_register/sales_register.txt
+++ /dev/null
@@ -1,30 +0,0 @@
-[
- {
- "owner": "Administrator",
- "docstatus": 0,
- "creation": "2012-04-11 17:36:48",
- "modified_by": "Administrator",
- "modified": "2012-04-18 17:41:46"
- },
- {
- "add_col": "`tabAccount`.`parent_account` AS 'Parent Account'\n`tabCustomer`.`territory` AS 'Territory'\n`tabCustomer`.`customer_details` AS 'Customer Details'",
- "module": "Accounts",
- "standard": "Yes",
- "sort_order": "DESC",
- "add_tab": "`tabAccount`\n`tabCustomer`",
- "dis_filters": "fiscal_year",
- "doc_type": "Sales Invoice",
- "name": "__common__",
- "filters": "{'Sales Invoice\u0001Submitted':1,'Sales Invoice\u0001Is Opening':''}",
- "add_cond": "ifnull(`tabSales Invoice`.`is_opening`, 'No') = 'No'\n`tabAccount`.name =`tabSales Invoice`.debit_to\n`tabCustomer`.`name` = `tabAccount`.`master_name`",
- "doctype": "Search Criteria",
- "sort_by": "`Parent Account`",
- "page_len": 50,
- "criteria_name": "Sales Register",
- "columns": "Sales Invoice\u0001ID,Sales Invoice\u0001Posting Date,Sales Invoice\u0001Debit To"
- },
- {
- "name": "sales_register",
- "doctype": "Search Criteria"
- }
-]
\ No newline at end of file
diff --git a/accounts/search_criteria/trend_analyzer/__init__.py b/accounts/search_criteria/trend_analyzer/__init__.py
deleted file mode 100644
index baffc48..0000000
--- a/accounts/search_criteria/trend_analyzer/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-from __future__ import unicode_literals
diff --git a/accounts/search_criteria/trend_analyzer/trend_analyzer.js b/accounts/search_criteria/trend_analyzer/trend_analyzer.js
deleted file mode 100644
index 59d9483..0000000
--- a/accounts/search_criteria/trend_analyzer/trend_analyzer.js
+++ /dev/null
@@ -1,153 +0,0 @@
-// ERPNext - web based ERP (http://erpnext.com)
-// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-report.customize_filters = function() {
- this.hide_all_filters();
- this.dt.set_no_limit(1);
-
- // hide transaction based on permissions
- var all_transactions = ["Quotation", "Sales Order", "Delivery Note", "Sales Invoice",
- "Purchase Order", "Purchase Receipt", "Purchase Invoice"];
- var transaction_list = [];
- $.each(all_transactions, function(i, dt) {
- if(wn.boot.profile.can_read.indexOf(dt)!=-1) {
- transaction_list.push(dt);
- }
- });
-
- this.add_filter({fieldname:'transaction', label:'Transaction', fieldtype:'Select', options:transaction_list.join(NEWLINE),report_default:'Delivery Note',ignore : 1,parent:'Profile',in_first_page : 1,single_select : 1});
-
- this.add_filter({fieldname:'period', label:'Period', fieldtype:'Select', options:'Monthly'+NEWLINE+'Quarterly'+NEWLINE+'Half Yearly'+NEWLINE+'Annual',report_default:'Quarterly',ignore : 1, parent:'Profile',in_first_page:1,single_select:1});
-
- this.add_filter({fieldname:'based_on', label:'Based On', fieldtype:'Select', options:'Item'+NEWLINE+'Item Group'+NEWLINE+'Customer'+NEWLINE+'Customer Group'+NEWLINE+'Territory'+NEWLINE+'Supplier'+NEWLINE+'Supplier Type'+NEWLINE+'Project', ignore : 1, parent:'Profile', report_default:'Item', in_first_page : 1,single_select:1});
-
- this.add_filter({fieldname:'group_by', label:'Group By', fieldtype:'Select', options:NEWLINE+'Item'+NEWLINE+'Customer'+NEWLINE+'Supplier', ignore : 1, parent:'Profile',single_select:1});
-
- this.add_filter({fieldname:'order_type', label:'Order Type', fieldtype:'Select', options:NEWLINE+'Sales'+NEWLINE+'Maintenance',ignore : 1, parent:'Profile',single_select:1});
-
- this.add_filter({fieldname:'company', label:'Company', fieldtype:'Link', options:'Company', report_default:sys_defaults.company, ignore : 1, parent:'Profile'});
-
- this.add_filter({fieldname:'fiscal_year', label:'Fiscal Year', fieldtype:'Link', options:'Fiscal Year', report_default:sys_defaults.fiscal_year, ignore : 1, parent:'Profile', in_first_page:1});
-
-
- // Add Filters
- this.add_filter({fieldname:'item', label:'Item', fieldtype:'Link', options:'Item', ignore : 1, parent:'Profile'});
- this.add_filter({fieldname:'item_group', label:'Item Group', fieldtype:'Link', options:'Item Group', ignore : 1, parent:'Profile'});
- this.add_filter({fieldname:'customer', label:'Customer', fieldtype:'Link', options:'Customer', ignore : 1, parent:'Profile'});
- this.add_filter({fieldname:'customer_group', label:'Customer Group', fieldtype:'Link', options:'Customer Group', ignore : 1, parent:'Profile'});
- this.add_filter({fieldname:'territory', label:'Territory', fieldtype:'Link', options:'Territory', ignore : 1, parent:'Profile'});
- this.add_filter({fieldname:'supplier', label:'Supplier', fieldtype:'Link', options:'Supplier', ignore : 1, parent:'Profile'});
- this.add_filter({fieldname:'supplier_type', label:'Supplier Type', fieldtype:'Link', options:'Supplier Type', ignore : 1, parent:'Profile'});
- this.add_filter({fieldname:'project', label:'Project', fieldtype:'Link', options:'Project', ignore : 1, parent:'Profile'});
-}
-
-
-this.mytabs.tabs['Select Columns'].hide();
-
-report.aftertableprint = function(t) {
- $yt(t,'*',1,{whiteSpace:'pre'});
-}
-
-var validate_values = function(trans,based_on,order_type) {
- if(!fiscal_year){
- msgprint("Please select Fiscal Year");
- return 0;
- }
- if((in_list(['Quotation','Sales Order','Delivery Note','Sales Invoice'],trans) && in_list(['Supplier','Supplier Type'],based_on)) || (in_list(['Purchase Order','Purchase Receipt','Purchase Invoice'],trans) && in_list(['Customer','Customer Group','Territory'],based_on))){
- msgprint("Sorry! You cannot fetch "+trans+" trend based on "+based_on);
- return 0;
- }
- if(in_list(['Purchase Order','Purchase Receipt','Purchase Invoice'],trans) && order_type){
- msgprint("Please deselect Order Type for "+trans);
- return 0;
- }
- return 1;
-}
-
-
-report.get_query = function() {
- trans = this.get_filter('Profile', 'Transaction').get_value();
- order_type = this.get_filter('Profile', 'Order Type').get_value();
- based_on = this.get_filter('Profile', 'Based On').get_value();
- company = this.get_filter('Profile', 'Company').get_value();
- fiscal_year = this.get_filter('Profile', 'Fiscal Year').get_value();
-
- if(validate_values(trans,based_on,order_type)){
- col = '';
- add_cond = '';
- add_col = '';
- add_tables = '';
- sp_cond = '';
-
- trans_det = trans+' Item'
-
- if(order_type != '') add_code += ' AND t1.order_type = '+order_type;
-
- switch(based_on){
- case 'Item' : item = this.get_filter('Profile', 'Item').get_value();
- col = 'DISTINCT t2.item_code, t3.item_name';
- add_tables = ',tabItem t3';
- add_cond += ' AND t2.item_code = t3.name';
- if(item) add_cond += ' AND t2.item_code = "'+item+'"';
- break;
- case 'Customer' : cust = this.get_filter('Profile', 'Customer').get_value();
- col = 'DISTINCT t1.customer, t3.territory';
- add_tables = ',tabCustomer t3';
- add_cond += ' AND t1.customer = t3.name';
- if(cust) add_cond += ' AND t1.customer = "'+cust+'"';
- break;
- case 'Supplier' : supp = this.get_filter('Profile', 'Supplier').get_value();
- col = 'DISTINCT t1.supplier, t3.supplier_type';
- add_tables = ',tabSupplier t3';
- add_cond += ' AND t1.supplier = t3.name';
- if(supp) add_cond += ' AND t1.supplier = "'+supp+'"';
- break;
- case 'Supplier Type' : supp_type = this.get_filter('Profile', 'Supplier Type').get_value();
- col = 'DISTINCT t3.supplier_type';
- add_tables = ',tabSupplier t3';
- add_cond += ' AND t1.supplier = t3.name';
- if(supp_type) add_cond += ' AND t1.supplier_type = "'+supp_type+'"';
- break;
- case 'Project' : pro = this.get_filter('Profile', 'Project').get_value();
- if (inList(['Purchase Order', 'Purchase Receipt', 'Purchase Invoice'], trans)) {
- col = 'DISTINCT t2.project_name';
- if(pro) add_cond += ' AND t2.project_name = "'+pro+'"';
- } else {
- col = 'DISTINCT t1.project_name';
- if(pro) add_cond += ' AND t1.project_name = "'+pro+'"';
- }
- break;
- case 'Item Group' : ig = this.get_filter('Profile', 'Item Group').get_value();
- if(ig) sp_cond += ' AND parent.name = "'+ig+'"';
- break;
- case 'Customer Group' : cg = this.get_filter('Profile', 'Customer Group').get_value();
- if(cg) sp_cond += ' AND parent.name = "'+cg+'"';
- break;
- case 'Territory' : ter = this.get_filter('Profile', 'Territory').get_value();
- if(ter) sp_cond += ' AND parent.name = "'+ter+'"';
- break;
-
- }
-
-
- if(based_on == 'Item' || based_on == 'Customer' || based_on == 'Supplier' || based_on == 'Supplier Type' || based_on == 'Project')
- var q ='SELECT '+col+' FROM `tab'+trans+'` t1, `tab'+trans_det+'` t2 '+add_tables+' WHERE t1.fiscal_year = "'+fiscal_year+'" and t1.company = "'+company+'" and t2.parent = t1.name '+add_cond;
- else
- var q = 'SELECT CONCAT(REPEAT(" ", COUNT(parent.name) - 1), node.name) AS "Name" FROM `tab'+based_on+'` node,`tab'+based_on+'` parent WHERE node.lft BETWEEN parent.lft and parent.rgt and node.docstatus !=2 '+sp_cond+' GROUP BY node.name ORDER BY node.lft';
-
- return q;
- }
-}
diff --git a/accounts/search_criteria/trend_analyzer/trend_analyzer.py b/accounts/search_criteria/trend_analyzer/trend_analyzer.py
deleted file mode 100644
index 87e1e8e..0000000
--- a/accounts/search_criteria/trend_analyzer/trend_analyzer.py
+++ /dev/null
@@ -1,177 +0,0 @@
-# ERPNext - web based ERP (http://erpnext.com)
-# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-# ********************************************* INITIALIZATION *******************************************
-from __future__ import unicode_literals
-out = []
-
-# Filter Values
-# =============================================
-based_on = filter_values.get('based_on')
-group_by = filter_values.get('group_by')
-trans = filter_values.get('transaction')
-period = filter_values.get('period')
-order_type = filter_values.get('order_type')
-company = filter_values.get('company')
-fiscal_year = filter_values.get('fiscal_year')
-item = filter_values.get('item')
-item_group = filter_values.get('item_group')
-customer = filter_values.get('customer')
-customer_group = filter_values.get('customer_group')
-territory = filter_values.get('territory')
-supplier = filter_values.get('supplier')
-supplier_type = filter_values.get('supplier_type')
-project = filter_values.get('project')
-
-
-# ********************************************* SET DEFAULTS **************************************************
-# Details Table
-# --------------
-
-trans_det = trans+' Item'
-
-col_names, query_val = get_obj('Trend Analyzer Control').get_single_year_query_value(fiscal_year, period, trans, trans_det)
-query_val += 'SUM(t2.qty), SUM(t2.amount)'
-
-col_names.append('Total (Qty)')
-col_names.append('Total (Amt)')
-
-
-# ********************************************* VALIDATIONS ***************************************************
-if (based_on in ['Customer','Customer Group','Territory'] and group_by == 'Supplier') or (based_on in ['Supplier','Supplier Type'] and group_by == 'Customer'):
- msgprint("Sorry! You cannot group Trend Analyzer based on %s by %s" % (based_on,group_by))
- raise Exception
-
-if based_on == group_by:
- msgprint("Based On and Group By value cannot be same for Trend Analyzer")
- raise Exception
-
-
-# ********************************************** ADD COLUMNS **********************************************
-cols = [[based_on, 'Data', '300px', '']]
-cr = 1
-if based_on == 'Item':
- cols.append(['Item Name','Data','200px',''])
- cr = 2
-elif based_on == 'Customer':
- cols.append(['Territory','Link','150px','Territory'])
- cr = 2
-elif based_on == 'Supplier':
- cols.append(['Supplier Type','Link','150px','Supplier Type'])
- cr = 2
-if group_by:
- cr += 1
-
-if group_by:
- cols.append([group_by,'Data','150px',''])
-
-for c in col_names:
- cols.append([c, ("Amt" in c) and 'Currency' or 'Float','150px',''])
-
-for c in cols:
- colnames.append(c[0])
- coltypes.append(c[1])
- colwidths.append(c[2])
- coloptions.append(c[3])
- col_idx[c[0]] = len(colnames)-1
-
-
-# ******************************************* ADDITIONAL CONDITION ************************************************
-add_cond = ' t2.parent = t1.name AND t1.company = "%s" AND t1.fiscal_year = "%s" and t1.docstatus = 1' % (company, fiscal_year)
-add_tab = ' `tab'+trans+'` t1, `tab'+trans_det+'` t2'
-if order_type: add_cond += ' AND t1.order_type = "%s"' % order_type
-
-
-# Item
-if item or based_on == 'Item':
- add_cond += ' AND t2.item_code = "%s"' % (based_on != 'Item' and item or '%(value)s')
-
-# Item Group
-if item_group or based_on == 'Item Group':
- add_tab += ' ,`tabItem` t3, `tabItem Group` t4 '
- add_cond += ' AND t3.name = t2.item_code AND t3.item_group = t4.name and (t4.name = "%s" or t4.name IN (SELECT t5.name FROM `tabItem Group` t5,`tabItem Group` t6 WHERE t5.lft BETWEEN t6.lft and t6.rgt and t5.docstatus !=2 and t6.name = "%s"))' % (based_on != 'Item Group' and item_group or '%(value)s', based_on != 'Item Group' and item_group or '%(value)s')
-
-# Customer
-if customer or based_on == 'Customer':
- add_cond += ' AND t1.customer = "%s"' % (based_on != 'Customer' and customer or '%(value)s')
-
-# Customer Group
-if customer_group or based_on == 'Customer Group':
- add_tab += ' ,`tabCustomer` t7, `tabCustomer Group` t8 '
- add_cond += ' AND t7.name = t1.customer AND t7.customer_group = t8.name and (t8.name = "%s" or t8.name IN (SELECT t9.name FROM `tabCustomer Group` t9,`tabCustomer Group` t10 WHERE t9.lft BETWEEN t10.lft and t10.rgt and t9.docstatus !=2 and ifnull(t9.is_group,"No") = "No" and t10.name = "%s"))' % (based_on != 'Customer Group' and customer_group or '%(value)s', based_on != 'Customer Group' and customer_group or '%(value)s')
-
-# Territory
-if territory or based_on == 'Territory':
- add_tab += ' ,`tabTerritory` t11 '
- add_cond += ' AND t1.territory = t11.name and (t11.name = "%s" or t11.name IN (SELECT t12.name FROM `tabTerritory` t12,`tabTerritory` t13 WHERE t12.lft BETWEEN t13.lft and t13.rgt and t12.docstatus !=2 and ifnull(t12.is_group,"No") = "No" and t13.name = "%s"))' % (based_on != 'Territory' and territory or '%(value)s', based_on != 'Territory' and territory or '%(value)s')
-
-# Supplier
-if supplier or based_on == 'Supplier':
- add_cond += ' AND t1.supplier = "%s"' % (based_on != 'Supplier' and supplier or '%(value)s')
-
-# Supplier Type
-if supplier_type or based_on == 'Supplier Type':
- add_tab += ' ,`tabSupplier` t14, `tabSupplier Type` t15 '
- add_cond += ' AND t14.name = t1.supplier AND t14.supplier_type = t15.name and t15.name = "%s"' % (based_on != 'Supplier Type' and supplier_type or '%(value)s')
-
-# Project
-if project or based_on == 'Project':
- if trans in ['Purchase Order', 'Purchase Receipt', 'Purchase Invoice']:
- add_cond += ' AND t2.project_name = "%s"' % (based_on != 'Project' and project or '%(value)s')
- else:
- add_cond += ' AND t1.project_name = "%s"' % (based_on != 'Project' and project or '%(value)s')
-
-# Column to be seleted for group by condition
-# ==============================================
-sel_col = ''
-if group_by == 'Item':
- sel_col = 't2.item_code'
-elif group_by == 'Customer':
- sel_col = 't1.customer'
-elif group_by == 'Supplier':
- sel_col = 't1.supplier'
-
-
-# ********************************************** Result Set ************************************************
-for r in res:
- main_det = sql("SELECT %s FROM %s WHERE %s" % (query_val, add_tab, add_cond % {'value':cstr(r[col_idx[based_on]]).strip()}))
- if group_by:
- for col in range(cr,cr+1): # this would make all first row blank. just for look
- r.append('')
- if main_det[0][len(colnames) - cr - 1]:
- for d in range(len(colnames) - cr):
- r.append(flt(main_det[0][d]))
- out.append(r)
-
- if group_by:
- flag = 1
- # check for root nodes
- if based_on in ['Item Group','Customer Group','Territory']:
- is_grp = sql("select is_group from `tab%s` where name = '%s'" % (based_on, cstr(r[col_idx[based_on]]).strip()))
- is_grp = is_grp and cstr(is_grp[0][0]) or ''
- if is_grp != 'No':
- flag = 0
-
- if flag == 1:
- det = [x[0] for x in sql("SELECT DISTINCT %s FROM %s where %s" % (sel_col, add_tab, add_cond % {'value':cstr(r[col_idx[based_on]]).strip()}))]
-
- for des in range(len(det)):
- t_row = ['' for i in range(len(colnames))]
- t_row[col_idx[group_by]] = cstr(det[des])
- gr_det = sql("SELECT %s FROM %s WHERE %s = '%s' and %s" % (query_val, add_tab, sel_col, cstr(det[des]), add_cond % {'value':cstr(r[col_idx[based_on]]).strip()}))
- for d in range(len(col_names)):
- t_row[col_idx[col_names[d]]] = flt(gr_det[0][d])
- out.append(t_row)
diff --git a/accounts/search_criteria/trend_analyzer/trend_analyzer.txt b/accounts/search_criteria/trend_analyzer/trend_analyzer.txt
deleted file mode 100644
index ab15003..0000000
--- a/accounts/search_criteria/trend_analyzer/trend_analyzer.txt
+++ /dev/null
@@ -1,26 +0,0 @@
-[
- {
- "owner": "saumil@webnotestech.com",
- "docstatus": 0,
- "creation": "2012-04-23 12:46:00",
- "modified_by": "Administrator",
- "modified": "2012-05-04 12:49:43"
- },
- {
- "module": "Accounts",
- "standard": "Yes",
- "sort_order": "DESC",
- "filters": "{}",
- "doctype": "Search Criteria",
- "doc_type": "Profile",
- "name": "__common__",
- "sort_by": "`tabProfile`.`name`",
- "page_len": 50,
- "criteria_name": "Trend Analyzer",
- "columns": "Profile\u0001ID,Profile\u0001Owner"
- },
- {
- "name": "trend_analyzer",
- "doctype": "Search Criteria"
- }
-]
\ No newline at end of file
diff --git a/accounts/search_criteria/voucher_wise_tax_details/__init__.py b/accounts/search_criteria/voucher_wise_tax_details/__init__.py
deleted file mode 100644
index baffc48..0000000
--- a/accounts/search_criteria/voucher_wise_tax_details/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-from __future__ import unicode_literals
diff --git a/accounts/search_criteria/voucher_wise_tax_details/voucher_wise_tax_details.js b/accounts/search_criteria/voucher_wise_tax_details/voucher_wise_tax_details.js
deleted file mode 100644
index 09a4498..0000000
--- a/accounts/search_criteria/voucher_wise_tax_details/voucher_wise_tax_details.js
+++ /dev/null
@@ -1,63 +0,0 @@
-// ERPNext - web based ERP (http://erpnext.com)
-// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-report.customize_filters = function() {
- this.hide_all_filters();
-
- //Add filter
- this.add_filter({fieldname:'based_on', label:'Based On', fieldtype:'Select', options:'Sales Order'+NEWLINE+'Delivery Note'+NEWLINE+'Sales Invoice', report_default:'Sales Invoice', ignore : 1,parent:'Sales Taxes and Charges', single_select :1, in_first_page:1});
-
- this.add_filter({fieldname:'posting_date', label:'Date', fieldtype:'Date', options:'', ignore : 1,parent:'Sales Taxes and Charges', in_first_page:1});
-
- this.add_filter({fieldname:'voucher_id', label:'Voucher Id', fieldtype:'Data', options:'', ignore : 1,parent:'Sales Taxes and Charges', in_first_page:1});
-
- this.add_filter({fieldname:'tax_account', label:'Tax Account', fieldtype:'Link', options:'Account', ignore : 1,parent:'Sales Taxes and Charges', in_first_page:1});
-}
-
-
-// hide sections
-//--------------------------------------
-this.mytabs.items['More Filters'].hide();
-this.mytabs.items['Select Columns'].hide();
-
-// Get query
-//--------------------------------------
-report.get_query = function() {
- based_on = this.get_filter('Sales Taxes and Charges', 'Based On').get_value();
- from_date = this.get_filter('Sales Taxes and Charges', 'From Date').get_value();
- to_date = this.get_filter('Sales Taxes and Charges', 'To Date').get_value();
- vid = this.get_filter('Sales Taxes and Charges', 'Voucher Id').get_value();
- acc = this.get_filter('Sales Taxes and Charges', 'Tax Account').get_value();
-
- date_fld = 'transaction_date';
- if(based_on == 'Sales Invoice') {
- based_on = 'Sales Invoice';
- date_fld = 'posting_date';
- }
-
- sp_cond = '';
- if (from_date) sp_cond += repl(' AND t1.%(dt)s >= "%(from_date)s"', {dt:date_fld, from_date:from_date});
- if (to_date) sp_cond += repl(' AND t1.%(dt)s <= "%(to_date)s"', {dt:date_fld, to_date:to_date});
- if (vid) sp_cond += repl(' AND t1.name LIKE "%%(voucher)s%"', {voucher:vid});
- if (acc) sp_cond += repl(' AND t2.account_head = "%(acc)s"', {acc:acc});
-
- return repl('SELECT t1.`name`, t1.`%(dt)s`, t1.`customer_name`, t1.net_total, t2.account_head, t2.description, t2.rate, t2.tax_amount \
- FROM `tab%(parent)s` t1, `tabSales Taxes and Charges` t2 \
- WHERE t1.docstatus=1 AND t2.`parenttype` = "%(parent)s" \
- AND t2.`parent` = t1.`name` \
- %(cond)s ORDER BY t1.`name` DESC, t1.%(dt)s DESC', {parent:based_on, cond:sp_cond, dt:date_fld});
-}
-
diff --git a/accounts/search_criteria/voucher_wise_tax_details/voucher_wise_tax_details.py b/accounts/search_criteria/voucher_wise_tax_details/voucher_wise_tax_details.py
deleted file mode 100644
index 0f99d0b..0000000
--- a/accounts/search_criteria/voucher_wise_tax_details/voucher_wise_tax_details.py
+++ /dev/null
@@ -1,39 +0,0 @@
-# ERPNext - web based ERP (http://erpnext.com)
-# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-from __future__ import unicode_literals
-if filter_values.get('based_on') == 'Sales Invoice':
- based_on_dt = 'Sales Invoice'
-else:
- based_on_dt = filter_values.get('based_on')
-
-cols = [
- [filter_values.get('based_on'), 'Link','150px', based_on_dt],
- ['Transaction Date', 'Date', '120px', ''],
- ['Customer', 'Link','150px','Customer'],
- ['Net Total', 'Currency', '80px', ''],
- ['Tax Account', 'Link','150px','Account'],
- ['Description', 'Text','120px',''],
- ['Tax Rate', 'Currency', '80px', ''],
- ['Tax Amount', 'Currency', '80px', '']
-]
-
-for c in cols:
- colnames.append(c[0])
- coltypes.append(c[1])
- colwidths.append(c[2])
- coloptions.append(c[3])
- col_idx[c[0]] = len(colnames)-1
diff --git a/accounts/search_criteria/voucher_wise_tax_details/voucher_wise_tax_details.txt b/accounts/search_criteria/voucher_wise_tax_details/voucher_wise_tax_details.txt
deleted file mode 100644
index 7e8adf3..0000000
--- a/accounts/search_criteria/voucher_wise_tax_details/voucher_wise_tax_details.txt
+++ /dev/null
@@ -1,27 +0,0 @@
-[
- {
- "owner": "Administrator",
- "docstatus": 0,
- "creation": "2012-04-03 12:49:53",
- "modified_by": "Administrator",
- "modified": "2012-04-03 12:49:53"
- },
- {
- "parent_doc_type": "Delivery Note",
- "module": "Accounts",
- "standard": "Yes",
- "sort_order": "DESC",
- "filters": "{'Delivery Note\u0001Submitted':1,'Delivery Note\u0001Status':'','Delivery Note\u0001Fiscal Year':''}",
- "doc_type": "Sales Taxes and Charges",
- "name": "__common__",
- "doctype": "Search Criteria",
- "sort_by": "`tabSales Taxes and Charges`.`parent`",
- "page_len": 50,
- "criteria_name": "Voucher wise tax details",
- "columns": "Sales Taxes and Charges\u0001Type,Sales Taxes and Charges\u0001Account Head,Sales Taxes and Charges\u0001Cost Center,Sales Taxes and Charges\u0001Description,Sales Taxes and Charges\u0001Rate,Sales Taxes and Charges\u0001Amount*,Sales Taxes and Charges\u0001Total*"
- },
- {
- "name": "voucher_wise_tax_details",
- "doctype": "Search Criteria"
- }
-]
\ No newline at end of file
diff --git a/accounts/search_criteria/yearly_transaction_summary/__init__.py b/accounts/search_criteria/yearly_transaction_summary/__init__.py
deleted file mode 100644
index baffc48..0000000
--- a/accounts/search_criteria/yearly_transaction_summary/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-from __future__ import unicode_literals
diff --git a/accounts/search_criteria/yearly_transaction_summary/yearly_transaction_summary.js b/accounts/search_criteria/yearly_transaction_summary/yearly_transaction_summary.js
deleted file mode 100644
index febd6a3..0000000
--- a/accounts/search_criteria/yearly_transaction_summary/yearly_transaction_summary.js
+++ /dev/null
@@ -1,28 +0,0 @@
-// ERPNext - web based ERP (http://erpnext.com)
-// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-report.customize_filters = function() {
- this.mytabs.items['Select Columns'].hide()
- this.hide_all_filters();
- this.add_filter({fieldname:'company', label:'Company', fieldtype:'Link', options:'Company', report_default:sys_defaults.company, ignore : 1, parent:'Profile'});
- this.add_filter({fieldname:'from_fiscal_year', label:'From Fiscal Year', fieldtype:'Link', options:'Fiscal Year', report_default:sys_defaults.fiscal_year, ignore : 1, parent:'Profile'});
- this.add_filter({fieldname:'to_fiscal_year', label:'To Fiscal Year', fieldtype:'Link', options:'Fiscal Year', report_default:sys_defaults.fiscal_year, ignore : 1, parent:'Profile'});
- this.add_filter({fieldname:'date', label:'Date', fieldtype:'Date', options:'',ignore : 1, parent:'Profile'});
-}
-
-report.aftertableprint = function(t) {
- $yt(t,'*',1,{NEWLINE:'<br>'});
-}
\ No newline at end of file
diff --git a/accounts/search_criteria/yearly_transaction_summary/yearly_transaction_summary.py b/accounts/search_criteria/yearly_transaction_summary/yearly_transaction_summary.py
deleted file mode 100644
index 166d313..0000000
--- a/accounts/search_criteria/yearly_transaction_summary/yearly_transaction_summary.py
+++ /dev/null
@@ -1,131 +0,0 @@
-# ERPNext - web based ERP (http://erpnext.com)
-# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-from __future__ import unicode_literals
-if not filter_values.get('from_fiscal_year'):
- msgprint("Please Select From Fiscal Year")
- raise Exception
-elif not filter_values.get('to_fiscal_year'):
- msgprint("Please Select To Fiscal Year")
- raise Exception
-else:
- from_fiscal_year = filter_values.get('from_fiscal_year')
- to_fiscal_year = filter_values.get('to_fiscal_year')
- company = filter_values.get('company')
- from_date = filter_values.get('date')
- to_date = filter_values.get('date1')
- if from_date != "" and to_date != "":
- get_obj('MIS Control').dates(from_fiscal_year,from_date,to_date) # validate dates (i.e. dates should be between particular fiscal year)
-
-# Add columns based on from and to fiscal year---------
-columns = []
-columns.append(['ID','Data','150px',''])
-columns.append(['Description','Data','150px',''])
-columns.append([from_fiscal_year,'Data','150px','']) # append from fiscal year column
-
-# === get no. of fiscal years between from and to fiscal year and append columns accordingly ========
-start_year = from_fiscal_year.split('-')[1] # eg. from fiscal year 2008-2009 . this gives value 2009
-end_year = to_fiscal_year.split('-')[0] # eg. to fiscal year 2009-2010 . this gives value 2009
-diff = cint(end_year)-cint(start_year)
-if diff > 0:
- year = cint(start_year);
- next_year = 0
- f_year = ''
- for i in range(1,diff+1):
- next_year = cint(year)+1
- f_year = cstr(year)+'-'+cstr(next_year)
- columns.append([f_year,'Data','150px',''])
-# ====================================================================================================
-
-columns.append([to_fiscal_year,'Data','150px','']) # append to fiscal year column
-
-for c in columns:
- colnames.append(c[0])
- coltypes.append(c[1])
- colwidths.append(c[2])
- coloptions.append(c[3])
- col_idx[c[0]] = len(colnames)-1
-
-out = []
-# =========================== condition for result ===================================================
-if company:
- condition = 'docstatus = 1 and company = "'+company+'"'
-else:
- condition = 'docstatus = 1'
-
-# ====================================================================================================
-
-for r in res:
- det = ''
- query = ''
- list_range = 0
- if from_date != "" and to_date != "":
- date_1 = cstr(get_obj('MIS Control').dates(from_fiscal_year,from_date,to_date))
- query += 'COUNT(CASE WHEN (fiscal_year = "'+from_fiscal_year+'" and (transaction_date BETWEEN CAST("'+date_1.split('~~~')[0]+'" AS DATE) AND CAST("'+date_1.split('~~~')[1]+'" AS DATE))) THEN name ELSE NULL END),SUM(CASE WHEN (fiscal_year = "'+from_fiscal_year+'" and (transaction_date BETWEEN CAST("'+date_1.split('~~~')[0]+'" AS DATE) AND CAST("'+date_1.split('~~~')[1]+'" AS DATE))) THEN net_total ELSE NULL END),MIN(CASE WHEN (fiscal_year = "'+from_fiscal_year+'" and (transaction_date BETWEEN CAST("'+date_1.split('~~~')[0]+'" AS DATE) AND CAST("'+date_1.split('~~~')[1]+'" AS DATE))) THEN net_total ELSE NULL END),MAX(CASE WHEN (fiscal_year = "'+from_fiscal_year+'" and (transaction_date BETWEEN CAST("'+date_1.split('~~~')[0]+'" AS DATE) AND CAST("'+date_1.split('~~~')[1]+'" AS DATE))) THEN net_total ELSE NULL END),AVG(CASE WHEN (fiscal_year = "'+from_fiscal_year+'" and (transaction_date BETWEEN CAST("'+date_1.split('~~~')[0]+'" AS DATE) AND CAST("'+date_1.split('~~~')[1]+'" AS DATE))) THEN net_total ELSE NULL END),'
- else:
- query += 'COUNT(CASE WHEN fiscal_year = "'+from_fiscal_year+'" THEN name ELSE NULL END),SUM(CASE WHEN fiscal_year = "'+from_fiscal_year+'" THEN net_total ELSE NULL END),MIN(CASE WHEN fiscal_year = "'+from_fiscal_year+'" THEN net_total ELSE NULL END),MAX(CASE WHEN fiscal_year = "'+from_fiscal_year+'" THEN net_total ELSE NULL END),AVG(CASE WHEN fiscal_year = "'+from_fiscal_year+'" THEN net_total ELSE NULL END),'
- list_range += 1
-
- if diff > 0:
- year = cint(start_year);
- next_year = 0
- f_year = ''
- for i in range(1,diff+1):
- next_year = cint(year)+1;
- f_year = cstr(year)+'-'+cstr(next_year);
- if from_date != "" and to_date != "":
- date_2 = cstr(get_obj('MIS Control').dates(f_year,from_date,to_date))
- query += 'COUNT(CASE WHEN (fiscal_year = "'+f_year+'" and (transaction_date BETWEEN CAST("'+date_2.split('~~~')[0]+'" AS DATE) AND CAST("'+date_2.split('~~~')[1]+'" AS DATE))) THEN name ELSE NULL END),SUM(CASE WHEN (fiscal_year = "'+f_year+'" and (transaction_date BETWEEN CAST("'+date_2.split('~~~')[0]+'" AS DATE) AND CAST("'+date_2.split('~~~')[1]+'" AS DATE))) THEN net_total ELSE NULL END),MIN(CASE WHEN (fiscal_year = "'+f_year+'" and (transaction_date BETWEEN CAST("'+date_2.split('~~~')[0]+'" AS DATE) AND CAST("'+date_2.split('~~~')[1]+'" AS DATE))) THEN net_total ELSE NULL END),MAX(CASE WHEN (fiscal_year = "'+f_year+'" and (transaction_date BETWEEN CAST("'+date_2.split('~~~')[0]+'" AS DATE) AND CAST("'+date_2.split('~~~')[1]+'" AS DATE))) THEN net_total ELSE NULL END),AVG(CASE WHEN (fiscal_year = "'+f_year+'" and (transaction_date BETWEEN CAST("'+date_2.split('~~~')[0]+'" AS DATE) AND CAST("'+date_2.split('~~~')[1]+'" AS DATE))) THEN net_total ELSE NULL END),'
- else:
- query += 'COUNT(CASE WHEN fiscal_year = "'+f_year+'" THEN name ELSE NULL END),SUM(CASE WHEN fiscal_year = "'+f_year+'" THEN net_total ELSE NULL END),MIN(CASE WHEN fiscal_year = "'+f_year+'" THEN net_total ELSE NULL END),MAX(CASE WHEN fiscal_year = "'+f_year+'" THEN net_total ELSE NULL END),AVG(CASE WHEN fiscal_year = "'+f_year+'" THEN net_total ELSE NULL END),'
- year += 1
- list_range += 1
-
- if from_date != "" and to_date != "":
- date_3 = cstr(get_obj('MIS Control').dates(to_fiscal_year,from_date,to_date))
- query += 'COUNT(CASE WHEN (fiscal_year = "'+to_fiscal_year+'" and (transaction_date BETWEEN CAST("'+date_3.split('~~~')[0]+'" AS DATE) AND CAST("'+date_3.split('~~~')[1]+'" AS DATE))) THEN name ELSE NULL END),SUM(CASE WHEN (fiscal_year = "'+to_fiscal_year+'" and (transaction_date BETWEEN CAST("'+date_3.split('~~~')[0]+'" AS DATE) AND CAST("'+date_3.split('~~~')[1]+'" AS DATE))) THEN net_total ELSE NULL END),MIN(CASE WHEN (fiscal_year = "'+to_fiscal_year+'" and (transaction_date BETWEEN CAST("'+date_3.split('~~~')[0]+'" AS DATE) AND CAST("'+date_3.split('~~~')[1]+'" AS DATE))) THEN net_total ELSE NULL END),MAX(CASE WHEN (fiscal_year = "'+to_fiscal_year+'" and (transaction_date BETWEEN CAST("'+date_3.split('~~~')[0]+'" AS DATE) AND CAST("'+date_3.split('~~~')[1]+'" AS DATE))) THEN net_total ELSE NULL END),AVG(CASE WHEN (fiscal_year = "'+to_fiscal_year+'" and (transaction_date BETWEEN CAST("'+date_3.split('~~~')[0]+'" AS DATE) AND CAST("'+date_3.split('~~~')[1]+'" AS DATE))) THEN net_total ELSE NULL END)'
- else:
- query += 'COUNT(CASE WHEN fiscal_year = "'+to_fiscal_year+'" THEN name ELSE NULL END),SUM(CASE WHEN fiscal_year = "'+to_fiscal_year+'" THEN net_total ELSE NULL END),MIN(CASE WHEN fiscal_year = "'+to_fiscal_year+'" THEN net_total ELSE NULL END),MAX(CASE WHEN fiscal_year = "'+to_fiscal_year+'" THEN net_total ELSE NULL END),AVG(CASE WHEN fiscal_year = "'+to_fiscal_year+'" THEN net_total ELSE NULL END)'
- list_range += 1
-
- # Main Query
- det = sql("SELECT %s from `tab%s` where %s" %(query,r[col_idx['ID']],condition))
-
- # bifurcate all values and append them in list
- total_no,total_amt,min_amt,max_amt,avg_amt = [],[],[],[],[]
-
- count = 0
- # append values to list
- for i in range(list_range):
- total_no.append(cstr(det and det[0][count] or 0))
- total_amt.append(cstr(det and det[0][count+1] or 0))
- min_amt.append(cstr(det and det[0][count+2] or 0))
- max_amt.append(cstr(det and det[0][count+3] or 0))
- avg_amt.append(cstr(det and det[0][count+4] or 0))
- count += 5
-
- for col in range(len(colnames)-1): # this would make all first row blank. just for look
- r.append('')
- out.append(r)
-
- d = [['Total No',total_no],['Total Amount',total_amt],['Min Amount',min_amt],['Max Amount',max_amt],['Avg Amount',avg_amt]]
-
- for des in range(5):
- t_row = ['' for i in range(len(colnames))]
- t_row[col_idx['Description']] = d[des][0]
- for v in range(list_range):
- t_row[col_idx[colnames[v+2]]] = flt(d[des][1][v])
- out.append(t_row)
\ No newline at end of file
diff --git a/accounts/search_criteria/yearly_transaction_summary/yearly_transaction_summary.sql b/accounts/search_criteria/yearly_transaction_summary/yearly_transaction_summary.sql
deleted file mode 100644
index b05de58..0000000
--- a/accounts/search_criteria/yearly_transaction_summary/yearly_transaction_summary.sql
+++ /dev/null
@@ -1 +0,0 @@
-SELECT DISTINCT name FROM tabDocType WHERE document_type="Transaction" AND ifnull(istable,0) = 0
\ No newline at end of file
diff --git a/accounts/search_criteria/yearly_transaction_summary/yearly_transaction_summary.txt b/accounts/search_criteria/yearly_transaction_summary/yearly_transaction_summary.txt
deleted file mode 100644
index 9c6ad4b..0000000
--- a/accounts/search_criteria/yearly_transaction_summary/yearly_transaction_summary.txt
+++ /dev/null
@@ -1,25 +0,0 @@
-[
- {
- "owner": "Administrator",
- "docstatus": 0,
- "creation": "2012-04-03 12:49:53",
- "modified_by": "Administrator",
- "modified": "2012-04-03 12:49:53"
- },
- {
- "module": "Accounts",
- "standard": "Yes",
- "sort_order": "DESC",
- "filters": "{'DocType\u0001Fiscal Year':'2009-2010','DocType\u0001Company':'Alpha Company','DocType\u0001Period':'Monthly'}",
- "doctype": "Search Criteria",
- "doc_type": "Profile",
- "name": "__common__",
- "sort_by": "`tabProfile`.`name`",
- "criteria_name": "Yearly Transaction Summary",
- "columns": "Profile\u0001ID"
- },
- {
- "name": "yearly_transaction_summary",
- "doctype": "Search Criteria"
- }
-]
\ No newline at end of file
diff --git a/buying/README.md b/buying/README.md
new file mode 100644
index 0000000..ce89da0
--- /dev/null
+++ b/buying/README.md
@@ -0,0 +1,8 @@
+Manage buying (purchasing).
+
+Transactions include:
+
+- Material Request
+- Supplier Quotation
+- Purchase Order
+- Quality Inspection
\ No newline at end of file
diff --git a/buying/doctype/purchase_common/README.md b/buying/doctype/purchase_common/README.md
new file mode 100644
index 0000000..bedec2a
--- /dev/null
+++ b/buying/doctype/purchase_common/README.md
@@ -0,0 +1 @@
+Common scripts for purchase transactions.
\ No newline at end of file
diff --git a/buying/doctype/purchase_common/purchase_common.js b/buying/doctype/purchase_common/purchase_common.js
index dacee80..eee7984 100644
--- a/buying/doctype/purchase_common/purchase_common.js
+++ b/buying/doctype/purchase_common/purchase_common.js
@@ -20,131 +20,330 @@
// cur_frm.cscript.fname - Details fieldname
wn.provide("erpnext.buying");
+wn.require("app/js/transaction.js");
-erpnext.buying.BuyingController = wn.ui.form.Controller.extend({
+erpnext.buying.BuyingController = erpnext.TransactionController.extend({
setup: function() {
var me = this;
if(this.frm.fields_dict.price_list_name) {
- this.frm.fields_dict.price_list_name.get_query = function() {
+ this.frm.set_query("price_list_name", function() {
return repl("select distinct price_list_name from `tabItem Price` \
where buying = 1 and price_list_name like \"%s%%\"");
- };
- }
-
- if(this.frm.fields_dict.price_list_currency) {
- this.frm.fields_dict.price_list_currency.get_query = function() {
+ });
+
+ this.frm.set_query("price_list_currency", function() {
return repl("select distinct ref_currency from `tabItem Price` \
where price_list_name=\"%(price_list_name)s\" and buying = 1 \
and ref_currency like \"%s%%\"",
{price_list_name: me.frm.doc.price_list_name});
- };
+ });
}
+
+ if(this.frm.fields_dict.supplier) {
+ this.frm.set_query("supplier", erpnext.utils.supplier_query);
+ }
+
+ this.frm.set_query("item_code", this.frm.cscript.fname, function() {
+ if(me.frm.doc.is_subcontracted == "Yes") {
+ return erpnext.queries.item({'ifnull(tabItem.is_sub_contracted_item, "No")': "Yes"});
+ } else {
+ return erpnext.queries.item({'ifnull(tabItem.is_purchase_item, "No")': "Yes"});
+ }
+ });
},
- refresh: function() {
- this.frm.clear_custom_buttons();
- erpnext.hide_naming_series();
-
- if(this.frm.fields_dict.supplier)
- this.frm.toggle_display("contact_section", this.frm.doc.supplier);
-
- if(this.frm.fields_dict.currency)
- this.set_dynamic_labels();
- },
-
- price_list_name: function(callback_fn) {
- var me = this;
-
- if(this.frm.doc.price_list_name) {
- if(!this.frm.doc.price_list_currency) {
- // set price list currency
+ supplier: function() {
+ if(this.frm.doc.supplier || this.frm.doc.credit_to) {
+ if(!this.frm.doc.company) {
+ this.frm.set_value("supplier", null);
+ msgprint(wn._("Please specify Company"));
+ } else {
+ var me = this;
+ var price_list_name = this.frm.doc.price_list_name;
+
this.frm.call({
- method: "setup.utils.get_price_list_currency",
- args: {args: {
- price_list_name: this.frm.doc.price_list_name,
- use_for: "buying"
- }},
+ doc: this.frm.doc,
+ method: "set_supplier_defaults",
+ freeze: true,
callback: function(r) {
if(!r.exc) {
- me.price_list_currency();
- if (typeof callback_fn === "function")
- callback_fn(me.frm.doc, me.frm.doc.doctype, me.frm.doc.name);
+ me.frm.refresh_fields();
+ if(me.frm.doc.price_list_name !== price_list_name) me.price_list_name();
}
}
});
- } else {
- me.price_list_currency();
- if (typeof callback_fn === "function")
- callback_fn(me.frm.doc, me.frm.doc.doctype, me.frm.doc.name);
}
- }
+ }
},
item_code: function(doc, cdt, cdn) {
var me = this;
- var item = locals[cdt][cdn];
-
+ var item = wn.model.get_doc(cdt, cdn);
if(item.item_code) {
+ if(!this.validate_company_and_party("supplier")) {
+ item.item_code = null;
+ refresh_field("item_code", item.name, item.parentfield);
+ } else {
+ this.frm.call({
+ method: "buying.utils.get_item_details",
+ child: item,
+ args: {
+ args: {
+ item_code: item.item_code,
+ warehouse: item.warehouse,
+ doctype: me.frm.doc.doctype,
+ docname: me.frm.doc.name,
+ supplier: me.frm.doc.supplier,
+ conversion_rate: me.frm.doc.conversion_rate,
+ price_list_name: me.frm.doc.price_list_name,
+ price_list_currency: me.frm.doc.price_list_currency,
+ plc_conversion_rate: me.frm.doc.plc_conversion_rate,
+ is_subcontracted: me.frm.doc.is_subcontracted,
+ company: me.frm.doc.company,
+ currency: me.frm.doc.currency
+ }
+ },
+ callback: function(r) {
+ if(!r.exc) {
+ me.import_ref_rate(me.frm.doc, cdt, cdn);
+ }
+ }
+ });
+ }
+ }
+ },
+
+ price_list_name: function() {
+ this._super("buying");
+ },
+
+ import_ref_rate: function(doc, cdt, cdn) {
+ var item = wn.model.get_doc(cdt, cdn);
+ wn.model.round_floats_in(item, ["import_ref_rate", "discount_rate"]);
+
+ item.import_rate = flt(item.import_ref_rate * (1 - item.discount_rate / 100.0),
+ precision("import_rate", item));
+
+ this.calculate_taxes_and_totals();
+ },
+
+ discount_rate: function(doc, cdt, cdn) {
+ this.import_ref_rate(doc, cdt, cdn);
+ },
+
+ import_rate: function(doc, cdt, cdn) {
+ var item = wn.model.get_doc(cdt, cdn);
+ wn.model.round_floats_in(item, ["import_rate", "discount_rate"]);
+
+ if(item.import_ref_rate) {
+ item.discount_rate = flt((1 - item.import_rate / item.import_ref_rate) * 100.0,
+ precision("discount_rate", item));
+ } else {
+ item.discount_rate = 0.0;
+ }
+
+ this.calculate_taxes_and_totals();
+ },
+
+ uom: function(doc, cdt, cdn) {
+ var me = this;
+ var item = wn.model.get_doc(cdt, cdn);
+ if(item.item_code && item.uom) {
this.frm.call({
- method: "buying.utils.get_item_details",
+ method: "buying.utils.get_conversion_factor",
child: item,
args: {
- args: {
- doctype: me.frm.doc.doctype,
- docname: me.frm.doc.name,
- item_code: item.item_code,
- warehouse: item.warehouse,
- supplier: me.frm.doc.supplier,
- conversion_rate: me.frm.doc.conversion_rate,
- price_list_name: me.frm.doc.price_list_name,
- price_list_currency: me.frm.doc.price_list_currency,
- plc_conversion_rate: me.frm.doc.plc_conversion_rate
- }
+ item_code: item.item_code,
+ uom: item.uom
},
+ callback: function(r) {
+ if(!r.exc) {
+ me.conversion_factor(me.frm.doc, cdt, cdn);
+ }
+ }
});
}
},
- update_item_details: function(doc, dt, dn, callback) {
- if(!this.frm.doc.__islocal) return;
-
- var me = this;
- var children = getchildren(this.tname, this.frm.doc.name, this.fname);
- if(children && children.length) {
- this.frm.call({
- doc: me.frm.doc,
- method: "update_item_details",
- callback: function(r) {
- if(!r.exc) {
- refresh_field(me.fname);
- me.load_defaults(me.frm.doc, dt, dn, callback);
- }
- }
- })
- } else {
- this.load_taxes(doc, dt, dn, callback);
+ qty: function(doc, cdt, cdn) {
+ this._super(doc, cdt, cdn);
+ this.conversion_factor(doc, cdt, cdn);
+ },
+
+ conversion_factor: function(doc, cdt, cdn) {
+ if(wn.meta.get_docfield(cdt, "stock_qty", cdn)) {
+ var item = wn.model.get_doc(cdt, cdn);
+ wn.model.round_floats_in(item, ["qty", "conversion_factor"]);
+ item.stock_qty = flt(item.qty * item.conversion_factor, precision("stock_qty", item));
+ refresh_field("stock_qty", item.name, item.parentfield);
}
},
- currency: function() {
- this.set_dynamic_labels();
+ warehouse: function(doc, cdt, cdn) {
+ var item = wn.model.get_doc(cdt, cdn);
+ if(item.item_code && item.warehouse) {
+ this.frm.call({
+ method: "buying.utils.get_conversion_factor",
+ child: item,
+ args: {
+ item_code: item.item_code,
+ warehouse: item.warehouse
+ }
+ });
+ }
},
- company: function() {
- this.set_dynamic_labels();
+ project_name: function(doc, cdt, cdn) {
+ var item = wn.model.get_doc(cdt, cdn);
+ if(item.project_name) {
+ $.each(wn.model.get_doclist(this.frm.doc.doctype, this.frm.doc.name, {parentfield: this.fname}),
+ function(i, other_item) {
+ if(!other_item.project_name) {
+ other_item.project_name = item.project_name;
+ refresh_field("project_name", other_item.name, other_item.parentfield);
+ }
+ });
+ }
},
- price_list_currency: function() {
- this.frm.toggle_reqd("plc_conversion_rate",
- !!(this.frm.doc.price_list_name && this.frm.doc.price_list_currency));
+ category: function(doc, cdt, cdn) {
+ // should be the category field of tax table
+ if(cdt != doc.doctype) {
+ this.calculate_taxes_and_totals();
+ }
+ },
+
+ calculate_taxes_and_totals: function() {
+ this._super();
+ this.calculate_total_advance("Purchase Invoice", "advance_allocation_details");
+ this.frm.refresh_fields();
+ },
+
+ calculate_item_values: function() {
+ var me = this;
- this.set_dynamic_labels();
-
- if(this.frm.doc.price_list_currency === this.get_company_currency())
- this.frm.set_value("plc_conversion_rate", 1.0);
- else if(this.frm.doc.price_list_currency === this.frm.doc.currency)
- this.frm.set_value("plc_conversion_rate", this.frm.doc.conversion_rate || 1.0);
+ if(this.frm.doc.doctype != "Purchase Invoice") {
+ // hack!
+ wn.meta.docfield_copy[this.tname][this.frm.doc.name]["rate"] = $.extend({},
+ wn.meta.docfield_copy[this.tname][this.frm.doc.name]["purchase_rate"]);
+ }
+
+ $.each(this.frm.item_doclist, function(i, item) {
+ if(me.frm.doc.doctype != "Purchase Invoice") {
+ item.rate = item.purchase_rate;
+ }
+
+ wn.model.round_floats_in(item);
+ item.import_amount = flt(item.import_rate * item.qty, precision("import_amount", item));
+ item.item_tax_amount = 0.0;
+
+ me._set_in_company_currency(item, "import_ref_rate", "purchase_ref_rate");
+ me._set_in_company_currency(item, "import_rate", "rate");
+ me._set_in_company_currency(item, "import_amount", "amount");
+ });
+
+ },
+
+ calculate_net_total: function() {
+ var me = this;
+
+ this.frm.doc.net_total = this.frm.doc.net_total_import = 0.0;
+ $.each(this.frm.item_doclist, function(i, item) {
+ me.frm.doc.net_total += item.amount;
+ me.frm.doc.net_total_import += item.import_amount;
+ });
+
+ wn.model.round_floats_in(this.frm.doc, ["net_total", "net_total_import"]);
+ },
+
+ calculate_totals: function() {
+ var tax_count = this.frm.tax_doclist.length;
+ this.frm.doc.grand_total = flt(
+ tax_count ? this.frm.tax_doclist[tax_count - 1].total : this.frm.doc.net_total,
+ precision("grand_total"));
+ this.frm.doc.grand_total_import = flt(this.frm.doc.grand_total / this.frm.doc.conversion_rate,
+ precision("grand_total_import"));
+
+ this.frm.doc.total_tax = flt(this.frm.doc.grand_total - this.frm.doc.net_total,
+ precision("total_tax"));
+
+ // rounded totals
+ if(wn.meta.get_docfield(this.frm.doc.doctype, "rounded_total", this.frm.doc.name)) {
+ this.frm.doc.rounded_total = Math.round(this.frm.doc.grand_total);
+ }
+
+ if(wn.meta.get_docfield(this.frm.doc.doctype, "rounded_total_import", this.frm.doc.name)) {
+ this.frm.doc.rounded_total_import = Math.round(this.frm.doc.grand_total_import);
+ }
+
+ // other charges added/deducted
+ if(tax_count) {
+ this.frm.doc.other_charges_added = wn.utils.sum($.map(this.frm.tax_doclist,
+ function(tax) { return tax.add_deduct_tax == "Add" ? tax.tax_amount : 0.0; }));
+
+ this.frm.doc.other_charges_deducted = wn.utils.sum($.map(this.frm.tax_doclist,
+ function(tax) { return tax.add_deduct_tax == "Deduct" ? tax.tax_amount : 0.0; }));
+
+ wn.model.round_floats_in(this.frm.doc, ["other_charges_added", "other_charges_deducted"]);
+
+ this.frm.doc.other_charges_added_import = flt(this.frm.doc.other_charges_added / this.frm.doc.conversion_rate,
+ precision("other_charges_added_import"));
+ this.frm.doc.other_charges_deducted_import = flt(this.frm.doc.other_charges_deducted / this.frm.doc.conversion_rate,
+ precision("other_charges_deducted_import"));
+ }
+ },
+
+ _cleanup: function() {
+ this._super();
+ this.frm.doc.in_words = this.frm.doc.in_words_import = "";
+
+ // except in purchase invoice, rate field is purchase_rate
+ // reset fieldname of rate
+ if(this.frm.doc.doctype != "Purchase Invoice") {
+ // clear hack
+ delete wn.meta.docfield_copy[this.tname][this.frm.doc.name]["rate"];
+
+ $.each(this.frm.item_doclist, function(i, item) {
+ item.purchase_rate = item.rate;
+ delete item["rate"];
+ });
+ }
+
+ if(!wn.meta.get_docfield(item.doctype, "item_tax_amount", item.parent || item.name)) {
+ $.each(this.frm.item_doclist, function(i, item) {
+ delete item["item_tax_amount"];
+ });
+ }
+ },
+
+ calculate_outstanding_amount: function() {
+ if(this.frm.doc.doctype == "Purchase Invoice" && this.frm.doc.docstatus < 2) {
+ wn.model.round_floats_in(this.frm.doc, ["grand_total", "total_advance", "write_off_amount"]);
+ this.frm.doc.total_amount_to_pay = flt(this.frm.doc.grand_total - this.frm.doc.write_off_amount,
+ precision("total_amount_to_pay"));
+ this.frm.doc.outstanding_amount = flt(this.frm.doc.total_amount_to_pay - this.frm.doc.total_advance,
+ precision("outstanding_amount"));
+ }
+ },
+
+ set_item_tax_amount: function(item, tax, current_tax_amount) {
+ // item_tax_amount is the total tax amount applied on that item
+ // stored for valuation
+ //
+ // TODO: rename item_tax_amount to valuation_tax_amount
+ if(["Valuation", "Valuation and Total"].indexOf(tax.category) != -1 &&
+ wn.meta.get_docfield(item.doctype, "item_tax_amount", item.parent || item.name)) {
+ // accumulate only if tax is for Valuation / Valuation and Total
+ item.item_tax_amount += flt(current_tax_amount, precision("item_tax_amount", item));
+ }
+ },
+
+ show_item_wise_taxes: function() {
+ if(this.frm.fields_dict.tax_calculation) {
+ $(this.get_item_wise_taxes_html())
+ .appendTo($(this.frm.fields_dict.tax_calculation.wrapper).empty());
+ }
},
set_dynamic_labels: function(doc, dt, dn) {
@@ -162,11 +361,12 @@
$.each(fields_list, function(i, fname) {
var docfield = wn.meta.get_docfield(me.frm.doc.doctype, fname);
if(docfield) {
- var label = wn._((docfield.label || "")).replace(/\([^\)]*\)/g, "");
+ var label = wn._(docfield.label || "").replace(/\([^\)]*\)/g, "");
field_label_map[fname] = label.trim() + " (" + currency + ")";
}
});
- }
+ };
+
setup_field_label_map(["net_total", "total_tax", "grand_total", "in_words",
"other_charges_added", "other_charges_deducted",
@@ -188,6 +388,9 @@
this.frm.toggle_display(["conversion_rate", "net_total", "grand_total",
"in_words", "other_charges_added", "other_charges_deducted"],
this.frm.doc.currency != company_currency);
+
+ this.frm.toggle_display(["plc_conversion_rate"],
+ this.frm.price_list_currency != company_currency);
// set labels
$.each(field_label_map, function(fname, label) {
@@ -204,11 +407,12 @@
$.each(fields_list, function(i, fname) {
var docfield = wn.meta.get_docfield(grid_doctype, fname);
if(docfield) {
+ var label = wn._(docfield.label || "").replace(/\([^\)]*\)/g, "");
field_label_map[grid_doctype + "-" + fname] =
- docfield.label + " (" + currency + ")";
+ label.trim() + " (" + currency + ")";
}
});
- }
+ };
setup_field_label_map(["purchase_rate", "purchase_ref_rate", "amount", "rate"],
company_currency, this.fname);
@@ -216,7 +420,9 @@
setup_field_label_map(["import_rate", "import_ref_rate", "import_amount"],
this.frm.doc.currency, this.fname);
- setup_field_label_map(["tax_amount", "total"], company_currency, this.other_fname);
+ if(this.frm.fields_dict[this.other_fname]) {
+ setup_field_label_map(["tax_amount", "total"], company_currency, this.other_fname);
+ }
if(this.frm.fields_dict["advance_allocation_details"]) {
setup_field_label_map(["advance_amount", "allocated_amount"], company_currency,
@@ -237,10 +443,6 @@
$wrapper.find('[data-grid-fieldname="'+fname+'"]').text(label);
});
},
-
- get_company_currency: function() {
- return erpnext.get_currency(this.frm.doc.company);
- }
});
// to save previous state of cur_frm.cscript
@@ -254,547 +456,4 @@
var tname = cur_frm.cscript.tname;
-var fname = cur_frm.cscript.fname;
-
-cur_frm.cscript.get_default_schedule_date = function(doc) {
- var ch = getchildren( tname, doc.name, fname);
- if (flt(ch.length) > 0){
- $c_obj(make_doclist(doc.doctype, doc.name), 'get_default_schedule_date', '', function(r, rt) { refresh_field(fname); });
- }
-}
-
-cur_frm.cscript.load_taxes = function(doc, cdt, cdn, callback) {
- // run if this is not executed from dt_map...
- doc = locals[doc.doctype][doc.name];
- if(doc.supplier || getchildren('Purchase Taxes and Charges', doc.name, 'purchase_tax_details', doc.doctype).length) {
- if(callback) {
- callback(doc, cdt, cdn);
- }
- } else {
- $c_obj(make_doclist(doc.doctype, doc.name),'load_default_taxes','',function(r,rt){
- refresh_field('purchase_tax_details');
- if(callback) callback(doc, cdt, cdn);
- });
- }
-}
-
-
-
-// Gets called after existing item details are update to fill in
-// remaining default values
-cur_frm.cscript.load_defaults = function(doc, dt, dn, callback) {
- if(!cur_frm.doc.__islocal) { return; }
-
- doc = locals[doc.doctype][doc.name];
- var fields_to_refresh = wn.model.set_default_values(doc);
- if(fields_to_refresh) { refresh_many(fields_to_refresh); }
-
- fields_to_refresh = null;
- var children = getchildren(cur_frm.cscript.tname, doc.name, cur_frm.cscript.fname);
- if(!children) { return; }
- for(var i=0; i<children.length; i++) {
- wn.model.set_default_values(children[i]);
- }
- refresh_field(cur_frm.cscript.fname);
- cur_frm.cscript.load_taxes(doc, dt, dn, callback);
-}
-
-// ======================== Conversion Rate ==========================================
-cur_frm.cscript.conversion_rate = function(doc,cdt,cdn) {
- cur_frm.cscript.calc_amount( doc, 1);
-}
-
-//==================== Item Code Get Query =======================================================
-// Only Is Purchase Item = 'Yes' and Items not moved to trash are allowed.
-cur_frm.fields_dict[fname].grid.get_field("item_code").get_query = function(doc, cdt, cdn) {
- if (doc.is_subcontracted =="Yes") {
- return erpnext.queries.item({
- 'ifnull(tabItem.is_sub_contracted_item, "No")': 'Yes'
- })
- } else {
- return erpnext.queries.item({
- 'ifnull(tabItem.is_purchase_item, "No")': 'Yes'
- })
- }
-}
-
-//==================== Update Stock Qty ==========================================================
-cur_frm.cscript.update_stock_qty = function(doc,cdt,cdn){
- d = locals[cdt][cdn]
- // Step 1:=> Check if qty , uom, conversion_factor
- if (d.qty && d.uom && d.conversion_factor){
- // Step 2:=> Set stock_qty = qty * conversion_factor
- d.stock_qty = flt(flt(d.qty) * flt(d.conversion_factor));
- // Step 3:=> Refer stock_qty field a that particular row.
- refresh_field('stock_qty' , d.name,fname);
- }
-}
-
-//==================== UOM ======================================================================
-cur_frm.cscript.uom = function(doc, cdt, cdn, args) {
- if(!args) args = {};
-
- // args passed can contain conversion_factor
- var d = locals[cdt][cdn];
- $.extend(args, {
- item_code: d.item_code,
- uom: d.uom,
- stock_qty: flt(d.stock_qty),
- });
-
- if(d.item_code && d.uom) {
- cur_frm.call({
- method: "buying.doctype.purchase_common.purchase_common.get_uom_details",
- args: { args: args },
- child: d,
- callback: function(r) {
- cur_frm.cscript.calc_amount(doc, 2);
- }
- });
- }
-}
-
-
-//==================== Conversion factor =========================================================
-cur_frm.cscript.conversion_factor = function(doc, cdt, cdn) {
- var item = locals[cdt][cdn];
-
- cur_frm.cscript.uom(doc, cdt, cdn, { conversion_factor: item.conversion_factor });
-}
-
-//==================== stock qty ======================================================================
-cur_frm.cscript.stock_qty = function(doc, cdt, cdn) {
- var d = locals[cdt][cdn];
- if(d.uom && d.qty){
- d.conversion_factor = flt(d.stock_qty)/flt(d.qty);
- refresh_field('conversion_factor', d.name, fname);
- }
-}
-
-//==================== Warehouse ================================================================
-cur_frm.cscript.warehouse = function(doc, cdt, cdn) {
- var d = locals[cdt][cdn];
- if (d.item_code && d.warehouse) {
- str_arg = "{'item_code':'" + (d.item_code?d.item_code:'') + "', 'warehouse':'" + (d.warehouse?d.warehouse:'') + "'}"
- get_server_fields('get_bin_details', str_arg, fname, doc, cdt, cdn, 1);
- }
-}
-
-//=================== Quantity ===================================================================
-cur_frm.cscript.qty = function(doc, cdt, cdn) {
- var d = locals[cdt][cdn];
- // Step 1: => Update Stock Qty
- cur_frm.cscript.update_stock_qty(doc,cdt,cdn);
- // Step 2: => Calculate Amount
- cur_frm.cscript.calc_amount(doc, 2);
-}
-
-
-//=================== Purchase Rate ==============================================================
-cur_frm.cscript.purchase_rate = function(doc, cdt, cdn) {
- cur_frm.cscript.calc_amount(doc, 2);
-}
-
-//==================== Import Rate ================================================================
-cur_frm.cscript.import_rate = function(doc, cdt, cdn) {
- cur_frm.cscript.calc_amount(doc, 1);
-}
-
-//==================== Discount Rate ================================================================
-cur_frm.cscript.discount_rate = function(doc, cdt, cdn) {
- cur_frm.cscript.calc_amount(doc, 4);
-}
-//==================== Purchase Ref Rate ================================================================
-cur_frm.cscript.purchase_ref_rate = function(doc, cdt, cdn) {
- cur_frm.cscript.calc_amount(doc, 4);
-}
-//==================== Import Ref Rate ================================================================
-cur_frm.cscript.import_ref_rate = function(doc, cdt, cdn) {
- cur_frm.cscript.calc_amount(doc, 5);
-}
-
-//==================== Validate ====================================================================
-cur_frm.cscript.validate = function(doc, cdt, cdn) {
- cur_frm.cscript.calc_amount(doc, 1);
-
- // calculate advances if pv
- if(doc.docstatus == 0 && doc.doctype == 'Purchase Invoice') calc_total_advance(doc, cdt, cdn);
-}
-
-// **************** RE-CALCULATE VALUES ***************************
-
-cur_frm.cscript.recalculate_values = function(doc, cdt, cdn) {
- cur_frm.cscript.calculate_tax(doc,cdt,cdn);
-}
-
-cur_frm.cscript.calculate_tax = function(doc, cdt, cdn) {
- var other_fname = cur_frm.cscript.other_fname;
-
- var cl = getchildren('Purchase Taxes and Charges', doc.name, other_fname, doc.doctype);
- for(var i = 0; i<cl.length; i++){
- cl[i].total_tax_amount = 0;
- cl[i].total_amount = 0;
- cl[i].tax_amount = 0; // this is done to calculate other charges
- cl[i].total = 0;
- if(in_list(['On Previous Row Amount','On Previous Row Total'],cl[i].charge_type) && !cl[i].row_id){
- alert("Please Enter Row on which amount needs to be calculated for row : "+cl[i].idx);
- validated = false;
- }
- }
- cur_frm.cscript.calc_amount(doc, 1);
-}
-
-
-
-cur_frm.cscript.get_item_wise_tax_detail = function( doc, rate, cl, i, tax, t) {
- doc = locals[doc.doctype][doc.name];
- var detail = '';
- detail = cl[i].item_code + " : " + cstr(rate) + NEWLINE;
- return detail;
-}
-
-cur_frm.cscript.amount = function(doc, cdt, cdn) {
- cur_frm.cscript.calc_amount(doc, 3);
-}
-
-
-//====================== Calculate Amount for PO and PR not for PV ============================================================
-cur_frm.cscript.calc_amount = function(doc, n) {
- // Set defaults
- doc = locals[doc.doctype][doc.name]
- var other_fname = cur_frm.cscript.other_fname;
- if(!flt(doc.conversion_rate)) { doc.conversion_rate = 1; refresh_field('conversion_rate'); }
- if(!n) n=0;
- var net_total = 0;
- var net_total_import = 0;
-
- var cl = getchildren(tname, doc.name, fname);
-
- for(var i=0;i<cl.length;i++)
- {
- var rate_fld = (doc.doctype != 'Purchase Invoice') ? 'purchase_rate': 'rate';
- var tmp = {};
- if(!cl[i].discount_rate) cl[i].discount_rate = 0;
-
- if(n == 1){
- set_multiple(tname, cl[i].name, {'purchase_ref_rate':flt(cl[i].import_ref_rate)*flt(doc.conversion_rate)}, fname);
- set_multiple(tname, cl[i].name, {
- 'discount_rate': flt(cl[i].import_ref_rate) ?
- flt(flt( flt( flt(cl[i].import_ref_rate) - flt(cl[i].import_rate) ) * 100 )/
- flt(cl[i].import_ref_rate)) : 0 }, fname);
- tmp[rate_fld] = flt(doc.conversion_rate) * flt(cl[i].import_rate);
- set_multiple(tname, cl[i].name, tmp, fname);
-
- set_multiple(tname, cl[i].name, {'amount': flt(flt(cl[i].qty) * flt(doc.conversion_rate) * flt(cl[i].import_rate))}, fname);
- set_multiple(tname, cl[i].name, {'import_amount': flt(flt(cl[i].qty) * flt(cl[i].import_rate))}, fname);
-
- }else if(n == 2){
- set_multiple(tname, cl[i].name, {'purchase_ref_rate':flt(cl[i].import_ref_rate)*flt(doc.conversion_rate)}, fname);
- set_multiple(tname, cl[i].name, {
- 'discount_rate': flt(cl[i].purchase_ref_rate) ?
- flt(flt( flt( flt(cl[i].purchase_ref_rate) - flt(cl[i][rate_fld]) ) * 100 )/
- flt(cl[i].purchase_ref_rate)) : 0 }, fname);
- set_multiple(tname, cl[i].name, {'amount': flt(flt(cl[i].qty) * flt(cl[i][rate_fld])),}, fname);
- set_multiple(tname, cl[i].name, {'import_rate': flt(flt(cl[i][rate_fld]) / flt(doc.conversion_rate)) }, fname);
- set_multiple(tname, cl[i].name, {'import_amount': flt(flt(cl[i].qty) * flt(cl[i][rate_fld]) / flt(doc.conversion_rate))}, fname);
-
- }else if(n == 3){
- tmp[rate_fld] = flt(flt(cl[i].amount) / flt(cl[i].qty));
- set_multiple(tname, cl[i].name, tmp, fname);
- set_multiple(tname, cl[i].name, {'import_rate': flt(flt(cl[i][rate_fld]) / flt(doc.conversion_rate))}, fname);
- set_multiple(tname, cl[i].name, {'import_amount': flt(flt(cl[i].qty) * flt(cl[i][rate_fld]) / flt(doc.conversion_rate))}, fname);
-
- }else if( n==4){
-
- set_multiple(tname, cl[i].name, {'import_ref_rate': flt(flt(cl[i].purchase_ref_rate) / flt(doc.conversion_rate))}, fname);
-
- tmp[rate_fld] = flt( flt(cl[i].purchase_ref_rate) - flt(flt(cl[i].purchase_ref_rate)*flt(cl[i].discount_rate)/100) )
- set_multiple(tname, cl[i].name, tmp, fname);
- set_multiple(tname, cl[i].name, {'import_rate': flt(flt(cl[i][rate_fld]) / flt(doc.conversion_rate))}, fname);
- set_multiple(tname, cl[i].name, {'amount':flt(flt(cl[i].qty) * flt(cl[i][rate_fld]))}, fname);
- set_multiple(tname, cl[i].name, {'import_amount': flt(flt(cl[i].qty) * flt(cl[i][rate_fld]) / flt(doc.conversion_rate))}, fname);
- }else if( n==5){
- tmp[rate_fld] = flt( flt(cl[i].import_ref_rate) - flt(flt(cl[i].import_ref_rate)*flt(cl[i].discount_rate)/100) ) * flt(doc.conversion_rate);
- set_multiple(tname, cl[i].name, {'purchase_ref_rate': flt(flt(cl[i].import_ref_rate) * flt(doc.conversion_rate))}, fname);
- set_multiple(tname, cl[i].name, tmp, fname);
- set_multiple(tname, cl[i].name, {'import_rate': flt(flt(cl[i][rate_fld]) / flt(doc.conversion_rate))}, fname);
- set_multiple(tname, cl[i].name, {'amount':flt(flt(cl[i].qty) * flt(cl[i][rate_fld]))}, fname);
- set_multiple(tname, cl[i].name, {'import_amount': flt(flt(cl[i].qty) * flt(cl[i][rate_fld]) / flt(doc.conversion_rate))}, fname);
- }
-
- if (n != 3){
- net_total += flt(flt(cl[i].qty) * flt(cl[i][rate_fld]));
- net_total_import += flt(flt(cl[i].qty) * flt(cl[i].import_rate));
- } else if(n == 3){
- net_total += flt(cl[i].amount);
- net_total_import += flt(cl[i].amount) / flt(doc.conversion_rate);
- }
- //update stock uom
- cur_frm.cscript.update_stock_qty(doc, tname, cl[i].name);
- }
- doc.net_total = flt(net_total) ;
- doc.net_total_import = flt(net_total_import) ;
- refresh_field('net_total');
- refresh_field('net_total_import');
-
- cur_frm.cscript.val_cal_charges(doc, tname, fname, other_fname);
-}
-
-
-//======== Function was broken away from cur_frm.cscript.calc_amount as PV has fieldname 'rate' instead of 'purchase_rate'===========
-cur_frm.cscript.val_cal_charges = function(doc, tname, fname, other_fname){
-
- doc = locals[doc.doctype][doc.name]
- if(flt(doc.net_total) > 0) {
- var cl = getchildren('Purchase Taxes and Charges', doc.name, other_fname,doc.doctype);
- for(var i = 0; i<cl.length; i++){
- cl[i].total_tax_amount = 0;
- cl[i].total_amount = 0;
- cl[i].tax_amount = 0; // this is done to calculate other charges
- cl[i].total = 0;
- cl[i].item_wise_tax_detail = "";
- if(in_list(['On Previous Row Amount','On Previous Row Total'],cl[i].charge_type) && !cl[i].row_id){
- alert("Please Enter Row on which amount needs to be calculated for row : "+cl[i].idx);
- validated = false;
- }
- }
- cur_frm.cscript.calc_other_charges(doc , tname , fname , other_fname); // calculate other charges
- }
- cur_frm.cscript.calc_doc_values(doc, tname, fname, other_fname); // calculates total amounts
-
- refresh_many(['net_total', 'grand_total', 'rounded_total', 'grand_total_import', 'rounded_total_import', 'in_words', 'in_words_import', 'purchase_tax_details', 'total_tax', 'other_charges_added', 'other_charges_deducted', 'net_total_import', 'other_charges_added_import', 'other_charges_deducted_import']);
-
-}
-
-
-// ******************************* OTHER CHARGES *************************************
-cur_frm.cscript.calc_other_charges = function(doc , tname , fname , other_fname) {
- doc = locals[doc.doctype][doc.name];
- // make display area
- // ------------------
-
-
- cur_frm.fields_dict['tax_calculation'].disp_area.innerHTML = '<b style="padding: 8px 0px;">Calculation Details for Taxes, Charges and Landed Cost:</b>';
- var cl = getchildren(tname, doc.name, fname);
- var tax = getchildren('Purchase Taxes and Charges', doc.name, other_fname,doc.doctype);
- // make display table
- // ------------------
- var otc = make_table(cur_frm.fields_dict['tax_calculation'].disp_area, cl.length + 1, tax.length + 1, '90%',[],{border:'1px solid #AAA',padding:'2px'});
- $y(otc,{marginTop:'8px'});
-
- var tax_desc = {}; var tax_desc_rates = []; var net_total = 0;
-
-
- for(var i=0;i<cl.length;i++) {
- var item_tax = 0;
- if(doc.doctype != 'Purchase Invoice') net_total += flt(flt(cl[i].qty) * flt(cl[i].purchase_rate));
- else if(doc.doctype == 'Purchase Invoice') net_total += flt(flt(cl[i].qty) * flt(cl[i].rate));
-
- var prev_total = flt(cl[i].amount);
- if(cl[i].item_tax_rate) {
- try {
- var check_tax = JSON.parse(cl[i].item_tax_rate); //to get in dictionary
- } catch(exception) {
- var check_tax = eval('var a='+cl[i].item_tax_rate+';a'); //to get in dictionary
- }
- }
-
- // Add Item Code in new Row
- //--------------------------
- $td(otc,i+1,0).innerHTML = cl[i].item_code;
-
- var total = net_total;
- for(var t=0;t<tax.length;t++){
-
- var account = tax[t].account_head;
- $td(otc,0,t+1).innerHTML = account?account:'';
- //Check For Rate
- if(cl[i].item_tax_rate && check_tax[account]!=null) {
- rate = flt(check_tax[account]);
- } else {
- // if particular item doesn't have particular rate it will take other charges rate
- rate = flt(tax[t].rate);
- }
-
- //Check For Rate and get tax amount
- var tax_amount = cur_frm.cscript.check_charge_type_and_get_tax_amount(doc,tax,t, cl[i], rate);
-
- //enter item_wise_tax_detail i.e. tax rate on each item
-
- item_wise_tax_detail = cur_frm.cscript.get_item_wise_tax_detail( doc, rate, cl, i, tax, t);
-
-
- if(tax[t].add_deduct_tax == 'Add'){
- // this is calculation part for all types
- if(tax[t].charge_type != "Actual") tax[t].item_wise_tax_detail += item_wise_tax_detail;
- tax[t].total_amount = flt(tax_amount); //stores actual tax amount in virtual field
- tax[t].total_tax_amount = flt(prev_total); //stores total amount in virtual field
- tax[t].tax_amount += flt(tax_amount);
- var total_amount = flt(tax[t].tax_amount);
- total_tax_amount = flt(tax[t].total_tax_amount) + flt(total_amount);
- if(tax[t].category != "Valuation"){
- set_multiple('Purchase Taxes and Charges', tax[t].name, { 'item_wise_tax_detail':tax[t].item_wise_tax_detail, 'amount':roundNumber(total_amount, 2), 'total':roundNumber(flt(total)+flt(tax[t].tax_amount), 2)}, other_fname);
- prev_total += flt(tax[t].total_amount);
- total += flt(tax[t].tax_amount); // for adding total to previous amount
- }
- else{
- set_multiple('Purchase Taxes and Charges', tax[t].name, { 'item_wise_tax_detail':tax[t].item_wise_tax_detail, 'amount':roundNumber(total_amount, 2), 'total':roundNumber(flt(total), 2)}, other_fname);
- prev_total = prev_total;
- }
- //prev_total += flt(tax[t].total_amount); // for previous row total
-
- if(tax[t].charge_type == 'Actual')
- $td(otc,i+1,t+1).innerHTML = format_currency(tax[t].total_amount, erpnext.get_currency(doc.company));
- else
- $td(otc,i+1,t+1).innerHTML = '('+fmt_money(rate) + '%) ' +format_currency(tax[t].total_amount, erpnext.get_currency(doc.company));
-
- if (tax[t].category != "Total"){
- item_tax += tax[t].total_amount;
- }
- }
- else if(tax[t].add_deduct_tax == 'Deduct'){
- // this is calculation part for all types
- if(tax[t].charge_type != "Actual") tax[t].item_wise_tax_detail += item_wise_tax_detail;
- tax[t].total_amount = flt(tax_amount); //stores actual tax amount in virtual field
- tax[t].total_tax_amount = flt(prev_total); //stores total amount in virtual field
- tax[t].tax_amount += flt(tax_amount);
- var total_amount = flt(tax[t].tax_amount);
- total_tax_amount = flt(tax[t].total_tax_amount) - flt(total_amount);
- if(tax[t].category != "Valuation"){
- set_multiple('Purchase Taxes and Charges', tax[t].name, { 'item_wise_tax_detail':tax[t].item_wise_tax_detail, 'tax_amount':roundNumber(total_amount, 2), 'total':roundNumber(flt(total)-flt(tax[t].tax_amount), 2)}, other_fname);
- prev_total -= flt(tax[t].total_amount);
- total -= flt(tax[t].tax_amount); // for adding total to previous amount
- }
- else{
- set_multiple('Purchase Taxes and Charges', tax[t].name, { 'item_wise_tax_detail':tax[t].item_wise_tax_detail, 'tax_amount':roundNumber(total_amount, 2), 'total':roundNumber(flt(total), 2)}, other_fname);
- prev_total = prev_total;
- }
- //prev_total += flt(tax[t].total_amount); // for previous row total
-
- if(tax[t].charge_type == 'Actual')
- $td(otc,i+1,t+1).innerHTML = format_currency(tax[t].total_amount, erpnext.get_currency(doc.company));
- else
- $td(otc,i+1,t+1).innerHTML = '('+fmt_money(rate) + '%) ' +format_currency(tax[t].total_amount, erpnext.get_currency(doc.company));
-
- if (tax[t].category != "Total"){
- item_tax -= tax[t].total_amount;
- }
- }
-
-
- }
- set_multiple(tname, cl[i].name, {'item_tax_amount': item_tax }, fname);
- }
- for(var t=0;t<tax.length;t++){
- tax[t].tax_amount = roundNumber(tax[t].tax_amount, 2);
- }
-}
-
-
-cur_frm.cscript.check_charge_type_and_get_tax_amount = function(doc, tax, t, cl, rate, print_amt) {
- doc = locals[doc.doctype][doc.name];
-
- var tax_amount = 0;
- if(tax[t].charge_type == 'Actual') {
- var value = flt(tax[t].rate) / flt(doc.net_total); // this give the ratio in which all items are divided
- return tax_amount = flt(value) * flt(cl.amount);
- }
- else if(tax[t].charge_type == 'On Net Total') {
- return tax_amount = (flt(rate) * flt(cl.amount) / 100);
- }
- else if(tax[t].charge_type == 'On Previous Row Amount'){
- var row_no = (tax[t].row_id).toString();
- var row = (row_no).split("+"); // splits the values and stores in an array
- for(var r = 0;r<row.length;r++){
- var id = cint(row[r].replace(/^\s+|\s+$/g,""));
- tax_amount += (flt(rate) * flt(tax[id-1].total_amount) / 100);
- }
- var row_id = row_no.indexOf("/");
- if(row_id != -1) {
- rate = '';
- var row = (row_no).split("/"); // splits the values and stores in an array
- if(row.length>2) alert("You cannot enter more than 2 nos. for division");
- var id1 = cint(row[0].replace(/^\s+|\s+$/g,""));
- var id2 = cint(row[1].replace(/^\s+|\s+$/g,""));
- tax_amount = flt(tax[id1-1].total_amount) / flt(tax[id2-1].total_amount);
- }
- return tax_amount
- }
- else if(tax[t].charge_type == 'On Previous Row Total') {
- var row = cint(tax[t].row_id);
- if(tax[row-1].add_deduct_tax == 'Add'){
- return tax_amount = flt(rate) * (flt(tax[row-1].total_tax_amount)+flt(tax[row-1].total_amount)) / 100;
- }
- else if(tax[row-1].add_deduct_tax == 'Deduct'){
- return tax_amount = flt(rate) * (flt(tax[row-1].total_tax_amount)-flt(tax[row-1].total_amount)) / 100;
- }
- }
-}
-
-// ******* Calculation of total amounts of document (item amount + other charges)****************
-cur_frm.cscript.calc_doc_values = function(doc, tname, fname, other_fname) {
- doc = locals[doc.doctype][doc.name];
- var net_total = 0; var total_tax = 0; var other_charges_added = 0;
- var other_charges_deducted = 0;
- var cl = getchildren(tname, doc.name, fname);
- for(var i = 0; i<cl.length; i++){
- net_total += flt(cl[i].amount);
- }
- var d = getchildren('Purchase Taxes and Charges', doc.name, other_fname,doc.doctype);
- for(var j = 0; j<d.length; j++){
- if(d[j].category != 'Valuation'){
-
- if(d[j].add_deduct_tax == 'Add'){
- other_charges_added += flt(d[j].tax_amount);
- total_tax += flt(d[j].tax_amount);
- }
- if(d[j].add_deduct_tax == 'Deduct'){
- other_charges_deducted += flt(d[j].tax_amount);
- total_tax -= flt(d[j].tax_amount);
- }
- }
- }
- doc.net_total = flt(net_total);
- doc.total_tax = flt(total_tax);
-
- doc.other_charges_added = roundNumber(flt(other_charges_added), 2);
- doc.other_charges_deducted = roundNumber(flt(other_charges_deducted), 2);
- doc.grand_total = roundNumber(flt(flt(net_total) + flt(other_charges_added) - flt(other_charges_deducted)), 2);
- doc.rounded_total = Math.round(doc.grand_total);
- doc.net_total_import = roundNumber(flt(flt(net_total) / flt(doc.conversion_rate)), 2);
- doc.other_charges_added_import = roundNumber(flt(flt(other_charges_added) / flt(doc.conversion_rate)), 2);
- doc.other_charges_deducted_import = roundNumber(flt(flt(other_charges_deducted) / flt(doc.conversion_rate)), 2);
- doc.grand_total_import = roundNumber(flt(flt(doc.grand_total) / flt(doc.conversion_rate)), 2);
- doc.rounded_total_import = Math.round(doc.grand_total_import);
-
- refresh_many(['net_total','total_taxes','grand_total']);
-
-
- if(doc.doctype == 'Purchase Invoice'){
- calculate_outstanding(doc);
- }
-}
-
-var calculate_outstanding = function(doc) {
- // total amount to pay
- doc.total_amount_to_pay = flt(doc.grand_total) - flt(doc.write_off_amount);
-
- // outstanding amount
- if(doc.docstatus==0) doc.outstanding_amount = doc.total_amount_to_pay - flt(doc.total_advance);
-
- refresh_many(['total_amount_to_pay', 'outstanding_amount']);
-}
-
-
-cur_frm.cscript.project_name = function(doc, cdt, cdn) {
- var item_doc = locals[cdt][cdn];
- if (item_doc.project_name) {
- $.each(getchildren(cur_frm.cscript.tname, doc.name, cur_frm.cscript.fname, doc.doctype),
- function(i, v) {
- if (v && !v.project_name) v.project_name = item_doc.project_name;
- });
- refresh_field(cur_frm.cscript.fname);
- }
-}
-
-cur_frm.fields_dict.supplier && (cur_frm.fields_dict.supplier.get_query = erpnext.utils.supplier_query);
\ No newline at end of file
+var fname = cur_frm.cscript.fname;
\ No newline at end of file
diff --git a/buying/doctype/purchase_common/purchase_common.py b/buying/doctype/purchase_common/purchase_common.py
index 2b6ca27..6d2baf6 100644
--- a/buying/doctype/purchase_common/purchase_common.py
+++ b/buying/doctype/purchase_common/purchase_common.py
@@ -69,17 +69,6 @@
msgprint(_("Hey there! You need to put at least one item in \
the item table."), raise_exception=True)
-
- def get_default_schedule_date( self, obj):
- for d in getlist( obj.doclist, obj.fname):
- item = sql("select lead_time_days from `tabItem` where name = '%s' and (ifnull(end_of_life,'')='' or end_of_life = '0000-00-00' or end_of_life > now())" % cstr(d.item_code) , as_dict = 1)
- ltd = item and cint(item[0]['lead_time_days']) or 0
- if ltd and obj.doc.transaction_date:
- if d.fields.has_key('lead_time_date') or obj.doc.doctype == 'Material Request':
- d.lead_time_date = cstr(add_days( obj.doc.transaction_date, cint(ltd)))
- if not d.fields.has_key('prevdoc_docname') or (d.fields.has_key('prevdoc_docname') and not d.prevdoc_docname):
- d.schedule_date = cstr( add_days( obj.doc.transaction_date, cint(ltd)))
-
# Client Trigger functions
#------------------------------------------------------------------------------------------------
@@ -99,13 +88,6 @@
msgprint("Supplier : %s does not exists" % (name))
raise Exception
- # Get TERMS AND CONDITIONS
- # =======================================================================================
- def get_tc_details(self,obj):
- r = sql("select terms from `tabTerms and Conditions` where name = %s", obj.doc.tc_name)
- if r: obj.doc.terms = r[0][0]
-
-
# Get Available Qty at Warehouse
def get_bin_details( self, arg = ''):
arg = eval(arg)
@@ -213,10 +195,11 @@
msgprint("Please check Item %s is not present in %s %s ." % (d.item_code, d.prevdoc_doctype, d.prevdoc_docname))
raise Exception
- # Check if Warehouse has been modified.
- if not cstr(data[0]['warehouse']) == cstr(d.warehouse):
- msgprint("Please check warehouse %s of Item %s which is not present in %s %s ." % (d.warehouse, d.item_code, d.prevdoc_doctype, d.prevdoc_docname))
- raise Exception
+ if cstr(data[0]['warehouse']) and \
+ not cstr(data[0]['warehouse']) == cstr(d.warehouse):
+ msgprint("""Please check warehouse %s of Item %s
+ which is not present in %s %s""" % (d.warehouse, d.item_code,
+ d.prevdoc_doctype, d.prevdoc_docname), raise_exception=1)
# Check if UOM has been modified.
if not cstr(data[0]['uom']) == cstr(d.uom) and not cstr(d.prevdoc_doctype) == 'Material Request':
@@ -404,39 +387,6 @@
msgprint("'%s' Not Within The Fiscal Year"%(dn))
raise Exception
- def load_default_taxes(self, obj):
- return self.get_purchase_tax_details(obj, 1)
-
- def get_purchase_tax_details(self,obj, default = 0):
- obj.doclist = self.doc.clear_table(obj.doclist,'purchase_tax_details')
-
- if default: add_cond = " and ifnull(t2.is_default,0) = 1"
- else: add_cond = " and t1.parent = '"+cstr(obj.doc.purchase_other_charges)+"'"
-
- other_charge = sql("""
- select t1.*
- from `tabPurchase Taxes and Charges` t1, `tabPurchase Taxes and Charges Master` t2
- where t1.parent = t2.name %s
- order by t1.idx
- """% add_cond, as_dict = 1)
-
- idx = 0
- for other in other_charge:
- d = addchild(obj.doc, 'purchase_tax_details', 'Purchase Taxes and Charges',
- obj.doclist)
- d.category = other['category']
- d.add_deduct_tax = other['add_deduct_tax']
- d.charge_type = other['charge_type']
- d.row_id = other['row_id']
- d.description = other['description']
- d.account_head = other['account_head']
- d.rate = flt(other['rate'])
- d.tax_amount = flt(other['tax_amount'])
- d.cost_center = other["cost_center"]
- d.idx = idx
- idx += 1
- return obj.doclist
-
def get_rate(self, arg, obj):
arg = eval(arg)
rate = sql("select account_type, tax_rate from `tabAccount` where name = '%s'" %(arg['account_head']), as_dict=1)
@@ -449,27 +399,3 @@
if d.prevdoc_doctype and d.prevdoc_docname:
dt = sql("select transaction_date from `tab%s` where name = '%s'" % (d.prevdoc_doctype, d.prevdoc_docname))
d.prevdoc_date = dt and dt[0][0].strftime('%Y-%m-%d') or ''
-
-@webnotes.whitelist()
-def get_uom_details(args=None):
- """fetches details on change of UOM"""
- if not args:
- return {}
-
- if isinstance(args, basestring):
- import json
- args = json.loads(args)
-
- uom = webnotes.conn.sql("""select conversion_factor
- from `tabUOM Conversion Detail` where parent = %s and uom = %s""",
- (args['item_code'], args['uom']), as_dict=1)
-
- if not uom: return {}
-
- conversion_factor = args.get("conversion_factor") or \
- flt(uom[0]["conversion_factor"])
-
- return {
- "conversion_factor": conversion_factor,
- "qty": flt(args["stock_qty"]) / conversion_factor,
- }
diff --git a/buying/doctype/purchase_order/README.md b/buying/doctype/purchase_order/README.md
new file mode 100644
index 0000000..992377d
--- /dev/null
+++ b/buying/doctype/purchase_order/README.md
@@ -0,0 +1 @@
+Confirmed order to Supplier to deliver certain Items.
\ No newline at end of file
diff --git a/buying/doctype/purchase_order/purchase_order.js b/buying/doctype/purchase_order/purchase_order.js
index afe4741..64aa913 100644
--- a/buying/doctype/purchase_order/purchase_order.js
+++ b/buying/doctype/purchase_order/purchase_order.js
@@ -21,8 +21,8 @@
cur_frm.cscript.other_fname = "purchase_tax_details";
wn.require('app/accounts/doctype/purchase_taxes_and_charges_master/purchase_taxes_and_charges_master.js');
-wn.require('app/buying/doctype/purchase_common/purchase_common.js');
wn.require('app/utilities/doctype/sms_control/sms_control.js');
+wn.require('app/buying/doctype/purchase_common/purchase_common.js');
erpnext.buying.PurchaseOrderController = erpnext.buying.BuyingController.extend({
refresh: function(doc, cdt, cdn) {
@@ -39,54 +39,10 @@
cur_frm.add_custom_button('Unstop Purchase Order', cur_frm.cscript['Unstop Purchase Order']);
},
-
- onload_post_render: function(doc, dt, dn) {
- var me = this;
- var callback1 = function(doc, dt, dn) {
- var callback2 = function(doc, dt, dn) {
- if(doc.__islocal) cur_frm.cscript.get_default_schedule_date(doc);
- }
- me.update_item_details(doc, dt, dn, callback2);
- }
-
- // TODO: improve this
- if(this.frm.doc.__islocal) {
- if (this.frm.fields_dict.price_list_name && this.frm.doc.price_list_name) {
- this.price_list_name(callback1);
- } else {
- callback1(doc, dt, dn);
- }
- }
- }
-
});
-var new_cscript = new erpnext.buying.PurchaseOrderController({frm: cur_frm});
-
// for backward compatibility: combine new and previous states
-$.extend(cur_frm.cscript, new_cscript);
-
-cur_frm.cscript.onload = function(doc, cdt, cdn) {
- // set missing values in parent doc
- set_missing_values(doc, {
- fiscal_year: sys_defaults.fiscal_year,
- conversion_rate: 1,
- currency: sys_defaults.currency,
- status: "Draft",
- transaction_date: get_today(),
- is_subcontracted: "No"
- });
-}
-
-cur_frm.cscript.supplier = function(doc,dt,dn) {
- if (doc.supplier) {
- get_server_fields('get_default_supplier_address',
- JSON.stringify({ supplier: doc.supplier }),'', doc, dt, dn, 1, function() {
- cur_frm.refresh();
- });
- $(cur_frm.fields_dict.contact_section.row.wrapper).toggle(true);
- }
-}
+$.extend(cur_frm.cscript, new erpnext.buying.PurchaseOrderController({frm: cur_frm}));
cur_frm.cscript.supplier_address = cur_frm.cscript.contact_person = function(doc,dt,dn) {
if(doc.supplier) get_server_fields('get_supplier_address', JSON.stringify({supplier: doc.supplier, address: doc.supplier_address, contact: doc.contact_person}),'', doc, dt, dn, 1);
@@ -111,10 +67,6 @@
locals['Contact'][dn].supplier_name = locals[cur_frm.doctype][cur_frm.docname].supplier_name;
}
-cur_frm.cscript.transaction_date = function(doc,cdt,cdn){
- if(doc.__islocal){ cur_frm.cscript.get_default_schedule_date(doc); }
-}
-
cur_frm.fields_dict['po_details'].grid.get_field('project_name').get_query = function(doc, cdt, cdn) {
return 'SELECT `tabProject`.name FROM `tabProject` \
WHERE `tabProject`.status not in ("Completed", "Cancelled") \
diff --git a/buying/doctype/purchase_order/purchase_order.py b/buying/doctype/purchase_order/purchase_order.py
index 218d4bf..908df67 100644
--- a/buying/doctype/purchase_order/purchase_order.py
+++ b/buying/doctype/purchase_order/purchase_order.py
@@ -65,10 +65,6 @@
self.validate_for_subcontracting()
self.update_raw_materials_supplied("po_raw_material_details")
-
- def get_default_schedule_date(self):
- get_obj(dt = 'Purchase Common').get_default_schedule_date(self)
-
def validate_fiscal_year(self):
get_obj(dt = 'Purchase Common').validate_fiscal_year(self.doc.fiscal_year,self.doc.transaction_date,'PO Date')
@@ -101,16 +97,11 @@
"""[['Supplier Quotation', 'Purchase Order'],
['Supplier Quotation Item', 'Purchase Order Item'],
['Purchase Taxes and Charges', 'Purchase Taxes and Charges']]""")
- self.get_default_schedule_date()
for d in getlist(self.doclist, 'po_details'):
if d.prevdoc_detail_docname and not d.schedule_date:
d.schedule_date = webnotes.conn.get_value("Material Request Item",
d.prevdoc_detail_docname, "schedule_date")
- def get_tc_details(self):
- """get terms & conditions"""
- return get_obj('Purchase Common').get_tc_details(self)
-
def get_last_purchase_rate(self):
get_obj('Purchase Common').get_last_purchase_rate(self)
@@ -233,10 +224,4 @@
pass
def get_rate(self,arg):
- return get_obj('Purchase Common').get_rate(arg,self)
-
- def load_default_taxes(self):
- self.doclist = get_obj('Purchase Common').load_default_taxes(self)
-
- def get_purchase_tax_details(self):
- self.doclist = get_obj('Purchase Common').get_purchase_tax_details(self)
+ return get_obj('Purchase Common').get_rate(arg,self)
\ No newline at end of file
diff --git a/buying/doctype/purchase_order/purchase_order.txt b/buying/doctype/purchase_order/purchase_order.txt
index 8a56f26..b78552f 100644
--- a/buying/doctype/purchase_order/purchase_order.txt
+++ b/buying/doctype/purchase_order/purchase_order.txt
@@ -1,8 +1,8 @@
[
{
- "creation": "2013-03-25 16:01:24",
+ "creation": "2013-05-21 16:16:39",
"docstatus": 0,
- "modified": "2013-02-18 13:37:11",
+ "modified": "2013-06-11 16:05:08",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -31,7 +31,9 @@
"parent": "Purchase Order",
"parentfield": "permissions",
"parenttype": "DocType",
- "read": 1
+ "permlevel": 0,
+ "read": 1,
+ "report": 1
},
{
"doctype": "DocType",
@@ -65,43 +67,48 @@
"search_index": 1
},
{
+ "depends_on": "supplier",
"doctype": "DocField",
"fieldname": "supplier_name",
"fieldtype": "Data",
- "hidden": 1,
+ "hidden": 0,
"in_list_view": 1,
"label": "Name",
"read_only": 1
},
{
+ "depends_on": "supplier",
"doctype": "DocField",
"fieldname": "address_display",
"fieldtype": "Small Text",
- "hidden": 1,
+ "hidden": 0,
"label": "Address",
"read_only": 1
},
{
+ "depends_on": "supplier",
"doctype": "DocField",
"fieldname": "contact_display",
"fieldtype": "Small Text",
- "hidden": 1,
+ "hidden": 0,
"label": "Contact",
"read_only": 1
},
{
+ "depends_on": "supplier",
"doctype": "DocField",
"fieldname": "contact_mobile",
"fieldtype": "Text",
- "hidden": 1,
+ "hidden": 0,
"label": "Mobile No",
"read_only": 1
},
{
+ "depends_on": "supplier",
"doctype": "DocField",
"fieldname": "contact_email",
"fieldtype": "Text",
- "hidden": 1,
+ "hidden": 0,
"label": "Contact Email",
"print_hide": 1,
"read_only": 1
@@ -533,17 +540,7 @@
"fieldname": "get_terms",
"fieldtype": "Button",
"label": "Get Terms and Conditions",
- "oldfieldtype": "Button",
- "options": "get_tc_details"
- },
- {
- "doctype": "DocField",
- "fieldname": "terms_html",
- "fieldtype": "HTML",
- "label": "Terms and Conditions HTML",
- "oldfieldtype": "HTML",
- "options": "You can add Terms and Notes that will be printed in the Transaction",
- "print_hide": 1
+ "oldfieldtype": "Button"
},
{
"doctype": "DocField",
@@ -554,6 +551,7 @@
"oldfieldtype": "Text Editor"
},
{
+ "depends_on": "supplier",
"doctype": "DocField",
"fieldname": "contact_section",
"fieldtype": "Section Break",
@@ -650,18 +648,6 @@
"report_hide": 0
},
{
- "description": "The date at which current entry is corrected in the system.",
- "doctype": "DocField",
- "fieldname": "amendment_date",
- "fieldtype": "Date",
- "hidden": 0,
- "label": "Amendment Date",
- "no_copy": 1,
- "oldfieldname": "amendment_date",
- "oldfieldtype": "Date",
- "print_hide": 1
- },
- {
"description": "Select the relevant company name if you have multiple companies",
"doctype": "DocField",
"fieldname": "company",
@@ -769,19 +755,6 @@
"print_hide": 1
},
{
- "depends_on": "eval:!doc.__islocal",
- "doctype": "DocField",
- "fieldname": "cancel_reason",
- "fieldtype": "Data",
- "hidden": 0,
- "label": "Cancel Reason",
- "no_copy": 1,
- "oldfieldname": "cancel_reason",
- "oldfieldtype": "Data",
- "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",
@@ -808,43 +781,15 @@
"cancel": 0,
"create": 0,
"doctype": "DocPerm",
- "match": "",
- "permlevel": 1,
- "report": 0,
"role": "Material User",
"submit": 0,
"write": 0
},
{
- "amend": 0,
- "cancel": 0,
- "create": 0,
- "doctype": "DocPerm",
- "permlevel": 0,
- "report": 1,
- "role": "Material User",
- "submit": 0,
- "write": 0
- },
- {
- "amend": 0,
- "cancel": 0,
- "create": 0,
- "doctype": "DocPerm",
- "match": "",
- "permlevel": 1,
- "report": 0,
- "role": "Purchase Manager",
- "submit": 0,
- "write": 0
- },
- {
"amend": 1,
"cancel": 1,
"create": 1,
"doctype": "DocPerm",
- "permlevel": 0,
- "report": 1,
"role": "Purchase Manager",
"submit": 1,
"write": 1
@@ -854,28 +799,13 @@
"cancel": 1,
"create": 1,
"doctype": "DocPerm",
- "match": "",
- "permlevel": 0,
- "report": 1,
"role": "Purchase User",
"submit": 1,
"write": 1
},
{
- "amend": 0,
- "cancel": 0,
- "create": 0,
- "doctype": "DocPerm",
- "match": "",
- "permlevel": 1,
- "role": "All",
- "submit": 0
- },
- {
"doctype": "DocPerm",
"match": "supplier",
- "permlevel": 0,
- "report": 1,
"role": "Supplier"
}
]
\ No newline at end of file
diff --git a/buying/doctype/purchase_order_item/README.md b/buying/doctype/purchase_order_item/README.md
new file mode 100644
index 0000000..b05ac1d
--- /dev/null
+++ b/buying/doctype/purchase_order_item/README.md
@@ -0,0 +1 @@
+Item details (qty, rate etc.) for parent Purchase Order.
\ No newline at end of file
diff --git a/buying/doctype/purchase_order_item/purchase_order_item.txt b/buying/doctype/purchase_order_item/purchase_order_item.txt
index 01a144a..c561ed1 100755
--- a/buying/doctype/purchase_order_item/purchase_order_item.txt
+++ b/buying/doctype/purchase_order_item/purchase_order_item.txt
@@ -1,8 +1,8 @@
[
{
- "creation": "2013-03-07 11:42:55",
+ "creation": "2013-05-24 19:29:06",
"docstatus": 0,
- "modified": "2013-05-22 11:59:52",
+ "modified": "2013-05-31 14:26:22",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -361,7 +361,7 @@
"oldfieldtype": "Currency",
"print_hide": 1,
"print_width": "100px",
- "read_only": 0,
+ "read_only": 1,
"width": "100px"
},
{
@@ -377,15 +377,12 @@
"read_only": 1
},
{
- "default": "0.00",
"doctype": "DocField",
- "fieldname": "billed_qty",
- "fieldtype": "Float",
- "hidden": 0,
- "label": "Billed Quantity",
+ "fieldname": "billed_amt",
+ "fieldtype": "Currency",
+ "label": "Billed Amt",
"no_copy": 1,
- "oldfieldname": "billed_qty",
- "oldfieldtype": "Currency",
+ "options": "currency",
"print_hide": 1,
"read_only": 1
},
diff --git a/buying/doctype/purchase_order_item_supplied/README.md b/buying/doctype/purchase_order_item_supplied/README.md
new file mode 100644
index 0000000..37f92bd
--- /dev/null
+++ b/buying/doctype/purchase_order_item_supplied/README.md
@@ -0,0 +1 @@
+Raw material (if any) supplied along with Purchase Order.
\ No newline at end of file
diff --git a/buying/doctype/purchase_receipt_item_supplied/README.md b/buying/doctype/purchase_receipt_item_supplied/README.md
new file mode 100644
index 0000000..039a6b4
--- /dev/null
+++ b/buying/doctype/purchase_receipt_item_supplied/README.md
@@ -0,0 +1 @@
+Details of Items supplied when receiving purchases via Purchase Receipt.
\ No newline at end of file
diff --git a/buying/doctype/quality_inspection/README.md b/buying/doctype/quality_inspection/README.md
new file mode 100644
index 0000000..3a6a4c9
--- /dev/null
+++ b/buying/doctype/quality_inspection/README.md
@@ -0,0 +1 @@
+Incoming quality inspection for received Items.
\ No newline at end of file
diff --git a/buying/doctype/quality_inspection/quality_inspection.txt b/buying/doctype/quality_inspection/quality_inspection.txt
index 60ede70..1017753 100644
--- a/buying/doctype/quality_inspection/quality_inspection.txt
+++ b/buying/doctype/quality_inspection/quality_inspection.txt
@@ -2,7 +2,7 @@
{
"creation": "2013-04-30 13:13:03",
"docstatus": 0,
- "modified": "2013-05-09 14:34:10",
+ "modified": "2013-06-11 16:05:29",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -214,17 +214,6 @@
},
{
"doctype": "DocField",
- "fieldname": "amendment_date",
- "fieldtype": "Date",
- "label": "Amendment Date",
- "no_copy": 1,
- "oldfieldname": "amendment_date",
- "oldfieldtype": "Date",
- "print_hide": 1,
- "read_only": 1
- },
- {
- "doctype": "DocField",
"fieldname": "specification_details",
"fieldtype": "Section Break",
"label": "Specification Details",
diff --git a/buying/doctype/quality_inspection_reading/README.md b/buying/doctype/quality_inspection_reading/README.md
new file mode 100644
index 0000000..8fad6c9
--- /dev/null
+++ b/buying/doctype/quality_inspection_reading/README.md
@@ -0,0 +1 @@
+Parameter reading for quality inspection of particular Item.
\ No newline at end of file
diff --git a/buying/doctype/supplier/README.md b/buying/doctype/supplier/README.md
new file mode 100644
index 0000000..92a1f86
--- /dev/null
+++ b/buying/doctype/supplier/README.md
@@ -0,0 +1 @@
+Supplier (vendor) master.
\ No newline at end of file
diff --git a/buying/doctype/supplier/supplier.py b/buying/doctype/supplier/supplier.py
index f506439..a03ba33 100644
--- a/buying/doctype/supplier/supplier.py
+++ b/buying/doctype/supplier/supplier.py
@@ -57,9 +57,6 @@
# update credit days and limit in account
self.update_credit_days_limit()
-
- def check_state(self):
- return "\n" + "\n".join([i[0] for i in sql("select state_name from `tabState` where `tabState`.country='%s' " % self.doc.country)])
def get_payables_group(self):
g = sql("select payables_group from tabCompany where name=%s", self.doc.company)
diff --git a/buying/doctype/supplier_quotation/README.md b/buying/doctype/supplier_quotation/README.md
new file mode 100644
index 0000000..65f94f2
--- /dev/null
+++ b/buying/doctype/supplier_quotation/README.md
@@ -0,0 +1 @@
+Quotation sent by Supplier with price, qty and terms.
\ No newline at end of file
diff --git a/buying/doctype/supplier_quotation/supplier_quotation.js b/buying/doctype/supplier_quotation/supplier_quotation.js
index 1e4f6cb..20a20ac 100644
--- a/buying/doctype/supplier_quotation/supplier_quotation.js
+++ b/buying/doctype/supplier_quotation/supplier_quotation.js
@@ -26,48 +26,15 @@
erpnext.buying.SupplierQuotationController = erpnext.buying.BuyingController.extend({
refresh: function() {
this._super();
-
if (this.frm.doc.docstatus === 1) {
cur_frm.add_custom_button("Make Purchase Order", cur_frm.cscript.make_purchase_order);
}
- },
-
- onload_post_render: function(doc, dt, dn) {
- var me = this;
- var callback = function(doc, dt, dn) {
- cur_frm.cscript.load_taxes(me.frm.doc);
- }
-
- // TODO: improve this
- if(this.frm.doc.__islocal) {
- if (this.frm.fields_dict.price_list_name && this.frm.doc.price_list_name) {
- this.price_list_name(callback);
- } else {
- callback(doc, dt, dn);
- }
- }
- }
-
+ },
});
-var new_cscript = new erpnext.buying.SupplierQuotationController({frm: cur_frm});
-
// for backward compatibility: combine new and previous states
-$.extend(cur_frm.cscript, new_cscript);
-
-
-cur_frm.cscript.onload = function(doc, dt, dn) {
- // set missing values in parent doc
- set_missing_values(doc, {
- fiscal_year: sys_defaults.fiscal_year,
- conversion_rate: 1,
- currency: sys_defaults.currency,
- status: "Draft",
- transaction_date: get_today(),
- is_subcontracted: "No"
- });
-}
+$.extend(cur_frm.cscript, new erpnext.buying.SupplierQuotationController({frm: cur_frm}));
cur_frm.cscript.make_purchase_order = function() {
var new_po_name = wn.model.make_new_doc_and_get_name("Purchase Order");
@@ -82,15 +49,6 @@
}, function(r, rt) { loaddoc("Purchase Order", new_po_name) });
}
-cur_frm.cscript.supplier = function(doc, dt, dn) {
- if (doc.supplier) {
- get_server_fields('get_default_supplier_address',
- JSON.stringify({ supplier: doc.supplier }), '', doc, dt, dn, 1,
- function() { cur_frm.refresh(); });
- cur_frm.cscript.toggle_contact_section(doc);
- }
-}
-
cur_frm.cscript.uom = function(doc, cdt, cdn) {
// no need to trigger updation of stock uom, as this field doesn't exist in supplier quotation
}
diff --git a/buying/doctype/supplier_quotation/supplier_quotation.py b/buying/doctype/supplier_quotation/supplier_quotation.py
index 0982fd6..421ecd0 100644
--- a/buying/doctype/supplier_quotation/supplier_quotation.py
+++ b/buying/doctype/supplier_quotation/supplier_quotation.py
@@ -63,12 +63,6 @@
d.purchase_ref_rate = d.discount_rate = d.purchase_rate = 0.0
d.import_ref_rate = d.import_rate = 0.0
- def load_default_taxes(self):
- self.doclist = get_obj('Purchase Common').load_default_taxes(self)
-
- def get_purchase_tax_details(self):
- self.doclist = get_obj('Purchase Common').get_purchase_tax_details(self)
-
def validate_fiscal_year(self):
get_obj(dt = 'Purchase Common').validate_fiscal_year( \
self.doc.fiscal_year, self.doc.transaction_date, 'Quotation Date')
diff --git a/buying/doctype/supplier_quotation/supplier_quotation.txt b/buying/doctype/supplier_quotation/supplier_quotation.txt
index dace56a..072b146 100644
--- a/buying/doctype/supplier_quotation/supplier_quotation.txt
+++ b/buying/doctype/supplier_quotation/supplier_quotation.txt
@@ -1,8 +1,8 @@
[
{
- "creation": "2013-03-25 16:01:25",
+ "creation": "2013-05-21 16:16:45",
"docstatus": 0,
- "modified": "2013-02-18 13:40:17",
+ "modified": "2013-06-11 16:05:53",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -31,7 +31,9 @@
"parent": "Supplier Quotation",
"parentfield": "permissions",
"parenttype": "DocType",
- "read": 1
+ "permlevel": 0,
+ "read": 1,
+ "report": 1
},
{
"doctype": "DocType",
@@ -65,43 +67,48 @@
"search_index": 1
},
{
+ "depends_on": "supplier",
"doctype": "DocField",
"fieldname": "supplier_name",
"fieldtype": "Data",
- "hidden": 1,
+ "hidden": 0,
"in_list_view": 1,
"label": "Name",
"read_only": 1
},
{
+ "depends_on": "supplier",
"doctype": "DocField",
"fieldname": "address_display",
"fieldtype": "Small Text",
- "hidden": 1,
+ "hidden": 0,
"label": "Address",
"read_only": 1
},
{
+ "depends_on": "supplier",
"doctype": "DocField",
"fieldname": "contact_display",
"fieldtype": "Small Text",
- "hidden": 1,
+ "hidden": 0,
"label": "Contact",
"read_only": 1
},
{
+ "depends_on": "supplier",
"doctype": "DocField",
"fieldname": "contact_mobile",
"fieldtype": "Text",
- "hidden": 1,
+ "hidden": 0,
"label": "Mobile No",
"read_only": 1
},
{
+ "depends_on": "supplier",
"doctype": "DocField",
"fieldname": "contact_email",
"fieldtype": "Text",
- "hidden": 1,
+ "hidden": 0,
"label": "Contact Email",
"print_hide": 1,
"read_only": 1
@@ -499,17 +506,7 @@
"fieldname": "get_terms",
"fieldtype": "Button",
"label": "Get Terms and Conditions",
- "oldfieldtype": "Button",
- "options": "get_tc_details"
- },
- {
- "doctype": "DocField",
- "fieldname": "terms_html",
- "fieldtype": "HTML",
- "label": "Terms and Conditions HTML",
- "oldfieldtype": "HTML",
- "options": "You can add Terms and Notes that will be printed in the Transaction",
- "print_hide": 1
+ "oldfieldtype": "Button"
},
{
"doctype": "DocField",
@@ -520,6 +517,7 @@
"oldfieldtype": "Text Editor"
},
{
+ "depends_on": "supplier",
"doctype": "DocField",
"fieldname": "contact_section",
"fieldtype": "Section Break",
@@ -588,18 +586,6 @@
"report_hide": 0
},
{
- "description": "The date at which current entry is corrected in the system.",
- "doctype": "DocField",
- "fieldname": "amendment_date",
- "fieldtype": "Date",
- "hidden": 1,
- "label": "Amendment Date",
- "no_copy": 1,
- "oldfieldname": "amendment_date",
- "oldfieldtype": "Date",
- "print_hide": 1
- },
- {
"description": "Select the relevant company name if you have multiple companies",
"doctype": "DocField",
"fieldname": "company",
@@ -642,34 +628,10 @@
"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",
- "doctype": "DocField",
- "fieldname": "cancel_reason",
- "fieldtype": "Data",
- "hidden": 0,
- "label": "Cancel Reason",
- "no_copy": 1,
- "oldfieldname": "cancel_reason",
- "oldfieldtype": "Data",
- "print_hide": 1,
- "read_only": 1
- },
- {
"amend": 1,
"cancel": 1,
"create": 1,
"doctype": "DocPerm",
- "permlevel": 0,
- "report": 1,
"role": "Manufacturing Manager",
"submit": 1,
"write": 1
@@ -679,8 +641,6 @@
"cancel": 1,
"create": 1,
"doctype": "DocPerm",
- "permlevel": 0,
- "report": 1,
"role": "Purchase Manager",
"submit": 1,
"write": 1
@@ -690,8 +650,6 @@
"cancel": 0,
"create": 1,
"doctype": "DocPerm",
- "permlevel": 0,
- "report": 1,
"role": "Purchase User",
"submit": 0,
"write": 1
@@ -701,8 +659,6 @@
"cancel": 0,
"create": 0,
"doctype": "DocPerm",
- "permlevel": 0,
- "report": 1,
"role": "Material User",
"submit": 0,
"write": 0
@@ -712,22 +668,8 @@
"cancel": 0,
"create": 0,
"doctype": "DocPerm",
- "permlevel": 0,
- "report": 1,
"role": "Supplier",
"submit": 0,
"write": 0
- },
- {
- "amend": 0,
- "cancel": 0,
- "create": 0,
- "doctype": "DocPerm",
- "match": "",
- "permlevel": 1,
- "report": 0,
- "role": "All",
- "submit": 0,
- "write": 0
}
]
\ No newline at end of file
diff --git a/buying/doctype/supplier_quotation_item/README.md b/buying/doctype/supplier_quotation_item/README.md
new file mode 100644
index 0000000..42a83cf
--- /dev/null
+++ b/buying/doctype/supplier_quotation_item/README.md
@@ -0,0 +1 @@
+Item details (rate, qty) in parent Supplier Quotation.
\ No newline at end of file
diff --git a/buying/page/buying_home/buying_home.js b/buying/page/buying_home/buying_home.js
index 2070fd4..e45e73d 100644
--- a/buying/page/buying_home/buying_home.js
+++ b/buying/page/buying_home/buying_home.js
@@ -13,7 +13,7 @@
},
{
label: wn._("Supplier Quotation"),
- description: wn._("Track Quotations received from Suppliers."),
+ description: wn._("Quotations received from Suppliers."),
doctype:"Supplier Quotation"
},
{
diff --git a/buying/page/purchase_analytics/README.md b/buying/page/purchase_analytics/README.md
new file mode 100644
index 0000000..332e4c2
--- /dev/null
+++ b/buying/page/purchase_analytics/README.md
@@ -0,0 +1 @@
+Trends of purchases across Items, Item Groups, Suppliers.
\ No newline at end of file
diff --git a/buying/page/purchase_analytics/purchase_analytics.js b/buying/page/purchase_analytics/purchase_analytics.js
index fc082ea..96b88b3 100644
--- a/buying/page/purchase_analytics/purchase_analytics.js
+++ b/buying/page/purchase_analytics/purchase_analytics.js
@@ -24,7 +24,7 @@
new erpnext.PurchaseAnalytics(wrapper);
wrapper.appframe.add_home_breadcrumb()
- wrapper.appframe.add_module_breadcrumb("Buying")
+ wrapper.appframe.add_module_icon("Buying")
wrapper.appframe.add_breadcrumb("icon-bar-chart")
}
@@ -49,7 +49,7 @@
item_key: "supplier",
parent_field: "parent_supplier_type",
formatter: function(item) {
- // return repl('<a href="#Report2/stock-invoices/customer=%(enc_value)s">%(value)s</a>', {
+ // return repl('<a href="#Report/stock-invoices/customer=%(enc_value)s">%(value)s</a>', {
// value: item.name,
// enc_value: encodeURIComponent(item.name)
// });
diff --git a/buying/search_criteria/__init__.py b/buying/search_criteria/__init__.py
deleted file mode 100644
index baffc48..0000000
--- a/buying/search_criteria/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-from __future__ import unicode_literals
diff --git a/buying/search_criteria/itemwise_purchase_details/__init__.py b/buying/search_criteria/itemwise_purchase_details/__init__.py
deleted file mode 100644
index baffc48..0000000
--- a/buying/search_criteria/itemwise_purchase_details/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-from __future__ import unicode_literals
diff --git a/buying/search_criteria/itemwise_purchase_details/itemwise_purchase_details.js b/buying/search_criteria/itemwise_purchase_details/itemwise_purchase_details.js
deleted file mode 100644
index 139d69e..0000000
--- a/buying/search_criteria/itemwise_purchase_details/itemwise_purchase_details.js
+++ /dev/null
@@ -1,21 +0,0 @@
-// ERPNext - web based ERP (http://erpnext.com)
-// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-report.customize_filters = function() {
- this.filter_fields_dict['Purchase Order'+FILTER_SEP +'From Purchase Order Date'].df['report_default'] = sys_defaults.year_start_date;
- this.filter_fields_dict['Purchase Order'+FILTER_SEP +'To Purchase Order Date'].df['report_default'] = dateutil.obj_to_str(new Date());
-
-}
\ No newline at end of file
diff --git a/buying/search_criteria/itemwise_purchase_details/itemwise_purchase_details.txt b/buying/search_criteria/itemwise_purchase_details/itemwise_purchase_details.txt
deleted file mode 100644
index ac92b71..0000000
--- a/buying/search_criteria/itemwise_purchase_details/itemwise_purchase_details.txt
+++ /dev/null
@@ -1,27 +0,0 @@
-[
- {
- "owner": "Administrator",
- "docstatus": 0,
- "creation": "2012-04-11 13:16:55",
- "modified_by": "Administrator",
- "modified": "2012-04-13 11:15:06"
- },
- {
- "parent_doc_type": "Purchase Order",
- "module": "Buying",
- "standard": "Yes",
- "sort_order": "DESC",
- "filters": "{\"Purchase Order\\u0001Submitted\":1,\"Purchase Order\\u0001Status\":[],\"Purchase Order\\u0001Fiscal Year\":[]}",
- "doc_type": "Purchase Order Item",
- "name": "__common__",
- "doctype": "Search Criteria",
- "sort_by": "`tabPurchase Order`.`transaction_date`",
- "page_len": 50,
- "criteria_name": "Itemwise Purchase Details",
- "columns": "Purchase Order\u0001ID,Purchase Order\u0001Purchase Order Date,Purchase Order Item\u0001Item Code,Purchase Order Item\u0001Item Name,Purchase Order Item\u0001Quantity,Purchase Order Item\u0001Stock UOM,Purchase Order Item\u0001Rate ,Purchase Order Item\u0001Amount,Purchase Order\u0001Net Total*,Purchase Order\u0001Grand Total"
- },
- {
- "name": "itemwise_purchase_details",
- "doctype": "Search Criteria"
- }
-]
\ No newline at end of file
diff --git a/buying/search_criteria/pending_po_items_to_bill/__init__.py b/buying/search_criteria/pending_po_items_to_bill/__init__.py
deleted file mode 100644
index baffc48..0000000
--- a/buying/search_criteria/pending_po_items_to_bill/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-from __future__ import unicode_literals
diff --git a/buying/search_criteria/pending_po_items_to_bill/pending_po_items_to_bill.js b/buying/search_criteria/pending_po_items_to_bill/pending_po_items_to_bill.js
deleted file mode 100644
index de2c037..0000000
--- a/buying/search_criteria/pending_po_items_to_bill/pending_po_items_to_bill.js
+++ /dev/null
@@ -1,20 +0,0 @@
-// ERPNext - web based ERP (http://erpnext.com)
-// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-report.customize_filters = function() {
- this.filter_fields_dict['Purchase Order'+FILTER_SEP +'Company'].df['report_default'] = sys_defaults.company;
- this.filter_fields_dict['Purchase Order'+FILTER_SEP +'Fiscal Year'].df['report_default'] = sys_defaults.fiscal_year;
-}
\ No newline at end of file
diff --git a/buying/search_criteria/pending_po_items_to_bill/pending_po_items_to_bill.txt b/buying/search_criteria/pending_po_items_to_bill/pending_po_items_to_bill.txt
deleted file mode 100644
index 9cb44a5..0000000
--- a/buying/search_criteria/pending_po_items_to_bill/pending_po_items_to_bill.txt
+++ /dev/null
@@ -1,30 +0,0 @@
-[
- {
- "owner": "dhanalekshmi@webnotestech.com",
- "docstatus": 0,
- "creation": "2012-04-03 12:49:51",
- "modified_by": "Administrator",
- "modified": "2012-04-03 12:49:51"
- },
- {
- "add_col": "(CASE WHEN (`tabPurchase Order Item`.qty- ifnull(`tabPurchase Order Item`.billed_qty, 0) > 0 ) THEN (`tabPurchase Order Item`.qty-ifnull(`tabPurchase Order Item`.billed_qty, 0) ) ELSE 0 END) AS \"Pending To Bill\"",
- "parent_doc_type": "Purchase Order",
- "module": "Buying",
- "standard": "Yes",
- "sort_order": "DESC",
- "filters": "{'Purchase Order\u0001Saved':1,'Purchase Order\u0001Submitted':1,'Purchase Order\u0001Status':'','Purchase Order\u0001Fiscal Year':''}",
- "description": "Pending PO Items To Bill",
- "doc_type": "Purchase Order Item",
- "name": "__common__",
- "add_cond": "(`tabPurchase Order Item`.qty - ifnull(`tabPurchase Order Item`.received_qty, 0) > 0 or `tabPurchase Order Item`.qty - ifnull(`tabPurchase Order Item`.billed_qty, 0) > 0)\n`tabPurchase Order`.status != \"Stopped\"",
- "doctype": "Search Criteria",
- "sort_by": "`tabPurchase Order`.`name`",
- "page_len": 50,
- "criteria_name": "Pending PO Items To Bill",
- "columns": "Purchase Order\u0001ID,Purchase Order\u0001Supplier,Purchase Order\u0001Supplier Name,Purchase Order\u0001Status,Purchase Order\u0001PO Date,Purchase Order\u0001Fiscal Year,Purchase Order Item\u0001Material Request No,Purchase Order Item\u0001Item Code,Purchase Order Item\u0001Item Name,Purchase Order Item\u0001Description,Purchase Order Item\u0001Quantity,Purchase Order Item\u0001UOM,Purchase Order Item\u0001Received Qty"
- },
- {
- "name": "pending_po_items_to_bill",
- "doctype": "Search Criteria"
- }
-]
\ No newline at end of file
diff --git a/buying/search_criteria/pending_po_items_to_receive/__init__.py b/buying/search_criteria/pending_po_items_to_receive/__init__.py
deleted file mode 100644
index baffc48..0000000
--- a/buying/search_criteria/pending_po_items_to_receive/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-from __future__ import unicode_literals
diff --git a/buying/search_criteria/pending_po_items_to_receive/pending_po_items_to_receive.js b/buying/search_criteria/pending_po_items_to_receive/pending_po_items_to_receive.js
deleted file mode 100644
index de2c037..0000000
--- a/buying/search_criteria/pending_po_items_to_receive/pending_po_items_to_receive.js
+++ /dev/null
@@ -1,20 +0,0 @@
-// ERPNext - web based ERP (http://erpnext.com)
-// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-report.customize_filters = function() {
- this.filter_fields_dict['Purchase Order'+FILTER_SEP +'Company'].df['report_default'] = sys_defaults.company;
- this.filter_fields_dict['Purchase Order'+FILTER_SEP +'Fiscal Year'].df['report_default'] = sys_defaults.fiscal_year;
-}
\ No newline at end of file
diff --git a/buying/search_criteria/pending_po_items_to_receive/pending_po_items_to_receive.py b/buying/search_criteria/pending_po_items_to_receive/pending_po_items_to_receive.py
deleted file mode 100644
index e7ada4f..0000000
--- a/buying/search_criteria/pending_po_items_to_receive/pending_po_items_to_receive.py
+++ /dev/null
@@ -1,19 +0,0 @@
-# ERPNext - web based ERP (http://erpnext.com)
-# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-from __future__ import unicode_literals
-colwidths[col_idx['Pending Quantity To Receive']] = '200px'
-colwidths[col_idx['Pending Amount To Receive']] = '200px'
diff --git a/buying/search_criteria/pending_po_items_to_receive/pending_po_items_to_receive.txt b/buying/search_criteria/pending_po_items_to_receive/pending_po_items_to_receive.txt
deleted file mode 100644
index 51cf165..0000000
--- a/buying/search_criteria/pending_po_items_to_receive/pending_po_items_to_receive.txt
+++ /dev/null
@@ -1,30 +0,0 @@
-[
- {
- "owner": "dhanalekshmi@webnotestech.com",
- "docstatus": 0,
- "creation": "2012-04-03 12:49:52",
- "modified_by": "Administrator",
- "modified": "2012-04-03 12:49:52"
- },
- {
- "add_col": "`tabPurchase Order Item`.qty - ifnull(`tabPurchase Order Item`.received_qty, 0) AS \"Pending Quantity To Receive\"\n(`tabPurchase Order Item`.qty - ifnull(`tabPurchase Order Item`.received_qty, 0)) * `tabPurchase Order Item`.purchase_rate AS \"Pending Amount To Receive\"",
- "parent_doc_type": "Purchase Order",
- "module": "Buying",
- "standard": "Yes",
- "sort_order": "DESC",
- "filters": "{'Purchase Order\u0001Saved':1,'Purchase Order\u0001Submitted':1,'Purchase Order\u0001Status':'','Purchase Order\u0001Fiscal Year':''}",
- "description": "Pending PO Items To Receive",
- "doc_type": "Purchase Order Item",
- "name": "__common__",
- "add_cond": "`tabPurchase Order Item`.qty - ifnull(`tabPurchase Order Item`.received_qty, 0) > 0 \n`tabPurchase Order`.status != \"Stopped\"",
- "doctype": "Search Criteria",
- "sort_by": "`tabPurchase Order`.`name`",
- "page_len": 50,
- "criteria_name": "Pending PO Items To Receive",
- "columns": "Purchase Order\u0001ID,Purchase Order\u0001Supplier,Purchase Order\u0001Supplier Name,Purchase Order\u0001Status,Purchase Order\u0001PO Date,Purchase Order\u0001Fiscal Year,Purchase Order Item\u0001Material Request No,Purchase Order Item\u0001Item Code,Purchase Order Item\u0001Item Name,Purchase Order Item\u0001Description,Purchase Order Item\u0001Quantity,Purchase Order Item\u0001UOM,Purchase Order Item\u0001Received Qty"
- },
- {
- "name": "pending_po_items_to_receive",
- "doctype": "Search Criteria"
- }
-]
\ No newline at end of file
diff --git a/buying/search_criteria/purchase_in_transit/__init__.py b/buying/search_criteria/purchase_in_transit/__init__.py
deleted file mode 100644
index baffc48..0000000
--- a/buying/search_criteria/purchase_in_transit/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-from __future__ import unicode_literals
diff --git a/buying/search_criteria/purchase_in_transit/purchase_in_transit.js b/buying/search_criteria/purchase_in_transit/purchase_in_transit.js
deleted file mode 100644
index a08b921..0000000
--- a/buying/search_criteria/purchase_in_transit/purchase_in_transit.js
+++ /dev/null
@@ -1,48 +0,0 @@
-// ERPNext - web based ERP (http://erpnext.com)
-// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-report.customize_filters = function() {
-
- this.hide_all_filters();
-
-
- this.filter_fields_dict['Purchase Invoice'+FILTER_SEP +'Company'].df.filter_hide = 0;
- this.filter_fields_dict['Purchase Invoice'+FILTER_SEP +'From Posting Date'].df.filter_hide = 0;
- this.filter_fields_dict['Purchase Invoice'+FILTER_SEP +'To Posting Date'].df.filter_hide = 0;
- this.filter_fields_dict['Purchase Invoice'+FILTER_SEP +'Credit To'].df.filter_hide = 0;
-
-
- this.add_filter({fieldname:'pr_posting_date', label:'PR Posting Date', fieldtype:'Date', ignore : 1, parent:'Purchase Receipt'});
-
-
- this.filter_fields_dict['Purchase Invoice'+FILTER_SEP +'Credit To'].df.in_first_page = 0;
- this.filter_fields_dict['Purchase Invoice'+FILTER_SEP +'From Posting Date'].df.in_first_page = 1;
- this.filter_fields_dict['Purchase Invoice'+FILTER_SEP +'To Posting Date'].df.in_first_page = 1;
-
-
- this.filter_fields_dict['Purchase Receipt'+FILTER_SEP +'From PR Posting Date'].df.ignore = 1;
- this.filter_fields_dict['Purchase Receipt'+FILTER_SEP +'To PR Posting Date'].df.ignore = 1;
-
-
- this.filter_fields_dict['Purchase Receipt'+FILTER_SEP +'From PR Posting Date'].df['report_default'] = sys_defaults.year_start_date;
- this.filter_fields_dict['Purchase Receipt'+FILTER_SEP +'To PR Posting Date'].df['report_default'] = dateutil.obj_to_str(new Date());
- this.filter_fields_dict['Purchase Invoice'+FILTER_SEP +'From Posting Date'].df['report_default'] = sys_defaults.year_start_date;
- this.filter_fields_dict['Purchase Invoice'+FILTER_SEP +'To Posting Date'].df['report_default'] = dateutil.obj_to_str(new Date());
- this.filter_fields_dict['Purchase Invoice'+FILTER_SEP +'Company'].df['report_default'] = sys_defaults.company;
-
-}
-
-this.mytabs.items['Select Columns'].hide();
\ No newline at end of file
diff --git a/buying/search_criteria/purchase_in_transit/purchase_in_transit.py b/buying/search_criteria/purchase_in_transit/purchase_in_transit.py
deleted file mode 100644
index c8739bb..0000000
--- a/buying/search_criteria/purchase_in_transit/purchase_in_transit.py
+++ /dev/null
@@ -1,24 +0,0 @@
-# ERPNext - web based ERP (http://erpnext.com)
-# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-#check mendatory
-from __future__ import unicode_literals
-if not filter_values.get('posting_date') or not filter_values.get('posting_date1'):
- msgprint("Please select From Posting Date and To Posting Date in 'Set Filters' section")
- raise Exception
-else:
- from_date = filter_values.get('posting_date')
- to_date = filter_values.get('posting_date1')
\ No newline at end of file
diff --git a/buying/search_criteria/purchase_in_transit/purchase_in_transit.txt b/buying/search_criteria/purchase_in_transit/purchase_in_transit.txt
deleted file mode 100644
index 9fa5ccf..0000000
--- a/buying/search_criteria/purchase_in_transit/purchase_in_transit.txt
+++ /dev/null
@@ -1,32 +0,0 @@
-[
- {
- "owner": "Administrator",
- "docstatus": 0,
- "creation": "2012-04-11 13:16:55",
- "modified_by": "Administrator",
- "modified": "2012-04-13 12:06:15"
- },
- {
- "add_col": "`tabPurchase Receipt`.`posting_date` AS 'PR Posting Date'",
- "parent_doc_type": "Purchase Invoice",
- "module": "Buying",
- "standard": "Yes",
- "sort_order": "DESC",
- "filters": "{\"Purchase Invoice\\u0001Submitted\":1,\"Purchase Invoice\\u0001Is Opening\":[\"\"],\"Purchase Invoice\\u0001Fiscal Year\":[\"\"]}",
- "dis_filters": "`tabPurchase Receipt`.`pr_posting_date`",
- "description": "List of PR whose posting date is after PV posting date",
- "doc_type": "Purchase Invoice Item",
- "name": "__common__",
- "add_tab": "`tabPurchase Receipt`",
- "add_cond": "`tabPurchase Invoice Item`.`purchase_receipt` = `tabPurchase Receipt`.`name`\n`tabPurchase Receipt`.`posting_date` >= '%(pr_posting_date)s'\n`tabPurchase Receipt`.`posting_date` <= '%(pr_posting_date1)s'\n`tabPurchase Receipt`.`posting_date` > `tabPurchase Invoice`.`posting_date`",
- "doctype": "Search Criteria",
- "sort_by": "`tabPurchase Invoice`.`name`",
- "page_len": 50,
- "criteria_name": "Purchase in Transit",
- "columns": "Purchase Invoice\u0001ID,Purchase Invoice\u0001Posting Date,Purchase Invoice\u0001Credit To,Purchase Invoice Item\u0001Qty,Purchase Invoice Item\u0001Amount,Purchase Invoice Item\u0001Pur Order,Purchase Invoice Item\u0001Pur Receipt"
- },
- {
- "name": "purchase_in_transit",
- "doctype": "Search Criteria"
- }
-]
\ No newline at end of file
diff --git a/buying/utils.py b/buying/utils.py
index 0431e64..1aaa5d1 100644
--- a/buying/utils.py
+++ b/buying/utils.py
@@ -16,6 +16,7 @@
from __future__ import unicode_literals
import webnotes
+from webnotes import msgprint, _
from webnotes.utils import getdate, flt, add_days
import json
@@ -29,7 +30,11 @@
"warehouse": None,
"supplier": None,
"transaction_date": None,
- "conversion_rate": 1.0
+ "conversion_rate": 1.0,
+ "price_list_name": None,
+ "price_list_currency": None,
+ "plc_conversion_rate": 1.0,
+ "is_subcontracted": "Yes" / "No"
}
"""
if isinstance(args, basestring):
@@ -37,86 +42,102 @@
args = webnotes._dict(args)
- item_wrapper = webnotes.bean("Item", args.item_code)
- item = item_wrapper.doc
+ item_bean = webnotes.bean("Item", args.item_code)
+ item = item_bean.doc
- from stock.utils import validate_end_of_life
- validate_end_of_life(item.name, item.end_of_life)
+ _validate_item_details(args, item)
- # fetch basic values
- out = webnotes._dict()
- out.update({
- "item_name": item.item_name,
- "item_group": item.item_group,
- "brand": item.brand,
- "description": item.description,
- "qty": 0,
- "stock_uom": item.stock_uom,
- "uom": item.stock_uom,
- "conversion_factor": 1.0,
- "warehouse": args.warehouse or item.default_warehouse,
- "item_tax_rate": json.dumps(dict(([d.tax_type, d.tax_rate] for d in
- item_wrapper.doclist.get({"parentfield": "item_tax"})))),
- "batch_no": None,
- "expense_head": item.purchase_account,
- "cost_center": item.cost_center
- })
+ out = _get_basic_details(args, item_bean)
- if args.supplier:
- item_supplier = item_wrapper.doclist.get({"parentfield": "item_supplier_details",
- "supplier": args.supplier})
- if item_supplier:
- out["supplier_part_no"] = item_supplier[0].supplier_part_no
+ out.supplier_part_no = _get_supplier_part_no(args, item_bean)
if out.warehouse:
- out.projected_qty = webnotes.conn.get_value("Bin", {"item_code": item.name,
- "warehouse": out.warehouse}, "projected_qty")
+ out.projected_qty = get_projected_qty(item.name, out.warehouse)
if args.transaction_date and item.lead_time_days:
out.schedule_date = out.lead_time_date = add_days(args.transaction_date,
item.lead_time_days)
- # set zero
- out.purchase_ref_rate = out.discount_rate = out.purchase_rate = \
- out.import_ref_rate = out.import_rate = 0.0
+ meta = webnotes.get_doctype(args.doctype)
- if args.doctype in ["Purchase Order", "Purchase Invoice", "Purchase Receipt",
- "Supplier Quotation"]:
- # try fetching from price list
- if args.price_list_name and args.price_list_currency:
- rates_as_per_price_list = get_rates_as_per_price_list(args, item_wrapper.doclist)
- if rates_as_per_price_list:
- out.update(rates_as_per_price_list)
-
- # if not found, fetch from last purchase transaction
- if not out.purchase_rate:
- last_purchase = get_last_purchase_details(item.name, args.docname, args.conversion_rate)
- if last_purchase:
- out.update(last_purchase)
-
+ if meta.get_field("currency"):
+ out.purchase_ref_rate = out.discount_rate = out.purchase_rate = \
+ out.import_ref_rate = out.import_rate = 0.0
+ out.update(_get_price_list_rate(args, item_bean, meta))
+
+ if args.doctype == "Material Request":
+ out.min_order_qty = flt(item.min_order_qty)
+
return out
-
-def get_rates_as_per_price_list(args, item_doclist=None):
- if not item_doclist:
- item_doclist = webnotes.bean("Item", args.item_code).doclist
- result = item_doclist.get({"parentfield": "ref_rate_details",
- "price_list_name": args.price_list_name, "ref_currency": args.price_list_currency,
- "buying": 1})
+def _get_basic_details(args, item_bean):
+ item = item_bean.doc
+
+ out = webnotes._dict({
+ "description": item.description_html or item.description,
+ "qty": 0.0,
+ "uom": item.stock_uom,
+ "conversion_factor": 1.0,
+ "warehouse": args.warehouse or item.default_warehouse,
+ "item_tax_rate": json.dumps(dict(([d.tax_type, d.tax_rate] for d in
+ item_bean.doclist.get({"parentfield": "item_tax"})))),
+ "batch_no": None,
+ "expense_head": item.purchase_account,
+ "cost_center": item.cost_center
+ })
+
+ for fieldname in ("item_name", "item_group", "brand", "stock_uom"):
+ out[fieldname] = item.fields.get(fieldname)
+
+ return out
+
+def _get_price_list_rate(args, item_bean, meta):
+ from utilities.transaction_base import validate_currency
+ item = item_bean.doc
+ out = webnotes._dict()
+
+ # try fetching from price list
+ if args.price_list_name and args.price_list_currency:
+ price_list_rate = item_bean.doclist.get({
+ "parentfield": "ref_rate_details",
+ "price_list_name": args.price_list_name,
+ "ref_currency": args.price_list_currency,
+ "buying": 1})
+ if price_list_rate:
+ out.import_ref_rate = \
+ flt(price_list_rate[0].ref_rate * args.plc_conversion_rate / args.conversion_rate)
- if result:
- purchase_ref_rate = flt(result[0].ref_rate) * flt(args.plc_conversion_rate)
- conversion_rate = flt(args.conversion_rate) or 1.0
- return webnotes._dict({
- "purchase_ref_rate": purchase_ref_rate,
- "purchase_rate": purchase_ref_rate,
- "rate": purchase_ref_rate,
- "discount_rate": 0,
- "import_ref_rate": purchase_ref_rate / conversion_rate,
- "import_rate": purchase_ref_rate / conversion_rate
- })
- else:
- return webnotes._dict()
+ # if not found, fetch from last purchase transaction
+ if not out.import_ref_rate:
+ last_purchase = get_last_purchase_details(item.name, args.docname, args.conversion_rate)
+ if last_purchase:
+ out.update(last_purchase)
+
+ if out.import_ref_rate or out.import_rate:
+ validate_currency(args, item, meta)
+
+ return out
+
+def _get_supplier_part_no(args, item_bean):
+ item_supplier = item_bean.doclist.get({"parentfield": "item_supplier_details",
+ "supplier": args.supplier})
+
+ return item_supplier and item_supplier[0].supplier_part_no or None
+
+def _validate_item_details(args, item):
+ from utilities.transaction_base import validate_item_fetch
+ validate_item_fetch(args, item)
+
+ # validate if purchase item or subcontracted item
+ if item.is_purchase_item != "Yes":
+ msgprint(_("Item") + (" %s: " % item.name) + _("not a purchase item"),
+ raise_exception=True)
+
+ if args.is_subcontracted == "Yes" and item.is_sub_contracted_item != "Yes":
+ msgprint(_("Item") + (" %s: " % item.name) +
+ _("not a sub-contracted item.") +
+ _("Please select a sub-contracted item or do not sub-contract the transaction."),
+ raise_exception=True)
def get_last_purchase_details(item_code, doc_name, conversion_rate=1.0):
"""returns last purchase details in stock uom"""
@@ -177,4 +198,14 @@
"rate": out.purchase_rate
})
- return out
\ No newline at end of file
+ return out
+
+@webnotes.whitelist()
+def get_conversion_factor(item_code, uom):
+ return {"conversion_factor": webnotes.conn.get_value("UOM Conversion Detail",
+ {"parent": item_code, "uom": uom})}
+
+@webnotes.whitelist()
+def get_projected_qty(item_code, warehouse):
+ return webnotes.conn.get_value("Bin", {"item_code": item_code,
+ "warehouse": warehouse}, "projected_qty")
\ No newline at end of file
diff --git a/config.json b/config.json
index cb1a831..33e898f 100644
--- a/config.json
+++ b/config.json
@@ -2,78 +2,79 @@
"modules": {
"Selling": {
"link": "selling-home",
- "color": "#3f4901",
+ "color": "#1abc9c",
"icon": "icon-tag",
"type": "module"
},
"Accounts": {
"link": "accounts-home",
- "color": "#025770",
+ "color": "#3498db",
"icon": "icon-money",
"type": "module"
},
"Stock": {
"type": "module",
"link": "stock-home",
- "color": "#a66a02",
+ "color": "#f39c12",
"icon": "icon-truck"
},
"Buying": {
"type": "module",
"link": "buying-home",
- "color": "#8F0222",
+ "color": "#c0392b",
"icon": "icon-shopping-cart"
},
"Support": {
"type": "module",
"link": "support-home",
- "color": "#410169",
+ "color": "#2c3e50",
"icon": "icon-phone"
},
"Projects": {
"type": "module",
"link": "projects-home",
- "color": "#473b7f",
- "icon": "icon-tasks"
+ "color": "#8e44ad",
+ "icon": "icon-puzzle-piece"
},
"Manufacturing": {
"type": "module",
"link": "manufacturing-home",
- "color": "#590116",
- "icon": "icon-magic"
+ "color": "#7f8c8d",
+ "icon": "icon-cogs"
},
"Website": {
"type": "module",
"link": "website-home",
- "color": "#968c00",
+ "color": "#16a085",
"icon": "icon-globe"
},
"HR": {
"type": "module",
"link": "hr-home",
- "color": "#018d6c",
+ "color": "#2ecc71",
"label": "Human Resources",
"icon": "icon-group"
},
"Setup": {
"type": "setup",
"link": "Setup",
- "color": "#484848",
+ "color": "#bdc3c7",
"icon": "icon-wrench"
},
"Activity": {
"type": "page",
"link": "activity",
- "color": "#633501",
+ "color": "#e67e22",
"icon": "icon-play",
"label": "Activity"
},
- "Knowledge Base": {
- "type": "page",
- "link": "questions",
- "color": "#01372b",
- "label": "Knowledge Base",
- "icon": "icon-question-sign"
+ "Notes": {
+ "type": "list",
+ "doctype": "Note",
+ "link": "List/Note",
+ "color": "#95a5a6",
+ "label": "Notes",
+ "icon": "icon-file-alt"
}
},
"web": {
@@ -126,6 +127,10 @@
"profile": {
"no_cache": true,
"template": "app/website/templates/pages/profile"
+ },
+ "cart": {
+ "no_cache": true,
+ "template": "app/website/templates/pages/cart.html"
}
},
"generators": {
diff --git a/controllers/accounts_controller.py b/controllers/accounts_controller.py
index 04e4bbd..f417b31 100644
--- a/controllers/accounts_controller.py
+++ b/controllers/accounts_controller.py
@@ -16,14 +16,262 @@
from __future__ import unicode_literals
import webnotes
-from webnotes.utils import flt
-
-from utilities.transaction_base import TransactionBase
+from webnotes import _, msgprint
+from webnotes.utils import flt, cint
+from setup.utils import get_company_currency, get_price_list_currency
+from utilities.transaction_base import TransactionBase, validate_conversion_rate
+import json
class AccountsController(TransactionBase):
def validate(self):
- if self.meta.get_field("grand_total"):
+ self.set_missing_values(for_validate=True)
+
+ if self.meta.get_field("currency"):
+ self.company_currency = get_company_currency(self.doc.company)
+
+ validate_conversion_rate(self.doc.currency, self.doc.conversion_rate,
+ self.meta.get_label("conversion_rate"), self.doc.company)
+
+ self.calculate_taxes_and_totals()
self.validate_value("grand_total", ">=", 0)
+ self.set_total_in_words()
+
+ def set_price_list_currency(self, buying_or_selling):
+ # TODO - change this, since price list now has only one currency allowed
+ if self.meta.get_field("price_list_name") and self.doc.price_list_name and \
+ not self.doc.price_list_currency:
+ self.doc.fields.update(get_price_list_currency({
+ "price_list_name": self.doc.price_list_name,
+ "use_for": buying_or_selling
+ }))
+
+ def set_missing_item_details(self, get_item_details):
+ """set missing item values"""
+ for item in self.doclist.get({"parentfield": self.fname}):
+ if item.fields.get("item_code"):
+ args = item.fields.copy().update(self.doc.fields)
+ ret = get_item_details(args)
+ for fieldname, value in ret.items():
+ if self.meta.get_field(fieldname, parentfield=self.fname) and \
+ not item.fields.get(fieldname):
+ item.fields[fieldname] = value
+
+ def set_taxes(self, tax_doctype, tax_parentfield, tax_master_field):
+ if not self.meta.get_field(tax_parentfield):
+ return
+
+ if not self.doclist.get({"parentfield": tax_parentfield}):
+ if not self.doc.fields.get(tax_master_field):
+ # get the default tax master
+ self.doc.fields[tax_master_field] = \
+ webnotes.conn.get_value(tax_doctype + " Master", {"is_default": 1})
+
+ if self.doc.fields.get(tax_master_field):
+ from webnotes.model import default_fields
+ tax_master = webnotes.bean(tax_doctype + " Master", self.doc.fields.get(tax_master_field))
+
+ for i, tax in enumerate(tax_master.doclist.get({"parentfield": tax_parentfield})):
+ for fieldname in default_fields:
+ tax.fields[fieldname] = None
+
+ tax.fields.update({
+ "doctype": tax_doctype,
+ "parentfield": tax_parentfield,
+ "idx": i+1
+ })
+
+ self.doclist.append(tax)
+
+ def calculate_taxes_and_totals(self):
+ self.doc.conversion_rate = flt(self.doc.conversion_rate)
+ self.item_doclist = self.doclist.get({"parentfield": self.fname})
+ self.tax_doclist = self.doclist.get({"parentfield": self.other_fname})
+
+ self.calculate_item_values()
+ self.initialize_taxes()
+
+ if hasattr(self, "determine_exclusive_rate"):
+ self.determine_exclusive_rate()
+
+ self.calculate_net_total()
+ self.calculate_taxes()
+ self.calculate_totals()
+ self._cleanup()
+
+ # TODO
+ # print format: show net_total_export instead of net_total
+
+ def initialize_taxes(self):
+ for tax in self.tax_doclist:
+ tax.item_wise_tax_detail = {}
+ for fieldname in ["tax_amount", "total",
+ "tax_amount_for_current_item", "grand_total_for_current_item",
+ "tax_fraction_for_current_item", "grand_total_fraction_for_current_item"]:
+ tax.fields[fieldname] = 0.0
+
+ self.validate_on_previous_row(tax)
+ self.validate_inclusive_tax(tax)
+ self.round_floats_in(tax)
+
+ def validate_on_previous_row(self, tax):
+ """
+ validate if a valid row id is mentioned in case of
+ On Previous Row Amount and On Previous Row Total
+ """
+ if tax.charge_type in ["On Previous Row Amount", "On Previous Row Total"] and \
+ (not tax.row_id or cint(tax.row_id) >= tax.idx):
+ msgprint((_("Row") + " # %(idx)s [%(taxes_doctype)s]: " + \
+ _("Please specify a valid") + " %(row_id_label)s") % {
+ "idx": tax.idx,
+ "taxes_doctype": tax.doctype,
+ "row_id_label": self.meta.get_label("row_id",
+ parentfield=self.other_fname)
+ }, raise_exception=True)
+
+ def validate_inclusive_tax(self, tax):
+ def _on_previous_row_error(row_range):
+ msgprint((_("Row") + " # %(idx)s [%(doctype)s]: " +
+ _("to be included in Item's rate, it is required that: ") +
+ " [" + _("Row") + " # %(row_range)s] " + _("also be included in Item's rate")) % {
+ "idx": tax.idx,
+ "doctype": tax.doctype,
+ "inclusive_label": self.meta.get_label("included_in_print_rate",
+ parentfield=self.other_fname),
+ "charge_type_label": self.meta.get_label("charge_type",
+ parentfield=self.other_fname),
+ "charge_type": tax.charge_type,
+ "row_range": row_range
+ }, raise_exception=True)
+
+ if cint(tax.included_in_print_rate):
+ if tax.charge_type == "Actual":
+ # inclusive tax cannot be of type Actual
+ msgprint((_("Row")
+ + " # %(idx)s [%(doctype)s]: %(charge_type_label)s = \"%(charge_type)s\" "
+ + "cannot be included in Item's rate") % {
+ "idx": tax.idx,
+ "doctype": tax.doctype,
+ "charge_type_label": self.meta.get_label("charge_type",
+ parentfield=self.other_fname),
+ "charge_type": tax.charge_type,
+ }, raise_exception=True)
+ elif tax.charge_type == "On Previous Row Amount" and \
+ not cint(self.tax_doclist[tax.row_id - 1].included_in_print_rate):
+ # referred row should also be inclusive
+ _on_previous_row_error(tax.row_id)
+ elif tax.charge_type == "On Previous Row Total" and \
+ not all([cint(t.included_in_print_rate) for t in self.tax_doclist[:tax.row_id - 1]]):
+ # all rows about the reffered tax should be inclusive
+ _on_previous_row_error("1 - %d" % (tax.row_id,))
+
+ def calculate_taxes(self):
+ for item in self.item_doclist:
+ item_tax_map = self._load_item_tax_rate(item.item_tax_rate)
+
+ for i, tax in enumerate(self.tax_doclist):
+ # tax_amount represents the amount of tax for the current step
+ current_tax_amount = self.get_current_tax_amount(item, tax, item_tax_map)
+
+ if hasattr(self, "set_item_tax_amount"):
+ self.set_item_tax_amount(item, tax, current_tax_amount)
+
+ # case when net total is 0 but there is an actual type charge
+ # in this case add the actual amount to tax.tax_amount
+ # and tax.grand_total_for_current_item for the first such iteration
+ if tax.charge_type=="Actual" and \
+ not (current_tax_amount or self.doc.net_total or tax.tax_amount):
+ zero_net_total_adjustment = flt(tax.rate, self.precision("tax_amount", tax))
+ current_tax_amount += zero_net_total_adjustment
+
+ # store tax_amount for current item as it will be used for
+ # charge type = 'On Previous Row Amount'
+ tax.tax_amount_for_current_item = current_tax_amount
+
+ # accumulate tax amount into tax.tax_amount
+ tax.tax_amount += current_tax_amount
+
+ if tax.category:
+ # if just for valuation, do not add the tax amount in total
+ # hence, setting it as 0 for further steps
+ current_tax_amount = 0.0 if (tax.category == "Valuation") else current_tax_amount
+
+ current_tax_amount *= -1.0 if (tax.add_deduct_tax == "Deduct") else 1.0
+
+ # Calculate tax.total viz. grand total till that step
+ # note: grand_total_for_current_item contains the contribution of
+ # item's amount, previously applied tax and the current tax on that item
+ if i==0:
+ tax.grand_total_for_current_item = flt(item.amount +
+ current_tax_amount, self.precision("total", tax))
+
+ else:
+ tax.grand_total_for_current_item = \
+ flt(self.tax_doclist[i-1].grand_total_for_current_item +
+ current_tax_amount, self.precision("total", tax))
+
+ # in tax.total, accumulate grand total of each item
+ tax.total += tax.grand_total_for_current_item
+
+ def get_current_tax_amount(self, item, tax, item_tax_map):
+ tax_rate = self._get_tax_rate(tax, item_tax_map)
+ current_tax_amount = 0.0
+
+ if tax.charge_type == "Actual":
+ # distribute the tax amount proportionally to each item row
+ actual = flt(tax.rate, self.precision("tax_amount", tax))
+ current_tax_amount = (self.doc.net_total
+ and ((item.amount / self.doc.net_total) * actual)
+ or 0)
+ elif tax.charge_type == "On Net Total":
+ current_tax_amount = (tax_rate / 100.0) * item.amount
+ elif tax.charge_type == "On Previous Row Amount":
+ current_tax_amount = (tax_rate / 100.0) * \
+ self.tax_doclist[cint(tax.row_id) - 1].tax_amount_for_current_item
+ elif tax.charge_type == "On Previous Row Total":
+ current_tax_amount = (tax_rate / 100.0) * \
+ self.tax_doclist[cint(tax.row_id) - 1].grand_total_for_current_item
+
+ current_tax_amount = flt(current_tax_amount, self.precision("tax_amount", tax))
+
+ # store tax breakup for each item
+ tax.item_wise_tax_detail[item.item_code or item.item_name] = [tax_rate, current_tax_amount]
+
+ return current_tax_amount
+
+ def _load_item_tax_rate(self, item_tax_rate):
+ return json.loads(item_tax_rate) if item_tax_rate else {}
+
+ def _get_tax_rate(self, tax, item_tax_map):
+ if item_tax_map.has_key(tax.account_head):
+ return flt(item_tax_map.get(tax.account_head), self.precision("rate", tax))
+ else:
+ return tax.rate
+
+ def _cleanup(self):
+ for tax in self.tax_doclist:
+ for fieldname in ("grand_total_for_current_item",
+ "tax_amount_for_current_item",
+ "tax_fraction_for_current_item",
+ "grand_total_fraction_for_current_item"):
+ if fieldname in tax.fields:
+ del tax.fields[fieldname]
+
+ tax.item_wise_tax_detail = json.dumps(tax.item_wise_tax_detail)
+
+ def _set_in_company_currency(self, item, print_field, base_field):
+ """set values in base currency"""
+ item.fields[base_field] = flt((flt(item.fields[print_field],
+ self.precision(print_field, item)) * self.doc.conversion_rate),
+ self.precision(base_field, item))
+
+ def calculate_total_advance(self, parenttype, advance_parentfield):
+ if self.doc.doctype == parenttype and self.doc.docstatus < 2:
+ sum_of_allocated_amount = sum([flt(adv.allocated_amount, self.precision("allocated_amount", adv))
+ for adv in self.doclist.get({"parentfield": advance_parentfield})])
+
+ self.doc.total_advance = flt(sum_of_allocated_amount, self.precision("total_advance"))
+
+ self.calculate_outstanding_amount()
def get_gl_dict(self, args, cancel=None):
"""this method populates the common properties of a gl entry record"""
@@ -97,4 +345,4 @@
if not hasattr(self, "_abbr"):
self._abbr = webnotes.conn.get_value("Company", self.doc.company, "abbr")
- return self._abbr
\ No newline at end of file
+ return self._abbr
diff --git a/controllers/buying_controller.py b/controllers/buying_controller.py
index 3deda02..36ce285 100644
--- a/controllers/buying_controller.py
+++ b/controllers/buying_controller.py
@@ -17,35 +17,45 @@
from __future__ import unicode_literals
import webnotes
from webnotes import _, msgprint
-from webnotes.utils import flt, cint
-import json
+from webnotes.utils import flt
from buying.utils import get_item_details
from setup.utils import get_company_currency
-from webnotes.model.utils import round_floats_in_doc
from controllers.stock_controller import StockController
class WrongWarehouseCompany(Exception): pass
class BuyingController(StockController):
+ def onload_post_render(self):
+ self.set_price_list_currency("buying")
+
+ # contact, address, item details
+ self.set_missing_values()
+
+ self.set_taxes("Purchase Taxes and Charges", "purchase_tax_details", "purchase_other_charges")
+
def validate(self):
super(BuyingController, self).validate()
self.validate_stock_or_nonstock_items()
self.validate_warehouse_belongs_to_company()
- if self.meta.get_field("currency"):
- self.company_currency = get_company_currency(self.doc.company)
- self.validate_conversion_rate("currency", "conversion_rate")
-
- if self.doc.price_list_name and self.doc.price_list_currency:
- self.validate_conversion_rate("price_list_currency", "plc_conversion_rate")
-
- # IMPORTANT: enable this only when client side code is similar to this one
- # self.calculate_taxes_and_totals()
+
+ def set_missing_values(self, for_validate=False):
+ # set contact and address details for supplier, if they are not mentioned
+ if self.doc.supplier and not (self.doc.contact_person and self.doc.supplier_address):
+ for fieldname, val in self.get_default_address_and_contact("supplier").items():
+ if not self.doc.fields.get(fieldname) and self.meta.get_field(fieldname):
+ self.doc.fields[fieldname] = val
+
+ self.set_missing_item_details(get_item_details)
+
+ def set_supplier_defaults(self):
+ self.doc.fields.update(self.get_default_supplier_address(self.doc.fields))
- # set total in words
- self.set_total_in_words()
-
+ def get_purchase_tax_details(self):
+ self.doclist = self.doc.clear_table(self.doclist, "purchase_tax_details")
+ self.set_taxes("Purchase Taxes and Charges", "purchase_tax_details", "purchase_other_charges")
+
def validate_warehouse_belongs_to_company(self):
for warehouse, company in webnotes.conn.get_values("Warehouse",
self.doclist.get_distinct_values("warehouse"), "company").items():
@@ -71,46 +81,6 @@
webnotes.msgprint(_("""Tax Category can not be 'Valuation' or 'Valuation and Total'
as all items are non-stock items"""), raise_exception=1)
- def update_item_details(self):
- for item in self.doclist.get({"parentfield": self.fname}):
- ret = get_item_details({
- "doctype": self.doc.doctype,
- "docname": self.doc.name,
- "item_code": item.item_code,
- "warehouse": item.warehouse,
- "supplier": self.doc.supplier,
- "transaction_date": self.doc.posting_date,
- "conversion_rate": self.doc.conversion_rate,
- "price_list_name": self.doc.price_list_name,
- "price_list_currency": self.doc.price_list_currency,
- "plc_conversion_rate": self.doc.plc_conversion_rate
- })
- for r in ret:
- if not item.fields.get(r):
- item.fields[r] = ret[r]
-
- def validate_conversion_rate(self, currency_field, conversion_rate_field):
- """common validation for currency and price list currency"""
-
- currency = self.doc.fields.get(currency_field)
- conversion_rate = flt(self.doc.fields.get(conversion_rate_field))
- conversion_rate_label = self.meta.get_label(conversion_rate_field)
-
- if conversion_rate == 0:
- msgprint(conversion_rate_label + _(' cannot be 0'), raise_exception=True)
-
- # parenthesis for 'OR' are necessary as we want it to evaluate as
- # mandatory valid condition and (1st optional valid condition
- # or 2nd optional valid condition)
- valid_conversion_rate = (conversion_rate and
- ((currency == self.company_currency and conversion_rate == 1.00)
- or (currency != self.company_currency and conversion_rate != 1.00)))
-
- if not valid_conversion_rate:
- msgprint(_('Please enter valid ') + conversion_rate_label + (': ')
- + ("1 %s = [?] %s" % (currency, self.company_currency)),
- raise_exception=True)
-
def set_total_in_words(self):
from webnotes.utils import money_in_words
company_currency = get_company_currency(self.doc.company)
@@ -121,154 +91,54 @@
self.doc.currency)
def calculate_taxes_and_totals(self):
- self.doc.conversion_rate = flt(self.doc.conversion_rate)
- self.item_doclist = self.doclist.get({"parentfield": self.fname})
- self.tax_doclist = self.doclist.get({"parentfield": "purchase_tax_details"})
-
- self.calculate_item_values()
- self.initialize_taxes()
- self.calculate_net_total()
- self.calculate_taxes()
- self.calculate_totals()
- self.calculate_outstanding_amount()
-
- self._cleanup()
+ self.other_fname = "purchase_tax_details"
+ super(BuyingController, self).calculate_taxes_and_totals()
+ self.calculate_total_advance("Purchase Invoice", "advance_allocation_details")
def calculate_item_values(self):
- def _set_base(item, print_field, base_field):
- """set values in base currency"""
- item.fields[base_field] = flt((flt(item.fields[print_field],
- self.precision.item[print_field]) * self.doc.conversion_rate),
- self.precision.item[base_field])
-
- for item in self.item_doclist:
- round_floats_in_doc(item, self.precision.item)
+ # hack! - cleaned up in _cleanup()
+ if self.doc.doctype != "Purchase Invoice":
+ df = self.meta.get_field("purchase_rate", parentfield=self.fname)
+ df.fieldname = "rate"
+ for item in self.item_doclist:
# hack! - cleaned up in _cleanup()
if self.doc.doctype != "Purchase Invoice":
item.rate = item.purchase_rate
- self.precision.item.rate = self.precision.item.purchase_rate
- item.discount = item.discount_rate
- self.precision.item.discount = self.precision.item.discount_rate
+ self.round_floats_in(item)
- if item.discount == 100:
- if not item.import_ref_rate:
- item.import_ref_rate = item.import_rate
- item.import_rate = 0
- else:
- if item.import_ref_rate:
- item.import_rate = flt(item.import_ref_rate *
- (1.0 - (item.discount_rate / 100.0)),
- self.precision.item.import_rate)
- else:
- # assume that print rate and discount are specified
- item.import_ref_rate = flt(item.import_rate /
- (1.0 - (item.discount_rate / 100.0)),
- self.precision.item.import_ref_rate)
+ if item.discount_rate == 100.0:
+ item.import_rate = 0.0
+ elif item.import_ref_rate:
+ item.import_rate = flt(item.import_ref_rate * (1.0 - (item.discount_rate / 100.0)),
+ self.precision("import_rate", item))
item.import_amount = flt(item.import_rate * item.qty,
- self.precision.item.import_amount)
+ self.precision("import_amount", item))
+ item.item_tax_amount = 0.0;
- _set_base(item, "import_ref_rate", "purchase_ref_rate")
- _set_base(item, "import_rate", "rate")
- _set_base(item, "import_amount", "amount")
-
- def initialize_taxes(self):
- for tax in self.tax_doclist:
- # initialize totals to 0
- tax.tax_amount = tax.total = 0.0
+ self._set_in_company_currency(item, "import_ref_rate", "purchase_ref_rate")
+ self._set_in_company_currency(item, "import_rate", "rate")
+ self._set_in_company_currency(item, "import_amount", "amount")
- # temporary fields
- tax.tax_amount_for_current_item = tax.grand_total_for_current_item = 0.0
-
- tax.item_wise_tax_detail = {}
-
- self.validate_on_previous_row(tax)
-
- round_floats_in_doc(tax, self.precision.tax)
-
def calculate_net_total(self):
- self.doc.net_total = 0
- self.doc.net_total_import = 0
+ self.doc.net_total = self.doc.net_total_import = 0.0
for item in self.item_doclist:
self.doc.net_total += item.amount
self.doc.net_total_import += item.import_amount
- self.doc.net_total = flt(self.doc.net_total, self.precision.main.net_total)
- self.doc.net_total_import = flt(self.doc.net_total_import,
- self.precision.main.net_total_import)
-
- def calculate_taxes(self):
- for item in self.item_doclist:
- item_tax_map = self._load_item_tax_rate(item.item_tax_rate)
- item.item_tax_amount = 0
-
- for i, tax in enumerate(self.tax_doclist):
- # tax_amount represents the amount of tax for the current step
- current_tax_amount = self.get_current_tax_amount(item, tax, item_tax_map)
-
- self.set_item_tax_amount(item, tax, current_tax_amount)
-
- # case when net total is 0 but there is an actual type charge
- # in this case add the actual amount to tax.tax_amount
- # and tax.grand_total_for_current_item for the first such iteration
- if not (current_tax_amount or self.doc.net_total or tax.tax_amount) and \
- tax.charge_type=="Actual":
- zero_net_total_adjustment = flt(tax.rate, self.precision.tax.tax_amount)
- current_tax_amount += zero_net_total_adjustment
-
- # store tax_amount for current item as it will be used for
- # charge type = 'On Previous Row Amount'
- tax.tax_amount_for_current_item = current_tax_amount
-
- # accumulate tax amount into tax.tax_amount
- tax.tax_amount += tax.tax_amount_for_current_item
-
- if tax.category == "Valuation":
- # if just for valuation, do not add the tax amount in total
- # hence, setting it as 0 for further steps
- current_tax_amount = 0
- else:
- current_tax_amount *= tax.add_deduct_tax == "Deduct" and -1.0 or 1.0
-
- # Calculate tax.total viz. grand total till that step
- # note: grand_total_for_current_item contains the contribution of
- # item's amount, previously applied tax and the current tax on that item
- if i==0:
- tax.grand_total_for_current_item = flt(item.amount +
- current_tax_amount, self.precision.tax.total)
-
- else:
- tax.grand_total_for_current_item = \
- flt(self.tax_doclist[i-1].grand_total_for_current_item +
- current_tax_amount, self.precision.tax.total)
-
- # in tax.total, accumulate grand total of each item
- tax.total += tax.grand_total_for_current_item
-
- # store tax_breakup for each item
- # DOUBT: should valuation type amount also be stored?
- tax.item_wise_tax_detail[item.item_code] = current_tax_amount
+ self.round_floats_in(self.doc, ["net_total", "net_total_import"])
def calculate_totals(self):
- if self.tax_doclist:
- self.doc.grand_total = flt(self.tax_doclist[-1].total,
- self.precision.main.grand_total)
- self.doc.grand_total_import = flt(
- self.doc.grand_total / self.doc.conversion_rate,
- self.precision.main.grand_total_import)
- else:
- self.doc.grand_total = flt(self.doc.net_total,
- self.precision.main.grand_total)
- self.doc.grand_total_import = flt(
- self.doc.grand_total / self.doc.conversion_rate,
- self.precision.main.grand_total_import)
+ self.doc.grand_total = flt(self.tax_doclist and \
+ self.tax_doclist[-1].total or self.doc.net_total, self.precision("grand_total"))
+ self.doc.grand_total_import = flt(self.doc.grand_total / self.doc.conversion_rate,
+ self.precision("grand_total_import"))
- self.doc.total_tax = \
- flt(self.doc.grand_total - self.doc.net_total,
- self.precision.main.total_tax)
+ self.doc.total_tax = flt(self.doc.grand_total - self.doc.net_total,
+ self.precision("total_tax"))
if self.meta.get_field("rounded_total"):
self.doc.rounded_total = round(self.doc.grand_total)
@@ -277,75 +147,31 @@
self.doc.rounded_total_import = round(self.doc.grand_total_import)
def calculate_outstanding_amount(self):
- if self.doc.doctype == "Purchase Invoice" and self.doc.docstatus == 0:
+ if self.doc.doctype == "Purchase Invoice" and self.doc.docstatus < 2:
self.doc.total_advance = flt(self.doc.total_advance,
- self.precision.main.total_advance)
+ self.precision("total_advance"))
self.doc.total_amount_to_pay = flt(self.doc.grand_total - flt(self.doc.write_off_amount,
- self.precision.main.write_off_amount), self.precision.main.total_amount_to_pay)
+ self.precision("write_off_amount")), self.precision("total_amount_to_pay"))
self.doc.outstanding_amount = flt(self.doc.total_amount_to_pay - self.doc.total_advance,
- self.precision.main.outstanding_amount)
+ self.precision("outstanding_amount"))
def _cleanup(self):
- for tax in self.tax_doclist:
- del tax.fields["grand_total_for_current_item"]
- del tax.fields["tax_amount_for_current_item"]
- tax.item_wise_tax_detail = json.dumps(tax.item_wise_tax_detail)
-
- # except in purchase invoice, rate field is purchase_rate
+ super(BuyingController, self)._cleanup()
+
+ # except in purchase invoice, rate field is purchase_rate
+ # reset fieldname of rate
if self.doc.doctype != "Purchase Invoice":
+ df = self.meta.get_field("rate", parentfield=self.fname)
+ df.fieldname = "purchase_rate"
+
for item in self.item_doclist:
item.purchase_rate = item.rate
del item.fields["rate"]
+
+ if not self.meta.get_field("item_tax_amount", parentfield=self.fname):
+ for item in self.item_doclist:
+ del item.fields["item_tax_amount"]
- item.discount_rate = item.discount
- del item.fields["discount"]
-
- def validate_on_previous_row(self, tax):
- """
- validate if a valid row id is mentioned in case of
- On Previous Row Amount and On Previous Row Total
- """
- if tax.charge_type in ["On Previous Row Amount", "On Previous Row Total"] and \
- (not tax.row_id or cint(tax.row_id) >= tax.idx):
- msgprint((_("Row") + " # %(idx)s [%(taxes_doctype)s]: " + \
- _("Please specify a valid") + " %(row_id_label)s") % {
- "idx": tax.idx,
- "taxes_doctype": tax.parenttype,
- "row_id_label": self.meta.get_label("row_id",
- parentfield="purchase_tax_details")
- }, raise_exception=True)
-
- def _load_item_tax_rate(self, item_tax_rate):
- if not item_tax_rate:
- return {}
- return json.loads(item_tax_rate)
-
- def get_current_tax_amount(self, item, tax, item_tax_map):
- tax_rate = self._get_tax_rate(tax, item_tax_map)
-
- if tax.charge_type == "Actual":
- # distribute the tax amount proportionally to each item row
- actual = flt(tax.rate, self.precision.tax.tax_amount)
- current_tax_amount = (self.doc.net_total
- and ((item.amount / self.doc.net_total) * actual)
- or 0)
- elif tax.charge_type == "On Net Total":
- current_tax_amount = (tax_rate / 100.0) * item.amount
- elif tax.charge_type == "On Previous Row Amount":
- current_tax_amount = (tax_rate / 100.0) * \
- self.tax_doclist[cint(tax.row_id) - 1].tax_amount_for_current_item
- elif tax.charge_type == "On Previous Row Total":
- current_tax_amount = (tax_rate / 100.0) * \
- self.tax_doclist[cint(tax.row_id) - 1].grand_total_for_current_item
-
- return flt(current_tax_amount, self.precision.tax.tax_amount)
-
- def _get_tax_rate(self, tax, item_tax_map):
- if item_tax_map.has_key(tax.account_head):
- return flt(item_tax_map.get(tax.account_head), self.precision.tax.rate)
- else:
- return tax.rate
-
def set_item_tax_amount(self, item, tax, current_tax_amount):
"""
item_tax_amount is the total tax amount applied on that item
@@ -354,28 +180,28 @@
TODO: rename item_tax_amount to valuation_tax_amount
"""
if tax.category in ["Valuation", "Valuation and Total"] and \
- item.item_code in self.stock_items:
- item.item_tax_amount += flt(current_tax_amount,
- self.precision.item.item_tax_amount)
+ self.meta.get_field("item_tax_amount", parentfield=self.fname):
+ item.item_tax_amount += flt(current_tax_amount, self.precision("item_tax_amount", item))
# update valuation rate
def update_valuation_rate(self, parentfield):
- for d in self.doclist.get({"parentfield": parentfield}):
- d.conversion_factor = d.conversion_factor or flt(webnotes.conn.get_value(
- "UOM Conversion Detail", {"parent": d.item_code, "uom": d.uom},
+ for item in self.doclist.get({"parentfield": parentfield}):
+ item.conversion_factor = item.conversion_factor or flt(webnotes.conn.get_value(
+ "UOM Conversion Detail", {"parent": item.item_code, "uom": item.uom},
"conversion_factor")) or 1
- if d.item_code and d.qty:
+
+ if item.item_code and item.qty:
+ self.round_floats_in(item)
+
+ purchase_rate = item.rate if self.doc.doctype == "Purchase Invoice" else item.purchase_rate
+
# if no item code, which is sometimes the case in purchase invoice,
# then it is not possible to track valuation against it
- d.valuation_rate = flt(((flt(d.purchase_rate, self.precision.item.purchase_rate) or
- flt(d.rate, self.precision.item.rate)) +
- (flt(d.item_tax_amount, self.precision.item.item_tax_amount) +
- flt(d.rm_supp_cost, self.precision.item.rm_supp_cost)) /
- flt(d.qty, self.precision.item.qty)) /
- flt(d.conversion_factor, self.precision.item.conversion_factor),
- self.precision.item.valuation_rate)
+ item.valuation_rate = flt((purchase_rate +
+ (item.item_tax_amount + item.rm_supp_cost) / item.qty) / item.conversion_factor,
+ self.precision("valuation_rate", item))
else:
- d.valuation_rate = 0.0
+ item.valuation_rate = 0.0
def validate_for_subcontracting(self):
if not self.doc.is_subcontracted and self.sub_contracted_items:
@@ -437,18 +263,6 @@
return bom_items
-
- @property
- def precision(self):
- if not hasattr(self, "_precision"):
- self._precision = webnotes._dict()
- self._precision.main = self.meta.get_precision_map()
- self._precision.item = self.meta.get_precision_map(parentfield = self.fname)
- if self.meta.get_field("purchase_tax_details"):
- self._precision.tax = self.meta.get_precision_map(parentfield = \
- "purchase_tax_details")
- return self._precision
-
@property
def sub_contracted_items(self):
if not hasattr(self, "_sub_contracted_items"):
@@ -473,4 +287,4 @@
from `tabItem` where name in (%s) and is_purchase_item='Yes'""" % \
(", ".join((["%s"]*len(item_codes))),), item_codes)]
- return self._purchase_items
+ return self._purchase_items
\ No newline at end of file
diff --git a/controllers/selling_controller.py b/controllers/selling_controller.py
index 80af337..3adc639 100644
--- a/controllers/selling_controller.py
+++ b/controllers/selling_controller.py
@@ -16,16 +16,40 @@
from __future__ import unicode_literals
import webnotes
-from webnotes.utils import cint
+from webnotes.utils import cint, flt, comma_or
from setup.utils import get_company_currency
+from selling.utils import get_item_details
from webnotes import msgprint, _
from controllers.stock_controller import StockController
class SellingController(StockController):
- def validate(self):
- super(SellingController, self).validate()
- self.set_total_in_words()
+ def onload_post_render(self):
+ self.set_price_list_currency("selling")
+
+ # contact, address, item details and pos details (if applicable)
+ self.set_missing_values()
+
+ self.set_taxes("Sales Taxes and Charges", "other_charges", "charge")
+
+ def set_missing_values(self, for_validate=False):
+ # set contact and address details for customer, if they are not mentioned
+ if self.doc.customer and not (self.doc.contact_person and self.doc.customer_address):
+ for fieldname, val in self.get_default_address_and_contact("customer").items():
+ if not self.doc.fields.get(fieldname) and self.meta.get_field(fieldname):
+ self.doc.fields[fieldname] = val
+
+ self.set_missing_item_details(get_item_details)
+
+ def get_other_charges(self):
+ self.doclist = self.doc.clear_table(self.doclist, "other_charges")
+ self.set_taxes("Sales Taxes and Charges", "other_charges", "charge")
+
+ def set_customer_defaults(self):
+ self.get_default_customer_address()
+
+ if self.meta.get_field("shipping_address"):
+ self.doc.fields.update(self.get_shipping_address(self.doc.customer))
def set_total_in_words(self):
from webnotes.utils import money_in_words
@@ -71,4 +95,154 @@
if item.buying_amount and not item.cost_center:
msgprint(_("""Cost Center is mandatory for item: """) + item.item_code,
- raise_exception=1)
\ No newline at end of file
+ raise_exception=1)
+
+ def calculate_taxes_and_totals(self):
+ self.other_fname = "other_charges"
+
+ super(SellingController, self).calculate_taxes_and_totals()
+
+ self.calculate_total_advance("Sales Invoice", "advance_adjustment_details")
+ self.calculate_commission()
+ self.calculate_contribution()
+
+ def determine_exclusive_rate(self):
+ if not any((cint(tax.included_in_print_rate) for tax in self.tax_doclist)):
+ # no inclusive tax
+ return
+
+ for item in self.item_doclist:
+ item_tax_map = self._load_item_tax_rate(item.item_tax_rate)
+ cumulated_tax_fraction = 0
+ for i, tax in enumerate(self.tax_doclist):
+ tax.tax_fraction_for_current_item = self.get_current_tax_fraction(tax, item_tax_map)
+
+ if i==0:
+ tax.grand_total_fraction_for_current_item = 1 + tax.tax_fraction_for_current_item
+ else:
+ tax.grand_total_fraction_for_current_item = \
+ self.tax_doclist[i-1].grand_total_fraction_for_current_item \
+ + tax.tax_fraction_for_current_item
+
+ cumulated_tax_fraction += tax.tax_fraction_for_current_item
+
+ if cumulated_tax_fraction:
+ item.basic_rate = flt((item.export_rate * self.doc.conversion_rate) /
+ (1 + cumulated_tax_fraction), self.precision("basic_rate", item))
+
+ item.amount = flt(item.basic_rate * item.qty, self.precision("amount", item))
+
+ if item.adj_rate == 100:
+ item.base_ref_rate = item.basic_rate
+ item.basic_rate = 0.0
+ else:
+ item.base_ref_rate = flt(item.basic_rate / (1 - (item.adj_rate / 100.0)),
+ self.precision("base_ref_rate", item))
+
+ def get_current_tax_fraction(self, tax, item_tax_map):
+ """
+ Get tax fraction for calculating tax exclusive amount
+ from tax inclusive amount
+ """
+ current_tax_fraction = 0
+
+ if cint(tax.included_in_print_rate):
+ tax_rate = self._get_tax_rate(tax, item_tax_map)
+
+ if tax.charge_type == "On Net Total":
+ current_tax_fraction = tax_rate / 100.0
+
+ elif tax.charge_type == "On Previous Row Amount":
+ current_tax_fraction = (tax_rate / 100.0) * \
+ self.tax_doclist[cint(tax.row_id) - 1].tax_fraction_for_current_item
+
+ elif tax.charge_type == "On Previous Row Total":
+ current_tax_fraction = (tax_rate / 100.0) * \
+ self.tax_doclist[cint(tax.row_id) - 1].grand_total_fraction_for_current_item
+
+ return current_tax_fraction
+
+ def calculate_item_values(self):
+ for item in self.item_doclist:
+ self.round_floats_in(item)
+
+ if item.adj_rate == 100:
+ item.export_rate = 0
+ elif item.ref_rate:
+ item.export_rate = flt(item.ref_rate * (1.0 - (item.adj_rate / 100.0)),
+ self.precision("export_rate", item))
+
+ item.export_amount = flt(item.export_rate * item.qty,
+ self.precision("export_amount", item))
+
+ self._set_in_company_currency(item, "ref_rate", "base_ref_rate")
+ self._set_in_company_currency(item, "export_rate", "basic_rate")
+ self._set_in_company_currency(item, "export_amount", "amount")
+
+ def calculate_net_total(self):
+ self.doc.net_total = self.doc.net_total_export = 0.0
+
+ for item in self.item_doclist:
+ self.doc.net_total += item.amount
+ self.doc.net_total_export += item.export_amount
+
+ self.round_floats_in(self.doc, ["net_total", "net_total_export"])
+
+ def calculate_totals(self):
+ self.doc.grand_total = flt(self.tax_doclist and \
+ self.tax_doclist[-1].total or self.doc.net_total, self.precision("grand_total"))
+ self.doc.grand_total_export = flt(self.doc.grand_total / self.doc.conversion_rate,
+ self.precision("grand_total_export"))
+
+ self.doc.other_charges_total = flt(self.doc.grand_total - self.doc.net_total,
+ self.precision("other_charges_total"))
+ self.doc.other_charges_total_export = flt(self.doc.grand_total_export - self.doc.net_total_export,
+ self.precision("other_charges_total_export"))
+
+ self.doc.rounded_total = round(self.doc.grand_total)
+ self.doc.rounded_total_export = round(self.doc.grand_total_export)
+
+ def calculate_outstanding_amount(self):
+ # NOTE:
+ # write_off_amount is only for POS Invoice
+ # total_advance is only for non POS Invoice
+ if self.doc.doctype == "Sales Invoice" and self.doc.docstatus < 2:
+ self.round_floats_in(self.doc, ["grand_total", "total_advance", "write_off_amount",
+ "paid_amount"])
+ total_amount_to_pay = self.doc.grand_total - self.doc.write_off_amount
+ self.doc.outstanding_amount = flt(total_amount_to_pay - self.doc.total_advance - self.doc.paid_amount,
+ self.precision("outstanding_amount"))
+
+ def calculate_commission(self):
+ if self.meta.get_field("commission_rate"):
+ self.round_floats_in(self.doc, ["net_total", "commission_rate"])
+ if self.doc.commission_rate > 100.0:
+ msgprint(_(self.meta.get_label("commission_rate")) + " " +
+ _("cannot be greater than 100"), raise_exception=True)
+
+ self.doc.total_commission = flt(self.doc.net_total * self.doc.commission_rate / 100.0,
+ self.precision("total_commission"))
+
+ def calculate_contribution(self):
+ total = 0.0
+ sales_team = self.doclist.get({"parentfield": "sales_team"})
+ for sales_person in sales_team:
+ self.round_floats_in(sales_person)
+
+ sales_person.allocated_amount = flt(
+ self.doc.net_total * sales_person.allocated_percentage / 100.0,
+ self.precision("allocated_amount", sales_person))
+
+ total += sales_person.allocated_percentage
+
+ if sales_team and total != 100.0:
+ msgprint(_("Total") + " " +
+ _(self.meta.get_label("allocated_percentage", parentfield="sales_team")) +
+ " " + _("should be 100%"), raise_exception=True)
+
+ def validate_order_type(self):
+ valid_types = ["Sales", "Maintenance"]
+ if self.doc.order_type not in valid_types:
+ msgprint(_(self.meta.get_label("order_type")) + " " +
+ _("must be one of") + ": " + comma_or(valid_types),
+ raise_exception=True)
diff --git a/controllers/status_updater.py b/controllers/status_updater.py
new file mode 100644
index 0000000..ac06b2e
--- /dev/null
+++ b/controllers/status_updater.py
@@ -0,0 +1,177 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+from __future__ import unicode_literals
+import webnotes
+from webnotes.utils import flt, cstr
+from webnotes import msgprint
+
+from webnotes.model.controller import DocListController
+
+class StatusUpdater(DocListController):
+ """
+ Updates the status of the calling records
+ Delivery Note: Update Delivered Qty, Update Percent and Validate over delivery
+ Sales Invoice: Update Billed Amt, Update Percent and Validate over billing
+ Installation Note: Update Installed Qty, Update Percent Qty and Validate over installation
+ """
+
+ def update_prevdoc_status(self):
+ self.update_qty()
+ self.validate_qty()
+
+ def validate_qty(self):
+ """
+ Validates qty at row level
+ """
+ self.tolerance = {}
+ self.global_tolerance = None
+
+ for args in self.status_updater:
+ # get unique transactions to update
+ for d in self.doclist:
+ if d.doctype == args['source_dt'] and d.fields.get(args["join_field"]):
+ args['name'] = d.fields[args['join_field']]
+
+ # get all qty where qty > target_field
+ item = webnotes.conn.sql("""select item_code, `%(target_ref_field)s`,
+ `%(target_field)s`, parenttype, parent from `tab%(target_dt)s`
+ where `%(target_ref_field)s` < `%(target_field)s`
+ and name="%(name)s" and docstatus=1""" % args, as_dict=1)
+ if item:
+ item = item[0]
+ item['idx'] = d.idx
+ item['target_ref_field'] = args['target_ref_field'].replace('_', ' ')
+
+ if not item[args['target_ref_field']]:
+ msgprint("""As %(target_ref_field)s for item: %(item_code)s in \
+ %(parenttype)s: %(parent)s is zero, system will not check \
+ over-delivery or over-billed""" % item)
+ elif args.get('no_tolerance'):
+ item['reduce_by'] = item[args['target_field']] - \
+ item[args['target_ref_field']]
+ if item['reduce_by'] > .01:
+ msgprint("""
+ Row #%(idx)s: Max %(target_ref_field)s allowed for <b>Item \
+ %(item_code)s</b> against <b>%(parenttype)s %(parent)s</b> \
+ is <b>""" % item + cstr(item[args['target_ref_field']]) +
+ """</b>.<br>You must reduce the %(target_ref_field)s by \
+ %(reduce_by)s""" % item, raise_exception=1)
+
+ else:
+ self.check_overflow_with_tolerance(item, args)
+
+ def check_overflow_with_tolerance(self, item, args):
+ """
+ Checks if there is overflow condering a relaxation tolerance
+ """
+
+ # check if overflow is within tolerance
+ tolerance = self.get_tolerance_for(item['item_code'])
+ overflow_percent = ((item[args['target_field']] - item[args['target_ref_field']]) /
+ item[args['target_ref_field']]) * 100
+
+ if overflow_percent - tolerance > 0.01:
+ item['max_allowed'] = flt(item[args['target_ref_field']] * (100+tolerance)/100)
+ item['reduce_by'] = item[args['target_field']] - item['max_allowed']
+
+ msgprint("""
+ Row #%(idx)s: Max %(target_ref_field)s allowed for <b>Item %(item_code)s</b> \
+ against <b>%(parenttype)s %(parent)s</b> is <b>%(max_allowed)s</b>.
+
+ If you want to increase your overflow tolerance, please increase tolerance %% in \
+ Global Defaults or Item master.
+
+ Or, you must reduce the %(target_ref_field)s by %(reduce_by)s
+
+ Also, please check if the order item has already been billed in the Sales Order""" %
+ item, raise_exception=1)
+
+ def get_tolerance_for(self, item_code):
+ """
+ Returns the tolerance for the item, if not set, returns global tolerance
+ """
+ if self.tolerance.get(item_code): return self.tolerance[item_code]
+
+ tolerance = flt(webnotes.conn.get_value('Item',item_code,'tolerance') or 0)
+
+ if not tolerance:
+ if self.global_tolerance == None:
+ self.global_tolerance = flt(webnotes.conn.get_value('Global Defaults', None,
+ 'tolerance'))
+ tolerance = self.global_tolerance
+
+ self.tolerance[item_code] = tolerance
+ return tolerance
+
+
+ def update_qty(self, change_modified=True):
+ """
+ Updates qty at row level
+ """
+ for args in self.status_updater:
+ # condition to include current record (if submit or no if cancel)
+ if self.doc.docstatus == 1:
+ args['cond'] = ' or parent="%s"' % self.doc.name
+ else:
+ args['cond'] = ' and parent!="%s"' % self.doc.name
+
+ args['modified_cond'] = ''
+ if change_modified:
+ args['modified_cond'] = ', modified = now()'
+
+ # update quantities in child table
+ for d in self.doclist:
+ if d.doctype == args['source_dt']:
+ # updates qty in the child table
+ args['detail_id'] = d.fields.get(args['join_field'])
+
+ args['second_source_condition'] = ""
+ if args.get('second_source_dt') and args.get('second_source_field') \
+ and args.get('second_join_field'):
+ args['second_source_condition'] = """ + (select sum(%(second_source_field)s)
+ from `tab%(second_source_dt)s`
+ where `%(second_join_field)s`="%(detail_id)s"
+ and (docstatus=1))""" % args
+
+ if args['detail_id']:
+ webnotes.conn.sql("""update `tab%(target_dt)s`
+ set %(target_field)s = (select sum(%(source_field)s)
+ from `tab%(source_dt)s` where `%(join_field)s`="%(detail_id)s"
+ and (docstatus=1 %(cond)s)) %(second_source_condition)s
+ where name='%(detail_id)s'""" % args)
+
+ # get unique transactions to update
+ for name in set([d.fields.get(args['percent_join_field']) for d in self.doclist
+ if d.doctype == args['source_dt']]):
+ if name:
+ args['name'] = name
+
+ # update percent complete in the parent table
+ webnotes.conn.sql("""update `tab%(target_parent_dt)s`
+ set %(target_parent_field)s = (select sum(if(%(target_ref_field)s >
+ ifnull(%(target_field)s, 0), %(target_field)s,
+ %(target_ref_field)s))/sum(%(target_ref_field)s)*100
+ from `tab%(target_dt)s` where parent="%(name)s") %(modified_cond)s
+ where name='%(name)s'""" % args)
+
+ # update field
+ if args.get('status_field'):
+ webnotes.conn.sql("""update `tab%(target_parent_dt)s`
+ set %(status_field)s = if(ifnull(%(target_parent_field)s,0)<0.001,
+ 'Not %(keyword)s', if(%(target_parent_field)s>=99.99,
+ 'Fully %(keyword)s', 'Partly %(keyword)s'))
+ where name='%(name)s'""" % args)
\ No newline at end of file
diff --git a/docs/docs.dev.md b/docs/docs.dev.md
new file mode 100644
index 0000000..6c46abf
--- /dev/null
+++ b/docs/docs.dev.md
@@ -0,0 +1,15 @@
+---
+{
+ "_label": "Developer API",
+ "_toc": [
+ "docs.dev.quickstart",
+ "docs.dev.framework",
+ "docs.dev.modules"
+ ]
+}
+---
+### Is this for me?
+
+To starting hacking into ERPNext, you must have some understanding of how a dynamic web application works. There are hundreds of architectures and frameworks to make web development easier, but at the core there are a few elements that are important to understand.
+
+ERPNext is built on `wnframework` which is primarily developed for ERPNext but can be extended to make similar database driven applications. wnframework uses Python on the server-side and has a javascript based client for entering data, managing workflow and making reports.
\ No newline at end of file
diff --git a/docs/docs.dev.modules.md b/docs/docs.dev.modules.md
new file mode 100644
index 0000000..34fea9a
--- /dev/null
+++ b/docs/docs.dev.modules.md
@@ -0,0 +1,6 @@
+---
+{
+ "_label": "Modules"
+}
+---
+The models used in both `wnframework` (**Core** module) and ERPNext are listed here. The basic element of the model is a `DocType`, which is most often also a database table. The model properties are called `DocFields`, which describe the view and the database columns.
\ No newline at end of file
diff --git a/docs/docs.md b/docs/docs.md
new file mode 100644
index 0000000..7cf47a9
--- /dev/null
+++ b/docs/docs.md
@@ -0,0 +1,24 @@
+---
+{
+ "_label": "ERPNext",
+ "_no_title": 1,
+ "_toc": [
+ "docs.user",
+ "docs.dev",
+ "docs.download",
+ "docs.community",
+ "docs.blog",
+ "docs.about"
+ ]
+}
+---
+<div class="jumbotron">
+ <h1>ERPNext</h1>
+ <p>Open Source Organization Management Platform</p>
+</div>
+
+### Is this for me?
+
+To starting hacking into ERPNext, you must have some understanding of how a dynamic web application works. There are hundreds of architectures and frameworks to make web development easier, but at the core there are a few elements that are important to understand.
+
+ERPNext is built on `wnframework` which is primarily developed for ERPNext but can be extended to make similar database driven applications. wnframework uses Python on the server-side and has a javascript based client for entering data, managing workflow and making reports.
\ No newline at end of file
diff --git a/docs/docs.user.customize.custom_field.md b/docs/docs.user.customize.custom_field.md
new file mode 100644
index 0000000..9a7676b
--- /dev/null
+++ b/docs/docs.user.customize.custom_field.md
@@ -0,0 +1,20 @@
+---
+{
+ "_label": "Custom Field"
+}
+---
+A very common customization is adding of custom fields. You can add Custom Fields in any Master or Transaction in ERPNext. To add a Custom Field, go to:
+
+> Setup > Custom Field > New Custom Field
+
+In the form:
+
+- Select the Document on which you want to add the Custom Field.
+- Select the Type of field and the Options (see section on field types).
+- Select where you want to field to appear in the Form (“after field” section).
+
+and save the Custom Field. When you open a new / existing form of the type you selected in step 1, you will see it with the Custom Fields.
+
+#### Naming
+
+Many times you want your fields to be carried over from one form to another. For example, you may have added a Custom Field in Quotation that you want to include in Sales Order when a Sales Order is created from the Quotation. This is simple in ERPNext, just make sure the fields have the same “fieldname”
diff --git a/docs/docs.user.customize.custom_form.md b/docs/docs.user.customize.custom_form.md
new file mode 100644
index 0000000..2e649ae
--- /dev/null
+++ b/docs/docs.user.customize.custom_form.md
@@ -0,0 +1,23 @@
+---
+{
+ "_label": "Customize Form"
+}
+---
+Please read ERPNext Structure before you start customizing.
+
+You can Customize Forms by changing its layout, making certain fields mandatory, hiding others and changing permission levels on fields by going to:
+
+> Setup > Customize ERPNext > Customize Forms
+
+Select the Form you want to customize and the fields table will be updated with the fields from that form. Here you can:
+
+- Change field types (for e.g. you want to increase the number of decimal places, you can convert come fields from Float to Currency).
+- Change labels to suit your industry / language.
+- Make certain fields mandatory.
+- Hide certain fields.
+- Change layout (sequence of fields). To do this, select a field in the grid and click on “Up” or “Down” in the grid toolbar.
+- Add / edit “Select” Options. (for example, you can add more sources in Leads etc).
+
+You can also allow attachments, set max number of attachments and set the default Print Format.
+
+> Though we want you to do everything you can to customize your ERP based on your business needs, we recommend that you do not make “wild” changes to the forms. This is because, these changes may affect certain operations and may mess up your forms. Make small changes and see its effect before doing some more.
\ No newline at end of file
diff --git a/docs/docs.user.customize.md b/docs/docs.user.customize.md
new file mode 100644
index 0000000..b1e9701
--- /dev/null
+++ b/docs/docs.user.customize.md
@@ -0,0 +1,14 @@
+---
+{
+ "_label": "Customize ERPNext",
+ "_toc": [
+ "docs.user.customize.modules",
+ "docs.user.customize.custom_field",
+ "docs.user.customize.custom_form",
+ "docs.user.customize.print_format"
+ ]
+}
+---
+ERPNext offers many tools to customize the system.
+
+You simplify the forms by hiding features you don’t need using Disable Features and Module Setup, add Custom Fields, change form properties, like adding more options to drop-downs or hiding fields using Customize Form View and make your own Print Formats by using HTML Templates. You can also create multiple Letter Heads for your Prints.
diff --git a/docs/docs.user.customize.modules.md b/docs/docs.user.customize.modules.md
new file mode 100644
index 0000000..f838df9
--- /dev/null
+++ b/docs/docs.user.customize.modules.md
@@ -0,0 +1,22 @@
+---
+{
+ "_label": "Hiding Modules and Features"
+}
+---
+### Hiding Unused Features
+
+As you have seen from this manual that ERPNext contains tons of feature that you may not use. We have observed that most users start with using 20% of the features, though a different 20%. To hide fields belonging to features you will not use, go to:
+
+> Setup > Customize ERPNext > Disable Features.
+
+Check / uncheck the features you want to use and refresh your page for the changes to take effect.
+
+---
+
+### Hiding Module Icons
+
+To hide modules (icons) from the home page, go to:
+
+Setup > Customize ERPNext > Modules Setup
+
+> Note: Modules are automatically hidden for users that have no permissions on the documents within that module. For example, if a user has no permissions on Purchase Order, Purchase Request, Supplier, the “Buying” module will automatically be hidden.
diff --git a/docs/docs.user.customize.print_format.md b/docs/docs.user.customize.print_format.md
new file mode 100644
index 0000000..82857e8
--- /dev/null
+++ b/docs/docs.user.customize.print_format.md
@@ -0,0 +1,26 @@
+---
+{
+ "_label": "Print Format"
+}
+---
+Print Formats are the layouts that are generated when you want to Print or Email a transaction like a Sales Invoice. There are two types of Print Formats,
+
+- The auto-generated “Standard” Print Format: This type of format follows the same layout as the form and is generated automatically by ERPNext.
+- Based on the Print Format document. This is templates in HTML that will be rendered with data.
+
+ERPNext comes with a number of pre-defined templates in three styles: Modern, Classic and Spartan. You modify these templates or create their own. Editing ERPNext templates is not allowed because they may be over-written in an upcoming release.
+
+To create your own versions, open an existing template from:
+
+> Setup > Branding and Printing > Print Formats
+
+Select the type of Print Format you want to edit and click on the “Copy” button on the right column. A new Print Format will open up with “Is Standard” set as “No” and you can edit the Print Format.
+
+Editing a Print Format is a long discussion and you will have to know a bit of HTML, Javascript and Python to learn this. For help, please post on our forum.
+
+> Note: Pre-printed stationary is usually not a good idea because your Prints will look incomplete (inconsistent) when you send them by mail.
+
+#### Footers
+
+Many times you may want to have a standard footer for your prints with your address and contact information. Unfortunately due to the limited print support in HTML pages, it is not possible unless you get it scripted. Either you can use pre-printed stationary or add this information in your header.
+
diff --git a/docs/docs.user.intro.md b/docs/docs.user.intro.md
new file mode 100644
index 0000000..4aada62
--- /dev/null
+++ b/docs/docs.user.intro.md
@@ -0,0 +1,54 @@
+---
+{
+ "_label": "Introduction",
+ "_title_image": "img/why-erpnext.png"
+}
+---
+## What is an ERP and why should I care?
+
+Small business are not so different from large ones. They contain most of the complexities of a large business but with many more constraints. Small businesses have to communicate with customers, do accounts, pay taxes, do payroll, manage timelines, deliver quality, answer questions and keep everyone happy just like large businesses.
+
+And to it *efficiently*.
+
+Large businesses have the advantage of using advanced data systems to manage their process efficiently. Small businesses typically struggle to keep things organized. They are often using a mix of apps like spreadsheets, accounting software, web CRM etc to manage but not everyone is on the same page. An ERP changes that.
+
+---
+
+## What is ERPNext?
+
+ERPNext helps you to manage all your business information in one application and use it to manage operations and take decisions based on data.
+
+Among other things, ERPNext will help you to:
+
+- Track all Invoices and Payments.
+- Know what quantity of what product is available in stock.
+- Identify open customer queries.
+- Manage payroll.
+- Assign tasks and follow up on them.
+- Maintain a database of all your customers, suppliers and their contacts.
+- Prepare quotes.
+- Get reminders on maintenance schedules.
+- Publish you website.
+
+And a lot lot lot more.
+
+---
+
+## Why Should I Use ERPNext?
+
+ERPNext is a modern accounting plus everything system and has many benefits over both traditional accounting as well as ERP applications.
+
+### Benefits over traditional accounting software:
+
+- Do a lot more than just accounting! Manage inventory, billing, quotes, leads, payroll and much much more.
+- All data safe and in one place. Don’t keep hunting for data when you need it across spreadsheets and different computers.
+- Everyone on the same page. All users get the same update data.
+- Stop repetitive work. Don’t enter the same information from your word processor to your accounting tool. Its all integrated.
+- Keep track. Get the entire history of a customer or a deal in one place.
+
+### Benefits over big ERPs
+
+- $$$ - Save money.
+- Easier to configure. Big ERPs are notoriously hard to setup and will ask you a zillion questions before you can do something meaningful.
+- Easier to use. Modern web like user interface will keep your users happy and in familiar territory.
+- Open Source. This software is always free and you can host it anywhere you like.
\ No newline at end of file
diff --git a/docs/docs.user.md b/docs/docs.user.md
new file mode 100644
index 0000000..a1b3ddf
--- /dev/null
+++ b/docs/docs.user.md
@@ -0,0 +1,15 @@
+---
+{
+ "_label": "User Guide",
+ "_toc": [
+ "docs.user.intro",
+ "docs.user.setup",
+ "docs.user.ops",
+ "docs.user.website",
+ "docs.user.tools",
+ "docs.user.reports",
+ "docs.user.customize"
+ ]
+}
+---
+This manual covers all the major processes in setting up and using ERPNext. The manual is written in a way that the user can manage a self-implementation of the ERP. We recommend that the manual be read first before starting implementation.
diff --git a/docs/docs.user.ops.accounts.closing.md b/docs/docs.user.ops.accounts.closing.md
new file mode 100644
index 0000000..2c40bfa
--- /dev/null
+++ b/docs/docs.user.ops.accounts.closing.md
@@ -0,0 +1,21 @@
+---
+{
+ "_label": "Closing a Financial Period"
+}
+---
+At the end of every year (or quarter or maybe even monthly) after you complete your auditing, you close your books of accounts. This means that you make all your special entries like:
+
+- Depreciation
+- Change in value of Assets
+- Defer taxes and liabilities
+- Update bad debts
+
+etc. and book your Profit or Loss.
+
+By doing this, your Income and Expense Accounts become zero and you start a new Fiscal Year (or period) with a balanced Balance Sheet and fresh Profit and Loss.
+
+In ERPNext after making all the special entries via Journal Voucher, you can make all your Income and Expense accounts to zero via:
+
+> Accounts > Tools > Period Closing Voucher
+
+The Period Closing Voucher will make accounting entries (GL Entry) making all your Income and Expense Accounts zero and transferring the balance to the Account you define.
\ No newline at end of file
diff --git a/docs/docs.user.ops.accounts.journal_voucher.md b/docs/docs.user.ops.accounts.journal_voucher.md
new file mode 100644
index 0000000..18615d1
--- /dev/null
+++ b/docs/docs.user.ops.accounts.journal_voucher.md
@@ -0,0 +1,56 @@
+---
+{
+ "_label": "Journal Vouchers"
+}
+---
+All types of accounting entries other than **Sales Invoice** and **Purchase Invoice** are made using the **Journal Voucher**. A **Journal Voucher** (also called Journal Entry) is a standard accounting transaction that affects multiple Accounts and the sum of debits is equal to the sum of credits.
+
+To create a Journal Voucher go to:
+
+> Accounts > Journal Voucher > New Journal Voucher
+
+In a Journal Voucher, you must select.
+
+- Type of Voucher from the drop down.

+- Add rows for the individual accounting entries. In each row, you must specify:
+ - The Account that will be affected
+ - The amount to Debit or Credit
+ - The Cost Center (if it is an Income or Expense)
+ - Against Voucher: Link it to a voucher or invoice if it affects the “outstanding” amount of that invoice.
+ - Is Advance: Select “Yes” if you want to make it selectable in an Invoice.

+Other information in case it is a Bank Payment or a bill.
+
+#### Difference
+
+The “Difference” field is the difference between the Debit and Credit amounts. This should be zero if the Journal Voucher is to be “Submitted”. If this number is not zero, you can click on “Make Difference Entry” to add a new row with the amount required to make the total as zero.
+
+---
+
+## Common Entries
+
+A look at some of the common accounting entries that can be done via Journal Voucher.
+
+#### Expenses (non accruing)
+
+Many times it may not be necessary to accrue an expense, but it can be directly be booked against an expense Account on payment. For example a travel allowance or a telephone bill. You can directly debit Telephone Expense (instead of your telephone company) and credit your Bank on payment.
+
+- Debit: Expense Account (like Telephone expense)
+- Credit: Bank or Cash Account
+
+#### Bad Debts or Write Offs
+
+If you are writing off an Invoice as a bad debt, you can create a Journal Voucher similar to a Payment, except instead of debiting your Bank, you can debit an Expense Account called Bad Debts.
+
+- Debit: Bad Debts Written Off
+- Credit: Customer
+
+> Note: There may be regulations in your country before you can write off bad debts.
+
+#### Depreciation
+
+Depreciation is when you write off certain value of your assets as an expense. For example if you have a computer that you will use for say 5 years, you can distribute its expense over the period and pass a Journal Voucher at the end of each year reducing its value by a certain percentage.
+
+- Debit: Depreciation (Expense)
+- Credit: Asset (the Account under which you had booked the asset to be depreciated)
+
+> Note: There may be regulations in your country that define by how much amount you can depreciate a class of Assets.
diff --git a/docs/docs.user.ops.accounts.md b/docs/docs.user.ops.accounts.md
new file mode 100644
index 0000000..855913b
--- /dev/null
+++ b/docs/docs.user.ops.accounts.md
@@ -0,0 +1,52 @@
+---
+{
+ "_label": "Accounts",
+ "_toc": [
+ "docs.user.ops.accounts.sales_invoice",
+ "docs.user.ops.accounts.pos",
+ "docs.user.ops.accounts.purchase_invoice",
+ "docs.user.ops.accounts.journal_voucher",
+ "docs.user.ops.accounts.payments",
+ "docs.user.ops.accounts.returns",
+ "docs.user.ops.accounts.closing",
+ "docs.user.ops.accounts.reports"
+ ]
+}
+---
+At end of the sales and purchase cycle is billing and payments. You may have an accountant in your team, or you may be doing accounting yourself or you may have outsourced your accounting. Financial accounting forms the core of any business management system like an ERP.
+
+In ERPNext, your accounting operations consists of 3 main transactions:
+
+- Sales Invoice: The bills that you raise to your Customers for the products or services you provide.

+- Purchase Invoice: Bills that your Suppliers give you for their products or services.

+- Journal Vouchers: For accounting entries, like payments, credit and other types.
+
+---
+
+### Accounting Basics
+
+#### Debit and Credit
+
+People new to accounting are often confused with the terms Debit and Credit. Contrary to their meaning, these terms have nothing to do with who owes what.
+
+Debit and Credit are conventions. All accounting follows these so that it is easy to understand the state of finances in a universal manner. These conventions are:
+
+- All Accounts are of type Debit or Credit.
+- Assets and Expenses (and their sub-groups) are always Debit.
+- Liabilities and Income (and their sub-groups) are always Credit.
+- In all accounting entries, you “debit” an Account or “credit” one.
+- When you “debit” an Debit Account (an asset or expense), its value increases (“add” operation). When you “credit” a Debit Account, its value decreases (“subtract” operation). The same rule applies for Credit Accounts. “Crediting” a Credit Account, increases its value, “debiting” it decreases its value.
+- All accounting transactions (like a sales or a payment) must affect at least two different Accounts and sum of debits must be equal to sum of credits for the transaction. This is called the “double-entry bookkeeping system”.
+
+Still confused? These conventions will become clearer as you make transactions.
+
+#### Accrual System
+
+Another important concept to understand in Accounting is accrual. This is important when your payment happens separately from delivery.
+
+For example you buy X from a Supplier and your Supplier sends you a bill and expects you to pay in, for example, seven days. Even if you have not yet paid your Supplier, your expense must be booked immediately. This expense is booked against a group of Accounts called “Accounts Payable” that is the sum of all your outstanding dues to your Suppliers. This is called accrual. When you pay your Supplier, you will cancel his dues and update your bank account.
+
+ERPNext works on an accrual system. The transactions that accrue income and expense are Sales Invoice and Purchase Invoice.
+
+In retail, typically, delivery and payment happens at the same time. To cover this scenario, we have in ERPNext a POS Invoice (POS = Point of Sales). More on that later.
+
diff --git a/docs/docs.user.ops.accounts.payments.md b/docs/docs.user.ops.accounts.payments.md
new file mode 100644
index 0000000..25c9c4b
--- /dev/null
+++ b/docs/docs.user.ops.accounts.payments.md
@@ -0,0 +1,73 @@
+---
+{
+ "_label": "Making Payments"
+}
+---
+Payments made against Sales Invoices or Purchase Invoices can be made by clicking on “Make Payment Entry” button on “Submitted” invoices.
+
+1. Update the “Bank Account” (you can also set the default account in the Company master).
+1. Update posting date.
+1. Enter the check number, check date.
+1. Save and Submit.
+
+Payments can also be made independent of invoices by creating a new Journal Voucher and selecting the type of payment.
+
+#### Incoming Payment
+
+For payments from Customers,
+
+- Debit: Bank or Cash Account
+- Credit: Customer
+
+> Note: Remember to the “Against Sales Invoice” or “Is Advance” as applicable.
+
+#### Outgoing Payment
+
+For payments to Suppliers,
+
+- Debit: Supplier
+- Credit: Bank or Cash Account
+
+> Note: Remember to the “Against Purchase Invoice” or “Is Advance” as applicable.
+
+---
+
+### Reconciling Cheque (Check) Payments
+
+If you are receiving payments or making payments via cheques, the bank statements will not accurately match the dates of your entry, this is because the bank usually takes time to “clear” these payments. Also you may have mailed a cheque to your Supplier and it may be a few days before it is received and deposited by the Supplier. In ERPNext you can synchronize your bank statements and your Journal Vouchers using the “Bank Reconciliation” tool.
+
+To use this, go to:
+
+> Accounts > Bank Reconciliation
+
+Select your “Bank” Account and enter the dates of your statement. Here you will get all the “Bank Voucher” type entries. In each of the entry on the right most column, update the “Clearance Date” and click on “Update”.
+
+This way you will be able sync your bank statements and entries in the system.
+
+---
+
+## Managing Outstanding Payments
+
+In most cases, apart from retail sales, billing and payment are separate activities. There are several combinations in which these payments are done. These cases apply to both sales and purchases.
+
+- They can be upfront (100% in advance).
+- Post shipment. Either on delivery or within a few days of delivery.
+- Part in advance and part on or post delivery.
+- Payments can be made together for a bunch of invoices.
+- Advances can be given together for a bunch of invoices (and can be split across invoices).
+
+ERPNext allows you to manage all these scenarios. All accounting entries (GL Entry) can be made against a Sales Invoice, Purchase Invoice or Journal Vouchers (in special cases, an invoice can be made via a Sales Invoice too).
+
+The total outstanding amount against an invoice is the sum of all the accounting entries that are made “against” (or are linked to) that invoice. This way you can combine or split payments in Journal Vouchers to manage the scenarios.
+
+### Matching Payments to Invoices
+
+In complex scenarios, especially in the capital goods industry, sometimes there is no direct link between payments and invoices. You send invoices to your Customers and your Customer send you block payments or payments based on some schedule that is not linked to your invoices.
+
+In such cases, you can use the Payment to Invoice Matching Tool.
+
+> Accounts > Payment Reconciliation
+
+In this tool, you can select an account (your Customer’s account) and click on “Pull Payment Entries” and it will select all un-linked Journal Vouchers and Sales Invoices from that Customer.
+
+To cancel off some payments and invoices, select the Invoices and Journal Vouchers and click on “Reconcile”.
\ No newline at end of file
diff --git a/docs/docs.user.ops.accounts.pos.md b/docs/docs.user.ops.accounts.pos.md
new file mode 100644
index 0000000..a4ca430
--- /dev/null
+++ b/docs/docs.user.ops.accounts.pos.md
@@ -0,0 +1,44 @@
+---
+{
+ "_label": "Point of Sale (POS) Invoice"
+}
+---
+For retail operations, the delivery of goods, accrual of sale and payment all happens in one event, that is usually called the “Point of Sale”.
+
+You can make a Sales Invoice of type POS by checking on “Is POS”. When you check this, you will notice that some fields get hidden and some new ones emerge.
+
+> Tip: In retail, you may not create a separate Customer record for each customer. You can create a general Customer called “Walk-in Customer” and make all your transactions against this Customer record.
+
+#### Different sections of the POS
+
+- Update Stock: If this is checked, Stock Ledger Entries will be made when you “Submit” this Sales Invoice and there is no need for a separate Delivery Note.

+- In your Items table, you will also have to update inventory information like “Warehouse” (can come as default), “Serial Number” or “Batch Number” if applicable.

+- Update “Payment Details” like your Bank / Cash Account, paid amount etc.

+- If you are writing off certain amount, for example change or you get extra change, check on “Write off Outstanding Amount” and set the Account.
+
+#### POS Settings
+
+If you are in retail operations, you want your Point of Sale to be as quick and efficient as possible. To do this, you can create a POS Setting for a user from:
+
+Accounts > Point of Sale (POS) Setting
+
+and set default values as defined.
+
+---
+
+#### Accounting entries (GL Entry) for a Point of Sale:
+
+Debits:
+
+- Customer (grand total)
+- Bank / Cash (payment)
+
+Credits:
+
+- Income (net total, minus taxes for each Item)
+- Taxes (liabilities to be paid to the government)
+- Customer (payment)
+- Write Off (optional)
+
+To see entries after “Submit”, click on “View Ledger”.
+
diff --git a/docs/docs.user.ops.accounts.purchase_invoice.md b/docs/docs.user.ops.accounts.purchase_invoice.md
new file mode 100644
index 0000000..53bf8fb
--- /dev/null
+++ b/docs/docs.user.ops.accounts.purchase_invoice.md
@@ -0,0 +1,53 @@
+---
+{
+ "_label": "Purchase Invoice"
+}
+---
+Purchase Invoice is the exact opposite of your Sales Invoice. It is the bill that your Supplier sends your for products or services delivered. Here you accrue expenses to your Supplier. Making a Purchase Invoice is very similar to making a Purchase Order.
+
+To make a new Purchase Invoice, go to:
+
+> Accounts > Purchase Invoice > New Purchase Invoice
+
+or click on “Make Purchase Invoice” in Purchase Order or Purchase Receipt.
+
+The concept of “Posting Date” is again same as Sales Invoice. “Bill No” and “Bill Date” help you track the bill number as set by your Supplier for reference.
+
+#### Accounting Impact
+
+Like in Sales Invoice, you have to enter an Expense or Asset account for each row in your Items table to indicate if the Item is an Asset or an Expense. You must also enter a Cost Center. These can also be set in the Item master.
+
+The Purchase Invoice will affect your accounts as follows:
+
+Accounting entries (GL Entry) for a typical double entry “purchase”:
+
+Debits:
+
+- Expense or Asset (net totals, excluding taxes)
+- Taxes (assets if VAT-type or expense again).
+
+Credits:
+
+- Supplier
+
+To see entries in your Purchase Invoice after you “Submit”, click on “View Ledger”.
+
+---
+
+#### Is a purchase an “Expense” or “Asset”?
+
+If the Item is consumed immediately on purchase or if it is a service, then the purchase becomes an “Expense”. For example, a telephone bill or travel bill is an “Expense” - it is already consumed.
+
+For inventory Items, that have a value, these purchases are not yet “Expense”, because they still have a value while they remain in your stock. They are “Assets”. If they are raw-materials (used in a process), they will become “Expense” the moment they are consumed in the process. If they are to be sold to a Customer, the become “Expense” when you ship them to the Customer.
+
+Note: In ERPNext, this conversion from “Asset” to “Expense” is not clear. As of the current version, you will have to manually convert an item from an “Asset” to “Expense” via a Journal Voucher. We know its a shortcoming and will be fixed in an upcoming version pretty soon.
+
+---
+
+#### Deducting Taxes at Source
+
+In many countries, your laws may require to deduct taxes by a standard rate when you make payments to your Suppliers. Under these type of schemes, typically if a Supplier crosses a certain threshold of payment and if the type of product is taxable, you may have to deduct some tax (that you pay back to your government, on your Supplier’s behalf).
+
+To do this, you will have to make a new Tax Account under “Tax Liabilities” or similar and credit this Account by the percent you are bound to deduct for every transaction.
+
+For more help, please contact your Accountant!
\ No newline at end of file
diff --git a/docs/docs.user.ops.accounts.reports.md b/docs/docs.user.ops.accounts.reports.md
new file mode 100644
index 0000000..915808b
--- /dev/null
+++ b/docs/docs.user.ops.accounts.reports.md
@@ -0,0 +1,31 @@
+---
+{
+ "_label": "Reports"
+}
+---
+Some of the major accounting reports are:
+
+### General Ledger
+
+General Ledger is based on the table GL Entry and can be filtered by Account and between a period. This will help you get a full update for all entries done in that period for that Account.
+
+### Trial Balance
+
+Trial Balance is the list of Account balances for all your Accounts (“Ledger” and “Group”) on a particular date. For each Account it will give you the:
+
+- Opening
+- Debits
+- Credits
+- Closing
+
+The sum of all closing balances in a Trial Balance must be zero.
+
+### Accounts Payable and Accounts Receivable (AP / AR)
+
+These reports help you track the outstanding invoices to Customer and Suppliers. In this report, you will get your outstanding amounts period wise. i.e. between 0-30 days, 30-60 days and so on.
+
+You can also get your payables and receivables from direct reports on Sales Invoice and Purchase Invoice.
+
+### Sales and Purchase Register
+
+This is useful for making your tax statements invoice and Item wise. In this report, each tax Account is transposed in columns and for each Invoice and invoice Item, you will get how much individual tax has been paid based on the Taxes and Charges table.
diff --git a/docs/docs.user.ops.accounts.returns.md b/docs/docs.user.ops.accounts.returns.md
new file mode 100644
index 0000000..697c235
--- /dev/null
+++ b/docs/docs.user.ops.accounts.returns.md
@@ -0,0 +1,30 @@
+---
+{
+ "_label": "Handling Returns"
+}
+---
+Returns are a part of doing business. Your Customers may return Items in exchange of other Items or money back or you may return Items to your Supplier. In each case there could be a variety of scenarios.
+
+### Credit and Debit Notes
+
+Credit Notes are given to your Customers against a return that can be redeemed as cash or adjusted in another purchase. You can create a Journal Voucher of type Credit Note as follows:
+
+- Debit: Income
+- Credit: Customer
+
+Similarly if you are deducting an amount from your Supplier’s bill due to rejection or similar, you can issue a Debit Note to your Supplier. You can adjust the Debit Note against another pending Purchase Invoice (in which case, remember to set the “Against Purchase Invoice” column or return the money. In the second case you will have to create a new payment entry (Journal Voucher) when you receive the money. Entry for a Debit Note would be:
+
+- Debit: Supplier
+- Credit: Expense
+
+> If Items are also returned, remember to make a Delivery Note or Stock Entry for the Items.
+
+### Exchange
+
+If there is an exchange with your Customer, you can create a new POS type Sales Invoice in which the returning item has a negative quantity and the selling item has a positive quantity. In this way your taxes will also be adjusted against the return.
+
+### Sales and Purchase Return Wizard
+
+This is a tool that can help you automate the entry for this process. Go to:
+
+> Accounts > Tools > Sales and Purchase Return
\ No newline at end of file
diff --git a/docs/docs.user.ops.accounts.sales_invoice.md b/docs/docs.user.ops.accounts.sales_invoice.md
new file mode 100644
index 0000000..383ddf8
--- /dev/null
+++ b/docs/docs.user.ops.accounts.sales_invoice.md
@@ -0,0 +1,56 @@
+---
+{
+ "_label": "Sales Invoice"
+}
+---
+A Sales Invoice is a bill you send to your Customers against which they will process your payment.
+
+If you have managed to create Sales Orders or Delivery Notes, creating a Sales Invoice should be more of the same.
+
+You can create a Sales Invoice directly from
+
+> Accounting > Sales Invoice > New Sales Invoice
+
+or from the “Make Sales Invoice” button in the Sales Order or Delivery Note.
+
+#### Accounting Impact
+
+All Sales must be booked against an “Income Account”. This refers to an Account in the “Income” section of your Chart of Accounts. It is a good practice to classify your income by type (like product income, service income etc). The Income Account must be set for each row of the Items table.
+
+> Tip: To set default Income Accounts for Items, you can set it in the Item or Item Group.
+
+The other account that is affected is the Account of the Customer. That is automatically set from “Debit To” in the heading section.
+
+You must also mention the Cost Centers in which your Income must be booked. Remember that your Cost Centers tell you the profitability of the different lines of business or product. Again, you can set a default Cost Center in your Item master.
+
+#### Accounting entries (GL Entry) for a typical double entry “Sale”:
+
+When booking a sale (accrual):
+
+**Debit:** Customer (grand total)
+**Credit:** Income (net total, minus taxes for each Item)
+**Credit:** Taxes (liabilities to be paid to the government)
+
+> To see entries in your Sales Invoice after you “Submit”, click on “View Ledger”.
+
+#### Dates
+
+Posting Date: The date on which the Sales Invoice will affect your books of accounts i.e. your General Ledger. This will affect all your balances in that accounting period.
+
+Due Date: The date on which the payment is due (if you have sold on credit). This can be automatically be set from the Customer master.
+
+#### Recurring Invoices
+
+If you have a contract with a Customer where you bill the Customer on a monthly, quarterly, half-yearly or annual basis, you can check the “Recurring Invoice” box. Here you can fill in the details of how frequently you want to bill this Invoice and the period for which the contract is valid.
+
+ERPNext will automatically create new Invoices and mail it to the email ids you set.
+
+---
+
+#### "Pro Forma" Invoice
+
+If you want to give an Invoice to a Customer to make a payment before you deliver, i.e. you operate on a payment first basis, you should create a Quotation and title it as a “Pro-forma Invoice” (or something similar) using the Print Heading feature.
+
+“Pro Forma” means for formality. Why do this? Because if you book a Sales Invoice it will show up in your “Accounts Receivable” and “Income”. This is not ideal as your Customer may or may not decide to pay up. But since your Customer wants an “Invoice”, you could give the Customer a Quotation (in ERPNext) titled as “Pro Forma Invoice”. This way everyone is happy.
+
+This is a fairly common practice. We follow this at Web Notes too.
diff --git a/docs/docs.user.ops.buying.material_request.md b/docs/docs.user.ops.buying.material_request.md
new file mode 100644
index 0000000..f25f0ba
--- /dev/null
+++ b/docs/docs.user.ops.buying.material_request.md
@@ -0,0 +1,31 @@
+---
+{
+ "_label": "Material Request"
+}
+---
+A Material Request is a simple document identifying a requirement of a set of Items (products or services) for a particular reason.
+
+A Material Request can be generated:
+
+- By a User.
+- Automatically from a Sales Order.
+- Automatically when the Projected Quantity (more on this later) of an Item in stores reaches a particular level.
+- Automatically from your Bill of Materials if you use Production Plan to plan your manufacturing. (more on this later too)
+
+To generate a Material Request manually go to:
+
+> Buying > Material Request > New Material Request
+
+In the Material Request form,
+
+- Fill in the Items you want and their quantities.
+- If your Items are inventory items, you must also mention the Warehouse where you expect these Items to be delivered to. This helps you keep track of Projected Quantity for this Item.
+- You can also automatically get the Items from a Sales Order.
+- You can optionally add the Terms, using the Terms and Conditions master and also the reason.
+
+> Info: Material Request is not mandatory. It is ideal if you have centralized buying so that you can collect this information from various departments.
+
+#### Authorization
+
+If you want your Material Request to be authorized by a senior person like a Purchase Manger then you can give “Submit” rights to only that person. So everyone can create requests, but only the authorized person can “Submit”.
+
diff --git a/docs/docs.user.ops.buying.md b/docs/docs.user.ops.buying.md
new file mode 100644
index 0000000..e54e1fc
--- /dev/null
+++ b/docs/docs.user.ops.buying.md
@@ -0,0 +1,15 @@
+---
+{
+ "_label": "Buying",
+ "_toc": [
+ "docs.user.ops.buying.material_request",
+ "docs.user.ops.buying.supplier_quotation",
+ "docs.user.ops.buying.purchase_order"
+ ]
+}
+---
+If your business involves physical goods, buying is on of your core business activities. Your suppliers are as important as your customers and they must be provided with as much accurate information as possible.
+
+Buying in right amounts at right quantities can affect your cash flow and profitability.
+
+ERPNext contains a set of transactions that will make your buying as efficient and seamless as possible.
diff --git a/docs/docs.user.ops.buying.purchase_order.md b/docs/docs.user.ops.buying.purchase_order.md
new file mode 100644
index 0000000..891bca3
--- /dev/null
+++ b/docs/docs.user.ops.buying.purchase_order.md
@@ -0,0 +1,30 @@
+---
+{
+ "_label": "Purchase Order"
+}
+---
+A Purchase Order is analogous to a Sales Order. It is usually a binding contract with your Supplier that you promise to buy this set of Items under the given conditions.
+
+In ERPNext, you can make a Purchase Order by going to:
+
+> Buying > Purchase Order > New Purchase Order
+
+A Purchase Order can also be automatically created from a Purchase Request or Supplier Quotation.
+
+Entering a Purchase Order is very similar to a Purchase Request, additionally you will have to set:
+
+- Supplier.

+- A “Required By” date on each Item: If you are expecting part delivery, your Supplier will know how much quantity to deliver at what date. This will help you from preventing over-supply. It will also help you track how well your Supplier is doing on timeliness.
+
+### Taxes
+
+If your Supplier is going to charge you additional taxes or charge like a shipping or insurance charge, you can add it here. It will help you to accurately track your costs. Also if some of these charges add to the value of the product you will have to mention in the Taxes table. You can also you templates for your taxes. For more information on setting up your taxes see the Purchase Taxes and Charges Master.
+
+
+### Value Added Taxes (VAT)
+
+Many times, the tax paid by you to a Supplier for an Item is the same tax you collect from your Customer. In many regions, what you pay to your government is only the difference between what you collect from your Customer and pay to your Supplier. This is called Value Added Tax (VAT).
+
+For example you buy Items worth X and sell them for 1.3X. So your Customer pays 1.3 times the tax you pay your Supplier. Since you have already paid tax to your Supplier for X, what your owe your government is only the tax on 0.3X.
+
+This is very easy to track in ERPNext since each tax head is also an Account. Ideally you must create two Accounts for each type of VAT you pay and collect, “Purchase VAT-X” (asset) and “Sales VAT-X” (liability), or something to that effect. Please contact your accountant if you need more help or post a query on our forums!
\ No newline at end of file
diff --git a/docs/docs.user.ops.buying.supplier_quotation.md b/docs/docs.user.ops.buying.supplier_quotation.md
new file mode 100644
index 0000000..19a86e7
--- /dev/null
+++ b/docs/docs.user.ops.buying.supplier_quotation.md
@@ -0,0 +1,17 @@
+---
+{
+ "_label": "Supplier Quotation"
+}
+---
+If you have multiple **Suppliers** who supply you with the same **Item**, you usually send out a message (Request for Quote) to various **Suppliers**. In many cases, again specially if you have centralized buying, you may want to record all the quotes so that
+
+- You can easily compare prices in the future
+- Audit whether all Suppliers were given the opportunity to quote.
+
+Supplier Quotations are not necessary for most small businesses. Always evaluate the cost of collecting information to the value it provides! You could only do this for high value items.
+
+You can make a Supplier Quotation directly from:
+
+> Buying > Supplier Quotation > New Supplier Quotation
+
+or directly from the Purchase Request.
diff --git a/docs/docs.user.ops.hr.appraisal.md b/docs/docs.user.ops.hr.appraisal.md
new file mode 100644
index 0000000..e5bf7ff
--- /dev/null
+++ b/docs/docs.user.ops.hr.appraisal.md
@@ -0,0 +1,10 @@
+---
+{
+ "_label": "Appraisal"
+}
+---
+In ERPNext, you can manage Employee Appraisals by creating an Appraisal Template for each role with the parameters that define the performance and giving a weight to each parameter.
+
+Once the Appraisal Template is completed, you can create Appraisal records for each period where you track performance. You can give points out of 5 for each parameter and the system will calculate the overall performance of the Employee.
+
+To make the Appraisal final, make sure to “Submit” it.
\ No newline at end of file
diff --git a/docs/docs.user.ops.hr.employee.md b/docs/docs.user.ops.hr.employee.md
new file mode 100644
index 0000000..a3f065d
--- /dev/null
+++ b/docs/docs.user.ops.hr.employee.md
@@ -0,0 +1,24 @@
+---
+{
+ "_label": "Employee Master"
+}
+---
+There are many fields you can add in your Employee records and the more information you update it will be useful as your organization keeps growing and more and more people come and go.
+
+Employee records also help in keeping a list of your team’s skills, previous employment history and also emergency information.
+
+To create new Employee go to:
+
+> HR > Employee > New Employee
+
+### Numbering Employees (Employee ID)
+
+By default, in ERPNext Employee Records are Numbered. You can have multiple series if you are a really large company and want to have separate numbering series for separate locations etc. You can set the numbering series just like any other transaction by going to:
+
+> Setup > Customize ERPNext > Numbering Series.
+
+Alternatively, you can create employees by the “Employee Number” field if you already have an existing Employee Numbering system you want to follow. To set this, go to
+
+> Setup > Global Defaults > HR
+
+and update the “Employee Records created by” field.
\ No newline at end of file
diff --git a/docs/docs.user.ops.hr.expense_claim.md b/docs/docs.user.ops.hr.expense_claim.md
new file mode 100644
index 0000000..fa6e847
--- /dev/null
+++ b/docs/docs.user.ops.hr.expense_claim.md
@@ -0,0 +1,24 @@
+---
+{
+ "_label": "Expense Claim"
+}
+---
+When Employee’s make expenses out their pocket on behalf of the company, like if they took a customer out for lunch, they can make a request for reimbursement via the Expense Claim form.
+
+To make a new Expense Claim, go to:
+
+> HR > Expense Claim > New Expense Claim
+
+Set the Employee ID, date and the list of expenses that are to be claimed and “Submit” the record.
+
+### Approving Expenses
+
+The person making the claim must also set the id of the user who will “Approve” these expenses and set the “Assign To” to notify the user of the request Approve.
+
+If the Approver sees the “form”, she or he can update the “Approved Amounts” and click on “Approve”. To cancel the claim, they can click on the “Reject” button.
+
+Comments can be added in the Comments section explaining why the claim was approved or rejected.
+
+### Booking the Expense and Reimbursement
+
+The approved Expense Claim must be then be converted into a Journal Voucher and a payment must be made. Note: This amount should not be clubbed with Salary because the amount will then be taxable to the Employee.
diff --git a/docs/docs.user.ops.hr.leave.md b/docs/docs.user.ops.hr.leave.md
new file mode 100644
index 0000000..3dc8bb1
--- /dev/null
+++ b/docs/docs.user.ops.hr.leave.md
@@ -0,0 +1,31 @@
+---
+{
+ "_label": "Leave and Attendance"
+}
+---
+
+An Attendance record stating that an Employee has been present on a particular day can be created either manually by:
+
+> HR > Attendance > New Attendance
+
+Or if you are collecting attendance information via an automated system like a swipe card, then you can upload a CSV file with the attendance information.
+
+You can get a monthly report of your Attendance data by going to the “Monthly Attendance Details” report.
+
+To upload the attendance go to:
+
+> HR > Upload Attendance (sidebar)
+
+---
+
+### Leave Allotment
+
+Fixed number of leaves per Employee can be allocated using the Leave Allocation Tool. If you have special leaves to be allocated, you can also allocate them manually by create new Leave Allocation records.
+
+---
+
+### Leave Application
+
+If your company has a formal system where Employees have to apply for leaves and only if their leaves are approved they are considered as paid leaves, you can create Leave Application to track approval and usage of leaves. You have to mention the Employee, Leave Type and the period for which the leave is taken. If you want only certain users to approve leaves, you can give “Submission” rights to those users only.
+
+If you want all users to create their own Leave Applications, you can set their “Employee ID” as a match rule in the Leave Application Permission settings. See the earlier discussion on permission settings for more info.
diff --git a/docs/docs.user.ops.hr.md b/docs/docs.user.ops.hr.md
new file mode 100644
index 0000000..95da44a
--- /dev/null
+++ b/docs/docs.user.ops.hr.md
@@ -0,0 +1,20 @@
+---
+{
+ "_label": "Human Resource Management",
+ "_toc": [
+ "docs.user.ops.hr.setup",
+ "docs.user.ops.hr.employee",
+ "docs.user.ops.hr.leave",
+ "docs.user.ops.hr.expense_claim",
+ "docs.user.ops.hr.payroll",
+ "docs.user.ops.hr.appraisal"
+ ]
+}
+---
+The Human Resources (HR) Module covers the processes linked to administering a team of co-workers. Most common among this is processing payroll by using the Salary Manager to generate Salary Slips. Most countries have complex tax rules stating what expenses can the company made on behalf of Employees and also expect the company to deduct taxes and social security from their payroll.
+
+Apart from that you can also track Leave Applications and balances, Expense Claims and upload Attendance data (even though the world has moved to a result-oriented culture, some countries still mandate companies to maintain an attendance register to ensure you are not over-working your team).
+
+You can also create a template for Appraisals and also record the performance using the Appraisal record.
+
+> Confession: No, we don’t like the terms human “resources” and “employees” either, but since this terms are widely used and accepted for administrative procedures, we will use them here.
\ No newline at end of file
diff --git a/docs/docs.user.ops.hr.payroll.md b/docs/docs.user.ops.hr.payroll.md
new file mode 100644
index 0000000..a2ad250
--- /dev/null
+++ b/docs/docs.user.ops.hr.payroll.md
@@ -0,0 +1,54 @@
+---
+{
+ "_label": "Salary and Payroll"
+}
+---
+To process Payroll in ERPNext,
+
+1. Create Salary Structures for all Employees.
+1. Generate Salary Slips via the Salary Manager Tool.
+1. Book the Salary in your Accounts.
+
+### Salary Structure
+
+The Salary Structure represents how Salaries are calculated based on Earnings and Deductions. To create a new Salary Structure go to:
+
+> HR > Salary and Payroll > Salary Structure > New Salary Structure
+
+### In the Salary Structure,
+
+- Select the Employee
+- Set the starting date from which this is valid (Note: There can only be one Salary Structure that can be “Active” for an Employee during any period)
+- In the “Earnings” and “Deductions” table all your defined Earning Type and Deductions Type will be auto-populated. Set the values of the Earnings and Deductions and save the Salary Structure.
+
+### Leave Without Pay (LWP)
+
+Leave Without Pay (LWP) happens when an Employee runs out of allocated leaves or takes a leave without an approval (via Leave Application). If you want ERPNext to automatically deduct salary in case of LWP, then you must check on the “Apply LWP” column in the Earning Type and Deduction Type masters. The amount of pay cut is the proportion of LWP days divided by the total working days for the month (based on the Holiday List).
+
+If you don’t want ERPNext to manage LWP, just don’t click on LWP in any of the Earning Types and Deduction Types.
+
+---
+
+### Creating Salary Slips
+
+Once the Salary Structure is created, you can process your payroll for the month using the Salary Manager
+
+> HR > Salary and Payroll > Process Payroll
+
+In the Salary Manager tool,
+
+1. Select the Company for which you want to create the Salary Slips.
+1. Select the Month and the Year for which you want to create the Salary Slips.
+1. Click on “Create Salary Slips”. This will create Salary Slip records for each active Employee for the month selected. If the Salary Slips are created, the system will not create any more Salary Slips. All updates will be shown in the “Activity Log” section.
+1. Once all Salary Slips are created, you can check if they are created correctly or edit it if you want to deduct Leave Without Pay (LWP).
+1. After checking, you can “Submit” them all together by clicking on “Submit Salary Slips”. 1. If you want them to be automatically emailed to the Employee, make sure to check the “Send Email” box.
+
+### Booking Salaries in Accounts
+
+The final step is to book the Salaries in your Accounts.
+
+Salaries in businesses are usually dealt with extreme privacy. In most cases, the companies issues a single payment to the bank combining all salaries and the bank distributes the salaries to each employee’s salary account. This way there is only one payment entry in the company’s books of accounts and anyone with access to the company’s accounts will not have access to the individual salaries.
+
+The salary payment entry is a Journal Voucher entry that debits the total salary of all Employees to the Salary Account and credits the company’s bank Account.
+
+To generate your salary payment voucher from the Salary Manager, click on “Make Bank Voucher” and a new Journal Voucher with the total salaries will be created.
\ No newline at end of file
diff --git a/docs/docs.user.ops.hr.setup.md b/docs/docs.user.ops.hr.setup.md
new file mode 100644
index 0000000..a796c36
--- /dev/null
+++ b/docs/docs.user.ops.hr.setup.md
@@ -0,0 +1,32 @@
+---
+{
+ "_label": "Human Resource Setup"
+}
+---
+The HR module has a setup process where you create the masters for all the major activities.
+
+### Organization Setup
+
+To setup your Employee master you must first create:
+
+- Employment Type (like Permanent, Temp, Contractor, Intern etc).
+- Branch (if there are multiple offices).
+- Department (if any, like Accounting, Sales etc).
+- Designation (CEO, Sales Manager etc).
+- Grade (A, B, C etc, usually based on seniority).
+
+### Leave Setup
+
+To setup Leaves, create:
+
+- Leave Type (like Sick Leave, Travel Leave etc)
+- Holiday List (list of annual holidays for the year - these days will not be considered in Leave Applications).
+
+### Payroll (Salary) Setup
+
+In ERPNext, salaries have two types of components, earnings (basic salary, expenses paid by the company, like telephone bill, travel allowance etc) and deductions (amounts deducted for taxes, social security etc). To setup payroll, you must first setup all the different types of earnings and deductions. These are
+
+- Earning Type
+- Deduction Type
+
+These are just labels, we will see how to use them when we discuss the payroll section.
diff --git a/docs/docs.user.ops.inventory.delivery_note.md b/docs/docs.user.ops.inventory.delivery_note.md
new file mode 100644
index 0000000..447d2db
--- /dev/null
+++ b/docs/docs.user.ops.inventory.delivery_note.md
@@ -0,0 +1,43 @@
+---
+{
+ "_label": "Delivery Note"
+}
+---
+A Delivery Note is made when a shipment is shipped from the company’s Warehouse.
+
+A copy of the Delivery Note is usually sent with the transporter. The Delivery Note contains the list of Items that are sent in the shipment and updates the inventory.
+
+The entry of the Delivery Note is very similar to a Purchase Receipt. You can create a new Delivery Note from:
+
+> Stock > Delivery Note > New Delivery Note
+
+or from a “Submitted” Sales Order (that is not already shipped) by clicking on “Make Delivery Note”.
+
+You can also “fetch” the details from an unshipped Sales Order.
+
+You will notice that all the information about unshipped Items and other details are carried over from your Sales Order.
+
+### Shipping Packets or Items with Sales BOM
+
+If you are shipping Items that have a Sales BOM, ERPNext will automatically create a “Packing List” table for you based on the sub-Items in that Item. (See the Item explanation for more information).
+
+If your Items are serialized, then you for Sales BOM type of Items, you will have to update the Serial Number in the “Packing List” table.
+
+### Packing Items in to Cases for Container Shipment
+
+If you are doing container shipment or by weight, then you can use the Packing Slip to breakup your Delivery Note into smaller units. To make a Packing Slip go to:
+
+Stock > Packing Slip > New Packing Slip
+
+You can create multiple Packing Slips for your Delivery Note and ERPNext will ensure that the quantities in the Packing Slip do not exceed the quantities in the Delivery Note.
+
+---
+
+#### Print Without Amounts
+
+If you want to print your Delivery Notes without the amount (this might be useful if you are shipping high value items), just check the “Print without Amount” box in the “More Info” section.
+
+#### What happens when the Delivery Note is “Submitted”?
+
+A Stock Ledger Entry is made for each Item and stock is updated.
+Pending Quantity in the Sales Order is updated (if applicable).
diff --git a/docs/docs.user.ops.inventory.md b/docs/docs.user.ops.inventory.md
new file mode 100644
index 0000000..4576f24
--- /dev/null
+++ b/docs/docs.user.ops.inventory.md
@@ -0,0 +1,41 @@
+---
+{
+ "_label": "Inventory",
+ "_toc": [
+ "docs.user.ops.inventory.purchase_receipt",
+ "docs.user.ops.inventory.delivery_note",
+ "docs.user.ops.inventory.stock_entry",
+ "docs.user.ops.inventory.sub_contracting",
+ "docs.user.ops.inventory.serialized"
+ ]
+}
+---
+For most small business that deal in physical goods, a large part of their net worth is invested in the stock in hand.
+
+### Best Practice
+
+There are two aspects to good material management:
+
+- **Good housekeeping / visual control:** Keep all your items in separate bins and each neatly stacked and labelled.

“A place for everything and everything in its place”

+- **Accurate Data:** Accurate data comes from good processes and recording each and every transaction. If you are only partially recording your inventory then your reports will be incorrect

“Garbage In Garbage Out”
+
+If you have good processes to control movement of goods within your organization, implementation in ERPNext will be a breeze.
+
+### Material Flow
+
+There are three main types of entries:
+
+- Purchase Receipt: Items received from Suppliers against Purchase Orders.

+- Stock Entry: Items transferred from one Warehouse to another.

+- Delivery Note: Items shipped to Customers.
+
+#### How does ERPNext track stock movement / levels?
+
+Tracking stock is not just about adding and subtracting quantities. Some complications arise when:
+
+- Back-dated (past) entries are made / edited: This affects future stock levels and may lead to negative stock.
+- Stock has to be valued based on First-in-First-out: ERPNext needs to maintain a sequence of all transactions to know the exact value of your Items.
+- Stock reports are required at any point in time in the past: You have to lookup what was the quantity / value your stock of Item X on date Y.
+
+To manage this, ERPNext collects all inventory transactions in a table called the Stock Ledger Entry. All Purchase Receipts, Stock Entries and Delivery Notes update this table.
+
diff --git a/docs/docs.user.ops.inventory.purchase_receipt.md b/docs/docs.user.ops.inventory.purchase_receipt.md
new file mode 100644
index 0000000..eab703c
--- /dev/null
+++ b/docs/docs.user.ops.inventory.purchase_receipt.md
@@ -0,0 +1,54 @@
+---
+{
+ "_label": "Purchase Receipt"
+}
+---
+Purchase Receipts are made when you accept material from your Supplier usually against a Purchase Order.
+
+You can also accept Purchase Receipts directly (you must set Purchase Order Required as “No” in Global Defaults).
+
+You can make a Purchase Receipt directly from:
+
+> Stock > Purchase Receipt > New Purchase Receipt
+
+or from a “Submitted” Purchase Order, by clicking on “Make Purchase Receipt”.
+
+### Rejections
+
+In the Purchase Receipt, you will need to enter if all the materials you receive are of accepted quality (if you check). If you have any rejections, update the “Rejected Quantity” column in the Items table.
+
+If you reject, you will need to enter a “Rejected Warehouse” to indicate where you are storing the rejected Items.
+
+### Quality Inspections
+
+If for certain Items it is mandatory for your to record Quality Inspections (you have set it in your Item master), you will need to update the “Quality Inspection No” (QA No) column. The system will only allow you to “Submit” the Purchase Receipt if you update the “Quality Inspection No”.
+
+### UOM Conversions
+
+If your Purchase Order for an Item is in a different Unit of Measure (UOM) than what you stock (Stock UOM), then you will need to update the “UOM Conversion Factor”. See the Item settings for more information.
+
+### Currency Conversions
+
+Since the incoming Item affects the value of your inventory, it is important to convert it into your base Currency if you have ordered in another Currency. You will need to update the Currency Conversion Rate if applicable.
+
+### Taxes and Valuation
+
+Some of your taxes and charges may affect your Items value. For example a Tax may not be added to your Item’s valuation, because if you sell the Item, you will have to add the tax at that time. So make sure to mark all your taxes in the Taxes and Charges table correctly for accurate valuation.
+
+### Serial Numbers and Batches
+
+If your Item is serialized or batched, you will have to enter Serial Number and Batch in the Items table. You are allowed to enter multiple Serial Numbers in one row (each on a separate line) and you must enter the same number of Serial Numbers as the quantity. You must enter each Batch number on a separate line.
+
+---
+
+#### What happens when the Purchase Receipt is “Submitted”?
+
+A Stock Ledger Entry is created for each Item adding the Item in the Warehouse by the “Accepted Quantity”
+If you have rejections, a Stock Ledger Entry is made for each Rejection.
+The “Pending Quantity” is updated in the Purchase Order.
+
+---
+
+#### Adding value to your Items post Purchase Receipt:
+
+Some times, certain expenses that add value to your purchased Items are known only after sometime. Common example is if you are importing the Items, you will come to know of Customs Duty etc only when your “Clearing Agent” sends you a bill. If you want to attribute this cost to your purchased Items, you will have to use the Landed Cost Wizard. Why “Landed Cost”? Because it represents the charges that you paid when it landed in your possession.
\ No newline at end of file
diff --git a/docs/docs.user.ops.inventory.serialized.md b/docs/docs.user.ops.inventory.serialized.md
new file mode 100644
index 0000000..bc5d33e
--- /dev/null
+++ b/docs/docs.user.ops.inventory.serialized.md
@@ -0,0 +1,25 @@
+---
+{
+ "_label": "Serialized Inventory"
+}
+---
+As we discussed in the **Item** section, if an **Item** is *serialized*, a **Serial Number** (Serial No) record is maintained for each quantity of that **Item**. This information is helpful in tracking the location of the Serial No, its warranty and end-of-life (expiry) information.
+
+**Serial Nos** are also useful to maintain fixed assets. **Maintenance Schedules** can also be created against serial numbers for planning and scheduling maintenance activity for these assets (if they require maintenance).
+
+You can also track from which **Supplier** your purchased the **Serial No** and to which **Customer** you have sold it. The **Serial No** status will tell you its current inventory status.
+
+If your Item is *serialized* you will have to enter the Serial Nos in the related column with each Serial No in a new line.
+
+### Importing and Updating Serial Nos
+
+Serial Nos cannot be imported from Stock Reconciliation. To import Serial Nos, you will have to use the Data Import Tool. When you import the Serial Nos, the stock level of its corresponding Item will be automatically updated.
+
+
+### Using Serial Numbers for Multiple Purposes
+
+Serial Nos are a useful tool for tracking different kinds of Items, by using it along with Custom Fields. For example, in our internal system at Web Notes, each ERP account is a Serial No, with type of user “Plan” as the Item, its expiry date, whether it is Trial or Paid and other details as Custom Fields.
+
+We have known customers who use Serial Nos to track fixed assets, real-estate properties or advertisement slots or library books!
+
+Since Serial Nos are deeply linked with all the core modules, Selling, Buying, Inventory and Accounting, you may find many uses for them.
\ No newline at end of file
diff --git a/docs/docs.user.ops.inventory.stock_entry.md b/docs/docs.user.ops.inventory.stock_entry.md
new file mode 100644
index 0000000..848db39
--- /dev/null
+++ b/docs/docs.user.ops.inventory.stock_entry.md
@@ -0,0 +1,23 @@
+---
+{
+ "_label": "Stock Entry"
+}
+---
+A Stock Entry is a simple document that lets you record Item movement from a Warehouse, to a Warehouse and between Warehouses.
+
+This can be useful in also tracking:
+
+- Material Issues from Stores
+- Sales and Purchase Returns
+- Production (manufacturing).
+
+We will look into the special features of the Stock Entry later when we discuss Accounting and Manufacturing processes.
+
+To make a Stock Entry you have to go to:
+
+> Stock > Stock Entry
+
+In the Stock Entry you have to update the Items table with all your transactions. For each row, you must enter a “Source Warehouse” or a “Target Warehouse” or both (if you are recording a movement).
+
+> **Note:** To update Stock from a spreadsheet, see Stock Reconciliation.
+
diff --git a/docs/docs.user.ops.inventory.sub_contracting.md b/docs/docs.user.ops.inventory.sub_contracting.md
new file mode 100644
index 0000000..5d66227
--- /dev/null
+++ b/docs/docs.user.ops.inventory.sub_contracting.md
@@ -0,0 +1,18 @@
+---
+{
+ "_label": "Subcontracting"
+}
+---
+If you business involves outsourcing certain processes to a third party Supplier, where you buy the raw material, you can track this by using the sub-contracting feature of ERPNext.
+
+To setup sub-contracting:
+
+1. Create separate Items for the unprocessed and the processed product. For example if you supply unpainted X to your Supplier and the Supplier returns you X, you can create two Items: “X-unpainted” and “X”.
+1. Create a Warehouse for your Supplier so that you can keep track of Items supplied. (you may supply a month’s worth of Items in one go).
+1. For the processed Item, in the Item master set “Is Sub Contracted Item” to “Yes”.
+1. Make a Bill of Materials for the processed Item, with the unprocessed Items as a sub-items.
+1. Make a Purchase Order for the processed Item. When you “Save”, in the “Raw Materials Detail”, all your un-processed Items will be updated based on your Bill of Materials.
+ 1. Make sure that the “Rate” of this Item is the processing rate (excluding the raw material rate).
+ 1. ERPNext will automatically add the raw material rate for your valuation purpose when you receive the finished Item in your stock.

+1. Make a Stock Entry to deliver the raw material Items to your Supplier.
+1. Receive the Items from your Supplier via Purchase Receipt. Make sure to check the “Consumed Quantity” in the “Raw Materials” table so that the correct stock is maintained at the Supplier’s end.
diff --git a/docs/docs.user.ops.md b/docs/docs.user.ops.md
new file mode 100644
index 0000000..37d6026
--- /dev/null
+++ b/docs/docs.user.ops.md
@@ -0,0 +1,15 @@
+---
+{
+ "_label": "Managing Operations in ERPNext",
+ "_toc": [
+ "docs.user.ops.selling",
+ "docs.user.ops.buying",
+ "docs.user.ops.inventory",
+ "docs.user.ops.accounts",
+ "docs.user.ops.mfg",
+ "docs.user.ops.projects",
+ "docs.user.ops.support",
+ "docs.user.ops.hr"
+ ]
+}
+---
\ No newline at end of file
diff --git a/docs/docs.user.ops.mfg.bom.md b/docs/docs.user.ops.mfg.bom.md
new file mode 100644
index 0000000..7d1085d
--- /dev/null
+++ b/docs/docs.user.ops.mfg.bom.md
@@ -0,0 +1,20 @@
+---
+{
+ "_label": "Bill of Materials"
+}
+---
+At the heart of the Manufacturing system is the **Bill of Materials** (BOM). The **BOM** is a list of all material (either bought or made) and operations that go into a finished product or sub-Item. In ERPNext, the component could have its own BOM hence forming a tree of Items with multiple levels.
+
+To make accurate Purchase Requests, you must always maintain your correct BOMs. To make a new BOM:
+
+> Manufacturing > Bill of Materials > New BOM
+
+In the BOM form:
+
+- Select the Item for which you want to make the BOM.
+- Add the operations that you have to go through to make that particular Item in the “Operations” table. For each operation, you will be asked to enter a Workstation. You must create new Workstations as and when necessary.

+- Add the list of Items you require for each operation, with its quantity. This Item could be a purchased Item or a sub-assembly with its own BOM. If the row Item is a manufactured Item and has multiple BOMs, select the appropriate BOM.

You can also define if a part of the Item goes into scrap.
+
+Workstations are defined only for product costing purposes not inventory. Inventory is tracked in Warehouses not Workstations.
+
+> The “Full BOM” section will list all the Items of that BOM right up to the lower most child node. This table is automatically updated if any of the BOMs of the sub-Items are updated.
\ No newline at end of file
diff --git a/docs/docs.user.ops.mfg.md b/docs/docs.user.ops.mfg.md
new file mode 100644
index 0000000..fcf9c9f
--- /dev/null
+++ b/docs/docs.user.ops.mfg.md
@@ -0,0 +1,58 @@
+---
+{
+ "_label": "Manufacturing",
+ "_toc": [
+ "docs.user.ops.mfg.bom",
+ "docs.user.ops.mfg.planning",
+ "docs.user.ops.mfg.production_order"
+ ]
+}
+---
+The Manufacturing module in ERPNext helps you maintain multi-level Bill of Materials (BOMs) for your Items, help you in Product Costing, plan your production via Production Plan, create Production Orders for your manufacturing shop floor and plan your inventory by getting your material requirement via your BOMs (also called Material Requirements Planning MRP).
+
+### Types of Production Planning
+
+Broadly there are three types of Production Planning Systems
+
+- Make-to-Stock: In these systems, production is planned based on a forecast and then the Items are sold to distributors or customers. All fast moving consumer goods that are sold in retail shops like soaps, packaged water etc and electronics like phones etc are Made to Stock.
+- Make-to-Order: In these systems, manufacturing takes place after an firm order is placed by a Customer.
+- Engineer-to-Order: In this case each sale is a separate Project and has to be designed and engineered to the requirements of the Customer. Common examples of this are any custom business like furniture, machine tools, speciality devices, metal fabrication etc.
+
+Most small and medium sized manufacturing businesses are based on a make-to-order or engineer-to-order system and so is ERPNext.
+
+For engineer-to-order systems, the Manufacturing module should be used along with the Projects module.
+
+#### Manufacturing and Inventory
+
+You can track you work-in-progress by creating work-in-progress Warehouses.
+
+ERPNext will help you track material movement by automatically creating Stock Entries from your Production Orders by building form Bill of Materials.
+
+
+---
+
+### Material Requirements Planning (MRP):
+
+The earliest ERP systems were made for manufacturing. The earliest adopters were automobile companies who had thousands of raw materials and sub-assemblies and found it very hard to keep track of requirements and plan purchases. They started using computers to build the material requirements from forecasts and Bill of Materials.
+
+Later these systems were expanded to include Financial, Payroll, Order Processing and Purchasing and became the more generic Enterprise Resource Systems (ERP). More recently Customer Relationship Management (CRM) was added as a function and is now an integral part of ERP systems.
+
+These days the term ERP is used to describe systems that help manage any kind of organization like education institutes (Education ERP) or Hospitals (Hospital ERP) and so on.
+
+---
+
+### Best Practice: Lean Manufacturing
+
+The state of art manufacturing philosophy (the rationale behind the planning processes) comes from Japanese auto major Toyota. At the time when American manufacturers depended on MRP systems to plan their manufacturing based on their sales forecasts, they turned the problem on its head and discovered a leaner way of planning their production. They realized that:
+
+The biggest cause of wastage in manufacturing is variation (in product and quantity).
+
+So they standardized their products and sub-assemblies and sold fixed quantities based on what they produced not produce based on what they sold. This way, they had an extremely predictable and stable product mix. If they sold less than planned, they would simple stop production.
+
+Their card signaling system kanban, would notify all their suppliers to stop production too. Hence they never used any of the complex material planning tools like MRP to play day-to-day material requirements, but a simple signaling system that said either STOP or GO.
+
+They combined this system with neatly managed factories with well labeled racks.
+
+Like we discussed before, small manufacturing companies are usually make-to-order or engineer-to-order and can hardly afford to have a high level of standardization. But that should be the aim. Small manufacturing businesses should aim for repeatability by innovating processes so that there is a common platform for products.
+
+
diff --git a/docs/docs.user.ops.mfg.planning.md b/docs/docs.user.ops.mfg.planning.md
new file mode 100644
index 0000000..31de071
--- /dev/null
+++ b/docs/docs.user.ops.mfg.planning.md
@@ -0,0 +1,28 @@
+---
+{
+ "_label": "Production Planning Tool"
+}
+---
+Production Planning Tool helps you plan production and purchase of Items for a period (usually a week or a month).
+
+This list of Items can be generated from the open Sales Orders in the system and will generate:
+
+- Production Orders for each Item.
+- Purchase Requests for Items whose Projected Quantity is likely to fall below zero.
+
+To use the Production Planning Tool, go to:

+
+> Manufacturing > Production Planning Tool
+
+The Production Planning Tool is used in two stages:
+
+- Selection of Open Sales Orders for the period based on “Expected Delivery Date”.
+- Selection of Items from those Sales Orders.
+- Click on “Raise Production Orders”
+
+The tool will update if you have already created Production Orders for this Item against this Sales Order (“Planned Quantity”).
+
+You can always edit the Item list and increase / reduce quantities to plan your production.
+
+> Note: How do you change a Production Plan? The output of the Production Planning Tool is the Production Order. Once your orders are created, you can change them by amending the Production Orders.
+
diff --git a/docs/docs.user.ops.mfg.production_order.md b/docs/docs.user.ops.mfg.production_order.md
new file mode 100644
index 0000000..af1ecef
--- /dev/null
+++ b/docs/docs.user.ops.mfg.production_order.md
@@ -0,0 +1,27 @@
+---
+{
+ "_label": "Production Order"
+}
+---
+Production Order (also called as Work Order) is a document that is given to the manufacturing shop floor by the Production Planner as a signal to product a certain quantity of a certain Item. Production Order also helps to generate the material requirements (Stock Entry) for the Item to be produced from its **Bill of Materials**.
+
+The **Production Order** is generated directly from the **Production Planning Tool** based on Sales Orders. You can also create a direct Production Order by:
+
+> Manufacturing > Production Order > New Production Order
+
+- Select the Item to be produced (must have a Bill of Materials).
+- Select the BOM
+- Select Quantities
+- Select Warehouses. WIP (Work-in-Progress) is where your Items will be transferred when you begin production and FG (Finished Goods) where you store finished Items before they are shipped.
+- Select if you want to consider sub-assemblies (sub-Items that have their own BOM) as stock items or you want to explode the entire BOM when you make Stock Entries for this Item. What is means is that if you also maintain stock of your sub assemblies then you should set this as “No” and in your Stock Entires, it will also list the sub-assembly Item (not is sub-components).
+
+and “Submit” the Production Order.
+
+Once you “Submit”, you will see two more buttons:
+
+1. Make Transfer: This will create a Stock Entry with all the Items required to complete this Production Order to be added to the WIP Warehouse. (this will add sub-Items with BOM as one Item or explode their children based on your setting above).

+1. Back Flush: This will create a Stock Entry that will deduct all the sub-Items from the WIP Warehouse and add them to the Finished Goods Warehouse.
+
+When you Back Flush your Items back to the Finished Goods Warehouse, the “Produced Quantity” will be updated in the Production Order.
+
+> Tip: You can also partially complete a Production Order by updating the Finished Goods stock creating a Stock Entry and selecting “Back flush” as the type.
\ No newline at end of file
diff --git a/docs/docs.user.ops.projects.md b/docs/docs.user.ops.projects.md
new file mode 100644
index 0000000..28ab0cb
--- /dev/null
+++ b/docs/docs.user.ops.projects.md
@@ -0,0 +1,24 @@
+---
+{
+ "_label": "Projects"
+}
+---
+Managing Projects
+
+ERPNext helps you manage your Projects by breaking them into Tasks and allocating them to different people.
+
+Purchasing and selling can also be tracked against Projects and this can help the company keep tabs on its budget, delivery and profitability for a Project.
+
+Projects can be used to manage internal projects, manufacturing jobs or service jobs. For service jobs, Time Sheets can also be created that can be used to bill Customers if billing is done on a Time & Money basis.
+
+## Project
+
+The Project record maintains the details of your project and milestones that you have set. The Project record can be linked in Quotations, Sales Orders, Delivery Notes, Sales Invoices, Purchase Requests, Purchase Orders and Purchase Invoices. This way you can keep a track of all the activities that happen around this project.
+
+## Tasks
+
+Project is broken into Tasks and each Task is allocated to a resource. In ERPNext, you can also create an allocate a Task independently of a Project. If you define the start and end dates, it will add calendar events for the same and also show the task on the Gantt Chart that you can use for monitoring the Project.
+
+## Time Sheets
+
+You can create Time Sheets to track billable work to Customers. These Time Sheets can be tracked against Project and Tasks so that you can get reports on how much time was spent on each Task or Project.
\ No newline at end of file
diff --git a/docs/docs.user.ops.selling.lead.md b/docs/docs.user.ops.selling.lead.md
new file mode 100644
index 0000000..5e0f399
--- /dev/null
+++ b/docs/docs.user.ops.selling.lead.md
@@ -0,0 +1,29 @@
+---
+{
+ "_label": "Lead"
+}
+---
+To get the customer through the door, you may be doing all or any of the following:
+
+- Listing your product on directories.
+- Maintaining an updated and searchable website.
+- Meeting people at trade events.
+- Advertising your product or service.
+
+When you send out the word that you are around and have something valuable offer, people will come in to check out your product. These are your Leads.
+
+They are called Leads because they may lead you to sale. Sales people usually work on leads by calling them, building a relationship and sending information about your products or services. It is important to track all this conversation so that in case another person has to follow-up that person knows the history of this Lead.
+
+To create a Lead, go to:
+
+> Selling > Lead > New Lead
+
+ERPNext gives you a lot of options you may want to store about your Leads. For example what is the source, how likely are they to give you business etc. If you have a healthy number of leads, this information will help you prioritize who you want to work on.
+
+> **Tip:** ERPNext makes it easy to follow-up on leads by updating the “Next Contact” details. This will add a new event in the Calendar for the User who has to contact the lead next.
+
+### Difference between Lead, Contact and Customer
+
+The difference is that a Lead is a potential Customer, someone who can give you business. A Customer is an organization or individual who has given you business before (and has an Account in your system). A Contact is a person who belongs to the Customer.
+
+A Lead can be converted to a Customer by clicking on the “Create Customer” button. Once the Customer is created, the Lead becomes “Converted” and any further Opportunities from the same source can be created against the Customer.
diff --git a/docs/docs.user.ops.selling.md b/docs/docs.user.ops.selling.md
new file mode 100644
index 0000000..006a0f5
--- /dev/null
+++ b/docs/docs.user.ops.selling.md
@@ -0,0 +1,14 @@
+---
+{
+ "_label": "Selling",
+ "_toc": [
+ "docs.user.ops.selling.lead",
+ "docs.user.ops.selling.opportunity",
+ "docs.user.ops.selling.quotation",
+ "docs.user.ops.selling.sales_order"
+ ]
+}
+---
+Selling is that the communication that happens with the customer the prior to and during the sale. You might be managing all the communication yourself or you may have a small team of sales people to handle this. ERPNext helps you track the communication leading up to the sale, by keeping all your documents in an organized and searchable manner.
+
+ERPNext helps you track business **Opportunities** from **Leads** and **Customers**, send them **Quotations** and make confirmed **Sales Orders**.
diff --git a/docs/docs.user.ops.selling.opportunity.md b/docs/docs.user.ops.selling.opportunity.md
new file mode 100644
index 0000000..d3945b5
--- /dev/null
+++ b/docs/docs.user.ops.selling.opportunity.md
@@ -0,0 +1,16 @@
+---
+{
+ "_label": "Opportunity"
+}
+---
+When you know a Lead is looking for some products or services to buy, you can track that as an Opportunity.
+
+You can create an Opportunity from:
+
+> Selling > Opportunity > New Opportunity
+
+or open a “Open” Lead and click on “Create Opportunity” button.
+
+An Opportunity can also come from an existing Customer. You can create multiple Opportunities against the same Lead. In Opportunity, apart from the Communication, you can also add the Items for which the Lead or Contact is looking for.
+
+> Best Practice: Leads and Opportunities are often referred as your “Sales Pipeline” this is what you need to track if you want to be able to predict how much business you are going to get in the future. Its always a good idea to be able to track what is coming so that you can adjust your resources.
\ No newline at end of file
diff --git a/docs/docs.user.ops.selling.quotation.md b/docs/docs.user.ops.selling.quotation.md
new file mode 100644
index 0000000..6227d95
--- /dev/null
+++ b/docs/docs.user.ops.selling.quotation.md
@@ -0,0 +1,74 @@
+---
+{
+ "_label": "Quotation"
+}
+---
+During a sale, the customer may want you to give a written note about the products or services you are planning to offer along with the prices and other terms of engagement. This is called a “Proposal” or an “Estimate” or a “Pro Forma Invoice”or a Quotation.
+
+To create a new Quotation go to:
+
+> Selling > Quotation > New Quotation
+
+A Quotation contains details about:
+
+- Who is the recipient of the Quotation.
+- The Items and quantities you are offering.
+- The rates at which they are offered.
+- The taxes applicable.
+- Other charges (like shipping, insurance) if they are applicable.
+- The validity of contract.
+- The time of delivery.
+- Other conditions.
+
+> Tip: Images look great on Quotations. To add images to your Quotations, attach the corresponding image in the Item master.
+
+
+### Rates
+
+The rates you quote may depend on two things.
+
+- The Price List: If you have multiple Price Lists, you can select a Price List or tag it to the Customer (so that it is auto-selected). Your Item prices will automatically be updated from the Price List.
+- The Currency: If you are quoting to a Customer in a different currency, you will have to update the conversion rates so that ERPNext will also save the information in your standard Currency. This will help you to analyze the value of your Quotations in reports in your standard Currency.
+
+### Taxes
+
+To add taxes to your Quotation, you can either select a tax template, Sales Taxes and Charges Master or add the taxes on your own.
+
+You can add taxes in the same manner as the Sales Taxes and Charges Master.
+
+### Terms and Conditions
+
+Each Quotation must ideally contain a set of terms of your contract. It is usually a good idea to make templates of your Terms and Conditions, so that you have a standard set of terms. You can do this by going to:
+
+> Selling > Terms and Conditions (right sidebar)
+
+#### What should Terms and Conditions Contain?
+
+- Validity of the offer.
+- Payment Terms (In Advance, On Credit, part advance etc).
+- What is extra (or payable by the Customer).
+- Safety / usage warning.
+- Warranty if any.
+- Returns Policy.
+- Terms of shipping, if applicable.
+- Ways of addressing disputes, indemnity, liability, etc.
+- Address and Contact of your Company.
+
+### Submission
+
+Quotation is a “Submittable” transaction. Since you send this Quotation to your Customer or Lead, you must freeze it so that changes are not made after you send the Quotation. See Document Stages.
+
+> Tip: Quotations can also be titled as “Proforma Invoice” or “Proposal”. Select the right heading in the “Print Heading” field in the “More Info” section. To create new Print Headings go to Setup > Branding and Printing > Print Headings.
+
+## Dicounts
+
+While making your sales transactions like a Quotation (or Sales Order) you would already have noticed that there is a “Discount” column. On the left is the “Price List Rate” on the right is the “Basic Rate”. You can add a “Discount” value to update the basic rate.
+
+Since your taxes are calculated on Items, you must apply your discounts here so that you apply the tax on the discounted rate, which is the case for most taxes.
+
+The second way to apply discount is to add it in your Taxes and Charges table. This way you can explicitly show the Customer the discount you have applied on the order. If you choose this method, remember that you will tax your Customer at the full rate, not the discounted rate. So this is not a good way to track discounts.
+
+There is a third way to do it. Create an Item called “Discount” and make sure that all the taxes apply in the same way as the main Items. (This method is useful if only one type of tax is applicable on the sale). This way your “Discount” will appear as an expense. You will see a slightly higher income and expense but your profits will still remain the same. This method might be interesting where you want detailed accounting of your discounts.
+
+> Note: The maximum Discount that can be applied on an Item can up fixed in the Item master.
+
diff --git a/docs/docs.user.ops.selling.sales_order.md b/docs/docs.user.ops.selling.sales_order.md
new file mode 100644
index 0000000..148200d
--- /dev/null
+++ b/docs/docs.user.ops.selling.sales_order.md
@@ -0,0 +1,47 @@
+---
+{
+ "_label": "Sales Order"
+}
+---
+The Sales Order confirms your sales and triggers purchase (**Purchase Request**) shipment (**Delivery Note**), billing (**Sales Invoice**) and manufacturing (**Production Plan**)
+
+A Sales Order is usually a binding Contract with your Customer.
+
+Once your customer confirms the Quotation you can convert your Quotation into a Sales Order. Alternatively, you can create a Sales Order directly from:
+
+> Selling > Sales Order > New Sales Order
+
+Most of the information in your Sales Order is the same as the Quotation. There are a few of more things a Sales Order will ask you to update.
+
+- Expected date of delivery.
+- Customer Purchase Order number: If you customer has sent you a Purchase Order, you can update its number for future reference (in billing).
+
+#### Packing List
+
+The “Packing List” table will be automatically updated when you “Save” the Sales Order. If any Items in your table are Sales BOM (packets), then the “Packing List” will contain the exploded (detailed) list of your Items.
+
+#### Reservation and Warehouses
+
+If your Sales Order contains Items for which inventory is tracked (Is Stock Item is “Yes”). ERPNext will ask you for “Reservation Warehouse”. If you have set a default Warehouse for the Item, it will automatically set this Warehouse here.
+
+This “reserved” quantity will help you project what is the quantity you need to purchase based on all your commitments.
+
+#### Sales Team
+
+**Sales Partner:** If this Sale was booked via a Sales Partner, you can update the Sales Partner’s details with commission and other info that you can aggregate.
+
+**Sales Persons:** ERPNext allows you to tag multiple Sales Persons who may have worked on this deal. You can also split the amount in targets of different Sales Persons and track how much invectives they earned on this deal.
+
+#### Next Steps
+
+Once your “Submit” your Sales Order, you can now trigger different aspects of your organization:
+
+- To being purchase click on “Make Purchase Request”
+- To make a shipment entry click on “Make Delivery Note”
+- To bill, make “Make Sales Invoice”
+- To stop further process on this Sales Order, click on “Stop”
+
+#### Submission
+
+Sales Order is a “Submittable” transaction. See Document Stages. You will be able to execute dependent steps (like making a Delivery Note) only after “Submitting” this Sales Order.
+
diff --git a/docs/docs.user.ops.support.customer_issue.md b/docs/docs.user.ops.support.customer_issue.md
new file mode 100644
index 0000000..92cb29a
--- /dev/null
+++ b/docs/docs.user.ops.support.customer_issue.md
@@ -0,0 +1,17 @@
+---
+{
+ "_label": "Customer Issue"
+}
+---
+If you are selling **Items** under warranty or if you have sold and extended service contract Annual Maintenance Contract (AMC), your **Customer** may call you about an issue or a bread-down and give you the Serial No of this Item.
+
+To record this, you can create a new **Customer Issue** and add the **Customer** and **Item** / **Serial No**. The system will then automatically fetch the Serial No’s details and indicate whether this is under warranty or AMC.
+
+You must also add a description of the **Customer**’s issue and assign it to the person who needs to look into solving the issue.
+
+To create a new **Customer Issue**:
+
+> Support > Customer Issue > New Customer Issue
+
+If a Customer visit is required to address the issue, you can create a new Maintenance Visit record from this.
+
diff --git a/docs/docs.user.ops.support.maintenance_schedule.md b/docs/docs.user.ops.support.maintenance_schedule.md
new file mode 100644
index 0000000..82bf8f9
--- /dev/null
+++ b/docs/docs.user.ops.support.maintenance_schedule.md
@@ -0,0 +1,22 @@
+---
+{
+ "_label": "Maintenance Schedule"
+}
+---
+All machines require regular maintenance, specially those that contain a lot of moving parts, so if you are in the business of maintaining those or have some of them in your own premises, this is a useful tool to plan a calendar of activities for its maintenance.
+
+If the Customer Issue refers to “Breakdown Maintenance”, this refers to “Preventive Maintenance”.
+
+To create a new Maintenance Schedule go to:
+
+> Support > Maintenance Schedule > New Maintenance Schedule
+
+In the Maintenance Schedule, there are two sections:
+
+In the first section, you select the Items for which you want to generate the schedule and set how frequently you want to plan a visit or a maintenance. These can be optionally fetched from a Sales Order. After selecting the Items, “Save” the record.
+
+The second section contains the maintenance activities planned in the schedule. “Generate Schedule” will generate a separate row for each maintenance activity.
+
+Each Item in a Maintenance Schedule is allocated to a Sales Person.
+
+When the document is “Submitted” Calendar events are created in the profile of the Sales Person for each maintenance.
\ No newline at end of file
diff --git a/docs/docs.user.ops.support.maintenance_visit.md b/docs/docs.user.ops.support.maintenance_visit.md
new file mode 100644
index 0000000..dc115e2
--- /dev/null
+++ b/docs/docs.user.ops.support.maintenance_visit.md
@@ -0,0 +1,16 @@
+---
+{
+ "_label": "Maintenance Visit"
+}
+---
+A Maintenance Visit is a record for a visit made by an engineer to a Customer’s premises usually against a Customer Issue. You can create a new Maintenance Visit from:
+
+> Support > Maintenance Visit > New Maintenance Visit
+
+The Maintenance Visit contains information about the:
+
+- Customer.
+- The Items that were inspected / maintenance activity was carried out on.
+- Details of actions taken.
+- The person who carried out the actions.
+- Feedback from the Customer.
diff --git a/docs/docs.user.ops.support.md b/docs/docs.user.ops.support.md
new file mode 100644
index 0000000..16eefff
--- /dev/null
+++ b/docs/docs.user.ops.support.md
@@ -0,0 +1,14 @@
+---
+{
+ "_label": "Support",
+ "_toc": [
+ "docs.user.ops.support.support_ticket",
+ "docs.user.ops.support.customer_issue",
+ "docs.user.ops.support.maintenance_visit",
+ "docs.user.ops.support.maintenance_schedule"
+ ]
+}
+---
+Great customer support and maintenance is at the heart of any successful small business and ERPNext gives you the tools to track all incoming requests and issues from your customers so that you can respond quickly. Your database of incoming queries will also help you track where are the biggest opportunities for improvements.
+
+In this module, you can track incoming queries from your email using Support Ticket, keep track on Customer Issues raised by Customers on specific Serial No and respond to them based on their warranty and other information, make Maintenance Schedules for Serial Nos and keep a record of all Maintenance Visits made to your Customers.
diff --git a/docs/docs.user.ops.support.support_ticket.md b/docs/docs.user.ops.support.support_ticket.md
new file mode 100644
index 0000000..b4a496b
--- /dev/null
+++ b/docs/docs.user.ops.support.support_ticket.md
@@ -0,0 +1,26 @@
+---
+{
+ "_label": "Support Ticket"
+}
+---
+Support Ticket is an incoming query from your Customer, usually via email of from the “Contact” section of your website. (To fully integrate the Support Ticket to email, see the Email Settings section).
+
+> Tip: A dedicated support email id is a good way to integrate incoming queries via email. For example, you can send support queries to ERPNext at support@erpnext.com and it will automatically create a Support Ticket in the Web Notes system.
+
+#### Discussion Thread
+
+When a new email is fetched from your mailbox, a new Support Ticket record is created and an automatic reply is sent to the sender indicating the Support Ticket Number. The sender can send additional information to this email. All subsequent emails containing this Support Ticket number in the subject will be added to this Support Ticket thread. The sender can also add attachments to the email.
+
+Support Ticket maintains all the emails sent back and forth against this issue in the system so that you can track what transpired between the sender and the person responding.
+
+#### Status
+
+When a new Support Ticket is created, its status is “Open”, when it is replied, its status becomes “Waiting for Reply”. If the sender replies back its status again becomes “Open”.
+
+#### Closing
+
+You can either “Close” the Support Ticket manually by clicking on “Close Ticket” in the toolbar or if its status is “Waiting For Reply” and the sender did not reply in 7 days, then the Support Ticket closes automatically.
+
+#### Allocation
+
+You can allocate the Support Ticket by using the “Assign To” feature in the right sidebar. This will add a new To Do to the user and also send a message indicating that this Support Ticket is allocated.
\ No newline at end of file
diff --git a/docs/docs.user.reports.builder.md b/docs/docs.user.reports.builder.md
new file mode 100644
index 0000000..31a1939
--- /dev/null
+++ b/docs/docs.user.reports.builder.md
@@ -0,0 +1,28 @@
+---
+{
+ "_label": "Report Builder"
+}
+---
+All the data that you enter in ERPNext is stored in database tables. An easy way to visualize this is to imagine each type of data like Customer, Sales Invoice, Task is stored in a separate spreadsheets, each containing all the data included in one table.
+
+ERPNext gives you a simple tool called the Report Builder to extract data from these tables and show them in rows and columns where you can pick and choose which column to display and filter and sort the data by different parameters.
+
+To start a new report click on the “Report” menu in the top toolbar or on the list page of any transaction click on the “Build Report” button. For example, to make a report of Sales Invoices, go to
+
+> Accounts > Sales Invoice > Build Report
+
+### Exporting
+
+If you have “Report Manager” or “System Manager” permission, you can export the data from the Report Building via CSV to your favorite Spreadsheet application where you can do further analysis, apply formulas, make graphs etc.Selecting Columns
+
+You can select columns by clicking on “Pick Columns”. Select the column you want from the drop-down.
+
+You can also select columns from the “child tables”. For example if you have selected Sales Invoice, you can select columns from the Sales Invoice Item table also.
+
+### Adding Filters
+
+You can also add multiple filters by clicking on the “Show Filters” button.
+
+### Saving
+
+You can also save your selection of columns and filters by clicking on the “Save” button. You might need “System Manager” or “Report Manager” privileges for this. When you save a report, it will appear in the “Reports” section of the module page.
diff --git a/docs/docs.user.reports.md b/docs/docs.user.reports.md
new file mode 100644
index 0000000..4f08fff
--- /dev/null
+++ b/docs/docs.user.reports.md
@@ -0,0 +1,8 @@
+---
+{
+ "_label": "Reports and Analytics",
+ "_toc": [
+ "docs.user.reports.builder"
+ ]
+}
+---
diff --git a/docs/docs.user.setup.accounting.md b/docs/docs.user.setup.accounting.md
new file mode 100644
index 0000000..b10cf5b
--- /dev/null
+++ b/docs/docs.user.setup.accounting.md
@@ -0,0 +1,129 @@
+---
+{
+ "_label": "Accounting Setup",
+ "_title_image": "img/setup-accounting.png"
+}
+---
+## Chart of Accounts
+
+The Chart of Accounts forms the blueprint of your organization. The overall structure of your Chart of Accounts is based on a system of double entry accounting that has become a standard all over the world to quantify how a company is doing financially.
+
+The Chart of Accounts helps you answer:
+
+- What is your organization worth?
+- How much debt have you taken?
+- How much profit you are making (and hence paying tax)?
+- How much is are you selling?
+- How are your expenses broken up?
+
+As you can see, it is very valuable to you as a business manager to see how well your business is doing.
+
+> Tip: If you can’t read a Balance Sheet (I confess it took me a long time to figure this out) its a good opportunity to start learning about this. It will be worth the effort. You can also take the help of your accountant to setup your Chart of Accounts.
+
+To edit your Chart of Accounts in ERPNext go to:
+
+> Accounts > Chart of Accounts
+
+Chart of Accounts is a tree view of the names of the Accounts (Ledgers and Groups) that a Company requires to manage its books of accounts. ERPNext sets up a simple chart of accounts for each Company you create, but you have to modify it according to your needs and legal requirements.
+
+For each company, Chart of Accounts signifies the way to classify the accounting entries, mostly based on statutory (tax, compliance to government regulations) requirements.
+
+Let us understand the main groups of the Chart of Accounts.
+
+### Balance Sheet Accounts
+
+The Balance Sheet has Application of Funds (Assets) and Sources of Funds (Liabilities) that signify the net-worth of your company at any given time. When you begin or end a financial period, all the Assets are equal to the Liabilities.
+
+> Accounting: If you are new to accounting, you might be wondering, how can Assets be equal to Liabilities? That would mean the company has nothing of its own. Thats right. All the “investment” made in the company to buy assets (like land, furniture, machines) is made by the owners and is a liability to the company. If the company would to shut down, it would need to sell all the assets and pay back all the liabilities (including profits) to the owners, leaving itself with nothing.
+
+All the accounts under this represent an asset owned by company like "Bank Account", "Land and Property", "Furniture" or a liability (funds that the company owes to others) like "Owners funds", "Debt" etc.
+
+Two special accounts to note here are Accounts Receivable (money you have to collect from your customers) and Accounts Payable (money you have to pay to your suppliers) under Assets and Liabilities respectively.
+
+### Profit and Loss Accounts
+
+Profit and Loss is the group of Income and Expense accounts that represent your accounting transactions over a period.
+
+Unlike Balance sheet accounts, Profit and Loss accounts (or PL accounts) do not represent net worth (assets), but rather the amount of money spent and collected in servicing customers during the period. Hence at the beginning and end of your Fiscal Year, they become zero.
+
+(On the first day of the year you have not made any profit or loss, but you still have assets, hence balance sheet accounts never become zero at the beginning or end of a period)
+
+### Groups and Ledgers
+
+There are two main kinds of Accounts in ERPNext - Group and Ledger. Groups can have sub-groups and ledgers within them, whereas ledgers are the leaf nodes of your chart and cannot be further classified.
+
+Accounting Transactions can only be made against Ledger Accounts (not Groups)
+
+> Info: The term "Ledger" means a page in an accounting book where entries are made. There is usually one ledger for each account (like a Customer or a Supplier).
+
+> Note: An Account “Ledger” is also sometimes called as Account “Head”.
+
+### Other Account Types
+
+In ERPNext, you can also specify more information when you create a new Account, this is there to help you select that particular account in a scenario like Bank Account or a Tax Account and has no affect on the Chart itself.
+
+You can also tag if an account represents a Customer, Supplier or Employee in "Master Type".
+
+### Creating / Editing Accounts
+
+To create new Accounts, explore your Chart of Accounts and click on an Account group under which you want to create the new Account. On the right side, you will see a options to “Edit” or “Add” a new Account.
+
+Option to create will only appear if you click on a Group (folder) type Account.
+
+ERPNext creates a standard structure for you when the Company is created but it is up to you to modify or add or remove accounts.
+
+Typically, you might want to create Accounts for
+
+- Types of Expenses (travel, salaries, telephone etc) under Expenses.
+- Taxes (VAT, Sales Tax etc based on your country) under Current Liabilities.
+- Types of Sales (for example, Product Sales, Service Sales etc.) under Income.
+- Types of Assets (building, machinery, furniture etc.) under Fixed Assets.
+
+---
+
+## Chart of Cost Centers
+
+Your Chart of Accounts is mainly for reporting your information for governmental purposes and less for how you business actually performs. Though you can tweak it a bit to resemble your business.
+
+Most businesses have multiple activities like different product lines, market segments, areas of business that share some common overheads but should ideally have their own structure to report whether they are profitable or not. For this purpose, there is an alternate structure, called the Chart of Cost Centers.
+
+You can create a tree of Cost Centers to represent your business better. Each Income / Expense entry is also tagged against a Cost Center.
+
+For example, if you have two types of sales:
+
+- Walk-in Sales
+- Online Sales
+
+You may not have shipping expenses for your walk-in customers, and no shop-rent for your online customers. If you want to get the profitability of each of these separately, you create the two as Cost Centers and you can mark all sales as either "Walk-in" or "Online" and also all your purchases in the same way.
+
+So when you do your analysis you can get a better idea which side of your business is doing better. Since ERPNext has option to add multiple Companies, you can create Cost Centers for each Company and manage it separately.
+
+To setup your Chart of Cost Centers go to:
+
+> Accounts > Chart of Cost Centers
+
+Cost centers help you in one more activity, budgeting.
+
+### Budgeting
+
+ERPNext will help you set and manage budgets on your Cost Centers. This is useful when, for example, you are doing online sales and you have a budget for search ads and you want ERPNext to stop or warn you from over spending based on that budget.
+
+Budgets are also great for planning purposes. When you are making your plans for the next financial year, you would typically target a revenue and based on that you would set your expenses. Setting a budget will ensure that your expenses do not get out of hand at any point based on your plans.
+
+You can define it in the Cost Center. If you have seasonal sales you can also define a budget distribution that the budget will follow.
+
+#### Budget Actions
+
+ERPNext allows you to either:
+
+- Stop.
+- Warn or,
+- Ignore
+
+if you exceed budgets.
+
+These can be defined from the Company record.
+
+Even if you choose to “ignore” budget overruns, you will get a wealth of information from the “Budget vs Actual” variance report.
+
+> Note: When you set a budget, it has to be set per Account under the Cost Center. For example if you have a Cost Center “Online Sales”, you can restrict “Advertising Budget” by creating a row with that Account and defining the amount.
\ No newline at end of file
diff --git a/docs/docs.user.setup.before.md b/docs/docs.user.setup.before.md
new file mode 100644
index 0000000..158890f
--- /dev/null
+++ b/docs/docs.user.setup.before.md
@@ -0,0 +1,35 @@
+---
+{
+ "_label": "Before We Start",
+ "_title_image": "img/before-we-start.png"
+}
+---
+## Before We Start
+
+We have seem dozens of ERP implementations over the past few years and we realize that successful implementations are a lot about intangibles and attitude.
+
+> The Benefits come Later
+
+ERPs are not required.
+
+Like exercise.
+
+Human body does not require to be exercised today or maybe tomorrow, but in the long run, if you wish to maintain your body and its health, you should get on the treadmill.
+
+In the same way, ERPs improve the health of your organization over a long run by keep it fit and efficient. The more you delay putting things in order, the more time you lose and the closer you get to a major disaster.
+
+So when you start implementing an ERP, keep your sight on the long term benefits. Like exercise, its painful in the short run, but will do wonders if you stay on course.
+
+---
+
+## The Champion
+
+ERP means organization wide change and it does not happen without effort. Every change requires a champion and its the duty of the champion to organize and energize the entire team towards implementation. The champion is all the fall guy (or fall gal) incase something goes wrong and hence needs to be resilient. Who becomes a champion without putting effort anyways?
+
+In many organizations we have seen, the champion is most often the owner or a senior manager. Occasionally, the champion is an outsider who is hired for the purpose.
+
+In either case, you must identify your champion first.
+
+Most likely its **you!**
+
+Lets Begin!
diff --git a/docs/docs.user.setup.codification.md b/docs/docs.user.setup.codification.md
new file mode 100644
index 0000000..650e173
--- /dev/null
+++ b/docs/docs.user.setup.codification.md
@@ -0,0 +1,64 @@
+---
+{
+ "_label": "Item Codification"
+}
+---
+
+> To Codify or Not To Codify, is the question.
+
+If you already have a running business with a number of physical items, you would have probably coded your items. If you have not, you have a choice. We recommend you should codify, but its your call.
+
+Item codification is always a sensitive topic and wars have been fought on this (not joking). In our experience, when you have items that cross a certain size, life without codification is a nightmare.
+
+### Benefits
+
+- Standard way of naming things.
+- Less likely to have duplicates.
+- Explicit definition.
+- Help you quickly find if a similar item exists.
+- Item names get longer and longer as more types get introduced. Codes are shorter.
+
+### Pain
+
+- You have to remember the codes!
+- Harder for new team members to pick up.
+- You have to create new codes all the time.
+
+### Example
+
+You should have a simple manual / cheat-sheet to codify your items instead of just numbering them sequentially. Each letter should mean something. Here is an example:
+
+If your business involves wooden furniture, then you may codify as follows:
+
+Item Codification Summary Sheet
+(SAMPLE)
+
+ First letter: "Material" Third letter: "Size"
+
+ - W - Wood - 0 - less than 1mm
+ - H - Hardware - 1 - 1mm - 5mm
+ - G - Glass - 2 - 5mm - 10mm
+ - U - Upholstery - 3 - 10mm - 10cm
+ - P - Plastic
+
+ Second Letter: "Type"
+
+ For Wood: For Hardware:
+
+ - S - Sheet - S - Screw
+ - B - Bar - N - Nut
+ - L - L-section - W - Washer
+ - M - Molded - B - Bracket
+ - R - Round
+
+The last few letters could be sequential. So by looking at code **WM304** - you know its a wooden molding less than 10cm in size
+
+### Standardization
+
+If you have more than one person naming items, the style of naming items will change for everyone. Sometimes, even for one person, he or she may forget how did they name the item and may create a duplicate name _"Wooden Sheet 3mm" or "3mm Sheet of Wood"?_
+
+### Rationalizing
+
+It is a good practice to have minimum varieties of items so that you keep minimum stock, housekeeping is simpler etc. When you are planning a new product and you want to know if you are already purchasing a part in some other product, the item codes will help you quickly determine if you are using a similar raw material in another product.
+
+We believe if you do this small investment, it will help you rationalize things as your business grows, though its okay not to codify if you have less items.
\ No newline at end of file
diff --git a/docs/docs.user.setup.customer.md b/docs/docs.user.setup.customer.md
new file mode 100644
index 0000000..5316f34
--- /dev/null
+++ b/docs/docs.user.setup.customer.md
@@ -0,0 +1,65 @@
+---
+{
+ "_label": "Customer Master",
+ "_title_image": "img/customers.png"
+}
+---
+You can either directly create your Customers via
+
+> Selling > Customer
+
+or upload it via the Data Import Tool.
+
+In your normal operations, you can also create Customers from Leads.
+
+> Note: Customers are separate from Contacts and Addresses. A Customer can have multiple Contacts and Addresses.
+
+### Contacts and Addresses
+
+Contacts and Addresses in ERPNext are stored separately so that you can attach multiple Contacts or Addresses to Customers and Suppliers.
+
+To add a Contact or Address directly from the Customer record, click on “New Contact” or “New Address”.
+
+> Tip: When you select a Customer in any transaction, one Contact and Address gets pre-selected. This is the “Default Contact or Address”. So make sure you set your defaults correctly!
+
+To Import multiple Contacts and Addresses from a spreadsheet, use the Data Import Tool.
+
+### Integration with Accounts
+
+In ERPNext, there is a separate Account record for each Customer, for each Company.
+
+When you create a new Customer, ERPNext will automatically create an Account Ledger for the Customer under “Accounts Receivable” in the Company set in the Customer record.
+
+> Advanced Tip: If you want to change the Account Group under which the Customer Account is created, you can set it in the Company master.
+
+If you want to create an Account in another Company, just change the Company value and “Save” the Customer again.
+
+### Customer Settings
+
+You can link a Price List to a Customer (select “Default Price List”), so that when you select that Customer, the Price List will be automatically selected.
+
+You can set “Credit Days” so that it is automatically set in the Sales Invoices made against this Customer.
+
+You can set how much credit you want to allow for a Customer by adding the “Credit Limit”. You can also set a global “Credit Limit” in the Company master.Classifying Customers
+
+ERPNext allows you to group your Customers and also divide them into Territories. Grouping will help you get better analysis of your data and identify what Customers are profitable and which are not and Territories will help you set sales targets for the territories.
+
+### Customer Group
+
+You can group your Customers so that you can get trend analysis for each group. Typically Customers are grouped by market segment (that is usually based on your domain).
+
+> Tip: If you think all this is too much effort, you can leave it at “Default Customer Group”. But all this effort, will pay off when you start getting reports.
+
+### Territory
+
+If your business operates in multiple Territories (could be countries, states or cities) it is usually a great idea to build your structure in the system. Once you group your Customers by Territories, you can set annual targets for each Item Group and get reports that will show your actual performance in the territory v/s what you had planned.
+
+### Sales Person
+
+Sales Persons behave exactly like Territories. You can great an organization chart of Sales Persons where each Sales Person’s target can be set individually. Again as in Territory, the target has to be set against Item Group.
+
+### Sales Partner
+
+A Sales Partner is a third party distributor / dealer / commission agent / affiliate / reseller who sells the companies products, for a commission. This is useful if you make the end sale to the Customer, involving your Sales Partner.
+
+If you sell to your Sales Partner who in-turn sells it to the Customer, then you must make a Customer instead.
diff --git a/docs/docs.user.setup.data_import.md b/docs/docs.user.setup.data_import.md
new file mode 100644
index 0000000..c7c6f94
--- /dev/null
+++ b/docs/docs.user.setup.data_import.md
@@ -0,0 +1,39 @@
+---
+{
+ "_label": "Data Import Tool"
+}
+---
+The Data Import Tool is a great way to upload (or edit) bulk data, specially master data, into the system. To start the tool go to:
+
+> Setup > Data > Data Import Tool
+
+The tool has two sections, one to download a template and the second to upload the data.
+
+To upload any type of information, select a type from the drop-down. When you select, the system will give you one or more list of templates you can download. So why multiple templates?
+
+In ERPNext, each master or transaction is defined by a “main table” and “child tables”. These child tables are there because some master tables could have multiple value of certain properties. For example, select Item. Here you will see a number of “child” tables linked to the item table. This is because an Item can have multiple prices, taxes and so on! You must import each table separately. In the child table, you must the mention the parent of the row in the “parent” column so that ERPNext knows which Item’s price or tax you are trying to set.
+
+### The Template
+
+Here is a few tips of filling out your template:
+
+- Don’t change any cells before the row “----Start entering data below this line----”.
+- Leave the first column blank.
+- Read the explanations of the columns.
+- Some columns are mandatory (the 5th row will tell you which ones those are).
+- Columns of type “Link” and “Select” will only accept values from a certain set.
+- For “Link” type columns, the value must be present in the table it links to.
+- For “Select” the options are given on the 6th row. The value must be one of those.
+- Dates: A number of standard date formats are accepted. Please make sure, your dates are in one of those formats.
+
+### Overwriting
+
+ERPNext also allows you to overwrite all / certain columns. If you want to update certain column, you can download the template with data and when you upload remember to check on the “Overwrite” box before uploading.
+
+> Note: For child records, if you select Overwrite, it will delete all the child records of that parent.
+
+### Upload Limitations
+
+ERPNext restricts the amount of data you can upload in one file. Though the number may vary based on the type of data. It is usually safe to upload 100-200 rows of a table at one go. If the system will not accept, then you will see an error.
+
+Why is this? Uploading a lot of data can cause your system to crash, specially if there are other users doing things in parallel. Hence ERPNext restricts the number of “writes” you can process in one request.
diff --git a/docs/docs.user.setup.email.md b/docs/docs.user.setup.email.md
new file mode 100644
index 0000000..21a82eb
--- /dev/null
+++ b/docs/docs.user.setup.email.md
@@ -0,0 +1,58 @@
+---
+{
+ "_label": "Setting up Email"
+}
+---
+Emails are the nervous system of business communication and ERPNext has been designed to make good use of this.
+
+## Sending Emails
+
+You can email any document from the system, by click on the “Email” button in the right sidebar. Before that you will need to set your outgoing email settings (SMTP server).
+
+All emails sent from the system are added to the Communication table.
+
+> **Info:** What is SMTP? There are two types of email services, sending and receiving emails. Sending is done via a protocol called SMTP (Simple Mail Transfer Protocol) and the server (computer) that sends your email to its destination is called and SMTP Server.
+
+> **Info:** Bulk Emails: Bulk Emails, especially those that are sent without consent (spam), are considered as bad behavior. While it may be okay to send emails to those who have “opted-in” to receive mails, it is very difficult for the internet community to know what is spam and what is allowed. To overcome this problem, most email servers share a black and whitelist of email senders. If your emails have been marked as spam, you will be blacklisted. So be careful. Many times, it may be a good idea to send email via whitelisted services also called SMTP relay services that are paid services. These services will block you from sending spam while ensuring that most of your email does not go in the spam folder. There are many such services available like SendGrid and SMTP.com
+
+To setup your outgoing mails, go to
+
+> Setup > Email and Notifications > Email Settings
+
+Set your outgoing mail server settings here. These are the same settings you would use in your Outlook, Thunderbird, Apple Mail or other such email applications. If you are not sure, get in touch with your email service provider.
+
+> **Tip:** If you are using EPRNext hosted service, keep the first section blank. Emails will still be sent from your email id, but via our SMTP relay service.
+
+### Creating Support Tickets from Incoming Emails
+
+A very useful email integration is to sync the incoming emails from support inbox into Support Ticket, so that you can track, assign and monitor support issues.
+
+> **Case Study:** Here are ERPNext, we have regularly tracking incoming support issues via email at “support@erpnext.com”. At the time of writing we have answered more than 3000 tickets via this system.
+
+To setup your Support integration, go to:
+
+> Setup > Email and Notifications > Email Settings > Incoming Mail Settings
+
+To make ERPNext pull emails from your mail box, enter the POP3 settings. (POP3 is a way of extracting emails from your mailbox. It should be fairly easy to find out what your POP3 settings are. If you have problems, contact your email service provider).
+If you want to setup an auto reply, check on the “Send Autoreply” box and when ever someone sends an email, an autoreply will be sent.
+Add a custom signature you want to send with your replies.
+
+### Setting Auto-notification on Documents
+
+ERPNext allows you to automatically email documents on “Submission” to the contact mentioned in the document. To set this up, go to:
+
+> Setup > Email and Notifications > Auto-notifications
+
+Check on the transactions you want to send via email directly on Submission and add a custom message if you want on these documents.
+
+### Email Digests
+
+Email Digests allow you to get regular updates about your sales, expenses and other critical numbers directly in your Inbox.
+
+Set your frequency, check all the items you want to receive in your weekly update and select the user ids who you want to send the Digest to.
+
+Email Digests are a great way for top managers to keep track of the big numbers like “Sales Booked” or “Amount Collected” or “Invoices Raised” etc.
+
+To setup Email Digests, go to:
+
+> Setup > Email and Notifications > Email Digests > New Email Digest
\ No newline at end of file
diff --git a/docs/docs.user.setup.first.md b/docs/docs.user.setup.first.md
new file mode 100644
index 0000000..759c14c
--- /dev/null
+++ b/docs/docs.user.setup.first.md
@@ -0,0 +1,14 @@
+---
+{
+ "_label": "Initial Setup"
+}
+---
+After a successful sign-up / installation of ERPNext, on your first sign-in, you will be shown a form to fill.
+
+This form will create your first **Company** and **Fiscal Year** (accounting or financial year) record. You can create other Companies later.
+
+This will also set the default **Currency** and time zone for your account. Once your complete this, your first **Company** and **Chart of Accounts** will be created.
+
+Congrats! You are already on your way.
+
+The next step is to configure your Chart of Accounts or start adding users and setting their permissions.
diff --git a/docs/docs.user.setup.item.md b/docs/docs.user.setup.item.md
new file mode 100644
index 0000000..06abd21
--- /dev/null
+++ b/docs/docs.user.setup.item.md
@@ -0,0 +1,106 @@
+---
+{
+ "_label": "Item Master",
+ "_title_image": "img/items.png"
+}
+---
+Items, Customers and Suppliers form the foundation of any ERP system.
+
+It is very likely you will have your masters ready in another system or a spread sheet and you would just need to import them. Before importing, it might be a good idea to understand how ERPNext treats them a bit first.
+
+---
+
+## Items
+
+An Item is simply a product or service you sell or buy from your Customers or Suppliers. ERPNext is optimized for itemized management of your sales and purchase though you can skip creating Items. If you are in services, you can create an Item for each service that your offer.
+
+> Items are mandatory if you want to track inventory.
+
+There are two main categories of Items in ERPNext
+
+- Stock Items
+- Non Stock Items
+
+As you may have guessed, inventory balances are tracked for stock items and not for
+non-stock items. Non-stock items could be services or consumables that are not tracked.
+
+### Naming Items
+
+This is a complex topic [coming up next]. In ERPNext you can use item codes or names. If you do not want to codify, you can keep the item name and item code as the same.
+
+### Item Groups
+
+ERPNext allows you to classify items into groups. This will help you in getting reports about various classes of items and also help in cataloging your items for the website.
+
+### Warehouses
+
+In ERPNext you can create Warehouses to identify where your Items reside.
+
+There are two main Warehouse Types that are significant in ERPNext.
+
+Stores: These are where your incoming Items are kept before they are consumed or sold. You can have as many “Stores” type Warehouses as you wish. Stores type warehouses are significant because if you set an Item for automatic re-order, ERPNext will check its quantities in all “Stores” type Warehouses when deciding whether to re-order or not.
+
+Asset: Items marked as type “Fixed Asset” are maintained in Asset Type Warehouses. This helps you separate them for the Items that are consumed as a part of your regular operations or “Cost of Goods Sold”.
+
+### Item Taxes
+
+These settings are only required if this particular Item has a different tax rate than what is the rate defined in the standard tax Account.
+
+For example, you have a tax Account, “VAT 10%” and this particular item is exempted from this tax, then you select “VAT 10%” in the first column, and set “0” as the tax rate in the second column.
+
+### Inspection
+
+Inspection Required: If an incoming inspection (at the time of delivery from the Supplier) is mandatory for this Item, mention “Inspection Required” as “Yes”. The system will ensure that a Quality Inspection will be prepared and approved before a Purchase Receipt is submitted.
+
+Inspection Criterial: If a Quality Inspection is prepared for this Item, then this template of criteria can will automatically be updated in the Quality Inspection table of the Quality Inspection.

Examples of Criteria are: Weight, Length, Finish etc.
+
+### Item Pricing and Price Lists
+
+ERPNext lets you maintain multiple selling prices for an Item using Price Lists. A Price List is a name you can give to a set of Item prices.
+
+Why would you want Price Lists? You have different prices for different zones (based on the shipping costs), for different currencies, regions etc.
+
+### Item Valuation
+
+How are Items Valued?
+
+One of the major features of any inventory system is that you can find out the value of any item based on its historic or average price. You can also find the value of all your items for your balance sheet. Why is valuation important?
+
+- The buying price fluctuates.
+- The value changes because of some process (value add).
+- The value changes because of decay, loss etc.
+
+You may encounter these terms, so lets clarify:
+
+- Rate: Rate at which the transaction takes place.
+- Valuation Rate: Rate at which the items value is set for your valuation.
+
+There are two major ways in which ERPNext values your items.
+
+- **FIFO (First In First Out):** In this system, ERPNext assumes that you will consume / sell those Items first that you bought first. For example, if you buy an Item at price X and then after a few days at price Y. So when sell your Item, ERPNext will reduce the quantity of the Item priced at X first and then Y.
+
+
+
+- **Moving Average:** In this method, ERPNext assumes that the value of the item at any point is the average price of the units of that Item in stock. For example, if the value of an Item is X in a Warehouse with quantity Y and another quantity Y1 is added to the Warehouse at cost X1, the new value X2 would be:
+
+> New Value X2 = (X * Y + X1 * Y1) / (Y + Y1)
+
+#### Negative Stock
+
+FIFO is the more accurate system of the two but has a disadvantage. You cannot have negative stock in FIFO. This means that you cannot make forward transactions that would make your stock negative. Why is this? Because sequences are so important to FIFO, you cannot track the value of the stock if it does not exist!
+
+In Moving Average, since each item has an “average” value, the value of the negative stock is also based on this “average”.
+
+### Serial Numbers and Batches
+
+In scenarios where you may have to track individual units or batches of Items you sell, ERPNext allows you to manage Serial Numbers and Batches.
+
+Why is this useful?
+
+- To track warranty and returns.
+- To trace individual Items incase they are recalled by the Supplier.
+- To manage expiry.
+
+In ERPNext, Serial Number and Batch are separate entities and all stock transactions for Items that serialized or batches must be tagged with either the Batch or Serial Number.
+
+> Important: Once you mark an item as serialized or batched or neither, you cannot change it after you have make any stock entry.
diff --git a/docs/docs.user.setup.letter_head.md b/docs/docs.user.setup.letter_head.md
new file mode 100644
index 0000000..fc7477f
--- /dev/null
+++ b/docs/docs.user.setup.letter_head.md
@@ -0,0 +1,14 @@
+---
+{
+ "_label": "Letter Head"
+}
+---
+You can create / manage Letter Heads from:
+
+> Setup > Branding and Printing > Letter Heads
+
+- Create an image with your logo, brand and other information you want to put on your letter head.
+- Attach the image in your Letter Head record and click on “Set From Image” to automatically generate the HTML required for this Letter Head.
+- If you want to make this the default letter head, click on “Is Default”.
+
+Thats it! Your letter head will now appear in all Prints and Emails of documents.
diff --git a/docs/docs.user.setup.md b/docs/docs.user.setup.md
new file mode 100644
index 0000000..ecada53
--- /dev/null
+++ b/docs/docs.user.setup.md
@@ -0,0 +1,26 @@
+---
+{
+ "_label": "Setting Up",
+ "_toc": [
+ "docs.user.setup.before",
+ "docs.user.setup.strategy",
+ "docs.user.setup.first",
+ "docs.user.setup.accounting",
+ "docs.user.setup.item",
+ "docs.user.setup.customer",
+ "docs.user.setup.supplier",
+ "docs.user.setup.taxes",
+ "docs.user.setup.series",
+ "docs.user.setup.email",
+ "docs.user.setup.permissions",
+ "docs.user.setup.letter_head",
+ "docs.user.setup.data_import",
+ "docs.user.setup.opening"
+ ]
+}
+---
+Setting up an ERP system is like starting your business all over again, but in the virtual
+world. Thankfully its not as hard as the real thing and you get to do a trial too.
+
+The important thing to note is that if you really want to take benefit out of this project, then you must take a step back and make sometime to do this right. This is usually not couple-of-hours after work kind of a project.
+
diff --git a/docs/docs.user.setup.opening.md b/docs/docs.user.setup.opening.md
new file mode 100644
index 0000000..3f8cdb4
--- /dev/null
+++ b/docs/docs.user.setup.opening.md
@@ -0,0 +1,66 @@
+---
+{
+ "_label": "Opening Accounts and Inventory"
+}
+---
+Now that you have completed most of the setup, its time to start moving in!
+
+There are two important sets of data you need to enter before you start your operations.
+
+- Opening Account balances.
+- Opening Stock balances.
+
+To setup your accounts and stock correctly you will need accurate data to work with. Make sure you have the data setup for this.
+
+### Opening Accounts
+
+We usually recommend that you start using accounting in a new financial year, but you could start midway too. To setup your accounts, you will need the following for the “day” you start using accounting in ERPNext:
+
+Opening capital accounts - like your shareholder’s (or owner’) capital, loans, bank balances on that day.
+List of outstanding sales and purchase invoices (Payables and Receivables).
+
+#### Temporary Accounts
+
+A nice way to simplify opening is to create temporary accounts for assets and liability just for opening. These accounts will become zero once all your old invoices are entered. The two accounts you can create are (example):
+
+- Temp Opening Liabilities
+- Temp Opening Assets
+
+#### The Opening Entry
+
+In ERPNext Opening Accounts are setup by submitting a special Journal Entries (Journal Voucher).
+
+Note: Make sure to set “Is Opening” as “Yes” in the More Info section.
+
+You can make two Opening Journal Vouchers:
+
+- For all assets (excluding Accounts Receivables): This entry will contain all your assets except the amounts you are expecting from your Customers against outstanding Sales Invoices. You will have to update your receivables by making an individual entry for each Invoice (this is because, the system will help you track the which Invoices are yet to be paid). Since all the entries in this voucher will be of type “Debit”, you can credit the sum of all these debits against the “Temp Opening Liabilities” account.
+- For all liabilities: Similarly you need to pass a Journal Voucher for your Opening Liabilities (except for the bills you have to pay). This can be made against the “Temp Opening Assets” account.
+
+#### Outstanding Invoices
+
+After your Opening Journal Vouchers are made, you will need to enter each Sales Invoice and Purchase Invoice that is yet to be paid.
+
+Since you have already booked the income or expense on these invoices in the previous period, select the temp opening accounts in the “Income” and “Expense” accounts.
+
+Note: Again make sure to set each invoice as “Is Opening”!
+
+If you don’t care what items are in that invoice, just make a dummy item entry in the Invoice. Item code in the Invoice is not necessary, so it should not be such a problem.
+
+Once all your invoices are entered, your “Temp Opening Assets” will be same as “Temp Opening Liabilities” and you can pass another “Is Opening” type of Journal Voucher and cancel them to zero!
+
+---
+
+## Opening Stock
+
+You can upload your opening stock in the system using Stock Reconciliation. Stock Reconciliation will update your stock for a given Item on a given date for a given Warehouse to the given quantity.
+
+Stock Reconciliation will make a “difference entry” (the difference between the system stock and the actual stock in your file) for the Item.
+
+Tip: Stock Reconciliation can also be used to update the “value” of an Item.
+
+To make a Stock Reconciliation, go to:
+
+> Stock > Stock Reconciliation > New Stock Reconciliation
+
+and follow the steps mentioned on the page.
\ No newline at end of file
diff --git a/docs/docs.user.setup.permissions.md b/docs/docs.user.setup.permissions.md
new file mode 100644
index 0000000..169ebff
--- /dev/null
+++ b/docs/docs.user.setup.permissions.md
@@ -0,0 +1,86 @@
+---
+{
+ "_label": "Setting up Users, Roles and Permissions"
+}
+---
+ERPNext has a role-based permission system, which means that you can assign Roles to Users and permissions on Roles.
+
+## Users (Profile)
+
+Each ERPNext user has a Profile. The Profile contains the user’s email and authentication and can be set from:
+
+> Setup > Users and Permissions > Users
+
+#### Adding a new User
+
+To add a new user, click on “Add” button and enter the user’s
+
+- Email Id
+- First Name
+- Last Name
+- Password
+
+An invitation email will will be sent to the user with the login details.
+
+#### Setting Roles
+
+ERPNext comes with a bunch of predefined roles. Each role comes with predefined permissions. See the Preset Permission Chart to find out what permission each roles comes with.
+
+After creating the User, you can add / remove Roles for that User by clicking on “Roles” button. To find out what permission each role has, click on the “?” sign next to the Role.
+
+You can also create new Roles as you wish via
+
+> Document > Role
+
+#### Security Settings
+
+- Enabling / disabling users: You can enable or disable users. Disabled users will not be able to log in.
+- Setting login time: If login time is set, users can only log-in within the defined hours as per your timezone.
+- Change Password: You can update the user’s password by setting the password field.
+
+## Permissions
+
+ERPNext has a very powerful permission structure that will allow you to set permissions right up to the field level.
+
+Permissions are applied on:
+
+- **Roles:** As we saw earlier, Users are assigned to Roles and it is on these Roles that permission rules are applied.
+- **Document Types:** Each type of document, master or transaction, has a separate list of Role based permission.
+- **Document Stages:** Permissions are applied on each stage of the document like on Creation, Saving, Submission, Cancellation and Amendment.
+- **Permission “Levels”:** In each document, you can group fields by “levels”. Each group of field is denoted by a unique number (1,2,3 etc.). A separate set of permission rules can be applied to each field group. By default all fields are of level 0.
+- **“Match Rules”** Based on certain properties of the document and the user: This can be used in cases where, for example, you have multiple Companies or sales persons in different Territories and you want to restrict each User to only view documents relating to the User’s Company or Territory etc. It is also called “match” rules.
+
+When you define a “match” rule, the User will only be allowed to access (or write) the document if the User has one or more such values (e.g. Company, Territories) and the document has the same values. 

For example, if you have set a match rule on Sales Order for a particular Role based on “territory”, then all users of that Role will only be allowed to view Sales Orders of that Territory. Let us walk through an example.
+
+ERPNext comes with pre-set permission rules that you can change anytime by going to
+
+> Setup > Users and Permissions > Permission Manager
+
+## Using the Permission Manager
+
+The Permission Manager is an easy way to set / unset permission rules. The Permission Manager allows you to monitor rules per Document Type.
+
+When you select a document type from the drop-down. You will see the rules that have already been applied.
+
+To add a new rule, click on “Add a New Rule” button and a pop-up box will ask you to select a Role and a Permission Level. Once you select this and click on “Add”, this will add a new row to your rules table.
+
+To edit rules, just check or uncheck the boxes relating the the permission level and Role and click on “Update”.
+
+To delete a rule, just uncheck all the boxes of the row and click on “Update”

+
+To set “match” rules, select the drop-down in the last column.

For example, you want to restrict Users of Role “Sales User” by Territories in Sales Order.
+
+1. Select Sales Order in “Set Permissions For”
+1. In the row for Role “Sales User”, in the last column “Restrict By”, select “territory”.
+1. To assign Territories to Users, click on “Set Users / Roles”
+1. In the popup box,
+ - In the “Who” column, select “Profile” and the User you want to assign the Territory to
+ - In the “Is allowed if territory equals” column, select the Territory you want to assign to this user.
+1. Click on “Add”
+
+In the same way, add a row for each user.
+
+> **Note 1:** The “match” rules apply to all documents that you have matched by Territory.
+
+> **Note 2:** You can set multiple rules for the same User. In this example, you can set a User to access more than one Territories.
+

diff --git a/docs/docs.user.setup.series.md b/docs/docs.user.setup.series.md
new file mode 100644
index 0000000..6db08e3
--- /dev/null
+++ b/docs/docs.user.setup.series.md
@@ -0,0 +1,29 @@
+---
+{
+ "_label": "Creating Numbering Series"
+}
+---
+Data records are broadly classified as “Master” or “Transaction”. A master record is a record that has a “name”, for example a Customer, Item, Supplier, Employee etc. A Transaction is a record that has a “number”. Examples of transactions include Sales Invoices, Quotations etc. You make transactions against a number of master records.
+
+ERPNext allows you to make prefixes to your transactions, with each prefix forming its own series. For example a series with prefix INV12 will have numbers INV120001, INV120002 and so on.
+
+You can have multiple series for all your transactions. It is common to have a separate series for each financial year. For example in Sales Invoice you could have:
+
+- INV120001
+- INV120002
+- INV-A-120002
+
+etc. You could also have a separate series for each type of Customer or for each of your retail outlets.
+
+To setup a series, go to:
+
+> Setup > Customize ERPNext > Numbering Series
+
+In this form,
+
+1. Select the transaction for which you want to make the series
+The system will update the current series in the text box.
+1. Edit the the series as you want with unique prefixes for each series. Each prefix must be on a new line.
+1. The first prefix will be the default prefix. If you want the user to explicitly select a series instead of the default one, check the “User must always select” check box.
+
+You can also update the starting point for a series by entering the series name and the starting point in the “Update Series” section.
\ No newline at end of file
diff --git a/docs/docs.user.setup.strategy.md b/docs/docs.user.setup.strategy.md
new file mode 100644
index 0000000..6675536
--- /dev/null
+++ b/docs/docs.user.setup.strategy.md
@@ -0,0 +1,30 @@
+---
+{
+ "_label": "Implementation Strategy"
+}
+---
+Before you start managing your Operations in EPRNext, you must first become familiar with the system and the terms used. For this we recommend implementation should happen in two phases.
+
+- A Test Phase, where you enter dummy records representing your day to day transactions and a - Live Phase, where we start entering live data.
+
+### Test Phase
+
+- Read the Manual
+- Create your first Customer, Supplier and Item. Add a few more so you get familiar.
+- Create Customer Groups, Item Groups, Warehouses, Supplier Groups so that you can classify your Items.
+- Complete a standard sales cycle - Lead > Opportunity > Quotation > Sales Order > Delivery Note > Sales Invoice > Payment (Journal Voucher)
+- Complete a standard purchase cycle - Purchase Request > Purchase Order > Purchase Receipt > Payment (Journal Voucher).
+- Complete a manufacturing cycle (if applicable) - BOM > Production Planning Tool > Production Order > Stock Entry (issue) > Stock Entry (back-flush)
+
+> Tip: Use the 30-day free trial at [erpnext.com](https://erpnext.com) to do your test drive.
+
+### Live Phase
+
+Once you have made yourself familiar with ERPNext, start entering your live data!
+
+- Clean up the account of test data or better, start a fresh install.
+- Setup all the modules with Customer Groups, Item Groups, Warehouses, BOMs etc.
+- Import Customers, Suppliers, Items, Contacts and Addresses using Data Import Tool.
+- Import opening stock using Stock Reconciliation Tool.
+- Create opening accounting entries via Journal Voucher and create outstanding Sales Invoices and Purchase Invoices.
+
diff --git a/docs/docs.user.setup.supplier.md b/docs/docs.user.setup.supplier.md
new file mode 100644
index 0000000..b988090
--- /dev/null
+++ b/docs/docs.user.setup.supplier.md
@@ -0,0 +1,17 @@
+---
+{
+ "_label": "Supplier Master"
+}
+---
+Suppliers are companies or individuals who provide you products or services. They are treated in exactly the same manner as Customers in ERPNext.
+
+1. Separate Account Ledgers are created for the Supplier in the Company under “Accounts Payable”.
+1. You can have multiple Addresses and Contacts for Suppliers.
+1. Suppliers are categorized as Supplier Type.
+1. If you set “Credit Days”, this will automatically set the due date in Purchase Invoices.
+
+You can create a new Supplier via:
+
+> Buying > Supplier > New Supplier
+
+or importing from the Data Import Tool
diff --git a/docs/docs.user.setup.taxes.md b/docs/docs.user.setup.taxes.md
new file mode 100644
index 0000000..7739567
--- /dev/null
+++ b/docs/docs.user.setup.taxes.md
@@ -0,0 +1,51 @@
+---
+{
+ "_label": "Setting up Taxes"
+}
+---
+One of the primary motivator for compulsory use of accounting tools is calculation of Taxes. You may or may not make money but your government will (to help your country be safe and prosperous). And if you don’t do your taxes correctly, they get very unhappy. Ok, philosophy aside, ERPNext allows you to make configurable tax templates that you can apply to your sales or purchase.
+
+### Tax Accounts
+
+For Tax Accounts that you want to use in the tax templates, you must mention them as type “Tax” in your Chart of Accounts.
+
+## Sales Taxes and Charges Master
+
+You must usually collect taxes from your Customer and pay them to the government. At times there may be multiple taxes for multiple government bodies like local government, state or provincial and federal or central government.
+
+The way ERPNext sets up taxes is via templates. Other types of charges that you may apply to your invoices (like shipping, insurance etc.) can also be configured as taxes.
+
+To create a new sales tax template called Sales Taxes and Charges Master, you have to go to:
+
+> Selling > Setup (sidebar) > Sales Taxes and Charge Master
+
+When you create a new master, you will have to add a row for each tax type.
+
+The 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.
+
+In each row, you have to mention:
+
+- Calculation Type:
+ - This can be on net total (that is your basic amount).
+ - 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.
+ - Actual (as mentioned).
+- Account Head: The Account ledger under which this tax will be booked
+- Cost Center: If the tax / charge is an income (like shipping) it needs to be booked against - a Cost Center.
+- Description: Description of the tax (that will be printed in invoices / quotes).
+- Rate: Tax rate.
+- Amount: Tax amount.
+- Total: Cumulative total to this point.
+- 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).
+- 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 rate in your main item table. This is useful where you want give a flat price (inclusive of all taxes) price to your customers.
+
+Once your setup your template, you can now select this in your sales transactions.
+
+## Purchase Taxes and Charges Master
+
+Similar to your Sales Taxes and Charges Master is the Purchase Taxes and Charges Master.
+
+This is the tax template that you can use in your Purchase Orders and Purchase Invoices. If you have value added taxes (VAT), where you pay to the government the difference between your incoming and outgoing taxes, you can select the same Account that you use for sales taxes.
+
+The columns in this table are similar to the Sales Taxes and Charges Master with the difference as follows:
+
+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.
diff --git a/docs/docs.user.tools.calendar.md b/docs/docs.user.tools.calendar.md
new file mode 100644
index 0000000..bf2923a
--- /dev/null
+++ b/docs/docs.user.tools.calendar.md
@@ -0,0 +1,6 @@
+---
+{
+ "_label": "Calendar"
+}
+---
+The Calendar is a tool where you can create and share Events and also see auto-generated events from the system.
diff --git a/docs/docs.user.tools.form_tools.md b/docs/docs.user.tools.form_tools.md
new file mode 100644
index 0000000..30ebf57
--- /dev/null
+++ b/docs/docs.user.tools.form_tools.md
@@ -0,0 +1,16 @@
+---
+{
+ "_label": "Collaborating around Forms"
+}
+---
+### Email
+
+You can email any transaction from the system by clicking on the “Email” button in the right sidebar. A log of all your sent emails will be maintained in Communication.
+
+### Comments
+
+Comments are a great way to add information about a transaction that is not a part of the transactions. Like some background information etc. Comments can be added in the right sidebar.
+
+### Tags
+
+Like Assignments and Comments, you can also add your own tags to each type of transactions. These tags can help you search a document and also classify it. ERPNext will also show you all the important tags in in the document list.
diff --git a/docs/docs.user.tools.md b/docs/docs.user.tools.md
new file mode 100644
index 0000000..f040c22
--- /dev/null
+++ b/docs/docs.user.tools.md
@@ -0,0 +1,14 @@
+---
+{
+ "_label": "Collaboration Tools",
+ "_toc": [
+ "docs.user.tools.todo",
+ "docs.user.tools.form_tools",
+ "docs.user.tools.messages",
+ "docs.user.tools.notes"
+ ]
+}
+---
+We live in an era when people are very comfortable communicating, discussing, asking, assigning work and getting feedback electronically. The internet acts a great medium to collaborate on work too. Taking this concept into ERP system, we have designed a bunch of tools whereby you can Assign transactions, manage your To Dos, share and maintain a Calendar, maintain a company wise Knowledge Base, Tag and Comment on transactions and send your Orders, Invoices etc via Email. You can also send instant messages to other users using the Messaging tool.
+
+These tools are integrated into all aspects of the product so that you can effectively manage your data and collaborate with your co-workers.
\ No newline at end of file
diff --git a/docs/docs.user.tools.messages.md b/docs/docs.user.tools.messages.md
new file mode 100644
index 0000000..ea24146
--- /dev/null
+++ b/docs/docs.user.tools.messages.md
@@ -0,0 +1,6 @@
+---
+{
+ "_label": "Messages"
+}
+---
+You can send and receive messages from the system by using the Messages tool. If you send a message to a user, and the user is logged in, it will appear as a popup message and the unread messages counter in the top toolbar will be updated.
diff --git a/docs/docs.user.tools.notes.md b/docs/docs.user.tools.notes.md
new file mode 100644
index 0000000..fcb8fce
--- /dev/null
+++ b/docs/docs.user.tools.notes.md
@@ -0,0 +1,5 @@
+---
+{
+ "_label": "Notes"
+}
+---
\ No newline at end of file
diff --git a/docs/docs.user.tools.todo.md b/docs/docs.user.tools.todo.md
new file mode 100644
index 0000000..6421a5c
--- /dev/null
+++ b/docs/docs.user.tools.todo.md
@@ -0,0 +1,23 @@
+---
+{
+ "_label": "Assignment and To Do"
+}
+---
+### Assignment
+
+You can assign any transaction to any user by clicking on the “Assign” button on the right hand column and adding a user.
+
+Step 1: Click on the Assign To Button
+
+Step 2: Add the User and other details
+
+This transaction will appear in:
+
+The To-do list of the user whom this is assigned to in “My List” section
+In the “Assigned by me” section of the user who as assigned this activity.
+
+### To Do
+
+To Do is a simple tool where all the activities assigned to you and assigned by you are listed. You can also add your own to-do items in the list.
+
+
diff --git a/docs/docs.user.website.blog.md b/docs/docs.user.website.blog.md
new file mode 100644
index 0000000..cc58fbd
--- /dev/null
+++ b/docs/docs.user.website.blog.md
@@ -0,0 +1,16 @@
+---
+{
+ "_label": "Blog"
+}
+---
+Blogs are a great way to share your thoughts about your business and keep your customers and readers updated of what you are up to.
+
+In the age of internet, writing assumes a lot more importance is because when people come to your website, they want to be read about your product and you.
+
+To create a new blog, just create a new Blog from:
+
+> Website > Blog > New Blog
+
+You can format the blog using the same Markdown format
+
+You can access your blog by going to the page “blog.html”
diff --git a/docs/docs.user.website.md b/docs/docs.user.website.md
new file mode 100644
index 0000000..ff88c02
--- /dev/null
+++ b/docs/docs.user.website.md
@@ -0,0 +1,32 @@
+---
+{
+ "_label": "Setting up your Website / Webshop",
+ "_toc": [
+ "docs.user.website.setup",
+ "docs.user.website.web_page",
+ "docs.user.website.style",
+ "docs.user.website.blog"
+ ]
+}
+---
+Websites are a core component of any business and having a good website usually means:
+
+- Lot of money.
+- Hard to update.
+- Not interactive.
+
+Unless you are a web designer yourself.
+
+Would not it be nice if there was a way to update your product catalog on your site automatically from your ERP?
+
+We thought exactly the same and hence built a small Website Development app right inside or ERPNext! Using ERPNext’s Website module, you can
+
+1. Create Web Pages
+1. Write a Blog
+1. Publish your Product Catalog using the Item master
+
+We will soon be adding a shopping cart facility so that your customers can place orders and pay you online!
+
+Though not necessary, to make a good website, you might have to know a bit of HTML / CSS or hire the services of a professional. The good part is that once this is setup, you can add and edit content, blogs and products directly from your ERP.
+
+> The ERPNext website (www.erpnext.com) is generated from the Website Module! In the world of startups, its called eating-your-own-dog-food!
\ No newline at end of file
diff --git a/docs/docs.user.website.setup.md b/docs/docs.user.website.setup.md
new file mode 100644
index 0000000..23df928
--- /dev/null
+++ b/docs/docs.user.website.setup.md
@@ -0,0 +1,48 @@
+---
+{
+ "_label": "Website Setup"
+}
+---
+## Layout
+
+#### Top Bar
+
+The header has two main parts, the “Brand” or the logo section and the menu items. These menu items can directly link to Web Pages or the Blogs page or Products page. The standard Website header bar is with black background.
+
+#### Background
+
+The website is generated using a standard width of 900 pixels and has a page “effect”. You can set a background color or image to enhance the effect of the page.
+
+#### Content
+
+The inner content of your pages has a width of 800px and if it is a two-column layout like Blog, it will have a width of 540 px.
+
+#### Footer
+
+The footer section contains a list of links (this is where you typical put links like “Contact Us”, “Terms and Conditions” etc) and the name of your company.
+
+---
+
+## Defining Menus and Home Page
+
+To define the Top Bar Menus, Brand, Footers and Home Page, go to:
+
+> Website > Website Settings
+
+#### Top Menu
+
+Add each top menu item on a new link.
+In the label column, add the label of the item.
+In the URL column, enter the name of the page or a full URL. If you want a new Web Page to open, just put the “Page Name” + “.html”. (URL is simply a web address like “http://google.com”)
+
+Similarly you can also set the Footer section to contain links. If you want to have links appear as a drop-down under another link, just add the name of the parent menu in “Parent Label”.
+
+#### Brand
+
+To set your brand, create a logo with a transparent background and white foreground of roughly height 24px and length of 150px, attach it to the Website Settings page, and add it in your Brand section as an image as follows:
+
+---
+
+##### What is Website Analytics?
+
+Website analytics help you track each visitor on your website. The analytics will tell you from which country, at what time, and what pages the visitor viewed. This will help you understand who your visitors are and what are they looking for. There are many analytics engines available and the most popular and Free service is Google Analytics. We definitely recommend using one of them to gain insight into your website visitors.
\ No newline at end of file
diff --git a/docs/docs.user.website.style.md b/docs/docs.user.website.style.md
new file mode 100644
index 0000000..83854e0
--- /dev/null
+++ b/docs/docs.user.website.style.md
@@ -0,0 +1,23 @@
+---
+{
+ "_label": "Styling the Website"
+}
+---
+You can set some basic styles to your page using the styles feature.
+
+#### Background
+
+You can either set a solid background by selecting a color.
+You can attach a file and select it in the “Background Image” box.
+
+#### Fonts
+
+Fonts: Font family of your body text (includes some Open Source fonts).
+Font-size: Font-size of your website body text (large is good).
+Heading Font: Font family of your headings.
+
+Apart from this you can also add custom style rules using CSS
+
+#### Custom CSS
+
+There are tons of CSS rules and tricks that fall out of scope of this manual. But you could add your own style to certain elements like h1, h2 etc and also create your own style classes that you can use in elements in your body content.
\ No newline at end of file
diff --git a/docs/docs.user.website.web_page.md b/docs/docs.user.website.web_page.md
new file mode 100644
index 0000000..30c9acd
--- /dev/null
+++ b/docs/docs.user.website.web_page.md
@@ -0,0 +1,24 @@
+---
+{
+ "_label": "Web Pages"
+}
+---
+Static Content like your Home Page, About Us, Contact Us, Terms pages can be created using the Web Page. To create a new Web Page, go to:
+
+> Website > Web Page > New Web Page
+
+#### Title
+
+The first thing to set is the title of your page. The title has the maximum weight for search engines so choose a title that reflects the keywords that you are targeting for your audience.
+
+#### Content
+
+After selecting your layout, you can add content (text, images, etc) to each of your content boxes. You can add content in Markdown or HTML format. Read the section on how to format using Markdown for more details.
+
+#### Page Link
+
+The web link to your page will be the value of the “Page Name” field + “.html”. For example if your page name is contact-us, the web link of your page will be yoursite.com/contact-us.html.
+
+#### Images
+
+You can attach images to your web page and show them using the <img> HTML tag or using markdown format. the link for your file will be files/filename
\ No newline at end of file
diff --git a/home/doctype/company_control/locale/_messages_doc.json b/home/doctype/company_control/locale/_messages_doc.json
deleted file mode 100644
index ee26ed8..0000000
--- a/home/doctype/company_control/locale/_messages_doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-[
- "Home",
- "Company Control"
-]
\ No newline at end of file
diff --git a/home/doctype/company_control/locale/ar-doc.json b/home/doctype/company_control/locale/ar-doc.json
deleted file mode 100644
index f4762f9..0000000
--- a/home/doctype/company_control/locale/ar-doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "Company Control": "\u0634\u0631\u0643\u0629 \u0627\u0644\u062a\u062d\u0643\u0645",
- "Home": "\u0645\u0646\u0632\u0644"
-}
\ No newline at end of file
diff --git a/home/doctype/company_control/locale/de-doc.json b/home/doctype/company_control/locale/de-doc.json
deleted file mode 100644
index 5b1d41d..0000000
--- a/home/doctype/company_control/locale/de-doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "Company Control": "Firma Control",
- "Home": "Zuhause"
-}
\ No newline at end of file
diff --git a/home/doctype/company_control/locale/es-doc.json b/home/doctype/company_control/locale/es-doc.json
deleted file mode 100644
index fdc888a..0000000
--- a/home/doctype/company_control/locale/es-doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "Company Control": "Control Company",
- "Home": "Casa"
-}
\ No newline at end of file
diff --git a/home/doctype/company_control/locale/fr-doc.json b/home/doctype/company_control/locale/fr-doc.json
deleted file mode 100644
index 33c6255..0000000
--- a/home/doctype/company_control/locale/fr-doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "Company Control": "Control Entreprise",
- "Home": "Maison"
-}
\ No newline at end of file
diff --git a/home/doctype/company_control/locale/hi-doc.json b/home/doctype/company_control/locale/hi-doc.json
deleted file mode 100644
index c72fd0c..0000000
--- a/home/doctype/company_control/locale/hi-doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "Company Control": "\u0915\u0902\u092a\u0928\u0940 \u0915\u0947 \u0928\u093f\u092f\u0902\u0924\u094d\u0930\u0923",
- "Home": "\u0918\u0930"
-}
\ No newline at end of file
diff --git a/home/doctype/company_control/locale/hr-doc.json b/home/doctype/company_control/locale/hr-doc.json
deleted file mode 100644
index 6069e8c..0000000
--- a/home/doctype/company_control/locale/hr-doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "Company Control": "Tvrtka Kontrola",
- "Home": "Dom"
-}
\ No newline at end of file
diff --git a/home/doctype/company_control/locale/nl-doc.json b/home/doctype/company_control/locale/nl-doc.json
deleted file mode 100644
index 710a560..0000000
--- a/home/doctype/company_control/locale/nl-doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "Company Control": "Bedrijf Controle",
- "Home": "Thuis"
-}
\ No newline at end of file
diff --git a/home/doctype/company_control/locale/pt-BR-doc.json b/home/doctype/company_control/locale/pt-BR-doc.json
deleted file mode 100644
index 77c527f..0000000
--- a/home/doctype/company_control/locale/pt-BR-doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "Company Control": "Controle da Empresa",
- "Home": "In\u00edcio"
-}
\ No newline at end of file
diff --git a/home/doctype/company_control/locale/pt-doc.json b/home/doctype/company_control/locale/pt-doc.json
deleted file mode 100644
index b942b8b..0000000
--- a/home/doctype/company_control/locale/pt-doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "Company Control": "Controle da Companhia",
- "Home": "Casa"
-}
\ No newline at end of file
diff --git a/home/doctype/company_control/locale/sr-doc.json b/home/doctype/company_control/locale/sr-doc.json
deleted file mode 100644
index 66665e3..0000000
--- a/home/doctype/company_control/locale/sr-doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "Company Control": "\u041a\u043e\u043c\u043f\u0430\u043d\u0438\u0458\u0430 \u041a\u043e\u043d\u0442\u0440\u043e\u043b\u0430",
- "Home": "\u041a\u0443\u045b\u0438"
-}
\ No newline at end of file
diff --git a/home/doctype/company_control/locale/ta-doc.json b/home/doctype/company_control/locale/ta-doc.json
deleted file mode 100644
index ffd5d96..0000000
--- a/home/doctype/company_control/locale/ta-doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "Company Control": "\u0ba8\u0bbf\u0bb1\u0bc1\u0bb5\u0ba9\u0ba4\u0bcd\u0ba4\u0bbf\u0ba9\u0bcd \u0b95\u0b9f\u0bcd\u0b9f\u0bc1\u0baa\u0bcd\u0baa\u0bbe\u0b9f\u0bc1",
- "Home": "\u0bae\u0bc1\u0b95\u0baa\u0bcd\u0baa\u0bc1"
-}
\ No newline at end of file
diff --git a/home/doctype/company_control/locale/th-doc.json b/home/doctype/company_control/locale/th-doc.json
deleted file mode 100644
index 885d0f9..0000000
--- a/home/doctype/company_control/locale/th-doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "Company Control": "\u0e01\u0e32\u0e23\u0e04\u0e27\u0e1a\u0e04\u0e38\u0e21\u0e02\u0e2d\u0e07 \u0e1a\u0e23\u0e34\u0e29\u0e31\u0e17",
- "Home": "\u0e1a\u0e49\u0e32\u0e19"
-}
\ No newline at end of file
diff --git a/home/doctype/feed/README.md b/home/doctype/feed/README.md
new file mode 100644
index 0000000..085e575
--- /dev/null
+++ b/home/doctype/feed/README.md
@@ -0,0 +1 @@
+Activity Feed.
\ No newline at end of file
diff --git a/home/doctype/home_control/locale/_messages_doc.json b/home/doctype/home_control/locale/_messages_doc.json
deleted file mode 100644
index 0418d25..0000000
--- a/home/doctype/home_control/locale/_messages_doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-[
- "Home",
- "Home Control"
-]
\ No newline at end of file
diff --git a/home/doctype/home_control/locale/ar-doc.json b/home/doctype/home_control/locale/ar-doc.json
deleted file mode 100644
index 3e593ff..0000000
--- a/home/doctype/home_control/locale/ar-doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "Home": "\u0645\u0646\u0632\u0644",
- "Home Control": "\u0627\u0644\u0635\u0641\u062d\u0629 \u0627\u0644\u0631\u0626\u064a\u0633\u064a\u0629 \u0627\u0644\u062a\u062d\u0643\u0645"
-}
\ No newline at end of file
diff --git a/home/doctype/home_control/locale/de-doc.json b/home/doctype/home_control/locale/de-doc.json
deleted file mode 100644
index 84774eb..0000000
--- a/home/doctype/home_control/locale/de-doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "Home": "Zuhause",
- "Home Control": "Home Control"
-}
\ No newline at end of file
diff --git a/home/doctype/home_control/locale/es-doc.json b/home/doctype/home_control/locale/es-doc.json
deleted file mode 100644
index 988d65d..0000000
--- a/home/doctype/home_control/locale/es-doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "Home": "Casa",
- "Home Control": "P\u00e1gina principal Control"
-}
\ No newline at end of file
diff --git a/home/doctype/home_control/locale/fr-doc.json b/home/doctype/home_control/locale/fr-doc.json
deleted file mode 100644
index 6048885..0000000
--- a/home/doctype/home_control/locale/fr-doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "Home": "Maison",
- "Home Control": "Home Control"
-}
\ No newline at end of file
diff --git a/home/doctype/home_control/locale/hi-doc.json b/home/doctype/home_control/locale/hi-doc.json
deleted file mode 100644
index ec4137e..0000000
--- a/home/doctype/home_control/locale/hi-doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "Home": "\u0918\u0930",
- "Home Control": "\u0939\u094b\u092e \u0928\u093f\u092f\u0902\u0924\u094d\u0930\u0923"
-}
\ No newline at end of file
diff --git a/home/doctype/home_control/locale/hr-doc.json b/home/doctype/home_control/locale/hr-doc.json
deleted file mode 100644
index 07b3613..0000000
--- a/home/doctype/home_control/locale/hr-doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "Home": "Dom",
- "Home Control": "Po\u010detna kontrola"
-}
\ No newline at end of file
diff --git a/home/doctype/home_control/locale/nl-doc.json b/home/doctype/home_control/locale/nl-doc.json
deleted file mode 100644
index 3835465..0000000
--- a/home/doctype/home_control/locale/nl-doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "Home": "Thuis",
- "Home Control": "Home Control"
-}
\ No newline at end of file
diff --git a/home/doctype/home_control/locale/pt-BR-doc.json b/home/doctype/home_control/locale/pt-BR-doc.json
deleted file mode 100644
index 406e97e..0000000
--- a/home/doctype/home_control/locale/pt-BR-doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "Home": "In\u00edcio",
- "Home Control": "In\u00edcio de Controle"
-}
\ No newline at end of file
diff --git a/home/doctype/home_control/locale/pt-doc.json b/home/doctype/home_control/locale/pt-doc.json
deleted file mode 100644
index baf3481..0000000
--- a/home/doctype/home_control/locale/pt-doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "Home": "Casa",
- "Home Control": "Home Control"
-}
\ No newline at end of file
diff --git a/home/doctype/home_control/locale/sr-doc.json b/home/doctype/home_control/locale/sr-doc.json
deleted file mode 100644
index ab13472..0000000
--- a/home/doctype/home_control/locale/sr-doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "Home": "\u041a\u0443\u045b\u0438",
- "Home Control": "\u0425\u043e\u043c\u0435 \u0426\u043e\u043d\u0442\u0440\u043e\u043b"
-}
\ No newline at end of file
diff --git a/home/doctype/home_control/locale/ta-doc.json b/home/doctype/home_control/locale/ta-doc.json
deleted file mode 100644
index e5b23f1..0000000
--- a/home/doctype/home_control/locale/ta-doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "Home": "\u0bae\u0bc1\u0b95\u0baa\u0bcd\u0baa\u0bc1",
- "Home Control": "\u0bae\u0bc1\u0b95\u0baa\u0bcd\u0baa\u0bc1 \u0b95\u0b9f\u0bcd\u0b9f\u0bc1\u0baa\u0bcd\u0baa\u0bbe\u0b9f\u0bc1"
-}
\ No newline at end of file
diff --git a/home/doctype/home_control/locale/th-doc.json b/home/doctype/home_control/locale/th-doc.json
deleted file mode 100644
index 3fce0b9..0000000
--- a/home/doctype/home_control/locale/th-doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "Home": "\u0e1a\u0e49\u0e32\u0e19",
- "Home Control": "\u0e04\u0e27\u0e1a\u0e04\u0e38\u0e21\u0e2b\u0e19\u0e49\u0e32\u0e41\u0e23\u0e01"
-}
\ No newline at end of file
diff --git a/home/page/activity/README.md b/home/page/activity/README.md
new file mode 100644
index 0000000..59e0352
--- /dev/null
+++ b/home/page/activity/README.md
@@ -0,0 +1 @@
+List of latest activities based on Feed.
\ No newline at end of file
diff --git a/home/page/activity/activity.css b/home/page/activity/activity.css
index f3988b2..34562cb 100644
--- a/home/page/activity/activity.css
+++ b/home/page/activity/activity.css
@@ -1,20 +1,20 @@
-#activity-list .label {
+#page-activity .label {
display: inline-block;
width: 100px;
margin-right: 7px;
}
-#activity-list .label-info {
+#page-activity .label-info {
cursor: pointer;
}
-#activity-list .user-info {
+#page-activity .user-info {
float: right;
color: #777;
font-size: 10px;
}
-#activity-list .date-sep {
+#page-activity .date-sep {
margin-bottom: 11px;
padding: 5px 0px;
border-bottom: 1px solid #aaa;
diff --git a/home/page/activity/activity.html b/home/page/activity/activity.html
deleted file mode 100644
index 9fb910c..0000000
--- a/home/page/activity/activity.html
+++ /dev/null
@@ -1,7 +0,0 @@
-<div class="layout-wrapper layout-wrapper-appframe">
- <div class="layout-appframe"></div>
- <div class="layout-main">
- <div id="activity-list">
- </div>
- </div>
-</div>
\ No newline at end of file
diff --git a/home/page/activity/activity.js b/home/page/activity/activity.js
index 3443cc2..e412a23 100644
--- a/home/page/activity/activity.js
+++ b/home/page/activity/activity.js
@@ -1,13 +1,15 @@
wn.pages['activity'].onload = function(wrapper) {
- wrapper.appframe = new wn.ui.AppFrame($(wrapper).find('.layout-appframe'));
- wrapper.appframe.add_home_breadcrumb();
- wrapper.appframe.add_breadcrumb(wn.modules["Activity"].icon);
- wrapper.appframe.title('Activity');
+ wn.ui.make_app_page({
+ parent: wrapper,
+ title: "Activity",
+ single_column: true
+ })
+ wrapper.appframe.add_module_icon("Activity");
var list = new wn.ui.Listing({
appframe: wrapper.appframe,
method: 'home.page.activity.activity.get_feed',
- parent: $('#activity-list'),
+ parent: $(wrapper).find(".layout-main"),
render_row: function(row, data) {
new erpnext.ActivityFeed(row, data);
}
@@ -17,7 +19,7 @@
// Build Report Button
if(wn.boot.profile.can_get_report.indexOf("Feed")!=-1) {
wrapper.appframe.add_button('Build Report', function() {
- wn.set_route('Report2', "Feed");
+ wn.set_route('Report', "Feed");
}, 'icon-th')
}
}
diff --git a/home/page/attributions/README.md b/home/page/attributions/README.md
new file mode 100644
index 0000000..a5237bb
--- /dev/null
+++ b/home/page/attributions/README.md
@@ -0,0 +1 @@
+Attributions for software libraries / images used in ERPNext.
\ No newline at end of file
diff --git a/home/page/attributions/attributions.html b/home/page/attributions/attributions.html
index 99deea4..00f6342 100644
--- a/home/page/attributions/attributions.html
+++ b/home/page/attributions/attributions.html
@@ -1,4 +1,4 @@
-<div class="layout-wrapper layout-wrapper-appframe layout-attributions">
+<div class="appframe col col-lg-12 layout-attributions">
<div class="layout-appframe"></div>
<div class="layout-main">
<h3>ERPNext is made using these Awesome Open Source Projects <i class="icon-heart" style="color: red"></i></h3>
@@ -95,6 +95,10 @@
<td>Draw Gantt charts with the famous jQuery ease of development.</td>
</tr>
<tr>
+ <td><a href="http://aehlke.github.io/tag-it/">JQuery Tag-it</a></td>
+ <td>Simple and configurable tag editing widget with autocomplete support.</td>
+ </tr>
+ <tr>
<td><a href="http://jscolor.com/">JSColor - Color Picker</a></td>
<td>HTML/Javascript Color Picker.</td>
</tr>
diff --git a/home/page/latest_updates/README.md b/home/page/latest_updates/README.md
new file mode 100644
index 0000000..d3bf0d4
--- /dev/null
+++ b/home/page/latest_updates/README.md
@@ -0,0 +1 @@
+Update log.
\ No newline at end of file
diff --git a/hr/README.md b/hr/README.md
new file mode 100644
index 0000000..5d1ae6e
--- /dev/null
+++ b/hr/README.md
@@ -0,0 +1,6 @@
+Key features:
+
+- Leave and Attendance
+- Payroll
+- Appraisal
+- Expense Claim
\ No newline at end of file
diff --git a/hr/doctype/appraisal/README.md b/hr/doctype/appraisal/README.md
new file mode 100644
index 0000000..7798f18
--- /dev/null
+++ b/hr/doctype/appraisal/README.md
@@ -0,0 +1 @@
+Performance of an Employee in a Time Period against given goals.
\ No newline at end of file
diff --git a/hr/doctype/appraisal/appraisal.txt b/hr/doctype/appraisal/appraisal.txt
index 9ed85e6..436434b 100644
--- a/hr/doctype/appraisal/appraisal.txt
+++ b/hr/doctype/appraisal/appraisal.txt
@@ -2,7 +2,7 @@
{
"creation": "2013-01-10 16:34:12",
"docstatus": 0,
- "modified": "2013-01-29 17:50:21",
+ "modified": "2013-06-11 16:06:06",
"modified_by": "Administrator",
"owner": "ashwini@webnotestech.com"
},
@@ -213,20 +213,6 @@
},
{
"doctype": "DocField",
- "fieldname": "amendment_date",
- "fieldtype": "Date",
- "hidden": 1,
- "label": "Amendment Date",
- "no_copy": 1,
- "oldfieldname": "amendment_date",
- "oldfieldtype": "Date",
- "print_hide": 1,
- "read_only": 1,
- "report_hide": 1,
- "width": "160px"
- },
- {
- "doctype": "DocField",
"fieldname": "amended_from",
"fieldtype": "Data",
"hidden": 1,
diff --git a/hr/doctype/appraisal_goal/README.md b/hr/doctype/appraisal_goal/README.md
new file mode 100644
index 0000000..851a403
--- /dev/null
+++ b/hr/doctype/appraisal_goal/README.md
@@ -0,0 +1 @@
+Goal for the parent Appraisal.
\ No newline at end of file
diff --git a/hr/doctype/appraisal_template/README.md b/hr/doctype/appraisal_template/README.md
new file mode 100644
index 0000000..d58a744
--- /dev/null
+++ b/hr/doctype/appraisal_template/README.md
@@ -0,0 +1 @@
+Standard set of goals for an Employee / Designation / Job Profile. New Appraisal transactions can be created from the Template.
\ No newline at end of file
diff --git a/hr/doctype/appraisal_template_goal/README.md b/hr/doctype/appraisal_template_goal/README.md
new file mode 100644
index 0000000..1b81afb
--- /dev/null
+++ b/hr/doctype/appraisal_template_goal/README.md
@@ -0,0 +1 @@
+Goal details for the parent Appraisal Template.
\ No newline at end of file
diff --git a/hr/doctype/attendance/README.md b/hr/doctype/attendance/README.md
new file mode 100644
index 0000000..f420b07
--- /dev/null
+++ b/hr/doctype/attendance/README.md
@@ -0,0 +1 @@
+Attendance record of an Employee on a particular date.
\ No newline at end of file
diff --git a/hr/doctype/attendance/attendance.txt b/hr/doctype/attendance/attendance.txt
index 127b7e3..05a1ab1 100644
--- a/hr/doctype/attendance/attendance.txt
+++ b/hr/doctype/attendance/attendance.txt
@@ -2,7 +2,7 @@
{
"creation": "2013-01-10 16:34:13",
"docstatus": 0,
- "modified": "2013-01-29 17:52:06",
+ "modified": "2013-06-11 16:06:17",
"modified_by": "Administrator",
"owner": "ashwini@webnotestech.com"
},
@@ -146,16 +146,6 @@
"reqd": 1
},
{
- "depends_on": "eval:doc.amended_from",
- "description": "The date at which current entry is corrected in the system.",
- "doctype": "DocField",
- "fieldname": "amendment_date",
- "fieldtype": "Date",
- "label": "Amendment Date",
- "no_copy": 1,
- "print_hide": 1
- },
- {
"doctype": "DocField",
"fieldname": "amended_from",
"fieldtype": "Link",
diff --git a/hr/doctype/branch/README.md b/hr/doctype/branch/README.md
new file mode 100644
index 0000000..9f679ec
--- /dev/null
+++ b/hr/doctype/branch/README.md
@@ -0,0 +1 @@
+Location belonging to the organization where Employees can belong.
\ No newline at end of file
diff --git a/hr/doctype/deduction_type/README.md b/hr/doctype/deduction_type/README.md
new file mode 100644
index 0000000..2a22774
--- /dev/null
+++ b/hr/doctype/deduction_type/README.md
@@ -0,0 +1,3 @@
+Type of salary deduction.
+
+e.g. Tax paid on behalf of the employee that is deducted from the salary.
\ No newline at end of file
diff --git a/hr/doctype/department/README.md b/hr/doctype/department/README.md
new file mode 100644
index 0000000..6f74b86
--- /dev/null
+++ b/hr/doctype/department/README.md
@@ -0,0 +1 @@
+Department where Employee belongs.
\ No newline at end of file
diff --git a/hr/doctype/designation/README.md b/hr/doctype/designation/README.md
new file mode 100644
index 0000000..a02a923
--- /dev/null
+++ b/hr/doctype/designation/README.md
@@ -0,0 +1 @@
+Employee Designation.
\ No newline at end of file
diff --git a/hr/doctype/earning_type/README.md b/hr/doctype/earning_type/README.md
new file mode 100644
index 0000000..50aa1b3
--- /dev/null
+++ b/hr/doctype/earning_type/README.md
@@ -0,0 +1,3 @@
+Type of earning that is a part of the salary.
+
+e.g. basic salary, bonus etc.
\ No newline at end of file
diff --git a/hr/doctype/employee/README.md b/hr/doctype/employee/README.md
new file mode 100644
index 0000000..f82e99a
--- /dev/null
+++ b/hr/doctype/employee/README.md
@@ -0,0 +1 @@
+Employee master.
\ No newline at end of file
diff --git a/hr/doctype/employee_education/README.md b/hr/doctype/employee_education/README.md
new file mode 100644
index 0000000..4d7ccee
--- /dev/null
+++ b/hr/doctype/employee_education/README.md
@@ -0,0 +1 @@
+Education detail for parent Employee.
\ No newline at end of file
diff --git a/hr/doctype/employee_external_work_history/README.md b/hr/doctype/employee_external_work_history/README.md
new file mode 100644
index 0000000..6564377
--- /dev/null
+++ b/hr/doctype/employee_external_work_history/README.md
@@ -0,0 +1 @@
+External work history details of parent Employee.
\ No newline at end of file
diff --git a/hr/doctype/employee_internal_work_history/README.md b/hr/doctype/employee_internal_work_history/README.md
new file mode 100644
index 0000000..8f7fb3f
--- /dev/null
+++ b/hr/doctype/employee_internal_work_history/README.md
@@ -0,0 +1 @@
+Work history details of parent Employee within the organization.
\ No newline at end of file
diff --git a/hr/doctype/employee_leave_approver/README.md b/hr/doctype/employee_leave_approver/README.md
new file mode 100644
index 0000000..329e93c
--- /dev/null
+++ b/hr/doctype/employee_leave_approver/README.md
@@ -0,0 +1 @@
+User authorized to approve Leave Application for an Employee.
\ No newline at end of file
diff --git a/hr/doctype/employee_training/__init__.py b/hr/doctype/employee_training/__init__.py
deleted file mode 100644
index baffc48..0000000
--- a/hr/doctype/employee_training/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-from __future__ import unicode_literals
diff --git a/hr/doctype/employee_training/employee_training.py b/hr/doctype/employee_training/employee_training.py
deleted file mode 100644
index 7f48feb..0000000
--- a/hr/doctype/employee_training/employee_training.py
+++ /dev/null
@@ -1,22 +0,0 @@
-# ERPNext - web based ERP (http://erpnext.com)
-# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-from __future__ import unicode_literals
-import webnotes
-
-class DocType:
- def __init__(self, d, dl):
- self.doc, self.doclist = d, dl
\ No newline at end of file
diff --git a/hr/doctype/employee_training/employee_training.txt b/hr/doctype/employee_training/employee_training.txt
deleted file mode 100644
index 6b3a754..0000000
--- a/hr/doctype/employee_training/employee_training.txt
+++ /dev/null
@@ -1,71 +0,0 @@
-[
- {
- "creation": "2013-02-22 01:27:45",
- "docstatus": 0,
- "modified": "2013-03-07 07:03:21",
- "modified_by": "Administrator",
- "owner": "Administrator"
- },
- {
- "doctype": "DocType",
- "istable": 1,
- "module": "HR",
- "name": "__common__"
- },
- {
- "doctype": "DocField",
- "name": "__common__",
- "parent": "Employee Training",
- "parentfield": "fields",
- "parenttype": "DocType",
- "permlevel": 0
- },
- {
- "doctype": "DocType",
- "name": "Employee Training"
- },
- {
- "doctype": "DocField",
- "fieldname": "institute",
- "fieldtype": "Small Text",
- "label": "Institute / Conducted By",
- "oldfieldname": "institute",
- "oldfieldtype": "Small Text",
- "reqd": 1
- },
- {
- "doctype": "DocField",
- "fieldname": "nature_of_training",
- "fieldtype": "Small Text",
- "label": "Program / Seminar Title",
- "oldfieldname": "nature_of_training",
- "oldfieldtype": "Small Text",
- "reqd": 1
- },
- {
- "doctype": "DocField",
- "fieldname": "duration",
- "fieldtype": "Data",
- "label": "Duration",
- "oldfieldname": "duration",
- "oldfieldtype": "Data",
- "reqd": 0
- },
- {
- "doctype": "DocField",
- "fieldname": "loc",
- "fieldtype": "Data",
- "label": "Location",
- "oldfieldname": "loc",
- "oldfieldtype": "Data",
- "reqd": 0
- },
- {
- "doctype": "DocField",
- "fieldname": "certificate",
- "fieldtype": "Small Text",
- "label": "Certificate",
- "oldfieldname": "certificate",
- "oldfieldtype": "Small Text"
- }
-]
\ No newline at end of file
diff --git a/hr/doctype/employee_training/locale/_messages_doc.json b/hr/doctype/employee_training/locale/_messages_doc.json
deleted file mode 100644
index cb49386..0000000
--- a/hr/doctype/employee_training/locale/_messages_doc.json
+++ /dev/null
@@ -1,9 +0,0 @@
-[
- "Program / Seminar Title",
- "Certificate",
- "HR",
- "Employee Training",
- "Duration",
- "Location",
- "Institute / Conducted By"
-]
\ No newline at end of file
diff --git a/hr/doctype/employee_training/locale/ar-doc.json b/hr/doctype/employee_training/locale/ar-doc.json
deleted file mode 100644
index 789f284..0000000
--- a/hr/doctype/employee_training/locale/ar-doc.json
+++ /dev/null
@@ -1,9 +0,0 @@
-{
- "Certificate": "\u0634\u0647\u0627\u062f\u0629",
- "Duration": "\u0645\u062f\u0629",
- "Employee Training": "\u062a\u062f\u0631\u064a\u0628 \u0627\u0644\u0645\u0648\u0638\u0641\u064a\u0646",
- "HR": "HR",
- "Institute / Conducted By": "\u0645\u0639\u0647\u062f / \u0623\u062c\u0631\u062a\u0647",
- "Location": "\u0645\u0648\u0642\u0639",
- "Program / Seminar Title": "\u0628\u0631\u0646\u0627\u0645\u062c / \u0646\u062f\u0648\u0629 \u0639\u0646\u0648\u0627\u0646"
-}
\ No newline at end of file
diff --git a/hr/doctype/employee_training/locale/de-doc.json b/hr/doctype/employee_training/locale/de-doc.json
deleted file mode 100644
index 9a378eb..0000000
--- a/hr/doctype/employee_training/locale/de-doc.json
+++ /dev/null
@@ -1,9 +0,0 @@
-{
- "Certificate": "Zertifikat",
- "Duration": "Dauer",
- "Employee Training": "Mitarbeiterschulung",
- "HR": "HR",
- "Institute / Conducted By": "Institute / By Geleitete",
- "Location": "Lage",
- "Program / Seminar Title": "Programm / Seminar Titel"
-}
\ No newline at end of file
diff --git a/hr/doctype/employee_training/locale/es-doc.json b/hr/doctype/employee_training/locale/es-doc.json
deleted file mode 100644
index 38c04377..0000000
--- a/hr/doctype/employee_training/locale/es-doc.json
+++ /dev/null
@@ -1,9 +0,0 @@
-{
- "Certificate": "Certificado",
- "Duration": "Duraci\u00f3n",
- "Employee Training": "Capacitaci\u00f3n de los empleados",
- "HR": "HR",
- "Institute / Conducted By": "Instituto / Conducido por los",
- "Location": "Ubicaci\u00f3n",
- "Program / Seminar Title": "Programa / Seminario de T\u00edtulo"
-}
\ No newline at end of file
diff --git a/hr/doctype/employee_training/locale/fr-doc.json b/hr/doctype/employee_training/locale/fr-doc.json
deleted file mode 100644
index f2097e6..0000000
--- a/hr/doctype/employee_training/locale/fr-doc.json
+++ /dev/null
@@ -1,9 +0,0 @@
-{
- "Certificate": "Certificat",
- "Duration": "Dur\u00e9e",
- "Employee Training": "Formation des employ\u00e9s",
- "HR": "RH",
- "Institute / Conducted By": "Institut / Men\u00e9e par",
- "Location": "Emplacement",
- "Program / Seminar Title": "Programme / S\u00e9minaire Titre"
-}
\ No newline at end of file
diff --git a/hr/doctype/employee_training/locale/hi-doc.json b/hr/doctype/employee_training/locale/hi-doc.json
deleted file mode 100644
index 403e3f4..0000000
--- a/hr/doctype/employee_training/locale/hi-doc.json
+++ /dev/null
@@ -1,9 +0,0 @@
-{
- "Certificate": "\u092a\u094d\u0930\u092e\u093e\u0923\u092a\u0924\u094d\u0930",
- "Duration": "\u0905\u0935\u0927\u093f",
- "Employee Training": "\u0915\u0930\u094d\u092e\u091a\u093e\u0930\u0940 \u092a\u094d\u0930\u0936\u093f\u0915\u094d\u0937\u0923",
- "HR": "\u092e\u093e\u0928\u0935 \u0938\u0902\u0938\u093e\u0927\u0928",
- "Institute / Conducted By": "/ \u0938\u0902\u0938\u094d\u0925\u093e\u0928 \u0926\u094d\u0935\u093e\u0930\u093e \u0906\u092f\u094b\u091c\u093f\u0924",
- "Location": "\u0938\u094d\u0925\u093e\u0928",
- "Program / Seminar Title": "\u0915\u093e\u0930\u094d\u092f\u0915\u094d\u0930\u092e / \u0936\u0940\u0930\u094d\u0937\u0915 \u0938\u0902\u0917\u094b\u0937\u094d\u0920\u0940"
-}
\ No newline at end of file
diff --git a/hr/doctype/employee_training/locale/hr-doc.json b/hr/doctype/employee_training/locale/hr-doc.json
deleted file mode 100644
index 8cc35c8..0000000
--- a/hr/doctype/employee_training/locale/hr-doc.json
+++ /dev/null
@@ -1,9 +0,0 @@
-{
- "Certificate": "Certifikat",
- "Duration": "Trajanje",
- "Employee Training": "Zaposlenik Trening",
- "HR": "HR",
- "Institute / Conducted By": "Institut / provela",
- "Location": "Lokacija",
- "Program / Seminar Title": "Program / Seminar Naslov"
-}
\ No newline at end of file
diff --git a/hr/doctype/employee_training/locale/nl-doc.json b/hr/doctype/employee_training/locale/nl-doc.json
deleted file mode 100644
index c11a24c..0000000
--- a/hr/doctype/employee_training/locale/nl-doc.json
+++ /dev/null
@@ -1,9 +0,0 @@
-{
- "Certificate": "Certificaat",
- "Duration": "Duur",
- "Employee Training": "Medewerker Training",
- "HR": "HR",
- "Institute / Conducted By": "Instituut / uitgevoerd door",
- "Location": "Plaats",
- "Program / Seminar Title": "Programma / Seminarie Titel"
-}
\ No newline at end of file
diff --git a/hr/doctype/employee_training/locale/pt-BR-doc.json b/hr/doctype/employee_training/locale/pt-BR-doc.json
deleted file mode 100644
index 474dce3..0000000
--- a/hr/doctype/employee_training/locale/pt-BR-doc.json
+++ /dev/null
@@ -1,9 +0,0 @@
-{
- "Certificate": "Certid\u00e3o",
- "Duration": "Dura\u00e7\u00e3o",
- "Employee Training": "Treinamento de funcion\u00e1rios",
- "HR": "RH",
- "Institute / Conducted By": "Instituto / Conduzido por",
- "Location": "Localiza\u00e7\u00e3o",
- "Program / Seminar Title": "Programa / T\u00edtulo do Semin\u00e1rio"
-}
\ No newline at end of file
diff --git a/hr/doctype/employee_training/locale/pt-doc.json b/hr/doctype/employee_training/locale/pt-doc.json
deleted file mode 100644
index 03d866c..0000000
--- a/hr/doctype/employee_training/locale/pt-doc.json
+++ /dev/null
@@ -1,9 +0,0 @@
-{
- "Certificate": "Certid\u00e3o",
- "Duration": "Dura\u00e7\u00e3o",
- "Employee Training": "Treinamento de funcion\u00e1rios",
- "HR": "HR",
- "Institute / Conducted By": "Instituto / conduzido por",
- "Location": "Localiza\u00e7\u00e3o",
- "Program / Seminar Title": "Programa / Semin\u00e1rio T\u00edtulo"
-}
\ No newline at end of file
diff --git a/hr/doctype/employee_training/locale/sr-doc.json b/hr/doctype/employee_training/locale/sr-doc.json
deleted file mode 100644
index e4389e7..0000000
--- a/hr/doctype/employee_training/locale/sr-doc.json
+++ /dev/null
@@ -1,9 +0,0 @@
-{
- "Certificate": "\u041f\u043e\u0442\u0432\u0440\u0434\u0430",
- "Duration": "\u0422\u0440\u0430\u0458\u0430\u045a\u0435",
- "Employee Training": "\u041e\u0431\u0443\u043a\u0430 \u0437\u0430\u043f\u043e\u0441\u043b\u0435\u043d\u0438\u0445",
- "HR": "\u0425\u0420",
- "Institute / Conducted By": "\u0418\u043d\u0441\u0442\u0438\u0442\u0443\u0442 / \u0441\u043f\u0440\u043e\u0432\u0435\u043b\u0430",
- "Location": "\u041b\u043e\u043a\u0430\u0446\u0438\u0458\u0430",
- "Program / Seminar Title": "\u041f\u0440\u043e\u0433\u0440\u0430\u043c / \u0421\u0435\u043c\u0438\u043d\u0430\u0440 \u041d\u0430\u0437\u0438\u0432"
-}
\ No newline at end of file
diff --git a/hr/doctype/employee_training/locale/ta-doc.json b/hr/doctype/employee_training/locale/ta-doc.json
deleted file mode 100644
index 87f726c..0000000
--- a/hr/doctype/employee_training/locale/ta-doc.json
+++ /dev/null
@@ -1,9 +0,0 @@
-{
- "Certificate": "\u0b9a\u0bbe\u0ba9\u0bcd\u0bb1\u0bbf\u0ba4\u0bb4\u0bcd",
- "Duration": "\u0ba8\u0bc0\u0b9f\u0bbf\u0b95\u0bcd\u0b95\u0bc1\u0bae\u0bcd \u0b95\u0bbe\u0bb2\u0bae\u0bcd",
- "Employee Training": "\u0baa\u0ba3\u0bbf\u0baf\u0bbe\u0bb3\u0bb0\u0bcd \u0baa\u0baf\u0bbf\u0bb1\u0bcd\u0b9a\u0bbf",
- "HR": "\u0b85\u0bb2\u0bc1\u0bb5\u0bb2\u0b95",
- "Institute / Conducted By": "\u0ba8\u0bbf\u0bb1\u0bc1\u0bb5\u0ba9\u0bae\u0bcd / \u0ba8\u0b9f\u0ba4\u0bcd\u0ba4\u0baa\u0bcd\u0baa\u0b9f\u0bc1\u0bae\u0bcd",
- "Location": "\u0b87\u0bb0\u0bc1\u0baa\u0bcd\u0baa\u0bbf\u0b9f\u0bae\u0bcd",
- "Program / Seminar Title": "\u0ba8\u0bbf\u0bb0\u0bb2\u0bcd / \u0b95\u0bb0\u0bc1\u0ba4\u0bcd\u0ba4\u0bb0\u0b99\u0bcd\u0b95 \u0ba4\u0bb2\u0bc8\u0baa\u0bcd\u0baa\u0bc1"
-}
\ No newline at end of file
diff --git a/hr/doctype/employee_training/locale/th-doc.json b/hr/doctype/employee_training/locale/th-doc.json
deleted file mode 100644
index 423b367..0000000
--- a/hr/doctype/employee_training/locale/th-doc.json
+++ /dev/null
@@ -1,9 +0,0 @@
-{
- "Certificate": "\u0e43\u0e1a\u0e23\u0e31\u0e1a\u0e23\u0e2d\u0e07",
- "Duration": "\u0e23\u0e30\u0e22\u0e30\u0e40\u0e27\u0e25\u0e32",
- "Employee Training": "\u0e01\u0e32\u0e23\u0e1d\u0e36\u0e01\u0e2d\u0e1a\u0e23\u0e21\u0e1e\u0e19\u0e31\u0e01\u0e07\u0e32\u0e19",
- "HR": "\u0e17\u0e23\u0e31\u0e1e\u0e22\u0e32\u0e01\u0e23\u0e1a\u0e38\u0e04\u0e04\u0e25",
- "Institute / Conducted By": "\u0e2a\u0e16\u0e32\u0e1a\u0e31\u0e19\u0e14\u0e33\u0e40\u0e19\u0e34\u0e19\u0e01\u0e32\u0e23 / \u0e42\u0e14\u0e22",
- "Location": "\u0e2a\u0e16\u0e32\u0e19\u0e17\u0e35\u0e48",
- "Program / Seminar Title": "\u0e0a\u0e37\u0e48\u0e2d\u0e42\u0e1b\u0e23\u0e41\u0e01\u0e23\u0e21 / \u0e2a\u0e31\u0e21\u0e21\u0e19\u0e32"
-}
\ No newline at end of file
diff --git a/hr/doctype/employment_type/README.md b/hr/doctype/employment_type/README.md
new file mode 100644
index 0000000..19de703
--- /dev/null
+++ b/hr/doctype/employment_type/README.md
@@ -0,0 +1,3 @@
+Type of employment.
+
+e.g. Permanent, Probation, Intern etc.
\ No newline at end of file
diff --git a/hr/doctype/expense_claim/README.md b/hr/doctype/expense_claim/README.md
new file mode 100644
index 0000000..489029c
--- /dev/null
+++ b/hr/doctype/expense_claim/README.md
@@ -0,0 +1 @@
+Amount claimed by Employee for expense made by the Employee on organization's behalf.
\ No newline at end of file
diff --git a/hr/doctype/expense_claim/expense_claim.txt b/hr/doctype/expense_claim/expense_claim.txt
index 0ceb214..9791572 100644
--- a/hr/doctype/expense_claim/expense_claim.txt
+++ b/hr/doctype/expense_claim/expense_claim.txt
@@ -2,7 +2,7 @@
{
"creation": "2013-01-10 16:34:14",
"docstatus": 0,
- "modified": "2013-02-04 09:22:51",
+ "modified": "2013-06-11 16:16:35",
"modified_by": "Administrator",
"owner": "harshada@webnotestech.com"
},
@@ -216,19 +216,6 @@
"width": "160px"
},
{
- "doctype": "DocField",
- "fieldname": "amendment_date",
- "fieldtype": "Date",
- "label": "Amendment Date",
- "no_copy": 1,
- "oldfieldname": "amendment_date",
- "oldfieldtype": "Date",
- "print_hide": 1,
- "read_only": 1,
- "report_hide": 1,
- "width": "160px"
- },
- {
"doctype": "DocPerm",
"match": "owner",
"role": "Employee"
diff --git a/hr/doctype/expense_claim_detail/README.md b/hr/doctype/expense_claim_detail/README.md
new file mode 100644
index 0000000..4a747e2
--- /dev/null
+++ b/hr/doctype/expense_claim_detail/README.md
@@ -0,0 +1 @@
+Detail of expense in parent Expense Claim.
\ No newline at end of file
diff --git a/hr/doctype/expense_claim_type/README.md b/hr/doctype/expense_claim_type/README.md
new file mode 100644
index 0000000..13a654e
--- /dev/null
+++ b/hr/doctype/expense_claim_type/README.md
@@ -0,0 +1 @@
+Type of expense for Expense Claim.
\ No newline at end of file
diff --git a/hr/doctype/grade/README.md b/hr/doctype/grade/README.md
new file mode 100644
index 0000000..fedc03b
--- /dev/null
+++ b/hr/doctype/grade/README.md
@@ -0,0 +1 @@
+Employee grade.
\ No newline at end of file
diff --git a/hr/doctype/holiday/README.md b/hr/doctype/holiday/README.md
new file mode 100644
index 0000000..0d932a9
--- /dev/null
+++ b/hr/doctype/holiday/README.md
@@ -0,0 +1 @@
+Holiday date in Holiday List.
\ No newline at end of file
diff --git a/hr/doctype/holiday_list/README.md b/hr/doctype/holiday_list/README.md
new file mode 100644
index 0000000..1652c0a
--- /dev/null
+++ b/hr/doctype/holiday_list/README.md
@@ -0,0 +1 @@
+List of Holidays.
\ No newline at end of file
diff --git a/hr/doctype/job_applicant/README.md b/hr/doctype/job_applicant/README.md
new file mode 100644
index 0000000..8eb2edb
--- /dev/null
+++ b/hr/doctype/job_applicant/README.md
@@ -0,0 +1 @@
+Applicant for Job.
\ No newline at end of file
diff --git a/hr/doctype/job_applicant/job_applicant.js b/hr/doctype/job_applicant/job_applicant.js
index c301250..220ff18 100644
--- a/hr/doctype/job_applicant/job_applicant.js
+++ b/hr/doctype/job_applicant/job_applicant.js
@@ -3,7 +3,7 @@
cur_frm.cscript = {
onload: function(doc, dt, dn) {
if(in_list(user_roles,'System Manager')) {
- cur_frm.page_layout.footer.help_area.innerHTML = '<hr>\
+ cur_frm.footer.help_area.innerHTML = '<hr>\
<p><a href="#Form/Jobs Email Settings">Jobs Email Settings</a><br>\
<span class="help">Automatically extract Job Applicants from a mail box e.g. "jobs@example.com"</span></p>';
}
diff --git a/hr/doctype/job_opening/README.md b/hr/doctype/job_opening/README.md
new file mode 100644
index 0000000..5a19f33
--- /dev/null
+++ b/hr/doctype/job_opening/README.md
@@ -0,0 +1 @@
+Open position for Job.
\ No newline at end of file
diff --git a/hr/doctype/leave_allocation/README.md b/hr/doctype/leave_allocation/README.md
new file mode 100644
index 0000000..870f9a5
--- /dev/null
+++ b/hr/doctype/leave_allocation/README.md
@@ -0,0 +1 @@
+Leave Allocated to an Employee at the beginning of the period.
\ No newline at end of file
diff --git a/hr/doctype/leave_allocation/leave_allocation.txt b/hr/doctype/leave_allocation/leave_allocation.txt
index 9027c84..cd2fc02 100644
--- a/hr/doctype/leave_allocation/leave_allocation.txt
+++ b/hr/doctype/leave_allocation/leave_allocation.txt
@@ -2,7 +2,7 @@
{
"creation": "2013-02-20 19:10:38",
"docstatus": 0,
- "modified": "2013-02-20 19:11:03",
+ "modified": "2013-06-11 16:16:32",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -163,19 +163,6 @@
"read_only": 1
},
{
- "description": "The date at which current entry is corrected in the system.",
- "doctype": "DocField",
- "fieldname": "amendment_date",
- "fieldtype": "Date",
- "hidden": 0,
- "label": "Amendment Date",
- "no_copy": 1,
- "oldfieldname": "amendment_date",
- "oldfieldtype": "Date",
- "print_hide": 1,
- "read_only": 1
- },
- {
"doctype": "DocPerm",
"match": "owner",
"role": "HR User"
diff --git a/hr/doctype/leave_application/README.md b/hr/doctype/leave_application/README.md
new file mode 100644
index 0000000..e78e37a
--- /dev/null
+++ b/hr/doctype/leave_application/README.md
@@ -0,0 +1 @@
+Application for Leave by an Employee.
\ No newline at end of file
diff --git a/hr/doctype/leave_application/leave_application_calendar.js b/hr/doctype/leave_application/leave_application_calendar.js
index 398664e..48eb7fa 100644
--- a/hr/doctype/leave_application/leave_application_calendar.js
+++ b/hr/doctype/leave_application/leave_application_calendar.js
@@ -1,4 +1,4 @@
-wn.views.calendar["Leave Application"] = wn.views.Calendar.extend({
+wn.views.calendar["Leave Application"] = {
field_map: {
"start": "from_date",
"end": "to_date",
@@ -14,4 +14,4 @@
}
},
get_events_method: "hr.doctype.leave_application.leave_application.get_events"
-})
\ No newline at end of file
+}
\ No newline at end of file
diff --git a/hr/doctype/leave_block_list/README.md b/hr/doctype/leave_block_list/README.md
new file mode 100644
index 0000000..b23396c
--- /dev/null
+++ b/hr/doctype/leave_block_list/README.md
@@ -0,0 +1 @@
+List of days on which leaves can only be approved by special users.
\ No newline at end of file
diff --git a/hr/doctype/leave_block_list_allow/README.md b/hr/doctype/leave_block_list_allow/README.md
new file mode 100644
index 0000000..a735039
--- /dev/null
+++ b/hr/doctype/leave_block_list_allow/README.md
@@ -0,0 +1 @@
+User allowed to approve leave on blocked date.
\ No newline at end of file
diff --git a/hr/doctype/leave_block_list_date/README.md b/hr/doctype/leave_block_list_date/README.md
new file mode 100644
index 0000000..658f359
--- /dev/null
+++ b/hr/doctype/leave_block_list_date/README.md
@@ -0,0 +1 @@
+Date blocked on parent Leave Block List.
\ No newline at end of file
diff --git a/hr/doctype/leave_control_panel/README.md b/hr/doctype/leave_control_panel/README.md
new file mode 100644
index 0000000..f7d3357
--- /dev/null
+++ b/hr/doctype/leave_control_panel/README.md
@@ -0,0 +1 @@
+Tool to allocate leaves in bulk.
\ No newline at end of file
diff --git a/hr/doctype/leave_type/README.md b/hr/doctype/leave_type/README.md
new file mode 100644
index 0000000..695e9dd
--- /dev/null
+++ b/hr/doctype/leave_type/README.md
@@ -0,0 +1,6 @@
+Type of Leave.
+
+e.g.
+
+- Casual Leave
+- Sick Leave
\ No newline at end of file
diff --git a/hr/doctype/other_income_detail/__init__.py b/hr/doctype/other_income_detail/__init__.py
deleted file mode 100644
index baffc48..0000000
--- a/hr/doctype/other_income_detail/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-from __future__ import unicode_literals
diff --git a/hr/doctype/other_income_detail/locale/_messages_doc.json b/hr/doctype/other_income_detail/locale/_messages_doc.json
deleted file mode 100644
index 4b80e72..0000000
--- a/hr/doctype/other_income_detail/locale/_messages_doc.json
+++ /dev/null
@@ -1,10 +0,0 @@
-[
- "Other Income Detail",
- "Under Section",
- "Modified Amount",
- "Actual Amount",
- "HR",
- "Max. Limit",
- "Eligible Amount",
- "Particulars"
-]
\ No newline at end of file
diff --git a/hr/doctype/other_income_detail/locale/ar-doc.json b/hr/doctype/other_income_detail/locale/ar-doc.json
deleted file mode 100644
index e074de2..0000000
--- a/hr/doctype/other_income_detail/locale/ar-doc.json
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "Actual Amount": "\u0627\u0644\u0645\u0628\u0644\u063a \u0627\u0644\u0641\u0639\u0644\u064a",
- "Eligible Amount": "\u0627\u0644\u0645\u0624\u0647\u0644\u0629 \u0627\u0644\u0645\u0628\u0644\u063a",
- "HR": "HR",
- "Max. Limit": "\u0645\u0627\u0643\u0633. \u0642\u0635\u0631",
- "Modified Amount": "\u062a\u0639\u062f\u064a\u0644 \u0627\u0644\u0645\u0628\u0644\u063a",
- "Other Income Detail": "\u062a\u0641\u0627\u0635\u064a\u0644 \u0627\u0644\u0625\u064a\u0631\u0627\u062f\u0627\u062a \u0627\u0644\u0623\u062e\u0631\u0649",
- "Particulars": "\u062a\u0641\u0627\u0635\u064a\u0644",
- "Under Section": "\u062a\u062d\u062a \u0627\u0644\u0642\u0633\u0645"
-}
\ No newline at end of file
diff --git a/hr/doctype/other_income_detail/locale/de-doc.json b/hr/doctype/other_income_detail/locale/de-doc.json
deleted file mode 100644
index 9f6b886..0000000
--- a/hr/doctype/other_income_detail/locale/de-doc.json
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "Actual Amount": "Istmenge",
- "Eligible Amount": "Anrechnungsbetrag",
- "HR": "HR",
- "Max. Limit": "Max Limit",
- "Modified Amount": "Ge\u00e4ndert Betrag",
- "Other Income Detail": "Sonstige Ertr\u00e4ge Detailansicht",
- "Particulars": "Einzelheiten",
- "Under Section": "Gem\u00e4\u00df \u00a7"
-}
\ No newline at end of file
diff --git a/hr/doctype/other_income_detail/locale/es-doc.json b/hr/doctype/other_income_detail/locale/es-doc.json
deleted file mode 100644
index 18824fa..0000000
--- a/hr/doctype/other_income_detail/locale/es-doc.json
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "Actual Amount": "Cantidad real",
- "Eligible Amount": "Monto Elegible",
- "HR": "HR",
- "Max. Limit": "Max. Limitar",
- "Modified Amount": "Monto de la modificaci\u00f3n",
- "Other Income Detail": "Detalle de otros ingresos",
- "Particulars": "Datos",
- "Under Section": "Bajo la Secci\u00f3n"
-}
\ No newline at end of file
diff --git a/hr/doctype/other_income_detail/locale/fr-doc.json b/hr/doctype/other_income_detail/locale/fr-doc.json
deleted file mode 100644
index 9f2edb5..0000000
--- a/hr/doctype/other_income_detail/locale/fr-doc.json
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "Actual Amount": "Montant r\u00e9el",
- "Eligible Amount": "Montant admissible",
- "HR": "RH",
- "Max. Limit": "Max. Limiter",
- "Modified Amount": "Montant de modification",
- "Other Income Detail": "D\u00e9tail Autres revenus",
- "Particulars": "Coordonn\u00e9es",
- "Under Section": "Conform\u00e9ment \u00e0 l'article"
-}
\ No newline at end of file
diff --git a/hr/doctype/other_income_detail/locale/hi-doc.json b/hr/doctype/other_income_detail/locale/hi-doc.json
deleted file mode 100644
index 134810c..0000000
--- a/hr/doctype/other_income_detail/locale/hi-doc.json
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "Actual Amount": "\u0935\u093e\u0938\u094d\u0924\u0935\u093f\u0915 \u0930\u093e\u0936\u093f",
- "Eligible Amount": "\u092a\u093e\u0924\u094d\u0930\u0924\u093e \u0930\u093e\u0936\u093f",
- "HR": "\u092e\u093e\u0928\u0935 \u0938\u0902\u0938\u093e\u0927\u0928",
- "Max. Limit": "\u0905\u0927\u093f\u0915\u0924\u092e \u0938\u0940\u092e\u093e",
- "Modified Amount": "\u0938\u0902\u0936\u094b\u0927\u093f\u0924 \u0930\u093e\u0936\u093f",
- "Other Income Detail": "\u0905\u0928\u094d\u092f \u0906\u092f \u0935\u093f\u0938\u094d\u0924\u093e\u0930",
- "Particulars": "\u092c\u094d\u092f\u094c\u0930\u0947",
- "Under Section": "\u0927\u093e\u0930\u093e \u0915\u0947 \u0924\u0939\u0924"
-}
\ No newline at end of file
diff --git a/hr/doctype/other_income_detail/locale/hr-doc.json b/hr/doctype/other_income_detail/locale/hr-doc.json
deleted file mode 100644
index 5793846..0000000
--- a/hr/doctype/other_income_detail/locale/hr-doc.json
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "Actual Amount": "Stvarni iznos",
- "Eligible Amount": "Prihvatljivo Iznos",
- "HR": "HR",
- "Max. Limit": "Maks. Ograni\u010diti",
- "Modified Amount": "Promijenio Iznos",
- "Other Income Detail": "Ostali prihodi Detalj",
- "Particulars": "Pojedinosti",
- "Under Section": "Pod Odjela"
-}
\ No newline at end of file
diff --git a/hr/doctype/other_income_detail/locale/nl-doc.json b/hr/doctype/other_income_detail/locale/nl-doc.json
deleted file mode 100644
index 868a56e..0000000
--- a/hr/doctype/other_income_detail/locale/nl-doc.json
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "Actual Amount": "Werkelijke bedrag",
- "Eligible Amount": "In aanmerking komende bedrag",
- "HR": "HR",
- "Max. Limit": "Max. Beperken",
- "Modified Amount": "Gewijzigd Bedrag",
- "Other Income Detail": "Overige inkomsten Detail",
- "Particulars": "Bijzonderheden",
- "Under Section": "Op grond van artikel"
-}
\ No newline at end of file
diff --git a/hr/doctype/other_income_detail/locale/pt-BR-doc.json b/hr/doctype/other_income_detail/locale/pt-BR-doc.json
deleted file mode 100644
index be0f530..0000000
--- a/hr/doctype/other_income_detail/locale/pt-BR-doc.json
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "Actual Amount": "Valor Real",
- "Eligible Amount": "Montante eleg\u00edvel",
- "HR": "RH",
- "Max. Limit": "Max. Limitar",
- "Modified Amount": "Quantidade modificada",
- "Other Income Detail": "Detalhe sobre Outras Receitas",
- "Particulars": "Caracter\u00edsticas",
- "Under Section": "Segundo a Se\u00e7\u00e3o"
-}
\ No newline at end of file
diff --git a/hr/doctype/other_income_detail/locale/pt-doc.json b/hr/doctype/other_income_detail/locale/pt-doc.json
deleted file mode 100644
index eeae4cf..0000000
--- a/hr/doctype/other_income_detail/locale/pt-doc.json
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "Actual Amount": "Valor Real",
- "Eligible Amount": "Montante eleg\u00edvel",
- "HR": "HR",
- "Max. Limit": "Max. Limitar",
- "Modified Amount": "Quantidade modificado",
- "Other Income Detail": "Detalhe Outras Receitas",
- "Particulars": "Caracter\u00edsticas",
- "Under Section": "Segundo a Se\u00e7\u00e3o"
-}
\ No newline at end of file
diff --git a/hr/doctype/other_income_detail/locale/sr-doc.json b/hr/doctype/other_income_detail/locale/sr-doc.json
deleted file mode 100644
index 381f4ea..0000000
--- a/hr/doctype/other_income_detail/locale/sr-doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "HR": "\u0425\u0420",
- "Other Income Detail": "\u041e\u0441\u0442\u0430\u043b\u0438 \u043f\u0440\u0438\u0445\u043e\u0434\u0438 \u0414\u0435\u0442\u0430\u0459"
-}
\ No newline at end of file
diff --git a/hr/doctype/other_income_detail/locale/ta-doc.json b/hr/doctype/other_income_detail/locale/ta-doc.json
deleted file mode 100644
index 9e1f654..0000000
--- a/hr/doctype/other_income_detail/locale/ta-doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "HR": "\u0b85\u0bb2\u0bc1\u0bb5\u0bb2\u0b95",
- "Other Income Detail": "\u0bae\u0bb1\u0bcd\u0bb1 \u0bb5\u0bb0\u0bc1\u0bae\u0bbe\u0ba9\u0bae\u0bcd \u0bb5\u0bbf\u0bb0\u0bbf\u0bb5\u0bbe\u0b95"
-}
\ No newline at end of file
diff --git a/hr/doctype/other_income_detail/locale/th-doc.json b/hr/doctype/other_income_detail/locale/th-doc.json
deleted file mode 100644
index 4a54cc5..0000000
--- a/hr/doctype/other_income_detail/locale/th-doc.json
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "Actual Amount": "\u0e08\u0e33\u0e19\u0e27\u0e19\u0e40\u0e07\u0e34\u0e19\u0e17\u0e35\u0e48\u0e41\u0e17\u0e49\u0e08\u0e23\u0e34\u0e07",
- "Eligible Amount": "\u0e08\u0e33\u0e19\u0e27\u0e19\u0e2a\u0e34\u0e17\u0e18\u0e34\u0e4c",
- "HR": "\u0e17\u0e23\u0e31\u0e1e\u0e22\u0e32\u0e01\u0e23\u0e1a\u0e38\u0e04\u0e04\u0e25",
- "Max. Limit": "\u0e41\u0e21\u0e47\u0e01\u0e0b\u0e4c \u0e08\u0e33\u0e01\u0e31\u0e14",
- "Modified Amount": "\u0e08\u0e33\u0e19\u0e27\u0e19\u0e01\u0e32\u0e23\u0e41\u0e01\u0e49\u0e44\u0e02",
- "Other Income Detail": "\u0e23\u0e32\u0e22\u0e25\u0e30\u0e40\u0e2d\u0e35\u0e22\u0e14\u0e23\u0e32\u0e22\u200b\u200b\u0e44\u0e14\u0e49\u0e2d\u0e37\u0e48\u0e19 \u0e46",
- "Particulars": "\u0e23\u0e32\u0e22\u0e01\u0e32\u0e23",
- "Under Section": "\u0e15\u0e32\u0e21\u0e21\u0e32\u0e15\u0e23\u0e32"
-}
\ No newline at end of file
diff --git a/hr/doctype/other_income_detail/other_income_detail.py b/hr/doctype/other_income_detail/other_income_detail.py
deleted file mode 100644
index 7f48feb..0000000
--- a/hr/doctype/other_income_detail/other_income_detail.py
+++ /dev/null
@@ -1,22 +0,0 @@
-# ERPNext - web based ERP (http://erpnext.com)
-# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-from __future__ import unicode_literals
-import webnotes
-
-class DocType:
- def __init__(self, d, dl):
- self.doc, self.doclist = d, dl
\ No newline at end of file
diff --git a/hr/doctype/other_income_detail/other_income_detail.txt b/hr/doctype/other_income_detail/other_income_detail.txt
deleted file mode 100644
index b647ee7..0000000
--- a/hr/doctype/other_income_detail/other_income_detail.txt
+++ /dev/null
@@ -1,99 +0,0 @@
-[
- {
- "creation": "2013-02-22 01:27:47",
- "docstatus": 0,
- "modified": "2013-03-07 07:03:26",
- "modified_by": "Administrator",
- "owner": "Administrator"
- },
- {
- "doctype": "DocType",
- "istable": 1,
- "module": "HR",
- "name": "__common__"
- },
- {
- "doctype": "DocField",
- "name": "__common__",
- "parent": "Other Income Detail",
- "parentfield": "fields",
- "parenttype": "DocType",
- "permlevel": 0
- },
- {
- "doctype": "DocPerm",
- "name": "__common__",
- "parent": "Other Income Detail",
- "parentfield": "permissions",
- "parenttype": "DocType",
- "permlevel": 0,
- "read": 1,
- "report": 1,
- "role": "System Manager",
- "submit": 0,
- "write": 1
- },
- {
- "doctype": "DocType",
- "name": "Other Income Detail"
- },
- {
- "doctype": "DocField",
- "fieldname": "particulars2",
- "fieldtype": "Small Text",
- "label": "Particulars",
- "oldfieldname": "particulars2",
- "oldfieldtype": "Small Text",
- "print_width": "200px",
- "read_only": 1,
- "reqd": 1,
- "width": "200px"
- },
- {
- "doctype": "DocField",
- "fieldname": "under_section2",
- "fieldtype": "Data",
- "label": "Under Section",
- "oldfieldname": "under_section2",
- "oldfieldtype": "Data",
- "read_only": 1,
- "reqd": 1
- },
- {
- "doctype": "DocField",
- "fieldname": "max_limit2",
- "fieldtype": "Currency",
- "label": "Max. Limit",
- "oldfieldname": "max_limit2",
- "oldfieldtype": "Currency",
- "read_only": 1
- },
- {
- "doctype": "DocField",
- "fieldname": "actual_amount2",
- "fieldtype": "Currency",
- "label": "Actual Amount",
- "oldfieldname": "actual_amount2",
- "oldfieldtype": "Currency"
- },
- {
- "doctype": "DocField",
- "fieldname": "eligible_amount2",
- "fieldtype": "Currency",
- "label": "Eligible Amount",
- "oldfieldname": "eligible_amount2",
- "oldfieldtype": "Currency",
- "read_only": 1
- },
- {
- "doctype": "DocField",
- "fieldname": "modified_amount2",
- "fieldtype": "Currency",
- "label": "Modified Amount",
- "oldfieldname": "modified_amount2",
- "oldfieldtype": "Currency"
- },
- {
- "doctype": "DocPerm"
- }
-]
\ No newline at end of file
diff --git a/hr/doctype/salary_manager/README.md b/hr/doctype/salary_manager/README.md
new file mode 100644
index 0000000..040d038
--- /dev/null
+++ b/hr/doctype/salary_manager/README.md
@@ -0,0 +1 @@
+Tool to issue monthly Salary Slips to all Employees.
\ No newline at end of file
diff --git a/hr/doctype/salary_slip/README.md b/hr/doctype/salary_slip/README.md
new file mode 100644
index 0000000..736550e
--- /dev/null
+++ b/hr/doctype/salary_slip/README.md
@@ -0,0 +1 @@
+Details of monthly salary paid for an Employee.
\ No newline at end of file
diff --git a/hr/doctype/salary_slip/salary_slip.txt b/hr/doctype/salary_slip/salary_slip.txt
index 54db9a1..894ea01 100644
--- a/hr/doctype/salary_slip/salary_slip.txt
+++ b/hr/doctype/salary_slip/salary_slip.txt
@@ -2,7 +2,7 @@
{
"creation": "2013-01-10 16:34:15",
"docstatus": 0,
- "modified": "2013-01-29 17:38:08",
+ "modified": "2013-06-11 16:16:35",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -256,18 +256,6 @@
},
{
"doctype": "DocField",
- "fieldname": "amendment_date",
- "fieldtype": "Date",
- "hidden": 0,
- "label": "Amendment Date",
- "no_copy": 1,
- "oldfieldname": "amendment_date",
- "oldfieldtype": "Date",
- "print_hide": 1,
- "report_hide": 0
- },
- {
- "doctype": "DocField",
"fieldname": "earning_deduction",
"fieldtype": "Section Break",
"label": "Earning & Deduction",
diff --git a/hr/doctype/salary_slip_deduction/README.md b/hr/doctype/salary_slip_deduction/README.md
new file mode 100644
index 0000000..d0f2219
--- /dev/null
+++ b/hr/doctype/salary_slip_deduction/README.md
@@ -0,0 +1,5 @@
+Deduction detail in parent Salary Slip.
+
+e.g.
+
+- Tax paid on employee's behalf
\ No newline at end of file
diff --git a/hr/doctype/salary_slip_earning/README.md b/hr/doctype/salary_slip_earning/README.md
new file mode 100644
index 0000000..9da0167
--- /dev/null
+++ b/hr/doctype/salary_slip_earning/README.md
@@ -0,0 +1,6 @@
+Earning detail in parent Salary Slip.
+
+e.g.
+
+- Basic Salary
+- Performance Bonus
diff --git a/hr/doctype/salary_structure/README.md b/hr/doctype/salary_structure/README.md
new file mode 100644
index 0000000..3795971
--- /dev/null
+++ b/hr/doctype/salary_structure/README.md
@@ -0,0 +1 @@
+Salary Template for an Employee, basis of which monthly Salary is calculated.
\ No newline at end of file
diff --git a/hr/doctype/salary_structure_deduction/README.md b/hr/doctype/salary_structure_deduction/README.md
new file mode 100644
index 0000000..0853539
--- /dev/null
+++ b/hr/doctype/salary_structure_deduction/README.md
@@ -0,0 +1 @@
+Deduction details in parent Salary Structure.
\ No newline at end of file
diff --git a/hr/doctype/salary_structure_earning/README.md b/hr/doctype/salary_structure_earning/README.md
new file mode 100644
index 0000000..d495cc4
--- /dev/null
+++ b/hr/doctype/salary_structure_earning/README.md
@@ -0,0 +1 @@
+Earning details in parent Salary Structure.
\ No newline at end of file
diff --git a/hr/doctype/upload_attendance/README.md b/hr/doctype/upload_attendance/README.md
new file mode 100644
index 0000000..d0b3721
--- /dev/null
+++ b/hr/doctype/upload_attendance/README.md
@@ -0,0 +1 @@
+Tool to upload attendance via csv file.
\ No newline at end of file
diff --git a/hr/page/hr_home/hr_home.js b/hr/page/hr_home/hr_home.js
index e35a808..bee05f6 100644
--- a/hr/page/hr_home/hr_home.js
+++ b/hr/page/hr_home/hr_home.js
@@ -13,7 +13,7 @@
},
{
label: wn._("Expense Claim"),
- description: wn._("Claims for expenses made on behalf of the organization."),
+ description: wn._("Claims for company expense."),
doctype:"Expense Claim"
},
{
@@ -33,7 +33,7 @@
},
{
label: wn._("Job Applicant"),
- description: wn._("Applicant for a Job (extracted from jobs email)."),
+ description: wn._("Applicant for a Job."),
doctype:"Job Applicant"
},
]
@@ -175,7 +175,7 @@
},
{
"label":wn._("Employee Information"),
- route: "Report2/Employee/Employee Information"
+ route: "Report/Employee/Employee Information"
},
{
"label":wn._("Monthly Salary Register"),
diff --git a/hr/search_criteria/__init__.py b/hr/search_criteria/__init__.py
deleted file mode 100644
index baffc48..0000000
--- a/hr/search_criteria/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-from __future__ import unicode_literals
diff --git a/hr/search_criteria/employee_appraisals/__init__.py b/hr/search_criteria/employee_appraisals/__init__.py
deleted file mode 100644
index baffc48..0000000
--- a/hr/search_criteria/employee_appraisals/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-from __future__ import unicode_literals
diff --git a/hr/search_criteria/employee_appraisals/employee_appraisals.txt b/hr/search_criteria/employee_appraisals/employee_appraisals.txt
deleted file mode 100644
index ce12a0e..0000000
--- a/hr/search_criteria/employee_appraisals/employee_appraisals.txt
+++ /dev/null
@@ -1,26 +0,0 @@
-[
- {
- "owner": "ashwini@webnotestech.com",
- "docstatus": 0,
- "creation": "2012-04-03 12:49:51",
- "modified_by": "Administrator",
- "modified": "2012-04-03 12:49:51"
- },
- {
- "module": "HR",
- "standard": "Yes",
- "sort_order": "DESC",
- "filters": "{'Appraisal\u0001Saved':1,'Appraisal\u0001Submitted':1,'Appraisal\u0001Status':'','Appraisal\u0001Fiscal Year':''}",
- "doctype": "Search Criteria",
- "doc_type": "Appraisal",
- "name": "__common__",
- "sort_by": "`tabAppraisal`.`name`",
- "page_len": 50,
- "criteria_name": "Employee Appraisals",
- "columns": "Appraisal\u0001ID,Appraisal\u0001Status,Appraisal\u0001Employee,Appraisal\u0001Employee Name,Appraisal\u0001Start Date,Appraisal\u0001End Date,Appraisal\u0001Approver,Appraisal\u0001Total Score"
- },
- {
- "name": "employee_appraisals",
- "doctype": "Search Criteria"
- }
-]
\ No newline at end of file
diff --git a/hr/search_criteria/employee_information/__init__.py b/hr/search_criteria/employee_information/__init__.py
deleted file mode 100644
index baffc48..0000000
--- a/hr/search_criteria/employee_information/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-from __future__ import unicode_literals
diff --git a/hr/search_criteria/employee_information/employee_information.py b/hr/search_criteria/employee_information/employee_information.py
deleted file mode 100644
index 6e08872..0000000
--- a/hr/search_criteria/employee_information/employee_information.py
+++ /dev/null
@@ -1,23 +0,0 @@
-# ERPNext - web based ERP (http://erpnext.com)
-# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-from __future__ import unicode_literals
-for c in range(0,len(colnames)):
- l = (len(colnames[c])*9)
- if l < 150 : col_width = '150px'
- else: col_width = '%spx'%(l)
-
- colwidths[c] = col_width
\ No newline at end of file
diff --git a/hr/search_criteria/employee_information/employee_information.txt b/hr/search_criteria/employee_information/employee_information.txt
deleted file mode 100644
index d054613..0000000
--- a/hr/search_criteria/employee_information/employee_information.txt
+++ /dev/null
@@ -1,26 +0,0 @@
-[
- {
- "owner": "harshada@webnotestech.com",
- "docstatus": 0,
- "creation": "2012-04-03 12:49:51",
- "modified_by": "Administrator",
- "modified": "2012-04-03 12:49:51"
- },
- {
- "module": "HR",
- "standard": "Yes",
- "sort_order": "DESC",
- "filters": "{'Employee\u0001Saved':1,'Employee\u0001Submitted':1,'Employee\u0001Gender':'','Employee\u0001Month of Birth':'','Employee\u0001Status':''}",
- "doctype": "Search Criteria",
- "doc_type": "Employee",
- "name": "__common__",
- "sort_by": "`tabEmployee`.`name`",
- "page_len": 50,
- "criteria_name": "Employee Information",
- "columns": "Employee\u0001ID,Employee\u0001Employee Name,Employee\u0001Employee Number,Employee\u0001Date of Joining,Employee\u0001Gender,Employee\u0001Date of Birth,Employee\u0001Employment Type,Employee\u0001Scheduled Confirmation Date,Employee\u0001Contract End Date,Employee\u0001Status,Employee\u0001Branch,Employee\u0001Department,Employee\u0001Designation,Employee\u0001Grade,Employee\u0001Reports to,Employee\u0001Email (By company),Employee\u0001Bank Name,Employee\u0001Relieving Date"
- },
- {
- "name": "employee_information",
- "doctype": "Search Criteria"
- }
-]
\ No newline at end of file
diff --git a/hr/search_criteria/employees_birthday/__init__.py b/hr/search_criteria/employees_birthday/__init__.py
deleted file mode 100644
index baffc48..0000000
--- a/hr/search_criteria/employees_birthday/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-from __future__ import unicode_literals
diff --git a/hr/search_criteria/employees_birthday/employees_birthday.txt b/hr/search_criteria/employees_birthday/employees_birthday.txt
deleted file mode 100644
index a96b869..0000000
--- a/hr/search_criteria/employees_birthday/employees_birthday.txt
+++ /dev/null
@@ -1,26 +0,0 @@
-[
- {
- "owner": "Administrator",
- "docstatus": 0,
- "creation": "2012-04-03 12:49:51",
- "modified_by": "Administrator",
- "modified": "2012-04-03 12:49:51"
- },
- {
- "module": "HR",
- "standard": "Yes",
- "sort_order": "DESC",
- "filters": "{'Employee\u0001Saved':1,'Employee\u0001Gender':'','Employee\u0001Month of Birth':'May','Employee\u0001Status':''}",
- "doctype": "Search Criteria",
- "doc_type": "Employee",
- "name": "__common__",
- "sort_by": "`tabEmployee`.`name`",
- "page_len": 50,
- "criteria_name": "Employee's Birthday",
- "columns": "Employee\u0001ID,Employee\u0001Employee Name,Employee\u0001Department,Employee\u0001Gender,Employee\u0001Date of Birth,Employee\u0001Month of Birth"
- },
- {
- "name": "employees_birthday",
- "doctype": "Search Criteria"
- }
-]
\ No newline at end of file
diff --git a/hr/search_criteria/expense_claims/__init__.py b/hr/search_criteria/expense_claims/__init__.py
deleted file mode 100644
index baffc48..0000000
--- a/hr/search_criteria/expense_claims/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-from __future__ import unicode_literals
diff --git a/hr/search_criteria/expense_claims/expense_claims.txt b/hr/search_criteria/expense_claims/expense_claims.txt
deleted file mode 100644
index f1324d2..0000000
--- a/hr/search_criteria/expense_claims/expense_claims.txt
+++ /dev/null
@@ -1,26 +0,0 @@
-[
- {
- "owner": "ashwini@webnotestech.com",
- "docstatus": 0,
- "creation": "2012-03-30 13:33:32",
- "modified_by": "Administrator",
- "modified": "2012-03-30 13:33:32"
- },
- {
- "module": "HR",
- "standard": "Yes",
- "sort_order": "DESC",
- "filters": "{'Expense Claim\u0001Saved':1,'Expense Claim\u0001Submitted':1,'Expense Claim\u0001Approval Status':'','Expense Claim\u0001Fiscal Year':''}",
- "doctype": "Search Criteria",
- "doc_type": "Expense Claim",
- "name": "__common__",
- "sort_by": "`tabExpense Claim`.`name`",
- "page_len": 50,
- "criteria_name": "Expense Claims",
- "columns": "Expense Claim\u0001ID,Expense Claim\u0001Approval Status,Expense Claim\u0001From Employee,Expense Claim\u0001Employee Name,Expense Claim\u0001Approver,Expense Claim\u0001Posting Date,Expense Claim\u0001Total Claimed Amount,Expense Claim\u0001Total Sanctioned Amount"
- },
- {
- "name": "expense_claims",
- "doctype": "Search Criteria"
- }
-]
\ No newline at end of file
diff --git a/hr/search_criteria/monthly_attendance_details/__init__.py b/hr/search_criteria/monthly_attendance_details/__init__.py
deleted file mode 100644
index baffc48..0000000
--- a/hr/search_criteria/monthly_attendance_details/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-from __future__ import unicode_literals
diff --git a/hr/search_criteria/monthly_attendance_details/monthly_attendance_details.js b/hr/search_criteria/monthly_attendance_details/monthly_attendance_details.js
deleted file mode 100644
index e922a2f..0000000
--- a/hr/search_criteria/monthly_attendance_details/monthly_attendance_details.js
+++ /dev/null
@@ -1,45 +0,0 @@
-// ERPNext - web based ERP (http://erpnext.com)
-// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-var get_month = function(){
-
- var dict = {0:'Jan', 1:'Feb',2:'Mar',3:'Apr',4:'May',5:'June',6:'July',7:'Aug',8:'Sept',9:'Oct',10:'Nov',11:'Dec'}
- var d = new Date();
- return dict[d.getMonth()]
-
-}
-
-report.customize_filters = function() {
- this.hide_all_filters();
- this.add_filter({fieldname:'month', label:'Month', fieldtype:'Select', options:'Jan'+NEWLINE+'Feb'+NEWLINE+'Mar'+NEWLINE+'Apr'+NEWLINE+'May'+NEWLINE+'June'+NEWLINE+'July'+NEWLINE+'Aug'+NEWLINE+'Sept'+NEWLINE+'Oct'+NEWLINE+'Nov'+NEWLINE+'Dec',ignore : 1,parent:'Attendance', single_select:1});
-
- this.filter_fields_dict['Attendance'+FILTER_SEP +'Employee'].df.filter_hide = 0;
- this.filter_fields_dict['Attendance'+FILTER_SEP +'Month'].df.filter_hide = 0;
- this.filter_fields_dict['Attendance'+FILTER_SEP +'Fiscal Year'].df.filter_hide = 0;
- this.filter_fields_dict['Attendance'+FILTER_SEP +'Company'].df.filter_hide = 0;
-
- this.filter_fields_dict['Attendance'+FILTER_SEP +'Employee'].df.in_first_page = 1;
- this.filter_fields_dict['Attendance'+FILTER_SEP +'Month'].df.in_first_page = 1;
- this.filter_fields_dict['Attendance'+FILTER_SEP +'Fiscal Year'].df.in_first_page = 1;
- this.filter_fields_dict['Attendance'+FILTER_SEP +'Company'].df.in_first_page = 1;
-
- this.filter_fields_dict['Attendance'+FILTER_SEP +'Month'].df['report_default'] = get_month();
- this.filter_fields_dict['Attendance'+FILTER_SEP +'Company'].df['report_default'] = sys_defaults.company;
- this.filter_fields_dict['Attendance'+FILTER_SEP +'Fiscal Year'].df['report_default'] = sys_defaults.fiscal_year;
- this.get_filter('Attendance', 'Fiscal Year').set_as_single();
-}
-this.mytabs.items['More Filters'].hide();
-this.mytabs.items['Select Columns'].hide();
\ No newline at end of file
diff --git a/hr/search_criteria/monthly_attendance_details/monthly_attendance_details.py b/hr/search_criteria/monthly_attendance_details/monthly_attendance_details.py
deleted file mode 100644
index dff95df..0000000
--- a/hr/search_criteria/monthly_attendance_details/monthly_attendance_details.py
+++ /dev/null
@@ -1,93 +0,0 @@
-# ERPNext - web based ERP (http://erpnext.com)
-# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-#add column employee, employee name
-#--------------------------------------------------------------------------------------
-from __future__ import unicode_literals
-col =[['Employee','Link','155px','Employee'],['Employee Name','Data','150px','']]
-
-for c in col:
- colnames.append(c[0])
- coltypes.append(c[1])
- colwidths.append(c[2])
- coloptions.append(c[3])
-
- col_idx[c[0]] = len(colnames)-1
-
-
-#get feb months last day
-#--------------------------------------------------------------------------------------
-fy = filter_values.get('fiscal_year')
-month = filter_values.get('month')
-mdict = {'Jan':'01', 'Feb':'02','Mar':'03','Apr':'04','May':'05','June':'06','July':'07','Aug':'08','Sept':'09','Oct':'10','Nov':'11','Dec':'12'}
-
-import webnotes.utils
-from dateutil.relativedelta import relativedelta
-
-ysd = sql("select year_start_date from `tabFiscal Year` where name = '%s' and docstatus !=2"%fy)[0][0]
-
-last_date = webnotes.utils.get_last_day(ysd + relativedelta(months = (cint(ysd.strftime('%m'))>cint(mdict[month]) and (12-cint(ysd.strftime('%m'))+cint(mdict[month])) or (cint(mdict[month]) - cint(ysd.strftime('%m'))))))
-feb = last_date.strftime('%d')
-
-
-
-#get last day and add columns
-#--------------------------------------------------------------------------------------
-dict = {'Jan': 31,'Feb':cint(feb), 'Mar':31,'Apr':30,'May':31,'June':30,'July':31,'Aug':31,'Sept':30,'Oct':31,'Nov':30,'Dec':31}
-
-for i in range(0,dict[month]):
- colnames.append(i+1)
- coltypes.append('Data')
- colwidths.append('25px')
-
- col_idx[c[0]] = len(colnames)-1
-
-#add total present, absent days
-#--------------------------------------------------------------------------------------
-tot_col =[['Total Present Days','Data','120px'],['Total Absent Days','Data','120px']]
-
-for c in tot_col:
- colnames.append(c[0])
- coltypes.append(c[1])
- colwidths.append(c[2])
-
- col_idx[c[0]] = len(colnames)-1
-
-#get data
-#--------------------------------------------------------------------------------------
-
-
-year = last_date.strftime('%Y')
-out = []
-for r in res:
- p_cnt = a_cnt = 0
-
- for i in range(0,dict[month]):
- new_date = str(year)+'-'+mdict[month]+'-'+((i>=9) and str(i+1) or ('0'+str(i+1)))
-
- chk = sql("select status from `tabAttendance` where employee='%s' and att_date = '%s' and docstatus=1"%(r[0],new_date))
- chk = chk and chk[0][0][0] or '-'
- if chk=='P':
- p_cnt +=1
- elif chk=='A':
- a_cnt +=1
- r.append(chk)
-
- r.append(p_cnt)
- r.append(a_cnt)
-
- if p_cnt or a_cnt:
- out.append(r)
diff --git a/hr/search_criteria/monthly_attendance_details/monthly_attendance_details.sql b/hr/search_criteria/monthly_attendance_details/monthly_attendance_details.sql
deleted file mode 100644
index 762a94f..0000000
--- a/hr/search_criteria/monthly_attendance_details/monthly_attendance_details.sql
+++ /dev/null
@@ -1 +0,0 @@
-SELECT DISTINCT `tabAttendance`.employee, `tabEmployee`.employee_name FROM `tabAttendance`, `tabEmployee` WHERE `tabEmployee`.name = `tabAttendance`.employee and `tabAttendance`.fiscal_year like '%(fiscal_year)s%%' AND `tabAttendance`.company like '%(company)s%%' AND `tabAttendance`.employee like '%(employee)s%%'
\ No newline at end of file
diff --git a/hr/search_criteria/monthly_attendance_details/monthly_attendance_details.txt b/hr/search_criteria/monthly_attendance_details/monthly_attendance_details.txt
deleted file mode 100644
index abbacae..0000000
--- a/hr/search_criteria/monthly_attendance_details/monthly_attendance_details.txt
+++ /dev/null
@@ -1,26 +0,0 @@
-[
- {
- "owner": "harshada@webnotestech.com",
- "docstatus": 0,
- "creation": "2012-04-03 12:49:51",
- "modified_by": "Administrator",
- "modified": "2012-04-03 12:49:51"
- },
- {
- "module": "HR",
- "standard": "Yes",
- "sort_order": "DESC",
- "filters": "{'Attendance\u0001Status':'','Attendance\u0001Fiscal Year':''}",
- "doctype": "Search Criteria",
- "doc_type": "Attendance",
- "name": "__common__",
- "sort_by": "`tabAttendance`.`employee`",
- "page_len": 50,
- "criteria_name": "Monthly Attendance Details",
- "columns": "Attendance\u0001Employee"
- },
- {
- "name": "monthly_attendance_details",
- "doctype": "Search Criteria"
- }
-]
\ No newline at end of file
diff --git a/hr/search_criteria/monthly_salary_register/__init__.py b/hr/search_criteria/monthly_salary_register/__init__.py
deleted file mode 100644
index baffc48..0000000
--- a/hr/search_criteria/monthly_salary_register/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-from __future__ import unicode_literals
diff --git a/hr/search_criteria/monthly_salary_register/monthly_salary_register.py b/hr/search_criteria/monthly_salary_register/monthly_salary_register.py
deleted file mode 100644
index 2291b66..0000000
--- a/hr/search_criteria/monthly_salary_register/monthly_salary_register.py
+++ /dev/null
@@ -1,99 +0,0 @@
-from __future__ import unicode_literals
-colwidths[col_idx['Employee Name']]="120px"
-colwidths[col_idx['Leave Without Pay']] = '120px'
-
-sum_net = total_earning = total_deduction = total_lwp = total_arr = 0
-total = ['Total Net Pay','','']
-
-
-earn_type_lst = sql("select name from `tabEarning Type`")
-
-ded_type_lst = sql("select name from `tabDeduction Type`")
-li=[]
-for lst in earn_type_lst:
-
- li.append(lst[0])
-
-
-
-li.append('Total Earning')
-for lst in ded_type_lst:
-
- li.append(lst[0])
-
-
-li.append('Total Deduction')
-li.append('Net Pay')
-
-
-
-for d in li:
- colnames.append(d)
- colwidths.append("150px")
- coltypes.append("Currency")
- coloptions.append("")
- col_idx[d] = len(colnames)-1
- for r in res:
- r.append("0")
-
-for r in res:
-
- total_lwp += flt(r[col_idx['Leave Without Pay']])
- total_arr += flt(r[col_idx['Arrear Amount']])
-
- for d1 in li:
- d2 = '%s'%d1
-
- earn_ret=webnotes.conn.convert_to_lists(sql("select e_type,e_amount from `tabSalary Slip Earning` where parent = '%s'"%r[col_idx['ID']]))
- ded_ret=webnotes.conn.convert_to_lists(sql("select d_type,d_amount from `tabSalary Slip Deduction` where parent = '%s'"%r[col_idx['ID']]))
-
-
- for e in earn_ret:
- e0 = '%s'%e[0]
- r[col_idx[e0]]=flt(e[1]) or 0.00
-
-
- for d in ded_ret:
- d0 = '%s'%d[0]
- r[col_idx[d0]]=flt(d[1]) or 0.00
-
-
- tot_earn_ded_net_ret = sql("select gross_pay, total_deduction,net_pay from `tabSalary Slip` where name = '%s'"%r[col_idx['ID']])
- if d2 == 'Total Earning':
- r[col_idx[d2]] = flt(tot_earn_ded_net_ret[0][0]) or 0
- total_earning += flt(tot_earn_ded_net_ret[0][0]) or 0
- elif d2 == 'Total Deduction':
- r[col_idx[d2]] = flt(tot_earn_ded_net_ret[0][1]) or 0
- total_deduction += flt(tot_earn_ded_net_ret[0][1]) or 0
- elif d2 == 'Net Pay':
- r[col_idx[d2]] = flt(tot_earn_ded_net_ret[0][2]) or 0
- sum_net += flt(tot_earn_ded_net_ret[0][2]) or 0
-
-
-total.append(total_lwp)
-total.append(total_arr)
-
-for lst in earn_type_lst:
-
- total_ear = 0
- for r in res:
-
- lst0 = '%s'%lst[0]
- total_ear += flt(r[col_idx[lst0]])
-
- total.append(total_ear)
-
-total.append(total_earning)
-for lst in ded_type_lst:
- total_ded = 0
- for r in res:
- lst0 = '%s'%lst[0]
- total_ded += flt(r[col_idx[lst0]])
-
- total.append(total_ded)
-
-
-total.append(total_deduction)
-total.append(sum_net)
-
-res.append(total)
diff --git a/hr/search_criteria/monthly_salary_register/monthly_salary_register.txt b/hr/search_criteria/monthly_salary_register/monthly_salary_register.txt
deleted file mode 100644
index 2e1db8c..0000000
--- a/hr/search_criteria/monthly_salary_register/monthly_salary_register.txt
+++ /dev/null
@@ -1,26 +0,0 @@
-[
- {
- "owner": "Administrator",
- "docstatus": 0,
- "creation": "2012-03-30 14:50:44",
- "modified_by": "Administrator",
- "modified": "2012-04-05 17:23:13"
- },
- {
- "module": "HR",
- "standard": "Yes",
- "sort_order": "DESC",
- "filters": "{\"Salary Slip\\u0001Submitted\":1,\"Salary Slip\\u0001Company\":[\"\"],\"Salary Slip\\u0001Month\":[\"\"]}",
- "doctype": "Search Criteria",
- "doc_type": "Salary Slip",
- "name": "__common__",
- "sort_by": "`tabSalary Slip`.`name`",
- "page_len": 50,
- "criteria_name": "Monthly Salary Register",
- "columns": "Salary Slip\u0001ID,Salary Slip\u0001Employee,Salary Slip\u0001Employee Name,Salary Slip\u0001Leave Without Pay,Salary Slip\u0001Arrear Amount"
- },
- {
- "name": "monthly_salary_register",
- "doctype": "Search Criteria"
- }
-]
\ No newline at end of file
diff --git a/hr/search_criteria/new_or_left_employees_for_a_month/__init__.py b/hr/search_criteria/new_or_left_employees_for_a_month/__init__.py
deleted file mode 100644
index baffc48..0000000
--- a/hr/search_criteria/new_or_left_employees_for_a_month/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-from __future__ import unicode_literals
diff --git a/hr/search_criteria/new_or_left_employees_for_a_month/new_or_left_employees_for_a_month.js b/hr/search_criteria/new_or_left_employees_for_a_month/new_or_left_employees_for_a_month.js
deleted file mode 100644
index e6dc267..0000000
--- a/hr/search_criteria/new_or_left_employees_for_a_month/new_or_left_employees_for_a_month.js
+++ /dev/null
@@ -1,66 +0,0 @@
-// ERPNext - web based ERP (http://erpnext.com)
-// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-report.customize_filters = function() {
- var d = new Date();
-
- var month=["January","February","March","April","May","June","July","August","September","October","November","December"]
-
- this.add_filter({fieldname:'month', label:'Month',fieldtype:'Select', options:"January"+NEWLINE+"February"+NEWLINE+"March"+NEWLINE+"April"+NEWLINE+"May"+NEWLINE+"June"+NEWLINE+"July"+NEWLINE+"August"+NEWLINE+"September"+NEWLINE+"October"+NEWLINE+"November"+NEWLINE+"December",report_default : month[d.getMonth()],ignore : 1, parent:'Employee'});
-
- this.filter_fields_dict['Employee'+FILTER_SEP +'Month'].df.in_first_page = 1;
- this.filter_fields_dict['Employee'+FILTER_SEP +'Status'].df.in_first_page = 1;
- this.filter_fields_dict['Employee'+FILTER_SEP +'Status'].df.report_default = 'Active';
-
- this.add_filter({fieldname:'year', label:'Year',fieldtype:'Select', options:"2000"+NEWLINE+"2001"+NEWLINE+"2002"+NEWLINE+"2003"+NEWLINE+"2004"+NEWLINE+"2005"+NEWLINE+"2006"+NEWLINE+"2007"+NEWLINE+"2008"+NEWLINE+"2009"+NEWLINE+"2010"+NEWLINE+"2011",report_default : d.getFullYear(),ignore : 1, parent:'Employee'});
-
- this.filter_fields_dict['Employee'+FILTER_SEP +'Year'].df.in_first_page = 1;
-}
-
-report.get_query = function() {
-
- emp_month = this.filter_fields_dict['Employee'+FILTER_SEP+'Month'].get_value();
- emp_year = this.filter_fields_dict['Employee'+FILTER_SEP+'Year'].get_value();
- emp_status = this.filter_fields_dict['Employee'+FILTER_SEP+'Status'].get_value();
-
- // month and year mandatory
- if ((emp_month == '') || (emp_year == '')) {
- alert("Please enter Month and Year");
- return;
- }
-
- month={"January":"1", "February":"2", "March":"3", "April":"4","May":"5", "June":"6", "July":"7","August":"8", "September":"9", "October":"10", "November":"11", "December":"12"}
-
- mnt = ''
- for(m=0; m<emp_month.length;m++){
- if(mnt== '') mnt = "("+month[emp_month[m]];
- else mnt +=", "+month[emp_month[m]];
- }
- mnt +=")"
- c1 = '(MONTH(t1.date_of_joining) in '+mnt+' AND YEAR(t1.date_of_joining) = "'+emp_year+'")';
- c2 = '(MONTH(t1.relieving_date) in '+mnt+' AND YEAR(t1.relieving_date) = "'+emp_year+'")';
-
- if(emp_status == 'Active')
- cond = c1;
- else if (emp_status == 'Left')
- cond = c2;
- else
- cond = c1 + ' OR '+c2;
-
- var q = 'SELECT t1.name AS "ID", t1.employee_name AS "Employee Name", t1.employee_number AS "Employee Number" FROM `tabEmployee` t1 WHERE '+cond;
-
- return q;
-}
diff --git a/hr/search_criteria/new_or_left_employees_for_a_month/new_or_left_employees_for_a_month.py b/hr/search_criteria/new_or_left_employees_for_a_month/new_or_left_employees_for_a_month.py
deleted file mode 100644
index 7d5feca..0000000
--- a/hr/search_criteria/new_or_left_employees_for_a_month/new_or_left_employees_for_a_month.py
+++ /dev/null
@@ -1,60 +0,0 @@
-# ERPNext - web based ERP (http://erpnext.com)
-# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-from __future__ import unicode_literals
-status = filter_values.get('status')
-month = filter_values.get('month')
-
-
-if status == 'Active' and not status == 'Left':
- col = [['Employee', 'Link', 'Employee'], ['Employee Name', 'Data', ''], ['Employee Number', 'Data', ''], ['Employment Type','Link','Employment Type'],['Scheduled Confirmation Date','Data',''],['Final Confirmation Date','Data',''],['Contract End Date','Data',''],['Branch','Link','Branch'],['Department','Link','Department'],['Designation','Link','Designation'],['Reports to','Link','Employee'],['Grade','Link','Grade']]
-
-elif status == 'Left' and not status == 'Active':
- col = [['Employee', 'Link', 'Employee'], ['Employee Name', 'Data', ''], ['Employee Number', 'Data', ''], ['Resignation Letter Date','Data',''],['Relieving Date','Data',''],['Notice - Number of Days','Data',''],['Reason for Leaving','Data',''],['Leave Encashed?','Data',''],['Encashment Date','Data',''],['Reason for Resignation','Data','']]
-
-else:
- col = [['Employee', 'Link', 'Employee'], ['Employee Name', 'Data', ''], ['Employee Number', 'Data', ''], ['Employment Type','Link','Employment Type'],['Scheduled Confirmation Date','Data',''],['Final Confirmation Date','Data',''],['Contract End Date','Data',''],['Branch','Link','Branch'],['Department','Link','Department'],['Designation','Link','Designation'],['Reports to','Link','Employee'],['Grade','Link','Grade'],['Resignation Letter Date','Data',''],['Relieving Date','Data',''],['Notice - Number of Days','Data',''],['Reason for Leaving','Data',''],['Leave Encashed?','Data',''],['Encashment Date','Data',''],['Reason for Resignation','Data','']]
-
-for c in col:
- colnames.append(c[0])
- coltypes.append(c[1])
- colwidths.append('150px')
- coloptions.append(c[2])
-
- col_idx[c[0]] = len(colnames)-1
-
-
-for c in range(0,len(colnames)):
- l = (len(colnames[c])*9)
- if l < 150 : col_width = '150px'
- else: col_width = '%spx'%(l)
-
- colwidths[c] = col_width
-
-for r in res:
-
- if status == 'Active':
- ret = sql("select employment_type,scheduled_confirmation_date,final_confirmation_date,contract_end_date,branch,department,designation,reports_to,grade from `tabEmployee` where name = %s",r[0])
-
- elif status == 'Left':
- ret = sql("select resignation_letter_date,relieving_date,notice_number_of_days,reason_for_leaving,leave_encashed,encashment_date,reason_for_resignation from `tabEmployee` where name =%s",r[0])
-
- else:
- ret = sql("select employment_type,scheduled_confirmation_date,final_confirmation_date,contract_end_date,branch,department,designation,reports_to,grade,resignation_letter_date,relieving_date,notice_number_of_days,reason_for_leaving,leave_encashed,encashment_date,reason_for_resignation from `tabEmployee` where name = %s",r[0])
-
- ret = ret and ret[0] or []
- for t in ret:
- r.append(cstr(t))
diff --git a/hr/search_criteria/new_or_left_employees_for_a_month/new_or_left_employees_for_a_month.txt b/hr/search_criteria/new_or_left_employees_for_a_month/new_or_left_employees_for_a_month.txt
deleted file mode 100644
index 86d09b5..0000000
--- a/hr/search_criteria/new_or_left_employees_for_a_month/new_or_left_employees_for_a_month.txt
+++ /dev/null
@@ -1,26 +0,0 @@
-[
- {
- "owner": "harshada@webnotestech.com",
- "docstatus": 0,
- "creation": "2012-04-03 12:49:51",
- "modified_by": "Administrator",
- "modified": "2012-04-03 12:49:51"
- },
- {
- "module": "HR",
- "standard": "Yes",
- "sort_order": "DESC",
- "filters": "{'Employee\u0001Saved':1,'Employee\u0001Submitted':1,'Employee\u0001Gender':'','Employee\u0001Month of Birth':'','Employee\u0001Status':''}",
- "doctype": "Search Criteria",
- "doc_type": "Employee",
- "name": "__common__",
- "sort_by": "`tabEmployee`.`name`",
- "page_len": 50,
- "criteria_name": "New or left employees for a month",
- "columns": "Employee\u0001ID"
- },
- {
- "name": "new_or_left_employees_for_a_month",
- "doctype": "Search Criteria"
- }
-]
\ No newline at end of file
diff --git a/hr/search_criteria/salary_register/__init__.py b/hr/search_criteria/salary_register/__init__.py
deleted file mode 100644
index baffc48..0000000
--- a/hr/search_criteria/salary_register/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-from __future__ import unicode_literals
diff --git a/hr/search_criteria/salary_register/salary_register.js b/hr/search_criteria/salary_register/salary_register.js
deleted file mode 100644
index c451b27..0000000
--- a/hr/search_criteria/salary_register/salary_register.js
+++ /dev/null
@@ -1,25 +0,0 @@
-// ERPNext - web based ERP (http://erpnext.com)
-// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-report.customize_filters = function() {
- fld_lst = ['ID','Employee']
-
- for(var i = 0; i<fld_lst.length; i++){
- this.filter_fields_dict['Salary Slip'+FILTER_SEP +fld_lst[i]].df.in_first_page = 1;
- }
-
-}
-this.mytabs.items['Select Columns'].hide();
\ No newline at end of file
diff --git a/hr/search_criteria/salary_register/salary_register.py b/hr/search_criteria/salary_register/salary_register.py
deleted file mode 100644
index d1d3e99..0000000
--- a/hr/search_criteria/salary_register/salary_register.py
+++ /dev/null
@@ -1,77 +0,0 @@
-# ERPNext - web based ERP (http://erpnext.com)
-# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-from __future__ import unicode_literals
-sal_slips_ids = ''
-for r in res:
- if not sal_slips_ids == '': sal_slips_ids +=","
- sal_slips_ids+="'%s'"%r[col_idx['ID']]
-
-earn_heads, ded_heads = [], []
-if res:
- earn_heads =[i[0] for i in sql("select distinct e_type from `tabSalary Slip Earning` where parent in (%s)"%sal_slips_ids)]
- ded_heads =[i[0] for i in sql("select distinct d_type from `tabSalary Slip Deduction` where parent in (%s)"%sal_slips_ids)]
-
-col=[]
-for e in earn_heads:
- l = (len(cstr(e))*9)
- if l < 150 :
- col_width = '150px'
- else:
- col_width = '%spx'%(l)
- col.append([e,'Currency',col_width,''])
-
-col.append(['Arrear Amount','Currency','150px',''])
-col.append(['Encashment Amount','Currency','170px',''])
-col.append(['Gross Pay','Currency','150px',''])
-for d in ded_heads:
- l = (len(cstr(d))*9)
- if l < 150 : col_width = '150px'
- else: col_width = '%spx'%(l)
- col.append([d,'Currency',col_width,''])
-
-col.append(['Total Deduction','Currency','150px',''])
-col.append(['Net Pay','Currency','150px',''])
-
-for c in col:
- colnames.append(c[0])
- coltypes.append(c[1])
- colwidths.append(c[2])
- coloptions.append(c[3])
- col_idx[c[0]] = len(colnames)
-
-grand_tot = 0
-for r in res:
- for i in range(6,len(colnames)):
- if colnames[i] not in ('Arrear Amount','Encashment Amount','Net Pay','Gross Pay','Total Deduction'):
- amt = sql("select e_modified_amount from `tabSalary Slip Earning` where e_type = '%s' and parent = '%s'"%(colnames[i],r[0]))
- if not amt:
- amt = sql("select d_modified_amount from `tabSalary Slip Deduction` where d_type = '%s' and parent = '%s'"%(colnames[i],r[0]))
- amt = amt and amt[0][0] or 0
- r.append(flt(amt))
-
- else:
- fld_nm = cstr(colnames[i]).lower().replace(' ','_')
- tot = sql("select %s from `tabSalary Slip` where name ='%s'"%(fld_nm,r[0]))
- tot = tot and flt(tot[0][0]) or 0
- if colnames[i] == 'Net Pay':
- grand_tot += tot
- r.append(tot)
-
-gt_row = ['' for i in range(len(colnames))]
-gt_row[col_idx['Employee Name']] = '<b>Grand Totals</b>'
-gt_row[col_idx['Net Pay']-1] = grand_tot
-res.append(gt_row)
\ No newline at end of file
diff --git a/hr/search_criteria/salary_register/salary_register.txt b/hr/search_criteria/salary_register/salary_register.txt
deleted file mode 100644
index aab7f25..0000000
--- a/hr/search_criteria/salary_register/salary_register.txt
+++ /dev/null
@@ -1,26 +0,0 @@
-[
- {
- "owner": "harshada@webnotestech.com",
- "docstatus": 0,
- "creation": "2012-04-03 12:49:52",
- "modified_by": "Administrator",
- "modified": "2012-04-03 12:49:52"
- },
- {
- "module": "HR",
- "standard": "Yes",
- "sort_order": "DESC",
- "filters": "{'Salary Slip\u0001Submitted':1,'Salary Slip\u0001Month':''}",
- "doctype": "Search Criteria",
- "doc_type": "Salary Slip",
- "name": "__common__",
- "sort_by": "`tabSalary Slip`.`name`",
- "page_len": 50,
- "criteria_name": "Salary Register",
- "columns": "Salary Slip\u0001ID,Salary Slip\u0001Employee,Salary Slip\u0001Employee Name,Salary Slip\u0001Year,Salary Slip\u0001Month,Salary Slip\u0001Total days in month,Salary Slip\u0001Payment days"
- },
- {
- "name": "salary_register",
- "doctype": "Search Criteria"
- }
-]
\ No newline at end of file
diff --git a/hr/search_criteria/salary_slips/__init__.py b/hr/search_criteria/salary_slips/__init__.py
deleted file mode 100644
index baffc48..0000000
--- a/hr/search_criteria/salary_slips/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-from __future__ import unicode_literals
diff --git a/hr/search_criteria/salary_slips/salary_slips.txt b/hr/search_criteria/salary_slips/salary_slips.txt
deleted file mode 100644
index e1bcccf..0000000
--- a/hr/search_criteria/salary_slips/salary_slips.txt
+++ /dev/null
@@ -1,26 +0,0 @@
-[
- {
- "owner": "Administrator",
- "docstatus": 0,
- "creation": "2012-04-03 12:49:52",
- "modified_by": "Administrator",
- "modified": "2012-04-03 12:49:52"
- },
- {
- "module": "HR",
- "standard": "Yes",
- "sort_order": "DESC",
- "filters": "{'Salary Slip\u0001Saved':1,'Salary Slip\u0001Submitted':1}",
- "doctype": "Search Criteria",
- "doc_type": "Salary Slip",
- "name": "__common__",
- "sort_by": "`tabSalary Slip`.`name`",
- "page_len": 50,
- "criteria_name": "Salary Slips",
- "columns": "Salary Slip\u0001ID,Salary Slip\u0001Fiscal Year,Salary Slip\u0001Month,Salary Slip\u0001Employee,Salary Slip\u0001Employee Name,Salary Slip\u0001Department,Salary Slip\u0001Designation,Salary Slip\u0001Branch,Salary Slip\u0001Grade,Salary Slip\u0001PF No.,Salary Slip\u0001ESIC No.,Salary Slip\u0001Leave Without Pay,Salary Slip\u0001Bank Name,Salary Slip\u0001Bank Account No.,Salary Slip\u0001Payment days,Salary Slip\u0001Arrear Amount,Salary Slip\u0001Encashment Amount,Salary Slip\u0001Gross Pay,Salary Slip\u0001Total Deduction,Salary Slip\u0001Net Pay"
- },
- {
- "name": "salary_slips",
- "doctype": "Search Criteria"
- }
-]
\ No newline at end of file
diff --git a/hr/search_criteria/salary_structure_details/__init__.py b/hr/search_criteria/salary_structure_details/__init__.py
deleted file mode 100644
index baffc48..0000000
--- a/hr/search_criteria/salary_structure_details/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-from __future__ import unicode_literals
diff --git a/hr/search_criteria/salary_structure_details/salary_structure_details.txt b/hr/search_criteria/salary_structure_details/salary_structure_details.txt
deleted file mode 100644
index c1ed01b..0000000
--- a/hr/search_criteria/salary_structure_details/salary_structure_details.txt
+++ /dev/null
@@ -1,26 +0,0 @@
-[
- {
- "owner": "Administrator",
- "docstatus": 0,
- "creation": "2012-04-03 12:49:52",
- "modified_by": "Administrator",
- "modified": "2012-04-03 12:49:52"
- },
- {
- "module": "HR",
- "standard": "Yes",
- "sort_order": "DESC",
- "filters": "{'Salary Structure\u0001Branch':'','Salary Structure\u0001Designation':'','Salary Structure\u0001Department':'','Salary Structure\u0001Grade':'','Salary Structure\u0001Is Active':''}",
- "doctype": "Search Criteria",
- "doc_type": "Salary Structure",
- "name": "__common__",
- "sort_by": "`tabSalary Structure`.`name`",
- "page_len": 50,
- "criteria_name": "Salary Structure Details",
- "columns": "Salary Structure\u0001ID,Salary Structure\u0001Employee,Salary Structure\u0001From Date,Salary Structure\u0001To Date,Salary Structure\u0001Fiscal Year,Salary Structure\u0001Branch,Salary Structure\u0001Designation,Salary Structure\u0001Department,Salary Structure\u0001Grade,Salary Structure\u0001Is Active,Salary Structure\u0001Total Earning,Salary Structure\u0001Total Deduction,Salary Structure\u0001CTC,Salary Structure\u0001Total"
- },
- {
- "name": "salary_structure_details",
- "doctype": "Search Criteria"
- }
-]
\ No newline at end of file
diff --git a/manufacturing/README.md b/manufacturing/README.md
new file mode 100644
index 0000000..3e42f5a
--- /dev/null
+++ b/manufacturing/README.md
@@ -0,0 +1 @@
+Plan and manage manufacturing operations, bill of materials for manufacturing.
\ No newline at end of file
diff --git a/manufacturing/doctype/bom/README.md b/manufacturing/doctype/bom/README.md
new file mode 100644
index 0000000..fe27fc7
--- /dev/null
+++ b/manufacturing/doctype/bom/README.md
@@ -0,0 +1 @@
+Bill of Materials (BOM) is a list of operations and Items required to manufacture a particular product (Item).
\ No newline at end of file
diff --git a/manufacturing/doctype/bom_explosion_item/README.md b/manufacturing/doctype/bom_explosion_item/README.md
new file mode 100644
index 0000000..06e0402
--- /dev/null
+++ b/manufacturing/doctype/bom_explosion_item/README.md
@@ -0,0 +1 @@
+Detail of Item required for the main Item by parsing the entire BOM tree.
\ No newline at end of file
diff --git a/manufacturing/doctype/bom_item/README.md b/manufacturing/doctype/bom_item/README.md
new file mode 100644
index 0000000..780c30fd
--- /dev/null
+++ b/manufacturing/doctype/bom_item/README.md
@@ -0,0 +1 @@
+Item required in the parent Bill of Material.
\ No newline at end of file
diff --git a/manufacturing/doctype/bom_operation/README.md b/manufacturing/doctype/bom_operation/README.md
new file mode 100644
index 0000000..2746e32
--- /dev/null
+++ b/manufacturing/doctype/bom_operation/README.md
@@ -0,0 +1 @@
+Operation performed in the parent Bill of Material.
\ No newline at end of file
diff --git a/manufacturing/doctype/bom_replace_tool/README.md b/manufacturing/doctype/bom_replace_tool/README.md
new file mode 100644
index 0000000..4abce74
--- /dev/null
+++ b/manufacturing/doctype/bom_replace_tool/README.md
@@ -0,0 +1 @@
+Tool to replace one Item with another in all Bill of Material (BOM) trees.
\ No newline at end of file
diff --git a/manufacturing/doctype/production_order/README.md b/manufacturing/doctype/production_order/README.md
new file mode 100644
index 0000000..2f2e000
--- /dev/null
+++ b/manufacturing/doctype/production_order/README.md
@@ -0,0 +1 @@
+Authorization (order) given to manufacturing unit to produce a certain Item.
\ No newline at end of file
diff --git a/manufacturing/doctype/production_plan_item/README.md b/manufacturing/doctype/production_plan_item/README.md
new file mode 100644
index 0000000..7103a14
--- /dev/null
+++ b/manufacturing/doctype/production_plan_item/README.md
@@ -0,0 +1 @@
+Item being considered for planning in Production Planning Tool.
\ No newline at end of file
diff --git a/manufacturing/doctype/production_plan_sales_order/README.md b/manufacturing/doctype/production_plan_sales_order/README.md
new file mode 100644
index 0000000..a68d576
--- /dev/null
+++ b/manufacturing/doctype/production_plan_sales_order/README.md
@@ -0,0 +1 @@
+Sales Order being considered for the Production Planning Tool.
\ No newline at end of file
diff --git a/manufacturing/doctype/production_planning_tool/README.md b/manufacturing/doctype/production_planning_tool/README.md
new file mode 100644
index 0000000..5dff64c
--- /dev/null
+++ b/manufacturing/doctype/production_planning_tool/README.md
@@ -0,0 +1 @@
+Tool to create Production Orders from a bunch of Sales Orders and generate Material Requests (MRP) as required.
\ No newline at end of file
diff --git a/manufacturing/doctype/update_delivery_date/locale/_messages_doc.json b/manufacturing/doctype/update_delivery_date/locale/_messages_doc.json
deleted file mode 100644
index 8645992..0000000
--- a/manufacturing/doctype/update_delivery_date/locale/_messages_doc.json
+++ /dev/null
@@ -1,13 +0,0 @@
-[
- "Customer",
- "Get Open Sales Order",
- "Sales Order",
- "Company",
- "Update Delivery Date",
- "To Date",
- "From Date",
- "Entries",
- "Manufacturing",
- "Territory",
- "Update Sales Order"
-]
\ No newline at end of file
diff --git a/manufacturing/doctype/update_delivery_date/locale/ar-doc.json b/manufacturing/doctype/update_delivery_date/locale/ar-doc.json
deleted file mode 100644
index 328880a..0000000
--- a/manufacturing/doctype/update_delivery_date/locale/ar-doc.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- "Company": "\u0634\u0631\u0643\u0629",
- "Customer": "\u0632\u0628\u0648\u0646",
- "Entries": "\u0645\u0642\u0627\u0644\u0627\u062a",
- "From Date": "\u0645\u0646 \u062a\u0627\u0631\u064a\u062e",
- "Get Open Sales Order": "\u0627\u0644\u062d\u0635\u0648\u0644 \u0639\u0644\u0649 \u0641\u062a\u062d \u062a\u0631\u062a\u064a\u0628 \u0627\u0644\u0645\u0628\u064a\u0639\u0627\u062a",
- "Manufacturing": "\u062a\u0635\u0646\u064a\u0639",
- "Sales Order": "\u062a\u0631\u062a\u064a\u0628 \u0627\u0644\u0645\u0628\u064a\u0639\u0627\u062a",
- "Territory": "\u0625\u0642\u0644\u064a\u0645",
- "To Date": "\u062d\u062a\u0649 \u0627\u0644\u0627\u0646",
- "Update Delivery Date": "\u062a\u062d\u062f\u064a\u062b \u062a\u0627\u0631\u064a\u062e \u0627\u0644\u062a\u0633\u0644\u064a\u0645",
- "Update Sales Order": "\u062a\u062d\u062f\u064a\u062b \u062a\u0631\u062a\u064a\u0628 \u0627\u0644\u0645\u0628\u064a\u0639\u0627\u062a"
-}
\ No newline at end of file
diff --git a/manufacturing/doctype/update_delivery_date/locale/de-doc.json b/manufacturing/doctype/update_delivery_date/locale/de-doc.json
deleted file mode 100644
index a21240b..0000000
--- a/manufacturing/doctype/update_delivery_date/locale/de-doc.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- "Company": "Firma",
- "Customer": "Kunde",
- "Entries": "Eintr\u00e4ge",
- "From Date": "Von Datum",
- "Get Open Sales Order": "Sie \u00f6ffnen Sales Order",
- "Manufacturing": "Herstellung",
- "Sales Order": "Sales Order",
- "Territory": "Gebiet",
- "To Date": "To Date",
- "Update Delivery Date": "Aktualisieren Lieferdatum",
- "Update Sales Order": "Aktualisieren Sie Sales Order"
-}
\ No newline at end of file
diff --git a/manufacturing/doctype/update_delivery_date/locale/es-doc.json b/manufacturing/doctype/update_delivery_date/locale/es-doc.json
deleted file mode 100644
index 70ef665..0000000
--- a/manufacturing/doctype/update_delivery_date/locale/es-doc.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- "Company": "Empresa",
- "Customer": "Cliente",
- "Entries": "Comentarios",
- "From Date": "Desde la fecha",
- "Get Open Sales Order": "Recibe \u00f3rdenes de venta abierto",
- "Manufacturing": "Fabricaci\u00f3n",
- "Sales Order": "De \u00f3rdenes de venta",
- "Territory": "Territorio",
- "To Date": "Conocer",
- "Update Delivery Date": "Actualizaci\u00f3n de Fecha de Entrega",
- "Update Sales Order": "Actualizaci\u00f3n de \u00f3rdenes de venta"
-}
\ No newline at end of file
diff --git a/manufacturing/doctype/update_delivery_date/locale/fr-doc.json b/manufacturing/doctype/update_delivery_date/locale/fr-doc.json
deleted file mode 100644
index 1a23a86..0000000
--- a/manufacturing/doctype/update_delivery_date/locale/fr-doc.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- "Company": "Entreprise",
- "Customer": "Client",
- "Entries": "Entr\u00e9es",
- "From Date": "Partir de la date",
- "Get Open Sales Order": "Obtenez Ouvrir Commande",
- "Manufacturing": "Fabrication",
- "Sales Order": "Commande",
- "Territory": "Territoire",
- "To Date": "\u00c0 ce jour",
- "Update Delivery Date": "Mettre \u00e0 jour Date de livraison",
- "Update Sales Order": "Mise \u00e0 jour des commandes clients"
-}
\ No newline at end of file
diff --git a/manufacturing/doctype/update_delivery_date/locale/hi-doc.json b/manufacturing/doctype/update_delivery_date/locale/hi-doc.json
deleted file mode 100644
index bb6474c..0000000
--- a/manufacturing/doctype/update_delivery_date/locale/hi-doc.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- "Company": "\u0915\u0902\u092a\u0928\u0940",
- "Customer": "\u0917\u094d\u0930\u093e\u0939\u0915",
- "Entries": "\u092a\u094d\u0930\u0935\u093f\u0937\u094d\u091f\u093f\u092f\u093e\u0902",
- "From Date": "\u0926\u093f\u0928\u093e\u0902\u0915 \u0938\u0947",
- "Get Open Sales Order": "\u0913\u092a\u0928 \u092c\u093f\u0915\u094d\u0930\u0940 \u0906\u0926\u0947\u0936",
- "Manufacturing": "\u0935\u093f\u0928\u093f\u0930\u094d\u092e\u093e\u0923",
- "Sales Order": "\u092c\u093f\u0915\u094d\u0930\u0940 \u0906\u0926\u0947\u0936",
- "Territory": "\u0915\u094d\u0937\u0947\u0924\u094d\u0930",
- "To Date": "\u0924\u093f\u0925\u093f \u0915\u0930\u0928\u0947 \u0915\u0947 \u0932\u093f\u090f",
- "Update Delivery Date": "\u0905\u0926\u094d\u092f\u0924\u0928 \u0921\u093f\u0932\u0940\u0935\u0930\u0940 \u0915\u0940 \u0924\u093e\u0930\u0940\u0916",
- "Update Sales Order": "\u0905\u0926\u094d\u092f\u0924\u0928 \u092c\u093f\u0915\u094d\u0930\u0940 \u0906\u0926\u0947\u0936"
-}
\ No newline at end of file
diff --git a/manufacturing/doctype/update_delivery_date/locale/hr-doc.json b/manufacturing/doctype/update_delivery_date/locale/hr-doc.json
deleted file mode 100644
index 06ff481..0000000
--- a/manufacturing/doctype/update_delivery_date/locale/hr-doc.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- "Company": "Dru\u0161tvo",
- "Customer": "Kupac",
- "Entries": "Prijave",
- "From Date": "Od datuma",
- "Get Open Sales Order": "Nabavite Otvori prodajnog naloga",
- "Manufacturing": "Proizvodnja",
- "Sales Order": "Prodajnog naloga",
- "Territory": "Teritorija",
- "To Date": "Za datum",
- "Update Delivery Date": "A\u017eurirajte datum isporuke",
- "Update Sales Order": "A\u017eurirajte prodajnog naloga"
-}
\ No newline at end of file
diff --git a/manufacturing/doctype/update_delivery_date/locale/nl-doc.json b/manufacturing/doctype/update_delivery_date/locale/nl-doc.json
deleted file mode 100644
index 179809a..0000000
--- a/manufacturing/doctype/update_delivery_date/locale/nl-doc.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- "Company": "Vennootschap",
- "Customer": "Klant",
- "Entries": "Inzendingen",
- "From Date": "Van Datum",
- "Get Open Sales Order": "Get Open Verkooporder",
- "Manufacturing": "Productie",
- "Sales Order": "Verkooporder",
- "Territory": "Grondgebied",
- "To Date": "To-date houden",
- "Update Delivery Date": "Werk Leveringsdatum",
- "Update Sales Order": "Werk Verkooporder"
-}
\ No newline at end of file
diff --git a/manufacturing/doctype/update_delivery_date/locale/pt-BR-doc.json b/manufacturing/doctype/update_delivery_date/locale/pt-BR-doc.json
deleted file mode 100644
index 4d9249e..0000000
--- a/manufacturing/doctype/update_delivery_date/locale/pt-BR-doc.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- "Company": "Empresa",
- "Customer": "Cliente",
- "Entries": "Lan\u00e7amentos",
- "From Date": "A partir da data",
- "Get Open Sales Order": "Obter Ordens de Venda abertas",
- "Manufacturing": "Fabrica\u00e7\u00e3o",
- "Sales Order": "Ordem de Venda",
- "Territory": "Territ\u00f3rio",
- "To Date": "At\u00e9 a Data",
- "Update Delivery Date": "Atualizar Data de Entrega",
- "Update Sales Order": "Atualizar Ordem de Venda"
-}
\ No newline at end of file
diff --git a/manufacturing/doctype/update_delivery_date/locale/pt-doc.json b/manufacturing/doctype/update_delivery_date/locale/pt-doc.json
deleted file mode 100644
index 09ed52b..0000000
--- a/manufacturing/doctype/update_delivery_date/locale/pt-doc.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- "Company": "Companhia",
- "Customer": "Cliente",
- "Entries": "Entradas",
- "From Date": "A partir da data",
- "Get Open Sales Order": "Obter Ordem de vendas Abrir",
- "Manufacturing": "Fabrico",
- "Sales Order": "Ordem de Vendas",
- "Territory": "Territ\u00f3rio",
- "To Date": "Conhecer",
- "Update Delivery Date": "Atualize data de entrega",
- "Update Sales Order": "Atualize Ordem de Vendas"
-}
\ No newline at end of file
diff --git a/manufacturing/doctype/update_delivery_date/locale/sr-doc.json b/manufacturing/doctype/update_delivery_date/locale/sr-doc.json
deleted file mode 100644
index b6e6a19..0000000
--- a/manufacturing/doctype/update_delivery_date/locale/sr-doc.json
+++ /dev/null
@@ -1,12 +0,0 @@
-{
- "Company": "\u041a\u043e\u043c\u043f\u0430\u043d\u0438\u0458\u0430",
- "Customer": "\u041a\u0443\u043f\u0430\u0446",
- "From Date": "\u041e\u0434 \u0434\u0430\u0442\u0443\u043c\u0430",
- "Get Open Sales Order": "\u0413\u0435\u0442 \u041e\u043f\u0435\u043d \u043f\u0440\u043e\u0434\u0430\u0458\u043d\u0438\u0445 \u043d\u0430\u043b\u043e\u0433\u0430",
- "Manufacturing": "\u041f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u045a\u0430",
- "Sales Order": "\u041f\u0440\u043e\u0434\u0430\u0458\u0430 \u041d\u0430\u0440\u0443\u0447\u0438\u0442\u0435",
- "Territory": "\u0422\u0435\u0440\u0438\u0442\u043e\u0440\u0438\u0458\u0430",
- "To Date": "\u0417\u0430 \u0434\u0430\u0442\u0443\u043c",
- "Update Delivery Date": "\u0423\u043f\u0434\u0430\u0442\u0435 \u0434\u0430\u0442\u0443\u043c \u0438\u0441\u043f\u043e\u0440\u0443\u043a\u0435",
- "Update Sales Order": "\u0423\u043f\u0434\u0430\u0442\u0435 \u043f\u0440\u043e\u0434\u0430\u0458\u043d\u0438\u0445 \u043d\u0430\u043b\u043e\u0433\u0430"
-}
\ No newline at end of file
diff --git a/manufacturing/doctype/update_delivery_date/locale/ta-doc.json b/manufacturing/doctype/update_delivery_date/locale/ta-doc.json
deleted file mode 100644
index f391384..0000000
--- a/manufacturing/doctype/update_delivery_date/locale/ta-doc.json
+++ /dev/null
@@ -1,12 +0,0 @@
-{
- "Company": "\u0ba8\u0bbf\u0bb1\u0bc1\u0bb5\u0ba9\u0bae\u0bcd",
- "Customer": "\u0bb5\u0bbe\u0b9f\u0bbf\u0b95\u0bcd\u0b95\u0bc8\u0baf\u0bbe\u0bb3\u0bb0\u0bcd",
- "From Date": "\u0ba4\u0bc7\u0ba4\u0bbf",
- "Get Open Sales Order": "\u0ba4\u0bbf\u0bb1\u0ba8\u0bcd\u0ba4 \u0bb5\u0bbf\u0bb1\u0bcd\u0baa\u0ba9\u0bc8 \u0b86\u0bb0\u0bcd\u0b9f\u0bb0\u0bcd \u0b95\u0bbf\u0b9f\u0bc8\u0b95\u0bcd\u0b95\u0bc1\u0bae\u0bcd",
- "Manufacturing": "\u0b89\u0bb0\u0bc1\u0bb5\u0bbe\u0b95\u0bcd\u0b95\u0bae\u0bcd",
- "Sales Order": "\u0bb5\u0bbf\u0bb1\u0bcd\u0baa\u0ba9\u0bc8 \u0b86\u0ba3\u0bc8",
- "Territory": "\u0bae\u0ba3\u0bcd\u0b9f\u0bb2\u0bae\u0bcd",
- "To Date": "\u0ba4\u0bc7\u0ba4\u0bbf",
- "Update Delivery Date": "\u0b9f\u0bc6\u0bb2\u0bbf\u0bb5\u0bb0\u0bbf \u0ba4\u0bc7\u0ba4\u0bbf \u0baa\u0bc1\u0ba4\u0bc1\u0baa\u0bcd\u0baa\u0bbf\u0b95\u0bcd\u0b95",
- "Update Sales Order": "\u0bb5\u0bbf\u0bb1\u0bcd\u0baa\u0ba9\u0bc8 \u0b86\u0ba3\u0bc8 \u0baa\u0bc1\u0ba4\u0bc1\u0baa\u0bcd\u0baa\u0bbf\u0b95\u0bcd\u0b95"
-}
\ No newline at end of file
diff --git a/manufacturing/doctype/update_delivery_date/locale/th-doc.json b/manufacturing/doctype/update_delivery_date/locale/th-doc.json
deleted file mode 100644
index 799fec1..0000000
--- a/manufacturing/doctype/update_delivery_date/locale/th-doc.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- "Company": "\u0e1a\u0e23\u0e34\u0e29\u0e31\u0e17",
- "Customer": "\u0e25\u0e39\u0e01\u0e04\u0e49\u0e32",
- "Entries": "\u0e04\u0e2d\u0e21\u0e40\u0e21\u0e19\u0e15\u0e4c",
- "From Date": "\u0e08\u0e32\u0e01\u0e27\u0e31\u0e19\u0e17\u0e35\u0e48",
- "Get Open Sales Order": "\u0e23\u0e31\u0e1a\u0e01\u0e32\u0e23\u0e2a\u0e31\u0e48\u0e07\u0e0b\u0e37\u0e49\u0e2d\u0e01\u0e32\u0e23\u0e02\u0e32\u0e22\u0e40\u0e1b\u0e34\u0e14",
- "Manufacturing": "\u0e01\u0e32\u0e23\u0e1c\u0e25\u0e34\u0e15",
- "Sales Order": "\u0e2a\u0e31\u0e48\u0e07\u0e0b\u0e37\u0e49\u0e2d\u0e02\u0e32\u0e22",
- "Territory": "\u0e2d\u0e32\u0e13\u0e32\u0e40\u0e02\u0e15",
- "To Date": "\u0e19\u0e31\u0e14",
- "Update Delivery Date": "\u0e2d\u0e31\u0e1e\u0e40\u0e14\u0e17\u0e27\u0e31\u0e19\u0e17\u0e35\u0e48\u0e2a\u0e48\u0e07",
- "Update Sales Order": "\u0e2d\u0e31\u0e1e\u0e40\u0e14\u0e17\u0e01\u0e32\u0e23\u0e2a\u0e31\u0e48\u0e07\u0e0b\u0e37\u0e49\u0e2d\u0e01\u0e32\u0e23\u0e02\u0e32\u0e22"
-}
\ No newline at end of file
diff --git a/manufacturing/doctype/workstation/README.md b/manufacturing/doctype/workstation/README.md
new file mode 100644
index 0000000..f9afe37
--- /dev/null
+++ b/manufacturing/doctype/workstation/README.md
@@ -0,0 +1 @@
+Workstation where BOM Operation is performed.
\ No newline at end of file
diff --git a/manufacturing/search_criteria/__init__.py b/manufacturing/search_criteria/__init__.py
deleted file mode 100644
index baffc48..0000000
--- a/manufacturing/search_criteria/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-from __future__ import unicode_literals
diff --git a/manufacturing/search_criteria/consumption_against_production/__init__.py b/manufacturing/search_criteria/consumption_against_production/__init__.py
deleted file mode 100644
index baffc48..0000000
--- a/manufacturing/search_criteria/consumption_against_production/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-from __future__ import unicode_literals
diff --git a/manufacturing/search_criteria/consumption_against_production/consumption_against_production.txt b/manufacturing/search_criteria/consumption_against_production/consumption_against_production.txt
deleted file mode 100644
index 70620ff..0000000
--- a/manufacturing/search_criteria/consumption_against_production/consumption_against_production.txt
+++ /dev/null
@@ -1,30 +0,0 @@
-[
- {
- "owner": "jai@webnotestech.com",
- "docstatus": 0,
- "creation": "2012-04-03 12:49:50",
- "modified_by": "Administrator",
- "modified": "2012-12-10 18:30:00"
- },
- {
- "add_col": "`tabProduction Order`.consider_sa_items",
- "parent_doc_type": "Stock Entry",
- "module": "Manufacturing",
- "standard": "Yes",
- "sort_order": "DESC",
- "add_tab": "`tabProduction Order`",
- "doc_type": "Stock Entry Detail",
- "name": "__common__",
- "filters": "{'Stock Entry\u0001Submitted':1,'Stock Entry\u0001Purpose':'Production Order','Stock Entry\u0001Process':''}",
- "add_cond": "`tabProduction Order`.name = `tabStock Entry`.production_order",
- "doctype": "Search Criteria",
- "sort_by": "`tabStock Entry`.`name`",
- "page_len": 50,
- "criteria_name": "Consumption Against Production",
- "columns": "Stock Entry\u0001ID,Stock Entry\u0001Production Order,Stock Entry\u0001Process,Stock Entry\u0001Posting Date,Stock Entry\u0001Company,Stock Entry Detail\u0001Source Warehouse,Stock Entry Detail\u0001Target Warehouse,Stock Entry Detail\u0001FG Item,Stock Entry Detail\u0001Item Code,Stock Entry Detail\u0001Description,Stock Entry Detail\u0001Reqd Qty,Stock Entry Detail\u0001Transfer Quantity"
- },
- {
- "name": "consumption_against_production",
- "doctype": "Search Criteria"
- }
-]
\ No newline at end of file
diff --git a/manufacturing/search_criteria/itemwise_production_report/__init__.py b/manufacturing/search_criteria/itemwise_production_report/__init__.py
deleted file mode 100644
index baffc48..0000000
--- a/manufacturing/search_criteria/itemwise_production_report/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-from __future__ import unicode_literals
diff --git a/manufacturing/search_criteria/itemwise_production_report/itemwise_production_report.js b/manufacturing/search_criteria/itemwise_production_report/itemwise_production_report.js
deleted file mode 100644
index 4998fad..0000000
--- a/manufacturing/search_criteria/itemwise_production_report/itemwise_production_report.js
+++ /dev/null
@@ -1,32 +0,0 @@
-// ERPNext - web based ERP (http://erpnext.com)
-// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-report.customize_filters = function() {
-
- //to hide all filters
- this.hide_all_filters();
-
- // to unhide required filters
- this.filter_fields_dict['Stock Entry'+FILTER_SEP +'ID'].df.filter_hide = 0;
- this.filter_fields_dict['Stock Entry'+FILTER_SEP +'Production Order'].df.filter_hide = 0;
-
- this.filter_fields_dict['Stock Entry'+FILTER_SEP +'From Posting Date'].df.filter_hide = 0;
- this.filter_fields_dict['Stock Entry'+FILTER_SEP +'To Posting Date'].df.filter_hide = 0;
-
- this.filter_fields_dict['Stock Entry Detail'+FILTER_SEP +'Target Warehouse'].df.filter_hide = 0;
-
- this.filter_fields_dict['Stock Entry Detail'+FILTER_SEP +'Item Code'].df.filter_hide = 0;
-}
\ No newline at end of file
diff --git a/manufacturing/search_criteria/itemwise_production_report/itemwise_production_report.txt b/manufacturing/search_criteria/itemwise_production_report/itemwise_production_report.txt
deleted file mode 100644
index 7814fec..0000000
--- a/manufacturing/search_criteria/itemwise_production_report/itemwise_production_report.txt
+++ /dev/null
@@ -1,27 +0,0 @@
-[
- {
- "owner": "jai@webnotestech.com",
- "docstatus": 0,
- "creation": "2012-04-03 12:49:51",
- "modified_by": "Administrator",
- "modified": "2012-12-10 18:30:00"
- },
- {
- "parent_doc_type": "Stock Entry",
- "module": "Manufacturing",
- "standard": "Yes",
- "sort_order": "DESC",
- "filters": "{'Stock Entry\u0001Saved':1,'Stock Entry\u0001Submitted':1,'Stock Entry\u0001Purpose':'Production Order','Stock Entry\u0001Process':'Backflush','Stock Entry Detail\u0001FG Item':1}",
- "doc_type": "Stock Entry Detail",
- "name": "__common__",
- "doctype": "Search Criteria",
- "sort_by": "`tabStock Entry`.`name`",
- "page_len": 50,
- "criteria_name": "Itemwise Production Report",
- "columns": "Stock Entry\u0001ID,Stock Entry\u0001Posting Date,Stock Entry\u0001Production Order,Stock Entry\u0001Process,Stock Entry\u0001Company,Stock Entry Detail\u0001Target Warehouse,Stock Entry Detail\u0001Item Code,Stock Entry Detail\u0001Description,Stock Entry Detail\u0001Stock UOM,Stock Entry Detail\u0001Transfer Quantity"
- },
- {
- "name": "itemwise_production_report",
- "doctype": "Search Criteria"
- }
-]
\ No newline at end of file
diff --git a/manufacturing/search_criteria/production_orders_in_process/__init__.py b/manufacturing/search_criteria/production_orders_in_process/__init__.py
deleted file mode 100644
index baffc48..0000000
--- a/manufacturing/search_criteria/production_orders_in_process/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-from __future__ import unicode_literals
diff --git a/manufacturing/search_criteria/production_orders_in_process/production_orders_in_process.txt b/manufacturing/search_criteria/production_orders_in_process/production_orders_in_process.txt
deleted file mode 100644
index 3a8c8c9..0000000
--- a/manufacturing/search_criteria/production_orders_in_process/production_orders_in_process.txt
+++ /dev/null
@@ -1,27 +0,0 @@
-[
- {
- "owner": "jai@webnotestech.com",
- "docstatus": 0,
- "creation": "2012-04-03 12:49:52",
- "modified_by": "Administrator",
- "modified": "2012-12-10 18:30:00"
- },
- {
- "module": "Manufacturing",
- "standard": "Yes",
- "sort_order": "DESC",
- "filters": "{'Production Order\u0001Submitted':1,'Production Order\u0001Origin':'','Production Order\u0001Status':'','Production Order\u0001Consider SA Items':'','Production Order\u0001Fiscal Year':''}",
- "doc_type": "Production Order",
- "name": "__common__",
- "add_cond": "`tabProduction Order`.qty > `tabProduction Order`.produced_qty",
- "doctype": "Search Criteria",
- "sort_by": "`tabProduction Order`.`name`",
- "page_len": 50,
- "criteria_name": "Production Orders In Process",
- "columns": "Production Order\u0001ID,Production Order\u0001Origin,Production Order\u0001Status,Production Order\u0001Posting Date,Production Order\u0001Production Item,Production Order\u0001BOM No,Production Order\u0001Description,Production Order\u0001Stock UOM,Production Order\u0001Qty,Production Order\u0001Produced Qty,Production Order\u0001FG Warehouse,Production Order\u0001WIP Warehouse,Production Order\u0001Consider SA Items,Production Order\u0001Fiscal Year,Production Order\u0001Company"
- },
- {
- "name": "production_orders_in_process",
- "doctype": "Search Criteria"
- }
-]
\ No newline at end of file
diff --git a/patches/april_2013/p05_update_file_data.py b/patches/april_2013/p05_update_file_data.py
index 39449a6..0168de6 100644
--- a/patches/april_2013/p05_update_file_data.py
+++ b/patches/april_2013/p05_update_file_data.py
@@ -1,5 +1,4 @@
import webnotes, webnotes.utils, os
-from webnotes.modules.export_file import export_to_files
def execute():
webnotes.reload_doc("core", "doctype", "file_data")
@@ -71,4 +70,4 @@
pass
else:
webnotes.conn.sql("""delete from `tabFile Data` where name=%s""",
- fileid)
\ No newline at end of file
+ fileid)
diff --git a/patches/april_2013/p06_default_cost_center.py b/patches/april_2013/p06_default_cost_center.py
index 4f80d95..4aaa7d5 100644
--- a/patches/april_2013/p06_default_cost_center.py
+++ b/patches/april_2013/p06_default_cost_center.py
@@ -1,10 +1,10 @@
import webnotes
def execute():
- for dt, fieldname in \
- (("Journal Voucher Detail", "cost_center"),
- ("Sales Taxes and Charges", "cost_center_other_charges"),
- ("Purchase Taxes and Charges", "cost_center"), ("Delivery Note Item", "cost_center"),
- ("Purchase Invoice Item", "cost_center"), ("Sales Invoice Item", "cost_center")):
- webnotes.conn.sql_ddl("""alter table `tab%s` alter `%s` drop default""" % (dt, fieldname))
+ webnotes.reload_doc("Stock", "DocType", "Delivery Note Item")
+ for dt in ("Journal Voucher Detail", "Sales Taxes and Charges",
+ "Purchase Taxes and Charges", "Delivery Note Item",
+ "Purchase Invoice Item", "Sales Invoice Item"):
+ webnotes.conn.sql_ddl("""alter table `tab%s` alter `cost_center` drop default""" \
+ % (dt,))
webnotes.reload_doc(webnotes.conn.get_value("DocType", dt, "module"), "DocType", dt)
diff --git a/patches/april_2013/p07_rename_cost_center_other_charges.py b/patches/april_2013/p07_rename_cost_center_other_charges.py
new file mode 100644
index 0000000..c3c9491
--- /dev/null
+++ b/patches/april_2013/p07_rename_cost_center_other_charges.py
@@ -0,0 +1,9 @@
+import webnotes
+
+def execute():
+ webnotes.reload_doc("Accounts", "DocType", "Sales Taxes and Charges")
+ webnotes.conn.sql("""update `tabSales Taxes and Charges`
+ set cost_center = cost_center_other_charges""")
+ webnotes.conn.sql_ddl("""alter table `tabSales Taxes and Charges`
+ drop column cost_center_other_charges""")
+
\ No newline at end of file
diff --git a/patches/august_2012/remove_cash_flow_statement.py b/patches/august_2012/remove_cash_flow_statement.py
deleted file mode 100644
index 739a4f2..0000000
--- a/patches/august_2012/remove_cash_flow_statement.py
+++ /dev/null
@@ -1,4 +0,0 @@
-from __future__ import unicode_literals
-def execute():
- import webnotes
- webnotes.conn.sql("delete from `tabSearch Criteria` where name = 'cash_flow_statement'")
\ No newline at end of file
diff --git a/patches/december_2012/deprecate_tds.py b/patches/december_2012/deprecate_tds.py
index e351fd9..09b378c 100644
--- a/patches/december_2012/deprecate_tds.py
+++ b/patches/december_2012/deprecate_tds.py
@@ -15,8 +15,6 @@
webnotes.conn.sql("drop table if exists `tab%s`" % dt)
webnotes.conn.begin()
- delete_doc("Search Criteria", "tds_return")
-
# Add tds entry in tax table for purchase invoice
pi_list = webnotes.conn.sql("""select name from `tabPurchase Invoice`
where ifnull(tax_code, '')!='' and ifnull(ded_amount, 0)!=0""")
diff --git a/patches/december_2012/reload_debtors_creditors_ledger.py b/patches/december_2012/reload_debtors_creditors_ledger.py
deleted file mode 100644
index 7f88a6f..0000000
--- a/patches/december_2012/reload_debtors_creditors_ledger.py
+++ /dev/null
@@ -1,5 +0,0 @@
-def execute():
- import webnotes
- from webnotes.modules import reload_doc
- reload_doc("accounts", "search_criteria", "debtors_ledger")
- reload_doc("accounts", "search_criteria", "creditors_ledger")
\ No newline at end of file
diff --git a/patches/february_2013/p03_material_request.py b/patches/february_2013/p03_material_request.py
index f0373bd..d85710d 100644
--- a/patches/february_2013/p03_material_request.py
+++ b/patches/february_2013/p03_material_request.py
@@ -8,8 +8,6 @@
webnotes.rename_doc("DocType", "Purchase Request Item", "Material Request Item", force=True)
if not "tabMaterial Request" in tables:
webnotes.rename_doc("DocType", "Purchase Request", "Material Request", force=True)
- webnotes.reload_doc("buying", "search_criteria", "pending_po_items_to_bill")
- webnotes.reload_doc("buying", "search_criteria", "pending_po_items_to_receive")
webnotes.reload_doc("stock", "doctype", "material_request")
webnotes.reload_doc("stock", "doctype", "material_request_item")
diff --git a/patches/february_2013/remove_gl_mapper.py b/patches/february_2013/remove_gl_mapper.py
index 7771104..7d248d3 100644
--- a/patches/february_2013/remove_gl_mapper.py
+++ b/patches/february_2013/remove_gl_mapper.py
@@ -1,4 +1,7 @@
def execute():
import webnotes
- for mapper in webnotes.conn.sql("""select name from `tabGL Mapper`"""):
- webnotes.delete_doc("GL Mapper", mapper[0])
\ No newline at end of file
+ try:
+ for mapper in webnotes.conn.sql("""select name from `tabGL Mapper`"""):
+ webnotes.delete_doc("GL Mapper", mapper[0])
+ except Exception, e:
+ pass
\ No newline at end of file
diff --git a/patches/february_2013/remove_sales_order_pending_items.py b/patches/february_2013/remove_sales_order_pending_items.py
deleted file mode 100644
index bde6a7b..0000000
--- a/patches/february_2013/remove_sales_order_pending_items.py
+++ /dev/null
@@ -1,3 +0,0 @@
-def execute():
- import webnotes
- webnotes.delete_doc("Search Criteria", "sales_order_pending_items")
\ No newline at end of file
diff --git a/patches/january_2013/deprecate_stock_search_criteria.py b/patches/january_2013/deprecate_stock_search_criteria.py
deleted file mode 100644
index d51aadb..0000000
--- a/patches/january_2013/deprecate_stock_search_criteria.py
+++ /dev/null
@@ -1,9 +0,0 @@
-import webnotes
-
-def execute():
- for sc in ["itemwise_price_list", "itemwise_receipt_details",
- "shortage_to_purchase_request", "stock_aging_report",
- "stock_ledger", "stock_level", "stock_report",
- "custom_test2", "custom_test3", "custom_test4",
- "test_so2", "test_so3"]:
- webnotes.delete_doc("Search Criteria", sc)
\ No newline at end of file
diff --git a/patches/january_2013/remove_support_search_criteria.py b/patches/january_2013/remove_support_search_criteria.py
deleted file mode 100644
index 0443afe..0000000
--- a/patches/january_2013/remove_support_search_criteria.py
+++ /dev/null
@@ -1,4 +0,0 @@
-import webnotes
-def execute():
- for sc in ["warranty-amc_expiry_details", "warranty-amc_summary"]:
- webnotes.delete_doc("Search Criteria", sc)
\ No newline at end of file
diff --git a/patches/july_2012/sync_trial_balance.py b/patches/july_2012/sync_trial_balance.py
deleted file mode 100644
index 3755ed4..0000000
--- a/patches/july_2012/sync_trial_balance.py
+++ /dev/null
@@ -1,5 +0,0 @@
-from __future__ import unicode_literals
-def execute():
- import webnotes
- from webnotes.modules import reload_doc
- reload_doc('accounts', 'search_criteria', 'trial_balance')
\ No newline at end of file
diff --git a/patches/june_2012/reports_list_permission.py b/patches/june_2012/reports_list_permission.py
index e34eb5a..462c2f2 100644
--- a/patches/june_2012/reports_list_permission.py
+++ b/patches/june_2012/reports_list_permission.py
@@ -6,9 +6,4 @@
delete from `tabDocPerm`
where parent in ('Report', 'Search Criteria')""")
- webnotes.conn.commit()
-
- webnotes.reload_doc('core', 'doctype', 'search_criteria')
webnotes.reload_doc('core', 'doctype', 'report')
-
- webnotes.conn.begin()
\ No newline at end of file
diff --git a/patches/june_2013/p02_update_project_completed.py b/patches/june_2013/p02_update_project_completed.py
new file mode 100644
index 0000000..4bc5d6d
--- /dev/null
+++ b/patches/june_2013/p02_update_project_completed.py
@@ -0,0 +1,6 @@
+import webnotes
+
+def execute():
+ webnotes.reload_doc("projects", "doctype", "project")
+ for p in webnotes.conn.sql_list("""select name from tabProject"""):
+ webnotes.bean("Project", p).controller.update_percent_complete()
\ No newline at end of file
diff --git a/patches/may_2012/reload_customer_address_contact.py b/patches/may_2012/reload_customer_address_contact.py
deleted file mode 100644
index 4aec19d..0000000
--- a/patches/may_2012/reload_customer_address_contact.py
+++ /dev/null
@@ -1,5 +0,0 @@
-from __future__ import unicode_literals
-def execute():
- import webnotes
- import webnotes.modules
- webnotes.modules.reload_doc('selling', 'search_criteria', 'customer_address_contact')
\ No newline at end of file
diff --git a/patches/may_2012/reload_reports.py b/patches/may_2012/reload_reports.py
deleted file mode 100644
index 1cee3a0..0000000
--- a/patches/may_2012/reload_reports.py
+++ /dev/null
@@ -1,7 +0,0 @@
-from __future__ import unicode_literals
-def execute():
- import webnotes
- from webnotes.modules import reload_doc
- reload_doc('selling', 'search_criteria', 'itemwise_sales_details')
- reload_doc('selling', 'search_criteria', 'itemwise_delivery_details')
-
diff --git a/patches/may_2012/reload_so_pending_items.py b/patches/may_2012/reload_so_pending_items.py
deleted file mode 100644
index 999004e..0000000
--- a/patches/may_2012/reload_so_pending_items.py
+++ /dev/null
@@ -1,9 +0,0 @@
-from __future__ import unicode_literals
-def execute():
- import webnotes
- from webnotes.model import delete_doc
- delete_doc("Search Criteria", "sales_order_pending_items1")
-
- webnotes.conn.sql("update `tabSearch Criteria` set module = 'Selling' where module = 'CRM'")
- from webnotes.modules import reload_doc
- reload_doc('selling', 'search_criteria', 'sales_order_pending_items')
\ No newline at end of file
diff --git a/patches/may_2012/renamedt_in_custom_search_criteria.py b/patches/may_2012/renamedt_in_custom_search_criteria.py
deleted file mode 100644
index 1522dee..0000000
--- a/patches/may_2012/renamedt_in_custom_search_criteria.py
+++ /dev/null
@@ -1,100 +0,0 @@
-from __future__ import unicode_literals
-def execute():
- import webnotes
- rendt = {
- 'Receivable Voucher' : 'Sales Invoice',
- 'RV Detail' : 'Sales Invoice Item',
- 'RV Tax Detail' : 'Sales Taxes and Charges',
- 'Payable Voucher' : 'Purchase Invoice',
- 'PV Detail' : 'Purchase Invoice Item',
- 'Purchase Tax Detail' : 'Purchase Taxes and Charges',
- 'Indent' : 'Material Request',
- 'Indent Detail' : 'Material Request Item',
- 'QA Inspection Report' : 'Quality Inspection',
- 'Ticket' : 'Task',
- 'Manage Account' : 'Global Defaults',
- 'ToDo Item' : 'ToDo',
- 'Term' : 'Terms and Conditions',
- 'Static Parameter Detail' : 'SMS Parameter',
- 'SS Earning Detail' : 'Salary Slip Earning',
- 'SS Deduction Detail' : 'Salary Slip Deduction',
- 'Sales Order Detail' : 'Sales Order Item',
- 'Sales BOM Detail' : 'Sales BOM Item',
- 'Return Detail' : 'Sales and Purchase Return Item',
- 'Ref Rate Detail' : 'Item Price',
- 'Receiver Detail' : 'SMS Receiver',
- 'Quotation Detail' : 'Quotation Item',
- 'QA Specification Detail' : 'Quality Inspection Reading',
- 'Purchase Receipt Detail' : 'Purchase Receipt Item',
- 'Purchase Other Charges' : 'Purchase Taxes and Charges Master',
- 'PR Raw Material Detail' : 'Purchase Receipt Item Supplied',
- 'PP SO Detail' : 'Production Plan Sales Order',
- 'PP Detail' : 'Production Plan Item',
- 'PO Raw Material Detail' : 'Purchase Order Item Supplied',
- 'PO Detail' : 'Purchase Order Item',
- 'Packing Slip Detail' : 'Packing Slip Item',
- 'Other Charges' : 'Sales Taxes and Charges Master',
- 'Order Lost Reason' : 'Quotation Lost Reason',
- 'Manage Account' : 'Global Defaults',
- 'Maintenance Visit Detail' : 'Maintenance Visit Purpose',
- 'Ledger Balance Export' : 'Multi Ledger Report',
- 'LC PR Detail' : 'Landed Cost Purchase Receipt',
- 'Landed Cost Detail' : 'Landed Cost Item',
- 'KRA Template' : 'Appraisal Template',
- 'KRA Sheet' : 'Appraisal Template Goal',
- 'Item Specification Detail' : 'Item Quality Inspection Parameter',
- 'Item Maintenance Detail' : 'Maintenance Schedule Item',
- 'IR Payment Detail' : 'Payment to Invoice Matching Tool Detail',
- 'Internal Reconciliation' : 'Payment to Invoice Matching Tool',
- 'Installed Item Details' : 'Installation Note Item',
- 'Holiday List Detail' : 'Holiday',
- 'Follow up' : 'Communication Log',
- 'Flat BOM Detail' : 'BOM Explosion Item',
- 'Expense Voucher Detail' : 'Expense Claim Detail',
- 'Expense Voucher' : 'Expense Claim',
- 'Expense Type' : 'Expense Claim Type',
- 'Enquiry Detail' : 'Opportunity Item',
- 'Enquiry' : 'Opportunity',
- 'Earning Detail' : 'Salary Structure Earning',
- 'DocLayerField' : 'Customize Form Field',
- 'DocLayer' : 'Customize Form',
- 'Delivery Note Detail' : 'Delivery Note Item',
- 'Deduction Detail' : 'Salary Structure Deduction',
- 'Comment Widget Record' : 'Comment',
- 'BOM Material' : 'BOM Item',
- 'Bill Of Materials' : 'BOM',
- 'Appraisal Detail' : 'Appraisal Goal',
- 'Advance Allocation Detail' : 'Purchase Invoice Advance',
- 'Advance Adjustment Detail' : 'Sales Invoice Advance',
- 'Ledger Detail' : 'Multi Ledger Report Detail',
- 'TA Control' : 'Trend Analyzer Control',
- 'Sales and Purchase Return Wizard' : 'Sales and Purchase Return Tool',
- 'Educational Qualifications Detail' : 'Employee Education',
- 'Delivery Note Packing Detail' : 'Delivery Note Packing Item',
- 'Experience In Company Detail' : 'Employee Internal Work History',
- 'Professional Training Details' : 'Employee Training',
- 'Previous Experience Detail' : 'Employee External Work History',
- }
-
- for d in rendt:
- webnotes.conn.sql("""
- update
- `tabSearch Criteria`
- set
- doc_type = replace(doc_type, %s, %s),
- filters = replace(filters, %s, %s),
- columns = replace(columns, %s, %s),
- parent_doc_type = replace(parent_doc_type, %s, %s),
- add_cond = replace(add_cond, %s, %s),
- add_col = replace(add_col, %s, %s),
- add_tab = replace(add_tab, %s, %s),
- dis_filters = replace(dis_filters, %s, %s),
- group_by = replace(group_by, %s, %s),
- sort_by = replace(sort_by, %s, %s),
- report_script = replace(report_script, %s, %s),
- server_script = replace(server_script, %s, %s),
- custom_query = replace(custom_query, %s, %s)
- """, (d, rendt[d], d, rendt[d], d, rendt[d], d, rendt[d], d, rendt[d], d, rendt[d], d, rendt[d],
- d, rendt[d], d, rendt[d], d, rendt[d], d, rendt[d], d, rendt[d], d, rendt[d]))
-
-
diff --git a/patches/may_2013/p01_selling_net_total_export.py b/patches/may_2013/p01_selling_net_total_export.py
new file mode 100644
index 0000000..eb6da23
--- /dev/null
+++ b/patches/may_2013/p01_selling_net_total_export.py
@@ -0,0 +1,16 @@
+from __future__ import unicode_literals
+import webnotes
+from webnotes.utils import cint
+
+def execute():
+ for module, doctype in (("Accounts", "Sales Invoice"), ("Selling", "Sales Order"), ("Selling", "Quotation"),
+ ("Stock", "Delivery Note")):
+ webnotes.reload_doc(module, "DocType", doctype)
+ webnotes.conn.sql("""update `tab%s`
+ set net_total_export = round(net_total / if(conversion_rate=0, 1, ifnull(conversion_rate, 1)), 2),
+ other_charges_total_export = round(grand_total_export - net_total_export, 2)""" %
+ (doctype,))
+
+ for module, doctype in (("Accounts", "Sales Invoice Item"), ("Selling", "Sales Order Item"), ("Selling", "Quotation Item"),
+ ("Stock", "Delivery Note Item")):
+ webnotes.reload_doc(module, "DocType", doctype)
\ No newline at end of file
diff --git a/patches/may_2013/p06_make_notes.py b/patches/may_2013/p06_make_notes.py
new file mode 100644
index 0000000..597468a
--- /dev/null
+++ b/patches/may_2013/p06_make_notes.py
@@ -0,0 +1,28 @@
+import webnotes, markdown2
+
+def execute():
+ webnotes.reload_doc("utilities", "doctype", "note")
+ webnotes.reload_doc("utilities", "doctype", "note_user")
+
+ for question in webnotes.conn.sql("""select * from tabQuestion""", as_dict=True):
+ if question.question:
+ name = question.question[:180]
+ if webnotes.conn.exists("Note", name):
+ webnotes.delete_doc("Note", name)
+ note = webnotes.bean({
+ "doctype":"Note",
+ "title": name,
+ "content": "<hr>".join([markdown2.markdown(c) for c in webnotes.conn.sql_list("""
+ select answer from tabAnswer where question=%s""", question.name)]),
+ "owner": question.owner,
+ "creation": question.creation,
+ "public": 1
+ }).insert()
+
+ webnotes.delete_doc("DocType", "Question")
+ webnotes.delete_doc("DocType", "Answer")
+ webnotes.bean("Style Settings").save()
+
+ # update comment delete
+ webnotes.conn.sql("""update tabDocPerm \
+ set cancel=1 where parent='Comment' and role='System Manager'""")
diff --git a/patches/may_2013/p06_update_billed_amt_po_pr.py b/patches/may_2013/p06_update_billed_amt_po_pr.py
new file mode 100644
index 0000000..5084e98
--- /dev/null
+++ b/patches/may_2013/p06_update_billed_amt_po_pr.py
@@ -0,0 +1,24 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+from __future__ import unicode_literals
+def execute():
+ import webnotes
+ webnotes.reload_doc("buying", "doctype", "purchase_order_item")
+ webnotes.reload_doc("stock", "doctype", "purchase_receipt_item")
+ for pi in webnotes.conn.sql("""select name from `tabPurchase Invoice` where docstatus = 1"""):
+ webnotes.get_obj("Purchase Invoice", pi[0],
+ with_children=1).update_qty(change_modified=False)
\ No newline at end of file
diff --git a/patches/may_2013/p07_move_update_stock_to_pos.py b/patches/may_2013/p07_move_update_stock_to_pos.py
new file mode 100644
index 0000000..7928728
--- /dev/null
+++ b/patches/may_2013/p07_move_update_stock_to_pos.py
@@ -0,0 +1,23 @@
+import webnotes, webnotes.defaults
+from webnotes.utils import cint
+
+def execute():
+ webnotes.reload_doc("accounts", "doctype", "pos_setting")
+
+ webnotes.conn.sql("""update `tabPOS Setting` set update_stock=%s""",
+ cint(webnotes.defaults.get_global_default("update_stock")))
+
+ webnotes.conn.sql("""delete from `tabSingles`
+ where doctype='Global Defaults' and field='update_stock'""")
+
+ webnotes.conn.sql("""delete from `tabDefaultValue`
+ where parent='Control Panel' and defkey="update_stock" """)
+
+ webnotes.defaults.clear_cache("Control Panel")
+
+ webnotes.reload_doc("setup", "doctype", "global_defaults")
+
+ # previously, update_stock was valid only when is_pos was checked
+ # henceforth it is valid, and hence the patch
+ webnotes.conn.sql("""update `tabSales Invoice` set update_stock=0
+ where ifnull(is_pos, 0)=0""")
\ No newline at end of file
diff --git a/patches/may_2013/p08_change_item_wise_tax.py b/patches/may_2013/p08_change_item_wise_tax.py
new file mode 100644
index 0000000..dbb949e
--- /dev/null
+++ b/patches/may_2013/p08_change_item_wise_tax.py
@@ -0,0 +1,23 @@
+import webnotes
+import json
+from webnotes.utils import flt
+
+def execute():
+ for doctype in ["Purchase Taxes and Charges", "Sales Taxes and Charges"]:
+ for tax_name, item_wise_tax_detail in \
+ webnotes.conn.sql("""select name, item_wise_tax_detail from `tab%s`""" % doctype):
+ if not item_wise_tax_detail or not isinstance(item_wise_tax_detail, basestring):
+ continue
+
+ try:
+ json.loads(item_wise_tax_detail)
+ except ValueError:
+ out = {}
+ for t in item_wise_tax_detail.split("\n"):
+ if ":" in t:
+ account_head, amount = t.split(":")
+ out[account_head.strip()] = flt(amount.strip())
+
+ if out:
+ webnotes.conn.sql("""update `tab%s` set item_wise_tax_detail=%s
+ where name=%s""" % (doctype, "%s", "%s"), (json.dumps(out), tax_name))
\ No newline at end of file
diff --git a/patches/november_2012/add_theme_to_profile.py b/patches/november_2012/add_theme_to_profile.py
index 648c1d1..89710a4 100644
--- a/patches/november_2012/add_theme_to_profile.py
+++ b/patches/november_2012/add_theme_to_profile.py
@@ -3,11 +3,12 @@
def execute():
webnotes.clear_perms("Profile")
webnotes.reload_doc("core", "doctype", "profile")
+ webnotes.conn.sql("""delete from `tabDefaultValue` where defkey='theme'""")
+ webnotes.delete_doc("Page", "profile-settings")
+ return
for name in webnotes.conn.sql("""select name from tabProfile"""):
theme = webnotes.conn.get_default("theme", name[0])
if theme:
webnotes.conn.set_value("Profile", name[0], "theme", theme)
- webnotes.conn.sql("""delete from `tabDefaultValue` where defkey='theme'""")
- webnotes.delete_doc("Page", "profile-settings")
\ No newline at end of file
diff --git a/patches/november_2012/delete_item_sales_register1.py b/patches/november_2012/delete_item_sales_register1.py
deleted file mode 100644
index 9a17fd5..0000000
--- a/patches/november_2012/delete_item_sales_register1.py
+++ /dev/null
@@ -1,3 +0,0 @@
-def execute():
- from webnotes.model import delete_doc
- delete_doc("Search Criteria", "itemwise_sales_register1")
\ No newline at end of file
diff --git a/patches/november_2012/remove_old_unbilled_items_report.py b/patches/november_2012/remove_old_unbilled_items_report.py
deleted file mode 100644
index 36aa7db..0000000
--- a/patches/november_2012/remove_old_unbilled_items_report.py
+++ /dev/null
@@ -1,7 +0,0 @@
-import webnotes
-
-def execute():
- webnotes.delete_doc("Search Criteria", "delivery_note_itemwise_pending_to_bill")
-
- from webnotes.modules import reload_doc
- reload_doc("accounts", "report", "delivered_items_to_be_billed")
\ No newline at end of file
diff --git a/patches/november_2012/rename_employee_leave_balance_report.py b/patches/november_2012/rename_employee_leave_balance_report.py
deleted file mode 100644
index 21ce084..0000000
--- a/patches/november_2012/rename_employee_leave_balance_report.py
+++ /dev/null
@@ -1,7 +0,0 @@
-import webnotes
-
-def execute():
- webnotes.conn.sql("""delete from `tabSearch Criteria`
- where name ='employee_leave_balance_report1'""")
- webnotes.conn.sql("""delete from `tabSearch Criteria`
- where name ='employee_leave_balance_report2'""")
\ No newline at end of file
diff --git a/patches/october_2012/remove_old_customer_contact_address.py b/patches/october_2012/remove_old_customer_contact_address.py
deleted file mode 100644
index 1491eda..0000000
--- a/patches/october_2012/remove_old_customer_contact_address.py
+++ /dev/null
@@ -1,8 +0,0 @@
-def execute():
- import webnotes
- webnotes.conn.sql("""delete from `tabSearch Criteria` \
- where name = 'customer_address_contact'""")
-
- webnotes.reload_doc("core", "doctype", "docfield")
- webnotes.reload_doc("core", "doctype", "report")
- webnotes.reload_doc('selling', 'report', 'customer_addresses_and_contacts')
\ No newline at end of file
diff --git a/patches/october_2012/remove_old_trial_bal.py b/patches/october_2012/remove_old_trial_bal.py
deleted file mode 100644
index f301525..0000000
--- a/patches/october_2012/remove_old_trial_bal.py
+++ /dev/null
@@ -1,6 +0,0 @@
-from __future__ import unicode_literals
-from webnotes.model import delete_doc
-
-def execute():
- # remove search criteria
- delete_doc("Search Criteria", "trial_balance")
diff --git a/patches/patch_list.py b/patches/patch_list.py
index 6b88955..69e3fbb 100644
--- a/patches/patch_list.py
+++ b/patches/patch_list.py
@@ -38,19 +38,15 @@
"patches.may_2012.cleanup_property_setter",
"patches.may_2012.rename_prev_doctype",
"patches.may_2012.cleanup_notification_control",
- "patches.may_2012.renamedt_in_custom_search_criteria",
"patches.may_2012.stock_reco_patch",
- "patches.may_2012.reload_reports",
"patches.may_2012.page_role_series_fix",
"patches.may_2012.reload_sales_invoice_pf",
"patches.may_2012.std_pf_readonly",
- "patches.may_2012.reload_so_pending_items",
"patches.may_2012.customize_form_cleanup",
"patches.may_2012.cs_server_readonly",
"patches.may_2012.clear_session_cache",
"patches.may_2012.same_purchase_rate_patch",
"patches.may_2012.create_report_manager_role",
- "patches.may_2012.reload_customer_address_contact",
"patches.may_2012.profile_perm_patch",
"patches.may_2012.remove_euro_currency",
"patches.may_2012.remove_communication_log",
@@ -81,7 +77,6 @@
"patches.august_2012.task_allocated_to_assigned",
"patches.august_2012.change_profile_permission",
"patches.august_2012.repost_billed_amt",
- "patches.august_2012.remove_cash_flow_statement",
"patches.september_2012.stock_report_permissions_for_accounts",
"patches.september_2012.communication_delete_permission",
"patches.september_2012.all_permissions_patch",
@@ -96,20 +91,15 @@
"patches.october_2012.update_permission",
"patches.october_2012.reload_gl_mapper",
"patches.october_2012.fix_wrong_vouchers",
- "patches.october_2012.remove_old_customer_contact_address",
"patches.october_2012.company_fiscal_year_docstatus_patch",
"patches.october_2012.update_account_property",
- "patches.october_2012.remove_old_trial_bal",
"patches.october_2012.fix_cancelled_gl_entries",
"patches.october_2012.custom_script_delete_permission",
"patches.november_2012.custom_field_insert_after",
- "patches.november_2012.delete_item_sales_register1",
- "patches.november_2012.rename_employee_leave_balance_report",
"patches.november_2012.report_permissions",
"patches.november_2012.customer_issue_allocated_to_assigned",
"patches.november_2012.reset_appraisal_permissions",
"patches.november_2012.disable_cancelled_profiles",
- "patches.november_2012.remove_old_unbilled_items_report",
"patches.november_2012.support_ticket_response_to_communication",
"patches.november_2012.cancelled_bom_patch",
"patches.november_2012.communication_sender_and_recipient",
@@ -123,7 +113,6 @@
"patches.december_2012.expense_leave_reload",
"patches.december_2012.repost_ordered_qty",
"patches.december_2012.repost_projected_qty",
- "patches.december_2012.reload_debtors_creditors_ledger",
"patches.december_2012.website_cache_refactor",
"patches.december_2012.production_cleanup",
"patches.december_2012.fix_default_print_format",
@@ -138,8 +127,6 @@
"patches.december_2012.remove_project_mapper",
"patches.december_2012.update_print_width",
"patches.january_2013.remove_bad_permissions",
- "patches.january_2013.deprecate_stock_search_criteria",
- "patches.january_2013.remove_support_search_criteria",
"patches.january_2013.holiday_list_patch",
"patches.january_2013.stock_reconciliation_patch",
"patches.january_2013.report_permission",
@@ -163,7 +150,6 @@
"patches.february_2013.remove_gl_mapper",
"patches.february_2013.reload_bom_replace_tool_permission",
"patches.february_2013.payment_reconciliation_reset_values",
- "patches.february_2013.remove_sales_order_pending_items",
"patches.february_2013.account_negative_balance",
"patches.february_2013.remove_account_utils_folder",
"patches.february_2013.update_company_in_leave_application",
@@ -187,14 +173,11 @@
"execute:webnotes.delete_doc('DocType', 'Service Quotation Detail')",
"patches.february_2013.p06_material_request_mappers",
"execute:webnotes.delete_doc('Page', 'Query Report')",
- "execute:webnotes.delete_doc('Search Criteria', 'employeewise_balance_leave_report')",
- "execute:webnotes.delete_doc('Search Criteria', 'employee_leave_balance_report')",
"patches.february_2013.repost_reserved_qty",
"execute:webnotes.reload_doc('core', 'doctype', 'report') # 2013-02-25",
"execute:webnotes.conn.sql(\"update `tabReport` set report_type=if(ifnull(query, '')='', 'Report Builder', 'Query Report') where is_standard='No'\")",
"execute:webnotes.conn.sql(\"update `tabReport` set report_name=name where ifnull(report_name,'')='' and is_standard='No'\")",
"patches.february_2013.p08_todo_query_report",
- "execute:webnotes.delete_doc('Search Criteria', 'gross_profit') # 2013-02-26",
'execute:webnotes.reload_doc("accounts", "Print Format", "Sales Invoice Classic") # 2013-02-26',
'execute:webnotes.reload_doc("accounts", "Print Format", "Sales Invoice Modern") # 2013-02-26',
'execute:webnotes.reload_doc("accounts", "Print Format", "Sales Invoice Spartan") # 2013-02-26',
@@ -208,7 +191,6 @@
"execute:webnotes.delete_doc('DocType', 'Attendance Control Panel')",
"patches.march_2013.p02_get_global_default",
"patches.march_2013.p03_rename_blog_to_blog_post",
- "execute:webnotes.reload_doc('hr', 'search_criteria', 'monthly_attendance_details')",
"patches.march_2013.p04_pos_update_stock_check",
"patches.march_2013.p05_payment_reconciliation",
"patches.march_2013.p06_remove_sales_purchase_return_tool",
@@ -234,25 +216,30 @@
'execute:webnotes.reload_doc("selling", "Print Format", "Quotation Modern") # 2013-04-02',
'execute:webnotes.reload_doc("selling", "Print Format", "Quotation Spartan") # 2013-04-02',
"patches.april_2013.p04_reverse_modules_list",
- "execute:webnotes.delete_doc('Search Criteria', 'time_log_summary')",
"patches.april_2013.p04_update_role_in_pages",
"patches.april_2013.p05_update_file_data",
"patches.april_2013.p06_update_file_size",
"patches.april_2013.p05_fixes_in_reverse_modules",
"execute:webnotes.delete_doc('DocType Mapper', 'Delivery Note-Packing Slip')",
- "execute:webnotes.reload_doc('Stock', 'DocType', 'Delivery Note Item')",
+ "patches.april_2013.p07_rename_cost_center_other_charges",
"patches.april_2013.p06_default_cost_center",
"execute:webnotes.reset_perms('File Data')",
"patches.april_2013.p07_update_file_data_2",
"patches.april_2013.rebuild_sales_browser",
"patches.april_2013.p08_price_list_country",
+ "patches.may_2013.p01_selling_net_total_export",
"patches.may_2013.repost_stock_for_no_posting_time",
"patches.may_2013.p01_conversion_factor_and_aii",
"patches.may_2013.p02_update_valuation_rate",
"patches.may_2013.p03_update_support_ticket",
"patches.may_2013.p04_reorder_level",
"patches.may_2013.p05_update_cancelled_gl_entries",
+ "patches.may_2013.p06_make_notes",
+ "patches.may_2013.p06_update_billed_amt_po_pr",
+ "patches.may_2013.p07_move_update_stock_to_pos",
+ "patches.may_2013.p08_change_item_wise_tax",
"patches.june_2013.p01_update_bom_exploded_items",
+ "patches.june_2013.p02_update_project_completed",
"execute:webnotes.delete_doc('DocType', 'System Console')",
"patches.june_2013.p04_fix_event_for_lead_oppty_project",
]
\ No newline at end of file
diff --git a/patches/september_2012/deprecate_account_balance.py b/patches/september_2012/deprecate_account_balance.py
index 6626602..b8c454d 100644
--- a/patches/september_2012/deprecate_account_balance.py
+++ b/patches/september_2012/deprecate_account_balance.py
@@ -7,7 +7,4 @@
for dt in ["Period", "Account Balance", "Multi Ledger Report",
"Multi Ledger Report Detail", "Period Control", "Reposting Tool",
"Lease Agreement", "Lease Installment"]:
- delete_doc("DocType", dt)
-
- # remove search criteria
- delete_doc("Search Criteria", "Trial Balance")
+ delete_doc("DocType", dt)
\ No newline at end of file
diff --git a/projects/doctype/activity_type/README.md b/projects/doctype/activity_type/README.md
new file mode 100644
index 0000000..4b61e5c
--- /dev/null
+++ b/projects/doctype/activity_type/README.md
@@ -0,0 +1 @@
+Type of Activity (set in Task, Time Log)
\ No newline at end of file
diff --git a/projects/doctype/project/README.md b/projects/doctype/project/README.md
new file mode 100644
index 0000000..b1da6ad
--- /dev/null
+++ b/projects/doctype/project/README.md
@@ -0,0 +1 @@
+Project details. Projects can be internal or external and can have Tasks, Milestones associated to it.
\ No newline at end of file
diff --git a/projects/doctype/project/project.js b/projects/doctype/project/project.js
index d4a034f..a6f32cb 100644
--- a/projects/doctype/project/project.js
+++ b/projects/doctype/project/project.js
@@ -15,20 +15,16 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>.
// show tasks
-wn.require("public/app/js/gantt_task.js");
-
cur_frm.cscript.refresh = function(doc) {
if(!doc.__islocal) {
- // refresh gantt chart
- wn.require('app/projects/gantt_task.js');
- if(!cur_frm.gantt_area)
- cur_frm.gantt_area = $('<div>')
- .appendTo(cur_frm.fields_dict.project_tasks.wrapper);
- cur_frm.gantt_area.empty();
- erpnext.show_task_gantt(cur_frm.gantt_area, cur_frm.docname);
- } else {
- if(cur_frm.gantt_area)
- cur_frm.gantt_area.empty();
+ cur_frm.add_custom_button("Gantt Chart", function() {
+ wn.route_options = {"project": doc.name}
+ wn.set_route("Gantt", "Task");
+ }, "icon-tasks");
+ cur_frm.add_custom_button("Tasks", function() {
+ wn.route_options = {"project": doc.name}
+ wn.set_route("List", "Task");
+ }, "icon-list");
}
}
diff --git a/projects/doctype/project/project.py b/projects/doctype/project/project.py
index 94b6787..62714b8 100644
--- a/projects/doctype/project/project.py
+++ b/projects/doctype/project/project.py
@@ -25,29 +25,6 @@
self.doc = doc
self.doclist = doclist
- # Get Customer Details along with its primary contact details
- # ==============================================================
- def get_customer_details(self):
- details =webnotes.conn.sql("select address, territory, customer_group,customer_name from `tabCustomer` where name=%s and docstatus!=2",(self.doc.customer),as_dict=1)
- if details:
- ret = {
- 'customer_address' : details and details[0]['address'] or '',
- 'territory' : details and details[0]['territory'] or '',
- 'customer_group' : details and details[0]['customer_group'] or '',
- 'customer_name' : details and details[0]['customer_name'] or ''
- }
- #get primary contact details(this is done separately coz. , if join query used & no primary contact thn it would not be able to fetch customer details)
- contact_det = webnotes.conn.sql("select contact_name, phone, email_id from `tabContact` where customer_name='%s' and is_customer=1 and is_primary_contact=1 and docstatus!=2" %(self.doc.customer), as_dict = 1)
- ret['contact_person'] = contact_det and contact_det[0]['contact_name'] or ''
- ret['contact_no'] = contact_det and contact_det[0]['phone'] or ''
- ret['email_id'] = contact_det and contact_det[0]['email_id'] or ''
- return ret
- else:
- msgprint("Customer : %s does not exist in system." % (self.doc.customer))
- raise Exception
-
- #calculate gross profit
- #=============================================
def get_gross_profit(self):
pft, per_pft =0, 0
pft = flt(self.doc.project_value) - flt(self.doc.est_material_cost)
@@ -56,9 +33,8 @@
ret = {'gross_margin_value': pft, 'per_gross_margin': per_pft}
return ret
- # validate
- #================================================
def validate(self):
+ """validate start date before end date"""
if self.doc.project_start_date and self.doc.completion_date:
if getdate(self.doc.completion_date) < getdate(self.doc.project_start_date):
msgprint("Expected Completion Date can not be less than Project Start Date")
@@ -66,6 +42,15 @@
def on_update(self):
self.add_calendar_event()
+
+ def update_percent_complete(self):
+ total = webnotes.conn.sql("""select count(*) from tabTask where project=%s""",
+ self.doc.name)[0][0]
+ if total:
+ completed = webnotes.conn.sql("""select count(*) from tabTask where
+ project=%s and status in ('Closed', 'Cancelled')""", self.doc.name)[0][0]
+ webnotes.conn.set_value("Project", self.doc.name, "percent_complete",
+ int(float(completed) / total * 100))
def add_calendar_event(self):
# delete any earlier event for this project
@@ -91,4 +76,4 @@
def delete_events(self):
webnotes.delete_doc("Event", webnotes.conn.sql_list("""select name from `tabEvent`
- where ref_type=%s and ref_name=%s""", (self.doc.doctype, self.doc.name)))
\ No newline at end of file
+ where ref_type=%s and ref_name=%s""", (self.doc.doctype, self.doc.name)))
diff --git a/projects/doctype/project/project.txt b/projects/doctype/project/project.txt
index 326a47a..88dfb97 100644
--- a/projects/doctype/project/project.txt
+++ b/projects/doctype/project/project.txt
@@ -1,8 +1,8 @@
[
{
- "creation": "2013-01-29 19:25:50",
+ "creation": "2013-03-07 11:55:07",
"docstatus": 0,
- "modified": "2013-02-22 11:06:22",
+ "modified": "2013-06-07 12:38:37",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -25,13 +25,15 @@
"permlevel": 0
},
{
+ "amend": 0,
"doctype": "DocPerm",
"name": "__common__",
"parent": "Project",
"parentfield": "permissions",
"parenttype": "DocType",
"read": 1,
- "role": "Projects User"
+ "report": 1,
+ "submit": 0
},
{
"doctype": "DocType",
@@ -159,19 +161,6 @@
"search_index": 0
},
{
- "description": "Tasks belonging to this Project.",
- "doctype": "DocField",
- "fieldname": "sb_tasks",
- "fieldtype": "Section Break",
- "label": "Tasks"
- },
- {
- "doctype": "DocField",
- "fieldname": "project_tasks",
- "fieldtype": "HTML",
- "label": "Project Tasks"
- },
- {
"doctype": "DocField",
"fieldname": "section_break0",
"fieldtype": "Section Break",
@@ -191,6 +180,14 @@
},
{
"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",
@@ -283,38 +280,18 @@
"search_index": 1
},
{
- "doctype": "DocField",
- "fieldname": "trash_reason",
- "fieldtype": "Small Text",
- "hidden": 1,
- "label": "Trash Reason",
- "no_copy": 0,
- "oldfieldname": "trash_reason",
- "oldfieldtype": "Small Text",
- "print_hide": 1,
- "search_index": 0
- },
- {
- "doctype": "DocField",
- "fieldname": "file_list",
- "fieldtype": "Small Text",
- "hidden": 1,
- "label": "File List",
- "no_copy": 1,
- "print_hide": 1,
- "search_index": 0
- },
- {
"cancel": 1,
"create": 1,
"doctype": "DocPerm",
"permlevel": 0,
- "report": 1,
- "submit": 0,
+ "role": "Projects User",
"write": 1
},
{
+ "cancel": 0,
+ "create": 0,
"doctype": "DocPerm",
- "permlevel": 1
+ "permlevel": 1,
+ "role": "All"
}
]
\ No newline at end of file
diff --git a/projects/doctype/project_activity/locale/_messages_doc.json b/projects/doctype/project_activity/locale/_messages_doc.json
deleted file mode 100644
index f1d2810..0000000
--- a/projects/doctype/project_activity/locale/_messages_doc.json
+++ /dev/null
@@ -1,14 +0,0 @@
-[
- "Percent Complete",
- "New Update",
- "Add",
- "Updates HTML",
- "Activity Name",
- "Hours",
- "Updates",
- "Last Update By",
- "Projects",
- "Last Update",
- "Project Activity",
- "Project"
-]
\ No newline at end of file
diff --git a/projects/doctype/project_activity/locale/ar-doc.json b/projects/doctype/project_activity/locale/ar-doc.json
deleted file mode 100644
index 8a2c351..0000000
--- a/projects/doctype/project_activity/locale/ar-doc.json
+++ /dev/null
@@ -1,35 +0,0 @@
-{
- "0": "0",
- "10": "10",
- "100": "100",
- "15": "15",
- "20": "20",
- "25": "25",
- "30": "30",
- "35": "35",
- "40": "40",
- "45": "45",
- "5": "5",
- "50": "50",
- "55": "55",
- "60": "60",
- "65": "65",
- "70": "70",
- "75": "75",
- "80": "80",
- "85": "85",
- "90": "90",
- "95": "95",
- "Activity Name": "\u0627\u0633\u0645 \u0627\u0644\u0646\u0634\u0627\u0637",
- "Add": "\u0625\u0636\u0627\u0641\u0629",
- "Hours": "\u0633\u0627\u0639\u0627\u062a",
- "Last Update": "\u0622\u062e\u0631 \u062a\u062d\u062f\u064a\u062b",
- "Last Update By": "\u0622\u062e\u0631 \u062a\u062d\u062f\u064a\u062b \u0628\u0648\u0627\u0633\u0637\u0629",
- "New Update": "\u062a\u062d\u062f\u064a\u062b\u0627\u062a \u062c\u062f\u064a\u062f\u0629",
- "Percent Complete": "\u0643\u0627\u0645\u0644\u0629 \u0641\u064a \u0627\u0644\u0645\u0626\u0629",
- "Project": "\u0645\u0634\u0631\u0648\u0639",
- "Project Activity": "\u0645\u0634\u0631\u0648\u0639 \u0646\u0634\u0627\u0637",
- "Projects": "\u0645\u0634\u0627\u0631\u064a\u0639",
- "Updates": "\u062a\u062d\u062f\u064a\u062b\u0627\u062a",
- "Updates HTML": "\u062a\u062d\u062f\u064a\u062b\u0627\u062a HTML"
-}
\ No newline at end of file
diff --git a/projects/doctype/project_activity/locale/de-doc.json b/projects/doctype/project_activity/locale/de-doc.json
deleted file mode 100644
index f436f5a..0000000
--- a/projects/doctype/project_activity/locale/de-doc.json
+++ /dev/null
@@ -1,14 +0,0 @@
-{
- "Activity Name": "Aktivit\u00e4t Name",
- "Add": "Hinzuf\u00fcgen",
- "Hours": "Stunden",
- "Last Update": "Letztes Update",
- "Last Update By": "Letzte Aktualisierung durch",
- "New Update": "Neues Update",
- "Percent Complete": "Percent Complete",
- "Project": "Projekt",
- "Project Activity": "Projekt Activity",
- "Projects": "Projekte",
- "Updates": "Updates",
- "Updates HTML": "Updates HTML"
-}
\ No newline at end of file
diff --git a/projects/doctype/project_activity/locale/es-doc.json b/projects/doctype/project_activity/locale/es-doc.json
deleted file mode 100644
index e735bb6..0000000
--- a/projects/doctype/project_activity/locale/es-doc.json
+++ /dev/null
@@ -1,35 +0,0 @@
-{
- "0": "0",
- "10": "10",
- "100": "100",
- "15": "15",
- "20": "20",
- "25": "25",
- "30": "30",
- "35": "35",
- "40": "40",
- "45": "45",
- "5": "5",
- "50": "50",
- "55": "55",
- "60": "60",
- "65": "65",
- "70": "70",
- "75": "75",
- "80": "80",
- "85": "85",
- "90": "90",
- "95": "95",
- "Activity Name": "Nombre de la actividad",
- "Add": "A\u00f1adir",
- "Hours": "Horas",
- "Last Update": "\u00daltima actualizaci\u00f3n",
- "Last Update By": "Ultima actualizaci\u00f3n por",
- "New Update": "Nueva Actualizaci\u00f3n",
- "Percent Complete": "Porcentaje completado",
- "Project": "Proyecto",
- "Project Activity": "Actividad del Proyecto",
- "Projects": "Proyectos",
- "Updates": "Actualizaciones",
- "Updates HTML": "Actualizaciones HTML"
-}
\ No newline at end of file
diff --git a/projects/doctype/project_activity/locale/fr-doc.json b/projects/doctype/project_activity/locale/fr-doc.json
deleted file mode 100644
index c0336ef..0000000
--- a/projects/doctype/project_activity/locale/fr-doc.json
+++ /dev/null
@@ -1,35 +0,0 @@
-{
- "0": "0",
- "10": "10",
- "100": "100",
- "15": "15",
- "20": "20",
- "25": "25",
- "30": "30",
- "35": "35",
- "40": "40",
- "45": "45",
- "5": "5",
- "50": "50",
- "55": "55",
- "60": "60",
- "65": "65",
- "70": "70",
- "75": "75",
- "80": "80",
- "85": "85",
- "90": "90",
- "95": "95",
- "Activity Name": "Nom de l'activit\u00e9",
- "Add": "Ajouter",
- "Hours": "Heures",
- "Last Update": "Derni\u00e8re mise \u00e0 jour",
- "Last Update By": "Derni\u00e8re mise \u00e0 jour par",
- "New Update": "Nouvelle mise \u00e0 jour",
- "Percent Complete": "Pour cent complet",
- "Project": "Projet",
- "Project Activity": "Activit\u00e9 du projet",
- "Projects": "Projets",
- "Updates": "Mises \u00e0 jour",
- "Updates HTML": "Mises \u00e0 jour HTML"
-}
\ No newline at end of file
diff --git a/projects/doctype/project_activity/locale/hi-doc.json b/projects/doctype/project_activity/locale/hi-doc.json
deleted file mode 100644
index c8c6be6..0000000
--- a/projects/doctype/project_activity/locale/hi-doc.json
+++ /dev/null
@@ -1,35 +0,0 @@
-{
- "0": "0",
- "10": "10",
- "100": "100",
- "15": "15",
- "20": "20",
- "25": "25",
- "30": "30",
- "35": "35",
- "40": "40",
- "45": "45",
- "5": "5",
- "50": "50",
- "55": "55",
- "60": "60",
- "65": "65",
- "70": "70",
- "75": "75",
- "80": "80",
- "85": "85",
- "90": "90",
- "95": "95",
- "Activity Name": "\u0917\u0924\u093f\u0935\u093f\u0927\u093f \u0928\u093e\u092e",
- "Add": "\u091c\u094b\u0921\u093c\u0928\u093e",
- "Hours": "\u0918\u0902\u091f\u0947",
- "Last Update": "\u0905\u0902\u0924\u093f\u092e \u0905\u0926\u094d\u092f\u0924\u0928",
- "Last Update By": "\u0926\u094d\u0935\u093e\u0930\u093e \u0905\u0902\u0924\u093f\u092e \u0905\u0926\u094d\u092f\u0924\u0928",
- "New Update": "\u0928\u0908 \u0905\u0926\u094d\u092f\u0924\u0928",
- "Percent Complete": "\u092a\u0942\u0930\u093e \u092a\u094d\u0930\u0924\u093f\u0936\u0924",
- "Project": "\u092a\u0930\u093f\u092f\u094b\u091c\u0928\u093e",
- "Project Activity": "\u092a\u0930\u093f\u092f\u094b\u091c\u0928\u093e \u0917\u0924\u093f\u0935\u093f\u0927\u093f",
- "Projects": "\u092a\u0930\u093f\u092f\u094b\u091c\u0928\u093e\u0913\u0902",
- "Updates": "\u0905\u092a\u0921\u0947\u091f",
- "Updates HTML": "\u0905\u0926\u094d\u092f\u0924\u0928 HTML"
-}
\ No newline at end of file
diff --git a/projects/doctype/project_activity/locale/hr-doc.json b/projects/doctype/project_activity/locale/hr-doc.json
deleted file mode 100644
index c559486..0000000
--- a/projects/doctype/project_activity/locale/hr-doc.json
+++ /dev/null
@@ -1,35 +0,0 @@
-{
- "0": "0",
- "10": "10",
- "100": "100",
- "15": "15",
- "20": "20",
- "25": "25",
- "30": "30",
- "35": "35",
- "40": "40",
- "45": "45",
- "5": "5",
- "50": "50",
- "55": "55",
- "60": "60",
- "65": "65",
- "70": "70",
- "75": "75",
- "80": "80",
- "85": "85",
- "90": "90",
- "95": "95",
- "Activity Name": "Djelatnost Naziv",
- "Add": "Dodati",
- "Hours": "Sati",
- "Last Update": "Zadnja promjena",
- "Last Update By": "Zadnji Update",
- "New Update": "Novi Update",
- "Percent Complete": "Postotak Cijela",
- "Project": "Projekt",
- "Project Activity": "Projekt aktivnost",
- "Projects": "Projekti",
- "Updates": "A\u017euriranja",
- "Updates HTML": "A\u017euriranja HTML"
-}
\ No newline at end of file
diff --git a/projects/doctype/project_activity/locale/nl-doc.json b/projects/doctype/project_activity/locale/nl-doc.json
deleted file mode 100644
index 9b40947..0000000
--- a/projects/doctype/project_activity/locale/nl-doc.json
+++ /dev/null
@@ -1,35 +0,0 @@
-{
- "0": "0",
- "10": "10",
- "100": "100",
- "15": "15",
- "20": "20",
- "25": "25",
- "30": "30",
- "35": "35",
- "40": "40",
- "45": "45",
- "5": "5",
- "50": "50",
- "55": "55",
- "60": "60",
- "65": "65",
- "70": "70",
- "75": "75",
- "80": "80",
- "85": "85",
- "90": "90",
- "95": "95",
- "Activity Name": "Activiteit Naam",
- "Add": "Toevoegen",
- "Hours": "Uur",
- "Last Update": "Laatste update",
- "Last Update By": "Laatste update door",
- "New Update": "Nieuwe Update",
- "Percent Complete": "Percentage voltooid",
- "Project": "Project",
- "Project Activity": "Project Activiteit",
- "Projects": "Projecten",
- "Updates": "Updates",
- "Updates HTML": "Updates HTML"
-}
\ No newline at end of file
diff --git a/projects/doctype/project_activity/locale/pt-BR-doc.json b/projects/doctype/project_activity/locale/pt-BR-doc.json
deleted file mode 100644
index 5e087ec..0000000
--- a/projects/doctype/project_activity/locale/pt-BR-doc.json
+++ /dev/null
@@ -1,14 +0,0 @@
-{
- "Activity Name": "Nome da Atividade",
- "Add": "Adicionar",
- "Hours": "Horas",
- "Last Update": "\u00daltima Atualiza\u00e7\u00e3o",
- "Last Update By": "\u00daltima Atualiza\u00e7\u00e3o por",
- "New Update": "Nova Atualiza\u00e7\u00e3o",
- "Percent Complete": "Porcentagem Conclu\u00edda",
- "Project": "Projeto",
- "Project Activity": "Atividade do Projeto",
- "Projects": "Projetos",
- "Updates": "Atualiza\u00e7\u00f5es",
- "Updates HTML": "Atualiza\u00e7\u00f5es HTML"
-}
\ No newline at end of file
diff --git a/projects/doctype/project_activity/locale/pt-doc.json b/projects/doctype/project_activity/locale/pt-doc.json
deleted file mode 100644
index 43c7c51..0000000
--- a/projects/doctype/project_activity/locale/pt-doc.json
+++ /dev/null
@@ -1,35 +0,0 @@
-{
- "0": "0",
- "10": "10",
- "100": "100",
- "15": "15",
- "20": "20",
- "25": "25",
- "30": "30",
- "35": "35",
- "40": "40",
- "45": "45",
- "5": "5",
- "50": "50",
- "55": "55",
- "60": "60",
- "65": "65",
- "70": "70",
- "75": "75",
- "80": "80",
- "85": "85",
- "90": "90",
- "95": "95",
- "Activity Name": "Nome atividade",
- "Add": "Adicionar",
- "Hours": "Horas",
- "Last Update": "Atualiza\u00e7\u00e3o",
- "Last Update By": "\u00daltima atualiza\u00e7\u00e3o por",
- "New Update": "Nova Atualiza\u00e7\u00e3o",
- "Percent Complete": "Porcentagem Conclu\u00edda",
- "Project": "Projeto",
- "Project Activity": "Projeto Atividade",
- "Projects": "Projetos",
- "Updates": "Atualiza\u00e7\u00f5es",
- "Updates HTML": "Atualiza\u00e7\u00f5es HTML"
-}
\ No newline at end of file
diff --git a/projects/doctype/project_activity/locale/sr-doc.json b/projects/doctype/project_activity/locale/sr-doc.json
deleted file mode 100644
index 8b7c121..0000000
--- a/projects/doctype/project_activity/locale/sr-doc.json
+++ /dev/null
@@ -1,35 +0,0 @@
-{
- "0": "0",
- "10": "10",
- "100": "100",
- "15": "15",
- "20": "20",
- "25": "25",
- "30": "30",
- "35": "35",
- "40": "40",
- "45": "45",
- "5": "5",
- "50": "50",
- "55": "55",
- "60": "60",
- "65": "65",
- "70": "70",
- "75": "75",
- "80": "80",
- "85": "85",
- "90": "90",
- "95": "95",
- "Activity Name": "\u0410\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442 \u0418\u043c\u0435",
- "Add": "\u0414\u043e\u0434\u0430\u0442\u0438",
- "Hours": "\u0420\u0430\u0434\u043d\u043e \u0432\u0440\u0435\u043c\u0435",
- "Last Update": "\u041f\u043e\u0441\u043b\u0435\u0434\u045a\u0430 \u0438\u0437\u043c\u0435\u043d\u0430",
- "Last Update By": "\u041f\u043e\u0441\u043b\u0435\u0434\u045a\u0438 \u0423\u043f\u0434\u0430\u0442\u0435 \u0411\u0438",
- "New Update": "\u041d\u043e\u0432\u0438 \u0423\u043f\u0434\u0430\u0442\u0435",
- "Percent Complete": "\u041f\u0440\u043e\u0446\u0435\u043d\u0430\u0442 \u041a\u043e\u043c\u043f\u043b\u0435\u0442\u043d\u0430",
- "Project": "\u041f\u0440\u043e\u0458\u0435\u043a\u0430\u0442",
- "Project Activity": "\u041f\u0440\u043e\u0458\u0435\u043a\u0430\u0442 \u0410\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442",
- "Projects": "\u041f\u0440\u043e\u0458\u0435\u043a\u0442\u0438",
- "Updates": "\u0410\u0436\u0443\u0440\u0438\u0440\u0430\u045a\u0435",
- "Updates HTML": "\u0410\u0436\u0443\u0440\u0438\u0440\u0430\u045a\u0435 \u0425\u0422\u041c\u041b"
-}
\ No newline at end of file
diff --git a/projects/doctype/project_activity/locale/ta-doc.json b/projects/doctype/project_activity/locale/ta-doc.json
deleted file mode 100644
index 831c1df..0000000
--- a/projects/doctype/project_activity/locale/ta-doc.json
+++ /dev/null
@@ -1,35 +0,0 @@
-{
- "0": "0",
- "10": "10",
- "100": "100",
- "15": "15",
- "20": "20",
- "25": "25",
- "30": "30",
- "35": "35",
- "40": "40",
- "45": "45",
- "5": "5",
- "50": "50",
- "55": "55",
- "60": "60",
- "65": "65",
- "70": "70",
- "75": "75",
- "80": "80",
- "85": "85",
- "90": "90",
- "95": "95",
- "Activity Name": "\u0ba8\u0b9f\u0bb5\u0b9f\u0bbf\u0b95\u0bcd\u0b95\u0bc8 \u0baa\u0bc6\u0baf\u0bb0\u0bcd",
- "Add": "\u0b9a\u0bc7\u0bb0\u0bcd",
- "Hours": "\u0bae\u0ba3\u0bbf",
- "Last Update": "\u0b95\u0b9f\u0bc8\u0b9a\u0bbf\u0baf\u0bbe\u0b95 \u0baa\u0bc1\u0ba4\u0bc1\u0baa\u0bcd\u0baa\u0bbf\u0b95\u0bcd\u0b95\u0baa\u0bcd\u0baa\u0b9f\u0bcd\u0b9f\u0ba4\u0bc1",
- "Last Update By": "By \u0b95\u0b9f\u0bc8\u0b9a\u0bbf\u0baf\u0bbe\u0b95 \u0baa\u0bc1\u0ba4\u0bc1\u0baa\u0bcd\u0baa\u0bbf\u0b95\u0bcd\u0b95\u0baa\u0bcd\u0baa\u0b9f\u0bcd\u0b9f\u0ba4\u0bc1",
- "New Update": "\u0baa\u0bc1\u0ba4\u0bbf\u0baf \u0bae\u0bc7\u0bae\u0bcd\u0baa\u0b9f\u0bc1\u0ba4\u0bcd\u0ba4\u0bb2\u0bcd",
- "Percent Complete": "\u0bae\u0bc1\u0bb4\u0bc1\u0bae\u0bc8\u0baf\u0bbe\u0ba9 \u0b9a\u0ba4\u0bb5\u0bc0\u0ba4\u0bae\u0bcd",
- "Project": "\u0ba4\u0bbf\u0b9f\u0bcd\u0b9f\u0bae\u0bcd",
- "Project Activity": "\u0ba4\u0bbf\u0b9f\u0bcd\u0b9f \u0b9a\u0bc6\u0baf\u0bb2\u0bcd\u0baa\u0bbe\u0b9f\u0bc1",
- "Projects": "\u0ba4\u0bbf\u0b9f\u0bcd\u0b9f\u0b99\u0bcd\u0b95\u0bb3\u0bcd",
- "Updates": "\u0bae\u0bc7\u0bae\u0bcd\u0baa\u0b9f\u0bc1\u0ba4\u0bcd\u0ba4\u0bb2\u0bcd\u0b95\u0bb3\u0bcd",
- "Updates HTML": "\u0bae\u0bc7\u0bae\u0bcd\u0baa\u0b9f\u0bc1\u0ba4\u0bcd\u0ba4\u0bb2\u0bcd\u0b95\u0bb3\u0bcd HTML"
-}
\ No newline at end of file
diff --git a/projects/doctype/project_activity/locale/th-doc.json b/projects/doctype/project_activity/locale/th-doc.json
deleted file mode 100644
index 7df17c6..0000000
--- a/projects/doctype/project_activity/locale/th-doc.json
+++ /dev/null
@@ -1,35 +0,0 @@
-{
- "0": "0",
- "10": "10",
- "100": "100",
- "15": "15",
- "20": "20",
- "25": "25",
- "30": "30",
- "35": "35",
- "40": "40",
- "45": "45",
- "5": "5",
- "50": "50",
- "55": "55",
- "60": "60",
- "65": "65",
- "70": "70",
- "75": "75",
- "80": "80",
- "85": "85",
- "90": "90",
- "95": "95",
- "Activity Name": "\u0e0a\u0e37\u0e48\u0e2d\u0e01\u0e34\u0e08\u0e01\u0e23\u0e23\u0e21",
- "Add": "\u0e40\u0e1e\u0e34\u0e48\u0e21",
- "Hours": "\u0e0a\u0e31\u0e48\u0e27\u0e42\u0e21\u0e07",
- "Last Update": "\u0e1b\u0e23\u0e31\u0e1a\u0e1b\u0e23\u0e38\u0e07\u0e02\u0e49\u0e2d\u0e21\u0e39\u0e25\u0e25\u0e48\u0e32\u0e2a\u0e38\u0e14",
- "Last Update By": "\u0e1b\u0e23\u0e31\u0e1a\u0e1b\u0e23\u0e38\u0e07\u0e25\u0e48\u0e32\u0e2a\u0e38\u0e14\u0e42\u0e14\u0e22",
- "New Update": "\u0e1b\u0e23\u0e31\u0e1a\u0e1b\u0e23\u0e38\u0e07\u0e43\u0e2b\u0e21\u0e48",
- "Percent Complete": "\u0e23\u0e49\u0e2d\u0e22\u0e25\u0e30\u0e2a\u0e21\u0e1a\u0e39\u0e23\u0e13\u0e4c",
- "Project": "\u0e42\u0e04\u0e23\u0e07\u0e01\u0e32\u0e23",
- "Project Activity": "\u0e01\u0e34\u0e08\u0e01\u0e23\u0e23\u0e21\u0e42\u0e04\u0e23\u0e07\u0e01\u0e32\u0e23",
- "Projects": "\u0e42\u0e04\u0e23\u0e07\u0e01\u0e32\u0e23",
- "Updates": "\u0e01\u0e32\u0e23\u0e1b\u0e23\u0e31\u0e1a\u0e1b\u0e23\u0e38\u0e07",
- "Updates HTML": "HTML \u0e01\u0e32\u0e23\u0e1b\u0e23\u0e31\u0e1a\u0e1b\u0e23\u0e38\u0e07"
-}
\ No newline at end of file
diff --git a/projects/doctype/project_activity_update/locale/_messages_doc.json b/projects/doctype/project_activity_update/locale/_messages_doc.json
deleted file mode 100644
index 1e98c39..0000000
--- a/projects/doctype/project_activity_update/locale/_messages_doc.json
+++ /dev/null
@@ -1,7 +0,0 @@
-[
- "e.g. 0.5, 2.5 etc",
- "Update",
- "Hours",
- "Project Activity Update",
- "Projects"
-]
\ No newline at end of file
diff --git a/projects/doctype/project_activity_update/locale/ar-doc.json b/projects/doctype/project_activity_update/locale/ar-doc.json
deleted file mode 100644
index b600b78..0000000
--- a/projects/doctype/project_activity_update/locale/ar-doc.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "Hours": "\u0633\u0627\u0639\u0627\u062a",
- "Project Activity Update": "\u0645\u0634\u0631\u0648\u0639 \u062a\u062d\u062f\u064a\u062b \u0646\u0634\u0627\u0637",
- "Projects": "\u0645\u0634\u0627\u0631\u064a\u0639",
- "Update": "\u062a\u062d\u062f\u064a\u062b",
- "e.g. 0.5, 2.5 etc": "\u0639\u0644\u0649 \u0633\u0628\u064a\u0644 \u0627\u0644\u0645\u062b\u0627\u0644 0.5\u060c 2.5 \u0627\u0644\u062e"
-}
\ No newline at end of file
diff --git a/projects/doctype/project_activity_update/locale/de-doc.json b/projects/doctype/project_activity_update/locale/de-doc.json
deleted file mode 100644
index a685dec..0000000
--- a/projects/doctype/project_activity_update/locale/de-doc.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "Hours": "Stunden",
- "Project Activity Update": "Projekt Activity aktualisieren",
- "Projects": "Projekte",
- "Update": "Aktualisieren",
- "e.g. 0.5, 2.5 etc": "z.B. 0,5, 2,5 etc."
-}
\ No newline at end of file
diff --git a/projects/doctype/project_activity_update/locale/es-doc.json b/projects/doctype/project_activity_update/locale/es-doc.json
deleted file mode 100644
index 988b49e..0000000
--- a/projects/doctype/project_activity_update/locale/es-doc.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "Hours": "Horas",
- "Project Activity Update": "Actualizaci\u00f3n del Proyecto de Actividad",
- "Projects": "Proyectos",
- "Update": "Actualizar",
- "e.g. 0.5, 2.5 etc": "por ejemplo, 0,5, 2,5, etc"
-}
\ No newline at end of file
diff --git a/projects/doctype/project_activity_update/locale/fr-doc.json b/projects/doctype/project_activity_update/locale/fr-doc.json
deleted file mode 100644
index 26bce04..0000000
--- a/projects/doctype/project_activity_update/locale/fr-doc.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "Hours": "Heures",
- "Project Activity Update": "Mise \u00e0 jour des activit\u00e9s du projet",
- "Projects": "Projets",
- "Update": "Mettre \u00e0 jour",
- "e.g. 0.5, 2.5 etc": "par exemple, 0,5, 2,5, etc"
-}
\ No newline at end of file
diff --git a/projects/doctype/project_activity_update/locale/hi-doc.json b/projects/doctype/project_activity_update/locale/hi-doc.json
deleted file mode 100644
index eefd161..0000000
--- a/projects/doctype/project_activity_update/locale/hi-doc.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "Hours": "\u0918\u0902\u091f\u0947",
- "Project Activity Update": "\u092a\u0930\u093f\u092f\u094b\u091c\u0928\u093e \u0917\u0924\u093f\u0935\u093f\u0927\u093f \u0905\u092a\u0921\u0947\u091f",
- "Projects": "\u092a\u0930\u093f\u092f\u094b\u091c\u0928\u093e\u0913\u0902",
- "Update": "\u0905\u0926\u094d\u092f\u0924\u0928",
- "e.g. 0.5, 2.5 etc": "0.5 \u0909\u0926\u093e\u0939\u0930\u0923 \u0915\u0947 \u0932\u093f\u090f, 2.5 \u0906\u0926\u093f"
-}
\ No newline at end of file
diff --git a/projects/doctype/project_activity_update/locale/hr-doc.json b/projects/doctype/project_activity_update/locale/hr-doc.json
deleted file mode 100644
index 14ec5cf..0000000
--- a/projects/doctype/project_activity_update/locale/hr-doc.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "Hours": "Sati",
- "Project Activity Update": "Projekt Aktivnost Update",
- "Projects": "Projekti",
- "Update": "A\u017eurirati",
- "e.g. 0.5, 2.5 etc": "npr. 0,5, 2,5 itd."
-}
\ No newline at end of file
diff --git a/projects/doctype/project_activity_update/locale/nl-doc.json b/projects/doctype/project_activity_update/locale/nl-doc.json
deleted file mode 100644
index 72c9117..0000000
--- a/projects/doctype/project_activity_update/locale/nl-doc.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "Hours": "Uur",
- "Project Activity Update": "Project Activiteit update",
- "Projects": "Projecten",
- "Update": "Bijwerken",
- "e.g. 0.5, 2.5 etc": "bijvoorbeeld 0,5, 2,5 enz."
-}
\ No newline at end of file
diff --git a/projects/doctype/project_activity_update/locale/pt-BR-doc.json b/projects/doctype/project_activity_update/locale/pt-BR-doc.json
deleted file mode 100644
index 29ee164..0000000
--- a/projects/doctype/project_activity_update/locale/pt-BR-doc.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "Hours": "Horas",
- "Project Activity Update": "Atualiza\u00e7\u00e3o da Atividade do Projeto",
- "Projects": "Projetos",
- "Update": "Atualizar",
- "e.g. 0.5, 2.5 etc": "por exemplo, 0,5, 2,5, etc"
-}
\ No newline at end of file
diff --git a/projects/doctype/project_activity_update/locale/pt-doc.json b/projects/doctype/project_activity_update/locale/pt-doc.json
deleted file mode 100644
index 9dff294..0000000
--- a/projects/doctype/project_activity_update/locale/pt-doc.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "Hours": "Horas",
- "Project Activity Update": "Atualiza\u00e7\u00e3o do Projeto Atividade",
- "Projects": "Projetos",
- "Update": "Atualizar",
- "e.g. 0.5, 2.5 etc": "por exemplo, 0,5, 2,5, etc"
-}
\ No newline at end of file
diff --git a/projects/doctype/project_activity_update/locale/sr-doc.json b/projects/doctype/project_activity_update/locale/sr-doc.json
deleted file mode 100644
index aeeb0dd..0000000
--- a/projects/doctype/project_activity_update/locale/sr-doc.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "Hours": "\u0420\u0430\u0434\u043d\u043e \u0432\u0440\u0435\u043c\u0435",
- "Project Activity Update": "\u041f\u0440\u043e\u0458\u0435\u043a\u0430\u0442 \u0410\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442 \u0430\u0436\u0443\u0440\u0438\u0440\u0430\u045a\u0430",
- "Projects": "\u041f\u0440\u043e\u0458\u0435\u043a\u0442\u0438",
- "Update": "\u0410\u0436\u0443\u0440\u0438\u0440\u0430\u045a\u0435",
- "e.g. 0.5, 2.5 etc": "\u043d\u043f\u0440. 0,5, 2,5, \u0438\u0442\u0434"
-}
\ No newline at end of file
diff --git a/projects/doctype/project_activity_update/locale/ta-doc.json b/projects/doctype/project_activity_update/locale/ta-doc.json
deleted file mode 100644
index 5396a35..0000000
--- a/projects/doctype/project_activity_update/locale/ta-doc.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "Hours": "\u0bae\u0ba3\u0bbf",
- "Project Activity Update": "\u0ba4\u0bbf\u0b9f\u0bcd\u0b9f \u0b9a\u0bc6\u0baf\u0bb2\u0bcd\u0baa\u0bbe\u0b9f\u0bc1 \u0bae\u0bc7\u0bae\u0bcd\u0baa\u0b9f\u0bc1\u0ba4\u0bcd\u0ba4\u0bb2\u0bcd",
- "Projects": "\u0ba4\u0bbf\u0b9f\u0bcd\u0b9f\u0b99\u0bcd\u0b95\u0bb3\u0bcd",
- "Update": "\u0baa\u0bc1\u0ba4\u0bc1\u0baa\u0bcd\u0baa\u0bbf\u0b95\u0bcd\u0b95",
- "e.g. 0.5, 2.5 etc": "\u0b89\u0ba4\u0bbe\u0bb0\u0ba3\u0bae\u0bbe\u0b95 0.5, 2.5 \u0bb9\u0bbf\u0baa\u0bcd\u0bb0\u0bc1"
-}
\ No newline at end of file
diff --git a/projects/doctype/project_activity_update/locale/th-doc.json b/projects/doctype/project_activity_update/locale/th-doc.json
deleted file mode 100644
index 02b72b9..0000000
--- a/projects/doctype/project_activity_update/locale/th-doc.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "Hours": "\u0e0a\u0e31\u0e48\u0e27\u0e42\u0e21\u0e07",
- "Project Activity Update": "\u0e1b\u0e23\u0e31\u0e1a\u0e1b\u0e23\u0e38\u0e07\u0e01\u0e34\u0e08\u0e01\u0e23\u0e23\u0e21\u0e42\u0e04\u0e23\u0e07\u0e01\u0e32\u0e23",
- "Projects": "\u0e42\u0e04\u0e23\u0e07\u0e01\u0e32\u0e23",
- "Update": "\u0e2d\u0e31\u0e1e\u0e40\u0e14\u0e17",
- "e.g. 0.5, 2.5 etc": "\u0e40\u0e0a\u0e48\u0e19 0.5, 2.5 \u0e2f\u0e25\u0e2f"
-}
\ No newline at end of file
diff --git a/projects/doctype/project_control/__init__.py b/projects/doctype/project_control/__init__.py
deleted file mode 100644
index baffc48..0000000
--- a/projects/doctype/project_control/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-from __future__ import unicode_literals
diff --git a/projects/doctype/project_control/locale/_messages_doc.json b/projects/doctype/project_control/locale/_messages_doc.json
deleted file mode 100644
index 3e13741..0000000
--- a/projects/doctype/project_control/locale/_messages_doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-[
- "Projects",
- "Project Control"
-]
\ No newline at end of file
diff --git a/projects/doctype/project_control/locale/ar-doc.json b/projects/doctype/project_control/locale/ar-doc.json
deleted file mode 100644
index deb68c3..0000000
--- a/projects/doctype/project_control/locale/ar-doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "Project Control": "\u0645\u0634\u0631\u0648\u0639 \u0627\u0644\u062a\u062d\u0643\u0645",
- "Projects": "\u0645\u0634\u0627\u0631\u064a\u0639"
-}
\ No newline at end of file
diff --git a/projects/doctype/project_control/locale/de-doc.json b/projects/doctype/project_control/locale/de-doc.json
deleted file mode 100644
index 45a7808..0000000
--- a/projects/doctype/project_control/locale/de-doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "Project Control": "Project Control",
- "Projects": "Projekte"
-}
\ No newline at end of file
diff --git a/projects/doctype/project_control/locale/es-doc.json b/projects/doctype/project_control/locale/es-doc.json
deleted file mode 100644
index 129522f..0000000
--- a/projects/doctype/project_control/locale/es-doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "Project Control": "Proyecto de Control",
- "Projects": "Proyectos"
-}
\ No newline at end of file
diff --git a/projects/doctype/project_control/locale/fr-doc.json b/projects/doctype/project_control/locale/fr-doc.json
deleted file mode 100644
index 4dffe1e..0000000
--- a/projects/doctype/project_control/locale/fr-doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "Project Control": "Contr\u00f4le de projet",
- "Projects": "Projets"
-}
\ No newline at end of file
diff --git a/projects/doctype/project_control/locale/hi-doc.json b/projects/doctype/project_control/locale/hi-doc.json
deleted file mode 100644
index 545aaca..0000000
--- a/projects/doctype/project_control/locale/hi-doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "Project Control": "\u092a\u0930\u093f\u092f\u094b\u091c\u0928\u093e \u0928\u093f\u092f\u0902\u0924\u094d\u0930\u0923",
- "Projects": "\u092a\u0930\u093f\u092f\u094b\u091c\u0928\u093e\u0913\u0902"
-}
\ No newline at end of file
diff --git a/projects/doctype/project_control/locale/hr-doc.json b/projects/doctype/project_control/locale/hr-doc.json
deleted file mode 100644
index 43eb5eb..0000000
--- a/projects/doctype/project_control/locale/hr-doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "Project Control": "Projekt kontrole",
- "Projects": "Projekti"
-}
\ No newline at end of file
diff --git a/projects/doctype/project_control/locale/nl-doc.json b/projects/doctype/project_control/locale/nl-doc.json
deleted file mode 100644
index 4c99374..0000000
--- a/projects/doctype/project_control/locale/nl-doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "Project Control": "Project Control",
- "Projects": "Projecten"
-}
\ No newline at end of file
diff --git a/projects/doctype/project_control/locale/pt-BR-doc.json b/projects/doctype/project_control/locale/pt-BR-doc.json
deleted file mode 100644
index 8764cf3..0000000
--- a/projects/doctype/project_control/locale/pt-BR-doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "Project Control": "Controle de Projeto",
- "Projects": "Projetos"
-}
\ No newline at end of file
diff --git a/projects/doctype/project_control/locale/pt-doc.json b/projects/doctype/project_control/locale/pt-doc.json
deleted file mode 100644
index 477a620..0000000
--- a/projects/doctype/project_control/locale/pt-doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "Project Control": "Projeto de Controle de",
- "Projects": "Projetos"
-}
\ No newline at end of file
diff --git a/projects/doctype/project_control/locale/sr-doc.json b/projects/doctype/project_control/locale/sr-doc.json
deleted file mode 100644
index 8f51d67..0000000
--- a/projects/doctype/project_control/locale/sr-doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "Project Control": "\u041f\u0440\u043e\u0458\u0435\u043a\u0430\u0442 \u041a\u043e\u043d\u0442\u0440\u043e\u043b\u0430",
- "Projects": "\u041f\u0440\u043e\u0458\u0435\u043a\u0442\u0438"
-}
\ No newline at end of file
diff --git a/projects/doctype/project_control/locale/ta-doc.json b/projects/doctype/project_control/locale/ta-doc.json
deleted file mode 100644
index 45807a6..0000000
--- a/projects/doctype/project_control/locale/ta-doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "Project Control": "\u0ba4\u0bbf\u0b9f\u0bcd\u0b9f \u0b95\u0b9f\u0bcd\u0b9f\u0bc1\u0baa\u0bcd\u0baa\u0bbe\u0b9f\u0bc1",
- "Projects": "\u0ba4\u0bbf\u0b9f\u0bcd\u0b9f\u0b99\u0bcd\u0b95\u0bb3\u0bcd"
-}
\ No newline at end of file
diff --git a/projects/doctype/project_control/locale/th-doc.json b/projects/doctype/project_control/locale/th-doc.json
deleted file mode 100644
index 2989328..0000000
--- a/projects/doctype/project_control/locale/th-doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "Project Control": "\u0e01\u0e32\u0e23\u0e04\u0e27\u0e1a\u0e04\u0e38\u0e21\u0e42\u0e04\u0e23\u0e07\u0e01\u0e32\u0e23",
- "Projects": "\u0e42\u0e04\u0e23\u0e07\u0e01\u0e32\u0e23"
-}
\ No newline at end of file
diff --git a/projects/doctype/project_control/project_control.py b/projects/doctype/project_control/project_control.py
deleted file mode 100644
index 53caab0..0000000
--- a/projects/doctype/project_control/project_control.py
+++ /dev/null
@@ -1,153 +0,0 @@
-# ERPNext - web based ERP (http://erpnext.com)
-# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-from __future__ import unicode_literals
-import webnotes
-
-from webnotes.utils import add_days, cint, cstr, date_diff, flt, now, nowdate, add_days
-from webnotes.model import db_exists
-from webnotes.model.bean import copy_doclist
-from webnotes import msgprint
-from webnotes.utils.email_lib import sendmail
-sql = webnotes.conn.sql
-
-
-
-class DocType:
- def __init__(self,d,dl):
- self.doc, self.doclist = d,dl
-
- def get_projects(self, arg):
- # project list
- pl=[]
- status={}
- if arg == 'Open':
- pl = [p[0] for p in sql("select name from `tabProject` where status = 'Open' order by creation desc limit 20")]
- for p1 in pl:
- status[p1] = 'Open'
- elif arg == 'Completed':
- pl = [p[0] for p in sql("select name from `tabProject` where status = 'Completed' order by creation desc limit 20")]
- for p2 in pl:
- status[p2] = 'Completed'
- elif arg == 'Cancelled':
- pl = [p[0] for p in sql("select name from `tabProject` where status = 'Cancelled' order by creation desc limit 20")]
- for p3 in pl:
- status[p3] = 'Cancelled'
- else:
- #pl = [p[0] for p in sql("select name from `tabProject` order by creation desc limit 20")]
- pl1 = sql("select name, status from `tabProject` order by creation desc limit 20", as_dict=1)
- for p4 in pl1:
- status[p4['name']] = p4['status']
- pl.append(p4['name'])
-
- # milestones in the next 7 days for active projects
- ml = webnotes.conn.convert_to_lists(sql("select t1.milestone_date, t1.milestone, t1.parent from `tabProject Milestone` t1, tabProject t2 where t1.parent = t2.name and t2.status='Open' and DATEDIFF(t1.milestone_date, CURDATE()) BETWEEN 0 AND 7 ORDER BY t1.milestone_date ASC"))
-
- # percent of activity completed per project
- comp = {}
- n_tasks = {}
-
- for p in pl:
- t1 = sql('select count(*) from tabTask where project=%s and docstatus!=2', p)[0][0]
- n_tasks[p] = t1 or 0
- if t1:
- t2 = sql('select count(*) from tabTask where project=%s and docstatus!=2 and status="Closed"', p)[0][0]
- comp[p] = cint(flt(t2)*100/t1)
-
- return {'pl':pl, 'ml':ml, 'comp':comp, 'n_tasks':n_tasks, 'status':status}
-
- def get_resources(self):
- ret = {}
-
- # resource list
- rl = sql("select distinct allocated_to, assignee_email from tabTask")
-
- # get open & closed tickets
- for r in rl:
- if r[0]:
- ret[r[1]] = {}
- ret[r[1]]['id'] = r[0]
- ret[r[1]]['Total'] = sql("select count(*) from tabTask where allocated_to=%s and docstatus!=2", r[0])[0][0]
- ret[r[1]]['Closed'] = sql("select count(*) from tabTask where allocated_to=%s and status='Closed' and docstatus!=2", r[0])[0][0]
- ret[r[1]]['percent'] = cint(flt(ret[r[1]]['Closed']) * 100 / ret[r[1]]['Total'])
-
- return ret
-
- # --------------------------------------------------------------
- # for Gantt Chart
-
- def get_init_data(self, arg=''):
- pl = [p[0] for p in sql('select name from tabProject where docstatus != 2')]
- rl = [p[0] for p in sql('select distinct allocated_to from tabTask where docstatus != 2 and ifnull(allocated_to,"") != ""')]
- return {'pl':pl, 'rl':rl}
-
- def get_tasks(self, arg):
- start_date, end_date, project, resource = arg.split('~~~')
-
- cl = ''
- if project and project != 'All':
- cl = " and ifnull(project,'') = '%s'" % project
-
- if resource and resource != 'All':
- cl = " and ifnull(allocated_to,'') = '%s'" % resource
-
- tl = sql("""
- select subject, allocated_to, project, exp_start_date, exp_end_date, priority, status, name
- from tabTask
- where
- ((exp_start_date between '%(st)s' and '%(end)s') or
- (exp_end_date between '%(st)s' and '%(end)s') or
- (exp_start_date < '%(st)s' and exp_end_date > '%(end)s')) %(cond)s order by exp_start_date limit 100""" % {'st': start_date, 'end': end_date, 'cond':cl})
-
- return webnotes.conn.convert_to_lists(tl)
-
- def declare_proj_completed(self, arg):
- chk = sql("select name from `tabTask` where project=%s and status='Open'", arg)
- if chk:
- chk_lst = [x[0] for x in chk]
- msgprint("Task(s) "+','.join(chk_lst)+" has staus 'Open'. Please submit all tasks against this project before closing the project.")
- return cstr('false')
- else:
- sql("update `tabProject` set status = 'Completed' where name = %s", arg)
- return cstr('true')
-
-
-def sent_reminder_task():
- task_list = sql("""
- select subject, allocated_to, project, exp_start_date, exp_end_date,
- priority, status, name, senders_name, opening_date, review_date, description
- from tabTask
- where task_email_notify=1
- and sent_reminder=0
- and status='Open'
- and exp_start_date is not null""",as_dict=1)
- for i in task_list:
- if date_diff(i['exp_start_date'],nowdate()) ==2:
- msg2="""<h2>Two days to complete: %(name)s</h2>
- <p>This is a reminder for the task %(name)s has been assigned to you
- by %(senders_name)s on %(opening_date)s</p>
- <p><b>Subject:</b> %(subject)s </p>
- <p><b>Project:</b> %(project)s</p>
- <p><b>Expected Start Date:</b> %(exp_start_date)s</p>
- <p><b>Expected End Date:</b> %(exp_end_date)s</p>
- <p><b>Review Date:</b> %(review_date)s</p>
- <p><b>Details:</b> %(description)s</p>
- <p>If you have already completed this task, please update the system</p>
- <p>Good Luck!</p>
- <p>(This notification is autogenerated)</p>""" % i
- sendmail(i['allocated_to'], msg=msg2, subject='A task has been assigned')
- sql("update `tabTask` set sent_reminder='1' where name='%(name)s' and allocated_to= '%(allocated_to)s'" % i)
-
diff --git a/projects/doctype/project_milestone/README.md b/projects/doctype/project_milestone/README.md
new file mode 100644
index 0000000..d47db7b
--- /dev/null
+++ b/projects/doctype/project_milestone/README.md
@@ -0,0 +1 @@
+Important date in the project lifecycle.
\ No newline at end of file
diff --git a/projects/doctype/task/README.md b/projects/doctype/task/README.md
new file mode 100644
index 0000000..0fbd417
--- /dev/null
+++ b/projects/doctype/task/README.md
@@ -0,0 +1 @@
+Task to be completed for a Project (optional).
\ No newline at end of file
diff --git a/projects/doctype/task/task.js b/projects/doctype/task/task.js
index 8493920..131b5fd 100644
--- a/projects/doctype/task/task.js
+++ b/projects/doctype/task/task.js
@@ -34,7 +34,7 @@
}
},
- after_save: function() {
+ validate: function() {
this.frm.doc.project && wn.model.remove_from_locals("Project",
this.frm.doc.project);
},
diff --git a/projects/doctype/task/task.py b/projects/doctype/task/task.py
index ad2303e..a76dc9b 100644
--- a/projects/doctype/task/task.py
+++ b/projects/doctype/task/task.py
@@ -15,7 +15,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from __future__ import unicode_literals
-import webnotes
+import webnotes, json
from webnotes.utils import getdate, today
from webnotes.model import db_exists
@@ -59,4 +59,35 @@
if self.doc.status=="Closed" and status != "Closed" and not self.doc.act_end_date:
self.doc.act_end_date = today()
-
\ No newline at end of file
+
+ def on_update(self):
+ """update percent complete in project"""
+ if self.doc.project:
+ webnotes.bean("Project", self.doc.project).controller.update_percent_complete()
+
+@webnotes.whitelist()
+def get_events(start, end, filters=None):
+ from webnotes.widgets.reportview import build_match_conditions
+ if not webnotes.has_permission("Task"):
+ webnotes.msgprint(_("No Permission"), raise_exception=1)
+
+ conditions = build_match_conditions("Task")
+ conditions and (" and " + conditions) or ""
+
+ if filters:
+ filters = json.loads(filters)
+ for key in filters:
+ if filters[key]:
+ conditions += " and " + key + ' = "' + filters[key].replace('"', '\"') + '"'
+
+ data = webnotes.conn.sql("""select name, exp_start_date, exp_end_date,
+ subject, status, project from `tabTask`
+ where ((exp_start_date between '%(start)s' and '%(end)s') \
+ or (exp_end_date between '%(start)s' and '%(end)s'))
+ %(conditions)s""" % {
+ "start": start,
+ "end": end,
+ "conditions": conditions
+ }, as_dict=True, update={"allDay": 0})
+
+ return data
diff --git a/projects/doctype/task/task_calendar.js b/projects/doctype/task/task_calendar.js
new file mode 100644
index 0000000..94d7cc5
--- /dev/null
+++ b/projects/doctype/task/task_calendar.js
@@ -0,0 +1,19 @@
+wn.views.calendar["Task"] = {
+ field_map: {
+ "start": "exp_start_date",
+ "end": "exp_end_date",
+ "id": "name",
+ "title": "subject",
+ "allDay": "allDay"
+ },
+ gantt: true,
+ filters: [
+ {
+ "fieldtype": "Link",
+ "fieldname": "project",
+ "options": "Project",
+ "label": "Project"
+ }
+ ],
+ get_events_method: "projects.doctype.task.task.get_events"
+}
\ No newline at end of file
diff --git a/projects/doctype/time_log/README.md b/projects/doctype/time_log/README.md
new file mode 100644
index 0000000..bab52e7
--- /dev/null
+++ b/projects/doctype/time_log/README.md
@@ -0,0 +1 @@
+Log of activity done by a user in a particular period.
\ No newline at end of file
diff --git a/projects/doctype/time_log/time_log.py b/projects/doctype/time_log/time_log.py
index 8ab46c1..0a5adba 100644
--- a/projects/doctype/time_log/time_log.py
+++ b/projects/doctype/time_log/time_log.py
@@ -5,7 +5,6 @@
from webnotes import _
from webnotes.utils import cstr
-from webnotes.widgets.reportview import build_match_conditions
class OverlapError(webnotes.ValidationError): pass
@@ -60,6 +59,10 @@
@webnotes.whitelist()
def get_events(start, end):
+ from webnotes.widgets.reportview import build_match_conditions
+ if not webnotes.has_permission("Time Log"):
+ webnotes.msgprint(_("No Permission"), raise_exception=1)
+
match = build_match_conditions("Time Log")
data = webnotes.conn.sql("""select name, from_time, to_time,
activity_type, task, project from `tabTime Log`
diff --git a/projects/doctype/time_log/time_log_calendar.js b/projects/doctype/time_log/time_log_calendar.js
index e5bb774..52338a9 100644
--- a/projects/doctype/time_log/time_log_calendar.js
+++ b/projects/doctype/time_log/time_log_calendar.js
@@ -1,4 +1,4 @@
-wn.views.calendar["Time Log"] = wn.views.Calendar.extend({
+wn.views.calendar["Time Log"] = {
field_map: {
"start": "from_time",
"end": "to_time",
@@ -7,4 +7,4 @@
"allDay": "allDay"
},
get_events_method: "projects.doctype.time_log.time_log.get_events"
-})
\ No newline at end of file
+}
\ No newline at end of file
diff --git a/projects/doctype/time_log_batch/README.md b/projects/doctype/time_log_batch/README.md
new file mode 100644
index 0000000..c27521a
--- /dev/null
+++ b/projects/doctype/time_log_batch/README.md
@@ -0,0 +1 @@
+Group of Time Logs that can be batched for billing.
\ No newline at end of file
diff --git a/projects/doctype/time_log_batch_detail/README.md b/projects/doctype/time_log_batch_detail/README.md
new file mode 100644
index 0000000..daa04aa
--- /dev/null
+++ b/projects/doctype/time_log_batch_detail/README.md
@@ -0,0 +1 @@
+Time Log detail for parent Time Log Batch.
\ No newline at end of file
diff --git a/projects/doctype/timesheet/__init__.py b/projects/doctype/timesheet/__init__.py
deleted file mode 100644
index baffc48..0000000
--- a/projects/doctype/timesheet/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-from __future__ import unicode_literals
diff --git a/projects/doctype/timesheet/locale/_messages_doc.json b/projects/doctype/timesheet/locale/_messages_doc.json
deleted file mode 100644
index fab2534..0000000
--- a/projects/doctype/timesheet/locale/_messages_doc.json
+++ /dev/null
@@ -1,14 +0,0 @@
-[
- "Status",
- "Timesheet By",
- "Notes",
- "Timesheet",
- "Timesheet Date",
- "Amendment Date",
- "Cancelled",
- "Draft",
- "Submitted",
- "Timesheet Details",
- "Amended From",
- "Projects"
-]
\ No newline at end of file
diff --git a/projects/doctype/timesheet/locale/ar-doc.json b/projects/doctype/timesheet/locale/ar-doc.json
deleted file mode 100644
index 335b3a9..0000000
--- a/projects/doctype/timesheet/locale/ar-doc.json
+++ /dev/null
@@ -1,14 +0,0 @@
-{
- "Amended From": "\u0639\u062f\u0644 \u0645\u0646",
- "Amendment Date": "\u0627\u0644\u062a\u0639\u062f\u064a\u0644 \u062a\u0627\u0631\u064a\u062e",
- "Cancelled": "\u0625\u0644\u063a\u0627\u0621",
- "Draft": "\u0645\u0633\u0648\u062f\u0629",
- "Notes": "\u062a\u0644\u0627\u062d\u0638",
- "Projects": "\u0645\u0634\u0627\u0631\u064a\u0639",
- "Status": "\u062d\u0627\u0644\u0629",
- "Submitted": "\u0627\u0644\u0645\u0642\u062f\u0645\u0629",
- "Timesheet": "\u0633\u0627\u0639\u0627\u062a \u0627\u0644\u0639\u0645\u0644",
- "Timesheet By": "\u0627\u0644\u062c\u062f\u0648\u0644 \u0627\u0644\u0632\u0645\u0646\u064a \u0628\u0648\u0627\u0633\u0637\u0629",
- "Timesheet Date": "\u0627\u0644\u062c\u062f\u0648\u0644 \u0627\u0644\u0632\u0645\u0646\u064a \u062a\u0627\u0631\u064a\u062e",
- "Timesheet Details": "\u0627\u0644\u062c\u062f\u0648\u0644 \u0627\u0644\u0632\u0645\u0646\u064a \u062a\u0641\u0627\u0635\u064a\u0644"
-}
\ No newline at end of file
diff --git a/projects/doctype/timesheet/locale/de-doc.json b/projects/doctype/timesheet/locale/de-doc.json
deleted file mode 100644
index e070b21..0000000
--- a/projects/doctype/timesheet/locale/de-doc.json
+++ /dev/null
@@ -1,14 +0,0 @@
-{
- "Amended From": "Ge\u00e4ndert von",
- "Amendment Date": "\u00c4nderung Datum",
- "Cancelled": "Abgesagt",
- "Draft": "Entwurf",
- "Notes": "Aufzeichnungen",
- "Projects": "Projekte",
- "Status": "Status",
- "Submitted": "Eingereicht",
- "Timesheet": "Timesheet",
- "Timesheet By": "Timesheet By",
- "Timesheet Date": "Timesheet Datum",
- "Timesheet Details": "Timesheet Einzelheiten"
-}
\ No newline at end of file
diff --git a/projects/doctype/timesheet/locale/es-doc.json b/projects/doctype/timesheet/locale/es-doc.json
deleted file mode 100644
index a769174..0000000
--- a/projects/doctype/timesheet/locale/es-doc.json
+++ /dev/null
@@ -1,14 +0,0 @@
-{
- "Amended From": "De modificada",
- "Amendment Date": "Enmienda Fecha",
- "Cancelled": "Cancelado",
- "Draft": "Borrador",
- "Notes": "Notas",
- "Projects": "Proyectos",
- "Status": "Estado",
- "Submitted": "Enviado",
- "Timesheet": "Parte de horas",
- "Timesheet By": "Por parte de horas",
- "Timesheet Date": "Fecha de parte de horas",
- "Timesheet Details": "Detalles del parte de horas"
-}
\ No newline at end of file
diff --git a/projects/doctype/timesheet/locale/fr-doc.json b/projects/doctype/timesheet/locale/fr-doc.json
deleted file mode 100644
index 7fe0e38..0000000
--- a/projects/doctype/timesheet/locale/fr-doc.json
+++ /dev/null
@@ -1,14 +0,0 @@
-{
- "Amended From": "De modifi\u00e9e",
- "Amendment Date": "Date de la modification",
- "Cancelled": "Annul\u00e9",
- "Draft": "Avant-projet",
- "Notes": "Remarques",
- "Projects": "Projets",
- "Status": "Statut",
- "Submitted": "Soumis",
- "Timesheet": "Feuille de pr\u00e9sence",
- "Timesheet By": "Feuille de temps par",
- "Timesheet Date": "Date de feuille de temps",
- "Timesheet Details": "D\u00e9tails des feuilles de temps"
-}
\ No newline at end of file
diff --git a/projects/doctype/timesheet/locale/hi-doc.json b/projects/doctype/timesheet/locale/hi-doc.json
deleted file mode 100644
index 18e02b7..0000000
--- a/projects/doctype/timesheet/locale/hi-doc.json
+++ /dev/null
@@ -1,14 +0,0 @@
-{
- "Amended From": "\u0938\u0947 \u0938\u0902\u0936\u094b\u0927\u093f\u0924",
- "Amendment Date": "\u0938\u0902\u0936\u094b\u0927\u0928 \u0924\u093f\u0925\u093f",
- "Cancelled": "Cancelled",
- "Draft": "\u092e\u0938\u094c\u0926\u093e",
- "Notes": "\u0928\u094b\u091f\u094d\u0938",
- "Projects": "\u092a\u0930\u093f\u092f\u094b\u091c\u0928\u093e\u0913\u0902",
- "Status": "\u0939\u0948\u0938\u093f\u092f\u0924",
- "Submitted": "\u092a\u0947\u0936",
- "Timesheet": "Timesheet",
- "Timesheet By": "\u0926\u094d\u0935\u093e\u0930\u093e Timesheet",
- "Timesheet Date": "Timesheet \u0924\u093f\u0925\u093f",
- "Timesheet Details": "Timesheet \u0935\u093f\u0935\u0930\u0923"
-}
\ No newline at end of file
diff --git a/projects/doctype/timesheet/locale/hr-doc.json b/projects/doctype/timesheet/locale/hr-doc.json
deleted file mode 100644
index 5f7e1d6..0000000
--- a/projects/doctype/timesheet/locale/hr-doc.json
+++ /dev/null
@@ -1,14 +0,0 @@
-{
- "Amended From": "Izmijenjena Od",
- "Amendment Date": "Amandman Datum",
- "Cancelled": "Otkazan",
- "Draft": "Skica",
- "Notes": "Bilje\u0161ke",
- "Projects": "Projekti",
- "Status": "Status",
- "Submitted": "Prijavljen",
- "Timesheet": "Kontrolna kartica",
- "Timesheet By": "Timesheet Do",
- "Timesheet Date": "Timesheet Datum",
- "Timesheet Details": "Timesheet Detalji"
-}
\ No newline at end of file
diff --git a/projects/doctype/timesheet/locale/nl-doc.json b/projects/doctype/timesheet/locale/nl-doc.json
deleted file mode 100644
index 035df4c..0000000
--- a/projects/doctype/timesheet/locale/nl-doc.json
+++ /dev/null
@@ -1,14 +0,0 @@
-{
- "Amended From": "Gewijzigd Van",
- "Amendment Date": "Wijziging Datum",
- "Cancelled": "Geannuleerd",
- "Draft": "Ontwerp",
- "Notes": "Opmerkingen",
- "Projects": "Projecten",
- "Status": "Staat",
- "Submitted": "Ingezonden",
- "Timesheet": "Rooster",
- "Timesheet By": "Timesheet Door",
- "Timesheet Date": "Timesheet Datum",
- "Timesheet Details": "Timesheet Details"
-}
\ No newline at end of file
diff --git a/projects/doctype/timesheet/locale/pt-BR-doc.json b/projects/doctype/timesheet/locale/pt-BR-doc.json
deleted file mode 100644
index 5ad54cf..0000000
--- a/projects/doctype/timesheet/locale/pt-BR-doc.json
+++ /dev/null
@@ -1,14 +0,0 @@
-{
- "Amended From": "Corrigido De",
- "Amendment Date": "Data da Corre\u00e7\u00e3o",
- "Cancelled": "Cancelado",
- "Draft": "Rascunho",
- "Notes": "Notas",
- "Projects": "Projetos",
- "Status": "Estado",
- "Submitted": "Enviado",
- "Timesheet": "Quadro de Hor\u00e1rios",
- "Timesheet By": "Quadro de Hor\u00e1rios Por",
- "Timesheet Date": "Data do Quadro de Hor\u00e1rios",
- "Timesheet Details": "Detalhes do Quadro de Hor\u00e1rios"
-}
\ No newline at end of file
diff --git a/projects/doctype/timesheet/locale/pt-doc.json b/projects/doctype/timesheet/locale/pt-doc.json
deleted file mode 100644
index f31ce7e..0000000
--- a/projects/doctype/timesheet/locale/pt-doc.json
+++ /dev/null
@@ -1,14 +0,0 @@
-{
- "Amended From": "Alterado De",
- "Amendment Date": "Data emenda",
- "Cancelled": "Cancelado",
- "Draft": "Rascunho",
- "Notes": "Notas",
- "Projects": "Projetos",
- "Status": "Estado",
- "Submitted": "Enviado",
- "Timesheet": "Quadro de Hor\u00e1rios",
- "Timesheet By": "Por Timesheet",
- "Timesheet Date": "Data Timesheet",
- "Timesheet Details": "Detalhes quadro de hor\u00e1rios"
-}
\ No newline at end of file
diff --git a/projects/doctype/timesheet/locale/sr-doc.json b/projects/doctype/timesheet/locale/sr-doc.json
deleted file mode 100644
index c9f9d9f..0000000
--- a/projects/doctype/timesheet/locale/sr-doc.json
+++ /dev/null
@@ -1,14 +0,0 @@
-{
- "Amended From": "\u0418\u0437\u043c\u0435\u045a\u0435\u043d\u0430 \u043e\u0434",
- "Amendment Date": "\u0410\u043c\u0430\u043d\u0434\u043c\u0430\u043d \u0414\u0430\u0442\u0443\u043c",
- "Cancelled": "\u041e\u0442\u043a\u0430\u0437\u0430\u043d",
- "Draft": "\u041d\u0430\u0446\u0440\u0442",
- "Notes": "\u0411\u0435\u043b\u0435\u0448\u043a\u0435",
- "Projects": "\u041f\u0440\u043e\u0458\u0435\u043a\u0442\u0438",
- "Status": "\u0421\u0442\u0430\u0442\u0443\u0441",
- "Submitted": "\u041f\u043e\u0434\u043d\u0435\u0442",
- "Timesheet": "\u041a\u043e\u043d\u0442\u0440\u043e\u043b\u043d\u0430 \u043a\u0430\u0440\u0442\u0438\u0446\u0430",
- "Timesheet By": "\u041f\u043e \u0422\u0438\u043c\u0435\u0441\u0445\u0435\u0435\u0442",
- "Timesheet Date": "\u0414\u0430\u0442\u0443\u043c \u0422\u0438\u043c\u0435\u0441\u0445\u0435\u0435\u0442",
- "Timesheet Details": "\u0422\u0438\u043c\u0435\u0441\u0445\u0435\u0435\u0442 \u0414\u0435\u0442\u0430\u0459\u0438"
-}
\ No newline at end of file
diff --git a/projects/doctype/timesheet/locale/ta-doc.json b/projects/doctype/timesheet/locale/ta-doc.json
deleted file mode 100644
index cb4cc25..0000000
--- a/projects/doctype/timesheet/locale/ta-doc.json
+++ /dev/null
@@ -1,14 +0,0 @@
-{
- "Amended From": "\u0bae\u0bc1\u0ba4\u0bb2\u0bcd \u0ba4\u0bbf\u0bb0\u0bc1\u0ba4\u0bcd\u0ba4\u0baa\u0bcd\u0baa\u0b9f\u0bcd\u0b9f",
- "Amendment Date": "\u0ba4\u0bbf\u0bb0\u0bc1\u0ba4\u0bcd\u0ba4\u0ba4\u0bcd\u0ba4\u0bc8 \u0ba4\u0bc7\u0ba4\u0bbf",
- "Cancelled": "\u0bb0\u0ba4\u0bcd\u0ba4\u0bc1",
- "Draft": "\u0b95\u0bbe\u0bb1\u0bcd\u0bb1\u0bc1 \u0bb5\u0bc0\u0b9a\u0bcd\u0b9a\u0bc1",
- "Notes": "\u0b95\u0bc1\u0bb1\u0bbf\u0baa\u0bcd\u0baa\u0bc1\u0b95\u0bb3\u0bcd",
- "Projects": "\u0ba4\u0bbf\u0b9f\u0bcd\u0b9f\u0b99\u0bcd\u0b95\u0bb3\u0bcd",
- "Status": "\u0b85\u0ba8\u0bcd\u0ba4\u0bb8\u0bcd\u0ba4\u0bc1",
- "Submitted": "\u0b9a\u0bae\u0bb0\u0bcd\u0baa\u0bcd\u0baa\u0bbf\u0b95\u0bcd\u0b95\u0baa\u0bcd\u0baa\u0b9f\u0bcd\u0b9f\u0ba4\u0bc1",
- "Timesheet": "Timesheet",
- "Timesheet By": "By Timesheet",
- "Timesheet Date": "Timesheet \u0ba4\u0bc7\u0ba4\u0bbf",
- "Timesheet Details": "Timesheet \u0bb5\u0bbf\u0bb5\u0bb0\u0bae\u0bcd"
-}
\ No newline at end of file
diff --git a/projects/doctype/timesheet/locale/th-doc.json b/projects/doctype/timesheet/locale/th-doc.json
deleted file mode 100644
index 6003a4c..0000000
--- a/projects/doctype/timesheet/locale/th-doc.json
+++ /dev/null
@@ -1,14 +0,0 @@
-{
- "Amended From": "\u0e41\u0e01\u0e49\u0e44\u0e02\u0e40\u0e1e\u0e34\u0e48\u0e21\u0e40\u0e15\u0e34\u0e21",
- "Amendment Date": "\u0e27\u0e31\u0e19\u0e17\u0e35\u0e48\u0e41\u0e01\u0e49\u0e44\u0e02",
- "Cancelled": "\u0e22\u0e01\u0e40\u0e25\u0e34\u0e01",
- "Draft": "\u0e23\u0e48\u0e32\u0e07",
- "Notes": "\u0e2b\u0e21\u0e32\u0e22\u0e40\u0e2b\u0e15\u0e38",
- "Projects": "\u0e42\u0e04\u0e23\u0e07\u0e01\u0e32\u0e23",
- "Status": "\u0e2a\u0e16\u0e32\u0e19\u0e30",
- "Submitted": "Submitted",
- "Timesheet": "timesheet",
- "Timesheet By": "timesheet \u0e42\u0e14\u0e22",
- "Timesheet Date": "\u0e27\u0e31\u0e19\u0e17\u0e35\u0e48 timesheet",
- "Timesheet Details": "\u0e23\u0e32\u0e22\u0e25\u0e30\u0e40\u0e2d\u0e35\u0e22\u0e14 Timesheet"
-}
\ No newline at end of file
diff --git a/projects/doctype/timesheet/timesheet.js b/projects/doctype/timesheet/timesheet.js
deleted file mode 100644
index ab2e05b..0000000
--- a/projects/doctype/timesheet/timesheet.js
+++ /dev/null
@@ -1,53 +0,0 @@
-// ERPNext - web based ERP (http://erpnext.com)
-// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-
-// ======================= OnLoad =============================================
-cur_frm.cscript.onload = function(doc,cdt,cdn){
- if(!doc.status) set_multiple(cdt,cdn,{status:'Draft'});
- if(!doc.timesheet_date) set_multiple(cdt,cdn,{timesheet_date:get_today()});
-}
-
-cur_frm.cscript.refresh = function(doc,cdt,cdn){
- cur_frm.set_intro("Timesheets will soon be removed. Please create a new Time Log. To create \
- a new Time Log, to to Projects > Time Log > New Time Log. This will be removed in a few days.")
-}
-
-
-cur_frm.fields_dict['timesheet_details'].grid.get_field("project_name").get_query = function(doc,cdt,cdn){
- var cond=cond1='';
- var d = locals[cdt][cdn];
- //if(d.customer_name) cond = 'ifnull(`tabProject`.customer_name, "") = "'+d.customer_name+'" AND';
- if(d.task_id) cond1 = 'ifnull(`tabTask`.project, "") = `tabProject`.name AND `tabTask`.name = "'+d.task_id+'" AND';
-
- return repl('SELECT distinct `tabProject`.`name` FROM `tabProject`, `tabTask` WHERE %(cond1)s `tabProject`.`name` LIKE "%s" ORDER BY `tabProject`.`name` ASC LIMIT 50', {cond1:cond1});
-}
-
-cur_frm.cscript.task_name = function(doc, cdt, cdn){
- var d = locals[cdt][cdn];
- if(d.task_name) get_server_fields('get_task_details', d.task_name, 'timesheet_details', doc, cdt, cdn, 1);
-}
-
-cur_frm.fields_dict['timesheet_details'].grid.get_field("task_name").get_query = function(doc,cdt,cdn){
- var cond='';
- var d = locals[cdt][cdn];
- if(d.project_name) cond = 'ifnull(`tabTask`.project, "") = "'+d.project_name+'" AND';
-
- return repl('SELECT distinct `tabTask`.`subject` FROM `tabTask` WHERE %(cond)s `tabTask`.`subject` LIKE "%s" ORDER BY `tabTask`.`subject` ASC LIMIT 50', {cond:cond});
-}
-
-cur_frm.fields_dict.timesheet_details.grid.get_field("customer_name").get_query =
- erpnext.utils.customer_query;
\ No newline at end of file
diff --git a/projects/doctype/timesheet/timesheet.py b/projects/doctype/timesheet/timesheet.py
deleted file mode 100644
index 8123278..0000000
--- a/projects/doctype/timesheet/timesheet.py
+++ /dev/null
@@ -1,97 +0,0 @@
-# ERPNext - web based ERP (http://erpnext.com)
-# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-from __future__ import unicode_literals
-import webnotes
-import time, datetime
-
-from webnotes.utils import cint, cstr, getdate, now, nowdate
-from webnotes.model import db_exists
-from webnotes.model.bean import getlist, copy_doclist
-from webnotes import msgprint
-
-sql = webnotes.conn.sql
-
-class DocType:
- def __init__(self,doc,doclist=[]):
- self.doc = doc
- self.doclist = doclist
-
- def get_customer_details(self, project_name):
- cust = sql("select customer, customer_name from `tabProject` where name = %s", project_name)
- if cust:
- ret = {'customer': cust and cust[0][0] or '', 'customer_name': cust and cust[0][1] or ''}
- return (ret)
-
- def get_task_details(self, task_sub):
- tsk = sql("select name, project, customer, customer_name from `tabTask` where subject = %s", task_sub)
- if tsk:
- ret = {'task_id': tsk and tsk[0][0] or '', 'project_name': tsk and tsk[0][1] or '', 'customer_name': tsk and tsk[0][3] or ''}
- return ret
-
- def get_time(self, timestr):
- if len(timestr.split(":"))==2:
- format = "%H:%M"
- else:
- format = "%H:%M:%S"
-
- return time.strptime(timestr, format)
-
- def validate(self):
- msgprint("Please create a new Time Log", raise_exception=True)
-
- if getdate(self.doc.timesheet_date) > getdate(nowdate()):
- msgprint("You can not prepare timesheet for future date")
- raise Exception
-
- chk = sql("select name from `tabTimesheet` where timesheet_date=%s and owner=%s and status!='Cancelled' and name!=%s", (self.doc.timesheet_date, self.doc.owner, self.doc.name))
- if chk:
- msgprint("You have already created timesheet "+ cstr(chk and chk[0][0] or '')+" for this date.")
- raise Exception
-
- for d in getlist(self.doclist, 'timesheet_details'):
- if d.act_start_time and d.act_end_time:
- d1 = self.get_time(d.act_start_time)
- d2 = self.get_time(d.act_end_time)
-
- if d1 > d2:
- msgprint("Start time can not be greater than end time. Check for Task Id : "+cstr(d.task_id))
- raise Exception
- elif d1 == d2:
- msgprint("Start time and end time can not be same. Check for Task Id : "+cstr(d.task_id))
- raise Exception
-
- def calculate_total_hr(self):
- for d in getlist(self.doclist, 'timesheet_details'):
- x1 = d.act_start_time.split(":")
- x2 = d.act_end_time.split(":")
-
- d1 = datetime.timedelta(minutes=cint(x1[1]), hours=cint(x1[0]))
- d2 = datetime.timedelta(minutes=cint(x2[1]), hours=cint(x2[0]))
- d3 = (d2 - d1).seconds
- d.act_total_hrs = time.strftime("%H:%M:%S", time.gmtime(d3))
- sql("update `tabTimesheet Detail` set act_total_hrs = %s where parent=%s and name=%s", (d.act_total_hrs,self.doc.name,d.name))
-
- def on_update(self):
- self.calculate_total_hr()
- webnotes.conn.set(self.doc, 'status', 'Draft')
-
- def on_submit(self):
- webnotes.conn.set(self.doc, 'status', 'Submitted')
-
- def on_cancel(self):
- webnotes.conn.set(self.doc, 'status', 'Cancelled')
-
\ No newline at end of file
diff --git a/projects/doctype/timesheet/timesheet.txt b/projects/doctype/timesheet/timesheet.txt
deleted file mode 100644
index d64a3e1..0000000
--- a/projects/doctype/timesheet/timesheet.txt
+++ /dev/null
@@ -1,180 +0,0 @@
-[
- {
- "creation": "2013-01-29 19:25:50",
- "docstatus": 0,
- "modified": "2013-02-26 13:44:35",
- "modified_by": "Administrator",
- "owner": "ashwini@webnotestech.com"
- },
- {
- "autoname": "TimeSheet.#####",
- "doctype": "DocType",
- "is_submittable": 1,
- "module": "Projects",
- "name": "__common__",
- "search_fields": "status, owner, timesheet_date"
- },
- {
- "doctype": "DocField",
- "name": "__common__",
- "parent": "Timesheet",
- "parentfield": "fields",
- "parenttype": "DocType",
- "permlevel": 0
- },
- {
- "doctype": "DocPerm",
- "name": "__common__",
- "parent": "Timesheet",
- "parentfield": "permissions",
- "parenttype": "DocType",
- "read": 1
- },
- {
- "doctype": "DocType",
- "name": "Timesheet"
- },
- {
- "doctype": "DocField",
- "fieldname": "timesheet_details_section_break",
- "fieldtype": "Section Break",
- "label": "Timesheet Details"
- },
- {
- "default": "Today",
- "doctype": "DocField",
- "fieldname": "timesheet_date",
- "fieldtype": "Date",
- "in_filter": 1,
- "label": "Timesheet Date",
- "oldfieldname": "timesheet_date",
- "oldfieldtype": "Date",
- "reqd": 1,
- "search_index": 1
- },
- {
- "doctype": "DocField",
- "fieldname": "column_break_3",
- "fieldtype": "Column Break"
- },
- {
- "default": "Draft",
- "doctype": "DocField",
- "fieldname": "status",
- "fieldtype": "Select",
- "in_filter": 0,
- "in_list_view": 1,
- "label": "Status",
- "oldfieldname": "status",
- "oldfieldtype": "Select",
- "options": "\nDraft\nSubmitted\nCancelled",
- "read_only": 1,
- "reqd": 1,
- "search_index": 1
- },
- {
- "doctype": "DocField",
- "fieldname": "section_break0",
- "fieldtype": "Section Break",
- "options": "Simple"
- },
- {
- "doctype": "DocField",
- "fieldname": "timesheet_details",
- "fieldtype": "Table",
- "label": "Timesheet Details",
- "oldfieldname": "timesheet_details",
- "oldfieldtype": "Table",
- "options": "Timesheet Detail"
- },
- {
- "doctype": "DocField",
- "fieldname": "section_break_7",
- "fieldtype": "Section Break"
- },
- {
- "doctype": "DocField",
- "fieldname": "notes",
- "fieldtype": "Text",
- "in_list_view": 1,
- "label": "Notes"
- },
- {
- "doctype": "DocField",
- "fieldname": "owner",
- "fieldtype": "Link",
- "in_filter": 1,
- "label": "Timesheet By",
- "oldfieldname": "owner",
- "oldfieldtype": "Link",
- "options": "Profile",
- "reqd": 1,
- "search_index": 0
- },
- {
- "doctype": "DocField",
- "fieldname": "amended_from",
- "fieldtype": "Data",
- "hidden": 1,
- "label": "Amended From",
- "oldfieldname": "amended_from",
- "oldfieldtype": "Data",
- "print_hide": 1,
- "read_only": 1
- },
- {
- "doctype": "DocField",
- "fieldname": "amendment_date",
- "fieldtype": "Date",
- "hidden": 1,
- "label": "Amendment Date",
- "oldfieldname": "amendment_date",
- "oldfieldtype": "Date",
- "print_hide": 1,
- "read_only": 1
- },
- {
- "amend": 1,
- "cancel": 1,
- "create": 1,
- "doctype": "DocPerm",
- "permlevel": 0,
- "report": 1,
- "role": "Projects User",
- "submit": 0,
- "write": 1
- },
- {
- "amend": 0,
- "cancel": 0,
- "create": 0,
- "doctype": "DocPerm",
- "permlevel": 1,
- "report": 0,
- "role": "Projects User",
- "submit": 0,
- "write": 0
- },
- {
- "amend": 1,
- "cancel": 1,
- "create": 1,
- "doctype": "DocPerm",
- "permlevel": 0,
- "report": 1,
- "role": "System Manager",
- "submit": 1,
- "write": 1
- },
- {
- "amend": 0,
- "cancel": 0,
- "create": 0,
- "doctype": "DocPerm",
- "permlevel": 1,
- "report": 0,
- "role": "System Manager",
- "submit": 0,
- "write": 0
- }
-]
\ No newline at end of file
diff --git a/projects/doctype/timesheet_detail/__init__.py b/projects/doctype/timesheet_detail/__init__.py
deleted file mode 100644
index baffc48..0000000
--- a/projects/doctype/timesheet_detail/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-from __future__ import unicode_literals
diff --git a/projects/doctype/timesheet_detail/locale/_messages_doc.json b/projects/doctype/timesheet_detail/locale/_messages_doc.json
deleted file mode 100644
index a51a3e2..0000000
--- a/projects/doctype/timesheet_detail/locale/_messages_doc.json
+++ /dev/null
@@ -1,13 +0,0 @@
-[
- "Task Id",
- "Activity Type",
- "Actual End Time",
- "Actual Start Time",
- "Project",
- "Total Hours (Actual)",
- "Customer Name",
- "Additional Info",
- "Timesheet Detail",
- "Task Name",
- "Projects"
-]
\ No newline at end of file
diff --git a/projects/doctype/timesheet_detail/locale/ar-doc.json b/projects/doctype/timesheet_detail/locale/ar-doc.json
deleted file mode 100644
index b4d1ce2..0000000
--- a/projects/doctype/timesheet_detail/locale/ar-doc.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- "Activity Type": "\u0627\u0644\u0646\u0634\u0627\u0637 \u0646\u0648\u0639",
- "Actual End Time": "\u0646\u0647\u0627\u064a\u0629 \u0627\u0644\u0648\u0642\u062a \u0627\u0644\u0641\u0639\u0644\u064a",
- "Actual Start Time": "\u0648\u0642\u062a \u0627\u0644\u0628\u062f\u0621 \u0627\u0644\u0641\u0639\u0644\u064a",
- "Additional Info": "\u0645\u0639\u0644\u0648\u0645\u0627\u062a \u0625\u0636\u0627\u0641\u064a\u0629",
- "Customer Name": "\u0627\u0633\u0645 \u0627\u0644\u0639\u0645\u064a\u0644",
- "Project": "\u0645\u0634\u0631\u0648\u0639",
- "Projects": "\u0645\u0634\u0627\u0631\u064a\u0639",
- "Task Id": "\u0627\u0644\u0645\u0647\u0645\u0629 \u0631\u0642\u0645",
- "Task Name": "\u0627\u0633\u0645 \u0627\u0644\u0645\u0647\u0645\u0629",
- "Timesheet Detail": "\u0627\u0644\u062c\u062f\u0648\u0644 \u0627\u0644\u0632\u0645\u0646\u064a \u0627\u0644\u062a\u0641\u0627\u0635\u064a\u0644",
- "Total Hours (Actual)": "\u0645\u062c\u0645\u0648\u0639 \u0633\u0627\u0639\u0627\u062a (\u0627\u0644\u0641\u0639\u0644\u064a\u0629)"
-}
\ No newline at end of file
diff --git a/projects/doctype/timesheet_detail/locale/de-doc.json b/projects/doctype/timesheet_detail/locale/de-doc.json
deleted file mode 100644
index 9a29d33..0000000
--- a/projects/doctype/timesheet_detail/locale/de-doc.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- "Activity Type": "Art der T\u00e4tigkeit",
- "Actual End Time": "Tats\u00e4chliche Endzeit",
- "Actual Start Time": "Tats\u00e4chliche Startzeit",
- "Additional Info": "Zus\u00e4tzliche Informationen",
- "Customer Name": "Name des Kunden",
- "Project": "Projekt",
- "Projects": "Projekte",
- "Task Id": "Task-Id",
- "Task Name": "Task-Name",
- "Timesheet Detail": "Timesheet Details",
- "Total Hours (Actual)": "Total Hours (Actual)"
-}
\ No newline at end of file
diff --git a/projects/doctype/timesheet_detail/locale/es-doc.json b/projects/doctype/timesheet_detail/locale/es-doc.json
deleted file mode 100644
index 0a28e7f..0000000
--- a/projects/doctype/timesheet_detail/locale/es-doc.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- "Activity Type": "Tipo de actividad",
- "Actual End Time": "Hora de finalizaci\u00f3n real",
- "Actual Start Time": "Tiempo real de inicio",
- "Additional Info": "Informaci\u00f3n adicional",
- "Customer Name": "Nombre del cliente",
- "Project": "Proyecto",
- "Projects": "Proyectos",
- "Task Id": "Tarea Id",
- "Task Name": "Nombre de tarea",
- "Timesheet Detail": "Detalle de parte de horas",
- "Total Hours (Actual)": "Horas totales (real)"
-}
\ No newline at end of file
diff --git a/projects/doctype/timesheet_detail/locale/fr-doc.json b/projects/doctype/timesheet_detail/locale/fr-doc.json
deleted file mode 100644
index 269ede8..0000000
--- a/projects/doctype/timesheet_detail/locale/fr-doc.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- "Activity Type": "Type d'activit\u00e9",
- "Actual End Time": "Heure de fin r\u00e9elle",
- "Actual Start Time": "Heure de d\u00e9but r\u00e9elle",
- "Additional Info": "Informations additionnelles \u00e0",
- "Customer Name": "Nom du client",
- "Project": "Projet",
- "Projects": "Projets",
- "Task Id": "T\u00e2che Id",
- "Task Name": "Nom de la t\u00e2che",
- "Timesheet Detail": "D\u00e9tail des feuilles de temps",
- "Total Hours (Actual)": "Total des heures (r\u00e9elles)"
-}
\ No newline at end of file
diff --git a/projects/doctype/timesheet_detail/locale/hi-doc.json b/projects/doctype/timesheet_detail/locale/hi-doc.json
deleted file mode 100644
index 4d34871..0000000
--- a/projects/doctype/timesheet_detail/locale/hi-doc.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- "Activity Type": "\u0917\u0924\u093f\u0935\u093f\u0927\u093f \u092a\u094d\u0930\u0915\u093e\u0930",
- "Actual End Time": "\u0935\u093e\u0938\u094d\u0924\u0935\u093f\u0915 \u0905\u0902\u0924 \u0938\u092e\u092f",
- "Actual Start Time": "\u0935\u093e\u0938\u094d\u0924\u0935\u093f\u0915 \u092a\u094d\u0930\u093e\u0930\u0902\u092d \u0938\u092e\u092f",
- "Additional Info": "\u0905\u0924\u093f\u0930\u093f\u0915\u094d\u0924 \u091c\u093e\u0928\u0915\u093e\u0930\u0940",
- "Customer Name": "\u0917\u094d\u0930\u093e\u0939\u0915 \u0915\u093e \u0928\u093e\u092e",
- "Project": "\u092a\u0930\u093f\u092f\u094b\u091c\u0928\u093e",
- "Projects": "\u092a\u0930\u093f\u092f\u094b\u091c\u0928\u093e\u0913\u0902",
- "Task Id": "\u091f\u093e\u0938\u094d\u0915 \u0906\u0908\u0921\u0940",
- "Task Name": "\u0915\u093e\u0930\u094d\u092f \u0915\u093e \u0928\u093e\u092e",
- "Timesheet Detail": "Timesheet \u0935\u093f\u0938\u094d\u0924\u093e\u0930",
- "Total Hours (Actual)": "\u0915\u0941\u0932 \u0918\u0902\u091f\u0947 (\u0935\u093e\u0938\u094d\u0924\u0935\u093f\u0915)"
-}
\ No newline at end of file
diff --git a/projects/doctype/timesheet_detail/locale/hr-doc.json b/projects/doctype/timesheet_detail/locale/hr-doc.json
deleted file mode 100644
index d19276a..0000000
--- a/projects/doctype/timesheet_detail/locale/hr-doc.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- "Activity Type": "Aktivnost Tip",
- "Actual End Time": "Stvarni Vrijeme zavr\u0161etka",
- "Actual Start Time": "Stvarni Vrijeme po\u010detka",
- "Additional Info": "Dodatne informacije",
- "Customer Name": "Naziv klijenta",
- "Project": "Projekt",
- "Projects": "Projekti",
- "Task Id": "Zadatak Id",
- "Task Name": "Zadatak Ime",
- "Timesheet Detail": "Timesheet Detalj",
- "Total Hours (Actual)": "Ukupno vrijeme (Stvarni)"
-}
\ No newline at end of file
diff --git a/projects/doctype/timesheet_detail/locale/nl-doc.json b/projects/doctype/timesheet_detail/locale/nl-doc.json
deleted file mode 100644
index 8305440..0000000
--- a/projects/doctype/timesheet_detail/locale/nl-doc.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- "Activity Type": "Activiteit Type",
- "Actual End Time": "Werkelijke Eindtijd",
- "Actual Start Time": "Werkelijke Starttijd",
- "Additional Info": "Extra informatie",
- "Customer Name": "Klantnaam",
- "Project": "Project",
- "Projects": "Projecten",
- "Task Id": "Taak-id",
- "Task Name": "Taaknaam",
- "Timesheet Detail": "Timesheet Detail",
- "Total Hours (Actual)": "Totaal uren (werkelijke)"
-}
\ No newline at end of file
diff --git a/projects/doctype/timesheet_detail/locale/pt-BR-doc.json b/projects/doctype/timesheet_detail/locale/pt-BR-doc.json
deleted file mode 100644
index b11f35a..0000000
--- a/projects/doctype/timesheet_detail/locale/pt-BR-doc.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- "Activity Type": "Tipo da Atividade",
- "Actual End Time": "Tempos Final Real",
- "Actual Start Time": "Hor\u00e1rio de In\u00edcio Real",
- "Additional Info": "Informa\u00e7\u00f5es Adicionais",
- "Customer Name": "Nome do cliente",
- "Project": "Projeto",
- "Projects": "Projetos",
- "Task Id": "ID da Tarefa",
- "Task Name": "Nome da Tarefa",
- "Timesheet Detail": "Detalhe do Quadro de Hor\u00e1rios",
- "Total Hours (Actual)": "Total de Horas (Real)"
-}
\ No newline at end of file
diff --git a/projects/doctype/timesheet_detail/locale/pt-doc.json b/projects/doctype/timesheet_detail/locale/pt-doc.json
deleted file mode 100644
index b2dcf2b..0000000
--- a/projects/doctype/timesheet_detail/locale/pt-doc.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- "Activity Type": "Tipo de Atividade",
- "Actual End Time": "Fim dos Tempos real",
- "Actual Start Time": "Hor\u00e1rio de in\u00edcio real",
- "Additional Info": "Informa\u00e7\u00f5es Adicionais",
- "Customer Name": "Nome do cliente",
- "Project": "Projeto",
- "Projects": "Projetos",
- "Task Id": "Tarefa Id",
- "Task Name": "Nome da Tarefa",
- "Timesheet Detail": "Detalhe de quadro de hor\u00e1rios",
- "Total Hours (Actual)": "Total de Horas (Real)"
-}
\ No newline at end of file
diff --git a/projects/doctype/timesheet_detail/locale/sr-doc.json b/projects/doctype/timesheet_detail/locale/sr-doc.json
deleted file mode 100644
index b29f234..0000000
--- a/projects/doctype/timesheet_detail/locale/sr-doc.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- "Activity Type": "\u0410\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442 \u0422\u0438\u043f",
- "Actual End Time": "\u0421\u0443\u043d\u0446\u0435 \u041a\u0440\u0430\u0458\u045a\u0435 \u0432\u0440\u0435\u043c\u0435",
- "Actual Start Time": "\u0421\u0443\u043d\u0446\u0435 \u0421\u0442\u0430\u0440\u0442 \u0422\u0438\u043c\u0435",
- "Additional Info": "\u0414\u043e\u0434\u0430\u0442\u043d\u0438 \u043f\u043e\u0434\u0430\u0446\u0438",
- "Customer Name": "\u0418\u043c\u0435 \u043a\u043b\u0438\u0458\u0435\u043d\u0442\u0430",
- "Project": "\u041f\u0440\u043e\u0458\u0435\u043a\u0430\u0442",
- "Projects": "\u041f\u0440\u043e\u0458\u0435\u043a\u0442\u0438",
- "Task Id": "\u0417\u0430\u0434\u0430\u0442\u0430\u043a \u0418\u0434",
- "Task Name": "\u041d\u0430\u0437\u0438\u0432 \u0437\u0430\u0434\u0430\u0442\u043a\u0430",
- "Timesheet Detail": "\u0422\u0438\u043c\u0435\u0441\u0445\u0435\u0435\u0442 \u0414\u0435\u0442\u0430\u0459",
- "Total Hours (Actual)": "\u0423\u043a\u0443\u043f\u043d\u043e \u0432\u0440\u0435\u043c\u0435 (\u0421\u0443\u043d\u0446\u0435)"
-}
\ No newline at end of file
diff --git a/projects/doctype/timesheet_detail/locale/ta-doc.json b/projects/doctype/timesheet_detail/locale/ta-doc.json
deleted file mode 100644
index d6abb7f..0000000
--- a/projects/doctype/timesheet_detail/locale/ta-doc.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- "Activity Type": "\u0ba8\u0b9f\u0bb5\u0b9f\u0bbf\u0b95\u0bcd\u0b95\u0bc8 \u0bb5\u0b95\u0bc8",
- "Actual End Time": "\u0b89\u0ba3\u0bcd\u0bae\u0bc8\u0baf\u0bbe\u0ba9 \u0bae\u0bc1\u0b9f\u0bbf\u0bb5\u0bc1 \u0ba8\u0bc7\u0bb0\u0bae\u0bcd",
- "Actual Start Time": "\u0b89\u0ba3\u0bcd\u0bae\u0bc8\u0baf\u0bbe\u0ba9 \u0ba4\u0bc6\u0bbe\u0b9f\u0b95\u0bcd\u0b95 \u0ba8\u0bc7\u0bb0\u0bae\u0bcd",
- "Additional Info": "\u0b95\u0bc2\u0b9f\u0bc1\u0ba4\u0bb2\u0bcd \u0ba4\u0b95\u0bb5\u0bb2\u0bcd",
- "Customer Name": "\u0bb5\u0bbe\u0b9f\u0bbf\u0b95\u0bcd\u0b95\u0bc8\u0baf\u0bbe\u0bb3\u0bb0\u0bcd \u0baa\u0bc6\u0baf\u0bb0\u0bcd",
- "Project": "\u0ba4\u0bbf\u0b9f\u0bcd\u0b9f\u0bae\u0bcd",
- "Projects": "\u0ba4\u0bbf\u0b9f\u0bcd\u0b9f\u0b99\u0bcd\u0b95\u0bb3\u0bcd",
- "Task Id": "\u0baa\u0ba3\u0bbf \u0b85\u0b9f\u0bc8\u0baf\u0bbe\u0bb3\u0bae\u0bcd",
- "Task Name": "\u0baa\u0ba3\u0bbf \u0baa\u0bc6\u0baf\u0bb0\u0bcd",
- "Timesheet Detail": "Timesheet \u0bb5\u0bbf\u0bb0\u0bbf\u0bb5\u0bbe\u0b95",
- "Total Hours (Actual)": "\u0bae\u0bc6\u0bbe\u0ba4\u0bcd\u0ba4 \u0ba8\u0bc7\u0bb0\u0bae\u0bcd (\u0b85\u0b9a\u0bb2\u0bcd)"
-}
\ No newline at end of file
diff --git a/projects/doctype/timesheet_detail/locale/th-doc.json b/projects/doctype/timesheet_detail/locale/th-doc.json
deleted file mode 100644
index 197e90f..0000000
--- a/projects/doctype/timesheet_detail/locale/th-doc.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- "Activity Type": "\u0e1b\u0e23\u0e30\u0e40\u0e20\u0e17\u0e01\u0e34\u0e08\u0e01\u0e23\u0e23\u0e21",
- "Actual End Time": "\u0e40\u0e27\u0e25\u0e32\u0e2a\u0e34\u0e49\u0e19\u0e2a\u0e38\u0e14\u0e08\u0e23\u0e34\u0e07",
- "Actual Start Time": "\u0e40\u0e27\u0e25\u0e32\u0e40\u0e23\u0e34\u0e48\u0e21\u0e15\u0e49\u0e19\u0e08\u0e23\u0e34\u0e07",
- "Additional Info": "\u0e02\u0e49\u0e2d\u0e21\u0e39\u0e25\u0e40\u0e1e\u0e34\u0e48\u0e21\u0e40\u0e15\u0e34\u0e21",
- "Customer Name": "\u0e0a\u0e37\u0e48\u0e2d\u0e25\u0e39\u0e01\u0e04\u0e49\u0e32",
- "Project": "\u0e42\u0e04\u0e23\u0e07\u0e01\u0e32\u0e23",
- "Projects": "\u0e42\u0e04\u0e23\u0e07\u0e01\u0e32\u0e23",
- "Task Id": "\u0e23\u0e2b\u0e31\u0e2a\u0e07\u0e32\u0e19",
- "Task Name": "\u0e0a\u0e37\u0e48\u0e2d\u0e07\u0e32\u0e19",
- "Timesheet Detail": "\u0e23\u0e32\u0e22\u0e25\u0e30\u0e40\u0e2d\u0e35\u0e22\u0e14 Timesheet",
- "Total Hours (Actual)": "\u0e0a\u0e31\u0e48\u0e27\u0e42\u0e21\u0e07\u0e23\u0e27\u0e21 (\u0e08\u0e23\u0e34\u0e07)"
-}
\ No newline at end of file
diff --git a/projects/doctype/timesheet_detail/timesheet_detail.py b/projects/doctype/timesheet_detail/timesheet_detail.py
deleted file mode 100644
index 7f48feb..0000000
--- a/projects/doctype/timesheet_detail/timesheet_detail.py
+++ /dev/null
@@ -1,22 +0,0 @@
-# ERPNext - web based ERP (http://erpnext.com)
-# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-from __future__ import unicode_literals
-import webnotes
-
-class DocType:
- def __init__(self, d, dl):
- self.doc, self.doclist = d, dl
\ No newline at end of file
diff --git a/projects/doctype/timesheet_detail/timesheet_detail.txt b/projects/doctype/timesheet_detail/timesheet_detail.txt
deleted file mode 100644
index b99425b..0000000
--- a/projects/doctype/timesheet_detail/timesheet_detail.txt
+++ /dev/null
@@ -1,132 +0,0 @@
-[
- {
- "creation": "2013-01-10 16:34:18",
- "docstatus": 0,
- "modified": "2013-01-22 14:50:09",
- "modified_by": "Administrator",
- "owner": "Administrator"
- },
- {
- "autoname": "TSD.#####",
- "doctype": "DocType",
- "istable": 1,
- "module": "Projects",
- "name": "__common__"
- },
- {
- "doctype": "DocField",
- "name": "__common__",
- "parent": "Timesheet Detail",
- "parentfield": "fields",
- "parenttype": "DocType",
- "permlevel": 0
- },
- {
- "doctype": "DocType",
- "name": "Timesheet Detail"
- },
- {
- "doctype": "DocField",
- "fieldname": "act_start_time",
- "fieldtype": "Time",
- "label": "Actual Start Time",
- "oldfieldname": "act_start_time",
- "oldfieldtype": "Time",
- "print_width": "160px",
- "reqd": 1,
- "width": "160px"
- },
- {
- "doctype": "DocField",
- "fieldname": "act_end_time",
- "fieldtype": "Time",
- "label": "Actual End Time",
- "oldfieldname": "act_end_time",
- "oldfieldtype": "Time",
- "print_width": "160px",
- "reqd": 1,
- "width": "160px"
- },
- {
- "doctype": "DocField",
- "fieldname": "activity_type",
- "fieldtype": "Link",
- "label": "Activity Type",
- "options": "Activity Type",
- "print_width": "200px",
- "reqd": 1,
- "search_index": 0,
- "width": "200px"
- },
- {
- "doctype": "DocField",
- "fieldname": "other_details",
- "fieldtype": "Text",
- "label": "Additional Info",
- "oldfieldname": "other_details",
- "oldfieldtype": "Text",
- "print_width": "200px",
- "width": "200px"
- },
- {
- "doctype": "DocField",
- "fieldname": "act_total_hrs",
- "fieldtype": "Data",
- "label": "Total Hours (Actual)",
- "oldfieldname": "act_total_hrs",
- "oldfieldtype": "Data",
- "print_width": "100px",
- "read_only": 1,
- "width": "100px"
- },
- {
- "doctype": "DocField",
- "fieldname": "customer_name",
- "fieldtype": "Link",
- "label": "Customer Name",
- "oldfieldname": "customer_name",
- "oldfieldtype": "Data",
- "options": "Customer",
- "print_width": "150px",
- "width": "150px"
- },
- {
- "doctype": "DocField",
- "fieldname": "project_name",
- "fieldtype": "Link",
- "in_filter": 1,
- "label": "Project",
- "oldfieldname": "project_name",
- "oldfieldtype": "Link",
- "options": "Project",
- "print_width": "150px",
- "reqd": 0,
- "search_index": 1,
- "width": "150px"
- },
- {
- "doctype": "DocField",
- "fieldname": "task_id",
- "fieldtype": "Link",
- "in_filter": 1,
- "label": "Task Id",
- "oldfieldname": "task_id",
- "oldfieldtype": "Link",
- "options": "Task",
- "print_width": "150px",
- "search_index": 1,
- "width": "150px"
- },
- {
- "doctype": "DocField",
- "fieldname": "task_name",
- "fieldtype": "Data",
- "label": "Task Name",
- "oldfieldname": "task_name",
- "oldfieldtype": "Link",
- "print_width": "250px",
- "reqd": 0,
- "search_index": 0,
- "width": "250px"
- }
-]
\ No newline at end of file
diff --git a/projects/page/projects/__init__.py b/projects/page/projects/__init__.py
deleted file mode 100644
index baffc48..0000000
--- a/projects/page/projects/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-from __future__ import unicode_literals
diff --git a/projects/page/projects/projects.css b/projects/page/projects/projects.css
deleted file mode 100644
index 2fc9c27..0000000
--- a/projects/page/projects/projects.css
+++ /dev/null
@@ -1,6 +0,0 @@
-.gantt {
- -moz-box-sizing: border-box;
- border: 14px solid #DDDDDD;
- border-radius: 6px 6px 6px 6px;
- margin: 20px auto;
-}
\ No newline at end of file
diff --git a/projects/page/projects/projects.html b/projects/page/projects/projects.html
deleted file mode 100644
index e69de29..0000000
--- a/projects/page/projects/projects.html
+++ /dev/null
diff --git a/projects/page/projects/projects.js b/projects/page/projects/projects.js
deleted file mode 100644
index ef81718..0000000
--- a/projects/page/projects/projects.js
+++ /dev/null
@@ -1,24 +0,0 @@
-// ERPNext - web based ERP (http://erpnext.com)
-// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-pscript.onload_Projects = function(wrapper) {
- wn.ui.make_app_page({parent:wrapper, title:'Gantt Chart: All Tasks', single_column:true});
- if(!erpnext.show_task_gantt)
- wn.require('app/js/gantt_task.js');
-
- var gantt_area = $('<div>').appendTo($(wrapper).find('.layout-main'));
- erpnext.show_task_gantt(gantt_area);
-}
\ No newline at end of file
diff --git a/projects/page/projects/projects.py b/projects/page/projects/projects.py
deleted file mode 100644
index 5949518..0000000
--- a/projects/page/projects/projects.py
+++ /dev/null
@@ -1,29 +0,0 @@
-# ERPNext - web based ERP (http://erpnext.com)
-# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-from __future__ import unicode_literals
-import webnotes
-
-@webnotes.whitelist()
-def get_tasks():
- cond = ''
- if webnotes.form_dict.get('project'):
- cond = ' and project="%s"' % webnotes.form_dict.get('project')
- return webnotes.conn.sql("""select name, project, subject, exp_start_date, exp_end_date,
- description, status from tabTask where
- project is not null
- and exp_start_date is not null
- and exp_end_date is not null %s""" % cond, as_dict=True)
\ No newline at end of file
diff --git a/projects/page/projects/projects.txt b/projects/page/projects/projects.txt
deleted file mode 100644
index 170134e..0000000
--- a/projects/page/projects/projects.txt
+++ /dev/null
@@ -1,31 +0,0 @@
-[
- {
- "owner": "Administrator",
- "docstatus": 0,
- "creation": "2012-06-14 18:44:57",
- "modified_by": "Administrator",
- "modified": "2013-01-09 17:19:26"
- },
- {
- "name": "__common__",
- "doctype": "Page",
- "module": "Projects",
- "standard": "Yes",
- "page_name": "Projects"
- },
- {
- "name": "__common__",
- "parent": "Projects",
- "doctype": "Page Role",
- "parenttype": "Page",
- "role": "Projects User",
- "parentfield": "roles"
- },
- {
- "name": "Projects",
- "doctype": "Page"
- },
- {
- "doctype": "Page Role"
- }
-]
\ No newline at end of file
diff --git a/projects/search_criteria/__init__.py b/projects/search_criteria/__init__.py
deleted file mode 100644
index baffc48..0000000
--- a/projects/search_criteria/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-from __future__ import unicode_literals
diff --git a/projects/search_criteria/projectwise_delivered_qty_and_costs/__init__.py b/projects/search_criteria/projectwise_delivered_qty_and_costs/__init__.py
deleted file mode 100644
index baffc48..0000000
--- a/projects/search_criteria/projectwise_delivered_qty_and_costs/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-from __future__ import unicode_literals
diff --git a/projects/search_criteria/projectwise_delivered_qty_and_costs/projectwise_delivered_qty_and_costs.js b/projects/search_criteria/projectwise_delivered_qty_and_costs/projectwise_delivered_qty_and_costs.js
deleted file mode 100644
index c8b42dc..0000000
--- a/projects/search_criteria/projectwise_delivered_qty_and_costs/projectwise_delivered_qty_and_costs.js
+++ /dev/null
@@ -1,32 +0,0 @@
-// ERPNext - web based ERP (http://erpnext.com)
-// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-report.customize_filters = function() {
- this.hide_all_filters();
-
- //this.add_filter({fieldname:'item_code', label:'Item Code', fieldtype:'Link', options:'Item',ignore : 1,parent:'Delivery Note Item'});
-
- this.filter_fields_dict['Delivery Note'+FILTER_SEP +'Project Name'].df.filter_hide = 0;
- this.filter_fields_dict['Delivery Note'+FILTER_SEP +'Company'].df.filter_hide = 0;
- this.filter_fields_dict['Delivery Note'+FILTER_SEP +'Fiscal Year'].df.filter_hide = 0;
- this.filter_fields_dict['Delivery Note'+FILTER_SEP +'Customer'].df.filter_hide = 0;
- this.filter_fields_dict['Delivery Note'+FILTER_SEP +'Customer Name'].df.filter_hide = 0;
-
- this.filter_fields_dict['Delivery Note'+FILTER_SEP +'Project Name'].df.in_first_page = 1;
-
- this.filter_fields_dict['Delivery Note'+FILTER_SEP +'Company'].df['report_default'] = sys_defaults.company;
- this.filter_fields_dict['Delivery Note'+FILTER_SEP +'Fiscal Year'].df['report_default'] = sys_defaults.fiscal_year;
-}
diff --git a/projects/search_criteria/projectwise_delivered_qty_and_costs/projectwise_delivered_qty_and_costs.txt b/projects/search_criteria/projectwise_delivered_qty_and_costs/projectwise_delivered_qty_and_costs.txt
deleted file mode 100644
index b2ecb6c..0000000
--- a/projects/search_criteria/projectwise_delivered_qty_and_costs/projectwise_delivered_qty_and_costs.txt
+++ /dev/null
@@ -1,28 +0,0 @@
-[
- {
- "owner": "harshada@webnotestech.com",
- "docstatus": 0,
- "creation": "2012-04-03 12:49:52",
- "modified_by": "Administrator",
- "modified": "2012-04-03 12:49:52"
- },
- {
- "parent_doc_type": "Delivery Note",
- "module": "Projects",
- "standard": "Yes",
- "sort_order": "DESC",
- "filters": "{'Delivery Note\u0001Submitted':1,'Delivery Note\u0001Status':'Submitted','Delivery Note\u0001Fiscal Year':''}",
- "doc_type": "Delivery Note Item",
- "name": "__common__",
- "add_cond": "IFNULL(`tabDelivery Note`.`project_name`,\"\")!=\"\"",
- "doctype": "Search Criteria",
- "sort_by": "`tabDelivery Note`.`name`",
- "page_len": 50,
- "criteria_name": "Projectwise Delivered Qty and Costs",
- "columns": "Delivery Note\u0001ID,Delivery Note\u0001Project Name,Delivery Note\u0001Customer,Delivery Note\u0001Customer Name,Delivery Note Item\u0001Item Code,Delivery Note Item\u0001Item Name,Delivery Note Item\u0001Quantity,Delivery Note\u0001Posting Date,Delivery Note\u0001% Billed,Delivery Note Item\u0001Amount*"
- },
- {
- "name": "projectwise_delivered_qty_and_costs",
- "doctype": "Search Criteria"
- }
-]
\ No newline at end of file
diff --git a/projects/search_criteria/projectwise_pending_qty_and_costs/__init__.py b/projects/search_criteria/projectwise_pending_qty_and_costs/__init__.py
deleted file mode 100644
index baffc48..0000000
--- a/projects/search_criteria/projectwise_pending_qty_and_costs/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-from __future__ import unicode_literals
diff --git a/projects/search_criteria/projectwise_pending_qty_and_costs/projectwise_pending_qty_and_costs.js b/projects/search_criteria/projectwise_pending_qty_and_costs/projectwise_pending_qty_and_costs.js
deleted file mode 100644
index ce56077..0000000
--- a/projects/search_criteria/projectwise_pending_qty_and_costs/projectwise_pending_qty_and_costs.js
+++ /dev/null
@@ -1,31 +0,0 @@
-// ERPNext - web based ERP (http://erpnext.com)
-// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-report.customize_filters = function() {
- this.hide_all_filters();
-
- //this.add_filter({fieldname:'item_code', label:'Item Code', fieldtype:'Link', options:'Item',ignore : 1,parent:'Sales Order Item'});
-
- this.filter_fields_dict['Sales Order'+FILTER_SEP +'Project Name'].df.filter_hide = 0;
- this.filter_fields_dict['Sales Order'+FILTER_SEP +'Company'].df.filter_hide = 0;
- this.filter_fields_dict['Sales Order'+FILTER_SEP +'Fiscal Year'].df.filter_hide = 0;
- this.filter_fields_dict['Sales Order'+FILTER_SEP +'Customer'].df.filter_hide = 0;
- this.filter_fields_dict['Sales Order'+FILTER_SEP +'Customer Name'].df.filter_hide = 0;
- this.filter_fields_dict['Sales Order'+FILTER_SEP +'Project Name'].df.in_first_page = 1;
-
- this.filter_fields_dict['Sales Order'+FILTER_SEP +'Company'].df['report_default'] = sys_defaults.company;
- this.filter_fields_dict['Sales Order'+FILTER_SEP +'Fiscal Year'].df['report_default'] = sys_defaults.fiscal_year;
-}
diff --git a/projects/search_criteria/projectwise_pending_qty_and_costs/projectwise_pending_qty_and_costs.txt b/projects/search_criteria/projectwise_pending_qty_and_costs/projectwise_pending_qty_and_costs.txt
deleted file mode 100644
index 37b6294..0000000
--- a/projects/search_criteria/projectwise_pending_qty_and_costs/projectwise_pending_qty_and_costs.txt
+++ /dev/null
@@ -1,29 +0,0 @@
-[
- {
- "owner": "ashwini@webnotestech.com",
- "docstatus": 0,
- "creation": "2012-04-03 12:49:52",
- "modified_by": "Administrator",
- "modified": "2012-04-03 12:49:52"
- },
- {
- "add_col": "SUM(`tabSales Order Item`.`qty` - `tabSales Order Item`.`delivered_qty`) AS 'Pending Qty'\nSUM((`tabSales Order Item`.`qty` - `tabSales Order Item`.`delivered_qty`)* `tabSales Order Item`.basic_rate) AS 'Pending Amount'",
- "parent_doc_type": "Sales Order",
- "module": "Projects",
- "standard": "Yes",
- "sort_order": "DESC",
- "filters": "{'Sales Order\u0001Submitted':1,'Sales Order\u0001Status':'Submitted','Sales Order\u0001Fiscal Year':''}",
- "doc_type": "Sales Order Item",
- "name": "__common__",
- "add_cond": "`tabSales Order Item`.`qty` > `tabSales Order Item`.`delivered_qty`\nIFNULL(`tabSales Order`.`project_name`,\"\")!=\"\"\n`tabSales Order`.order_type = 'Sales'",
- "doctype": "Search Criteria",
- "sort_by": "`tabSales Order`.`name`",
- "page_len": 50,
- "criteria_name": "Projectwise Pending Qty and Costs",
- "columns": "Sales Order\u0001ID,Sales Order\u0001Project Name,Sales Order\u0001Customer,Sales Order\u0001Customer Name,Sales Order Item\u0001Item Code,Sales Order Item\u0001Item Name,Sales Order\u0001% Delivered,Sales Order\u0001% Billed,Sales Order\u0001Sales Order Date,Sales Order\u0001Expected Delivery Date"
- },
- {
- "name": "projectwise_pending_qty_and_costs",
- "doctype": "Search Criteria"
- }
-]
\ No newline at end of file
diff --git a/projects/search_criteria/projectwise_purchase_details/__init__.py b/projects/search_criteria/projectwise_purchase_details/__init__.py
deleted file mode 100644
index baffc48..0000000
--- a/projects/search_criteria/projectwise_purchase_details/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-from __future__ import unicode_literals
diff --git a/projects/search_criteria/projectwise_purchase_details/projectwise_purchase_details.js b/projects/search_criteria/projectwise_purchase_details/projectwise_purchase_details.js
deleted file mode 100644
index bd4be54..0000000
--- a/projects/search_criteria/projectwise_purchase_details/projectwise_purchase_details.js
+++ /dev/null
@@ -1,108 +0,0 @@
-// ERPNext - web based ERP (http://erpnext.com)
-// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-report.customize_filters = function() {
- //hide all filters
- //------------------------------------------------
- this.hide_all_filters();
-
- //add filters
- //------------------------------------------------
- this.add_filter({fieldname:'based_on', label:'Based On', fieldtype:'Select', options:'Purchase Order'+NEWLINE+'Purchase Invoice'+NEWLINE+'Purchase Receipt',report_default:'Purchase Order',ignore : 1,parent:'Purchase Order', single_select:1});
-
- this.add_filter({fieldname:'purchase_order', label:'Purchase Order', fieldtype:'Link', options:'Purchase Order', ignore : 1, parent:'Purchase Order'});
- this.add_filter({fieldname:'purchase_receipt', label:'Purchase Receipt',fieldtype:'Link', options:'Purchase Receipt',ignore : 1, parent:'Purchase Order'});
- this.add_filter({fieldname:'purchase_invoice', label:'Purchase Invoice',fieldtype:'Link', options:'Purchase Invoice',ignore : 1, parent:'Purchase Order'});
-
- //unhide filters
- //------------------------------------------------
- this.filter_fields_dict['Purchase Order'+FILTER_SEP +'Project Name'].df.filter_hide = 0;
- this.filter_fields_dict['Purchase Order'+FILTER_SEP +'Company'].df.filter_hide = 0;
- this.filter_fields_dict['Purchase Order'+FILTER_SEP +'Fiscal Year'].df.filter_hide = 0;
-
- //move filter field in first page
- //------------------------------------------------
- this.filter_fields_dict['Purchase Order'+FILTER_SEP +'Based On'].df.in_first_page = 1;
- this.filter_fields_dict['Purchase Order'+FILTER_SEP +'Project Name'].df.in_first_page = 1;
- this.filter_fields_dict['Purchase Order'+FILTER_SEP +'Purchase Order'].df.in_first_page = 1;
- this.filter_fields_dict['Purchase Order'+FILTER_SEP +'Purchase Invoice'].df.in_first_page = 1;
- this.filter_fields_dict['Purchase Order'+FILTER_SEP +'Purchase Receipt'].df.in_first_page = 1;
-
- // default values
- //------------------------------------------------
- this.filter_fields_dict['Purchase Order'+FILTER_SEP +'Company'].df['report_default'] = sys_defaults.company;
- this.filter_fields_dict['Purchase Order'+FILTER_SEP +'Fiscal Year'].df['report_default'] = sys_defaults.fiscal_year;
-}
-
-//hide select columns field
-//------------------------------------------------
-this.mytabs.items['Select Columns'].hide();
-
-
-report.get_query = function() {
-
- //get filter values
- based_on = this.filter_fields_dict['Purchase Order'+FILTER_SEP+'Based On'].get_value();
- purchase_order = this.filter_fields_dict['Purchase Order'+FILTER_SEP+'Purchase Order'].get_value();
- purchase_invoice = this.filter_fields_dict['Purchase Order'+FILTER_SEP+'Purchase Invoice'].get_value();
- purchase_receipt = this.filter_fields_dict['Purchase Order'+FILTER_SEP+'Purchase Receipt'].get_value();
- project_name = this.filter_fields_dict['Purchase Order'+FILTER_SEP+'Project Name'].get_value();
- company = this.filter_fields_dict['Purchase Order'+FILTER_SEP+'Company'].get_value();
- fy = this.filter_fields_dict['Purchase Order'+FILTER_SEP+'Fiscal Year'].get_value();
-
- // make query based on transaction
- //-------------------------------------------------------------------------------------------
-
- var cond = '';
- //for purchase order
- if(based_on == 'Purchase Order'){
-
- if(purchase_order) cond += ' AND `tabPurchase Order`.name = "'+purchase_order+'"';
- if(project_name) cond += ' AND `tabPurchase Order`.project_name = "'+project_name+'"';
- if(company) cond += ' AND `tabPurchase Order`.company = "'+company+'"';
- if(fy !='') cond += ' AND `tabPurchase Order`.fiscal_year = "'+fy+'"';
-
- var q = 'SELECT DISTINCT `tabPurchase Order`.name, `tabPurchase Order`.status, `tabPurchase Order`.project_name, `tabPurchase Order`.supplier,`tabPurchase Order`.supplier_name,`tabPurchase Order`.per_received, `tabPurchase Order`.per_billed, `tabPurchase Order`.grand_total FROM `tabPurchase Order` WHERE IFNULL(`tabPurchase Order`.project_name,"") != ""'+cond+' AND `tabPurchase Order`.docstatus != 2';
- return q;
- }
-
- //for purchase receipt
- else if(based_on == 'Purchase Receipt'){
- if(purchase_order) cond += ' t2.purchase_order = "'+purchase_order+'" AND ';
- if(purchase_receipt) cond += ' t1.name = "'+purchase_receipt+'" AND ';
- if(project_name) cond += ' t1.project_name = "'+project_name+'" AND ';
- if(company) cond += ' t1.company = "'+company+'" AND ';
- if(fy !='') cond += ' t1.fiscal_year = "'+fy+'" AND ';
-
-
- var q = 'SELECT DISTINCT t1.name, t1.status, t1.project_name, t1.supplier, t1.supplier_name,t1.grand_total FROM `tabPurchase Receipt` t1, `tabPurchase Receipt Item` t2 WHERE '+cond +'IFNULL(t1.project_name,"") !="" AND t1.docstatus != 2 AND t1.name = t2.parent';
-
- return q;
- }
- //for purchase invoice
- else if(based_on == 'Purchase Invoice'){
- if(purchase_order) cond += ' t2.purchase_order = "'+purchase_order+'" AND ';
- if(purchase_receipt) cond += ' t2.purchase_receipt = "'+purchase_receipt+'" AND';
- if(purchase_invoice) cond += ' t1.name = "'+purchase_invoice+'" AND';
- if(project_name) cond += ' t1.project_name = "'+project_name+'" AND ';
- if(company) cond += ' t1.company = "'+company+'" AND ';
- if(fy !='') cond += ' t1.fiscal_year = "'+fy+'" AND ';
-
- var q = 'SELECT DISTINCT t1.name , t1.credit_to , t1.project_name, t1.supplier, t1.supplier_name , t1.grand_total FROM `tabPurchase Invoice` t1, `tabPurchase Invoice Item` t2 WHERE '+cond +'IFNULL(t1.project_name,"") !="" AND t1.docstatus != 2 AND t1.name = t2.parent';
-
- return q;
- }
-}
\ No newline at end of file
diff --git a/projects/search_criteria/projectwise_purchase_details/projectwise_purchase_details.py b/projects/search_criteria/projectwise_purchase_details/projectwise_purchase_details.py
deleted file mode 100644
index ed82ceb..0000000
--- a/projects/search_criteria/projectwise_purchase_details/projectwise_purchase_details.py
+++ /dev/null
@@ -1,40 +0,0 @@
-# ERPNext - web based ERP (http://erpnext.com)
-# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-from __future__ import unicode_literals
-based_on = filter_values.get('based_on')
-# make default columns
-#for r in res:
-col = []
-if based_on == 'Purchase Order':
- col = [['Purchase Order ID','Link','Purchase Order'],['Status','Data',''],['Project Name','Link','Project'],['Supplier','Link','Supplier'],['Supplier Name','Data',''],['% Received','Data',''],['% Billed','Data',''],['Grand Total','Currency','']]
-
-elif based_on == 'Purchase Invoice':
- col = [['Purchase Receipt ID','Link','Purchase Invoice'],['Status','Data',''],['Project Name','Link','Project'],['Supplier','Link','Supplier'],['Supplier Name','Data',''],['Grand Total','Currency','']]
-
-elif based_on == 'Purchase Receipt':
- col = [['Purchase Invoice ID','Link','Purchase Receipt'],['Credit To','Data',''],['Project Name','Link','Project'],['Supplier','Link','Supplier'],['Supplier Name','Data',''],['Grand Total','Currency','']]
-
-
-for c in col:
- colnames.append(c[0])
- coltypes.append(c[1])
- coloptions.append(c[2])
- l = (len(c[0])*9)
- if l < 150 : col_width = '150px'
- else: col_width = '%spx'%(l)
- colwidths.append(col_width)
- col_idx[c[0]] = len(colnames)-1
\ No newline at end of file
diff --git a/projects/search_criteria/projectwise_purchase_details/projectwise_purchase_details.txt b/projects/search_criteria/projectwise_purchase_details/projectwise_purchase_details.txt
deleted file mode 100644
index cb88f58..0000000
--- a/projects/search_criteria/projectwise_purchase_details/projectwise_purchase_details.txt
+++ /dev/null
@@ -1,24 +0,0 @@
-[
- {
- "owner": "ashwini@webnotestech.com",
- "docstatus": 0,
- "creation": "2012-04-03 12:49:52",
- "modified_by": "Administrator",
- "modified": "2012-04-03 12:49:52"
- },
- {
- "doc_type": "Purchase Order",
- "name": "__common__",
- "module": "Projects",
- "doctype": "Search Criteria",
- "sort_order": "DESC",
- "filters": "{'Purchase Order\u0001Status':'','Purchase Order\u0001Fiscal Year':''}",
- "page_len": 50,
- "criteria_name": "Projectwise Purchase Details",
- "standard": "Yes"
- },
- {
- "name": "projectwise_purchase_details",
- "doctype": "Search Criteria"
- }
-]
\ No newline at end of file
diff --git a/projects/search_criteria/projectwise_sales_details/__init__.py b/projects/search_criteria/projectwise_sales_details/__init__.py
deleted file mode 100644
index baffc48..0000000
--- a/projects/search_criteria/projectwise_sales_details/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-from __future__ import unicode_literals
diff --git a/projects/search_criteria/projectwise_sales_details/projectwise_sales_details.js b/projects/search_criteria/projectwise_sales_details/projectwise_sales_details.js
deleted file mode 100644
index 4e92c3c..0000000
--- a/projects/search_criteria/projectwise_sales_details/projectwise_sales_details.js
+++ /dev/null
@@ -1,112 +0,0 @@
-// ERPNext - web based ERP (http://erpnext.com)
-// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-report.customize_filters = function() {
- //hide all filters
- //------------------------------------------------
- this.hide_all_filters();
-
- //add filters
- //------------------------------------------------
- this.add_filter({fieldname:'based_on', label:'Based On', fieldtype:'Select', options:'Sales Order'+NEWLINE+'Delivery Note'+NEWLINE+'Sales Invoice',report_default:'Sales Order',ignore : 1,parent:'Sales Order', single_select:1});
-
- this.add_filter({fieldname:'sales_order', label:'Sales Order', fieldtype:'Link', options:'Sales Order', ignore : 1, parent:'Sales Order'});
- this.add_filter({fieldname:'delivery_note', label:'Delivery Note', fieldtype:'Link', options:'Delivery Note',ignore : 1, parent:'Sales Order'});
- this.add_filter({fieldname:'sales_invoice', label:'Sales Invoice',fieldtype:'Link', options:'Sales Invoice',ignore : 1, parent:'Sales Order'});
-
- //unhide filters
- //------------------------------------------------
- this.filter_fields_dict['Sales Order'+FILTER_SEP +'Project Name'].df.filter_hide = 0;
- this.filter_fields_dict['Sales Order'+FILTER_SEP +'Company'].df.filter_hide = 0;
- this.filter_fields_dict['Sales Order'+FILTER_SEP +'Fiscal Year'].df.filter_hide = 0;
- this.filter_fields_dict['Sales Order'+FILTER_SEP +'Customer'].df.filter_hide = 0;
-
- //move filter field in first page
- //------------------------------------------------
- this.filter_fields_dict['Sales Order'+FILTER_SEP +'Based On'].df.in_first_page = 1;
- this.filter_fields_dict['Sales Order'+FILTER_SEP +'Project Name'].df.in_first_page = 1;
- this.filter_fields_dict['Sales Order'+FILTER_SEP +'Sales Order'].df.in_first_page = 1;
- this.filter_fields_dict['Sales Order'+FILTER_SEP +'Delivery Note'].df.in_first_page = 1;
- this.filter_fields_dict['Sales Order'+FILTER_SEP +'Sales Invoice'].df.in_first_page = 1;
-
- // default values
- //------------------------------------------------
- this.filter_fields_dict['Sales Order'+FILTER_SEP +'Company'].df['report_default'] = sys_defaults.company;
- this.filter_fields_dict['Sales Order'+FILTER_SEP +'Fiscal Year'].df['report_default'] = sys_defaults.fiscal_year;
-
-}
-
-//hide select columns field
-//------------------------------------------------
-//this.mytabs.items['Select Columns'].hide();
-
-
-report.get_query = function() {
-
- //get filter values
- based_on = this.filter_fields_dict['Sales Order'+FILTER_SEP+'Based On'].get_value();
- sales_order = this.filter_fields_dict['Sales Order'+FILTER_SEP+'Sales Order'].get_value();
- delivery_note = this.filter_fields_dict['Sales Order'+FILTER_SEP+'Delivery Note'].get_value();
- sales_invoice = this.filter_fields_dict['Sales Order'+FILTER_SEP+'Sales Invoice'].get_value();
- project_name = this.filter_fields_dict['Sales Order'+FILTER_SEP+'Project Name'].get_value();
- company = this.filter_fields_dict['Sales Order'+FILTER_SEP+'Company'].get_value();
- fy = this.filter_fields_dict['Sales Order'+FILTER_SEP+'Fiscal Year'].get_value();
-
- // make query based on transaction
- //-------------------------------------------------------------------------------------------
-
- var cond = '';
- //for sales order
- if(based_on == 'Sales Order'){
-
- if(sales_order) cond += ' AND `tabSales Order`.name = "'+sales_order+'"';
- if(project_name) cond += ' AND `tabSales Order`.project_name = "'+project_name+'"';
- if(company) cond += ' AND `tabSales Order`.company = "'+company+'"';
- if(fy) cond += ' AND `tabSales Order`.fiscal_year = "'+fy+'"';
-
- var q = 'SELECT DISTINCT `tabSales Order`.name, `tabSales Order`.order_type, `tabSales Order`.status, `tabSales Order`.project_name, `tabSales Order`.customer,`tabSales Order`.customer_name,`tabSales Order`.per_delivered, `tabSales Order`.per_billed, `tabSales Order`.grand_total FROM `tabSales Order` WHERE IFNULL(`tabSales Order`.project_name,"") != ""'+cond+' AND `tabSales Order`.docstatus != 2';
- return q;
- }
-
- //for delivery note
- else if(based_on == 'Delivery Note'){
- if(sales_order) cond += ' t1.name = t2.parent AND t2.prevdoc_docname = "'+sales_order+'" AND ';
- if(delivery_note) cond += ' t1.name = "'+delivery_note+'" AND ';
- if(project_name) cond += ' t1.project_name = "'+project_name+'" AND ';
- if(company) cond += ' t1.company = "'+company+'" AND ';
- if(fy) cond += ' t1.fiscal_year = "'+fy+'" AND ';
-
- var q = 'SELECT DISTINCT t1.name, t1.status, t1.project_name, t1.customer, t1.customer_name, t1.per_billed, t1.per_installed, t1.grand_total FROM `tabDelivery Note` t1, `tabDelivery Note Item` t2 WHERE '+cond+' IFNULL(t1.project_name,"") !="" AND t1.docstatus != 2';
-
- return q;
- }
-
- //for sales invoice
- else if(based_on == 'Sales Invoice'){
- if(sales_order) cond += ' t2.sales_order = "'+sales_order+'" AND ';
- if(delivery_note) cond += ' t2.delivery_note = "'+delivery_note+'" AND ';
- if(sales_invoice) cond += ' t1.name = "'+sales_invoice+'" AND ';
- if(project_name) cond += ' t1.project_name = "'+project_name+'" AND ';
- if(company) cond += ' t1.company = "'+company+'" AND ';
- if(fy) cond += ' t1.fiscal_year = "'+fy+'" AND ';
-
-
- var q = 'SELECT DISTINCT t1.name , t1.debit_to , t1.project_name , t1.customer , t1.customer_name , t1.grand_total FROM `tabSales Invoice` t1, `tabSales Invoice Item` t2 WHERE '+cond +'IFNULL(t1.project_name,"") !="" AND t1.docstatus != 2 AND t1.name = t2.parent';
-
- return q;
- }
-
-}
\ No newline at end of file
diff --git a/projects/search_criteria/projectwise_sales_details/projectwise_sales_details.py b/projects/search_criteria/projectwise_sales_details/projectwise_sales_details.py
deleted file mode 100644
index 50ade66..0000000
--- a/projects/search_criteria/projectwise_sales_details/projectwise_sales_details.py
+++ /dev/null
@@ -1,37 +0,0 @@
-# ERPNext - web based ERP (http://erpnext.com)
-# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-from __future__ import unicode_literals
-based_on = filter_values.get('based_on')
-
-cols=[]
-
-if based_on == 'Sales Order':
- cols = [['Sales Order No','Link','150px','Sales Order'], ['Order Type','Data','100px',''], ['Status','Data','100px',''], ['Project Name','Link','150px','Project'], ['Customer','Link','150px','Customer'], ['Customer Name','Data','200px',''], ['% Delivered','Currency','100px',''], ['% Billed','Currency','100px',''], ['Grand Total','Currency','150px','']]
-
-elif based_on == 'Delivery Note':
- cols = [['Delivery Note No','Link','150px','Delivery Note'], ['Status','Data','100px',''], ['Project Name','Link','200px','Project'], ['Customer','Link','150px','Customer'], ['Customer Name','Data','200px',''], ['% Installed','Currency','100px',''], ['% Billed','Currency','100px',''], ['Grand Total','Currency','150px','']]
-
-elif based_on == 'Sales Invoice':
- cols = [['Sales Invoice No','Link','150px','Sales Invoice'], ['Debit To','Data','150px',''], ['Project Name','Link','200px','Project'], ['Customer','Link','150px','Customer'], ['Customer Name','Data','200px',''], ['Grand Total','Currency','150px','']]
-
-
-for c in cols:
- colnames.append(c[0])
- coltypes.append(c[1])
- colwidths.append(c[2])
- coloptions.append(c[3])
- col_idx[c[0]] = len(colnames)-1
\ No newline at end of file
diff --git a/projects/search_criteria/projectwise_sales_details/projectwise_sales_details.txt b/projects/search_criteria/projectwise_sales_details/projectwise_sales_details.txt
deleted file mode 100644
index 11a50a6..0000000
--- a/projects/search_criteria/projectwise_sales_details/projectwise_sales_details.txt
+++ /dev/null
@@ -1,24 +0,0 @@
-[
- {
- "owner": "harshada@webnotestech.com",
- "docstatus": 0,
- "creation": "2012-04-03 12:49:52",
- "modified_by": "Administrator",
- "modified": "2012-04-03 12:49:52"
- },
- {
- "doc_type": "Sales Order",
- "name": "__common__",
- "module": "Projects",
- "doctype": "Search Criteria",
- "sort_order": "DESC",
- "filters": "{'Sales Order\u0001Saved':1,'Sales Order\u0001Submitted':1,'Sales Order\u0001Status':''}",
- "page_len": 50,
- "criteria_name": "Projectwise Sales Details",
- "standard": "Yes"
- },
- {
- "name": "projectwise_sales_details",
- "doctype": "Search Criteria"
- }
-]
\ No newline at end of file
diff --git a/projects/search_criteria/projectwise_sales_orders/__init__.py b/projects/search_criteria/projectwise_sales_orders/__init__.py
deleted file mode 100644
index baffc48..0000000
--- a/projects/search_criteria/projectwise_sales_orders/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-from __future__ import unicode_literals
diff --git a/projects/search_criteria/projectwise_sales_orders/projectwise_sales_orders.txt b/projects/search_criteria/projectwise_sales_orders/projectwise_sales_orders.txt
deleted file mode 100644
index 29919e6..0000000
--- a/projects/search_criteria/projectwise_sales_orders/projectwise_sales_orders.txt
+++ /dev/null
@@ -1,27 +0,0 @@
-[
- {
- "owner": "harshada@webnotestech.com",
- "docstatus": 0,
- "creation": "2012-04-03 12:49:52",
- "modified_by": "Administrator",
- "modified": "2012-04-03 12:49:52"
- },
- {
- "module": "Projects",
- "standard": "Yes",
- "sort_order": "DESC",
- "filters": "{'Sales Order\u0001Saved':1,'Sales Order\u0001Submitted':1,'Sales Order\u0001Status':'','Sales Order\u0001Fiscal Year':''}",
- "doc_type": "Sales Order",
- "name": "__common__",
- "add_cond": "ifnull(`tabSales Order`.project_name ,'') != ''",
- "doctype": "Search Criteria",
- "sort_by": "`tabSales Order`.`name`",
- "page_len": 50,
- "criteria_name": "Projectwise Sales Orders",
- "columns": "Sales Order\u0001ID,Sales Order\u0001Status,Sales Order\u0001Project Name,Sales Order\u0001Customer,Sales Order\u0001Sales Order Date,Sales Order\u0001Expected Delivery Date,Sales Order\u0001Quotation No,Sales Order\u0001% Delivered,Sales Order\u0001% Billed,Sales Order\u0001Grand Total*"
- },
- {
- "name": "projectwise_sales_orders",
- "doctype": "Search Criteria"
- }
-]
\ No newline at end of file
diff --git a/projects/search_criteria/timesheet_report/__init__.py b/projects/search_criteria/timesheet_report/__init__.py
deleted file mode 100644
index baffc48..0000000
--- a/projects/search_criteria/timesheet_report/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-from __future__ import unicode_literals
diff --git a/projects/search_criteria/timesheet_report/timesheet_report.js b/projects/search_criteria/timesheet_report/timesheet_report.js
deleted file mode 100644
index 12d9680..0000000
--- a/projects/search_criteria/timesheet_report/timesheet_report.js
+++ /dev/null
@@ -1,23 +0,0 @@
-// ERPNext - web based ERP (http://erpnext.com)
-// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-report.customize_filters = function() {
- this.filter_fields_dict['Timesheet Detail'+FILTER_SEP +'Project Name'].df.in_first_page = 1;
- this.filter_fields_dict['Timesheet Detail'+FILTER_SEP +'Task Id'].df.in_first_page = 1;
-this.filter_fields_dict['Timesheet'+FILTER_SEP +'Timesheet by'].df.filter_hide = 1;
-}
-
-//this.mytabs.items['Select Columns'].hide()
\ No newline at end of file
diff --git a/projects/search_criteria/timesheet_report/timesheet_report.txt b/projects/search_criteria/timesheet_report/timesheet_report.txt
deleted file mode 100644
index 14bbe08..0000000
--- a/projects/search_criteria/timesheet_report/timesheet_report.txt
+++ /dev/null
@@ -1,27 +0,0 @@
-[
- {
- "owner": "ashwini@webnotestech.com",
- "docstatus": 0,
- "creation": "2012-04-03 12:49:53",
- "modified_by": "Administrator",
- "modified": "2012-04-03 12:49:53"
- },
- {
- "parent_doc_type": "Timesheet",
- "module": "Projects",
- "standard": "Yes",
- "sort_order": "DESC",
- "filters": "{'Timesheet\u0001Saved':1,'Timesheet\u0001Submitted':1}",
- "doc_type": "Timesheet Detail",
- "name": "__common__",
- "doctype": "Search Criteria",
- "sort_by": "`tabTimesheet`.`name`",
- "page_len": 50,
- "criteria_name": "Timesheet Report",
- "columns": "Timesheet\u0001ID,Timesheet\u0001Timesheet Date,Timesheet\u0001Timesheet by,Timesheet Detail\u0001Project Name,Timesheet Detail\u0001Task Id,Timesheet Detail\u0001Task Name,Timesheet Detail\u0001Actual Start Time,Timesheet Detail\u0001Actual End Time,Timesheet Detail\u0001Total Hours (Actual)"
- },
- {
- "name": "timesheet_report",
- "doctype": "Search Criteria"
- }
-]
\ No newline at end of file
diff --git a/public/css/splash.css b/public/css/splash.css
new file mode 100644
index 0000000..d4f0493
--- /dev/null
+++ b/public/css/splash.css
@@ -0,0 +1,52 @@
+@-webkit-keyframes pulse {
+ from {
+ opacity: 0.7;
+ }
+
+ to {
+ opacity: 1;
+ }
+}
+
+@keyframes pulse {
+ from {
+ opacity: 0.7;
+ }
+
+ to {
+ opacity: 1;
+ }
+}
+
+
+.splash {
+ margin: auto;
+ position: absolute;
+ top: 0px;
+ left: 0px;
+ right: 0px;
+ bottom: 30px;
+ width: 160px;
+ height: 160px;
+ text-align: center;
+ color: #888;
+
+ animation-duration: 1s;
+ animation-name: pulse;
+ animation-iteration-count: infinite;
+ animation-direction: alternate;
+
+ -webkit-animation-duration: 1s;
+ -webkit-animation-name: pulse;
+ -webkit-animation-iteration-count: infinite;
+ -webkit-animation-direction: alternate;
+}
+
+.splash:after {
+ content: "erpnext";
+ font-size: 30px;
+ font-weight: 700;
+ font-family: Helvetica, Arial, sans-serif;
+ position: relative;
+ top: -30px;
+}
diff --git a/public/images/favicon.ico b/public/images/favicon.ico
index 045b1bd..4fbf3f2 100644
--- a/public/images/favicon.ico
+++ b/public/images/favicon.ico
Binary files differ
diff --git a/public/images/splash.svg b/public/images/splash.svg
new file mode 100644
index 0000000..3f9fa88
--- /dev/null
+++ b/public/images/splash.svg
@@ -0,0 +1,173 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ id="svg2"
+ version="1.1"
+ inkscape:version="0.48.2 r9819"
+ sodipodi:docname="splash-mono.svg"
+ inkscape:export-filename="/Users/anandpdoshi/Dropbox/erpnext/logo 2013/erpnext-logo-2013 other colors 3.png"
+ inkscape:export-xdpi="167.56363"
+ inkscape:export-ydpi="167.56363"
+ viewBox="0 0 680 820"
+ preserveAspectRatio="xMidyMid meet"
+ width="100%"
+ height="100%">
+ <defs
+ id="defs4" />
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="0.53740115"
+ inkscape:cx="417.75453"
+ inkscape:cy="501.17067"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer4"
+ showgrid="false"
+ inkscape:snap-bbox="false"
+ showguides="true"
+ inkscape:guide-bbox="true"
+ inkscape:snap-global="true"
+ inkscape:bbox-paths="false"
+ inkscape:bbox-nodes="false"
+ inkscape:snap-page="false"
+ inkscape:snap-grids="true"
+ inkscape:window-width="721"
+ inkscape:window-height="690"
+ inkscape:window-x="293"
+ inkscape:window-y="0"
+ inkscape:window-maximized="0">
+ <inkscape:grid
+ type="xygrid"
+ id="grid3836" />
+ </sodipodi:namedview>
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title />
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer"
+ id="layer1"
+ style="display:inline">
+ <rect
+ style="opacity:0.90000000000000002;fill:#bdc3c7;fill-opacity:1"
+ id="rect3800"
+ width="150"
+ height="150"
+ x="60.000008"
+ y="-472.36218"
+ rx="20"
+ ry="20"
+ transform="scale(1,-1)" />
+ </g>
+ <g
+ inkscape:groupmode="layer"
+ id="layer2"
+ inkscape:label="Layer 2">
+ <path
+ transform="scale(1,-1)"
+ style="display:inline;opacity:0.90000000000000002;fill:#bdc3c7;fill-opacity:1"
+ d="m 180,-372.36218 110,0 20,0 0,20 0,110 c 0,11.08 -8.92,20 -20,20 l -110,0 c -11.08,0 -20,-8.92 -20,-20 l 0,-110 c 0,-11.08 8.92,-20 20,-20 z"
+ id="rect3051"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="scccssssss" />
+ </g>
+ <g
+ inkscape:groupmode="layer"
+ id="layer3"
+ inkscape:label="Layer 3">
+ <rect
+ style="display:inline;opacity:0.90000000000000002;fill:#bdc3c7;fill-opacity:0.94117647"
+ id="rect3840"
+ width="150"
+ height="150"
+ x="260"
+ y="-272.36218"
+ rx="20"
+ ry="20"
+ transform="scale(1,-1)" />
+ </g>
+ <g
+ inkscape:groupmode="layer"
+ id="layer4"
+ inkscape:label="Layer 4">
+ <path
+ sodipodi:nodetypes="scccssssss"
+ inkscape:connector-curvature="0"
+ id="path3054"
+ d="m 490,372.36218 -110,0 -20,0 0,-20 0,-110 c 0,-11.08 8.92,-20 20,-20 l 110,0 c 11.08,0 20,8.92 20,20 l 0,110 c 0,11.08 -8.92,20 -20,20 z"
+ style="display:inline;opacity:0.90000000000000002;fill:#bdc3c7;fill-opacity:1" />
+ </g>
+ <g
+ inkscape:groupmode="layer"
+ id="layer5"
+ inkscape:label="Layer 5">
+ <rect
+ style="display:inline;opacity:0.90000000000000002;fill:#bdc3c7;fill-opacity:0.94117647"
+ id="rect3844"
+ width="150"
+ height="150"
+ x="460"
+ y="-472.36218"
+ rx="20"
+ ry="20"
+ transform="scale(1,-1)" />
+ </g>
+ <g
+ inkscape:groupmode="layer"
+ id="layer6"
+ inkscape:label="Layer 6">
+ <path
+ style="display:inline;opacity:0.90000000000000002;fill:#bdc3c7;fill-opacity:0.94117647"
+ d="m 490,422.36218 -110,0 -20,0 0,20 0,110 c 0,11.08 8.92,20 20,20 l 110,0 c 11.08,0 20,-8.92 20,-20 l 0,-110 c 0,-11.08 -8.92,-20 -20,-20 z"
+ id="path3058"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="scccssssss" />
+ </g>
+ <g
+ inkscape:groupmode="layer"
+ id="layer7"
+ inkscape:label="Layer 7">
+ <rect
+ style="display:inline;opacity:0.90000000000000002;fill:#bdc3c7;fill-opacity:1"
+ id="rect3848"
+ width="150"
+ height="150"
+ x="260"
+ y="-672.36218"
+ rx="20"
+ ry="20"
+ transform="scale(1,-1)" />
+ </g>
+ <g
+ inkscape:groupmode="layer"
+ id="layer8"
+ inkscape:label="Layer 8">
+ <path
+ sodipodi:nodetypes="scccssssss"
+ inkscape:connector-curvature="0"
+ id="path3056"
+ d="m 180,422.36218 110,0 20,0 0,20 0,110 c 0,11.08 -8.92,20 -20,20 l -110,0 c -11.08,0 -20,-8.92 -20,-20 l 0,-110 c 0,-11.08 8.92,-20 20,-20 z"
+ style="display:inline;opacity:0.90000000000000002;fill:#bdc3c7;fill-opacity:1" />
+ </g>
+</svg>
diff --git a/public/js/conf.js b/public/js/conf.js
index 522de0a..71f1fa6 100644
--- a/public/js/conf.js
+++ b/public/js/conf.js
@@ -15,8 +15,8 @@
// add toolbar icon
$(document).bind('toolbar_setup', function() {
- $('.brand').html((wn.boot.website_settings.brand_html || 'erpnext') +
- ' <i class="icon-home icon-white navbar-icon-home" ></i>')
+ $('.navbar-brand').html('<object data="app/images/splash.svg" \
+ class="toolbar-splash" type="image/svg+xml"></object>erpnext')
.css('max-width', '200px').css('overflow', 'hidden')
.hover(function() {
$(this).find('.icon-home').addClass('navbar-icon-home-hover');
diff --git a/public/js/gantt_task.js b/public/js/gantt_task.js
deleted file mode 100644
index 6b679cf..0000000
--- a/public/js/gantt_task.js
+++ /dev/null
@@ -1,90 +0,0 @@
-// ERPNext - web based ERP (http://erpnext.com)
-// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-// gantt chart for project tasks
-
-wn.require('lib/js/lib/jQuery.Gantt/css/style.css');
-wn.require('lib/js/lib/jQuery.Gantt/js/jquery.fn.gantt.min.js');
-
-erpnext.show_task_gantt = function(parent, project) {
-
- $(parent).css('min-height', '300px').html('<div class="alert">Loading...</div>')
-
- var get_source = function(r) {
- var source = [];
- // projects
- $.each(r.message, function(i,v) {
- if(v.exp_start_date && v.exp_end_date) {
- source.push({
- name: v.project,
- desc: v.subject,
- values: [{
- label: v.subject,
- desc: v.description || v.subject,
- from: '/Date("'+v.exp_start_date+'")/',
- to: '/Date("'+v.exp_end_date+'")/',
- customClass: {
- 'Open':'ganttRed',
- 'Pending Review':'ganttOrange',
- 'Working':'',
- 'Completed':'ganttGreen',
- 'Cancelled':'ganttGray'
- }[v.status],
- dataObj: v
- }]
- })
- }
- });
- return source
- }
- wn.call({
- method: 'projects.page.projects.projects.get_tasks',
- args: {
- project: project || ''
- },
- callback: function(r) {
- $(parent).empty();
- if(!r.message.length) {
- $(parent).html('<div class="alert">No Tasks Yet.</div>');
- } else {
- var gantt_area = $('<div class="gantt">').appendTo(parent);
- gantt_area.gantt({
- source: get_source(r),
- navigate: project ? "button" : "scroll",
- scale: "weeks",
- minScale: "day",
- maxScale: "months",
- onItemClick: function(data) {
- wn.set_route('Form', 'Task', data.name);
- },
- onAddClick: function(dt, rowId) {
- newdoc('Task');
- }
- });
- }
-
- $('<button class="btn"><i class="icon icon-plus"></i>\
- Create a new Task</button>').click(function() {
- wn.model.with_doctype('Task', function() {
- var new_name = wn.model.make_new_doc_and_get_name('Task');
- if(project)
- locals.Task[new_name].project = project;
- wn.set_route('Form', 'Task', new_name);
- });
- }).appendTo(parent);
- }
- })
-}
diff --git a/public/js/kb_common.js b/public/js/kb_common.js
deleted file mode 100644
index 6dca3f8..0000000
--- a/public/js/kb_common.js
+++ /dev/null
@@ -1,158 +0,0 @@
-// ERPNext - web based ERP (http://erpnext.com)
-// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-// question toolbar
-// contains - voting widget / tag list and user info / timestamp
-// By XXXXXX on YYYYY
-
-KBItemToolbar = function(args, kb) {
- $.extend(this, args);
- var me = this;
- this.make = function() {
- this.wrapper = $a(this.parent, 'div', '', {});
- this.line1 = $a(this.wrapper, 'div', '', {color: '#888', fontSize:'11px', margin:'7px 0px'});
- this.make_timestamp();
- this.make_answers();
- if(this.with_tags)
- this.make_tags();
- this.setup_del();
- }
-
- this.make_timestamp = function() {
- this.line1.innerHTML = repl('By %(name)s | %(when)s', {
- name: wn.user_info(this.det.owner).fullname,
- when: wn.datetime.comment_when(this.det.modified)
- });
-
- // allow system manager to delete questions / answers
- if(has_common(user_roles, ['Administrator', 'System Manager'])) {
- this.line1.innerHTML += ' | <a style="cursor:pointer;"\
- class="del-link">delete</a>';
- }
- }
-
- this.make_answers = function() {
- if(this.doctype=='Question') {
- if(this.det.answers==0) {
- this.line1.innerHTML += ' | no answers';
- } else if(this.det.answers==1) {
- this.line1.innerHTML += ' | 1 answer';
- } else {
- this.line1.innerHTML += ' | '+this.det.answers+' answers';
- }
- }
- }
-
- this.make_tags = function() {
- this.line1.innerHTML += ' | '
- this.tags_area = $a(this.line1, 'span', 'kb-tags')
- this.tags = new TagList(this.tags_area,
- this.det._user_tags && (this.det._user_tags.split(',')),
- this.doctype, this.det.name, 0, kb.set_tag_filter)
- }
-
- this.setup_del = function() {
- $(this.line1).find('.del-link').click(function() {
- this.innerHTML = 'deleting...';
- this.disabled = 1;
- $c_page('utilities', 'questions', 'delete', {
- dt: me.doctype, dn: me.det.name}, function(r,rt) {
- // reload the list
- kb.list.run()
- });
- });
- }
-
- this.make();
-}
-
-
-// displays an editable text,
-// needs parent, text, disp_class, inp_class
-// dt, dn
-
-EditableText = function(args) {
- $.extend(this, args);
- var me = this;
-
- me.$w = $(repl('<div class="ed-text">\
- <div class="ed-text-display %(disp_class)s"></div>\
- <a class="ed-text-edit" style="cursor: pointer; float: right; margin-top: -16px;">[edit]</a>\
- <textarea class="ed-text-input %(inp_class)s hide"></textarea>\
- <div class="help hide"><br>Formatted as <a href="#markdown-reference"\
- target="_blank">markdown</a></div>\
- <button class="btn btn-info hide ed-text-save">Save</button>\
- <a class="ed-text-cancel hide" style="cursor: pointer;">Cancel</a>\
- </div>', args)).appendTo(me.parent);
-
- this.set_display = function(txt) {
- var display_wrapper = me.$w.find('.ed-text-display');
- display_wrapper.html(wn.markdown(txt));
- display_wrapper.find("a").attr("target", "blank");
- me.text = txt;
- }
-
- this.set_display(me.text);
-
- if(me.height) me.$w.find('.ed-text-input').css('height', me.height);
- if(me.width) me.$w.find('.ed-text-input').css('width', me.width);
-
- // edit
- me.$w.find('.ed-text-edit').click(function() {
- me.$w.find('.ed-text-input').val(me.text);
- me.show_as_input();
- })
-
- // save button - save the new text
- me.$w.find('.ed-text-save').click(
- function() {
- var v = me.$w.find('.ed-text-input').val();
- // check if text is written
- if(!v) {
- msgprint('Please write something!');
- return;
- }
- var btn = this;
- $(btn).set_working();
- $c_page('utilities', 'question_view', 'update_item', {
- dt: me.dt, dn: me.dn, fn: me.fieldname, text: v
- },
- function(r) {
- $(btn).done_working();
- if(r.exc) {msgprint(r.exc); return; }
- me.set_display(v);
- me.show_as_text();
- });
- }
- )
-
-
- // cancel button
- me.$w.find('.ed-text-cancel').click(function() {
- me.show_as_text();
- })
-
- this.show_as_text = function() {
- me.$w.find('.ed-text-display, .ed-text-edit').toggle(true);
- me.$w.find('.ed-text-input, .ed-text-save, .ed-text-cancel, .help').toggle(false);
- }
-
- this.show_as_input = function() {
- me.$w.find('.ed-text-display, .ed-text-edit').toggle(false);
- me.$w.find('.ed-text-input, .ed-text-save, .ed-text-cancel, .help').toggle(true);
- }
-
-}
diff --git a/public/js/startup.css b/public/js/startup.css
index 88ebedd..1cc808d 100644
--- a/public/js/startup.css
+++ b/public/js/startup.css
@@ -4,7 +4,6 @@
body {
font-family: Arial, Helvetica, sans-serif;
- font-size: 13px;
}
span, div, td, input, textarea, button, select {
@@ -60,4 +59,11 @@
.show-all-reports {
margin-top: 5px;
font-size: 11px;
+}
+
+/* toolbar */
+.toolbar-splash {
+ width: 32px;
+ height: 32px;
+ margin: -11px auto;
}
\ No newline at end of file
diff --git a/public/js/startup.js b/public/js/startup.js
index 76f2c26..5e651c5 100644
--- a/public/js/startup.js
+++ b/public/js/startup.js
@@ -38,12 +38,6 @@
// set interval for updates
erpnext.startup.set_periodic_updates();
- // border to the body
- // ------------------
- $('footer').html('<div class="web-footer erpnext-footer">\
- <a href="#attributions">Attributions and License</a> | \
- <a href="#latest-updates"><b>Latest Updates</b></a></div>');
-
// complete registration
if(in_list(user_roles,'System Manager') && (wn.boot.setup_complete=='No')) {
wn.require("app/js/complete_setup.js");
diff --git a/public/js/toolbar.js b/public/js/toolbar.js
index 03d7d0a..1d3d1e7 100644
--- a/public/js/toolbar.js
+++ b/public/js/toolbar.js
@@ -18,75 +18,26 @@
wn.provide('erpnext.toolbar');
erpnext.toolbar.setup = function() {
- // modules
- erpnext.toolbar.add_modules();
-
// profile
- $('#toolbar-user').append('<li><a href="#Form/Profile/'+user+'">'
+ var $user = $('#toolbar-user');
+ $user.append('<li><a href="#Form/Profile/'+user+'">'
+wn._("My Settings")+'...</a></li>');
+ $user.append('<li class="divider"></li>');
+ $user.append('<li><a href="https://erpnext.com/manual" target="_blank">'
+ +wn._('Documentation')+'</a></li>')
+ $user.append('<li><a href="http://groups.google.com/group/erpnext-user-forum" target="_blank">'
+ +wn._('Forum')+'</a></li>')
+ $user.append('<li><a href="http://www.providesupport.com?messenger=iwebnotes" target="_blank">\
+ '+wn._('Live Chat')+'</a></li>')
+
$('.navbar .pull-right').append('\
<li><a href="#!messages" title="'+wn._('Unread Messages')
+'"><span class="navbar-new-comments"></span></a></li>');
- // help
- $('.navbar .pull-right').prepend('<li class="dropdown">\
- <a class="dropdown-toggle" data-toggle="dropdown" href="#" \
- onclick="return false;">'+wn._('Help')+'<b class="caret"></b></a>\
- <ul class="dropdown-menu" id="toolbar-help">\
- </ul></li>')
-
- $('#toolbar-help').append('<li><a href="https://erpnext.com/manual" target="_blank">'
- +wn._('Documentation')+'</a></li>')
-
- $('#toolbar-help').append('<li><a href="http://groups.google.com/group/erpnext-user-forum" target="_blank">'
- +wn._('Forum')+'</a></li>')
-
- $('#toolbar-help').append('<li><a href="http://www.providesupport.com?messenger=iwebnotes" target="_blank">\
- '+wn._('Live Chat')+'</a></li>')
-
erpnext.toolbar.set_new_comments();
}
-erpnext.toolbar.add_modules = function() {
- $('<li class="dropdown">\
- <a class="dropdown-toggle" data-toggle="dropdown" href="#"\
- title="'+wn._("Modules")+'"\
- onclick="return false;"><i class="icon-th"></i></a>\
- <ul class="dropdown-menu modules">\
- </ul>\
- </li>').prependTo('.navbar .nav:first');
-
- var modules_list = wn.user.get_desktop_items().sort();
-
- var _get_list_item = function(m) {
- args = {
- module: m,
- module_page: wn.modules[m].link,
- module_label: wn._(wn.modules[m].label || m),
- icon: wn.modules[m].icon
- }
-
- return repl('<li><a href="#!%(module_page)s" \
- data-module="%(module)s"><i class="%(icon)s" style="display: inline-block; \
- width: 21px; margin-top: -2px; margin-left: -7px;"></i>\
- %(module_label)s</a></li>', args);
- }
-
- // add to dropdown
- $.each(modules_list,function(i, m) {
- if(m!='Setup') {
- $('.navbar .modules').append(_get_list_item(m));
- }
- })
-
- // setup for system manager
- if(user_roles.indexOf("System Manager")!=-1) {
- $('.navbar .modules').append('<li class="divider">' + _get_list_item("Setup"));
- }
-
-}
-
erpnext.toolbar.set_new_comments = function(new_comments) {
var navbar_nc = $('.navbar-new-comments');
if(cint(new_comments)) {
diff --git a/public/js/transaction.js b/public/js/transaction.js
new file mode 100644
index 0000000..b7df5b6
--- /dev/null
+++ b/public/js/transaction.js
@@ -0,0 +1,524 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+wn.provide("erpnext");
+
+erpnext.TransactionController = wn.ui.form.Controller.extend({
+ onload: function() {
+ if(this.frm.doc.__islocal) {
+ var me = this,
+ today = get_today(),
+ currency = wn.defaults.get_default("currency");
+
+ $.each({
+ posting_date: today,
+ due_date: today,
+ transaction_date: today,
+ currency: currency,
+ price_list_currency: currency,
+ status: "Draft",
+ company: wn.defaults.get_default("company"),
+ fiscal_year: wn.defaults.get_default("fiscal_year"),
+ is_subcontracted: "No",
+ conversion_rate: 1.0,
+ plc_conversion_rate: 1.0
+ }, function(fieldname, value) {
+ if(me.frm.fields_dict[fieldname] && !me.frm.doc[fieldname])
+ me.frm.set_value(fieldname, value);
+ });
+ }
+ },
+
+ refresh: function() {
+ this.frm.clear_custom_buttons();
+ erpnext.hide_naming_series();
+ this.show_item_wise_taxes();
+ this.frm.fields_dict.currency ? this.currency() : this.set_dynamic_labels();
+ },
+
+ onload_post_render: function() {
+ if(this.frm.doc.__islocal && this.frm.doc.company) {
+ var me = this;
+ this.frm.call({
+ doc: this.frm.doc,
+ method: "onload_post_render",
+ freeze: true,
+ callback: function(r) {
+ // remove this call when using client side mapper
+ me.set_default_values();
+ me.frm.refresh();
+ }
+ });
+ }
+ },
+
+ validate: function() {
+ this.calculate_taxes_and_totals();
+ },
+
+ company: function() {
+ if(this.frm.doc.company) {
+ var me = this;
+ var company_currency = this.get_company_currency();
+ $.each(["currency", "price_list_currency"], function(i, fieldname) {
+ if(!me.doc[fieldname]) {
+ me.frm.set_value(fieldname, company_currency);
+ }
+ });
+ this.price_list_currency();
+ }
+ },
+
+ get_company_currency: function() {
+ return erpnext.get_currency(this.frm.doc.company);
+ },
+
+ currency: function() {
+ this.price_list_currency();
+ },
+
+ price_list_name: function(use_for) {
+ var me = this;
+ if(this.frm.doc.price_list_name) {
+ this.frm.call({
+ method: "setup.utils.get_price_list_currency",
+ args: {args: {
+ price_list_name: this.frm.doc.price_list_name,
+ use_for: use_for
+ }},
+ callback: function(r) {
+ if(!r.exc) {
+ me.price_list_currency();
+ }
+ }
+ });
+ }
+ },
+
+ price_list_currency: function() {
+ // What TODO? should we make price list system non-mandatory?
+ this.frm.toggle_reqd("plc_conversion_rate",
+ !!(this.frm.doc.price_list_name && this.frm.doc.price_list_currency));
+
+ if(this.frm.doc.price_list_currency === this.get_company_currency()) {
+ this.frm.set_value("plc_conversion_rate", 1.0);
+ } else if(this.frm.doc.price_list_currency === this.frm.doc.currency) {
+ this.frm.set_value("plc_conversion_rate", this.frm.doc.conversion_rate);
+ }
+ this.set_dynamic_labels();
+ },
+
+ plc_conversion_rate: function() {
+ this.price_list_currency();
+ },
+
+ conversion_rate: function() {
+ this.price_list_currency();
+ this.calculate_taxes_and_totals();
+ },
+
+ qty: function(doc, cdt, cdn) {
+ this.calculate_taxes_and_totals();
+ },
+
+ tax_rate: function(doc, cdt, cdn) {
+ this.calculate_taxes_and_totals();
+ },
+
+ row_id: function(doc, cdt, cdn) {
+ var tax = wn.model.get_doc(cdt, cdn);
+ try {
+ this.validate_on_previous_row(tax);
+ this.calculate_taxes_and_totals();
+ } catch(e) {
+ tax.row_id = null;
+ refresh_field("row_id", tax.name, tax.parentfield);
+ throw e;
+ }
+ },
+
+ recalculate: function() {
+ this.calculate_taxes_and_totals();
+ },
+
+ recalculate_values: function() {
+ this.calculate_taxes_and_totals();
+ },
+
+ calculate_charges: function() {
+ this.calculate_taxes_and_totals();
+ },
+
+ included_in_print_rate: function(doc, cdt, cdn) {
+ var tax = wn.model.get_doc(cdt, cdn);
+ try {
+ this.validate_on_previous_row(tax);
+ this.validate_inclusive_tax(tax);
+ this.calculate_taxes_and_totals();
+ } catch(e) {
+ tax.included_in_print_rate = 0;
+ refresh_field("included_in_print_rate", tax.name, tax.parentfield);
+ throw e;
+ }
+ },
+
+ validate_on_previous_row: function(tax) {
+ // validate if a valid row id is mentioned in case of
+ // On Previous Row Amount and On Previous Row Total
+ if((["On Previous Row Amount", "On Previous Row Total"].indexOf(tax.charge_type) != -1) &&
+ (!tax.row_id || cint(tax.row_id) >= tax.idx)) {
+ var msg = repl(wn._("Row") + " # %(idx)s [%(doctype)s]: " +
+ wn._("Please specify a valid") + " %(row_id_label)s", {
+ idx: tax.idx,
+ doctype: tax.doctype,
+ row_id_label: wn.meta.get_label(tax.doctype, "row_id", tax.name)
+ });
+ msgprint(msg);
+ throw msg;
+ }
+ },
+
+ validate_inclusive_tax: function(tax) {
+ if(!this.frm.tax_doclist) this.frm.tax_doclist = this.get_tax_doclist();
+
+ var actual_type_error = function() {
+ var msg = repl(wn._("For row") + " # %(idx)s [%(doctype)s]: " +
+ "%(charge_type_label)s = \"%(charge_type)s\" " +
+ wn._("cannot be included in Item's rate"), {
+ idx: tax.idx,
+ doctype: tax.doctype,
+ charge_type_label: wn.meta.get_label(tax.doctype, "charge_type", tax.name),
+ charge_type: tax.charge_type
+ });
+ msgprint(msg);
+ throw msg;
+ };
+
+ var on_previous_row_error = function(row_range) {
+ var msg = repl(wn._("For row") + " # %(idx)s [%(doctype)s]: " +
+ wn._("to be included in Item's rate, it is required that: ") +
+ " [" + wn._("Row") + " # %(row_range)s] " + wn._("also be included in Item's rate"), {
+ idx: tax.idx,
+ doctype: tax.doctype,
+ charge_type_label: wn.meta.get_label(tax.doctype, "charge_type", tax.name),
+ charge_type: tax.charge_type,
+ inclusive_label: wn.meta.get_label(tax.doctype, "included_in_print_rate", tax.name),
+ row_range: row_range,
+ });
+
+ msgprint(msg);
+ throw msg;
+ };
+
+ if(cint(tax.included_in_print_rate)) {
+ if(tax.charge_type == "Actual") {
+ // inclusive tax cannot be of type Actual
+ actual_type_error();
+ } else if(tax.charge_type == "On Previous Row Amount" &&
+ !cint(this.frm.tax_doclist[tax.row_id - 1].included_in_print_rate)) {
+ // referred row should also be an inclusive tax
+ on_previous_row_error(tax.row_id);
+ } else if(tax.charge_type == "On Previous Row Total") {
+ var taxes_not_included = $.map(this.frm.tax_doclist.slice(0, tax.row_id),
+ function(t) { return cint(t.included_in_print_rate) ? null : t; });
+ if(taxes_not_included.length > 0) {
+ // all rows above this tax should be inclusive
+ on_previous_row_error(tax.row_id == 1 ? "1" : "1 - " + tax.row_id);
+ }
+ }
+ }
+ },
+
+ _load_item_tax_rate: function(item_tax_rate) {
+ return item_tax_rate ? JSON.parse(item_tax_rate) : {};
+ },
+
+ _get_tax_rate: function(tax, item_tax_map) {
+ return (keys(item_tax_map).indexOf(tax.account_head) != -1) ?
+ flt(item_tax_map[tax.account_head], precision("rate", tax)) :
+ tax.rate;
+ },
+
+ get_item_wise_taxes_html: function() {
+ var item_tax = {};
+ var tax_accounts = [];
+ var company_currency = this.get_company_currency();
+
+ $.each(this.get_tax_doclist(), function(i, tax) {
+ var tax_amount_precision = precision("tax_amount", tax);
+ var tax_rate_precision = precision("rate", tax);
+ $.each(JSON.parse(tax.item_wise_tax_detail || '{}'),
+ function(item_code, tax_data) {
+ if(!item_tax[item_code]) item_tax[item_code] = {};
+ if($.isArray(tax_data)) {
+ var tax_rate = tax_data[0] == null ? "" : (flt(tax_data[0], tax_rate_precision) + "%"),
+ tax_amount = format_currency(flt(tax_data[1], tax_amount_precision), company_currency);
+
+ item_tax[item_code][tax.account_head] = [tax_rate, tax_amount];
+ } else {
+ item_tax[item_code][tax.account_head] = [flt(tax_data, tax_rate_precision) + "%", ""];
+ }
+ });
+ tax_accounts.push(tax.account_head);
+ });
+
+ var headings = $.map([wn._("Item Name")].concat(tax_accounts),
+ function(head) { return '<th style="min-width: 100px;">' + (head || "") + "</th>" }).join("\n");
+
+ var rows = $.map(this.get_item_doclist(), function(item) {
+ var item_tax_record = item_tax[item.item_code || item.item_name];
+ if(!item_tax_record) { return null; }
+ return repl("<tr><td>%(item_name)s</td>%(taxes)s</tr>", {
+ item_name: item.item_name,
+ taxes: $.map(tax_accounts, function(head) {
+ return "<td>(" + item_tax_record[head][0] + ") " + item_tax_record[head][1] + "</td>"
+ }).join("\n")
+ });
+ }).join("\n");
+
+ if(!rows) return "";
+ return '<div style="overflow-x: scroll;"><table class="table table-bordered table-hover">\
+ <thead><tr>' + headings + '</tr></thead> \
+ <tbody>' + rows + '</tbody> \
+ </table></div>';
+ },
+
+ set_default_values: function() {
+ $.each(wn.model.get_doclist(this.frm.doctype, this.frm.docname), function(i, doc) {
+ var updated = wn.model.set_default_values(doc);
+ if(doc.parentfield) {
+ refresh_field(doc.parentfield);
+ } else {
+ refresh_field(updated);
+ }
+ });
+ },
+
+ _validate_before_fetch: function(fieldname) {
+ var me = this;
+ if(!me.frm.doc[fieldname]) {
+ return (wn._("Please specify") + ": " +
+ wn.meta.get_label(me.frm.doc.doctype, fieldname, me.frm.doc.name) +
+ ". " + wn._("It is needed to fetch Item Details."));
+ }
+ return null;
+ },
+
+ validate_company_and_party: function(party_field) {
+ var me = this;
+ var valid = true;
+ var msg = "";
+ $.each(["company", party_field], function(i, fieldname) {
+ var msg_for_fieldname = me._validate_before_fetch(fieldname);
+ if(msg_for_fieldname) {
+ msgprint(msg_for_fieldname);
+ valid = false;
+ }
+ });
+ return valid;
+ },
+
+ get_item_doclist: function() {
+ return wn.model.get_doclist(this.frm.doc.doctype, this.frm.doc.name,
+ {parentfield: this.fname});
+ },
+
+ get_tax_doclist: function() {
+ return wn.model.get_doclist(this.frm.doc.doctype, this.frm.doc.name,
+ {parentfield: this.other_fname});
+ },
+
+ validate_conversion_rate: function() {
+ this.frm.doc.conversion_rate = flt(this.frm.doc.conversion_rate, precision("conversion_rate"));
+ var conversion_rate_label = wn.meta.get_label(this.frm.doc.doctype, "conversion_rate",
+ this.frm.doc.name);
+
+ if(this.frm.doc.conversion_rate == 0) {
+ wn.throw(wn._(conversion_rate_label) + " " + wn._("cannot be 0"));
+ }
+
+ var company_currency = this.get_company_currency();
+ var valid_conversion_rate = this.frm.doc.conversion_rate ?
+ ((this.frm.doc.currency == company_currency && this.frm.doc.conversion_rate == 1.0) ||
+ (this.frm.doc.currency != company_currency && this.frm.doc.conversion_rate != 1.0)) :
+ false;
+
+ if(!valid_conversion_rate) {
+ wn.throw(wn._("Please enter valid") + " " + wn._(conversion_rate_label) +
+ " 1 " + this.frm.doc.currency + " = [?] " + company_currency);
+ }
+ },
+
+ calculate_taxes_and_totals: function() {
+ this.validate_conversion_rate();
+ this.frm.item_doclist = this.get_item_doclist();
+ this.frm.tax_doclist = this.get_tax_doclist();
+
+ this.calculate_item_values();
+ this.initialize_taxes();
+ this.determine_exclusive_rate && this.determine_exclusive_rate();
+ this.calculate_net_total();
+ this.calculate_taxes();
+ this.calculate_totals();
+ this._cleanup();
+
+ this.show_item_wise_taxes();
+ },
+
+ initialize_taxes: function() {
+ var me = this;
+ $.each(this.frm.tax_doclist, function(i, tax) {
+ tax.item_wise_tax_detail = {};
+ $.each(["tax_amount", "total",
+ "tax_amount_for_current_item", "grand_total_for_current_item",
+ "tax_fraction_for_current_item", "grand_total_fraction_for_current_item"],
+ function(i, fieldname) { tax[fieldname] = 0.0 });
+
+ me.validate_on_previous_row(tax);
+ me.validate_inclusive_tax(tax);
+ wn.model.round_floats_in(tax);
+ });
+ },
+
+ calculate_taxes: function() {
+ var me = this;
+
+ $.each(this.frm.item_doclist, function(n, item) {
+ var item_tax_map = me._load_item_tax_rate(item.item_tax_rate);
+
+ $.each(me.frm.tax_doclist, function(i, tax) {
+ // tax_amount represents the amount of tax for the current step
+ var current_tax_amount = me.get_current_tax_amount(item, tax, item_tax_map);
+
+ me.set_item_tax_amount && me.set_item_tax_amount(item, tax, current_tax_amount);
+
+ // case when net total is 0 but there is an actual type charge
+ // in this case add the actual amount to tax.tax_amount
+ // and tax.grand_total_for_current_item for the first such iteration
+ if(tax.charge_type == "Actual" &&
+ !(current_tax_amount || me.frm.doc.net_total || tax.tax_amount)) {
+ var zero_net_total_adjustment = flt(tax.rate, precision("tax_amount", tax));
+ current_tax_amount += zero_net_total_adjustment;
+ }
+
+ // store tax_amount for current item as it will be used for
+ // charge type = 'On Previous Row Amount'
+ tax.tax_amount_for_current_item = current_tax_amount;
+
+ // accumulate tax amount into tax.tax_amount
+ tax.tax_amount += current_tax_amount;
+
+ // for buying
+ if(tax.category) {
+ // if just for valuation, do not add the tax amount in total
+ // hence, setting it as 0 for further steps
+ current_tax_amount = (tax.category == "Valuation") ? 0.0 : current_tax_amount;
+
+ current_tax_amount *= (tax.add_deduct_tax == "Deduct") ? -1.0 : 1.0;
+ }
+
+ // Calculate tax.total viz. grand total till that step
+ // note: grand_total_for_current_item contains the contribution of
+ // item's amount, previously applied tax and the current tax on that item
+ if(i==0) {
+ tax.grand_total_for_current_item = flt(item.amount + current_tax_amount,
+ precision("total", tax));
+ } else {
+ tax.grand_total_for_current_item =
+ flt(me.frm.tax_doclist[i-1].grand_total_for_current_item + current_tax_amount,
+ precision("total", tax));
+ }
+
+ // in tax.total, accumulate grand total for each item
+ tax.total += tax.grand_total_for_current_item;
+ });
+ });
+ },
+
+ get_current_tax_amount: function(item, tax, item_tax_map) {
+ var tax_rate = this._get_tax_rate(tax, item_tax_map);
+ var current_tax_amount = 0.0;
+
+ if(tax.charge_type == "Actual") {
+ // distribute the tax amount proportionally to each item row
+ var actual = flt(tax.rate, precision("tax_amount", tax));
+ current_tax_amount = this.frm.doc.net_total ?
+ ((item.amount / this.frm.doc.net_total) * actual) :
+ 0.0;
+
+ } else if(tax.charge_type == "On Net Total") {
+ current_tax_amount = (tax_rate / 100.0) * item.amount;
+
+ } else if(tax.charge_type == "On Previous Row Amount") {
+ current_tax_amount = (tax_rate / 100.0) *
+ this.frm.tax_doclist[cint(tax.row_id) - 1].tax_amount_for_current_item;
+
+ } else if(tax.charge_type == "On Previous Row Total") {
+ current_tax_amount = (tax_rate / 100.0) *
+ this.frm.tax_doclist[cint(tax.row_id) - 1].grand_total_for_current_item;
+
+ }
+
+ current_tax_amount = flt(current_tax_amount, precision("tax_amount", tax));
+
+ // store tax breakup for each item
+ tax.item_wise_tax_detail[item.item_code || item.item_name] = [tax_rate, current_tax_amount];
+
+ return current_tax_amount;
+ },
+
+ _cleanup: function() {
+ $.each(this.frm.tax_doclist, function(i, tax) {
+ $.each(["tax_amount_for_current_item", "grand_total_for_current_item",
+ "tax_fraction_for_current_item", "grand_total_fraction_for_current_item"],
+ function(i, fieldname) { delete tax[fieldname]; });
+
+ tax.item_wise_tax_detail = JSON.stringify(tax.item_wise_tax_detail);
+ });
+ },
+
+ calculate_total_advance: function(parenttype, advance_parentfield) {
+ if(this.frm.doc.doctype == parenttype && this.frm.doc.docstatus < 2) {
+ var advance_doclist = wn.model.get_doclist(this.frm.doc.doctype, this.frm.doc.name,
+ {parentfield: advance_parentfield});
+ this.frm.doc.total_advance = flt(wn.utils.sum(
+ $.map(advance_doclist, function(adv) { return adv.allocated_amount })
+ ), precision("total_advance"));
+
+ this.calculate_outstanding_amount();
+ }
+ },
+
+ _set_in_company_currency: function(item, print_field, base_field) {
+ // set values in base currency
+ item[base_field] = flt(item[print_field] * this.frm.doc.conversion_rate,
+ precision(base_field, item));
+ },
+
+ get_terms: function() {
+ var me = this;
+ if(this.frm.doc.tc_name) {
+ this.frm.call({
+ method: "webnotes.client.get_value",
+ args: {
+ doctype: "Terms and Conditions",
+ fieldname: "terms",
+ filters: { name: this.frm.doc.tc_name },
+ },
+ });
+ }
+ },
+});
\ No newline at end of file
diff --git a/public/js/utils.js b/public/js/utils.js
index 4df9555..0284670 100644
--- a/public/js/utils.js
+++ b/public/js/utils.js
@@ -13,8 +13,7 @@
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-wn.provide('erpnext.utils');
+wn.provide("erpnext.utils");
erpnext.get_currency = function(company) {
if(!company && cur_frm)
@@ -23,4 +22,4 @@
return wn.model.get(":Company", company).default_currency || wn.boot.sysdefaults.currency;
else
return wn.boot.sysdefaults.currency;
-}
\ No newline at end of file
+}
diff --git a/selling/Print Format/Quotation Classic/Quotation Classic.txt b/selling/Print Format/Quotation Classic/Quotation Classic.txt
index 03a056b..0a63309 100644
--- a/selling/Print Format/Quotation Classic/Quotation Classic.txt
+++ b/selling/Print Format/Quotation Classic/Quotation Classic.txt
@@ -1,15 +1,15 @@
[
{
- "creation": "2012-04-17 11:29:12",
+ "creation": "2013-04-19 13:30:51",
"docstatus": 0,
- "modified": "2013-04-02 18:14:21",
+ "modified": "2013-05-28 17:17:05",
"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/webnotes/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\tline-height: 150%;\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'export_rate', 'export_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.adj_rate) {\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.adj_rate + '% on ' + doc.currency + ' ' +\n\t\t\t\t\t\t\t\tfmt_money(data_row.ref_rate) + '</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 width=38%>' + fmt_money(oc[i].tax_amount/doc.conversion_rate) + '</td>\\n' +\n\t\t\t\t\t\t'</tr>\\n';\n\t\t\t\t}\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>\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 & 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></td>\n\t\t\t\t\t\t\t<td width=38%><script>\n\t\t\t\t\t\t\t\tfmt_money(doc.net_total/doc.conversion_rate)\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></td>\n\t\t\t\t\t\t\t<td><script>\n\t\t\t\t\t\t\t\tfmt_money(doc.grand_total_export)\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><script>doc.currency</script></td>\n\t\t\t\t\t\t\t<td><script>\n\t\t\t\t\t\t\t\tfmt_money(doc.rounded_total_export)\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>\n",
+ "html": "<!--\n\tSample Print Format for ERPNext\n\tPlease use at your own discretion\n\tFor suggestions and contributions:\n\t\thttps://github.com/webnotes/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\tline-height: 150%;\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'export_rate', 'export_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.adj_rate) {\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.adj_rate + '% on ' + doc.currency + ' ' +\n\t\t\t\t\t\t\t\tfmt_money(data_row.ref_rate) + '</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 width=38%>' + fmt_money(oc[i].tax_amount/doc.conversion_rate) + '</td>\\n' +\n\t\t\t\t\t\t'</tr>\\n';\n\t\t\t\t}\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>\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 & 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></td>\n\t\t\t\t\t\t\t<td width=38%><script>\n\t\t\t\t\t\t\t\tfmt_money(doc.net_total_export)\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></td>\n\t\t\t\t\t\t\t<td><script>\n\t\t\t\t\t\t\t\tfmt_money(doc.grand_total_export)\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><script>doc.currency</script></td>\n\t\t\t\t\t\t\t<td><script>\n\t\t\t\t\t\t\t\tfmt_money(doc.rounded_total_export)\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>\n",
"module": "Selling",
"name": "__common__",
"print_format_type": "Client",
diff --git a/selling/Print Format/Quotation Modern/Quotation Modern.txt b/selling/Print Format/Quotation Modern/Quotation Modern.txt
index b7a29bf..0f841aa 100644
--- a/selling/Print Format/Quotation Modern/Quotation Modern.txt
+++ b/selling/Print Format/Quotation Modern/Quotation Modern.txt
@@ -1,15 +1,15 @@
[
{
- "creation": "2012-04-17 11:29:12",
+ "creation": "2013-04-19 13:30:51",
"docstatus": 0,
- "modified": "2013-04-02 18:14:05",
+ "modified": "2013-05-28 17:18:02",
"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/webnotes/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\t\tline-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'export_rate', 'export_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.adj_rate) {\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.adj_rate + '% on ' + doc.currency + ' ' +\n\t\t\t\t\t\t\t\tfmt_money(data_row.ref_rate) + '</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 width=38%>' + fmt_money(oc[i].tax_amount/doc.conversion_rate) + '</td>\\n' +\n\t\t\t\t\t\t'</tr>\\n';\n\t\t\t\t}\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 || '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 & 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></td>\n\t\t\t\t\t\t\t<td width=38%><script>\n\t\t\t\t\t\t\t\tfmt_money(doc.net_total/doc.conversion_rate)\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></td>\n\t\t\t\t\t\t\t<td><script>\n\t\t\t\t\t\t\t\tfmt_money(doc.grand_total_export)\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><script>doc.currency</script></td>\n\t\t\t\t\t\t\t<td><script>\n\t\t\t\t\t\t\t\tfmt_money(doc.rounded_total_export)\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>\n",
+ "html": "<!--\n\tSample Print Format for ERPNext\n\tPlease use at your own discretion\n\tFor suggestions and contributions:\n\t\thttps://github.com/webnotes/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\t\tline-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'export_rate', 'export_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.adj_rate) {\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.adj_rate + '% on ' + doc.currency + ' ' +\n\t\t\t\t\t\t\t\tfmt_money(data_row.ref_rate) + '</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 width=38%>' + fmt_money(oc[i].tax_amount/doc.conversion_rate) + '</td>\\n' +\n\t\t\t\t\t\t'</tr>\\n';\n\t\t\t\t}\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 || '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 & 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></td>\n\t\t\t\t\t\t\t<td width=38%><script>\n\t\t\t\t\t\t\t\tfmt_money(doc.net_total_export)\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></td>\n\t\t\t\t\t\t\t<td><script>\n\t\t\t\t\t\t\t\tfmt_money(doc.grand_total_export)\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><script>doc.currency</script></td>\n\t\t\t\t\t\t\t<td><script>\n\t\t\t\t\t\t\t\tfmt_money(doc.rounded_total_export)\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>\n",
"module": "Selling",
"name": "__common__",
"print_format_type": "Client",
diff --git a/selling/Print Format/Quotation Spartan/Quotation Spartan.txt b/selling/Print Format/Quotation Spartan/Quotation Spartan.txt
index 3fbf629..d2bfcd0 100644
--- a/selling/Print Format/Quotation Spartan/Quotation Spartan.txt
+++ b/selling/Print Format/Quotation Spartan/Quotation Spartan.txt
@@ -1,15 +1,15 @@
[
{
- "creation": "2012-04-17 11:29:12",
+ "creation": "2013-04-19 13:30:51",
"docstatus": 0,
- "modified": "2013-04-02 18:13:47",
+ "modified": "2013-05-28 17:18:38",
"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/webnotes/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\tline-height: 150%;\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'export_rate', 'export_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.adj_rate) {\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.adj_rate + '% on ' + doc.currency + ' ' +\n\t\t\t\t\t\t\t\tfmt_money(data_row.ref_rate) + '</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 width=38%>' + fmt_money(oc[i].tax_amount/doc.conversion_rate) + '</td>\\n' +\n\t\t\t\t\t\t'</tr>\\n';\n\t\t\t\t}\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 || '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 & 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></td>\n\t\t\t\t\t\t\t<td width=38%><script>\n\t\t\t\t\t\t\t\tfmt_money(doc.net_total/doc.conversion_rate)\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></td>\n\t\t\t\t\t\t\t<td><script>\n\t\t\t\t\t\t\t\tfmt_money(doc.grand_total_export)\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><script>doc.currency</script></td>\n\t\t\t\t\t\t\t<td><script>\n\t\t\t\t\t\t\t\tfmt_money(doc.rounded_total_export)\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>\n",
+ "html": "<!--\n\tSample Print Format for ERPNext\n\tPlease use at your own discretion\n\tFor suggestions and contributions:\n\t\thttps://github.com/webnotes/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\tline-height: 150%;\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'export_rate', 'export_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.adj_rate) {\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.adj_rate + '% on ' + doc.currency + ' ' +\n\t\t\t\t\t\t\t\tfmt_money(data_row.ref_rate) + '</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 width=38%>' + fmt_money(oc[i].tax_amount/doc.conversion_rate) + '</td>\\n' +\n\t\t\t\t\t\t'</tr>\\n';\n\t\t\t\t}\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 || '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 & 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></td>\n\t\t\t\t\t\t\t<td width=38%><script>\n\t\t\t\t\t\t\t\tfmt_money(doc.net_total_export)\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></td>\n\t\t\t\t\t\t\t<td><script>\n\t\t\t\t\t\t\t\tfmt_money(doc.grand_total_export)\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><script>doc.currency</script></td>\n\t\t\t\t\t\t\t<td><script>\n\t\t\t\t\t\t\t\tfmt_money(doc.rounded_total_export)\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>\n",
"module": "Selling",
"name": "__common__",
"print_format_type": "Client",
diff --git a/selling/Print Format/Sales Order Classic/Sales Order Classic.txt b/selling/Print Format/Sales Order Classic/Sales Order Classic.txt
index 9415035..28e3af0 100644
--- a/selling/Print Format/Sales Order Classic/Sales Order Classic.txt
+++ b/selling/Print Format/Sales Order Classic/Sales Order Classic.txt
@@ -1,17 +1,18 @@
[
{
- "creation": "2012-04-17 11:29:12",
+ "creation": "2013-04-19 13:30:51",
"docstatus": 0,
- "modified": "2013-01-25 17:18:37",
+ "modified": "2013-05-28 17:20:59",
"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/webnotes/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\tline-height: 150%;\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'basic_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.adj_rate) {\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.adj_rate + '% on ' + doc.currency + ' ' +\n\t\t\t\t\t\t\t\tfmt_money(data_row.ref_rate) + '</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 width=38%>' + fmt_money(oc[i].tax_amount/doc.conversion_rate) + '</td>\\n' +\n\t\t\t\t\t\t'</tr>\\n';\n\t\t\t\t}\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 || '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 & 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></td>\n\t\t\t\t\t\t\t<td width=38%><script>\n\t\t\t\t\t\t\t\tfmt_money(doc.net_total)\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></td>\n\t\t\t\t\t\t\t<td><script>\n\t\t\t\t\t\t\t\tfmt_money(doc.grand_total_export)\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><script>doc.currency</script></td>\n\t\t\t\t\t\t\t<td><script>\n\t\t\t\t\t\t\t\tfmt_money(doc.rounded_total_export)\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>\n",
+ "html": "<!--\n\tSample Print Format for ERPNext\n\tPlease use at your own discretion\n\tFor suggestions and contributions:\n\t\thttps://github.com/webnotes/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\tline-height: 150%;\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'basic_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.adj_rate) {\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.adj_rate + '% on ' + doc.currency + ' ' +\n\t\t\t\t\t\t\t\tfmt_money(data_row.ref_rate) + '</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 width=38%>' + fmt_money(oc[i].tax_amount/doc.conversion_rate) + '</td>\\n' +\n\t\t\t\t\t\t'</tr>\\n';\n\t\t\t\t}\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 || '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 & 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></td>\n\t\t\t\t\t\t\t<td width=38%><script>\n\t\t\t\t\t\t\t\tfmt_money(doc.net_total_export)\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></td>\n\t\t\t\t\t\t\t<td><script>\n\t\t\t\t\t\t\t\tfmt_money(doc.grand_total_export)\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><script>doc.currency</script></td>\n\t\t\t\t\t\t\t<td><script>\n\t\t\t\t\t\t\t\tfmt_money(doc.rounded_total_export)\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>\n",
"module": "Selling",
"name": "__common__",
+ "print_format_type": "Client",
"standard": "Yes"
},
{
diff --git a/selling/Print Format/Sales Order Modern/Sales Order Modern.txt b/selling/Print Format/Sales Order Modern/Sales Order Modern.txt
index f222d5b..5237068 100644
--- a/selling/Print Format/Sales Order Modern/Sales Order Modern.txt
+++ b/selling/Print Format/Sales Order Modern/Sales Order Modern.txt
@@ -1,17 +1,18 @@
[
{
- "creation": "2012-04-17 11:29:12",
+ "creation": "2013-04-19 13:30:51",
"docstatus": 0,
- "modified": "2013-01-25 17:18:20",
+ "modified": "2013-05-28 17:21:05",
"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/webnotes/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\t\tline-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'basic_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.adj_rate) {\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.adj_rate + '% on ' + doc.currency + ' ' +\n\t\t\t\t\t\t\t\tfmt_money(data_row.ref_rate) + '</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 width=38%>' + fmt_money(oc[i].tax_amount/doc.conversion_rate) + '</td>\\n' +\n\t\t\t\t\t\t'</tr>\\n';\n\t\t\t\t}\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 || '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 & 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></td>\n\t\t\t\t\t\t\t<td width=38%><script>\n\t\t\t\t\t\t\t\tfmt_money(doc.net_total)\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></td>\n\t\t\t\t\t\t\t<td><script>\n\t\t\t\t\t\t\t\tfmt_money(doc.grand_total_export)\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><script>doc.currency</script></td>\n\t\t\t\t\t\t\t<td><script>\n\t\t\t\t\t\t\t\tfmt_money(doc.rounded_total_export)\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>\n",
+ "html": "<!--\n\tSample Print Format for ERPNext\n\tPlease use at your own discretion\n\tFor suggestions and contributions:\n\t\thttps://github.com/webnotes/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\t\tline-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'basic_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.adj_rate) {\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.adj_rate + '% on ' + doc.currency + ' ' +\n\t\t\t\t\t\t\t\tfmt_money(data_row.ref_rate) + '</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 width=38%>' + fmt_money(oc[i].tax_amount/doc.conversion_rate) + '</td>\\n' +\n\t\t\t\t\t\t'</tr>\\n';\n\t\t\t\t}\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 || '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 & 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></td>\n\t\t\t\t\t\t\t<td width=38%><script>\n\t\t\t\t\t\t\t\tfmt_money(doc.net_total_export)\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></td>\n\t\t\t\t\t\t\t<td><script>\n\t\t\t\t\t\t\t\tfmt_money(doc.grand_total_export)\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><script>doc.currency</script></td>\n\t\t\t\t\t\t\t<td><script>\n\t\t\t\t\t\t\t\tfmt_money(doc.rounded_total_export)\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>\n",
"module": "Selling",
"name": "__common__",
+ "print_format_type": "Client",
"standard": "Yes"
},
{
diff --git a/selling/Print Format/Sales Order Spartan/Sales Order Spartan.txt b/selling/Print Format/Sales Order Spartan/Sales Order Spartan.txt
index 3db5f05..f1f5d92 100644
--- a/selling/Print Format/Sales Order Spartan/Sales Order Spartan.txt
+++ b/selling/Print Format/Sales Order Spartan/Sales Order Spartan.txt
@@ -1,17 +1,18 @@
[
{
- "creation": "2012-04-17 11:29:12",
+ "creation": "2013-04-19 13:30:51",
"docstatus": 0,
- "modified": "2013-01-25 17:19:08",
+ "modified": "2013-05-28 17:20:50",
"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/webnotes/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\tline-height: 150%;\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'basic_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.adj_rate) {\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.adj_rate + '% on ' + doc.currency + ' ' +\n\t\t\t\t\t\t\t\tfmt_money(data_row.ref_rate) + '</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 width=38%>' + fmt_money(oc[i].tax_amount/doc.conversion_rate) + '</td>\\n' +\n\t\t\t\t\t\t'</tr>\\n';\n\t\t\t\t}\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 || '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 & 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></td>\n\t\t\t\t\t\t\t<td width=38%><script>\n\t\t\t\t\t\t\t\tfmt_money(doc.net_total)\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></td>\n\t\t\t\t\t\t\t<td><script>\n\t\t\t\t\t\t\t\tfmt_money(doc.grand_total_export)\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><script>doc.currency</script></td>\n\t\t\t\t\t\t\t<td><script>\n\t\t\t\t\t\t\t\tfmt_money(doc.rounded_total_export)\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>\n",
+ "html": "<!--\n\tSample Print Format for ERPNext\n\tPlease use at your own discretion\n\tFor suggestions and contributions:\n\t\thttps://github.com/webnotes/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\tline-height: 150%;\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'basic_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.adj_rate) {\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.adj_rate + '% on ' + doc.currency + ' ' +\n\t\t\t\t\t\t\t\tfmt_money(data_row.ref_rate) + '</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 width=38%>' + fmt_money(oc[i].tax_amount/doc.conversion_rate) + '</td>\\n' +\n\t\t\t\t\t\t'</tr>\\n';\n\t\t\t\t}\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 || '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 & 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></td>\n\t\t\t\t\t\t\t<td width=38%><script>\n\t\t\t\t\t\t\t\tfmt_money(doc.net_total_export)\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></td>\n\t\t\t\t\t\t\t<td><script>\n\t\t\t\t\t\t\t\tfmt_money(doc.grand_total_export)\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><script>doc.currency</script></td>\n\t\t\t\t\t\t\t<td><script>\n\t\t\t\t\t\t\t\tfmt_money(doc.rounded_total_export)\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>\n",
"module": "Selling",
"name": "__common__",
+ "print_format_type": "Client",
"standard": "Yes"
},
{
diff --git a/selling/README.md b/selling/README.md
new file mode 100644
index 0000000..db05132
--- /dev/null
+++ b/selling/README.md
@@ -0,0 +1,6 @@
+Selling management module. Includes forms for capturing / managing the sales process.
+
+- Lead
+- Opportunity
+- Quotation
+- Sales Order
\ No newline at end of file
diff --git a/selling/doctype/campaign/README.md b/selling/doctype/campaign/README.md
new file mode 100644
index 0000000..a837318
--- /dev/null
+++ b/selling/doctype/campaign/README.md
@@ -0,0 +1 @@
+Sales campaign / promotion, like special discount, exhibition, newsletter etc.
\ No newline at end of file
diff --git a/selling/doctype/communication_log/locale/_messages_doc.json b/selling/doctype/communication_log/locale/_messages_doc.json
deleted file mode 100644
index 652caa0..0000000
--- a/selling/doctype/communication_log/locale/_messages_doc.json
+++ /dev/null
@@ -1,13 +0,0 @@
-[
- "Selling",
- "Visit",
- "Notes",
- "SMS",
- "Phone",
- "Communication Log",
- "Communication type",
- "Date",
- "Communication by",
- "Other",
- "Email"
-]
\ No newline at end of file
diff --git a/selling/doctype/communication_log/locale/ar-doc.json b/selling/doctype/communication_log/locale/ar-doc.json
deleted file mode 100644
index 051ccc4..0000000
--- a/selling/doctype/communication_log/locale/ar-doc.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- "Communication Log": "\u0633\u062c\u0644 \u0627\u0644\u0627\u062a\u0635\u0627\u0644\u0627\u062a",
- "Communication by": "\u0628\u0644\u0627\u063a",
- "Communication type": "\u0627\u0644\u0627\u062a\u0635\u0627\u0644 \u0646\u0648\u0639",
- "Date": "\u062a\u0627\u0631\u064a\u062e",
- "Email": "\u0627\u0644\u0628\u0631\u064a\u062f \u0627\u0644\u0625\u0644\u0643\u062a\u0631\u0648\u0646\u064a",
- "Notes": "\u062a\u0644\u0627\u062d\u0638",
- "Other": "\u0622\u062e\u0631",
- "Phone": "\u0647\u0627\u062a\u0641",
- "SMS": "SMS",
- "Selling": "\u0628\u064a\u0639",
- "Visit": "\u0632\u064a\u0627\u0631\u0629"
-}
\ No newline at end of file
diff --git a/selling/doctype/communication_log/locale/de-doc.json b/selling/doctype/communication_log/locale/de-doc.json
deleted file mode 100644
index 94b0e5a..0000000
--- a/selling/doctype/communication_log/locale/de-doc.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- "Communication Log": "Communication Log",
- "Communication by": "Kommunikation durch",
- "Communication type": "Art der Kommunikation",
- "Date": "Datum",
- "Email": "E-Mail",
- "Notes": "Aufzeichnungen",
- "Other": "Andere",
- "Phone": "Telefon",
- "SMS": "SMS",
- "Selling": "Verkauf",
- "Visit": "Besuchen"
-}
\ No newline at end of file
diff --git a/selling/doctype/communication_log/locale/es-doc.json b/selling/doctype/communication_log/locale/es-doc.json
deleted file mode 100644
index 446f3bb..0000000
--- a/selling/doctype/communication_log/locale/es-doc.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- "Communication Log": "Comunicaci\u00f3n sesi\u00f3n",
- "Communication by": "La comunicaci\u00f3n por",
- "Communication type": "Tipo de comunicaci\u00f3n",
- "Date": "Fecha",
- "Email": "Email",
- "Notes": "Notas",
- "Other": "Otro",
- "Phone": "Tel\u00e9fono",
- "SMS": "SMS",
- "Selling": "De venta",
- "Visit": "Visitar"
-}
\ No newline at end of file
diff --git a/selling/doctype/communication_log/locale/fr-doc.json b/selling/doctype/communication_log/locale/fr-doc.json
deleted file mode 100644
index 91c0ade..0000000
--- a/selling/doctype/communication_log/locale/fr-doc.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- "Communication Log": "Journal des communications",
- "Communication by": "Communication",
- "Communication type": "Type de communication",
- "Date": "Date",
- "Email": "Email",
- "Notes": "Remarques",
- "Other": "Autre",
- "Phone": "T\u00e9l\u00e9phone",
- "SMS": "SMS",
- "Selling": "Vente",
- "Visit": "Visiter"
-}
\ No newline at end of file
diff --git a/selling/doctype/communication_log/locale/hi-doc.json b/selling/doctype/communication_log/locale/hi-doc.json
deleted file mode 100644
index 166a092..0000000
--- a/selling/doctype/communication_log/locale/hi-doc.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- "Communication Log": "\u0938\u0902\u091a\u093e\u0930 \u092a\u094d\u0930\u0935\u0947\u0936 \u0915\u0930\u0947\u0902",
- "Communication by": "\u0926\u094d\u0935\u093e\u0930\u093e \u0938\u0902\u091a\u093e\u0930",
- "Communication type": "\u0938\u0902\u091a\u093e\u0930 \u092a\u094d\u0930\u0915\u093e\u0930",
- "Date": "\u0924\u093e\u0930\u0940\u0916",
- "Email": "\u0908\u092e\u0947\u0932",
- "Notes": "\u0928\u094b\u091f\u094d\u0938",
- "Other": "\u0905\u0928\u094d\u092f",
- "Phone": "\u092b\u093c\u094b\u0928",
- "SMS": "\u090f\u0938\u090f\u092e\u090f\u0938",
- "Selling": "\u0935\u093f\u0915\u094d\u0930\u092f",
- "Visit": "\u092d\u0947\u0902\u091f"
-}
\ No newline at end of file
diff --git a/selling/doctype/communication_log/locale/hr-doc.json b/selling/doctype/communication_log/locale/hr-doc.json
deleted file mode 100644
index b392476..0000000
--- a/selling/doctype/communication_log/locale/hr-doc.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- "Communication Log": "Komunikacija Prijava",
- "Communication by": "Komunikacija",
- "Communication type": "Komunikacija putovanja",
- "Date": "Datum",
- "Email": "E-mail",
- "Notes": "Bilje\u0161ke",
- "Other": "Drugi",
- "Phone": "Telefon",
- "SMS": "SMS",
- "Selling": "Prodaja",
- "Visit": "Posjetiti"
-}
\ No newline at end of file
diff --git a/selling/doctype/communication_log/locale/nl-doc.json b/selling/doctype/communication_log/locale/nl-doc.json
deleted file mode 100644
index 78f824b..0000000
--- a/selling/doctype/communication_log/locale/nl-doc.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- "Communication Log": "Communicatie Inloggen",
- "Communication by": "Communicatie door",
- "Communication type": "Communicatietype",
- "Date": "Datum",
- "Email": "E-mail",
- "Notes": "Opmerkingen",
- "Other": "Ander",
- "Phone": "Telefoon",
- "SMS": "SMS",
- "Selling": "Selling",
- "Visit": "Bezoeken"
-}
\ No newline at end of file
diff --git a/selling/doctype/communication_log/locale/pt-BR-doc.json b/selling/doctype/communication_log/locale/pt-BR-doc.json
deleted file mode 100644
index 2eb01f3..0000000
--- a/selling/doctype/communication_log/locale/pt-BR-doc.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- "Communication Log": "Log de Comunica\u00e7\u00e3o",
- "Communication by": "Comunica\u00e7\u00e3o por",
- "Communication type": "Tipo de comunica\u00e7\u00e3o",
- "Date": "Data",
- "Email": "E-mail",
- "Notes": "Notas",
- "Other": "Outro",
- "Phone": "Telefone",
- "SMS": "SMS",
- "Selling": "Vendas",
- "Visit": "Visita"
-}
\ No newline at end of file
diff --git a/selling/doctype/communication_log/locale/pt-doc.json b/selling/doctype/communication_log/locale/pt-doc.json
deleted file mode 100644
index 6e293e7..0000000
--- a/selling/doctype/communication_log/locale/pt-doc.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- "Communication Log": "Log Comunica\u00e7\u00e3o",
- "Communication by": "Comunica\u00e7\u00e3o por",
- "Communication type": "Tipo de comunica\u00e7\u00e3o",
- "Date": "Data",
- "Email": "E-mail",
- "Notes": "Notas",
- "Other": "Outro",
- "Phone": "Telefone",
- "SMS": "SMS",
- "Selling": "Vendendo",
- "Visit": "Visitar"
-}
\ No newline at end of file
diff --git a/selling/doctype/communication_log/locale/sr-doc.json b/selling/doctype/communication_log/locale/sr-doc.json
deleted file mode 100644
index 9bbec26..0000000
--- a/selling/doctype/communication_log/locale/sr-doc.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- "Communication Log": "\u041a\u043e\u043c\u0443\u043d\u0438\u043a\u0430\u0446\u0438\u0458\u0430 \u041f\u0440\u0438\u0458\u0430\u0432\u0430",
- "Communication by": "\u041a\u043e\u043c\u0443\u043d\u0438\u043a\u0430\u0446\u0438\u0458\u0430",
- "Communication type": "\u041a\u043e\u043c\u0443\u043d\u0438\u043a\u0430\u0446\u0438\u0458\u0430 \u0442\u0438\u043f\u0430",
- "Date": "\u0414\u0430\u0442\u0443\u043c",
- "Email": "\u0415-\u043c\u0430\u0438\u043b",
- "Notes": "\u0411\u0435\u043b\u0435\u0448\u043a\u0435",
- "Other": "\u0414\u0440\u0443\u0433\u0438",
- "Phone": "\u0422\u0435\u043b\u0435\u0444\u043e\u043d",
- "SMS": "\u0421\u041c\u0421",
- "Selling": "\u041f\u0440\u043e\u0434\u0430\u0458\u0430",
- "Visit": "\u041f\u043e\u0441\u0435\u0442\u0438\u0442\u0438"
-}
\ No newline at end of file
diff --git a/selling/doctype/communication_log/locale/ta-doc.json b/selling/doctype/communication_log/locale/ta-doc.json
deleted file mode 100644
index 2d3a526..0000000
--- a/selling/doctype/communication_log/locale/ta-doc.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- "Communication Log": "\u0ba4\u0bc6\u0bbe\u0b9f\u0bb0\u0bcd\u0baa\u0bc1 \u0baa\u0bc1\u0b95\u0bc1\u0baa\u0ba4\u0bbf\u0b95\u0bc8",
- "Communication by": "\u0bae\u0bc2\u0bb2\u0bae\u0bcd \u0ba4\u0b95\u0bb5\u0bb2\u0bcd",
- "Communication type": "\u0ba4\u0b95\u0bb5\u0bb2\u0bcd \u0bb5\u0b95\u0bc8",
- "Date": "\u0ba4\u0bc7\u0ba4\u0bbf",
- "Email": "\u0bae\u0bbf\u0ba9\u0bcd\u0ba9\u0b9e\u0bcd\u0b9a\u0bb2\u0bcd",
- "Notes": "\u0b95\u0bc1\u0bb1\u0bbf\u0baa\u0bcd\u0baa\u0bc1\u0b95\u0bb3\u0bcd",
- "Other": "\u0bb5\u0bc7\u0bb1\u0bc1",
- "Phone": "\u0ba4\u0bc6\u0bbe\u0bb2\u0bc8\u0baa\u0bc7\u0b9a\u0bbf",
- "SMS": "\u0b8e\u0bb8\u0bcd\u0b8e\u0bae\u0bcd\u0b8e\u0bb8\u0bcd",
- "Selling": "\u0bb5\u0bbf\u0bb1\u0bcd\u0baa\u0ba9\u0bc8",
- "Visit": "\u0bb5\u0bb0\u0bc1\u0b95\u0bc8"
-}
\ No newline at end of file
diff --git a/selling/doctype/communication_log/locale/th-doc.json b/selling/doctype/communication_log/locale/th-doc.json
deleted file mode 100644
index 1942a9f..0000000
--- a/selling/doctype/communication_log/locale/th-doc.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- "Communication Log": "\u0e40\u0e02\u0e49\u0e32\u0e2a\u0e39\u0e48\u0e23\u0e30\u0e1a\u0e1a\u0e01\u0e32\u0e23\u0e2a\u0e37\u0e48\u0e2d\u0e2a\u0e32\u0e23",
- "Communication by": "\u0e01\u0e32\u0e23\u0e2a\u0e37\u0e48\u0e2d\u0e2a\u0e32\u0e23\u0e42\u0e14\u0e22",
- "Communication type": "\u0e1b\u0e23\u0e30\u0e40\u0e20\u0e17\u0e01\u0e32\u0e23\u0e2a\u0e37\u0e48\u0e2d\u0e2a\u0e32\u0e23",
- "Date": "\u0e27\u0e31\u0e19\u0e17\u0e35\u0e48",
- "Email": "\u0e2d\u0e35\u0e40\u0e21\u0e25\u0e4c",
- "Notes": "\u0e2b\u0e21\u0e32\u0e22\u0e40\u0e2b\u0e15\u0e38",
- "Other": "\u0e2d\u0e37\u0e48\u0e19 \u0e46",
- "Phone": "\u0e42\u0e17\u0e23\u0e28\u0e31\u0e1e\u0e17\u0e4c",
- "SMS": "SMS",
- "Selling": "\u0e02\u0e32\u0e22",
- "Visit": "\u0e40\u0e22\u0e35\u0e48\u0e22\u0e21"
-}
\ No newline at end of file
diff --git a/selling/doctype/customer/README.md b/selling/doctype/customer/README.md
new file mode 100644
index 0000000..9a641a6
--- /dev/null
+++ b/selling/doctype/customer/README.md
@@ -0,0 +1 @@
+Customer master.
\ No newline at end of file
diff --git a/selling/doctype/industry_type/README.md b/selling/doctype/industry_type/README.md
new file mode 100644
index 0000000..94856ab
--- /dev/null
+++ b/selling/doctype/industry_type/README.md
@@ -0,0 +1 @@
+Type of industry for a Customer.
\ No newline at end of file
diff --git a/selling/doctype/installation_note/README.md b/selling/doctype/installation_note/README.md
new file mode 100644
index 0000000..b0190c9
--- /dev/null
+++ b/selling/doctype/installation_note/README.md
@@ -0,0 +1 @@
+Details of product installation at Customer location.
\ No newline at end of file
diff --git a/selling/doctype/installation_note/installation_note.py b/selling/doctype/installation_note/installation_note.py
index ea20d51..63e1bae 100644
--- a/selling/doctype/installation_note/installation_note.py
+++ b/selling/doctype/installation_note/installation_note.py
@@ -21,10 +21,7 @@
from webnotes.model.bean import getlist
from webnotes.model.code import get_obj
from webnotes import msgprint
-from stock.utils import get_valid_serial_nos
-
-sql = webnotes.conn.sql
-
+from stock.utils import get_valid_serial_nos
from utilities.transaction_base import TransactionBase
@@ -34,6 +31,19 @@
self.doclist = doclist
self.tname = 'Installation Note Item'
self.fname = 'installed_item_details'
+ self.status_updater = [{
+ 'source_dt': 'Installation Note Item',
+ 'target_dt': 'Delivery Note Item',
+ 'target_field': 'installed_qty',
+ 'target_ref_field': 'qty',
+ 'join_field': 'prevdoc_detail_docname',
+ 'target_parent_dt': 'Delivery Note',
+ 'target_parent_field': 'per_installed',
+ 'source_field': 'qty',
+ 'percent_join_field': 'prevdoc_docname',
+ 'status_field': 'installation_status',
+ 'keyword': 'Installed'
+ }]
def validate(self):
self.validate_fiscal_year()
@@ -42,156 +52,111 @@
sales_com_obj = get_obj(dt = 'Sales Common')
sales_com_obj.check_active_sales_items(self)
sales_com_obj.get_prevdoc_date(self)
- self.validate_mandatory()
self.validate_reference_value()
-
- #fetch delivery note details
- #====================================
def pull_delivery_note_details(self):
self.validate_prev_docname()
- self.doclist = get_obj('DocType Mapper', 'Delivery Note-Installation Note').dt_map('Delivery Note', 'Installation Note', self.doc.delivery_note_no, self.doc, self.doclist, "[['Delivery Note', 'Installation Note'],['Delivery Note Item', 'Installation Note Item']]")
+ self.doclist = get_obj('DocType Mapper', 'Delivery Note-Installation Note').dt_map(
+ 'Delivery Note', 'Installation Note', self.doc.delivery_note_no,
+ self.doc, self.doclist, "[['Delivery Note', 'Installation Note'], \
+ ['Delivery Note Item', 'Installation Note Item']]")
- # Validates that Delivery Note is not pulled twice
- #============================================
def validate_prev_docname(self):
for d in getlist(self.doclist, 'installed_item_details'):
if self.doc.delivery_note_no == d.prevdoc_docname:
- msgprint(cstr(self.doc.delivery_note_no) + " delivery note details have already been pulled. ")
- raise Exception, "Validation Error. "
-
- #Fiscal Year Validation
- #================================
+ msgprint(cstr(self.doc.delivery_note_no) +
+ " delivery note details have already been pulled", raise_exception=1)
+
def validate_fiscal_year(self):
- get_obj('Sales Common').validate_fiscal_year(self.doc.fiscal_year,self.doc.inst_date,'Installation Date')
-
- # Validate Mandatory
- #===============================
- def validate_mandatory(self):
- # Amendment Date
- if self.doc.amended_from and not self.doc.amendment_date:
- msgprint("Please Enter Amendment Date")
- raise Exception, "Validation Error. "
-
- # Validate values with reference document
- #----------------------------------------
+ get_obj('Sales Common').validate_fiscal_year(self.doc.fiscal_year, self.doc.inst_date,
+ 'Installation Date')
+
def validate_reference_value(self):
- get_obj('DocType Mapper', 'Delivery Note-Installation Note', with_children = 1).validate_reference_value(self, self.doc.name)
+ mapper = get_obj('DocType Mapper', 'Delivery Note-Installation Note', with_children = 1)
+ mapper.validate_reference_value(self, self.doc.name)
- #check if serial no added
- #-----------------------------
- def is_serial_no_added(self,item_code,serial_no):
- ar_required = sql("select has_serial_no from tabItem where name = '%s'" % item_code)
- ar_required = ar_required and ar_required[0][0] or ''
+ def is_serial_no_added(self, item_code, serial_no):
+ ar_required = webnotes.conn.get_value("Item", item_code, "has_serial_no")
if ar_required == 'Yes' and not serial_no:
- msgprint("Serial No is mandatory for item: "+ item_code)
- raise Exception
+ msgprint("Serial No is mandatory for item: " + item_code, raise_exception=1)
elif ar_required != 'Yes' and cstr(serial_no).strip():
- msgprint("If serial no required, please select 'Yes' in 'Has Serial No' in Item :"+item_code)
- raise Exception
+ msgprint("If serial no required, please select 'Yes' in 'Has Serial No' in Item :" +
+ item_code, raise_exception=1)
- #check if serial no exist in system
- #-------------------------------------
def is_serial_no_exist(self, item_code, serial_no):
for x in serial_no:
- chk = sql("select name from `tabSerial No` where name =%s", x)
- if not chk:
- msgprint("Serial No "+x+" does not exist in the system")
- raise Exception
+ if not webnotes.conn.exists("Serial No", x):
+ msgprint("Serial No " + x + " does not exist in the system", raise_exception=1)
- #check if serial no already installed
- #------------------------------------------
def is_serial_no_installed(self,cur_s_no,item_code):
for x in cur_s_no:
- status = sql("select status from `tabSerial No` where name = %s", x)
+ status = webnotes.conn.sql("select status from `tabSerial No` where name = %s", x)
status = status and status[0][0] or ''
if status == 'Installed':
- msgprint("Item "+item_code+" with serial no. "+x+" already installed")
- raise Exception, "Validation Error."
+ msgprint("Item "+item_code+" with serial no. " + x + " already installed",
+ raise_exception=1)
- #get list of serial no from previous_doc
- #----------------------------------------------
- def get_prevdoc_serial_no(self, prevdoc_detail_docname, prevdoc_docname):
- res = sql("select serial_no from `tabDelivery Note Item` where name = '%s' and parent ='%s'" % (prevdoc_detail_docname, prevdoc_docname))
- return get_valid_serial_nos(res[0][0])
+ def get_prevdoc_serial_no(self, prevdoc_detail_docname):
+ serial_nos = webnotes.conn.get_value("Delivery Note Item",
+ prevdoc_detail_docname, "serial_no")
+ return get_valid_serial_nos(serial_nos)
- #check if all serial nos from current record exist in resp delivery note
- #---------------------------------------------------------------------------------
def is_serial_no_match(self, cur_s_no, prevdoc_s_no, prevdoc_docname):
- for x in cur_s_no:
- if not(x in prevdoc_s_no):
- msgprint("Serial No. "+x+" not present in the Delivery Note "+prevdoc_docname, raise_exception = 1)
- raise Exception, "Validation Error."
-
- #validate serial number
- #----------------------------------------
+ for sr in cur_s_no:
+ if sr not in prevdoc_s_no:
+ msgprint("Serial No. " + sr + " is not matching with the Delivery Note " +
+ prevdoc_docname, raise_exception = 1)
+
def validate_serial_no(self):
cur_s_no, prevdoc_s_no, sr_list = [], [], []
for d in getlist(self.doclist, 'installed_item_details'):
self.is_serial_no_added(d.item_code, d.serial_no)
-
if d.serial_no:
-
sr_list = get_valid_serial_nos(d.serial_no, d.qty, d.item_code)
self.is_serial_no_exist(d.item_code, sr_list)
- prevdoc_s_no = self.get_prevdoc_serial_no(d.prevdoc_detail_docname, d.prevdoc_docname)
+ prevdoc_s_no = self.get_prevdoc_serial_no(d.prevdoc_detail_docname)
if prevdoc_s_no:
self.is_serial_no_match(sr_list, prevdoc_s_no, d.prevdoc_docname)
self.is_serial_no_installed(sr_list, d.item_code)
return sr_list
-
- #validate installation date
- #-------------------------------
+
def validate_installation_date(self):
for d in getlist(self.doclist, 'installed_item_details'):
if d.prevdoc_docname:
- d_date = sql("select posting_date from `tabDelivery Note` where name=%s", d.prevdoc_docname)
- d_date = d_date and d_date[0][0] or ''
-
+ d_date = webnotes.conn.get_value("Delivery Note", d.prevdoc_docname, "posting_date")
if d_date > getdate(self.doc.inst_date):
- msgprint("Installation Date can not be before Delivery Date "+cstr(d_date)+" for item "+d.item_code)
- raise Exception
+ msgprint("Installation Date can not be before Delivery Date " + cstr(d_date) +
+ " for item "+d.item_code, raise_exception=1)
def check_item_table(self):
if not(getlist(self.doclist, 'installed_item_details')):
- msgprint("Please fetch items from Delivery Note selected")
- raise Exception
+ msgprint("Please fetch items from Delivery Note selected", raise_exception=1)
def on_update(self):
+ get_obj("Stock Ledger").scrub_serial_nos(self, 'installed_item_details')
webnotes.conn.set(self.doc, 'status', 'Draft')
def on_submit(self):
valid_lst = []
valid_lst = self.validate_serial_no()
- get_obj("Sales Common").update_prevdoc_detail(1,self)
-
for x in valid_lst:
- wp = sql("select warranty_period from `tabSerial No` where name = '%s'"% x)
- wp = wp and wp[0][0] or 0
- if wp:
- sql("update `tabSerial No` set maintenance_status = 'Under Warranty' where name = '%s'" % x)
-
- sql("update `tabSerial No` set status = 'Installed' where name = '%s'" % x)
-
- webnotes.conn.set(self.doc, 'status', 'Submitted')
+ if webnotes.conn.get_value("Serial No", x, "warranty_period"):
+ webnotes.conn.set_value("Serial No", x, "maintenance_status", "Under Warranty")
+ webnotes.conn.set_value("Serial No", x, "status", "Installed")
+ self.update_prevdoc_status()
+ webnotes.conn.set(self.doc, 'status', 'Submitted')
def on_cancel(self):
- cur_s_no = []
- sales_com_obj = get_obj(dt = 'Sales Common')
- sales_com_obj.update_prevdoc_detail(0,self)
-
for d in getlist(self.doclist, 'installed_item_details'):
if d.serial_no:
- #get current list of serial no
- cur_serial_no = d.serial_no.replace(' ', '')
- cur_s_no = cur_serial_no.split(',')
-
- for x in cur_s_no:
- sql("update `tabSerial No` set status = 'Delivered' where name = '%s'" % x)
-
+ d.serial_no = d.serial_no.replace(",", "\n")
+ for sr_no in d.serial_no.split("\n"):
+ webnotes.conn.set_value("Serial No", sr_no, "status", "Delivered")
+
+ self.update_prevdoc_status()
webnotes.conn.set(self.doc, 'status', 'Cancelled')
diff --git a/selling/doctype/installation_note/installation_note.txt b/selling/doctype/installation_note/installation_note.txt
index 9dd851d..8032cbe 100644
--- a/selling/doctype/installation_note/installation_note.txt
+++ b/selling/doctype/installation_note/installation_note.txt
@@ -2,7 +2,7 @@
{
"creation": "2013-04-30 13:13:06",
"docstatus": 0,
- "modified": "2013-05-09 14:43:28",
+ "modified": "2013-06-11 16:16:39",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -230,18 +230,6 @@
"read_only": 1
},
{
- "description": "The date at which current entry is corrected in the system.",
- "doctype": "DocField",
- "fieldname": "amendment_date",
- "fieldtype": "Date",
- "hidden": 1,
- "label": "Amendment Date",
- "no_copy": 1,
- "oldfieldname": "amendment_date",
- "oldfieldtype": "Date",
- "print_hide": 1
- },
- {
"doctype": "DocField",
"fieldname": "remarks",
"fieldtype": "Small Text",
@@ -252,18 +240,6 @@
},
{
"doctype": "DocField",
- "fieldname": "cancel_reason",
- "fieldtype": "Data",
- "hidden": 1,
- "label": "Cancel Reason",
- "no_copy": 1,
- "oldfieldname": "cancel_reason",
- "oldfieldtype": "Data",
- "print_hide": 1,
- "read_only": 1
- },
- {
- "doctype": "DocField",
"fieldname": "item_details",
"fieldtype": "Section Break",
"label": "Item Details",
diff --git a/selling/doctype/installation_note_item/README.md b/selling/doctype/installation_note_item/README.md
new file mode 100644
index 0000000..49d7eec
--- /dev/null
+++ b/selling/doctype/installation_note_item/README.md
@@ -0,0 +1 @@
+Detail of Item installed as a part of Installation Note.
\ No newline at end of file
diff --git a/selling/doctype/lead/README.md b/selling/doctype/lead/README.md
new file mode 100644
index 0000000..a12dcf6
--- /dev/null
+++ b/selling/doctype/lead/README.md
@@ -0,0 +1 @@
+Prospective customer / prospect database. List of all prospects that could be source of business.
\ No newline at end of file
diff --git a/selling/doctype/lead/lead.js b/selling/doctype/lead/lead.js
index 118b4c7..c94aafa 100644
--- a/selling/doctype/lead/lead.js
+++ b/selling/doctype/lead/lead.js
@@ -50,7 +50,7 @@
}
if(in_list(user_roles,'System Manager')) {
- cur_frm.page_layout.footer.help_area.innerHTML = '<hr>\
+ cur_frm.footer.help_area.innerHTML = '<hr>\
<p><a href="#Form/Sales Email Settings">Sales Email Settings</a><br>\
<span class="help">Automatically extract Leads from a mail box e.g. "sales@example.com"</span></p>';
}
diff --git a/selling/doctype/opportunity/README.md b/selling/doctype/opportunity/README.md
new file mode 100644
index 0000000..6017b4c
--- /dev/null
+++ b/selling/doctype/opportunity/README.md
@@ -0,0 +1 @@
+Potential sales opportunity (deal) from a Lead or Customer.
\ No newline at end of file
diff --git a/selling/doctype/opportunity/opportunity.txt b/selling/doctype/opportunity/opportunity.txt
index da085a3..fc4d041 100644
--- a/selling/doctype/opportunity/opportunity.txt
+++ b/selling/doctype/opportunity/opportunity.txt
@@ -2,7 +2,7 @@
{
"creation": "2013-03-07 18:50:30",
"docstatus": 0,
- "modified": "2013-04-02 16:28:08",
+ "modified": "2013-06-11 16:03:41",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -430,22 +430,6 @@
"width": "150px"
},
{
- "doctype": "DocField",
- "fieldname": "amendment_date",
- "fieldtype": "Date",
- "label": "Amendment Date",
- "no_copy": 1,
- "oldfieldname": "amendment_date",
- "oldfieldtype": "Date",
- "print_hide": 1,
- "read_only": 1,
- "width": "150px"
- },
- {
- "doctype": "DocPerm",
- "role": "System Manager"
- },
- {
"doctype": "DocPerm",
"role": "Sales User"
},
diff --git a/selling/doctype/opportunity_item/README.md b/selling/doctype/opportunity_item/README.md
new file mode 100644
index 0000000..810c10b
--- /dev/null
+++ b/selling/doctype/opportunity_item/README.md
@@ -0,0 +1 @@
+Items considered in the parent Opportunity.
\ No newline at end of file
diff --git a/selling/doctype/quotation/README.md b/selling/doctype/quotation/README.md
new file mode 100644
index 0000000..d51bab5
--- /dev/null
+++ b/selling/doctype/quotation/README.md
@@ -0,0 +1 @@
+Price + terms quote sent to Lead or Customer.
\ No newline at end of file
diff --git a/selling/doctype/quotation/quotation.js b/selling/doctype/quotation/quotation.js
index 078baf1..4276193 100644
--- a/selling/doctype/quotation/quotation.js
+++ b/selling/doctype/quotation/quotation.js
@@ -21,109 +21,52 @@
cur_frm.cscript.sales_team_fname = "sales_team";
// =====================================================================================
-wn.require('app/selling/doctype/sales_common/sales_common.js');
wn.require('app/accounts/doctype/sales_taxes_and_charges_master/sales_taxes_and_charges_master.js');
wn.require('app/utilities/doctype/sms_control/sms_control.js');
+wn.require('app/selling/doctype/sales_common/sales_common.js');
-// ONLOAD
-// ===================================================================================
-cur_frm.cscript.onload = function(doc, cdt, cdn) {
- cur_frm.cscript.manage_rounded_total();
- if(!doc.quotation_to)
- hide_field(['customer','customer_address','contact_person','customer_name','lead',
- 'address_display', 'contact_display', 'contact_mobile', 'contact_email',
- 'territory', 'customer_group']);
- if(!doc.price_list_name) set_multiple(cdt,cdn,{price_list_name:sys_defaults.price_list_name});
- if(!doc.status) set_multiple(cdt,cdn,{status:'Draft'});
- if(!doc.transaction_date) set_multiple(cdt,cdn,{transaction_date:get_today()});
- if(!doc.conversion_rate) set_multiple(cdt,cdn,{conversion_rate:'1.00'});
- if(!doc.currency && sys_defaults.currency) set_multiple(cdt,cdn,{currency:sys_defaults.currency});
- if(!doc.price_list_currency) set_multiple(cdt, cdn, {price_list_currency: doc.currency, plc_conversion_rate: 1});
-
- if(!doc.company && sys_defaults.company) set_multiple(cdt,cdn,{company:sys_defaults.company});
- if(!doc.fiscal_year && sys_defaults.fiscal_year) set_multiple(cdt,cdn,{fiscal_year:sys_defaults.fiscal_year});
-
- if(doc.quotation_to) {
- if(doc.quotation_to == 'Customer') {
- hide_field('lead');
+erpnext.selling.QuotationController = erpnext.selling.SellingController.extend({
+ refresh: function(doc, dt, dn) {
+ this._super();
+
+ if(doc.docstatus == 1 && doc.status!='Order Lost') {
+ cur_frm.add_custom_button('Make Sales Order', cur_frm.cscript['Make Sales Order']);
+ cur_frm.add_custom_button('Set as Lost', cur_frm.cscript['Declare Order Lost']);
+ cur_frm.add_custom_button('Send SMS', cur_frm.cscript.send_sms);
}
- else if (doc.quotation_to == 'Lead') {
- hide_field(['customer', 'customer_address', 'contact_person', 'customer_group']);
+
+ if (!doc.__islocal) {
+ cur_frm.communication_view = new wn.views.CommunicationList({
+ list: wn.model.get("Communication", {"quotation": doc.name}),
+ parent: cur_frm.fields_dict.communication_html.wrapper,
+ doc: doc,
+ recipients: doc.contact_email
+ });
}
- }
-}
-
-cur_frm.cscript.onload_post_render = function(doc, dt, dn) {
- var callback = function(doc, dt, dn) {
- // defined in sales_common.js
- cur_frm.cscript.update_item_details(doc, dt, dn);
- }
- cur_frm.cscript.hide_price_list_currency(doc, dt, dn, callback);
-}
-
-// hide - unhide fields based on lead or customer..
-// =======================================================================================================================
-cur_frm.cscript.lead_cust_show = function(doc,cdt,cdn){
- hide_field(['lead', 'customer','customer_address','contact_person',
- 'customer_name','address_display','contact_display','contact_mobile','contact_email',
- 'territory','customer_group']);
- if(doc.quotation_to == 'Lead') unhide_field(['lead']);
- else if(doc.quotation_to == 'Customer') unhide_field(['customer']);
+
+ this.quotation_to();
+ },
- doc.lead = doc.customer = doc.customer_name = doc.customer_address = doc.contact_person = doc.address_display = doc.contact_display = doc.contact_mobile = doc.contact_email = doc.territory = doc.customer_group = "";
-}
-
-
-
-//================ hide - unhide fields on basis of quotation to either lead or customer ===============================
-cur_frm.cscript.quotation_to = function(doc,cdt,cdn){
- cur_frm.cscript.lead_cust_show(doc,cdt,cdn);
-}
-
-
-// REFRESH
-// ===================================================================================
-cur_frm.cscript.refresh = function(doc, cdt, cdn) {
- cur_frm.clear_custom_buttons();
-
- if (!cur_frm.cscript.is_onload) cur_frm.cscript.hide_price_list_currency(doc, cdt, cdn);
-
-
- if(doc.docstatus == 1 && doc.status!='Order Lost') {
- cur_frm.add_custom_button('Make Sales Order', cur_frm.cscript['Make Sales Order']);
- cur_frm.add_custom_button('Set as Lost', cur_frm.cscript['Declare Order Lost']);
- cur_frm.add_custom_button('Send SMS', cur_frm.cscript.send_sms);
- }
-
- erpnext.hide_naming_series();
- cur_frm.toggle_display("contact_section", doc.customer || doc.lead);
+ quotation_to: function() {
+ this.frm.toggle_reqd("lead", this.frm.doc.quotation_to == "Lead");
+ this.frm.toggle_reqd("customer", this.frm.doc.quotation_to == "Customer");
+ },
- if (!doc.__islocal) {
- cur_frm.communication_view = new wn.views.CommunicationList({
- list: wn.model.get("Communication", {"quotation": doc.name}),
- parent: cur_frm.fields_dict.communication_html.wrapper,
- doc: doc,
- recipients: doc.contact_email
- });
- }
-}
+ validate_company_and_party: function(party_field) {
+ if(this.frm.doc.quotation_to == "Lead") {
+ return true;
+ } else if(!this.frm.doc.quotation_to) {
+ msgprint(wn._("Please select a value for" + " " + wn.meta.get_label(this.frm.doc.doctype,
+ "quotation_to", this.frm.doc.name)));
+ return false;
+ } else {
+ return this._super(party_field);
+ }
+ },
+});
-
-//customer
-cur_frm.cscript.customer = function(doc,dt,dn) {
- var pl = doc.price_list_name;
- var callback = function(r,rt) {
- var doc = locals[cur_frm.doctype][cur_frm.docname];
- cur_frm.refresh();
- if (pl != doc.price_list_name) cur_frm.cscript.price_list_name(doc, dt, dn);
- }
-
- if(doc.customer) $c_obj(make_doclist(doc.doctype, doc.name),
- 'get_default_customer_address', '', callback);
- if(doc.customer) unhide_field(['customer_address','contact_person','territory', 'customer_group']);
- cur_frm.toggle_display("contact_section", doc.customer || doc.lead);
- console.log(doc.customer_group);
-}
+// for backward compatibility: combine new and previous states
+$.extend(cur_frm.cscript, new erpnext.selling.QuotationController({frm: cur_frm}));
cur_frm.cscript.customer_address = cur_frm.cscript.contact_person = function(doc,dt,dn) {
if(doc.customer) get_server_fields('get_customer_address', JSON.stringify({
@@ -136,8 +79,6 @@
cur_frm.fields_dict.lead.get_query = erpnext.utils.lead_query;
cur_frm.cscript.lead = function(doc, cdt, cdn) {
- cur_frm.toggle_display("contact_section", doc.customer || doc.lead);
-
if(doc.lead) {
get_server_fields('get_lead_details', doc.lead,'', doc, cdt, cdn, 1);
unhide_field('territory');
@@ -248,31 +189,6 @@
qtn_lost_dialog.show();
}
-//===================== Quotation to validation - either customer or lead mandatory ====================
-cur_frm.cscript.quot_to_validate = function(doc,cdt,cdn){
-
- if(doc.quotation_to == 'Lead'){
-
- if(!doc.lead){
- alert("Lead is mandatory.");
- validated = false;
- }
- }
- else if(doc.quotation_to == 'Customer'){
- if(!doc.customer){
- alert("Customer is mandatory.");
- validated = false;
- }
- }
-}
-
-//===================validation function =================================
-
-cur_frm.cscript.validate = function(doc,cdt,cdn){
- cur_frm.cscript.recalculate_values(doc, cdt, cdn);
- cur_frm.cscript.quot_to_validate(doc,cdt,cdn);
-}
-
//================ Last Quoted Price and Last Sold Price suggestion ======================
cur_frm.fields_dict['quotation_details'].grid.get_field('item_code').get_query= function(doc, cdt, cdn) {
var d = locals[cdt][cdn];
diff --git a/selling/doctype/quotation/quotation.py b/selling/doctype/quotation/quotation.py
index c154a6a..c474d99 100644
--- a/selling/doctype/quotation/quotation.py
+++ b/selling/doctype/quotation/quotation.py
@@ -95,33 +95,9 @@
def get_rate(self,arg):
return get_obj('Sales Common').get_rate(arg)
- # Load Default Charges
- # ----------------------------------------------------------
- def load_default_taxes(self):
- self.doclist = get_obj('Sales Common').load_default_taxes(self)
-
- # Pull details from other charges master (Get Sales Taxes and Charges Master)
- # ----------------------------------------------------------
- def get_other_charges(self):
- self.doclist = get_obj('Sales Common').get_other_charges(self)
-
-
-# GET TERMS AND CONDITIONS
-# ====================================================================================
- def get_tc_details(self):
- return get_obj('Sales Common').get_tc_details(self)
-
-
# VALIDATE
# ==============================================================================================
- # Amendment date is necessary if document is amended
- # --------------------------------------------------
- def validate_mandatory(self):
- if self.doc.amended_from and not self.doc.amendment_date:
- msgprint("Please Enter Amendment Date")
- raise Exception
-
# Fiscal Year Validation
# ----------------------
def validate_fiscal_year(self):
@@ -142,6 +118,8 @@
#do not allow sales item in maintenance quotation and service item in sales quotation
#-----------------------------------------------------------------------------------------------
def validate_order_type(self):
+ super(DocType, self).validate_order_type()
+
if self.doc.order_type in ['Maintenance', 'Service']:
for d in getlist(self.doclist, 'quotation_details'):
is_service_item = sql("select is_service_item from `tabItem` where name=%s", d.item_code)
@@ -180,7 +158,6 @@
"Order Confirmed", "Order Lost", "Cancelled"])
self.validate_fiscal_year()
- self.validate_mandatory()
self.set_last_contact_date()
self.validate_order_type()
self.validate_for_items()
diff --git a/selling/doctype/quotation/quotation.txt b/selling/doctype/quotation/quotation.txt
index 4115be8..1017221 100644
--- a/selling/doctype/quotation/quotation.txt
+++ b/selling/doctype/quotation/quotation.txt
@@ -1,8 +1,8 @@
[
{
- "creation": "2013-05-22 12:10:46",
+ "creation": "2013-05-24 19:29:08",
"docstatus": 0,
- "modified": "2013-05-22 16:54:07",
+ "modified": "2013-06-05 19:07:51",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -78,6 +78,7 @@
"reqd": 1
},
{
+ "depends_on": "eval:doc.quotation_to == \"Customer\"",
"doctype": "DocField",
"fieldname": "customer",
"fieldtype": "Link",
@@ -92,6 +93,7 @@
"search_index": 1
},
{
+ "depends_on": "eval:doc.quotation_to == \"Lead\"",
"doctype": "DocField",
"fieldname": "lead",
"fieldtype": "Link",
@@ -105,19 +107,21 @@
"read_only": 0
},
{
+ "depends_on": "customer",
"doctype": "DocField",
"fieldname": "customer_name",
"fieldtype": "Data",
- "hidden": 1,
+ "hidden": 0,
"in_list_view": 1,
"label": "Customer Name",
"read_only": 1
},
{
+ "depends_on": "customer",
"doctype": "DocField",
"fieldname": "address_display",
"fieldtype": "Small Text",
- "hidden": 1,
+ "hidden": 0,
"in_filter": 0,
"label": "Address",
"oldfieldname": "customer_address",
@@ -128,29 +132,32 @@
"search_index": 0
},
{
+ "depends_on": "customer",
"doctype": "DocField",
"fieldname": "contact_display",
"fieldtype": "Small Text",
- "hidden": 1,
+ "hidden": 0,
"in_filter": 0,
"label": "Contact",
"print_hide": 0,
"read_only": 1
},
{
+ "depends_on": "customer",
"doctype": "DocField",
"fieldname": "contact_mobile",
"fieldtype": "Text",
- "hidden": 1,
+ "hidden": 0,
"label": "Mobile No",
"print_hide": 0,
"read_only": 1
},
{
+ "depends_on": "customer",
"doctype": "DocField",
"fieldname": "contact_email",
"fieldtype": "Text",
- "hidden": 1,
+ "hidden": 0,
"label": "Contact Email",
"print_hide": 1,
"read_only": 1
@@ -164,6 +171,34 @@
"width": "50%"
},
{
+ "doctype": "DocField",
+ "fieldname": "amended_from",
+ "fieldtype": "Data",
+ "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",
"description": "The date at which current entry is made in system.",
"doctype": "DocField",
@@ -196,107 +231,49 @@
},
{
"doctype": "DocField",
- "fieldname": "items",
- "fieldtype": "Section Break",
- "label": "Items",
- "oldfieldtype": "Section Break",
- "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,
- "width": "40px"
- },
- {
- "doctype": "DocField",
- "fieldname": "sec_break23",
- "fieldtype": "Section Break",
- "options": "Simple",
- "read_only": 0
- },
- {
- "doctype": "DocField",
- "fieldname": "col_break34",
- "fieldtype": "Column Break",
- "read_only": 0,
- "width": "50%"
- },
- {
- "doctype": "DocField",
- "fieldname": "net_total",
- "fieldtype": "Currency",
- "label": "Net Total*",
- "no_copy": 0,
- "oldfieldname": "net_total",
- "oldfieldtype": "Currency",
- "options": "Company:company:default_currency",
- "print_hide": 0,
- "read_only": 1,
- "reqd": 0,
- "width": "100px"
- },
- {
- "doctype": "DocField",
- "fieldname": "recalculate_values",
- "fieldtype": "Button",
- "label": "Re-Calculate Values",
- "oldfieldtype": "Button",
- "print_hide": 1,
- "read_only": 0
- },
- {
- "doctype": "DocField",
- "fieldname": "col_break35",
- "fieldtype": "Column Break",
- "read_only": 0,
- "width": "50%"
- },
- {
- "description": "To create Quotation against Opportunity, Select Opportunity No. and click on 'Pull Opportunity Details' ",
- "doctype": "DocField",
- "fieldname": "enq_no",
- "fieldtype": "Link",
- "hidden": 0,
- "in_filter": 1,
- "label": "Opportunity No",
- "no_copy": 0,
- "oldfieldname": "enq_no",
- "oldfieldtype": "Link",
- "options": "Opportunity",
- "print_hide": 0,
- "read_only": 0,
- "report_hide": 0,
- "search_index": 0
- },
- {
- "doctype": "DocField",
- "fieldname": "pull_enquiry_detail",
- "fieldtype": "Button",
- "hidden": 0,
- "label": "Pull Opportunity Detail",
- "no_copy": 0,
- "oldfieldtype": "Button",
- "print_hide": 0,
- "read_only": 0,
- "report_hide": 0
- },
- {
- "doctype": "DocField",
"fieldname": "section_break0",
"fieldtype": "Section Break",
"label": "Price List and Currency",
"read_only": 0
},
{
+ "description": "Customer's currency - If you want to select a currency that is not the default currency, then you must also specify the Currency Conversion Rate.",
+ "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"
+ },
+ {
+ "default": "1.00",
+ "description": "Rate at which customer's currency is converted to company's base currency",
+ "doctype": "DocField",
+ "fieldname": "conversion_rate",
+ "fieldtype": "Float",
+ "label": "Conversion 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%"
+ },
+ {
"description": "Select the price list as entered in \"Price List\" master. This will pull the reference rates of items against this price list as specified in \"Item\" master.",
"doctype": "DocField",
"fieldname": "price_list_name",
@@ -335,40 +312,100 @@
},
{
"doctype": "DocField",
- "fieldname": "column_break2",
+ "fieldname": "items",
+ "fieldtype": "Section Break",
+ "label": "Items",
+ "oldfieldtype": "Section Break",
+ "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": 1,
+ "width": "40px"
+ },
+ {
+ "doctype": "DocField",
+ "fieldname": "sec_break23",
+ "fieldtype": "Section Break",
+ "options": "Simple",
+ "read_only": 0
+ },
+ {
+ "description": "To create Quotation against Opportunity, Select Opportunity No. and click on 'Pull Opportunity Details' ",
+ "doctype": "DocField",
+ "fieldname": "enq_no",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "in_filter": 1,
+ "label": "Opportunity No",
+ "no_copy": 0,
+ "oldfieldname": "enq_no",
+ "oldfieldtype": "Link",
+ "options": "Opportunity",
+ "print_hide": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "search_index": 0
+ },
+ {
+ "doctype": "DocField",
+ "fieldname": "pull_enquiry_detail",
+ "fieldtype": "Button",
+ "hidden": 0,
+ "label": "Pull Opportunity Detail",
+ "no_copy": 0,
+ "oldfieldtype": "Button",
+ "print_hide": 0,
+ "read_only": 0,
+ "report_hide": 0
+ },
+ {
+ "doctype": "DocField",
+ "fieldname": "col_break34",
"fieldtype": "Column Break",
"read_only": 0,
"width": "50%"
},
{
- "description": "Customer's currency - If you want to select a currency that is not the default currency, then you must also specify the Currency Conversion Rate.",
"doctype": "DocField",
- "fieldname": "currency",
- "fieldtype": "Link",
- "in_filter": 1,
- "label": "Currency",
- "oldfieldname": "currency",
- "oldfieldtype": "Select",
- "options": "Currency",
+ "fieldname": "net_total_export",
+ "fieldtype": "Currency",
+ "label": "Net Total (Export)",
+ "options": "currency",
+ "read_only": 1
+ },
+ {
+ "doctype": "DocField",
+ "fieldname": "net_total",
+ "fieldtype": "Currency",
+ "label": "Net Total*",
+ "no_copy": 0,
+ "oldfieldname": "net_total",
+ "oldfieldtype": "Currency",
+ "options": "Company:company:default_currency",
"print_hide": 1,
- "read_only": 0,
- "reqd": 1,
- "search_index": 0,
+ "read_only": 1,
+ "reqd": 0,
"width": "100px"
},
{
- "default": "1.00",
- "description": "Rate at which customer's currency is converted to company's base currency",
"doctype": "DocField",
- "fieldname": "conversion_rate",
- "fieldtype": "Float",
- "label": "Conversion Rate",
- "oldfieldname": "conversion_rate",
- "oldfieldtype": "Currency",
+ "fieldname": "recalculate_values",
+ "fieldtype": "Button",
+ "label": "Re-Calculate Values",
+ "oldfieldtype": "Button",
"print_hide": 1,
- "read_only": 0,
- "reqd": 1,
- "width": "100px"
+ "read_only": 0
},
{
"doctype": "DocField",
@@ -392,6 +429,11 @@
},
{
"doctype": "DocField",
+ "fieldname": "column_break_34",
+ "fieldtype": "Column Break"
+ },
+ {
+ "doctype": "DocField",
"fieldname": "get_charges",
"fieldtype": "Button",
"hidden": 0,
@@ -402,6 +444,11 @@
},
{
"doctype": "DocField",
+ "fieldname": "section_break_36",
+ "fieldtype": "Section Break"
+ },
+ {
+ "doctype": "DocField",
"fieldname": "other_charges",
"fieldtype": "Table",
"label": "Sales Taxes and Charges",
@@ -412,18 +459,32 @@
},
{
"doctype": "DocField",
- "fieldname": "calculate_charges",
- "fieldtype": "Button",
- "label": "Calculate Taxes and Charges",
- "oldfieldtype": "Button",
+ "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 (Export)",
+ "options": "currency",
+ "print_hide": 1,
+ "read_only": 1
+ },
+ {
+ "doctype": "DocField",
"fieldname": "other_charges_total",
"fieldtype": "Currency",
- "label": "Taxes and Charges Total*",
+ "label": "Taxes and Charges Total",
"oldfieldname": "other_charges_total",
"oldfieldtype": "Currency",
"options": "Company:company:default_currency",
@@ -432,10 +493,15 @@
},
{
"doctype": "DocField",
- "fieldname": "other_charges_calculation",
- "fieldtype": "HTML",
- "label": "Taxes and Charges Calculation",
- "oldfieldtype": "HTML",
+ "fieldname": "column_break_42",
+ "fieldtype": "Column Break"
+ },
+ {
+ "doctype": "DocField",
+ "fieldname": "calculate_charges",
+ "fieldtype": "Button",
+ "label": "Calculate Taxes and Charges",
+ "oldfieldtype": "Button",
"print_hide": 1,
"read_only": 0
},
@@ -450,55 +516,6 @@
},
{
"doctype": "DocField",
- "fieldname": "grand_total",
- "fieldtype": "Currency",
- "label": "Grand Total*",
- "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",
- "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",
- "no_copy": 0,
- "oldfieldname": "in_words",
- "oldfieldtype": "Data",
- "print_hide": 1,
- "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_export",
"fieldtype": "Currency",
"in_list_view": 1,
@@ -539,6 +556,55 @@
"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*",
+ "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",
+ "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",
+ "no_copy": 0,
+ "oldfieldname": "in_words",
+ "oldfieldtype": "Data",
+ "print_hide": 1,
+ "read_only": 1,
+ "width": "200px"
+ },
+ {
"description": "Add Terms and Conditions for the Quotation like Payment Terms, Validity of Offer etc. You can also prepare a Terms and Conditions Master and use the Template",
"doctype": "DocField",
"fieldname": "terms_section_break",
@@ -562,22 +628,21 @@
},
{
"doctype": "DocField",
+ "fieldname": "column_break_54",
+ "fieldtype": "Column Break"
+ },
+ {
+ "doctype": "DocField",
"fieldname": "get_terms",
"fieldtype": "Button",
"label": "Get Terms and Conditions",
"oldfieldtype": "Button",
- "options": "get_tc_details",
"read_only": 0
},
{
"doctype": "DocField",
- "fieldname": "terms_html",
- "fieldtype": "HTML",
- "label": "Terms and Conditions HTML",
- "oldfieldtype": "HTML",
- "options": "You can add Terms and Notes that will be printed in the Transaction",
- "print_hide": 1,
- "read_only": 0
+ "fieldname": "section_break_56",
+ "fieldtype": "Section Break"
},
{
"doctype": "DocField",
@@ -596,6 +661,36 @@
"read_only": 0
},
{
+ "description": "Will be fetched from Customer",
+ "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",
+ "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
+ },
+ {
+ "depends_on": "customer",
"doctype": "DocField",
"fieldname": "col_break98",
"fieldtype": "Column Break",
@@ -628,41 +723,6 @@
"reqd": 0
},
{
- "doctype": "DocField",
- "fieldname": "col_break99",
- "fieldtype": "Column Break",
- "read_only": 0,
- "width": "50%"
- },
- {
- "description": "Will be fetched from Customer",
- "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
- },
- {
- "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
- },
- {
"description": "Filling in additional information about the Quotation will help you analyze your data better.",
"doctype": "DocField",
"fieldname": "more_info",
@@ -673,32 +733,18 @@
"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
- },
- {
- "description": "Select the relevant company name if you have multiple companies.",
- "doctype": "DocField",
- "fieldname": "company",
+ "fieldname": "campaign",
"fieldtype": "Link",
- "in_filter": 1,
- "label": "Company",
- "oldfieldname": "company",
+ "hidden": 0,
+ "label": "Campaign",
+ "no_copy": 0,
+ "oldfieldname": "campaign",
"oldfieldtype": "Link",
- "options": "Company",
+ "options": "Campaign",
"print_hide": 1,
"read_only": 0,
- "reqd": 1,
- "search_index": 0,
- "width": "150px"
+ "report_hide": 0
},
{
"doctype": "DocField",
@@ -715,6 +761,70 @@
"report_hide": 0
},
{
+ "allow_on_submit": 0,
+ "default": "Draft",
+ "doctype": "DocField",
+ "fieldname": "status",
+ "fieldtype": "Select",
+ "in_filter": 1,
+ "label": "Status",
+ "no_copy": 1,
+ "oldfieldname": "status",
+ "oldfieldtype": "Select",
+ "options": "\nDraft\nSubmitted\nOrder Confirmed\nOrder Lost\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": "Select 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",
@@ -743,97 +853,6 @@
},
{
"doctype": "DocField",
- "fieldname": "column_break4",
- "fieldtype": "Column Break",
- "oldfieldtype": "Column Break",
- "print_hide": 1,
- "read_only": 0,
- "width": "50%"
- },
- {
- "allow_on_submit": 0,
- "default": "Draft",
- "doctype": "DocField",
- "fieldname": "status",
- "fieldtype": "Select",
- "in_filter": 1,
- "label": "Status",
- "no_copy": 1,
- "oldfieldname": "status",
- "oldfieldtype": "Select",
- "options": "\nDraft\nSubmitted\nOrder Confirmed\nOrder Lost\nCancelled",
- "print_hide": 1,
- "read_only": 1,
- "reqd": 1,
- "search_index": 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
- },
- {
- "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
- },
- {
- "allow_on_submit": 1,
- "doctype": "DocField",
- "fieldname": "select_print_heading",
- "fieldtype": "Link",
- "label": "Select 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": "Data",
- "label": "Amended From",
- "no_copy": 1,
- "oldfieldname": "amended_from",
- "oldfieldtype": "Data",
- "print_hide": 1,
- "read_only": 1,
- "width": "150px"
- },
- {
- "description": "The date at which current entry is corrected in the system.",
- "doctype": "DocField",
- "fieldname": "amendment_date",
- "fieldtype": "Date",
- "label": "Amendment Date",
- "no_copy": 1,
- "oldfieldname": "amendment_date",
- "oldfieldtype": "Date",
- "print_hide": 1,
- "read_only": 0,
- "width": "100px"
- },
- {
- "doctype": "DocField",
"fieldname": "communication_history",
"fieldtype": "Section Break",
"oldfieldtype": "Section Break",
@@ -854,14 +873,13 @@
"width": "40px"
},
{
- "doctype": "DocField",
- "fieldname": "file_list",
- "fieldtype": "Small Text",
- "hidden": 1,
- "label": "File List",
- "no_copy": 1,
- "print_hide": 1,
- "read_only": 0
+ "amend": 1,
+ "cancel": 1,
+ "create": 1,
+ "doctype": "DocPerm",
+ "role": "Sales Manager",
+ "submit": 1,
+ "write": 1
},
{
"amend": 1,
@@ -873,17 +891,13 @@
"write": 1
},
{
+ "amend": 0,
+ "cancel": 0,
+ "create": 0,
"doctype": "DocPerm",
- "role": "Customer"
- },
- {
- "amend": 1,
- "cancel": 1,
- "create": 1,
- "doctype": "DocPerm",
- "role": "Sales Manager",
- "submit": 1,
- "write": 1
+ "role": "Customer",
+ "submit": 0,
+ "write": 0
},
{
"amend": 1,
diff --git a/selling/doctype/quotation_item/README.md b/selling/doctype/quotation_item/README.md
new file mode 100644
index 0000000..c89b633
--- /dev/null
+++ b/selling/doctype/quotation_item/README.md
@@ -0,0 +1 @@
+Item details (qty, rate) in parent Quotation.
\ No newline at end of file
diff --git a/selling/doctype/quotation_item/quotation_item.txt b/selling/doctype/quotation_item/quotation_item.txt
index bcb9281..11ac1ba 100644
--- a/selling/doctype/quotation_item/quotation_item.txt
+++ b/selling/doctype/quotation_item/quotation_item.txt
@@ -2,7 +2,7 @@
{
"creation": "2013-03-07 11:42:57",
"docstatus": 0,
- "modified": "2013-05-22 12:08:32",
+ "modified": "2013-05-22 12:10:32",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -119,7 +119,7 @@
"options": "currency",
"print_hide": 1,
"print_width": "100px",
- "read_only": 0,
+ "read_only": 1,
"reqd": 0,
"width": "100px"
},
@@ -195,7 +195,7 @@
"options": "Company:company:default_currency",
"print_hide": 1,
"print_width": "100px",
- "read_only": 0,
+ "read_only": 1,
"reqd": 0,
"search_index": 0,
"width": "100px"
diff --git a/selling/doctype/sales_common/README.md b/selling/doctype/sales_common/README.md
new file mode 100644
index 0000000..1c029d2
--- /dev/null
+++ b/selling/doctype/sales_common/README.md
@@ -0,0 +1 @@
+Common scripts used in Sales Cycle.
\ No newline at end of file
diff --git a/selling/doctype/sales_common/sales_common.js b/selling/doctype/sales_common/sales_common.js
index 8a8d8d0..dc3f60d 100644
--- a/selling/doctype/sales_common/sales_common.js
+++ b/selling/doctype/sales_common/sales_common.js
@@ -21,118 +21,474 @@
// cur_frm.cscript.other_fname - wn.require('app/accounts/doctype/sales_taxes_and_charges_master/sales_taxes_and_charges_master.js'); fieldname
// cur_frm.cscript.sales_team_fname - Sales Team fieldname
-// ============== Load Default Taxes ===================
-cur_frm.cscript.load_taxes = function(doc, cdt, cdn, callback) {
- // run if this is not executed from dt_map...
- doc = locals[doc.doctype][doc.name];
- if(doc.customer || getchildren('Sales Taxes and Charges', doc.name, 'other_charges', doc.doctype).length) {
- if(callback) {
- callback(doc, cdt, cdn);
+wn.provide("erpnext.selling");
+wn.require("app/js/transaction.js");
+
+erpnext.selling.SellingController = erpnext.TransactionController.extend({
+ setup: function() {
+ this.frm.add_fetch("sales_partner", "commission_rate", "commission_rate");
+ },
+
+ onload: function() {
+ this._super();
+ this.toggle_rounded_total();
+ },
+
+ customer: function() {
+ var me = this;
+ if(this.frm.doc.customer || this.frm.doc.debit_to) {
+ if(!this.frm.doc.company) {
+ this.frm.set_value("customer", null);
+ msgprint(wn._("Please specify Company"));
+ } else {
+ var price_list_name = this.frm.doc.price_list_name;
+ this.frm.call({
+ doc: this.frm.doc,
+ method: "set_customer_defaults",
+ freeze: true,
+ callback: function(r) {
+ if(!r.exc) {
+ me.frm.refresh_fields();
+ (me.frm.doc.price_list_name !== price_list_name) ?
+ me.price_list_name() :
+ me.price_list_currency();
+ }
+ }
+ });
+ }
}
- } else if(doc.charge) {
- cur_frm.cscript.get_charges(doc, cdt, cdn, callback);
- } else {
- $c_obj(make_doclist(doc.doctype, doc.name),'load_default_taxes','',function(r,rt){
- refresh_field('other_charges');
- if(callback) callback(doc, cdt, cdn);
+ },
+
+ barcode: function(doc, cdt, cdn) {
+ this.item_code(doc, cdt, cdn);
+ },
+
+ item_code: function(doc, cdt, cdn) {
+ var me = this;
+ var item = wn.model.get_doc(cdt, cdn);
+ if(item.item_code || item.barcode) {
+ if(!this.validate_company_and_party("customer")) {
+ item.item_code = null;
+ refresh_field("item_code", item.name, item.parentfield);
+ } else {
+ this.frm.call({
+ method: "selling.utils.get_item_details",
+ child: item,
+ args: {
+ args: {
+ item_code: item.item_code,
+ barcode: item.barcode,
+ warehouse: item.warehouse,
+ doctype: me.frm.doc.doctype,
+ customer: me.frm.doc.customer,
+ currency: me.frm.doc.currency,
+ conversion_rate: me.frm.doc.conversion_rate,
+ price_list_name: me.frm.doc.price_list_name,
+ price_list_currency: me.frm.doc.price_list_currency,
+ plc_conversion_rate: me.frm.doc.plc_conversion_rate,
+ company: me.frm.doc.company,
+ order_type: me.frm.doc.order_type,
+ is_pos: cint(me.frm.doc.is_pos),
+ }
+ },
+ callback: function(r) {
+ if(!r.exc) {
+ me.ref_rate(me.frm.doc, cdt, cdn);
+ }
+ }
+ });
+ }
+ }
+ },
+
+ price_list_name: function() {
+ this._super("selling");
+ },
+
+ ref_rate: function(doc, cdt, cdn) {
+ var item = wn.model.get_doc(cdt, cdn);
+ wn.model.round_floats_in(item, ["ref_rate", "adj_rate"]);
+
+ item.export_rate = flt(item.ref_rate * (1 - item.adj_rate / 100.0),
+ precision("export_rate", item));
+
+ this.calculate_taxes_and_totals();
+ },
+
+ adj_rate: function(doc, cdt, cdn) {
+ var item = wn.model.get_doc(cdt, cdn);
+ if(!item.ref_rate) {
+ item.adj_rate = 0.0;
+ } else {
+ this.ref_rate(doc, cdt, cdn);
+ }
+ },
+
+ export_rate: function(doc, cdt, cdn) {
+ var item = wn.model.get_doc(cdt, cdn);
+ wn.model.round_floats_in(item, ["export_rate", "ref_rate"]);
+
+ if(item.ref_rate) {
+ item.adj_rate = flt((1 - item.export_rate / item.ref_rate) * 100.0,
+ precision("adj_rate", item));
+ } else {
+ item.adj_rate = 0.0;
+ }
+
+ this.calculate_taxes_and_totals();
+ },
+
+ commission_rate: function() {
+ this.calculate_commission();
+ refresh_field("total_commission");
+ },
+
+ total_commission: function() {
+ if(this.frm.doc.net_total) {
+ wn.model.round_floats_in(this.frm.doc, ["net_total", "total_commission"]);
+
+ if(this.frm.doc.net_total < this.frm.doc.total_commission) {
+ var msg = (wn._("[Error]") + " " +
+ wn._(wn.meta.get_label(this.frm.doc.doctype, "total_commission",
+ this.frm.doc.name)) + " > " +
+ wn._(wn.meta.get_label(this.frm.doc.doctype, "net_total", this.frm.doc.name)));
+ msgprint(msg);
+ throw msg;
+ }
+
+ this.frm.set_value("commission_rate",
+ flt(this.frm.doc.total_commission * 100.0 / this.frm.doc.net_total));
+ }
+ },
+
+ allocated_percentage: function(doc, cdt, cdn) {
+ var sales_person = wn.model.get_doc(cdt, cdn);
+
+ if(sales_person.allocated_percentage) {
+ sales_person.allocated_percentage = flt(sales_person.allocated_percentage,
+ precision("allocated_percentage", sales_person));
+ sales_person.allocated_amount = flt(this.frm.doc.net_total *
+ sales_person.allocated_percentage / 100.0,
+ precision("allocated_amount", sales_person));
+
+ refresh_field(["allocated_percentage", "allocated_amount"], sales_person.name,
+ sales_person.parentfield);
+ }
+ },
+
+ warehouse: function(doc, cdt, cdn) {
+ var item = webnotes.get_doc(cdt, cdn);
+ if(item.item_code && (item.warehouse || item.reserved_warehouse)) {
+ this.frm.call({
+ method: "selling.utils.get_available_qty",
+ child: item,
+ args: {
+ item_code: item.item_code,
+ warehouse: item.warehouse || item.reserved_warehouse,
+ },
+ });
+ }
+ },
+
+ toggle_rounded_total: function() {
+ var me = this;
+ if(cint(wn.defaults.get_global_default("disable_rounded_total"))) {
+ $.each(["rounded_total", "rounded_total_export"], function(i, fieldname) {
+ me.frm.set_df_property(fieldname, "print_hide", 1);
+ me.frm.toggle_display(fieldname, false);
+ });
+ }
+ },
+
+ calculate_taxes_and_totals: function() {
+ this._super();
+ this.calculate_total_advance("Sales Invoice", "advance_adjustment_details");
+ this.calculate_commission();
+ this.calculate_contribution();
+
+ // TODO check for custom_recalc in custom scripts of server
+
+ this.frm.refresh_fields();
+ },
+
+ calculate_item_values: function() {
+ var me = this;
+ $.each(this.frm.item_doclist, function(i, item) {
+ wn.model.round_floats_in(item);
+ item.export_amount = flt(item.export_rate * item.qty, precision("export_amount", item));
+
+ me._set_in_company_currency(item, "ref_rate", "base_ref_rate");
+ me._set_in_company_currency(item, "export_rate", "basic_rate");
+ me._set_in_company_currency(item, "export_amount", "amount");
});
- }
-}
-
-
-// Gets called after existing item details are update to fill in
-// remaining default values
-cur_frm.cscript.load_defaults = function(doc, dt, dn, callback) {
- if(!cur_frm.doc.__islocal) { return; }
-
- doc = locals[doc.doctype][doc.name];
- var fields_to_refresh = wn.model.set_default_values(doc);
- if(fields_to_refresh) { refresh_many(fields_to_refresh); }
-
- fields_to_refresh = null;
- var children = getchildren(cur_frm.cscript.tname, doc.name, cur_frm.cscript.fname);
- if(!children) { return; }
- for(var i=0; i<children.length; i++) {
- wn.model.set_default_values(children[i]);
- }
- refresh_field(cur_frm.cscript.fname);
- cur_frm.cscript.load_taxes(doc, dt, dn, callback);
-}
-
-
-// Update existing item details
-cur_frm.cscript.update_item_details = function(doc, dt, dn, callback) {
- doc = locals[doc.doctype][doc.name];
- if(!cur_frm.doc.__islocal) return;
- var children = getchildren(cur_frm.cscript.tname, doc.name, cur_frm.cscript.fname);
- if(children.length) {
- $c_obj(make_doclist(doc.doctype, doc.name), 'get_item_details', '',
- function(r, rt) {
- if(!r.exc) {
- refresh_field(cur_frm.cscript.fname);
- doc = locals[doc.doctype][doc.name];
- cur_frm.cscript.load_defaults(doc, dt, dn, callback);
+
+ },
+
+ determine_exclusive_rate: function() {
+ var me = this;
+ $.each(me.frm.item_doclist, function(n, item) {
+ var item_tax_map = me._load_item_tax_rate(item.item_tax_rate);
+ var cumulated_tax_fraction = 0.0;
+
+ $.each(me.frm.tax_doclist, function(i, tax) {
+ tax.tax_fraction_for_current_item = me.get_current_tax_fraction(tax, item_tax_map);
+
+ if(i==0) {
+ tax.grand_total_fraction_for_current_item = 1 + tax.tax_fraction_for_current_item;
+ } else {
+ tax.grand_total_fraction_for_current_item =
+ me.frm.tax_doclist[i-1].grand_total_fraction_for_current_item +
+ tax.tax_fraction_for_current_item;
+ }
+
+ cumulated_tax_fraction += tax.tax_fraction_for_current_item;
+ });
+
+ if(cumulated_tax_fraction) {
+ item.basic_rate = flt(
+ (item.export_rate * me.frm.doc.conversion_rate) / (1 + cumulated_tax_fraction),
+ precision("basic_rate", item));
+
+ item.amount = flt(item.basic_rate * item.qty, precision("amount", item));
+
+ if(item.adj_rate == 100) {
+ item.base_ref_rate = item.basic_rate;
+ item.basic_rate = 0.0;
+ } else {
+ item.base_ref_rate = flt(item.basic_rate / (1 - item.adj_rate / 100.0),
+ precision("base_ref_rate", item));
+ }
}
});
- } else {
- cur_frm.cscript.load_taxes(doc, dt, dn, callback);
- }
-}
-
-
-var set_dynamic_label_par = function(doc, cdt, cdn, base_curr) {
- //parent flds
- par_cols_base = {'net_total': 'Net Total', 'other_charges_total': 'Taxes and Charges Total',
- 'grand_total': 'Grand Total', 'rounded_total': 'Rounded Total', 'in_words': 'In Words'}
- par_cols_export = {'grand_total_export': 'Grand Total', 'rounded_total_export': 'Rounded Total', 'in_words_export': 'In Words'};
-
- for (d in par_cols_base) cur_frm.fields_dict[d].label_span.innerHTML = par_cols_base[d]+' (' + base_curr + ')';
- for (d in par_cols_export) cur_frm.fields_dict[d].label_span.innerHTML = par_cols_export[d]+' (' + doc.currency + ')';
- cur_frm.fields_dict['conversion_rate'].label_span.innerHTML = "Conversion Rate (" + doc.currency +' -> '+ base_curr + ')';
- cur_frm.fields_dict['plc_conversion_rate'].label_span.innerHTML = 'Price List Currency Conversion Rate (' + doc.price_list_currency +' -> '+ base_curr + ')';
-
- if (doc.doctype == 'Sales Invoice') {
- si_cols = {'total_advance': 'Total Advance', 'outstanding_amount': 'Outstanding Amount', 'paid_amount': 'Paid Amount', 'write_off_amount': 'Write Off Amount'}
- for (d in si_cols) cur_frm.fields_dict[d].label_span.innerHTML = si_cols[d] + ' (' + base_curr + ')';
- }
-}
-
-
-var set_dynamic_label_child = function(doc, cdt, cdn, base_curr) {
- // item table flds
- item_cols_base = {'basic_rate': 'Basic Rate', 'base_ref_rate': 'Price List Rate', 'amount': 'Amount'};
- item_cols_export = {'export_rate': 'Basic Rate', 'ref_rate': 'Price List Rate', 'export_amount': 'Amount'};
+ },
+
+ get_current_tax_fraction: function(tax, item_tax_map) {
+ // Get tax fraction for calculating tax exclusive amount
+ // from tax inclusive amount
+ var current_tax_fraction = 0.0;
- for (d in item_cols_base) $('[data-grid-fieldname="'+cur_frm.cscript.tname+'-'+d+'"]').html(item_cols_base[d]+' ('+base_curr+')');
- for (d in item_cols_export) $('[data-grid-fieldname="'+cur_frm.cscript.tname+'-'+d+'"]').html(item_cols_export[d]+' ('+doc.currency+')');
-
- var hide = (doc.currency == sys_defaults['currency']) ? false : true;
- for (f in item_cols_base) {
- cur_frm.fields_dict[cur_frm.cscript.fname].grid.set_column_disp(f, hide);
- }
-
- //tax table flds
- tax_cols = {'tax_amount': 'Amount', 'total': 'Total'};
- for (d in tax_cols) $('[data-grid-fieldname="Sales Taxes and Charges-'+d+'"]').html(tax_cols[d]+' ('+base_curr+')');
+ if(cint(tax.included_in_print_rate)) {
+ var tax_rate = this._get_tax_rate(tax, item_tax_map);
+
+ if(tax.charge_type == "On Net Total") {
+ current_tax_fraction = (tax_rate / 100.0);
+
+ } else if(tax.charge_type == "On Previous Row Amount") {
+ current_tax_fraction = (tax_rate / 100.0) *
+ this.frm.tax_doclist[cint(tax.row_id) - 1].tax_fraction_for_current_item;
+
+ } else if(tax.charge_type == "On Previous Row Total") {
+ current_tax_fraction = (tax_rate / 100.0) *
+ this.frm.tax_doclist[cint(tax.row_id) - 1].grand_total_fraction_for_current_item;
+ }
+ }
- if (doc.doctype == 'Sales Invoice') {
- // advance table flds
- adv_cols = {'advance_amount': 'Advance Amount', 'allocated_amount': 'Allocated Amount'}
- for (d in adv_cols) $('[data-grid-fieldname="Sales Invoice Advance-'+d+'"]').html(adv_cols[d]+' ('+base_curr+')');
- }
-}
+ return current_tax_fraction;
+ },
+
+ calculate_net_total: function() {
+ var me = this;
-// Change label dynamically based on currency
-//------------------------------------------------------------------
+ this.frm.doc.net_total = this.frm.doc.net_total_export = 0.0;
+ $.each(this.frm.item_doclist, function(i, item) {
+ me.frm.doc.net_total += item.amount;
+ me.frm.doc.net_total_export += item.export_amount;
+ });
+
+ wn.model.round_floats_in(this.frm.doc, ["net_total", "net_total_export"]);
+ },
+
+ calculate_totals: function() {
+ var tax_count = this.frm.tax_doclist.length;
+ this.frm.doc.grand_total = flt(
+ tax_count ? this.frm.tax_doclist[tax_count - 1].total : this.frm.doc.net_total,
+ precision("grand_total"));
+ this.frm.doc.grand_total_export = flt(this.frm.doc.grand_total / this.frm.doc.conversion_rate,
+ precision("grand_total_export"));
+
+ this.frm.doc.other_charges_total = flt(this.frm.doc.grand_total - this.frm.doc.net_total,
+ precision("other_charges_total"));
+ this.frm.doc.other_charges_total_export = flt(
+ this.frm.doc.grand_total_export - this.frm.doc.net_total_export,
+ precision("other_charges_total_export"));
+
+ this.frm.doc.rounded_total = Math.round(this.frm.doc.grand_total);
+ this.frm.doc.rounded_total_export = Math.round(this.frm.doc.grand_total_export);
+ },
+
+ calculate_outstanding_amount: function() {
+ // NOTE:
+ // write_off_amount is only for POS Invoice
+ // total_advance is only for non POS Invoice
+ if(this.frm.doc.doctype == "Sales Invoice" && this.frm.doc.docstatus < 2) {
+ wn.model.round_floats_in(this.frm.doc, ["grand_total", "total_advance", "write_off_amount",
+ "paid_amount"]);
+ var total_amount_to_pay = this.frm.doc.grand_total - this.frm.doc.write_off_amount;
+ this.frm.doc.outstanding_amount = flt(total_amount_to_pay - this.frm.doc.total_advance -
+ this.frm.doc.paid_amount, precision("outstanding_amount"));
+ }
+ },
+
+ calculate_commission: function() {
+ if(this.frm.fields_dict.commission_rate) {
+ if(this.frm.doc.commission_rate > 100) {
+ var msg = wn._(wn.meta.get_label(this.frm.doc.doctype, "commission_rate", this.frm.doc.name)) +
+ " " + wn._("cannot be greater than 100");
+ msgprint(msg);
+ throw msg;
+ }
+
+ this.frm.doc.total_commission = flt(this.frm.doc.net_total * this.frm.doc.commission_rate / 100.0,
+ precision("total_commission"));
+ }
+ },
+
+ calculate_contribution: function() {
+ var me = this;
+ $.each(wn.model.get_doclist(this.frm.doc.doctype, this.frm.doc.name,
+ {parentfield: "sales_team"}), function(i, sales_person) {
+ wn.model.round_floats_in(sales_person);
+ if(sales_person.allocated_percentage) {
+ sales_person.allocated_amount = flt(
+ me.frm.doc.net_total * sales_person.allocated_percentage / 100.0,
+ precision("allocated_amount", sales_person));
+ }
+ });
+ },
+
+ _cleanup: function() {
+ this._super();
+ this.frm.doc.in_words = this.frm.doc.in_words_export = "";
+ },
-cur_frm.cscript.dynamic_label = function(doc, cdt, cdn, base_curr, callback) {
- cur_frm.cscript.base_currency = base_curr;
- set_dynamic_label_par(doc, cdt, cdn, base_curr);
- set_dynamic_label_child(doc, cdt, cdn, base_curr);
- set_sales_bom_help(doc);
+ show_item_wise_taxes: function() {
+ if(this.frm.fields_dict.other_charges_calculation) {
+ $(this.get_item_wise_taxes_html())
+ .appendTo($(this.frm.fields_dict.other_charges_calculation.wrapper).empty());
+ }
+ },
+
+ get_charges: function() {
+ var me = this;
+ if(this.frm.doc.charge) {
+ this.frm.call({
+ doc: this.frm.doc,
+ method: "get_other_charges",
+ callback: function(r) {
+ if(!r.exc) {
+ me.calculate_taxes_and_totals();
+ }
+ }
+ });
+ }
+ },
+
+ set_dynamic_labels: function() {
+ var company_currency = this.get_company_currency();
+
+ this.change_form_labels(company_currency);
+ this.change_grid_labels(company_currency);
+ set_sales_bom_help(this.frm.doc);
+ },
+
+ change_form_labels: function(company_currency) {
+ var me = this;
+ var field_label_map = {};
+
+ var setup_field_label_map = function(fields_list, currency) {
+ $.each(fields_list, function(i, fname) {
+ var docfield = wn.meta.get_docfield(me.frm.doc.doctype, fname);
+ if(docfield) {
+ var label = wn._(docfield.label || "").replace(/\([^\)]*\)/g, "");
+ field_label_map[fname] = label.trim() + " (" + currency + ")";
+ }
+ });
+ };
+
+ setup_field_label_map(["net_total", "other_charges_total", "grand_total",
+ "rounded_total", "in_words",
+ "outstanding_amount", "total_advance", "paid_amount", "write_off_amount"],
+ company_currency);
+
+ setup_field_label_map(["net_total_export", "other_charges_total_export", "grand_total_export",
+ "rounded_total_export", "in_words_export"], this.frm.doc.currency);
+
+ setup_field_label_map(["conversion_rate"], "1 " + this.frm.doc.currency
+ + " = [?] " + company_currency);
+
+ if(this.frm.doc.price_list_currency && this.frm.doc.price_list_currency!=company_currency) {
+ setup_field_label_map(["plc_conversion_rate"], "1 " + this.frm.doc.price_list_currency
+ + " = [?] " + company_currency);
+ }
+
+ // toggle fields
+ this.frm.toggle_display(["conversion_rate", "net_total", "other_charges_total",
+ "grand_total", "rounded_total", "in_words"],
+ this.frm.doc.currency != company_currency);
+
+ this.frm.toggle_display(["plc_conversion_rate"],
+ this.frm.doc.price_list_currency != company_currency);
+
+ // set labels
+ $.each(field_label_map, function(fname, label) {
+ me.frm.fields_dict[fname].set_label(label);
+ });
+ },
+
+ change_grid_labels: function(company_currency) {
+ var me = this;
+ var field_label_map = {};
+
+ var setup_field_label_map = function(fields_list, currency, parentfield) {
+ var grid_doctype = me.frm.fields_dict[parentfield].grid.doctype;
+ $.each(fields_list, function(i, fname) {
+ var docfield = wn.meta.get_docfield(grid_doctype, fname);
+ if(docfield) {
+ var label = wn._(docfield.label || "").replace(/\([^\)]*\)/g, "");
+ field_label_map[grid_doctype + "-" + fname] =
+ label.trim() + " (" + currency + ")";
+ }
+ });
+ }
+
+ setup_field_label_map(["basic_rate", "base_ref_rate", "amount"],
+ company_currency, this.fname);
+
+ setup_field_label_map(["export_rate", "ref_rate", "export_amount"],
+ this.frm.doc.currency, this.fname);
+
+ setup_field_label_map(["tax_amount", "total"], company_currency, "other_charges");
+
+ if(this.frm.fields_dict["advance_allocation_details"]) {
+ setup_field_label_map(["advance_amount", "allocated_amount"], company_currency,
+ "advance_allocation_details");
+ }
+
+ // toggle columns
+ var item_grid = this.frm.fields_dict[this.fname].grid;
+ var show = this.frm.doc.currency != company_currency;
+ $.each(["basic_rate", "base_ref_rate", "amount"], function(i, fname) {
+ if(wn.meta.get_docfield(item_grid.doctype, fname))
+ item_grid.set_column_disp(fname, show);
+ });
+
+ // set labels
+ var $wrapper = $(this.frm.wrapper);
+ $.each(field_label_map, function(fname, label) {
+ $wrapper.find('[data-grid-fieldname="'+fname+'"]').text(label);
+ });
+ },
+
+});
- if (callback) callback(doc, cdt, cdn);
-}
+// to save previous state of cur_frm.cscript
+var prev_cscript = {};
+$.extend(prev_cscript, cur_frm.cscript);
+
+cur_frm.cscript = new erpnext.selling.SellingController({frm: cur_frm});
+
+// for backward compatibility: combine new and previous states
+$.extend(cur_frm.cscript, prev_cscript);
// Help for Sales BOM items
var set_sales_bom_help = function(doc) {
@@ -158,113 +514,8 @@
refresh_field('sales_bom_help');
}
-
-// hide / unhide price list currency based on availability of price list in customer's currency
-//---------------------------------------------------------------------------------------------------
-
-cur_frm.cscript.hide_price_list_currency = function(doc, cdt, cdn, callback1) {
- if (doc.price_list_name && doc.currency) {
- wn.call({
- method: 'selling.doctype.sales_common.sales_common.get_price_list_currency',
- args: {'price_list':doc.price_list_name, 'company': doc.company},
- callback: function(r, rt) {
- pl_currency = r.message[0]?r.message[0]:[];
- unhide_field(['price_list_currency', 'plc_conversion_rate']);
-
- if (pl_currency.length==1) {
- if (doc.price_list_currency != pl_currency[0])
- set_multiple(cdt, cdn, {price_list_currency:pl_currency[0]});
- if (pl_currency[0] == doc.currency) {
- if(doc.plc_conversion_rate != doc.conversion_rate)
- set_multiple(cdt, cdn, {plc_conversion_rate:doc.conversion_rate});
- hide_field(['price_list_currency', 'plc_conversion_rate']);
- } else if (pl_currency[0] == r.message[1]) {
- if (doc.plc_conversion_rate != 1)
- set_multiple(cdt, cdn, {plc_conversion_rate:1})
- hide_field(['price_list_currency', 'plc_conversion_rate']);
- }
- }
-
- if (r.message[1] == doc.currency) {
- if (doc.conversion_rate != 1)
- set_multiple(cdt, cdn, {conversion_rate:1});
- hide_field(['conversion_rate', 'grand_total_export', 'in_words_export', 'rounded_total_export']);
- } else {
- unhide_field(['conversion_rate', 'grand_total_export', 'in_words_export']);
- if(!cint(sys_defaults.disable_rounded_total))
- unhide_field("rounded_total_export");
- }
- if (r.message[1] == doc.price_list_currency) {
- if (doc.plc_conversion_rate != 1)
- set_multiple(cdt, cdn, {plc_conversion_rate:1});
- hide_field('plc_conversion_rate');
- } else unhide_field('plc_conversion_rate');
- cur_frm.cscript.dynamic_label(doc, cdt, cdn, r.message[1], callback1);
- }
- })
- }
-}
-
-cur_frm.cscript.manage_rounded_total = function() {
- if(cint(sys_defaults.disable_rounded_total)) {
- cur_frm.set_df_property("rounded_total", "print_hide", 1);
- cur_frm.set_df_property("rounded_total_export", "print_hide", 1);
- hide_field(["rounded_total", "rounded_total_export"]);
- }
-}
-
-// TRIGGERS FOR CALCULATIONS
-// =====================================================================================================
-
-// ********************* CURRENCY ******************************
-cur_frm.cscript.currency = function(doc, cdt, cdn) {
- cur_frm.cscript.price_list_name(doc, cdt, cdn);
-}
-
-cur_frm.cscript.price_list_currency = cur_frm.cscript.currency;
-cur_frm.cscript.conversion_rate = cur_frm.cscript.currency;
-cur_frm.cscript.plc_conversion_rate = cur_frm.cscript.currency;
-
-cur_frm.cscript.company = function(doc, cdt, cdn) {
- wn.call({
- method: 'selling.doctype.sales_common.sales_common.get_comp_base_currency',
- args: {company:doc.company},
- callback: function(r, rt) {
- var doc = locals[cdt][cdn];
- set_multiple(doc.doctype, doc.name, {
- currency:r.message,
- price_list_currency:r.message
- });
- cur_frm.cscript.currency(doc, cdt, cdn);
- }
- });
-}
-
-
-
-// ******************** PRICE LIST ******************************
-cur_frm.cscript.price_list_name = function(doc, cdt, cdn) {
- var callback = function() {
- var fname = cur_frm.cscript.fname;
- var cl = getchildren(cur_frm.cscript.tname, doc.name, cur_frm.cscript.fname);
- if(doc.price_list_name && doc.currency && doc.price_list_currency && doc.conversion_rate && doc.plc_conversion_rate) {
- $c_obj(make_doclist(doc.doctype, doc.name), 'get_adj_percent', '',
- function(r, rt) {
- refresh_field(fname);
- var doc = locals[cdt][cdn];
- cur_frm.cscript.recalc(doc,3); //this is to re-calculate BASIC RATE and AMOUNT on basis of changed REF RATE
- }
- );
- }
- }
- cur_frm.cscript.hide_price_list_currency(doc, cdt, cdn, callback);
-}
-
-
-
-// ******************** ITEM CODE ********************************
cur_frm.fields_dict[cur_frm.cscript.fname].grid.get_field("item_code").get_query = function(doc, cdt, cdn) {
- if (inList(['Maintenance', 'Service'], doc.order_type)) {
+ if (doc.order_type == "Maintenance") {
return erpnext.queries.item({
'ifnull(tabItem.is_service_item, "No")': 'Yes'
});
@@ -275,47 +526,6 @@
}
}
-
-cur_frm.cscript.item_code = function(doc, cdt, cdn) {
- var fname = cur_frm.cscript.fname;
- var d = locals[cdt][cdn];
- if (d.item_code) {
- if (!doc.company) {
- msgprint("Please select company to proceed");
- d.item_code = '';
- refresh_field('item_code', d.name, fname);
- } else {
- var callback = function(r, rt){
- cur_frm.cscript.recalc(doc, 1);
- }
- var args = {
- 'item_code':d.item_code,
- 'income_account':d.income_account,
- 'cost_center': d.cost_center,
- 'warehouse': d.warehouse
- };
- get_server_fields('get_item_details',JSON.stringify(args),
- fname,doc,cdt,cdn,1,callback);
- }
- }
- if(cur_frm.cscript.custom_item_code){
- cur_frm.cscript.custom_item_code(doc, cdt, cdn);
- }
-}
-
-//Barcode
-//
-cur_frm.cscript.barcode = function(doc, cdt, cdn) {
- var d = locals[cdt][cdn];
- var callback = function(r, rt) {
- cur_frm.cscript.item_code(doc, cdt, cdn);
- }
- if(d.barcode) {
- get_server_fields('get_barcode_details', d.barcode, cur_frm.cscript.fname,
- doc, cdt, cdn, 1, callback);
- }
-}
-
cur_frm.fields_dict[cur_frm.cscript.fname].grid.get_field('batch_no').get_query =
function(doc, cdt, cdn) {
var d = locals[cdt][cdn];
@@ -360,66 +570,6 @@
'" AND docstatus != 2 AND %(key)s LIKE "%s" ORDER BY name ASC LIMIT 50';
}
-// *********************** QUANTITY ***************************
-cur_frm.cscript.qty = function(doc, cdt, cdn) { cur_frm.cscript.recalc(doc, 1); }
-
-// ************************ DISCOUNT (%) ***********************
-cur_frm.cscript.adj_rate = function(doc, cdt, cdn) { cur_frm.cscript.recalc(doc, 1); }
-
-// ************************ REF RATE ****************************
-cur_frm.cscript.ref_rate = function(doc, cdt, cdn){
- var d = locals[cdt][cdn];
- var consider_incl_rate = cur_frm.cscript.consider_incl_rate(doc, cur_frm.cscript.other_fname);
- if(!consider_incl_rate) {
- set_multiple(cur_frm.cscript.tname, d.name, {'export_rate': flt(d.ref_rate) * (100 - flt(d.adj_rate)) / 100}, cur_frm.cscript.fname);
- }
- cur_frm.cscript.recalc(doc, 1);
-}
-
-// *********************** BASIC RATE **************************
-cur_frm.cscript.basic_rate = function(doc, cdt, cdn) {
- var fname = cur_frm.cscript.fname;
- var d = locals[cdt][cdn];
- if(!d.qty) {
- d.qty = 1;
- refresh_field('qty', d.name, fname);
- }
- var consider_incl_rate = cur_frm.cscript.consider_incl_rate(doc, cur_frm.cscript.other_fname);
- if(!consider_incl_rate) {
- cur_frm.cscript.recalc(doc, 2);
- } else {
- var basic_rate = cur_frm.cscript.back_calc_basic_rate(
- doc, cur_frm.cscript.tname, fname, d, cur_frm.cscript.other_fname
- );
- // TODO: remove roundNumber for basic_rate comparison
- if (d.basic_rate != roundNumber(basic_rate, 2)) {
- d.basic_rate = basic_rate;
- refresh_field('basic_rate', d.name, fname);
- msgprint("You cannot change Basic Rate* (Base Currency) when \
- considering rates inclusive of taxes.<br /> \
- Please either <br /> \
- * Specify Basic Rate (i.e. Rate which will be displayed in print) <br /> \
- -- or -- <br />\
- * Uncheck 'Is this Tax included in Basic Rate?' in the tax entries of Taxes section.");
- }
- }
-}
-
-// ************************ EXPORT RATE *************************
-cur_frm.cscript.export_rate = function(doc,cdt,cdn) {
- var cur_rec = locals[cdt][cdn];
- var fname = cur_frm.cscript.fname;
- var tname = cur_frm.cscript.tname;
- if(flt(cur_rec.ref_rate)>0 && flt(cur_rec.export_rate)>0) {
- var adj_rate = 100 * (1 - (flt(cur_rec.export_rate) / flt(cur_rec.ref_rate)));
- set_multiple(tname, cur_rec.name, { 'adj_rate': adj_rate }, fname);
- }
- doc = locals[doc.doctype][doc.name];
- cur_frm.cscript.recalc(doc, 1);
-}
-
-
-
// ************* GET OTHER CHARGES BASED ON COMPANY *************
cur_frm.fields_dict.charge.get_query = function(doc) {
return 'SELECT DISTINCT `tabSales Taxes and Charges Master`.name FROM \
@@ -430,492 +580,4 @@
ORDER BY `tabSales Taxes and Charges Master`.name LIMIT 50';
}
-// ********************* Get Charges ****************************
-cur_frm.cscript.get_charges = function(doc, cdt, cdn, callback) {
- $c_obj(make_doclist(doc.doctype,doc.name),
- 'get_other_charges',
- '',
- function(r, rt) {
- cur_frm.cscript.calculate_charges(doc, cdt, cdn);
- if(callback) callback(doc, cdt, cdn);
- }, null,null,cur_frm.fields_dict.get_charges.input);
-}
-
-
-// CALCULATION OF TOTAL AMOUNTS
-// ========================================================================================================
-cur_frm.cscript.recalc = function(doc, n) {
- if(!n)n=0;
- doc = locals[doc.doctype][doc.name];
- var tname = cur_frm.cscript.tname;
- var fname = cur_frm.cscript.fname;
- var sales_team = cur_frm.cscript.sales_team_fname;
- var other_fname = cur_frm.cscript.other_fname;
-
- if(!flt(doc.conversion_rate)) {
- doc.conversion_rate = 1;
- refresh_field('conversion_rate');
- }
- if(!flt(doc.plc_conversion_rate)) {
- doc.plc_conversion_rate = 1;
- refresh_field('plc_conversion_rate');
- }
-
- if(n > 0) cur_frm.cscript.update_fname_table(doc , tname , fname , n, other_fname); // updates all values in table (i.e. amount, export amount, net total etc.)
-
- if(flt(doc.net_total) > 0) {
- var cl = getchildren('Sales Taxes and Charges', doc.name, other_fname,doc.doctype);
- for(var i = 0; i<cl.length; i++){
- cl[i].total_tax_amount = 0;
- cl[i].total_amount = 0;
- cl[i].tax_amount = 0; // this is done to calculate other charges
- cl[i].total = 0;
- cl[i].item_wise_tax_detail = "";
- if(in_list(['On Previous Row Amount','On Previous Row Total'],cl[i].charge_type) && !cl[i].row_id){
- alert("Please Enter Row on which amount needs to be calculated for row : "+cl[i].idx);
- validated = false;
- }
- }
- cur_frm.cscript.calc_other_charges(doc , tname , fname , other_fname); // calculate other charges
- }
- cur_frm.cscript.calc_doc_values(doc, null, null, tname, fname, other_fname); // calculates total amounts
-
- // ******************* calculate allocated amount of sales person ************************
- cl = getchildren('Sales Team', doc.name, sales_team);
- for(var i=0;i<cl.length;i++) {
- if (cl[i].allocated_percentage) {
- cl[i].allocated_amount = flt(flt(doc.net_total)*flt(cl[i].allocated_percentage)/100);
- refresh_field('allocated_amount', cl[i].name, sales_team);
- }
- }
- doc.in_words = '';
- doc.in_words_export = '';
- refresh_many(['total_discount_rate','total_discount','net_total','total_commission','grand_total','rounded_total','grand_total_export','rounded_total_export','in_words','in_words_export','other_charges','other_charges_total']);
- if(cur_frm.cscript.custom_recalc)cur_frm.cscript.custom_recalc(doc);
-}
-
-// ******* Calculation of total amounts of document (item amount + other charges)****************
-cur_frm.cscript.calc_doc_values = function(doc, cdt, cdn, tname, fname, other_fname) {
- doc = locals[doc.doctype][doc.name];
- var net_total = 0; var other_charges_total = 0;
- var net_total_incl = 0
- var cl = getchildren(tname, doc.name, fname);
- for(var i = 0; i<cl.length; i++){
- //net_total += flt(cl[i].basic_rate) * flt(cl[i].qty);
- net_total += flt(cl[i].amount);
- net_total_incl += flt(cl[i].export_amount);
- }
-
- var inclusive_rate = 0
- var d = getchildren('Sales Taxes and Charges', doc.name, other_fname,doc.doctype);
- for(var j = 0; j<d.length; j++){
- other_charges_total += flt(d[j].tax_amount);
- if(d[j].included_in_print_rate) {
- inclusive_rate = 1;
- }
- }
-
- if(flt(doc.conversion_rate)>1) {
- net_total_incl *= flt(doc.conversion_rate);
- }
-
- doc.net_total = inclusive_rate ? flt(net_total_incl) : flt(net_total);
- doc.other_charges_total = roundNumber(flt(other_charges_total), 2);
- doc.grand_total = roundNumber((flt(net_total) + flt(other_charges_total)), 2);
- doc.rounded_total = Math.round(doc.grand_total);
- doc.grand_total_export = roundNumber((flt(doc.grand_total) / flt(doc.conversion_rate)), 2);
- doc.rounded_total_export = Math.round(doc.grand_total_export);
- doc.total_commission = flt(flt(net_total) * flt(doc.commission_rate) / 100);
-}
-
-// ******************************* OTHER CHARGES *************************************
-cur_frm.cscript.calc_other_charges = function(doc , tname , fname , other_fname) {
- doc = locals[doc.doctype][doc.name];
-
- // Make Display Area
- cur_frm.fields_dict['other_charges_calculation'].disp_area.innerHTML =
- '<b style="padding: 8px 0px;">Calculation Details for Taxes and Charges:</b>';
-
- var cl = getchildren(tname, doc.name, fname);
- var tax = getchildren('Sales Taxes and Charges', doc.name, other_fname,doc.doctype);
-
- // Make display table
- var otc = make_table(cur_frm.fields_dict['other_charges_calculation'].disp_area,
- cl.length + 1, tax.length + 1, '90%', [], { border:'1px solid #AAA', padding:'2px' });
- $y(otc,{marginTop:'8px'});
-
- var tax_desc = {}; var tax_desc_rates = []; var net_total = 0;
-
- for(var i=0;i<cl.length;i++) {
- net_total += flt(flt(cl[i].qty) * flt(cl[i].basic_rate));
- var prev_total = flt(cl[i].amount);
- if(cl[i].item_tax_rate) {
- try {
- var check_tax = JSON.parse(cl[i].item_tax_rate); //to get in dictionary
- } catch(exception) {
- var check_tax = eval('var a='+cl[i].item_tax_rate+';a'); //to get in dictionary
- }
- }
-
- // Add Item Code in new Row
- $td(otc,i+1,0).innerHTML = cl[i].item_code ? cl[i].item_code : cl[i].description;
-
- //var tax = getchildren('Sales Taxes and Charges', doc.name, other_fname,doc.doctype);
- var total = net_total;
-
-
- for(var t=0;t<tax.length;t++){
- var account = tax[t].account_head;
- $td(otc,0,t+1).innerHTML = account?account:'';
- //Check For Rate
- if(cl[i].item_tax_rate && check_tax[account]!=null) {
- var rate = flt(check_tax[account]);
- } else {
- // if particular item doesn't have particular rate it will take other charges rate
- var rate = flt(tax[t].rate);
- }
-
- //Check For Rate and get tax amount
- var tax_amount = cur_frm.cscript.check_charge_type_and_get_tax_amount(doc,tax,t, cl[i], rate);
-
- //enter item_wise_tax_detail i.e. tax rate on each item
- var item_wise_tax_detail = cur_frm.cscript.get_item_wise_tax_detail(doc, rate, cl, i, tax, t);
- if(tax[t].charge_type != "Actual") tax[t].item_wise_tax_detail += item_wise_tax_detail;
- tax[t].total_amount = flt(tax_amount); //stores actual tax amount in virtual field
- tax[t].total_tax_amount = flt(prev_total); //stores total amount in virtual field
- tax[t].tax_amount += flt(tax_amount);
- var total_amount = flt(tax[t].tax_amount);
- total_tax_amount = flt(tax[t].total_tax_amount) + flt(total_amount);
- set_multiple('Sales Taxes and Charges', tax[t].name, { 'item_wise_tax_detail':tax[t].item_wise_tax_detail, 'amount':roundNumber(flt(total_amount), 2), 'total':roundNumber(flt(total)+flt(tax[t].tax_amount), 2)}, other_fname);
- prev_total += flt(tax[t].total_amount); // for previous row total
- total += flt(tax[t].tax_amount); // for adding total to previous amount
-
- if(tax[t].charge_type == 'Actual')
- $td(otc,i+1,t+1).innerHTML = format_currency(tax[t].total_amount, erpnext.get_currency(doc.company));
- else
- $td(otc,i+1,t+1).innerHTML = '('+format_number(rate) + '%) ' +format_currency(tax[t].total_amount, erpnext.get_currency(doc.company));
-
- }
- }
-
- for(var t=0;t<tax.length;t++){
- tax[t].tax_amount = roundNumber(tax[t].tax_amount, 2);
- }
-}
-cur_frm.cscript.check_charge_type_and_get_tax_amount = function( doc, tax, t, cl, rate, print_amt) {
- doc = locals[doc.doctype][doc.name];
- if (! print_amt) print_amt = 0;
- var tax_amount = 0;
- if(tax[t].charge_type == 'Actual') {
- var value = flt(tax[t].rate) / flt(doc.net_total); // this give the ratio in which all items are divided
- return tax_amount = flt(value) * flt(cl.amount);
- }
- else if(tax[t].charge_type == 'On Net Total') {
- if (flt(print_amt) == 1) {
- doc.excise_rate = flt(rate);
- doc.total_excise_rate += flt(rate);
- refresh_field('excise_rate');
- refresh_field('total_excise_rate');
- return
- }
- return tax_amount = (flt(rate) * flt(cl.amount) / 100);
- }
- else if(tax[t].charge_type == 'On Previous Row Amount'){
- if(flt(print_amt) == 1) {
- doc.total_excise_rate += flt(flt(doc.excise_rate) * 0.01 * flt(rate));
- refresh_field('total_excise_rate');
- return
- }
- var row_no = (tax[t].row_id).toString();
- var row = (row_no).split("+"); // splits the values and stores in an array
- for(var r = 0;r<row.length;r++){
- var id = cint(row[r].replace(/^\s+|\s+$/g,""));
- tax_amount += (flt(rate) * flt(tax[id-1].total_amount) / 100);
- }
- var row_id = row_no.indexOf("/");
- if(row_id != -1) {
- rate = '';
- var row = (row_no).split("/"); // splits the values and stores in an array
- if(row.length>2) alert("You cannot enter more than 2 nos. for division");
- var id1 = cint(row[0].replace(/^\s+|\s+$/g,""));
- var id2 = cint(row[1].replace(/^\s+|\s+$/g,""));
- tax_amount = flt(tax[id1-1].total_amount) / flt(tax[id2-1].total_amount);
- }
- return tax_amount
- }
- else if(tax[t].charge_type == 'On Previous Row Total') {
- if(flt(print_amt) == 1) {
- doc.sales_tax_rate += flt(rate);
- refresh_field('sales_tax_rate');
- return
- }
- var row = cint(tax[t].row_id);
- return tax_amount = flt(rate) * (flt(tax[row-1].total_tax_amount)+flt(tax[row-1].total_amount)) / 100;
- }
-}
-
-// ********************** Functions for inclusive value calc ******************************
-cur_frm.cscript.consider_incl_rate = function(doc, other_fname) {
- var tax_list = getchildren('Sales Taxes and Charges', doc.name, other_fname, doc.doctype);
- for(var i=0; i<tax_list.length; i++) {
- if(tax_list[i].included_in_print_rate) {
- return true;
- }
- }
- return false;
-}
-
-cur_frm.cscript.back_calc_basic_rate = function(doc, tname, fname, child, other_fname) {
- var get_item_tax_rate = function(item, tax) {
- if(item.item_tax_rate) {
- try {
- var item_tax = JSON.parse(item.item_tax_rate);
- } catch(exception) {
- var item_tax = eval('var a='+item.item_tax_rate+';a');
- }
- if(item_tax[tax.account_head]!=null) {
- return flt(item_tax[tax.account_head]);
- }
- }
- };
-
- var tax_list = getchildren('Sales Taxes and Charges', doc.name, other_fname, doc.doctype);
- var total = 1;
- var temp_tax_list = [];
- var amt = 0;
- var item_tax_rate = 0;
- var rate = 0;
- for(var i=0; i<tax_list.length; i++) {
- amt = 0;
- item_tax_rate = get_item_tax_rate(child, tax_list[i]);
- rate = item_tax_rate ? item_tax_rate : flt(tax_list[i].rate);
- if(tax_list[i].included_in_print_rate) {
- if(tax_list[i].charge_type=='On Net Total') {
- amt = flt(rate / 100);
- } else if(tax_list[i].charge_type=='On Previous Row Total') {
- amt = flt((rate * temp_tax_list[tax_list[i].row_id-1]['total']) / 100);
- } else if(tax_list[i].charge_type=='On Previous Row Amount') {
- amt = flt((rate * temp_tax_list[tax_list[i].row_id-1]['amt']) / 100);
- }
- }
- total += flt(amt);
- temp_tax_list[i] = {
- amt: amt,
- total: total
- };
- }
- var basic_rate = (child.export_rate * flt(doc.conversion_rate)) / total;
- //console.log(temp_tax_list);
- //console.log('in basic rate back calc');
- //console.log(basic_rate);
- return basic_rate;
-}
-
-cur_frm.cscript.included_in_print_rate = function(doc, cdt, cdn) {
- var tax = locals[cdt][cdn];
- if(tax.included_in_print_rate==1) {
- if(!inList(['On Net Total', 'On Previous Row Total', 'On Previous Row Amount'], tax.charge_type)) {
- msgprint("'Is this Tax included in Basic Rate?' (i.e. Inclusive Price) is only valid for charges of type: <br /> \
- * On Net Total <br /> \
- * On Previous Row Amount <br /> \
- * On Previous Row Total");
- tax.included_in_print_rate = 0;
- refresh_field('included_in_print_rate', tax.name, cur_frm.cscript.other_fname);
- }
- var tax_list = getchildren('Sales Taxes and Charges', doc.name, cur_frm.cscript.other_fname, doc.doctype);
- cur_frm.cscript.validate_print_rate_option(doc, tax_list, tax.idx-1);
- }
-}
-
-// ********************** Update values in table ******************************
-cur_frm.cscript.update_fname_table = function(doc , tname , fname , n, other_fname) {
- doc = locals[doc.doctype][doc.name]
- var net_total = 0
- var cl = getchildren(tname, doc.name, fname);
- var consider_incl_rate = cur_frm.cscript.consider_incl_rate(doc, other_fname);
- for(var i=0;i<cl.length;i++) {
- if(n == 1){
- if(!consider_incl_rate) {
- if(flt(cl[i].ref_rate) > 0) {
- set_multiple(tname, cl[i].name, {
- 'export_rate': flt(flt(cl[i].ref_rate) * (100 - flt(cl[i].adj_rate)) / 100)
- }, fname);
- }
- set_multiple(tname, cl[i].name, {
- 'export_amount': flt(flt(cl[i].qty) * flt(cl[i].export_rate)),
- 'basic_rate': flt(flt(cl[i].export_rate) * flt(doc.conversion_rate)),
- 'amount': roundNumber(flt((flt(cl[i].export_rate) * flt(doc.conversion_rate)) * flt(cl[i].qty)), 2)
- }, fname);
- //var base_ref_rate = flt(cl[i].basic_rate) + flt(flt(cl[i].basic_rate) * flt(cl[i].adj_rate) / 100);
- //set_multiple(tname, cl[i].name, {
- // 'base_ref_rate': flt(base_ref_rate)
- //}, fname);
-
- } else if(consider_incl_rate) {
- if(flt(cl[i].export_rate) > 0) {
- // calculate basic rate based on taxes
- // then calculate and set basic_rate, base_ref_rate, ref_rate, amount, export_amount
- var ref_rate = flt(cl[i].adj_rate)!=flt(100) ?
- flt((100 * flt(cl[i].export_rate))/flt(100 - flt(cl[i].adj_rate))) :
- flt(0)
- set_multiple(tname, cl[i].name, { 'ref_rate': ref_rate }, fname);
- } else if((flt(cl[i].ref_rate) > 0) && (flt(cl[i].adj_rate) > 0)) {
- var export_rate = flt(cl[i].ref_rate) * flt(1 - flt(cl[i].adj_rate / 100));
- set_multiple(tname, cl[i].name, { 'export_rate': flt(export_rate) }, fname);
- }
- //console.log("export_rate: " + cl[i].export_rate);
-
- var basic_rate = cur_frm.cscript.back_calc_basic_rate(doc, tname, fname, cl[i], other_fname);
- var base_ref_rate = basic_rate + flt(basic_rate * flt(cl[i].adj_rate) / 100);
- set_multiple(tname, cl[i].name, {
- 'basic_rate': flt(basic_rate),
- 'amount': roundNumber(flt(basic_rate * flt(cl[i].qty)), 2),
- 'export_amount': flt(flt(cl[i].qty) * flt(cl[i].export_rate)),
- 'base_ref_rate': flt(base_ref_rate)
- }, fname);
- }
- }
- else if(n == 2){
- if(flt(cl[i].ref_rate) > 0)
- set_multiple(tname, cl[i].name, {'adj_rate': 100 - flt(flt(cl[i].basic_rate) * 100 / (flt(cl[i].ref_rate) * flt(doc.conversion_rate)))}, fname);
- set_multiple(tname, cl[i].name, {'amount': flt(flt(cl[i].qty) * flt(cl[i].basic_rate)), 'export_rate': flt(flt(cl[i].basic_rate) / flt(doc.conversion_rate)), 'export_amount': flt((flt(cl[i].basic_rate) / flt(doc.conversion_rate)) * flt(cl[i].qty)) }, fname);
- }
- /*else if(n == 3){
- set_multiple(tname, cl[i].name, {'basic_rate': flt(flt(cl[i].export_rate) * flt(doc.conversion_rate))}, fname);
- set_multiple(tname, cl[i].name, {'amount' : flt(flt(cl[i].basic_rate) * flt(cl[i].qty)), 'export_amount': flt(flt(cl[i].export_rate) * flt(cl[i].qty))}, fname);
- if(cl[i].ref_rate > 0)
- set_multiple(tname, cl[i].name, {'adj_rate': 100 - flt(flt(cl[i].export_rate) * 100 / flt(cl[i].ref_rate)), 'base_ref_rate': flt(flt(cl[i].ref_rate) * flt(doc.conversion_rate)) }, fname);
- }*/
- net_total += flt(flt(cl[i].qty) * flt(cl[i].basic_rate));
- }
- doc.net_total = net_total;
- refresh_field('net_total');
-}
-
-cur_frm.cscript.get_item_wise_tax_detail = function( doc, rate, cl, i, tax, t) {
- doc = locals[doc.doctype][doc.name];
- var detail = '';
- detail = cl[i].item_code + " : " + cstr(rate) + NEWLINE;
- return detail;
-}
-
-// **************** RE-CALCULATE VALUES ***************************
-
-cur_frm.cscript.recalculate_values = function(doc, cdt, cdn) {
- cur_frm.cscript.calculate_charges(doc,cdt,cdn);
-}
-
-cur_frm.cscript.validate_print_rate_option = function(doc, taxes, i) {
- if(in_list(['On Previous Row Amount','On Previous Row Total'], taxes[i].charge_type)) {
- if(!taxes[i].row_id){
- alert("Please Enter Row on which amount needs to be calculated for row : "+taxes[i].idx);
- validated = false;
- } else if(taxes[i].included_in_print_rate && taxes[taxes[i].row_id-1].charge_type=='Actual') {
- msgprint("Row of type 'Actual' cannot be depended on for type '" + taxes[i].charge_type + "'\
- when using tax inclusive prices.<br />\
- This will lead to incorrect values.<br /><br /> \
- <b>Please specify correct value in 'Enter Row' column of <span style='color:red'>Row: "
- + taxes[i].idx + "</span> in Taxes table</b>");
- validated = false;
- taxes[i].included_in_print_rate = 0;
- refresh_field('included_in_print_rate', taxes[i].name, other_fname);
- } else if ((taxes[i].included_in_print_rate && !taxes[taxes[i].row_id-1].included_in_print_rate) ||
- (!taxes[i].included_in_print_rate && taxes[taxes[i].row_id-1].included_in_print_rate)) {
- msgprint("If any row in the tax table depends on 'Previous Row Amount/Total', <br />\
- 'Is this Tax included in Basic Rate?' column should be same for both row <br />\
- i.e for that row and the previous row. <br /><br />\
- The same is violated for row #"+(i+1)+" and row #"+taxes[i].row_id
- );
- validated = false;
- }
- }
-}
-
-cur_frm.cscript.calculate_charges = function(doc, cdt, cdn) {
- var other_fname = cur_frm.cscript.other_fname;
-
- var cl = getchildren('Sales Taxes and Charges', doc.name, other_fname, doc.doctype);
- for(var i = 0; i<cl.length; i++){
- cl[i].total_tax_amount = 0;
- cl[i].total_amount = 0;
- cl[i].tax_amount = 0; // this is done to calculate other charges
- cl[i].total = 0;
- cur_frm.cscript.validate_print_rate_option(doc, cl, i);
- }
- cur_frm.cscript.recalc(doc, 1);
-}
-
-// Get Sales Partner Commission
-// =================================================================================
-cur_frm.cscript.sales_partner = function(doc, cdt, cdn){
- if(doc.sales_partner){
-
- get_server_fields('get_comm_rate', doc.sales_partner, '', doc, cdt, cdn, 1);
- }
-}
-
-// *******Commission Rate Trigger (calculates total commission amount)*********
-cur_frm.cscript.commission_rate = function(doc, cdt, cdn) {
- if(doc.commission_rate > 100){
- alert("Commision rate cannot be greater than 100.");
- doc.total_commission = 0;
- doc.commission_rate = 0;
- } else {
- doc.total_commission = doc.net_total * doc.commission_rate / 100;
- }
- refresh_many(['total_commission','commission_rate']);
-
-}
-
-// *******Total Commission Trigger (calculates commission rate)*********
-cur_frm.cscript.total_commission = function(doc, cdt, cdn) {
- if(doc.net_total){
- if(doc.net_total < doc.total_commission){
- alert("Total commission cannot be greater than net total.");
- doc.total_commission = 0;
- doc.commission_rate = 0;
- } else {
- doc.commission_rate = doc.total_commission * 100 / doc.net_total;
- }
- refresh_many(['total_commission','commission_rate']);
- }
-}
-// Sales Person Allocated % trigger
-// ==============================================================================
-cur_frm.cscript.allocated_percentage = function(doc, cdt, cdn) {
- var fname = cur_frm.cscript.sales_team_fname;
- var d = locals[cdt][cdn];
- if (d.allocated_percentage) {
- d.allocated_amount = flt(flt(doc.net_total)*flt(d.allocated_percentage)/100);
- refresh_field('allocated_amount', d.name, fname);
- }
-}
-
-// Client Side Validation
-// =================================================================================
-cur_frm.cscript.validate = function(doc, cdt, cdn) {
- cur_frm.cscript.validate_items(doc);
- var cl = getchildren('Sales Taxes and Charges Master', doc.name, 'other_charges');
- for(var i =0;i<cl.length;i++) {
- if(!cl[i].amount) {
- alert("Please Enter Amount in Row no. "+cl[i].idx+" in Taxes and Charges table");
- validated = false;
- }
- }
- cur_frm.cscript.calculate_charges (doc, cdt, cdn);
-
- if (doc.docstatus == 0 && cur_frm.cscript.calc_adjustment_amount)
- cur_frm.cscript.calc_adjustment_amount(doc);
-}
-
-
-// ************** Atleast one item in document ****************
-cur_frm.cscript.validate_items = function(doc) {
- var cl = getchildren(cur_frm.cscript.tname, doc.name, cur_frm.cscript.fname);
- if(!cl.length){
- alert("Please enter Items for " + doc.doctype);
- validated = false;
- }
-}
-
cur_frm.fields_dict.customer.get_query = erpnext.utils.customer_query;
\ No newline at end of file
diff --git a/selling/doctype/sales_common/sales_common.py b/selling/doctype/sales_common/sales_common.py
index 549128f..c524a92 100644
--- a/selling/doctype/sales_common/sales_common.py
+++ b/selling/doctype/sales_common/sales_common.py
@@ -28,23 +28,6 @@
from utilities.transaction_base import TransactionBase
-
-@webnotes.whitelist()
-def get_comp_base_currency(arg=None):
- """ get default currency of company"""
- res = webnotes.conn.sql("""select default_currency from `tabCompany`
- where name = %s""", webnotes.form_dict.get('company'))
- return res and res[0][0] or None
-
-@webnotes.whitelist()
-def get_price_list_currency(arg=None):
- """ Get all currency in which price list is maintained"""
- plc = webnotes.conn.sql("select distinct ref_currency from `tabItem Price` where price_list_name = %s", webnotes.form_dict['price_list'])
- plc = [d[0] for d in plc]
- base_currency = get_comp_base_currency(webnotes.form_dict['company'])
- return plc, base_currency
-
-
class DocType(TransactionBase):
def __init__(self,d,dl):
self.doc, self.doclist = d,dl
@@ -65,26 +48,6 @@
self.msg = []
-
- # Get Sales Person Details
- # ==========================
-
- # TODO: To be deprecated if not in use
- def get_sales_person_details(self, obj):
- if obj.doc.doctype != 'Quotation':
- obj.doclist = obj.doc.clear_table(obj.doclist,'sales_team')
- idx = 0
- for d in webnotes.conn.sql("select sales_person, allocated_percentage, allocated_amount, incentives from `tabSales Team` where parent = '%s'" % obj.doc.customer):
- ch = addchild(obj.doc, 'sales_team', 'Sales Team', obj.doclist)
- ch.sales_person = d and cstr(d[0]) or ''
- ch.allocated_percentage = d and flt(d[1]) or 0
- ch.allocated_amount = d and flt(d[2]) or 0
- ch.incentives = d and flt(d[3]) or 0
- ch.idx = idx
- idx += 1
- return obj.doclist
-
-
# Get customer's contact person details
# ==============================================================
def get_contact_details(self, obj = '', primary = 0):
@@ -102,204 +65,13 @@
obj.doc.customer_address = c['contact_address']
- # Get customer's primary shipping details
- # ==============================================================
- def get_shipping_details(self, obj = ''):
- det = webnotes.conn.sql("select name, ship_to, shipping_address from `tabShipping Address` where customer = '%s' and docstatus != 2 and ifnull(is_primary_address, 'Yes') = 'Yes'" %(obj.doc.customer), as_dict = 1)
- obj.doc.ship_det_no = det and det[0]['name'] or ''
- obj.doc.ship_to = det and det[0]['ship_to'] or ''
- obj.doc.shipping_address = det and det[0]['shipping_address'] or ''
-
-
# get invoice details
# ====================
def get_invoice_details(self, obj = ''):
if obj.doc.company:
acc_head = webnotes.conn.sql("select name from `tabAccount` where name = '%s' and docstatus != 2" % (cstr(obj.doc.customer) + " - " + webnotes.conn.get_value('Company', obj.doc.company, 'abbr')))
obj.doc.debit_to = acc_head and acc_head[0][0] or ''
-
-
-
- # Get Item Details
- # ===============================================================
- def get_item_details(self, args, obj):
- import json
- if not obj.doc.price_list_name:
- msgprint("Please Select Price List before selecting Items", raise_exception=True)
- item = webnotes.conn.sql("""select description, item_name, brand, item_group, stock_uom,
- default_warehouse, default_income_account, default_sales_cost_center,
- purchase_account, description_html, barcode from `tabItem`
- where name = %s and (ifnull(end_of_life,'')='' or end_of_life > now()
- or end_of_life = '0000-00-00') and (is_sales_item = 'Yes'
- or is_service_item = 'Yes')""", args['item_code'], as_dict=1)
-
- tax = webnotes.conn.sql("""select tax_type, tax_rate from `tabItem Tax`
- where parent = %s""", args['item_code'])
- t = {}
- for x in tax: t[x[0]] = flt(x[1])
- ret = {
- 'description': item and item[0]['description_html'] or \
- item[0]['description'],
- 'barcode': item and item[0]['barcode'] or '',
- 'item_group': item and item[0]['item_group'] or '',
- 'item_name': item and item[0]['item_name'] or '',
- 'brand': item and item[0]['brand'] or '',
- 'stock_uom': item and item[0]['stock_uom'] or '',
- 'reserved_warehouse': item and item[0]['default_warehouse'] or '',
- 'warehouse': item and item[0]['default_warehouse'] or \
- args.get('warehouse'),
- 'income_account': item and item[0]['default_income_account'] or \
- args.get('income_account'),
- 'expense_account': item and item[0]['purchase_account'] or \
- args.get('expense_account'),
- 'cost_center': item and item[0]['default_sales_cost_center'] or \
- args.get('cost_center'),
- # this is done coz if item once fetched is fetched again than its qty shld be reset to 1
- 'qty': 1.00,
- 'adj_rate': 0,
- 'amount': 0,
- 'export_amount': 0,
- 'item_tax_rate': json.dumps(t),
- 'batch_no': ''
- }
- if(obj.doc.price_list_name and item): #this is done to fetch the changed BASIC RATE and REF RATE based on PRICE LIST
- base_ref_rate = self.get_ref_rate(args['item_code'], obj.doc.price_list_name, obj.doc.price_list_currency, obj.doc.plc_conversion_rate)
- ret['ref_rate'] = flt(base_ref_rate)/flt(obj.doc.conversion_rate)
- ret['export_rate'] = flt(base_ref_rate)/flt(obj.doc.conversion_rate)
- ret['base_ref_rate'] = flt(base_ref_rate)
- ret['basic_rate'] = flt(base_ref_rate)
-
- if ret['warehouse'] or ret['reserved_warehouse']:
- av_qty = self.get_available_qty({'item_code': args['item_code'], 'warehouse': ret['warehouse'] or ret['reserved_warehouse']})
- ret.update(av_qty)
-
- # get customer code for given item from Item Customer Detail
- customer_item_code_row = webnotes.conn.sql("""\
- select ref_code from `tabItem Customer Detail`
- where parent = %s and customer_name = %s""",
- (args['item_code'], obj.doc.customer))
- if customer_item_code_row and customer_item_code_row[0][0]:
- ret['customer_item_code'] = customer_item_code_row[0][0]
-
- return ret
-
-
- def get_item_defaults(self, args):
- item = webnotes.conn.sql("""select default_warehouse, default_income_account,
- default_sales_cost_center, purchase_account from `tabItem` where name = %s
- and (ifnull(end_of_life,'') = '' or end_of_life > now() or end_of_life = '0000-00-00')
- and (is_sales_item = 'Yes' or is_service_item = 'Yes') """,
- (args['item_code']), as_dict=1)
- ret = {
- 'reserved_warehouse': item and item[0]['default_warehouse'] or '',
- 'warehouse': item and item[0]['default_warehouse'] or args.get('warehouse'),
- 'income_account': item and item[0]['default_income_account'] or \
- args.get('income_account'),
- 'expense_account': item and item[0]['purchase_account'] or args.get('expense_account'),
- 'cost_center': item and item[0]['default_sales_cost_center'] or args.get('cost_center'),
- }
-
- return ret
-
- def get_available_qty(self,args):
- tot_avail_qty = webnotes.conn.sql("select projected_qty, actual_qty from `tabBin` where item_code = '%s' and warehouse = '%s'" % (args['item_code'], args['warehouse']), as_dict=1)
- ret = {
- 'projected_qty' : tot_avail_qty and flt(tot_avail_qty[0]['projected_qty']) or 0,
- 'actual_qty' : tot_avail_qty and flt(tot_avail_qty[0]['actual_qty']) or 0
- }
- return ret
-
-
- # ***************** Get Ref rate as entered in Item Master ********************
- def get_ref_rate(self, item_code, price_list_name, price_list_currency, plc_conv_rate):
- ref_rate = webnotes.conn.sql("select ref_rate from `tabItem Price` where parent = %s and price_list_name = %s and ref_currency = %s and selling=1",
- (item_code, price_list_name, price_list_currency))
- base_ref_rate = ref_rate and flt(ref_rate[0][0]) * flt(plc_conv_rate) or 0
- return base_ref_rate
-
- def get_barcode_details(self, barcode):
- item = webnotes.conn.sql("select name, end_of_life, is_sales_item, is_service_item \
- from `tabItem` where barcode = %s", barcode, as_dict=1)
- ret = {}
- if not item:
- msgprint("""No item found for this barcode: %s.
- May be barcode not updated in item master. Please check""" % barcode)
- elif item[0]['end_of_life'] and getdate(cstr(item[0]['end_of_life'])) < nowdate():
- msgprint("Item: %s has been expired. Please check 'End of Life' field in item master" % item[0]['name'])
- elif item[0]['is_sales_item'] == 'No' and item[0]['is_service_item'] == 'No':
- msgprint("Item: %s is not a sales or service item" % item[0]['name'])
- elif len(item) > 1:
- msgprint("There are multiple item for this barcode. \nPlease select item code manually")
- else:
- ret = {'item_code': item and item[0]['name'] or ''}
-
- return ret
-
-
- # ****** Re-cancellculates Basic Rate & amount based on Price List Selected ******
- def get_adj_percent(self, obj):
- for d in getlist(obj.doclist, obj.fname):
- base_ref_rate = self.get_ref_rate(d.item_code, obj.doc.price_list_name, obj.doc.price_list_currency, obj.doc.plc_conversion_rate)
- d.adj_rate = 0
- d.ref_rate = flt(base_ref_rate)/flt(obj.doc.conversion_rate)
- d.basic_rate = flt(base_ref_rate)
- d.base_ref_rate = flt(base_ref_rate)
- d.export_rate = flt(base_ref_rate)/flt(obj.doc.conversion_rate)
- d.amount = flt(d.qty)*flt(base_ref_rate)
- d.export_amount = flt(d.qty)*flt(base_ref_rate)/flt(obj.doc.conversion_rate)
-
-
- # Load Default Taxes
- # ====================
- def load_default_taxes(self, obj):
- if cstr(obj.doc.charge):
- return self.get_other_charges(obj)
- else:
- return self.get_other_charges(obj, 1)
-
-
- # Get other charges from Master
- # =================================================================================
- def get_other_charges(self,obj, default=0):
- obj.doclist = obj.doc.clear_table(obj.doclist, 'other_charges')
- if not getlist(obj.doclist, 'other_charges'):
- if default: add_cond = 'ifnull(t2.is_default,0) = 1'
- else: add_cond = 't1.parent = "'+cstr(obj.doc.charge)+'"'
- idx = 0
- other_charge = webnotes.conn.sql("""\
- select t1.*
- from
- `tabSales Taxes and Charges` t1,
- `tabSales Taxes and Charges Master` t2
- where
- t1.parent = t2.name and
- t2.company = '%s' and
- %s
- order by t1.idx""" % (obj.doc.company, add_cond), as_dict=1)
- from webnotes.model import default_fields
- for other in other_charge:
- # remove default fields like parent, parenttype etc.
- # from query results
- for field in default_fields:
- if field in other: del other[field]
-
- d = addchild(obj.doc, 'other_charges', 'Sales Taxes and Charges',
- obj.doclist)
- d.fields.update(other)
- d.rate = flt(d.rate)
- d.tax_amount = flt(d.tax_rate)
- d.included_in_print_rate = cint(d.included_in_print_rate)
- d.idx = idx
- idx += 1
- return obj.doclist
-
- # Get TERMS AND CONDITIONS
- # =======================================================================================
- def get_tc_details(self,obj):
- r = webnotes.conn.sql("select terms from `tabTerms and Conditions` where name = %s", obj.doc.tc_name)
- if r: obj.doc.terms = r[0][0]
-
#---------------------------------------- Get Tax Details -------------------------------#
def get_tax_details(self, item_code, obj):
import json
@@ -329,23 +101,6 @@
}
return ret
- # Get Commission rate
- # =======================================================================
- def get_comm_rate(self, sales_partner, obj):
-
- comm_rate = webnotes.conn.sql("select commission_rate from `tabSales Partner` where name = '%s' and docstatus != 2" %(sales_partner), as_dict=1)
- if comm_rate:
- total_comm = flt(comm_rate[0]['commission_rate']) * flt(obj.doc.net_total) / 100
- ret = {
- 'commission_rate' : comm_rate and flt(comm_rate[0]['commission_rate']) or 0,
- 'total_commission' : flt(total_comm)
- }
- return ret
- else:
- msgprint("Business Associate : %s does not exist in the system." % (sales_partner))
- raise Exception
-
-
# To verify whether rate entered in details table does not exceed max discount %
# =======================================================================================
def validate_max_discount(self,obj, detail_table):
@@ -354,16 +109,6 @@
if discount and discount[0]['max_discount'] and (flt(d.adj_rate)>flt(discount[0]['max_discount'])):
msgprint("You cannot give more than " + cstr(discount[0]['max_discount']) + " % discount on Item Code : "+cstr(d.item_code))
raise Exception
-
-
- # Get sum of allocated % of sales person (it should be 100%)
- # ========================================================================
- # it indicates % contribution of sales person in sales
- def get_allocated_sum(self,obj):
- sales_team_list = obj.doclist.get({"parentfield": "sales_team"})
- total_allocation = sum([flt(d.allocated_percentage) for d in sales_team_list])
- if sales_team_list and total_allocation != 100.0:
- msgprint("Total Allocated % of Sales Persons should be 100%", raise_exception=True)
# Check Conversion Rate (i.e. it will not allow conversion rate to be 1 for Currency other than default currency set in Global Defaults)
# ===========================================================================
diff --git a/selling/doctype/sales_order/README.md b/selling/doctype/sales_order/README.md
new file mode 100644
index 0000000..e816a0e
--- /dev/null
+++ b/selling/doctype/sales_order/README.md
@@ -0,0 +1 @@
+Confirmed order received from Customer (either against a PO or a payment). All fulfilment details (shipments, billing) are tracked against the Sales Order.
\ No newline at end of file
diff --git a/selling/doctype/sales_order/sales_order.js b/selling/doctype/sales_order/sales_order.js
index b792754..ded9c44 100644
--- a/selling/doctype/sales_order/sales_order.js
+++ b/selling/doctype/sales_order/sales_order.js
@@ -26,105 +26,54 @@
wn.require('app/accounts/doctype/sales_taxes_and_charges_master/sales_taxes_and_charges_master.js');
wn.require('app/utilities/doctype/sms_control/sms_control.js');
-
-cur_frm.cscript.onload = function(doc, cdt, cdn) {
- cur_frm.cscript.manage_rounded_total();
-
- if(!doc.status) set_multiple(cdt,cdn,{status:'Draft'});
- if(!doc.transaction_date) set_multiple(cdt,cdn,{transaction_date:get_today()});
- if(!doc.price_list_currency) set_multiple(cdt, cdn, {price_list_currency: doc.currency, plc_conversion_rate: 1});
- // load default charges
-
- if(doc.__islocal && !doc.customer){
- hide_field(['customer_address','contact_person', 'customer_name',
- 'address_display', 'contact_display', 'contact_mobile',
- 'contact_email', 'territory', 'customer_group']);
- }
-}
-
-cur_frm.cscript.onload_post_render = function(doc, cdt, cdn) {
- var callback = function(doc, cdt, cdn) {
- if(doc.__islocal) {
- // defined in sales_common.js
- cur_frm.cscript.update_item_details(doc, cdt, cdn);
- }
- }
-
- cur_frm.cscript.hide_price_list_currency(doc, cdt, cdn, callback);
-
-}
-
-
-cur_frm.cscript.refresh = function(doc, cdt, cdn) {
- cur_frm.clear_custom_buttons();
- erpnext.hide_naming_series();
-
- if (!cur_frm.cscript.is_onload) cur_frm.cscript.hide_price_list_currency(doc, cdt, cdn);
-
- cur_frm.toggle_display("contact_info", doc.customer);
-
- if(doc.docstatus==1) {
- if(doc.status != 'Stopped') {
- cur_frm.add_custom_button('Send SMS', cur_frm.cscript.send_sms);
- // delivery note
- if(flt(doc.per_delivered, 2) < 100 && doc.order_type=='Sales')
- cur_frm.add_custom_button('Make Delivery', cur_frm.cscript['Make Delivery Note']);
+erpnext.selling.SalesOrderController = erpnext.selling.SellingController.extend({
+ refresh: function(doc, dt, dn) {
+ this._super();
+
+ if(doc.docstatus==1) {
+ if(doc.status != 'Stopped') {
+ cur_frm.add_custom_button('Send SMS', cur_frm.cscript.send_sms);
+ // delivery note
+ if(flt(doc.per_delivered, 2) < 100 && doc.order_type=='Sales')
+ cur_frm.add_custom_button('Make Delivery', cur_frm.cscript['Make Delivery Note']);
- // maintenance
- if(flt(doc.per_delivered, 2) < 100 && (doc.order_type !='Sales')) {
- cur_frm.add_custom_button('Make Maint. Visit', cur_frm.cscript.make_maintenance_visit);
- cur_frm.add_custom_button('Make Maint. Schedule', cur_frm.cscript['Make Maintenance Schedule']);
+ // maintenance
+ if(flt(doc.per_delivered, 2) < 100 && (doc.order_type !='Sales')) {
+ cur_frm.add_custom_button('Make Maint. Visit', cur_frm.cscript.make_maintenance_visit);
+ cur_frm.add_custom_button('Make Maint. Schedule', cur_frm.cscript['Make Maintenance Schedule']);
+ }
+
+ // indent
+ if(!doc.order_type || (doc.order_type == 'Sales'))
+ cur_frm.add_custom_button('Make ' + wn._('Material Request'), cur_frm.cscript['Make Material Request']);
+
+ // sales invoice
+ if(flt(doc.per_billed, 2) < 100)
+ cur_frm.add_custom_button('Make Invoice', cur_frm.cscript['Make Sales Invoice']);
+
+ // stop
+ if(flt(doc.per_delivered, 2) < 100 || doc.per_billed < 100)
+ cur_frm.add_custom_button('Stop!', cur_frm.cscript['Stop Sales Order']);
+ } else {
+ // un-stop
+ cur_frm.add_custom_button('Unstop', cur_frm.cscript['Unstop Sales Order']);
}
-
- // indent
- if(!doc.order_type || (doc.order_type == 'Sales'))
- cur_frm.add_custom_button('Make ' + wn._('Material Request'), cur_frm.cscript['Make Material Request']);
-
- // sales invoice
- if(flt(doc.per_billed, 2) < 100)
- cur_frm.add_custom_button('Make Invoice', cur_frm.cscript['Make Sales Invoice']);
-
- // stop
- if(flt(doc.per_delivered, 2) < 100 || doc.per_billed < 100)
- cur_frm.add_custom_button('Stop!', cur_frm.cscript['Stop Sales Order']);
- } else {
- // un-stop
- cur_frm.add_custom_button('Unstop', cur_frm.cscript['Unstop Sales Order']);
}
- }
- cur_frm.cscript.order_type(doc);
-}
-
-cur_frm.cscript.order_type = function(doc) {
- if(doc.order_type == "Sales") {
- cur_frm.toggle_reqd("delivery_date", 1);
- } else {
- cur_frm.toggle_reqd("delivery_date", 0);
- }
-}
-
-//customer
-cur_frm.cscript.customer = function(doc,dt,dn) {
- cur_frm.toggle_display("contact_info", doc.customer);
+ this.order_type(doc);
+ },
- var pl = doc.price_list_name;
- var callback = function(r,rt) {
- var callback2 = function(r, rt) {
- if(doc.customer)
- unhide_field(['customer_address', 'contact_person', 'territory','customer_group']);
- cur_frm.refresh();
-
- if(!onload && (pl != doc.price_list_name)) cur_frm.cscript.price_list_name(doc, dt, dn);
+ order_type: function() {
+ this.frm.toggle_reqd("delivery_date", this.frm.doc.order_type == "Sales");
+ },
+
+ reserved_warehouse: function(doc, cdt, cdn) {
+ this.warehouse(doc, cdt, cdn);
+ },
+});
- }
- var doc = locals[cur_frm.doctype][cur_frm.docname];
- get_server_fields('get_shipping_address',doc.customer,'',doc, dt, dn, 0, callback2);
-
- }
- if(doc.customer) $c_obj(make_doclist(doc.doctype, doc.name),
- 'get_default_customer_address', '', callback);
-}
+// for backward compatibility: combine new and previous states
+$.extend(cur_frm.cscript, new erpnext.selling.SalesOrderController({frm: cur_frm}));
cur_frm.cscript.customer_address = cur_frm.cscript.contact_person = function(doc,dt,dn) {
if(doc.customer) get_server_fields('get_customer_address', JSON.stringify({customer: doc.customer, address: doc.customer_address, contact: doc.contact_person}),'', doc, dt, dn, 1);
@@ -180,15 +129,6 @@
ORDER BY `tabQuotation`.`name` DESC LIMIT 50', {cond:cond});
}
-
-cur_frm.cscript.reserved_warehouse = function(doc, cdt , cdn) {
- var d = locals[cdt][cdn];
- if (d.reserved_warehouse) {
- arg = "{'item_code':'" + d.item_code + "','warehouse':'" + d.reserved_warehouse +"'}";
- get_server_fields('get_available_qty',arg,'sales_order_details',doc,cdt,cdn,1);
- }
-}
-
//----------- make maintenance schedule----------
cur_frm.cscript['Make Maintenance Schedule'] = function() {
var doc = cur_frm.doc;
diff --git a/selling/doctype/sales_order/sales_order.py b/selling/doctype/sales_order/sales_order.py
index c8db1f9..461965a 100644
--- a/selling/doctype/sales_order/sales_order.py
+++ b/selling/doctype/sales_order/sales_order.py
@@ -58,22 +58,6 @@
def get_comm_rate(self, sales_partner):
return get_obj('Sales Common').get_comm_rate(sales_partner, self)
- def get_item_details(self, args=None):
- import json
- args = args and json.loads(args) or {}
- if args.get('item_code'):
- return get_obj('Sales Common').get_item_details(args, self)
- else:
- obj = get_obj('Sales Common')
- for doc in self.doclist:
- if doc.fields.get('item_code'):
- arg = {'item_code':doc.fields.get('item_code'), 'income_account':doc.fields.get('income_account'),
- 'cost_center': doc.fields.get('cost_center'), 'warehouse': doc.fields.get('warehouse')};
- ret = obj.get_item_defaults(arg)
- for r in ret:
- if not doc.fields.get(r):
- doc.fields[r] = ret[r]
-
def get_adj_percent(self, arg=''):
get_obj('Sales Common').get_adj_percent(self)
@@ -83,15 +67,6 @@
def get_rate(self,arg):
return get_obj('Sales Common').get_rate(arg)
- def load_default_taxes(self):
- self.doclist = get_obj('Sales Common').load_default_taxes(self)
-
- def get_other_charges(self):
- self.doclist = get_obj('Sales Common').get_other_charges(self)
-
- def get_tc_details(self):
- return get_obj('Sales Common').get_tc_details(self)
-
def check_maintenance_schedule(self):
nm = sql("select t1.name from `tabMaintenance Schedule` t1, `tabMaintenance Schedule Item` t2 where t2.parent=t1.name and t2.prevdoc_docname=%s and t1.docstatus=1", self.doc.name)
nm = nm and nm[0][0] or ''
@@ -118,10 +93,6 @@
if getdate(self.doc.transaction_date) > getdate(self.doc.delivery_date):
msgprint("Expected Delivery Date cannot be before Sales Order Date")
raise Exception
- # amendment date is necessary if document is amended
- if self.doc.amended_from and not self.doc.amendment_date:
- msgprint("Please Enter Amendment Date")
- raise Exception
def validate_po(self):
# validate p.o date v/s delivery date
@@ -194,6 +165,8 @@
and current Sales Order""" % (self.doc.order_type, d.prevdoc_docname))
def validate_order_type(self):
+ super(DocType, self).validate_order_type()
+
#validate delivery date
if self.doc.order_type == 'Sales' and not self.doc.delivery_date:
msgprint("Please enter 'Expected Delivery Date'")
@@ -226,7 +199,6 @@
sales_com_obj.check_conversion_rate(self)
sales_com_obj.validate_max_discount(self,'sales_order_details')
- sales_com_obj.get_allocated_sum(self)
self.doclist = sales_com_obj.make_packing_list(self,'sales_order_details')
if not self.doc.status:
diff --git a/selling/doctype/sales_order/sales_order.txt b/selling/doctype/sales_order/sales_order.txt
index ba0b1de..02ffae7 100644
--- a/selling/doctype/sales_order/sales_order.txt
+++ b/selling/doctype/sales_order/sales_order.txt
@@ -1,8 +1,8 @@
[
{
- "creation": "2013-03-07 14:48:34",
+ "creation": "2013-05-24 19:29:08",
"docstatus": 0,
- "modified": "2013-01-29 17:14:58",
+ "modified": "2013-06-05 18:59:41",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -32,6 +32,7 @@
"parent": "Sales Order",
"parentfield": "permissions",
"parenttype": "DocType",
+ "permlevel": 0,
"read": 1
},
{
@@ -76,42 +77,47 @@
"search_index": 1
},
{
+ "depends_on": "customer",
"doctype": "DocField",
"fieldname": "customer_name",
"fieldtype": "Data",
- "hidden": 1,
+ "hidden": 0,
"label": "Name",
"read_only": 1
},
{
+ "depends_on": "customer",
"doctype": "DocField",
"fieldname": "address_display",
"fieldtype": "Small Text",
- "hidden": 1,
+ "hidden": 0,
"label": "Address",
"read_only": 1
},
{
+ "depends_on": "customer",
"doctype": "DocField",
"fieldname": "contact_display",
"fieldtype": "Small Text",
- "hidden": 1,
+ "hidden": 0,
"label": "Contact",
"read_only": 1
},
{
+ "depends_on": "customer",
"doctype": "DocField",
"fieldname": "contact_mobile",
"fieldtype": "Text",
- "hidden": 1,
+ "hidden": 0,
"label": "Mobile No",
"read_only": 1
},
{
+ "depends_on": "customer",
"doctype": "DocField",
"fieldname": "contact_email",
"fieldtype": "Text",
- "hidden": 1,
+ "hidden": 0,
"label": "Contact Email",
"print_hide": 1,
"read_only": 1
@@ -137,6 +143,34 @@
"width": "50%"
},
{
+ "doctype": "DocField",
+ "fieldname": "amended_from",
+ "fieldtype": "Data",
+ "hidden": 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",
"description": "The date at which current entry is made in system.",
"doctype": "DocField",
@@ -216,6 +250,76 @@
},
{
"doctype": "DocField",
+ "fieldname": "sec_break45",
+ "fieldtype": "Section Break",
+ "label": "Price List and Currency"
+ },
+ {
+ "description": "Customer's currency",
+ "doctype": "DocField",
+ "fieldname": "currency",
+ "fieldtype": "Link",
+ "label": "Currency",
+ "oldfieldname": "currency",
+ "oldfieldtype": "Select",
+ "options": "Currency",
+ "print_hide": 1,
+ "reqd": 1,
+ "width": "100px"
+ },
+ {
+ "default": "1.00",
+ "description": "Rate at which customer's currency is converted to company's base currency",
+ "doctype": "DocField",
+ "fieldname": "conversion_rate",
+ "fieldtype": "Float",
+ "label": "Conversion Rate",
+ "oldfieldname": "conversion_rate",
+ "oldfieldtype": "Currency",
+ "print_hide": 1,
+ "reqd": 1,
+ "width": "100px"
+ },
+ {
+ "doctype": "DocField",
+ "fieldname": "column_break2",
+ "fieldtype": "Column Break",
+ "width": "50%"
+ },
+ {
+ "description": "Select the price list as entered in \"Price List\" master. This will pull the reference rates of items against this price list as specified in \"Item\" master.",
+ "doctype": "DocField",
+ "fieldname": "price_list_name",
+ "fieldtype": "Select",
+ "label": "Price List",
+ "oldfieldname": "price_list_name",
+ "oldfieldtype": "Select",
+ "options": "link:Price List",
+ "print_hide": 1,
+ "reqd": 1,
+ "width": "100px"
+ },
+ {
+ "description": "Select the currency in which price list is maintained",
+ "doctype": "DocField",
+ "fieldname": "price_list_currency",
+ "fieldtype": "Link",
+ "label": "Price List Currency",
+ "options": "Currency",
+ "print_hide": 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 Currency Conversion Rate",
+ "print_hide": 1,
+ "reqd": 1
+ },
+ {
+ "doctype": "DocField",
"fieldname": "items",
"fieldtype": "Section Break",
"label": "Items",
@@ -230,7 +334,29 @@
"oldfieldname": "sales_order_details",
"oldfieldtype": "Table",
"options": "Sales Order Item",
- "print_hide": 0
+ "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",
+ "print_hide": 1
+ },
+ {
+ "doctype": "DocField",
+ "fieldname": "packing_details",
+ "fieldtype": "Table",
+ "label": "Packing Details",
+ "oldfieldname": "packing_details",
+ "oldfieldtype": "Table",
+ "options": "Delivery Note Packing Item",
+ "print_hide": 1,
+ "read_only": 1
},
{
"doctype": "DocField",
@@ -238,40 +364,6 @@
"fieldtype": "Section Break"
},
{
- "doctype": "DocField",
- "fieldname": "col_break20",
- "fieldtype": "Column Break",
- "width": "50%"
- },
- {
- "doctype": "DocField",
- "fieldname": "net_total",
- "fieldtype": "Currency",
- "label": "Net Total*",
- "oldfieldname": "net_total",
- "oldfieldtype": "Currency",
- "options": "Company:company:default_currency",
- "print_hide": 0,
- "read_only": 1,
- "reqd": 0,
- "width": "150px"
- },
- {
- "doctype": "DocField",
- "fieldname": "recalculate_values",
- "fieldtype": "Button",
- "label": "Re-Calculate Values",
- "oldfieldtype": "Button",
- "print_hide": 1,
- "search_index": 0
- },
- {
- "doctype": "DocField",
- "fieldname": "col_break_21",
- "fieldtype": "Column Break",
- "width": "50%"
- },
- {
"description": "Quotation no against which this Sales Order is made ",
"doctype": "DocField",
"fieldname": "quotation_no",
@@ -312,73 +404,39 @@
},
{
"doctype": "DocField",
- "fieldname": "sec_break45",
- "fieldtype": "Section Break",
- "label": "Price List and Currency"
- },
- {
- "description": "Select the price list as entered in \"Price List\" master. This will pull the reference rates of items against this price list as specified in \"Item\" master.",
- "doctype": "DocField",
- "fieldname": "price_list_name",
- "fieldtype": "Select",
- "label": "Price List",
- "oldfieldname": "price_list_name",
- "oldfieldtype": "Select",
- "options": "link:Price List",
- "print_hide": 1,
- "reqd": 1,
- "width": "100px"
- },
- {
- "description": "Select the currency in which price list is maintained",
- "doctype": "DocField",
- "fieldname": "price_list_currency",
- "fieldtype": "Link",
- "label": "Price List Currency",
- "options": "Currency",
- "print_hide": 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 Currency Conversion Rate",
- "print_hide": 1,
- "reqd": 1
- },
- {
- "doctype": "DocField",
- "fieldname": "column_break2",
+ "fieldname": "col_break20",
"fieldtype": "Column Break",
"width": "50%"
},
{
- "description": "Customer's currency",
"doctype": "DocField",
- "fieldname": "currency",
- "fieldtype": "Link",
- "label": "Currency",
- "oldfieldname": "currency",
- "oldfieldtype": "Select",
- "options": "Currency",
- "print_hide": 1,
- "reqd": 1,
- "width": "100px"
+ "fieldname": "net_total_export",
+ "fieldtype": "Currency",
+ "label": "Net Total (Export)",
+ "options": "currency",
+ "read_only": 1
},
{
- "default": "1.00",
- "description": "Rate at which customer's currency is converted to company's base currency",
"doctype": "DocField",
- "fieldname": "conversion_rate",
- "fieldtype": "Float",
- "label": "Conversion Rate",
- "oldfieldname": "conversion_rate",
+ "fieldname": "net_total",
+ "fieldtype": "Currency",
+ "label": "Net Total*",
+ "oldfieldname": "net_total",
"oldfieldtype": "Currency",
+ "options": "Company:company:default_currency",
"print_hide": 1,
- "reqd": 1,
- "width": "100px"
+ "read_only": 1,
+ "reqd": 0,
+ "width": "150px"
+ },
+ {
+ "doctype": "DocField",
+ "fieldname": "recalculate_values",
+ "fieldtype": "Button",
+ "label": "Re-Calculate Values",
+ "oldfieldtype": "Button",
+ "print_hide": 1,
+ "search_index": 0
},
{
"doctype": "DocField",
@@ -400,6 +458,11 @@
},
{
"doctype": "DocField",
+ "fieldname": "column_break_38",
+ "fieldtype": "Column Break"
+ },
+ {
+ "doctype": "DocField",
"fieldname": "get_charges",
"fieldtype": "Button",
"label": "Get Taxes and Charges",
@@ -407,6 +470,11 @@
},
{
"doctype": "DocField",
+ "fieldname": "section_break_40",
+ "fieldtype": "Section Break"
+ },
+ {
+ "doctype": "DocField",
"fieldname": "other_charges",
"fieldtype": "Table",
"label": "Sales Taxes and Charges",
@@ -416,17 +484,31 @@
},
{
"doctype": "DocField",
- "fieldname": "calculate_charges",
- "fieldtype": "Button",
- "label": "Calculate Taxes and Charges",
- "oldfieldtype": "Button",
+ "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 (Export)",
+ "options": "currency",
+ "print_hide": 1,
+ "read_only": 1
+ },
+ {
+ "doctype": "DocField",
"fieldname": "other_charges_total",
"fieldtype": "Currency",
- "label": "Taxes and Charges Total*",
+ "label": "Taxes and Charges Total",
"oldfieldname": "other_charges_total",
"oldfieldtype": "Currency",
"options": "Company:company:default_currency",
@@ -436,10 +518,15 @@
},
{
"doctype": "DocField",
- "fieldname": "other_charges_calculation",
- "fieldtype": "HTML",
- "label": "Taxes and Charges Calculation",
- "oldfieldtype": "HTML",
+ "fieldname": "column_break_46",
+ "fieldtype": "Column Break"
+ },
+ {
+ "doctype": "DocField",
+ "fieldname": "calculate_charges",
+ "fieldtype": "Button",
+ "label": "Calculate Taxes and Charges",
+ "oldfieldtype": "Button",
"print_hide": 0
},
{
@@ -452,6 +539,50 @@
},
{
"doctype": "DocField",
+ "fieldname": "grand_total_export",
+ "fieldtype": "Currency",
+ "label": "Grand Total (Export)",
+ "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 (Export)",
+ "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 (Export)",
+ "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*",
@@ -489,50 +620,6 @@
},
{
"doctype": "DocField",
- "fieldname": "column_break3",
- "fieldtype": "Column Break",
- "oldfieldtype": "Column Break",
- "print_hide": 1,
- "width": "50%"
- },
- {
- "doctype": "DocField",
- "fieldname": "grand_total_export",
- "fieldtype": "Currency",
- "label": "Grand Total (Export)",
- "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 (Export)",
- "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 (Export)",
- "oldfieldname": "in_words_export",
- "oldfieldtype": "Data",
- "print_hide": 0,
- "read_only": 1,
- "width": "200px"
- },
- {
- "doctype": "DocField",
"fieldname": "terms_section_break",
"fieldtype": "Section Break",
"label": "Terms and Conditions",
@@ -552,21 +639,21 @@
},
{
"doctype": "DocField",
+ "fieldname": "column_break_58",
+ "fieldtype": "Column Break"
+ },
+ {
+ "doctype": "DocField",
"fieldname": "get_terms",
"fieldtype": "Button",
"label": "Get Terms and Conditions",
"oldfieldtype": "Button",
- "options": "get_tc_details",
"print_hide": 1
},
{
"doctype": "DocField",
- "fieldname": "terms_html",
- "fieldtype": "HTML",
- "label": "Terms and Conditions HTML",
- "oldfieldtype": "HTML",
- "options": "You can add Terms and Notes that will be printed in the Transaction",
- "print_hide": 1
+ "fieldname": "section_break_60",
+ "fieldtype": "Section Break"
},
{
"doctype": "DocField",
@@ -578,6 +665,7 @@
"print_hide": 0
},
{
+ "depends_on": "customer",
"doctype": "DocField",
"fieldname": "contact_info",
"fieldtype": "Section Break",
@@ -591,6 +679,35 @@
},
{
"doctype": "DocField",
+ "fieldname": "territory",
+ "fieldtype": "Link",
+ "in_filter": 1,
+ "label": "Territory",
+ "options": "Territory",
+ "print_hide": 1,
+ "reqd": 1,
+ "search_index": 1
+ },
+ {
+ "description": "Category of customer as entered in Customer master",
+ "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,
@@ -609,35 +726,6 @@
"print_hide": 1
},
{
- "doctype": "DocField",
- "fieldname": "territory",
- "fieldtype": "Link",
- "in_filter": 1,
- "label": "Territory",
- "options": "Territory",
- "print_hide": 1,
- "reqd": 1,
- "search_index": 1
- },
- {
- "doctype": "DocField",
- "fieldname": "col_break46",
- "fieldtype": "Column Break",
- "width": "50%"
- },
- {
- "description": "Category of customer as entered in Customer master",
- "doctype": "DocField",
- "fieldname": "customer_group",
- "fieldtype": "Link",
- "in_filter": 1,
- "label": "Customer Group",
- "options": "Customer Group",
- "print_hide": 1,
- "reqd": 1,
- "search_index": 1
- },
- {
"description": "Filling in additional information about the Sales Order will help you analyze your data better.",
"doctype": "DocField",
"fieldname": "more_info",
@@ -647,6 +735,39 @@
"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",
@@ -679,58 +800,6 @@
"report_hide": 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": "amended_from",
- "fieldtype": "Data",
- "hidden": 1,
- "label": "Amended From",
- "no_copy": 1,
- "oldfieldname": "amended_from",
- "oldfieldtype": "Data",
- "print_hide": 1,
- "read_only": 1,
- "width": "150px"
- },
- {
- "description": "The date at which current entry is corrected in the system.",
- "doctype": "DocField",
- "fieldname": "amendment_date",
- "fieldtype": "Date",
- "hidden": 1,
- "label": "Amendment Date",
- "no_copy": 1,
- "oldfieldname": "amendment_date",
- "oldfieldtype": "Date",
- "print_hide": 1,
- "width": "100px"
- },
- {
- "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"
- },
- {
"doctype": "DocField",
"fieldname": "fiscal_year",
"fieldtype": "Select",
@@ -745,48 +814,14 @@
"width": "150px"
},
{
- "depends_on": "eval:!doc.__islocal",
"doctype": "DocField",
- "fieldname": "cancel_reason",
- "fieldtype": "Data",
- "label": "Cancel Reason",
- "no_copy": 1,
- "oldfieldname": "cancel_reason",
- "oldfieldtype": "Data",
- "print_hide": 1,
- "read_only": 1
- },
- {
- "doctype": "DocField",
- "fieldname": "column_break5",
- "fieldtype": "Column Break",
+ "fieldname": "section_break_78",
+ "fieldtype": "Section Break",
"oldfieldtype": "Column Break",
"print_hide": 1,
"width": "50%"
},
{
- "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
- },
- {
- "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
- },
- {
"default": "Draft",
"doctype": "DocField",
"fieldname": "status",
@@ -805,6 +840,16 @@
"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",
@@ -821,6 +866,11 @@
"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",
@@ -838,16 +888,6 @@
},
{
"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
- },
- {
- "doctype": "DocField",
"fieldname": "billing_status",
"fieldtype": "Select",
"hidden": 1,
@@ -857,27 +897,6 @@
"print_hide": 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",
- "print_hide": 1
- },
- {
- "doctype": "DocField",
- "fieldname": "packing_details",
- "fieldtype": "Table",
- "label": "Packing Details",
- "oldfieldname": "packing_details",
- "oldfieldtype": "Table",
- "options": "Delivery Note Packing Item",
- "print_hide": 1,
- "read_only": 1
- },
- {
"doctype": "DocField",
"fieldname": "sales_team_section_break",
"fieldtype": "Section Break",
@@ -886,13 +905,6 @@
"print_hide": 1
},
{
- "doctype": "DocField",
- "fieldname": "column_break6",
- "fieldtype": "Column Break",
- "print_hide": 1,
- "width": "50%"
- },
- {
"description": "Name as entered in Sales Partner master",
"doctype": "DocField",
"fieldname": "sales_partner",
@@ -951,23 +963,10 @@
"print_hide": 1
},
{
- "amend": 0,
- "cancel": 0,
- "create": 0,
- "doctype": "DocPerm",
- "match": "",
- "permlevel": 1,
- "report": 0,
- "role": "Sales Manager",
- "submit": 0,
- "write": 0
- },
- {
"amend": 1,
"cancel": 1,
"create": 1,
"doctype": "DocPerm",
- "permlevel": 0,
"report": 1,
"role": "Sales Manager",
"submit": 1,
@@ -978,76 +977,38 @@
"cancel": 1,
"create": 1,
"doctype": "DocPerm",
- "match": "",
- "permlevel": 0,
"report": 1,
"role": "Sales User",
"submit": 1,
"write": 1
},
{
- "amend": 0,
- "cancel": 0,
- "create": 0,
- "doctype": "DocPerm",
- "match": "",
- "permlevel": 1,
- "report": 0,
- "role": "Sales User",
- "submit": 0,
- "write": 0
- },
- {
"amend": 1,
"cancel": 1,
"create": 1,
"doctype": "DocPerm",
- "permlevel": 0,
"report": 1,
"role": "Maintenance Manager",
"submit": 1,
"write": 1
},
{
- "amend": 0,
- "cancel": 0,
- "create": 0,
- "doctype": "DocPerm",
- "match": "",
- "permlevel": 1,
- "role": "Maintenance Manager",
- "submit": 0
- },
- {
"amend": 1,
"cancel": 1,
"create": 1,
"doctype": "DocPerm",
- "permlevel": 0,
"report": 1,
"role": "Maintenance User",
"submit": 1,
"write": 1
},
{
- "amend": 0,
- "cancel": 0,
- "create": 0,
"doctype": "DocPerm",
- "match": "",
- "permlevel": 1,
- "role": "Maintenance User",
- "submit": 0
- },
- {
- "doctype": "DocPerm",
- "permlevel": 0,
"role": "Accounts User"
},
{
"doctype": "DocPerm",
"match": "customer",
- "permlevel": 0,
"role": "Customer"
}
]
\ No newline at end of file
diff --git a/selling/doctype/sales_order_item/README.md b/selling/doctype/sales_order_item/README.md
new file mode 100644
index 0000000..4ed510e
--- /dev/null
+++ b/selling/doctype/sales_order_item/README.md
@@ -0,0 +1 @@
+Item detail in parent Sales Order.
\ No newline at end of file
diff --git a/selling/doctype/sales_order_item/sales_order_item.txt b/selling/doctype/sales_order_item/sales_order_item.txt
index c65ac0d..7276fc3 100644
--- a/selling/doctype/sales_order_item/sales_order_item.txt
+++ b/selling/doctype/sales_order_item/sales_order_item.txt
@@ -2,7 +2,7 @@
{
"creation": "2013-03-07 11:42:58",
"docstatus": 0,
- "modified": "2013-05-22 12:09:03",
+ "modified": "2013-05-22 12:10:03",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -113,7 +113,7 @@
"options": "currency",
"print_hide": 1,
"print_width": "70px",
- "read_only": 0,
+ "read_only": 1,
"reqd": 0,
"width": "70px"
},
@@ -183,7 +183,7 @@
"options": "Company:company:default_currency",
"print_hide": 1,
"print_width": "100px",
- "read_only": 0,
+ "read_only": 1,
"reqd": 0,
"width": "100px"
},
diff --git a/selling/doctype/sales_team/README.md b/selling/doctype/sales_team/README.md
new file mode 100644
index 0000000..e41d5ba
--- /dev/null
+++ b/selling/doctype/sales_team/README.md
@@ -0,0 +1 @@
+Sales Person involved in parent Quotation, Sales Order.
\ No newline at end of file
diff --git a/selling/doctype/sales_team/sales_team.txt b/selling/doctype/sales_team/sales_team.txt
index add466c..29a951e 100644
--- a/selling/doctype/sales_team/sales_team.txt
+++ b/selling/doctype/sales_team/sales_team.txt
@@ -1,8 +1,8 @@
[
{
- "creation": "2013-02-22 01:27:53",
+ "creation": "2013-04-19 13:30:51",
"docstatus": 0,
- "modified": "2013-03-07 07:03:31",
+ "modified": "2013-05-21 17:04:45",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -42,6 +42,7 @@
"doctype": "DocField",
"fieldname": "sales_designation",
"fieldtype": "Data",
+ "hidden": 0,
"label": "Designation",
"oldfieldname": "sales_designation",
"oldfieldtype": "Data",
@@ -63,7 +64,7 @@
"doctype": "DocField",
"fieldname": "allocated_percentage",
"fieldtype": "Float",
- "label": "Allocated (%)",
+ "label": "Contribution (%)",
"oldfieldname": "allocated_percentage",
"oldfieldtype": "Currency",
"print_width": "100px",
@@ -74,11 +75,12 @@
"doctype": "DocField",
"fieldname": "allocated_amount",
"fieldtype": "Currency",
- "label": "Allocated Amount",
+ "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"
},
diff --git a/selling/doctype/shipping_address/__init__.py b/selling/doctype/shipping_address/__init__.py
deleted file mode 100755
index baffc48..0000000
--- a/selling/doctype/shipping_address/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-from __future__ import unicode_literals
diff --git a/selling/doctype/shipping_address/locale/_messages_doc.json b/selling/doctype/shipping_address/locale/_messages_doc.json
deleted file mode 100644
index 38b52b8..0000000
--- a/selling/doctype/shipping_address/locale/_messages_doc.json
+++ /dev/null
@@ -1,13 +0,0 @@
-[
- "Customer",
- "Trash Reason",
- "Selling",
- "Ship To",
- "No",
- "Customer Address",
- "Shipping Address",
- "Customer Name",
- "Shipping Details",
- "Yes",
- "Is Primary Address"
-]
\ No newline at end of file
diff --git a/selling/doctype/shipping_address/locale/ar-doc.json b/selling/doctype/shipping_address/locale/ar-doc.json
deleted file mode 100644
index 8c41910..0000000
--- a/selling/doctype/shipping_address/locale/ar-doc.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- "Customer": "\u0632\u0628\u0648\u0646",
- "Customer Address": "\u0627\u0644\u0639\u0646\u0648\u0627\u0646 \u0627\u0644\u0639\u0645\u0644\u0627\u0621",
- "Customer Name": "\u0627\u0633\u0645 \u0627\u0644\u0639\u0645\u064a\u0644",
- "Is Primary Address": "\u0647\u0648 \u0627\u0644\u0639\u0646\u0648\u0627\u0646 \u0627\u0644\u0631\u0626\u064a\u0633\u064a",
- "No": "\u0644\u0627",
- "Selling": "\u0628\u064a\u0639",
- "Ship To": "\u0627\u0644\u0633\u0641\u064a\u0646\u0629",
- "Shipping Address": "\u0639\u0646\u0648\u0627\u0646 \u0627\u0644\u0634\u062d\u0646",
- "Shipping Details": "\u062a\u0641\u0627\u0635\u064a\u0644 \u0627\u0644\u0634\u062d\u0646",
- "Trash Reason": "\u0627\u0644\u0633\u0628\u0628 \u0627\u0644\u0642\u0645\u0627\u0645\u0629",
- "Yes": "\u0646\u0639\u0645"
-}
\ No newline at end of file
diff --git a/selling/doctype/shipping_address/locale/de-doc.json b/selling/doctype/shipping_address/locale/de-doc.json
deleted file mode 100644
index a084f0e..0000000
--- a/selling/doctype/shipping_address/locale/de-doc.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- "Customer": "Kunde",
- "Customer Address": "Kundenadresse",
- "Customer Name": "Name des Kunden",
- "Is Primary Address": "Ist Primary Address",
- "No": "Auf",
- "Selling": "Verkauf",
- "Ship To": "Ship To",
- "Shipping Address": "Versandadresse",
- "Shipping Details": "Versandkosten Details",
- "Trash Reason": "Trash Reason",
- "Yes": "Ja"
-}
\ No newline at end of file
diff --git a/selling/doctype/shipping_address/locale/es-doc.json b/selling/doctype/shipping_address/locale/es-doc.json
deleted file mode 100644
index c95011f..0000000
--- a/selling/doctype/shipping_address/locale/es-doc.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- "Customer": "Cliente",
- "Customer Address": "Direcci\u00f3n del cliente",
- "Customer Name": "Nombre del cliente",
- "Is Primary Address": "Es la direcci\u00f3n primaria",
- "No": "No",
- "Selling": "De venta",
- "Ship To": "Enviamos",
- "Shipping Address": "Direcci\u00f3n de env\u00edo",
- "Shipping Details": "Detalles del env\u00edo",
- "Trash Reason": "Trash Raz\u00f3n",
- "Yes": "S\u00ed"
-}
\ No newline at end of file
diff --git a/selling/doctype/shipping_address/locale/fr-doc.json b/selling/doctype/shipping_address/locale/fr-doc.json
deleted file mode 100644
index 4ba09be..0000000
--- a/selling/doctype/shipping_address/locale/fr-doc.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- "Customer": "Client",
- "Customer Address": "Adresse du client",
- "Customer Name": "Nom du client",
- "Is Primary Address": "Est-Adresse principale",
- "No": "Aucun",
- "Selling": "Vente",
- "Ship To": "Exp\u00e9dier \u00e0",
- "Shipping Address": "Adresse de livraison",
- "Shipping Details": "D\u00e9tails d'Envoi",
- "Trash Reason": "Raison Corbeille",
- "Yes": "Oui"
-}
\ No newline at end of file
diff --git a/selling/doctype/shipping_address/locale/hi-doc.json b/selling/doctype/shipping_address/locale/hi-doc.json
deleted file mode 100644
index 743bdd6..0000000
--- a/selling/doctype/shipping_address/locale/hi-doc.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- "Customer": "\u0917\u094d\u0930\u093e\u0939\u0915",
- "Customer Address": "\u0917\u094d\u0930\u093e\u0939\u0915 \u092a\u0924\u093e",
- "Customer Name": "\u0917\u094d\u0930\u093e\u0939\u0915 \u0915\u093e \u0928\u093e\u092e",
- "Is Primary Address": "\u092a\u094d\u0930\u093e\u0925\u092e\u093f\u0915 \u092a\u0924\u093e",
- "No": "\u0928\u0939\u0940\u0902",
- "Selling": "\u0935\u093f\u0915\u094d\u0930\u092f",
- "Ship To": "\u0915\u0930\u0928\u0947 \u0915\u0947 \u0932\u093f\u090f \u0936\u093f\u092a",
- "Shipping Address": "\u0936\u093f\u092a\u093f\u0902\u0917 \u092a\u0924\u093e",
- "Shipping Details": "\u0936\u093f\u092a\u093f\u0902\u0917 \u0935\u093f\u0935\u0930\u0923",
- "Trash Reason": "\u091f\u094d\u0930\u0948\u0936 \u0915\u093e\u0930\u0923",
- "Yes": "\u0939\u093e\u0902"
-}
\ No newline at end of file
diff --git a/selling/doctype/shipping_address/locale/hr-doc.json b/selling/doctype/shipping_address/locale/hr-doc.json
deleted file mode 100644
index dbe0c57..0000000
--- a/selling/doctype/shipping_address/locale/hr-doc.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- "Customer": "Kupac",
- "Customer Address": "Kupac Adresa",
- "Customer Name": "Naziv klijenta",
- "Is Primary Address": "Je Osnovna adresa",
- "No": "Ne",
- "Selling": "Prodaja",
- "Ship To": "Brod za",
- "Shipping Address": "Dostava Adresa",
- "Shipping Details": "Dostava Detalji",
- "Trash Reason": "Otpad Razlog",
- "Yes": "Da"
-}
\ No newline at end of file
diff --git a/selling/doctype/shipping_address/locale/nl-doc.json b/selling/doctype/shipping_address/locale/nl-doc.json
deleted file mode 100644
index 0a31c50..0000000
--- a/selling/doctype/shipping_address/locale/nl-doc.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- "Customer": "Klant",
- "Customer Address": "Klant Adres",
- "Customer Name": "Klantnaam",
- "Is Primary Address": "Is Primair adres",
- "No": "Geen",
- "Selling": "Selling",
- "Ship To": "Verzendadres",
- "Shipping Address": "Verzendadres",
- "Shipping Details": "Verzendgegevens",
- "Trash Reason": "Trash Reden",
- "Yes": "Ja"
-}
\ No newline at end of file
diff --git a/selling/doctype/shipping_address/locale/pt-BR-doc.json b/selling/doctype/shipping_address/locale/pt-BR-doc.json
deleted file mode 100644
index 981a064..0000000
--- a/selling/doctype/shipping_address/locale/pt-BR-doc.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- "Customer": "Cliente",
- "Customer Address": "Endere\u00e7o do cliente",
- "Customer Name": "Nome do cliente",
- "Is Primary Address": "\u00c9 o endere\u00e7o principal",
- "No": "N\u00e3o",
- "Selling": "Vendas",
- "Ship To": "Enviar Para",
- "Shipping Address": "Endere\u00e7o de envio",
- "Shipping Details": "Detalhes do envio",
- "Trash Reason": "Raz\u00e3o de p\u00f4r no lixo",
- "Yes": "Sim"
-}
\ No newline at end of file
diff --git a/selling/doctype/shipping_address/locale/pt-doc.json b/selling/doctype/shipping_address/locale/pt-doc.json
deleted file mode 100644
index 2711c5a..0000000
--- a/selling/doctype/shipping_address/locale/pt-doc.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- "Customer": "Cliente",
- "Customer Address": "Endere\u00e7o do cliente",
- "Customer Name": "Nome do cliente",
- "Is Primary Address": "\u00c9 o endere\u00e7o prim\u00e1rio",
- "No": "N\u00e3o",
- "Selling": "Vendendo",
- "Ship To": "Enviar Para",
- "Shipping Address": "Endere\u00e7o para envio",
- "Shipping Details": "Detalhes de envio",
- "Trash Reason": "Raz\u00e3o lixo",
- "Yes": "Sim"
-}
\ No newline at end of file
diff --git a/selling/doctype/shipping_address/locale/sr-doc.json b/selling/doctype/shipping_address/locale/sr-doc.json
deleted file mode 100644
index 169e4fd..0000000
--- a/selling/doctype/shipping_address/locale/sr-doc.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- "Customer": "\u041a\u0443\u043f\u0430\u0446",
- "Customer Address": "\u041a\u043e\u0440\u0438\u0441\u043d\u0438\u0447\u043a\u0438 \u0410\u0434\u0440\u0435\u0441\u0430",
- "Customer Name": "\u0418\u043c\u0435 \u043a\u043b\u0438\u0458\u0435\u043d\u0442\u0430",
- "Is Primary Address": "\u0408\u0435 \u043f\u0440\u0438\u043c\u0430\u0440\u043d\u0430 \u0430\u0434\u0440\u0435\u0441\u0430",
- "No": "\u041d\u0435",
- "Selling": "\u041f\u0440\u043e\u0434\u0430\u0458\u0430",
- "Ship To": "\u0411\u0440\u043e\u0434 \u0431\u0438",
- "Shipping Address": "\u0410\u0434\u0440\u0435\u0441\u0430 \u0438\u0441\u043f\u043e\u0440\u0443\u043a\u0435",
- "Shipping Details": "\u0414\u043e\u0441\u0442\u0430\u0432\u0430 \u0414\u0435\u0442\u0430\u0459\u0438",
- "Trash Reason": "\u0421\u043c\u0435\u045b\u0435 \u0420\u0430\u0437\u043b\u043e\u0433",
- "Yes": "\u0414\u0430"
-}
\ No newline at end of file
diff --git a/selling/doctype/shipping_address/locale/ta-doc.json b/selling/doctype/shipping_address/locale/ta-doc.json
deleted file mode 100644
index b9e04b4..0000000
--- a/selling/doctype/shipping_address/locale/ta-doc.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- "Customer": "\u0bb5\u0bbe\u0b9f\u0bbf\u0b95\u0bcd\u0b95\u0bc8\u0baf\u0bbe\u0bb3\u0bb0\u0bcd",
- "Customer Address": "\u0bb5\u0bbe\u0b9f\u0bbf\u0b95\u0bcd\u0b95\u0bc8\u0baf\u0bbe\u0bb3\u0bb0\u0bcd \u0bae\u0bc1\u0b95\u0bb5\u0bb0\u0bbf",
- "Customer Name": "\u0bb5\u0bbe\u0b9f\u0bbf\u0b95\u0bcd\u0b95\u0bc8\u0baf\u0bbe\u0bb3\u0bb0\u0bcd \u0baa\u0bc6\u0baf\u0bb0\u0bcd",
- "Is Primary Address": "\u0bae\u0bc1\u0ba4\u0ba9\u0bcd\u0bae\u0bc8 \u0bae\u0bc1\u0b95\u0bb5\u0bb0\u0bbf \u0b87\u0bb2\u0bcd\u0bb2\u0bc8",
- "No": "\u0b87\u0bb2\u0bcd\u0bb2\u0bc8",
- "Selling": "\u0bb5\u0bbf\u0bb1\u0bcd\u0baa\u0ba9\u0bc8",
- "Ship To": "\u0b95\u0baa\u0bcd\u0baa\u0bb2\u0bcd",
- "Shipping Address": "\u0b95\u0baa\u0bcd\u0baa\u0bb2\u0bcd \u0bae\u0bc1\u0b95\u0bb5\u0bb0\u0bbf",
- "Shipping Details": "\u0b95\u0baa\u0bcd\u0baa\u0bb2\u0bcd \u0bb5\u0bbf\u0bb5\u0bb0\u0bae\u0bcd",
- "Trash Reason": "\u0b95\u0bc1\u0baa\u0bcd\u0baa\u0bc8 \u0b95\u0bbe\u0bb0\u0ba3\u0bae\u0bcd",
- "Yes": "\u0b86\u0bae\u0bcd"
-}
\ No newline at end of file
diff --git a/selling/doctype/shipping_address/locale/th-doc.json b/selling/doctype/shipping_address/locale/th-doc.json
deleted file mode 100644
index 1ada675..0000000
--- a/selling/doctype/shipping_address/locale/th-doc.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- "Customer": "\u0e25\u0e39\u0e01\u0e04\u0e49\u0e32",
- "Customer Address": "\u0e17\u0e35\u0e48\u0e2d\u0e22\u0e39\u0e48\u0e02\u0e2d\u0e07\u0e25\u0e39\u0e01\u0e04\u0e49\u0e32",
- "Customer Name": "\u0e0a\u0e37\u0e48\u0e2d\u0e25\u0e39\u0e01\u0e04\u0e49\u0e32",
- "Is Primary Address": "\u0e40\u0e1b\u0e47\u0e19\u0e17\u0e35\u0e48\u0e2d\u0e22\u0e39\u0e48\u0e2b\u0e25\u0e31\u0e01",
- "No": "\u0e44\u0e21\u0e48",
- "Selling": "\u0e02\u0e32\u0e22",
- "Ship To": "\u0e40\u0e23\u0e37\u0e2d",
- "Shipping Address": "\u0e17\u0e35\u0e48\u0e2d\u0e22\u0e39\u0e48\u0e08\u0e31\u0e14\u0e2a\u0e48\u0e07",
- "Shipping Details": "\u0e23\u0e32\u0e22\u0e25\u0e30\u0e40\u0e2d\u0e35\u0e22\u0e14\u0e01\u0e32\u0e23\u0e08\u0e31\u0e14\u0e2a\u0e48\u0e07\u0e2a\u0e34\u0e19\u0e04\u0e49\u0e32",
- "Trash Reason": "\u0e40\u0e2b\u0e15\u0e38\u0e1c\u0e25\u0e16\u0e31\u0e07\u0e02\u0e22\u0e30",
- "Yes": "\u0e43\u0e0a\u0e48"
-}
\ No newline at end of file
diff --git a/selling/doctype/shipping_address/shipping_address.js b/selling/doctype/shipping_address/shipping_address.js
deleted file mode 100755
index deea4ed..0000000
--- a/selling/doctype/shipping_address/shipping_address.js
+++ /dev/null
@@ -1,22 +0,0 @@
-// ERPNext - web based ERP (http://erpnext.com)
-// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-// Get Customer Details
-// =====================================================================
-cur_frm.add_fetch('customer','customer_name','customer_name');
-cur_frm.add_fetch('customer','address','customer_address');
-
-cur_frm.fields_dict.customer.get_query = erpnext.utils.customer_query;
\ No newline at end of file
diff --git a/selling/doctype/shipping_address/shipping_address.py b/selling/doctype/shipping_address/shipping_address.py
deleted file mode 100755
index ac50d44..0000000
--- a/selling/doctype/shipping_address/shipping_address.py
+++ /dev/null
@@ -1,42 +0,0 @@
-# ERPNext - web based ERP (http://erpnext.com)
-# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-from __future__ import unicode_literals
-import webnotes
-sql = webnotes.conn.sql
-
-class DocType:
- def __init__(self, d, dl):
- self.doc, self.doclist = d, dl
-
- # on update
- # ----------
- def on_update(self):
- self.update_primary_shipping_address()
- self.get_customer_details()
-
- # set is_primary_address for other shipping addresses belonging to same customer
- # -------------------------------------------------------------------------------
- def update_primary_shipping_address(self):
- if self.doc.is_primary_address == 'Yes':
- sql("update `tabShipping Address` set is_primary_address = 'No' where customer = %s and is_primary_address = 'Yes' and name != %s",(self.doc.customer, self.doc.name))
-
- # Get Customer Details
- # ---------------------
- def get_customer_details(self):
- det = sql("select customer_name, address from tabCustomer where name = '%s'" % (self.doc.customer))
- self.doc.customer_name = det and det[0][0] or ''
- self.doc.customer_address = det and det[0][1] or ''
diff --git a/selling/doctype/shipping_address/shipping_address.txt b/selling/doctype/shipping_address/shipping_address.txt
deleted file mode 100755
index 4243704..0000000
--- a/selling/doctype/shipping_address/shipping_address.txt
+++ /dev/null
@@ -1,119 +0,0 @@
-[
- {
- "creation": "2013-01-10 16:34:22",
- "docstatus": 0,
- "modified": "2013-01-22 14:57:24",
- "modified_by": "Administrator",
- "owner": "Administrator"
- },
- {
- "autoname": "SA.#####",
- "doctype": "DocType",
- "document_type": "Master",
- "module": "Selling",
- "name": "__common__",
- "search_fields": "customer, ship_to, shipping_address"
- },
- {
- "doctype": "DocField",
- "name": "__common__",
- "parent": "Shipping Address",
- "parentfield": "fields",
- "parenttype": "DocType",
- "permlevel": 0
- },
- {
- "cancel": 1,
- "create": 1,
- "doctype": "DocPerm",
- "name": "__common__",
- "parent": "Shipping Address",
- "parentfield": "permissions",
- "parenttype": "DocType",
- "permlevel": 0,
- "read": 1,
- "report": 1,
- "submit": 0,
- "write": 1
- },
- {
- "doctype": "DocType",
- "name": "Shipping Address"
- },
- {
- "doctype": "DocField",
- "fieldname": "column_break0",
- "fieldtype": "Column Break",
- "width": "50%"
- },
- {
- "doctype": "DocField",
- "fieldname": "customer",
- "fieldtype": "Link",
- "label": "Customer",
- "options": "Customer",
- "reqd": 1
- },
- {
- "doctype": "DocField",
- "fieldname": "customer_name",
- "fieldtype": "Data",
- "label": "Customer Name",
- "read_only": 1
- },
- {
- "doctype": "DocField",
- "fieldname": "customer_address",
- "fieldtype": "Text",
- "label": "Customer Address",
- "read_only": 1
- },
- {
- "doctype": "DocField",
- "fieldname": "ship_to",
- "fieldtype": "Data",
- "label": "Ship To",
- "reqd": 1
- },
- {
- "doctype": "DocField",
- "fieldname": "shipping_address",
- "fieldtype": "Text",
- "label": "Shipping Address",
- "reqd": 1
- },
- {
- "doctype": "DocField",
- "fieldname": "column_break1",
- "fieldtype": "Column Break",
- "width": "50%"
- },
- {
- "doctype": "DocField",
- "fieldname": "is_primary_address",
- "fieldtype": "Select",
- "label": "Is Primary Address",
- "options": "Yes\nNo"
- },
- {
- "doctype": "DocField",
- "fieldname": "shipping_details",
- "fieldtype": "Text Editor",
- "label": "Shipping Details"
- },
- {
- "doctype": "DocField",
- "fieldname": "trash_reason",
- "fieldtype": "Small Text",
- "label": "Trash Reason",
- "read_only": 1
- },
- {
- "doctype": "DocPerm",
- "role": "Sales Master Manager"
- },
- {
- "doctype": "DocPerm",
- "role": "Sales Manager"
- }
-]
\ No newline at end of file
diff --git a/selling/doctype/sms_center/README.md b/selling/doctype/sms_center/README.md
new file mode 100644
index 0000000..d0289e7
--- /dev/null
+++ b/selling/doctype/sms_center/README.md
@@ -0,0 +1 @@
+Tool to send Bulk SMS to Lead or Contacts.
\ No newline at end of file
diff --git a/selling/page/sales_analytics/README.md b/selling/page/sales_analytics/README.md
new file mode 100644
index 0000000..11994c2
--- /dev/null
+++ b/selling/page/sales_analytics/README.md
@@ -0,0 +1 @@
+Trends of sales by Item, Item Group, Customer etc.
\ No newline at end of file
diff --git a/selling/page/sales_analytics/sales_analytics.js b/selling/page/sales_analytics/sales_analytics.js
index 0b35af5..7fdc3ac 100644
--- a/selling/page/sales_analytics/sales_analytics.js
+++ b/selling/page/sales_analytics/sales_analytics.js
@@ -23,7 +23,7 @@
new erpnext.SalesAnalytics(wrapper);
wrapper.appframe.add_home_breadcrumb()
- wrapper.appframe.add_module_breadcrumb("Selling")
+ wrapper.appframe.add_module_icon("Selling")
wrapper.appframe.add_breadcrumb("icon-bar-chart")
}
diff --git a/selling/page/sales_browser/README.md b/selling/page/sales_browser/README.md
new file mode 100644
index 0000000..d6a20e1
--- /dev/null
+++ b/selling/page/sales_browser/README.md
@@ -0,0 +1 @@
+Tree editor for Territory, Customer Group, Item Group, Sales Partner
\ No newline at end of file
diff --git a/selling/page/sales_browser/sales_browser.html b/selling/page/sales_browser/sales_browser.html
deleted file mode 100644
index 4683a07..0000000
--- a/selling/page/sales_browser/sales_browser.html
+++ /dev/null
@@ -1,11 +0,0 @@
-<div class="layout-wrapper layout-wrapper-background">
- <div class="appframe-area"></div>
- <div class="layout-main-section">
- <div class="tree-area"></div>
- </div>
- <div class="layout-side-section">
- <div class="help">To add child nodes, explore tree and click on the node under which you want to add more nodes.
- </div>
- </div>
- <div class="clear"></div>
-</div>
\ No newline at end of file
diff --git a/selling/page/sales_browser/sales_browser.js b/selling/page/sales_browser/sales_browser.js
index 4622f24..ed13f9d 100644
--- a/selling/page/sales_browser/sales_browser.js
+++ b/selling/page/sales_browser/sales_browser.js
@@ -15,14 +15,22 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>.
pscript['onload_Sales Browser'] = function(wrapper){
- wrapper.appframe = new wn.ui.AppFrame($(wrapper).find('.appframe-area'));
- wrapper.appframe.add_home_breadcrumb()
- wrapper.appframe.add_module_breadcrumb("Selling")
+ wn.ui.make_app_page({
+ parent: wrapper,
+ })
+
+ wrapper.appframe.add_module_icon("Selling")
wrapper.appframe.add_button('Refresh', function() {
wrapper.make_tree();
}, 'icon-refresh');
+
+ $(wrapper)
+ .find(".layout-side-section")
+ .html('<div class="text-muted">Click on a link to get options to expand \
+ get options Add / Edit / Delete.</div>')
+
wrapper.make_tree = function() {
var ctype = wn.get_route()[1] || 'Territory';
wn.call({
@@ -30,7 +38,13 @@
args: {ctype: ctype},
callback: function(r) {
var root = r.message[0]["value"];
- erpnext.sales_chart = new erpnext.SalesChart(ctype, root, wrapper);
+ erpnext.sales_chart = new erpnext.SalesChart(ctype, root,
+ $(wrapper)
+ .find(".layout-main-section")
+ .css({
+ "min-height": "300px",
+ "padding-bottom": "25px"
+ }));
}
});
}
@@ -50,12 +64,12 @@
};
erpnext.SalesChart = Class.extend({
- init: function(ctype, root, wrapper) {
- $(wrapper).find('.tree-area').empty();
+ init: function(ctype, root, parent) {
+ $(parent).empty();
var me = this;
me.ctype = ctype;
this.tree = new wn.ui.Tree({
- parent: $(wrapper).find('.tree-area'),
+ parent: $(parent),
label: root,
args: {ctype: ctype},
method: 'selling.page.sales_browser.sales_browser.get_children',
diff --git a/selling/search_criteria/__init__.py b/selling/search_criteria/__init__.py
deleted file mode 100644
index baffc48..0000000
--- a/selling/search_criteria/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-from __future__ import unicode_literals
diff --git a/selling/search_criteria/delivered_items_to_be_install/__init__.py b/selling/search_criteria/delivered_items_to_be_install/__init__.py
deleted file mode 100644
index baffc48..0000000
--- a/selling/search_criteria/delivered_items_to_be_install/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-from __future__ import unicode_literals
diff --git a/selling/search_criteria/delivered_items_to_be_install/delivered_items_to_be_install.js b/selling/search_criteria/delivered_items_to_be_install/delivered_items_to_be_install.js
deleted file mode 100644
index df8fc21..0000000
--- a/selling/search_criteria/delivered_items_to_be_install/delivered_items_to_be_install.js
+++ /dev/null
@@ -1,20 +0,0 @@
-// ERPNext - web based ERP (http://erpnext.com)
-// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-report.customize_filters = function() {
- this.filter_fields_dict['Delivery Note'+FILTER_SEP +'Company'].df['report_default'] = sys_defaults.company;
- this.filter_fields_dict['Delivery Note'+FILTER_SEP +'Fiscal Year'].df['report_default'] = sys_defaults.fiscal_year;
-}
\ No newline at end of file
diff --git a/selling/search_criteria/delivered_items_to_be_install/delivered_items_to_be_install.txt b/selling/search_criteria/delivered_items_to_be_install/delivered_items_to_be_install.txt
deleted file mode 100644
index ab23a29..0000000
--- a/selling/search_criteria/delivered_items_to_be_install/delivered_items_to_be_install.txt
+++ /dev/null
@@ -1,30 +0,0 @@
-[
- {
- "owner": "Administrator",
- "docstatus": 0,
- "creation": "2012-04-03 12:49:51",
- "modified_by": "Administrator",
- "modified": "2012-04-03 12:49:51"
- },
- {
- "add_col": "(`tabDelivery Note Item`.`qty`- ifnull(`tabDelivery Note Item`.`installed_qty`, 0)) AS 'Pending to Install'",
- "parent_doc_type": "Delivery Note",
- "module": "Selling",
- "standard": "Yes",
- "sort_order": "DESC",
- "filters": "{'Delivery Note\u0001Saved':1,'Delivery Note\u0001Submitted':1,'Delivery Note\u0001Status':'','Delivery Note\u0001Fiscal Year':''}",
- "description": "Delivered Items to be Install",
- "doc_type": "Delivery Note Item",
- "name": "__common__",
- "add_cond": "`tabDelivery Note Item`.`qty` > ifnull(`tabDelivery Note Item`.`installed_qty`, 0)",
- "doctype": "Search Criteria",
- "sort_by": "`tabDelivery Note`.`name`",
- "page_len": 50,
- "criteria_name": "Delivered Items to be Install",
- "columns": "Delivery Note\u0001ID,Delivery Note\u0001Status,Delivery Note\u0001Customer,Delivery Note\u0001Customer Name,Delivery Note\u0001Contact Person,Delivery Note\u0001Voucher Date,Delivery Note Item\u0001Item Code,Delivery Note Item\u0001Item Name,Delivery Note Item\u0001Quantity,Delivery Note Item\u0001Installed Qty,Delivery Note\u0001% Installed"
- },
- {
- "name": "delivered_items_to_be_install",
- "doctype": "Search Criteria"
- }
-]
\ No newline at end of file
diff --git a/selling/search_criteria/draft_sales_orders/__init__.py b/selling/search_criteria/draft_sales_orders/__init__.py
deleted file mode 100644
index baffc48..0000000
--- a/selling/search_criteria/draft_sales_orders/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-from __future__ import unicode_literals
diff --git a/selling/search_criteria/draft_sales_orders/draft_sales_orders.js b/selling/search_criteria/draft_sales_orders/draft_sales_orders.js
deleted file mode 100644
index 7f8aed8..0000000
--- a/selling/search_criteria/draft_sales_orders/draft_sales_orders.js
+++ /dev/null
@@ -1,22 +0,0 @@
-// ERPNext - web based ERP (http://erpnext.com)
-// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-report.customize_filters = function() {
- this.filter_fields_dict['Sales Order'+FILTER_SEP +'From Sales Order Date'].df['report_default'] = sys_defaults.year_start_date;
- this.filter_fields_dict['Sales Order'+FILTER_SEP +'To Sales Order Date'].df['report_default'] = dateutil.obj_to_str(new Date());
- this.filter_fields_dict['Sales Order'+FILTER_SEP +'Company'].df['report_default'] = sys_defaults.company;
-
-}
\ No newline at end of file
diff --git a/selling/search_criteria/draft_sales_orders/draft_sales_orders.txt b/selling/search_criteria/draft_sales_orders/draft_sales_orders.txt
deleted file mode 100644
index af60e71..0000000
--- a/selling/search_criteria/draft_sales_orders/draft_sales_orders.txt
+++ /dev/null
@@ -1,29 +0,0 @@
-[
- {
- "creation": "2012-05-14 18:20:52",
- "docstatus": 0,
- "modified": "2013-01-30 15:19:07",
- "modified_by": "Administrator",
- "owner": "Administrator"
- },
- {
- "columns": "Sales Order\u0001ID,Sales Order\u0001Status,Sales Order\u0001Sales Order Date,Sales Order\u0001Customer,Sales Order\u0001P.O. No,Sales Order\u0001Currency,Sales Order\u0001Grand Total (Export)",
- "criteria_name": "Draft Sales Orders",
- "custom_query": "",
- "description": "List of Open Sales orders filtered by period, customer and other details",
- "doc_type": "Sales Order",
- "doctype": "Search Criteria",
- "filters": "{\"Sales Order\\u0001Saved\":1,\"Sales Order\\u0001Submitted\":1,\"Sales Order\\u0001To Sales Order Date\\u0001upper\":\"2013-01-30\",\"Sales Order\\u0001Company\":\"Alpha\",\"Sales Order\\u0001Fiscal Year\":[\"\"],\"Sales Order\\u0001Status\":[\"Draft\"]}",
- "module": "Selling",
- "name": "__common__",
- "page_len": 50,
- "report_script": null,
- "sort_by": "`tabSales Order`.`name`",
- "sort_order": "DESC",
- "standard": "Yes"
- },
- {
- "doctype": "Search Criteria",
- "name": "draft_sales_orders"
- }
-]
\ No newline at end of file
diff --git a/selling/search_criteria/follow_up_report/__init__.py b/selling/search_criteria/follow_up_report/__init__.py
deleted file mode 100644
index baffc48..0000000
--- a/selling/search_criteria/follow_up_report/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-from __future__ import unicode_literals
diff --git a/selling/search_criteria/follow_up_report/follow_up_report.js b/selling/search_criteria/follow_up_report/follow_up_report.js
deleted file mode 100644
index 2126d0b..0000000
--- a/selling/search_criteria/follow_up_report/follow_up_report.js
+++ /dev/null
@@ -1,63 +0,0 @@
-// ERPNext - web based ERP (http://erpnext.com)
-// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-report.customize_filters = function() {
- this.mytabs.items['Select Columns'].hide()
- this.mytabs.items['More Filters'].hide()
-
- this.hide_all_filters();
- this.add_filter({fieldname:'follow_up_on', label:'Communication on', fieldtype:'Select', options:''+NEWLINE+'Lead'+NEWLINE+'Opportunity'+NEWLINE+'Quotation',ignore : 1,parent:'Communication Log', in_first_page : 1, single_select :1});
- this.add_filter({fieldname:'lead_name', label:'Lead', fieldtype:'Link', options:'Lead', report_default:'', ignore : 1, parent:'Communication Log', in_first_page : 1});
- this.add_filter({fieldname:'enq_name', label:'Opportunity', fieldtype:'Link', options:'Opportunity', report_default:'', ignore : 1, parent:'Communication Log', in_first_page : 1});
- this.add_filter({fieldname:'qtn_name', label:'Quotation', fieldtype:'Link', options:'Quotation', report_default:'', ignore : 1, parent:'Communication Log', in_first_page : 1});
-
- this.get_filter('Communication Log', 'Communication type').set_as_single();
- this.set_filter_properties('Communication Log', 'Communication by', {filter_hide:0, in_first_page : 1});
- this.set_filter_properties('Communication Log', 'Communication type', {filter_hide:0, in_first_page : 1});
- this.set_filter_properties('Communication Log', 'From Date', {filter_hide:0, in_first_page : 1});
- this.set_filter_properties('Communication Log', 'To Date', {filter_hide:0, in_first_page : 1});
-
- this.orig_sort_list = [['Date','`tabCommunication Log`.`date`'],['Document Type','`tabCommunication Log`.`parenttype`'],['Document','`tabCommunication Log`.`parent`'],['Follow Up By','`tabCommunication Log`.`follow_up_by`'],['Follow Up Type','`tabCommunication Log`.`follow_up_type`']];
-}
-
-
-report.get_query = function() {
- var lead_id = this.filter_fields_dict['Communication Log'+FILTER_SEP+'Lead'].get_value();
- var enq_id = this.filter_fields_dict['Communication Log'+FILTER_SEP+'Opportunity'].get_value();
- var quo_id = this.filter_fields_dict['Communication Log'+FILTER_SEP+'Quotation'].get_value();
-
- var follow_up_on = this.filter_fields_dict['Communication Log'+FILTER_SEP+'Communication on'].get_value();
- var follow_up_by = this.filter_fields_dict['Communication Log'+FILTER_SEP+'Communication by'].get_value();
-
- var on_type = this.filter_fields_dict['Communication Log'+FILTER_SEP+'Communication type'].get_value();
- var from_date = this.filter_fields_dict['Communication Log'+FILTER_SEP+'From Date'].get_value();
- var to_date = this.filter_fields_dict['Communication Log'+FILTER_SEP+'To Date'].get_value();
-
- var cond = 'parenttype IN ("Lead","Opportunity","Quotation")';
- if(follow_up_on) cond = 'parenttype = "'+follow_up_on+'"';
-
- if((follow_up_on == 'Lead' && lead_id) || (lead_id && !follow_up_on)) cond +=' AND parent = "'+lead_id+'"';
- if((follow_up_on == 'Opportunity' && enq_id) || (enq_id && !follow_up_on)) cond +=' AND parent = "'+enq_id+'"';
- if((follow_up_on == 'Quotation' && quo_id) || (quo_id && !follow_up_on)) cond +=' AND parent = "'+quo_id+'"';
-
- if(on_type) cond += ' AND follow_up_type ="'+on_type+'"';
- if(from_date) cond += ' AND date >="'+from_date+'"';
- if(to_date) cond += ' AND date <="'+to_date+'"';
- if(follow_up_by) cond += ' AND follow_up_by = "'+follow_up_by+'"';
-
- var q ='SELECT distinct `tabCommunication Log`.`parenttype`, `tabCommunication Log`.`parent`, `tabCommunication Log`.`date`, `tabCommunication Log`.`notes`, `tabCommunication Log`.`follow_up_type`, `tabCommunication Log`.`follow_up_by` FROM `tabCommunication Log` WHERE '+cond+' ORDER BY '+sel_val(this.dt.sort_sel)+' '+this.dt.sort_order;
- return q;
-}
diff --git a/selling/search_criteria/follow_up_report/follow_up_report.py b/selling/search_criteria/follow_up_report/follow_up_report.py
deleted file mode 100644
index 4006627..0000000
--- a/selling/search_criteria/follow_up_report/follow_up_report.py
+++ /dev/null
@@ -1,33 +0,0 @@
-# ERPNext - web based ERP (http://erpnext.com)
-# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-from __future__ import unicode_literals
-follow_up_on = filter_values.get('follow_up_on')
-
-cols = [['Document Type', 'Data', '150px', '']
- ,['Document', 'Link', '150px', follow_up_on]
- ,['Follow Up Date', 'Date', '150px', '']
- ,['Description','Data','300px','']
- ,['Follow Up Type','Data','150px','']
- ,['Follow Up By','Link','150px','Sales Person']
- ]
-
-for c in cols:
- colnames.append(c[0])
- coltypes.append(c[1])
- colwidths.append(c[2])
- coloptions.append(c[3])
- col_idx[c[0]] = len(colnames)-1
diff --git a/selling/search_criteria/follow_up_report/follow_up_report.txt b/selling/search_criteria/follow_up_report/follow_up_report.txt
deleted file mode 100644
index b789bd9..0000000
--- a/selling/search_criteria/follow_up_report/follow_up_report.txt
+++ /dev/null
@@ -1,27 +0,0 @@
-[
- {
- "owner": "ashwini@webnotestech.com",
- "docstatus": 0,
- "creation": "2012-04-03 12:49:51",
- "modified_by": "Administrator",
- "modified": "2012-04-03 12:49:51"
- },
- {
- "parent_doc_type": "Lead",
- "module": "Selling",
- "standard": "Yes",
- "sort_order": "DESC",
- "filters": "{'Lead\u0001Status':'','Lead\u0001Source':'','Lead\u0001Lead Type':'','Lead\u0001Rating':'','Lead\u0001Market Segment':'','Lead\u0001Fiscal Year':''}",
- "doc_type": "Communication Log",
- "name": "__common__",
- "doctype": "Search Criteria",
- "sort_by": "`tabLead`.`name`",
- "page_len": 50,
- "criteria_name": "Follow-up Report",
- "columns": "Lead\u0001ID,Communication Log\u0001Date,Communication Log\u0001Notes,Communication Log\u0001Communication Log type"
- },
- {
- "name": "follow-up_report",
- "doctype": "Search Criteria"
- }
-]
\ No newline at end of file
diff --git a/selling/search_criteria/itemwise_delivery_details/__init__.py b/selling/search_criteria/itemwise_delivery_details/__init__.py
deleted file mode 100644
index baffc48..0000000
--- a/selling/search_criteria/itemwise_delivery_details/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-from __future__ import unicode_literals
diff --git a/selling/search_criteria/itemwise_delivery_details/itemwise_delivery_details.js b/selling/search_criteria/itemwise_delivery_details/itemwise_delivery_details.js
deleted file mode 100644
index b056676..0000000
--- a/selling/search_criteria/itemwise_delivery_details/itemwise_delivery_details.js
+++ /dev/null
@@ -1,21 +0,0 @@
-// ERPNext - web based ERP (http://erpnext.com)
-// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-report.customize_filters = function() {
- this.filter_fields_dict['Delivery Note'+FILTER_SEP +'From Posting Date'].df['report_default'] = sys_defaults.year_start_date;
- this.filter_fields_dict['Delivery Note'+FILTER_SEP +'To Posting Date'].df['report_default'] = dateutil.obj_to_str(new Date());
-
-}
diff --git a/selling/search_criteria/itemwise_delivery_details/itemwise_delivery_details.py b/selling/search_criteria/itemwise_delivery_details/itemwise_delivery_details.py
deleted file mode 100644
index 0529d1b..0000000
--- a/selling/search_criteria/itemwise_delivery_details/itemwise_delivery_details.py
+++ /dev/null
@@ -1,34 +0,0 @@
-# ERPNext - web based ERP (http://erpnext.com)
-# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-from __future__ import unicode_literals
-out=[]
-qty,amt,bill_amt=0,0,0
-
-for r in res:
- qty += flt(r[col_idx['Quantity']])
- amt += flt(r[col_idx['Amount*']])
- bill_amt += flt(r[col_idx['Billed Amt']])
- out.append(r)
-
-
-#Add the totals row
-l_row = ['' for i in range(len(colnames))]
-l_row[col_idx['Item Name']] = '<b>TOTALS</b>'
-l_row[col_idx['Quantity']] = qty
-l_row[col_idx['Amount*']] = amt
-l_row[col_idx['Billed Amt']] = bill_amt
-out.append(l_row)
diff --git a/selling/search_criteria/itemwise_delivery_details/itemwise_delivery_details.txt b/selling/search_criteria/itemwise_delivery_details/itemwise_delivery_details.txt
deleted file mode 100644
index 9ba342e..0000000
--- a/selling/search_criteria/itemwise_delivery_details/itemwise_delivery_details.txt
+++ /dev/null
@@ -1,27 +0,0 @@
-[
- {
- "owner": "Administrator",
- "docstatus": 0,
- "creation": "2012-04-23 12:46:00",
- "modified_by": "Administrator",
- "modified": "2012-05-03 18:13:49"
- },
- {
- "parent_doc_type": "Delivery Note",
- "module": "Selling",
- "standard": "Yes",
- "sort_order": "DESC",
- "filters": "{\"Delivery Note\\u0001Submitted\":1,\"Delivery Note\\u0001Status\":[\"\"],\"Delivery Note\\u0001Fiscal Year\":[\"\"]}",
- "doc_type": "Delivery Note Item",
- "name": "__common__",
- "doctype": "Search Criteria",
- "sort_by": "`tabDelivery Note`.`name`",
- "page_len": 50,
- "criteria_name": "Itemwise Delivery Details",
- "columns": "Delivery Note\u0001ID,Delivery Note Item\u0001Item Code,Delivery Note Item\u0001Item Name,Delivery Note Item\u0001Quantity,Delivery Note Item\u0001Rate*,Delivery Note Item\u0001Amount*,Delivery Note Item\u0001Billed Amt"
- },
- {
- "name": "itemwise_delivery_details",
- "doctype": "Search Criteria"
- }
-]
\ No newline at end of file
diff --git a/selling/search_criteria/itemwise_sales_details/__init__.py b/selling/search_criteria/itemwise_sales_details/__init__.py
deleted file mode 100644
index baffc48..0000000
--- a/selling/search_criteria/itemwise_sales_details/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-from __future__ import unicode_literals
diff --git a/selling/search_criteria/itemwise_sales_details/itemwise_sales_details.js b/selling/search_criteria/itemwise_sales_details/itemwise_sales_details.js
deleted file mode 100644
index 7ff214a..0000000
--- a/selling/search_criteria/itemwise_sales_details/itemwise_sales_details.js
+++ /dev/null
@@ -1,27 +0,0 @@
-// ERPNext - web based ERP (http://erpnext.com)
-// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-report.customize_filters = function() {
- this.filter_fields_dict['Sales Order'+FILTER_SEP +'ID'].df.in_first_page = 1;
- this.filter_fields_dict['Sales Order'+FILTER_SEP +'From Sales Order Date'].df['report_default'] = sys_defaults.year_start_date;
- this.filter_fields_dict['Sales Order'+FILTER_SEP +'To Sales Order Date'].df['report_default'] = dateutil.obj_to_str(new Date());
- this.filter_fields_dict['Sales Order'+FILTER_SEP +'Company'].df['report_default'] = sys_defaults.company;
- this.filter_fields_dict['Sales Order Item'+FILTER_SEP +'Item Code'].df.in_first_page = 1;
- this.filter_fields_dict['Sales Order'+FILTER_SEP +'Status'].df.filter_hide = 1;
-}
-
-//this.mytabs.items['Select Columns'].hide();
-this.mytabs.items['More Filters'].hide();
\ No newline at end of file
diff --git a/selling/search_criteria/itemwise_sales_details/itemwise_sales_details.py b/selling/search_criteria/itemwise_sales_details/itemwise_sales_details.py
deleted file mode 100644
index 1b7a195..0000000
--- a/selling/search_criteria/itemwise_sales_details/itemwise_sales_details.py
+++ /dev/null
@@ -1,36 +0,0 @@
-# ERPNext - web based ERP (http://erpnext.com)
-# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-from __future__ import unicode_literals
-out=[]
-qty,amt,del_qty,bill_amt=0,0,0,0
-
-for r in res:
- qty += flt(r[col_idx['Quantity']])
- amt += flt(r[col_idx['Amount*']])
- del_qty += flt(r[col_idx['Delivered Qty']])
- bill_amt += flt(r[col_idx['Billed Amt']])
- out.append(r)
-
-
-#Add the totals row
-l_row = ['' for i in range(len(colnames))]
-l_row[col_idx['Item Name']] = '<b>TOTALS</b>'
-l_row[col_idx['Quantity']] = qty
-l_row[col_idx['Amount*']] = amt
-l_row[col_idx['Delivered Qty']] = del_qty
-l_row[col_idx['Billed Amt']] = bill_amt
-out.append(l_row)
diff --git a/selling/search_criteria/itemwise_sales_details/itemwise_sales_details.txt b/selling/search_criteria/itemwise_sales_details/itemwise_sales_details.txt
deleted file mode 100644
index 7737040..0000000
--- a/selling/search_criteria/itemwise_sales_details/itemwise_sales_details.txt
+++ /dev/null
@@ -1,27 +0,0 @@
-[
- {
- "owner": "Administrator",
- "docstatus": 0,
- "creation": "2012-04-23 12:46:00",
- "modified_by": "Administrator",
- "modified": "2012-05-03 18:18:31"
- },
- {
- "parent_doc_type": "Sales Order",
- "module": "Selling",
- "standard": "Yes",
- "sort_order": "DESC",
- "filters": "{\"Sales Order\\u0001Submitted\":1,\"Sales Order\\u0001Fiscal Year\":[\"\"],\"Sales Order\\u0001Status\":[\"\"]}",
- "doc_type": "Sales Order Item",
- "name": "__common__",
- "doctype": "Search Criteria",
- "sort_by": "`tabSales Order`.`name`",
- "page_len": 50,
- "criteria_name": "Itemwise Sales Details",
- "columns": "Sales Order\u0001ID,Sales Order\u0001Customer,Sales Order Item\u0001Item Code,Sales Order Item\u0001Item Name,Sales Order Item\u0001Quantity,Sales Order Item\u0001Basic Rate*,Sales Order Item\u0001Amount*,Sales Order Item\u0001Delivered Qty,Sales Order Item\u0001Billed Amt"
- },
- {
- "name": "itemwise_sales_details",
- "doctype": "Search Criteria"
- }
-]
\ No newline at end of file
diff --git a/selling/search_criteria/lead_to_follow_up/__init__.py b/selling/search_criteria/lead_to_follow_up/__init__.py
deleted file mode 100644
index baffc48..0000000
--- a/selling/search_criteria/lead_to_follow_up/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-from __future__ import unicode_literals
diff --git a/selling/search_criteria/lead_to_follow_up/lead_to_follow_up.js b/selling/search_criteria/lead_to_follow_up/lead_to_follow_up.js
deleted file mode 100644
index 94f2ef5..0000000
--- a/selling/search_criteria/lead_to_follow_up/lead_to_follow_up.js
+++ /dev/null
@@ -1,21 +0,0 @@
-// ERPNext - web based ERP (http://erpnext.com)
-// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-report.customize_filters = function() {
- this.filter_fields_dict['Lead'+FILTER_SEP +'Status'].df.filter_hide = 1;
- this.filter_fields_dict['Lead'+FILTER_SEP +'Fiscal Year'].df['report_default'] = sys_defaults.fiscal_year;
-}
-
\ No newline at end of file
diff --git a/selling/search_criteria/lead_to_follow_up/lead_to_follow_up.txt b/selling/search_criteria/lead_to_follow_up/lead_to_follow_up.txt
deleted file mode 100644
index 2ddd5e9..0000000
--- a/selling/search_criteria/lead_to_follow_up/lead_to_follow_up.txt
+++ /dev/null
@@ -1,27 +0,0 @@
-[
- {
- "owner": "Administrator",
- "docstatus": 0,
- "creation": "2012-04-03 12:49:51",
- "modified_by": "Administrator",
- "modified": "2012-04-03 12:49:51"
- },
- {
- "module": "Selling",
- "standard": "Yes",
- "sort_order": "DESC",
- "filters": "{'Lead\u0001Status':'','Lead\u0001Source':'','Lead\u0001Expected Month':'','Lead\u0001Industry':'','Lead\u0001Market Segment':'','Lead\u0001Rating':''}",
- "doc_type": "Lead",
- "name": "__common__",
- "add_cond": "`tabLead`.status!='Converted' \n`tabLead`.status!='Lead Lost' \n`tabLead`.status!='Not Interested'",
- "doctype": "Search Criteria",
- "sort_by": "`tabLead`.`name`",
- "page_len": 50,
- "criteria_name": "Lead-To follow up",
- "columns": "Lead\u0001ID,Lead\u0001Status,Lead\u0001Lead Name,Lead\u0001Lead Date,Lead\u0001Lead Owner,Lead\u0001Next Contact Date"
- },
- {
- "name": "lead-to_follow_up",
- "doctype": "Search Criteria"
- }
-]
\ No newline at end of file
diff --git a/selling/search_criteria/lead_to_follow_up/sales_order_overdue.js b/selling/search_criteria/lead_to_follow_up/sales_order_overdue.js
deleted file mode 100644
index 799cd22..0000000
--- a/selling/search_criteria/lead_to_follow_up/sales_order_overdue.js
+++ /dev/null
@@ -1,27 +0,0 @@
-// ERPNext - web based ERP (http://erpnext.com)
-// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-report.customize_filters = function() {
- this.hide_all_filters();
- this.filter_fields_dict['Sales Order'+FILTER_SEP +'Customer'].df.filter_hide = 0;
- this.filter_fields_dict['Sales Order'+FILTER_SEP +'ID'].df.filter_hide = 0;
- this.filter_fields_dict['Sales Order'+FILTER_SEP +'Quotation No'].df.filter_hide = 0;
- this.filter_fields_dict['Sales Order'+FILTER_SEP +'Company'].df.filter_hide = 0;
- this.filter_fields_dict['Sales Order'+FILTER_SEP +'Sales Partner'].df.filter_hide = 0;
- this.filter_fields_dict['Sales Order'+FILTER_SEP +'Fiscal Year'].df.filter_hide = 0;
- this.filter_fields_dict['Sales Order'+FILTER_SEP +'From Sales Order Date'].df.filter_hide = 0;
- this.filter_fields_dict['Sales Order'+FILTER_SEP +'To Sales Order Date'].df.filter_hide = 0;
-}
\ No newline at end of file
diff --git a/selling/search_criteria/opportunity_to_follow_up/__init__.py b/selling/search_criteria/opportunity_to_follow_up/__init__.py
deleted file mode 100644
index baffc48..0000000
--- a/selling/search_criteria/opportunity_to_follow_up/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-from __future__ import unicode_literals
diff --git a/selling/search_criteria/opportunity_to_follow_up/opportunity_to_follow_up.txt b/selling/search_criteria/opportunity_to_follow_up/opportunity_to_follow_up.txt
deleted file mode 100644
index b524e6a..0000000
--- a/selling/search_criteria/opportunity_to_follow_up/opportunity_to_follow_up.txt
+++ /dev/null
@@ -1,27 +0,0 @@
-[
- {
- "owner": "Administrator",
- "docstatus": 0,
- "creation": "2012-03-30 14:50:44",
- "modified_by": "Administrator",
- "modified": "2012-03-30 14:50:44"
- },
- {
- "module": "Selling",
- "standard": "Yes",
- "sort_order": "DESC",
- "filters": "{'Opportunity\u0001Fiscal Year':''}",
- "doc_type": "Opportunity",
- "name": "__common__",
- "add_cond": "`tabOpportunity`.name=`tabQuotation`.enq_no\n`tabOpportunity`.docstatus=1\n`tabQuotation`.status='Submitted'",
- "doctype": "Search Criteria",
- "sort_by": "`tabOpportunity`.`name`",
- "page_len": 50,
- "criteria_name": "Opportunity-To follow up",
- "columns": "Opportunity\u0001ID,Opportunity\u0001Owner,Opportunity\u0001Company,Opportunity\u0001Fiscal Year"
- },
- {
- "name": "opportunity-to_follow_up",
- "doctype": "Search Criteria"
- }
-]
\ No newline at end of file
diff --git a/selling/search_criteria/sales_orderwise_booking_&_delivery_summary/__init__.py b/selling/search_criteria/sales_orderwise_booking_&_delivery_summary/__init__.py
deleted file mode 100644
index baffc48..0000000
--- a/selling/search_criteria/sales_orderwise_booking_&_delivery_summary/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-from __future__ import unicode_literals
diff --git a/selling/search_criteria/sales_orderwise_booking_&_delivery_summary/sales_orderwise_booking_&_delivery_summary.txt b/selling/search_criteria/sales_orderwise_booking_&_delivery_summary/sales_orderwise_booking_&_delivery_summary.txt
deleted file mode 100644
index 9050204..0000000
--- a/selling/search_criteria/sales_orderwise_booking_&_delivery_summary/sales_orderwise_booking_&_delivery_summary.txt
+++ /dev/null
@@ -1,30 +0,0 @@
-[
- {
- "owner": "Administrator",
- "docstatus": 0,
- "creation": "2012-04-03 12:49:52",
- "modified_by": "Administrator",
- "modified": "2012-04-03 12:49:52"
- },
- {
- "add_col": "SUM(CASE WHEN `tabSales Order`.`status` = 'Stopped' THEN (`tabSales Order Item`.`delivered_qty` * `tabSales Order Item`.`basic_rate`) ELSE (`tabSales Order Item`.`qty` * `tabSales Order Item`.`basic_rate`) END) AS 'Booking Total'\nSUM(`tabSales Order Item`.`delivered_qty` * `tabSales Order Item`.`basic_rate`) AS 'Delivered Amount'",
- "parent_doc_type": "Sales Order",
- "module": "Selling",
- "standard": "Yes",
- "sort_order": "DESC",
- "filters": "{'Sales Order\u0001Submitted':1,'Sales Order\u0001Status':'','Sales Order\u0001Fiscal Year':''}",
- "description": "Sales Orderwise Booking & Delivery Summary",
- "doc_type": "Sales Order Item",
- "name": "__common__",
- "doctype": "Search Criteria",
- "sort_by": "`tabSales Order`.`name`",
- "group_by": "`tabSales Order`.`name`",
- "page_len": 50,
- "criteria_name": "Sales Orderwise Booking & Delivery Summary",
- "columns": "Sales Order\u0001ID,Sales Order\u0001Status,Sales Order\u0001% Billed,Sales Order\u0001Sales Order Date,Sales Order\u0001Customer,Sales Order\u0001Customer Name,Sales Order\u0001Territory"
- },
- {
- "name": "sales_orderwise_booking_&_delivery_summary",
- "doctype": "Search Criteria"
- }
-]
\ No newline at end of file
diff --git a/selling/search_criteria/sales_orderwise_pending_amount_to_bill/__init__.py b/selling/search_criteria/sales_orderwise_pending_amount_to_bill/__init__.py
deleted file mode 100644
index baffc48..0000000
--- a/selling/search_criteria/sales_orderwise_pending_amount_to_bill/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-from __future__ import unicode_literals
diff --git a/selling/search_criteria/sales_orderwise_pending_amount_to_bill/sales_orderwise_pending_amount_to_bill.js b/selling/search_criteria/sales_orderwise_pending_amount_to_bill/sales_orderwise_pending_amount_to_bill.js
deleted file mode 100644
index 1b3837a..0000000
--- a/selling/search_criteria/sales_orderwise_pending_amount_to_bill/sales_orderwise_pending_amount_to_bill.js
+++ /dev/null
@@ -1,20 +0,0 @@
-// ERPNext - web based ERP (http://erpnext.com)
-// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-report.customize_filters = function() {
- this.filter_fields_dict['Sales Order'+FILTER_SEP +'Company'].df['report_default'] = sys_defaults.company;
- this.filter_fields_dict['Sales Order'+FILTER_SEP +'Fiscal Year'].df['report_default'] = sys_defaults.fiscal_year;
-}
\ No newline at end of file
diff --git a/selling/search_criteria/sales_orderwise_pending_amount_to_bill/sales_orderwise_pending_amount_to_bill.txt b/selling/search_criteria/sales_orderwise_pending_amount_to_bill/sales_orderwise_pending_amount_to_bill.txt
deleted file mode 100644
index 1a8d19b..0000000
--- a/selling/search_criteria/sales_orderwise_pending_amount_to_bill/sales_orderwise_pending_amount_to_bill.txt
+++ /dev/null
@@ -1,31 +0,0 @@
-[
- {
- "owner": "dhanalekshmi@webnotestech.com",
- "docstatus": 0,
- "creation": "2012-04-03 12:49:52",
- "modified_by": "Administrator",
- "modified": "2012-04-03 12:49:52"
- },
- {
- "add_col": "SUM((`tabSales Order Item`.`qty` - ifnull(`tabSales Order Item`.`billed_qty`, 0)) * `tabSales Order Item`.`basic_rate`) AS \"Pending Amount\"",
- "parent_doc_type": "Sales Order",
- "module": "Selling",
- "standard": "Yes",
- "sort_order": "DESC",
- "filters": "{'Sales Order\u0001Saved':1,'Sales Order\u0001Submitted':1,'Sales Order\u0001Company Name':'','Sales Order\u0001Fiscal Year':''}",
- "description": "Sales Orderwise Pending Amount To Bill",
- "doc_type": "Sales Order Item",
- "name": "__common__",
- "add_cond": "`tabSales Order`.status != \"Stopped\"\n`tabSales Order`.order_type!=\"Maintenance\"",
- "doctype": "Search Criteria",
- "sort_by": "`tabSales Order`.`name`",
- "group_by": "`tabSales Order`.`name`",
- "page_len": 50,
- "criteria_name": "Sales Orderwise Pending Amount To Bill",
- "columns": "Sales Order\u0001ID,Sales Order\u0001Customer,Sales Order\u0001Customer Address,Sales Order\u0001Status,Sales Order\u0001% Delivered,Sales Order\u0001% Billed,Sales Order\u0001Company Name,Sales Order\u0001Sales Order Date,Sales Order\u0001Net Total,Sales Order\u0001Zone,Sales Order\u0001Territory,Sales Order\u0001Email Id"
- },
- {
- "name": "sales_orderwise_pending_amount_to_bill",
- "doctype": "Search Criteria"
- }
-]
\ No newline at end of file
diff --git a/selling/search_criteria/sales_orderwise_pending_qty_to_deliver/__init__.py b/selling/search_criteria/sales_orderwise_pending_qty_to_deliver/__init__.py
deleted file mode 100644
index baffc48..0000000
--- a/selling/search_criteria/sales_orderwise_pending_qty_to_deliver/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-from __future__ import unicode_literals
diff --git a/selling/search_criteria/sales_orderwise_pending_qty_to_deliver/sales_orderwise_pending_qty_to_deliver.txt b/selling/search_criteria/sales_orderwise_pending_qty_to_deliver/sales_orderwise_pending_qty_to_deliver.txt
deleted file mode 100644
index d9b1581..0000000
--- a/selling/search_criteria/sales_orderwise_pending_qty_to_deliver/sales_orderwise_pending_qty_to_deliver.txt
+++ /dev/null
@@ -1,31 +0,0 @@
-[
- {
- "owner": "dhanalekshmi@webnotestech.com",
- "docstatus": 0,
- "creation": "2012-04-03 12:49:52",
- "modified_by": "Administrator",
- "modified": "2012-04-03 12:49:52"
- },
- {
- "add_col": "SUM(`tabSales Order Item`.`qty` - ifnull(`tabSales Order Item`.`delivered_qty`, 0)) AS \"Pending Qty\"",
- "parent_doc_type": "Sales Order",
- "module": "Selling",
- "standard": "Yes",
- "sort_order": "DESC",
- "filters": "{'Sales Order\u0001Saved':1,'Sales Order\u0001Submitted':1,'Sales Order\u0001Status':'','Sales Order\u0001Fiscal Year':''}",
- "description": "Sales Orderwise Pending Qty To Deliver",
- "doc_type": "Sales Order Item",
- "name": "__common__",
- "add_cond": "`tabSales Order`.status != \"Stopped\"\n`tabSales Order Item`.`qty` > ifnull(`tabSales Order Item`.`delivered_qty`, 0)",
- "doctype": "Search Criteria",
- "sort_by": "`tabSales Order`.`name`",
- "group_by": "`tabSales Order`.`name`",
- "page_len": 50,
- "criteria_name": "Sales Orderwise Pending Qty To Deliver",
- "columns": "Sales Order\u0001ID,Sales Order\u0001Customer,Sales Order\u0001Customer Name,Sales Order\u0001Customer Address,Sales Order\u0001Status,Sales Order\u0001% Delivered,Sales Order\u0001% Billed,Sales Order\u0001Sales Order Date,Sales Order\u0001Territory,Sales Order\u0001Email Id"
- },
- {
- "name": "sales_orderwise_pending_qty_to_deliver",
- "doctype": "Search Criteria"
- }
-]
\ No newline at end of file
diff --git a/selling/search_criteria/sales_persons_target_variance_item_group_wise/__init__.py b/selling/search_criteria/sales_persons_target_variance_item_group_wise/__init__.py
deleted file mode 100644
index baffc48..0000000
--- a/selling/search_criteria/sales_persons_target_variance_item_group_wise/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-from __future__ import unicode_literals
diff --git a/selling/search_criteria/sales_persons_target_variance_item_group_wise/sales_persons_target_variance_item_group_wise.js b/selling/search_criteria/sales_persons_target_variance_item_group_wise/sales_persons_target_variance_item_group_wise.js
deleted file mode 100644
index 8e46f42..0000000
--- a/selling/search_criteria/sales_persons_target_variance_item_group_wise/sales_persons_target_variance_item_group_wise.js
+++ /dev/null
@@ -1,57 +0,0 @@
-// ERPNext - web based ERP (http://erpnext.com)
-// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-report.customize_filters = function() {
-
- this.hide_all_filters();
-
- this.add_filter({fieldname:'sales_person', label:'Sales Person', fieldtype:'Link', options:'Sales Person',ignore : 1,parent:'Target Detail'});
-
- this.add_filter({fieldname:'fiscal_year', label:'Fiscal Year', fieldtype:'Link', options:'Fiscal Year', report_default:sys_defaults.fiscal_year, ignore : 1, parent:'Target Detail'});
-
- this.add_filter({fieldname:'period', label:'Period', fieldtype:'Select', options:'Monthly'+NEWLINE+'Quarterly'+NEWLINE+'Half Yearly'+NEWLINE+'Annual',report_default:'Quarterly',ignore : 1, parent:'Target Detail'});
-
- this.add_filter({fieldname:'under', label:'Under',fieldtype:'Select', options:'Sales Order'+NEWLINE+'Delivery Note'+NEWLINE+'Sales Invoice',report_default:'Sales Order',ignore : 1, parent:'Target Detail'});
-
- this.add_filter({fieldname : 'target_on', label:'Target On', fieldtype:'Select', options:'Quantity'+NEWLINE+'Amount',report_default:'Quantity',ignore : 1,parent:'Target Detail'});
- this.filter_fields_dict['Target Detail'+FILTER_SEP +'Sales Person'].df.in_first_page = 1;
-}
-this.mytabs.items['Select Columns'].hide();
-report.get_query = function() {
-
- sales_person = this.filter_fields_dict['Target Detail'+FILTER_SEP+'Sales Person'].get_value();
- target_on = this.filter_fields_dict['Target Detail'+FILTER_SEP+'Target On'].get_value();
- under = this.filter_fields_dict['Target Detail'+FILTER_SEP+'Under'].get_value();
- if(under == 'Sales Invoice') under = 'Sales Invoice';
-
- if(target_on == 'Quantity'){
- q1 = 't1.target_qty AS "Target Quantity"';
- q2 = '0 AS "Target Quantity"';
- cond1 = 'ifnull(t1.target_qty,"")!=""';
- cond2 = 'ifnull(t6.target_qty,"")!=""';
- }
- else{
- q1 = 't1.target_amount AS "Target Amount"';
- q2 = '0 AS "Target Amount"';
- cond1 = 'ifnull(t1.target_amount,"")!=""';
- cond2 = 'ifnull(t6.target_amount,"")!=""';
- }
-
- var q ='SELECT t1.item_group AS "Item Group", '+q1+', t2.distribution_id AS "Distribution Id" FROM `tabTarget Detail` t1, `tabSales Person` t2 WHERE t1.parenttype = "Sales Person" AND t1.parent = "'+sales_person+'" AND t1.parent=t2.name AND ifnull(t1.item_group,"") != "" AND '+cond1+' UNION SELECT t3.item_group AS "Item Group", '+q2+',"" AS "Distribution Id" FROM `tab'+under+' Item` t3,`tabSales Team` t4,`tab'+under+'` t5 where t3.item_group NOT IN (SELECT t6.item_group AS "Item Group" FROM `tabTarget Detail` t6, `tabSales Person` t7 WHERE t6.parenttype = "Sales Person" AND t6.parent = "'+sales_person+'" AND t6.parent=t7.name AND '+cond2+') AND t4.sales_person = "'+sales_person+'" AND t3.parent = t5.name AND t4.parent = t5.name AND t5.docstatus = 1';
-
- return q;
-
-}
diff --git a/selling/search_criteria/sales_persons_target_variance_item_group_wise/sales_persons_target_variance_item_group_wise.py b/selling/search_criteria/sales_persons_target_variance_item_group_wise/sales_persons_target_variance_item_group_wise.py
deleted file mode 100644
index 3c822a6..0000000
--- a/selling/search_criteria/sales_persons_target_variance_item_group_wise/sales_persons_target_variance_item_group_wise.py
+++ /dev/null
@@ -1,145 +0,0 @@
-# ERPNext - web based ERP (http://erpnext.com)
-# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# validate Filters
-from __future__ import unicode_literals
-flt_dict = {'fiscal_year': 'Fiscal Year', 'period': 'Period', 'under' : 'Under', 'sales_person':'Sales Person', 'target_on':'Target On'}
-for f in flt_dict:
- if not filter_values.get(f):
- msgprint("Please Select " + cstr(flt_dict[f]))
- raise Exception
-
-# Get Values from fliters
-fiscal_year = filter_values.get('fiscal_year')[0]
-period = filter_values.get('period')
-under = filter_values.get('under')
-sales_person = filter_values.get('sales_person')
-target_on = filter_values.get('target_on')
-
-
-# set colnames
-for d in ['Item Group', 'Total Target Allocated', 'Distribution Id']:
- colnames.append(d)
- coltypes.append('Data')
- colwidths.append('150px')
- coloptions.append('')
- col_idx[d] = len(colnames) - 1
-
-
-
-# Set required field names
-based_on_fn = 'sales_person'
-
-date_fn = (under == 'Sales Order' ) and 'transaction_date' or 'posting_date'
-
-mon_list = []
-
-data = {'start_date':0, 'end_date':1}
-
-def make_month_list(append_colnames, start_date, mon_list, period, colnames, coltypes, colwidths, coloptions, col_idx):
- count = 1
- if period == 'Quarterly' or period == 'Half Yearly' or period == 'Annual': mon_list.append([str(start_date)])
- for m in range(12):
- # get last date
- last_date = str(sql("select LAST_DAY('%s')" % start_date)[0][0])
-
- # make mon_list for Monthly Period
- if period == 'Monthly' :
- mon_list.append([start_date, last_date])
- # add months as Column names
- month_name = sql("select MONTHNAME('%s')" % start_date)[0][0]
- append_colnames(str(month_name)[:3], colnames, coltypes, colwidths, coloptions, col_idx)
-
- # get start date
- start_date = str(sql("select DATE_ADD('%s',INTERVAL 1 DAY)" % last_date)[0][0])
-
- # make mon_list for Quaterly Period
- if period == 'Quarterly' and count % 3 == 0:
- mon_list[len(mon_list) - 1 ].append(last_date)
- # add Column names
- append_colnames('Q '+ str(count / 3), colnames, coltypes, colwidths, coloptions, col_idx)
- if count != 12: mon_list.append([start_date])
-
- # make mon_list for Half Yearly Period
- if period == 'Half Yearly' and count % 6 == 0 :
- mon_list[len(mon_list) - 1 ].append(last_date)
- # add Column Names
- append_colnames('H'+str(count / 6), colnames, coltypes, colwidths, coloptions, col_idx)
- if count != 12: mon_list.append([start_date])
-
- # make mon_list for Annual Period
- if period == 'Annual' and count % 12 == 0:
- mon_list[len(mon_list) - 1 ].append(last_date)
- # add Column Names
- append_colnames('', colnames, coltypes, colwidths, coloptions, col_idx)
- count = count +1
-
-def append_colnames(name, colnames, coltypes, colwidths, coloptions, col_idx):
- col = ['Target', 'Actual', 'Variance']
- for c in col:
- n = str(name) and ' (' + str(name) +')' or ''
- colnames.append(str(c) + n )
- coltypes.append('Currency')
- colwidths.append('150px')
- coloptions.append('')
- col_idx[str(c) + n ] = len(colnames) - 1
-
-
-
-
-# get start date
-start_date = webnotes.conn.get_value('Fiscal Year', fiscal_year, 'year_start_date')
-if not start_date:
- msgprint("Please Define Year Start Date for Fiscal Year " + str(fiscal_year))
- raise Exception
-start_date = start_date.strftime('%Y-%m-%d')
-
-# make month list and columns
-make_month_list(append_colnames, start_date, mon_list, period, colnames, coltypes, colwidths, coloptions, col_idx)
-
-
-bc_obj = get_obj('Budget Control')
-for r in res:
-
- count = 0
-
- for idx in range(3, len(colnames), 3):
-
- cidx = 2
- # ================= Calculate Target ==========================================
- r.append(bc_obj.get_monthly_budget(r[cidx], fiscal_year, mon_list[count][data['start_date']], mon_list[count][data['end_date']], r[cidx-1]))
-
- #================== Actual Amount =============================================
- actual = 0
-
-
- #----------------------------------------------------------
- if target_on == "Quantity":
-
- actual = sql("select sum(ifnull(t2.qty,0) * ifnull(t3.allocated_percentage,0) / 100) from `tab%s` t1, `tab%s Item` t2, `tabSales Team` t3 where t2.parent = t1.name and t3.parent = t1.name and t3.%s = '%s' and t2.item_group = '%s' and t1.docstatus = 1 and t1.%s between '%s' and '%s' "%(under, under, based_on_fn, sales_person, r[0].strip(), date_fn, mon_list[count][data['start_date']], mon_list[count][data['end_date']]))
-
- #----------------------------------------------------------
- if target_on == "Amount":
-
- actual = sql("select sum(ifnull(t2.amount,0) * ifnull(t3.allocated_percentage,0) / 100) from `tab%s` t1, `tab%s Item` t2, `tabSales Team` t3 where t2.parent = t1.name and t3.parent = t1.name and t3.%s = '%s' and t2.item_group = '%s' and t1.docstatus = 1 and t1.%s between '%s' and '%s' "%(under, under, based_on_fn, sales_person, r[0].strip(), date_fn, mon_list[count][data['start_date']], mon_list[count][data['end_date']]))
- #----------------------------------------------------------
-
- actual = actual and flt(actual[0][0]) or 0
- r.append(actual)
- # ================ Variance ===================================================
-
- r.append(r[idx] - r[idx + 1])
-
- count = count +1
diff --git a/selling/search_criteria/sales_persons_target_variance_item_group_wise/sales_persons_target_variance_item_group_wise.txt b/selling/search_criteria/sales_persons_target_variance_item_group_wise/sales_persons_target_variance_item_group_wise.txt
deleted file mode 100644
index 5535182..0000000
--- a/selling/search_criteria/sales_persons_target_variance_item_group_wise/sales_persons_target_variance_item_group_wise.txt
+++ /dev/null
@@ -1,26 +0,0 @@
-[
- {
- "owner": "Administrator",
- "docstatus": 0,
- "creation": "2012-04-03 12:49:52",
- "modified_by": "Administrator",
- "modified": "2012-04-03 12:49:52"
- },
- {
- "parent_doc_type": "Sales Person",
- "module": "Selling",
- "doctype": "Search Criteria",
- "sort_order": "DESC",
- "filters": "{'Sales Person\u0001Country':'','Sales Person\u0001State':'','Target Detail\u0001Fiscal Year':''}",
- "standard": "Yes",
- "doc_type": "Target Detail",
- "name": "__common__",
- "sort_by": "`tabTarget Detail`.`target_amount`",
- "page_len": 50,
- "criteria_name": "Sales Persons Target Variance (Item Group wise)"
- },
- {
- "name": "sales_persons_target_variance_item_group_wise",
- "doctype": "Search Criteria"
- }
-]
\ No newline at end of file
diff --git a/selling/search_criteria/sales_personwise_transaction_summary/__init__.py b/selling/search_criteria/sales_personwise_transaction_summary/__init__.py
deleted file mode 100755
index baffc48..0000000
--- a/selling/search_criteria/sales_personwise_transaction_summary/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-from __future__ import unicode_literals
diff --git a/selling/search_criteria/sales_personwise_transaction_summary/sales_personwise_transaction_summary.js b/selling/search_criteria/sales_personwise_transaction_summary/sales_personwise_transaction_summary.js
deleted file mode 100755
index 79dd9d5..0000000
--- a/selling/search_criteria/sales_personwise_transaction_summary/sales_personwise_transaction_summary.js
+++ /dev/null
@@ -1,53 +0,0 @@
-// ERPNext - web based ERP (http://erpnext.com)
-// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-report.customize_filters = function() {
- this.hide_all_filters();
-
- //Add filter
- this.add_filter({fieldname:'based_on', label:'Based On', fieldtype:'Select', options:'Sales Order'+NEWLINE+'Delivery Note'+NEWLINE+'Sales Invoice', report_default:'Sales Order', ignore : 1,parent:'Sales Person', single_select :1, in_first_page:1});
- this.add_filter({fieldname:'transaction_date', label:'Date', fieldtype:'Date', options:'', ignore : 1,parent:'Sales Person', in_first_page:1});
- this.add_filter({fieldname:'voucher_id', label:'Voucher Id', fieldtype:'Data', options:'', ignore : 1,parent:'Sales Person', in_first_page:1});
- this.add_filter({fieldname:'territory', label:'Territory', fieldtype:'Link', options:'Territory', ignore : 1,parent:'Sales Person', in_first_page:1});
- this.add_filter({fieldname:'sales_person', label:'Sales Person', fieldtype:'Link', options:'Sales Person', ignore : 1,parent:'Sales Person', in_first_page:1});
-}
-
-// hide sections
-this.mytabs.items['More Filters'].hide();
-this.mytabs.items['Select Columns'].hide();
-
-// Get query
-report.get_query = function() {
- based_on = this.get_filter('Sales Person', 'Based On').get_value();
- from_date = this.get_filter('Sales Person', 'From Date').get_value();
- to_date = this.get_filter('Sales Person', 'To Date').get_value();
- vid = this.get_filter('Sales Person', 'Voucher Id').get_value();
- terr = this.get_filter('Sales Person', 'Territory').get_value();
- sp = this.get_filter('Sales Person', 'Sales Person').get_value();
-
- date_fld = 'transaction_date';
- if(based_on == 'Sales Invoice' || based_on == "Delivery Note") date_fld = 'posting_date';
-
- sp_cond = '';
- if (from_date) sp_cond += ' AND t1.' + date_fld + '>= "' + from_date + '"';
- if (to_date) sp_cond += ' AND t1.' + date_fld + '<= "' + to_date + '"';
- if (vid) sp_cond += ' AND t1.name LIKE "%' + vid + '%"';
- if (terr) sp_cond += ' AND t1.territory = "' + terr + '"';
- if (sp) sp_cond += ' AND t2.sales_person = "' + sp + '"';
-
- return 'SELECT t1.`name`, t1.`customer_name`, t1.`territory`, t1.`' + date_fld + '`, t1.`net_total`, t1.`grand_total`, t2.`sales_person`, t2.`allocated_percentage`, t2.`allocated_amount` FROM `tab' + based_on + '` t1, `tabSales Team` t2 WHERE t1.docstatus=1 AND t2.`parenttype` = "' + based_on + '" AND t2.`parent` = t1.`name`' + sp_cond + ' ORDER BY t1.`name` DESC';
-}
-
diff --git a/selling/search_criteria/sales_personwise_transaction_summary/sales_personwise_transaction_summary.py b/selling/search_criteria/sales_personwise_transaction_summary/sales_personwise_transaction_summary.py
deleted file mode 100755
index 632e545..0000000
--- a/selling/search_criteria/sales_personwise_transaction_summary/sales_personwise_transaction_summary.py
+++ /dev/null
@@ -1,30 +0,0 @@
-# ERPNext - web based ERP (http://erpnext.com)
-# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-from __future__ import unicode_literals
-if filter_values.get('based_on') == 'Sales Invoice':
- based_on_dt = 'Sales Invoice'
-else:
- based_on_dt = filter_values.get('based_on')
-
-cols = [[filter_values.get('based_on'), 'Link','150px', based_on_dt], ['Customer', 'Link','150px','Customer'], ['Territory', 'Link','120px','Territory'], ['Transaction Date', 'Date', '120px', ''], ['Net Total', 'Currency', '80px', ''], ['Grand Total', 'Currency', '80px', ''], ['Sales Person', 'Link', '150px', 'Sales Person'], ['% Contribution', 'Currency', '120px', ''], ['Contribution Amt', 'Currency', '120px', '']]
-
-for c in cols:
- colnames.append(c[0])
- coltypes.append(c[1])
- colwidths.append(c[2])
- coloptions.append(c[3])
- col_idx[c[0]] = len(colnames)-1
diff --git a/selling/search_criteria/sales_personwise_transaction_summary/sales_personwise_transaction_summary.txt b/selling/search_criteria/sales_personwise_transaction_summary/sales_personwise_transaction_summary.txt
deleted file mode 100755
index 5f29981..0000000
--- a/selling/search_criteria/sales_personwise_transaction_summary/sales_personwise_transaction_summary.txt
+++ /dev/null
@@ -1,26 +0,0 @@
-[
- {
- "owner": "Administrator",
- "docstatus": 0,
- "creation": "2012-04-03 12:49:52",
- "modified_by": "Administrator",
- "modified": "2012-04-03 12:49:52"
- },
- {
- "module": "Selling",
- "standard": "Yes",
- "sort_order": "DESC",
- "filters": "{'Sales Person\u0001Saved':1,'Sales Person\u0001Submitted':1,'Sales Person\u0001Country':'','Sales Person\u0001State':''}",
- "doctype": "Search Criteria",
- "doc_type": "Sales Person",
- "name": "__common__",
- "sort_by": "`tabSales Person`.`name`",
- "page_len": 50,
- "criteria_name": "Sales Personwise Transaction Summary",
- "columns": "Sales Person\u0001ID"
- },
- {
- "name": "sales_personwise_transaction_summary",
- "doctype": "Search Criteria"
- }
-]
\ No newline at end of file
diff --git a/selling/search_criteria/serial_no_amc_expiring_this_month/__init__.py b/selling/search_criteria/serial_no_amc_expiring_this_month/__init__.py
deleted file mode 100644
index baffc48..0000000
--- a/selling/search_criteria/serial_no_amc_expiring_this_month/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-from __future__ import unicode_literals
diff --git a/selling/search_criteria/serial_no_amc_expiring_this_month/serial_no_amc_expiring_this_month.txt b/selling/search_criteria/serial_no_amc_expiring_this_month/serial_no_amc_expiring_this_month.txt
deleted file mode 100644
index 463d077..0000000
--- a/selling/search_criteria/serial_no_amc_expiring_this_month/serial_no_amc_expiring_this_month.txt
+++ /dev/null
@@ -1,27 +0,0 @@
-[
- {
- "owner": "Administrator",
- "docstatus": 0,
- "creation": "2012-04-03 12:49:52",
- "modified_by": "Administrator",
- "modified": "2012-04-03 12:49:52"
- },
- {
- "module": "Selling",
- "standard": "Yes",
- "sort_order": "DESC",
- "filters": "{'Serial No\u0001Saved':1,'Serial No\u0001Submitted':1,'Serial No\u0001Status':'','Serial No\u0001Warranty Status':''}",
- "doc_type": "Serial No",
- "name": "__common__",
- "add_cond": "`tab Serial No`.month(amc_expiry_date)=month(now()) \n`tab Serial No`.year(amc_expiry_date)=year(now())",
- "doctype": "Search Criteria",
- "sort_by": "`tabSerial No`.`name`",
- "page_len": 50,
- "criteria_name": "Serial No-AMC expiring this month",
- "columns": "Serial No\u0001ID,Serial No\u0001Status,Serial No\u0001AMC Expiry Date,Serial No\u0001Customer Name"
- },
- {
- "name": "serial_no-amc_expiring_this_month",
- "doctype": "Search Criteria"
- }
-]
\ No newline at end of file
diff --git a/selling/search_criteria/serial_no_warranty_expiring_this_month/__init__.py b/selling/search_criteria/serial_no_warranty_expiring_this_month/__init__.py
deleted file mode 100644
index baffc48..0000000
--- a/selling/search_criteria/serial_no_warranty_expiring_this_month/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-from __future__ import unicode_literals
diff --git a/selling/search_criteria/serial_no_warranty_expiring_this_month/serial_no_warranty_expiring_this_month.txt b/selling/search_criteria/serial_no_warranty_expiring_this_month/serial_no_warranty_expiring_this_month.txt
deleted file mode 100644
index 05a9f0f..0000000
--- a/selling/search_criteria/serial_no_warranty_expiring_this_month/serial_no_warranty_expiring_this_month.txt
+++ /dev/null
@@ -1,27 +0,0 @@
-[
- {
- "owner": "Administrator",
- "docstatus": 0,
- "creation": "2012-04-03 12:49:52",
- "modified_by": "Administrator",
- "modified": "2012-04-03 12:49:52"
- },
- {
- "module": "Selling",
- "standard": "Yes",
- "sort_order": "DESC",
- "filters": "{'Serial No\u0001Saved':1,'Serial No\u0001Submitted':1,'Serial No\u0001Status':'Issued','Serial No\u0001Maintenance Status':''}",
- "doc_type": "Serial No",
- "name": "__common__",
- "add_cond": "`tab Serial No`.docstatus!=2\n`tab Serial No`.maintenance_status='Under Warranty'\n`tab Serial No`.status!='Scrapped'\n`tab Serial No`.status!='Not in Use'\n`tab Serial No`.month(ifnull(warranty_expiry_date,0)) = month(now()) \n`tab Serial No`.yearmonth(ifnull(warranty_expiry_date,0)) = year(now())",
- "doctype": "Search Criteria",
- "sort_by": "`tabSerial No`.`name`",
- "page_len": 50,
- "criteria_name": "Serial No-Warranty expiring this month",
- "columns": "Serial No\u0001ID,Serial No\u0001Status,Serial No\u0001Warranty Expiry Date,Serial No\u0001Customer Name"
- },
- {
- "name": "serial_no-warranty_expiring_this_month",
- "doctype": "Search Criteria"
- }
-]
\ No newline at end of file
diff --git a/selling/search_criteria/target_variance_report/__init__.py b/selling/search_criteria/target_variance_report/__init__.py
deleted file mode 100644
index baffc48..0000000
--- a/selling/search_criteria/target_variance_report/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-from __future__ import unicode_literals
diff --git a/selling/search_criteria/target_variance_report/target_variance_report.js b/selling/search_criteria/target_variance_report/target_variance_report.js
deleted file mode 100644
index cc8e03e..0000000
--- a/selling/search_criteria/target_variance_report/target_variance_report.js
+++ /dev/null
@@ -1,43 +0,0 @@
-// ERPNext - web based ERP (http://erpnext.com)
-// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-report.customize_filters = function() {
- this.hide_all_filters();
- this.add_filter({fieldname:'based_on', label:'Based On', fieldtype:'Select', options:'Cost Center'+NEWLINE+'Sales Person'+NEWLINE+'Sales Partner',report_default:'Cost Center',ignore : 1,parent:'Target Detail'});
- this.add_filter({fieldname:'fiscal_year', label:'Fiscal Year', fieldtype:'Link', options:'Fiscal Year', report_default:sys_defaults.fiscal_year, ignore : 1, parent:'Target Detail'});
- this.add_filter({fieldname:'company', label:'Company', fieldtype:'Link', options:'Company',report_default:sys_defaults.company, ignore : 1, parent:'Target Detail'});
- this.add_filter({fieldname:'period', label:'Period', fieldtype:'Select', options:'Monthly'+NEWLINE+'Quarterly'+NEWLINE+'Half Yearly'+NEWLINE+'Annual',report_default:'Quarterly',ignore : 1, parent:'Target Detail'});
- this.add_filter({fieldname:'group_by', label:'Group By', fieldtype:'Select', options:NEWLINE+'Item Group',ignore : 1, parent:'Target Detail'});
- this.add_filter({fieldname:'under', label:'Under',fieldtype:'Select', options:'Sales Order'+NEWLINE+'Delivery Note'+NEWLINE+'Sales Invoice',report_default:'Sales Order',ignore : 1, parent:'Target Detail'});
-
-}
-
-report.get_query = function() {
- group_by = '';
- group_by = this.filter_fields_dict['Target Detail'+FILTER_SEP+'Group By'].get_value();
- based_on = this.filter_fields_dict['Target Detail'+FILTER_SEP+'Based On'].get_value();
- sel_fields = '`tabTarget Detail`.parent AS "' + cstr(based_on)+'"';
- cond = ' and ifnull(`tabTarget Detail`.item_group, "") = ""'
- if (group_by == 'Item Group'){
- sel_fields = cstr(sel_fields) + ', `tabTarget Detail`.item_group';
- cond = ' and ifnull(`tabTarget Detail`.item_group,"") != ""'
- }
- sel_fields = cstr(sel_fields) + ', `tabTarget Detail`.target_amount, `tabTarget Detail`.distribution_id';
- var q = 'SELECT '+ cstr(sel_fields) +' FROM `tabTarget Detail` WHERE `tabTarget Detail`.parenttype = "' + cstr(based_on) + '"'+ cstr(cond);
- return q
-}
-
-this.mytabs.items['Select Columns'].hide();
\ No newline at end of file
diff --git a/selling/search_criteria/target_variance_report/target_variance_report.py b/selling/search_criteria/target_variance_report/target_variance_report.py
deleted file mode 100644
index 0c14112..0000000
--- a/selling/search_criteria/target_variance_report/target_variance_report.py
+++ /dev/null
@@ -1,127 +0,0 @@
-# ERPNext - web based ERP (http://erpnext.com)
-# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-# validate Filters
-from __future__ import unicode_literals
-flt_dict = {'fiscal_year': 'Fiscal Year', 'period': 'Period', 'company':'Company', 'under' : 'Under', 'based_on' : 'Based On'}
-for f in flt_dict:
- if not filter_values.get(f):
- msgprint("Please Select " + cstr(flt_dict[f]))
- raise Exception
-
-# Get Values from fliters
-fiscal_year = filter_values.get('fiscal_year')
-period = filter_values.get('period')
-under = filter_values.get('under')
-based_on = filter_values.get('based_on')
-group_by = filter_values.get('group_by')
-
-# Set required field names
-based_on_fn = (based_on == 'Cost Center') and 'cost_center' or (based_on == 'Sales Partner') and 'sales_partner' or (based_on == 'Sales Person') and 'sales_person'
-date_fn = (under == 'Sales Order' ) and 'transaction_date' or 'posting_date'
-
-mon_list = []
-data = {'start_date':0, 'end_date':1}
-
-def make_month_list(append_colnames, start_date, mon_list, period, colnames, coltypes, colwidths, coloptions, col_idx):
- count = 1
- if period == 'Quarterly' or period == 'Half Yearly' or period == 'Annual': mon_list.append([str(start_date)])
- for m in range(12):
- # get last date
- last_date = str(sql("select LAST_DAY('%s')" % start_date)[0][0])
-
- # make mon_list for Monthly Period
- if period == 'Monthly' :
- mon_list.append([start_date, last_date])
- # add months as Column names
- month_name = sql("select MONTHNAME('%s')" % start_date)[0][0]
- append_colnames(str(month_name)[:3], colnames, coltypes, colwidths, coloptions, col_idx)
-
- # get start date
- start_date = str(sql("select DATE_ADD('%s',INTERVAL 1 DAY)" % last_date)[0][0])
-
- # make mon_list for Quaterly Period
- if period == 'Quarterly' and count % 3 == 0:
- mon_list[len(mon_list) - 1 ].append(last_date)
- # add Column names
- append_colnames('Q '+ str(count / 3), colnames, coltypes, colwidths, coloptions, col_idx)
- if count != 12: mon_list.append([start_date])
-
- # make mon_list for Half Yearly Period
- if period == 'Half Yearly' and count % 6 == 0 :
- mon_list[len(mon_list) - 1 ].append(last_date)
- # add Column Names
- append_colnames('H'+str(count / 6), colnames, coltypes, colwidths, coloptions, col_idx)
- if count != 12: mon_list.append([start_date])
-
- # make mon_list for Annual Period
- if period == 'Annual' and count % 12 == 0:
- mon_list[len(mon_list) - 1 ].append(last_date)
- # add Column Names
- append_colnames('', colnames, coltypes, colwidths, coloptions, col_idx)
- count = count +1
-
-def append_colnames(name, colnames, coltypes, colwidths, coloptions, col_idx):
- col = ['Budget', 'Actual', 'Variance']
- for c in col:
- colnames.append(str(c) + ' (' + str(name) +')' )
- coltypes.append('Currency')
- colwidths.append('150px')
- coloptions.append('')
- col_idx[str(c) + ' (' + str(name) +')' ] = len(colnames) - 1
-
-# make default columns
-coltypes[col_idx[based_on]] = 'Link'
-coloptions[col_idx[based_on]]= based_on
-
-# get start date
-start_date = webnotes.conn.get_value('Fiscal Year', fiscal_year, 'year_start_date')
-if not start_date:
- msgprint("Please Define Year Start Date for Fiscal Year " + str(fiscal_year))
- raise Exception
-start_date = start_date.strftime('%Y-%m-%d')
-
-# make month list and columns
-make_month_list(append_colnames, start_date, mon_list, period, colnames, coltypes, colwidths, coloptions, col_idx)
-
-bc_obj = get_obj('Budget Control')
-for r in res:
- count = 0
- for idx in range((group_by == 'Item Group') and 4 or 3, len(colnames), 3):
- cidx = (group_by == 'Item Group') and 3 or 2
- # ================= Calculate Target ==========================================
- r.append(bc_obj.get_monthly_budget( r[cidx], fiscal_year, mon_list[count][data['start_date']], mon_list[count][data['end_date']], r[cidx-1]))
-
- #================== Actual Amount =============================================
- actual = 0
- if based_on == 'Cost Center' or based_on == 'Sales Partner':
- if group_by =='Item Group':
- actual = sql("select sum(ifnull(t2.amount,0)) from `tab%s` t1, `tab%s Detail` t2, `tabItem` t3 where t2.parenttype = '%s' and t2.parent = t1.name and t1.%s = '%s' and t3.name = t2.item_code and t3.item_group = '%s' and t1.docstatus = 1 and t1.%s between '%s' and '%s'" % (under, (under == 'Sales Invoice') and 'RV' or under, under, based_on_fn, r[0], r[1], date_fn, mon_list[count][data['start_date']], mon_list[count][data['end_date']]))
- actual = flt(actual[0][0])
- else:
- actual = sql("select sum(ifnull(net_total,0)) from `tab%s` where %s = '%s' and docstatus = 1 and %s between '%s' and '%s' " % (under, based_on_fn, r[0], date_fn, mon_list[count][data['start_date']], mon_list[count][data['end_date']]))
- actual = flt(actual[0][0])
- elif based_on == 'Sales Person':
- if group_by =='Item Group':
- actual = sql("select sum(ifnull(t2.amount,0) * ifnull(t3.allocated_percentage,0) / 100) from `tab%s` t1, `tab%s Detail` t2, `tabSales Team` t3, `tabItem` t4 where t2.parent = t1.name and t3.parent = t1.name and t3.%s = '%s' and t4.name = t2.item_code and t4.item_group = '%s' and t1.docstatus != 2 and t1.docstatus = 1 and t1.%s between '%s' and '%s' "%(under, (under == 'Sales Invoice') and 'RV' or under, based_on_fn, r[0], r[1], date_fn, mon_list[count][data['start_date']], mon_list[count][data['end_date']]))
- actual = flt(actual[0][0])
- else:
- actual = sql("select sum(ifnull(t2.allocated_amount,0)) from `tab%s` t1, `tabSales Team` t2 where t2.%s = '%s' and t2.parenttype='%s' and t1.docstatus != 2 and t2.parent = t1.name and t1.%s between '%s' and '%s'"%(under, based_on_fn, r[0], under, date_fn, mon_list[count][data['start_date']], mon_list[count][data['end_date']]))
- actual = flt(actual[0][0])
- r.append(actual)
- # ================ Variance ===================================================
- r.append(r[idx] - r[idx + 1])
- count = count +1
\ No newline at end of file
diff --git a/selling/search_criteria/target_variance_report/target_variance_report.txt b/selling/search_criteria/target_variance_report/target_variance_report.txt
deleted file mode 100644
index c892366..0000000
--- a/selling/search_criteria/target_variance_report/target_variance_report.txt
+++ /dev/null
@@ -1,27 +0,0 @@
-[
- {
- "owner": "harshada@webnotestech.com",
- "docstatus": 0,
- "creation": "2012-04-03 12:49:53",
- "modified_by": "Administrator",
- "modified": "2012-04-03 12:49:53"
- },
- {
- "parent_doc_type": "Sales Person",
- "module": "Selling",
- "standard": "Yes",
- "disabled": 0,
- "sort_order": "DESC",
- "filters": "{'Sales Person\u0001Saved':1,'Sales Person\u0001Submitted':1,'Sales Person\u0001Country':'','Sales Person\u0001State':'','Target Detail\u0001Fiscal Year':''}",
- "doc_type": "Target Detail",
- "name": "__common__",
- "doctype": "Search Criteria",
- "page_len": 50,
- "criteria_name": "Target Variance Report",
- "columns": "Sales Person\u0001ID,Sales Person\u0001Owner,Sales Person\u0001Sales Person,Sales Person\u0001Country,Sales Person\u0001State,Target Detail\u0001Item Group,Target Detail\u0001Fiscal Year,Target Detail\u0001Target Amount"
- },
- {
- "name": "target_variance_report",
- "doctype": "Search Criteria"
- }
-]
\ No newline at end of file
diff --git a/selling/search_criteria/territories_target_variance_item_group_wise/__init__.py b/selling/search_criteria/territories_target_variance_item_group_wise/__init__.py
deleted file mode 100644
index baffc48..0000000
--- a/selling/search_criteria/territories_target_variance_item_group_wise/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-from __future__ import unicode_literals
diff --git a/selling/search_criteria/territories_target_variance_item_group_wise/territories_target_variance_item_group_wise.js b/selling/search_criteria/territories_target_variance_item_group_wise/territories_target_variance_item_group_wise.js
deleted file mode 100644
index d7dcf70..0000000
--- a/selling/search_criteria/territories_target_variance_item_group_wise/territories_target_variance_item_group_wise.js
+++ /dev/null
@@ -1,61 +0,0 @@
-// ERPNext - web based ERP (http://erpnext.com)
-// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-report.customize_filters = function() {
-
- this.hide_all_filters();
-
- this.add_filter({fieldname:'territory', label:'Territory', fieldtype:'Link', options:'Territory',ignore : 1,parent:'Target Detail'});
-
- this.add_filter({fieldname:'fiscal_year', label:'Fiscal Year', fieldtype:'Link', options:'Fiscal Year', report_default:sys_defaults.fiscal_year, ignore : 1, parent:'Target Detail'});
-
- this.add_filter({fieldname:'period', label:'Period', fieldtype:'Select', options:'Monthly'+NEWLINE+'Quarterly'+NEWLINE+'Half Yearly'+NEWLINE+'Annual',report_default:'Quarterly',ignore : 1, parent:'Target Detail'});
-
- this.add_filter({fieldname:'under', label:'Under',fieldtype:'Select', options:'Sales Order'+NEWLINE+'Delivery Note'+NEWLINE+'Sales Invoice',report_default:'Sales Order',ignore : 1, parent:'Target Detail'});
-
- this.add_filter({fieldname : 'target_on', label:'Target On', fieldtype:'Select', options:'Quantity'+NEWLINE+'Amount',report_default:'Quantity',ignore : 1,parent:'Target Detail'});
- this.filter_fields_dict['Target Detail'+FILTER_SEP +'Territory'].df.in_first_page = 1;
-}
-this.mytabs.items['Select Columns'].hide();
-report.get_query = function() {
-
- territory = this.filter_fields_dict['Target Detail'+FILTER_SEP+'Territory'].get_value();
- target_on = this.filter_fields_dict['Target Detail'+FILTER_SEP+'Target On'].get_value();
- under = this.filter_fields_dict['Target Detail'+FILTER_SEP+'Under'].get_value();
- if(under == 'Sales Invoice') under = 'Sales Invoice';
-
- if(target_on == 'Quantity'){
- q1 = 't1.target_qty AS "Target Quantity"';
- q2 = '0 AS "Target Quantity"';
- cond1 = 'ifnull(t1.target_qty,"")!=""';
- cond2 = 'ifnull(t5.target_qty,"")!=""';
- }
- else{
- q1 = 't1.target_amount AS "Target Amount"';
- q2 = '0 AS "Target Amount"';
- cond1 = 'ifnull(t1.target_amount,"")!=""';
- cond2 = 'ifnull(t5.target_amount,"")!=""';
- }
- if(under =='Sales Invoice')
- tab = 'RV';
- else
- tab = under;
-
- var q ='SELECT distinct t1.item_group AS "Item Group", '+q1+', t2.distribution_id AS "Distribution Id" FROM `tabTarget Detail` t1, `tabTerritory` t2 WHERE t1.parenttype = "Territory" AND t1.parent = "'+territory+'" AND t1.parent=t2.name AND ifnull(t1.item_group,"")!="" AND '+cond1+' UNION SELECT distinct t3.item_group AS "Item Group", '+q2+',"" AS "Distribution Id" FROM `tab'+tab+' Detail` t3,`tab'+under+'` t4 where t3.item_group NOT IN (SELECT t5.item_group FROM `tabTarget Detail` t5, `tabTerritory` t6 WHERE t5.parenttype = "Territory" AND t5.parent = "'+territory+'" AND t5.parent=t6.name AND '+cond2+') AND t4.territory = "'+territory+'" AND t3.parent = t4.name AND t4.docstatus = 1';
-
- return q;
-
-}
\ No newline at end of file
diff --git a/selling/search_criteria/territories_target_variance_item_group_wise/territories_target_variance_item_group_wise.py b/selling/search_criteria/territories_target_variance_item_group_wise/territories_target_variance_item_group_wise.py
deleted file mode 100644
index 17acb47..0000000
--- a/selling/search_criteria/territories_target_variance_item_group_wise/territories_target_variance_item_group_wise.py
+++ /dev/null
@@ -1,144 +0,0 @@
-# ERPNext - web based ERP (http://erpnext.com)
-# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-# validate Filters
-from __future__ import unicode_literals
-flt_dict = {'fiscal_year': 'Fiscal Year', 'period': 'Period', 'under' : 'Under', 'territory':'Territory', 'target_on':'Target On'}
-for f in flt_dict:
- if not filter_values.get(f):
- msgprint("Please Select " + cstr(flt_dict[f]))
- raise Exception
-
-# Get Values from fliters
-fiscal_year = filter_values.get('fiscal_year')
-period = filter_values.get('period')
-under = filter_values.get('under')
-if under == 'Sales Invoice': under = 'Sales Invoice'
-territory = filter_values.get('territory')
-target_on = filter_values.get('target_on')
-
-
-# Set required field names
-based_on_fn = 'territory'
-
-date_fn = (under == 'Sales Order' ) and 'transaction_date' or 'posting_date'
-
-mon_list = []
-
-data = {'start_date':0, 'end_date':1}
-
-def make_month_list(append_colnames, start_date, mon_list, period, colnames, coltypes, colwidths, coloptions, col_idx):
- count = 1
- if period == 'Quarterly' or period == 'Half Yearly' or period == 'Annual': mon_list.append([str(start_date)])
- for m in range(12):
- # get last date
- last_date = str(sql("select LAST_DAY('%s')" % start_date)[0][0])
-
- # make mon_list for Monthly Period
- if period == 'Monthly' :
- mon_list.append([start_date, last_date])
- # add months as Column names
- month_name = sql("select MONTHNAME('%s')" % start_date)[0][0]
- append_colnames(str(month_name)[:3], colnames, coltypes, colwidths, coloptions, col_idx)
-
- # get start date
- start_date = str(sql("select DATE_ADD('%s',INTERVAL 1 DAY)" % last_date)[0][0])
-
- # make mon_list for Quaterly Period
- if period == 'Quarterly' and count % 3 == 0:
- mon_list[len(mon_list) - 1 ].append(last_date)
- # add Column names
- append_colnames('Q '+ str(count / 3), colnames, coltypes, colwidths, coloptions, col_idx)
- if count != 12: mon_list.append([start_date])
-
- # make mon_list for Half Yearly Period
- if period == 'Half Yearly' and count % 6 == 0 :
- mon_list[len(mon_list) - 1 ].append(last_date)
- # add Column Names
- append_colnames('H'+str(count / 6), colnames, coltypes, colwidths, coloptions, col_idx)
- if count != 12: mon_list.append([start_date])
-
- # make mon_list for Annual Period
- if period == 'Annual' and count % 12 == 0:
- mon_list[len(mon_list) - 1 ].append(last_date)
- # add Column Names
- append_colnames('', colnames, coltypes, colwidths, coloptions, col_idx)
- count = count +1
-
-def append_colnames(name, colnames, coltypes, colwidths, coloptions, col_idx):
- col = ['Target', 'Actual', 'Variance']
- for c in col:
- n = str(name) and ' (' + str(name) +')' or ''
- colnames.append(str(c) + n )
- coltypes.append('Currency')
- colwidths.append('150px')
- coloptions.append('')
- col_idx[str(c) + n ] = len(colnames) - 1
-
-
-
-# make default columns
-#coltypes[col_idx['Item Group']] = 'Link'
-#coloptions[col_idx['Item Group']]= 'Sales '
-
-# get start date
-start_date = webnotes.conn.get_value('Fiscal Year', fiscal_year, 'year_start_date')
-if not start_date:
- msgprint("Please Define Year Start Date for Fiscal Year " + str(fiscal_year))
- raise Exception
-start_date = start_date.strftime('%Y-%m-%d')
-
-# make month list and columns
-make_month_list(append_colnames, start_date, mon_list, period, colnames, coltypes, colwidths, coloptions, col_idx)
-
-
-
-bc_obj = get_obj('Budget Control')
-for r in res:
-
- count = 0
-
- for idx in range(3, len(colnames), 3):
-
- cidx = 2
- # ================= Calculate Target ==========================================
- r.append(bc_obj.get_monthly_budget(r[cidx], fiscal_year, mon_list[count][data['start_date']], mon_list[count][data['end_date']], r[cidx-1]))
-
- #================== Actual Amount =============================================
- actual = 0
-
-
-
- #----------------------------------------------------------
- if target_on == "Quantity":
-
- actual = sql("select sum(ifnull(t2.qty,0)) from `tab%s` t1, `tab%s Detail` t2 where t2.parenttype = '%s' and t2.parent = t1.name and t1.%s = '%s' and t1.docstatus = 1 and t2.item_group = '%s' and t1.%s between '%s' and '%s'" % (under, (under == 'Sales Invoice') and 'RV' or under, under, based_on_fn, territory, r[0],date_fn, mon_list[count][data['start_date']], mon_list[count][data['end_date']]))
-
-
- #----------------------------------------------------------
- if target_on == "Amount":
-
- actual = sql("select sum(ifnull(t2.amount,0)) from `tab%s` t1, `tab%s Detail` t2 where t2.parenttype = '%s' and t2.parent = t1.name and t1.%s = '%s' and t1.docstatus = 1 and t2.item_group = '%s' and t1.%s between '%s' and '%s'" % (under, (under == 'Sales Invoice') and 'RV' or under, under, based_on_fn, territory, r[0],date_fn, mon_list[count][data['start_date']], mon_list[count][data['end_date']]))
-
- #----------------------------------------------------------
-
- actual = actual and flt(actual[0][0]) or 0
- r.append(actual)
- # ================ Variance ===================================================
-
- r.append(r[idx] - r[idx + 1])
-
- count = count +1
\ No newline at end of file
diff --git a/selling/search_criteria/territories_target_variance_item_group_wise/territories_target_variance_item_group_wise.txt b/selling/search_criteria/territories_target_variance_item_group_wise/territories_target_variance_item_group_wise.txt
deleted file mode 100644
index a64b47e..0000000
--- a/selling/search_criteria/territories_target_variance_item_group_wise/territories_target_variance_item_group_wise.txt
+++ /dev/null
@@ -1,26 +0,0 @@
-[
- {
- "owner": "Administrator",
- "docstatus": 0,
- "creation": "2012-04-03 12:49:53",
- "modified_by": "Administrator",
- "modified": "2012-04-03 12:49:53"
- },
- {
- "parent_doc_type": "Sales Person",
- "module": "Selling",
- "doctype": "Search Criteria",
- "sort_order": "DESC",
- "filters": "{'Sales Person\u0001Country':'','Sales Person\u0001State':'','Target Detail\u0001Fiscal Year':''}",
- "standard": "Yes",
- "doc_type": "Target Detail",
- "name": "__common__",
- "sort_by": "`tabTarget Detail`.`target_amount`",
- "page_len": 50,
- "criteria_name": "Territories Target Variance (Item Group wise)"
- },
- {
- "name": "territories_target_variance_item_group_wise",
- "doctype": "Search Criteria"
- }
-]
\ No newline at end of file
diff --git a/selling/search_criteria/territory_sales___variance_report/__init__.py b/selling/search_criteria/territory_sales___variance_report/__init__.py
deleted file mode 100644
index baffc48..0000000
--- a/selling/search_criteria/territory_sales___variance_report/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-from __future__ import unicode_literals
diff --git a/selling/search_criteria/territory_sales___variance_report/territory_sales___variance_report.js b/selling/search_criteria/territory_sales___variance_report/territory_sales___variance_report.js
deleted file mode 100644
index aabd4e1..0000000
--- a/selling/search_criteria/territory_sales___variance_report/territory_sales___variance_report.js
+++ /dev/null
@@ -1,22 +0,0 @@
-// ERPNext - web based ERP (http://erpnext.com)
-// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-report.customize_filters = function() {
- this.add_filter({fieldname:'based_on', label:'Based On', fieldtype:'Select', options:'Sales Order'+NEWLINE+'Delivery Note'+NEWLINE+'Sales Invoice',report_default:'Sales Order',ignore : 1, parent:'Territory'});
- this.add_filter({fieldname:'fiscal_year', label:'Fiscal Year', fieldtype:'Link', options:'Fiscal Year', report_default:sys_defaults.fiscal_year, ignore : 1, parent:'Territory'});
- this.add_filter({fieldname:'company', label:'Company', fieldtype:'Link', options:'Company',report_default:sys_defaults.company, ignore : 1, parent:'Territory'});
- this.add_filter({fieldname:'period', label:'Period', fieldtype:'Select', options:'Monthly'+NEWLINE+'Quarterly'+NEWLINE+'Half Yearly'+NEWLINE+'Annual',report_default:'Quarterly',ignore : 1, parent:'Territory'});
-}
\ No newline at end of file
diff --git a/selling/search_criteria/territory_sales___variance_report/territory_sales___variance_report.py b/selling/search_criteria/territory_sales___variance_report/territory_sales___variance_report.py
deleted file mode 100644
index e9e40aa..0000000
--- a/selling/search_criteria/territory_sales___variance_report/territory_sales___variance_report.py
+++ /dev/null
@@ -1,205 +0,0 @@
-# ERPNext - web based ERP (http://erpnext.com)
-# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-from __future__ import unicode_literals
-if filter_values.get('period'):
- period_values = filter_values['period']
- if len(period_values.split(NEWLINE))>1:
- msgprint("You can view report only for one period. Please select only one value in period.")
- raise Exception
- else:
- period = period_values.split(NEWLINE)[0]
-
-if filter_values.get('based_on'):
- based_on = filter_values['based_on']
- if len(based_on.split(NEWLINE)) > 1:
- msgprint("You can view report based on only one criteria. Please select only one value in Based On.")
- raise Exception
- else:
- based_on = based_on.split(NEWLINE)[0]
-
-if not filter_values.get('fiscal_year'):
- msgprint("Please Select Fiscal Year")
- raise Exception
-elif not filter_values.get('period'):
- msgprint("Please Select Period")
- raise Exception
-elif not filter_values.get('based_on'):
- msgprint("Please Select the Criteria on which you want your report to be based")
- raise Exception
-
-fiscal_year = filter_values.get('fiscal_year')
-
-# get fiscal year start date and start month
-# ---------------------------------------------------------
-year_start_date = sql("select year_start_date,MONTH(year_start_date) from `tabFiscal Year` where name = %s",fiscal_year)
-start_date = year_start_date and year_start_date[0][0] or ''
-start_month = year_start_date and year_start_date[0][1] or ''
-month_name = ['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec']
-
-# Add columns based on period
-# --------------------------------
-columns = []
-# ================ Annual ======================
-if period == 'Annual':
- columns.append(['Target','Currency','120px',''])
- columns.append(['Actual','Currency','120px',''])
-
-# =========== Half Yearly ======================
-elif period == 'Half Yearly':
- columns.append(['Target (H1)','Currency','120px','']) # first half
- columns.append(['Actual (H1)','Currency','120px','']) # first half
- if start_month == 1: # this is case when fiscal year starts with JAN
- columns.append(['Target (H2)','Currency','120px',''])
- columns.append(['Actual (H2)','Currency','120px',''])
- else: #this is case when fiscal year starts with other than JAN
- columns.append(['Target (H2)','Currency','120px',''])
- columns.append(['Actual (H2)','Currency','120px',''])
-
-# ================ Quarterly ===================
-elif period == 'Quarterly':
- length_1 = (len(month_name) - start_month + 1) / 3 #this gives the total no. of times we need to iterate for quarter
- val = length_1 % 4
- q_no = 1
- for i in range(length_1):
- value = 3*i + val
- columns.append(['Target (Q'+cstr(q_no)+')','Currency','120px',''])
- columns.append(['Actual (Q'+cstr(q_no)+')','Currency','120px',''])
- q_no += 1
- length_2 = (start_month - 1) / 3 #this gives the total no. of times we need to iterate for quarter (this is required only if fiscal year starts from april)
- for i in range(length_2):
- columns.append(['Target (Q'+cstr(q_no)+')','Currency','120px',''])
- columns.append(['Actual (Q'+cstr(q_no)+')','Currency','120px',''])
- q_no += 1;
-
-
-# =============== Monthly ======================
-elif period == 'Monthly':
- for i in range(start_month-1,len(month_name)):
- columns.append(['Target ('+month_name[i]+')','Currency','120px',''])
- columns.append(['Actual ('+month_name[i]+')','Currency','120px',''])
-
- for i in range(start_month-1):
- columns.append(['Target('+month_name[i]+')','Currency','120px',''])
- columns.append(['Actual ('+month_name[i]+')','Currency','120px',''])
-
-
-
-for c in columns:
- colnames.append(c[0])
- coltypes.append(c[1])
- colwidths.append(c[2])
- coloptions.append(c[3])
- col_idx[c[0]] = len(colnames)-1
-
-
-condition = ' docstatus = 1 and fiscal_year = "'+fiscal_year+'"'
-
-
-for r in res:
- query = ''
-
- # ================= Annual Report ===============
- if period == 'Annual':
-
- target = sql("select sum(target_amount) from `tabTarget Detail` where parent = %s and parenttype= 'Territory' and fiscal_year = %s ",(r[col_idx['ID']],fiscal_year))
- target = target and flt(target[0][0]) or 0
- r.append(target)
-
-
- so = sql("select sum(net_total) from `tab%s` where territory = '%s' and %s" % (based_on, r[col_idx['ID']],condition))
- so = so and flt(so[0][0]) or 0
- r.append(so)
-
- # ================= Half Yearly Report ===============
- elif period == 'Half Yearly':
- target = sql("select sum(target_amount) from `tabTarget Detail` where parent = %s and parenttype= 'Territory' and fiscal_year = %s",(r[col_idx['ID']],fiscal_year))
- target = target and flt(flt(target[0][0])/2) or 0
- r.append(target)
-
- query += ' MONTH(transaction_date) BETWEEN '+cstr(start_month)+' and '+cstr(start_month+5)
- so = sql("select sum(net_total) from `tab%s` where territory = '%s' and %s and %s" % (based_on, r[col_idx['ID']],condition,query))
- so = so and flt(so[0][0]) or 0
- r.append(so)
-
- r.append(target)
-
- query =''
- query += 'MONTH(transaction_date) NOT BETWEEN '+cstr(start_month)+' and '+cstr(start_month+5)
- so = sql("select sum(net_total) from `tab%s` where territory = '%s' and %s and %s" % (based_on, r[col_idx['ID']],condition,query))
- so = so and flt(so[0][0]) or 0
- r.append(so)
- query = ''
-
- # =============== Quarterly Report ==============
- elif period == 'Quarterly':
- query = ''
- length_1 = (len(month_name) - start_month + 1) / 3; #this gives the total no. of times we need to iterate for quarter
- val = length_1 % 4;
- for i in range(length_1):
- value = 3*i + val;
- query +='SUM(CASE WHEN MONTH(transaction_date) BETWEEN '+cstr(value+1)+' AND '+cstr(value+3)+' THEN net_total ELSE NULL END),'
- length_2 = (start_month - 1) / 3; #this gives the total no. of times we need to iterate for quarter (this is required only if fiscal year starts from april)
- for i in range(length_2):
- query += 'SUM(CASE WHEN MONTH(transaction_date) BETWEEN '+cstr(3*i+1)+' AND '+cstr(3*i+3)+' THEN net_total ELSE NULL END)';
-
- target = sql("select sum(target_amount) from `tabTarget Detail` where parent = %s and parenttype= 'Territory' and fiscal_year = %s",(r[col_idx['ID']],fiscal_year))
- target = target and flt(flt(target[0][0])/4) or 0
-
-
- so = sql("SELECT %s from `tab%s` where territory ='%s' and %s " %(query,based_on,r[col_idx['ID']],condition))
- i = 0
- length_l = 0
- for c in columns:
- if length_l == 0:
- r.append(target)
- length_l += 1
- else:
- so_total = so and flt(so[0][i]) or 0
- r.append(so_total)
- i +=1
- length_l = 0
-
- # ================ Monthly Report ===============
- elif period == 'Monthly':
- query =''
- target = sql("select sum(target_amount) from `tabTarget Detail` where parent = %s and parenttype= 'Territory' and fiscal_year = %s",(r[col_idx['ID']],fiscal_year))
- #msgprint(target)
- target = target and flt(flt(target[0][0])/12) or 0
-
-
- # for loop is required twice coz fiscal year starts from April (this will also work if fiscal year starts in January)
- for i in range(start_month-1,len(month_name)):
- query += 'SUM(CASE WHEN MONTH(transaction_date) = '+cstr(i+1)+' THEN net_total ELSE NULL END),'
-
- for i in range(start_month-1):
- if i != (start_month-2):
- query += 'SUM(CASE WHEN MONTH(transaction_date) = '+cstr(i+1)+' THEN net_total ELSE NULL END),'
- else:
- query += 'SUM(CASE WHEN MONTH(transaction_date) = '+cstr(i+1)+' THEN net_total ELSE NULL END)';
- so = sql("SELECT %s from `tab%s` where territory ='%s' and %s " %(query,based_on,r[col_idx['ID']],condition))
-
- i = 0
- length_l = 0
- for c in columns:
- if length_l == 0:
- r.append(target)
- length_l += 1
- else:
- so_total = so and flt(so[0][i]) or 0
- r.append(so_total)
- i +=1
- length_l = 0
\ No newline at end of file
diff --git a/selling/search_criteria/territory_sales___variance_report/territory_sales___variance_report.txt b/selling/search_criteria/territory_sales___variance_report/territory_sales___variance_report.txt
deleted file mode 100644
index 011b957..0000000
--- a/selling/search_criteria/territory_sales___variance_report/territory_sales___variance_report.txt
+++ /dev/null
@@ -1,26 +0,0 @@
-[
- {
- "owner": "Administrator",
- "docstatus": 0,
- "creation": "2012-04-03 12:49:53",
- "modified_by": "Administrator",
- "modified": "2012-04-03 12:49:53"
- },
- {
- "module": "Selling",
- "standard": "Yes",
- "sort_order": "DESC",
- "filters": "{'Territory\u0001State':'','Territory\u0001Based On':'Sales Order','Territory\u0001Fiscal Year':'2009-2010','Territory\u0001Company':'Alpha Company','Territory\u0001Period':'Quarterly'}",
- "doctype": "Search Criteria",
- "doc_type": "Territory",
- "name": "__common__",
- "sort_by": "ID",
- "page_len": 50,
- "criteria_name": "Territory Sales - Variance Report",
- "columns": "Territory\u0001ID"
- },
- {
- "name": "territory_sales_-_variance_report",
- "doctype": "Search Criteria"
- }
-]
\ No newline at end of file
diff --git a/selling/search_criteria/total_target_variance_report/__init__.py b/selling/search_criteria/total_target_variance_report/__init__.py
deleted file mode 100644
index baffc48..0000000
--- a/selling/search_criteria/total_target_variance_report/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-from __future__ import unicode_literals
diff --git a/selling/search_criteria/total_target_variance_report/total_target_variance_report.js b/selling/search_criteria/total_target_variance_report/total_target_variance_report.js
deleted file mode 100644
index 59a9b89..0000000
--- a/selling/search_criteria/total_target_variance_report/total_target_variance_report.js
+++ /dev/null
@@ -1,28 +0,0 @@
-// ERPNext - web based ERP (http://erpnext.com)
-// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-report.customize_filters = function() {
- this.hide_all_filters();
- this.add_filter({fieldname:'based_on', label:'Based On', fieldtype:'Select', options:'Territory'+NEWLINE+'Sales Person',report_default:'Territory',ignore : 1,parent:'Target Detail', single_select :1});
- this.add_filter({fieldname:'fiscal_year', label:'Fiscal Year', fieldtype:'Link', options:'Fiscal Year', report_default:sys_defaults.fiscal_year, ignore : 1, parent:'Target Detail'});
- this.add_filter({fieldname:'period', label:'Period', fieldtype:'Select', options:'Monthly'+NEWLINE+'Quarterly'+NEWLINE+'Half Yearly'+NEWLINE+'Annual',report_default:'Quarterly',ignore : 1, parent:'Target Detail', single_select :1});
- this.add_filter({fieldname:'under', label:'Under',fieldtype:'Select', options:'Sales Order'+NEWLINE+'Delivery Note'+NEWLINE+'Sales Invoice',report_default:'Sales Order',ignore : 1, parent:'Target Detail', single_select :1});
- this.add_filter({fieldname : 'target_on', label:'Target On', fieldtype:'Select', options:'Quantity'+NEWLINE+'Amount',report_default:'Quantity',ignore : 1,parent:'Target Detail', single_select :1});
-}
-report.aftertableprint = function(t) {
- $yt(t,'*',1,{whiteSpace:'pre'});
-}
-this.mytabs.items['Select Columns'].hide();
\ No newline at end of file
diff --git a/selling/search_criteria/total_target_variance_report/total_target_variance_report.py b/selling/search_criteria/total_target_variance_report/total_target_variance_report.py
deleted file mode 100644
index 954f9f2..0000000
--- a/selling/search_criteria/total_target_variance_report/total_target_variance_report.py
+++ /dev/null
@@ -1,223 +0,0 @@
-# ERPNext - web based ERP (http://erpnext.com)
-# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-# validate Filters
-from __future__ import unicode_literals
-flt_dict = {'fiscal_year': 'Fiscal Year', 'period': 'Period', 'under' : 'Under', 'based_on' : 'Based On','target_on':'Target On'}
-for f in flt_dict:
- if not filter_values.get(f):
- msgprint("Please Select " + cstr(flt_dict[f]))
- raise Exception
-
-# Get Values from fliters
-fiscal_year = filter_values.get('fiscal_year')
-period = filter_values.get('period')
-under = filter_values.get('under')
-if under == 'Sales Invoice': under = 'Sales Invoice'
-based_on = filter_values.get('based_on')
-target_on = filter_values.get('target_on')
-
-#add distributed id field
-col = []
-col.append([based_on,'Date','150px',''])
-if target_on == 'Quantity':
- col.append(['Target Quantity','Currency','150px',''])
-else:
- col.append(['Target Amount','Currency','150px',''])
-col.append(['Distribution Id','Date','150px',''])
-
-for c in col:
- colnames.append(c[0])
- coltypes.append(c[1])
- colwidths.append(c[2])
- coloptions.append(c[3])
-
- col_idx[c[0]] = len(colnames)-1
-
-def make_child_lst(based_on,name):
- rg = sql("select lft, rgt from `tab%s` where name = '%s'"%(based_on,name))
- ch_name = sql("select name from `tab%s` where lft between %d and %d"%(based_on,int(rg[0][0]),int(rg[0][1])))
- chl ='('
- flag = 1
- for c in ch_name:
- if flag == 1:
- chl += "'%s'"%c[0]
- flag = 2
- else:
- chl +=",'%s'"%c[0]
-
- chl +=")"
- return chl
-
-
-def get_target(target_on,based_on,fiscal_year,r):
-
- if target_on == 'Quantity':
- q1 = "select t1.target_qty "
- q2 = "select sum(t1.target_qty)"
- if target_on == 'Amount':
- q1 = "select t1.target_amount "
- q2 = "select sum(t1.target_amount)"
-
- cond1 =" t1.fiscal_year ='%s' and t1.parent=t2.name and t1.parenttype = '%s' and t1.docstatus !=2"
- #----------------------------------------------------------------
- q = "select t1.name from `tabTarget Detail` t1, `tab%s` t2 where "+cond1+" and t2.name = '%s'"
- ch = sql(q%(based_on,fiscal_year,based_on,r))
-
- return {'q1':q1,'q2':q2,'cond1':cond1,'ch':ch}
-
-for r in res:
-
- tt = get_target(target_on,based_on,fiscal_year,r[0].strip())
-
- if tt['ch']:
-
- cond2 = " ifnull(t1.item_group,'')='' and"
- qur = tt['q1']+"from `tabTarget Detail` t1, `tab%s` t2 where "+cond2+tt['cond1']+" and t2.name = '%s'"
- ret_amt = sql(qur%(based_on,fiscal_year,based_on,r[0].strip()))
-
- #----------------------------------------------------------------
- if not ret_amt:
- qur = tt['q2']+"from `tabTarget Detail` t1, `tab%s` t2 where "+tt['cond1']+" and t2.name = '%s'"
- ret_amt = sql(qur%(based_on,fiscal_year,based_on,r[0].strip()))
-
- #----------------------------------------------------------------
- else:
- node_lst = make_child_lst(based_on,r[0].strip())
- qur = tt['q2']+"from `tabTarget Detail` t1, `tab%s` t2 where "+tt['cond1']+" and t2.name in %s"
- ret_amt = sql(qur%(based_on,fiscal_year,based_on,node_lst))
-
- #----------------------------------------------------------------
- ret_dis_id = sql("select distribution_id from `tab%s` where name = '%s'"%(based_on,r[0].strip()))
-
- target_amt = ret_amt and flt(ret_amt[0][0]) or 0
- dis_id = ret_dis_id and ret_dis_id[0][0] or ''
-
- r.append(target_amt)
- r.append(dis_id)
-
-
-# Set required field names
-based_on_fn = (based_on == 'Territory') and 'territory' or 'sales_person'
-
-date_fn = (under == 'Sales Order' ) and 'transaction_date' or 'posting_date'
-
-mon_list = []
-
-data = {'start_date':0, 'end_date':1}
-
-def make_month_list(append_colnames, start_date, mon_list, period, colnames, coltypes, colwidths, coloptions, col_idx):
- count = 1
- if period == 'Quarterly' or period == 'Half Yearly' or period == 'Annual': mon_list.append([str(start_date)])
- for m in range(12):
- # get last date
- last_date = str(sql("select LAST_DAY('%s')" % start_date)[0][0])
-
- # make mon_list for Monthly Period
- if period == 'Monthly' :
- mon_list.append([start_date, last_date])
- # add months as Column names
- month_name = sql("select MONTHNAME('%s')" % start_date)[0][0]
- append_colnames(str(month_name)[:3], colnames, coltypes, colwidths, coloptions, col_idx)
-
- # get start date
- start_date = str(sql("select DATE_ADD('%s',INTERVAL 1 DAY)" % last_date)[0][0])
-
- # make mon_list for Quaterly Period
- if period == 'Quarterly' and count % 3 == 0:
- mon_list[len(mon_list) - 1 ].append(last_date)
- # add Column names
- append_colnames('Q '+ str(count / 3), colnames, coltypes, colwidths, coloptions, col_idx)
- if count != 12: mon_list.append([start_date])
-
- # make mon_list for Half Yearly Period
- if period == 'Half Yearly' and count % 6 == 0 :
- mon_list[len(mon_list) - 1 ].append(last_date)
- # add Column Names
- append_colnames('H'+str(count / 6), colnames, coltypes, colwidths, coloptions, col_idx)
- if count != 12: mon_list.append([start_date])
-
- # make mon_list for Annual Period
- if period == 'Annual' and count % 12 == 0:
- mon_list[len(mon_list) - 1 ].append(last_date)
- # add Column Names
- append_colnames('', colnames, coltypes, colwidths, coloptions, col_idx)
- count = count +1
-
-def append_colnames(name, colnames, coltypes, colwidths, coloptions, col_idx):
- col = ['Target', 'Actual', 'Variance']
- for c in col:
- n = str(name) and ' (' + str(name) +')' or ''
- colnames.append(str(c) + n)
- coltypes.append('Currency')
- colwidths.append('150px')
- coloptions.append('')
- col_idx[str(c) + n ] = len(colnames) - 1
-
-
-
-# make default columns
-#coltypes[col_idx[based_on]] = 'Link'
-#coloptions[col_idx[based_on]]= based_on
-
-# get start date
-start_date = webnotes.conn.get_value('Fiscal Year', fiscal_year, 'year_start_date')
-if not start_date:
- msgprint("Please Define Year Start Date for Fiscal Year " + str(fiscal_year))
- raise Exception
-start_date = start_date.strftime('%Y-%m-%d')
-
-# make month list and columns
-make_month_list(append_colnames, start_date, mon_list, period, colnames, coltypes, colwidths, coloptions, col_idx)
-
-
-bc_obj = get_obj('Budget Control')
-for r in res:
- count = 0
-
- for idx in range(3, len(colnames), 3):
- cidx = 2
-
- # ================= Calculate Target ==========================================
- r.append(bc_obj.get_monthly_budget( r[cidx], fiscal_year, mon_list[count][data['start_date']], mon_list[count][data['end_date']], r[cidx-1]))
-
- #================== Actual Amount =============================================
- actual = 0
-
- ch = make_child_lst(based_on,r[0].strip())
-
- #----------------------------------------------------------
- if target_on == "Quantity":
- if based_on == "Territory":
- actual = sql("select sum(ifnull(t2.qty,0)) from `tab%s` t1, `tab%s Detail` t2 where t2.parenttype = '%s' and t2.parent = t1.name and t1.%s in %s and t1.docstatus = 1 and t1.%s between '%s' and '%s'" % (under, (under == 'Sales Invoice') and 'RV' or under, under, based_on_fn, ch, date_fn, mon_list[count][data['start_date']], mon_list[count][data['end_date']]))
-
- elif based_on == 'Sales Person':
- actual = sql("select sum(ifnull(t2.qty,0) * ifnull(t3.allocated_percentage,0) / 100) from `tab%s` t1, `tab%s Detail` t2, `tabSales Team` t3 where t2.parent = t1.name and t3.parent = t1.name and t3.%s in %s and t1.docstatus != 2 and t1.docstatus = 1 and t1.%s between '%s' and '%s' "%(under, (under == 'Sales Invoice') and 'RV' or under, based_on_fn, ch, date_fn, mon_list[count][data['start_date']], mon_list[count][data['end_date']]))
-
- #----------------------------------------------------------
- if target_on == "Amount":
- if based_on == 'Territory':
-
- actual = sql("select sum(ifnull(net_total,0)) from `tab%s` where %s in %s and docstatus = 1 and %s between '%s' and '%s' " % (under, based_on_fn, ch, date_fn, mon_list[count][data['start_date']], mon_list[count][data['end_date']]))
-
- elif based_on == 'Sales Person':
- actual = sql("select sum(ifnull(t2.allocated_amount,0)) from `tab%s` t1, `tabSales Team` t2 where t2.%s in %s and t2.parenttype='%s' and t1.docstatus != 2 and t2.parent = t1.name and t1.%s between '%s' and '%s'"%(under, based_on_fn, ch, under, date_fn, mon_list[count][data['start_date']], mon_list[count][data['end_date']]))
- #----------------------------------------------------------
- actual = flt(actual[0][0])
- r.append(actual)
- # ================ Variance ===================================================
- r.append(r[idx] - r[idx + 1])
- count = count +1
\ No newline at end of file
diff --git a/selling/search_criteria/total_target_variance_report/total_target_variance_report.sql b/selling/search_criteria/total_target_variance_report/total_target_variance_report.sql
deleted file mode 100644
index ebd7ae8..0000000
--- a/selling/search_criteria/total_target_variance_report/total_target_variance_report.sql
+++ /dev/null
@@ -1 +0,0 @@
-SELECT CONCAT(REPEAT(' ', COUNT(parent.name) - 1), node.name) AS name FROM `tab%(based_on)s` AS node,`tab%(based_on)s` AS parent WHERE node.lft BETWEEN parent.lft AND parent.rgt AND node.docstatus !=2 GROUP BY node.name ORDER BY node.lft
\ No newline at end of file
diff --git a/selling/search_criteria/total_target_variance_report/total_target_variance_report.txt b/selling/search_criteria/total_target_variance_report/total_target_variance_report.txt
deleted file mode 100644
index cf1484b..0000000
--- a/selling/search_criteria/total_target_variance_report/total_target_variance_report.txt
+++ /dev/null
@@ -1,27 +0,0 @@
-[
- {
- "owner": "Administrator",
- "docstatus": 0,
- "creation": "2012-04-03 12:49:53",
- "modified_by": "Administrator",
- "modified": "2012-04-03 12:49:53"
- },
- {
- "parent_doc_type": "Sales Person",
- "module": "Selling",
- "standard": "Yes",
- "sort_order": "DESC",
- "filters": "{'Sales Person\u0001Saved':1,'Sales Person\u0001Submitted':1,'Sales Person\u0001Country':'','Sales Person\u0001State':'','Target Detail\u0001Fiscal Year':''}",
- "doc_type": "Target Detail",
- "name": "__common__",
- "doctype": "Search Criteria",
- "sort_by": "`tabSales Person`.`name`",
- "page_len": 50,
- "criteria_name": "Total Target Variance Report",
- "columns": "Sales Person\u0001ID,Sales Person\u0001Owner,Sales Person\u0001Sales Person,Sales Person\u0001Country,Sales Person\u0001State,Sales Person\u0001lft,Sales Person\u0001rgt,Target Detail\u0001Item Group,Target Detail\u0001Fiscal Year,Target Detail\u0001Target Amount"
- },
- {
- "name": "total_target_variance_report",
- "doctype": "Search Criteria"
- }
-]
\ No newline at end of file
diff --git a/selling/search_criteria/variance_report/__init__.py b/selling/search_criteria/variance_report/__init__.py
deleted file mode 100644
index baffc48..0000000
--- a/selling/search_criteria/variance_report/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-from __future__ import unicode_literals
diff --git a/selling/search_criteria/variance_report/variance_report.js b/selling/search_criteria/variance_report/variance_report.js
deleted file mode 100644
index b5fe3fb..0000000
--- a/selling/search_criteria/variance_report/variance_report.js
+++ /dev/null
@@ -1,28 +0,0 @@
-// ERPNext - web based ERP (http://erpnext.com)
-// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-report.customize_filters = function() {
- this.hide_all_filters();
- this.add_filter({fieldname:'based_on', label:'Based On', fieldtype:'Select', options:'Territory'+NEWLINE+'Sales Person'+NEWLINE+'Sales Partner',report_default:'Territory',ignore : 1,parent:'Target Detail'});
- this.add_filter({fieldname:'fiscal_year', label:'Fiscal Year', fieldtype:'Link', options:'Fiscal Year', report_default:sys_defaults.fiscal_year, ignore : 1, parent:'Target Detail'});
- this.add_filter({fieldname:'company', label:'Company', fieldtype:'Link', options:'Company',report_default:sys_defaults.company, ignore : 1, parent:'Target Detail'});
- this.add_filter({fieldname:'period', label:'Period', fieldtype:'Select', options:'Monthly'+NEWLINE+'Quarterly'+NEWLINE+'Half Yearly'+NEWLINE+'Annual',report_default:'Quarterly',ignore : 1, parent:'Target Detail'});
-// this.add_filter({fieldname:'item_group', label:'Item Group', fieldtype:'Link', options:'Item Group', ignore : 1, parent:'Target Detail'});
- this.add_filter({fieldname:'group_by', label:'Group By', fieldtype:'Select', options:NEWLINE+'Item Group',ignore : 1, parent:'Target Detail'});
- this.add_filter({fieldname:'under', label:'Under',fieldtype:'Select', options:'Sales Order'+NEWLINE+'Delivery Note'+NEWLINE+'Sales Invoice',report_default:'Sales Order',ignore : 1, parent:'Target Detail'});
-}
-
-//this.mytabs.items['Select Columns'].hide()
diff --git a/selling/search_criteria/variance_report/variance_report.py b/selling/search_criteria/variance_report/variance_report.py
deleted file mode 100644
index 7b6856c..0000000
--- a/selling/search_criteria/variance_report/variance_report.py
+++ /dev/null
@@ -1,520 +0,0 @@
-# ERPNext - web based ERP (http://erpnext.com)
-# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-# Add columns
-# -----------
-from __future__ import unicode_literals
-row_list = [['ID','Data','150px','']]
-
-for r in row_list:
- colnames.append(r[0])
- coltypes.append(r[1])
- colwidths.append(r[2])
- coloptions.append(r[3])
- col_idx[r[0]] = len(colnames)-1
-
-if not filter_values.get('fiscal_year'):
- msgprint("Please Select Fiscal Year")
- raise Exception
-elif not filter_values.get('period'):
- msgprint("Please Select Period")
- raise Exception
-elif not filter_values.get('based_on'):
- msgprint("Please Select the Criteria on which you want your report to be based")
- raise Exception
-elif not filter_values.get('group_by') and filter_values.get('item_group'):
- msgprint("Item Group cannot be selected if Group By is not Item Group")
- raise Exception
-
-fiscal_year = filter_values.get('fiscal_year')
-period = filter_values.get('period')
-based_on = filter_values.get('based_on')
-group_by = filter_values.get('group_by')
-item_group = filter_values.get('item_group')
-msgprint(item_group)
-company = filter_values.get('company')
-under = filter_values.get('under')
-
-#if filter_values.get('item_group'):
-# itm_grp = filter_values.get('item_group')
-
-if based_on == 'Territory':
- based = 'territory'
-elif based_on == 'Sales Person':
- based = 'sales_person'
-elif based_on == 'Sales Partner':
- based = 'sales_partner'
-
-
-if under == 'Sales Invoice':
- under_detail = 'RV'
- dt = 'posting_date'
-else:
- under_detail = under
- dt = "transaction_date"
-
-# get fiscal year start date and start month
-year_start_date = sql("select year_start_date,MONTH(year_start_date) from `tabFiscal Year` where name = %s",fiscal_year)
-start_date = year_start_date and year_start_date[0][0] or ''
-start_month = year_start_date and year_start_date[0][1] or ''
-month_name = ['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec']
-
-# Add columns based on period
-# --------------------------------
-columns = []
-if group_by == 'Item Group':
- columns.append(['Item Group','Data','120px',''])
-# ================ Annual ======================
-if period == 'Annual':
- columns.append(['Target','Currency','120px',''])
- columns.append(['Actual','Currency','120px',''])
-
-# =========== Half Yearly ======================
-elif period == 'Half Yearly':
- columns.append(['Target (H1)','Currency','120px','']) # first half
- columns.append(['Actual (H1)','Currency','120px','']) # first half
- columns.append(['Target (H2)','Currency','120px',''])
- columns.append(['Actual (H2)','Currency','120px',''])
-
-# ================ Quarterly ===================
-elif period == 'Quarterly':
- length_1 = (len(month_name) - start_month + 1) / 3 #this gives the total no. of times we need to iterate for quarter
- val = length_1 % 4
- q_no = 1
- for i in range(length_1):
- value = 3*i + val
- columns.append(['Target (Q'+cstr(q_no)+')','Currency','120px',''])
- columns.append(['Actual (Q'+cstr(q_no)+')','Currency','120px',''])
- q_no += 1
- length_2 = (start_month - 1) / 3 #this gives the total no. of times we need to iterate for quarter (this is required only if fiscal year starts from april)
- for i in range(length_2):
- columns.append(['Target (Q'+cstr(q_no)+')','Currency','120px',''])
- columns.append(['Actual (Q'+cstr(q_no)+')','Currency','120px',''])
- q_no += 1;
-
-# =============== Monthly ======================
-elif period == 'Monthly':
- for i in range(start_month-1,len(month_name)):
- columns.append(['Target ('+month_name[i]+')','Currency','120px',''])
- columns.append(['Actual ('+month_name[i]+')','Currency','120px',''])
-
- for i in range(start_month-1):
- columns.append(['Target('+month_name[i]+')','Currency','120px',''])
- columns.append(['Actual ('+month_name[i]+')','Currency','120px',''])
-
-for c in columns:
- colnames.append(c[0])
- coltypes.append(c[1])
- colwidths.append(c[2])
- coloptions.append(c[3])
- col_idx[c[0]] = len(colnames)-1
-
-out = []
-if company:
- condition = ' fiscal_year = "'+fiscal_year+'" and company = "'+company+'"'
-else:
- condition = ' fiscal_year = "'+fiscal_year+'"'
-
-#=================== function for fetching allocated percentage in Distribution id according to period=============
-def get_budget_distribution(period,dist_id,fiscal_year):
- query = ''
- id1 = 1
- if period == 'Half Yearly':
- id2 = 6
- for i in range(2):
- query += 'SUM(CASE WHEN t2.idx BETWEEN '+str(id1)+' AND '+str(id2)+' THEN t2.percentage_allocation ELSE NULL END)'
- id1 += 6
- id2 += 6
- if i < 1 :
- query += ','
-
- elif period == 'Quarterly':
- id2 = 3
- for i in range(4):
- query += 'SUM(CASE WHEN t2.idx BETWEEN '+str(id1)+' AND '+str(id2)+' THEN t2.percentage_allocation ELSE NULL END)'
- id1 += 3
- id2 += 3
- if i < 3 :
- query += ','
-
- elif period == 'Monthly':
- for i in range(12):
- query += 'SUM(CASE WHEN t2.idx ='+str(id1)+' THEN t2.percentage_allocation ELSE NULL END)'
- id1 += 1
- if i < 11 :
- query += ','
-
-# msgprint(query)
-
- # Main Query
- dist = sql("select %s from `tabBudget Distribution` t1, `tabBudget Distribution Detail` t2 where t1.name = '%s' and t2.parent = t1.name and t1.fiscal_year = '%s'"%(query,dist_id,fiscal_year))
- dist = dist and dist[0] or 0
-# msgprint(dist)
- bug = []
- for i in dist:
- i = i and float(i) or 0
- bug.append(i)
-# msgprint(bug)
- return bug
-
-
-#============ function for appending target amt and actual amt in a proper order =======================
-def appending_func(ran,tl,lst,actual,flt):
-
- c = 2
- for i in range(ran):
- #==== for each itemgroup their actual amt is appended/inserted between target amt
- if tl == 0:
- lst.insert(c,actual and flt(actual[0][i]) or 0)
- #======== here actual amt is appended/inserted b/w target amt for a particular territory/sales person/sales partner only if target is not zero
- elif tl == 1:
-# msgprint(lst)
- lst.insert(c,actual and flt(actual[0][i]) or 0)
- c += 2
- return lst
-
-def get_target(tar_det,group_by,period,fiscal_year,rng,r,get_budget_distribution,flt):
-
- grp,lst = [],[]
- list_range,tl = 0,0
- if group_by == 'Item Group':
- for i in tar_det:
- if i[0] != '':
- igrp = [i[0]]
- if i[2]:
- dist_id = i[2]
- dist = get_budget_distribution(period,dist_id,fiscal_year)
- for d in dist:
- t = flt(flt(flt(i[1]) * flt(d))/ 100)
- igrp.append(t)
- else:
- t = i and flt(i[1]/rng) or 0
- for i in range(rng):
- igrp.append(t)
-
- grp.append(igrp)
- list_range +=1
- lst = [1,grp,list_range]
-
- #============== Total target(on basis of whole target ) ============
- else:
- for i in tar_det:
- if i[0] == '':
- if i[2]:
- dist_id = i[2]
- dist = get_budget_distribution(period,dist_id,fiscal_year)
- for d in dist:
- t = flt((flt(i[1]) * flt(d))/ 100)
- r.append(t)
- else:
- tot_target = i and flt(i[1]/rng) or 0
- for i in range(rng):
- r.append(tot_target)
- tl = 1
- lst = [0,r,tl]
- return lst
-#============ report display function =====================
-for r in res:
- query = ''
- grp=[]
- list_range, count, ap, tot_target, tl = 0,0,0,0,0
-
- #============= ANNUAL REPORT ===================
- if period == 'Annual':
- tar_det = sql("select item_group, target_amount, distribution_id from `tabTarget Detail` where parent = %s and parenttype = %s and fiscal_year = %s",(r[col_idx['ID']],based_on,fiscal_year))
-# msgprint(tar_det)
-
- #================ Target based on individual item group ==============
- if group_by == 'Item Group':
- for i in tar_det:
- if i[0] != '':
- grp_target = i and flt(i[1]) or 0
- igrp = [i[0],grp_target]
- grp.append(igrp)
-# msgprint(grp)
- list_range +=1
- count = 3
-
- #============== Total target(will be displayed only if target is specified by the user) ============
- else:
- for i in tar_det:
- # ======= here target is considered and not sum of target of item groups
- if i[0] == '':
- tot_target = tar_det and flt(i[1]) or 0
-# msgprint(tot_target)
-
- #================== Actual Amount =============================================
- if based_on == 'Territory' or based_on == 'Sales Partner':
-
- if group_by =='Item Group':
-
- for i in grp:
- item_group = i[0]
- actual = sql("select sum(t2.amount) from `tab%s` t1, `tab%s Detail` t2, `tabItem` t3 where t2.parent = t1.name and t1.%s = '%s' and t3.name = t2.item_code and t3.item_group = '%s' and t1.docstatus = 1 and t1.docstatus != 2 and %s"%(under,under_detail,based,r[col_idx['ID']],item_group,condition))
- msgprint(actual)
- actual = actual and flt(actual[0][0]) or 0
- i.append(actual)
-
- else:
- actual = sql("select sum(net_total) from `tab%s` where %s = '%s' and docstatus = 1 and %s" % (under, based, r[col_idx['ID']],condition))
- actual = actual and flt(actual[0][0]) or 0
-
- elif based_on == 'Sales Person':
- if group_by =='Item Group':
- for i in grp:
- item_group = i[0]
- actual = sql("select sum(t2.amount) from `tab%s` t1, `tab%s Detail` t2, `tabSales Team` t3, `tabItem` t4 where t2.parent = t1.name and t3.parent = t1.name and t3.%s = '%s' and t4.name = t2.item_code and t4.item_group = '%s' and t1.docstatus != 2 and t1.docstatus = 1 and %s"%(under,under_detail,based,r[col_idx['ID']],item_group,condition))
- actual = actual and flt(actual[0][0]) or 0
-# msgprint(actual)
- i.append(actual)
-
- else:
- actual = sql("select sum(t1.net_total) from `tab%s` t1, `tabSales Team` t2 where t2.%s = '%s' and t2.parenttype='%s' and t1.docstatus != 2 and t2.parent = t1.name and %s"%(under,based,r[col_idx['ID']],under,condition))
- actual = actual and flt(actual[0][0]) or 0
-# msgprint(actual)
-
- # ================= Half Yearly Report ===============
- elif period == 'Half Yearly':
- tl = 0
- grp_target = []
-
- tar_det = sql("select item_group, target_amount, distribution_id from `tabTarget Detail` where parent = %s and parenttype = %s and fiscal_year = %s",(r[col_idx['ID']],based_on,fiscal_year))
-# msgprint(tar_det)
-
- tar = get_target(tar_det,group_by,period,fiscal_year,2,r,get_budget_distribution,flt)
- if tar[0] == 1:
- grp = tar[1]
- list_range = tar[2]
- count = 5
- else:
- r = tar[1]
- tl = tar[2]
-
- #============= Actual Amount======================
- if group_by == 'Item Group':
- # first half
- query += 'SUM(CASE WHEN MONTH(t1.'+dt+') BETWEEN '+cstr(start_month)+' AND '+cstr(start_month+5)+' THEN t2.amount ELSE NULL END),'
- # second half
- query += 'SUM(CASE WHEN MONTH(t1.'+dt+') NOT BETWEEN '+cstr(start_month)+' AND '+cstr(start_month+5)+' THEN t2.amount ELSE NULL END)';
-
- elif based_on != 'Sales Person':
- # first half
- query += 'SUM(CASE WHEN MONTH('+dt+') BETWEEN '+cstr(start_month)+' AND '+cstr(start_month+5)+' THEN net_total ELSE NULL END),'
- # second half
- query += 'SUM(CASE WHEN MONTH('+dt+') NOT BETWEEN '+cstr(start_month)+' AND '+cstr(start_month+5)+' THEN net_total ELSE NULL END)';
-
- else:
- # first half
- query += 'SUM(CASE WHEN MONTH(t1.'+dt+') BETWEEN '+cstr(start_month)+' AND '+cstr(start_month+5)+' THEN t1.net_total ELSE NULL END),'
- # second half
- query += 'SUM(CASE WHEN MONTH(t1.'+dt+') NOT BETWEEN '+cstr(start_month)+' AND '+cstr(start_month+5)+' THEN t1.net_total ELSE NULL END)';
-
- #=========== Main Query ===============
- if based_on == 'Territory' or based_on == 'Sales Partner':
-
- if group_by =='Item Group':
- for i in grp:
- item_group = i[0]
- actual = sql("select %s from `tab%s` t1, `tab%s Detail` t2, `tabItem` t3 where t2.parent = t1.name and t1.%s = '%s' and t3.name = t2.item_code and t3.item_group = '%s' and t1.docstatus = 1 and t1.docstatus != 2 and %s"%(query,under,under_detail,based,r[col_idx['ID']],item_group,condition))
-# msgprint(actual)
- i = appending_func(2,tl,i,actual,flt)
-
- else:
- actual = sql("select %s from `tab%s` where %s = '%s' and docstatus = 1 and %s" % (query,under, based, r[col_idx['ID']],condition))
-# msgprint(actual)
-
- elif based_on == 'Sales Person':
- if group_by =='Item Group':
- for i in grp:
- item_group = i[0]
- actual = sql("select %s from `tab%s` t1, `tab%s Detail` t2, `tabSales Team` t3, `tabItem` t4 where t2.parent = t1.name and t3.parent = t1.name and t3.%s = '%s' and t4.name = t2.item_code and t4.item_group = '%s' and t1.docstatus != 2 and t1.docstatus = 1 and %s"%(query,under,under_detail,based,r[col_idx['ID']],item_group,condition))
-# msgprint(actual)
- i = appending_func(2,tl,i,actual,flt)
- else:
- actual = sql("select %s from `tab%s` t1, `tabSales Team` t2 where t2.%s = '%s' and t2.parenttype='%s' and t1.docstatus != 2 and t2.parent = t1.name and %s"%(query,under,based,r[col_idx['ID']],under,condition))
-# msgprint(actual)
-
- if tl == 1:
- r = appending_func(2,tl,r,actual,flt)
-# msgprint(r)
-
- #============== Quarterly Report =========================
- elif period == 'Quarterly':
- tl = 0
- grp_target = []
- tar_det = sql("select item_group, target_amount, distribution_id from `tabTarget Detail` where parent = %s and parenttype = %s and fiscal_year = %s",(r[col_idx['ID']],based_on,fiscal_year))
-
- tar = get_target(tar_det,group_by,period,fiscal_year,4,r,get_budget_distribution,flt)
- if tar[0] == 1:
- grp = tar[1]
- list_range = tar[2]
- count = 9
- else:
- r = tar[1]
- tl = tar[2]
-
- #======= Actual Amt ==================
- length_1 = (len(month_name) - start_month + 1) / 3; #this gives the total no. of times we need to iterate for quarter
- val = length_1 % 4;
- for i in range(length_1):
- value = 3*i + val;
-
- if group_by == 'Item Group':
- query += 'SUM(CASE WHEN MONTH(t1.'+dt+') BETWEEN '+cstr(value+1)+' AND '+cstr(value+3)+' THEN t2.amount ELSE NULL END),'
-
- elif based_on != 'Sales Person':
- query += 'SUM(CASE WHEN MONTH('+dt+') BETWEEN '+cstr(value+1)+' AND '+cstr(value+3)+' THEN net_total ELSE NULL END),'
-
- else:
- query += 'SUM(CASE WHEN MONTH(t1.'+dt+') BETWEEN '+cstr(value+1)+' AND '+cstr(value+3)+' THEN t1.net_total ELSE NULL END),'
-
- length_2 = (start_month - 1) / 3; #this gives the total no. of times we need to iterate for quarter (this is required only if fiscal year starts from april)
- for i in range(length_2):
- if group_by == 'Item Group':
- query += 'SUM(CASE WHEN MONTH(t1.'+dt+') BETWEEN '+cstr(3*i+1)+' AND '+cstr(3*i+3)+' THEN t2.amount ELSE NULL END)';
-
- elif based_on != 'Sales Person':
- query += 'SUM(CASE WHEN MONTH('+dt+') BETWEEN '+cstr(3*i+1)+' AND '+cstr(3*i+3)+' THEN net_total ELSE NULL END)';
-
- else:
- query += 'SUM(CASE WHEN MONTH(t1.'+dt+') BETWEEN '+cstr(3*i+1)+' AND '+cstr(3*i+3)+' THEN t1.net_total ELSE NULL END)';
-
- #=========== Main Query ===============
- if based_on == 'Territory' or based_on == 'Sales Partner':
-
- if group_by =='Item Group':
- for i in grp:
- item_group = i[0]
- actual = sql("select %s from `tab%s` t1, `tab%s Detail` t2, `tabItem` t3 where t2.parent = t1.name and t1.%s = '%s' and t3.name = t2.item_code and t3.item_group = '%s' and t1.docstatus = 1 and t1.docstatus != 2 and %s"%(query,under,under_detail,based,r[col_idx['ID']],item_group,condition))
-# msgprint(actual)
- #================common function
- i = appending_func(4,tl,i,actual,flt)
-
- else:
- actual = sql("select %s from `tab%s` where %s = '%s' and docstatus = 1 and %s" % (query,under, based, r[col_idx['ID']],condition))
-# msgprint(actual)
-
- elif based_on == 'Sales Person':
- if group_by =='Item Group':
- for i in grp:
- item_group = i[0]
- actual = sql("select %s from `tab%s` t1, `tab%s Detail` t2, `tabSales Team` t3, `tabItem` t4 where t2.parent = t1.name and t3.parent = t1.name and t3.%s = '%s' and t4.name = t2.item_code and t4.item_group = '%s' and t1.docstatus != 2 and t1.docstatus = 1 and %s"%(query,under,under_detail,based,r[col_idx['ID']],item_group,condition))
-# msgprint(actual)
- i = appending_func(4,tl,i,actual,flt)
- else:
- actual = sql("select %s from `tab%s` t1, `tabSales Team` t2 where t2.%s = '%s' and t2.parenttype='%s' and t1.docstatus != 2 and t2.parent = t1.name and %s"%(query,under,based,r[col_idx['ID']],under,condition))
-# msgprint(actual)
-
- if tl == 1:
- r = appending_func(4,tl,r,actual,flt)
-# msgprint(r)
-
- #================ Monthly Report ===========================
- elif period == 'Monthly':
- tl = 0
- grp_target = []
- tar_det = sql("select item_group, target_amount, distribution_id from `tabTarget Detail` where parent = %s and parenttype = %s and fiscal_year = %s",(r[col_idx['ID']],based_on,fiscal_year))
-
- tar = get_target(tar_det,group_by,period,fiscal_year,12,r,get_budget_distribution,flt)
- if tar[0] == 1:
- grp = tar[1]
- list_range = tar[2]
- count = 25
- else:
- r = tar[1]
- tl = tar[2]
-
- #======= Actual Amt ==================
- # for loop is required twice coz fiscal year starts from April (this will also work if fiscal year starts in January)
- for i in range(start_month-1,len(month_name)):
- if group_by == 'Item Group':
- query += 'SUM(CASE WHEN MONTH(t1.'+dt+') = '+cstr(i+1)+' THEN t2.amount ELSE NULL END),'
-
- elif based_on != 'Sales Person':
- query += 'SUM(CASE WHEN MONTH('+dt+') = '+cstr(i+1)+' THEN net_total ELSE NULL END),'
-
- else:
- query += 'SUM(CASE WHEN MONTH(t1.'+dt+') = '+cstr(i+1)+' THEN t1.net_total ELSE NULL END),'
-
- for i in range(start_month-1):
- if i != (start_month-1):
- if group_by == 'Item Group':
- query += 'SUM(CASE WHEN MONTH(t1.'+dt+') = '+cstr(i+1)+' THEN t2.amount ELSE NULL END)'
-
- elif based_on != 'Sales Person':
- query += 'SUM(CASE WHEN MONTH('+dt+') = '+cstr(i+1)+' THEN net_total ELSE NULL END)'
-
- else:
- query += 'SUM(CASE WHEN MONTH(t1.'+dt+') = '+cstr(i+1)+' THEN t1.net_total ELSE NULL END)'
-
- if i < (start_month -2):
- query += ','
-
- #=========== Main Query ===============
- if based_on == 'Territory' or based_on == 'Sales Partner':
-
- if group_by =='Item Group':
- for i in grp:
- item_group = i[0]
- actual = sql("select %s from `tab%s` t1, `tab%s Detail` t2, `tabItem` t3 where t2.parent = t1.name and t1.%s = '%s' and t3.name = t2.item_code and t3.item_group = '%s' and t1.docstatus = 1 and t1.docstatus != 2 and %s"%(query,under,under_detail,based,r[col_idx['ID']],item_group,condition))
-# msgprint(actual)
- #===============common function=====================
- i = appending_func(12,tl,i,actual,flt)
-
- else:
- actual = sql("select %s from `tab%s` where %s = '%s' and docstatus = 1 and %s" % (query,under, based, r[col_idx['ID']],condition))
-# msgprint(actual)
-
- elif based_on == 'Sales Person':
- if group_by =='Item Group':
- for i in grp:
- item_group = i[0]
- actual = sql("select %s from `tab%s` t1, `tab%s Detail` t2, `tabSales Team` t3, `tabItem` t4 where t2.parent = t1.name and t3.parent = t1.name and t3.%s = '%s' and t4.name = t2.item_code and t4.item_group = '%s' and t1.docstatus != 2 and t1.docstatus = 1 and %s"%(query,under,under_detail,based,r[col_idx['ID']],item_group,condition))
-# msgprint(actual)
- i = appending_func(12,tl,i,actual,flt)
- else:
- actual = sql("select %s from `tab%s` t1, `tabSales Team` t2 where t2.%s = '%s' and t2.parenttype='%s' and t1.docstatus != 2 and t2.parent = t1.name and %s"%(query,under,based,r[col_idx['ID']],under,condition))
-# msgprint(actual)
-
- if tl == 1:
- r = appending_func(12,tl,r,actual,flt)
-# msgprint(r)
-
-#-------------DISPLAY OF TARGET vs ACTUAL ON BASIS OF TOTAL TARGET / ITEM GROUP
-
- if group_by == 'Item Group':
- for col in range(len(colnames)-1): # this would make all first row blank. just for look
- r.append('')
-
- for des in range(list_range):
- if ap == 0:
- out.append(r)
- ap = 1
- t_row = ['' for i in range(len(colnames))]
-
- for v in range(count):
- t_row[col_idx[colnames[v+1]]] = grp[des][v]
-# msgprint(t_row)
- out.append(t_row)
-
- elif tot_target != 0 and period =='Annual':
- r.append(tot_target)
- r.append(actual)
- out.append(r)
- tot_target = 0
-
- elif tl == 1:
- out.append(r)
diff --git a/selling/search_criteria/variance_report/variance_report.sql b/selling/search_criteria/variance_report/variance_report.sql
deleted file mode 100644
index 89becb7..0000000
--- a/selling/search_criteria/variance_report/variance_report.sql
+++ /dev/null
@@ -1 +0,0 @@
-SELECT DISTINCT t1.`name` FROM `tab%(based_on)s` t1, `tabTarget Detail` t2 WHERE t2.parent = t1.name and (t2.target_amount != 0 or t2.target_amount is not null)
\ No newline at end of file
diff --git a/selling/search_criteria/variance_report/variance_report.txt b/selling/search_criteria/variance_report/variance_report.txt
deleted file mode 100644
index e141191..0000000
--- a/selling/search_criteria/variance_report/variance_report.txt
+++ /dev/null
@@ -1,26 +0,0 @@
-[
- {
- "owner": "Administrator",
- "docstatus": 0,
- "creation": "2012-04-03 12:49:53",
- "modified_by": "Administrator",
- "modified": "2012-04-03 12:49:53"
- },
- {
- "parent_doc_type": "Territory",
- "module": "Selling",
- "doctype": "Search Criteria",
- "sort_order": "DESC",
- "filters": "{'Territory\u0001State':'','Target Detail\u0001Fiscal Year':'2009-2010','Target Detail\u0001Based On':'Territory','Target Detail\u0001Company':'Alpha Company','Target Detail\u0001Period':'Quarterly','Target Detail\u0001Under':'Sales Order'}",
- "standard": "Yes",
- "doc_type": "Target Detail",
- "name": "__common__",
- "sort_by": "ID",
- "page_len": 50,
- "criteria_name": "Variance Report"
- },
- {
- "name": "variance_report",
- "doctype": "Search Criteria"
- }
-]
\ No newline at end of file
diff --git a/selling/utils.py b/selling/utils.py
index 21e94f7..6901028 100644
--- a/selling/utils.py
+++ b/selling/utils.py
@@ -16,6 +16,9 @@
from __future__ import unicode_literals
import webnotes
+from webnotes import msgprint, _
+from webnotes.utils import flt, cint, comma_and
+import json
def get_customer_list(doctype, txt, searchfield, start, page_len, filters):
if webnotes.conn.get_default("cust_master_name") == "Customer Name":
@@ -29,4 +32,149 @@
case when customer_name like %s then 0 else 1 end,
name, customer_name limit %s, %s""" %
(", ".join(fields), searchfield, "%s", "%s", "%s", "%s", "%s", "%s"),
- ("%%%s%%" % txt, "%%%s%%" % txt, "%%%s%%" % txt, "%%%s%%" % txt, start, page_len))
\ No newline at end of file
+ ("%%%s%%" % txt, "%%%s%%" % txt, "%%%s%%" % txt, "%%%s%%" % txt, start, page_len))
+
+@webnotes.whitelist()
+def get_item_details(args):
+ """
+ args = {
+ "item_code": "",
+ "warehouse": None,
+ "customer": "",
+ "conversion_rate": 1.0,
+ "price_list_name": None,
+ "price_list_currency": None,
+ "plc_conversion_rate": 1.0
+ }
+ """
+ if isinstance(args, basestring):
+ args = json.loads(args)
+ args = webnotes._dict(args)
+
+ if args.barcode:
+ args.item_code = _get_item_code(args.barcode)
+
+ item_bean = webnotes.bean("Item", args.item_code)
+
+ _validate_item_details(args, item_bean.doc)
+
+ out = _get_basic_details(args, item_bean)
+
+ meta = webnotes.get_doctype(args.doctype)
+ if meta.get_field("currency"):
+ out.base_ref_rate = out.basic_rate = out.ref_rate = out.export_rate = 0.0
+
+ if args.price_list_name and args.price_list_currency:
+ out.update(_get_price_list_rate(args, item_bean, meta))
+
+ if out.warehouse or out.reserved_warehouse:
+ out.update(get_available_qty(args.item_code, out.warehouse or out.reserved_warehouse))
+
+ out.customer_item_code = _get_customer_item_code(args, item_bean)
+
+ if cint(args.is_pos):
+ pos_settings = get_pos_settings(args.company)
+ out.update(apply_pos_settings(pos_settings, out))
+
+ return out
+
+def _get_item_code(barcode):
+ item_code = webnotes.conn.sql_list("""select name from `tabItem` where barcode=%s""", barcode)
+
+ if not item_code:
+ msgprint(_("No Item found with Barcode") + ": %s" % barcode, raise_exception=True)
+
+ elif len(item_code) > 1:
+ msgprint(_("Items") + " %s " % comma_and(item_code) +
+ _("have the same Barcode") + " %s" % barcode, raise_exception=True)
+
+ return item_code[0]
+
+def _validate_item_details(args, item):
+ from utilities.transaction_base import validate_item_fetch
+ validate_item_fetch(args, item)
+
+ # validate if sales item or service item
+ if args.order_type == "Maintenance":
+ if item.is_service_item != "Yes":
+ msgprint(_("Item") + (" %s: " % item.name) +
+ _("not a service item.") +
+ _("Please select a service item or change the order type to Sales."),
+ raise_exception=True)
+
+ elif item.is_sales_item != "Yes":
+ msgprint(_("Item") + (" %s: " % item.name) + _("not a sales item"),
+ raise_exception=True)
+
+def _get_basic_details(args, item_bean):
+ item = item_bean.doc
+ out = webnotes._dict({
+ "item_code": item.name,
+ "description": item.description_html or item.description,
+ "reserved_warehouse": item.default_warehouse,
+ "warehouse": item.default_warehouse or args.warehouse,
+ "income_account": item.default_income_account or args.income_account,
+ "expense_account": item.purchase_account or args.expense_account,
+ "cost_center": item.default_sales_cost_center or args.cost_center,
+ "qty": 1.0,
+ "adj_rate": 0.0,
+ "export_amount": 0.0,
+ "amount": 0.0,
+ "batch_no": None,
+ "item_tax_rate": json.dumps(dict(([d.tax_type, d.tax_rate] for d in
+ item_bean.doclist.get({"parentfield": "item_tax"})))),
+ })
+
+ for fieldname in ("item_name", "item_group", "barcode", "brand", "stock_uom"):
+ out[fieldname] = item.fields.get(fieldname)
+
+ return out
+
+def _get_price_list_rate(args, item_bean, meta):
+ base_ref_rate = item_bean.doclist.get({
+ "parentfield": "ref_rate_details",
+ "price_list_name": args.price_list_name,
+ "price_list_currency": args.price_list_currency,
+ "selling": 1})
+
+ if not base_ref_rate:
+ return {}
+
+ # found price list rate - now we can validate
+ from utilities.transaction_base import validate_currency
+ validate_currency(args, item_bean.doc, meta)
+
+ return {"ref_rate": flt(base_ref_rate[0].ref_rate * args.plc_conversion_rate / args.conversion_rate)}
+
+@webnotes.whitelist()
+def get_available_qty(item_code, warehouse):
+ return webnotes.conn.get_value("Bin", {"item_code": item_code, "warehouse": warehouse},
+ ["projected_qty", "actual_qty"], as_dict=True) or {}
+
+def _get_customer_item_code(args, item_bean):
+ customer_item_code = item_bean.doclist.get({"parentfield": "item_customer_details",
+ "customer_name": args.customer})
+
+ return customer_item_code and customer_item_code[0].ref_code or None
+
+def get_pos_settings(company):
+ pos_settings = webnotes.conn.sql("""select * from `tabPOS Setting` where user = %s
+ and company = %s""", (webnotes.session['user'], company), as_dict=1)
+
+ if not pos_settings:
+ pos_settings = webnotes.conn.sql("""select * from `tabPOS Setting`
+ where ifnull(user,'') = '' and company = %s""", company, as_dict=1)
+
+ return pos_settings and pos_settings[0] or None
+
+def apply_pos_settings(pos_settings, opts):
+ out = {}
+
+ for fieldname in ("income_account", "cost_center", "warehouse", "expense_account"):
+ if not opts.get(fieldname):
+ out[fieldname] = pos_settings.get(fieldname)
+
+ if out.get("warehouse"):
+ out["actual_qty"] = get_available_qty(opts.item_code, out.get("warehouse")).get("actual_qty")
+
+ return out
diff --git a/setup/doctype/authorization_control/README.md b/setup/doctype/authorization_control/README.md
new file mode 100644
index 0000000..6a85177
--- /dev/null
+++ b/setup/doctype/authorization_control/README.md
@@ -0,0 +1 @@
+Tool to define Authorization Rules (limits above which only specified roles have right to Submit).
\ No newline at end of file
diff --git a/setup/doctype/authorization_rule/README.md b/setup/doctype/authorization_rule/README.md
new file mode 100644
index 0000000..3cee161
--- /dev/null
+++ b/setup/doctype/authorization_rule/README.md
@@ -0,0 +1 @@
+Rule to define limits on transactions, above which only specified Role can Submit.
\ No newline at end of file
diff --git a/setup/doctype/backup_manager/README.md b/setup/doctype/backup_manager/README.md
new file mode 100644
index 0000000..4f037bf
--- /dev/null
+++ b/setup/doctype/backup_manager/README.md
@@ -0,0 +1 @@
+Settings to manage automated backups to third party tools like Dropbox and Google Drive.
\ No newline at end of file
diff --git a/setup/doctype/brand/README.md b/setup/doctype/brand/README.md
new file mode 100644
index 0000000..2d84c2c
--- /dev/null
+++ b/setup/doctype/brand/README.md
@@ -0,0 +1 @@
+Brand of an Item.
\ No newline at end of file
diff --git a/setup/doctype/company/README.md b/setup/doctype/company/README.md
new file mode 100644
index 0000000..e74e477
--- /dev/null
+++ b/setup/doctype/company/README.md
@@ -0,0 +1 @@
+Company against which all transactions are made. This is not the Customer or Supplier, this is the company that is the host of the system. Multiple companies can be created as host companies with each user having a different right.
\ No newline at end of file
diff --git a/setup/doctype/contact_control/README.md b/setup/doctype/contact_control/README.md
new file mode 100644
index 0000000..ca98eff
--- /dev/null
+++ b/setup/doctype/contact_control/README.md
@@ -0,0 +1 @@
+[To deprecate] Common scripts for Contacts.
\ No newline at end of file
diff --git a/setup/doctype/country/README.md b/setup/doctype/country/README.md
new file mode 100644
index 0000000..0e3f46c
--- /dev/null
+++ b/setup/doctype/country/README.md
@@ -0,0 +1 @@
+Country Master.
\ No newline at end of file
diff --git a/setup/doctype/currency/README.md b/setup/doctype/currency/README.md
new file mode 100644
index 0000000..3e1558e
--- /dev/null
+++ b/setup/doctype/currency/README.md
@@ -0,0 +1 @@
+Currency Master with details about abbreviation, symbol etc.
\ No newline at end of file
diff --git a/setup/doctype/customer_group/README.md b/setup/doctype/customer_group/README.md
new file mode 100644
index 0000000..43ca4b7
--- /dev/null
+++ b/setup/doctype/customer_group/README.md
@@ -0,0 +1 @@
+Customer classification (tree).
\ No newline at end of file
diff --git a/setup/doctype/email_digest/README.md b/setup/doctype/email_digest/README.md
new file mode 100644
index 0000000..6928796
--- /dev/null
+++ b/setup/doctype/email_digest/README.md
@@ -0,0 +1 @@
+Details of automated daily, weekly, monthly digests sent to users.
\ No newline at end of file
diff --git a/setup/doctype/email_settings/README.md b/setup/doctype/email_settings/README.md
new file mode 100644
index 0000000..a666902
--- /dev/null
+++ b/setup/doctype/email_settings/README.md
@@ -0,0 +1 @@
+Settings for outgoing emails (SMTP), Support Ticket (POP).
\ No newline at end of file
diff --git a/setup/doctype/features_setup/README.md b/setup/doctype/features_setup/README.md
new file mode 100644
index 0000000..4bdea47
--- /dev/null
+++ b/setup/doctype/features_setup/README.md
@@ -0,0 +1 @@
+Settings for enabling / disabling certain features that will result in smaller forms.
\ No newline at end of file
diff --git a/setup/doctype/global_defaults/README.md b/setup/doctype/global_defaults/README.md
new file mode 100644
index 0000000..5304c25
--- /dev/null
+++ b/setup/doctype/global_defaults/README.md
@@ -0,0 +1 @@
+Global defaults and settings for various modules.
\ No newline at end of file
diff --git a/setup/doctype/global_defaults/global_defaults.py b/setup/doctype/global_defaults/global_defaults.py
index dc7f6b4..2d28009 100644
--- a/setup/doctype/global_defaults/global_defaults.py
+++ b/setup/doctype/global_defaults/global_defaults.py
@@ -46,7 +46,6 @@
'maintain_same_rate' : 'maintain_same_rate',
'session_expiry': 'session_expiry',
'disable_rounded_total': 'disable_rounded_total',
- "update_stock": "update_stock",
"auto_inventory_accounting": "auto_inventory_accounting",
}
diff --git a/setup/doctype/global_defaults/global_defaults.txt b/setup/doctype/global_defaults/global_defaults.txt
index 175ca94..16954a0 100644
--- a/setup/doctype/global_defaults/global_defaults.txt
+++ b/setup/doctype/global_defaults/global_defaults.txt
@@ -2,7 +2,7 @@
{
"creation": "2013-05-02 17:53:24",
"docstatus": 0,
- "modified": "2013-05-22 15:57:26",
+ "modified": "2013-05-30 12:23:34",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -27,8 +27,6 @@
"permlevel": 0
},
{
- "amend": 0,
- "cancel": 0,
"create": 1,
"doctype": "DocPerm",
"name": "__common__",
@@ -327,14 +325,6 @@
"read_only": 0
},
{
- "description": "If checked, then in POS Sales Invoice, Update Stock gets checked by default",
- "doctype": "DocField",
- "fieldname": "update_stock",
- "fieldtype": "Check",
- "label": "Update Stock when using POS Sales Invoice",
- "read_only": 0
- },
- {
"doctype": "DocField",
"fieldname": "account_info",
"fieldtype": "HTML",
@@ -527,6 +517,11 @@
"read_only": 0
},
{
+ "amend": 0,
+ "cancel": 0,
+ "doctype": "DocPerm"
+ },
+ {
"doctype": "DocPerm"
}
]
\ No newline at end of file
diff --git a/setup/doctype/item_group/README.md b/setup/doctype/item_group/README.md
new file mode 100644
index 0000000..2fbe85e
--- /dev/null
+++ b/setup/doctype/item_group/README.md
@@ -0,0 +1 @@
+Item classification (tree).
\ No newline at end of file
diff --git a/setup/doctype/item_group/item_group.py b/setup/doctype/item_group/item_group.py
index 1ff3d4a..ef3c408 100644
--- a/setup/doctype/item_group/item_group.py
+++ b/setup/doctype/item_group/item_group.py
@@ -38,14 +38,7 @@
from webnotes.webutils import update_page_name
# webpage updates
page_name = self.doc.name
- if webnotes.conn.get_value("Product Settings", None,
- "default_product_category")==self.doc.name:
- page_name = "products"
- from webnotes.webutils import clear_cache
- clear_cache()
-
update_page_name(self.doc, page_name)
-
invalidate_cache_for(self.doc.name)
elif self.doc.page_name:
diff --git a/setup/doctype/jobs_email_settings/README.md b/setup/doctype/jobs_email_settings/README.md
new file mode 100644
index 0000000..8314c55
--- /dev/null
+++ b/setup/doctype/jobs_email_settings/README.md
@@ -0,0 +1 @@
+Settings to extract job applications via email (POP).
\ No newline at end of file
diff --git a/setup/doctype/market_segment/__init__.py b/setup/doctype/market_segment/__init__.py
deleted file mode 100644
index baffc48..0000000
--- a/setup/doctype/market_segment/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-from __future__ import unicode_literals
diff --git a/setup/doctype/market_segment/locale/_messages_doc.json b/setup/doctype/market_segment/locale/_messages_doc.json
deleted file mode 100644
index fa85763..0000000
--- a/setup/doctype/market_segment/locale/_messages_doc.json
+++ /dev/null
@@ -1,7 +0,0 @@
-[
- "Trash Reason",
- "Segment Name",
- "Setup",
- "Details",
- "Market Segment"
-]
\ No newline at end of file
diff --git a/setup/doctype/market_segment/locale/ar-doc.json b/setup/doctype/market_segment/locale/ar-doc.json
deleted file mode 100644
index 2767c84..0000000
--- a/setup/doctype/market_segment/locale/ar-doc.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "Details": "\u062a\u0641\u0627\u0635\u064a\u0644",
- "Market Segment": "\u0633\u0648\u0642 \u0627\u0644\u0642\u0637\u0627\u0639",
- "Segment Name": "\u0627\u0644\u062c\u0632\u0621 \u0627\u0633\u0645",
- "Setup": "\u0627\u0644\u0625\u0639\u062f\u0627\u062f",
- "Trash Reason": "\u0627\u0644\u0633\u0628\u0628 \u0627\u0644\u0642\u0645\u0627\u0645\u0629"
-}
\ No newline at end of file
diff --git a/setup/doctype/market_segment/locale/de-doc.json b/setup/doctype/market_segment/locale/de-doc.json
deleted file mode 100644
index f8ad0b8..0000000
--- a/setup/doctype/market_segment/locale/de-doc.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "Details": "Details",
- "Market Segment": "Market Segment",
- "Segment Name": "Segment Name",
- "Setup": "Setup",
- "Trash Reason": "Trash Reason"
-}
\ No newline at end of file
diff --git a/setup/doctype/market_segment/locale/es-doc.json b/setup/doctype/market_segment/locale/es-doc.json
deleted file mode 100644
index adfb9d2..0000000
--- a/setup/doctype/market_segment/locale/es-doc.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "Details": "Detalles",
- "Market Segment": "Sector de mercado",
- "Segment Name": "Segmento Nombre",
- "Setup": "Disposici\u00f3n",
- "Trash Reason": "Trash Raz\u00f3n"
-}
\ No newline at end of file
diff --git a/setup/doctype/market_segment/locale/fr-doc.json b/setup/doctype/market_segment/locale/fr-doc.json
deleted file mode 100644
index 3b58224..0000000
--- a/setup/doctype/market_segment/locale/fr-doc.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "Details": "D\u00e9tails",
- "Market Segment": "Segment de march\u00e9",
- "Segment Name": "Nom du segment",
- "Setup": "Installation",
- "Trash Reason": "Raison Corbeille"
-}
\ No newline at end of file
diff --git a/setup/doctype/market_segment/locale/hi-doc.json b/setup/doctype/market_segment/locale/hi-doc.json
deleted file mode 100644
index dba08f4..0000000
--- a/setup/doctype/market_segment/locale/hi-doc.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "Details": "\u0935\u093f\u0935\u0930\u0923",
- "Market Segment": "\u092c\u093e\u091c\u093e\u0930 \u0916\u0902\u0921",
- "Segment Name": "\u0916\u0923\u094d\u0921 \u0928\u093e\u092e",
- "Setup": "\u0935\u094d\u092f\u0935\u0938\u094d\u0925\u093e",
- "Trash Reason": "\u091f\u094d\u0930\u0948\u0936 \u0915\u093e\u0930\u0923"
-}
\ No newline at end of file
diff --git a/setup/doctype/market_segment/locale/hr-doc.json b/setup/doctype/market_segment/locale/hr-doc.json
deleted file mode 100644
index 9a3f5df..0000000
--- a/setup/doctype/market_segment/locale/hr-doc.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "Details": "Detalji",
- "Market Segment": "Tr\u017ei\u0161ni segment",
- "Segment Name": "Segment Ime",
- "Setup": "Postavljanje",
- "Trash Reason": "Otpad Razlog"
-}
\ No newline at end of file
diff --git a/setup/doctype/market_segment/locale/nl-doc.json b/setup/doctype/market_segment/locale/nl-doc.json
deleted file mode 100644
index 2299482..0000000
--- a/setup/doctype/market_segment/locale/nl-doc.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "Details": "Details",
- "Market Segment": "Marktsegment",
- "Segment Name": "Segment Naam",
- "Setup": "Setup",
- "Trash Reason": "Trash Reden"
-}
\ No newline at end of file
diff --git a/setup/doctype/market_segment/locale/pt-BR-doc.json b/setup/doctype/market_segment/locale/pt-BR-doc.json
deleted file mode 100644
index d22b033..0000000
--- a/setup/doctype/market_segment/locale/pt-BR-doc.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "Details": "Detalhes",
- "Market Segment": "Segmento de mercado",
- "Segment Name": "Nome do Segmento",
- "Setup": "Configura\u00e7\u00e3o",
- "Trash Reason": "Raz\u00e3o de p\u00f4r no lixo"
-}
\ No newline at end of file
diff --git a/setup/doctype/market_segment/locale/pt-doc.json b/setup/doctype/market_segment/locale/pt-doc.json
deleted file mode 100644
index 7b46049..0000000
--- a/setup/doctype/market_segment/locale/pt-doc.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "Details": "Detalhes",
- "Market Segment": "Segmento de mercado",
- "Segment Name": "Nome segmento",
- "Setup": "Instala\u00e7\u00e3o",
- "Trash Reason": "Raz\u00e3o lixo"
-}
\ No newline at end of file
diff --git a/setup/doctype/market_segment/locale/sr-doc.json b/setup/doctype/market_segment/locale/sr-doc.json
deleted file mode 100644
index 45456cd..0000000
--- a/setup/doctype/market_segment/locale/sr-doc.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "Details": "\u0414\u0435\u0442\u0430\u0459\u0438",
- "Market Segment": "\u0421\u0435\u0433\u043c\u0435\u043d\u0442 \u0442\u0440\u0436\u0438\u0448\u0442\u0430",
- "Segment Name": "\u0421\u0435\u0433\u043c\u0435\u043d\u0442 \u041d\u0430\u0437\u0438\u0432",
- "Setup": "\u041d\u0430\u043c\u0435\u0448\u0442\u0430\u0459\u043a\u0430",
- "Trash Reason": "\u0421\u043c\u0435\u045b\u0435 \u0420\u0430\u0437\u043b\u043e\u0433"
-}
\ No newline at end of file
diff --git a/setup/doctype/market_segment/locale/ta-doc.json b/setup/doctype/market_segment/locale/ta-doc.json
deleted file mode 100644
index b797c54..0000000
--- a/setup/doctype/market_segment/locale/ta-doc.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "Details": "\u0bb5\u0bbf\u0bb5\u0bb0\u0bae\u0bcd",
- "Market Segment": "\u0b9a\u0ba8\u0bcd\u0ba4\u0bc8 \u0baa\u0bbf\u0bb0\u0bbf\u0bb5\u0bc1",
- "Segment Name": "\u0baa\u0bbf\u0bb0\u0bbf\u0bb5\u0bbf\u0bb2\u0bcd \u0baa\u0bc6\u0baf\u0bb0\u0bcd",
- "Setup": "\u0b85\u0bae\u0bc8\u0baa\u0bcd\u0baa\u0bc1 \u0bae\u0bc1\u0bb1\u0bc8",
- "Trash Reason": "\u0b95\u0bc1\u0baa\u0bcd\u0baa\u0bc8 \u0b95\u0bbe\u0bb0\u0ba3\u0bae\u0bcd"
-}
\ No newline at end of file
diff --git a/setup/doctype/market_segment/locale/th-doc.json b/setup/doctype/market_segment/locale/th-doc.json
deleted file mode 100644
index 42144b2..0000000
--- a/setup/doctype/market_segment/locale/th-doc.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "Details": "\u0e23\u0e32\u0e22\u0e25\u0e30\u0e40\u0e2d\u0e35\u0e22\u0e14",
- "Market Segment": "\u0e2a\u0e48\u0e27\u0e19\u0e15\u0e25\u0e32\u0e14",
- "Segment Name": "\u0e0a\u0e37\u0e48\u0e2d\u0e2a\u0e48\u0e27\u0e19",
- "Setup": "\u0e01\u0e32\u0e23\u0e15\u0e34\u0e14\u0e15\u0e31\u0e49\u0e07",
- "Trash Reason": "\u0e40\u0e2b\u0e15\u0e38\u0e1c\u0e25\u0e16\u0e31\u0e07\u0e02\u0e22\u0e30"
-}
\ No newline at end of file
diff --git a/setup/doctype/market_segment/market_segment.py b/setup/doctype/market_segment/market_segment.py
deleted file mode 100644
index 7f48feb..0000000
--- a/setup/doctype/market_segment/market_segment.py
+++ /dev/null
@@ -1,22 +0,0 @@
-# ERPNext - web based ERP (http://erpnext.com)
-# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-from __future__ import unicode_literals
-import webnotes
-
-class DocType:
- def __init__(self, d, dl):
- self.doc, self.doclist = d, dl
\ No newline at end of file
diff --git a/setup/doctype/market_segment/market_segment.txt b/setup/doctype/market_segment/market_segment.txt
deleted file mode 100644
index a5da467..0000000
--- a/setup/doctype/market_segment/market_segment.txt
+++ /dev/null
@@ -1,56 +0,0 @@
-[
- {
- "creation": "2013-01-10 16:34:23",
- "docstatus": 0,
- "modified": "2013-01-22 14:47:03",
- "modified_by": "Administrator",
- "owner": "Administrator"
- },
- {
- "autoname": "field:segment_name",
- "doctype": "DocType",
- "in_create": 1,
- "module": "Setup",
- "name": "__common__",
- "name_case": "Title Case",
- "read_only": 0
- },
- {
- "doctype": "DocField",
- "name": "__common__",
- "parent": "Market Segment",
- "parentfield": "fields",
- "parenttype": "DocType",
- "permlevel": 0
- },
- {
- "doctype": "DocType",
- "name": "Market Segment"
- },
- {
- "doctype": "DocField",
- "fieldname": "trash_reason",
- "fieldtype": "Small Text",
- "label": "Trash Reason",
- "oldfieldname": "trash_reason",
- "oldfieldtype": "Small Text",
- "read_only": 1
- },
- {
- "doctype": "DocField",
- "fieldname": "segment_name",
- "fieldtype": "Data",
- "label": "Segment Name",
- "oldfieldname": "segment_name",
- "oldfieldtype": "Data",
- "reqd": 1
- },
- {
- "doctype": "DocField",
- "fieldname": "details",
- "fieldtype": "Text",
- "label": "Details",
- "oldfieldname": "details",
- "oldfieldtype": "Text"
- }
-]
\ No newline at end of file
diff --git a/setup/doctype/naming_series/README.md b/setup/doctype/naming_series/README.md
new file mode 100644
index 0000000..5a9b8ca
--- /dev/null
+++ b/setup/doctype/naming_series/README.md
@@ -0,0 +1 @@
+Tool to set numbering (naming) series for various DocTypes.
\ No newline at end of file
diff --git a/setup/doctype/naming_series_options/__init__.py b/setup/doctype/naming_series_options/__init__.py
deleted file mode 100644
index baffc48..0000000
--- a/setup/doctype/naming_series_options/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-from __future__ import unicode_literals
diff --git a/setup/doctype/naming_series_options/locale/_messages_doc.json b/setup/doctype/naming_series_options/locale/_messages_doc.json
deleted file mode 100644
index fc18b56..0000000
--- a/setup/doctype/naming_series_options/locale/_messages_doc.json
+++ /dev/null
@@ -1,6 +0,0 @@
-[
- "Naming Series Options",
- "Setup",
- "Doc Type",
- "Series Options"
-]
\ No newline at end of file
diff --git a/setup/doctype/naming_series_options/locale/ar-doc.json b/setup/doctype/naming_series_options/locale/ar-doc.json
deleted file mode 100644
index f79d1d2..0000000
--- a/setup/doctype/naming_series_options/locale/ar-doc.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "Doc Type": "\u0646\u0648\u0639 \u0627\u0644\u0648\u062b\u064a\u0642\u0629",
- "Naming Series Options": "\u062e\u064a\u0627\u0631\u0627\u062a \u062a\u0633\u0645\u064a\u0629 \u0627\u0644\u0633\u0644\u0633\u0644\u0629",
- "Series Options": "\u0633\u0644\u0633\u0644\u0629 \u062e\u064a\u0627\u0631\u0627\u062a",
- "Setup": "\u0627\u0644\u0625\u0639\u062f\u0627\u062f"
-}
\ No newline at end of file
diff --git a/setup/doctype/naming_series_options/locale/de-doc.json b/setup/doctype/naming_series_options/locale/de-doc.json
deleted file mode 100644
index c07d638..0000000
--- a/setup/doctype/naming_series_options/locale/de-doc.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "Doc Type": "Doc Type",
- "Naming Series Options": "Benennen Optionen Series",
- "Series Options": "Serie Optionen",
- "Setup": "Setup"
-}
\ No newline at end of file
diff --git a/setup/doctype/naming_series_options/locale/es-doc.json b/setup/doctype/naming_series_options/locale/es-doc.json
deleted file mode 100644
index b1e1209..0000000
--- a/setup/doctype/naming_series_options/locale/es-doc.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "Doc Type": "Tipo Doc.",
- "Naming Series Options": "Nombrar Opciones de serie",
- "Series Options": "Opciones de serie",
- "Setup": "Disposici\u00f3n"
-}
\ No newline at end of file
diff --git a/setup/doctype/naming_series_options/locale/fr-doc.json b/setup/doctype/naming_series_options/locale/fr-doc.json
deleted file mode 100644
index 53a24be..0000000
--- a/setup/doctype/naming_series_options/locale/fr-doc.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "Doc Type": "Doc Type d'",
- "Naming Series Options": "Nommer Options des s\u00e9ries",
- "Series Options": "Options des s\u00e9ries",
- "Setup": "Installation"
-}
\ No newline at end of file
diff --git a/setup/doctype/naming_series_options/locale/hi-doc.json b/setup/doctype/naming_series_options/locale/hi-doc.json
deleted file mode 100644
index e970fe4..0000000
--- a/setup/doctype/naming_series_options/locale/hi-doc.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "Doc Type": "\u0921\u0949\u0915\u094d\u091f\u0930 \u0915\u0947 \u092a\u094d\u0930\u0915\u093e\u0930",
- "Naming Series Options": "\u0936\u094d\u0930\u0943\u0902\u0916\u0932\u093e \u0935\u093f\u0915\u0932\u094d\u092a \u0928\u093e\u092e\u0915\u0930\u0923",
- "Series Options": "\u0936\u094d\u0930\u0943\u0902\u0916\u0932\u093e \u0935\u093f\u0915\u0932\u094d\u092a",
- "Setup": "\u0935\u094d\u092f\u0935\u0938\u094d\u0925\u093e"
-}
\ No newline at end of file
diff --git a/setup/doctype/naming_series_options/locale/hr-doc.json b/setup/doctype/naming_series_options/locale/hr-doc.json
deleted file mode 100644
index 7dc2fb6..0000000
--- a/setup/doctype/naming_series_options/locale/hr-doc.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "Doc Type": "Doc Tip",
- "Naming Series Options": "Imenovanje Serija isporuke",
- "Series Options": "Serija Opcije",
- "Setup": "Postavljanje"
-}
\ No newline at end of file
diff --git a/setup/doctype/naming_series_options/locale/nl-doc.json b/setup/doctype/naming_series_options/locale/nl-doc.json
deleted file mode 100644
index 0f6114e..0000000
--- a/setup/doctype/naming_series_options/locale/nl-doc.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "Doc Type": "Doc Type",
- "Naming Series Options": "Benoemen Reeksopties",
- "Series Options": "Reeksopties",
- "Setup": "Setup"
-}
\ No newline at end of file
diff --git a/setup/doctype/naming_series_options/locale/pt-BR-doc.json b/setup/doctype/naming_series_options/locale/pt-BR-doc.json
deleted file mode 100644
index 080f44d..0000000
--- a/setup/doctype/naming_series_options/locale/pt-BR-doc.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "Doc Type": "Tipo do Documento",
- "Naming Series Options": "Op\u00e7\u00f5es das S\u00e9ries nomeadas",
- "Series Options": "Op\u00e7\u00f5es de S\u00e9ries",
- "Setup": "Configura\u00e7\u00e3o"
-}
\ No newline at end of file
diff --git a/setup/doctype/naming_series_options/locale/pt-doc.json b/setup/doctype/naming_series_options/locale/pt-doc.json
deleted file mode 100644
index 76d9465..0000000
--- a/setup/doctype/naming_series_options/locale/pt-doc.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "Doc Type": "Tipo Doc",
- "Naming Series Options": "Nomeando S\u00e9rie Op\u00e7\u00f5es",
- "Series Options": "Op\u00e7\u00f5es de S\u00e9rie",
- "Setup": "Instala\u00e7\u00e3o"
-}
\ No newline at end of file
diff --git a/setup/doctype/naming_series_options/locale/sr-doc.json b/setup/doctype/naming_series_options/locale/sr-doc.json
deleted file mode 100644
index df84b8e..0000000
--- a/setup/doctype/naming_series_options/locale/sr-doc.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "Doc Type": "\u0414\u043e\u043a \u0422\u0438\u043f",
- "Naming Series Options": "\u0418\u043c\u0435\u043d\u043e\u0432\u0430\u045a\u0435 \u0441\u0435\u0440\u0438\u0458\u0435 \u041e\u043f\u0446\u0438\u0458\u0435",
- "Series Options": "\u0421\u0435\u0440\u0438\u0458\u0430 \u041e\u043f\u0446\u0438\u0458\u0435",
- "Setup": "\u041d\u0430\u043c\u0435\u0448\u0442\u0430\u0459\u043a\u0430"
-}
\ No newline at end of file
diff --git a/setup/doctype/naming_series_options/locale/ta-doc.json b/setup/doctype/naming_series_options/locale/ta-doc.json
deleted file mode 100644
index 0b4bb46..0000000
--- a/setup/doctype/naming_series_options/locale/ta-doc.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "Doc Type": "Doc \u0bb5\u0b95\u0bc8",
- "Naming Series Options": "\u0ba4\u0bc6\u0bbe\u0b9f\u0bb0\u0bcd \u0bb5\u0bbf\u0bb0\u0bc1\u0baa\u0bcd\u0baa\u0b99\u0bcd\u0b95\u0bb3\u0bcd \u0baa\u0bc6\u0baf\u0bb0\u0bbf\u0b9f\u0bc1\u0bae\u0bcd",
- "Series Options": "\u0ba4\u0bc6\u0bbe\u0b9f\u0bb0\u0bcd \u0bb5\u0bbf\u0bb0\u0bc1\u0baa\u0bcd\u0baa\u0b99\u0bcd\u0b95\u0bb3\u0bcd",
- "Setup": "\u0b85\u0bae\u0bc8\u0baa\u0bcd\u0baa\u0bc1 \u0bae\u0bc1\u0bb1\u0bc8"
-}
\ No newline at end of file
diff --git a/setup/doctype/naming_series_options/locale/th-doc.json b/setup/doctype/naming_series_options/locale/th-doc.json
deleted file mode 100644
index 0202a37..0000000
--- a/setup/doctype/naming_series_options/locale/th-doc.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "Doc Type": "\u0e1b\u0e23\u0e30\u0e40\u0e20\u0e17 Doc",
- "Naming Series Options": "\u0e01\u0e32\u0e23\u0e15\u0e31\u0e49\u0e07\u0e0a\u0e37\u0e48\u0e2d\u0e15\u0e31\u0e27\u0e40\u0e25\u0e37\u0e2d\u0e01\u0e0a\u0e38\u0e14",
- "Series Options": "\u0e15\u0e31\u0e27\u0e40\u0e25\u0e37\u0e2d\u0e01\u0e0a\u0e38\u0e14",
- "Setup": "\u0e01\u0e32\u0e23\u0e15\u0e34\u0e14\u0e15\u0e31\u0e49\u0e07"
-}
\ No newline at end of file
diff --git a/setup/doctype/naming_series_options/naming_series_options.py b/setup/doctype/naming_series_options/naming_series_options.py
deleted file mode 100644
index 7f48feb..0000000
--- a/setup/doctype/naming_series_options/naming_series_options.py
+++ /dev/null
@@ -1,22 +0,0 @@
-# ERPNext - web based ERP (http://erpnext.com)
-# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-from __future__ import unicode_literals
-import webnotes
-
-class DocType:
- def __init__(self, d, dl):
- self.doc, self.doclist = d, dl
\ No newline at end of file
diff --git a/setup/doctype/naming_series_options/naming_series_options.txt b/setup/doctype/naming_series_options/naming_series_options.txt
deleted file mode 100644
index c95af3d..0000000
--- a/setup/doctype/naming_series_options/naming_series_options.txt
+++ /dev/null
@@ -1,63 +0,0 @@
-[
- {
- "creation": "2012-03-27 14:36:21",
- "docstatus": 0,
- "modified": "2012-03-27 14:36:21",
- "modified_by": "Administrator",
- "owner": "Administrator"
- },
- {
- "autoname": "__NSO.#####",
- "doctype": "DocType",
- "in_create": 1,
- "module": "Setup",
- "name": "__common__",
- "read_only": 0,
- "section_style": "Simple",
- "show_in_menu": 0,
- "version": 5
- },
- {
- "doctype": "DocField",
- "name": "__common__",
- "parent": "Naming Series Options",
- "parentfield": "fields",
- "parenttype": "DocType",
- "permlevel": 0
- },
- {
- "doctype": "DocPerm",
- "name": "__common__",
- "parent": "Naming Series Options",
- "parentfield": "permissions",
- "parenttype": "DocType",
- "permlevel": 0,
- "read": 1,
- "report": 1,
- "role": "System Manager"
- },
- {
- "doctype": "DocType",
- "name": "Naming Series Options"
- },
- {
- "doctype": "DocPerm"
- },
- {
- "doctype": "DocField",
- "fieldname": "doc_type",
- "fieldtype": "Data",
- "label": "Doc Type",
- "oldfieldname": "doc_type",
- "oldfieldtype": "Data",
- "search_index": 1
- },
- {
- "doctype": "DocField",
- "fieldname": "series_options",
- "fieldtype": "Text",
- "label": "Series Options",
- "oldfieldname": "series_options",
- "oldfieldtype": "Text"
- }
-]
\ No newline at end of file
diff --git a/setup/doctype/notification_control/README.md b/setup/doctype/notification_control/README.md
new file mode 100644
index 0000000..3c411b7
--- /dev/null
+++ b/setup/doctype/notification_control/README.md
@@ -0,0 +1 @@
+Tool to automatically prompt sending of Email on Submission of various records.
\ No newline at end of file
diff --git a/setup/doctype/permission_control/locale/_messages_doc.json b/setup/doctype/permission_control/locale/_messages_doc.json
deleted file mode 100644
index c0b34c9..0000000
--- a/setup/doctype/permission_control/locale/_messages_doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-[
- "Permission Control",
- "Setup"
-]
\ No newline at end of file
diff --git a/setup/doctype/permission_control/locale/ar-doc.json b/setup/doctype/permission_control/locale/ar-doc.json
deleted file mode 100644
index a20cda3..0000000
--- a/setup/doctype/permission_control/locale/ar-doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "Permission Control": "\u0625\u0630\u0646 \u0627\u0644\u062a\u062d\u0643\u0645",
- "Setup": "\u0627\u0644\u0625\u0639\u062f\u0627\u062f"
-}
\ No newline at end of file
diff --git a/setup/doctype/permission_control/locale/de-doc.json b/setup/doctype/permission_control/locale/de-doc.json
deleted file mode 100644
index ca1bf25..0000000
--- a/setup/doctype/permission_control/locale/de-doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "Permission Control": "Permission Steuerung",
- "Setup": "Setup"
-}
\ No newline at end of file
diff --git a/setup/doctype/permission_control/locale/es-doc.json b/setup/doctype/permission_control/locale/es-doc.json
deleted file mode 100644
index c938e9c..0000000
--- a/setup/doctype/permission_control/locale/es-doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "Permission Control": "Permiso de Control",
- "Setup": "Disposici\u00f3n"
-}
\ No newline at end of file
diff --git a/setup/doctype/permission_control/locale/fr-doc.json b/setup/doctype/permission_control/locale/fr-doc.json
deleted file mode 100644
index d5001ab..0000000
--- a/setup/doctype/permission_control/locale/fr-doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "Permission Control": "L'autorisation Contr\u00f4le",
- "Setup": "Installation"
-}
\ No newline at end of file
diff --git a/setup/doctype/permission_control/locale/hi-doc.json b/setup/doctype/permission_control/locale/hi-doc.json
deleted file mode 100644
index 0e180c2..0000000
--- a/setup/doctype/permission_control/locale/hi-doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "Permission Control": "\u0905\u0928\u0941\u092e\u0924\u093f \u0928\u093f\u092f\u0902\u0924\u094d\u0930\u0923",
- "Setup": "\u0935\u094d\u092f\u0935\u0938\u094d\u0925\u093e"
-}
\ No newline at end of file
diff --git a/setup/doctype/permission_control/locale/hr-doc.json b/setup/doctype/permission_control/locale/hr-doc.json
deleted file mode 100644
index 7f2e06e..0000000
--- a/setup/doctype/permission_control/locale/hr-doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "Permission Control": "Dopu\u0161tenje kontrola",
- "Setup": "Postavljanje"
-}
\ No newline at end of file
diff --git a/setup/doctype/permission_control/locale/nl-doc.json b/setup/doctype/permission_control/locale/nl-doc.json
deleted file mode 100644
index 6597802..0000000
--- a/setup/doctype/permission_control/locale/nl-doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "Permission Control": "Toestemming Controle",
- "Setup": "Setup"
-}
\ No newline at end of file
diff --git a/setup/doctype/permission_control/locale/pt-BR-doc.json b/setup/doctype/permission_control/locale/pt-BR-doc.json
deleted file mode 100644
index aaec649..0000000
--- a/setup/doctype/permission_control/locale/pt-BR-doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "Permission Control": "Controle de Permiss\u00e3o",
- "Setup": "Configura\u00e7\u00e3o"
-}
\ No newline at end of file
diff --git a/setup/doctype/permission_control/locale/pt-doc.json b/setup/doctype/permission_control/locale/pt-doc.json
deleted file mode 100644
index 8652cfc..0000000
--- a/setup/doctype/permission_control/locale/pt-doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "Permission Control": "Controle de permiss\u00e3o",
- "Setup": "Instala\u00e7\u00e3o"
-}
\ No newline at end of file
diff --git a/setup/doctype/permission_control/locale/sr-doc.json b/setup/doctype/permission_control/locale/sr-doc.json
deleted file mode 100644
index 69eac91..0000000
--- a/setup/doctype/permission_control/locale/sr-doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "Permission Control": "\u0414\u043e\u0437\u0432\u043e\u043b\u0430 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0435",
- "Setup": "\u041d\u0430\u043c\u0435\u0448\u0442\u0430\u0459\u043a\u0430"
-}
\ No newline at end of file
diff --git a/setup/doctype/permission_control/locale/ta-doc.json b/setup/doctype/permission_control/locale/ta-doc.json
deleted file mode 100644
index a9b5db0..0000000
--- a/setup/doctype/permission_control/locale/ta-doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "Permission Control": "\u0b85\u0ba9\u0bc1\u0bae\u0ba4\u0bbf \u0b95\u0b9f\u0bcd\u0b9f\u0bc1\u0baa\u0bcd\u0baa\u0bbe\u0b9f\u0bc1",
- "Setup": "\u0b85\u0bae\u0bc8\u0baa\u0bcd\u0baa\u0bc1 \u0bae\u0bc1\u0bb1\u0bc8"
-}
\ No newline at end of file
diff --git a/setup/doctype/permission_control/locale/th-doc.json b/setup/doctype/permission_control/locale/th-doc.json
deleted file mode 100644
index fdb7c4f..0000000
--- a/setup/doctype/permission_control/locale/th-doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "Permission Control": "\u0e01\u0e32\u0e23\u0e04\u0e27\u0e1a\u0e04\u0e38\u0e21\u0e01\u0e32\u0e23\u0e2d\u0e19\u0e38\u0e0d\u0e32\u0e15",
- "Setup": "\u0e01\u0e32\u0e23\u0e15\u0e34\u0e14\u0e15\u0e31\u0e49\u0e07"
-}
\ No newline at end of file
diff --git a/setup/doctype/price_list/README.md b/setup/doctype/price_list/README.md
new file mode 100644
index 0000000..353b97c
--- /dev/null
+++ b/setup/doctype/price_list/README.md
@@ -0,0 +1 @@
+Item Price List master. Price Lists can be defined per Country, Currency.
\ No newline at end of file
diff --git a/setup/doctype/price_list_country/README.md b/setup/doctype/price_list_country/README.md
new file mode 100644
index 0000000..c2966e3
--- /dev/null
+++ b/setup/doctype/price_list_country/README.md
@@ -0,0 +1 @@
+Countries where parent Price List is valid.
\ No newline at end of file
diff --git a/setup/doctype/print_heading/README.md b/setup/doctype/print_heading/README.md
new file mode 100644
index 0000000..2cd60a4
--- /dev/null
+++ b/setup/doctype/print_heading/README.md
@@ -0,0 +1 @@
+Custom title for print main heading. e.g. "Pro Forma Invoice"
\ No newline at end of file
diff --git a/setup/doctype/quotation_lost_reason/README.md b/setup/doctype/quotation_lost_reason/README.md
new file mode 100644
index 0000000..a4309ce
--- /dev/null
+++ b/setup/doctype/quotation_lost_reason/README.md
@@ -0,0 +1 @@
+Reason master for losing quotations.
\ No newline at end of file
diff --git a/setup/doctype/sales_browser_control/__init__.py b/setup/doctype/sales_browser_control/__init__.py
deleted file mode 100644
index baffc48..0000000
--- a/setup/doctype/sales_browser_control/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-from __future__ import unicode_literals
diff --git a/setup/doctype/sales_browser_control/locale/_messages_doc.json b/setup/doctype/sales_browser_control/locale/_messages_doc.json
deleted file mode 100644
index 7418dd5..0000000
--- a/setup/doctype/sales_browser_control/locale/_messages_doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-[
- "Setup",
- "Sales Browser Control"
-]
\ No newline at end of file
diff --git a/setup/doctype/sales_browser_control/locale/ar-doc.json b/setup/doctype/sales_browser_control/locale/ar-doc.json
deleted file mode 100644
index fa24002..0000000
--- a/setup/doctype/sales_browser_control/locale/ar-doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "Sales Browser Control": "\u0645\u0628\u064a\u0639\u0627\u062a \u0645\u062a\u0635\u0641\u062d \u0627\u0644\u062a\u062d\u0643\u0645",
- "Setup": "\u0627\u0644\u0625\u0639\u062f\u0627\u062f"
-}
\ No newline at end of file
diff --git a/setup/doctype/sales_browser_control/locale/de-doc.json b/setup/doctype/sales_browser_control/locale/de-doc.json
deleted file mode 100644
index 83242fa..0000000
--- a/setup/doctype/sales_browser_control/locale/de-doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "Sales Browser Control": "Vertrieb Browser Control",
- "Setup": "Setup"
-}
\ No newline at end of file
diff --git a/setup/doctype/sales_browser_control/locale/es-doc.json b/setup/doctype/sales_browser_control/locale/es-doc.json
deleted file mode 100644
index afd8363..0000000
--- a/setup/doctype/sales_browser_control/locale/es-doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "Sales Browser Control": "Ventas control de explorador",
- "Setup": "Disposici\u00f3n"
-}
\ No newline at end of file
diff --git a/setup/doctype/sales_browser_control/locale/fr-doc.json b/setup/doctype/sales_browser_control/locale/fr-doc.json
deleted file mode 100644
index 33d177b..0000000
--- a/setup/doctype/sales_browser_control/locale/fr-doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "Sales Browser Control": "Contr\u00f4le de navigateur ventes",
- "Setup": "Installation"
-}
\ No newline at end of file
diff --git a/setup/doctype/sales_browser_control/locale/hi-doc.json b/setup/doctype/sales_browser_control/locale/hi-doc.json
deleted file mode 100644
index 9c3bf75..0000000
--- a/setup/doctype/sales_browser_control/locale/hi-doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "Sales Browser Control": "\u092c\u093f\u0915\u094d\u0930\u0940 \u092c\u094d\u0930\u093e\u0909\u091c\u093c\u0930 \u0928\u093f\u092f\u0902\u0924\u094d\u0930\u0923",
- "Setup": "\u0935\u094d\u092f\u0935\u0938\u094d\u0925\u093e"
-}
\ No newline at end of file
diff --git a/setup/doctype/sales_browser_control/locale/hr-doc.json b/setup/doctype/sales_browser_control/locale/hr-doc.json
deleted file mode 100644
index 0fcdc335..0000000
--- a/setup/doctype/sales_browser_control/locale/hr-doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "Sales Browser Control": "Prodaja Preglednik kontrole",
- "Setup": "Postavljanje"
-}
\ No newline at end of file
diff --git a/setup/doctype/sales_browser_control/locale/nl-doc.json b/setup/doctype/sales_browser_control/locale/nl-doc.json
deleted file mode 100644
index 7d75044..0000000
--- a/setup/doctype/sales_browser_control/locale/nl-doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "Sales Browser Control": "Verkoop Browser Control",
- "Setup": "Setup"
-}
\ No newline at end of file
diff --git a/setup/doctype/sales_browser_control/locale/pt-BR-doc.json b/setup/doctype/sales_browser_control/locale/pt-BR-doc.json
deleted file mode 100644
index 154046d..0000000
--- a/setup/doctype/sales_browser_control/locale/pt-BR-doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "Sales Browser Control": "Controle do Navegador de Vendas",
- "Setup": "Configura\u00e7\u00e3o"
-}
\ No newline at end of file
diff --git a/setup/doctype/sales_browser_control/locale/pt-doc.json b/setup/doctype/sales_browser_control/locale/pt-doc.json
deleted file mode 100644
index cdb8d70..0000000
--- a/setup/doctype/sales_browser_control/locale/pt-doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "Sales Browser Control": "Vendas controle de navegador",
- "Setup": "Instala\u00e7\u00e3o"
-}
\ No newline at end of file
diff --git a/setup/doctype/sales_browser_control/locale/sr-doc.json b/setup/doctype/sales_browser_control/locale/sr-doc.json
deleted file mode 100644
index 9fdecb2..0000000
--- a/setup/doctype/sales_browser_control/locale/sr-doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "Sales Browser Control": "\u041f\u0440\u043e\u0434\u0430\u0458\u0430 \u0411\u0440\u043e\u0432\u0441\u0435\u0440 \u041a\u043e\u043d\u0442\u0440\u043e\u043b\u0430",
- "Setup": "\u041d\u0430\u043c\u0435\u0448\u0442\u0430\u0459\u043a\u0430"
-}
\ No newline at end of file
diff --git a/setup/doctype/sales_browser_control/locale/ta-doc.json b/setup/doctype/sales_browser_control/locale/ta-doc.json
deleted file mode 100644
index e6fed2c..0000000
--- a/setup/doctype/sales_browser_control/locale/ta-doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "Sales Browser Control": "\u0bb5\u0bbf\u0bb1\u0bcd\u0baa\u0ba9\u0bc8 \u0b89\u0bb2\u0bbe\u0bb5\u0bbf \u0b95\u0b9f\u0bcd\u0b9f\u0bc1\u0baa\u0bcd\u0baa\u0bbe\u0b9f\u0bc1",
- "Setup": "\u0b85\u0bae\u0bc8\u0baa\u0bcd\u0baa\u0bc1 \u0bae\u0bc1\u0bb1\u0bc8"
-}
\ No newline at end of file
diff --git a/setup/doctype/sales_browser_control/locale/th-doc.json b/setup/doctype/sales_browser_control/locale/th-doc.json
deleted file mode 100644
index 957d597..0000000
--- a/setup/doctype/sales_browser_control/locale/th-doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "Sales Browser Control": "\u0e04\u0e27\u0e1a\u0e04\u0e38\u0e21\u0e40\u0e1a\u0e23\u0e32\u0e27\u0e4c\u0e40\u0e0b\u0e2d\u0e23\u0e4c\u0e22\u0e2d\u0e14\u0e02\u0e32\u0e22",
- "Setup": "\u0e01\u0e32\u0e23\u0e15\u0e34\u0e14\u0e15\u0e31\u0e49\u0e07"
-}
\ No newline at end of file
diff --git a/setup/doctype/sales_browser_control/sales_browser_control.py b/setup/doctype/sales_browser_control/sales_browser_control.py
deleted file mode 100644
index ae9338f..0000000
--- a/setup/doctype/sales_browser_control/sales_browser_control.py
+++ /dev/null
@@ -1,226 +0,0 @@
-# ERPNext - web based ERP (http://erpnext.com)
-# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-from __future__ import unicode_literals
-import webnotes
-
-from webnotes.utils import cstr
-from webnotes.model import db_exists
-from webnotes.model.doc import Document
-from webnotes.model.bean import copy_doclist
-from webnotes.model.code import get_obj
-from webnotes import msgprint
-
-sql = webnotes.conn.sql
-
-
-
-class DocType:
- def __init__(self,doc,doclist=[]):
- self.doc = doc
- self.doclist = doclist
-
- #=============================================================================================
- def get_record_list(self,arg):
-
- parent, type = arg.split(',')
- pt_col = "parent_"+type.replace(' ','_').lower()
-
- cl = sql("select name,is_group from `tab%s` where docstatus != 2 and %s ='%s' order by is_group desc"%(type,pt_col,parent),as_dict=1)
-
- return {'parent':parent, 'cl':cl}
-
- #=============================================================================================
- # --------get root level records like all territories, all sales person etc---------
- def get_fl_node(self,arg):
-
- pt_col = "parent_"+arg.replace(' ','_').lower()
- cl = sql("select name,is_group from `tab%s` where docstatus !=2 and %s=''"%(arg,pt_col),as_dict=1)
- return {'cl':cl}
-
- #=============================================================================================
- def add_node(self,arg):
- arg = eval(arg)
- node_title = arg['node_title']
- n = Document(node_title)
- for d in arg.keys():
- if d != 'node_title':
- n.fields[d]=arg[d]
- n.old_parent = ''
- n_obj = get_obj(doc=n)
-
- n_obj.validate()
-
- n_obj.doc.save(1)
-
- n_obj.on_update()
-
- return n_obj.doc.name
-
- #=============================================================================================
- def trash_record(self,arg):
- name,type = arg.split(',')
-
- #validation for trash of default record
- if not type == 'Sales Person':
- field = 'default_'+type.lower().replace(' ','_')
- chk = sql("select value from `tabSingles` where doctype = 'Global Defaults' and field = '%s' and value = '%s'"%(field,name))
- if chk:
- msgprint("'%s' record is set as a default %s in Global Defaults. Please change default %s then try to trash '%s' record."%(name,type.lower(), type.lower(), name))
- raise Exception
-
-
- res = sql("select t1.name from `tab%s` t1, `tab%s` t2 where t1.lft > t2.lft and t1.rgt < t2.rgt and t1.docstatus != 2 and t2.name = '%s'"%(type,type,name))
- if res:
- msgprint("You can not trashed %s as it contains other nodes."%name)
- raise Exception
-
-
- sql("update `tab%s` set docstatus = 2 where name = '%s'"%(type,name))
-
- #=============================================================================================
- def get_parent_lst(self,type):
- par_lst = [r[0] for r in sql("select name from `tab%s` where is_group = 'Yes' and docstatus != 2"%type)]
- return par_lst
-
- #=============================================================================================
- def get_record(self,arg):
-
- name, type = arg.split(',')
-
- dict1 = {'Territory':'parent_territory','Customer Group':'parent_customer_group','Item Group':'parent_item_group','Sales Person':'parent_sales_person'}
-
- parent_name = dict1[type]
-
- query ="select name,"+dict1[type]+",is_group,rgt,lft from `tab"+cstr(type)+"` where name = '%s'"
-
- sv = sql(query%(cstr(name)))
-
-
- par_lst = [r[0] for r in sql("select distinct name from `tab"+cstr(type)+"` where docstatus !=2 and (rgt > %s or lft < %s) and is_group='Yes'"%(sv[0][3],sv[0][4]))]
-
- dict2 = {}
- dict2['name']=sv[0][0]
- dict2['parent']=cstr(sv[0][1])
- dict2['parent_lst']=par_lst
- dict2['is_group']=sv[0][2]
-
- return dict2
-
- #=============================================================================================
- def edit_node(self,arg):
- arg = eval(arg)
- nt = arg['node_title']
-
- nm = nt == 'Territory' and arg['territory_name'] or nt == 'Sales Person' and arg['sales_person_name'] or nt=='Item Group' and arg['item_group_name'] or nt =='Customer Group' and arg['customer_group_name'] or ''
-
- n_obj = get_obj(nt,nm)
- for d in arg.keys():
- if d != 'node_title':
- n_obj.doc.fields[d]=arg[d]
-
- n_obj.doc.save()
- n_obj.on_update()
-
-
- #=============== validation ======================================================================================
-
- def mvalidate(self,args):
-
- r = eval(args)
-
- if r['lft'] == 0 and r['action'] != 'Create':
- n = sql("select lft,rgt from `tab%s` where name = '%s'"%(r['node_title'],r['nm']))
- r['lft'] = n[0][0]
- r['rgt'] = n[0][1]
-
- if r['action'] == 'Update':
- #-----------------validate if current node has child node----------------------------------
- v1 = self.val_group(r)
- if v1 == 'true': return 'true'
-
-
- #-------------------validation for parent sales person cannot be his child node------------
- v1 = self.val_prt(r)
- if v1 == 'true': return 'true'
-
- #--------if current record has set as default record in manage account then should not allow to change 'has child node' to 'yes'
- v1 = self.group_changed(r)
- if v1 == 'true': return 'true'
-
- elif r['action'] == 'Create':
- #-------------------validation - record is already exist--------------------------------
- v1 = self.duplicate_rcd(r)
-
- if v1 == 'true': return 'true'
-
- #-------------------------------------------------
- v1 = self.trash_rcd(r)
- if v1 == 'true': return 'true'
-
- return 'false'
- #-----------------validate if current node has child node----------------------------------
- #------------------if yes then cannot change current node from group to leaf
- #ON EDIT
- def val_group(self,r):
- if r['is_group'] == 'No':
- ch = sql("select name from `tab%s` where lft>%s and rgt<%s and docstatus != 2"%(r['node_title'],r['lft'],r['rgt']))
- if ch:
- msgprint("You can not changed %s from group to leaf node as it contains other nodes."%r['nm'])
- return 'true'
- return 'false'
-
- #-------------------validation for parent sales person cannot be his child node-------------
- #ON EDIT
- def val_prt(self,r):
- res = sql("select name from `tab%s` where is_group = 'Yes' and docstatus!= 2 and (rgt > %s or lft < %s) and name ='%s' and name !='%s'"%(r['node_title'],r['rgt'],r['lft'],r['parent_nm'],r['nm']))
-
- if not res:
- msgprint("Please enter parent %s."%(r['node_title']))
- return 'true'
- return 'false'
-
- #--------if current record has set as default record then not allowed to changed 'has child node' to 'yes'--------------------
- #--------------------------------------------------------
- #ON EDIT
- def group_changed(self,r):
-
- if r['node_title'] != 'Sales Person' and r['is_group'] == 'Yes':
- field = 'default_'+r['node_title'].lower().replace(' ','_')
- res = sql("select value from `tabSingles` where field = '%s' and value = '%s'"%(field,r['nm']))
- if res:
- msgprint("'%s' record is set as default record in Global Defaults.'Has Child Node' field cannot be changed to 'Yes' as only leaf nodes are allowed in transaction."%(r['nm']))
- return 'true'
-
- return 'false'
- #-------------------validation - record is already exist--------------------------------
- #ON CREATE
- def trash_rcd(self,r):
- res = sql("select name from `tab%s` where name = '%s' and docstatus = 2"%(r['node_title'],r['nm']))
- if res:
- msgprint("'%s' record is trashed. To untrash please go to Setup & click on Trash."%(r['nm']))
- return 'true'
-
- return 'false'
-
- #----------------------------------------------------------------
- #ON CREATE
- def duplicate_rcd(self,r):
- res = sql("select name from `tab%s` where name = '%s' and docstatus != 2"%(r['node_title'],r['nm']))
- if res:
- msgprint("'%s' record is already exist."%(r['nm']))
- return 'true'
- return 'false'
diff --git a/setup/doctype/sales_browser_control/sales_browser_control.txt b/setup/doctype/sales_browser_control/sales_browser_control.txt
deleted file mode 100644
index 6083a31..0000000
--- a/setup/doctype/sales_browser_control/sales_browser_control.txt
+++ /dev/null
@@ -1,21 +0,0 @@
-[
- {
- "creation": "2012-03-27 14:36:23",
- "docstatus": 0,
- "modified": "2012-03-27 14:36:23",
- "modified_by": "Administrator",
- "owner": "Administrator"
- },
- {
- "doctype": "DocType",
- "issingle": 1,
- "module": "Setup",
- "name": "__common__",
- "section_style": "Simple",
- "version": 159
- },
- {
- "doctype": "DocType",
- "name": "Sales Browser Control"
- }
-]
\ No newline at end of file
diff --git a/setup/doctype/sales_email_settings/README.md b/setup/doctype/sales_email_settings/README.md
new file mode 100644
index 0000000..8d7d48f
--- /dev/null
+++ b/setup/doctype/sales_email_settings/README.md
@@ -0,0 +1 @@
+Settings for creating new Communication, Leads from sales inbox like "sales@example.com" via POP3.
\ No newline at end of file
diff --git a/setup/doctype/sales_partner/README.md b/setup/doctype/sales_partner/README.md
new file mode 100644
index 0000000..e285419
--- /dev/null
+++ b/setup/doctype/sales_partner/README.md
@@ -0,0 +1 @@
+Partner / dealer / distributor who sells products (maybe for commission) and for whom targets can be set.
\ No newline at end of file
diff --git a/setup/doctype/sales_partner/sales_partner.py b/setup/doctype/sales_partner/sales_partner.py
index f629bff..285d3a9 100644
--- a/setup/doctype/sales_partner/sales_partner.py
+++ b/setup/doctype/sales_partner/sales_partner.py
@@ -42,9 +42,6 @@
if self.doc.fields[d]:
comp_address += self.doc.fields[d] + "\n"
self.doc.address = comp_address
-
- def check_state(self):
- return "\n" + "\n".join([i[0] for i in sql("select state_name from `tabState` where `tabState`.country='%s' " % self.doc.country)])
def get_contacts(self,nm):
if nm:
diff --git a/setup/doctype/sales_person/README.md b/setup/doctype/sales_person/README.md
new file mode 100644
index 0000000..de5137d
--- /dev/null
+++ b/setup/doctype/sales_person/README.md
@@ -0,0 +1 @@
+Sales User for whom sales targets can be set.
\ No newline at end of file
diff --git a/setup/doctype/series_detail/__init__.py b/setup/doctype/series_detail/__init__.py
deleted file mode 100644
index baffc48..0000000
--- a/setup/doctype/series_detail/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-from __future__ import unicode_literals
diff --git a/setup/doctype/series_detail/locale/_messages_doc.json b/setup/doctype/series_detail/locale/_messages_doc.json
deleted file mode 100644
index 72f4cd3..0000000
--- a/setup/doctype/series_detail/locale/_messages_doc.json
+++ /dev/null
@@ -1,6 +0,0 @@
-[
- "Series",
- "Setup",
- "Remove",
- "Series Detail"
-]
\ No newline at end of file
diff --git a/setup/doctype/series_detail/locale/ar-doc.json b/setup/doctype/series_detail/locale/ar-doc.json
deleted file mode 100644
index 24d3bf7..0000000
--- a/setup/doctype/series_detail/locale/ar-doc.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "Remove": "\u0646\u0632\u0639",
- "Series": "\u0633\u0644\u0633\u0644\u0629",
- "Series Detail": "\u0633\u0644\u0633\u0644\u0629 \u0627\u0644\u062a\u0641\u0627\u0635\u064a\u0644",
- "Setup": "\u0627\u0644\u0625\u0639\u062f\u0627\u062f"
-}
\ No newline at end of file
diff --git a/setup/doctype/series_detail/locale/de-doc.json b/setup/doctype/series_detail/locale/de-doc.json
deleted file mode 100644
index df28f51..0000000
--- a/setup/doctype/series_detail/locale/de-doc.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "Remove": "Entfernen",
- "Series": "Serie",
- "Series Detail": "Series Detailansicht",
- "Setup": "Setup"
-}
\ No newline at end of file
diff --git a/setup/doctype/series_detail/locale/es-doc.json b/setup/doctype/series_detail/locale/es-doc.json
deleted file mode 100644
index 190d029..0000000
--- a/setup/doctype/series_detail/locale/es-doc.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "Remove": "Quitar",
- "Series": "Serie",
- "Series Detail": "Serie Detalle",
- "Setup": "Disposici\u00f3n"
-}
\ No newline at end of file
diff --git a/setup/doctype/series_detail/locale/fr-doc.json b/setup/doctype/series_detail/locale/fr-doc.json
deleted file mode 100644
index 6d9b9ab..0000000
--- a/setup/doctype/series_detail/locale/fr-doc.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "Remove": "Enlever",
- "Series": "S\u00e9rie",
- "Series Detail": "D\u00e9tail Series",
- "Setup": "Installation"
-}
\ No newline at end of file
diff --git a/setup/doctype/series_detail/locale/hi-doc.json b/setup/doctype/series_detail/locale/hi-doc.json
deleted file mode 100644
index f2dd867..0000000
--- a/setup/doctype/series_detail/locale/hi-doc.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "Remove": "\u0939\u091f\u093e\u0928\u093e",
- "Series": "\u0915\u0908",
- "Series Detail": "\u0938\u0940\u0930\u0940\u091c \u0935\u093f\u0938\u094d\u0924\u093e\u0930",
- "Setup": "\u0935\u094d\u092f\u0935\u0938\u094d\u0925\u093e"
-}
\ No newline at end of file
diff --git a/setup/doctype/series_detail/locale/hr-doc.json b/setup/doctype/series_detail/locale/hr-doc.json
deleted file mode 100644
index 6255275..0000000
--- a/setup/doctype/series_detail/locale/hr-doc.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "Remove": "Ukloniti",
- "Series": "Serija",
- "Series Detail": "Serija Detalj",
- "Setup": "Postavljanje"
-}
\ No newline at end of file
diff --git a/setup/doctype/series_detail/locale/nl-doc.json b/setup/doctype/series_detail/locale/nl-doc.json
deleted file mode 100644
index 5cefe10..0000000
--- a/setup/doctype/series_detail/locale/nl-doc.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "Remove": "Verwijderen",
- "Series": "Serie",
- "Series Detail": "Series Detail",
- "Setup": "Setup"
-}
\ No newline at end of file
diff --git a/setup/doctype/series_detail/locale/pt-BR-doc.json b/setup/doctype/series_detail/locale/pt-BR-doc.json
deleted file mode 100644
index dca7014..0000000
--- a/setup/doctype/series_detail/locale/pt-BR-doc.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "Remove": "Remover",
- "Series": "S\u00e9ries",
- "Series Detail": "Detalhe da S\u00e9ries",
- "Setup": "Configura\u00e7\u00e3o"
-}
\ No newline at end of file
diff --git a/setup/doctype/series_detail/locale/pt-doc.json b/setup/doctype/series_detail/locale/pt-doc.json
deleted file mode 100644
index a1112ad..0000000
--- a/setup/doctype/series_detail/locale/pt-doc.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "Remove": "Remover",
- "Series": "S\u00e9rie",
- "Series Detail": "Detalhe s\u00e9rie",
- "Setup": "Instala\u00e7\u00e3o"
-}
\ No newline at end of file
diff --git a/setup/doctype/series_detail/locale/sr-doc.json b/setup/doctype/series_detail/locale/sr-doc.json
deleted file mode 100644
index 1e91d35..0000000
--- a/setup/doctype/series_detail/locale/sr-doc.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "Remove": "\u0423\u043a\u043b\u043e\u043d\u0438\u0442\u0438",
- "Series": "\u0421\u0435\u0440\u0438\u0458\u0430",
- "Series Detail": "\u0421\u0435\u0440\u0438\u0458\u0430 \u0414\u0435\u0442\u0430\u0459",
- "Setup": "\u041d\u0430\u043c\u0435\u0448\u0442\u0430\u0459\u043a\u0430"
-}
\ No newline at end of file
diff --git a/setup/doctype/series_detail/locale/ta-doc.json b/setup/doctype/series_detail/locale/ta-doc.json
deleted file mode 100644
index c3ec05f..0000000
--- a/setup/doctype/series_detail/locale/ta-doc.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "Remove": "\u0ba8\u0bc0\u0b95\u0bcd\u0b95\u0bc1",
- "Series": "\u0ba4\u0bc6\u0bbe\u0b9f\u0bb0\u0bcd",
- "Series Detail": "\u0ba4\u0bc6\u0bbe\u0b9f\u0bb0\u0bcd \u0bb5\u0bbf\u0bb0\u0bbf\u0bb5\u0bbe\u0b95",
- "Setup": "\u0b85\u0bae\u0bc8\u0baa\u0bcd\u0baa\u0bc1 \u0bae\u0bc1\u0bb1\u0bc8"
-}
\ No newline at end of file
diff --git a/setup/doctype/series_detail/locale/th-doc.json b/setup/doctype/series_detail/locale/th-doc.json
deleted file mode 100644
index 4974555..0000000
--- a/setup/doctype/series_detail/locale/th-doc.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "Remove": "\u0e16\u0e2d\u0e14",
- "Series": "\u0e0a\u0e38\u0e14",
- "Series Detail": "\u0e23\u0e32\u0e22\u0e25\u0e30\u0e40\u0e2d\u0e35\u0e22\u0e14\u0e0a\u0e38\u0e14",
- "Setup": "\u0e01\u0e32\u0e23\u0e15\u0e34\u0e14\u0e15\u0e31\u0e49\u0e07"
-}
\ No newline at end of file
diff --git a/setup/doctype/series_detail/series_detail.py b/setup/doctype/series_detail/series_detail.py
deleted file mode 100644
index 7f48feb..0000000
--- a/setup/doctype/series_detail/series_detail.py
+++ /dev/null
@@ -1,22 +0,0 @@
-# ERPNext - web based ERP (http://erpnext.com)
-# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-from __future__ import unicode_literals
-import webnotes
-
-class DocType:
- def __init__(self, d, dl):
- self.doc, self.doclist = d, dl
\ No newline at end of file
diff --git a/setup/doctype/series_detail/series_detail.txt b/setup/doctype/series_detail/series_detail.txt
deleted file mode 100644
index 98a5d78..0000000
--- a/setup/doctype/series_detail/series_detail.txt
+++ /dev/null
@@ -1,43 +0,0 @@
-[
- {
- "creation": "2013-02-22 01:27:57",
- "docstatus": 0,
- "modified": "2013-03-07 07:03:32",
- "modified_by": "Administrator",
- "owner": "Administrator"
- },
- {
- "doctype": "DocType",
- "istable": 1,
- "module": "Setup",
- "name": "__common__"
- },
- {
- "doctype": "DocField",
- "name": "__common__",
- "parent": "Series Detail",
- "parentfield": "fields",
- "parenttype": "DocType",
- "permlevel": 0
- },
- {
- "doctype": "DocType",
- "name": "Series Detail"
- },
- {
- "doctype": "DocField",
- "fieldname": "series",
- "fieldtype": "Read Only",
- "label": "Series",
- "oldfieldname": "series",
- "oldfieldtype": "Read Only"
- },
- {
- "doctype": "DocField",
- "fieldname": "remove",
- "fieldtype": "Check",
- "label": "Remove",
- "oldfieldname": "remove",
- "oldfieldtype": "Check"
- }
-]
\ No newline at end of file
diff --git a/setup/doctype/setup_control/README.md b/setup/doctype/setup_control/README.md
new file mode 100644
index 0000000..909fea4
--- /dev/null
+++ b/setup/doctype/setup_control/README.md
@@ -0,0 +1 @@
+Account setup utility on first login.
\ No newline at end of file
diff --git a/setup/doctype/sms_parameter/README.md b/setup/doctype/sms_parameter/README.md
new file mode 100644
index 0000000..5935a39
--- /dev/null
+++ b/setup/doctype/sms_parameter/README.md
@@ -0,0 +1 @@
+SMS query parameter for SMS Settings.
\ No newline at end of file
diff --git a/setup/doctype/sms_settings/README.md b/setup/doctype/sms_settings/README.md
new file mode 100644
index 0000000..4fb4980
--- /dev/null
+++ b/setup/doctype/sms_settings/README.md
@@ -0,0 +1 @@
+Settings for automatically sending SMS from the system.
\ No newline at end of file
diff --git a/setup/doctype/state/__init__.py b/setup/doctype/state/__init__.py
deleted file mode 100644
index baffc48..0000000
--- a/setup/doctype/state/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-from __future__ import unicode_literals
diff --git a/setup/doctype/state/locale/_messages_doc.json b/setup/doctype/state/locale/_messages_doc.json
deleted file mode 100644
index d6beca2..0000000
--- a/setup/doctype/state/locale/_messages_doc.json
+++ /dev/null
@@ -1,6 +0,0 @@
-[
- "Country",
- "Setup",
- "State",
- "State Name"
-]
\ No newline at end of file
diff --git a/setup/doctype/state/locale/ar-doc.json b/setup/doctype/state/locale/ar-doc.json
deleted file mode 100644
index 34b18e2..0000000
--- a/setup/doctype/state/locale/ar-doc.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "Country": "\u0628\u0644\u062f",
- "Setup": "\u0627\u0644\u0625\u0639\u062f\u0627\u062f",
- "State": "\u062f\u0648\u0644\u0629",
- "State Name": "\u0627\u0633\u0645 \u0648\u0644\u0627\u064a\u0629"
-}
\ No newline at end of file
diff --git a/setup/doctype/state/locale/de-doc.json b/setup/doctype/state/locale/de-doc.json
deleted file mode 100644
index 63f1a81..0000000
--- a/setup/doctype/state/locale/de-doc.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "Country": "Land",
- "Setup": "Setup",
- "State": "Zustand",
- "State Name": "State Name"
-}
\ No newline at end of file
diff --git a/setup/doctype/state/locale/es-doc.json b/setup/doctype/state/locale/es-doc.json
deleted file mode 100644
index 5b417bd..0000000
--- a/setup/doctype/state/locale/es-doc.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "Country": "Pa\u00eds",
- "Setup": "Disposici\u00f3n",
- "State": "Estado",
- "State Name": "Estado Nombre"
-}
\ No newline at end of file
diff --git a/setup/doctype/state/locale/fr-doc.json b/setup/doctype/state/locale/fr-doc.json
deleted file mode 100644
index 1619e32..0000000
--- a/setup/doctype/state/locale/fr-doc.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "Country": "Pays",
- "Setup": "Installation",
- "State": "\u00c9tat",
- "State Name": "Nom de l'\u00c9tat"
-}
\ No newline at end of file
diff --git a/setup/doctype/state/locale/hi-doc.json b/setup/doctype/state/locale/hi-doc.json
deleted file mode 100644
index cf74666..0000000
--- a/setup/doctype/state/locale/hi-doc.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "Country": "\u0926\u0947\u0936",
- "Setup": "\u0935\u094d\u092f\u0935\u0938\u094d\u0925\u093e",
- "State": "\u0930\u093e\u091c\u094d\u092f",
- "State Name": "\u0930\u093e\u091c\u094d\u092f \u0915\u093e \u0928\u093e\u092e"
-}
\ No newline at end of file
diff --git a/setup/doctype/state/locale/hr-doc.json b/setup/doctype/state/locale/hr-doc.json
deleted file mode 100644
index 30e6e84..0000000
--- a/setup/doctype/state/locale/hr-doc.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "Country": "Zemlja",
- "Setup": "Postavljanje",
- "State": "Dr\u017eava",
- "State Name": "Dr\u017eava Ime"
-}
\ No newline at end of file
diff --git a/setup/doctype/state/locale/nl-doc.json b/setup/doctype/state/locale/nl-doc.json
deleted file mode 100644
index ee4fa32..0000000
--- a/setup/doctype/state/locale/nl-doc.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "Country": "Land",
- "Setup": "Setup",
- "State": "Staat",
- "State Name": "Staat Naam"
-}
\ No newline at end of file
diff --git a/setup/doctype/state/locale/pt-BR-doc.json b/setup/doctype/state/locale/pt-BR-doc.json
deleted file mode 100644
index 7c8fa8f..0000000
--- a/setup/doctype/state/locale/pt-BR-doc.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "Country": "Pa\u00eds",
- "Setup": "Configura\u00e7\u00e3o",
- "State": "Estado",
- "State Name": "Nome do Estado"
-}
\ No newline at end of file
diff --git a/setup/doctype/state/locale/pt-doc.json b/setup/doctype/state/locale/pt-doc.json
deleted file mode 100644
index 4c56ab4..0000000
--- a/setup/doctype/state/locale/pt-doc.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "Country": "Pa\u00eds",
- "Setup": "Instala\u00e7\u00e3o",
- "State": "Estado",
- "State Name": "Nome Estado"
-}
\ No newline at end of file
diff --git a/setup/doctype/state/locale/sr-doc.json b/setup/doctype/state/locale/sr-doc.json
deleted file mode 100644
index 3302a14..0000000
--- a/setup/doctype/state/locale/sr-doc.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "Country": "\u0417\u0435\u043c\u0459\u0430",
- "Setup": "\u041d\u0430\u043c\u0435\u0448\u0442\u0430\u0459\u043a\u0430",
- "State": "\u0414\u0440\u0436\u0430\u0432\u0430",
- "State Name": "\u0418\u043c\u0435 \u0434\u0440\u0436\u0430\u0432\u0435"
-}
\ No newline at end of file
diff --git a/setup/doctype/state/locale/ta-doc.json b/setup/doctype/state/locale/ta-doc.json
deleted file mode 100644
index 82d8407..0000000
--- a/setup/doctype/state/locale/ta-doc.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "Country": "\u0ba8\u0bbe\u0b9f\u0bc1",
- "Setup": "\u0b85\u0bae\u0bc8\u0baa\u0bcd\u0baa\u0bc1 \u0bae\u0bc1\u0bb1\u0bc8",
- "State": "\u0ba8\u0bbf\u0bb2\u0bc8",
- "State Name": "\u0bae\u0bbe\u0ba8\u0bbf\u0bb2 \u0baa\u0bc6\u0baf\u0bb0\u0bcd"
-}
\ No newline at end of file
diff --git a/setup/doctype/state/locale/th-doc.json b/setup/doctype/state/locale/th-doc.json
deleted file mode 100644
index d41fec9..0000000
--- a/setup/doctype/state/locale/th-doc.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "Country": "\u0e1b\u0e23\u0e30\u0e40\u0e17\u0e28",
- "Setup": "\u0e01\u0e32\u0e23\u0e15\u0e34\u0e14\u0e15\u0e31\u0e49\u0e07",
- "State": "\u0e23\u0e31\u0e10",
- "State Name": "\u0e0a\u0e37\u0e48\u0e2d\u0e23\u0e31\u0e10"
-}
\ No newline at end of file
diff --git a/setup/doctype/state/state.js b/setup/doctype/state/state.js
deleted file mode 100644
index 3cad944..0000000
--- a/setup/doctype/state/state.js
+++ /dev/null
@@ -1,26 +0,0 @@
-// ERPNext - web based ERP (http://erpnext.com)
-// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-
-
-//--------- ONLOAD -------------
-cur_frm.cscript.onload = function(doc, cdt, cdn) {
-
-}
-
-cur_frm.cscript.refresh = function(doc, cdt, cdn) {
-
-}
\ No newline at end of file
diff --git a/setup/doctype/state/state.py b/setup/doctype/state/state.py
deleted file mode 100644
index 7f48feb..0000000
--- a/setup/doctype/state/state.py
+++ /dev/null
@@ -1,22 +0,0 @@
-# ERPNext - web based ERP (http://erpnext.com)
-# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-from __future__ import unicode_literals
-import webnotes
-
-class DocType:
- def __init__(self, d, dl):
- self.doc, self.doclist = d, dl
\ No newline at end of file
diff --git a/setup/doctype/state/state.txt b/setup/doctype/state/state.txt
deleted file mode 100644
index 464622a..0000000
--- a/setup/doctype/state/state.txt
+++ /dev/null
@@ -1,78 +0,0 @@
-[
- {
- "creation": "2012-03-27 14:36:25",
- "docstatus": 0,
- "modified": "2012-03-27 14:36:25",
- "modified_by": "Administrator",
- "owner": "Administrator"
- },
- {
- "autoname": "field:state_name",
- "doctype": "DocType",
- "document_type": "Master",
- "in_create": 0,
- "module": "Setup",
- "name": "__common__",
- "read_only": 0,
- "section_style": "Simple",
- "show_in_menu": 0,
- "version": 14
- },
- {
- "doctype": "DocField",
- "name": "__common__",
- "parent": "State",
- "parentfield": "fields",
- "parenttype": "DocType",
- "permlevel": 0,
- "reqd": 1
- },
- {
- "create": 1,
- "doctype": "DocPerm",
- "name": "__common__",
- "parent": "State",
- "parentfield": "permissions",
- "parenttype": "DocType",
- "permlevel": 0,
- "read": 1,
- "report": 1,
- "write": 1
- },
- {
- "doctype": "DocType",
- "name": "State"
- },
- {
- "doctype": "DocPerm",
- "role": "System Manager"
- },
- {
- "amend": 0,
- "cancel": 0,
- "doctype": "DocPerm",
- "role": "Sales Master Manager",
- "submit": 0
- },
- {
- "doctype": "DocPerm",
- "role": "Purchase Master Manager"
- },
- {
- "doctype": "DocField",
- "fieldname": "state_name",
- "fieldtype": "Data",
- "label": "State Name",
- "oldfieldname": "state_name",
- "oldfieldtype": "Data"
- },
- {
- "doctype": "DocField",
- "fieldname": "country",
- "fieldtype": "Select",
- "label": "Country",
- "oldfieldname": "country",
- "oldfieldtype": "Select",
- "options": "link:Country"
- }
-]
\ No newline at end of file
diff --git a/setup/doctype/supplier_type/README.md b/setup/doctype/supplier_type/README.md
new file mode 100644
index 0000000..0da4c70
--- /dev/null
+++ b/setup/doctype/supplier_type/README.md
@@ -0,0 +1 @@
+Supplier classification.
\ No newline at end of file
diff --git a/setup/doctype/target_detail/README.md b/setup/doctype/target_detail/README.md
new file mode 100644
index 0000000..bcd62c2
--- /dev/null
+++ b/setup/doctype/target_detail/README.md
@@ -0,0 +1 @@
+Target set for Sales Person, Territory or Sales Partner.
\ No newline at end of file
diff --git a/setup/doctype/terms_and_conditions/README.md b/setup/doctype/terms_and_conditions/README.md
new file mode 100644
index 0000000..418d0b3
--- /dev/null
+++ b/setup/doctype/terms_and_conditions/README.md
@@ -0,0 +1 @@
+Order / Contract terms that can be attached to any sale or purchase transaction.
\ No newline at end of file
diff --git a/setup/doctype/territory/README.md b/setup/doctype/territory/README.md
new file mode 100644
index 0000000..041d59b
--- /dev/null
+++ b/setup/doctype/territory/README.md
@@ -0,0 +1 @@
+Territory against with any sale can be tagged and targets can be set.
\ No newline at end of file
diff --git a/setup/doctype/uom/README.md b/setup/doctype/uom/README.md
new file mode 100644
index 0000000..c6fd68a
--- /dev/null
+++ b/setup/doctype/uom/README.md
@@ -0,0 +1 @@
+Unit of Measure (UoM) of an Item.
\ No newline at end of file
diff --git a/setup/doctype/warehouse_type/README.md b/setup/doctype/warehouse_type/README.md
new file mode 100644
index 0000000..ad065d5
--- /dev/null
+++ b/setup/doctype/warehouse_type/README.md
@@ -0,0 +1 @@
+Warehouse classification.
\ No newline at end of file
diff --git a/setup/doctype/workflow_action_detail/__init__.py b/setup/doctype/workflow_action_detail/__init__.py
deleted file mode 100644
index baffc48..0000000
--- a/setup/doctype/workflow_action_detail/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-from __future__ import unicode_literals
diff --git a/setup/doctype/workflow_action_detail/locale/_messages_doc.json b/setup/doctype/workflow_action_detail/locale/_messages_doc.json
deleted file mode 100644
index 6def7f1..0000000
--- a/setup/doctype/workflow_action_detail/locale/_messages_doc.json
+++ /dev/null
@@ -1,6 +0,0 @@
-[
- "Field",
- "Setup",
- "Workflow Action Detail",
- "Value"
-]
\ No newline at end of file
diff --git a/setup/doctype/workflow_action_detail/locale/ar-doc.json b/setup/doctype/workflow_action_detail/locale/ar-doc.json
deleted file mode 100644
index 660f78e..0000000
--- a/setup/doctype/workflow_action_detail/locale/ar-doc.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "Field": "\u062d\u0642\u0644",
- "Setup": "\u0627\u0644\u0625\u0639\u062f\u0627\u062f",
- "Value": "\u0642\u064a\u0645\u0629",
- "Workflow Action Detail": "\u062a\u0641\u0627\u0635\u064a\u0644 \u0633\u064a\u0631 \u0627\u0644\u0639\u0645\u0644 \u0627\u0644\u0639\u0645\u0644"
-}
\ No newline at end of file
diff --git a/setup/doctype/workflow_action_detail/locale/de-doc.json b/setup/doctype/workflow_action_detail/locale/de-doc.json
deleted file mode 100644
index 3db419a..0000000
--- a/setup/doctype/workflow_action_detail/locale/de-doc.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "Field": "Feld",
- "Setup": "Setup",
- "Value": "Wert",
- "Workflow Action Detail": "Workflow-Aktion Details"
-}
\ No newline at end of file
diff --git a/setup/doctype/workflow_action_detail/locale/es-doc.json b/setup/doctype/workflow_action_detail/locale/es-doc.json
deleted file mode 100644
index 90c1ae5..0000000
--- a/setup/doctype/workflow_action_detail/locale/es-doc.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "Field": "Campo",
- "Setup": "Disposici\u00f3n",
- "Value": "Valor",
- "Workflow Action Detail": "Detalle de Acci\u00f3n de flujo de trabajo"
-}
\ No newline at end of file
diff --git a/setup/doctype/workflow_action_detail/locale/fr-doc.json b/setup/doctype/workflow_action_detail/locale/fr-doc.json
deleted file mode 100644
index 4aa39e4..0000000
--- a/setup/doctype/workflow_action_detail/locale/fr-doc.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "Field": "Champ",
- "Setup": "Installation",
- "Value": "Valeur",
- "Workflow Action Detail": "D\u00e9tail d'action de workflow"
-}
\ No newline at end of file
diff --git a/setup/doctype/workflow_action_detail/locale/hi-doc.json b/setup/doctype/workflow_action_detail/locale/hi-doc.json
deleted file mode 100644
index bd5487d..0000000
--- a/setup/doctype/workflow_action_detail/locale/hi-doc.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "Field": "\u0915\u094d\u0937\u0947\u0924\u094d\u0930",
- "Setup": "\u0935\u094d\u092f\u0935\u0938\u094d\u0925\u093e",
- "Value": "\u092e\u0942\u0932\u094d\u092f",
- "Workflow Action Detail": "\u0935\u0930\u094d\u0915\u092b\u093c\u094d\u0932\u094b \u0915\u093e\u0930\u094d\u0930\u0935\u093e\u0908 \u0935\u093f\u0938\u094d\u0924\u093e\u0930"
-}
\ No newline at end of file
diff --git a/setup/doctype/workflow_action_detail/locale/hr-doc.json b/setup/doctype/workflow_action_detail/locale/hr-doc.json
deleted file mode 100644
index 75df7b7..0000000
--- a/setup/doctype/workflow_action_detail/locale/hr-doc.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "Field": "Polje",
- "Setup": "Postavljanje",
- "Value": "Vrijednost",
- "Workflow Action Detail": "Workflow Akcija Detalj"
-}
\ No newline at end of file
diff --git a/setup/doctype/workflow_action_detail/locale/nl-doc.json b/setup/doctype/workflow_action_detail/locale/nl-doc.json
deleted file mode 100644
index 4c51a38..0000000
--- a/setup/doctype/workflow_action_detail/locale/nl-doc.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "Field": "Veld",
- "Setup": "Setup",
- "Value": "Waarde",
- "Workflow Action Detail": "Workflow Actie Detail"
-}
\ No newline at end of file
diff --git a/setup/doctype/workflow_action_detail/locale/pt-BR-doc.json b/setup/doctype/workflow_action_detail/locale/pt-BR-doc.json
deleted file mode 100644
index 187f25f..0000000
--- a/setup/doctype/workflow_action_detail/locale/pt-BR-doc.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "Field": "Campo",
- "Setup": "Configura\u00e7\u00e3o",
- "Value": "Valor",
- "Workflow Action Detail": "Detalhe da A\u00e7\u00e3o do Fluxo de Trabalho"
-}
\ No newline at end of file
diff --git a/setup/doctype/workflow_action_detail/locale/pt-doc.json b/setup/doctype/workflow_action_detail/locale/pt-doc.json
deleted file mode 100644
index 22289ff..0000000
--- a/setup/doctype/workflow_action_detail/locale/pt-doc.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "Field": "Campo",
- "Setup": "Instala\u00e7\u00e3o",
- "Value": "Valor",
- "Workflow Action Detail": "Detalhe A\u00e7\u00e3o de fluxo de trabalho"
-}
\ No newline at end of file
diff --git a/setup/doctype/workflow_action_detail/locale/sr-doc.json b/setup/doctype/workflow_action_detail/locale/sr-doc.json
deleted file mode 100644
index d1c31d9..0000000
--- a/setup/doctype/workflow_action_detail/locale/sr-doc.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "Field": "\u041f\u043e\u0459\u0435",
- "Setup": "\u041d\u0430\u043c\u0435\u0448\u0442\u0430\u0459\u043a\u0430",
- "Value": "\u0412\u0440\u0435\u0434\u043d\u043e\u0441\u0442",
- "Workflow Action Detail": "\u0412\u043e\u0440\u043a\u0444\u043b\u043e\u0432 \u0410\u043a\u0446\u0438\u0458\u0430 \u0414\u0435\u0442\u0430\u0459"
-}
\ No newline at end of file
diff --git a/setup/doctype/workflow_action_detail/locale/ta-doc.json b/setup/doctype/workflow_action_detail/locale/ta-doc.json
deleted file mode 100644
index 20e5eae..0000000
--- a/setup/doctype/workflow_action_detail/locale/ta-doc.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "Field": "\u0baa\u0bc1\u0bb2\u0bae\u0bcd",
- "Setup": "\u0b85\u0bae\u0bc8\u0baa\u0bcd\u0baa\u0bc1 \u0bae\u0bc1\u0bb1\u0bc8",
- "Value": "\u0bae\u0ba4\u0bbf\u0baa\u0bcd\u0baa\u0bc1",
- "Workflow Action Detail": "\u0baa\u0ba3\u0bbf\u0baf\u0bc7\u0bbe\u0b9f\u0bcd\u0b9f\u0bae\u0bcd \u0b85\u0ba4\u0bbf\u0bb0\u0b9f\u0bbf \u0bb5\u0bbf\u0bb0\u0bbf\u0bb5\u0bbe\u0b95"
-}
\ No newline at end of file
diff --git a/setup/doctype/workflow_action_detail/locale/th-doc.json b/setup/doctype/workflow_action_detail/locale/th-doc.json
deleted file mode 100644
index 3727115..0000000
--- a/setup/doctype/workflow_action_detail/locale/th-doc.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "Field": "\u0e2a\u0e19\u0e32\u0e21",
- "Setup": "\u0e01\u0e32\u0e23\u0e15\u0e34\u0e14\u0e15\u0e31\u0e49\u0e07",
- "Value": "\u0e21\u0e39\u0e25\u0e04\u0e48\u0e32",
- "Workflow Action Detail": "\u0e23\u0e32\u0e22\u0e25\u0e30\u0e40\u0e2d\u0e35\u0e22\u0e14\u0e01\u0e32\u0e23\u0e14\u0e33\u0e40\u0e19\u0e34\u0e19\u0e01\u0e32\u0e23\u0e02\u0e31\u0e49\u0e19\u0e15\u0e2d\u0e19\u0e01\u0e32\u0e23\u0e17\u0e33\u0e07\u0e32\u0e19"
-}
\ No newline at end of file
diff --git a/setup/doctype/workflow_action_detail/workflow_action_detail.py b/setup/doctype/workflow_action_detail/workflow_action_detail.py
deleted file mode 100644
index 7f48feb..0000000
--- a/setup/doctype/workflow_action_detail/workflow_action_detail.py
+++ /dev/null
@@ -1,22 +0,0 @@
-# ERPNext - web based ERP (http://erpnext.com)
-# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-from __future__ import unicode_literals
-import webnotes
-
-class DocType:
- def __init__(self, d, dl):
- self.doc, self.doclist = d, dl
\ No newline at end of file
diff --git a/setup/doctype/workflow_action_detail/workflow_action_detail.txt b/setup/doctype/workflow_action_detail/workflow_action_detail.txt
deleted file mode 100644
index 7393882..0000000
--- a/setup/doctype/workflow_action_detail/workflow_action_detail.txt
+++ /dev/null
@@ -1,45 +0,0 @@
-[
- {
- "creation": "2013-02-22 01:27:59",
- "docstatus": 0,
- "modified": "2013-03-07 07:03:34",
- "modified_by": "Administrator",
- "owner": "swarnalata@webnotestech.com"
- },
- {
- "doctype": "DocType",
- "istable": 1,
- "module": "Setup",
- "name": "__common__"
- },
- {
- "doctype": "DocField",
- "name": "__common__",
- "parent": "Workflow Action Detail",
- "parentfield": "fields",
- "parenttype": "DocType",
- "permlevel": 0,
- "print_width": "200px",
- "width": "200px"
- },
- {
- "doctype": "DocType",
- "name": "Workflow Action Detail"
- },
- {
- "doctype": "DocField",
- "fieldname": "action_field",
- "fieldtype": "Select",
- "label": "Field",
- "oldfieldname": "action_field",
- "oldfieldtype": "Select"
- },
- {
- "doctype": "DocField",
- "fieldname": "action_value",
- "fieldtype": "Data",
- "label": "Value",
- "oldfieldname": "action_value",
- "oldfieldtype": "Data"
- }
-]
\ No newline at end of file
diff --git a/setup/doctype/workflow_engine/__init__.py b/setup/doctype/workflow_engine/__init__.py
deleted file mode 100644
index baffc48..0000000
--- a/setup/doctype/workflow_engine/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-from __future__ import unicode_literals
diff --git a/setup/doctype/workflow_engine/locale/_messages_doc.json b/setup/doctype/workflow_engine/locale/_messages_doc.json
deleted file mode 100644
index f03ed6a..0000000
--- a/setup/doctype/workflow_engine/locale/_messages_doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-[
- "Setup",
- "Workflow Engine"
-]
\ No newline at end of file
diff --git a/setup/doctype/workflow_engine/locale/ar-doc.json b/setup/doctype/workflow_engine/locale/ar-doc.json
deleted file mode 100644
index 21219e8..0000000
--- a/setup/doctype/workflow_engine/locale/ar-doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "Setup": "\u0627\u0644\u0625\u0639\u062f\u0627\u062f",
- "Workflow Engine": "\u0633\u064a\u0631 \u0627\u0644\u0639\u0645\u0644 \u0627\u0644\u0645\u062d\u0631\u0643"
-}
\ No newline at end of file
diff --git a/setup/doctype/workflow_engine/locale/de-doc.json b/setup/doctype/workflow_engine/locale/de-doc.json
deleted file mode 100644
index 312ccf5..0000000
--- a/setup/doctype/workflow_engine/locale/de-doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "Setup": "Setup",
- "Workflow Engine": "Workflow Engine"
-}
\ No newline at end of file
diff --git a/setup/doctype/workflow_engine/locale/es-doc.json b/setup/doctype/workflow_engine/locale/es-doc.json
deleted file mode 100644
index 30c9089..0000000
--- a/setup/doctype/workflow_engine/locale/es-doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "Setup": "Disposici\u00f3n",
- "Workflow Engine": "Workflow Engine"
-}
\ No newline at end of file
diff --git a/setup/doctype/workflow_engine/locale/fr-doc.json b/setup/doctype/workflow_engine/locale/fr-doc.json
deleted file mode 100644
index 2c15fd6..0000000
--- a/setup/doctype/workflow_engine/locale/fr-doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "Setup": "Installation",
- "Workflow Engine": "Workflow Engine"
-}
\ No newline at end of file
diff --git a/setup/doctype/workflow_engine/locale/hi-doc.json b/setup/doctype/workflow_engine/locale/hi-doc.json
deleted file mode 100644
index f207e7a..0000000
--- a/setup/doctype/workflow_engine/locale/hi-doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "Setup": "\u0935\u094d\u092f\u0935\u0938\u094d\u0925\u093e",
- "Workflow Engine": "\u0915\u093e\u0930\u094d\u092f\u092a\u094d\u0930\u0935\u093e\u0939 \u0907\u0902\u091c\u0928"
-}
\ No newline at end of file
diff --git a/setup/doctype/workflow_engine/locale/hr-doc.json b/setup/doctype/workflow_engine/locale/hr-doc.json
deleted file mode 100644
index 3003627..0000000
--- a/setup/doctype/workflow_engine/locale/hr-doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "Setup": "Postavljanje",
- "Workflow Engine": "Workflow motora"
-}
\ No newline at end of file
diff --git a/setup/doctype/workflow_engine/locale/nl-doc.json b/setup/doctype/workflow_engine/locale/nl-doc.json
deleted file mode 100644
index 312ccf5..0000000
--- a/setup/doctype/workflow_engine/locale/nl-doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "Setup": "Setup",
- "Workflow Engine": "Workflow Engine"
-}
\ No newline at end of file
diff --git a/setup/doctype/workflow_engine/locale/pt-BR-doc.json b/setup/doctype/workflow_engine/locale/pt-BR-doc.json
deleted file mode 100644
index 06298de..0000000
--- a/setup/doctype/workflow_engine/locale/pt-BR-doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "Setup": "Configura\u00e7\u00e3o",
- "Workflow Engine": "Mecanismo do Fluxo de Trabalho"
-}
\ No newline at end of file
diff --git a/setup/doctype/workflow_engine/locale/pt-doc.json b/setup/doctype/workflow_engine/locale/pt-doc.json
deleted file mode 100644
index e953ceb..0000000
--- a/setup/doctype/workflow_engine/locale/pt-doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "Setup": "Instala\u00e7\u00e3o",
- "Workflow Engine": "Workflow Engine"
-}
\ No newline at end of file
diff --git a/setup/doctype/workflow_engine/locale/sr-doc.json b/setup/doctype/workflow_engine/locale/sr-doc.json
deleted file mode 100644
index 11b4a1c..0000000
--- a/setup/doctype/workflow_engine/locale/sr-doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "Setup": "\u041d\u0430\u043c\u0435\u0448\u0442\u0430\u0459\u043a\u0430",
- "Workflow Engine": "\u0412\u043e\u0440\u043a\u0444\u043b\u043e\u0432 \u0415\u043d\u0433\u0438\u043d\u0435"
-}
\ No newline at end of file
diff --git a/setup/doctype/workflow_engine/locale/ta-doc.json b/setup/doctype/workflow_engine/locale/ta-doc.json
deleted file mode 100644
index f9dfc8c..0000000
--- a/setup/doctype/workflow_engine/locale/ta-doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "Setup": "\u0b85\u0bae\u0bc8\u0baa\u0bcd\u0baa\u0bc1 \u0bae\u0bc1\u0bb1\u0bc8",
- "Workflow Engine": "\u0baa\u0ba3\u0bbf\u0baf\u0bc7\u0bbe\u0b9f\u0bcd\u0b9f\u0bae\u0bcd \u0b8e\u0b9e\u0bcd\u0b9a\u0bbf\u0ba9\u0bcd"
-}
\ No newline at end of file
diff --git a/setup/doctype/workflow_engine/locale/th-doc.json b/setup/doctype/workflow_engine/locale/th-doc.json
deleted file mode 100644
index 95a2e52..0000000
--- a/setup/doctype/workflow_engine/locale/th-doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "Setup": "\u0e01\u0e32\u0e23\u0e15\u0e34\u0e14\u0e15\u0e31\u0e49\u0e07",
- "Workflow Engine": "\u0e40\u0e04\u0e23\u0e37\u0e48\u0e2d\u0e07\u0e22\u0e19\u0e15\u0e4c\u0e40\u0e27\u0e34\u0e23\u0e4c\u0e01\u0e42\u0e1f\u0e25\u0e27\u0e4c"
-}
\ No newline at end of file
diff --git a/setup/doctype/workflow_engine/workflow_engine.py b/setup/doctype/workflow_engine/workflow_engine.py
deleted file mode 100644
index 693027a..0000000
--- a/setup/doctype/workflow_engine/workflow_engine.py
+++ /dev/null
@@ -1,56 +0,0 @@
-# ERPNext - web based ERP (http://erpnext.com)
-# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-from __future__ import unicode_literals
-import webnotes
-
-from webnotes.model import db_exists
-from webnotes.model.bean import getlist, copy_doclist
-from webnotes.model.code import get_obj
-from webnotes import form, msgprint
-
-sql = webnotes.conn.sql
-
-
-
-class DocType:
- def __init__(self, doc, doclist=[]):
- self.doc, self.doclist = doc, doclist
-
-
- def apply_rule(self,form_obj):
- #msgprint("hello")
- rule_list = sql("select rule_name from `tabWorkflow Rule` where select_form = '%s' and rule_status='Active' order by rule_priority asc" % (form_obj.doc.doctype))
- for rl in rule_list:
- #msgprint(rl[0])
- autho_obj=get_obj("Workflow Rule",rl[0],with_children=1)
- cond_hold = autho_obj.evalute_rule(form_obj)
- #msgprint("cond_hold:" + cond_hold)
- if cond_hold =='Yes':
- self.apply_action(rl[0],form_obj)
- return
-
-
- #if rule holds true then the following action will be taken
- def apply_action(self,rule_no,form_obj):
- rule_obj=get_obj('Workflow Rule',rule_no,with_children=1)
- #msgprint("action")
- for d in getlist(rule_obj.doclist,'workflow_action_details'):
- field_name=sql("select fieldname from tabDocField where parent='%s' and label='%s'" %(form_obj.doc.doctype,d.action_field))[0][0]
- if field_name:
- #msgprint(field_name)
- form_obj.doc.fields[field_name] = d.action_value
- return
\ No newline at end of file
diff --git a/setup/doctype/workflow_engine/workflow_engine.txt b/setup/doctype/workflow_engine/workflow_engine.txt
deleted file mode 100644
index 7103bbf..0000000
--- a/setup/doctype/workflow_engine/workflow_engine.txt
+++ /dev/null
@@ -1,22 +0,0 @@
-[
- {
- "creation": "2012-03-27 14:36:26",
- "docstatus": 0,
- "modified": "2012-03-27 14:36:26",
- "modified_by": "Administrator",
- "owner": "swarnalata@webnotestech.com"
- },
- {
- "doctype": "DocType",
- "issingle": 1,
- "module": "Setup",
- "name": "__common__",
- "section_style": "Simple",
- "show_in_menu": 0,
- "version": 4
- },
- {
- "doctype": "DocType",
- "name": "Workflow Engine"
- }
-]
\ No newline at end of file
diff --git a/setup/doctype/workflow_rule/__init__.py b/setup/doctype/workflow_rule/__init__.py
deleted file mode 100644
index baffc48..0000000
--- a/setup/doctype/workflow_rule/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-from __future__ import unicode_literals
diff --git a/setup/doctype/workflow_rule/locale/_messages_doc.json b/setup/doctype/workflow_rule/locale/_messages_doc.json
deleted file mode 100644
index 191f168..0000000
--- a/setup/doctype/workflow_rule/locale/_messages_doc.json
+++ /dev/null
@@ -1,23 +0,0 @@
-[
- "Extra Condition",
- "No",
- "Select Form",
- "Intro HTML",
- "Raise Exception",
- "Action Detail",
- "Workflow Action Details",
- "Define Rule",
- "Active",
- "Setup",
- "Enter message",
- "Reject HTML",
- "Rule Definition",
- "Yes",
- "Rule Name",
- "Rule Priority",
- "Inactive",
- "Rule Status",
- "Action html",
- "Workflow Rule Details",
- "Workflow Rule"
-]
\ No newline at end of file
diff --git a/setup/doctype/workflow_rule/locale/ar-doc.json b/setup/doctype/workflow_rule/locale/ar-doc.json
deleted file mode 100644
index 1219b6c..0000000
--- a/setup/doctype/workflow_rule/locale/ar-doc.json
+++ /dev/null
@@ -1,23 +0,0 @@
-{
- "Action Detail": "\u062a\u0641\u0627\u0635\u064a\u0644 \u0627\u0644\u0639\u0645\u0644",
- "Action html": "\u0639\u0645\u0644 HTML",
- "Active": "\u0646\u0634\u0637",
- "Define Rule": "\u062a\u0639\u0631\u064a\u0641 \u0627\u0644\u0642\u0627\u0639\u062f\u0629",
- "Enter message": "\u0623\u062f\u062e\u0644 \u0631\u0633\u0627\u0644\u0629",
- "Extra Condition": "\u062d\u0627\u0644\u0629 \u0625\u0636\u0627\u0641\u064a\u0629",
- "Inactive": "\u063a\u064a\u0631 \u0641\u0639\u0627\u0644",
- "Intro HTML": "\u0645\u0642\u062f\u0645\u0629 HTML",
- "No": "\u0644\u0627",
- "Raise Exception": "\u0631\u0641\u0639 \u0627\u0633\u062a\u062b\u0646\u0627\u0621",
- "Reject HTML": "\u0631\u0641\u0636 HTML",
- "Rule Definition": "\u062d\u0643\u0645 \u062a\u0639\u0631\u064a\u0641",
- "Rule Name": "\u062d\u0643\u0645 \u0627\u0633\u0645",
- "Rule Priority": "\u0642\u0627\u0639\u062f\u0629 \u0627\u0644\u0623\u0648\u0644\u0648\u064a\u0629",
- "Rule Status": "\u062d\u0643\u0645 \u0648\u0636\u0639",
- "Select Form": "\u062a\u062d\u062f\u064a\u062f \u0646\u0645\u0648\u0630\u062c",
- "Setup": "\u0627\u0644\u0625\u0639\u062f\u0627\u062f",
- "Workflow Action Details": "\u062a\u0641\u0627\u0635\u064a\u0644 \u0627\u0644\u0639\u0645\u0644 \u0633\u064a\u0631 \u0627\u0644\u0639\u0645\u0644",
- "Workflow Rule": "\u0627\u0644\u0642\u0627\u0639\u062f\u0629 \u0633\u064a\u0631 \u0627\u0644\u0639\u0645\u0644",
- "Workflow Rule Details": "\u062a\u0641\u0627\u0635\u064a\u0644 \u0627\u0644\u0642\u0627\u0639\u062f\u0629 \u0633\u064a\u0631 \u0627\u0644\u0639\u0645\u0644",
- "Yes": "\u0646\u0639\u0645"
-}
\ No newline at end of file
diff --git a/setup/doctype/workflow_rule/locale/de-doc.json b/setup/doctype/workflow_rule/locale/de-doc.json
deleted file mode 100644
index 7b58994..0000000
--- a/setup/doctype/workflow_rule/locale/de-doc.json
+++ /dev/null
@@ -1,23 +0,0 @@
-{
- "Action Detail": "Aktion Details",
- "Action html": "Aktion html",
- "Active": "Aktiv",
- "Define Rule": "Definieren Rule",
- "Enter message": "Geben Sie eine Nachricht",
- "Extra Condition": "Zus\u00e4tzliche Zustand",
- "Inactive": "Inaktiv",
- "Intro HTML": "Intro HTML",
- "No": "Auf",
- "Raise Exception": "Raise Exception",
- "Reject HTML": "Ablehnen HTML",
- "Rule Definition": "Rule Definition",
- "Rule Name": "Name der Regel",
- "Rule Priority": "Priority Rule",
- "Rule Status": "Rule-Status",
- "Select Form": "W\u00e4hlen Sie Formular",
- "Setup": "Setup",
- "Workflow Action Details": "Workflow Action Details",
- "Workflow Rule": "Workflow-Regel",
- "Workflow Rule Details": "Workflow Regeldetails",
- "Yes": "Ja"
-}
\ No newline at end of file
diff --git a/setup/doctype/workflow_rule/locale/es-doc.json b/setup/doctype/workflow_rule/locale/es-doc.json
deleted file mode 100644
index 5556932..0000000
--- a/setup/doctype/workflow_rule/locale/es-doc.json
+++ /dev/null
@@ -1,23 +0,0 @@
-{
- "Action Detail": "Acci\u00f3n Detalle",
- "Action html": "Acci\u00f3n html",
- "Active": "Activo",
- "Define Rule": "Definir regla",
- "Enter message": "Ingrese mensaje",
- "Extra Condition": "Condici\u00f3n adicional",
- "Inactive": "Inactivo",
- "Intro HTML": "Intro HTML",
- "No": "No",
- "Raise Exception": "Levante Excepci\u00f3n",
- "Reject HTML": "Rechazar HTML",
- "Rule Definition": "Definici\u00f3n de regla",
- "Rule Name": "Nombre de la regla",
- "Rule Priority": "Regla de prioridad",
- "Rule Status": "Regla Estado",
- "Select Form": "Seleccione la Forma",
- "Setup": "Disposici\u00f3n",
- "Workflow Action Details": "Detalles de flujo de trabajo de acci\u00f3n",
- "Workflow Rule": "Flujo de trabajo de la Regla",
- "Workflow Rule Details": "Datos Workflow Rule",
- "Yes": "S\u00ed"
-}
\ No newline at end of file
diff --git a/setup/doctype/workflow_rule/locale/fr-doc.json b/setup/doctype/workflow_rule/locale/fr-doc.json
deleted file mode 100644
index cb876db..0000000
--- a/setup/doctype/workflow_rule/locale/fr-doc.json
+++ /dev/null
@@ -1,23 +0,0 @@
-{
- "Action Detail": "D\u00e9tail d'action",
- "Action html": "Html action",
- "Active": "Actif",
- "Define Rule": "D\u00e9finir la r\u00e8gle",
- "Enter message": "Entrez un message",
- "Extra Condition": "Condition suppl\u00e9mentaire",
- "Inactive": "Inactif",
- "Intro HTML": "Intro HTML",
- "No": "Aucun",
- "Raise Exception": "Soulever Exception",
- "Reject HTML": "Rejeter HTML",
- "Rule Definition": "D\u00e9finition de r\u00e8gle",
- "Rule Name": "Nom de la r\u00e8gle",
- "Rule Priority": "Priorit\u00e9 de la r\u00e8gle",
- "Rule Status": "R\u00e8gle Statut",
- "Select Form": "S\u00e9lectionnez le formulaire",
- "Setup": "Installation",
- "Workflow Action Details": "D\u00e9tails des actions de flux de travail",
- "Workflow Rule": "R\u00e8gle de workflow",
- "Workflow Rule Details": "D\u00e9tails de la r\u00e8gle de workflow",
- "Yes": "Oui"
-}
\ No newline at end of file
diff --git a/setup/doctype/workflow_rule/locale/hi-doc.json b/setup/doctype/workflow_rule/locale/hi-doc.json
deleted file mode 100644
index 616089d..0000000
--- a/setup/doctype/workflow_rule/locale/hi-doc.json
+++ /dev/null
@@ -1,23 +0,0 @@
-{
- "Action Detail": "\u0932\u0921\u093c\u093e\u0908 \u0935\u093f\u0938\u094d\u0924\u093e\u0930",
- "Action html": "\u0932\u0921\u093c\u093e\u0908 html",
- "Active": "\u0938\u0915\u094d\u0930\u093f\u092f",
- "Define Rule": "\u0928\u093f\u092f\u092e \u092a\u0930\u093f\u092d\u093e\u0937\u093f\u0924",
- "Enter message": "\u0938\u0902\u0926\u0947\u0936 \u0926\u0930\u094d\u091c \u0915\u0930\u0947\u0902",
- "Extra Condition": "\u0905\u0924\u093f\u0930\u093f\u0915\u094d\u0924 \u0936\u0930\u094d\u0924",
- "Inactive": "\u0928\u093f\u0937\u094d\u0915\u094d\u0930\u093f\u092f",
- "Intro HTML": "\u092a\u0939\u091a\u093e\u0928 HTML",
- "No": "\u0928\u0939\u0940\u0902",
- "Raise Exception": "\u0905\u092a\u0935\u093e\u0926 \u0909\u0920\u093e\u090f\u0901",
- "Reject HTML": "HTML \u0915\u094b \u0905\u0938\u094d\u0935\u0940\u0915\u093e\u0930 \u0915\u0930\u0947\u0902",
- "Rule Definition": "\u0928\u093f\u092f\u092e \u092a\u0930\u093f\u092d\u093e\u0937\u093e",
- "Rule Name": "\u0928\u093f\u092f\u092e \u0915\u093e \u0928\u093e\u092e",
- "Rule Priority": "\u0928\u093f\u092f\u092e \u092a\u094d\u0930\u093e\u0925\u092e\u093f\u0915\u0924\u093e",
- "Rule Status": "\u0928\u093f\u092f\u092e \u0938\u094d\u0925\u093f\u0924\u093f",
- "Select Form": "\u092a\u094d\u0930\u092a\u0924\u094d\u0930 \u0915\u093e \u091a\u092f\u0928",
- "Setup": "\u0935\u094d\u092f\u0935\u0938\u094d\u0925\u093e",
- "Workflow Action Details": "\u0915\u093e\u0930\u094d\u092f\u092a\u094d\u0930\u0935\u093e\u0939 \u0915\u094d\u0930\u093f\u092f\u093e \u0935\u093f\u0935\u0930\u0923",
- "Workflow Rule": "\u0935\u0930\u094d\u0915\u092b\u093c\u094d\u0932\u094b \u0928\u093f\u092f\u092e",
- "Workflow Rule Details": "\u0935\u0930\u094d\u0915\u092b\u093c\u094d\u0932\u094b \u0928\u093f\u092f\u092e \u0935\u093f\u0935\u0930\u0923",
- "Yes": "\u0939\u093e\u0902"
-}
\ No newline at end of file
diff --git a/setup/doctype/workflow_rule/locale/hr-doc.json b/setup/doctype/workflow_rule/locale/hr-doc.json
deleted file mode 100644
index 731d733..0000000
--- a/setup/doctype/workflow_rule/locale/hr-doc.json
+++ /dev/null
@@ -1,23 +0,0 @@
-{
- "Action Detail": "Akcija Detalj",
- "Action html": "Akcija html",
- "Active": "Aktivan",
- "Define Rule": "Definiranje pravila",
- "Enter message": "Unesite poruku",
- "Extra Condition": "Dodatni hotela",
- "Inactive": "Neaktivan",
- "Intro HTML": "Uvod HTML",
- "No": "Ne",
- "Raise Exception": "Podignite Iznimka",
- "Reject HTML": "Odbaciti HTML",
- "Rule Definition": "Pravilo Definicija",
- "Rule Name": "Pravilo Ime",
- "Rule Priority": "Pravilo Prioritet",
- "Rule Status": "Pravilo Status",
- "Select Form": "Odaberite obrazac",
- "Setup": "Postavljanje",
- "Workflow Action Details": "Workflow Akcija Detalji",
- "Workflow Rule": "Workflow Pravilo",
- "Workflow Rule Details": "Workflow Pravilo Detalji",
- "Yes": "Da"
-}
\ No newline at end of file
diff --git a/setup/doctype/workflow_rule/locale/nl-doc.json b/setup/doctype/workflow_rule/locale/nl-doc.json
deleted file mode 100644
index c7169fb..0000000
--- a/setup/doctype/workflow_rule/locale/nl-doc.json
+++ /dev/null
@@ -1,23 +0,0 @@
-{
- "Action Detail": "Actie Detail",
- "Action html": "Actie html",
- "Active": "Actief",
- "Define Rule": "Definieer Rule",
- "Enter message": "Voer bericht",
- "Extra Condition": "Extra Staat",
- "Inactive": "Inactieve",
- "Intro HTML": "Intro HTML",
- "No": "Geen",
- "Raise Exception": "Raise Uitzondering",
- "Reject HTML": "Weigeren HTML",
- "Rule Definition": "Regel Definition",
- "Rule Name": "Regelnaam",
- "Rule Priority": "Regel Prioriteit",
- "Rule Status": "Regel Status",
- "Select Form": "Selecteer Formulier",
- "Setup": "Setup",
- "Workflow Action Details": "Workflow Aktie Details",
- "Workflow Rule": "Workflow Rule",
- "Workflow Rule Details": "Workflow Rule Details",
- "Yes": "Ja"
-}
\ No newline at end of file
diff --git a/setup/doctype/workflow_rule/locale/pt-BR-doc.json b/setup/doctype/workflow_rule/locale/pt-BR-doc.json
deleted file mode 100644
index 38c04372..0000000
--- a/setup/doctype/workflow_rule/locale/pt-BR-doc.json
+++ /dev/null
@@ -1,23 +0,0 @@
-{
- "Action Detail": "Detalhe da a\u00e7\u00e3o",
- "Action html": "A\u00e7\u00e3o html",
- "Active": "Ativo",
- "Define Rule": "Definir regra",
- "Enter message": "Digite a mensagem",
- "Extra Condition": "Condi\u00e7\u00e3o extra",
- "Inactive": "Inativo",
- "Intro HTML": "Intro HTML",
- "No": "N\u00e3o",
- "Raise Exception": "Levantar Exce\u00e7\u00e3o",
- "Reject HTML": "Rejeitar HTML",
- "Rule Definition": "Defini\u00e7\u00e3o da regra",
- "Rule Name": "Nome da regra",
- "Rule Priority": "Prioridade da regra",
- "Rule Status": "Estado da regra",
- "Select Form": "Selecione o Formul\u00e1rio",
- "Setup": "Configura\u00e7\u00e3o",
- "Workflow Action Details": "Detalhes da A\u00e7\u00e3o do Fluxo de Trabalho",
- "Workflow Rule": "Regra do Fluxo de Trabalho",
- "Workflow Rule Details": "Detalhes da Regra do Fluxo de Trabalho",
- "Yes": "Sim"
-}
\ No newline at end of file
diff --git a/setup/doctype/workflow_rule/locale/pt-doc.json b/setup/doctype/workflow_rule/locale/pt-doc.json
deleted file mode 100644
index 745d4e7..0000000
--- a/setup/doctype/workflow_rule/locale/pt-doc.json
+++ /dev/null
@@ -1,23 +0,0 @@
-{
- "Action Detail": "Detalhe a\u00e7\u00e3o",
- "Action html": "A\u00e7\u00e3o html",
- "Active": "Ativo",
- "Define Rule": "Definir regra",
- "Enter message": "Digite a mensagem",
- "Extra Condition": "Condi\u00e7\u00e3o extra",
- "Inactive": "Inativo",
- "Intro HTML": "Intro HTML",
- "No": "N\u00e3o",
- "Raise Exception": "Levante Exce\u00e7\u00e3o",
- "Reject HTML": "Rejeitar HTML",
- "Rule Definition": "Defini\u00e7\u00e3o de regra",
- "Rule Name": "Nome da regra",
- "Rule Priority": "Prioridade regra",
- "Rule Status": "Estado regra",
- "Select Form": "Selecione Formul\u00e1rio",
- "Setup": "Instala\u00e7\u00e3o",
- "Workflow Action Details": "Detalhes da A\u00e7\u00e3o de fluxo de trabalho",
- "Workflow Rule": "Regra de fluxo de trabalho",
- "Workflow Rule Details": "Detalhes do fluxo de trabalho Regra",
- "Yes": "Sim"
-}
\ No newline at end of file
diff --git a/setup/doctype/workflow_rule/locale/sr-doc.json b/setup/doctype/workflow_rule/locale/sr-doc.json
deleted file mode 100644
index 59082b1..0000000
--- a/setup/doctype/workflow_rule/locale/sr-doc.json
+++ /dev/null
@@ -1,23 +0,0 @@
-{
- "Action Detail": "\u0410\u043a\u0446\u0438\u0458\u0430 \u0414\u0435\u0442\u0430\u0459",
- "Action html": "\u0410\u043a\u0446\u0438\u0458\u0430 \u0445\u0442\u043c\u043b",
- "Active": "\u0410\u043a\u0442\u0438\u0432\u0430\u043d",
- "Define Rule": "\u0414\u0435\u0444\u0438\u043d\u0438\u0441\u0430\u045a\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u0430",
- "Enter message": "\u0423\u043d\u0435\u0441\u0438\u0442\u0435 \u043f\u043e\u0440\u0443\u043a\u0443",
- "Extra Condition": "\u0415\u043a\u0442\u0440\u0430 \u0421\u0442\u0430\u045a\u0435",
- "Inactive": "\u041d\u0435\u0430\u043a\u0442\u0438\u0432\u0430\u043d",
- "Intro HTML": "\u0418\u043d\u0442\u0440\u043e \u0425\u0422\u041c\u041b",
- "No": "\u041d\u0435",
- "Raise Exception": "\u041f\u043e\u0434\u0438\u045b\u0438 \u0415\u043a\u0446\u0435\u043f\u0442\u0438\u043e\u043d",
- "Reject HTML": "\u041e\u0434\u0431\u0438\u0442\u0438 \u0425\u0422\u041c\u041b",
- "Rule Definition": "\u041f\u0440\u0430\u0432\u0438\u043b\u043e \u0414\u0435\u0444\u0438\u043d\u0438\u0446\u0438\u0458\u0430",
- "Rule Name": "\u041f\u0440\u0430\u0432\u0438\u043b\u043e \u0418\u043c\u0435",
- "Rule Priority": "\u041f\u0440\u0430\u0432\u0438\u043b\u043e \u041f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442",
- "Rule Status": "\u041f\u0440\u0430\u0432\u0438\u043b\u043e \u0441\u0442\u0430\u0442\u0443\u0441",
- "Select Form": "\u0418\u0437\u0430\u0431\u0435\u0440\u0438\u0442\u0435 \u043e\u0431\u0440\u0430\u0437\u0430\u0446",
- "Setup": "\u041d\u0430\u043c\u0435\u0448\u0442\u0430\u0459\u043a\u0430",
- "Workflow Action Details": "\u0412\u043e\u0440\u043a\u0444\u043b\u043e\u0432 \u0410\u0446\u0442\u0438\u043e\u043d \u0414\u0435\u0442\u0430\u0438\u043b\u0441",
- "Workflow Rule": "\u0412\u043e\u0440\u043a\u0444\u043b\u043e\u0432 \u041f\u0440\u0430\u0432\u0438\u043b\u043e",
- "Workflow Rule Details": "\u0412\u043e\u0440\u043a\u0444\u043b\u043e\u0432 \u041f\u0440\u0430\u0432\u0438\u043b\u043e \u0414\u0435\u0442\u0430\u0459\u0438",
- "Yes": "\u0414\u0430"
-}
\ No newline at end of file
diff --git a/setup/doctype/workflow_rule/locale/ta-doc.json b/setup/doctype/workflow_rule/locale/ta-doc.json
deleted file mode 100644
index fbb4732..0000000
--- a/setup/doctype/workflow_rule/locale/ta-doc.json
+++ /dev/null
@@ -1,23 +0,0 @@
-{
- "Action Detail": "\u0b85\u0ba4\u0bbf\u0bb0\u0b9f\u0bbf \u0bb5\u0bbf\u0bb0\u0bbf\u0bb5\u0bbe\u0b95",
- "Action html": "\u0b85\u0ba4\u0bbf\u0bb0\u0b9f\u0bbf html",
- "Active": "\u0b9a\u0bc6\u0baf\u0bb2\u0bbf\u0bb2\u0bcd",
- "Define Rule": "\u0bb5\u0bbf\u0ba4\u0bbf \u0bb5\u0bb0\u0bc8\u0baf\u0bb1\u0bc1\u0b95\u0bcd\u0b95",
- "Enter message": "\u0ba4\u0b95\u0bb5\u0bb2\u0bcd",
- "Extra Condition": "\u0b95\u0bc2\u0b9f\u0bc1\u0ba4\u0bb2\u0bcd \u0b95\u0ba3\u0bcd\u0b9f\u0bbf\u0bb7\u0ba9\u0bcd",
- "Inactive": "\u0b9c\u0b9f\u0bae\u0bbe\u0ba9",
- "Intro HTML": "\u0b85\u0bb1\u0bbf\u0bae\u0bc1\u0b95\u0bae\u0bcd HTML",
- "No": "\u0b87\u0bb2\u0bcd\u0bb2\u0bc8",
- "Raise Exception": "\u0bb5\u0bbf\u0ba4\u0bbf\u0bb5\u0bbf\u0bb2\u0b95\u0bcd\u0b95\u0bc1 \u0b89\u0baf\u0bb0\u0bcd\u0ba4\u0bcd\u0ba4",
- "Reject HTML": "HTML \u0ba8\u0bbf\u0bb0\u0bbe\u0b95\u0bb0\u0bbf\u0b95\u0bcd\u0b95",
- "Rule Definition": "\u0b86\u0b9f\u0bcd\u0b9a\u0bbf \u0bb5\u0bb0\u0bc8\u0baf\u0bb1\u0bc8",
- "Rule Name": "\u0b86\u0b9f\u0bcd\u0b9a\u0bbf \u0baa\u0bc6\u0baf\u0bb0\u0bcd",
- "Rule Priority": "\u0b86\u0b9f\u0bcd\u0b9a\u0bbf \u0bae\u0bc1\u0ba9\u0bcd\u0ba9\u0bc1\u0bb0\u0bbf\u0bae\u0bc8",
- "Rule Status": "\u0b86\u0b9f\u0bcd\u0b9a\u0bbf \u0ba8\u0bbf\u0bb2\u0bc8\u0bae\u0bc8",
- "Select Form": "\u0baa\u0b9f\u0bbf\u0bb5\u0bae\u0bcd \u0ba4\u0bc7\u0bb0\u0bcd\u0bb5\u0bc1",
- "Setup": "\u0b85\u0bae\u0bc8\u0baa\u0bcd\u0baa\u0bc1 \u0bae\u0bc1\u0bb1\u0bc8",
- "Workflow Action Details": "\u0baa\u0ba3\u0bbf\u0baf\u0bc7\u0bbe\u0b9f\u0bcd\u0b9f\u0bae\u0bcd \u0b85\u0ba4\u0bbf\u0bb0\u0b9f\u0bbf \u0bb5\u0bbf\u0bb5\u0bb0\u0bae\u0bcd",
- "Workflow Rule": "\u0baa\u0ba3\u0bbf\u0baf\u0bc7\u0bbe\u0b9f\u0bcd\u0b9f\u0bae\u0bcd \u0bb5\u0bbf\u0ba4\u0bbf",
- "Workflow Rule Details": "\u0baa\u0ba3\u0bbf\u0baf\u0bc7\u0bbe\u0b9f\u0bcd\u0b9f\u0bae\u0bcd \u0bb5\u0bbf\u0ba4\u0bbf \u0bb5\u0bbf\u0bb5\u0bb0\u0bae\u0bcd",
- "Yes": "\u0b86\u0bae\u0bcd"
-}
\ No newline at end of file
diff --git a/setup/doctype/workflow_rule/locale/th-doc.json b/setup/doctype/workflow_rule/locale/th-doc.json
deleted file mode 100644
index 4b3a293..0000000
--- a/setup/doctype/workflow_rule/locale/th-doc.json
+++ /dev/null
@@ -1,23 +0,0 @@
-{
- "Action Detail": "\u0e23\u0e32\u0e22\u0e25\u0e30\u0e40\u0e2d\u0e35\u0e22\u0e14\u0e01\u0e32\u0e23\u0e14\u0e33\u0e40\u0e19\u0e34\u0e19\u0e01\u0e32\u0e23",
- "Action html": "html \u0e17\u0e35\u0e48\u0e01\u0e23\u0e30\u0e17\u0e33",
- "Active": "\u0e04\u0e25\u0e48\u0e2d\u0e07\u0e41\u0e04\u0e25\u0e48\u0e27",
- "Define Rule": "\u0e01\u0e33\u0e2b\u0e19\u0e14\u0e01\u0e0e",
- "Enter message": "\u0e1b\u0e49\u0e2d\u0e19\u0e02\u0e49\u0e2d\u0e04\u0e27\u0e32\u0e21",
- "Extra Condition": "\u0e40\u0e07\u0e37\u0e48\u0e2d\u0e19\u0e44\u0e02\u0e1e\u0e34\u0e40\u0e28\u0e29",
- "Inactive": "\u0e40\u0e09\u0e37\u0e48\u0e2d\u0e22\u0e0a\u0e32",
- "Intro HTML": "HTML \u0e41\u0e19\u0e30\u0e19\u0e33",
- "No": "\u0e44\u0e21\u0e48",
- "Raise Exception": "\u0e40\u0e1e\u0e34\u0e48\u0e21\u0e01\u0e32\u0e23\u0e22\u0e01\u0e40\u0e27\u0e49\u0e19",
- "Reject HTML": "\u0e1b\u0e0f\u0e34\u0e40\u0e2a\u0e18 HTML",
- "Rule Definition": "\u0e01\u0e32\u0e23\u0e01\u0e33\u0e2b\u0e19\u0e14\u0e01\u0e0e",
- "Rule Name": "\u0e0a\u0e37\u0e48\u0e2d\u0e01\u0e0e",
- "Rule Priority": "\u0e25\u0e33\u0e14\u0e31\u0e1a\u0e04\u0e27\u0e32\u0e21\u0e2a\u0e33\u0e04\u0e31\u0e0d\u0e02\u0e2d\u0e07\u0e01\u0e0e",
- "Rule Status": "\u0e2a\u0e16\u0e32\u0e19\u0e30\u0e01\u0e0e",
- "Select Form": "\u0e40\u0e25\u0e37\u0e2d\u0e01\u0e1f\u0e2d\u0e23\u0e4c\u0e21",
- "Setup": "\u0e01\u0e32\u0e23\u0e15\u0e34\u0e14\u0e15\u0e31\u0e49\u0e07",
- "Workflow Action Details": "\u0e23\u0e32\u0e22\u0e25\u0e30\u0e40\u0e2d\u0e35\u0e22\u0e14\u0e01\u0e32\u0e23\u0e14\u0e33\u0e40\u0e19\u0e34\u0e19\u0e01\u0e32\u0e23\u0e02\u0e31\u0e49\u0e19\u0e15\u0e2d\u0e19\u0e01\u0e32\u0e23\u0e17\u0e33\u0e07\u0e32\u0e19",
- "Workflow Rule": "\u0e01\u0e0e\u0e40\u0e27\u0e34\u0e23\u0e4c\u0e01\u0e42\u0e1f\u0e25\u0e27\u0e4c",
- "Workflow Rule Details": "\u0e23\u0e32\u0e22\u0e25\u0e30\u0e40\u0e2d\u0e35\u0e22\u0e14\u0e01\u0e0e\u0e40\u0e27\u0e34\u0e23\u0e4c\u0e01\u0e42\u0e1f\u0e25\u0e27\u0e4c",
- "Yes": "\u0e43\u0e0a\u0e48"
-}
\ No newline at end of file
diff --git a/setup/doctype/workflow_rule/workflow_rule.js b/setup/doctype/workflow_rule/workflow_rule.js
deleted file mode 100644
index a506101..0000000
--- a/setup/doctype/workflow_rule/workflow_rule.js
+++ /dev/null
@@ -1,60 +0,0 @@
-// ERPNext - web based ERP (http://erpnext.com)
-// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-
-
-//--------- ONLOAD -------------
-cur_frm.cscript.onload = function(doc, cdt, cdn) {
-
-}
-
-cur_frm.cscript.refresh = function(doc, cdt, cdn) {
-
-}
-
-// Show Label name of fields for selected Doctype
-// ---------------------------
-
-cur_frm.cscript.select_form = function(doc, cdt, cdn){
- var mydoc = doc
-
- var call_back_action = function(mydoc){
- $c('runserverobj', args={'method':'field_label_list', 'docs':wn.model.compress (make_doclist (mydoc.doctype,mydoc.name))},
- function(r, rt) {
- var doc = locals[mydoc.doctype][mydoc.name];
- cur_frm.fields_dict.workflow_action_details.grid.get_field("action_field").df.options = r.message;
- }
- );
- }
-
- var call_back_rule = function(mydoc){
- $c('runserverobj', args={'method':'compare_field', 'docs':wn.model.compress (make_doclist (mydoc.doctype,mydoc.name))},
- function(r, rt) {
- var doc = locals[mydoc.doctype][mydoc.name];
- cur_frm.fields_dict.workflow_rule_details.grid.get_field("comparing_field").df.options = r.message;
- call_back_action(mydoc)
- }
- );
- }
-
- $c('runserverobj', args={'method':'maindoc_field', 'docs':wn.model.compress (make_doclist (doc.doctype,doc.name))},
- function(r, rt) {
- var doc = locals[mydoc.doctype][mydoc.name];
- cur_frm.fields_dict.workflow_rule_details.grid.get_field("rule_field").df.options = r.message;
- call_back_rule(mydoc)
- }
- );
-}
diff --git a/setup/doctype/workflow_rule/workflow_rule.py b/setup/doctype/workflow_rule/workflow_rule.py
deleted file mode 100644
index 1c2514d..0000000
--- a/setup/doctype/workflow_rule/workflow_rule.py
+++ /dev/null
@@ -1,293 +0,0 @@
-# ERPNext - web based ERP (http://erpnext.com)
-# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-from __future__ import unicode_literals
-import webnotes
-
-from webnotes.utils import cstr
-from webnotes.model import db_exists
-from webnotes.model.bean import getlist, copy_doclist
-from webnotes import form, msgprint
-
-sql = webnotes.conn.sql
-
-
-
-class DocType:
- def __init__(self, doc, doclist=[]):
- self.doc, self.doclist = doc, doclist
-
- self.field_list=[]
- field_info = sql("select label,fieldtype,options,fieldname from `tabDocField` where parent='%s' and fieldtype not in('Section Break','Column Break','Text','Small Text','Text Editor', 'Time', 'Check', 'Button','Code','HTML','Image','Blob','Password')"%self.doc.select_form)
- for f in field_info:
- sl=[]
- for x in f:
- sl.append(x)
- self.field_list.append(sl)
-
-#list of labels
- def field_label_list(self):
- label= ''
- for fi in self.field_list:
- if fi[1] !='Table':
- label += "\n" + fi[0]
-
- return label
-
-
- def compare_field(self):
- ret1=''
- for fi in self.field_list:
- if fi[1] =='Table':
- flist=sql("select label from tabDocField where parent='%s' and fieldtype in ('Data', 'Select', 'Int','Currency','Float','Link')"%fi[2])
- for x in flist:
- ret1 += "\n" + fi[2] + ':' + x[0]
- else:
- ret1 += "\n" + cstr(self.doc.select_form) + ':' + fi[0]
-
- return cstr(ret1)
-
-#list of all fields for which conditions can be set
- def maindoc_field(self):
- ret = ''
- for fi in self.field_list:
- if fi[1] !='Select' or fi[1] !='Link' or fi[1] !='Table':
- ret += "\n" + cstr(self.doc.select_form) + ':' + fi[0]
- elif fi[1] =='Select':
- op = fi[2].split(':')
- if op[0] != 'link':
- ret += "\n" + cstr(self.doc.select_form) + ':' +fi[0]
-
- #child table field list
- for fi in self.field_list:
- if fi[1] == 'Table':
- flist=sql("select label from tabDocField where parent='%s' and fieldtype in ('Data', 'Select', 'Int','Currency','Float','Link')"%fi[2])
- for x in flist:
- ret += "\n" + fi[2] + ':' + x[0]
-
- # linked doctype field list
- for fi in self.field_list:
- if fi[1] == 'Link':
- flist=sql("select label from tabDocField where parent='%s' and fieldtype in ('Data', 'Int', 'Select','Currency','Float','Link')"%fi[2])
- for f in flist:
- ret += "\n" + fi[0] + ':' +f[0]
- elif fi[1] == 'Select':
- op = fi[2].split(':')
- if op[0] == 'link':
- flist=sql("select label from tabDocField where parent='%s' and fieldtype in ('Data', 'Select', 'Int','Currency','Float','Link')"%op[1])
- for f in flist:
- ret += "\n" + fi[0] + ':' +f[0]
-
- return cstr(ret)
-
- #table name of the selected doctype
- def child_doc(self):
- lst=[]
- for fi in self.field_list:
- if fi[1] == 'Table':
- lst.append(fi[2])
-
- return lst
-
- # function for finding fieldname,datatype of mentioned label
- def field_info(self,label,parent):
- field_name=sql("select fieldname from tabDocField where parent='%s' and label='%s'" %(parent,label))[0][0]
- if field_name:
- datatype=sql("select fieldtype from `tabDocField` where fieldname='%s' and parent='%s'" %(field_name,parent))[0][0]
- ret={'fieldnm':field_name,'datatype':datatype}
-
- return ret
-
- def compare_string(self,first,second):
- if first.lower()==second.lower():
- return 'true'
- else:
- return 'false'
-
-#evalute operator
- def eval_operator(self,op):
- op_sign =''
- if op=='Equals':
- op_sign='=='
- elif op=='Not Equals':
- op_sign='!='
- elif op=='Greater than':
- op_sign='>'
- elif op=='Greater than or Equals':
- op_sign='>='
- elif op=='Less than':
- op_sign='<'
- elif op=='Less than or Equals':
- op_sign='<='
-
- return op_sign
-
-#evaluation condition
- def eval_condition(self,field_dict,form_val,value,operator):
-
- if field_dict['datatype']=='Data' or field_dict['datatype']=='Select' or field_dict['datatype'] =='Link':
- #msgprint("not eval")
- if self.compare_string(cstr(form_val),cstr(value))=='false':
- cond_hold='No'
- else:
- cond_hold='Yes'
- else:
- #msgprint("eval")
- op_sign = self.eval_operator(operator)
- chk_cond=str(form_val) + str(op_sign) + str(value)
- #msgprint(chk_cond)
- if eval(chk_cond):
- cond_hold='Yes'
- else:
- cond_hold='No'
- #msgprint(cond_hold)
- return cond_hold
-
-
-# fetching the value from the form
- def find_value(self,fld_nm,tab_nm,rec_nm,child=0):
- if child == 0:
- form_val=sql("select %s from `tab%s` where name='%s'"%(fld_nm,tab_nm,rec_nm))
-
- elif child == 1:
- form_val=sql("select %s from `tab%s` where parent='%s'"%(fld_nm,tab_nm,rec_nm))
-
- return form_val and form_val[0][0]
-
-# if the comparing value is not entered manually but fetching from some other field
- def compare_field_not_manual(self,comparing_field):
- chk_with_value =''
- temp_val = comparing_field.split(':')
- if temp_val[0] == self.doc.select_form:
- field_cf = self.field_info(temp_val[1],self.doc.select_form)
- val_cf=self.find_value(field_cf['fieldnm'],self.doc.select_form,form_obj.doc.name)
- chk_with_value = val_cf
- elif temp_val[0] in child_list:
- field_cf = self.field_info(second_label,first_label)
- val_cf=self.find_value(field_cf['fieldnm'],first_label,form_obj.doc.name,1)
- chk_with_value = val_cf
-
- return chk_with_value
-# checking with main doctype
- def chk_from_main_dt(self,label1,value,operator,form_obj):
- cond_hold = ''
- field_dict = self.field_info(label1,self.doc.select_form) #getting fieldname info
- form_val=self.find_value(field_dict['fieldnm'],self.doc.select_form,form_obj.doc.name) # find value
- #msgprint(cstr(form_val))
- if form_val :
- cond_hold = self.eval_condition(field_dict,form_val,value,operator)
- elif not form_val and field_dict['datatype'] =='Currency' or field_dict['datatype'] =='Float' or field_dict['datatype'] =='Int':
- #msgprint("1")
- form_val = 0.0
- cond_hold = self.eval_condition(field_dict,form_val,value,operator)
- return cond_hold
-
-#checking with child doctype
- def chk_from_child_dt(self,first_label,second_label,value,operator,form_obj):
- cond_hold = ''
- field_dict = self.field_info(second_label,first_label)
- form_val=self.find_value(field_dict['fieldnm'],first_label,form_obj.doc.name,1) #fetching the value in current form from a table
- if form_val or form_val==0:
- cond_hold = self.eval_condition(field_dict,form_val,value,operator)
-
- return cond_hold
-
-
-# if checking is with any linked doctype means first_label field from the doctype for which rule is given and second_label field from the doctype with which first_label is linked
- def chk_from_link_dt(self,first_label,second_label,form_obj,value,operator):
- cond_hold=''
- field_dict_first = self.field_info(first_label,self.doc.select_form)
- for x in self.field_list:
- if x[3] == field_dict_first['fieldnm']:
- linked_to = x[2]
-
- lt = linked_to.split(':')
- if lt[0] == 'link':
- field_dict_second = self.field_info(second_label,lt[1])
- link_val=sql("select %s from `tab%s` where name='%s'"%(field_dict_first['fieldnm'],self.doc.select_form,form_obj.doc.name))
- if link_val and link_val[0][0]:
- form_val = self.find_value(field_dict_second['fieldnm'],lt[1],link_val[0][0])
- if form_val :
- cond_hold = self.eval_condition(field_dict_second,form_val,value,operator)
-
- else:
- field_dict_second = self.field_info(second_label,lt[0])
- link_val=sql("select %s from `tab%s` where name='%s'"%(field_dict_first['fieldnm'],self.doc.select_form,form_obj.doc.name))
- if link_val and link_val[0][0]:
- form_val = self.find_value(field_dict_second['fieldnm'],lt[0],link_val[0][0])
- if form_val :
- cond_hold = self.eval_condition(field_dict_second,form_val,value,operator)
-
- return cond_hold
-
-
- def evalute_rule(self,form_obj):
- #msgprint(form_obj.doc.name)
- child_list = self.child_doc()
- all_cond_hold=''
- for d in getlist(self.doclist,'workflow_rule_details'):
- label = d.rule_field.split(':') #break up checking condition
-
- #findout the value with which condition will be checked
- if d.value:
- chk_with_value = d.value
- elif d.comparing_field:
- chk_with_value = self.compare_field_not_manual(d.comparing_field)
-
- #msgprint(label)
- # label[0] is doctype name for which rule is given, label[1] field name of that doctype
- if label[0] == self.doc.select_form:
- cond_hold = self.chk_from_main_dt(label[1],chk_with_value,d.operator,form_obj)
- if cond_hold =='No':
- if d.exception == 'Yes':
- msgprint(d.message)
- raise Exception
- elif d.exception=='No' or d.exception=='':
- msgprint(d.message)
- all_cond_hold = 'No'
- break
- elif cond_hold =='Yes':
- all_cond_hold ='Yes'
-
- #label[0] is child doctype name , label[1] is child doctype field name
- elif label[0] in child_list:
- cond_hold = self.chk_from_child_dt(label[0],label[1],chk_with_value,d.operator,form_obj)
- if cond_hold =='No':
- if d.exception == 'Yes':
- msgprint(d.message)
- raise Exception
- elif d.exception=='No' or d.exception=='':
- msgprint(d.message)
- all_cond_hold = 'No'
- break
- elif cond_hold =='Yes':
- all_cond_hold ='Yes'
-
- # if checking is with any linked doctype means label[0] field from the doctype for which rule is given and label[1] field from the doctype with which label[0] is linked
- else:
- cond_hold=self.chk_from_link_dt(label[0],label[1],form_obj,chk_with_value,d.operator)
- if cond_hold =='No':
- if d.exception == 'Yes':
- msgprint(d.message)
- raise Exception
- elif d.exception=='No' or d.exception=='':
- msgprint(d.message)
- all_cond_hold = 'No'
- break
- elif cond_hold =='Yes':
- all_cond_hold ='Yes'
-
- return all_cond_hold
diff --git a/setup/doctype/workflow_rule/workflow_rule.txt b/setup/doctype/workflow_rule/workflow_rule.txt
deleted file mode 100644
index 0c1257f..0000000
--- a/setup/doctype/workflow_rule/workflow_rule.txt
+++ /dev/null
@@ -1,195 +0,0 @@
-[
- {
- "creation": "2012-03-27 14:36:26",
- "docstatus": 0,
- "modified": "2012-03-27 14:36:26",
- "modified_by": "Administrator",
- "owner": "swarnalata@webnotestech.com"
- },
- {
- "autoname": "field:rule_name",
- "doctype": "DocType",
- "document_type": "Master",
- "module": "Setup",
- "name": "__common__",
- "search_fields": "select_form,rule_status",
- "section_style": "Tray",
- "show_in_menu": 0,
- "version": 31
- },
- {
- "doctype": "DocField",
- "name": "__common__",
- "parent": "Workflow Rule",
- "parentfield": "fields",
- "parenttype": "DocType",
- "permlevel": 0
- },
- {
- "create": 1,
- "doctype": "DocPerm",
- "name": "__common__",
- "parent": "Workflow Rule",
- "parentfield": "permissions",
- "parenttype": "DocType",
- "permlevel": 0,
- "read": 1,
- "report": 1,
- "role": "System Manager",
- "write": 1
- },
- {
- "doctype": "DocType",
- "name": "Workflow Rule"
- },
- {
- "doctype": "DocPerm"
- },
- {
- "doctype": "DocField",
- "fieldname": "rule_definition",
- "fieldtype": "Section Break",
- "label": "Rule Definition",
- "oldfieldtype": "Section Break"
- },
- {
- "doctype": "DocField",
- "fieldname": "intro_html",
- "fieldtype": "HTML",
- "label": "Intro HTML",
- "oldfieldtype": "HTML",
- "options": "<b>Select form for which you want to define rules,set priority & status.</b>"
- },
- {
- "doctype": "DocField",
- "fieldname": "rule_name",
- "fieldtype": "Data",
- "label": "Rule Name",
- "oldfieldname": "rule_name",
- "oldfieldtype": "Data",
- "reqd": 1
- },
- {
- "doctype": "DocField",
- "fieldname": "rule_status",
- "fieldtype": "Select",
- "in_filter": 1,
- "label": "Rule Status",
- "oldfieldname": "rule_status",
- "oldfieldtype": "Select",
- "options": "\nActive\nInactive",
- "reqd": 1,
- "search_index": 0
- },
- {
- "doctype": "DocField",
- "fieldname": "select_form",
- "fieldtype": "Link",
- "in_filter": 1,
- "label": "Select Form",
- "oldfieldname": "select_form",
- "oldfieldtype": "Link",
- "options": "DocType",
- "reqd": 1,
- "search_index": 1,
- "trigger": "Client"
- },
- {
- "doctype": "DocField",
- "fieldname": "rule_priority",
- "fieldtype": "Int",
- "label": "Rule Priority",
- "oldfieldname": "rule_priority",
- "oldfieldtype": "Int",
- "reqd": 0
- },
- {
- "doctype": "DocField",
- "fieldname": "define_rule",
- "fieldtype": "Section Break",
- "label": "Define Rule",
- "oldfieldtype": "Section Break",
- "options": "Simple"
- },
- {
- "doctype": "DocField",
- "fieldname": "workflow_rule_details",
- "fieldtype": "Table",
- "label": "Workflow Rule Details",
- "oldfieldname": "workflow_rule_details",
- "oldfieldtype": "Table",
- "options": "Workflow Rule Detail",
- "width": "100px"
- },
- {
- "doctype": "DocField",
- "fieldname": "extra_condition",
- "fieldtype": "Code",
- "hidden": 1,
- "label": "Extra Condition",
- "oldfieldname": "extra_condition",
- "oldfieldtype": "Code",
- "print_hide": 1
- },
- {
- "doctype": "DocField",
- "fieldname": "action_detail",
- "fieldtype": "Section Break",
- "label": "Action Detail",
- "oldfieldtype": "Section Break"
- },
- {
- "doctype": "DocField",
- "fieldname": "action_html",
- "fieldtype": "HTML",
- "label": "Action html",
- "oldfieldtype": "HTML",
- "options": "<b>Specify actions to be taken when conditions hold satisfied</b>"
- },
- {
- "doctype": "DocField",
- "fieldname": "workflow_action_details",
- "fieldtype": "Table",
- "label": "Workflow Action Details",
- "oldfieldname": "workflow_action_details",
- "oldfieldtype": "Table",
- "options": "Workflow Action Detail"
- },
- {
- "doctype": "DocField",
- "fieldname": "reject_html",
- "fieldtype": "HTML",
- "hidden": 1,
- "label": "Reject HTML",
- "no_copy": 1,
- "oldfieldtype": "HTML",
- "options": "<b>If any condition holds false the following message will be displayed . If you wish to stop rule engine when condition holds false then set 'Raise Exception' as 'Yes' otherwise keep this field blank or 'No'.</b>",
- "print_hide": 1,
- "report_hide": 1
- },
- {
- "doctype": "DocField",
- "fieldname": "message",
- "fieldtype": "Text",
- "hidden": 1,
- "label": "Enter message",
- "no_copy": 1,
- "oldfieldname": "message",
- "oldfieldtype": "Text",
- "print_hide": 1,
- "report_hide": 1
- },
- {
- "doctype": "DocField",
- "fieldname": "raise_exception",
- "fieldtype": "Select",
- "hidden": 1,
- "label": "Raise Exception",
- "no_copy": 1,
- "oldfieldname": "raise_exception",
- "oldfieldtype": "Select",
- "options": "\nYes\nNo",
- "print_hide": 1,
- "report_hide": 1
- }
-]
\ No newline at end of file
diff --git a/setup/doctype/workflow_rule_detail/__init__.py b/setup/doctype/workflow_rule_detail/__init__.py
deleted file mode 100644
index baffc48..0000000
--- a/setup/doctype/workflow_rule_detail/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-from __future__ import unicode_literals
diff --git a/setup/doctype/workflow_rule_detail/locale/_messages_doc.json b/setup/doctype/workflow_rule_detail/locale/_messages_doc.json
deleted file mode 100644
index befc8b7..0000000
--- a/setup/doctype/workflow_rule_detail/locale/_messages_doc.json
+++ /dev/null
@@ -1,18 +0,0 @@
-[
- "not equal",
- "Field from other forms",
- "Operator",
- "Setup",
- "No",
- "equal",
- "greater than",
- "Field",
- "Value",
- "greater than equal",
- "Raise Exception",
- "Yes",
- "less than equal",
- "Message when Cond. False",
- "Workflow Rule Detail",
- "less than"
-]
\ No newline at end of file
diff --git a/setup/doctype/workflow_rule_detail/locale/ar-doc.json b/setup/doctype/workflow_rule_detail/locale/ar-doc.json
deleted file mode 100644
index 02ec639..0000000
--- a/setup/doctype/workflow_rule_detail/locale/ar-doc.json
+++ /dev/null
@@ -1,19 +0,0 @@
-{
- "Field": "\u062d\u0642\u0644",
- "Field from other forms": "\u062d\u0642\u0644 \u0645\u0646 \u0627\u0644\u0623\u0634\u0643\u0627\u0644 \u0627\u0644\u0623\u062e\u0631\u0649",
- "Message when Cond. False": "\u0627\u0644\u0631\u0633\u0627\u0644\u0629 \u0639\u0646\u062f\u0645\u0627 \u0643\u0648\u0646\u062f. \u0643\u0627\u0630\u0628",
- "No": "\u0644\u0627",
- "Operator": "\u0639\u0627\u0645\u0644",
- "Raise Exception": "\u0631\u0641\u0639 \u0627\u0633\u062a\u062b\u0646\u0627\u0621",
- "Setup": "\u0627\u0644\u0625\u0639\u062f\u0627\u062f",
- "Value": "\u0642\u064a\u0645\u0629",
- "Workflow Rule Detail": "\u062a\u0641\u0627\u0635\u064a\u0644 \u0633\u064a\u0631 \u0627\u0644\u0639\u0645\u0644 \u0627\u0644\u0642\u0627\u0639\u062f\u0629",
- "Yes": "\u0646\u0639\u0645",
- "[]": "[]",
- "equal": "\u0645\u062a\u0633\u0627\u0648",
- "greater than": "\u0623\u0643\u0628\u0631 \u0645\u0646",
- "greater than equal": "\u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0645\u0633\u0627\u0648\u0627\u0629",
- "less than": "\u0623\u0642\u0644 \u0645\u0646",
- "less than equal": "\u0623\u0642\u0644 \u0645\u0646 \u0627\u0644\u0645\u0633\u0627\u0648\u0627\u0629",
- "not equal": "\u0644\u0627 \u062a\u0633\u0627\u0648\u064a"
-}
\ No newline at end of file
diff --git a/setup/doctype/workflow_rule_detail/locale/de-doc.json b/setup/doctype/workflow_rule_detail/locale/de-doc.json
deleted file mode 100644
index a95a89e..0000000
--- a/setup/doctype/workflow_rule_detail/locale/de-doc.json
+++ /dev/null
@@ -1,18 +0,0 @@
-{
- "Field": "Feld",
- "Field from other forms": "Feld von anderen Formen",
- "Message when Cond. False": "Nachricht Wenn Cond. Falsch",
- "No": "Auf",
- "Operator": "Operator",
- "Raise Exception": "Raise Exception",
- "Setup": "Setup",
- "Value": "Wert",
- "Workflow Rule Detail": "Workflow Rule Details",
- "Yes": "Ja",
- "equal": "gleich",
- "greater than": "gr\u00f6\u00dfer als",
- "greater than equal": "gr\u00f6\u00dfer gleich",
- "less than": "weniger als",
- "less than equal": "weniger als gleich",
- "not equal": "ungleich"
-}
\ No newline at end of file
diff --git a/setup/doctype/workflow_rule_detail/locale/es-doc.json b/setup/doctype/workflow_rule_detail/locale/es-doc.json
deleted file mode 100644
index 54a1ed1..0000000
--- a/setup/doctype/workflow_rule_detail/locale/es-doc.json
+++ /dev/null
@@ -1,19 +0,0 @@
-{
- "Field": "Campo",
- "Field from other forms": "Campo de otras formas",
- "Message when Cond. False": "Mensaje cuando Cond. Falso",
- "No": "No",
- "Operator": "Operador",
- "Raise Exception": "Levante Excepci\u00f3n",
- "Setup": "Disposici\u00f3n",
- "Value": "Valor",
- "Workflow Rule Detail": "Detalle de la regla de flujo de trabajo",
- "Yes": "S\u00ed",
- "[]": "[]",
- "equal": "igual",
- "greater than": "m\u00e1s que",
- "greater than equal": "mayor o igual",
- "less than": "menos que",
- "less than equal": "menos de igual",
- "not equal": "no igual"
-}
\ No newline at end of file
diff --git a/setup/doctype/workflow_rule_detail/locale/fr-doc.json b/setup/doctype/workflow_rule_detail/locale/fr-doc.json
deleted file mode 100644
index ab42671..0000000
--- a/setup/doctype/workflow_rule_detail/locale/fr-doc.json
+++ /dev/null
@@ -1,19 +0,0 @@
-{
- "Field": "Champ",
- "Field from other forms": "Champ d'autres formes",
- "Message when Cond. False": "Message lorsque Cond. Faux",
- "No": "Aucun",
- "Operator": "Op\u00e9rateur",
- "Raise Exception": "Soulever Exception",
- "Setup": "Installation",
- "Value": "Valeur",
- "Workflow Rule Detail": "D\u00e9tail r\u00e8gle de workflow",
- "Yes": "Oui",
- "[]": "[]",
- "equal": "\u00e9gal",
- "greater than": "sup\u00e9rieure \u00e0",
- "greater than equal": "sup\u00e9rieur ou \u00e9gal",
- "less than": "moins que",
- "less than equal": "moins \u00e9gal",
- "not equal": "pas \u00e9gal"
-}
\ No newline at end of file
diff --git a/setup/doctype/workflow_rule_detail/locale/hi-doc.json b/setup/doctype/workflow_rule_detail/locale/hi-doc.json
deleted file mode 100644
index 109dc7f..0000000
--- a/setup/doctype/workflow_rule_detail/locale/hi-doc.json
+++ /dev/null
@@ -1,19 +0,0 @@
-{
- "Field": "\u0915\u094d\u0937\u0947\u0924\u094d\u0930",
- "Field from other forms": "\u0905\u0928\u094d\u092f \u0930\u0942\u092a\u094b\u0902 \u0938\u0947 \u092b\u0940\u0932\u094d\u0921",
- "Message when Cond. False": "\u091c\u092c Cond \u0938\u0902\u0926\u0947\u0936. \u091d\u0942\u0920\u093e",
- "No": "\u0928\u0939\u0940\u0902",
- "Operator": "\u0911\u092a\u0930\u0947\u091f\u0930",
- "Raise Exception": "\u0905\u092a\u0935\u093e\u0926 \u0909\u0920\u093e\u090f\u0901",
- "Setup": "\u0935\u094d\u092f\u0935\u0938\u094d\u0925\u093e",
- "Value": "\u092e\u0942\u0932\u094d\u092f",
- "Workflow Rule Detail": "\u0935\u0930\u094d\u0915\u092b\u093c\u094d\u0932\u094b \u0928\u093f\u092f\u092e \u0935\u093f\u0938\u094d\u0924\u093e\u0930",
- "Yes": "\u0939\u093e\u0902",
- "[]": "[]",
- "equal": "\u092c\u0930\u093e\u092c\u0930",
- "greater than": "\u0938\u0947 \u0905\u0927\u093f\u0915 \u0938\u0947 \u0905\u0927\u093f\u0915",
- "greater than equal": "\u092c\u0930\u093e\u092c\u0930 \u092f\u093e \u0905\u0927\u093f\u0915",
- "less than": "\u0915\u0940 \u0924\u0941\u0932\u0928\u093e \u092e\u0947\u0902 \u0915\u092e",
- "less than equal": "\u092c\u0930\u093e\u092c\u0930 \u092f\u093e \u0915\u092e",
- "not equal": "\u092c\u0930\u093e\u092c\u0930 \u0928\u0939\u0940\u0902"
-}
\ No newline at end of file
diff --git a/setup/doctype/workflow_rule_detail/locale/hr-doc.json b/setup/doctype/workflow_rule_detail/locale/hr-doc.json
deleted file mode 100644
index a523b06..0000000
--- a/setup/doctype/workflow_rule_detail/locale/hr-doc.json
+++ /dev/null
@@ -1,19 +0,0 @@
-{
- "Field": "Polje",
- "Field from other forms": "Podru\u010dje od drugih oblika",
- "Message when Cond. False": "Poruka kad Uslov. La\u017ean",
- "No": "Ne",
- "Operator": "Operator",
- "Raise Exception": "Podignite Iznimka",
- "Setup": "Postavljanje",
- "Value": "Vrijednost",
- "Workflow Rule Detail": "Workflow Pravilo Detalj",
- "Yes": "Da",
- "[]": "[]",
- "equal": "jednak",
- "greater than": "ve\u0107i od",
- "greater than equal": "ve\u0107e od jednako",
- "less than": "manje od",
- "less than equal": "manje od jednako",
- "not equal": "nije jednako"
-}
\ No newline at end of file
diff --git a/setup/doctype/workflow_rule_detail/locale/nl-doc.json b/setup/doctype/workflow_rule_detail/locale/nl-doc.json
deleted file mode 100644
index 800b634..0000000
--- a/setup/doctype/workflow_rule_detail/locale/nl-doc.json
+++ /dev/null
@@ -1,19 +0,0 @@
-{
- "Field": "Veld",
- "Field from other forms": "Veld van andere vormen",
- "Message when Cond. False": "Bericht wanneer Cond. Vals",
- "No": "Geen",
- "Operator": "Operator",
- "Raise Exception": "Raise Uitzondering",
- "Setup": "Setup",
- "Value": "Waarde",
- "Workflow Rule Detail": "Workflow Regel Detail",
- "Yes": "Ja",
- "[]": "[]",
- "equal": "gelijk",
- "greater than": "groter dan",
- "greater than equal": "groter dan of gelijk",
- "less than": "minder dan",
- "less than equal": "minder dan gelijk",
- "not equal": "ongelijk"
-}
\ No newline at end of file
diff --git a/setup/doctype/workflow_rule_detail/locale/pt-BR-doc.json b/setup/doctype/workflow_rule_detail/locale/pt-BR-doc.json
deleted file mode 100644
index ee1a847..0000000
--- a/setup/doctype/workflow_rule_detail/locale/pt-BR-doc.json
+++ /dev/null
@@ -1,18 +0,0 @@
-{
- "Field": "Campo",
- "Field from other forms": "Campo de outros formul\u00e1rios",
- "Message when Cond. False": "Mensagem quando Condi\u00e7\u00e3o for Falsa",
- "No": "N\u00e3o",
- "Operator": "Operador",
- "Raise Exception": "Levantar Exce\u00e7\u00e3o",
- "Setup": "Configura\u00e7\u00e3o",
- "Value": "Valor",
- "Workflow Rule Detail": "Detalhe da Regra do Fluxo de Trabalho",
- "Yes": "Sim",
- "equal": "igual",
- "greater than": "maior que",
- "greater than equal": "maior ou igual",
- "less than": "menor que",
- "less than equal": "menor ou igual",
- "not equal": "n\u00e3o igual"
-}
\ No newline at end of file
diff --git a/setup/doctype/workflow_rule_detail/locale/pt-doc.json b/setup/doctype/workflow_rule_detail/locale/pt-doc.json
deleted file mode 100644
index ec96ab4..0000000
--- a/setup/doctype/workflow_rule_detail/locale/pt-doc.json
+++ /dev/null
@@ -1,19 +0,0 @@
-{
- "Field": "Campo",
- "Field from other forms": "Campo de outras formas",
- "Message when Cond. False": "Mensagem quando Cond. Falso",
- "No": "N\u00e3o",
- "Operator": "Operador",
- "Raise Exception": "Levante Exce\u00e7\u00e3o",
- "Setup": "Instala\u00e7\u00e3o",
- "Value": "Valor",
- "Workflow Rule Detail": "Detalhe regra de fluxo de trabalho",
- "Yes": "Sim",
- "[]": "[]",
- "equal": "igual",
- "greater than": "maior do que",
- "greater than equal": "maior ou igual",
- "less than": "menor que",
- "less than equal": "menor ou igual",
- "not equal": "n\u00e3o igual"
-}
\ No newline at end of file
diff --git a/setup/doctype/workflow_rule_detail/locale/sr-doc.json b/setup/doctype/workflow_rule_detail/locale/sr-doc.json
deleted file mode 100644
index 3e41e1f..0000000
--- a/setup/doctype/workflow_rule_detail/locale/sr-doc.json
+++ /dev/null
@@ -1,19 +0,0 @@
-{
- "Field": "\u041f\u043e\u0459\u0435",
- "Field from other forms": "\u041e\u0431\u043b\u0430\u0441\u0442 \u043e\u0434 \u0434\u0440\u0443\u0433\u0438\u0445 \u043e\u0431\u043b\u0438\u043a\u0430",
- "Message when Cond. False": "\u041f\u043e\u0440\u0443\u043a\u0430 \u043a\u0430\u0434 \u0423\u0441\u043b\u043e\u0432. \u041b\u0430\u0436\u0430\u043d",
- "No": "\u041d\u0435",
- "Operator": "\u041e\u043f\u0435\u0440\u0430\u0442\u043e\u0440",
- "Raise Exception": "\u041f\u043e\u0434\u0438\u045b\u0438 \u0415\u043a\u0446\u0435\u043f\u0442\u0438\u043e\u043d",
- "Setup": "\u041d\u0430\u043c\u0435\u0448\u0442\u0430\u0459\u043a\u0430",
- "Value": "\u0412\u0440\u0435\u0434\u043d\u043e\u0441\u0442",
- "Workflow Rule Detail": "\u0412\u043e\u0440\u043a\u0444\u043b\u043e\u0432 \u041f\u0440\u0430\u0432\u0438\u043b\u043e \u0414\u0435\u0442\u0430\u0459",
- "Yes": "\u0414\u0430",
- "[]": "[]",
- "equal": "\u0458\u0435\u0434\u043d\u0430\u043a",
- "greater than": "\u0432\u0435\u045b\u0438 \u043e\u0434",
- "greater than equal": "\u0432\u0435\u045b\u0438 \u043e\u0434 \u0458\u0435\u0434\u043d\u0430\u043a\u043e\u0433",
- "less than": "\u043c\u0430\u045a\u0435 \u043e\u0434",
- "less than equal": "\u043c\u0430\u045a\u0435 \u043e\u0434 \u0458\u0435\u0434\u043d\u0430\u043a\u043e\u0433",
- "not equal": "\u043d\u0438\u0441\u0443 \u0458\u0435\u0434\u043d\u0430\u043a\u0438"
-}
\ No newline at end of file
diff --git a/setup/doctype/workflow_rule_detail/locale/ta-doc.json b/setup/doctype/workflow_rule_detail/locale/ta-doc.json
deleted file mode 100644
index d85d159..0000000
--- a/setup/doctype/workflow_rule_detail/locale/ta-doc.json
+++ /dev/null
@@ -1,19 +0,0 @@
-{
- "Field": "\u0baa\u0bc1\u0bb2\u0bae\u0bcd",
- "Field from other forms": "\u0baa\u0bbf\u0bb1 \u0b87\u0bb0\u0bc1\u0ba8\u0bcd\u0ba4\u0bc1 \u0baa\u0bc1\u0bb2\u0bae\u0bcd",
- "Message when Cond. False": "\u0b9a\u0bc6\u0baf\u0bcd\u0ba4\u0bbf \u0baa\u0bc7\u0bbe\u0ba4\u0bc1 \u0ba8\u0bbf\u0bb2\u0bc8. \u0ba4\u0bb5\u0bb1\u0bbe\u0ba9",
- "No": "\u0b87\u0bb2\u0bcd\u0bb2\u0bc8",
- "Operator": "\u0b86\u0baa\u0bb0\u0bc7\u0b9f\u0bcd\u0b9f\u0bb0\u0bcd",
- "Raise Exception": "\u0bb5\u0bbf\u0ba4\u0bbf\u0bb5\u0bbf\u0bb2\u0b95\u0bcd\u0b95\u0bc1 \u0b89\u0baf\u0bb0\u0bcd\u0ba4\u0bcd\u0ba4",
- "Setup": "\u0b85\u0bae\u0bc8\u0baa\u0bcd\u0baa\u0bc1 \u0bae\u0bc1\u0bb1\u0bc8",
- "Value": "\u0bae\u0ba4\u0bbf\u0baa\u0bcd\u0baa\u0bc1",
- "Workflow Rule Detail": "\u0baa\u0ba3\u0bbf\u0baf\u0bc7\u0bbe\u0b9f\u0bcd\u0b9f\u0bae\u0bcd \u0bb5\u0bbf\u0ba4\u0bbf \u0bb5\u0bbf\u0bb0\u0bbf\u0bb5\u0bbe\u0b95",
- "Yes": "\u0b86\u0bae\u0bcd",
- "[]": "[]",
- "equal": "\u0b87\u0ba3\u0bc8\u0baf\u0bbe\u0ba9",
- "greater than": "\u0bb5\u0bbf\u0b9f\u0baa\u0bcd\u0baa\u0bc6\u0bb0\u0bbf\u0ba4\u0bc1",
- "greater than equal": "\u0b9a\u0bae \u0b85\u0ba4\u0bbf\u0b95\u0bae\u0bbe\u0b95",
- "less than": "\u0b95\u0bc1\u0bb1\u0bc8\u0bb5\u0bbe\u0ba9",
- "less than equal": "\u0b9a\u0bae \u0b95\u0bc1\u0bb1\u0bc8\u0bb5\u0bbe\u0ba9",
- "not equal": "\u0b9a\u0bae \u0b87\u0bb2\u0bcd\u0bb2\u0bc8"
-}
\ No newline at end of file
diff --git a/setup/doctype/workflow_rule_detail/locale/th-doc.json b/setup/doctype/workflow_rule_detail/locale/th-doc.json
deleted file mode 100644
index 1ff91f7..0000000
--- a/setup/doctype/workflow_rule_detail/locale/th-doc.json
+++ /dev/null
@@ -1,19 +0,0 @@
-{
- "Field": "\u0e2a\u0e19\u0e32\u0e21",
- "Field from other forms": "\u0e40\u0e02\u0e15\u0e02\u0e49\u0e2d\u0e21\u0e39\u0e25\u0e08\u0e32\u0e01\u0e23\u0e39\u0e1b\u0e41\u0e1a\u0e1a\u0e2d\u0e37\u0e48\u0e19 \u0e46",
- "Message when Cond. False": "\u0e02\u0e49\u0e2d\u0e04\u0e27\u0e32\u0e21\u0e40\u0e21\u0e37\u0e48\u0e2d Cond \u0e40\u0e17\u0e47\u0e08",
- "No": "\u0e44\u0e21\u0e48",
- "Operator": "\u0e1c\u0e39\u0e49\u0e1b\u0e23\u0e30\u0e01\u0e2d\u0e1a\u0e01\u0e32\u0e23",
- "Raise Exception": "\u0e40\u0e1e\u0e34\u0e48\u0e21\u0e01\u0e32\u0e23\u0e22\u0e01\u0e40\u0e27\u0e49\u0e19",
- "Setup": "\u0e01\u0e32\u0e23\u0e15\u0e34\u0e14\u0e15\u0e31\u0e49\u0e07",
- "Value": "\u0e21\u0e39\u0e25\u0e04\u0e48\u0e32",
- "Workflow Rule Detail": "\u0e23\u0e32\u0e22\u0e25\u0e30\u0e40\u0e2d\u0e35\u0e22\u0e14\u0e01\u0e0e\u0e40\u0e27\u0e34\u0e23\u0e4c\u0e01\u0e42\u0e1f\u0e25\u0e27\u0e4c",
- "Yes": "\u0e43\u0e0a\u0e48",
- "[]": "[]",
- "equal": "\u0e40\u0e17\u0e48\u0e32\u0e01\u0e31\u0e19",
- "greater than": "\u0e21\u0e32\u0e01\u0e01\u0e27\u0e48\u0e32",
- "greater than equal": "\u0e21\u0e32\u0e01\u0e01\u0e27\u0e48\u0e32\u0e2b\u0e23\u0e37\u0e2d\u0e40\u0e17\u0e48\u0e32\u0e01\u0e31\u0e1a",
- "less than": "\u0e19\u0e49\u0e2d\u0e22\u0e01\u0e27\u0e48\u0e32",
- "less than equal": "\u0e19\u0e49\u0e2d\u0e22\u0e01\u0e27\u0e48\u0e32\u0e2b\u0e23\u0e37\u0e2d\u0e40\u0e17\u0e48\u0e32\u0e01\u0e31\u0e1a",
- "not equal": "\u0e44\u0e21\u0e48\u0e40\u0e17\u0e48\u0e32\u0e01\u0e31\u0e1a"
-}
\ No newline at end of file
diff --git a/setup/doctype/workflow_rule_detail/workflow_rule_detail.py b/setup/doctype/workflow_rule_detail/workflow_rule_detail.py
deleted file mode 100644
index 7f48feb..0000000
--- a/setup/doctype/workflow_rule_detail/workflow_rule_detail.py
+++ /dev/null
@@ -1,22 +0,0 @@
-# ERPNext - web based ERP (http://erpnext.com)
-# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-from __future__ import unicode_literals
-import webnotes
-
-class DocType:
- def __init__(self, d, dl):
- self.doc, self.doclist = d, dl
\ No newline at end of file
diff --git a/setup/doctype/workflow_rule_detail/workflow_rule_detail.txt b/setup/doctype/workflow_rule_detail/workflow_rule_detail.txt
deleted file mode 100644
index 1aee3fe..0000000
--- a/setup/doctype/workflow_rule_detail/workflow_rule_detail.txt
+++ /dev/null
@@ -1,84 +0,0 @@
-[
- {
- "creation": "2013-02-22 01:27:59",
- "docstatus": 0,
- "modified": "2013-03-07 07:03:34",
- "modified_by": "Administrator",
- "owner": "swarnalata@webnotestech.com"
- },
- {
- "doctype": "DocType",
- "istable": 1,
- "module": "Setup",
- "name": "__common__"
- },
- {
- "doctype": "DocField",
- "name": "__common__",
- "parent": "Workflow Rule Detail",
- "parentfield": "fields",
- "parenttype": "DocType",
- "permlevel": 0
- },
- {
- "doctype": "DocType",
- "name": "Workflow Rule Detail"
- },
- {
- "doctype": "DocField",
- "fieldname": "rule_field",
- "fieldtype": "Select",
- "label": "Field",
- "oldfieldname": "rule_field",
- "oldfieldtype": "Select",
- "options": "[]",
- "print_width": "200px",
- "width": "200px"
- },
- {
- "doctype": "DocField",
- "fieldname": "operator",
- "fieldtype": "Select",
- "label": "Operator",
- "oldfieldname": "operator",
- "oldfieldtype": "Select",
- "options": "\nequal\nnot equal\ngreater than\ngreater than equal\nless than\nless than equal"
- },
- {
- "doctype": "DocField",
- "fieldname": "value",
- "fieldtype": "Data",
- "label": "Value",
- "oldfieldname": "value",
- "oldfieldtype": "Data",
- "print_width": "100px",
- "width": "100px"
- },
- {
- "doctype": "DocField",
- "fieldname": "comparing_field",
- "fieldtype": "Select",
- "label": "Field from other forms",
- "oldfieldname": "comparing_field",
- "oldfieldtype": "Select"
- },
- {
- "doctype": "DocField",
- "fieldname": "message",
- "fieldtype": "Data",
- "label": "Message when Cond. False",
- "oldfieldname": "message",
- "oldfieldtype": "Data",
- "print_width": "200px",
- "width": "200px"
- },
- {
- "doctype": "DocField",
- "fieldname": "exception",
- "fieldtype": "Select",
- "label": "Raise Exception",
- "oldfieldname": "exception",
- "oldfieldtype": "Select",
- "options": "\nYes\nNo"
- }
-]
\ No newline at end of file
diff --git a/setup/utils.py b/setup/utils.py
index 1a86921..33fa3e2 100644
--- a/setup/utils.py
+++ b/setup/utils.py
@@ -46,4 +46,4 @@
if result and len(result)==1:
return {"price_list_currency": result[0][0]}
else:
- return {}
\ No newline at end of file
+ return {}
diff --git a/startup/boot.py b/startup/boot.py
index 9ed20ff..b202d17 100644
--- a/startup/boot.py
+++ b/startup/boot.py
@@ -36,9 +36,8 @@
for key in ['max_users', 'expires_on', 'max_space', 'status', 'developer_mode']:
if hasattr(conf, key): bootinfo[key] = getattr(conf, key)
- bootinfo['docs'] += webnotes.conn.sql("""select name, default_currency, cost_center,
- cost_center as 'cost_center_other_charges' from `tabCompany`""",
- as_dict=1, update={"doctype":":Company"})
+ bootinfo['docs'] += webnotes.conn.sql("""select name, default_currency, cost_center
+ from `tabCompany`""", as_dict=1, update={"doctype":":Company"})
def get_letter_heads():
"""load letter heads with startup"""
diff --git a/startup/install.py b/startup/install.py
index 5ddbf09..bc8c387 100644
--- a/startup/install.py
+++ b/startup/install.py
@@ -7,8 +7,6 @@
make_modules()
make_roles()
webnotes.conn.commit()
- webnotes.reload_doc("utilities", "doctype", "gl_mapper")
- webnotes.reload_doc("utilities", "doctype", "gl_mapper_detail")
def make_modules():
modules = [
diff --git a/startup/website.py b/startup/website.py
index 5e6c311..dfaba02 100644
--- a/startup/website.py
+++ b/startup/website.py
@@ -34,18 +34,7 @@
t['child_items'] = []
t['child_items'].append(d)
break
-
- if top_items and ("products" in [d.url.split(".")[0] for d in top_items if d.url]):
- # product categories
- products = webnotes.conn.sql("""select t1.item_group as label,
- t2.page_name as url,
- ifnull(t1.indent,0) as indent
- from `tabWebsite Product Category` t1, `tabItem Group` t2
- where t1.item_group = t2.name
- and ifnull(t2.show_in_website,0)=1 order by t1.idx""", as_dict=1)
- products_item = filter(lambda d: d.url and d.url.split(".")[0]=="products", top_items)[0]
- products_item.child_items = products
-
+
ret = webnotes._dict({
'top_bar_items': top_items,
'footer_items': webnotes.conn.sql("""\
diff --git a/stock/Print Format/Delivery Note Classic/Delivery Note Classic.txt b/stock/Print Format/Delivery Note Classic/Delivery Note Classic.txt
index c5beb65..4f6272d 100644
--- a/stock/Print Format/Delivery Note Classic/Delivery Note Classic.txt
+++ b/stock/Print Format/Delivery Note Classic/Delivery Note Classic.txt
@@ -1,17 +1,18 @@
[
{
- "creation": "2012-04-17 11:29:12",
+ "creation": "2013-04-19 13:31:11",
"docstatus": 0,
- "modified": "2013-01-25 17:19:46",
+ "modified": "2013-05-28 17:20:31",
"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/webnotes/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\tline-height: 150%;\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'basic_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.adj_rate){\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.adj_rate + '% on ' + doc.currency + ' ' +\n\t\t\t\t\t\t\t\tfmt_money(data_row.ref_rate) + '</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 />':' ') + \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></td>\\n' +\n\t\t\t\t\t\t\t'\\t<td width=38%>' + fmt_money(oc[i].tax_amount/doc.conversion_rate) + '</td>\\n' +\n\t\t\t\t\t\t'</tr>\\n';\n\t\t\t\t}\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 || '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 & 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></td>\n\t\t\t\t\t\t\t<td width=38%><script>\n\t\t\t\t\t\t\t\tfmt_money(doc.net_total)\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></td>\n\t\t\t\t\t\t\t<td><script>\n\t\t\t\t\t\t\t\tfmt_money(doc.grand_total_export)\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><script>doc.currency</script></td>\n\t\t\t\t\t\t\t<td><script>\n\t\t\t\t\t\t\t\tfmt_money(doc.rounded_total_export)\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>\n",
+ "html": "<!--\n\tSample Print Format for ERPNext\n\tPlease use at your own discretion\n\tFor suggestions and contributions:\n\t\thttps://github.com/webnotes/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\tline-height: 150%;\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'basic_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.adj_rate){\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.adj_rate + '% on ' + doc.currency + ' ' +\n\t\t\t\t\t\t\t\tfmt_money(data_row.ref_rate) + '</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 />':' ') + \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></td>\\n' +\n\t\t\t\t\t\t\t'\\t<td width=38%>' + fmt_money(oc[i].tax_amount/doc.conversion_rate) + '</td>\\n' +\n\t\t\t\t\t\t'</tr>\\n';\n\t\t\t\t}\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 || '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 & 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></td>\n\t\t\t\t\t\t\t<td width=38%><script>\n\t\t\t\t\t\t\t\tfmt_money(doc.net_total_export)\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></td>\n\t\t\t\t\t\t\t<td><script>\n\t\t\t\t\t\t\t\tfmt_money(doc.grand_total_export)\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><script>doc.currency</script></td>\n\t\t\t\t\t\t\t<td><script>\n\t\t\t\t\t\t\t\tfmt_money(doc.rounded_total_export)\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>\n",
"module": "Stock",
"name": "__common__",
+ "print_format_type": "Client",
"standard": "Yes"
},
{
diff --git a/stock/Print Format/Delivery Note Modern/Delivery Note Modern.txt b/stock/Print Format/Delivery Note Modern/Delivery Note Modern.txt
index 6993bfd..82d2376 100644
--- a/stock/Print Format/Delivery Note Modern/Delivery Note Modern.txt
+++ b/stock/Print Format/Delivery Note Modern/Delivery Note Modern.txt
@@ -1,17 +1,18 @@
[
{
- "creation": "2012-04-17 11:29:12",
+ "creation": "2013-04-19 13:31:11",
"docstatus": 0,
- "modified": "2013-01-25 17:20:58",
+ "modified": "2013-05-28 17:20:21",
"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/webnotes/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\t\tline-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'basic_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.adj_rate){\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.adj_rate + '% on ' + doc.currency + ' ' +\n\t\t\t\t\t\t\t\tfmt_money(data_row.ref_rate) + '</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 />':' ') + \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></td>\\n' +\n\t\t\t\t\t\t\t'\\t<td width=38%>' + fmt_money(oc[i].tax_amount/doc.conversion_rate) + '</td>\\n' +\n\t\t\t\t\t\t'</tr>\\n';\n\t\t\t\t}\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 || '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 & 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></td>\n\t\t\t\t\t\t\t<td width=38%><script>\n\t\t\t\t\t\t\t\tfmt_money(doc.net_total)\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></td>\n\t\t\t\t\t\t\t<td><script>\n\t\t\t\t\t\t\t\tfmt_money(doc.grand_total_export)\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><script>doc.currency</script></td>\n\t\t\t\t\t\t\t<td><script>\n\t\t\t\t\t\t\t\tfmt_money(doc.rounded_total_export)\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>\n",
+ "html": "<!--\n\tSample Print Format for ERPNext\n\tPlease use at your own discretion\n\tFor suggestions and contributions:\n\t\thttps://github.com/webnotes/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\t\tline-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'basic_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.adj_rate){\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.adj_rate + '% on ' + doc.currency + ' ' +\n\t\t\t\t\t\t\t\tfmt_money(data_row.ref_rate) + '</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 />':' ') + \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></td>\\n' +\n\t\t\t\t\t\t\t'\\t<td width=38%>' + fmt_money(oc[i].tax_amount/doc.conversion_rate) + '</td>\\n' +\n\t\t\t\t\t\t'</tr>\\n';\n\t\t\t\t}\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 || '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 & 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></td>\n\t\t\t\t\t\t\t<td width=38%><script>\n\t\t\t\t\t\t\t\tfmt_money(doc.net_total_export)\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></td>\n\t\t\t\t\t\t\t<td><script>\n\t\t\t\t\t\t\t\tfmt_money(doc.grand_total_export)\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><script>doc.currency</script></td>\n\t\t\t\t\t\t\t<td><script>\n\t\t\t\t\t\t\t\tfmt_money(doc.rounded_total_export)\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>\n",
"module": "Stock",
"name": "__common__",
+ "print_format_type": "Client",
"standard": "Yes"
},
{
diff --git a/stock/Print Format/Delivery Note Spartan/Delivery Note Spartan.txt b/stock/Print Format/Delivery Note Spartan/Delivery Note Spartan.txt
index 69eb9ff..81ecbd2 100644
--- a/stock/Print Format/Delivery Note Spartan/Delivery Note Spartan.txt
+++ b/stock/Print Format/Delivery Note Spartan/Delivery Note Spartan.txt
@@ -1,17 +1,18 @@
[
{
- "creation": "2012-04-17 11:29:12",
+ "creation": "2013-04-19 13:31:11",
"docstatus": 0,
- "modified": "2013-01-25 17:19:30",
+ "modified": "2013-05-28 17:20:39",
"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/webnotes/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\tline-height: 150%;\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'basic_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.adj_rate){\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.adj_rate + '% on ' + doc.currency + ' ' +\n\t\t\t\t\t\t\t\tfmt_money(data_row.ref_rate) + '</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 />':' ') + \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></td>\\n' +\n\t\t\t\t\t\t\t'\\t<td width=38%>' + fmt_money(oc[i].tax_amount/doc.conversion_rate) + '</td>\\n' +\n\t\t\t\t\t\t'</tr>\\n';\n\t\t\t\t}\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 || '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 & 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></td>\n\t\t\t\t\t\t\t<td width=38%><script>\n\t\t\t\t\t\t\t\tfmt_money(doc.net_total)\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></td>\n\t\t\t\t\t\t\t<td><script>\n\t\t\t\t\t\t\t\tfmt_money(doc.grand_total_export)\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><script>doc.currency</script></td>\n\t\t\t\t\t\t\t<td><script>\n\t\t\t\t\t\t\t\tfmt_money(doc.rounded_total_export)\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>\n",
+ "html": "<!--\n\tSample Print Format for ERPNext\n\tPlease use at your own discretion\n\tFor suggestions and contributions:\n\t\thttps://github.com/webnotes/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\tline-height: 150%;\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'basic_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.adj_rate){\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.adj_rate + '% on ' + doc.currency + ' ' +\n\t\t\t\t\t\t\t\tfmt_money(data_row.ref_rate) + '</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 />':' ') + \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></td>\\n' +\n\t\t\t\t\t\t\t'\\t<td width=38%>' + fmt_money(oc[i].tax_amount/doc.conversion_rate) + '</td>\\n' +\n\t\t\t\t\t\t'</tr>\\n';\n\t\t\t\t}\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 || '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 & 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></td>\n\t\t\t\t\t\t\t<td width=38%><script>\n\t\t\t\t\t\t\t\tfmt_money(doc.net_total_export)\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></td>\n\t\t\t\t\t\t\t<td><script>\n\t\t\t\t\t\t\t\tfmt_money(doc.grand_total_export)\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><script>doc.currency</script></td>\n\t\t\t\t\t\t\t<td><script>\n\t\t\t\t\t\t\t\tfmt_money(doc.rounded_total_export)\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>\n",
"module": "Stock",
"name": "__common__",
+ "print_format_type": "Client",
"standard": "Yes"
},
{
diff --git a/stock/README.md b/stock/README.md
new file mode 100644
index 0000000..14cabc6
--- /dev/null
+++ b/stock/README.md
@@ -0,0 +1 @@
+Inventory management module.
\ No newline at end of file
diff --git a/stock/doctype/batch/README.md b/stock/doctype/batch/README.md
new file mode 100644
index 0000000..3377343
--- /dev/null
+++ b/stock/doctype/batch/README.md
@@ -0,0 +1 @@
+Batch of Items Units. If Item has batched inventory, then adding tagging each inventory transaction to a Batch becomes important.
\ No newline at end of file
diff --git a/stock/doctype/bin/README.md b/stock/doctype/bin/README.md
new file mode 100644
index 0000000..4218fdc
--- /dev/null
+++ b/stock/doctype/bin/README.md
@@ -0,0 +1 @@
+Bin represents a unique Item-Warehouse combination. Sum of all transactions, planned, ordered, reserved quantities for that Item Warehouse is maintained in Bin.
\ No newline at end of file
diff --git a/stock/doctype/delivery_note/README.md b/stock/doctype/delivery_note/README.md
new file mode 100644
index 0000000..86d2fd7
--- /dev/null
+++ b/stock/doctype/delivery_note/README.md
@@ -0,0 +1 @@
+Record of shipment made to Customer, optionally against a Sales Order.
\ No newline at end of file
diff --git a/stock/doctype/delivery_note/delivery_note.js b/stock/doctype/delivery_note/delivery_note.js
index 0a31dfe..e1b23f0 100644
--- a/stock/doctype/delivery_note/delivery_note.js
+++ b/stock/doctype/delivery_note/delivery_note.js
@@ -20,84 +20,36 @@
cur_frm.cscript.other_fname = "other_charges";
cur_frm.cscript.sales_team_fname = "sales_team";
-wn.require('app/selling/doctype/sales_common/sales_common.js');
wn.require('app/accounts/doctype/sales_taxes_and_charges_master/sales_taxes_and_charges_master.js');
wn.require('app/utilities/doctype/sms_control/sms_control.js');
+wn.require('app/selling/doctype/sales_common/sales_common.js');
-// ONLOAD
-// ================================================================================================
-cur_frm.cscript.onload = function(doc, dt, dn) {
- cur_frm.cscript.manage_rounded_total();
- if(!doc.status) set_multiple(dt,dn,{status:'Draft'});
- if(!doc.transaction_date) set_multiple(dt,dn,{transaction_date:get_today()});
- if(!doc.posting_date) set_multiple(dt,dn,{posting_date:get_today()});
- if(doc.__islocal && doc.customer) cur_frm.cscript.customer(doc,dt,dn,onload=true);
- if(!doc.price_list_currency) {
- set_multiple(dt, dn, {price_list_currency: doc.currency, plc_conversion_rate:1});
- }
+wn.provide("erpnext.stock");
+erpnext.stock.DeliveryNoteController = erpnext.selling.SellingController.extend({
+ refresh: function(doc, dt, dn) {
+ this._super();
- if(doc.__islocal){
- hide_field(['customer_address', 'contact_person', 'customer_name',
- 'address_display', 'contact_display', 'contact_mobile',
- 'contact_email', 'territory', 'customer_group']);
- }
-}
+ if(flt(doc.per_billed, 2) < 100 && doc.docstatus==1) cur_frm.add_custom_button('Make Invoice', cur_frm.cscript['Make Sales Invoice']);
+
+ if(flt(doc.per_installed, 2) < 100 && doc.docstatus==1) cur_frm.add_custom_button('Make Installation Note', cur_frm.cscript['Make Installation Note']);
-cur_frm.cscript.onload_post_render = function(doc, dt, dn) {
- // defined in sales_common.js
- var callback = function(doc, dt, dn) {
- if(doc.__islocal) cur_frm.cscript.update_item_details(doc, dt, dn);
+ if (doc.docstatus==1) cur_frm.add_custom_button('Send SMS', cur_frm.cscript.send_sms);
+
+ if(doc.docstatus==0 && !doc.__islocal) {
+ cur_frm.add_custom_button('Make Packing Slip', cur_frm.cscript['Make Packing Slip']);
+ }
+
+ set_print_hide(doc, dt, dn);
+
+ // unhide expense_account and cost_center is auto_inventory_accounting enabled
+ var aii_enabled = cint(sys_defaults.auto_inventory_accounting)
+ cur_frm.fields_dict[cur_frm.cscript.fname].grid.set_column_disp("expense_account", aii_enabled);
+ cur_frm.fields_dict[cur_frm.cscript.fname].grid.set_column_disp("cost_center", aii_enabled);
}
+});
- cur_frm.cscript.hide_price_list_currency(doc, dt, dn, callback);
-}
-
-// REFRESH
-// ================================================================================================
-cur_frm.cscript.refresh = function(doc, cdt, cdn) {
- cur_frm.clear_custom_buttons();
- erpnext.hide_naming_series();
-
- if (!cur_frm.cscript.is_onload) cur_frm.cscript.hide_price_list_currency(doc, cdt, cdn);
-
-
- if(flt(doc.per_billed, 2) < 100 && doc.docstatus==1) cur_frm.add_custom_button('Make Invoice', cur_frm.cscript['Make Sales Invoice']);
-
- if(flt(doc.per_installed, 2) < 100 && doc.docstatus==1) cur_frm.add_custom_button('Make Installation Note', cur_frm.cscript['Make Installation Note']);
-
- if (doc.docstatus==1) cur_frm.add_custom_button('Send SMS', cur_frm.cscript.send_sms);
-
- if(doc.docstatus==0 && !doc.__islocal) {
- cur_frm.add_custom_button('Make Packing Slip', cur_frm.cscript['Make Packing Slip']);
- }
-
- cur_frm.toggle_display("contact_info", doc.customer);
-
- set_print_hide(doc, cdt, cdn);
-
- // unhide expense_account and cost_center is auto_inventory_accounting enabled
- var aii_enabled = cint(sys_defaults.auto_inventory_accounting)
- cur_frm.fields_dict[cur_frm.cscript.fname].grid.set_column_disp("expense_account", aii_enabled);
- cur_frm.fields_dict[cur_frm.cscript.fname].grid.set_column_disp("cost_center", aii_enabled);
-}
-
-
-//customer
-cur_frm.cscript.customer = function(doc,dt,dn,onload) {
- cur_frm.toggle_display("contact_info", doc.customer);
-
- var pl = doc.price_list_name;
- var callback = function(r,rt) {
- var doc = locals[cur_frm.doctype][cur_frm.docname];
- if(doc.customer)
- unhide_field(['customer_address','contact_person','territory','customer_group']);
- cur_frm.refresh();
- if(!onload && (pl != doc.price_list_name)) cur_frm.cscript.price_list_name(doc, dt, dn);
- }
- var args = onload ? 'onload':''
- if(doc.customer) $c_obj(make_doclist(doc.doctype, doc.name),
- 'get_default_customer_shipping_address', args, callback);
-}
+// for backward compatibility: combine new and previous states
+$.extend(cur_frm.cscript, new erpnext.stock.DeliveryNoteController({frm: cur_frm}));
cur_frm.cscript.customer_address = cur_frm.cscript.contact_person = function(doc,dt,dn) {
if(doc.customer) get_server_fields('get_customer_address', JSON.stringify({customer: doc.customer, address: doc.customer_address, contact: doc.contact_person}),'', doc, dt, dn, 1);
@@ -157,11 +109,6 @@
return repl('SELECT DISTINCT `tabSales Order`.`name` FROM `tabSales Order` WHERE `tabSales Order`.company = "%(company)s" and `tabSales Order`.`docstatus` = 1 and `tabSales Order`.`status` != "Stopped" and ifnull(`tabSales Order`.per_delivered,0) < 99.99 and %(cond)s `tabSales Order`.%(key)s LIKE "%s" ORDER BY `tabSales Order`.`name` DESC LIMIT 50', {company:doc.company,cond:cond})
}
-
-cur_frm.cscript.delivery_type = function(doc, cdt, cdn) {
- if (doc.delivery_type = 'Sample') cfn_set_fields(doc, cdt, cdn);
-}
-
cur_frm.cscript.serial_no = function(doc, cdt, cdn) {
var d = locals[cdt][cdn];
if (d.serial_no) {
@@ -169,17 +116,6 @@
}
}
-
-cur_frm.cscript.warehouse = function(doc, cdt, cdn) {
- var d = locals[cdt][cdn];
- if (! d.item_code) {alert("please enter item code first"); return};
- if (d.warehouse) {
- arg = "{'item_code':'" + d.item_code + "','warehouse':'" + d.warehouse +"'}";
- get_server_fields('get_actual_qty',arg,'delivery_note_details',doc,cdt,cdn,1);
- }
-}
-
-
cur_frm.fields_dict['transporter_name'].get_query = function(doc) {
return 'SELECT DISTINCT `tabSupplier`.`name` FROM `tabSupplier` WHERE `tabSupplier`.supplier_type = "transporter" AND `tabSupplier`.docstatus != 2 AND `tabSupplier`.%(key)s LIKE "%s" ORDER BY `tabSupplier`.`name` LIMIT 50';
}
diff --git a/stock/doctype/delivery_note/delivery_note.py b/stock/doctype/delivery_note/delivery_note.py
index 6ffd960..fd74976 100644
--- a/stock/doctype/delivery_note/delivery_note.py
+++ b/stock/doctype/delivery_note/delivery_note.py
@@ -17,7 +17,7 @@
from __future__ import unicode_literals
import webnotes
-from webnotes.utils import cstr, flt, getdate, cint
+from webnotes.utils import cstr, flt, cint
from webnotes.model.bean import getlist
from webnotes.model.code import get_obj
from webnotes import msgprint, _
@@ -34,6 +34,22 @@
self.doclist = doclist
self.tname = 'Delivery Note Item'
self.fname = 'delivery_note_details'
+ self.status_updater = [{
+ 'source_dt': 'Delivery Note Item',
+ 'target_dt': 'Sales Order Item',
+ 'join_field': 'prevdoc_detail_docname',
+ 'target_field': 'delivered_qty',
+ 'target_parent_dt': 'Sales Order',
+ 'target_parent_field': 'per_delivered',
+ 'target_ref_field': 'qty',
+ 'source_field': 'qty',
+ 'percent_join_field': 'prevdoc_docname',
+ 'status_field': 'delivery_status',
+ 'keyword': 'Delivered'
+ }]
+
+ def set_customer_defaults(self):
+ self.get_default_customer_shipping_address()
def validate_fiscal_year(self):
get_obj('Sales Common').validate_fiscal_year(self.doc.fiscal_year,self.doc.posting_date,'Posting Date')
@@ -75,28 +91,6 @@
d.actual_qty = actual_qty and flt(actual_qty[0][0]) or 0
- def get_tc_details(self):
- return get_obj('Sales Common').get_tc_details(self)
-
- def get_item_details(self, args=None):
- import json
- args = args and json.loads(args) or {}
- if args.get('item_code'):
- return get_obj('Sales Common').get_item_details(args, self)
- else:
- obj = get_obj('Sales Common')
- for doc in self.doclist:
- if doc.fields.get('item_code'):
- arg = {
- 'item_code':doc.fields.get('item_code'),
- 'expense_account':doc.fields.get('expense_account'),
- 'cost_center': doc.fields.get('cost_center'),
- 'warehouse': doc.fields.get('warehouse')};
- ret = obj.get_item_defaults(arg)
- for r in ret:
- if not doc.fields.get(r):
- doc.fields[r] = ret[r]
-
def get_barcode_details(self, barcode):
return get_obj('Sales Common').get_barcode_details(barcode)
@@ -105,25 +99,9 @@
"""Re-calculates Basic Rate & amount based on Price List Selected"""
get_obj('Sales Common').get_adj_percent(self)
-
- def get_actual_qty(self,args):
- """Get Actual Qty of item in warehouse selected"""
- return get_obj('Sales Common').get_available_qty(eval(args))
-
-
def get_rate(self,arg):
return get_obj('Sales Common').get_rate(arg)
-
- def load_default_taxes(self):
- self.doclist = get_obj('Sales Common').load_default_taxes(self)
-
-
- def get_other_charges(self):
- """Pull details from Sales Taxes and Charges Master"""
- self.doclist = get_obj('Sales Common').get_other_charges(self)
-
-
def so_required(self):
"""check in manage account if sales order required or not"""
if webnotes.conn.get_value('Global Defaults', 'Global Defaults', 'so_required') == 'Yes':
@@ -146,13 +124,11 @@
sales_com_obj.check_stop_sales_order(self)
sales_com_obj.check_active_sales_items(self)
sales_com_obj.get_prevdoc_date(self)
- self.validate_mandatory()
self.validate_reference_value()
self.validate_for_items()
self.validate_warehouse()
sales_com_obj.validate_max_discount(self, 'delivery_note_details')
- sales_com_obj.get_allocated_sum(self)
sales_com_obj.check_conversion_rate(self)
# Set actual qty for each item in selected warehouse
@@ -163,12 +139,6 @@
if not self.doc.installation_status: self.doc.installation_status = 'Not Installed'
- def validate_mandatory(self):
- if self.doc.amended_from and not self.doc.amendment_date:
- msgprint("Please Enter Amendment Date")
- raise Exception, "Validation Error. "
-
-
def validate_proj_cust(self):
"""check for does customer belong to same project as entered.."""
if self.doc.project_name and self.doc.customer:
@@ -261,8 +231,8 @@
sl_obj.update_serial_record(self, 'delivery_note_details', is_submit = 1, is_incoming = 0)
sl_obj.update_serial_record(self, 'packing_details', is_submit = 1, is_incoming = 0)
- # update delivered qty in sales order
- get_obj("Sales Common").update_prevdoc_detail(1,self)
+ # update delivered qty in sales order
+ self.update_prevdoc_status()
# create stock ledger entry
self.update_stock_ledger(update_stock = 1)
@@ -309,7 +279,8 @@
sl.update_serial_record(self, 'delivery_note_details', is_submit = 0, is_incoming = 0)
sl.update_serial_record(self, 'packing_details', is_submit = 0, is_incoming = 0)
- sales_com_obj.update_prevdoc_detail(0,self)
+ self.update_prevdoc_status()
+
self.update_stock_ledger(update_stock = -1)
webnotes.conn.set(self.doc, 'status', 'Cancelled')
self.cancel_packing_slips()
@@ -419,4 +390,4 @@
if gl_entries:
from accounts.general_ledger import make_gl_entries
- make_gl_entries(gl_entries, cancel=(self.doc.docstatus == 2))
\ No newline at end of file
+ make_gl_entries(gl_entries, cancel=(self.doc.docstatus == 2))
diff --git a/stock/doctype/delivery_note/delivery_note.txt b/stock/doctype/delivery_note/delivery_note.txt
index 36c2789..74a21b3 100644
--- a/stock/doctype/delivery_note/delivery_note.txt
+++ b/stock/doctype/delivery_note/delivery_note.txt
@@ -1,8 +1,8 @@
[
{
- "creation": "2013-04-02 10:50:50",
+ "creation": "2013-05-24 19:29:09",
"docstatus": 0,
- "modified": "2013-02-02 19:18:38",
+ "modified": "2013-06-05 19:22:52",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -11,6 +11,7 @@
"autoname": "naming_series:",
"doctype": "DocType",
"document_type": "Transaction",
+ "hide_toolbar": 0,
"in_create": 0,
"is_submittable": 1,
"module": "Stock",
@@ -32,7 +33,9 @@
"parent": "Delivery Note",
"parentfield": "permissions",
"parenttype": "DocType",
- "read": 1
+ "permlevel": 0,
+ "read": 1,
+ "report": 1
},
{
"doctype": "DocType",
@@ -76,10 +79,11 @@
"search_index": 1
},
{
+ "depends_on": "customer",
"doctype": "DocField",
"fieldname": "customer_name",
"fieldtype": "Data",
- "hidden": 1,
+ "hidden": 0,
"in_list_view": 1,
"label": "Customer Name",
"read_only": 1
@@ -96,34 +100,38 @@
"read_only": 1
},
{
+ "depends_on": "customer",
"doctype": "DocField",
"fieldname": "address_display",
"fieldtype": "Small Text",
- "hidden": 1,
+ "hidden": 0,
"label": "Shipping Address",
"read_only": 1
},
{
+ "depends_on": "customer",
"doctype": "DocField",
"fieldname": "contact_display",
"fieldtype": "Small Text",
- "hidden": 1,
+ "hidden": 0,
"label": "Contact",
"read_only": 1
},
{
+ "depends_on": "customer",
"doctype": "DocField",
"fieldname": "contact_mobile",
"fieldtype": "Text",
- "hidden": 1,
+ "hidden": 0,
"label": "Mobile No",
"read_only": 1
},
{
+ "depends_on": "customer",
"doctype": "DocField",
"fieldname": "contact_email",
"fieldtype": "Text",
- "hidden": 1,
+ "hidden": 0,
"label": "Contact Email",
"print_hide": 1,
"read_only": 1
@@ -136,6 +144,37 @@
"read_only": 0
},
{
+ "allow_on_submit": 0,
+ "doctype": "DocField",
+ "fieldname": "amended_from",
+ "fieldtype": "Data",
+ "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",
"description": "The date at which current entry will get or has actually executed.",
"doctype": "DocField",
@@ -206,108 +245,39 @@
},
{
"doctype": "DocField",
- "fieldname": "items",
- "fieldtype": "Section Break",
- "label": "Items",
- "oldfieldtype": "Section Break",
- "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
- },
- {
- "doctype": "DocField",
- "fieldname": "sales_bom_help",
- "fieldtype": "HTML",
- "label": "Sales BOM Help",
- "print_hide": 1,
- "read_only": 0
- },
- {
- "doctype": "DocField",
- "fieldname": "section_break0",
- "fieldtype": "Section Break",
- "options": "Simple",
- "read_only": 0
- },
- {
- "doctype": "DocField",
- "fieldname": "col_break24",
- "fieldtype": "Column Break",
- "read_only": 0
- },
- {
- "doctype": "DocField",
- "fieldname": "net_total",
- "fieldtype": "Currency",
- "label": "Net Total*",
- "no_copy": 0,
- "oldfieldname": "net_total",
- "oldfieldtype": "Currency",
- "options": "Company:company:default_currency",
- "print_hide": 0,
- "print_width": "150px",
- "read_only": 1,
- "reqd": 0,
- "width": "150px"
- },
- {
- "doctype": "DocField",
- "fieldname": "recalculate_values",
- "fieldtype": "Button",
- "label": "Re-Calculate Values",
- "oldfieldtype": "Button",
- "read_only": 0
- },
- {
- "doctype": "DocField",
- "fieldname": "col_break28",
- "fieldtype": "Column Break",
- "read_only": 0
- },
- {
- "description": "You can make a delivery note from multiple sales orders. Select sales orders one by one and click on the button below.",
- "doctype": "DocField",
- "fieldname": "sales_order_no",
- "fieldtype": "Link",
- "in_list_view": 1,
- "label": "Sales Order No",
- "no_copy": 0,
- "oldfieldname": "sales_order_no",
- "oldfieldtype": "Link",
- "options": "Sales Order",
- "print_hide": 0,
- "read_only": 0
- },
- {
- "doctype": "DocField",
- "fieldname": "get_items",
- "fieldtype": "Button",
- "hidden": 0,
- "label": "Get Items",
- "oldfieldtype": "Button",
- "options": "pull_sales_order_details",
- "print_hide": 1,
- "read_only": 0
- },
- {
- "doctype": "DocField",
"fieldname": "sec_break25",
"fieldtype": "Section Break",
"label": "Price List and Currency",
"read_only": 0
},
{
+ "description": "Customer's Currency",
+ "doctype": "DocField",
+ "fieldname": "currency",
+ "fieldtype": "Link",
+ "label": "Currency",
+ "oldfieldname": "currency",
+ "oldfieldtype": "Select",
+ "options": "Currency",
+ "print_hide": 1,
+ "read_only": 0,
+ "reqd": 1
+ },
+ {
+ "default": "1.00",
+ "description": "Rate at which customer's currency is converted to company's base currency",
+ "doctype": "DocField",
+ "fieldname": "conversion_rate",
+ "fieldtype": "Float",
+ "label": "Conversion 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",
@@ -349,41 +319,125 @@
},
{
"doctype": "DocField",
- "fieldname": "column_break2",
- "fieldtype": "Column Break",
- "print_width": "50%",
- "read_only": 0,
- "width": "50%"
+ "fieldname": "items",
+ "fieldtype": "Section Break",
+ "label": "Items",
+ "oldfieldtype": "Section Break",
+ "read_only": 0
},
{
- "description": "Customer's Currency",
+ "allow_on_submit": 1,
"doctype": "DocField",
- "fieldname": "currency",
- "fieldtype": "Link",
- "label": "Currency",
- "oldfieldname": "currency",
- "oldfieldtype": "Select",
- "options": "Currency",
- "print_hide": 1,
- "read_only": 0,
- "reqd": 1
- },
- {
- "default": "1.00",
- "description": "Rate at which customer's currency is converted to company's base currency",
- "doctype": "DocField",
- "fieldname": "conversion_rate",
- "fieldtype": "Float",
- "label": "Conversion Rate",
+ "fieldname": "delivery_note_details",
+ "fieldtype": "Table",
+ "label": "Delivery Note Items",
"no_copy": 0,
- "oldfieldname": "conversion_rate",
- "oldfieldtype": "Currency",
- "print_hide": 1,
+ "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",
+ "print_hide": 1,
+ "read_only": 0
+ },
+ {
+ "doctype": "DocField",
+ "fieldname": "packing_details",
+ "fieldtype": "Table",
+ "label": "Packing Details",
+ "oldfieldname": "packing_details",
+ "oldfieldtype": "Table",
+ "options": "Delivery Note Packing 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_break0",
+ "fieldtype": "Section Break",
+ "options": "Simple",
+ "read_only": 0
+ },
+ {
+ "description": "You can make a delivery note from multiple sales orders. Select sales orders one by one and click on the button below.",
+ "doctype": "DocField",
+ "fieldname": "sales_order_no",
+ "fieldtype": "Link",
+ "in_list_view": 1,
+ "label": "Sales Order No",
+ "no_copy": 0,
+ "oldfieldname": "sales_order_no",
+ "oldfieldtype": "Link",
+ "options": "Sales Order",
+ "print_hide": 0,
+ "read_only": 0
+ },
+ {
+ "doctype": "DocField",
+ "fieldname": "get_items",
+ "fieldtype": "Button",
+ "hidden": 0,
+ "label": "Get Items",
+ "oldfieldtype": "Button",
+ "options": "pull_sales_order_details",
+ "print_hide": 1,
+ "read_only": 0
+ },
+ {
+ "doctype": "DocField",
+ "fieldname": "col_break24",
+ "fieldtype": "Column Break",
+ "read_only": 0
+ },
+ {
+ "doctype": "DocField",
+ "fieldname": "net_total_export",
+ "fieldtype": "Currency",
+ "label": "Net Total (Export)",
+ "options": "currency",
+ "read_only": 1
+ },
+ {
+ "doctype": "DocField",
+ "fieldname": "net_total",
+ "fieldtype": "Currency",
+ "label": "Net Total*",
+ "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": "recalculate_values",
+ "fieldtype": "Button",
+ "label": "Re-Calculate Values",
+ "oldfieldtype": "Button",
+ "read_only": 0
+ },
+ {
+ "doctype": "DocField",
"fieldname": "taxes",
"fieldtype": "Section Break",
"label": "Taxes",
@@ -404,6 +458,11 @@
},
{
"doctype": "DocField",
+ "fieldname": "column_break_39",
+ "fieldtype": "Column Break"
+ },
+ {
+ "doctype": "DocField",
"fieldname": "get_charges",
"fieldtype": "Button",
"label": "Get Taxes and Charges",
@@ -413,6 +472,11 @@
},
{
"doctype": "DocField",
+ "fieldname": "section_break_41",
+ "fieldtype": "Section Break"
+ },
+ {
+ "doctype": "DocField",
"fieldname": "other_charges",
"fieldtype": "Table",
"label": "Sales Taxes and Charges",
@@ -424,6 +488,28 @@
},
{
"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 (Export)",
+ "options": "company",
+ "print_hide": 1,
+ "read_only": 1
+ },
+ {
+ "doctype": "DocField",
"fieldname": "other_charges_total",
"fieldtype": "Currency",
"label": "Taxes and Charges Total",
@@ -437,6 +523,11 @@
},
{
"doctype": "DocField",
+ "fieldname": "column_break_47",
+ "fieldtype": "Column Break"
+ },
+ {
+ "doctype": "DocField",
"fieldname": "calculate_charges",
"fieldtype": "Button",
"label": "Calculate Charges",
@@ -446,14 +537,6 @@
},
{
"doctype": "DocField",
- "fieldname": "other_charges_calculation",
- "fieldtype": "HTML",
- "label": "Taxes and Charges Calculation",
- "oldfieldtype": "HTML",
- "read_only": 0
- },
- {
- "doctype": "DocField",
"fieldname": "totals",
"fieldtype": "Section Break",
"label": "Totals",
@@ -463,56 +546,6 @@
},
{
"doctype": "DocField",
- "fieldname": "grand_total",
- "fieldtype": "Currency",
- "label": "Grand Total",
- "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",
- "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",
- "no_copy": 0,
- "oldfieldname": "in_words",
- "oldfieldtype": "Data",
- "print_hide": 1,
- "print_width": "200px",
- "read_only": 1,
- "width": "200px"
- },
- {
- "doctype": "DocField",
- "fieldname": "column_break3",
- "fieldtype": "Column Break",
- "oldfieldtype": "Column Break",
- "read_only": 0
- },
- {
- "doctype": "DocField",
"fieldname": "grand_total_export",
"fieldtype": "Currency",
"label": "Grand Total (Export)",
@@ -556,6 +589,56 @@
},
{
"doctype": "DocField",
+ "fieldname": "column_break3",
+ "fieldtype": "Column Break",
+ "oldfieldtype": "Column Break",
+ "read_only": 0
+ },
+ {
+ "doctype": "DocField",
+ "fieldname": "grand_total",
+ "fieldtype": "Currency",
+ "label": "Grand Total",
+ "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",
+ "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",
+ "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",
@@ -575,23 +658,22 @@
},
{
"doctype": "DocField",
+ "fieldname": "column_break_59",
+ "fieldtype": "Column Break"
+ },
+ {
+ "doctype": "DocField",
"fieldname": "get_terms",
"fieldtype": "Button",
"label": "Get Terms and Conditions",
"oldfieldtype": "Button",
- "options": "get_tc_details",
"print_hide": 1,
"read_only": 0
},
{
"doctype": "DocField",
- "fieldname": "terms_html",
- "fieldtype": "HTML",
- "label": "Terms and Conditions HTML",
- "oldfieldtype": "HTML",
- "options": "You can add Terms and Notes that will be printed in the Transaction",
- "print_hide": 1,
- "read_only": 0
+ "fieldname": "section_break_61",
+ "fieldtype": "Section Break"
},
{
"doctype": "DocField",
@@ -612,15 +694,6 @@
},
{
"doctype": "DocField",
- "fieldname": "column_break4",
- "fieldtype": "Column Break",
- "print_hide": 1,
- "print_width": "50%",
- "read_only": 0,
- "width": "50%"
- },
- {
- "doctype": "DocField",
"fieldname": "transporter_name",
"fieldtype": "Data",
"label": "Transporter Name",
@@ -672,6 +745,7 @@
"width": "100px"
},
{
+ "depends_on": "customer",
"doctype": "DocField",
"fieldname": "contact_info",
"fieldtype": "Section Break",
@@ -680,32 +754,6 @@
},
{
"doctype": "DocField",
- "fieldname": "col_break20",
- "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": "col_break21",
- "fieldtype": "Column Break",
- "print_width": "50%",
- "read_only": 0,
- "width": "50%"
- },
- {
- "doctype": "DocField",
"fieldname": "territory",
"fieldtype": "Link",
"hidden": 0,
@@ -729,6 +777,24 @@
"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
+ },
+ {
"description": "Filling in Additional Information about the Delivery Note will help you analyze your data better.",
"doctype": "DocField",
"fieldname": "more_info",
@@ -739,6 +805,52 @@
"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",
@@ -755,19 +867,17 @@
"width": "100px"
},
{
- "default": "Draft",
"doctype": "DocField",
- "fieldname": "status",
+ "fieldname": "fiscal_year",
"fieldtype": "Select",
"in_filter": 1,
- "label": "Status",
- "no_copy": 1,
- "oldfieldname": "status",
+ "label": "Fiscal Year",
+ "oldfieldname": "fiscal_year",
"oldfieldtype": "Select",
- "options": "\nDraft\nSubmitted\nCancelled",
+ "options": "link:Fiscal Year",
"print_hide": 1,
"print_width": "150px",
- "read_only": 1,
+ "read_only": 0,
"reqd": 1,
"search_index": 1,
"width": "150px"
@@ -799,42 +909,6 @@
"report_hide": 1
},
{
- "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
- },
- {
- "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
- },
- {
- "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
- },
- {
"allow_on_submit": 1,
"doctype": "DocField",
"fieldname": "print_without_amount",
@@ -847,13 +921,26 @@
},
{
"doctype": "DocField",
- "fieldname": "column_break5",
- "fieldtype": "Column Break",
- "oldfieldtype": "Column Break",
+ "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": "50%",
- "read_only": 0,
- "width": "50%"
+ "print_width": "150px",
+ "read_only": 1,
+ "reqd": 1,
+ "search_index": 1,
+ "width": "150px"
},
{
"depends_on": "eval:!doc.__islocal",
@@ -908,32 +995,9 @@
"read_only": 0
},
{
- "allow_on_submit": 0,
"doctype": "DocField",
- "fieldname": "amended_from",
- "fieldtype": "Data",
- "label": "Amended From",
- "no_copy": 1,
- "oldfieldname": "amended_from",
- "oldfieldtype": "Data",
- "print_hide": 1,
- "print_width": "150px",
- "read_only": 1,
- "width": "150px"
- },
- {
- "description": "The date at which current entry is corrected in the system.",
- "doctype": "DocField",
- "fieldname": "amendment_date",
- "fieldtype": "Date",
- "label": "Amendment Date",
- "no_copy": 1,
- "oldfieldname": "amendment_date",
- "oldfieldtype": "Date",
- "print_hide": 1,
- "print_width": "100px",
- "read_only": 0,
- "width": "100px"
+ "fieldname": "column_break_89",
+ "fieldtype": "Column Break"
},
{
"description": "Required only for sample item.",
@@ -970,72 +1034,6 @@
"read_only": 0
},
{
- "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"
- },
- {
- "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"
- },
- {
- "depends_on": "eval:!doc.__islocal",
- "doctype": "DocField",
- "fieldname": "cancel_reason",
- "fieldtype": "Data",
- "hidden": 0,
- "label": "Cancel Reason",
- "no_copy": 1,
- "oldfieldname": "cancel_reason",
- "oldfieldtype": "Data",
- "print_hide": 1,
- "read_only": 1
- },
- {
- "doctype": "DocField",
- "fieldname": "packing_list",
- "fieldtype": "Section Break",
- "label": "Packing List",
- "oldfieldtype": "Section Break",
- "print_hide": 1,
- "read_only": 0
- },
- {
- "doctype": "DocField",
- "fieldname": "packing_details",
- "fieldtype": "Table",
- "label": "Packing Details",
- "oldfieldname": "packing_details",
- "oldfieldtype": "Table",
- "options": "Delivery Note Packing Item",
- "print_hide": 1,
- "read_only": 1
- },
- {
"doctype": "DocField",
"fieldname": "sales_team_section_break",
"fieldtype": "Section Break",
@@ -1046,15 +1044,6 @@
},
{
"doctype": "DocField",
- "fieldname": "column_break6",
- "fieldtype": "Column Break",
- "print_hide": 1,
- "print_width": "50%",
- "read_only": 0,
- "width": "50%"
- },
- {
- "doctype": "DocField",
"fieldname": "sales_partner",
"fieldtype": "Link",
"label": "Sales Partner",
@@ -1125,96 +1114,39 @@
"cancel": 1,
"create": 1,
"doctype": "DocPerm",
- "permlevel": 0,
- "report": 1,
"role": "Material User",
"submit": 1,
"write": 1
},
{
- "amend": 0,
- "cancel": 0,
- "create": 0,
- "doctype": "DocPerm",
- "match": "",
- "permlevel": 1,
- "report": 0,
- "role": "Material User",
- "submit": 0,
- "write": 0
- },
- {
"amend": 1,
"cancel": 1,
"create": 1,
"doctype": "DocPerm",
- "permlevel": 0,
- "report": 1,
"role": "Material Manager",
"submit": 1,
"write": 1
},
{
- "amend": 0,
- "cancel": 0,
- "create": 0,
- "doctype": "DocPerm",
- "match": "",
- "permlevel": 1,
- "report": 0,
- "role": "Material Manager",
- "submit": 0,
- "write": 0
- },
- {
"amend": 1,
"cancel": 1,
"create": 1,
"doctype": "DocPerm",
- "match": "",
- "permlevel": 0,
- "report": 1,
"role": "Sales User",
"submit": 1,
"write": 1
},
{
- "amend": 0,
"cancel": 0,
"create": 0,
"doctype": "DocPerm",
- "match": "",
- "permlevel": 1,
- "report": 0,
- "role": "Sales User",
- "submit": 0,
- "write": 0
- },
- {
- "cancel": 0,
- "create": 0,
- "doctype": "DocPerm",
- "permlevel": 0,
- "report": 1,
"role": "Accounts User",
"submit": 0,
"write": 0
},
{
- "amend": 0,
- "cancel": 0,
- "create": 0,
- "doctype": "DocPerm",
- "match": "",
- "permlevel": 1,
- "role": "Accounts User",
- "submit": 0
- },
- {
"doctype": "DocPerm",
"match": "customer_name",
- "permlevel": 0,
- "report": 1,
"role": "Customer"
}
]
\ No newline at end of file
diff --git a/stock/doctype/delivery_note_item/README.md b/stock/doctype/delivery_note_item/README.md
new file mode 100644
index 0000000..b3ca17e
--- /dev/null
+++ b/stock/doctype/delivery_note_item/README.md
@@ -0,0 +1 @@
+Item shipped in parent Delivery Note.
\ No newline at end of file
diff --git a/stock/doctype/delivery_note_item/delivery_note_item.txt b/stock/doctype/delivery_note_item/delivery_note_item.txt
index f90ba69..a8eda20 100644
--- a/stock/doctype/delivery_note_item/delivery_note_item.txt
+++ b/stock/doctype/delivery_note_item/delivery_note_item.txt
@@ -2,7 +2,7 @@
{
"creation": "2013-04-22 13:15:44",
"docstatus": 0,
- "modified": "2013-05-22 12:05:32",
+ "modified": "2013-05-22 12:15:32",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -120,7 +120,7 @@
"options": "currency",
"print_hide": 1,
"print_width": "100px",
- "read_only": 0,
+ "read_only": 1,
"reqd": 0,
"width": "100px"
},
@@ -189,7 +189,7 @@
"options": "Company:company:default_currency",
"print_hide": 1,
"print_width": "150px",
- "read_only": 0,
+ "read_only": 1,
"reqd": 0,
"width": "150px"
},
diff --git a/stock/doctype/delivery_note_packing_item/README.md b/stock/doctype/delivery_note_packing_item/README.md
new file mode 100644
index 0000000..20c343a
--- /dev/null
+++ b/stock/doctype/delivery_note_packing_item/README.md
@@ -0,0 +1 @@
+Item packed in parent Delivery Note. If shipped Items are of type Sales BOM, then this table contains the exploded list of Items shipped.
\ No newline at end of file
diff --git a/stock/doctype/featured_item/featured_item.py b/stock/doctype/featured_item/featured_item.py
deleted file mode 100644
index 7f48feb..0000000
--- a/stock/doctype/featured_item/featured_item.py
+++ /dev/null
@@ -1,22 +0,0 @@
-# ERPNext - web based ERP (http://erpnext.com)
-# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-from __future__ import unicode_literals
-import webnotes
-
-class DocType:
- def __init__(self, d, dl):
- self.doc, self.doclist = d, dl
\ No newline at end of file
diff --git a/stock/doctype/featured_item/featured_item.txt b/stock/doctype/featured_item/featured_item.txt
deleted file mode 100644
index 5c91e87..0000000
--- a/stock/doctype/featured_item/featured_item.txt
+++ /dev/null
@@ -1,35 +0,0 @@
-[
- {
- "creation": "2013-02-22 01:28:00",
- "docstatus": 0,
- "modified": "2013-03-07 07:03:21",
- "modified_by": "Administrator",
- "owner": "Administrator"
- },
- {
- "description": "Featured Item in Item Group",
- "doctype": "DocType",
- "istable": 1,
- "module": "Stock",
- "name": "__common__"
- },
- {
- "doctype": "DocField",
- "fieldname": "item",
- "fieldtype": "Link",
- "label": "Item",
- "name": "__common__",
- "options": "Item",
- "parent": "Featured Item",
- "parentfield": "fields",
- "parenttype": "DocType",
- "permlevel": 0
- },
- {
- "doctype": "DocType",
- "name": "Featured Item"
- },
- {
- "doctype": "DocField"
- }
-]
\ No newline at end of file
diff --git a/stock/doctype/featured_item/locale/_messages_doc.json b/stock/doctype/featured_item/locale/_messages_doc.json
deleted file mode 100644
index 37968bd..0000000
--- a/stock/doctype/featured_item/locale/_messages_doc.json
+++ /dev/null
@@ -1,6 +0,0 @@
-[
- "Item",
- "Featured Item in Item Group",
- "Featured Item",
- "Stock"
-]
\ No newline at end of file
diff --git a/stock/doctype/featured_item/locale/ar-doc.json b/stock/doctype/featured_item/locale/ar-doc.json
deleted file mode 100644
index 2576bae..0000000
--- a/stock/doctype/featured_item/locale/ar-doc.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "Featured Item": "\u0645\u0645\u064a\u0632\u0629",
- "Featured Item in Item Group": "\u0645\u0645\u064a\u0632\u0629 \u0641\u064a \u0627\u0644\u0645\u062c\u0645\u0648\u0639\u0629 \u0627\u0644\u0633\u0644\u0639\u0629",
- "Item": "\u0628\u0646\u062f",
- "Stock": "\u0627\u0644\u0623\u0648\u0631\u0627\u0642 \u0627\u0644\u0645\u0627\u0644\u064a\u0629"
-}
\ No newline at end of file
diff --git a/stock/doctype/featured_item/locale/de-doc.json b/stock/doctype/featured_item/locale/de-doc.json
deleted file mode 100644
index 0ab4a0e..0000000
--- a/stock/doctype/featured_item/locale/de-doc.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "Featured Item": "Feature-Produkt",
- "Featured Item in Item Group": "Feature-Produkt bei Posten Gruppe",
- "Item": "Artikel",
- "Stock": "Lager"
-}
\ No newline at end of file
diff --git a/stock/doctype/featured_item/locale/es-doc.json b/stock/doctype/featured_item/locale/es-doc.json
deleted file mode 100644
index b0e3074..0000000
--- a/stock/doctype/featured_item/locale/es-doc.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "Featured Item": "Producto destacado",
- "Featured Item in Item Group": "Producto destacado en el Grupo del art\u00edculo",
- "Item": "Art\u00edculo",
- "Stock": "Valores"
-}
\ No newline at end of file
diff --git a/stock/doctype/featured_item/locale/fr-doc.json b/stock/doctype/featured_item/locale/fr-doc.json
deleted file mode 100644
index b47f8f3..0000000
--- a/stock/doctype/featured_item/locale/fr-doc.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "Featured Item": "Produit vedette",
- "Featured Item in Item Group": "Produit vedette dans le groupe d'article",
- "Item": "Article",
- "Stock": "Stock"
-}
\ No newline at end of file
diff --git a/stock/doctype/featured_item/locale/hi-doc.json b/stock/doctype/featured_item/locale/hi-doc.json
deleted file mode 100644
index 2577c42..0000000
--- a/stock/doctype/featured_item/locale/hi-doc.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "Featured Item": "\u0935\u093f\u0936\u0947\u0937 \u0930\u0941\u092a \u0938\u0947 \u092a\u094d\u0930\u0926\u0930\u094d\u0936\u093f\u0924 \u0906\u0907\u091f\u092e",
- "Featured Item in Item Group": "\u0906\u0907\u091f\u092e \u0938\u092e\u0942\u0939 \u092e\u0947\u0902 \u091a\u093f\u0924\u094d\u0930\u093f\u0924 \u0906\u0907\u091f\u092e",
- "Item": "\u092e\u0926",
- "Stock": "\u0938\u094d\u091f\u0949\u0915"
-}
\ No newline at end of file
diff --git a/stock/doctype/featured_item/locale/hr-doc.json b/stock/doctype/featured_item/locale/hr-doc.json
deleted file mode 100644
index d4e50ea..0000000
--- a/stock/doctype/featured_item/locale/hr-doc.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "Featured Item": "Prikazan artikla",
- "Featured Item in Item Group": "Prikazan artikla u to\u010dki Grupe",
- "Item": "Stavka",
- "Stock": "Zaliha"
-}
\ No newline at end of file
diff --git a/stock/doctype/featured_item/locale/nl-doc.json b/stock/doctype/featured_item/locale/nl-doc.json
deleted file mode 100644
index c3a5b4d..0000000
--- a/stock/doctype/featured_item/locale/nl-doc.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "Featured Item": "Featured Product",
- "Featured Item in Item Group": "Featured Product in punt Group",
- "Item": "Item",
- "Stock": "Voorraad"
-}
\ No newline at end of file
diff --git a/stock/doctype/featured_item/locale/pt-BR-doc.json b/stock/doctype/featured_item/locale/pt-BR-doc.json
deleted file mode 100644
index f4f543a..0000000
--- a/stock/doctype/featured_item/locale/pt-BR-doc.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "Featured Item": "Item Destacado",
- "Featured Item in Item Group": "Item destacado no Grupo de Itens",
- "Item": "Item",
- "Stock": "Estoque"
-}
\ No newline at end of file
diff --git a/stock/doctype/featured_item/locale/pt-doc.json b/stock/doctype/featured_item/locale/pt-doc.json
deleted file mode 100644
index 20fcc31..0000000
--- a/stock/doctype/featured_item/locale/pt-doc.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "Featured Item": "Item Destacado",
- "Featured Item in Item Group": "Item destacado no Grupo item",
- "Item": "Item",
- "Stock": "Estoque"
-}
\ No newline at end of file
diff --git a/stock/doctype/featured_item/locale/sr-doc.json b/stock/doctype/featured_item/locale/sr-doc.json
deleted file mode 100644
index 7f455c0..0000000
--- a/stock/doctype/featured_item/locale/sr-doc.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "Featured Item": "\u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0459\u0430\u043c\u043e",
- "Featured Item in Item Group": "\u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0459\u0430\u043c\u043e \u0442\u0430\u0447\u043a\u0430 \u0443 \u0433\u0440\u0443\u043f\u0438 \u0430\u0440\u0442\u0438\u043a\u043b\u0430",
- "Item": "\u0421\u0442\u0430\u0432\u043a\u0430",
- "Stock": "\u0417\u0430\u043b\u0438\u0445\u0430"
-}
\ No newline at end of file
diff --git a/stock/doctype/featured_item/locale/ta-doc.json b/stock/doctype/featured_item/locale/ta-doc.json
deleted file mode 100644
index bb9be70..0000000
--- a/stock/doctype/featured_item/locale/ta-doc.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "Featured Item": "\u0b87\u0b9f\u0bae\u0bcd\u0baa\u0bc6\u0bb1\u0bcd\u0bb1\u0bbf\u0bb0\u0bc1\u0ba8\u0bcd\u0ba4\u0ba4\u0bc1 \u0baa\u0bc6\u0bbe\u0bb0\u0bc1\u0bb3\u0bcd",
- "Featured Item in Item Group": "\u0baa\u0bc6\u0bbe\u0bb0\u0bc1\u0bb3\u0bcd \u0baa\u0bbf\u0bb0\u0bbf\u0bb5\u0bc1 \u0b87\u0b9f\u0bae\u0bcd\u0baa\u0bc6\u0bb1\u0bcd\u0bb1\u0ba4\u0bc1 \u0baa\u0bc6\u0bbe\u0bb0\u0bc1\u0bb3\u0bcd",
- "Item": "\u0b89\u0bb0\u0bc1\u0baa\u0bcd\u0baa\u0b9f\u0bbf",
- "Stock": "\u0baa\u0b99\u0bcd\u0b95\u0bc1"
-}
\ No newline at end of file
diff --git a/stock/doctype/featured_item/locale/th-doc.json b/stock/doctype/featured_item/locale/th-doc.json
deleted file mode 100644
index a79d3d0..0000000
--- a/stock/doctype/featured_item/locale/th-doc.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "Featured Item": "\u0e23\u0e32\u0e22\u0e01\u0e32\u0e23\u0e40\u0e14\u0e48\u0e19",
- "Featured Item in Item Group": "\u0e23\u0e32\u0e22\u0e01\u0e32\u0e23\u0e17\u0e35\u0e48\u0e42\u0e14\u0e14\u0e40\u0e14\u0e48\u0e19\u0e43\u0e19\u0e01\u0e25\u0e38\u0e48\u0e21\u0e2a\u0e34\u0e19\u0e04\u0e49\u0e32",
- "Item": "\u0e0a\u0e34\u0e49\u0e19",
- "Stock": "\u0e04\u0e25\u0e31\u0e07\u0e2a\u0e34\u0e19\u0e04\u0e49\u0e32"
-}
\ No newline at end of file
diff --git a/stock/doctype/item/README.md b/stock/doctype/item/README.md
new file mode 100644
index 0000000..a68ee64
--- /dev/null
+++ b/stock/doctype/item/README.md
@@ -0,0 +1 @@
+Item master. Also called SKU (stock keeping unit).
\ No newline at end of file
diff --git a/stock/doctype/item/item.txt b/stock/doctype/item/item.txt
index 9e0a2fb..611ae5e 100644
--- a/stock/doctype/item/item.txt
+++ b/stock/doctype/item/item.txt
@@ -2,7 +2,7 @@
{
"creation": "2013-05-03 10:45:46",
"docstatus": 0,
- "modified": "2013-05-22 15:48:27",
+ "modified": "2013-05-22 15:49:27",
"modified_by": "Administrator",
"owner": "Administrator"
},
diff --git a/stock/doctype/item_customer_detail/README.md b/stock/doctype/item_customer_detail/README.md
new file mode 100644
index 0000000..a12ff62
--- /dev/null
+++ b/stock/doctype/item_customer_detail/README.md
@@ -0,0 +1 @@
+Item-codes used by Customers for the parent Item.
\ No newline at end of file
diff --git a/stock/doctype/item_price/README.md b/stock/doctype/item_price/README.md
new file mode 100644
index 0000000..4c4fc00
--- /dev/null
+++ b/stock/doctype/item_price/README.md
@@ -0,0 +1 @@
+Price of the Item in a particular Price List.
\ No newline at end of file
diff --git a/stock/doctype/item_quality_inspection_parameter/README.md b/stock/doctype/item_quality_inspection_parameter/README.md
new file mode 100644
index 0000000..38682e1
--- /dev/null
+++ b/stock/doctype/item_quality_inspection_parameter/README.md
@@ -0,0 +1 @@
+Quality inspection parameter for parent Item.
\ No newline at end of file
diff --git a/stock/doctype/item_reorder/README.md b/stock/doctype/item_reorder/README.md
new file mode 100644
index 0000000..cc153f6
--- /dev/null
+++ b/stock/doctype/item_reorder/README.md
@@ -0,0 +1 @@
+Warehouse-wise reorder level for the parent Item.
\ No newline at end of file
diff --git a/stock/doctype/item_supplier/README.md b/stock/doctype/item_supplier/README.md
new file mode 100644
index 0000000..a2a1808
--- /dev/null
+++ b/stock/doctype/item_supplier/README.md
@@ -0,0 +1 @@
+Supplier and supplier code for the parent Item.
\ No newline at end of file
diff --git a/stock/doctype/item_tax/README.md b/stock/doctype/item_tax/README.md
new file mode 100644
index 0000000..fb09b62
--- /dev/null
+++ b/stock/doctype/item_tax/README.md
@@ -0,0 +1 @@
+Tax rate for this Item against the specified Account.
\ No newline at end of file
diff --git a/stock/doctype/item_website_specification/README.md b/stock/doctype/item_website_specification/README.md
new file mode 100644
index 0000000..658358c
--- /dev/null
+++ b/stock/doctype/item_website_specification/README.md
@@ -0,0 +1 @@
+Specification detail / parameter for website listing.
\ No newline at end of file
diff --git a/stock/doctype/landed_cost_item/README.md b/stock/doctype/landed_cost_item/README.md
new file mode 100644
index 0000000..b8759d9
--- /dev/null
+++ b/stock/doctype/landed_cost_item/README.md
@@ -0,0 +1 @@
+Item to whose value the selected expense is to be added.
\ No newline at end of file
diff --git a/stock/doctype/landed_cost_purchase_receipt/README.md b/stock/doctype/landed_cost_purchase_receipt/README.md
new file mode 100644
index 0000000..b67dc6a
--- /dev/null
+++ b/stock/doctype/landed_cost_purchase_receipt/README.md
@@ -0,0 +1 @@
+Purchase Receipt where the expense is to be added.
\ No newline at end of file
diff --git a/stock/doctype/landed_cost_wizard/README.md b/stock/doctype/landed_cost_wizard/README.md
new file mode 100644
index 0000000..0d2c20d
--- /dev/null
+++ b/stock/doctype/landed_cost_wizard/README.md
@@ -0,0 +1 @@
+Tool to distribute costs as part of Item value after the Item has been received. This is typically in case where bills related to Items are received much later and for multiple Item. (specially Custom Duty)
\ No newline at end of file
diff --git a/stock/doctype/material_request/README.md b/stock/doctype/material_request/README.md
new file mode 100644
index 0000000..cb535d4
--- /dev/null
+++ b/stock/doctype/material_request/README.md
@@ -0,0 +1 @@
+Request for material (Items) from internal warehouse or by purchase.
\ No newline at end of file
diff --git a/stock/doctype/material_request/material_request.js b/stock/doctype/material_request/material_request.js
index 21bc141..6c7b2a7 100644
--- a/stock/doctype/material_request/material_request.js
+++ b/stock/doctype/material_request/material_request.js
@@ -17,8 +17,8 @@
cur_frm.cscript.tname = "Material Request Item";
cur_frm.cscript.fname = "indent_details";
-wn.require('app/buying/doctype/purchase_common/purchase_common.js');
wn.require('app/utilities/doctype/sms_control/sms_control.js');
+wn.require('app/buying/doctype/purchase_common/purchase_common.js');
erpnext.buying.MaterialRequestController = erpnext.buying.BuyingController.extend({
refresh: function(doc) {
@@ -48,43 +48,20 @@
cur_frm.toggle_display("sales_order_no", false);
cur_frm.fields_dict.indent_details.grid.set_column_disp("sales_order_no", false);
}
+ },
+
+ validate_company_and_party: function(party_field) {
+ return true;
+ },
+
+ calculate_taxes_and_totals: function() {
+ return;
}
});
-var new_cscript = new erpnext.buying.MaterialRequestController({frm: cur_frm});
-
// for backward compatibility: combine new and previous states
-$.extend(cur_frm.cscript, new_cscript);
-
+$.extend(cur_frm.cscript, new erpnext.buying.MaterialRequestController({frm: cur_frm}));
-cur_frm.cscript.onload = function(doc, cdt, cdn) {
- if (!doc.transaction_date) doc.transaction_date = dateutil.obj_to_str(new Date());
- if (!doc.status) doc.status = 'Draft';
-
- // defined in purchase_common.js
- //cur_frm.cscript.update_item_details(doc, cdt, cdn);
-};
-
-cur_frm.cscript.onload_post_render = function(doc, cdt, cdn) {
- // second call
- if(doc.__islocal){
- cur_frm.cscript.get_item_defaults(doc);
- }
-};
-
-cur_frm.cscript.get_item_defaults = function(doc) {
- var ch = getchildren( 'Material Request Item', doc.name, 'indent_details');
- if (flt(ch.length) > 0){
- $c_obj(make_doclist(doc.doctype, doc.name), 'get_item_defaults', '', function(r, rt) {refresh_field('indent_details'); });
- }
-};
-
-cur_frm.cscript.transaction_date = function(doc,cdt,cdn){
- if(doc.__islocal){
- cur_frm.cscript.get_default_schedule_date(doc);
- }
-};
-
cur_frm.cscript.qty = function(doc, cdt, cdn) {
var d = locals[cdt][cdn];
if (flt(d.qty) < flt(d.min_order_qty))
diff --git a/stock/doctype/material_request/material_request.py b/stock/doctype/material_request/material_request.py
index 8a899b3..dfed6c4 100644
--- a/stock/doctype/material_request/material_request.py
+++ b/stock/doctype/material_request/material_request.py
@@ -17,9 +17,6 @@
self.tname = 'Material Request Item'
self.fname = 'indent_details'
- def get_default_schedule_date(self):
- get_obj(dt = 'Purchase Common').get_default_schedule_date(self)
-
# get available qty at warehouse
def get_bin_details(self, arg = ''):
return get_obj(dt='Purchase Common').get_bin_details(arg)
@@ -30,22 +27,12 @@
self.check_if_already_pulled()
if self.doc.sales_order_no:
get_obj('DocType Mapper', 'Sales Order-Material Request', with_children=1).dt_map('Sales Order', 'Material Request', self.doc.sales_order_no, self.doc, self.doclist, "[['Sales Order', 'Material Request'],['Sales Order Item', 'Material Request Item']]")
- self.get_item_defaults()
else:
msgprint("Please select Sales Order whose details need to pull")
def check_if_already_pulled(self):
pass#if self.[d.sales_order_no for d in getlist(self.doclist, 'indent_details')]
-
- # Get item's other details
- #- ------------------------
- def get_item_defaults(self):
- self.get_default_schedule_date()
- for d in getlist(self.doclist, 'indent_details'):
- det = webnotes.conn.sql("select min_order_qty from tabItem where name = '%s'" % d.item_code)
- d.min_order_qty = det and flt(det[0][0]) or 0
-
# Validate so items
# ----------------------------
def validate_qty_against_so(self):
@@ -77,11 +64,6 @@
def validate_fiscal_year(self):
get_obj(dt = 'Purchase Common').validate_fiscal_year(self.doc.fiscal_year,self.doc.transaction_date,'Material Request Date')
- # GET TERMS & CONDITIONS
- #-----------------------------
- def get_tc_details(self):
- return get_obj('Purchase Common').get_tc_details(self)
-
# Validate Schedule Date
#--------------------------------
def validate_schedule_date(self):
diff --git a/stock/doctype/material_request/material_request.txt b/stock/doctype/material_request/material_request.txt
index eb788e4..e7bad73 100644
--- a/stock/doctype/material_request/material_request.txt
+++ b/stock/doctype/material_request/material_request.txt
@@ -2,7 +2,7 @@
{
"creation": "2013-03-07 14:48:38",
"docstatus": 0,
- "modified": "2013-02-25 15:38:02",
+ "modified": "2013-06-11 16:16:36",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -26,12 +26,19 @@
"permlevel": 0
},
{
+ "amend": 1,
+ "cancel": 1,
+ "create": 1,
"doctype": "DocPerm",
"name": "__common__",
"parent": "Material Request",
"parentfield": "permissions",
"parenttype": "DocType",
- "read": 1
+ "permlevel": 0,
+ "read": 1,
+ "report": 1,
+ "submit": 1,
+ "write": 1
},
{
"doctype": "DocType",
@@ -72,7 +79,7 @@
"oldfieldtype": "Section Break"
},
{
- "allow_on_submit": 1,
+ "allow_on_submit": 0,
"doctype": "DocField",
"fieldname": "indent_details",
"fieldtype": "Table",
@@ -262,19 +269,6 @@
"width": "150px"
},
{
- "description": "The date at which current entry is corrected in the system.",
- "doctype": "DocField",
- "fieldname": "amendment_date",
- "fieldtype": "Date",
- "label": "Amendment Date",
- "no_copy": 1,
- "oldfieldname": "amendment_date",
- "oldfieldtype": "Date",
- "print_hide": 1,
- "print_width": "100px",
- "width": "100px"
- },
- {
"doctype": "DocField",
"fieldname": "remark",
"fieldtype": "Small Text",
@@ -311,8 +305,7 @@
"fieldname": "get_terms",
"fieldtype": "Button",
"label": "Get Terms and Conditions",
- "oldfieldtype": "Button",
- "options": "get_tc_details"
+ "oldfieldtype": "Button"
},
{
"doctype": "DocField",
@@ -332,89 +325,19 @@
"print_hide": 1
},
{
- "amend": 0,
- "cancel": 0,
- "create": 0,
"doctype": "DocPerm",
- "permlevel": 1,
- "report": 0,
- "role": "Purchase Manager",
- "submit": 0,
- "write": 0
+ "role": "Purchase Manager"
},
{
- "amend": 1,
- "cancel": 1,
- "create": 1,
"doctype": "DocPerm",
- "permlevel": 0,
- "report": 1,
- "role": "Purchase Manager",
- "submit": 1,
- "write": 1
+ "role": "Material Manager"
},
{
- "amend": 0,
- "cancel": 0,
- "create": 0,
"doctype": "DocPerm",
- "permlevel": 1,
- "report": 0,
- "role": "Material Manager",
- "submit": 0,
- "write": 0
+ "role": "Material User"
},
{
- "amend": 1,
- "cancel": 1,
- "create": 1,
"doctype": "DocPerm",
- "permlevel": 0,
- "report": 1,
- "role": "Material Manager",
- "submit": 1,
- "write": 1
- },
- {
- "amend": 0,
- "cancel": 0,
- "create": 0,
- "doctype": "DocPerm",
- "permlevel": 1,
- "report": 0,
- "role": "Material User",
- "submit": 0,
- "write": 0
- },
- {
- "amend": 1,
- "cancel": 1,
- "create": 1,
- "doctype": "DocPerm",
- "permlevel": 0,
- "report": 1,
- "role": "Material User",
- "submit": 1,
- "write": 1
- },
- {
- "amend": 1,
- "cancel": 1,
- "create": 1,
- "doctype": "DocPerm",
- "permlevel": 0,
- "report": 1,
- "role": "Purchase User",
- "submit": 1,
- "write": 1
- },
- {
- "amend": 0,
- "cancel": 0,
- "create": 0,
- "doctype": "DocPerm",
- "permlevel": 1,
- "role": "Purchase User",
- "submit": 0
+ "role": "Purchase User"
}
]
\ No newline at end of file
diff --git a/stock/doctype/material_request_item/README.md b/stock/doctype/material_request_item/README.md
new file mode 100644
index 0000000..d048c09
--- /dev/null
+++ b/stock/doctype/material_request_item/README.md
@@ -0,0 +1 @@
+Items requested in parent Material Receipt.
\ No newline at end of file
diff --git a/stock/doctype/packing_slip/README.md b/stock/doctype/packing_slip/README.md
new file mode 100644
index 0000000..63eea20
--- /dev/null
+++ b/stock/doctype/packing_slip/README.md
@@ -0,0 +1 @@
+Items contained in a package / container against Delivery Note.
\ No newline at end of file
diff --git a/stock/doctype/packing_slip/packing_slip.txt b/stock/doctype/packing_slip/packing_slip.txt
index f13b971..ed33e3f 100644
--- a/stock/doctype/packing_slip/packing_slip.txt
+++ b/stock/doctype/packing_slip/packing_slip.txt
@@ -2,7 +2,7 @@
{
"creation": "2013-04-11 15:32:24",
"docstatus": 0,
- "modified": "2013-04-16 17:33:38",
+ "modified": "2013-06-11 16:16:37",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -211,17 +211,6 @@
"read_only": 1
},
{
- "depends_on": "eval:doc.amended_from",
- "description": "The date at which current entry is corrected in the system.",
- "doctype": "DocField",
- "fieldname": "amendment_date",
- "fieldtype": "Date",
- "label": "Amendment Date",
- "no_copy": 1,
- "print_hide": 1,
- "read_only": 0
- },
- {
"doctype": "DocPerm",
"role": "Material User"
},
diff --git a/stock/doctype/packing_slip_item/README.md b/stock/doctype/packing_slip_item/README.md
new file mode 100644
index 0000000..75c4541
--- /dev/null
+++ b/stock/doctype/packing_slip_item/README.md
@@ -0,0 +1 @@
+Item detail of parent Packing Slip.
\ No newline at end of file
diff --git a/stock/doctype/purchase_receipt/README.md b/stock/doctype/purchase_receipt/README.md
new file mode 100644
index 0000000..41f6887
--- /dev/null
+++ b/stock/doctype/purchase_receipt/README.md
@@ -0,0 +1 @@
+Shipment received from Supplier against Purchase Order.
\ No newline at end of file
diff --git a/stock/doctype/purchase_receipt/purchase_receipt.js b/stock/doctype/purchase_receipt/purchase_receipt.js
index 82e494c..f405a55 100644
--- a/stock/doctype/purchase_receipt/purchase_receipt.js
+++ b/stock/doctype/purchase_receipt/purchase_receipt.js
@@ -19,10 +19,11 @@
cur_frm.cscript.other_fname = "purchase_tax_details";
wn.require('app/accounts/doctype/purchase_taxes_and_charges_master/purchase_taxes_and_charges_master.js');
-wn.require('app/buying/doctype/purchase_common/purchase_common.js');
wn.require('app/utilities/doctype/sms_control/sms_control.js');
+wn.require('app/buying/doctype/purchase_common/purchase_common.js');
-erpnext.buying.PurchaseReceiptController = erpnext.buying.BuyingController.extend({
+wn.provide("erpnext.stock");
+erpnext.stock.PurchaseReceiptController = erpnext.buying.BuyingController.extend({
refresh: function() {
this._super();
@@ -37,43 +38,49 @@
if(wn.boot.control_panel.country == 'India') {
unhide_field(['challan_no', 'challan_date']);
}
- },
- onload_post_render: function(doc, dt, dn) {
- var me = this;
- var callback = function(doc, dt, dn) {
- me.update_item_details(doc, dt, dn, function(r,rt) { });
+ },
+
+ received_qty: function(doc, cdt, cdn) {
+ var item = wn.model.get_doc(cdt, cdn);
+ wn.model.round_floats_in(item, ["qty", "received_qty"]);
+
+ item.qty = (item.qty < item.received_qty) ? item.qty : item.received_qty;
+ this.qty(doc, cdt, cdn);
+ },
+
+ qty: function(doc, cdt, cdn) {
+ var item = wn.model.get_doc(cdt, cdn);
+ wn.model.round_floats_in(item, ["qty", "received_qty"]);
+
+ if(item.qty > item.received_qty) {
+ msgprint(wn._("Error") + ": " + wn._(wn.meta.get_label(item.doctype, "qty", item.name))
+ + " > " + wn._(wn.meta.get_label(item.doctype, "received_qty", item.name)));
+ item.qty = item.rejected_qty = 0.0;
+ } else {
+ item.rejected_qty = flt(item.received_qty - item.qty, precision("rejected_qty", item));
}
- // TODO: improve this
- if(this.frm.doc.__islocal) {
- if (this.frm.fields_dict.price_list_name && this.frm.doc.price_list_name)
- this.price_list_name(callback);
- else
- callback(doc, dt, dn);
+ this._super();
+ },
+
+ rejected_qty: function(doc, cdt, cdn) {
+ var item = wn.model.get_doc(cdt, cdn);
+ wn.model.round_floats_in(item, ["received_qty", "rejected_qty"]);
+
+ if(item.rejected_qty > item.received_qty) {
+ msgprint(wn._("Error") + ": " + wn._(wn.meta.get_label(item.doctype, "rejected_qty", item.name))
+ + " > " + wn._(wn.meta.get_label(item.doctype, "received_qty", item.name)));
+ item.qty = item.rejected_qty = 0.0;
+ } else {
+ item.qty = flt(item.received_qty - item.rejected_qty, precision("qty", item));
}
- }
+
+ this.qty(doc, cdt, cdn);
+ },
});
-var new_cscript = new erpnext.buying.PurchaseReceiptController({frm: cur_frm});
-
// for backward compatibility: combine new and previous states
-$.extend(cur_frm.cscript, new_cscript);
-
-cur_frm.cscript.onload = function(doc, cdt, cdn) {
- if(!doc.fiscal_year && doc.__islocal){ wn.model.set_default_values(doc);}
- if (!doc.posting_date) doc.posting_date = dateutil.obj_to_str(new Date());
- if (!doc.transaction_date) doc.transaction_date = dateutil.obj_to_str(new Date());
- if (!doc.status) doc.status = 'Draft';
-}
-
-cur_frm.cscript.supplier = function(doc,dt,dn) {
- if (doc.supplier) {
- get_server_fields('get_default_supplier_address',
- JSON.stringify({ supplier: doc.supplier }),'', doc, dt, dn, 1, function() {
- cur_frm.refresh();
- });
- }
-}
+$.extend(cur_frm.cscript, new erpnext.stock.PurchaseReceiptController({frm: cur_frm}));
cur_frm.cscript.supplier_address = cur_frm.cscript.contact_person = function(doc,dt,dn) {
if(doc.supplier) get_server_fields('get_supplier_address', JSON.stringify({supplier: doc.supplier, address: doc.supplier_address, contact: doc.contact_person}),'', doc, dt, dn, 1);
@@ -151,81 +158,6 @@
return 'SELECT `tabPrint Heading`.name FROM `tabPrint Heading` WHERE `tabPrint Heading`.docstatus !=2 AND `tabPrint Heading`.name LIKE "%s" ORDER BY `tabPrint Heading`.name ASC LIMIT 50';
}
-//========================= Received Qty =============================================================
-
-cur_frm.cscript.received_qty = function(doc, cdt, cdn) {
- var d = locals[cdt][cdn];
- ret = {
- 'qty' : (flt(d.qty) && flt(d.qty) < flt(d.received_qty))
- ? flt(d.qty) : flt(d.received_qty),
- 'stock_qty': 0,
- 'rejected_qty' : 0,
- }
- set_multiple('Purchase Receipt Item', cdn, ret, 'purchase_receipt_details');
- cur_frm.cscript.calc_amount(doc, 2);
-}
-
-//======================== Qty (Accepted Qty) =========================================================
-
-cur_frm.cscript.qty = function(doc, cdt, cdn) {
- var d = locals[cdt][cdn];
- // Step 1 :=> Check If Qty > Received Qty
- if (flt(d.qty) > flt(d.received_qty)) {
- alert("Accepted Qty cannot be greater than Received Qty")
- ret = {
- 'qty' : 0,
- 'stock_qty': 0,
- 'rejected_qty' : 0
- }
- // => Set Qty = 0 and rejected_qty = 0
- set_multiple('Purchase Receipt Item', cdn, ret, 'purchase_receipt_details');
- cur_frm.cscript.calc_amount(doc, 2);
- // => Return
- return
- }
- // Step 2 :=> Check IF Qty <= REceived Qty
- else {
- ret = {
- 'rejected_qty':flt(d.received_qty) - flt(d.qty)
- }
- // => Set Rejected Qty = Received Qty - Qty
- set_multiple('Purchase Receipt Item', cdn, ret, 'purchase_receipt_details');
- // => Calculate Amount
- cur_frm.cscript.calc_amount(doc, 2);
- cur_frm.cscript.update_stock_qty(doc,cdt,cdn);
- }
-}
-
-//======================== Rejected Qty =========================================================
-cur_frm.cscript.rejected_qty = function(doc, cdt, cdn) {
- var d = locals[cdt][cdn];
- // Step 1 :=> Check If Rejected Qty > Received Qty
- if (flt(d.rejected_qty) > flt(d.received_qty)) {
- alert("Rejected Qty cannot be greater than Received Qty")
- ret = {
- 'qty' : 0,
- 'stock_qty': 0,
- 'rejected_qty' : 0
- }
- // => Set Qty = 0 and rejected_qty = 0
- set_multiple('Purchase Receipt Item', cdn, ret, 'purchase_receipt_details');
- cur_frm.cscript.calc_amount(doc, 2);
- // => Return
- return
- }
- // Step 2 :=> Check IF Rejected Qty <= REceived Qty
- else {
- ret = {
- 'qty':flt(d.received_qty) - flt(d.rejected_qty)
- }
- // => Set Qty = Received Qty - Rejected Qty
- set_multiple('Purchase Receipt Item', cdn, ret, 'purchase_receipt_details');
- // Calculate Amount
- cur_frm.cscript.calc_amount(doc, 2);
- cur_frm.cscript.update_stock_qty(doc,cdt,cdn);
- }
-}
-
//================================= Purchase Order No Get Query ====================================
cur_frm.fields_dict['purchase_order_no'].get_query = function(doc) {
if (doc.supplier)
diff --git a/stock/doctype/purchase_receipt/purchase_receipt.py b/stock/doctype/purchase_receipt/purchase_receipt.py
index 8e81fa5..83322c1 100644
--- a/stock/doctype/purchase_receipt/purchase_receipt.py
+++ b/stock/doctype/purchase_receipt/purchase_receipt.py
@@ -33,16 +33,21 @@
self.tname = 'Purchase Receipt Item'
self.fname = 'purchase_receipt_details'
self.count = 0
+ self.status_updater = [{
+ 'source_dt': 'Purchase Receipt Item',
+ 'target_dt': 'Purchase Order Item',
+ 'join_field': 'prevdoc_detail_docname',
+ 'target_field': 'received_qty',
+ 'target_parent_dt': 'Purchase Order',
+ 'target_parent_field': 'per_received',
+ 'target_ref_field': 'qty',
+ 'source_field': 'qty',
+ 'percent_join_field': 'prevdoc_docname',
+ }]
def validate_fiscal_year(self):
get_obj(dt = 'Purchase Common').validate_fiscal_year(self.doc.fiscal_year,self.doc.posting_date,'Transaction Date')
- # GET TERMS & CONDITIONS
- # =====================================================================================
- def get_tc_details(self):
- return get_obj('Purchase Common').get_tc_details(self)
-
-
# get available qty at warehouse
def get_bin_details(self, arg = ''):
return get_obj(dt='Purchase Common').get_bin_details(arg)
@@ -243,8 +248,7 @@
# Set status as Submitted
webnotes.conn.set(self.doc,'status', 'Submitted')
- # Update Previous Doc i.e. update pending_qty and Status accordingly
- purchase_controller.update_prevdoc_detail(self, is_submit = 1)
+ self.update_prevdoc_status()
# Update Serial Record
get_obj('Stock Ledger').update_serial_record(self, 'purchase_receipt_details', is_submit = 1, is_incoming = 1)
@@ -285,8 +289,7 @@
# 4.Update Bin
self.update_stock(is_submit = 0)
- # 5.Update Material Requests Pending Qty and accordingly it's Status
- pc_obj.update_prevdoc_detail(self, is_submit = 0)
+ self.update_prevdoc_status()
# 6. Update last purchase rate
pc_obj.update_last_purchase_rate(self, 0)
@@ -310,12 +313,6 @@
def get_rate(self,arg):
return get_obj('Purchase Common').get_rate(arg,self)
- def load_default_taxes(self):
- self.doclist = get_obj('Purchase Common').load_default_taxes(self)
-
- def get_purchase_tax_details(self):
- self.doclist = get_obj('Purchase Common').get_purchase_tax_details(self)
-
def make_gl_entries(self):
if not cint(webnotes.defaults.get_global_default("auto_inventory_accounting")):
return
diff --git a/stock/doctype/purchase_receipt/purchase_receipt.txt b/stock/doctype/purchase_receipt/purchase_receipt.txt
index 350777d..1fe2614 100755
--- a/stock/doctype/purchase_receipt/purchase_receipt.txt
+++ b/stock/doctype/purchase_receipt/purchase_receipt.txt
@@ -1,8 +1,8 @@
[
{
- "creation": "2013-03-25 16:01:29",
+ "creation": "2013-05-21 16:16:39",
"docstatus": 0,
- "modified": "2013-02-02 19:09:37",
+ "modified": "2013-06-11 16:16:40",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -31,7 +31,9 @@
"parent": "Purchase Receipt",
"parentfield": "permissions",
"parenttype": "DocType",
- "read": 1
+ "permlevel": 0,
+ "read": 1,
+ "report": 1
},
{
"doctype": "DocType",
@@ -75,43 +77,48 @@
"width": "150px"
},
{
+ "depends_on": "supplier",
"doctype": "DocField",
"fieldname": "supplier_name",
"fieldtype": "Data",
- "hidden": 1,
+ "hidden": 0,
"in_list_view": 1,
"label": "Supplier Name",
"read_only": 1
},
{
+ "depends_on": "supplier",
"doctype": "DocField",
"fieldname": "address_display",
"fieldtype": "Small Text",
- "hidden": 1,
+ "hidden": 0,
"label": "Address",
"read_only": 1
},
{
+ "depends_on": "supplier",
"doctype": "DocField",
"fieldname": "contact_display",
"fieldtype": "Small Text",
- "hidden": 1,
+ "hidden": 0,
"label": "Contact",
"read_only": 1
},
{
+ "depends_on": "supplier",
"doctype": "DocField",
"fieldname": "contact_mobile",
"fieldtype": "Text",
- "hidden": 1,
+ "hidden": 0,
"label": "Mobile No",
"read_only": 1
},
{
+ "depends_on": "supplier",
"doctype": "DocField",
"fieldname": "contact_email",
"fieldtype": "Text",
- "hidden": 1,
+ "hidden": 0,
"label": "Contact Email",
"print_hide": 1,
"read_only": 1
@@ -548,17 +555,7 @@
"fieldname": "get_terms",
"fieldtype": "Button",
"label": "Get Terms and Conditions",
- "oldfieldtype": "Button",
- "options": "get_tc_details"
- },
- {
- "doctype": "DocField",
- "fieldname": "terms_html",
- "fieldtype": "HTML",
- "label": "Terms and Conditions HTML",
- "oldfieldtype": "HTML",
- "options": "You can add Terms and Notes that will be printed in the Transaction",
- "print_hide": 1
+ "oldfieldtype": "Button"
},
{
"doctype": "DocField",
@@ -569,6 +566,7 @@
"oldfieldtype": "Text Editor"
},
{
+ "depends_on": "supplier",
"doctype": "DocField",
"fieldname": "contact_section",
"fieldtype": "Section Break",
@@ -787,19 +785,6 @@
"width": "50px"
},
{
- "depends_on": "eval:!doc.__islocal",
- "doctype": "DocField",
- "fieldname": "cancel_reason",
- "fieldtype": "Data",
- "hidden": 0,
- "label": "Cancel Reason",
- "no_copy": 1,
- "oldfieldname": "cancel_reason",
- "oldfieldtype": "Data",
- "print_hide": 1,
- "read_only": 1
- },
- {
"doctype": "DocField",
"fieldname": "instructions",
"fieldtype": "Small Text",
@@ -884,47 +869,19 @@
"read_only": 1
},
{
- "amend": 0,
- "cancel": 0,
- "create": 0,
- "doctype": "DocPerm",
- "match": "",
- "permlevel": 1,
- "report": 0,
- "role": "Material Manager",
- "submit": 0,
- "write": 0
- },
- {
"amend": 1,
"cancel": 1,
"create": 1,
"doctype": "DocPerm",
- "permlevel": 0,
- "report": 1,
"role": "Material Manager",
"submit": 1,
"write": 1
},
{
- "amend": 0,
- "cancel": 0,
- "create": 0,
- "doctype": "DocPerm",
- "match": "",
- "permlevel": 1,
- "report": 0,
- "role": "Material User",
- "submit": 0,
- "write": 0
- },
- {
"amend": 1,
"cancel": 1,
"create": 1,
"doctype": "DocPerm",
- "permlevel": 0,
- "report": 1,
"role": "Material User",
"submit": 1,
"write": 1
@@ -934,28 +891,13 @@
"cancel": 1,
"create": 1,
"doctype": "DocPerm",
- "match": "",
- "permlevel": 0,
- "report": 1,
"role": "Purchase User",
"submit": 1,
"write": 1
},
{
- "amend": 0,
- "cancel": 0,
- "create": 0,
- "doctype": "DocPerm",
- "match": "",
- "permlevel": 1,
- "role": "Purchase User",
- "submit": 0
- },
- {
"doctype": "DocPerm",
"match": "supplier",
- "permlevel": 0,
- "report": 1,
"role": "Supplier"
}
]
\ No newline at end of file
diff --git a/stock/doctype/purchase_receipt/purchase_receipt_list.js b/stock/doctype/purchase_receipt/purchase_receipt_list.js
index d20c352..c80f6ae 100644
--- a/stock/doctype/purchase_receipt/purchase_receipt_list.js
+++ b/stock/doctype/purchase_receipt/purchase_receipt_list.js
@@ -6,7 +6,7 @@
group_by: "`tabPurchase Receipt`.name",
prepare_data: function(data) {
if(data.purchase_order_no) {
- data.purchase_order_no = data.purchase_order_no.split(",");
+ data.purchase_order_no = $.unique(data.purchase_order_no.split(","));
var po_list = [];
$.each(data.purchase_order_no, function(i, v){
if(po_list.indexOf(v)==-1) po_list.push(
diff --git a/stock/doctype/purchase_receipt_item/README.md b/stock/doctype/purchase_receipt_item/README.md
new file mode 100644
index 0000000..042bb6d
--- /dev/null
+++ b/stock/doctype/purchase_receipt_item/README.md
@@ -0,0 +1 @@
+Detail of Items received in parent Purchase Receipt.
\ No newline at end of file
diff --git a/stock/doctype/purchase_receipt_item/purchase_receipt_item.txt b/stock/doctype/purchase_receipt_item/purchase_receipt_item.txt
index 8cef6a3..6a35c47 100755
--- a/stock/doctype/purchase_receipt_item/purchase_receipt_item.txt
+++ b/stock/doctype/purchase_receipt_item/purchase_receipt_item.txt
@@ -1,8 +1,8 @@
[
{
- "creation": "2013-03-07 11:42:59",
+ "creation": "2013-05-24 19:29:10",
"docstatus": 0,
- "modified": "2013-05-22 12:01:08",
+ "modified": "2013-05-31 14:26:41",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -357,7 +357,7 @@
"oldfieldtype": "Currency",
"print_hide": 1,
"print_width": "100px",
- "read_only": 0,
+ "read_only": 1,
"width": "100px"
},
{
@@ -370,7 +370,7 @@
"oldfieldname": "prevdoc_doctype",
"oldfieldtype": "Data",
"print_hide": 1,
- "read_only": 0
+ "read_only": 1
},
{
"doctype": "DocField",
@@ -453,18 +453,14 @@
"width": "150px"
},
{
- "default": "0.00",
"doctype": "DocField",
- "fieldname": "billed_qty",
- "fieldtype": "Float",
- "label": "Billed Quantity",
+ "fieldname": "billed_amt",
+ "fieldtype": "Currency",
+ "label": "Billed Amt",
"no_copy": 1,
- "oldfieldname": "billed_qty",
- "oldfieldtype": "Currency",
+ "options": "currency",
"print_hide": 1,
- "print_width": "100px",
- "read_only": 1,
- "width": "100px"
+ "read_only": 1
},
{
"doctype": "DocField",
diff --git a/stock/doctype/sales_bom/README.md b/stock/doctype/sales_bom/README.md
new file mode 100644
index 0000000..e4d67e9
--- /dev/null
+++ b/stock/doctype/sales_bom/README.md
@@ -0,0 +1 @@
+Grouping of Items for sale. This is use where inventory is not maintained for the main Item but only the child Items.
\ No newline at end of file
diff --git a/stock/doctype/sales_bom_item/README.md b/stock/doctype/sales_bom_item/README.md
new file mode 100644
index 0000000..1e5c8a2
--- /dev/null
+++ b/stock/doctype/sales_bom_item/README.md
@@ -0,0 +1 @@
+Child Item grouped in parent Sales BOM.
\ No newline at end of file
diff --git a/stock/doctype/serial_no/README.md b/stock/doctype/serial_no/README.md
new file mode 100644
index 0000000..8c14764
--- /dev/null
+++ b/stock/doctype/serial_no/README.md
@@ -0,0 +1 @@
+Unique serial number assigned to an instance (unit) of an Item. This is used incase each unit of the Item needs to be tracked separately for warranty or recall purposes.
\ No newline at end of file
diff --git a/stock/doctype/serial_no/test_serial_no.py b/stock/doctype/serial_no/test_serial_no.py
index fb27aa9..8ffaabc 100644
--- a/stock/doctype/serial_no/test_serial_no.py
+++ b/stock/doctype/serial_no/test_serial_no.py
@@ -81,8 +81,8 @@
self.assertFalse(gl_entries)
webnotes.defaults.set_global_default("auto_inventory_accounting", 0)
-
-
+
+test_dependencies = ["Item"]
test_records = [
[
{
diff --git a/stock/doctype/stock_entry/README.md b/stock/doctype/stock_entry/README.md
new file mode 100644
index 0000000..7722ba3
--- /dev/null
+++ b/stock/doctype/stock_entry/README.md
@@ -0,0 +1 @@
+Stock movement from one warehouse to another (or from, or to a warehouse).
\ No newline at end of file
diff --git a/stock/doctype/stock_entry/stock_entry.py b/stock/doctype/stock_entry/stock_entry.py
index 522a14a..d2f25f0 100644
--- a/stock/doctype/stock_entry/stock_entry.py
+++ b/stock/doctype/stock_entry/stock_entry.py
@@ -285,11 +285,10 @@
+ _("Status should be Submitted"), raise_exception=webnotes.InvalidStatusError)
# update stock check
- if ref.doclist[0].doctype == "Sales Invoice" and (cint(ref.doclist[0].is_pos) != 1 \
- or cint(ref.doclist[0].update_stock) != 1):
- webnotes.msgprint(_(ref.doclist[0].doctype) + ' "' + ref.doclist[0].name + '": '
- + _("Is POS and Update Stock should be checked."),
- raise_exception=NotUpdateStockError)
+ if ref.doclist[0].doctype == "Sales Invoice" and cint(ref.doclist[0].update_stock) != 1:
+ webnotes.msgprint(_(ref.doclist[0].doctype) + ' "' + ref.doclist[0].name + '": '
+ + _("Update Stock should be checked."),
+ raise_exception=NotUpdateStockError)
# posting date check
ref_posting_datetime = "%s %s" % (cstr(ref.doclist[0].posting_date),
@@ -680,7 +679,7 @@
def query_sales_return_doc(doctype, txt, searchfield, start, page_len, filters):
conditions = ""
if doctype == "Sales Invoice":
- conditions = "and is_pos=1 and update_stock=1"
+ conditions = "and update_stock=1"
return webnotes.conn.sql("""select name, customer, customer_name
from `tab%s` where docstatus = 1
diff --git a/stock/doctype/stock_entry/test_stock_entry.py b/stock/doctype/stock_entry/test_stock_entry.py
index c3ce2d7..a9281cd 100644
--- a/stock/doctype/stock_entry/test_stock_entry.py
+++ b/stock/doctype/stock_entry/test_stock_entry.py
@@ -450,6 +450,7 @@
for d in pi.doclist.get({"parentfield": "entries"}):
d.expense_head = "_Test Account Cost for Goods Sold - _TC"
d.cost_center = "_Test Cost Center - _TC"
+
for d in pi.doclist.get({"parentfield": "purchase_tax_details"}):
d.cost_center = "_Test Cost Center - _TC"
diff --git a/stock/doctype/stock_entry_detail/README.md b/stock/doctype/stock_entry_detail/README.md
new file mode 100644
index 0000000..c6ff7f3
--- /dev/null
+++ b/stock/doctype/stock_entry_detail/README.md
@@ -0,0 +1 @@
+Item moved as a part of the Stock Entry.
\ No newline at end of file
diff --git a/stock/doctype/stock_ledger/README.md b/stock/doctype/stock_ledger/README.md
new file mode 100644
index 0000000..8ccaf59
--- /dev/null
+++ b/stock/doctype/stock_ledger/README.md
@@ -0,0 +1 @@
+Control (to be deprecated) for updating stock entries.
\ No newline at end of file
diff --git a/stock/doctype/stock_ledger_entry/README.md b/stock/doctype/stock_ledger_entry/README.md
new file mode 100644
index 0000000..5eb0317
--- /dev/null
+++ b/stock/doctype/stock_ledger_entry/README.md
@@ -0,0 +1 @@
+Internal / consolidated record of stock movement. All types of stock movements are recorded on this table and is the key table for inventory reports.
\ No newline at end of file
diff --git a/stock/doctype/stock_reconciliation/README.md b/stock/doctype/stock_reconciliation/README.md
new file mode 100644
index 0000000..bb974c8
--- /dev/null
+++ b/stock/doctype/stock_reconciliation/README.md
@@ -0,0 +1 @@
+Tool to update stock level, value on a particular date by uploading a csv file.
\ No newline at end of file
diff --git a/stock/doctype/stock_uom_replace_utility/README.md b/stock/doctype/stock_uom_replace_utility/README.md
new file mode 100644
index 0000000..6db95a6
--- /dev/null
+++ b/stock/doctype/stock_uom_replace_utility/README.md
@@ -0,0 +1 @@
+Tool to replace unit of measure (UoM) of an Item.
\ No newline at end of file
diff --git a/stock/doctype/uom_conversion_detail/README.md b/stock/doctype/uom_conversion_detail/README.md
new file mode 100644
index 0000000..39bbcb0
--- /dev/null
+++ b/stock/doctype/uom_conversion_detail/README.md
@@ -0,0 +1 @@
+Conversion factor to convert non-standard Unit of Measure (UoM) to standard UoM.
\ No newline at end of file
diff --git a/stock/doctype/valuation_control/locale/_messages_doc.json b/stock/doctype/valuation_control/locale/_messages_doc.json
deleted file mode 100644
index 21b3d8e..0000000
--- a/stock/doctype/valuation_control/locale/_messages_doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-[
- "Valuation Control",
- "Stock"
-]
\ No newline at end of file
diff --git a/stock/doctype/valuation_control/locale/ar-doc.json b/stock/doctype/valuation_control/locale/ar-doc.json
deleted file mode 100644
index d1f4fea..0000000
--- a/stock/doctype/valuation_control/locale/ar-doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "Stock": "\u0627\u0644\u0623\u0648\u0631\u0627\u0642 \u0627\u0644\u0645\u0627\u0644\u064a\u0629",
- "Valuation Control": "\u062a\u0642\u064a\u064a\u0645 \u0645\u0631\u0627\u0642\u0628\u0629"
-}
\ No newline at end of file
diff --git a/stock/doctype/valuation_control/locale/de-doc.json b/stock/doctype/valuation_control/locale/de-doc.json
deleted file mode 100644
index 7a2c605..0000000
--- a/stock/doctype/valuation_control/locale/de-doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "Stock": "Lager",
- "Valuation Control": "Valuation Control-"
-}
\ No newline at end of file
diff --git a/stock/doctype/valuation_control/locale/es-doc.json b/stock/doctype/valuation_control/locale/es-doc.json
deleted file mode 100644
index 147f120..0000000
--- a/stock/doctype/valuation_control/locale/es-doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "Stock": "Valores",
- "Valuation Control": "Evaluaci\u00f3n de Control"
-}
\ No newline at end of file
diff --git a/stock/doctype/valuation_control/locale/fr-doc.json b/stock/doctype/valuation_control/locale/fr-doc.json
deleted file mode 100644
index b230df6..0000000
--- a/stock/doctype/valuation_control/locale/fr-doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "Stock": "Stock",
- "Valuation Control": "Contr\u00f4le \u00e9valuation"
-}
\ No newline at end of file
diff --git a/stock/doctype/valuation_control/locale/hi-doc.json b/stock/doctype/valuation_control/locale/hi-doc.json
deleted file mode 100644
index 7b547f6..0000000
--- a/stock/doctype/valuation_control/locale/hi-doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "Stock": "\u0938\u094d\u091f\u0949\u0915",
- "Valuation Control": "\u092e\u0942\u0932\u094d\u092f\u093e\u0902\u0915\u0928 \u0928\u093f\u092f\u0902\u0924\u094d\u0930\u0923"
-}
\ No newline at end of file
diff --git a/stock/doctype/valuation_control/locale/hr-doc.json b/stock/doctype/valuation_control/locale/hr-doc.json
deleted file mode 100644
index 40e4b21..0000000
--- a/stock/doctype/valuation_control/locale/hr-doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "Stock": "Zaliha",
- "Valuation Control": "Vrednovanje kontrola"
-}
\ No newline at end of file
diff --git a/stock/doctype/valuation_control/locale/nl-doc.json b/stock/doctype/valuation_control/locale/nl-doc.json
deleted file mode 100644
index c2dcdff..0000000
--- a/stock/doctype/valuation_control/locale/nl-doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "Stock": "Voorraad",
- "Valuation Control": "Waardering Controle"
-}
\ No newline at end of file
diff --git a/stock/doctype/valuation_control/locale/pt-BR-doc.json b/stock/doctype/valuation_control/locale/pt-BR-doc.json
deleted file mode 100644
index 34180c0..0000000
--- a/stock/doctype/valuation_control/locale/pt-BR-doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "Stock": "Estoque",
- "Valuation Control": "Controle de Avalia\u00e7\u00e3o"
-}
\ No newline at end of file
diff --git a/stock/doctype/valuation_control/locale/pt-doc.json b/stock/doctype/valuation_control/locale/pt-doc.json
deleted file mode 100644
index b92f523..0000000
--- a/stock/doctype/valuation_control/locale/pt-doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "Stock": "Estoque",
- "Valuation Control": "Controle de valoriza\u00e7\u00e3o"
-}
\ No newline at end of file
diff --git a/stock/doctype/valuation_control/locale/sr-doc.json b/stock/doctype/valuation_control/locale/sr-doc.json
deleted file mode 100644
index b0c2fbf..0000000
--- a/stock/doctype/valuation_control/locale/sr-doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "Stock": "\u0417\u0430\u043b\u0438\u0445\u0430",
- "Valuation Control": "\u041f\u0440\u043e\u0446\u0435\u043d\u0430 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0430"
-}
\ No newline at end of file
diff --git a/stock/doctype/valuation_control/locale/ta-doc.json b/stock/doctype/valuation_control/locale/ta-doc.json
deleted file mode 100644
index 7326553..0000000
--- a/stock/doctype/valuation_control/locale/ta-doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "Stock": "\u0baa\u0b99\u0bcd\u0b95\u0bc1",
- "Valuation Control": "\u0bae\u0ba4\u0bbf\u0baa\u0bcd\u0baa\u0bc0\u0b9f\u0bcd\u0b9f\u0bc1 \u0b95\u0b9f\u0bcd\u0b9f\u0bc1\u0baa\u0bcd\u0baa\u0bbe\u0b9f\u0bc1"
-}
\ No newline at end of file
diff --git a/stock/doctype/valuation_control/locale/th-doc.json b/stock/doctype/valuation_control/locale/th-doc.json
deleted file mode 100644
index ecd479c..0000000
--- a/stock/doctype/valuation_control/locale/th-doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "Stock": "\u0e04\u0e25\u0e31\u0e07\u0e2a\u0e34\u0e19\u0e04\u0e49\u0e32",
- "Valuation Control": "\u0e04\u0e27\u0e1a\u0e04\u0e38\u0e21\u0e01\u0e32\u0e23\u0e1b\u0e23\u0e30\u0e40\u0e21\u0e34\u0e19"
-}
\ No newline at end of file
diff --git a/stock/doctype/warehouse/README.md b/stock/doctype/warehouse/README.md
new file mode 100644
index 0000000..3ff879e
--- /dev/null
+++ b/stock/doctype/warehouse/README.md
@@ -0,0 +1 @@
+Location (physical or virtual) where Items can be stored.
\ No newline at end of file
diff --git a/stock/doctype/warehouse/warehouse.py b/stock/doctype/warehouse/warehouse.py
index dc8bfea..264e459 100644
--- a/stock/doctype/warehouse/warehouse.py
+++ b/stock/doctype/warehouse/warehouse.py
@@ -65,10 +65,6 @@
msgprint("[Stock Update] Ignored %s since it is not a stock item"
% args.get("item_code"))
- def check_state(self):
- return "\n" + "\n".join([i[0] for i in sql("""
- select state_name from `tabState` where country=%s""", self.doc.country)])
-
def validate(self):
if self.doc.email_id and not validate_email_add(self.doc.email_id):
msgprint("Please enter valid Email Id", raise_exception=1)
diff --git a/stock/doctype/warehouse_user/README.md b/stock/doctype/warehouse_user/README.md
new file mode 100644
index 0000000..f4ed2b0
--- /dev/null
+++ b/stock/doctype/warehouse_user/README.md
@@ -0,0 +1 @@
+If specified, only user defined in this table are allowed to transact on the parent Warehouse.
\ No newline at end of file
diff --git a/stock/page/stock_ageing/README.md b/stock/page/stock_ageing/README.md
new file mode 100644
index 0000000..e8597b2
--- /dev/null
+++ b/stock/page/stock_ageing/README.md
@@ -0,0 +1 @@
+Average "age" of an Item in a particular Warehouse based on First-in-first-out (FIFO).
\ No newline at end of file
diff --git a/stock/page/stock_ageing/stock_ageing.js b/stock/page/stock_ageing/stock_ageing.js
index 456f5f1..b9b4c80 100644
--- a/stock/page/stock_ageing/stock_ageing.js
+++ b/stock/page/stock_ageing/stock_ageing.js
@@ -25,7 +25,7 @@
new erpnext.StockAgeing(wrapper);
wrapper.appframe.add_home_breadcrumb()
- wrapper.appframe.add_module_breadcrumb("Stock")
+ wrapper.appframe.add_module_icon("Stock")
wrapper.appframe.add_breadcrumb("icon-bar-chart")
}
diff --git a/stock/page/stock_analytics/README.md b/stock/page/stock_analytics/README.md
new file mode 100644
index 0000000..86c3644
--- /dev/null
+++ b/stock/page/stock_analytics/README.md
@@ -0,0 +1 @@
+Trends of Items quantities and values.
\ No newline at end of file
diff --git a/stock/page/stock_analytics/stock_analytics.js b/stock/page/stock_analytics/stock_analytics.js
index a003963..a52cb7d 100644
--- a/stock/page/stock_analytics/stock_analytics.js
+++ b/stock/page/stock_analytics/stock_analytics.js
@@ -25,7 +25,7 @@
new erpnext.StockAnalytics(wrapper);
wrapper.appframe.add_home_breadcrumb()
- wrapper.appframe.add_module_breadcrumb("Stock")
+ wrapper.appframe.add_module_icon("Stock")
wrapper.appframe.add_breadcrumb("icon-bar-chart")
}
diff --git a/stock/page/stock_balance/README.md b/stock/page/stock_balance/README.md
new file mode 100644
index 0000000..6522aeb
--- /dev/null
+++ b/stock/page/stock_balance/README.md
@@ -0,0 +1 @@
+Stock balances on a particular day, per warehouse.
\ No newline at end of file
diff --git a/stock/page/stock_balance/stock_balance.js b/stock/page/stock_balance/stock_balance.js
index 163b74f..4467b98 100644
--- a/stock/page/stock_balance/stock_balance.js
+++ b/stock/page/stock_balance/stock_balance.js
@@ -26,7 +26,7 @@
new erpnext.StockBalance(wrapper);
wrapper.appframe.add_home_breadcrumb()
- wrapper.appframe.add_module_breadcrumb("Stock")
+ wrapper.appframe.add_module_icon("Stock")
wrapper.appframe.add_breadcrumb("icon-bar-chart")
}
diff --git a/stock/page/stock_home/stock_home.js b/stock/page/stock_home/stock_home.js
index d8c63aa..511ddd7 100644
--- a/stock/page/stock_home/stock_home.js
+++ b/stock/page/stock_home/stock_home.js
@@ -8,17 +8,17 @@
items: [
{
label: wn._("Material Request"),
- description: wn._("Request Material for Transfer or Purchase."),
+ description: wn._("Requests for items."),
doctype:"Material Request"
},
{
label: wn._("Stock Entry"),
- description: wn._("Transfer stock from one warehouse to another."),
+ description: wn._("Record item movement."),
doctype:"Stock Entry"
},
{
label: wn._("Delivery Note"),
- description: wn._("Delivery (shipment) to customers."),
+ description: wn._("Shipments to customers."),
doctype:"Delivery Note"
},
{
@@ -164,7 +164,7 @@
items: [
{
"label":wn._("Stock Ledger"),
- route: "Report2/Stock Ledger Entry/Stock Ledger",
+ route: "Report/Stock Ledger Entry/Stock Ledger",
doctype: "Stock Ledger Entry"
},
{
@@ -179,17 +179,17 @@
},
{
"label":wn._("Serial No Service Contract Expiry"),
- route: "Report2/Serial No/Serial No Service Contract Expiry",
+ route: "Report/Serial No/Serial No Service Contract Expiry",
doctype: "Serial No"
},
{
"label":wn._("Serial No Status"),
- route: "Report2/Serial No/Serial No Status",
+ route: "Report/Serial No/Serial No Status",
doctype: "Serial No"
},
{
"label":wn._("Serial No Warranty Expiry"),
- route: "Report2/Serial No/Serial No Warranty Expiry",
+ route: "Report/Serial No/Serial No Warranty Expiry",
doctype: "Serial No"
},
{
diff --git a/stock/page/stock_ledger/README.md b/stock/page/stock_ledger/README.md
new file mode 100644
index 0000000..774498b
--- /dev/null
+++ b/stock/page/stock_ledger/README.md
@@ -0,0 +1 @@
+Stock movement report based on Stock Ledger Entry.
\ No newline at end of file
diff --git a/stock/page/stock_ledger/stock_ledger.js b/stock/page/stock_ledger/stock_ledger.js
index a37ea1c..438f132 100644
--- a/stock/page/stock_ledger/stock_ledger.js
+++ b/stock/page/stock_ledger/stock_ledger.js
@@ -24,7 +24,7 @@
new erpnext.StockLedger(wrapper);
wrapper.appframe.add_home_breadcrumb()
- wrapper.appframe.add_module_breadcrumb("Stock")
+ wrapper.appframe.add_module_icon("Stock")
wrapper.appframe.add_breadcrumb("icon-bar-chart")
}
diff --git a/stock/page/stock_level/README.md b/stock/page/stock_level/README.md
new file mode 100644
index 0000000..43b2b0f
--- /dev/null
+++ b/stock/page/stock_level/README.md
@@ -0,0 +1 @@
+Stock levels (actual, planned, reserved, ordered) for Items on a particular date.
\ No newline at end of file
diff --git a/stock/page/stock_level/stock_level.js b/stock/page/stock_level/stock_level.js
index 75819a5..5f129c3 100644
--- a/stock/page/stock_level/stock_level.js
+++ b/stock/page/stock_level/stock_level.js
@@ -24,7 +24,7 @@
new erpnext.StockLevel(wrapper);
wrapper.appframe.add_home_breadcrumb()
- wrapper.appframe.add_module_breadcrumb("Stock")
+ wrapper.appframe.add_module_icon("Stock")
wrapper.appframe.add_breadcrumb("icon-bar-chart");
}
diff --git a/support/README.md b/support/README.md
new file mode 100644
index 0000000..0df93bb
--- /dev/null
+++ b/support/README.md
@@ -0,0 +1 @@
+Customer Support / After sales service / Maintenance Module.
\ No newline at end of file
diff --git a/support/doctype/customer_issue/README.md b/support/doctype/customer_issue/README.md
new file mode 100644
index 0000000..0560abe
--- /dev/null
+++ b/support/doctype/customer_issue/README.md
@@ -0,0 +1 @@
+Issue raised by Customer, can be tagged against Invoice, Serial Number to verify warranty, service contract.
\ No newline at end of file
diff --git a/support/doctype/customer_issue/customer_issue.txt b/support/doctype/customer_issue/customer_issue.txt
index 59ebc15..c60df62 100644
--- a/support/doctype/customer_issue/customer_issue.txt
+++ b/support/doctype/customer_issue/customer_issue.txt
@@ -2,7 +2,7 @@
{
"creation": "2013-01-10 16:34:30",
"docstatus": 0,
- "modified": "2013-01-28 17:54:09",
+ "modified": "2013-06-11 16:16:33",
"modified_by": "Administrator",
"owner": "harshada@webnotestech.com"
},
@@ -402,18 +402,6 @@
"width": "150px"
},
{
- "doctype": "DocField",
- "fieldname": "amendment_date",
- "fieldtype": "Date",
- "hidden": 1,
- "label": "Amendment Date",
- "no_copy": 1,
- "oldfieldname": "amendment_date",
- "oldfieldtype": "Date",
- "print_hide": 1,
- "width": "100px"
- },
- {
"amend": 1,
"cancel": 1,
"doctype": "DocPerm",
diff --git a/support/doctype/maintenance_schedule/README.md b/support/doctype/maintenance_schedule/README.md
new file mode 100644
index 0000000..8371085
--- /dev/null
+++ b/support/doctype/maintenance_schedule/README.md
@@ -0,0 +1 @@
+Schedule generator for planned maintenance for service contract or internal maintenance.
\ No newline at end of file
diff --git a/support/doctype/maintenance_schedule/maintenance_schedule.txt b/support/doctype/maintenance_schedule/maintenance_schedule.txt
index 19dc7fd..ba46555 100644
--- a/support/doctype/maintenance_schedule/maintenance_schedule.txt
+++ b/support/doctype/maintenance_schedule/maintenance_schedule.txt
@@ -2,7 +2,7 @@
{
"creation": "2013-01-10 16:34:30",
"docstatus": 0,
- "modified": "2013-01-28 17:35:45",
+ "modified": "2013-06-11 16:16:37",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -171,19 +171,6 @@
},
{
"doctype": "DocField",
- "fieldname": "amendment_date",
- "fieldtype": "Date",
- "hidden": 1,
- "label": "Amendment Date",
- "no_copy": 1,
- "oldfieldname": "amendment_date",
- "oldfieldtype": "Date",
- "print_hide": 1,
- "read_only": 1,
- "report_hide": 1
- },
- {
- "doctype": "DocField",
"fieldname": "company",
"fieldtype": "Link",
"in_filter": 1,
diff --git a/support/doctype/maintenance_schedule_detail/README.md b/support/doctype/maintenance_schedule_detail/README.md
new file mode 100644
index 0000000..b9ade09
--- /dev/null
+++ b/support/doctype/maintenance_schedule_detail/README.md
@@ -0,0 +1 @@
+Scheduled event generated by Maintenance Schedule.
\ No newline at end of file
diff --git a/support/doctype/maintenance_schedule_item/README.md b/support/doctype/maintenance_schedule_item/README.md
new file mode 100644
index 0000000..c809dd5
--- /dev/null
+++ b/support/doctype/maintenance_schedule_item/README.md
@@ -0,0 +1 @@
+Details of Item to be maintained.
\ No newline at end of file
diff --git a/support/doctype/maintenance_visit/README.md b/support/doctype/maintenance_visit/README.md
new file mode 100644
index 0000000..123c9c8
--- /dev/null
+++ b/support/doctype/maintenance_visit/README.md
@@ -0,0 +1 @@
+Log of visit for maintenance.
\ No newline at end of file
diff --git a/support/doctype/maintenance_visit/maintenance_visit.txt b/support/doctype/maintenance_visit/maintenance_visit.txt
index 6ecbb1f..919c003 100644
--- a/support/doctype/maintenance_visit/maintenance_visit.txt
+++ b/support/doctype/maintenance_visit/maintenance_visit.txt
@@ -2,7 +2,7 @@
{
"creation": "2013-01-10 16:34:31",
"docstatus": 0,
- "modified": "2013-01-28 17:31:01",
+ "modified": "2013-06-11 16:16:37",
"modified_by": "Administrator",
"owner": "ashwini@webnotestech.com"
},
@@ -279,17 +279,6 @@
},
{
"doctype": "DocField",
- "fieldname": "amendment_date",
- "fieldtype": "Date",
- "label": "Amendment Date",
- "no_copy": 1,
- "oldfieldname": "amendment_date",
- "oldfieldtype": "Date",
- "print_hide": 1,
- "width": "100px"
- },
- {
- "doctype": "DocField",
"fieldname": "company",
"fieldtype": "Select",
"in_filter": 1,
diff --git a/support/doctype/maintenance_visit_purpose/README.md b/support/doctype/maintenance_visit_purpose/README.md
new file mode 100644
index 0000000..b693fcb
--- /dev/null
+++ b/support/doctype/maintenance_visit_purpose/README.md
@@ -0,0 +1 @@
+Table containing details of Items checked during Maintenance Visit.
\ No newline at end of file
diff --git a/support/doctype/newsletter/README.md b/support/doctype/newsletter/README.md
new file mode 100644
index 0000000..a1a0cf4
--- /dev/null
+++ b/support/doctype/newsletter/README.md
@@ -0,0 +1 @@
+Newsletter to be sent to Leads / Contacts.
\ No newline at end of file
diff --git a/support/doctype/support_ticket/README.md b/support/doctype/support_ticket/README.md
new file mode 100644
index 0000000..53e2fd7
--- /dev/null
+++ b/support/doctype/support_ticket/README.md
@@ -0,0 +1 @@
+Support Ticket (query) raised by customer via website or email (if configured).
\ No newline at end of file
diff --git a/support/doctype/support_ticket/support_ticket.js b/support/doctype/support_ticket/support_ticket.js
index 4ee4c1d..4ea179d 100644
--- a/support/doctype/support_ticket/support_ticket.js
+++ b/support/doctype/support_ticket/support_ticket.js
@@ -19,8 +19,7 @@
$.extend(cur_frm.cscript, {
onload: function(doc, dt, dn) {
if(in_list(user_roles,'System Manager')) {
- cur_frm.page_layout.footer.help_area.innerHTML = '<hr>\
- <p><a href="#Form/Email Settings/Email Settings">Email Settings</a><br>\
+ cur_frm.footer.help_area.innerHTML = '<p><a href="#Form/Email Settings/Email Settings">Email Settings</a><br>\
<span class="help">Integrate incoming support emails to Support Ticket</span></p>';
}
},
@@ -28,8 +27,8 @@
refresh: function(doc) {
erpnext.hide_naming_series();
cur_frm.cscript.make_listing(doc);
- if(!doc.__islocal) {
- if(user_roles.indexOf("Support Manager")!==-1) {
+ if(!doc.__islocal) {
+ if(cur_frm.fields_dict.status.get_status()=="Write") {
if(doc.status!='Closed') cur_frm.add_custom_button('Close Ticket', cur_frm.cscript['Close Ticket']);
if(doc.status=='Closed') cur_frm.add_custom_button('Re-Open Ticket', cur_frm.cscript['Re-Open Ticket']);
}
diff --git a/support/page/support_analytics/README.md b/support/page/support_analytics/README.md
new file mode 100644
index 0000000..bc7654c
--- /dev/null
+++ b/support/page/support_analytics/README.md
@@ -0,0 +1 @@
+Support Ticket volume, performance over time.
\ No newline at end of file
diff --git a/support/page/support_analytics/support_analytics.js b/support/page/support_analytics/support_analytics.js
index 60384bb..9b46e6d 100644
--- a/support/page/support_analytics/support_analytics.js
+++ b/support/page/support_analytics/support_analytics.js
@@ -8,7 +8,7 @@
new erpnext.SupportAnalytics(wrapper);
wrapper.appframe.add_home_breadcrumb()
- wrapper.appframe.add_module_breadcrumb("Support")
+ wrapper.appframe.add_module_icon("Support")
wrapper.appframe.add_breadcrumb("icon-bar-chart")
}
diff --git a/support/page/support_home/support_home.js b/support/page/support_home/support_home.js
index bde5e5c..65ea4b8 100644
--- a/support/page/support_home/support_home.js
+++ b/support/page/support_home/support_home.js
@@ -8,17 +8,17 @@
items: [
{
label: wn._("Support Ticket"),
- description: wn._("Support queries from customers via email or website."),
+ description: wn._("Support queries from customers."),
doctype:"Support Ticket"
},
{
label: wn._("Customer Issue"),
- description: wn._("Customer Issue against a Serial No (warranty)."),
+ description: wn._("Customer Issue against Serial No."),
doctype:"Customer Issue"
},
{
label: wn._("Maintenance Schedule"),
- description: wn._("Plan for scheduled maintenance contracts."),
+ description: wn._("Plan for maintenance visits."),
doctype:"Maintenance Schedule"
},
{
@@ -28,7 +28,7 @@
},
{
label: wn._("Newsletter"),
- description: wn._("Send Newsletters to your contacts, leads."),
+ description: wn._("Newsletters to contacts, leads."),
doctype:"Newsletter"
},
{
diff --git a/support/search_criteria/__init__.py b/support/search_criteria/__init__.py
deleted file mode 100644
index baffc48..0000000
--- a/support/search_criteria/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-from __future__ import unicode_literals
diff --git a/support/search_criteria/amc_summary/__init__.py b/support/search_criteria/amc_summary/__init__.py
deleted file mode 100644
index baffc48..0000000
--- a/support/search_criteria/amc_summary/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-from __future__ import unicode_literals
diff --git a/support/search_criteria/amc_summary/amc_summary.js b/support/search_criteria/amc_summary/amc_summary.js
deleted file mode 100644
index 0ce3619..0000000
--- a/support/search_criteria/amc_summary/amc_summary.js
+++ /dev/null
@@ -1,25 +0,0 @@
-// ERPNext - web based ERP (http://erpnext.com)
-// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-report.customize_filters = function() {
- this.hide_all_filters();
- this.mytabs.items['Select Columns'].hide();
- this.mytabs.items['More Filters'].hide()
- this.filter_fields_dict['Serial No'+FILTER_SEP +'Territory'].df.filter_hide = 0;
- this.filter_fields_dict['Serial No'+FILTER_SEP +'Item Group'].df.filter_hide = 0;
- this.filter_fields_dict['Serial No'+FILTER_SEP +'Territory'].df.in_first_page = 1;
- this.filter_fields_dict['Serial No'+FILTER_SEP +'Item Group'].df.in_first_page = 1;
-}
\ No newline at end of file
diff --git a/support/search_criteria/amc_summary/amc_summary.py b/support/search_criteria/amc_summary/amc_summary.py
deleted file mode 100644
index 926da01..0000000
--- a/support/search_criteria/amc_summary/amc_summary.py
+++ /dev/null
@@ -1,87 +0,0 @@
-# ERPNext - web based ERP (http://erpnext.com)
-# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-# ADD NEW COLUMNS
-from __future__ import unicode_literals
-row_list = [['Item Group','Data','150px',''],
- ['Out of AMC','Int','150px',''],
- ['Under AMC','Int','150px',''],
- ['Out of Warranty','Int','150px',''],
- ['Under Warranty','Int','150px',''],
- ['Total','Int','150px','']
- ]
-
-for r in row_list:
- colnames.append(r[0])
- coltypes.append(r[1])
- colwidths.append(r[2])
- coloptions.append(r[3])
- col_idx[r[0]] = len(colnames)-1
-
-
-#ADD VALUES TO THE COLUMN
-out=[]
-oa,ua,ow,uw,sum=0,0,0,0,0
-nowdate = nowdate()
-for r in res:
- cc = r[col_idx['Territory']]
- item_groups = sql("select distinct item_group from `tabSerial No` where territory = '%s' and item_group like '%%%s'" %(cc,filter_values.get('item_group')))
-
- for col in range(len(colnames)-1): # this would make all first row blank. just for look
- r.append('')
- out.append(r)
-
- # Add Totals for each Territory
- # -----------------------------
- det = sql("select COUNT(CASE WHEN amc_expiry_date > '%s' THEN name ELSE NULL END), COUNT(CASE WHEN amc_expiry_date <= '%s' THEN name ELSE NULL END), COUNT(CASE WHEN warranty_expiry_date > '%s' THEN name ELSE NULL END), COUNT(CASE WHEN warranty_expiry_date <= '%s' THEN name ELSE NULL END) from `tabSerial No` where territory = '%s' and item_group like '%%%s'" %(nowdate,nowdate,nowdate,nowdate,cc,filter_values.get('item_group')))
- r[col_idx['Item Group']] = ''
-
- r[col_idx['Out of AMC']] = cstr(det[0][0])
- r[col_idx['Under AMC']] = cstr(det[0][1])
- r[col_idx['Out of Warranty']] = cstr(det[0][2])
- r[col_idx['Under Warranty']] = cstr(det[0][3])
- tot = cint(det[0][0]) + cint(det[0][1]) + cint(det[0][2]) + cint(det[0][3])
- r[col_idx['Total']] = cstr(tot)
-
-
- oa += cint(det[0][0])
- ua += cint(det[0][1])
- ow += cint(det[0][2])
- uw += cint(det[0][3])
- sum += tot
-
-
- # Add Brand Details belonging to Territory
- # ----------------------------------------
- for br in item_groups:
- br_det = sql("select COUNT(CASE WHEN amc_expiry_date > '%s' THEN name ELSE NULL END), COUNT(CASE WHEN amc_expiry_date <= '%s' THEN name ELSE NULL END), COUNT(CASE WHEN warranty_expiry_date > '%s' THEN name ELSE NULL END), COUNT(CASE WHEN warranty_expiry_date <= '%s' THEN name ELSE NULL END) from `tabSerial No` where territory = '%s' and item_group = '%s'"%(nowdate,nowdate,nowdate,nowdate,cc,br[0]))
- t_row = ['' for i in range(len(colnames))]
- t_row[col_idx['Item Group']] = br[0]
-
- t_row[col_idx['Out of AMC']] = cint(br_det[0][0])
- t_row[col_idx['Under AMC']] = cint(br_det[0][1])
- t_row[col_idx['Out of Warranty']] = cint(br_det[0][2])
- t_row[col_idx['Under Warranty']] = cint(br_det[0][3])
- tot = cint(br_det[0][0]) + cint(br_det[0][1]) + cint(br_det[0][2])+ cint(br_det[0][3])
- t_row[col_idx['Total']] = tot
- out.append(t_row)
-
-
-#ADD NEW ROW
-# ----------
-newrow=['','TOTAL',oa,ua,ow,uw,sum]
-out.append(newrow)
-res=out
\ No newline at end of file
diff --git a/support/search_criteria/amc_summary/amc_summary.txt b/support/search_criteria/amc_summary/amc_summary.txt
deleted file mode 100644
index a83e0d3..0000000
--- a/support/search_criteria/amc_summary/amc_summary.txt
+++ /dev/null
@@ -1,28 +0,0 @@
-[
- {
- "owner": "Administrator",
- "docstatus": 0,
- "creation": "2012-04-03 12:49:50",
- "modified_by": "Administrator",
- "modified": "2012-04-03 12:49:50"
- },
- {
- "module": "Support",
- "standard": "Yes",
- "sort_order": "ASC",
- "filters": "{'Serial No\u0001Saved':1,'Serial No\u0001Status':''}",
- "doc_type": "Serial No",
- "name": "__common__",
- "add_cond": "`tabSerial No`.`territory` is not null\n`tabSerial No`.`territory` != ''\n`tabSerial No`.`status` not in ('In Store', 'Scrapped')",
- "doctype": "Search Criteria",
- "sort_by": "`tabSerial No`.`cost_center`",
- "group_by": "`tabSerial No`.`cost_center`",
- "page_len": 50,
- "criteria_name": "AMC Summary",
- "columns": "Serial No\u0001Territory"
- },
- {
- "name": "amc_summary",
- "doctype": "Search Criteria"
- }
-]
\ No newline at end of file
diff --git a/support/search_criteria/customer_issues/__init__.py b/support/search_criteria/customer_issues/__init__.py
deleted file mode 100644
index baffc48..0000000
--- a/support/search_criteria/customer_issues/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-from __future__ import unicode_literals
diff --git a/support/search_criteria/customer_issues/customer_issues.js b/support/search_criteria/customer_issues/customer_issues.js
deleted file mode 100644
index 8eaf6f6..0000000
--- a/support/search_criteria/customer_issues/customer_issues.js
+++ /dev/null
@@ -1,23 +0,0 @@
-// ERPNext - web based ERP (http://erpnext.com)
-// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-report.customize_filters = function() {
- this.filter_fields_dict['Customer Issue'+FILTER_SEP +'Status'].df.in_first_page = 1;
- this.filter_fields_dict['Customer Issue'+FILTER_SEP +'Allocated To'].df.in_first_page = 1;
- this.filter_fields_dict['Customer Issue'+FILTER_SEP +'Company'].df['report_default'] = sys_defaults.company;
-}
-
-this.mytabs.items['Select Columns'].hide()
\ No newline at end of file
diff --git a/support/search_criteria/customer_issues/customer_issues.txt b/support/search_criteria/customer_issues/customer_issues.txt
deleted file mode 100644
index caa0775..0000000
--- a/support/search_criteria/customer_issues/customer_issues.txt
+++ /dev/null
@@ -1,26 +0,0 @@
-[
- {
- "owner": "Administrator",
- "docstatus": 0,
- "creation": "2012-04-03 12:49:51",
- "modified_by": "Administrator",
- "modified": "2012-04-03 12:49:51"
- },
- {
- "module": "Support",
- "standard": "Yes",
- "sort_order": "DESC",
- "filters": "{'Customer Issue\u0001Saved':1,'Customer Issue\u0001Submitted':1,'Customer Issue\u0001Status':'','Customer Issue\u0001Fiscal Year':''}",
- "doctype": "Search Criteria",
- "doc_type": "Customer Issue",
- "name": "__common__",
- "sort_by": "`tabCustomer Issue`.`name`",
- "page_len": 50,
- "criteria_name": "Customer Issues",
- "columns": "Customer Issue\u0001ID,Customer Issue\u0001Status,Customer Issue\u0001Complaint Date,Customer Issue\u0001Complaint,Customer Issue\u0001Item Code,Customer Issue\u0001Item Name,Customer Issue\u0001Allocated To,Customer Issue\u0001Allocated On,Customer Issue\u0001Resolved By,Customer Issue\u0001Resolution Date,Customer Issue\u0001Customer Name,Customer Issue\u0001Fiscal Year"
- },
- {
- "name": "customer_issues",
- "doctype": "Search Criteria"
- }
-]
\ No newline at end of file
diff --git a/support/search_criteria/maintenance_orderwise_pending_amount_to_bill/__init__.py b/support/search_criteria/maintenance_orderwise_pending_amount_to_bill/__init__.py
deleted file mode 100644
index baffc48..0000000
--- a/support/search_criteria/maintenance_orderwise_pending_amount_to_bill/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-from __future__ import unicode_literals
diff --git a/support/search_criteria/maintenance_orderwise_pending_amount_to_bill/maintenance_orderwise_pending_amount_to_bill.js b/support/search_criteria/maintenance_orderwise_pending_amount_to_bill/maintenance_orderwise_pending_amount_to_bill.js
deleted file mode 100644
index 1b3837a..0000000
--- a/support/search_criteria/maintenance_orderwise_pending_amount_to_bill/maintenance_orderwise_pending_amount_to_bill.js
+++ /dev/null
@@ -1,20 +0,0 @@
-// ERPNext - web based ERP (http://erpnext.com)
-// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-report.customize_filters = function() {
- this.filter_fields_dict['Sales Order'+FILTER_SEP +'Company'].df['report_default'] = sys_defaults.company;
- this.filter_fields_dict['Sales Order'+FILTER_SEP +'Fiscal Year'].df['report_default'] = sys_defaults.fiscal_year;
-}
\ No newline at end of file
diff --git a/support/search_criteria/maintenance_orderwise_pending_amount_to_bill/maintenance_orderwise_pending_amount_to_bill.txt b/support/search_criteria/maintenance_orderwise_pending_amount_to_bill/maintenance_orderwise_pending_amount_to_bill.txt
deleted file mode 100644
index ad9fe08..0000000
--- a/support/search_criteria/maintenance_orderwise_pending_amount_to_bill/maintenance_orderwise_pending_amount_to_bill.txt
+++ /dev/null
@@ -1,29 +0,0 @@
-[
- {
- "owner": "ashwini@webnotestech.com",
- "docstatus": 0,
- "creation": "2012-04-03 12:49:51",
- "modified_by": "Administrator",
- "modified": "2012-04-03 12:49:51"
- },
- {
- "add_col": "SUM((`tabSales Order Item`.`qty` - `tabSales Order Item`.`billed_qty`) * `tabSales Order Item`.`basic_rate`) AS 'Pending Amount'",
- "parent_doc_type": "Sales Order",
- "module": "Support",
- "standard": "Yes",
- "sort_order": "DESC",
- "filters": "{'Sales Order\u0001Saved':1,'Sales Order\u0001Submitted':1,'Sales Order\u0001Status':'','Sales Order\u0001Fiscal Year':''}",
- "doc_type": "Sales Order Item",
- "name": "__common__",
- "add_cond": "`tabSales Order`.status != 'Stopped'\n`tabSales Order`.order_type='Maintenance'",
- "doctype": "Search Criteria",
- "sort_by": "`tabSales Order`.`name`",
- "page_len": 50,
- "criteria_name": "Maintenance Orderwise Pending Amount To Bill",
- "columns": "Sales Order\u0001ID,Sales Order\u0001Customer,Sales Order\u0001Customer Name,Sales Order\u0001Customer Address,Sales Order\u0001Status,Sales Order\u0001% Billed,Sales Order\u0001Sales Order Date"
- },
- {
- "name": "maintenance_orderwise_pending_amount_to_bill",
- "doctype": "Search Criteria"
- }
-]
\ No newline at end of file
diff --git a/support/search_criteria/maintenance_schedule_details/__init__.py b/support/search_criteria/maintenance_schedule_details/__init__.py
deleted file mode 100644
index baffc48..0000000
--- a/support/search_criteria/maintenance_schedule_details/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-from __future__ import unicode_literals
diff --git a/support/search_criteria/maintenance_schedule_details/maintenance_schedule_details.js b/support/search_criteria/maintenance_schedule_details/maintenance_schedule_details.js
deleted file mode 100644
index c4800ea..0000000
--- a/support/search_criteria/maintenance_schedule_details/maintenance_schedule_details.js
+++ /dev/null
@@ -1,29 +0,0 @@
-// ERPNext - web based ERP (http://erpnext.com)
-// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-report.customize_filters = function() {
-
- this.filter_fields_dict['Maintenance Schedule Detail'+FILTER_SEP +'From Scheduled Date'].df.in_first_page = 1;
- this.filter_fields_dict['Maintenance Schedule Detail'+FILTER_SEP +'To Scheduled Date'].df.in_first_page = 1;
- this.filter_fields_dict['Maintenance Schedule Detail'+FILTER_SEP +'Incharge Name'].df.in_first_page = 1;
- this.filter_fields_dict['Maintenance Schedule'+FILTER_SEP +'Customer'].df.in_first_page = 1;
- this.filter_fields_dict['Maintenance Schedule'+FILTER_SEP +'Customer Name'].df.in_first_page = 1;
- this.filter_fields_dict['Maintenance Schedule'+FILTER_SEP +'Sales Order No'].df.in_first_page = 1;
- //this.filter_fields_dict['Maintenance Schedule'+FILTER_SEP +'Status'].df.in_first_page = 0;
- this.filter_fields_dict['Maintenance Schedule'+FILTER_SEP +'Company'].df['report_default'] = sys_defaults.company;
-}
-
-this.mytabs.items['Select Columns'].hide()
\ No newline at end of file
diff --git a/support/search_criteria/maintenance_schedule_details/maintenance_schedule_details.txt b/support/search_criteria/maintenance_schedule_details/maintenance_schedule_details.txt
deleted file mode 100644
index f8a5882..0000000
--- a/support/search_criteria/maintenance_schedule_details/maintenance_schedule_details.txt
+++ /dev/null
@@ -1,27 +0,0 @@
-[
- {
- "owner": "nabin@webnotestech.com",
- "docstatus": 0,
- "creation": "2012-04-03 12:49:51",
- "modified_by": "Administrator",
- "modified": "2012-04-03 12:49:51"
- },
- {
- "parent_doc_type": "Maintenance Schedule",
- "module": "Support",
- "standard": "Yes",
- "sort_order": "DESC",
- "filters": "{'Maintenance Schedule\u0001Submitted':1,'Maintenance Schedule\u0001Status':''}",
- "doc_type": "Maintenance Schedule Detail",
- "name": "__common__",
- "doctype": "Search Criteria",
- "sort_by": "`tabMaintenance Schedule Detail`.`item_code`",
- "page_len": 50,
- "criteria_name": "Maintenance Schedule Details",
- "columns": "Maintenance Schedule Detail\u0001Item Code,Maintenance Schedule Detail\u0001Item Name,Maintenance Schedule Detail\u0001Serial No,Maintenance Schedule Detail\u0001Incharge Name,Maintenance Schedule Detail\u0001Scheduled Date,Maintenance Schedule\u0001Customer Name,Maintenance Schedule\u0001Address,Maintenance Schedule\u0001Sales Order No"
- },
- {
- "name": "maintenance_schedule_details",
- "doctype": "Search Criteria"
- }
-]
\ No newline at end of file
diff --git a/support/search_criteria/warranty_amc_expiry_details/__init__.py b/support/search_criteria/warranty_amc_expiry_details/__init__.py
deleted file mode 100644
index baffc48..0000000
--- a/support/search_criteria/warranty_amc_expiry_details/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-from __future__ import unicode_literals
diff --git a/support/search_criteria/warranty_amc_expiry_details/warranty_amc_expiry_details.js b/support/search_criteria/warranty_amc_expiry_details/warranty_amc_expiry_details.js
deleted file mode 100644
index ad5ce26..0000000
--- a/support/search_criteria/warranty_amc_expiry_details/warranty_amc_expiry_details.js
+++ /dev/null
@@ -1,25 +0,0 @@
-// ERPNext - web based ERP (http://erpnext.com)
-// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-//this.mytabs.items['Select Columns'].hide();
-
-report.customize_filters = function() {
- this.filter_fields_dict['Serial No'+FILTER_SEP +'Status'].df.in_first_page = 0;
- this.filter_fields_dict['Serial No'+FILTER_SEP +'Customer'].df.in_first_page = 1;
- this.filter_fields_dict['Serial No'+FILTER_SEP +'Customer Name'].df.in_first_page = 1;
- this.filter_fields_dict['Serial No'+FILTER_SEP +'Maintenance Status'].df.in_first_page = 1;
-
-}
\ No newline at end of file
diff --git a/support/search_criteria/warranty_amc_expiry_details/warranty_amc_expiry_details.txt b/support/search_criteria/warranty_amc_expiry_details/warranty_amc_expiry_details.txt
deleted file mode 100644
index bad5c9f..0000000
--- a/support/search_criteria/warranty_amc_expiry_details/warranty_amc_expiry_details.txt
+++ /dev/null
@@ -1,26 +0,0 @@
-[
- {
- "owner": "Administrator",
- "docstatus": 0,
- "creation": "2012-04-03 12:49:53",
- "modified_by": "Administrator",
- "modified": "2012-04-03 12:49:53"
- },
- {
- "module": "Support",
- "standard": "Yes",
- "sort_order": "DESC",
- "filters": "{'Serial No\u0001Saved':1,'Serial No\u0001Status':'','Serial No\u0001Maintenance Status':''}",
- "doctype": "Search Criteria",
- "doc_type": "Serial No",
- "name": "__common__",
- "sort_by": "`tabSerial No`.`name`",
- "page_len": 50,
- "criteria_name": "Warranty/AMC Expiry Details",
- "columns": "Serial No\u0001ID,Serial No\u0001Item Code,Serial No\u0001Description,Serial No\u0001Status,Serial No\u0001Item Group,Serial No\u0001Purchase Receipt No,Serial No\u0001Delivery Note No,Serial No\u0001Customer,Serial No\u0001Customer Name,Serial No\u0001AMC Expiry Date,Serial No\u0001Warranty Expiry Date"
- },
- {
- "name": "warranty-amc_expiry_details",
- "doctype": "Search Criteria"
- }
-]
\ No newline at end of file
diff --git a/support/search_criteria/warranty_amc_summary/__init__.py b/support/search_criteria/warranty_amc_summary/__init__.py
deleted file mode 100644
index baffc48..0000000
--- a/support/search_criteria/warranty_amc_summary/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-from __future__ import unicode_literals
diff --git a/support/search_criteria/warranty_amc_summary/warranty_amc_summary.js b/support/search_criteria/warranty_amc_summary/warranty_amc_summary.js
deleted file mode 100644
index 4ad5a76..0000000
--- a/support/search_criteria/warranty_amc_summary/warranty_amc_summary.js
+++ /dev/null
@@ -1,26 +0,0 @@
-// ERPNext - web based ERP (http://erpnext.com)
-// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-report.customize_filters = function() {
- this.hide_all_filters();
- this.mytabs.items['Select Columns'].hide();
- this.mytabs.items['More Filters'].hide();
- this.add_filter({fieldname:'based_on', label:'Based On', fieldtype:'Select', options:'Territory'+NEWLINE+'Item Group',ignore:1,parent:'Serial No',in_first_page:1, report_default:'Item Group'});
-}
-
-report.aftertableprint = function(t) {
- $yt(t,'*',1,{whiteSpace:'pre'});
-}
\ No newline at end of file
diff --git a/support/search_criteria/warranty_amc_summary/warranty_amc_summary.py b/support/search_criteria/warranty_amc_summary/warranty_amc_summary.py
deleted file mode 100644
index 8c102c3..0000000
--- a/support/search_criteria/warranty_amc_summary/warranty_amc_summary.py
+++ /dev/null
@@ -1,54 +0,0 @@
-# ERPNext - web based ERP (http://erpnext.com)
-# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-
-from __future__ import unicode_literals
-opt = filter_values.get('based_on')
-opt_dict = {'Territory':'territory', 'Item Group':'item_group'}
-
-# ADD NEW COLUMNS
-row_list = [[opt,'Data','150px',''],
- ['Out of AMC','Int','150px',''],
- ['Under AMC','Int','150px',''],
- ['Out of Warranty','Int','150px',''],
- ['Under Warranty','Int','150px',''],
- ['Total','Int','150px','']]
-
-for r in row_list:
- colnames.append(r[0])
- coltypes.append(r[1])
- colwidths.append(r[2])
- coloptions.append(r[3])
- col_idx[r[0]] = len(colnames)-1
-
-
-#ADD VALUES TO THE COLUMN
-out=[]
-oa,ua,ow,uw,sum=0,0,0,0,0
-nowdate = nowdate()
-for r in res:
- lft_rgt = sql("select lft, rgt from `tab%s` where name = '%s'" % (opt,r[col_idx[opt]].strip()))
-
-
- det = sql("select COUNT(CASE WHEN t1.amc_expiry_date < '%s' THEN t1.name ELSE NULL END), COUNT(CASE WHEN t1.amc_expiry_date >= '%s' THEN t1.name ELSE NULL END), COUNT(CASE WHEN t1.warranty_expiry_date < '%s' THEN t1.name ELSE NULL END), COUNT(CASE WHEN t1.warranty_expiry_date >= '%s' THEN t1.name ELSE NULL END) from `tabSerial No` t1, `tab%s` t2 where t1.%s = t2.name and t2.lft>= '%s' and t2. rgt <= '%s' and t1.status = 'Delivered' and ifnull(item_group,'')!='' and ifnull(territory,'')!=''" %(nowdate,nowdate,nowdate,nowdate,opt, opt_dict[opt], lft_rgt[0][0], lft_rgt[0][1]))
-
- r.append(cint(det[0][0]))
- r.append(cint(det[0][1]))
- r.append(cint(det[0][2]))
- r.append(cint(det[0][3]))
- tot = cint(det[0][0]) + cint(det[0][1]) + cint(det[0][2]) + cint(det[0][3])
- r.append(tot)
- out.append(r)
diff --git a/support/search_criteria/warranty_amc_summary/warranty_amc_summary.sql b/support/search_criteria/warranty_amc_summary/warranty_amc_summary.sql
deleted file mode 100644
index ebd7ae8..0000000
--- a/support/search_criteria/warranty_amc_summary/warranty_amc_summary.sql
+++ /dev/null
@@ -1 +0,0 @@
-SELECT CONCAT(REPEAT(' ', COUNT(parent.name) - 1), node.name) AS name FROM `tab%(based_on)s` AS node,`tab%(based_on)s` AS parent WHERE node.lft BETWEEN parent.lft AND parent.rgt AND node.docstatus !=2 GROUP BY node.name ORDER BY node.lft
\ No newline at end of file
diff --git a/support/search_criteria/warranty_amc_summary/warranty_amc_summary.txt b/support/search_criteria/warranty_amc_summary/warranty_amc_summary.txt
deleted file mode 100644
index 098b5d6..0000000
--- a/support/search_criteria/warranty_amc_summary/warranty_amc_summary.txt
+++ /dev/null
@@ -1,25 +0,0 @@
-[
- {
- "owner": "Administrator",
- "docstatus": 0,
- "creation": "2012-04-03 12:49:53",
- "modified_by": "Administrator",
- "modified": "2012-04-03 12:49:53"
- },
- {
- "module": "Support",
- "sort_order": "DESC",
- "filters": "{'Serial No\u0001Saved':1,'Serial No\u0001Status':''}",
- "standard": "Yes",
- "doc_type": "Serial No",
- "name": "__common__",
- "doctype": "Search Criteria",
- "sort_by": "name",
- "page_len": 50,
- "criteria_name": "Warranty/AMC Summary"
- },
- {
- "name": "warranty-amc_summary",
- "doctype": "Search Criteria"
- }
-]
\ No newline at end of file
diff --git a/tests/data/item/android_jack_d.txt b/tests/data/item/android_jack_d.txt
deleted file mode 100644
index cfc27e0..0000000
--- a/tests/data/item/android_jack_d.txt
+++ /dev/null
@@ -1,33 +0,0 @@
-[
- {
- "owner": "Administrator",
- "docstatus": 0,
- "creation": "2012-08-26 11:30:44",
- "modified_by": "Administrator",
- "modified": "2012-08-26 11:30:44"
- },
- {
- "is_service_item": "No",
- "is_manufactured_item": "Yes",
- "description": "Android Jack D",
- "item_code": "Android Jack D",
- "is_stock_item": "Yes",
- "inspection_required": "No",
- "is_purchase_item": "Yes",
- "is_pro_applicable": "Yes",
- "name": "__common__",
- "item_name": "Android Jack D",
- "item_group": "Android",
- "doctype": "Item",
- "is_sales_item": "Yes",
- "is_sub_contracted_item": "Yes",
- "stock_uom": "Nos",
- "has_batch_no": "No",
- "has_serial_no": "No",
- "default_warehouse": "Default Warehouse"
- },
- {
- "name": "Android Jack D",
- "doctype": "Item"
- }
-]
\ No newline at end of file
diff --git a/tests/data/item/android_jack_s.txt b/tests/data/item/android_jack_s.txt
deleted file mode 100644
index c9d0ff6..0000000
--- a/tests/data/item/android_jack_s.txt
+++ /dev/null
@@ -1,33 +0,0 @@
-[
- {
- "owner": "Administrator",
- "docstatus": 0,
- "creation": "2012-08-26 11:29:22",
- "modified_by": "Administrator",
- "modified": "2012-08-26 11:29:22"
- },
- {
- "is_service_item": "No",
- "is_manufactured_item": "Yes",
- "description": "Android Jack S",
- "item_code": "Android Jack S",
- "is_stock_item": "Yes",
- "inspection_required": "No",
- "is_purchase_item": "Yes",
- "is_pro_applicable": "Yes",
- "name": "__common__",
- "item_name": "Android Jack S",
- "item_group": "Android",
- "doctype": "Item",
- "is_sales_item": "Yes",
- "is_sub_contracted_item": "Yes",
- "stock_uom": "Nos",
- "has_batch_no": "No",
- "has_serial_no": "No",
- "default_warehouse": "Default Warehouse"
- },
- {
- "name": "Android Jack S",
- "doctype": "Item"
- }
-]
\ No newline at end of file
diff --git a/tests/data/item/home_desktop_100.txt b/tests/data/item/home_desktop_100.txt
deleted file mode 100644
index bee1c96..0000000
--- a/tests/data/item/home_desktop_100.txt
+++ /dev/null
@@ -1,31 +0,0 @@
-[
- {
- "owner": "Administrator",
- "docstatus": 0,
- "creation": "2012-08-26 11:25:28",
- "modified_by": "Administrator",
- "modified": "2012-08-26 11:25:28"
- },
- {
- "is_service_item": "No",
- "is_manufactured_item": "No",
- "description": "Home Desktop 100",
- "item_code": "Home Desktop 100",
- "is_stock_item": "Yes",
- "is_purchase_item": "Yes",
- "name": "__common__",
- "default_warehouse": "Default Warehouse",
- "item_name": "Home Desktop 100",
- "item_group": "Home Series",
- "doctype": "Item",
- "is_sales_item": "Yes",
- "stock_uom": "Nos",
- "has_batch_no": "No",
- "has_serial_no": "No",
- "inspection_required": "No"
- },
- {
- "name": "Home Desktop 100",
- "doctype": "Item"
- }
-]
\ No newline at end of file
diff --git a/tests/data/item/home_desktop_200.txt b/tests/data/item/home_desktop_200.txt
deleted file mode 100644
index 0fb439e..0000000
--- a/tests/data/item/home_desktop_200.txt
+++ /dev/null
@@ -1,30 +0,0 @@
-[
- {
- "owner": "Administrator",
- "docstatus": 0,
- "creation": "2012-08-26 11:25:54",
- "modified_by": "Administrator",
- "modified": "2012-08-26 11:25:54"
- },
- {
- "is_service_item": "No",
- "description": "Home Desktop 200",
- "item_code": "Home Desktop 200",
- "is_stock_item": "Yes",
- "is_purchase_item": "Yes",
- "name": "__common__",
- "default_warehouse": "Default Warehouse",
- "item_name": "Home Desktop 200",
- "item_group": "Home Series",
- "doctype": "Item",
- "is_sales_item": "Yes",
- "stock_uom": "Nos",
- "inspection_required": "No",
- "has_serial_no": "No",
- "has_batch_no": "No"
- },
- {
- "name": "Home Desktop 200",
- "doctype": "Item"
- }
-]
\ No newline at end of file
diff --git a/tests/data/item/home_desktop_300.txt b/tests/data/item/home_desktop_300.txt
deleted file mode 100644
index c7934d9..0000000
--- a/tests/data/item/home_desktop_300.txt
+++ /dev/null
@@ -1,30 +0,0 @@
-[
- {
- "owner": "Administrator",
- "docstatus": 0,
- "creation": "2012-08-26 11:26:37",
- "modified_by": "Administrator",
- "modified": "2012-08-26 11:26:37"
- },
- {
- "is_service_item": "No",
- "description": "Home Desktop 300",
- "item_code": "Home Desktop 300",
- "is_stock_item": "Yes",
- "is_purchase_item": "Yes",
- "name": "__common__",
- "default_warehouse": "Default Warehouse",
- "item_name": "Home Desktop 300",
- "item_group": "Home Series",
- "doctype": "Item",
- "is_sales_item": "Yes",
- "stock_uom": "Nos",
- "inspection_required": "No",
- "has_serial_no": "No",
- "has_batch_no": "No"
- },
- {
- "name": "Home Desktop 300",
- "doctype": "Item"
- }
-]
\ No newline at end of file
diff --git a/tests/data/item/nebula_7.txt b/tests/data/item/nebula_7.txt
deleted file mode 100644
index d92850f..0000000
--- a/tests/data/item/nebula_7.txt
+++ /dev/null
@@ -1,31 +0,0 @@
-[
- {
- "owner": "Administrator",
- "docstatus": 0,
- "creation": "2012-08-26 11:32:02",
- "modified_by": "Administrator",
- "modified": "2012-08-26 11:32:02"
- },
- {
- "is_service_item": "No",
- "description": "Nebula 7",
- "item_code": "Nebula 7",
- "is_stock_item": "Yes",
- "inspection_required": "No",
- "is_purchase_item": "No",
- "name": "__common__",
- "item_name": "Nebula 7",
- "item_group": "Small Tablets",
- "doctype": "Item",
- "is_sales_item": "Yes",
- "is_sub_contracted_item": "Yes",
- "stock_uom": "Nos",
- "has_batch_no": "No",
- "has_serial_no": "No",
- "default_warehouse": "Default Warehouse"
- },
- {
- "name": "Nebula 7",
- "doctype": "Item"
- }
-]
\ No newline at end of file
diff --git a/tests/data/item/nebula_8.txt b/tests/data/item/nebula_8.txt
deleted file mode 100644
index a666379..0000000
--- a/tests/data/item/nebula_8.txt
+++ /dev/null
@@ -1,31 +0,0 @@
-[
- {
- "owner": "Administrator",
- "docstatus": 0,
- "creation": "2012-08-26 11:32:02",
- "modified_by": "Administrator",
- "modified": "2012-08-26 11:32:02"
- },
- {
- "is_service_item": "No",
- "description": "Nebula 8",
- "item_code": "Nebula 8",
- "is_stock_item": "Yes",
- "inspection_required": "No",
- "is_purchase_item": "No",
- "name": "__common__",
- "item_name": "Nebula 8",
- "item_group": "Small Tablets",
- "doctype": "Item",
- "is_sales_item": "Yes",
- "is_sub_contracted_item": "Yes",
- "stock_uom": "Nos",
- "has_batch_no": "No",
- "has_serial_no": "Yes",
- "default_warehouse": "Default Warehouse"
- },
- {
- "name": "Nebula 8",
- "doctype": "Item"
- }
-]
\ No newline at end of file
diff --git a/tests/data/item_group/accessories.txt b/tests/data/item_group/accessories.txt
deleted file mode 100644
index 0b9a491..0000000
--- a/tests/data/item_group/accessories.txt
+++ /dev/null
@@ -1,20 +0,0 @@
-[
- {
- "owner": "Administrator",
- "docstatus": 0,
- "creation": "2012-08-07 09:55:59",
- "modified_by": "Administrator",
- "modified": "2012-08-07 09:55:59"
- },
- {
- "name": "__common__",
- "item_group_name": "Accessories",
- "is_group": "Yes",
- "parent_item_group": "All Item Groups",
- "doctype": "Item Group"
- },
- {
- "name": "Accessories",
- "doctype": "Item Group"
- }
-]
\ No newline at end of file
diff --git a/tests/data/item_group/android.txt b/tests/data/item_group/android.txt
deleted file mode 100644
index 16e2b79..0000000
--- a/tests/data/item_group/android.txt
+++ /dev/null
@@ -1,20 +0,0 @@
-[
- {
- "owner": "Administrator",
- "docstatus": 0,
- "creation": "2012-08-07 09:57:11",
- "modified_by": "Administrator",
- "modified": "2012-08-07 09:57:11"
- },
- {
- "name": "__common__",
- "item_group_name": "Android",
- "is_group": "No",
- "parent_item_group": "Smartphones",
- "doctype": "Item Group"
- },
- {
- "name": "Android",
- "doctype": "Item Group"
- }
-]
\ No newline at end of file
diff --git a/tests/data/item_group/desktops.txt b/tests/data/item_group/desktops.txt
deleted file mode 100644
index ee95f41..0000000
--- a/tests/data/item_group/desktops.txt
+++ /dev/null
@@ -1,20 +0,0 @@
-[
- {
- "owner": "Administrator",
- "docstatus": 0,
- "creation": "2012-08-07 09:55:28",
- "modified_by": "Administrator",
- "modified": "2012-08-07 09:55:28"
- },
- {
- "name": "__common__",
- "item_group_name": "Desktops",
- "is_group": "Yes",
- "parent_item_group": "All Item Groups",
- "doctype": "Item Group"
- },
- {
- "name": "Desktops",
- "doctype": "Item Group"
- }
-]
\ No newline at end of file
diff --git a/tests/data/item_group/full_size_tablets.txt b/tests/data/item_group/full_size_tablets.txt
deleted file mode 100644
index ea590e4..0000000
--- a/tests/data/item_group/full_size_tablets.txt
+++ /dev/null
@@ -1,20 +0,0 @@
-[
- {
- "owner": "Administrator",
- "docstatus": 0,
- "creation": "2012-08-07 09:58:20",
- "modified_by": "Administrator",
- "modified": "2012-08-07 09:58:20"
- },
- {
- "name": "__common__",
- "item_group_name": "Full Size Tablets",
- "is_group": "No",
- "parent_item_group": "Tablets",
- "doctype": "Item Group"
- },
- {
- "name": "Full Size Tablets",
- "doctype": "Item Group"
- }
-]
\ No newline at end of file
diff --git a/tests/data/item_group/gamer.txt b/tests/data/item_group/gamer.txt
deleted file mode 100644
index 55ff0f4..0000000
--- a/tests/data/item_group/gamer.txt
+++ /dev/null
@@ -1,20 +0,0 @@
-[
- {
- "owner": "Administrator",
- "docstatus": 0,
- "creation": "2012-08-07 09:56:27",
- "modified_by": "Administrator",
- "modified": "2012-08-07 09:56:27"
- },
- {
- "name": "__common__",
- "item_group_name": "Gamer",
- "is_group": "No",
- "parent_item_group": "Desktops",
- "doctype": "Item Group"
- },
- {
- "name": "Gamer",
- "doctype": "Item Group"
- }
-]
\ No newline at end of file
diff --git a/tests/data/item_group/home_series.txt b/tests/data/item_group/home_series.txt
deleted file mode 100644
index fabd912..0000000
--- a/tests/data/item_group/home_series.txt
+++ /dev/null
@@ -1,20 +0,0 @@
-[
- {
- "owner": "Administrator",
- "docstatus": 0,
- "creation": "2012-08-07 09:56:15",
- "modified_by": "Administrator",
- "modified": "2012-08-07 09:56:15"
- },
- {
- "name": "__common__",
- "item_group_name": "Home Series",
- "is_group": "No",
- "parent_item_group": "Desktops",
- "doctype": "Item Group"
- },
- {
- "name": "Home Series",
- "doctype": "Item Group"
- }
-]
\ No newline at end of file
diff --git a/tests/data/item_group/laptops.txt b/tests/data/item_group/laptops.txt
deleted file mode 100644
index 20b7c16..0000000
--- a/tests/data/item_group/laptops.txt
+++ /dev/null
@@ -1,20 +0,0 @@
-[
- {
- "owner": "Administrator",
- "docstatus": 0,
- "creation": "2012-08-07 09:55:36",
- "modified_by": "Administrator",
- "modified": "2012-08-07 09:55:36"
- },
- {
- "name": "__common__",
- "item_group_name": "Laptops",
- "is_group": "Yes",
- "parent_item_group": "All Item Groups",
- "doctype": "Item Group"
- },
- {
- "name": "Laptops",
- "doctype": "Item Group"
- }
-]
\ No newline at end of file
diff --git a/tests/data/item_group/lightweight.txt b/tests/data/item_group/lightweight.txt
deleted file mode 100644
index f470b7b..0000000
--- a/tests/data/item_group/lightweight.txt
+++ /dev/null
@@ -1,20 +0,0 @@
-[
- {
- "owner": "Administrator",
- "docstatus": 0,
- "creation": "2012-08-07 09:56:57",
- "modified_by": "Administrator",
- "modified": "2012-08-07 09:56:58"
- },
- {
- "name": "__common__",
- "item_group_name": "Lightweight",
- "is_group": "No",
- "parent_item_group": "Laptops",
- "doctype": "Item Group"
- },
- {
- "name": "Lightweight",
- "doctype": "Item Group"
- }
-]
\ No newline at end of file
diff --git a/tests/data/item_group/medium_tablets.txt b/tests/data/item_group/medium_tablets.txt
deleted file mode 100644
index 0778337..0000000
--- a/tests/data/item_group/medium_tablets.txt
+++ /dev/null
@@ -1,20 +0,0 @@
-[
- {
- "owner": "Administrator",
- "docstatus": 0,
- "creation": "2012-08-07 09:57:51",
- "modified_by": "Administrator",
- "modified": "2012-08-07 09:57:51"
- },
- {
- "name": "__common__",
- "item_group_name": "Medium Tablets",
- "is_group": "No",
- "parent_item_group": "Tablets",
- "doctype": "Item Group"
- },
- {
- "name": "Medium Tablets",
- "doctype": "Item Group"
- }
-]
\ No newline at end of file
diff --git a/tests/data/item_group/pro_series.txt b/tests/data/item_group/pro_series.txt
deleted file mode 100644
index 0a789a8..0000000
--- a/tests/data/item_group/pro_series.txt
+++ /dev/null
@@ -1,20 +0,0 @@
-[
- {
- "owner": "Administrator",
- "docstatus": 0,
- "creation": "2012-08-07 09:56:20",
- "modified_by": "Administrator",
- "modified": "2012-08-07 09:56:20"
- },
- {
- "name": "__common__",
- "item_group_name": "Pro Series",
- "is_group": "No",
- "parent_item_group": "Desktops",
- "doctype": "Item Group"
- },
- {
- "name": "Pro Series",
- "doctype": "Item Group"
- }
-]
\ No newline at end of file
diff --git a/tests/data/item_group/small_tablets.txt b/tests/data/item_group/small_tablets.txt
deleted file mode 100644
index f8a5f26..0000000
--- a/tests/data/item_group/small_tablets.txt
+++ /dev/null
@@ -1,20 +0,0 @@
-[
- {
- "owner": "Administrator",
- "docstatus": 0,
- "creation": "2012-08-07 09:57:44",
- "modified_by": "Administrator",
- "modified": "2012-08-07 09:57:44"
- },
- {
- "name": "__common__",
- "item_group_name": "Small Tablets",
- "is_group": "No",
- "parent_item_group": "Tablets",
- "doctype": "Item Group"
- },
- {
- "name": "Small Tablets",
- "doctype": "Item Group"
- }
-]
\ No newline at end of file
diff --git a/tests/data/item_group/smartphones.txt b/tests/data/item_group/smartphones.txt
deleted file mode 100644
index 15a7abe..0000000
--- a/tests/data/item_group/smartphones.txt
+++ /dev/null
@@ -1,20 +0,0 @@
-[
- {
- "owner": "Administrator",
- "docstatus": 0,
- "creation": "2012-08-07 09:55:49",
- "modified_by": "Administrator",
- "modified": "2012-08-07 09:55:49"
- },
- {
- "name": "__common__",
- "item_group_name": "Smartphones",
- "is_group": "Yes",
- "parent_item_group": "All Item Groups",
- "doctype": "Item Group"
- },
- {
- "name": "Smartphones",
- "doctype": "Item Group"
- }
-]
\ No newline at end of file
diff --git a/tests/data/item_group/tablets.txt b/tests/data/item_group/tablets.txt
deleted file mode 100644
index 3825305..0000000
--- a/tests/data/item_group/tablets.txt
+++ /dev/null
@@ -1,20 +0,0 @@
-[
- {
- "owner": "Administrator",
- "docstatus": 0,
- "creation": "2012-08-07 09:55:42",
- "modified_by": "Administrator",
- "modified": "2012-08-07 09:55:42"
- },
- {
- "name": "__common__",
- "item_group_name": "Tablets",
- "is_group": "Yes",
- "parent_item_group": "All Item Groups",
- "doctype": "Item Group"
- },
- {
- "name": "Tablets",
- "doctype": "Item Group"
- }
-]
\ No newline at end of file
diff --git a/tests/data/item_group/tough.txt b/tests/data/item_group/tough.txt
deleted file mode 100644
index c905a61..0000000
--- a/tests/data/item_group/tough.txt
+++ /dev/null
@@ -1,20 +0,0 @@
-[
- {
- "owner": "Administrator",
- "docstatus": 0,
- "creation": "2012-08-07 09:56:41",
- "modified_by": "Administrator",
- "modified": "2012-08-07 09:56:41"
- },
- {
- "name": "__common__",
- "item_group_name": "Tough",
- "is_group": "No",
- "parent_item_group": "Laptops",
- "doctype": "Item Group"
- },
- {
- "name": "Tough",
- "doctype": "Item Group"
- }
-]
\ No newline at end of file
diff --git a/tests/data/item_group/ultrabook.txt b/tests/data/item_group/ultrabook.txt
deleted file mode 100644
index f75c74f..0000000
--- a/tests/data/item_group/ultrabook.txt
+++ /dev/null
@@ -1,20 +0,0 @@
-[
- {
- "owner": "Administrator",
- "docstatus": 0,
- "creation": "2012-08-07 09:56:50",
- "modified_by": "Administrator",
- "modified": "2012-08-07 09:56:50"
- },
- {
- "name": "__common__",
- "item_group_name": "Ultrabook",
- "is_group": "No",
- "parent_item_group": "Laptops",
- "doctype": "Item Group"
- },
- {
- "name": "Ultrabook",
- "doctype": "Item Group"
- }
-]
\ No newline at end of file
diff --git a/utilities/README.md b/utilities/README.md
new file mode 100644
index 0000000..871f9d4
--- /dev/null
+++ b/utilities/README.md
@@ -0,0 +1 @@
+Common utilities / DocTypes.
\ No newline at end of file
diff --git a/utilities/__init__.py b/utilities/__init__.py
index 079b03a..b047537 100644
--- a/utilities/__init__.py
+++ b/utilities/__init__.py
@@ -19,42 +19,6 @@
from webnotes import _, msgprint
from webnotes.utils import cint, comma_or
-@webnotes.whitelist()
-def get_sc_list(arg=None):
- """return list of reports for the given module module"""
- limit_start = webnotes.form_dict.get("limit_start")
- limit_page_length = webnotes.form_dict.get("limit_page_length")
- module = webnotes.form_dict.get("module")
-
- webnotes.response['values'] = webnotes.conn.sql("""
- select distinct criteria_name, doc_type, parent_doc_type
- from `tabSearch Criteria`
- where module=%s
- and docstatus in (0, NULL)
- and ifnull(disabled, 0) = 0
- order by criteria_name
- limit %s, %s""" % \
- ("%s", cint(limit_start), cint(limit_page_length)), (module,), as_dict=True)
-
-@webnotes.whitelist()
-def get_report_list():
- """return list on new style reports for modules"""
- limit_start = webnotes.form_dict.get("limit_start")
- limit_page_length = webnotes.form_dict.get("limit_page_length")
- module = webnotes.form_dict.get("module")
-
- webnotes.response['values'] = webnotes.conn.sql("""
- select distinct tabReport.name, tabReport.ref_doctype,
- if(ifnull(tabReport.query, '')!='', 1, 0) as is_query_report
- from `tabReport`, `tabDocType`
- where tabDocType.module=%s
- and tabDocType.name = tabReport.ref_doctype
- and tabReport.docstatus in (0, NULL)
- and ifnull(tabReport.disabled,0) != 1
- order by tabReport.name
- limit %s, %s""" % \
- ("%s", cint(limit_start), cint(limit_page_length)), (module,), as_dict=True)
-
def validate_status(status, options):
if status not in options:
msgprint(_("Status must be one of ") + comma_or(options), raise_exception=True)
diff --git a/utilities/doctype/address/README.md b/utilities/doctype/address/README.md
new file mode 100644
index 0000000..a4efda6
--- /dev/null
+++ b/utilities/doctype/address/README.md
@@ -0,0 +1 @@
+Address belonging to a Customer or Supplier.
\ No newline at end of file
diff --git a/utilities/doctype/answer/__init__.py b/utilities/doctype/answer/__init__.py
deleted file mode 100644
index baffc48..0000000
--- a/utilities/doctype/answer/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-from __future__ import unicode_literals
diff --git a/utilities/doctype/answer/answer.py b/utilities/doctype/answer/answer.py
deleted file mode 100644
index 7f48feb..0000000
--- a/utilities/doctype/answer/answer.py
+++ /dev/null
@@ -1,22 +0,0 @@
-# ERPNext - web based ERP (http://erpnext.com)
-# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-from __future__ import unicode_literals
-import webnotes
-
-class DocType:
- def __init__(self, d, dl):
- self.doc, self.doclist = d, dl
\ No newline at end of file
diff --git a/utilities/doctype/answer/answer.txt b/utilities/doctype/answer/answer.txt
deleted file mode 100644
index 58f0ba3..0000000
--- a/utilities/doctype/answer/answer.txt
+++ /dev/null
@@ -1,80 +0,0 @@
-[
- {
- "creation": "2012-03-27 14:36:01",
- "docstatus": 0,
- "modified": "2012-03-27 14:36:01",
- "modified_by": "Administrator",
- "owner": "Administrator"
- },
- {
- "allow_attach": 0,
- "allow_trash": 1,
- "autoname": "_ANS.#######",
- "doctype": "DocType",
- "in_create": 1,
- "module": "Utilities",
- "name": "__common__",
- "read_only": 1,
- "section_style": "Simple",
- "show_in_menu": 0,
- "version": 3
- },
- {
- "doctype": "DocField",
- "name": "__common__",
- "parent": "Answer",
- "parentfield": "fields",
- "parenttype": "DocType",
- "permlevel": 0
- },
- {
- "cancel": 1,
- "create": 1,
- "doctype": "DocPerm",
- "name": "__common__",
- "parent": "Answer",
- "parentfield": "permissions",
- "parenttype": "DocType",
- "permlevel": 0,
- "read": 1,
- "report": 1,
- "role": "All",
- "write": 1
- },
- {
- "doctype": "DocType",
- "name": "Answer"
- },
- {
- "doctype": "DocPerm"
- },
- {
- "doctype": "DocField",
- "fieldname": "question",
- "fieldtype": "Link",
- "label": "Question",
- "options": "Question"
- },
- {
- "doctype": "DocField",
- "fieldname": "answer",
- "fieldtype": "Text",
- "label": "Answer",
- "oldfieldname": "question",
- "oldfieldtype": "Text"
- },
- {
- "doctype": "DocField",
- "fieldname": "points",
- "fieldtype": "Int",
- "label": "Points"
- },
- {
- "doctype": "DocField",
- "fieldname": "_users_voted",
- "fieldtype": "Text",
- "hidden": 1,
- "label": "Users Voted",
- "print_hide": 1
- }
-]
\ No newline at end of file
diff --git a/utilities/doctype/answer/locale/_messages_doc.json b/utilities/doctype/answer/locale/_messages_doc.json
deleted file mode 100644
index 252553e4..0000000
--- a/utilities/doctype/answer/locale/_messages_doc.json
+++ /dev/null
@@ -1,7 +0,0 @@
-[
- "Question",
- "Utilities",
- "Answer",
- "Points",
- "Users Voted"
-]
\ No newline at end of file
diff --git a/utilities/doctype/answer/locale/ar-doc.json b/utilities/doctype/answer/locale/ar-doc.json
deleted file mode 100644
index 4950916..0000000
--- a/utilities/doctype/answer/locale/ar-doc.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "Answer": "\u0625\u062c\u0627\u0628\u0629",
- "Points": "\u0646\u0642\u0627\u0637",
- "Question": "\u0633\u0624\u0627\u0644",
- "Users Voted": "\u0635\u0648\u062a \u0627\u0644\u0645\u0633\u062a\u062e\u062f\u0645\u064a\u0646",
- "Utilities": "\u062e\u062f\u0645\u0627\u062a"
-}
\ No newline at end of file
diff --git a/utilities/doctype/answer/locale/de-doc.json b/utilities/doctype/answer/locale/de-doc.json
deleted file mode 100644
index 13b8911..0000000
--- a/utilities/doctype/answer/locale/de-doc.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "Answer": "Beantworten",
- "Points": "Punkte",
- "Question": "Frage",
- "Users Voted": "Nutzer",
- "Utilities": "Dienstprogramme"
-}
\ No newline at end of file
diff --git a/utilities/doctype/answer/locale/es-doc.json b/utilities/doctype/answer/locale/es-doc.json
deleted file mode 100644
index ac4cb59..0000000
--- a/utilities/doctype/answer/locale/es-doc.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "Answer": "Responder",
- "Points": "Puntos",
- "Question": "Cuesti\u00f3n",
- "Users Voted": "Los usuarios Votado",
- "Utilities": "Utilidades"
-}
\ No newline at end of file
diff --git a/utilities/doctype/answer/locale/fr-doc.json b/utilities/doctype/answer/locale/fr-doc.json
deleted file mode 100644
index e3c0b30..0000000
--- a/utilities/doctype/answer/locale/fr-doc.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "Answer": "R\u00e9pondre",
- "Points": "Points",
- "Question": "Question",
- "Users Voted": "Des internautes Yahoo!",
- "Utilities": "Utilitaires"
-}
\ No newline at end of file
diff --git a/utilities/doctype/answer/locale/hi-doc.json b/utilities/doctype/answer/locale/hi-doc.json
deleted file mode 100644
index 1c44b86..0000000
--- a/utilities/doctype/answer/locale/hi-doc.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "Answer": "\u091c\u0935\u093e\u092c",
- "Points": "\u00bb",
- "Question": "\u0938\u0935\u093e\u0932",
- "Users Voted": "\u0909\u092a\u092f\u094b\u0917\u0915\u0930\u094d\u0924\u093e \u0935\u094b\u091f \u0926\u093f\u092f\u093e",
- "Utilities": "\u0909\u092a\u092f\u094b\u0917\u093f\u0924\u093e\u090f\u0901"
-}
\ No newline at end of file
diff --git a/utilities/doctype/answer/locale/hr-doc.json b/utilities/doctype/answer/locale/hr-doc.json
deleted file mode 100644
index b712783..0000000
--- a/utilities/doctype/answer/locale/hr-doc.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "Answer": "Odgovoriti",
- "Points": "Bodovi",
- "Question": "Pitanje",
- "Users Voted": "Korisnici Glasao",
- "Utilities": "Komunalne usluge"
-}
\ No newline at end of file
diff --git a/utilities/doctype/answer/locale/nl-doc.json b/utilities/doctype/answer/locale/nl-doc.json
deleted file mode 100644
index dc7d232..0000000
--- a/utilities/doctype/answer/locale/nl-doc.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "Answer": "Beantwoorden",
- "Points": "Punten",
- "Question": "Vraag",
- "Users Voted": "Gebruikers Verkozen",
- "Utilities": "Utilities"
-}
\ No newline at end of file
diff --git a/utilities/doctype/answer/locale/pt-BR-doc.json b/utilities/doctype/answer/locale/pt-BR-doc.json
deleted file mode 100644
index b8b74d7..0000000
--- a/utilities/doctype/answer/locale/pt-BR-doc.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "Answer": "Resposta",
- "Points": "Pontos",
- "Question": "Pergunta",
- "Users Voted": "Votos de usu\u00e1rios",
- "Utilities": "Utilit\u00e1rios"
-}
\ No newline at end of file
diff --git a/utilities/doctype/answer/locale/pt-doc.json b/utilities/doctype/answer/locale/pt-doc.json
deleted file mode 100644
index 987cbf2..0000000
--- a/utilities/doctype/answer/locale/pt-doc.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "Answer": "Responder",
- "Points": "Pontos",
- "Question": "Pergunta",
- "Users Voted": "Votado usu\u00e1rios",
- "Utilities": "Utilit\u00e1rios"
-}
\ No newline at end of file
diff --git a/utilities/doctype/answer/locale/sr-doc.json b/utilities/doctype/answer/locale/sr-doc.json
deleted file mode 100644
index 711187f..0000000
--- a/utilities/doctype/answer/locale/sr-doc.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "Answer": "\u041e\u0434\u0433\u043e\u0432\u043e\u0440",
- "Points": "\u0422\u0430\u0447\u043a\u0435",
- "Question": "\u041f\u0438\u0442\u0430\u045a\u0435",
- "Users Voted": "\u041a\u043e\u0440\u0438\u0441\u043d\u0438\u0446\u0438 \u0413\u043b\u0430\u0441\u0430\u043e",
- "Utilities": "\u041a\u043e\u043c\u0443\u043d\u0430\u043b\u043d\u0435 \u0443\u0441\u043b\u0443\u0433\u0435"
-}
\ No newline at end of file
diff --git a/utilities/doctype/answer/locale/ta-doc.json b/utilities/doctype/answer/locale/ta-doc.json
deleted file mode 100644
index 2fa783a..0000000
--- a/utilities/doctype/answer/locale/ta-doc.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "Answer": "\u0baa\u0ba4\u0bbf\u0bb2\u0bcd",
- "Points": "\u0baa\u0bc1\u0bb3\u0bcd\u0bb3\u0bbf\u0b95\u0bb3\u0bcd",
- "Question": "\u0bb5\u0bbf\u0ba9\u0bbe",
- "Users Voted": "\u0baa\u0baf\u0ba9\u0bb0\u0bcd \u0ba4\u0bb3\u0bae\u0bcd",
- "Utilities": "\u0baa\u0baf\u0ba9\u0bcd\u0baa\u0bbe\u0b9f\u0bc1\u0b95\u0bb3\u0bcd"
-}
\ No newline at end of file
diff --git a/utilities/doctype/answer/locale/th-doc.json b/utilities/doctype/answer/locale/th-doc.json
deleted file mode 100644
index eb8c623..0000000
--- a/utilities/doctype/answer/locale/th-doc.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "Answer": "\u0e15\u0e2d\u0e1a",
- "Points": "\u0e08\u0e38\u0e14",
- "Question": "\u0e04\u0e33\u0e16\u0e32\u0e21",
- "Users Voted": "\u0e1c\u0e39\u0e49\u0e43\u0e0a\u0e49\u0e42\u0e2b\u0e27\u0e15",
- "Utilities": "\u0e22\u0e39\u0e17\u0e34\u0e25\u0e34\u0e15\u0e35\u0e49"
-}
\ No newline at end of file
diff --git a/utilities/doctype/contact/README.md b/utilities/doctype/contact/README.md
new file mode 100644
index 0000000..484522c
--- /dev/null
+++ b/utilities/doctype/contact/README.md
@@ -0,0 +1 @@
+Contact representing a Customer or Supplier.
\ No newline at end of file
diff --git a/utilities/doctype/gl_mapper/__init__.py b/utilities/doctype/gl_mapper/__init__.py
deleted file mode 100644
index baffc48..0000000
--- a/utilities/doctype/gl_mapper/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-from __future__ import unicode_literals
diff --git a/utilities/doctype/gl_mapper/gl_mapper.py b/utilities/doctype/gl_mapper/gl_mapper.py
deleted file mode 100644
index 7f48feb..0000000
--- a/utilities/doctype/gl_mapper/gl_mapper.py
+++ /dev/null
@@ -1,22 +0,0 @@
-# ERPNext - web based ERP (http://erpnext.com)
-# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-from __future__ import unicode_literals
-import webnotes
-
-class DocType:
- def __init__(self, d, dl):
- self.doc, self.doclist = d, dl
\ No newline at end of file
diff --git a/utilities/doctype/gl_mapper/gl_mapper.txt b/utilities/doctype/gl_mapper/gl_mapper.txt
deleted file mode 100644
index 2059186..0000000
--- a/utilities/doctype/gl_mapper/gl_mapper.txt
+++ /dev/null
@@ -1,73 +0,0 @@
-[
- {
- "creation": "2012-04-13 11:56:40",
- "docstatus": 0,
- "modified": "2012-04-23 12:27:38",
- "modified_by": "Administrator",
- "owner": "Administrator"
- },
- {
- "_last_update": "1305006361",
- "autoname": "field:doc_type",
- "doctype": "DocType",
- "module": "Utilities",
- "name": "__common__",
- "section_style": "Simple",
- "show_in_menu": 0,
- "version": 1
- },
- {
- "doctype": "DocField",
- "name": "__common__",
- "parent": "GL Mapper",
- "parentfield": "fields",
- "parenttype": "DocType",
- "permlevel": 0
- },
- {
- "create": 0,
- "doctype": "DocPerm",
- "name": "__common__",
- "parent": "GL Mapper",
- "parentfield": "permissions",
- "parenttype": "DocType",
- "permlevel": 0,
- "read": 1,
- "report": 1
- },
- {
- "doctype": "DocType",
- "name": "GL Mapper"
- },
- {
- "amend": 0,
- "cancel": 0,
- "doctype": "DocPerm",
- "role": "Accounts User",
- "submit": 0,
- "write": 0
- },
- {
- "doctype": "DocPerm",
- "role": "System Manager",
- "write": 1
- },
- {
- "doctype": "DocField",
- "fieldname": "doc_type",
- "fieldtype": "Data",
- "label": "Doc Type",
- "oldfieldname": "doc_type",
- "oldfieldtype": "Link",
- "reqd": 1
- },
- {
- "doctype": "DocField",
- "fieldname": "fields",
- "fieldtype": "Table",
- "label": "Fields",
- "oldfieldname": "fields",
- "oldfieldtype": "Table",
- "options": "GL Mapper Detail"
- }
-]
\ No newline at end of file
diff --git a/utilities/doctype/gl_mapper/locale/_messages_doc.json b/utilities/doctype/gl_mapper/locale/_messages_doc.json
deleted file mode 100644
index 2a0596b..0000000
--- a/utilities/doctype/gl_mapper/locale/_messages_doc.json
+++ /dev/null
@@ -1,6 +0,0 @@
-[
- "Fields",
- "Utilities",
- "Doc Type",
- "GL Mapper"
-]
\ No newline at end of file
diff --git a/utilities/doctype/gl_mapper/locale/ar-doc.json b/utilities/doctype/gl_mapper/locale/ar-doc.json
deleted file mode 100644
index 0fec76d..0000000
--- a/utilities/doctype/gl_mapper/locale/ar-doc.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "Doc Type": "\u0646\u0648\u0639 \u0627\u0644\u0648\u062b\u064a\u0642\u0629",
- "Fields": "\u0627\u0644\u062d\u0642\u0648\u0644",
- "GL Mapper": "GL \u0645\u062e\u0637\u0637",
- "Utilities": "\u062e\u062f\u0645\u0627\u062a"
-}
\ No newline at end of file
diff --git a/utilities/doctype/gl_mapper/locale/de-doc.json b/utilities/doctype/gl_mapper/locale/de-doc.json
deleted file mode 100644
index 509d4d2..0000000
--- a/utilities/doctype/gl_mapper/locale/de-doc.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "Doc Type": "Doc Type",
- "Fields": "Felder",
- "GL Mapper": "GL Mapper",
- "Utilities": "Dienstprogramme"
-}
\ No newline at end of file
diff --git a/utilities/doctype/gl_mapper/locale/es-doc.json b/utilities/doctype/gl_mapper/locale/es-doc.json
deleted file mode 100644
index 91ab293..0000000
--- a/utilities/doctype/gl_mapper/locale/es-doc.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "Doc Type": "Tipo Doc.",
- "Fields": "Campos",
- "GL Mapper": "GL Mapper",
- "Utilities": "Utilidades"
-}
\ No newline at end of file
diff --git a/utilities/doctype/gl_mapper/locale/fr-doc.json b/utilities/doctype/gl_mapper/locale/fr-doc.json
deleted file mode 100644
index ffdc1fb..0000000
--- a/utilities/doctype/gl_mapper/locale/fr-doc.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "Doc Type": "Doc Type d'",
- "Fields": "Champs",
- "GL Mapper": "GL Mapper",
- "Utilities": "Utilitaires"
-}
\ No newline at end of file
diff --git a/utilities/doctype/gl_mapper/locale/hi-doc.json b/utilities/doctype/gl_mapper/locale/hi-doc.json
deleted file mode 100644
index 5569f7a..0000000
--- a/utilities/doctype/gl_mapper/locale/hi-doc.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "Doc Type": "\u0921\u0949\u0915\u094d\u091f\u0930 \u0915\u0947 \u092a\u094d\u0930\u0915\u093e\u0930",
- "Fields": "\u092b\u0940\u0932\u094d\u0921\u094d\u0938",
- "GL Mapper": "\u091c\u0940\u090f\u0932 \u092a\u094d\u0930\u0924\u093f\u091a\u093f\u0924\u094d\u0930\u0923",
- "Utilities": "\u0909\u092a\u092f\u094b\u0917\u093f\u0924\u093e\u090f\u0901"
-}
\ No newline at end of file
diff --git a/utilities/doctype/gl_mapper/locale/hr-doc.json b/utilities/doctype/gl_mapper/locale/hr-doc.json
deleted file mode 100644
index 7c869cc..0000000
--- a/utilities/doctype/gl_mapper/locale/hr-doc.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "Doc Type": "Doc Tip",
- "Fields": "Polja",
- "GL Mapper": "GL Mapper",
- "Utilities": "Komunalne usluge"
-}
\ No newline at end of file
diff --git a/utilities/doctype/gl_mapper/locale/nl-doc.json b/utilities/doctype/gl_mapper/locale/nl-doc.json
deleted file mode 100644
index 57d4d0f..0000000
--- a/utilities/doctype/gl_mapper/locale/nl-doc.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "Doc Type": "Doc Type",
- "Fields": "Velden",
- "GL Mapper": "GL Mapper",
- "Utilities": "Utilities"
-}
\ No newline at end of file
diff --git a/utilities/doctype/gl_mapper/locale/pt-BR-doc.json b/utilities/doctype/gl_mapper/locale/pt-BR-doc.json
deleted file mode 100644
index 167ffa7..0000000
--- a/utilities/doctype/gl_mapper/locale/pt-BR-doc.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "Doc Type": "Tipo do Documento",
- "Fields": "Campos",
- "GL Mapper": "Mapeamento GL",
- "Utilities": "Utilit\u00e1rios"
-}
\ No newline at end of file
diff --git a/utilities/doctype/gl_mapper/locale/pt-doc.json b/utilities/doctype/gl_mapper/locale/pt-doc.json
deleted file mode 100644
index d67609b..0000000
--- a/utilities/doctype/gl_mapper/locale/pt-doc.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "Doc Type": "Tipo Doc",
- "Fields": "Campos",
- "GL Mapper": "GL Mapper",
- "Utilities": "Utilit\u00e1rios"
-}
\ No newline at end of file
diff --git a/utilities/doctype/gl_mapper/locale/sr-doc.json b/utilities/doctype/gl_mapper/locale/sr-doc.json
deleted file mode 100644
index cc3589c..0000000
--- a/utilities/doctype/gl_mapper/locale/sr-doc.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "Doc Type": "\u0414\u043e\u043a \u0422\u0438\u043f",
- "Fields": "\u041f\u043e\u0459\u0430",
- "GL Mapper": "\u0413\u041b \u041c\u0430\u043f\u043f\u0435\u0440",
- "Utilities": "\u041a\u043e\u043c\u0443\u043d\u0430\u043b\u043d\u0435 \u0443\u0441\u043b\u0443\u0433\u0435"
-}
\ No newline at end of file
diff --git a/utilities/doctype/gl_mapper/locale/ta-doc.json b/utilities/doctype/gl_mapper/locale/ta-doc.json
deleted file mode 100644
index a47c80c..0000000
--- a/utilities/doctype/gl_mapper/locale/ta-doc.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "Doc Type": "Doc \u0bb5\u0b95\u0bc8",
- "Fields": "\u0baa\u0bc1\u0bb2\u0b99\u0bcd\u0b95\u0bb3\u0bcd",
- "GL Mapper": "\u0b9c\u0bc0 mapper",
- "Utilities": "\u0baa\u0baf\u0ba9\u0bcd\u0baa\u0bbe\u0b9f\u0bc1\u0b95\u0bb3\u0bcd"
-}
\ No newline at end of file
diff --git a/utilities/doctype/gl_mapper/locale/th-doc.json b/utilities/doctype/gl_mapper/locale/th-doc.json
deleted file mode 100644
index e1d81bb..0000000
--- a/utilities/doctype/gl_mapper/locale/th-doc.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "Doc Type": "\u0e1b\u0e23\u0e30\u0e40\u0e20\u0e17 Doc",
- "Fields": "\u0e2a\u0e32\u0e02\u0e32",
- "GL Mapper": "Mapper GL",
- "Utilities": "\u0e22\u0e39\u0e17\u0e34\u0e25\u0e34\u0e15\u0e35\u0e49"
-}
\ No newline at end of file
diff --git a/utilities/doctype/gl_mapper_detail/__init__.py b/utilities/doctype/gl_mapper_detail/__init__.py
deleted file mode 100644
index baffc48..0000000
--- a/utilities/doctype/gl_mapper_detail/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-from __future__ import unicode_literals
diff --git a/utilities/doctype/gl_mapper_detail/gl_mapper_detail.py b/utilities/doctype/gl_mapper_detail/gl_mapper_detail.py
deleted file mode 100644
index 7f48feb..0000000
--- a/utilities/doctype/gl_mapper_detail/gl_mapper_detail.py
+++ /dev/null
@@ -1,22 +0,0 @@
-# ERPNext - web based ERP (http://erpnext.com)
-# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-from __future__ import unicode_literals
-import webnotes
-
-class DocType:
- def __init__(self, d, dl):
- self.doc, self.doclist = d, dl
\ No newline at end of file
diff --git a/utilities/doctype/gl_mapper_detail/gl_mapper_detail.txt b/utilities/doctype/gl_mapper_detail/gl_mapper_detail.txt
deleted file mode 100644
index 079a4a1..0000000
--- a/utilities/doctype/gl_mapper_detail/gl_mapper_detail.txt
+++ /dev/null
@@ -1,157 +0,0 @@
-[
- {
- "creation": "2013-02-22 01:28:07",
- "docstatus": 0,
- "modified": "2013-03-07 07:03:21",
- "modified_by": "Administrator",
- "owner": "Administrator"
- },
- {
- "autoname": "GLMDetail.#####",
- "doctype": "DocType",
- "istable": 1,
- "module": "Utilities",
- "name": "__common__"
- },
- {
- "doctype": "DocField",
- "fieldtype": "Data",
- "name": "__common__",
- "oldfieldtype": "Data",
- "parent": "GL Mapper Detail",
- "parentfield": "fields",
- "parenttype": "DocType",
- "permlevel": 0
- },
- {
- "doctype": "DocType",
- "name": "GL Mapper Detail"
- },
- {
- "doctype": "DocField",
- "fieldname": "table_field",
- "label": "Table Field",
- "oldfieldname": "table_field"
- },
- {
- "doctype": "DocField",
- "fieldname": "account",
- "label": "Account",
- "oldfieldname": "account",
- "reqd": 1
- },
- {
- "doctype": "DocField",
- "fieldname": "debit",
- "label": "Debit",
- "oldfieldname": "debit",
- "reqd": 1
- },
- {
- "doctype": "DocField",
- "fieldname": "credit",
- "label": "Credit",
- "oldfieldname": "credit",
- "reqd": 1
- },
- {
- "doctype": "DocField",
- "fieldname": "cost_center",
- "label": "Cost Center",
- "oldfieldname": "cost_center",
- "reqd": 0
- },
- {
- "doctype": "DocField",
- "fieldname": "against",
- "label": "Against",
- "oldfieldname": "against",
- "reqd": 1
- },
- {
- "doctype": "DocField",
- "fieldname": "remarks",
- "label": "Remarks",
- "no_copy": 1,
- "oldfieldname": "remarks",
- "reqd": 1
- },
- {
- "doctype": "DocField",
- "fieldname": "voucher_type",
- "label": "Voucher Type",
- "oldfieldname": "voucher_type",
- "reqd": 1
- },
- {
- "doctype": "DocField",
- "fieldname": "voucher_no",
- "label": "Voucher No",
- "oldfieldname": "voucher_no",
- "reqd": 1
- },
- {
- "description": "The date at which current entry will get or has actually executed.",
- "doctype": "DocField",
- "fieldname": "posting_date",
- "label": "Posting Date",
- "oldfieldname": "posting_date",
- "reqd": 1
- },
- {
- "description": "The date at which current entry is made in system.",
- "doctype": "DocField",
- "fieldname": "transaction_date",
- "label": "Transaction Date",
- "oldfieldname": "transaction_date",
- "reqd": 1
- },
- {
- "doctype": "DocField",
- "fieldname": "aging_date",
- "label": "Aging Date",
- "oldfieldname": "aging_date",
- "reqd": 1
- },
- {
- "doctype": "DocField",
- "fieldname": "fiscal_year",
- "in_filter": 1,
- "label": "Fiscal Year",
- "oldfieldname": "fiscal_year",
- "reqd": 1,
- "search_index": 0
- },
- {
- "doctype": "DocField",
- "fieldname": "against_voucher",
- "label": "Against Voucher",
- "oldfieldname": "against_voucher"
- },
- {
- "doctype": "DocField",
- "fieldname": "against_voucher_type",
- "label": "Against Voucher Type",
- "oldfieldname": "against_voucher_type"
- },
- {
- "doctype": "DocField",
- "fieldname": "company",
- "in_filter": 1,
- "label": "Company",
- "oldfieldname": "company",
- "search_index": 0
- },
- {
- "doctype": "DocField",
- "fieldname": "is_opening",
- "label": "Is Opening",
- "oldfieldname": "is_opening"
- },
- {
- "doctype": "DocField",
- "fieldname": "is_advance",
- "label": "Is Advance",
- "oldfieldname": "is_advance"
- }
-]
\ No newline at end of file
diff --git a/utilities/doctype/gl_mapper_detail/locale/_messages_doc.json b/utilities/doctype/gl_mapper_detail/locale/_messages_doc.json
deleted file mode 100644
index d3d4b62..0000000
--- a/utilities/doctype/gl_mapper_detail/locale/_messages_doc.json
+++ /dev/null
@@ -1,24 +0,0 @@
-[
- "Against Voucher",
- "Against Voucher Type",
- "Cost Center",
- "Debit",
- "Company",
- "Utilities",
- "Remarks",
- "Posting Date",
- "Account",
- "Voucher Type",
- "Against",
- "Credit",
- "Fiscal Year",
- "Is Advance",
- "Table Field",
- "Voucher No",
- "Is Opening",
- "The date at which current entry is made in system.",
- "Transaction Date",
- "GL Mapper Detail",
- "The date at which current entry will get or has actually executed.",
- "Aging Date"
-]
\ No newline at end of file
diff --git a/utilities/doctype/gl_mapper_detail/locale/ar-doc.json b/utilities/doctype/gl_mapper_detail/locale/ar-doc.json
deleted file mode 100644
index 2a3fd9a..0000000
--- a/utilities/doctype/gl_mapper_detail/locale/ar-doc.json
+++ /dev/null
@@ -1,24 +0,0 @@
-{
- "Account": "\u062d\u0633\u0627\u0628",
- "Against": "\u0636\u062f",
- "Against Voucher": "\u0636\u062f \u0642\u0633\u064a\u0645\u0629",
- "Against Voucher Type": "\u0636\u062f \u0646\u0648\u0639 \u0642\u0633\u064a\u0645\u0629",
- "Aging Date": "\u0627\u0644\u0634\u064a\u062e\u0648\u062e\u0629 \u062a\u0627\u0631\u064a\u062e",
- "Company": "\u0634\u0631\u0643\u0629",
- "Cost Center": "\u0645\u0631\u0643\u0632 \u0627\u0644\u062a\u0643\u0644\u0641\u0629",
- "Credit": "\u0627\u0626\u062a\u0645\u0627\u0646",
- "Debit": "\u0645\u062f\u064a\u0646",
- "Fiscal Year": "\u0627\u0644\u0633\u0646\u0629 \u0627\u0644\u0645\u0627\u0644\u064a\u0629",
- "GL Mapper Detail": "GL \u0645\u062e\u0637\u0637 \u062a\u0641\u0635\u064a\u0644\u064a",
- "Is Advance": "\u0647\u0648 \u0627\u0644\u0645\u0642\u062f\u0645\u0629",
- "Is Opening": "\u0648\u0641\u062a\u062d",
- "Posting Date": "\u062a\u0627\u0631\u064a\u062e \u0627\u0644\u0646\u0634\u0631",
- "Remarks": "\u062a\u0635\u0631\u064a\u062d\u0627\u062a",
- "Table Field": "\u0627\u0644\u062c\u062f\u0648\u0644 \u0627\u0644\u0645\u064a\u062f\u0627\u0646\u064a\u0629",
- "The date at which current entry is made in system.": "\u0627\u0644\u062a\u0627\u0631\u064a\u062e \u0627\u0644\u0630\u064a \u064a\u062a\u0645 \u0627\u062f\u062e\u0627\u0644\u0647\u0627 \u0641\u064a \u0627\u0644\u0646\u0638\u0627\u0645 \u0627\u0644\u062d\u0627\u0644\u064a.",
- "The date at which current entry will get or has actually executed.": "\u0646\u0641\u0630\u062a \u0641\u0639\u0644\u064a\u0627 \u0627\u0644\u062a\u0627\u0631\u064a\u062e \u0627\u0644\u0630\u064a \u0633\u0648\u0641 \u062a\u062d\u0635\u0644 \u0627\u0644\u0645\u062f\u062e\u0644 \u0627\u0644\u062d\u0627\u0644\u064a \u0623\u0648.",
- "Transaction Date": "\u062a\u0627\u0631\u064a\u062e \u0627\u0644\u0645\u0639\u0627\u0645\u0644\u0629",
- "Utilities": "\u062e\u062f\u0645\u0627\u062a",
- "Voucher No": "\u0644\u0627 \u0642\u0633\u064a\u0645\u0629",
- "Voucher Type": "\u0642\u0633\u064a\u0645\u0629 \u0646\u0648\u0639"
-}
\ No newline at end of file
diff --git a/utilities/doctype/gl_mapper_detail/locale/de-doc.json b/utilities/doctype/gl_mapper_detail/locale/de-doc.json
deleted file mode 100644
index de6136d..0000000
--- a/utilities/doctype/gl_mapper_detail/locale/de-doc.json
+++ /dev/null
@@ -1,24 +0,0 @@
-{
- "Account": "Konto",
- "Against": "Gegen",
- "Against Voucher": "Gegen Gutschein",
- "Against Voucher Type": "Gegen Gutschein Type",
- "Aging Date": "Aging Datum",
- "Company": "Firma",
- "Cost Center": "Kostenstellenrechnung",
- "Credit": "Kredit",
- "Debit": "Soll",
- "Fiscal Year": "Gesch\u00e4ftsjahr",
- "GL Mapper Detail": "GL Mapper Details",
- "Is Advance": "Ist Advance",
- "Is Opening": "Er\u00f6ffnet",
- "Posting Date": "Buchungsdatum",
- "Remarks": "Bemerkungen",
- "Table Field": "Tabelle Feld",
- "The date at which current entry is made in system.": "Das Datum, an dem aktuellen Eintrag im System hergestellt wird.",
- "The date at which current entry will get or has actually executed.": "Das Datum, an dem aktuellen Eintrag zu erhalten oder wird tats\u00e4chlich ausgef\u00fchrt.",
- "Transaction Date": "Transaction Datum",
- "Utilities": "Dienstprogramme",
- "Voucher No": "Gutschein Nein",
- "Voucher Type": "Gutschein Type"
-}
\ No newline at end of file
diff --git a/utilities/doctype/gl_mapper_detail/locale/es-doc.json b/utilities/doctype/gl_mapper_detail/locale/es-doc.json
deleted file mode 100644
index 1a3b32a..0000000
--- a/utilities/doctype/gl_mapper_detail/locale/es-doc.json
+++ /dev/null
@@ -1,24 +0,0 @@
-{
- "Account": "Cuenta",
- "Against": "Contra",
- "Against Voucher": "Contra Voucher",
- "Against Voucher Type": "Contra el tipo de comprobante",
- "Aging Date": "Fecha de antig\u00fcedad",
- "Company": "Empresa",
- "Cost Center": "De centros de coste",
- "Credit": "Cr\u00e9dito",
- "Debit": "D\u00e9bito",
- "Fiscal Year": "A\u00f1o Fiscal",
- "GL Mapper Detail": "GL Detalle Mapper",
- "Is Advance": "Es anticipado",
- "Is Opening": "Est\u00e1 Abriendo",
- "Posting Date": "Fecha de Publicaci\u00f3n",
- "Remarks": "Observaciones",
- "Table Field": "Tabla de campo",
- "The date at which current entry is made in system.": "La fecha en que se efect\u00fae la entrada actual en el sistema.",
- "The date at which current entry will get or has actually executed.": "La fecha en la que la entrada actual se consigue o se ejecuta realmente.",
- "Transaction Date": "Fecha de Transacci\u00f3n",
- "Utilities": "Utilidades",
- "Voucher No": "Vale No",
- "Voucher Type": "Vale Tipo"
-}
\ No newline at end of file
diff --git a/utilities/doctype/gl_mapper_detail/locale/fr-doc.json b/utilities/doctype/gl_mapper_detail/locale/fr-doc.json
deleted file mode 100644
index dc91246..0000000
--- a/utilities/doctype/gl_mapper_detail/locale/fr-doc.json
+++ /dev/null
@@ -1,24 +0,0 @@
-{
- "Account": "Compte",
- "Against": "Contre",
- "Against Voucher": "Bon contre",
- "Against Voucher Type": "Contre Type de Bon",
- "Aging Date": "Vieillissement Date",
- "Company": "Entreprise",
- "Cost Center": "Centre de co\u00fbts",
- "Credit": "Cr\u00e9dit",
- "Debit": "D\u00e9bit",
- "Fiscal Year": "Exercice",
- "GL Mapper Detail": "D\u00e9tail Mapper GL",
- "Is Advance": "Est-Advance",
- "Is Opening": "Est l'ouverture",
- "Posting Date": "Date de publication",
- "Remarks": "Remarques",
- "Table Field": "De champs de tableau",
- "The date at which current entry is made in system.": "La date \u00e0 laquelle l'entr\u00e9e courante est faite dans le syst\u00e8me.",
- "The date at which current entry will get or has actually executed.": "La date \u00e0 laquelle l'entr\u00e9e actuelle permet de lire ou a r\u00e9ellement ex\u00e9cut\u00e9.",
- "Transaction Date": "Date de la transaction",
- "Utilities": "Utilitaires",
- "Voucher No": "Bon Pas",
- "Voucher Type": "Type de Bon"
-}
\ No newline at end of file
diff --git a/utilities/doctype/gl_mapper_detail/locale/hi-doc.json b/utilities/doctype/gl_mapper_detail/locale/hi-doc.json
deleted file mode 100644
index faa4e40..0000000
--- a/utilities/doctype/gl_mapper_detail/locale/hi-doc.json
+++ /dev/null
@@ -1,24 +0,0 @@
-{
- "Account": "\u0916\u093e\u0924\u093e",
- "Against": "\u0915\u0947 \u0916\u093f\u0932\u093e\u092b",
- "Against Voucher": "\u0935\u093e\u0909\u091a\u0930 \u0915\u0947 \u0916\u093f\u0932\u093e\u092b",
- "Against Voucher Type": "\u0935\u093e\u0909\u091a\u0930 \u092a\u094d\u0930\u0915\u093e\u0930 \u0915\u0947 \u0916\u093f\u0932\u093e\u092b",
- "Aging Date": "\u0924\u093f\u0925\u093f \u090f\u091c\u093f\u0902\u0917",
- "Company": "\u0915\u0902\u092a\u0928\u0940",
- "Cost Center": "\u0932\u093e\u0917\u0924 \u0915\u0947\u0902\u0926\u094d\u0930",
- "Credit": "\u0936\u094d\u0930\u0947\u092f",
- "Debit": "\u0928\u093e\u092e\u0947",
- "Fiscal Year": "\u0935\u093f\u0924\u094d\u0924\u0940\u092f \u0935\u0930\u094d\u0937",
- "GL Mapper Detail": "\u091c\u0940\u090f\u0932 \u092a\u094d\u0930\u0924\u093f\u091a\u093f\u0924\u094d\u0930\u0923 \u0935\u093f\u0938\u094d\u0924\u093e\u0930",
- "Is Advance": "\u0905\u0917\u094d\u0930\u093f\u092e \u0939\u0948",
- "Is Opening": "\u0939\u0948 \u0916\u094b\u0932\u0928\u0947",
- "Posting Date": "\u0924\u093f\u0925\u093f \u092a\u094b\u0938\u094d\u091f\u093f\u0902\u0917",
- "Remarks": "\u091f\u093f\u092a\u094d\u092a\u0923\u093f\u092f\u093e\u0901",
- "Table Field": "\u091f\u0947\u092c\u0932 \u092b\u0940\u0932\u094d\u0921",
- "The date at which current entry is made in system.": "\u0924\u093e\u0930\u0940\u0916, \u091c\u093f\u0938 \u092a\u0930 \u0935\u0930\u094d\u0924\u092e\u093e\u0928 \u092a\u094d\u0930\u0935\u093f\u0937\u094d\u091f\u093f \u092a\u094d\u0930\u0923\u093e\u0932\u0940 \u092e\u0947\u0902 \u0915\u093f\u092f\u093e \u091c\u093e\u0924\u093e \u0939\u0948.",
- "The date at which current entry will get or has actually executed.": "\u0924\u093e\u0930\u0940\u0916, \u091c\u093f\u0938 \u092a\u0930 \u0935\u0930\u094d\u0924\u092e\u093e\u0928 \u092a\u094d\u0930\u0935\u093f\u0937\u094d\u091f\u093f \u092a\u093e\u0928\u0947 \u0915\u0947 \u0932\u093f\u090f \u092f\u093e \u0935\u093e\u0938\u094d\u0924\u0935 \u092e\u0947\u0902 \u092e\u093e\u0930 \u0921\u093e\u0932\u093e \u0917\u092f\u093e \u0939\u0948.",
- "Transaction Date": "\u0932\u0947\u0928\u0926\u0947\u0928 \u0915\u0940 \u0924\u093e\u0930\u0940\u0916",
- "Utilities": "\u0909\u092a\u092f\u094b\u0917\u093f\u0924\u093e\u090f\u0901",
- "Voucher No": "\u0915\u094b\u0908 \u0935\u093e\u0909\u091a\u0930",
- "Voucher Type": "\u0935\u093e\u0909\u091a\u0930 \u092a\u094d\u0930\u0915\u093e\u0930"
-}
\ No newline at end of file
diff --git a/utilities/doctype/gl_mapper_detail/locale/hr-doc.json b/utilities/doctype/gl_mapper_detail/locale/hr-doc.json
deleted file mode 100644
index cdc6d07..0000000
--- a/utilities/doctype/gl_mapper_detail/locale/hr-doc.json
+++ /dev/null
@@ -1,24 +0,0 @@
-{
- "Account": "Ra\u010dun",
- "Against": "Protiv",
- "Against Voucher": "Protiv Voucheru",
- "Against Voucher Type": "Protiv voucher vrsti",
- "Aging Date": "Starenje Datum",
- "Company": "Dru\u0161tvo",
- "Cost Center": "Tro\u0161ka",
- "Credit": "Kredit",
- "Debit": "Zadu\u017eenje",
- "Fiscal Year": "Fiskalna godina",
- "GL Mapper Detail": "GL Mapper Detalj",
- "Is Advance": "Je Predujam",
- "Is Opening": "Je Otvaranje",
- "Posting Date": "Objavljivanje Datum",
- "Remarks": "Primjedbe",
- "Table Field": "Tablica Polje",
- "The date at which current entry is made in system.": "Datum na koji teku\u0107i zapis se sastoji u sustavu.",
- "The date at which current entry will get or has actually executed.": "Datum na koji teku\u0107i zapis \u0107e dobiti ili zapravo je pogubljen.",
- "Transaction Date": "Transakcija Datum",
- "Utilities": "Komunalne usluge",
- "Voucher No": "Bon Ne",
- "Voucher Type": "Bon Tip"
-}
\ No newline at end of file
diff --git a/utilities/doctype/gl_mapper_detail/locale/nl-doc.json b/utilities/doctype/gl_mapper_detail/locale/nl-doc.json
deleted file mode 100644
index fd7f353..0000000
--- a/utilities/doctype/gl_mapper_detail/locale/nl-doc.json
+++ /dev/null
@@ -1,24 +0,0 @@
-{
- "Account": "Rekening",
- "Against": "Tegen",
- "Against Voucher": "Tegen Voucher",
- "Against Voucher Type": "Tegen Voucher Type",
- "Aging Date": "Aging Datum",
- "Company": "Vennootschap",
- "Cost Center": "Kostenplaats",
- "Credit": "Krediet",
- "Debit": "Debet",
- "Fiscal Year": "Boekjaar",
- "GL Mapper Detail": "GL Mapper Detail",
- "Is Advance": "Is Advance",
- "Is Opening": "Is openen",
- "Posting Date": "Plaatsingsdatum",
- "Remarks": "Opmerkingen",
- "Table Field": "Tabel Veld",
- "The date at which current entry is made in system.": "De datum waarop huidige item wordt gemaakt in het systeem.",
- "The date at which current entry will get or has actually executed.": "De datum waarop huidige item krijgt of heeft daadwerkelijk zijn uitgevoerd.",
- "Transaction Date": "Transactie Datum",
- "Utilities": "Utilities",
- "Voucher No": "Blad nr.",
- "Voucher Type": "Voucher Type"
-}
\ No newline at end of file
diff --git a/utilities/doctype/gl_mapper_detail/locale/pt-BR-doc.json b/utilities/doctype/gl_mapper_detail/locale/pt-BR-doc.json
deleted file mode 100644
index 63b65f3..0000000
--- a/utilities/doctype/gl_mapper_detail/locale/pt-BR-doc.json
+++ /dev/null
@@ -1,24 +0,0 @@
-{
- "Account": "Conta",
- "Against": "Contra",
- "Against Voucher": "Contra Comprovante",
- "Against Voucher Type": "Contra Tipo de Comprovante",
- "Aging Date": "Data de Envelhecimento",
- "Company": "Empresa",
- "Cost Center": "Centro de Custos",
- "Credit": "Cr\u00e9dito",
- "Debit": "D\u00e9bito",
- "Fiscal Year": "Exerc\u00edcio fiscal",
- "GL Mapper Detail": "Detalhe do Mapeamento GL",
- "Is Advance": "\u00c9 antecipado",
- "Is Opening": "\u00c9 abertura",
- "Posting Date": "Data da Postagem",
- "Remarks": "Observa\u00e7\u00f5es",
- "Table Field": "Campo da Tabela",
- "The date at which current entry is made in system.": "A data em que o lan\u00e7amento atual \u00e9 feito no sistema.",
- "The date at which current entry will get or has actually executed.": "A data em que o lan\u00e7amento atual vai ser ou foi realmente executado.",
- "Transaction Date": "Data da Transa\u00e7\u00e3o",
- "Utilities": "Utilit\u00e1rios",
- "Voucher No": "N\u00ba do comprovante",
- "Voucher Type": "Tipo de comprovante"
-}
\ No newline at end of file
diff --git a/utilities/doctype/gl_mapper_detail/locale/pt-doc.json b/utilities/doctype/gl_mapper_detail/locale/pt-doc.json
deleted file mode 100644
index 3bef987..0000000
--- a/utilities/doctype/gl_mapper_detail/locale/pt-doc.json
+++ /dev/null
@@ -1,24 +0,0 @@
-{
- "Account": "Conta",
- "Against": "Contra",
- "Against Voucher": "Contra Vale",
- "Against Voucher Type": "Tipo contra Vale",
- "Aging Date": "Envelhecimento Data",
- "Company": "Companhia",
- "Cost Center": "Centro de Custos",
- "Credit": "Cr\u00e9dito",
- "Debit": "D\u00e9bito",
- "Fiscal Year": "Exerc\u00edcio fiscal",
- "GL Mapper Detail": "GL Detalhe Mapper",
- "Is Advance": "\u00c9 o avan\u00e7o",
- "Is Opening": "Est\u00e1 abrindo",
- "Posting Date": "Data da Publica\u00e7\u00e3o",
- "Remarks": "Observa\u00e7\u00f5es",
- "Table Field": "Campos da Tabela",
- "The date at which current entry is made in system.": "A data em que a entrada actual \u00e9 feita no sistema.",
- "The date at which current entry will get or has actually executed.": "A data em que a entrada de corrente vai ter ou tem realmente executado.",
- "Transaction Date": "Data Transa\u00e7\u00e3o",
- "Utilities": "Utilit\u00e1rios",
- "Voucher No": "N\u00e3o vale",
- "Voucher Type": "Tipo comprovante"
-}
\ No newline at end of file
diff --git a/utilities/doctype/gl_mapper_detail/locale/sr-doc.json b/utilities/doctype/gl_mapper_detail/locale/sr-doc.json
deleted file mode 100644
index aad8d87..0000000
--- a/utilities/doctype/gl_mapper_detail/locale/sr-doc.json
+++ /dev/null
@@ -1,24 +0,0 @@
-{
- "Account": "\u0420\u0430\u0447\u0443\u043d",
- "Against": "\u041f\u0440\u043e\u0442\u0438\u0432",
- "Against Voucher": "\u041f\u0440\u043e\u0442\u0438\u0432 \u0432\u0430\u0443\u0447\u0435\u0440",
- "Against Voucher Type": "\u041f\u0440\u043e\u0442\u0438\u0432 \u0412\u0430\u0443\u0446\u0435\u0440 \u0422\u0438\u043f\u0435",
- "Aging Date": "\u0421\u0442\u0430\u0440\u0435\u045a\u0435 \u0414\u0430\u0442\u0435",
- "Company": "\u041a\u043e\u043c\u043f\u0430\u043d\u0438\u0458\u0430",
- "Cost Center": "\u0422\u0440\u043e\u0448\u043a\u043e\u0432\u0438 \u0446\u0435\u043d\u0442\u0430\u0440",
- "Credit": "\u041a\u0440\u0435\u0434\u0438\u0442",
- "Debit": "\u0417\u0430\u0434\u0443\u0436\u0435\u045a\u0435",
- "Fiscal Year": "\u0424\u0438\u0441\u043a\u0430\u043b\u043d\u0430 \u0433\u043e\u0434\u0438\u043d\u0430",
- "GL Mapper Detail": "\u0413\u041b \u041c\u0430\u043f\u043f\u0435\u0440 \u0414\u0435\u0442\u0430\u0459",
- "Is Advance": "\u0414\u0430 \u043b\u0438 \u0410\u0434\u0432\u0430\u043d\u0446\u0435",
- "Is Opening": "\u0414\u0430 \u043b\u0438 \u041e\u0442\u0432\u0430\u0440\u0430\u045a\u0435",
- "Posting Date": "\u041f\u043e\u0441\u0442\u0430\u0432\u0459\u0430\u045a\u0435 \u0414\u0430\u0442\u0435",
- "Remarks": "\u041f\u0440\u0438\u043c\u0435\u0434\u0431\u0435",
- "Table Field": "\u0422\u0430\u0431\u0435\u043b\u0430 \u041f\u043e\u0459\u0435",
- "The date at which current entry is made in system.": "\u0414\u0430\u0442\u0443\u043c \u043d\u0430 \u043a\u043e\u0458\u0438 \u0458\u0435 \u0442\u0440\u0435\u043d\u0443\u0442\u043d\u0438 \u0443\u043d\u043e\u0441 \u043d\u0430\u043f\u0440\u0430\u0432\u0459\u0435\u043d \u0443 \u0441\u0438\u0441\u0442\u0435\u043c\u0443.",
- "The date at which current entry will get or has actually executed.": "\u0414\u0430\u0442\u0443\u043c \u043d\u0430 \u043a\u043e\u0458\u0438 \u0442\u0440\u0435\u043d\u0443\u0442\u043d\u0430 \u0441\u0442\u0430\u0432\u043a\u0430 \u045b\u0435 \u0434\u043e\u0431\u0438\u0442\u0438 \u0438\u043b\u0438 \u0458\u0435 \u0441\u0442\u0432\u0430\u0440\u043d\u043e \u0438\u0437\u0432\u0440\u0448\u0435\u043d\u0430.",
- "Transaction Date": "\u0422\u0440\u0430\u043d\u0441\u0430\u043a\u0446\u0438\u0458\u0430 \u0414\u0430\u0442\u0443\u043c",
- "Utilities": "\u041a\u043e\u043c\u0443\u043d\u0430\u043b\u043d\u0435 \u0443\u0441\u043b\u0443\u0433\u0435",
- "Voucher No": "\u0412\u0430\u0443\u0447\u0435\u0440 \u041d\u0435\u043c\u0430",
- "Voucher Type": "\u0412\u0430\u0443\u0447\u0435\u0440 \u0422\u0438\u043f"
-}
\ No newline at end of file
diff --git a/utilities/doctype/gl_mapper_detail/locale/ta-doc.json b/utilities/doctype/gl_mapper_detail/locale/ta-doc.json
deleted file mode 100644
index 23f1796..0000000
--- a/utilities/doctype/gl_mapper_detail/locale/ta-doc.json
+++ /dev/null
@@ -1,24 +0,0 @@
-{
- "Account": "\u0b95\u0ba3\u0b95\u0bcd\u0b95\u0bc1",
- "Against": "\u0b8e\u0ba4\u0bbf\u0bb0\u0bbe\u0b95",
- "Against Voucher": "\u0bb5\u0bb5\u0bc1\u0b9a\u0bcd\u0b9a\u0bb0\u0bcd \u0b8e\u0ba4\u0bbf\u0bb0\u0bbe\u0b95",
- "Against Voucher Type": "\u0bb5\u0bb5\u0bc1\u0b9a\u0bcd\u0b9a\u0bb0\u0bcd \u0bb5\u0b95\u0bc8 \u0b8e\u0ba4\u0bbf\u0bb0\u0bbe\u0b95",
- "Aging Date": "\u0ba4\u0bc7\u0ba4\u0bbf \u0bb5\u0baf\u0ba4\u0bbe\u0ba9",
- "Company": "\u0ba8\u0bbf\u0bb1\u0bc1\u0bb5\u0ba9\u0bae\u0bcd",
- "Cost Center": "\u0b9a\u0bc6\u0bb2\u0bb5\u0bc1 \u0bae\u0bc8\u0baf\u0bae\u0bcd",
- "Credit": "\u0b95\u0b9f\u0ba9\u0bcd",
- "Debit": "\u0baa\u0bb1\u0bcd\u0bb1\u0bc1",
- "Fiscal Year": "\u0ba8\u0bbf\u0ba4\u0bbf\u0baf\u0bbe\u0ba3\u0bcd\u0b9f\u0bc1",
- "GL Mapper Detail": "\u0b9c\u0bc0 mapper \u0bb5\u0bbf\u0bb0\u0bbf\u0bb5\u0bbe\u0b95",
- "Is Advance": "\u0bae\u0bc1\u0ba9\u0bcd\u0baa\u0ba3\u0bae\u0bcd",
- "Is Opening": "\u0ba4\u0bbf\u0bb1\u0b95\u0bcd\u0b95\u0bbf\u0bb1\u0ba4\u0bc1",
- "Posting Date": "\u0ba4\u0bc7\u0ba4\u0bbf \u0ba4\u0b95\u0bb5\u0bb2\u0bcd\u0b95\u0bb3\u0bc1\u0b95\u0bcd\u0b95\u0bc1",
- "Remarks": "\u0b95\u0bb0\u0bc1\u0ba4\u0bcd\u0ba4\u0bc1\u0b95\u0bcd\u0b95\u0bb3\u0bcd",
- "Table Field": "\u0b85\u0b9f\u0bcd\u0b9f\u0bb5\u0ba3\u0bc8 \u0baa\u0bc1\u0bb2\u0bae\u0bcd",
- "The date at which current entry is made in system.": "\u0ba4\u0bb1\u0bcd\u0baa\u0bc7\u0bbe\u0ba4\u0bc8\u0baf \u0b89\u0bb3\u0bcd\u0bb3\u0bc0\u0b9f\u0bc1 \u0b85\u0bae\u0bc8\u0baa\u0bcd\u0baa\u0bc1 \u0b89\u0bb0\u0bc1\u0bb5\u0bbe\u0b95\u0bcd\u0b95\u0baa\u0bcd\u0baa\u0b9f\u0bc1\u0bae\u0bcd \u0ba4\u0bc7\u0ba4\u0bbf.",
- "The date at which current entry will get or has actually executed.": "\u0ba4\u0bb1\u0bcd\u0baa\u0bc7\u0bbe\u0ba4\u0bc8\u0baf \u0b89\u0bb3\u0bcd\u0bb3\u0bc0\u0b9f\u0bc1 \u0b85\u0bb2\u0bcd\u0bb2\u0ba4\u0bc1 \u0b8e\u0ba8\u0bcd\u0ba4 \u0ba4\u0bc7\u0ba4\u0bbf \u0b89\u0ba3\u0bcd\u0bae\u0bc8\u0baf\u0bbf\u0bb2\u0bcd \u0ba4\u0bc2\u0b95\u0bcd\u0b95\u0bbf\u0bb2\u0bbf\u0b9f\u0baa\u0bcd\u0baa\u0b9f\u0bcd\u0b9f\u0bbe\u0bb0\u0bcd.",
- "Transaction Date": "\u0baa\u0bb0\u0bbf\u0bb5\u0bb0\u0bcd\u0ba4\u0bcd\u0ba4\u0ba9\u0bc8 \u0ba4\u0bc7\u0ba4\u0bbf",
- "Utilities": "\u0baa\u0baf\u0ba9\u0bcd\u0baa\u0bbe\u0b9f\u0bc1\u0b95\u0bb3\u0bcd",
- "Voucher No": "\u0bb0\u0b9a\u0bc0\u0ba4\u0bc1 \u0b87\u0bb2\u0bcd\u0bb2\u0bc8",
- "Voucher Type": "\u0bb0\u0b9a\u0bc0\u0ba4\u0bc1 \u0bb5\u0b95\u0bc8"
-}
\ No newline at end of file
diff --git a/utilities/doctype/gl_mapper_detail/locale/th-doc.json b/utilities/doctype/gl_mapper_detail/locale/th-doc.json
deleted file mode 100644
index 6f39208..0000000
--- a/utilities/doctype/gl_mapper_detail/locale/th-doc.json
+++ /dev/null
@@ -1,24 +0,0 @@
-{
- "Account": "\u0e1a\u0e31\u0e0d\u0e0a\u0e35",
- "Against": "\u0e01\u0e31\u0e1a",
- "Against Voucher": "\u0e01\u0e31\u0e1a\u0e1a\u0e31\u0e15\u0e23\u0e01\u0e33\u0e19\u0e31\u0e25",
- "Against Voucher Type": "\u0e01\u0e31\u0e1a\u0e1b\u0e23\u0e30\u0e40\u0e20\u0e17\u0e1a\u0e31\u0e15\u0e23",
- "Aging Date": "Aging \u0e27\u0e31\u0e19\u0e17\u0e35\u0e48",
- "Company": "\u0e1a\u0e23\u0e34\u0e29\u0e31\u0e17",
- "Cost Center": "\u0e28\u0e39\u0e19\u0e22\u0e4c\u0e15\u0e49\u0e19\u0e17\u0e38\u0e19",
- "Credit": "\u0e40\u0e04\u0e23\u0e14\u0e34\u0e15",
- "Debit": "\u0e2b\u0e31\u0e01\u0e1a\u0e31\u0e0d\u0e0a\u0e35",
- "Fiscal Year": "\u0e1b\u0e35\u0e07\u0e1a\u0e1b\u0e23\u0e30\u0e21\u0e32\u0e13",
- "GL Mapper Detail": "\u0e23\u0e32\u0e22\u0e25\u0e30\u0e40\u0e2d\u0e35\u0e22\u0e14 Mapper GL",
- "Is Advance": "\u0e25\u0e48\u0e27\u0e07\u0e2b\u0e19\u0e49\u0e32",
- "Is Opening": "\u0e04\u0e37\u0e2d\u0e01\u0e32\u0e23\u0e40\u0e1b\u0e34\u0e14",
- "Posting Date": "\u0e42\u0e1e\u0e2a\u0e15\u0e4c\u0e27\u0e31\u0e19\u0e17\u0e35\u0e48",
- "Remarks": "\u0e02\u0e49\u0e2d\u0e04\u0e34\u0e14\u0e40\u0e2b\u0e47\u0e19",
- "Table Field": "\u0e40\u0e02\u0e15\u0e02\u0e49\u0e2d\u0e21\u0e39\u0e25\u0e15\u0e32\u0e23\u0e32\u0e07",
- "The date at which current entry is made in system.": "\u0e27\u0e31\u0e19\u0e17\u0e35\u0e48\u0e17\u0e35\u0e48\u0e23\u0e32\u0e22\u0e01\u0e32\u0e23\u0e1b\u0e31\u0e08\u0e08\u0e38\u0e1a\u0e31\u0e19\u0e08\u0e30\u0e17\u0e33\u0e43\u0e19\u0e23\u0e30\u0e1a\u0e1a",
- "The date at which current entry will get or has actually executed.": "\u0e27\u0e31\u0e19\u0e17\u0e35\u0e48\u0e17\u0e35\u0e48\u0e23\u0e32\u0e22\u0e01\u0e32\u0e23\u0e1b\u0e31\u0e08\u0e08\u0e38\u0e1a\u0e31\u0e19\u0e08\u0e30\u0e44\u0e14\u0e49\u0e23\u0e31\u0e1a\u0e2b\u0e23\u0e37\u0e2d\u0e44\u0e14\u0e49\u0e14\u0e33\u0e40\u0e19\u0e34\u0e19\u0e01\u0e32\u0e23\u0e08\u0e23\u0e34\u0e07",
- "Transaction Date": "\u0e27\u0e31\u0e19\u0e17\u0e35\u0e48\u0e17\u0e33\u0e23\u0e32\u0e22\u0e01\u0e32\u0e23",
- "Utilities": "\u0e22\u0e39\u0e17\u0e34\u0e25\u0e34\u0e15\u0e35\u0e49",
- "Voucher No": "\u0e1a\u0e31\u0e15\u0e23\u0e01\u0e33\u0e19\u0e31\u0e25\u0e44\u0e21\u0e48\u0e21\u0e35",
- "Voucher Type": "\u0e1b\u0e23\u0e30\u0e40\u0e20\u0e17\u0e1a\u0e31\u0e15\u0e23\u0e01\u0e33\u0e19\u0e31\u0e25"
-}
\ No newline at end of file
diff --git a/utilities/doctype/note/README.md b/utilities/doctype/note/README.md
new file mode 100644
index 0000000..95d7b33
--- /dev/null
+++ b/utilities/doctype/note/README.md
@@ -0,0 +1 @@
+Shared Note. (Page with standard information, links, attachments).
\ No newline at end of file
diff --git a/stock/doctype/featured_item/__init__.py b/utilities/doctype/note/__init__.py
similarity index 100%
rename from stock/doctype/featured_item/__init__.py
rename to utilities/doctype/note/__init__.py
diff --git a/utilities/doctype/note/note.py b/utilities/doctype/note/note.py
new file mode 100644
index 0000000..02862de
--- /dev/null
+++ b/utilities/doctype/note/note.py
@@ -0,0 +1,25 @@
+# For license information, please see license.txt
+
+from __future__ import unicode_literals
+import webnotes
+
+class DocType:
+ def __init__(self, d, dl):
+ self.doc, self.doclist = d, dl
+
+ def autoname(self):
+ # replace forbidden characters
+ import re
+ self.doc.name = re.sub("[%'\"#*?`]", "", self.doc.title.strip())
+
+ def onload(self):
+ if not self.doc.public and webnotes.session.user != self.doc.owner:
+ if webnotes.session.user not in [d.user for d in self.doclist if d.doctype=="Note User"]:
+ webnotes.msgprint("You are not authorized to read this record.", raise_exception=True)
+
+ def validate(self):
+ if not self.doc.fields.get("__islocal"):
+ if webnotes.session.user != self.doc.owner:
+ if webnotes.session.user not in webnotes.conn.sql_list("""select user from `tabNote User`
+ where parent=%s and permission='Edit'""", self.doc.name):
+ webnotes.msgprint("You are not authorized to edit this record.", raise_exception=True)
diff --git a/utilities/doctype/note/note.txt b/utilities/doctype/note/note.txt
new file mode 100644
index 0000000..a6cdf2b
--- /dev/null
+++ b/utilities/doctype/note/note.txt
@@ -0,0 +1,84 @@
+[
+ {
+ "creation": "2013-05-24 13:41:00",
+ "docstatus": 0,
+ "modified": "2013-05-27 12:16:46",
+ "modified_by": "Administrator",
+ "owner": "Administrator"
+ },
+ {
+ "allow_print": 0,
+ "allow_rename": 1,
+ "description": "Note is a free page where users can share documents / notes",
+ "doctype": "DocType",
+ "document_type": "Transaction",
+ "module": "Utilities",
+ "name": "__common__",
+ "read_only_onload": 1
+ },
+ {
+ "doctype": "DocField",
+ "name": "__common__",
+ "parent": "Note",
+ "parentfield": "fields",
+ "parenttype": "DocType",
+ "permlevel": 0
+ },
+ {
+ "cancel": 1,
+ "create": 1,
+ "doctype": "DocPerm",
+ "name": "__common__",
+ "parent": "Note",
+ "parentfield": "permissions",
+ "parenttype": "DocType",
+ "permlevel": 0,
+ "read": 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
diff --git a/utilities/doctype/note_user/README.md b/utilities/doctype/note_user/README.md
new file mode 100644
index 0000000..a8e066d
--- /dev/null
+++ b/utilities/doctype/note_user/README.md
@@ -0,0 +1 @@
+User who can access / edit the parent Note.
\ No newline at end of file
diff --git a/stock/doctype/featured_item/__init__.py b/utilities/doctype/note_user/__init__.py
similarity index 100%
copy from stock/doctype/featured_item/__init__.py
copy to utilities/doctype/note_user/__init__.py
diff --git a/website/doctype/website_product_category/website_product_category.py b/utilities/doctype/note_user/note_user.py
similarity index 100%
rename from website/doctype/website_product_category/website_product_category.py
rename to utilities/doctype/note_user/note_user.py
diff --git a/utilities/doctype/note_user/note_user.txt b/utilities/doctype/note_user/note_user.txt
new file mode 100644
index 0000000..2d82bb0
--- /dev/null
+++ b/utilities/doctype/note_user/note_user.txt
@@ -0,0 +1,45 @@
+[
+ {
+ "creation": "2013-05-24 14:24:48",
+ "docstatus": 0,
+ "modified": "2013-05-24 14:24:48",
+ "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",
+ "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": "Profile",
+ "reqd": 1
+ },
+ {
+ "default": "Edit",
+ "doctype": "DocField",
+ "fieldname": "permission",
+ "fieldtype": "Select",
+ "label": "Permission",
+ "options": "Edit\nRead"
+ }
+]
\ No newline at end of file
diff --git a/utilities/doctype/profile_control/__init__.py b/utilities/doctype/profile_control/__init__.py
deleted file mode 100644
index baffc48..0000000
--- a/utilities/doctype/profile_control/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-from __future__ import unicode_literals
diff --git a/utilities/doctype/profile_control/locale/_messages_doc.json b/utilities/doctype/profile_control/locale/_messages_doc.json
deleted file mode 100644
index e0d0206..0000000
--- a/utilities/doctype/profile_control/locale/_messages_doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-[
- "Utilities",
- "Profile Control"
-]
\ No newline at end of file
diff --git a/utilities/doctype/profile_control/locale/ar-doc.json b/utilities/doctype/profile_control/locale/ar-doc.json
deleted file mode 100644
index 534e9a6..0000000
--- a/utilities/doctype/profile_control/locale/ar-doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "Profile Control": "\u0627\u0644\u0645\u0644\u0641 \u0627\u0644\u0634\u062e\u0635\u064a \u0627\u0644\u062a\u062d\u0643\u0645",
- "Utilities": "\u062e\u062f\u0645\u0627\u062a"
-}
\ No newline at end of file
diff --git a/utilities/doctype/profile_control/locale/de-doc.json b/utilities/doctype/profile_control/locale/de-doc.json
deleted file mode 100644
index b5c3bc1..0000000
--- a/utilities/doctype/profile_control/locale/de-doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "Profile Control": "Profile Control",
- "Utilities": "Dienstprogramme"
-}
\ No newline at end of file
diff --git a/utilities/doctype/profile_control/locale/es-doc.json b/utilities/doctype/profile_control/locale/es-doc.json
deleted file mode 100644
index 531fe5d..0000000
--- a/utilities/doctype/profile_control/locale/es-doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "Profile Control": "Perfil de control",
- "Utilities": "Utilidades"
-}
\ No newline at end of file
diff --git a/utilities/doctype/profile_control/locale/fr-doc.json b/utilities/doctype/profile_control/locale/fr-doc.json
deleted file mode 100644
index e294510..0000000
--- a/utilities/doctype/profile_control/locale/fr-doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "Profile Control": "Contr\u00f4le profil",
- "Utilities": "Utilitaires"
-}
\ No newline at end of file
diff --git a/utilities/doctype/profile_control/locale/hi-doc.json b/utilities/doctype/profile_control/locale/hi-doc.json
deleted file mode 100644
index 8d4a388..0000000
--- a/utilities/doctype/profile_control/locale/hi-doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "Profile Control": "\u092a\u094d\u0930\u094b\u092b\u093c\u093e\u0907\u0932 \u0928\u093f\u092f\u0902\u0924\u094d\u0930\u0923",
- "Utilities": "\u0909\u092a\u092f\u094b\u0917\u093f\u0924\u093e\u090f\u0901"
-}
\ No newline at end of file
diff --git a/utilities/doctype/profile_control/locale/hr-doc.json b/utilities/doctype/profile_control/locale/hr-doc.json
deleted file mode 100644
index 98df106..0000000
--- a/utilities/doctype/profile_control/locale/hr-doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "Profile Control": "Profil kontrola",
- "Utilities": "Komunalne usluge"
-}
\ No newline at end of file
diff --git a/utilities/doctype/profile_control/locale/nl-doc.json b/utilities/doctype/profile_control/locale/nl-doc.json
deleted file mode 100644
index 7d857d6..0000000
--- a/utilities/doctype/profile_control/locale/nl-doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "Profile Control": "Profiel Controle",
- "Utilities": "Utilities"
-}
\ No newline at end of file
diff --git a/utilities/doctype/profile_control/locale/pt-BR-doc.json b/utilities/doctype/profile_control/locale/pt-BR-doc.json
deleted file mode 100644
index bf95a3a..0000000
--- a/utilities/doctype/profile_control/locale/pt-BR-doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "Profile Control": "Controle de Perfil",
- "Utilities": "Utilit\u00e1rios"
-}
\ No newline at end of file
diff --git a/utilities/doctype/profile_control/locale/pt-doc.json b/utilities/doctype/profile_control/locale/pt-doc.json
deleted file mode 100644
index 3f2a2d5..0000000
--- a/utilities/doctype/profile_control/locale/pt-doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "Profile Control": "Controlo de perfil",
- "Utilities": "Utilit\u00e1rios"
-}
\ No newline at end of file
diff --git a/utilities/doctype/profile_control/locale/sr-doc.json b/utilities/doctype/profile_control/locale/sr-doc.json
deleted file mode 100644
index 6bd05ae..0000000
--- a/utilities/doctype/profile_control/locale/sr-doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "Profile Control": "\u041f\u0440\u043e\u0444\u0438\u043b \u041a\u043e\u043d\u0442\u0440\u043e\u043b\u0430",
- "Utilities": "\u041a\u043e\u043c\u0443\u043d\u0430\u043b\u043d\u0435 \u0443\u0441\u043b\u0443\u0433\u0435"
-}
\ No newline at end of file
diff --git a/utilities/doctype/profile_control/locale/ta-doc.json b/utilities/doctype/profile_control/locale/ta-doc.json
deleted file mode 100644
index 8b3c207..0000000
--- a/utilities/doctype/profile_control/locale/ta-doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "Profile Control": "\u0b9a\u0bc1\u0baf\u0bb5\u0bbf\u0bb5\u0bb0\u0ba4\u0bcd\u0ba4\u0bc8 \u0b95\u0b9f\u0bcd\u0b9f\u0bc1\u0baa\u0bcd\u0baa\u0bbe\u0b9f\u0bc1",
- "Utilities": "\u0baa\u0baf\u0ba9\u0bcd\u0baa\u0bbe\u0b9f\u0bc1\u0b95\u0bb3\u0bcd"
-}
\ No newline at end of file
diff --git a/utilities/doctype/profile_control/locale/th-doc.json b/utilities/doctype/profile_control/locale/th-doc.json
deleted file mode 100644
index 9f992af..0000000
--- a/utilities/doctype/profile_control/locale/th-doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "Profile Control": "\u0e04\u0e27\u0e1a\u0e04\u0e38\u0e21\u0e23\u0e32\u0e22\u0e25\u0e30\u0e40\u0e2d\u0e35\u0e22\u0e14",
- "Utilities": "\u0e22\u0e39\u0e17\u0e34\u0e25\u0e34\u0e15\u0e35\u0e49"
-}
\ No newline at end of file
diff --git a/utilities/doctype/profile_control/profile_control.py b/utilities/doctype/profile_control/profile_control.py
deleted file mode 100644
index 340293dc..0000000
--- a/utilities/doctype/profile_control/profile_control.py
+++ /dev/null
@@ -1,67 +0,0 @@
-# ERPNext - web based ERP (http://erpnext.com)
-# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-from __future__ import unicode_literals
-import webnotes
-
-from webnotes.utils import cstr
-from webnotes.model import db_exists
-from webnotes.model.doc import Document
-from webnotes.model.bean import copy_doclist
-
-sql = webnotes.conn.sql
-
-
-
-class DocType:
- def __init__(self,d,dl):
- self.doc, self.doclist = d,dl
- self.last_profile = None
-
- def get_role_permission(self,role):
- perm = sql("select distinct t1.`parent`, t1.`read`, t1.`write`, t1.`create`, t1.`submit`,t1.`cancel`,t1.`amend` from `tabDocPerm` t1, `tabDocType` t2 where t1.`role` ='%s' and t1.docstatus !=2 and t1.permlevel = 0 and t1.`read` = 1 and t2.module != 'Recycle Bin' and t1.parent=t2.name "%role)
- return perm or ''
-
-#------------return role list -------------------------------------------------------------------------------------------------
- # All roles of Role Master
- def get_role(self):
- r_list=sql("select name from `tabRole` where name not in ('Administrator','All','Guest')")
- if r_list[0][0]:
- r_list = [x[0] for x in r_list]
- return r_list
-
- # Only user specific role
- def get_user_role(self,usr):
- r_list=sql("select role from `tabUserRole` where parent=%s and role not in ('Administrator','All','Guest')",usr)
- if r_list[0][0]:
- r_list = [x[0] for x in r_list]
- else:
- r_list=[]
- return r_list
-
- # adding new role
- def add_user_role(self,args):
- arg=eval(args)
- sql("delete from `tabUserRole` where parenttype='Profile' and parent ='%s'" % (cstr(arg['user'])))
- role_list = arg['role_list'].split(',')
- for r in role_list:
- pr=Document('UserRole')
- pr.parent = arg['user']
- pr.parenttype = 'Profile'
- pr.role = r
- pr.parentfield = 'userroles'
- pr.save(1)
-
diff --git a/utilities/doctype/profile_control/profile_control.txt b/utilities/doctype/profile_control/profile_control.txt
deleted file mode 100644
index e0904cd..0000000
--- a/utilities/doctype/profile_control/profile_control.txt
+++ /dev/null
@@ -1,22 +0,0 @@
-[
- {
- "creation": "2012-03-27 14:36:47",
- "docstatus": 0,
- "modified": "2012-03-27 14:36:47",
- "modified_by": "Administrator",
- "owner": "Administrator"
- },
- {
- "doctype": "DocType",
- "issingle": 1,
- "module": "Utilities",
- "name": "__common__",
- "section_style": "Simple",
- "show_in_menu": 0,
- "version": 12
- },
- {
- "doctype": "DocType",
- "name": "Profile Control"
- }
-]
\ No newline at end of file
diff --git a/utilities/doctype/question/__init__.py b/utilities/doctype/question/__init__.py
deleted file mode 100644
index baffc48..0000000
--- a/utilities/doctype/question/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-from __future__ import unicode_literals
diff --git a/utilities/doctype/question/locale/_messages_doc.json b/utilities/doctype/question/locale/_messages_doc.json
deleted file mode 100644
index 4d4aa11..0000000
--- a/utilities/doctype/question/locale/_messages_doc.json
+++ /dev/null
@@ -1,9 +0,0 @@
-[
- "User Tags",
- "Question",
- "Utilities",
- "Answer",
- "Points",
- "File List",
- "Users Voted"
-]
\ No newline at end of file
diff --git a/utilities/doctype/question/locale/ar-doc.json b/utilities/doctype/question/locale/ar-doc.json
deleted file mode 100644
index bafb808..0000000
--- a/utilities/doctype/question/locale/ar-doc.json
+++ /dev/null
@@ -1,9 +0,0 @@
-{
- "Answer": "\u0625\u062c\u0627\u0628\u0629",
- "File List": "\u0645\u0644\u0641 \u0642\u0627\u0626\u0645\u0629",
- "Points": "\u0646\u0642\u0627\u0637",
- "Question": "\u0633\u0624\u0627\u0644",
- "User Tags": "\u0627\u0644\u0643\u0644\u0645\u0627\u062a \u0627\u0644\u0645\u0633\u062a\u062e\u062f\u0645",
- "Users Voted": "\u0635\u0648\u062a \u0627\u0644\u0645\u0633\u062a\u062e\u062f\u0645\u064a\u0646",
- "Utilities": "\u062e\u062f\u0645\u0627\u062a"
-}
\ No newline at end of file
diff --git a/utilities/doctype/question/locale/de-doc.json b/utilities/doctype/question/locale/de-doc.json
deleted file mode 100644
index cf7569c..0000000
--- a/utilities/doctype/question/locale/de-doc.json
+++ /dev/null
@@ -1,9 +0,0 @@
-{
- "Answer": "Beantworten",
- "File List": "Dateiliste",
- "Points": "Punkte",
- "Question": "Frage",
- "User Tags": "Nutzertags",
- "Users Voted": "Nutzer",
- "Utilities": "Dienstprogramme"
-}
\ No newline at end of file
diff --git a/utilities/doctype/question/locale/es-doc.json b/utilities/doctype/question/locale/es-doc.json
deleted file mode 100644
index 683fc0c..0000000
--- a/utilities/doctype/question/locale/es-doc.json
+++ /dev/null
@@ -1,9 +0,0 @@
-{
- "Answer": "Responder",
- "File List": "Lista de archivos",
- "Points": "Puntos",
- "Question": "Cuesti\u00f3n",
- "User Tags": "Nube de etiquetas",
- "Users Voted": "Los usuarios Votado",
- "Utilities": "Utilidades"
-}
\ No newline at end of file
diff --git a/utilities/doctype/question/locale/fr-doc.json b/utilities/doctype/question/locale/fr-doc.json
deleted file mode 100644
index 8722801..0000000
--- a/utilities/doctype/question/locale/fr-doc.json
+++ /dev/null
@@ -1,9 +0,0 @@
-{
- "Answer": "R\u00e9pondre",
- "File List": "Liste des fichiers",
- "Points": "Points",
- "Question": "Question",
- "User Tags": "Nuage de Tags",
- "Users Voted": "Des internautes Yahoo!",
- "Utilities": "Utilitaires"
-}
\ No newline at end of file
diff --git a/utilities/doctype/question/locale/hi-doc.json b/utilities/doctype/question/locale/hi-doc.json
deleted file mode 100644
index c7b9ebc..0000000
--- a/utilities/doctype/question/locale/hi-doc.json
+++ /dev/null
@@ -1,9 +0,0 @@
-{
- "Answer": "\u091c\u0935\u093e\u092c",
- "File List": "\u092b\u093c\u093e\u0907\u0932 \u0938\u0942\u091a\u0940",
- "Points": "\u00bb",
- "Question": "\u0938\u0935\u093e\u0932",
- "User Tags": "\u0909\u092a\u092f\u094b\u0917\u0915\u0930\u094d\u0924\u093e \u0915\u0947 \u091f\u0948\u0917",
- "Users Voted": "\u0909\u092a\u092f\u094b\u0917\u0915\u0930\u094d\u0924\u093e \u0935\u094b\u091f \u0926\u093f\u092f\u093e",
- "Utilities": "\u0909\u092a\u092f\u094b\u0917\u093f\u0924\u093e\u090f\u0901"
-}
\ No newline at end of file
diff --git a/utilities/doctype/question/locale/hr-doc.json b/utilities/doctype/question/locale/hr-doc.json
deleted file mode 100644
index 94127c2..0000000
--- a/utilities/doctype/question/locale/hr-doc.json
+++ /dev/null
@@ -1,9 +0,0 @@
-{
- "Answer": "Odgovoriti",
- "File List": "Popis datoteka",
- "Points": "Bodovi",
- "Question": "Pitanje",
- "User Tags": "Upute Tags",
- "Users Voted": "Korisnici Glasao",
- "Utilities": "Komunalne usluge"
-}
\ No newline at end of file
diff --git a/utilities/doctype/question/locale/nl-doc.json b/utilities/doctype/question/locale/nl-doc.json
deleted file mode 100644
index b9f30e2..0000000
--- a/utilities/doctype/question/locale/nl-doc.json
+++ /dev/null
@@ -1,9 +0,0 @@
-{
- "Answer": "Beantwoorden",
- "File List": "File List",
- "Points": "Punten",
- "Question": "Vraag",
- "User Tags": "Gebruiker-tags",
- "Users Voted": "Gebruikers Verkozen",
- "Utilities": "Utilities"
-}
\ No newline at end of file
diff --git a/utilities/doctype/question/locale/pt-BR-doc.json b/utilities/doctype/question/locale/pt-BR-doc.json
deleted file mode 100644
index 36a2804..0000000
--- a/utilities/doctype/question/locale/pt-BR-doc.json
+++ /dev/null
@@ -1,9 +0,0 @@
-{
- "Answer": "Resposta",
- "File List": "Lista de Arquivos",
- "Points": "Pontos",
- "Question": "Pergunta",
- "User Tags": "Etiquetas de Usu\u00e1rios",
- "Users Voted": "Votos de usu\u00e1rios",
- "Utilities": "Utilit\u00e1rios"
-}
\ No newline at end of file
diff --git a/utilities/doctype/question/locale/pt-doc.json b/utilities/doctype/question/locale/pt-doc.json
deleted file mode 100644
index 415ce2b..0000000
--- a/utilities/doctype/question/locale/pt-doc.json
+++ /dev/null
@@ -1,9 +0,0 @@
-{
- "Answer": "Responder",
- "File List": "Lista de Arquivos",
- "Points": "Pontos",
- "Question": "Pergunta",
- "User Tags": "Etiquetas de usu\u00e1rios",
- "Users Voted": "Votado usu\u00e1rios",
- "Utilities": "Utilit\u00e1rios"
-}
\ No newline at end of file
diff --git a/utilities/doctype/question/locale/sr-doc.json b/utilities/doctype/question/locale/sr-doc.json
deleted file mode 100644
index 07f56ce..0000000
--- a/utilities/doctype/question/locale/sr-doc.json
+++ /dev/null
@@ -1,9 +0,0 @@
-{
- "Answer": "\u041e\u0434\u0433\u043e\u0432\u043e\u0440",
- "File List": "\u0424\u0438\u043b\u0435 \u041b\u0438\u0441\u0442",
- "Points": "\u0422\u0430\u0447\u043a\u0435",
- "Question": "\u041f\u0438\u0442\u0430\u045a\u0435",
- "User Tags": "\u041a\u043e\u0440\u0438\u0441\u043d\u0438\u043a \u0422\u0430\u0433\u0441:",
- "Users Voted": "\u041a\u043e\u0440\u0438\u0441\u043d\u0438\u0446\u0438 \u0413\u043b\u0430\u0441\u0430\u043e",
- "Utilities": "\u041a\u043e\u043c\u0443\u043d\u0430\u043b\u043d\u0435 \u0443\u0441\u043b\u0443\u0433\u0435"
-}
\ No newline at end of file
diff --git a/utilities/doctype/question/locale/ta-doc.json b/utilities/doctype/question/locale/ta-doc.json
deleted file mode 100644
index 8efcefc..0000000
--- a/utilities/doctype/question/locale/ta-doc.json
+++ /dev/null
@@ -1,9 +0,0 @@
-{
- "Answer": "\u0baa\u0ba4\u0bbf\u0bb2\u0bcd",
- "File List": "\u0b95\u0bc7\u0bbe\u0baa\u0bcd\u0baa\u0bc1 \u0baa\u0b9f\u0bcd\u0b9f\u0bbf\u0baf\u0bb2\u0bcd",
- "Points": "\u0baa\u0bc1\u0bb3\u0bcd\u0bb3\u0bbf\u0b95\u0bb3\u0bcd",
- "Question": "\u0bb5\u0bbf\u0ba9\u0bbe",
- "User Tags": "\u0baa\u0baf\u0ba9\u0bb0\u0bcd \u0b95\u0bc1\u0bb1\u0bbf\u0b9a\u0bcd\u0b9a\u0bc6\u0bbe\u0bb1\u0bcd\u0b95\u0bb3\u0bcd",
- "Users Voted": "\u0baa\u0baf\u0ba9\u0bb0\u0bcd \u0ba4\u0bb3\u0bae\u0bcd",
- "Utilities": "\u0baa\u0baf\u0ba9\u0bcd\u0baa\u0bbe\u0b9f\u0bc1\u0b95\u0bb3\u0bcd"
-}
\ No newline at end of file
diff --git a/utilities/doctype/question/locale/th-doc.json b/utilities/doctype/question/locale/th-doc.json
deleted file mode 100644
index cafd736..0000000
--- a/utilities/doctype/question/locale/th-doc.json
+++ /dev/null
@@ -1,9 +0,0 @@
-{
- "Answer": "\u0e15\u0e2d\u0e1a",
- "File List": "\u0e23\u0e32\u0e22\u0e0a\u0e37\u0e48\u0e2d\u0e44\u0e1f\u0e25\u0e4c",
- "Points": "\u0e08\u0e38\u0e14",
- "Question": "\u0e04\u0e33\u0e16\u0e32\u0e21",
- "User Tags": "\u0e41\u0e17\u0e47\u0e01\u0e1c\u0e39\u0e49\u0e43\u0e0a\u0e49",
- "Users Voted": "\u0e1c\u0e39\u0e49\u0e43\u0e0a\u0e49\u0e42\u0e2b\u0e27\u0e15",
- "Utilities": "\u0e22\u0e39\u0e17\u0e34\u0e25\u0e34\u0e15\u0e35\u0e49"
-}
\ No newline at end of file
diff --git a/utilities/doctype/question/question.py b/utilities/doctype/question/question.py
deleted file mode 100644
index 6a6fd5b..0000000
--- a/utilities/doctype/question/question.py
+++ /dev/null
@@ -1,25 +0,0 @@
-# ERPNext - web based ERP (http://erpnext.com)
-# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-from __future__ import unicode_literals
-class DocType:
- def __init__(self, d, dl):
- self.doc, self.doclist = d, dl
-
- def on_trash(self):
- import webnotes
- webnotes.conn.sql("delete from tabAnswer where question=%s", self.doc.name)
-
\ No newline at end of file
diff --git a/utilities/doctype/question/question.txt b/utilities/doctype/question/question.txt
deleted file mode 100644
index fbd7b75..0000000
--- a/utilities/doctype/question/question.txt
+++ /dev/null
@@ -1,84 +0,0 @@
-[
- {
- "creation": "2013-01-02 17:08:46",
- "docstatus": 0,
- "modified": "2013-01-01 18:58:55",
- "modified_by": "Administrator",
- "owner": "Administrator"
- },
- {
- "allow_attach": 0,
- "autoname": "QUES.#######",
- "doctype": "DocType",
- "in_create": 1,
- "module": "Utilities",
- "name": "__common__",
- "read_only": 1
- },
- {
- "doctype": "DocField",
- "name": "__common__",
- "parent": "Question",
- "parentfield": "fields",
- "parenttype": "DocType",
- "permlevel": 0
- },
- {
- "cancel": 1,
- "create": 1,
- "doctype": "DocPerm",
- "name": "__common__",
- "parent": "Question",
- "parentfield": "permissions",
- "parenttype": "DocType",
- "permlevel": 0,
- "read": 1,
- "report": 1,
- "role": "All",
- "submit": 0,
- "write": 1
- },
- {
- "doctype": "DocType",
- "name": "Question"
- },
- {
- "doctype": "DocField",
- "fieldname": "question",
- "fieldtype": "Text",
- "label": "Question",
- "oldfieldname": "question",
- "oldfieldtype": "Text"
- },
- {
- "doctype": "DocField",
- "fieldname": "points",
- "fieldtype": "Int",
- "hidden": 1,
- "label": "Points"
- },
- {
- "doctype": "DocField",
- "fieldname": "answer",
- "fieldtype": "Text Editor",
- "label": "Answer",
- "oldfieldname": "answer",
- "oldfieldtype": "Text Editor"
- },
- {
- "doctype": "DocField",
- "fieldname": "_user_tags",
- "fieldtype": "Data",
- "hidden": 1,
- "label": "User Tags"
- },
- {
- "doctype": "DocField",
- "fieldname": "_users_voted",
- "fieldtype": "Text",
- "label": "Users Voted"
- },
- {
- "doctype": "DocPerm"
- }
-]
\ No newline at end of file
diff --git a/utilities/doctype/rename_tool/README.md b/utilities/doctype/rename_tool/README.md
new file mode 100644
index 0000000..38d408c
--- /dev/null
+++ b/utilities/doctype/rename_tool/README.md
@@ -0,0 +1 @@
+Tool to rename in bulk by uploading a .csv file.
\ No newline at end of file
diff --git a/utilities/doctype/sms_log/README.md b/utilities/doctype/sms_log/README.md
new file mode 100644
index 0000000..9ee2b79
--- /dev/null
+++ b/utilities/doctype/sms_log/README.md
@@ -0,0 +1 @@
+Log of SMS sent via SMS Center.
\ No newline at end of file
diff --git a/utilities/doctype/sms_receiver/__init__.py b/utilities/doctype/sms_receiver/__init__.py
deleted file mode 100644
index baffc48..0000000
--- a/utilities/doctype/sms_receiver/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-from __future__ import unicode_literals
diff --git a/utilities/doctype/sms_receiver/locale/_messages_doc.json b/utilities/doctype/sms_receiver/locale/_messages_doc.json
deleted file mode 100644
index e9845c5..0000000
--- a/utilities/doctype/sms_receiver/locale/_messages_doc.json
+++ /dev/null
@@ -1,7 +0,0 @@
-[
- "SMS Receiver",
- "Utilities",
- "Receiver Name",
- "Customer Name",
- "Mobile No"
-]
\ No newline at end of file
diff --git a/utilities/doctype/sms_receiver/locale/ar-doc.json b/utilities/doctype/sms_receiver/locale/ar-doc.json
deleted file mode 100644
index 3722d5f..0000000
--- a/utilities/doctype/sms_receiver/locale/ar-doc.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "Customer Name": "\u0627\u0633\u0645 \u0627\u0644\u0639\u0645\u064a\u0644",
- "Mobile No": "\u0631\u0642\u0645 \u0627\u0644\u062c\u0648\u0627\u0644",
- "Receiver Name": "\u0627\u0633\u062a\u0642\u0628\u0627\u0644 \u0627\u0633\u0645",
- "SMS Receiver": "SMS \u0627\u0633\u062a\u0642\u0628\u0627\u0644",
- "Utilities": "\u062e\u062f\u0645\u0627\u062a"
-}
\ No newline at end of file
diff --git a/utilities/doctype/sms_receiver/locale/de-doc.json b/utilities/doctype/sms_receiver/locale/de-doc.json
deleted file mode 100644
index 59bea69..0000000
--- a/utilities/doctype/sms_receiver/locale/de-doc.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "Customer Name": "Name des Kunden",
- "Mobile No": "In Mobile",
- "Receiver Name": "Name des Empf\u00e4ngers",
- "SMS Receiver": "SMS-Empf\u00e4nger",
- "Utilities": "Dienstprogramme"
-}
\ No newline at end of file
diff --git a/utilities/doctype/sms_receiver/locale/es-doc.json b/utilities/doctype/sms_receiver/locale/es-doc.json
deleted file mode 100644
index 69ea344..0000000
--- a/utilities/doctype/sms_receiver/locale/es-doc.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "Customer Name": "Nombre del cliente",
- "Mobile No": "Mobile No",
- "Receiver Name": "Nombre del receptor",
- "SMS Receiver": "SMS Receiver",
- "Utilities": "Utilidades"
-}
\ No newline at end of file
diff --git a/utilities/doctype/sms_receiver/locale/fr-doc.json b/utilities/doctype/sms_receiver/locale/fr-doc.json
deleted file mode 100644
index e69e00e..0000000
--- a/utilities/doctype/sms_receiver/locale/fr-doc.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "Customer Name": "Nom du client",
- "Mobile No": "Aucun mobile",
- "Receiver Name": "Nom du destinataire",
- "SMS Receiver": "SMS Receiver",
- "Utilities": "Utilitaires"
-}
\ No newline at end of file
diff --git a/utilities/doctype/sms_receiver/locale/hi-doc.json b/utilities/doctype/sms_receiver/locale/hi-doc.json
deleted file mode 100644
index 8b957e8..0000000
--- a/utilities/doctype/sms_receiver/locale/hi-doc.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "Customer Name": "\u0917\u094d\u0930\u093e\u0939\u0915 \u0915\u093e \u0928\u093e\u092e",
- "Mobile No": "\u0928\u0939\u0940\u0902 \u092e\u094b\u092c\u093e\u0907\u0932",
- "Receiver Name": "\u0930\u093f\u0938\u0940\u0935\u0930 \u0928\u093e\u092e",
- "SMS Receiver": "\u090f\u0938\u090f\u092e\u090f\u0938 \u0930\u093f\u0938\u0940\u0935\u0930",
- "Utilities": "\u0909\u092a\u092f\u094b\u0917\u093f\u0924\u093e\u090f\u0901"
-}
\ No newline at end of file
diff --git a/utilities/doctype/sms_receiver/locale/hr-doc.json b/utilities/doctype/sms_receiver/locale/hr-doc.json
deleted file mode 100644
index 3f7377f..0000000
--- a/utilities/doctype/sms_receiver/locale/hr-doc.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "Customer Name": "Naziv klijenta",
- "Mobile No": "Mobitel Nema",
- "Receiver Name": "Primatelj Ime",
- "SMS Receiver": "SMS-prijemnik",
- "Utilities": "Komunalne usluge"
-}
\ No newline at end of file
diff --git a/utilities/doctype/sms_receiver/locale/nl-doc.json b/utilities/doctype/sms_receiver/locale/nl-doc.json
deleted file mode 100644
index e31d3bb..0000000
--- a/utilities/doctype/sms_receiver/locale/nl-doc.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "Customer Name": "Klantnaam",
- "Mobile No": "Mobiel Nog geen",
- "Receiver Name": "Ontvanger Naam",
- "SMS Receiver": "SMS-ontvanger",
- "Utilities": "Utilities"
-}
\ No newline at end of file
diff --git a/utilities/doctype/sms_receiver/locale/pt-BR-doc.json b/utilities/doctype/sms_receiver/locale/pt-BR-doc.json
deleted file mode 100644
index c4fb837..0000000
--- a/utilities/doctype/sms_receiver/locale/pt-BR-doc.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "Customer Name": "Nome do cliente",
- "Mobile No": "Telefone Celular",
- "Receiver Name": "Nome do recebedor",
- "SMS Receiver": "Receptor do SMS",
- "Utilities": "Utilit\u00e1rios"
-}
\ No newline at end of file
diff --git a/utilities/doctype/sms_receiver/locale/pt-doc.json b/utilities/doctype/sms_receiver/locale/pt-doc.json
deleted file mode 100644
index e321c25..0000000
--- a/utilities/doctype/sms_receiver/locale/pt-doc.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "Customer Name": "Nome do cliente",
- "Mobile No": "No m\u00f3vel",
- "Receiver Name": "Nome receptor",
- "SMS Receiver": "SMS Receptor",
- "Utilities": "Utilit\u00e1rios"
-}
\ No newline at end of file
diff --git a/utilities/doctype/sms_receiver/locale/sr-doc.json b/utilities/doctype/sms_receiver/locale/sr-doc.json
deleted file mode 100644
index 7c8988b..0000000
--- a/utilities/doctype/sms_receiver/locale/sr-doc.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "Customer Name": "\u0418\u043c\u0435 \u043a\u043b\u0438\u0458\u0435\u043d\u0442\u0430",
- "Mobile No": "\u041c\u043e\u0431\u0438\u043b\u043d\u0438 \u041d\u0435\u043c\u0430",
- "Receiver Name": "\u041f\u0440\u0438\u0458\u0435\u043c\u043d\u0438\u043a \u0418\u043c\u0435",
- "SMS Receiver": "\u0421\u041c\u0421 \u043f\u0440\u0438\u0458\u0435\u043c\u043d\u0438\u043a",
- "Utilities": "\u041a\u043e\u043c\u0443\u043d\u0430\u043b\u043d\u0435 \u0443\u0441\u043b\u0443\u0433\u0435"
-}
\ No newline at end of file
diff --git a/utilities/doctype/sms_receiver/locale/ta-doc.json b/utilities/doctype/sms_receiver/locale/ta-doc.json
deleted file mode 100644
index 10c5d6d..0000000
--- a/utilities/doctype/sms_receiver/locale/ta-doc.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "Customer Name": "\u0bb5\u0bbe\u0b9f\u0bbf\u0b95\u0bcd\u0b95\u0bc8\u0baf\u0bbe\u0bb3\u0bb0\u0bcd \u0baa\u0bc6\u0baf\u0bb0\u0bcd",
- "Mobile No": "\u0b87\u0bb2\u0bcd\u0bb2\u0bc8 \u0bae\u0bc6\u0bbe\u0baa\u0bc8\u0bb2\u0bcd",
- "Receiver Name": "\u0bb0\u0bbf\u0b9a\u0bc0\u0bb5\u0bb0\u0bcd \u0baa\u0bc6\u0baf\u0bb0\u0bcd",
- "SMS Receiver": "\u0b8e\u0bb8\u0bcd\u0b8e\u0bae\u0bcd\u0b8e\u0bb8\u0bcd \u0baa\u0bc6\u0bb1\u0bc1\u0ba8\u0bb0\u0bcd",
- "Utilities": "\u0baa\u0baf\u0ba9\u0bcd\u0baa\u0bbe\u0b9f\u0bc1\u0b95\u0bb3\u0bcd"
-}
\ No newline at end of file
diff --git a/utilities/doctype/sms_receiver/locale/th-doc.json b/utilities/doctype/sms_receiver/locale/th-doc.json
deleted file mode 100644
index e1e45a7..0000000
--- a/utilities/doctype/sms_receiver/locale/th-doc.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "Customer Name": "\u0e0a\u0e37\u0e48\u0e2d\u0e25\u0e39\u0e01\u0e04\u0e49\u0e32",
- "Mobile No": "\u0e21\u0e37\u0e2d\u0e16\u0e37\u0e2d\u0e44\u0e21\u0e48\u0e21\u0e35",
- "Receiver Name": "\u0e0a\u0e37\u0e48\u0e2d\u0e1c\u0e39\u0e49\u0e23\u0e31\u0e1a",
- "SMS Receiver": "\u0e23\u0e31\u0e1a SMS",
- "Utilities": "\u0e22\u0e39\u0e17\u0e34\u0e25\u0e34\u0e15\u0e35\u0e49"
-}
\ No newline at end of file
diff --git a/utilities/doctype/sms_receiver/sms_receiver.py b/utilities/doctype/sms_receiver/sms_receiver.py
deleted file mode 100644
index 7f48feb..0000000
--- a/utilities/doctype/sms_receiver/sms_receiver.py
+++ /dev/null
@@ -1,22 +0,0 @@
-# ERPNext - web based ERP (http://erpnext.com)
-# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-from __future__ import unicode_literals
-import webnotes
-
-class DocType:
- def __init__(self, d, dl):
- self.doc, self.doclist = d, dl
\ No newline at end of file
diff --git a/utilities/doctype/sms_receiver/sms_receiver.txt b/utilities/doctype/sms_receiver/sms_receiver.txt
deleted file mode 100644
index 1075d21..0000000
--- a/utilities/doctype/sms_receiver/sms_receiver.txt
+++ /dev/null
@@ -1,52 +0,0 @@
-[
- {
- "creation": "2013-02-22 01:28:07",
- "docstatus": 0,
- "modified": "2013-03-07 07:03:32",
- "modified_by": "Administrator",
- "owner": "Administrator"
- },
- {
- "doctype": "DocType",
- "istable": 1,
- "module": "Utilities",
- "name": "__common__"
- },
- {
- "doctype": "DocField",
- "fieldtype": "Data",
- "name": "__common__",
- "oldfieldtype": "Data",
- "parent": "SMS Receiver",
- "parentfield": "fields",
- "parenttype": "DocType",
- "permlevel": 0
- },
- {
- "doctype": "DocType",
- "name": "SMS Receiver"
- },
- {
- "doctype": "DocField",
- "fieldname": "customer_name",
- "label": "Customer Name",
- "oldfieldname": "customer_name"
- },
- {
- "doctype": "DocField",
- "fieldname": "receiver_name",
- "label": "Receiver Name",
- "oldfieldname": "receiver_name",
- "print_width": "350px",
- "width": "350px"
- },
- {
- "doctype": "DocField",
- "fieldname": "mobile_no",
- "label": "Mobile No",
- "oldfieldname": "mobile_no",
- "print_width": "200px",
- "reqd": 1,
- "width": "200px"
- }
-]
\ No newline at end of file
diff --git a/utilities/doctype/trash_control/__init__.py b/utilities/doctype/trash_control/__init__.py
deleted file mode 100644
index baffc48..0000000
--- a/utilities/doctype/trash_control/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-from __future__ import unicode_literals
diff --git a/utilities/doctype/trash_control/locale/_messages_doc.json b/utilities/doctype/trash_control/locale/_messages_doc.json
deleted file mode 100644
index f424475..0000000
--- a/utilities/doctype/trash_control/locale/_messages_doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-[
- "Trash Control",
- "Utilities"
-]
\ No newline at end of file
diff --git a/utilities/doctype/trash_control/locale/ar-doc.json b/utilities/doctype/trash_control/locale/ar-doc.json
deleted file mode 100644
index 2ad9b62..0000000
--- a/utilities/doctype/trash_control/locale/ar-doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "Trash Control": "\u0627\u0644\u0642\u0645\u0627\u0645\u0629 \u0627\u0644\u062a\u062d\u0643\u0645",
- "Utilities": "\u062e\u062f\u0645\u0627\u062a"
-}
\ No newline at end of file
diff --git a/utilities/doctype/trash_control/locale/de-doc.json b/utilities/doctype/trash_control/locale/de-doc.json
deleted file mode 100644
index faa5da4..0000000
--- a/utilities/doctype/trash_control/locale/de-doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "Trash Control": "Trash Steuerung",
- "Utilities": "Dienstprogramme"
-}
\ No newline at end of file
diff --git a/utilities/doctype/trash_control/locale/es-doc.json b/utilities/doctype/trash_control/locale/es-doc.json
deleted file mode 100644
index a8952ad..0000000
--- a/utilities/doctype/trash_control/locale/es-doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "Trash Control": "Control de Basura",
- "Utilities": "Utilidades"
-}
\ No newline at end of file
diff --git a/utilities/doctype/trash_control/locale/fr-doc.json b/utilities/doctype/trash_control/locale/fr-doc.json
deleted file mode 100644
index 98943b7..0000000
--- a/utilities/doctype/trash_control/locale/fr-doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "Trash Control": "Contr\u00f4le Corbeille",
- "Utilities": "Utilitaires"
-}
\ No newline at end of file
diff --git a/utilities/doctype/trash_control/locale/hi-doc.json b/utilities/doctype/trash_control/locale/hi-doc.json
deleted file mode 100644
index 8b97895..0000000
--- a/utilities/doctype/trash_control/locale/hi-doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "Trash Control": "\u091f\u094d\u0930\u0948\u0936 \u0928\u093f\u092f\u0902\u0924\u094d\u0930\u0923",
- "Utilities": "\u0909\u092a\u092f\u094b\u0917\u093f\u0924\u093e\u090f\u0901"
-}
\ No newline at end of file
diff --git a/utilities/doctype/trash_control/locale/hr-doc.json b/utilities/doctype/trash_control/locale/hr-doc.json
deleted file mode 100644
index 1d1e9d6..0000000
--- a/utilities/doctype/trash_control/locale/hr-doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "Trash Control": "Sme\u0107e kontrola",
- "Utilities": "Komunalne usluge"
-}
\ No newline at end of file
diff --git a/utilities/doctype/trash_control/locale/nl-doc.json b/utilities/doctype/trash_control/locale/nl-doc.json
deleted file mode 100644
index 13f90ac..0000000
--- a/utilities/doctype/trash_control/locale/nl-doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "Trash Control": "Trash Controle",
- "Utilities": "Utilities"
-}
\ No newline at end of file
diff --git a/utilities/doctype/trash_control/locale/pt-BR-doc.json b/utilities/doctype/trash_control/locale/pt-BR-doc.json
deleted file mode 100644
index 2c4e803..0000000
--- a/utilities/doctype/trash_control/locale/pt-BR-doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "Trash Control": "Controle de lixo",
- "Utilities": "Utilit\u00e1rios"
-}
\ No newline at end of file
diff --git a/utilities/doctype/trash_control/locale/pt-doc.json b/utilities/doctype/trash_control/locale/pt-doc.json
deleted file mode 100644
index 2c4e803..0000000
--- a/utilities/doctype/trash_control/locale/pt-doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "Trash Control": "Controle de lixo",
- "Utilities": "Utilit\u00e1rios"
-}
\ No newline at end of file
diff --git a/utilities/doctype/trash_control/locale/sr-doc.json b/utilities/doctype/trash_control/locale/sr-doc.json
deleted file mode 100644
index 2fc085d..0000000
--- a/utilities/doctype/trash_control/locale/sr-doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "Trash Control": "\u0421\u043c\u0435\u045b\u0435 \u041a\u043e\u043d\u0442\u0440\u043e\u043b\u0430",
- "Utilities": "\u041a\u043e\u043c\u0443\u043d\u0430\u043b\u043d\u0435 \u0443\u0441\u043b\u0443\u0433\u0435"
-}
\ No newline at end of file
diff --git a/utilities/doctype/trash_control/locale/ta-doc.json b/utilities/doctype/trash_control/locale/ta-doc.json
deleted file mode 100644
index 4c7827b..0000000
--- a/utilities/doctype/trash_control/locale/ta-doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "Trash Control": "\u0b95\u0bc1\u0baa\u0bcd\u0baa\u0bc8 \u0b95\u0b9f\u0bcd\u0b9f\u0bc1\u0baa\u0bcd\u0baa\u0bbe\u0b9f\u0bc1",
- "Utilities": "\u0baa\u0baf\u0ba9\u0bcd\u0baa\u0bbe\u0b9f\u0bc1\u0b95\u0bb3\u0bcd"
-}
\ No newline at end of file
diff --git a/utilities/doctype/trash_control/locale/th-doc.json b/utilities/doctype/trash_control/locale/th-doc.json
deleted file mode 100644
index f62351c..0000000
--- a/utilities/doctype/trash_control/locale/th-doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "Trash Control": "\u0e04\u0e27\u0e1a\u0e04\u0e38\u0e21\u0e16\u0e31\u0e07\u0e02\u0e22\u0e30",
- "Utilities": "\u0e22\u0e39\u0e17\u0e34\u0e25\u0e34\u0e15\u0e35\u0e49"
-}
\ No newline at end of file
diff --git a/utilities/doctype/trash_control/trash_control.py b/utilities/doctype/trash_control/trash_control.py
deleted file mode 100644
index 341f837..0000000
--- a/utilities/doctype/trash_control/trash_control.py
+++ /dev/null
@@ -1,68 +0,0 @@
-# ERPNext - web based ERP (http://erpnext.com)
-# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-from __future__ import unicode_literals
-import webnotes
-
-from webnotes.utils import now
-from webnotes.model import db_exists
-from webnotes.model.bean import copy_doclist
-from webnotes.model.code import get_obj
-
-sql = webnotes.conn.sql
-
-
-
-class DocType:
- def __init__(self, d, dl):
- self.doc, self.doclist = d, dl
-
-
- # Get Masters
- # -----------
- def get_masters(self):
- mlist = []
- res = sql("select distinct t1.name from tabDocType t1, tabDocPerm t2 where ifnull(t1.allow_trash, 0) = 1 and (ifnull(t2.write, 0) = 1 or ifnull(t2.create, 0) = 1) and t2.role in (%s) and t2.parent = t1.name and t1.module not in ('DocType','Application Internal','Recycle Bin','Development','Testing','Testing System','Test') ORDER BY t1.name" % ("'"+"', '".join(webnotes.user.get_roles())+"'"))
- for r in res:
- mlist.append(r[0])
- return mlist
-
-
- # Get Trash Records
- # -----------------
- def get_trash_records(self, mast_name):
- mlist = []
- rec_dict = {}
- if mast_name == 'All':
- mlist = self.get_masters()
- else:
- mlist.append(mast_name)
- for i in mlist:
- rec = [r[0] for r in sql("select name from `tab%s` where docstatus = 2" % i)]
- if rec:
- rec_dict[i] = rec
- return rec_dict
-
-
- # Restore Records
- # ---------------
- def restore_records(self, arg):
- arg = eval(arg)
- for k in arg:
- for r in arg[k]:
- sql("update `tab%s` set docstatus = 0, modified = '%s', trash_reason = '' where name = '%s'" % (k, now(), r))
- dt_obj = get_obj(k,r)
- if hasattr(dt_obj, 'on_restore'): dt_obj.on_restore()
diff --git a/utilities/doctype/trash_control/trash_control.txt b/utilities/doctype/trash_control/trash_control.txt
deleted file mode 100644
index 412e38d..0000000
--- a/utilities/doctype/trash_control/trash_control.txt
+++ /dev/null
@@ -1,23 +0,0 @@
-[
- {
- "creation": "2012-03-27 14:36:47",
- "docstatus": 0,
- "modified": "2012-03-27 14:36:47",
- "modified_by": "Administrator",
- "owner": "Administrator"
- },
- {
- "doctype": "DocType",
- "in_create": 1,
- "issingle": 1,
- "module": "Utilities",
- "name": "__common__",
- "read_only": 1,
- "section_style": "Simple",
- "version": 35
- },
- {
- "doctype": "DocType",
- "name": "Trash Control"
- }
-]
\ No newline at end of file
diff --git a/utilities/page/markdown_reference/README.md b/utilities/page/markdown_reference/README.md
new file mode 100644
index 0000000..80f16cb
--- /dev/null
+++ b/utilities/page/markdown_reference/README.md
@@ -0,0 +1 @@
+Markdown reference.
\ No newline at end of file
diff --git a/utilities/page/markdown_reference/markdown_reference.html b/utilities/page/markdown_reference/markdown_reference.html
index cdf646c..767ac36 100644
--- a/utilities/page/markdown_reference/markdown_reference.html
+++ b/utilities/page/markdown_reference/markdown_reference.html
@@ -1,4 +1,4 @@
-<div class="layout-wrapper layout-wrapper-background">
+<div class="appframe col col-lg-12">
<div class="layout-appframe">
<div class="appframe-titlebar">
<span class="appframe-title">Markdown Reference</span>
diff --git a/utilities/page/question_view/__init__.py b/utilities/page/question_view/__init__.py
deleted file mode 100644
index baffc48..0000000
--- a/utilities/page/question_view/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-from __future__ import unicode_literals
diff --git a/utilities/page/question_view/question_view.css b/utilities/page/question_view/question_view.css
deleted file mode 100644
index 4472da7..0000000
--- a/utilities/page/question_view/question_view.css
+++ /dev/null
@@ -1,44 +0,0 @@
-.qv-body {
- padding: 13px;
-}
-
-
-.qv-input {
- font-size: 14px;
- height: 2.5em;
- width: 100%;
-}
-
-.qv-text {
- font-size: 20px;
- font-weight: bold;
-}
-
-.qv-ans-input {
- height: 5em;
-}
-
-.qv-ans-text {
- color: #444;
- line-height: 1.7em;
-}
-
-.qv-question-wrapper {
-}
-
-.qv-add-answer {
- width: 50%;
- margin: 7px 0px;
- padding: 7px;
- background-color: #E2E2EE;
- display: none;
-}
-
-.qv-add-answer textarea {
- height: 17em;
- font-size: 12px;
-}
-
-.qv-answer {
-
-}
\ No newline at end of file
diff --git a/utilities/page/question_view/question_view.html b/utilities/page/question_view/question_view.html
deleted file mode 100644
index b091d95..0000000
--- a/utilities/page/question_view/question_view.html
+++ /dev/null
@@ -1,11 +0,0 @@
-<div class="layout-wrapper layout-wrapper-appframe">
- <div class="layout-appframe"></div>
- <div class="layout-main" style="min-height: 400px">
- <div class="qv-question-wrapper">
- </div>
- <hr>
- <div class="qv-answer-wrapper">
- </div>
- <div class="add-answer-area"></div>
- </div>
-</div>
\ No newline at end of file
diff --git a/utilities/page/question_view/question_view.js b/utilities/page/question_view/question_view.js
deleted file mode 100644
index e479e13..0000000
--- a/utilities/page/question_view/question_view.js
+++ /dev/null
@@ -1,193 +0,0 @@
-// ERPNext - web based ERP (http://erpnext.com)
-// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-pscript['onload_question-view'] = function(wrapper) {
- wrapper.appframe = new wn.ui.AppFrame($(wrapper).find('.layout-appframe'));
- wrapper.appframe.title('Question');
- wrapper.appframe.add_home_breadcrumb();
- wrapper.appframe.add_module_breadcrumb("Knowledge Base");
- wrapper.appframe.add_breadcrumb("icon-file");
-
- wrapper.add_answer_area = $('.add-answer-area').get(0);
-}
-
-pscript['refresh_question-view'] = function(wrapper) {
- // href
- var qid = window.location.hash.split('/')[1];
- if(qid) {
- pscript.question_view(qid);
- }
-}
-
-pscript.question_view = function(qid, qtext) {
- var w = wn.pages['question-view'];
- new KBQuestionView(w, qid, qtext);
-}
-
-KBQuestionView = function(w, qid, qtext) {
- var me = this;
-
- this.make_question = function() {
- $(w).find('.qv-question-wrapper').empty();
- $(w.add_answer_area).empty();
- new EditableText({
- parent: $(w).find('.qv-question-wrapper').get(0),
- dt: 'Question',
- dn: qid,
- fieldname: 'question',
- text: qtext,
- inp_class: 'qv-input',
- disp_class: 'qv-text'
- });
-
- // show tags
- }
-
- // answer list
- this.make_answer_list = function() {
- $(w).find('.qv-answer-wrapper').empty();
- this.ans_list = new KBAnswerList({
- parent: $(w).find('.qv-answer-wrapper').get(0),
- qid: qid
- })
- }
-
- // check if users has answered
- // (if no) then add a box to add a new answer
- this.make_add_answer = function() {
- $c_page('utilities', 'question_view', 'has_answered', qid, function(r, rt) {
- if(r.message=='No') {
- me.make_answer_box_link();
- }
- });
- }
-
- // add a link to open add answer
- this.make_answer_box_link = function() {
- wn.pages['question-view'].appframe.add_button('Add your answer', function() {
- $(this).toggle(false);
- me.make_answer_box();
- }, 'icon-plus');
- }
-
- // answer box
- // text area + add button
- this.make_answer_box = function() {
- $ds(w.add_answer_area);
- $(w.add_answer_area, '<h3>Add your Answer</h3>\
- <div class="help">In markdown format</div>');
- this.input = $a(w.add_answer_area, 'textarea');
- $(this.input).css({width: "90%", height: "200px"});
- //wn.tinymce.add_simple(this.input);
-
- this.btn = $btn($a(w.add_answer_area, 'div'), 'Post', function() {
- var v = $(me.input).val();
- if(!v) { msgprint('Write something!'); return; }
- me.btn.set_working();
- $c_page('utilities', 'question_view', 'add_answer',
- JSON.stringify({qid: qid, "answer":v}),
- function(r, rt) {
- me.btn.done_working();
- me.ans_list.list.run();
- $dh(w.add_answer_area);
- }
- );
- });
- }
-
- this.setup = function() {
- if(qtext) {
- this.make();
- }
- else {
- $c_page('utilities', 'question_view', 'get_question', qid, function(r, rt) {
- qtext = r.message;
- me.make();
- });
- }
- }
-
- this.make = function() {
- set_title(qtext);
- this.make_question();
- this.make_answer_list();
- this.make_add_answer();
- }
-
- this.setup();
-}
-
-
-// kb answer list
-KBAnswerList = function(args) {
- var me = this;
- $.extend(this, args);
-
- this.make_list = function() {
- wn.pages['question-view'].appframe.clear_buttons();
- this.list = new wn.ui.Listing({
- parent: me.parent,
- appframe: wn.pages['question-view'].appframe,
- as_dict: 1,
- no_result_message: 'No answers yet, be the first one to answer!',
- render_row: function(body, data) {
- new KBAnswer(body, data, me)
- },
- get_query: function() {
- return repl("SELECT t1.name, t1.owner, t1.answer, t1._users_voted, t2.first_name, "
- +"t2.last_name, t1.modified from tabAnswer t1, tabProfile t2 "
- +"where question='%(qid)s' and t1.owner = t2.name "
- +"order by t1.modified desc", {qid: me.qid})
- }
- });
-
- this.list.run();
-
- }
-
- this.make_list();
-
-}
-
-// kb answer
-// answer
-// by xxx | on xxx
-KBAnswer = function(body, data, ans_list) {
- body.className = 'qv-answer';
- var edtxt = new EditableText({
- parent: body,
- dt: 'Answer',
- dn: data.name,
- fieldname: 'answer',
- text: data.answer,
- inp_class: 'qv-ans-input',
- disp_class: 'qv-ans-text',
- height: '300px',
- width: '90%'
- });
-
- $(edtxt.wrapper).addClass('well');
-
- var div = $a(body, 'div', '', {})
- new KBItemToolbar({
- parent: div,
- det: data,
- with_tags: 0,
- doctype: 'Answer'
- }, ans_list)
-}
-
-wn.require('app/js/kb_common.js');
\ No newline at end of file
diff --git a/utilities/page/question_view/question_view.py b/utilities/page/question_view/question_view.py
deleted file mode 100644
index 175a8ed..0000000
--- a/utilities/page/question_view/question_view.py
+++ /dev/null
@@ -1,47 +0,0 @@
-# ERPNext - web based ERP (http://erpnext.com)
-# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-from __future__ import unicode_literals
-import webnotes
-from webnotes.utils import load_json, cstr, now
-
-@webnotes.whitelist()
-def update_item(arg):
- args = load_json(arg)
-
- webnotes.conn.sql("update `tab%s` set `%s`=%s, modified=%s where name=%s" \
- % (args['dt'], args['fn'], '%s', '%s', '%s'), (args['text'], now(), args['dn']))
-
-@webnotes.whitelist()
-def has_answered(arg):
- return webnotes.conn.sql("select name from tabAnswer where owner=%s and question=%s", (webnotes.user.name, arg)) and 'Yes' or 'No'
-
-@webnotes.whitelist()
-def get_question(arg):
- return cstr(webnotes.conn.sql("select question from tabQuestion where name=%s", arg)[0][0])
-
-@webnotes.whitelist()
-def add_answer(arg):
- arg = load_json(arg)
-
- from webnotes.model.doc import Document
- a = Document('Answer')
- a.answer = arg['answer']
- a.question = arg['qid']
- a.points = 1
- a.save(1)
-
- webnotes.conn.set_value('Question', arg['qid'], 'modified', now())
\ No newline at end of file
diff --git a/utilities/page/question_view/question_view.txt b/utilities/page/question_view/question_view.txt
deleted file mode 100644
index 87fd053..0000000
--- a/utilities/page/question_view/question_view.txt
+++ /dev/null
@@ -1,31 +0,0 @@
-[
- {
- "creation": "2013-04-09 11:45:31",
- "docstatus": 0,
- "modified": "2013-04-09 11:47:24",
- "modified_by": "Administrator",
- "owner": "Administrator"
- },
- {
- "doctype": "Page",
- "module": "Utilities",
- "name": "__common__",
- "page_name": "Question View",
- "standard": "Yes"
- },
- {
- "doctype": "Page Role",
- "name": "__common__",
- "parent": "question-view",
- "parentfield": "roles",
- "parenttype": "Page",
- "role": "All"
- },
- {
- "doctype": "Page",
- "name": "question-view"
- },
- {
- "doctype": "Page Role"
- }
-]
\ No newline at end of file
diff --git a/utilities/page/questions/__init__.py b/utilities/page/questions/__init__.py
deleted file mode 100644
index baffc48..0000000
--- a/utilities/page/questions/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-from __future__ import unicode_literals
diff --git a/utilities/page/questions/questions.css b/utilities/page/questions/questions.css
deleted file mode 100644
index 779da55..0000000
--- a/utilities/page/questions/questions.css
+++ /dev/null
@@ -1,31 +0,0 @@
-div.kb-search-wrapper textarea {
- height: 2.2em;
- width: 80%;
- font-size: 14px;
- padding: 3px;
- margin-bottom: 7px;
-}
-
-.kb-question-wrapper {
- padding-bottom: 3px;
- margin-bottom: 3px;
-}
-
-.kb-questions {
-}
-
-.un-answered {
- color: #f33;
-}
-
-.kb-question-details {
- margin: 11px 0px 11px 29px;
-}
-
-.kb-tag-filter-area {
- padding: 7px;
- background-color: #F2F2E8;
- color: #222;
- margin: 7px 0px;
- display: none;
-}
\ No newline at end of file
diff --git a/utilities/page/questions/questions.html b/utilities/page/questions/questions.html
deleted file mode 100644
index bec483e..0000000
--- a/utilities/page/questions/questions.html
+++ /dev/null
@@ -1,19 +0,0 @@
-<div class="layout-wrapper layout-wrapper-background">
- <div class="layout-appframe"></div>
- <div class="layout-main-section">
- <div class="kb-search-wrapper">
- <textarea></textarea>
- <div>
- <button class="btn btn-small search" onclick="">
- <i class="icon-search"></i> Search</button>
- <button class="btn btn-small ask">
- <i class="icon-question-sign"></i> Ask</button>
- </div>
- </div>
- </div>
- <div class="layout-side-section">
- <div class="questions-tags"></div>
- <p class="help">A wiki or Q&A for your organization</p>
- </div>
- <div style="clear: both;"></div>
-</div>
\ No newline at end of file
diff --git a/utilities/page/questions/questions.js b/utilities/page/questions/questions.js
deleted file mode 100644
index e7e99b5..0000000
--- a/utilities/page/questions/questions.js
+++ /dev/null
@@ -1,221 +0,0 @@
-// ERPNext - web based ERP (http://erpnext.com)
-// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-pscript.onload_questions = function(wrapper) {
- body = $(wrapper).find('.layout-main-section').get(0);
-
- wrapper.appframe = new wn.ui.AppFrame($(wrapper).find('.layout-appframe'));
- wrapper.appframe.add_home_breadcrumb();
- wrapper.appframe.add_breadcrumb(wn.modules["Knowledge Base"].icon);
- wrapper.appframe.title('Knowledge Base');
-
- // kb
- var kb = new KnowledgeBase(body);
-
- wn.model.with_doctype("Question", function() {
- this.sidebar_stats = new wn.views.SidebarStats({
- doctype: "Question",
- stats: ["_user_tags"],
- parent: $(wrapper).find('.questions-tags'),
- set_filter: function(fieldname, label) {
- kb.set_filter(fieldname, label);
- //me.set_filter(fieldname, label);
- }
- });
- })
-}
-
-// knowledge base object
-// has a box for search or ask a question
-// and list of top rated search results
-//
-function KnowledgeBase(w) {
- var me = this;
- this.sort_by = 'modified';
- this.tag_filter_dict = {};
-
- this.make_search_bar = function() {
- this.search = $(w).find('.kb-search-wrapper textarea').get(0);
-
- $(w).find('.btn.search').click(function() {
- me.run();
- })
- $(w).find('.btn.ask').click(function() {
- me.ask();
- })
- }
-
- // ask a new question
- this.ask = function() {
- if(this.search.value==$(this.search).attr('default_text')) {
- msgprint('Please enter some text'); return;
- }
- this.add_question([]);
- }
-
- // suggest a few users who can answer
- this.suggest = function() {
- this.dialog = new wn.ui.Dialog({
- title: 'Suggest a users',
- width: 400,
- fields: [
- {fieldtype:'HTML', options:'Optional: Suggest a few users who can help you answer this question<br>'},
- {fieldtype:'Link', fieldname:'profile1', label:'1st User',options:'Profile'},
- {fieldtype:'Link', fieldname:'profile2', label:'2nd User',options:'Profile'},
- {fieldtype:'Link', fieldname:'profile3', label:'3rd User',options:'Profile'},
- {fieldtype:'Button', fieldname:'ask', label:'Add the Question'}
- ]
- });
- this.dialog.fields_dict.ask.input.onclick = function() {
- me.dialog.hide();
- me.add_question(values(me.dialog.get_values()));
- }
- this.dialog.show();
- }
-
- // add a new question to the database
- this.add_question = function(suggest_list) {
- $c_page('utilities', 'questions', 'add_question', {
- question: this.search.value,
- suggest: suggest_list
- }, function(r,rt) {
- $(me.search).val('').blur();
- me.run();
- })
- }
-
- // where tags that filter will be displayed
- this.make_tag_filter_area = function() {
- this.tag_filters = $a(w, 'div', 'kb-tag-filter-area');
- $a(this.tag_filters,'span','',{marginRight:'4px',color:'#442'}, '<i>Showing for:</i>');
- this.tag_area = $a(this.tag_filters, 'span');
- }
-
- // make a list of questions
- this.make_list = function() {
- this.make_tag_filter_area();
- this.list_area = $a(w, 'div', '', {marginRight:'13px'})
- this.no_result = $a(w, 'div','help_box',{display:'none'},'No questions asked yet! Be the first one to ask')
-
- this.list = new wn.ui.Listing({
- parent: this.list_area,
- no_results_message: 'No questions found. Ask a new question!',
- appframe: wn.pages.questions.appframe,
- as_dict: 1,
- method: 'utilities.page.questions.questions.get_questions',
- get_args: function() {
- var args = {};
- if(me.search.value) {
- args.search_text = me.search.value;
- }
- if(me.tag_filter_dict) {
- args.tag_filters = keys(me.tag_filter_dict);
- }
- return args
- },
- render_row: function(parent, data, listing) {
- new KBQuestion(parent, data, me);
- }
- });
-
- this.list.run();
-
- }
-
- this.set_filter = function(fieldname, label) {
- this.set_tag_filter({label:label});
- }
- // add a tag filter to the search in the
- // main page
- this.set_tag_filter = function(tag) {
-
- // check if exists
- if(in_list(keys(me.tag_filter_dict), tag.label)) return;
-
- // create a tag in filters
- var filter_tag = new SingleTag({
- parent: me.tag_area,
- label: tag.label,
- dt: 'Question',
- color: tag.color
- });
-
- // remove tag from filters
- filter_tag.remove = function(tag_remove) {
- $(tag_remove.body).fadeOut();
- delete me.tag_filter_dict[tag_remove.label];
-
- // hide everything?
- if(!keys(me.tag_filter_dict).length) {
- $(me.tag_filters).slideUp(); // hide
- }
-
- // run
- me.run();
- }
-
- // add to dict
- me.tag_filter_dict[tag.label] = filter_tag;
- $ds(me.tag_filters);
-
- // run
- me.run();
- }
- this.run = function() {
- this.list.run();
- }
-
- this.make_search_bar();
- this.make_list();
-
-}
-
-// single kb question
-// "question
-// points | tag list"
-
-KBQuestion = function(parent, det, kb) {
-
- this.make = function() {
- this.wrapper = $a(parent, 'div', 'kb-question-wrapper');
- this.q_area = $a($a(this.wrapper, 'div'), 'h3',
- 'kb-questions link_type', {display:'inline', textDecoration:'none'}, det.question);
- if(det.answers==0) {
- $(this.q_area).addClass('un-answered')
- }
-
- this.q_area.onclick = function() {
- var q = this;
- window.location.href = '#!question-view/' + q.id;
- //loadpage('question-view', function() { pscript.question_view(q.id, q.txt) })
- }
-
- this.q_area.id = det.name; this.q_area.txt = det.question;
-
- new KBItemToolbar({
- parent: this.wrapper,
- det: det,
- with_tags: 1,
- doctype: 'Question'
- }, kb)
-
- }
-
-
- this.make()
-}
-
-wn.require('app/js/kb_common.js');
diff --git a/utilities/page/questions/questions.py b/utilities/page/questions/questions.py
deleted file mode 100644
index 442fb01..0000000
--- a/utilities/page/questions/questions.py
+++ /dev/null
@@ -1,74 +0,0 @@
-# ERPNext - web based ERP (http://erpnext.com)
-# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-from __future__ import unicode_literals
-import webnotes
-
-from webnotes.utils import load_json
-import json
-
-@webnotes.whitelist()
-def get_questions():
- """get list of questions"""
- import json
- conds = ''
-
- if 'search_text' in webnotes.form_dict:
- conds = ' and t1.question like "%'+ webnotes.form_dict['search_text'] + '%"'
-
- if 'tag_filters' in webnotes.form_dict:
- tag_filters = json.loads(webnotes.form_dict['tag_filters'])
- for t in tag_filters:
- conds += ' and t1._user_tags like "%'+ t +'%"'
-
- return webnotes.conn.sql("""select t1.name, t1.owner, t1.question, t1.modified, t1._user_tags,
- (select count(*) from tabAnswer where
- tabAnswer.question = t1.name) as answers
- from tabQuestion t1, tabProfile t2
- where t1.docstatus!=2
- and t1.owner = t2.name
- %(conds)s
- order by t1.modified desc""" % {"conds":conds}, as_dict=1)
-
-# add a new question
-@webnotes.whitelist()
-def add_question(arg):
- args = load_json(arg)
-
- from webnotes.model.doc import Document
- d = Document('Question')
- d.question = args['question']
- d.points = 1
- d.save(1)
-
- if args['suggest']:
- from core.page.messages import messages
- for s in args['suggest']:
- if s:
- messages.post(json.dumps({
- 'contact': s,
- 'txt': 'Please help me and answer the question "%s" in the Knowledge Base' % d.question,
- 'notify': 1
- }))
-
-@webnotes.whitelist()
-def delete(arg):
- """
- delete a question or answer (called from kb toolbar)
- """
- args = load_json(arg)
- from webnotes.model import delete_doc
- delete_doc(args['dt'], args['dn'])
diff --git a/utilities/page/questions/questions.txt b/utilities/page/questions/questions.txt
deleted file mode 100644
index e327ebf..0000000
--- a/utilities/page/questions/questions.txt
+++ /dev/null
@@ -1,31 +0,0 @@
-[
- {
- "creation": "2013-04-09 11:50:08",
- "docstatus": 0,
- "modified": "2013-04-09 11:52:08",
- "modified_by": "Administrator",
- "owner": "Administrator"
- },
- {
- "doctype": "Page",
- "module": "Utilities",
- "name": "__common__",
- "page_name": "Questions",
- "standard": "Yes"
- },
- {
- "doctype": "Page Role",
- "name": "__common__",
- "parent": "questions",
- "parentfield": "roles",
- "parenttype": "Page",
- "role": "All"
- },
- {
- "doctype": "Page",
- "name": "questions"
- },
- {
- "doctype": "Page Role"
- }
-]
\ No newline at end of file
diff --git a/utilities/page/trash/__init__.py b/utilities/page/trash/__init__.py
deleted file mode 100644
index baffc48..0000000
--- a/utilities/page/trash/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-from __future__ import unicode_literals
diff --git a/utilities/page/trash/trash.html b/utilities/page/trash/trash.html
deleted file mode 100644
index b17e475..0000000
--- a/utilities/page/trash/trash.html
+++ /dev/null
@@ -1,4 +0,0 @@
-<div class="layout_wrapper">
-<div id="trash_header"></div>
-<div id="trash_div" style="margin: 0px;"></div>
-</div>
\ No newline at end of file
diff --git a/utilities/page/trash/trash.js b/utilities/page/trash/trash.js
deleted file mode 100644
index b30626d..0000000
--- a/utilities/page/trash/trash.js
+++ /dev/null
@@ -1,144 +0,0 @@
-// ERPNext - web based ERP (http://erpnext.com)
-// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-pscript['onload_Trash'] = function() {
-
- // header and toolbar
- var h = new PageHeader('trash_header','Trash Bin','Restore the documents that you have trashed')
-
- if(!pscript.trash_bin) pscript.trash_bin = new pscript.Trash();
-}
-
-pscript.Trash = function() {
- // create UI elements
- this.wrapper = $i('trash_div');
-
- this.head = $a(this.wrapper, 'div');
- this.body = $a(this.wrapper, 'div');
- $y(this.body, {margin:'8px'})
-
- this.make_head();
- this.load_masters();
-}
-
-// Make Button
-// ------------
-pscript.Trash.prototype.make_button = function(label, area){
- var me = this;
- var w = $a(area, 'div', '', {margin:'8px'});
- var t = make_table(w,1,1,'400px',['50%','50%']);
- var s = $a($td(t,0,0),'button');
- s.innerHTML = label;
- s.wrapper = w;
- return s;
-}
-
-
-// Make Head
-// -------------
-pscript.Trash.prototype.make_head = function() {
- var me = this;
-
- var make_select = function(label) {
- var w = $a(me.head, 'div', '', {margin:'8px'});
- var t = make_table(w,1,2,'400px',['50%','50%']);
- $td(t,0,0).innerHTML = label;
- var s = $a($td(t,0,1),'select','',{width:'140px'});
- s.wrapper = w;
- return s;
- }
-
- // Select Master Name
- this.master_select = make_select('Select Master');
-
- var me = this;
- // Get Records
- this.get_records_button = me.make_button('Get Records', me.head);
- this.get_records_button.onclick = function() {
- me.get_records();
- }
-}
-
-
-// Load Masters
-// -------------
-pscript.Trash.prototype.load_masters = function(){
- var me = this;
- var callback = function(r, rt){
- // Masters
- empty_select(me.master_select);
- add_sel_options(me.master_select,add_lists(['All'], r.message), 'All');
- }
- $c_obj('Trash Control','get_masters','',callback);
-}
-
-
-// Get Records
-// -----------
-pscript.Trash.prototype.get_records = function(){
- var me = this;
- me.body.innerHTML = '';
- var callback = function(r, rt){
- if(r.message) me.generate_trash_records(r.message);
- else msgprint("No Records Found");
- }
- $c_obj('Trash Control','get_trash_records',sel_val(me.master_select),callback);
-}
-
-
-// Generate Trash Records
-// -----------------------
-pscript.Trash.prototype.generate_trash_records = function(rec_dict){
- var me = this;
- pscript.all_checkboxes = [];
- mnames = keys(rec_dict).sort();
- for(var i = 0; i < mnames.length; i ++){
- var head = $a(me.body, 'h3'); head.innerHTML = mnames[i];
- var rec_table = make_table(me.body,rec_dict[mnames[i]].length,2,'375px',['350px','25px'],{border:'1px solid #AAA',padding:'2px'});
- for(var j = 0; j < rec_dict[mnames[i]].length; j++){
- $a_input($td(rec_table,j,0), 'data');
- $td(rec_table,j,0).innerHTML = rec_dict[mnames[i]][j];
- var chk = $a_input($td(rec_table,j,1), 'checkbox');
- chk.master = mnames[i];
- chk.record = rec_dict[mnames[i]][j];
- pscript.all_checkboxes.push(chk);
- }
- }
- this.restore_button = me.make_button('Restore Selected', me.body);
- this.restore_button.onclick = function() {
- me.restore_records(0);
- }
- this.restore_all_button = me.make_button('Restore All', me.body);
- this.restore_all_button.onclick = function() {
- me.restore_records(1);
- }
-}
-
-
-// Restore Records
-// ---------------
-pscript.Trash.prototype.restore_records = function(restore_all){
- var me = this;
- var out = {};
- for(i in pscript.all_checkboxes) {
- c = pscript.all_checkboxes[i];
- if (restore_all || (!restore_all && c.checked)) {
- if(!out[c.master]) out[c.master] = [c.record];
- else {out[c.master].push(c.record);}
- }
- }
- $c_obj('Trash Control','restore_records',JSON.stringify(out),function(r, rt){me.get_records();})
-}
\ No newline at end of file
diff --git a/utilities/page/trash/trash.txt b/utilities/page/trash/trash.txt
deleted file mode 100644
index a13e1b6..0000000
--- a/utilities/page/trash/trash.txt
+++ /dev/null
@@ -1,47 +0,0 @@
-[
- {
- "owner": "Administrator",
- "docstatus": 0,
- "creation": "2010-10-12 15:19:32",
- "modified_by": "Administrator",
- "modified": "2010-12-30 11:44:36"
- },
- {
- "name": "__common__",
- "module": "Utilities",
- "page_name": "Trash",
- "doctype": "Page",
- "standard": "Yes"
- },
- {
- "name": "__common__",
- "parent": "Trash",
- "doctype": "Page Role",
- "parenttype": "Page",
- "parentfield": "roles"
- },
- {
- "name": "Trash",
- "doctype": "Page"
- },
- {
- "role": "Administrator",
- "doctype": "Page Role"
- },
- {
- "role": "Sales Master Manager",
- "doctype": "Page Role"
- },
- {
- "role": "Material Master Manager",
- "doctype": "Page Role"
- },
- {
- "role": "Purchase Master Manager",
- "doctype": "Page Role"
- },
- {
- "role": "Accounts Manager",
- "doctype": "Page Role"
- }
-]
\ No newline at end of file
diff --git a/utilities/transaction_base.py b/utilities/transaction_base.py
index f9af912..c17df6d 100644
--- a/utilities/transaction_base.py
+++ b/utilities/transaction_base.py
@@ -16,12 +16,13 @@
from __future__ import unicode_literals
import webnotes
+from webnotes import msgprint, _
from webnotes.utils import load_json, cstr, flt, now_datetime
from webnotes.model.doc import addchild
-from webnotes.model.controller import DocListController
+from controllers.status_updater import StatusUpdater
-class TransactionBase(DocListController):
+class TransactionBase(StatusUpdater):
def get_default_address_and_contact(self, party_type):
"""get a dict of default field values of address and contact for a given party type
party_type can be one of: customer, supplier"""
@@ -191,7 +192,8 @@
# Get Supplier Default Primary Address - first load
# -----------------------
def get_default_supplier_address(self, args):
- args = load_json(args)
+ if isinstance(args, basestring):
+ args = load_json(args)
address_text, address_name = self.get_address_text(supplier=args['supplier'])
ret = {
'supplier_address' : address_name,
@@ -303,3 +305,57 @@
})
webnotes.bean(event_doclist).insert()
+
+def validate_conversion_rate(currency, conversion_rate, conversion_rate_label, company):
+ """common validation for currency and price list currency"""
+ if conversion_rate == 0:
+ msgprint(conversion_rate_label + _(' cannot be 0'), raise_exception=True)
+
+ company_currency = webnotes.conn.get_value("Company", company, "default_currency")
+
+ # parenthesis for 'OR' are necessary as we want it to evaluate as
+ # mandatory valid condition and (1st optional valid condition
+ # or 2nd optional valid condition)
+ valid_conversion_rate = (conversion_rate and
+ ((currency == company_currency and conversion_rate == 1.00)
+ or (currency != company_currency and conversion_rate != 1.00)))
+
+ if not valid_conversion_rate:
+ msgprint(_('Please enter valid ') + conversion_rate_label + (': ')
+ + ("1 %s = [?] %s" % (currency, company_currency)),
+ raise_exception=True)
+
+def validate_item_fetch(args, item):
+ from stock.utils import validate_end_of_life
+ validate_end_of_life(item.name, item.end_of_life)
+
+ # validate company
+ if not args.company:
+ msgprint(_("Please specify Company"), raise_exception=True)
+
+def validate_currency(args, item, meta=None):
+ from webnotes.model.meta import get_field_precision
+ if not meta:
+ meta = webnotes.get_doctype(args.doctype)
+
+ # validate conversion rate
+ if meta.get_field("currency"):
+ validate_conversion_rate(args.currency, args.conversion_rate,
+ meta.get_label("conversion_rate"), args.company)
+
+ # round it
+ args.conversion_rate = flt(args.conversion_rate,
+ get_field_precision(meta.get_field("conversion_rate"),
+ webnotes._dict({"fields": args})))
+
+ # validate price list conversion rate
+ if meta.get_field("price_list_currency") and args.price_list_name and \
+ args.price_list_currency:
+ validate_conversion_rate(args.price_list_currency, args.plc_conversion_rate,
+ meta.get_label("plc_conversion_rate"), args.company)
+
+ # round it
+ args.plc_conversion_rate = flt(args.plc_conversion_rate,
+ get_field_precision(meta.get_field("plc_conversion_rate"),
+ webnotes._dict({"fields": args})))
+
diff --git a/website/README.md b/website/README.md
new file mode 100644
index 0000000..8ad3903
--- /dev/null
+++ b/website/README.md
@@ -0,0 +1,8 @@
+Module for website management.
+
+Contains:
+
+- DocTypes for Web Page, Blogs
+- Templates
+- Settings
+- Generators for Item, Blog Post, Item Group
\ No newline at end of file
diff --git a/website/css/website.css b/website/css/website.css
index 25e2c91..36e306d 100644
--- a/website/css/website.css
+++ b/website/css/website.css
@@ -1,47 +1,15 @@
-div.outer {
- padding: 30px;
- margin: 30px -30px 10px -30px;
- min-height: 400px;
+h1, h2, h3, h4, h5 {
+ font-weight: bold;
}
-.outer .navbar {
- margin: -30px -30px 20px -30px;
-}
-
-footer {
- text-align: left;
- margin: auto;
- margin-bottom: 20px;
-}
-
-.navbar-inner {
- border: 0px;
- border-bottom: 1px solid #ddd;
- border-radius: 0px;
- padding-right: 30px;
- padding-left: 30px;
-}
-
-p, li {
- line-height: 1.5em;
-}
-
-.layout-wrapper {
- box-shadow: none;
- -webkit-box-shadow: none;
- -moz-box-shadow: none;
- border-radius: 0px 0px 5px 5px;
-}
-
-.layout-main {
- min-height: 400px;
- padding: 30px;
+.content {
+ padding-bottom: 30px;
}
.missing-image {
background-color: #eee;
padding: 40px;
- width: 32px;
+ width: 112px;
font-size: 32px;
color: #888;
}
@@ -129,3 +97,15 @@
.avatar-x-large img {
width: 100px;
}
+
+.carousel-control .icon {
+ position: absolute;
+ top: 50%;
+ left: 50%;
+ z-index: 5;
+ display: inline-block;
+ width: 20px;
+ height: 20px;
+ margin-top: -10px;
+ margin-left: -10px;
+}
diff --git a/website/doctype/about_us_settings/README.md b/website/doctype/about_us_settings/README.md
new file mode 100644
index 0000000..977a7a3
--- /dev/null
+++ b/website/doctype/about_us_settings/README.md
@@ -0,0 +1 @@
+Configuration for "About" page in the website that shows company, history and team.
\ No newline at end of file
diff --git a/website/doctype/about_us_team_member/README.md b/website/doctype/about_us_team_member/README.md
new file mode 100644
index 0000000..98b794f
--- /dev/null
+++ b/website/doctype/about_us_team_member/README.md
@@ -0,0 +1 @@
+Details of team member for About Us page.
\ No newline at end of file
diff --git a/website/doctype/blog_category/README.md b/website/doctype/blog_category/README.md
new file mode 100644
index 0000000..af14b5d
--- /dev/null
+++ b/website/doctype/blog_category/README.md
@@ -0,0 +1 @@
+Blog category.
\ No newline at end of file
diff --git a/website/doctype/blog_post/README.md b/website/doctype/blog_post/README.md
new file mode 100644
index 0000000..63d3c0f
--- /dev/null
+++ b/website/doctype/blog_post/README.md
@@ -0,0 +1 @@
+Blog post for "Blogs" section of website.
\ No newline at end of file
diff --git a/website/doctype/blog_post/blog_post.py b/website/doctype/blog_post/blog_post.py
index 62cc910..f6dfc60 100644
--- a/website/doctype/blog_post/blog_post.py
+++ b/website/doctype/blog_post/blog_post.py
@@ -41,29 +41,6 @@
webnotes.webutils.update_page_name(self.doc, self.doc.title)
webnotes.webutils.delete_page_cache("writers")
- def send_emails(self):
- """send emails to subscribers"""
- if self.doc.email_sent:
- webnotes.msgprint("""Blog Subscribers already updated""", raise_exception=1)
-
- from webnotes.utils.email_lib.bulk import send
- import webnotes.utils
-
- # get leads that are subscribed to the blog
- recipients = [e[0] for e in webnotes.conn.sql("""select distinct email_id from
- tabLead where ifnull(blog_subscriber,0)=1""")]
-
- # make heading as link
- content = '<h2><a href="%s/%s.html">%s</a></h2>\n\n%s' % (webnotes.utils.get_request_site_address(),
- self.doc.page_name, self.doc.title, self.doc.content)
-
- # send the blog
- send(recipients = recipients, doctype='Lead', email_field='email_id',
- subject=self.doc.title, message = content)
-
- webnotes.conn.set(self.doc, 'email_sent', 1)
- webnotes.msgprint("""Scheduled to send to %s subscribers""" % len(recipients))
-
def prepare_template_args(self):
import webnotes.utils
diff --git a/website/doctype/blog_settings/README.md b/website/doctype/blog_settings/README.md
new file mode 100644
index 0000000..0a76d4e
--- /dev/null
+++ b/website/doctype/blog_settings/README.md
@@ -0,0 +1 @@
+Blog titles and introduction texts.
\ No newline at end of file
diff --git a/website/doctype/blog_subscriber/locale/_messages_doc.json b/website/doctype/blog_subscriber/locale/_messages_doc.json
deleted file mode 100644
index 07cbecc..0000000
--- a/website/doctype/blog_subscriber/locale/_messages_doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-[
- "Website",
- "Blog Subscriber"
-]
\ No newline at end of file
diff --git a/website/doctype/blog_subscriber/locale/ar-doc.json b/website/doctype/blog_subscriber/locale/ar-doc.json
deleted file mode 100644
index 162d1d4..0000000
--- a/website/doctype/blog_subscriber/locale/ar-doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "Blog Subscriber": "\u0628\u0644\u0648\u0642 \u0627\u0644\u0645\u0634\u062a\u0631\u0643",
- "Website": "\u0627\u0644\u0645\u0648\u0642\u0639"
-}
\ No newline at end of file
diff --git a/website/doctype/blog_subscriber/locale/de-doc.json b/website/doctype/blog_subscriber/locale/de-doc.json
deleted file mode 100644
index 2bb8ef1..0000000
--- a/website/doctype/blog_subscriber/locale/de-doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "Blog Subscriber": "Blog Subscriber",
- "Website": "Webseite"
-}
\ No newline at end of file
diff --git a/website/doctype/blog_subscriber/locale/es-doc.json b/website/doctype/blog_subscriber/locale/es-doc.json
deleted file mode 100644
index 3888bac..0000000
--- a/website/doctype/blog_subscriber/locale/es-doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "Blog Subscriber": "Blog suscriptor",
- "Website": "Sitio web"
-}
\ No newline at end of file
diff --git a/website/doctype/blog_subscriber/locale/fr-doc.json b/website/doctype/blog_subscriber/locale/fr-doc.json
deleted file mode 100644
index ef572ef..0000000
--- a/website/doctype/blog_subscriber/locale/fr-doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "Blog Subscriber": "Abonn\u00e9 Blog",
- "Website": "Site Web"
-}
\ No newline at end of file
diff --git a/website/doctype/blog_subscriber/locale/hi-doc.json b/website/doctype/blog_subscriber/locale/hi-doc.json
deleted file mode 100644
index 5ad6049..0000000
--- a/website/doctype/blog_subscriber/locale/hi-doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "Blog Subscriber": "\u092c\u094d\u0932\u0949\u0917 \u0938\u092c\u094d\u0938\u0915\u094d\u0930\u093e\u0907\u092c\u0930",
- "Website": "\u0935\u0947\u092c\u0938\u093e\u0907\u091f"
-}
\ No newline at end of file
diff --git a/website/doctype/blog_subscriber/locale/hr-doc.json b/website/doctype/blog_subscriber/locale/hr-doc.json
deleted file mode 100644
index da24032..0000000
--- a/website/doctype/blog_subscriber/locale/hr-doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "Blog Subscriber": "Blog Pretplatnik",
- "Website": "Website"
-}
\ No newline at end of file
diff --git a/website/doctype/blog_subscriber/locale/nl-doc.json b/website/doctype/blog_subscriber/locale/nl-doc.json
deleted file mode 100644
index dd4063b..0000000
--- a/website/doctype/blog_subscriber/locale/nl-doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "Blog Subscriber": "Blog Abonnee",
- "Website": "Website"
-}
\ No newline at end of file
diff --git a/website/doctype/blog_subscriber/locale/pt-BR-doc.json b/website/doctype/blog_subscriber/locale/pt-BR-doc.json
deleted file mode 100644
index d070aa3..0000000
--- a/website/doctype/blog_subscriber/locale/pt-BR-doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "Blog Subscriber": "Assinante do Blog",
- "Website": "Site"
-}
\ No newline at end of file
diff --git a/website/doctype/blog_subscriber/locale/pt-doc.json b/website/doctype/blog_subscriber/locale/pt-doc.json
deleted file mode 100644
index 329a2a8..0000000
--- a/website/doctype/blog_subscriber/locale/pt-doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "Blog Subscriber": "Assinante Blog",
- "Website": "Site"
-}
\ No newline at end of file
diff --git a/website/doctype/blog_subscriber/locale/sr-doc.json b/website/doctype/blog_subscriber/locale/sr-doc.json
deleted file mode 100644
index b239ba9..0000000
--- a/website/doctype/blog_subscriber/locale/sr-doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "Blog Subscriber": "\u0411\u043b\u043e\u0433 \u041f\u0440\u0435\u0442\u043f\u043b\u0430\u0442\u043d\u0438\u043a",
- "Website": "\u0412\u0435\u0431\u0441\u0430\u0458\u0442"
-}
\ No newline at end of file
diff --git a/website/doctype/blog_subscriber/locale/ta-doc.json b/website/doctype/blog_subscriber/locale/ta-doc.json
deleted file mode 100644
index 95e4cd3..0000000
--- a/website/doctype/blog_subscriber/locale/ta-doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "Blog Subscriber": "\u0bb5\u0bb2\u0bc8\u0baa\u0bcd\u0baa\u0ba4\u0bbf\u0bb5\u0bc1 \u0b9a\u0ba8\u0bcd\u0ba4\u0bbe\u0ba4\u0bbe\u0bb0\u0bb0\u0bcd",
- "Website": "\u0b87\u0ba3\u0bc8\u0baf\u0ba4\u0bb3\u0bae\u0bcd"
-}
\ No newline at end of file
diff --git a/website/doctype/blog_subscriber/locale/th-doc.json b/website/doctype/blog_subscriber/locale/th-doc.json
deleted file mode 100644
index d02ae44..0000000
--- a/website/doctype/blog_subscriber/locale/th-doc.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "Blog Subscriber": "\u0e2a\u0e21\u0e32\u0e0a\u0e34\u0e01\u0e1a\u0e25\u0e47\u0e2d\u0e01",
- "Website": "\u0e40\u0e27\u0e47\u0e1a\u0e44\u0e0b\u0e15\u0e4c"
-}
\ No newline at end of file
diff --git a/website/doctype/blogger/README.md b/website/doctype/blogger/README.md
new file mode 100644
index 0000000..13ddecd
--- /dev/null
+++ b/website/doctype/blogger/README.md
@@ -0,0 +1 @@
+Profile of blog writer in "Blog" section.
\ No newline at end of file
diff --git a/website/doctype/company_history/README.md b/website/doctype/company_history/README.md
new file mode 100644
index 0000000..482c8d3
--- /dev/null
+++ b/website/doctype/company_history/README.md
@@ -0,0 +1 @@
+Company history detail for "About Us" section.
\ No newline at end of file
diff --git a/website/doctype/contact_us_settings/README.md b/website/doctype/contact_us_settings/README.md
new file mode 100644
index 0000000..61f589f
--- /dev/null
+++ b/website/doctype/contact_us_settings/README.md
@@ -0,0 +1 @@
+Settings, introduction for "Contact Us" section.
\ No newline at end of file
diff --git a/website/doctype/cross_list_item_group/locale/_messages_doc.json b/website/doctype/cross_list_item_group/locale/_messages_doc.json
deleted file mode 100644
index 19bedb1..0000000
--- a/website/doctype/cross_list_item_group/locale/_messages_doc.json
+++ /dev/null
@@ -1,6 +0,0 @@
-[
- "Website",
- "Cross List Item Group",
- "Cross Listing of Item in multiple groups",
- "Item Group"
-]
\ No newline at end of file
diff --git a/website/doctype/cross_list_item_group/locale/ar-doc.json b/website/doctype/cross_list_item_group/locale/ar-doc.json
deleted file mode 100644
index 9788ffc..0000000
--- a/website/doctype/cross_list_item_group/locale/ar-doc.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "Cross List Item Group": "\u0639\u0628\u0648\u0631 \u0642\u0627\u0626\u0645\u0629 \u0627\u0644\u0641\u0631\u064a\u0642 \u0627\u0644\u0625\u063a\u0644\u0627\u0642",
- "Cross Listing of Item in multiple groups": "\u0639\u0628\u0648\u0631 \u0625\u062f\u0631\u0627\u062c \u0639\u0646\u0635\u0631 \u0641\u064a \u0645\u062c\u0645\u0648\u0639\u0627\u062a \u0645\u062a\u0639\u062f\u062f\u0629",
- "Item Group": "\u0627\u0644\u0628\u0646\u062f \u0627\u0644\u0645\u062c\u0645\u0648\u0639\u0629",
- "Website": "\u0627\u0644\u0645\u0648\u0642\u0639"
-}
\ No newline at end of file
diff --git a/website/doctype/cross_list_item_group/locale/de-doc.json b/website/doctype/cross_list_item_group/locale/de-doc.json
deleted file mode 100644
index 4a5a2dc..0000000
--- a/website/doctype/cross_list_item_group/locale/de-doc.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "Cross List Item Group": "\u00dcberqueren List Item-Gruppe",
- "Cross Listing of Item in multiple groups": "\u00dcberqueren Auflistung der Artikel in mehreren Gruppen",
- "Item Group": "Artikel-Gruppe",
- "Website": "Webseite"
-}
\ No newline at end of file
diff --git a/website/doctype/cross_list_item_group/locale/es-doc.json b/website/doctype/cross_list_item_group/locale/es-doc.json
deleted file mode 100644
index 9e8e0f6..0000000
--- a/website/doctype/cross_list_item_group/locale/es-doc.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "Cross List Item Group": "Grupo de la Cruz lista de elementos",
- "Cross Listing of Item in multiple groups": "Cruce Listado de art\u00edculos en varios grupos",
- "Item Group": "Grupo de art\u00edculos",
- "Website": "Sitio web"
-}
\ No newline at end of file
diff --git a/website/doctype/cross_list_item_group/locale/fr-doc.json b/website/doctype/cross_list_item_group/locale/fr-doc.json
deleted file mode 100644
index 57dd327..0000000
--- a/website/doctype/cross_list_item_group/locale/fr-doc.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "Cross List Item Group": "Traversez Groupe \u00e9l\u00e9ment de liste",
- "Cross Listing of Item in multiple groups": "Cross Listing des articles dans plusieurs groupes",
- "Item Group": "Groupe d'\u00e9l\u00e9ments",
- "Website": "Site Web"
-}
\ No newline at end of file
diff --git a/website/doctype/cross_list_item_group/locale/hi-doc.json b/website/doctype/cross_list_item_group/locale/hi-doc.json
deleted file mode 100644
index f2fb530..0000000
--- a/website/doctype/cross_list_item_group/locale/hi-doc.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "Cross List Item Group": "\u0915\u094d\u0930\u0949\u0938 \u0938\u0942\u091a\u0940 \u0906\u0907\u091f\u092e \u0938\u092e\u0942\u0939",
- "Cross Listing of Item in multiple groups": "\u0915\u0908 \u0938\u092e\u0942\u0939\u094b\u0902 \u092e\u0947\u0902 \u0906\u0907\u091f\u092e \u0932\u093f\u0938\u094d\u091f\u093f\u0902\u0917 \u092a\u093e\u0930",
- "Item Group": "\u0906\u0907\u091f\u092e \u0938\u092e\u0942\u0939",
- "Website": "\u0935\u0947\u092c\u0938\u093e\u0907\u091f"
-}
\ No newline at end of file
diff --git a/website/doctype/cross_list_item_group/locale/hr-doc.json b/website/doctype/cross_list_item_group/locale/hr-doc.json
deleted file mode 100644
index cf8ab2a..0000000
--- a/website/doctype/cross_list_item_group/locale/hr-doc.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "Cross List Item Group": "Kri\u017e Group stavku popisa",
- "Cross Listing of Item in multiple groups": "Kri\u017e Oglas stavke u vi\u0161e grupa",
- "Item Group": "Stavka Grupa",
- "Website": "Website"
-}
\ No newline at end of file
diff --git a/website/doctype/cross_list_item_group/locale/nl-doc.json b/website/doctype/cross_list_item_group/locale/nl-doc.json
deleted file mode 100644
index 06aba4c..0000000
--- a/website/doctype/cross_list_item_group/locale/nl-doc.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "Cross List Item Group": "Cross List Item Group",
- "Cross Listing of Item in multiple groups": "Kruis een overzicht van onze item in meerdere groepen",
- "Item Group": "Item Group",
- "Website": "Website"
-}
\ No newline at end of file
diff --git a/website/doctype/cross_list_item_group/locale/pt-BR-doc.json b/website/doctype/cross_list_item_group/locale/pt-BR-doc.json
deleted file mode 100644
index cac3f17..0000000
--- a/website/doctype/cross_list_item_group/locale/pt-BR-doc.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "Cross List Item Group": "Grupo de Itens da Lista Cruzada",
- "Cross Listing of Item in multiple groups": "Listagem Cruzada dos itens em m\u00faltiplos grupos",
- "Item Group": "Grupo de Itens",
- "Website": "Site"
-}
\ No newline at end of file
diff --git a/website/doctype/cross_list_item_group/locale/pt-doc.json b/website/doctype/cross_list_item_group/locale/pt-doc.json
deleted file mode 100644
index e9acb85..0000000
--- a/website/doctype/cross_list_item_group/locale/pt-doc.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "Cross List Item Group": "Atravesse Grupo item da lista",
- "Cross Listing of Item in multiple groups": "Atravesse de Listagem do item em v\u00e1rios grupos",
- "Item Group": "Grupo Item",
- "Website": "Site"
-}
\ No newline at end of file
diff --git a/website/doctype/cross_list_item_group/locale/sr-doc.json b/website/doctype/cross_list_item_group/locale/sr-doc.json
deleted file mode 100644
index 5377600..0000000
--- a/website/doctype/cross_list_item_group/locale/sr-doc.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "Cross List Item Group": "\u041a\u0440\u0441\u0442 \u0413\u0440\u043e\u0443\u043f \u041b\u0438\u0441\u0442 \u0418\u0442\u0435\u043c",
- "Cross Listing of Item in multiple groups": "\u041a\u0440\u0441\u0442 \u041b\u0438\u0441\u0442\u0438\u043d\u0433 \u043f\u0440\u0435\u0434\u043c\u0435\u0442\u0430 \u043d\u0430 \u0432\u0438\u0448\u0435 \u0433\u0440\u0443\u043f\u0430",
- "Item Group": "\u0421\u0442\u0430\u0432\u043a\u0430 \u0413\u0440\u0443\u043f\u0430",
- "Website": "\u0412\u0435\u0431\u0441\u0430\u0458\u0442"
-}
\ No newline at end of file
diff --git a/website/doctype/cross_list_item_group/locale/ta-doc.json b/website/doctype/cross_list_item_group/locale/ta-doc.json
deleted file mode 100644
index 80a5a17..0000000
--- a/website/doctype/cross_list_item_group/locale/ta-doc.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "Cross List Item Group": "\u0baa\u0b9f\u0bcd\u0b9f\u0bbf\u0baf\u0bb2\u0bcd \u0b89\u0bb0\u0bc1\u0baa\u0bcd\u0baa\u0b9f\u0bbf \u0b95\u0bc1\u0bb4\u0bc1 \u0b95\u0b9f\u0b95\u0bcd\u0b95",
- "Cross Listing of Item in multiple groups": "\u0baa\u0bb2 \u0b95\u0bc1\u0bb4\u0bc1\u0b95\u0bcd\u0b95\u0bb3\u0bbe\u0b95 \u0b89\u0bb0\u0bc1\u0baa\u0bcd\u0baa\u0b9f\u0bbf \u0baa\u0b9f\u0bcd\u0b9f\u0bbf\u0baf\u0bb2\u0bcd \u0b95\u0b9f\u0b95\u0bcd\u0b95",
- "Item Group": "\u0b89\u0bb0\u0bc1\u0baa\u0bcd\u0baa\u0b9f\u0bbf\u0baf\u0bc8 \u0b95\u0bc1\u0bb4\u0bc1",
- "Website": "\u0b87\u0ba3\u0bc8\u0baf\u0ba4\u0bb3\u0bae\u0bcd"
-}
\ No newline at end of file
diff --git a/website/doctype/cross_list_item_group/locale/th-doc.json b/website/doctype/cross_list_item_group/locale/th-doc.json
deleted file mode 100644
index a47fdfe..0000000
--- a/website/doctype/cross_list_item_group/locale/th-doc.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "Cross List Item Group": "\u0e02\u0e49\u0e32\u0e21\u0e01\u0e25\u0e38\u0e48\u0e21\u0e23\u0e32\u0e22\u0e01\u0e32\u0e23",
- "Cross Listing of Item in multiple groups": "\u0e02\u0e49\u0e32\u0e21\u0e23\u0e32\u0e22\u0e01\u0e32\u0e23\u0e02\u0e2d\u0e07\u0e23\u0e32\u0e22\u0e01\u0e32\u0e23\u0e43\u0e19\u0e2b\u0e25\u0e32\u0e22\u0e01\u0e25\u0e38\u0e48\u0e21",
- "Item Group": "\u0e01\u0e25\u0e38\u0e48\u0e21\u0e2a\u0e34\u0e19\u0e04\u0e49\u0e32",
- "Website": "\u0e40\u0e27\u0e47\u0e1a\u0e44\u0e0b\u0e15\u0e4c"
-}
\ No newline at end of file
diff --git a/website/doctype/product_group/locale/_messages_doc.json b/website/doctype/product_group/locale/_messages_doc.json
deleted file mode 100644
index efd61d9..0000000
--- a/website/doctype/product_group/locale/_messages_doc.json
+++ /dev/null
@@ -1,6 +0,0 @@
-[
- "Website",
- "Label",
- "Item Group",
- "Product Group"
-]
\ No newline at end of file
diff --git a/website/doctype/product_group/locale/ar-doc.json b/website/doctype/product_group/locale/ar-doc.json
deleted file mode 100644
index 0325b0d..0000000
--- a/website/doctype/product_group/locale/ar-doc.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "Item Group": "\u0627\u0644\u0628\u0646\u062f \u0627\u0644\u0645\u062c\u0645\u0648\u0639\u0629",
- "Label": "\u0645\u0644\u0635\u0642",
- "Product Group": "\u0645\u062c\u0645\u0648\u0639\u0629 \u0627\u0644\u0645\u0646\u062a\u062c\u0627\u062a",
- "Website": "\u0627\u0644\u0645\u0648\u0642\u0639"
-}
\ No newline at end of file
diff --git a/website/doctype/product_group/locale/de-doc.json b/website/doctype/product_group/locale/de-doc.json
deleted file mode 100644
index 84e4cdb..0000000
--- a/website/doctype/product_group/locale/de-doc.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "Item Group": "Artikel-Gruppe",
- "Label": "Etikett",
- "Product Group": "Product Group",
- "Website": "Webseite"
-}
\ No newline at end of file
diff --git a/website/doctype/product_group/locale/es-doc.json b/website/doctype/product_group/locale/es-doc.json
deleted file mode 100644
index 71aee3e..0000000
--- a/website/doctype/product_group/locale/es-doc.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "Item Group": "Grupo de art\u00edculos",
- "Label": "Etiqueta",
- "Product Group": "Grupo de productos",
- "Website": "Sitio web"
-}
\ No newline at end of file
diff --git a/website/doctype/product_group/locale/fr-doc.json b/website/doctype/product_group/locale/fr-doc.json
deleted file mode 100644
index 99ca143..0000000
--- a/website/doctype/product_group/locale/fr-doc.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "Item Group": "Groupe d'\u00e9l\u00e9ments",
- "Label": "\u00c9tiquette",
- "Product Group": "Groupe de produits",
- "Website": "Site Web"
-}
\ No newline at end of file
diff --git a/website/doctype/product_group/locale/hi-doc.json b/website/doctype/product_group/locale/hi-doc.json
deleted file mode 100644
index 2e7d158..0000000
--- a/website/doctype/product_group/locale/hi-doc.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "Item Group": "\u0906\u0907\u091f\u092e \u0938\u092e\u0942\u0939",
- "Label": "\u0932\u0947\u092c\u0932",
- "Product Group": "\u0909\u0924\u094d\u092a\u093e\u0926 \u0938\u092e\u0942\u0939",
- "Website": "\u0935\u0947\u092c\u0938\u093e\u0907\u091f"
-}
\ No newline at end of file
diff --git a/website/doctype/product_group/locale/hr-doc.json b/website/doctype/product_group/locale/hr-doc.json
deleted file mode 100644
index cf32df3..0000000
--- a/website/doctype/product_group/locale/hr-doc.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "Item Group": "Stavka Grupa",
- "Label": "Oznaka",
- "Product Group": "Product Group",
- "Website": "Website"
-}
\ No newline at end of file
diff --git a/website/doctype/product_group/locale/nl-doc.json b/website/doctype/product_group/locale/nl-doc.json
deleted file mode 100644
index 5b9c01c..0000000
--- a/website/doctype/product_group/locale/nl-doc.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "Item Group": "Item Group",
- "Label": "Label",
- "Product Group": "Productgroep",
- "Website": "Website"
-}
\ No newline at end of file
diff --git a/website/doctype/product_group/locale/pt-BR-doc.json b/website/doctype/product_group/locale/pt-BR-doc.json
deleted file mode 100644
index 03047ce..0000000
--- a/website/doctype/product_group/locale/pt-BR-doc.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "Item Group": "Grupo de Itens",
- "Label": "Etiqueta",
- "Product Group": "Grupo de Produtos",
- "Website": "Site"
-}
\ No newline at end of file
diff --git a/website/doctype/product_group/locale/pt-doc.json b/website/doctype/product_group/locale/pt-doc.json
deleted file mode 100644
index 16058cb..0000000
--- a/website/doctype/product_group/locale/pt-doc.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "Item Group": "Grupo Item",
- "Label": "Etiqueta",
- "Product Group": "Grupo de Produtos",
- "Website": "Site"
-}
\ No newline at end of file
diff --git a/website/doctype/product_group/locale/sr-doc.json b/website/doctype/product_group/locale/sr-doc.json
deleted file mode 100644
index 401084d..0000000
--- a/website/doctype/product_group/locale/sr-doc.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "Item Group": "\u0421\u0442\u0430\u0432\u043a\u0430 \u0413\u0440\u0443\u043f\u0430",
- "Label": "\u041d\u0430\u043b\u0435\u043f\u043d\u0438\u0446\u0430",
- "Product Group": "\u0413\u0440\u0443\u043f\u0430 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0430",
- "Website": "\u0412\u0435\u0431\u0441\u0430\u0458\u0442"
-}
\ No newline at end of file
diff --git a/website/doctype/product_group/locale/ta-doc.json b/website/doctype/product_group/locale/ta-doc.json
deleted file mode 100644
index d124409..0000000
--- a/website/doctype/product_group/locale/ta-doc.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "Item Group": "\u0b89\u0bb0\u0bc1\u0baa\u0bcd\u0baa\u0b9f\u0bbf\u0baf\u0bc8 \u0b95\u0bc1\u0bb4\u0bc1",
- "Label": "\u0b9a\u0bbf\u0b9f\u0bcd\u0b9f\u0bc8",
- "Product Group": "\u0ba4\u0baf\u0bbe\u0bb0\u0bbf\u0baa\u0bcd\u0baa\u0bc1 \u0b95\u0bc1\u0bb4\u0bc1",
- "Website": "\u0b87\u0ba3\u0bc8\u0baf\u0ba4\u0bb3\u0bae\u0bcd"
-}
\ No newline at end of file
diff --git a/website/doctype/product_group/locale/th-doc.json b/website/doctype/product_group/locale/th-doc.json
deleted file mode 100644
index 06f7fd0..0000000
--- a/website/doctype/product_group/locale/th-doc.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "Item Group": "\u0e01\u0e25\u0e38\u0e48\u0e21\u0e2a\u0e34\u0e19\u0e04\u0e49\u0e32",
- "Label": "\u0e09\u0e25\u0e32\u0e01",
- "Product Group": "\u0e01\u0e25\u0e38\u0e48\u0e21\u0e2a\u0e34\u0e19\u0e04\u0e49\u0e32",
- "Website": "\u0e40\u0e27\u0e47\u0e1a\u0e44\u0e0b\u0e15\u0e4c"
-}
\ No newline at end of file
diff --git a/website/doctype/product_settings/__init__.py b/website/doctype/product_settings/__init__.py
deleted file mode 100644
index e69de29..0000000
--- a/website/doctype/product_settings/__init__.py
+++ /dev/null
diff --git a/website/doctype/product_settings/locale/_messages_doc.json b/website/doctype/product_settings/locale/_messages_doc.json
deleted file mode 100644
index 7104193..0000000
--- a/website/doctype/product_settings/locale/_messages_doc.json
+++ /dev/null
@@ -1,13 +0,0 @@
-[
- "Website",
- "Settings for Product Catalog on the website",
- "Help",
- "Search Help",
- "List of Item Groups to be shown in \"All Products\" menu - in the sequence wanted and with number of indents (left spacing to show a tree effect).",
- "Product Settings",
- "Default: \"Product Search\"",
- "Default Product Category",
- "This Item Group represents \"products.html\"",
- "Website Product Categories",
- "Product Categories"
-]
\ No newline at end of file
diff --git a/website/doctype/product_settings/locale/ar-doc.json b/website/doctype/product_settings/locale/ar-doc.json
deleted file mode 100644
index 6caed50..0000000
--- a/website/doctype/product_settings/locale/ar-doc.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- "Default Product Category": "\u0641\u0626\u0629 \u0627\u0644\u0645\u0646\u062a\u062c \u0627\u0644\u0627\u0641\u062a\u0631\u0627\u0636\u064a",
- "Default: \"Product Search\"": "\u0627\u0644\u0627\u0641\u062a\u0631\u0627\u0636\u064a: "\u0627\u0644\u0628\u062d\u062b \u0639\u0646 \u0645\u0646\u062a\u062c"",
- "Help": "\u0645\u0633\u0627\u0639\u062f\u0629",
- "List of Item Groups to be shown in \"All Products\" menu - in the sequence wanted and with number of indents (left spacing to show a tree effect).": "\u0623\u0631\u0627\u062f \u0641\u064a \u062a\u0633\u0644\u0633\u0644 \u0648\u0645\u0639 \u0639\u062f\u062f \u0645\u0646 \u0627\u0644\u0645\u0633\u0627\u0641\u0627\u062a \u0627\u0644\u0628\u0627\u062f\u0626\u0629 (\u062a\u0628\u0627\u0639\u062f \u0627\u0644\u064a\u0633\u0627\u0631 \u0644\u0625\u0638\u0647\u0627\u0631 \u062a\u0623\u062b\u064a\u0631 \u0634\u062c\u0631\u0629) - \u0642\u0627\u0626\u0645\u0629 \u0645\u062c\u0645\u0648\u0639\u0627\u062a \u0627\u0644\u0625\u063a\u0644\u0627\u0642 \u0644\u0639\u0631\u0636\u0647\u0627 \u0641\u064a "\u0643\u0627\u0641\u0629 \u0627\u0644\u0645\u0646\u062a\u062c\u0627\u062a" \u0627\u0644\u0642\u0627\u0626\u0645\u0629.",
- "Product Categories": "\u0641\u0626\u0627\u062a \u0627\u0644\u0645\u0646\u062a\u062c\u0627\u062a",
- "Product Settings": "\u0627\u0644\u0645\u0646\u062a\u062c \u0625\u0639\u062f\u0627\u062f\u0627\u062a",
- "Search Help": "\u062a\u0639\u0644\u064a\u0645\u0627\u062a \u0628\u062d\u062b",
- "Settings for Product Catalog on the website": "\u0625\u0639\u062f\u0627\u062f\u0627\u062a \u062f\u0644\u064a\u0644 \u0627\u0644\u0645\u0646\u062a\u062c \u0639\u0644\u0649 \u0627\u0644\u0645\u0648\u0642\u0639",
- "This Item Group represents \"products.html\"": "\u0647\u0630\u0627 \u0627\u0644\u0641\u0631\u064a\u0642 \u064a\u0645\u062b\u0644 \u0627\u0644\u0645\u062f\u064a\u0646\u0629 "products.html"",
- "Website": "\u0627\u0644\u0645\u0648\u0642\u0639",
- "Website Product Categories": "\u0641\u0626\u0627\u062a \u0627\u0644\u0645\u0646\u062a\u062c\u0627\u062a \u0627\u0644\u0645\u0648\u0642\u0639"
-}
\ No newline at end of file
diff --git a/website/doctype/product_settings/locale/de-doc.json b/website/doctype/product_settings/locale/de-doc.json
deleted file mode 100644
index 7b56c28..0000000
--- a/website/doctype/product_settings/locale/de-doc.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- "Default Product Category": "Standard Produktkategorie",
- "Default: \"Product Search\"": "Default: \"Product Search\"",
- "Help": "Hilfe",
- "List of Item Groups to be shown in \"All Products\" menu - in the sequence wanted and with number of indents (left spacing to show a tree effect).": "Liste der Artikel Groups in \"Alle Produkte\"-Men\u00fc angezeigt werden - und wollte in der Folge mit der Anzahl der Einz\u00fcge (links, um den Baum Abstand Wirkung zu zeigen).",
- "Product Categories": "Produktkategorien",
- "Product Settings": "Produkt-Settings",
- "Search Help": "Suchen Hilfe",
- "Settings for Product Catalog on the website": "Einstellungen f\u00fcr Produkt-Katalog auf der Website",
- "This Item Group represents \"products.html\"": "Dieser Artikel Gruppe stellt \"products.html\"",
- "Website": "Webseite",
- "Website Product Categories": "Website Produktkategorien"
-}
\ No newline at end of file
diff --git a/website/doctype/product_settings/locale/es-doc.json b/website/doctype/product_settings/locale/es-doc.json
deleted file mode 100644
index 4b4752b..0000000
--- a/website/doctype/product_settings/locale/es-doc.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- "Default Product Category": "Predeterminado Categor\u00eda de producto",
- "Default: \"Product Search\"": "Default: "B\u00fasqueda de Productos"",
- "Help": "Ayudar",
- "List of Item Groups to be shown in \"All Products\" menu - in the sequence wanted and with number of indents (left spacing to show a tree effect).": "Lista de los grupos de art\u00edculos que se muestran en "Todos los productos" men\u00fa - en el orden deseado y con el n\u00famero de guiones (espaciado izquierda para mostrar un efecto de \u00e1rbol).",
- "Product Categories": "Categor\u00edas de Productos",
- "Product Settings": "Configuraci\u00f3n del producto",
- "Search Help": "B\u00fasqueda Ayuda",
- "Settings for Product Catalog on the website": "Ajustes de cat\u00e1logo de productos en el sitio web",
- "This Item Group represents \"products.html\"": "Este grupo de elementos representa "products.html"",
- "Website": "Sitio web",
- "Website Product Categories": "Categor\u00edas sitio web del producto"
-}
\ No newline at end of file
diff --git a/website/doctype/product_settings/locale/fr-doc.json b/website/doctype/product_settings/locale/fr-doc.json
deleted file mode 100644
index f8b6820..0000000
--- a/website/doctype/product_settings/locale/fr-doc.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- "Default Product Category": "Cat\u00e9gorie de produit par d\u00e9faut",
- "Default: \"Product Search\"": "Par d\u00e9faut: "Product Search"",
- "Help": "Aider",
- "List of Item Groups to be shown in \"All Products\" menu - in the sequence wanted and with number of indents (left spacing to show a tree effect).": "Liste des Groupes d'articles \u00e0 afficher dans "Tous les produits" menu - dans l'ordre voulu et avec le nombre de tirets (espacement \u00e0 gauche pour montrer un effet d'arbres).",
- "Product Categories": "Cat\u00e9gories de produits",
- "Product Settings": "Param\u00e8tres du produit",
- "Search Help": "Aide pour la recherche",
- "Settings for Product Catalog on the website": "Param\u00e8tres de catalogue de produits sur le site",
- "This Item Group represents \"products.html\"": "Ce groupe repr\u00e9sente article "products.html"",
- "Website": "Site Web",
- "Website Product Categories": "Cat\u00e9gories de produits Site web"
-}
\ No newline at end of file
diff --git a/website/doctype/product_settings/locale/hi-doc.json b/website/doctype/product_settings/locale/hi-doc.json
deleted file mode 100644
index 3a18773..0000000
--- a/website/doctype/product_settings/locale/hi-doc.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- "Default Product Category": "\u0921\u093f\u092b\u093c\u0949\u0932\u094d\u091f \u0909\u0924\u094d\u092a\u093e\u0926 \u0936\u094d\u0930\u0947\u0923\u0940",
- "Default: \"Product Search\"": "\u0921\u093f\u092b\u093c\u0949\u0932\u094d\u091f: "\u0909\u0924\u094d\u092a\u093e\u0926 \u0916\u094b\u091c"",
- "Help": "\u092e\u0926\u0926",
- "List of Item Groups to be shown in \"All Products\" menu - in the sequence wanted and with number of indents (left spacing to show a tree effect).": "\u0906\u0907\u091f\u092e \u0938\u092e\u0942\u0939 \u0915\u0940 \u0938\u0942\u091a\u0940 "\u0938\u092d\u0940 \u0909\u0924\u094d\u092a\u093e\u0926" \u092e\u0947\u0928\u0942 \u092e\u0947\u0902 \u0926\u093f\u0916\u093e\u092f\u093e \u091c\u093e \u0938\u0915\u0924\u093e \u0939\u0948 - \u0905\u0928\u0941\u0915\u094d\u0930\u092e \u092e\u0947\u0902 \u0915\u0930\u0928\u093e \u091a\u093e\u0939\u0924\u093e \u0925\u093e \u0914\u0930 \u0907\u0902\u0921\u0947\u0902\u091f (\u092c\u093e\u090f\u0902 \u0930\u093f\u0915\u094d\u0924\u093f \u0915\u0947 \u0932\u093f\u090f \u090f\u0915 \u092a\u0947\u0921\u093c \u0915\u0947 \u092a\u094d\u0930\u092d\u093e\u0935 \u0915\u094b \u0926\u093f\u0916\u093e\u0928\u0947 \u0915\u0947 \u0932\u093f\u090f) \u0915\u0940 \u0938\u0902\u0916\u094d\u092f\u093e \u0915\u0947 \u0938\u093e\u0925.",
- "Product Categories": "\u0909\u0924\u094d\u092a\u093e\u0926 \u0936\u094d\u0930\u0947\u0923\u093f\u092f\u094b\u0902",
- "Product Settings": "\u0909\u0924\u094d\u092a\u093e\u0926 \u0938\u0947\u091f\u093f\u0902\u0917",
- "Search Help": "\u0916\u094b\u091c \u0938\u0939\u093e\u092f\u0924\u093e",
- "Settings for Product Catalog on the website": "\u0935\u0947\u092c\u0938\u093e\u0907\u091f \u092a\u0930 \u0909\u0924\u094d\u092a\u093e\u0926 \u0915\u0948\u091f\u0932\u0949\u0917 \u0915\u0947 \u0932\u093f\u090f \u0938\u0947\u091f\u093f\u0902\u0917\u094d\u0938",
- "This Item Group represents \"products.html\"": "\u0907\u0938 \u092e\u0926 \u0938\u092e\u0942\u0939 \u0939\u0948 "products.html" \u0915\u093e \u092a\u094d\u0930\u0924\u093f\u0928\u093f\u0927\u093f\u0924\u094d\u0935 \u0915\u0930\u0924\u093e \u0939\u0948",
- "Website": "\u0935\u0947\u092c\u0938\u093e\u0907\u091f",
- "Website Product Categories": "\u0935\u0947\u092c\u0938\u093e\u0907\u091f \u0909\u0924\u094d\u092a\u093e\u0926 \u0936\u094d\u0930\u0947\u0923\u093f\u092f\u093e\u0901"
-}
\ No newline at end of file
diff --git a/website/doctype/product_settings/locale/hr-doc.json b/website/doctype/product_settings/locale/hr-doc.json
deleted file mode 100644
index f840e93..0000000
--- a/website/doctype/product_settings/locale/hr-doc.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- "Default Product Category": "Zadani Kategorija proizvoda",
- "Default: \"Product Search\"": "Default: "Na Tra\u017ei"",
- "Help": "Pomo\u0107i",
- "List of Item Groups to be shown in \"All Products\" menu - in the sequence wanted and with number of indents (left spacing to show a tree effect).": "Popis Artikl grupe koji \u0107e biti prikazan u "Svi proizvodi" izbornik - u slijedu htjela i sa brojem alineje (lijevo razmak pokazati stablo u\u010dinak).",
- "Product Categories": "Kategorije proizvoda",
- "Product Settings": "Postavke proizvoda",
- "Search Help": "Tra\u017ei Pomo\u0107",
- "Settings for Product Catalog on the website": "Postavke za Katalog proizvoda na web stranici",
- "This Item Group represents \"products.html\"": "Ova to\u010dka Grupa predstavlja "products.html"",
- "Website": "Website",
- "Website Product Categories": "Website Kategorije proizvoda"
-}
\ No newline at end of file
diff --git a/website/doctype/product_settings/locale/nl-doc.json b/website/doctype/product_settings/locale/nl-doc.json
deleted file mode 100644
index 5a6621c..0000000
--- a/website/doctype/product_settings/locale/nl-doc.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- "Default Product Category": "Standaard Product Categorie",
- "Default: \"Product Search\"": "Standaard: "Product zoeken"",
- "Help": "Help",
- "List of Item Groups to be shown in \"All Products\" menu - in the sequence wanted and with number of indents (left spacing to show a tree effect).": "Lijst van Artikelgroepen kunnen worden weergegeven in "Alle producten" menu - in de reeks wilde en met het aantal streepjes (links handig een boom effect te tonen).",
- "Product Categories": "Product Categorie\u00ebn",
- "Product Settings": "Product-instellingen",
- "Search Help": "Zoek in Help",
- "Settings for Product Catalog on the website": "Instellingen voor Productcatalogus op de website",
- "This Item Group represents \"products.html\"": "Dit artikel Group vertegenwoordigt "products.html"",
- "Website": "Website",
- "Website Product Categories": "Website Product Categorie\u00ebn"
-}
\ No newline at end of file
diff --git a/website/doctype/product_settings/locale/pt-BR-doc.json b/website/doctype/product_settings/locale/pt-BR-doc.json
deleted file mode 100644
index d1a980d..0000000
--- a/website/doctype/product_settings/locale/pt-BR-doc.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- "Default Product Category": "Categoria de produto padr\u00e3o",
- "Default: \"Product Search\"": "Padr\u00e3o: "Pesquisa de Produto"",
- "Help": "Ajudar",
- "List of Item Groups to be shown in \"All Products\" menu - in the sequence wanted and with number of indents (left spacing to show a tree effect).": "Lista de Grupos de Itens a serem mostrado no menu "Todos os Produtos" - na sequ\u00eancia desejada e com o n\u00famero de recuos (espa\u00e7amento \u00e0 esquerda para mostrar um efeito de \u00e1rvore).",
- "Product Categories": "Categorias de Produtos",
- "Product Settings": "Configura\u00e7\u00f5es do produto",
- "Search Help": "Procurar Ajuda",
- "Settings for Product Catalog on the website": "Configura\u00e7\u00f5es da P\u00e1gina Cat\u00e1logo de Produtos no site",
- "This Item Group represents \"products.html\"": "Este Grupo de Itens representa "produtos.html"",
- "Website": "Site",
- "Website Product Categories": "Categorias de Produto do site"
-}
\ No newline at end of file
diff --git a/website/doctype/product_settings/locale/pt-doc.json b/website/doctype/product_settings/locale/pt-doc.json
deleted file mode 100644
index 863f626..0000000
--- a/website/doctype/product_settings/locale/pt-doc.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- "Default Product Category": "Categoria de produto padr\u00e3o",
- "Default: \"Product Search\"": "Default: "Pesquisa de Produto"",
- "Help": "Ajudar",
- "List of Item Groups to be shown in \"All Products\" menu - in the sequence wanted and with number of indents (left spacing to show a tree effect).": "Lista de Grupos de itens a ser mostrado em "todos os produtos" menu - na seq\u00fc\u00eancia queria e com o n\u00famero de travess\u00f5es (espa\u00e7amento esquerda para mostrar um efeito de \u00e1rvore).",
- "Product Categories": "Categorias de Produtos",
- "Product Settings": "Configura\u00e7\u00f5es do produto",
- "Search Help": "Procurar Ajuda",
- "Settings for Product Catalog on the website": "Configura\u00e7\u00f5es para Cat\u00e1logo de Produtos no site",
- "This Item Group represents \"products.html\"": "Este Grupo item representa "products.html"",
- "Website": "Site",
- "Website Product Categories": "Produto Website Categorias"
-}
\ No newline at end of file
diff --git a/website/doctype/product_settings/locale/sr-doc.json b/website/doctype/product_settings/locale/sr-doc.json
deleted file mode 100644
index 5638a3c..0000000
--- a/website/doctype/product_settings/locale/sr-doc.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- "Default Product Category": "\u0423\u043e\u0431\u0438\u0447\u0430\u0458\u0435\u043d\u043e \u041a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0458\u0430 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0430",
- "Default: \"Product Search\"": "\u0414\u0435\u0444\u0430\u0443\u043b\u0442: "\u041f\u0440\u0435\u0442\u0440\u0430\u0436\u0438\u0432\u0430\u045a\u0435"",
- "Help": "\u041f\u043e\u043c\u043e\u045b",
- "List of Item Groups to be shown in \"All Products\" menu - in the sequence wanted and with number of indents (left spacing to show a tree effect).": "\u0421\u043f\u0438\u0441\u0430\u043a \u0430\u0440\u0442\u0438\u043a\u0430\u043b\u0430 \u0433\u0440\u0443\u043f\u0430 \u0431\u0443\u0434\u0435 \u043f\u0440\u0438\u043a\u0430\u0437\u0430\u043d \u0443 "\u0421\u0432\u0438 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438 \u0443" \u043c\u0435\u043d\u0438\u0458\u0443 - \u0443 \u043d\u0438\u0437\u0443 \u0436\u0435\u043b\u0435\u043b\u0438 \u0438 \u0441\u0430 \u0431\u0440\u043e\u0458\u0435\u043c \u0430\u043b\u0438\u043d\u0435\u0458\u0435 (\u043b\u0435\u0432\u043e \u0440\u0430\u0437\u043c\u0430\u043a \u0434\u0430 \u043f\u043e\u043a\u0430\u0436\u0435 \u0435\u0444\u0435\u043a\u0430\u0442 \u0441\u0442\u0430\u0431\u043b\u0430).",
- "Product Categories": "\u041a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0458\u0435 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0430",
- "Product Settings": "\u041f\u043e\u0434\u0435\u0448\u0430\u0432\u0430\u045a\u0430 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0430",
- "Search Help": "\u041f\u0440\u0435\u0442\u0440\u0430\u0433\u0430 \u041f\u043e\u043c\u043e\u045b",
- "Settings for Product Catalog on the website": "\u041f\u043e\u0434\u0435\u0448\u0430\u0432\u0430\u045a\u0430 \u0437\u0430 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0430 \u043d\u0430 \u0441\u0430\u0458\u0442\u0443",
- "This Item Group represents \"products.html\"": "\u041e\u0432\u0430 \u0442\u0430\u0447\u043a\u0430 \u0413\u0440\u0443\u043f\u0430 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0459\u0430 "\u043f\u0440\u043e\u0434\u0443\u0446\u0442\u0441.\u0445\u0442\u043c\u043b"",
- "Website": "\u0412\u0435\u0431\u0441\u0430\u0458\u0442",
- "Website Product Categories": "\u0421\u0430\u0458\u0442 \u041a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0458\u0435 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0430"
-}
\ No newline at end of file
diff --git a/website/doctype/product_settings/locale/ta-doc.json b/website/doctype/product_settings/locale/ta-doc.json
deleted file mode 100644
index 78371fe..0000000
--- a/website/doctype/product_settings/locale/ta-doc.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- "Default Product Category": "\u0bae\u0bc1\u0ba9\u0bcd\u0ba9\u0bbf\u0bb0\u0bc1\u0baa\u0bcd\u0baa\u0bc1 \u0ba4\u0baf\u0bbe\u0bb0\u0bbf\u0baa\u0bcd\u0baa\u0bc1 \u0baa\u0bbf\u0bb0\u0bbf\u0bb5\u0bc1",
- "Default: \"Product Search\"": "\u0bae\u0bc1\u0ba9\u0bcd\u0ba9\u0bbf\u0bb0\u0bc1\u0baa\u0bcd\u0baa\u0bc1: "\u0ba4\u0bc7\u0b9f\u0bb2\u0bcd"",
- "Help": "\u0b89\u0ba4\u0bb5\u0bbf",
- "List of Item Groups to be shown in \"All Products\" menu - in the sequence wanted and with number of indents (left spacing to show a tree effect).": ""\u0b85\u0ba9\u0bc8\u0ba4\u0bcd\u0ba4\u0bc1 \u0ba4\u0baf\u0bbe\u0bb0\u0bbf\u0baa\u0bcd\u0baa\u0bc1\u0b95\u0bb3\u0bcd" \u0baa\u0b9f\u0bcd\u0b9f\u0bbf \u0b95\u0bbe\u0ba3\u0bcd\u0baa\u0bbf\u0b95\u0bcd\u0b95\u0baa\u0bcd\u0baa\u0b9f\u0bc1\u0bae\u0bcd \u0bb5\u0bc7\u0ba3\u0bcd\u0b9f\u0bc1\u0bae\u0bcd \u0b89\u0bb0\u0bc1\u0baa\u0bcd\u0baa\u0b9f\u0bbf \u0b95\u0bc1\u0bb4\u0bc1\u0b95\u0bcd\u0b95\u0bb3\u0bcd \u0baa\u0b9f\u0bcd\u0b9f\u0bbf\u0baf\u0bb2\u0bcd - \u0bb5\u0bb0\u0bbf\u0b9a\u0bc8 \u0ba4\u0bc7\u0bb5\u0bc8 \u0bae\u0bb1\u0bcd\u0bb1\u0bc1\u0bae\u0bcd \u0b87\u0b9f\u0bc8\u0bb5\u0bc6\u0bb3\u0bbf\u0b95\u0bb3\u0bcd \u0b8e\u0ba3\u0bcd\u0ba3\u0bbf\u0b95\u0bcd\u0b95\u0bc8 (\u0b92\u0bb0\u0bc1 \u0bae\u0bb0\u0bae\u0bcd \u0bb5\u0bbf\u0bb3\u0bc8\u0bb5\u0bc8 \u0b95\u0bbe\u0b9f\u0bcd\u0b9f \u0b87\u0b9f\u0ba4\u0bc1 \u0b87\u0b9f\u0bc8\u0bb5\u0bc6\u0bb3\u0bbf) \u0b89\u0b9f\u0ba9\u0bcd.",
- "Product Categories": "\u0ba4\u0baf\u0bbe\u0bb0\u0bbf\u0baa\u0bcd\u0baa\u0bc1 \u0bb5\u0b95\u0bc8\u0b95\u0bb3\u0bcd",
- "Product Settings": "\u0ba4\u0baf\u0bbe\u0bb0\u0bbf\u0baa\u0bcd\u0baa\u0bc1 \u0b85\u0bae\u0bc8\u0baa\u0bcd\u0baa\u0bc1\u0b95\u0bb3\u0bcd",
- "Search Help": "\u0baa\u0bc6\u0bbe\u0bb4\u0bc1\u0ba4\u0bc1\u0baa\u0bc7\u0bbe\u0b95\u0bcd\u0b95\u0bc1",
- "Settings for Product Catalog on the website": "\u0bb5\u0bb2\u0bc8\u0ba4\u0bcd\u0ba4\u0bb3\u0ba4\u0bcd\u0ba4\u0bbf\u0bb2\u0bcd \u0ba4\u0baf\u0bbe\u0bb0\u0bbf\u0baa\u0bcd\u0baa\u0bc1 \u0baa\u0b9f\u0bcd\u0b9f\u0bbf\u0baf\u0bb2\u0bbf\u0bb2\u0bcd \u0b85\u0bae\u0bc8\u0baa\u0bcd\u0baa\u0bc1\u0b95\u0bb3\u0bc8",
- "This Item Group represents \"products.html\"": "\u0b87\u0ba8\u0bcd\u0ba4 \u0b89\u0bb0\u0bc1\u0baa\u0bcd\u0baa\u0b9f\u0bbf \u0b95\u0bc1\u0bb4\u0bc1 "products.html" \u0baa\u0bbf\u0bb0\u0ba4\u0bbf\u0ba8\u0bbf\u0ba4\u0bbf\u0ba4\u0bcd\u0ba4\u0bc1\u0bb5\u0bae\u0bcd",
- "Website": "\u0b87\u0ba3\u0bc8\u0baf\u0ba4\u0bb3\u0bae\u0bcd",
- "Website Product Categories": "\u0b87\u0ba3\u0bc8\u0baf \u0ba4\u0baf\u0bbe\u0bb0\u0bbf\u0baa\u0bcd\u0baa\u0bc1 \u0bb5\u0b95\u0bc8\u0b95\u0bb3\u0bcd"
-}
\ No newline at end of file
diff --git a/website/doctype/product_settings/locale/th-doc.json b/website/doctype/product_settings/locale/th-doc.json
deleted file mode 100644
index d96b452..0000000
--- a/website/doctype/product_settings/locale/th-doc.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- "Default Product Category": "\u0e1b\u0e23\u0e30\u0e40\u0e20\u0e17\u0e2a\u0e34\u0e19\u0e04\u0e49\u0e32\u0e40\u0e23\u0e34\u0e48\u0e21\u0e15\u0e49\u0e19",
- "Default: \"Product Search\"": "\u0e40\u0e23\u0e34\u0e48\u0e21\u0e15\u0e49\u0e19: "\u0e04\u0e49\u0e19\u0e2b\u0e32\u0e1c\u0e25\u0e34\u0e15\u0e20\u0e31\u0e13\u0e11\u0e4c"",
- "Help": "\u0e0a\u0e48\u0e27\u0e22",
- "List of Item Groups to be shown in \"All Products\" menu - in the sequence wanted and with number of indents (left spacing to show a tree effect).": "\u0e23\u0e32\u0e22\u0e0a\u0e37\u0e48\u0e2d\u0e01\u0e25\u0e38\u0e48\u0e21\u0e2a\u0e34\u0e19\u0e04\u0e49\u0e32\u0e17\u0e35\u0e48\u0e08\u0e30\u0e41\u0e2a\u0e14\u0e07\u0e43\u0e19 "\u0e17\u0e38\u0e01\u0e1c\u0e25\u0e34\u0e15\u0e20\u0e31\u0e13\u0e11\u0e4c" \u0e40\u0e21\u0e19\u0e39 - \u0e43\u0e19\u0e25\u0e33\u0e14\u0e31\u0e1a\u0e17\u0e35\u0e48\u0e15\u0e49\u0e2d\u0e07\u0e01\u0e32\u0e23\u0e41\u0e25\u0e30\u0e21\u0e35\u0e08\u0e33\u0e19\u0e27\u0e19\u0e02\u0e2d\u0e07\u0e01\u0e32\u0e23\u0e40\u0e22\u0e37\u0e49\u0e2d\u0e07 (\u0e23\u0e30\u0e22\u0e30\u0e2b\u0e48\u0e32\u0e07\u0e14\u0e49\u0e32\u0e19\u0e0b\u0e49\u0e32\u0e22\u0e40\u0e1e\u0e37\u0e48\u0e2d\u0e41\u0e2a\u0e14\u0e07\u0e1c\u0e25\u0e15\u0e49\u0e19\u0e44\u0e21\u0e49)",
- "Product Categories": "\u0e2b\u0e21\u0e27\u0e14\u0e2b\u0e21\u0e39\u0e48\u0e2a\u0e34\u0e19\u0e04\u0e49\u0e32",
- "Product Settings": "\u0e01\u0e32\u0e23\u0e15\u0e31\u0e49\u0e07\u0e04\u0e48\u0e32\u0e1c\u0e25\u0e34\u0e15\u0e20\u0e31\u0e13\u0e11\u0e4c",
- "Search Help": "\u0e04\u0e49\u0e19\u0e2b\u0e32\u0e0a\u0e48\u0e27\u0e22\u0e40\u0e2b\u0e25\u0e37\u0e2d",
- "Settings for Product Catalog on the website": "\u0e01\u0e32\u0e23\u0e15\u0e31\u0e49\u0e07\u0e04\u0e48\u0e32\u0e2a\u0e33\u0e2b\u0e23\u0e31\u0e1a\u0e41\u0e04\u0e15\u0e15\u0e32\u0e25\u0e47\u0e2d\u0e01\u0e2a\u0e34\u0e19\u0e04\u0e49\u0e32\u0e1a\u0e19\u0e40\u0e27\u0e47\u0e1a\u0e44\u0e0b\u0e15\u0e4c",
- "This Item Group represents \"products.html\"": "\u0e01\u0e25\u0e38\u0e48\u0e21\u0e2a\u0e34\u0e19\u0e04\u0e49\u0e32\u0e19\u0e35\u0e49\u0e2b\u0e21\u0e32\u0e22\u0e16\u0e36\u0e07 "products.html"",
- "Website": "\u0e40\u0e27\u0e47\u0e1a\u0e44\u0e0b\u0e15\u0e4c",
- "Website Product Categories": "\u0e2b\u0e21\u0e27\u0e14\u0e2b\u0e21\u0e39\u0e48\u0e2a\u0e34\u0e19\u0e04\u0e49\u0e32\u0e40\u0e27\u0e47\u0e1a\u0e44\u0e0b\u0e15\u0e4c"
-}
\ No newline at end of file
diff --git a/website/doctype/product_settings/product_settings.py b/website/doctype/product_settings/product_settings.py
deleted file mode 100644
index 0cb4b7b..0000000
--- a/website/doctype/product_settings/product_settings.py
+++ /dev/null
@@ -1,17 +0,0 @@
-# For license information, please see license.txt
-
-from __future__ import unicode_literals
-import webnotes
-
-class DocType:
- def __init__(self, d, dl):
- self.doc, self.doclist = d, dl
-
- def on_update(self):
- """clear web cache"""
- from webnotes.webutils import clear_cache
- clear_cache()
-
- if self.doc.default_product_category:
- webnotes.bean("Item Group",
- self.doc.default_product_category).save()
\ No newline at end of file
diff --git a/website/doctype/product_settings/product_settings.txt b/website/doctype/product_settings/product_settings.txt
deleted file mode 100644
index fd53f52..0000000
--- a/website/doctype/product_settings/product_settings.txt
+++ /dev/null
@@ -1,80 +0,0 @@
-[
- {
- "owner": "Administrator",
- "docstatus": 0,
- "creation": "2012-12-27 11:46:18",
- "modified_by": "Administrator",
- "modified": "2012-12-27 18:51:38"
- },
- {
- "issingle": 1,
- "description": "Settings for Product Catalog on the website",
- "doctype": "DocType",
- "module": "Website",
- "document_type": "Other",
- "name": "__common__"
- },
- {
- "name": "__common__",
- "parent": "Product Settings",
- "doctype": "DocField",
- "parenttype": "DocType",
- "permlevel": 0,
- "parentfield": "fields"
- },
- {
- "parent": "Product Settings",
- "read": 1,
- "name": "__common__",
- "create": 1,
- "doctype": "DocPerm",
- "write": 1,
- "parenttype": "DocType",
- "role": "Website Manager",
- "permlevel": 0,
- "parentfield": "permissions"
- },
- {
- "name": "Product Settings",
- "doctype": "DocType"
- },
- {
- "doctype": "DocField",
- "label": "Help",
- "fieldname": "help",
- "fieldtype": "HTML",
- "options": "<div class=\"alert\">To start adding products on the website, check \"Show in Website\" in <b>Item</b> and <b>Item Group</b></div>"
- },
- {
- "description": "This Item Group represents \"products.html\"",
- "doctype": "DocField",
- "label": "Default Product Category",
- "fieldname": "default_product_category",
- "fieldtype": "Link",
- "options": "Item Group"
- },
- {
- "description": "Default: \"Product Search\"",
- "doctype": "DocField",
- "label": "Search Help",
- "fieldname": "search_help",
- "fieldtype": "Data"
- },
- {
- "description": "List of Item Groups to be shown in \"All Products\" menu - in the sequence wanted and with number of indents (left spacing to show a tree effect).",
- "doctype": "DocField",
- "label": "Product Categories",
- "fieldname": "sb2",
- "fieldtype": "Section Break"
- },
- {
- "doctype": "DocField",
- "label": "Website Product Categories",
- "fieldname": "website_product_categories",
- "fieldtype": "Table",
- "options": "Website Product Category"
- },
- {
- "doctype": "DocPerm"
- }
-]
\ No newline at end of file
diff --git a/website/doctype/products_settings/locale/_messages_doc.json b/website/doctype/products_settings/locale/_messages_doc.json
deleted file mode 100644
index c44eb10..0000000
--- a/website/doctype/products_settings/locale/_messages_doc.json
+++ /dev/null
@@ -1,6 +0,0 @@
-[
- "Website",
- "Product Groups that are listed on the website. The first product group from this list will be listed by default on the \"Products Page\"",
- "Groups",
- "Products Settings"
-]
\ No newline at end of file
diff --git a/website/doctype/products_settings/locale/ar-doc.json b/website/doctype/products_settings/locale/ar-doc.json
deleted file mode 100644
index 14e1d03..0000000
--- a/website/doctype/products_settings/locale/ar-doc.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "Groups": "\u0645\u062c\u0645\u0648\u0639\u0627\u062a",
- "Product Groups that are listed on the website. The first product group from this list will be listed by default on the \"Products Page\"": "\u0645\u062c\u0645\u0648\u0639\u0627\u062a \u0627\u0644\u0645\u0646\u062a\u062c\u0627\u062a \u0627\u0644\u0645\u0633\u0631\u0648\u062f\u0629 \u0639\u0644\u0649 \u0634\u0628\u0643\u0629 \u0627\u0644\u0627\u0646\u062a\u0631\u0646\u062a. \u0633\u064a\u062a\u0645 \u0633\u0631\u062f \u0645\u062c\u0645\u0648\u0639\u0629 \u0623\u0648\u0644 \u0645\u0646\u062a\u062c \u0645\u0646 \u0647\u0630\u0647 \u0627\u0644\u0642\u0627\u0626\u0645\u0629 \u0628\u0634\u0643\u0644 \u0627\u0641\u062a\u0631\u0627\u0636\u064a \u0639\u0644\u0649 "\u0635\u0641\u062d\u0629 \u0627\u0644\u0645\u0646\u062a\u062c\u0627\u062a"",
- "Products Settings": "\u0627\u0644\u0645\u0646\u062a\u062c\u0627\u062a \u0625\u0639\u062f\u0627\u062f\u0627\u062a",
- "Website": "\u0627\u0644\u0645\u0648\u0642\u0639"
-}
\ No newline at end of file
diff --git a/website/doctype/products_settings/locale/de-doc.json b/website/doctype/products_settings/locale/de-doc.json
deleted file mode 100644
index 29af278..0000000
--- a/website/doctype/products_settings/locale/de-doc.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "Groups": "Gruppen",
- "Product Groups that are listed on the website. The first product group from this list will be listed by default on the \"Products Page\"": "Produktgruppen, die auf der Website aufgef\u00fchrt sind. Das erste Produkt aus dieser Gruppe Liste wird standardm\u00e4\u00dfig auf der \"Products Page\" aufgef\u00fchrt werden",
- "Products Settings": "Produkte Einstellungen",
- "Website": "Webseite"
-}
\ No newline at end of file
diff --git a/website/doctype/products_settings/locale/es-doc.json b/website/doctype/products_settings/locale/es-doc.json
deleted file mode 100644
index 0517d3b..0000000
--- a/website/doctype/products_settings/locale/es-doc.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "Groups": "Grupos",
- "Product Groups that are listed on the website. The first product group from this list will be listed by default on the \"Products Page\"": "Categor\u00eda de producto que aparecen en el sitio web. El grupo de primer producto de esta lista se enumeran de forma predeterminada en la "P\u00e1gina de Productos"",
- "Products Settings": "Productos Settings",
- "Website": "Sitio web"
-}
\ No newline at end of file
diff --git a/website/doctype/products_settings/locale/fr-doc.json b/website/doctype/products_settings/locale/fr-doc.json
deleted file mode 100644
index cb15639..0000000
--- a/website/doctype/products_settings/locale/fr-doc.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "Groups": "Groupes",
- "Product Groups that are listed on the website. The first product group from this list will be listed by default on the \"Products Page\"": "Groupes de produits qui sont r\u00e9pertori\u00e9s sur le site Web. Le premier groupe de produits \u00e0 partir de cette liste seront list\u00e9s par d\u00e9faut sur la page "Produits"",
- "Products Settings": "R\u00e9glages Produits",
- "Website": "Site Web"
-}
\ No newline at end of file
diff --git a/website/doctype/products_settings/locale/hi-doc.json b/website/doctype/products_settings/locale/hi-doc.json
deleted file mode 100644
index 87e28a7..0000000
--- a/website/doctype/products_settings/locale/hi-doc.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "Groups": "\u0938\u092e\u0942\u0939",
- "Product Groups that are listed on the website. The first product group from this list will be listed by default on the \"Products Page\"": "\u0909\u0924\u094d\u092a\u093e\u0926 \u0938\u092e\u0942\u0939 \u0939\u0948 \u0915\u093f \u0935\u0947\u092c\u0938\u093e\u0907\u091f \u092a\u0930 \u0938\u0942\u091a\u0940\u092c\u0926\u094d\u0927 \u0939\u0948\u0902. \u0907\u0938 \u0938\u0942\u091a\u0940 \u092e\u0947\u0902 \u0938\u0947 \u092a\u0939\u0932\u093e \u0909\u0924\u094d\u092a\u093e\u0926 \u0938\u092e\u0942\u0939 "\u0909\u0924\u094d\u092a\u093e\u0926" \u092a\u0947\u091c \u092a\u0930 \u0921\u093f\u092b\u093c\u0949\u0932\u094d\u091f \u0930\u0942\u092a \u0938\u0947 \u0938\u0942\u091a\u0940\u092c\u0926\u094d\u0927 \u0915\u093f\u092f\u093e \u091c\u093e\u090f\u0917\u093e",
- "Products Settings": "\u0909\u0924\u094d\u092a\u093e\u0926 \u0938\u0947\u091f\u093f\u0902\u0917\u094d\u0938",
- "Website": "\u0935\u0947\u092c\u0938\u093e\u0907\u091f"
-}
\ No newline at end of file
diff --git a/website/doctype/products_settings/locale/hr-doc.json b/website/doctype/products_settings/locale/hr-doc.json
deleted file mode 100644
index f6f8750..0000000
--- a/website/doctype/products_settings/locale/hr-doc.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "Groups": "Grupe",
- "Product Groups that are listed on the website. The first product group from this list will be listed by default on the \"Products Page\"": "Proizvod Grupe koje su navedene na web stranici. Prva grupa proizvoda iz ovog popisa \u0107e biti navedeni po defaultu na "Proizvodi stranice"",
- "Products Settings": "Proizvodi Postavke",
- "Website": "Website"
-}
\ No newline at end of file
diff --git a/website/doctype/products_settings/locale/nl-doc.json b/website/doctype/products_settings/locale/nl-doc.json
deleted file mode 100644
index 192b67f..0000000
--- a/website/doctype/products_settings/locale/nl-doc.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "Groups": "Groepen",
- "Product Groups that are listed on the website. The first product group from this list will be listed by default on the \"Products Page\"": "Product Groepen die worden vermeld op de website. De eerste productgroep van deze lijst wordt standaard weergegeven op de "Producten Page"",
- "Products Settings": "Producten Instellingen",
- "Website": "Website"
-}
\ No newline at end of file
diff --git a/website/doctype/products_settings/locale/pt-BR-doc.json b/website/doctype/products_settings/locale/pt-BR-doc.json
deleted file mode 100644
index f8f474f..0000000
--- a/website/doctype/products_settings/locale/pt-BR-doc.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "Groups": "Grupos",
- "Product Groups that are listed on the website. The first product group from this list will be listed by default on the \"Products Page\"": "Grupos de produtos listados no site. O primeiro grupo de produtos desta lista ser\u00e3o listados por padr\u00e3o na "P\u00e1gina de Produtos"",
- "Products Settings": "Configura\u00e7\u00f5es de produtos",
- "Website": "Site"
-}
\ No newline at end of file
diff --git a/website/doctype/products_settings/locale/pt-doc.json b/website/doctype/products_settings/locale/pt-doc.json
deleted file mode 100644
index 96c9c5a..0000000
--- a/website/doctype/products_settings/locale/pt-doc.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "Groups": "Grupos",
- "Product Groups that are listed on the website. The first product group from this list will be listed by default on the \"Products Page\"": "Grupos de produtos listados no site. O grupo primeiro produto desta lista ser\u00e3o listados por padr\u00e3o na "P\u00e1gina de Produtos"",
- "Products Settings": "Configura\u00e7\u00f5es de produtos",
- "Website": "Site"
-}
\ No newline at end of file
diff --git a/website/doctype/products_settings/locale/sr-doc.json b/website/doctype/products_settings/locale/sr-doc.json
deleted file mode 100644
index b585072..0000000
--- a/website/doctype/products_settings/locale/sr-doc.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "Groups": "\u0413\u0440\u0443\u043f\u0435",
- "Product Groups that are listed on the website. The first product group from this list will be listed by default on the \"Products Page\"": "\u0413\u0440\u0443\u043f\u0435 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0430 \u043a\u043e\u0458\u0435 \u0441\u0443 \u043d\u0430\u0432\u0435\u0434\u0435\u043d\u0435 \u043d\u0430 \u0441\u0430\u0458\u0442\u0443. \u041f\u0440\u0432\u0430 \u0433\u0440\u0443\u043f\u0430 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0430 \u0438\u0437 \u043e\u0432\u0435 \u043b\u0438\u0441\u0442\u0435 \u045b\u0435 \u0431\u0438\u0442\u0438 \u043d\u0430\u0432\u0435\u0434\u0435\u043d \u043f\u043e\u0434\u0440\u0430\u0437\u0443\u043c\u0435\u0432\u0430\u043d\u043e \u043d\u0430 "\u041f\u0430\u0433\u0435 \u041f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438"",
- "Products Settings": "\u041f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438 \u041f\u043e\u0434\u0435\u0448\u0430\u0432\u0430\u045a\u0430",
- "Website": "\u0412\u0435\u0431\u0441\u0430\u0458\u0442"
-}
\ No newline at end of file
diff --git a/website/doctype/products_settings/locale/ta-doc.json b/website/doctype/products_settings/locale/ta-doc.json
deleted file mode 100644
index 48a8b61..0000000
--- a/website/doctype/products_settings/locale/ta-doc.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "Groups": "\u0b95\u0bc1\u0bb4\u0bc1\u0b95\u0bcd\u0b95\u0bb3\u0bcd",
- "Product Groups that are listed on the website. The first product group from this list will be listed by default on the \"Products Page\"": "\u0bb5\u0bb2\u0bc8\u0ba4\u0bcd\u0ba4\u0bb3\u0ba4\u0bcd\u0ba4\u0bbf\u0bb2\u0bcd \u0baa\u0b9f\u0bcd\u0b9f\u0bbf\u0baf\u0bb2\u0bbf\u0b9f\u0baa\u0bcd\u0baa\u0b9f\u0bcd\u0b9f\u0bc1\u0bb3\u0bcd\u0bb3\u0ba4\u0bc1 \u0b8e\u0ba9\u0bcd\u0bb1\u0bc1 \u0ba4\u0baf\u0bbe\u0bb0\u0bbf\u0baa\u0bcd\u0baa\u0bc1 \u0b95\u0bc1\u0bb4\u0bc1\u0b95\u0bcd\u0b95\u0bb3\u0bcd. \u0b87\u0ba8\u0bcd\u0ba4 \u0baa\u0b9f\u0bcd\u0b9f\u0bbf\u0baf\u0bb2\u0bbf\u0bb2\u0bcd \u0b87\u0bb0\u0bc1\u0ba8\u0bcd\u0ba4\u0bc1 \u0bae\u0bc1\u0ba4\u0bb2\u0bcd \u0ba4\u0baf\u0bbe\u0bb0\u0bbf\u0baa\u0bcd\u0baa\u0bc1 \u0b95\u0bc1\u0bb4\u0bc1 "\u0ba4\u0baf\u0bbe\u0bb0\u0bbf\u0baa\u0bcd\u0baa\u0bc1\u0b95\u0bb3\u0bcd \u0baa\u0b95\u0bcd\u0b95\u0bae\u0bcd" \u0bae\u0bc1\u0ba9\u0bcd\u0ba9\u0bbf\u0bb0\u0bc1\u0baa\u0bcd\u0baa\u0bbe\u0b95 \u0baa\u0b9f\u0bcd\u0b9f\u0bbf\u0baf\u0bb2\u0bbf\u0b9f\u0baa\u0bcd\u0baa\u0b9f\u0bcd\u0b9f\u0bc1\u0bb3\u0bcd\u0bb3",
- "Products Settings": "\u0baa\u0bc6\u0bbe\u0bb0\u0bc1\u0b9f\u0bcd\u0b95\u0bb3\u0bcd \u0b85\u0bae\u0bc8\u0baa\u0bcd\u0baa\u0bc1\u0b95\u0bb3\u0bcd",
- "Website": "\u0b87\u0ba3\u0bc8\u0baf\u0ba4\u0bb3\u0bae\u0bcd"
-}
\ No newline at end of file
diff --git a/website/doctype/products_settings/locale/th-doc.json b/website/doctype/products_settings/locale/th-doc.json
deleted file mode 100644
index ed75263..0000000
--- a/website/doctype/products_settings/locale/th-doc.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "Groups": "\u0e01\u0e25\u0e38\u0e48\u0e21",
- "Product Groups that are listed on the website. The first product group from this list will be listed by default on the \"Products Page\"": "\u0e01\u0e25\u0e38\u0e48\u0e21\u0e2a\u0e34\u0e19\u0e04\u0e49\u0e32\u0e17\u0e35\u0e48\u0e21\u0e35\u0e01\u0e32\u0e23\u0e23\u0e30\u0e1a\u0e38\u0e44\u0e27\u0e49\u0e1a\u0e19\u0e40\u0e27\u0e47\u0e1a\u0e44\u0e0b\u0e15\u0e4c \u0e01\u0e25\u0e38\u0e48\u0e21\u0e1c\u0e25\u0e34\u0e15\u0e20\u0e31\u0e13\u0e11\u0e4c\u0e41\u0e23\u0e01\u0e08\u0e32\u0e01\u0e23\u0e32\u0e22\u0e01\u0e32\u0e23\u0e19\u0e35\u200b\u200b\u0e49\u0e08\u0e30\u0e16\u0e39\u0e01\u0e23\u0e30\u0e1a\u0e38\u0e44\u0e27\u0e49\u0e15\u0e32\u0e21\u0e04\u0e48\u0e32\u0e40\u0e23\u0e34\u0e48\u0e21\u0e15\u0e49\u0e19\u0e17\u0e35\u0e48 "\u0e2b\u0e19\u0e49\u0e32\u0e1c\u0e25\u0e34\u0e15\u0e20\u0e31\u0e13\u0e11\u0e4c"",
- "Products Settings": "\u0e01\u0e32\u0e23\u0e15\u0e31\u0e49\u0e07\u0e04\u0e48\u0e32\u0e1c\u0e25\u0e34\u0e15\u0e20\u0e31\u0e13\u0e11\u0e4c",
- "Website": "\u0e40\u0e27\u0e47\u0e1a\u0e44\u0e0b\u0e15\u0e4c"
-}
\ No newline at end of file
diff --git a/website/doctype/related_page/__init__.py b/website/doctype/related_page/__init__.py
deleted file mode 100644
index baffc48..0000000
--- a/website/doctype/related_page/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-from __future__ import unicode_literals
diff --git a/website/doctype/related_page/locale/_messages_doc.json b/website/doctype/related_page/locale/_messages_doc.json
deleted file mode 100644
index 103d2fa..0000000
--- a/website/doctype/related_page/locale/_messages_doc.json
+++ /dev/null
@@ -1,5 +0,0 @@
-[
- "Website",
- "Related Page",
- "Page"
-]
\ No newline at end of file
diff --git a/website/doctype/related_page/locale/ar-doc.json b/website/doctype/related_page/locale/ar-doc.json
deleted file mode 100644
index f8406d4..0000000
--- a/website/doctype/related_page/locale/ar-doc.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "Page": "\u0635\u0641\u062d\u0629",
- "Related Page": "\u0627\u0644\u0635\u0641\u062d\u0629 \u0630\u0627\u062a \u0627\u0644\u0635\u0644\u0629",
- "Website": "\u0627\u0644\u0645\u0648\u0642\u0639"
-}
\ No newline at end of file
diff --git a/website/doctype/related_page/locale/de-doc.json b/website/doctype/related_page/locale/de-doc.json
deleted file mode 100644
index 4ff3efc..0000000
--- a/website/doctype/related_page/locale/de-doc.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "Page": "Seite",
- "Related Page": "Verwandte Seite",
- "Website": "Webseite"
-}
\ No newline at end of file
diff --git a/website/doctype/related_page/locale/es-doc.json b/website/doctype/related_page/locale/es-doc.json
deleted file mode 100644
index daecef6..0000000
--- a/website/doctype/related_page/locale/es-doc.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "Page": "P\u00e1gina",
- "Related Page": "P\u00e1gina Relacionada",
- "Website": "Sitio web"
-}
\ No newline at end of file
diff --git a/website/doctype/related_page/locale/fr-doc.json b/website/doctype/related_page/locale/fr-doc.json
deleted file mode 100644
index e36bdc4..0000000
--- a/website/doctype/related_page/locale/fr-doc.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "Page": "Page",
- "Related Page": "Associ\u00e9s Page",
- "Website": "Site Web"
-}
\ No newline at end of file
diff --git a/website/doctype/related_page/locale/hi-doc.json b/website/doctype/related_page/locale/hi-doc.json
deleted file mode 100644
index 881f890..0000000
--- a/website/doctype/related_page/locale/hi-doc.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "Page": "\u092a\u0947\u091c",
- "Related Page": "\u0938\u0902\u092c\u0902\u0927\u093f\u0924 \u092a\u0947\u091c",
- "Website": "\u0935\u0947\u092c\u0938\u093e\u0907\u091f"
-}
\ No newline at end of file
diff --git a/website/doctype/related_page/locale/hr-doc.json b/website/doctype/related_page/locale/hr-doc.json
deleted file mode 100644
index fdb8504..0000000
--- a/website/doctype/related_page/locale/hr-doc.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "Page": "Stranica",
- "Related Page": "Vezani Stranica",
- "Website": "Website"
-}
\ No newline at end of file
diff --git a/website/doctype/related_page/locale/nl-doc.json b/website/doctype/related_page/locale/nl-doc.json
deleted file mode 100644
index 43d36c4..0000000
--- a/website/doctype/related_page/locale/nl-doc.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "Page": "Pagina",
- "Related Page": "Verwante pagina",
- "Website": "Website"
-}
\ No newline at end of file
diff --git a/website/doctype/related_page/locale/pt-BR-doc.json b/website/doctype/related_page/locale/pt-BR-doc.json
deleted file mode 100644
index 92acc67..0000000
--- a/website/doctype/related_page/locale/pt-BR-doc.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "Page": "P\u00e1gina",
- "Related Page": "P\u00e1gina Relacionada",
- "Website": "Site"
-}
\ No newline at end of file
diff --git a/website/doctype/related_page/locale/pt-doc.json b/website/doctype/related_page/locale/pt-doc.json
deleted file mode 100644
index 92acc67..0000000
--- a/website/doctype/related_page/locale/pt-doc.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "Page": "P\u00e1gina",
- "Related Page": "P\u00e1gina Relacionada",
- "Website": "Site"
-}
\ No newline at end of file
diff --git a/website/doctype/related_page/locale/sr-doc.json b/website/doctype/related_page/locale/sr-doc.json
deleted file mode 100644
index a924dd2..0000000
--- a/website/doctype/related_page/locale/sr-doc.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "Page": "\u0421\u0442\u0440\u0430\u043d\u0430",
- "Related Page": "\u0420\u0435\u043b\u0430\u0442\u0435\u0434 \u0421\u0442\u0440\u0430\u043d\u0430",
- "Website": "\u0412\u0435\u0431\u0441\u0430\u0458\u0442"
-}
\ No newline at end of file
diff --git a/website/doctype/related_page/locale/ta-doc.json b/website/doctype/related_page/locale/ta-doc.json
deleted file mode 100644
index 336ef40..0000000
--- a/website/doctype/related_page/locale/ta-doc.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "Page": "\u0baa\u0b95\u0bcd\u0b95\u0bae\u0bcd",
- "Related Page": "\u0ba4\u0bc6\u0bbe\u0b9f\u0bb0\u0bcd\u0baa\u0bc1\u0b9f\u0bc8\u0baf \u0baa\u0b95\u0bcd\u0b95\u0bae\u0bcd",
- "Website": "\u0b87\u0ba3\u0bc8\u0baf\u0ba4\u0bb3\u0bae\u0bcd"
-}
\ No newline at end of file
diff --git a/website/doctype/related_page/locale/th-doc.json b/website/doctype/related_page/locale/th-doc.json
deleted file mode 100644
index 7ef1f4b..0000000
--- a/website/doctype/related_page/locale/th-doc.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "Page": "\u0e2b\u0e19\u0e49\u0e32",
- "Related Page": "\u0e40\u0e1e\u0e08\u0e17\u0e35\u0e48\u0e40\u0e01\u0e35\u0e48\u0e22\u0e27\u0e02\u0e49\u0e2d\u0e07",
- "Website": "\u0e40\u0e27\u0e47\u0e1a\u0e44\u0e0b\u0e15\u0e4c"
-}
\ No newline at end of file
diff --git a/website/doctype/related_page/related_page.py b/website/doctype/related_page/related_page.py
deleted file mode 100644
index 7f48feb..0000000
--- a/website/doctype/related_page/related_page.py
+++ /dev/null
@@ -1,22 +0,0 @@
-# ERPNext - web based ERP (http://erpnext.com)
-# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-from __future__ import unicode_literals
-import webnotes
-
-class DocType:
- def __init__(self, d, dl):
- self.doc, self.doclist = d, dl
\ No newline at end of file
diff --git a/website/doctype/related_page/related_page.txt b/website/doctype/related_page/related_page.txt
deleted file mode 100644
index 2f21cbd..0000000
--- a/website/doctype/related_page/related_page.txt
+++ /dev/null
@@ -1,34 +0,0 @@
-[
- {
- "creation": "2013-02-22 01:28:08",
- "docstatus": 0,
- "modified": "2013-03-07 07:03:30",
- "modified_by": "Administrator",
- "owner": "Administrator"
- },
- {
- "doctype": "DocType",
- "istable": 1,
- "module": "Website",
- "name": "__common__"
- },
- {
- "doctype": "DocField",
- "fieldname": "page",
- "fieldtype": "Link",
- "label": "Page",
- "name": "__common__",
- "options": "Page",
- "parent": "Related Page",
- "parentfield": "fields",
- "parenttype": "DocType",
- "permlevel": 0
- },
- {
- "doctype": "DocType",
- "name": "Related Page"
- },
- {
- "doctype": "DocField"
- }
-]
\ No newline at end of file
diff --git a/website/doctype/style_settings/README.md b/website/doctype/style_settings/README.md
new file mode 100644
index 0000000..de9d0cd
--- /dev/null
+++ b/website/doctype/style_settings/README.md
@@ -0,0 +1,6 @@
+Style settings for website. Includes settings for:
+
+- Site colours (background, toolbars)
+- Fonts (family and size)
+- Background (image if any)
+- Custom CSS
\ No newline at end of file
diff --git a/website/doctype/style_settings/custom_template.css b/website/doctype/style_settings/custom_template.css
index f055b78..996774e 100644
--- a/website/doctype/style_settings/custom_template.css
+++ b/website/doctype/style_settings/custom_template.css
@@ -66,8 +66,9 @@
}
/* Bootstrap Navbar */
-.navbar-inverse .navbar-inner {
+.navbar-inverse {
box-shadow: none;
+ border-radius: 0px;
background-color: #{{ doc.top_bar_background or "444444"}};
background-repeat: repeat-x;
background-image: none;
@@ -78,9 +79,9 @@
{%- endif %}
}
-.navbar-inverse .brand,
-.navbar-inverse .brand:hover,
-.navbar-inverse .brand:focus,
+.navbar-inverse .navbar-brand,
+.navbar-inverse .navbar-brand:hover,
+.navbar-inverse .navbar-brand:focus,
.navbar-inverse .nav > li > a {
color: #{{ doc.top_bar_foreground or "fffffff"}};
text-shadow: none;
@@ -117,8 +118,8 @@
color: #{{ doc.top_bar_foreground or "fffffff"}};
}
-.navbar-fixed-top .navbar-inner,
-.navbar-static-top .navbar-inner {
+.navbar-fixed-top,
+.navbar-static-top {
-webkit-box-shadow: none;
-moz-box-shadow: none;
box-shadow: none;
@@ -190,14 +191,6 @@
text-shadow: none;
}
-.breadcrumb > li > .divider {
- color: #{{ doc.page_text }};
-}
-
-.breadcrumb > .active {
- color: #{{ doc.page_text }};
-}
-
.table-striped tbody > tr:nth-child(odd) > td,
.table-striped tbody > tr:nth-child(odd) > th {
diff --git a/website/doctype/top_bar_item/README.md b/website/doctype/top_bar_item/README.md
new file mode 100644
index 0000000..3300367
--- /dev/null
+++ b/website/doctype/top_bar_item/README.md
@@ -0,0 +1 @@
+Link in the header or footer of the website.
\ No newline at end of file
diff --git a/website/doctype/web_page/README.md b/website/doctype/web_page/README.md
new file mode 100644
index 0000000..1ef179b
--- /dev/null
+++ b/website/doctype/web_page/README.md
@@ -0,0 +1 @@
+Static (HTML / JS / CSS) page created by the user for the website.
\ No newline at end of file
diff --git a/website/doctype/website_item_group/README.md b/website/doctype/website_item_group/README.md
new file mode 100644
index 0000000..54abfaf
--- /dev/null
+++ b/website/doctype/website_item_group/README.md
@@ -0,0 +1 @@
+Alternate grouping of parent Item (for website, so an Item can be listed under multiple groups).
\ No newline at end of file
diff --git a/website/doctype/website_product_category/__init__.py b/website/doctype/website_product_category/__init__.py
deleted file mode 100644
index e69de29..0000000
--- a/website/doctype/website_product_category/__init__.py
+++ /dev/null
diff --git a/website/doctype/website_product_category/locale/_messages_doc.json b/website/doctype/website_product_category/locale/_messages_doc.json
deleted file mode 100644
index cacc0ac..0000000
--- a/website/doctype/website_product_category/locale/_messages_doc.json
+++ /dev/null
@@ -1,7 +0,0 @@
-[
- "Website",
- "Product Category for website",
- "Indent",
- "Item Group",
- "Website Product Category"
-]
\ No newline at end of file
diff --git a/website/doctype/website_product_category/locale/ar-doc.json b/website/doctype/website_product_category/locale/ar-doc.json
deleted file mode 100644
index eaa1f44..0000000
--- a/website/doctype/website_product_category/locale/ar-doc.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- "0": "0",
- "1": "1",
- "2": "2",
- "3": "3",
- "4": "4",
- "5": "5",
- "Indent": "\u0627\u0644\u0645\u0633\u0627\u0641\u0629 \u0627\u0644\u0628\u0627\u062f\u0626\u0629",
- "Item Group": "\u0627\u0644\u0628\u0646\u062f \u0627\u0644\u0645\u062c\u0645\u0648\u0639\u0629",
- "Product Category for website": "\u0641\u0626\u0629 \u0645\u0646 \u0641\u0626\u0627\u062a \u0627\u0644\u0645\u0646\u062a\u062c\u0627\u062a \u0644\u0645\u0648\u0642\u0639 \u0627\u0644\u0648\u064a\u0628",
- "Website": "\u0627\u0644\u0645\u0648\u0642\u0639",
- "Website Product Category": "\u0627\u0644\u0645\u0648\u0642\u0639 \u0641\u0626\u0629 \u0627\u0644\u0645\u0646\u062a\u062c"
-}
\ No newline at end of file
diff --git a/website/doctype/website_product_category/locale/de-doc.json b/website/doctype/website_product_category/locale/de-doc.json
deleted file mode 100644
index d834954..0000000
--- a/website/doctype/website_product_category/locale/de-doc.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "Indent": "Einzug",
- "Item Group": "Artikel-Gruppe",
- "Product Category for website": "Produktkategorie f\u00fcr Website",
- "Website": "Webseite",
- "Website Product Category": "Website Produktkategorie"
-}
\ No newline at end of file
diff --git a/website/doctype/website_product_category/locale/es-doc.json b/website/doctype/website_product_category/locale/es-doc.json
deleted file mode 100644
index 10c6b90..0000000
--- a/website/doctype/website_product_category/locale/es-doc.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- "0": "0",
- "1": "1",
- "2": "2",
- "3": "3",
- "4": "4",
- "5": "5",
- "Indent": "Sangrar",
- "Item Group": "Grupo de art\u00edculos",
- "Product Category for website": "Categor\u00eda de productos para el sitio web",
- "Website": "Sitio web",
- "Website Product Category": "Sitio web Categor\u00eda de producto"
-}
\ No newline at end of file
diff --git a/website/doctype/website_product_category/locale/fr-doc.json b/website/doctype/website_product_category/locale/fr-doc.json
deleted file mode 100644
index 40bfda6..0000000
--- a/website/doctype/website_product_category/locale/fr-doc.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- "0": "0",
- "1": "1",
- "2": "2",
- "3": "3",
- "4": "4",
- "5": "5",
- "Indent": "Tiret",
- "Item Group": "Groupe d'\u00e9l\u00e9ments",
- "Product Category for website": "Cat\u00e9gorie de produit pour le site web",
- "Website": "Site Web",
- "Website Product Category": "Cat\u00e9gorie de produit site web"
-}
\ No newline at end of file
diff --git a/website/doctype/website_product_category/locale/hi-doc.json b/website/doctype/website_product_category/locale/hi-doc.json
deleted file mode 100644
index 5416bb9..0000000
--- a/website/doctype/website_product_category/locale/hi-doc.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- "0": "0",
- "1": "1",
- "2": "2",
- "3": "3",
- "4": "4",
- "5": "5",
- "Indent": "\u092e\u093e\u0902\u0917\u092a\u0924\u094d\u0930",
- "Item Group": "\u0906\u0907\u091f\u092e \u0938\u092e\u0942\u0939",
- "Product Category for website": "\u0935\u0947\u092c\u0938\u093e\u0907\u091f \u0915\u0947 \u0932\u093f\u090f \u0909\u0924\u094d\u092a\u093e\u0926 \u0936\u094d\u0930\u0947\u0923\u0940",
- "Website": "\u0935\u0947\u092c\u0938\u093e\u0907\u091f",
- "Website Product Category": "\u0935\u0947\u092c\u0938\u093e\u0907\u091f \u0909\u0924\u094d\u092a\u093e\u0926 \u0936\u094d\u0930\u0947\u0923\u0940"
-}
\ No newline at end of file
diff --git a/website/doctype/website_product_category/locale/hr-doc.json b/website/doctype/website_product_category/locale/hr-doc.json
deleted file mode 100644
index 07ff9fd..0000000
--- a/website/doctype/website_product_category/locale/hr-doc.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- "0": "0",
- "1": "1",
- "2": "2",
- "3": "3",
- "4": "4",
- "5": "5",
- "Indent": "Uvu\u0107i",
- "Item Group": "Stavka Grupa",
- "Product Category for website": "Proizvod Kategorija za web stranicu",
- "Website": "Website",
- "Website Product Category": "Web Kategorija proizvoda"
-}
\ No newline at end of file
diff --git a/website/doctype/website_product_category/locale/nl-doc.json b/website/doctype/website_product_category/locale/nl-doc.json
deleted file mode 100644
index 4f67755..0000000
--- a/website/doctype/website_product_category/locale/nl-doc.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- "0": "0",
- "1": "1",
- "2": "2",
- "3": "3",
- "4": "4",
- "5": "5",
- "Indent": "Inspringen",
- "Item Group": "Item Group",
- "Product Category for website": "Product Categorie voor website",
- "Website": "Website",
- "Website Product Category": "Website Product Category"
-}
\ No newline at end of file
diff --git a/website/doctype/website_product_category/locale/pt-BR-doc.json b/website/doctype/website_product_category/locale/pt-BR-doc.json
deleted file mode 100644
index 5fc8d29..0000000
--- a/website/doctype/website_product_category/locale/pt-BR-doc.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "Indent": "Recuar",
- "Item Group": "Grupo de Itens",
- "Product Category for website": "Categoria de Produto para o site",
- "Website": "Site",
- "Website Product Category": "Categoria de Produto do site"
-}
\ No newline at end of file
diff --git a/website/doctype/website_product_category/locale/pt-doc.json b/website/doctype/website_product_category/locale/pt-doc.json
deleted file mode 100644
index b09c836..0000000
--- a/website/doctype/website_product_category/locale/pt-doc.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- "0": "0",
- "1": "1",
- "2": "2",
- "3": "3",
- "4": "4",
- "5": "5",
- "Indent": "Recuar",
- "Item Group": "Grupo Item",
- "Product Category for website": "Categoria de Produto para o site",
- "Website": "Site",
- "Website Product Category": "Categoria de Produto site"
-}
\ No newline at end of file
diff --git a/website/doctype/website_product_category/locale/sr-doc.json b/website/doctype/website_product_category/locale/sr-doc.json
deleted file mode 100644
index dafa9b0..0000000
--- a/website/doctype/website_product_category/locale/sr-doc.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- "0": "0",
- "1": "1",
- "2": "2",
- "3": "3",
- "4": "4",
- "5": "5",
- "Indent": "\u0423\u0432\u0443\u045b\u0438",
- "Item Group": "\u0421\u0442\u0430\u0432\u043a\u0430 \u0413\u0440\u0443\u043f\u0430",
- "Product Category for website": "\u041a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0458\u0430 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0430 \u0437\u0430 \u0441\u0430\u0458\u0442",
- "Website": "\u0412\u0435\u0431\u0441\u0430\u0458\u0442",
- "Website Product Category": "\u0421\u0430\u0458\u0442 \u041a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0458\u0430 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0430"
-}
\ No newline at end of file
diff --git a/website/doctype/website_product_category/locale/ta-doc.json b/website/doctype/website_product_category/locale/ta-doc.json
deleted file mode 100644
index 396a46a..0000000
--- a/website/doctype/website_product_category/locale/ta-doc.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- "0": "0",
- "1": "1",
- "2": "2",
- "3": "3",
- "4": "4",
- "5": "5",
- "Indent": "(\u0b8e\u0bb4\u0bc1\u0ba4\u0bc1\u0bae\u0bcd\u0baa\u0bc7\u0bbe\u0ba4\u0bc1) \u0b93\u0bb0\u0ba4\u0bcd\u0ba4\u0bbf\u0bb2\u0bcd \u0b87\u0b9f\u0bae\u0bcd \u0bb5\u0bbf\u0b9f\u0bc1",
- "Item Group": "\u0b89\u0bb0\u0bc1\u0baa\u0bcd\u0baa\u0b9f\u0bbf\u0baf\u0bc8 \u0b95\u0bc1\u0bb4\u0bc1",
- "Product Category for website": "\u0bb5\u0bb2\u0bc8\u0ba4\u0bcd\u0ba4\u0bb3\u0ba4\u0bcd\u0ba4\u0bc8 \u0ba4\u0baf\u0bbe\u0bb0\u0bbf\u0baa\u0bcd\u0baa\u0bc1 \u0baa\u0bbf\u0bb0\u0bbf\u0bb5\u0bc1",
- "Website": "\u0b87\u0ba3\u0bc8\u0baf\u0ba4\u0bb3\u0bae\u0bcd",
- "Website Product Category": "\u0b87\u0ba3\u0bc8\u0baf \u0ba4\u0baf\u0bbe\u0bb0\u0bbf\u0baa\u0bcd\u0baa\u0bc1 \u0baa\u0bbf\u0bb0\u0bbf\u0bb5\u0bc1"
-}
\ No newline at end of file
diff --git a/website/doctype/website_product_category/locale/th-doc.json b/website/doctype/website_product_category/locale/th-doc.json
deleted file mode 100644
index 405f231..0000000
--- a/website/doctype/website_product_category/locale/th-doc.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- "0": "0",
- "1": "1",
- "2": "2",
- "3": "3",
- "4": "4",
- "5": "5",
- "Indent": "\u0e22\u0e48\u0e2d\u0e2b\u0e19\u0e49\u0e32",
- "Item Group": "\u0e01\u0e25\u0e38\u0e48\u0e21\u0e2a\u0e34\u0e19\u0e04\u0e49\u0e32",
- "Product Category for website": "\u0e1b\u0e23\u0e30\u0e40\u0e20\u0e17\u0e2a\u0e34\u0e19\u0e04\u0e49\u0e32\u0e2a\u0e33\u0e2b\u0e23\u0e31\u0e1a\u0e40\u0e27\u0e47\u0e1a\u0e44\u0e0b\u0e15\u0e4c",
- "Website": "\u0e40\u0e27\u0e47\u0e1a\u0e44\u0e0b\u0e15\u0e4c",
- "Website Product Category": "\u0e1b\u0e23\u0e30\u0e40\u0e20\u0e17\u0e2a\u0e34\u0e19\u0e04\u0e49\u0e32\u0e40\u0e27\u0e47\u0e1a\u0e44\u0e0b\u0e15\u0e4c"
-}
\ No newline at end of file
diff --git a/website/doctype/website_product_category/website_product_category.txt b/website/doctype/website_product_category/website_product_category.txt
deleted file mode 100644
index d0b3db8..0000000
--- a/website/doctype/website_product_category/website_product_category.txt
+++ /dev/null
@@ -1,43 +0,0 @@
-[
- {
- "creation": "2013-02-22 01:28:09",
- "docstatus": 0,
- "modified": "2013-03-07 07:03:34",
- "modified_by": "Administrator",
- "owner": "Administrator"
- },
- {
- "description": "Product Category for website",
- "doctype": "DocType",
- "document_type": "Transaction",
- "istable": 1,
- "module": "Website",
- "name": "__common__"
- },
- {
- "doctype": "DocField",
- "name": "__common__",
- "parent": "Website Product Category",
- "parentfield": "fields",
- "parenttype": "DocType",
- "permlevel": 0
- },
- {
- "doctype": "DocType",
- "name": "Website Product Category"
- },
- {
- "doctype": "DocField",
- "fieldname": "item_group",
- "fieldtype": "Link",
- "label": "Item Group",
- "options": "Item Group"
- },
- {
- "doctype": "DocField",
- "fieldname": "indent",
- "fieldtype": "Select",
- "label": "Indent",
- "options": "0\n1\n2\n3\n4\n5"
- }
-]
\ No newline at end of file
diff --git a/website/doctype/website_script/README.md b/website/doctype/website_script/README.md
new file mode 100644
index 0000000..65af2a1
--- /dev/null
+++ b/website/doctype/website_script/README.md
@@ -0,0 +1 @@
+Custom javascript to be appended at the end of the page. Used to include 3rd party tracking / analytics tools.
\ No newline at end of file
diff --git a/website/doctype/website_script/website_script.py b/website/doctype/website_script/website_script.py
index 928aa9f..60403d4 100644
--- a/website/doctype/website_script/website_script.py
+++ b/website/doctype/website_script/website_script.py
@@ -5,4 +5,9 @@
class DocType:
def __init__(self, d, dl):
- self.doc, self.doclist = d, dl
\ No newline at end of file
+ self.doc, self.doclist = d, dl
+
+ def on_update(self):
+ # make js and css
+ from website.helpers.make_web_include_files import make
+ make()
\ No newline at end of file
diff --git a/website/doctype/website_settings/README.md b/website/doctype/website_settings/README.md
new file mode 100644
index 0000000..8e654fc
--- /dev/null
+++ b/website/doctype/website_settings/README.md
@@ -0,0 +1 @@
+Overall website settings. Including banners, items appearing in the top and bottom menus, tracking code for Google Analytics etc.
\ No newline at end of file
diff --git a/website/doctype/website_slideshow/README.md b/website/doctype/website_slideshow/README.md
new file mode 100644
index 0000000..e6afaed
--- /dev/null
+++ b/website/doctype/website_slideshow/README.md
@@ -0,0 +1 @@
+Image slide show for Web Page, Product (Item) page, Item Group page.
\ No newline at end of file
diff --git a/website/doctype/website_slideshow/website_slideshow.txt b/website/doctype/website_slideshow/website_slideshow.txt
index 2887d4b..e67e1f8 100644
--- a/website/doctype/website_slideshow/website_slideshow.txt
+++ b/website/doctype/website_slideshow/website_slideshow.txt
@@ -1,8 +1,8 @@
[
{
- "creation": "2013-03-07 14:48:40",
+ "creation": "2013-03-07 15:53:15",
"docstatus": 0,
- "modified": "2012-12-25 16:56:34",
+ "modified": "2013-05-28 16:57:32",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -53,6 +53,7 @@
},
{
"depends_on": "eval:!doc.__islocal",
+ "description": "Note: For best results, images must be of the same size and width must be greater than height.",
"doctype": "DocField",
"fieldname": "sb0",
"fieldtype": "Section Break",
diff --git a/website/doctype/website_slideshow_item/README.md b/website/doctype/website_slideshow_item/README.md
new file mode 100644
index 0000000..2f52d24
--- /dev/null
+++ b/website/doctype/website_slideshow_item/README.md
@@ -0,0 +1 @@
+Slide (image) details for Website Slideshow.
\ No newline at end of file
diff --git a/website/helpers/blog.py b/website/helpers/blog.py
index 386c4b7..2504067 100644
--- a/website/helpers/blog.py
+++ b/website/helpers/blog.py
@@ -63,18 +63,26 @@
"""
import webnotes
import webnotes.utils, markdown2
- import webnotes.widgets.form.comments
if not args: args = webnotes.form_dict
args['comment'] = unicode(markdown2.markdown(args.get('comment') or ''))
+ args['doctype'] = "Comment"
- comment = webnotes.widgets.form.comments.add_comment(args)
+ page_name = args.get("page_name")
+ if "page_name" in args:
+ del args["page_name"]
+ if "cmd" in args:
+ del args["cmd"]
+
+ comment = webnotes.bean(args)
+ comment.ignore_permissions = True
+ comment.insert()
# since comments are embedded in the page, clear the web cache
- webnotes.webutils.clear_cache(args.get('page_name'))
+ webnotes.webutils.clear_cache(page_name)
- comment['comment_date'] = webnotes.utils.global_date_format(comment['creation'])
- template_args = { 'comment_list': [comment], 'template': 'app/website/templates/html/comment.html' }
+ args['comment_date'] = webnotes.utils.global_date_format(comment.doc.creation)
+ template_args = { 'comment_list': [args], 'template': 'app/website/templates/html/comment.html' }
# get html of comment row
comment_html = webnotes.webutils.build_html(template_args)
@@ -94,7 +102,7 @@
subject='New Comment on Blog: ' + blog['title'],
message='%(comment)s<p>By %(comment_by_fullname)s</p>' % args)
- return comment_html
+ return comment_html.replace("\n", "")
@webnotes.whitelist(allow_guest=True)
def add_subscriber(name, email_id):
diff --git a/website/page/unsubscribe/unsubscribe.py b/website/page/unsubscribe/unsubscribe.py
deleted file mode 100644
index 9e32fc7..0000000
--- a/website/page/unsubscribe/unsubscribe.py
+++ /dev/null
@@ -1,27 +0,0 @@
-# ERPNext - web based ERP (http://erpnext.com)
-# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-from __future__ import unicode_literals
-import webnotes
-
-@webnotes.whitelist()
-def unsubscribe(arg):
- """unsubscribe from lists"""
- lists = [['Blog Subscriber', 'name']]
- for l in lists:
- webnotes.conn.sql("""delete from `tab%s` where %s=%s""" % (l[0], l[1], '%s'), arg)
-
- webnotes.msgprint('Unsubscribed!')
\ No newline at end of file
diff --git a/website/templates/css/blog_page.css b/website/templates/css/blog_page.css
index 8f56cd2..ffa45b4 100644
--- a/website/templates/css/blog_page.css
+++ b/website/templates/css/blog_page.css
@@ -1,4 +1,8 @@
<style>
+ [itemprop="articleBody"] {
+ font-size: 120%;
+ }
+
.comment-title {
color:#777;
}
diff --git a/website/templates/html/blog_footer.html b/website/templates/html/blog_footer.html
index e439d14..8a84572 100644
--- a/website/templates/html/blog_footer.html
+++ b/website/templates/html/blog_footer.html
@@ -1,12 +1,12 @@
-<div class="span12">
+<div class="col col-lg-12">
<hr />
{% if categories %}
<h5>Explore posts by categories</h5>
<ul class="breadcrumb" style="background-color: transparent; padding-left: 0px;">
{% for category in categories %}
<li><a href="blog?category={{ category }}">{{ category }}</a>
- {% if not loop.last %}<span class="divider">/</span>{% endif %}</li>
{% endfor %}
+ </ul>
<br><br>
{% endif %}
<p>Show posts by <a href="blog">everyone</a>. Meet the <a href="writers">writers</a> of this blog</p>
diff --git a/website/templates/html/blog_page.html b/website/templates/html/blog_page.html
index cf1f00e..ddb61d0 100644
--- a/website/templates/html/blog_page.html
+++ b/website/templates/html/blog_page.html
@@ -9,7 +9,7 @@
{% endblock %}
{% block content %}
-<div class="span12" itemscope itemtype="http://schema.org/BlogPost">
+<div class="col col-lg-12" itemscope itemtype="http://schema.org/BlogPost">
<h2 itemprop="name headline">{{ title }}</h2>
<!-- begin blog content -->
@@ -37,7 +37,7 @@
{% include 'app/website/templates/html/comment.html' %}
</div>
- <div><button class="btn add-comment">{{ texts.add_comment }}</button></div>
+ <div><button class="btn btn-default add-comment">{{ texts.add_comment }}</button></div>
<div style="display: none; margin-top: 10px;"
id="comment-form">
<div class="alert" style="display:none;"></div>
diff --git a/website/templates/html/blogger.html b/website/templates/html/blogger.html
index e18f86a..738fd1a 100644
--- a/website/templates/html/blogger.html
+++ b/website/templates/html/blogger.html
@@ -1,10 +1,10 @@
<div class="row">
- <div class="span2">
+ <div class="col col-lg-2">
<div class="avatar avatar-large">
<img itemprop="thumbnailUrl" src="{{ blogger_info.avatar }}" />
</div>
</div>
- <div class="span10">
+ <div class="col col-lg-10">
<h4>{{ blogger_info.full_name }}</h4>
<p style="color: #999">{{ blogger_info.bio }}</p>
<p><a href="blog?by={{ blogger_info.name }}&by_name={{ blogger_info.full_name }}">
diff --git a/website/templates/html/footer.html b/website/templates/html/footer.html
index 2f1c7fe..3161987 100644
--- a/website/templates/html/footer.html
+++ b/website/templates/html/footer.html
@@ -1,71 +1,79 @@
-<footer class="container"><div class="web-footer">
- {% if facebook_share or google_plus_one or twitter_share or linked_in_share %}
- <div class="social-icons" style="">
- <span style="font-size: 11px;">{{ share_text or "Share this page on: "}}</span>
- {% if google_plus_one %}
- <a href="https://plus.google.com/share?url={{ url }}"
- target="_blank"><i class="icon-google-plus"></i></a>
+<footer class="container">
+ <div class="web-footer row">
+ <div class="col col-lg-12">
+ {% if facebook_share or google_plus_one or twitter_share or linked_in_share %}
+ <div class="social-icons" style="">
+ <span style="font-size: 11px;">{{ share_text or "Share this page on: "}}</span>
+ {% if google_plus_one %}
+ <a href="https://plus.google.com/share?url={{ url }}"
+ target="_blank"><i class="icon-google-plus"></i></a>
+ {% endif %}
+ {% if twitter_share %}
+ <a href="https://twitter.com/intent/tweet?url={{ url }}&text={{ encoded_title }}"
+ target="_blank" ><i class="icon-twitter"></i></a>
+ {% endif %}
+ {% if facebook_share %}
+ <a href="https://www.facebook.com/sharer.php?u={{ url }}&t={{ encoded_title }}&via={{ twitter_share_via }}"
+ target="_blank"><i class="icon-facebook"></i></a>
+ {% endif %}
+ {% if linked_in_share %}
+ <a href="http://www.linkedin.com/shareArticle?mini=true&url={{ url }}&title={{ encoded_title }}"
+ target="_blank"><i class="icon-linkedin"></i></a>
+ {% endif %}
+ </div>
{% endif %}
- {% if twitter_share %}
- <a href="https://twitter.com/intent/tweet?url={{ url }}&text={{ encoded_title }}"
- target="_blank" ><i class="icon-twitter"></i></a>
+ <p style="float: right; clear: right;">
+ <a style="font-size: 90%; color: #888;" href="attributions">ERPNext Powered</a>
+ </p>
+ <div class="web-footer-menu">
+ <ul>
+ {% for item in footer_items %}
+ <li><a href="{{ item.url }}" {{ item.target }}
+ data-label="{{ item.label }}">{{ item.label }}</a></li>
+ {% endfor %}
+ </ul>
+ </div>
+ {% if copyright %}
+ <div class="web-footer-copyright">© {{ copyright }}</div>
{% endif %}
- {% if facebook_share %}
- <a href="https://www.facebook.com/sharer.php?u={{ url }}&t={{ encoded_title }}&via={{ twitter_share_via }}"
- target="_blank"><i class="icon-facebook"></i></a>
+ {% if address %}
+ {{ address }}
{% endif %}
- {% if linked_in_share %}
- <a href="http://www.linkedin.com/shareArticle?mini=true&url={{ url }}&title={{ encoded_title }}"
- target="_blank"><i class="icon-linkedin"></i></a>
- {% endif %}
- </div>
- {% endif %}
- <p style="float: right; clear: right;">
- <a style="font-size: 90%; color: #888;" href="attributions">ERPNext Powered</a>
- </p>
- <div class="web-footer-menu">
- <ul>
- {% for item in footer_items %}
- <li><a href="{{ item.url }}" {{ item.target }}
- data-label="{{ item.label }}">{{ item.label }}</a></li>
- {% endfor %}
- </ul>
- </div>
- {% if copyright %}
- <div class="web-footer-copyright">© {{ copyright }}</div>
- {% endif %}
- {% if address %}
- {{ address }}
- {% endif %}
- <p><div class="input-append" style="text-align: center; margin:30px 0px;">
- <input class="span3" id="footer-subscribe-email" type="text" placeholder="Your email address...">
- <button class="btn" type="button" id="footer-subscribe-button">Stay Updated</button>
- </div></p>
- <script>
- $("#footer-subscribe-button").click(function() {
+ <br>
+ <div class="input-group col col-lg-6 col-offset-3">
+ <input type="text" id="footer-subscribe-email" placeholder="Your email address...">
+ <span class="input-group-btn">
+ <button class="btn btn-default" type="button" id="footer-subscribe-button">Stay Updated</button>
+ </span>
+ </div>
+ <br>
+ <script>
+ $("#footer-subscribe-button").click(function() {
- $("#footer-subscribe-email").attr('disabled', true);
- $("#footer-subscribe-button").html("Sending...")
- .attr("disabled", true);
+ $("#footer-subscribe-email").attr('disabled', true);
+ $("#footer-subscribe-button").html("Sending...")
+ .attr("disabled", true);
- if($("#footer-subscribe-email").val()) {
- erpnext.send_message({
- subject:"Subscribe me",
- sender: $("#footer-subscribe-email").val(),
- message: "Subscribe to newsletter (via website footer).",
- callback: function(r) {
- if(!r.exc) {
- $("#footer-subscribe-button").html("Thank You :)")
- .addClass("btn-success").attr("disabled", true);
- } else {
- $("#footer-subscribe-button").html("Error :( Not a valid id?")
- .addClass("btn-danger").attr("disabled", false);
- $("#footer-subscribe-email").val("").attr('disabled', false);
+ if($("#footer-subscribe-email").val()) {
+ erpnext.send_message({
+ subject:"Subscribe me",
+ sender: $("#footer-subscribe-email").val(),
+ message: "Subscribe to newsletter (via website footer).",
+ callback: function(r) {
+ if(!r.exc) {
+ $("#footer-subscribe-button").html("Thank You :)")
+ .addClass("btn-success").attr("disabled", true);
+ } else {
+ $("#footer-subscribe-button").html("Error :( Not a valid id?")
+ .addClass("btn-danger").attr("disabled", false);
+ $("#footer-subscribe-email").val("").attr('disabled', false);
+ }
}
- }
- });
- }
- });
- </script>
+ });
+ }
+ });
+ </script>
+ </div>
+ </div>
</div>
</footer>
diff --git a/website/templates/html/navbar.html b/website/templates/html/navbar.html
index 55e8094..635cf34 100644
--- a/website/templates/html/navbar.html
+++ b/website/templates/html/navbar.html
@@ -1,37 +1,36 @@
<div class="navbar navbar-inverse" style="">
- <div class="navbar-inner">
- {%- if brand_html %}<a class="brand" href="index">{{ brand_html }}</a>{% endif -%}
- <div class="container">
- <button type="button" class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
- <span class="icon-bar"></span>
- <span class="icon-bar"></span>
- <span class="icon-bar"></span>
- </button>
- <div class="nav-collapse collapse">
- <ul class="nav">
- {%- for page in top_bar_items -%}
- {% if not page.parent_label -%}
- <li data-label="{{ page.label }}" {% if page.child_items %} class="dropdown"{% endif %}>
- <a href="{{ page.url or '#' }}" {% if page.child_items %} class="dropdown-toggle" onclick="return false;" data-toggle="dropdown"{% endif %} {{ page.target or ''}}>
- {{ page.label }}
- {%- if page.child_items -%}
- <b class="caret"></b>
- </a>
- <ul class="dropdown-menu">
- {%- for child in page.child_items -%}
- <li data-label="{{ child.label }}">
- <a {% if child.indent %} style="padding-left: {{(int(child.indent)+1)*15 }}px"{% endif %} href="{{ child.url }}" {{ child.target or '' }}>{{ child.label }}</a>
- </li>
- {%- endfor -%}
- </ul>
- {%- else -%}
- </a>
- {%- endif -%}
- </li>
+ {%- if brand_html %}<a class="navbar-brand" href="index">{{ brand_html }}</a>{% endif -%}
+ <div class="container">
+ <button type="button" class="navbar-toggle" data-toggle="collapse"
+ data-target=".navbar-responsive-collapse">
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ </button>
+ <div class="nav-collapse collapse navbar-responsive-collapse">
+ <ul class="nav navbar-nav">
+ {%- for page in top_bar_items -%}
+ {% if not page.parent_label -%}
+ <li data-label="{{ page.label }}" {% if page.child_items %} class="dropdown"{% endif %}>
+ <a href="{{ page.url or '#' }}" {% if page.child_items %} class="dropdown-toggle" onclick="return false;" data-toggle="dropdown"{% endif %} {{ page.target or ''}}>
+ {{ page.label }}
+ {%- if page.child_items -%}
+ <b class="caret"></b>
+ </a>
+ <ul class="dropdown-menu">
+ {%- for child in page.child_items -%}
+ <li data-label="{{ child.label }}">
+ <a {% if child.indent %} style="padding-left: {{(int(child.indent)+1)*15 }}px"{% endif %} href="{{ child.url }}" {{ child.target or '' }}>{{ child.label }}</a>
+ </li>
+ {%- endfor -%}
+ </ul>
+ {%- else -%}
+ </a>
{%- endif -%}
- {%- endfor %}
- </ul>
- </div>
+ </li>
+ {%- endif -%}
+ {%- endfor %}
+ </ul>
</div>
</div>
</div>
diff --git a/website/templates/html/outer.html b/website/templates/html/outer.html
index 570c769..ec71476 100644
--- a/website/templates/html/outer.html
+++ b/website/templates/html/outer.html
@@ -7,7 +7,7 @@
</div>
<div class="clearfix"></div>
{% if banner_html %}<div class="row" style="margin-top: 30px;">
- <div class="span12">{{ banner_html }}</div>
+ <div class="col col-lg-12">{{ banner_html }}</div>
</div>{% endif %}
<div class="outer">
{% include "app/website/templates/html/navbar.html" %}
diff --git a/website/templates/html/product_breadcrumbs.html b/website/templates/html/product_breadcrumbs.html
index 0b026e7..3cd501e 100644
--- a/website/templates/html/product_breadcrumbs.html
+++ b/website/templates/html/product_breadcrumbs.html
@@ -1,9 +1,9 @@
{% if obj.parent_groups and len(obj.parent_groups) > 1 %}
-<div class="span12">
+<div class="col col-lg-12">
<div class="clearfix">
<ul class="breadcrumb">
{% for ig in obj.parent_groups[:-1] %}
- <li><a href="{{ ig.page_name }}.html">{{ ig.name }}</a> <span class="divider">/</span></li>
+ <li><a href="{{ ig.page_name }}.html">{{ ig.name }}</a></li>
{% endfor %}
<li class="active">{{ obj.parent_groups[-1].name }}</li>
</ul>
diff --git a/website/templates/html/product_group.html b/website/templates/html/product_group.html
index 0ad4048..54a55af 100644
--- a/website/templates/html/product_group.html
+++ b/website/templates/html/product_group.html
@@ -1,7 +1,9 @@
{% extends "app/website/templates/html/page.html" %}
{% block content %}
-<div class="span12">
+{% include 'app/website/templates/html/product_search_box.html' %}
+{% include 'app/website/templates/html/product_breadcrumbs.html' %}
+<div class="col col-lg-12">
{% if slideshow %}<!-- slideshow -->
{% include "app/website/templates/html/slideshow.html" %}
{% endif %}
@@ -11,14 +13,12 @@
<h3>{{ name }}</h3>
{% endif %}
</div>
-{% include 'app/website/templates/html/product_search_box.html' %}
-{% include 'app/website/templates/html/product_breadcrumbs.html' %}
-<div class="span12">
+<div class="col col-lg-12">
{% if sub_groups %}
<hr />
<div class="row">
{% for d in sub_groups %}
- <div class="span4">
+ <div class="col col-lg-4">
<a href="{{ d.page_name }}">{{ d.name }} ({{ d.count }})</a>
</div>
{% endfor %}
diff --git a/website/templates/html/product_in_list.html b/website/templates/html/product_in_list.html
index 5cd9eac..e9752b3 100644
--- a/website/templates/html/product_in_list.html
+++ b/website/templates/html/product_in_list.html
@@ -1,4 +1,4 @@
-<div class="span3">
+<div class="col col-lg-3">
<div style="height: 120px; overflow: hidden;">
<a href="{{ page_name }}">
{%- if website_image -%}
diff --git a/website/templates/html/product_page.html b/website/templates/html/product_page.html
index 3fda8cd..263159f 100644
--- a/website/templates/html/product_page.html
+++ b/website/templates/html/product_page.html
@@ -11,9 +11,9 @@
{% block content %}
{% include 'app/website/templates/html/product_search_box.html' %}
{% include 'app/website/templates/html/product_breadcrumbs.html' %}
- <div class="span12 product-page-content" itemscope itemtype="http://schema.org/Product">
+ <div class="col col-lg-12 product-page-content" itemscope itemtype="http://schema.org/Product">
<div class="row">
- <div class="span6">
+ <div class="col col-lg-6">
{% if slideshow %}
{% include "app/website/templates/html/slideshow.html" %}
{% else %}
@@ -27,7 +27,7 @@
{% endif %}
{% endif %}
</div>
- <div class="span6">
+ <div class="col col-lg-6">
<h3 itemprop="name" style="margin-top: 0px;">{{ item_name }}</h3>
<p class="help">Item Code: {{ name }}</p>
<h4>Product Description</h4>
@@ -41,7 +41,7 @@
</div>
{% if obj.doclist.get({"doctype":"Item Website Specification"}) -%}
<div class="row" style="margin-top: 20px">
- <div class="span12">
+ <div class="col col-lg-12">
<h4>Specifications</h4>
<table class="table table-bordered" style="width: 100%">
{% for d in obj.doclist.get(
diff --git a/website/templates/html/product_search_box.html b/website/templates/html/product_search_box.html
index 3b3a95a..29564f3 100644
--- a/website/templates/html/product_search_box.html
+++ b/website/templates/html/product_search_box.html
@@ -1,11 +1,12 @@
-<div class="span12 clearfix">
- <div class="pull-right" style="margin-top: 15px;">
+<div class="col col-lg-12 clearfix">
+ <div class="pull-right" style="margin-top: 15px; margin-bottom: 15px;">
<form class="form-search">
- <div class="input-append">
- <input type="text" class="span2 search-query"
- id="product-search" placeholder="Product Search..." />
- <button class="btn" id="btn-product-search">
- <i class="icon-search"></i></button>
+ <div class="input-group col col-lg-4 col-offset-8">
+ <input type="text" id="product-search" placeholder="Product Search...">
+ <span class="input-group-btn">
+ <button class="btn btn-default" type="button" id="btn-product-search">
+ <i class="icon-search"></i></button>
+ </span>
</div>
</form>
</div>
diff --git a/website/templates/html/slideshow.html b/website/templates/html/slideshow.html
index b26338c..b148cb1 100644
--- a/website/templates/html/slideshow.html
+++ b/website/templates/html/slideshow.html
@@ -1,6 +1,17 @@
{% if slideshow %}
{{ slideshow_header }}
-<div id="myCarousel" class="carousel slide">
+
+
+<div id="the-carousel" class="carousel slide">
+ <!-- Indicators -->
+ <ol class="carousel-indicators">
+ {% for slide in obj.slides %}
+ <li data-target="#the-carousel" data-slide-to="0"
+ {%- if loop.index==0 %}class="active"{% endif %}></li>
+ {% endfor %}
+ </ol>
+
+ <!-- Wrapper for slides -->
<div class="carousel-inner">
{% for slide in obj.slides %}
<div class="{% if slide.idx==1 %}active {% endif %}item">
@@ -14,10 +25,15 @@
</div>
{% endfor %}
</div>
- <a class="carousel-control left" href="#myCarousel"
- data-slide="prev">‹</a>
- <a class="carousel-control right" href="#myCarousel"
- data-slide="next">›</a>
- </div>
- <script>$(".carousel").carousel();</script>
+
+ <!-- Controls -->
+ <a class="left carousel-control" href="#the-carousel" data-slide="prev">
+ <span class="icon icon-chevron-left"></span>
+ </a>
+ <a class="right carousel-control" href="#the-carousel" data-slide="next">
+ <span class="icon icon-chevron-right"></span>
+ </a>
+</div>
+
+<script>$(".carousel").carousel();</script>
{% endif %}
diff --git a/website/templates/html/web_page.html b/website/templates/html/web_page.html
index 6b8c914..4711e58 100644
--- a/website/templates/html/web_page.html
+++ b/website/templates/html/web_page.html
@@ -7,7 +7,7 @@
{% endblock %}
{% block content %}
-<div class="span12" style="margin-top: 15px;">
+<div class="col col-lg-12" style="margin-top: 15px;">
{% include "app/website/templates/html/slideshow.html" %}
{{ main_section }}
</div>
diff --git a/website/templates/js/blog.js b/website/templates/js/blog.js
index fd5a156..2154d47 100644
--- a/website/templates/js/blog.js
+++ b/website/templates/js/blog.js
@@ -69,12 +69,12 @@
b.page_name = encodeURIComponent(b.page_name);
$(repl('<div class="row">\
- <div class="span1">\
+ <div class="col col-lg-1">\
<div class="avatar avatar-medium" style="margin-top: 6px;">\
<img src="%(avatar)s" />\
</div>\
</div>\
- <div class="span11">\
+ <div class="col col-lg-11">\
<h4><a href="%(page_name)s">%(title)s</a></h4>\
<p>%(content)s</p>\
<p style="color: #aaa; font-size: 90%">\
@@ -87,7 +87,7 @@
if(!data.length || data.length < 20) {
if(blog.start) {
$("#next-page").toggle(false)
- .parent().append("<div class='alert alert-info'>Nothing more to show.</div>");
+ .parent().append("<div class='text-muted'>Nothing more to show.</div>");
} else {
$("#next-page").toggle(false)
.parent().append("<div class='alert'>No blogs written yet.</div>");
diff --git a/website/templates/js/product_list.js b/website/templates/js/product_list.js
index f8f21b3..6873973 100644
--- a/website/templates/js/product_list.js
+++ b/website/templates/js/product_list.js
@@ -40,7 +40,7 @@
.replaceWith("<div class='alert'>No products found.</div>");
} else {
$(".more-btn")
- .replaceWith("<div class='alert'>Nothing more to show.</div>");
+ .replaceWith("<div class='text-muted'>Nothing more to show.</div>");
}
} else {
$(".more-btn").toggle(true)
diff --git a/website/templates/pages/about.html b/website/templates/pages/about.html
index 0cbd562..2f4f6e4 100644
--- a/website/templates/pages/about.html
+++ b/website/templates/pages/about.html
@@ -3,14 +3,14 @@
{% set title="About Us" %}
{% block content %}
-<div class="span12">
+<div class="col col-lg-12">
{{ obj.doc.company_introduction or "<h2>About Us</h2><p>Some Introduction about your company that you would like your website visitor to know. More people than you think will read your About page. People always like to know who the are doing business with. Be authentic and avoid using jargon like 'value added services' etc. Be sure to update your company history and list of key team members in Website > About Us Settings</p>" }}
{% if obj.doclist.get({"doctype":"Company History"}) %}
<h3>{{ obj.doc.company_history_heading or "Company History" }}</h3>
{% for d in obj.doclist.get({"doctype":"Company History"}) %}
<div class="row">
- <span class="span2"><h4 style="margin:0px;">{{ d.year }}</h4></span>
- <span class="span10"><p>{{ d.highlight }}</p></span>
+ <span class="col col-lg-2"><h4 style="margin:0px;">{{ d.year }}</h4></span>
+ <span class="col col-lg-10"><p>{{ d.highlight }}</p></span>
</div>
{% endfor %}
{% endif %}
@@ -18,12 +18,12 @@
<h3>{{ obj.doc.team_members_heading or "Team Members" }}</h3>
{% for d in obj.doclist.get({"doctype":"About Us Team Member"}) %}
<div class="row" itemscope itemtype="http://schema.org/Person">
- <span class="span2">
+ <span class="col col-lg-2">
<div class="avatar avatar-large">
<img class="avatar" src="{{ d.image_link }}" style="" itemprop="image">
</div>
</span>
- <span class="span10"><h4 itemprop="name">{{ d.full_name }}</h4>
+ <span class="col col-lg-10"><h4 itemprop="name">{{ d.full_name }}</h4>
<p itemprop="description">{{ d.bio }}</p>
</span>
</div>
diff --git a/website/templates/pages/account.html b/website/templates/pages/account.html
index fe2b858..f6992e1 100644
--- a/website/templates/pages/account.html
+++ b/website/templates/pages/account.html
@@ -3,7 +3,7 @@
{% set title="My Account" %}
{% block content %}
-<div class="span12">
+<div class="col col-lg-12">
<ul class="breadcrumb">
<li><a href="index">Home</a> <span class="divider">/</span></li>
<li class="active">My Account</li>
diff --git a/website/templates/pages/attributions.html b/website/templates/pages/attributions.html
index 05e8e88..0f534a4 100644
--- a/website/templates/pages/attributions.html
+++ b/website/templates/pages/attributions.html
@@ -11,7 +11,7 @@
{% set title="ERPNext - Web Based, Open Source ERP" %}
{% block content %}
-<div class="layout-attributions span12">
+<div class="layout-attributions col col-lg-12">
<h3>This website is made using these awesome Open Source projects <i class="icon-heart" style="color: red"></i></h3>
<hr>
<table class="table table-bordered table-striped">
diff --git a/website/templates/pages/blog.html b/website/templates/pages/blog.html
index 7483c7c..fcb542b 100644
--- a/website/templates/pages/blog.html
+++ b/website/templates/pages/blog.html
@@ -11,7 +11,7 @@
{% set title="Blog" %}
{% block content %}
-<div class="span12">
+<div class="col col-lg-12">
<h2 id="blog-title">{{ blog_title }}</h2>
{% if blog_introduction %}
<p>{{ blog_introduction }}</p>
@@ -25,7 +25,7 @@
<!-- blog list will be generated dynamically -->
</div>
<div style="text-align: center;">
- <button id="next-page" class="btn"
+ <button id="next-page" class="btn btn-default"
style="display:none;">More...</button>
</div>
</div>
diff --git a/website/templates/pages/contact.html b/website/templates/pages/contact.html
index b9b3cd7..113b627 100644
--- a/website/templates/pages/contact.html
+++ b/website/templates/pages/contact.html
@@ -7,28 +7,32 @@
{% set title="Contact Us" %}
{% block content %}
-<div class="span12">
+<div class="col col-lg-12">
<h3>{{ obj.doc.heading or "Contact Us"}}</h3>
<div class="row">
- <div class="web-form span8">
- <div class="row">
- <div class="span6">
- <p id="contact-alert" class="alert"
- style="display: none;"> </p>
- </div>
- </div>
- <div class="clearfix"></div>
- <p><select class="span6" name="subject">
+ <div class="web-form col col-lg-8">
+ <p id="contact-alert" class="alert"
+ style="display: none;"> </p>
+ <p>
+ <select name="subject">
{% for option in obj.query_options %}
<option value="{{ option }}">{{ option }}</option>
{% endfor %}
- </select></p>
- <p><input class="span6" name="email" type="text" placeholder="Your Email Address" /></p>
- <p><textarea class="span6" rows="10" name="message"></textarea></p>
- <p><button class="btn btn-primary btn-send">Send</button></p>
+ </select>
+ </p>
+ <p>
+ <input name="email" type="text"
+ placeholder="Your Email Address" />
+ </p>
+ <p>
+ <textarea rows="10" name="message"></textarea>
+ </p>
+ <p>
+ <button class="btn btn-primary btn-send">Send</button>
+ </p>
</div>
{% if obj.doc.address %}
- <div class="span3 alert" style="margin-top: 20px;" itemscope itemtype="http://schema.org/PostalAddress">
+ <div class="col col-lg-3 col-offset-1 alert" style="margin-top: 20px;" itemscope itemtype="http://schema.org/PostalAddress">
<h4><i class="icon-map-marker"></i> {{ obj.address.address_title }}</h4>
{% if obj.address.address_line1 %}
<span itemprop="streetAddress">{{ obj.address.address_line1 }}</span><br>
diff --git a/website/templates/pages/order.html b/website/templates/pages/order.html
index 8e7bfe7..2588d39 100644
--- a/website/templates/pages/order.html
+++ b/website/templates/pages/order.html
@@ -3,7 +3,7 @@
{% set title=doc.name %}
{% block content %}
-<div class="span12">
+<div class="col col-lg-12">
<ul class="breadcrumb">
<li><a href="index">Home</a> <span class="divider">/</span></li>
<li><a href="account">My Account</a> <span class="divider">/</span></li>
@@ -15,16 +15,16 @@
{%- if doc.status -%}
<div style="font-size: 13px;">
<div class="row">
- <div class="span2">
+ <div class="col col-lg-2">
<div class="label">{{ doc.status }}</div>
</div>
- <div class="span4">
+ <div class="col col-lg-4">
{{ utils.formatdate(doc.transaction_date) }}
</div>
</div>
<br>
<div class="row">
- <div class="span12">
+ <div class="col col-lg-12">
<table class="table table-bordered">
<tbody>
<tr>
@@ -52,8 +52,8 @@
</div>
</div>
<div class="row">
- <div class="span6"></div>
- <div class="span6">
+ <div class="col col-lg-6"></div>
+ <div class="col col-lg-6">
<table cellspacing=0 width=100%>
<tbody>
<tr>
diff --git a/website/templates/pages/orders.html b/website/templates/pages/orders.html
index 0c93a68..b5b0dd9 100644
--- a/website/templates/pages/orders.html
+++ b/website/templates/pages/orders.html
@@ -8,7 +8,7 @@
currency = "{{ currency }}";
wn.currency_symbols = {{ currency_symbols }};
</script>
-<div class="span12">
+<div class="col col-lg-12">
<ul class="breadcrumb">
<li><a href="index">Home</a> <span class="divider">/</span></li>
<li><a href="account">My Account</a> <span class="divider">/</span></li>
@@ -44,8 +44,8 @@
// parent
var $order = $(repl('<div class="row">\
- <div class="span3"><a href="order?name=%(name)s">%(name)s</a></div>\
- <div class="span9"></div>\
+ <div class="col col-lg-3"><a href="order?name=%(name)s">%(name)s</a></div>\
+ <div class="col col-lg-9"></div>\
</div>', order)).appendTo($list);
// items
@@ -53,12 +53,12 @@
item.export_rate = format_currency(item.export_rate, order.currency);
item.export_amount = format_currency(item.export_amount, order.currency);
var $item = $(repl('<div class="row">\
- <div class="span3">%(item_name)s</div>\
- <div class="span2" style="text-align: right;">%(export_rate)s</div>\
- <div class="span2" style="text-align: right;">%(qty)s %(stock_uom)s</div>\
- <div class="span2" style="text-align: right;">%(export_amount)s</div>\
+ <div class="col col-lg-3">%(item_name)s</div>\
+ <div class="col col-lg-2" style="text-align: right;">%(export_rate)s</div>\
+ <div class="col col-lg-2" style="text-align: right;">%(qty)s %(stock_uom)s</div>\
+ <div class="col col-lg-2" style="text-align: right;">%(export_amount)s</div>\
</div>\
- </div>', item)).appendTo($order.find(".span9"));
+ </div>', item)).appendTo($order.find(".col col-lg-9"));
});
$("<hr>").appendTo($list);
diff --git a/website/templates/pages/product_search.html b/website/templates/pages/product_search.html
index 2dab6ff..4711408 100644
--- a/website/templates/pages/product_search.html
+++ b/website/templates/pages/product_search.html
@@ -18,7 +18,7 @@
</script>
{% include 'app/website/templates/html/product_search_box.html' %}
-<div class="span12">
+<div class="col col-lg-12">
<h3 class="search-results">Search Results</h3>
<div id="search-list" class="row">
diff --git a/website/templates/pages/profile.html b/website/templates/pages/profile.html
index d689cfb..40d6a19 100644
--- a/website/templates/pages/profile.html
+++ b/website/templates/pages/profile.html
@@ -3,7 +3,7 @@
{% set title="My Profile" %}
{% block content %}
-<div class="span12">
+<div class="col col-lg-12">
<ul class="breadcrumb">
<li><a href="index">Home</a> <span class="divider">/</span></li>
<li><a href="account">My Account</a> <span class="divider">/</span></li>
diff --git a/website/templates/pages/ticket.html b/website/templates/pages/ticket.html
index 858dd3b..5835246 100644
--- a/website/templates/pages/ticket.html
+++ b/website/templates/pages/ticket.html
@@ -3,7 +3,7 @@
{% set title=doc.name %}
{% block content %}
-<div class="span12">
+<div class="col col-lg-12">
<ul class="breadcrumb">
<li><a href="index">Home</a> <span class="divider">/</span></li>
<li><a href="account">My Account</a> <span class="divider">/</span></li>
@@ -14,13 +14,13 @@
<hr>
{%- if doc.status -%}
<div class="row">
- <div class="span2">
+ <div class="col col-lg-2">
<div class="label">{{ doc.status }}</div>
</div>
- <div class="span7">
+ <div class="col col-lg-7">
{{ doc.subject }}
</div>
- <div class="span3">
+ <div class="col col-lg-3">
{{ utils.formatdate(doc.transaction_date) }}
</div>
</div>
diff --git a/website/templates/pages/tickets.html b/website/templates/pages/tickets.html
index 843d10e..27881ef 100644
--- a/website/templates/pages/tickets.html
+++ b/website/templates/pages/tickets.html
@@ -3,7 +3,7 @@
{% set title="My Tickets" %}
{% block content %}
-<div class="span12">
+<div class="col col-lg-12">
<ul class="breadcrumb">
<li><a href="index">Home</a> <span class="divider">/</span></li>
<li><a href="account">My Account</a> <span class="divider">/</span></li>
@@ -39,9 +39,9 @@
// parent
var $ticket = $(repl('<div class="row">\
- <div class="span2"><span class="label">%(status)s</span></div>\
- <div class="span3"><a href="ticket?name=%(name)s">%(name)s</a></div>\
- <div class="span7">%(subject)s</div>\
+ <div class="col col-lg-2"><span class="label">%(status)s</span></div>\
+ <div class="col col-lg-3"><a href="ticket?name=%(name)s">%(name)s</a></div>\
+ <div class="col col-lg-7">%(subject)s</div>\
</div>', ticket)).appendTo($list);
$("<hr>").appendTo($list);
diff --git a/website/templates/pages/writers.html b/website/templates/pages/writers.html
index 67c0b7e..9d660b8 100644
--- a/website/templates/pages/writers.html
+++ b/website/templates/pages/writers.html
@@ -3,7 +3,7 @@
{% set title="Blog Writers" %}
{% block content %}
-<div class="span12">
+<div class="col col-lg-12">
<h2 id="blog-title">Blog Writers</h2>
{% if writers_introduction %}
<p>{{ writers_introduction }}</p>