feat: add Tax Free indicator columns alongside amounts in payroll register
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
95a1126139
commit
4ddfec12db
|
|
@ -26,10 +26,18 @@ DEDUCTION_TYPES = [
|
|||
]
|
||||
|
||||
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"),
|
||||
("custom_vergi_indicator", "custom_vergi_amount", "Vergi tutulmayan gəlir"),
|
||||
("custom_mdss_indicator", "custom_mdss_amount", "MDSS cəlb olunmayan gəlir"),
|
||||
(
|
||||
"custom_unemployment_insurance_indicator",
|
||||
"custom_unemployment_insurance_amount",
|
||||
"İşsizlik sığortasına cəlb olunmayan gəlir",
|
||||
),
|
||||
(
|
||||
"custom_medical_insurance_indicator",
|
||||
"custom_medical_insurance_amount",
|
||||
"İcbari tibbi sığortaya cəlb olunmayan gəlir",
|
||||
),
|
||||
]
|
||||
|
||||
|
||||
|
|
@ -90,11 +98,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))
|
||||
for indicator_field, amount_field, _label in TAX_FREE_FIELDS:
|
||||
row[indicator_field] = ss.get(indicator_field)
|
||||
amount = flt(ss.get(amount_field))
|
||||
if currency == company_currency:
|
||||
amount *= flt(ss.exchange_rate)
|
||||
row[fieldname] = amount
|
||||
row[amount_field] = amount
|
||||
|
||||
data.append(row)
|
||||
|
||||
|
|
@ -247,11 +256,20 @@ def get_columns():
|
|||
]
|
||||
)
|
||||
|
||||
for fieldname, label in TAX_FREE_FIELDS:
|
||||
for indicator_field, amount_field, label in TAX_FREE_FIELDS:
|
||||
columns.append(
|
||||
{
|
||||
"label": _(label) + " - Göstərici",
|
||||
"fieldname": indicator_field,
|
||||
"fieldtype": "Link",
|
||||
"options": "Tax Free Indicator",
|
||||
"width": 200,
|
||||
}
|
||||
)
|
||||
columns.append(
|
||||
{
|
||||
"label": _(label),
|
||||
"fieldname": fieldname,
|
||||
"fieldname": amount_field,
|
||||
"fieldtype": "Currency",
|
||||
"options": "currency",
|
||||
"width": 160,
|
||||
|
|
|
|||
Loading…
Reference in New Issue