report settings
This commit is contained in:
parent
9cb772e045
commit
e9205b2522
|
|
@ -5,6 +5,7 @@ namespace Romanah\Gokbakja\Components;
|
|||
use Cms\Classes\ComponentBase;
|
||||
use Romanah\Gokbakja\Models\Product as ProductModel;
|
||||
use Romanah\Gokbakja\Models\Production as ProductionModel;
|
||||
use Romanah\Gokbakja\Models\ProductionMachine as ProductionMachineModel;
|
||||
use Romanah\Gokbakja\Models\PivotProduction as PivotProductionModel;
|
||||
use Redirect;
|
||||
use Flash;
|
||||
|
|
@ -21,6 +22,41 @@ class Production extends ComponentBase
|
|||
];
|
||||
}
|
||||
|
||||
public function onCreateMachineProduction()
|
||||
{
|
||||
$user = \Auth::user();
|
||||
|
||||
$data = post();
|
||||
|
||||
$createProductionMachine = new ProductionMachineModel();
|
||||
|
||||
$createProductionMachine->type_id = $data["type_id"];
|
||||
$createProductionMachine->size_id = $data["size_id"];
|
||||
$createProductionMachine->machine_id = $data["machine_id"];
|
||||
$createProductionMachine->produced_weight = $data["produced_weight"];
|
||||
$createProductionMachine->note = $data["note"];
|
||||
$createProductionMachine->user_id = $user->id;
|
||||
$createProductionMachine->save();
|
||||
|
||||
$productionMachine = ProductionMachineModel::where('id', $createProductionMachine->id)->with(['machine.employee', 'machine.mechanic', 'machine.building'])->first();
|
||||
// dd($productionMachine->machine->name);
|
||||
if($productionMachine){
|
||||
$updateResult = ProductionMachineModel::where('id', $productionMachine->id)
|
||||
->update(array(
|
||||
'employee_id' => $productionMachine->machine->employee->id,
|
||||
'mechanic_id' => $productionMachine->machine->mechanic->id,
|
||||
'employee_name' => $productionMachine->machine->employee->name,
|
||||
'mechanic_name' => $productionMachine->machine->mechanic->name,
|
||||
'building_name' => $productionMachine->machine->building->name,
|
||||
));
|
||||
}
|
||||
|
||||
if ($createProductionMachine && $updateResult) {
|
||||
Flash::success("Hasabat Ustunlikli Goşuldy");
|
||||
return Redirect::refresh();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public function onCreateProduction()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -0,0 +1,23 @@
|
|||
<?php namespace Romanah\Gokbakja\Updates;
|
||||
|
||||
use Schema;
|
||||
use October\Rain\Database\Updates\Migration;
|
||||
|
||||
class BuilderTableUpdateRomanahGokbakjaProductionMachine2 extends Migration
|
||||
{
|
||||
public function up()
|
||||
{
|
||||
Schema::table('romanah_gokbakja_production_machine', function($table)
|
||||
{
|
||||
$table->integer('user_id')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
Schema::table('romanah_gokbakja_production_machine', function($table)
|
||||
{
|
||||
$table->dropColumn('user_id');
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
<?php namespace Romanah\Gokbakja\Updates;
|
||||
|
||||
use Schema;
|
||||
use October\Rain\Database\Updates\Migration;
|
||||
|
||||
class BuilderTableUpdateRomanahGokbakjaProductionMachine3 extends Migration
|
||||
{
|
||||
public function up()
|
||||
{
|
||||
Schema::table('romanah_gokbakja_production_machine', function($table)
|
||||
{
|
||||
$table->integer('type_id')->nullable()->change();
|
||||
$table->integer('size_id')->nullable()->change();
|
||||
$table->integer('machine_id')->nullable()->change();
|
||||
$table->integer('employee_id')->nullable()->change();
|
||||
$table->integer('mechanic_id')->nullable()->change();
|
||||
});
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
Schema::table('romanah_gokbakja_production_machine', function($table)
|
||||
{
|
||||
$table->integer('type_id')->nullable(false)->change();
|
||||
$table->integer('size_id')->nullable(false)->change();
|
||||
$table->integer('machine_id')->nullable(false)->change();
|
||||
$table->integer('employee_id')->nullable(false)->change();
|
||||
$table->integer('mechanic_id')->nullable(false)->change();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
<?php namespace Romanah\Gokbakja\Updates;
|
||||
|
||||
use Schema;
|
||||
use October\Rain\Database\Updates\Migration;
|
||||
|
||||
class BuilderTableUpdateRomanahGokbakjaProductionMachine4 extends Migration
|
||||
{
|
||||
public function up()
|
||||
{
|
||||
Schema::table('romanah_gokbakja_production_machine', function($table)
|
||||
{
|
||||
$table->string('building_name')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
Schema::table('romanah_gokbakja_production_machine', function($table)
|
||||
{
|
||||
$table->dropColumn('building_name');
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
@ -102,3 +102,12 @@
|
|||
1.0.35:
|
||||
- 'Updated table romanah_gokbakja_pivot_production'
|
||||
- builder_table_update_romanah_gokbakja_pivot_production_4.php
|
||||
1.0.36:
|
||||
- 'Updated table romanah_gokbakja_production_machine'
|
||||
- builder_table_update_romanah_gokbakja_production_machine_2.php
|
||||
1.0.37:
|
||||
- 'Updated table romanah_gokbakja_production_machine'
|
||||
- builder_table_update_romanah_gokbakja_production_machine_3.php
|
||||
1.0.38:
|
||||
- 'Updated table romanah_gokbakja_production_machine'
|
||||
- builder_table_update_romanah_gokbakja_production_machine_4.php
|
||||
|
|
|
|||
|
|
@ -67,9 +67,13 @@ items:
|
|||
isExternal: '0'
|
||||
-
|
||||
title: 'Çig mallar boýunça'
|
||||
nesting: null
|
||||
type: url
|
||||
url: /w
|
||||
code: ''
|
||||
reference: null
|
||||
cmsPage: null
|
||||
replace: null
|
||||
viewBag:
|
||||
isHidden: '0'
|
||||
cssClass: ri-stack-line
|
||||
|
|
@ -77,9 +81,13 @@ items:
|
|||
items:
|
||||
-
|
||||
title: 'Täze Hasabat'
|
||||
nesting: null
|
||||
type: cms-page
|
||||
url: null
|
||||
code: ''
|
||||
reference: production
|
||||
cmsPage: null
|
||||
replace: null
|
||||
viewBag:
|
||||
isHidden: '0'
|
||||
cssClass: ''
|
||||
|
|
@ -88,13 +96,13 @@ items:
|
|||
title: 'Aýlar Boýunça'
|
||||
type: cms-page
|
||||
code: ''
|
||||
reference: all-production-month
|
||||
reference: all-productions
|
||||
viewBag:
|
||||
isHidden: '0'
|
||||
cssClass: ''
|
||||
isExternal: '0'
|
||||
-
|
||||
title: 'Ortaça Hasaplama'
|
||||
title: 'Ýyl Boýunça'
|
||||
type: cms-page
|
||||
code: ''
|
||||
reference: report-production
|
||||
|
|
@ -104,9 +112,13 @@ items:
|
|||
isExternal: '0'
|
||||
-
|
||||
title: 'Enjamlar Boýunça'
|
||||
nesting: null
|
||||
type: url
|
||||
url: /ee
|
||||
code: ''
|
||||
reference: null
|
||||
cmsPage: null
|
||||
replace: null
|
||||
viewBag:
|
||||
isHidden: '0'
|
||||
cssClass: 'ri-bar-chart-2-line '
|
||||
|
|
@ -114,27 +126,53 @@ items:
|
|||
items:
|
||||
-
|
||||
title: 'Täze Hasabat'
|
||||
nesting: null
|
||||
type: cms-page
|
||||
url: null
|
||||
code: ''
|
||||
reference: machine
|
||||
cmsPage: null
|
||||
replace: null
|
||||
viewBag:
|
||||
isHidden: '0'
|
||||
cssClass: ''
|
||||
isExternal: '0'
|
||||
-
|
||||
title: 'Aylar boyunca'
|
||||
type: url
|
||||
url: /sss
|
||||
title: 'Aýlar boýunca'
|
||||
type: cms-page
|
||||
code: ''
|
||||
reference: all-production-machine-month
|
||||
viewBag:
|
||||
isHidden: '0'
|
||||
cssClass: ''
|
||||
isExternal: '0'
|
||||
-
|
||||
title: 'Ýyl Boýunça'
|
||||
type: cms-page
|
||||
code: ''
|
||||
reference: report-production-machine
|
||||
viewBag:
|
||||
isHidden: '0'
|
||||
cssClass: ''
|
||||
isExternal: '0'
|
||||
-
|
||||
title: 'Mehanikler boýunça'
|
||||
type: cms-page
|
||||
code: ''
|
||||
reference: machine-production-mechanic
|
||||
viewBag:
|
||||
isHidden: '0'
|
||||
cssClass: ''
|
||||
isExternal: '0'
|
||||
-
|
||||
title: Tikinçiler
|
||||
nesting: null
|
||||
type: url
|
||||
url: /tt
|
||||
code: ''
|
||||
reference: null
|
||||
cmsPage: null
|
||||
replace: null
|
||||
viewBag:
|
||||
isHidden: '0'
|
||||
cssClass: 'ri-surround-sound-line '
|
||||
|
|
@ -142,9 +180,13 @@ items:
|
|||
items:
|
||||
-
|
||||
title: 'Taze hasabat'
|
||||
nesting: null
|
||||
type: url
|
||||
url: /s
|
||||
code: ''
|
||||
reference: null
|
||||
cmsPage: null
|
||||
replace: null
|
||||
viewBag:
|
||||
isHidden: '0'
|
||||
cssClass: ''
|
||||
|
|
|
|||
|
|
@ -0,0 +1,151 @@
|
|||
title = "All production machine by month group"
|
||||
url = "/all-production-machine-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");
|
||||
|
||||
|
||||
if($this["month"] == 'default'){
|
||||
$this["month"] = $currentDate->month;
|
||||
}
|
||||
|
||||
if($year){
|
||||
$this["machineProductions"] = Romanah\Gokbakja\Models\ProductionMachine::whereMonth('created_at', $this["month"])->whereYear('created_at', $year)->groupBy(DB::raw("DAY(created_at)"))->get();
|
||||
|
||||
$this["month_all_amount"] = Romanah\Gokbakja\Models\ProductionMachine::whereMonth('created_at', $this["month"])
|
||||
->whereYear('created_at', $year)
|
||||
->sum('produced_weight');
|
||||
}else{
|
||||
$this["machineProductions"] = Romanah\Gokbakja\Models\ProductionMachine::whereMonth('created_at', $this["month"])->whereYear('created_at', $currentDate->year)->groupBy(DB::raw("DAY(created_at)"))->addSelect(DB::raw("*, SUM(produced_weight) as produced_weight"))->get();
|
||||
|
||||
$this["month_all_amount"] = Romanah\Gokbakja\Models\ProductionMachine::whereMonth('created_at', $this["month"])
|
||||
->whereYear('created_at', $currentDate->year)
|
||||
->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">
|
||||
|
||||
<!-- 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="/machine" type="button" class="btn btn-danger waves-effect waves-light">
|
||||
Täze Hasabat
|
||||
</a>
|
||||
<div class="mail-list mt-4">
|
||||
<a href="/all-production-machine-month/1" class="{{ month == 1 ? 'active' : '' }}"><i
|
||||
class="mdi mdi-archive me-2 font-size-16"></i> Ýanwar</a>
|
||||
<a href="/all-production-machine-month/2" class="{{ month == 2 ? 'active' : '' }}"><i
|
||||
class="mdi mdi-archive me-2 font-size-16"></i> Fewral</a>
|
||||
<a href="/all-production-machine-month/3" class="{{ month == 3 ? 'active' : '' }}"><i
|
||||
class="mdi mdi-archive me-2 font-size-16"></i> Mart</a>
|
||||
<a href="/all-production-machine-month/4" class="{{ month == 4 ? 'active' : '' }}"><i
|
||||
class="mdi mdi-archive me-2 font-size-16"></i> Aprel</a>
|
||||
<a href="/all-production-machine-month/5" class="{{ month == 5 ? 'active' : '' }}"><i
|
||||
class="mdi mdi-archive me-2 font-size-16"></i> Maý</a>
|
||||
<a href="/all-production-machine-month/6" class="{{ month == 6 ? 'active' : '' }}"><i
|
||||
class="mdi mdi-archive me-2 font-size-16"></i> Iýun</a>
|
||||
<a href="/all-production-machine-month/7" class="{{ month == 7 ? 'active' : '' }}"><i
|
||||
class="mdi mdi-archive me-2 font-size-16"></i> Iýul</a>
|
||||
<a href="/all-production-machine-month/8" class="{{ month == 8 ? 'active' : '' }}"><i
|
||||
class="mdi mdi-archive me-2 font-size-16"></i> Awgust</a>
|
||||
<a href="/all-production-machine-month/9" class="{{ month == 9 ? 'active' : '' }}"><i
|
||||
class="mdi mdi-archive me-2 font-size-16"></i> Sentýabr</a>
|
||||
<a href="/all-production-machine-month/10" class="{{ month == 10 ? 'active' : '' }}"><i
|
||||
class="mdi mdi-archive me-2 font-size-16"></i> Oktýabr</a>
|
||||
<a href="/all-production-machine-month/11" class="{{ month == 11 ? 'active' : '' }}"><i
|
||||
class="mdi mdi-archive me-2 font-size-16"></i> Noýabr</a>
|
||||
<a href="/all-production-machine-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>Sene</th>
|
||||
<th>Önen Önüm</th>
|
||||
<!-- <th>Настройки</th> -->
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
{% for key, machine in machineProductions %}
|
||||
<tr>
|
||||
<td style="font-weight: bold;">{{key + 1}}</td>
|
||||
<td><a href="/get-production-machine/{{machine.id}}" style="font-weight: bold;">{{machine.created_at|date("d.m.Y")}}</a></td>
|
||||
|
||||
<td>{{machine.produced_weight|number_format}} kg</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
|
||||
|
||||
|
||||
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<th style="width: 5%;">№</th>
|
||||
<th>Sene</th>
|
||||
<th>Önen Önüm</th>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
</div> <!-- card -->
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!-- End row -->
|
||||
</div>
|
||||
|
||||
|
||||
{% partial 'dataTableJs' %}
|
||||
|
|
@ -6,7 +6,15 @@ is_hidden = 0
|
|||
<?php
|
||||
function onStart() {
|
||||
$currentDate = Carbon\Carbon::now()->timezone('UTC +05:00');
|
||||
|
||||
$this["month"] = $this->param("month");
|
||||
|
||||
if($this["month"] != "default"){
|
||||
$this["month"] = $this->param("month");
|
||||
}else{
|
||||
$this["month"] = $currentDate->format('m');
|
||||
}
|
||||
|
||||
$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();
|
||||
|
|
@ -14,7 +22,7 @@ function onStart() {
|
|||
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();
|
||||
$this["productions"] = Romanah\Gokbakja\Models\Production::whereMonth('created_at', $currentDate->format('m'))->whereYear('created_at', $currentDate->year)->groupBy(DB::raw("DAY(created_at)"))->with(['pivot_production'])->get();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,137 @@
|
|||
title = "Get all machine production by month"
|
||||
url = "/get-all-machine-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");
|
||||
|
||||
if($year){
|
||||
$this["machineProductions"] = Romanah\Gokbakja\Models\ProductionMachine::whereMonth('created_at', $this["month"])->whereYear('created_at', $year)->with(['bag_type', 'bag_size', 'machine.building', 'employee', 'mechanic'])->get();
|
||||
|
||||
$this["month_all_amount"] = Romanah\Gokbakja\Models\ProductionMachine::whereMonth('created_at', $this["month"])
|
||||
->whereYear('created_at', $year)
|
||||
->sum('produced_weight');
|
||||
}else{
|
||||
$this["machineProductions"] = Romanah\Gokbakja\Models\ProductionMachine::whereMonth('created_at', $this["month"])->whereYear('created_at', $currentDate->year)->with(['bag_type', 'bag_size', 'machine.building', 'employee', 'mechanic'])->get();
|
||||
|
||||
$this["month_all_amount"] = Romanah\Gokbakja\Models\ProductionMachine::whereMonth('created_at', $this["month"])
|
||||
->whereYear('created_at', $currentDate->year)
|
||||
->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' %}
|
||||
|
|
@ -0,0 +1,135 @@
|
|||
title = "Get Mechanic"
|
||||
url = "/get-mechanic/:mechanicId/:month"
|
||||
layout = "platform_main"
|
||||
is_hidden = 0
|
||||
==
|
||||
<?php
|
||||
function onStart() {
|
||||
$currentDate = Carbon\Carbon::now()->timezone('UTC +05:00');
|
||||
$this["currentYear"] = $currentDate->year;
|
||||
$this["month"] = $this->param("month");
|
||||
|
||||
|
||||
$mechanicId = $this->param("mechanicId");
|
||||
$month = $this->param("month");
|
||||
|
||||
|
||||
$this["mechanicProductions"] = Romanah\Gokbakja\Models\ProductionMachine::where('mechanic_id', $mechanicId)->whereMonth('created_at', $month)->whereYear('created_at', $this["currentYear"])->with(['bag_type', 'bag_size', 'machine.building', 'employee', 'mechanic'])->get();
|
||||
|
||||
|
||||
$this["month_all_amount"] = Romanah\Gokbakja\Models\ProductionMachine::whereMonth('created_at', $month)
|
||||
->whereYear('created_at', $this["currentYear"])
|
||||
->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
|
||||
({{month}}.{{currentYear}})</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 mechanicProductions %}
|
||||
<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' %}
|
||||
|
|
@ -0,0 +1,140 @@
|
|||
title = "Get production machine"
|
||||
url = "/get-production-machine/:id"
|
||||
layout = "platform_main"
|
||||
is_hidden = 0
|
||||
==
|
||||
<?php
|
||||
function onStart() {
|
||||
$currentDate = Carbon\Carbon::now()->timezone('UTC +05:00');
|
||||
$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' %}
|
||||
|
|
@ -1,14 +1,40 @@
|
|||
title = "Home"
|
||||
url = "/:year"
|
||||
url = "/:year?"
|
||||
layout = "platform_main"
|
||||
is_hidden = 0
|
||||
==
|
||||
<?php
|
||||
function onStart(){
|
||||
|
||||
$currentDate = Carbon\Carbon::now()->timezone('UTC +05:00');
|
||||
|
||||
$year = $this->param("year");
|
||||
$this["year"] = $this->param("year");
|
||||
|
||||
|
||||
if($year){
|
||||
$year = $this->param("year");
|
||||
$this["year"] = $this->param("year");
|
||||
}else{
|
||||
$year = $currentDate->year;
|
||||
$this["year"] = $currentDate->year;
|
||||
}
|
||||
|
||||
|
||||
|
||||
$this["production1"] = Romanah\Gokbakja\Models\Production::whereMonth('created_at', 1)->whereYear('created_at', $year)->avg('all_amount') ?? 0;
|
||||
|
||||
$this["production2"] = Romanah\Gokbakja\Models\Production::whereMonth('created_at', 2)->whereYear('created_at', $year)->avg('all_amount') ?? 0;
|
||||
$this["production3"] = Romanah\Gokbakja\Models\Production::whereMonth('created_at', 3)->whereYear('created_at', $year)->avg('all_amount') ?? 0;
|
||||
$this["production4"] = Romanah\Gokbakja\Models\Production::whereMonth('created_at', 4)->whereYear('created_at', $year)->avg('all_amount') ?? 0;
|
||||
$this["production5"] = Romanah\Gokbakja\Models\Production::whereMonth('created_at', 5)->whereYear('created_at', $year)->avg('all_amount') ?? 0;
|
||||
$this["production6"] = Romanah\Gokbakja\Models\Production::whereMonth('created_at', 6)->whereYear('created_at', $year)->avg('all_amount') ?? 0;
|
||||
$this["production7"] = Romanah\Gokbakja\Models\Production::whereMonth('created_at', 7)->whereYear('created_at', $year)->avg('all_amount') ?? 0;
|
||||
$this["production8"] = Romanah\Gokbakja\Models\Production::whereMonth('created_at', 8)->whereYear('created_at', $year)->avg('all_amount') ?? 0;
|
||||
$this["production9"] = Romanah\Gokbakja\Models\Production::whereMonth('created_at', 9)->whereYear('created_at', $year)->avg('all_amount') ?? 0;
|
||||
$this["production10"] = Romanah\Gokbakja\Models\Production::whereMonth('created_at', 10)->whereYear('created_at', $year)->avg('all_amount') ?? 0;
|
||||
$this["production11"] = Romanah\Gokbakja\Models\Production::whereMonth('created_at', 11)->whereYear('created_at', $year)->avg('all_amount') ?? 0;
|
||||
$this["production12"] = Romanah\Gokbakja\Models\Production::whereMonth('created_at', 12)->whereYear('created_at', $year)->avg('all_amount') ?? 0;
|
||||
|
||||
|
||||
|
||||
}
|
||||
?>
|
||||
==
|
||||
|
|
@ -73,11 +99,11 @@ function onStart(){
|
|||
curve: "straight"
|
||||
},
|
||||
series: [{
|
||||
name: "Öndürilen Önüm ",
|
||||
data: ['{{ordersAccept1}}', '{{ordersAccept2}}', '{{ordersAccept3}}', '{{ordersAccept4}}', '{{ordersAccept5}}', '{{ordersAccept6}}', '{{ordersAccept7}}', '{{ordersAccept8}}', '{{ordersAccept9}}', '{{ordersAccept10}}', '{{ordersAccept11}}', '{{ordersAccept12}}']
|
||||
name: "Ortaça Öndürilen Önüm ",
|
||||
data: ['{{production1}}', '{{production2}}', '{{production3}}', '{{production4}}', '{{production5}}', '{{production6}}', '{{production7}}', '{{production8}}', '{{production9}}', '{{production10}}', '{{production11}}', '{{production12}}']
|
||||
}, {
|
||||
name: "Brak Önüm ",
|
||||
data: ['{{ordersCancel1}}', '{{ordersCancel2}}', '{{ordersCancel3}}', '{{ordersCancel4}}', '{{ordersCancel5}}', '{{ordersCancel6}}', '{{ordersCancel7}}', '{{ordersCancel8}}', '{{ordersCancel9}}', '{{ordersCancel10}}', '{{ordersCancel11}}', '{{ordersCancel12}}']
|
||||
data: ['{{production1}}', '{{production2}}', '{{production3}}', '{{production4}}', '{{production5}}', '{{production6}}', '{{production7}}', '{{production8}}', '12312', '{{production10}}', '{{production11}}', '{{production12}}']
|
||||
}],
|
||||
title: {
|
||||
text: "Hasabat",
|
||||
|
|
@ -95,7 +121,7 @@ function onStart(){
|
|||
size: 6
|
||||
},
|
||||
xaxis: {
|
||||
categories: ['Yanwar', 'Fewral', 'Mart', 'Aprel', 'May', 'Iyun', 'Iyul', 'Awgust', 'Sentyabr', 'Oktyabr', 'Noyabr', 'Dekabr'],
|
||||
categories: ['Ýanwar', 'Fewral', 'Mart', 'Aprel', 'Maý', 'Iýun', 'Iýul', 'Awgust', 'Sentýabr', 'Oktýabr', 'Noýabr', 'Dekabr'],
|
||||
title: {
|
||||
text: "Aýlar"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,150 @@
|
|||
title = "Machine production by mechanic"
|
||||
url = "/machine-production-mechanic/:month"
|
||||
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");
|
||||
|
||||
|
||||
if($this["month"] == 'default'){
|
||||
$this["month"] = $currentDate->month;
|
||||
}
|
||||
|
||||
if($year){
|
||||
$this["machineProductions"] = Romanah\Gokbakja\Models\ProductionMachine::whereMonth('created_at', $this["month"])->whereYear('created_at', $year)->groupBy("mechanic_id")->get();
|
||||
|
||||
$this["month_all_amount"] = Romanah\Gokbakja\Models\ProductionMachine::whereMonth('created_at', $this["month"])
|
||||
->whereYear('created_at', $year)
|
||||
->sum('produced_weight');
|
||||
}else{
|
||||
$this["machineProductions"] = Romanah\Gokbakja\Models\ProductionMachine::whereMonth('created_at', $this["month"])->whereYear('created_at', $currentDate->year)->groupBy("mechanic_id")->addSelect(DB::raw("*, SUM(produced_weight) as produced_weight"))->get();
|
||||
|
||||
$this["month_all_amount"] = Romanah\Gokbakja\Models\ProductionMachine::whereMonth('created_at', $this["month"])
|
||||
->whereYear('created_at', $currentDate->year)
|
||||
->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">
|
||||
|
||||
<!-- 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="/machine" type="button" class="btn btn-danger waves-effect waves-light">
|
||||
Täze Hasabat
|
||||
</a>
|
||||
<div class="mail-list mt-4">
|
||||
<a href="/machine-production-mechanic/1" class="{{ month == 1 ? 'active' : '' }}"><i
|
||||
class="mdi mdi-archive me-2 font-size-16"></i> Ýanwar</a>
|
||||
<a href="/machine-production-mechanic/2" class="{{ month == 2 ? 'active' : '' }}"><i
|
||||
class="mdi mdi-archive me-2 font-size-16"></i> Fewral</a>
|
||||
<a href="/machine-production-mechanic/3" class="{{ month == 3 ? 'active' : '' }}"><i
|
||||
class="mdi mdi-archive me-2 font-size-16"></i> Mart</a>
|
||||
<a href="/machine-production-mechanic/4" class="{{ month == 4 ? 'active' : '' }}"><i
|
||||
class="mdi mdi-archive me-2 font-size-16"></i> Aprel</a>
|
||||
<a href="/machine-production-mechanic/5" class="{{ month == 5 ? 'active' : '' }}"><i
|
||||
class="mdi mdi-archive me-2 font-size-16"></i> Maý</a>
|
||||
<a href="/machine-production-mechanic/6" class="{{ month == 6 ? 'active' : '' }}"><i
|
||||
class="mdi mdi-archive me-2 font-size-16"></i> Iýun</a>
|
||||
<a href="/machine-production-mechanic/7" class="{{ month == 7 ? 'active' : '' }}"><i
|
||||
class="mdi mdi-archive me-2 font-size-16"></i> Iýul</a>
|
||||
<a href="/machine-production-mechanic/8" class="{{ month == 8 ? 'active' : '' }}"><i
|
||||
class="mdi mdi-archive me-2 font-size-16"></i> Awgust</a>
|
||||
<a href="/machine-production-mechanic/9" class="{{ month == 9 ? 'active' : '' }}"><i
|
||||
class="mdi mdi-archive me-2 font-size-16"></i> Sentýabr</a>
|
||||
<a href="/machine-production-mechanic/10" class="{{ month == 10 ? 'active' : '' }}"><i
|
||||
class="mdi mdi-archive me-2 font-size-16"></i> Oktýabr</a>
|
||||
<a href="/machine-production-mechanic/11" class="{{ month == 11 ? 'active' : '' }}"><i
|
||||
class="mdi mdi-archive me-2 font-size-16"></i> Noýabr</a>
|
||||
<a href="/machine-production-mechanic/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>Mehanik</th>
|
||||
<th>Önen Önüm</th>
|
||||
<!-- <th>Настройки</th> -->
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
{% for key, machine in machineProductions %}
|
||||
<tr>
|
||||
<td style="font-weight: bold;">{{key + 1}}</td>
|
||||
<td><a href="/get-mechanic/{{machine.mechanic.id}}/{{month}}" style="font-weight: bold;">{{machine.mechanic.name}}</a></td>
|
||||
<td>{{machine.produced_weight|number_format}} kg</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
|
||||
|
||||
|
||||
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<th style="width: 5%;">№</th>
|
||||
<th>Mehanik</th>
|
||||
<th>Önen Önüm</th>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
</div> <!-- card -->
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!-- End row -->
|
||||
</div>
|
||||
|
||||
|
||||
{% partial 'dataTableJs' %}
|
||||
|
|
@ -3,10 +3,50 @@ url = "/machine"
|
|||
layout = "platform_main"
|
||||
is_hidden = 0
|
||||
|
||||
[builderList]
|
||||
modelClass = "Romanah\Gokbakja\Models\Building"
|
||||
scope = "-"
|
||||
scopeValue = "{{ :scope }}"
|
||||
displayColumn = "id"
|
||||
noRecordsMessage = "No records found"
|
||||
detailsPage = "-"
|
||||
detailsUrlParameter = "id"
|
||||
pageNumber = "{{ :page }}"
|
||||
|
||||
[builderList builderList2]
|
||||
modelClass = "Romanah\Gokbakja\Models\Machine"
|
||||
scope = "-"
|
||||
scopeValue = "{{ :scope }}"
|
||||
displayColumn = "id"
|
||||
noRecordsMessage = "No records found"
|
||||
detailsPage = "-"
|
||||
detailsUrlParameter = "id"
|
||||
pageNumber = "{{ :page }}"
|
||||
|
||||
[builderList builderList3]
|
||||
modelClass = "Romanah\Gokbakja\Models\BagSize"
|
||||
scope = "-"
|
||||
scopeValue = "{{ :scope }}"
|
||||
displayColumn = "id"
|
||||
noRecordsMessage = "No records found"
|
||||
detailsPage = "-"
|
||||
detailsUrlParameter = "id"
|
||||
pageNumber = "{{ :page }}"
|
||||
|
||||
[builderList builderList4]
|
||||
modelClass = "Romanah\Gokbakja\Models\BagType"
|
||||
scope = "-"
|
||||
scopeValue = "{{ :scope }}"
|
||||
displayColumn = "id"
|
||||
noRecordsMessage = "No records found"
|
||||
detailsPage = "-"
|
||||
detailsUrlParameter = "id"
|
||||
pageNumber = "{{ :page }}"
|
||||
|
||||
[production]
|
||||
==
|
||||
<?php
|
||||
|
||||
function onStart(){
|
||||
function onStart(){
|
||||
$currentDate = Carbon\Carbon::now()->timezone('UTC +05:00');
|
||||
|
||||
$currentDateFormat = Carbon\Carbon::now()->format('Y-m-d');
|
||||
|
|
@ -15,9 +55,8 @@ is_hidden = 0
|
|||
$this["currentMonth"] = $currentDate->format('m');
|
||||
$this["currentYear"] = $currentDate->format('Y');
|
||||
|
||||
$this["machineProductions"] = Romanah\Gokbakja\Models\ProductionMachine::with(['bag_type', 'bag_size', 'machine', 'employee', 'mechanic'])->whereDate('created_at', date($currentDateFormat))->get();
|
||||
$this["machineProductions"] = Romanah\Gokbakja\Models\ProductionMachine::with(['bag_type', 'bag_size', 'machine.building', 'employee', 'mechanic'])->whereDate('created_at', date($currentDateFormat))->get();
|
||||
}
|
||||
|
||||
?>
|
||||
==
|
||||
{% set records = builderList.records %}
|
||||
|
|
@ -27,6 +66,9 @@ is_hidden = 0
|
|||
{% set detailsKeyColumn = builderList.detailsKeyColumn %}
|
||||
{% set detailsUrlParameter = builderList.detailsUrlParameter %}
|
||||
|
||||
{% set machines = builderList2.records %}
|
||||
{% set types = builderList3.records %}
|
||||
{% set sizes = builderList4.records %}
|
||||
|
||||
{% put styles %}
|
||||
<link href="{{'assets/libs/datatables.net-bs4/css/dataTables.bootstrap4.min.css'|theme}}" rel="stylesheet"
|
||||
|
|
@ -35,6 +77,8 @@ is_hidden = 0
|
|||
type="text/css" />
|
||||
<link href="{{'assets/libs/datatables.net-select-bs4/css/select.bootstrap4.min.css'|theme}}" rel="stylesheet"
|
||||
type="text/css" />
|
||||
|
||||
<link href="{{'assets/libs/select2/css/select2.min.css'|theme}}" rel="stylesheet" type="text/css">
|
||||
{% endput %}
|
||||
|
||||
<div class="container-fluid">
|
||||
|
|
@ -45,24 +89,77 @@ is_hidden = 0
|
|||
<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 ({{currentDate|date('d.m.Y | H:i')}})</h3>
|
||||
<h3 class="card-title" style="font-size: 22px;color: #1e2038;">Enjamlar boýunça
|
||||
({{currentDate|date('d.m.Y | H:i')}})</h3>
|
||||
<p class="card-title-desc" style="color: #6c6ff5;">Hasabat</p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<h1>{{machineProductions}}</h1>
|
||||
<!-- <h1>{{machineProductions}}</h1> -->
|
||||
<div class="table-responsive" style="margin-bottom: 20px;">
|
||||
<table class="table mb-0">
|
||||
|
||||
<thead class="table-light">
|
||||
|
||||
<form data-request="onCreateMachineProduction">
|
||||
<tr>
|
||||
<th style="background: #daddff;padding-bottom: 20px;">Täze maglumat</th>
|
||||
|
||||
<th style="background: #daddff;">
|
||||
<select class="form-control select2" name="machine_id">
|
||||
<option>Enjam Saýla</option>
|
||||
{% for machine in machines %}
|
||||
<option value="{{machine.id}}">{{machine.name}}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</th>
|
||||
<th style="background: #daddff;">
|
||||
<select class="form-control select2" name="size_id">
|
||||
<option>Ölçeg Saýla</option>
|
||||
{% for size in sizes %}
|
||||
<option value="{{size.id}}">{{size.name}}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</th>
|
||||
<th style="background: #daddff;">
|
||||
<select class="form-control select2" name="type_id">
|
||||
<option>Görnüş Saýla</option>
|
||||
{% for type in types %}
|
||||
<option value="{{type.id}}">{{type.name}}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</th>
|
||||
<th style="background: #daddff;">
|
||||
<input type="number" name="produced_weight" class="form-control"
|
||||
placeholder="Mukdar (kg)">
|
||||
</th>
|
||||
<th style="background: #daddff;">
|
||||
<input type="text" name="note" class="form-control" placeholder="Bellik">
|
||||
</th>
|
||||
<th style="background: #daddff;">
|
||||
<button type="submit"
|
||||
class="btn btn-primary waves-effect waves-light">Goş</button>
|
||||
</th>
|
||||
</tr>
|
||||
</form>
|
||||
|
||||
</thead>
|
||||
</table>
|
||||
</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>Ölçegi</th>
|
||||
<th>Görnüşi</th>
|
||||
<th>Bellik</th>
|
||||
<!-- <th>Настройки</th> -->
|
||||
</tr>
|
||||
|
|
@ -72,14 +169,15 @@ is_hidden = 0
|
|||
{% 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.name}}</td>
|
||||
<td>onen onum</td>
|
||||
<td>{{machine.employee.name}}</td>
|
||||
<td>{{machine.mechanic.name}}</td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></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 %}
|
||||
|
||||
|
|
@ -89,11 +187,11 @@ is_hidden = 0
|
|||
<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>Ölçegi</th>
|
||||
<th>Görnüşi</th>
|
||||
<th>Bellik</th>
|
||||
</tr>
|
||||
</tfoot>
|
||||
|
|
@ -108,4 +206,9 @@ is_hidden = 0
|
|||
|
||||
</div>
|
||||
|
||||
{% put scripts %}
|
||||
<script src="{{'assets/libs/select2/js/select2.min.js'|theme}}"></script>
|
||||
<script src="{{'assets/js/pages/form-advanced.init.js'|theme}}"></script>
|
||||
{% endput %}
|
||||
|
||||
{% partial 'dataTableJs' %}
|
||||
|
|
|
|||
|
|
@ -122,7 +122,7 @@ function onStart(){
|
|||
class="btn btn-warning waves-effect waves-light" data-bs-toggle="offcanvas"
|
||||
data-bs-target="#offcanvasBottom" aria-controls="offcanvasBottom"
|
||||
style="padding-top: 5px;padding-bottom: 5px;">
|
||||
<i class="ri-pencil-line align-middle me-2"></i> Обновить
|
||||
<i class="ri-pencil-line align-middle me-2"></i> Täzele
|
||||
</a>
|
||||
</div>
|
||||
<div>
|
||||
|
|
@ -130,7 +130,7 @@ function onStart(){
|
|||
data-request-data="id:{{record.id}}" data-request="onDeleteAction"
|
||||
class="btn btn-danger waves-effect waves-light"
|
||||
style="padding-top: 5px;padding-bottom: 5px;">
|
||||
<i class="ri-close-line align-middle me-2"></i> Удалить
|
||||
<i class="ri-close-line align-middle me-2"></i> Poz
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,98 @@
|
|||
title = "Report Production Machine"
|
||||
url = "/report-production-machine/:year?"
|
||||
layout = "platform_main"
|
||||
is_hidden = 0
|
||||
==
|
||||
<?php
|
||||
function onStart(){
|
||||
$currentDate = Carbon\Carbon::now()->timezone('UTC +05:00');
|
||||
|
||||
$this["year"] = $this->param("year");
|
||||
|
||||
if(!$this["year"]){
|
||||
$this["year"] = $currentDate->year;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
?>
|
||||
==
|
||||
{% 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;">Enjamlar boýunça ({{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>Öndürlen Önüm</th>
|
||||
|
||||
<!-- <th>Настройки</th> -->
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
|
||||
{% partial 'reportMachine/row-machine' title="Ýanwar" no=1 %}
|
||||
{% partial 'reportMachine/row-machine' title="Fewral" no=2 %}
|
||||
{% partial 'reportMachine/row-machine' title="Mart" no=3 %}
|
||||
{% partial 'reportMachine/row-machine' title="Aprel" no=4 %}
|
||||
{% partial 'reportMachine/row-machine' title="Maý" no=5 %}
|
||||
{% partial 'reportMachine/row-machine' title="Iýun" no=6 %}
|
||||
{% partial 'reportMachine/row-machine' title="Iýul" no=7 %}
|
||||
{% partial 'reportMachine/row-machine' title="Awgust" no=8 %}
|
||||
{% partial 'reportMachine/row-machine' title="Sentýabr" no=9 %}
|
||||
{% partial 'reportMachine/row-machine' title="Oktýabr" no=10 %}
|
||||
{% partial 'reportMachine/row-machine' title="Noýabr" no=11 %}
|
||||
{% partial 'reportMachine/row-machine' title="Dekabr" no=12 %}
|
||||
|
||||
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<th style="width: 5%;">№</th>
|
||||
<th>Senesi</th>
|
||||
<th>Hemmesi</th>
|
||||
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
{% partial 'dataTableJs' %}
|
||||
|
|
@ -2,16 +2,16 @@
|
|||
==
|
||||
<?php
|
||||
function onStart()
|
||||
{
|
||||
{
|
||||
$link = $this->page["url"];
|
||||
}
|
||||
?>
|
||||
==
|
||||
<a href="/varify-order" class="dropdown d-inline-block">
|
||||
<a href="#" class="dropdown d-inline-block">
|
||||
<button type="button" class="btn header-item noti-icon waves-effect">
|
||||
<i class="ri-notification-3-line"></i>
|
||||
|
||||
<span class="noti-dot"></span>
|
||||
|
||||
|
||||
</button>
|
||||
</a>
|
||||
</a>
|
||||
|
|
|
|||
|
|
@ -32,23 +32,23 @@
|
|||
<i class="fa fa-fw fa-bars"></i>
|
||||
</button>
|
||||
|
||||
<form action="/search" method="POST" class="app-search d-none d-lg-block">
|
||||
<!-- <form action="/search" method="POST" class="app-search d-none d-lg-block">
|
||||
<div class="position-relative">
|
||||
<input type="text" class="form-control" name="search" placeholder="Gözleg...">
|
||||
<span class="ri-search-line"></span>
|
||||
</div>
|
||||
</form>
|
||||
</form> -->
|
||||
|
||||
</div>
|
||||
|
||||
<div class="d-flex">
|
||||
<div class="dropdown d-inline-block">
|
||||
<!-- <div class="dropdown d-inline-block">
|
||||
<a href="{{'order/sell'|page}}" class="btn header-item noti-icon waves-effect"
|
||||
id="page-header-notifications-dropdown" aria-expanded="false">
|
||||
<i class="ri-shopping-basket-2-line" style="font-size: 30px;"></i>
|
||||
<!-- <span class="noti-dot"></span> -->
|
||||
|
||||
</a>
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
<div class="dropdown d-none d-lg-inline-block ms-1">
|
||||
<button type="button" class="btn header-item noti-icon waves-effect" data-bs-toggle="fullscreen">
|
||||
|
|
|
|||
|
|
@ -0,0 +1,20 @@
|
|||
[viewBag]
|
||||
==
|
||||
<?php
|
||||
function onStart (){
|
||||
$no = $this->no;
|
||||
$year = $this->year;
|
||||
|
||||
$this["all_amount"] = Romanah\Gokbakja\Models\ProductionMachine::whereMonth('created_at', $no)
|
||||
->whereYear('created_at', $year)
|
||||
->sum('produced_weight');
|
||||
|
||||
}
|
||||
?>
|
||||
==
|
||||
<tr>
|
||||
<td style="font-weight: bold;width: 5%;">{{no}}</td>
|
||||
<td><a href="/get-all-machine-production-month/{{no}}" style="font-weight: bold;color: #0005c5;"> {{title}} </a></td>
|
||||
<td><a href="/get-all-machine-production-month/{{no}}" style="font-weight: bold;"> {{all_amount|number_format}} kg</a></td>
|
||||
|
||||
</tr>
|
||||
Loading…
Reference in New Issue