@php $quotation = \App\Models\Quotation::find(request()->route('id')); $quotationItem = \App\Models\QuotationItem::where('quotation_id', $quotation->id) ->where('revision', 'like', '%REV%') ->orderBy('created_at', 'desc')->first(); $quotationItemLists = \App\Models\QuotationItemList::where('quotation_id', $quotation->id)->where('quotation_item_id', $quotationItem->id)->orderBy('id', 'asc')->get(); $isTotal = true; $totalAmount = 0; @endphp

Requirement Item

@php if ($quotation->status != 'draft') { echo '
('.$quotationItem->revision.')
'; } @endphp
@php if ($quotation->status != 'draft') { echo 'Show All Revision'; } @endphp
@forelse($quotationItemLists as $key => $item) @php $itemAmount = $item->amount; @endphp @if ($item->tier_level==1 && $item->is_area != true) @php $totalAmount += $itemAmount; @endphp
Amount
@elseif($item->tier_level==2 && $item->is_area != true)
@if ($item->quantity !=null) {{--
QTY
--}} @endif
Amount
@elseif($item->tier_level==3 && $item->is_area != true)
@if ($item->quantity !=null)
QTY
@endif
Amount
@elseIf($item->is_area == true && empty($item->title))
THIS IS BLANK SPACE SECTION
@else
This is Area section
@endif @empty

Item Not Found!

On this revision, No items entered
@php $isTotal = false; @endphp @endforelse @if ($isTotal)
Total
@endif