title = "produced/rulon/stock" url = "/produced/rulon/stock/:stockId" layout = "platform_main" is_hidden = 0 == param("stockId"); $this["actions"] = Romanah\Gokbakja\Models\RulonAction::select('romanah_gokbakja_rulon_action.*') ->with(['product' => function($q){ $q->with(['bag_type', 'bag_size', 'color']); }]) ->where("stock_id", $stockId) ->where("status_accountant", "accept") ->where("status_director", "accept") ->addSelect(DB::raw("SUM(amount) as quantity")) ->groupBy('romanah_gokbakja_rulon_action.product_id') ->orderBy('id', 'DESC') ->get(); $this["actionsSumWeight"] = Romanah\Gokbakja\Models\RulonAction::select('romanah_gokbakja_rulon_action.*') ->where("stock_id", $stockId) ->where("status_accountant", "accept") ->where("status_director", "accept") ->sum('amount'); $this["actionsSumCount"] = count($this["actions"]); // dd($this["actions"]); } ?> == {% put styles %} {% endput %}
sklad
| № | Haryt Kody | Haryt | Hereket | Mukdary (KG) | Brutto agramy (KG) | Sene | Sklad |
|---|---|---|---|---|---|---|---|
| {{key + 1}} | #Rulon{{record.product_id}} | {{record.product.bag_type.name}}, Ölçegi: {{record.product.width}}, {{record.product.gram}} m2, {{record.product.layer}} gat, {{record.product.color.name}} | {{record.type}} | {{record.quantity|number_format(2)}} kg | {{record.product.brutto_kg|number_format(2)}} kg | {{record.created_at|date('d.m.Y')}} | {{record.stock.name}} |
| № | Haryt Kody | Haryt | Hereket | Mukdary (KG) | Brutto agramy (KG) | Sene | Sklad |