| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- <?php
- namespace App;
- ?>
- <div class="modal fade" role="dialog" tabindex="-1" data-backdrop="static" id="sale-item-modal">
- <div class="modal-dialog modal-lg">
- <form class="modal-content" method="post">
- <?php
- View::include("modals/header", ["title" => __("Sale Item")]);
- ?>
- <input type="hidden" name="sale_item_id" value="" />
- <div class="modal-body">
- <div class="mb-2">
- <label for="sale-item-product-id" class="form-label"><?=htmlspecialchars(__("Product"))?></label>
- <select class="form-control" name="product_id" id="sale-item-product-id">
- <option value=""><?=htmlspecialchars(__("Select Product"))?></option>
- <?php
- foreach(Product::getAll() as $product) {
- ?>
- <option value="<?=$product->id?>" data-price="<?=$product->price?>" data-price-eur="">
- <?=htmlspecialchars($product->name)?>
- </option>
- <?php
- }
- ?>
- </select>
- </div>
- <div class="mb-2">
- <label for="sale-item-quantity" class="form-label">
- <?=htmlspecialchars(__("Quantity"))?>
- </label>
- <input class="form-control" type="number" name="quantity" id="sale-item-quantity" min="0" value="1" placeholder="<?=htmlspecialchars(__("Type quantity"))?>" required />
- </div>
- <div class="mb-2">
- <label for="sale-item-unit-price" class="form-label">
- <?=htmlspecialchars(__("Unit Price"))?>
- </label>
- <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 />
- </div>
- </div>
- <div class="modal-footer">
- <button type="submit" class="btn btn-success">
- <?= htmlspecialchars(__("Save")) ?>
- </button>
- </div>
- </form>
- </div>
- </div>
|