By Marius Lead on Saturday, 26 May 2018
Posted in General Issues
Replies 8
Likes 0
Views 501
Votes 0
I would like to display a subscription period on invoice. For example if plan is recurring monthly, I would like it to say
1.05.2018 - 1.06.2018, presuming that invoice is paid on 1.05.2018
Thanks!
Hello Marvin,

Sorry for the delayed response due to weekend.

Let me know on invoice page on which place you want to show this data, so i'll assist you.
Please explain using screen shot.

Update me.
·
Monday, 28 May 2018 10:36
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Manisha,

please see the screenshot attached. The red arrow indicates where the period needs to be displayed.
Please note that it should only show the period that is covered by the invoice(e.g. 1 month). Not the total subscription period since the user signed up or so.

I also added admin login data into my request here, so you can check it out in more detail.

Greetings!
·
Monday, 28 May 2018 16:22
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello,

To add subscription start and end date on invoice thanks page, you need to modify the file at below mentioned path.
Root/components/com_payplans/templates/default/_partials/default_partials_invoice.php, near line no. 182, find below mentioned line no of code.

<td class='span8'>
<div><?php echo XiText::_('COM_PAYPLANS_INVOICE_PRICE'); ?></div>
</td>


Replace with

<td class='span8'>
<?php $orderId = $invoice->getObjectId();
$order = PayplansOrder::getInstance($orderId);
$subscription = $order->getSubscription();
$subDate = PayplansHelperFormat::date($subscription->getSubscriptionDate(), '%m-%d-%Y');
$expDate = PayplansHelperFormat::date($subscription->getExpirationDate(), '%m-%d-%Y');
?>

<div><?php echo XiText::_('COM_PAYPLANS_INVOICE_PRICE'); ?><?php echo " ".$subDate." - ".$expDate;?></div>
</td>


Do the changes and check this. Let me know if you have any issue.
·
Monday, 28 May 2018 17:32
·
0 Likes
·
0 Votes
·
0 Comments
·
Thanks Manisha, will this also have the effect on the generated invoice PDF? This is what is important for us.
·
Monday, 28 May 2018 18:09
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello,

Your welcome.

For pdf invoice you need to do the same changes as mentioned above in below mentioned file path.
Root/plugins/payplans/pdfinvoice/pdfinvoice/tmpl/default_pdfcontent.php , near line no. 145.
·
Monday, 28 May 2018 18:21
·
0 Likes
·
0 Votes
·
0 Comments
·
thanks for your help. it worked. And a quick one, does every invoice comes with some kind of id? Not sure if there is anything else but invoice key? We need a unique int number.
·
Monday, 28 May 2018 21:07
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello,

Every invoice have invoice key which is unique, if you don't want to use invoice key then you can use invoice_id as per your requirement.

Let me know if you have any query.
·
Tuesday, 29 May 2018 01:03
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post