<?php $__env->startSection('content'); ?>
	<div class="row">
    	<div class="col-lg-12">
    		<h1 class="page-header">Timecard</h1> 
    	</div>
    </div>
        <div class="row">
                <div class="col-lg-12">
                    <div class="panel panel-default">
	                    <?php if(session('status')): ?>
							<div class="alert alert-success">
								<?php echo e(session('status')); ?>

							</div>
						<?php endif; ?>
			
						<?php if(count($errors) > 0): ?>
							<div class="alert alert-danger">
								<strong>Whoops!</strong> There were some problems with your input.<br><br>
								<ul>
									<?php foreach($errors->all() as $error): ?>
										<li><?php echo e($error); ?></li>
									<?php endforeach; ?>
								</ul>
							</div>
						<?php endif; ?>
                        <div class="panel-heading">
                            Totals Report: <?php echo e(strtoupper(date('d-M-Y', strtotime($date)))); ?> through <?php echo e(strtoupper(date('d-M-Y', strtotime('+6 days', strtotime($date))))); ?>

                        </div>
                        <!-- /.panel-heading -->
                        	<div class="panel-body">
								<h4>Accounts</h4>
								<table>
									<tr>
										<th>Account</th>
										<th>Company</th>
										<th>Description</th>
										<th>Total</th>
									</tr>
									
									<?php foreach($accounts as $accountK => $accountV): ?>
										<?php $account = \App\Account::find($accountK); ?>
									<tr>
										<td><?php echo e($account->number); ?></td>
										<td><?php echo e($account->company); ?></td>
										<td><?php echo e($account->description); ?></td>
										<td><?php echo e($accountV); ?></td>
									</tr>
									<?php endforeach; ?>
									
								</table>
								<br>
								<h4>Allocations</h4>
								<table>
									<tr>
										<th>Description</th>
										<th>Total</th>
									</tr>
									
									<?php foreach($allocations as $accountK => $accountV): ?>
										<?php $account = \App\Allocation::find($accountK); ?>
									<tr>
										<td><?php echo e($account->description); ?></td>
										<td><?php echo e($accountV); ?></td>
									</tr>
									<?php endforeach; ?>
									
								</table>
								<br>
								<h4>Work Orders</h4>
								<table>
									<tr>
										<th>Number</th>
										<th>Description</th>
										<th>Total</th>
									</tr>
									
									<?php foreach($work_orders as $accountK => $accountV): ?>
										<?php $account = Illuminate\Support\Facades\DB::connection('sql_work_orders')->table('WO')->where('id','=',$accountK)->first();?>
									<tr>
										<th><?php echo e($account->WONumber); ?></th>
										<td><?php echo e($account->Client_WO_Name); ?></td>
										<td><?php echo e($accountV); ?></td>
									</tr>
									<?php endforeach; ?>
									
								</table>

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

<?php $__env->startSection('extras'); ?>

    <style>
    	a:hover{
    		text-decoration: none;
    	}
    	.odd .subBack {
    		background-color: #f0fcff;
    	}
    	.even .subBack {
    		background-color: #ecf7fa;
    	}
    	.floatLeft
    	{
    		float: left;
    	}
    	th {
    		padding: 5px;
    	}
    	td {
    		padding: 5px;
    	}
		span, strong {
		-webkit-print-color-adjust: exact;
		}
		
    </style>
<?php $__env->stopSection(); ?>

<?php $__env->startSection('bottom'); ?>

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

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