Viewing file: v_paymentRegisTime.php (11.05 KB) -rwxr-xr-x Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<script>
function checkFormat() {
var mx = "<?php echo $this->config->item('rg_refNoPmNo_max');?>";
if(document.myform.pmAmt.value=="" || document.myform.pmAmt.value==0) {
alert("กรุณากรอกจำนวนเงินที่ชำระ !");
document.myform.pmAmt.focus();
return false;
}
if(document.myform.refNoPmBook.value=="" || document.myform.refNoPmBook.value==0){
alert("กรุณากรอกเล่มที่ !!");
document.myform.refNoPmBook.focus();
return false;
}
if(document.myform.refNoPmNo.value=="" || document.myform.refNoPmNo.value==0){
alert("กรุณากรอกเลขที่ !!");
document.myform.refNoPmNo.focus();
return false;
}
if(document.myform.refNoPmNo.value > mx){
alert("กรุณากรอกเลขที่ 0-" + mx +" เท่านั้น !!");
document.myform.refNoPmNo.focus();
return false;
}
return true;
}
</script>
<table width="100%">
<tr>
<td>
<div align="center">
<?php echo form_open($this->config->item("rg_folder").'payment/'.(isset($action) ? $action : 'paymentRegisTime'), array("name" => "myform", "id" => "myform"));?>
<table width="100%">
<tr>
<td colspan='2' align="center"><span class="h error">ผ่อนชำระค่าลงทะเบียนเรียนรายนักศึกษา</span></td>
</tr>
<tr>
<td colspan='2'><br /></td>
</tr>
<tr>
<td colspan='2'><table class='szone'>
<?php
if (!isset($refNo)) {
?>
<tr>
<td colspan="4"><b>เลขที่ใบลงทะเบียน
<input type="text" name="refNo" size="16" maxlength="16" />
<input type="submit" id="btnSearch" name="btnSearch" value="ค้นหา" /></td>
</tr>
<?php
} else {
if ($refNo == "") {
?>
<tr bgcolor="<?php echo $tr_color_even;?>">
<td colspan="4" align="center"><span class='error'>** กรุณาตรวจสอบเลขที่ใบลงทะเบียนอีกครั้ง
<a href="<?php //echo $PHP_SELF;?>">คลิกที่นี่ย้อนกลับ</a> **</span></td>
</tr>
<?php
} else {
$row_rf = $qu_rf->row();
$row_std = $qu_std->row();
$row_sd = isset($qu_sd) ? $qu_sd->row() : NULL;
?>
<tr bgcolor="<?php echo $tr_color_even;?>">
<td class="coltd_szone">เลขที่ใบลงทะเบียน</td>
<td colspan="3"><?php echo $refNo;?>
<input type="hidden" name="rfId" value="<?php echo $row_rf->rfId;?>"></td>
</tr>
<tr bgcolor="<?php echo $tr_color_even;?>">
<td class="coltd_szone">รหัสนักศึกษา</td>
<td width="200"><?php echo $row_std->stdCode;?>
<input type="hidden" name="stdId" value="<?php echo $row_std->stdId;?>"></td>
<td class="coltd_szone">ชื่อ-สกุล</td>
<td width="230"><?php echo $row_std->prefixName.$row_std->stdName.' '.$row_std->stdSurname;?></td>
</tr>
<tr bgcolor="<?php echo $tr_color_even;?>">
<td class="coltd_szone">หลักสูตร</td>
<td colspan="3"><?php echo $row_std->curName;?>
<input type="hidden" name="curId" value="<?php echo $row_std->stdCurId;?>"></td>
</tr>
<tr bgcolor="<?php echo $tr_color_even;?>">
<td class="coltd_szone">ระดับการศึกษา</td>
<td><?php echo $row_std->levelName;?></td>
<td class="coltd_szone">ชั้นปี</td>
<td><?php echo $row_std->syCode;?></td>
</tr>
<tr bgcolor="<?php echo $tr_color_even;?>">
<td class="coltd_szone">ปีการศึกษาx</td>
<td><?php echo $acY_R;?>
<input type="hidden" name="acY" value="<?php echo $acY;?>"></td>
<td class="coltd_szone">ภาคการศึกษา</td>
<td><?php echo $tmId_R;?>
<input type="hidden" name="tmId" value="<?php echo $tmId;?>"></td>
</tr>
<tr bgcolor="<?php echo $tr_color_even;?>">
<td class="coltd_szone"><b>ช่วงชำระค่าลงทะเบียนเรียน</b></td>
<td colspan='3'><?php echo abbreDate2(getval('sdPaySDate', $row_sd)).' - '.abbreDate2(getval('sdPayEDate', $row_sd));?></td>
</tr>
<tr bgcolor="<?php echo $tr_color_even;?>">
<td class="coltd_szone"><span style="color:<?=$this->config->item('rg_font_color_err');?>"><b>จำนวนเงินค้างชำระ</b></span></td>
<td><span style="color:<?=$this->config->item('rg_font_color_err');?>">
<?php
if ($row_rf->rfBalance != 0) {
echo number_format($row_rf->rfBalance, 2).' <b>บาท</b>';
} else {
echo '** ชำระหนี้ค่าลงทะเบียนเรียนหมดแล้ว **';
}
?>
</span></td>
<td class="coltd_szone"><span style="color:<?=$this->config->item('rg_font_color_err');?>"><b>ค่าปรับค้างชำระ</b></span></td>
<td><span style="color:<?=$this->config->item('rg_font_color_err');?>"><?php echo number_format($lateFine, 2);?>
<b> บาท</b>
<input type="hidden" name="lateFine" value="<?php echo $lateFine;?>" /></span></td>
</tr>
</table><br></td>
</tr>
<tr>
<td colspan='2'><table class="headCol">
<tr>
<th>ลำดับ</th>
<th>วันที่ชำระ</th>
<th>ประเภทการชำระ</th>
<th>จำนวนเงินที่ชำระ</th>
<th>ค่าปรับ</th>
<th>เล่มที่</th>
<th>เลขที่</th>
<th>พิมพ์ใบเสร็จรับเงิน</th>
<th>พิมพ์ใบสำคัญรับเงิน</th>
<th>ลบ</td>
</tr>
<?php
$i = 0;
if ($rs_pm->num_rows()) {
foreach ($rs_pm->result() as $row_pm) {
$tmp = explode('|', $row_pm->pmRefNo, 2);
?>
<tr>
<td align="center"><?php echo $i+1;?></td>
<td align="center"><?php echo abbreDate2($row_pm->pmDate);?></td>
<td class='indent'><?php if ($row_pm->pmType == 1) echo 'เงินสด'; else if ($row_pm->pmType == 2) echo 'ทางธนาคาร';?></td>
<td align="right"><?php echo number_format($row_pm->pmAmt, 2);?></td>
<td align="right"><?php echo number_format($row_pm->pmLateFine, 2);?></td>
<td align="center"><?php echo $tmp[0];?></td>
<td align="center"><?php echo $tmp[1];?></td>
<td align="center">
<?php
if (($row_rf->rfBalance != 0) || ($row_pm->pmId != $maxPmId))
echo '-';
else {
?>
<span class="hand" onClick="sendPost('hidform', {'pmId[]':<?php echo $row_pm->pmId;?>,'stdId[]':<?php echo $row_std->stdId;?>,'acY[]':<?php echo $row_rf->rfAcY;?>,'tmId[]':<?php echo $row_rf->rfTmId;?>,'syId[]':<?php echo $row_rf->rfSyId;?>}, 'prePrintPaymentRegisAllPDF', {})"><img src="<?php echo base_url().$this->config->item("rg_print");?>" align="absmiddle" alt="พิมพ์ใบเสร็จรับเงิน" border="0" /></span>
<?php
}
?>
</td>
<td align="center">
<?php
if (($row_rf->rfBalance != 0) || ($row_pm->pmId != $maxPmId)) {
?>
<span class="hand" onClick="sendPost('hidform', {'pmId':<?php echo $row_pm->pmId;?>,'stdId':<?php echo $row_std->stdId;?>,'acY':<?php echo $row_rf->rfAcY;?>,'tmId':<?php echo $row_rf->rfTmId;?>}, 'printPaymentRegisTime2PDF', {})"><img src="<?php echo base_url().$this->config->item('rg_print');?>" align="absmiddle" alt="พิมพ์ใบสำคัญรับเงิน" border="0" /></span>
<?php
} else {
?>
<span class="hand" onClick="sendPost('hidform', {'pmId[]':<?php echo $row_pm->pmId;?>,'stdId[]':<?php echo $row_std->stdId;?>,'acY[]':<?php echo $row_rf->rfAcY;?>,'tmId[]':<?php echo $row_rf->rfTmId;?>}, 'printPaymentRegis2AllPDF', {})"><img src="<?php echo base_url().$this->config->item('rg_print');?>" align="absmiddle" alt="พิมพ์ใบสำคัญรับเงิน" border="0" /></span> |
<span class="hand" onClick="sendPost('hidform', {'pmId':<?php echo $row_pm->pmId;?>,'stdId':<?php echo $row_std->stdId;?>,'acY':<?php echo $row_rf->rfAcY;?>,'tmId':<?php echo $row_rf->rfTmId;?>}, 'printPaymentRegisTime2PDF', {})"><img src="<?php echo base_url().$this->config->item('rg_print');?>" align="absmiddle" alt="พิมพ์ใบสำคัญรับเงิน" border="0" /></span>
<?php
}
?>
</td>
<td align="center">
<?php
if ($row_pm->pmRefNo == $maxRefNo) {
?>
<span class="hand" onClick="sendPost('hidform', {'pmId':<?php echo $row_pm->pmId;?>,'refNo':'<?php echo $refNo;?>','action':'paymentRegisTime'}, 'pm_delete')" onClick="return confirmSubmit('คุณต้องการลบรายการชำระค่าลงทะเบียนแน่นอนใช่หรือไม่ ?')"><img src="<?php echo base_url().$this->config->item('rg_delete');?>" width="16" height="19" align="absmiddle" border="0" /></span>
<?php
} else
echo '-';
?>
</td>
</tr>
<?php
$i++;
}
}
if ($row_rf->rfBalance != 0) {
?>
<tr>
<td align="center"><?php echo $i+1;?></td>
<td align="center"><?php echo abbreDate2(getNowDate());?>
<input type="hidden" name="pmDate" value="<?php echo getNowDate();?>"></td>
<td class='indent'>เงินสด
<input type="hidden" name="pmType" value="1"></td>
<td align="center"><input type="text" name="pmAmt" value="<?php echo $row_rf->rfBalance;?>" size="5" maxlength="10" class="required-int right" ></td>
<td align="center"></td>
<td align="center"><input type="text" name="refNoPmBook" size="<?php echo $this->config->item('rg_refNoPmBook_length');?>" maxlength="<?php echo $this->config->item('rg_refNoPmBook_length');?>" class="required-int"></td>
<td align="center"><input type="text" name="refNoPmNo" size="<?php echo strlen($this->config->item('rg_refNoPmNo_max'));?>" maxlength="<?php echo strlen($this->config->item('rg_refNoPmNo_max'));?>" class="required-int"></td>
<td align="center">-</td>
<td align="center">-</td>
<td align="center">-</td>
</tr>
<?php
}
}
}
?>
</table></td>
</tr>
<?
if(isset($refNo)){
?>
<tr>
<td><input type="submit" name="add" value="บันทึก" onClick="return checkFormat()" <?php if ($row_rf->rfBalance == 0) { echo "disabled"; }?>>
<input type="button" name="cancel" value="ยกเลิก" onClick="location.href = '<?php //echo $PHP_SELF;?>'">
<input type="hidden" name="refNo" value="<?php echo $refNo;?>"></td>
<td align="right"><font size="2" >รวม <?php echo $i;?> รายการ</font></td>
</tr>
<? }?>
</table><?php echo form_close();?></div><br>
<br></td>
</tr>
</table>
|