| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798 |
- <?php
- namespace App;
- ?>
- <div class="modal fade" role="dialog" tabindex="-1" data-backdrop="static" id="new-document-modal">
- <div class="modal-dialog modal-lg">
- <form class="modal-content" method="post" action="/documents/submit">
- <?php
- View::include("modals/header", ["title" => __("New Document")]);
- ?>
- <input type="hidden" name="type" value="" />
- <div class="modal-body">
- <div class="mb-3">
- <label class="form-label" for="new-document-company-id"><?= htmlspecialchars(__("Company")) ?></label>
- <select class="form-control" name="company_id" id="new-document-company-id">
- <option value=""><?=htmlspecialchars(__("Select Company"))?></option>
- <?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="new-document-supplier-id"><?= htmlspecialchars(__("Supplier")) ?></label>
- <select class="form-control" name="supplier_id" id="new-document-supplier-id">
- <option value=""><?=htmlspecialchars(__("Select Supplier"))?></option>
- <?php
- foreach(Supplier::getAll() as $supplier) {
- ?>
- <option value="<?=$supplier->id?>">
- <?=htmlspecialchars($supplier->name)?>
- </option>
- <?php
- }
- ?>
- </select>
- </div>
- <div class="mb-3">
- <label class="form-label" for="new-document-location-id"><?= htmlspecialchars(__("Location")) ?></label>
- <select class="form-control" name="location_id" id="new-document-location-id">
- <option value=""><?=htmlspecialchars(__("Select Location"))?></option>
- <?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>
- <section id="new-document-aru-section">
- <h5><?=htmlspecialchars(__("ARU Item"))?></h5>
- <p><?=htmlspecialchars(__("Enter details of the part that is being returned if known."))?></p>
- <div class="mb-3">
- <label class="form-label" for="new-document-item-description">
- <?=htmlspecialchars(__("Description"))?>
- </label>
- <input class="form-control" type="text" name="item_description" id="new-document-item-description" maxlength="255" placeholder="<?=htmlspecialchars(__("Type description"))?>" />
- </div>
- <div class="mb-3">
- <label class="form-label" for="new-document-item-serial-number">
- <?=htmlspecialchars(__("Serial Number"))?>
- </label>
- <input class="form-control" type="text" name="item_serial_number" id="new-document-item-serial-number" maxlength="255" placeholder="<?=htmlspecialchars(__("Type serial number"))?>" />
- </div>
- </section>
- </div>
- <div class="modal-footer">
- <button type="submit" class="btn btn-success">
- <?= htmlspecialchars(__("Submit")) ?>
- </button>
- </div>
- </form>
- </div>
- </div>
|