diff --git a/classes/order/OrderInvoice.php b/classes/order/OrderInvoice.php index 861a10132..41701ba58 100644 --- a/classes/order/OrderInvoice.php +++ b/classes/order/OrderInvoice.php @@ -488,4 +488,15 @@ class OrderInvoiceCore extends ObjectModel { 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; + } } \ No newline at end of file diff --git a/themes/default/pdf/invoice.tpl b/themes/default/pdf/invoice.tpl index 26f7fd6e6..6b4fde503 100755 --- a/themes/default/pdf/invoice.tpl +++ b/themes/default/pdf/invoice.tpl @@ -79,7 +79,18 @@ {$order->date_add|date_format:"%d-%m-%Y %H:%M"}

{l s='Payment Method:' pdf='true'}
- {$order->payment}
+ + {foreach from=$order_invoice->getOrderPaymentCollection() item=payment} + + + + + {foreachelse} + + + + {/foreach} +
{$payment->payment_method}{displayPrice price=$payment->amount currency=$order->id_currency}
{l s='No payment'}

@@ -216,6 +227,13 @@ {l s='Total' pdf='true'} {displayPrice currency=$order->id_currency price=$order_invoice->total_paid_tax_incl} + + {if $order_invoice->getRestPaid()} + + {l s='Total rest paid' pdf='true'} + {displayPrice currency=$order->id_currency price=$order_invoice->getRestPaid()} + + {/if}