<?php $this->view("includes/Inc_pagehead");?>
<!-- Page Styles Goes Here-->
<style>
.m-invoice-2 .m-invoice__wrapper .m-invoice__body table thead tr th {
  color: #000000;
}
.m-invoice-2 .m-invoice__wrapper .m-invoice__body table tbody tr td {
  color: #404040;
}
.item_table td{
  padding: .75rem !important;
}
.item_table th{
  white-space: nowrap;
  padding: .75rem !important;
}
.table thead th {
  border-top: 2px solid #b7b7b7 !important;
}
.table thead th {
  border: 2px solid #b7b7b7;
}
.table tbody td {
  border: 2px solid #b7b7b7;
}
.payment-table tbody td{
  border-top: 2px solid #b7b7b7 !important;
}
.m-invoice-2 .m-invoice__wrapper .m-invoice__head .m-invoice__container.m-invoice__container--centered {
  width: 90%;
}
.m-invoice-2 .m-invoice__wrapper .m-invoice__body.m-invoice__body--centered {
  width: 90%;
}
.m-invoice-2 .m-invoice__wrapper .m-invoice__head .m-invoice__container.m-invoice__container--centered {
  width: 90%;
}
</style>


<style>

@media print {

  .table-bordered td{
    padding: .75rem !important;
  }
  .table-bordered th{
    white-space: nowrap;
    padding: .75rem !important;
  }
  .table-bordered .table thead th {
    border-top: 2px solid #f4f5f8 !important;
  }
  .m-invoice-2 .m-invoice__wrapper .m-invoice__head .m-invoice__container.m-invoice__container--centered {
    width: 97%;
  }
  .m-invoice-2 .m-invoice__wrapper .m-invoice__body.m-invoice__body--centered {
    width: 97%;
  }
  .m-invoice-2 .m-invoice__wrapper .m-invoice__body.m-invoice__body--centered {
    margin-left: 10px !important;
  }

  #print_view {
    margin-top: -20%;
  }
  #print, .print_hide_div
  {
    display: none !important;
  }
  body * {
    visibility: hidden;
  }
  .m-portlet__body * {
    visibility: visible;
    overflow: visible !important;
  }
  .letter_head_img{
    display: block !important;
  }
  body.m-content--skin-light2 {
    background-color: white !important;
  }
  .m-invoice-2 .m-invoice__wrapper .m-invoice__head .m-invoice__container.m-invoice__container--centered {
    width: 97% !important;
  }
  .m-invoice-2 .m-invoice__wrapper .m-invoice__head .m-invoice__container .m-invoice__items .m-invoice__item {
    display: table-cell;
}
}
.m-invoice-2 .m-invoice__wrapper .m-invoice__head .m-invoice__container .m-invoice__items .m-invoice__item {
  display: table-cell !important;
}
.col-sm-4 {
    -webkit-box-flex: 0;
    -ms-flex: 0 0 33.33333%;
    flex: 0 0 33.33333%;
    max-width: 33.33333%;
}
.col-sm-8 {
    -webkit-box-flex: 0;
    -ms-flex: 0 0 66.66667%;
    flex: 0 0 66.66667%;
    max-width: 66.66667%;
}
</style>
<?php $this->view("includes/Inc_navigation");?>
<div class="m-grid__item m-grid__item--fluid m-wrapper">
  <!-- BEGIN: Subheader -->
  <div class="m-subheader ">
    <div class="d-flex align-items-center">
      <div class="mr-auto">
        <h3 class="m-subheader__title m-subheader__title--separator">
          Customer Profile
        </h3>
        <ul class="m-subheader__breadcrumbs m-nav m-nav--inline">
          <li class="m-nav__item m-nav__item--home">
            <a href="#" class="m-nav__link m-nav__link--icon">
              <i class="m-nav__link-icon la la-home"></i>
            </a>
          </li>
          <li class="m-nav__separator">
            -
          </li>
          <li class="m-nav__item">
            <a href="<?php echo $this->session->userdata("dashboard_link")?>" class="m-nav__link">
              <span class="m-nav__link-text">
                Home
              </span>
            </a>
          </li>
          <li class="m-nav__separator">
            -
          </li>
          <li class="m-nav__item">
            <a href="<?php echo base_url().'customer/profile/'.$customer_data->customer_id ?>" class="m-nav__link">
              <span class="m-nav__link-text">
                Customer Profile
              </span>
            </a>
          </li>


        </ul>
      </div>
      <div>

      </div>
    </div>
  </div>
  <!-- END: Subheader -->
  <div class="m-content">

    <div class="row">
      <div class="col-xl-12 col-lg-12">
        <div id="div_info" class="profile_nav_div">
          <div class="m-portlet">
            <div class="m-portlet__head">
              <div class="m-portlet__head-caption">
                <div class="m-portlet__head-title">
                  <h3 class="m-portlet__head-text">
                    Customer Info
                  </h3>
                </div>
              </div>
              <div class="m-portlet__head-tools" >
                <a href="javascript:;" onclick="window.print()" style="margin-left: 5px;margin-right: 5px" class="btn m-btn--gradient-from-danger m-btn--gradient-to-info  m-btn  m-btn--icon m-btn--air m-btn--pill">
                  <span>
                    <i class="fa fa-print"></i>
                    <span>
                      Print
                    </span>
                  </span>
                </a>
              </div>
            </div>
            <div class="m-portlet__body" id="print_view">
              <div class="m-invoice__body m-invoice__body--centered" style="padding-top:0px !important">
                <div class="m-invoice__table  m-invoice__table--centered table-responsive">
                  <table class="table m-table table-bordered item_table" style="text-align:left">
                    <thead>
                      <tr>
                        <th style="text-align:center" colspan="2">
                          <h5><strong>BENEFICIARY DETAILS - <?php echo $customer_data->work_name?></strong></h5>
                        </th>
                      </tr>
                    </thead>
                    <tbody>
                      <tr>
                        <th>Beneficiary ID: <?php echo $customer_data->customer_id?></th>
                        <th>Date: <?php echo date('d-m-Y',strtotime($customer_data->created_date))?></th>
                      </tr>
                      <tr>
                        <th>Name of Beneficiary</th>
                        <th><?php echo $customer_data->customer_name?></th>
                      </tr>
                      <tr>
                        <th>Name of Father/Mother/Spouse</th>
                        <th><?php echo $customer_data->guardian_name?></th>
                      </tr>
                      <tr>
                        <th>Address</th>
                        <th><?php echo $customer_data->customer_address?></th>
                      </tr>
                      <tr>
                        <th>Ward & House No</th>
                        <th>Ward No: <?php echo $customer_data->ward_no?> &nbsp;&nbsp;House No: <?php echo $customer_data->house_no?></th>
                      </tr>
                      <tr>
                        <th>Street Name</th>
                        <th><?php echo $customer_data->street_name?></th>
                      </tr>
                      <tr>
                        <th>Landmark</th>
                        <th><?php echo $customer_data->landmark?></th>
                      </tr>
                      <tr>
                        <th>Phone No</th>
                        <th><?php echo $customer_data->phone_no?></th>
                      </tr>
                      <tr>
                        <th>Aadhar No</th>
                        <th><?php echo $customer_data->aadhar_no?></th>
                      </tr>
                      <tr>
                        <th>Meter Make & No</th>
                        <th><?php echo $customer_data->meter_name?>  - <?php echo $customer_data->meter_no?></th>
                      </tr>
                      <tr>
                        <th>Type of KWA Approval & No</th>
                        <th><?php echo $customer_data->approval_no?></th>
                      </tr>
                      <tr>
                        <th>Subcontractor</th>
                        <th>#<?php echo $customer_data->contractor_id." ".$customer_data->contractor_name?></th>
                      </tr>
                      <tr>
                        <th>Supervisor</th>
                        <th><?php echo $customer_data->supervisor_name?></th>
                      </tr>
                      <tr>
                        <th colspan="2" style="text-align:center">Work Measurements</th>
                      </tr>
                      <tr>
                        <th>Road Cutting & Concreting</th>
                        <th><?php echo $customer_data->road_cutting_concrete?></th>
                      </tr>
                      <tr>
                        <th>20MM Pipe Additional</th>
                        <th><?php echo $customer_data->additional_pipe?></th>
                      </tr>
                      <tr>
                        <th>Other Measurements</th>
                        <th><?php echo $customer_data->other_measurements?></th>
                      </tr>
                      <tr>
                        <th>Remarks</th>
                        <th><?php echo $customer_data->customer_remarks?></th>
                      </tr>
                    </tbody>
                  </table>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>

    </div>


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



<!-- end:: Body -->
<!-- begin::Footer -->

<?php $this->view("includes/Inc_footer");?>
<!-- end::Footer -->
</div>
<!-- end:: Page -->

<?php $this->view("includes/Inc_sidebar");?>
<?php $this->view("includes/Inc_scripts");?>
<!--begin::Page Snippets -->
<script>
$("#table_filter_status").selectpicker();
$("[data-switch=true]").bootstrapSwitch()
</script>

<script>
$("#beneficiary_accounts_menu").addClass('m-menu__item--active');
function hide_all(){
  $(".profile_nav").removeClass('m-nav__item--active');
  $(".profile_nav_div").hide();
}
function active(menu_name){
  hide_all();
  $("#nav_"+menu_name).addClass('m-nav__item--active');
  $("#div_"+menu_name).show();
  $("#div_"+menu_name).fadeIn("slow");
  $('html, body').animate({
    scrollTop: eval($("#div_"+menu_name).offset().top - 150)
  }, 500);
}
//  Hide All Div and In Active All Menu
hide_all();
//  Active First Menu and Its div
active('info');
$('body').on('click', '.profile_nav', function() {
  var nav = $(this).attr('data-nav');
  active(nav);
})
</script>


<script>

jQuery(document).ready(function() {
  $('.profile_nav').on('click', function(e){
    var table_name = $(this).attr('data-table-name');
    if(table_name!=''){
      var tables = table_name.split(',');
      $.each(tables, function( index, value ){
        var table_name = value;
        $('#'+table_name).dataTable().fnDestroy();
        eval("Datatable_"+table_name).init("reload");
        // eval(table_name).ajax.reload();
      });
    }
  });
})
</script>
