?
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_report.php |
<?php $i=1; $span = 0; while ($i < $postdata['field_count']) { if (array_key_exists("field_name_$i", $postdata)) $span++; $i++; } ?> <html> <head> <body> <table width="100%" > <tr> <td colspan="3"></td> <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><?= $postdata['report_name'] ?></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 style="text-align:left" bgcolor="#7FCEFF">Sl No</th> <th bgcolor="#7FCEFF">Class Name Code</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">Paid Date</th> <th bgcolor="#7FCEFF">Fee Particular</th> <th bgcolor="#7FCEFF">Paid Amount</th> </tr> </thead> <tbody> <?php $sl = 1; $temp = ""; $temp2 = ""; // echo "<pre>"; // var_dump($row_span); // echo "</pre>"; foreach ($report as $fee_id=>$value) { // if(isset($amount_paid[$value['student_class_fee_id']])) // $amount_paid[$value['student_class_fee_id']]+=$value['amount_paid']; // else // $amount_paid[$value['student_class_fee_id']]=$value['amount_paid']; // $paid = 0; // $paid = $report[$value['student_class_fee_id']]['fee_paid']; $rowspan=1; $rowspan = array_sum($row_span[$value['student_class_id']]); echo '<tr>'; if ($temp != $value['student_class_id']) { // $balance=$fee_details[$value['student_class_fee_id']]['fee']; echo '<td rowspan="' . $rowspan . '">' . $sl++ . '</td>'; echo '<td rowspan="' . $rowspan . '">' . $value['class_name_code'] . '</td>'; } $rowspan2=1; if ($temp2 != $value['fee_id']){ $rowspan2 = $row_span[$value['student_class_id']][$value['fee_id']]; if (array_key_exists('field_name_1', $postdata)) echo '<td rowspan="' . $rowspan2 . '">' . $value['reg_no']. '</td>'; if (array_key_exists('field_name_2', $postdata)) echo '<td rowspan="' . $rowspan2 . '">' . $value['first_name'] . '</td>'; if (array_key_exists('field_name_3', $postdata)) echo '<td rowspan="' . $rowspan2 . '">' . $value['last_name'] . '</td>'; if (array_key_exists('field_name_4', $postdata)) echo '<td rowspan="' . $rowspan2 . '">' . $value['gender'] . '</td> '; if (array_key_exists('field_name_5', $postdata)) echo '<td rowspan="' . $rowspan2 . '">' . $value['nationality_name'] . '</td> '; if (array_key_exists('field_name_6', $postdata)) echo '<td rowspan="' . $rowspan2 . '">' . $value['class_name_code'] . '</td> '; echo '<td rowspan="' . $rowspan2 . '">' . $this->mastermodel->convertdatenormalformat($value['fee_date']) . '</td> '; $temp2 = $value['fee_id']; } // $balance_amount=$balance-$amount_paid[$value['student_class_fee_id']]; echo '<td>' . $value['fee_particular_name'] . '</td>'; echo '<td>' . $value['amount_paid'] . '</td>'; echo "</tr>"; $temp = $value['student_class_id']; } ?> </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"); } ?>