changed fancy invoice calculations to server side