You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

summary-report-pdf.blade.php 5.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. @extends('components.company.reports.layout')
  2. @section('content')
  3. <div class="header">
  4. <div class="title">{{ $report->getTitle() }}</div>
  5. <div class="company-name">{{ $company->name }}</div>
  6. @if($startDate && $endDate)
  7. <div class="date-range">Date Range: {{ $startDate }} to {{ $endDate }}</div>
  8. @else
  9. <div class="date-range">As of {{ $endDate }}</div>
  10. @endif
  11. </div>
  12. <table class="table-class">
  13. <colgroup>
  14. <col span="1" style="width: 65%;">
  15. <col span="1" style="width: 35%;">
  16. </colgroup>
  17. <thead class="table-head">
  18. <tr>
  19. @foreach($report->getSummaryHeaders() as $index => $header)
  20. <th class="{{ $report->getAlignmentClass($index) }}">
  21. {{ $header }}
  22. </th>
  23. @endforeach
  24. </tr>
  25. </thead>
  26. @foreach($report->getSummaryCategories() as $category)
  27. <tbody>
  28. <tr class="category-header-row">
  29. @foreach($category->header as $index => $header)
  30. <td class="{{ $report->getAlignmentClass($index) }}">
  31. {{ $header }}
  32. </td>
  33. @endforeach
  34. </tr>
  35. <!-- Category Types -->
  36. @foreach($category->types ?? [] as $type)
  37. <!-- Type Summary -->
  38. <tr>
  39. @foreach($type->summary as $index => $cell)
  40. <td @class([
  41. $report->getAlignmentClass($index),
  42. ])
  43. >
  44. {{ $cell }}
  45. </td>
  46. @endforeach
  47. </tr>
  48. @endforeach
  49. <tr class="category-summary-row">
  50. @foreach($category->summary as $index => $cell)
  51. <td @class([
  52. $report->getAlignmentClass($index),
  53. 'underline-bold' => $loop->last && $report->getTitle() === 'Cash Flow Statement',
  54. ])
  55. >
  56. {{ $cell }}
  57. </td>
  58. @endforeach
  59. </tr>
  60. @if($category->summary['account_name'] === 'Cost of Goods Sold')
  61. <tr class="category-header-row">
  62. @foreach($report->getGrossProfit() as $grossProfitIndex => $grossProfitCell)
  63. <td class="{{ $report->getAlignmentClass($grossProfitIndex) }}">
  64. {{ $grossProfitCell }}
  65. </td>
  66. @endforeach
  67. </tr>
  68. @endif
  69. </tbody>
  70. @endforeach
  71. <tfoot>
  72. <tr class="table-footer-row">
  73. @foreach ($report->getOverallTotals() as $index => $total)
  74. <td class="{{ $report->getAlignmentClass($index) }}">
  75. {{ $total }}
  76. </td>
  77. @endforeach
  78. </tr>
  79. </tfoot>
  80. </table>
  81. <!-- Second Overview Table -->
  82. @if(method_exists($report, 'getSummaryOverviewHeaders') && filled($report->getSummaryOverviewHeaders()))
  83. <table class="table-class" style="margin-top: 40px;">
  84. <colgroup>
  85. <col span="1" style="width: 65%;">
  86. <col span="1" style="width: 35%;">
  87. </colgroup>
  88. <thead class="table-head">
  89. <tr>
  90. @foreach($report->getOverviewHeaders() as $index => $header)
  91. <th class="{{ $report->getAlignmentClass($index) }}">
  92. {{ $header }}
  93. </th>
  94. @endforeach
  95. </tr>
  96. </thead>
  97. <!-- Overview Content -->
  98. @foreach($report->getSummaryOverview() as $overviewCategory)
  99. <tbody>
  100. <!-- Summary Row -->
  101. <tr class="category-header-row">
  102. @foreach($overviewCategory->summary as $index => $summaryCell)
  103. <td class="{{ $report->getAlignmentClass($index) }}">
  104. {{ $summaryCell }}
  105. </td>
  106. @endforeach
  107. </tr>
  108. @if($overviewCategory->summary['account_name'] === 'Starting Balance')
  109. @foreach($report->getSummaryOverviewAlignedWithColumns() as $summaryRow)
  110. <tr>
  111. @foreach($summaryRow as $index => $summaryCell)
  112. <td @class([
  113. 'cell',
  114. $report->getAlignmentClass($index),
  115. 'font-bold' => $loop->parent->last,
  116. 'underline-thin' => $loop->parent->remaining === 1 && $index === 'net_movement',
  117. 'underline-bold' => $loop->parent->last && $index === 'net_movement',
  118. ])
  119. >
  120. {{ $summaryCell }}
  121. </td>
  122. @endforeach
  123. </tr>
  124. @endforeach
  125. @endif
  126. </tbody>
  127. @endforeach
  128. </table>
  129. @endif
  130. @endsection