diff --git a/ICSSoft.FromERP/SK/YERP_004.cs b/ICSSoft.FromERP/SK/YERP_004.cs
index f33a88e..8b95358 100644
--- a/ICSSoft.FromERP/SK/YERP_004.cs
+++ b/ICSSoft.FromERP/SK/YERP_004.cs
@@ -161,7 +161,10 @@ GROUP BY
SPTDOC,imonth,iday
- select YYYY as Created_Year,MM as Created_Month,YYYY,MM,DD,A.SPTDOC,SMR,DBTO_AMT DBTO,CRDTO_AMT CRDTO,INVT,BLNC,WH_CST,TRNSF_CST,XBT_CST,NLD_CST,SMPL_CST,TRNSF_AGNC_CST,ADTV,NCLSN_CST,SVC_CST from #test5 a left join #test9 b on a.SPTDOC=b.SPTDOC and a.MM=b.imonth and a.DD=b.iday
+ select YYYY as Created_Year,MM as Created_Month,YYYY,MM,DD,A.SPTDOC,SMR,DBTO_AMT DBTO,CRDTO_AMT CRDTO,INVT,
+ BLNC,WH_CST,TRNSF_CST,XBT_CST,NLD_CST,SMPL_CST,TRNSF_AGNC_CST,ADTV,NCLSN_CST,SVC_CST
+ from #test5 a left join #test9 b on a.SPTDOC=b.SPTDOC and a.MM=b.imonth and a.DD=b.iday
+ where A.SPTDOC not in ('记-0253','记-0254')
rollback transaction
";
diff --git a/ICSSoft.FromERP/SK/YERP_006.cs b/ICSSoft.FromERP/SK/YERP_006.cs
index 8fd2e43..b2b4d7c 100644
--- a/ICSSoft.FromERP/SK/YERP_006.cs
+++ b/ICSSoft.FromERP/SK/YERP_006.cs
@@ -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 ? "" + itemRow["SPTDOC_NO"].ToString() + "" : "" + "");
soapRequestData.Append(itemRow["SMR"] != null ? "" + 100 + "" : "" + "");
soapRequestData.Append(itemRow["DBTO"] != null ? "" + itemRow["DBTO"].ToString() + "" : "" + "");
- soapRequestData.Append(itemRow["INCOME_TAX"] != null ? "" + itemRow["INCOME_TAX"].ToString() + "" : "" + "");
+ //soapRequestData.Append(itemRow["INCOME_TAX"] != null ? "" + itemRow["INCOME_TAX"].ToString() + "" : "" + "");
//soapRequestData.Append(itemRow["CRDTO"] != null ? "" + itemRow["CRDTO"].ToString() + "" : "" + "");
//soapRequestData.Append(itemRow["DBTO_CRDTO_DVSN"] != null ? "" + itemRow["DBTO_CRDTO_DVSN"].ToString() + "" : "" + "");
//soapRequestData.Append(itemRow["BLNC"] != null ? "" + itemRow["BLNC"].ToString() + "" : "" + "");
@@ -729,10 +729,10 @@ rollback transaction
if (!exists)
{
soapRequestData.Append("");
- soapRequestData.Append(item["YYYY"] != null ? "" + item["YYYY"].ToString() + "" : "" + "");
- soapRequestData.Append(item["MM"] != null ? "" + item["MM"].ToString() + "" : "" + "");
- soapRequestData.Append(item["DD"] != null ? "" + item["DD"].ToString() + "" : "" + "");
- soapRequestData.Append(item["SPTDOC_NO"] != null ? "" + item["SPTDOC_NO"].ToString() + "" : "" + "");
+ soapRequestData.Append(item["YYYY"] != null ? "" + item["YYYY"].ToString() + "" : "" + "");
+ soapRequestData.Append(item["MM"] != null ? "" + item["MM"].ToString() + "" : "" + "");
+ //soapRequestData.Append(item["SPTDOC_NO"] != null ? "" + item["SPTDOC_NO"].ToString() + "" : "" + "");
+ soapRequestData.Append("" + 100 + "");
soapRequestData.Append(item["SMPL_CST"] != null ? "" + item["SMPL_CST"].ToString() + "" : "" + "");
soapRequestData.Append("");
}
@@ -740,10 +740,10 @@ rollback transaction
else
{
soapRequestData.Append("");
- soapRequestData.Append(item["YYYY"] != null ? "" + item["YYYY"].ToString() + "" : "" + "");
- soapRequestData.Append(item["MM"] != null ? "" + item["MM"].ToString() + "" : "" + "");
- soapRequestData.Append(item["DD"] != null ? "" + item["DD"].ToString() + "" : "" + "");
- soapRequestData.Append(item["SPTDOC_NO"] != null ? "" + item["SPTDOC_NO"].ToString() + "" : "" + "");
+ soapRequestData.Append(item["YYYY"] != null ? "" + item["YYYY"].ToString() + "" : "" + "");
+ soapRequestData.Append(item["MM"] != null ? "" + item["MM"].ToString() + "" : "" + "");
+ soapRequestData.Append("" + 100 + "");
+ //soapRequestData.Append(item["SPTDOC_NO"] != null ? "" + item["SPTDOC_NO"].ToString() + "" : "" + "");
soapRequestData.Append(item["SMPL_CST"] != null ? "" + item["SMPL_CST"].ToString() + "" : "" + "");
soapRequestData.Append("");
}
@@ -766,7 +766,7 @@ rollback transaction
//soapRequestData.Append(itemRow["SPTDOC_NO"] != null ? "" + itemRow["SPTDOC_NO"].ToString() + "" : "" + "");
soapRequestData.Append(itemRow["SMR"] != null ? "" + 200 + "" : "" + "");
soapRequestData.Append(itemRow["DBTO"] != null ? "" + itemRow["DBTO"].ToString() + "" : "" + "");
- soapRequestData.Append(itemRow["INCOME_TAX"] != null ? "" + itemRow["INCOME_TAX"].ToString() + "" : "" + "");
+ //soapRequestData.Append(itemRow["INCOME_TAX"] != null ? "" + itemRow["INCOME_TAX"].ToString() + "" : "" + "");
//soapRequestData.Append(itemRow["CRDTO"] != null ? "" + itemRow["CRDTO"].ToString() + "" : "" + "");
//soapRequestData.Append(itemRow["DBTO_CRDTO_DVSN"] != null ? "" + itemRow["DBTO_CRDTO_DVSN"].ToString() + "" : "" + "");
//soapRequestData.Append(itemRow["BLNC"] != null ? "" + itemRow["BLNC"].ToString() + "" : "" + "");
@@ -839,10 +839,10 @@ rollback transaction
if (!exists)
{
soapRequestData.Append("");
- soapRequestData.Append(item["YYYY"] != null ? "" + item["YYYY"].ToString() + "" : "" + "");
- soapRequestData.Append(item["MM"] != null ? "" + item["MM"].ToString() + "" : "" + "");
- soapRequestData.Append(item["DD"] != null ? "" + item["DD"].ToString() + "" : "" + "");
- soapRequestData.Append(item["SPTDOC_NO"] != null ? "" + item["SPTDOC_NO"].ToString() + "" : "" + "");
+ soapRequestData.Append(item["YYYY"] != null ? "" + item["YYYY"].ToString() + "" : "" + "");
+ soapRequestData.Append(item["MM"] != null ? "" + item["MM"].ToString() + "" : "" + "");
+ soapRequestData.Append("" + 200 + "");
+ //soapRequestData.Append(item["SPTDOC_NO"] != null ? "" + item["SPTDOC_NO"].ToString() + "" : "" + "");
soapRequestData.Append(item["SMPL_CST"] != null ? "" + item["SMPL_CST"].ToString() + "" : "" + "");
soapRequestData.Append("");
}
@@ -850,10 +850,10 @@ rollback transaction
else
{
soapRequestData.Append("");
- soapRequestData.Append(item["YYYY"] != null ? "" + item["YYYY"].ToString() + "" : "" + "");
- soapRequestData.Append(item["MM"] != null ? "" + item["MM"].ToString() + "" : "" + "");
- soapRequestData.Append(item["DD"] != null ? "" + item["DD"].ToString() + "" : "" + "");
- soapRequestData.Append(item["SPTDOC_NO"] != null ? "" + item["SPTDOC_NO"].ToString() + "" : "" + "");
+ soapRequestData.Append(item["YYYY"] != null ? "" + item["YYYY"].ToString() + "" : "" + "");
+ soapRequestData.Append(item["MM"] != null ? "" + item["MM"].ToString() + "" : "" + "");
+ soapRequestData.Append("" + 200 + "");
+ //soapRequestData.Append(item["SPTDOC_NO"] != null ? "" + item["SPTDOC_NO"].ToString() + "" : "" + "");
soapRequestData.Append(item["SMPL_CST"] != null ? "" + item["SMPL_CST"].ToString() + "" : "" + "");
soapRequestData.Append("");
}
diff --git a/ICSSoft.FromERP/SK/YERP_007.cs b/ICSSoft.FromERP/SK/YERP_007.cs
index d237961..810c84b 100644
--- a/ICSSoft.FromERP/SK/YERP_007.cs
+++ b/ICSSoft.FromERP/SK/YERP_007.cs
@@ -95,8 +95,8 @@ namespace ICSSoft.FromERP
string Date = Dates.ToString("yyyy");
string beginMuoth = Dates.AddMonths(-1).ToString("MM");
string endMuoth = Dates.AddMonths(-1).ToString("MM");
- var beginPeriod = Date + beginMuoth; //"202407";//Date + beginMuoth;
- var endPeriod = Date + endMuoth;// "202407";// Date + endMuoth;
+ var beginPeriod = Date + beginMuoth; //"202409";
+ var endPeriod = Date + endMuoth; //"202409";
string sqls = @"
begin transaction
@@ -420,7 +420,7 @@ namespace ICSSoft.FromERP
string sqlsgz = @"
begin transaction
- exec GL_Ledger @tblname=N'cwfymxz',@KmCode=N'6603',@beginPeriod='{0}',@endPeriod='{1}',@bVouch=0,@bequal=1,@sum=0,@bMJ=1,@swhere=N'',@sAuth=N'',@ReportID=N'GL13',@ReportType=0,@iUnite=0
+ exec GL_Ledger @tblname=N'cwfymxz',@KmCode=N'5603',@beginPeriod='{0}',@endPeriod='{1}',@bVouch=0,@bequal=1,@sum=0,@bMJ=1,@swhere=N'',@sAuth=N'',@ReportID=N'GL13',@ReportType=0,@iUnite=0
--select * from tempdb..cwfymxz
@@ -872,7 +872,7 @@ namespace ICSSoft.FromERP
var datatemp = new TempDatas
{
YYYY = itemRow["Created_Year"].ToString(),
- MM = itemRow["MM"].ToString(),
+ MM = itemRow["Created_Month"].ToString(),
};
datasrrows_gz.Add(datatemp);
}
@@ -888,7 +888,7 @@ namespace ICSSoft.FromERP
var datatemp = new TempDatas
{
YYYY = itemRow["Created_Year"].ToString(),
- MM = itemRow["MM"].ToString(),
+ MM = itemRow["Created_Month"].ToString(),
};
datazcrows_gz.Add(datatemp);
}