json
{
"deal_id": "deal_majestic_dallas_001",
"name": "John Doe - Majestic Theatre Dallas",
"deal_type": "guarantee_vs_percentage_nbor",
"created_at": "2024-11-04T12:00:00Z",
"initialized_from_template": "tpl_john_tour_v1",
"versions": [
{
"version_id": "v_working_01",
"status": "working",
"static_variables": {
"v_guarantee": 36750,
"v_artist_percentage": 90,
"v_bonus_per_ticket": 1.05,
"v_bonus_cap_tickets": 1621,
"v_merch_artist_percentage": 85
},
"clause_blocks": [
{
"clause_block_id": "cb_show_01",
"clause_block_ref": "CB_SHOW_01",
"name": "Show - Majestic Theatre",
"inputs": [
{
"input_key": "SHOW_METADATA_INPUT",
"input_type": "object",
"name": "Show Details",
"status": "C",
"value": {
"date": "2024-01-26",
"venue": "Ryman Auditorium",
"city": "Nashville",
"state": "TN"
}
},
{
"input_key": "BOX_OFFICE_INPUT",
"input_type": "object",
"name": "Box Office Sales",
"status": "P",
"value": {
"total_gross": 89357.48,
"total_sold": 1621,
"tiers": [
{
"name": "Reserved 1",
"quantity": 564,
"price": 62.48,
"sold": 564
},
{
"name": "Reserved 2",
"quantity": 860,
"price": 51.98,
"sold": 860
},
{
"name": "Reserved 3",
"quantity": 247,
"price": 41.48,
"sold": 227
}
]
}
},
{
"input_key": "TAX_FEE_INPUT",
"input_type": "object",
"name": "Taxes and Fees",
"status": "P",
"value": {
"total_taxes": 6334.39,
"total_fees": 4255.13
}
},
{
"input_key": "EXPENSE_INPUT",
"input_type": "object",
"name": "Expenses",
"status": "P",
"value": {
"total_fixed": 25389,
"total_variable": 2332.03,
"support_cost": 1575,
"breakdown": [
{
"name": "Advertising",
"amount": 7875
},
{
"name": "Rent",
"amount": 3675
},
{
"name": "Stagehands",
"amount": 1837.5
},
{
"name": "Security",
"amount": 1050
},
{
"name": "Catering",
"amount": 210
}
]
}
}
],
"states": [
{
"state_key": "SHOW_FINANCIALS",
"state_type": "object",
"name": "Show Financial Summary",
"status": "C",
"value": {
"gross_receipts": 89357.48,
"taxes": 6334.39,
"fees": 4255.13,
"net_receipts": 78767.96,
"total_expenses": 29296.03,
"adjusted_gross": 49471.93,
"artist_split_earnings": 44524.74,
"tickets_sold": 1621
},
"calculation": {
"type": "aggregate",
"fields": {
"gross_receipts": "BOX_OFFICE_INPUT.value.total_gross",
"taxes": "TAX_FEE_INPUT.value.total_taxes",
"fees": "TAX_FEE_INPUT.value.total_fees",
"net_receipts": "this.gross_receipts - this.taxes - this.fees",
"total_expenses": "EXPENSE_INPUT.value.total_fixed + EXPENSE_INPUT.value.total_variable + EXPENSE_INPUT.value.support_cost",
"adjusted_gross": "MAX(0, this.net_receipts - this.total_expenses)",
"artist_split_earnings": "this.adjusted_gross * v_artist_percentage / 100",
"tickets_sold": "BOX_OFFICE_INPUT.value.total_sold"
}
}
}
],
"financial_clauses": [
{
"clause_id": "clause_primary_deal",
"name": "Guarantee vs Settlement",
"trigger": "true",
"amount": 44524.74,
"calculation": "MAX(v_guarantee, SHOW_FINANCIALS.value.artist_split_earnings)",
"calculation_metadata": {
"guarantee_component": 36750,
"percentage_component": 44524.74,
"winning_path": "percentage",
"calculation_summary": "MAX($36,750.00, $44,524.74) = $44,524.74"
},
"payment_terms": [
{
"payment_term_id": "pt_balance",
"payment_term_name": "Balance Payment",
"payment_type": "lump_sum",
"amount": {
"type": "remaining_balance"
},
"due_date": {
"type": "relative",
"trigger": "settlement",
"offset_days": 0
}
}
]
},
{
"clause_id": "clause_ticket_bonus",
"name": "Ticket Bonus",
"trigger": "SHOW_FINANCIALS.value.tickets_sold > 0",
"amount": 1702.05,
"calculation": "MIN(SHOW_FINANCIALS.value.tickets_sold, v_bonus_cap_tickets) * v_bonus_per_ticket",
"calculation_metadata": {
"tickets_sold": 1621,
"bonus_cap": 1621,
"bonus_rate": 1.05,
"calculation_summary": "MIN(1621, 1621) * $1.05 = $1,702.05"
}
}
]
}
]
}
]
}