@php $company = \App\Models\Company::getPrimary(); $termsConditions = \App\Models\TermsCondition::getActive(); @endphp Quotation - {{ $quotation->quotation_number }}
@if($company && $company->logo_path) Company Logo @else  Logo @endif

{{ $company ? strtoupper($company->company_name) : 'ALFA MACHINE TOOLS' }}

@if($company && $company->company_description) {{ $company->company_description }}
@else Manufacturer & Exporter of Engineering Machinery
Hydraulic & Pneumatic Power Press, Press Brake, Shearing Machine
@endif @if($company && ($company->city || $company->state)) {{ $company->address ?? '' }}{{ ($company->address && ($company->city || $company->state)) ? ', ' : '' }}{{ $company->city }}{{ ($company->city && $company->state) ? ', ' : '' }}{{ $company->state }} @else Rajkot Industrial Area, Gujarat, India @endif

To,
{{ $quotation->customer->customer_name }}
@if($quotation->customer->address){{ $quotation->customer->address }}
@endif @if($quotation->customer->city || $quotation->customer->state){{ $quotation->customer->city }}{{ $quotation->customer->city && $quotation->customer->state ? ', ' : '' }}{{ $quotation->customer->state }}
@endif @if($quotation->customer->mobile)Mobile No: {{ $quotation->customer->mobile }}
@endif
@if($quotation->valid_until) @endif
Quote No. : {{ $quotation->quotation_number }}
Date : {{ $quotation->quotation_date->format('d-m-Y') }}
Valid Until : {{ $quotation->valid_until->format('d-m-Y') }}

      SUBJECT : QUOTATION FOR {{ $quotation->items->count() > 0 ? $quotation->items->first()->product_name : 'Products/Services' }} @if($quotation->items->count() > 1) & {{ $quotation->items->count() - 1 }} more @endif

DEAR SIR ,

WE ARE PLEASED TO LEARN THAT YOU HAVE A REQUIREMENT {{ $quotation->items->count() ? $quotation->items->pluck('product_name')->join(', ') : 'Products/Services' }} BASED ON YOUR REQUIREMENT, WE ARE PLEASED TO SUBMIT OUR OFFERAS FOLLOWS.

OUR OFFER CONSISTS OF THE FOLLOWING:

WE HOPE YOU SHALL FIND THE OFFER AND TECHNICAL SPECIFICATION THERE IN, WELL IN LINE WITH YOUR REQUIREMENT. IF YOU HAVE ANY QUERY WITH OFFER, PLEASE DO NOT HESITATE TO CALL OR E-MAIL US.

THANK YOU ONCE AGAIN FOR CONSIDERING {{ $company ? strtoupper($company->company_name) : 'ALFA MACHINE TOOLS' }} FOR YOUR MACHINE REQUIREMENT. WE ASSURE YOU OF BEST SERVICE AND ATTENTION AT ALL TIMES.

For, {{ $company ? strtoupper($company->company_name) : 'ALFA MACHINE TOOLS' }}

@if($company && $company->phone_number) Contact : {{ $company->phone_number }}
@else Contact : +91 9227607851
@endif

@foreach($quotation->items as $index => $item)

PRODUCT {{ $index + 1 }}: {{ strtoupper($item->product_name) }}

Product Type: {{ $item->product_type ?? 'N/A' }}
Quantity: {{ $item->quantity }}
Unit Price: ₹{{ number_format($item->unit_price, 2) }}
@if($item->product && $item->product->product_image) {{ $item->product_name }} @else
No Image
@endif
@if($item->description)
PRODUCT DESCRIPTION:

{!! nl2br(e($item->description)) !!}

@endif @if($item->product)
TECHNICAL SPECIFICATIONS:
Specification Details
Product Name {{ $item->product->product_name }}
Product Model {{ $item->product_type }}
Quantity {{ $item->quantity }}
@php // Get all specs for this product model from Product table $allSpecs = \App\Models\Product::where('product_master_id', $item->product_id) ->get(); $specsCount = $allSpecs->filter(function($s) { return $s->spec_name; })->count(); $midPoint = ceil($specsCount / 2); $specsArray = $allSpecs->filter(function($s) { return $s->spec_name; })->values(); $leftSpecs = $specsArray->slice(0, $midPoint); $rightSpecs = $specsArray->slice($midPoint); @endphp @if($specsCount > 0)
Specification Specification
@forelse($leftSpecs as $spec)
{{ $spec->spec_name }}: {{ $spec->spec_value }}{{ $spec->spec_unit ? ' ' . $spec->spec_unit : '' }}
@empty @endforelse
@forelse($rightSpecs as $spec)
{{ $spec->spec_name }}: {{ $spec->spec_value }}{{ $spec->spec_unit ? ' ' . $spec->spec_unit : '' }}
@empty @endforelse
@else
No specifications available
@endif @if($quotation->customer->gst_type == 'instate') @else @endif
Specification Details
Unit Price ₹{{ number_format($item->unit_price, 2) }}
Total Price (Before Tax) ₹{{ number_format($item->total_price, 2) }}
SGST (9%) + ₹{{ number_format($item->total_price * 0.09, 2) }}
CGST (9%) + ₹{{ number_format($item->total_price * 0.09, 2) }}
IGST (18%) ₹{{ number_format($item->total_price * 0.18, 2) }}
Final Total (With Tax) ₹{{ number_format($item->total_price * 1.18, 2) }}
@if($item->product->note)

{!! nl2br(e($item->product->note)) !!}

@endif @php $stdAccessories = $item->product->getStandardAccessoriesArray(); $optAccessories = $item->product->getOptionalAccessoriesArray(); @endphp @if(!empty($stdAccessories) || !empty($optAccessories))
ACCESSORIES:
Standard Accessories Optional Accessories
@forelse($stdAccessories as $acc) • {{ $acc }}
@empty N/A @endforelse
@forelse($optAccessories as $acc) • {{ $acc }}
@empty N/A @endforelse
@endif @endif @endforeach @if($quotation->items->count() > 1)

QUOTATION SUMMARY

@if($quotation->discount_percent && $quotation->discount_percent > 0) @endif @foreach($quotation->items as $index => $item) @if($quotation->discount_percent && $quotation->discount_percent > 0) @endif @endforeach @if($quotation->discount_percent && $quotation->discount_percent > 0) @endif @if($quotation->discount_percent && $quotation->discount_percent > 0) @endif
No. Product discount_percent && $quotation->discount_percent > 0) width="25%" @else width="40%" @endif style="border:1px solid #333; padding:10px; text-align:right;">AmountDiscount
{{ $index + 1 }} {{ $item->product_name }} ₹{{ number_format($item->total_price * 1.18, 2) }} -₹{{ number_format(($item->total_price * 1.18) * ($quotation->discount_percent / 100), 2) }}
GRAND TOTAL ₹{{ number_format($quotation->items->sum(function($item) { return $item->total_price * 1.18; }), 2) }} -₹{{ number_format($quotation->items->sum(function($item) use($quotation) { return ($item->total_price * 1.18) * ($quotation->discount_percent / 100); }), 2) }}
Discount ({{ $quotation->discount_percent }}%) -₹{{ number_format($quotation->items->sum(function($item) use($quotation) { return ($item->total_price * 1.18) * ($quotation->discount_percent / 100); }), 2) }}
NET TOTAL (After Discount) ₹{{ number_format($quotation->items->sum(function($item) use($quotation) { return ($item->total_price * 1.18) * (1 - $quotation->discount_percent / 100); }), 2) }}
@endif

TERMS & CONDITIONS

@forelse($termsConditions as $tc) @empty @endforelse
{{ strtoupper($tc->title) }} : {{ $tc->description }}
No terms and conditions configured. Please add them from the admin panel.
@if($quotation->notes)
Other Terms & Conditions:
{!! nl2br(e($quotation->notes)) !!}
@endif

OUR BANK DETAIL

@if($company && $company->bank_name) @else @endif @if($company && $company->bank_branch) @else @endif @if($company && $company->account_number) @else @endif @if($company && $company->ifsc_code) @else @endif @if($company && $company->gst_number) @else @endif
NAME {{ $company ? strtoupper($company->company_name) : 'data not found' }}
BANK {{ $company->bank_name }}
BANK data not found
BRANCH {{ $company->bank_branch }}
BRANCH data not fount
ACCOUNT NUMBER {{ $company->account_number }}
ACCOUNT NUMBER data not found
IFSC CODE {{ $company->ifsc_code }}
IFSC CODE data not found
GST TIN {{ $company->gst_number }}
GST TIN data not found

We hope you will find above up to satisfaction and await your esteemed order at the earliest.

Thanks & Regards,

for ,{{ $company ? strtoupper($company->company_name) : 'data not found' }}

AUTHORIZED SIGNATORY
Mobile : {{ $company->phone_number }}

Please Visit Us :

@if($company && $company->web_logo_path) @else @endif {{ $company && $company->website ? $company->website : 'www.alfamachinetool.com' }}
@if($company && $company->phone_icon_path) @else @endif {{ $company && $company->phone_number ? $company->phone_number : '+91 9227607851' }}
@if($company && $company->mail_icon_path) @else @endif {{ $company && $company->email ? $company->email : 'info@alfamachinetools.com' }}
@if($company && $company->qr_code_path) QR Code @else QR Code @endif
{{ $company ? strtoupper($company->company_name) : 'ALFA MACHINE TOOLS' }}, @if($company) {{ $company->address }}{{ $company->address && ($company->city || $company->state) ? ', ' : '' }}{{ $company->city }}{{ $company->city && $company->state ? ', ' : '' }}{{ $company->state }}{{ $company->postal_code ? '-' . $company->postal_code : '' }}
@if($company->email || $company->website) @if($company->email)Email: {{ $company->email }}@endif @if($company->email && $company->website)|@endif @if($company->website)Website: {{ $company->website }}@endif @endif @else B/h Glowtech Steel, Gondal Road, Plot No. 103, Kotharia, Rajkot-360004
Email: alfamachinetools01@gmail.com | Website: www.alfamachinetool.com @endif