@extends('layouts.app') @section('css') @endsection @section('content')
{{$supplierData->name}}
@include('admin.supplier.supplier_tab')
{{ __('Total Amount') }}

{{ __('Paid Amount') }}

{{ __('Balance') }}

@php $balance = $totalPaid = $totalBill = 0; @endphp @foreach($supplierLedger as $key=>$data) @php $balance += isset($data['total']) ? $data['total'] : 0; $balance -= isset($data['amount']) ? $data['amount'] : 0; $totalPaid += isset($data['amount']) ? $data['amount'] : 0; $totalBill += isset($data['total']) ? $data['total'] : 0; @endphp @endforeach @if (!empty($data['currency']['symbol'])) @endif
# {{ __('Date') }} {{ __('Purchase Order') }} {{ __('Paid Amount') }} {{ __('Bill Amount') }} {{ __('Balance') }}
{{ ++$key }} {{ formatDate($data['transaction_date']) }} @if (!empty($data['purchase_order_id'])) {{ $data['purchase_order']['reference'] }} @else {{ $data['reference'] }} @endif @if(isset($data['amount'])) {{ formatCurrencyAmount($data['amount'], $data['currency']['symbol']) }} @else {{ '-' }} @endif @if(isset($data['total'])) {{ formatCurrencyAmount($data['total'], $data['currency']['symbol']) }} @else {{ '-' }} @endif {{ formatCurrencyAmount($balance, $data['currency']['symbol']) }}
Total = {{ formatCurrencyAmount($totalPaid, $data['currency']['symbol']) }} {{ formatCurrencyAmount($totalBill, $data['currency']['symbol']) }} {{ formatCurrencyAmount($balance, $data['currency']['symbol']) }}
@endsection @section('js') @endsection