@extends('master.app') @section('title', 'Report') @section('pageCSS') @endsection @section('body')
{{--
@method('GET') @csrf
@if ($bdate == 1) @else
@endif
@if ($bdate == 1) @else
@endif
--}}
@foreach ($currencies as $row) @endforeach @foreach ($currencies as $row) @endforeach @foreach ($currencies as $row) @endforeach @foreach ($currencies as $row) @endforeach @foreach ($customers as $row) @foreach ($currencies as $cur_row) @endforeach @foreach ($currencies as $cur_row) @endforeach @foreach ($currencies as $cur_row) @endforeach @foreach ($currencies as $cur_row) @php $balance = $sale ->where('customer_id', $row->id) ->where('currency_id', $cur_row->id) ->sum('final_amount') - ($advances ->where('customer_id', $row->id) ->where('currency_id', $cur_row->id) ->sum('amount') + $received ->where('customer_id', $row->id) ->where('currency_id', $cur_row->id) ->sum('amount')); @endphp @if ($balance != 0) @else @endif @endforeach @endforeach @foreach ($currencies as $row) @endforeach @foreach ($currencies as $row) @endforeach @foreach ($currencies as $row) @endforeach @foreach ($currencies as $row) @endforeach @foreach ($currencies as $row) @endforeach @foreach ($currencies as $row) @endforeach @foreach ($currencies as $row) @endforeach @foreach ($currencies as $row) @endforeach
Name INVOICES RECIEVEDS ADVANCES BALANCES
{{ $row->title_en }}{{ $row->title_en }}{{ $row->title_en }}{{ $row->title_en }}
{{ $row->name }}{{ $sale->where('customer_id', $row->id)->where('currency_id', $cur_row->id)->sum('final_amount') }} {{ $received->where('customer_id', $row->id)->where('currency_id', $cur_row->id)->sum('amount') }} {{ $advances->where('customer_id', $row->id)->where('currency_id', $cur_row->id)->sum('amount') }} {{ $balance }} {{ $balance }}
Subtotal INVOICES RECIEVEDS ADVANCES BALANCES
{{ $row->title_en }}{{ $row->title_en }}{{ $row->title_en }}{{ $row->title_en }}
{{ $sale->where('currency_id', $row->id)->sum('final_amount') }}{{ $received->where('currency_id', $row->id)->sum('amount') }}{{ $advances->where('currency_id', $row->id)->sum('amount') }}{{ $sale->where('currency_id', $row->id)->sum('final_amount') - ($received->where('currency_id', $row->id)->sum('amount') + $advances->where('currency_id', $row->id)->sum('amount')) }}
@endsection @section('pageJs') @endsection