@extends('master.app') @section('title', 'customer') @section('pageCSS') @endsection @section('body')
Total Sale
@foreach ($currencies as $row)
{{ $row->title_en . ' ' . $customer_sale->where('currency_id', $row->id)->sum('final_amount') }}
@endforeach
Total Received
@foreach ($currencies as $row)
{{ $row->title_en . ' ' . $customer_recieved->where('currency_id', $row->id)->sum('amount') }}
@endforeach
Total Advance
@foreach ($currencies as $row)
{{ $row->title_en . ' ' . $customer_advance->where('currency_id', $row->id)->sum('amount') }}
@endforeach
Return
@foreach ($currencies as $row)
{{ $row->title_en . ' ' . $customer_return->where('currency_id', $row->id)->sum('amount') }}
@endforeach
Balance
@foreach ($currencies as $row) @php $bills = $customer_sale ->where('currency_id', $row->id) ->sum('final_amount'); $ad = $customer_advance ->where('currency_id', $row->id) ->sum('amount'); $re = $customer_recieved ->where('currency_id', $row->id) ->sum('amount'); $ad_re = $ad + $re; @endphp
{{ $row->title_en }} {{ $bills - $ad_re }}
@endforeach
@endsection @section('pageJs') @endsection