fix: count full visitor per museum for combo tickets
Deploy HiHala Dashboard / deploy (push) Successful in 10s
Deploy HiHala Dashboard / deploy (push) Successful in 10s
Bundle tickets grant access to multiple museums, so each museum should count 1 visitor — not 0.5. Revenue split remains 50/50. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -77,7 +77,7 @@ export function aggregateTransactions(sales: ERPSaleRecord[]): AggregatedRecord[
|
||||
}
|
||||
|
||||
const visitors = isB2C ? product.UnitQuantity : product.PeopleCount;
|
||||
entry.Visits += visitors * split;
|
||||
entry.Visits += visitors; // each museum in a combo counts the full visitor
|
||||
entry.Tickets += product.UnitQuantity * split;
|
||||
entry.GrossRevenue += product.TotalPrice * split;
|
||||
entry.NetRevenue += (product.TotalPrice - product.TaxAmount) * split;
|
||||
|
||||
Reference in New Issue
Block a user