index.php 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. <?php
  2. /**
  3. * @var $modelo \v1\models\HerramientaInventario
  4. */
  5. use app\models\Herramienta;
  6. use app\models\HerramientaInventario;
  7. use app\models\TipoHerramienta;
  8. use Luecano\NumeroALetras\NumeroALetras;
  9. use pdf\web\Controller;
  10. setlocale(LC_ALL, 'es_ES');
  11. $basePath = \Yii::getAlias('@app') . "/web/";
  12. $inventarios = HerramientaInventario::find()->with('herramienta')->all();
  13. ?>
  14. <div class="contentpanel">
  15. <table style="width:1200px; border-collapse:collapse; border: 1px solid #000000; margin-right:auto; margin-left:auto; ">
  16. <tr>
  17. <td style="width:20% !important; background-color:#000000; text-align:center;">
  18. <img src="<?= $basePath ?>/img/edesarrollos-unicolor-blanco.png" style="width:30%">
  19. </td>
  20. </tr>
  21. <tr>
  22. <td style="font-size:40px; background-color:#000000; color:#ffffff; text-align:center; height:60px">
  23. Inventario de Herramienta
  24. </td>
  25. </tr>
  26. <tr>
  27. <td>
  28. <table width="100%">
  29. <tr>
  30. <th rowspan="2" style="width:50%">FECHA</th>
  31. <th style="width:50%">DIA/MES/AÑO</th>
  32. </tr>
  33. </table>
  34. </td>
  35. </tr>
  36. </table>
  37. <table border="1" style="border-collapse:collapse; width:1100px; margin-top:20px; text-align: left;">
  38. <tr style="background-color:#000000; color:#ffffff">
  39. <th style="height:30px; color:#ffffff; width:200px">
  40. Nombre Herramienta
  41. </th>
  42. <th style="height:30px; color:#ffffff; width:200px; text-align: left;">
  43. Tipo
  44. </th>
  45. <th style="height:30px; color:#ffffff; width:200px; text-align: left;">
  46. Serie
  47. </th>
  48. <th style="height:30px; color:#ffffff; width:200px; text-align: left;">
  49. Costo
  50. </th>
  51. <th style="height:30px; color:#ffffff; width:200px; text-align: left;">
  52. Descripción
  53. </th>
  54. <th style="height:30px; color:#ffffff; width:200px; text-align: left;">
  55. Estatus
  56. </th>
  57. <th style="height:30px; color:#ffffff; width:200px; text-align: left;">
  58. Cantidad
  59. </th>
  60. <th style="height:30px; color:#ffffff; width:200px; text-align: left;">
  61. Fecha Compra
  62. </th>
  63. <th style="height:30px; color:#ffffff; width:200px; text-align: left;">
  64. Fecha de Ingreso
  65. </th>
  66. </tr>
  67. <?php
  68. $totalGeneral = 0;
  69. foreach ($inventarios as $inventario) :
  70. ?>
  71. <tr style="height:100px">
  72. <td style="width:20px"><?= $inventario->herramienta->nombre ?></td>
  73. <td><?= $inventario->herramienta->tipoHerramienta->tipo ?></td>
  74. <td style="height:25px"><?= $inventario->herramienta->serie ?></td>
  75. <td style="text-align:left">$<?= number_format($inventario->herramienta->costo, 2, '.', ',') ?></td>
  76. <td style="height:25px"><?= $inventario->herramienta->descripcion ?></td>
  77. <td style="height:25px"><?= $inventario->herramienta->estatus ?></td>
  78. <td style="height:25px"><?= $inventario->cantidad ?></td>
  79. <td style="height:25px"><?= $inventario->herramienta->fechaCompra ?></td>
  80. <td style="height:25px"><?= $inventario->fechaIngreso ?></td>
  81. </tr>
  82. <?php endforeach; ?>
  83. </table>
  84. </div>