<div class="container-fluid" id="co"> 
  <small><h6>OLD DEBIT PAYMENT REPORTS:</h6></small>
<table width="5%" class="table">
    <tr>
    
    <td colspan="2">  
     <small>DEBIT PAYMENT:</small>
    </td>
               
   </tr>
     <tr>

        <td>  
          <small>C'S NAME</small>
         </td>
        <td>  
           <small>AMOUNT</small>
         </td>          
    </tr>
 <?php
 require_once"labClass.php";
 $con=new labClass();
$cc=0;
$sdate= $_POST['sdate'];   
$tptd=0;
$tbal=0;
$tPrice=0;
$tdbtP=0;

$c1=0;
$r2=0;
$status="NOT PAID";
     
     //echo $sdate;
      $chkp= $con->getDebitsNonPrecBsysD($sdate); 
     //print_r($chkp);
       if ($chkp->rowCount()>0) {

       $chp=$chkp->fetchAll();
  
        foreach ($chp as $key => $p) {
             $r2++;
         $orderID=$p['orderID'];  
          ?>

            <tr>
            <td>
                <?php echo $p['orderID'].".". $p['cname'];?>
            </td>
            <td align="right">
               <?php echo number_format($p['paidAmount'],2);?>  
            </td> 
           </tr>
           <?php
             $tptd=$tptd+$p['paidAmount'];
                                     }       
           
       }
?>
<tr><td align="right">Total:</td><td align="right"><?php echo number_format($tptd,2);?> </td></tr>
</table>
</div>