@foreach ($peripherals as $peripheral) @endforeach @foreach ($dates as $i => $date) @php if (empty($basic['fee'][$date])) continue; $total = $basic['fee'][$date]['usage']; @endphp @if(isset($basic['fee'][$date])) @php $total += $basic['fee'][$date]['utility']; $total += $basic['fee'][$date]['cleaning']; @endphp @else @endif @foreach ($peripherals as $peripheral) @if ($peripheral['type'] == 'time') @if (!$i) @endif @else @endif @endforeach @endforeach
租用日期 場地使用費 水電費 清潔費{{$peripheral['name']}}小計
{{$date}} {{number_format($basic['fee'][$date]['usage'])}}{{number_format($basic['fee'][$date]['utility'])}} {{number_format($basic['fee'][$date]['cleaning'])}}0 0{{isset($peripheral['fee'])?number_format($peripheral['fee']):''}} @if ($peripheral['type'] == 'day') @if (in_array($date, $peripheral['data'])) {{number_format($peripheral['total'])}} @else 0 @endif @else @if (isset($peripheral['data'][$date])) {{number_format($peripheral['data'][$date]['fee'])}} @php $total += $peripheral['data'][$date]['fee']; @endphp @else 0 @endif @endif {{number_format($total)}}
保證金:{{ isset($basic['fee']['recognizance'])?number_format($basic['fee']['recognizance']):'' }}
總計:{{number_format($rental)}}