@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