@extends('adminlte::page') @section('title', 'Salary') @section('content_header')

Salary

@stop @section('content')




Outlook 1


@php $total1 = 0; @endphp

@foreach ($data1 as $key => $value) @php $total1 += $value->salary->sum('price'); @endphp @endforeach

Total: Rp. {{ number_format($total1) }}

Outlook 2


@php $total2 = 0; @endphp

@foreach ($data2 as $key => $value)
@php $numItems = count($value->salary); $i = 0; @endphp @foreach($value->salary as $salary) @endforeach
Tanggal
Price
Aksi
{{date('Y-m-d', strtotime($salary->date))}}
{{number_format($salary->price)}}
@csrf
@if(++$i === $numItems)
@csrf
@endif
@php $total2 += $value->salary->sum('price'); @endphp @endforeach

Total: Rp. {{ number_format($total2) }}

@endsection