An easy point of sale system with automatic inventory tracking. https://netsyms.biz/apps/nickelbox/
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.

91 lines
5.0KB

  1. <?php
  2. /* This Source Code Form is subject to the terms of the Mozilla Public
  3. * License, v. 2.0. If a copy of the MPL was not distributed with this
  4. * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
  5. require_once __DIR__ . '/../required.php';
  6. redirectifnotloggedin();
  7. if (false) {
  8. ?>
  9. <div class="alert alert-danger"><?php lang("missing permission") ?></div>
  10. <?php
  11. } else {
  12. ?>
  13. <form action="lib/reports.php" method="GET" target="_BLANK">
  14. <div class="row">
  15. <div class="col-12 col-md-6">
  16. <div class="row">
  17. <div class="col-12 col-sm-6 col-md-12 col-lg-6">
  18. <div class="card mb-4">
  19. <div class="card-body">
  20. <h4 class="card-title"><label for="type"><i class="fas fa-list"></i> <?php lang("report type"); ?></label></h4>
  21. <select name="type" id="type" class="form-control" required>
  22. <option value="cashflow"><?php lang("cashflow") ?></option>
  23. </select>
  24. </div>
  25. </div>
  26. </div>
  27. <div class="col-12 col-sm-6 col-md-12 col-lg-6">
  28. <div class="card mb-4">
  29. <div class="card-body">
  30. <h4 class="card-title"><label for="format"><i class="fas fa-file"></i> <?php lang("format"); ?></label></h4>
  31. <select name="format" class="form-control" required>
  32. <option value="csv"><?php lang("csv file") ?></option>
  33. <option value="ods"><?php lang("ods file") ?></option>
  34. <option value="html"><?php lang("html file") ?></option>
  35. </select>
  36. </div>
  37. </div>
  38. </div>
  39. <div class="col-12">
  40. <button type="submit" class="btn btn-success btn-block d-none d-lg-block genrptbtn"><i class="fas fa-download"></i> <?php lang("generate report"); ?></button>
  41. </div>
  42. </div>
  43. </div>
  44. <div class="col-12 col-md-6">
  45. <div class="row">
  46. <div class="col-12">
  47. <div class="card">
  48. <div class="card-body">
  49. <h4 class="card-title"><label><i class="fas fa-filter"></i> <?php lang("filter"); ?></label></h4>
  50. <div id="date-filter">
  51. <label><i class="fas fa-calendar"></i> <?php lang("date range") ?></label><br />
  52. <div class="input-group">
  53. <input type="text" id="startdate" name="startdate" data-toggle="datetimepicker" data-target="#startdate" class="form-control" />
  54. <span class="input-group-text"><i class="fas fa-chevron-right"></i></span>
  55. <input type="text" id="enddate" name="enddate" data-toggle="datetimepicker" data-target="#enddate" class="form-control" />
  56. </div>
  57. </div>
  58. <div id="register-filter" class="mt-2">
  59. <label for="register"><i class="fas fa-store-alt"></i> <?php lang("register"); ?></label>
  60. <select name="register" class="form-control">
  61. <option value=""><?php lang("all"); ?></option>
  62. <?php
  63. $registers = $database->select('registers', ['registerid (id)', 'registername (name)']);
  64. foreach ($registers as $r) {
  65. echo '<option value="' . $r['id'] . '">' . $r['name'] . '</option>';
  66. }
  67. ?>
  68. </select>
  69. </div>
  70. </div>
  71. </div>
  72. </div>
  73. <div class="col-12 mt-4">
  74. <?php
  75. $code = uniqid(rand(10000000, 99999999), true);
  76. $database->insert('report_access_codes', ['code' => $code, 'expires' => date("Y-m-d H:i:s", strtotime("+5 minutes"))]);
  77. ?>
  78. <input type="hidden" name="code" value="<?php echo $code; ?>" />
  79. <button type="submit" class="btn btn-success btn-block d-lg-none genrptbtn"><i class="fas fa-download"></i> <?php lang("generate report"); ?></button>
  80. </div>
  81. </div>
  82. </div>
  83. </div>
  84. </form>
  85. <?php
  86. }
  87. ?>