save the product tier on ordering
[bse.git] / site / templates / admin / order_detail.tmpl
CommitLineData
c4f18087 1<:wrap admin/base.tmpl title => [concatenate "Order " [order id] " details"] bodyid => bse-order-detail :>
5bc24704 2<h1>Shop Administration</h1>
c4f18087 3<p>| <a href="<:adminurl menu:>">Admin menu</a> |
1b0b485d
TC
4<a href="<:adminurl shopadmin:>">Manage catalogs</a> |
5<a href="<:adminurl shopadmin order_list 1:>">Manage orders</a> |
6<a href="<:adminurl shopadmin order_list 1 template order_list_unfilled:>">Unfilled
6a8a205a 7 orders</a> |
1b0b485d
TC
8<a href="<:adminurl shopadmin order_list 1 template order_list_filled:>">Filled
9 orders</a> |
10<:ifSiteuser id:><a href="<:adminurl siteusers a_edit 1 id [siteuser id]:>">Edit Member</a> |
c4f18087 11<a href="<:adminurl siteusers a_edit 1 id [siteuser id] _t orders:>">Other member orders</a> |<:or:><:eif:>
6a8a205a 12</p>
13a986ee 13<:ifMessage:><div class="message"><:message:></div><:or:><:eif:>
918735d1 14<h2>Order details - No: #<:order id:></h2>
c4f18087
TC
15<h3>Received: <span class="date order-date" data-datetime="<:date "%y-%m-%dT%H:%M:%S" order orderDate:>"><:date "%d/%m/%Y %I:%M%P" order orderDate:></span></h3>
16<:ifOrder purchase_order:>
17<h3 class="purchase-order">Purchase Order: <span class="purchase-order"><:order purchase_order:></span></h3>
18<:or:><:eif:>
8a3b8db8
TC
19<:ifOrder complete:><:or:><p>This order is incomplete and should not be filled.</p><:eif:>
20<table class="editform orderdetail_head">
c4f18087
TC
21 <tr>
22 <th colspan="2" class="col_typehead">Billing</th>
23 <td rowspan="6">&nbsp;</td>
24 <th colspan="2" class="col_typehead">Delivery</th>
25 </tr>
918735d1 26 <tr>
8a3b8db8 27 <th class="col_head">E-mail:</th>
c4f18087
TC
28 <td class="col_value"><a href="mailto:<:order billEmail:>"><:order billEmail:></a></td>
29 <th class="col_head">Email:</th>
8a3b8db8 30 <td class="col_value"><a href="mailto:<:order emailAddress:>"><:order emailAddress:></a></td>
c4f18087
TC
31 </tr>
32 <tr>
8a3b8db8 33 <th class="col_head">Phone:</th>
c4f18087
TC
34 <td class="col_value"><a href="tel:<:order billTelephone:>"><:order billTelephone:></a></td>
35 <th class="col_head">Phone:</th>
36 <td class="col_value"><a href="tel:<:order telephone:>"><:order telephone:></a></td>
918735d1
TC
37 </tr>
38 <tr>
8a3b8db8 39 <th class="col_head">Mobile:</th>
c4f18087
TC
40 <td class="col_value"><a href="tel:<:order billMobile:>"><:order billMobile:></a></td>
41 <th class="col_head">Mobile:</th>
42 <td class="col_value"><a href="tel:<:order delivMobile:>"><:order delivMobile:></a></td>
918735d1
TC
43 </tr>
44 <tr>
c4f18087
TC
45 <th class="col_head">Facsimile:</th>
46 <td class="col_value"><a href="fax:<:order billFacsimile:>"><:order billFacsimile:></a></td>
47 <th class="col_head">Facsimile:</th>
48 <td class="col_value"><a href="fax:<:order facsimile:>"><:order facsimile:></a></td>
49 </tr>
50 <tr>
51 <th class="col_head">Address:</th>
8a3b8db8
TC
52 <td class="col_value">
53 <:order billFirstName:> <:order billLastName:>
c4f18087 54 <:ifOrder billOrganization:><br /><:order billOrganization:><:or:><:eif:>
8a3b8db8
TC
55 <br /><:order billStreet:>
56 <:ifOrder billStreet2:><br /><:order billStreet2:><:or:><:eif:>
57 <br /><:order billSuburb:> <:order billState:> <:order billPostCode:>
58 <br /><:order billCountry:>
59 </td>
c4f18087
TC
60 <th class="col_head">Address:</th>
61 <td class="col_value"><:order delivFirstName:> <:order delivLastName:>
62 <:ifOrder delivOrganization:><br /><:order delivOrganization:><:or:><:eif:>
63 <br /><:order delivStreet:>
64 <:ifOrder delivStreet2:><br /><:order delivStreet2:><:or:><:eif:>
65 <br /><:order delivSuburb:> <:order delivState:> <:order delivPostCode:>
66 <br /><:order delivCountry:></td>
67 </tr>
68<:ifOrder instructions:>
69 <tr>
70 <th>Special Instructions:</th>
71 <td colspan="4" class="col_instructions"><:order instructions:></td>
918735d1 72 </tr>
c4f18087 73<:or:><:eif:>
14604ada 74 <:include custom/order_detail.include optional:><:include admin/include/custom/order_detail_custom.tmpl optional:><:include admin/include/order_detail_custom.tmpl optional:>
5bc24704
TC
75</table>
76
8a3b8db8
TC
77<br />
78 <table class="editform orderdetail">
d9803c26 79 <tr>
8a3b8db8
TC
80 <th class="col_description">Description</th>
81 <th class="col_units">Units</th>
8a3b8db8
TC
82 <th class="col_unit_wsale">Unit Wsale</th>
83 <th class="col_ext_wsale">Ext Wsale</th>
84 <th class="col_unit_gst">Unit GST</th>
85 <th class="col_ext_gst">Ext GST</th>
353585b9
TC
86 <th class="col_unitprice">Unit Price</th>
87 <th class="col_extension">Extension</th>
5bc24704 88</tr>
4ad0e50a
TC
89<:.for item in [order.items] -:>
90 <:.set product = @undef -:>
91 <:.if item.productId > 0 -:>
92 <:.set product = bse.products.getByPkey(item.productId) -:>
93 <:.end if -:>
d9803c26 94 <tr>
4ad0e50a
TC
95 <td class="col_description"><:.if product :><a href="<:= product.admin :>"><:= product.title :></a><:.else:><:= item.title :> (product deleted)<:.end if:> <:= item.nice_options:>
96 <:.if item.tier_id:><br><span class="price_tier"><:= item.tier.description :></span><:.end if:></td>
97 <td class="col_units"><:= item.units:></td>
98 <td class="col_unit_wsale"><:= bse.number("money", item.wholesalePrice) :></td>
99 <td class="col_ext_wsale"><:= bse.number("money", item.extended("wholesalePrice")) :></td>
100 <td class="col_unit_gst"><:= bse.number("money", item.gst):></td>
101 <td class="col_ext_gst"><:= bse.number("money", item.extended("gst")):></td>
102 <td class="col_unitprice"><:= bse.number("money", item.price):></td>
103 <td class="col_extension"><:= bse.number("money", item.extended("price")) :></td>
5bc24704 104</tr>
4ad0e50a 105<:.end for -:>
353585b9
TC
106<tr>
107 <td colspan="7" class="col_label_right">Total Price of goods:</td>
108 <td class="col_extension"><:= bse.number("money", order.total_cost) -:></td>
109</tr>
2ced88e0 110<:.if order.coupon -:>
353585b9 111<tr>
25a17f89 112 <td>Coupon code <b><:= order.coupon_code -:></b></td>
353585b9
TC
113 <td colspan="6" class="col_label_right">Discount:</td>
114 <td class="col_extension">(<:= bse.number("money", order.product_cost_discount) -:>)</td>
115</tr>
116<tr>
117 <td colspan="7" class="col_label_right">Discounted total:</td>
118 <td class="col_extension"><:= bse.number("money", order.discounted_product_cost) -:></td>
119</tr>
120<:.end if -:>
d9803c26 121 <tr>
353585b9 122 <td colspan="7" class="col_contact">
4340de9f
TC
123<:if Eq [order shipping_name] "none":>
124Nothing to ship.
125<:or:>
6f0799a4
TC
126<form method="post" action="<:adminurl shopadmin a_order_save 1:>">
127Shipping via <:shipping_method_select:>
080fc207
TC
128 <input type="hidden" name="id" value="<:order id:>" />
129 <:csrfp shop_order_save hidden:>
130 <label>tracking code: <input type="text" name="freight_tracking" value="<:order freight_tracking:>" /></label>
131 <input type="submit" name="a_order_save" value="Save" />
132 </form>
4340de9f 133<:eif:>
d9803c26 134</td>
8a3b8db8 135 <td class="col_extension"><:money order shipping_cost:></td>
d9803c26 136</tr>
8a3b8db8
TC
137 <tr>
138 <td colspan="3" class="col_total">Total:</td>
8a3b8db8 139 <td class="col_ext_wsale total"><:money order wholesaleTotal:></td>
5bc24704 140 <td>&nbsp;</td>
8a3b8db8 141 <td class="col_ext_gst total"><:money order gst:></td>
353585b9
TC
142 <td>&nbsp;</td>
143 <td class="col_extension total"><:money order total:></td>
5bc24704
TC
144</tr>
145</table>
f0722dd2
TC
146<p>Order progress: <:stage_description:> <a href="#" onclick="document.getElementById('update_stage').style.display='block'; this.style.display='none'; return false;">update</a></p>
147
148<form id="update_stage" action="<:adminurl shopadmin:>" style="display: none" method="post">
149 <input type="hidden" name="id" value="<:order id:>" />
150 <:csrfp shop_order_save hidden:>
151 <:stage_select:>
152 <label>Log note: <input type="text" name="stage_note" size="40" /> (optional)</label>
153 <input type="submit" name="a_order_save" value="Save" />
154</form>
155
b62cae00 156<:.if !order.paidFor :>
14604ada 157<p>This order hasn't been paid</p>
b62cae00
TC
158
159<form action="<:adminurl2 shopadmin:>" method="post">
160<input type="hidden" name="id" value="<:= order.id :>" />
161<:csrfp shop_order_paid hidden:>
162Payment type: <:.call "make_select", "name": "paymentType", "list": payment_types, "id": "id", "desc": "desc", "default": order.paymentType -:>
163<input type="submit" name="a_order_paid" value="Mark this order paid" /></form>
164<:.elsif order.is_manually_paid -:>
165<form action="<:adminurl2 shopadmin:>" method="post">
166This order has been manually marked paid via <:= payment_type_desc | html :>
167<input type="hidden" name="id" value="<:= order.id :>" />
168<:csrfp shop_order_unpaid hidden:>
169<input type="submit" name="a_order_unpaid" value="Mark this order unpaid" /></form>
170
171<:.elsif order.ccOnline:>
5d88571c 172<p>This was processed as an online credit card transaction.</p>
b62cae00 173<:.if order.ccSuccess:>
5d88571c
TC
174<p>This transaction was <b>SUCCESSFUL</b>.</p>
175<table>
176<tr><th>Receipt Number:</th><td><:order ccReceipt:></td></tr>
b62cae00 177<:.if order.ccTranId:>
5d88571c 178<tr><th>Transaction Id:</th><td><:order ccTranId:></td></tr>
b62cae00
TC
179<:.end if:>
180<:.if order.ccName:>
6abd8ce8 181<tr><th>Card Holder:</th><td><:order ccName:></td>
b62cae00
TC
182<:.end if:>
183<:.if order.ccPAN:>
6abd8ce8 184<tr><th>Card Number (partial):</th><td>...<:order ccPAN:></td>
b62cae00 185<:.end if:>
5d88571c 186</table>
b62cae00 187<:.else:>
5d88571c
TC
188<p>This transaction <b>FAILED</b>.</p>
189<table>
190<tr><th>Status:</th><td><:order ccStatus:></td>
191<tr><th>Error:</th><td><:order ccStatusText:></td>
190d0ecc 192<:.if order.ccStatus2:>
5d88571c 193<tr><th>More status</th><td><:order ccStatus2:></td>
b62cae00 194<:.end if:>
5d88571c 195</table>
b62cae00
TC
196<:.end if:>
197<:.elsif order.paymentType == 0:>
198<p>Payment made by credit card. Credit card details can be found in the encrypted email you received when the customer made the order.</p>
199<:.if order.ccPAN or order.ccName :>
6abd8ce8 200<table>
b62cae00 201<:.if order.ccName:>
6abd8ce8 202<tr><th>Card Holder</th><td><:order ccName:></td>
b62cae00
TC
203<:.end if:>
204<:.if order.ccPAN:>
6abd8ce8 205<tr><th>Card Number (partial)</th><td>...<:order ccPAN:></td>
b62cae00 206<:.end if:>
6abd8ce8 207</table>
b62cae00
TC
208<:.end if:>
209<:.elsif order.paymentType == 1 -:>
210 <p>Payment will be made by cheque.</p>
211<:.elsif order.paymentType == 2 -:>
212 <p>Contact the customer to arrange for payment.</p>
213<:.elsif order.paymentType == 4:><p>Paid via PayPal, transaction id <:order paypal_tran_id:><:ifUserCan bse_shop_order_refund_paypal:> <a href="<:adminurl shopadmin a_paypal_refund 1 id [order id]:>">Refund</a><:or:><:eif:></p>
214<:.end if:>
d64413ee 215<:include custom/order_detail_payment.include optional:>
b62cae00 216<:.if order.filled:>
a11a0d7c 217<p>This order was filled on <:date order whenFilled:> by <:order whoFilled:>.</p>
b62cae00
TC
218<:.elsif order.complete:>
219<p>This order hasn't been filled yet. <a href="<:adminurl shopadmin id [order id] order_filled Yep filled 1 detail 1:>">Mark order filled</a>.</p>
220<:.end if:>
221<:.if order.instructions:>
14604ada 222<p style="white-space: pre-wrap;"><:order instructions:></p>
b62cae00 223<:.end if:>
13a986ee
TC
224
225<table class="editform" id="auditlog">
226<:include admin/include/audithead.tmpl:>
227<:iterator begin auditlog object_id [order id] object_type BSE::TB::Order:>
228<:include admin/include/auditentry.tmpl:>
229<:iterator end auditlog:>
230</table>