| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- <?php
- namespace App;
- ?>
- <div class="modal fade" role="dialog" tabindex="-1" data-backdrop="static" id="new-sale-modal">
- <div class="modal-dialog modal-lg">
- <form class="modal-content" method="post" action="/sales/submit">
- <?php
- View::include("modals/header", ["title" => __("New Sale")]);
- ?>
- <div class="modal-body">
- <div class="mb-3">
- <label for="new-sale-company-id" class="form-label">
- <?=htmlspecialchars(__("Company"))?>
- </label>
- <select class="form-control" name="company_id" id="new-sale-company-id">
- <?php
- foreach(Company::getAll() as $company) {
- ?>
- <option value="<?=$company->id?>">
- <?=htmlspecialchars($company->name)?>
- </option>
- <?php
- }
- ?>
- </select>
- </div>
- <div class="mb-3">
- <label class="form-label" for="location-id"><?= htmlspecialchars(__("Location")) ?></label>
- <select class="form-control" name="location_id" id="location-id">
- <?php
- foreach(Customer::getAll() as $customer) {
- ?>
- <optgroup label="<?=htmlspecialchars($customer->name)?>">
- <?php
- foreach($customer->getLocations() as $location) {
- ?>
- <option value="<?=$location->id?>">
- <?=htmlspecialchars($location->name)?>
- </option>
- <?php
- }
- ?>
- </optgroup>
- <?php
- }
- ?>
- </select>
- </div>
- </div>
- <div class="modal-footer">
- <button type="submit" class="btn btn-success">
- <?= htmlspecialchars(__("Submit")) ?>
- </button>
- </div>
- </form>
- </div>
- </div>
|