Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <meta http-equiv="X-UA-Compatible" content="ie=edge">
- <title>Document</title>
- <style>
- body {
- font-family: Arial, Helvetica, sans-serif;
- padding: 0 10px;
- }
- h1 {
- font-size: 26px;
- }
- .gnams {
- border-collapse: collapse;
- width: 100%;
- margin-top: 20px;
- }
- .gnams td,
- .gnams th {
- border: 1px solid #ddd;
- padding: 8px;
- font-size: 14px;
- }
- .gnams th {
- width: 5px;
- }
- .gnams tr:nth-child(even) {
- background-color: #f2f2f2;
- }
- .gnams tr:hover {
- background-color: #ddd;
- }
- .gnams th {
- padding-top: 5px;
- padding-bottom: 5px;
- text-align: center;
- background-color: #04AA6D;
- color: white;
- }
- .text-right {
- text-align: right;
- }
- .text-center {
- text-align: center;
- }
- .text-left {
- text-align: left;
- }
- .text-danger {
- color: red;
- }
- </style>
- </head>
- <body>
- @if (count($budget_group_by_cc) > 0)
- @foreach ($budget_group_by_cc as $key => $budget_by_cc)
- <table class="gnams">
- <thead>
- <tr>
- <th colspan="8" style="text-align: left;">
- Cost Center: {{ $key . ' - ' . date('F', strtotime('-1 month')) . ' ' . date('Y') }}
- (Total Budget: {{ number_format($total_budget[$key]['total_amount'], 0, ',', '.') }} --
- Total Forecast: {{ number_format($total_forecast[$key]['forecast_total'], 0, ',', '.') }})
- <span
- class="{{ $total_budget[$key]['total_amount'] - $total_forecast[$key]['forecast_total'] < 0 ? 'text-danger' : '' }}">
- Balance:
- {{ number_format($total_budget[$key]['total_amount'] - $total_forecast[$key]['forecast_total'])
- }}
- </span>
- </th>
- </tr>
- <tr>
- <th>#</th>
- <th>Exp. No.</th>
- <th>Theme</th>
- <th class="text-right">Budget </th>
- <th class="text-right">Plan - {{ date('M', strtotime('-1 month')) }}</th>
- <th class="text-right">Actual - {{ date('M', strtotime('-1 month')) }}</th>
- <th class="text-right">Balance</th>
- <th class="text-right">Balance - {{ date('M', strtotime('-1 month')) }}</th>
- </tr>
- </thead>
- <tbody>
- @foreach ($budget_by_cc as $key => $budget)
- <tr>
- <td class="text-center">{{ $key + 1 }}</td>
- <td>{{ $budget['exp_no'] }}</td>
- <td>{{ $budget['theme'] }}</td>
- <td class="text-right">{{ number_format($budget['plan_end_year'], 2, ',', '.') }}</td>
- <td class="text-right">{{ number_format($budget['plan_this_month'], 2, ',', '.') }}</td>
- <td class="text-right">{{ number_format($budget['act'], 2, ',', '.') }}</td>
- <td class="text-right {{ $budget['plan_end_year'] - $budget['act'] < 0 ? 'text-danger' : '' }}">
- {{ number_format($budget['plan_end_year'] - $budget['act'], 2, ',', '.') }}
- </td>
- <td class="text-right {{ $budget['plan_this_month'] - $budget['act'] < 0 ? 'text-danger' : '' }}">
- {{ number_format($budget['plan_this_month'] - $budget['act'], 2, ',', '.') }}
- </td>
- </tr>
- @endforeach
- </tbody>
- </table>
- @endforeach
- @endif
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement