title = "All production machine by month group" url = "/all-production-machine-month/:month/:year?" layout = "platform_main" is_hidden = 0 == timezone('UTC +05:00'); $this["month"] = $this->param("month"); $year = $this->param("year"); if($this["month"] == 'default'){ $this["month"] = $currentDate->month; } if($year){ $this["machineProductions"] = Romanah\Gokbakja\Models\ProductionMachine::whereMonth('created_at', $this["month"])->whereYear('created_at', $year)->groupBy(DB::raw("DAY(created_at)"))->get(); $this["month_all_amount"] = Romanah\Gokbakja\Models\ProductionMachine::whereMonth('created_at', $this["month"]) ->whereYear('created_at', $year) ->sum('produced_weight'); }else{ $this["machineProductions"] = Romanah\Gokbakja\Models\ProductionMachine::whereMonth('created_at', $this["month"])->whereYear('created_at', $currentDate->year)->groupBy(DB::raw("DAY(created_at)"))->addSelect(DB::raw("*, SUM(produced_weight) as produced_weight"))->get(); $this["month_all_amount"] = Romanah\Gokbakja\Models\ProductionMachine::whereMonth('created_at', $this["month"]) ->whereYear('created_at', $currentDate->year) ->sum('produced_weight'); } } ?> == {% put styles %} {% endput %}

Aýlar Boýunça {{year}}

{% partial 'dataTableJs' %}