| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798 |
- <?php /** @noinspection PhpUnhandledExceptionInspection */
- namespace App;
- use App\Enums\Currencies;
- use App\Enums\SaleStatuses;
- use App\Helpers\HtmlHelper;
- /**
- * @var Sale $sale
- */
- ?>
- <section class="mb-4">
- <h3><?=htmlspecialchars($sale->getTitle())?></h3>
- <form class="mb-4" action="<?=htmlspecialchars($sale->getUrl())?>/submit" method="post">
- <div class="row">
- <div class="col-xl-6">
- <h4><?=htmlspecialchars(__("Main Details"))?></h4>
- <div class="mb-3">
- <label class="form-label" for="currency"><?=htmlspecialchars(__("Currency"))?></label>
- <select class="form-control" name="currency" id="currency">
- <?php
- HtmlHelper::renderOptions(Currencies::options(), $sale->currency);
- ?>
- </select>
- </div>
- <div class="mb-3">
- <label class="form-label" for="status">
- <?=htmlspecialchars(__("Status"))?>
- </label>
- <select class="form-control" name="status" id="status">
- <?php
- HtmlHelper::renderOptions(SaleStatuses::options(), $sale->status);
- ?>
- </select>
- </div>
- <div class="mb-3">
- <label for="tax-rate" class="form-label">
- <?=htmlspecialchars(__("Tax Rate (%)"))?>
- </label>
- <input class="form-control" type="number" name="tax_rate" id="tax-rate" value="<?=$sale->tax_rate?>" min="0" max="100.00" step="0.01" placeholder="Type tax rate" required />
- </div>
- </div>
- <div class="col-xl-6">
- <h4><?=htmlspecialchars(__("Additional Details"))?></h4>
- <dl>
- <dt><?=htmlspecialchars(__("Company"))?></dt>
- <dd><?=htmlspecialchars($sale->getCompany()->name)?></dd>
- <dt><?=htmlspecialchars(__("Location"))?></dt>
- <dd><?=htmlspecialchars($sale->getLocation()->getDisplayName())?></dd>
- <dt><?=htmlspecialchars(__("Created By"))?></dt>
- <dd><?=htmlspecialchars($sale->getUser()->getDisplayName())?></dd>
- <dt><?=htmlspecialchars(__("Created Date/Time"))?></dt>
- <dd><?=htmlspecialchars($sale->getDateTimeCreated()->format("d/m/Y H:i"))?></dd>
- </dl>
- </div>
- </div>
- <button type="submit" class="btn btn-primary">
- <i class="fa fa-fw fa-save"></i>
- <?=htmlspecialchars(__("Save Sale"))?>
- </button>
- </form>
- </section>
- <?php
- View::include("sale_items_section", compact("sale"));
- View::include("sale_invoices_section", compact("sale"));
- View::include("sale_notes_section", compact("sale"));
- ?>
- <section class="mb-4">
- <h3><?=htmlspecialchars(__("Tickets"))?></h3>
- <?php
- $tickets = $sale->getTickets();
- if(empty($tickets)) {
- HtmlHelper::renderInfoAlert(__("No tickets to display."));
- }
- else {
- }
- ?>
- </section>
|