Due date

Request for general support related to Logic Invoice.
Post Reply
copy
Posts: 8
Joined: Thu Aug 24, 2017 10:38 am

Due date

Post by copy » Fri Aug 25, 2017 12:16 pm

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.

User avatar
Esmond
Site Admin
Posts: 272
Joined: Tue Sep 15, 2015 3:08 pm
Location: Singapore
Contact:

Re: Due date

Post by Esmond » Fri Aug 25, 2017 2:26 pm

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?

copy
Posts: 8
Joined: Thu Aug 24, 2017 10:38 am

Re: Due date

Post by copy » Sat Aug 26, 2017 4:14 am

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)

User avatar
Esmond
Site Admin
Posts: 272
Joined: Tue Sep 15, 2015 3:08 pm
Location: Singapore
Contact:

Re: Due date

Post by Esmond » Sat Aug 26, 2017 10:21 am

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'])));

copy
Posts: 8
Joined: Thu Aug 24, 2017 10:38 am

Re: Due date

Post by copy » Sat Aug 26, 2017 1:32 pm

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

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest