?
Current Path : /home1/savoy/www/savoyglobal.net/eldertree/application/views/report/ |
Linux gator3171.hostgator.com 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64 |
Current File : /home1/savoy/www/savoyglobal.net/eldertree/application/views/report/xls_fee_pending_report.php |
<html> <?php $i=1; $span = 0; while ($i < $postdata['field_count']) { if (array_key_exists("field_name_$i", $postdata)) $span++; $i++; } ?> <body> <table width="100%"> <tr> <td colspan="<?= $span-2 ?>"></td> <td align="right"> <img src="<?=base_url()?>assets/logo/<?=$logo?>" style="float:right; max-height: 100px;"/> </td> </tr> <tr><td colspan="3" style="font-size:16px;" align="center"><b><u>Fee Pending Report</u></b></td></tr> <tr><td colspan="3">Printout Date : <?= date('d-m-Y') ?>, <?= date('h:i:s a') ?></td></tr> </table> <br><br> <hr> <table cellspacing="-1" style="width:100%;text-align:left" border="1"> <thead> <tr> <th bgcolor="#7FCEFF">Sl No</th> <?php $i = 1; $column = array(); while ($i <= $postdata['field_count']) { if (isset($postdata['field_name_' . $i])) { $column_name = explode('~', $postdata['field_name_' . $i]); ?> <th style="text-align:left" bgcolor="#7FCEFF"><?= str_replace('_', ' ', $column_name[1]) ?></th> <?php $column[] = $column_name[1]; } $i++; } ?> <th bgcolor="#7FCEFF">Fee Particulars</th> <th bgcolor="#7FCEFF">Payment Period</th> <th bgcolor="#7FCEFF">Fee</th> <th bgcolor="#7FCEFF">Amount Paid</th> <th bgcolor="#7FCEFF">Balance Amount</th> </tr> </thead> <tbody> <?php $slno=0; foreach ($report as $student_class_id => $student_fee_details) { $i = 1; $academic_year = $accademic_year[$student_class_id]; $academic_year_id = $this->mastermodel->get_single_field_value('academic_year', 'academic_year_id', 'academic_year_year', $academic_year); $row_span = 0; $html = ''; foreach ($student_fee_details as $fee_list) { $paid = 0; $student_class_id = $fee_list['student_class_id']; $student_class_fee_id = $fee_list['student_class_fee_id']; $last_paid_amount = 0; ?> <?php if ($fee_list['payment_type'] == "monthly") { $k = 0; foreach ($student_monthly_fee_details[$student_class_fee_id] as $month_date) { $dt=$month_date['fee_wef_date']; $payment_for = $dt; $month = date('M', strtotime($dt)); $year = date('Y', strtotime($dt)); $month_amount = $this->studentmodel->get_student_monthly_wef_date($fee_list['student_class_id'], $dt); $amount = 0; if (isset($month_amount[$fee_list['student_class_fee_id']][0]['amount'])) { $amount = $month_amount[$fee_list['student_class_fee_id']][0]['amount']; } $last_paid_amount = 0; if (isset($fee_last_paid[$student_class_fee_id][$dt])) $last_paid_amount = $fee_last_paid[$student_class_fee_id][$dt]; if ($k > 0) { $html .= '<tr>'; } $amount_paid = 0; if (isset($student_fee_paid_details[$student_class_id][$student_class_fee_id][$payment_for])) { $paid = $student_fee_paid_details[$student_class_id][$student_class_fee_id][$payment_for]; $amount_paid = $paid['amount_paid']; } $txt = ($k == 0) ? 'Monthly<br/>' : ""; $html .= '<td>' . $fee_list['fee_particular_name'] . '</td> <td>' . $txt . date('F - Y', strtotime($dt)) . '</td> <td>' . $amount . '</td> <td>' . $amount_paid . '</td> <td>' . ($amount-$amount_paid) . '</td> </tr>'; $k++; $row_span++; } $i++; } else { $amount = $fee_list['fee_amount']; $amount_paid = 0; if (isset($student_fee_paid_details[$student_class_id][$student_class_fee_id]['0000-00-00'])) { $paid = $student_fee_paid_details[$student_class_id][$student_class_fee_id]['0000-00-00']; $amount_paid = $paid['amount_paid']; } $last_paid_amount = 0; if (isset($fee_last_paid[$student_class_fee_id]['0000-00-00'])) $last_paid_amount = $fee_last_paid[$student_class_fee_id]['0000-00-00']; $html .= ' <td>' . $fee_list['fee_particular_name'] . '</td> <td>Termwise </td> <td>' . $amount . '</td> <td>' . $amount_paid . '</td> <td>' . ($amount-$amount_paid) . '</td> '; $i++; $row_span++; } $class_name_code = $fee_list['class_name_code']; $reg_no = $fee_list['reg_no']; $first_name=$fee_list['first_name']; $last_name=$fee_list['last_name']; $gender=$fee_list['gender']; $nationality=$fee_list['nationality_name']; } ?> <tr> <td rowspan="<?= $row_span ?>"><?= ++$slno ?></td> <?php if (array_key_exists('field_name_1', $postdata)) ?> <td rowspan="<?= $row_span ?>"><?= $class_name_code?></td> <?php if (array_key_exists('field_name_2', $postdata)) ?> <td rowspan="<?= $row_span ?>"><?= $reg_no ?></td> <?php if (array_key_exists('field_name_3', $postdata))?> <td rowspan="<?= $row_span ?>"><?= $first_name ?></td> <?php if (array_key_exists('field_name_4', $postdata))?> <td rowspan="<?= $row_span ?>"><?= $last_name ?></td> <?php if (array_key_exists('field_name_5', $postdata))?> <td rowspan="<?= $row_span ?>"><?= $gender ?></td> <?php if (array_key_exists('field_name_6', $postdata))?> <td rowspan="<?= $row_span ?>"><?= $nationality ?></td> <?=$html;?> </tr> <?php } ?> </tbody> </table> <hr> </body> </html> <?php $filename = $postdata['report_name']; if ($view == 'xls') { header("Content-type: application/octet-stream"); header("Content-Disposition: attachment; filename=" . $filename . ".xls"); header("Pragma: no-cache"); header("Expires: 0"); } //print $html; //exit; ?>