summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorLester Caine <lester@lsces.co.uk>2026-06-09 14:08:11 +0100
committerLester Caine <lester@lsces.co.uk>2026-06-09 14:08:11 +0100
commit3ed604661c5e10dce6e14d73f0d78b80d9dca72b (patch)
treea4960890bc6f16d80d5fafa8a9cd875f9367517d /templates
parent1de8f2f90284c375449326285f0b87e5e700a0c8 (diff)
downloadstock-3ed604661c5e10dce6e14d73f0d78b80d9dca72b.tar.gz
stock-3ed604661c5e10dce6e14d73f0d78b80d9dca72b.tar.bz2
stock-3ed604661c5e10dce6e14d73f0d78b80d9dca72b.zip
stock: remove show-zero filter; extend shortages to main list
Zero stock is always relevant when movements are tracked. Shortages filter now applies to the main list (level < 0) as well as BOM view. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'templates')
-rw-r--r--templates/list_stock.tpl13
1 files changed, 8 insertions, 5 deletions
diff --git a/templates/list_stock.tpl b/templates/list_stock.tpl
index 6e9ede7..d70c606 100644
--- a/templates/list_stock.tpl
+++ b/templates/list_stock.tpl
@@ -9,7 +9,7 @@
<section class="body">
- {form ipackage="stock" ifile="list_stock.php" method="get"}
+ <form action="{$smarty.const.STOCK_PKG_URL}list_stock.php" method="get">
<div class="form-inline" style="margin-bottom:1em">
<div class="form-group">
<input type="hidden" name="assembly_content_id" id="ls_asm_id" value="{$assemblyContentId|default:''|escape}" />
@@ -36,17 +36,20 @@
{/if}
<div class="form-group">
<label class="checkbox-inline">
- <input type="checkbox" name="show_zero" value="1"
- {if $showZero} checked="checked"{/if} /> {tr}Show zero stock{/tr}
+ <input type="checkbox" name="shortages" value="1"
+ {if $showShortages} checked="checked"{/if} /> {tr}Shortages only{/tr}
</label>
</div>
<button type="submit" class="btn btn-default btn-sm">{tr}Go{/tr}</button>
+ {if $showShortages}
+ <button type="button" class="btn btn-default btn-sm" onclick="window.print()">{tr}Print{/tr}</button>
+ {/if}
{if $showBom && $gBitUser->hasPermission('p_stock_create')}
<a class="btn btn-warning btn-sm"
href="{$smarty.const.STOCK_PKG_URL}add_requisition.php?assembly_content_id={$assemblyContentId}&amp;kit_count={$kitCount}">{tr}Create Requisition{/tr}</a>
{/if}
</div>
- {/form}
+ </form>
{if $stockList}
<table class="table table-hover table-condensed">
@@ -64,7 +67,7 @@
<tbody>
{assign var=lastBomGroup value=-1}
{foreach from=$stockList item=comp}
- {if $showBom && $comp.bom_group !== $lastBomGroup}
+ {if $showBom && !$showShortages && $comp.bom_group !== $lastBomGroup}
<tr class="active">
<th colspan="10">{tr}Group{/tr} {$comp.bom_group}</th>
</tr>