Page 1 of 1

Due date

Posted: Fri Aug 25, 2017 12:16 pm
by copy
invoice_view.tpl
<?php echo $date_due; ?>

invoice_invoice.tpl does not have due date.
It has <?php echo $text_updated; ?> <?php echo $date_modified; ?>

I get an error when I try to use <?php echo $date_due; ?>
in invoice_invoice.tpl
Is there a tag available for this?

Thank you.

Re: Due date

Posted: Fri Aug 25, 2017 2:26 pm
by Esmond
If you need to use due date in the invoice, you will need to add it to the controller first, before you can use it in the template.

Is it the admin or the front end?

Re: Due date

Posted: Sat Aug 26, 2017 4:14 am
by copy
This is the front end invoice for the customer.

My Invoices>> View
The View invoice has a due date

My Invoices>> Invoice (printable invoice)
Does not have a due date.
I found the tpl for this but <?php echo $date_due; ?> does not work in
the printable invoice but does work in "view" invoice
(both on the front end customer side)

Re: Due date

Posted: Sat Aug 26, 2017 10:21 am
by Esmond
like i mentioned, you will need to add more codes to the controller. if you wish to add to the print page, look for the line

Code: Select all

$this->data['date_issued'] = sprintf($this->language->get('text_issued'), date($this->language->get('date_format_short'), strtotime($invoice_info['date_issued'])));
and below it add

Code: Select all

$this->data['date_issued'] = sprintf($this->language->get('text_issued'), date($this->language->get('date_format_short'), strtotime($invoice_info['date_due'])));

Re: Due date

Posted: Sat Aug 26, 2017 1:32 pm
by copy
Thank you so much for the clarification.

I think you meant "due date" not print page.
And this line of code you gave me did not work.

Code: Select all

$this->data['date_issued'] = sprintf($this->language->get('text_issued'), date($this->language->get('date_format_short'), strtotime($invoice_info['date_due'])));
So I did this one and it worked: application>>controller>>account>>invoice.php

Code: Select all

$this->data['date_due'] = date($this->language->get('date_format_short'), strtotime($invoice_info['date_due']));
Thanks again