{{ Str::startsWith($data['master']['docNo'], 'I-') ? 'Invoice' : (Str::startsWith($data['master']['docNo'], 'QT') ? 'Quotation' : $data['sales'][0]['type']) }}
{{ Str::startsWith($data['master']['docNo'], 'I-') ? 'Invoice' : (Str::startsWith($data['master']['docNo'], 'QT') ? 'Quotation' : $data['sales'][0]['type']) }}
ID:
{{ $data['master']['docNo'] }}
“{{ $data['company'][0]['name'] }}”
{{ $data['company'][0]['address'] }}
Tel:{{ $data['company'][0]['phone'] }}
Email: {{ $data['company'][0]['email'] }}
Date:{{ \Carbon\Carbon::parse($data['sales'][0]['created_at'])->format('d/m/Y') }}
@php
$subtotal = (float) $data['master']['total'];
$gstRate = (float) $data['billingSetting'][0]['gst'];
$gstAmount = ($subtotal * $gstRate) / 100;
$grandTotal = $subtotal + $gstAmount;
@endphp
Subtotal: {{ number_format($data['master']['total'], 2) }}
GST {{ $data['billingSetting'][0]['gst'] }}%:{{ number_format($gstAmount, 2) }}
Total:{{ number_format($grandTotal, 2) }}