// update order tab

This commit is contained in:
sLorenzini
2013-07-23 17:54:47 +02:00
parent f194aec8c5
commit 5b804d3628
7 changed files with 1163 additions and 937 deletions
@@ -138,19 +138,20 @@
</td>
<td>
<div class="btn-group btn-group-action">
<span class="btn btn-default btn-small">{l s='Choose an action'}</span>
<button class="btn btn-default btn-small dropdown-toggle" data-toggle="dropdown">
<span class="caret"></span>&nbsp;
</button>
<ul class="dropdown-menu">
<li>
<a href="{$current}&id_module={$module['instance']->id}&id_hook={$hook['id_hook']}&editGraft{if $display_key}&show_modules={$display_key}{/if}&token={$token}">
<i class="icon-edit"></i>
<i class="icon-pencil"></i>
{l s='Edit'}
</a>
</li>
<li>
<a href="{$current}&id_module={$module['instance']->id}&id_hook={$hook['id_hook']}&deleteGraft{if $display_key}&show_modules={$display_key}{/if}&token={$token}">
<i class="icon-remove"></i>
<i class="icon-trash"></i>
{l s='Delete'}
</a>
</li>
@@ -23,126 +23,128 @@
* International Registered Trademark & Property of PrestaShop SA
*}
{if $product['customizedDatas']}
<tr class="customized customized-{$product['id_order_detail']|intval}">
<td align="center">
<input type="hidden" class="edit_product_id_order_detail" value="{$product['id_order_detail']|intval}" />
{if isset($product['image']) && $product['image']->id|intval}{$product['image_tag']}{else}--{/if}</td>
<td>
<a href="index.php?controller=adminproducts&id_product={$product['product_id']|intval}&updateproduct&token={getAdminToken tab='AdminProducts'}">
<span class="productName">{$product['product_name']} - {l s='Customized'}</span><br />
{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}
</a>
</td>
<td align="center">
<span class="product_price_show">{displayPrice price=$product['product_price_wt'] currency=$currency->id|intval}</span>
{if $can_edit}
<span class="product_price_edit" style="display:none;">
<input type="hidden" name="product_id_order_detail" class="edit_product_id_order_detail" value="{$product['id_order_detail']|intval}" />
{if $currency->sign % 2}{$currency->sign}{/if}<input type="text" name="product_price_tax_excl" class="edit_product_price_tax_excl edit_product_price" value="{Tools::ps_round($product['unit_price_tax_excl'], 2)}" size="5" /> {if !($currency->sign % 2)}{$currency->sign}{/if} {l s='tax excl.'}<br />
{if $currency->sign % 2}{$currency->sign}{/if}<input type="text" name="product_price_tax_incl" class="edit_product_price_tax_incl edit_product_price" value="{Tools::ps_round($product['unit_price_tax_incl'], 2)}" size="5" /> {if !($currency->sign % 2)}{$currency->sign}{/if} {l s='tax incl.'}
</span>
{/if}
</td>
<td align="center" class="productQuantity">{$product['customizationQuantityTotal']}</td>
{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 $stock_management}<td align="center" class=""> - </td>{/if}
<td align="center" class="total_product">
{if ($order->getTaxCalculationMethod() == $smarty.const.PS_TAX_EXC)}
{displayPrice price=Tools::ps_round($product['product_price'] * $product['customizationQuantityTotal'], 2) currency=$currency->id|intval}
{else}
{displayPrice price=Tools::ps_round($product['product_price_wt'] * $product['customizationQuantityTotal'], 2) currency=$currency->id|intval}
{/if}
</td>
<td class="cancelQuantity standard_refund_fields current-edit" style="display:none" colspan="2">
&nbsp;
</td>
<td class="edit_product_fields" colspan="2" style="display:none">&nbsp;</td>
<td class="partial_refund_fields current-edit" style="text-align:left;display:none"></td>
{if ($can_edit && !$order->hasBeenDelivered())}
<td class="product_action" style="text-align:right">
<a href="#" class="edit_product_change_link"><img src="../img/admin/edit.gif" alt="{l s='Edit'}" /></a>
<input type="submit" class="button" name="submitProductChange" value="{l s='Update'}" style="display: none;" />
<a href="#" class="cancel_product_change_link" style="display: none;"><img src="../img/admin/disabled.gif" alt="{l s='Cancel'}" /></a>
<a href="#" class="delete_product_line"><img src="../img/admin/delete.gif" alt="{l s='Delete'}" /></a>
</td>
{/if}
</tr>
{foreach $product['customizedDatas'] as $customizationPerAddress}
{foreach $customizationPerAddress as $customizationId => $customization}
<tr class="customized customized-{$product['id_order_detail']|intval}">
<td colspan="2">
<tbody>
<tr class="customized customized-{$product['id_order_detail']|intval}">
<td align="center">
<input type="hidden" class="edit_product_id_order_detail" value="{$product['id_order_detail']|intval}" />
{foreach $customization.datas as $type => $datas}
{if ($type == Product::CUSTOMIZE_FILE)}
<ul style="margin: 4px 0px 4px 0px; padding: 0px; list-style-type: none;">
{foreach from=$datas item=data}
<li style="margin: 2px;">
<span>{if $data['name']}{$data['name']}{else}{l s='Picture #'}{$data@iteration}{/if}{l s=':'}</span>&nbsp;
<a href="displayImage.php?img={$data['value']}&name={$order->id|intval}-file{$data@iteration}" target="_blank"><img src="{$smarty.const._THEME_PROD_PIC_DIR_}{$data['value']}_small" alt="" /></a>
</li>
{/foreach}
</ul>
{elseif ($type == Product::CUSTOMIZE_TEXTFIELD)}
<ul style="margin: 0px 0px 4px 0px; padding: 0px 0px 0px 6px; list-style-type: none;">
{foreach from=$datas item=data}
<li>{if $data['name']}{l s='%s:' sprintf=$data['name']}{else}{l s='Text #%s:' sprintf=$data@iteration}{/if} {$data['value']}</li>
{/foreach}
</ul>
{if isset($product['image']) && $product['image']->id|intval}{$product['image_tag']}{else}--{/if}</td>
<td>
<a href="index.php?controller=adminproducts&id_product={$product['product_id']|intval}&updateproduct&token={getAdminToken tab='AdminProducts'}">
<span class="productName">{$product['product_name']} - {l s='Customized'}</span><br />
{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}
</a>
</td>
<td align="center">
<span class="product_price_show">{displayPrice price=$product['product_price_wt'] currency=$currency->id|intval}</span>
{if $can_edit}
<span class="product_price_edit" style="display:none;">
<input type="hidden" name="product_id_order_detail" class="edit_product_id_order_detail" value="{$product['id_order_detail']|intval}" />
{if $currency->sign % 2}{$currency->sign}{/if}<input type="text" name="product_price_tax_excl" class="edit_product_price_tax_excl edit_product_price" value="{Tools::ps_round($product['unit_price_tax_excl'], 2)}" size="5" /> {if !($currency->sign % 2)}{$currency->sign}{/if} {l s='tax excl.'}<br />
{if $currency->sign % 2}{$currency->sign}{/if}<input type="text" name="product_price_tax_incl" class="edit_product_price_tax_incl edit_product_price" value="{Tools::ps_round($product['unit_price_tax_incl'], 2)}" size="5" /> {if !($currency->sign % 2)}{$currency->sign}{/if} {l s='tax incl.'}
</span>
{/if}
</td>
<td align="center" class="productQuantity">{$product['customizationQuantityTotal']}</td>
{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 $stock_management}<td align="center" class=""> - </td>{/if}
<td align="center" class="total_product">
{if ($order->getTaxCalculationMethod() == $smarty.const.PS_TAX_EXC)}
{displayPrice price=Tools::ps_round($product['product_price'] * $product['customizationQuantityTotal'], 2) currency=$currency->id|intval}
{else}
{displayPrice price=Tools::ps_round($product['product_price_wt'] * $product['customizationQuantityTotal'], 2) currency=$currency->id|intval}
{/if}
</td>
<td class="cancelQuantity standard_refund_fields current-edit" style="display:none" colspan="2">
&nbsp;
</td>
<td class="edit_product_fields" colspan="2" style="display:none">&nbsp;</td>
<td class="partial_refund_fields current-edit" style="text-align:left;display:none"></td>
{if ($can_edit && !$order->hasBeenDelivered())}
<td class="product_action" style="text-align:right">
<a href="#" class="edit_product_change_link"><img src="../img/admin/edit.gif" alt="{l s='Edit'}" /></a>
<input type="submit" class="button" name="submitProductChange" value="{l s='Update'}" style="display: none;" />
<a href="#" class="cancel_product_change_link" style="display: none;"><img src="../img/admin/disabled.gif" alt="{l s='Cancel'}" /></a>
<a href="#" class="delete_product_line"><img src="../img/admin/delete.gif" alt="{l s='Delete'}" /></a>
</td>
{/if}
</tr>
{foreach $product['customizedDatas'] as $customizationPerAddress}
{foreach $customizationPerAddress as $customizationId => $customization}
<tr class="customized customized-{$product['id_order_detail']|intval}">
<td colspan="2">
<input type="hidden" class="edit_product_id_order_detail" value="{$product['id_order_detail']|intval}" />
{foreach $customization.datas as $type => $datas}
{if ($type == Product::CUSTOMIZE_FILE)}
<ul style="margin: 4px 0px 4px 0px; padding: 0px; list-style-type: none;">
{foreach from=$datas item=data}
<li style="margin: 2px;">
<span>{if $data['name']}{$data['name']}{else}{l s='Picture #'}{$data@iteration}{/if}{l s=':'}</span>&nbsp;
<a href="displayImage.php?img={$data['value']}&name={$order->id|intval}-file{$data@iteration}" target="_blank"><img src="{$smarty.const._THEME_PROD_PIC_DIR_}{$data['value']}_small" alt="" /></a>
</li>
{/foreach}
</ul>
{elseif ($type == Product::CUSTOMIZE_TEXTFIELD)}
<ul style="margin: 0px 0px 4px 0px; padding: 0px 0px 0px 6px; list-style-type: none;">
{foreach from=$datas item=data}
<li>{if $data['name']}{l s='%s:' sprintf=$data['name']}{else}{l s='Text #%s:' sprintf=$data@iteration}{/if} {$data['value']}</li>
{/foreach}
</ul>
{/if}
{/foreach}
</td>
<td align="center">-
</td>
<td align="center" class="productQuantity">
<span class="product_quantity_show{if (int)$customization['quantity'] > 1} red bold{/if}">{$customization['quantity']}</span>
{if $can_edit}
<span class="product_quantity_edit" style="display:none;">
<input type="text" name="product_quantity[{$customizationId|intval}]" class="edit_product_quantity" value="{$customization['quantity']|htmlentities}" size="2" />
</span>
{/if}
</td>
{if ($order->hasBeenPaid())}<td align="center">{$customization['quantity_refunded']}</td>{/if}
{if ($order->hasBeenDelivered())}<td align="center">{$customization['quantity_returned']}</td>{/if}
<td align="center">
-
</td>
<td align="center" class="total_product">
{if ($order->getTaxCalculationMethod() == $smarty.const.PS_TAX_EXC)}
{displayPrice price=Tools::ps_round($product['product_price'] * $customization['quantity'], 2) currency=$currency->id|intval}
{else}
{displayPrice price=Tools::ps_round($product['product_price_wt'] * $customization['quantity'], 2) currency=$currency->id|intval}
{/if}
</td>
<td align="center" class="cancelCheck standard_refund_fields current-edit" style="display:none">
<input type="hidden" name="totalQtyReturn" id="totalQtyReturn" value="{$customization['quantity_returned']|intval}" />
<input type="hidden" name="totalQty" id="totalQty" value="{$customization['quantity']|intval}" />
<input type="hidden" name="productName" id="productName" value="{$product['product_name']}" />
{if ((!$order->hasBeenDelivered() OR Configuration::get('PS_ORDER_RETURN')) AND (int)($customization['quantity_returned']) < (int)($customization['quantity']))}
<input type="checkbox" name="id_customization[{$customizationId|intval}]" id="id_customization[{$customizationId|intval}]" value="{$product['id_order_detail']|intval}" onchange="setCancelQuantity(this, {$customizationId|intval}, {$customization['quantity'] - $product['customizationQuantityTotal'] - $product['product_quantity_reinjected']})" {if ($product['product_quantity_return'] + $product['product_quantity_refunded'] >= $product['product_quantity'])}disabled="disabled" {/if}/>
{else}
--
{/if}
</td>
<td class="cancelQuantity standard_refund_fields current-edit" style="display:none">
{if ($customization['quantity_returned'] + $customization['quantity_refunded'] >= $customization['quantity'])}
<input type="hidden" name="cancelCustomizationQuantity[{$customizationId|intval}]" value="0" />
{elseif (!$order->hasBeenDelivered() OR Configuration::get('PS_ORDER_RETURN'))}
<input type="text" id="cancelQuantity_{$customizationId|intval}" name="cancelCustomizationQuantity[{$customizationId|intval}]" size="2" onclick="selectCheckbox(this);" value="" />0/{$customization['quantity']-$customization['quantity_refunded']}
{/if}
</td>
<td class="partial_refund_fields current-edit" style="text-align:left;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" />
0/{$customization['quantity']-$customization['quantity_refunded']}
</div>
<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>
</td>
{if ($can_edit && !$order->hasBeenDelivered())}
<td class="edit_product_fields" colspan="2" style="display:none"></td>
<td class="product_action" style="text-align:right"></td>
{/if}
</tr>
{/foreach}
</td>
<td align="center">-
</td>
<td align="center" class="productQuantity">
<span class="product_quantity_show{if (int)$customization['quantity'] > 1} red bold{/if}">{$customization['quantity']}</span>
{if $can_edit}
<span class="product_quantity_edit" style="display:none;">
<input type="text" name="product_quantity[{$customizationId|intval}]" class="edit_product_quantity" value="{$customization['quantity']|htmlentities}" size="2" />
</span>
{/if}
</td>
{if ($order->hasBeenPaid())}<td align="center">{$customization['quantity_refunded']}</td>{/if}
{if ($order->hasBeenDelivered())}<td align="center">{$customization['quantity_returned']}</td>{/if}
<td align="center">
-
</td>
<td align="center" class="total_product">
{if ($order->getTaxCalculationMethod() == $smarty.const.PS_TAX_EXC)}
{displayPrice price=Tools::ps_round($product['product_price'] * $customization['quantity'], 2) currency=$currency->id|intval}
{else}
{displayPrice price=Tools::ps_round($product['product_price_wt'] * $customization['quantity'], 2) currency=$currency->id|intval}
{/if}
</td>
<td align="center" class="cancelCheck standard_refund_fields current-edit" style="display:none">
<input type="hidden" name="totalQtyReturn" id="totalQtyReturn" value="{$customization['quantity_returned']|intval}" />
<input type="hidden" name="totalQty" id="totalQty" value="{$customization['quantity']|intval}" />
<input type="hidden" name="productName" id="productName" value="{$product['product_name']}" />
{if ((!$order->hasBeenDelivered() OR Configuration::get('PS_ORDER_RETURN')) AND (int)($customization['quantity_returned']) < (int)($customization['quantity']))}
<input type="checkbox" name="id_customization[{$customizationId|intval}]" id="id_customization[{$customizationId|intval}]" value="{$product['id_order_detail']|intval}" onchange="setCancelQuantity(this, {$customizationId|intval}, {$customization['quantity'] - $product['customizationQuantityTotal'] - $product['product_quantity_reinjected']})" {if ($product['product_quantity_return'] + $product['product_quantity_refunded'] >= $product['product_quantity'])}disabled="disabled" {/if}/>
{else}
--
{/if}
</td>
<td class="cancelQuantity standard_refund_fields current-edit" style="display:none">
{if ($customization['quantity_returned'] + $customization['quantity_refunded'] >= $customization['quantity'])}
<input type="hidden" name="cancelCustomizationQuantity[{$customizationId|intval}]" value="0" />
{elseif (!$order->hasBeenDelivered() OR Configuration::get('PS_ORDER_RETURN'))}
<input type="text" id="cancelQuantity_{$customizationId|intval}" name="cancelCustomizationQuantity[{$customizationId|intval}]" size="2" onclick="selectCheckbox(this);" value="" />0/{$customization['quantity']-$customization['quantity_refunded']}
{/if}
</td>
<td class="partial_refund_fields current-edit" style="text-align:left;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" />
0/{$customization['quantity']-$customization['quantity_refunded']}
</div>
<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>
</td>
{if ($can_edit && !$order->hasBeenDelivered())}
<td class="edit_product_fields" colspan="2" style="display:none"></td>
<td class="product_action" style="text-align:right"></td>
{/if}
</tr>
{/foreach}
{/foreach}
</tbody>
{/if}
@@ -22,118 +22,140 @@
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*}
<table class="table" width="100%;" cellspacing="0" cellpadding="0" id="documents_table">
<table class="table table-hover" width="100%;" cellspacing="0" cellpadding="0" id="documents_table">
<thead>
<tr>
<th style="width:10%">{l s='Date'}</th>
<th style="">{l s='Document'}</th>
<th style="width:20%">{l s='Number'}</th>
<th style="width:10%">{l s='Amount'}</th>
<th style="width:1%"></th>
</tr>
<tr>
<th width="10%">
<span class="title_box ">{l s='Date'}</span>
</th>
<th>
<span class="title_box ">{l s='Document'}</span>
</th>
<th width="20%">
<span class="title_box ">{l s='Number'}</span>
</th>
<th width="20%">
<span class="title_box ">{l s='Amount'}</span>
</th>
<th width="1%"></th>
</tr>
</thead>
<tbody>
{foreach from=$order->getDocuments() item=document}
{foreach from=$order->getDocuments() item=document}
{if get_class($document) eq 'OrderInvoice'}
{if isset($document->is_delivery)}
<tr class="invoice_line" id="delivery_{$document->id}">
{else}
<tr class="invoice_line" id="invoice_{$document->id}">
{/if}
{elseif get_class($document) eq 'OrderSlip'}
<tr class="invoice_line" id="orderslip_{$document->id}">
{/if}
<td class="document_date">{dateFormat date=$document->date_add}</td>
<td class="document_type">
{if get_class($document) eq 'OrderInvoice'}
{if isset($document->is_delivery)}
{l s='Delivery slip'}
<tr id="delivery_{$document->id}">
{else}
{l s='Invoice'}
<tr id="invoice_{$document->id}">
{/if}
{elseif get_class($document) eq 'OrderSlip'}
{l s='Credit Slip'}
{/if}</td>
<td class="document_number">
{if get_class($document) eq 'OrderInvoice'}
{if isset($document->is_delivery)}
<a target="_blank" href="{$link->getAdminLink('AdminPdf')|escape:'htmlall':'UTF-8'}&submitAction=generateDeliverySlipPDF&id_order_invoice={$document->id}">
{else}
<a target="_blank" href="{$link->getAdminLink('AdminPdf')|escape:'htmlall':'UTF-8'}&submitAction=generateInvoicePDF&id_order_invoice={$document->id}">
{/if}
{elseif get_class($document) eq 'OrderSlip'}
<a target="_blank" href="{$link->getAdminLink('AdminPdf')|escape:'htmlall':'UTF-8'}&submitAction=generateOrderSlipPDF&id_order_slip={$document->id}">
<tr id="orderslip_{$document->id}">
{/if}
{if get_class($document) eq 'OrderInvoice'}
{if isset($document->is_delivery)}
#{Configuration::get('PS_DELIVERY_PREFIX', $current_id_lang)}{'%06d'|sprintf:$document->delivery_number}
{else}
{$document->getInvoiceNumberFormatted($current_id_lang)}
{/if}
{elseif get_class($document) eq 'OrderSlip'}
#{Configuration::get('PS_CREDIT_SLIP_PREFIX', $current_id_lang)}{'%06d'|sprintf:$document->id}
{/if} <img src="../img/admin/details.gif" alt="{l s='See the document'}" /></a></td>
<td class="document_amount">
{if get_class($document) eq 'OrderInvoice'}
{if isset($document->is_delivery)}
--
{else}
{displayPrice price=$document->total_paid_tax_incl currency=$currency->id}&nbsp;
{if $document->getTotalPaid()}
<span style="color:red;font-weight:bold;">
{if $document->getRestPaid() > 0}
({displayPrice price=$document->getRestPaid() currency=$currency->id} {l s='not paid'})
{else if $document->getRestPaid() < 0}
({displayPrice price=-$document->getRestPaid() currency=$currency->id} {l s='overpaid'})
<td>{dateFormat date=$document->date_add}</td>
<td>
{if get_class($document) eq 'OrderInvoice'}
{if isset($document->is_delivery)}
{l s='Delivery slip'}
{else}
{l s='Invoice'}
{/if}
{elseif get_class($document) eq 'OrderSlip'}
{l s='Credit Slip'}
{/if}
</td>
<td>
{if get_class($document) eq 'OrderInvoice'}
{if isset($document->is_delivery)}
<a target="_blank" href="{$link->getAdminLink('AdminPdf')|escape:'htmlall':'UTF-8'}&submitAction=generateDeliverySlipPDF&id_order_invoice={$document->id}">
{else}
<a target="_blank" href="{$link->getAdminLink('AdminPdf')|escape:'htmlall':'UTF-8'}&submitAction=generateInvoicePDF&id_order_invoice={$document->id}">
{/if}
{elseif get_class($document) eq 'OrderSlip'}
<a target="_blank" href="{$link->getAdminLink('AdminPdf')|escape:'htmlall':'UTF-8'}&submitAction=generateOrderSlipPDF&id_order_slip={$document->id}">
{/if}
{if get_class($document) eq 'OrderInvoice'}
{if isset($document->is_delivery)}
#{Configuration::get('PS_DELIVERY_PREFIX', $current_id_lang)}{'%06d'|sprintf:$document->delivery_number}
{else}
{$document->getInvoiceNumberFormatted($current_id_lang)}
{/if}
{elseif get_class($document) eq 'OrderSlip'}
#{Configuration::get('PS_CREDIT_SLIP_PREFIX', $current_id_lang)}{'%06d'|sprintf:$document->id}
{/if} <i class="icon-search"></i>
</a>
</td>
<td>
{if get_class($document) eq 'OrderInvoice'}
{if isset($document->is_delivery)}
--
{else}
{displayPrice price=$document->total_paid_tax_incl currency=$currency->id}&nbsp;
{if $document->getTotalPaid()}
<span>
{if $document->getRestPaid() > 0}
({displayPrice price=$document->getRestPaid() currency=$currency->id} {l s='not paid'})
{else if $document->getRestPaid() < 0}
({displayPrice price=-$document->getRestPaid() currency=$currency->id} {l s='overpaid'})
{/if}
</span>
{/if}
{/if}
{elseif get_class($document) eq 'OrderSlip'}
{displayPrice price=$document->amount currency=$currency->id}
{/if}
</span>
</td>
<td>
{if get_class($document) eq 'OrderInvoice'}
{if !isset($document->is_delivery)}
{if $document->getRestPaid()}
<a href="#" class="js-set-payment" data-amount="{$document->getRestPaid()}" data-id-invoice="{$document->id}" title="{l s='Set payment form'}"><img src="../img/admin/money_add.png" alt="{l s='Set payment form'}" /></a>
{/if}
<a href="#" onclick="$('#invoiceNote{$document->id}').show(); return false;" title="{if $document->note eq ''}{l s='Add note'}{else}{l s='Edit note'}{/if}">
<i class="icon-pencil"></i>
</a>
{/if}
{/if}
</td>
</tr>
{if get_class($document) eq 'OrderInvoice'}
{if !isset($document->is_delivery)}
<tr id="invoiceNote{$document->id}" style="display:none">
<td colspan="5">
<form action="{$current_index}&viewOrder&id_order={$order->id}&token={$smarty.get.token|escape:'htmlall':'UTF-8'}" method="post">
<p>
<label for="editNote{$document->id}" class="t">{l s='Note'}</label>
<input type="hidden" name="id_order_invoice" value="{$document->id}" />
<textarea name="note" rows="10" cols="10" id="editNote{$document->id}" class="edit-note">{$document->note|escape:'htmlall':'UTF-8'}</textarea>
</p>
<p>
<button type="submit" name="submitEditNote" class="btn btn-default">
<i class="icon-save"></i>
{l s='Save'}
</button>
<a class="btn btn-default" href="#" id="cancelNote" onclick="$('#invoiceNote{$document->id}').hide();return false;">
<i class="icon-remove"></i>
{l s='Cancel'}
</a>
</p>
</form>
</td>
</tr>
{/if}
{/if}
{elseif get_class($document) eq 'OrderSlip'}
{displayPrice price=$document->amount currency=$currency->id}
{/if}
</td>
<td class="right document_action">
{if get_class($document) eq 'OrderInvoice'}
{if !isset($document->is_delivery)}
{if $document->getRestPaid()}
<a href="#" class="js-set-payment" data-amount="{$document->getRestPaid()}" data-id-invoice="{$document->id}" title="{l s='Set payment form'}"><img src="../img/admin/money_add.png" alt="{l s='Set payment form'}" /></a>
{/if}
<a href="#" onclick="$('#invoiceNote{$document->id}').show(); return false;" title="{if $document->note eq ''}{l s='Add note'}{else}{l s='Edit note'}{/if}"><img src="../img/admin/note.png" alt="{if $document->note eq ''}{l s='Add note'}{else}{l s='Edit note'}{/if}"{if $document->note eq ''} class="js-disabled-action"{/if} /></a>
{/if}
{/if}
</td>
</tr>
{if get_class($document) eq 'OrderInvoice'}
{if !isset($document->is_delivery)}
<tr id="invoiceNote{$document->id}" style="display:none" class="current-edit">
<td colspan="5">
<form action="{$current_index}&viewOrder&id_order={$order->id}&token={$smarty.get.token|escape:'htmlall':'UTF-8'}" method="post">
<p>
<label for="editNote{$document->id}" class="t">{l s='Note'}</label>
<input type="hidden" name="id_order_invoice" value="{$document->id}" />
<textarea name="note" rows="10" cols="10" id="editNote{$document->id}" class="edit-note">{$document->note|escape:'htmlall':'UTF-8'}</textarea>
</p>
<p class="right">
<input type="submit" name="submitEditNote" value="{l s='Save'}" class="button" />&nbsp;
<a href="#" id="cancelNote" onclick="$('#invoiceNote{$document->id}').hide();return false;">{l s='Cancel'}</a>
</p>
</form>
</td>
</tr>
{/if}
{/if}
{foreachelse}
<tr>
<td colspan="5" class="center">
<h3>{l s='No documents are available'}</h3>
{if isset($invoice_management_active) && $invoice_management_active}
<p><a class="button" href="{$current_index}&viewOrder&submitGenerateInvoice&id_order={$order->id}&token={$smarty.get.token|escape:'htmlall':'UTF-8'}">{l s='Generate invoice'}</a></p>
{/if}
</td>
</tr>
{/foreach}
{foreachelse}
<tr>
<td colspan="5" class="center">
<h4>{l s='No documents are available'}</h4>
{if isset($invoice_management_active) && $invoice_management_active}
<a class="btn btn-default" href="{$current_index}&viewOrder&submitGenerateInvoice&id_order={$order->id}&token={$smarty.get.token|escape:'htmlall':'UTF-8'}">
<i class="icon-repeat"></i>
{l s='Generate invoice'}
</a>
{/if}
</td>
</tr>
{/foreach}
</tbody>
</table>
@@ -22,56 +22,58 @@
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*}
<tr id="new_product" height="52" style="display:none;background-color:#e9f1f6">
<td style="display:none;" colspan="2">
<input type="hidden" id="add_product_product_id" name="add_product[product_id]" value="0" />
{l s='Product:'} <input type="text" id="add_product_product_name" value="" size="42" />
<div id="add_product_product_attribute_area" style="margin-top: 5px;display: none;">
{l s='Combinations'} <select name="add_product[product_attribute_id]" id="add_product_product_attribute_id"></select>
</div>
<div id="add_product_product_warehouse_area" style="margin-top: 5px; display: none;">
{l s='Warehouse'} <select id="add_product_warehouse" name="add_product_warehouse">
<tbody>
<tr id="new_product" height="52" style="display:none;background-color:#e9f1f6">
<td style="display:none;" colspan="2">
<input type="hidden" id="add_product_product_id" name="add_product[product_id]" value="0" />
{l s='Product:'} <input type="text" id="add_product_product_name" value="" size="42" />
<div id="add_product_product_attribute_area" style="margin-top: 5px;display: none;">
{l s='Combinations'} <select name="add_product[product_attribute_id]" id="add_product_product_attribute_id"></select>
</div>
<div id="add_product_product_warehouse_area" style="margin-top: 5px; display: none;">
{l s='Warehouse'} <select id="add_product_warehouse" name="add_product_warehouse">
</select>
</div>
</td>
<td style="display:none;">
{if $currency->sign % 2}{$currency->sign}{/if}<input type="text" name="add_product[product_price_tax_excl]" id="add_product_product_price_tax_excl" value="" size="4" disabled="disabled" /> {if !($currency->sign % 2)}{$currency->sign}{/if} {l s='tax excl.'}<br />
{if $currency->sign % 2}{$currency->sign}{/if}<input type="text" name="add_product[product_price_tax_incl]" id="add_product_product_price_tax_incl" value="" size="4" disabled="disabled" /> {if !($currency->sign % 2)}{$currency->sign}{/if} {l s='tax incl.'}<br />
</td>
<td style="display:none;" align="center" class="productQuantity"><input type="text" name="add_product[product_quantity]" id="add_product_product_quantity" value="1" size="3" disabled="disabled" /></td>
{if ($order->hasBeenPaid())}<td style="display:none;" align="center" class="productQuantity">&nbsp;</td>{/if}
{if ($order->hasBeenDelivered())}<td style="display:none;" align="center" class="productQuantity">&nbsp;</td>{/if}
<td style="display:none;" align="center" class="productQuantity" id="add_product_product_stock">0</td>
<td style="display:none;" align="center" id="add_product_product_total">{displayPrice price=0 currency=$currency->id}</td>
<td style="display:none;" align="center" colspan="2">
{if sizeof($invoices_collection)}
<select name="add_product[invoice]" id="add_product_product_invoice" disabled="disabled">
<optgroup class="existing" label="{l s='Existing'}">
{foreach from=$invoices_collection item=invoice}
<option value="{$invoice->id}">{$invoice->getInvoiceNumberFormatted($current_id_lang)}</option>
{/foreach}
</optgroup>
<optgroup label="{l s='New'}">
<option value="0">{l s='Create a new invoice'}</option>
</optgroup>
</select>
</div>
</td>
<td style="display:none;">
{if $currency->sign % 2}{$currency->sign}{/if}<input type="text" name="add_product[product_price_tax_excl]" id="add_product_product_price_tax_excl" value="" size="4" disabled="disabled" /> {if !($currency->sign % 2)}{$currency->sign}{/if} {l s='tax excl.'}<br />
{if $currency->sign % 2}{$currency->sign}{/if}<input type="text" name="add_product[product_price_tax_incl]" id="add_product_product_price_tax_incl" value="" size="4" disabled="disabled" /> {if !($currency->sign % 2)}{$currency->sign}{/if} {l s='tax incl.'}<br />
</td>
<td style="display:none;" align="center" class="productQuantity"><input type="text" name="add_product[product_quantity]" id="add_product_product_quantity" value="1" size="3" disabled="disabled" /></td>
{if ($order->hasBeenPaid())}<td style="display:none;" align="center" class="productQuantity">&nbsp;</td>{/if}
{if ($order->hasBeenDelivered())}<td style="display:none;" align="center" class="productQuantity">&nbsp;</td>{/if}
<td style="display:none;" align="center" class="productQuantity" id="add_product_product_stock">0</td>
<td style="display:none;" align="center" id="add_product_product_total">{displayPrice price=0 currency=$currency->id}</td>
<td style="display:none;" align="center" colspan="2">
{if sizeof($invoices_collection)}
<select name="add_product[invoice]" id="add_product_product_invoice" disabled="disabled">
<optgroup class="existing" label="{l s='Existing'}">
{foreach from=$invoices_collection item=invoice}
<option value="{$invoice->id}">{$invoice->getInvoiceNumberFormatted($current_id_lang)}</option>
{/foreach}
</optgroup>
<optgroup label="{l s='New'}">
<option value="0">{l s='Create a new invoice'}</option>
</optgroup>
</select>
{/if}
</td>
<td style="display:none;">
<input type="button" class="button" id="submitAddProduct" value="{l s='Add product'}" disabled="disabled" />
</td>
</tr>
<tr id="new_invoice" style="display:none;background-color:#e9f1f6;">
<td colspan="10">
<h3>{l s='New invoice information'}</h3>
<label>{l s='Carrier'}</label>
<div class="margin-form">
{$carrier->name}
</div>
<div class="margin-form">
<input type="checkbox" name="add_invoice[free_shipping]" value="1" />
<label class="t">{l s='Free shipping'}</label>
<p>{l s='If you don\'t select "Free shipping," the normal shipping cost will be applied.'}</p>
</div>
</td>
</tr>
{/if}
</td>
<td style="display:none;">
<input type="button" class="button" id="submitAddProduct" value="{l s='Add product'}" disabled="disabled" />
</td>
</tr>
<tr id="new_invoice" style="display:none;background-color:#e9f1f6;">
<td colspan="10">
<h3>{l s='New invoice information'}</h3>
<label>{l s='Carrier'}</label>
<div class="margin-form">
{$carrier->name}
</div>
<div class="margin-form">
<input type="checkbox" name="add_invoice[free_shipping]" value="1" />
<label class="t">{l s='Free shipping'}</label>
<p>{l s='If you don\'t select "Free shipping," the normal shipping cost will be applied.'}</p>
</div>
</td>
</tr>
</tbody>
@@ -31,123 +31,125 @@
{/if}
{if ($product['product_quantity'] > $product['customizationQuantityTotal'])}
<tr{if isset($product.image) && $product.image->id && isset($product.image_size)} height="{$product['image_size'][1] + 7}"{/if}>
<td align="center">{if isset($product.image) && $product.image->id}{$product.image_tag}{/if}</td>
<td><a href="index.php?controller=adminproducts&id_product={$product['product_id']}&updateproduct&token={getAdminToken tab='AdminProducts'}">
<span class="productName">{$product['product_name']}</span><br />
{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}
</a></td>
<td align="center">
<span class="product_price_show">{displayPrice price=$product_price currency=$currency->id}</span>
{if $can_edit}
<span class="product_price_edit" style="display:none;">
<input type="hidden" name="product_id_order_detail" class="edit_product_id_order_detail" value="{$product['id_order_detail']}" />
{if $currency->sign % 2}{$currency->sign}{/if}<input type="text" name="product_price_tax_excl" class="edit_product_price_tax_excl edit_product_price" value="{Tools::ps_round($product['unit_price_tax_excl'], 2)}" size="5" /> {if !($currency->sign % 2)}{$currency->sign}{/if} {l s='tax excl.'}<br />
{if $currency->sign % 2}{$currency->sign}{/if}<input type="text" name="product_price_tax_incl" class="edit_product_price_tax_incl edit_product_price" value="{Tools::ps_round($product['unit_price_tax_incl'], 2)}" size="5" /> {if !($currency->sign % 2)}{$currency->sign}{/if} {l s='tax incl.'}
</span>
{/if}
</td>
<td align="center" class="productQuantity">
<span class="product_quantity_show{if (int)$product['product_quantity'] > 1} red bold{/if}">{$product['product_quantity']}</span>
{if $can_edit}
<span class="product_quantity_edit" style="display:none;">
<input type="text" name="product_quantity" class="edit_product_quantity" value="{$product['product_quantity']|htmlentities}" size="2" />
</span>
{/if}
</td>
{if ($order->hasBeenPaid())}
<td align="center" class="productQuantity">
{$product['product_quantity_refunded']}
{if count($product['refund_history'])}
<span class="tooltip">
<span class="tooltip_label tooltip_button">+</span>
<div class="tooltip_content">
<span class="title">{l s='Refund history'}</span>
{foreach $product['refund_history'] as $refund}
{l s='%1s - %2s' sprintf=[{dateFormat date=$refund.date_add}, {displayPrice price=$refund.amount_tax_incl}]}<br />
{/foreach}
</div>
</span>
<tbody>
<tr{if isset($product.image) && $product.image->id && isset($product.image_size)} height="{$product['image_size'][1] + 7}"{/if}>
<td align="center">{if isset($product.image) && $product.image->id}{$product.image_tag}{/if}</td>
<td><a href="index.php?controller=adminproducts&id_product={$product['product_id']}&updateproduct&token={getAdminToken tab='AdminProducts'}">
<span class="productName">{$product['product_name']}</span><br />
{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}
</a></td>
<td align="center">
<span class="product_price_show">{displayPrice price=$product_price currency=$currency->id}</span>
{if $can_edit}
<span class="product_price_edit" style="display:none;">
<input type="hidden" name="product_id_order_detail" class="edit_product_id_order_detail" value="{$product['id_order_detail']}" />
{if $currency->sign % 2}{$currency->sign}{/if}<input type="text" name="product_price_tax_excl" class="edit_product_price_tax_excl edit_product_price" value="{Tools::ps_round($product['unit_price_tax_excl'], 2)}" size="5" /> {if !($currency->sign % 2)}{$currency->sign}{/if} {l s='tax excl.'}<br />
{if $currency->sign % 2}{$currency->sign}{/if}<input type="text" name="product_price_tax_incl" class="edit_product_price_tax_incl edit_product_price" value="{Tools::ps_round($product['unit_price_tax_incl'], 2)}" size="5" /> {if !($currency->sign % 2)}{$currency->sign}{/if} {l s='tax incl.'}
</span>
{/if}
</td>
{/if}
{if $order->hasBeenDelivered() || $order->hasProductReturned()}
<td align="center" class="productQuantity">
{$product['product_quantity_return']}
{if count($product['return_history'])}
<span class="tooltip">
<span class="tooltip_label tooltip_button">+</span>
<div class="tooltip_content">
<span class="title">{l s='Return history'}</span>
{foreach $product['return_history'] as $return}
{l s='%1s - %2s - %3s' sprintf=[{dateFormat date=$return.date_add}, $return.product_quantity, $return.state]}<br />
{/foreach}
</div>
</span>
<span class="product_quantity_show{if (int)$product['product_quantity'] > 1} red bold{/if}">{$product['product_quantity']}</span>
{if $can_edit}
<span class="product_quantity_edit" style="display:none;">
<input type="text" name="product_quantity" class="edit_product_quantity" value="{$product['product_quantity']|htmlentities}" size="2" />
</span>
{/if}
</td>
{/if}
{if $stock_management}<td align="center" class="productQuantity product_stock">{$product['current_stock']}</td>{/if}
<td align="center" class="total_product">
{displayPrice price=(Tools::ps_round($product_price, 2) * ($product['product_quantity'] - $product['customizationQuantityTotal'])) currency=$currency->id}
</td>
<td colspan="2" style="display: none;" class="add_product_fields">&nbsp;</td>
<td align="center" class="cancelCheck standard_refund_fields current-edit" style="display:none">
<input type="hidden" name="totalQtyReturn" id="totalQtyReturn" value="{$product['product_quantity_return']}" />
<input type="hidden" name="totalQty" id="totalQty" value="{$product['product_quantity']}" />
<input type="hidden" name="productName" id="productName" value="{$product['product_name']}" />
{if ((!$order->hasBeenDelivered() OR Configuration::get('PS_ORDER_RETURN')) AND (int)($product['product_quantity_return']) < (int)($product['product_quantity']))}
<input type="checkbox" name="id_order_detail[{$product['id_order_detail']}]" id="id_order_detail[{$product['id_order_detail']}]" value="{$product['id_order_detail']}" onchange="setCancelQuantity(this, {$product['id_order_detail']}, {$product['product_quantity'] - $product['customizationQuantityTotal'] - $product['product_quantity_return']})" {if ($product['product_quantity_return'] + $product['product_quantity_refunded'] >= $product['product_quantity'])}disabled="disabled" {/if}/>
{else}
--
{/if}
</td>
<td class="cancelQuantity standard_refund_fields current-edit" style="display:none">
{if ($product['product_quantity_return'] + $product['product_quantity_refunded'] >= $product['product_quantity'])}
<input type="hidden" name="cancelQuantity[{$product['id_order_detail']}]" value="0" />
{elseif (!$order->hasBeenDelivered() OR Configuration::get('PS_ORDER_RETURN'))}
<input type="text" id="cancelQuantity_{$product['id_order_detail']}" name="cancelQuantity[{$product['id_order_detail']}]" size="2" onclick="selectCheckbox(this);" value="" />
{/if}
{if $product['customizationQuantityTotal']}
{assign var=productQuantity value=($product['product_quantity']-$product['customizationQuantityTotal'])}
{else}
{assign var=productQuantity value=$product['product_quantity']}
{/if}
{if ($order->hasBeenDelivered())}
{$product['product_quantity_refunded']}/{$productQuantity-$product['product_quantity_refunded']}
{elseif ($order->hasBeenPaid())}
{$product['product_quantity_return']}/{$productQuantity}
{else}
0/{$productQuantity}
{/if}
</td>
<td class="partial_refund_fields current-edit" style="text-align:left;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>
<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}
<input type="hidden" value="{$product['quantity_refundable']}" class="partialRefundProductQuantity" />
<input type="hidden" value="{$product['amount_refundable']}" class="partialRefundProductAmount" />
</td>
{if ($can_edit && !$order->hasBeenDelivered())}
<td class="product_invoice" colspan="2" style="display: none;text-align:center;">
{if sizeof($invoices_collection)}
<select name="product_invoice" class="edit_product_invoice">
{foreach from=$invoices_collection item=invoice}
<option value="{$invoice->id}" {if $invoice->id == $product['id_order_invoice']}selected="selected"{/if}>#{Configuration::get('PS_INVOICE_PREFIX', $current_id_lang, null, $order->id_shop)}{'%06d'|sprintf:$invoice->number}</option>
{/foreach}
</select>
{if ($order->hasBeenPaid())}
<td align="center" class="productQuantity">
{$product['product_quantity_refunded']}
{if count($product['refund_history'])}
<span class="tooltip">
<span class="tooltip_label tooltip_button">+</span>
<div class="tooltip_content">
<span class="title">{l s='Refund history'}</span>
{foreach $product['refund_history'] as $refund}
{l s='%1s - %2s' sprintf=[{dateFormat date=$refund.date_add}, {displayPrice price=$refund.amount_tax_incl}]}<br />
{/foreach}
</div>
</span>
{/if}
</td>
{/if}
{if $order->hasBeenDelivered() || $order->hasProductReturned()}
<td align="center" class="productQuantity">
{$product['product_quantity_return']}
{if count($product['return_history'])}
<span class="tooltip">
<span class="tooltip_label tooltip_button">+</span>
<div class="tooltip_content">
<span class="title">{l s='Return history'}</span>
{foreach $product['return_history'] as $return}
{l s='%1s - %2s - %3s' sprintf=[{dateFormat date=$return.date_add}, $return.product_quantity, $return.state]}<br />
{/foreach}
</div>
</span>
{/if}
</td>
{/if}
{if $stock_management}<td align="center" class="productQuantity product_stock">{$product['current_stock']}</td>{/if}
<td align="center" class="total_product">
{displayPrice price=(Tools::ps_round($product_price, 2) * ($product['product_quantity'] - $product['customizationQuantityTotal'])) currency=$currency->id}
</td>
<td colspan="2" style="display: none;" class="add_product_fields">&nbsp;</td>
<td align="center" class="cancelCheck standard_refund_fields current-edit" style="display:none">
<input type="hidden" name="totalQtyReturn" id="totalQtyReturn" value="{$product['product_quantity_return']}" />
<input type="hidden" name="totalQty" id="totalQty" value="{$product['product_quantity']}" />
<input type="hidden" name="productName" id="productName" value="{$product['product_name']}" />
{if ((!$order->hasBeenDelivered() OR Configuration::get('PS_ORDER_RETURN')) AND (int)($product['product_quantity_return']) < (int)($product['product_quantity']))}
<input type="checkbox" name="id_order_detail[{$product['id_order_detail']}]" id="id_order_detail[{$product['id_order_detail']}]" value="{$product['id_order_detail']}" onchange="setCancelQuantity(this, {$product['id_order_detail']}, {$product['product_quantity'] - $product['customizationQuantityTotal'] - $product['product_quantity_return']})" {if ($product['product_quantity_return'] + $product['product_quantity_refunded'] >= $product['product_quantity'])}disabled="disabled" {/if}/>
{else}
&nbsp;
--
{/if}
</td>
<td class="product_action" style="text-align:right">
<a href="#" class="edit_product_change_link"><img src="../img/admin/edit.gif" alt="{l s='Edit'}" /></a>
<input type="submit" class="button" name="submitProductChange" value="{l s='Update'}" style="display: none;" />
<a href="#" class="cancel_product_change_link" style="display: none;"><img src="../img/admin/disabled.gif" alt="{l s='Cancel'}" /></a>
<a href="#" class="delete_product_line"><img src="../img/admin/delete.gif" alt="{l s='Delete'}" /></a>
</td>
{/if}
</tr>
</td>
<td class="cancelQuantity standard_refund_fields current-edit" style="display:none">
{if ($product['product_quantity_return'] + $product['product_quantity_refunded'] >= $product['product_quantity'])}
<input type="hidden" name="cancelQuantity[{$product['id_order_detail']}]" value="0" />
{elseif (!$order->hasBeenDelivered() OR Configuration::get('PS_ORDER_RETURN'))}
<input type="text" id="cancelQuantity_{$product['id_order_detail']}" name="cancelQuantity[{$product['id_order_detail']}]" size="2" onclick="selectCheckbox(this);" value="" />
{/if}
{if $product['customizationQuantityTotal']}
{assign var=productQuantity value=($product['product_quantity']-$product['customizationQuantityTotal'])}
{else}
{assign var=productQuantity value=$product['product_quantity']}
{/if}
{if ($order->hasBeenDelivered())}
{$product['product_quantity_refunded']}/{$productQuantity-$product['product_quantity_refunded']}
{elseif ($order->hasBeenPaid())}
{$product['product_quantity_return']}/{$productQuantity}
{else}
0/{$productQuantity}
{/if}
</td>
<td class="partial_refund_fields current-edit" style="text-align:left;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>
<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}
<input type="hidden" value="{$product['quantity_refundable']}" class="partialRefundProductQuantity" />
<input type="hidden" value="{$product['amount_refundable']}" class="partialRefundProductAmount" />
</td>
{if ($can_edit && !$order->hasBeenDelivered())}
<td class="product_invoice" colspan="2" style="display: none;text-align:center;">
{if sizeof($invoices_collection)}
<select name="product_invoice" class="edit_product_invoice">
{foreach from=$invoices_collection item=invoice}
<option value="{$invoice->id}" {if $invoice->id == $product['id_order_invoice']}selected="selected"{/if}>#{Configuration::get('PS_INVOICE_PREFIX', $current_id_lang, null, $order->id_shop)}{'%06d'|sprintf:$invoice->number}</option>
{/foreach}
</select>
{else}
&nbsp;
{/if}
</td>
<td class="product_action" style="text-align:right">
<a href="#" class="edit_product_change_link"><img src="../img/admin/edit.gif" alt="{l s='Edit'}" /></a>
<input type="submit" class="button" name="submitProductChange" value="{l s='Update'}" style="display: none;" />
<a href="#" class="cancel_product_change_link" style="display: none;"><img src="../img/admin/disabled.gif" alt="{l s='Cancel'}" /></a>
<a href="#" class="delete_product_line"><img src="../img/admin/delete.gif" alt="{l s='Delete'}" /></a>
</td>
{/if}
</tr>
</tbody>
{/if}
@@ -22,53 +22,72 @@
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*}
<table class="table" width="100%" cellspacing="0" cellpadding="0" id="shipping_table">
<colgroup>
<col width="15%">
<col width="15%">
<col width="">
<col width="10%">
<col width="20%">
</colgroup>
<table class="table table-hover" width="100%" cellspacing="0" cellpadding="0" id="shipping_table">
<colgroup>
<col width="15%">
<col width="15%">
<col width="">
<col width="20%">
<col width="1%">
</colgroup>
<thead>
<tr>
<th>{l s='Date'}</th>
<th>{l s='Type'}</th>
<th>{l s='Carrier'}</th>
<th>{l s='Weight'}</th>
<th>{l s='Shipping cost'}</th>
<th>{l s='Tracking number'}</th>
</tr>
<tr>
<th>
<span class="title_box ">{l s='Date'}</span>
</th>
<th>
<span class="title_box ">{l s='Type'}</span>
</th>
<th>
<span class="title_box ">{l s='Carrier'}</span>
</th>
<th>
<span class="title_box ">{l s='Weight'}</span>
</th>
<th>
<span class="title_box ">{l s='Shipping cost'}</span>
</th>
<th>
<span class="title_box ">{l s='Tracking number'}</span>
</th>
</tr>
</thead>
<tbody>
{foreach from=$order->getShipping() item=line}
<tr>
<td>{dateFormat date=$line.date_add full=true}</td>
<td>{$line.type}</td>
<td>{$line.carrier_name}</td>
<td>{$line.weight|string_format:"%.3f"} {Configuration::get('PS_WEIGHT_UNIT')}</td>
<td>
{if $order->getTaxCalculationMethod() == $smarty.const.PS_TAX_INC}
{displayPrice price=$line.shipping_cost_tax_incl currency=$currency->id}
{else}
{displayPrice price=$line.shipping_cost_tax_excl currency=$currency->id}
{/if}
</td>
<td>
<span id="shipping_number_show">{if $line.url && $line.tracking_number}<a target="_blank" href="{$line.url|replace:'@':$line.tracking_number}">{$line.tracking_number}</a>{else}{$line.tracking_number}{/if}</span>
{if $line.can_edit}
<form style="display: inline;" method="post" action="{$link->getAdminLink('AdminOrders')|escape:'htmlall':'UTF-8'}&vieworder&id_order={$order->id|escape:'htmlall':'UTF-8'}">
<span class="shipping_number_edit" style="display:none;">
<input type="hidden" name="id_order_carrier" value="{$line.id_order_carrier|htmlentities}" />
<input type="text" name="tracking_number" value="{$line.tracking_number|htmlentities}" />
<input type="submit" class="button" name="submitShippingNumber" value="{l s='Update'}" />
</span>
<a href="#" class="edit_shipping_number_link"><img src="../img/admin/edit.gif" alt="{l s='Edit'}" /></a>
<a href="#" class="cancel_shipping_number_link" style="display: none;"><img src="../img/admin/disabled.gif" alt="{l s='Cancel'}" /></a>
</form>
{/if}
</td>
</tr>
{/foreach}
{foreach from=$order->getShipping() item=line}
<tr>
<td>{dateFormat date=$line.date_add full=true}</td>
<td>{$line.type}</td>
<td>{$line.carrier_name}</td>
<td>{$line.weight|string_format:"%.3f"} {Configuration::get('PS_WEIGHT_UNIT')}</td>
<td class="center">
{if $order->getTaxCalculationMethod() == $smarty.const.PS_TAX_INC}
{displayPrice price=$line.shipping_cost_tax_incl currency=$currency->id}
{else}
{displayPrice price=$line.shipping_cost_tax_excl currency=$currency->id}
{/if}
</td>
<td class="right">
<span id="shipping_number_show">{if $line.url && $line.tracking_number}<a target="_blank" href="{$line.url|replace:'@':$line.tracking_number}">{$line.tracking_number}</a>{else}{$line.tracking_number}{/if}</span>
{if $line.can_edit}
<form method="post" action="{$link->getAdminLink('AdminOrders')|escape:'htmlall':'UTF-8'}&vieworder&id_order={$order->id|escape:'htmlall':'UTF-8'}">
<span class="shipping_number_edit" style="display:none;">
<input type="hidden" name="id_order_carrier" value="{$line.id_order_carrier|htmlentities}" />
<input type="text" name="tracking_number" value="{$line.tracking_number|htmlentities}" />
<button type="submit" class="btn btn-small" name="submitShippingNumber">
<i class="icon-refresh"></i>
{l s='Update'}
</button>
</span>
<a href="#" class="edit_shipping_number_link">
<i class="icon-search"></i>
</a>
<a href="#" class="cancel_shipping_number_link" style="display: none;">
<i class="icon-remove"></i>
</a>
</form>
{/if}
</td>
</tr>
{/foreach}
</tbody>
</table>
File diff suppressed because it is too large Load Diff