update ง3 ง 4

This commit is contained in:
kamonwan taengsuk
2023-03-28 11:20:19 +07:00
parent e168b3985b
commit ea5040cd13
5 changed files with 412 additions and 372 deletions

View File

@@ -56,36 +56,36 @@ 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 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)
@@ -104,7 +104,11 @@ namespace rmutr_report.Controllers
building_fours.outside_amount = null;
}
if (cc.amount != null && cc.outside_amount != null)
{
cc.total_amount = cc.amount + cc.outside_amount;
}
var c = building_fours.budget_limit.Where(d => d.total_amount == d.total_amount)
.Sum(o => o.total_amount);
building_fours.total_amount = c;