@extends('layouts.app') @section('content')
| @foreach($lineDescriptions as $description) | {{ $description }} | @endforeachTotal (KSh) |
|---|---|---|
| {{ $customer['name'] }} | @foreach($lineDescriptions as $id => $desc) @php $amount = $customer['lines'][$id]['amount'] ?? 0; $cellClass = $amount > 0 ? 'text-end' : 'text-end text-muted'; @endphp{{ $amount > 0 ? number_format($amount, 2) : '-' }} | @endforeach{{ number_format($customer['total'], 2) }} |
| Total | @foreach($lineDescriptions as $id => $desc) @php $total = $columnTotals[$id] ?? 0; $cellClass = $total > 0 ? 'text-end fw-bold' : 'text-end text-muted fw-bold'; @endphp{{ $total > 0 ? number_format($total, 2) : '-' }} | @endforeach{{ number_format($totalAmount, 2) }} |