@extends('layouts.report') @section('title', '仕入先支払一覧表') @section('content') @php $RECORDS_PER_PAGE = 35; $pages = []; $page = []; $total = 0; foreach($viewdata['payments'] as $payment) { $total += $payment['money']; if ($payment['Remark'] == 'null') { $payment['Remark'] = ''; } $page[] = $payment; if (count($page) >= $RECORDS_PER_PAGE) { $pages[] = $page; $page = []; } } if (count($page) > 0) { $pages[] = $page; $page = []; } @endphp @foreach($pages as $i => $page) @include('monthlypurchase/payableList02-01',[ 'pagenum' => ($i + 1), 'pagetotal' => count($pages), 'record_per_page' => $RECORDS_PER_PAGE, 'pagedata'=>$page, 'total' => (($i == count($pages) - 1) ? $total : null), ]) @endforeach @endsection