@php
$i = 0;
$grandtotal = 0;
@endphp
@if ($quotation)
@forelse ($quotation->details as $p=>$item)
| {{ $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
|
@php
$i++;
@endphp
@empty
@endforelse
@endif
@if ($requisition)
@forelse ($requisition->details as $p=>$item)
| {{ $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
|
@php
$i++;
@endphp
@empty
@endforelse
@endif