@foreach($rows as $row) {{-- The before price is struck through only where there is a discount to show. --}} @endforeach
Service ID Name Service Type Service Code TAT (Days) STAT Sample Type Price (Before Discount) Discount % Price (After Discount)
{{ $row['ID'] }} {{ $row['NAME'] }} {{ $row['SERVICE_TYPE'] }} {{ $row['CODE'] }} {{ $row['TAT'] ?? '-' }} {{ $row['STAT'] ?? '-' }} {{ $row['SAMPLE_TYPE'] !== '' ? $row['SAMPLE_TYPE'] : '-' }}{{ number_format($row['PRICE_BEFORE'], 2) }} {{ rtrim(rtrim(number_format($row['DISCOUNT'], 2), '0'), '.') }}% {{ number_format($row['PRICE_AFTER'], 2) }}