[-] Project : #PSCFV-2633 #PSCFV-2622 - Fix problems with multishipping and order payment & invoice

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@15797 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
mDeflotte
2012-06-01 15:40:32 +00:00
parent 54fd1c0dcb
commit d02787dc97
15 changed files with 376 additions and 54 deletions
@@ -82,12 +82,12 @@
--
{else}
{displayPrice price=$document->total_paid_tax_incl currency=$currency->id} 
{if $document->getRestPaid()}
{if $document->getGlobalRestPaid()}
<span style="color:red;font-weight:bold;">
{if $document->getRestPaid() >= 0}
({displayPrice price=$document->getRestPaid() currency=$currency->id} {l s='not paid'})
{if $document->getGlobalRestPaid() >= 0}
({displayPrice price=$document->getGlobalRestPaid() currency=$currency->id} {l s='not paid'})
{else}
({displayPrice price=-$document->getRestPaid() currency=$currency->id} {l s='overpaid'})
({displayPrice price=-$document->getGlobalRestPaid() currency=$currency->id} {l s='overpaid'})
{/if}
</span>
{/if}
@@ -202,6 +202,50 @@
{if $nextOrder}<a class="button" href="{$link->getAdminLink('AdminOrders')}&vieworder&id_order={$nextOrder}">{l s='Next >'}</a>{/if}
</div>
<div class="clear"></div>
<!-- linked orders block -->
{if count($order->getBrother()) > 0}
<fieldset>
<legend><img src="../img/admin/tab-orders.gif" /> {l s='Linked orders'}</legend>
<table class="table" width="100%;" cellspacing="0" cellpadding="0">
<thead>
<tr>
<th width="10%">
{l s='Order n°'}
</th>
<th>
{l s='Status'}
</th>
<th width="10%">
{l s='Amount'}
</th>
<th width="5%">
</th>
</tr>
</thead>
<tbody>
{foreach $order->getBrother() as $brother_order}
<tr>
<td>
<a href="{$current_index}&vieworder&id_order={$brother_order->id}&token={$smarty.get.token|escape:'htmlall':'UTF-8'}">#{'%06d'|sprintf:$brother_order->id}</a>
</td>
<td>
{$brother_order->getCurrentOrderState()->name[$current_id_lang]}
</td>
<td>
{displayPrice price=$brother_order->total_paid_tax_incl currency=$currency->id}
</td>
<td>
<a href="{$current_index}&vieworder&id_order={$brother_order->id}&token={$smarty.get.token|escape:'htmlall':'UTF-8'}"><img alt="{l s='See the order'}" src="../img/admin/details.gif"></a>
</td>
</tr>
{/foreach}
</tbody>
</table>
</fieldset>
<br />
{/if}
<!-- Documents block -->
<fieldset>
<legend><img src="../img/admin/details.gif" /> {l s='Documents'}</legend>
@@ -230,15 +274,26 @@
</form>
<hr />
{/if}
{if $order->hasBeenPaid()}
{if count($order->getOrderPayments()) > 0}
<p class="error" style="{if round($orders_total_paid_tax_incl, 2) == round($total_paid, 2) || $currentState->id == 6}display: none;{/if}">
{l s='Warning:'} {displayPrice price=$total_paid currency=$currency->id}
{l s='paid instead of'} <span class="total_paid">{displayPrice price=$orders_total_paid_tax_incl currency=$currency->id}</span>
{foreach $order->getBrother() as $brother_order}
{if $brother_order@first}
{if count($order->getBrother()) == 1}
<br />{l s='This warning also concerns the order '}
{else}
<br />{l s='This warning also concerns the next orders:'}
{/if}
{/if}
<a href="{$current_index}&vieworder&id_order={$brother_order->id}&token={$smarty.get.token|escape:'htmlall':'UTF-8'}">#{'%06d'|sprintf:$brother_order->id}</a>
{/foreach}
</p>
{/if}
<form id="formAddPayment" method="post" action="{$current_index}&viewOrder&id_order={$smarty.get.id_order|escape:'htmlall':'UTF-8'}&token={$smarty.get.token|escape:'htmlall':'UTF-8'}">
<form id="formAddPayment" method="post" action="{$current_index}&vieworder&id_order={$smarty.get.id_order|escape:'htmlall':'UTF-8'}&token={$smarty.get.token|escape:'htmlall':'UTF-8'}">
<table class="table" width="100%" cellspacing="0" cellpadding="0">
<colgroup>
<col width="15%"></col>
@@ -266,8 +321,8 @@
<td>{$payment->transaction_id}</td>
<td>{displayPrice price=$payment->amount currency=$payment->id_currency}</td>
<td>
{if $payment->id_order_invoice}
{OrderInvoice::retrieveOneById($payment->id_order_invoice)->getInvoiceNumberFormatted($current_id_lang)}
{if $invoice = $payment->getOrderInvoice($order->id)}
{$invoice->getInvoiceNumberFormatted($current_id_lang)}
{else}
{l s='No invoice'}
{/if}
@@ -112,7 +112,7 @@
name="{$input.name}"
id="{if isset($input.id)}{$input.id}{else}{$input.name}{/if}"
value="{if isset($input.string_format) && $input.string_format}{$value_text|string_format:$input.string_format|escape:'htmlall':'UTF-8'}{else}{$value_text|escape:'htmlall':'UTF-8'}{/if}"
class="{if $input.type == 'tags'}tagify {/if}"
class="{if $input.type == 'tags'}tagify {/if}{if isset($input.class)}{$input.class}{/if}"
{if isset($input.size)}size="{$input.size}"{/if}
{if isset($input.maxlength)}maxlength="{$input.maxlength}"{/if}
{if isset($input.class)}class="{$input.class}"{/if}