firstOrCreate( ['booking_id' => $booking->id], [ 'cancelled_on' => today(), 'initiated_by' => $initiatedBy, 'has_policy' => $cost !== null, 'policy_name' => $cost['policy'] ?? null, 'days_before' => $cost['days_before'] ?? null, 'percent' => $cost['percent'] ?? null, 'base_amount' => $cost['base_amount'] ?? null, 'calculated_fee' => $cost['fee'] ?? null, 'paid_amount' => $booking->paidAmount(), 'status' => Cancellation::OPEN, ], ); } }