Essemme_Forniture Posted December 5, 2014 Share Posted December 5, 2014 (edited) Helo guys, is it possible and how is possible to have on the invoice the payment date and not the order date? Because of the warranty i need that it start from the payment. Example today 5th december i make one order and i'll pay on 15th, i want on my invoice the 15th date. Now, in all my invoices , there's the order date..... Thanks for all Edited December 30, 2014 by affaridanoi (see edit history) Link to comment Share on other sites More sharing options...
tuk66 Posted December 8, 2014 Share Posted December 8, 2014 You need to search in order history. I only know how to do it in the M4 PDF Extensions module's template, where the payment date is obtained for tax purposes. {* payment accepted *} {if $order_history.id_order_state == 2 && !isset($dateOfPayment)} {assign var="dateOfPayment" value="`$order_history.date_add`"} {/if} Link to comment Share on other sites More sharing options...
Essemme_Forniture Posted December 9, 2014 Author Share Posted December 9, 2014 You need to search in order history. I only know how to do it in the M4 PDF Extensions module's template, where the payment date is obtained for tax purposes. {* payment accepted *} {if $order_history.id_order_state == 2 && !isset($dateOfPayment)} {assign var="dateOfPayment" value="`$order_history.date_add`"} {/if} Hi Tuk66, hope everything is going well back to the topic, on my invoice.tpl i written this <table style="width: 100%"> <tr> <td style="width: 85%; text-align: right;padding-right:3px"><p>{l s='Order Date' pdf='true'} :</p></td> <td style="width:15%;text-align: left">{$order->date_add|date_format:"%d-%m-%Y %H:%M"}</td> Do you think if i'm going to change it in <table style="width: 100%"> <tr> <td style="width: 85%; text-align: right;padding-right:3px"><p>{l s='Order Date' pdf='true'} :</p></td> <td style="width:15%;text-align: left">{$order->dateOfPayment|date_format:"%d-%m-%Y %H:%M"}</td> Could be ok? Link to comment Share on other sites More sharing options...
tuk66 Posted December 9, 2014 Share Posted December 9, 2014 It won't work. My example takes data from order history for id_order_state == 2 (Payment accepted). Link to comment Share on other sites More sharing options...
Essemme_Forniture Posted December 11, 2014 Author Share Posted December 11, 2014 It won't work. My example takes data from order history for id_order_state == 2 (Payment accepted). Ok I'll try Link to comment Share on other sites More sharing options...
Essemme_Forniture Posted December 30, 2014 Author Share Posted December 30, 2014 I found this {$order_invoice->date_add|date_format:"%d-%m-%Y"} i put it on invoice.tpl and this works . Thanks for all Solved 1 Link to comment Share on other sites More sharing options...
Recommended Posts