|
|
@@ -45,6 +45,8 @@ if($is_aru) {
|
|
|
];
|
|
|
}
|
|
|
|
|
|
+$show_batch_actions = $is_sale_order && $documents;
|
|
|
+
|
|
|
?>
|
|
|
<div class="row mb-3">
|
|
|
<div class="col">
|
|
|
@@ -64,81 +66,82 @@ if($is_aru) {
|
|
|
?>
|
|
|
</div>
|
|
|
|
|
|
+<form method="post">
|
|
|
+
|
|
|
+
|
|
|
<div class="card mb-3">
|
|
|
<div class="card-header">
|
|
|
<?=htmlspecialchars(__("Filters"))?>
|
|
|
</div>
|
|
|
<div class="card-body">
|
|
|
- <form action="/<?=$type_string?>" method="get">
|
|
|
- <div class="row">
|
|
|
- <?php
|
|
|
- if($is_goods_in) {
|
|
|
- ?>
|
|
|
- <div class="col-sm-4">
|
|
|
- <?php
|
|
|
- View::include("components/supplier_id_field", compact("supplier_id"));
|
|
|
- ?>
|
|
|
- </div>
|
|
|
- <?php
|
|
|
- }
|
|
|
+ <div class="row">
|
|
|
+ <?php
|
|
|
+ if($is_goods_in) {
|
|
|
?>
|
|
|
<div class="col-sm-4">
|
|
|
<?php
|
|
|
- View::include("components/customer_id_field", compact("customer_id"));
|
|
|
+ View::include("components/supplier_id_field", compact("supplier_id"));
|
|
|
?>
|
|
|
</div>
|
|
|
+ <?php
|
|
|
+ }
|
|
|
+ ?>
|
|
|
+ <div class="col-sm-4">
|
|
|
+ <?php
|
|
|
+ View::include("components/customer_id_field", compact("customer_id"));
|
|
|
+ ?>
|
|
|
+ </div>
|
|
|
+ <div class="col-sm-4">
|
|
|
+ <?php
|
|
|
+ View::include("components/location_id_field", compact("location_id"));
|
|
|
+ ?>
|
|
|
+ </div>
|
|
|
+ <?php
|
|
|
+ if($status_options) {
|
|
|
+ ?>
|
|
|
<div class="col-sm-4">
|
|
|
- <?php
|
|
|
- View::include("components/location_id_field", compact("location_id"));
|
|
|
- ?>
|
|
|
+ <div class="mb-3">
|
|
|
+ <label class="form-label" for="status"><?=htmlspecialchars(__("Status"))?></label>
|
|
|
+ <select class="form-select" name="status" id="status">
|
|
|
+ <option value=""><?=htmlspecialchars(__("Any Status"))?></option>
|
|
|
+ <?php
|
|
|
+ HtmlHelper::renderOptions($status_options, $status);
|
|
|
+ ?>
|
|
|
+ </select>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
<?php
|
|
|
- if($status_options) {
|
|
|
- ?>
|
|
|
- <div class="col-sm-4">
|
|
|
- <div class="mb-3">
|
|
|
- <label class="form-label" for="status"><?=htmlspecialchars(__("Status"))?></label>
|
|
|
- <select class="form-select" name="status" id="status">
|
|
|
- <option value=""><?=htmlspecialchars(__("Any Status"))?></option>
|
|
|
- <?php
|
|
|
- HtmlHelper::renderOptions($status_options, $status);
|
|
|
- ?>
|
|
|
- </select>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <?php
|
|
|
- }
|
|
|
+ }
|
|
|
+ ?>
|
|
|
+ <div class="col-sm-4">
|
|
|
+ <div class="mb-3">
|
|
|
+ <label class="form-label" for="number"><?=htmlspecialchars(__("Number"))?></label>
|
|
|
+ <input class="form-control" type="number" name="number" id="number" value="<?=htmlspecialchars($number)?>" placeholder="<?=htmlspecialchars(__("Type number"))?>" />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <?php
|
|
|
+ if($custom_filter_options) {
|
|
|
?>
|
|
|
<div class="col-sm-4">
|
|
|
<div class="mb-3">
|
|
|
- <label class="form-label" for="number"><?=htmlspecialchars(__("Number"))?></label>
|
|
|
- <input class="form-control" type="number" name="number" id="number" value="<?=htmlspecialchars($number)?>" placeholder="<?=htmlspecialchars(__("Type number"))?>" />
|
|
|
+ <label class="form-label" for="custom-filter"><?=htmlspecialchars(__("Custom Filter"))?></label>
|
|
|
+ <select class="form-select" name="custom_filter" id="custom-filter">
|
|
|
+ <option value=""><?=htmlspecialchars(__("All %s", $title))?></option>
|
|
|
+ <?php
|
|
|
+ HtmlHelper::renderOptions($custom_filter_options, $custom_filter);
|
|
|
+ ?>
|
|
|
+ </select>
|
|
|
</div>
|
|
|
</div>
|
|
|
-
|
|
|
<?php
|
|
|
- if($custom_filter_options) {
|
|
|
- ?>
|
|
|
- <div class="col-sm-4">
|
|
|
- <div class="mb-3">
|
|
|
- <label class="form-label" for="custom-filter"><?=htmlspecialchars(__("Custom Filter"))?></label>
|
|
|
- <select class="form-select" name="custom_filter" id="custom-filter">
|
|
|
- <option value=""><?=htmlspecialchars(__("All %s", $title))?></option>
|
|
|
- <?php
|
|
|
- HtmlHelper::renderOptions($custom_filter_options, $custom_filter);
|
|
|
- ?>
|
|
|
- </select>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <?php
|
|
|
- }
|
|
|
- ?>
|
|
|
+ }
|
|
|
+ ?>
|
|
|
|
|
|
- </div>
|
|
|
- <button class="btn btn-primary" type="submit">
|
|
|
- <?=htmlspecialchars(__("Submit"))?>
|
|
|
- </button>
|
|
|
- </form>
|
|
|
+ </div>
|
|
|
+ <button class="btn btn-primary" type="submit">
|
|
|
+ <?=htmlspecialchars(__("Submit"))?>
|
|
|
+ </button>
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
@@ -157,6 +160,17 @@ else {
|
|
|
<table class="table table-bordered table-hover mb-3">
|
|
|
<thead>
|
|
|
<tr>
|
|
|
+ <?php
|
|
|
+ if($show_batch_actions) {
|
|
|
+ ?>
|
|
|
+ <th class="text-center">
|
|
|
+ <label>
|
|
|
+ <input type="checkbox" id="documents-table-select-all" />
|
|
|
+ </label>
|
|
|
+ </th>
|
|
|
+ <?php
|
|
|
+ }
|
|
|
+ ?>
|
|
|
<th><?=htmlspecialchars(__("Ref."))?></th>
|
|
|
<th><?=htmlspecialchars(__("Date"))?></th>
|
|
|
<?php
|
|
|
@@ -199,6 +213,17 @@ else {
|
|
|
$supplier = $document->getSupplier();
|
|
|
?>
|
|
|
<tr>
|
|
|
+ <?php
|
|
|
+ if($show_batch_actions) {
|
|
|
+ ?>
|
|
|
+ <td class="text-center">
|
|
|
+ <label>
|
|
|
+ <input type="checkbox" name="document_ids[]" value="<?=$document->id?>" />
|
|
|
+ </label>
|
|
|
+ </td>
|
|
|
+ <?php
|
|
|
+ }
|
|
|
+ ?>
|
|
|
<td class="text-end">
|
|
|
<a href="<?=htmlspecialchars($document->getUrl())?>"><?=$document->getReference()?></a>
|
|
|
</td>
|
|
|
@@ -268,4 +293,34 @@ else {
|
|
|
</table>
|
|
|
<?php
|
|
|
$pagination->render();
|
|
|
+
|
|
|
+ if($show_batch_actions) {
|
|
|
+ ?>
|
|
|
+ <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">
|
|
|
+ <option value=""><?=htmlspecialchars(__("Select Batch Action"))?></option>
|
|
|
+ <option value="mark-draft"><?=htmlspecialchars(__("Mark As Draft"))?></option>
|
|
|
+ <option value="mark-shipped"><?=htmlspecialchars(__("Mark As Shipped"))?></option>
|
|
|
+ <option value="mark-paid"><?=htmlspecialchars(__("Mark As Paid"))?></option>
|
|
|
+ <option value="mark-void"><?=htmlspecialchars(__("Mark As Void"))?></option>
|
|
|
+ <option value="mark-uncollectible"><?=htmlspecialchars(__("Mark As Uncollectible"))?></option>
|
|
|
+ </select>
|
|
|
+ <button type="submit" class="btn btn-primary">
|
|
|
+ <?=htmlspecialchars(__("Submit"))?>
|
|
|
+ </button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <?php
|
|
|
+ }
|
|
|
+ ?>
|
|
|
+ <?php
|
|
|
}
|
|
|
+?>
|
|
|
+</form>
|