title = "Home" url = "/:year?" layout = "platform_main" is_hidden = 0 == param("year"); if($year){ $year = $this->param("year"); $this["year"] = $this->param("year"); }else{ $year = $currentDate->year; $this["year"] = $currentDate->year; } if($year == 'default'){ $year = $currentDate->year; $this["year"] = $currentDate->year; } $this["production1"] = Romanah\Gokbakja\Models\SewerProduction::whereMonth('date', 1)->whereYear('date', $year)->count() ?? 0; $this["production2"] = Romanah\Gokbakja\Models\SewerProduction::whereMonth('date', 2)->whereYear('date', $year)->sum('produced_bag_qty') ?? 0; $this["production3"] = Romanah\Gokbakja\Models\SewerProduction::whereMonth('date', 3)->whereYear('date', $year)->sum('produced_bag_qty') ?? 0; $this["production4"] = Romanah\Gokbakja\Models\SewerProduction::whereMonth('date', 4)->whereYear('date', $year)->sum('produced_bag_qty') ?? 0; $this["production5"] = Romanah\Gokbakja\Models\SewerProduction::whereMonth('date', 5)->whereYear('date', $year)->sum('produced_bag_qty') ?? 0; $this["production6"] = Romanah\Gokbakja\Models\SewerProduction::whereMonth('date', 6)->whereYear('date', $year)->sum('produced_bag_qty') ?? 0; $this["production7"] = Romanah\Gokbakja\Models\SewerProduction::whereMonth('date', 7)->whereYear('date', $year)->sum('produced_bag_qty') ?? 0; $this["production8"] = Romanah\Gokbakja\Models\SewerProduction::whereMonth('date', 8)->whereYear('date', $year)->sum('produced_bag_qty') ?? 0; $this["production9"] = Romanah\Gokbakja\Models\SewerProduction::whereMonth('date', 9)->whereYear('date', $year)->sum('produced_bag_qty') ?? 0; $this["production10"] = Romanah\Gokbakja\Models\SewerProduction::whereMonth('date', 10)->whereYear('date', $year)->sum('produced_bag_qty') ?? 0; $this["production11"] = Romanah\Gokbakja\Models\SewerProduction::whereMonth('date', 11)->whereYear('date', $year)->sum('produced_bag_qty') ?? 0; $this["production12"] = Romanah\Gokbakja\Models\SewerProduction::whereMonth('date', 12)->whereYear('date', $year)->sum('produced_bag_qty') ?? 0; $this["brakProduction1"] = Romanah\Gokbakja\Models\SewerProduction::whereMonth('date', 1)->whereYear('date', $year)->sum('defective_bag_qty') ?? 0; $this["brakProduction2"] = Romanah\Gokbakja\Models\SewerProduction::whereMonth('date', 2)->whereYear('date', $year)->sum('defective_bag_qty') ?? 0; $this["brakProduction3"] = Romanah\Gokbakja\Models\SewerProduction::whereMonth('date', 3)->whereYear('date', $year)->sum('defective_bag_qty') ?? 0; $this["brakProduction4"] = Romanah\Gokbakja\Models\SewerProduction::whereMonth('date', 4)->whereYear('date', $year)->sum('defective_bag_qty') ?? 0; $this["brakProduction5"] = Romanah\Gokbakja\Models\SewerProduction::whereMonth('date', 5)->whereYear('date', $year)->sum('defective_bag_qty') ?? 0; $this["brakProduction6"] = Romanah\Gokbakja\Models\SewerProduction::whereMonth('date', 6)->whereYear('date', $year)->sum('defective_bag_qty') ?? 0; $this["brakProduction7"] = Romanah\Gokbakja\Models\SewerProduction::whereMonth('date', 7)->whereYear('date', $year)->sum('defective_bag_qty') ?? 0; $this["brakProduction8"] = Romanah\Gokbakja\Models\SewerProduction::whereMonth('date', 8)->whereYear('date', $year)->sum('defective_bag_qty') ?? 0; $this["brakProduction9"] = Romanah\Gokbakja\Models\SewerProduction::whereMonth('date', 9)->whereYear('date', $year)->sum('defective_bag_qty') ?? 0; $this["brakProduction10"] = Romanah\Gokbakja\Models\SewerProduction::whereMonth('date', 10)->whereYear('date', $year)->sum('defective_bag_qty') ?? 0; $this["brakProduction11"] = Romanah\Gokbakja\Models\SewerProduction::whereMonth('date', 11)->whereYear('date', $year)->sum('defective_bag_qty') ?? 0; $this["brakProduction12"] = Romanah\Gokbakja\Models\SewerProduction::whereMonth('date', 12)->whereYear('date', $year)->sum('defective_bag_qty') ?? 0; $this["repairBrakProduction1"] = Romanah\Gokbakja\Models\SewerProduction::whereMonth('date', 1)->whereYear('date', $year)->sum('defective_repair_qty') ?? 0; $this["repairBrakProduction2"] = Romanah\Gokbakja\Models\SewerProduction::whereMonth('date', 2)->whereYear('date', $year)->sum('defective_repair_qty') ?? 0; $this["repairBrakProduction3"] = Romanah\Gokbakja\Models\SewerProduction::whereMonth('date', 3)->whereYear('date', $year)->sum('defective_repair_qty') ?? 0; $this["repairBrakProduction4"] = Romanah\Gokbakja\Models\SewerProduction::whereMonth('date', 4)->whereYear('date', $year)->sum('defective_repair_qty') ?? 0; $this["repairBrakProduction5"] = Romanah\Gokbakja\Models\SewerProduction::whereMonth('date', 5)->whereYear('date', $year)->sum('defective_repair_qty') ?? 0; $this["repairBrakProduction6"] = Romanah\Gokbakja\Models\SewerProduction::whereMonth('date', 6)->whereYear('date', $year)->sum('defective_repair_qty') ?? 0; $this["repairBrakProduction7"] = Romanah\Gokbakja\Models\SewerProduction::whereMonth('date', 7)->whereYear('date', $year)->sum('defective_repair_qty') ?? 0; $this["repairBrakProduction8"] = Romanah\Gokbakja\Models\SewerProduction::whereMonth('date', 8)->whereYear('date', $year)->sum('defective_repair_qty') ?? 0; $this["repairBrakProduction9"] = Romanah\Gokbakja\Models\SewerProduction::whereMonth('date', 9)->whereYear('date', $year)->sum('defective_repair_qty') ?? 0; $this["repairBrakProduction10"] = Romanah\Gokbakja\Models\SewerProduction::whereMonth('date', 10)->whereYear('date', $year)->sum('defective_repair_qty') ?? 0; $this["repairBrakProduction11"] = Romanah\Gokbakja\Models\SewerProduction::whereMonth('date', 11)->whereYear('date', $year)->sum('defective_repair_qty') ?? 0; $this["repairBrakProduction12"] = Romanah\Gokbakja\Models\SewerProduction::whereMonth('date', 12)->whereYear('date', $year)->sum('defective_repair_qty') ?? 0; $this["order1"] = Romanah\Gokbakja\Models\Order::whereMonth('created_at', 1)->whereYear('created_at', $year)->count() ?? 0; $this["order2"] = Romanah\Gokbakja\Models\Order::whereMonth('created_at', 2)->whereYear('created_at', $year)->count() ?? 0; $this["order3"] = Romanah\Gokbakja\Models\Order::whereMonth('created_at', 3)->whereYear('created_at', $year)->count() ?? 0; $this["order4"] = Romanah\Gokbakja\Models\Order::whereMonth('created_at', 4)->whereYear('created_at', $year)->count() ?? 0; $this["order5"] = Romanah\Gokbakja\Models\Order::whereMonth('created_at', 5)->whereYear('created_at', $year)->count() ?? 0; $this["order6"] = Romanah\Gokbakja\Models\Order::whereMonth('created_at', 6)->whereYear('created_at', $year)->count() ?? 0; $this["order7"] = Romanah\Gokbakja\Models\Order::whereMonth('created_at', 7)->whereYear('created_at', $year)->count() ?? 0; $this["order8"] = Romanah\Gokbakja\Models\Order::whereMonth('created_at', 8)->whereYear('created_at', $year)->count() ?? 0; $this["order9"] = Romanah\Gokbakja\Models\Order::whereMonth('created_at', 9)->whereYear('created_at', $year)->count() ?? 0; $this["order10"] = Romanah\Gokbakja\Models\Order::whereMonth('created_at', 10)->whereYear('created_at', $year)->count() ?? 0; $this["order11"] = Romanah\Gokbakja\Models\Order::whereMonth('created_at', 11)->whereYear('created_at', $year)->count() ?? 0; $this["order12"] = Romanah\Gokbakja\Models\Order::whereMonth('created_at', 12)->whereYear('created_at', $year)->count() ?? 0; $this["rulonProduction1"] = Romanah\Gokbakja\Models\ProductionMachine::whereMonth('date', 1)->whereYear('date', $year)->count() ?? 0; $this["rulonProduction2"] = Romanah\Gokbakja\Models\ProductionMachine::whereMonth('date', 2)->whereYear('date', $year)->count() ?? 0; $this["rulonProduction3"] = Romanah\Gokbakja\Models\ProductionMachine::whereMonth('date', 3)->whereYear('date', $year)->count() ?? 0; $this["rulonProduction4"] = Romanah\Gokbakja\Models\ProductionMachine::whereMonth('date', 4)->whereYear('date', $year)->count() ?? 0; $this["rulonProduction5"] = Romanah\Gokbakja\Models\ProductionMachine::whereMonth('date', 5)->whereYear('date', $year)->count() ?? 0; $this["rulonProduction6"] = Romanah\Gokbakja\Models\ProductionMachine::whereMonth('date', 6)->whereYear('date', $year)->count() ?? 0; $this["rulonProduction7"] = Romanah\Gokbakja\Models\ProductionMachine::whereMonth('date', 7)->whereYear('date', $year)->count() ?? 0; $this["rulonProduction8"] = Romanah\Gokbakja\Models\ProductionMachine::whereMonth('date', 8)->whereYear('date', $year)->count() ?? 0; $this["rulonProduction9"] = Romanah\Gokbakja\Models\ProductionMachine::whereMonth('date', 9)->whereYear('date', $year)->count() ?? 0; $this["rulonProduction10"] = Romanah\Gokbakja\Models\ProductionMachine::whereMonth('date', 10)->whereYear('date', $year)->count() ?? 0; $this["rulonProduction11"] = Romanah\Gokbakja\Models\ProductionMachine::whereMonth('date', 11)->whereYear('date', $year)->count() ?? 0; $this["rulonProduction12"] = Romanah\Gokbakja\Models\ProductionMachine::whereMonth('date', 12)->whereYear('date', $year)->count() ?? 0; $this["mechanicRulonProduction1"] = Romanah\Gokbakja\Models\ProductionMachine::whereMonth('date', 1)->whereYear('date', $year)->sum('produced_weight') ?? 0; $this["mechanicRulonProduction2"] = Romanah\Gokbakja\Models\ProductionMachine::whereMonth('date', 2)->whereYear('date', $year)->sum('produced_weight') ?? 0; $this["mechanicRulonProduction3"] = Romanah\Gokbakja\Models\ProductionMachine::whereMonth('date', 3)->whereYear('date', $year)->sum('produced_weight') ?? 0; $this["mechanicRulonProduction4"] = Romanah\Gokbakja\Models\ProductionMachine::whereMonth('date', 4)->whereYear('date', $year)->sum('produced_weight') ?? 0; $this["mechanicRulonProduction5"] = Romanah\Gokbakja\Models\ProductionMachine::whereMonth('date', 5)->whereYear('date', $year)->sum('produced_weight') ?? 0; $this["mechanicRulonProduction6"] = Romanah\Gokbakja\Models\ProductionMachine::whereMonth('date', 6)->whereYear('date', $year)->sum('produced_weight') ?? 0; $this["mechanicRulonProduction7"] = Romanah\Gokbakja\Models\ProductionMachine::whereMonth('date', 7)->whereYear('date', $year)->sum('produced_weight') ?? 0; $this["mechanicRulonProduction8"] = Romanah\Gokbakja\Models\ProductionMachine::whereMonth('date', 8)->whereYear('date', $year)->sum('produced_weight') ?? 0; $this["mechanicRulonProduction9"] = Romanah\Gokbakja\Models\ProductionMachine::whereMonth('date', 9)->whereYear('date', $year)->sum('produced_weight') ?? 0; $this["mechanicRulonProduction10"] = Romanah\Gokbakja\Models\ProductionMachine::whereMonth('date', 10)->whereYear('date', $year)->sum('produced_weight') ?? 0; $this["mechanicRulonProduction11"] = Romanah\Gokbakja\Models\ProductionMachine::whereMonth('date', 11)->whereYear('date', $year)->sum('produced_weight') ?? 0; $this["mechanicRulonProduction12"] = Romanah\Gokbakja\Models\ProductionMachine::whereMonth('date', 12)->whereYear('date', $year)->sum('produced_weight') ?? 0; $this["othodMechanicRulonProduction1"] = Romanah\Gokbakja\Models\ProductionMachine::whereMonth('date', 1)->whereYear('date', $year)->sum('defective_weight') ?? 0; $this["othodMechanicRulonProduction2"] = Romanah\Gokbakja\Models\ProductionMachine::whereMonth('date', 2)->whereYear('date', $year)->sum('defective_weight') ?? 0; $this["othodMechanicRulonProduction3"] = Romanah\Gokbakja\Models\ProductionMachine::whereMonth('date', 3)->whereYear('date', $year)->sum('defective_weight') ?? 0; $this["othodMechanicRulonProduction4"] = Romanah\Gokbakja\Models\ProductionMachine::whereMonth('date', 4)->whereYear('date', $year)->sum('defective_weight') ?? 0; $this["othodMechanicRulonProduction5"] = Romanah\Gokbakja\Models\ProductionMachine::whereMonth('date', 5)->whereYear('date', $year)->sum('defective_weight') ?? 0; $this["othodMechanicRulonProduction6"] = Romanah\Gokbakja\Models\ProductionMachine::whereMonth('date', 6)->whereYear('date', $year)->sum('defective_weight') ?? 0; $this["othodMechanicRulonProduction7"] = Romanah\Gokbakja\Models\ProductionMachine::whereMonth('date', 7)->whereYear('date', $year)->sum('defective_weight') ?? 0; $this["othodMechanicRulonProduction8"] = Romanah\Gokbakja\Models\ProductionMachine::whereMonth('date', 8)->whereYear('date', $year)->sum('defective_weight') ?? 0; $this["othodMechanicRulonProduction9"] = Romanah\Gokbakja\Models\ProductionMachine::whereMonth('date', 9)->whereYear('date', $year)->sum('defective_weight') ?? 0; $this["othodMechanicRulonProduction10"] = Romanah\Gokbakja\Models\ProductionMachine::whereMonth('date', 10)->whereYear('date', $year)->sum('defective_weight') ?? 0; $this["othodMechanicRulonProduction11"] = Romanah\Gokbakja\Models\ProductionMachine::whereMonth('date', 11)->whereYear('date', $year)->sum('defective_weight') ?? 0; $this["othodMechanicRulonProduction12"] = Romanah\Gokbakja\Models\ProductionMachine::whereMonth('date', 12)->whereYear('date', $year)->sum('defective_weight') ?? 0; } ?> ==