<style>
th,td {
  vertical-align: middle !important;
  font-size: 11px !important;
}

th.dt-body-center,
	td.dt-body-center {
  text-align: center !important;
  vertical-align: middle !important;
}

.table-scrollable .dataTable td>.btn-group, .table-scrollable .dataTable th>.btn-group {
  position: absolute;
  margin-top: -10px;
}

.dataTables_empty {
  text-align: center !important;
}

.dropdown-menu {
  min-width: 10px !important;
}

.sent {
  color: #F1C40F;
  font-weight: 700;
}
</style>
<!--<h1 class="page-title"> Company Settings
	</h1>-->
<div class="row">
	<div class="col-md-12">
		<div class="portlet box blue-hoki">
			<div class="portlet-title">
				<div class="caption">
					<i class="fa fa-cogs"></i><strong>Delivery Arrangement Status</strong> 
				</div>
				<div class="actions">				
					<a class="btn white btn-circle btn-outline pull-right" href="#form_add" data-toggle="modal"> 
					Add New <i class="fa fa-plus"></i> 
					</a>					
				</div>
			</div>
			<div class="portlet-body">
				<table class="table table-striped table-bordered table-hover" id="delivery-arrangements">
					<thead>
						<tr role="row" class="heading">
							<th>Date</th>
							<th>Delivery Details</th>
							<th>Marking No</th>
							<th>Shipment No</th>
							<th>Customer Details</th>
							<th>Container No</th>
							<th>Status</th>
							<th style="padding-right: 30px;">Actions</th>
						</tr>
					</thead>
				</table>
			</div>
		</div>
	</div>
</div>
<div class="modal fade modal-scroll bs-modal-lg  in" id="form_add" role="basic" aria-hidden="true">
	<div class="modal-dialog  modal-lg">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button>
				<h4 class="modal-title">Delivery Arrangement</h4>
			</div>
			<div class="modal-body form"  id="form_wizard_1">
			<?php if($_SESSION['company_id'] <> 0 && getDAOrderSelectionCount() > 0){?>
				<div class="row">
					<form class="form-horizontal" id="submit_form">
						<div class="form-wizard">
							<div class="form-body">
								<ul class="nav nav-pills nav-justified steps">
									<li>
										<a href="#ttab1" data-toggle="tab" class="step">
										<span class="number"> 1 </span>
										<span class="desc">
										<i class="fa fa-check"></i> Delivery Details </span>
										</a>
									</li>
									<li>
										<a href="#ttab2" data-toggle="tab" class="step">
										<span class="number"> 2 </span>
										<span class="desc">
										<i class="fa fa-check"></i> Consolidation </span>
										</a>
									</li>
								</ul>
								<div id="bar" class="progress progress-striped" role="progressbar">
									<div class="progress-bar progress-bar-success"> </div>
								</div>
								<div class="tab-content">
									<div class="tab-pane active" id="ttab1">
										<h3 class="block">Delivery Arrangement Details</h3>
										<div class="row">
											<div class="col-md-12">
												<div class="col-md-12">
													<div class="form-group">
														<label class="control-label col-md-2">Delivery Type</label>
														<div class="col-md-10">
															<select class="form-control" id="delivery_type" name="delivery_type">
																<option value="">Please Select your Delivery Type</option>
																<option value="1">Inhouse Services</option>
																<option value="2">Courier Services</option>
																<option value="3">Outsource Services</option>
																<option value="4">Self Collect</option>
															</select>
														</div>
													</div>
												</div>
												<div id="own_transport" style="display:none;">
													<h5 class="block">Driver Details</h5>
													<div class="row">
														<div class="col-md-12">
															<div class="col-md-6">
																<div class="form-group">
																	<label class="control-label col-md-4">Delivery Date</label>
																	<div class="col-md-8">
																		<input class="form-control date-picker" id="delivery_date" name="delivery_date" type="text">
																	</div>
																</div>
																<div class="form-group">
																	<label class="control-label col-md-4">Driver Name</label>
																	<div class="col-md-8">
																		<input class="form-control" id="driver_contact_person" name="driver_contact_person" type="text">
																	</div>
																</div>
															</div>
															<div class="col-md-6">
																<div class="form-group">
																	<label class="control-label col-md-4">Driver Contact</label>
																	<div class="col-md-8">
																		<input class="form-control" id="driver_contact_person_no" name="driver_contact_person_no" type="text">
																	</div>
																</div>
																<div class="form-group">
																	<label class="control-label col-md-4">Vehicle No</label>
																	<div class="col-md-8">
																		<input class="form-control" id="vehicle_no" name="vehicle_no" type="text">
																	</div>
																</div>
															</div>
														</div>
													</div>
												</div>
												<div id="courier" style="display:none;">
													<h5 class="block">Courier Details</h5>
													<div class="row">
														<div class="col-md-12">
															<div class="col-md-6">
																<div class="form-group">
																	<label class="control-label col-md-4">Courier Service Name</label>
																	<div class="col-md-8">
																		<input class="form-control" id="courier_service_name" name="courier_service_name" type="text">
																	</div>
																</div>
																<div class="form-group">
																	<label class="control-label col-md-4">Tracking No</label>
																	<div class="col-md-8">
																		<input class="form-control" id="tracking_no" name="tracking_no" type="text">
																	</div>
																</div>
															</div>
														</div>
													</div>
												</div>
												<div id="self_collect" style="display:none;">
													<h5 class="block">Self Collect Details</h5>
													<div class="row">
														<div class="col-md-12">
															<div class="col-md-6">
																<div class="form-group">
																	<label class="control-label col-md-4">Warehouse</label>
																	<div class="col-md-8">
																		<select class="form-control" id="warehouse_id" name="warehouse_id">
																		<?php echo getWarehouseDelivery(); ?>
																		</select>
																	</div>
																</div>
																<div class="form-group">
																	<label class="control-label col-md-4">City</label>
																	<div class="col-md-8">
																		<input class="form-control" id="warehouse_city" name="warehouse_city" type="text">
																	</div>
																</div>
																<div class="form-group">
																	<label class="control-label col-md-4">State</label>
																	<div class="col-md-8">
																		<input class="form-control" id="warehouse_state" name="warehouse_state" type="text">
																	</div>
																</div>
																<div class="form-group">
																	<label class="control-label col-md-4">Contact Person Name</label>
																	<div class="col-md-8">
																		<input class="form-control" id="warehouse_contact_person" name="warehouse_contact_person" type="text">
																	</div>
																</div>
															</div>
															<div class="col-md-6">
																<div class="form-group">
																	<label class="control-label col-md-4">Address</label>
																	<div class="col-md-8">
																		<textarea rows="1" class="form-control" id="warehouse_address" name="warehouse_address"></textarea>
																	</div>
																</div>
																<div class="form-group">
																	<label class="control-label col-md-4">Postcode</label>
																	<div class="col-md-8">
																		<input class="form-control" id="warehouse_zip" name="warehouse_zip" type="text">
																	</div>
																</div>
																<div class="form-group">
																	<label class="control-label col-md-4">Country</label>
																	<div class="col-md-8">
																		<input class="form-control" id="warehouse_country" name="warehouse_country" type="text">
																	</div>
																</div>
																<div class="form-group">
																	<label class="control-label col-md-4">Contact Person No.</label>
																	<div class="col-md-8">
																		<input class="form-control" id="warehouse_contact_person_no" name="warehouse_contact_person_no" type="text">
																	</div>
																</div>
															</div>
														</div>
													</div>
												</div>
											</div>
										</div>
									</div>
									<div class="tab-pane" id="ttab2">
										<h3 class="block">Order Selection</h3>
										<div class="row">
											<div class="col-md-12">
												<table class="table table-striped table-hover" id="orderSelection">
													<thead>
														<tr>
															<td>ETA</td>
															<td>Shipment No</td>
															<td>Marking No</td>
															<td>Address</td>
															<td>Details</td>
															<td>Select</td>
														</tr>
													</thead>
													<tbody id="tbody">
													</tbody>
												</table>
											</div>
										</div>
									</div>
								</div>
								<div class="form-actions">
									<div class="row">
										<div class="col-md-offset-3 col-md-9">
											<a href="javascript:;" class="btn default button-previous">
											<i class="fa fa-angle-left"></i> Back </a>
											<a href="javascript:;" class="btn btn-outline green button-next"> Continue
											<i class="fa fa-angle-right"></i>
											</a>
											<a class="btn green button-submit" id="finish"> Finish!</a>
										</div>
									</div>
								</div>
							</div>
						</div>
					</form>
				</div>
				<?php }elseif($_SESSION['company_id'] <> 0 && getDAOrderSelectionCount() == 0){?>
				<center style="margin-top:70px;margin-bottom: 70px">
					There is no order created to your company. Please ask your importer to create an order to your company.
				</center>
					
				<?php }else{ ?>
				
					<center style="margin-top:70px;margin-bottom: 70px">
						Please complete your <strong><a href="/company/edit">Company Information</a></strong> to proceed.
					</center>
				<?php } ?>
			</div>
		</div>
	</div>
</div>