{% extends "base.html" %} {% from "_macros.html" import attachments_card with context %} {% block title %}{{ e.code }} {{ nm(e) }}{% endblock %} {% block content %}
{{ t('Employees') }}

{{ e.code }} {{ nm(e) }} {{ t('Active' if e.state == 'active' else 'Left') }}

{{ e.job_title or '' }}{{ ' · ' ~ e.department if e.department }} · {{ branches[e.branch_id].code if e.branch_id in branches }}
{% if can_write %}
{{ t('Edit') }} {% if e.state == 'active' %} + {{ t('Leave') }} + {{ t('Loan') }} {{ t('Final settlement') }} {% endif %} {% if not slips and not leaves and not loans and not settlement %}
{% endif %}
{% endif %}
{{ t('Monthly wage') }}
{{ monthly|money(cur) }}
{{ cur }} · {{ t('Basic') }} {{ e.basic|money(cur) }}
{{ t('Annual leave balance') }}
{{ '%.1f'|format(leave_bal) }}
{{ t('days') }} · {{ leave_value|int|money(cur) }} {{ cur }}
{{ t('End of service to date') }}
{{ eosb_full|int|money(cur) }}
{{ '%.2f'|format(years) }} {{ t('years') }} · {{ t('if resigning') }} {{ eosb_resign|int|money(cur) }}
{{ t('Loan balance') }}
{{ loans|sum(attribute='balance')|money(cur) }}
{{ cur }}
{{ t('Joining date') }}
{{ e.join_date }}
{% if e.leave_date %}
{{ t('Last working day') }}
{{ e.leave_date }}
{% endif %}
{{ t('Labour law') }}
{{ t(laws[e.law]) }}{% if e.is_national %} · {{ t('National') }}{% endif %}
{{ t('Nationality') }}
{{ e.nationality or '—' }}
{{ t('Salary') }}
{{ t('Basic') }} {{ e.basic|money(cur) }} · {{ t('Housing') }} {{ e.housing|money(cur) }} · {{ t('Transport') }} {{ e.transport|money(cur) }} · {{ t('Other') }} {{ e.other_allowance|money(cur) }}
{{ t('ID / Iqama') }}
{{ e.id_number or '—' }}{% if e.id_expiry %} · {{ t('expires') }} {{ e.id_expiry }}{% endif %}
{{ t('Passport') }}
{{ e.passport_no or '—' }}{% if e.passport_expiry %} · {{ t('expires') }} {{ e.passport_expiry }}{% endif %}
{{ t('Bank') }}
{{ e.bank_name or '—' }} {{ e.iban or '' }}
{{ t('Provisions booked') }}
{{ t('End of service') }} {{ e.eosb_booked|money(cur) }} · {{ t('Vacation') }} {{ e.leave_booked|money(cur) }}
{% if settlement %}
{{ t('Final settlement') }}: {{ settlement.number }} · {{ settlement.leave_date }} · {{ settlement.net|money(cur) }} {{ cur }}
{% endif %}

{{ t('Payslips') }}

{% for s in slips %} {% else %}{% endfor %}
{{ t('Month') }}{{ t('Payroll') }}{{ t('Days') }}{{ t('Gross') }}{{ t('GOSI') }}{{ t('Loan') }}{{ t('Net pay') }}
{{ s.period }}{{ s.number }}{{ s.days|round(1) }} {{ s.gross|money(cur) }}{{ s.gosi_employee|money(cur) }}{{ s.loan_deduction|money(cur) }}{{ s.net|money(cur) }} {{ t('Payslip') }}
{{ t('Nothing yet.') }}

{{ t('Leave') }}

{% for l in leaves %} {% else %}{% endfor %}
{{ t('Number') }}{{ t('Type') }}{{ t('From') }}{{ t('To') }}{{ t('Days') }}{{ t('Status') }}
{{ l.number }}{{ t(kinds[l.kind]) }}{{ l.date_from }}{{ l.date_to }}{{ l.days|round(1) }} {{ t(l.state|capitalize) }}
{{ t('Nothing yet.') }}

{{ t('Loans & Advances') }}

{% for l in loans %} {% else %}{% endfor %}
{{ t('Number') }}{{ t('Date') }}{{ t('Amount') }}{{ t('Monthly instalment') }}{{ t('Repaid') }}{{ t('Balance') }}{{ t('Status') }}
{{ l.number }}{{ l.date }}{{ l.amount|money(cur) }}{{ l.installment|money(cur) }} {{ l.repaid|money(cur) }}{{ l.balance|money(cur) }}{% include "hr/_loan_badge.html" %}
{{ t('Nothing yet.') }}
{{ attachments_card('employee', e.id) }} {% endblock %}