Merge pull request #34998 from Vishnu7025/develop
fix: update workstation hour rate when workstation change in job card
This commit is contained in:
commit
ecc80a8504
@ -562,6 +562,7 @@ class JobCard(Document):
|
||||
)
|
||||
|
||||
def update_work_order_data(self, for_quantity, time_in_mins, wo):
|
||||
workstation_hour_rate = frappe.get_value("Workstation", self.workstation, "hour_rate")
|
||||
jc = frappe.qb.DocType("Job Card")
|
||||
jctl = frappe.qb.DocType("Job Card Time Log")
|
||||
|
||||
@ -587,6 +588,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(workstation_hour_rate)
|
||||
|
||||
wo.flags.ignore_validate_update_after_submit = True
|
||||
wo.update_operation_status()
|
||||
|
Loading…
x
Reference in New Issue
Block a user