From 832dfe7980b3f1a47c4227897758206ab5b8e4ac Mon Sep 17 00:00:00 2001 From: Neil Trini Lasrado Date: Tue, 21 Apr 2015 15:05:37 +0530 Subject: [PATCH] fixes in Time Log Batch --- erpnext/projects/doctype/time_log/time_log_list.js | 4 ++-- .../doctype/time_log_batch/time_log_batch.js | 12 ++++++++++++ .../doctype/time_log_batch/time_log_batch.py | 2 +- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/erpnext/projects/doctype/time_log/time_log_list.js b/erpnext/projects/doctype/time_log/time_log_list.js index d4448068fa..a2eb05cfc9 100644 --- a/erpnext/projects/doctype/time_log/time_log_list.js +++ b/erpnext/projects/doctype/time_log/time_log_list.js @@ -3,7 +3,7 @@ // render frappe.listview_settings['Time Log'] = { - add_fields: ["status", "billable", "activity_type", "task", "project", "hours", "for_manufacturing"], + add_fields: ["status", "billable", "activity_type", "task", "project", "hours", "for_manufacturing", "billing_amount"], selectable: true, onload: function(me) { me.page.add_menu_item(__("Make Time Log Batch"), function() { @@ -37,7 +37,7 @@ frappe.listview_settings['Time Log'] = { $.extend(detail, { "time_log": d.name, "activity_type": d.activity_type, - "created_by": d.owner, + "billing_amount": d.billing_amount, "hours": d.hours }); }) diff --git a/erpnext/projects/doctype/time_log_batch/time_log_batch.js b/erpnext/projects/doctype/time_log_batch/time_log_batch.js index 39141ed968..6b5f08094d 100644 --- a/erpnext/projects/doctype/time_log_batch/time_log_batch.js +++ b/erpnext/projects/doctype/time_log_batch/time_log_batch.js @@ -36,3 +36,15 @@ $.extend(cur_frm.cscript, { }); } }); + +frappe.ui.form.on("Time Log Batch Detail", "time_log", function(frm, cdt, cdn) { + var tl = frm.doc.time_logs || []; + total_hr = 0; + total_amt = 0; + for(var i=0; i