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
This commit is contained in:
Nabin Hait 2021-03-26 10:49:39 +05:30 committed by GitHub
parent d4499277b4
commit 2a39b74ad2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 5 deletions

View File

@ -430,6 +430,7 @@ def make_material_request(source_name, target_doc=None):
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"

View File

@ -576,10 +576,10 @@ class SalarySlip(TransactionBase):
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 @@ class SalarySlip(TransactionBase):
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
])