bin/sale in sales-0.1.2 vs bin/sale in sales-0.1.3
- old
+ new
@@ -177,15 +177,15 @@
app[:sold_units] += item[:units]
if item[:customer_price]==0 #a free app
total_free_units += item[:units]
else
total_payed_units += item[:units]
- alltime_proceeds_per_currency[item[:currency_of_proceeds]] += item[:developer_proceeds]
+ alltime_proceeds_per_currency[item[:currency_of_proceeds]] += item[:developer_proceeds] * item[:units]
end
elsif INAPP_SALE_IDENTS.include? item[:product_type_id]
app[:sold_units] += item[:units]
total_inapp_units += item[:units]
- alltime_proceeds_per_currency[item[:currency_of_proceeds]] += item[:developer_proceeds]
+ alltime_proceeds_per_currency[item[:currency_of_proceeds]] += item[:developer_proceeds] * item[:units]
if item[:product_type_id] == "IAY" #InAppPurchase
alltime_renewables += item[:units]
end
elsif UPDATE_IDENTS.include? item[:product_type_id] #count updates
app[:updated_units] += item[:units]