PR050.xml 5.16 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129
<?xml version="1.0" encoding="UTF-8"?>
<MAILMERGE>
	<INIT><!--  tag 㹡 init  㹨ѧй inquiry ѧӡ fecth -->
				double sumincValue = 0;
				double sumtaxValue = 0;
				double sumagValue = 0;
				double sumfValue = 0;
				double sumsocValue = 0;
				double sumepvfValue = 0;

				double sum1Value=0,sum2Value=0;

				String suminc="",sumtax="",sumag="",sumf="",sumsoc="",sumepvf="";
				
				String addr="",room="",floor="",moo="",soi="",village="",road="",district="",amphur="",province="",tel="",zipcode="";
				boolean separate_fireout = false;
				String t1="",t2="",t3="",t4="";
	</INIT>
	<VARIABLE>
		<INTERPRET><!-- 繡ûżŢ inquiry ӡ fecth  -->
				separate_fireout = variable.getBoolean("separate_fireout");

	/*						sumincValue = dbInq.getDouble("_suminc");
				sumtaxmValue = dbInq.getDouble("_sumtaxm");

				
	if(separate_fireout){
					sumagValue = dbInq.getDouble("_sum_abcdeg");
					sumfValue = dbInq.getDouble("_sum_f");
				}else{
					sumincValue += dbInq.getDouble("_sum_abcdeg");
					sumtaxmValue += dbInq.getDouble("_sum_f");
				}				
	*/			
				if(dbInq.getString("tax_method_act").equals("1")) t1="X";
				if(dbInq.getString("tax_method_act").equals("2")) t2="X";
				if(dbInq.getString("tax_method_act").equals("3")) t3="X";
				if(dbInq.getString("tax_method_act").equals("4")) t4="X";

				sumincValue = dbInq.getDouble("_inc");
				sumtaxValue = dbInq.getDouble("_inctax");
				sumagValue = dbInq.getDouble("_inc1");
				sumfValue = dbInq.getDouble("_inctax1");
				sumsocValue = dbInq.getDouble("_soc");
				sumepvfValue = dbInq.getDouble("_epvf");

				sum1Value = sumincValue + sumagValue;
				sum2Value = sumtaxValue  + sumfValue;

				nFormat.applyPattern("###,###.00");	
				nFormat.setMaximumIntegerDigits(309);
				
				suminc = nFormat.format(sumincValue);
				sumtax = nFormat.format(sumtaxValue);
				sumag= ((sumagValue>0)?nFormat.format(sumagValue):"");
				sumf= ((sumfValue>0)?nFormat.format(sumfValue):"");
				sumsoc= ((sumsocValue>0)?nFormat.format(sumsocValue):"");
				sumepvf= ((sumepvfValue>0)?nFormat.format(sumepvfValue):"");

				sum1 = nFormat.format(sum1Value);
				sum2 = nFormat.format(sum2Value);
				village = dbInq.getString("mbranch","tvillage");
				addr = dbInq.getString("mbranch","taddr");
				room = dbInq.getString("mbranch","troom_no");
				floor = dbInq.getString("mbranch","tfloor");				
				soi = dbInq.getString("mbranch","tsoi");
				moo = dbInq.getString("mbranch","tmoo");
				road = dbInq.getString("mbranch","troad");
				district = dbInq.getString("mbranch","tdistrict");
				amphur = dbInq.getString("mbranch","amphur");
				province = dbInq.getString("v3mprovince","long_tname");
				zipcode = dbInq.getString("mbranch","zipcode");
		</INTERPRET>

		<!--tdesc method="getString" >"tdesc"</tdesc>
		<formulacalsoc method="getString">""</formulacalsoc>
				<msoc method="getString">"_emp_soc_id"</msoc>
		<csoc method="getString">"_sec_soc_id"</csoc>
		<csoc_rate method="getString">"_sec_soc_rate"</csoc_rate>
		<branch_socid method="getString">"memployee$branch_socid"</branch_socid-->
		<!--soc_branchid method="getString">"memployee$soc_branchid"</soc_branchid-->


		<fname method="getString" >"fname"</fname>
		<lname method="getString" >"lname"</lname>		
		<idtax  method="getString" >"idtax"</idtax>
		<branch_taxid method="getString">"mbranch","taxid"</branch_taxid>		
		<prefix method="getString">"mprefix","tdesc"</prefix>		
		
		<no_of_branch method="getString">"mcompany","no_of_branch"</no_of_branch>
		<t1 method="data">t1</t1>
		<t2 method="data">t2</t2>
		<t3 method="data">t3</t3>
		<t4 method="data">t4</t4>
		<company method="getString">"mcompany","tname"</company>
		<suminc method="data">suminc</suminc>
		<sumtax method="data">sumtax</sumtax>
		<sumag method="data">sumag</sumag>
		<sumf method="data">sumf</sumf>
		<sum1 method="data">sum1</sum1>
		<sum2 method="data">sum2</sum2>
		<tsum2 method="data">thaiCurr.getString(sum2Value,"###.00")</tsum2>
		<sumsoc method="data">sumsoc</sumsoc>
		<sumepvf method="data">sumepvf</sumepvf>
		<village method="data" size='50' blank='_' align='left'>village</village>
		<addr method="data" size='50'>addr</addr>
		<room method="data" size='50'>room</room>
		<floor method="data" size='50'>floor</floor>
		<soi method="data" size='50'>soi</soi>
		<moo method="data" size='10'>moo</moo>
		<road method="data" size='50'>road</road>
		<district method="data" size='50'>district</district>
		<amphur method="data" size='50'>amphur</amphur>	
		<province method="data" size='25'>province</province>
		<zipcode method="data" size='30'>zipcode</zipcode>

		<addr1 method="getString">"mempl_addr","taddr"</addr1>
		<moo1 method="getString">"mempl_addr","tmoo"</moo1>
		<district1 method="getString">"mempl_addr","tdistrict"</district1>
		<amphur1 method="getString">"v1csczipcode","tamphur"</amphur1>
	<province1 method="getString">"mprovince","long_tname"</province1>
		<zipcode1 method="getString">"mempl_addr","zipcode"</zipcode1>

	<period_year method="getString">"_period_year"</period_year>
		<pvfid method="getString">"mempl_pvf","idmember"</pvfid>			
		<year method="getString">"_period_year"</year>
		<seq_no method="getString">"taxseqno"</seq_no>
	</VARIABLE>
</MAILMERGE>