141 lines
6.4 KiB
HTML
141 lines
6.4 KiB
HTML
title = "Get production machine"
|
|
url = "/get-production-machine/:id"
|
|
layout = "platform_main"
|
|
is_hidden = 0
|
|
==
|
|
<?php
|
|
function onStart() {
|
|
$currentDate = Carbon\Carbon::now();
|
|
$this["currentYear"] = $currentDate->year;
|
|
|
|
$productionId = $this->param("id");
|
|
|
|
$this["production"] = Romanah\Gokbakja\Models\ProductionMachine::where('id', $productionId)->with(['bag_type', 'bag_size', 'machine.building', 'employee', 'mechanic'])->first();
|
|
|
|
|
|
$productionD = $this["production"]->created_at->format('d');
|
|
$productionM = $this["production"]->created_at->format('m');
|
|
$productionY = $this["production"]->created_at->format('Y');
|
|
|
|
$this["productionM"] = $this["production"]->created_at->format('m');
|
|
|
|
$this["machineProductions"] = Romanah\Gokbakja\Models\ProductionMachine::whereDay('created_at', $productionD)->whereMonth('created_at', $productionM)->whereYear('created_at', $productionY)->with(['bag_type', 'bag_size', 'machine.building', 'employee', 'mechanic'])->get();
|
|
|
|
$this["month_all_amount"] = Romanah\Gokbakja\Models\ProductionMachine::whereDay('created_at', $productionD)
|
|
->whereMonth('created_at', $productionM)
|
|
->whereYear('created_at', $productionY)
|
|
->sum('produced_weight');
|
|
|
|
}
|
|
?>
|
|
==
|
|
{% put styles %}
|
|
<link href="{{'assets/libs/datatables.net-bs4/css/dataTables.bootstrap4.min.css'|theme}}" rel="stylesheet"
|
|
type="text/css" />
|
|
<link href="{{'assets/libs/datatables.net-buttons-bs4/css/buttons.bootstrap4.min.css'|theme}}" rel="stylesheet"
|
|
type="text/css" />
|
|
<link href="{{'assets/libs/datatables.net-select-bs4/css/select.bootstrap4.min.css'|theme}}" rel="stylesheet"
|
|
type="text/css" />
|
|
{% endput %}
|
|
|
|
<div class="container-fluid">
|
|
|
|
<!-- end row -->
|
|
<div class="row">
|
|
<div class="col-md-12">
|
|
<div class="card">
|
|
<div class="card-body">
|
|
<div class="row">
|
|
<div class="col-md-6">
|
|
<h3 class="card-title" style="font-size: 22px;color: #1e2038;">Enjamlar boýunça
|
|
({{production.created_at|date('d.m.Y')}})</h3>
|
|
<p class="card-title-desc" style="color: #6c6ff5;">Hasabat</p>
|
|
</div>
|
|
<!-- <div class="col-md-6" style="text-align: right;">
|
|
<button type="button" class="btn btn-primary waves-effect waves-light"
|
|
data-bs-toggle="offcanvas" data-bs-target="#offcanvasBottom"
|
|
aria-controls="offcanvasBottom">
|
|
<i class="ri-add-line align-middle ms-2" style="font-size: 17px;"></i> Добавить
|
|
</button>
|
|
</div> -->
|
|
</div>
|
|
|
|
|
|
<table id="datatable-buttons" class="table table-striped table-bordered dt-responsive nowrap"
|
|
style="border-collapse: collapse; border-spacing: 0; width: 100%;">
|
|
<thead>
|
|
<tr>
|
|
<th style="width: 5%;">№</th>
|
|
<th>Bina No</th>
|
|
<th>Enjam No</th>
|
|
<th>Ölçegi</th>
|
|
<th>Görnüşi</th>
|
|
<th>Önen Önüm (kg)</th>
|
|
<th>Ady Familiýasy</th>
|
|
<th>Mehanik</th>
|
|
<th>Bellik</th>
|
|
<!-- <th>Настройки</th> -->
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
|
|
{% for key, machine in machineProductions %}
|
|
<tr>
|
|
<td style="font-weight: bold;">{{key + 1}}</td>
|
|
<td><a href="#" style="font-weight: bold;">{{machine.building_name}}</a></td>
|
|
<td>{{machine.machine.name}}</td>
|
|
<td>{{machine.bag_size.name}}</td>
|
|
<td>{{machine.bag_type.name}}</td>
|
|
<td><span class="badge badge-soft-success"
|
|
style="font-size: 14px;">{{machine.produced_weight|number_format}} kg</span></td>
|
|
<td>{{machine.employee_name}}</td>
|
|
<td>{{machine.mechanic_name}}</td>
|
|
<td>{{machine.note}}</td>
|
|
</tr>
|
|
{% endfor %}
|
|
|
|
<tr>
|
|
<td style="font-weight: bold;width: 5%;">#</td>
|
|
<td style="font-weight: bold;width: 5%;">JEMI</td>
|
|
<td style="font-weight: bold;width: 5%;"></td>
|
|
<td style="font-weight: bold;width: 5%;"></td>
|
|
<td style="font-weight: bold;width: 5%;"></td>
|
|
|
|
<td style="text-align: center;">
|
|
<span class="badge badge-soft-info"
|
|
style="font-size: 14px;">{{month_all_amount|number_format}} kg</span>
|
|
</td>
|
|
<td style="font-weight: bold;width: 5%;"></td>
|
|
<td style="font-weight: bold;width: 5%;"></td>
|
|
|
|
|
|
|
|
<td style="font-weight: bold;color: #0005c5;"></td>
|
|
</tr>
|
|
</tbody>
|
|
<tfoot>
|
|
<tr>
|
|
<th style="width: 5%;">№</th>
|
|
<th>Bina No</th>
|
|
<th>Enjam No</th>
|
|
<th>Ölçegi</th>
|
|
<th>Görnüşi</th>
|
|
<th>Önen Önüm (kg)</th>
|
|
<th>Ady Familiýasy</th>
|
|
<th>Mehanik</th>
|
|
<th>Bellik</th>
|
|
</tr>
|
|
</tfoot>
|
|
</table>
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{% partial 'dataTableJs' %}
|