-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #175 from meomancer/164
update invoice layout
- Loading branch information
Showing
7 changed files
with
329 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
68 changes: 68 additions & 0 deletions
68
django_project/kartoza_theme/templates/shop/billing_shipping.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
{% extends "shop/checkout.html" %} | ||
{% load staticfiles i18n mezzanine_tags %} | ||
|
||
{% block extra_head %} | ||
{{ block.super }} | ||
<script src="{% static "cartridge/js/shipping_fields.js" %}"></script> | ||
{% endblock %} | ||
|
||
{% block fields %} | ||
{% if request.cart.has_items %} | ||
{% if not request.user.is_authenticated %} | ||
{% ifinstalled mezzanine.accounts %} | ||
<p> | ||
{% url "login" as login_url %} | ||
{% url "signup" as signup_url %} | ||
{% with request.path as next %} | ||
{% blocktrans %} | ||
If you have an existing account or would like to create one, please | ||
<a href="{{ login_url }}?next={{ next }}">log in</a> or | ||
<a href="{{ signup_url }}?next={{ next }}">sign up</a>. | ||
{% endblocktrans %} | ||
{% endwith %} | ||
</p> | ||
{% endifinstalled %} | ||
{% endif %} | ||
|
||
{% errors_for form %} | ||
|
||
<fieldset> | ||
<legend>{% trans "Billing Details" %}</legend> | ||
{% fields_for form.billing_detail_fields %} | ||
</fieldset> | ||
|
||
<fieldset> | ||
<legend>{% trans "Delivery Details" %}</legend> | ||
{% fields_for form.same_billing_shipping_field %} | ||
<div id="shipping_fields">{% fields_for form.shipping_detail_fields %}</div> | ||
{% fields_for form.additional_instructions_field %} | ||
{% fields_for form.remember_field %} | ||
</fieldset> | ||
|
||
{% if not settings.SHOP_CHECKOUT_STEPS_SPLIT and settings.SHOP_PAYMENT_STEP_ENABLED %} | ||
{% include "shop/includes/payment_fields.html" %} | ||
{% endif %} | ||
|
||
{% fields_for form.other_fields %} | ||
|
||
{% endif %} | ||
{% endblock %} | ||
|
||
|
||
{% block extra_js %} | ||
<script> | ||
$(document).ready(function () { | ||
var phone_pattern = '^0.*$'; | ||
{# billing #} | ||
$phone_label = $('.input_id_billing_detail_phone label'); | ||
$phone_label.html($phone_label.html() + " <i>(with leading 0)</i>"); | ||
$phone_input = $('.input_id_billing_detail_phone input'); | ||
$phone_input.attr('pattern', phone_pattern); | ||
{# shipping #} | ||
$phone_label = $('.input_id_shipping_detail_phone label'); | ||
$phone_label.html($phone_label.html() + " <i>(with leading 0)</i>"); | ||
$phone_input = $('.input_id_shipping_detail_phone input'); | ||
$phone_input.attr('pattern', phone_pattern); | ||
}); | ||
</script> | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
178 changes: 178 additions & 0 deletions
178
django_project/kartoza_theme/templates/shop/includes/order_details.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,178 @@ | ||
{% load shop_tags i18n %} | ||
|
||
{% block extra_css %} | ||
<style> | ||
table { | ||
border-collapse: collapse | ||
} | ||
|
||
a { | ||
text-decoration: none; | ||
} | ||
|
||
.container { | ||
margin: auto; | ||
padding-bottom: 20px; | ||
width: 800px; | ||
} | ||
|
||
.left-title { | ||
color: #8C8B8B; | ||
font-size: 42px; | ||
font-family: 'Leto', sans-serif; | ||
font-weight: 900; | ||
} | ||
|
||
.left-title img { | ||
margin-top: 5px; | ||
height: 46px; | ||
width: 55px; | ||
} | ||
|
||
.left-title-desc { | ||
font-size: 12px; | ||
} | ||
|
||
.big-title { | ||
color: #8C8B8B; | ||
font-size: 36px; | ||
font-weight: bold; | ||
margin-top: 10px; | ||
margin-bottom: 12px; | ||
} | ||
|
||
.right-title .big-title { | ||
margin-top: 20px; | ||
} | ||
|
||
.bordered th, .bordered td { | ||
border: solid 1px #8C8B8B; | ||
} | ||
|
||
.bordered th { | ||
background-color: #ededed; | ||
} | ||
|
||
.borderless th, .borderless td { | ||
border: none; | ||
} | ||
|
||
.borderless th { | ||
background-color: white; | ||
} | ||
|
||
.download-button { | ||
background: #384452; | ||
border-radius: 50%; | ||
bottom: 20px; | ||
cursor: pointer; | ||
height: 20px; | ||
position: absolute; | ||
right: 20px; | ||
width: 20px; | ||
padding: 20px; | ||
} | ||
|
||
.download-button img { | ||
width: 20px; | ||
height: 20px; | ||
} | ||
|
||
.download-button:hover { | ||
background: #3e6693; | ||
|
||
} | ||
|
||
</style> | ||
{% endblock %} | ||
<div class="download-button" onClick="window.print()"> | ||
<img src="/static/img/save.png"> | ||
</div> | ||
<div class="container"> | ||
<table width="100%" cellspacing="0" cellpadding="10"> | ||
<tr> | ||
<td align="left" width="60%" valign="top" style="padding-right: 30px;"> | ||
<span class="left-title"><img src="/static/img/kartoza-logo-only.png"> Kartoza</span> | ||
<p class="left-title-desc"> | ||
<b>Company registration no</b>: 2014/109067/07 | ||
<br> | ||
<b>Address</b>: Block C Top floor Unit 9C, Carpe Diem, 26 Quantum | ||
Street, Technopark, | ||
Stellenbosch, 7600, South Africa | ||
<br> | ||
<b>VAT Number</b>: 4450266806 | ||
<br> | ||
<b>Tel</b>: +27 (0)21 880 0990 / +27 (0)73 768 8108 / +27 (0)87 809 2702 Fax: +27 (0)86 564 4056 | ||
<br> | ||
<b>Web</b>: <a href="http://kartoza.com" target="_blank">http://kartoza.com</a> | ||
<br> | ||
<b>Email</b>: [email protected] | ||
</p> | ||
</td> | ||
<td align="right" width="40%" class="right-title" valign="top"> | ||
<div class="big-title">Tax Invoice</div> | ||
<table width="100%" cellspacing="0" cellpadding="10" class="bordered"> | ||
<tr> | ||
<th>{% trans "Order ID" %} #</th> | ||
<th>Date</th> | ||
</tr> | ||
<tr> | ||
<td align="center">{{ order.id }}</td> | ||
<td align="center">{{ order.time }}</td> | ||
</tr> | ||
</table> | ||
</td> | ||
</tr> | ||
</table> | ||
<br> | ||
<br> | ||
<table class="bordered" width="100%" cellspacing="0" cellpadding="10"> | ||
<tr> | ||
<th align="left" width="50%">{% trans "Billing Details" %}</th> | ||
<th align="left" width="50%">{% trans "Shipping Details" %}</th> | ||
</tr> | ||
<tr> | ||
<td valign="top"> | ||
<table class="borderless" border="0"> | ||
{% for field, value in order_billing_detail_fields %} | ||
<tr> | ||
<td>{{ field }} </td> | ||
<td>: {{ value }}</td> | ||
</tr> | ||
{% endfor %} | ||
</table> | ||
</td> | ||
<td valign="top"> | ||
<table class="borderless" border="0"> | ||
{% for field, value in order_shipping_detail_fields %} | ||
<tr> | ||
<td>{{ field }} </td> | ||
<td>: {{ value }}</td> | ||
</tr> | ||
{% endfor %} | ||
</table> | ||
</td> | ||
</tr> | ||
</table> | ||
|
||
<br> | ||
<div class="big-title">{% trans "Items Ordered" %}</div> | ||
<br> | ||
<table class="bordered" width="100%" border="1" cellspacing="0" cellpadding="10"> | ||
<tr> | ||
<th align="left">{% trans "Item" %}</th> | ||
<th align="right">{% trans "Unit Price" %}</th> | ||
<th align="right">{% trans "Qty" %}</th> | ||
<th align="right">{% trans "Price" %}</th> | ||
</tr> | ||
{% for item in order.items.all %} | ||
<tr> | ||
<td>{{ item.description }}</td> | ||
<td align="right" valign="top">{{ item.unit_price|currency }}</td> | ||
<td align="right" valign="top">{{ item.quantity }}</td> | ||
<td align="right" valign="top">{{ item.total_price|currency }}</td> | ||
</tr> | ||
{% endfor %} | ||
{% order_totals_in_table %} | ||
</table> | ||
</div> |
69 changes: 69 additions & 0 deletions
69
django_project/kartoza_theme/templates/shop/includes/order_totals_in_table.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
{% load shop_tags i18n %} | ||
|
||
<tr> | ||
<td class="borderless"></td> | ||
<td colspan="2" align="right">{% trans "Sub total" %}</td> | ||
<td align="right">{{ item_total|currency }}</td> | ||
</tr> | ||
{% if tax_total %} | ||
<tr> | ||
<td class="borderless"></td> | ||
<td colspan="2" align="right"> | ||
{% if tax_type %} | ||
{{ tax_type }} | ||
{% else %} | ||
{% trans "Tax" %}: | ||
{% endif %} | ||
</td> | ||
<td align="right">{{ tax_total|currency }}</td> | ||
</tr> | ||
{% endif %} | ||
|
||
{% if shipping_type or shipping_total %} | ||
<tr> | ||
<td class="borderless"></td> | ||
<td colspan="2" align="right"> | ||
{% if shipping_type %} | ||
{{ shipping_type }} | ||
{% else %} | ||
{% trans "Shipping" %} | ||
{% endif %} | ||
</td> | ||
<td align="right">{{ shipping_total|currency }}</td> | ||
</tr> | ||
{% endif %} | ||
{% if order_total_before_discount %} | ||
<tr> | ||
<td></td> | ||
<td colspan="2" align="right"> | ||
{% trans "Total" %} | ||
</td> | ||
<td align="right">{{ order_total_before_discount|currency }}</td> | ||
</tr> | ||
{% else %} | ||
<tr> | ||
<td colspan="3" align="right"> | ||
{% trans "Total" %} | ||
</td> | ||
<td align="right">{{ order_total|currency }}</td> | ||
</tr> | ||
{% endif %} | ||
{% if discount_total %} | ||
<tr> | ||
<td></td> | ||
<td colspan="2" align="right"> | ||
{% if discount_type %} | ||
{{ discount_type }} | ||
{% else %} | ||
{% trans "Discount" %} | ||
{% endif %} | ||
</td> | ||
<td align="right">-{{ discount_total|currency }}</td> | ||
</tr> | ||
<tr> | ||
<td colspan="3" align="right"> | ||
{% trans "Total" %} | ||
</td> | ||
<td align="right">{{ order_total|currency }}</td> | ||
</tr> | ||
{% endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters