// add delivery slip
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@11693 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
@@ -12,32 +12,67 @@
|
||||
{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'}Invoice{elseif get_class($document) eq 'OrderSlip'}Credit Slip{/if}</td>
|
||||
<td class="document_number"><a target="_blank" href="{if get_class($document) eq 'OrderInvoice'}pdf.php?pdf&id_order_invoice={$document->id}{elseif get_class($document) eq 'OrderSlip'}pdf.php?id_order_slip={$document->id}{/if}">{if get_class($document) eq 'OrderInvoice'}{$document->getInvoiceNumberFormatted($current_id_lang)}{elseif get_class($document) eq 'OrderSlip'}{l s='#'}{'%06d'|sprintf:$document->id}{/if} <img src="../img/admin/details.gif" alt="{l s='See the invoice'}" /></a></td>
|
||||
<td class="document_type">
|
||||
{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 class="document_number">
|
||||
<a target="_blank" href="
|
||||
{if get_class($document) eq 'OrderInvoice'}
|
||||
pdf.php?{if isset($document->is_delivery)}delivery{else}pdf{/if}&id_order_invoice={$document->id}
|
||||
{elseif get_class($document) eq 'OrderSlip'}
|
||||
pdf.php?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'}
|
||||
{l s='#'}{'%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'}
|
||||
{displayPrice price=$document->total_paid_tax_incl currency=$currency->id}
|
||||
{if $document->getRestPaid()}
|
||||
<span style="color:red;font-weight:bold;">({displayPrice price=$document->getRestPaid() currency=$currency->id} {l s='not paid'})</span>
|
||||
{if isset($document->is_delivery)}
|
||||
--
|
||||
{else}
|
||||
{displayPrice price=$document->total_paid_tax_incl currency=$currency->id}
|
||||
{if $document->getRestPaid()}
|
||||
<span style="color:red;font-weight:bold;">({displayPrice price=$document->getRestPaid() currency=$currency->id} {l s='not paid'})</span>
|
||||
{/if}
|
||||
{/if}
|
||||
{/if}
|
||||
</td>
|
||||
<td class="right document_action">
|
||||
{if get_class($document) eq 'OrderInvoice'}
|
||||
{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 !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}
|
||||
<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}
|
||||
</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="{$currentIndex}&viewOrder&id_order={$smarty.get.id_order|escape:'htmlall':'UTF-8'}&token={$smarty.get.token|escape:'htmlall':'UTF-8'}" method="post">
|
||||
@@ -53,6 +88,7 @@
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
{/if}
|
||||
{/if}
|
||||
{foreachelse}
|
||||
<tr>
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
{* Generate HTML code for printing Delivery Icon with link *}
|
||||
<span style="width:20px;">
|
||||
{if ($order_state->delivery && $order->delivery_number)}
|
||||
<a target="_blank" href="pdf.php?id_delivery={$order->delivery_number}"><img src="../img/admin/delivery.gif" alt="delivery" /></a>
|
||||
<a target="_blank" href="pdf.php?id_order={$order->id}&delivery"><img src="../img/admin/delivery.gif" alt="delivery" /></a>
|
||||
{else}
|
||||
-
|
||||
{/if}
|
||||
|
||||
@@ -63,13 +63,13 @@
|
||||
<fieldset style="width:98%; margin-bottom: 10px;">
|
||||
<div style="width:50%; float: left;">
|
||||
{if (count($invoices_collection))}
|
||||
<a href="pdf.php?id_order={$order->id}&pdf"><img src="../img/admin/charged_ok.gif" alt="{l s='View invoice'}" /> {l s='View invoice'}</a>
|
||||
<a href="pdf.php?id_order={$order->id}&pdf" target="_blank"><img src="../img/admin/charged_ok.gif" alt="{l s='View invoice'}" /> {l s='View invoice'}</a>
|
||||
{else}
|
||||
<img src="../img/admin/charged_ko.gif" alt="{l s='No invoice'}" /> {l s='No invoice'}
|
||||
{/if}
|
||||
-
|
||||
{if ($currentState->delivery || $order->delivery_number)}
|
||||
<a target="_blank" href="pdf.php?id_delivery={$order->delivery_number}"><img src="../img/admin/delivery.gif" alt="{l s='View delivery slip'}" /> {l s='View delivery slip'}</a>
|
||||
<a href="pdf.php?id_order={$order->id}&delivery" target="_blank"><img src="../img/admin/delivery.gif" alt="{l s='View delivery slip'}" /> {l s='View delivery slip'}</a>
|
||||
{else}
|
||||
<img src="../img/admin/delivery_ko.gif" alt="{l s='No delivery slip'}" /> {l s='No delivery slip'}
|
||||
{/if}
|
||||
|
||||
Reference in New Issue
Block a user