Viewing file: showDetailEnrollFee.php (9.13 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
include_once "configuration.php";
include_once "global.php";
include_once "./link/function.php";
include_once "./class/clsStudentMaster.php";
include_once "./class/clsPrefix.php";
include_once "./class/clsProgram.php";
include_once "./class/clsEnrollItem.php";
include_once "./class/clsClass.php";
include_once "./class/clsCourse.php";
include_once "./class/clsCourseFee.php";
include_once "./class/clsCommonFee.php";
include_once "./class/clsFee.php";
include_once "./class/clsProgramFee.php";
include_once "./class/clsEnrollFee.php";
$conn = new Connection();
$oSm = new StudentMaster();
$oPf = new Prefix();
$oPg = new Program();
$oEi = new EnrollItem();
$oCl = new Class1();
$oCo = new Course();
$oCof = new CourseFee();
$oCf = new CommonFee();
$oFe = new Fee();
$oPgf = new ProgramFee();
$oEf = new EnrollFee();
?>
<title>ค่าลงทะเบียนเรียน</title>
<meta http-equiv="Content-Type" content="text/html; charset=TIS-620" />
<meta http-equiv="Content-Type" content="text/html; charset=windows-874" />
<link href="./css/default.css" rel="stylesheet" type="text/css" />
<body>
<table width="650" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td><table width="650" align="center" cellpadding="1" cellspacing="1" border="0">
<?php
$oSm->SearchByKey($studentId);
$oSm->GetRecord();
$oPf->SearchByKey($oSm->prefixId);
$oPf->GetRecord();
$oPg->SearchByKey($oSm->programId);
$oPg->GetRecord();
?>
<tr>
<td height="22"><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_4"];?>"><strong>รหัสนักศึกษา</strong> <?php echo $oSm->studentCode;?></font></td>
<td colspan="2"><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_4"];?>"><strong>ชื่อ-สกุล</strong> <?php echo $oPf->prefixName.$oSm->studentName.' '.$oSm->studentSurname;?></font></td>
</tr>
<tr>
<td height="22" colspan="3"><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_4"];?>"><strong>หลักสูตร</strong> <?php echo $oPg->programName;?></font></td>
</tr>
<tr>
<td width="30%" height="22"><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_4"];?>"><strong>ปีการศึกษา</strong> <?php echo $acadYear;?></font></td>
<td width="30%"><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_4"];?>"><strong>ภาคการศึกษา</strong> <?php echo $semester;?></font></td>
<td width="40%"><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_4"];?>"><strong>ชั้นปี</strong> <?php echo $studentYear;?></font></td>
</tr>
</table></td>
</tr>
<tr>
<td height="22"></td>
</tr>
<tr>
<td align="center"><table width="650" border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="#FFFF88" style="border:1px solid #EEEEEE">
<tr bgcolor="#F0F0F0">
<td width="5%" height="22" align="center"><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_4"];?>"><b>ที่</b></font></td>
<td width="55%" height="22" align="center"><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_4"];?>"><b>รายการ</b></font></td>
<td width="10%" height="22" align="center"><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_4"];?>"><b>หน่วยกิต</b></font></td>
<td width="10%" height="22" align="center"><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_4"];?>"><b>รวมเงิน</b></font></td>
<td width="20%" height="22" align="center"><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_4"];?>"><b>หมายเหตุ</b></font></td>
</tr>
<tr>
<td align="center"><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_4"];?>">1</font></td>
<td><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_4"];?>">ค่าหน่วยกิต</font></td>
<td></td>
<td></td>
<td align="center"> <font size="2" color="<?php echo $GLOBALS["COLOR_FONT_4"];?>">เบิกได้ตามสิทธิ์</font></td>
</tr>
<?php
$oEi->RSEnrollItemByStIdAndAcYAndSe( $studentId, $acadYear, $semester );
while( $oEi->GetRecord() ) {
$oCl->SearchByKey($oEi->classId);
$oCl->GetRecord();
$oCo->SearchByKey($oCl->courseId);
$oCo->GetRecord();
?>
<tr>
<td></td>
<td><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_4"];?>"><?php echo $oCo->courseCode.' : '.$oCo->courseName;?></font></td>
<td align="center"><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_4"];?>"><?php echo $oCo->courseUnit;?></font></td>
<td align="right"><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_4"];?>">-</font></td>
<td></td>
</tr>
<?php
} # while
$sumLcFee = $oCof->GetSumLcFeeByStIdAndAcYAndSe( $studentId, $acadYear, $semester );
$sumLbFee = $oCof->GetSumLbFeeByStIdAndAcYAndSe( $studentId, $acadYear, $semester );
?>
<tr>
<td></td>
<td align="right"><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_4"];?>"><b>รวมหน่วยกิตทฤษฎี</b></font></td>
<td align="center"><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_4"];?>"><b><?php echo number_format($oEi->GetSumCr1ByStIdAndAcYAndSe($studentId, $acadYear, $semester));?></b></font></td>
<td align="right"><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_4"];?>"><b><?php echo number_format($sumLcFee, 2);?></b></font></td>
<td></td>
</tr>
<tr>
<td></td>
<td align="right"><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_4"];?>"><b>รวมหน่วยกิตทดลอง/ปฏิบัติ</b></font></td>
<td align="center"><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_4"];?>"><b><?php echo number_format( $oEi->GetSumCr2ByStIdAndAcYAndSe($studentId, $acadYear, $semester) );?></b></font></td>
<td align="right"><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_4"];?>"><b><?php echo number_format($sumLbFee, 2);?></b></font></td>
<td></td>
</tr>
<tr>
<td></td>
<td align="right"><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_4"];?>"><b>รวมหน่วยกิตที่ลงทะเบียน</b></font></td>
<td align="center"><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_4"];?>"><b><?php echo number_format($oEi->GetSumCrAtByStIdAndAcYAndSe($studentId, $acadYear, $semester));?></b></font></td>
<td align="right"><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_4"];?>"><b><?php echo number_format($sumLcFee+$sumLbFee, 2);?></b></font></td>
<td></td>
</tr>
<?php
$i = 2;
$oCf->RSCommonFeeByStIdAndAcYAndSe( $studentId, $acadYear, $semester );
while( $oCf->GetRecord() ) {
$oFe->SearchByKey($oCf->feeId);
$oFe->GetRecord();
?>
<tr>
<td align="center"><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_4"];?>"><?php echo $i;?></font></td>
<td><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_4"];?>"><?php echo $oFe->feeName;?></font></td>
<td></td>
<td align="right"><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_4"];?>"><?php echo number_format($oCf->amount, 2);?></font></td>
<td> <font size="2" color="<?php echo $GLOBALS["COLOR_FONT_4"];?>"><?php if($oFe->canRefund=='Y') echo 'เบิกได้ตามสิทธิ์'; else echo 'เบิกไม่ได้';?></font></td>
</tr>
<?php
$i++;
} # while
$j = $i;
$oPgf->RSProgramFeeByStIdAndAcYAndSe( $studentId, $acadYear, $semester );
while( $oPgf->GetRecord() ) {
$oFe->SearchByKey($oPgf->feeId);
$oFe->GetRecord();
?>
<tr>
<td align="center"><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_4"];?>"><?php echo $j;?></font></td>
<td><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_4"];?>"><?php echo $oFe->feeName;?></font></td>
<td></td>
<td align="right"><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_4"];?>"><?php echo number_format($oPgf->amount, 2);?></font></td>
<td> <font size="2" color="<?php echo $GLOBALS["COLOR_FONT_4"];?>"><?php if($oFe->canRefund=='Y') echo 'เบิกได้ตามสิทธิ์'; else echo 'เบิกไม่ได้';?></font></td>
</tr>
<?php
$j++;
} # while
?>
<tr>
<td align="center"><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_4"];?>"><?php echo $j;?></font></td>
<td><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_4"];?>">ค่ารักษาสถานภาพการเป็นนักศึกษา</font></td>
<td></td>
<td align="right"><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_4"];?>"><?php echo number_format($oCof->GetSumKssFeeByStIdAndAcYAndSe($studentId, $acadYear, $semester), 2);?></font></td>
<td align="center"> <font size="2" color="<?php echo $GLOBALS["COLOR_FONT_4"];?>">เบิกไม่ได้</font></td>
</tr>
<tr bgcolor="<?php echo $GLOBALS["COLOR_BG_TD_2"];?>">
<td height="22" colspan="3" align="right"><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_4"];?>"><b>รวมยอดเงินที่ต้องชำระทั้งหมด</b></font></td>
<td align="right"><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_4"];?>"><strong><?php echo number_format($oEf->GetSumTtAmtByStIdAndAcYAndStYAndSe( $studentId, $acadYear, $studentYear, $semester ), 2);?></strong></font></td>
<td></td>
</tr>
</table></td>
</tr>
<tr>
<td height="22"></td>
</tr>
<tr>
<td align="center"><input type="submit" name="print" value="พิมพ์หน้านี้" onClick="javascript:window.print();" />
<input type="submit" name="close" value="ปิดหน้าต่าง" onClick="javascript:window.close();" /></td>
</tr>
</table>
</body>
<?php
$oPf->Destroy();
$oSm->Destroy();
$conn->Disconnect();
?>
|