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
|
||||
Reference in New Issue
Block a user