@if ($quotation->status != 'approved' && $quotation->status != 'accepted')
Draft
@endif

{{ $company->name ?? '' }}

{{ $company->address ?? '' }}
UEN : {{ $company->uen_number ?? '' }} / GST : {{ $company->gst_number ?? '' }}
{{ $company->website ?? '' }}
{{ $company->contact ?? '' }}
{{ $quotation->project->client_name ?? '-' }} @if ($quotation->project && !empty($quotation->project->ic_number))
XXXXX{{ \App\Helpers\Helper::maskString($quotation->project->ic_number) }}
@endif
{{ $quotation->project->email ?? '' }}
@if ($quotation->project) +{{ $quotation->project->country_code }} {{ preg_replace('/(?<=\d)(?=(\d{4})+$)/', ' ', $quotation->project->contact_number) }} @else - @endif
{{ $quotation->project->block_no ?? '' }} {{ $quotation->project->road_name ?? '' }} {{ $quotation->project->road_no ?? '' }} {{ $quotation->project->residence ?? '' }} {{ $quotation->project->country_name ?? '' }} {{ $quotation->project->postal_code ?? '' }}

Quotation #{{ $quotation->running_no }}

Date: {{ $printRevision ? date('d M Y', strtotime($quotationItem->date)) : date('d M Y', strtotime($quotation->date)) }}
{{ $quotation->status == 'draft' ? ($quotation->is_resubmit ? $quotationItem->revision : 'REV00') : $quotationItem->revision }}

Interior Design Fitting-Out Works

Thank you for your interest in our company, giving us this opportunity to send you our Quotation for your kind consideration. The Quotation is valid for 14 days and we hope to hear from you soon.
{{-- Listing --}}
@php $numberTier1 = 'A'; $numberTier2 = 1; $numberTier3 = 'a'; $iLoop = 1; $nameScope = null; $numberTier1Convert = ord($numberTier1); $numberTier3Convert = $numberTier3; $currentTier = 0; $tier1Number = 0; $tier1Init = true; $rowRT1IdxTemp = 0; @endphp @forelse ($quotationItemLists as $quotationItemList) @php if ($quotationItemList->tier_level == 1) { $numberTier1 = chr($numberTier1Convert); } if ($quotationItemList->tier_level == 3 && !$quotationItemList->is_area) { $numberTier3 = $numberTier3++; } else { $numberTier3Convert = 'a'; } if ($quotationItemList->tier_level == 1) { $currentTier = 1; } elseif ($quotationItemList->tier_level == 2) { $currentTier = 2; } elseif ($quotationItemList->tier_level == 3) { $currentTier = 3; } else { $currentTier = 4; } @endphp @if ($currentTier == 1) @if ($rowRT1IdxTemp > 0) @php $rowRT1IdxTemp = 0; @endphp
@endif @if ($rowRT1IdxTemp == 0) @php $rowRT1IdxTemp++; @endphp
@endif @endif
@php if ($currentTier == 1 && !$quotationItemList->is_area && $quotationItemTier1Lists[$tier1Number] != 0) { echo '
Sub Total :
$ ' . number_format((float) $quotationItemTier1Lists[$tier1Number], 2, '.', ',') . '
'; } @endphp
@if ($quotationItemList->tier_level == 1 && !$quotationItemList->is_area)
{{ $numberTier1 }}.
{!! nl2br(e($quotationItemList->title)) !!}
@elseif ($quotationItemList->tier_level == 2 && !$quotationItemList->is_area)
{{ $numberTier2 }}.
{!! nl2br(e($quotationItemList->title)) !!}
@elseif ($quotationItemList->tier_level == 3 && !$quotationItemList->is_area)

{{ $numberTier3 }}.

{!! nl2br(e($quotationItemList->title)) !!}

@elseif($quotationItemList->is_area == 1 && empty($quotationItemList->title)) {{-- FOR BLANK SPACE SECTION --}}
@elseif ($quotationItemList->is_area == 1)
{!! nl2br(e($quotationItemList->title)) !!}
@endif
@php if ($quotationItemList->tier_level == 1 && !$quotationItemList->is_area) { $tier1Number++; // if ($quotationItemList->amount > 0) { // if ($iLoop != 1) { // $leftStyle = 'margin-top:0.5cm; padding: 10px 0 0 0;'; // } else { // $leftStyle = 'padding: 10px 0 0 0;'; // } // echo '
//
Sub Total :
//
$ '.number_format((float) $quotationItemList->amount, 2, ".", ",").'
//
'; // } } if ($quotationItemList->tier_level == 2) { if ($quotationItemList->amount != 0) { echo '
Sub Total
$ ' . number_format((float) $quotationItemList->amount, 2, '.', ',') . '
'; } } @endphp
@php if ($loop->last) { echo '
Sub Total :
$ ' . number_format((float) $quotationItemTier1Lists[$tier1Number], 2, '.', ',') . '
'; echo '
'; } @endphp
@php if ($quotationItemList->tier_level == 1 && !$quotationItemList->is_area) { $numberTier1Convert++; $numberTier2 = 1; } elseif ($quotationItemList->tier_level == 2 && !$quotationItemList->is_area) { $numberTier2++; $numberTier3 = 'a'; } elseif ($quotationItemList->tier_level == 3 && !$quotationItemList->is_area) { ++$numberTier3; } $iLoop++; @endphp @empty Item Not Found @endforelse {{-- End Listing --}}
{{-- Summary --}}

Summary

@php $summaryTier1 = 'A'; $summaryTier1Convert = ord($summaryTier1); $summaryTotal = 0; @endphp @forelse ($quotationItemLists as $quotationItemList) @php if ($quotationItemList->tier_level == 1) { $summaryTier1 = chr($summaryTier1Convert); $summaryTotal += $quotationItemList->amount; } @endphp @if ($quotationItemList->tier_level == 1 && !$quotationItemList->is_area)
{{ $summaryTier1 }}.
{{ $quotationItemList->title }}
@if ($quotationItemList->amount)
:
@if ($quotationItemList->amount) $ {{ number_format((float) $quotationItemList->amount, 2, '.', ',') }} @endif
@endif
@endif @php if ($quotationItemList->tier_level == 1 && !$quotationItemList->is_area) { $summaryTier1Convert++; } @endphp @empty Item Not Found @endforelse
Sub-total :
$ {{ number_format((float) $summaryTotal, 2, '.', ',') }}
@if ($quotation->discount > 0)
Goodwill discount :
$ ({{ number_format((float) $quotation->discount, 2, '.', ',') }})
$ {{ number_format((float) $summaryTotal - $quotation->discount, 2, '.', ',') }}
@php $summaryTotal = $summaryTotal - $quotation->discount; @endphp @endif @if ($quotation->gst > 0)
GST {{ $quotation->gst }}% :
$ {{ number_format((float) ($summaryTotal * ($quotation->gst / 100)), 2, '.', ',') }}
@php $summaryTotal = $summaryTotal + $summaryTotal * ($quotation->gst / 100); @endphp @endif
Grand Total :
$ {{ number_format((float) $summaryTotal, 2, '.', ',') }}
{{-- End Summary --}} {{-- Last Item --}}
{{-- Payment Terms --}}
{{-- Payment Terms --}}

Payment Terms

@php function addOrdinalNumberSuffix($num) { if (!in_array($num % 100, [11, 12, 13])) { switch ($num % 10) { // Handle 1st, 2nd, 3rd case 1: return $num . 'st'; case 2: return $num . 'nd'; case 3: return $num . 'rd'; } } return $num . 'th'; } if ($quotation->payment_term_id) { $paymentTerms = \App\Models\PaymentTerm::where('id', $quotation->payment_term_id)->first(); $paymentTermPercentages = \App\Models\PaymentTermPercentage::where( 'payment_term_id', $paymentTerms->id, )->get(); $paymentTermPercentageName = null; } $paymentTermsTotal = $summaryTotal; $paymentTermLoop = 1; @endphp @if ($quotation->payment_term_id) @forelse ($paymentTermPercentages as $paymentTermPercentage) @if ($loop->last) @php $paymentTermPercentageName = 'Final Payment'; @endphp @else @php $paymentTermPercentageName = addOrdinalNumberSuffix($paymentTermLoop) . ' Payment'; @endphp @endif
({{ $paymentTermPercentageName }})
: {{ $paymentTermPercentage->percentage }}% {{ $paymentTermPercentage->description }}
:
${{ number_format((float) (($paymentTermPercentage->percentage / 100) * $paymentTermsTotal), 2, '.', ',') }}
@php $paymentTermLoop++; @endphp @empty Payment Terms Not Found @endforelse @endif
Total :
${{ number_format((float) $paymentTermsTotal, 2, '.', ',') }}
Payment for any additional works ( Variation Orders )
requested during the renovation phase will be collected in full with the 2nd / 3rd progressive payment.
{{-- Payment Terms --}}
If you wish to confirm the order, please acknowledge your acceptance at space below and return a copy for our record. Kindly refer to TERMS & CONDITIONS.

It is my pleasure to be of service to you.
Prepared by:
{{--
@if ($quotation->project && $quotation->project->sales->signature && $signatureShow)
@endif
--}}
@if ($quotation->project && $quotation->project->sales) {{ $quotation->project->sales->name ?? '' }} @else - @endif
@if ($quotation->project && $quotation->project->sales) +{{ $quotation->project->sales->country_code ?? '' }} {{ preg_replace('/(?<=\d)(?=(\d{4})+$)/', ' ', $quotation->project->sales->phone) }} @else - @endif
{{ $quotation->project->sales->title->title ?? '' }}
Confirmed and Signed by:
@if ($quotationItem->client_sign) @if (config('app.env') === 'local')
@else
@endif @endif
@if ($quotation->project) {{ $quotation->project->client_name ?? '' }} @endif
@if (!empty($quotation->project->ic_number))
@if ($quotation->project) XXXXX{{ \App\Helpers\Helper::maskString($quotation->project->ic_number) ?? '-' }} @endif
@endif {{--
{{ $quotationItem->date_signed ? date('d M Y', strtotime($quotationItem->date_signed)) : '-' }}
--}}
@if ($quotationItem->client_sign && $signatureShow) @endif
Client's Signature
Page {PAGENO} of {nb}
{{ $company->name ?? '' }}
@if ($quotationItem->client_sign && $signatureShow) @endif
Client's Signature
Page {PAGENO} of {nb}
{{ $company->name ?? '' }}