order_invoice.tpl
4.93 KB
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
<!DOCTYPE html>
<html dir="<?php echo $direction; ?>" lang="<?php echo $lang; ?>">
<head>
<meta charset="UTF-8" />
<title><?php echo $title; ?></title>
<base href="<?php echo $base; ?>" />
<link href="view/javascript/bootstrap/css/bootstrap.css" rel="stylesheet" media="all" />
<script type="text/javascript" src="view/javascript/jquery/jquery-2.1.1.min.js"></script>
<script type="text/javascript" src="view/javascript/bootstrap/js/bootstrap.min.js"></script>
<link href="view/javascript/font-awesome/css/font-awesome.min.css" type="text/css" rel="stylesheet" />
<link type="text/css" href="view/stylesheet/stylesheet.css" rel="stylesheet" media="all" />
</head>
<body>
<div class="container">
<?php foreach ($orders as $order) { ?>
<div style="page-break-after: always;">
<h1><?php echo $text_invoice; ?> #<?php echo $order['order_id']; ?></h1>
<table class="table table-bordered">
<thead>
<tr>
<td colspan="2"><?php echo $text_order_detail; ?></td>
</tr>
</thead>
<tbody>
<tr>
<td style="width: 50%;"><address>
<strong><?php echo $order['store_name']; ?></strong><br />
<?php echo $order['store_address']; ?>
</address>
<b><?php echo $text_telephone; ?></b> <?php echo $order['store_telephone']; ?><br />
<?php if ($order['store_fax']) { ?>
<b><?php echo $text_fax; ?></b> <?php echo $order['store_fax']; ?><br />
<?php } ?>
<b><?php echo $text_email; ?></b> <?php echo $order['store_email']; ?><br />
<b><?php echo $text_website; ?></b> <a href="<?php echo $order['store_url']; ?>"><?php echo $order['store_url']; ?></a></td>
<td style="width: 50%;"><b><?php echo $text_date_added; ?></b> <?php echo $order['date_added']; ?><br />
<?php if ($order['invoice_no']) { ?>
<b><?php echo $text_invoice_no; ?></b> <?php echo $order['invoice_no']; ?><br />
<?php } ?>
<b><?php echo $text_order_id; ?></b> <?php echo $order['order_id']; ?><br />
<b><?php echo $text_payment_method; ?></b> <?php echo $order['payment_method']; ?><br />
<?php if ($order['shipping_method']) { ?>
<b><?php echo $text_shipping_method; ?></b> <?php echo $order['shipping_method']; ?><br />
<?php } ?></td>
</tr>
</tbody>
</table>
<table class="table table-bordered">
<thead>
<tr>
<td style="width: 50%;"><b><?php echo $text_payment_address; ?></b></td>
<td style="width: 50%;"><b><?php echo $text_shipping_address; ?></b></td>
</tr>
</thead>
<tbody>
<tr>
<td><address>
<?php echo $order['payment_address']; ?>
</address></td>
<td><address>
<?php echo $order['shipping_address']; ?>
</address></td>
</tr>
</tbody>
</table>
<table class="table table-bordered">
<thead>
<tr>
<td><b><?php echo $column_product; ?></b></td>
<td><b><?php echo $column_model; ?></b></td>
<td class="text-right"><b><?php echo $column_quantity; ?></b></td>
<td class="text-right"><b><?php echo $column_price; ?></b></td>
<td class="text-right"><b><?php echo $column_total; ?></b></td>
</tr>
</thead>
<tbody>
<?php foreach ($order['product'] as $product) { ?>
<tr>
<td><?php echo $product['name']; ?>
<?php foreach ($product['option'] as $option) { ?>
<br />
<small> - <?php echo $option['name']; ?>: <?php echo $option['value']; ?></small>
<?php } ?></td>
<td><?php echo $product['model']; ?></td>
<td class="text-right"><?php echo $product['quantity']; ?></td>
<td class="text-right"><?php echo $product['price']; ?></td>
<td class="text-right"><?php echo $product['total']; ?></td>
</tr>
<?php } ?>
<?php foreach ($order['voucher'] as $voucher) { ?>
<tr>
<td><?php echo $voucher['description']; ?></td>
<td></td>
<td class="text-right">1</td>
<td class="text-right"><?php echo $voucher['amount']; ?></td>
<td class="text-right"><?php echo $voucher['amount']; ?></td>
</tr>
<?php } ?>
<?php foreach ($order['total'] as $total) { ?>
<tr>
<td class="text-right" colspan="4"><b><?php echo $total['title']; ?></b></td>
<td class="text-right"><?php echo $total['text']; ?></td>
</tr>
<?php } ?>
</tbody>
</table>
<?php if ($order['comment']) { ?>
<table class="table table-bordered">
<thead>
<tr>
<td><b><?php echo $text_comment; ?></b></td>
</tr>
</thead>
<tbody>
<tr>
<td><?php echo $order['comment']; ?></td>
</tr>
</tbody>
</table>
<?php } ?>
</div>
<?php } ?>
</div>
</body>
</html>