Viewing file:      v_sendToReceipt.php (2.35 KB)      -rwxr-xr-x Select action/file-type:    (+) |   (+) |   (+) | Code (+) | Session (+) |   (+) | SDB (+) |   (+) |   (+) |   (+) |   (+) |   (+) |
 
<?php
 header('Content-type: application/xls');
 header('Content-Disposition: attachment; filename="testing.xls"');
 ?>
 <table width="100%">
     <tr>
         <td align="center"><b>ค่าลงทะเบียนเรียนของนักศึกษา</b></td>
     </tr>
     <tr>
         <td><br /></td>
     </tr>
     <tr>
         <td><table border="1">
             <tr>
                 <th>ที่</th>
                 <th>รหัสนักศึกษา</th>
                 <th>คำนำหน้าชื่อ</th>
                 <th>ชื่อ</th>
                 <th>นามสกุล</th>
                 <th>ภาคศึกษา</th>
                 <th>ปีการศึกษา</th>
                 <th>ชั้นปี</th>
                 <th>หลักสูตร</th>
                 <th>จำนวนเงิน (บาท)</th>
                 <th>สิทธิการเบิกค่าเล่าเรียน</th>
                 <th>รายการ</th>
                 <th>จำนวนเงิน (บาท)</th>
             </tr>
 <?php
     $i = 0;
     $config_kssFee = $this->config->item('kssFee');
     $config_domFee = $this->config->item('domFee');
     if(isset($rs_std) && $rs_std->num_rows()) {
         foreach($rs_std->result() as $row_std) {
 
             $result = $fee->qryFeeForSendToReceipt($row_std->stdId, $acY, $tmId, $config_kssFee, $config_domFee);
             if($result->num_rows()) {
                 $std = '';
                 foreach($result->result() as $row) {
                     if($std!=$row->stdId) {
 ?>
                 <tr>
                     <td align="center"><?php echo $i+1;?></td>
                     <td align="center"><?php echo $row->stdCode;?></td>
                     <td><?php echo $row->prefixName;?></td>
                     <td><?php echo $row->stdName;?></td>
                     <td><?php echo $row->stdSurname;?></td>
                     <td align="center"><?php echo $tmId;?></td>
                     <td align="center"><?php echo $acY;?></td>
                     <td align="center"><?php echo $row->stdSyId;?></td>
                     <td><?php echo $row->curAbbr;//$row->curName;?></td>
                     <td align="right"><?php echo number_format($row->rfTotalAmt,2);?></td>
                     <td><?php echo $row->sdtCanRefund;?></td>
 <?php
                         $i++;
                     } else {
 ?>
                 <tr>
                     <td></td>
                     <td></td>
                     <td></td>
                     <td></td>
                     <td></td>
                     <td></td>
                     <td></td>
                     <td></td>
                     <td></td>
                     <td></td>
                     <td></td>
 <?php
                     }
 ?>
                 <td><?php echo $row->fgName;?></td>
                 <td align="right"><?php echo $row->amt;?></td>
             </tr>
 <?php
                     $std = $row->stdId;
                 }
             }
         }
     }
 ?>
         </table></td>
     </tr>
 </table>
  |