Merge pull request #21977 from scmmishra/work-order-fix-datetime

fix: use get_datetime instead of getdate
This commit is contained in:
rohitwaghchaure 2020-05-27 20:39:17 +05:30 committed by GitHub
commit dc470b5382
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -102,7 +102,7 @@ class JobCard(Document):
workstation_doc = frappe.get_cached_doc("Workstation", self.workstation)
if (not workstation_doc.working_hours or
cint(frappe.db.get_single_value("Manufacturing Settings", "allow_overtime"))):
if getdate(row.planned_end_time) < getdate(row.planned_start_time):
if get_datetime(row.planned_end_time) < get_datetime(row.planned_start_time):
row.planned_end_time = add_to_date(row.planned_start_time, minutes=row.time_in_mins)
row.remaining_time_in_mins = 0.0
else: