
<?php require('include/header.php');?>

   <?php require('include/sidenav.php');?>

   
    <!-- BEGIN: Content-->
    <div class="app-content content">
      <div class="content-overlay"></div>
      <div class="content-wrapper">
        <div class="content-header row">
          <div class="content-header-left col-md-12 col-12 mb-2 breadcrumb-new">
            <h3 class="content-header-title mb-0 d-inline-block">Customer Update</h3>
            <div class="row breadcrumbs-top d-inline-block">
              <div class="breadcrumb-wrapper col-12">
                <ol class="breadcrumb">
                  <li class="breadcrumb-item"><a href="index-2.html">Home</a>
                  </li>
                  <li class="breadcrumb-item"><a href="#">Customer</a>
                  </li>
                  <li class="breadcrumb-item active">Customer Update
                  </li>
                </ol>
              </div>
            </div>
          </div>
          
        </div>
        <div class="content-body"><!-- Basic form layout section start -->
<section id="basic-form-layouts">
	



	<div class="row justify-content-md-center">
		<div class="col-md-12">
			<div class="card">
				<div class="card-header">
					<h4 class="card-title" id="basic-layout-form-center">Customer Update</h4>
					<a class="heading-elements-toggle"><i class="la la-ellipsis-v font-medium-3"></i></a>
					<div class="heading-elements">
						<ul class="list-inline mb-0">
							<li><a data-action="collapse"><i class="ft-minus"></i></a></li>
							<li><a data-action="reload"><i class="ft-rotate-cw"></i></a></li>
							<li><a data-action="expand"><i class="ft-maximize"></i></a></li>
							<li><a data-action="close"><i class="ft-x"></i></a></li>
						</ul>
					</div>
				</div>
				<div class="card-content collapse show">
					<div class="card-body">
						<form class="form" action="<?php echo site_url('User/updateCustomer'); ?>" method="POST" autocomplete="off">
							<?php foreach($customer as $cust) ?>
							<div class="row justify-content-md-center">
								<div class="col-md-6">
									<div class="form-body">
										<div class="form-group">
											<label for="eventInput1">Customer Name</label>
											<select name="branch_id" id="branch_id" class="select2 form-control" >
												<option value="">Select Username</option>
												<?php foreach($username as $row)
													{
											    ?>
											    <option <?php if($row->branch_id == $cust->out_branch_id) echo 'selected="selected"'; ?> value="<?php echo $row->branch_id; ?>"><?php echo $row->username; ?></option>
											<?php
													}
												?>
											</select>
											<input type="hidden" id="uname" name="uname" value="<?php echo $cust->username; ?>" class="form-control" >
											<input type="hidden" id="cust_id" name="cust_id" value="<?php echo $cust->cust_id; ?>" class="form-control" >
										</div>
									</div>
								</div>
								<div class="col-md-6">
									<div class="form-body">
										<div class="form-group">
											<label for="eventInput1">Customer Name</label>
											<input type="text" id="cust_name" name="cust_name" value="<?php echo $cust->cust_name; ?>" class="form-control" placeholder="Customer Name" >
										</div>
									</div>
								</div>
							</div>
							<div class="form-actions text-right">
								<button type="reset" class="btn btn-warning mr-1">
									<i class="ft-x"></i> Reset
								</button>
								<button type="submit" class="btn btn-primary">
									<i class="la la-check-square-o"></i> Update
								</button>
							</div>
						</form>	

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

</section>
<!-- // Basic form layout section end -->
        </div>
      </div>
    </div>
    <!-- END: Content-->


   <?php //require('include/theme_customizer.php');?>

   <?php require('include/footer.php');?>
    
    <script>
		$("#branch_id").change(function (){
			var uname = $(this).find("option:selected").text();
			$("#uname").val(uname);
		});
	</script>
  

  </body>
  <!-- END: Body-->

<!-- Mirrored from pixinvent.com/modern-admin-clean-bootstrap-4-dashboard-html-template/html/ltr/vertical-modern-menu-template/form-layout-basic.html by HTTrack Website Copier/3.x [XR&CO'2014], Mon, 27 Apr 2020 09:38:02 GMT -->
</html>