<div class="row"><!-- Earnings (Monthly) Card Example -->
<div class="col-xl-4 col-md-6 mb-4"><div class="card border-left-primary shadow h-100 py-2">
<div class="card-body"><div class="row no-gutters align-items-center"><div class="col mr-2">
<div class="text-xs font-weight-bold text-primary text-uppercase mb-1">TOTAL ONLINE CUSTOMERS</div><div class="h5 mb-0 font-weight-bold text-gray-800"><?php echo QueryDB("SELECT COUNT(*) FROM customers where branch=0")->fetchColumn(); ?></div></div><div class="col-auto"><i class="fas fa-calendar fa-2x text-gray-300"></i></div></div></div></div></div>

<div class="col-xl-4 col-md-6 mb-4">

<div class="card border-left-success shadow h-100 py-2"><div class="card-body">
<div class="row no-gutters align-items-center">
<div class="col mr-2">
<div class="text-xs font-weight-bold text-success text-uppercase mb-1">
TOTAL ONLINE EARNING</div><div class="h5 mb-0 font-weight-bold text-gray-800"><?php 
$tt = QueryDB("SELECT sum(amt_paid) as total FROM payment where pay_status=1 and type=1 ");
$tSum = $tt->fetch(PDO::FETCH_ASSOC);echo '&#8358;'.number_format($tSum['total'],2);
?></div></div>
<div class="col-auto"><i class="fas fa-dollar-sign fa-2x text-gray-300"></i></div>

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

<div class="col-xl-4 col-md-6 mb-4"><div class="card border-left-info shadow h-100 py-2">
<div class="card-body">
    <div class="row no-gutters align-items-center"><div class="col mr-2"><div class="text-xs font-weight-bold text-info text-uppercase mb-1"><?php  echo date('F');  ?>/ <?php echo date('Y'); ?> Earnings</div>

    <div class="row no-gutters align-items-center">
        <div class="col-auto"><div class="h5 mb-0 mr-3 font-weight-bold text-gray-800"><?php 
$tt = QueryDB("SELECT sum(amt_paid) as total FROM payment where pay_status=1 and type=1 and month='".date('m')."' ");
$tSum = $tt->fetch(PDO::FETCH_ASSOC);
echo '&#8358;'.number_format($tSum['total'],2); echo '<br/>';

$tt = QueryDB("SELECT sum(amt_paid) as total FROM payment where pay_status=1 and type=1 and year='".date('Y')."' ");
$tSum = $tt->fetch(PDO::FETCH_ASSOC);
echo '&#8358;'.number_format($tSum['total'],2);?></div>
</div></div></div><div class="col-auto"><i class="fas fa-clipboard-list fa-2x text-gray-300"></i></div></div></div></div></div>
</div><!-- Content Row -->