fix bugs
This commit is contained in:
parent
30cf0850a6
commit
58a65e05bf
|
|
@ -222,8 +222,8 @@ class LoadTransport extends ComponentBase
|
||||||
->where('color_id', $color);
|
->where('color_id', $color);
|
||||||
})
|
})
|
||||||
->where("stock_id", $stock->id)
|
->where("stock_id", $stock->id)
|
||||||
->where("status_accountant", "accept")
|
//->where("status_accountant", "accept")
|
||||||
->where("status_director", "accept")
|
//->where("status_director", "accept")
|
||||||
->sum('amount');
|
->sum('amount');
|
||||||
|
|
||||||
$products = '';
|
$products = '';
|
||||||
|
|
@ -241,8 +241,8 @@ class LoadTransport extends ComponentBase
|
||||||
$q->with(['bag_type', 'bag_size', 'color']);
|
$q->with(['bag_type', 'bag_size', 'color']);
|
||||||
}])
|
}])
|
||||||
->where("stock_id", $stock->id)
|
->where("stock_id", $stock->id)
|
||||||
->where("status_accountant", "accept")
|
//->where("status_accountant", "accept")
|
||||||
->where("status_director", "accept")
|
//->where("status_director", "accept")
|
||||||
->addSelect(DB::raw("SUM(amount) as quantity"))
|
->addSelect(DB::raw("SUM(amount) as quantity"))
|
||||||
->groupBy('romanah_gokbakja_rulon_action.product_id')
|
->groupBy('romanah_gokbakja_rulon_action.product_id')
|
||||||
->orderBy('id', 'DESC')
|
->orderBy('id', 'DESC')
|
||||||
|
|
@ -283,8 +283,8 @@ class LoadTransport extends ComponentBase
|
||||||
$qqq->where('width', $bag_width)->where('height', $bag_height);
|
$qqq->where('width', $bag_width)->where('height', $bag_height);
|
||||||
})
|
})
|
||||||
->where("stock_id", $stock->id)
|
->where("stock_id", $stock->id)
|
||||||
->where("status_accountant", "accept")
|
//->where("status_accountant", "accept")
|
||||||
->where("status_director", "accept")
|
//->where("status_director", "accept")
|
||||||
->sum('amount');
|
->sum('amount');
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -307,8 +307,8 @@ class LoadTransport extends ComponentBase
|
||||||
$qqq->where('width', $bag_width)->where('height', $bag_height);
|
$qqq->where('width', $bag_width)->where('height', $bag_height);
|
||||||
})
|
})
|
||||||
->where("stock_id", $stock->id)
|
->where("stock_id", $stock->id)
|
||||||
->where("status_accountant", "accept")
|
//->where("status_accountant", "accept")
|
||||||
->where("status_director", "accept")
|
//->where("status_director", "accept")
|
||||||
->addSelect(DB::raw("SUM(amount) as quantity"))
|
->addSelect(DB::raw("SUM(amount) as quantity"))
|
||||||
->groupBy('romanah_gokbakja_bag_actions.product_id')
|
->groupBy('romanah_gokbakja_bag_actions.product_id')
|
||||||
->orderBy('id', 'DESC')
|
->orderBy('id', 'DESC')
|
||||||
|
|
|
||||||
|
|
@ -91,6 +91,7 @@ class Order extends ComponentBase
|
||||||
<td style="font-weight: bold;">' . ($x + 1) . '</td>
|
<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>
|
<td><a href="/order-detail/' . $ordersFiltered[$x]->id . '" style="font-weight: bold;">Sargyt #' . $ordersFiltered[$x]->id . '</a></td>
|
||||||
<td><a href="/order-detail/' . $ordersFiltered[$x]->id . '" style="font-weight: bold;">' . $ordersFiltered[$x]->client->name . '</a></td>
|
<td><a href="/order-detail/' . $ordersFiltered[$x]->id . '" style="font-weight: bold;">' . $ordersFiltered[$x]->client->name . '</a></td>
|
||||||
|
<td><a href="/order-detail/' . $ordersFiltered[$x]->id . '" style="font-weight: bold;">' . $ordersFiltered[$x]->contract_no . '</a></td>
|
||||||
<td>' . $ordersFiltered[$x]->client->country . '</td>
|
<td>' . $ordersFiltered[$x]->client->country . '</td>
|
||||||
<td>' . number_format($ordersFiltered[$x]->order_all_amount) . ' kg</td>
|
<td>' . number_format($ordersFiltered[$x]->order_all_amount) . ' kg</td>
|
||||||
<td><span class="badge badge-soft-primary"
|
<td><span class="badge badge-soft-primary"
|
||||||
|
|
|
||||||
|
|
@ -376,6 +376,7 @@ class Sewer extends ComponentBase
|
||||||
$sewerIds = $sewerProductions->get()->pluck("id")->toArray();
|
$sewerIds = $sewerProductions->get()->pluck("id")->toArray();
|
||||||
|
|
||||||
$sewerProductionsSumBagQty = $sewerProductions->sum("produced_bag_qty");
|
$sewerProductionsSumBagQty = $sewerProductions->sum("produced_bag_qty");
|
||||||
|
$sewerProductionsSumDefectiveBagQty = $sewerProductions->sum("defective_bag_qty");
|
||||||
|
|
||||||
$sewerProductionsamount = PivotSewer::whereIn("sewer_production_id", $sewerIds)->sum("spent_amount");
|
$sewerProductionsamount = PivotSewer::whereIn("sewer_production_id", $sewerIds)->sum("spent_amount");
|
||||||
// dd($sewerProductionsamount->spentAmount);
|
// dd($sewerProductionsamount->spentAmount);
|
||||||
|
|
@ -407,6 +408,7 @@ class Sewer extends ComponentBase
|
||||||
style="font-size: 14px;">' . number_format($sewerDatas[$x]->pivot_sewer[0]->amount, 2) . ' kg</span>
|
style="font-size: 14px;">' . number_format($sewerDatas[$x]->pivot_sewer[0]->amount, 2) . ' kg</span>
|
||||||
</td>
|
</td>
|
||||||
<td>' . $sewerDatas[$x]->produced_bag_qty . '</td>
|
<td>' . $sewerDatas[$x]->produced_bag_qty . '</td>
|
||||||
|
<td>' . ($sewerDatas[$x]->defective_bag_qty ?? ''). '</td>
|
||||||
<td>' . number_format($sewerDatas[$x]->pivot_sewer[0]->spent_amount, 2) . ' kg</td>
|
<td>' . number_format($sewerDatas[$x]->pivot_sewer[0]->spent_amount, 2) . ' kg</td>
|
||||||
<td>' . number_format($sewerDatas[$x]->pivot_sewer[0]->left_amount, 2) . ' kg</td>
|
<td>' . number_format($sewerDatas[$x]->pivot_sewer[0]->left_amount, 2) . ' kg</td>
|
||||||
<td><span class="badge badge-soft-warning"
|
<td><span class="badge badge-soft-warning"
|
||||||
|
|
@ -419,7 +421,7 @@ class Sewer extends ComponentBase
|
||||||
if ($sewerDatas) {
|
if ($sewerDatas) {
|
||||||
return [
|
return [
|
||||||
'#sewer_report_datas' => $html_data,
|
'#sewer_report_datas' => $html_data,
|
||||||
'#all_amount' => '<div class="col-md-6">
|
'#all_amount' => '<div class="col-md-3">
|
||||||
<h3 class="card-title" style="font-size: 22px;color: #1e2038;">Tikinçiler Boýunça Umumy</h3>
|
<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>
|
<p class="card-title-desc" style="color: #6c6ff5;">Hasabat</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -430,6 +432,13 @@ class Sewer extends ComponentBase
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="col-md-3">
|
||||||
|
<div class="card bg-danger 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 BRAK Halta: ' . number_format($sewerProductionsSumDefectiveBagQty) . ' sany</h5>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
<div class="card bg-info text-white-50">
|
<div class="card bg-info text-white-50">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
|
|
|
||||||
|
|
@ -104,6 +104,7 @@ function onStart(){
|
||||||
<th style="width: 5%;">№</th>
|
<th style="width: 5%;">№</th>
|
||||||
<th>Sargyt No</th>
|
<th>Sargyt No</th>
|
||||||
<th>Klent</th>
|
<th>Klent</th>
|
||||||
|
<th>Şertnama nomer</th>
|
||||||
<th>Ýurdy</th>
|
<th>Ýurdy</th>
|
||||||
<th>Mukdary</th>
|
<th>Mukdary</th>
|
||||||
<th>Bahasy</th>
|
<th>Bahasy</th>
|
||||||
|
|
@ -122,6 +123,7 @@ function onStart(){
|
||||||
<th style="width: 5%;">№</th>
|
<th style="width: 5%;">№</th>
|
||||||
<th>Sargyt No</th>
|
<th>Sargyt No</th>
|
||||||
<th>Klent</th>
|
<th>Klent</th>
|
||||||
|
<th>Şertnama nomer</th>
|
||||||
<th>Ýurdy</th>
|
<th>Ýurdy</th>
|
||||||
<th>Mukdary</th>
|
<th>Mukdary</th>
|
||||||
<th>Bahasy</th>
|
<th>Bahasy</th>
|
||||||
|
|
|
||||||
|
|
@ -160,6 +160,7 @@ function onStart(){
|
||||||
<th>Gram</th>
|
<th>Gram</th>
|
||||||
<th>Çig mal mukdary</th>
|
<th>Çig mal mukdary</th>
|
||||||
<th>Tikilen Halta</th>
|
<th>Tikilen Halta</th>
|
||||||
|
<th>BRAK Halta</th>
|
||||||
<th>Ulanylan</th>
|
<th>Ulanylan</th>
|
||||||
<th>Galyndy</th>
|
<th>Galyndy</th>
|
||||||
<th>Status</th>
|
<th>Status</th>
|
||||||
|
|
@ -182,6 +183,7 @@ function onStart(){
|
||||||
<th>Gram</th>
|
<th>Gram</th>
|
||||||
<th>Çig mal mukdary</th>
|
<th>Çig mal mukdary</th>
|
||||||
<th>Tikilen Halta</th>
|
<th>Tikilen Halta</th>
|
||||||
|
<th>BRAK Halta</th>
|
||||||
<th>Ulanylan</th>
|
<th>Ulanylan</th>
|
||||||
<th>Galyndy</th>
|
<th>Galyndy</th>
|
||||||
<th>Status</th>
|
<th>Status</th>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue