Merge pull request #7051 from rohitwaghchaure/v7_timesheet_cleanup
cleanup timesheet and fix sales invoice total timesheet billing amount
This commit is contained in:
commit
1e3d14fda7
@ -503,9 +503,23 @@ frappe.ui.form.on('Sales Invoice Timesheet', {
|
||||
frappe.model.set_value(cdt, cdn, "billing_hours", data.billing_hours);
|
||||
frappe.model.set_value(cdt, cdn, "billing_amount", data.billing_amount);
|
||||
frappe.model.set_value(cdt, cdn, "timesheet_detail", data.timesheet_detail);
|
||||
calculate_total_billing_amount(frm)
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
var calculate_total_billing_amount = function(frm) {
|
||||
var doc = frm.doc;
|
||||
|
||||
doc.total_billing_amount = 0.0
|
||||
if(doc.timesheets) {
|
||||
$.each(doc.timesheets, function(index, data){
|
||||
doc.total_billing_amount += data.billing_amount
|
||||
})
|
||||
}
|
||||
|
||||
refresh_field('total_billing_amount')
|
||||
}
|
||||
|
@ -6,7 +6,7 @@
|
||||
"beta": 0,
|
||||
"creation": "2013-02-28 17:57:33",
|
||||
"custom": 0,
|
||||
"description": "Batch Time Logs for Billing.",
|
||||
"description": "",
|
||||
"docstatus": 0,
|
||||
"doctype": "DocType",
|
||||
"document_type": "Document",
|
||||
@ -213,7 +213,7 @@
|
||||
"collapsible": 0,
|
||||
"columns": 0,
|
||||
"depends_on": "",
|
||||
"description": "List of employee which has \"Salary Slip Based on Timesheet\" is enabled in salary structure.",
|
||||
"description": "",
|
||||
"fieldname": "employee",
|
||||
"fieldtype": "Link",
|
||||
"hidden": 0,
|
||||
@ -847,7 +847,7 @@
|
||||
"issingle": 0,
|
||||
"istable": 0,
|
||||
"max_attachments": 0,
|
||||
"modified": "2016-11-04 18:27:08.484033",
|
||||
"modified": "2016-11-23 17:35:51.194690",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Projects",
|
||||
"name": "Timesheet",
|
||||
|
Loading…
Reference in New Issue
Block a user