diff --git a/themes/gokbakja/pages/home.htm b/themes/gokbakja/pages/home.htm index af288fc..36777f3 100644 --- a/themes/gokbakja/pages/home.htm +++ b/themes/gokbakja/pages/home.htm @@ -24,17 +24,43 @@ function onStart(){ $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)->count() ?? 0; - $this["production3"] = Romanah\Gokbakja\Models\SewerProduction::whereMonth('date', 3)->whereYear('date', $year)->count() ?? 0; - $this["production4"] = Romanah\Gokbakja\Models\SewerProduction::whereMonth('date', 4)->whereYear('date', $year)->count() ?? 0; - $this["production5"] = Romanah\Gokbakja\Models\SewerProduction::whereMonth('date', 5)->whereYear('date', $year)->count() ?? 0; - $this["production6"] = Romanah\Gokbakja\Models\SewerProduction::whereMonth('date', 6)->whereYear('date', $year)->count() ?? 0; - $this["production7"] = Romanah\Gokbakja\Models\SewerProduction::whereMonth('date', 7)->whereYear('date', $year)->count() ?? 0; - $this["production8"] = Romanah\Gokbakja\Models\SewerProduction::whereMonth('date', 8)->whereYear('date', $year)->count() ?? 0; - $this["production9"] = Romanah\Gokbakja\Models\SewerProduction::whereMonth('date', 9)->whereYear('date', $year)->count() ?? 0; - $this["production10"] = Romanah\Gokbakja\Models\SewerProduction::whereMonth('date', 10)->whereYear('date', $year)->count() ?? 0; - $this["production11"] = Romanah\Gokbakja\Models\SewerProduction::whereMonth('date', 11)->whereYear('date', $year)->count() ?? 0; - $this["production12"] = Romanah\Gokbakja\Models\SewerProduction::whereMonth('date', 12)->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; @@ -81,6 +107,20 @@ function onStart(){ $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; + + } ?> == @@ -104,7 +144,16 @@ function onStart(){