@extends('layouts.page')
@section('title')
Budget Vs Actuals
@endsection
@section('navs')
@endsection
@section('content')
{{ Form::open(['method' => 'get', 'id' => 'idThisForm']) }}
{!! Form::select('date_type', ['' => 'Date Range']+AppHelper::options('DateRange'), request()->date_type, ['class' => 'form-control1 mr-2', 'onchange'=>'updateDatesRange(this)']) !!}
{{ Form::date('from_date', request()->from_date) }}
{{ Form::date('to_date', request()->to_date) }}
{!! Form::select('entity', ['' => 'Entity']+AppHelper::options('entities'), request()->entity, ['class' => empty(request()->entity) ? 'blank' : '','style' => 'width: 120px']) !!}
{{ Form::submit('Get', ['class' => 'btn btn-outline-info btn-sm mx-2']) }}
{{ Form::button('Reset', ['class' => 'btn btn-outline-info btn-sm', 'onclick' => 'clearForm(document.getElementById("idThisForm"))']) }}
{{ Form::close() }}
@php
$totalManual = 0;
$totalPayment = 0;
@endphp
| Ministry |
Manual |
Payments |
Variance |
% |
@forelse ($recordsRows as $row)
@php
$manual = $row->manual_amount ?? 0;
$payment = $row->total_amount ?? 0;
$variance = $manual - $payment;
$percent = $manual > 0 ? round(($payment / $manual) * 100, 2) : 0;
$totalManual += $manual;
$totalPayment += $payment;
@endphp
| {{ AppHelper::dropdown($row->report_category, 'departments_short_report') }} |
{{ AppHelper::numberUS(round($manual)) }} |
{{ AppHelper::numberUS(round($payment)) }} |
{{ AppHelper::numberUS(round($variance)) }}
|
{{ $percent }}% |
@empty
|
No records found
|
@endforelse
{{-- TOTAL ROW --}}
@php
$totalVariance = $totalManual - $totalPayment;
$totalPercent = $totalManual > 0
? round(($totalPayment / $totalManual) * 100, 2)
: 0;
@endphp
| Total |
{{ AppHelper::numberUS(round($totalManual)) }} |
{{ AppHelper::numberUS(round($totalPayment)) }} |
{{ AppHelper::numberUS(round($totalVariance)) }}
|
{{ $totalPercent }}% |
| Grand Total |
Totals |
Differences |
@php
$totalAmount = $totalRow[0]->total_amount ?? 0;
$grandDifference = $totalAmount - $totalPayment;
@endphp
|
{{ AppHelper::numberUS(round($totalAmount)) }}
|
{{ AppHelper::numberUS(round($totalPayment)) }}
|
{{ AppHelper::numberUS(round($grandDifference)) }}
|
@endsection