You're resetting $grand_total to 0 in each loop iteration. You should initialize $grand_total before the loop starts and then add $sub_total to each iteration.
@php
$grand_total = 0;
@endphp
@for...
Try this example code, fixing some minor code issues, compiles for me.
struct YourRoutines: View {
@State private var days = ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "S...
Lost your password? Please enter your email address. You will receive a link to create a new password.
Donate
Thank you for visit here to donate to us, you think it's just a cup of coffee, but with us, it's really meaningful and contributes to help this blog grow more and more.
You can support us in one of the ways below: