@livewire('components.supplier-ledger', ['id' => $supplier_id])
# {{ __('main.purchase_info') }} {{ __('main.total_amount') }} {{ __('main.actions') }}
@php $purchases = \App\Models\Purchase::where('supplier_id', $supplier_id) ->latest() ->get(); @endphp @foreach ($purchases as $row) @if ($row->purchase_type == 1) @endif @if ($row->purchase_type == 2) @endif @endforeach
{{ $loop->index + 1 }}
{{ $row->purchase_number }}
{{ \Carbon\Carbon::parse($row->purchase_date)->format('d/m/Y') }}
{{ __('main.by') }} {{ $row->createdBy->name ?? '' }}
{{ getFormattedCurrency($row->total) }}
{{ __('main.view') }} {{ __('main.edit') }} {{ __('main.view') }}
@livewire('components.edit-supplier', ['id' => $supplier_id]) @livewire('components.supplier-add-payment', ['id' => $supplier_id])