   syncVariantPrices: (variantDataInMaster, retailerVariant, retailerCustomerGroup, masterCustomerGroup, retailerChannelInMaster) ->
     prices = @_filterPrices(retailerVariant, variantDataInMaster.variant, retailerCustomerGroup, masterCustomerGroup, retailerChannelInMaster)
     actions = @_updatePrices(prices.retailerPrices, prices.masterPrices, retailerChannelInMaster.id, variantDataInMaster.variant, retailerCustomerGroup.id, masterCustomerGroup.id)
-      
+
     if _.isEmpty(actions)
       Q({ updates: 0 })
 

      retailerPrices: retailerPrices
      masterPrices: masterPrices

    console.error "f data %j", data
    data


  _updatePrices: (retailerPrices, masterPrices, channelId, variantInMaster, retailerCustomerGroupId, masterCustomerGroupId) ->
    actions = []
    syncAmountOrCreate = (retailerPrice, masterPrice, priceType = 'normal') ->
      console.error "Comparing %j", priceType, retailerPrice, masterPrice
      if masterPrice? and retailerPrice?
        if masterPrice.value.currencyCode isnt retailerPrice.value.currencyCode
          console.error "SKU #{variantInMaster.sku}: There are #{priceType} prices with different currencyCodes. R: #{retailerPrice.value.currencyCode} -> M: #{masterPrice.value.currencyCode}"

      @getCustomerGroup(@masterClient, CUSTOMER_GROUP_SALE)
      @getCustomerGroup(@retailerClient, CUSTOMER_GROUP_SALE)
    ]).spread (retailerChannelInMaster, masterCustomerGroup, retailerCustomerGroup) =>
      @getPublishedProducts @retailerClient, ((page, count) -> console.error "Page #{page} processed - #{count} price update(s) done."), (retailerProduct) =>
        current = retailerProduct.masterData.current
        current.variants or= []
        variants = [current.masterVariant].concat(current.variants)
        stagedVariants = [retailerProduct.masterData.staged.masterVariant].concat(retailerProduct.masterData.staged.variants)

        v = _.map variants, (retailerVariant) =>
          @taskQueue.addTask _.bind(@_processVariant, this, retailerVariant, retailerCustomerGroup, masterCustomerGroup, retailerChannelInMaster)
