<section class="container" style="padding-bottom: 2rem;">
	<div class="card bg-light-transparent">  
        <div class="card-header bg-white">
            <h5>My Medical Claim History For The Year 2018</h5>
           <!--  <a href="#" class="btn btn-outline-dark btn-sm" title="Add New Panel Clinic" data-toggle="modal" data-target="#add_panel">
                <i class="fa fa-plus"></i> Add New Claim Detail
            </a>
            <a href="<?php echo base_url('hr/StaffMovement/list_report')?>" target="_blank" class="btn btn-outline-dark btn-sm" title="Print Panel Clinic">
                <i class="fa fa-print"></i>Print
            </a>
            <button id="btnShowFilters" type="button" class="btn btn-outline-dark btn-sm collapsed" data-trigger="hover" title="Show Filters Box" data-toggle="collapse" data-target="#collapseFilter" aria-expanded="false">
                <i class="fas fa-filter"></i>Show Filters
            </button> -->
        </div>
       	<div class="collapse" id="collapseFilter">
            <div class="card-header">
                <div class="row">
                    <div class="col">
                        <div class="card no-shadow">
                            <div class="card-body">
                                <div class="form-group row">
                                    <label for="filter_year" class="col-lg-2">
                                        Year
                                    </label>                           
                                    <div class="col-lg-4" >
                                        <select class="custom-select" id="filter_year">
                                            <?php
                                                //5 years back from current year or untill 2017 and one year after current
                                                for ($i=-1; $i < 10 ; $i++) { 
                                                    if(date('Y',strtotime('-'.$i.' year')) >= 2017 && date('Y',strtotime('-'.$i.' year')) <= 2018){
                                                        echo '<option value="'.date('Y',strtotime('-'.$i.' year')).'">'.date('Y',strtotime('-'.$i.' year')).'</option>';
                                                    }
                                                }
                                            ?>
                                        </select>
                                    </div>
                                </div>
                                <div class="form-group row">
                                    <label for="filter_year" class="col-lg-2">
                                        Clinic
                                    </label>                           
                                    <div class="col-lg-4" >
                                        <select class="custom-select" id="filter_clinic">
                                           <option value=""></option>
                                        </select>
                                    </div>
                                </div>
                                <div class="row">
                                    <div class="col d-print-none">
                                        <button class="btn btn-info" id="searchBtn">search</button>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="card-body">
            <div class="card no-shadow">
                <div class="card-body">
                    <table class="table table-hover table-bordered p-0 m-0">
                    	<thead>
                    		<tr>
                    			<th class="text-center">#</th>
                    			<th class="text-center">Date</th>
                    			<th class="text-center">Name</th>
                                <th class="text-center">IC No.</th>
                    			<th class="text-center">Treatment</th>
                    			<th class="text-center">Amount</th>
                    			<th class="text-center">Action</th>
                    		</tr>
                    	</thead>
                        <tbody>
                            <tr>
                                <td class="text-center">1</td>
                                <td class="text-center">11/1/2018</td>
                                <td class="text-center">Muhd Nur Fikri b. Anuar</td>
                                <td class="text-center">960508146405</td>
                                <td class="text-center">X-ray</td>
                                <td class="text-center">RM 150.00</td>
                                <td class="text-center">
                                    <div class="btn-group">
                                        <!-- <a href="#" class="btn btn-warning btn-sm" data-placement="top" title="Add attachment" data-toggle="modal" data-target="#attachment"><i class="fas fa-paperclip text-white"></i></a> -->
                                        <a href="#" class="btn btn-info btn-sm" data-toggle="modal" data-target="#edit_detail" data-placement="top" title="Edit OT"><i class="fas fa-edit"></i></a>
                                         <a href="#" class="btn btn-danger btn-sm" data-toggle="tooltip" data-placement="top" title="delete OT"><i class="fas fa-trash-alt"></i></a>
                                    </div>
                                </td>
                            </tr>
                            <tr>
                                <td class="text-center">2</td>
                                <td class="text-center">20/1/2018</td>
                                <td class="text-center">Muhd Nur Fikri b. Anuar</td>
                                <td class="text-center">960508146405</td>
                                <td class="text-center">X-ray</td>
                                <td class="text-center">RM 150.00</td>
                                <td class="text-center">
                                    <div class="btn-group">
                                        <!-- <a href="#" class="btn btn-warning btn-sm" data-placement="top" title="Add attachment" data-toggle="modal" data-target="#attachment"><i class="fas fa-paperclip text-white"></i></a> -->
                                        <a href="#" class="btn btn-info btn-sm" data-toggle="modal" data-target="#edit_detail" data-placement="top" title="Edit OT"><i class="fas fa-edit"></i></a>
                                         <a href="#" class="btn btn-danger btn-sm" data-toggle="tooltip" data-placement="top" title="delete OT"><i class="fas fa-trash-alt"></i></a>
                                    </div>
                                </td>
                            </tr>
                        </tbody>
                        <tfoot>
                            <tr>
                                <td colspan="5" class="text-center"><b>Total</b></td>
                                <td class="text-center">RM300.00</td>
                                <td></td>
                            </tr>
                        </tfoot>
                    	<!-- <tbody>
                    		<?php if(!empty($panel)) foreach ($panel as $key => $panel) { ?>
                    			<tr>
                    				<td><?php echo $key+1 ?></td>
                    				<td><?php echo $panel['name'] ?></td>
                    				<td><?php echo $panel['address1'] ?> <?php echo $panel['address2'] ?></td>
                    				<td><?php echo $panel['postcode'] ?></td>
                    				<td><?php echo $panel['city'] ?></td>
                    				<td><?php echo $panel['phone'] ?></td>
                    				<td><?php echo $panel['email'] ?></td>
                    				<td class="text-center">
                    					<a href="#" class="btn btn-success btn-sm" data-toggle="tooltip" data-placement="top" title="View Clinic Detail"><i class="fas fa-sign-in-alt"></i></a>
                    				</td>
                    			</tr>
                    		<?php } ?>
                    	</tbody> -->
                    </table>
                </div>
            </div>
        </div>        
    </div>
</section>

<!-- Modal add panel -->
<div class="modal fade" id="add_panel" role="dialog" aria-hidden="true">
    <div class="modal-dialog modal-lg">
        <div class="modal-content">
            <div class="modal-header">
                <h5 class="modal-title">Add New Panel Clinic Claim Detail</h5>
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                  <span aria-hidden="true">&times;</span>
                </button>
            </div>
            <form method="post" action="<?php echo base_url('hr/claim/addPanelClinic') ?>">
                <div class="modal-body">        
                	<div class="row form-group">
                    	<input type="hidden" class="form-control" name="clinic_name" id="clinic_name">
                    </div>
                    <div class=" form-group">
                        <label for="clinic_name">Date <span class="text-danger">*</span></label>               
                        <input required data-parsley-error-message="Hospital/Clinic Name is required." type="text" class="datepicker form-control" name="clinic_name" id="clinic_name" placeholder="Enter Date" autocomplete="off">
                    </div>
                    <div class=" form-group">
                        <label for="clinic_name">Search [Name/ Patient/ IC]<span class="text-danger">*</span></label> 
                        <div class="input-group mb-2">
                            <input type="text" class="form-control" id="inlineFormInputGroup" placeholder="[Name/ Patient/ IC]">
                            <div class="input-group-prepend">
                              <button class="input-group-text">Search</button>
                            </div>
                        </div>
                    </div>
                    <div class=" form-group">
                        <label for="clinic_name">Employee Name <span class="text-danger">*</span></label>               
                        <input required data-parsley-error-message="Hospital/Clinic Name is required." type="text" class="form-control" name="clinic_name" id="clinic_name" placeholder="Enter Employee Name" >
                    </div>
                    <div class="form-row">
                        <div class="col">
                            <label for="master_company" class="">Patient Name</label><br>
                             <input required data-parsley-error-message="Hospital/Clinic Name is required." type="text" class="form-control" name="clinic_name" id="clinic_name" placeholder="Enter Employee Name" >
                        </div>
                        <div class="col">
                            <label for="group" class="">Relation</label>
                            <select id="group" name="group" type="text" class="form-control">
                                <option value="-1" selected="selected">Select Relation</option>
                                <option value="">Husband</option>
                                <option value="">Wife</option>
                                <option value="">Son</option>
                                <option value="">Daughter</option>
                            </select>
                        </div>
                    </div>
                    <div class=" form-group">
                        <label for="clinic_name">Patient IC No.<span class="text-danger">*</span></label>               
                        <input required data-parsley-error-message="Hospital/Clinic Name is required." type="number" class="form-control" name="clinic_name" id="clinic_name" placeholder="Enter Employee Name" >
                    </div>
                    <div class=" form-group">
                        <label for="clinic_name">Treatment <span class="text-danger">*</span></label>               
                        <input required data-parsley-error-message="Hospital/Clinic Name is required." type="text" class="datepicker form-control" name="clinic_name" id="clinic_name" placeholder="Enter Treatment" autocomplete="off">
                    </div>
                    <div class=" form-group">
                        <label for="clinic_name">Amount <span class="text-danger">*</span></label>               
                        <div class="input-group mb-2">
                            <div class="input-group-prepend">
                              <div class="input-group-text">RM</div>
                            </div>
                            <input type="number" class="form-control" id="inlineFormInputGroup" placeholder="Amount">
                        </div>
                    </div>
                   <!--  <div class="form-group">
                    	<div class="form-row">
							<div class="col">
								<label for="master_company" class="">Master Company</label><br>
								<div class="row">
									<div class="col">
										<input type="radio" name="master_company" id="master_yes" value="1">
										<label class="">Yes</label>
									</div>
									<div class="col">
										<input type="radio" name="master_company" id="master_no" value="0">
										<label class="">No</label>
									</div>
								</div>
							</div>
							<div class="col">
								<label for="group" class="col-form-label-sm">Group</label>
								<select id="group" name="group" type="text" class="form-control form-control-sm">
									<option value="" selected="selected">Please Select</option>
								</select>
							</div>
						</div>
                    </div>
                    <div class="form-group">
                        <label for="roc_no">ROC No. <span class="text-danger">*</span></label>
                        <input required data-parsley-error-message="ROC No is required." type="text" class="form-control" name="roc_no" id="roc_no" placeholder="Enter ROC No." >
                    </div>
                    <div class=" form-group">
                        <label for="address1">Address 1 <span class="text-danger">*</span></label>
                        <input required data-parsley-error-message="Hospital/Clinic Address is required." type="text" class="form-control" name="address1" id="address1" placeholder="Enter Hospital/Clinic Address" >
                    </div>
                    <div class="form-group">
                		<label for="address2">Address 2 <span class="text-danger">*</span></label>
                        <input required data-parsley-error-message="Hospital/Clinic Address is required." type="text" class="form-control" name="address2" id="address2" placeholder="Enter Hospital/Clinic Address" >
                    </div>
                    <div class="row form-group">
                        <div class="col">
                            <label for="city">City <span class="text-danger">*</span></label>
                            <input required data-parsley-error-message="City is required." type="text" class="form-control" name="city" id="city" placeholder="Enter City Name" >
                        </div>
                        <div class="col">
                            <label for="postcode">Postcode <span class="text-danger">*</span></label>
                            <input required data-parsley-error-message="Postcode is required." type="text" class="form-control" name="postcode" id="postcode" placeholder="Enter Postcode">
                        </div>
                    </div>  
                    <div class="form-group">
                        <label for="description">Description <span class="text-danger">*</span></label>
                        <textarea class="form-control" name="description" id="description" cols="30" rows="2" placeholder="Enter Description"></textarea>
                    </div>
                    <div class="form-group">
                    	<div class="form-row">
                    		<div class="col">
                    			<label for="phone">Phone No <span class="text-danger">*</span></label>
                       			<input required data-parsley-error-message="Refreshment is required." type="number" class="form-control" id="phone" name="phone" placeholder="Enter Phone No">
                    		</div>
                    		<div class="col">
                    			<label for="fax">Fax <span class="text-danger">*</span></label>
                       			<input required data-parsley-error-message="Fax no is required." type="number" class="form-control" id="fax" name="fax" placeholder="Enter Fax No">
                    		</div>
                    	</div>
                    </div>
                    <div class="form-group">
                        <div class="form-row">
                    		<div class="col">
                    			<label for="email">Email <span class="text-danger">*</span></label>
                        		<input required data-parsley-error-message="Email is required." type="text" class="form-control" name="email" id="email" placeholder="Enter Email">
                    		</div>
                    		<div class="col">
                    			<label for="web_address">Web Address <span class="text-danger">*</span></label>
                        		<input required data-parsley-error-message="Web Address is required." type="text" class="form-control" name="web_address" id="web_address" placeholder="Enter Web Address">
                    		</div>
                    	</div>
                    </div>
                    <div class="form-group">
                        <label for="business_activities">Business Activities <span class="text-danger">*</span></label>
                        <textarea class="form-control" name="business_activities" id="business_activities" cols="30" rows="2"></textarea>
                    </div> -->
                </div>
                <div class="modal-footer">
                    <button type="submit" type="button"  class="btn btn-success btn-sm" style="margin-bottom:15px; width: 200px;"><i class="fa fa-plus"></i> Add</button>
                    <button type="button" class="btn btn-danger btn-sm" style="margin-bottom:15px; width: 200px;" data-dismiss="modal"><i class="fa fa-ban"></i> Cancel</button>
                </div>
            </form>
        </div>
    </div>
</div>
<!-- Modal add panel -->

<script>

	document.getElementById('master_yes').onchange = function() {
		document.getElementById('group').disabled = this.checked;
		$('#group').val("");
	};

	document.getElementById('master_no').onchange = function() {
		document.getElementById('group').disabled = !this.checked;
	};
</script>



