fix: remove FIN lookup - Employee doctype has no 'fin' field
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
38d3208aa4
commit
ff629e7124
|
|
@ -137,19 +137,11 @@ def get_aggregated_employee_data(company, from_date, to_date):
|
|||
agg["total_deduction"] += flt(ss.total_deduction)
|
||||
agg["net_pay"] += flt(ss.net_pay)
|
||||
|
||||
# Get FIN from Employee doctype
|
||||
employee_ids = list(employee_map.keys())
|
||||
fin_map = {}
|
||||
if employee_ids:
|
||||
fin_data = frappe.get_all("Employee", filters={"name": ["in", employee_ids]}, fields=["name", "fin"])
|
||||
fin_map = {d.name: d.fin for d in fin_data}
|
||||
|
||||
# Build child table rows with original fieldnames
|
||||
result = []
|
||||
for agg in employee_map.values():
|
||||
child_row = {
|
||||
"soyadadataadı": agg["employee_name"],
|
||||
"fin": fin_map.get(agg["employee"], ""),
|
||||
"gəlirlərcəmi": agg["gross_pay"],
|
||||
# vergiməbləği intentionally not filled
|
||||
"hesablanmışmdsshaqqı": (flt(agg.get(_DSMF_ISCI, 0)) + flt(agg.get(_DSMF_SIRKET, 0))) * 3,
|
||||
|
|
|
|||
Loading…
Reference in New Issue