Guest User

Untitled

a guest
Dec 10th, 2018
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.05 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6. <?php echo'<title>Inventory To Reorder</title>';?>
  7. </head>
  8.  
  9. <body onload="window.print()">
  10. <?php echo '<img src="http://localhost/WareHouse/assets/img/LOGO.png" style="position: absolute; top: 0; left: 0; height:6%; width:25%; margin-top:40px; margin-left:40px;"/>';?>
  11. <?php echo '<center style="margin-top:120px; font-size:14pt;"><strong>Inventory To Reorder<strong></center>';?>
  12. <?php echo '<label><center>____________________________________________________________________________</center></label><br>';?>
  13. <?php
  14.  
  15. require_once('apis/connection.php');
  16. if(isset($_GET['status']))
  17. {
  18. $status = $_GET["status"];
  19. //Trae todos los item que esten por debajo de su minimo en stock.
  20. $connection = new MySqlServerConnection();
  21. $query = 'SELECT i.description_item,i.quantity,u.name_unit,i.reorder_Level,i.target_Stock,l.name_location,i.commentt,io.quantity_s
  22. FROM inventory_list AS i
  23. INNER JOIN unit_mesurement AS u ON id_unit = fkUnit
  24. INNER JOIN locatiON AS l on id_location = fkLocation
  25. INNER JOIN inventory_output as io on id_output = fkInventory
  26. WHERE i.quantity <= reorder_Level AND i.status = 1';
  27. $result = $connection->executeQuery($query,array($status));
  28. if ($result > 0) {
  29. ?>
  30. <center>
  31. <table class="table table-striped xd" border="1px;" id="tabla">
  32. <thead>
  33. <tr>
  34. <th style="width: 3%;">Description</th>
  35. <th style="width: 3%;">Quantity</th>
  36. <th style="width: 3%;">Usage</th>
  37. <th style="width: 3%;">Name Unit</th>
  38. <th style="width: 3%;">Reorder Level</th>
  39. <th style="width: 3%;">Target Stock</th>
  40. <th style="width: 3%;">Area</th>
  41. <th style="width: 3%;">Comment</th>
  42. </tr>
  43. </thead>
  44. <?php
  45. $arraycount=count($result);
  46. $i=0;
  47. $total=0;
  48. while ($i < $arraycount)
  49. {
  50. ?>
  51. <tr>
  52. <td><center><?php echo $result[$i]['description_item']; ?></td>
  53. <td><p style="color:red;" ><?php echo $result[$i]['quantity']; ?></p></td>
  54. <td>
  55. <?php
  56. $qs = $result[$i]['quantity_s'];
  57. switch (true) {
  58. case ($qs >= 1000 && $qs <= 2000) :
  59. echo " 1000 a 2000 SEMANAL";
  60. break;
  61.  
  62. case ($qs >= 100 && $qs <= 200) :
  63. echo " 100 a 200 SEMANAL Y/O QUINCENAL";
  64. break;
  65. }
  66. ?>
  67. </td>
  68. <td><?php echo $result[$i]['name_unit']; ?></td>
  69. <td><?php echo $result[$i]['reorder_Level']; ?></td>
  70. <td><?php echo $result[$i]['target_Stock']; ?></td>
  71. <td><?php echo $result[$i]['name_location']; ?></td>
  72. <td><?php echo $result[$i]['commentt']; ?></center></td>
  73. </tr>
  74. <?php $i++;
  75. }
  76. ?>
  77. </table><br><br>
  78. </center>
  79. <?php
  80. }
  81. //}
  82. }
  83. ?>
  84. </body>
  85.  
  86. function convertExcel(status)
  87. {
  88. // Load PDF document
  89. com.aspose.pdf.Document pdfDocument = new com.aspose.pdf.Document("http://localhost/WareHouse/reporte.php"+status);
  90. // Instantiate ExcelSave Option object
  91. com.aspose.pdf.ExcelSaveOptions excelsave = new com.aspose.pdf.ExcelSaveOptions();
  92. // Save the output in XLS format
  93. pdfDocument.save("c:/resultant.xls", excelsave);
  94. }
  95.  
  96. com.aspose.pdf.Document("http://localhost/WareHouse/reporte.php"+status);
Add Comment
Please, Sign In to add comment