From: Tollef Fog Heen Date: Sun, 10 Jun 2012 18:21:53 +0000 (+0200) Subject: Move invoice template into its own included template X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a469d5695cf2ae6d4ba03015d823883235462a7d;p=peojumk Move invoice template into its own included template --- 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 }}