Unfortunately, the values are stored in the tables in a disjoint manner. The full values of amount and tax are stored in #_debtor_trans_details. The "net of discount" values are stored in #_debtor_trans - the last line in the Print Invoice takes it's value for INVOICE TOTAL from here.
You will need a completely different SQL linking the tables appropriately to get what you want. Otherwise, it will need to find a place in the Comments field manually entered which is what I assume you are doing now.!
Post's attachmentsTableValues.zip 21.4 kb, 5 downloads since 2015-09-28
You don't have the permssions to download the attachments of this post.