By Grzegorz Szyszka on Monday, 25 May 2020
Posted in General Issues
Likes 0
Views 559
Votes 0
When plan is upgraded unused amount is deducted from total payment
This new value updates correctly [[INVOICE_TOTAL]] and [[INVOICE_TAX_AMOUNT]] so payments are done also corretly
But token [[INVOICE_SUBTOTAL]] is not updated and have value of new plan without deduction for unused time (of previous plan)
So invoices templates where you use token [[INVOICE_SUBTOTAL]] are incorrect.
Using of this token is important if you want add some discount or addons.
So this token should be calculated correctly or there should be a possibility to use on invocie template token for deduction amount.
Hey,

I am sorry for the delayed response.

Can you tell me for which invoice it's showing wrong amount ?
Please share the invoice id, so i'll check it further.
·
Wednesday, 27 May 2020 12:41
·
0 Likes
·
0 Votes
·
0 Comments
·
·
Wednesday, 27 May 2020 15:06
·
0 Likes
·
0 Votes
·
0 Comments
·
Hey,

I am really sorry for the delayed response.

I've checked the same process you did at my end correctly. The [[INVOICE_SUBTOTAL]] value will show the actaul price of plan.
In case when we upgrade plan , it will deduct the unused amount which will be deduct as discount. The price of plan will not changed, it will remain same.

So Invoice subtotal will show the new price plan. the deduction is used as discount not the subscription actaul price.
So this calculation is correct.

Let me know if you have any confusion.
·
Thursday, 28 May 2020 17:18
·
0 Likes
·
0 Votes
·
0 Comments
·
DId you check invocie which example I sent to you (FV 204/05/2020)

Do you see that values are not correct ? (see attached)
What is the reason ?

If I understand you well this is correct, I mean that subtotal should remaon the same and price difference is in discount
How I can add this discount value into invoice, so total will be correct sum of subtotal and dicount ?
Should I use token [[INVOICE_DISCOUNT_AMOUNT]] ?

This would solve the problem
·
Thursday, 28 May 2020 17:43
·
0 Likes
·
0 Votes
·
0 Comments
·
Hey,

Yes, i've checked the invoice you sent.

If I understand you well this is correct, I mean that subtotal should remaon the same and price difference is in discount

The subtotal remain same. To show discount amount you need to use [[INVOICE_DISCOUNT_AMOUNT]] token.

Let me know if you have any query.
·
Thursday, 28 May 2020 18:50
·
0 Likes
·
0 Votes
·
0 Comments
·
I am using token [[INVOICE_DISCOUNT_AMOUNT]] in invoice template and value of discount remains zero (marked yellow on attached screen) this is why invoice total not come from adding invoice subtotal and discount and whole invoice is not correct
·
Friday, 29 May 2020 02:12
·
0 Likes
·
0 Votes
·
0 Comments
·
Hey,

Please find attached file and replace with below mentioned file path.
root\administrator\components\com_payplans\includes\invoice\invoice.php

After that check this issue again and see how it goes.
Update us with response.
·
Friday, 29 May 2020 13:00
·
0 Likes
·
0 Votes
·
0 Comments
·
Now its works correct

Thanks

Only when you upgrade plans which have different VAT %, calculations are wrong
Its not hurt me as I will use only one VAT %, so I reporting it just for your info

From my side problem is solved and you can close it.
·
Friday, 29 May 2020 22:59
·
0 Likes
·
0 Votes
·
0 Comments
·
Thanks for updating, glad that your issue is resolved now.
·
Friday, 29 May 2020 23:27
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post