Jump to content

Problem with the invoices


javiidoce

Recommended Posts

So I've been modifying the invoice dates and I've encountered a problem that in the header of the invoice  the invoice date doesn't show but in the body it does. What I don't understand is that both templates use the same line to show the date ({dateFormat date=$order->invoice_date full=0}) any ideas of what it could be? 

thx

Link to comment
Share on other sites

Hello @javiidoce,

To display the date in the invoice header, please modify the code in the file located at:
{{root_folder}}\pdf\header.tpl.

Original Code: 
{if isset($header) && $header == 'Invoice'}
{else}
<tr>
    <td style="font-size: 14pt; color: #9E9F9E">{$date|escape:'html':'UTF-8'}</td>
</tr>
{/if}


Updated Code: 
{if isset($header) && $header == 'Invoice'}
<tr>
    <td style="font-size: 14pt; color: #9E9F9E">{$date|escape:'html':'UTF-8'}</td>
</tr>
{else}
<tr>
    <td style="font-size: 14pt; color: #9E9F9E">{$date|escape:'html':'UTF-8'}</td>
</tr>
{/if}
 

Result Reference: https://prnt.sc/JsF4f9yPO6eU

After making this change, please clear the cache to see the updates.

Link to comment
Share on other sites

On 5/17/2024 at 6:37 PM, WebDesk Solution said:

Hello @javiidoce,

To display the date in the invoice header, please modify the code in the file located at:
{{root_folder}}\pdf\header.tpl.

Original Code: 
{if isset($header) && $header == 'Invoice'}
{else}
<tr>
    <td style="font-size: 14pt; color: #9E9F9E">{$date|escape:'html':'UTF-8'}</td>
</tr>
{/if}


Updated Code: 
{if isset($header) && $header == 'Invoice'}
<tr>
    <td style="font-size: 14pt; color: #9E9F9E">{$date|escape:'html':'UTF-8'}</td>
</tr>
{else}
<tr>
    <td style="font-size: 14pt; color: #9E9F9E">{$date|escape:'html':'UTF-8'}</td>
</tr>
{/if}
 

Result Reference: https://prnt.sc/JsF4f9yPO6eU

After making this change, please clear the cache to see the updates.

thx WebDesk, now it works!
I looked it up and another page i had with a lower version has this code too, so i dont know why it was like that

 

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...