@extends('backend.layouts.master') @section('section-title', 'Purchase') @section('page-title', 'Purchase List') @if (check_permission('purchase.create')) @section('action-button') Add Purchase @endsection @endif @push('css') @endpush @section('content')
| Purchase Date | Purchase No | Branch | Product | Supplier | Creator | Total Amount | Total Paid | Total Due | {{--Return Amount | --}}Status | Action | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| {{ $data->date }} | {{ $data->purchase_no }} | {{ $data->branch?->name }} | {{-- @if (env('APP_IMEI') == 'yes'){{ $purchase_item->product?->name }} | @else --}}
@foreach ($purchase_items as $item)
@php
$product = App\Models\Product::where('id', $item->product_id)
->with('unit.related_unit')
->first();
if ($product->unit->related_unit == null) {
$qty = $item->actual_main . ' ' . $product->unit->name;
} else {
$sub_qty = $item->actual_sub == null ? 0 : $item->actual_sub;
$qty =
$item->actual_main .
' ' .
$product->unit->name .
' ' .
$sub_qty .
' ' .
$product->unit->related_unit->name;
}
@endphp
|
{{-- @endif --}}
{{ $data->supplier?->name }} | {{ $data->user->name }} | {{ $data->total_amount }} | {{ $data->total_paid }} | {{ $data->total_due }} | {{--{{ $data->return_amount }} | --}}@if ($data->status == 0) Due @elseif($data->status == 1) Paid @elseif($data->status == 2) Returned @endif |
|
| No Purchase Found | ||||||||||||
| Total: | {{ number_format($total_stock, 0) }}pcs | {{ number_format($total_amt, 2) }} | {{ number_format($total_paid, 2) }} | {{ number_format($total_due, 2) }} | ||||||||