On 2/27/2016 at 1:22 AM, ariom said:
I had same problem and found out same solution as climia also suggested, so to solve the duplicated payment issue (for me it was with paypal module), but then another issue arised: in delivery slip now there is no total paid and empty selected payment, so i have to cut off half of the delivery slip when i print it for the carrier.
PS 1.6.1.4 - default theme only graphics mod.
@climia ... did you also got this problem? if so did you find any solution?
tks to all for suggestions
The solution for 1.7, although it should work on 1.6 as well:
Edit:
/classes/pdf/HTMLTemplateDeliverySlip.php
Assign this variable to smarty (aprox line 130):
'order_payments' => $this->order->getOrderPayments(),
Then edit this file:
pdf/delivery-slip.payment-tab.tpl
Change:
{foreach from=$order_invoice->getOrderPaymentCollection() item=payment}
To:
{foreach from=$order_payments item=payment}
Notice that we are getting payments directly from order and not from invoice. This is the solution specially if you have invoices disabled in prestashop.
And to prevent payment duplication, Just keep "set as paid" only on the statuses that require it.