From 822ba21f382ed69ff417b1fbdc892b7da2c5c2fb Mon Sep 17 00:00:00 2001 From: Shreya Date: Thu, 22 Mar 2018 11:56:05 +0530 Subject: [PATCH] codacy fix --- erpnext/public/js/projects/timer.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/public/js/projects/timer.js b/erpnext/public/js/projects/timer.js index 1751fc170f..78a1cf37fc 100644 --- a/erpnext/public/js/projects/timer.js +++ b/erpnext/public/js/projects/timer.js @@ -36,7 +36,7 @@ erpnext.timesheet.timer = function(frm, row, timestamp=0) { `; - }; + } erpnext.timesheet.control_timer(frm, dialog, row, timestamp); dialog.show(); }; @@ -96,7 +96,7 @@ erpnext.timesheet.control_timer = function(frm, dialog, row, timestamp=0) { // Stop the timer and update the time logged by the timer on click of 'Complete' button $btn_complete.click(function() { - var grid_row = cur_frm.fields_dict['time_logs'].grid.grid_rows_by_docname[row.name]; + var grid_row = cur_frm.fields_dict['time_logs'].grid.get_row(row.idx - 1); var args = dialog.get_values(); grid_row.doc.completed = 1; grid_row.doc.activity_type = args.activity_type;