@extends('layouts/contentLayoutMaster') @section('title', 'Management Statements') @section('vendor-style') {{-- Page Css files --}} @endsection @section('page-style') {{-- Page Css files --}} @endsection @section('content')
@include('content.partial.form-message')

Statements List

input("date_from")) }}"/>
input("date_to")) }}"/>
@php $default_show = request()->input("show") ? request()->input("show") : "Without Zero Balance"; $shows = ['Without Zero Balance', 'With Zero Balance']; if(!empty($shows)){ @endphp @php } @endphp
Reset
@php $currencies = ['USD', 'AED', 'EUR', 'IRR']; $categories = ['Customers', 'Vendors', 'Resources', 'Temporary', 'Other']; @endphp

Head Accounts:

@foreach($currencies as $currency) @endforeach @php $i = 0; $sum = []; @endphp @foreach($categories as $category) @if ($category == "Customers") @elseif ($category == "Vendors") @elseif ($category == "Resources") @else @endif @foreach($currencies as $currency) @php if( !in_array($category, ['Temporary', 'Other'])){ $sum[$currency] = (isset($sum[$currency]) ? $sum[$currency] : 0.00) + (isset($head_accounts[$category][$currency]) ? $head_accounts[$category][$currency] : 0.00); } @endphp @endforeach @endforeach @foreach($currencies as $currency) @endforeach
Row Head Account{{ $currency }}
{{ ++$i }} input("date_from") . "&date_to=" . request()->input("date_to") . "&show=$default_show" }}"> {{ $category }} {{ isset($head_accounts[$category][$currency]) ? number_format($head_accounts[$category][$currency], 2) : 0.00 }}
Summation{{ number_format(isset($sum[$currency]) ? $sum[$currency] : 0.00, 2) }}
@if( $accounts )

{{ request()->input("head_account") }} Accounts:

@if (request()->input("head_account") == "Customers")
@elseif (request()->input("head_account") == "Vendors")
@elseif (request()->input("head_account") == "Resources")
@else
@endif @foreach($currencies as $currency) @endforeach @php $i = 0; $sum = []; @endphp @foreach($accounts as $name => $balance) @php if( $default_show == "Without Zero Balance" && array_sum($balance) == 0 ){ $show_account = false; } else{ $show_account = true; } @endphp @if( $show_account ) @foreach($currencies as $currency) @php $sum[$currency] = (isset($sum[$currency]) ? $sum[$currency] : 0.00) + (isset($balance[$currency]) ? $balance[$currency] : 0.00); @endphp @endforeach @endif @endforeach @foreach($currencies as $currency) @endforeach
Row Account{{ $currency }}
{{ ++$i }} {{ $name }} request()->input("head_account"), "account" => $name, "currency" => $currency, "date_from" => request()->input("date_from"), "date_to" => request()->input("date_to"), "show" => $default_show]) }}" target="_blank"> {{ isset($balance[$currency]) ? number_format($balance[$currency], 2) : 0.00 }}
Summation{{ number_format(isset($sum[$currency]) ? $sum[$currency] : 0.00 , 2) }}
@endif
@endsection @section('vendor-script') {{-- Vendor js files --}} @endsection @section('page-script') @endsection