@extends('layouts.main') @push('styles') @endpush @section('content')

Cash Expenses Report

@include('expenses::payments.menu') @include('flash::message')
{{ Form::open(['method'=>'post','route' => 'payments.view_payments']) }}
{{ Form::submit('Submit', ['class'=>'btn btn-success btn-rounded btn-block pull-right']) }}
{{ Form::close() }}
@if(isset($display))

{!! isset($display) ? $display : '' !!}

@endif

@php $count = 0; $total = 0; @endphp @if($payments) @if(count($payments) > 0) @foreach( $payments as $item) @php $display_state = ""; $hospital_bill_id = $item->bill_id; $hospital_bill = is_null($item->bill_id) ? null : \Streamline\Models\HospitalBill::withTrashed()->find($item->bill_id); if ($hospital_bill) { $hospital_bill_type = $hospital_bill->bill_type; $display_state = in_array($hospital_bill_type, ['DRU','SUN']) ? 'none' : ''; } @endphp @php if ($display_state != 'none') { $count ++; $total += $item->sum; } @endphp @endforeach @endif @endif
# Staff In-Charge Vendor Transcation ID Paid From Account Memo Payment Date Record Date Amount Action
{{ $count + 1 }} {{ get_full_name($item->created_by, 'id', 'first_name', 'last_name', 'users') }} {{ get_name($item->vendor, 'id', 'name', 'suppliers') }} {{ $item->transaction_id }} {{ get_name($item->account_id, 'id', 'name', 'chart_of_accounts') }} {{ $item->memo }} {{ streamline_date($item->expense_date) }} {{ streamline_date_time_short($item->created_at) }} {{ ugandan_shillings($item->sum) }} @if($item->bill_id) Detail @else Detail @endif @if(Auth::user()->can('edit-payment-record')) @if (is_payment_transaction_reconciled($item->id) == false) {{ __('payments.edit') }} @else {{ __('payments.edit') }} @endif @endif @if(Auth::user()->can('delete-payment-record')) @if (is_payment_transaction_reconciled($item->id) == false) @else {{ __('payments.delete') }} @endif @endif
Total {{ ugandan_shillings($total) }}
{{ Form::open(['method'=>'post','route' => 'payments.view_payments', 'id'=>'reload_payments']) }} {{ Form::hidden('staff_member', $request->staff_member) }} {{ Form::hidden('vendor', $request->vendor) }} {{ Form::hidden('dates', $request->dates) }} {{ Form::hidden('start_date', $request->start_date) }} {{ Form::hidden('end_date', $request->end_date) }} {{ Form::close() }} @endsection @push('scripts') @endpush