<html>
    
	   <a href="Duplicate_Refund.php" target="_blank"><div class="imgdiv">
	    <img src="Duplicate_Payment.png"></img>
	    <?php
	        date_default_timezone_set("asia/kolkata");
            $date=date("Y-m-d");
            $time=date("h:i:s A");
    
	        $dateCronJob=date_create($date);
	        date_sub($dateCronJob,date_interval_create_from_date_string("1 days"));
            $resultdateCB=date_format($dateCronJob,"Y-m-d");
            
    	    $quGetDupRef="select Paynrechid, count(Paynrechid) from wallet where Date='$resultdateCB' and Transactiontype='Recharge_Refund' and ActiveRefund='0' group By Paynrechid having Count(Paynrechid)>1;";
	        $reGetDupRef=mysqli_query($con,$quGetDupRef);
	        $DupRef=mysqli_num_rows($reGetDupRef);
	        if($DupRef>=1)
	        {
	              echo "<a href='Duplicate_Refund.php' target='_blank'><div id='notifidiv'>". $DupRef."</div></a>";
	        }
	   
	   ?>
	   </div></a>
	   <?php
	    $updateCronJobTime="update Cron_Job set Date='$date', Time='$time' where Title='Refund'";
	    mysqli_query($con,$updateCronJobTime);
	   
	   ?>

</html>