hpdl
|
1
|
1
|
<?php
|
|
2
|
/*
|
mattice
|
151
|
3
|
$Id: invoice.php 1180 2006-12-24 22:37:00Z frank $
|
hpdl
|
1
|
4
|
|
|
5
|
osCommerce, Open Source E-Commerce Solutions
|
|
6
|
http://www.oscommerce.com
|
|
7
|
|
hpdl
|
410
|
8
|
Copyright (c) 2006 osCommerce
|
hpdl
|
1
|
9
|
|
|
10
|
Released under the GNU General Public License
|
|
11
|
*/
|
|
12
|
|
|
13
|
require('includes/application_top.php');
|
|
14
|
|
hpdl
|
758
|
15
|
require('includes/classes/tax.php');
|
|
16
|
$osC_Tax = new osC_Tax_Admin();
|
|
17
|
|
hpdl
|
1
|
18
|
require('../includes/classes/currencies.php');
|
|
19
|
$osC_Currencies = new osC_Currencies();
|
|
20
|
|
|
21
|
require('includes/classes/order.php');
|
|
22
|
$osC_Order = new osC_Order($_GET['oID']);
|
frank
|
1180
|
23
|
|
|
24
|
$osC_Language->loadConstants('invoice.php');
|
hpdl
|
1
|
25
|
?>
|
hpdl
|
654
|
26
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
|
27
|
|
|
28
|
<html xmlns="http://www.w3.org/1999/xhtml" dir="<?php echo $osC_Language->getTextDirection(); ?>" xml:lang="<?php echo $osC_Language->getCode(); ?>" lang="<?php echo $osC_Language->getCode(); ?>">
|
|
29
|
|
hpdl
|
1
|
30
|
<head>
|
hpdl
|
654
|
31
|
|
|
32
|
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $osC_Language->getCharacterSet(); ?>" />
|
|
33
|
|
hpdl
|
1
|
34
|
<title><?php echo TITLE; ?></title>
|
hpdl
|
654
|
35
|
|
hpdl
|
1
|
36
|
<link rel="stylesheet" type="text/css" href="includes/stylesheet.css">
|
hpdl
|
654
|
37
|
|
hpdl
|
1
|
38
|
</head>
|
hpdl
|
654
|
39
|
|
hpdl
|
1
|
40
|
<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFFFF">
|
|
41
|
|
|
42
|
|
|
43
|
<table border="0" width="100%" cellspacing="0" cellpadding="2">
|
|
44
|
<tr>
|
|
45
|
<td><table border="0" width="100%" cellspacing="0" cellpadding="0">
|
|
46
|
<tr>
|
|
47
|
<td class="pageHeading"><?php echo nl2br(STORE_NAME_ADDRESS); ?></td>
|
frank
|
1180
|
48
|
<td class="pageHeading" align="right"><?php echo osc_image('images/oscommerce.jpg', 'osCommerce'); ?></td>
|
hpdl
|
1
|
49
|
</tr>
|
|
50
|
</table></td>
|
|
51
|
</tr>
|
|
52
|
<tr>
|
|
53
|
<td><table width="100%" border="0" cellspacing="0" cellpadding="2">
|
|
54
|
<tr>
|
hpdl
|
755
|
55
|
<td colspan="2"> </td>
|
hpdl
|
1
|
56
|
</tr>
|
|
57
|
<tr>
|
|
58
|
<td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="2">
|
|
59
|
<tr>
|
|
60
|
<td class="main"><b><?php echo ENTRY_SOLD_TO; ?></b></td>
|
|
61
|
</tr>
|
|
62
|
<tr>
|
hpdl
|
757
|
63
|
<td class="main"><?php echo osC_Address::format($osC_Order->getBilling(), '<br />'); ?></td>
|
hpdl
|
1
|
64
|
</tr>
|
|
65
|
<tr>
|
hpdl
|
755
|
66
|
<td> </td>
|
hpdl
|
1
|
67
|
</tr>
|
|
68
|
<tr>
|
|
69
|
<td class="main"><?php echo $osC_Order->getCustomer('telephone'); ?></td>
|
|
70
|
</tr>
|
|
71
|
<tr>
|
|
72
|
<td class="main"><?php echo '<a href="mailto:' . $osC_Order->getCustomer('email_address') . '"><u>' . $osC_Order->getCustomer('email_address') . '</u></a>'; ?></td>
|
|
73
|
</tr>
|
|
74
|
</table></td>
|
|
75
|
<td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="2">
|
|
76
|
<tr>
|
|
77
|
<td class="main"><b><?php echo ENTRY_SHIP_TO; ?></b></td>
|
|
78
|
</tr>
|
|
79
|
<tr>
|
hpdl
|
757
|
80
|
<td class="main"><?php echo osC_Address::format($osC_Order->getDelivery(), '<br />'); ?></td>
|
hpdl
|
1
|
81
|
</tr>
|
|
82
|
</table></td>
|
|
83
|
</tr>
|
|
84
|
</table></td>
|
|
85
|
</tr>
|
|
86
|
<tr>
|
hpdl
|
755
|
87
|
<td> </td>
|
hpdl
|
1
|
88
|
</tr>
|
|
89
|
<tr>
|
|
90
|
<td><table border="0" cellspacing="0" cellpadding="2">
|
|
91
|
<tr>
|
|
92
|
<td class="main"><b><?php echo ENTRY_PAYMENT_METHOD; ?></b></td>
|
|
93
|
<td class="main"><?php echo $osC_Order->getPaymentMethod(); ?></td>
|
|
94
|
</tr>
|
|
95
|
</table></td>
|
|
96
|
</tr>
|
|
97
|
<tr>
|
hpdl
|
755
|
98
|
<td> </td>
|
hpdl
|
1
|
99
|
</tr>
|
|
100
|
<tr>
|
|
101
|
<td><table border="0" width="100%" cellspacing="0" cellpadding="2">
|
|
102
|
<tr class="dataTableHeadingRow">
|
|
103
|
<td class="dataTableHeadingContent" colspan="2"><?php echo TABLE_HEADING_PRODUCTS; ?></td>
|
|
104
|
<td class="dataTableHeadingContent"><?php echo TABLE_HEADING_PRODUCTS_MODEL; ?></td>
|
|
105
|
<td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_TAX; ?></td>
|
|
106
|
<td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_PRICE_EXCLUDING_TAX; ?></td>
|
|
107
|
<td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_PRICE_INCLUDING_TAX; ?></td>
|
|
108
|
<td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_TOTAL_EXCLUDING_TAX; ?></td>
|
|
109
|
<td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_TOTAL_INCLUDING_TAX; ?></td>
|
|
110
|
</tr>
|
|
111
|
<?php
|
|
112
|
foreach ($osC_Order->getProducts() as $product) {
|
|
113
|
echo ' <tr class="dataTableRow">' . "\n" .
|
|
114
|
' <td class="dataTableContent" valign="top" align="right">' . $product['quantity'] . ' x</td>' . "\n" .
|
|
115
|
' <td class="dataTableContent" valign="top">' . $product['name'];
|
|
116
|
|
|
117
|
if (isset($product['attributes']) && (sizeof($product['attributes']) > 0)) {
|
|
118
|
foreach ($product['attributes'] as $attribute) {
|
hpdl
|
365
|
119
|
echo '<br /><nobr><small> <i> - ' . $attribute['option'] . ': ' . $attribute['value'];
|
frank
|
1178
|
120
|
if ($attribute['price'] != '0') echo ' (' . $attribute['prefix'] . $osC_Currencies->format($attribute['price'], $product['quantity'], true, $osC_Order->getCurrency(), $osC_Order->getCurrencyValue()) . ')';
|
hpdl
|
1
|
121
|
echo '</i></small></nobr>';
|
|
122
|
}
|
|
123
|
}
|
|
124
|
|
|
125
|
echo ' </td>' . "\n" .
|
|
126
|
' <td class="dataTableContent" valign="top">' . $product['model'] . '</td>' . "\n";
|
hpdl
|
758
|
127
|
echo ' <td class="dataTableContent" align="right" valign="top">' . $osC_Tax->displayTaxRateValue($product['tax']) . '</td>' . "\n" .
|
frank
|
1178
|
128
|
' <td class="dataTableContent" align="right" valign="top"><b>' . $osC_Currencies->format($product['final_price'], 1, true, $osC_Order->getCurrency(), $osC_Order->getCurrencyValue()) . '</b></td>' . "\n" .
|
hpdl
|
758
|
129
|
' <td class="dataTableContent" align="right" valign="top"><b>' . $osC_Currencies->displayPriceWithTaxRate($product['final_price'], $product['tax'], 1, $osC_Order->getCurrency(), $osC_Order->getCurrencyValue()) . '</b></td>' . "\n" .
|
frank
|
1178
|
130
|
' <td class="dataTableContent" align="right" valign="top"><b>' . $osC_Currencies->format($product['final_price'], $product['quantity'], true, $osC_Order->getCurrency(), $osC_Order->getCurrencyValue()) . '</b></td>' . "\n" .
|
hpdl
|
758
|
131
|
' <td class="dataTableContent" align="right" valign="top"><b>' . $osC_Currencies->displayPriceWithTaxRate($product['final_price'], $product['tax'], $product['quantity'], $osC_Order->getCurrency(), $osC_Order->getCurrencyValue()) . '</b></td>' . "\n";
|
hpdl
|
1
|
132
|
echo ' </tr>' . "\n";
|
|
133
|
}
|
|
134
|
?>
|
|
135
|
<tr>
|
|
136
|
<td align="right" colspan="8"><table border="0" cellspacing="0" cellpadding="2">
|
|
137
|
<?php
|
|
138
|
foreach ($osC_Order->getTotals() as $total) {
|
|
139
|
echo ' <tr>' . "\n" .
|
|
140
|
' <td align="right" class="smallText">' . $total['title'] . '</td>' . "\n" .
|
|
141
|
' <td align="right" class="smallText">' . $total['text'] . '</td>' . "\n" .
|
|
142
|
' </tr>' . "\n";
|
|
143
|
}
|
|
144
|
?>
|
|
145
|
</table></td>
|
|
146
|
</tr>
|
|
147
|
</table></td>
|
|
148
|
</tr>
|
|
149
|
</table>
|
|
150
|
|
|
151
|
|
hpdl
|
365
|
152
|
<br />
|
hpdl
|
1
|
153
|
</body>
|
|
154
|
</html>
|
|
155
|
<?php require('includes/application_bottom.php'); ?>
|