From 194ed1842fe9ef226bd91e824e571081e7bee277 Mon Sep 17 00:00:00 2001 From: Vishnu VS Date: Thu, 13 Apr 2023 19:02:03 +0530 Subject: [PATCH] fix: update workstation hour rate --- erpnext/manufacturing/doctype/job_card/job_card.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/erpnext/manufacturing/doctype/job_card/job_card.py b/erpnext/manufacturing/doctype/job_card/job_card.py index 3133628cbf..1dc2a159fb 100644 --- a/erpnext/manufacturing/doctype/job_card/job_card.py +++ b/erpnext/manufacturing/doctype/job_card/job_card.py @@ -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()