mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-26 08:24:47 +00:00
perf: use frappe.get_value with wildcard instead of another frappe.get_doc call
This commit is contained in:
@@ -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())
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user