@extends('backend.layouts.master') @section('section-title', 'Supplier') @section('page-title', 'Supplier Due') @section('content')
@php $supliers = App\Models\Supplier::get(); @endphp
Reset Print

Supplier Due Report

@php $sub_total = 0; @endphp @forelse($suppliers as $data) @php $count_sup = App\Models\Purchase::where('supplier_id', $data->id)->count(); $count_tra = App\Models\Transaction::where('supplier_id', $data->id)->count(); $open_balance = open_balance_supplier($data->id, $data->open_receivable, $data->open_payable); $pur_total = App\Models\Purchase::where('supplier_id', $data->id)->sum('total_amount'); $pur_paid = App\Models\Purchase::where('supplier_id', $data->id)->sum('total_paid'); $pur_due = App\Models\Purchase::where('supplier_id', $data->id)->sum('total_due'); $sub_total += ($pur_due + $open_balance); @endphp {{-- edit modal --}} @csrf @method('PUT') {{-- delete modal --}} @csrf @method('DELETE') @empty @endforelse
#SL Name & Email & Phone Total Purchase Purchase Paid Purchase Due Previous Due Total Due
{{ $loop->index + 1 }} {{ $data->name }}
{{ $data->phone }}
{{ ($data->email == Null)?'NULL':$data->email; }}
{{ $pur_total }} {{ empty(get_setting('com_currency')) ? : get_setting('com_currency') }} {{ $pur_paid }} {{ empty(get_setting('com_currency')) ? : get_setting('com_currency') }} {{ $pur_due }} {{ empty(get_setting('com_currency')) ? : get_setting('com_currency') }} {{ $open_balance }} {{ empty(get_setting('com_currency')) ? : get_setting('com_currency') }} {{ $open_balance + $pur_due }} {{ empty(get_setting('com_currency')) ? : get_setting('com_currency') }}
No Data Available
Total Price: {{number_format($sub_total,2)}} {{ empty(get_setting('com_currency')) ? : get_setting('com_currency') }}
{{ $suppliers->onEachSide(1)->links() }}
@endsection