2023-10-09 21:53:59 +00:00
|
|
|
[viewBag]
|
|
|
|
|
==
|
|
|
|
|
<?php
|
|
|
|
|
function onStart (){
|
|
|
|
|
$no = $this->no;
|
|
|
|
|
$year = $this->year;
|
|
|
|
|
|
|
|
|
|
|
2023-10-22 23:05:55 +00:00
|
|
|
$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)
|
2023-10-09 21:53:59 +00:00
|
|
|
->sum('produced_bag_qty');
|
|
|
|
|
|
2023-11-23 17:30:57 +00:00
|
|
|
$this["all_defective_bag_qty"] = Romanah\Gokbakja\Models\SewerProduction::whereMonth('date', $no)
|
|
|
|
|
->whereYear('date', $year)
|
|
|
|
|
->sum('defective_bag_qty');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$this["all_defective_bag_qty_repair"] = Romanah\Gokbakja\Models\SewerProduction::whereMonth('date', $no)
|
|
|
|
|
->whereYear('date', $year)
|
|
|
|
|
->sum('defective_repair_qty');
|
|
|
|
|
|
2023-10-09 21:53:59 +00:00
|
|
|
}
|
|
|
|
|
?>
|
|
|
|
|
==
|
|
|
|
|
<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>
|
2023-11-23 17:30:57 +00:00
|
|
|
<td><a href="#" style="font-weight: bold;"> {{all_defective_bag_qty|number_format}} sany</a></td>
|
|
|
|
|
<td><a href="#" style="font-weight: bold;"> {{all_defective_bag_qty_repair|number_format}} sany</a></td>
|
2023-10-09 21:53:59 +00:00
|
|
|
</tr>
|