@extends('layouts.master') @section('page_title', 'Purchases Details') @section('title', 'Purchases Details') @section('main_item', 'Purchases') @section('sub_item', 'Purchases Details') @section('content')

Filter

business_location != '1') style="display: none" @endif>
Reset
{{-- @can('purchase_create') --}} {{-- @endcan --}}
Download Excel

Purchases Details

@php $totalGrand = 0; $totalDue = 0; @endphp @foreach($grns as $grn) @php $due_amount = $grn->grn_nettotal - \App\PurchasePayment::where('purchase_id', $grn->id)->sum('paid_amount'); $totalGrand += $grn->grn_nettotal; $totalDue += $due_amount; @endphp @endforeach
Action Purchase Date Business Location Purchase No Supplier Payment Status Grand Total Payment Due
{{ Carbon\Carbon::parse($grn->grn_date)->format('Y-m-d') }} {{ $grn->business_location_name ?? 'N/A' }} {{ $grn->ref_no }} {{ $grn->supplier->business_name ?? 'N/A' }} @if ($grn->payment_status == 'due') N/Paid @elseif ($grn->payment_status == 'paid') Paid @elseif ($grn->payment_status == 'returened') Returned @else Partial @endif {{ number_format($grn->grn_nettotal, 2) }} {{ number_format($due_amount, 2) }}
Total {{ number_format($totalGrand, 2) }} {{ number_format($totalDue, 2) }}
{{ $grns->appends($_GET)->links() }}
Showing {{ $grns->firstItem() }} to {{ $grns->lastItem() }} of {{ $grns->total() }} entries
@endsection @section('scripts') @endsection