<div class="col-lg-12">
    <section class="panel">
        <header class="panel-heading" style="min-height:120px">
            <?php 
                $idl_count = $idl_count+1;
                $idl_count = '000'.$idl_count;
            ?>
            <div class="col-lg-3"><span>Ref No : <?php echo $idl_count;?></span></div>
        
            <div class="col-lg-6">
                <h4 class="text-center"><i class="fa fa-truck truck_icon"></i><br/> <b>ETC Cargo Limited(ICD018) - Manifesto Capturing Entry – ICD Officer </b></h4>
            </div>
            <div class="col-lg-3"> <span>Date : <?php echo date("Y-m-d");?></span> </div>
            
        </header>
        <div class="clear"></div>
        <div class="panel-body">
            <form class="form-horizontal" method="post" action="<?php echo base_url();?>icd/mceo_ctrl/insert_icd_regi_details">
                <div class="col-lg-12">
                    <div class="form-group col-md-6">
                        <label class="col-lg-4 col-sm-4">Vessel Name </label>
                        <div class="col-lg-8">
							<input type="hidden" class="form-control" name="idl_ref_no" value="ICD<?php echo $idl_count;?>" required>
							<input type="hidden" class="form-control" name="idl_date" value="<?php echo date("Y-m-d");?>" required>
							<input type="text" class="form-control" name="idl_vessel_name" value="" required>
                        </div>
                    </div>

					<div class="form-group col-md-6">
                        <label class="col-lg-4 col-sm-4">Container Status </label>
                        <div class="col-lg-8">
                            <select class="form-control" name="idl_csl_id" required>
                                <option value="">--Select--</option>
								<?php
									foreach($csl_list as $csl_row){
								?>
                                		<option value="<?php echo $csl_row['csl_id']; ?>" <?php if(isset($lul_data['idl_csl_id']) && $lul_data['idl_csl_id']==$csl_row['csl_id']){ echo "selected=selected";}?>><?php echo $csl_row['csl_name']; ?></option>
										
								<?php
									}
								?>
                            </select>

                        </div>
                    </div>
                    <div class="form-group col-md-6">
                        <label class="col-lg-4 col-sm-4">Bill Of Lading </label>
                        <div class="col-lg-8">
                            <input type="text" class="form-control" name="idl_bill_of_loading" value="" required>

                        </div>
                    </div>

                     <div class="form-group col-md-6">
                        <label class="col-lg-4 col-sm-4 ">Type Of Cargo </label>
                        <div class="col-lg-8">
                            <select class="form-control" name="idl_ctl_id" required>
                                <option value="">--Select--</option>
								<?php
									foreach($ctl_list as $ctl_row){
								?>
                                		<option value="<?php echo $ctl_row['ctl_id']; ?>" <?php if(isset($lul_data['idl_ctl_id']) && $lul_data['idl_ctl_id']==$ctl_row['ctl_id']){ echo "selected=selected";}?>><?php echo $ctl_row['ctl_name']; ?></option>
										
								<?php
									}
								?>
                            </select>

                        </div>
                    </div>
                    <div class="form-group col-md-6">
                        <label class="col-lg-4 col-sm-4">Shipping Line </label>
                        <div class="col-lg-8">
							<input type="text" class="form-control" name="idl_shipping_line" value=""required>
                        </div>
                    </div>
                    <div class="form-group col-md-6">
                        <label class="col-lg-4 col-sm-4">Payment Agency </label>
                        <div class="col-lg-8">
                            <select class="form-control" name="idl_pal_id" required>
                                <option value="">--Select--</option>
								<?php
									foreach($pal_list as $pal_row){
								?>
                                		<option value="<?php echo $pal_row['pal_id']; ?>" <?php if(isset($lul_data['idl_pal_id']) && $lul_data['idl_pal_id']==$pal_row['pal_id']){ echo "selected=selected";}?>><?php echo $pal_row['pal_name']; ?></option>
										
								<?php
									}
								?>
                            </select>

                        </div>
                    </div>
                    
                   
                </div>
				<header class="panel-heading">
                    <h4 class="text-center"> 
                        <b> Container Details </b>
                        <a class="btn btn-sm btn-default pull-right" id="add_more_icdl_id">Add more</a>                        
                    </h4>
                </header>

                <div class="panel-body">
                    <section id="unseen">
                        <table class="table table-bordered table-striped table-condensed col-md-12">
                            <thead>
                                <tr>
                                    <th class="col-md-2">Container No </th>
                                    <th class="numeric col-md-1">Container Size </th>
                                    <th class="col-md-1">Container  Type </th>
                                    <th class="col-md-2">Goods Description </th>
                                    <!-- <th class="col-md-2"> Container Status </th> -->
                                    <th class="col-md-1"> Container  Seal S.NO1 </th>
                                    <th class="col-md-1"> Container  Seal S.NO2  </th>
                                    <th class="col-md-1"> &nbsp; </th>

                                </tr>
                            </thead>
                            <tbody id="tbody_id">     

                            </tbody>
                        </table>

                        <div class=" col-lg-offset-5">
                            <div class="col-lg-2">
                                <button type="submit" class="btn btn-success"> <i class="fa fa-thumbs-up"></i>&nbsp; register</button>
                            </div>

                        </div>

                    </section>
                </div>
                <!---->

            </form>
        </div>
    </section>

</div>


<script type='text/javascript'>
    $(document).ready(function(){
        $('#add_more_icdl_id').click();          
        
    });
    $('#add_more_icdl_id').click(function(){
        lul_com_id_val = $('#lul_com_id_input_id').val();
        var numcls = $('.tbody_tr_cls').length;
        append1 = '<tr class="tbody_tr_cls" id="tbody_tr_id_'+numcls+'">'+
                    '<td><input type="text" class="form-control " name="icdl_c_no[]" required></td>'+
                    '<td><input type="number" class="form-control " name="icdl_c_size[]" required></td>'+
                    '<td><input type="text" class="form-control " name="icdl_c_type[]" required></td>'+
                    '<td><input type="text" class="form-control " name="icdl_goods_desc[]" required></td>'+
                    // '<td><input type="text" class="form-control " name="icdl_c_status[]" required></td>'+
                    '<td><input type="text" class="form-control " name="icdl_c_seal_s_no1[]" required></td>'+
                    '<td><input type="text" class="form-control " name="icdl_c_seal_s_no2[]" required></td>'+
                    '<td class="" >'+
                    '<a class="btn btn-sm btn-danger fa fa-times tr_close_cls" data-common_num_close="'+numcls+'" id="tbody_tr_close_id_'+numcls+'"></a></td></tr>';
        
        $('#tbody_id').append(''+append1+'');
    });

    

    

    $('body').on('click','.tr_close_cls',function(){
        this_id                 = $(this).attr('id');
        this_common_num_val     = $('#'+this_id+'').data('common_num_close');  
        $( "#tbody_tr_id_"+this_common_num_val+'').remove();

    });
    

    

</script>
