report and orders

This commit is contained in:
Shohrat 2023-10-10 02:53:59 +05:00
parent 955ec22ee0
commit bc015268e8
8 changed files with 700 additions and 14 deletions

View File

@ -57,6 +57,83 @@ class MachineProduction extends ComponentBase
return $html_data;
}
public function onReport()
{
$currentDate = Carbon::now()->timezone('UTC +05:00');
$currentDateFormat = $currentDate->format('Y-m-d');
$data = post();
$machineProductions = ProductionMachineModel::with(['bag_type', 'bag_size', 'machine.building', 'employee', 'mechanic'])->orderBy('id', 'DESC');
$start = Carbon::parse($data["start"])->format('Y-m-d');
$end = Carbon::parse($data["end"])->format('Y-m-d');;
$machine = $data["machine_id"];
$mechanic = $data["mechanic_id"];
$size = $data["size_id"];
$type = $data["type_id"];
if ($machine) {
$machineProductions->where("machine_id", $machine);
}
if ($mechanic) {
$machineProductions->where("mechanic_id", $mechanic);
}
if ($size) {
$machineProductions->where("size_id", $size);
}
if ($type) {
$machineProductions->where("type_id", $type);
}
if ($start != $currentDateFormat){
$machineProductions->whereBetween('created_at', [$start, $end]);
}
$machineProductionsFiltered = $machineProductions->get();
$machineProductionsSum = $machineProductions->sum("produced_weight");
$html_data = '';
for ($x = 0; $x < count($machineProductionsFiltered); $x++) {
$html_data .= '<tr>
<td style="font-weight: bold;">' . ($x + 1) . '</td>
<td><a href="#" style="font-weight: bold;">' . $machineProductionsFiltered[$x]->created_at->format("d.m.Y") . '</a></td>
<td><a href="#" style="font-weight: bold;">' . $machineProductionsFiltered[$x]->building_name . '</a></td>
<td>' . $machineProductionsFiltered[$x]->machine->name . '</td>
<td>' . $machineProductionsFiltered[$x]->bag_size->name . '</td>
<td>' . $machineProductionsFiltered[$x]->bag_type->name . '</td>
<td><span class="badge badge-soft-success"
style="font-size: 14px;">' . number_format($machineProductionsFiltered[$x]->produced_weight) . ' kg</span>
</td>
<td>' . $machineProductionsFiltered[$x]->employee_name . '</td>
<td>' . $machineProductionsFiltered[$x]->mechanic_name . '</td>
<td>' . $machineProductionsFiltered[$x]->note . '</td>
</tr>';
}
if ($machineProductionsFiltered) {
return [
'#machine_report_datas' => $html_data,
'#all_amount' => '<div class="card bg-info text-white-50">
<div class="card-body">
<h5 class="text-white" style="text-transform: uppercase;margin-bottom: 0;"><i
class="mdi mdi-bullseye-arrow me-3"></i> Jemi Öndürlen Önüm: '.number_format($machineProductionsSum).' kg</h5>
</div>
</div>',
];
} else {
Flash::error("Yalnyshlyk bar!!");
}
}
public function onCreateMachineProduction()
{
@ -69,7 +146,6 @@ class MachineProduction extends ComponentBase
return [
'#validationq' => ' Gutulary Dolduryn!',
];
} else {
$createProductionMachine = new ProductionMachineModel();

View File

@ -42,7 +42,7 @@ class Sewer extends ComponentBase
$html_data .= '<tr>
<td style="font-weight: bold;">'.($x+1).'</td>
<td><a href="#" style="font-weight: bold;">'.$sewerDatas[$x]->employee->name.'</a></td>
<td>'.$sewerDatas[$x]->created_at->format('m.d.Y').'</td>
<td>'.$sewerDatas[$x]->created_at->format('d.m.Y').'</td>
<td><span class="badge badge-soft-success"
style="font-size: 14px;">'.$sewerDatas[$x]->amount.' kg</span>
</td>
@ -54,6 +54,92 @@ class Sewer extends ComponentBase
return $html_data;
}
public function onReportSewer()
{
$currentDate = Carbon::now()->timezone('UTC +05:00');
$currentDateFormat = $currentDate->format('Y-m-d');
$data = post();
$sewerProductions = SewerModel::with("employee")->orderBy('id', 'DESC');
$start = Carbon::parse($data["start"])->format('Y-m-d');
$end = Carbon::parse($data["end"])->format('Y-m-d');;
$employee = $data["employee_id"];
$min = $data["min"];
$max = $data["max"];
$amount = $data["amount"];
if ($employee) {
$sewerProductions->where("employee_id", $employee);
}
if ($min){
$sewerProductions->whereRaw('produced_bag_qty >'.$min);
}
if ($max){
$sewerProductions->whereRaw('produced_bag_qty <'.$max);
}
if ($amount){
$sewerProductions->whereRaw('amount <='.$amount);
}
if ($start != $currentDateFormat){
$sewerProductions->whereBetween('created_at', [$start, $end]);
}
$sewerProductionsFiltered = $sewerProductions->get();
$sewerProductionsSumBagQty = $sewerProductions->sum("produced_bag_qty");
$sewerProductionsamount = $sewerProductions->sum("amount");
$html_data = '';
for ($x = 0; $x < count($sewerProductionsFiltered); $x++) {
$html_data .= '<tr>
<td style="font-weight: bold;">'.($x+1).'</td>
<td><a href="#" style="font-weight: bold;">'.$sewerProductionsFiltered[$x]->employee->name.'</a></td>
<td>'.$sewerProductionsFiltered[$x]->created_at->format('d.m.Y').'</td>
<td><span class="badge badge-soft-success"
style="font-size: 14px;">'.$sewerProductionsFiltered[$x]->amount.' kg</span>
</td>
<td>'.$sewerProductionsFiltered[$x]->produced_bag_qty.'</td>
<td>'.$sewerProductionsFiltered[$x]->note.'</td>
</tr>';
}
if ($sewerProductionsFiltered) {
return [
'#sewer_report_datas' => $html_data,
'#all_amount' => '<div class="col-md-6">
<h3 class="card-title" style="font-size: 22px;color: #1e2038;">Tikinçiler Boýunça Umumy</h3>
<p class="card-title-desc" style="color: #6c6ff5;">Hasabat</p>
</div>
<div class="col-md-3">
<div class="card bg-info text-white-50">
<div class="card-body">
<h5 class="text-white" style="text-transform: uppercase;margin-bottom: 0;"><i class="mdi mdi-bullseye-arrow me-3"></i> Jemi Dikilen Halta: '.number_format($sewerProductionsSumBagQty).' sany</h5>
</div>
</div>
</div>
<div class="col-md-3">
<div class="card bg-info text-white-50">
<div class="card-body">
<h5 class="text-white" style="text-transform: uppercase;margin-bottom: 0;"><i class="mdi mdi-bullseye-arrow me-3"></i> Jemi Sarp Edilen Çig mal: '.number_format($sewerProductionsamount).' kg</h5>
</div>
</div>
</div>',
];
} else {
Flash::error("Yalnyshlyk bar!!");
}
}
public function onCreateSewerProduction()
{
@ -79,7 +165,7 @@ class Sewer extends ComponentBase
$html_data .= '<tr>
<td style="font-weight: bold;">'.($x+1).'</td>
<td><a href="#" style="font-weight: bold;">'.$sewerDatas[$x]->employee->name.'</a></td>
<td>'.$sewerDatas[$x]->created_at->format('m.d.Y').'</td>
<td>'.$sewerDatas[$x]->created_at->format('d.m.Y').'</td>
<td><span class="badge badge-soft-success"
style="font-size: 14px;">'.$sewerDatas[$x]->amount.' kg</span>
</td>

View File

@ -147,9 +147,13 @@ items:
items:
-
title: 'Hasabat Sanawy'
nesting: null
type: cms-page
url: null
code: ''
reference: machine/machine
cmsPage: null
replace: null
viewBag:
isHidden: '0'
cssClass: ''
@ -167,6 +171,15 @@ items:
isHidden: '0'
cssClass: ''
isExternal: '0'
-
title: 'Aýlar boýunça'
type: cms-page
code: ''
reference: machine/report-production-machine
viewBag:
isHidden: '0'
cssClass: ''
isExternal: '0'
-
title: 'Mehanikler boýunça'
nesting: null
@ -196,22 +209,31 @@ items:
items:
-
title: 'Hasabat Sanawy'
nesting: null
type: cms-page
url: null
code: ''
reference: sewer/new
cmsPage: null
replace: null
viewBag:
isHidden: '0'
cssClass: ''
isExternal: '0'
-
title: Hasabat
nesting: null
type: cms-page
url: null
code: ''
reference: sewer/report
viewBag:
isHidden: '0'
cssClass: ''
isExternal: '0'
-
title: 'Aýlar boýunça'
type: cms-page
code: ''
reference: sewer/month
cmsPage: null
replace: null
viewBag:
isHidden: '0'
cssClass: ''
@ -232,9 +254,13 @@ items:
items:
-
title: 'Sargytlar Sanawy'
nesting: null
type: cms-page
url: null
code: ''
reference: orders/new
cmsPage: null
replace: null
viewBag:
isHidden: '0'
cssClass: ''

View File

@ -2,4 +2,220 @@ title = "machine/report"
url = "/machinereport"
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 }}"
[machineProduction]
==
<?php
function onStart(){
$this["shifts"] = Romanah\Gokbakja\Models\Shift::get();
$this["machines"] = Romanah\Gokbakja\Models\Machine::all();
$this["mechanics"] = Romanah\Gokbakja\Models\Employee::where("is_mechanic", 1)->get();
}
?>
==
{% set records = builderList.records %}
{% set displayColumn = builderList.displayColumn %}
{% set noRecordsMessage = builderList.noRecordsMessage %}
{% set detailsPage = builderList.detailsPage %}
{% set detailsKeyColumn = builderList.detailsKeyColumn %}
{% set detailsUrlParameter = builderList.detailsUrlParameter %}
{% set machines = builderList2.records %}
{% set types = builderList4.records %}
{% set sizes = builderList3.records %}
{% 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" />
<link href="{{'assets/libs/select2/css/select2.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">
<form data-request="onReport" data-request-flash>
<div class="row">
<div class="col">
<div>
<label class="form-label">Seneleri Saýlaň</label>
<div class="input-daterange input-group" id="datepicker6"
data-date-format="d.m.yyyy" data-date-autoclose="true" data-provide="datepicker"
data-date-container='#datepicker6'>
<input type="text" class="form-control" name="start"
placeholder="Başlanýan sene" />
<input type="text" class="form-control" name="end"
placeholder="Gutarýan sene" />
</div>
</div>
</div>
<div class="col">
<label class="form-label">Enjam Saýlaň</label>
<select class="form-control select2" name="machine_id" id="machine_id">
<option value="0">Saýla</option>
{% for machine in machines %}
<option value="{{machine.id}}">{{machine.name}}</option>
{% endfor %}
</select>
</div>
<div class="col">
<label class="form-label">Mehanik Saýlaň</label>
<select class="form-control select2" name="mechanic_id" id="mechanic_id">
<option value="0">Saýla</option>
{% for mechanic in mechanics %}
<option value="{{mechanic.id}}">{{mechanic.name}}</option>
{% endfor %}
</select>
</div>
<div class="col">
<label class="form-label">Ölçeg Saýlaň</label>
<select class="form-control select2" name="size_id">
<option value="0">Saýla</option>
{% for size in sizes %}
<option value="{{size.id}}">{{size.name}}</option>
{% endfor %}
</select>
</div>
<div class="col">
<label class="form-label">Görnüş Saýlaň</label>
<select class="form-control select2" name="type_id">
<option value="0">Görnüş Saýla</option>
{% for type in types %}
<option value="{{type.id}}">{{type.name}}</option>
{% endfor %}
</select>
</div>
<div class="col">
<button type="submit" class="btn btn-primary waves-effect waves-light"
style="margin-top: 30px;width: 100%;">Hasabat</button>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
<div class="row">
</div>
<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 Umumy</h3>
<p class="card-title-desc" style="color: #6c6ff5;">Hasabat</p>
</div>
<div class="col-md-2">
</div>
<div class="col-md-4" id="all_amount">
</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>Sene</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 id="machine_report_datas">
</tbody>
<tfoot>
<tr>
<th style="width: 5%;"></th>
<th>Sene</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' %}
{% put scripts %}
<script src="{{'assets/libs/bootstrap-datepicker/js/bootstrap-datepicker.min.js'|theme}}"></script>
<script src="{{'assets/libs/select2/js/select2.min.js'|theme}}"></script>
<script src="{{'assets/js/pages/form-advanced.init.js'|theme}}"></script>
{% endput %}

View File

@ -10,7 +10,6 @@ function onStart(){
}
?>
==
{% put styles %}
<link href="{{'assets/libs/datatables.net-bs4/css/dataTables.bootstrap4.min.css'|theme}}" rel="stylesheet"
type="text/css" />
@ -18,6 +17,8 @@ function onStart(){
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 %}
@ -41,7 +42,7 @@ function onStart(){
</div>
<div class="col">
<label class="form-label">Ekstruiter Saýlaň</label>
<select class="form-control" name="shift_id" id="shift_id">
<select class="form-control select2" name="shift_id" id="shift_id">
<option value="0">Saýla</option>
{% for excruiter in excruiters %}
<option value="{{excruiter.id}}">{{excruiter.name}}</option>
@ -50,7 +51,7 @@ function onStart(){
</div>
<div class="col">
<label class="form-label">Smen Saýlaň</label>
<select class="form-control" name="shift_id" id="shift_id">
<select class="form-control select2" name="shift_id" id="shift_id">
<option value="0">Saýla</option>
{% for shift in shifts %}
<option value="{{shift.id}}">{{shift.desc}} - ({{shift.start}} -
@ -132,7 +133,9 @@ function onStart(){
{% partial 'dataTableJs' %}
{% put scripts %}
<script src="{{'assets/libs/select2/js/select2.min.js'|theme}}"></script>
<script src="{{'assets/libs/bootstrap-datepicker/js/bootstrap-datepicker.min.js'|theme}}"></script>
<script src="{{'assets/js/pages/form-advanced.init.js'|theme}}"></script>
{% endput %}
{% endput %}

View File

@ -1,6 +1,115 @@
title = "sewer/month"
url = "/sewer/month"
url = "/sewer/month/:year"
layout = "platform_main"
is_hidden = 0
==
seweer month
<?php
function onStart(){
$currentDate = Carbon\Carbon::now()->timezone('UTC +05:00');
$this["year"] = $this->param("year");
if(!$this["year"]){
$this["year"] = $currentDate->year;
}
if($this["year"] == "default"){
$this["year"] = $currentDate->year;
}
$this["all_amount_total"] = Romanah\Gokbakja\Models\SewerProduction::whereYear('created_at', $this["year"])
->sum('amount');
$this["all_bag_qty_total"] = Romanah\Gokbakja\Models\SewerProduction::whereYear('created_at', $this["year"])
->sum('produced_bag_qty');
}
?>
==
{% 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;">Tikinçiler boýunça ({{year}} ýyl)</h3>
<p class="card-title-desc" style="color: #6c6ff5;">Hasabat</p>
</div>
<div class="col-md-3">
<div class="card bg-info text-white-50">
<div class="card-body">
<h5 class="text-white" style="text-transform: uppercase;margin-bottom: 0;"><i class="mdi mdi-bullseye-arrow me-3"></i> Jemi Dikilen Halta: {{all_bag_qty_total|number_format}} sany</h5>
</div>
</div>
</div>
<div class="col-md-3">
<div class="card bg-info text-white-50">
<div class="card-body">
<h5 class="text-white" style="text-transform: uppercase;margin-bottom: 0;"><i class="mdi mdi-bullseye-arrow me-3"></i> Jemi Sarp Edilen Çig mal: {{all_amount_total|number_format}} kg</h5>
</div>
</div>
</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>Sarp Edilen  Çig Mal</th>
<th>Öndürlen Halta Sany</th>
<!-- <th>Настройки</th> -->
</tr>
</thead>
<tbody>
{% partial 'sewer/row' title="Ýanwar" no=1 %}
{% partial 'sewer/row' title="Fewral" no=2 %}
{% partial 'sewer/row' title="Mart" no=3 %}
{% partial 'sewer/row' title="Aprel" no=4 %}
{% partial 'sewer/row' title="Maý" no=5 %}
{% partial 'sewer/row' title="Iýun" no=6 %}
{% partial 'sewer/row' title="Iýul" no=7 %}
{% partial 'sewer/row' title="Awgust" no=8 %}
{% partial 'sewer/row' title="Sentýabr" no=9 %}
{% partial 'sewer/row' title="Oktýabr" no=10 %}
{% partial 'sewer/row' title="Noýabr" no=11 %}
{% partial 'sewer/row' title="Dekabr" no=12 %}
</tbody>
<tfoot>
<tr>
<th style="width: 5%;"></th>
<th>Aýlar</th>
<th>Sarp Edilen  Çig Mal</th>
<th>Öndürlen Halta Sany</th>
</tr>
</tfoot>
</table>
</div>
</div>
</div>
</div>
</div>
{% partial 'dataTableJs' %}

View File

@ -0,0 +1,146 @@
title = "sewer/report"
url = "/sewer/report"
layout = "platform_main"
is_hidden = 0
[sewer]
==
<?php
function onStart(){
$this["sewers"] = Romanah\Gokbakja\Models\Employee::where("status", 1)->where("is_sewer", 1)->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" />
<link href="{{'assets/libs/select2/css/select2.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">
<form data-request="onReportSewer" data-request-flash>
<div class="row">
<div class="col">
<div>
<label class="form-label">Seneleri Saýlaň</label>
<div class="input-daterange input-group" id="datepicker6"
data-date-format="d.m.yyyy" data-date-autoclose="true" data-provide="datepicker"
data-date-container='#datepicker6'>
<input type="text" class="form-control" name="start"
placeholder="Başlanýan sene" />
<input type="text" class="form-control" name="end"
placeholder="Gutarýan sene" />
</div>
</div>
</div>
<div class="col">
<label class="form-label">Tikinçi Saýlaň</label>
<select class="form-control select2" name="employee_id">
<option value="0">Saýla</option>
{% for sewer in sewers %}
<option value="{{sewer.id}}">{{sewer.name}}</option>
{% endfor %}
</select>
</div>
<div class="col">
<label class="form-label">Minimum San</label>
<input name="min" class="form-control" placeholder="Minimum Halta San">
</div>
<div class="col">
<label class="form-label">Maximum San</label>
<input name="max" class="form-control" placeholder="Maximum Halta San">
</div>
<div class="col">
<label class="form-label">Sarp edilen çig mal (kg)</label>
<input name="amount" class="form-control" placeholder="Sarp edilen çig mal (kg)">
</div>
<div class="col">
<button type="submit" class="btn btn-primary waves-effect waves-light"
style="margin-top: 30px;width: 100%;">Hasabat</button>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
<div class="row">
</div>
<div class="row">
<div class="col-md-12">
<div class="card">
<div class="card-body">
<div class="row" id="all_amount">
<div class="col-md-6">
<h3 class="card-title" style="font-size: 22px;color: #1e2038;">Tikinçiler Boýunça Umumy</h3>
<p class="card-title-desc" style="color: #6c6ff5;">Hasabat</p>
</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>Tikinçi</th>
<th>Senesi</th>
<th>Çig mal mukdary</th>
<th>Tikilen Halta</th>
<th>Bellik</th>
<!-- <th>Настройки</th> -->
</tr>
</thead>
<tbody id="sewer_report_datas">
</tbody>
<tfoot>
<tr>
<th style="width: 5%;"></th>
<th>Tikinçi</th>
<th>Senesi</th>
<th>Çig mal mukdary</th>
<th>Tikilen Halta</th>
<th>Bellik</th>
</tr>
</tfoot>
</table>
</div>
</div>
</div>
</div>
</div>
{% partial 'dataTableJs' %}
{% put scripts %}
<script src="{{'assets/libs/bootstrap-datepicker/js/bootstrap-datepicker.min.js'|theme}}"></script>
<script src="{{'assets/libs/select2/js/select2.min.js'|theme}}"></script>
<script src="{{'assets/js/pages/form-advanced.init.js'|theme}}"></script>
{% endput %}

View File

@ -0,0 +1,24 @@
[viewBag]
==
<?php
function onStart (){
$no = $this->no;
$year = $this->year;
$this["all_amount"] = Romanah\Gokbakja\Models\SewerProduction::whereMonth('created_at', $no)
->whereYear('created_at', $year)
->sum('amount');
$this["all_bag_qty"] = Romanah\Gokbakja\Models\SewerProduction::whereMonth('created_at', $no)
->whereYear('created_at', $year)
->sum('produced_bag_qty');
}
?>
==
<tr>
<td style="font-weight: bold;width: 5%;">{{no}}</td>
<td><a href="#" style="font-weight: bold;color: #0005c5;"> {{title}} </a></td>
<td><a href="#" style="font-weight: bold;"> {{all_amount|number_format}} kg</a></td>
<td><a href="#" style="font-weight: bold;"> {{all_bag_qty|number_format}} sany</a></td>
</tr>