<?php $this->load->view('includes/top');
//trace($post_err);
//trace($matrix_arr_db);
 ?>
<!--  BEGIN MAIN CONTAINER  -->
<link rel="stylesheet" type="text/css" href="<?php echo admin_url(); ?>assets/css/forms/switches.css">
<link rel="stylesheet" type="text/css" href="<?php echo admin_url(); ?>plugins/editors/markdown/simplemde.min.css">
<div class="main-container" id="container">
  <div class="overlay"></div>
  <div class="search-overlay"></div>
  <?php $this->load->view('includes/left'); ?>
  <!--  BEGIN CONTENT AREA  -->
  <div id="content" class="main-content">
    <div class="layout-px-spacing">
      <div class="row layout-top-spacing layout-spacing">
        <div class="col-lg-12">
          <div class="statbox widget box box-shadow">
            
            <?php echo form_open("wps-admin/products/view_stocks/" . $this->uri->segment(4), 'id="myform"');  
            echo success_message(); validation_message(); error_message();
            ?>
            <div class="widget-header">
              <div class="row">
                <div class="col-xl-6 col-md-6 col-sm-6 col-6">
                  <h4><?php echo $headingTitle; ?></h4>					<input type="hidden" name="sub" value="1"> 
                </div>
                <div class="col-xl-6 col-md-6 col-sm-6 col-6 text-right">
                  <h4>
                    <a href="<?php echo base_url(); ?>wps-admin/news/index/" class="btn btn-danger btn-sm mb-2"><i class="fa fa-exclamation-circle"></i> Cancel</a>
                    <button type="submit" class="btn btn-primary btn-sm mb-2"><i class="fa fa-plus"></i> Save</button>
                  </h4>
                </div>
              </div>
            </div>
            <div class="widget-content widget-content-area">
              <div class="table-responsive mb-4">

             
          <table class="table datatable" id="my_data">			  <thead>
				  <td><strong>Size</strong></td>
				  <td><strong>Quantity</strong></td>
				  <td><strong>Product Price</strong></td>
			  <td><strong>Discounted Price</strong></td>
              </thead>			<tbody>			<input type="hidden" name="product" class="form-control" value="<?php echo $this->uri->segment(4); ?>" />	
              <?php foreach ($size_data as $size) { ?>
                
                    <tr>   
                      <td>						<input type="hidden" name="product_id[]" class="form-control" value="<?php echo $this->uri->segment(4); ?>" />	
                        <select name="size[]" class="form-control" >
                          <option value="<?php echo $size['size_id']; ?>" selected><?php echo $size['size_name']; ?></option>
                        </select>						
                      </td>
                      <td>
                        <input type="text" name="quantity[]" class="form-control" value="<?php echo $size['quantity']; ?>" />
        
                      </td>
                      <td>
                        <input type="text" name="product_price[]" class="form-control" value="<?php echo $size['product_price']; ?>" />
                      </td>
                      <td>
                        <input type="text" name="product_discounted_price[]" class="form-control" value="<?php echo $size['product_discounted_price']; ?>" />
                      
                      </td>
                    </tr>			  <?php } ?>
          </tbody>
          </table>



              <div class="widget-header">
                <div class="row">
                  <div class="col-xl-6 col-md-6 col-sm-6 col-6">&nbsp;</div>
                  <div class="col-xl-6 col-md-6 col-sm-6 col-6 text-right">
                    <h4>
                      <a href="<?php echo base_url(); ?>wps-admin/news" class="btn btn-danger btn-sm mb-2"><i class="fa fa-exclamation-circle"></i> Cancel</a>
                      <button type="submit" class="btn btn-primary btn-sm mb-2"><i class="fa fa-plus"></i> Save</button>
                      <input type="hidden" name="sub" value="Save" /> 
                      <!-- <button type="submit" class="btn btn-info btn-sm mb-2"><i class="fa fa-plus-square"></i> Save & New</button>
                      <button type="submit" class="btn btn-secondary btn-sm mb-2"><i class="fa fa-plus-square"></i> Save & Close</button> -->
                    </h4>
                  </div>
                </div>
              </div>
              <?php echo form_close(); ?>
            </div>
          </div>
        </div>
      </div>
      <div class="footer-wrapper">
        <div class="footer-section f-section-1">
          <p class="terms-conditions">All Rights Reserved. Powered By <a href="https://www.webpulseindia.com/" target="_blank">Webpulse</a></p>
        </div>
        <div class="footer-section f-section-2">
          <p class="">Coded with <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-heart"><path d="M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z"></path></svg></p>
        </div>
      </div>
    </div>
    <!--  END CONTENT AREA  -->
  </div>
  <!-- END MAIN CONTAINER -->
  <?php $this->load->view('includes/bottom'); ?>
  
  <?php die(); ?>
