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:
Ali 2026-03-30 21:31:37 +04:00
parent 38d3208aa4
commit ff629e7124
1 changed files with 0 additions and 8 deletions

View File

@ -137,19 +137,11 @@ def get_aggregated_employee_data(company, from_date, to_date):
agg["total_deduction"] += flt(ss.total_deduction) agg["total_deduction"] += flt(ss.total_deduction)
agg["net_pay"] += flt(ss.net_pay) 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 # Build child table rows with original fieldnames
result = [] result = []
for agg in employee_map.values(): for agg in employee_map.values():
child_row = { child_row = {
"soyadadataadı": agg["employee_name"], "soyadadataadı": agg["employee_name"],
"fin": fin_map.get(agg["employee"], ""),
"gəlirlərcəmi": agg["gross_pay"], "gəlirlərcəmi": agg["gross_pay"],
# vergiməbləği intentionally not filled # vergiməbləği intentionally not filled
"hesablanmışmdsshaqqı": (flt(agg.get(_DSMF_ISCI, 0)) + flt(agg.get(_DSMF_SIRKET, 0))) * 3, "hesablanmışmdsshaqqı": (flt(agg.get(_DSMF_ISCI, 0)) + flt(agg.get(_DSMF_SIRKET, 0))) * 3,