drobika
This commit is contained in:
parent
e579f15ce6
commit
eb17dc61bd
|
|
@ -57,7 +57,7 @@ return [
|
|||
'engine' => 'InnoDB',
|
||||
'host' => 'localhost',
|
||||
'port' => 3306,
|
||||
'database' => 'gok_bakja_stock',
|
||||
'database' => 'gok_bakja_from_server',
|
||||
'username' => 'root',
|
||||
'password' => 'bt110226',
|
||||
'charset' => 'utf8mb4',
|
||||
|
|
|
|||
|
|
@ -108,6 +108,7 @@ tabs:
|
|||
orders: Sargytlar
|
||||
crudOrders: 'Sargytlar dolandyrmak'
|
||||
journal: Žurnal
|
||||
drobika: Drobika
|
||||
emptyOption: Sayla
|
||||
showSearch: true
|
||||
span: full
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ class Plugin extends PluginBase
|
|||
'Romanah\Gokbakja\Components\OrderItem' => 'orderItem',
|
||||
'Romanah\Gokbakja\Components\Journal' => 'journal',
|
||||
'Romanah\Gokbakja\Components\LoadTransport' => 'loadTransport',
|
||||
'Romanah\Gokbakja\Components\Drobika' => 'drobika',
|
||||
];
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,239 @@
|
|||
<?php
|
||||
|
||||
namespace Romanah\Gokbakja\Components;
|
||||
|
||||
use Cms\Classes\ComponentBase;
|
||||
use Redirect;
|
||||
use Flash;
|
||||
use Romanah\Gokbakja\Models\Drobika as ModelsDrobika;
|
||||
use Romanah\Gokbakja\Models\SewerProduction;
|
||||
use Carbon\Carbon;
|
||||
|
||||
class Drobika extends ComponentBase
|
||||
{
|
||||
|
||||
|
||||
public function componentDetails()
|
||||
{
|
||||
return [
|
||||
'name' => 'Drobika',
|
||||
'description' => 'Drobika settings'
|
||||
];
|
||||
}
|
||||
|
||||
public function onReportDrobika()
|
||||
{
|
||||
|
||||
$currentDate = Carbon::now();
|
||||
$currentDateFormat = $currentDate->format('Y-m-d');
|
||||
|
||||
$data = post();
|
||||
|
||||
|
||||
$drobikaProductions = ModelsDrobika::with(["shift", "product"])->orderBy('id', 'DESC');
|
||||
|
||||
$product = $data["product_id"];
|
||||
$shift_id = $data["shift_id"];
|
||||
$start = Carbon::parse($data["start"])->format('Y-m-d');
|
||||
$end = Carbon::parse($data["end"])->format('Y-m-d');
|
||||
|
||||
|
||||
if ($product) {
|
||||
$drobikaProductions->where("product_id", $product);
|
||||
}
|
||||
|
||||
if ($shift_id) {
|
||||
$drobikaProductions->where("shift_id", $shift_id);
|
||||
}
|
||||
|
||||
if ($start != $currentDateFormat) {
|
||||
$drobikaProductions->whereBetween('date', [$start, $end]);
|
||||
}
|
||||
|
||||
$drobikaDatas = $drobikaProductions->get();
|
||||
|
||||
|
||||
$sumProduced = $drobikaDatas->sum("produced_weight");
|
||||
$sumAmount = $drobikaDatas->sum("amount");
|
||||
|
||||
|
||||
$html_data = '';
|
||||
|
||||
for ($x = 0; $x < count($drobikaDatas); $x++) {
|
||||
$statusTitle = '';
|
||||
|
||||
$html_data .= '<tr>
|
||||
<td>'.($x+1).'</td>
|
||||
<td style="font-weight: bold;color: #0005c5;">'.$drobikaDatas[$x]->product->code.'</td>
|
||||
<td>'.$drobikaDatas[$x]->shift->desc.'</td>
|
||||
<td>'.(Carbon::parse($drobikaDatas[$x]->date)->format('d.m.Y') ?? '').'</td>
|
||||
<td><span class="badge badge-soft-primary"
|
||||
style="font-size: 14px;">'.number_format($drobikaDatas[$x]->amount).' kg</span></td>
|
||||
<td> <span class="badge badge-soft-success"
|
||||
style="font-size: 14px;">'.number_format($drobikaDatas[$x]->produced_weight).' kg</span></td>
|
||||
<td>'.$drobikaDatas[$x]->note.'</td>
|
||||
</tr>';
|
||||
}
|
||||
|
||||
if ($drobikaDatas) {
|
||||
return [
|
||||
'#drobika_datas' => $html_data,
|
||||
'#all_amount' => '
|
||||
<div class="col-md-3">
|
||||
<div class="card bg-warning 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> Işlenen Çig mal: ' . number_format($sumAmount) . ' kg</h5>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="card bg-success 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> Önen çig mal : ' . number_format($sumProduced) . ' kg</h5>
|
||||
</div>
|
||||
</div>
|
||||
</div>',
|
||||
];
|
||||
} else {
|
||||
Flash::error("Yalnyshlyk bar!!");
|
||||
}
|
||||
}
|
||||
|
||||
public function onModalSetDrobika()
|
||||
{
|
||||
|
||||
$data = post();
|
||||
|
||||
$drobika = ModelsDrobika::where("id", $data["id"])->first();
|
||||
|
||||
$html_data = '<div class="modal-header">
|
||||
<h5 class="modal-title" id="mySmallModalLabel">Drobika No #' . $drobika->id . '</h5>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal"
|
||||
aria-label="Close"></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form data-request="onUpdateDrobika" method="POST" data-request-flash>
|
||||
<div class="row">
|
||||
|
||||
|
||||
|
||||
<div class="col-md-12 mt-3">
|
||||
<div>
|
||||
<label class="form-label">Ugramaly Senesi</label>
|
||||
<div class="input-group" id="datepicker2">
|
||||
<input type="text" class="form-control" placeholder="d.m.Y"
|
||||
data-date-format="d.m.yyyy" data-date-container="#datepicker2" data-provide="datepicker"
|
||||
data-date-autoclose="true" name="date" value="' . (Carbon::parse($drobika->date)->format('d.m.Y')) . '">
|
||||
|
||||
<span class="input-group-text"><i class="mdi mdi-calendar"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-12 mt-3">
|
||||
<div>
|
||||
<label class="form-label">Enjama goýulan mukdar (kg)</label>
|
||||
|
||||
<input type="number" name="amount" step="0.01" class="form-control"
|
||||
placeholder="Enjama goýulan mukdar" value="' . ($drobika->amount) . '">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-12 mt-3">
|
||||
<div>
|
||||
<label class="form-label">Önen mukdar (kg)</label>
|
||||
|
||||
<input type="number" name="produced_weight" step="0.01" class="form-control"
|
||||
placeholder="Önen mukdar" value="' . ($drobika->produced_weight) . '">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-12 mt-3">
|
||||
<div>
|
||||
<label class="form-label">Bellik</label>
|
||||
|
||||
<input type="text" name="note" class="form-control" placeholder="Bellik" value="' . $drobika->note . '">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<input type="hidden" name="id" value="' . $data["id"] . '">
|
||||
<button type="submit" data-bs-dismiss="modal"
|
||||
class="btn btn-primary waves-effect waves-light"
|
||||
style="margin-top: 15px;width: 100%;">Üýtget</button>
|
||||
</form>
|
||||
</div>';
|
||||
|
||||
return [
|
||||
'#modal-form' => $html_data,
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
public function onCreateDrobika()
|
||||
{
|
||||
$user = \Auth::user();
|
||||
|
||||
$data = post();
|
||||
|
||||
$drobika = new ModelsDrobika ();
|
||||
$drobika->product_id = $data["product_id"];
|
||||
$drobika->shift_id = $data["shift_id"];
|
||||
$drobika->user_id = $user->id;
|
||||
$drobika->amount = $data["amount"];
|
||||
$drobika->date = Carbon::parse($data["date"])->format('Y-m-d');;
|
||||
$drobika->note = $data["note"];
|
||||
$drobika->produced_weight = $data["produced_weight"];
|
||||
$drobika->save();
|
||||
|
||||
if ($drobika) {
|
||||
Flash::success("Maglumatlar Ustunlikli Girizildi");
|
||||
return Redirect::refresh();
|
||||
} else {
|
||||
Flash::error("Yalnyshlyk bar!!");
|
||||
return Redirect::refresh();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public function onUpdateDrobika()
|
||||
{
|
||||
|
||||
$data = post();
|
||||
|
||||
$drobika = ModelsDrobika::where('id', $data["id"])->first();
|
||||
$drobika->amount = $data["amount"];
|
||||
$drobika->date = Carbon::parse($data["date"])->format('Y-m-d');;
|
||||
$drobika->note = $data["note"];
|
||||
$drobika->produced_weight = $data["produced_weight"];
|
||||
$drobika->save();
|
||||
|
||||
if ($drobika) {
|
||||
Flash::success("Maglumatlar Ustunlikli Girizildi");
|
||||
return Redirect::refresh();
|
||||
} else {
|
||||
Flash::error("Yalnyshlyk bar!!");
|
||||
return Redirect::refresh();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public function onDeleteDrobika()
|
||||
{
|
||||
|
||||
$data = post();
|
||||
|
||||
$drobika = ModelsDrobika::where('id', $data["id"])->first();
|
||||
$drobika->delete();
|
||||
|
||||
if ($drobika) {
|
||||
Flash::success("Maglumatlar Ustunlikli Pozuldy");
|
||||
return Redirect::refresh();
|
||||
} else {
|
||||
Flash::error("Yalnyshlyk bar!!");
|
||||
return Redirect::refresh();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -97,7 +97,7 @@ class Production extends ComponentBase
|
|||
for ($x = 0; $x < count($productionsFiltered); $x++) {
|
||||
$date = "";
|
||||
if($productionsFiltered[$x]->date != null){
|
||||
$date = Carbon::parse($productionsFiltered[$x]->date)->format('d.m.Y').' | '.Carbon::parse($productionsFiltered[$x]->time)->format('H:i');
|
||||
$date = Carbon::parse($productionsFiltered[$x]->date)->format('d.m.Y').' | '.$productionsFiltered[$x]->time;
|
||||
}else{
|
||||
$date = "";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -193,22 +193,22 @@ class Sewer extends ComponentBase
|
|||
return Redirect::refresh();
|
||||
} else {
|
||||
if (($data["status"] == "complated") && ($data["produced_bag_qty"] > 0)) {
|
||||
|
||||
$sewer = SewerModel::where("id", $data["sewer_id"])->first();
|
||||
$pivotSewer = PivotSewer::where("sewer_production_id", $data["sewer_id"])->first();
|
||||
|
||||
// $spentCalc = (float)((float) $pivotSewer->amount - (float) $data["left_amount"]);
|
||||
$spentCalc = (float)((float) $data["produced_bag_qty"] * (float) $pivotSewer->bag_gram) / 1000;
|
||||
$spentCalcDefective = (float)((float) $data["defective_bag_qty"] * (float) $pivotSewer->bag_gram) / 1000;
|
||||
$spentCalcDefectiveRepair = (float)((float) $data["defective_repair_qty"] * (float) $pivotSewer->bag_gram) / 1000;
|
||||
|
||||
$spentCalcDefectiveAll = (float)($spentCalcDefective + $spentCalcDefectiveRepair);
|
||||
if ($sewer->is_sewed == 1) {
|
||||
// $spentCalc = (float)((float) $pivotSewer->amount - (float) $data["left_amount"]);
|
||||
$spentCalc = (float)((float) $data["produced_bag_qty"] * (float) $pivotSewer->bag_gram) / 1000;
|
||||
$spentCalcDefective = (float)((float) $data["defective_bag_qty"] * (float) $pivotSewer->bag_gram) / 1000;
|
||||
$spentCalcDefectiveRepair = (float)((float) $data["defective_repair_qty"] * (float) $pivotSewer->bag_gram) / 1000;
|
||||
|
||||
$spentCalcDefectiveAll = (float)($spentCalcDefective + $spentCalcDefectiveRepair);
|
||||
|
||||
$allSpent = (float)($spentCalc + $spentCalcDefectiveAll);
|
||||
|
||||
$allSpent = (float)($spentCalc + $spentCalcDefectiveAll);
|
||||
|
||||
if ($allSpent > $pivotSewer->amount) {
|
||||
Flash::error("Ulanylan Rulon agramy berilen rulondan uly!! Halta sanyny dogry giriziň!!");
|
||||
return Redirect::refresh();
|
||||
} else {
|
||||
$leftCalc = (float)((float)$pivotSewer->amount - $spentCalc);
|
||||
|
||||
$sewer->shift_id = $data["shift_id"];
|
||||
|
|
@ -265,6 +265,60 @@ class Sewer extends ComponentBase
|
|||
Flash::error("Yalnyshlyk bar!!");
|
||||
return Redirect::refresh();
|
||||
}
|
||||
}else{
|
||||
|
||||
$spentCalc = 0;
|
||||
$spentCalcDefective = 0;
|
||||
$spentCalcDefectiveRepair = 0;
|
||||
|
||||
$spentCalcDefectiveAll = (float)($spentCalcDefective + $spentCalcDefectiveRepair);
|
||||
|
||||
$allSpent = (float)($spentCalc + $spentCalcDefectiveAll);
|
||||
|
||||
|
||||
$leftCalc = (float)((float)$pivotSewer->amount - $spentCalc);
|
||||
|
||||
$sewer->shift_id = $data["shift_id"];
|
||||
$sewer->sewer_machine_id = $data["sewer_machine_id"];
|
||||
$sewer->defective_repair_qty = (float) $data["defective_repair_qty"];
|
||||
$sewer->pipe_weight = (float) $data["pipe_weight"];
|
||||
|
||||
$sewer->produced_bag_qty = (float) $data["produced_bag_qty"];
|
||||
$sewer->defective_bag_qty = (float) $data["defective_bag_qty"];
|
||||
$sewer->width = (float) $data["width"];
|
||||
$sewer->height = (float) $data["height"];
|
||||
$sewer->date = Carbon::parse($data["date"])->format('Y-m-d');
|
||||
$sewer->note = $data["note"];
|
||||
$sewer->save();
|
||||
|
||||
$pivotSewer->left_amount = (float) ((float)$leftCalc - (float)$spentCalcDefectiveAll);
|
||||
$pivotSewer->spent_amount = (float) ((float)$spentCalc + (float)$spentCalcDefectiveAll);
|
||||
$pivotSewer->spent_defective_amount = (float) $spentCalcDefectiveAll;
|
||||
$pivotSewer->status = $data["status"];
|
||||
$pivotSewer->save();
|
||||
|
||||
|
||||
$createResultBag = new BagAction();
|
||||
$createResultBag->product_id = $sewer->id;
|
||||
$createResultBag->type = 'inbox';
|
||||
$createResultBag->status_accountant = "new";
|
||||
$createResultBag->status_director = "new";
|
||||
$createResultBag->note = "Sürülmedikler täzeden sürüldi";
|
||||
$createResultBag->amount = $sewer->produced_bag_qty;
|
||||
$createResultBag->stock_id = $stockBag->id;
|
||||
$createResultBag->user_id = $user->id;
|
||||
$createResultBag->save();
|
||||
|
||||
|
||||
|
||||
if ($sewer && $pivotSewer && $createResultBag) {
|
||||
Flash::success("Maglumatlar Ustunlikli Üýtgedildi");
|
||||
return Redirect::refresh();
|
||||
} else {
|
||||
Flash::error("Yalnyshlyk bar!!");
|
||||
return Redirect::refresh();
|
||||
}
|
||||
|
||||
}
|
||||
} else {
|
||||
Flash::error("Statusy Tamlaň ya-da halta sany girizilmedik");
|
||||
|
|
@ -285,7 +339,7 @@ class Sewer extends ComponentBase
|
|||
}])->orderBy('id', 'DESC')->get();
|
||||
|
||||
|
||||
// dd($sewerDatas);
|
||||
//dd($sewerDatas);
|
||||
for ($x = 0; $x < count($sewerDatas); $x++) {
|
||||
|
||||
$dateTitle = ($sewerDatas[$x]->date == null ? "" : Carbon::parse($sewerDatas[$x]->date)->format('d.m.Y'));
|
||||
|
|
@ -299,6 +353,14 @@ class Sewer extends ComponentBase
|
|||
|
||||
$editBtn = '';
|
||||
|
||||
$rulonDynamic = '';
|
||||
|
||||
if ($sewerDatas[$x]->is_sewed == 1) {
|
||||
$rulonDynamic = '#Rulon' . ($sewerDatas[$x]->pivot_sewer[0]->rulon_action->product_id ?? 0) . '- ' . ($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 ?? "");
|
||||
} else {
|
||||
$rulonDynamic = 'Sürülmedik täzeden sürüldi';
|
||||
}
|
||||
|
||||
if ($sewerDatas[$x]->user_id != $user->id) {
|
||||
$editBtn = '<div style="display: flex;justify-content: center;">
|
||||
<div style="margin-right: 10px;">
|
||||
|
|
@ -337,7 +399,8 @@ class Sewer extends ComponentBase
|
|||
<td style="font-weight: bold;">' . ($x + 1) . '</td>
|
||||
<td>' . $dateTitle . '</td>
|
||||
<td style="font-weight: bold;"> #Dikiş' . $sewerDatas[$x]->id . '</td>
|
||||
<td> #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 ?? "") . '
|
||||
<td>
|
||||
' . $rulonDynamic . '
|
||||
</td>
|
||||
<td><span class="badge badge-soft-success"
|
||||
style="font-size: 14px;">' . number_format($sewerDatas[$x]->pivot_sewer[0]->amount, 2) . ' kg</span>
|
||||
|
|
@ -356,7 +419,7 @@ class Sewer extends ComponentBase
|
|||
<td style="color: darkred !important;">' . ($sewerDatas[$x]->defective_bag_qty ?? 0) . '</td>
|
||||
<td style="color: darkred !important;">' . ($sewerDatas[$x]->defective_repair_qty ?? 0) . '</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 style="color: red;">' . number_format($sewerDatas[$x]->pivot_sewer[0]->left_amount, 2) . ' kg</td>
|
||||
<td><span class="badge badge-soft-warning"
|
||||
style="font-size: 14px;">' . $statusTitle . '</span></td>
|
||||
|
||||
|
|
@ -543,9 +606,11 @@ class Sewer extends ComponentBase
|
|||
|
||||
$data = post();
|
||||
|
||||
$currentRulonAction = RulonAction::where("id", $data["rulon_action_id"])->first();
|
||||
$rulonAmountSum = $currentRulonAction->amount;
|
||||
$stock = Stock::where("type", 'rulon')->first();
|
||||
if ($data["is_sewed"] == 1) {
|
||||
$currentRulonAction = RulonAction::where("id", $data["rulon_action_id"])->first();
|
||||
$rulonAmountSum = $currentRulonAction->amount;
|
||||
$stock = Stock::where("type", 'rulon')->first();
|
||||
}
|
||||
// dd($leftAmount);
|
||||
|
||||
$createSewer = new SewerModel();
|
||||
|
|
@ -555,9 +620,10 @@ class Sewer extends ComponentBase
|
|||
$createSewer->defective_bag_qty = 0;
|
||||
$createSewer->user_id = $user->id;
|
||||
$createSewer->note = $data["note"] ?? '';
|
||||
$createSewer->rulon_action_id = $data["rulon_action_id"];
|
||||
$createSewer->rulon_action_id = $data["is_sewed"] ? $data["rulon_action_id"] : 0;
|
||||
$createSewer->width = (float) $data["width"];
|
||||
$createSewer->height = (float) $data["height"];
|
||||
$createSewer->is_sewed = $data["is_sewed"];
|
||||
$createSewer->date = Carbon::parse($data["date"])->format('Y-m-d');
|
||||
$createSewer->save();
|
||||
|
||||
|
|
@ -566,20 +632,22 @@ class Sewer extends ComponentBase
|
|||
$createPivotSewer->sewer_production_id = $createSewer->id;
|
||||
$createPivotSewer->left_amount = 0;
|
||||
$createPivotSewer->bag_gram = (float) $data["bag_gram"];
|
||||
$createPivotSewer->amount = $rulonAmountSum;
|
||||
$createPivotSewer->amount = $rulonAmountSum ?? 0;
|
||||
$createPivotSewer->save();
|
||||
|
||||
$createResult = new RulonAction();
|
||||
$createResult->product_id = $currentRulonAction->product_id;
|
||||
$createResult->type = 'outbox';
|
||||
$createResult->amount = -$rulonAmountSum;
|
||||
$createResult->stock_id = $stock->id;
|
||||
$createResult->user_id = $user->id;
|
||||
$createResult->note = "#Dikiş" . $createSewer->id . " üçin çykaryldy";
|
||||
$createResult->save();
|
||||
if ($createSewer->is_sewed == 1) {
|
||||
$createResult = new RulonAction();
|
||||
$createResult->product_id = $currentRulonAction->product_id;
|
||||
$createResult->type = 'outbox';
|
||||
$createResult->amount = -$rulonAmountSum;
|
||||
$createResult->stock_id = $stock->id;
|
||||
$createResult->user_id = $user->id;
|
||||
$createResult->note = "#Dikiş" . $createSewer->id . " üçin çykaryldy";
|
||||
$createResult->save();
|
||||
}
|
||||
|
||||
|
||||
if ($createSewer && $createPivotSewer && $createResult) {
|
||||
if ($createSewer && $createPivotSewer) {
|
||||
|
||||
Flash::success("Maglumatlar Ustunlikli Goshuldy");
|
||||
return Redirect::refresh();
|
||||
|
|
|
|||
|
|
@ -0,0 +1,41 @@
|
|||
<?php namespace Romanah\Gokbakja\Models;
|
||||
|
||||
use Model;
|
||||
|
||||
/**
|
||||
* Model
|
||||
*/
|
||||
class Drobika extends Model
|
||||
{
|
||||
use \October\Rain\Database\Traits\Validation;
|
||||
|
||||
use \October\Rain\Database\Traits\SoftDelete;
|
||||
|
||||
protected $dates = ['deleted_at'];
|
||||
|
||||
public $belongsTo = [
|
||||
'user' => [
|
||||
'RainLab\User\Models\User',
|
||||
'key' => 'user_id'
|
||||
],
|
||||
'product' => [
|
||||
'Romanah\Gokbakja\Models\Product',
|
||||
'key' => 'product_id'
|
||||
],
|
||||
'shift' => [
|
||||
'Romanah\Gokbakja\Models\Shift',
|
||||
'key' => 'shift_id'
|
||||
],
|
||||
];
|
||||
|
||||
/**
|
||||
* @var string The database table used by the model.
|
||||
*/
|
||||
public $table = 'romanah_gokbakja_drobika';
|
||||
|
||||
/**
|
||||
* @var array Validation rules
|
||||
*/
|
||||
public $rules = [
|
||||
];
|
||||
}
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
<?php namespace Romanah\Gokbakja\Updates;
|
||||
|
||||
use Schema;
|
||||
use October\Rain\Database\Updates\Migration;
|
||||
|
||||
class BuilderTableCreateRomanahGokbakjaDrobika extends Migration
|
||||
{
|
||||
public function up()
|
||||
{
|
||||
Schema::create('romanah_gokbakja_drobika', function($table)
|
||||
{
|
||||
$table->engine = 'InnoDB';
|
||||
$table->increments('id')->unsigned();
|
||||
$table->timestamp('created_at')->nullable();
|
||||
$table->timestamp('updated_at')->nullable();
|
||||
$table->timestamp('deleted_at')->nullable();
|
||||
$table->integer('product_id');
|
||||
$table->double('amount', 10, 0);
|
||||
$table->text('note')->nullable();
|
||||
$table->date('date');
|
||||
});
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('romanah_gokbakja_drobika');
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
<?php namespace Romanah\Gokbakja\Updates;
|
||||
|
||||
use Schema;
|
||||
use October\Rain\Database\Updates\Migration;
|
||||
|
||||
class BuilderTableUpdateRomanahGokbakjaDrobika extends Migration
|
||||
{
|
||||
public function up()
|
||||
{
|
||||
Schema::table('romanah_gokbakja_drobika', function($table)
|
||||
{
|
||||
$table->double('produced_weight', 10, 0);
|
||||
});
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
Schema::table('romanah_gokbakja_drobika', function($table)
|
||||
{
|
||||
$table->dropColumn('produced_weight');
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
<?php namespace Romanah\Gokbakja\Updates;
|
||||
|
||||
use Schema;
|
||||
use October\Rain\Database\Updates\Migration;
|
||||
|
||||
class BuilderTableUpdateRomanahGokbakjaDrobika2 extends Migration
|
||||
{
|
||||
public function up()
|
||||
{
|
||||
Schema::table('romanah_gokbakja_drobika', function($table)
|
||||
{
|
||||
$table->integer('user_id');
|
||||
});
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
Schema::table('romanah_gokbakja_drobika', function($table)
|
||||
{
|
||||
$table->dropColumn('user_id');
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
<?php namespace Romanah\Gokbakja\Updates;
|
||||
|
||||
use Schema;
|
||||
use October\Rain\Database\Updates\Migration;
|
||||
|
||||
class BuilderTableUpdateRomanahGokbakjaDrobika3 extends Migration
|
||||
{
|
||||
public function up()
|
||||
{
|
||||
Schema::table('romanah_gokbakja_drobika', function($table)
|
||||
{
|
||||
$table->integer('shift_id');
|
||||
});
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
Schema::table('romanah_gokbakja_drobika', function($table)
|
||||
{
|
||||
$table->dropColumn('shift_id');
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
<?php namespace Romanah\Gokbakja\Updates;
|
||||
|
||||
use Schema;
|
||||
use October\Rain\Database\Updates\Migration;
|
||||
|
||||
class BuilderTableUpdateRomanahGokbakjaProductionMachine19 extends Migration
|
||||
{
|
||||
public function up()
|
||||
{
|
||||
Schema::table('romanah_gokbakja_production_machine', function($table)
|
||||
{
|
||||
$table->boolean('is_not_sewed')->default(0);
|
||||
});
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
Schema::table('romanah_gokbakja_production_machine', function($table)
|
||||
{
|
||||
$table->dropColumn('is_not_sewed');
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
<?php namespace Romanah\Gokbakja\Updates;
|
||||
|
||||
use Schema;
|
||||
use October\Rain\Database\Updates\Migration;
|
||||
|
||||
class BuilderTableUpdateRomanahGokbakjaProductionMachine20 extends Migration
|
||||
{
|
||||
public function up()
|
||||
{
|
||||
Schema::table('romanah_gokbakja_production_machine', function($table)
|
||||
{
|
||||
$table->dropColumn('is_not_sewed');
|
||||
});
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
Schema::table('romanah_gokbakja_production_machine', function($table)
|
||||
{
|
||||
$table->boolean('is_not_sewed')->default(0);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
<?php namespace Romanah\Gokbakja\Updates;
|
||||
|
||||
use Schema;
|
||||
use October\Rain\Database\Updates\Migration;
|
||||
|
||||
class BuilderTableUpdateRomanahGokbakjaSewerProduction13 extends Migration
|
||||
{
|
||||
public function up()
|
||||
{
|
||||
Schema::table('romanah_gokbakja_sewer_production', function($table)
|
||||
{
|
||||
$table->boolean('is_sewed')->default(1);
|
||||
});
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
Schema::table('romanah_gokbakja_sewer_production', function($table)
|
||||
{
|
||||
$table->dropColumn('is_sewed');
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
<?php namespace Romanah\Gokbakja\Updates;
|
||||
|
||||
use Schema;
|
||||
use October\Rain\Database\Updates\Migration;
|
||||
|
||||
class BuilderTableUpdateRomanahGokbakjaSewerProduction14 extends Migration
|
||||
{
|
||||
public function up()
|
||||
{
|
||||
Schema::table('romanah_gokbakja_sewer_production', function($table)
|
||||
{
|
||||
$table->double('additional', 10, 0)->nullable();
|
||||
$table->boolean('is_sewed')->nullable()->change();
|
||||
});
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
Schema::table('romanah_gokbakja_sewer_production', function($table)
|
||||
{
|
||||
$table->dropColumn('additional');
|
||||
$table->boolean('is_sewed')->nullable(false)->change();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
<?php namespace Romanah\Gokbakja\Updates;
|
||||
|
||||
use Schema;
|
||||
use October\Rain\Database\Updates\Migration;
|
||||
|
||||
class BuilderTableUpdateRomanahGokbakjaSewerProduction15 extends Migration
|
||||
{
|
||||
public function up()
|
||||
{
|
||||
Schema::table('romanah_gokbakja_sewer_production', function($table)
|
||||
{
|
||||
$table->renameColumn('additional', 'additional_amount');
|
||||
});
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
Schema::table('romanah_gokbakja_sewer_production', function($table)
|
||||
{
|
||||
$table->renameColumn('additional_amount', 'additional');
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
@ -429,3 +429,30 @@
|
|||
1.0.144:
|
||||
- 'Updated table romanah_gokbakja_production_machine'
|
||||
- builder_table_update_romanah_gokbakja_production_machine_18.php
|
||||
1.0.145:
|
||||
- 'Updated table romanah_gokbakja_production_machine'
|
||||
- builder_table_update_romanah_gokbakja_production_machine_19.php
|
||||
1.0.146:
|
||||
- 'Updated table romanah_gokbakja_production_machine'
|
||||
- builder_table_update_romanah_gokbakja_production_machine_20.php
|
||||
1.0.147:
|
||||
- 'Updated table romanah_gokbakja_sewer_production'
|
||||
- builder_table_update_romanah_gokbakja_sewer_production_13.php
|
||||
1.0.148:
|
||||
- 'Updated table romanah_gokbakja_sewer_production'
|
||||
- builder_table_update_romanah_gokbakja_sewer_production_14.php
|
||||
1.0.149:
|
||||
- 'Updated table romanah_gokbakja_sewer_production'
|
||||
- builder_table_update_romanah_gokbakja_sewer_production_15.php
|
||||
1.0.150:
|
||||
- 'Created table romanah_gokbakja_drobika'
|
||||
- builder_table_create_romanah_gokbakja_drobika.php
|
||||
1.0.151:
|
||||
- 'Updated table romanah_gokbakja_drobika'
|
||||
- builder_table_update_romanah_gokbakja_drobika.php
|
||||
1.0.152:
|
||||
- 'Updated table romanah_gokbakja_drobika'
|
||||
- builder_table_update_romanah_gokbakja_drobika_2.php
|
||||
1.0.153:
|
||||
- 'Updated table romanah_gokbakja_drobika'
|
||||
- builder_table_update_romanah_gokbakja_drobika_3.php
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@ function onStart(){
|
|||
$this["crudOrders"] = false;
|
||||
$this["rawActions"] = false;
|
||||
$this["journal"] = false;
|
||||
$this["drobika"] = false;
|
||||
|
||||
$filteredData = array_where($acceptPermissions, function ($permission) {
|
||||
return $permission['code'] == 'acceptDirector';
|
||||
|
|
@ -66,6 +67,10 @@ function onStart(){
|
|||
return $permission9['code'] == 'journal';
|
||||
});
|
||||
|
||||
$filteredData10 = array_where($acceptPermissions, function ($permission10) {
|
||||
return $permission10['code'] == 'drobika';
|
||||
});
|
||||
|
||||
|
||||
if($filteredData){
|
||||
$this["isDirector"] = true;
|
||||
|
|
@ -103,6 +108,10 @@ function onStart(){
|
|||
$this["journal"] = true;
|
||||
}
|
||||
|
||||
if($filteredData10){
|
||||
$this["drobika"] = true;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -461,4 +461,32 @@ items:
|
|||
isHidden: '0'
|
||||
cssClass: ri-chat-history-line
|
||||
isExternal: '0'
|
||||
-
|
||||
title: Drobika
|
||||
type: cms-page
|
||||
code: drobika
|
||||
reference: drobika/new
|
||||
viewBag:
|
||||
isHidden: '0'
|
||||
cssClass: ri-command-line
|
||||
isExternal: '0'
|
||||
items:
|
||||
-
|
||||
title: 'Täze Hasabat'
|
||||
type: cms-page
|
||||
code: drobika
|
||||
reference: drobika/new
|
||||
viewBag:
|
||||
isHidden: '0'
|
||||
cssClass: ''
|
||||
isExternal: '0'
|
||||
-
|
||||
title: Hasabat
|
||||
type: cms-page
|
||||
code: drobika
|
||||
reference: drobika/report
|
||||
viewBag:
|
||||
isHidden: '0'
|
||||
cssClass: ''
|
||||
isExternal: '0'
|
||||
name: aside
|
||||
|
|
|
|||
|
|
@ -0,0 +1,228 @@
|
|||
title = "drobika/new"
|
||||
url = "/drobika/new"
|
||||
layout = "platform_main"
|
||||
is_hidden = 0
|
||||
|
||||
[drobika]
|
||||
==
|
||||
<?php
|
||||
function onStart(){
|
||||
$this["shifts"] = Romanah\Gokbakja\Models\Shift::get();
|
||||
$this["products"] = Romanah\Gokbakja\Models\Product::get();
|
||||
|
||||
$this["drobika"] = Romanah\Gokbakja\Models\Drobika::with(['product', 'shift'])->orderBy('id', 'desc')->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">
|
||||
{% if crudSewerProduction %}
|
||||
<div class="col-md-12">
|
||||
<div class="collapse multi-collapse" id="multiCollapseExample1">
|
||||
<form data-request="onCreateDrobika" data-request-flash>
|
||||
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<label class="form-label">Çig mal</label>
|
||||
<select class="form-control select2" name="product_id">
|
||||
{% for product in products %}
|
||||
<option value="{{product.id}}">{{product.code}}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="col">
|
||||
<label class="form-label">Smen Saýlaň</label>
|
||||
<select class="form-control select2" name="shift_id">
|
||||
<option value="0">Saýla</option>
|
||||
{% for shift in shifts %}
|
||||
<option value="{{shift.id}}">{{shift.desc}}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col">
|
||||
<label class="form-label">Sene</label>
|
||||
<div class="input-group" id="datepicker2">
|
||||
<input type="text" class="form-control" name="date" placeholder="Sene"
|
||||
data-date-format="d.m.yyyy" data-date-container='#datepicker2' data-provide="datepicker"
|
||||
data-date-autoclose="true" required>
|
||||
|
||||
<span class="input-group-text"><i class="mdi mdi-calendar"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col">
|
||||
<div>
|
||||
<label class="form-label">Enjama Goýulan mukdar (kg)</label>
|
||||
|
||||
<input type="number" step="0.01" name="amount" class="form-control"
|
||||
placeholder="Enjama Goýulan mukdar" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col">
|
||||
<div>
|
||||
<label class="form-label">Önen mukdar (kg)</label>
|
||||
|
||||
<input type="number" step="0.01" name="produced_weight" class="form-control"
|
||||
placeholder="Önen mukdar" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col">
|
||||
<div>
|
||||
<label class="form-label">Bellik</label>
|
||||
|
||||
<input type="text" name="note" class="form-control" placeholder="Bellik">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col">
|
||||
<button type="submit" class="btn btn-primary waves-effect waves-light"
|
||||
style="margin-top: 30px;width: 100%;">Goş</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</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;">Drobika Enjamy</h3>
|
||||
<p class="card-title-desc" style="color: #6c6ff5;">Hasabaty</p>
|
||||
</div>
|
||||
<div class="col-md-6" style="text-align: right;">
|
||||
{% if crudSewerProduction %}
|
||||
<a class="btn btn-primary" data-bs-toggle="collapse" href="#multiCollapseExample1"
|
||||
role="button" aria-expanded="false" aria-controls="multiCollapseExample1">Täze
|
||||
Maglumat</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- <h1>{{machineProductions}}</h1> -->
|
||||
|
||||
<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>No</th>
|
||||
<th>Çig mal</th>
|
||||
<th>Smen</th>
|
||||
<th>Sene</th>
|
||||
<th>Goýulan mukdar (kg)</th>
|
||||
<th>Önen Mukdar (kg)</th>
|
||||
<th>Bellik</th>
|
||||
<th>Sazlamalar</th>
|
||||
<!-- <th>Настройки</th> -->
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="sewer_datas">
|
||||
|
||||
{% for key, drobika in drobika %}
|
||||
<tr>
|
||||
<td>{{key+1}}</td>
|
||||
<td style="font-weight: bold;color: #0005c5;">{{drobika.product.code}}</td>
|
||||
<td>{{drobika.shift.desc}}</td>
|
||||
<td>{{drobika.date|date('d.m.Y')}}</td>
|
||||
<td><span class="badge badge-soft-primary"
|
||||
style="font-size: 14px;">{{drobika.amount|number_format}} kg</span></td>
|
||||
<td> <span class="badge badge-soft-success"
|
||||
style="font-size: 14px;">{{drobika.produced_weight|number_format}} kg</span></td>
|
||||
<td>{{drobika.note}}</td>
|
||||
<td>
|
||||
<div style="display: flex;justify-content: center;">
|
||||
<div style="margin-right: 10px;">
|
||||
<a type="button" data-request="onModalSetDrobika"
|
||||
data-request-data="id: {{drobika.id}}"
|
||||
data-bs-toggle="modal" data-bs-target=".bs-example-modal-sm-1"
|
||||
class="btn btn-warning waves-effect waves-light"
|
||||
style="padding-top: 5px;padding-bottom: 5px;">
|
||||
<i class="ri-pencil-line align-middle me-2"></i> Täzele
|
||||
</a>
|
||||
</div>
|
||||
<div>
|
||||
<a type="button"
|
||||
data-request="onDeleteDrobika"
|
||||
data-request-data="id: {{drobika.id}}"
|
||||
data-request-confirm="#Drobika{{drobika.id}} pozmak isleýäňizmi?"
|
||||
class="btn btn-danger waves-effect waves-light"
|
||||
style="padding-top: 5px;padding-bottom: 5px;">
|
||||
<i class="ri-close-line align-middle me-2"></i> Poz
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<!-- <th>Настройки</th> -->
|
||||
</tr>
|
||||
{% endfor %}
|
||||
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<th>No</th>
|
||||
<th>Çig mal</th>
|
||||
<th>Smen</th>
|
||||
<th>Sene</th>
|
||||
<th>Goýulan mukdar</th>
|
||||
<th>Önen Mukdar</th>
|
||||
<th>Bellik</th>
|
||||
<th>Sazlamalar</th>
|
||||
<!-- <th>Настройки</th> -->
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="modal fade bs-example-modal-sm-1" tabindex="-1" role="dialog"
|
||||
aria-labelledby="mySmallModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content" id="modal-form">
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% 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 %}
|
||||
{% partial 'dataTableJs' %}
|
||||
|
|
@ -0,0 +1,158 @@
|
|||
title = "drobika/report"
|
||||
url = "/drobika/report"
|
||||
layout = "platform_main"
|
||||
is_hidden = 0
|
||||
|
||||
[drobika]
|
||||
==
|
||||
<?php
|
||||
function onStart(){
|
||||
$this["shifts"] = Romanah\Gokbakja\Models\Shift::get();
|
||||
$this["products"] = Romanah\Gokbakja\Models\Product::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="onReportDrobika" data-request-flash>
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<label class="form-label">Çig mal</label>
|
||||
<select class="form-control select2" name="product_id">
|
||||
<option value="0">Saýla</option>
|
||||
{% for product in products %}
|
||||
<option value="{{product.id}}">{{product.code}}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="col">
|
||||
<label class="form-label">Smen Saýlaň</label>
|
||||
<select class="form-control select2" name="shift_id">
|
||||
<option value="0">Saýla</option>
|
||||
{% for shift in shifts %}
|
||||
<option value="{{shift.id}}">{{shift.desc}}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
|
||||
|
||||
<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">
|
||||
<div>
|
||||
<label class="form-label">Bellik</label>
|
||||
|
||||
<input type="text" name="note" class="form-control" placeholder="Bellik">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col">
|
||||
<button type="submit" class="btn btn-primary waves-effect waves-light"
|
||||
style="margin-top: 30px;width: 100%;">Goş</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;">Drobika 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>No</th>
|
||||
<th>Çig mal</th>
|
||||
<th>Smen</th>
|
||||
<th>Sene</th>
|
||||
<th>Goýulan mukdar (kg)</th>
|
||||
<th>Önen Mukdar (kg)</th>
|
||||
<th>Bellik</th>
|
||||
<!-- <th>Настройки</th> -->
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="drobika_datas">
|
||||
|
||||
|
||||
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<th>No</th>
|
||||
<th>Çig mal</th>
|
||||
<th>Smen</th>
|
||||
<th>Sene</th>
|
||||
<th>Goýulan mukdar</th>
|
||||
<th>Önen Mukdar</th>
|
||||
<th>Bellik</th>
|
||||
<!-- <th>Настройки</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 %}
|
||||
|
|
@ -21,6 +21,7 @@ function onStart(){
|
|||
}])
|
||||
->where("stock_id", $stockId)
|
||||
->addSelect(DB::raw("SUM(amount) as quantity"))
|
||||
->having('quantity', '>', 0)
|
||||
->groupBy('romanah_gokbakja_rulon_action.product_id')
|
||||
->orderBy('id', 'DESC')
|
||||
->get();
|
||||
|
|
@ -49,6 +50,15 @@ function onStart(){
|
|||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<label class="form-label">Sürülmedikmi?</label>
|
||||
<select class="form-control select2" name="is_sewed" onchange="setField(this.value);">
|
||||
<option value="1">Ýok</option>
|
||||
<option value="0">Hawa</option>
|
||||
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="col">
|
||||
<label class="form-label">Smen Saýlaň</label>
|
||||
<select class="form-control select2" name="shift_id">
|
||||
|
|
@ -79,7 +89,8 @@ function onStart(){
|
|||
<span class="input-group-text"><i class="mdi mdi-calendar"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-3">
|
||||
|
||||
<div class="col-3" id="rulon_section">
|
||||
<label class="form-label">Rulon Saýlaň</label>
|
||||
<select class="form-control select2" name="rulon_action_id">
|
||||
<option value="0">Saýla</option>
|
||||
|
|
@ -157,7 +168,7 @@ function onStart(){
|
|||
<div class="card-body">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<h3 class="card-title" style="font-size: 22px;color: #1e2038;">Halta Tikýän Staboklar</h3>
|
||||
<h3 class="card-title" style="font-size: 22px;color: #1e2038;">Halta Tikýän Stanoklar</h3>
|
||||
<p class="card-title-desc" style="color: #6c6ff5;">Hasabaty</p>
|
||||
</div>
|
||||
<div class="col-md-6" style="text-align: right;">
|
||||
|
|
@ -192,10 +203,8 @@ function onStart(){
|
|||
<th>Rulon Görnüş</th>
|
||||
<th>Çig mal mukdary</th>
|
||||
<th>Halta Görnüş</th>
|
||||
|
||||
<th>Stanok</th>
|
||||
<th>Gram</th>
|
||||
|
||||
<th>Halta (arassa)</th>
|
||||
<th>BRAK Halta</th>
|
||||
<th>Sürülmedik</th>
|
||||
|
|
@ -254,5 +263,20 @@ function onStart(){
|
|||
<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>
|
||||
|
||||
<script>
|
||||
setField(1);
|
||||
|
||||
function setField(isNotSewed){
|
||||
|
||||
if(isNotSewed == 1){
|
||||
$('#rulon_section').show();
|
||||
}else if(isNotSewed == 0){
|
||||
$('#rulon_section').hide();
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
{% endput %}
|
||||
{% partial 'dataTableJs' %}
|
||||
{% partial 'dataTableJs' %}
|
||||
Loading…
Reference in New Issue