<html>
    <head>
        <title>
          DIC Installation Report
        </title>

   <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.0.0/dist/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">

   
   <script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
   <script src="https://cdn.jsdelivr.net/npm/popper.js@1.12.9/dist/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
   <script src="https://cdn.jsdelivr.net/npm/bootstrap@4.0.0/dist/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>

  <!-- <script src="https://code.jquery.com/ui/1.13.2/jquery-ui.js"></script> -->
<style>
    body{
        font-family: 'Times New Roman';
        font-size: 20px;
    }
    @media print {
        @page {
            size: A3 landscape;
        }
        .print_action {
            display: none;
        }
        .page-break {
            page-break-after: always !important;
        }
    }

    .btn-primary,
    .btn-primary:hover {
        background-color: #008cba;
        border-color: #008cba;
    }

    .text-uppercase {
        text-transform: uppercase;
    }
    .heading {
        font-size: 16px;
        color: #000;
        font-weight: bold;
        font-family: 'Times New Roman';
    }
    .sub-heading {
        font-size: 15px;
        color: #000;
        font-weight: bold;
        font-family: 'Times New Roman';
    }
    .table-bordered td,
    .table-bordered th {
        border: 1px solid #d3d3d3;
    }
    .table td,
    .table th {
        padding: 3px;
    }
    .table td {
        vertical-align: middle;
    }
    .table td,
    .table th {
        border-top: 1px solid #000;
    }
    .table-bordered thead td,
    .table-bordered thead th {
        border-bottom-width: 1px;
    }
    .table-bordered td,
    .table-bordered th {
        border: 1px solid #000000;
    }
    .table thead th {
        border-bottom: 1px solid #000 !important;
        font-size: 17.5px !important;
    }
    /**, ::after, ::before{
        box-sizing: content-box !important;
    }*/
    .table td {
        vertical-align: bottom;
    }

     .table td, .table th {
        border-top: 1px solid #000 !important;
    }
    .table-bordered td, .table-bordered th {
        border: 1px solid #000 !important;
    }

    tbody{
        text-align: center;
    }

</style>

<script type="text/javascript">
    $(document).ready(function(){
// Activate tooltip
$('[data-toggle="tooltip"]').tooltip();
});
</script>


</head>
<body>
    <div class="container-fluid">
        <div class="row">
            <div class="col-lg-2 my-auto">
                <div>
                 <a href="{{url('dic_view')}}" id="dashboard" class="print_action btn btn-primary text-decoration-none">Back To Dashboard</a>
             </div>
         </div>

         <div class="col-6 my-auto mx-auto px-0">
             <form action="{{url('dic_installation')}}" method="get">
                @csrf
                <input type="hidden" name="jillase" value="{{$jilla}}">
                <input type="hidden" name="talukase" value="{{$taluka}}">
                <input type="hidden" name="gramse" value="{{$gram}}">
                <div class="form-inline print_action mt-3">
                  <div class="form-group my-auto">
                    <label class="print_action">Filter By Date :</label>
                </div>
                <div class="form-group ml-sm-3 mr-sm-2 my-auto">
                   <input type="text" name="from_date"  class="datepicker form-control" value="{{$request['from_date']}}" required>
               </div>
			    <?php if(isset($_GET['pedding']) && $_GET['pedding']!=""){}else{?>
               <div class="form-group mx-sm-3 my-auto">
                   
                    <select class="form-control" name="phase_no">
                        <option value="">All Phases</option>
                        @foreach($phase as $ph)
                        <option value="{{$ph->phase_no}}" @if($request['phase_no']==$ph->phase_no) Selected @endif>Phase-{{$ph->phase_no}}</option>
                        @endforeach
                    </select>
                </div>
				<?php } ?>
               <div class="form-group my-auto">
                  <button type="submit" class="btn btn-primary mr-3" class="print_action">Search</button>
                  <button onclick="window.print();return false;"  class="btn btn-info print_action" id="print">Print</button>
              </div>
          </div>
      </form>
  </div>
  <!-- <div class="col-lg-2 my-auto">
    <div class="text-right">
        <button onclick="window.print();return false;"  class="btn btn-info print_action" id="print">Print</button>
    </div>
</div> -->
</div>
</div>
<div class="container-fluid">
<div class="row">
  <div class="col-12">
    <div>
      <table class="table" border="1">
        <colgroup width="50"></colgroup>
        <colgroup width="100"></colgroup>
        <colgroup width="83"></colgroup>
        <colgroup width="99"></colgroup>
        <colgroup width="98"></colgroup>
        <colgroup width="80"></colgroup>
        <colgroup width="76"></colgroup>
        <colgroup width="70"></colgroup>
        <colgroup width="56"></colgroup>
        <colgroup width="87"></colgroup>
        <colgroup width="88"></colgroup>
        <colgroup width="87"></colgroup>
        <colgroup width="74"></colgroup>
        <colgroup width="62"></colgroup>
        <colgroup width="69"></colgroup>
        <colgroup width="98"></colgroup>
        <colgroup width="98"></colgroup>



        <thead>
            <tr class="table-primary">
                <td colspan=19 height="30" align="center" valign=middle><font size=4 class="heading">Daily Installation &amp; Verification Report</font></td>
            </tr>
            <tr class="table-success text-left">
                <td colspan=5 height="21" align="left" valign=middle><font class="heading" size=3>Name of DIC Vendor : &nbsp;&nbsp;&nbsp;</font></td>
                <td colspan=14 align="left" valign=middle><font class="heading" size=3>PMC : &nbsp;&nbsp;&nbsp;Telangana State Renewable Energy Development Corporation Ltd (TSREDCO)</font></td>
            </tr>
            <tr class="table-warning">
              <?php
              $jillaname=$jillanamesss[0];
              $talukaname=$areanamesss[0];
              $gramname=$gramnamesss[0];
              ?>

              <td colspan=2 height="22" align="left" valign=middle><font class="heading" size=3>Date : &nbsp;&nbsp;&nbsp;{{date('d-m-Y', strtotime($request['from_date']))}} </font></td>

             <td colspan=3 align="left" valign=middle><font class="heading" size=3>LED Supplier :  &nbsp;&nbsp;&nbsp;</font></td>
              <td colspan=2 align="justify" valign=middle><font class="heading" size=3>Ward No : &nbsp;&nbsp;&nbsp;</font></td>
              <td colspan=12 align="left" valign=middle><font class="heading" size=3>Name of Gram Panchayat :  &nbsp;&nbsp;&nbsp;{{$gramname}} </font></td>
          </tr>
          <tr class="table-danger">
            <td colspan=7 height="22" align="left" valign=middle><font class="heading" size=3>Mandal Name : &nbsp;&nbsp;&nbsp;{{$talukaname}}</font></td>
            <td colspan=12 align="left" valign=middle><font class="heading" size=3>District Name : &nbsp;&nbsp;&nbsp;{{$jillaname}}</font></td>
        </tr>
        <tr class="table-info">
            <td rowspan=3 height="88" align="center" valign=middle><font class="sub-heading"> Sl. No.</font></td>
            <td rowspan=3 align="center" valign=middle><font class="sub-heading"> LED Light No.</font></td>
            <td rowspan=3 align="center" valign=middle><font class="sub-heading"> Switching Point No.</font></td>
            <td rowspan=3 align="center" valign=middle><font class="sub-heading"> Pole No</font></td>
            <td rowspan=3 align="center" valign=middle><font class="sub-heading"> Location/Area<br>(with landmark)</font></td>
            <td colspan=2 align="center" valign=middle><font class="sub-heading"> GPS LOCATION</font></td>
            <td rowspan=3 align="center" valign=middle><font class="sub-heading"> LED Luminaire<br>(watts)</font></td>
            <td  rowspan=3 align="center" valign=middle><font class="sub-heading">LED Luminaire <br>(make)</font></td>
            <td colspan=3 align="center" valign=middle><font class="sub-heading"> Arm &amp; Clamps used</font></td>
            <td rowspan=3 align="center" valign=middle><font class="sub-heading"> Reducer Used</font></td>
            <td rowspan=3 align="center" valign=middle><font class="sub-heading"> Minimast Clamp Used</font></td>
            <td rowspan=3 align="center" valign=middle><font class="sub-heading"> Cable used</font></td>
            <td rowspan=3 align="center" valign=middle><font class="sub-heading"> Old Fixture</font></td>
            <td rowspan=3 align="center" valign=middle><font class="sub-heading"> Old Fixture Wattage</font></td>
            <td rowspan=3 align="center" valign=middle><font class="sub-heading"> Remarks/<br> Additional infra used (if any)</font></td>
            <td rowspan=3 align="center" valign=middle class="print_action" style="padding: 0px !important;"><font class="sub-heading"> Action</font></td>
        </tr>
        <tr class="table-info">
            <td align="center" valign=middle><font class="sub-heading">Latitude</font></td>
            <td colspan=1 align="center" valign=middle><font class="sub-heading">Longitude</font></td>


            <td align="center" class="sub-heading" valign=middle><font>25 mm Dia</font></td>
            <td colspan=1 align="center" class="sub-heading" valign=middle><font>32 mm Dia</font></td>
            <td colspan=1 align="center" class="sub-heading" valign=middle><font>40 mm Dia</font></td>
        </tr>
        <tr class="table-info">
            <td></td>
            <td></td>

            <td align="center" valign=middle><font class="sub-heading">1.2 Mt</font></td>
            <td colspan=1 align="center" valign=middle><font class="sub-heading">1.2 Mt</font></td>
            <td colspan=1 align="center" valign=middle><font class="sub-heading">1.2 Mt</font></td>
        </tr>
    </thead>
    <tbody>
     <?php
     echo "<tr> \n";
     for ($row=1; $row <= 18; $row++) { 
        echo "<td>$row</td> \n";
    }
    echo "</tr>";
    ?>
    @if(sizeof($survey_i) == "")
    <tr>

        <td colspan="17">No Data Found</td>

    </tr>
    @else

    <?php
    $count = 0;

    ?>
    @foreach($survey_i as $sur)
    <?php

    $r=$sur->types_of_arms;
    $str=explode(',',$r);
    $pole_array=explode("-",$sur->pole_num);               
    $type_of_arms=explode(",",$sur->types_of_arms);
    $location_explode=explode(",",$sur->location);

        if($sur->pole_led_wattage != "N/A" && !is_null($sur->pole_led_wattage) && $sur->pole_led_wattage != "-NA-"){
            $count++;


            ?>
            <tr >
                <!--<td>{{$sur->s_no}}</td>-->
                <td >{{$count}}</td>              
                <td >@if(isset($sur->pole_maker_name)){{str_replace(' ','',$sur->pole_maker_name)}}_{{str_replace(' ','',$sur->pole_led_wattage)}}_{{$sur->pole_led_serial_num}} @endif</td> 
                <td >{{preg_replace('/: /i', '/', $sur->switch_point)}}</td>
                <td >{{$sur->pole_num}}</td>
                <td >{{$sur->landmark??$gramname}}</td>
                <td >{{round($location_explode[0],6)}}</td>
                <td >@if(isset($location_explode[1])) {{round($location_explode[1],6)}}@endif</td>

                <td>@if(isset($sur->pole_led_wattage)){{$sur->pole_led_wattage}} @endif</td>
                <td>@if(isset($sur->pole_maker_name)){{$sur->pole_maker_name}} @endif</td>
                <td>@if(isset($sur->pole_type_of_arms))@if(str_contains($sur->pole_type_of_arms,'25mm')) Yes @endif @endif</td>
                <td>@if(isset($sur->pole_type_of_arms))@if(str_contains($sur->pole_type_of_arms,'32mm')) Yes @endif @endif</td>
                <td>@if(isset($sur->pole_type_of_arms))@if(str_contains($sur->pole_type_of_arms,'40mm')) Yes @endif @endif</td>            
                <td>{{$sur->reducer_used}}</td>
                <td>{{$sur->minimast_clamp_used}}</td>
                <td>{{$sur->cable_user}}</td>
                <td>@if(isset($sur->pole_type_of_fixture)){{$sur->pole_type_of_fixture}} @endif</td>
                <td>@if(isset($sur->pole_fixture_wattage)){{$sur->pole_fixture_wattage}} @endif</td>
                <td>{{$sur->remark}}</td>
                <td >
                    <!-- <button type="button"  class="btn btn-primary edit_dic"  data-id="{{$sur->id}}">
                      Edit
                  </button> -->
              </td>

          </tr>
      <?php   } ?>
      @endforeach
      @endif
  </tbody>



  <tfoot>

    <tr class="page-break">
        <td colspan=4 height="21" align="left" valign=middle><font size=3><br></font></td>
        <td colspan=4 align="left" valign=middle><font size=3><br></font></td>
        <td colspan=5 align="left" valign=middle><font size=3><br></font></td>

        <td colspan=5 align="left" valign=middle><font size=3><br></font></td>
    </tr>
    <tr>
        <td colspan=4 height="21" align="left" valign=middle><font size=3>Vendor&rsquo;s representative</font></td>
        <td align="left" colspan=4  valign=middle><font size=3>TSREDCO representative</font></td>
        <td align="left" colspan=5  valign=middle><font size=3>EESL&rsquo;s representative</font></td>   
        <td colspan=5 align="left" colspan=4  valign=middle><font size=3>TS PR & RD representative</font></td>
    </tr>
    <tr>
        <td colspan=4 height="27" align="left" valign=middle><font size=3>Name:</font></td>

        <td colspan=4 align="left" valign=middle><font size=3>Name:</font></td>

        <td colspan=5 align="left" valign=middle><font size=3>Name:</font></td>
        
        <td colspan=5 align="left"  valign=middle><font size=3>Name:</font></td>
    </tr>
    <tr>
        <td colspan=4 height="27" align="left" valign=middle><font size=3>Designation:</font></td>     
        <td colspan=4 align="left" valign=middle><font size=3>Designation:</font></td>        
        <td  colspan=5 align="left" valign=middle><font size=3>Designation:</font></td>               
        <td colspan=5 align="left" valign=middle><font size=3>Designation:</font></td>
    </tr>
    <tr>
        <td colspan=4 height="27" align="left" valign=middle><font size=3>Signature:</font></td>

        <td  colspan=4 align="left" valign=middle><font size=3>Signature:</font></td>

        <td colspan=5 align="left" valign=middle><font size=3>Signature:</font></td>

        <td colspan=5 align="left" valign=middle><font size=3>Signature:</font></td>
    </tr>
    <tr>
        <td colspan=4 height="20" align="left" valign=top><font><br></font></td>
        <td colspan=4 align="left" valign=middle><font size=3><br></font></td>
        <td colspan=5 align="left" valign=top><font><br></font></td>

        <td colspan=5 align="left" valign=top><font><br></font></td>
    </tr>
</tfoot>
</table>
</div>
</div>
</div>
</div>
</body>

<div class="modal fade" id="exampleModalLong" tabindex="-1" role="dialog" aria-labelledby="exampleModalLongTitle" aria-hidden="true">
  <div class="modal-dialog modal-lg" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <h5 class="modal-title" id="exampleModalLongTitle">Edit</h5>
        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
          <span aria-hidden="true">&times;</span>
      </button>
  </div>
  <div class="modal-body">
    <form action="{{url('dic_update')}}" method="post" onsubmit="return confirm('Do you really want to submit the form?');">
        @csrf



        <div class="form-group">
            <label for="ticket">Switching Point No :</label>
            <input type="text" class="form-control" name="switch_point" id="switch_point" value="" required=""  />
        </div>

        <div class="form-group">
            <label for="value">Pole Series No: </label>
            <input type="hidden" class="form-control" name="pole_serial_number" id="pole_serial_number" value=""   />
            <input type="text" class="form-control" id="old_pole" value="" readonly =""  />
        </div>
        <div class="form-group">
            <label for="value">Pole No: </label>
            <input type="text" class="form-control" name="pole_num"  value="" required=""  />
        </div>

        <div class="form-group">

            <label for="stock_name">Landmark</label>
            <input type="text" class="form-control" name="landmark" id="landmark" value="" required="" />
        </div>
        <div class="form-group">

            <label for="stock_name">Location/Area:</label>
            <input type="text" class="form-control" name="location" id="location" value="" required="" />
        </div>

        <div class="form-group">
            <label for="reducer_used">Reducer Used:</label>
            <input type="text" class="form-control" name="reducer_used" id="reducer_used" value="" required="" />
        </div>

        <div class="form-group">
            <label for="minimast_clamp_used">Minimast Clamp Used:</label>
            <input type="text" class="form-control" name="minimast_clamp_used" id="minimast_clamp_used" value="" required="" />
        </div>

        <div class="form-group">
            <label for="cable_user">Cabel Used:</label>
            <input type="text" class="form-control" name="cable_user" id="cable_user" value="" required="" />
        </div>
        <div class="form-group">
            <label for="cable_user">No Of lights:</label>
            <input type="text" class="form-control" name="no_of_lights" id="led_light_num" value="" required="" />
        </div>
        <div id="lights_list">

        </div>


        <div class="form-group">
            <label for="remark_data"> Remarks:</label>
            <input type="text" class="form-control" name="remark_data" id="remark_data" value="" required="" />
        </div>

        <input type="hidden" name="id" id="dic_id">


        <div class="modal-footer">
            <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
            <button type="submit" class="btn btn-primary">Save changes</button>
        </div>

    </form>
</div>
<div class="modal-footer">

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

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js"></script>
<link rel="stylesheet" href="//code.jquery.com/ui/1.13.2/themes/base/jquery-ui.css">
<script src="https://code.jquery.com/ui/1.13.2/jquery-ui.js"></script>
<script type="text/javascript">
    $(document).ready(function(){


        var enableDays = JSON.parse('<?php echo json_encode($edates); ?>');
//alert(enableDays);
$('.datePicker').datepicker({
    beforeShowDay: function(dt) {
       var datestring = $.datepicker.formatDate('dd-mm-yy', dt);
       if($.inArray(datestring, enableDays) != -1) {
         return [true];
     }
     else{
         return false;
     }


 }});

$('body').on('click','#add_light',function(){

    var light = '<div class="lights"><div class="row px-3 pt-4"><div class="form-group col-lg-2 px-2 mb-2"><label for="stock_name">LED Light No:</label><input type="text" class="form-control" name="led_light_num[]" id="led_light_num" value=""  /></div><div class="form-group col-lg-2 px-2 mb-2"><label for="value">Old Fixture:</label><input type="text" class="form-control" name="type_of_fixtures[]" id="type_of_fixtures" value="" required="" /></div><div class="form-group col-lg-3 px-2 mb-2"><label for="stock_name">Old Fixture Wattage:</label><input type="text" class="form-control" name="fixture_wattage[]" id="fixture_wattage" value="" required="" /></div><div class="form-group col-lg-2 px-2 mb-2"><label for="stock_name">Warranty Existing:</label><input type="text" class="form-control" name="warranty_existing[]" id="warranty_existing" value="" required="" /></div><div class="form-group col-lg-3 px-2 mb-2"><label for="stock_name">Maker Name:</label><input type="text" class="form-control" name="maker_name[]" id="maker_name" value="" required="" /></div></div><div class="row"><div class="col-xs-12"><button type="button" class="float-left remove_light btn-danger btn" >Remove</button></div></div></div>';

    $('#lights_list').append(light);

});
        $('body').on('click','.remove_light',function(){ //alert();
            $(this).parents('.lights').remove();
        });

        $(".edit_dic").on("click",function()
        { 
            var id=$(this).data('id');
            //alert(id);              
            $.ajax({
                url:'{{url("dic_edit")}}/'+id,
                method:'get',
                dataType:'json',
                success:function(data)
                {
               // data=JSON.parse(data);
               //alert(data.id);
               $('#exampleModalLong').modal('show');
               var pole_num = data.pole_num.replace(/[0-9]/g, '');
               var splitpole =  data.pole_num.split(pole_num);

               $('#pole_serial_number').val(splitpole[0]);
               $('#pole_num').val(splitpole[1]);
               $('#old_pole').val(data.pole_num);
               $('#dic_id').val(data.id);
               $('#dic_id').val(data.id);
               $('#location').val(data.location);
               $('#landmark').val(data.landmark);
               $('#switch_point').val(data.switch_point);
               $('#type_of_fixtures').val(data.type_of_fixture);
               $('#fixture_wattage').val(data.fixture_wattage);
               $('#maker_name').val(data.maker_name);
               $('#cable_user').val(data.cable_user);
               $('#reducer_used').val(data.reducer_used);
               $('#minimast_clamp_used').val(data.minimast_clamp_used);
               $('#remark_data').val(data.remark);
               $('#led_light_num').val(data.led_light_num);

               $(".led_wattage").each(function(){
                if($(this).val() == data.LED_wattage)
                {
                    $(this).prop("checked",true);
                }
                else{
                    $(this).prop("checked",false);
                }

            });

               var fixture_wattage = data.fixture_wattage?data.fixture_wattage.split('||'):{0:data.fixture_wattage};
               var maker_name = data.maker_name?data.maker_name.split('||'):{0:data.maker_name};
               var type_of_fixture = data.type_of_fixture?data.type_of_fixture.split('||'):{0:data.type_of_fixture};
               var warranty_existing = data.warranty_existing?data.warranty_existing.split('||'):{0:data.warranty_existing};
               var ledwattages = data.LED_wattage?data.LED_wattage.split('||'):{0:data.LED_wattage};
               var types_of_arms = data.types_of_arms?data.types_of_arms.split('||'):{0:data.types_of_arms};

               var light='';
               for(var i = 0; i < 6; i++)
               {
                var type_of_fixtures="N/A";var maker_names="N/A";var warranty_existings="N/A";var fixture_wattages="N/A";var ledwattage="N/A";var types_of_arm="N/A";
                if(typeof(ledwattages[i]) != "undefined" && ledwattages[i] !== null && ledwattages[i] != "undefined"){
                    type_of_fixtures=type_of_fixture[i];
                    maker_names=maker_name[i];
                    warranty_existings=warranty_existing[i];
                    fixture_wattages=fixture_wattage[i];
                    ledwattage=ledwattages[i];
                    types_of_arm=types_of_arms[i];
                }
                var j = parseInt(1)+parseInt(i);
                light+= '<div class="lights"><div class="row px-3 pt-4"><div class="form-group col-lg-2 px-2 mb-2"><label for="value">Old Fixture '+j+':</label><input type="text" class="form-control" name="type_of_fixtures[]" id="type_of_fixtures" value="'+type_of_fixtures+'" required="" /></div><div class="form-group col-lg-2 px-2 mb-3"><label for="stock_name">Fixture Wattage '+j+':</label><input type="text" class="form-control" name="fixture_wattage[]" id="fixture_wattage" value="'+fixture_wattages+'" required="" /></div><div class="form-group col-lg-2 px-2 mb-2"><label for="stock_name">Warranty Existing '+j+':</label><input type="text" class="form-control" name="warranty_existing[]" id="warranty_existing" value="'+warranty_existings+'" required="" /></div><div class="form-group col-lg-2 px-2 mb-2"><label for="stock_name">Maker Name '+j+':</label><input type="text" class="form-control" name="maker_name[]" id="maker_name" value="'+maker_names+'" required="" /></div><div class="form-group col-lg-2 px-2 mb-2"><label for="stock_name">LED Wattage '+j+':</label><select class="form-control" name="LED_wattage[]" id="ledwattage" ><option value="N/A" >N/A</option><option value="18 W" >18 W</option><option value="35 W" >35 W</option><option value="70 W" >70 W</option><option value="110 W" >110 W</option><option value="190 W" >190 W</option></select></div><div class="form-group col-lg-2 px-2 mb-2"><label for="stock_name">Type '+j+':</label><input type="text" class="form-control" name="type[]" id="type" value="'+types_of_arm+'" required="" /></div></div>';
                  // if(i != 0){
                  // if(i != 0){
                  //  light+='<button type="button" class="float-left remove_light" >Remove</button>';
                  //   }
                  // light+='</div>';
              }
              $('#lights_list').html(light);

              $(".armscondition").each(function(){
                if($(this).val() == data.types_of_arms) 
                {
                    $(this).prop("checked",true);
                }
            });

          },
          error:function(data)
          {
            alert(data);
        }
    });
});
});

</script>
</html>


