added jurnal report
This commit is contained in:
@@ -0,0 +1,154 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('title')
|
||||
{{ $pageInfo['title'] }}
|
||||
@endsection
|
||||
|
||||
@section('admin-content')
|
||||
<section class="content-header">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<h1>{{ $pageInfo['title'] }}</h1>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<ol class="breadcrumb float-sm-right">
|
||||
<li class="breadcrumb-form"><a href="{{ route('admin.dashboard') }}">{{ __('Dashboard') }}</a> / </li>
|
||||
<li class="breadcrumb-form active"> {{ $pageInfo['title'] }}</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mt-4">
|
||||
<div class="col-12">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<ul>
|
||||
<li><b>Cabang:</b> {{ $cabang->name }}</li>
|
||||
<li><b>Periode:</b> {{ ucfirst($month) }} {{ $year }}</li>
|
||||
<li><b>Cost Centre</b> {{ $cabang->cost->code }}</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
@php
|
||||
use App\Helpers\FormHelper;
|
||||
@endphp
|
||||
|
||||
<section class="content">
|
||||
<div class="container-fluid">
|
||||
<!-- All Forms Table -->
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="data-tables">
|
||||
@include('backend.layouts.partials.messages')
|
||||
<div class="table-responsive">
|
||||
<table id="dataTable-table">
|
||||
<thead class="bg-light text-capitalize">
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>Type</th>
|
||||
<th>Account Number</th>
|
||||
<th>Dr</th>
|
||||
<th>Cr</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<!-- Dynamic Rows -->
|
||||
@php
|
||||
$totalDr = 0;
|
||||
$totalCr = 0;
|
||||
@endphp
|
||||
@foreach ($kategori as $item)
|
||||
@php
|
||||
$drValue = FormHelper::getNominalByFormType($cabang->id, $item->name, $item->id, $month, $year);
|
||||
$drFormatted = $drValue == 0 ? '' : number_format($drValue, 0, ',', '.');
|
||||
$totalDr += $drValue;
|
||||
@endphp
|
||||
<tr>
|
||||
<td>{{ $loop->iteration }}</td>
|
||||
<td>{{ $item->name }}</td>
|
||||
<td>{{ $item->account_number }}</td>
|
||||
<td>{{ $drFormatted }}</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
@endforeach
|
||||
|
||||
<tr>
|
||||
<td>{{ $kategori->count() + 1 }}</td>
|
||||
<td>Petty Cash</td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td>
|
||||
@php
|
||||
$crValue = $budget && $budget->amount != 0 ? $budget->amount : 0;
|
||||
$totalCr += $crValue;
|
||||
echo $crValue == 0 ? '' : number_format($crValue, 0, ',', '.');
|
||||
@endphp
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
{{-- Static Rows --}}
|
||||
<tr>
|
||||
<td>{{ $kategori->count() + 2 }}</td>
|
||||
<td>Cash Advance (Opening Balance)</td>
|
||||
<td>{{ $kategori_bca->account_number }}</td>
|
||||
<td></td>
|
||||
<td>
|
||||
@php
|
||||
$totalCr += 500000;
|
||||
@endphp
|
||||
{{ number_format(500000, 0, ',', '.') }}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>{{ $kategori->count() + 3 }}</td>
|
||||
<td>Cash Advance (Ending Balance)</td>
|
||||
<td>{{ $kategori_bca->account_number }}</td>
|
||||
<td>
|
||||
@php
|
||||
$totalDr += 500000;
|
||||
@endphp
|
||||
{{ number_format(500000, 0, ',', '.') }}
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="3" class="text-right"><strong>Total</strong></td>
|
||||
<td>{{ number_format($totalDr, 0, ',', '.') }}</td>
|
||||
<td>{{ number_format($totalCr, 0, ',', '.') }}</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
@endsection
|
||||
|
||||
@section('scripts')
|
||||
<script>
|
||||
if ($('#dataTable-table').length) {
|
||||
$('#dataTable-table').DataTable({
|
||||
responsive: false,
|
||||
dom: 'Bfrtip',
|
||||
buttons: ['excel', 'csv', 'pdf', 'print', 'colvis'],
|
||||
paging: false,
|
||||
info: false,
|
||||
pageLength: -1
|
||||
});
|
||||
}
|
||||
</script>
|
||||
@endsection
|
||||
@@ -0,0 +1,89 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('title')
|
||||
{{ $pageInfo['title'] }}
|
||||
@endsection
|
||||
|
||||
@section('admin-content')
|
||||
<section class="content-header">
|
||||
<div class="container-fluid">
|
||||
<div class="row mt-1">
|
||||
<div class="col-md-12">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<form action="{{ route('reports.jurnal.generate') }}" method="GET">
|
||||
<div class="d-flex">
|
||||
<div class="col-md-4">
|
||||
<div class="form-group mb-3">
|
||||
<label for="cabang">Pilih Cabang</label>
|
||||
<select name="cabang" id="cabang" class="form-control" required>
|
||||
<option value="">Semua Cabang</option>
|
||||
@foreach ($cabang as $cabang)
|
||||
<option value="{{ $cabang->code }}" {{ request()->cabang == $cabang->code ? 'selected' : '' }}>
|
||||
{{ $cabang->name }}
|
||||
</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="form-group mb-3">
|
||||
<label for="month">Pilih Periode Bulan</label>
|
||||
<select name="month" id="month" class="form-control" required>
|
||||
<option value="">Pilih Bulan</option>
|
||||
<option value="january" {{ request()->month == 'january' ? 'selected' : '' }}>Januari</option>
|
||||
<option value="february" {{ request()->month == 'february' ? 'selected' : '' }}>Februari</option>
|
||||
<option value="march" {{ request()->month == 'march' ? 'selected' : '' }}>Maret</option>
|
||||
<option value="april" {{ request()->month == 'april' ? 'selected' : '' }}>April</option>
|
||||
<option value="may" {{ request()->month == 'may' ? 'selected' : '' }}>Mei</option>
|
||||
<option value="june" {{ request()->month == 'june' ? 'selected' : '' }}>Juni</option>
|
||||
<option value="july" {{ request()->month == 'july' ? 'selected' : '' }}>Juli</option>
|
||||
<option value="august" {{ request()->month == 'august' ? 'selected' : '' }}>Agustus</option>
|
||||
<option value="september" {{ request()->month == 'september' ? 'selected' : '' }}>September</option>
|
||||
<option value="october" {{ request()->month == 'october' ? 'selected' : '' }}>Oktober</option>
|
||||
<option value="november" {{ request()->month == 'november' ? 'selected' : '' }}>November</option>
|
||||
<option value="december" {{ request()->month == 'december' ? 'selected' : '' }}>Desember</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4">
|
||||
<div class="form-group mb-3">
|
||||
<label for="year">Pilih Periode Tahun</label>
|
||||
<select name="year" id="year" class="form-control" required>
|
||||
<option value="">Pilih Tahun</option>
|
||||
@for ($i = 2024; $i <= date('Y'); $i++)
|
||||
<option value="{{ $i }}" {{ request()->year == $i ? 'selected' : '' }}>{{ $i }}</option>
|
||||
@endfor
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<div class="form-group">
|
||||
<button type="submit" class="btn btn-primary">Filter</button>
|
||||
<a href="{{ route('reports.jurnal') }}" class="btn btn-secondary">Reset</a>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
@endsection
|
||||
|
||||
@section('scripts')
|
||||
<script>
|
||||
if ($('#dataTable-table').length) {
|
||||
$('#dataTable-table').DataTable({
|
||||
responsive: false,
|
||||
dom: 'Bfrtip',
|
||||
buttons: ['excel', 'pdf', 'print', 'colvis'],
|
||||
});
|
||||
}
|
||||
</script>
|
||||
@endsection
|
||||
Reference in New Issue
Block a user