ptityop Posted November 21, 2022 Share Posted November 21, 2022 Hello, I have modified the invoice with some custom code but I am facing the following issues : When payment by invoice is selected upon order the invoice should print the following : <b>{l s='Conditions de paiement: ' pdf='true'}</b>Sans escompte jusqu'au {"+30 days"|date_format:"%d/%m/%Y"}<br/> If another payment is selected (in my case only other option is bank wire then it should only show payment method and the total EXCL tax. When payment by invoice (Facture) is selected it only shows <b>{l s='Conditions de paiement: ' pdf='true'}</b>{$payment->payment_method} and when Bank wire is selected it does not show anything at all, I don't see where the error is ... This is the complete code and I attached screenshots with comment to help understanding. Thanks for any help <table id="payment-tab" width="100%" style="border: none;"> <tr> <td class="white payment left big bold" width="54%">{foreach from=$order_invoice->getOrderPaymentCollection() item=payment} {if $payment->payment_method eq 'Facture'} {if $payment->amount eq $order_invoice->total_paid_tax_incl} <b>{l s='Conditions de paiement: ' pdf='true'}</b>Sans escompte jusqu'au {"+30 days"|date_format:"%d/%m/%Y"}<br/> {/if} {else} <b>{l s='Conditions de paiement: ' pdf='true'}</b>{$payment->payment_method} {/if} {/foreach}</td> <td class="payment left white" width="46%"> <table width="100%" border="0"> {foreach from=$order_invoice->getOrderPaymentCollection() item=payment} <tr> <td class="right big"> {l s='Total HT: ' pdf='true'}{displayPrice currency=$order->id_currency price=$order_invoice->total_products}</td> </tr> {/foreach} </table> </td> </tr> </table> Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now