@extends('layouts.app') @section('header')
@endsection @section('content') @php $billing_total = $payment = $closing_due = $grand_total = $discount_amount = 0; @endphp
@foreach($bills as $bill) @php $billing_total += $bill['billing_total']; $payment += $bill['payment']; $closing_due += $bill['closing_due']; $grand_total += $bill['grand_total']; $discount_amount += $bill['discount_amount']; @endphp @endforeach
Bill Number Billing Total Discount Grand Total Paid Due
{{ $bill['billnumber'] }} {{ $bill['billing_total'] }} {{ $bill['discount_amount'] }} {{ $bill['grand_total'] }} {{ $bill['payment'] }} {{ $bill['closing_due'] }}
Total {{ $billing_total }} {{ $discount_amount }} {{ $grand_total }} {{ $payment }} {{ $billing_total - ($payment + $discount_amount) }}
@endsection