<?php include("parent/callMe.php"); ?>
<?php  include("sessioncheck.php"); 

 
                   

    $received_total=0;

    $b=$_REQUEST['branch'];
    $s=$_SESSION['current_session'];
    $mn=date("m");

    // get branch data

    $br="SELECT branch_id,Branch_Name,monthly_credit FROM edu_branch_config  WHERE branch_id='$b'";
 
    $branchData = $m->query($br);


$qr="SELECT SUM(collected_amount) as received, SUM(paid_again_amount) as againPay, SUM(collected_fine) as total_fine FROM eduportal_monthly_challan  WHERE branch_id='$b' AND session_id='$s' and month_id='$mn' and paid_status='1' ";
 
  $amount = $m->query($qr);

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



    $received_total=getCurrentMonthFeeReceived($_SESSION['current_session'],date('m'),$m); 

   
     $date1=date('Y-m');
    $qr3="SELECT SUM(amount) AS total  FROM eduportal_revenue_details WHERE branch_id='$b' and session_id='$s' and paid_date like '$date1-%'";

    
  //echo $qr3;
    $RevenueMonthly = $m->query($qr3);


    $paidDate=date("Y-m");
    $qr="SELECT SUM(paid_amount) AS total, SUM(paid_again_amount) as again_total  FROM employee_payroll WHERE branch_id='$b' and session_id='$s' and paid_date like '$paidDate%'";

  //echo $qr;
    $paid_salary = $m->query($qr);

    $salary=$paid_salary[0]['total']+$paid_salary[0]['again_total'];



    $FreeStudent="SELECT count(*) as total FROM eduportal_student_fee_structure as fee, edu_student_details as std WHERE fee.student_id=std.student_id and std.status='0' and fee.session_id='$s' and std.branch_id='$b' and fee.std_tution_fee = '0'"; 
 //print_r($FreeStudent);
   $TotalFreeStudent=$m->query($FreeStudent);
   $TotalStdFree=$TotalFreeStudent[0]['total'];


   // ==================================Total Expected Fee==============================================

  
$qr="SELECT SUM(fee.tutionfee) as tution,SUM(fee.transportfee) as trans,SUM(fee.total_fine) as fine, SUM(fee.balance) as balance,SUM(fee.misc_fee) as misc, SUM(disc_amount) as disc FROM eduportal_monthly_challan as fee,edu_student_details as std WHERE std.student_id=fee.student_id and std.status='0' and fee.branch_id='$b' AND fee.session_id='$s' AND fee.month_id='$mn'";
//print_r($qr);
$amount = $m->query($qr);
$total_exp=$amount[0]['tution']+$amount[0]['trans']+$amount[0]['fine']+$amount[0]['balance']+$amount[0]['misc']-$amount[0]['disc'];


$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='$s' and cha.month_id='$mn' and cha.challan_id=fee.challan_id and cha.branch_id='$b' ";
//print_r($qr);
$amount = $m->query($qr);


$TotalExpectedAmount=$total_exp+$amount[0]['total'];


 //  ====================================================================================================


//  =======================================Today Collection=====================================================

$date=date('Y-m-d');

$qr="SELECT SUM(fee.tutionfee) as tution, SUM(fee.transportfee) as trans,SUM(fee.collected_fine) as fine, SUM(fee.balance) as balance, SUM(fee.collected_amount) as coll  FROM eduportal_monthly_challan as fee, edu_student_details as std WHERE fee.student_id=std.student_id and fee.branch_id='$b' AND fee.session_id='$s' AND fee.paying_date='$date'";
//print_r($qr);
$amount = $m->query($qr);

$Todayrecieved=$amount[0]['coll']+$amount[0]['fine'];



$qr="SELECT SUM(fee.paid_again_amount) as againPay FROM eduportal_monthly_challan as fee, edu_student_details as std WHERE fee.student_id=std.student_id and fee.branch_id='$b' AND fee.session_id='$s' AND fee.paid_again_date='$date'";
//print_r($qr);
$amount = $m->query($qr);

$Todayagainrecieved=$amount[0]['againPay'];


$TodayTotalCollection=$Todayrecieved+$Todayagainrecieved;

//==========================================================================================================


//=============================================Total Expenses==================================================

 $qr="SELECT SUM(expense_amount) as expense FROM eduportal_expense_detail  WHERE branch_id='$b' AND session_id='$s' AND month_id='$mn' ";

  $amount = $m->query($qr);
  $total_expensse=$amount[0]['expense'];


//=============================================Today Expenses==================================================

   $date=date('Y-m-d');
  $qr="SELECT SUM(expense_amount) as expense FROM eduportal_expense_detail  WHERE branch_id='$b' AND session_id='$s' AND expense_date='$date' ";

  $amount = $m->query($qr);
  $today_expensse=$amount[0]['expense'];


//=============================================Today Present Staff==================================================

  $date=date('Y-m-d');

  $qr="SELECT count(*) as total FROM eduportal_hrm_emp_attendance WHERE attendance='P'  and branch_Id='$b' and date='$date'"; 
 
   $result=$m->query($qr);
   $present=$result[0]['total'];



//=============================================Today Absent Staff==================================================


   $date=date('Y-m-d');

  $qr="SELECT count(*) as total FROM eduportal_hrm_emp_attendance WHERE attendance='A'  and branch_Id='$b' and date='$date'"; 
 
   $result=$m->query($qr);
   $A=$result[0]['total'];


//=============================================Today Present Student========================================


   $date=date('Y-m-d');
  
  $qr="SELECT COUNT(*) as total FROM eduportal_attendance_detail as att, edu_student_details as std WHERE std.student_id=att.student_id and std.status='0' and att.attendance!='A' and att.attendance!='L' and att.attendance!='LA' and att.branch_Id='$b' and att.date='$date' and att.section_id!='0'"; 
 
   $result=$m->query($qr);
   $p=$result[0]['total'];



//=============================================Today Leave Student==================================================

    $date=date('Y-m-d');

   
  $qr="SELECT count(*) as total FROM eduportal_attendance_detail WHERE attendance='L'  and branch_Id='$b' and date='$date'"; 
 
   $result=$m->query($qr);
   $L=$result[0]['total'];




//=============================================Today Absent Student==================================================

$date=date('Y-m-d');

$qr="SELECT count(*) as total FROM eduportal_attendance_detail WHERE attendance='A'  and branch_Id='$b' and date='$date'"; 

$result=$m->query($qr);
$AA=$result[0]['total'];


//=============================================Today Short Leave Student==========================================

$date=date('Y-m-d');

$qr="SELECT count(*) as total FROM eduportal_attendance_detail WHERE attendance='SL'  and branch_Id='$b' and date='$date'"; 

$result=$m->query($qr);
$SL=$result[0]['total'];

//===================================================total active students==================================




$qr="SELECT count(*) as total FROM edu_student_details WHERE status='0' and branch_Id='$b' and session_id='$s'"; 

$result=$m->query($qr);
$ActiveStudents=$result[0]['total'];



//===================================================In-active students current session==============================




$qr="SELECT count(*) as total FROM edu_student_details WHERE status='1' and branch_Id='$b' and session_id='$s'"; 

$result=$m->query($qr);
$InActiveStudents=$result[0]['total'];






//===================================================total active staff==================================




$qr="SELECT count(*) as total FROM edu_user_config WHERE status='0' and branch_Id='$b'"; 

$result=$m->query($qr);
$ActiveStaff=$result[0]['total'];



//===================================================In-active staff current session==============================




$qr="SELECT count(*) as total FROM edu_user_config WHERE status='1' and branch_Id='$b'";  

$result=$m->query($qr);
$InActiveStaff=$result[0]['total'];





//===================================================Total Inquiry==============================================




$qr="SELECT count(*) as total FROM eduportal_student_inquiry_form WHERE branch_id='$b' and inquiry_date like '$date1-%'"; 

$result=$m->query($qr);
$TotalInquiry=$result[0]['total'];



//===================================================Today Inquiry==============================================


$date=date("Y-m-d");

$qr="SELECT count(*) as total FROM eduportal_student_inquiry_form WHERE branch_id='$b' and inquiry_date='$date'"; 

$result=$m->query($qr);
$Todayinquiry=$result[0]['total'];



//=========================================messages sent===============================================


$qr="SELECT sum(msg_count) as total FROM edu_messages_details WHERE branch_id='$b' and msg_date like '$date1-%'"; 

$result=$m->query($qr);
$TotalSentMsg=$result[0]['total'];



//=========================================today messages sent===============================================


$qr="SELECT sum(msg_count) as total FROM edu_messages_details WHERE branch_id='$b' and msg_date like '$date%'"; 

$result=$m->query($qr);
$TotalSentMsg=$result[0]['total'];




//=============================================admission current month======================================


 $sql="SELECT count(*) as total FROM edu_student_details WHERE branch_id='$b' and session_id='$s' and status=0 and entrance_date like '$date1-%'";
  $Month_admission=$m->query($sql);

  $currentMonth_admission=$Month_admission[0]['total'];

?>





<!-- ========================================================================================================= -->




<div id="">    

<h3 style="text-align:center;background-color: #042954;color: white;font-weight: bold;"><?php echo $branchData[0]['Branch_Name'];?></h3>   



  <div class="col-lg-3 col-md-3 col-sm-6 col-xs-12">
<a href="#">
<div class="dashboard-summery-one" style="border: 1px solid lightgray;">
<div class="row">
<div class="col-md-4">
<div class="item-icon bg-light-green">
<i class="flaticon-user text-green"></i>
</div>
</div>
<div class="col-md-8">
<div class="item-content">
<div class="item-title" style="font-size: 15px;">Active Students</div>
<div class="item-number" style="font-size: 15px;"><span></span><span class="counter" data-num=""></span>
<?php echo $ActiveStudents; ?></div>
</div>
</div>
</div>
</div>

</a>  
</div>



<div class="col-lg-3 col-md-3 col-sm-6 col-xs-12">
<a href="#">
<div class="dashboard-summery-one" style="border: 1px solid lightgray;">
<div class="row">
<div class="col-md-4">
<div class="item-icon bg-light-red">
<i class="flaticon-user text-red"></i>
</div>
</div>
<div class="col-md-8">
<div class="item-content">
<div class="item-title" style="font-size: 15px;">In-Active Students</div>
<div class="item-number" style="font-size: 15px;"><span></span><span class="counter" data-num=""></span>
<?php echo $InActiveStudents; ?></div>
</div>
</div>
</div>
</div>

</a>  
</div>





<div class="col-lg-3 col-md-3 col-sm-6 col-xs-12">
<a href="#">
<div class="dashboard-summery-one" style="border: 1px solid lightgray;">
<div class="row">
<div class="col-md-4">
<div class="item-icon bg-light-green">
<i class="flaticon-user text-green"></i>
</div>
</div>
<div class="col-md-8">
<div class="item-content">
<div class="item-title" style="font-size: 14px;">Admissions (<?php echo date("M")?>)</div>
<div class="item-number" style="font-size: 15px;"><span></span><span class="counter" data-num=""></span>
<?php echo $currentMonth_admission; ?></div>
</div>
</div>
</div>
</div>

</a>  
</div>







<div class="col-lg-3 col-md-3 col-sm-6 col-xs-12">
<a href="#">
<div class="dashboard-summery-one" style="border: 1px solid lightgray;">
<div class="row">
<div class="col-md-4">
<div class="item-icon bg-light-red">
<i class="flaticon-user text-red"></i>
</div>
</div>
<div class="col-md-8">
<div class="item-content">
<div class="item-title" style="font-size: 15px;">Total Admission</div>
<div class="item-number" style="font-size: 15px;"><span></span><span class="counter" data-num=""></span>
<?php echo $ActiveStudents+$InActiveStudents; ?></div>
</div>
</div>
</div>
</div>

</a>  
</div>



<div class="col-lg-3 col-md-4 col-sm-6 col-xs-12">
<a href="#">
<div class="dashboard-summery-one" style="border: 1px solid lightgray;">
<div class="row">
<div class="col-md-4">
<div class="item-icon bg-light-green">
<i class="flaticon-money text-green"></i>
</div>
</div>
<div class="col-md-8">
<div class="item-content">
<div class="item-title" style="font-size: 15px;">Expected Fee (<?php echo date("M");?>)</div>
<div class="item-number" style="font-size: 15px;"><span></span><span class="counter" data-num=""><?php echo number_format($TotalExpectedAmount);?></span></div>
</div>
</div>
</div>
</div>
</a>
</div>







<div class="col-lg-3 col-md-4 col-sm-6 col-xs-12">
<a href="#">
<div class="dashboard-summery-one" style="border: 1px solid lightgray;">
<div class="row">
<div class="col-md-4">
<div class="item-icon bg-light-green">
<i class="flaticon-money text-green"></i>
</div>
</div>
<div class="col-md-8">
<div class="item-content">
<div class="item-title" style="font-size: 15px;">Fee Received (<?php echo date("M");?>)</div>
<div class="item-number" style="font-size: 15px;"><span></span><span class="counter" data-num=""></span>
<?php  


$qr="SELECT SUM(fee.collected_amount) as fee_received, SUM(fee.paid_again_amount) as againPay, SUM(fee.collected_fine) as fine FROM eduportal_monthly_challan as fee,edu_student_details as std WHERE std.student_id=fee.student_id and fee.branch_id='$b' AND fee.session_id='$s' AND fee.month_id='$mn'";

$amount = $m->query($qr);


$received_amount=$amount[0]['fee_received']+$amount[0]['againPay'];

?>
<div class="item-number"><span></span><span class="counter" data-num=""><?php echo number_format($received_amount);?></span></div>
</div>
</div>
</div>
</div>
</div>
</a>
</div>









<div class="col-lg-3 col-md-3 col-sm-6 col-xs-12">

<div class="dashboard-summery-one" style="border: 1px solid lightgray;">
<div class="row">
<div class="col-md-3">
<div class="item-icon bg-light-green">
<i class="flaticon-money text-green"></i>
</div>
</div>
<div class="col-md-9">
<div class="item-content">

<div class="item-title" style="font-size: 15px;">Receiveable (<?php echo date("M");?>)</div>


<div class="item-number" style="font-size: 15px;"><span></span><span class="counter" data-num=""><?php echo number_format(intval($TotalExpectedAmount)-intval($received_amount));?></span></div>

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

</div>






<div class="col-lg-3 col-md-3 col-sm-6 col-xs-12">
<a href="#">
<div class="dashboard-summery-one" style="border: 1px solid lightgray;">
<div class="row">
<div class="col-md-4">
<div class="item-icon bg-light-green">
<i class="flaticon-money text-green"></i>
</div>
</div>
<div class="col-md-8">
<div class="item-content">
<div class="item-title" style="font-size: 15px;">Today Collection </div>
<div class="item-number" style="font-size: 15px;"><span></span><span class="counter" data-num=""></span>
<?php echo number_format($TodayTotalCollection);?></div>
</div>
</div>
</div>
</div>
</a>

</div>






<div class="col-lg-3 col-md-3 col-sm-6 col-xs-12">
<a href="#">
<div class="dashboard-summery-one" style="border: 1px solid lightgray;">
<div class="row">
<div class="col-md-4">
<div class="item-icon bg-light-red">
<i class="flaticon-money text-red"></i>
</div>
</div>
<div class="col-md-8">
<div class="item-content">
<div class="item-title" style="font-size: 14px;">Total Expenses (<?php echo date("M");?>)</div>
<div class="item-number" style="font-size: 14px;"><span></span><span class="counter" data-num=""></span>
<?php echo number_format($total_expensse);?></div>
</div>
</div>
</div>
</div>

</a>  
</div>





<div class="col-lg-3 col-md-3 col-sm-6 col-xs-12">
<a href="#">
<div class="dashboard-summery-one" style="border: 1px solid lightgray;">
<div class="row">
<div class="col-md-4">
<div class="item-icon bg-light-red">
<i class="flaticon-money text-red"></i>
</div>
</div>
<div class="col-md-8">
<div class="item-content">
<div class="item-title" style="font-size: 15px;">Today Expenses</div>
<div class="item-number" style="font-size: 15px;"><span></span><span class="counter" data-num=""></span>
<?php echo number_format($today_expensse);?></div>
</div>
</div>
</div>
</div>

</a>  
</div>


<div class="col-lg-3 col-md-3 col-sm-6 col-xs-12">
<a href="#">
<div class="dashboard-summery-one" style="border: 1px solid lightgray;">
<div class="row">
<div class="col-md-4">
<div class="item-icon bg-light-red">
<i class="flaticon-money text-red"></i>
</div>
</div>
<div class="col-md-8">
<div class="item-content">
<div class="item-title" style="font-size: 15px;">Total Inquiry (<?php echo date("M");?>)</div>
<div class="item-number" style="font-size: 15px;"><span></span><span class="counter" data-num=""></span>
<?php echo $TotalInquiry;?></div>
</div>
</div>
</div>
</div>

</a>  
</div>




<div class="col-lg-3 col-md-3 col-sm-6 col-xs-12">
<a href="#">
<div class="dashboard-summery-one" style="border: 1px solid lightgray;">
<div class="row">
<div class="col-md-4">
<div class="item-icon bg-light-red">
<i class="flaticon-money text-red"></i>
</div>
</div>
<div class="col-md-8">
<div class="item-content">
<div class="item-title" style="font-size: 15px;">Today Inquiry</div>
<div class="item-number" style="font-size: 15px;"><span></span><span class="counter" data-num=""></span>
<?php echo $TodayInquiry;?></div>
</div>
</div>
</div>
</div>

</a>  
</div>




<!-- <div class="col-lg-3 col-md-3 col-sm-6 col-xs-12">
<a href="#">
<div class="dashboard-summery-one" style="border: 1px solid lightgray;">
<div class="row">
<div class="col-md-4">
<div class="item-icon bg-light-red">
<i class="flaticon-money text-red"></i>
</div>
</div>
<div class="col-md-8">
<div class="item-content">
<div class="item-title" style="font-size: 15px;">Profit (<?php echo date("M");?>)</div>
<div class="item-number" style="font-size: 15px;"><span></span><span class="counter" data-num=""></span>
<?php echo number_format($RevenueMonthly[0]['total']+$received_amount-$salary-$total_expensse,2);?></div>
</div>
</div>
</div>
</div>

</a>  
</div> -->


<div class="col-lg-3 col-md-3 col-sm-6 col-xs-12">
<a href="#">
<div class="dashboard-summery-one" style="border: 1px solid lightgray;">
<div class="row">
<div class="col-md-4">
<div class="item-icon bg-light-green">
<i class="flaticon-user text-green"></i>
</div>
</div>
<div class="col-md-8">
<div class="item-content">
<div class="item-title" style="font-size: 15px;">Active Staff</div>
<div class="item-number" style="font-size: 15px;"><span></span><span class="counter" data-num=""></span>
<?php echo $ActiveStaff; ?></div>
</div>
</div>
</div>
</div>

</a>  
</div>



<div class="col-lg-3 col-md-3 col-sm-6 col-xs-12">
<a href="#">
<div class="dashboard-summery-one" style="border: 1px solid lightgray;">
<div class="row">
<div class="col-md-4">
<div class="item-icon bg-light-red">
<i class="flaticon-user text-red"></i>
</div>
</div>
<div class="col-md-8">
<div class="item-content">
<div class="item-title" style="font-size: 15px;">In-Active Staff</div>
<div class="item-number" style="font-size: 15px;"><span></span><span class="counter" data-num=""></span>
<?php echo $InActiveStaff; ?></div>
</div>
</div>
</div>
</div>

</a>  
</div>





<div class="col-lg-3 col-md-3 col-sm-6 col-xs-12">
<a href="#">
<div class="dashboard-summery-one" style="border: 1px solid lightgray;">
<div class="row">
<div class="col-md-4">
<div class="item-icon bg-light-green">
<i class="flaticon-user text-green"></i>
</div>
</div>
<div class="col-md-8">
<div class="item-content">
<div class="item-title" style="font-size: 15px;">Today Present Staff</div>
<div class="item-number" style="font-size: 15px;"><span></span><span class="counter" data-num=""></span>
<?php echo $present; ?></div>
</div>
</div>
</div>
</div>

</a>  
</div>







<div class="col-lg-3 col-md-3 col-sm-6 col-xs-12">
<a href="#">
<div class="dashboard-summery-one" style="border: 1px solid lightgray;">
<div class="row">
<div class="col-md-4">
<div class="item-icon bg-light-red">
<i class="flaticon-user text-red"></i>
</div>
</div>
<div class="col-md-8">
<div class="item-content">
<div class="item-title" style="font-size: 15px;">Today Absent Staff</div>
<div class="item-number" style="font-size: 15px;"><span></span><span class="counter" data-num=""></span>
<?php echo $A; ?></div>
</div>
</div>
</div>
</div>

</a>  
</div>





<div class="col-lg-3 col-md-3 col-sm-6 col-xs-12">
<a href="#">
<div class="dashboard-summery-one" style="border: 1px solid lightgray;">
<div class="row">
<div class="col-md-4">
<div class="item-icon bg-light-green">
<i class="flaticon-user text-green"></i>
</div>
</div>
<div class="col-md-8">
<div class="item-content">
<div class="item-title" style="font-size: 12px;">Today Present Students</div>
<div class="item-number" style="font-size: 14px;"><span></span><span class="counter" data-num=""></span>
<?php echo $p; ?></div>
</div>
</div>
</div>
</div>

</a>  
</div>






<div class="col-lg-3 col-md-3 col-sm-6 col-xs-12">
<a href="#">
<div class="dashboard-summery-one" style="border: 1px solid lightgray;">
<div class="row">
<div class="col-md-4">
<div class="item-icon bg-light-green">
<i class="flaticon-user text-green"></i>
</div>
</div>
<div class="col-md-8">
<div class="item-content">
<div class="item-title" style="font-size: 12px;">Today Leave Student</div>
<div class="item-number" style="font-size: 14px;"><span></span><span class="counter" data-num=""></span>
<?php echo $L; ?></div>
</div>
</div>
</div>
</div>

</a>  
</div>




<div class="col-lg-3 col-md-3 col-sm-6 col-xs-12">
<a href="#">
<div class="dashboard-summery-one" style="border: 1px solid lightgray;">
<div class="row">
<div class="col-md-4">
<div class="item-icon bg-light-red">
<i class="flaticon-user text-red"></i>
</div>
</div>
<div class="col-md-8">
<div class="item-content">
<div class="item-title" style="font-size: 12px;">Today Absent Student</div>
<div class="item-number" style="font-size: 14px;"><span></span><span class="counter" data-num=""></span>
<?php echo $AA; ?></div>
</div>
</div>
</div>
</div>

</a>  
</div>




<div class="col-lg-3 col-md-3 col-sm-6 col-xs-12">
<a href="#">
<div class="dashboard-summery-one" style="border: 1px solid lightgray;">
<div class="row">
<div class="col-md-4">
<div class="item-icon bg-light-red">
<i class="flaticon-user text-red"></i>
</div>
</div>
<div class="col-md-8">
<div class="item-content">
<div class="item-title" style="font-size: 12px;">Short Leave Student</div>
<div class="item-number" style="font-size: 14px;"><span></span><span class="counter" data-num=""></span>
<?php echo $SL; ?></div>
</div>
</div>
</div>
</div>

</a>  
</div>





  <div class="col-lg-3 col-md-3 col-sm-6 col-xs-12">
<a href="#">
<div class="dashboard-summery-one" style="border: 1px solid lightgray;">
<div class="row">
<div class="col-md-4">
<div class="item-icon bg-light-green">
<i class="fa fa-envelope text-green"></i>
</div>
</div>
<div class="col-md-8">
<div class="item-content">
<div class="item-title" style="font-size: 15px;">Monthly SMS Limit</div>
<div class="item-number" style="font-size: 15px;"><span></span><span class="counter" data-num=""></span>
<?php echo $branchData[0]['monthly_credit']; ?></div>
</div>
</div>
</div>
</div>

</a>  
</div>



<div class="col-lg-3 col-md-3 col-sm-6 col-xs-12">
<a href="#">
<div class="dashboard-summery-one" style="border: 1px solid lightgray;">
<div class="row">
<div class="col-md-4">
<div class="item-icon bg-light-red">
<i class="fa fa-envelope text-red"></i>
</div>
</div>
<div class="col-md-8">
<div class="item-content">
<div class="item-title" style="font-size: 15px;">Sent SMS</div>
<div class="item-number" style="font-size: 15px;"><span></span><span class="counter" data-num=""></span>
<?php echo $TotalSentMsg; ?></div>
</div>
</div>
</div>
</div>

</a>  
</div>





<div class="col-lg-3 col-md-3 col-sm-6 col-xs-12">
<a href="#">
<div class="dashboard-summery-one" style="border: 1px solid lightgray;">
<div class="row">
<div class="col-md-4">
<div class="item-icon bg-light-green">
<i class="fa fa-envelope text-green"></i>
</div>
</div>
<div class="col-md-8">
<div class="item-content">
<div class="item-title" style="font-size: 14px;">Remaining SMS</div>
<div class="item-number" style="font-size: 15px;"><span></span><span class="counter" data-num=""></span>
<?php echo $branchData[0]['monthly_credit']-$TotalSentMsg; ?></div>
</div>
</div>
</div>
</div>

</a>  
</div>







<div class="col-lg-3 col-md-3 col-sm-6 col-xs-12">
<a href="#">
<div class="dashboard-summery-one" style="border: 1px solid lightgray;">
<div class="row">
<div class="col-md-4">
<div class="item-icon bg-light-red">
<i class="fa fa-envelope text-red"></i>
</div>
</div>
<div class="col-md-8">
<div class="item-content">
<div class="item-title" style="font-size: 15px;">Today Sent SMS</div>
<div class="item-number" style="font-size: 15px;"><span></span><span class="counter" data-num=""></span>
<?php echo $TodaySentMsg; ?></div>
</div>
</div>
</div>
</div>

</a>  
</div>








                     
</div>

              


            

              

          




        













         



         


            



                           













 










            





