|
|
@ -368,22 +368,22 @@ GROUP BY |
|
|
|
--where SMR ='本月合计' |
|
|
|
--order by MM |
|
|
|
|
|
|
|
if exists(select 1 from tempdb..sysobjects with(nolock) where name='tmpuf_63Code' and xtype='u') |
|
|
|
drop table tempdb..tmpuf_63Code |
|
|
|
select bbank,bcash,bCashItem,bcDefine1,bcDefine10,bcDefine11,bcDefine12,bcDefine13,bcDefine14,bcDefine15 |
|
|
|
,bcDefine16,bcDefine2,bcDefine3,bcDefine4,bcDefine5,bcDefine6,bcDefine7,bcDefine8,bcDefine9,bclose,bcus |
|
|
|
,bd_c,bdept,be,bend,bexchange,bGCJS,bitem,bparacc,bpardiff,bperson,bproperty,br,bReport,bsup,bused |
|
|
|
,cass_item,cbook_type,cbook_type_engl,cclass,cclass_engl,cclassany,cclassany_engl,ccode,ccode_engl |
|
|
|
,ccode_name,cexch_name,cgather,chelp,cmeasure,cother,cUserDefineType,dbegin,dend,dModifyDate |
|
|
|
,igrade,iotherused,itrans,iViewItem,iyear |
|
|
|
into tempdb..tmpuf_63Code from code with(nolock) where 1=1 and iyear={2} |
|
|
|
|
|
|
|
exec GL_Ledger @tblname=N'tmpuf_63',@KmCode=N'6801',@beginPeriod={3},@endPeriod={4},@bVouch=0,@bequal=0,@sum=0,@bMJ=0,@swhere=N'',@sAuth=N'',@ReportID=N'GL13',@ReportType=0,@iUnite=0 |
|
|
|
--if exists(select 1 from tempdb..sysobjects with(nolock) where name='tmpuf_63Code' and xtype='u') |
|
|
|
--drop table tempdb..tmpuf_63Code |
|
|
|
--select bbank,bcash,bCashItem,bcDefine1,bcDefine10,bcDefine11,bcDefine12,bcDefine13,bcDefine14,bcDefine15 |
|
|
|
--,bcDefine16,bcDefine2,bcDefine3,bcDefine4,bcDefine5,bcDefine6,bcDefine7,bcDefine8,bcDefine9,bclose,bcus |
|
|
|
--,bd_c,bdept,be,bend,bexchange,bGCJS,bitem,bparacc,bpardiff,bperson,bproperty,br,bReport,bsup,bused |
|
|
|
--,cass_item,cbook_type,cbook_type_engl,cclass,cclass_engl,cclassany,cclassany_engl,ccode,ccode_engl |
|
|
|
--,ccode_name,cexch_name,cgather,chelp,cmeasure,cother,cUserDefineType,dbegin,dend,dModifyDate |
|
|
|
--,igrade,iotherused,itrans,iViewItem,iyear |
|
|
|
--into tempdb..tmpuf_63Code from code with(nolock) where 1=1 and iyear={2} |
|
|
|
|
|
|
|
-- exec GL_Ledger @tblname=N'tmpuf_63',@KmCode=N'6801',@beginPeriod={3},@endPeriod={4},@bVouch=0,@bequal=0,@sum=0,@bMJ=0,@swhere=N'',@sAuth=N'',@ReportID=N'GL13',@ReportType=0,@iUnite=0 |
|
|
|
|
|
|
|
select A.SPTDOC as SPTDOC_NO,YYYY as Created_Year,MM as Created_Month,YYYY,MM,SMR,DBTO_AMT DBTO,c.tmpme as INCOME_TAX |
|
|
|
select A.SPTDOC as SPTDOC_NO,YYYY as Created_Year,MM as Created_Month,YYYY,MM,SMR,DBTO_AMT DBTO -- + ISNULL(c.tmpme,0) |
|
|
|
from #test5 a |
|
|
|
left join #test9 b on a.SPTDOC=b.SPTDOC and a.MM=b.imonth and a.DD=b.iday |
|
|
|
left join tempdb..tmpuf_63 c on a.YYYY = c.iyear and a.MM = c.imonth and c.cdcode = '应交税费(2221)' |
|
|
|
--left join tempdb..tmpuf_63 c on a.YYYY = c.iyear and a.MM = c.imonth and c.cdcode = '应交税费(2221)' |
|
|
|
where SMR ='本月合计' |
|
|
|
order by MM |
|
|
|
|
|
|
@ -606,22 +606,22 @@ GROUP BY |
|
|
|
--where SMR ='本月合计' |
|
|
|
--order by MM |
|
|
|
|
|
|
|
if exists(select 1 from tempdb..sysobjects with(nolock) where name='tmpuf_63Code' and xtype='u') |
|
|
|
drop table tempdb..tmpuf_63Code |
|
|
|
select bbank,bcash,bCashItem,bcDefine1,bcDefine10,bcDefine11,bcDefine12,bcDefine13,bcDefine14,bcDefine15 |
|
|
|
,bcDefine16,bcDefine2,bcDefine3,bcDefine4,bcDefine5,bcDefine6,bcDefine7,bcDefine8,bcDefine9,bclose,bcus |
|
|
|
,bd_c,bdept,be,bend,bexchange,bGCJS,bitem,bparacc,bpardiff,bperson,bproperty,br,bReport,bsup,bused |
|
|
|
,cass_item,cbook_type,cbook_type_engl,cclass,cclass_engl,cclassany,cclassany_engl,ccode,ccode_engl |
|
|
|
,ccode_name,cexch_name,cgather,chelp,cmeasure,cother,cUserDefineType,dbegin,dend,dModifyDate |
|
|
|
,igrade,iotherused,itrans,iViewItem,iyear |
|
|
|
into tempdb..tmpuf_63Code from code with(nolock) where 1=1 and iyear={2} |
|
|
|
|
|
|
|
exec GL_Ledger @tblname=N'tmpuf_63',@KmCode=N'5801',@beginPeriod={3},@endPeriod={4},@bVouch=0,@bequal=0,@sum=0,@bMJ=0,@swhere=N'',@sAuth=N'',@ReportID=N'GL13',@ReportType=0,@iUnite=0 |
|
|
|
--if exists(select 1 from tempdb..sysobjects with(nolock) where name='tmpuf_63Code' and xtype='u') |
|
|
|
--drop table tempdb..tmpuf_63Code |
|
|
|
--select bbank,bcash,bCashItem,bcDefine1,bcDefine10,bcDefine11,bcDefine12,bcDefine13,bcDefine14,bcDefine15 |
|
|
|
--,bcDefine16,bcDefine2,bcDefine3,bcDefine4,bcDefine5,bcDefine6,bcDefine7,bcDefine8,bcDefine9,bclose,bcus |
|
|
|
--,bd_c,bdept,be,bend,bexchange,bGCJS,bitem,bparacc,bpardiff,bperson,bproperty,br,bReport,bsup,bused |
|
|
|
--,cass_item,cbook_type,cbook_type_engl,cclass,cclass_engl,cclassany,cclassany_engl,ccode,ccode_engl |
|
|
|
--,ccode_name,cexch_name,cgather,chelp,cmeasure,cother,cUserDefineType,dbegin,dend,dModifyDate |
|
|
|
--,igrade,iotherused,itrans,iViewItem,iyear |
|
|
|
--into tempdb..tmpuf_63Code from code with(nolock) where 1=1 and iyear={2} |
|
|
|
|
|
|
|
-- exec GL_Ledger @tblname=N'tmpuf_63',@KmCode=N'5801',@beginPeriod={3},@endPeriod={4},@bVouch=0,@bequal=0,@sum=0,@bMJ=0,@swhere=N'',@sAuth=N'',@ReportID=N'GL13',@ReportType=0,@iUnite=0 |
|
|
|
|
|
|
|
select A.SPTDOC as SPTDOC_NO,YYYY as Created_Year,MM as Created_Month,YYYY,MM,SMR,DBTO_AMT DBTO,c.tmpme as INCOME_TAX |
|
|
|
select A.SPTDOC as SPTDOC_NO,YYYY as Created_Year,MM as Created_Month,YYYY,MM,SMR,DBTO_AMT DBTO -- + ISNULL(c.tmpme,0) |
|
|
|
from #test5 a |
|
|
|
left join #test9 b on a.SPTDOC=b.SPTDOC and a.MM=b.imonth and a.DD=b.iday |
|
|
|
left join tempdb..tmpuf_63 c on a.YYYY = c.iyear and a.MM = c.imonth and c.cdcode = '应交税费(2221)' |
|
|
|
--left join tempdb..tmpuf_63 c on a.YYYY = c.iyear and a.MM = c.imonth and c.cdcode = '应交税费(2221)' |
|
|
|
where SMR ='本月合计' |
|
|
|
order by MM |
|
|
|
|
|
|
@ -656,7 +656,7 @@ rollback transaction |
|
|
|
//soapRequestData.Append(itemRow["SPTDOC_NO"] != null ? "<SPTDOC_NO>" + itemRow["SPTDOC_NO"].ToString() + "</SPTDOC_NO>" : "<SPTDOC_NO>" + "</SPTDOC_NO>");
|
|
|
|
soapRequestData.Append(itemRow["SMR"] != null ? "<SMR>" + 100 + "</SMR>" : "<SMR>" + "</SMR>"); |
|
|
|
soapRequestData.Append(itemRow["DBTO"] != null ? "<DBTO>" + itemRow["DBTO"].ToString() + "</DBTO>" : "<DBTO>" + "</DBTO>"); |
|
|
|
soapRequestData.Append(itemRow["INCOME_TAX"] != null ? "<INCOME_TAX>" + itemRow["INCOME_TAX"].ToString() + "</INCOME_TAX>" : "<INCOME_TAX>" + "</INCOME_TAX>"); |
|
|
|
//soapRequestData.Append(itemRow["INCOME_TAX"] != null ? "<INCOME_TAX>" + itemRow["INCOME_TAX"].ToString() + "</INCOME_TAX>" : "<INCOME_TAX>" + "</INCOME_TAX>");
|
|
|
|
//soapRequestData.Append(itemRow["CRDTO"] != null ? "<CRDTO>" + itemRow["CRDTO"].ToString() + "</CRDTO>" : "<CRDTO>" + "</CRDTO>");
|
|
|
|
//soapRequestData.Append(itemRow["DBTO_CRDTO_DVSN"] != null ? "<DBTO_CRDTO_DVSN>" + itemRow["DBTO_CRDTO_DVSN"].ToString() + "</DBTO_CRDTO_DVSN>" : "<DBTO_CRDTO_DVSN>" + "</DBTO_CRDTO_DVSN>");
|
|
|
|
//soapRequestData.Append(itemRow["BLNC"] != null ? "<BLNC>" + itemRow["BLNC"].ToString() + "</BLNC>" : "<BLNC>" + "</BLNC>");
|
|
|
@ -729,10 +729,10 @@ rollback transaction |
|
|
|
if (!exists) |
|
|
|
{ |
|
|
|
soapRequestData.Append("<MGMT_CST>"); |
|
|
|
soapRequestData.Append(item["YYYY"] != null ? "<YYYY>" + item["YYYY"].ToString() + "</YYYY>" : "<YYYY>" + "</YYYY>"); |
|
|
|
soapRequestData.Append(item["MM"] != null ? "<MM>" + item["MM"].ToString() + "</MM>" : "<MM>" + "</MM>"); |
|
|
|
soapRequestData.Append(item["DD"] != null ? "<DD>" + item["DD"].ToString() + "</DD>" : "<DD>" + "</DD>"); |
|
|
|
soapRequestData.Append(item["SPTDOC_NO"] != null ? "<SPTDOC_NO>" + item["SPTDOC_NO"].ToString() + "</SPTDOC_NO>" : "<SPTDOC_NO>" + "</SPTDOC_NO>"); |
|
|
|
soapRequestData.Append(item["YYYY"] != null ? "<Created_Year>" + item["YYYY"].ToString() + "</Created_Year>" : "<Created_Year>" + "</Created_Year>"); |
|
|
|
soapRequestData.Append(item["MM"] != null ? "<Created_Month>" + item["MM"].ToString() + "</Created_Month>" : "<Created_Month>" + "</Created_Month>"); |
|
|
|
//soapRequestData.Append(item["SPTDOC_NO"] != null ? "<SPTDOC_NO>" + item["SPTDOC_NO"].ToString() + "</SPTDOC_NO>" : "<SPTDOC_NO>" + "</SPTDOC_NO>");
|
|
|
|
soapRequestData.Append("<SMR>" + 100 + "</SMR>"); |
|
|
|
soapRequestData.Append(item["SMPL_CST"] != null ? "<SMPL_CST>" + item["SMPL_CST"].ToString() + "</SMPL_CST>" : "<SMPL_CST>" + "</SMPL_CST>"); |
|
|
|
soapRequestData.Append("</MGMT_CST>"); |
|
|
|
} |
|
|
@ -740,10 +740,10 @@ rollback transaction |
|
|
|
else |
|
|
|
{ |
|
|
|
soapRequestData.Append("<MGMT_CST>"); |
|
|
|
soapRequestData.Append(item["YYYY"] != null ? "<YYYY>" + item["YYYY"].ToString() + "</YYYY>" : "<YYYY>" + "</YYYY>"); |
|
|
|
soapRequestData.Append(item["MM"] != null ? "<MM>" + item["MM"].ToString() + "</MM>" : "<MM>" + "</MM>"); |
|
|
|
soapRequestData.Append(item["DD"] != null ? "<DD>" + item["DD"].ToString() + "</DD>" : "<DD>" + "</DD>"); |
|
|
|
soapRequestData.Append(item["SPTDOC_NO"] != null ? "<SPTDOC_NO>" + item["SPTDOC_NO"].ToString() + "</SPTDOC_NO>" : "<SPTDOC_NO>" + "</SPTDOC_NO>"); |
|
|
|
soapRequestData.Append(item["YYYY"] != null ? "<Created_Year>" + item["YYYY"].ToString() + "</Created_Year>" : "<Created_Year>" + "</Created_Year>"); |
|
|
|
soapRequestData.Append(item["MM"] != null ? "<Created_Month>" + item["MM"].ToString() + "</Created_Month>" : "<Created_Month>" + "</Created_Month>"); |
|
|
|
soapRequestData.Append("<SMR>" + 100 + "</SMR>"); |
|
|
|
//soapRequestData.Append(item["SPTDOC_NO"] != null ? "<SPTDOC_NO>" + item["SPTDOC_NO"].ToString() + "</SPTDOC_NO>" : "<SPTDOC_NO>" + "</SPTDOC_NO>");
|
|
|
|
soapRequestData.Append(item["SMPL_CST"] != null ? "<SMPL_CST>" + item["SMPL_CST"].ToString() + "</SMPL_CST>" : "<SMPL_CST>" + "</SMPL_CST>"); |
|
|
|
soapRequestData.Append("</MGMT_CST>"); |
|
|
|
} |
|
|
@ -766,7 +766,7 @@ rollback transaction |
|
|
|
//soapRequestData.Append(itemRow["SPTDOC_NO"] != null ? "<SPTDOC_NO>" + itemRow["SPTDOC_NO"].ToString() + "</SPTDOC_NO>" : "<SPTDOC_NO>" + "</SPTDOC_NO>");
|
|
|
|
soapRequestData.Append(itemRow["SMR"] != null ? "<SMR>" + 200 + "</SMR>" : "<SMR>" + "</SMR>"); |
|
|
|
soapRequestData.Append(itemRow["DBTO"] != null ? "<DBTO>" + itemRow["DBTO"].ToString() + "</DBTO>" : "<DBTO>" + "</DBTO>"); |
|
|
|
soapRequestData.Append(itemRow["INCOME_TAX"] != null ? "<INCOME_TAX>" + itemRow["INCOME_TAX"].ToString() + "</INCOME_TAX>" : "<INCOME_TAX>" + "</INCOME_TAX>"); |
|
|
|
//soapRequestData.Append(itemRow["INCOME_TAX"] != null ? "<INCOME_TAX>" + itemRow["INCOME_TAX"].ToString() + "</INCOME_TAX>" : "<INCOME_TAX>" + "</INCOME_TAX>");
|
|
|
|
//soapRequestData.Append(itemRow["CRDTO"] != null ? "<CRDTO>" + itemRow["CRDTO"].ToString() + "</CRDTO>" : "<CRDTO>" + "</CRDTO>");
|
|
|
|
//soapRequestData.Append(itemRow["DBTO_CRDTO_DVSN"] != null ? "<DBTO_CRDTO_DVSN>" + itemRow["DBTO_CRDTO_DVSN"].ToString() + "</DBTO_CRDTO_DVSN>" : "<DBTO_CRDTO_DVSN>" + "</DBTO_CRDTO_DVSN>");
|
|
|
|
//soapRequestData.Append(itemRow["BLNC"] != null ? "<BLNC>" + itemRow["BLNC"].ToString() + "</BLNC>" : "<BLNC>" + "</BLNC>");
|
|
|
@ -839,10 +839,10 @@ rollback transaction |
|
|
|
if (!exists) |
|
|
|
{ |
|
|
|
soapRequestData.Append("<MGMT_CST>"); |
|
|
|
soapRequestData.Append(item["YYYY"] != null ? "<YYYY>" + item["YYYY"].ToString() + "</YYYY>" : "<YYYY>" + "</YYYY>"); |
|
|
|
soapRequestData.Append(item["MM"] != null ? "<MM>" + item["MM"].ToString() + "</MM>" : "<MM>" + "</MM>"); |
|
|
|
soapRequestData.Append(item["DD"] != null ? "<DD>" + item["DD"].ToString() + "</DD>" : "<DD>" + "</DD>"); |
|
|
|
soapRequestData.Append(item["SPTDOC_NO"] != null ? "<SPTDOC_NO>" + item["SPTDOC_NO"].ToString() + "</SPTDOC_NO>" : "<SPTDOC_NO>" + "</SPTDOC_NO>"); |
|
|
|
soapRequestData.Append(item["YYYY"] != null ? "<Created_Year>" + item["YYYY"].ToString() + "</Created_Year>" : "<Created_Year>" + "</Created_Year>"); |
|
|
|
soapRequestData.Append(item["MM"] != null ? "<Created_Month>" + item["MM"].ToString() + "</Created_Month>" : "<Created_Month>" + "</Created_Month>"); |
|
|
|
soapRequestData.Append("<SMR>" + 200 + "</SMR>"); |
|
|
|
//soapRequestData.Append(item["SPTDOC_NO"] != null ? "<SPTDOC_NO>" + item["SPTDOC_NO"].ToString() + "</SPTDOC_NO>" : "<SPTDOC_NO>" + "</SPTDOC_NO>");
|
|
|
|
soapRequestData.Append(item["SMPL_CST"] != null ? "<SMPL_CST>" + item["SMPL_CST"].ToString() + "</SMPL_CST>" : "<SMPL_CST>" + "</SMPL_CST>"); |
|
|
|
soapRequestData.Append("</MGMT_CST>"); |
|
|
|
} |
|
|
@ -850,10 +850,10 @@ rollback transaction |
|
|
|
else |
|
|
|
{ |
|
|
|
soapRequestData.Append("<MGMT_CST>"); |
|
|
|
soapRequestData.Append(item["YYYY"] != null ? "<YYYY>" + item["YYYY"].ToString() + "</YYYY>" : "<YYYY>" + "</YYYY>"); |
|
|
|
soapRequestData.Append(item["MM"] != null ? "<MM>" + item["MM"].ToString() + "</MM>" : "<MM>" + "</MM>"); |
|
|
|
soapRequestData.Append(item["DD"] != null ? "<DD>" + item["DD"].ToString() + "</DD>" : "<DD>" + "</DD>"); |
|
|
|
soapRequestData.Append(item["SPTDOC_NO"] != null ? "<SPTDOC_NO>" + item["SPTDOC_NO"].ToString() + "</SPTDOC_NO>" : "<SPTDOC_NO>" + "</SPTDOC_NO>"); |
|
|
|
soapRequestData.Append(item["YYYY"] != null ? "<Created_Year>" + item["YYYY"].ToString() + "</Created_Year>" : "<Created_Year>" + "</Created_Year>"); |
|
|
|
soapRequestData.Append(item["MM"] != null ? "<Created_Month>" + item["MM"].ToString() + "</Created_Month>" : "<Created_Month>" + "</Created_Month>"); |
|
|
|
soapRequestData.Append("<SMR>" + 200 + "</SMR>"); |
|
|
|
//soapRequestData.Append(item["SPTDOC_NO"] != null ? "<SPTDOC_NO>" + item["SPTDOC_NO"].ToString() + "</SPTDOC_NO>" : "<SPTDOC_NO>" + "</SPTDOC_NO>");
|
|
|
|
soapRequestData.Append(item["SMPL_CST"] != null ? "<SMPL_CST>" + item["SMPL_CST"].ToString() + "</SMPL_CST>" : "<SMPL_CST>" + "</SMPL_CST>"); |
|
|
|
soapRequestData.Append("</MGMT_CST>"); |
|
|
|
} |
|
|
|