-
Notifications
You must be signed in to change notification settings - Fork 0
/
viewinvoice.tpl
184 lines (151 loc) · 5.74 KB
/
viewinvoice.tpl
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset={$charset}" />
<title>{$companyname} - {* This code should be uncommented for EU companies using the sequential invoice numbering so that when unpaid it is shown as a proforma invoice {if $status eq "Paid"}*}{$LANG.invoicenumber}{*{else}{$LANG.proformainvoicenumber}{/if}*}{$invoicenum}</title>
<link href="templates/{$template}/css/invoice.css" rel="stylesheet">
</head>
<body>
<div class="wrapper">
{if $error}
<div class="creditbox">{$LANG.invoiceserror}</div>
{else}
<table class="header"><tr><td width="50%" nowrap>
{if $logo}<p><img src="{$logo}" title="{$companyname}" /></p>{else}<h1>{$companyname}</h1>{/if}
</td><td width="50%" align="center">
{if $status eq "Unpaid"}
<font class="unpaid">{$LANG.invoicesunpaid}</font><br />
{if $allowchangegateway}
<form method="post" action="{$smarty.server.PHP_SELF}?id={$invoiceid}">{$gatewaydropdown}</form>
{else}
{$paymentmethod}<br />
{/if}
{$paymentbutton}
{elseif $status eq "Paid"}
<font class="paid">{$LANG.invoicespaid}</font><br />
{$paymentmethod}<br />
({$datepaid})
{elseif $status eq "Refunded"}
<font class="refunded">{$LANG.invoicesrefunded}</font>
{elseif $status eq "Cancelled"}
<font class="cancelled">{$LANG.invoicescancelled}</font>
{elseif $status eq "Collections"}
<font class="collections">{$LANG.invoicescollections}</font>
{/if}
</td></tr></table>
{if $smarty.get.paymentsuccess}
<p align="center" class="paid">{$LANG.invoicepaymentsuccessconfirmation}</p>
{elseif $smarty.get.pendingreview}
<p align="center" class="paid">{$LANG.invoicepaymentpendingreview}</p>
{elseif $smarty.get.paymentfailed}
<p align="center" class="unpaid">{$LANG.invoicepaymentfailedconfirmation}</p>
{elseif $offlinepaid}
<p align="center" class="refunded">{$LANG.invoiceofflinepaid}</p>
{/if}
{if $manualapplycredit}
<form method="post" action="{$smarty.server.PHP_SELF}?id={$invoiceid}">
<input type="hidden" name="applycredit" value="true" />
<div class="creditbox">
{$LANG.invoiceaddcreditdesc1} {$totalcredit}. {$LANG.invoiceaddcreditdesc2}<br />
{$LANG.invoiceaddcreditamount}: <input type="text" name="creditamount" size="10" value="{$creditamount}" /> <input type="submit" value="{$LANG.invoiceaddcreditapply}" />
</div>
</form>
{/if}
<table class="items"><tr><td width="50%">
<div class="addressbox">
<strong>{$LANG.invoicesinvoicedto}</strong><br />
{if $clientsdetails.companyname}{$clientsdetails.companyname}<br />{/if}
{$clientsdetails.firstname} {$clientsdetails.lastname}<br />
{$clientsdetails.address1}, {$clientsdetails.address2}<br />
{$clientsdetails.city}, {$clientsdetails.state}, {$clientsdetails.postcode}<br />
{$clientsdetails.country}
{if $customfields}
<br /><br />
{foreach from=$customfields item=customfield}
{$customfield.fieldname}: {$customfield.value}<br />
{/foreach}
{/if}
</div>
</td><td width="50%">
<div class="addressbox">
<strong>{$LANG.invoicespayto}</strong><br />
{$payto}
</div>
</td></tr></table>
<div class="row">
<span class="title">{* This code should be uncommented for EU companies using the sequential invoice numbering so that when unpaid it is shown as a proforma invoice {if $status eq "Paid"}*}{$LANG.invoicenumber}{*{else}{$LANG.proformainvoicenumber}{/if}*}{$invoicenum}</span><br />
{$LANG.invoicesdatecreated}: {$datecreated}<br />
{$LANG.invoicesdatedue}: {$datedue}
</div>
<table class="items">
<tr class="title textcenter">
<td width="70%">{$LANG.invoicesdescription}</td>
<td width="30%">{$LANG.invoicesamount}</td>
</tr>
{foreach from=$invoiceitems item=item}
<tr>
<td>{$item.description}{if $item.taxed eq "true"} *{/if}</td>
<td class="textcenter">{$item.amount}</td>
</tr>
{/foreach}
<tr class="title">
<td class="textright">{$LANG.invoicessubtotal}:</td>
<td class="textcenter">{$subtotal}</td>
</tr>
{if $taxrate}
<tr class="title">
<td class="textright">{$taxrate}% {$taxname}:</td>
<td class="textcenter">{$tax}</td>
</tr>
{/if}
{if $taxrate2}
<tr class="title">
<td class="textright">{$taxrate2}% {$taxname2}:</td>
<td class="textcenter">{$tax2}</td>
</tr>
{/if}
<tr class="title">
<td class="textright">{$LANG.invoicescredit}:</td>
<td class="textcenter">{$credit}</td>
</tr>
<tr class="title">
<td class="textright">{$LANG.invoicestotal}:</td>
<td class="textcenter">{$total}</td>
</tr>
</table>
{if $taxrate}<p>* {$LANG.invoicestaxindicator}</p>{/if}
<div class="row">
<span class="subtitle">{$LANG.invoicestransactions}</span>
</div>
<table class="items">
<tr class="title textcenter">
<td width="30%">{$LANG.invoicestransdate}</td>
<td width="25%">{$LANG.invoicestransgateway}</td>
<td width="25%">{$LANG.invoicestransid}</td>
<td width="20%">{$LANG.invoicestransamount}</td>
</tr>
{foreach from=$transactions item=transaction}
<tr>
<td class="textcenter">{$transaction.date}</td>
<td class="textcenter">{$transaction.gateway}</td>
<td class="textcenter">{$transaction.transid}</td>
<td class="textcenter">{$transaction.amount}</td>
</tr>
{foreachelse}
<tr>
<td class="textcenter" colspan="4">{$LANG.invoicestransnonefound}</td>
</tr>
{/foreach}
<tr class="title">
<td class="textright" colspan="3">{$LANG.invoicesbalance}:</td>
<td class="textcenter">{$balance}</td>
</tr>
</table>
{if $notes}
<p>{$LANG.invoicesnotes}: {$notes}</p>
{/if}
{/if}
</div>
<p align="center"><a href="clientarea.php">{$LANG.invoicesbacktoclientarea}</a> | <a href="dl.php?type=i&id={$invoiceid}">{$LANG.invoicesdownload}</a> | <a href="javascript:window.close()">{$LANG.closewindow}</a></p>
</body>
</html>