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


<div class="content" id="content">			
	<div class="overlay"></div>			
	
<?php echo $__env->make('admin.includes.topbar', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
	
	<!-- main content -->
	<div class="main-content">


		<div class="row">
			<div class="col-md-12">


<?php if(Entrust::can('quotations_add')): ?>


			<!-- panel -->

		<div class="panel panel-piluku">
			<div class="panel-heading">
				<h3 class="panel-title">
					Add Quotation
					<span class="panel-options">
						<a href="#" class="panel-refresh">
							<i class="icon ti-reload"></i>
						</a>
						<a href="#" class="panel-minimize">
							<i class="icon ti-angle-up"></i>
						</a>
						<a href="#" class="panel-close">
							<i class="icon ti-close"></i>
						</a>
					</span>
				</h3>
			</div>

<?php if(Session::has('error')): ?>
<div class="alert bg-danger text-white">
              <?php echo Session::get('success'); ?>

            </div>

<?php endif; ?>

<?php if(Session::has('success')): ?>
<div class="alert bg-success text-white">
              <?php echo Session::get('success'); ?>

            </div>

<?php endif; ?>





			<div class="panel-body">
					<?php echo Form::open(array('route' => 'insertquotation', 'files'=>true, 'id' => 'form-a', 'class' => 'form form-horizontal')); ?>





					<div class="form-group">
						<label class="col-sm-2 control-label" for="inline-suggestions">Customer Name:</label>
						<div class="col-sm-8">
							<input name="customer_name" type="text" required class="form-control"  />
						</div>
					</div>






					<div class="form-group">
						<label class="col-sm-2 control-label" for="inline-suggestions">Customer Email:</label>
						<div class="col-sm-8">
							<input name="customer_email" type="text" required class="form-control"  />
						</div>
					</div>

					<div class="form-group">
						<label class="col-sm-2 control-label" for="inline-suggestions">Customer Phone:</label>
						<div class="col-sm-8">
							<input name="customer_phone" type="text" required class="form-control"  />
						</div>
					</div>




		
					<div class="form-group">
						<label class="col-sm-2 control-label">Hotel:</label>
						<div class="col-sm-8">
							<select class="name_search form-control" name="hotelid" data-validation="required" required data-validation-error-msg="Please make a choice">
							<?php foreach($hotels as $hotel): ?>
								<option value="<?php echo $hotel->id; ?>"><?php echo $hotel->name; ?></option>
							<?php endforeach; ?>
								
							</select>
						</div>
					</div>


					          <div class="form-group">
            <label class="col-sm-2 control-label">Currency:</label>
            <div class="col-sm-8">
              <select class="name_search form-control" name="currency" data-validation="required" required data-validation-error-msg="Please make a choice">

                <option value="MVR">MVR</option>
                <option value="USD">USD</option>

              </select>
            </div>
          </div>

          <div class="form-group">
            <label class="col-sm-2 control-label" for="inline-suggestions">Total Amount:</label>
            <div class="col-sm-8">
              <input name="total_amount" type="text" required class="form-control"  />
            </div>
          </div>


          <div class="form-group">
			          <label class="col-sm-2 control-label">Terms & Conditions:</label>
			          <div class="col-md-10">
			          <textarea id="hotelcontent" name="terms_and_conditions">
			          <h4 style="text-align: center;">TERMS & CONDITIONS</h4>
<p><strong>CANCELLATION POLICY :</strong><em>31 days to arrival: no charge / 30-21 days: 50% charge / 20-0 days: 100%</em></p>
<p><strong>VALIDITY :&nbsp;</strong><em>01 Feb 2017 - 28 Feb 2017</em></p>
<p><strong>VISA :</strong><em>Free 30-day visa on arrival</em></p>
<p><strong>CHECK IN / CHECK OUT :</strong><em>2 PM / 12 PM</em></p>
</textarea>
			          </div>
			          
			</div>






					<div class="form-group">
						<label class="col-sm-2 control-label" for="inline-suggestions">by:</label>
						<div class="col-sm-8">
							<input name="bookingid" type="text" readonly value="<?php echo Auth::user()->name; ?>"  class="form-control"  />
						</div>
					</div>







				
					





					
			<div class="form-group">
				<div class="col-sm-offset-2 col-sm-8">
					<input type="submit" class="btn btn-success">
					<input type="reset" class="btn btn-danger">
				</div>
			</div>
		</form>
	</div>
</div>
<!-- /panel -->

<?php endif; ?>


				<!-- panel -->
				<div class="panel panel-piluku panel-users">

					<div class="panel-heading">
						<h3 class="panel-title">
							List of Quotations
							<span class="panel-options">
								<a href="#" class="panel-refresh">
									<i class="icon ti-reload"></i> 
								</a>
								<a href="#" class="panel-minimize">
									<i class="icon ti-angle-up"></i> 
								</a>
								<a href="#" class="panel-close">
									<i class="icon ti-close"></i> 
								</a>
							</span>
						</h3>
					</div>
					<div class="panel-body nopadding">
						<div class="table-responsive">
							<table class="table table-hover" style="font-size: 12px;">
								<thead>
									<tr>
										
						                <th>#</th>
						                <th>Customer Email</th>
						                <th>Hotel Name</th>
						                <th>Status</th>
						                <th>By:</th>
						                <th>Created Date</th>
										<th>&nbsp;</th>
									
									</tr>
								</thead>
								<tbody>
								 <?php 
                    $count = count($quotations) + 1;
                ?>

								     <?php foreach($quotations as $quotation): ?>
								      <?php 
                     $count = $count - 1;
                     ?>
									<tr class="table-row">
								
						                <td><?php echo $count; ?></td>
						                <td><?php echo $quotation->customer_email; ?></td>
						                <td><?php echo $quotation->hotel_name; ?></td>
						                <td><?php echo $quotation->status; ?></td>
						                <td><?php echo AppHelper::getUser($quotation->user_id); ?></td>
						                <td><?php echo $quotation->created_at; ?></td>
					
						                

										<td>
							
								

										<a style="font-size: 9px;" href="<?php echo URL('admin/quotations/rooms/'); ?>/<?php echo $quotation->id; ?>" class="btn btn-orange">Rooms</a>

										<a style="font-size: 9px;" href="<?php echo URL('admin/quotations/view'); ?>/<?php echo $quotation->id; ?>" class="btn btn-success">Preview</a>

										<a  style="font-size: 9px;" href="<?php echo URL('admin/quotations/send'); ?>/<?php echo $quotation->id; ?>" class="btn btn-primary">Send</a>
										<?php if(Entrust::can('quotations_delete')): ?>
										<a style="font-size: 9px;" href="<?php echo URL('admin/quotations/delete'); ?>/<?php echo $quotation->id; ?>" class="btn btn-red"><i class="ion ion-ios-trash-outline"></i></a>
										<?php endif; ?>
								
										</td>
											
									</tr>
									<?php endforeach; ?>
									
								</tbody>
							</table>
						</div>
					</div>
				</div>
				<!-- /panel -->
			</div>
		</div>
		<div class="row">
			<div class="col-md-12">
				<ul class="pagination small-pagination pull-right">
					
				</ul>
			</div>
		</div>
	</div>
	<!-- /main content -->		

</div>  
<?php $__env->stopSection(); ?>
<?php echo $__env->make('admin.master', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>