rename total_billing_amount to total_billable_amount in timesheet doctype
diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py
index 2e38927..99c869d 100644
--- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py
+++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py
@@ -464,8 +464,8 @@
 			if not timesheet.billing_hours and ts_doc.total_billing_hours:
 				timesheet.billing_hours = ts_doc.total_billing_hours
 
-			if not timesheet.billing_amount and ts_doc.total_billing_amount:
-				timesheet.billing_amount = ts_doc.total_billing_amount
+			if not timesheet.billing_amount and ts_doc.total_billable_amount:
+				timesheet.billing_amount = ts_doc.total_billable_amount
 
 	def update_timesheet_billing_for_project(self):
 		if not self.timesheets and self.project:
diff --git a/erpnext/demo/user/projects.py b/erpnext/demo/user/projects.py
index 505ccfd..9802447 100644
--- a/erpnext/demo/user/projects.py
+++ b/erpnext/demo/user/projects.py
@@ -22,7 +22,7 @@
 		ts = make_timesheet(employee, simulate = True, billable = 1,
 			activity_type=get_random("Activity Type"), project=data.project, task =data.name)
 
-		if flt(ts.total_billing_amount) > 0.0:
+		if flt(ts.total_billable_amount) > 0.0:
 			make_sales_invoice_for_timesheet(ts.name)
 			frappe.db.commit()
 
diff --git a/erpnext/patches.txt b/erpnext/patches.txt
index d38ed34..802e045 100644
--- a/erpnext/patches.txt
+++ b/erpnext/patches.txt
@@ -295,7 +295,8 @@
 erpnext.patches.v7_0.rename_time_sheet_doctype
 execute:frappe.delete_doc_if_exists("Report", "Customers Not Buying Since Long Time")
 erpnext.patches.v7_0.make_is_group_fieldtype_as_check
-execute:frappe.reload_doc('projects', 'doctype', 'timesheet') #2016-09-09
+execute:frappe.reload_doc('projects', 'doctype', 'timesheet') #2016-09-12
+erpnext.patches.v7_1.rename_field_timesheet
 execute:frappe.delete_doc_if_exists("Report", "Employee Holiday Attendance")
 execute:frappe.delete_doc_if_exists("DocType", "Payment Tool")
 execute:frappe.delete_doc_if_exists("DocType", "Payment Tool Detail")
diff --git a/erpnext/patches/v7_0/move_timelogbatch_from_salesinvoiceitem_to_salesinvoicetimesheet.py b/erpnext/patches/v7_0/move_timelogbatch_from_salesinvoiceitem_to_salesinvoicetimesheet.py
index 695c552..a365f65 100644
--- a/erpnext/patches/v7_0/move_timelogbatch_from_salesinvoiceitem_to_salesinvoicetimesheet.py
+++ b/erpnext/patches/v7_0/move_timelogbatch_from_salesinvoiceitem_to_salesinvoicetimesheet.py
@@ -3,12 +3,12 @@
 def execute():
 	frappe.reload_doc('accounts', 'doctype', 'sales_invoice')
 	frappe.reload_doc('accounts', 'doctype', 'sales_invoice_payment')
-	for time_sheet in frappe.db.sql(""" select sales_invoice, name, total_billing_amount from `tabTimesheet`
+	for time_sheet in frappe.db.sql(""" select sales_invoice, name, total_billable_amount from `tabTimesheet`
 		where sales_invoice is not null and docstatus < 2""", as_dict=True):
 		si_doc = frappe.get_doc('Sales Invoice', time_sheet.sales_invoice)
 		ts = si_doc.append('timesheets',{})
 		ts.time_sheet = time_sheet.name
-		ts.billing_amount = time_sheet.total_billing_amount
+		ts.billing_amount = time_sheet.total_billable_amount
 		si_doc.update_time_sheet(time_sheet.sales_invoice)
 		si_doc.flags.ignore_validate_update_after_submit = True
 		si_doc.save()
\ No newline at end of file
diff --git a/erpnext/patches/v7_1/move_sales_invoice_from_parent_to_child_timesheet.py b/erpnext/patches/v7_1/move_sales_invoice_from_parent_to_child_timesheet.py
index 67e88e6..d1ec7c6 100644
--- a/erpnext/patches/v7_1/move_sales_invoice_from_parent_to_child_timesheet.py
+++ b/erpnext/patches/v7_1/move_sales_invoice_from_parent_to_child_timesheet.py
@@ -13,7 +13,7 @@
 		) as sit
 		set 
 			ts.total_billed_amount = sit.billing_amount, ts.total_billed_hours = sit.billing_hours, 
-			ts.per_billed = ((sit.billing_amount * 100)/ts.total_billing_amount)
+			ts.per_billed = ((sit.billing_amount * 100)/ts.total_billable_amount)
 		where ts.name = sit.time_sheet and ts.docstatus = 1""")
 
 	frappe.db.sql(""" update `tabTimesheet Detail` tsd, `tabTimesheet` ts set tsd.sales_invoice = ts.sales_invoice
diff --git a/erpnext/patches/v7_1/rename_field_timesheet.py b/erpnext/patches/v7_1/rename_field_timesheet.py
new file mode 100644
index 0000000..1957545
--- /dev/null
+++ b/erpnext/patches/v7_1/rename_field_timesheet.py
@@ -0,0 +1,8 @@
+from __future__ import unicode_literals
+import frappe
+from frappe.model.utils.rename_field import rename_field
+
+def execute():
+	doctype = 'Timesheet'
+	if "total_billing_amount" in frappe.db.get_table_columns(doctype):
+		rename_field(doctype, 'total_billing_amount', 'total_billable_amount')
\ No newline at end of file
diff --git a/erpnext/patches/v7_1/update_total_billing_hours.py b/erpnext/patches/v7_1/update_total_billing_hours.py
index a38b88d..68222c4 100644
--- a/erpnext/patches/v7_1/update_total_billing_hours.py
+++ b/erpnext/patches/v7_1/update_total_billing_hours.py
@@ -6,7 +6,7 @@
 	frappe.reload_doc('accounts', 'doctype', 'sales_invoice_timesheet')
 
 	frappe.db.sql("""update tabTimesheet set total_billing_hours=total_hours 
-		where total_billing_amount>0 and docstatus = 1""")
+		where total_billable_amount>0 and docstatus = 1""")
 
 	frappe.db.sql("""update `tabTimesheet Detail` set billing_hours=hours where docstatus < 2""")
 
diff --git a/erpnext/projects/doctype/timesheet/test_timesheet.py b/erpnext/projects/doctype/timesheet/test_timesheet.py
index 1e7be41..22bb276 100644
--- a/erpnext/projects/doctype/timesheet/test_timesheet.py
+++ b/erpnext/projects/doctype/timesheet/test_timesheet.py
@@ -20,6 +20,7 @@
 		self.assertEquals(timesheet.total_billing_hours, 2)
 		self.assertEquals(timesheet.time_logs[0].billing_rate, 50)
 		self.assertEquals(timesheet.time_logs[0].billing_amount, 100)
+		self.assertEquals(timesheet.total_billable_amount, 100)
 
 	def test_salary_slip_from_timesheet(self):
 		salary_structure = make_salary_structure("_T-Employee-0001")
diff --git a/erpnext/projects/doctype/timesheet/timesheet.js b/erpnext/projects/doctype/timesheet/timesheet.js
index c591ccb..1b6f956 100644
--- a/erpnext/projects/doctype/timesheet/timesheet.js
+++ b/erpnext/projects/doctype/timesheet/timesheet.js
@@ -25,7 +25,7 @@
 		frm.fields_dict['time_logs'].grid.get_field('project').get_query = function() {
 			return{
 				filters: {
-					'status': frm.doc.company
+					'company': frm.doc.company
 				}
 			}
 		}
@@ -159,12 +159,12 @@
 	var tl = frm.doc.time_logs || [];
 	total_working_hr = 0;
 	total_billing_hr = 0;
-	total_billing_amount = 0;
+	total_billable_amount = 0;
 	total_costing_amount = 0;
 	for(var i=0; i<tl.length; i++) {
 		if (tl[i].hours) {
 			total_working_hr += tl[i].hours;
-			total_billing_amount += tl[i].billing_amount;
+			total_billable_amount += tl[i].billing_amount;
 			total_costing_amount += tl[i].costing_amount;
 
 			if(tl[i].billable){
@@ -175,6 +175,6 @@
 
 	cur_frm.set_value("total_billing_hours", total_billing_hr);
 	cur_frm.set_value("total_hours", total_working_hr);
-	cur_frm.set_value("total_billing_amount", total_billing_amount);
+	cur_frm.set_value("total_billable_amount", total_billable_amount);
 	cur_frm.set_value("total_costing_amount", total_costing_amount);
 }
\ No newline at end of file
diff --git a/erpnext/projects/doctype/timesheet/timesheet.json b/erpnext/projects/doctype/timesheet/timesheet.json
index f58610a..fd99e9a 100644
--- a/erpnext/projects/doctype/timesheet/timesheet.json
+++ b/erpnext/projects/doctype/timesheet/timesheet.json
@@ -655,14 +655,14 @@
    "default": "0", 
    "depends_on": "", 
    "description": "", 
-   "fieldname": "total_billing_amount", 
+   "fieldname": "total_billable_amount", 
    "fieldtype": "Float", 
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
    "in_filter": 0, 
    "in_list_view": 0, 
-   "label": "Total Billing Amount", 
+   "label": "Total Billable Amount", 
    "length": 0, 
    "no_copy": 0, 
    "permlevel": 0, 
@@ -817,7 +817,7 @@
  "issingle": 0, 
  "istable": 0, 
  "max_attachments": 0, 
- "modified": "2016-09-09 03:53:17.544760", 
+ "modified": "2016-09-12 18:35:01.578750", 
  "modified_by": "Administrator", 
  "module": "Projects", 
  "name": "Timesheet", 
diff --git a/erpnext/projects/doctype/timesheet/timesheet.py b/erpnext/projects/doctype/timesheet/timesheet.py
index 9d0371e..ba5210d 100644
--- a/erpnext/projects/doctype/timesheet/timesheet.py
+++ b/erpnext/projects/doctype/timesheet/timesheet.py
@@ -31,7 +31,7 @@
 		self.total_hours = 0.0
 		self.total_billing_hours = 0.0
 		self.total_billed_hours = 0.0
-		self.total_billing_amount = 0.0
+		self.total_billable_amount = 0.0
 		self.total_costing_amount = 0.0
 		self.total_billed_amount = 0.0
 
@@ -41,15 +41,15 @@
 			self.total_hours += flt(d.hours)
 			if d.billable:
 				self.total_billing_hours += flt(d.billing_hours)
-				self.total_billing_amount += flt(d.billing_amount)
+				self.total_billable_amount += flt(d.billing_amount)
 				self.total_costing_amount += flt(d.costing_amount)
 				self.total_billed_amount += flt(d.billing_amount) if d.sales_invoice else 0.0
 				self.total_billed_hours += flt(d.billing_hours) if d.sales_invoice else 0.0
 
 	def calculate_percentage_billed(self):
 		self.per_billed = 0
-		if self.total_billed_amount > 0 and self.total_billing_amount > 0:
-			self.per_billed = (self.total_billed_amount * 100) / self.total_billing_amount
+		if self.total_billed_amount > 0 and self.total_billable_amount > 0:
+			self.per_billed = (self.total_billed_amount * 100) / self.total_billable_amount
 
 	def update_billing_hours(self, args):
 		if cint(args.billing_hours) == 0:
@@ -276,7 +276,7 @@
 	return frappe.db.sql("""select distinct tsd.parent from `tabTimesheet Detail` tsd,
 			`tabTimesheet` ts where 
 			ts.status in ('Submitted', 'Payslip') and tsd.parent = ts.name and 
-			tsd.docstatus = 1 and ts.total_billing_amount > 0 
+			tsd.docstatus = 1 and ts.total_billable_amount > 0 
 			and tsd.parent LIKE %(txt)s {condition}
 			order by tsd.parent limit %(start)s, %(page_len)s"""
 			.format(condition=condition), {
@@ -290,7 +290,7 @@
 		data = get_projectwise_timesheet_data(project, name)
 	else:
 		data = frappe.get_all('Timesheet', 
-			fields = ["(total_billing_amount - total_billed_amount) as billing_amt", "total_billing_hours as billing_hours"], filters = {'name': name})
+			fields = ["(total_billable_amount - total_billed_amount) as billing_amt", "total_billing_hours as billing_hours"], filters = {'name': name})
 
 	return {
 		'billing_hours': data[0].billing_hours,
@@ -306,10 +306,10 @@
 	target.append('timesheets', {
 		'time_sheet': timesheet.name,
 		'billing_hours': flt(timesheet.total_billing_hours) - flt(timesheet.total_billed_hours),
-		'billing_amount': flt(timesheet.total_billing_amount) - flt(timesheet.total_billed_amount)
+		'billing_amount': flt(timesheet.total_billable_amount) - flt(timesheet.total_billed_amount)
 	})
 
-	target.run_method("calculate_billing_amount_from_timesheet")
+	target.run_method("calculate_billing_amount_for_timesheet")
 
 	return target