<%@page contentType="text/html; charset=UTF-8"%>
<%@page import="java.util.*,java.io.*,java.text.*"%>
<%@page import="com.csc.library.util.download.*"%>
<%@page import="com.csc.library.util.ManageDocument"%>
<%@page import="com.csc.library.approve.*,com.csc.library.databean.*,com.csc.library.database.*"%>
<%@page import="com.csc.library.entry.*,com.csc.library.utilities.*,com.csc.library.report.*"%>
<%@page import="com.csc.library.session.*"%>

<%request.setCharacterEncoding("UTF-8");%>

<jsp:useBean id="TEMPLATE_WORKFLOW" class="com.csc.library.system.Task" scope="page"/>

<%
TEMPLATE_WORKFLOW.setChannel(request,response);
TEMPLATE_WORKFLOW.checkProfile();
if( TEMPLATE_WORKFLOW.getUProfile() != null ){
TEMPLATE_WORKFLOW.getUProfile().set("appname","WELFARE");
	UIManager screenSingle = (UIManager) TEMPLATE_WORKFLOW.process("SingleEntry","TEMPLATE_WORKFLOW");
	
	DecimalFormat df = new DecimalFormat("#,##0.00");
%>

<%
	String wf = null;
	CheckNull chkNull = new CheckNull();
		String dss1 = "none";
		String dss2 = "none";
		String dss3 = "none";
		String dss4 = "none";
		String dss5 = "none";
	String stp= chkNull.chkNullString(request.getParameter("step_id"));
	if(stp.equals("2") || stp.equals("3")){ 
		dss1 ="";
		dss2 ="";
		dss3 ="";
		dss4 ="";
		dss5 ="";
	}
	Organization og = new Masfactor(screenSingle.getUProfile());
	String subject = null;
	String remark = null;
	String emp_fullname = null;
	String bossid = og.getBoss(screenSingle.getUProfile().get("employeeid"),screenSingle.getUProfile().get("job")).get(0).toString();
	String bossjob = bossid.substring(bossid.indexOf(":")+1);
	CscCalendar calendar = new CscCalendar();

	bossid = bossid.substring(0,bossid.indexOf(":"));
	DbRecord memployee_dr = new InitialRecord(screenSingle.getUProfile()).getDbRecord("Memployee");
	memployee_dr.setColumn("*");
	
	DbRecord mcostcenter0 = new InitialRecord(screenSingle.getUProfile()).getDbRecord("mcostcenter0");
	mcostcenter0.setColumn("*");
	memployee_dr.putChild(mcostcenter0);
	
	//WF_STATUS 1 = รอการอนุมัติ
	//          3 = ยกเลิกการอนุมัติ
	//          4 = อนุมัติแล้ว
	//          5 = ไม่อนุมัติ
	//          6 = แก้ไขโดย HR
	//          7 = ส่งกลับ
	//          8 = ยกเลิกเอกสาร
	//          9 = ประวัติ
	if( (!screenSingle.getDataLabel("WF_STATUS").equals("1")) && (!screenSingle.getDataLabel("WF_STATUS").equals("4")) &&
		(!screenSingle.getDataLabel("WF_STATUS").equals("7")) ){
		wf = "false";
	}else{
		wf = "true";
	}
	
	if( request.getParameter("downfile") != null ){
		ThaiUtilities tu = new ThaiUtilities();
		String filePath = request.getParameter("downfile");
		File f = new File(tu.ASCII2Unicode(filePath));
		String fileName = f.getName();
		String fileType = fileName.substring(fileName.indexOf(".")+1,fileName.length());
		if ( f.exists() && f.canRead() ) {			
			response.setContentType("application/octet-stream");
			response.setHeader("Content-Disposition", "attachment; filename="+tu.Unicode2ASCII(f.getName()));
			response.setHeader("cache-control", "no-cache");
			response.setContentLength((int) f.length());
			BufferedInputStream fileInput = new BufferedInputStream(new FileInputStream(f));
			byte buffer[] = new byte[8 * 1024];
			out.clearBuffer();
			OutputStream out_s = response.getOutputStream();
			CopyStreams.copyStreamsWithoutClose(fileInput, out_s, buffer);
			out_s.flush();
			out_s.close();
			fileInput.close();
		}
	}
%>

<jsp:useBean id="LOG_SENTHELP" class="com.csc.library.system.Task" scope="page"/>

<%
	LOG_SENTHELP.setChannel(request, response);
	HelpEntry screenHelp = (HelpEntry) LOG_SENTHELP.process("HelpEntry","LOG_SENTHELP");
	screenHelp.getInquiry().setFilter("COMPANYID = '"+screenHelp.getUProfile().get("companyid")+"' AND "+
									  "WF_ID = '"+chkNull.chkNullString(request.getParameter("wf_id"),"302")+"' AND "+
									  "WF_VER = '"+chkNull.chkNullString(request.getParameter("wf_ver"),"1")+"'"
									 );
	screenHelp.referLangOn();
	screenHelp.process();
	
	 InitialEnvironment en = new InitialEnvironment(screenSingle.getUProfile().getDbName());
	 String vendor=en. getValue("datasource-dbtype");	
%>

<!-- Insert useBean -->

<HTML>
	<HEAD>
		<TITLE>myNOTE : Business Process Management Service</TITLE>
		<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
		<!-- Insert Link -->
		<LINK HREF="../CSS/MYNOTE.css" REL="stylesheet" TYPE="text/css">
		<LINK HREF="../CSS/MYNOTE_MENU.css" REL="stylesheet" TYPE="text/css">
		<!-- Insert Script Import -->
		<SCRIPT TYPE='text/JavaScript' SRC='../JS/MYNOTE_SCREEN.js'></SCRIPT>
		<SCRIPT TYPE='text/JavaScript' SRC='../JS/MYNOTE_MENU.js'></SCRIPT>
		<SCRIPT TYPE='text/JavaScript' SRC='../JS/SCREEN.js'></SCRIPT>
		<SCRIPT TYPE='text/JavaScript' SRC='../JS/WELSCREEN.js'></SCRIPT>
		<SCRIPT LANGUAGE="JavaScript">setLang('<%=screenSingle.getUProfile().get("lang")%>');</SCRIPT>
				<!--DWR INCLUDE-->
		<script src="../JS/VIEWCALENDAR.js"></script>
  <script type='text/javascript' src='/hr/dwr/interface/SearchDWR.js'></script>
  <script type='text/javascript' src='/hr/dwr/engine.js'></script>
  <script type='text/javascript' src='/hr/dwr/util.js'></script>
  <script type="text/javascript" src="/hr/dwr/interface/SystemCode.js"></script>
  <script type="text/javascript" src="/hr/dwr/interface/CscCalendar.js"></script>
        <script type="text/javascript" src="/hr/dwr/interface/CheckRequisition.js"></script>
<!--DWR INCLUDE-->
	</HEAD>
	<BODY BGCOLOR=#FFFFFF onLoad="MM_preloadImages('../IMAGES/BUTTON/SWAP/EDIT_SWAP20.gif','../IMAGES/BUTTON/SWAP/EXIT_SWAP20.gif')">
	<!-- ImageReady Slices (02.psd) -->
		<FORM NAME="cscform" METHOD="post" ACTION="WEL202_NSTDA.jsp">
			<!----------BEGIN CSC INITIAL ZONE ------------------------>

<%=screenSingle.InitialVariable()%>

<!----------END CSC INITIAL ZONE -------------------------->
			<SPAN id="message1" ></SPAN>
			<INPUT TYPE="hidden" NAME="__screen" VALUE="WEL202_NSTDA">
			<INPUT TYPE="hidden" NAME="__cmd" VALUE="">
			<INPUT TYPE="hidden" NAME="__help" VALUE="">
			<INPUT TYPE="hidden" NAME="__fixCon" VALUE="">
			
			<INPUT TYPE="hidden" NAME="__notNull" VALUE="<%=screenSingle.getRequire()%>">
			<INPUT TYPE="hidden" NAME="__companyid" VALUE="<%=screenSingle.getUProfile().get("companyid")%>">

			<INPUT TYPE="hidden" NAME="wf_id" VALUE="302">
			<INPUT TYPE="hidden" NAME="wf_ver" VALUE="<%=chkNull.chkNullString(request.getParameter("wf_ver"),"1")%>">
			<INPUT TYPE="hidden" NAME="__wf_id" VALUE="302">
			<INPUT TYPE="hidden" NAME="__wf_ver" VALUE="<%=chkNull.chkNullString(request.getParameter("wf_ver"),"1")%>">
			<INPUT TYPE="hidden" NAME="wf_seq_no" VALUE="<%=chkNull.chkNullString(request.getParameter("wf_seq_no"),"0")%>">
			<INPUT TYPE="hidden" NAME="step_id" VALUE="<%=chkNull.chkNullString(request.getParameter("step_id"),"0")%>">
			<INPUT TYPE="hidden" NAME="step_seq_no" VALUE="<%=chkNull.chkNullString(request.getParameter("step_seq_no"),"0")%>">
			<INPUT TYPE="hidden" NAME="wf_return_actor" VALUE="IINIT">
			<INPUT TYPE="hidden" NAME="__oldDocumentID" VALUE="<%=screenSingle.getDataLabel("DOC_NO")%>">
			<INPUT TYPE="hidden" NAME="__oldWF" VALUE="<%=screenSingle.getDataLabel("WF_STATUS")%>">
			
			<INPUT TYPE="hidden" NAME="__wf" VALUE="<%=wf%>">
			<INPUT TYPE="hidden" NAME="__wfcmd" VALUE="false">
			<!-- Insert Hidden Field -->
			  <input type="hidden" name="__calendar">
    <script language="javascript">getInputFormatDate();</script>
<input type="hidden" name="__language"  value="<%= TEMPLATE_WORKFLOW.getUProfile().get("lang") %>">
			<%//=screenSingle.getTagConfirm()%>
			
			<DIV ID="toolTipLayer" STYLE="position:absolute; visibility: hidden"></DIV>
			<SCRIPT LANGUAGE="JavaScript">initToolTips();</SCRIPT>
			
<%
							String screen_value = chkNull.chkNullString(screenSingle.getDataLabel("SCREEN_VALUE"));
							HashMap hm = new HashMap();
							ManageDocument md = new ManageDocument();
							
							hm.put("WF_ID",request.getParameter("wf_id"));
							hm.put("WF_VER",request.getParameter("wf_ver"));
							hm.put("WF_SEQ_NO",request.getParameter("wf_seq_no"));
							hm.put("STEP_ID",request.getParameter("step_id"));
							hm.put("STEP_SEQ_NO",request.getParameter("step_seq_no"));
							hm.put("ACTOR_ID",screenSingle.getUProfile().getActor());
							hm.put("POSITION_CODE",screenSingle.getUProfile().get("job"));
							
							md.setUProfile(screenSingle.getUProfile());
							md.setParam(hm);
							md.setVW_Incident();
							md.setWFDataValue(screen_value);
							ReportUDF rf=new ReportUDF();
							
							memployee_dr.set("COMPANYID",screenSingle.getUProfile().get("companyid"));
							memployee_dr.set("EMPLOYEEID",md.getWFDataValue("__wf__employeeid"));
							memployee_dr.search();
							
							String width="80%";
						%>			
			<!-- initial Report -->
			<TABLE  width="<%=width%>" border="0" cellpadding="1" cellspacing="0" bgcolor="#000000" align="center">
              <TR>
                <TD ><table width="100%" border="0" cellpadding="0" cellspacing="1" >
                  <tr>
                    <td  class="desc2" bgcolor="#FFFFFF"><div align="center">
                      <h3><strong>กองทุนบำเหน็จบำนาญข้าราชการ<br>
                      แบบฟอร์มเบิกเงินสด</strong></h3>
                    </div></td>
                  </tr>
                </table></TD>
              </TR>
            </TABLE>
			<table width="<%=width%>" border="0" cellpadding="1" cellspacing="0" bgcolor="#000000" align="center">
              <tr>
                <td><TABLE WIDTH="100%" height="20" BORDER="0" ALIGN="center" CELLPADDING="0" CELLSPACING="1" class="inframe">
                    <TR>
                      <TD width="47%" valign="top" nowrap bgcolor="#FFFFFF"  class="desc2"><table width="100%" border="0" cellpadding="0" cellspacing="0">
                        <tr>
                          <td width="35%" height="31"  >&nbsp;</td>
                          <td width="42%"  >&nbsp;</td>
                          <td width="23%"  >เลขที่ </td>
                        </tr>
                        <tr>
                          <td height="31"  >&nbsp;</td>
                          <td  >&nbsp;</td>
                          <td  >วันที่ </td>
                        </tr>
                        <tr>
                          <td height="31" colspan="3"  >ชื่อ-สกุลผู้เบิก &nbsp;<%=memployee_dr.getString("fullname")%></td>
                        </tr>
                        <tr>
                          <td height="31"  >รหัสหน่วยงาน &nbsp;<%=memployee_dr.getString("costcenter")%></td>
                          <td colspan="2"  >ชื่อหน่วยงาน <%=mcostcenter0.getString("tdesc")%></td>
                        </tr>
                        <tr>
                          <td height="31"  >รหัสโครงการ</td>
                          <td colspan="2"  >ชื่อโครงการ</td>
                        </tr>
                        <tr>
                          <td height="31" colspan="3"  >&nbsp;</td>
                        </tr>

                      </table></TD>
                    </TR>
                </TABLE></td>
              </tr>
            </table>
<%
		DataSet ds=new DataSet();
		String _and="+'  '+";
			if(vendor.equalsIgnoreCase("ORACLE")){
				_and="||'  '||";
			}
		 String desc=((String)screenSingle.getUProfile().get("lang")).equals("eng")?"efname"+_and+"elname ":"fnameid"+_and+"lname ";
		String sql1="select  mempl_family.*,"+desc+" fullname from mempl_family where  employeeid='"+md.getWFDataValue("__wf__employeeid")+"' and relationid in('01','02','03','04','05','06','09')  order by "+desc;		
		
		HashMap familyOps=new HashMap();
				try{
				ds.setDbName(screenSingle.getUProfile().getDbName());
				ds.setTableName("mempl_family");
				ds.setSql(sql1);
				ds.initConnection(screenSingle.getUProfile());
					while(ds.next()){
						familyOps.put(ds.getString("line_no"),ds.getString("fullname"));
					}
				}catch(Exception  ex){
				}finally{
					if(ds!=null){
							ds.closeConnection();
					}
				}													
									
%>
		    <table width="<%=width%>" border="0" cellpadding="1" cellspacing="0" bgcolor="#000000" align="center">
              <tr>
                <td><TABLE WIDTH="100%" height="20" BORDER="0" ALIGN="center" CELLPADDING="0" CELLSPACING="1" class="inframe">
                    <TR>
                      <TD width="47%" valign="top" nowrap bgcolor="#FFFFFF"  class="desc2"><table width="100%" border="0" cellpadding="0" cellspacing="0">
                          <tr>
                            <td height="31" colspan="3"  ><div align="center">
                              <h3>ข้อมูลการเบิกเงินสด</h3>
                            </div></td>
                          </tr>
                          <tr>
                            <td width="20%" height="31"  >ชำระค่า</td>
                            <td width="59%"  ><input type="checkbox" name="checkbox" value="checkbox">
                              ค่าเลี้ยงรับรอง(โปรดระบุ วัตถุประสงค์ วันที่ สถานที่ รายชื่อเจ้าหน้าที่ กบข. และรายชื่อหน่วยงานที่รับรอง) <br>
							  <input type="checkbox" name="checkbox" value="checkbox" <% if(md.getWFDataValue("__wf__welid").equals("EDU001")){ out.println("checked");}%> >
							  ค่าเล่าเรียน <br>
							  <input type="checkbox" name="checkbox" value="checkbox"  <% if(!md.getWFDataValue("__wf__welid").equals("EDU001")){ out.println("checked");}%> >
						    อื่นๆ	 <% if(!md.getWFDataValue("__wf__welid").equals("EDU001")){ out.println(md.getWFDataValue("__wf__weldesc"));}%>						  </td>
                            <td width="21%"  >&nbsp;</td>
                          </tr>
                          <tr>
                            <td height="31"  >รายละเอียด(เพิ่มเติม)</td>
                            <td colspan="2"  ><table width="100%" border="0" cellpadding="0" cellspacing="0">
                              <tr>
                                <td height="31"  >&nbsp; <% if(md.getWFDataValue("__wf__welid").equals("EDU001")){ %>
																					<%=(md.getWFDataValue("__wf__mcomplain$line_no$01").length()==0)?"":familyOps.get(md.getWFDataValue("__wf__mcomplain$line_no$01"))+" "+md.getWFDataValue("__wf__mcomplain$terminal$01")+"/"+md.getWFDataValue("__wf__mcomplain$eduyear$01")+" "+md.getWFDataValue("__wf__degreeiddesc01")+" "+md.getWFDataValue("__wf__siteweldesc01")%>
																					<%=(md.getWFDataValue("__wf__mcomplain$line_no$02").length()==0)?"":familyOps.get(md.getWFDataValue("__wf__mcomplain$line_no$02"))+" "+md.getWFDataValue("__wf__mcomplain$terminal$02")+"/"+md.getWFDataValue("__wf__mcomplain$eduyear$02")+" "+md.getWFDataValue("__wf__degreeiddesc02")+" "+md.getWFDataValue("__wf__siteweldesc02")%>
																					<%=(md.getWFDataValue("__wf__mcomplain$line_no$03").length()==0)?"":familyOps.get(md.getWFDataValue("__wf__mcomplain$line_no$03"))+" "+md.getWFDataValue("__wf__mcomplain$terminal$03")+"/"+md.getWFDataValue("__wf__mcomplain$eduyear$03")+" "+md.getWFDataValue("__wf__degreeiddesc03")+" "+md.getWFDataValue("__wf__siteweldesc03")%>
																					<%=(md.getWFDataValue("__wf__mcomplain$line_no$04").length()==0)?"":familyOps.get(md.getWFDataValue("__wf__mcomplain$line_no$04"))+" "+md.getWFDataValue("__wf__mcomplain$terminal$04")+"/"+md.getWFDataValue("__wf__mcomplain$eduyear$04")+" "+md.getWFDataValue("__wf__degreeiddesc04")+" "+md.getWFDataValue("__wf__siteweldesc04")%>
																					<%=(md.getWFDataValue("__wf__mcomplain$line_no$05").length()==0)?"":familyOps.get(md.getWFDataValue("__wf__mcomplain$line_no$05"))+" "+md.getWFDataValue("__wf__mcomplain$terminal$05")+"/"+md.getWFDataValue("__wf__mcomplain$eduyear$05")+" "+md.getWFDataValue("__wf__degreeiddesc05")+" "+md.getWFDataValue("__wf__siteweldesc05")%>
																					<%}%></td>
                              </tr>
                            </table></td>
                          </tr>
                          <tr>
                            <td height="31"  >หมายเหตุ</td>
                            <td colspan="2"  >&nbsp;<%=screenSingle.getDataLabel("remark")%></td>
                          </tr>
                          <tr>
                            <td height="31"  >เอกสารประกอบ</td>
                            <td colspan="2"  >&nbsp;เลขที่ใบเสร็จ <%=(md.getWFDataValue("__wf__mcomplain$numberbill$01").length()>0)?md.getWFDataValue("__wf__mcomplain$numberbill$01")+"  วันที่ใบเสร็จ "+md.getWFDataValue("__wf__mcomplain$datebill$01"):""%>
																									<%=(md.getWFDataValue("__wf__mcomplain$numberbill$02").length()>0)?",เลขที่ใบเสร็จ  "+md.getWFDataValue("__wf__mcomplain$numberbill$02")+"  วันที่ใบเสร็จ "+md.getWFDataValue("__wf__mcomplain$datebill$02"):""%>
																									<%=(md.getWFDataValue("__wf__mcomplain$numberbill$03").length()>0)?", เลขที่ใบเสร็จ "+md.getWFDataValue("__wf__mcomplain$numberbill$03")+"  วันที่ใบเสร็จ "+md.getWFDataValue("__wf__mcomplain$datebill$03"):""%>
																									<%=(md.getWFDataValue("__wf__mcomplain$numberbill$04").length()>0)?", เลขที่ใบเสร็จ "+md.getWFDataValue("__wf__mcomplain$numberbill$04")+"  วันที่ใบเสร็จ "+md.getWFDataValue("__wf__mcomplain$datebill$04"):""%>
																									<%=(md.getWFDataValue("__wf__mcomplain$numberbill$05").length()>0)?", เลขที่ใบเสร็จ "+md.getWFDataValue("__wf__mcomplain$numberbill$05")+"  วันที่ใบเสร็จ "+md.getWFDataValue("__wf__mcomplain$datebill$05"):""%>
																									<br>
							</td>
                          </tr>

                      </table></TD>
                    </TR>
                </TABLE></td>
              </tr>
            </table>
		    <table width="<%=width%>" border="0" cellpadding="1" cellspacing="0" bgcolor="#000000" align="center">
              <tr>
                <td><TABLE WIDTH="100%" height="20" BORDER="0" ALIGN="center" CELLPADDING="0" CELLSPACING="1" class="inframe">
                    <TR>
                      <TD width="47%" valign="top" nowrap bgcolor="#FFFFFF"  class="desc2"><table width="100%" border="0" cellpadding="0" cellspacing="0">

                          <tr>
                            <td width="100%" height="31"  ><div align="center">
                              <h3>จำนวนเงิน(บาท)</h3>
                            </div></td>
                          </tr>
                      </table></TD>
                    </TR>
                </TABLE></td>
              </tr>
            </table>
		    <table width="<%=width%>" border="0" cellpadding="1" cellspacing="0" bgcolor="#000000" align="center">
              <tr>
                <td><TABLE WIDTH="100%" height="20" BORDER="0" ALIGN="center" CELLPADDING="0" CELLSPACING="1" class="inframe">
                    <TR>
                      <TD width="47%" valign="top" nowrap  class="desc2"><table width="100%" border="0" cellpadding="0" cellspacing="1">
                        <tr>
                          <td width="15%" height="31"  bgcolor="#FFFFFF"  ><div align="center">มูลค่าสินค้า/บริการ</div></td>
                          <td width="19%"  bgcolor="#FFFFFF" ><div align="center"><u>บวก</u> ภาษีมูลค่าเพิ่ม(ถ้ามี) </div></td>
                          <td width="24%"  bgcolor="#FFFFFF" ><div align="center">รวม</div></td>
                          <td width="25%"  bgcolor="#FFFFFF" ><div align="center"><u>หัก</u> ภาษีหัก ณ ที่จ่าย </div></td>
                          <td width="17%"  bgcolor="#FFFFFF" ><div align="center">จำนวนเงินสุทธิ</div></td>
                        </tr>
                        <tr>
                          <td height="31"  bgcolor="#FFFFFF"  ><div align="right"><%=md.getWFDataValue("__wf__totalrealmoney")%></div></td>
                          <td  bgcolor="#FFFFFF" ><div align="right"></div></td>
                          <td  bgcolor="#FFFFFF" ><div align="right"></div></td>
                          <td  bgcolor="#FFFFFF" ><div align="right"></div></td>
                          <td  bgcolor="#FFFFFF" ><div align="right"></div></td>
                        </tr>
                        <tr>
                          <td height="31" colspan="5"  bgcolor="#FFFFFF" ><strong>ตัวอักษร </strong></td>
                        </tr>
                      </table></TD>
                    </TR>
                </TABLE></td>
              </tr>
            </table>
		    <table width="<%=width%>" border="0" cellpadding="1" cellspacing="0" bgcolor="#000000" align="center">
              <tr>
                <td><TABLE WIDTH="100%" height="20" BORDER="0" ALIGN="center" CELLPADDING="0" CELLSPACING="1" class="inframe">
                    <TR>
                      <TD width="47%" valign="top" nowrap bgcolor="#FFFFFF"  class="desc2"><table width="100%" border="0" cellpadding="0" cellspacing="0">
                          <tr>
                            <td width="31%" height="31"  ><table width="103%" border="0" cellpadding="0" cellspacing="0">
                              <tr>
                                <td height="31"  ><div align="center"></div></td>
                              </tr>
                              <tr>
                                <td height="31"  ><div align="center">____________________</div></td>
                              </tr>
                              <tr>
                                <td height="31"  ><div align="center">______/_______/______</div></td>
                              </tr>
                              <tr>
                                <td height="31"  ><div align="center">
                                  <h4>ผู้ขอเบิก</h4>
                                </div></td>
                              </tr>
                            </table></td>
                            <td width="36%"  ><table width="103%" border="0" cellpadding="0" cellspacing="0">
                              <tr>
                                <td height="31"  ><div align="center"></div></td>
                              </tr>
                              <tr>
                                <td height="31"  ><div align="center">____________________</div></td>
                              </tr>
                              <tr>
                                <td height="31"  ><div align="center">______/_______/______</div></td>
                              </tr>
                              <tr>
                                <td height="31"  ><div align="center">
                                  <h4>ผู้อนุมัติค่าใช้จ่าย</h4>
                                </div></td>
                              </tr>
                            </table></td>
                            <td width="33%"  ><table width="103%" border="0" cellpadding="0" cellspacing="0">
                              <tr>
                                <td height="31"  ><div align="center"></div></td>
                              </tr>
                              <tr>
                                <td height="31"  ><div align="center">____________________</div></td>
                              </tr>
                              <tr>
                                <td height="31"  ><div align="center">______/_______/______</div></td>
                              </tr>
                              <tr>
                                <td height="31"  ><div align="center">
                                  <h4>ผู้มีอำนาจสั่งการ<br>
                                  (กรณี สั่งซื้อเครื่องเขียนแบบพิมพ์ฯ)</h4>
                                </div></td>
                              </tr>
                            </table></td>
                          </tr>

                      </table></TD>
                    </TR>
                </TABLE></td>
              </tr>
            </table>
	        <table width="<%=width%>" border="0" cellpadding="1" cellspacing="0" bgcolor="#000000" align="center">
              <tr>
                <td><TABLE WIDTH="100%" height="20" BORDER="0" ALIGN="center" CELLPADDING="0" CELLSPACING="1" class="inframe">
                    <TR>
                      <TD width="47%" valign="top" nowrap bgcolor="#FFFFFF"  class="desc2"><table width="100%" border="0" cellpadding="0" cellspacing="0">
                          <tr>
                            <td width="31%" height="31"  ><table width="103%" border="0" cellpadding="0" cellspacing="0">
                                <tr>
                                  <td height="31"  ><div align="center"></div></td>
                                </tr>
                                <tr>
                                  <td height="31"  ><div align="center">____________________</div></td>
                                </tr>
                                <tr>
                                  <td height="31"  ><div align="center">______/_______/______</div></td>
                                </tr>
                                <tr>
                                  <td height="31"  ><div align="center">
                                    <h4>ผู้อนุมัติจ่าย</h4>
                                  </div></td>
                                </tr>
                            </table></td>
                            <td width="36%"  ><table width="103%" border="0" cellpadding="0" cellspacing="0">
                                <tr>
                                  <td height="31"  ><div align="center"></div></td>
                                </tr>
                                <tr>
                                  <td height="31"  ><div align="center">____________________</div></td>
                                </tr>
                                <tr>
                                  <td height="31"  ><div align="center">_______/_______/______</div></td>
                                </tr>
                                <tr>
                                  <td height="31"  ><div align="center">
                                    <h4>ผู้จ่ายเงิน</h4>
                                  </div></td>
                                </tr>
                            </table></td>
                            <td width="33%"  ><table width="103%" border="0" cellpadding="0" cellspacing="0">
                                <tr>
                                  <td height="31"  ><div align="center"></div></td>
                                </tr>
                                <tr>
                                  <td height="31"  ><div align="center">____________________</div></td>
                                </tr>
                                <tr>
                                  <td height="31"  ><div align="center">______/_______/______</div></td>
                                </tr>
                                <tr>
                                  <td height="31"  ><div align="center">
                                    <h4>ผู้รับเงิน</h4>
                                  </div></td>
                                </tr>
                            </table></td>
                          </tr>
                      </table></TD>
                    </TR>
                </TABLE></td>
              </tr>
            </table>
          <br>
		</FORM>
</BODY>
</HTML>
<%
}
%>