fixed
This commit is contained in:
@@ -88,21 +88,65 @@ namespace rmutr_report.Controllers
|
||||
var s3 = budget_summary_reports.summary.Sum(d => d.budget_3);
|
||||
var s4 = budget_summary_reports.summary.Sum(d => d.budget_4);
|
||||
var s5 = budget_summary_reports.summary.Sum(d => d.budget_5);
|
||||
var s6 = s1+s2+s3+s4+s5;
|
||||
budget_summary_reports.budget_1 = s1;
|
||||
budget_summary_reports.budget_2 = s2;
|
||||
budget_summary_reports.budget_3 = s3;
|
||||
budget_summary_reports.budget_4 = s4;
|
||||
budget_summary_reports.budget_5 = s5;
|
||||
budget_summary_reports.total_budget = s6;
|
||||
foreach (var budget in budget_summary_reports.summary)
|
||||
if (s1 != null || s2 != null || s3 != null || s4 != null || s5 != null)
|
||||
{
|
||||
budget.total_budget = budget.budget_1 + budget.budget_2 + budget.budget_3 + budget.budget_4 +
|
||||
budget.budget_5;
|
||||
var s6 = s1 + s2 + s3 + s4 + s5;
|
||||
budget_summary_reports.total_budget = s6;
|
||||
|
||||
}
|
||||
|
||||
if (s1!=null || s2!=null||s3 !=null|| s4!= null|| s5!=null)
|
||||
{
|
||||
budget_summary_reports.budget_1 = s1;
|
||||
budget_summary_reports.budget_2 = s2;
|
||||
budget_summary_reports.budget_3 = s3;
|
||||
budget_summary_reports.budget_4 = s4;
|
||||
budget_summary_reports.budget_5 = s5;
|
||||
//budget_summary_reports.total_budget = s6;
|
||||
}
|
||||
if (s1==null)
|
||||
{
|
||||
budget_summary_reports.budget_1 = null;
|
||||
|
||||
}
|
||||
if (s2==null)
|
||||
{
|
||||
budget_summary_reports.budget_2 = null;
|
||||
|
||||
}
|
||||
if (s3==null)
|
||||
{
|
||||
budget_summary_reports.budget_3 = null;
|
||||
|
||||
}
|
||||
if (s4==null)
|
||||
{
|
||||
budget_summary_reports.budget_4 = null;
|
||||
|
||||
}
|
||||
if (s5==null)
|
||||
{
|
||||
budget_summary_reports.budget_5 = null;
|
||||
|
||||
}
|
||||
foreach (var budget in budget_summary_reports.summary)
|
||||
{
|
||||
if (budget.budget_1 != null || budget.budget_2 != null || budget.budget_3 != null ||
|
||||
budget.budget_4 != null || budget.budget_5 != null)
|
||||
{
|
||||
|
||||
|
||||
budget.total_budget = budget.budget_1 + budget.budget_2 + budget.budget_3 + budget.budget_4 +
|
||||
budget.budget_5;
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
Report report = new Report();
|
||||
report.Load(_setting.report_path + "budget_summary_report.frx");
|
||||
report.Load(_setting.report_path + "budget_summary_report_moc.frx");
|
||||
report.RegisterData(_budget_summary_report, "budget_summary_report");
|
||||
report.Prepare();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user