/modules/Inventory/Resources/views/reports/inventory/report_pdf.blade.php

https://gitlab.com/laher01/factu40 · PHP · 136 lines · 130 code · 6 blank · 0 comment · 0 complexity · f5acabaadabea9308b00c3710e0ca5a6 MD5 · raw file

  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6. <meta http-equiv="Content-Type" content="application/pdf; charset=utf-8" />
  7. <meta http-equiv="X-UA-Compatible" content="ie=edge">
  8. <title>Inventario</title>
  9. <style>
  10. html {
  11. font-family: sans-serif;
  12. font-size: 12px;
  13. }
  14. table {
  15. width: 100%;
  16. border-spacing: 0;
  17. border: 1px solid black;
  18. }
  19. .celda {
  20. text-align: center;
  21. padding: 5px;
  22. font-size: 10px;
  23. border: 0.1px solid black;
  24. }
  25. th {
  26. font-size: 10px;
  27. padding: 5px;
  28. text-align: center;
  29. border-color: #0088cc;
  30. border: 0.1px solid black;
  31. }
  32. .title {
  33. font-weight: bold;
  34. padding: 5px;
  35. font-size: 20px !important;
  36. text-decoration: underline;
  37. }
  38. p>strong {
  39. margin-left: 5px;
  40. font-size: 13px;
  41. }
  42. thead {
  43. font-weight: bold;
  44. background: #0088cc;
  45. color: white;
  46. text-align: center;
  47. }
  48. </style>
  49. </head>
  50. <body>
  51. <div>
  52. <p align="center" class="title"><strong>Reporte Inventario</strong></p>
  53. </div>
  54. <div style="margin-top:20px; margin-bottom:20px;">
  55. <table>
  56. <tr>
  57. <td>
  58. <p><strong>Empresa: </strong>{{$company->name}}</p>
  59. </td>
  60. <td>
  61. <p><strong>Fecha: </strong>{{date('Y-m-d')}}</p>
  62. </td>
  63. </tr>
  64. <tr>
  65. <td>
  66. <p><strong>Ruc: </strong>{{$company->number}}</p>
  67. </td>
  68. <td>
  69. <p><strong>Establecimiento: </strong>{{$establishment->address}} - {{$establishment->department->description}} - {{$establishment->district->description}}</p>
  70. </td>
  71. </tr>
  72. </table>
  73. </div>
  74. @if(!empty($reports))
  75. <div class="">
  76. <div class=" ">
  77. <table class="">
  78. <thead>
  79. <tr>
  80. <th>#</th>
  81. <th>Descripción</th>
  82. <th>Categoria</th>
  83. <th>Inventario actual</th>
  84. <th>Costo</th>
  85. <th>Costo Total</th>
  86. <th>Precio de venta</th>
  87. <th>Marca</th>
  88. <th>F. vencimiento</th>
  89. <th>Almacén</th>
  90. </tr>
  91. </thead>
  92. <tbody>
  93. @php
  94. $total = 0;
  95. @endphp
  96. @foreach($reports as $key => $value)
  97. @php
  98. $total_line = $value->stock * $value->item->purchase_unit_price;
  99. $total = $total + $total_line;
  100. @endphp
  101. <tr>
  102. <td class="celda">{{$loop->iteration}}</td>
  103. <td class="celda">{{$value->item->description ?? ''}}</td>
  104. <td class="celda">{{optional($value->item->category)->name}}</td>
  105. <td class="celda">{{$value->stock}}</td>
  106. <td class="celda">{{$value->item->purchase_unit_price}}</td>
  107. <td class="celda">{{number_format($total_line, 6)}}</td>
  108. <td class="celda">{{$value->item->sale_unit_price}}</td>
  109. <td class="celda">{{$value->item->brand->name}}</td>
  110. <td class="celda">{{$value->item->date_of_due}}</td>
  111. <td class="celda">{{$value->warehouse->description}}</td>
  112. </tr>
  113. @endforeach
  114. <tr>
  115. <td class="celda" colspan="5" style="text-align: right;">Costo Total de Inventario</td>
  116. <td class="celda">{{number_format($total, 6)}}</td>
  117. <td class="celda"></td>
  118. <td class="celda"></td>
  119. </tr>
  120. </tbody>
  121. </table>
  122. </div>
  123. </div>
  124. @else
  125. <div class="callout callout-info">
  126. <p>No se encontraron registros.</p>
  127. </div>
  128. @endif
  129. </body>
  130. </html>