Fix some tax totals issues

There are 2 issues in the totals regarding tax:

*When you invoice an order containing some discount, you get wrong tax percentages in totals*
Discount was ignored when calculating tax percentages.

Example:
There is one item with net row sum of €12.49, a tax rate of _19%_ and a discount of €0.62.
Everything is alright in article list, but the totals show a wrong tax rate due to the ignored discount:

* subtotal: 12.49
* discount: 0.62
* tax _18%_: 2.25

*Shipping was listed after tax, which is confusing, since you have to pay tax for shipping, too*
I changed that order to show the tax totals just before grand total.