<div class="modal fade" id="updateModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
  <div class="modal-dialog" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <h5 class="modal-title" id="exampleModalLabel">Actualizar {{ $data['cc']->descripcion }}</h5>
        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
          <span aria-hidden="true">&times;</span>
        </button>
      </div>
      <div class="modal-body">
	        <div class="response-data">
				
			</div>
			<form action="{{ url('ccostos/'.$data['cc']->id) }}" onsubmit="updatingform(this); return false">
				<div class="row">
					<div class="col-6">
						<input type="text" class="form-control"  id="input-cont" name="codigo" value="{{$data['cc']->codigo}}"  placeholder="codigo costo" required="">
					</div>
					<div class="col-6">
						<input type="text" class="form-control"  id="input-cont" name="descripcion"  value="{{$data['cc']->descripcion}}" placeholder="descripcion" required="">
					</div>
				</div>
				<hr>
				<div class="row">
					<div class="col-6">
						<select name="cuenta1"  class="form-control dynamic_selects selectpicker update-picker" data-live-search="true" >
						    <option value=""> Seleccionar...</option>
							@if($data['cuentas']->isNotEmpty())
								@foreach ($data['cuentas'] as $c)
								    @if(strlen($c->codigo) == 7)
    									@if($data['cc']->cuenta1 == $c->codigo)
    										<option value=" {{ $data['cc']->cuenta1 }} " selected="selected">{{ $c->codigo }} || {{ $c->descripcion }}</option>
    									@else
    										<option value="{{ $c->codigo }}">{{ $c->codigo }} || {{ $c->descripcion }}</option>
    									@endif
									@endif
								@endforeach
							@endif
						</select>
					</div>
					<div class="col-6">
						<select name="cuenta2"  class="form-control dynamic_selects selectpicker update-picker" data-live-search="true" >
						    <option value=""> Seleccionar...</option>
							@if($data['cuentas']->isNotEmpty())
								@foreach ($data['cuentas'] as $c)
									@if(strlen($c->codigo) == 7)
    									@if($data['cc']->cuenta2 == $c->codigo)
    										<option value=" {{ $data['cc']->cuenta2 }} " selected="selected">{{ $c->codigo }} || {{ $c->descripcion }}</option>
    									@else
    										<option value="{{ $c->codigo }}">{{ $c->codigo }} || {{ $c->descripcion }}</option>
    									@endif
									@endif
								@endforeach
							@endif
						</select>
					</div>
				</div>
				<hr>
				<div class="row">
					<div class="col-12 text-center">
						<br>
						<button class="btn btn-primary"><i class="icon-rotate-cw2 "></i> Actualizar </button>
					</div>
				</div>
			</form>
      </div>
    </div>
  </div>
</div>
<script>$('.update-picker').selectpicker('refresh')</script>