<?php 
	$header_file=APPPATH.'views/include/header.php';
	require($header_file);
	
	?>
<style type="text/css">
  th {
    white-space: break-spaces;
    padding: 5px;
}
td{
  padding: 5px;
}
</style>
    <!-- BEGIN: Content-->
    <div class="app-content content">
      <div class="content-overlay"></div>
      <div class="content-wrapper" >
        <div class="content-header row">
          <div class="content-header-left col-md-12 col-12 mb-2 breadcrumb-new">
            <h3 class="content-header-title mb-0 d-inline-block">Expiry Date Report</h3>
            <div class="row breadcrumbs-top d-inline-block">
              <div class="breadcrumb-wrapper col-12">
                <ol class="breadcrumb">
                  <li class="breadcrumb-item"><a href="#">Home</a>
                  </li>
                  <li class="breadcrumb-item"><a href="#">Expiry Date Report</a>
                  </li>
                  <li class="breadcrumb-item active">
                  </li>
                </ol>
              </div>
            </div>
          </div>
        
        </div>
        <div class="content-body"><!-- Zero configuration table -->
<section id="configuration">
    <div class="row justify-content-md-right">
        
            <div class="card"  >
                <div class="card-header">
                   <!-- <h4 class="card-title">Rejection List</h4>-->
                    <a class="heading-elements-toggle"><i class="la la-ellipsis-v font-medium-3"></i></a>
                    <div class="heading-elements">
                        <ul class="list-inline mb-0">
                            <li><a data-action="collapse"><i class="ft-minus"></i></a></li>
                            <li><a data-action="reload"><i class="ft-rotate-cw"></i></a></li>
                            <li><a data-action="expand"><i class="ft-maximize"></i></a></li>
                            <li><a data-action="close"><i class="ft-x"></i></a></li>
                        </ul>
                    </div>
                </div>
                <div class="card-content collapse show">
                    <div class="card-body card-dashboard" >
                       
                        <div class="table-responsive" >
                            <table class="table table-striped table-bordered dataex-html5-export">
                               
					<thead>
						<tr>
							<th>Store</th>
                                <th>Item Name</th>
                                <th>Uom</th>
								<th>GRN No</th>
								<th>Supplier</th>
								<th>GRN Date</th>
								<th>Expiry Date</th>
								<th>Left Days</th>
								<th>GRN Qty</th>
								<th>Stock</th>					
						</tr>
					</thead>
					<tbody>
						<?php
							
								foreach($exp_date as $exp){
									
								?>
                                <tr>
									<td><?php echo $exp->branchname; ?></td>
                                    <td><?php echo $exp->item_name; ?></td>
									<td><?php echo $exp->uom; ?></td>
									<td><?php echo $exp->grn_no; ?></td>
									<td><?php echo $exp->vendor_name; ?></td>
									<td><?php echo date('d-m-Y',strtotime($exp->grn_date)); ?></td>
                                    <?php if($exp->expiry_date == '1970-01-01') { ?>
                                    <td></td>
                                    <?php } else { ?> 
                                    <td><?php echo date('d-m-Y',strtotime($exp->expiry_date)); ?></td>
                                    <?php } ?>
                                    <?php if($exp->left_days<0) { ?>
                                    <td>0</td><?php } else { ?>
									<td><?php echo $exp->left_days; ?></td>
									<?php } ?>
									<td><?php echo $exp->grn_item_qty; ?></td>
									<td><?php echo $exp->stock_item; ?></td>
								</tr>
								<?php
								
							}
						?>
					</tbody>
				</table>
                        </div>
                    </div>
                </div>
            </div>
        
    </div>
</section>
<!--/ Zero configuration table -->



<!--/ Language - Comma decimal place table -->

        </div>
      </div>
    </div>
    <!-- END: Content-->

   <?php //require('include/theme_customizer.php');?>
 <?php 
  $footer_file=APPPATH.'views/include/footer.php';
	require($footer_file);
	?>
<script>
	$('.param_check').each(function() { $(this).on( {'click contextmenu': function() {
		//contextmenu
		var i = $(this).data('value');
		var anchor = $("a");
		var anchorTarget = $(this).parent().find('.parmetre').val();
		var submodid = $(this).parent().find('.submod_id').val();
		var link = $(this).attr('href');
		$(this).attr("href", link + submodid +'/'+anchorTarget);

		location.reload();
	}
	})
	})
</script>  

  </body>
  <!-- END: Body-->

<!-- Mirrored from pixinvent.com/modern-admin-clean-bootstrap-4-dashboard-html-template/html/ltr/vertical-modern-menu-template/form-layout-basic.html by HTTrack Website Copier/3.x [XR&CO'2014], Mon, 27 Apr 2020 09:38:02 GMT -->
</html>