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.