This commit is contained in:
liqionghai
2025-08-20 15:51:52 +08:00
parent c8cb278e9d
commit 998ec6325f
6 changed files with 163 additions and 54 deletions

View File

@@ -156,10 +156,11 @@ namespace Pilot.Report.Exploitation.AccountsReceivableStatements
", FSDate, fDate, ZZFID, fClient,XSYFID,ZZHTH,SFQJFWDZ);
sql += string.Format(@"
INSERT INTO YingShouZhanKuanJY_GZTH(Number,OrderAmount,ShipmentsAmount,FBillAllAmount,
INSERT INTO YingShouZhanKuanJY_GZTH(FID,Number,OrderAmount,ShipmentsAmount,FBillAllAmount,
FALLAmountFor,PaymentAmount,ShippedDebt,InvoicedDebt,OwedTickets
,[K3发货数量],[K3发货金额],[K3退货数量],[K3退货金额],[星空发货数量],[星空发货金额],[星空退货数量],[星空退货金额],PPFALLAmountFor,ZPFALLAmountFor,[K3专票金额],[K3普票金额])
Select
Select
999998,
'合计',
SUM(OrderAmount) as OrderAmount,
SUM(ShipmentsAmount) as ShipmentsAmount,
@@ -244,7 +245,8 @@ namespace Pilot.Report.Exploitation.AccountsReceivableStatements
{
fState = "未完结订单";
}
//是否月结客户
var SFQJFWDZ = customFilter["F_ALL_GROUP2"]?.ToString();
//这里是报表页面的标识
reportTitles.AddTitle("FState", fGROUP == null ? "" : fState);
reportTitles.AddTitle("FClient", fClientList == null ? "" : fClientList);
@@ -253,6 +255,7 @@ namespace Pilot.Report.Exploitation.AccountsReceivableStatements
reportTitles.AddTitle("FProject", fProjectList == null ? "" : string.Join(",", fProjectList));
reportTitles.AddTitle("F_ZZHTH", ZZHTH == null ? "" : ZZHTH);
reportTitles.AddTitle("F_XSY", XSYFID == null ? "" : XSYFID);
reportTitles.AddTitle("F_SFYJKH", SFQJFWDZ == null ? "" : SFQJFWDZ);
}
return reportTitles;
}

View File

@@ -90,9 +90,9 @@ namespace Pilot.Report.Exploitation.AccountsReceivableStatements
header.AddChild("星空退货金额", new LocaleValue("星空退货金额"), SqlStorageType.SqlDecimal);
header.AddChild("ReturnNum", new LocaleValue("总退货数量"), SqlStorageType.SqlInt);
header.AddChild("ReturnAmount", new LocaleValue("总退货金额"), SqlStorageType.SqlDecimal);
header.AddChild("PPBillingDate", new LocaleValue("星空普票开票日期"), SqlStorageType.Sqlvarchar);
header.AddChild("PPBillingDate", new LocaleValue("普票开票日期"), SqlStorageType.Sqlvarchar);
header.AddChild("PPBillingAmount", new LocaleValue("星空普票开票金额"), SqlStorageType.SqlDecimal);
header.AddChild("ZPBillingDate", new LocaleValue("星空专票开票日期"), SqlStorageType.Sqlvarchar);
header.AddChild("ZPBillingDate", new LocaleValue("专票开票日期"), SqlStorageType.Sqlvarchar);
header.AddChild("ZPBillingAmount", new LocaleValue("星空专票开票金额"), SqlStorageType.SqlDecimal);
header.AddChild("BillingAmount", new LocaleValue("总开票金额"), SqlStorageType.SqlDecimal);
header.AddChild("PaymentDate", new LocaleValue("回款日期"), SqlStorageType.Sqlvarchar);
@@ -164,10 +164,11 @@ namespace Pilot.Report.Exploitation.AccountsReceivableStatements
", FSDate,fDate,ZZFID,fClient,XSYFID,ZZHTH,SFQJFWDZ);
sql += string.Format($@"/*dialect*/
INSERT INTO YingShouZhanKuanMX_GZTH(NUMBER,FQTY,FALLAMOUNT,OrderAmount,ShipmentsNum,ShipmentsAmount,
INSERT INTO YingShouZhanKuanMX_GZTH(FID,NUMBER,FQTY,FALLAMOUNT,OrderAmount,ShipmentsNum,ShipmentsAmount,
ReturnNum,ReturnAmount,BillingAmount,PaymentAmount,ShippedDebt,InvoicedDebt,OwedTickets,[K3退货金额],PPBillingAmount,ZPBillingAmount,[星空退货金额],[星空发货金额]
,[K3发货数量],[K3发货金额],[星空发货数量],[K3退货数量],[星空退货数量],[K3专票金额],[K3普票金额])
SELECT
SELECT
999998,
'合计',
SUM(FQTY),
SUM(FALLAMOUNT),
@@ -212,7 +213,7 @@ namespace Pilot.Report.Exploitation.AccountsReceivableStatements
{
sql += string.Format("AND FID IN (SELECT FID FROM YingShouZhanKuanMX_GZTH WHERE IsEnded = '未完结')");
}
Logger.Error("sql脚本", sql, new Exception());
//Logger.Error("sql脚本", sql, new Exception());
DBUtils.Execute(this.Context, sql);
}