<div style="margin: 0 auto; width: 100%;">
	<div style="font-size: 14px; font-weight: bold; line-height: 30px;"><?php echo date($tpl['option_arr']['o_date_format'], time());?></div>
	<table class="table" cellspacing="2" cellpadding="5" style="width: 100%">
		<thead>
			<tr>
				<th><?php __('lblResvName')?></th>
				<th><?php __('lblResvPhone')?></th>
				<th><?php __('lblBooths')?></th>
				<th><?php __('lblExtras')?></th>
				<th><?php __('lblStatus')?></th>
				<th><?php __('lblTotalDeposit')?></th>
			</tr>
		</thead>
		<tbody>
			<?php
			if(!empty($tpl['today_arr'])) 
			{
				$reservation_statuses = __('reservation_statuses', true);
				foreach($tpl['today_arr'] as $k => $v)
				{
					?>
					<tr>
						<td><?php echo pjSanitize::html($v['c_name']);?></td>
						<td><?php echo pjSanitize::html($v['c_phone']);?></td>
						<td><?php echo pjSanitize::html($v['type']);?> x <?php echo $v['cnt'];?></td>
						
						<?php
						if(isset($tpl['extras'][$v['id']]) && count($tpl['extras'][$v['id']]) > 0)
						{ 
							?>
							<td style="padding: 0px; border: none;">
								<table cellspacing="0" cellpadding="3" style="width: 100%; border: none; border-collapse: collapse;">
									<?php
									$trace_id = 0;
									foreach($tpl['extras'][$v['id']] as $cid => $extra_arr)
									{ 
										if(isset($tpl['category_arr'][$cid]))
										{
											foreach($extra_arr as $eid => $extra)
											{
												if($trace_id != $cid)
												{
													?>
													<tr>
														<td rowspan="<?php echo count($extra_arr);?>" style="border: 1px solid #000; border-left: none;border-top: none;"><?php echo pjSanitize::html($tpl['category_arr'][$cid]);?></td>
												    	<td style="border: 1px solid #000; border-left: none; border-right: none;border-top: none;"><?php echo pjSanitize::html($tpl['extra_arr'][$eid]);?> x <?php echo $extra['cnt']?></td>
													</tr>
													<?php
													$trace_id = $cid;
												}else{ 
													?>
												 	<tr>
												    	<td style="border: 1px solid #000; border-left: none; border-right: none;"><?php echo pjSanitize::html($tpl['extra_arr'][$eid]);?> x <?php echo $extra['cnt']?></td>
												  	</tr>
												  	<?php
												}
											}
										}
									} 
									?>
								</table>
							</td>
							<?php
						}else{
							?><td style="border-top: none;">&nbsp;</td><?php
						} 
						?>
						</td>
						<td><?php echo $reservation_statuses[$v['status']];?></td>
						<td><?php echo pjUtil::formatCurrencySign($v['total'], $tpl['option_arr']['o_currency']);?> / <?php echo pjUtil::formatCurrencySign($v['deposit'], $tpl['option_arr']['o_currency']);?></td>
					</tr>
					<?php
				}
			}else{
				?><tr><td colspan="6"><?php __('dash_no_reservations_found');?></td></tr><?php
			}
			?>
		</tbody>
	</table>
</div>