Further Customizing Sales Invoice PrintFormat

Hello,
On some of our invoices, we give a special discount to our customers when they pay up to a given date. (called skonto or cash discount). We solved this by using negative taxes under the taxes and charges section.
Now we would also like to display this special discount in the printed sales invoice like this:

(net total) when payed until (payment due date)

(net total - cash discount) wen payed until (special date)

but we cant seem to extract specific tax values and calculated values in the print format.

Does anyone else have this issue?

see this code, this is printing taxes, you can write script to print when tax amount is negative