Quick Search:

View

Revision:

Diff

Diff from 1764 to:

Annotations

Annotate by Age | Author | Mixed | None
/fisheye/browse/osCommerce/branches/frank/osc_trunk/admin/templates/pages/orders/invoice.php

Annotated File View

hpdl
1
1 <?php
2 /*
hpdl
153
3   $Id: invoice.php 1764 2007-12-27 21:54:07Z frank $
hpdl
1
4
5   osCommerce, Open Source E-Commerce Solutions
6   http://www.oscommerce.com
7
hpdl
1410
8   Copyright (c) 2007 osCommerce
hpdl
1
9
hpdl
1498
10   This program is free software; you can redistribute it and/or modify
11   it under the terms of the GNU General Public License v2 (1991)
12   as published by the Free Software Foundation.
hpdl
1
13 */
14
hpdl
746
15   require('includes/classes/tax.php');
16   $osC_Tax = new osC_Tax_Admin();
17
hpdl
1
18   $osC_Order = new osC_Order($_GET['oID']);
19 ?>
hpdl
653
20
hpdl
1
21 <table border="0" width="100%" cellspacing="0" cellpadding="2">
22   <tr>
23     <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
24       <tr>
25         <td class="pageHeading"><?php echo nl2br(STORE_NAME_ADDRESS); ?></td>
frank
1764
26         <td class="pageHeading" align="right"><?php echo osc_image('../images/store_logo' . STORE_LOGO_TYPE, STORE_NAME); ?></td>
hpdl
1
27       </tr>
28     </table></td>
29   </tr>
30   <tr>
31     <td><table width="100%" border="0" cellspacing="0" cellpadding="2">
32       <tr>
hpdl
702
33         <td colspan="2">&nbsp;</td>
hpdl
1
34       </tr>
35       <tr>
36         <td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="2">
37           <tr>
hpdl
1524
38             <td><b><?php echo $osC_Language->get('subsection_billing_address'); ?></b></td>
hpdl
1
39           </tr>
40           <tr>
hpdl
1524
41             <td><?php echo osC_Address::format($osC_Order->getBilling(), '<br />'); ?></td>
hpdl
1
42           </tr>
43           <tr>
hpdl
702
44             <td>&nbsp;</td>
hpdl
1
45           </tr>
46           <tr>
hpdl
1524
47             <td><?php echo $osC_Order->getCustomer('telephone'); ?></td>
hpdl
1
48           </tr>
49           <tr>
hpdl
1524
50             <td><?php echo '<a href="mailto:' . $osC_Order->getCustomer('email_address') . '"><u>' . $osC_Order->getCustomer('email_address') . '</u></a>'; ?></td>
hpdl
1
51           </tr>
52         </table></td>
53         <td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="2">
54           <tr>
hpdl
1524
55             <td><b><?php echo $osC_Language->get('subsection_shipping_address'); ?></b></td>
hpdl
1
56           </tr>
57           <tr>
hpdl
1524
58             <td><?php echo osC_Address::format($osC_Order->getDelivery(), '<br />'); ?></td>
hpdl
1
59           </tr>
60         </table></td>
61       </tr>
62     </table></td>
63   </tr>
64   <tr>
hpdl
702
65     <td>&nbsp;</td>
hpdl
1
66   </tr>
67   <tr>
68     <td><table border="0" cellspacing="0" cellpadding="2">
69       <tr>
hpdl
1524
70         <td><b><?php echo $osC_Language->get('subsection_payment_method'); ?></b></td>
71         <td><?php echo $osC_Order->getPaymentMethod(); ?></td>
hpdl
1
72       </tr>
73     </table></td>
74   </tr>
75   <tr>
hpdl
702
76     <td>&nbsp;</td>
hpdl
1
77   </tr>
78   <tr>
hpdl
1492
79     <td><table border="0" width="100%" cellspacing="0" cellpadding="2" class="dataTable">
80       <thead>
81         <tr>
82           <th colspan="2"><?php echo $osC_Language->get('table_heading_products'); ?></th>
83           <th><?php echo $osC_Language->get('table_heading_product_model'); ?></th>
84           <th><?php echo $osC_Language->get('table_heading_tax'); ?></th>
85           <th><?php echo $osC_Language->get('table_heading_price_net'); ?></th>
86           <th><?php echo $osC_Language->get('table_heading_price_gross'); ?></th>
87           <th><?php echo $osC_Language->get('table_heading_total_net'); ?></th>
88           <th><?php echo $osC_Language->get('table_heading_total_gross'); ?></th>
89         </tr>
90       </thead>
91       <tbody>
hpdl
1
92 <?php
93     foreach ($osC_Order->getProducts() as $product) {
hpdl
1492
94       echo '        <tr>' . "\n" .
95            '          <td valign="top" align="right">' . $product['quantity'] . '&nbsp;x</td>' . "\n" .
96            '          <td valign="top">' . $product['name'];
hpdl
1
97
98       if (isset($product['attributes']) && (sizeof($product['attributes']) > 0)) {
99         foreach ($product['attributes'] as $attribute) {
hpdl
1492
100           echo '<br /><nobr>&nbsp;&nbsp;&nbsp;' . $attribute['option'] . ': ' . $attribute['value'] . '</nobr>';
hpdl
1
101         }
102       }
103
hpdl
1492
104       echo '          </td>' . "\n" .
105            '          <td valign="top">' . $product['model'] . '</td>' . "\n";
106       echo '          <td align="right" valign="top">' . $osC_Tax->displayTaxRateValue($product['tax']) . '</td>' . "\n" .
107            '          <td align="right" valign="top"><b>' . $osC_Currencies->format($product['final_price'], true, $osC_Order->getCurrency(), $osC_Order->getCurrencyValue()) . '</b></td>' . "\n" .
108            '          <td align="right" valign="top"><b>' . $osC_Currencies->displayPriceWithTaxRate($product['final_price'], $product['tax'], 1, $osC_Order->getCurrency(), $osC_Order->getCurrencyValue()) . '</b></td>' . "\n" .
109            '          <td align="right" valign="top"><b>' . $osC_Currencies->format($product['final_price'] * $product['quantity'], true, $osC_Order->getCurrency(), $osC_Order->getCurrencyValue()) . '</b></td>' . "\n" .
110            '          <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";
111       echo '        </tr>' . "\n";
hpdl
1
112     }
113 ?>
hpdl
1492
114       </tbody>
115     </table>
116
117     <table border="0" width="100%" cellspacing="0" cellpadding="2">
hpdl
1
118 <?php
119   foreach ($osC_Order->getTotals() as $total) {
hpdl
1492
120     echo '      <tr>' . "\n" .
hpdl
1524
121          '        <td align="right">' . $total['title'] . '</td>' . "\n" .
122          '        <td align="right">' . $total['text'] . '</td>' . "\n" .
hpdl
1492
123          '      </tr>' . "\n";
hpdl
1
124   }
125 ?>
126     </table></td>
127   </tr>
128 </table>