removed slider ui
diff --git a/css/all-app.css b/css/all-app.css
index 25f02ed..6ef5847 100644
--- a/css/all-app.css
+++ b/css/all-app.css
@@ -114,7 +114,6 @@
 }
 
 div#body_div {
-	position: relative;
 	display: none;
 	padding-right: 7px;
 	width: 900px;
@@ -125,12 +124,6 @@
 .content {
 	width: 900px;
 	margin-bottom: 30px;
-	position: absolute;
-	-webkit-transition:all 0.5s ease-in-out;
-	-moz-transition:all 0.5s ease-in-out;
-	-o-transition:all 0.5s ease-in-out;
-	-ms-transition:all 0.5s ease-in-out;	
-	transition:all 0.5s ease-in-out;
 }
 
 .background-fade-in {
@@ -140,25 +133,6 @@
     transition: background 1s ease-in;
 }
 
-/* selector for open pages */
-#opened-page-selector {
-	width: 900px;
-	height: 900px;
-	position: absolute;
-	z-index: 100;
-	opacity: 0;
-	background-color: #bdf;
-}
-
-#opened-page-selector.active {
-	opacity: 0.6;
-	cursor: pointer;
-}
-
-.popover-container {
-	height: 400px;
-}
-
 footer {
 	position: absolute;
 	bottom: 0px;
@@ -3505,7 +3479,7 @@
 }
 
 body {
-	background: url(../images/stripedbg.png) repeat;
+	background: url(../lib/images/ui/redbeech.jpg) repeat;
 }
 
 .small {
diff --git a/css/all-web.css b/css/all-web.css
index 89ee1bb..a6c3429 100644
--- a/css/all-web.css
+++ b/css/all-web.css
@@ -114,7 +114,6 @@
 }
 
 div#body_div {
-	position: relative;
 	display: none;
 	padding-right: 7px;
 	width: 900px;
@@ -125,12 +124,6 @@
 .content {
 	width: 900px;
 	margin-bottom: 30px;
-	position: absolute;
-	-webkit-transition:all 0.5s ease-in-out;
-	-moz-transition:all 0.5s ease-in-out;
-	-o-transition:all 0.5s ease-in-out;
-	-ms-transition:all 0.5s ease-in-out;	
-	transition:all 0.5s ease-in-out;
 }
 
 .background-fade-in {
@@ -140,25 +133,6 @@
     transition: background 1s ease-in;
 }
 
-/* selector for open pages */
-#opened-page-selector {
-	width: 900px;
-	height: 900px;
-	position: absolute;
-	z-index: 100;
-	opacity: 0;
-	background-color: #bdf;
-}
-
-#opened-page-selector.active {
-	opacity: 0.6;
-	cursor: pointer;
-}
-
-.popover-container {
-	height: 400px;
-}
-
 footer {
 	position: absolute;
 	bottom: 0px;
@@ -1645,7 +1619,7 @@
 }
 
 body {
-	background: url(../images/stripedbg.png) repeat;
+	background: url(../lib/images/ui/redbeech.jpg) repeat;
 }
 
 .small {
diff --git a/erpnext/accounts/Print Format/POS Invoice/POS Invoice.txt b/erpnext/accounts/Print Format/POS Invoice/POS Invoice.txt
index 6a7e835..8664b38 100644
--- a/erpnext/accounts/Print Format/POS Invoice/POS Invoice.txt
+++ b/erpnext/accounts/Print Format/POS Invoice/POS Invoice.txt
@@ -3,25 +3,26 @@
 
 	# These values are common in all dictionaries
 	{
-		'creation': '2011-10-19 14:27:47',
+		'creation': '2011-12-21 11:08:55',
 		'docstatus': 0,
-		'modified': '2011-10-19 14:29:45',
-		'modified_by': 'Administrator',
-		'owner': 'Administrator'
+		'modified': '2012-03-20 12:29:49',
+		'modified_by': u'Administrator',
+		'owner': u'Administrator'
 	},
 
 	# These values are common for all Print Format
 	{
+		'doc_type': u'Receivable Voucher',
 		'doctype': 'Print Format',
-		'html': '<html>\n<head>\n<!--Other charges function-->\n<script>\n    var make_row = function(title,val,bold){\n    var bstart = \'<b>\'; var bend = \'</b>\';\n    return \'<tr><td style="width:50%">\'+(bold?bstart:\'\')+title+(bold?bend:\'\')+\'</td>\'\n              +\'<td style="width:20%">\'+doc.currency+\'</td>\'\n              +\'<td style="width:30%;text-align:right">\'+(val?val:\'0.00\')+\'</td>\'\n              +\'</tr>\'\n  }\n  var make_row1 = function(title,val,bold){\n    var bstart = \'<b>\'; var bend = \'</b>\';\n    \n    return \'<tr style="font-family:courier new; line-height:150%"><td style="width:50%">\'+(bold?bstart:\'\')+title+(bold?bend:\'\')+\'</td>\'\n              +\'<td style="width:50%;text-align:right">\'+(bold?bstart:\'\')+(val?val:\'0.00\')+(bold?bend:\'\')+\'</td>\'\n              +\'</tr>\'\n  }\n\nfunction get_letter_head() {\n\t// add letter head\n\tvar cp = locals[\'Control Panel\'][\'Control Panel\'];\n\tif(doc.letter_head)\n\t\tvar lh= cstr(_p.letter_heads[doc.letter_head]);\n\telse if(cp.letter_head)\n\t\tvar lh= cp.letter_head;\n\telse \n\t\tvar lh= \'\';\n\t\t\n\treturn lh;\n}\n\n  function get_tax_details(){\n  \n    var cl = getchildren(\'RV Tax Detail\',doc.name,\'other_charges\');\n    var out = \'\';\n\n//    if(cl.length){\n      out += \'<div><table style="float: right;">\';\n      for(var i=0;i<cl.length;i++){\n        out += make_row1(cl[i].description,fmt_money(convert_rate(cl[i].tax_amount)),0);\n      }\n\n        out += make_row1(\'TOTAL\',fmt_money(doc.grand_total),1);\n  //  }\n    out +=\'</table></div>\';\n    return out;\n  }\n  function get_other_charges(){\n    var out =\'\';\n    out += \'<div><table cssClass="noborder" style="width:100%">\';\n    \n    out += make_row(\'Net Total\',fmt_money(convert_rate(doc.net_total)),1)\n          +make_row(\'Total Taxes\',fmt_money(convert_rate(doc.other_charges_total)),0)\n          +make_row(\'Grand Total\',fmt_money(convert_rate(doc.grand_total)),1)\n          +make_row(\'Rounded Total\',fmt_money(convert_rate(doc.rounded_total)),1)\n          +make_row(\'Outstanding Amount\',fmt_money(convert_rate(doc.outstanding_amount)),1)\n    out += \'</table></div>\';\n    return out;\n  }\n\n  \n  function convert_rate(val){    \n    var new_val = flt(val)/flt(doc.conversion_rate);\n    return new_val;\n  }\n  \n</script>\n</head>\n<body>\n\n<div><script>get_letter_head()</script></div>\n<table width="100%" style="font-family: courier new; line-height:200%">\n<tr>\n<td align="left">NO: <script>doc.name</script></td>\n<td align="right">DATE: <script>date.str_to_user(doc.voucher_date)</script></td>\n</tr>\n<tr>\n<td>M/s <script>doc.contact_display</script></td>\n</tr>\n</table>\n<!--Item Table-->\n<div>\n    <script>\n    var t = print_table(\'Receivable Voucher\', doc.name, \'entries\', \'RV Detail\', [\'description\',\'qty\',\'basic_rate\',\'amount\'], [\'ITEM\', \'QTY\',\'RATE\',\'AMOUNT\'], [\'35%\',\'20%\',\'20%\',\'25%\'])\n    if(t.appendChild) {\n      // single\n      out = t.innerHTML.replace(/border: 1px/gi,\'border: 0px\').replace(/style="/gi,\'style="font-family:courier new;line-height:150%;\');\n    }\n    else {//multiple\n      out = \'<table class="None" border="0px" width="100%" style="border:0px; font-family:courier-new">\';\n\n      for(var i=0;i<t.length;i++) \n      {\n\t\tif(i==0)\n\t\t{\n\t\t\tout+=\'<tr>\'+t[i].childNodes[0].childNodes[0].childNodes[0].innerHTML.replace(/style="border: 1px solid rgb\\(0, 0, 0\\);/gi,\'style="font-family:courier new;\')+\'</tr>\'\n\t\t}\n\t\tout+=\'<tr>\'+t[i].childNodes[0].childNodes[0].childNodes[1].innerHTML.replace(/style="border: 1px solid rgb\\(0, 0, 0\\);/gi,\'style="font-family:courier new;\')+\'</tr>\'\n      }\n\tout += \'</table>\'\n    }\n    out;\n    </script>\n\n</div>\n\n<!--Tax table-->\n<div><script>get_tax_details();</script>\n    </table>\n</div>\n\n<br>\n<table style="font-family:courier new;">\n<tr><td><b><script>doc.terms</script></b></td></tr>\n<tr><td nowrap><b>For <script>doc.company</script></b></td></tr>\n<tr><td>&nbsp;</td></tr>\n<tr><td nowrap><b>Signatory</b></td></tr>\n</table>\n</body>\n</html>',
-		'module': 'Accounts',
+		'html': u'<html>\n<head>\n<!--Other charges function-->\n<script>\nvar make_row = function(title,val,bold){\nvar bstart = \'<b>\'; var bend = \'</b>\';\nreturn \'<tr><td style="width:50%">\'+(bold?bstart:\'\')+title+(bold?bend:\'\')+\'</td>\'\n        +\'<td style="width:20%">\'+doc.currency+\'</td>\'\n        +\'<td style="width:30%;text-align:right">\'+(val?val:\'0.00\')+\'</td>\'\n        +\'</tr>\'\n}\nvar make_row1 = function(title,val,bold){\n    var bstart = \'<b>\'; var bend = \'</b>\';\n    \n    return \'<tr style="font-family:courier new; line-height:150%"><td style="width:50%">\'+(bold?bstart:\'\')+title+(bold?bend:\'\')+\'</td>\'\n            +\'<td style="width:50%;text-align:right">\'+(bold?bstart:\'\')+(val?val:\'0.00\')+(bold?bend:\'\')+\'</td>\'\n            +\'</tr>\'\n}\n\nfunction get_letter_head() {\n    // add letter head\n    var cp = wn.boot.control_panel;\n    if(doc.letter_head)\n        var lh= cstr(_p.letter_heads[doc.letter_head]);\n    else if(cp.letter_head)\n        var lh= cp.letter_head;\n    else \n        var lh= \'\';\n        \n    return lh;\n}\n\nfunction get_tax_details(){\n    var cl = getchildren(\'RV Tax Detail\',doc.name,\'other_charges\');\n    var out = \'\';\n\n    out += \'<div><table style="float: right;">\';\n    for(var i=0;i<cl.length;i++){\n        if(cl[i].tax_amount) {\n            out += make_row1(cl[i].description,fmt_money(convert_rate(cl[i].tax_amount)),0);\n        }\n    }\n    out += make_row1(\'TOTAL\',doc.currency + " " + fmt_money(convert_rate(doc.grand_total)),1);\n    out +=\'</table></div>\';\n    return out;\n}\n\nfunction convert_rate(val){    \n    var new_val = flt(val)/flt(doc.conversion_rate);\n    return new_val;\n}\n</script>\n<style>\n    table, td, tr, div, span {\n        font-family: courier new;\n        line-height: 200%;\n    }\n</style>\n</head>\n\n<body>\n<table width="100%" style="font-family: courier new; line-height:200%">\n<tr>\n    <td align="left">NO: <script>doc.name</script></td>\n    <td align="right">DATE: <script>date.str_to_user(doc.posting_date)</script></td>\n</tr>\n<tr>\n    <td>M/s <script>doc.contact_display</script></td>\n</tr>\n</table>\n<!--Item Table-->\n<div>\n<script>\nvar t = print_table(\'Receivable Voucher\', doc.name, \'entries\', \'RV Detail\',\n        [\'description\',\'qty\',\'export_rate\',\'export_amount\'], [\'ITEM\', \'QTY\',\'RATE\',\'AMOUNT\'],\n        [\'35%\',\'20%\',\'20%\',\'25%\']);\nif(t.appendChild) { // single\n    out = t.innerHTML.replace(/style="/gi,\'style="font-family:courier new;line-height:150%;\');\n} else { //multiple\n    out = \'<table class="None" border="0px" width="100%" style="border:0px; font-family:courier-new">\';\n\n    for(var i=0;i<t.length;i++) {\n        if(i==0) {\n            out += \'<tr>\' + t[i].childNodes[0].childNodes[0].childNodes[0].innerHTML\n                .replace(/style="border: 1px solid rgb\\(0, 0, 0\\);/gi,\'style="font-family:courier new;\')\n                + \'</tr>\';\n        }\n        out += \'<tr>\' + t[i].childNodes[0].childNodes[0].childNodes[1].innerHTML\n                .replace(/style="border: 1px solid rgb\\(0, 0, 0\\);/gi,\'style="font-family:courier new;\')\n                + \'</tr>\';\n    }\n    out += \'</table>\';\n}\nout;\n</script>\n</div>\n<!--Tax table-->\n<div><script>get_tax_details();</script></div><br />\n<table style="font-family:courier new;">\n    <tr><td><b><script>doc.terms</script></b></td></tr>\n    <tr><td nowrap><b>For <script>doc.company</script></b></td></tr>\n    <tr><td>&nbsp;</td></tr>\n    <tr><td nowrap><b>Signatory</b></td></tr>\n</table>\n</body>\n</html>\n',
+		'module': u'Accounts',
 		'name': '__common__',
-		'standard': 'Yes'
+		'standard': u'Yes'
 	},
 
 	# Print Format, POS Invoice
 	{
 		'doctype': 'Print Format',
-		'name': 'POS Invoice'
+		'name': u'POS Invoice'
 	}
 ]
\ No newline at end of file
diff --git a/erpnext/accounts/doctype/gl_control/gl_control.py b/erpnext/accounts/doctype/gl_control/gl_control.py
index 93bef5d..fa98441 100644
--- a/erpnext/accounts/doctype/gl_control/gl_control.py
+++ b/erpnext/accounts/doctype/gl_control/gl_control.py
@@ -560,10 +560,12 @@
 			<table cellspacing= "5" cellpadding="5"  width = "100%%">
 				<tr>
 					<td width = "50%%"><b>Customer</b><br>%s<br>%s</td>
-					<td width = "50%%">Invoice Date: %s<br>Due Date: %s</td>
+					<td width = "50%%">Invoice Date	   : %s<br>Invoice Period : %s to %s <br>Due Date	   : %s</td>
 				</tr>
 			</table>
-		''' % (com, new_rv.doc.name, new_rv.doc.customer, new_rv.doc.address_display, new_rv.doc.posting_date, new_rv.doc.due_date)
+		''' % (com, new_rv.doc.name, new_rv.doc.customer, new_rv.doc.address_display, getdate(new_rv.doc.posting_date).strftime("%d-%m-%Y"), \
+		getdate(add_days(add_months(new_rv.doc.posting_date, -1), 1)).strftime("%d-%m-%Y"), getdate(new_rv.doc.posting_date).strftime("%d-%m-%Y"),\
+		getdate(new_rv.doc.due_date).strftime("%d-%m-%Y"))
 	
 	
 	tbl = '''<table border="1px solid #CCC" width="100%%" cellpadding="0px" cellspacing="0px">
@@ -596,10 +598,10 @@
 							</table>
 						</td>
 					</tr>
-					<tr><td>Terms:</td></tr>
+					<tr><td>Terms and Conditions:</td></tr>
 					<tr><td>%s</td></tr>
 				</table>
-			''' % (new_rv.doc.net_total, new_rv.doc.total_tax,new_rv.doc.grand_total, new_rv.doc.in_words,new_rv.doc.terms)
+			''' % (new_rv.doc.net_total, new_rv.doc.other_charges_total,new_rv.doc.grand_total, new_rv.doc.in_words,new_rv.doc.terms)
 
 
 	msg = hd + tbl + totals
diff --git a/erpnext/accounts/doctype/payable_voucher/payable_voucher.py b/erpnext/accounts/doctype/payable_voucher/payable_voucher.py
index 1a09a45..d930583 100644
--- a/erpnext/accounts/doctype/payable_voucher/payable_voucher.py
+++ b/erpnext/accounts/doctype/payable_voucher/payable_voucher.py
@@ -123,7 +123,10 @@
 
 	def get_pv_details(self, arg):
 		import json
-		item_det = sql("select item_name, brand, description, item_group,purchase_account,cost_center from tabItem where name=%s",arg,as_dict=1)
+		item_det = sql("select item_name, brand, description, item_group,purchase_account,cost_center, last_purchase_rate from tabItem where name=%s",arg,as_dict=1)
+		lpr = item_det and flt(item_det[0]['last_purchase_rate']) or 0
+		import_lpr = lpr / flt(self.doc.conversion_rate) or 1
+
 		tax = sql("select tax_type, tax_rate from `tabItem Tax` where parent = %s" , arg)
 		t = {}
 		for x in tax: t[x[0]] = flt(x[1])
@@ -132,13 +135,17 @@
 			'brand' : item_det and item_det[0]['brand'] or '',
 			'description' : item_det and item_det[0]['description'] or '',
 			'item_group'	: item_det and item_det[0]['item_group'] or '',
-			'rate' : 0.00,
+			'rate' : lpr,
+			'purchase_ref_rate' : lpr,
+			'import_ref_rate' : import_lpr,
+			'import_rate' : import_lpr,
 			'qty' : 0.00,
 			'amount' : 0.00,
 			'expense_head' : item_det and item_det[0]['purchase_account'] or '',
 			'cost_center' : item_det and item_det[0]['cost_center'] or '',
 			'item_tax_rate'			: json.dumps(t)
 		}
+
 		return ret
 
 
diff --git a/erpnext/accounts/doctype/receivable_voucher/receivable_voucher.js b/erpnext/accounts/doctype/receivable_voucher/receivable_voucher.js
index 9747a2b..6db3b52 100644
--- a/erpnext/accounts/doctype/receivable_voucher/receivable_voucher.js
+++ b/erpnext/accounts/doctype/receivable_voucher/receivable_voucher.js
@@ -163,14 +163,24 @@
 cur_frm.cscript.customer = function(doc,dt,dn,onload) {
 
 	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();
+					});
+					
+				}
+			}
 			var doc = locals[cur_frm.doctype][cur_frm.docname];
-			get_server_fields('get_debit_to','','',doc, dt, dn, 0);
-			cur_frm.refresh();
+			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);
 
 	if(doc.customer) unhide_field(['customer_address','contact_person','customer_name','address_display','contact_display','contact_mobile','contact_email','territory','customer_group']);
+	
 }
 
 
diff --git a/erpnext/accounts/page/accounts_browser/accounts_browser.html b/erpnext/accounts/page/accounts_browser/accounts_browser.html
index 8614f2c..8cfde8a 100644
--- a/erpnext/accounts/page/accounts_browser/accounts_browser.html
+++ b/erpnext/accounts/page/accounts_browser/accounts_browser.html
@@ -1,4 +1,4 @@
 <div class="layout_wrapper">
 <div id="ab_header"></div>
-<div id="ab_body" style="margin: 16px"></div>
+<div id="ab_body" style="margin: 16px;"></div>
 </div>
\ No newline at end of file
diff --git a/erpnext/accounts/page/accounts_browser/accounts_browser.js b/erpnext/accounts/page/accounts_browser/accounts_browser.js
index 60c168d..49cbcb3 100644
--- a/erpnext/accounts/page/accounts_browser/accounts_browser.js
+++ b/erpnext/accounts/page/accounts_browser/accounts_browser.js
@@ -46,7 +46,7 @@
   //================== table body======================================  
   var ac_main_grid = make_table($i('ab_body'),1,2,'100%',['60%','40%'],{border:"0px", padding:"4px",tableLayout: "fixed", borderCollapse: "collapse"});
   $y($td(ac_main_grid,0,0),{border: "1px solid #dddddd", padding: "8px"});
-  pscript.account_tree = $a($td(ac_main_grid,0,0),'div');
+  pscript.account_tree = $a($td(ac_main_grid,0,0),'div', '',{minHeight:'400px'});
   $y($td(ac_main_grid,0,1),{border: "1px solid #DDD"});
   pscript.la = $a($td(ac_main_grid,0,1),'div');
   pscript.acc_period_bal = $a($td(ac_main_grid,0,1),'div');
diff --git a/erpnext/accounts/search_criteria/lease_receipts_client_wise/lease_receipts_client_wise.sql b/erpnext/accounts/search_criteria/lease_receipts_client_wise/lease_receipts_client_wise.sql
index f951388..af49c81 100644
--- a/erpnext/accounts/search_criteria/lease_receipts_client_wise/lease_receipts_client_wise.sql
+++ b/erpnext/accounts/search_criteria/lease_receipts_client_wise/lease_receipts_client_wise.sql
@@ -1,5 +1,5 @@
 SELECT gl.account,sum(gl.credit) as amount
 FROM `tabGL Entry` gl, `tabAccount` a
-WHERE gl.account=a.name and a.master_type='Customer' and gl.posting_date between '%(date)s' and '%(date1)s'
+WHERE gl.account=a.name and a.master_type='Customer' and gl.posting_date between '%(date)s' and '%(date1)s' and ifnull(gl.is_cancelled, 'No') = 'No'
 GROUP BY gl.account
 ORDER BY posting_date
diff --git a/erpnext/accounts/search_criteria/trial_balance/trial_balance.py b/erpnext/accounts/search_criteria/trial_balance/trial_balance.py
index 34a828a..d9f00d1 100644
--- a/erpnext/accounts/search_criteria/trial_balance/trial_balance.py
+++ b/erpnext/accounts/search_criteria/trial_balance/trial_balance.py
@@ -114,8 +114,8 @@
 	r.append(flt(opening<0 and -opening or 0))
 	r.append(flt(debit))
 	r.append(flt(credit))
-	r.append(flt(closing>0 and closing or 0))
-	r.append(flt(closing<0 and -closing or 0))
+	r.append(flt(closing>0.01 and closing or 0))
+	r.append(flt(closing<-0.01 and -closing or 0))
 
 
 out =[]
diff --git a/erpnext/buying/doctype/purchase_common/purchase_common.js b/erpnext/buying/doctype/purchase_common/purchase_common.js
index f0f24a0..4ac3fdf 100644
--- a/erpnext/buying/doctype/purchase_common/purchase_common.js
+++ b/erpnext/buying/doctype/purchase_common/purchase_common.js
@@ -393,12 +393,12 @@
 	refresh_field('net_total');
 	refresh_field('net_total_import');
 	
-	cur_frm.cscript.val_cal_charges(doc, cdt, cdn, tname, fname, other_fname);
+	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, cdt, cdn, tname, fname, other_fname){
+cur_frm.cscript.val_cal_charges = function(doc, tname, fname, other_fname){
 
 	doc = locals[doc.doctype][doc.name]
 	if(flt(doc.net_total) > 0) {
@@ -416,7 +416,7 @@
 		}
 		cur_frm.cscript.calc_other_charges(doc , tname , fname , other_fname); // calculate other charges
 	}
-	cur_frm.cscript.calc_doc_values(doc, cdt, cdn, tname, fname, other_fname); // calculates total amounts
+	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']);
 
@@ -545,9 +545,10 @@
 
 
 // ******* Calculation of total amounts of document (item amount + other charges)****************
-cur_frm.cscript.calc_doc_values = function(doc, cdt, cdn, tname, fname, other_fname) {
+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 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);
diff --git a/erpnext/home/page/desktop/desktop.css b/erpnext/home/page/desktop/desktop.css
index 8d0df38..59e50eb 100644
--- a/erpnext/home/page/desktop/desktop.css
+++ b/erpnext/home/page/desktop/desktop.css
@@ -64,7 +64,7 @@
 	color: white;
 	padding-top: 10px;
 	text-align: center;
-	text-shadow: 0px 0px 3px #000, 0px 0px 3px #000, 0px 0px 2px #000;
+	text-shadow: 1px 1px 2px #000, 1px 1px 2px #000, 1px 1px 2px #000, 0px 0px 2px #000;
 }
 
 /* Hover and click effects */
diff --git a/erpnext/patches/jan_mar_2012/reload_quote.py b/erpnext/patches/jan_mar_2012/reload_quote.py
new file mode 100644
index 0000000..5715bb4
--- /dev/null
+++ b/erpnext/patches/jan_mar_2012/reload_quote.py
@@ -0,0 +1,4 @@
+def execute():
+	import webnotes
+	from webnotes.modules.module_manager import reload_doc
+	reload_doc('selling', 'doctype', 'quotation')
diff --git a/erpnext/patches/jan_mar_2012/stock_entry_others_patch.py b/erpnext/patches/jan_mar_2012/stock_entry_others_patch.py
new file mode 100644
index 0000000..3a94419
--- /dev/null
+++ b/erpnext/patches/jan_mar_2012/stock_entry_others_patch.py
@@ -0,0 +1,6 @@
+def execute():
+	import webnotes
+	from webnotes.modules.module_manager import reload_doc
+	reload_doc('stock', 'doctype', 'stock_entry')
+
+	webnotes.conn.sql("update `tabDocField` set options = concat(options, '\nOthers') where fieldname = 'purpose' and parent = 'Stock Entry'")
diff --git a/erpnext/patches/jan_mar_2012/update_purpose_se.py b/erpnext/patches/jan_mar_2012/update_purpose_se.py
new file mode 100644
index 0000000..e2b7d9f
--- /dev/null
+++ b/erpnext/patches/jan_mar_2012/update_purpose_se.py
@@ -0,0 +1,3 @@
+def execute():
+	import webnotes
+	webnotes.conn.sql("update `tabDocField` set options = replace(options, 'Others', 'Other') where fieldname = 'purpose' and parent = 'Stock Entry'")
diff --git a/erpnext/patches/jan_mar_2012/update_se_fld_options.py b/erpnext/patches/jan_mar_2012/update_se_fld_options.py
new file mode 100644
index 0000000..fab0b19
--- /dev/null
+++ b/erpnext/patches/jan_mar_2012/update_se_fld_options.py
@@ -0,0 +1,6 @@
+def execute():
+	import webnotes
+	webnotes.conn.sql("update `tabDocField` set options = 'Bill Of Materials' where fieldname = 'bom_no' and parent = 'Stock Entry'")
+
+	from webnotes.modules.module_manager import reload_doc
+	reload_doc('stock', 'doctype', 'stock_entry')
diff --git a/erpnext/patches/mar_2012/__init__.py b/erpnext/patches/mar_2012/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/erpnext/patches/mar_2012/__init__.py
diff --git a/erpnext/patches/mar_2012/pos_invoice_fix.py b/erpnext/patches/mar_2012/pos_invoice_fix.py
new file mode 100644
index 0000000..77ebcb4
--- /dev/null
+++ b/erpnext/patches/mar_2012/pos_invoice_fix.py
@@ -0,0 +1,5 @@
+def execute():
+	import webnotes
+	webnotes.conn.sql("DELETE FROM `tabDocFormat` WHERE format='POS Invoice'")
+	from webnotes.modules.module_manager import reload_doc
+	reload_doc('accounts', 'Print Format', 'POS Invoice')
diff --git a/erpnext/patches/patch_list.py b/erpnext/patches/patch_list.py
index 2bfaf08..3bf4b6a 100644
--- a/erpnext/patches/patch_list.py
+++ b/erpnext/patches/patch_list.py
@@ -187,5 +187,25 @@
 		'patch_file': 'update_stockreco_perm',
 		'description': 'Update stock reco permission' 
 	},
+	{
+		'patch_module': 'patches.jan_mar_2012',
+		'patch_file': 'stock_entry_others_patch',
+		'description': 'new purpose others in stock entry' 
+	},
+	{
+		'patch_module': 'patches.jan_mar_2012',
+		'patch_file': 'reload_quote',
+		'description': 'reload quote: organization fld added' 
+	},
+	{
+		'patch_module': 'patches.jan_mar_2012',
+		'patch_file': 'update_purpose_se',
+		'description': 'Purpose SE: Others to Other' 
+	},
+	{
+		'patch_module': 'patches.jan_mar_2012',
+		'patch_file': 'update_se_fld_options',
+		'description': 'Purpose SE: Others to Other' 
+	},
 
 ]
diff --git a/erpnext/selling/doctype/customer/customer.txt b/erpnext/selling/doctype/customer/customer.txt
index 346b4d1..993dc29 100644
--- a/erpnext/selling/doctype/customer/customer.txt
+++ b/erpnext/selling/doctype/customer/customer.txt
@@ -203,7 +203,7 @@
 	# DocField
 	{
 		'colour': u'White:FFF',
-		'description': u'<a href="javascript:cur_frm.cscript.CGHelp();">To manage Customer Groups, click here</a>',
+		'description': u'<a href="#!Sales Browser/Customer Group">To manage Customer Groups, click here</a>',
 		'doctype': u'DocField',
 		'fieldname': u'customer_group',
 		'fieldtype': u'Link',
@@ -223,7 +223,7 @@
 	# DocField
 	{
 		'colour': u'White:FFF',
-		'description': u'<a href="javascript:cur_frm.cscript.TerritoryHelp();">To manage Territory, click here</a>',
+		'description': u'<a href="#!Sales Browser/Territory">To manage Territory, click here</a>',
 		'doctype': u'DocField',
 		'fieldname': u'territory',
 		'fieldtype': u'Link',
diff --git a/erpnext/selling/doctype/quotation/quotation.js b/erpnext/selling/doctype/quotation/quotation.js
index 972a467..12d6d1e 100644
--- a/erpnext/selling/doctype/quotation/quotation.js
+++ b/erpnext/selling/doctype/quotation/quotation.js
@@ -42,7 +42,7 @@
 
 	if(doc.quotation_to) {
 		if(doc.quotation_to == 'Customer') {
-			hide_field(['lead', 'lead_name']);
+			hide_field(['lead', 'lead_name', 'organization']);
 		}
 		else if (doc.quotation_to == 'Lead') {
 			hide_field(['customer','customer_address','contact_person', 'customer_name','contact_display', 'customer_group']);
@@ -61,16 +61,11 @@
 // hide - unhide fields based on lead or customer..
 // =======================================================================================================================
 cur_frm.cscript.lead_cust_show = function(doc,cdt,cdn){
-	if(doc.quotation_to == 'Lead'){
-		unhide_field(['lead']);
-		hide_field(['lead_name','customer','customer_address','contact_person','customer_name','address_display','contact_display','contact_mobile','contact_email','territory','customer_group']);
-		doc.lead = doc.lead_name = doc.customer = doc.customer_address = doc.contact_person = doc.address_display = doc.contact_display = doc.contact_mobile = doc.contact_email = doc.territory = doc.customer_group = "";
-	}
-	else if(doc.quotation_to == 'Customer'){
-		unhide_field(['customer']);
-		hide_field(['lead','lead_name','address_display','contact_display','contact_mobile','contact_email','territory']);
-		doc.lead = doc.lead_name = doc.customer = doc.customer_address = doc.contact_person = doc.address_display = doc.contact_display = doc.contact_mobile = doc.contact_email = doc.territory = doc.customer_group = "";
-	}
+	hide_field(['lead', 'lead_name','customer','customer_address','contact_person','customer_name','address_display','contact_display','contact_mobile','contact_email','territory','customer_group', 'organization']);
+	if(doc.quotation_to == 'Lead') unhide_field(['lead']);
+	else if(doc.quotation_to == 'Customer') unhide_field(['customer']);
+	
+	doc.lead = doc.lead_name = doc.customer = doc.customer_address = doc.contact_person = doc.address_display = doc.contact_display = doc.contact_mobile = doc.contact_email = doc.territory = doc.customer_group = doc.organization = "";
 }
 
 
@@ -148,7 +143,7 @@
 
 cur_frm.cscript.lead = function(doc, cdt, cdn) {
 	if(doc.lead) get_server_fields('get_lead_details', doc.lead,'', doc, cdt, cdn, 1);
-	if(doc.lead) unhide_field(['lead_name','address_display','contact_mobile','contact_email','territory']);
+	if(doc.lead) unhide_field(['lead_name','address_display','contact_mobile','contact_email','territory', 'organization']);
 }
 
 
diff --git a/erpnext/selling/doctype/quotation/quotation.py b/erpnext/selling/doctype/quotation/quotation.py
index de4056d..27206b2 100644
--- a/erpnext/selling/doctype/quotation/quotation.py
+++ b/erpnext/selling/doctype/quotation/quotation.py
@@ -116,26 +116,8 @@
 	# Pull details from other charges master (Get Other Charges)
 	# ----------------------------------------------------------
 	def get_other_charges(self):
-		return get_obj('Sales Common').get_other_charges(self)
+		return get_obj('Sales Common').get_other_charges(self)	
 	
-	# Get Lead Details along with its details
-	# ==============================================================
-	def get_lead_details1(self, name):		
-		details = sql("select name, lead_name, address_line1, address_line2, city, country, state, pincode, territory, contact_no, mobile_no, email_id from `tabLead` where name = '%s'" %(name), as_dict = 1)	 
-		ret = {
-			'lead_name' : details and details[0]['lead_name'] or '',
-			'address_display' : (details and details[0]['address_line1']
-						 + (details[0]['address_line2'] and '\n' + details[0]['address_line2'] or '') + '\n' 
-						 + details[0]['city'] 
-						 + (details[0]['pincode'] and ', ' + details[0]['pincode'] or '') + '\n' 
-						 + (details[0]['state'] and details[0]['state']+', ' or '') 
-						 + details[0]['country'] + '\nTel: ' + details[0]['contact_no'] + '\n' or '-'),
-			'territory' : details and details[0]['territory'] or '',
-			'contact_mobile' : details and details[0]['mobile_no'] or '-',
-			'contact_email' : details and details[0]['email_id'] or '-'			
-		}
-		return ret
-
 		 
 # GET TERMS AND CONDITIONS
 # ====================================================================================
diff --git a/erpnext/selling/doctype/quotation/quotation.txt b/erpnext/selling/doctype/quotation/quotation.txt
index 32784a8..c8e3ecb 100644
--- a/erpnext/selling/doctype/quotation/quotation.txt
+++ b/erpnext/selling/doctype/quotation/quotation.txt
@@ -5,7 +5,7 @@
 	{
 		'creation': '2010-08-08 17:09:17',
 		'docstatus': 0,
-		'modified': '2012-03-02 12:20:40',
+		'modified': '2012-03-20 14:56:28',
 		'modified_by': u'Administrator',
 		'owner': u'Administrator'
 	},
@@ -21,7 +21,7 @@
 
 	# These values are common for all DocType
 	{
-		'_last_update': u'1330069750',
+		'_last_update': u'1332235370',
 		'allow_attach': 1,
 		'allow_email': 0,
 		'allow_trash': 1,
@@ -41,7 +41,7 @@
 		'show_in_menu': 0,
 		'subject': u'To %(customer_name)s on %(transaction_date)s worth %(currency)s %(grand_total_export)s',
 		'tag_fields': u'status',
-		'version': 618
+		'version': 621
 	},
 
 	# These values are common for all DocFormat
@@ -294,6 +294,15 @@
 
 	# DocField
 	{
+		'doctype': u'DocField',
+		'fieldname': u'organization',
+		'fieldtype': u'Data',
+		'label': u'Organization',
+		'permlevel': 1
+	},
+
+	# DocField
+	{
 		'colour': u'White:FFF',
 		'doctype': u'DocField',
 		'fieldname': u'address_display',
@@ -385,7 +394,7 @@
 		'oldfieldtype': u'Select',
 		'options': u'\nSales\nMaintenance',
 		'permlevel': 0,
-		'print_hide': 0,
+		'print_hide': 1,
 		'reqd': 1,
 		'search_index': 0
 	},
diff --git a/erpnext/selling/doctype/sales_common/sales_common.py b/erpnext/selling/doctype/sales_common/sales_common.py
index 9186bb8..63f53ea 100644
--- a/erpnext/selling/doctype/sales_common/sales_common.py
+++ b/erpnext/selling/doctype/sales_common/sales_common.py
@@ -209,13 +209,14 @@
 			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.charge_type,t1.row_id,t1.description,t1.account_head,t1.rate,t1.tax_amount,t1.included_in_print_rate from `tabRV Tax Detail` t1, `tabOther Charges` t2 where t1.parent = t2.name and t2.company = '%s' and %s order by t1.idx" % (obj.doc.company, add_cond), as_dict = 1)
+			other_charge = webnotes.conn.sql("select t1.charge_type,t1.row_id,t1.description,t1.account_head,t1.rate,t1.tax_amount,t1.included_in_print_rate, t1.cost_center_other_charges from `tabRV Tax Detail` t1, `tabOther Charges` t2 where t1.parent = t2.name and t2.company = '%s' and %s order by t1.idx" % (obj.doc.company, add_cond), as_dict = 1)
 			for other in other_charge:
 				d =	addchild(obj.doc, 'other_charges', 'RV Tax Detail', 1, obj.doclist)
 				d.charge_type = other['charge_type']
 				d.row_id = other['row_id']
 				d.description = other['description']
 				d.account_head = other['account_head']
+				d.cost_center_other_charges = other['cost_center_other_charges']
 				d.rate = flt(other['rate'])
 				d.tax_amount = flt(other['tax_amount'])
 				d.included_in_print_rate = cint(other['included_in_print_rate'])
diff --git a/erpnext/selling/doctype/sales_order/sales_order.js b/erpnext/selling/doctype/sales_order/sales_order.js
index 7d80607..9a877c6 100644
--- a/erpnext/selling/doctype/sales_order/sales_order.js
+++ b/erpnext/selling/doctype/sales_order/sales_order.js
@@ -36,7 +36,7 @@
 	if(!doc.price_list_currency) set_multiple(cdt, cdn, {price_list_currency: doc.currency, plc_conversion_rate: 1});
 	// load default charges
 	
-	if(doc.__islocal){
+	if(doc.__islocal && !doc.customer){
 		hide_field(['customer_address','contact_person','customer_name','address_display','contact_display','contact_mobile','contact_email','territory','customer_group','shipping_address']);
 	}
 }
@@ -101,13 +101,16 @@
 //customer
 cur_frm.cscript.customer = function(doc,dt,dn) {
 	var callback = function(r,rt) {
-			var doc = locals[cur_frm.doctype][cur_frm.docname];
-			get_server_fields('get_shipping_address',doc.customer,'',doc, dt, dn, 0);
+		var callback2  = function(r, rt) {
+			if(doc.customer) unhide_field(['customer_address', 'contact_person', 'customer_name', 'address_display', 'contact_display', 'contact_mobile', 'contact_email', 'territory','customer_group','shipping_address']);
 			cur_frm.refresh();
+		}
+		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);
-	if(doc.customer) unhide_field(['customer_address', 'contact_person', 'customer_name', 'address_display', 'contact_display', 'contact_mobile', 'contact_email', 'territory','customer_group','shipping_address']);
 }
 
 cur_frm.cscript.customer_address = cur_frm.cscript.contact_person = function(doc,dt,dn) {		
diff --git a/erpnext/selling/page/sales_browser/sales_browser.js b/erpnext/selling/page/sales_browser/sales_browser.js
index b079515..8137d04 100644
--- a/erpnext/selling/page/sales_browser/sales_browser.js
+++ b/erpnext/selling/page/sales_browser/sales_browser.js
@@ -49,7 +49,7 @@
     var tr_main_grid = make_table(div_body,1,2,'100%',['60%','40%'],{width: "100%", tableLayout: "fixed", borderCollapse: "collapse", border:"0px", padding:"4px 4px 4px 4px"});
     
     $y($td(tr_main_grid,0,0),{border: "1px solid #dddddd", padding: "8px", width: "60%"});   
-    this.tree_area = $a($td(tr_main_grid,0,0),'div');
+    this.tree_area = $a($td(tr_main_grid,0,0),'div','',{minHeight:'400px'});
 
     $y($td(tr_main_grid,0,1),{border: "1px solid #DDD"});   
     this.detail_area = $a($td(tr_main_grid,0,1),'div');
diff --git a/erpnext/setup/doctype/manage_account/manage_account.txt b/erpnext/setup/doctype/manage_account/manage_account.txt
index 18a9872..4077afe 100644
--- a/erpnext/setup/doctype/manage_account/manage_account.txt
+++ b/erpnext/setup/doctype/manage_account/manage_account.txt
@@ -231,7 +231,7 @@
 		'doctype': 'DocField',
 		'fieldtype': 'HTML',
 		'label': 'IGHelp',
-		'options': '<a href="javascript:cur_frm.cscript.TreePage(\'Item Group\');">To manage Item Groups, click here</a>'
+		'options': '<a href="#!Sales Browser/Item Group">To manage Item Groups, click here</a>'
 	},
 
 	# DocField
@@ -391,7 +391,7 @@
 		'doctype': 'DocField',
 		'fieldtype': 'HTML',
 		'label': 'CGHelp',
-		'options': '<a href="javascript:cur_frm.cscript.TreePage(\'Customer Group\');">To manage Customer Groups, click here</a>'
+		'options': '<a href="#!Sales Browser/Customer Group">To manage Customer Groups, click here</a>'
 	},
 
 	# DocField
@@ -408,7 +408,7 @@
 		'doctype': 'DocField',
 		'fieldtype': 'HTML',
 		'label': 'TerritoryHelp',
-		'options': '<a href="javascript:cur_frm.cscript.TreePage(\'Territory\');">To manage Territory, click here</a>'
+		'options': '<a href="#!Sales Browser/Territory">To manage Territory, click here</a>'
 	},
 
 	# DocField
diff --git a/erpnext/setup/doctype/sales_person/sales_person.txt b/erpnext/setup/doctype/sales_person/sales_person.txt
index 0680c38..9ae96bf 100644
--- a/erpnext/setup/doctype/sales_person/sales_person.txt
+++ b/erpnext/setup/doctype/sales_person/sales_person.txt
@@ -183,7 +183,7 @@
 		'idx': 5,
 		'label': 'SPHelp',
 		'oldfieldtype': 'HTML',
-		'options': '<a href="javascript:cur_frm.cscript.TreePage(\'Sales Person\');">To manage Sales Person, click here</a>',
+		'options': '<a href="#!Sales Browser/Sales Person">To manage Sales Person, click here</a>',
 		'permlevel': 0
 	},
 
diff --git a/erpnext/startup/startup.css b/erpnext/startup/startup.css
index 4a47aed..2735ffe 100644
--- a/erpnext/startup/startup.css
+++ b/erpnext/startup/startup.css
@@ -13,7 +13,7 @@
 }
 
 body {
-	background: url(../images/stripedbg.png) repeat;
+	background: url(../images/redbeech.jpg) repeat;
 }
 
 .small {
diff --git a/erpnext/stock/DocType Mapper/Purchase Order-Purchase Receipt/Purchase Order-Purchase Receipt.txt b/erpnext/stock/DocType Mapper/Purchase Order-Purchase Receipt/Purchase Order-Purchase Receipt.txt
index e3f0dc9..d628495 100644
--- a/erpnext/stock/DocType Mapper/Purchase Order-Purchase Receipt/Purchase Order-Purchase Receipt.txt
+++ b/erpnext/stock/DocType Mapper/Purchase Order-Purchase Receipt/Purchase Order-Purchase Receipt.txt
@@ -5,7 +5,7 @@
 	{
 		'creation': '2010-08-08 17:09:35',
 		'docstatus': 0,
-		'modified': '2012-03-01 17:58:16',
+		'modified': '2012-03-20 14:24:12',
 		'modified_by': u'Administrator',
 		'owner': u'Administrator'
 	},
diff --git a/erpnext/stock/doctype/delivery_note/delivery_note.js b/erpnext/stock/doctype/delivery_note/delivery_note.js
index 13922cb..95bd7bf 100644
--- a/erpnext/stock/doctype/delivery_note/delivery_note.js
+++ b/erpnext/stock/doctype/delivery_note/delivery_note.js
@@ -82,11 +82,11 @@
 cur_frm.cscript.customer = function(doc,dt,dn,onload) {	
 	var callback = function(r,rt) {
 			var doc = locals[cur_frm.doctype][cur_frm.docname];
+			if(doc.customer) unhide_field(['customer_address','contact_person','customer_name','address_display','contact_display','contact_mobile','contact_email','territory','customer_group','shipping_address']);
 			cur_frm.refresh();
 	} 
 	var args = onload ? 'onload':''
 	if(doc.customer) $c_obj(make_doclist(doc.doctype, doc.name), 'get_default_customer_shipping_address', args, callback);
-	if(doc.customer) unhide_field(['customer_address','contact_person','customer_name','address_display','contact_display','contact_mobile','contact_email','territory','customer_group','shipping_address']);
 }
 
 cur_frm.cscript.customer_address = cur_frm.cscript.contact_person = function(doc,dt,dn) {		
diff --git a/erpnext/stock/doctype/delivery_note/delivery_note.txt b/erpnext/stock/doctype/delivery_note/delivery_note.txt
index 314d0d9..4878c36 100644
--- a/erpnext/stock/doctype/delivery_note/delivery_note.txt
+++ b/erpnext/stock/doctype/delivery_note/delivery_note.txt
@@ -31,11 +31,11 @@
 		'module': u'Stock',
 		'name': '__common__',
 		'read_only_onload': 1,
-		'search_fields': u'status,transaction_date,customer,customer_name, territory,grand_total',
+		'search_fields': u'status,customer,customer_name, territory,grand_total',
 		'section_style': u'Tabbed',
 		'server_code_error': u' ',
 		'show_in_menu': 0,
-		'subject': u'To %(customer_name)s on %(transaction_date)s | %(per_billed)s% billed',
+		'subject': u'To %(customer_name)s on %(posting_date)s | %(per_billed)s% billed',
 		'tag_fields': u'billing_status',
 		'version': 475
 	},
diff --git a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.txt b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.txt
index 525bcfc..6724b69 100755
--- a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.txt
+++ b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.txt
@@ -21,11 +21,11 @@
 		'module': u'Stock',
 		'name': '__common__',
 		'read_only_onload': 1,
-		'search_fields': u'status, transaction_date, supplier',
+		'search_fields': u'status, posting_date, supplier',
 		'section_style': u'Tabbed',
 		'server_code_error': u' ',
 		'show_in_menu': 0,
-		'subject': u'From %(supplier_name)s against %(purchase_order)s on %(transaction_date)s',
+		'subject': u'From %(supplier_name)s against %(purchase_order)s on %(posting_date)s',
 		'version': 325
 	},
 
diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.js b/erpnext/stock/doctype/stock_entry/stock_entry.js
index 1e558c9..3593fa0 100644
--- a/erpnext/stock/doctype/stock_entry/stock_entry.js
+++ b/erpnext/stock/doctype/stock_entry/stock_entry.js
@@ -22,13 +22,17 @@
 
 
 var cfn_set_fields = function(doc, cdt, cdn) {
-  lst = ['supplier','supplier_name','supplier_address','customer','customer_name','customer_address']; 
-  if (doc.purpose == 'Production Order'){
-    unhide_field(['production_order', 'process', 'Get Items']);
-    hide_field(['from_warehouse', 'to_warehouse','purchase_receipt_no','delivery_note_no', 'sales_invoice_no','Warehouse HTML']);
-    doc.from_warehouse = '';
+  lst = ['supplier','supplier_name','supplier_address','customer','customer_name','customer_address'];
+  hide_field(lst);  
+
+  if (doc.purpose == 'Production Order' || doc.purpose == 'Other'){
+    unhide_field('Get Items');
+    hide_field(['from_warehouse', 'to_warehouse','purchase_receipt_no','delivery_note_no', 'sales_invoice_no','Warehouse HTML', 'transporter', 'is_excisable_goods', 'excisable_goods']);
+	if (doc.purpose=='Production Order') unhide_field(['production_order', 'process']);
+    
+	doc.from_warehouse = '';
     doc.to_warehosue = '';
-    if (doc.process == 'Backflush'){
+    if (doc.process == 'Backflush' || doc.purpose == 'Other'){
       unhide_field('fg_completed_qty');
     }
     else{
@@ -39,7 +43,6 @@
   else{
     unhide_field(['from_warehouse', 'to_warehouse']);
     hide_field(['production_order', 'process', 'Get Items', 'fg_completed_qty','purchase_receipt_no','delivery_note_no', 'sales_invoice_no']);
-    hide_field(lst);
     doc.production_order = '';
     doc.process = '';
     doc.fg_completed_qty = 0;
@@ -48,12 +51,10 @@
  
   if(doc.purpose == 'Purchase Return'){
     doc.customer=doc.customer_name = doc.customer_address=doc.delivery_note_no=doc.sales_invoice_no='';
-    hide_field(lst);
     unhide_field(['supplier','supplier_name','supplier_address','purchase_receipt_no']);
   }
   else if(doc.purpose == 'Sales Return'){
     doc.supplier=doc.supplier_name = doc.supplier_address=doc.purchase_receipt_no='';
-    hide_field(lst);
     unhide_field(['customer','customer_name','customer_address','delivery_note_no', 'sales_invoice_no']);
   } else{
     doc.customer=doc.customer_name=doc.customer_address=doc.delivery_note_no=doc.sales_invoice_no=doc.supplier=doc.supplier_name = doc.supplier_address=doc.purchase_receipt_no='';
diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.py b/erpnext/stock/doctype/stock_entry/stock_entry.py
index 530c5e6..96642d0 100644
--- a/erpnext/stock/doctype/stock_entry/stock_entry.py
+++ b/erpnext/stock/doctype/stock_entry/stock_entry.py
@@ -157,13 +157,13 @@
 
 
 
-	def get_raw_materials(self,pro_obj):
+	def get_raw_materials(self, bom_no, fg_qty, consider_sa_items_as_rm):
 		""" 
 			get all items from flat bom except 
 			child items of sub-contracted and sub assembly items 
 			and sub assembly items itself.
 		"""
-		if pro_obj.doc.consider_sa_items == 'Yes':
+		if consider_sa_items_as_rm == 'Yes':
 			# Get all raw materials considering SA items as raw materials, 
 			# so no childs of SA items
 			fl_bom_sa_items = sql("""
@@ -171,8 +171,7 @@
 				from `tabBOM Material` 
 				where parent = '%s' and docstatus < 2 
 				group by item_code
-			""" % ((self.doc.process == 'Backflush') and flt(self.doc.fg_completed_qty) \
-					 or flt(pro_obj.doc.qty), cstr(pro_obj.doc.bom_no)))
+			""" % (fg_qty, bom_no))
 			
 			self.make_items_dict(fl_bom_sa_items)
 
@@ -189,8 +188,7 @@
 						and ifnull(it.is_sub_contracted_item, 'No') = 'No' and fb.docstatus<2 and fb.parent=%s
 					) a
 				group by item_code,stock_uom
-			""" , ((self.doc.process == 'Backflush') and flt(self.doc.fg_completed_qty) \
-					or flt(pro_obj.doc.qty), cstr(pro_obj.doc.bom_no)))
+			""" , (fg_qty, bom_no))
 			self.make_items_dict(fl_bom_sa_child_item)
 
 		# Update only qty remaining to be issued for production
@@ -199,17 +197,11 @@
 
 
 
-	def add_to_stock_entry_detail(self, pro_obj, item_dict, fg_item = 0):
-		sw, tw = '', ''
-		if self.doc.process == 'Material Transfer':
-			tw = cstr(pro_obj.doc.wip_warehouse)
-		if self.doc.process == 'Backflush':
-			tw = fg_item and cstr(pro_obj.doc.fg_warehouse) or ''
-			if not fg_item: sw = cstr(pro_obj.doc.wip_warehouse)
+	def add_to_stock_entry_detail(self, source_wh, target_wh, item_dict, fg_item = 0, bom_no = ''):
 		for d in item_dict:
 			se_child = addchild(self.doc, 'mtn_details', 'Stock Entry Detail', 0, self.doclist)
-			se_child.s_warehouse = sw
-			se_child.t_warehouse = tw
+			se_child.s_warehouse = source_wh
+			se_child.t_warehouse = target_wh
 			se_child.fg_item = fg_item
 			se_child.item_code = cstr(d)
 			se_child.description = item_dict[d][1]
@@ -219,24 +211,52 @@
 			se_child.qty = flt(item_dict[d][0])
 			se_child.transfer_qty = flt(item_dict[d][0])
 			se_child.conversion_factor = 1.00
-			if fg_item: se_child.bom_no = pro_obj.doc.bom_no
+			if fg_item: se_child.bom_no = bom_no
+
+	def validate_bom_no(self):
+		if self.doc.bom_no:
+			if not self.doc.fg_completed_qty:
+				msgprint("Please enter FG Completed Qty", raise_exception=1)
+			if not self.doc.consider_sa_items_as_raw_materials:
+				msgprint("Please confirm whether you want to consider sub assembly item as raw materials", raise_exception=1)	
 
 
 	# get items 
 	#------------------
 	def get_items(self):
-		pro_obj = self.doc.production_order and get_obj('Production Order', self.doc.production_order) or ''
-		
-		self.validate_for_production_order(pro_obj)
-		self.get_raw_materials(pro_obj)
-		
+		if self.doc.purpose == 'Production Order':
+			pro_obj = self.doc.production_order and get_obj('Production Order', self.doc.production_order) or ''	
+			self.validate_for_production_order(pro_obj)
+
+			bom_no = pro_obj.doc.bom_no
+			fg_qty = (self.doc.process == 'Backflush') and flt(self.doc.fg_completed_qty) or flt(pro_obj.doc.qty)
+			consider_sa_items_as_rm = pro_obj.doc.consider_sa_items
+		elif self.doc.purpose == 'Other':
+			self.validate_bom_no()
+			bom_no = self.doc.bom_no
+			fg_qty = self.doc.fg_completed_qty
+			consider_sa_items_as_rm = self.doc.consider_sa_items_as_raw_materials
+			
+		self.get_raw_materials(bom_no, fg_qty, consider_sa_items_as_rm)
 		self.doc.clear_table(self.doclist, 'mtn_details', 1)
 
-		self.add_to_stock_entry_detail(pro_obj, self.item_dict)
-		
+		sw = (self.doc.process == 'Backflush') and cstr(pro_obj.doc.wip_warehouse) or ''
+		tw = (self.doc.process == 'Material Transfer') and cstr(pro_obj.doc.wip_warehouse) or ''
+		self.add_to_stock_entry_detail(sw, tw, self.item_dict)
+
+		fg_item_dict = {}
 		if self.doc.process == 'Backflush':
-			item_dict = {cstr(pro_obj.doc.production_item) : [self.doc.fg_completed_qty, pro_obj.doc.description, pro_obj.doc.stock_uom]}
-			self.add_to_stock_entry_detail(pro_obj, item_dict, fg_item = 1)
+			sw = ''
+			tw = cstr(pro_obj.doc.fg_warehouse)	
+			fg_item_dict = {cstr(pro_obj.doc.production_item) : [self.doc.fg_completed_qty, pro_obj.doc.description, pro_obj.doc.stock_uom]}
+		elif self.doc.purpose == 'Other' and self.doc.bom_no:
+			sw, tw = '', ''
+			item = sql("select item, description, uom from `tabBill Of Materials` where name = %s", self.doc.bom_no, as_dict=1)
+			fg_item_dict = {item[0]['item'] : [self.doc.fg_completed_qty, item[0]['description'], item[0]['uom']]}
+
+		if fg_item_dict:
+			self.add_to_stock_entry_detail(sw, tw, fg_item_dict, fg_item = 1, bom_no = bom_no)
+			
 
 
 	def validate_transfer_qty(self):
@@ -289,7 +309,7 @@
 
 	
 	def validate_for_production_order(self, pro_obj):
-		if self.doc.purpose == 'Production Order' or self.doc.process or self.doc.production_order or flt(self.doc.fg_completed_qty):
+		if self.doc.purpose == 'Production Order' or self.doc.process or self.doc.production_order:
 			if self.doc.purpose != 'Production Order':
 				msgprint("Purpose should be 'Production Order'.")
 				raise Exception
@@ -394,7 +414,6 @@
 					if cstr(pro_obj.doc.production_item) != cstr(d.item_code):
 						msgprint("Item %s in Stock Entry Detail as Row No %s do not match with Item %s in Production Order %s" % (cstr(d.item_code), cstr(d.idx), cstr(pro_obj.doc.production_item), cstr(pro_obj.doc.name)))
 						raise Exception
-					fg_qty = flt(fg_qty) + flt(d.transfer_qty)
 					if cstr(d.t_warehouse) != cstr(pro_obj.doc.fg_warehouse):
 						msgprint("As Item %s is FG Item. Target Warehouse should be same as FG Warehouse %s in Production Order %s, at Row No %s. " % ( cstr(d.item_code), cstr(pro_obj.doc.fg_warehouse), cstr(pro_obj.doc.name), cstr(d.idx)))
 						raise Exception
@@ -408,6 +427,9 @@
 					if cstr(d.s_warehouse) != cstr(pro_obj.doc.wip_warehouse):
 						msgprint("As Item %s is Raw Material. Source Warehouse should be same as WIP Warehouse %s in Production Order %s, at Row No %s. " % ( cstr(d.item_code), cstr(pro_obj.doc.wip_warehouse), cstr(pro_obj.doc.name), cstr(d.idx)))
 						raise Exception
+			if d.fg_item and (self.doc.purpose == 'Other' or self.doc.process == 'Backflush'):
+				fg_qty = flt(fg_qty) + flt(d.transfer_qty)
+
 			d.save()
 		if self.doc.fg_completed_qty and flt(self.doc.fg_completed_qty) != flt(fg_qty):
 			msgprint("The Total of FG Qty %s in Stock Entry Detail do not match with FG Completed Qty %s" % (flt(fg_qty), flt(self.doc.fg_completed_qty)))
diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.txt b/erpnext/stock/doctype/stock_entry/stock_entry.txt
index 395082f..9792fc9 100644
--- a/erpnext/stock/doctype/stock_entry/stock_entry.txt
+++ b/erpnext/stock/doctype/stock_entry/stock_entry.txt
@@ -5,22 +5,22 @@
 	{
 		'creation': '2010-08-08 17:09:25',
 		'docstatus': 0,
-		'modified': '2012-01-24 19:47:47',
-		'modified_by': 'Administrator',
-		'owner': 'Administrator'
+		'modified': '2012-03-21 11:00:48',
+		'modified_by': u'Administrator',
+		'owner': u'Administrator'
 	},
 
 	# These values are common for all DocType
 	{
-		'_last_update': '1325570647',
+		'_last_update': u'1332233897',
 		'allow_attach': 0,
 		'allow_copy': 0,
 		'allow_email': 0,
 		'allow_print': 0,
 		'allow_rename': 0,
 		'allow_trash': 0,
-		'colour': 'White:FFF',
-		'default_print_format': 'Standard',
+		'colour': u'White:FFF',
+		'default_print_format': u'Standard',
 		'doctype': 'DocType',
 		'hide_heading': 0,
 		'hide_toolbar': 0,
@@ -29,44 +29,44 @@
 		'is_transaction_doc': 0,
 		'issingle': 0,
 		'max_attachments': 0,
-		'module': 'Stock',
+		'module': u'Stock',
 		'name': '__common__',
-		'print_outline': 'No',
+		'print_outline': u'No',
 		'read_only': 0,
 		'read_only_onload': 0,
-		'search_fields': 'transfer_date, from_warehouse, to_warehouse, purpose, remarks',
-		'section_style': 'Tabbed',
-		'server_code_error': ' ',
+		'search_fields': u'transfer_date, from_warehouse, to_warehouse, purpose, remarks',
+		'section_style': u'Tabbed',
+		'server_code_error': u' ',
 		'show_in_menu': 0,
-		'subject': '%(remarks)s',
-		'tag_fields': 'purpose',
+		'subject': u'%(remarks)s',
+		'tag_fields': u'purpose',
 		'use_template': 0,
-		'version': 248
+		'version': 259
 	},
 
 	# These values are common for all DocField
 	{
-		'doctype': 'DocField',
+		'doctype': u'DocField',
 		'name': '__common__',
-		'parent': 'Stock Entry',
-		'parentfield': 'fields',
-		'parenttype': 'DocType'
+		'parent': u'Stock Entry',
+		'parentfield': u'fields',
+		'parenttype': u'DocType'
 	},
 
 	# These values are common for all DocPerm
 	{
-		'doctype': 'DocPerm',
+		'doctype': u'DocPerm',
 		'name': '__common__',
-		'parent': 'Stock Entry',
-		'parentfield': 'permissions',
-		'parenttype': 'DocType',
+		'parent': u'Stock Entry',
+		'parentfield': u'permissions',
+		'parenttype': u'DocType',
 		'read': 1
 	},
 
 	# DocType, Stock Entry
 	{
 		'doctype': 'DocType',
-		'name': 'Stock Entry'
+		'name': u'Stock Entry'
 	},
 
 	# DocPerm
@@ -74,9 +74,9 @@
 		'amend': 0,
 		'cancel': 0,
 		'create': 0,
-		'doctype': 'DocPerm',
+		'doctype': u'DocPerm',
 		'permlevel': 1,
-		'role': 'Material Manager',
+		'role': u'Material Manager',
 		'submit': 0,
 		'write': 0
 	},
@@ -86,9 +86,9 @@
 		'amend': 0,
 		'cancel': 0,
 		'create': 0,
-		'doctype': 'DocPerm',
+		'doctype': u'DocPerm',
 		'permlevel': 1,
-		'role': 'Material User',
+		'role': u'Material User',
 		'submit': 0,
 		'write': 0
 	},
@@ -98,9 +98,9 @@
 		'amend': 1,
 		'cancel': 1,
 		'create': 1,
-		'doctype': 'DocPerm',
+		'doctype': u'DocPerm',
 		'permlevel': 0,
-		'role': 'Production User',
+		'role': u'Production User',
 		'submit': 1,
 		'write': 1
 	},
@@ -110,9 +110,9 @@
 		'amend': 0,
 		'cancel': 0,
 		'create': 0,
-		'doctype': 'DocPerm',
+		'doctype': u'DocPerm',
 		'permlevel': 1,
-		'role': 'Production User',
+		'role': u'Production User',
 		'submit': 0,
 		'write': 0
 	},
@@ -122,9 +122,9 @@
 		'amend': 0,
 		'cancel': 0,
 		'create': 0,
-		'doctype': 'DocPerm',
+		'doctype': u'DocPerm',
 		'permlevel': 2,
-		'role': 'Production User',
+		'role': u'Production User',
 		'submit': 0,
 		'write': 1
 	},
@@ -134,9 +134,9 @@
 		'amend': 1,
 		'cancel': 1,
 		'create': 1,
-		'doctype': 'DocPerm',
+		'doctype': u'DocPerm',
 		'permlevel': 0,
-		'role': 'Production Manager',
+		'role': u'Production Manager',
 		'submit': 1,
 		'write': 1
 	},
@@ -146,9 +146,9 @@
 		'amend': 0,
 		'cancel': 0,
 		'create': 0,
-		'doctype': 'DocPerm',
+		'doctype': u'DocPerm',
 		'permlevel': 1,
-		'role': 'Production Manager',
+		'role': u'Production Manager',
 		'submit': 0,
 		'write': 0
 	},
@@ -158,45 +158,45 @@
 		'amend': 0,
 		'cancel': 0,
 		'create': 0,
-		'doctype': 'DocPerm',
+		'doctype': u'DocPerm',
 		'permlevel': 2,
-		'role': 'Production Manager',
+		'role': u'Production Manager',
 		'submit': 0,
 		'write': 1
 	},
 
 	# DocField
 	{
-		'doctype': 'DocField',
-		'fieldtype': 'Section Break',
-		'label': 'Warehouse',
-		'oldfieldtype': 'Section Break',
+		'doctype': u'DocField',
+		'fieldtype': u'Section Break',
+		'label': u'Warehouse',
+		'oldfieldtype': u'Section Break',
 		'permlevel': 0
 	},
 
 	# DocField
 	{
-		'doctype': 'DocField',
-		'fieldtype': 'Column Break',
-		'oldfieldtype': 'Column Break',
+		'doctype': u'DocField',
+		'fieldtype': u'Column Break',
+		'oldfieldtype': u'Column Break',
 		'permlevel': 0,
-		'width': '50%'
+		'width': u'50%'
 	},
 
 	# DocField
 	{
 		'allow_on_submit': 0,
-		'colour': 'White:FFF',
-		'description': 'To manage multiple series please go to Setup > Manage Series',
-		'doctype': 'DocField',
-		'fieldname': 'naming_series',
-		'fieldtype': 'Select',
+		'colour': u'White:FFF',
+		'description': u'To manage multiple series please go to Setup > Manage Series',
+		'doctype': u'DocField',
+		'fieldname': u'naming_series',
+		'fieldtype': u'Select',
 		'in_filter': 0,
-		'label': 'Series',
+		'label': u'Series',
 		'no_copy': 1,
-		'oldfieldname': 'naming_series',
-		'oldfieldtype': 'Select',
-		'options': 'STE',
+		'oldfieldname': u'naming_series',
+		'oldfieldtype': u'Select',
+		'options': u'STE',
 		'permlevel': 0,
 		'print_hide': 1,
 		'report_hide': 0,
@@ -207,15 +207,15 @@
 	# DocField
 	{
 		'allow_on_submit': 0,
-		'description': 'The date at which current entry is corrected in the system.',
-		'doctype': 'DocField',
-		'fieldname': 'amendment_date',
-		'fieldtype': 'Date',
+		'description': u'The date at which current entry is corrected in the system.',
+		'doctype': u'DocField',
+		'fieldname': u'amendment_date',
+		'fieldtype': u'Date',
 		'in_filter': 0,
-		'label': 'Amendment Date',
+		'label': u'Amendment Date',
 		'no_copy': 1,
-		'oldfieldname': 'amendment_date',
-		'oldfieldtype': 'Date',
+		'oldfieldname': u'amendment_date',
+		'oldfieldtype': u'Date',
 		'permlevel': 0,
 		'print_hide': 1,
 		'report_hide': 0,
@@ -225,73 +225,73 @@
 	# DocField
 	{
 		'allow_on_submit': 0,
-		'colour': 'White:FFF',
-		'doctype': 'DocField',
-		'fieldname': 'purpose',
-		'fieldtype': 'Select',
+		'colour': u'White:FFF',
+		'doctype': u'DocField',
+		'fieldname': u'purpose',
+		'fieldtype': u'Select',
 		'in_filter': 1,
-		'label': 'Purpose',
+		'label': u'Purpose',
 		'no_copy': 0,
-		'oldfieldname': 'purpose',
-		'oldfieldtype': 'Select',
-		'options': 'Material Issue\nMaterial Receipt\nMaterial Transfer\nSales Return\nPurchase Return\nSubcontracting\nProduction Order',
+		'oldfieldname': u'purpose',
+		'oldfieldtype': u'Select',
+		'options': u'Material Issue\nMaterial Receipt\nMaterial Transfer\nSales Return\nPurchase Return\nSubcontracting\nProduction Order\nOther',
 		'permlevel': 0,
 		'report_hide': 0,
 		'reqd': 1,
 		'search_index': 0,
-		'trigger': 'Client'
+		'trigger': u'Client'
 	},
 
 	# DocField
 	{
 		'allow_on_submit': 0,
-		'colour': 'White:FFF',
-		'doctype': 'DocField',
-		'fieldname': 'delivery_note_no',
-		'fieldtype': 'Link',
+		'colour': u'White:FFF',
+		'doctype': u'DocField',
+		'fieldname': u'delivery_note_no',
+		'fieldtype': u'Link',
 		'hidden': 1,
 		'in_filter': 0,
-		'label': 'Delivery Note No',
+		'label': u'Delivery Note No',
 		'no_copy': 0,
-		'oldfieldname': 'delivery_note_no',
-		'oldfieldtype': 'Link',
-		'options': 'Delivery Note',
+		'oldfieldname': u'delivery_note_no',
+		'oldfieldtype': u'Link',
+		'options': u'Delivery Note',
 		'permlevel': 0,
 		'print_hide': 1,
 		'report_hide': 0,
 		'search_index': 1,
-		'trigger': 'Client'
+		'trigger': u'Client'
 	},
 
 	# DocField
 	{
 		'allow_on_submit': 0,
-		'colour': 'White:FFF',
-		'doctype': 'DocField',
-		'fieldname': 'purchase_receipt_no',
-		'fieldtype': 'Link',
+		'colour': u'White:FFF',
+		'doctype': u'DocField',
+		'fieldname': u'purchase_receipt_no',
+		'fieldtype': u'Link',
 		'hidden': 1,
 		'in_filter': 0,
-		'label': 'Purchase Receipt No',
+		'label': u'Purchase Receipt No',
 		'no_copy': 0,
-		'oldfieldname': 'purchase_receipt_no',
-		'oldfieldtype': 'Link',
-		'options': 'Purchase Receipt',
+		'oldfieldname': u'purchase_receipt_no',
+		'oldfieldtype': u'Link',
+		'options': u'Purchase Receipt',
 		'permlevel': 0,
 		'print_hide': 1,
 		'report_hide': 0,
 		'search_index': 1,
-		'trigger': 'Client'
+		'trigger': u'Client'
 	},
 
 	# DocField
 	{
-		'doctype': 'DocField',
-		'fieldname': 'sales_invoice_no',
-		'fieldtype': 'Link',
+		'doctype': u'DocField',
+		'fieldname': u'sales_invoice_no',
+		'fieldtype': u'Link',
 		'hidden': 1,
-		'label': 'Sales Invoice No',
-		'options': 'Receivable Voucher',
+		'label': u'Sales Invoice No',
+		'options': u'Receivable Voucher',
 		'permlevel': 0,
 		'print_hide': 1
 	},
@@ -299,35 +299,35 @@
 	# DocField
 	{
 		'allow_on_submit': 0,
-		'colour': 'White:FFF',
-		'doctype': 'DocField',
-		'fieldname': 'supplier',
-		'fieldtype': 'Link',
+		'colour': u'White:FFF',
+		'doctype': u'DocField',
+		'fieldname': u'supplier',
+		'fieldtype': u'Link',
 		'hidden': 1,
 		'in_filter': 0,
-		'label': 'Supplier',
+		'label': u'Supplier',
 		'no_copy': 0,
-		'oldfieldname': 'supplier',
-		'oldfieldtype': 'Link',
-		'options': 'Supplier',
+		'oldfieldname': u'supplier',
+		'oldfieldtype': u'Link',
+		'options': u'Supplier',
 		'permlevel': 0,
 		'print_hide': 1,
 		'report_hide': 0,
 		'search_index': 0,
-		'trigger': 'Client'
+		'trigger': u'Client'
 	},
 
 	# DocField
 	{
 		'allow_on_submit': 0,
-		'doctype': 'DocField',
-		'fieldname': 'supplier_name',
-		'fieldtype': 'Data',
+		'doctype': u'DocField',
+		'fieldname': u'supplier_name',
+		'fieldtype': u'Data',
 		'in_filter': 0,
-		'label': 'Supplier Name',
+		'label': u'Supplier Name',
 		'no_copy': 0,
-		'oldfieldname': 'supplier_name',
-		'oldfieldtype': 'Data',
+		'oldfieldname': u'supplier_name',
+		'oldfieldtype': u'Data',
 		'permlevel': 1,
 		'report_hide': 0,
 		'search_index': 0
@@ -336,55 +336,55 @@
 	# DocField
 	{
 		'allow_on_submit': 0,
-		'colour': 'White:FFF',
-		'doctype': 'DocField',
-		'fieldname': 'supplier_address',
-		'fieldtype': 'Small Text',
+		'colour': u'White:FFF',
+		'doctype': u'DocField',
+		'fieldname': u'supplier_address',
+		'fieldtype': u'Small Text',
 		'hidden': 1,
 		'in_filter': 0,
-		'label': 'Supplier Address',
+		'label': u'Supplier Address',
 		'no_copy': 0,
-		'oldfieldname': 'supplier_address',
-		'oldfieldtype': 'Small Text',
+		'oldfieldname': u'supplier_address',
+		'oldfieldtype': u'Small Text',
 		'permlevel': 0,
 		'report_hide': 0,
 		'search_index': 0,
-		'trigger': 'Client'
+		'trigger': u'Client'
 	},
 
 	# DocField
 	{
 		'allow_on_submit': 0,
-		'colour': 'White:FFF',
-		'doctype': 'DocField',
-		'fieldname': 'customer',
-		'fieldtype': 'Link',
+		'colour': u'White:FFF',
+		'doctype': u'DocField',
+		'fieldname': u'customer',
+		'fieldtype': u'Link',
 		'hidden': 1,
 		'in_filter': 0,
-		'label': 'Customer',
+		'label': u'Customer',
 		'no_copy': 0,
-		'oldfieldname': 'customer',
-		'oldfieldtype': 'Link',
-		'options': 'Customer',
+		'oldfieldname': u'customer',
+		'oldfieldtype': u'Link',
+		'options': u'Customer',
 		'permlevel': 0,
 		'print_hide': 1,
 		'report_hide': 0,
 		'search_index': 0,
-		'trigger': 'Client'
+		'trigger': u'Client'
 	},
 
 	# DocField
 	{
 		'allow_on_submit': 0,
-		'doctype': 'DocField',
-		'fieldname': 'customer_name',
-		'fieldtype': 'Data',
+		'doctype': u'DocField',
+		'fieldname': u'customer_name',
+		'fieldtype': u'Data',
 		'hidden': 1,
 		'in_filter': 0,
-		'label': 'Customer Name',
+		'label': u'Customer Name',
 		'no_copy': 0,
-		'oldfieldname': 'customer_name',
-		'oldfieldtype': 'Data',
+		'oldfieldname': u'customer_name',
+		'oldfieldtype': u'Data',
 		'permlevel': 1,
 		'report_hide': 0,
 		'search_index': 0
@@ -393,15 +393,15 @@
 	# DocField
 	{
 		'allow_on_submit': 0,
-		'doctype': 'DocField',
-		'fieldname': 'customer_address',
-		'fieldtype': 'Small Text',
+		'doctype': u'DocField',
+		'fieldname': u'customer_address',
+		'fieldtype': u'Small Text',
 		'hidden': 1,
 		'in_filter': 0,
-		'label': 'Customer Address',
+		'label': u'Customer Address',
 		'no_copy': 0,
-		'oldfieldname': 'customer_address',
-		'oldfieldtype': 'Small Text',
+		'oldfieldname': u'customer_address',
+		'oldfieldtype': u'Small Text',
 		'permlevel': 0,
 		'report_hide': 0,
 		'search_index': 0
@@ -410,153 +410,177 @@
 	# DocField
 	{
 		'allow_on_submit': 0,
-		'colour': 'White:FFF',
-		'doctype': 'DocField',
-		'fieldname': 'process',
-		'fieldtype': 'Select',
+		'colour': u'White:FFF',
+		'doctype': u'DocField',
+		'fieldname': u'process',
+		'fieldtype': u'Select',
 		'hidden': 1,
 		'in_filter': 1,
-		'label': 'Process',
+		'label': u'Process',
 		'no_copy': 0,
-		'oldfieldname': 'process',
-		'oldfieldtype': 'Select',
-		'options': '\nMaterial Transfer\nBackflush',
+		'oldfieldname': u'process',
+		'oldfieldtype': u'Select',
+		'options': u'\nMaterial Transfer\nBackflush',
 		'permlevel': 0,
 		'print_hide': 1,
 		'report_hide': 0,
 		'search_index': 0,
-		'trigger': 'Client'
+		'trigger': u'Client'
 	},
 
 	# DocField
 	{
 		'allow_on_submit': 0,
-		'colour': 'White:FFF',
-		'doctype': 'DocField',
-		'fieldname': 'production_order',
-		'fieldtype': 'Link',
+		'colour': u'White:FFF',
+		'doctype': u'DocField',
+		'fieldname': u'production_order',
+		'fieldtype': u'Link',
 		'hidden': 1,
 		'in_filter': 1,
-		'label': 'Production Order',
+		'label': u'Production Order',
 		'no_copy': 0,
-		'oldfieldname': 'production_order',
-		'oldfieldtype': 'Link',
-		'options': 'Production Order',
+		'oldfieldname': u'production_order',
+		'oldfieldtype': u'Link',
+		'options': u'Production Order',
 		'permlevel': 0,
 		'print_hide': 1,
 		'report_hide': 0,
 		'search_index': 1,
-		'trigger': 'Client'
+		'trigger': u'Client'
 	},
 
 	# DocField
 	{
-		'allow_on_submit': 0,
-		'doctype': 'DocField',
-		'fieldname': 'fg_completed_qty',
-		'fieldtype': 'Currency',
-		'in_filter': 0,
-		'label': 'FG Completed Qty',
-		'no_copy': 0,
-		'oldfieldname': 'fg_completed_qty',
-		'oldfieldtype': 'Currency',
-		'permlevel': 0,
-		'print_hide': 1,
-		'report_hide': 0,
-		'search_index': 0,
-		'trigger': 'Client'
-	},
-
-	# DocField
-	{
-		'colour': 'White:FFF',
-		'doctype': 'DocField',
-		'fieldtype': 'HTML',
-		'label': 'Warehouse HTML',
-		'no_copy': 0,
-		'oldfieldtype': 'HTML',
-		'options': "<div class='columnHeading'>Warehouse</div>",
-		'permlevel': 0,
-		'print_hide': 1
-	},
-
-	# DocField
-	{
-		'allow_on_submit': 0,
-		'colour': 'White:FFF',
-		'doctype': 'DocField',
-		'fieldname': 'from_warehouse',
-		'fieldtype': 'Link',
-		'in_filter': 0,
-		'label': 'Source Warehouse',
-		'no_copy': 0,
-		'oldfieldname': 'from_warehouse',
-		'oldfieldtype': 'Link',
-		'options': 'Warehouse',
-		'permlevel': 0,
-		'print_hide': 1,
-		'report_hide': 0,
-		'reqd': 0,
-		'search_index': 0,
-		'trigger': 'Client'
-	},
-
-	# DocField
-	{
-		'allow_on_submit': 0,
-		'colour': 'White:FFF',
-		'description': '<b>Notes:</b> Either Source or Target is Mandatory',
-		'doctype': 'DocField',
-		'fieldname': 'to_warehouse',
-		'fieldtype': 'Link',
-		'in_filter': 0,
-		'label': 'Target Warehouse',
-		'no_copy': 0,
-		'oldfieldname': 'to_warehouse',
-		'oldfieldtype': 'Link',
-		'options': 'Warehouse',
-		'permlevel': 0,
-		'print_hide': 1,
-		'report_hide': 0,
-		'reqd': 0,
-		'search_index': 0,
-		'trigger': 'Client'
-	},
-
-	# DocField
-	{
-		'doctype': 'DocField',
-		'fieldname': 'project_name',
-		'fieldtype': 'Link',
-		'in_filter': 1,
-		'label': 'Project Name',
-		'oldfieldname': 'project_name',
-		'oldfieldtype': 'Link',
-		'options': 'Project',
+		'depends_on': u"eval:doc.purpose == 'Other'",
+		'doctype': u'DocField',
+		'fieldname': u'bom_no',
+		'fieldtype': u'Link',
+		'label': u'BOM No',
+		'options': u'Bill Of Materials',
 		'permlevel': 0
 	},
 
 	# DocField
 	{
-		'doctype': 'DocField',
-		'fieldtype': 'Column Break',
-		'oldfieldtype': 'Column Break',
-		'permlevel': 0,
-		'width': '50%'
+		'colour': u'White:FFF',
+		'depends_on': u"eval:doc.purpose == 'Other'",
+		'description': u'Select "Yes" if stock is maintained and tracked for sub-assembly items. Select "No" if you want child items of sub-assembly for material transfer.',
+		'doctype': u'DocField',
+		'fieldname': u'consider_sa_items_as_raw_materials',
+		'fieldtype': u'Select',
+		'label': u'Consider SA Items as Raw Materials',
+		'options': u'\nNo\nYes',
+		'permlevel': 0
 	},
 
 	# DocField
 	{
 		'allow_on_submit': 0,
-		'default': 'Today',
-		'doctype': 'DocField',
-		'fieldname': 'transfer_date',
-		'fieldtype': 'Date',
+		'doctype': u'DocField',
+		'fieldname': u'fg_completed_qty',
+		'fieldtype': u'Currency',
+		'in_filter': 0,
+		'label': u'FG Completed Qty',
+		'no_copy': 0,
+		'oldfieldname': u'fg_completed_qty',
+		'oldfieldtype': u'Currency',
+		'permlevel': 0,
+		'print_hide': 1,
+		'report_hide': 0,
+		'search_index': 0,
+		'trigger': u'Client'
+	},
+
+	# DocField
+	{
+		'colour': u'White:FFF',
+		'doctype': u'DocField',
+		'fieldtype': u'HTML',
+		'label': u'Warehouse HTML',
+		'no_copy': 0,
+		'oldfieldtype': u'HTML',
+		'options': u"<div class='columnHeading'>Warehouse</div>",
+		'permlevel': 0,
+		'print_hide': 1
+	},
+
+	# DocField
+	{
+		'allow_on_submit': 0,
+		'colour': u'White:FFF',
+		'doctype': u'DocField',
+		'fieldname': u'from_warehouse',
+		'fieldtype': u'Link',
+		'in_filter': 0,
+		'label': u'Source Warehouse',
+		'no_copy': 0,
+		'oldfieldname': u'from_warehouse',
+		'oldfieldtype': u'Link',
+		'options': u'Warehouse',
+		'permlevel': 0,
+		'print_hide': 1,
+		'report_hide': 0,
+		'reqd': 0,
+		'search_index': 0,
+		'trigger': u'Client'
+	},
+
+	# DocField
+	{
+		'allow_on_submit': 0,
+		'colour': u'White:FFF',
+		'description': u'<b>Notes:</b> Either Source or Target is Mandatory',
+		'doctype': u'DocField',
+		'fieldname': u'to_warehouse',
+		'fieldtype': u'Link',
+		'in_filter': 0,
+		'label': u'Target Warehouse',
+		'no_copy': 0,
+		'oldfieldname': u'to_warehouse',
+		'oldfieldtype': u'Link',
+		'options': u'Warehouse',
+		'permlevel': 0,
+		'print_hide': 1,
+		'report_hide': 0,
+		'reqd': 0,
+		'search_index': 0,
+		'trigger': u'Client'
+	},
+
+	# DocField
+	{
+		'doctype': u'DocField',
+		'fieldname': u'project_name',
+		'fieldtype': u'Link',
 		'in_filter': 1,
-		'label': 'Transfer Date',
+		'label': u'Project Name',
+		'oldfieldname': u'project_name',
+		'oldfieldtype': u'Link',
+		'options': u'Project',
+		'permlevel': 0
+	},
+
+	# DocField
+	{
+		'doctype': u'DocField',
+		'fieldtype': u'Column Break',
+		'oldfieldtype': u'Column Break',
+		'permlevel': 0,
+		'width': u'50%'
+	},
+
+	# DocField
+	{
+		'allow_on_submit': 0,
+		'default': u'Today',
+		'doctype': u'DocField',
+		'fieldname': u'transfer_date',
+		'fieldtype': u'Date',
+		'in_filter': 1,
+		'label': u'Transfer Date',
 		'no_copy': 1,
-		'oldfieldname': 'transfer_date',
-		'oldfieldtype': 'Date',
+		'oldfieldname': u'transfer_date',
+		'oldfieldtype': u'Date',
 		'permlevel': 0,
 		'print_hide': 0,
 		'report_hide': 0,
@@ -567,15 +591,15 @@
 	# DocField
 	{
 		'allow_on_submit': 0,
-		'description': 'The date at which current entry will get or has actually executed.',
-		'doctype': 'DocField',
-		'fieldname': 'posting_date',
-		'fieldtype': 'Date',
+		'description': u'The date at which current entry will get or has actually executed.',
+		'doctype': u'DocField',
+		'fieldname': u'posting_date',
+		'fieldtype': u'Date',
 		'in_filter': 1,
-		'label': 'Posting Date',
+		'label': u'Posting Date',
 		'no_copy': 1,
-		'oldfieldname': 'posting_date',
-		'oldfieldtype': 'Date',
+		'oldfieldname': u'posting_date',
+		'oldfieldtype': u'Date',
 		'permlevel': 0,
 		'print_hide': 1,
 		'report_hide': 0,
@@ -586,14 +610,14 @@
 	# DocField
 	{
 		'allow_on_submit': 0,
-		'doctype': 'DocField',
-		'fieldname': 'posting_time',
-		'fieldtype': 'Time',
+		'doctype': u'DocField',
+		'fieldname': u'posting_time',
+		'fieldtype': u'Time',
 		'in_filter': 0,
-		'label': 'Posting Time',
+		'label': u'Posting Time',
 		'no_copy': 1,
-		'oldfieldname': 'posting_time',
-		'oldfieldtype': 'Time',
+		'oldfieldname': u'posting_time',
+		'oldfieldtype': u'Time',
 		'permlevel': 0,
 		'print_hide': 1,
 		'report_hide': 0,
@@ -604,15 +628,15 @@
 	# DocField
 	{
 		'allow_on_submit': 0,
-		'doctype': 'DocField',
-		'fieldname': 'amended_from',
-		'fieldtype': 'Link',
+		'doctype': u'DocField',
+		'fieldname': u'amended_from',
+		'fieldtype': u'Link',
 		'in_filter': 0,
-		'label': 'Amended From',
+		'label': u'Amended From',
 		'no_copy': 1,
-		'oldfieldname': 'amended_from',
-		'oldfieldtype': 'Link',
-		'options': 'Stock Entry',
+		'oldfieldname': u'amended_from',
+		'oldfieldtype': u'Link',
+		'options': u'Stock Entry',
 		'permlevel': 1,
 		'print_hide': 1,
 		'report_hide': 0,
@@ -622,14 +646,14 @@
 	# DocField
 	{
 		'allow_on_submit': 0,
-		'doctype': 'DocField',
-		'fieldname': 'transporter',
-		'fieldtype': 'Data',
+		'doctype': u'DocField',
+		'fieldname': u'transporter',
+		'fieldtype': u'Data',
 		'in_filter': 0,
-		'label': 'Transporter',
+		'label': u'Transporter',
 		'no_copy': 0,
-		'oldfieldname': 'transporter',
-		'oldfieldtype': 'Data',
+		'oldfieldname': u'transporter',
+		'oldfieldtype': u'Data',
 		'permlevel': 0,
 		'print_hide': 1,
 		'report_hide': 0,
@@ -639,15 +663,15 @@
 	# DocField
 	{
 		'allow_on_submit': 0,
-		'doctype': 'DocField',
-		'fieldname': 'is_excisable_goods',
-		'fieldtype': 'Select',
+		'doctype': u'DocField',
+		'fieldname': u'is_excisable_goods',
+		'fieldtype': u'Select',
 		'in_filter': 0,
-		'label': 'Is Excisable Goods',
+		'label': u'Is Excisable Goods',
 		'no_copy': 0,
-		'oldfieldname': 'is_excisable_goods',
-		'oldfieldtype': 'Select',
-		'options': '\nYes\nNo',
+		'oldfieldname': u'is_excisable_goods',
+		'oldfieldtype': u'Select',
+		'options': u'\nYes\nNo',
 		'permlevel': 0,
 		'print_hide': 1,
 		'report_hide': 0,
@@ -657,15 +681,15 @@
 	# DocField
 	{
 		'allow_on_submit': 0,
-		'doctype': 'DocField',
-		'fieldname': 'excisable_goods',
-		'fieldtype': 'Select',
+		'doctype': u'DocField',
+		'fieldname': u'excisable_goods',
+		'fieldtype': u'Select',
 		'in_filter': 0,
-		'label': 'Excisable Goods',
+		'label': u'Excisable Goods',
 		'no_copy': 0,
-		'oldfieldname': 'excisable_goods',
-		'oldfieldtype': 'Select',
-		'options': '\nReturnable\nNon-Returnable',
+		'oldfieldname': u'excisable_goods',
+		'oldfieldtype': u'Select',
+		'options': u'\nReturnable\nNon-Returnable',
 		'permlevel': 0,
 		'print_hide': 1,
 		'report_hide': 0,
@@ -675,16 +699,16 @@
 	# DocField
 	{
 		'allow_on_submit': 0,
-		'doctype': 'DocField',
-		'fieldname': 'under_rule',
-		'fieldtype': 'Select',
+		'doctype': u'DocField',
+		'fieldname': u'under_rule',
+		'fieldtype': u'Select',
 		'hidden': 1,
 		'in_filter': 0,
-		'label': 'Under Rule',
+		'label': u'Under Rule',
 		'no_copy': 0,
-		'oldfieldname': 'under_rule',
-		'oldfieldtype': 'Select',
-		'options': '\nOrdinary\n57 AC (5) a\n57 F (2) Non-Exc.',
+		'oldfieldname': u'under_rule',
+		'oldfieldtype': u'Select',
+		'options': u'\nOrdinary\n57 AC (5) a\n57 F (2) Non-Exc.',
 		'permlevel': 0,
 		'print_hide': 1,
 		'report_hide': 0,
@@ -694,14 +718,14 @@
 	# DocField
 	{
 		'allow_on_submit': 0,
-		'doctype': 'DocField',
-		'fieldname': 'remarks',
-		'fieldtype': 'Text',
+		'doctype': u'DocField',
+		'fieldname': u'remarks',
+		'fieldtype': u'Text',
 		'in_filter': 0,
-		'label': 'Remarks',
+		'label': u'Remarks',
 		'no_copy': 1,
-		'oldfieldname': 'remarks',
-		'oldfieldtype': 'Text',
+		'oldfieldname': u'remarks',
+		'oldfieldtype': u'Text',
 		'permlevel': 0,
 		'print_hide': 1,
 		'report_hide': 0,
@@ -712,15 +736,15 @@
 	# DocField
 	{
 		'allow_on_submit': 0,
-		'doctype': 'DocField',
-		'fieldname': 'cancel_reason',
-		'fieldtype': 'Data',
+		'doctype': u'DocField',
+		'fieldname': u'cancel_reason',
+		'fieldtype': u'Data',
 		'hidden': 1,
 		'in_filter': 0,
-		'label': 'Cancel Reason',
+		'label': u'Cancel Reason',
 		'no_copy': 1,
-		'oldfieldname': 'cancel_reason',
-		'oldfieldtype': 'Data',
+		'oldfieldname': u'cancel_reason',
+		'oldfieldtype': u'Data',
 		'permlevel': 1,
 		'print_hide': 1,
 		'report_hide': 0,
@@ -730,44 +754,44 @@
 
 	# DocField
 	{
-		'doctype': 'DocField',
-		'fieldtype': 'Section Break',
-		'label': 'Items',
-		'oldfieldtype': 'Section Break',
+		'doctype': u'DocField',
+		'fieldtype': u'Section Break',
+		'label': u'Items',
+		'oldfieldtype': u'Section Break',
 		'permlevel': 0
 	},
 
 	# DocField
 	{
-		'doctype': 'DocField',
-		'fieldtype': 'Button',
-		'label': 'Get Stock and Rate',
-		'oldfieldtype': 'Button',
-		'options': 'get_stock_and_rate',
+		'doctype': u'DocField',
+		'fieldtype': u'Button',
+		'label': u'Get Stock and Rate',
+		'oldfieldtype': u'Button',
+		'options': u'get_stock_and_rate',
 		'permlevel': 0,
 		'print_hide': 1
 	},
 
 	# DocField
 	{
-		'doctype': 'DocField',
-		'fieldtype': 'Column Break',
-		'oldfieldtype': 'Column Break',
+		'doctype': u'DocField',
+		'fieldtype': u'Column Break',
+		'oldfieldtype': u'Column Break',
 		'permlevel': 0
 	},
 
 	# DocField
 	{
 		'allow_on_submit': 0,
-		'colour': 'White:FFF',
-		'doctype': 'DocField',
-		'fieldtype': 'Button',
+		'colour': u'White:FFF',
+		'doctype': u'DocField',
+		'fieldtype': u'Button',
 		'hidden': 0,
 		'in_filter': 0,
-		'label': 'Get Items',
+		'label': u'Get Items',
 		'no_copy': 0,
-		'oldfieldtype': 'Button',
-		'options': 'get_items',
+		'oldfieldtype': u'Button',
+		'options': u'get_items',
 		'permlevel': 0,
 		'print_hide': 1,
 		'report_hide': 0,
@@ -776,26 +800,26 @@
 
 	# DocField
 	{
-		'doctype': 'DocField',
-		'fieldtype': 'Section Break',
-		'oldfieldtype': 'Section Break',
-		'options': 'Simple',
+		'doctype': u'DocField',
+		'fieldtype': u'Section Break',
+		'oldfieldtype': u'Section Break',
+		'options': u'Simple',
 		'permlevel': 0
 	},
 
 	# DocField
 	{
 		'allow_on_submit': 0,
-		'colour': 'White:FFF',
-		'doctype': 'DocField',
-		'fieldname': 'mtn_details',
-		'fieldtype': 'Table',
+		'colour': u'White:FFF',
+		'doctype': u'DocField',
+		'fieldname': u'mtn_details',
+		'fieldtype': u'Table',
 		'in_filter': 0,
-		'label': 'MTN Details',
+		'label': u'MTN Details',
 		'no_copy': 0,
-		'oldfieldname': 'mtn_details',
-		'oldfieldtype': 'Table',
-		'options': 'Stock Entry Detail',
+		'oldfieldname': u'mtn_details',
+		'oldfieldtype': u'Table',
+		'options': u'Stock Entry Detail',
 		'permlevel': 0,
 		'print_hide': 0,
 		'report_hide': 0,
@@ -805,14 +829,14 @@
 	# DocField
 	{
 		'allow_on_submit': 0,
-		'doctype': 'DocField',
-		'fieldname': 'total_amount',
-		'fieldtype': 'Currency',
+		'doctype': u'DocField',
+		'fieldname': u'total_amount',
+		'fieldtype': u'Currency',
 		'in_filter': 0,
-		'label': 'Total Amount',
+		'label': u'Total Amount',
 		'no_copy': 0,
-		'oldfieldname': 'total_amount',
-		'oldfieldtype': 'Currency',
+		'oldfieldname': u'total_amount',
+		'oldfieldtype': u'Currency',
 		'permlevel': 1,
 		'print_hide': 1,
 		'report_hide': 0,
@@ -821,25 +845,25 @@
 
 	# DocField
 	{
-		'doctype': 'DocField',
-		'fieldtype': 'Section Break',
-		'label': 'Other Details',
-		'oldfieldtype': 'Section Break',
+		'doctype': u'DocField',
+		'fieldtype': u'Section Break',
+		'label': u'Other Details',
+		'oldfieldtype': u'Section Break',
 		'permlevel': 0
 	},
 
 	# DocField
 	{
 		'allow_on_submit': 0,
-		'doctype': 'DocField',
-		'fieldname': 'company',
-		'fieldtype': 'Link',
+		'doctype': u'DocField',
+		'fieldname': u'company',
+		'fieldtype': u'Link',
 		'in_filter': 1,
-		'label': 'Company',
+		'label': u'Company',
 		'no_copy': 0,
-		'oldfieldname': 'company',
-		'oldfieldtype': 'Link',
-		'options': 'Company',
+		'oldfieldname': u'company',
+		'oldfieldtype': u'Link',
+		'options': u'Company',
 		'permlevel': 0,
 		'print_hide': 1,
 		'report_hide': 0,
@@ -850,15 +874,15 @@
 	# DocField
 	{
 		'allow_on_submit': 0,
-		'doctype': 'DocField',
-		'fieldname': 'fiscal_year',
-		'fieldtype': 'Select',
+		'doctype': u'DocField',
+		'fieldname': u'fiscal_year',
+		'fieldtype': u'Select',
 		'in_filter': 0,
-		'label': 'Fiscal Year',
+		'label': u'Fiscal Year',
 		'no_copy': 0,
-		'oldfieldname': 'fiscal_year',
-		'oldfieldtype': 'Select',
-		'options': 'link:Fiscal Year',
+		'oldfieldname': u'fiscal_year',
+		'oldfieldtype': u'Select',
+		'options': u'link:Fiscal Year',
 		'permlevel': 0,
 		'print_hide': 1,
 		'report_hide': 0,
@@ -869,15 +893,15 @@
 	# DocField
 	{
 		'allow_on_submit': 0,
-		'doctype': 'DocField',
-		'fieldname': 'select_print_heading',
-		'fieldtype': 'Link',
+		'doctype': u'DocField',
+		'fieldname': u'select_print_heading',
+		'fieldtype': u'Link',
 		'in_filter': 0,
-		'label': 'Select Print Heading',
+		'label': u'Select Print Heading',
 		'no_copy': 0,
-		'oldfieldname': 'select_print_heading',
-		'oldfieldtype': 'Link',
-		'options': 'Print Heading',
+		'oldfieldname': u'select_print_heading',
+		'oldfieldtype': u'Link',
+		'options': u'Print Heading',
 		'permlevel': 0,
 		'report_hide': 0,
 		'search_index': 0
diff --git a/erpnext/support/doctype/support_ticket/listview.js b/erpnext/support/doctype/support_ticket/listview.js
index cbeb9e3..3c5258a 100644
--- a/erpnext/support/doctype/support_ticket/listview.js
+++ b/erpnext/support/doctype/support_ticket/listview.js
@@ -27,18 +27,19 @@
 		}
 		data.status_html = repl('<span class="label label-%(label_type)s">%(status)s</span>', data);
 		
+		data.description = data.description + ' | ' + data.subject;
+		
 		// description
-		if(data.description && data.description.length > 30) {
+		if(data.description && data.description.length > 50) {
 			data.description = '<span title="'+data.description+'">' + data.description.substr(0,30) + '...</span>';
 		}
 	},
 	
 	columns: [
-		{width: '5%', content:'avatar'},
 		{width: '3%', content:'docstatus'},
 		{width: '15%', content:'name'},
 		{width: '8%', content:'status_html'},		
-		{width: '60%', content:'tags+subject+description', css: {color:'#aaa'}},
+		{width: '60%', content:'tags+description', css: {color:'#aaa'}},
 		{width: '10%', content:'modified', css: {'text-align': 'right', 'color':'#777'}}
 	]
 
diff --git a/erpnext/utilities/doctype/address/address.js b/erpnext/utilities/doctype/address/address.js
index f607d51..1c2bab7 100644
--- a/erpnext/utilities/doctype/address/address.js
+++ b/erpnext/utilities/doctype/address/address.js
@@ -37,8 +37,8 @@
 }
 
 cur_frm.cscript.hide_dialog = function() {
-	var route = wn.get_route();
-	cur_frm.address_list.run();
+	if(cur_frm.address_list)
+		cur_frm.address_list.run();
 }
 
 
diff --git a/erpnext/utilities/doctype/contact/contact.js b/erpnext/utilities/doctype/contact/contact.js
index 3cbc1de..9244b79 100644
--- a/erpnext/utilities/doctype/contact/contact.js
+++ b/erpnext/utilities/doctype/contact/contact.js
@@ -38,8 +38,8 @@
 }
 
 cur_frm.cscript.hide_dialog = function() {
-	var route = wn.get_route();
-	cur_frm.contact_list.run();
+	if(cur_frm.contact_list)
+		cur_frm.contact_list.run();
 }
 
 
diff --git a/erpnext/utilities/transaction_base.py b/erpnext/utilities/transaction_base.py
index b78bed1..ee23c75 100644
--- a/erpnext/utilities/transaction_base.py
+++ b/erpnext/utilities/transaction_base.py
@@ -145,7 +145,7 @@
 	# Get Lead Details
 	# -----------------------
 	def get_lead_details(self, name):		
-		details = webnotes.conn.sql("select name, lead_name, address_line1, address_line2, city, country, state, pincode, territory, contact_no, mobile_no, email_id from `tabLead` where name = '%s'" %(name), as_dict = 1)		
+		details = webnotes.conn.sql("select name, lead_name, address_line1, address_line2, city, country, state, pincode, territory, contact_no, mobile_no, email_id, company_name from `tabLead` where name = '%s'" %(name), as_dict = 1)		
 		
 		extract = lambda x: details and details[0] and details[0].get(x,'') or ''
 		address_fields = [('','address_line1'),('\n','address_line2'),('\n','city'),(' ','pincode'),('\n','state'),('\n','country'),('\nPhone: ','contact_no')]
@@ -157,7 +157,8 @@
 			'address_display' : address_display,
 			'territory' : extract('territory'),
 			'contact_mobile' : extract('mobile_no'),
-			'contact_email' : extract('email_id')
+			'contact_email' : extract('email_id'),
+			'organization' : extract('company_name')
 		}
 		return ret
 		
diff --git a/images/redbeech.jpg b/images/redbeech.jpg
new file mode 100644
index 0000000..2480dc9
--- /dev/null
+++ b/images/redbeech.jpg
Binary files differ
diff --git a/js/all-app.js b/js/all-app.js
index 106ed1b..9d45d31 100644
--- a/js/all-app.js
+++ b/js/all-app.js
@@ -182,6 +182,9 @@
 if(cs)wn.dom.css(c,cs);if(innerHTML)c.innerHTML=innerHTML;if(onclick)c.onclick=onclick;return c;}
 wn.dom.css=function(ele,s){if(ele&&s){for(var i in s)ele.style[i]=s[i];};return ele;}
 wn.get_cookie=function(c){var t=""+document.cookie;var ind=t.indexOf(c);if(ind==-1||c=="")return"";var ind1=t.indexOf(';',ind);if(ind1==-1)ind1=t.length;return unescape(t.substring(ind+c.length+1,ind1));}
+wn.dom.set_box_shadow=function(ele,spread){$(ele).css('-moz-box-shadow','0px 0px '+spread+'px rgba(0,0,0,0.3);')
+$(ele).css('-webkit-box-shadow','0px 0px '+spread+'px rgba(0,0,0,0.3);')
+$(ele).css('-box-shadow','0px 0px '+spread+'px rgba(0,0,0,0.3);')}
 /*
  *	lib/js/wn/model.js
  */
@@ -336,16 +339,12 @@
 /*
  *	lib/js/wn/views/container.js
  */
-wn.provide('wn.pages');wn.provide('wn.views');wn.views.Container=Class.extend({init:function(){this.container=$('#body_div').get(0);this.page=null;this.pagewidth=$('#body_div').width();this.opened=[];this.pagemargin=50;},add_page:function(label,onshow,onhide){var page=$('<div class="content"></div>').css('left',this.pagewidth+this.pagemargin+'px').appendTo(this.container).get(0);if(onshow)
+wn.provide('wn.pages');wn.provide('wn.views');wn.views.Container=Class.extend({init:function(){this.container=$('#body_div').get(0);this.page=null;this.pagewidth=$('#body_div').width();this.pagemargin=50;},add_page:function(label,onshow,onhide){var page=$('<div class="content"></div>').appendTo(this.container).get(0);if(onshow)
 $(page).bind('show',onshow);if(onshow)
 $(page).bind('hide',onhide);page.label=label;wn.pages[label]=page;return page;},change_to:function(label){var me=this;if(label.tagName){var page=label;}else{var page=wn.pages[label];}
 if(!page){console.log('Page not found '+label);return;}
-if(this.page){this.move_left(page);$(this.page).trigger('hide');this.opened.push(this.page);if(!this.opened_selector)
-this.select_opened_page();}
-this.page=page;$(this.page).css('left','0px').css('top','0px');$(this.page).trigger('show');this.page._route=window.location.hash;document.title=this.page.label;this.stack();return this.page;},move_left:function(page){$(page).css('left',(-1*(this.pagewidth+this.pagemargin))+'px');},stack:function(){var me=this;var l=-1*(this.pagewidth+this.pagemargin);var i=0;this.opened=$.map(this.opened,function(p,i){if(p!=me.page)return p;});var pcontent=[];$.map(this.opened,function(p,i){$(p).css('left',l-(i*2)+'px').css('top',(i*2)+'px').css('z-index',i);});},build_open_links:function(p){var open_links=[];var me=this;$.each(me.opened.concat([me.page]),function(i,p){var route=wn.get_route(p._route);if(route[0]=='Form'){var openlist=keys(wn.views.formview[route[1]].frm.opendocs).sort();$.each(openlist,function(i,v){if(me.page!=p||(me.page==p&&me.page.frm.docname!=v)){open_links.push(repl('<p><a href="#!Form/%(dt)s/%(dn)s">%(dn)s (%(dt)s)</a></p>',{dt:route[1],dn:v}));}});}else{if(me.page!=p){open_links.push(repl('<p><a href="%(route)s">%(label)s</a></p>',{route:p._route,label:p.label}));}}});return open_links;},select_opened_page:function(){var me=this;this.opened_selector=$('<div id="opened-page-selector">\
-   <div class="popover-container"></div></div>').appendTo(this.container).hover(function(){$(this).toggleClass('active')}).click(function(){$('#opened-page-selector .popover-container').attr('data-content',me.build_open_links().reverse().join(''));$(this).find('.popover-container').popover('show');me.popoveropen=true;return false;})
-this.opened_selector.find('.popover-container').popover({title:"Open Pages",trigger:'manual',delay:0});$(document).click(function(){if(me.popoveropen){$('#opened-page-selector .popover-container').popover('hide');me.popoveropen=false;}})
-this.move_left(this.opened_selector);},show:function(label){return this.change_to(label);}});
+if(this.page){$(this.page).toggle(false);$(this.page).trigger('hide');}
+this.page=page;$(this.page).fadeIn();$(this.page).trigger('show');this.page._route=window.location.hash;document.title=this.page.label;return this.page;}})
 /*
  *	lib/js/wn/views/doclistview.js
  */
@@ -397,7 +396,7 @@
      %(label)s</a> \
     (%(count)s)</div>\
   </div>',args));this.setup_stat_item_click($item);return $item;},setup_stat_item_click:function($item){var me=this;$item.find('a').click(function(){var fieldname=$(this).attr('data-field');var label=$(this).attr('data-label');me.set_filter(fieldname,label);return false;});},set_filter:function(fieldname,label){var filter=this.filter_list.get_filter(fieldname);if(filter){var v=filter.field.get_value();if(v.indexOf(label)!=-1){return false;}else{if(fieldname=='_user_tags'){this.filter_list.add_filter(fieldname,'like','%'+label);}else{filter.set_values(fieldname,'in',v+', '+label);}}}else{if(fieldname=='_user_tags'){this.filter_list.add_filter(fieldname,'like','%'+label);}else{this.filter_list.add_filter(fieldname,'=',label);}}
-this.run();}});wn.views.ListView=Class.extend({init:function(doclistview){this.doclistview=doclistview;this.doctype=doclistview.doctype;var t="`tab"+this.doctype+"`.";this.fields=[t+'name',t+'owner',t+'docstatus',t+'_user_tags',t+'modified'];this.stats=['_user_tags'];if(!this.doclistview.can_delete){this.columns=$.map(this.columns,function(v,i){if(v.content!='check')return v});}},columns:[{width:'5%',content:'check'},{width:'5%',content:'avatar'},{width:'5%',content:'docstatus',css:{"text-align":"center"}},{width:'30%',content:'name'},{width:'40%',content:'tags',css:{'color':'#aaa'}},{width:'10%',content:'modified',css:{'text-align':'right','color':'#777'}}],render_column:function(data,parent,opts){var me=this;if(opts.css){$.each(opts.css,function(k,v){$(parent).css(k,v)});}
+this.run();}});wn.views.ListView=Class.extend({init:function(doclistview){this.doclistview=doclistview;this.doctype=doclistview.doctype;var t="`tab"+this.doctype+"`.";this.fields=[t+'name',t+'owner',t+'docstatus',t+'_user_tags',t+'modified'];this.stats=['_user_tags'];if(!this.doclistview.can_delete){this.columns=$.map(this.columns,function(v,i){if(v.content!='check')return v});}},columns:[{width:'3%',content:'check'},{width:'4%',content:'avatar'},{width:'3%',content:'docstatus',css:{"text-align":"center"}},{width:'35%',content:'name'},{width:'40%',content:'tags',css:{'color':'#aaa'}},{width:'15%',content:'modified',css:{'text-align':'right','color':'#777'}}],render_column:function(data,parent,opts){var me=this;if(opts.css){$.each(opts.css,function(k,v){$(parent).css(k,v)});}
 if(opts.content.indexOf&&opts.content.indexOf('+')!=-1){$.map(opts.content.split('+'),function(v){me.render_column(data,parent,{content:v});});return;}
 if(typeof opts.content=='function'){opts.content(parent,data);}
 else if(opts.content=='name'){$(parent).html(repl('<a href="#!Form/%(doctype)s/%(name)s">%(name)s</a>',data));}
@@ -414,7 +413,10 @@
     <span class="bar-inner %(fully_delivered)s" \
      style="width: %(percent)s%;"></span>\
    </span>',args));}
-else if(data[opts.content]){$(parent).append(' '+data[opts.content]);}},render:function(row,data){var me=this;this.prepare_data(data);rowhtml='';$.each(this.columns,function(i,v){rowhtml+=repl('<td style="width: %(width)s"></td>',v);});var tr=$(row).html('<table><tbody><tr>'+rowhtml+'</tr></tbody></table>').find('tr').get(0);$.each(this.columns,function(i,v){me.render_column(data,tr.cells[i],v);});},prepare_data:function(data){data.fullname=wn.user_info(data.owner).fullname;data.avatar=wn.user_info(data.owner).image;data.when=dateutil.str_to_user(data.modified).split(' ')[0];if(data.docstatus==0||data.docstatus==null){data.docstatus_icon='icon-pencil';data.docstatus_title='Editable';}else if(data.docstatus==1){data.docstatus_icon='icon-lock';data.docstatus_title='Submitted';}else if(data.docstatus==2){data.docstatus_icon='icon-remove';data.docstatus_title='Cancelled';}},add_user_tags:function(parent,data){var me=this;if(data._user_tags){$.each(data._user_tags.split(','),function(i,t){if(t){$('<span class="label label-info" style="cursor: pointer">'
+else if(data[opts.content]){$(parent).append(' '+data[opts.content]);}},render:function(row,data){var me=this;this.prepare_data(data);rowhtml='';$.each(this.columns,function(i,v){rowhtml+=repl('<td style="width: %(width)s"></td>',v);});var tr=$(row).html('<table><tbody><tr>'+rowhtml+'</tr></tbody></table>').find('tr').get(0);$.each(this.columns,function(i,v){me.render_column(data,tr.cells[i],v);});},prepare_data:function(data){data.fullname=wn.user_info(data.owner).fullname;data.avatar=wn.user_info(data.owner).image;data.when=dateutil.str_to_user(data.modified).split(' ')[0];var diff=dateutil.get_diff(dateutil.get_today(),data.modified.split(' ')[0]);if(diff==0){data.when='Today'}
+if(diff==-1){data.when='Yesterday'}
+if(diff==-2){data.when='2 days ago'}
+if(data.docstatus==0||data.docstatus==null){data.docstatus_icon='icon-pencil';data.docstatus_title='Editable';}else if(data.docstatus==1){data.docstatus_icon='icon-lock';data.docstatus_title='Submitted';}else if(data.docstatus==2){data.docstatus_icon='icon-remove';data.docstatus_title='Cancelled';}},add_user_tags:function(parent,data){var me=this;if(data._user_tags){$.each(data._user_tags.split(','),function(i,t){if(t){$('<span class="label label-info" style="cursor: pointer">'
 +strip(t)+'</span>').click(function(){me.doclistview.set_filter('_user_tags',$(this).text())}).appendTo(parent);}});}}})
 /*
  *	lib/js/wn/views/pageview.js
@@ -533,7 +535,7 @@
 var month_list=['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'];var month_last={1:31,2:28,3:31,4:30,5:31,6:30,7:31,8:31,9:30,10:31,11:30,12:31}
 var month_list_full=['January','February','March','April','May','June','July','August','September','October','November','December'];var week_list=['Sun','Mon','Tue','Wed','Thu','Fri','Sat'];var week_list_full=['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday'];function int_to_str(i,len){i=''+i;if(i.length<len)for(c=0;c<(len-i.length);c++)i='0'+i;return i}
 wn.datetime={str_to_obj:function(d){if(!d)return new Date();var tm=[null,null];if(d.search(' ')!=-1){var tm=d.split(' ')[1].split(':');var d=d.split(' ')[0];}
-if(d.search('-')!=-1){var t=d.split('-');return new Date(t[0],t[1]-1,t[2],tm[0],tm[1]);}else if(d.search('/')!=-1){var t=d.split('/');return new Date(t[0],t[1]-1,t[2],tm[0],tm[1]);}else{return new Date();}},obj_to_str:function(d){return d.getFullYear()+'-'+int_to_str(d.getMonth()+1,2)+'-'+int_to_str(d.getDate(),2);},obj_to_user:function(d){return dateutil.str_to_user(dateutil.obj_to_str(d));},get_diff:function(d1,d2){return((d1-d2)/86400000);},get_day_diff:function(d1,d2){return dateutil.get_diff(new Date(d1.getYear(),d1.getMonth(),d1.getDate(),0,0),new Date(d2.getYear(),d2.getMonth(),d2.getDate(),0,0))},add_days:function(d,days){d.setTime(d.getTime()+(days*24*60*60*1000));return d},add_months:function(d,months){dt=dateutil.str_to_obj(d)
+if(d.search('-')!=-1){var t=d.split('-');return new Date(t[0],t[1]-1,t[2],tm[0],tm[1]);}else if(d.search('/')!=-1){var t=d.split('/');return new Date(t[0],t[1]-1,t[2],tm[0],tm[1]);}else{return new Date();}},obj_to_str:function(d){return d.getFullYear()+'-'+int_to_str(d.getMonth()+1,2)+'-'+int_to_str(d.getDate(),2);},obj_to_user:function(d){return dateutil.str_to_user(dateutil.obj_to_str(d));},get_diff:function(d1,d2){if(typeof d1=='string')d1=dateutil.str_to_obj(d1);if(typeof d2=='string')d2=dateutil.str_to_obj(d2);return((d1-d2)/86400000);},get_day_diff:function(d1,d2){return dateutil.get_diff(new Date(d1.getYear(),d1.getMonth(),d1.getDate(),0,0),new Date(d2.getYear(),d2.getMonth(),d2.getDate(),0,0))},add_days:function(d,days){d.setTime(d.getTime()+(days*24*60*60*1000));return d},add_months:function(d,months){dt=dateutil.str_to_obj(d)
 new_dt=new Date(dt.getFullYear(),dt.getMonth()+months,dt.getDate())
 if(new_dt.getDate()!=dt.getDate()){return dateutil.month_end(new Date(dt.getFullYear(),dt.getMonth()+months,1))}
 return dateutil.obj_to_str(new_dt);},month_start:function(){var d=new Date();return d.getFullYear()+'-'+int_to_str(d.getMonth()+1,2)+'-01';},month_end:function(d){if(!d)var d=new Date();var m=d.getMonth()+1;var y=d.getFullYear();last_date=month_last[m];if(m==2&&(y%4)==0&&((y%100)!=0||(y%400)==0))
@@ -1869,8 +1871,8 @@
 if(v==null){v='';}
 var me=this;if(cell.cellIndex){var ft=hc.fieldtype;if(ft=='Link'&&cur_frm.doc.docstatus<1)ft='Data';$s(cell.div,v,ft,hc.options);}else{cell.div.style.padding='2px';cell.div.style.textAlign='left';cell.innerHTML='';var t=make_table(cell,1,3,'60px',['20px','20px','20px'],{verticalAlign:'middle',padding:'2px'});$y($td(t,0,0),{paddingLeft:'4px'});$td(t,0,0).innerHTML=cell.row.rowIndex+1;if(cur_frm.editable&&this.can_edit){var ed=$a($td(t,0,1),'i','icon-edit',{cursor:'pointer'});ed.cell=cell;ed.title='Edit Row';ed.onclick=function(){_f.cur_grid=me;_f.cur_grid_ridx=this.cell.row.rowIndex;_f.edit_record(me.doctype,this.cell.row.docname,1);}}else{cell.div.innerHTML=(cell.row.rowIndex+1);cell.div.style.cursor='default';cell.div.onclick=function(){}}}}
 $(document).bind('click',function(e){var is_target_toolbar=function(){return $(e.target).parents('.grid_tbarlinks').length;}
-var is_target_input=function(){return $(e.target).parents().get().indexOf(_f.cur_grid_cell)!=-1;}
-if(_f.cur_grid_cell&&!is_target_input()&&!is_target_toolbar()){if(!(text_dialog&&text_dialog.display)&&!datepicker_active&&!(selector&&selector.display)){_f.cur_grid_cell.grid.cell_deselect();}}});_f.Grid.prototype.cell_deselect=function(){if(_f.cur_grid_cell){var c=_f.cur_grid_cell;c.grid.remove_template(c);c.div.className='grid_cell_div';if(c.is_odd)c.div.style.border='2px solid '+c.grid.alt_row_bg;else c.div.style.border='2px solid #FFF';_f.cur_grid_cell=null;}}
+var is_target_input=function(){if(e.target.tagName.toLowerCase()=='option')return true;return $(e.target).parents().get().indexOf(_f.cur_grid_cell)!=-1;}
+if(_f.cur_grid_cell&&!is_target_input()&&!is_target_toolbar()){if(!(text_dialog&&text_dialog.display)&&!datepicker_active&&!(selector&&selector.display)){_f.cur_grid_cell.grid.cell_deselect();return false;}}});_f.Grid.prototype.cell_deselect=function(){if(_f.cur_grid_cell){var c=_f.cur_grid_cell;c.grid.remove_template(c);c.div.className='grid_cell_div';if(c.is_odd)c.div.style.border='2px solid '+c.grid.alt_row_bg;else c.div.style.border='2px solid #FFF';_f.cur_grid_cell=null;}}
 _f.Grid.prototype.cell_select=function(cell,ri,ci){if(ri!=null&&ci!=null)
 cell=this.tab.rows[ri].cells[ci];var hc=this.head_row.cells[cell.cellIndex];if(!hc.template){this.make_template(hc);}
 hc.template.perm=this.field?this.field.perm:hc.perm;if(hc.fieldname&&hc.template.get_status()=='Write'){this.cell_deselect();cell.div.style.border='2px solid #88F';_f.cur_grid_cell=cell;this.add_template(cell);}}
diff --git a/js/all-web.js b/js/all-web.js
index 86bd989..19a63e6 100644
--- a/js/all-web.js
+++ b/js/all-web.js
@@ -96,6 +96,9 @@
 if(cs)wn.dom.css(c,cs);if(innerHTML)c.innerHTML=innerHTML;if(onclick)c.onclick=onclick;return c;}
 wn.dom.css=function(ele,s){if(ele&&s){for(var i in s)ele.style[i]=s[i];};return ele;}
 wn.get_cookie=function(c){var t=""+document.cookie;var ind=t.indexOf(c);if(ind==-1||c=="")return"";var ind1=t.indexOf(';',ind);if(ind1==-1)ind1=t.length;return unescape(t.substring(ind+c.length+1,ind1));}
+wn.dom.set_box_shadow=function(ele,spread){$(ele).css('-moz-box-shadow','0px 0px '+spread+'px rgba(0,0,0,0.3);')
+$(ele).css('-webkit-box-shadow','0px 0px '+spread+'px rgba(0,0,0,0.3);')
+$(ele).css('-box-shadow','0px 0px '+spread+'px rgba(0,0,0,0.3);')}
 /*
  *	lib/js/wn/model.js
  */
@@ -250,16 +253,12 @@
 /*
  *	lib/js/wn/views/container.js
  */
-wn.provide('wn.pages');wn.provide('wn.views');wn.views.Container=Class.extend({init:function(){this.container=$('#body_div').get(0);this.page=null;this.pagewidth=$('#body_div').width();this.opened=[];this.pagemargin=50;},add_page:function(label,onshow,onhide){var page=$('<div class="content"></div>').css('left',this.pagewidth+this.pagemargin+'px').appendTo(this.container).get(0);if(onshow)
+wn.provide('wn.pages');wn.provide('wn.views');wn.views.Container=Class.extend({init:function(){this.container=$('#body_div').get(0);this.page=null;this.pagewidth=$('#body_div').width();this.pagemargin=50;},add_page:function(label,onshow,onhide){var page=$('<div class="content"></div>').appendTo(this.container).get(0);if(onshow)
 $(page).bind('show',onshow);if(onshow)
 $(page).bind('hide',onhide);page.label=label;wn.pages[label]=page;return page;},change_to:function(label){var me=this;if(label.tagName){var page=label;}else{var page=wn.pages[label];}
 if(!page){console.log('Page not found '+label);return;}
-if(this.page){this.move_left(page);$(this.page).trigger('hide');this.opened.push(this.page);if(!this.opened_selector)
-this.select_opened_page();}
-this.page=page;$(this.page).css('left','0px').css('top','0px');$(this.page).trigger('show');this.page._route=window.location.hash;document.title=this.page.label;this.stack();return this.page;},move_left:function(page){$(page).css('left',(-1*(this.pagewidth+this.pagemargin))+'px');},stack:function(){var me=this;var l=-1*(this.pagewidth+this.pagemargin);var i=0;this.opened=$.map(this.opened,function(p,i){if(p!=me.page)return p;});var pcontent=[];$.map(this.opened,function(p,i){$(p).css('left',l-(i*2)+'px').css('top',(i*2)+'px').css('z-index',i);});},build_open_links:function(p){var open_links=[];var me=this;$.each(me.opened.concat([me.page]),function(i,p){var route=wn.get_route(p._route);if(route[0]=='Form'){var openlist=keys(wn.views.formview[route[1]].frm.opendocs).sort();$.each(openlist,function(i,v){if(me.page!=p||(me.page==p&&me.page.frm.docname!=v)){open_links.push(repl('<p><a href="#!Form/%(dt)s/%(dn)s">%(dn)s (%(dt)s)</a></p>',{dt:route[1],dn:v}));}});}else{if(me.page!=p){open_links.push(repl('<p><a href="%(route)s">%(label)s</a></p>',{route:p._route,label:p.label}));}}});return open_links;},select_opened_page:function(){var me=this;this.opened_selector=$('<div id="opened-page-selector">\
-   <div class="popover-container"></div></div>').appendTo(this.container).hover(function(){$(this).toggleClass('active')}).click(function(){$('#opened-page-selector .popover-container').attr('data-content',me.build_open_links().reverse().join(''));$(this).find('.popover-container').popover('show');me.popoveropen=true;return false;})
-this.opened_selector.find('.popover-container').popover({title:"Open Pages",trigger:'manual',delay:0});$(document).click(function(){if(me.popoveropen){$('#opened-page-selector .popover-container').popover('hide');me.popoveropen=false;}})
-this.move_left(this.opened_selector);},show:function(label){return this.change_to(label);}});
+if(this.page){$(this.page).toggle(false);$(this.page).trigger('hide');}
+this.page=page;$(this.page).fadeIn();$(this.page).trigger('show');this.page._route=window.location.hash;document.title=this.page.label;return this.page;}})
 /*
  *	lib/js/wn/views/doclistview.js
  */
@@ -311,7 +310,7 @@
      %(label)s</a> \
     (%(count)s)</div>\
   </div>',args));this.setup_stat_item_click($item);return $item;},setup_stat_item_click:function($item){var me=this;$item.find('a').click(function(){var fieldname=$(this).attr('data-field');var label=$(this).attr('data-label');me.set_filter(fieldname,label);return false;});},set_filter:function(fieldname,label){var filter=this.filter_list.get_filter(fieldname);if(filter){var v=filter.field.get_value();if(v.indexOf(label)!=-1){return false;}else{if(fieldname=='_user_tags'){this.filter_list.add_filter(fieldname,'like','%'+label);}else{filter.set_values(fieldname,'in',v+', '+label);}}}else{if(fieldname=='_user_tags'){this.filter_list.add_filter(fieldname,'like','%'+label);}else{this.filter_list.add_filter(fieldname,'=',label);}}
-this.run();}});wn.views.ListView=Class.extend({init:function(doclistview){this.doclistview=doclistview;this.doctype=doclistview.doctype;var t="`tab"+this.doctype+"`.";this.fields=[t+'name',t+'owner',t+'docstatus',t+'_user_tags',t+'modified'];this.stats=['_user_tags'];if(!this.doclistview.can_delete){this.columns=$.map(this.columns,function(v,i){if(v.content!='check')return v});}},columns:[{width:'5%',content:'check'},{width:'5%',content:'avatar'},{width:'5%',content:'docstatus',css:{"text-align":"center"}},{width:'30%',content:'name'},{width:'40%',content:'tags',css:{'color':'#aaa'}},{width:'10%',content:'modified',css:{'text-align':'right','color':'#777'}}],render_column:function(data,parent,opts){var me=this;if(opts.css){$.each(opts.css,function(k,v){$(parent).css(k,v)});}
+this.run();}});wn.views.ListView=Class.extend({init:function(doclistview){this.doclistview=doclistview;this.doctype=doclistview.doctype;var t="`tab"+this.doctype+"`.";this.fields=[t+'name',t+'owner',t+'docstatus',t+'_user_tags',t+'modified'];this.stats=['_user_tags'];if(!this.doclistview.can_delete){this.columns=$.map(this.columns,function(v,i){if(v.content!='check')return v});}},columns:[{width:'3%',content:'check'},{width:'4%',content:'avatar'},{width:'3%',content:'docstatus',css:{"text-align":"center"}},{width:'35%',content:'name'},{width:'40%',content:'tags',css:{'color':'#aaa'}},{width:'15%',content:'modified',css:{'text-align':'right','color':'#777'}}],render_column:function(data,parent,opts){var me=this;if(opts.css){$.each(opts.css,function(k,v){$(parent).css(k,v)});}
 if(opts.content.indexOf&&opts.content.indexOf('+')!=-1){$.map(opts.content.split('+'),function(v){me.render_column(data,parent,{content:v});});return;}
 if(typeof opts.content=='function'){opts.content(parent,data);}
 else if(opts.content=='name'){$(parent).html(repl('<a href="#!Form/%(doctype)s/%(name)s">%(name)s</a>',data));}
@@ -328,7 +327,10 @@
     <span class="bar-inner %(fully_delivered)s" \
      style="width: %(percent)s%;"></span>\
    </span>',args));}
-else if(data[opts.content]){$(parent).append(' '+data[opts.content]);}},render:function(row,data){var me=this;this.prepare_data(data);rowhtml='';$.each(this.columns,function(i,v){rowhtml+=repl('<td style="width: %(width)s"></td>',v);});var tr=$(row).html('<table><tbody><tr>'+rowhtml+'</tr></tbody></table>').find('tr').get(0);$.each(this.columns,function(i,v){me.render_column(data,tr.cells[i],v);});},prepare_data:function(data){data.fullname=wn.user_info(data.owner).fullname;data.avatar=wn.user_info(data.owner).image;data.when=dateutil.str_to_user(data.modified).split(' ')[0];if(data.docstatus==0||data.docstatus==null){data.docstatus_icon='icon-pencil';data.docstatus_title='Editable';}else if(data.docstatus==1){data.docstatus_icon='icon-lock';data.docstatus_title='Submitted';}else if(data.docstatus==2){data.docstatus_icon='icon-remove';data.docstatus_title='Cancelled';}},add_user_tags:function(parent,data){var me=this;if(data._user_tags){$.each(data._user_tags.split(','),function(i,t){if(t){$('<span class="label label-info" style="cursor: pointer">'
+else if(data[opts.content]){$(parent).append(' '+data[opts.content]);}},render:function(row,data){var me=this;this.prepare_data(data);rowhtml='';$.each(this.columns,function(i,v){rowhtml+=repl('<td style="width: %(width)s"></td>',v);});var tr=$(row).html('<table><tbody><tr>'+rowhtml+'</tr></tbody></table>').find('tr').get(0);$.each(this.columns,function(i,v){me.render_column(data,tr.cells[i],v);});},prepare_data:function(data){data.fullname=wn.user_info(data.owner).fullname;data.avatar=wn.user_info(data.owner).image;data.when=dateutil.str_to_user(data.modified).split(' ')[0];var diff=dateutil.get_diff(dateutil.get_today(),data.modified.split(' ')[0]);if(diff==0){data.when='Today'}
+if(diff==-1){data.when='Yesterday'}
+if(diff==-2){data.when='2 days ago'}
+if(data.docstatus==0||data.docstatus==null){data.docstatus_icon='icon-pencil';data.docstatus_title='Editable';}else if(data.docstatus==1){data.docstatus_icon='icon-lock';data.docstatus_title='Submitted';}else if(data.docstatus==2){data.docstatus_icon='icon-remove';data.docstatus_title='Cancelled';}},add_user_tags:function(parent,data){var me=this;if(data._user_tags){$.each(data._user_tags.split(','),function(i,t){if(t){$('<span class="label label-info" style="cursor: pointer">'
 +strip(t)+'</span>').click(function(){me.doclistview.set_filter('_user_tags',$(this).text())}).appendTo(parent);}});}}})
 /*
  *	lib/js/wn/views/pageview.js
@@ -447,7 +449,7 @@
 var month_list=['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'];var month_last={1:31,2:28,3:31,4:30,5:31,6:30,7:31,8:31,9:30,10:31,11:30,12:31}
 var month_list_full=['January','February','March','April','May','June','July','August','September','October','November','December'];var week_list=['Sun','Mon','Tue','Wed','Thu','Fri','Sat'];var week_list_full=['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday'];function int_to_str(i,len){i=''+i;if(i.length<len)for(c=0;c<(len-i.length);c++)i='0'+i;return i}
 wn.datetime={str_to_obj:function(d){if(!d)return new Date();var tm=[null,null];if(d.search(' ')!=-1){var tm=d.split(' ')[1].split(':');var d=d.split(' ')[0];}
-if(d.search('-')!=-1){var t=d.split('-');return new Date(t[0],t[1]-1,t[2],tm[0],tm[1]);}else if(d.search('/')!=-1){var t=d.split('/');return new Date(t[0],t[1]-1,t[2],tm[0],tm[1]);}else{return new Date();}},obj_to_str:function(d){return d.getFullYear()+'-'+int_to_str(d.getMonth()+1,2)+'-'+int_to_str(d.getDate(),2);},obj_to_user:function(d){return dateutil.str_to_user(dateutil.obj_to_str(d));},get_diff:function(d1,d2){return((d1-d2)/86400000);},get_day_diff:function(d1,d2){return dateutil.get_diff(new Date(d1.getYear(),d1.getMonth(),d1.getDate(),0,0),new Date(d2.getYear(),d2.getMonth(),d2.getDate(),0,0))},add_days:function(d,days){d.setTime(d.getTime()+(days*24*60*60*1000));return d},add_months:function(d,months){dt=dateutil.str_to_obj(d)
+if(d.search('-')!=-1){var t=d.split('-');return new Date(t[0],t[1]-1,t[2],tm[0],tm[1]);}else if(d.search('/')!=-1){var t=d.split('/');return new Date(t[0],t[1]-1,t[2],tm[0],tm[1]);}else{return new Date();}},obj_to_str:function(d){return d.getFullYear()+'-'+int_to_str(d.getMonth()+1,2)+'-'+int_to_str(d.getDate(),2);},obj_to_user:function(d){return dateutil.str_to_user(dateutil.obj_to_str(d));},get_diff:function(d1,d2){if(typeof d1=='string')d1=dateutil.str_to_obj(d1);if(typeof d2=='string')d2=dateutil.str_to_obj(d2);return((d1-d2)/86400000);},get_day_diff:function(d1,d2){return dateutil.get_diff(new Date(d1.getYear(),d1.getMonth(),d1.getDate(),0,0),new Date(d2.getYear(),d2.getMonth(),d2.getDate(),0,0))},add_days:function(d,days){d.setTime(d.getTime()+(days*24*60*60*1000));return d},add_months:function(d,months){dt=dateutil.str_to_obj(d)
 new_dt=new Date(dt.getFullYear(),dt.getMonth()+months,dt.getDate())
 if(new_dt.getDate()!=dt.getDate()){return dateutil.month_end(new Date(dt.getFullYear(),dt.getMonth()+months,1))}
 return dateutil.obj_to_str(new_dt);},month_start:function(){var d=new Date();return d.getFullYear()+'-'+int_to_str(d.getMonth()+1,2)+'-01';},month_end:function(d){if(!d)var d=new Date();var m=d.getMonth()+1;var y=d.getFullYear();last_date=month_last[m];if(m==2&&(y%4)==0&&((y%100)!=0||(y%400)==0))
diff --git a/version.num b/version.num
index 6f6edae..39bc2a1 100644
--- a/version.num
+++ b/version.num
@@ -1 +1 @@
-1307
\ No newline at end of file
+1339
\ No newline at end of file