Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014aUaQeLnwbb1zTpN7kHeat
17 lines
526 B
Plaintext
17 lines
526 B
Plaintext
@AccessControl.authorizationCheck: #NOT_REQUIRED
|
|
@EndUserText.label: 'Event revenue'
|
|
define view entity {{P}}I_EVENT_REVENUE
|
|
as select from {{p}}event as ev
|
|
left outer join {{p}}booking as bk on bk.event_id = ev.event_id
|
|
and bk.status = 'C'
|
|
{
|
|
key ev.event_id as event_id,
|
|
ev.event_date as event_date,
|
|
count( bk.booking_no ) as booking_count,
|
|
sum( bk.guests ) as total_guests,
|
|
sum( bk.fee ) as total_fee
|
|
}
|
|
group by
|
|
ev.event_id,
|
|
ev.event_date
|