Skip to content

Commit

Permalink
Add fees to kenshi csv export (#299)
Browse files Browse the repository at this point in the history
Co-authored-by: Yannis JAQUET <[email protected]>
  • Loading branch information
yannis and yannis authored Sep 19, 2023
1 parent a087a91 commit 3485249
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/admin/cup.rb
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,8 @@ def find_resource
[@cup.team_categories, @cup.individual_categories, @cup.products].flatten.each do |tc|
header << tc.name
end
header << "Fees CHF"
header << "Fees €"
csv << header.flatten
kenshis.each do |kenshi|
user = kenshi.user
Expand All @@ -185,6 +187,8 @@ def find_resource
@cup.products.each do |p|
kcsv << (kenshi.consume?(p) ? p.name : nil)
end
kcsv << kenshi.fees(:chf)
kcsv << kenshi.fees(:eu)
csv << kcsv.flatten
end
end
Expand Down

0 comments on commit 3485249

Please sign in to comment.