<?php 
	$header_file=APPPATH.'views/include/header.php';
	require($header_file);
?>
<!-- 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">Issue Pending List</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="#">Product Issue</a>
                  </li>
                  <li class="breadcrumb-item active">Issue Pending List
                  </li>
                </ol>
              </div>
            </div>
          </div>
        
        </div>
        <div class="content-body"><!-- Zero configuration table -->
<section id="configuration">
    <div class="row">
        <div class="col-md-12">
            <div class="card">
                <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>Sl No</th>
										<th>Request No</th>
										<th>Request Date</th>
										<th>Outlet Name</th>
										<th>Order Type</th>
										<th>Status</th>
										<th>Manual Close</th>
										<th>View REQ</th>
										<th>View Issues</th>
									</tr>
                                </thead>
                                <tbody>
								 <?php
									$count =1;
									foreach($iss_list as $islist)
									{
								?>
                                <tr>
                                    <td><?php echo $count; ?></td>
                                    <td><?php echo $islist->pr_req_no; ?></td>
									<td><?php echo $islist->request_date; ?></td>
									<td><?php echo $islist->username; ?></td>
									<td><?php echo $islist->orders; ?></td>
									<?php
										if($islist->status == 'Pending') {
									?>
									<td class="pending_data"><span class="badge badge-danger"><?php echo $islist->status; ?></span></td>
									<?php
										} else {
									?>	
									<td class="success_data"><span class="badge badge-success"><?php echo $islist->status; ?></span></td>
									<?php
										}
									?>
									<td class="uk-text-nowrap">
										<a href="#medlist" class="grid-form-dialog-btn btn btn-sm btn-info btn-success" onclick="javascript:load_marks(<?php echo $islist->request_id; ?>)">Close Manual</a>
									<!--	<div class="grid-form-dialog" title="Manual Request Close">
											<div class="container">
												<form action="" class="uk-form-stacked"  method="post" autocomplete="off">
													<div class="form-group row">
														<label for="inputEmail3" class="col-sm-2 col-form-label">Enter Remarks</label>
														<div class="col-sm-10">
														<input name="request_id" id="request_id" type="text" class="textbox" value="<?php //echo $islist->request_id; ?>" >
															<input type="text" class="form-control"name="req_remark" id="req_remark">
														</div>
													</div>
													
													<div class="form-group row">
														<div class="offset-sm-2 col-sm-10">
															<button type="button" class="md-btn md-btn-flat uk-modal-close">Close</button>
															<input type="button" class="md-btn md-btn-flat md-btn-flat-primary" value="Confirm" name="submit3" id="submit3">
														</div>
													</div>
												</form>
											</div>
										</div>-->
									</td>
									<td class="uk-text-nowrap">
										<a href="<?php echo site_url('ProductRequest/prdrequestView/'. $islist->request_id); ?>" class=""> <i class='ft-eye'></i></a>
									</td>
									<td class="uk-text-nowrap">
										<a href="<?php echo site_url('ProductRequest/issueClosedView/'. $islist->request_id); ?>" class=""> <i class='ft-eye'></i></a>
									</td>
								</tr>
                                    
                                   <?php
								  $count++;
								}
							  
							?>
                            </table>
							

	<div class="grid-form-dialog" id="" title="Manual Request Close">
	<div class="container">
	<form  action="" class="uk-form-stacked"  method="post" autocomplete="off">
		<div class="row">
			<div class="col-md-4">
				<div class="form-body">
					<div class="form-group">
						<label for="eventInput1">Enter Remarks</label>
						<input type="text" class="form-control" name="req_remark" id="req_remark">
						<input type="hidden" class="form-control" id="request_id" name="request_id" value="" >
					</div>
				</div>
			</div>
		</div>
		
		<div class=" text-right">
			<button type="reset" class="btn btn-warning mr-1">
				<i class="ft-x"></i> Reset
			</button>
			<button type="submit" id="sub" name="sub" class="btn btn-primary">
				<i class="la la-check-square-o"></i> Save
			</button>
		</div>
	</form>
	</div>
</div>
				
						</div>
                    </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>
function load_marks(rid)
{
	$('#request_id').val(rid);
}
</script>
<script>
	$('#sub').click(function() {
		var req_remark = $('#req_remark').val();
		var req_id = $('#request_id').val();
		if(req_remark == '')
		{
			alert("Please Enter Remarks");
			return false;
		}
		else
		{
			$.ajax({
				type: "POST",
				dataType:'json',
				data : { req_id : req_id, req_remark : req_remark },
				url: "<?php echo base_url();?>index.php/ProductRequest/requestRmkissUpdate",
				success: function(dataz) { 
					setTimeout(function() {
						window.location.href = '<?php echo site_url('ProductRequest/issuePendingList');?>';
					}, 200);
				}
			});
		}
	});
</script>

<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>