<?php
defined('BASEPATH') OR exit('No direct script access allowed');
?>

      <div class="main my-0">
        <div class="row mt-3 mx-0">
          <div class="col-md-6">
            <h3><?php echo $pgheading;?></h3>
          </div>
          <div class="col-md-5 text-right">
            &nbsp;
          </div>
        </div>
        
        <div class="container_fluid mt-2 px-3">
		<form name="frmgeneral" method="post" action="account/<?php echo $mgmtname;?>/managedata" enctype="multipart/form-data">
		<input type="hidden" name="rsrcid" value="<?php echo $rsrcid;?>">                
        <table class="webforms mt-0 table-responsive-sm">
      
         <tr>
          <td width="20%"><label>Select Outlet:</label></td>
          <td width="80%">
		  <select name="outletid" id="outletid" class="js-example-basic-single" required>
		  <option value="">Select Outlet</option>
						<?php
						if(is_array($outletlist) && count(array_filter($outletlist))>0)
						{

							foreach($outletlist as $outletrow)
							{
								$sel_outlet ="";
								if($info4edit->fld_outletid==$outletrow->fld_id)
								{
									$sel_outlet = 'selected="selected"';
								}				
									?>
											<option value="<?php echo $outletrow->fld_id;?>" <?php echo $sel_outlet;?>><?php echo $outletrow->fld_name;?></option>
									<?php
								
							}
						}
						?> 
		  </select>
          
          </td>
         </tr> 

		<tr>
          <td><label>Product:</label></td>
          <td>
		  <select name="productid" id="productid" required class="js-example-basic-single">
		  <option value="">Select Product</option>
						<?php
						if(is_array($productlist) && count(array_filter($productlist))>0)
						{

							foreach($productlist as $productrow)
							{
								$sel_prod ="";
								if($info4edit->fld_productid==$productrow->fld_id)
								{
									$sel_prod = 'selected="selected"';
								}				
									?>
											<option value="<?php echo $productrow->fld_id;?>" <?php echo $sel_prod;?>><?php echo $productrow->fld_name;?></option>
									<?php
								
							}
						}
						?> 
						
		  </select>
		  </td>
         </tr> 
   
         <tr>
          <td><label>From Price:</label></td>
          <td><input type="number" name="fromvalue" id="fromvalue" value="<?php if($info4edit) { echo $info4edit->fld_fromvalue; }?>" required></td>
         </tr> 
        		
         <tr>
          <td><label>To Price:</label></td>
          <td><input type="number" name="tovalue" id="tovalue" value="<?php if($info4edit) { echo $info4edit->fld_tovalue; }?>" required></td>
         </tr> 

		 <tr>
             <td></td>
             <td><button class="btn btn-danger">Submit</button></td>
         </tr>
         </table>
         </form> 
	         <div class="clearfix"></div>          
        </div>
       </div>
