mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-12 17:51:20 +00:00
Merge pull request #18613 from surajshetty3416/fix-timesheet-creation
fix(timesheet): Hours automatically used to set 0
This commit is contained in:
@@ -96,7 +96,7 @@ class Timesheet(Document):
|
|||||||
|
|
||||||
for time in self.time_logs:
|
for time in self.time_logs:
|
||||||
if time.from_time and time.to_time:
|
if time.from_time and time.to_time:
|
||||||
if flt(std_working_hours) > 0:
|
if flt(std_working_hours) and date_diff(time.to_time, time.from_time):
|
||||||
time.hours = flt(std_working_hours) * date_diff(time.to_time, time.from_time)
|
time.hours = flt(std_working_hours) * date_diff(time.to_time, time.from_time)
|
||||||
else:
|
else:
|
||||||
if not time.hours:
|
if not time.hours:
|
||||||
|
|||||||
Reference in New Issue
Block a user