codacy fix

This commit is contained in:
Shreya 2018-03-22 11:56:05 +05:30
parent 559011404a
commit 822ba21f38

View File

@ -36,7 +36,7 @@ erpnext.timesheet.timer = function(frm, row, timestamp=0) {
<button class= "btn btn-primary btn-complete"> ${ __("Complete") } </button> <button class= "btn btn-primary btn-complete"> ${ __("Complete") } </button>
</div> </div>
`; `;
}; }
erpnext.timesheet.control_timer(frm, dialog, row, timestamp); erpnext.timesheet.control_timer(frm, dialog, row, timestamp);
dialog.show(); 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 // Stop the timer and update the time logged by the timer on click of 'Complete' button
$btn_complete.click(function() { $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(); var args = dialog.get_values();
grid_row.doc.completed = 1; grid_row.doc.completed = 1;
grid_row.doc.activity_type = args.activity_type; grid_row.doc.activity_type = args.activity_type;