@extends('layouts.master') @section('css') @section('title') {{ __('report.Listofsupplier') }} @stop @endsection @section('page-header')
@endsection @section('content') @if (session('success'))

{{ session('success') }}
@endif
@foreach ($suppliers as $user) @php $i = $loop->iteration; $supplier = $supplierDetails->get($user->orginal_id); $balance = $supplierBalances->get($user->id); $openingDebit = (float) ($balance->opening_debit ?? 0); $openingCredit = (float) ($balance->opening_credit ?? 0); $currentDebit = (float) ($balance->current_debit ?? 0); $currentCredit = (float) ($balance->current_credit ?? 0); $netBalance = $openingDebit + $currentDebit - $openingCredit - $currentCredit; @endphp @if($netBalance == 0) @elseif($netBalance > 0) @else @endif @endforeach
# {{__('home.clietName')}} {{__('home.phone')}} {{__('home.Location')}} {{__('home.depit_oping')}} {{__('home.credit_oping')}} {{__('home.debit')}} {{__('home.credit')}} {{__('home.current balance')}}
{{ $i}} {{ $user->name}} {{ $supplier->phone ?? '' }} {{ $supplier->location ?? '' }} {{ number_format($openingDebit, 2) }} {{ number_format($openingCredit, 2) }} {{ number_format($currentDebit, 2) }} {{ number_format($currentCredit, 2) }}{{__('home.Balanced')}}{{__('home.debit')}} ( {{ number_format($netBalance, 2) }} ) {{__('home.SAR')}}{{__('home.credit')}} ( {{ number_format(abs($netBalance), 2) }} ) {{__('home.SAR')}}

@endsection @section('js') @endsection