@extends('master.app') @section('title', 'customer') @section('body')

Suppliers Balances

@foreach ($suppliers as $row) @endforeach
# Supplier Payble Amount Actions
{{ $loop->iteration }}

{{ $row->name }}

{{ $row->email }}

{{ $row->phone }}

@foreach (App\Models\Currency::all() as $currency)

@php $purchase = App\Models\supplierBill::where( 'supplier_id', $row->id, ) ->where('currency_id', $currency->id) ->sum('grand_total'); $bill_payment = App\Models\supplierBill::where( 'supplier_id', $row->id, ) ->where('currency_id', $currency->id) ->sum('payment'); $payment = App\Models\SupplierPayment::where( 'supplier_id', $row->id, ) ->where('currency_id', $currency->id) ->sum('amount'); $t_payment = $bill_payment + $payment; @endphp {{ $currency->title_en }} {{ $purchase - $t_payment }}

@endforeach
Payment
{{ $suppliers->links('pagination::bootstrap-4') }}
@endsection @section('pageJs') @endsection