From 9b89a034e3a7515f568456026a203adde52204a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Krop=C3=A1=C4=8Dek?= Date: Mon, 17 Feb 2025 22:46:29 +0100 Subject: [PATCH] made invoice preview using bootstrap --- invoices/templates/invoices/view.html | 78 +++++++++++---------------- 1 file changed, 30 insertions(+), 48 deletions(-) diff --git a/invoices/templates/invoices/view.html b/invoices/templates/invoices/view.html index 6799329..755406f 100644 --- a/invoices/templates/invoices/view.html +++ b/invoices/templates/invoices/view.html @@ -2,62 +2,50 @@ {% load static %} {% load i18n %} {% block title %}{% trans "Invoice" %}{% endblock %} -{% block head %} - -{% endblock %} {% block content %} -
-

{% trans "Invoice" %} {{ invoice.custom_id }}

-
-
-
-

{% trans "Supplier" %}

-
    +

    {% trans "Invoice" %} {{ invoice.custom_id }}

    +
    +
    +

    {% trans "Supplier" %}

    +
      {% with invoice.supplier_data as sd %} -
    • {{ sd.name }}
    • -
    • {{ sd.street }}
    • -
    • {{ sd.city }} - {{ sd.city_part }}, {{ sd.zip_code }}
    • -

      -
    • {% trans "CIN" %}: {{ invoice.supplier.id }}
    • +
    • {{ sd.name }}
    • +
    • {{ sd.street }}
    • +
    • {{ sd.city }} - {{ sd.city_part }}, {{ sd.zip_code }}
    • +
    • {% trans "CIN" %}: {{ invoice.supplier.id }}
    • {% if invoice.supplier.vat_id %} -
    • {% trans "VAT ID" %}: {{ invoice.supplier.vat_id }}
    • +
    • {% trans "VAT ID" %}: {{ invoice.supplier.vat_id }}
    • {% endif %} -

      -
    • {% trans "Bank Account" %}: TODO
    • +
    • {% trans "Bank Account" %}: TODO
    • {% endwith %}
    - -
    -

    {% trans "Customer" %}

    -
      +
      +

      {% trans "Customer" %}

      +
        {% with invoice.customer_data as cd %} -
      • {{ cd.name }}
      • -
      • {{ cd.street }}
      • -
      • {{ cd.city }} - {{ cd.city_part }}, {{ cd.zip_code }}
      • -

        -
      • {% trans "CIN" %}: {{ invoice.customer.id }}
      • +
      • {{ cd.name }}
      • +
      • {{ cd.street }}
      • +
      • {{ cd.city }} - {{ cd.city_part }}, {{ cd.zip_code }}
      • +
      • {% trans "CIN" %}: {{ invoice.customer.id }}
      • {% if invoice.customer.vat_id %} -
      • {% trans "VAT ID" %}: {{ invoice.customer.vat_id }}
      • +
      • {% trans "VAT ID" %}: {{ invoice.customer.vat_id }}
      • {% endif %} -

        -
      • {% trans "Invoice date" %}: {{ invoice.invoice_date }}
      • -
      • {% trans "Due date" %}: {{ invoice.due_date }}
      • +
      • {% trans "Invoice date" %}: {{ invoice.invoice_date }} +
      • +
      • {% trans "Due date" %}: {{ invoice.due_date }}
      • {% endwith %}
      -
- -

{% trans "Invoice details" %}

- +
- - - - - + + + + + @@ -72,14 +60,8 @@ {% endfor %}
{% trans "Amount" %}{% trans "Amount unit" %}{% trans "Description" %}{% trans "Price for amount" %}{% trans "Total" %}{% trans "Amount" %}{% trans "Amount unit" %}{% trans "Description" %}{% trans "Price for amount" %}{% trans "Total" %}
- -
+

{% trans "Total" %}: {{ invoice.total_price.normalize }} Kč

-
- - + {% endblock %}