@extends('layout.app') @section('title', __('purchase_report')) @section('content')
@php $request = request(); @endphp
@foreach ($warehouses as $warehouse) @endforeach
@php $total_grand_total = 0; $total_paid = 0; $total_due = 0; @endphp @foreach ($purchases as $purchase) @php $due_amount = $purchase->grand_total - $purchase->paid_amount; $total_grand_total += $purchase->grand_total; $total_paid += $purchase->paid_amount; $total_due += $due_amount; @endphp @endforeach
{{ __('sl') }} {{ __('date') }} {{ __('supplier') }} {{ __('grand_total') }} {{ __('paid') }} {{ __('due') }} {{ __('payment_status') }}
{{ $loop->iteration }} {{ dateFormat($purchase->date) }} {{ $purchase->supplier->name }} {!! numberFormat($purchase->grand_total) !!} {!! numberFormat($purchase->paid_amount) !!} {!! numberFormat($due_amount) !!} @if (!$purchase->payment_status) {{ __('due') }} @else {{ __('paid') }} @endif
{{ __('total') }} {{ numberFormat($total_grand_total) }} {{ numberFormat($total_paid) }} {{ numberFormat($total_due) }}
@endsection @push('scripts') @endpush