Commit 4ef52cf4 by guanzhenshan

解决付现流水导出数据对不上的问题

parent 3ba3981b
......@@ -779,7 +779,7 @@ namespace Bailun.DC.Services
var sqlparam = new DynamicParameters();
var list = new List<Models.dc_base_finance_fee>();
var sql = $"select * from dc_base_finance_fee where cost_status=4 and (is_lend is null or is_lend=1) and pay_time>='{start.ToString("yyyy-MM-dd")}' and pay_time<'{end.AddDays(1).ToString("yyyy-MM-dd")}'";
var sql = $"select * from dc_base_finance_fee where cost_status=4 and (is_lend is null or is_lend=1 or (is_lend=2 and lend_balance>0)) and pay_time>='{start.ToString("yyyy-MM-dd")}' and pay_time<'{end.AddDays(1).ToString("yyyy-MM-dd")}'";
if (!string.IsNullOrEmpty(feesupertype))
{
......@@ -849,10 +849,14 @@ namespace Bailun.DC.Services
}
//借支单待还余额
if(item.cost_form==3 && item.lend_balance.HasValue && item.lend_balance.Value>0)
if(item.cost_form==3)
{
item.amount += item.lend_balance.Value;
item.amount_rmb = item.lend_balance.Value * (item.to_rmb_rate ?? 1);
if(item.is_lend.HasValue && item.is_lend.Value==2 && ((item.lend_balance??0)>0)) //归还金额
{
item.amount = -(item.amount);
item.amount_rmb = -(item.amount_rmb);
}
}
}
......
......@@ -2271,7 +2271,7 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
}
var guid = Guid.NewGuid().ToString();
var filename = categoryname+"+"+headname+" 管理成本明细" + DateTime.Now.ToString("yyyyMMddHHmmss");
var filename = categoryname+"+"+headname+ " 付现流水明细" + DateTime.Now.ToString("yyyyMMddHHmmss");
var filepath = _hostingEnvironment.WebRootPath + "\\Files\\Report\\" + DateTime.Now.ToString("yyyy-MM-dd") + "\\";
ToCSV(list, colNames, guid, filepath);
......@@ -2306,7 +2306,9 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
//var obj = new Services.FinanceReportServices().ListOtherCost(url);
var obj = new Services.FinanceReportServices().ListFinanceManageCost(start, end, "", "", "", paycompanyid);
//var obj = new Services.FinanceReportServices().ListFinanceManageCost(start, end, "", "", "", paycompanyid);
var obj = new Services.FinanceReportServices().ListFinanceFee(start, end, "", "", "", paycompanyid, ismanager);
var colNames = new List<string> {"费用单号","部门名称","付款主体名称","费用类别", "会计科目",
"金额","币种", "人民币金额","收款单位","收款理由","付款时间",
......@@ -2315,13 +2317,13 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
var list = new List<string>();
foreach (var item in obj)
{
list.Add(item.no + "|" + item.department_name + "|" + item.company_name + "|" + item.fee_super_type + "|" + item.accounting_subject_name + "|" +
item.amount + "|" + item.currency + "|" + item.amount_rmb + "|" + item.receive_unit + "|" + item.reason + "|" + item.pay_time.Value.ToString("yyyy-MM-dd HH:mm:ss")
list.Add(item.cost_no + "|" + item.department_name + "|" + item.company_name + "|" + item.type_name + "|" + item.accounting_subject_name + "|" +
item.amount + "|" + item.dic + "|" + item.amount_rmb + "|" + item.bank_company + "|" + item.cost_reason + "|" + item.pay_time.Value.ToString("yyyy-MM-dd HH:mm:ss" + "|" + item.mor_remark)
);
}
var guid = Guid.NewGuid().ToString();
var filename = "管理成本明细"+DateTime.Now.ToString("yyyyMMddHHmmss");
var filename = "付现流水明细"+DateTime.Now.ToString("yyyyMMddHHmmss");
var filepath = _hostingEnvironment.WebRootPath + "\\Files\\Report\\"+DateTime.Now.ToString("yyyy-MM-dd")+"\\";
ToCSV(list, colNames, guid, filepath);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment