     if @excludeEmptyStocks && values[1] == 0
       return null
     else
-      @i++
       return values
 
   _getValue: (stock, mapping) ->


  constructor: (excludeEmptyStocks) ->
    @excludeEmptyStocks = excludeEmptyStocks
    @i = 0

  mapStocks: (stocks) ->
    mappings =

      quantity: "quantityOnStock"
      channel: "supplyChannel"

    rows = _.chain(stocks.body.results)
    .map (stock) => @_mapStocks(stock)
    .filter (stock) -> not _.isNull(stock)
    .value()

    console.log "Export #{_.size(rows)} stock entries."
    header = _.map mappings, (value, key) =>
      key

