forked from WemXPro/theme-tailwind
-
Notifications
You must be signed in to change notification settings - Fork 0
/
invoice-pdf.blade.php
288 lines (249 loc) · 7.86 KB
/
invoice-pdf.blade.php
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
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
<!doctype html>
<html class="no-js" lang="">
<head>
<meta charset="utf-8">
<title>{{ __('client.invoice_template') }}</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
<div class="web-container">
<div class="page-container">
{{ __('client.page') }}
<span class="page"></span>
{{ __('client.of') }}
<span class="pages"></span>
</div>
<table style="width:100%; margin-bottom: 30px;">
<tr>
<td style="text-align:center; vertical-align:middle;">
<span
style="
width: 128px;
height: 40px;
background-color: @if ($payment->status == 'unpaid') #bf3a3a @else #237142 @endif;
color: @if ($payment->status == 'unpaid') #ffffff @else #86efac @endif;
display: block;
border-radius: 5px;
font-size: 26px;
text-transform: capitalize;
line-height: 40px;
padding-bottom: 5px;
font-weight: 600;
">
{{ __('client.' . $payment->status) }}
</span>
</td>
<td style="vertical-align:end;">
<img style="width: 48px; border-radius: 5px;" src="@settings('logo', 'https://dev2.wemx.net/static/wemx.png')">
</td>
</tr>
</table>
<table class="invoice-info-container">
<tr>
<td rowspan="2" class="client-name">
{{ $payment->user->first_name }} {{ $payment->user->last_name }}
</td>
<td>
@settings('app_name')
</td>
</tr>
<tr>
<td>
@settings('company_address', '291 N 4th St, San Jose, CA 95112, USA')
</td>
</tr>
<tr>
<td>
{{ __('client.invoice_date') }}:
<strong>{{ $payment->created_at->translatedFormat(settings('date_format', 'd M Y')) }}</strong>
</td>
<td>
</td>
</tr>
<tr>
<td>
{{ $payment->user->email }}
</td>
<td>
{{ __('client.invoice_no') }}: <strong>{{ $payment->shortId() }}</strong>
</td>
</tr>
</table>
<table class="line-items-container">
<thead>
<tr>
<th class="heading-quantity">{!! __('client.qty') !!}</th>
<th class="heading-description">{!! __('client.item') !!}</th>
<th class="heading-price">{!! __('client.price') !!}</th>
<th class="heading-subtotal">{!! __('client.total') !!}</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>
@if ($payment->package_id !== null)
<img style="display: inline-block; vertical-align: middle; width: 24px; border-radius: 5px; margin-right: 5px"
src="{{ $payment->package->icon() }}" alt="{{ __('client.package_icon') }}">
@endif
<span style="display: inline-block; vertical-align: middle;">{{ $payment->description }}</span>
</td>
<td class="right">{{ currency('symbol') }}{{ number_format($payment->amount, 2) }}</td>
<td class="bold">{{ currency('symbol') }}{{ number_format($payment->amount, 2) }}</td>
</tr>
</tbody>
</table>
<table class="line-items-container has-bottom-border">
<thead>
<tr>
<th>{{ __('client.payment_info') }}</th>
<th>{{ __('client.total_due') }}</th>
</tr>
</thead>
<tbody>
<tr>
<td class="payment-info">
<div>
@isset($payment->gateway['name'])
{{ __('client.payment_gateway') }}: <strong>{{ $payment->gateway['name'] }}</strong>
@endisset
</div>
<div>
@if ($payment->transaction_id !== null)
{{ __('client.transaction_id') }}: <strong>{{ $payment->transaction_id }}</strong>
@endif
</div>
</td>
<td class="large total">{{ currency('symbol') }}{{ number_format($payment->amount, 2) }}</td>
</tr>
</tbody>
</table>
<div class="footer">
<div class="footer-info">
<span>@settings('contact_email')</span> |
<span>@settings('app_name')</span>
</div>
<div class="footer-thanks">
<span>{{ __('client.thank_you') }}</span>
</div>
</div>
</div>
</body>
</html>
<style>
/*
Common invoice styles. These styles will work in a browser or using the HTML
to PDF anvil endpoint.
*/
body {
font-size: 16px;
font-family: sans-serif;
}
table {
width: 100%;
border-collapse: collapse;
}
table tr td {
padding: 0;
}
table tr td:last-child {
text-align: right;
}
.bold {
font-weight: bold;
}
.right {
text-align: right;
}
.large {
font-size: 1.75em;
}
.total {
font-weight: bold;
}
.logo-container {
margin: 20px 0 30px 0;
}
.invoice-info-container {
font-size: 0.875em;
}
.invoice-info-container td {
padding: 4px 0;
}
.client-name {
font-size: 1.5em;
vertical-align: top;
}
.line-items-container {
margin: 70px 0;
font-size: 0.875em;
}
.line-items-container th {
text-align: left;
color: #999;
border-bottom: 2px solid #ddd;
padding: 10px 0 15px 0;
font-size: 0.75em;
text-transform: uppercase;
}
.line-items-container th:last-child {
text-align: right;
}
.line-items-container td {
padding: 15px 0;
}
.line-items-container tbody tr:first-child td {
padding-top: 25px;
}
.line-items-container.has-bottom-border tbody tr:last-child td {
padding-bottom: 25px;
border-bottom: 2px solid #ddd;
}
.line-items-container.has-bottom-border {
margin-bottom: 0;
}
.line-items-container th.heading-quantity {
width: 50px;
}
.line-items-container th.heading-price {
text-align: right;
width: 100px;
}
.line-items-container th.heading-subtotal {
width: 100px;
}
.payment-info {
width: 38%;
font-size: 0.75em;
line-height: 1.5;
}
.footer {
margin-top: 100px;
}
.footer-thanks {
font-size: 1.125em;
}
.footer-thanks img {
display: inline-block;
position: relative;
top: 1px;
width: 16px;
margin-right: 4px;
}
.footer-info {
float: right;
margin-top: 5px;
font-size: 0.75em;
color: #ccc;
}
.footer-info span {
padding: 0 5px;
color: black;
}
.footer-info span:last-child {
padding-right: 0;
}
.page-container {
display: none;
}
</style>