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

	<h2>
	<?php if($project->done == null): ?>
	Unofficial 
	<?php endif; ?>
	Project Report: <?php echo e($project->company_name); ?>

	<br>
	<span style="color: gray; font-size: .6em;"><?php echo e($project->title != '' ? $project->title : ''); ?></span>
	</h2>
	<hr>
	<table>
		<tr class="odd">
			<td class="title">Date Created</td>
			<td class="data"><?php echo e($project->created_at); ?></td>
		</tr>
		<tr class="even">
			<td class="title">Date Completed</td>
			<td class="data"><?php echo e($project->done); ?></td>
		</tr>
		<tr class="odd">
			<td class="title">Company Name</td>
			<td class="data"><?php echo e($project->company_name); ?></td>
		</tr>
		<tr class="even">
			<td class="title">Order Type</td>
			<td class="data"><?php echo e($project->order_type); ?></td>
		</tr>
		<tr class="odd">
			<td class="title">Customer Type</td>
			<td class="data"><?php echo e($project->customer_type); ?></td>
		</tr>
		<tr class="even">
			<td class="title">Sales Executive</td>
			<td class="data"><?php echo e($project->sales_exec); ?></td>
		</tr>
		<tr class="odd">
			<td class="title">Contract Term</td>
			<td class="data"><?php echo e($project->contract_term); ?></td>
		</tr>
		<tr class="even">
			<td class="title">Date Sold</td>
			<td class="data"><?php echo e($project->date_sold != '' ? date('Y-m-d', strtotime($project->date_sold)) : ''); ?></td>
		</tr>
		<tr class="odd">
			<td class="title">Desired Due Date</td>
			<td class="data"><?php echo e($project->desired_due_date != '' ? date('Y-m-d', strtotime($project->desired_due_date)) : ''); ?></td>
		</tr>
		<tr class="even">
			<td class="title">Ready To Bill Date</td>
			<td class="data"><?php echo e($project->ready_to_bill != '' ? date('Y-m-d', strtotime($project->ready_to_bill)) : ''); ?></td>
		</tr>
		<tr><td>&nbsp;<td></tr>
		<tr class="odd">
			<td class="title">Client Primary Contact</td>
			<td class="data"><?php echo e($project->client_primary_contact); ?></td>
		</tr>
		<tr class="even">
			<td class="title">Contact Phone Number</td>
			<td class="data"><?php echo e($project->contact_phone_number); ?></td>
		</tr>
		<tr class="odd">
			<td class="title">Contact Primary Email</td>
			<td class="data"><?php echo e($project->contact_primary_email); ?></td>
		</tr>

		<tr class="even">
			<td class="title">Technical Contact</td>
			<td class="data"><?php echo e($project->technical_contact); ?></td>
		</tr>
		<tr class="odd">
			<td class="title">Technical Phone Number</td>
			<td class="data"><?php echo e($project->technical_phone); ?></td>
		</tr>
		<tr class="even">
			<td class="title">Technical Email</td>
			<td class="data"><?php echo e($project->technical_email); ?></td>
		</tr>
<tr><td>&nbsp;<td></tr>
		<tr class="odd">
			<td class="title">Directory Phone Number</td>
			<td class="data"><?php echo e($project->directory_phone); ?></td>
		</tr>
		<tr class="even">
			<td class="title">Directory Address</td>
			<td class="data"><?php echo e($project->directory_address); ?></td>
		</tr>
		<tr class="odd">
			<td class="title">Directory City</td>
			<td class="data"><?php echo e($project->directory_city); ?></td>
		</tr>
		<tr class="even">
			<td class="title">Directory State</td>
			<td class="data"><?php echo e($project->directory_state); ?></td>
		</tr>
		<tr class="odd">
			<td class="title">Directory Zip</td>
			<td class="data"><?php echo e($project->directory_zip); ?></td>
		</tr>
		<tr><td>&nbsp;<td></tr>
		<tr class="even">
			<td class="title">Billing Attention</td>
			<td class="data"><?php echo e($project->billing_attention); ?></td>
		</tr>
		<tr class="odd">
			<td class="title">Billing Address</td>
			<td class="data"><?php echo e($project->billing_address); ?></td>
		</tr>
		<tr class="even">
			<td class="title">Billing City</td>
			<td class="data"><?php echo e($project->billing_city); ?></td>
		</tr>
		<tr class="odd">
			<td class="title">Billing State</td>
			<td class="data"><?php echo e($project->billing_state); ?></td>
		</tr>
		<tr class="even">
			<td class="title">Billing Zip</td>
			<td class="data"><?php echo e($project->billing_zip); ?></td>
		</tr>
<tr><td>&nbsp;<td></tr>
		<tr class="even">
			<td class="title">Building Type</td>
			<td class="data"><?php echo e($project->building_type); ?></td>
		</tr>
		<tr class="odd">
			<td class="title">Service Address</td>
			<td class="data"><?php echo e($project->service_address); ?></td>
		</tr>
		<tr class="even">
			<td class="title">Service City</td>
			<td class="data"><?php echo e($project->service_city); ?></td>
		</tr>
		<tr class="odd">
			<td class="title">Service State</td>
			<td class="data"><?php echo e($project->service_state); ?></td>
		</tr>
		<tr class="even">
			<td class="title">Service Zip</td>
			<td class="data"><?php echo e($project->service_zip); ?></td>
		</tr>
<tr><td>&nbsp;<td></tr>
		<tr class="odd">
			<td class="title">911 Address</td>
			<td class="data"><?php echo e($project->address_911); ?></td>
		</tr>
		<tr class="even">
			<td class="title">911 City</td>
			<td class="data"><?php echo e($project->city_911); ?></td>
		</tr>
		<tr class="odd">
			<td class="title">911 State/Zip</td>
			<td class="data"><?php echo e($project->state_911); ?> &nbsp; <?php echo e($project->zip_911); ?></td>
		</tr>

	</table>
<div class="page-break"></div>

<table>

		<tr class="odd">
			<td class="title">Construction Required</td>
			<td class="data"><?php echo e($project->construction_required == 1 ? 'YES' : 'NO'); ?></td>
		</tr>
		


		<tr class="even">
			<td class="title">NNI</td>
			<td class="data"><?php echo e($project->nni == 1 ? 'YES' : 'NO'); ?></td>
		</tr>
		
		<tr class="odd">
			<td class="title">FOC Date</td>
			<td class="data"><?php echo e($project->foc_date != '' ? date('Y-m-d', strtotime($project->foc_date)) : ''); ?></td>
		</tr>
		<tr class="even">
			<td class="title">Submit Date</td>
			<td class="data"><?php echo e($project->submit_date != '' ? date('Y-m-d', strtotime($project->submit_date)) : ''); ?></td>
		</tr>
		<tr class="odd">
			<td class="title">PON</td>
			<td class="data"><?php echo e($project->pon); ?></td>
		</tr>
		<tr class="even">
			<td class="title">LOA/CFA</td>
			<td class="data"><?php echo e($project->loa_cfa); ?></td>
		</tr>
		
		<tr class="odd">
			<td class="title">Serving Office</td>
			<td class="data"><?php echo e($project->serving_office); ?></td>
		</tr>
		<tr class="even">
			<td class="title">Fiber Port</td>
			<td class="data"><?php echo e($project->fiber_port); ?></td>
		</tr>
		

		<tr class="odd">
			<td class="title">Work Order #</td>
			<td class="data"><?php echo e($project->work_order); ?></td>
		</tr>
		<tr class="even">
			<td class="title">Account #</td>
			<td class="data"><?php echo e($project->account_num); ?></td>
		</tr>
		<tr class="odd">
			<td class="title">Circuit #</td>
			<td class="data"><?php echo e($project->circuit_num); ?></td>
		</tr>

		<tr class="even">
			<td class="title">Rack Size</td>
			<td class="data"><?php echo e($project->rack_size); ?></td>
		</tr>
		<tr class="odd">
			<td class="title">Power Requirements</td>
			<td class="data"><?php echo e($project->power_requirements); ?></td>
		</tr>
		<tr class="even">
			<td class="title">Keycards Needed</td>
			<td class="data"><?php echo e($project->keycards); ?></td>
		</tr>
	</table>
	
	<?php if(count($constructions) > 0): ?>
	<div class="page-break"></div>
	
	<h3>Construction</h3>
	<hr>
	<table style="width: 700px;" >
		<tr>
				<td class="table-heading">Location</td>
         		<td class="table-heading">Contact</td>
         		<td class="table-heading">Phone</td>
         		<td class="table-heading">Email</td>
         		<td class="table-heading">Estimate</td>
		</tr>
	<?php $count = 1; $est_total = 0; ?>
	<?php foreach($constructions as $construction): ?>
	<?php $count++; ?>
			
		 <?php if($count % 2 == 1): ?>
              <tr class="odd">
         <?php else: ?>
              <tr class="even">
         <?php endif; ?>
         		<td><?php echo e($construction->construction_location); ?></td>
         		<td><?php echo e($construction->building_contact); ?></td>
         		<td><?php echo e($construction->building_phone); ?></td>
         		<td><?php echo e($construction->building_email); ?></td>
         		<td>$<?php echo e($construction->construction_build_estimate); ?></td>
		
		<?php 
		$est_total += $construction->construction_build_estimate;

		?>
		
	<?php endforeach; ?>
	<?php $count++; ?>
	<?php if($count % 2 == 1): ?>
              <tr class="odd">
    <?php else: ?>
              <tr class="even">
    <?php endif; ?>
				<td class="table-heading">Total</td>
         		<td class="table-heading"></td>
         		<td class="table-heading"></td>
         		<td class="table-heading"></td>
         		<td class="table-heading">$<?php echo e($est_total); ?></td>
			  </tr>
	</table>
	
	<?php endif; ?>
	
	<?php if(count($nnis) > 0): ?>
	<div class="page-break"></div>
	
	<h3>NNI</h3>
	<hr>
	<table style="width: 700px;" >
		<tr>
				<td class="table-heading">Service Address</td>
         		<td class="table-heading">Carrier</td>

         		<td class="table-heading">MRC COGS</td>
         		<td class="table-heading">NRC COGS</td>
		</tr>
	<?php $count = 1; $nrcC_total = 0; $mrcC_total = 0;?>
	<?php foreach($nnis as $nni): ?>
	<?php $count++; ?>
			
		 <?php if($count % 2 == 1): ?>
              <tr class="odd">
         <?php else: ?>
              <tr class="even">
         <?php endif; ?>
         		<td><?php echo e($nni->nni_service_address); ?></td>
         		<td><?php echo e($nni->nni_carrier); ?></td>
         		<td>$<?php echo e($nni->mrc_cogs); ?></td>
         		<td>$<?php echo e($nni->nrc_cogs); ?></td>

		
		<?php 
		$mrcC_total += $nni->mrc_cogs;
		$nrcC_total += $nni->nrc_cogs; 
		?>
		
	<?php endforeach; ?>
	<?php $count++; ?>
	<?php if($count % 2 == 1): ?>
              <tr class="odd">
    <?php else: ?>
              <tr class="even">
    <?php endif; ?>
				<td class="table-heading">Totals</td>
         		<td class="table-heading"></td>
         		<td class="table-heading">$<?php echo e($mrcC_total); ?></td>
         		<td class="table-heading">$<?php echo e($nrcC_total); ?></td>
			  </tr>
	</table>	
	<?php endif; ?>
	<div class="page-break"></div>
	
	<h3>Products</h3>
	<hr>
	<table style="width: 700px;" >
		<tr>
				<td class="table-heading">Name</td>
         		<td class="table-heading">USP</td>
         		<td class="table-heading">GL</td>
         		<td class="table-heading">Quantity</td>
         		<td class="table-heading">Unit Price</td>
         		<td class="table-heading">MRC</td>
         		<td class="table-heading">NRC</td>
		</tr>
	<?php $count = 1; $nrc_total = 0; $mrc_total = 0;?>
	<?php foreach($products as $product): ?>
	<?php $count++; ?>
			
		 <?php if($count % 2 == 1): ?>
              <tr class="odd">
         <?php else: ?>
              <tr class="even">
         <?php endif; ?>
         		<td><?php echo e($product->name); ?></td>
         		<td><?php echo e($product->usp); ?></td>
         		<td><?php echo e($product->gl); ?></td>
         		<td><?php echo e($product->quantity); ?></td>
         		<td>$<?php echo e($product->unit_price); ?></td>
         		<td>$<?php echo e($product->mrc); ?></td>
         		<td>$<?php echo e($product->nrc); ?></td>
		
		<?php 
		$mrc_total += $product->mrc;
		$nrc_total += $product->nrc; 
		?>
		
	<?php endforeach; ?>
	<?php $count++; ?>
	<?php if($count % 2 == 1): ?>
              <tr class="odd">
    <?php else: ?>
              <tr class="even">
    <?php endif; ?>
				<td class="table-heading">Totals</td>
         		<td class="table-heading"></td>
         		<td class="table-heading"></td>
         		<td class="table-heading"></td>
         		<td class="table-heading"></td>
         		<td class="table-heading">$<?php echo e($mrc_total); ?></td>
         		<td class="table-heading">$<?php echo e($nrc_total); ?></td>
			  </tr>
	</table>
	<div class="page-break"></div>
	
	<h3>Notes and Attachments</h3>
	<hr>
	
	<?php foreach($notes as $note): ?>
							
	<?php $note['isNote'] = array_key_exists('note', $note) ? true : false; ?>
	<br>

		<div>
			<div style="background-color: <?php echo e($note['isNote'] ? '#d6e7f5' : '#d5ddf6'); ?>; border-top-left-radius: 10px; border-top-right-radius: 10px; border-bottom-left-radius: 1px; padding-left: 5px;">
				<h5>
					<?php echo e($note['user']); ?> @ <?php echo e(date('g:i:s A - F j, Y', strtotime($note['created_at']))); ?> - <i><?php echo e($team_object->find($note['team'])->name); ?></i>
				</h5>
			</div>
			<div style="background-color: <?php echo e($note['isNote'] ? '#eaf3fa' : '#eaeefb'); ?>; padding-left: 5px;">
					<?php if($note['isNote']): ?>
					<?php echo e($note['note']); ?>

					<?php else: ?>
					<a href="http://centracom.com/uadmin/projects/attachment/<?php echo e($note['id']); ?>" target="_blank"><?php echo e($note['file']); ?></a>
					<?php endif; ?>
			</div>
		</div>

	
	<?php endforeach; ?>
	
	<div class="page-break"></div>
	
	<h3>Progression</h3>
	<hr>
	
	<table>
		<tr>
			<th>Team
			<th>Completed At
			<th>Completed By
		</tr>
		<?php $count_p = 1; ?>
	<?php foreach($progression as $ind): ?>
		<?php $count_p++; ?>
			<?php if($count_p % 2 == 1): ?>
	              <tr class="odd">
	   		<?php else: ?>
	              <tr class="even">
	    	<?php endif; ?>
			<td>
				<?php echo e(\App\Team::find($ind->team)->name); ?>

			</td>
			<td>
				<?php echo e($ind->completed_date ? $ind->completed_date : '-'); ?>

			</td>
			<td>
				<?php echo e($ind->completed_by ? $ind->completed_by : '-'); ?>

			</td>
		</tr>
		
	<?php endforeach; ?>
	
	</table>
	
<?php $__env->stopSection(); ?>

<?php $__env->startSection('extras'); ?>
	
	<style>
		tr {
			
		}
		td {
			
			
		}
		.even {
			background-color: #eee;
		}
		.odd {
		
		}
		.title {
			font-weight: 600;
			width: 239px;
		}
		.data {
			width: 455px;
		}
		.page-break {
    		page-break-after: always;
		}
		.table-heading {
			font-weight: 600;
			
		}
	</style>
	
<?php $__env->stopSection(); ?>



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