%PDF-1.5 %���� ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµùÕ5sLOšuY
| Server IP : 122.154.253.140 / Your IP : 216.73.216.34 Web Server : Microsoft-IIS/7.5 System : Windows NT SERVER02 6.1 build 7601 (Windows Server 2008 R2 Standard Edition Service Pack 1) i586 User : IUSR ( 0) PHP Version : 5.6.31 Disable Function : NONE MySQL : ON | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/inetpub/wwwroot-25650203-BK/wwwroot/mis/student/mis/ |
Upload File : |
<?PHP
include "permission.php";
include "conf.php";
?>
<script>
function PayMent() {
window.location.href = 'payment.php';
}
</script>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="">
<meta name="author" content="">
<title>Student information System KOWIT CM.</title>
<!-- Bootstrap core CSS -->
<link href="vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<!-- Custom styles for this template -->
<link href="css/heroic-features.css" rel="stylesheet">
</head>
<body>
<!-- Navigation -->
<?PHP include "menu_nav.php"; ?>
<!-- Page Content -->
<div class="container">
<!-- Jumbotron Header -->
<div class="row">
<div class="card my-4 col-12 col-md-8">
<div class="card-body">
<div class="row">
<div class="col-12">
<h3>ข้อมูลทางการเงิน</h3>
<p class="lead"><?PHP echo "รหัสนักเรียน : ".$_SESSION['IDStudent']; ?><br><?PHP echo "ชื่อ - สกุล : ".$_SESSION['StuName']; ?> ชั้น <?PHP echo $_SESSION['PClass']."/".$_SESSION['PRoom']; ?></p>
</div>
</div>
</div>
</div>
<div class="card my-4 col-12 col-md-4" style="background-color: #FCE4EC;">
<div class="card-body">
<div class="row">
<div class="col-12 text-right">
<h3>ยอดค้างชำระ</h3>
<?PHP
$sql="select sum(AmountFee) as AmountFee from TB_StudentFees where IDStudent='".$_SESSION['IDStudent']."' and isnull(ReceiptNumber,'') = ''";
//echo $sql;
$stmt = sqlsrv_query( $conn, $sql );
$AmountFee = 0;
while( $row = sqlsrv_fetch_array( $stmt, SQLSRV_FETCH_ASSOC) ) {
$AmountFee = $row["AmountFee"];
}
$disabled="";
if($AmountFee==0)
$disabled = "disabled";
$sql="select * from Finance_ActivePayment where ActivePayment = 1";
//echo $sql;
$stmt = sqlsrv_query( $conn, $sql );
$isOpen=0;
while( $row = sqlsrv_fetch_array( $stmt, SQLSRV_FETCH_ASSOC) ) {
$isOpen=1;
}
if($isOpen==0)
$disabled = "disabled";
$disabled="";
?>
<h3 class="text-danger"><?PHP echo number_format($AmountFee,2); ?> บาท</h3>
<button type="button" class="btn btn-danger btn-lg btn-block" <?PHP echo $disabled; ?> onclick="PayMent()">ชำระเงิน</button>
</div>
</div>
</div>
</div>
</div>
<?PHP
//$sql="select AYear,Term from TB_StudentFees inner join LT_ClassName on TB_StudentFees.PClass = LT_ClassName.PClass where IDStudent='".$_SESSION['IDStudent']."' and PLevel='".$_SESSION['PLevel']."' group by AYear,Term order by AYear desc,Term Desc ";
$sql="select AYear,Term from TB_StudentFees where IDStudent='".$_SESSION['IDStudent']."' group by AYear,Term order by AYear desc,Term Desc ";
//echo $sql;
$stmt = sqlsrv_query( $conn, $sql );
while( $row = sqlsrv_fetch_array( $stmt, SQLSRV_FETCH_ASSOC) ) {
?>
<div class="card my-4">
<div class="card-body">
<nav aria-label="breadcrumb">
<ol class="breadcrumb" style="background-color: #F48FB1;">
<li class="breadcrumb-item active" aria-current="page">ภาคเรียนที่ <?PHP echo $row['Term']."/".$row['AYear']; ?></li>
</ol>
</nav>
<div style="overflow-x:auto;">
<table class="table table-striped">
<thead>
<tr>
<th scope="col">#</th>
<th scope="col">รายการ</th>
<th scope="col" class="text-right">ยอดที่ต้องชำระ</th>
<th scope="col" class="text-right">ยอดที่ชำระแล้ว</th>
<th scope="col" class="text-center">เลขที่ใบเสร็จ</th>
</tr>
</thead>
<tbody>
<?PHP
$sql="select FeeDescription,AmountFee,ReceiptNumber from TB_StudentFees inner join LT_CodeFee on LT_CodeFee.CodeFee = TB_StudentFees.CodeFee
where IDStudent='".$_SESSION['IDStudent']."' and TB_StudentFees.AYear='".$row['AYear']."' and Term='".$row["Term"]."' and isnull(StatusBill,-1)!=2";
//echo $sql;
$i=1;
$stmt_s = sqlsrv_query( $conn, $sql );
$AmountSet = 0;
$AmountPay = 0;
while( $row_s = sqlsrv_fetch_array( $stmt_s, SQLSRV_FETCH_ASSOC) ) {
?>
<tr>
<th scope="row"><?PHP echo $i; ?></th>
<td><?PHP echo iconv("tis-620","utf-8",$row_s['FeeDescription']); ?></td>
<td class="text-right">
<?PHP
echo number_format($row_s['AmountFee']);
$AmountSet = $AmountSet + $row_s['AmountFee'];
?>
</td>
<td class="text-right">
<?PHP
if($row_s["ReceiptNumber"]=="")
echo "-";
else {
echo number_format($row_s['AmountFee']);
$AmountPay = $AmountPay + $row_s['AmountFee'];
}
?>
</td>
<td class="text-center"><?PHP echo $row_s["ReceiptNumber"]; ?></td>
</tr>
<?PHP $i++; } ?>
<tr>
<th scope="row"></th>
<td class="text-center">รวม</td>
<td class="text-right"> <?PHP echo number_format($AmountSet); ?></td>
<td class="text-right"><?PHP echo number_format($AmountPay); ?></td>
<td class="text-center"></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<?PHP } ?>
</div>
<!-- Page Features -->
<div class="row text-center">
</div>
<!-- /.row -->
</div>
<!-- /.container -->
<!-- Footer -->
<footer class="py-5 bg-dark">
<div class="container">
<p class="m-0 text-center text-white">Copyright © KOWIT CM 2019</p>
</div>
<!-- /.container -->
</footer>
<!-- Bootstrap core JavaScript -->
<script src="vendor/jquery/jquery.min.js"></script>
<script src="vendor/bootstrap/js/bootstrap.bundle.min.js"></script>
</body>
</html>