Compare commits

...

3 Commits

Author SHA1 Message Date
Shohrat 5afee5e070 updated 27_12 2023-12-27 12:09:21 +05:00
Shohrat c8ec8972ab orders 2023-12-22 01:30:58 +05:00
Shohrat d2a393e765 production report2 2023-12-22 00:19:40 +05:00
14 changed files with 409 additions and 45 deletions

2
.gitignore vendored
View File

@ -3,6 +3,8 @@
composer.phar
composer.lock
/config
# Framework ignores
.env
.env.*.php

View File

@ -57,9 +57,9 @@ return [
'engine' => 'InnoDB',
'host' => 'localhost',
'port' => 3306,
'database' => 'gok_bakja',
'database' => 'gok_bakja_from_server2',
'username' => 'root',
'password' => '',
'password' => 'bt110226',
'charset' => 'utf8mb4',
'collation' => 'utf8mb4_unicode_ci',
'prefix' => '',

View File

@ -39,11 +39,9 @@ class Order extends ComponentBase
$orders = OrderModel::with(["client", "shipping"])
->withCount(['order_items as order_all_amount' => function ($query) {
$query->select(DB::raw('sum(amount)'));
}])
->withCount(['order_items as qty'])
->withCount(['order_items as order_all_price' => function ($query) {
$query->select(DB::raw('sum(price) * sum(amount)'));
$query->select(DB::raw('sum(price) * sum(amount) / qty'));
}])
->withCount(['payment as all_payments' => function ($query) {
$query->select(DB::raw('sum(amount)'));
@ -87,6 +85,17 @@ class Order extends ComponentBase
$allPaid += $ordersFiltered[$x]->all_payments;
$allNotPaid += ($ordersFiltered[$x]->order_all_price - $ordersFiltered[$x]->all_payments);
$mustPay = '';
$mustPayCalc = number_format(($ordersFiltered[$x]->order_all_price - $ordersFiltered[$x]->all_payments), 2);
if($mustPayCalc < 0){
$mustPay = 'artykmaç '.abs($mustPayCalc).' $';
}else if($mustPayCalc == 0){
$mustPay = '';
} else{
$mustPay = $mustPayCalc.' $';
}
$html_data .= '<tr>
<td style="font-weight: bold;">' . ($x + 1) . '</td>
<td><a href="/order-detail/' . $ordersFiltered[$x]->id . '" style="font-weight: bold;">Sargyt #' . $ordersFiltered[$x]->id . '</a></td>
@ -99,7 +108,7 @@ class Order extends ComponentBase
<td><span class="badge badge-soft-success"
style="font-size: 14px;">' . number_format($ordersFiltered[$x]->all_payments) . ' $</span>
</td>
<td><a href="#" class="badge badge-soft-danger" style="font-size: 14px;">' . number_format($ordersFiltered[$x]->order_all_price - $ordersFiltered[$x]->all_payments) . ' $</a>
<td><a href="#" class="badge badge-soft-danger" style="font-size: 14px;">' . $mustPay . '</a>
</td>
<td>' . $ordersFiltered[$x]->created_at->format('d.m.Y') . '</td>
<td>' . $ordersFiltered[$x]->note . '</td>
@ -227,9 +236,9 @@ class Order extends ComponentBase
$html_data .= '<tr>
<td style="font-weight: bold;">' . ($x + 1) . '</td>
<td><a href="/orders/transport/loaded/' . $shippingTransportsFiltered[$x]->shipping->order->id . '/'.$shippingTransportsFiltered[$x]->id.'" style="font-weight: bold;">' . $transportTitle . '</a></td>
<td><a href="/orders/transport/loaded/' . $shippingTransportsFiltered[$x]->shipping->order_id . '/'.$shippingTransportsFiltered[$x]->id.'" style="font-weight: bold;">' . $transportTitle . '</a></td>
<td>' . $shippingTransportsFiltered[$x]->transport_no . '</td>
<td><a href="/order-detail/' . $shippingTransportsFiltered[$x]->shipping->order->id . '" style="font-weight: bold;">Sargyt #' . $shippingTransportsFiltered[$x]->shipping->order->id . '</a></td>
<td><a href="/order-detail/' . $shippingTransportsFiltered[$x]->shipping->order_id . '" style="font-weight: bold;">Sargyt #' . $shippingTransportsFiltered[$x]->shipping->order_id . '</a></td>
<td>' . $shippingTransportsFiltered[$x]->place_now . '</td>
@ -263,6 +272,9 @@ class Order extends ComponentBase
->withCount(['order_items as order_all_price' => function ($query) {
$query->select(DB::raw('sum(price) * sum(amount) / qty'));
}])
->withCount(['payment as all_payments' => function ($query) {
$query->select(DB::raw('sum(amount)'));
}])
->orderBy('id', 'DESC')
->get();
@ -276,6 +288,17 @@ class Order extends ComponentBase
$editBtn = $crudOrderq ? '<a href="#" data-request="onDeleteOrder" data-request-confirm="Sargyt #' . $orderDatas[$x]->id . ' pozmak isleýäňizmi?" data-request-data="orderId: ' . $orderDatas[$x]->id . '" style="color: darkred;font-weight: bold;">POZ</a>' : '';
}
$mustPay = '';
$mustPayCalc = number_format(($orderDatas[$x]->order_all_price - $orderDatas[$x]->all_payments), 2);
if($mustPayCalc < 0){
$mustPay = 'artykmaç '.abs($mustPayCalc).' $';
}else if($mustPayCalc == 0){
$mustPay = '';
} else{
$mustPay = $mustPayCalc.' $';
}
$html_data .= '<tr>
<td style="font-weight: bold;">' . ($x + 1) . '</td>
<td><a href="/order-detail/' . $orderDatas[$x]->id . '" style="font-weight: bold;">Sargyt #' . $orderDatas[$x]->id . '</a></td>
@ -288,7 +311,7 @@ class Order extends ComponentBase
<td><span class="badge badge-soft-success"
style="font-size: 14px;">' . number_format($orderDatas[$x]->all_payments) . ' $</span>
</td>
<td><a href="#" class="badge badge-soft-danger" style="font-size: 14px;">' . number_format($orderDatas[$x]->order_all_price - $orderDatas[$x]->all_payments) . ' $</a>
<td><a href="#" class="badge badge-soft-danger" style="font-size: 14px;">' . $mustPay . '</a>
</td>
<td>' . $orderDatas[$x]->created_at->format('d.m.Y') . '</td>
<td>' . $orderDatas[$x]->note . '</td>

View File

@ -136,10 +136,10 @@ class OrderItem extends ComponentBase
$loadedAmount = ModelsLoadTransport::where('order_item_id', $orderItems[$x]->id)->sum('loaded_amount');
if($loadedAmount > $orderItems[$x]->amount){
$diffLoaded = ($loadedAmount - $orderItems[$x]->amount);
$diffLoaded = number_format(($loadedAmount - $orderItems[$x]->amount), 2);
$status = '<font style="color: darkgreen;">Tamamlandy (+'.$diffLoaded.')</font';
}else if($loadedAmount < $orderItems[$x]->amount){
$diffLoaded = ($orderItems[$x]->amount - $loadedAmount);
$diffLoaded = number_format(($orderItems[$x]->amount - $loadedAmount), 2);
$status = '<font style="color: darkred;">Ýetmezçilik (-'.$diffLoaded.')</font';
}else if($loadedAmount == $orderItems[$x]->amount){
$status = '<font style="color: darkgreen;">Tamalandy</font';

View File

@ -113,7 +113,7 @@ class Production extends ComponentBase
$pivotIds = PivotProductionModel::whereIn('production_id', $calculationAmountqq)->get()->pluck('id')->toArray();
$calculationAmount = ProductionCalculateModel::whereIn('prev_pivot_id', $pivotIds)->sum("amount_calc");
$calculationAmount = ProductionCalculateModel::whereIn('production_id', $calculationAmountqq)->sum("amount_calc");
$calcHours = $productionsCalcPivot->orderBy('date', 'DESC')->orderBy('time', 'DESC')->get();

View File

@ -250,6 +250,15 @@ items:
isHidden: '0'
cssClass: ''
isExternal: '0'
-
title: 'Hasabat 2'
type: cms-page
code: extrudorProduction
reference: production/daily-seperate
viewBag:
isHidden: '0'
cssClass: ''
isExternal: '0'
-
title: 'Aýlar Boýunça'
nesting: null
@ -344,9 +353,13 @@ items:
isExternal: '0'
-
title: 'Rulon Halta Hasabaty'
nesting: null
type: cms-page
url: null
code: productionRulon
reference: machine/rulon-bags
cmsPage: null
replace: null
viewBag:
isHidden: '0'
cssClass: ''
@ -406,9 +419,13 @@ items:
isExternal: '0'
-
title: 'Görnüş Hasabaty'
nesting: null
type: cms-page
url: null
code: sewerProduction
reference: actions/bag-report
cmsPage: null
replace: null
viewBag:
isHidden: '0'
cssClass: ''

View File

@ -35,20 +35,16 @@ function onStart() {
$action = Romanah\Gokbakja\Models\RulonAction::select('romanah_gokbakja_rulon_action.*')
->with('product')
->whereYear('created_at', $year)
->whereMonth('created_at', $this["month"])
->whereHas('product', function($qq) use($rulonProds, $x){
$qq->where('gram', $rulonProds[$x]->gram)->where('width', $rulonProds[$x]->width);
$qq->where('gram', $rulonProds[$x]->gram)->where('width', $rulonProds[$x]->width)->whereYear('date', $year)->whereMonth('date', $this["month"]);
})
->sum('amount');
$actionIn = Romanah\Gokbakja\Models\RulonAction::select('romanah_gokbakja_rulon_action.*')
->with('product')
->where('type', 'inbox')
->whereYear('created_at', $year)
->whereMonth('created_at', $this["month"])
->whereHas('product', function($qq) use($rulonProds, $x){
$qq->where('gram', $rulonProds[$x]->gram)->where('width', $rulonProds[$x]->width);
$qq->where('gram', $rulonProds[$x]->gram)->where('width', $rulonProds[$x]->width)->whereYear('date', $year)->whereMonth('date', $this["month"]);
})
->sum('amount');
@ -56,10 +52,8 @@ function onStart() {
$actionOut = Romanah\Gokbakja\Models\RulonAction::select('romanah_gokbakja_rulon_action.*')
->with('product')
->where('type', 'outbox')
->whereYear('created_at', $year)
->whereMonth('created_at', $this["month"])
->whereHas('product', function($qq) use($rulonProds, $x){
$qq->where('gram', $rulonProds[$x]->gram)->where('width', $rulonProds[$x]->width);
$qq->where('gram', $rulonProds[$x]->gram)->where('width', $rulonProds[$x]->width)->whereYear('date', $year)->whereMonth('date', $this["month"]);
})
->sum('amount');
@ -87,20 +81,16 @@ function onStart() {
$action = Romanah\Gokbakja\Models\RulonAction::select('romanah_gokbakja_rulon_action.*')
->with('product')
->whereYear('created_at', $currentDate->year)
->whereMonth('created_at', $this["month"])
->whereHas('product', function($qq) use($rulonProds, $x){
$qq->where('gram', $rulonProds[$x]->gram)->where('width', $rulonProds[$x]->width);
->whereHas('product', function($qq) use($rulonProds, $x, $currentDate){
$qq->where('gram', $rulonProds[$x]->gram)->where('width', $rulonProds[$x]->width)->whereYear('date', $currentDate->year)->whereMonth('date', $this["month"]);
})
->sum('amount');
$actionIn = Romanah\Gokbakja\Models\RulonAction::select('romanah_gokbakja_rulon_action.*')
->with('product')
->where('type', 'inbox')
->whereYear('created_at', $currentDate->year)
->whereMonth('created_at', $this["month"])
->whereHas('product', function($qq) use($rulonProds, $x){
$qq->where('gram', $rulonProds[$x]->gram)->where('width', $rulonProds[$x]->width);
->whereHas('product', function($qq) use($rulonProds, $x, $currentDate){
$qq->where('gram', $rulonProds[$x]->gram)->where('width', $rulonProds[$x]->width)->whereYear('date', $currentDate->year)->whereMonth('date', $this["month"]);
})
->sum('amount');
@ -108,10 +98,8 @@ function onStart() {
$actionOut = Romanah\Gokbakja\Models\RulonAction::select('romanah_gokbakja_rulon_action.*')
->with('product')
->where('type', 'outbox')
->whereYear('created_at', $currentDate->year)
->whereMonth('created_at', $this["month"])
->whereHas('product', function($qq) use($rulonProds, $x){
$qq->where('gram', $rulonProds[$x]->gram)->where('width', $rulonProds[$x]->width);
->whereHas('product', function($qq) use($rulonProds, $x, $currentDate){
$qq->where('gram', $rulonProds[$x]->gram)->where('width', $rulonProds[$x]->width)->whereYear('date', $currentDate->year)->whereMonth('date', $this["month"]);
})
->sum('amount');

View File

@ -93,7 +93,7 @@ function onStart(){
<div class="row">
{% if crudProductionRulon %}
<div class="col-md-12">
<div class="collapse multi-collapse" id="multiCollapseExample1">
<div class="collapse multi-collapse show" id="multiCollapseExample1">
<div class="card card-body">
<form data-request="onCreateMachineProduction" data-request-flash>

View File

@ -26,7 +26,16 @@ function onStart(){
if($count > 0){
$this["all"] = ($this["order"]->order_all_amount * $this["order"]->order_all_price) / $count;
}
$this["orderItems"] = Romanah\Gokbakja\Models\OrderItem::where("order_id", $orderId)->orderBy("id", "DESC")->with(["type", "size", "color"])->get();
$orderItems = Romanah\Gokbakja\Models\OrderItem::where("order_id", $orderId)->orderBy("id", "DESC")->with(["type", "size", "color"])->get();
$sumOfPrice = 0;
for ($x = 0; $x < count($orderItems); $x++) {
$sumOfPrice = ($sumOfPrice + ($orderItems[$x]->amount * $orderItems[$x]->price));
}
$this["sumOfPrice"] = $sumOfPrice;
$this["sizes"] = Romanah\Gokbakja\Models\BagSize::get();
$this["types"] = Romanah\Gokbakja\Models\BagType::get();
@ -184,7 +193,7 @@ function onStart(){
</div>
{% partial "order/item_header" contract_no=order.contract_no orderId=order.id clientName=order.client.name
allAmount=order.order_all_amount allPrice=order.order_all_price all=all %}
allAmount=order.order_all_amount allPrice=order.order_all_price all=sumOfPrice %}
<div class="card">

View File

@ -29,6 +29,16 @@ function onStart(){
$this["orderItems"] = Romanah\Gokbakja\Models\OrderItem::where("order_id", $orderId)->get();
$orderItems = Romanah\Gokbakja\Models\OrderItem::where("order_id", $orderId)->orderBy("id", "DESC")->with(["type", "size", "color"])->get();
$sumOfPrice = 0;
for ($x = 0; $x < count($orderItems); $x++) {
$sumOfPrice = ($sumOfPrice + ($orderItems[$x]->amount * $orderItems[$x]->price));
}
$this["sumOfPrice"] = $sumOfPrice;
$this["transports"] = Romanah\Gokbakja\Models\ShippingTransport::where("shipping_id", $this["order"]->shipping_id)->with('shipping.order')->with('order_item')->orderBy("id", "DESC")->get();
@ -134,7 +144,7 @@ function onStart(){
</div>
{% partial "order/item_header" contract_no=order.contract_no orderId=order.id clientName=order.client.name
allAmount=order.order_all_amount allPrice=order.order_all_price all=all %}
allAmount=order.order_all_amount allPrice=order.order_all_price all=sumOfPrice %}
<div class="card">

View File

@ -30,7 +30,25 @@ function onStart(){
$this["payments"] = Romanah\Gokbakja\Models\Payment::where("order_id", $orderId)->with('order')->orderBy("id", "DESC")->get();
$this["allPaid"] = Romanah\Gokbakja\Models\Payment::where("order_id", $orderId)->sum("amount");
$this["allNot"] = ($this["all"] - $this["allPaid"]);
$orderItems = Romanah\Gokbakja\Models\OrderItem::where("order_id", $orderId)->orderBy("id", "DESC")->with(["type", "size", "color"])->get();
$sumOfPrice = 0;
for ($x = 0; $x < count($orderItems); $x++) {
$sumOfPrice = ($sumOfPrice + ($orderItems[$x]->amount * $orderItems[$x]->price));
}
$this["sumOfPrice"] = $sumOfPrice;
$allNot = ($sumOfPrice - $this["allPaid"]);
$this["allNot"] = "";
if($allNot < 0){
$this["allNot"] = abs($allNot).' $ artyk tölenen';
}else{
$this["allNot"] = 'Bergisi: '.$allNot.' $';
}
}
?>
@ -125,7 +143,7 @@ function onStart(){
</div>
{% partial "order/item_header" contract_no=order.contract_no orderId=order.id clientName=order.client.name
allAmount=order.order_all_amount allPrice=order.order_all_price all=all %}
allAmount=order.order_all_amount allPrice=order.order_all_price all=sumOfPrice %}
<div class="card">
@ -134,8 +152,15 @@ function onStart(){
<div class="row">
<div class="col-md-6">
<h3 class="card-title" style="font-size: 22px;color: #1e2038;">Sargyt Töleg Maglumatlary</h3>
<p class="card-title-desc" style="color: #00577f;font-size: 17px;margin-bottom: 0px;" >Tölemeli Mukdary: {{sumOfPrice|number_format}} $</p>
<hr>
<p class="card-title-desc" style="color: darkgreen;font-size: 17px;margin-bottom: 0px;" id="all_payment">Jemi Tölenen Töleg: {{allPaid|number_format}} $</p>
<p class="card-title-desc" style="color: darkred;font-size: 17px;" id="all_not">Bergisi: {{allNot|number_format}} $</p>
<p class="card-title-desc" style="color: darkred;font-size: 17px;" id="all_not">
{{allNot}}
</p>
</div>
<div class="col-md-6" style="text-align: right;">
{% if crudOrders %}

View File

@ -0,0 +1,290 @@
title = "production/daily-seperate"
url = "/production/daily-seperate/:month/:year?"
layout = "platform_main"
is_hidden = 0
==
<?php
function onStart() {
$currentDate = Carbon\Carbon::now();
$this["month"] = $this->param("month");
$year = $this->param("year");
if($this["month"] == 'default'){
$this["month"] = $currentDate->month;
}
$reportDatas = [];
$productionDates = Romanah\Gokbakja\Models\production::select('date', 'excruiter_id')
->whereMonth('date', $this["month"])
->whereYear('date', $currentDate->year)
->with('excruiter')
->groupBy('date')
->groupBy('excruiter_id')
->orderBy('date', 'ASC')
->distinct()
->get();
for ($x = 0; $x < count($productionDates); $x++) {
$sumDiff = Romanah\Gokbakja\Models\ProductionCalculate::where('date', $productionDates[$x]->date)->where('excruiter_id', $productionDates[$x]->excruiter_id);
$sumDiff2 = Romanah\Gokbakja\Models\ProductionCalculate::where('date', $productionDates[$x]->date)->where('excruiter_id', $productionDates[$x]->excruiter_id);
//dd($lastId1);
$shift1 = $sumDiff->where('shift_id', 1)->sum('amount_calc');
$shift2 = $sumDiff2->where('shift_id', 2)->sum('amount_calc');
$reportDatas[$x]["date"] = $productionDates[$x]->date;
$reportDatas[$x]["shift1"] = $shift1;
$reportDatas[$x]["shift2"] = $shift2;
$reportDatas[$x]["extrudor"] = $productionDates[$x]->excruiter->name;
$reportDatas[$x]["all_shift_calc"] = ($shift1 + $shift2);
$products_all = $sumDiff->with('product')->groupBy('product_id')->get();
for ($xx = 0; $xx < count($products_all); $xx++) {
$sumDiffq = Romanah\Gokbakja\Models\ProductionCalculate::whereDate('date', $productionDates[$x]->date)->where('shift_id', 1)->where('excruiter_id', $productionDates[$x]->excruiter_id);
$sumDiff2q = Romanah\Gokbakja\Models\ProductionCalculate::whereDate('date', $productionDates[$x]->date)->where('shift_id', 2)->where('excruiter_id', $productionDates[$x]->excruiter_id);
$products_amount1 = $sumDiffq->where('product_id', $products_all[$xx]->product_id)->sum('amount_calc');
$products_amount2 = $sumDiff2q->where('product_id', $products_all[$xx]->product_id)->sum('amount_calc');
$reportDatas[$x]["products_shift1"][$xx]["product_code"] = $products_all[$xx]->product->code;
$reportDatas[$x]["products_shift1"][$xx]["product_value"] = $products_amount1;
$reportDatas[$x]["products_shift2"][$xx]["product_code"] = $products_all[$xx]->product->code;
$reportDatas[$x]["products_shift2"][$xx]["product_value"] = $products_amount2;
}
$reportDatas[$x]["count_change1"] = $sumDiff->where('shift_id', 1)->groupBy('product_id')->count();
$reportDatas[$x]["count_change2"] = $sumDiff2->where('shift_id', 2)->groupBy('product_id')->count();
}
$this["reportDatas"] = $reportDatas;
//dd($reportDatas);
if($year){
}else{
$reportDatas = [];
}
}
?>
==
{% 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">
<div class="mail-list mt-4">
<a href="/production/daily-seperate/1" class="{{ month == 1 ? 'active' : '' }}"><i
class="mdi mdi-archive me-2 font-size-16"></i> Ýanwar</a>
<a href="/production/daily-seperate/2" class="{{ month == 2 ? 'active' : '' }}"><i
class="mdi mdi-archive me-2 font-size-16"></i> Fewral</a>
<a href="/production/daily-seperate/3" class="{{ month == 3 ? 'active' : '' }}"><i
class="mdi mdi-archive me-2 font-size-16"></i> Mart</a>
<a href="/production/daily-seperate/4" class="{{ month == 4 ? 'active' : '' }}"><i
class="mdi mdi-archive me-2 font-size-16"></i> Aprel</a>
<a href="/production/daily-seperate/5" class="{{ month == 5 ? 'active' : '' }}"><i
class="mdi mdi-archive me-2 font-size-16"></i> Maý</a>
<a href="/production/daily-seperate/6" class="{{ month == 6 ? 'active' : '' }}"><i
class="mdi mdi-archive me-2 font-size-16"></i> Iýun</a>
<a href="/production/daily-seperate/7" class="{{ month == 7 ? 'active' : '' }}"><i
class="mdi mdi-archive me-2 font-size-16"></i> Iýul</a>
<a href="/production/daily-seperate/8" class="{{ month == 8 ? 'active' : '' }}"><i
class="mdi mdi-archive me-2 font-size-16"></i> Awgust</a>
<a href="/production/daily-seperate/9" class="{{ month == 9 ? 'active' : '' }}"><i
class="mdi mdi-archive me-2 font-size-16"></i> Sentýabr</a>
<a href="/production/daily-seperate/10" class="{{ month == 10 ? 'active' : '' }}"><i
class="mdi mdi-archive me-2 font-size-16"></i> Oktýabr</a>
<a href="/production/daily-seperate/11" class="{{ month == 11 ? 'active' : '' }}"><i
class="mdi mdi-archive me-2 font-size-16"></i> Noýabr</a>
<a href="/production/daily-seperate/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='13'>
<thead>
<tr>
<th style="width: 5%;"></th>
<th>Senesi</th>
<th>Ekstrudor</th>
<th>Smen</th>
<th>Mukdary (kg)</th>
<th>HARYTLAR (kg)</th>
<th>Jemi</th>
<th>Üýtgedilen</th>
<!-- <th>Настройки</th> -->
</tr>
</thead>
<tbody>
{% set all_calculate = 0 %}
{% set all_changed = 0 %}
{% for key, report in reportDatas %}
{% set all_calculate = (all_calculate + report.all_shift_calc) %}
{% set all_changed = (all_changed + (report.count_change1 + report.count_change2)) %}
<tr>
<td style="font-weight: bold;">{{key + 1}}</td>
<td><a href="#" style="font-weight: bold;">{{report.date|date('d.m.Y')}}</a></td>
<td>
<div class="row">
<div class="col-12" style="padding-bottom: 10px;">
<font style="font-weight: {{report.extrudor == 'Lorex' ? 'bold' : 'regular'}};">
{{report.extrudor}}
</font>
</div>
</div>
</td>
<td>
<div class="row">
<div class="col-12" style="padding-bottom: 10px;">
Gündiz (1)
</div>
<div class="col-12" style="border-top: 1px solid gray;padding-top: 10px;">
Gije (2)
</div>
</div>
</td>
<td style="color: darkgreen;">
<div class="row">
<div class="col-12" style="padding-bottom: 10px;">
{{report.shift1|number_format}}
</div>
<div class="col-12" style="border-top: 1px solid gray;padding-top: 10px;">
{{report.shift2|number_format}}
</div>
</div>
</td>
<td style="color: darkred;">
<div class="row">
<div class="col-12">
<div class="row">
{% for product_report1 in report.products_shift1 %}
<div class="col" style="padding-bottom: 10px;">
<font style="font-weight: bold;">
{{product_report1.product_code}}:</font>
{{product_report1.product_value|number_format}}
</div>
{% endfor %}
</div>
</div>
<div class="col-12" style="border-top: 1px solid gray;">
<div class="row">
{% for product_report2 in report.products_shift2 %}
<div class="col" style="padding-bottom: 10px;">
<font style="font-weight: bold;">
{{product_report2.product_code}}:</font>
{{product_report2.product_value|number_format}}
</div>
{% endfor %}
</div>
</div>
</td>
<td style="color: darkgreen;">
<div class="row">
<div class="col-12" style="padding-bottom: 10px;">
{{report.all_shift_calc|number_format}}
</div>
</div>
</td>
<td style="color: darkred;">
<div class="row">
<div class="col-12" style="padding-bottom: 10px;">
{{report.count_change1}}
</div>
<div class="col-12" style="border-top: 1px solid gray;">
{{report.count_change2}}
</div>
</div>
</td>
</tr>
{% endfor %}
</tbody>
<tfoot>
<tr>
<th colspan="4">HEMMESI: </th>
<th>{{all_calculate|number_format}} kg</th>
<th>HARYTLAR</th>
<th>{{all_calculate|number_format}} kg</th>
<th>{{all_changed}}</th>
<!-- <th>Настройки</th> -->
</tr>
</tfoot>
</table>
</div>
</div> <!-- card -->
</div>
</div>
</div>
<!-- End row -->
</div>
{% partial 'dataTableJs' %}

View File

@ -123,7 +123,7 @@ function onStart(){
<th style="width: 5%;"></th>
<th>Senesi</th>
<th>Smen</th>
<th>Ekskruiter</th>
<th>Ekstrudor</th>
<th>Hemmesi</th>
<th>HARYTLAR</th>
<th>Bellik</th>
@ -142,7 +142,7 @@ function onStart(){
<th style="width: 5%;"></th>
<th>Senesi</th>
<th>Smen</th>
<th>Ekskruiter</th>
<th>Ekstrudor</th>
<th>Hemmesi</th>
<th>HARYTLAR</th>
<th>Bellik</th>

View File

@ -57,7 +57,7 @@
</div>
<div class="flex-grow-1 align-self-center overflow-hidden">
<h5 id="allPrice">Jemi Bahasy: {{all|number_format}} $</h5>
<p class="text-muted mb-0" id="all">{{allPrice}} $</p>
<!-- <p class="text-muted mb-0" id="all">{{allPrice}} $</p> -->
</div>
</div>
</div>