[viewBag]
==
<?php
function onStart (){
    $no = $this->no;
    $year = $this->year;


    $sewerIds = Romanah\Gokbakja\Models\SewerProduction::whereMonth('date', $no)->whereYear('date', $year)->get()->pluck("id")->toArray();

    $this["all_amount"] = Romanah\Gokbakja\Models\PivotSewer::whereIn("sewer_production_id", $sewerIds)->sum("spent_amount");


    $this["all_bag_qty"] = Romanah\Gokbakja\Models\SewerProduction::whereMonth('date', $no)
                                                                ->whereYear('date', $year)
                                                                ->sum('produced_bag_qty');

}
?>
==
<tr>
    <td style="font-weight: bold;width: 5%;">{{no}}</td>
    <td><a href="#" style="font-weight: bold;color: #0005c5;"> {{title}} </a></td>
    <td><a href="#" style="font-weight: bold;"> {{all_amount|number_format}} kg</a></td>
    <td><a href="#" style="font-weight: bold;"> {{all_bag_qty|number_format}} sany</a></td>
</tr>
