Suppliers Balances
# | 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 |