@extends('layouts.master') @section('title') Quotation View - {{ $quotation->quotation_no }} @endsection @section('style') @endsection @section('content') @include('layouts.header')

Quotation Details

Back
Quotation Date :
{{ date('d M Y', strtotime($quotation->quotation_date)) }}
Expiration Date :
{{ $quotation->quotation_exp_date ? date('d M Y', strtotime($quotation->quotation_exp_date)) : '-' }}
Quotation No :
{{ $quotation->quotation_no }}

Attention :
{{ $quotation->quotation_attention }}
{!! nl2br(e($quotation->quotation_attention_detail)) !!}
Project Name :
{{ $quotation->quotation_project_name }}
Project Duration :
{{ $quotation->quotation_project_duration }}
Description Amount (THB)
{{ $quotation->quotation_main_description }}
@php $sub_services = json_decode($quotation->quotation_sub_services, true); @endphp @if(!empty($sub_services))
@foreach($sub_services as $sub) {{ $sub }} @endforeach
@endif
{{ number_format((float)$quotation->quotation_amount, 2) }}
Special Discount @php $amount = (float)$quotation->quotation_amount; $disc_val = (float)$quotation->quotation_discount_value; $discount = ($quotation->quotation_discount_type == 'percent') ? ($amount * $disc_val / 100) : $disc_val; @endphp ({{ number_format($discount, 2) }})
NET TOTAL : {{ number_format($amount - $discount, 2) }}
@php $all_workflow_approve = DB::table('workflow_approve') ->where('workflow_approve_item', $id) ->get(); $workflow_approve_who = $all_workflow_approve->where('workflow_approve_status', 'pending')->first(); $workflow_reject_who = $all_workflow_approve->where('workflow_approve_status', 'rejected'); // ดึงค่า user_role มาทำเป็น Array เช่น [1, 2] $user_meta = DB::table('user_meta')->where('user_userid', Auth::user()->id)->first(); $my_roles = $user_meta ? explode('///', $user_meta->user_role) : []; // echo $workflow_approve_who->workflow_approve_who_id; // echo '
'; // echo $user_role_id; @endphp @if($workflow_approve_who && in_array($workflow_approve_who->workflow_approve_who_id, $my_roles))
{{-- 3656 --}}
{!! csrf_field() !!}
Reject
@endif @if(!$workflow_reject_who->isEmpty() && Auth::user()->hasAnyRole(['Admin', 'Admin-Consult']))
{!! csrf_field() !!}
@endif
@include('layouts.footer') @endsection