<?xml version="1.0" encoding="UTF-8"?>
<MAILMERGE>
	<INIT><!-- �� tag �����㹡�� init ��� 㹨ѧ��й�� inquiry �ѧ���ӡ�� fecth ������-->
				double suminc = 0;
				double expense = 0;
				double decgift = 0;
				double tax = 0;
				double pvfh =0;
				double pvfl = 0;
				double gbk = 0;
				double decprivate = 0;				
				double decmarry = 0;
				double decchild = 0;
				double decchildstudy = 0;
				double decgrlive = 0;
				double rmf = 0;
				double decinterrest = 0;
				double soc = 0;
				double kor5 = 0;
				double sub1_2 = 0;
				double sub3_4 = 0;
				double sub5_6 = 0;
				double sub7_8 = 0;
				double sub10_11 = 0;
				double khor9 = 0;
				double sumtaxm=0;
				double sum10_11=0;
				
				String reportName="",ch1="",ch2="";
	</INIT>
	<VARIABLE>
		<INTERPRET>
			reportName = (String)param.get("REPORTNAME");

				nFormat.applyPattern("###,###.##");
				//nFormat.setMaximumIntegerDigits(309);
System.out.println( dbInq.getString("_suminc"));
			suminc = dbInq.getDouble("_suminc");
				sumtaxm = dbInq.getDouble("_sumtaxm");
				expense = dbInq.getDouble("_expense");
				tax = dbInq.getDouble("_tax");				
				pvfh =dbInq.getDouble("_ProvidentFundh");
				pvfl = dbInq.getDouble("_ProvidentFundl");				
				decgift = dbInq.getDouble("_decgift");
				decprivate = dbInq.getDouble("_decprivate");
				decmarry = dbInq.getDouble("_decmarry");
				decchild = dbInq.getDouble("_decchild");
				decchildstudy = dbInq.getDouble("_decchildstudy");
				decgrlive = dbInq.getDouble("_decgrlive");
				decinterrest = dbInq.getDouble("_decinterest");
				rmf = dbInq.getDouble("_RMF");
				gbk = dbInq.getDouble("_GBK");
				soc = dbInq.getDouble("_soc");
				kor5 = pvfh + gbk;
				sub1_2 = Math.abs(suminc - kor5);
				sub3_4 = Math.abs(sub1_2 - expense);
				khor9 = decprivate + decchild + decchildstudy + decgrlive + pvfl + rmf + decinterrest + soc;
				sub5_6 = Math.abs(sub3_4 - khor9);
				sub7_8 = Math.abs(sub5_6 - decgift);
				sum10_11 = tax - sumtaxm;

				if(Math.min(sum10_11,0) == sum10_11){
					ch1= "X";ch2="";
				}else{
					ch1= "";ch2="X";
				}
				sum10_11 = Math.abs(tax - sumtaxm);
			
		</INTERPRET><!-- �繡�û����żŢ������� inquiry �ӡ�� fecth ������������ -->
		<r1 method="data">reportName</r1>
		<company method="getString">"mcompany","tname"</company>
		<prefix method="getString">"mprefix","tdesc"</prefix>
		<fname method="getString" >"fname"</fname>
		<lname method="getString" >"lname"</lname>
		<idpeople method="getString">"id_people"</idpeople>
		<taxid  method="getString" >"_taxid"</taxid>
		<inc method="data">nFormat.format(suminc)</inc>
		<f1 method="data">nFormat.format(kor5)</f1>
		<f2 method="data">nFormat.format(khor9)</f2>
		<f3 method="data">nFormat.format(kor5)</f3>
		<f4 method="data">nFormat.format(khor9)</f4>
		<s1-2 method="data">nFormat.format(sub1_2)</s1-2>
		<exps method="data">nFormat.format(expense)</exps>
		<s3-4 method="data">nFormat.format(sub3_4)</s3-4>		
		<s5-6 method="data">nFormat.format(sub5_6)</s5-6>
		<gif method="data">nFormat.format(decgift)</gif>
		<s7-8 method="data">nFormat.format(sub7_8)</s7-8>
		<tax method="data">nFormat.format(tax)</tax>
		<staxm method="data">nFormat.format(sumtaxm)</staxm>
		<s10-11 method="data">nFormat.format(sum10_11)</s10-11>
		<pvfl method="data">nFormat.format(pvfl)</pvfl>
		<gbk method="data">nFormat.format(gbk)</gbk>		
		<priv method="data">nFormat.format(decprivate)</priv>
		<mary method="data">nFormat.format(decmarry)</mary>
		<chd method="data">nFormat.format(decchild)</chd>
		<child1 method="getString">""</child1>
		<child2 method="getString">""</child2>
		<chdst method="data">nFormat.format(decchildstudy)</chdst>
		<grlive method="data">nFormat.format(decgrlive)</grlive>
		<pvfh method="data">nFormat.format(pvfh)</pvfh>
		<rmf method="data">nFormat.format(rmf)</rmf>
		<instrs method="data">nFormat.format(decinterrest)</instrs>
		<soc method="data">nFormat.format(soc)</soc>

		<ch1 method="data">ch1</ch1>
		<ch2 method="data">ch2</ch2>
	</VARIABLE>
</MAILMERGE>