1
This commit is contained in:
@@ -57,6 +57,7 @@ namespace Pilot.Report.Exploitation.AccountsReceivable
|
||||
string fDate = rptTitles.FirstOrDefault(a => a.TitleKey == "FDate").TitleValue.ToString();
|
||||
string fProject = rptTitles.FirstOrDefault(a => a.TitleKey == "FProject").TitleValue.ToString();
|
||||
string FState = rptTitles.FirstOrDefault(a => a.TitleKey == "FState").TitleValue.ToString();
|
||||
string F_SFYJKH = rptTitles.FirstOrDefault(a => a.TitleKey == "F_SFYJKH").TitleValue.ToString();
|
||||
//单据体
|
||||
var list = reportModel.DataSource.Rows;
|
||||
|
||||
@@ -74,14 +75,14 @@ namespace Pilot.Report.Exploitation.AccountsReceivable
|
||||
fDate2 = sqlTestList[0]["Date"].ToString().Split(' ')[0];
|
||||
}
|
||||
|
||||
Main(filePath, fClient, fDate, fProject, list, Num, fAmount, fDate2, Context);
|
||||
Main(filePath, fClient, fDate, fProject, list, Num, fAmount, fDate2, F_SFYJKH, Context);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 赋值EXCEL
|
||||
/// </summary>
|
||||
static void Main(string outputFilePath, string fClient, string fDate, string fProject, DataRowCollection list, int Num, decimal fAmount,string fDate2,Kingdee.BOS.Context Context)
|
||||
static void Main(string outputFilePath, string fClient, string fDate, string fProject, DataRowCollection list, int Num, decimal fAmount,string fDate2,string F_SFYJKH, Kingdee.BOS.Context Context)
|
||||
{
|
||||
#region Excel代码
|
||||
|
||||
@@ -206,7 +207,7 @@ namespace Pilot.Report.Exploitation.AccountsReceivable
|
||||
cell.SetCellValue("尊敬的 " + fClient + " 客户您好,我公司已根据合同/订单的要求向贵公司交付相关产品并请验收确认,鉴于我公司对贵公司已通知发货部分的交付义务已完成,");
|
||||
cell2.SetCellValue(fClient);
|
||||
var fAmountZW = ToChineseNumber(fAmount, Context);
|
||||
if (Num > 0)
|
||||
if (Num > 0 && F_SFYJKH == "2")
|
||||
{
|
||||
cel3.SetCellValue("其中上期(截止" + fDate2 + "共欠我公司货款金额为:" + fAmount + "元(大写:"+ fAmountZW + ")");
|
||||
}
|
||||
@@ -241,6 +242,8 @@ namespace Pilot.Report.Exploitation.AccountsReceivable
|
||||
string BillingDate = string.IsNullOrWhiteSpace(list[i]["ZPBillingDate"].ToString()) ? "" : list[i]["ZPBillingDate"].ToString().Split(' ')[0];
|
||||
string ReturnDate = string.IsNullOrWhiteSpace(list[i]["ReturnDate"].ToString()) ? "" : list[i]["ReturnDate"].ToString().Split(' ')[0];
|
||||
|
||||
BillingDate += string.IsNullOrWhiteSpace(list[i]["PPBillingDate"].ToString()) ? "" : (string.IsNullOrWhiteSpace(BillingDate) ?"":",")+list[i]["PPBillingDate"].ToString().Split(' ')[0];
|
||||
|
||||
//将合计行放到最下方
|
||||
IRow rowi = sheet.CreateRow(j + i);
|
||||
if (list[i]["Number"].ToString() == "合计")
|
||||
@@ -353,8 +356,8 @@ namespace Pilot.Report.Exploitation.AccountsReceivable
|
||||
//根据订单号分组合并单元格
|
||||
if(list[i]["CONTRACTNUMBER"].ToString() != GroupCONTRACTNUMBER || i == list.Count-2)
|
||||
{
|
||||
int k = (i == list.Count - 2) ? 0 : 1;
|
||||
if (GroupCount > 1)
|
||||
int k = (i == list.Count - 2 && list[i]["CONTRACTNUMBER"].ToString() == GroupCONTRACTNUMBER) ? 0 : 1;
|
||||
if (GroupCount > 1 || k == 0)
|
||||
{
|
||||
// 创建CellRangeAddress对象
|
||||
CellRangeAddress cellRangeAddress = new CellRangeAddress(GroupIndex, j + i - k, 1, 1);
|
||||
|
||||
Reference in New Issue
Block a user