 
<?php $__env->startSection('content'); ?>
	<table style="width: 100%;">
		<tr class="title">
			<td style="">
				Budget Report: Suffixes
				&nbsp;&nbsp;|&nbsp;&nbsp;
				<?php echo e($data['year']); ?>

			</td>
		</tr>
	</table>
	<table style="width: 100%;">
		<thead>
			<tr class="header">
				<th style="width: 27%;">&nbsp;</th>
				<th style="width: 12%;">Company 1</th>
				<th style="width: 12%;">Company 3</th>
				<th style="width: 12%;">Company 4</th>
				<th style="width: 12%;">Company 7</th>
				<th style="width: 12%;">Company 8</th>
				<th style="width: 13%;">Total</th>
			</tr>
		</thead>
		<tbody>
			<?php foreach($all as $parent_order => $parent_ids): ?>
				<?php foreach($parent_ids as $parent_id => $child_orders): ?>
					
					<tr class="parent_row">
						<td class="parent">
							<?php echo e($parents[$parent_id]); ?>

						</td>
						<td colspan="6">&nbsp;</td>
					</tr> 
					<?php foreach($child_orders as $child_order => $children_ids): ?>
						<?php $totals = array(1=>0.00,3=>0.00,4=>0.00,7=>0.00,8=>0.00); ?>
						<?php foreach($children_ids as $child_id => $suffixes): ?>
							<tr>
								<td class="child">
									<?php echo e($children[$child_id]); ?>

								</td>
								<td colspan="6">&nbsp;</td>
							</tr>
							<?php 
								ksort($suffixes);
							?>
							<?php foreach($suffixes as $suffix => $companies): ?>
								<?php $total = 0.00; ?>
								<tr class="suffix_row">
									<td class="suffix">
										<?php echo e($suffix); ?>

									</td>
									<?php ksort($companies); ?>
									<?php foreach($companies as $company => $value): ?>
										<?php 
											$total += $value; 
											$totals[$company] += $value;
										?>
										<td class="value">
											<?php echo e(number_format($value,2)); ?>

										</td>
									<?php endforeach; ?>
									<td class="total">
										<?php echo e(number_format($total,2)); ?>

									</td>
								</tr>
							<?php endforeach; ?>
						<?php endforeach; ?>
						<tr class="totals">
							<td>
								&nbsp;
							</td>
							<?php $child_total = 0.00; ?>
							<?php foreach($totals as $company => $value): ?>
								<td class="value">
									<?php echo e(number_format($value,2)); ?>

								</td>
								<?php $child_total += $value; ?>
							<?php endforeach; ?>
							<td class="value">
								<?php echo e(number_format($child_total,2)); ?>

							</td>
						</tr>
					<?php endforeach; ?>
				<?php endforeach; ?>
			<?php endforeach; ?>
		</tbody>
	</table>



<?php $__env->stopSection(); ?>

<?php $__env->startSection('extras'); ?>
	<style>
		.parent{
			font-size: .8em;
			font-weight: 600;
			overflow: hidden;
			white-space: nowrap;
			width: 27%;
		}
		.child{
			font-size: .7em;
			overflow: hidden;
			white-space: nowrap;
			width: 27%;

		}
		.suffix{
			font-size: .7em;
			overflow: hidden;
			white-space: nowrap;
			text-align: right;
			font-weight: 600;
			width: 27%;

		}
		.value{
			font-size: .6em;
			overflow: visible;
			white-space: nowrap;
			text-align: right;
			width: 12%;
		}
		.total{
			font-size: .6em;
			text-align: right;
			width: 13%;
			overflow: visible;
			white-space: nowrap;
			text-align: right;
		}
		.header th{
			font-size: .8em;
			text-align: right;
			border-bottom: 2px solid black;
		}
		.parent_row td{
			border-bottom: 1px solid black;
		}
		.suffix_row td{
			border-bottom: 1px solid #e6e6e6;
		}
		.title td{
			font-weight: 600;
			border-bottom: 2px solid black;
		}
		.totals td{
			border-top: 1px solid lightgray;
		}
		tr {
			width: 100%;
		}

	</style>
<?php $__env->stopSection(); ?>



<?php echo $__env->make('pdfs.pdf_template', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>