Refinements to reports

This commit is contained in:
Hillel Coren 2016-02-25 10:32:31 +02:00
parent 6cdbc15961
commit fb959c1487
2 changed files with 12 additions and 6 deletions

View File

@ -292,7 +292,7 @@ class ReportController extends BaseController
foreach ($taxes as $tax) { foreach ($taxes as $tax) {
$displayData[] = [ $displayData[] = [
$tax['name'], $tax['name'],
$tax['rate'], $tax['rate'] . '%',
$account->formatMoney($tax['amount'], $client), $account->formatMoney($tax['amount'], $client),
$account->formatMoney($tax['paid'], $client) $account->formatMoney($tax['paid'], $client)
]; ];

View File

@ -87,13 +87,19 @@
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@foreach ($displayData as $record) @if (count($displayData))
@foreach ($displayData as $record)
<tr>
@foreach ($record as $field)
<td>{!! $field !!}</td>
@endforeach
</tr>
@endforeach
@else
<tr> <tr>
@foreach ($record as $field) <td colspan="10" style="text-align: center">{{ trans('texts.empty_table') }}</td>
<td>{!! $field !!}</td>
@endforeach
</tr> </tr>
@endforeach @endif
</tbody> </tbody>
</table> </table>