Calculate amount_tax properly when there is discount in Purchase Order