fix: update workstation hour rate

This commit is contained in:
Vishnu VS 2023-04-13 19:02:03 +05:30 committed by GitHub
parent a06d24037b
commit 194ed1842f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -516,6 +516,7 @@ class JobCard(Document):
)
def update_work_order_data(self, for_quantity, time_in_mins, wo):
ws_hr_rate = frappe.get_value("Workstation", self.workstation, "hour_rate")
jc = frappe.qb.DocType("Job Card")
jctl = frappe.qb.DocType("Job Card Time Log")
@ -541,6 +542,7 @@ class JobCard(Document):
if data.get("workstation") != self.workstation:
# workstations can change in a job card
data.workstation = self.workstation
data.hour_rate = flt(ws_hr_rate)
wo.flags.ignore_validate_update_after_submit = True
wo.update_operation_status()