delete wrong file
This commit is contained in:
parent
cf40a53785
commit
2f787763bd
1 changed files with 0 additions and 66 deletions
|
@ -1,66 +0,0 @@
|
|||
event_ids = [25, 6, 10, 9, 18, 12, 20, 21, 23, 30, 11, 29, 28, 19]
|
||||
# events = Event.where("starting_at >= ?", Date.parse("2016-01-01"))
|
||||
events = Event.where(id: event_ids).chronological
|
||||
puts events.pluck(:name)
|
||||
|
||||
# Fusion 2016
|
||||
# at.tension#7
|
||||
# Fusion 2018
|
||||
# Fusion 2019
|
||||
# at.tension#8
|
||||
# Fusion 2020
|
||||
# Fusion 2021 RED
|
||||
# Fusion 2021 BLACK
|
||||
# Plan:et C - alpha
|
||||
# Plan:et C - beta
|
||||
# be.tween #1
|
||||
# Plan:et C - gamma
|
||||
# Fusion 2022
|
||||
# at.tension#9
|
||||
|
||||
bookings = Booking.where(event: events)
|
||||
ap bookings.count
|
||||
|
||||
sums = {}
|
||||
sums[:quellensteuer] = {}
|
||||
sums[:doitsch] = {}
|
||||
sums[:quellensteuer][:guest_tickets] = 0
|
||||
sums[:quellensteuer][:artist_tickets] = 0
|
||||
sums[:doitsch][:guest_tickets] = 0
|
||||
sums[:doitsch][:artist_tickets] = 0
|
||||
|
||||
events.each do |event|
|
||||
bookings = Booking.where(event: event)
|
||||
sums = {}
|
||||
sums[:quellensteuer] = {}
|
||||
sums[:doitsch] = {}
|
||||
sums[:quellensteuer][:guest_tickets] = 0
|
||||
sums[:quellensteuer][:artist_tickets] = 0
|
||||
sums[:doitsch][:guest_tickets] = 0
|
||||
sums[:doitsch][:artist_tickets] = 0
|
||||
bookings.each do |booking|
|
||||
ti = booking.task_instance("Quellensteuer")
|
||||
#ap "============================================="
|
||||
#ap "Booking #{booking.id} - #{booking.artist.name}"
|
||||
has_quellensteuer = (ti.present? && (ti.is_state?("teilweise gemeldet") || ti.is_state?("komplett gemeldet")))
|
||||
cat = has_quellensteuer ? :quellensteuer : :doitsch
|
||||
booking.admissions.each do |adm|
|
||||
# ap "Admission ##{adm.id}"
|
||||
if adm.canceled?
|
||||
# ap "cancelled"
|
||||
next
|
||||
end
|
||||
# Nur die eingecheckten (Gäste)
|
||||
# Alle angelegten, nicht stornierten (Artists)
|
||||
if adm.guest_admission?
|
||||
if adm.checked_in? # Guest & Checked in
|
||||
sums[cat][:guest_tickets] += 1
|
||||
end
|
||||
else # Artist
|
||||
sums[cat][:artist_tickets] += 1
|
||||
end
|
||||
end
|
||||
end
|
||||
ap event.name
|
||||
ap sums
|
||||
end
|
Loading…
Reference in a new issue