File manager - Edit - /var/www/ams.cmtc.ac.th/pages/pdf-StudentInvoice.php
Back
<?php session_start(); //ต้อง login เท่านั้นถึงจะเปิดเอกสารได้ if(!isset($_SESSION['login'])){ echo "Error"; exit();} $login_name=$_SESSION['login_name']; $customer_id = $_GET['studentCode']; $studentCode = base64_decode(base64_decode($customer_id)); require('../inc/config.inc.php'); require('../inc/common.php'); require('../pdf-thai/fpdf.php'); include("convert.php"); define('FPDF_FONTPATH','../pdf-thai/font/'); // ตรวจสอบการลงทะเบียน ตามกำหนด หรือหลังกำหนด // ลงทะเบียนตามกำหนด $sdate_end=$date_end; //echo"system_status=$system_status "; if($system_status==0){ if($date_end>=$today){ $payment_type=$payment_type1; //ลงทะเบียนตามกำหนด $form_name="ใบแจ้งการชำระเงินลงทะเบียนเรียน"; $date_start=thai4($date_start); $date_end=thai4($date_end); } elseif($date_end2>=$today){ $payment_type=$payment_type2; //ลงทะเบียนหลักกำหนด $form_name="ใบแจ้งการชำระเงินลงทะเบียนเรียน (หลังกำหนด)"; $date_start=thai4($date_start2); $date_end=thai4($date_end2); }else{ $payment_type=$payment_type3; //ลงทะเบียนล่าช้า $form_name="ใบแจ้งการชำระเงินลงทะเบียนเรียน (ล่าช้า)"; $date_start=thai4($today); $datedate = date ("Y-m-d", strtotime("+1 day", strtotime($today))); $date_end=thai4($datedate); } } elseif($system_status==1 AND $date_end>=$today){ $payment_type=$payment_type1; //ลงทะเบียนตามกำหนด $form_name="ใบแจ้งการชำระเงินลงทะเบียนเรียน"; $date_start=thai4($date_start); $date_end=thai4($date_end); } elseif($system_status==2 AND $date_end2>=$today){ $payment_type=$payment_type2; //ลงทะเบียนหลักกำหนด $form_name="ใบแจ้งการชำระเงินลงทะเบียนเรียน (หลังกำหนด)"; $date_start=thai4($date_start2); $date_end=thai4($date_end2); } else{ //if($system_status==2 AND $date_end2>$today){ $payment_type=$payment_type3; $form_name="ใบแจ้งการชำระเงินลงทะเบียนเรียน (ล่าช้า)"; $date_start=thai4($today); $datedate = date ("Y-m-d", strtotime("+1 day", strtotime($today))); $date_end=thai4($datedate); } //echo"system_status=$system_status payment_type=$payment_type"; //------ ดึงข้อมูลนักศึกษา -------------- $result_student=select("std2018_student,prefix","where std2018_student.studentCode='$studentCode' AND std2018_student.prefixID=prefix.prefix_id "); $prefix_name=$result_student["prefix_name"]; $idcard=$result_student["idcard"]; $firstname=$result_student["firstname"]; $surname=$result_student["surname"]; $groupCode=$result_student["groupCode"]; $minorNameTh=$result_student["minorNameTh"]; //------- ดึงข้อมูลกลุ่มของนักศึกษา ------- $result_group=select("std2018_studentgroup","where groupCode='$groupCode' "); $grade=$result_group["grade"]; $groupAbbr=$result_group["groupAbbr"]; insert("NULL,'พิมพ์ใบแจ้งการชำระเงินของ $studentCode $prefix_name$firstname $surname กลุ่ม $groupCode','$today $time','$_SESSION[name]' ","regis_system_log"); //------- ดึงข้อมูลค่าหน่วยกิต และค่าธรรมเนียมการศึกษา ------ $result_regis_group=select("regis_group","where groupCode='$groupCode' AND academicYear='$academicYear' AND semester='$semester' "); $credit=$result_regis_group["credit"]; $cost_credit=$result_regis_group["cost_credit"]; $cost_value=$result_regis_group["cost_value"]; $total_value=$cost_credit+$cost_value; $status=$result_regis_group["status"]; //------- ดึงข้อมูลค่าหน่วยกิต และค่าธรรมเนียมการศึกษา ------ //ตรวจสอบว่ามีรายการค่าธรรมเนียมที่ให้เลือกหรือไม่ $result44=num_record("cost_groups_item_list,cost_item_list,cost_item","where cost_groups_item_list.academicYear='$academicYear' AND cost_groups_item_list.semester='$semester' AND cost_groups_item_list.GroupCode='$groupCode' AND cost_groups_item_list.cost_item_id=cost_item_list.cost_item_id AND cost_item_list.option=1 AND cost_item_list.cost_item_id=cost_item.cost_item_id"); if($result44!=0){ $result_regis_student_log=select("regis_student_log","where studentCode='$studentCode' AND academicYear='$academicYear' AND semester='$semester' "); $cost_total=$result_regis_student_log["cost_total"]; }else{ $cost_total=$total_value; } //--------- ดึงค่าข้อมูล ธนาคาร ---------------------------- $result_payment=select("regis_payment","where payment_id ='1'"); $taxid=$result_payment["taxid"]; $suffix=$result_payment["suffix"]; $due_date=$result_payment["due_date"]; $compcode=$result_payment["compcode"]; $bank_name=$result_payment["bank_name"]; $schedule=$result_payment["schedule"]; $note=$result_payment["note"]; $REF1=$result_payment["REF1"]; if($status==0){ echo"Error"; exit(); } $pdf=new FPDF(); $pdf->AddPage(); $img_logo2="../pdfimg/$img_logo"; $img_watermark2="../pdfimg/$img_watermark"; $pdf->Image($img_logo2,15,6,25,25); $pdf->Image($img_watermark2,45,75,130,130); $pdf->AddFont('AngsanaNew','','angsa.php'); $pdf->AddFont('AngsanaNew','B','angsab.php'); $pdf->AddFont('AngsanaNew','I','angsai.php'); $pdf->AddFont('AngsanaNew','BI','angsaz.php'); //-------------- กำหนดค่า -------------------------- $row1="91"; /* //$form_name="บัตรลงทะเบียนรายวิชา/ใบแจ้งการชำระค่าธรรมเนียม"; if($system_status==0){ $form_name="ใบแจ้งการชำระเงินค่าลงทะเบียนเรียน (ล่าช้า)"; $date_start=thai4($date_start2); $date_end=thai4($date_end2); } if($system_status==1 and $date_start>=$today and $date_end<=$today){ $form_name="ใบแจ้งการชำระเงินค่าลงทะเบียนเรียน"; $date_start=thai4($date_start); $date_end=thai4($date_end); } if($system_status==2 and $date_start2>=$today and $date_end2<=$today){ $form_name="ใบแจ้งการชำระเงินค่าลงทะเบียนเรียน (หลังกำหนด)"; $date_start=thai4($date_start2); $date_end=thai4($date_end2); } if($system_status==2 AND $date_end2>$today){ $form_name="ใบแจ้งการชำระเงินค่าลงทะเบียนเรียน (ล่าช้า)"; $date_start=thai4($date_start2); $date_end=thai4($date_end2); } */ $schedule="กำหนดชำระเงินภายในวันที่ $date_start - $date_end เท่านั้น "; $r_semes="ภาคเรียนที่ $semester ปีการศึกษา $academicYear "; if($payment_type==1){ $comment1="** ชำระเงินผ่าน Mobile Banking โดยสแกน QR Code ในใบแจ้งชำระเงินฯ หรือ"; $comment2="** ชำระเงินได้ที่ $bank_name ทุกสาขาทั่วประเทศ "; $comment3="** กรณีที่ไม่สามารถชำระเงินตามที่วิทยาลัยฯ กำหนด ให้ติดต่อ งานการเงิน ก่อนสิ้นสุดวันที่ชำระเงิน"; } if($payment_type==2){ $comment1="** ชำระเงินผ่าน Mobile Banking โดยสแกน QR Code ในใบแจ้งชำระเงินฯ "; $comment2="** กรณีที่ไม่สามารถชำระเงินตามที่วิทยาลัยฯ กำหนด ให้ติดต่อ งานการเงิน ก่อนสิ้นสุดวันที่ชำระเงิน"; $comment3=""; } if($payment_type==3){ $comment1="** ชำระเงินได้ที่ $bank_name ทุกสาขาทั่วประเทศ "; $comment2="** กรณีที่ไม่สามารถชำระเงินตามที่วิทยาลัยฯ กำหนด ให้ติดต่อ งานการเงิน ก่อนสิ้นสุดวันที่ชำระเงิน"; $comment3=""; } if($payment_type==4){ $comment1="** ชำระเงินได้ที่งานการเงินของวิทยาลัยฯ "; $comment2="** กรณีที่ไม่สามารถชำระเงินตามที่วิทยาลัยฯ กำหนด ให้ติดต่อ งานการเงิน ก่อนสิ้นสุดวันที่ชำระเงิน"; $comment3=""; } //------------- สิ้นสุดการกำหนดค่า ---------------- $bb="00"; $bn="2"; //ตรวจรสอบว่า ref1 เป็น เลขประจำตัวประชาชน หรือ รหัสนักศึกษา if($REF1=="เลขประจำตัวประชาชน"){ $ref1=$idcard; } if($REF1=="รหัสนักศึกษา"){ $ref1=$studentCode; } //$ref1=$idcard; $ref2=$groupCode; if($payment_type==1 || $payment_type==2){ $bar_code="|$taxid$suffix\n$ref1\n$ref2$due_date\n$cost_total$bb"; } // ----- Qr Code ----- include "qr/qrlib.php"; if($bar_code!='') { //set it to writable location, a place for temp generated PNG files $PNG_TEMP_DIR = dirname(__FILE__).DIRECTORY_SEPARATOR.'temp'.DIRECTORY_SEPARATOR; //html PNG location prefix $PNG_WEB_DIR = 'temp/'; if (!file_exists($PNG_TEMP_DIR)) mkdir($PNG_TEMP_DIR); $filename = $PNG_TEMP_DIR.'test.png'; $data=$bar_code; $filename2 = 'test'.md5($data.'|'.$errorCorrectionLevel.'|'.$matrixPointSize).'.png'; $filename = $PNG_TEMP_DIR.'test'.md5($data.'|'.$errorCorrectionLevel.'|'.$matrixPointSize).'.png'; QRcode::png($data, $filename, $errorCorrectionLevel, 6, 2); //echo '<img src="'.$PNG_WEB_DIR.basename($filename).'" />'; $qr1="temp/$filename2"; //if($status_qr=="on"){ $pdf->Image($qr1,13,182,30,30,'PNG'); $pdf->Image($qr1,175,245,20,20,'PNG'); //} //ฺbarcode //$pdf->Image('http://regis-std.cmtc.ac.th/barcode.php?text='.$ref1.'&print=true',45,265,70,10,'PNG'); //$pdf->Image('http://regis-std.cmtc.ac.th/barcode.php?text='.$bar_code.'&print=true',50,270,120,12,'PNG'); } //-------------------------- $pdf->SetTextColor(0,0,0); $pdf->SetFont('AngsanaNew','B',24); $pdf->Cell(0,0,iconv( 'UTF-8','TIS-620',$form_name),0,1,"C"); //ชื่อแบบฟอร์ม $pdf->SetFont('AngsanaNew','B',16); $pdf->Cell(0,0,iconv( 'UTF-8','TIS-620','_____________'),0,1,'R'); $pdf->Cell(0,0,iconv( 'UTF-8','TIS-620','สำหรับนักศึกษา'),0,0,'R'); $pdf->Ln(7); $pdf->SetFont('AngsanaNew','B',21); $pdf->SetTextColor(0,0,0); $school_name2="$school_name $institution"; $pdf->Cell(0,0,iconv( 'UTF-8','TIS-620',$school_name2),0,1,'C'); $pdf->SetFont('AngsanaNew','I',12); $pdf->Cell(0,0,iconv( 'UTF-8','TIS-620','(ไม่ใช่ใบเสร็จรับเงิน)'),0,1,'R'); $pdf->Ln(5); $pdf->SetFont('AngsanaNew','',14); $address2="$address"; $pdf->Cell(0,0,iconv( 'UTF-8','TIS-620',$address2),0,1,'C'); $pdf->Ln(7); $pdf->SetFont('AngsanaNew','B',18); $pdf->Cell(0,0,iconv( 'UTF-8','TIS-620',$r_semes),0,1,'C'); $pdf->Ln(6); //-- รายละเอียดของนักศึกษา $pdf->SetFont('AngsanaNew','',14); $pdf->Cell(0,0,iconv( 'UTF-8','TIS-620','รหัสประจำตัวนักศึกษา'),0,1,''); $pdf->Cell(0,0,iconv( 'UTF-8','TIS-620',' ระดับชั้น'),0,1,''); $pdf->Cell(0,0,iconv( 'UTF-8','TIS-620',' รหัสกลุ่ม'),0,1,''); $pdf->SetFont('AngsanaNew','B',14); $studentCode2=" $studentCode"; $pdf->Cell(0,0,iconv( 'UTF-8','TIS-620',$studentCode2),0,1,''); $grade2=" $grade"; $pdf->Cell(0,0,iconv( 'UTF-8','TIS-620',$grade2),0,1,''); $groupCode2=" $groupCode"; $pdf->Cell(0,0,iconv( 'UTF-8','TIS-620',$groupCode2),0,1,''); $pdf->Ln(5); $pdf->SetFont('AngsanaNew','',14); $pdf->Cell(0,0,iconv( 'UTF-8','TIS-620',' ชื่อ - นามสกุล'),0,1,''); $pdf->Cell(0,0,iconv( 'UTF-8','TIS-620',' สาขางาน'),0,1,''); $pdf->Cell(0,0,iconv( 'UTF-8','TIS-620',' กลุ่ม'),0,1,''); $pdf->SetFont('AngsanaNew','B',14); $studentName2=" $prefix_name$firstname $surname"; $pdf->Cell(0,0,iconv( 'UTF-8','TIS-620',$studentName2),0,1,''); $minorNameTh2=" $minorNameTh"; $pdf->Cell(0,0,iconv( 'UTF-8','TIS-620',$minorNameTh2),0,1,''); $groupAbbr2=" $groupAbbr"; $pdf->Cell(0,0,iconv( 'UTF-8','TIS-620',$groupAbbr2),0,1,''); $pdf->Ln(5); //---- รายวิชา ----------------- $pdf->SetFont('AngsanaNew','',14); $pdf->Cell(0,0,'-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------',0,0,'C'); $pdf->Ln(4); $pdf->SetFont('AngsanaNew','B',12); $pdf->Cell(0,0,iconv( 'UTF-8','TIS-620',' รหัสวิชา ชื่อวิชา'),0,1,''); $pdf->Cell(0,0,iconv( 'UTF-8','TIS-620','หน่วยกิต '),0,1,'R'); $pdf->Ln(2); $pdf->SetFont('AngsanaNew','',14); $pdf->Cell(0,0,'-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------',0,0,'C'); $pdf->Ln(4); $pdf->SetFont('AngsanaNew','',12); $rowplan=0; //ดึงข้อมูลแผนการเรียน $sqlx="Select * From std2018_curi_plan where academicYear='$academicYear' AND semester='$semester' AND GroupCode='$groupCode' order by subjectCode ASC"; $db_queryx=mysqli_query($connect,$sqlx); $num_rowsx=mysqli_num_rows($db_queryx); /* นับ Reccord ที่พบ */ $ax=0; $total_creditx=0; while($ax < $num_rowsx) { $resultx = mysqli_fetch_array($db_queryx); $subjectCodex=$resultx['subjectCode']; $subjectNameThx=$resultx['subjectNameTh']; $creditx=$resultx['credit']; //นับจำนวนหน่วยกิต $total_creditx=$total_creditx+$creditx; //------นำเสนอข้อมูล $subjectCodex2=" $subjectCodex"; $subjectNameThx2=" $subjectNameThx"; $creditx2=" $creditx"; $pdf->Cell(0,0,iconv( 'UTF-8','TIS-620',$subjectCodex2),0,1,''); $pdf->Cell(0,0,iconv( 'UTF-8','TIS-620',$subjectNameThx2),0,1,''); $pdf->Cell(0,0,iconv( 'UTF-8','TIS-620',$creditx2),0,1,''); //------สิ้นสุดนำเสนอข้อมูล $pdf->Ln(4); $rowplan=$rowplan+4; $ax++; } $pdf->SetFont('AngsanaNew','',14); $pdf->Cell(0,0,'-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------',0,0,'C'); $pdf->Ln(4); $pdf->SetFont('AngsanaNew','B',14); $pdf->Cell(0,0,iconv( 'UTF-8','TIS-620','รวมหน่วยกิต'),0,1,'C'); $total_creditx2="$total_creditx หน่วยกิต"; $pdf->Cell(0,0,iconv( 'UTF-8','TIS-620',$total_creditx2),0,1,'R'); $pdf->Ln(2); $pdf->SetFont('AngsanaNew','',14); $pdf->Cell(0,0,'-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------',0,0,'C'); // -- ค่าธรรมเนียมที่เบิกได้ตามระบบกระทรวงการคลัง $pdf->Ln(5); $pdf->SetFont('AngsanaNew','B',14); $pdf->Cell(0,0,iconv( 'UTF-8','TIS-620','ค่าธรรมเนียมการศึกษา'),0,1,'L'); $pdf->Ln(5); $pdf->SetFont('AngsanaNew','',12); $credit22=" ค่าลงทะเบียนรายวิชา จำนวน $credit หน่วยกิต "; $total_value2=""; $pdf->Cell(0,0,iconv( 'UTF-8','TIS-620',$credit22),0,1,''); // ค่าหน่วยกิต $cost_credit12=number_format($cost_credit); $cost_credit2="$cost_credit12.00 บาท "; $pdf->Cell(0,0,iconv( 'UTF-8','TIS-620',$cost_credit2),0,1,'R'); $pdf->Ln(4); $rowcost=0; // -- ค่าธรรมเนียมการศึกษา $sql2="Select * From cost_groups_item_list,cost_item where cost_groups_item_list.academicYear='$academicYear' AND cost_groups_item_list.semester='$semester' AND cost_groups_item_list.groupCode='$groupCode' AND cost_groups_item_list.cost_item_id=cost_item.cost_item_id order by cost_groups_item_list.id ASC"; $db_query2=mysqli_query($connect,$sql2); $num_rows2=mysqli_num_rows($db_query2); $a2=0; $cost_total2=$cost_credit2; while($a2 < $num_rows2) { $result2 = mysqli_fetch_array($db_query2); $item_id2=$result2['id']; $cost_subject2=$result2['cost_subject']; $cost_var2=$result2['cost_var']; $cost_item_id2=$result2['cost_item_id']; $result33=select("cost_item_list","where cost_item_id='$cost_item_id2'"); //echo $result["color_name"]; $option=$result33['option']; if($option==0){ $cost_total2=$cost_total2+$cost_var2; //------นำเสนอข้อมูล $cost_subject2x=" $cost_subject2"; $cost_var22=number_format($cost_var2); $cost_var2x="$cost_var2 บาท"; $pdf->Cell(0,0,iconv( 'UTF-8','TIS-620',$cost_subject2x),0,1,''); // ค่าหน่วยกิต $cost_var2x="$cost_var22.00 บาท "; $pdf->Cell(0,0,iconv( 'UTF-8','TIS-620',$cost_var2x),0,1,'R'); //------สิ้นสุดนำเสนอข้อมูล $pdf->Ln(4); $rowcost=$rowcost+4; }else{ //ตรวจสอบว่ามีการเลือกค่าธรรมเนียมนี้หรือเปล่า $result44=num_record("student_select_option","where academicYear='$academicYear' AND semester='$semester' AND studentCode='$studentCode' AND cost_item_id='$cost_item_id2'"); if($result44!="0"){ $cost_total2=$cost_total2+$cost_var2; //------นำเสนอข้อมูล $cost_subject2x=" $cost_subject2"; $cost_var22=number_format($cost_var2); $cost_var2x="$cost_var2 บาท"; $pdf->Cell(0,0,iconv( 'UTF-8','TIS-620',$cost_subject2x),0,1,''); // ค่าหน่วยกิต $cost_var2x="$cost_var22.00 บาท "; $pdf->Cell(0,0,iconv( 'UTF-8','TIS-620',$cost_var2x),0,1,'R'); //------สิ้นสุดนำเสนอข้อมูล $pdf->Ln(4); $rowcost=$rowcost+4; } } $a2++; } //-- รวมค่าธรรมเนียมทั้งหมด $convert_number= convert($cost_total); $total_value=number_format($cost_total); //--------------------------------------- $pdf->Ln(2); $pdf->SetFont('AngsanaNew','B',16); $Payment="รวมเงินที่ต้องชำระ ($convert_number)"; $pdf->Cell(0,0,iconv( 'UTF-8','TIS-620',$Payment),0,1,'C'); $r_total_cost2_show="$total_value.00 บาท "; $pdf->Cell(0,0,iconv( 'UTF-8','TIS-620',$r_total_cost2_show),0,1,'R'); // ขึ้นตอน หมายเหตุ $rowcut=$row1-$rowplan-$rowcost; $pdf->Ln($rowcut); //------------------------------------------- $pdf->Ln(7); $pdf->SetFont('AngsanaNew','BI',16); $pdf->Cell(0,0,iconv( 'UTF-8','TIS-620',$schedule),0,1,'C'); //-- หมายเหตุ $pdf->Ln(7); $pdf->SetFont('AngsanaNew','BI',14); $pdf->Cell(0,0,iconv( 'UTF-8','TIS-620',' หมายเหตุ '),0,1,'T'); $pdf->SetFont('AngsanaNew','',14); $comment1=" $comment1"; $pdf->Cell(0,0,iconv( 'UTF-8','TIS-620',$comment1),0,1,''); $pdf->Ln(5); $comment2=" $comment2"; $pdf->Cell(0,0,iconv( 'UTF-8','TIS-620',$comment2),0,1,''); $pdf->Ln(5); $pdf->SetFont('AngsanaNew','B',14); $comment3=" $comment3"; $pdf->Cell(0,0,iconv( 'UTF-8','TIS-620',$comment3),0,1,''); $pdf->Ln(10); //$pdf->Cell(0,0,' ในการนำไปแนบกับใบเสร็จรับเงินเพื่อตั้งเบิกกับทางราชการ',0,1,'L'); //$pdf->Ln(3); $pdf->SetFont('AngsanaNew','',14); $pdf->Cell(0,0,iconv( 'UTF-8','TIS-620','...........................................................'),0,1,'R'); $pdf->Ln(5); $pdf->Cell(0,0,iconv( 'UTF-8','TIS-620','เจ้าหน้าที่รับเงิน '),0,1,'R'); $pdf->Ln(5); $pdf->SetFont('AngsanaNew','B',14); if($payment_type==4){ $pdf->Cell(0,0,iconv( 'UTF-8','TIS-620','(ลงลายมือชื่อและประทับตราวิทยาลัย)'),0,1,'R'); }else{ $pdf->Cell(0,0,iconv( 'UTF-8','TIS-620','(ลงลายมือชื่อและประทับตราธนาคาร)'),0,1,'R'); } $pdf->SetFont('AngsanaNew','',14); if($payment_type==1 or $payment_type==2 ){ $pdf->Cell(0,0,iconv( 'UTF-8','TIS-620','QR Code Mobile Banking'),0,1,'I'); } $pdf->Ln(5); $pdf->SetFont('AngsanaNew','',14); $pdf->Cell(0,0,iconv( 'UTF-8','TIS-620','วันที่............../................./..................'),0,1,'R'); //----------- ผู้พิมพ์ วันที่พิมพ์ --------------------- $pdf->Ln(2); $pdf->SetFont('AngsanaNew','',12); $Publisher1="ผู้พิมพ์ $login_name "; $Publisher_day=thai3($today); $Publisher2=" วันที่พิมพ์รายงาน $Publisher_day "; $pdf->Cell(0,0,iconv( 'UTF-8','TIS-620',$Publisher1),0,1,''); $pdf->Cell(0,0,iconv( 'UTF-8','TIS-620',$Publisher2),0,1,''); //--------- ส่วนท้าย -------------------------------- $pdf->Ln(3); $pdf->SetFont('AngsanaNew','I',14); $pdf->Cell(0,0,iconv( 'UTF-8','TIS-620','- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -'),0,0,'C'); $pdf->Ln(5); $pdf->SetFont('AngsanaNew','B',16); if($payment_type==4){ $pdf->Cell(0,0,iconv( 'UTF-8','TIS-620','_______________'),0,1,'R'); $pdf->Cell(0,0,iconv( 'UTF-8','TIS-620','สำหรับงานการเงิน'),0,0,'R'); }else{ $pdf->Cell(0,0,iconv( 'UTF-8','TIS-620','_____________'),0,1,'R'); $pdf->Cell(0,0,iconv( 'UTF-8','TIS-620','สำหรับธนาคาร'),0,0,'R'); } $pdf->Ln(1); $pdf->Ln(2); $pdf->SetFont('AngsanaNew','B',18); $school_name2="$school_name $institution"; $pdf->Cell(0,0,iconv( 'UTF-8','TIS-620',$school_name2),0,0,''); $pdf->Ln(2); $pdf->SetFont('AngsanaNew','B',16); $pdf->Cell(0,0,iconv( 'UTF-8','TIS-620',$r_semes),0,0,'R'); $pdf->Ln(5); //-- รายละเอียดของนักศึกษา $pdf->SetFont('AngsanaNew','',14); if($payment_type==4){ $pdf->Cell(0,0,iconv( 'UTF-8','TIS-620',' รหัสประจำตัวนักศึกษา'),0,1,''); $studentCode2=" $studentCode"; }else{ if($REF1=="เลขประจำตัวประชาชน"){ $pdf->Cell(0,0,iconv( 'UTF-8','TIS-620','เลขประจำตัวประชาชน/REF.1'),0,1,''); $studentCode2=" $idcard"; } if($REF1=="รหัสนักศึกษา"){ $pdf->Cell(0,0,iconv( 'UTF-8','TIS-620',' รหัสนักศึกษา/REF.1'),0,1,''); $studentCode2=" $studentCode"; } } $pdf->Cell(0,0,iconv( 'UTF-8','TIS-620',' ชื่อ - นามสกุล'),0,1,''); $pdf->Cell(0,0,iconv( 'UTF-8','TIS-620',' ระดับชั้น'),0,1,''); $pdf->SetFont('AngsanaNew','B',16); $pdf->Cell(0,0,iconv( 'UTF-8','TIS-620',$studentCode2),0,1,''); $studentname12=" $prefix_name$firstname $surname"; $pdf->SetFont('AngsanaNew','B',14); $pdf->Cell(0,0,iconv( 'UTF-8','TIS-620',$studentname12),0,1,''); $groupCode2=" $grade"; $pdf->Cell(0,0,iconv( 'UTF-8','TIS-620',$groupCode2),0,1,''); $pdf->Ln(5); $pdf->SetFont('AngsanaNew','',14); if($payment_type==4){ $pdf->Cell(0,0,iconv( 'UTF-8','TIS-620',' รหัสกลุ่ม'),0,1,''); }else{ $pdf->Cell(0,0,iconv( 'UTF-8','TIS-620',' รหัสกลุ่ม/REF.2'),0,1,''); } $pdf->Cell(0,0,iconv( 'UTF-8','TIS-620',' สาขางาน'),0,1,''); $pdf->Cell(0,0,iconv( 'UTF-8','TIS-620',' กลุ่ม'),0,1,''); $pdf->SetFont('AngsanaNew','B',16); $groupCode=" $groupCode"; $pdf->Cell(0,0,iconv( 'UTF-8','TIS-620',$groupCode),0,1,''); $pdf->SetFont('AngsanaNew','B',14); $minorNameTh2=" $minorNameTh"; $pdf->Cell(0,0,iconv( 'UTF-8','TIS-620',$minorNameTh2),0,1,''); $groupAbbr2=" $groupAbbr"; $pdf->Cell(0,0,iconv( 'UTF-8','TIS-620',$groupAbbr2),0,1,''); $pdf->Ln(8); if($payment_type==1 or $payment_type==3){ $pdf->Image('pdfimg/logo_ktb.jpg',65,246.8,8); //ธนาคารกรุงไทย $compcode=$result_payment["compcode"]; $bank_name=$result_payment["bank_name"]; $bank_detail="$bank_name Comp Code : $compcode"; $pdf->SetFont('AngsanaNew','B',18); $pdf->Cell(0,0,iconv( 'UTF-8','TIS-620',$bank_detail),0,1,'C'); } if($payment_type==2){ $bank_detail="ชำระผ่าน Mobile Banking"; $pdf->SetFont('AngsanaNew','B',18); $pdf->Cell(0,0,iconv( 'UTF-8','TIS-620',$bank_detail),0,1,'C'); } if($payment_type==4){ $bank_detail="ชำระที่งานการเงิน $school_name"; $pdf->SetFont('AngsanaNew','B',18); $pdf->Cell(0,0,iconv( 'UTF-8','TIS-620',$bank_detail),0,1,'C'); } $pdf->Image('pdfimg/ddd.jpg',10,255,152,8); //เส้นทึบ $pdf->Ln(9); $pdf->SetFont('AngsanaNew','B',16); $Payment=" จำนวนเงิน ($convert_number)"; $pdf->Cell(0,0,iconv( 'UTF-8','TIS-620',$Payment),0,1,''); $r_total_cost2_show="$total_value.00 บาท "; $pdf->Cell(0,0,iconv( 'UTF-8','TIS-620',$r_total_cost2_show),0,1,'R'); $pdf->Ln(7); $pdf->SetFont('AngsanaNew','BI',14); $pdf->Cell(0,0,iconv( 'UTF-8','TIS-620',$schedule),0,1,'C'); $pdf->Ln(10); $pdf->SetFont('AngsanaNew','',14); //$pdf->Cell(0,0,'................................',0,1,'R'); $pdf->Cell(0,0,iconv( 'UTF-8','TIS-620','ผู้นำฝาก................................. โทรศัพท์............................'),0,1,'R'); //$pdf->Cell(0,0,iconv( 'UTF-8','TIS-620','QR Code สำหรับ Mobile Banking'),0,1,'I'); $pdf->Output(); ?>
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Generation time: 0.49 |
proxy
|
phpinfo
|
Settings