<?php   
	include_once("../view/header-footer/header.php");  
?>  
  
  
  
   <!-- Features -->
   <div class="innerDeader">
      <div class="container">
          <a href="javascript:void(0);" id="go-back" class="goBack PaySound">
           <img src="<?php echo ROOTPATH;?>/images/Arrow 1.svg" alt="back">
       </a>
          <h4>IMPS/NEFT    Reporting</h4>
     </div>    
   </div>
   <div class="innerBody">
       <div class="container">
         <di class="tableBox">
            <table>
                
                <tr>
                        <th   style="width:auto">S No.</th>   
                        <th   style="width:auto">Status</th>  
                        <th   style="width:auto">Amount</th> 
                        <th   style="width:auto">Witdr.Date</th>  
                        <th   style="width:auto">Updt.Date</th> 
                        <th   style="width:auto">Receipt</th> 
                        
                        
                </tr>  
                
                    <?php 
                                $sr = 1;
                                foreach($Result as $dmm) 
                                {         
                                    $stmt=$conn->prepare("select  * from  UI__Rgst  where cuurentId=:cuurentId");   
                                    $stmt->bindValue(':cuurentId',   $dmm->custId, PDO::PARAM_STR);  
                                    $stmt->execute();  
                                    $Result1 = $stmt->fetch(PDO::FETCH_OBJ);  
                                ?>   
                     <tr>
                                <td><?php echo $sr++;?></td>
                               <td> 
                                            
                                       <?php  if($dmm->rejStstus==1)  { ?>  
                                            <span style="color:red;">Reject</span>
                                        <?php } else { ?>    
                                           
                                        <?php  if($dmm->status==1)  { ?>  
                                            <span style="color:green;">Success</span>
                                        <?php } else if($dmm->status==2)  { ?> 
                                            
                                        <?php   } else { ?>
                                            <span style="color:orange;">Pending</span>
                                        <?php   }  
                                        
                                        }
                                        ?>
                               </td> 
                                <td>&#8377;<?php echo $dmm->amt;?></td>    
                                <td><?php echo $dmm->Tdate;?></td>   
                                <td><?php echo $dmm->paidDateTime;?></td>   
                                
                                
                                 <td>
                                     <?php  
                                                  $stmt=$conn->prepare("select type  from   UI__Receipt  where cdId =:cdId    ");   
                                                    $stmt->bindValue(':cdId',  $dmm->cdId , PDO::PARAM_INT);  
                                                    $stmt->execute(); 
                                                    $cdId = $stmt->fetch(PDO::FETCH_OBJ);  

                                                    if($cdId->type==7) 
                                                    { 
                                                    if($dmm->Intype!='REFUNDED') { ?> 
                                                    <a href="moneyRec.php?id=<?php echo $dmm->cdId;?>"> View </a> 
                                                    <?php }
                                                    
                                                    }else if($cdId->type==1) { 
                                                    ?>    
                                                        <a href="viewRecUpi.php?id=<?php echo $dmm->cdId;?>"> View </a>  
                                                    <?php } else { ?>
                                                    
                                                     <a href="viewRec.php?id=<?php echo $dmm->cdId;?>"> View </a>  
                                                    <?php 
                                                        
                                                    } 
                                        ?> 
                                 </td>
						    	</tr>
                    <?php                
                        } 
                               
                	?>  
              </table>
         </div>
       </div>
   </div>
     
</div>
 
<?php 
  include_once("../view/header-footer/footer.php");  
    unset($_SESSION['TpMsg']);