perf: use frappe.get_value with wildcard instead of another frappe.get_doc call
This commit is contained in:
parent
74818c7b62
commit
0e5e1350b2
@ -527,7 +527,9 @@ class SalarySlip(TransactionBase):
|
|||||||
"from_date": ("<=", date_to_validate),
|
"from_date": ("<=", date_to_validate),
|
||||||
"docstatus": 1,
|
"docstatus": 1,
|
||||||
},
|
},
|
||||||
|
"*",
|
||||||
order_by="from_date desc",
|
order_by="from_date desc",
|
||||||
|
as_dict=True,
|
||||||
)
|
)
|
||||||
|
|
||||||
if not salary_structure_assignment:
|
if not salary_structure_assignment:
|
||||||
@ -539,9 +541,7 @@ class SalarySlip(TransactionBase):
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
data.update(frappe.get_doc("Salary Structure Assignment",
|
data.update(salary_structure_assignment)
|
||||||
salary_structure_assignment).as_dict())
|
|
||||||
|
|
||||||
data.update(employee)
|
data.update(employee)
|
||||||
data.update(self.as_dict())
|
data.update(self.as_dict())
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user