g_sto/themes/gokbakja/partials/report/month-row.htm

31 lines
602 B
HTML
Raw Normal View History

2023-09-19 19:52:14 +00:00
[viewBag]
==
<?php
function onStart (){
$no = $this->no;
$year = $this->year;
$prodId = $this->prodId;
2023-10-11 22:11:21 +00:00
$allAmount = $this->all_amount;
2023-10-19 21:07:33 +00:00
$amountCalc = Romanah\Gokbakja\Models\ProductionCalculate::where('product_id', $prodId)->whereMonth('date', $no)->whereYear('date', $year)->sum("amount_calc");
2023-10-11 22:11:21 +00:00
if ($amountCalc != null){
2023-10-19 21:07:33 +00:00
$this["pivot_calc"] = $amountCalc;
2023-10-11 22:11:21 +00:00
}else{
$this["pivot_calc"] = 0;
}
2023-09-19 19:52:14 +00:00
}
?>
==
2023-10-19 21:07:33 +00:00
2023-12-20 20:59:14 +00:00
{% if pivot_calc > 0 %}
<font style="font-weight: bold;"> {{product_code}}:</font> {{pivot_calc|number_format}} kg <br>
2023-10-11 22:11:21 +00:00
{% endif %}
2023-12-20 20:59:14 +00:00