<?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 col-md-8">
		<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="30%"><label>Select Outlet:</label></td>
          <td width="70%">
		  <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 on which discount is applicable:</label></td>
          <td>
		  <select name="productid" id="productid" required class="js-example-basic-single" style="width:550px;">
		  <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>Discounted Product:</label></td>
          <td>
		  <select name="discprodid" id="discprodid" required class="js-example-basic-single" style="width:550px;">
		  <option value="">Select Product</option>
						<?php
						if(is_array($productlist) && count(array_filter($productlist))>0)
						{

							foreach($productlist as $productrow)
							{
								$sel_prod ="";
								if($info4edit->fld_discprodid==$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></td>
             <td><button class="btn btn-danger">Submit</button></td>
         </tr>
         </table>
         </form> 
	         <div class="clearfix"></div>          
        </div>
       </div>
