{block content}
	{var $showSum = 0}
	<div class="span12">
		<div class="box-content no-print">

			<div n:foreach="$flashes as $flash" class="alert alert-{$flash->type}">{$flash->message}</div>

<!--			<div class="alert alert-info alert-no-margin" n:if="$customersSum <= 0">
				Nic nebylo nalezeno, zkuste jiné nastavení filtru.
			</div>-->

			<table class="table table-striped" n:if="count($kitchen) > 0">
				<thead>
					<tr>
						<th colspan="2">Kuchyně</th>
						<th></th>
						<th>&#9312;</th>
						<th>&#9313;</th>
						<th>&#9314;</th>
						<th>&#9315;</th>
						<th>&#9316;</th>
						<th>&#9317;</th>
						<th>&#9318;</th>
						<th>&#9319;</th>
						<th>Celkem</th>
						<th>Celkem P</th>
					</tr>
				</thead>

				<tbody>
				{foreach $kitchen as $row}
					<tr class="{if $todayDate == $row->date_order}success {/if} {if $iterator->counter % 2 == 0}rowEven{else}rowOdd{/if}">
						<td rowspan="2">{if $todayDate == $row->date_order}DNES{/if}</td>
						<td rowspan="2">{$row->date_order|date:'%d.%m.%Y'}</td>
						<td><strong>&#9398;</strong></td>
						<td>{$row->type_1_amount}</td>
						<td>{$row->type_2_amount}</td>
						<td>{$row->type_3_amount}</td>
						<td>{$row->type_4_amount}</td>
						<td>{$row->type_5_amount}</td>
						<td>{$row->type_6_amount}</td>
						<td>{$row->type_7_amount}</td>
						<td>{$row->type_8_amount}</td>
						<td>{$row->total_amount}</td>
						<td>{$row->sum_p}</td>
					</tr>

					<tr class="{if $todayDate == $row->date_order}success {/if} {if $iterator->counter % 2 == 0}rowEven{else}rowOdd{/if}">
						<td><strong>&#9399;</strong></td>
						<td>{$row->type_1b_amount}</td>
						<td>{$row->type_2b_amount}</td>
						<td>{$row->type_3b_amount}</td>
						<td>{$row->type_4b_amount}</td>
						<td>{$row->type_5b_amount}</td>
						<td>{$row->type_6b_amount}</td>
						<td>{$row->type_7b_amount}</td>
						<td>{$row->type_8b_amount}</td>
						<td>{$row->total_amount_b}</td>
						<td>{$row->sum_p_b}</td>
					</tr>
				{/foreach}
				</tbody>
			</table>

		</div>
		
		<div class="box-content">
			<table style="float: right; margin-top: 40px;">
				<tr>
					<td style="padding-right: 8px;" class="no-print">
						{if $stepBefore->disable === TRUE}
							<a href="#" class="btn btn-warning disabled" style="color: #000000; font-size: 40px;">
								&#9666;
							</a>
						{else}
							<a n:href="this, date => $stepBefore->date" class="btn btn-warning" style="color: #000000; font-size: 40px;">
								&#9666;
							</a>
						{/if}
					</td>

					<td style="padding-right: 20px;" class="no-print">
						<a n:href="this, date => $stepToday->date" class="btn" style="color: #000000;">
							DNES
						</a>
					</td>

					<td style="font-weight: bold; font-size: 14px;">
						{$currentDateToShow|date:'d.m.Y'}
					</td>

					<td style="padding-left: 8px;" class="no-print">
						{if $stepNext->disable === TRUE}
							<a href="#" class="btn btn-warning" style="color: #000000; vertical-align: top; font-size: 40px;">
								&#9656;
							</a>
						{else}
							<a n:href="this, date => $stepNext->date" class="btn btn-warning" style="color: #000000; vertical-align: top; font-size: 40px;">
								&#9656;
							</a>
						{/if}
					</td>
				</tr>
			</table>
			<div class="clear"></div>
			{if count($summaryByDate) == 0}
				<div class="alert alert-info" style="margin-top: 10px;">
					Pro tento den nebyla nalezena žádná expedice.
				</div>
			{/if}
			<table class="table table-striped" n:if="count($summaryByDate) > 0">
				<thead>
					<tr>
						<th colspan="2">Expedice {$currentDateToShow|date:'d.m.Y'}</th>
						<th></th>
						<th>&#9312;</th>
						<th>&#9313;</th>
						<th>&#9314;</th>
						<th>&#9315;</th>
						<th>&#9316;</th>
						<th>&#9317;</th>
						<th>&#9318;</th>
						<th>&#9319;</th>
						<th>Celkem</th>
						<th>Celkem P</th>
					</tr>
				</thead>

				<tbody>
				{foreach $summaryByDate as $row}
					<tr class="{isset($summaryIds['id' . $row->user_id]) ? $summaryIds['id' . $row->user_id] : ''} {if $iterator->counter % 2 == 0}rowEven{else}rowOdd{/if}">
						<td rowspan="2"></td>
						<td rowspan="2">{$row->user_name}</td>
						<td><strong>&#9398;</strong></td>
						<td>{$row->type_1_amount}</td>
						<td>{$row->type_2_amount}</td>
						<td>{$row->type_3_amount}</td>
						<td>{$row->type_4_amount}</td>
						<td>{$row->type_5_amount}</td>
						<td>{$row->type_6_amount}</td>
						<td>{$row->type_7_amount}</td>
						<td>{$row->type_8_amount}</td>
						<td>{$row->total_amount}</td>
						<td>{$row->sum_p}</td>
					</tr>
					<tr class="{isset($summaryIds['id' . $row->user_id]) ? $summaryIds['id' . $row->user_id] : ''} {if $iterator->counter % 2 == 0}rowEven{else}rowOdd{/if}">
						<td><strong>&#9399;</strong></td>
						<td>{$row->type_1b_amount}</td>
						<td>{$row->type_2b_amount}</td>
						<td>{$row->type_3b_amount}</td>
						<td>{$row->type_4b_amount}</td>
						<td>{$row->type_5b_amount}</td>
						<td>{$row->type_6b_amount}</td>
						<td>{$row->type_7b_amount}</td>
						<td>{$row->type_8b_amount}</td>
						<td>{$row->total_amount_b}</td>
						<td>{$row->sum_p_b}</td>
					</tr>
				{/foreach}
					<tr class="">
						<td></td>
						<th>Celkem</th>
						<th></th>
						<td>{$summarySumByDate->type_1_amount}</td>
						<td>{$summarySumByDate->type_2_amount}</td>
						<td>{$summarySumByDate->type_3_amount}</td>
						<td>{$summarySumByDate->type_4_amount}</td>
						<td>{$summarySumByDate->type_5_amount}</td>
						<td>{$summarySumByDate->type_6_amount}</td>
						<td>{$summarySumByDate->type_7_amount}</td>
						<td>{$summarySumByDate->type_8_amount}</td>
						<td>{$summarySumByDate->total_amount}</td>
						<td>{$summarySumByDate->sum_p}</td>
					</tr>
				</tbody>
			</table>

		</div>
	</div>
