-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathorder-invoice.liquid
179 lines (150 loc) · 5.2 KB
/
order-invoice.liquid
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
<!DOCTYPE html>
<html lang="en">
<head>
<title>{{ email_title }}</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width">
<link rel="stylesheet" type="text/css" href="/assets/notifications/styles.css">
<style>
.button { background: {{ shop.email_accent_color }}; }
a, a:hover, a:active, a:visited { color: {{ shop.email_accent_color }}; }
</style>
</head>
<body>
{%- if shop.email_logo_url %}
<img src="{{ shop.email_logo_url }}" alt="{{ shop.name }}" width="{{ shop.email_logo_width }}">
{%- else %}
<h1>
<a href="{{ shop.url }}">{{ shop.name }}</a>
</h1>
{%- endif %}
Invoice {{ order_name }}
{% if payment_terms.type == 'receipt' and payment_terms.next_payment.due_at == nil %}
{% assign due_date = 'now' %}
{% else %}
{% assign due_date = payment_terms.next_payment.due_at | default: nil %}
{% endif %}
<h2>Payment of {{ order.total_outstanding | money }} is due {{ due_date | date: format: 'date' }}</h2>
{% if custom_message != blank %}
<p>{{ custom_message }}</p>
{% endif %}
{% if checkout_payment_collection_url %}
<a href="{{ checkout_payment_collection_url }}">Pay now</a>
{% endif %}
<h3>Order summary</h3>
{% for line in subtotal_line_items %}
{% if line.image %}
<img src="{{ line | img_url: 'compact_cropped' }}" align="left" width="60" height="60" />
{% endif %}
{% if line.product.title %}
{% assign line_title = line.product.title %}
{% else %}
{% assign line_title = line.title %}
{% endif %}
{% if line.quantity < line.quantity %}
{% capture line_display %} {{ line.quantity }} of {{ line.quantity }} {% endcapture %}
{% else %}
{% assign line_display = line.quantity %}
{% endif %}
{{ line_title }} × {{ line_display }}
{% if line.variant.title != 'Default Title' %}
{{ line.variant.title }}
{% endif %}
{% if line.selling_plan_allocation %}
{{ line.selling_plan_allocation.selling_plan.name }}
{% endif %}
{% if line.refunded_quantity > 0 %}
Refunded
{% endif %}
{% if line.discount_allocations %}
{% for discount_allocation in line.discount_allocations %}
{% if discount_allocation.discount_application.target_selection != 'all' %}
<img src="{{ 'notifications/discounttag.png' | shopify_asset_url }}" width="18" height="18" />
{{ discount_allocation.discount_application.title | upcase }}
(-{{ discount_allocation.amount | money }})
{% endif %}
{% endfor %}
{% endif %}
{% if line.original_line_price != line.final_line_price %}
<del>{{ line.original_line_price | money }}</del>
{% endif %}
<p>
{% if line.final_line_price > 0 %}
{{ line.final_line_price | money }}
{% else %}
Free
{% endif %}
</p>
{% endfor %}
{% for discount_application in discount_applications %}
{% if discount_application.target_selection == 'all' %}
{% capture discount_title %}
{% if discount_application.title %}
{{ discount_application.title | upcase }}[]
{% else %}
Discount
{% endif %}
{% endcapture %}
<p>
Discount
<img src="{{ 'notifications/discounttag.png' | shopify_asset_url }}" width="18" height="18" />
{{ discount_title }}
</p>
<strong>-{{ discount_application.total_allocated_amount | money }}</strong>
{% endif %}
{% endfor %}
<p>
Subtotal
</p>
<strong>{{ subtotal_price | money }}</strong>
<p>
Shipping
</p>
<strong>{{ shipping_price | money }}</strong>
<p>
Taxes
</p>
<strong>{{ tax_price | money }}</strong>
{% if total_tip_received and total_tip_received > 0 %}
<p>
Tip
</p>
<strong>{{ total_tip_received | money }}</strong>
{% endif %}
{% if total_price > total_outstanding %}
<p>
Updated total
</p>
<strong>{{ total_price | money }}</strong>
<p>
Already paid
</p>
<strong>{{ net_payment | money }}</strong>
<p>
Amount to pay
</p>
<strong>{{ total_outstanding | money_with_currency }}</strong>
{% else %}
<p>
Amount to pay
</p>
<strong>{{ total_outstanding | money_with_currency }}</strong>
{% endif %}
{% if shipping_address or billing_address or shipping_method %}
<h3>Customer information</h3>
{% if shipping_address %}
<h4>Shipping address</h4>
{{ shipping_address | format_address }}
{% endif %}
{% if billing_address %}
<h4>Billing address</h4>
{{ billing_address | format_address }}
{% endif %}
{% if shipping_method %}
<h4>Shipping method</h4>
<p>{{ shipping_method.title }}<br/>{{ shipping_method.price | money }}</p>
{% endif %}
{% endif %}
<p>If you have any questions, reply to this email or contact us at <a href="mailto:{{ shop.email }}">{{ shop.email }}</a></p>
</body>
</html>