mirror of
https://github.com/frappe/erpnext.git
synced 2026-08-30 07:08:24 +00:00
Merge branch 'master' into develop
This commit is contained in:
@@ -136,7 +136,7 @@ calculate_end_time = function(frm, cdt, cdn){
|
||||
frappe.model.set_value(cdt, cdn, "to_time", d.format(moment.defaultDatetimeFormat));
|
||||
frm._setting_hours = false;
|
||||
|
||||
if(frm.doc.__islocal && !child.billing_hours && child.hours){
|
||||
if((frm.doc.__islocal || frm.doc.__onload.maintain_bill_work_hours_same) && child.hours){
|
||||
frappe.model.set_value(cdt, cdn, "billing_hours", child.hours);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,6 +20,9 @@ class OverlapError(frappe.ValidationError): pass
|
||||
class OverProductionLoggedError(frappe.ValidationError): pass
|
||||
|
||||
class Timesheet(Document):
|
||||
def onload(self):
|
||||
self.get("__onload").maintain_bill_work_hours_same = frappe.db.get_single_value('HR Settings', 'maintain_bill_work_hours_same')
|
||||
|
||||
def validate(self):
|
||||
self.set_employee_name()
|
||||
self.set_status()
|
||||
|
||||
Reference in New Issue
Block a user