Files
crm.twinpol.com/modules/EcmReports/tpls/ReportStocksDoc.tpl
2025-05-12 15:46:37 +00:00

175 lines
5.3 KiB
Smarty

<script src="include/jQuery/tablesorter/jquery.tablesorter.min.js"></script>
<link class="theme" rel="stylesheet" href="include/jQuery/tablesorter/themes/blue/style.css">
<link rel="stylesheet" type="text/css" href="modules/EcmReports/css/SearchTable.css"/>
<script type="text/javascript" src="modules/EcmReports/javascript/ReportStocksDoc.js"></script>
<table id="tableMenu" cellspacing="0" cellpadding="0" border="0">
<tbody>
<tr>
<td>
<img src="themes/Sugar/images/EcmProducts.gif" style="margin-top: 3px; margin-right: 3px;" alt="EcmProducts" width="16" border="0" height="16">
</td>
<td>
<h2>{$MOD.LBL_REPORT_STOCKS_STOCK_STATE}</h2>
</td>
</tr>
</table>
<br />
<form action="index.php" method="get" name="searchReportStocks">
<input type="hidden" name="module" value="EcmReports" />
<input type="hidden" name="action" value="ReportStocksDoc" />
<input type="hidden" name="parentTab" value="Raporty" />
<table style="width:100%" class="edit view">
<tr>
<td>
{$MOD.LBL_STOCK}:
<select id="stock" name="selectStock">
<option value="" { if $selectStock==""} selected="true" {/if} >{$MOD.LBL_ALL_STOCKS}</option>
{foreach from=$STOCKS item=STOCK key=count name=loop}
<option value="{$STOCK.id}" { if $selectStock==$STOCK.id} selected="true" {/if} >{$STOCK.name}</option>
{/foreach}
</select>
</td>
<td>
{$MOD.LBL_PRODUCT_ACTIVE}:
<select id="productActive" name="selectProductActive">
<option value="" { if $selectProductActive==""} selected="true" {/if} >{$MOD.LBL_YES}/{$MOD.LBL_NO}</option>
<option value="1" { if $selectProductActive=="1"} selected="true" {/if} >{$MOD.LBL_YES}</option>
<option value="0" { if $selectProductActive=="0"} selected="true" {/if} >{$MOD.LBL_NO}</option>
</select>
</td>
</tr>
<tr>
<td>Data wydruku: <input type="text" name="data" value="{$date}"></td>
<td>Kod produktu: <input type="text" name="productCode" value="{$productCode}"></td>
</tr>
</tr>
</table>
<input class="button" name="submit" value="{$MOD.LBL_EXECUTE}" type="submit">
<input class="button" name="clear" value="{$MOD.LBL_CLEAR}" type="button" onclick="location.href='index.php?module=EcmReports&action=ReportStocksDoc';">
<input id="pdf" class="button" name="pdf" value="PDF" onClick="pdfExport();" type="button">
<!-- <input id="pdf" class="button" name="pdf" value="XLS" onClick="xlsExport();" type="button"> -->
</form>
<br>
<table id="myTable" class="tablesorter tablesorter-blue" role="grid">
<thead>
<tr class="tablesorter-headerRow" role="row">
<th>
{$MOD.LBL_INDEX}
</th>
<th>
{$MOD.LBL_NAME}
</th>
<th>
{$MOD.LBL_DOCUMENT}
</th>
{if $CONSIGNMENTS==TRUE}
<th>
{$MOD.LBL_CONSIGNMENTS}
</th>
{/if}
<th>
{$MOD.LBL_QUANTITY}
</th>
<th>
{$MOD.LBL_PRICE}
</th>
<th>
{$MOD.LBL_SUMMARY}
</th>
</tr>
</thead>
<tbody>
{foreach from=$DATA key="key" item="item" name=loop}
<tr>
{if $item.add|@count>1}
{assign var="rowspan" value=$item.add|@count}
{assign var="rowspanadd" value=1}
{assign var="currow" value=$rowspan*2+$rowspanadd}
{else}
{assign var="currow" value=1}
{/if}
<td rowspan="{$currow}">
<b>{$item.product_code}</b>
</td>
<td rowspan="{$currow}">
<b>{$item.product_name}</b>
</td>
<td>
<a href="index.php?module={$item.parent_type2}&action=DetailView&record={$item.parent_id}">{$item.parent_type} {$item.parent_name}</a> {$item.date_entered|date_format:"%d.%m.%Y"}
</td>
{if $CONSIGNMENTS==TRUE}
<td>
{$item.part_no}
</td>
{/if}
<td class="quantity">
{$item.total_quantity|number_format:$item.unit_precision:",":"."} {$item.unit_id}
</td>
<td class="money">
{$item.price|number_format:2:",":"." }
</td>
<td class="money">
{$item.total_price|number_format:2:",":"." }
</td>
</tr>
{if $item.add|@count>1}
{foreach from=$item.add key="kis" item="position" name=loop}
<tr>
<td>
<a href="index.php?module={$position.parent_type2}&action=DetailView&record={$position.parent_id}">{$position.parent_type} {$position.parent_name}</a> {$position.date_entered|date_format:"%d.%m.%Y"}
</td>
{if $CONSIGNMENTS==TRUE}
<td>
{$position.part_no}
</td>
{/if}
<td class="quantity">
{$position.quantity|number_format:$item.unit_precision:",":"."}
</td>
<td class="money">
{$position.price|number_format:2:",":"." }
</td>
<td class="money">
{$position.position_value|number_format:2:",":"." }
</td>
</tr>
<tr>
{if $CONSIGNMENTS==TRUE}
<td class='line' colspan="5"></td>
{else}
<td class='line' colspan="4"></td>
{/if}
</tr>
{/foreach}
{/if}
<tr>
{if $CONSIGNMENTS==TRUE}
<td class='line' colspan="7"></td>
{else}
<td class='line' colspan="6"></td>
{/if}
</tr>
{/foreach}
</tbody>
<tfoot>
<tr>
<td colspan="3">
<b>{$MOD.LBL_SUMMARY}:</b>
</td>
{if $CONSIGNMENTS==TRUE}
<td>
</td>
{/if}
<td class="quantity">
{*<b>{$TOTAL_QUANTITY|number_format:2:",":"." }</b>*}
</td>
<td></td>
<td class="money">
<b>{$TOTAL_VALUE|number_format:2:",":"." }</b>
</td>
</tr>
</tfoot>
</table>