[buying/selling] fixes after responsive merge
diff --git a/accounts/doctype/purchase_invoice/test_purchase_invoice.py b/accounts/doctype/purchase_invoice/test_purchase_invoice.py
index ebd44d4..2ae569b 100644
--- a/accounts/doctype/purchase_invoice/test_purchase_invoice.py
+++ b/accounts/doctype/purchase_invoice/test_purchase_invoice.py
@@ -24,6 +24,7 @@
 import webnotes.defaults
 
 test_dependencies = ["Item", "Cost Center"]
+test_ignore = ["Serial No"]
 
 class TestPurchaseInvoice(unittest.TestCase):
 	def test_gl_entries_without_auto_inventory_accounting(self):
diff --git a/accounts/doctype/sales_invoice/sales_invoice.txt b/accounts/doctype/sales_invoice/sales_invoice.txt
index 8390be9..757db0a 100644
--- a/accounts/doctype/sales_invoice/sales_invoice.txt
+++ b/accounts/doctype/sales_invoice/sales_invoice.txt
@@ -2,7 +2,7 @@
  {
   "creation": "2013-05-24 19:29:05", 
   "docstatus": 0, 
-  "modified": "2013-05-28 12:43:23", 
+  "modified": "2013-05-28 18:23:35", 
   "modified_by": "Administrator", 
   "owner": "Administrator"
  }, 
@@ -31,7 +31,6 @@
   "parent": "Sales Invoice", 
   "parentfield": "permissions", 
   "parenttype": "DocType", 
-  "permlevel": 0, 
   "read": 1
  }, 
  {
@@ -259,43 +258,6 @@
   "width": "50%"
  }, 
  {
-  "doctype": "DocField", 
-  "fieldname": "net_total", 
-  "fieldtype": "Currency", 
-  "label": "Net Total*", 
-  "oldfieldname": "net_total", 
-  "oldfieldtype": "Currency", 
-  "options": "Company:company:default_currency", 
-  "print_hide": 1, 
-  "read_only": 1, 
-  "reqd": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "net_total_export", 
-  "fieldtype": "Currency", 
-  "label": "Net Total (Export)", 
-  "options": "currency", 
-  "print_hide": 0, 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "recalculate_values", 
-  "fieldtype": "Button", 
-  "label": "Re-Calculate Values", 
-  "oldfieldtype": "Button", 
-  "print_hide": 1, 
-  "read_only": 0
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "col_break25", 
-  "fieldtype": "Column Break", 
-  "read_only": 0, 
-  "width": "50%"
- }, 
- {
   "description": "Select Items from Sales Order", 
   "doctype": "DocField", 
   "fieldname": "sales_order_main", 
@@ -330,6 +292,43 @@
  }, 
  {
   "doctype": "DocField", 
+  "fieldname": "col_break25", 
+  "fieldtype": "Column Break", 
+  "read_only": 0, 
+  "width": "50%"
+ }, 
+ {
+  "doctype": "DocField", 
+  "fieldname": "recalculate_values", 
+  "fieldtype": "Button", 
+  "label": "Re-Calculate Values", 
+  "oldfieldtype": "Button", 
+  "print_hide": 1, 
+  "read_only": 0
+ }, 
+ {
+  "doctype": "DocField", 
+  "fieldname": "net_total", 
+  "fieldtype": "Currency", 
+  "label": "Net Total*", 
+  "oldfieldname": "net_total", 
+  "oldfieldtype": "Currency", 
+  "options": "Company:company:default_currency", 
+  "print_hide": 1, 
+  "read_only": 1, 
+  "reqd": 1
+ }, 
+ {
+  "doctype": "DocField", 
+  "fieldname": "net_total_export", 
+  "fieldtype": "Currency", 
+  "label": "Net Total (Export)", 
+  "options": "currency", 
+  "print_hide": 0, 
+  "read_only": 1
+ }, 
+ {
+  "doctype": "DocField", 
   "fieldname": "currency_section", 
   "fieldtype": "Section Break", 
   "label": "Price List and Currency", 
@@ -1310,19 +1309,59 @@
   "report_hide": 1
  }, 
  {
+  "amend": 0, 
+  "cancel": 0, 
+  "create": 0, 
+  "doctype": "DocPerm", 
+  "permlevel": 1, 
+  "report": 0, 
+  "role": "Accounts Manager", 
+  "submit": 0, 
+  "write": 0
+ }, 
+ {
   "amend": 1, 
   "cancel": 1, 
   "create": 1, 
   "doctype": "DocPerm", 
+  "permlevel": 0, 
+  "report": 1, 
+  "role": "Accounts Manager", 
+  "submit": 1, 
+  "write": 1
+ }, 
+ {
+  "amend": 1, 
+  "cancel": 0, 
+  "create": 1, 
+  "doctype": "DocPerm", 
+  "permlevel": 0, 
   "report": 1, 
   "role": "Accounts User", 
   "submit": 1, 
   "write": 1
  }, 
  {
+  "amend": 0, 
+  "cancel": 0, 
+  "create": 0, 
+  "doctype": "DocPerm", 
+  "permlevel": 1, 
+  "report": 0, 
+  "role": "Accounts User", 
+  "submit": 0, 
+  "write": 0
+ }, 
+ {
   "doctype": "DocPerm", 
   "match": "customer", 
-  "report": 0, 
+  "permlevel": 0, 
+  "report": 1, 
   "role": "Customer"
+ }, 
+ {
+  "doctype": "DocPerm", 
+  "permlevel": 0, 
+  "role": "Retail User"
  }
 ]
\ No newline at end of file
diff --git a/public/js/transaction.js b/public/js/transaction.js
index 1fe4121..78f792d 100644
--- a/public/js/transaction.js
+++ b/public/js/transaction.js
@@ -158,6 +158,10 @@
 		this.calculate_taxes_and_totals();
 	},
 	
+	calculate_charges: function() {
+		this.calculate_taxes_and_totals();
+	},
+	
 	included_in_print_rate: function(doc, cdt, cdn) {
 		var tax = wn.model.get_doc(cdt, cdn);
 		try {
diff --git a/stock/doctype/serial_no/test_serial_no.py b/stock/doctype/serial_no/test_serial_no.py
index fb27aa9..8ffaabc 100644
--- a/stock/doctype/serial_no/test_serial_no.py
+++ b/stock/doctype/serial_no/test_serial_no.py
@@ -81,8 +81,8 @@
 		self.assertFalse(gl_entries)
 		
 		webnotes.defaults.set_global_default("auto_inventory_accounting", 0)
-	
-	
+
+test_dependencies = ["Item"]
 test_records = [
 	[
 		{