diff --git a/plugins/romanah/gokbakja/components/Sewer.php b/plugins/romanah/gokbakja/components/Sewer.php
index 2ce8841..fb45423 100644
--- a/plugins/romanah/gokbakja/components/Sewer.php
+++ b/plugins/romanah/gokbakja/components/Sewer.php
@@ -376,17 +376,30 @@ class Sewer extends ComponentBase
$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"];
+
$status = $data["status"];
$width = $data["width"];
$height = $data["height"];
$color_id = $data["color_id"];
$bag_gram = $data["bag_gram"];
+ $shift_id = $data["shift_id"];
+ $sewer_machine_id = $data["sewer_machine_id"];
+
+ if ($shift_id) {
+ $sewerProductions->where("shift_id", $shift_id);
+ }
+
+ if ($sewer_machine_id) {
+ $sewerProductions->where("sewer_machine_id", $sewer_machine_id);
+ }
+
+ if ($shift_id) {
+ $sewerProductions->where("shift_id", $shift_id);
+ }
+
if ($height) {
$sewerProductions->where("height", $height);
}
@@ -395,9 +408,6 @@ class Sewer extends ComponentBase
$sewerProductions->where("width", $width);
}
- if ($employee) {
- $sewerProductions->where("employee_id", $employee);
- }
if ($status) {
$sewerProductions->with("pivot_sewer")->whereHas('pivot_sewer', function ($query) use ($status) {
@@ -419,14 +429,6 @@ class Sewer extends ComponentBase
- if ($min) {
- $sewerProductions->whereRaw('produced_bag_qty >' . ($min - 1));
- }
-
- if ($max) {
- $sewerProductions->whereRaw('produced_bag_qty <' . ($max + 1));
- }
-
if ($start != $currentDateFormat) {
@@ -439,6 +441,7 @@ class Sewer extends ComponentBase
$sewerProductionsSumBagQty = $sewerProductions->sum("produced_bag_qty");
$sewerProductionsSumDefectiveBagQty = $sewerProductions->sum("defective_bag_qty");
+ $sewerProductionsSumDefectiveBagQtyRepair = $sewerProductions->sum("defective_repair_qty");
$sewerProductionsamount = PivotSewer::whereIn("sewer_production_id", $sewerIds)->sum("spent_amount");
// dd($sewerProductionsamount->spentAmount);
@@ -457,54 +460,64 @@ class Sewer extends ComponentBase
$html_data .= '
| ' . ($x + 1) . ' |
+ ' . $dateTitle . ' |
#Dikiş' . $sewerDatas[$x]->id . ' |
- ini: ' . ($sewerDatas[$x]->width ?? "") . '- boyy:' . ($sewerDatas[$x]->height ?? "") . '
- |
#Rulon' . $sewerDatas[$x]->pivot_sewer[0]->rulon_action->product_id . '- ' . ($sewerDatas[$x]->pivot_sewer[0]->rulon_action->product->bag_size->width ?? "") . 'x' . ($sewerDatas[$x]->pivot_sewer[0]->rulon_action->product->bag_size->height ?? "") . 'm2, ' . ($sewerDatas[$x]->pivot_sewer[0]->rulon_action->product->bag_type->name ?? "") . ', ' . ($sewerDatas[$x]->pivot_sewer[0]->rulon_action->product->color->name ?? "") . '
|
- ' . $sewerDatas[$x]->employee->name . ' |
- ' . $dateTitle . ' |
- ' . (number_format($sewerDatas[$x]->pivot_sewer[0]->bag_gram ?? 0, 2)) . ' gr |
' . number_format($sewerDatas[$x]->pivot_sewer[0]->amount, 2) . ' kg
|
- ' . $sewerDatas[$x]->produced_bag_qty . ' |
- ' . ($sewerDatas[$x]->defective_bag_qty ?? ''). ' |
+ ini: ' . ($sewerDatas[$x]->width ?? "") . '- boyy:' . ($sewerDatas[$x]->height ?? "") . '
+ |
+
+
+ ' . ($sewerDatas[$x]->sewer_machine->name ?? "") . ' |
+
+
+ ' . (number_format($sewerDatas[$x]->pivot_sewer[0]->bag_gram ?? 0, 2)) . ' gr |
+
+ ' . ($sewerDatas[$x]->produced_bag_qty ?? 0) . ' |
+ ' . ($sewerDatas[$x]->defective_bag_qty ?? 0) . ' |
+ ' . ($sewerDatas[$x]->defective_repair_qty ?? 0) . ' |
' . number_format($sewerDatas[$x]->pivot_sewer[0]->spent_amount, 2) . ' kg |
' . number_format($sewerDatas[$x]->pivot_sewer[0]->left_amount, 2) . ' kg |
' . $statusTitle . ' |
- ' . $sewerDatas[$x]->note . ' |
+ ' . $sewerDatas[$x]->note . ' turba: '.$sewerDatas[$x]->pipe_weight.' |
';
}
if ($sewerDatas) {
return [
'#sewer_report_datas' => $html_data,
- '#all_amount' => '
-
Tikinçiler Boýunça Umumy
-
Hasabat
-
+ '#all_amount' => '
-
Jemi Dikilen Halta: ' . number_format($sewerProductionsSumBagQty) . ' sany
+ Dikilen Halta: ' . number_format($sewerProductionsSumBagQty) . ' sany
-
Jemi BRAK Halta: ' . number_format($sewerProductionsSumDefectiveBagQty) . ' sany
+ BRAK Halta: ' . number_format($sewerProductionsSumDefectiveBagQty) . ' sany
+
+
+
+
+
+
+
Sürülmedik Halta: ' . number_format($sewerProductionsSumDefectiveBagQtyRepair) . ' sany
-
Jemi Sarp Edilen Çig mal: ' . number_format($sewerProductionsamount, 2) . ' kg
+ Sarp Edilen Çig mal: ' . number_format($sewerProductionsamount, 2) . ' kg
',
diff --git a/themes/gokbakja/pages/sewer/new.htm b/themes/gokbakja/pages/sewer/new.htm
index d2a6c5c..0dff629 100644
--- a/themes/gokbakja/pages/sewer/new.htm
+++ b/themes/gokbakja/pages/sewer/new.htm
@@ -178,10 +178,10 @@ function onStart(){
No |
Senesi |
Önümçilik No |
- Berilen Rulon |
- Halta Maglumaty |
- Tikilen Halta |
- Ulanylan Rulon |
+ Berilen Rulon |
+ Halta Maglumaty |
+ Tikilen Halta |
+ Ulanylan Rulon |
Status |
Bellik |
Sazlamalar |
@@ -216,16 +216,16 @@ function onStart(){
№ |
Senesi |
Önümçilik No |
- Rulon Görnüş |
- Çig mal mukdary |
- Halta Görnüş |
- Stanok |
- Gram |
- Halta (arassa) |
- BRAK Halta |
- Sürülmedik |
- Ulanylan |
- Galyndy |
+ Rulon Görnüş |
+ Çig mal mukdary |
+ Halta Görnüş |
+ Stanok |
+ Gram |
+ Halta (arassa) |
+ BRAK Halta |
+ Sürülmedik |
+ Ulanylan |
+ Galyndy |
Status |
Bellik |
Sazlamalar |
diff --git a/themes/gokbakja/pages/sewer/report.htm b/themes/gokbakja/pages/sewer/report.htm
index f57308d..f5d683e 100644
--- a/themes/gokbakja/pages/sewer/report.htm
+++ b/themes/gokbakja/pages/sewer/report.htm
@@ -7,6 +7,8 @@ is_hidden = 0
==
where("is_sewer", 1)->get();
@@ -38,11 +40,21 @@ function onStart(){
-
-
+
+
+
+
+
+ {% for sewerMachine in sewerMachines %}
+
{% endfor %}
@@ -103,18 +115,8 @@ function onStart(){
-
+
-
-
-
-
-
-
-
-
-
-
@@ -151,20 +153,33 @@ function onStart(){
style="border-collapse: collapse; border-spacing: 0; width: 100%;" data-page-length='13'>
- | № |
- Önümçilik No |
- Halta Görnüş |
+ No |
+ Senesi |
+ Önümçilik No |
+ Berilen Rulon |
+ Halta Maglumaty |
+ Tikilen Halta |
+ Ulanylan Rulon |
+ Status |
+ Bellik |
+
+
+
+
| Rulon Görnüş |
- Tikinçi |
- Senesi |
- Gram |
Çig mal mukdary |
- Tikilen Halta |
+ Halta Görnüş |
+
+ Stanok |
+ Gram |
+
+ Halta (arassa) |
BRAK Halta |
+ Sürülmedik |
Ulanylan |
Galyndy |
- Status |
- Bellik |
+
+
@@ -175,17 +190,18 @@ function onStart(){
| № |
- Önümçilik No |
- Halta Görnüş |
- Rulon Görnüş |
- Tikinçi |
Senesi |
- Gram |
- Çig mal mukdary |
- Tikilen Halta |
- BRAK Halta |
- Ulanylan |
- Galyndy |
+ Önümçilik No |
+ Rulon Görnüş |
+ Çig mal mukdary |
+ Halta Görnüş |
+ Stanok |
+ Gram |
+ Halta (arassa) |
+ BRAK Halta |
+ Sürülmedik |
+ Ulanylan |
+ Galyndy |
Status |
Bellik |