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

    $allAmount = $this->all_amount;


    $amountCalc = Romanah\Gokbakja\Models\ProductionCalculate::where('product_id', $prodId)->whereMonth('date', $no)->whereYear('date', $year)->sum("amount_calc");


    if ($amountCalc != null){
        $this["pivot_calc"] =   $amountCalc;
    }else{
        $this["pivot_calc"] = 0;
    }



}
?>
==

    {% if pivot_calc > 0 %}
    <font style="font-weight: bold;"> {{product_code}}:</font> {{pivot_calc|number_format}} kg <br>
    {% endif %}

