Bug Fixed
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
kamonwan taengsuk
2024-09-19 18:25:53 +07:00
parent 62b89761e4
commit 767cd57cb5
15 changed files with 200 additions and 221 deletions

View File

@@ -55,36 +55,6 @@ namespace rmutr_report.Controllers
}
}
// foreach (var bb in building_fours.material_construction_labor1)
// {
// if (bb != null)
// {
// bb.total_amount = bb.material_cost + bb.labor_unit;
// var f = building_fours.material_construction_labor1.Where(d => d.total_amount == d.total_amount)
// .Sum(o => o.total_amount);
// building_fours.material_total_amount1 = f;
// }
// }
// foreach (var bb in building_fours.material_construction_labor2)
// {
// if (bb != null)
// {
// bb.total_amount = bb.material_cost + bb.labor_unit;
// var f = building_fours.material_construction_labor2.Where(d => d.total_amount == d.total_amount)
// .Sum(o => o.total_amount);
// building_fours.material_total_amount2 = f;
// }
// }
// foreach (var bb in building_fours.material_construction_labor3)
// {
// if (bb != null)
// {
// bb.total_amount = bb.material_cost + bb.labor_unit;
// var f = building_fours.material_construction_labor3.Where(d => d.total_amount == d.total_amount)
// .Sum(o => o.total_amount);
// building_fours.material_total_amount3 = f;
// }
// }
foreach (var cc in building_fours.budget_limit)
{
if (cc != null)
@@ -157,11 +127,6 @@ namespace rmutr_report.Controllers
boqPrice.list = num.Insert(i, ",").Insert(j,",");
}
}
if (boqPrice.list=="20000000.0000")
{
boqPrice.list = "20,000,000";
}
}
}
@@ -249,22 +214,13 @@ namespace rmutr_report.Controllers
MemoryStream stream = new MemoryStream();
switch (type)
{
case "view":
return File(stream, "application/pdf");
case "pdf":
PDFExport pdf = new PDFExport();
report.Export(pdf, stream);
stream.Seek(0, SeekOrigin.Begin);
return File(stream, "application/pdf");
case "xls":
case "xlsx":
Excel2007Export excel = new Excel2007Export();
report.Export(excel, stream);
stream.Seek(0, SeekOrigin.Begin);
return File(stream, "application/vnd.ms-excel");
break;
case "mht":
break;
case "mht":
MHTExport mht = new MHTExport();
report.Export(mht, stream);
stream.Seek(0, SeekOrigin.Begin);
@@ -283,6 +239,13 @@ namespace rmutr_report.Controllers
stream.Seek(0, SeekOrigin.Begin);
return File(stream, "appllication/vnd.ms-word");
break;
case "xls":
case "xlsx":
Excel2007Export excel = new Excel2007Export();
report.Export(excel, stream);
stream.Seek(0, SeekOrigin.Begin);
return File(stream, "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
}
return Ok();