<?php
	include_once('../config.php');   
    
  
          
    if(!isset($_SESSION['userId']))
    { 
         header("Location: ../");
         die;
    }
       
                
                    
                   
                
                  
                $stmt=$conn->prepare("SELECT RegOn FROM  UI__Rgst where cuurentId=:cuurentId  ");  
                $stmt->bindValue(':cuurentId', $_SESSION['userId'] , PDO::PARAM_STR); 
                $stmt->execute(); 
                $RegOn = $stmt->fetch(PDO::FETCH_OBJ); 
                $Fdate = date("Y-m-d", strtotime($RegOn->RegOn));  
                 
                
                $start    = new DateTime($Fdate);
                $start->modify('first day of this month');
                $end      = new DateTime(date("Y-m-d"));
                $end->modify('first day of next month');
                $interval = DateInterval::createFromDateString('1 month');
                $period   = new DatePeriod($start, $interval, $end);
						
                $stmt=$conn->prepare("SELECT * FROM `UI__DailyROIGene`      GROUP by Tdate order by id  desc ");    
                $stmt->execute(); 
                //$Result = $stmt->fetchAll(PDO::FETCH_OBJ);   
                
                
include_once("../view/dashboard/DebitCredit.php");
?>