Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <div style="display:none">
- <table class="table table-striped table-bordered table-hover" id="tblData2" border="1">
- <thead>
- <tr>
- <th>Class</th>
- <th>Fee Amount </th>
- <th>Net Fee Amount</th>
- <th>Paid Fee Amount</th>
- <th>Due Fee Amount</th>
- </tr>
- </thead>
- <tbody id="myTable">
- <?php
- if($max_amount != ""){
- $sub = " && fc.net_fee_amount-fc.paid_amount<='$max_amount' ";
- }if($min_amount != ""){
- $sub .= " && fc.net_fee_amount-fc.paid_amount>='$min_amount' ";
- }if($fee_type != ""){
- $sub .= " && fc.fee_type_text ='$fee_type' ";
- }
- $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 ";
- $totaldue = 0; $feeamt=0; $netfee=0; $paidamt=0;
- $fetch = mysqli_query($con,$query);
- while($row=$fetch->fetch_assoc()){
- $totaldue += $row['net_fee_amount']-$row['paid_amount'];
- $feeamt += $row['fee_amount'];
- $netfee += $row['net_fee_amount'];
- $paidamt += $row['paid_amount'];
- ?>
- <tr>
- <td><?php echo $row['class_name'];?></td>
- <td><?php echo $row['fee_amount'];?></td>
- <td><?php echo $row['net_fee_amount'];?></td>
- <td><?php echo $row['paid_amount'];?></td>
- <td><?php echo $row['net_fee_amount']-$row['paid_amount']; ?></td>
- </tr>
- <?php
- }
- ?>
- <tr>
- <td>Total : </td>
- <td><?php echo $feeamt;?></td>
- <td><?php echo $netfee;?></td>
- <td> <?php echo $paidamt?></td>
- <td><?php echo $totaldue; ?> </td>
- <td> </td>
- </tr>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement