// update order tab

This commit is contained in:
sLorenzini
2013-07-25 09:41:31 +02:00
parent edc2113330
commit 312ad4eb37
3 changed files with 190 additions and 125 deletions
@@ -49,7 +49,7 @@
{if ($order->hasBeenPaid())}<td align="center" class="productQuantity">{$product['customizationQuantityRefunded']}</td>{/if} {if ($order->hasBeenPaid())}<td align="center" class="productQuantity">{$product['customizationQuantityRefunded']}</td>{/if}
{if ($order->hasBeenDelivered() || $order->hasProductReturned())}<td align="center" class="productQuantity">{$product['customizationQuantityReturned']}</td>{/if} {if ($order->hasBeenDelivered() || $order->hasProductReturned())}<td align="center" class="productQuantity">{$product['customizationQuantityReturned']}</td>{/if}
{if $stock_management}<td align="center" class=""> - </td>{/if} {if $stock_management}<td align="center" class=""> - </td>{/if}
<td align="center" class="total_product"> <td class="total_product text-right">
{if ($order->getTaxCalculationMethod() == $smarty.const.PS_TAX_EXC)} {if ($order->getTaxCalculationMethod() == $smarty.const.PS_TAX_EXC)}
{displayPrice price=Tools::ps_round($product['product_price'] * $product['customizationQuantityTotal'], 2) currency=$currency->id|intval} {displayPrice price=Tools::ps_round($product['product_price'] * $product['customizationQuantityTotal'], 2) currency=$currency->id|intval}
{else} {else}
@@ -109,7 +109,7 @@
<td align="center"> <td align="center">
- -
</td> </td>
<td align="center" class="total_product"> <td class="total_product text-right">
{if ($order->getTaxCalculationMethod() == $smarty.const.PS_TAX_EXC)} {if ($order->getTaxCalculationMethod() == $smarty.const.PS_TAX_EXC)}
{displayPrice price=Tools::ps_round($product['product_price'] * $customization['quantity'], 2) currency=$currency->id|intval} {displayPrice price=Tools::ps_round($product['product_price'] * $customization['quantity'], 2) currency=$currency->id|intval}
{else} {else}
@@ -133,15 +133,21 @@
<input type="text" id="cancelQuantity_{$customizationId|intval}" name="cancelCustomizationQuantity[{$customizationId|intval}]" size="2" onclick="selectCheckbox(this);" value="" />0/{$customization['quantity']-$customization['quantity_refunded']} <input type="text" id="cancelQuantity_{$customizationId|intval}" name="cancelCustomizationQuantity[{$customizationId|intval}]" size="2" onclick="selectCheckbox(this);" value="" />0/{$customization['quantity']-$customization['quantity_refunded']}
{/if} {/if}
</td> </td>
<td class="partial_refund_fields current-edit" style="text-align:left;display:none"> <td class="partial_refund_fields current-edit" style="display:none">
<div style="width:40%;margin-top:5px;float:left">{l s='Quantity:'}</div> <div style="width:60%;margin-top:2px;float:left"><input type="text" size="3" name="partialRefundProductQuantity[{$product['id_order_detail']|intval}]" value="0" /> <label class="text-center">
0/{$customization['quantity']-$customization['quantity_refunded']} {l s='Quantity:'}
</div> <input type="text" size="3" name="partialRefundProductQuantity[{$product['id_order_detail']|intval}]" value="0" />
<div style="width:40%;margin-top:5px;float:left">{l s='Amount:'}</div> <div style="width:60%;margin-top:2px;float:left">{$currency->prefix}<input type="text" size="3" name="partialRefundProduct[{$product['id_order_detail']|intval}]" />{$currency->suffix}</div> 0/{$customization['quantity']-$customization['quantity_refunded']}
</label>
<label class="text-center">
{l s='Amount:'}
{$currency->prefix}
<input type="text" size="3" name="partialRefundProduct[{$product['id_order_detail']|intval}]" />{$currency->suffix}
</label>
</td> </td>
{if ($can_edit && !$order->hasBeenDelivered())} {if ($can_edit && !$order->hasBeenDelivered())}
<td class="edit_product_fields" colspan="2" style="display:none"></td> <td class="edit_product_fields" colspan="2" style="display:none"></td>
<td class="product_action" style="text-align:right"></td> <td class="product_action" class="text-right"></td>
{/if} {/if}
</tr> </tr>
{/foreach} {/foreach}
@@ -39,7 +39,7 @@
{if $product.product_reference}{l s='Ref:'} {$product.product_reference}<br />{/if} {if $product.product_reference}{l s='Ref:'} {$product.product_reference}<br />{/if}
{if $product.product_supplier_reference}{l s='Ref Supplier:'} {$product.product_supplier_reference}{/if} {if $product.product_supplier_reference}{l s='Ref Supplier:'} {$product.product_supplier_reference}{/if}
</a></td> </a></td>
<td align="center"> <td>
<span class="product_price_show">{displayPrice price=$product_price currency=$currency->id}</span> <span class="product_price_show">{displayPrice price=$product_price currency=$currency->id}</span>
{if $can_edit} {if $can_edit}
<span class="product_price_edit" style="display:none;"> <span class="product_price_edit" style="display:none;">
@@ -90,7 +90,7 @@
</td> </td>
{/if} {/if}
{if $stock_management}<td align="center" class="productQuantity product_stock">{$product['current_stock']}</td>{/if} {if $stock_management}<td align="center" class="productQuantity product_stock">{$product['current_stock']}</td>{/if}
<td align="center" class="total_product"> <td class="total_product text-right">
{displayPrice price=(Tools::ps_round($product_price, 2) * ($product['product_quantity'] - $product['customizationQuantityTotal'])) currency=$currency->id} {displayPrice price=(Tools::ps_round($product_price, 2) * ($product['product_quantity'] - $product['customizationQuantityTotal'])) currency=$currency->id}
</td> </td>
<td colspan="2" style="display: none;" class="add_product_fields">&nbsp;</td> <td colspan="2" style="display: none;" class="add_product_fields">&nbsp;</td>
@@ -125,11 +125,20 @@
0/{$productQuantity} 0/{$productQuantity}
{/if} {/if}
</td> </td>
<td class="partial_refund_fields current-edit" style="text-align:left;display:none"> <td class="partial_refund_fields current-edit" style="display:none">
<div style="width:40%;margin-top:5px;float:left">{l s='Quantity:'}</div> <div style="width:60%;margin-top:2px;float:left"><input onchange="checkPartialRefundProductQuantity(this)" type="text" size="3" name="partialRefundProductQuantity[{{$product['id_order_detail']}}]" value="0" /> 0/{$productQuantity-$product['product_quantity_refunded']}</div> <label class="text-center">
<div style="width:40%;margin-top:5px;float:left">{l s='Amount:'}</div> <div style="width:60%;margin-top:2px;float:left">{$currency->prefix}<input onchange="checkPartialRefundProductAmount(this)" type="text" size="3" name="partialRefundProduct[{$product['id_order_detail']}]" /> {$currency->suffix}</div> {if !empty($product['amount_refund']) && $product['amount_refund'] > 0}({l s='%s refund' sprintf=$product['amount_refund']}){/if} {l s='Quantity:'}
<input type="hidden" value="{$product['quantity_refundable']}" class="partialRefundProductQuantity" /> <input onchange="checkPartialRefundProductQuantity(this)" type="text" size="3" name="partialRefundProductQuantity[{{$product['id_order_detail']}}]" value="0" />
<input type="hidden" value="{$product['amount_refundable']}" class="partialRefundProductAmount" /> 0/{$productQuantity-$product['product_quantity_refunded']}
</label>
<label class="text-center">
{l s='Amount:'}
{$currency->prefix}<input onchange="checkPartialRefundProductAmount(this)" type="text" size="3" name="partialRefundProduct[{$product['id_order_detail']}]" />
{$currency->suffix}
{if !empty($product['amount_refund']) && $product['amount_refund'] > 0}({l s='%s refund' sprintf=$product['amount_refund']}){/if}
<input type="hidden" value="{$product['quantity_refundable']}" class="partialRefundProductQuantity" />
<input type="hidden" value="{$product['amount_refundable']}" class="partialRefundProductAmount" />
</label>
</td> </td>
{if ($can_edit && !$order->hasBeenDelivered())} {if ($can_edit && !$order->hasBeenDelivered())}
<td class="product_invoice" colspan="2" style="display: none;text-align:center;"> <td class="product_invoice" colspan="2" style="display: none;text-align:center;">
@@ -27,7 +27,7 @@
{block name="override_tpl"} {block name="override_tpl"}
<script type="text/javascript"> <script type="text/javascript">
var admin_order_tab_link = "{$link->getAdminLink('AdminOrders')|addslashes}"; var admin_order_tab_link = "{$link->getAdminLink('AdminOrders')|escape:'html'}";
var id_order = {$order->id}; var id_order = {$order->id};
var id_lang = {$current_id_lang}; var id_lang = {$current_id_lang};
var id_currency = {$order->id_currency}; var id_currency = {$order->id_currency};
@@ -129,61 +129,70 @@
<div class="col-lg-12"> <div class="col-lg-12">
<!-- Change status form --> <!-- Change status form -->
<form action="{$currentIndex}&vieworder&token={$smarty.get.token}" method="post"> <form action="{$currentIndex}&vieworder&token={$smarty.get.token}" method="post">
<label class="control-label col-lg-1 text-right"> <fieldset class="well">
{l s='Status:'} <legend>
</label> <i class="icon-table"></i>
<div class="col-lg-10"> {l s='Order status'}
<select id="id_order_state" name="id_order_state"> </legend>
{foreach from=$states item=state} <label class="control-label col-lg-1 text-right">
<option value="{$state['id_order_state']}"{if $state['id_order_state'] == $currentState->id} selected="selected" disabled="disabled"{/if}>{$state['name']|stripslashes}</option> {l s='Status:'}
{/foreach} </label>
</select> <div class="col-lg-10">
</div> <select id="id_order_state" name="id_order_state">
<input type="hidden" name="id_order" value="{$order->id}" /> {foreach from=$states item=state}
<button type="submit" name="submitState" class="btn btn-default"> {if $state['id_order_state'] != $currentState->id}
{l s='Add'} <option value="{$state['id_order_state']}">{$state['name']|stripslashes}</option>
</button> {/if}
</form> {/foreach}
<!-- History of status --> </select>
<table cellspacing="0" cellpadding="0" class="table table-hover"> </div>
<colgroup> <input type="hidden" name="id_order" value="{$order->id}" />
<col width="1%"> <button type="submit" name="submitState" class="btn btn-default">
<col width=""> {l s='Add'}
<col width="20%"> </button>
<col width="20%">
</colgroup>
{foreach from=$history item=row key=key}
{if ($key == 0)}
<thead>
<tr>
<th>
<img src="../img/os/{$row['id_order_state']}.gif" />
</th>
<th>
<span class="title_box ">{$row['ostate_name']|stripslashes}</span>
</th>
<th>
<span class="title_box ">{if $row['employee_lastname']}{$row['employee_firstname']|stripslashes} {$row['employee_lastname']|stripslashes}{/if}</span>
</th>
<th>
<span class="title_box ">{dateFormat date=$row['date_add'] full=true}</span>
</th>
</tr>
</thead>
{else}
<tbody>
<tr class="{if ($key % 2)}alt_row{/if}">
<td><img src="../img/os/{$row['id_order_state']}.gif" /></td>
<td>{$row['ostate_name']|stripslashes}</td>
<td>{if $row['employee_lastname']}{$row['employee_firstname']|stripslashes} {$row['employee_lastname']|stripslashes}{else}&nbsp;{/if}</td>
<td>{dateFormat date=$row['date_add'] full=true}</td>
</tr>
</tbody>
{/if}
{/foreach}
</table>
{if $customer->id} <!-- History of status -->
<table cellspacing="0" cellpadding="0" class="table table-hover">
<colgroup>
<col width="1%">
<col width="">
<col width="20%">
<col width="20%">
</colgroup>
{foreach from=$history item=row key=key}
{if ($key == 0)}
<thead>
<tr>
<th>
<img src="../img/os/{$row['id_order_state']}.gif" />
</th>
<th>
<span class="title_box ">{$row['ostate_name']|stripslashes}</span>
</th>
<th>
<span class="title_box ">{if $row['employee_lastname']}{$row['employee_firstname']|stripslashes} {$row['employee_lastname']|stripslashes}{/if}</span>
</th>
<th>
<span class="title_box ">{dateFormat date=$row['date_add'] full=true}</span>
</th>
</tr>
</thead>
{else}
<tbody>
<tr class="{if ($key % 2)}alt_row{/if}">
<td><img src="../img/os/{$row['id_order_state']}.gif" /></td>
<td>{$row['ostate_name']|stripslashes}</td>
<td>{if $row['employee_lastname']}{$row['employee_firstname']|stripslashes} {$row['employee_lastname']|stripslashes}{else}&nbsp;{/if}</td>
<td>{dateFormat date=$row['date_add'] full=true}</td>
</tr>
</tbody>
{/if}
{/foreach}
</table>
{if $customer->id}
</fieldset>
</form>
</div> </div>
<!-- Customer informations --> <!-- Customer informations -->
@@ -201,7 +210,7 @@
{if (!Customer::customerExists($customer->email))} {if (!Customer::customerExists($customer->email))}
<form method="post" action="index.php?tab=AdminCustomers&id_customer={$customer->id}&token={getAdminToken tab='AdminCustomers'}"> <form method="post" action="index.php?tab=AdminCustomers&id_customer={$customer->id}&token={getAdminToken tab='AdminCustomers'}">
<input type="hidden" name="id_lang" value="{$order->id_lang}" /> <input type="hidden" name="id_lang" value="{$order->id_lang}" />
<p class="center"><input class="button" type="submit" name="submitGuestToCustomer" value="{l s='Transform a guest into a customer'}" /></p> <p class="text-center"><input class="button" type="submit" name="submitGuestToCustomer" value="{l s='Transform a guest into a customer'}" /></p>
{l s='This feature will generate a random password and send an email to the customer.'} {l s='This feature will generate a random password and send an email to the customer.'}
</form> </form>
{else} {else}
@@ -559,12 +568,12 @@
<td>{displayPrice price=$payment->amount currency=$payment->id_currency}</td> <td>{displayPrice price=$payment->amount currency=$payment->id_currency}</td>
<td> <td>
{if $invoice = $payment->getOrderInvoice($order->id)} {if $invoice = $payment->getOrderInvoice($order->id)}
{$invoice->getInvoiceNumberFormatted($current_id_lang, $order->id_shop)} {$invoice->getInvoiceNumberFormatted($current_id_lang)}
{else} {else}
{l s='No invoice'} {l s='No invoice'}
{/if} {/if}
</td> </td>
<td class="right"> <td class="text-right">
<a href="#" class="open_payment_information"> <a href="#" class="open_payment_information">
<i class="icon-search"></i> <i class="icon-search"></i>
</a> </a>
@@ -611,7 +620,7 @@
</tr> </tr>
{foreachelse} {foreachelse}
<tr> <tr>
<td colspan="6" class="center"> <td colspan="6" class="text-center">
<h4>{l s='No payments are available'}</h4> <h4>{l s='No payments are available'}</h4>
</td> </td>
</tr> </tr>
@@ -642,7 +651,7 @@
<td> <td>
<select name="payment_invoice" id="payment_invoice"> <select name="payment_invoice" id="payment_invoice">
{foreach from=$invoices_collection item=invoice} {foreach from=$invoices_collection item=invoice}
<option value="{$invoice->id}" selected="selected">{$invoice->getInvoiceNumberFormatted($current_id_lang, $order->id_shop)}</option> <option value="{$invoice->id}" selected="selected">{$invoice->getInvoiceNumberFormatted($current_id_lang)}</option>
{/foreach} {/foreach}
</select> </select>
</td> </td>
@@ -807,61 +816,64 @@
{l s='Add a product'} {l s='Add a product'}
</a> </a>
{/if} {/if}
<!--<div style="float: right; margin-right: 10px" id="refundForm"> <div style="float: right; margin-right: 10px" id="refundForm">
<a href="#" class="standard_refund"><img src="../img/admin/add.gif" alt="{l s='Process a standard refund'}" /> {l s='Process a standard refund'}</a> <!--<a href="#" class="standard_refund"><img src="../img/admin/add.gif" alt="{l s='Process a standard refund'}" /> {l s='Process a standard refund'}</a>
<a href="#" class="partial_refund"><img src="../img/admin/add.gif" alt="{l s='Process a partial refund'}" /> {l s='Process a partial refund'}</a> <a href="#" class="partial_refund"><img src="../img/admin/add.gif" alt="{l s='Process a partial refund'}" /> {l s='Process a partial refund'}</a>-->
</div>--> </div>
{/if} {/if}
<div class="col-lg-12"> <div class="col-lg-12">
<table cellspacing="0" cellpadding="0" class="table table-hover" id="orderProducts"> <table cellspacing="0" cellpadding="0" class="table table-hover" id="orderProducts">
<thead> <thead>
<tr> <tr>
<th height="39" class="center" width="7%">&nbsp;</th> <th height="39" width="7%">&nbsp;</th>
<th> <th>
<span class="title_box ">{l s='Product'}</span> <span class="title_box ">{l s='Product'}</span>
</th> </th>
<th width="15%" class="center"> <th width="15%">
<span class="title_box ">{l s='Unit Price'} <sup>*</sup></span> <span class="title_box ">{l s='Unit Price'} <sup>*</sup></span>
</th> </th>
<th width="4%" class="center"> <th width="4%">
<span class="title_box ">{l s='Qty'}</span> <span class="title_box ">{l s='Qty'}</span>
</th> </th>
{if ($order->hasBeenPaid())} {if ($order->hasBeenPaid())}
<th width="3%" class="center"> <th width="3%">
<span class="title_box ">{l s='Refunded'}</span> <span class="title_box ">{l s='Refunded'}</span>
</th> </th>
{/if} {/if}
{if ($order->hasBeenDelivered() || $order->hasProductReturned())} {if ($order->hasBeenDelivered() || $order->hasProductReturned())}
<th width="3%" class="center"> <th width="3%">
<span class="title_box ">{l s='Returned'}</span> <span class="title_box ">{l s='Returned'}</span>
</th> </th>
{/if} {/if}
{if $stock_management} {if $stock_management}
<th width="10%" class="center"> <th width="10%">
<span class="title_box ">{l s='Available quantity'}</span> <span class="title_box ">{l s='Available quantity'}</span>
</th> </th>
{/if} {/if}
<th width="10%" class="center"> <th width="10%" class="text-right">
<span class="title_box ">{l s='Total'} <sup>*</sup></span> <span class="title_box ">{l s='Total'} <sup>*</sup></span>
</th> </th>
<th colspan="2" style="display: none;" class="add_product_fields">&nbsp;</th> <th colspan="2" style="display: none;" class="add_product_fields">&nbsp;</th>
<th colspan="2" style="display: none;" class="edit_product_fields">&nbsp;</th> <th colspan="2" style="display: none;" class="edit_product_fields">&nbsp;</th>
<th colspan="2" style="display: none;" class="standard_refund_fields"><img src="../img/admin/delete.gif" alt="{l s='Products:'}" /> <th colspan="2" style="display: none;" class="standard_refund_fields">
{if ($order->hasBeenDelivered() || $order->hasBeenShipped())} <span class="title_box ">
<span class="title_box ">{l s='Return'}</span> <i class="icon-remove"></i>
{elseif ($order->hasBeenPaid())} {if ($order->hasBeenDelivered() || $order->hasBeenShipped())}
<span class="title_box ">{l s='Refund'}</span> {l s='Return'}
{else} {elseif ($order->hasBeenPaid())}
<span class="title_box ">{l s='Cancel'}</span> {l s='Refund'}
{/if} {else}
{l s='Cancel'}
{/if}
</span>
</th> </th>
<th widht="12%" style="display:none" class="partial_refund_fields right"> <th widht="12%" style="display:none" class="partial_refund_fields right">
<span class="title_box ">{l s='Partial refund'}</span> <span class="title_box ">{l s='Partial refund'}</span>
</th> </th>
{if !$order->hasBeenDelivered()} {if !$order->hasBeenDelivered()}
<th width="8%" class="center"> <th width="8%" class="text-center">
<span class="title_box ">{l s='Action'}</span> <span class="title_box ">{l s='Action'}</span>
</th> </th>
{/if} {/if}
@@ -880,43 +892,68 @@
</table> </table>
</div> </div>
<div class="col-lg-12"> <div class="col-lg-12">
<sup>*</sup> {l s='For this customer group, prices are displayed as:'} <p class="text-muted">
{if ($order->getTaxCalculationMethod() == $smarty.const.PS_TAX_EXC)} <sup>*</sup> {l s='For this customer group, prices are displayed as:'}
{l s='tax excluded.'} {if ($order->getTaxCalculationMethod() == $smarty.const.PS_TAX_EXC)}
{else} {l s='tax excluded.'}
{l s='tax included.'} {else}
{/if} {l s='tax included.'}
{/if}
{if !Configuration::get('PS_ORDER_RETURN')} </p>
<br /><br />{l s='Merchandise returns are disabled'} <p class="text-danger">
{/if} {if !Configuration::get('PS_ORDER_RETURN')}
{l s='Merchandise returns are disabled'}
{/if}
</p>
</div> </div>
<div class="col-lg-7 pull-right"> <div class="col-lg-7 pull-right">
<table class="table table-hover" width="450px;" style="border-radius:0px;"cellspacing="0" cellpadding="0"> <table class="table table-hover" cellspacing="0" cellpadding="0">
<tr id="total_products"> <tr id="total_products">
<td width="150px;"><strong>{l s='Products:'}</strong></td> <td width="150">
<td class="amount" align="right">{displayPrice price=$order->total_products_wt currency=$currency->id}</td> <span><strong>{l s='Products:'}</strong></span>
</td>
<td class="text-right">
<span>{displayPrice price=$order->total_products_wt currency=$currency->id}</span>
</td>
<td class="partial_refund_fields current-edit" style="display:none;">&nbsp;</td> <td class="partial_refund_fields current-edit" style="display:none;">&nbsp;</td>
</tr> </tr>
<tr id="total_discounts" {if $order->total_discounts_tax_incl == 0}style="display: none;"{/if}> <tr id="total_discounts" {if $order->total_discounts_tax_incl == 0}style="display: none;"{/if}>
<td><strong>{l s='Discounts'}</strong></td> <td>
<td class="amount" align="right">-{displayPrice price=$order->total_discounts_tax_incl currency=$currency->id}</td> <span><strong>{l s='Discounts'}</strong></span>
</td>
<td class="text-right">
<span>-{displayPrice price=$order->total_discounts_tax_incl currency=$currency->id}</span>
</td>
<td class="partial_refund_fields current-edit" style="display:none;">&nbsp;</td> <td class="partial_refund_fields current-edit" style="display:none;">&nbsp;</td>
</tr> </tr>
<tr id="total_wrapping" {if $order->total_wrapping_tax_incl == 0}style="display: none;"{/if}> <tr id="total_wrapping" {if $order->total_wrapping_tax_incl == 0}style="display: none;"{/if}>
<td><strong>{l s='Wrapping'}</strong></td> <td>
<td class="amount" align="right">{displayPrice price=$order->total_wrapping_tax_incl currency=$currency->id}</td> <span><strong>{l s='Wrapping'}</strong></span>
</td>
<td class="text-right">
<span>{displayPrice price=$order->total_wrapping_tax_incl currency=$currency->id}</span>
</td>
<td class="partial_refund_fields current-edit" style="display:none;">&nbsp;</td> <td class="partial_refund_fields current-edit" style="display:none;">&nbsp;</td>
</tr> </tr>
<tr id="total_shipping"> <tr id="total_shipping">
<td><strong>{l s='Shipping'}</strong></td> <td>
<td class="amount" align="right">{displayPrice price=$order->total_shipping_tax_incl currency=$currency->id}</td> <span><strong>{l s='Shipping'}</strong></span>
<td class="partial_refund_fields current-edit" style="display:none;">{$currency->prefix}<input type="text" size="3" name="partialRefundShippingCost" value="0" />{$currency->suffix}</td> </td>
<td class="text-right">
<span>{displayPrice price=$order->total_shipping_tax_incl currency=$currency->id}</span>
</td>
<td class="partial_refund_fields current-edit" style="display:none;">
<span class="col-lg-2">{$currency->prefix}</span>
<span class="col-lg-8"><input type="text" size="3" name="partialRefundShippingCost" value="0" /></span>
<span class="col-lg-2">{$currency->suffix}</span>
</td>
</tr> </tr>
<tr style="font-size: 20px" id="total_order"> <tr id="total_order">
<td style="font-size: 20px">{l s='Total'}</td> <td>
<td class="amount" style="font-size: 20px" align="right"> <span>{l s='Total'}</span>
{displayPrice price=$order->total_paid_tax_incl currency=$currency->id} </td>
<td class="text-right">
<span>{displayPrice price=$order->total_paid_tax_incl currency=$currency->id}</span>
</td> </td>
<td class="partial_refund_fields current-edit" style="display:none;">&nbsp;</td> <td class="partial_refund_fields current-edit" style="display:none;">&nbsp;</td>
</tr> </tr>
@@ -941,7 +978,7 @@
{displayPrice price=$discount['value'] currency=$currency->id} {displayPrice price=$discount['value'] currency=$currency->id}
</td> </td>
{if $can_edit} {if $can_edit}
<td class="center"> <td class="text-center">
<a href="{$current_index}&submitDeleteVoucher&id_order_cart_rule={$discount['id_order_cart_rule']}&id_order={$order->id}&token={$smarty.get.token|escape:'htmlall':'UTF-8'}"><img src="../img/admin/delete.gif" alt="{l s='Delete voucher'}" /></a> <a href="{$current_index}&submitDeleteVoucher&id_order_cart_rule={$discount['id_order_cart_rule']}&id_order={$order->id}&token={$smarty.get.token|escape:'htmlall':'UTF-8'}"><img src="../img/admin/delete.gif" alt="{l s='Delete voucher'}" /></a>
</td> </td>
{/if} {/if}
@@ -949,7 +986,7 @@
{/foreach} {/foreach}
{if $can_edit} {if $can_edit}
<tr> <tr>
<td colspan="3" class="center"> <td colspan="3" class="text-center">
<a class="button" href="#" id="add_voucher"><img src="../img/admin/add.gif" alt="{l s='Add'}" /> {l s='Add a new discount'}</a> <a class="button" href="#" id="add_voucher"><img src="../img/admin/add.gif" alt="{l s='Add'}" /> {l s='Add a new discount'}</a>
</td> </td>
</tr> </tr>
@@ -978,10 +1015,23 @@
</div> </div>
{/if} {/if}
</div> </div>
<div style="float: right; width: 160px; display:none;" class="partial_refund_fields"> <div style="display:none;" class="partial_refund_fields col-lg-7 pull-right">
<input type="checkbox" name="reinjectQuantities" class="button" />&nbsp;<label for="reinjectQuantities" style="float:none; font-weight:normal;">{l s='Re-stock products'}</label><br /> <div class="checkbox">
<input type="checkbox" id="generateDiscountRefund" name="generateDiscountRefund" class="button" onclick="toggleShippingCost(this)" />&nbsp;<label for="generateDiscount" style="float:none; font-weight:normal;">{l s='Generate a voucher'}</label><br /> <label for="reinjectQuantities" class="control-label">
<input type="submit" name="partialRefund" value="{l s='Partial refund'}" class="button" style="margin-top:8px;" /> <input type="checkbox" name="reinjectQuantities" class="button" />
{l s='Re-stock products'}
</label>
</div>
<div class="checkbox">
<label for="generateDiscount" class="control-label">
<input type="checkbox" id="generateDiscountRefund" name="generateDiscountRefund" class="button" onclick="toggleShippingCost(this)" />
{l s='Generate a voucher'}
</label>
</div>
<button type="submit" name="partialRefund" class="btn btn-default">
{l s='Partial refund'}
</button>
</div> </div>
</fieldset> </fieldset>
</form> </form>