@php $templateQuotation = \App\Models\TemplateQuotation::find(request()->route('id')); $templateQuotationItem = \App\Models\TemplateQuotationItem::where('template_quotation_id', $templateQuotation->id) ->where('revision', 'like', '%REV%') ->orderBy('created_at', 'desc')->first(); $templateQuotationItemLists = \App\Models\TemplateQuotationItemList::where('template_quotation_id', $templateQuotation->id)->where('template_quotation_item_id', $templateQuotationItem->id)->orderBy('id', 'asc')->get(); $isTotal = true; $totalAmount = 0; @endphp

Requirement Item

@forelse($templateQuotationItemLists as $key => $item) @php $itemAmount = (int) str_replace('$', '', $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
@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