fix: Fixes on job card and salary slip (#25011)
* fix: map conversion factor while making stock entry from job card
* fix: fetch additional salary in salary slip
diff --git a/erpnext/manufacturing/doctype/job_card/job_card.py b/erpnext/manufacturing/doctype/job_card/job_card.py
index 7aaf2a0..d2ac712 100644
--- a/erpnext/manufacturing/doctype/job_card/job_card.py
+++ b/erpnext/manufacturing/doctype/job_card/job_card.py
@@ -430,6 +430,7 @@
def make_stock_entry(source_name, target_doc=None):
def update_item(obj, target, source_parent):
target.t_warehouse = source_parent.wip_warehouse
+ target.conversion_factor = 1
def set_missing_values(source, target):
target.purpose = "Material Transfer for Manufacture"
diff --git a/erpnext/payroll/doctype/salary_slip/salary_slip.py b/erpnext/payroll/doctype/salary_slip/salary_slip.py
index 55e1c63..0053c0c 100644
--- a/erpnext/payroll/doctype/salary_slip/salary_slip.py
+++ b/erpnext/payroll/doctype/salary_slip/salary_slip.py
@@ -576,10 +576,10 @@
continue
if (
- not d.additional_salary
- and (not additional_salary or additional_salary.overwrite)
- or additional_salary
- and additional_salary.name == d.additional_salary
+ (not d.additional_salary
+ and (not additional_salary or additional_salary.overwrite))
+ or (additional_salary
+ and additional_salary.name == d.additional_salary)
):
component_row = d
break
@@ -589,7 +589,7 @@
self.set(component_type, [
d for d in self.get(component_type)
if d.salary_component != component_data.salary_component
- or d.additional_salary and additional_salary.name != d.additional_salary
+ or (d.additional_salary and additional_salary.name != d.additional_salary)
or d == component_row
])