<?php   
	include_once("../view/header-footer/header.php");  
?>   

  <link rel="stylesheet" href="/resources/demos/style.css">
  <script src="https://code.jquery.com/jquery-3.6.0.js"></script>
  <script src="https://code.jquery.com/ui/1.13.2/jquery-ui.js"></script>
  <script>
  $( function() {
    $( "#accordion" ).accordion();
  } );
  </script>
   <!-- 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>  
       <?php 
         
            echo "<h4>CREDIT & DEBIT REPORT</h4>";
    ?>  
    
     </div>    
</div>
   
    
<div class="innerBody"> 
<div class="row">
    <div class="col-6 text-center">
        
        <a href="CreditData.php">
         <span class="btn waves-effect waves-light bannButton bannButtonGr  w-100"  style="background: #00D154!important;">CREDIT: &#8377; <?php echo totalCredit();?></span>  
         </a>
    </div>
    <div class="col-6 text-center">
        <a href="DebitData.php">
            <span class="btn waves-effect waves-light bannButton bannButtonGr w-100"  style="background: red!important;">
            DEBIT: &#8377; <?php echo totalDebit();?>
        </span>
        </a>
    </div>
    <div class="col-12 text-center mt-2 mb-2">
    <span class="btn waves-effect waves-light bannButton bannButtonGr w-100" >BALANCE: &#8377; <?php echo number_format((float)(GetBalance()), 2, '.', '');?></span>
    </div>
    
     </div>
<div>
    
    <?php 
    
    $sr=1;
    foreach ($period as $dt) 
    { 
        
 ?>
        <?php 
            if($sr%2==0) {
        ?>
       <a  style="color:white;" href="DebitCreditInner.php?dt=<?php echo $dt->format("m-Y");?>"> 
        <h3 style="width:100%;background:#8c8b8b;border-radius:2px;padding:2px;font-size:16px;text-align:center;font-weight:bold;">
     
            <?php echo $dt->format("M-Y");?> 
        
        </h3> 
        </a>
        <?php }else { ?>
        
        
        <a  style="color:white;" href="DebitCreditInner.php?dt=<?php echo $dt->format("m-Y");?>"> 
        <h3 style="width:100%;background:#a3a3a3;border-radius:2px;padding:2px;font-size:16px;text-align:center;font-weight:bold;">
                <?php echo $dt->format("M-Y");?> 
        </h3>
        </a>
        
        
        <?php } ?>
     
 <?php  
        $sr++; 
    }
  ?>       
</div>     
   </div> 
</div>
 
<?php 
  include_once("../view/header-footer/footer.php");  
    unset($_SESSION['TpMsg']);