Commit dd78830e by guanzhenshan

解决资产负债表无法导出的问题

parent fb28e93e
......@@ -214,9 +214,32 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
});
}
public ActionResult ExportIndex(int type, DateTime day, int paycompanyvalue)
public ActionResult ExportIndex(int type, DateTime? day, int paycompanyvalue)
{
var date = day;
var date = DateTime.Now.AddDays(-1);
if (type == 2) //按周
{
if (date.DayOfWeek == DayOfWeek.Saturday)
{
date = date.AddDays(-1);
}
else if (date.DayOfWeek == DayOfWeek.Sunday)
{
date = date.AddDays(-2);
}
else
{
date = date.AddDays(-2 - (int)date.DayOfWeek);
}
}
else if (type == 3) //按月
{
if (date.AddDays(1).ToString("yyyy-MM") == date.ToString("yyyy-MM"))
{
date = DateTime.Parse(date.ToString("yyyy-MM") + "-01").AddDays(-1);
}
}
var list = new Services.FinanceReportServices().GetBalanceSheet(type, date, paycompanyvalue);
......
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