update
parent
04c7a1d969
commit
8a53681fea
|
|
@ -11,6 +11,10 @@ use PhpOffice\PhpSpreadsheet\Style\Alignment;
|
|||
|
||||
class GcomCrfExport implements FromView, WithStyles
|
||||
{
|
||||
protected $title = 'GCOM CRF';
|
||||
protected $template = 'modules.reports.gcom-crf';
|
||||
protected $route = 'modules.laporan.gcom';
|
||||
|
||||
protected $inventoryYear, $activityYear, $gpcData, $gpc;
|
||||
|
||||
public function __construct($inventoryYear, $activityYear, $gpcData, $gpc)
|
||||
|
|
@ -23,7 +27,7 @@ class GcomCrfExport implements FromView, WithStyles
|
|||
|
||||
public function view(): View
|
||||
{
|
||||
return view('reports.gcom-crf.report', [
|
||||
return view($this->template.'.report', [
|
||||
'inventoryYear' => $this->inventoryYear,
|
||||
'activityYear' => $this->activityYear,
|
||||
'gpcData' => $this->gpcData,
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ class GpcOutputExport implements FromView, WithStyles
|
|||
|
||||
public function view(): View
|
||||
{
|
||||
return view('reports.gpc-output.report', [
|
||||
return view('modules.reports.gpc-output.report', [
|
||||
'inventoryYear' => $this->inventoryYear,
|
||||
'gpcOutputs' => $this->gpcOutputs,
|
||||
'gpcOutputRList' => $this->gpcOutputRList,
|
||||
|
|
|
|||
|
|
@ -13,6 +13,9 @@ use Maatwebsite\Excel\Facades\Excel;
|
|||
|
||||
class GcomCrfController extends Controller
|
||||
{
|
||||
protected $title = 'GCOM CRF';
|
||||
protected $template = 'modules.reports.gcom-crf';
|
||||
protected $route = 'modules.laporan.gcom';
|
||||
protected $service;
|
||||
|
||||
public function __construct(GcomCrfService $service)
|
||||
|
|
@ -33,12 +36,12 @@ class GcomCrfController extends Controller
|
|||
|
||||
$gpcData = GcomCrfData::getAllData();
|
||||
|
||||
return view('reports.gcom-crf.index', [
|
||||
return view($this->template.'.index', [
|
||||
'title' => $this->title,
|
||||
'route' => $this->route,
|
||||
'inventoryYear' => $inventoryYear ?? date('Y'),
|
||||
'activityYear' => $activityYear ?? date('Y') - 1,
|
||||
|
||||
'gpcData' => $gpcData,
|
||||
|
||||
'gpcOutput' => $gpcOutput,
|
||||
'gpc' => $gpc,
|
||||
]);
|
||||
|
|
|
|||
|
|
@ -12,6 +12,9 @@ use Illuminate\Http\Request;
|
|||
|
||||
class GpcOutputController extends Controller
|
||||
{
|
||||
protected $title = 'GPC Output';
|
||||
protected $template = 'modules.reports.gpc-output';
|
||||
protected $route = 'modules.laporan.gpc';
|
||||
protected $service;
|
||||
|
||||
public function __construct(GpcOutputService $service)
|
||||
|
|
@ -34,7 +37,9 @@ class GpcOutputController extends Controller
|
|||
$gpcOutputRList[] = $gpcOutput->getAllColumnsWithReference();
|
||||
}
|
||||
|
||||
return view('reports.gpc-output.index', [
|
||||
return view($this->template.'.index', [
|
||||
'title' => $this->title,
|
||||
'route' => $this->route,
|
||||
'inventoryYear' => $inventoryYear,
|
||||
'gpcOutputs' => $gpcOutputs,
|
||||
'gpcOutputRList' => $gpcOutputRList,
|
||||
|
|
|
|||
|
|
@ -1,15 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
|
||||
class AR extends Model
|
||||
{
|
||||
use SoftDeletes;
|
||||
protected $table = 'p_ar';
|
||||
protected $primaryKey = 'ArId';
|
||||
|
||||
protected $guarded = [];
|
||||
}
|
||||
|
|
@ -1,23 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
|
||||
class EF extends Model
|
||||
{
|
||||
use SoftDeletes;
|
||||
protected $table = 'p_ef';
|
||||
protected $primaryKey = 'EFId';
|
||||
|
||||
protected $guarded = [];
|
||||
|
||||
function activity(){
|
||||
return $this->belongsTo(\App\Models\Master\Activity::class,'ms_activity_id');
|
||||
}
|
||||
|
||||
function sumberdata(){
|
||||
return $this->belongsTo(\App\Models\SumberDataEF::class,'sumberdata_ef_id');
|
||||
}
|
||||
}
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
|
||||
class FileDataAktivitas extends Model
|
||||
{
|
||||
// use SoftDeletes;
|
||||
protected $table = 'file_data_aktivitas';
|
||||
protected $primaryKey = 'FileDataAktivitasId';
|
||||
|
||||
protected $guarded = [];
|
||||
|
||||
function sektor(){
|
||||
return $this->belongsTo(\App\Models\Master\Sektor::class,'ms_sektor_id');
|
||||
}
|
||||
}
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
|
||||
class FilePengumuman extends Model
|
||||
{
|
||||
// use SoftDeletes;
|
||||
protected $table = 'file_pengumuman';
|
||||
protected $primaryKey = 'FilePengumumanId';
|
||||
|
||||
protected $guarded = [];
|
||||
}
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
|
||||
class GHG extends Model
|
||||
{
|
||||
use SoftDeletes;
|
||||
protected $table = 'p_ghg';
|
||||
protected $primaryKey = 'GhgId';
|
||||
|
||||
protected $guarded = [];
|
||||
}
|
||||
|
|
@ -1,23 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
|
||||
class GWP extends Model
|
||||
{
|
||||
use SoftDeletes;
|
||||
protected $table = 'p_gwp';
|
||||
protected $primaryKey = 'GwpId';
|
||||
|
||||
protected $guarded = [];
|
||||
|
||||
function ghg() {
|
||||
return $this->belongsTo(\App\Models\GHG::class,'ghg_id');
|
||||
}
|
||||
|
||||
function ar() {
|
||||
return $this->belongsTo(\App\Models\AR::class,'ar_id');
|
||||
}
|
||||
}
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
|
||||
class Kategori extends Model
|
||||
{
|
||||
use SoftDeletes;
|
||||
|
||||
protected $table = 'p_kategori';
|
||||
protected $primaryKey = 'KategoriId';
|
||||
protected $guarded = [];
|
||||
}
|
||||
|
|
@ -1,24 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Log extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
protected $table = 'ms_log';
|
||||
protected $primaryKey = 'MsLogId';
|
||||
protected $fillable = ['module', 'task', 'user_id', 'ipaddress', 'useragent', 'note'];
|
||||
protected $guarded = ['created_at', 'updated_at'];
|
||||
|
||||
/**
|
||||
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
|
||||
*/
|
||||
public function user()
|
||||
{
|
||||
return $this->belongsTo('App\Models\User','id','user_id');
|
||||
}
|
||||
}
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace App\Models\Master;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class AccessMenu extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
protected $table = 'ms_access_menu';
|
||||
protected $primaryKey = 'MsAccessMenuId';
|
||||
protected $guarded = [];
|
||||
}
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace App\Models\Master;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
|
||||
class Activity extends Model
|
||||
{
|
||||
use SoftDeletes;
|
||||
protected $table = 'ms_activity';
|
||||
protected $primaryKey = 'MsActivityId';
|
||||
|
||||
protected $guarded = [];
|
||||
}
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace App\Models\Master;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Agency extends Model
|
||||
{
|
||||
protected $table = 'ms_agency';
|
||||
protected $primaryKey = 'MsAgencyId';
|
||||
protected $guarded = [];
|
||||
}
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace App\Models\Master;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Group extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
protected $table = 'ms_group';
|
||||
protected $primaryKey = 'MsGroupId';
|
||||
protected $guarded = [];
|
||||
}
|
||||
|
|
@ -1,206 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace App\Models\Master;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Menu extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
protected $table = 'ms_menu';
|
||||
protected $primaryKey = 'MsMenuId';
|
||||
protected $guarded = [];
|
||||
|
||||
public function submenu()
|
||||
{
|
||||
return $this->hasMany(Menu::class,'parent_id','id');
|
||||
}
|
||||
|
||||
public static function coreMenus($type, array $status = [1]): mixed
|
||||
{
|
||||
return Menu::where('parent_id', '=', 0)
|
||||
->where('menu_type', '=', $type)
|
||||
->whereIn('status', $status);
|
||||
}
|
||||
|
||||
public static function coreMenusByParent($id, array $status = [1]): mixed
|
||||
{
|
||||
return Menu::where('parent_id', '=', $id)
|
||||
->whereIn('status', $status);
|
||||
}
|
||||
|
||||
public static function getMenuByParentPosition($id, $type, array $active = [1], int $year = null): mixed
|
||||
{
|
||||
if ($year) {
|
||||
$currYear = $year;
|
||||
} else {
|
||||
$currYear = date('Y');
|
||||
}
|
||||
|
||||
return Menu::where('parent_id', '=', $id)
|
||||
->where('menu_type', '=', $type)
|
||||
->whereIn('status', $active)
|
||||
->union(Menu::coreMenus($type, $active))
|
||||
->orderBy('ordering')
|
||||
->get();
|
||||
}
|
||||
|
||||
/**
|
||||
* @author alex.gz <amqit.consultant@gmail.com>
|
||||
* @created 08/12/2023 12:53
|
||||
*
|
||||
* @param $type
|
||||
* @param int|null $year
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public static function getParentByType($type, int $year = null): mixed
|
||||
{
|
||||
if ($year) {
|
||||
$currYear = $year;
|
||||
} else {
|
||||
$currYear = date('Y');
|
||||
}
|
||||
|
||||
return Menu::where('parent_id', '=', 0)
|
||||
->where('menu_type', '=', $type)
|
||||
->union(Menu::coreMenus($type))
|
||||
->orderBy('ordering')
|
||||
->get();
|
||||
}
|
||||
|
||||
/**
|
||||
* @author alex.gz <amqit.consultant@gmail.com>
|
||||
* @created 08/12/2023 18:07
|
||||
*
|
||||
* @param $type
|
||||
* @param int|null $year
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public static function getMenuByYear($type, int $year = null): mixed
|
||||
{
|
||||
if ($year) {
|
||||
$currYear = $year;
|
||||
} else {
|
||||
$currYear = date('Y');
|
||||
}
|
||||
|
||||
return Menu::where('parent_id', '=', 0)
|
||||
->where('menu_type', '=', $type)
|
||||
->where('status', '=', true)
|
||||
->orderBy('ordering')
|
||||
->get();
|
||||
}
|
||||
|
||||
/**
|
||||
* @author alex.gz <amqit.consultant@gmail.com>
|
||||
* @created 08/12/2023 12:54
|
||||
*
|
||||
* @param $type
|
||||
* @param int|null $year
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public static function getParentByTypeStatus($type, int $year = null): mixed
|
||||
{
|
||||
if ($year) {
|
||||
$currYear = $year;
|
||||
} else {
|
||||
$currYear = date('Y');
|
||||
}
|
||||
|
||||
return Menu::where('parent_id', '=', 0)
|
||||
->where('menu_type', '=', $type)
|
||||
->where('status', '=', true)
|
||||
->union(Menu::coreMenus($type))
|
||||
->orderBy('ordering')
|
||||
->get();
|
||||
}
|
||||
|
||||
/**
|
||||
* @author alex.gz <amqit.consultant@gmail.com>
|
||||
* @created 08/12/2023 12:54
|
||||
*
|
||||
* @param $id
|
||||
* @param array $active
|
||||
* @param int|null $year
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public static function getMenuByParent($id, array $active = [1], int $year = null): mixed
|
||||
{
|
||||
if ($year) {
|
||||
$currYear = $year;
|
||||
} else {
|
||||
$currYear = date('Y');
|
||||
}
|
||||
|
||||
return Menu::where('parent_id', '=', $id)
|
||||
->union(Menu::coreMenusByParent($id, $active))
|
||||
->whereIn('status', $active)
|
||||
->orderBy('ordering')
|
||||
->get();
|
||||
}
|
||||
|
||||
/**
|
||||
* @author alex.gz <amqit.consultant@gmail.com>
|
||||
* @created 08/12/2023 14:54
|
||||
*
|
||||
* @param int $year
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public static function countMenuByYear(int $year): mixed
|
||||
{
|
||||
$model = Menu::where('status', '=', true);
|
||||
return $model->count();
|
||||
}
|
||||
|
||||
/**
|
||||
* @author alex.gz <amqit.consultant@gmail.com>
|
||||
* @created 08/12/2023 12:55
|
||||
*
|
||||
* @param $id
|
||||
* @param int|null $year
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public static function getActiveById($id, int $year = null): mixed
|
||||
{
|
||||
if ($year) {
|
||||
$currYear = $year;
|
||||
} else {
|
||||
$currYear = date('Y');
|
||||
}
|
||||
|
||||
return Menu::where('id', '=', $id)
|
||||
->where('status', '=', true)
|
||||
->first();
|
||||
}
|
||||
|
||||
/**
|
||||
* @author alex.gz <amqit.consultant@gmail.com>
|
||||
* @created 08/12/2023 12:55
|
||||
*
|
||||
* @param $type
|
||||
* @param int|null $year
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public static function getActiveByPosition($type, int $year = null): mixed
|
||||
{
|
||||
if ($year) {
|
||||
$currYear = $year;
|
||||
} else {
|
||||
$currYear = date('Y');
|
||||
}
|
||||
|
||||
return Menu::where('menu_type', '=', $type)
|
||||
->where('status', '=', true)
|
||||
->union(Menu::coreMenus($type))
|
||||
->orderBy('ordering')
|
||||
->get();
|
||||
}
|
||||
}
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace App\Models\Master;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
|
||||
class Sektor extends Model
|
||||
{
|
||||
use SoftDeletes;
|
||||
protected $table = 'ms_sektor';
|
||||
protected $primaryKey = 'MsSektorId';
|
||||
|
||||
protected $guarded = [];
|
||||
}
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace App\Models\Master;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
|
||||
class SubSektor extends Model
|
||||
{
|
||||
use SoftDeletes;
|
||||
protected $table = 'ms_subsektor';
|
||||
protected $primaryKey = 'MsSubSektorId';
|
||||
|
||||
protected $guarded = [];
|
||||
|
||||
function sektor(){
|
||||
return $this->belongsTo(\App\Models\Master\Sektor::class,'ms_sektor_id');
|
||||
}
|
||||
}
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class SumberDataEF extends Model
|
||||
{
|
||||
protected $table = 'p_sumberdata_ef';
|
||||
protected $primaryKey = 'SumberDataId';
|
||||
protected $guarded = [];
|
||||
}
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
|
||||
class Unit extends Model
|
||||
{
|
||||
use SoftDeletes;
|
||||
|
||||
protected $table = 'p_unit';
|
||||
protected $primaryKey = 'UnitId';
|
||||
protected $guarded = [];
|
||||
|
||||
function kategori(){
|
||||
return $this->belongsTo(\App\Models\Kategori::class,'kategori_id','KategoriId');
|
||||
}
|
||||
}
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
|
||||
class UnitKonversi extends Model
|
||||
{
|
||||
use SoftDeletes;
|
||||
|
||||
protected $table = 'p_unit_konversi';
|
||||
protected $primaryKey = 'UnitKonversiId';
|
||||
protected $guarded = [];
|
||||
}
|
||||
|
|
@ -1,58 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
// use Illuminate\Contracts\Auth\MustVerifyEmail;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Foundation\Auth\User as Authenticatable;
|
||||
use Illuminate\Notifications\Notifiable;
|
||||
|
||||
class User extends Authenticatable
|
||||
{
|
||||
/** @use HasFactory<\Database\Factories\UserFactory> */
|
||||
use HasFactory, Notifiable;
|
||||
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
*
|
||||
* @var list<string>
|
||||
*/
|
||||
protected $fillable = [
|
||||
'name',
|
||||
'email',
|
||||
'password',
|
||||
];
|
||||
|
||||
/**
|
||||
* The attributes that should be hidden for serialization.
|
||||
*
|
||||
* @var list<string>
|
||||
*/
|
||||
protected $hidden = [
|
||||
'password',
|
||||
'remember_token',
|
||||
];
|
||||
|
||||
/**
|
||||
* Get the attributes that should be cast.
|
||||
*
|
||||
* @return array<string, string>
|
||||
*/
|
||||
protected function casts(): array
|
||||
{
|
||||
return [
|
||||
'email_verified_at' => 'datetime',
|
||||
'password' => 'hashed',
|
||||
];
|
||||
}
|
||||
|
||||
public function group()
|
||||
{
|
||||
return $this->belongsTo(\App\Models\Master\Group::class,'ms_group_id','MsGroupId');
|
||||
}
|
||||
|
||||
public function instansi()
|
||||
{
|
||||
return $this->belongsTo(\App\Models\InstansiUser::class,'id','user_id');
|
||||
}
|
||||
}
|
||||
|
|
@ -1,695 +0,0 @@
|
|||
@extends('layouts.master')
|
||||
|
||||
@section('title')
|
||||
GCOM CRF
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
<div class="card shadow-sm">
|
||||
<div class="card-header d-flex justify-content-between align-items-center">
|
||||
<h5 class="mb-0 font-weight-bold">GCOM CRF</h5>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
@if ($errors->has('error'))
|
||||
<div class="alert alert-danger">
|
||||
{{ $errors->first('error') }}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if (session('success'))
|
||||
<div class="alert alert-success">
|
||||
{{ session('success') }}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<form id="gpcForm" method="GET">
|
||||
<div class="row">
|
||||
<div class="col-md-2 pr-1">
|
||||
<x-inventory-year-select :selected-year="$inventoryYear" />
|
||||
</div>
|
||||
<div class="col-lg-2 pr-1">
|
||||
<x-activity-year-select :selected-year="$activityYear" :inventory-year="$inventoryYear" />
|
||||
</div>
|
||||
<div class="col-lg-4 d-flex align-items-end align-items-center pt-1 pr-1">
|
||||
<div class="form-group mt-2 mb-0 mr-2">
|
||||
<button type="submit" class="btn btn-info">Tampilkan</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<br />
|
||||
|
||||
@if ($gpcOutput)
|
||||
<div class="table-responsive" style="overflow-x: auto;">
|
||||
<table class="table table-bordered table-striped">
|
||||
<thead class="table-info text-white text-center">
|
||||
<tr>
|
||||
<th rowspan="2" class="align-middle" style="width: 300px;">Sectors and Subsectors</th>
|
||||
<th colspan="2">Direct Emissions (tCO2e)</th>
|
||||
<th colspan="2">Indirect emissions from the use of grid-supplied electricity, heat, steam
|
||||
and/or cooling</th>
|
||||
<th colspan="2">Emissions occurring outside the city boundary as a result of in-city
|
||||
activities</th>
|
||||
<th rowspan="2" class="align-middle">Please explain any excluded sources, identify any
|
||||
emissions covered under an ETS and provide any other comments</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Emissions in tCO2e</th>
|
||||
<th>Notation Key (if needed)</th>
|
||||
<th>Emissions in tCO2e</th>
|
||||
<th>Notation Key (if needed)</th>
|
||||
<th>Emissions in tCO2e</th>
|
||||
<th>Notation Key (if needed)</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<!-- Stationary Energy -->
|
||||
<tr class="text-right">
|
||||
<td class="bg-header text-white text-left">Stationary energy > Residential buildings</td>
|
||||
@if ($gpcOutput['i_1_1'] == null || $gpcOutput['i_1_1'] == 0)
|
||||
<td></td>
|
||||
<td class="text-center">{{ $gpcOutputR['i_1_1'] }}</td>
|
||||
@else
|
||||
<td>{{ getFormattedValue($gpcOutput['i_1_1'], 2) }}</td>
|
||||
<td></td>
|
||||
@endif
|
||||
|
||||
@if ($gpcOutput['i_1_2'] == null || $gpcOutput['i_1_2'] == 0)
|
||||
<td></td>
|
||||
<td class="text-center">{{ $gpcOutputR['i_1_2'] }}</td>
|
||||
@else
|
||||
<td>{{ getFormattedValue($gpcOutput['i_1_2'], 2) }}</td>
|
||||
<td></td>
|
||||
@endif
|
||||
|
||||
@if ($gpcOutput['i_1_3'] == null || $gpcOutput['i_1_3'] == 0)
|
||||
<td></td>
|
||||
<td class="text-center">{{ $gpcOutputR['i_1_3'] }}</td>
|
||||
@else
|
||||
<td>{{ getFormattedValue($gpcOutput['i_1_3'], 2) }}</td>
|
||||
<td></td>
|
||||
@endif
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr class="text-right">
|
||||
<td class="bg-header text-white text-left">Stationary energy > Commercial buildings &
|
||||
facilities</td>
|
||||
@if (
|
||||
($gpcOutput['i_2_1'] == null && $gpcOutput['i_6_1'] == null) ||
|
||||
($gpcOutput['i_2_1'] == 0 && $gpcOutput['i_6_1'] == 0))
|
||||
<td></td>
|
||||
<td class="text-center">{{ $gpcOutputR['i_2_1'] }}</td>
|
||||
@else
|
||||
@php
|
||||
$energyCommercialDirect =
|
||||
($gpcOutput['i_2_1'] ?? 0) + ($gpcOutput['i_6_1'] ?? 0);
|
||||
@endphp
|
||||
<td>{{ getFormattedValue($energyCommercialDirect, 2) }}</td>
|
||||
<td></td>
|
||||
@endif
|
||||
|
||||
@if (
|
||||
($gpcOutput['i_2_2'] == null && $gpcOutput['i_6_2'] == null) ||
|
||||
($gpcOutput['i_2_2'] == 0 && $gpcOutput['i_6_2'] == 0))
|
||||
<td></td>
|
||||
<td class="text-center">{{ $gpcOutputR['i_2_2'] }}</td>
|
||||
@else
|
||||
@php
|
||||
$energyCommercialIndirect =
|
||||
($gpcOutput['i_2_2'] ?? 0) + ($gpcOutput['i_6_2'] ?? 0);
|
||||
@endphp
|
||||
<td>{{ getFormattedValue($energyCommercialIndirect, 2) }}</td>
|
||||
<td></td>
|
||||
@endif
|
||||
|
||||
@if (
|
||||
($gpcOutput['i_2_3'] == null && $gpcOutput['i_6_3'] == null) ||
|
||||
($gpcOutput['i_2_3'] == 0 && $gpcOutput['i_6_3'] == 0))
|
||||
<td></td>
|
||||
<td class="text-center">{{ $gpcOutputR['i_2_3'] }}</td>
|
||||
@else
|
||||
@php
|
||||
$energyCommercialOutside =
|
||||
($gpcOutput['i_2_3'] ?? 0) + ($gpcOutput['i_6_3'] ?? 0);
|
||||
@endphp
|
||||
<td>{{ getFormattedValue($energyCommercialOutside, 2) }}</td>
|
||||
<td></td>
|
||||
@endif
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr class="text-right">
|
||||
<td class="bg-header text-white text-left">Stationary energy > Institutional buildings &
|
||||
facilities</td>
|
||||
<td></td>
|
||||
<td class="text-center">IE</td>
|
||||
<td></td>
|
||||
<td class="text-center">IE</td>
|
||||
<td></td>
|
||||
<td class="text-center">IE</td>
|
||||
<td class="text-left">Included in Commercial Buildings and Facilities</td>
|
||||
</tr>
|
||||
<tr class="text-right">
|
||||
<td class="bg-header text-white text-left">Stationary energy > Industrial buildings &
|
||||
facilities</td>
|
||||
@if ($gpcOutput['i_3_1'] == null || $gpcOutput['i_3_1'] == 0)
|
||||
<td></td>
|
||||
<td class="text-center">{{ $gpcOutputR['i_3_1'] }}</td>
|
||||
@else
|
||||
<td>{{ getFormattedValue($gpcOutput['i_3_1'], 2) }}</td>
|
||||
<td></td>
|
||||
@endif
|
||||
|
||||
@if ($gpcOutput['i_3_2'] == null || $gpcOutput['i_3_2'] == 0)
|
||||
<td></td>
|
||||
<td class="text-center">{{ $gpcOutputR['i_3_2'] }}</td>
|
||||
@else
|
||||
<td>{{ getFormattedValue($gpcOutput['i_3_2'], 2) }}</td>
|
||||
<td></td>
|
||||
@endif
|
||||
|
||||
@if ($gpcOutput['i_3_3'] == null || $gpcOutput['i_3_3'] == 0)
|
||||
<td></td>
|
||||
<td class="text-center">{{ $gpcOutputR['i_3_3'] }}</td>
|
||||
@else
|
||||
<td>{{ getFormattedValue($gpcOutput['i_3_3'], 2) }}</td>
|
||||
<td></td>
|
||||
@endif
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr class="text-right">
|
||||
<td class="bg-header text-white text-left">Stationary energy > Agriculture</td>
|
||||
@if ($gpcOutput['i_5_1'] == null || $gpcOutput['i_5_1'] == 0)
|
||||
<td></td>
|
||||
<td class="text-center">{{ $gpcOutputR['i_5_1'] }}</td>
|
||||
@else
|
||||
<td>{{ getFormattedValue($gpcOutput['i_5_1'], 2) }}</td>
|
||||
<td></td>
|
||||
@endif
|
||||
|
||||
@if ($gpcOutput['i_5_2'] == null || $gpcOutput['i_5_2'] == 0)
|
||||
<td></td>
|
||||
<td class="text-center">{{ $gpcOutputR['i_5_2'] }}</td>
|
||||
@else
|
||||
<td>{{ getFormattedValue($gpcOutput['i_5_2'], 2) }}</td>
|
||||
<td></td>
|
||||
@endif
|
||||
|
||||
@if ($gpcOutput['i_5_3'] == null || $gpcOutput['i_5_3'] == 0)
|
||||
<td></td>
|
||||
<td class="text-center">{{ $gpcOutputR['i_5_3'] }}</td>
|
||||
@else
|
||||
<td>{{ getFormattedValue($gpcOutput['i_5_3'], 2) }}</td>
|
||||
<td></td>
|
||||
@endif
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr class="text-right">
|
||||
<td class="bg-header text-white text-left">Stationary energy > Fugitive emissions</td>
|
||||
@if ($gpcOutput['i_8_1'] == null || $gpcOutput['i_8_1'] == 0)
|
||||
<td></td>
|
||||
<td class="text-center">{{ $gpcOutputR['i_8_1'] }}</td>
|
||||
@else
|
||||
<td>{{ getFormattedValue($gpcOutput['i_8_1'], 2) }}</td>
|
||||
<td></td>
|
||||
@endif
|
||||
|
||||
<td class="bg-black"></td>
|
||||
<td class="bg-black"></td>
|
||||
|
||||
|
||||
@if ($gpcOutput['vi_1'] == null || $gpcOutput['vi_1'] == 0)
|
||||
<td></td>
|
||||
<td class="text-center">{{ $gpcOutputR['vi_1'] }}</td>
|
||||
@else
|
||||
<td>{{ getFormattedValue($gpcOutput['vi_1'], 2) }}</td>
|
||||
<td></td>
|
||||
@endif
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr class="text-right">
|
||||
@php
|
||||
$totalEnergyDirect = ($gpcOutput['i_1_1'] ?? 0) + ($gpcOutput['i_2_1'] ?? 0) + ($gpcOutput['i_6_1'] ?? 0) + ($gpcOutput['i_3_1'] ?? 0) + ($gpcOutput['i_5_1'] ?? 0) + ($gpcOutput['i_8_1'] ?? 0);
|
||||
$totalEnergyIndirect = ($gpcOutput['i_1_2'] ?? 0) + ($gpcOutput['i_2_2'] ?? 0) + ($gpcOutput['i_6_2'] ?? 0) + ($gpcOutput['i_3_2'] ?? 0) + ($gpcOutput['i_5_2'] ?? 0);
|
||||
$totalEnergyOutside = ($gpcOutput['i_1_3'] ?? 0) + ($gpcOutput['i_2_3'] ?? 0) + ($gpcOutput['i_6_3'] ?? 0) + ($gpcOutput['i_3_3'] ?? 0) + ($gpcOutput['i_5_3'] ?? 0);
|
||||
@endphp
|
||||
<td class="bg-header text-white text-left">Total Stationary Energy</td>
|
||||
@if ($totalEnergyDirect == 0)
|
||||
<td></td>
|
||||
<td></td>
|
||||
{{-- <td class="text-center">{{ $gpcOutputR['i_2_1'] }}</td> --}}
|
||||
@else
|
||||
<td>{{ getFormattedValue($totalEnergyDirect, 2) }}</td>
|
||||
<td></td>
|
||||
@endif
|
||||
|
||||
@if ($totalEnergyIndirect == 0)
|
||||
<td></td>
|
||||
<td></td>
|
||||
{{-- <td class="text-center">{{ $gpcOutputR['i_1_2'] }}</td> --}}
|
||||
@else
|
||||
<td>{{ getFormattedValue($totalEnergyIndirect, 2) }}</td>
|
||||
<td></td>
|
||||
@endif
|
||||
|
||||
@if ($totalEnergyOutside == 0)
|
||||
<td></td>
|
||||
<td class="text-center"></td>
|
||||
@else
|
||||
<td>{{ getFormattedValue($totalEnergyOutside, 2) }}</td>
|
||||
<td></td>
|
||||
@endif
|
||||
<td></td>
|
||||
</tr>
|
||||
|
||||
<!-- Transportation -->
|
||||
<tr class="text-right">
|
||||
<td class="bg-header text-white text-left">Transportation > On-road</td>
|
||||
@if ($gpcOutput['ii_1_1'] == null || $gpcOutput['ii_1_1'] == 0)
|
||||
<td></td>
|
||||
<td class="text-center">{{ $gpcOutputR['ii_1_1'] }}</td>
|
||||
@else
|
||||
<td>{{ getFormattedValue($gpcOutput['ii_1_1'], 2) }}</td>
|
||||
<td></td>
|
||||
@endif
|
||||
|
||||
@if ($gpcOutput['ii_1_2'] == null || $gpcOutput['ii_1_2'] == 0)
|
||||
<td></td>
|
||||
<td class="text-center">{{ $gpcOutputR['ii_1_2'] }}</td>
|
||||
@else
|
||||
<td>{{ getFormattedValue($gpcOutput['ii_1_2'], 2) }}</td>
|
||||
<td></td>
|
||||
@endif
|
||||
|
||||
@if ($gpcOutput['ii_1_3'] == null || $gpcOutput['ii_1_3'] == 0)
|
||||
<td></td>
|
||||
<td class="text-center">{{ $gpcOutputR['ii_1_3'] }}</td>
|
||||
@else
|
||||
<td>{{ getFormattedValue($gpcOutput['ii_1_3'], 2) }}</td>
|
||||
<td></td>
|
||||
@endif
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr class="text-right">
|
||||
<td class="bg-header text-white text-left">Transportation > Rail</td>
|
||||
@if ($gpcOutput['ii_2_1'] == null || $gpcOutput['ii_2_1'] == 0)
|
||||
<td></td>
|
||||
<td class="text-center">{{ $gpcOutputR['ii_2_1'] }}</td>
|
||||
@else
|
||||
<td>{{ getFormattedValue($gpcOutput['ii_2_1'], 2) }}</td>
|
||||
<td></td>
|
||||
@endif
|
||||
|
||||
@if ($gpcOutput['ii_2_2'] == null || $gpcOutput['ii_2_2'] == 0)
|
||||
<td></td>
|
||||
<td class="text-center">{{ $gpcOutputR['ii_2_2'] }}</td>
|
||||
@else
|
||||
<td>{{ getFormattedValue($gpcOutput['ii_2_2'], 2) }}</td>
|
||||
<td></td>
|
||||
@endif
|
||||
|
||||
@if ($gpcOutput['ii_2_3'] == null || $gpcOutput['ii_2_3'] == 0)
|
||||
<td></td>
|
||||
<td class="text-center">{{ $gpcOutputR['ii_2_3'] }}</td>
|
||||
@else
|
||||
<td>{{ getFormattedValue($gpcOutput['ii_2_3'], 2) }}</td>
|
||||
<td></td>
|
||||
@endif
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr class="text-right">
|
||||
<td class="bg-header text-white text-left">Transportation > Waterborne navigation</td>
|
||||
@if ($gpcOutput['ii_3_1'] == null || $gpcOutput['ii_3_1'] == 0)
|
||||
<td></td>
|
||||
<td class="text-center">{{ $gpcOutputR['ii_3_1'] }}</td>
|
||||
@else
|
||||
<td>{{ getFormattedValue($gpcOutput['ii_3_1'], 2) }}</td>
|
||||
<td></td>
|
||||
@endif
|
||||
|
||||
@if ($gpcOutput['ii_3_2'] == null || $gpcOutput['ii_3_2'] == 0)
|
||||
<td></td>
|
||||
<td class="text-center">{{ $gpcOutputR['ii_3_2'] }}</td>
|
||||
@else
|
||||
<td>{{ getFormattedValue($gpcOutput['ii_3_2'], 2) }}</td>
|
||||
<td></td>
|
||||
@endif
|
||||
|
||||
@if ($gpcOutput['ii_3_3'] == null || $gpcOutput['ii_3_3'] == 0)
|
||||
<td></td>
|
||||
<td class="text-center">{{ $gpcOutputR['ii_3_3'] }}</td>
|
||||
@else
|
||||
<td>{{ getFormattedValue($gpcOutput['ii_3_3'], 2) }}</td>
|
||||
<td></td>
|
||||
@endif
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr class="text-right">
|
||||
<td class="bg-header text-white text-left">Transportation > Aviation</td>
|
||||
@if ($gpcOutput['ii_4_1'] == null || $gpcOutput['ii_4_1'] == 0)
|
||||
<td></td>
|
||||
<td class="text-center">{{ $gpcOutputR['ii_4_1'] }}</td>
|
||||
@else
|
||||
<td>{{ getFormattedValue($gpcOutput['ii_4_1'], 2) }}</td>
|
||||
<td></td>
|
||||
@endif
|
||||
|
||||
@if ($gpcOutput['ii_4_2'] == null || $gpcOutput['ii_4_2'] == 0)
|
||||
<td></td>
|
||||
<td class="text-center">{{ $gpcOutputR['ii_4_2'] }}</td>
|
||||
@else
|
||||
<td>{{ getFormattedValue($gpcOutput['ii_4_2'], 2) }}</td>
|
||||
<td></td>
|
||||
@endif
|
||||
|
||||
@if ($gpcOutput['ii_4_3'] == null || $gpcOutput['ii_4_3'] == 0)
|
||||
<td></td>
|
||||
<td class="text-center">{{ $gpcOutputR['ii_4_3'] }}</td>
|
||||
@else
|
||||
<td>{{ getFormattedValue($gpcOutput['ii_4_3'], 2) }}</td>
|
||||
<td></td>
|
||||
@endif
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr class="text-right">
|
||||
<td class="bg-header text-white text-left">Transportation > Off-road</td>
|
||||
@if ($gpcOutput['ii_5_1'] == null || $gpcOutput['ii_5_1'] == 0)
|
||||
<td></td>
|
||||
<td class="text-center">{{ $gpcOutputR['ii_5_1'] }}</td>
|
||||
@else
|
||||
<td>{{ getFormattedValue($gpcOutput['ii_5_1'], 2) }}</td>
|
||||
<td></td>
|
||||
@endif
|
||||
|
||||
@if ($gpcOutput['ii_5_2'] == null || $gpcOutput['ii_5_2'] == 0)
|
||||
<td></td>
|
||||
<td class="text-center">{{ $gpcOutputR['ii_5_2'] }}</td>
|
||||
@else
|
||||
<td>{{ getFormattedValue($gpcOutput['ii_5_2'], 2) }}</td>
|
||||
<td></td>
|
||||
@endif
|
||||
|
||||
@if ($gpcOutput['ii_5_3'] == null || $gpcOutput['ii_5_3'] == 0)
|
||||
<td></td>
|
||||
<td class="text-center">{{ $gpcOutputR['ii_5_3'] }}</td>
|
||||
@else
|
||||
<td>{{ getFormattedValue($gpcOutput['ii_5_3'], 2) }}</td>
|
||||
<td></td>
|
||||
@endif
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr class="text-right">
|
||||
@php
|
||||
$totalTransDirect = ($gpcOutput['ii_1_1'] ?? 0) + ($gpcOutput['ii_2_1'] ?? 0) +
|
||||
($gpcOutput['ii_3_1'] ?? 0) + ($gpcOutput['ii_4_1'] ?? 0) + ($gpcOutput['ii_5_1'] ?? 0);
|
||||
$totalTransIndirect = ($gpcOutput['ii_1_2'] ?? 0) + ($gpcOutput['ii_2_2'] ?? 0) +
|
||||
($gpcOutput['ii_3_2'] ?? 0) + ($gpcOutput['ii_4_2'] ?? 0) + ($gpcOutput['ii_5_2'] ?? 0);
|
||||
$totalTransOutside = ($gpcOutput['ii_1_3'] ?? 0) + ($gpcOutput['ii_2_3'] ?? 0) +
|
||||
($gpcOutput['ii_3_3'] ?? 0) + ($gpcOutput['ii_4_3'] ?? 0) + ($gpcOutput['ii_5_3'] ?? 0);
|
||||
@endphp
|
||||
<td class="bg-header text-white text-left">Total Transport</td>
|
||||
@if ($totalTransDirect == 0)
|
||||
<td></td>
|
||||
<td></td>
|
||||
{{-- <td class="text-center">{{ $gpcOutputR['i_2_1'] }}</td> --}}
|
||||
@else
|
||||
<td>{{ getFormattedValue($totalTransDirect, 2) }}</td>
|
||||
<td></td>
|
||||
@endif
|
||||
|
||||
@if ($totalTransIndirect == 0)
|
||||
<td></td>
|
||||
<td></td>
|
||||
{{-- <td class="text-center">{{ $gpcOutputR['i_1_2'] }}</td> --}}
|
||||
@else
|
||||
<td>{{ getFormattedValue($totalTransIndirect, 2) }}</td>
|
||||
<td></td>
|
||||
@endif
|
||||
|
||||
@if ($totalTransOutside == 0)
|
||||
<td></td>
|
||||
<td class="text-center"></td>
|
||||
@else
|
||||
<td>{{ getFormattedValue($totalTransOutside, 2) }}</td>
|
||||
<td></td>
|
||||
@endif
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
|
||||
<!-- Waste -->
|
||||
<tr class="text-right">
|
||||
<td class="bg-header text-white text-left">Waste > Solid waste disposal</td>
|
||||
@if ($gpcOutput['ii_5_1'] == null || $gpcOutput['ii_5_1'] == 0)
|
||||
<td></td>
|
||||
<td class="text-center">{{ $gpcOutputR['ii_5_1'] }}</td>
|
||||
@else
|
||||
<td>{{ getFormattedValue($gpcOutput['ii_5_1'], 2) }}</td>
|
||||
<td></td>
|
||||
@endif
|
||||
|
||||
@if ($gpcOutput['ii_5_2'] == null || $gpcOutput['ii_5_2'] == 0)
|
||||
<td></td>
|
||||
<td class="text-center">{{ $gpcOutputR['ii_5_2'] }}</td>
|
||||
@else
|
||||
<td>{{ getFormattedValue($gpcOutput['ii_5_2'], 2) }}</td>
|
||||
<td></td>
|
||||
@endif
|
||||
|
||||
@if ($gpcOutput['ii_5_3'] == null || $gpcOutput['ii_5_3'] == 0)
|
||||
<td></td>
|
||||
<td class="text-center">{{ $gpcOutputR['ii_5_3'] }}</td>
|
||||
@else
|
||||
<td>{{ getFormattedValue($gpcOutput['ii_5_3'], 2) }}</td>
|
||||
<td></td>
|
||||
@endif
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr class="text-right">
|
||||
<td class="bg-header text-white text-left">Waste > Biological treatment</td>
|
||||
<td>{{ getFormattedValue($gpcOutput['biological_treatment']) }}</td>
|
||||
<td>{{ getFormattedValue($gpcOutput['biological_treatment_indirect']) }}</td>
|
||||
<td>{{ getFormattedValue($gpcOutput['biological_treatment_outside']) }}</td>
|
||||
<td>{{ getFormattedValue($gpcOutput['residential_buildings']) }}</td>
|
||||
<td>{{ getFormattedValue($gpcOutput['residential_buildings_indirect']) }}</td>
|
||||
<td>{{ getFormattedValue($gpcOutput['residential_buildings_outside']) }}</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr class="text-right">
|
||||
<td class="bg-header text-white text-left">Waste > Incineration and open burning</td>
|
||||
<td>{{ getFormattedValue($gpcOutput['incineration_open_burning']) }}</td>
|
||||
<td>{{ getFormattedValue($gpcOutput['incineration_open_burning_indirect']) }}</td>
|
||||
<td>{{ getFormattedValue($gpcOutput['incineration_open_burning_outside']) }}</td>
|
||||
<td>{{ getFormattedValue($gpcOutput['residential_buildings']) }}</td>
|
||||
<td>{{ getFormattedValue($gpcOutput['residential_buildings_indirect']) }}</td>
|
||||
<td>{{ getFormattedValue($gpcOutput['residential_buildings_outside']) }}</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr class="text-right">
|
||||
<td class="bg-header text-white text-left">Waste > Wastewater</td>
|
||||
<td>{{ getFormattedValue($gpcOutput['wastewater']) }}</td>
|
||||
<td>{{ getFormattedValue($gpcOutput['wastewater_indirect']) }}</td>
|
||||
<td>{{ getFormattedValue($gpcOutput['wastewater_outside']) }}</td>
|
||||
<td>{{ getFormattedValue($gpcOutput['residential_buildings']) }}</td>
|
||||
<td>{{ getFormattedValue($gpcOutput['residential_buildings_indirect']) }}</td>
|
||||
<td>{{ getFormattedValue($gpcOutput['residential_buildings_outside']) }}</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr class="text-right">
|
||||
<td class="bg-header text-white text-left">Total Waste</td>
|
||||
<td>{{ getFormattedValue($gpcOutput['total_waste']) }}</td>
|
||||
<td>{{ getFormattedValue($gpcOutput['total_waste_indirect']) }}</td>
|
||||
<td>{{ getFormattedValue($gpcOutput['total_waste_outside']) }}</td>
|
||||
<td>{{ getFormattedValue($gpcOutput['residential_buildings']) }}</td>
|
||||
<td>{{ getFormattedValue($gpcOutput['residential_buildings_indirect']) }}</td>
|
||||
<td>{{ getFormattedValue($gpcOutput['residential_buildings_outside']) }}</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
|
||||
<!-- IPPU -->
|
||||
<tr class="text-right">
|
||||
<td class="bg-header text-white text-left">IPPU > Industrial process</td>
|
||||
<td>{{ getFormattedValue($gpcOutput['industrial_process']) }}</td>
|
||||
<td>{{ getFormattedValue($gpcOutput['industrial_process_indirect']) }}</td>
|
||||
<td>{{ getFormattedValue($gpcOutput['industrial_process_outside']) }}</td>
|
||||
<td>{{ getFormattedValue($gpcOutput['residential_buildings']) }}</td>
|
||||
<td>{{ getFormattedValue($gpcOutput['residential_buildings_indirect']) }}</td>
|
||||
<td>{{ getFormattedValue($gpcOutput['residential_buildings_outside']) }}</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr class="text-right">
|
||||
<td class="bg-header text-white text-left">IPPU > Produce Use</td>
|
||||
<td>{{ getFormattedValue($gpcOutput['produce_use']) }}</td>
|
||||
<td>{{ getFormattedValue($gpcOutput['produce_use_indirect']) }}</td>
|
||||
<td>{{ getFormattedValue($gpcOutput['produce_use_outside']) }}</td>
|
||||
<td>{{ getFormattedValue($gpcOutput['residential_buildings']) }}</td>
|
||||
<td>{{ getFormattedValue($gpcOutput['residential_buildings_indirect']) }}</td>
|
||||
<td>{{ getFormattedValue($gpcOutput['residential_buildings_outside']) }}</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr class="text-right">
|
||||
<td class="bg-header text-white text-left">Total IPPU</td>
|
||||
<td>{{ getFormattedValue($gpcOutput['total_ippu']) }}</td>
|
||||
<td>{{ getFormattedValue($gpcOutput['total_ippu_indirect']) }}</td>
|
||||
<td>{{ getFormattedValue($gpcOutput['total_ippu_outside']) }}</td>
|
||||
<td>{{ getFormattedValue($gpcOutput['residential_buildings']) }}</td>
|
||||
<td>{{ getFormattedValue($gpcOutput['residential_buildings_indirect']) }}</td>
|
||||
<td>{{ getFormattedValue($gpcOutput['residential_buildings_outside']) }}</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
|
||||
<!-- AFOLU -->
|
||||
<tr class="text-right">
|
||||
<td class="bg-header text-white text-left">AFOLU > Livestock</td>
|
||||
<td>{{ getFormattedValue($gpcOutput['livestock']) }}</td>
|
||||
<td>{{ getFormattedValue($gpcOutput['livestock_indirect']) }}</td>
|
||||
<td>{{ getFormattedValue($gpcOutput['livestock_outside']) }}</td>
|
||||
<td>{{ getFormattedValue($gpcOutput['residential_buildings']) }}</td>
|
||||
<td>{{ getFormattedValue($gpcOutput['residential_buildings_indirect']) }}</td>
|
||||
<td>{{ getFormattedValue($gpcOutput['residential_buildings_outside']) }}</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr class="text-right">
|
||||
<td class="bg-header text-white text-left">AFOLU > Land use</td>
|
||||
<td>{{ getFormattedValue($gpcOutput['land_use']) }}</td>
|
||||
<td>{{ getFormattedValue($gpcOutput['land_use_indirect']) }}</td>
|
||||
<td>{{ getFormattedValue($gpcOutput['land_use_outside']) }}</td>
|
||||
<td>{{ getFormattedValue($gpcOutput['residential_buildings']) }}</td>
|
||||
<td>{{ getFormattedValue($gpcOutput['residential_buildings_indirect']) }}</td>
|
||||
<td>{{ getFormattedValue($gpcOutput['residential_buildings_outside']) }}</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr class="text-right">
|
||||
<td class="bg-header text-white text-left">AFOLU > Other AFOLU</td>
|
||||
<td>{{ getFormattedValue($gpcOutput['other_afolu']) }}</td>
|
||||
<td>{{ getFormattedValue($gpcOutput['other_afolu_indirect']) }}</td>
|
||||
<td>{{ getFormattedValue($gpcOutput['other_afolu_outside']) }}</td>
|
||||
<td>{{ getFormattedValue($gpcOutput['residential_buildings']) }}</td>
|
||||
<td>{{ getFormattedValue($gpcOutput['residential_buildings_indirect']) }}</td>
|
||||
<td>{{ getFormattedValue($gpcOutput['residential_buildings_outside']) }}</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr class="text-right">
|
||||
<td class="bg-header text-white text-left">Total AFOLU</td>
|
||||
<td>{{ getFormattedValue($gpcOutput['total_afolu']) }}</td>
|
||||
<td>{{ getFormattedValue($gpcOutput['total_afolu_indirect']) }}</td>
|
||||
<td>{{ getFormattedValue($gpcOutput['total_afolu_outside']) }}</td>
|
||||
<td>{{ getFormattedValue($gpcOutput['residential_buildings']) }}</td>
|
||||
<td>{{ getFormattedValue($gpcOutput['residential_buildings_indirect']) }}</td>
|
||||
<td>{{ getFormattedValue($gpcOutput['residential_buildings_outside']) }}</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
|
||||
<!-- Generation of Grid-Supplied Energy -->
|
||||
<tr class="text-right">
|
||||
<td class="bg-header text-white text-left">Generation of grid-supplied energy >
|
||||
Electricity-only generation</td>
|
||||
<td>{{ getFormattedValue($gpcOutput['electricity_only_generation']) }}</td>
|
||||
<td>{{ getFormattedValue($gpcOutput['electricity_only_generation_indirect']) }}</td>
|
||||
<td>{{ getFormattedValue($gpcOutput['electricity_only_generation_outside']) }}</td>
|
||||
<td>{{ getFormattedValue($gpcOutput['residential_buildings']) }}</td>
|
||||
<td>{{ getFormattedValue($gpcOutput['residential_buildings_indirect']) }}</td>
|
||||
<td>{{ getFormattedValue($gpcOutput['residential_buildings_outside']) }}</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr class="text-right">
|
||||
<td class="bg-header text-white text-left">Generation of grid-supplied energy > CHP
|
||||
generation</td>
|
||||
<td>{{ getFormattedValue($gpcOutput['chp_generation']) }}</td>
|
||||
<td>{{ getFormattedValue($gpcOutput['chp_generation_indirect']) }}</td>
|
||||
<td>{{ getFormattedValue($gpcOutput['chp_generation_outside']) }}</td>
|
||||
<td>{{ getFormattedValue($gpcOutput['residential_buildings']) }}</td>
|
||||
<td>{{ getFormattedValue($gpcOutput['residential_buildings_indirect']) }}</td>
|
||||
<td>{{ getFormattedValue($gpcOutput['residential_buildings_outside']) }}</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr class="text-right">
|
||||
<td class="bg-header text-white text-left">Generation of grid-supplied energy > Heat/cold
|
||||
generation</td>
|
||||
<td>{{ getFormattedValue($gpcOutput['heat_cold_generation']) }}</td>
|
||||
<td>{{ getFormattedValue($gpcOutput['heat_cold_generation_indirect']) }}</td>
|
||||
<td>{{ getFormattedValue($gpcOutput['heat_cold_generation_outside']) }}</td>
|
||||
<td>{{ getFormattedValue($gpcOutput['residential_buildings']) }}</td>
|
||||
<td>{{ getFormattedValue($gpcOutput['residential_buildings_indirect']) }}</td>
|
||||
<td>{{ getFormattedValue($gpcOutput['residential_buildings_outside']) }}</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr class="text-right">
|
||||
<td class="bg-header text-white text-left">Generation of grid-supplied energy > Local
|
||||
renewable generation</td>
|
||||
<td>{{ getFormattedValue($gpcOutput['local_renewable_generation']) }}</td>
|
||||
<td>{{ getFormattedValue($gpcOutput['local_renewable_generation_indirect']) }}</td>
|
||||
<td>{{ getFormattedValue($gpcOutput['local_renewable_generation_outside']) }}</td>
|
||||
<td>{{ getFormattedValue($gpcOutput['residential_buildings']) }}</td>
|
||||
<td>{{ getFormattedValue($gpcOutput['residential_buildings_indirect']) }}</td>
|
||||
<td>{{ getFormattedValue($gpcOutput['residential_buildings_outside']) }}</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr class="text-right">
|
||||
<td class="bg-header text-white text-left">Total Generation of grid-supplied energy</td>
|
||||
<td>{{ getFormattedValue($gpcOutput['total_grid_supplied_energy']) }}</td>
|
||||
<td>{{ getFormattedValue($gpcOutput['total_grid_supplied_energy_indirect']) }}</td>
|
||||
<td>{{ getFormattedValue($gpcOutput['total_grid_supplied_energy_outside']) }}</td>
|
||||
<td>{{ getFormattedValue($gpcOutput['residential_buildings']) }}</td>
|
||||
<td>{{ getFormattedValue($gpcOutput['residential_buildings_indirect']) }}</td>
|
||||
<td>{{ getFormattedValue($gpcOutput['residential_buildings_outside']) }}</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
|
||||
<!-- Total Emissions (excluding generation of grid-supplied energy) -->
|
||||
<tr class="text-right">
|
||||
<td class="bg-header text-white text-left">Total Emissions (excluding generation of
|
||||
grid-supplied energy)</td>
|
||||
<td>{{ getFormattedValue($gpcOutput['total_emissions_excluding_grid_energy']) }}</td>
|
||||
<td>{{ getFormattedValue($gpcOutput['total_emissions_excluding_grid_energy_indirect']) }}
|
||||
</td>
|
||||
<td>{{ getFormattedValue($gpcOutput['total_emissions_excluding_grid_energy_outside']) }}
|
||||
</td>
|
||||
<td>{{ getFormattedValue($gpcOutput['residential_buildings']) }}</td>
|
||||
<td>{{ getFormattedValue($gpcOutput['residential_buildings_indirect']) }}</td>
|
||||
<td>{{ getFormattedValue($gpcOutput['residential_buildings_outside']) }}</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@push('styles')
|
||||
{{-- Include any custom styles here --}}
|
||||
@endsection
|
||||
|
||||
@section('js')
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
// Initialize select2 for dropdowns
|
||||
$('#inventoryYear').select2({
|
||||
placeholder: 'Pilih Tahun'
|
||||
});
|
||||
$('#activityYear').select2({
|
||||
placeholder: 'Pilih Tahun'
|
||||
});
|
||||
|
||||
// Handle form submission
|
||||
$('#gpcForm').on('submit', function(event) {
|
||||
event.preventDefault();
|
||||
const actionUrl = updateFormAction();
|
||||
window.location.href = actionUrl;
|
||||
});
|
||||
});
|
||||
|
||||
// Function to build the action URL for the form based on selected years
|
||||
function updateFormAction() {
|
||||
const inventoryYear = $('#inventoryYear').val();
|
||||
const activityYear = $('#activityYear').val() || '';
|
||||
|
||||
let actionUrl = `{{ url('reports/gcom_crf') }}/${inventoryYear}`;
|
||||
if (activityYear) actionUrl += `/${activityYear}`;
|
||||
|
||||
return actionUrl;
|
||||
}
|
||||
</script>
|
||||
@endsection
|
||||
|
||||
|
|
@ -1,24 +1,11 @@
|
|||
@extends('layouts.master')
|
||||
|
||||
@section('title', 'GCOM CRF')
|
||||
|
||||
@section('content')
|
||||
<div class="card shadow-sm">
|
||||
<div class="card-header d-flex justify-content-between align-items-center">
|
||||
<h5 class="mb-0 font-weight-bold">GCOM CRF</h5>
|
||||
<h5 class="mb-0 font-weight-bold">{{ @$title }}</h5>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
@if ($errors->has('error'))
|
||||
<div class="alert alert-danger">
|
||||
{{ $errors->first('error') }}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if (session('success'))
|
||||
<div class="alert alert-success">
|
||||
{{ session('success') }}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<form id="gpcForm" method="GET">
|
||||
<div class="row">
|
||||
|
|
@ -28,20 +15,16 @@
|
|||
<div class="col-lg-2 pr-1">
|
||||
<x-activity-year-select :selected-year="$activityYear" :inventory-year="$inventoryYear" />
|
||||
</div>
|
||||
<div class="col-lg-4 d-flex align-items-end align-items-center pt-1 pr-1">
|
||||
<div class="col-lg-12 d-flex align-items-end align-items-center pt-1 pr-1 gap-3">
|
||||
<div class="form-group mt-2 mb-0 mr-2">
|
||||
<button type="submit" class="btn btn-info">Tampilkan</button>
|
||||
</div>
|
||||
<div class="form-group mt-2 mb-0">
|
||||
<a href="{{ route('gcomCrf.export', ['inventoryYear' => $inventoryYear, 'activityYear' => $activityYear]) }}"
|
||||
class="btn btn-info">Ekspor Excel</a>
|
||||
<a href="{{ route($route.'.export', ['inventoryYear' => $inventoryYear, 'activityYear' => $activityYear]) }}"
|
||||
class="btn btn-success">Ekspor Excel</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Align the "Catatan" button to the right -->
|
||||
<div class="col-lg-4 d-flex justify-content-end align-items-center pt-1">
|
||||
<div class="form-group mt-2 mb-0">
|
||||
<button type="button" class="btn btn-info" data-toggle="modal" data-target="#catatanModal">
|
||||
<button type="button" class="btn btn-warning" data-bs-toggle="modal" data-bs-target="#catatanModal">
|
||||
Catatan
|
||||
</button>
|
||||
</div>
|
||||
|
|
@ -52,9 +35,9 @@
|
|||
<br />
|
||||
|
||||
@if ($gpcData)
|
||||
@include('reports.gcom-crf.table')
|
||||
@include('modules.reports.gcom-crf.table')
|
||||
@endif
|
||||
@include('reports.gcom-crf.note')
|
||||
@include('modules.reports.gcom-crf.note')
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
|
@ -83,7 +66,7 @@
|
|||
const inventoryYear = $('#inventoryYear').val();
|
||||
const activityYear = $('#activityYear').val() || '';
|
||||
|
||||
let actionUrl = `{{ url('reports/gcom_crf') }}/${inventoryYear}`;
|
||||
let actionUrl = `{{ url('laporan/gcom') }}/${inventoryYear}`;
|
||||
if (activityYear) actionUrl += `/${activityYear}`;
|
||||
|
||||
return actionUrl;
|
||||
|
|
|
|||
|
|
@ -4,9 +4,6 @@
|
|||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="catatanModalLabel">Catatan Notation Key</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<table class="table table-bordered">
|
||||
|
|
@ -69,7 +66,7 @@
|
|||
</table>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Tutup</button>
|
||||
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Tutup</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -6,4 +6,4 @@
|
|||
<p></p>
|
||||
</div>
|
||||
|
||||
@include('reports.gcom-crf.table')
|
||||
@include('modules.reports.gcom-crf.table')
|
||||
|
|
@ -1,47 +1,29 @@
|
|||
@extends('layouts.master')
|
||||
|
||||
@section('title')
|
||||
GPC Output
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
<div class="card shadow-sm">
|
||||
<div class="card-header d-flex justify-content-between align-items-center">
|
||||
<h5 class="mb-0 font-weight-bold">GPC Output</h5>
|
||||
<h5 class="mb-0 font-weight-bold">{{ @$title }}</h5>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
@if ($errors->has('error'))
|
||||
<div class="alert alert-danger">
|
||||
{{ $errors->first('error') }}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if (session('success'))
|
||||
<div class="alert alert-success">
|
||||
{{ session('success') }}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<form id="gpcForm" method="GET">
|
||||
<div class="row">
|
||||
<div class="col-md-2 pr-1">
|
||||
<x-inventory-year-select :selected-year="$inventoryYear" />
|
||||
</div>
|
||||
<div class="col-lg-4 d-flex align-items-end align-items-center pt-1 pr-1">
|
||||
<div class="col-lg-12 d-flex align-items-end align-items-center pt-1 pr-1 gap-3">
|
||||
<div class="form-group mt-2 mb-0 mr-2">
|
||||
<button type="submit" class="btn btn-info">Tampilkan</button>
|
||||
</div>
|
||||
<div class="form-group mt-2 mb-0">
|
||||
<a href="{{ route('gpcOutput.export', [
|
||||
<a href="{{ route($route.'.export', [
|
||||
'inventoryYear' => $inventoryYear,
|
||||
]) }}"
|
||||
class="btn btn-info">Ekspor Excel</a>
|
||||
class="btn btn-success">Ekspor Excel</a>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Align the "Catatan" button to the right -->
|
||||
<div class="col-lg-6 d-flex justify-content-end align-items-center pt-1">
|
||||
<div class="form-group mt-2 mb-0">
|
||||
<button type="button" class="btn btn-info" data-toggle="modal" data-target="#catatanModal">
|
||||
<button type="button" class="btn btn-warning" data-bs-toggle="modal" data-bs-target="#catatanModal">
|
||||
Catatan
|
||||
</button>
|
||||
</div>
|
||||
|
|
@ -51,9 +33,9 @@
|
|||
<br />
|
||||
|
||||
@if ($gpcOutputs->isNotEmpty())
|
||||
@include('reports.gpc-output.table')
|
||||
@include('modules.reports.gpc-output.table')
|
||||
@endif
|
||||
@include('reports.gcom-crf.note')
|
||||
@include('modules.reports.gcom-crf.note')
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
|
@ -75,7 +57,7 @@
|
|||
const inventoryYear = $('#inventoryYear').val();
|
||||
const activityYear = $('#activityYear').val() || '';
|
||||
|
||||
let actionUrl = `{{ url('reports/gpc_output') }}/${inventoryYear}`;
|
||||
let actionUrl = `{{ url('laporan/gpc') }}/${inventoryYear}`;
|
||||
if (activityYear) actionUrl += `/${activityYear}`;
|
||||
|
||||
return actionUrl;
|
||||
|
|
|
|||
|
|
@ -6,4 +6,4 @@
|
|||
<p></p>
|
||||
</div>
|
||||
|
||||
@include('reports.gpc-output.table')
|
||||
@include('modules.reports.gpc-output.table')
|
||||
|
|
@ -215,11 +215,11 @@ Route::name('management.')->prefix('management')->group(function () {
|
|||
Route::get('crf/export', [CrfController::class, 'export'])->name('crf.export');
|
||||
Route::get('crf/{inventoryYear?}/{activityYear?}/{sectorCode?}', [CrfController::class, 'show'])->name('crf.show');
|
||||
|
||||
Route::get('gpc_output/export', [GpcOutputController::class, 'export'])->name('gpcOutput.export');
|
||||
Route::get('gpc_output/{inventoryYear?}', [GpcOutputController::class, 'show'])->name('gpcOutput.show');
|
||||
Route::get('gpc/export', [GpcOutputController::class, 'export'])->name('gpc.export');
|
||||
Route::get('gpc/{inventoryYear?}', [GpcOutputController::class, 'show'])->name('gpc.show');
|
||||
|
||||
Route::get('gcom_crf/export', [GcomCrfController::class, 'export'])->name('gcomCrf.export');
|
||||
Route::get('gcom_crf/{inventoryYear?}/{activityYear?}', [GcomCrfController::class, 'show'])->name('gcomCrf.show');
|
||||
Route::get('gcom/export', [GcomCrfController::class, 'export'])->name('gcom.export');
|
||||
Route::get('gcom/{inventoryYear?}/{activityYear?}', [GcomCrfController::class, 'show'])->name('gcom.show');
|
||||
});
|
||||
|
||||
// Additional others Routing
|
||||
|
|
|
|||
Loading…
Reference in New Issue