@if ($chargeType == 'period') @foreach ($peripherals as $peripheral) @endforeach @foreach ($dates as $i => $date) @php if (empty($basic['fee'][$date])) continue; $total = round($basic['fee'][$date]['usage']); @endphp @if(isset($basic['fee'][$date])) @php $total += round($basic['fee'][$date]['utility']); $total += round($basic['fee'][$date]['cleaning']); @endphp @else @endif @foreach ($peripherals as $peripheral) @if ($peripheral['type'] == 'time') @if (!$i) @endif @else @endif @endforeach @endforeach @if (isset($basic['fee']['recognizance'])) @endif
租用日期 場地使用費 水電費 清潔費{{$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 += round($peripheral['data'][$date]['fee']); @endphp @else 0 @endif @endif {{number_format($total)}}
保證金:{{ number_format($basic['fee']['recognizance']) }}
總計:{{number_format($rental)}}
@elseif ($chargeType == 'hour') @foreach ($dates as $i => $date) @endforeach
租用日期 租借費用
{{$date}} {{number_format($basic['fee'][$date]['hour'])}}
總計:{{number_format($rental)}}
@endif