 <!--
 *this file is part of nseer erp
 *Copyright(C)2006-2010 Nseer(Beijing) Technology co.LTD/http://www.nseer.com 
 *
 *This program is free software; you can redistribute it and/or
 *modify it under the terms of the GNU General Public License
 *as published by the Free Software Foundation; either
 *version 2 of the License, or(at your option) any later version.
 -->
<%@page contentType="text/html; charset=UTF-8" language="java" import="include.excel_export.Solid" import="java.sql.*,include.nseer_cookie.*" import="java.util.*" import="java.io.*" import="include.nseer_db.*,java.text.*"%>
<jsp:useBean id="query" scope="page" class="include.query.query_three"/>
<%@taglib uri="/WEB-INF/mytag.tld" prefix="page"%>
<jsp:useBean id="validata" scope="page" class="validata.ValidataNumber"/>
<%@include file="../include/head.jsp"%>
<jsp:useBean id="demo" class="include.tree_index.businessComment" scope="page"/>
<%
DealWithString DealWithString=new DealWithString(application);
String mod=request.getRequestURI();
demo.setPath(request);
String handbook=demo.businessComment(mod,"您正在做的业务是：","document_main","reason","value");
nseer_db finance_db=new nseer_db((String)session.getAttribute("unit_db_name"));
%>
<script language="javascript" src="../../javascript/winopen/winopen.js"></script>
<script language="javascript" src="../../javascript/winopen/winopenm.js"></script>
<script type="text/javascript">
function openDialog1(){var sHTML=document.getElementById("open1").innerHTML;
new NeatDialog(sHTML, "恩信科技", false);
}
</script>
<div id=open1 style="display:none"><p></p><p></p><p></p><p></p><p></p><p></p><p></p><p></p><p></p><p><A HREF="query_report_one_down_excel.jsp"><font color=#6600FF><img src="../../images/down.jpg" width=20 height=20 style="border: 0;"><%=demo.getLang("erp","点击下载")%></font></A></p><p></p><p></p><p></p><p></p><p></p><p></p><p></p><p></p><p></p><p><input type="button" <%=BUTTON_STYLE1%> class="BUTTON_STYLE1" value="关闭" onclick="window.neatDialog.close()"></p></div>
<script>
function transfer_data(url){
var all_column='';
var data_span=document.getElementById('theObjTable');
var table_tr=data_span.getElementsByTagName('tr');
for(var i=1;i<table_tr.length;i++){
all_column=all_column+"■";
for(var j=0;j<table_tr[i].getElementsByTagName('td').length;j++){
if(table_tr[i].getElementsByTagName('td')[j].innerHTML=='&nbsp;'){
all_column=all_column+'⊙'+"<$$>";
}else{
all_column=all_column+table_tr[i].getElementsByTagName('td')[j].innerHTML+"<$$>";
}}
all_column=all_column.substring(0,all_column.length-4);
}
all_column=all_column.substring(1,all_column.length);
all_column=all_column.replace(/&nbsp;/g,"");
all_column=all_column.replace(/<br>/g,"");
all_column=all_column.replace(/<BR>/g,"");
var company=document.getElementById('company').innerHTML;
var time=document.getElementById('time').innerHTML;
var money=document.getElementById('money').innerHTML;
var xmlhttp3;
if(window.XMLHttpRequest){xmlhttp3=new XMLHttpRequest();}else if(window.ActiveXObject){
xmlhttp3=new ActiveXObject("Microsoft.XMLHTTP");}if(xmlhttp3){xmlhttp3.onreadystatechange=function(){
if(xmlhttp3.readyState==4){try{if(xmlhttp3.status==200){
openDialog1();
}else{
alert( xmlhttp3.status + '=' + xmlhttp3.statusText);}} catch(exception){alert(exception);}}};
xmlhttp3.open("POST", url, true);
xmlhttp3.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");xmlhttp3.send('company='+company+'&&time='+time+'&&money='+money+'&&all_column='+all_column);
}else{
alert('Can not create XMLHttpRequest object, please check your web browser.');
}}
</script>
<%
String tableselect=exchange.unURL(request.getParameter("tableselect"));
String year=request.getParameter("year");
String month=request.getParameter("month");
String sql="select * from finance_report_02 where month='"+month+"' and year='"+year+"'";
ResultSet rs=finance_db.executeQuery(sql);
if(rs.next()){
%>
<table <%=TABLE_STYLE6%> class="TABLE_STYLE6">
<tr <%=TR_STYLE1%> class="TR_STYLE1">
<td <%=TD_HANDBOOK_STYLE1%> class="TD_HANDBOOK_STYLE1"><div class="div_handbook"><%=handbook%></div></td>
</tr>
<tr <%=TR_STYLE1%> class="TR_STYLE1">
<td <%=TD_STYLE3%> class="TD_STYLE3"><div <%=DIV_STYLE1%> class="DIV_STYLE1"><input type="button" <%=BUTTON_STYLE1%> class="BUTTON_STYLE1" id="show-dialog-btn" onfocus="close_div()" value="<%=demo.getLang("erp","PDF打印")%>">&nbsp;<input type="submit" <%=SUBMIT_STYLE1%> class="SUBMIT_STYLE1" value="<%=demo.getLang("erp","打印")%>" onClick="javascript:winopen('query_report_two_print.jsp?ID=<%=rs.getString("ID")%>')">&nbsp;<input type="button" <%=BUTTON_STYLE1%> class="BUTTON_STYLE1" value="<%=demo.getLang("erp","返回")%>" onClick=location="query_locate.jsp"></td>
</tr>
</table>
<%@include file="../include/paper_top.html"%>
<table <%=TABLE_STYLE4%> class="TABLE_STYLE4">
<tr <%=TR_STYLE1%> class="TR_STYLE1">
<td <%=TD_STYLE5%> class="TD_STYLE5">&nbsp;</td>
</tr>
</table>
<table <%=TABLE_STYLE4%> class="TABLE_STYLE4">
<tr <%=TR_STYLE1%> class="TR_STYLE1">
<td align="center"><font size="4"><b><%=demo.getLang("erp","损益表")%></b></font></td>
</tr>
</table>
<table <%=TABLE_STYLE4%> class="TABLE_STYLE4">
<tr <%=TR_STYLE1%> class="TR_STYLE1">
<td <%=TD_STYLE2%> class="TD_STYLE2"><span id="company"><%=demo.getLang("erp","编制单位")%>：<%=exchange.toHtml(rs.getString("report_unit"))%></span></td>
<td <%=TD_STYLE2%> class="TD_STYLE2"><span id="time"><%=demo.getLang("erp","时间")%>：<%=rs.getString("year")%><%=demo.getLang("erp","年")%> <%=rs.getString("month")%><%=demo.getLang("erp","月")%></span></td>
<td <%=TD_STYLE2%> class="TD_STYLE2"><span id="money"><%=demo.getLang("erp","单位")%>：<%=demo.getLang("erp","元")%></span></td> 
</tr>
</table>
<table <%=TABLE_STYLE11%> class="TABLE_STYLE11" id=theObjTable>
<tr <%=TR_STYLE2%> class="TR_STYLE2">
<td <%=TD_STYLE2%> class="TD_STYLE2"><font class="resizeDivClass" onmousedown="MouseDownToResize(this);" onmousemove="MouseMoveToResize(this);" onmouseup="MouseUpToResize(this);"></font><%=demo.getLang("erp","项目")%></td>
<td <%=TD_STYLE2%> class="TD_STYLE2"><font class="resizeDivClass" onmousedown="MouseDownToResize(this);" onmousemove="MouseMoveToResize(this);" onmouseup="MouseUpToResize(this);"></font><%=demo.getLang("erp","行次")%></td>
<td <%=TD_STYLE2%> class="TD_STYLE2"><font class="resizeDivClass" onmousedown="MouseDownToResize(this);" onmousemove="MouseMoveToResize(this);" onmouseup="MouseUpToResize(this);"></font><%=demo.getLang("erp","本月数")%></td>
<td <%=TD_STYLE2%> class="TD_STYLE2"><font class="resizeDivClass" onmousedown="MouseDownToResize(this);" onmousemove="MouseMoveToResize(this);" onmouseup="MouseUpToResize(this);"></font><%=demo.getLang("erp","本年累计数")%></td>
</tr>
<tr <%=TR_STYLE1%> class="TR_STYLE1">
<td <%=TD_STYLE2%> class="TD_STYLE2"><%=demo.getLang("erp","一、主营业务收入")%></td>
<td <%=TD_STYLE2%> class="TD_STYLE2">1</td>
<td <%=TD_STYLE2%> class="TD_STYLE2"><%=demo.aformat(rs.getDouble("item_month1"))%></td>
<td <%=TD_STYLE2%> class="TD_STYLE2"><%=demo.aformat(rs.getDouble("item_year1"))%></td>
</tr>
<tr <%=TR_STYLE1%> class="TR_STYLE1">
<td <%=TD_STYLE2%> class="TD_STYLE2"><%=demo.getLang("erp","减：主营业务成本")%></td>
<td <%=TD_STYLE2%> class="TD_STYLE2">4</td>
<td <%=TD_STYLE2%> class="TD_STYLE2"><%=demo.aformat(rs.getDouble("item_month4"))%></td>
<td <%=TD_STYLE2%> class="TD_STYLE2"><%=demo.aformat(rs.getDouble("item_year4"))%></td>
</tr>
<tr <%=TR_STYLE1%> class="TR_STYLE1">
<td <%=TD_STYLE2%> class="TD_STYLE2">&nbsp;&nbsp;&nbsp;&nbsp;<%=demo.getLang("erp","主营业务税金及附加")%></td>
<td <%=TD_STYLE2%> class="TD_STYLE2">5</td>
<td <%=TD_STYLE2%> class="TD_STYLE2"><%=demo.aformat(rs.getDouble("item_month5"))%></td>
<td <%=TD_STYLE2%> class="TD_STYLE2"><%=demo.aformat(rs.getDouble("item_year5"))%></td>
</tr>
<tr <%=TR_STYLE1%> class="TR_STYLE1">
<td <%=TD_STYLE2%> class="TD_STYLE2"><%=demo.getLang("erp","二、主营业务利润(亏损以“-”号填列)")%></td>
<td <%=TD_STYLE2%> class="TD_STYLE2">10</td>
<td <%=TD_STYLE2%> class="TD_STYLE2"><%=demo.aformat(rs.getDouble("item_month10"))%></td>
<td <%=TD_STYLE2%> class="TD_STYLE2"><%=demo.aformat(rs.getDouble("item_year10"))%></td>
</tr>
<tr <%=TR_STYLE1%> class="TR_STYLE1">
<td <%=TD_STYLE2%> class="TD_STYLE2"><%=demo.getLang("erp","加：其他业务利润(亏损以“-”号填列)")%></td>
<td <%=TD_STYLE2%> class="TD_STYLE2">11</td>
<td <%=TD_STYLE2%> class="TD_STYLE2"><%=demo.aformat(rs.getDouble("item_month11"))%></td>
<td <%=TD_STYLE2%> class="TD_STYLE2"><%=demo.aformat(rs.getDouble("item_year11"))%></td>
</tr>
<tr <%=TR_STYLE1%> class="TR_STYLE1">
<td <%=TD_STYLE2%> class="TD_STYLE2"><%=demo.getLang("erp","减：营业费用")%></td>
<td <%=TD_STYLE2%> class="TD_STYLE2">14</td>
<td <%=TD_STYLE2%> class="TD_STYLE2"><%=demo.aformat(rs.getDouble("item_month14"))%></td>
<td <%=TD_STYLE2%> class="TD_STYLE2"><%=demo.aformat(rs.getDouble("item_year14"))%></td>
</tr>
<tr <%=TR_STYLE1%> class="TR_STYLE1">
<td <%=TD_STYLE2%> class="TD_STYLE2">&nbsp;&nbsp;&nbsp;&nbsp;<%=demo.getLang("erp","管理费用")%></td>
<td <%=TD_STYLE2%> class="TD_STYLE2">15</td>
<td <%=TD_STYLE2%> class="TD_STYLE2"><%=demo.aformat(rs.getDouble("item_month15"))%></td>
<td <%=TD_STYLE2%> class="TD_STYLE2"><%=demo.aformat(rs.getDouble("item_year15"))%></td>
</tr>
<tr <%=TR_STYLE1%> class="TR_STYLE1">
<td <%=TD_STYLE2%> class="TD_STYLE2">&nbsp;&nbsp;&nbsp;&nbsp;<%=demo.getLang("erp","财务费用")%></td>
<td <%=TD_STYLE2%> class="TD_STYLE2">16</td>
<td <%=TD_STYLE2%> class="TD_STYLE2"><%=demo.aformat(rs.getDouble("item_month16"))%></td>
<td <%=TD_STYLE2%> class="TD_STYLE2"><%=demo.aformat(rs.getDouble("item_year16"))%></td>
</tr>
<tr <%=TR_STYLE1%> class="TR_STYLE1">
<td <%=TD_STYLE2%> class="TD_STYLE2"><%=demo.getLang("erp","三、营业利润(亏损以“-”号填列)")%></td>
<td <%=TD_STYLE2%> class="TD_STYLE2">18</td>
<td <%=TD_STYLE2%> class="TD_STYLE2"><%=demo.aformat(rs.getDouble("item_month18"))%></td>
<td <%=TD_STYLE2%> class="TD_STYLE2"><%=demo.aformat(rs.getDouble("item_year18"))%></td>
</tr>
<tr <%=TR_STYLE1%> class="TR_STYLE1">
<td <%=TD_STYLE2%> class="TD_STYLE2"><%=demo.getLang("erp","加：投资收益(损失以“-”号填列)")%></td>
<td <%=TD_STYLE2%> class="TD_STYLE2">19</td>
<td <%=TD_STYLE2%> class="TD_STYLE2"><%=demo.aformat(rs.getDouble("item_month19"))%></td>
<td <%=TD_STYLE2%> class="TD_STYLE2"><%=demo.aformat(rs.getDouble("item_year19"))%></td>
</tr>
<tr <%=TR_STYLE1%> class="TR_STYLE1">
<td <%=TD_STYLE2%> class="TD_STYLE2">&nbsp;&nbsp;&nbsp;&nbsp;<%=demo.getLang("erp","营业外收入")%></td>
<td <%=TD_STYLE2%> class="TD_STYLE2">23</td>
<td <%=TD_STYLE2%> class="TD_STYLE2"><%=demo.aformat(rs.getDouble("item_month23"))%></td>
<td <%=TD_STYLE2%> class="TD_STYLE2"><%=demo.aformat(rs.getDouble("item_year23"))%></td>
</tr>
<tr <%=TR_STYLE1%> class="TR_STYLE1">
<td <%=TD_STYLE2%> class="TD_STYLE2"><%=demo.getLang("erp","减：营业外支出")%></td>
<td <%=TD_STYLE2%> class="TD_STYLE2">25</td>
<td <%=TD_STYLE2%> class="TD_STYLE2"><%=demo.aformat(rs.getDouble("item_month25"))%></td>
<td <%=TD_STYLE2%> class="TD_STYLE2"><%=demo.aformat(rs.getDouble("item_year25"))%></td>
</tr>
<tr <%=TR_STYLE1%> class="TR_STYLE1">
<td <%=TD_STYLE2%> class="TD_STYLE2"><%=demo.getLang("erp","四、利润总额(亏损总额以“-”号填列)")%></td>
<td <%=TD_STYLE2%> class="TD_STYLE2">27</td>
<td <%=TD_STYLE2%> class="TD_STYLE2"><%=demo.aformat(rs.getDouble("item_month27"))%></td>
<td <%=TD_STYLE2%> class="TD_STYLE2"><%=demo.aformat(rs.getDouble("item_year27"))%></td>
</tr>
<tr <%=TR_STYLE1%> class="TR_STYLE1">
<td <%=TD_STYLE2%> class="TD_STYLE2"><%=demo.getLang("erp","减：所得税")%></td>
<td <%=TD_STYLE2%> class="TD_STYLE2">28</td>
<td <%=TD_STYLE2%> class="TD_STYLE2"><%=demo.aformat(rs.getDouble("item_month28"))%></td>
<td <%=TD_STYLE2%> class="TD_STYLE2"><%=demo.aformat(rs.getDouble("item_year28"))%></td>
</tr>
<tr <%=TR_STYLE1%> class="TR_STYLE1">
<td <%=TD_STYLE2%> class="TD_STYLE2"><%=demo.getLang("erp","五、净利润(净亏损以“-”号填列)")%></td>
<td <%=TD_STYLE2%> class="TD_STYLE2">30</td>
<td <%=TD_STYLE2%> class="TD_STYLE2"><%=demo.aformat(rs.getDouble("item_month30"))%></td>
<td <%=TD_STYLE2%> class="TD_STYLE2"><%=demo.aformat(rs.getDouble("item_year30"))%></td>
</tr>
</table>
<%@include file="../include/paper_bottom.html"%>
<%
finance_db.close();
}else{
%>
<div id="nseerGround" class="nseerGround">
<table <%=TABLE_STYLE2%> class="TABLE_STYLE2">
<tr <%=TR_STYLE1%> class="TR_STYLE1">
<td <%=TD_HANDBOOK_STYLE1%> class="TD_HANDBOOK_STYLE1"><div class="div_handbook"><%=handbook%></div></td>
</tr>
<tr <%=TR_STYLE1%> class="TR_STYLE1">
<td <%=TD_STYLE2%> class="TD_STYLE2"><%=demo.getLang("erp","该报表未生成，请返回！")%></td>
<td <%=TD_STYLE1%> class="TD_STYLE1"><input type="button" <%=BUTTON_STYLE1%> class="BUTTON_STYLE1" value="<%=demo.getLang("erp","返回")%>" onClick=location="query_locate.jsp"></td>
</tr>
</table>
</div>
<%}%>