Files
crm.e5.pl/modules/EcmReports/tpls/ReportStockNewDoc.tpl
2024-04-27 09:23:34 +02:00

263 lines
12 KiB
Smarty

<link rel="stylesheet" type="text/css" href="include/jQuery/jquery-table/jquery.appendGrid-1.3.1.css"/>
<link rel="stylesheet" type="text/css" href="include/jQuery/jquery-ui/themes/base/jquery-ui.css"/>
<link rel="stylesheet" type="text/css" href="modules/EcmReports/TableSorter/css/theme.blue.css"/>
<link rel="stylesheet" type="text/css" href="modules/EcmReports/TableSorter/css/theme.blue2.css"/>
<!-- Tablesorter -->
<script type="text/javascript" src="modules/EcmReports/TableSorter/js/jquery.min.js"></script>
<script type="text/javascript" src="modules/EcmReports/TableSorter/js/jquery.tablesorter.min.js"></script>
<script type="text/javascript" src="modules/EcmReports/TableSorter/js/jquery.tablesorter.staticrow.min.js"></script>
<script type="text/javascript" src="modules/EcmReports/TableSorter/js/jquery.tablesorter.widgets.js"></script>
<script type="text/javascript" src="modules/EcmReports/javascript/jquery.blockUI.js"></script>
<script type="text/javascript" src="modules/EcmReports/javascript/ReportStocks.js"></script>
<script type="text/javascript">
{literal}
function pdfExport() {
var url = $(location).attr('href');
url = url + "&toPDF=1&to_pdf=1";
window.open(url,'_blank');
}
{/literal}
</script>
<style type="text/css">
{literal}
thead, tfoot {font-weight: bold;}
.additionalColumn {
background-color: #87CCED;
border-top: 1px solid black;
}
.line {
border-top: 1px solid black !important;;
}
.groupActive {
border-top: 1px solid black;
border-bottom: 1px solid black;
border-left: 1px solid black;
background-color: #87CCED;
}
.sumRow {
background-color: #BDC7B5;
}
.sumAll td{
background-color: #BDC7B5;
}
table.tablesorter tbody tr:hover td {
background: #E8E8E8;
color: #343432;
}
/* Extra selectors needed to override the default styling */
table.tablesorter tbody tr.normal-row td {
background: #EFEFF1;
color: #343432;
}
table.tablesorter tbody tr.alt-row td {
background: #FFF;
color: #343432;
}
/* Extra selectors needed to override the default styling */
table.tablesorter tbody tr.normal-row:hover td {
background: #B8E8E8;
color: #343432;
font-weight: bold;
}
table.tablesorter tbody tr.alt-row:hover td {
background: #B8E8E8;
color: #343432;
font-weight: bold;
}
table.tablesorter tbody tr.sumAll td {
background: #EBEBED;
color: black;
}
table.tablesorter tbody tr.sumAll:hover td {
background: #E0E0E2;
color: black;
font-weight: bold;
}
table.tablesorter .sumRow, .oddListRowS1 {
text-align: right;
}
table.tablesorter .alignLeft {
text-align: left;
}
table.tablesorter .subcategory .alignLeft {
padding-left: 20px;
}
table.tablesorter .contractor .alignLeft {
padding-left: 40px;
}
.plusStyle {
color: #abc3d7;
text-decoration: none;
cursor: pointer;
}
{/literal}
</style>
<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>Raport magazynowy - Stany magazynowe za okres</h2>
</td>
</tr>
</table>
<br />
<ul class="tablist" style="width:100%;">
<li>
<a class="current" href="#">Wyszukiwanie</a>
</li>
</ul>
<form action="index.php" method="get" name="searchReportStocks">
<input type="hidden" name="module" value="EcmReports" />
<input type="hidden" name="action" value="ReportStockNew" />
<table style="border-top: 0px none; margin-bottom: 4px;width:100%" class="tabForm" border="0" cellpadding="0" cellspacing="0">
<tr>
<td class="dataLabel" width="5%" nowrap="nowrap">{$MOD.LBL_STOCK}</td>
<td class="dataField" width="10%" nowrap="nowrap">
<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 class="dataLabel" width="10%" nowrap="nowrap"></td>
<td class="dataLabel" width="5%" nowrap="nowrap">Ukryj stany zerowe</td>
<td class="dataField" width="10%" nowrap="nowrap">
<select id="productActive" name="selectProductActive">
<option value="" { if $selectProductActive==""} selected="true" {/if} ></option>
<option value="1" { if $selectProductActive=="1"} selected="true" {/if} >{$MOD.LBL_YES}</option>
</select>
</td>
<td class="dataLabel" width="10%" nowrap="nowrap"></td>
</tr>
<tr>
<td class="dataLabel" width="10%" nowrap="nowrap">Data od</td>
<td class="dataLabel" width="10%" nowrap="nowrap">
<input id="date_from" name="date_from" type="text" maxlength="10" size="11" tabindex="" title="Data od" value="{$date_from}" autocomplete="off">
<img id="date_from_trigger" border="0" align="absmiddle" alt="Enter Date" src="themes/default/images/jscalendar.gif">
<script language="JavaScript" type="text/javascript">
{* console.log('dupa');*}
Calendar.setup({ldelim}
inputField: "date_from",
daFormat: "%d.%m.%Y",
button: "date_from_trigger",
singleClick: true,
dateStr: "",
step: 1
{rdelim}
);
</script>
</td>
<td class="dataLabel" width="10%" nowrap="nowrap">Data do</td>
<td class="dataLabel" width="10%" nowrap="nowrap">
<input autocomplete="off" name="date_to" id="date_to" value="{$date_to}" title="Data do" tabindex="" size="11" maxlength="10" type="text">
<img src="themes/default/images/jscalendar.gif" alt="Enter Date" id="date_to_trigger" align="absmiddle" border="0">
<script language="JavaScript" type="text/javascript">
Calendar.setup({ldelim}
inputField: "date_to",
daFormat: "%d.%m.%Y",
button: "date_to_trigger",
singleClick: true,
dateStr: "",
step: 1
{rdelim}
);
</script>
</td>
<td class="dataLabel" width="60%" nowrap="nowrap"></td>
</tr>
</tbody>
</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=ReportStockNew';">
<input id="pdf" class="button" name="pdf" value="PDF" onClick="pdfExport();" type="button">
<br>
<br>
<table id="myTable" class="tablesorter tablesorter-blue" role="grid">
<thead>
<tr class="tablesorter-headerRow" role="row">
<th width="1%" class="sorter-text tablesorter-header tablesorter-headerUnSorted" data-column="0" tabindex="0" scope="col" role="columnheader" aria-disabled="false" unselectable="on" style="-moz-user-select: none;" aria-sort="none" aria-label="Name: No sort applied, activate to apply an ascending sort">L.p.</th>
<th width="15%" class="sorter-text tablesorter-header tablesorter-headerUnSorted" data-column="1" tabindex="0" scope="col" role="columnheader" aria-disabled="false" unselectable="on" style="-moz-user-select: none;" aria-sort="none" aria-label="Name: No sort applied, activate to apply an ascending sort">{$MOD.LBL_INDEX}/{$MOD.LBL_NAME}</th>
<th width="8%" class="sorter-saas tablesorter-header tablesorter-headerUnSorted" data-column="5" tabindex="0" scope="col" role="columnheader" aria-disabled="false" unselectable="on" style="-moz-user-select: none;" aria-sort="none" aria-label="Name: No sort applied, activate to apply an ascending sort">Stan {$date_from}</th>
<th width="8%" class="sorter-saas tablesorter-header tablesorter-headerUnSorted" data-column="5" tabindex="0" scope="col" role="columnheader" aria-disabled="false" unselectable="on" style="-moz-user-select: none;" aria-sort="none" aria-label="Name: No sort applied, activate to apply an ascending sort">Przychód</th>
<th width="8%" class="sorter-saas tablesorter-header tablesorter-headerUnSorted" data-column="6" tabindex="0" scope="col" role="columnheader" aria-disabled="false" unselectable="on" style="-moz-user-select: none;" aria-sort="none" aria-label="Name: No sort applied, activate to apply an ascending sort">Rozchód</th>
<th width="8%" class="sorter-saas tablesorter-header tablesorter-headerUnSorted" data-column="6" tabindex="0" scope="col" role="columnheader" aria-disabled="false" unselectable="on" style="-moz-user-select: none;" aria-sort="none" aria-label="Name: No sort applied, activate to apply an ascending sort">Stan {$date_to}</th>
</tr>
</thead>
<tbody aria-live="polite" aria-relevant="all">
{assign var="max_precision" value=0}
{assign var="number" value=$number+1}
{foreach from=$DATA key="key" item="item" name=loop}
{if $max_precision < $item.unit_precision }
{assign var="max_precision" value=$item.unit_precision}
{/if}
<tr>
<td class="oddListRowS1 alignLeft"><b>{$number}</b></td>
<td class="oddListRowS1" style="text-align:left;" rowspan="{$currow}"><b>{$item.product_code}</b><br><b>{$item.product_name}</b></td>
<td class="oddListRowS1 sumRow" >{$item.total_quantity_old|number_format:$item.unit_precision:",":"."} {$item.unit_id}<br>{$item.total_price_old|number_format:2:",":"." }</td>
<td class="oddListRowS1 sumRow" >{$item.przychod_q|number_format:$item.unit_precision:",":"."} {$item.unit_id}<br>{$item.przychod_w|number_format:2:",":"." }</td>
<td class="oddListRowS1 sumRow" >{$item.rozchod_q|number_format:$item.unit_precision:",":"."} {$item.unit_id}<br>{$item.rozchod_w|number_format:2:",":"." }</td>
<td class="oddListRowS1 sumRow" >{$item.total_quantity_now|number_format:$item.unit_precision:",":"."} {$item.unit_id}<br>{$item.total_price_now|number_format:2:",":"." }</td>
{assign var="number" value=$number+1}
</tr>
<tr>
<td class='line'></td>
<td class='line'></td>
<td class='line'></td>
<td class='line'></td>
<td class='line'></td>
<td class='line'></td>
</tr>
{/foreach}
</tbody>
<tr><td></td><td style="text-align:right;"><b>Razem ilość:</b></td><td class="oddListRowS1 sumRow"><b>{$TOTAL_QUANTITY_OLD|number_format:2:",":"." }</b></td><td class="oddListRowS1 sumRow"><b>{$przychod_q|number_format:2:",":"." }</b>
</td><td class="oddListRowS1 sumRow"><b>{$rozchod_q|number_format:2:",":"." }</b></td><td class="oddListRowS1 sumRow"><b>{$TOTAL_QUANTITY_NOW|number_format:2:",":"." }</b></td></tr>
<tr><td></td><td style="text-align:right;"><b>Razem wartość:</b></td><td class="oddListRowS1 sumRow"><b>{$TOTAL_VALUE_OLD|number_format:2:",":"." }</b></td><td class="oddListRowS1 sumRow"><b>{$przychod_w|number_format:2:",":"." }</b>
</td><td class="oddListRowS1 sumRow"><b>{$rozchod_w|number_format:2:",":"." }</b></td><td class="oddListRowS1 sumRow"><b>{$TOTAL_VALUE_NOW|number_format:2:",":"." }</b></td></tr>
</table>
<br/>