production calculate table

This commit is contained in:
Shohrat 2023-10-20 02:07:33 +05:00
parent 49931ad779
commit 00ddfba36a
13 changed files with 162 additions and 87 deletions

View File

@ -44,6 +44,8 @@ class Production extends ComponentBase
$productions = ProductionModel::with(['pivot_production', 'excruiter', 'shift'])->orderBy('id', 'DESC');
$productionsCalc = ProductionModel::orderBy('id', 'DESC');
$productionsCalcPivot = ProductionCalculateModel::orderBy('id', 'DESC');
$start = Carbon::parse($data["start"])->format('Y-m-d');
$end = Carbon::parse($data["end"])->format('Y-m-d');
@ -61,21 +63,27 @@ class Production extends ComponentBase
if ($excruiter) {
$productions->where("excruiter_id", $excruiter);
$productionsCalc->where("excruiter_id", $excruiter);
$productionsCalcPivot->where("excruiter_id", $excruiter);
}
if ($shiftId) {
$productions->where("shift_id", $shiftId);
$productionsCalc->where("shift_id", $shiftId);
$productionsCalcPivot->where("shift_id", $shiftId);
}
if ($start != $currentDateFormat) {
$productions->whereBetween('created_at', [$start, $end]);
$productions->whereBetween('date', [$start, $end]);
$calc = $productionsCalc->select(DB::raw('MAX(all_amount) - MIN(all_amount) AS amount_subtraction'), DB::raw('MAX(all_amount) AS max_amount'), DB::raw('MIN(all_amount) AS min_amount'), DB::raw('MAX(time) AS max_time'), DB::raw('MIN(time) AS min_time'))
->whereBetween('created_at', [$start, $end])->first();
$calc = $productionsCalc->select(DB::raw('MAX(time) AS max_time'), DB::raw('MIN(time) AS min_time'))
->whereBetween('date', [$start, $end])->first();
$diffMinutes = Carbon::parse($calc->max_time)->diffInMinutes($calc->min_time);
$calcTimeDiff = floor($diffMinutes / 60) . ' sagat ' . ($diffMinutes - floor($diffMinutes / 60) * 60) . ' minut';
$productionsCalcPivot->whereBetween('date', [$start, $end]);
// dd($max);
// $min = $productions->select(DB::raw("MIN(id)"));
@ -83,7 +91,9 @@ class Production extends ComponentBase
}
$productionsFiltered = $productions->get();
$calculationAmount = $productionsCalcPivot->sum("amount_calc");
//dd($calculationAmount);
$html_data = '';
for ($x = 0; $x < count($productionsFiltered); $x++) {
@ -128,7 +138,7 @@ class Production extends ComponentBase
<div class="col-md-4">
<div class="card bg-info 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>Sarp Edilen Çig mal: ' . number_format($calc->amount_subtraction) . ' kg</h5>
<h5 class="text-white" style="text-transform: uppercase;margin-bottom: 0;"><i class="mdi mdi-bullseye-arrow me-3"></i>Sarp Edilen Çig mal: ' . number_format($calculationAmount) . ' kg</h5>
</div>
</div>
</div>
@ -172,7 +182,7 @@ class Production extends ComponentBase
$dailyCalculated = ProductionCalculateModel::whereDate("date", date($currentDateFormat))->where("excruiter_id", $excruiter)->sum("amount_calc");
//sagatda ortacaha hasaplama
$html_data2 ='';
$html_data2 = '';
// gunluk hasabat
$html_data = '<div class="row">';
@ -182,7 +192,7 @@ class Production extends ComponentBase
<a class="card bg-success text-white-50">
<div class="card-body">
<h5 class="mb-4 text-white"><i
class="mdi mdi-bullseye-arrow me-3"></i>' . $timeCalc. '</h5>
class="mdi mdi-bullseye-arrow me-3"></i>' . $timeCalc . '</h5>
<hr>
<p class="card-text" style="font-size: 15px;color: white;">JEMI IŞLENEN: ' . $dailyCalculated . ' kg</p>
</div>
@ -198,7 +208,7 @@ class Production extends ComponentBase
<a class="card bg-success text-white-50">
<div class="card-body">
<h5 class="mb-4 text-white"><i
class="mdi mdi-bullseye-arrow me-3"></i>' . $timeCalc. '</h5>
class="mdi mdi-bullseye-arrow me-3"></i>' . $timeCalc . '</h5>
<hr>
<p class="card-text" style="font-size: 15px;color: white;">SAGATDA ORTAÇA: ' . number_format($dailyCalculated / floor($diffMinutes / 60), 2) . ' kg</p>
</div>
@ -234,8 +244,6 @@ class Production extends ComponentBase
</div>
</a>
</div>';
}
$html_data .= '</div>';
@ -267,7 +275,7 @@ class Production extends ComponentBase
<a class="card bg-success text-white-50">
<div class="card-body">
<h5 class="mb-4 text-white"><i
class="mdi mdi-bullseye-arrow me-3"></i>' . $timeCalc. '</h5>
class="mdi mdi-bullseye-arrow me-3"></i>' . $timeCalc . '</h5>
<hr>
<p class="card-text" style="font-size: 15px;color: white;">JEMI IŞLENEN: ' . $dailyCalculated . ' kg</p>
</div>
@ -289,10 +297,7 @@ class Production extends ComponentBase
</div>
</a>
</div>';
}
}
$html_data3 .= '</div>';
@ -340,7 +345,7 @@ class Production extends ComponentBase
$html_data4 .= '<tr>
<th scope="row">' . ($i + 1) . '</th>
<td style="font-weight: bold;color: #0005c5;">' . $shifts[$i]->desc . '(' . $shifts[$i]->start . ' - ' . $shifts[$i]->end . ')</td>
<td>'.$timeCalc.'</td>
<td>' . $timeCalc . '</td>
<td>' . $productCalc . ' kg</td>';
$html_data4 .= '</tr>';
@ -350,7 +355,7 @@ class Production extends ComponentBase
$html_data4 .= '<tr>
<th scope="row" colspan="2">JEMI</th>
<td>'.$timeAllCalc.'</td>
<td>' . $timeAllCalc . '</td>
<td>' . $productAllCalc . ' kg</td>';
$html_data4 .= '</tr>';
@ -383,54 +388,68 @@ class Production extends ComponentBase
$currentDate = Carbon::now()->timezone('UTC +05:00');
$currentDateFormat = $currentDate->format('Y-m-d');
$excruiter = $this->param("excruiter");
$data = post();
$product = ProductModel::where('id', $data["prod_id"])->first();
$enteredDate = Carbon::parse($data["date"])->format('Y-m-d');
$sumPercentage = PivotProductionModel::where('product_id', $data["prod_id"])->whereDate('created_at', date($currentDateFormat))->sum('amount_percentage');
$todayProductionsCount = ProductionModel::whereDate('date', date($enteredDate))->where("excruiter_id", $excruiter)->count();
$sumPercentageCount = PivotProductionModel::where('product_id', $data["prod_id"])->whereDate('created_at', date($currentDateFormat))->count('amount_percentage');
if ($todayProductionsCount > 1) {
$todayProductionsGet = ProductionModel::whereDate('date', date($enteredDate))->where("excruiter_id", $excruiter)->orderBy("id", "DESC")->first();
$sumAmount = PivotProductionModel::where('product_id', $data["prod_id"])->whereDate('created_at', date($currentDateFormat))->sum('amount');
$productionPivot = PivotProductionModel::where('production_id', $todayProductionsGet->id)->where("product_id", $data["prod_id"])->first();
$sumAmountcount = PivotProductionModel::where('product_id', $data["prod_id"])->whereDate('created_at', date($currentDateFormat))->count('amount');
$diffAllAMount = (float) $data["all_amount"] - (float) $todayProductionsGet->all_amount;
// dd($sumPercentage / $sumPercentageCount);
// dd(($sumPercentage + (int) $data["field_value"]) / ($sumPercentageCount + 1));
if ($sumPercentage != 0) {
$calcAvgPerc = ($sumPercentage + (float) $data["field_value"]) / ($sumPercentageCount + 1);
// $convertedToKgAvg = ((int) $data["field_value"] / 100) * ((int) $data["all_amount"]);
$convertedToKgSum = ((float) $data["field_value"] / 100) * ((float) $data["all_amount"]);
$convertToCount = $sumAmountcount + 1;
$calculateAvgAmount = ($convertedToKgSum + $sumAmount) / $convertToCount;
$calculatedAmount = (float)(((float) $data["field_value"] ?? 0) / 100) * ((float) $diffAllAMount);
$allData = array(
"product_name" => $product->name,
"avg_percentage" => number_format($calcAvgPerc, 2),
"avg_amount" => number_format($calculateAvgAmount, 2)
"product_name" => $productionPivot->product_name,
"avg_percentage" => number_format($productionPivot->amount_percentage, 2),
"avg_amount" => number_format($calculatedAmount, 2),
"headerq" => "Çig Mallar Boýunça (Soňky üýtgeşme: " . $diffAllAMount . " kg)"
);
} else {
$allData = array(
"product_name" => $product->name,
// "product_name" => $productionPivot->product_name,
"avg_percentage" => number_format(0, 2),
"avg_amount" => number_format(0, 2)
);
}
// $calcAvgAmount = ($sumPercentage + (int) $data["field_value"]) / ($sumPercentageCount + 1);
// if ($sumPercentage != 0) {
// $calcAvgPerc = ($sumPercentage + (float) $data["field_value"]) / ($sumPercentageCount + 1);
// // $convertedToKgAvg = ((int) $data["field_value"] / 100) * ((int) $data["all_amount"]);
// $convertedToKgSum = ((float) $data["field_value"] / 100) * ((float) $data["all_amount"]);
// $convertToCount = $sumAmountcount + 1;
// $calculateAvgAmount = ($convertedToKgSum + $sumAmount) / $convertToCount;
// $allData = array(
// "product_name" => $product->name,
// "avg_percentage" => number_format($calcAvgPerc, 2),
// "avg_amount" => number_format($calculateAvgAmount, 2)
// );
// } else {
// $allData = array(
// "product_name" => $product->name,
// "avg_percentage" => number_format(0, 2),
// "avg_amount" => number_format(0, 2)
// );
// }
return $allData;
// dd($currentDateFormat);
}
public function onUpdatePivotProduction()
{
$user = \Auth::user();
@ -440,6 +459,8 @@ class Production extends ComponentBase
// $this["currentMonth"] = $currentDate->format('m');
$data = post();
// dd($data);
$updatePivotProduction = PivotProductionModel::where("id", $data["product_id"])->first();
$production = ProductionModel::where("id", $updatePivotProduction->production_id)->first();
@ -449,6 +470,16 @@ class Production extends ComponentBase
$updatePivotProduction->amount = (((float) $data[$fieldName] ?? 0) / 100) * ((float) $production->all_amount);
$updatePivotProduction->save();
$productionCalulate = ProductionCalculateModel::where("production_id", $updatePivotProduction->production_id)->where("prev_pivot_id", $updatePivotProduction->id)->first();
// dd($production);
if ($productionCalulate != null) {
$diffCalc = (float) ((float) $productionCalulate->amount_calc * 100) / (float) $productionCalulate->amount_percentage;
$productionCalulate->amount_calc = (float)(((float) $data[$fieldName] ?? 0) / 100) * ((float) $diffCalc);
$productionCalulate->amount_percentage = (float) $data[$fieldName] ?? 0;
$productionCalulate->save();
}
if ($updatePivotProduction) {
Flash::success("Hasabat Ustunlikli Üýtgedildi");
@ -503,7 +534,9 @@ class Production extends ComponentBase
$todayProductionsCount = ProductionModel::whereDate('date', date($createProduction->date))->where("excruiter_id", $excruiter)->count();
if($todayProductionsCount > 1){
if ($todayProductionsCount > 1) {
// $todayProductionsGetLast = ProductionModel::whereDate('date', date($createProduction->date))->where("excruiter_id", $excruiter)->orderBy("id", "DESC")->first();
$todayProductionsGet = ProductionModel::whereDate('date', date($createProduction->date))->where("excruiter_id", $excruiter)->orderBy("id", "DESC")->skip(1)->first();
$productionPivots = PivotProductionModel::where('production_id', $todayProductionsGet->id)->get();
@ -512,6 +545,8 @@ class Production extends ComponentBase
for ($x = 0; $x < count($productionPivots); $x++) {
$currentPivot = PivotProductionModel::where("production_id", $createProduction->id)->where("product_id", $productionPivots[$x]->product_id)->first();
$createCalculate = new ProductionCalculateModel();
$createCalculate->production_id = $todayProductionsGet->id;
@ -521,12 +556,14 @@ class Production extends ComponentBase
$createCalculate->shift_id = $todayProductionsGet->shift_id;
$createCalculate->amount_percentage = $productionPivots[$x]->amount_percentage;
$createCalculate->current_pivot_id = $currentPivot->id;
$createCalculate->prev_pivot_id = $productionPivots[$x]->id;
$createCalculate->date = $productionPivots[$x]->date;
$createCalculate->time = $productionPivots[$x]->time;
$createCalculate->save();
}
}
@ -534,7 +571,6 @@ class Production extends ComponentBase
Flash::success("Hasabat Ustunlikli Goşuldy");
return Redirect::refresh();
}
}
}

View File

@ -13,6 +13,13 @@ class PivotProduction extends Model
protected $dates = ['deleted_at'];
public $hasMany = [
'pivot_production_calculate' => [
'Romanah\Gokbakja\Models\ProductionCalculate',
'key' => 'prev_pivot_id',
'delete' => true
]
];
public $belongsTo = [
'production' => [
@ -22,7 +29,7 @@ class PivotProduction extends Model
'product' => [
'Romanah\Gokbakja\Models\Product',
'key' => 'product_id'
]
],
];
/**
* @var string The database table used by the model.

View File

@ -17,7 +17,13 @@ class Production extends Model
public $hasMany = [
'pivot_production' => [
'Romanah\Gokbakja\Models\PivotProduction',
'key' => 'production_id'
'key' => 'production_id',
'delete' => true
],
'pivot_production_calculation' => [
'Romanah\Gokbakja\Models\ProductionCalculate',
'key' => 'production_id',
'delete' => true
]
];

View File

@ -85,3 +85,7 @@ navigation:
label: Ekstrudorlar
url: romanah/gokbakja/excruiter
icon: icon-steam
main-menu-item7:
label: 'Cig mal'
url: romanah/gokbakja/production
icon: icon-life-ring

View File

@ -0,0 +1,25 @@
<?php namespace Romanah\Gokbakja\Updates;
use Schema;
use October\Rain\Database\Updates\Migration;
class BuilderTableUpdateRomanahGokbakjaProductionCalculate6 extends Migration
{
public function up()
{
Schema::table('romanah_gokbakja_production_calculate', function($table)
{
$table->integer('current_pivot_id');
$table->integer('prev_pivot_id');
});
}
public function down()
{
Schema::table('romanah_gokbakja_production_calculate', function($table)
{
$table->dropColumn('current_pivot_id');
$table->dropColumn('prev_pivot_id');
});
}
}

View File

@ -237,3 +237,6 @@
1.0.80:
- 'Updated table romanah_gokbakja_production_calculate'
- builder_table_update_romanah_gokbakja_production_calculate_5.php
1.0.81:
- 'Updated table romanah_gokbakja_production_calculate'
- builder_table_update_romanah_gokbakja_production_calculate_6.php

View File

@ -18,15 +18,14 @@ function onStart() {
if($year){
$this["productions"] = Romanah\Gokbakja\Models\Production::whereMonth('created_at', $this["month"])->whereYear('created_at', $year)->with(['pivot_production'])->get();
$this["month_all_amount_calc"] = Romanah\Gokbakja\Models\Production::whereMonth('created_at', $this["month"])->select(DB::raw('MAX(all_amount) - MIN(all_amount) AS amount_subtraction'), DB::raw('MAX(all_amount) AS max_amount'), DB::raw('MIN(all_amount) AS min_amount'), DB::raw('MAX(time) AS max_time'), DB::raw('MIN(time) AS min_time'))
->whereYear('created_at', $year)->first();
$this["month_all_amount_calcq"] = Romanah\Gokbakja\Models\ProductionCalculate::whereMonth('date', $this["month"])->whereYear('date', $year)->sum("amount_calc");
}else{
$this["productions"] = Romanah\Gokbakja\Models\Production::whereMonth('created_at', $this["month"])->whereYear('created_at', $currentDate->year)->with(['pivot_production'])->get();
$this["month_all_amount_calc"] = Romanah\Gokbakja\Models\Production::whereMonth('created_at', $this["month"])->select(DB::raw('MAX(all_amount) - MIN(all_amount) AS amount_subtraction'), DB::raw('MAX(all_amount) AS max_amount'), DB::raw('MIN(all_amount) AS min_amount'), DB::raw('MAX(time) AS max_time'), DB::raw('MIN(time) AS min_time'))
->whereYear('created_at', $currentDate->year)->first();
$this["month_all_amount_calcq"] = Romanah\Gokbakja\Models\ProductionCalculate::whereMonth('date', $this["month"])->whereYear('date', $currentDate->year)->sum("amount_calc");
}
}
?>
@ -144,7 +143,7 @@ function onStart() {
<td style="text-align: center;">
<span class="badge badge-soft-info"
style="font-size: 14px;">{{month_all_amount_calc.amount_subtraction|number_format}} kg</span>
style="font-size: 14px;">{{month_all_amount_calcq|number_format}} kg</span>
</td>
{% for key, product in reportProducts %}

View File

@ -88,7 +88,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;">Çig Mallar Boýunça</h3>
<h3 class="card-title" style="font-size: 22px;color: #1e2038;" id="headerq">Çig Mallar Boýunça (Soňky üýtgeşme: 0 kg)</h3>
<div id="back_btn">
<a href="#">HASABAT</a>
</div>
@ -328,6 +328,7 @@ function onStart(){
var fieldValues = [];
var all_amount_value = $("input[name='all_amount']").val();
var date = $("input[name='date']").val();
var allAmount = all_amount_value ? parseFloat(all_amount_value) : 0;
// console.log(prodCount);
for (let i = 0; i < prodCount; i++) {
@ -337,7 +338,7 @@ function onStart(){
fieldValues[i] = prod ? parseFloat(prod) : 0;
calculate(prodId, prod, allAmount);
calculate(prodId, prod, allAmount, date);
//console.log("q" + i + ": " + prod);
}
@ -349,13 +350,14 @@ function onStart(){
// return eval(fieldValues.join('+'));
}
function calculate(prodId, value, all_amount) {
function calculate(prodId, value, all_amount, date) {
$.request('onCalculateAvg', {
data: { 'prod_id': prodId, 'field_value': value, 'all_amount': all_amount },
data: { 'prod_id': prodId, 'field_value': value, 'all_amount': all_amount, 'date': date },
success: function (data) {
$('#avg_percentage_' + prodId).html(`<i class="mdi mdi-bullseye-arrow me-3"></i> ` + data.avg_percentage + ` %`);
$('#avg_amount_' + prodId).html(data.product_name + ` : ` + (data.avg_amount) + ` kg`);
$('#headerq').html(data.headerq);
}
});

View File

@ -50,6 +50,17 @@ function onStart(){
<div class="card-body">
<form data-request="onReportProduction" data-request-flash>
<div class="row">
<div class="col">
<label class="form-label">Ekstruiter Saýlaň</label>
<select class="form-control select2" name="excruiter_id" id="excruiter_id">
<option value="0">Saýla</option>
{% for excruiter in excruiters %}
<option value="{{excruiter.id}}">{{excruiter.name}}</option>
{% endfor %}
</select>
</div>
<div class="col">
<div>
<label class="form-label">Seneleri Saýlaň</label>
@ -64,15 +75,7 @@ function onStart(){
</div>
</div>
</div>
<div class="col">
<label class="form-label">Ekstruiter Saýlaň</label>
<select class="form-control select2" name="excruiter_id" id="excruiter_id">
<option value="0">Saýla</option>
{% for excruiter in excruiters %}
<option value="{{excruiter.id}}">{{excruiter.name}}</option>
{% endfor %}
</select>
</div>
<div class="col">
<label class="form-label">Smen Saýlaň</label>
<select class="form-control select2" name="shift_id" id="shift_id">

View File

@ -13,7 +13,6 @@ function onStart(){
$this["year"] = $currentDate->year;
}
$this["productions"] = Romanah\Gokbakja\Models\Production::with(['pivot_production'])->get();
$this["reportProducts"] = Romanah\Gokbakja\Models\Product::where("report", "simple")->get();
}

View File

@ -9,16 +9,11 @@ function onStart (){
$allAmount = $this->all_amount;
$amountCalc = Romanah\Gokbakja\Models\PivotProduction::where('product_id', $prodId)
->whereMonth('created_at', $no)
->whereYear('created_at', $year)
->orderBy('id', 'DESC')
->first();
$amountCalc = Romanah\Gokbakja\Models\ProductionCalculate::where('product_id', $prodId)->whereMonth('date', $no)->whereYear('date', $year)->sum("amount_calc");
if ($amountCalc != null){
$this["pivot_calc"] = (float) ($amountCalc->amount_percentage / 100) * (float) $allAmount;
$this["percentageCalc"] = (float) $amountCalc->amount_percentage;
$this["pivot_calc"] = $amountCalc;
}else{
$this["pivot_calc"] = 0;
}
@ -31,8 +26,6 @@ function onStart (){
<td style="text-align: center;">
{% if pivot_calc > 0 %}
{{pivot_calc|number_format}} kg <br>
<font style="font-size: 12px;color: gray;">
{{percentageCalc|number_format(2)}} %
</font>
{% endif %}
</td>

View File

@ -10,32 +10,30 @@ function onStart (){
if($year){
$amountCalc = Romanah\Gokbakja\Models\PivotProduction::where('product_id', $prodId)
->whereMonth('created_at', $this["month"])
->whereYear('created_at', $year)
->orderBy('id', 'DESC')
->first();
$amountCalc = Romanah\Gokbakja\Models\ProductionCalculate::where('product_id', $prodId)
->whereMonth('date', $this["month"])
->whereYear('date', $year)
->sum("amount_calc");
if ($amountCalc != null){
$this["pivot_calc"] = (float) ($amountCalc->amount_percentage / 100) * (float) $allAmount;
$this["percentageCalc"] = (float) $amountCalc->amount_percentage;
$this["pivot_calc"] = (float) ($amountCalc);
}else{
$this["pivot_calc"] = 0;
}
}else{
$amountCalc = Romanah\Gokbakja\Models\PivotProduction::where('product_id', $prodId)
$amountCalc = Romanah\Gokbakja\Models\ProductionCalculate::where('product_id', $prodId)
->whereMonth('created_at', $this["month"])
->whereYear('created_at', $currentDate->year)
->orderBy('id', 'DESC')
->first();
->sum("amount_calc");
if ($amountCalc != null){
$this["pivot_calc"] = (float) ($amountCalc->amount_percentage / 100) * (float) $allAmount;
$this["percentageCalc"] = (float) $amountCalc->amount_percentage;
$this["pivot_calc"] = (float) ($amountCalc);
}else{
$this["pivot_calc"] = 0;
}

View File

@ -6,8 +6,8 @@ function onStart (){
$year = $this->year;
$this["all_amount_calc"] = Romanah\Gokbakja\Models\Production::whereMonth('created_at', $no)->select(DB::raw('MAX(all_amount) - MIN(all_amount) AS amount_subtraction'), DB::raw('MAX(all_amount) AS max_amount'), DB::raw('MIN(all_amount) AS min_amount'), DB::raw('MAX(time) AS max_time'), DB::raw('MIN(time) AS min_time'))
->whereYear('created_at', $year)->first();
$this["all_amount_calc"] = Romanah\Gokbakja\Models\ProductionCalculate::whereMonth('date', $no)->whereYear('date', $year)->sum("amount_calc");
}
?>
@ -16,9 +16,9 @@ function onStart (){
<tr>
<td style="font-weight: bold;width: 5%;">{{no}}</td>
<td><a href="/all-production-month/{{no}}" style="font-weight: bold;color: #0005c5;"> {{title}} </a></td>
<td><a href="/all-production-month/{{no}}" style="font-weight: bold;"> {{all_amount_calc.amount_subtraction|number_format}} kg</a></td>
<td><a href="/all-production-month/{{no}}" style="font-weight: bold;"> {{all_amount_calc|number_format}} kg</a></td>
{% for key, record in products %}
{% partial "report/month-row" prodId=record.id all_amount=all_amount_calc.amount_subtraction %}
{% partial "report/month-row" prodId=record.id all_amount=all_amount_calc %}
{% endfor %}
<td style="font-weight: bold;color: #0005c5;">{{hours}}</td>
</tr>