Advertisement
AlexWebDevelop

Untitled

Apr 3rd, 2019
216
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 2.09 KB | None | 0 0
  1. <div  style="display:none">
  2.       <table class="table table-striped table-bordered table-hover"  id="tblData2"  border="1">
  3.                                 <thead>
  4.                                     <tr>
  5.                                    
  6.                                         <th>Class</th>
  7.                                         <th>Fee Amount </th>
  8.                                         <th>Net Fee Amount</th>
  9.                                         <th>Paid Fee Amount</th>
  10.                                         <th>Due Fee Amount</th>
  11.                                     </tr>
  12.                                     </thead>
  13.                                     <tbody id="myTable">
  14.                        
  15.     <?php
  16.  
  17.  
  18.     if($max_amount != ""){
  19.         $sub = " && fc.net_fee_amount-fc.paid_amount<='$max_amount' "
  20.     }if($min_amount != ""){
  21.         $sub .= " && fc.net_fee_amount-fc.paid_amount>='$min_amount' ";
  22.     }if($fee_type != ""){
  23.         $sub .= " && fc.fee_type_text ='$fee_type' ";  
  24.     }
  25.  
  26.  
  27.    
  28.    
  29.     $query="SELECT cm.class_name,sum(fc.fee_amount)as fee_amount,fc.class_id,fc.session,fc.payment_status,sum(fc.net_fee_amount) as net_fee_amount ,sum(fc.paid_amount) as paid_amount  from fee_calendar fc, class_master cm where fc.class_id = cm.class_id && fc.institute_id='$institute1' && fc.school_id='$school1' ".$sub." && fc.fee_due_date<='$to_date' && fc.fee_due_date>='$from_date' && fc.payment_status='$payment_status'  GROUP BY cm.sort_sequence asc ";  
  30.  
  31.     $totaldue = 0; $feeamt=0; $netfee=0; $paidamt=0;
  32.     $fetch  = mysqli_query($con,$query);
  33.     while($row=$fetch->fetch_assoc()){
  34.         $totaldue += $row['net_fee_amount']-$row['paid_amount'];
  35.         $feeamt += $row['fee_amount'];
  36.         $netfee +=  $row['net_fee_amount'];
  37.         $paidamt += $row['paid_amount'];
  38.     ?>
  39.     <tr>
  40.        <td><?php echo $row['class_name'];?></td>
  41.        <td><?php echo $row['fee_amount'];?></td>
  42.        <td><?php echo $row['net_fee_amount'];?></td>
  43.        <td><?php echo $row['paid_amount'];?></td>
  44.        <td><?php echo $row['net_fee_amount']-$row['paid_amount']; ?></td>
  45.         </tr>  
  46.     <?php  
  47.     }              
  48.     ?>
  49. <tr>
  50. <td>Total : </td>
  51. <td><?php echo $feeamt;?></td>
  52. <td><?php echo $netfee;?></td>
  53. <td> <?php echo $paidamt?></td>
  54. <td><?php echo $totaldue; ?> </td>
  55. <td> </td>
  56. </tr>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement