Calculate amount_tax properly when there is discount in Purchase Order

Amount tax total doesn't take into consideration discount line in Purchase Orders