+
+
+ +

Добро пожаловать!

+
+ + {% if current_view == 'history' %} +
+
+

Ваши бонусы

+

{{ "%.2f"|format(user.bonuses|float) }}

+
+
+

Ваш долг

+

{{ "%.2f"|format(user.debts|float) }}

+
+
+ +
+

Ваш ID клиента

+

{{ user.id }}

+
+ +
+

История операций

+ {% if user.combined_history %} +
    + {% for item in user.combined_history %} +
  • +
    + {{ item.description }} + {{ item.date_str }} +
    + {% if item.transaction_type == 'bonus' %} + + {{ '+' if item.type == 'accrual' else '-' }}{{ "%.2f"|format(item.amount|float) }} + + {% elif item.transaction_type == 'debt' %} + + {{ '+' if item.type == 'accrual' else '-' }}{{ "%.2f"|format(item.amount|float) }} + + {% endif %} +
  • + {% endfor %} +
+ {% else %} +

Операций пока не было.

+ {% endif %} +
+ {% elif current_view == 'invoices' %} +
+

Мои накладные

+ {% if user.invoices %} +
    + {% for invoice in user.invoices|sort(attribute='date_created', reverse=True) %} +
  • + Накладная #{{ invoice.id }} + {{ invoice.date_str }} + {{ "%.2f"|format(invoice.total_amount|float) }} + +
  • + {% endfor %} +
+ {% else %} +

У вас пока нет накладных.

+ {% endif %} +
+ {% elif current_view == 'visit' %} +
+

Визитка нашей компании

+ {% if company_data %} + {% if company_data.name %} +
+ Компания: + {{ company_data.name }}
- {{ "%.2f"|format(invoice.total_amount) }} -