production
This commit is contained in:
parent
85753154ac
commit
4cfb900e54
|
|
@ -81,22 +81,22 @@ items:
|
|||
items:
|
||||
-
|
||||
title: 'Çig Mal Sarp Ediş'
|
||||
nesting: null
|
||||
type: cms-page
|
||||
url: null
|
||||
code: ''
|
||||
reference: production
|
||||
cmsPage: null
|
||||
replace: null
|
||||
viewBag:
|
||||
isHidden: '0'
|
||||
cssClass: ''
|
||||
isExternal: '0'
|
||||
-
|
||||
title: 'Enjamlar Boýunça'
|
||||
nesting: null
|
||||
type: url
|
||||
url: /ee
|
||||
type: cms-page
|
||||
code: ''
|
||||
reference: null
|
||||
cmsPage: null
|
||||
replace: null
|
||||
reference: machine
|
||||
viewBag:
|
||||
isHidden: '0'
|
||||
cssClass: ''
|
||||
|
|
|
|||
|
|
@ -0,0 +1,181 @@
|
|||
title = "All production by month"
|
||||
url = "/all-production-month/:month/:year?"
|
||||
layout = "platform_main"
|
||||
is_hidden = 0
|
||||
==
|
||||
<?php
|
||||
function onStart() {
|
||||
$currentDate = Carbon\Carbon::now()->timezone('UTC +05:00');
|
||||
$this["month"] = $this->param("month");
|
||||
$year = $this->param("year");
|
||||
|
||||
$this["reportProducts"] = Romanah\Gokbakja\Models\Product::where("report", "simple")->get();
|
||||
|
||||
|
||||
if($year){
|
||||
$this["productions"] = Romanah\Gokbakja\Models\Production::whereMonth('created_at', $this["month"])->whereYear('created_at', $year)->with(['pivot_production'])->get();
|
||||
|
||||
$this["month_all_amount"] = Romanah\Gokbakja\Models\Production::whereMonth('created_at', $this["month"])
|
||||
->whereYear('created_at', $year)
|
||||
->avg('all_amount');
|
||||
}else{
|
||||
$this["productions"] = Romanah\Gokbakja\Models\Production::whereMonth('created_at', $this["month"])->whereYear('created_at', $currentDate->year)->with(['pivot_production'])->get();
|
||||
|
||||
$this["month_all_amount"] = Romanah\Gokbakja\Models\Production::whereMonth('created_at', $this["month"])
|
||||
->whereYear('created_at', $currentDate->year)
|
||||
->avg('all_amount');
|
||||
}
|
||||
}
|
||||
?>
|
||||
==
|
||||
{% 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">
|
||||
|
||||
<!-- start page title -->
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="page-title-box d-flex align-items-center justify-content-between">
|
||||
<h4 class="mb-0">Aýlar Boýunça {{year}}</h4>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end page title -->
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<!-- Left sidebar -->
|
||||
<div class="email-leftbar card">
|
||||
<a href="/production" type="button" class="btn btn-danger waves-effect waves-light">
|
||||
Täze Hasabat
|
||||
</a>
|
||||
<div class="mail-list mt-4">
|
||||
<a href="/all-production-month/1" class="{{ month == 1 ? 'active' : '' }}"><i
|
||||
class="mdi mdi-archive me-2 font-size-16"></i> Ýanwar</a>
|
||||
<a href="/all-production-month/2" class="{{ month == 2 ? 'active' : '' }}"><i
|
||||
class="mdi mdi-archive me-2 font-size-16"></i> Fewral</a>
|
||||
<a href="/all-production-month/3" class="{{ month == 3 ? 'active' : '' }}"><i
|
||||
class="mdi mdi-archive me-2 font-size-16"></i> Mart</a>
|
||||
<a href="/all-production-month/4" class="{{ month == 4 ? 'active' : '' }}"><i
|
||||
class="mdi mdi-archive me-2 font-size-16"></i> Aprel</a>
|
||||
<a href="/all-production-month/5" class="{{ month == 5 ? 'active' : '' }}"><i
|
||||
class="mdi mdi-archive me-2 font-size-16"></i> Maý</a>
|
||||
<a href="/all-production-month/6" class="{{ month == 6 ? 'active' : '' }}"><i
|
||||
class="mdi mdi-archive me-2 font-size-16"></i> Iýun</a>
|
||||
<a href="/all-production-month/7" class="{{ month == 7 ? 'active' : '' }}"><i
|
||||
class="mdi mdi-archive me-2 font-size-16"></i> Iýul</a>
|
||||
<a href="/all-production-month/8" class="{{ month == 8 ? 'active' : '' }}"><i
|
||||
class="mdi mdi-archive me-2 font-size-16"></i> Awgust</a>
|
||||
<a href="/all-production-month/9" class="{{ month == 9 ? 'active' : '' }}"><i
|
||||
class="mdi mdi-archive me-2 font-size-16"></i> Sentýabr</a>
|
||||
<a href="/all-production-month/10" class="{{ month == 10 ? 'active' : '' }}"><i
|
||||
class="mdi mdi-archive me-2 font-size-16"></i> Oktýabr</a>
|
||||
<a href="/all-production-month/11" class="{{ month == 11 ? 'active' : '' }}"><i
|
||||
class="mdi mdi-archive me-2 font-size-16"></i> Noýabr</a>
|
||||
<a href="/all-production-month/12" class="{{ month == 12 ? 'active' : '' }}"><i
|
||||
class="mdi mdi-archive me-2 font-size-16"></i> Dekabr</a>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<!-- End Left sidebar -->
|
||||
|
||||
|
||||
<!-- Right Sidebar -->
|
||||
<div class="email-rightbar mb-3">
|
||||
|
||||
<div class="card">
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="card-body">
|
||||
<table id="datatable-buttons" class="table table-striped table-bordered dt-responsive nowrap"
|
||||
style="border-collapse: collapse; border-spacing: 0; width: 100%;" data-page-length='80'>
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width: 5%;">№</th>
|
||||
<th>Senesi</th>
|
||||
<th>Hemmesi</th>
|
||||
{% for key, record in reportProducts %}
|
||||
<th>{{record.name}}</th>
|
||||
{% endfor %}
|
||||
<th>Bellik</th>
|
||||
<!-- <th>Настройки</th> -->
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
{% for key, report in productions %}
|
||||
<tr>
|
||||
<td style="font-weight: bold;width: 5%;">{{key + 1}}</td>
|
||||
<td><a href="/get-production/{{report.id}}"
|
||||
style="font-weight: bold;color: #0005c5;">{{report.created_at|date('d.m.Y |
|
||||
H:i')}}</a></td>
|
||||
<td style="text-align: center;">
|
||||
<span class="badge badge-soft-success"
|
||||
style="font-size: 14px;">{{report.all_amount|number_format}} kg</span>
|
||||
</td>
|
||||
|
||||
{% for product in report.pivot_production %}
|
||||
<td>{{product.amount_percentage}} % {% if product.amount != 0 %}<br> <span
|
||||
style="font-size: 12px;color: darkgray;"> {{product.amount|number_format}}
|
||||
kg</span> {% endif %}</td>
|
||||
{% endfor %}
|
||||
<td style="font-weight: bold;color: #0005c5;">{{report.note}}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
|
||||
|
||||
<tr>
|
||||
<td style="font-weight: bold;width: 5%;">#</td>
|
||||
<td style="font-weight: bold;width: 5%;">ORTAÇA JEMI</td>
|
||||
|
||||
<td style="text-align: center;">
|
||||
<span class="badge badge-soft-info"
|
||||
style="font-size: 14px;">{{month_all_amount|number_format}} kg</span>
|
||||
</td>
|
||||
|
||||
{% for key, product in reportProducts %}
|
||||
{% partial 'report/product-month-row' prodId=product.id %}
|
||||
{% endfor %}
|
||||
<td style="font-weight: bold;color: #0005c5;"></td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<th style="width: 5%;">№</th>
|
||||
<th>Senesi</th>
|
||||
<th>Hemmesi</th>
|
||||
{% for key, record in reportProducts %}
|
||||
<th>{{record.name}}</th>
|
||||
{% endfor %}
|
||||
<th>Bellik</th>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
</div> <!-- card -->
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!-- End row -->
|
||||
</div>
|
||||
|
||||
|
||||
{% partial 'dataTableJs' %}
|
||||
|
|
@ -1,27 +1,25 @@
|
|||
title = "All Productions"
|
||||
url = "/all-productions"
|
||||
url = "/all-productions/:month/:year?"
|
||||
layout = "platform_main"
|
||||
is_hidden = 0
|
||||
|
||||
[builderList]
|
||||
modelClass = "Romanah\Gokbakja\Models\Production"
|
||||
scope = "scopeGetByGroup"
|
||||
scopeValue = "{{ :scope }}"
|
||||
displayColumn = "id"
|
||||
noRecordsMessage = "No records found"
|
||||
detailsPage = "-"
|
||||
detailsUrlParameter = "id"
|
||||
pageNumber = "{{ :page }}"
|
||||
==
|
||||
{% set productions = builderList.records %}
|
||||
{% set displayColumn = builderList.displayColumn %}
|
||||
{% set noRecordsMessage = builderList.noRecordsMessage %}
|
||||
{% set detailsPage = builderList.detailsPage %}
|
||||
{% set detailsKeyColumn = builderList.detailsKeyColumn %}
|
||||
{% set detailsUrlParameter = builderList.detailsUrlParameter %}
|
||||
<?php
|
||||
function onStart() {
|
||||
$currentDate = Carbon\Carbon::now()->timezone('UTC +05:00');
|
||||
$this["month"] = $this->param("month");
|
||||
$year = $this->param("year");
|
||||
|
||||
$this["productions"] = Romanah\Gokbakja\Models\Production::whereMonth('created_at', $this["month"])->groupBy(DB::raw("DAY(created_at)"))->withCount(['pivot_production'])->get();
|
||||
|
||||
if($year){
|
||||
$this["productions"] = Romanah\Gokbakja\Models\Production::whereMonth('created_at', $this["month"])->whereYear('created_at', $year)->groupBy(DB::raw("DAY(created_at)"))->with(['pivot_production'])->get();
|
||||
}else{
|
||||
$this["productions"] = Romanah\Gokbakja\Models\Production::whereMonth('created_at', $this["month"])->whereYear('created_at', $currentDate->year)->groupBy(DB::raw("DAY(created_at)"))->with(['pivot_production'])->get();
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
==
|
||||
{% put styles %}
|
||||
<link href="{{'assets/libs/datatables.net-bs4/css/dataTables.bootstrap4.min.css'|theme}}" rel="stylesheet"
|
||||
type="text/css" />
|
||||
|
|
@ -32,134 +30,120 @@ pageNumber = "{{ :page }}"
|
|||
{% endput %}
|
||||
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<!-- <div class="col-lg-4">
|
||||
<div class="card bg-primary text-white-50">
|
||||
<div class="card-body">
|
||||
<h5 class="mb-4 text-white"><i class="mdi mdi-bullseye-arrow me-3"></i> Primary Card</h5>
|
||||
<p class="card-text">Some quick example text to build on the card title and make up the bulk of the
|
||||
card's content.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-4">
|
||||
<div class="card bg-primary text-white-50">
|
||||
<div class="card-body">
|
||||
<h5 class="mb-4 text-white"><i class="mdi mdi-bullseye-arrow me-3"></i> Primary Card</h5>
|
||||
<p class="card-text">Some quick example text to build on the card title and make up the bulk of the
|
||||
card's content.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-4">
|
||||
<div class="card bg-primary text-white-50">
|
||||
<div class="card-body">
|
||||
<h5 class="mb-4 text-white"><i class="mdi mdi-bullseye-arrow me-3"></i> Primary Card</h5>
|
||||
<p class="card-text">Some quick example text to build on the card title and make up the bulk of the
|
||||
card's content.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
<!-- start page title -->
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="page-title-box d-flex align-items-center justify-content-between">
|
||||
<h4 class="mb-0">Aýlar Boýunça {{year}}</h4>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end row -->
|
||||
<!-- end page title -->
|
||||
|
||||
<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;">Çig Mallar Boýunça Ähli</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>Senesi</th>
|
||||
<th>Mukdary</th>
|
||||
<th>Bellik</th>
|
||||
<!-- <th>Настройки</th> -->
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<div class="col-12">
|
||||
<!-- Left sidebar -->
|
||||
<div class="email-leftbar card">
|
||||
<a href="/production" type="button" class="btn btn-danger waves-effect waves-light">
|
||||
Täze Hasabat
|
||||
</a>
|
||||
<div class="mail-list mt-4">
|
||||
<a href="/all-productions/1" class="{{ month == 1 ? 'active' : '' }}"><i
|
||||
class="mdi mdi-archive me-2 font-size-16"></i> Ýanwar</a>
|
||||
<a href="/all-productions/2" class="{{ month == 2 ? 'active' : '' }}"><i
|
||||
class="mdi mdi-archive me-2 font-size-16"></i> Fewral</a>
|
||||
<a href="/all-productions/3" class="{{ month == 3 ? 'active' : '' }}"><i
|
||||
class="mdi mdi-archive me-2 font-size-16"></i> Mart</a>
|
||||
<a href="/all-productions/4" class="{{ month == 4 ? 'active' : '' }}"><i
|
||||
class="mdi mdi-archive me-2 font-size-16"></i> Aprel</a>
|
||||
<a href="/all-productions/5" class="{{ month == 5 ? 'active' : '' }}"><i
|
||||
class="mdi mdi-archive me-2 font-size-16"></i> Maý</a>
|
||||
<a href="/all-productions/6" class="{{ month == 6 ? 'active' : '' }}"><i
|
||||
class="mdi mdi-archive me-2 font-size-16"></i> Iýun</a>
|
||||
<a href="/all-productions/7" class="{{ month == 7 ? 'active' : '' }}"><i
|
||||
class="mdi mdi-archive me-2 font-size-16"></i> Iýul</a>
|
||||
<a href="/all-productions/8" class="{{ month == 8 ? 'active' : '' }}"><i
|
||||
class="mdi mdi-archive me-2 font-size-16"></i> Awgust</a>
|
||||
<a href="/all-productions/9" class="{{ month == 9 ? 'active' : '' }}"><i
|
||||
class="mdi mdi-archive me-2 font-size-16"></i> Sentýabr</a>
|
||||
<a href="/all-productions/10" class="{{ month == 10 ? 'active' : '' }}"><i
|
||||
class="mdi mdi-archive me-2 font-size-16"></i> Oktýabr</a>
|
||||
<a href="/all-productions/11" class="{{ month == 11 ? 'active' : '' }}"><i
|
||||
class="mdi mdi-archive me-2 font-size-16"></i> Noýabr</a>
|
||||
<a href="/all-productions/12" class="{{ month == 12 ? 'active' : '' }}"><i
|
||||
class="mdi mdi-archive me-2 font-size-16"></i> Dekabr</a>
|
||||
|
||||
{% for key, report in productions %}
|
||||
<tr>
|
||||
<td style="font-weight: bold;width: 5%;">{{key + 1}}</td>
|
||||
<td><a href="#" style="font-weight: bold;color: #0005c5;">{{report.created_at|date("d.m.Y | H:i")}}</a></td>
|
||||
<td>{{report.all_amount|number_format}}</td>
|
||||
<td>{{report.note}}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<th style="width: 5%;">№</th>
|
||||
<th>Senesi</th>
|
||||
<th>Mukdary</th>
|
||||
<th>Bellik</th>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="offcanvas offcanvas-top" tabindex="-1" id="offcanvasBottom"
|
||||
aria-labelledby="offcanvasBottomLabel">
|
||||
<div class="offcanvas-header">
|
||||
<h5 id="offcanvasBottomLabel">Добавить Склад</h5>
|
||||
<button type="button" class="btn-close text-reset" data-bs-dismiss="offcanvas"
|
||||
aria-label="Close"></button>
|
||||
</div>
|
||||
<div class="offcanvas-body">
|
||||
<form class="needs-validation" novalidate action="/stocks/create" method="POST">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="mb-3">
|
||||
<label for="validationCustom01" class="form-label">Имя Склад</label>
|
||||
<input type="text" class="form-control" id="validationCustom01"
|
||||
placeholder="Имя Склад" name="name" required>
|
||||
<div class="valid-feedback">
|
||||
Правильно
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="mb-3">
|
||||
<label for="validationCustom02" class="form-label">Описание</label>
|
||||
<input type="text" class="form-control" name="desc" id="validationCustom02"
|
||||
placeholder="Описание" required>
|
||||
<div class="valid-feedback">
|
||||
Правильно
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<button class="btn btn-primary" type="submit">Добавить</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<!-- End Left sidebar -->
|
||||
|
||||
|
||||
<!-- Right Sidebar -->
|
||||
<div class="email-rightbar mb-3">
|
||||
|
||||
<div class="card">
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="card-body">
|
||||
<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>Senesi</th>
|
||||
<th>Hemmesi</th>
|
||||
<th>Çig Mal Sany</th>
|
||||
<th>Bellik</th>
|
||||
<!-- <th>Настройки</th> -->
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
{% for key, report in productions %}
|
||||
<tr>
|
||||
<td style="font-weight: bold;width: 5%;">{{key + 1}}</td>
|
||||
<td><a href="/get-production/{{report.id}}"
|
||||
style="font-weight: bold;color: #0005c5;">{{report.created_at|date('d.m.Y |
|
||||
H:i')}}</a></td>
|
||||
<td style="text-align: center;">
|
||||
<span class="badge badge-soft-success"
|
||||
style="font-size: 14px;">{{report.all_amount|number_format}} kg</span>
|
||||
</td>
|
||||
|
||||
<td>{{report.pivot_production_count}}</td>
|
||||
<td style="font-weight: bold;color: #0005c5;">{{report.note}}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<th style="width: 5%;">№</th>
|
||||
<th>Senesi</th>
|
||||
<th>Hemmesi</th>
|
||||
<th>Çig Mal Sany</th>
|
||||
<th>Bellik</th>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
</div> <!-- card -->
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- End row -->
|
||||
</div>
|
||||
|
||||
|
||||
{% partial 'dataTableJs' %}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,141 @@
|
|||
title = "Get Production"
|
||||
url = "/get-production/:id"
|
||||
layout = "platform_main"
|
||||
is_hidden = 0
|
||||
==
|
||||
<?php
|
||||
function onStart() {
|
||||
|
||||
$productionId = $this->param("id");
|
||||
|
||||
$this["production"] = Romanah\Gokbakja\Models\Production::where('id', $productionId)->with('pivot_production')->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["productions"] = Romanah\Gokbakja\Models\Production::whereDay('created_at', $productionD)->whereMonth('created_at', $productionM)->whereYear('created_at', $productionY)->with('pivot_production')->get();
|
||||
|
||||
}
|
||||
?>
|
||||
==
|
||||
{% 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">
|
||||
<div class="row">
|
||||
<div class="col-lg-6">
|
||||
<a href="/all-productions/{{productionM}}" class="card bg-primary text-white-50">
|
||||
<div class="card-body">
|
||||
<h5 class="mb-4 text-white"><i class="mdi mdi-bullseye-arrow me-3"></i> HEMMESI</h5>
|
||||
<p class="card-text">Bu bölümde hasabatyň aýlar boýunça ählisini görüp bilersiňiz.</p>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-lg-6">
|
||||
<a href="/report-production/{{currentYear}}" class="card bg-primary text-white-50">
|
||||
<div class="card-body">
|
||||
<h5 class="mb-4 text-white"><i class="mdi mdi-bullseye-arrow me-3"></i> ORTAÇA ÖNÜMÇILIK</h5>
|
||||
<p class="card-text">Bu bölümde ortaça önümçilik boýunça hasabat.</p>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
<!-- <div class="col-lg-4">
|
||||
<div class="card bg-primary text-white-50">
|
||||
<div class="card-body">
|
||||
<h5 class="mb-4 text-white"><i class="mdi mdi-bullseye-arrow me-3"></i> Primary Card</h5>
|
||||
<p class="card-text">Some quick example text to build on the card title and make up the bulk of the
|
||||
card's content.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
</div>
|
||||
<!-- 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;">Çig Mallar Boýunça
|
||||
({{production.created_at|date('d.m.Y | H:i')}})</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>Senesi</th>
|
||||
<th>Hemmesi</th>
|
||||
{% for key, record in production.pivot_production %}
|
||||
<th>{{record.product_name}}</th>
|
||||
{% endfor %}
|
||||
<th>Bellik</th>
|
||||
<!-- <th>Настройки</th> -->
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
{% for key, report in productions %}
|
||||
<tr>
|
||||
<td style="font-weight: bold;width: 5%;">{{key + 1}}</td>
|
||||
<td><a href="#" style="font-weight: bold;color: #0005c5;">{{report.created_at|date('d.m.Y |
|
||||
H:i')}}</a></td>
|
||||
<td style="text-align: center;">
|
||||
<span class="badge badge-soft-success"
|
||||
style="font-size: 14px;">{{report.all_amount|number_format}} kg</span>
|
||||
</td>
|
||||
|
||||
{% for product in report.pivot_production %}
|
||||
<td>{{product.amount_percentage}} % {% if product.amount != 0 %}<br> <span style="font-size: 12px;color: darkgray;"> {{product.amount|number_format}} kg</span> {% endif %}</td>
|
||||
{% endfor %}
|
||||
|
||||
<td style="font-weight: bold;color: #0005c5;">{{report.note}}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<th style="width: 5%;">№</th>
|
||||
<th>Senesi</th>
|
||||
<th>Hemmesi</th>
|
||||
{% for key, record in production.pivot_production %}
|
||||
<th>{{record.product_name}}</th>
|
||||
{% endfor %}
|
||||
<th>Bellik</th>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
{% partial 'dataTableJs' %}
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
title = "machine"
|
||||
url = "/machine"
|
||||
layout = "platform_main"
|
||||
is_hidden = 0
|
||||
==
|
||||
|
|
@ -23,6 +23,9 @@ function onStart(){
|
|||
$currentDateFormat = Carbon\Carbon::now()->format('Y-m-d');
|
||||
|
||||
$this["currentDate"] = $currentDate;
|
||||
$this["currentMonth"] = $currentDate->format('m');
|
||||
$this["currentYear"] = $currentDate->format('Y');
|
||||
|
||||
$this["productions"] = Romanah\Gokbakja\Models\Production::whereDate('created_at', date($currentDateFormat))->with(['pivot_production'])->get();
|
||||
|
||||
}
|
||||
|
|
@ -50,7 +53,7 @@ function onStart(){
|
|||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-lg-6">
|
||||
<a href="/all-productions" class="card bg-primary text-white-50">
|
||||
<a href="/all-productions/{{currentMonth}}" class="card bg-primary text-white-50">
|
||||
<div class="card-body">
|
||||
<h5 class="mb-4 text-white"><i class="mdi mdi-bullseye-arrow me-3"></i> HEMMESI</h5>
|
||||
<p class="card-text">Bu bölümde hasabatyň aýlar boýunça ählisini görüp bilersiňiz.</p>
|
||||
|
|
@ -58,12 +61,12 @@ function onStart(){
|
|||
</a>
|
||||
</div>
|
||||
<div class="col-lg-6">
|
||||
<div class="card bg-primary text-white-50">
|
||||
<a href="/report-production/{{currentYear}}" class="card bg-primary text-white-50">
|
||||
<div class="card-body">
|
||||
<h5 class="mb-4 text-white"><i class="mdi mdi-bullseye-arrow me-3"></i> ORTAÇA ÖNÜMÇILIK</h5>
|
||||
<p class="card-text">Bu bölümde ortaça önümçilik boýunça hasabat.</p>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
<!-- <div class="col-lg-4">
|
||||
<div class="card bg-primary text-white-50">
|
||||
|
|
@ -181,46 +184,6 @@ function onStart(){
|
|||
|
||||
|
||||
|
||||
<div class="offcanvas offcanvas-top" tabindex="-1" id="offcanvasBottom"
|
||||
aria-labelledby="offcanvasBottomLabel">
|
||||
<div class="offcanvas-header">
|
||||
<h5 id="offcanvasBottomLabel">Добавить Склад</h5>
|
||||
<button type="button" class="btn-close text-reset" data-bs-dismiss="offcanvas"
|
||||
aria-label="Close"></button>
|
||||
</div>
|
||||
<div class="offcanvas-body">
|
||||
<form class="needs-validation" novalidate action="/stocks/create" method="POST">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="mb-3">
|
||||
<label for="validationCustom01" class="form-label">Имя Склад</label>
|
||||
<input type="text" class="form-control" id="validationCustom01"
|
||||
placeholder="Имя Склад" name="name" required>
|
||||
<div class="valid-feedback">
|
||||
Правильно
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="mb-3">
|
||||
<label for="validationCustom02" class="form-label">Описание</label>
|
||||
<input type="text" class="form-control" name="desc" id="validationCustom02"
|
||||
placeholder="Описание" required>
|
||||
<div class="valid-feedback">
|
||||
Правильно
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<button class="btn btn-primary" type="submit">Добавить</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,98 @@
|
|||
title = "Report Production"
|
||||
url = "/report-production/:year?"
|
||||
layout = "platform_main"
|
||||
is_hidden = 0
|
||||
==
|
||||
function onStart(){
|
||||
$this["year"] = $this->param("year");
|
||||
|
||||
$this["productions"] = Romanah\Gokbakja\Models\Production::with(['pivot_production'])->get();
|
||||
|
||||
$this["reportProducts"] = Romanah\Gokbakja\Models\Product::where("report", "simple")->get();
|
||||
}
|
||||
==
|
||||
{% 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">
|
||||
<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;">Çig Mallar Boýunça Umumy ({{year}} ýyl)</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%;" data-page-length='13'>
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width: 5%;">№</th>
|
||||
<th>Aýlar</th>
|
||||
<th>Ortaça Işlenen</th>
|
||||
{% for key, record in reportProducts %}
|
||||
<th>{{record.name}}</th>
|
||||
{% endfor %}
|
||||
<th>Bellik</th>
|
||||
<!-- <th>Настройки</th> -->
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
|
||||
{% partial 'report/row' products=reportProducts title="Ýanwar" no=1 %}
|
||||
{% partial 'report/row' products=reportProducts title="Fewral" no=2 %}
|
||||
{% partial 'report/row' products=reportProducts title="Mart" no=3 %}
|
||||
{% partial 'report/row' products=reportProducts title="Aprel" no=4 %}
|
||||
{% partial 'report/row' products=reportProducts title="Maý" no=5 %}
|
||||
{% partial 'report/row' products=reportProducts title="Iýun" no=6 %}
|
||||
{% partial 'report/row' products=reportProducts title="Iýul" no=7 %}
|
||||
{% partial 'report/row' products=reportProducts title="Awgust" no=8 %}
|
||||
{% partial 'report/row' products=reportProducts title="Sentýabr" no=9 %}
|
||||
{% partial 'report/row' products=reportProducts title="Oktýabr" no=10 %}
|
||||
{% partial 'report/row' products=reportProducts title="Noýabr" no=11 %}
|
||||
{% partial 'report/row' products=reportProducts title="Dekabr" no=12 %}
|
||||
|
||||
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<th style="width: 5%;">№</th>
|
||||
<th>Senesi</th>
|
||||
<th>Hemmesi</th>
|
||||
{% for key, record in reportProducts %}
|
||||
<th>{{record.name}}</th>
|
||||
{% endfor %}
|
||||
<th>Bellik</th>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
{% partial 'dataTableJs' %}
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
[viewBag]
|
||||
==
|
||||
<?php
|
||||
function onStart (){
|
||||
$no = $this->no;
|
||||
$year = $this->year;
|
||||
$prodId = $this->prodId;
|
||||
|
||||
$this["amount"] = Romanah\Gokbakja\Models\PivotProduction::where('product_id', $prodId)
|
||||
->whereMonth('created_at', $no)
|
||||
->whereYear('created_at', $year)
|
||||
->where('deleted_at', null)
|
||||
->avg('amount');
|
||||
|
||||
}
|
||||
?>
|
||||
==
|
||||
<td style="text-align: center;">
|
||||
{{amount|number_format}} kg
|
||||
</td>
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
[viewBag]
|
||||
==
|
||||
<?php
|
||||
function onStart (){
|
||||
$year = $this->param("year");
|
||||
$prodId = $this->prodId;
|
||||
$currentDate = Carbon\Carbon::now()->timezone('UTC +05:00');
|
||||
|
||||
if($year){
|
||||
|
||||
$this["amount"] = Romanah\Gokbakja\Models\PivotProduction::where('product_id', $prodId)
|
||||
->whereMonth('created_at', $this["month"])
|
||||
->whereYear('created_at', $year)
|
||||
->where('deleted_at', null)
|
||||
->avg('amount');
|
||||
}else{
|
||||
|
||||
$this["amount"] = Romanah\Gokbakja\Models\PivotProduction::where('product_id', $prodId)
|
||||
->whereMonth('created_at', $this["month"])
|
||||
->whereYear('created_at', $currentDate->year)
|
||||
->where('deleted_at', null)
|
||||
->avg('amount');
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
==
|
||||
<td style="text-align: center;">
|
||||
<span class="badge badge-soft-info"
|
||||
style="font-size: 14px;">{{amount|number_format}} kg</span>
|
||||
</td>
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
[viewBag]
|
||||
==
|
||||
<?php
|
||||
function onStart (){
|
||||
$no = $this->no;
|
||||
$year = $this->year;
|
||||
|
||||
$this["all_amount"] = Romanah\Gokbakja\Models\Production::whereMonth('created_at', $no)
|
||||
->whereYear('created_at', $year)
|
||||
->avg('all_amount');
|
||||
|
||||
}
|
||||
?>
|
||||
==
|
||||
|
||||
<tr>
|
||||
<td style="font-weight: bold;width: 5%;">{{no}}</td>
|
||||
<td><a href="/all-production-month/{{no}}" style="font-weight: bold;color: #0005c5;"> {{title}} </a></td>
|
||||
<td><a href="/all-production-month/{{no}}" style="font-weight: bold;"> {{all_amount|number_format}} kg</a></td>
|
||||
{% for key, record in products %}
|
||||
{% partial "report/month-row" prodId=record.id %}
|
||||
{% endfor %}
|
||||
<td style="font-weight: bold;color: #0005c5;">{{hours}}</td>
|
||||
</tr>
|
||||
Loading…
Reference in New Issue