|
@@ -9,71 +9,101 @@ $core = Core::getInstance();
|
|
|
$user = $core->getUser();
|
|
$user = $core->getUser();
|
|
|
|
|
|
|
|
?>
|
|
?>
|
|
|
-<table class="table table-bordered table-hover mb-3">
|
|
|
|
|
- <thead>
|
|
|
|
|
- <tr>
|
|
|
|
|
- <th><?=htmlspecialchars(__("Ref."))?></th>
|
|
|
|
|
- <th><?=htmlspecialchars(__("Date"))?></th>
|
|
|
|
|
- <th><?=htmlspecialchars(__("Location"))?></th>
|
|
|
|
|
- <th><?=htmlspecialchars(__("Status"))?></th>
|
|
|
|
|
- <th><?=htmlspecialchars(__("Items"))?></th>
|
|
|
|
|
- <th><?=htmlspecialchars(__("Value"))?></th>
|
|
|
|
|
- <th><?=htmlspecialchars(__("Predicted Sold Date"))?></th>
|
|
|
|
|
- <th><?=htmlspecialchars(__("Last Updated"))?></th>
|
|
|
|
|
- <th><?=htmlspecialchars(__("Actions"))?></th>
|
|
|
|
|
- </tr>
|
|
|
|
|
- </thead>
|
|
|
|
|
- <tbody>
|
|
|
|
|
|
|
+<form method="post">
|
|
|
<?php
|
|
<?php
|
|
|
- foreach($sales as $sale) {
|
|
|
|
|
- $location = $sale->getLocation();
|
|
|
|
|
- ?>
|
|
|
|
|
|
|
+ $user->insertCsrfToken();
|
|
|
|
|
+ ?>
|
|
|
|
|
+
|
|
|
|
|
+ <table class="table table-bordered table-hover mb-3">
|
|
|
|
|
+ <thead>
|
|
|
<tr>
|
|
<tr>
|
|
|
- <td class="text-end">
|
|
|
|
|
- <a href="<?=htmlspecialchars($sale->getUrl())?>"><?=htmlspecialchars($sale->getReference())?></a>
|
|
|
|
|
- </td>
|
|
|
|
|
- <td>
|
|
|
|
|
- <?=htmlspecialchars($user->formatDate($sale->getDateTimeCreated()))?>
|
|
|
|
|
- </td>
|
|
|
|
|
- <td>
|
|
|
|
|
- <a href="<?=htmlspecialchars($location->getUrl())?>">
|
|
|
|
|
- <?=htmlspecialchars($location->getDisplayName())?>
|
|
|
|
|
- </a>
|
|
|
|
|
- </td>
|
|
|
|
|
- <td>
|
|
|
|
|
- <?=htmlspecialchars($sale->getDisplayStatus())?>
|
|
|
|
|
- </td>
|
|
|
|
|
- <td>
|
|
|
|
|
- <?php
|
|
|
|
|
- foreach($sale->getItems() as $item) {
|
|
|
|
|
- ?>
|
|
|
|
|
- <?=htmlspecialchars($item->getProduct()->name)?> × <?=$item->quantity?><br />
|
|
|
|
|
- <?php
|
|
|
|
|
- }
|
|
|
|
|
- ?>
|
|
|
|
|
- </td>
|
|
|
|
|
- <td class="text-end">
|
|
|
|
|
- <?=htmlspecialchars($sale->getDisplayAmount())?>
|
|
|
|
|
- </td>
|
|
|
|
|
- <td>
|
|
|
|
|
- <?=htmlspecialchars($sale->getDisplayPredictedSoldDate())?>
|
|
|
|
|
- </td>
|
|
|
|
|
- <td>
|
|
|
|
|
- <?php
|
|
|
|
|
- $dt_updated = $sale->getDateTimeUpdated();
|
|
|
|
|
- if($dt_updated) {
|
|
|
|
|
- echo $dt_updated->diffForHumans();
|
|
|
|
|
- }
|
|
|
|
|
- ?>
|
|
|
|
|
- </td>
|
|
|
|
|
- <td class="p-1">
|
|
|
|
|
- <a class="btn btn-sm btn-primary" href="<?=htmlspecialchars($sale->getUrl())?>">
|
|
|
|
|
- <?=htmlspecialchars(__("View"))?>
|
|
|
|
|
- </a>
|
|
|
|
|
- </td>
|
|
|
|
|
|
|
+ <th></th>
|
|
|
|
|
+ <th><?=htmlspecialchars(__("Ref."))?></th>
|
|
|
|
|
+ <th><?=htmlspecialchars(__("Date"))?></th>
|
|
|
|
|
+ <th><?=htmlspecialchars(__("Location"))?></th>
|
|
|
|
|
+ <th><?=htmlspecialchars(__("Status"))?></th>
|
|
|
|
|
+ <th><?=htmlspecialchars(__("Items"))?></th>
|
|
|
|
|
+ <th><?=htmlspecialchars(__("Value"))?></th>
|
|
|
|
|
+ <th><?=htmlspecialchars(__("Predicted Sold Date"))?></th>
|
|
|
|
|
+ <th><?=htmlspecialchars(__("Last Updated"))?></th>
|
|
|
|
|
+ <th><?=htmlspecialchars(__("Actions"))?></th>
|
|
|
</tr>
|
|
</tr>
|
|
|
|
|
+ </thead>
|
|
|
|
|
+ <tbody>
|
|
|
<?php
|
|
<?php
|
|
|
- }
|
|
|
|
|
- ?>
|
|
|
|
|
- </tbody>
|
|
|
|
|
-</table>
|
|
|
|
|
|
|
+ foreach($sales as $sale) {
|
|
|
|
|
+ $location = $sale->getLocation();
|
|
|
|
|
+ ?>
|
|
|
|
|
+ <tr>
|
|
|
|
|
+ <td>
|
|
|
|
|
+ <input type="checkbox" name="sale_ids[]" value="<?=$sale->id?>" />
|
|
|
|
|
+ </td>
|
|
|
|
|
+ <td class="text-end">
|
|
|
|
|
+ <a href="<?=htmlspecialchars($sale->getUrl())?>"><?=htmlspecialchars($sale->getReference())?></a>
|
|
|
|
|
+ </td>
|
|
|
|
|
+ <td>
|
|
|
|
|
+ <?=htmlspecialchars($user->formatDate($sale->getDateTimeCreated()))?>
|
|
|
|
|
+ </td>
|
|
|
|
|
+ <td>
|
|
|
|
|
+ <a href="<?=htmlspecialchars($location->getUrl())?>">
|
|
|
|
|
+ <?=htmlspecialchars($location->getDisplayName())?>
|
|
|
|
|
+ </a>
|
|
|
|
|
+ </td>
|
|
|
|
|
+ <td>
|
|
|
|
|
+ <?=htmlspecialchars($sale->getDisplayStatus())?>
|
|
|
|
|
+ </td>
|
|
|
|
|
+ <td>
|
|
|
|
|
+ <?php
|
|
|
|
|
+ foreach($sale->getItems() as $item) {
|
|
|
|
|
+ ?>
|
|
|
|
|
+ <?=htmlspecialchars($item->getProduct()->name)?> × <?=$item->quantity?><br />
|
|
|
|
|
+ <?php
|
|
|
|
|
+ }
|
|
|
|
|
+ ?>
|
|
|
|
|
+ </td>
|
|
|
|
|
+ <td class="text-end">
|
|
|
|
|
+ <?=htmlspecialchars($sale->getDisplayAmount())?>
|
|
|
|
|
+ </td>
|
|
|
|
|
+ <td>
|
|
|
|
|
+ <?=htmlspecialchars($sale->getDisplayPredictedSoldDate())?>
|
|
|
|
|
+ </td>
|
|
|
|
|
+ <td>
|
|
|
|
|
+ <?php
|
|
|
|
|
+ $dt_updated = $sale->getDateTimeUpdated();
|
|
|
|
|
+ if($dt_updated) {
|
|
|
|
|
+ echo $dt_updated->diffForHumans();
|
|
|
|
|
+ }
|
|
|
|
|
+ ?>
|
|
|
|
|
+ </td>
|
|
|
|
|
+ <td class="p-1">
|
|
|
|
|
+ <a class="btn btn-sm btn-primary" href="<?=htmlspecialchars($sale->getUrl())?>">
|
|
|
|
|
+ <?=htmlspecialchars(__("View"))?>
|
|
|
|
|
+ </a>
|
|
|
|
|
+ </td>
|
|
|
|
|
+ </tr>
|
|
|
|
|
+ <?php
|
|
|
|
|
+ }
|
|
|
|
|
+ ?>
|
|
|
|
|
+ </tbody>
|
|
|
|
|
+ </table>
|
|
|
|
|
+
|
|
|
|
|
+ <div class="card mb-3">
|
|
|
|
|
+ <div class="card-header">
|
|
|
|
|
+ <?=htmlspecialchars(__("Batch Actions"))?>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="card-body">
|
|
|
|
|
+ <label class="sr-only" for="batch-action"><?=htmlspecialchars(__("Batch Action"))?></label>
|
|
|
|
|
+ <div class="input-group">
|
|
|
|
|
+ <select class="form-control" name="batch_action" id="batch-action" required>
|
|
|
|
|
+ <option value=""><?=htmlspecialchars(__("Select Batch Action"))?></option>
|
|
|
|
|
+ <option value="mark-completed"><?=htmlspecialchars(__("Mark As Completed"))?></option>
|
|
|
|
|
+ </select>
|
|
|
|
|
+ <button type="submit" class="btn btn-primary">
|
|
|
|
|
+ <?=htmlspecialchars(__("Submit"))?>
|
|
|
|
|
+ </button>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
|
|
+</form>
|
|
|
|
|
+
|