-
Notifications
You must be signed in to change notification settings - Fork 0
/
invoice.php
161 lines (149 loc) · 6.1 KB
/
invoice.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
<?php
/*
$Id: invoice.php $
TomatoCart Open Source Shopping Cart Solutions
http://www.tomatocart.com
Copyright (c) 2009 Wuxi Elootec Technology Co., Ltd; Copyright (c) 2007 osCommerce
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License v2 (1991)
as published by the Free Software Foundation.
*/
$osC_Order = new osC_Order($_REQUEST['oID']);
?>
<style type="text/css">
/* page */
body { background-color: #ffffff; color: #000000; margin: 0px; font-family: Verdana, Arial, sans-serif; font-size: 10px; }
td, p { font-family: Verdana, Arial, sans-serif; font-size: 10px; }
H1, H1 a:link, H1 a:visited, H1 a:active, .pageHeading { font-family: Verdana, Arial, sans-serif; font-size: 18px; color: #727272; font-weight: bold; margin: 10px 0px; }
/* data table */
.dataTable {
font-family: Verdana, Arial, sans-serif;
font-size: 10px;
}
.dataTable thead th {
padding: 3px 10px;
border-bottom: 1px solid black;
font-weight: bold;
}
.dataTable tfoot th {
padding: 3px 10px;
border-top: 1px solid black;
font-weight: bold;
}
.dataTable tbody td {
background-color: #eeeeff;
padding: 3px 10px;
}
.dataTable tr.mouseOver td, .dataTable tr.mouseOverDeactivatedRow td {
background-color: #ffeebb;
}
.dataTable tr.deactivatedRow td {
background-color: #ffbbbb;
}
</style>
<div>
<table border="0" width="100%" cellspacing="0" cellpadding="2" style="background:#ffffff">
<tr>
<td><table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td class="pageHeading"><?php echo nl2br(STORE_NAME_ADDRESS); ?></td>
<td class="pageHeading" align="right"><?php echo osc_image('../images/store_logo.jpg', STORE_NAME); ?></td>
</tr>
</table></td>
</tr>
<tr>
<td><table width="100%" border="0" cellspacing="0" cellpadding="2">
<tr>
<td colspan="2"> </td>
</tr>
<tr>
<td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="2">
<tr>
<td><b><?php echo $osC_Language->get('subsection_billing_address'); ?></b></td>
</tr>
<tr>
<td><?php echo osC_Address::format($osC_Order->getBilling(), '<br />'); ?></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td><?php echo $osC_Order->getCustomer('telephone'); ?></td>
</tr>
<tr>
<td><?php echo '<a href="mailto:' . $osC_Order->getCustomer('email_address') . '"><u>' . $osC_Order->getCustomer('email_address') . '</u></a>'; ?></td>
</tr>
</table></td>
<td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="2">
<tr>
<td><b><?php echo $osC_Language->get('subsection_shipping_address'); ?></b></td>
</tr>
<tr>
<td><?php echo osC_Address::format($osC_Order->getDelivery(), '<br />'); ?></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td><table border="0" cellspacing="0" cellpadding="2">
<tr>
<td><b><?php echo $osC_Language->get('subsection_payment_method'); ?></b></td>
<td><?php echo $osC_Order->getPaymentMethod(); ?></td>
</tr>
</table></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td><table border="0" width="100%" cellspacing="0" cellpadding="2" class="dataTable">
<thead>
<tr>
<th colspan="2"><?php echo $osC_Language->get('table_heading_products'); ?></th>
<th><?php echo $osC_Language->get('table_heading_product_model'); ?></th>
<th><?php echo $osC_Language->get('table_heading_tax'); ?></th>
<th><?php echo $osC_Language->get('table_heading_price_net'); ?></th>
<th><?php echo $osC_Language->get('table_heading_price_gross'); ?></th>
<th><?php echo $osC_Language->get('table_heading_total_net'); ?></th>
<th><?php echo $osC_Language->get('table_heading_total_gross'); ?></th>
</tr>
</thead>
<tbody>
<?php
foreach ($osC_Order->getProducts() as $product) {
echo ' <tr>' . "\n" .
' <td valign="top" align="right">' . $product['quantity'] . ' x</td>' . "\n" .
' <td valign="top">' . $product['name'];
if (isset($product['attributes']) && (sizeof($product['attributes']) > 0)) {
foreach ($product['attributes'] as $attribute) {
echo '<br /><nobr> ' . $attribute['option'] . ': ' . $attribute['value'] . '</nobr>';
}
}
echo ' </td>' . "\n" .
' <td valign="top">' . $product['model'] . '</td>' . "\n";
echo ' <td align="right" valign="top">' . $osC_Tax->displayTaxRateValue($product['tax']) . '</td>' . "\n" .
' <td align="right" valign="top"><b>' . $osC_Currencies->format($product['final_price'], true, $osC_Order->getCurrency(), $osC_Order->getCurrencyValue()) . '</b></td>' . "\n" .
' <td align="right" valign="top"><b>' . $osC_Currencies->displayPriceWithTaxRate($product['final_price'], $product['tax'], 1, $osC_Order->getCurrency(), $osC_Order->getCurrencyValue()) . '</b></td>' . "\n" .
' <td align="right" valign="top"><b>' . $osC_Currencies->format($product['final_price'] * $product['quantity'], true, $osC_Order->getCurrency(), $osC_Order->getCurrencyValue()) . '</b></td>' . "\n" .
' <td align="right" valign="top"><b>' . $osC_Currencies->displayPriceWithTaxRate($product['final_price'], $product['tax'], $product['quantity'], $osC_Order->getCurrency(), $osC_Order->getCurrencyValue()) . '</b></td>' . "\n";
echo ' </tr>' . "\n";
}
?>
</tbody>
</table>
<table border="0" width="100%" cellspacing="0" cellpadding="2">
<?php
foreach ($osC_Order->getTotals() as $total) {
echo ' <tr>' . "\n" .
' <td align="right">' . $total['title'] . '</td>' . "\n" .
' <td align="right">' . $total['text'] . '</td>' . "\n" .
' </tr>' . "\n";
}
?>
</table></td>
</tr>
</table>