sale_item.php 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. <?php /** @noinspection PhpUnhandledExceptionInspection */
  2. namespace App;
  3. ?>
  4. <div class="modal fade" role="dialog" tabindex="-1" data-backdrop="static" id="sale-item-modal">
  5. <div class="modal-dialog modal-lg">
  6. <form class="modal-content" method="post">
  7. <?php
  8. use App\Helpers\HtmlHelper;
  9. View::include("modals/header", ["title" => __("Lead Item")]);
  10. ?>
  11. <input type="hidden" name="sale_item_id" value="" />
  12. <div class="modal-body">
  13. <div class="mb-3">
  14. <label class="form-label" for="sale-item-supplier-id">
  15. <?=htmlspecialchars(__("Supplier"))?>
  16. </label>
  17. <select class="form-select" name="supplier_id" id="sale-item-supplier-id">
  18. <option value=""><?=htmlspecialchars(__("Select Supplier"))?></option>
  19. <?php
  20. HtmlHelper::renderOptions(Supplier::getOptions());
  21. ?>
  22. </select>
  23. </div>
  24. <div class="mb-3">
  25. <label for="sale-item-product-id" class="form-label"><?=htmlspecialchars(__("Product"))?></label>
  26. <select class="form-select" name="product_id" id="sale-item-product-id">
  27. <option value=""><?=htmlspecialchars(__("Select Product"))?></option>
  28. </select>
  29. </div>
  30. <div class="mb-3">
  31. <label for="sale-item-quantity" class="form-label">
  32. <?=htmlspecialchars(__("Quantity"))?>
  33. </label>
  34. <input class="form-control" type="number" name="quantity" id="sale-item-quantity" min="0" value="1" placeholder="<?=htmlspecialchars(__("Type quantity"))?>" required />
  35. </div>
  36. <div class="mb-3">
  37. <label for="sale-item-unit-price" class="form-label">
  38. <?=htmlspecialchars(__("Unit Price"))?>
  39. </label>
  40. <input class="form-control" type="number" name="unit_price" id="sale-item-unit-price" min="0.00" step="0.01" value="0.00" placeholder="<?=htmlspecialchars(__("Type unit price"))?>" required />
  41. </div>
  42. </div>
  43. <div class="modal-footer">
  44. <button type="submit" class="btn btn-success">
  45. <?= htmlspecialchars(__("Save")) ?>
  46. </button>
  47. </div>
  48. </form>
  49. </div>
  50. </div>