diff --git a/app/templates/clients/list.html b/app/templates/clients/list.html index e980be5..37b97f9 100644 --- a/app/templates/clients/list.html +++ b/app/templates/clients/list.html @@ -15,8 +15,14 @@ ) }}
| + | {% endif %} - | Name | -Contact Person | -Status | -Projects | +Name | +Contact Person | +Status | +Projects | Actions | ||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| {% endif %} - | {{ client.name }} | -{{ client.contact_person }} | -{{ client.email }} | +{{ client.name }} | +{{ client.contact_person or '—' }} | +{{ client.email or '—' }} | {% if client.status == 'active' %} - Active + Active {% else %} - Inactive + Inactive {% endif %} | @@ -101,66 +108,166 @@ | ||||
| No clients found. | -||||||||||||
| Date | -Title | -Category | -Amount | -Status | -User | -Project | -Actions | + {% if current_user.is_admin %} ++ + | + {% endif %} +Date | +Title | +Category | +Amount | +Status | +User | +Project | +Actions |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| - {{ expense.expense_date.strftime('%Y-%m-%d') }} + | ||||||||||||||||
| + | -+ {% endif %} + | {{ expense.expense_date.strftime('%Y-%m-%d') }} | +
{{ expense.title }}
{% if expense.vendor %}
- {{ expense.vendor }}
+ {{ expense.vendor }}
{% endif %}
|
- - + | + {{ expense.category|title }} | -+ | {{ expense.currency_code }} {{ '%.2f'|format(expense.total_amount) }} {% if expense.billable %} - + {% endif %} | -+ | {% if expense.status == 'pending' %} - - Pending - + Pending {% elif expense.status == 'approved' %} - - Approved - + Approved {% elif expense.status == 'rejected' %} - - Rejected - + Rejected {% elif expense.status == 'reimbursed' %} - - Reimbursed - - {% endif %} - | -- {{ expense.user.username if expense.user else '-' }} - | -- {% if expense.project %} - - {{ expense.project.name }} - + Reimbursed {% else %} - - + {{ expense.status|title }} {% endif %} | -- + | {{ expense.user.username if expense.user else '—' }} | ++ {% if expense.project %} + {{ expense.project.name }} + {% else %} + — + {% endif %} + | ++ View | |
|
-
- No expenses found - - Create your first expense - - |
- ||||||||||||||||
| Number | -Client | -Status | -Total | -Actions | + {% if current_user.is_admin %} ++ + | + {% endif %} +Number | +Client | +Status | +Total | +Due Date | +Actions |
|---|---|---|---|---|---|---|---|---|---|---|---|
| {{ invoice.invoice_number }} | -{{ invoice.client_name }} | -{{ invoice.status }} | -{{ "%.2f"|format(invoice.total_amount) }} {{ invoice.currency_code }} | -- View - | - Edit - | - + | |||||||
| + + | + {% endif %} +{{ invoice.invoice_number }} | +{{ invoice.client_name }} | ++ {% set s = invoice.status %} + {% if s == 'draft' %} + Draft + {% elif s == 'sent' %} + Sent + {% elif s == 'paid' %} + Paid + {% elif s == 'overdue' %} + Overdue + {% else %} + {{ s }} + {% endif %} + | +{{ "%.2f"|format(invoice.total_amount) }} {{ invoice.currency_code }} | ++ {% if invoice.due_date %} + {{ invoice.due_date.strftime('%Y-%m-%d') }} + {% else %} + — + {% endif %} + | ++ View | |||||
| No invoices found. | -|||||||||||
| ID | -Invoice | -Amount | -Date | -Method | -Status | -Actions | + {% if current_user.is_admin %} ++ + | + {% endif %} +ID | +Invoice | +Amount | +Date | +Method | +Status | +Actions |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| #{{ payment.id }} | -- - {{ payment.invoice.invoice_number }} - - | -- - {{ payment.amount }} {{ payment.currency or 'EUR' }} - - {% if payment.gateway_fee %} - - Fee: {{ payment.gateway_fee }} {{ payment.currency or 'EUR' }} - + | ||||||||||||
| + + | {% endif %} - -- {{ payment.payment_date.strftime('%Y-%m-%d') if payment.payment_date else 'N/A' }} - | -- - {{ payment.method or 'N/A' }} - - | -- {% if payment.status == 'completed' %} - - Completed - - {% elif payment.status == 'pending' %} - - Pending - - {% elif payment.status == 'failed' %} - - Failed - - {% elif payment.status == 'refunded' %} - - Refunded - - {% endif %} - | -- View - Edit - | -#{{ payment.id }} | ++ + {{ payment.invoice.invoice_number }} + + | +
+
+ {{ payment.amount }} {{ payment.currency or 'EUR' }}
+
+ {% if payment.gateway_fee %}
+
+ Fee: {{ payment.gateway_fee }} {{ payment.currency or 'EUR' }}
+
+ {% endif %}
+ |
+ {{ payment.payment_date.strftime('%Y-%m-%d') if payment.payment_date else '—' }} | +{{ payment.method or '—' }} | ++ {% if payment.status == 'completed' %} + Completed + {% elif payment.status == 'pending' %} + Pending + {% elif payment.status == 'failed' %} + Failed + {% elif payment.status == 'refunded' %} + Refunded + {% else %} + {{ payment.status|title }} + {% endif %} + | ++ View + | + + {% endfor %} + {% endif %}
No payments found.
- Record your first payment -| Period | -Purpose | -Location | -Days | -Amount | -Status | -Actions | + {% if current_user.is_admin %} ++ + | + {% endif %} +Period | +Purpose | +Location | +Days | +Amount | +Status | +Actions |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
- {{ claim.start_date.strftime('%Y-%m-%d') }} - to {{ claim.end_date.strftime('%Y-%m-%d') }} + | ||||||||||||||
| + | -+ {% endif %} + |
+ {{ claim.start_date.strftime('%Y-%m-%d') }} + to {{ claim.end_date.strftime('%Y-%m-%d') }} + |
+
{{ claim.trip_purpose }}
{% if claim.project %}
- {{ claim.project.name }}
+ {{ claim.project.name }}
{% endif %}
|
- - {{ claim.city + ', ' if claim.city else '' }}{{ claim.country }} - | -- {{ claim.total_days if claim.total_days else ((claim.full_days or 0) + (claim.half_days or 0) * 0.5) }} - | -- {{ claim.currency_code or 'EUR' }} {{ '%.2f'|format(claim.calculated_amount or 0) }} - | -+ | {{ claim.city + ', ' if claim.city else '' }}{{ claim.country }} | +{{ claim.total_days if claim.total_days else ((claim.full_days or 0) + (claim.half_days or 0) * 0.5) }} | +{{ claim.currency_code or 'EUR' }} {{ '%.2f'|format(claim.calculated_amount or 0) }} | +{% if claim.status == 'pending' %} - - Pending - + Pending {% elif claim.status == 'approved' %} - - Approved - + Approved {% elif claim.status == 'rejected' %} - - Rejected - + Rejected {% elif claim.status == 'reimbursed' %} - - Reimbursed - + Reimbursed + {% else %} + {{ claim.status|title }} {% endif %} | -- + | + View | |
|
-
- No per diem claims found - - Create your first claim - - |
- ||||||||||||||
| + | {% endif %} @@ -97,7 +104,7 @@ | |||
|---|---|---|---|---|
| @@ -118,18 +125,18 @@ | {{ project.client }} | {% if project.status == 'active' %} - Active + Active {% elif project.status == 'inactive' %} - Inactive + Inactive {% else %} - Archived + Archived {% endif %} | {% if project.billable %} - Billable + Billable {% else %} - Non‑billable + Non-billable {% endif %} |
@@ -151,7 +158,7 @@
{% else %}
{% set badge_classes = 'bg-green-100 text-green-700 dark:bg-green-900/30 dark:text-green-300' %}
{% endif %}
- {{ pct|round(0) }}%
+ {{ pct|round(0) }}%
{% else %}
—
{% endif %}
@@ -182,6 +189,10 @@
{% endblock %}
{% block scripts_extra %}
+
|