@extends('layouts.master') @section('css') @section('title') {{__('home.customerList')}} @stop @endsection @section('page-header')
| # | {{__('home.clietName')}} | {{__('home.phone')}} | {{__('home.Location')}} | {{__('home.depit_oping')}} | {{__('home.credit_oping')}} | {{__('home.credit')}} | {{__('home.debit')}} | {{__('home.current balance')}} |
|---|---|---|---|---|---|---|---|---|
| {{ $users->firstItem() + $index }} | {{ $user->name }} | {{ $user->customer->phone ?? '' }} | {{ $user->customer->address ?? '' }} | {{ $user->debtor_opening }} | {{ $user->creditor_opening }} | {{ $user->debtor_current }} | {{ $user->creditor_current }} | @php $balance = $user->debtor_current - $user->creditor_current; @endphp @if($balance == 0) {{__('home.Balanced')}} @elseif($balance > 0) {{__('home.credit')}} ({{round($balance,2)}}) {{__('home.SAR')}} @else {{__('home.debit')}} ({{round(abs($balance),2)}}) {{__('home.SAR')}} @endif |
| {{__('home.Total')}} | {{ $totaldebit }} | {{ $totalcredit }} | @php $finalBalance = $totaldebit - $totalcredit; @endphp {{ $finalBalance > 0 ? __('home.credit') : __('home.debit') }} ({{ round(abs($finalBalance), 2) }}) | |||||