@php $breadcrumbs = [ 'Quotation List' => url('/quotation_list'), 'Quotation View' => '' ]; // ดึงไอดีหลักไปใช้งานในระบบ Workflow $id = $quotation->quotation_id; // แกะข้อมูลระบบ Quantity และรายการย่อย $use_qty = $quotation->quotation_use_qty ?? 0; $main_qty = $quotation->quotation_main_qty ?? 0; $sub_services = json_decode($quotation->quotation_sub_services, true) ?? []; $sub_amounts = json_decode($quotation->quotation_sub_amounts, true) ?? []; $sub_qtys = json_decode($quotation->quotation_sub_qtys, true) ?? []; @endphp @extends('layouts.master') @section('title') Quotation View - {{ $quotation->quotation_no }} @endsection @section('style') @endsection @section('content')

Quotation Details

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 }}
@if($use_qty == 1) @endif @if($use_qty == 1) @endif @if(!empty($sub_services)) @foreach($sub_services as $index => $sub) @php $current_sub_amount = isset($sub_amounts[$index]) ? (float)$sub_amounts[$index] : 0; $current_sub_qty = isset($sub_qtys[$index]) ? (float)$sub_qtys[$index] : 0; @endphp @if($use_qty == 1) @endif @endforeach @endif
DescriptionQuantityAmount (THB)
{{ $quotation->quotation_main_description }} {{ $main_qty != 0 ? number_format($main_qty) : '' }} {{ (float)$quotation->quotation_amount != 0 ? number_format((float)$quotation->quotation_amount, 2) : '' }}
{{ $sub }} {{ $current_sub_qty != 0 ? number_format($current_sub_qty) : '' }} @if($current_sub_amount != 0) {{ number_format($current_sub_amount, 2) }} @endif
@if(!empty(trim($quotation->quotation_remark))){{ trim($quotation->quotation_remark) }}@else- No remark specified -@endif
Special Discount @php $total_before_discount = (float)$quotation->quotation_amount; $disc_val = (float)$quotation->quotation_discount_value; $discount = ($quotation->quotation_discount_type == 'percent') ? ($total_before_discount * $disc_val / 100) : $disc_val; @endphp ({{ number_format($discount, 2) }})
NET TOTAL : {{ number_format($total_before_discount - $discount, 2) }}

{!! csrf_field() !!}
{{-- ปุ่ม Approved (อนุมัติ)สำหรับ Public Customer --}} {{-- ปุ่ม Reject (ปฏิเสธ) สำหรับ Public Customer --}} {{-- ปุ่ม Skip --}} {{-- --}}
@endsection @section('script') @endsection