feat: add Tax Free amount columns to employee payroll register
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
d8539ecdc1
commit
95a1126139
|
|
@ -25,6 +25,13 @@ DEDUCTION_TYPES = [
|
|||
"Gəlir vergisi",
|
||||
]
|
||||
|
||||
TAX_FREE_FIELDS = [
|
||||
("custom_vergi_amount", "Vergi tutulmayan gəlir"),
|
||||
("custom_mdss_amount", "MDSS cəlb olunmayan gəlir"),
|
||||
("custom_unemployment_insurance_amount", "İşsizlik sığortasına cəlb olunmayan gəlir"),
|
||||
("custom_medical_insurance_amount", "İcbari tibbi sığortaya cəlb olunmayan gəlir"),
|
||||
]
|
||||
|
||||
|
||||
def execute(filters=None):
|
||||
if not filters:
|
||||
|
|
@ -83,6 +90,12 @@ def execute(filters=None):
|
|||
row["total_deduction"] = flt(ss.total_deduction)
|
||||
row["net_pay"] = flt(ss.net_pay)
|
||||
|
||||
for fieldname, _label in TAX_FREE_FIELDS:
|
||||
amount = flt(ss.get(fieldname))
|
||||
if currency == company_currency:
|
||||
amount *= flt(ss.exchange_rate)
|
||||
row[fieldname] = amount
|
||||
|
||||
data.append(row)
|
||||
|
||||
return columns, data
|
||||
|
|
@ -234,6 +247,17 @@ def get_columns():
|
|||
]
|
||||
)
|
||||
|
||||
for fieldname, label in TAX_FREE_FIELDS:
|
||||
columns.append(
|
||||
{
|
||||
"label": _(label),
|
||||
"fieldname": fieldname,
|
||||
"fieldtype": "Currency",
|
||||
"options": "currency",
|
||||
"width": 160,
|
||||
}
|
||||
)
|
||||
|
||||
return columns
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue