From 5afee5e07056485a32657a9770892a418c047667 Mon Sep 17 00:00:00 2001 From: Shohrat Date: Wed, 27 Dec 2023 12:09:21 +0500 Subject: [PATCH] updated 27_12 --- .gitignore | 2 ++ config/database.php | 2 +- plugins/romanah/gokbakja/components/Production.php | 2 +- themes/gokbakja/pages/machine/machine.htm | 2 +- themes/gokbakja/pages/production/daily-seperate.htm | 4 ++++ 5 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 63a1b61..5450e5b 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,8 @@ composer.phar composer.lock +/config + # Framework ignores .env .env.*.php diff --git a/config/database.php b/config/database.php index cd32e88..d3c2a09 100644 --- a/config/database.php +++ b/config/database.php @@ -57,7 +57,7 @@ return [ 'engine' => 'InnoDB', 'host' => 'localhost', 'port' => 3306, - 'database' => 'gok_bakja_from_server', + 'database' => 'gok_bakja_from_server2', 'username' => 'root', 'password' => 'bt110226', 'charset' => 'utf8mb4', diff --git a/plugins/romanah/gokbakja/components/Production.php b/plugins/romanah/gokbakja/components/Production.php index 4dcfedc..f7f13e8 100644 --- a/plugins/romanah/gokbakja/components/Production.php +++ b/plugins/romanah/gokbakja/components/Production.php @@ -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(); diff --git a/themes/gokbakja/pages/machine/machine.htm b/themes/gokbakja/pages/machine/machine.htm index 2975861..9ce7a04 100644 --- a/themes/gokbakja/pages/machine/machine.htm +++ b/themes/gokbakja/pages/machine/machine.htm @@ -93,7 +93,7 @@ function onStart(){
{% if crudProductionRulon %}
-
+
diff --git a/themes/gokbakja/pages/production/daily-seperate.htm b/themes/gokbakja/pages/production/daily-seperate.htm index 42b82a5..7edc82d 100644 --- a/themes/gokbakja/pages/production/daily-seperate.htm +++ b/themes/gokbakja/pages/production/daily-seperate.htm @@ -34,6 +34,9 @@ function onStart() { $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'); @@ -48,6 +51,7 @@ function onStart() { $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);