   round.fixedCosts = fixedCosts
   $scope.round = round
   $scope.isAdmin = group.isAdmin(AuthService.getCurrentUser())
-  console.log("round.fixedCosts on load", round.fixedCosts)
 
   $scope.addFixedCost = ->
     $scope.inserted = new FixedCostModel({

c3 = require('c3')
_ = require('lodash')

pie = (fixedCosts) ->
  c3.generate

    data.id = id
    data.roundId = round.id
    data.amount = data.amountDollars

    fixedCost = new FixedCostModel(data)

    debug("saving", fixedCost.serialize(), id, index)

    FixedCostsStore.save(fixedCost).then (saved) ->
      round.fixedCosts[index] = fixedCost
    , (err) ->
      # pass error to xeditable as string
      "Oh noes! :( We had a problem saving, please refresh and try again."


  $scope.removeFixedCost = (index) ->
    fixedCost = fixedCosts[index]

    debug("removing", fixedCost)

    FixedCostsStore.remove(fixedCost).then ->
      fixedCosts.splice(index, 1)
    , (err) ->
      # TODO handle error

  $scope.$watch 'round.fixedCosts', ->

