@extends('admin.layout.master') @section('title', 'PURCHASE ORDER MANAGEMENT') @section('custom_style') @include('inventory.blade_styles.posting_blade_css') @endsection @section('content')

{{ __('obs.purchase') }} {{ __('obs.order') }}

{{--
--}}
@csrf
@if ($requisition)
@endif
@php $i = 0; $grandtotal = 0; @endphp @if ($quotation) @forelse ($quotation->details as $p=>$item) @php $i++; @endphp @empty @endforelse @endif @if ($requisition) @forelse ($requisition->details as $p=>$item) @php $i++; @endphp @empty @endforelse @endif @php $discountAmount = $quotation ? ($quotation->discount / 100) * $grandtotal : 0; @endphp
# {{ __('obs.product') }} {{ __('obs.note') }} {{ __('obs.available') }} {{ __('obs.qty') }} {{ __('obs.pre') }} {{ __('obs.purchase') }} {{ __('obs.date') }} {{ __('obs.pre') }} {{ __('obs.purchase') }} {{ __('obs.rate') }} {{ __('obs.quotation') }} {{ __('obs.qty') }} {{ __('obs.purchase.') }} {{ __('obs.qty') }} {{ __('obs.unit') }} {{ __('obs.price') }} {{ __('obs.subtotal') }}
{{ $i + 1 }}
{{ $item->product->name_eng }}
{{ $item->product ? $item->product->availQty->avail ?? 0 : 0 }} {{-- {{ count($item->product->getPreviousPurchaseHistory) > 0 ? date('d-m-Y', strtotime($item->getPreviousPurchaseHistory[0]->date)) : 'No Purchase Info Found'}} --}} {{-- {{ count($item->product->getPreviousPurchaseHistory) > 0 ? $item->getPreviousPurchaseHistory[0]->price : 'No Purchase Info Found'}} --}} @php $grandtotal += $subTotal = $item->quantity * $item->rate; @endphp
{{ $i + 1 }}
{{ $item->product->name_eng }}
{{ count($item->product->getPreviousPurchaseHistory) > 0 ? date('d-m-Y', strtotime($item->getPreviousPurchaseHistory[0]->date)) : 'No Purchase Info Found' }} {{ count($item->product->getPreviousPurchaseHistory) > 0 ? $item->getPreviousPurchaseHistory[0]->price : 'No Purchase Info Found' }} @php $grandtotal += $subTotal = $item->quantity * $item->rate; @endphp
{{ __('obs.total') }}
{{ __('obs.discount') }} {{ __('obs.(%)') }} {{ __('obs.discount') }} ({{ __('obs.amount') }})
{{ __('obs.net') }} {{ __('obs.amount') }}
@include('inventory.prepurchase.po.install_modal') @include('inventory.prepurchase.po.install_requisition_modal') @include('inventory.prepurchase.po.install_po_history_modal') @endsection @section('script') @stop