From a469d5695cf2ae6d4ba03015d823883235462a7d Mon Sep 17 00:00:00 2001 From: Tollef Fog Heen Date: Sun, 10 Jun 2012 20:21:53 +0200 Subject: [PATCH] Move invoice template into its own included template --- templates/invoice/invoice_detail.html | 13 +--- templates/invoice/invoice_detail_print.html | 69 +-------------------- templates/invoice/invoice_inner_detail.html | 69 +++++++++++++++++++++ 3 files changed, 72 insertions(+), 79 deletions(-) create mode 100644 templates/invoice/invoice_inner_detail.html diff --git a/templates/invoice/invoice_detail.html b/templates/invoice/invoice_detail.html index 1acff99..f98182b 100644 --- a/templates/invoice/invoice_detail.html +++ b/templates/invoice/invoice_detail.html @@ -2,17 +2,8 @@ {% block content %} - - +{% include "invoice/invoice_inner_detail.html" with rowclass="row-fluid" %} +Print {% endblock %} diff --git a/templates/invoice/invoice_detail_print.html b/templates/invoice/invoice_detail_print.html index ecbb80b..11b030d 100644 --- a/templates/invoice/invoice_detail_print.html +++ b/templates/invoice/invoice_detail_print.html @@ -24,76 +24,9 @@
- -
-
-
    -
  • {{invoice.customer.name}}
  • -
  • {{invoice.customer.address}}

  • -
- -
- -
- -
    -
  • err.no AS
  • -
  • Disengrenda 5b
  • -
  • 0587 Oslo
  • -
  • Norway
  • -
  • Foretaksregisteret NO 998 270 189
  • -
  • info@err.no
  • -
-
-
    -
  • Invoice no: {{ invoice.id }}
  • -
  • Date: {{ invoice.date|date:"Y-m-d" }}
  • -
  • Due date: {{ invoice.due_date|date:"Y-m-d" }}
  • -
- -
-
-
- -
-
- Description -
-
- Hours -
-
- Rate ({{ invoice.currency }}) -
-
- Total -
-
- {% for line in invoice.invoiceline_set.all %} -
-
- {{ line.description }} -
-
- {{ line.time }} -
-
- {{ line.hourly_rate }} -
-
- {{ line.amount }} -
-
- {% endfor %} -
{{ invoice.comment }}
- -
-
Total: {{ invoice.currency }} {{ invoice.total_sum }}
+ {% include "invoice/invoice_inner_detail.html" with rowclass="row" %} -
diff --git a/templates/invoice/invoice_inner_detail.html b/templates/invoice/invoice_inner_detail.html new file mode 100644 index 0000000..02a6035 --- /dev/null +++ b/templates/invoice/invoice_inner_detail.html @@ -0,0 +1,69 @@ + + +
+ +
+
    +
  • {{invoice.customer.name}}
  • +
  • {{invoice.customer.address}}

  • +
+ +
+ +
+ +
    +
  • err.no AS
  • +
  • Disengrenda 5b
  • +
  • 0587 Oslo
  • +
  • Norway
  • +
  • Foretaksregisteret NO 998 270 189
  • +
  • info@err.no
  • +
+
+
    +
  • Invoice no: {{ invoice.id }}
  • +
  • Date: {{ invoice.date|date:"Y-m-d" }}
  • +
  • Due date: {{ invoice.due_date|date:"Y-m-d" }}
  • +
+ +
+
+
+ +
+
+ Description +
+
+ Hours +
+
+ Rate ({{ invoice.currency }}) +
+
+ Total +
+
+{% for line in invoice.invoiceline_set.all %} +
+
+ {{ line.description }} +
+
+ {{ line.time }} +
+
+ {{ line.hourly_rate }} +
+
+ {{ line.amount }} +
+
+{% endfor %} +
{{ invoice.comment }}
+ +
+
Total: {{ invoice.currency }} {{ invoice.total_sum }}
-- 2.39.5