Skip to content

Commit

Permalink
bugfix with net value
Browse files Browse the repository at this point in the history
  • Loading branch information
andreasknoepfle committed Jan 28, 2015
1 parent d9255ce commit f38f6c8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/mass_upload/fees_and_donations.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,6 @@ def self.calculate_total_fees_and_donations(articles)

def self.calculate_total_fees_and_donations_netto(articles)
fees_and_donations = articles.pluck(:calculated_fair_cents,:calculated_friendly_cents,:calculated_fee_cents,:quantity)
total_netto = fees_and_donations.map { |values| ((values[0] + values[1] + values[2])/1.19).ceil * values[3] }.sum
total_netto = Money.new(fees_and_donations.map { |values| ((values[0] + values[1] + values[2])/1.19).ceil * values[3] }.sum)
end
end

0 comments on commit f38f6c8

Please sign in to comment.