@extends('backend.header')
@section('index-content')
<style>
.panel-actions{
right: 10px;
position: absolute;
top: 9px;
}
</style>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js"></script>

<section role="main" class="content-body">
<header class="page-header">

<h2>District Form</h2>
	
</header>
<div class="row">
	<div class="col-xs-12">
		<div class="">
			<ol class="breadcrumbs">
				<li>
					<a href="{{url('index')}}">
						<i class="fa fa-home"></i>
					</a>
				</li>
				<li><a href="" class="active">Form</a></li>
				<li><span class="active">District</span></li>
			</ol>
		</div>
	</div>
</div>

<!-- start: page -->
<div class="row">
	<div class="col-md-12">
		<form action="{{url('inward_update')}}/{{$inward->id}}" method="post" enctype="multipart/form-data">
		@csrf

	  <div class="form-group">
			<div class="row">
				<div class="col-md-6">
					<h4 class="mb-1">Jilla Name</h4>
					<select name="jilla_id" class="h40 w-100" id="jilla_id" required>
						<option value="">Select Jilla</option>
						@foreach($jilla as $j)
						<option value="{{$j->id}}" @if($inward->jilla_id==$j->id) Selected @endif>{{$j->area_name}}</option>
						@endforeach
					</select>
				</div>
				<div class="col-md-6">
					<h4 class="mb-1">Make Name</h4>
					<select name="maker_name" class="h40 w-100" required>
						<option value="">Select Make </option>
						@foreach($makeslist as $make)
						<option value="{{$make->name}}" @if($inward->maker_name==$make->name) Selected @endif>{{$make->name}}</option>
						@endforeach
					</select>
				</div>
			</div>
			<!-- <div class="row">
				<div class="col-md-6">
				<label class="mb-1">invoice_number</label>
				<input type="text" class="form-control" name="invoice_number" value="{{$inward->invoice_number}}"  />
				</div>

			</div> -->


			
		<table class="table table-bordered mb-0">
			<!-------Wattage of light------->
			<thead>
				<tr style="background-color: #f6f6f6;">
				   <th>Wattage of light</th>
				   <th>18w</th>
				   <th>35w</th>
				   <th>70w</th>
				   <th>110w</th>
				   <th>190w</th>
			   </tr>
		   </thead>
		   <tbody>
				<tr>              
					<td>Invoice&nbsp;quantity</td>
					<td>
						<input type="text" class="form-control wattage" data-wat="18" name="led_wattage_18" id="led_wattage_18" value="{{$inward->led_wattage_18??0}}"   /></td>
					<td>
						<input type="text" class="form-control wattage" data-wat="35" name="led_wattage_35"  id="led_wattage_35" value="{{$inward->led_wattage_35??0}}"   />
					</td>
					<td>
						<input type="text" class="form-control wattage" data-wat="70" name="led_wattage_70" id="led_wattage_70" value="{{$inward->led_wattage_70??0}}"  />
					</td>
					<td>
						<input type="text" class="form-control wattage" data-wat="110" name="led_wattage_110" id="location" value="{{$inward->led_wattage_110??0}}"  />
					</td>
					<td>
						<input type="text" class="form-control wattage" data-wat="190" name="led_wattage_190" id="road_width" value="{{$inward->led_wattage_190??0}}"  />
					</td>
				</tr>
				<tr>              
					<td>Received&nbsp;quantity</td>
					<td>
						<input type="text" class="form-control rcv_wattage" name="rcv_qty_18w" id="rcv_qty_18w" value="{{$inward->rcv_qty_18w??0}}"   /></td>
					<td>
						<input type="text" class="form-control rcv_wattage" name="rcv_qty_35w" id="rcv_qty_35w" value="{{$inward->rcv_qty_35w??0}}"   />
					</td>
					<td>
						<input type="text" class="form-control rcv_wattage" name="rcv_qty_70w" id="rcv_qty_70w" value="{{$inward->rcv_qty_70w??0}}" />
					</td>
					<td>
						<input type="text" class="form-control rcv_wattage" name="rcv_qty_110w" id="rcv_qty_110w" value="{{$inward->rcv_qty_110w??0}}" />
					</td>
					<td>
						<input type="text" class="form-control rcv_wattage" name="rcv_qty_190w" id="rcv_qty_190w" value="{{$inward->rcv_qty_190w??0}}"  />
					</td>
				</tr>
			<!-------Wattage of light------->
			
			<!-------Spare light Wattage------->
			<thead>
				<tr style="background-color: #f6f6f6;">
				   <th>Spare light Wattage</th>
				   <th>18w</th>
				   <th>35w</th>
				   <th>70w</th>
				   <th>110w</th>
				   <th>190w</th>
			   </tr>
		   </thead>
		   <tbody>
				<tr>              
					<td>Invoice&nbsp;quantity</td>
					<td>
						<input type="text" class="form-control spare_wattage" data-wat="18" name="bufferstck_invoice_qty_18w" id="bufferstck_invoice_qty_18w" value="{{$inward->bufferstck_invoice_qty_18w??0}}"  /></td>
					<td>
						<input type="text" class="form-control spare_wattage" data-wat="35" name="bufferstck_invoice_qty_35w"  value="{{$inward->bufferstck_invoice_qty_35w??0}}"   />
					</td>
					<td>
						<input type="text" class="form-control spare_wattage" data-wat="70" name="bufferstck_invoice_qty_70w" id="bufferstck_invoice_qty_70w" value="{{$inward->bufferstck_invoice_qty_70w??0}}"  />
					</td>
					<td>
						<input type="text" class="form-control spare_wattage" data-wat="110" name="bufferstck_invoice_qty_110w"  value="{{$inward->bufferstck_invoice_qty_110w??0}}"  />
					</td>
					<td>
						<input type="text" class="form-control spare_wattage" data-wat="190" name="bufferstck_invoice_qty_190w"  value="{{$inward->bufferstck_invoice_qty_190w??0}}"  />
					</td>
				</tr>
			<tr>              
				<td>Received&nbsp;quantity</td>
				<td>
					<input type="text" class="form-control spare_wattage_rev" name="bufferstck_received_qty_18w" id="bufferstck_received_qty_18w" value="{{$inward->bufferstck_received_qty_18w??0}}"   /></td>
				<td>
					<input type="text" class="form-control spare_wattage_rev" id="bufferstck_received_qty_35w" name="bufferstck_received_qty_35w"  value="{{$inward->bufferstck_received_qty_35w??0}}"  />
				</td>
				<td>
					<input type="text" class="form-control spare_wattage_rev" id="bufferstck_received_qty_70w" name="bufferstck_received_qty_70w"  value="{{$inward->bufferstck_received_qty_70w??0}}"  />
				</td>
				<td>
					<input type="text" class="form-control spare_wattage_rev" id="bufferstck_received_qty_110w" name="bufferstck_received_qty_110w" value="{{$inward->bufferstck_received_qty_110w??0}}"  />
				</td>
				<td>
					<input type="text" class="form-control spare_wattage_rev" id="bufferstck_received_qty_190w"  name="bufferstck_received_qty_190w"  value="{{$inward->bufferstck_received_qty_190w??0}}"  />
				</td>
			</tr>
		<!-------Spare light Wattage------->
		<!-------Wattage of Driver------->
			<thead>
				<tr style="background-color: #f6f6f6;">
				   <th>Wattage of Driver</th>
				   <th>18w</th>
				   <th>35w</th>
				   <th>70w</th>
				   <th>110w</th>
				   <th>190w</th>
			   </tr>
		   </thead>
		   <tbody>
				<tr>              
					<td>Invoice&nbsp;quantity</td>
					<td>
						<input type="text" class="form-control driver_wattage" data-wat="18" name="drivers_invoice_qty_18w" id="drivers_invoice_qty_18w" value="{{$inward->drivers_invoice_qty_18w??0}}"   /></td>
					<td>
						<input type="text" class="form-control driver_wattage" data-wat="35" name="drivers_invoice_qty_35w"  value="{{$inward->drivers_invoice_qty_35w??0}}"   />
					</td>
					<td>
						<input type="text" class="form-control driver_wattage" data-wat="70" name="drivers_invoice_qty_70w" id="drivers_invoice_qty_70w" value="{{$inward->drivers_invoice_qty_70w??0}}"  />
					</td>
					<td>
						<input type="text" class="form-control driver_wattage" data-wat="110" name="drivers_invoice_qty_110w" id="drivers_invoice_qty_110w" value="{{$inward->drivers_invoice_qty_110w??0}}"  />
					</td>
					<td>
						<input type="text" class="form-control driver_wattage" data-wat="190" name="drivers_invoice_qty_190w" id="drivers_invoice_qty_190w" value="{{$inward->drivers_invoice_qty_190w??0}}"  />
					</td>
				</tr>
				<tr>              
				<td>Received&nbsp;quantity</td>
				<td>
					<input type="text" class="form-control driver_wattage_rev" name="drivers_received_qty_18w" id="drivers_received_qty_18w" value="{{$inward->drivers_received_qty_18w??0}}"   /></td>
				<td>
					<input type="text" class="form-control driver_wattage_rev" name="drivers_received_qty_35w" id="drivers_received_qty_35w"  value="{{$inward->drivers_received_qty_35w??0}}"   />
				</td>
				<td>
					<input type="text" class="form-control driver_wattage_rev" name="drivers_received_qty_70w" id="drivers_received_qty_70w" value="{{$inward->drivers_received_qty_70w??0}}"  />
				</td>
				<td>
					<input type="text" class="form-control driver_wattage_rev" name="drivers_received_qty_110w" id="drivers_received_qty_110w" value="{{$inward->drivers_received_qty_110w??0}}"  />
				</td>
				<td>
					<input type="text" class="form-control driver_wattage_rev" name="drivers_received_qty_190w" id="drivers_received_qty_190w" value="{{$inward->drivers_received_qty_190w??0}}"  />
				</td>
			</tr>
		
			</tbody>
			<!-------Wattage of Driver------->
			<!------Wattage of SPD--->
			<thead>
				<tr style="background-color: #f6f6f6;">
				   <th>Wattage of SPD</th>
				   <th>18w</th>
				   <th>35w</th>
				   <th>70w</th>
				   <th>110w</th>
				   <th>190w</th>
			   </tr>
		   </thead>
		   <tbody>
				<tr>              
					<td>Invoice&nbsp;quantity</td>
					<td>
						<input type="text" class="form-control spd_wattage" data-wat="18" name="spd_invoice_qty_18w" id="spd_invoice_qty_18w" value="{{$inward->spd_invoice_qty_18w??0}}"   /></td>
					<td>
						<input type="text" class="form-control spd_wattage" data-wat="35" name="spd_invoice_qty_35w"  value="{{$inward->spd_invoice_qty_35w??0}}"   />
					</td>
					<td>
						<input type="text" class="form-control spd_wattage" data-wat="70" name="spd_invoice_qty_70w" id="spd_invoice_qty_70w" value="{{$inward->spd_invoice_qty_70w??0}}"  />
					</td>
					<td>
						<input type="text" class="form-control spd_wattage" data-wat="110" name="spd_invoice_qty_110w" id="spd_invoice_qty_110w" value="{{$inward->spd_invoice_qty_110w??0}}"  />
					</td>
					<td>
						<input type="text" class="form-control spd_wattage" data-wat="190" name="spd_invoice_qty_190w" id="spd_invoice_qty_190w" value="{{$inward->spd_invoice_qty_190w??0}}"  />
					</td>
				</tr>
				<tr>              
				<td>Received&nbsp;quantity</td>
				<td>
					<input type="text" class="form-control spd_wattage_rev" name="spd_received_qty_18w" id="spd_received_qty_18w" value="{{$inward->spd_received_qty_18w??0}}"   /></td>
				<td>
					<input type="text" class="form-control spd_wattage_rev" name="spd_received_qty_35w" id="spd_received_qty_35w"  value="{{$inward->spd_received_qty_35w??0}}"   />
				</td>
				<td>
					<input type="text" class="form-control spd_wattage_rev" name="spd_received_qty_70w" id="spd_received_qty_70w" value="{{$inward->spd_received_qty_70w??0}}"  />
				</td>
				<td>
					<input type="text" class="form-control spd_wattage_rev" name="spd_received_qty_110w" id="spd_received_qty_110w" value="{{$inward->spd_received_qty_110w??0}}"  />
				</td>
				<td>
					<input type="text" class="form-control spd_wattage_rev" name="spd_received_qty_190w" id="spd_received_qty_190w" value="{{$inward->spd_received_qty_190w??0}}"  />
				</td>
			</tr>
		
			</tbody>
			<!------Wattage of SPD--->
			<thead>
				<tr style="background-color: #f6f6f6;">
				   <th>Tiltable adapters</th>
				   <th colspan="5"></th>
				  
			   </tr>
		   </thead>
		    <tbody>
				<tr>              
					<td>Invoice&nbsp;quantity</td>
					<td colspan="5">
						<input type="text" class="form-control" name=
						"tiltable_adapters" id="tiltable_adapters" value="{{$inward->tiltable_adapters??0}}"   /></td>
					
				</tr>
				<tr>              
				<td>Received&nbsp;quantity</td>
				<td colspan="5">
					<input type="text" class="form-control"  name="tiltadap_rcv_qty" id="tiltadap_rcv_qty" value="{{$inward->tiltadap_rcv_qty??0}}"   /></td>
				
			</tr>
		
			</tbody>
		</table>
			

		 <div class="form-group">
		 <div class="row">
			
				<!-- <label for="ticket">NO.OF Drivers :</label>
				<input type="text" class="form-control" name="num_drivers" id="num_drivers" value="{{$inward->led_wattage_18??0}}"   />
			</div>
			<div class='col-md-4'>
				<label for="value">No.OF Spd : </label>
				<input type="text" class="form-control" name="num_spd"  value="{{$inward->num_spd??0}}"   />
			</div>
			<div class='col-md-4'>
				<label for="stock_name">Tiltable Adapters</label>
				<input type="text" class="form-control" name="tiltable_adapters" id="tiltable_adapters" value="{{$inward->tiltable_adapters??0}}"  />
			</div> -->

			<div class='col-md-4'>
				<label for="stock_name">Invoice_number</label>
				<input type="text" class="form-control" name="invoice_number" value="{{$inward->invoice_number}}"  />
			</div>
		

			<div class='col-md-4'>
				<h4 class="mb-1">Invoice Date </h4>
				<input class="form-control" type="date" name="invoice_date" value="{{$inward->invoice_date}}">
			</div> 
			<div class='col-md-4'>
				<h4 class="mb-1">Received Date </h4>
				<input class="form-control" type="date" name="date_of_receiving" value="{{$inward->date_of_receiving}}">
			</div> 
			
			</div>	
		
		 <div class="row">
		 		<div class='col-md-4'>
				<label class="mb-1">Uploaded file</label>
				<input type="text"  class="form-control" value="{{$inward->files}}"  />

		      </div>
		 	<div class='col-md-4'>
				<h4 class="mb-1">New File Upload</h4>
				<input type="file" name="files"  value="{{$inward->files}}" class="form-control">
			</div>
			<div class='col-md-4'>
				<label class="mb-1">Remarks</label>
				<input type="text" class="form-control" name="remarks" value="{{$inward->remarks}}"  />

		      </div>	
		</div> 
		</div>  
		 <div class="modal-footer px-0 border-top-0">
			<button type="submit" class="btn btn-primary">Save changes</button>
		</div>
	
	
</div>
<!-- end: page -->
</section>

@stop