// improve invoice and order payment
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@11306 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
@@ -488,4 +488,15 @@ class OrderInvoiceCore extends ObjectModel
|
|||||||
{
|
{
|
||||||
return $this->getTotalPaid() == $this->total_paid_tax_incl;
|
return $this->getTotalPaid() == $this->total_paid_tax_incl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @since 1.5.0.2
|
||||||
|
* @return Collection of Order payment
|
||||||
|
*/
|
||||||
|
public function getOrderPaymentCollection()
|
||||||
|
{
|
||||||
|
$order_payments = new Collection('OrderPayment');
|
||||||
|
$order_payments->where('id_order_invoice = '.(int)$this->id);
|
||||||
|
return $order_payments;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -79,7 +79,18 @@
|
|||||||
{$order->date_add|date_format:"%d-%m-%Y %H:%M"}<br />
|
{$order->date_add|date_format:"%d-%m-%Y %H:%M"}<br />
|
||||||
<br />
|
<br />
|
||||||
<b>{l s='Payment Method:' pdf='true'}</b><br />
|
<b>{l s='Payment Method:' pdf='true'}</b><br />
|
||||||
{$order->payment}<br />
|
<table style="width: 100%;">
|
||||||
|
{foreach from=$order_invoice->getOrderPaymentCollection() item=payment}
|
||||||
|
<tr>
|
||||||
|
<td style="width: 50%">{$payment->payment_method}</td>
|
||||||
|
<td style="width: 50%">{displayPrice price=$payment->amount currency=$order->id_currency}</td>
|
||||||
|
</tr>
|
||||||
|
{foreachelse}
|
||||||
|
<tr>
|
||||||
|
<td>{l s='No payment'}</td>
|
||||||
|
</tr>
|
||||||
|
{/foreach}
|
||||||
|
</table>
|
||||||
<br />
|
<br />
|
||||||
<!-- / CUSTOMER INFORMATIONS -->
|
<!-- / CUSTOMER INFORMATIONS -->
|
||||||
</td>
|
</td>
|
||||||
@@ -216,6 +227,13 @@
|
|||||||
<td style="text-align: right; font-weight: bold">{l s='Total' pdf='true'}</td>
|
<td style="text-align: right; font-weight: bold">{l s='Total' pdf='true'}</td>
|
||||||
<td style="width: 15%; text-align: right;">{displayPrice currency=$order->id_currency price=$order_invoice->total_paid_tax_incl}</td>
|
<td style="width: 15%; text-align: right;">{displayPrice currency=$order->id_currency price=$order_invoice->total_paid_tax_incl}</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
|
{if $order_invoice->getRestPaid()}
|
||||||
|
<tr style="line-height:5px;color:red;">
|
||||||
|
<td style="text-align: right; font-weight: bold">{l s='Total rest paid' pdf='true'}</td>
|
||||||
|
<td style="width: 15%; text-align: right;">{displayPrice currency=$order->id_currency price=$order_invoice->getRestPaid()}</td>
|
||||||
|
</tr>
|
||||||
|
{/if}
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
</td>
|
</td>
|
||||||
|
|||||||
Reference in New Issue
Block a user