diff --git a/ruby/lib/jam_ruby/models/affiliate_partner.rb b/ruby/lib/jam_ruby/models/affiliate_partner.rb index c0b67c2d5..db41ddd12 100644 --- a/ruby/lib/jam_ruby/models/affiliate_partner.rb +++ b/ruby/lib/jam_ruby/models/affiliate_partner.rb @@ -124,7 +124,7 @@ class JamRuby::AffiliatePartner < ActiveRecord::Base product_info = shopping_cart.product_info # subtract the total quantity from the freebie quantity, to see how much we should attribute to them real_quantity = product_info[:quantity].to_i - product_info[:marked_for_redeem].to_i - {fee_in_cents: (1.99 * 100 * real_quantity * rate).round} + {fee_in_cents: (1.99 * 100 * real_quantity * rate.to_f).round} else false end diff --git a/web/app/assets/javascripts/react-components/JamTrackAutoComplete.js.jsx.coffee b/web/app/assets/javascripts/react-components/JamTrackAutoComplete.js.jsx.coffee index f1bf96cc4..a38252509 100644 --- a/web/app/assets/javascripts/react-components/JamTrackAutoComplete.js.jsx.coffee +++ b/web/app/assets/javascripts/react-components/JamTrackAutoComplete.js.jsx.coffee @@ -9,6 +9,7 @@ MIX_MODES = context.JK.MIX_MODES logger: context.JK.logger + render: () -> window.JamTrackSearchInput = '' unless window.JamTrackSearchInput? # can't pass null to react-select @@ -16,7 +17,7 @@ MIX_MODES = context.JK.MIX_MODES searchValue = if @state.search == 'SEPARATOR' then '' else window.JamTrackSearchInput `