Files
2025-05-12 15:46:37 +00:00

129 lines
5.2 KiB
Smarty
Executable File

<script type="text/javascript" src="https://www.google.com/jsapi"></script>
<table id="table" 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>Rejestr wartościowy </h2>
</td>
</tr>
</table>
<br>
<form action="index.php" method="get" class="EditView" name="AnalysisProductSale">
<input type="hidden" name="module" value="EcmReports" />
<input type="hidden" name="action" value="AnalysisProductSale" />
<table style="border-top: 0px none; margin-bottom: 4px;width:100%" class="tabForm" border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td class="dataField" nowrap="nowrap">
{$MOD.LBL_PRODUCTS_CATEGORY}
<select multiple name="productCategorySelected[]">
{foreach from=$productCategoryList key="key" item="item"}
<option value="{$key}" {if @in_array($key, $productCategorySelected) } selected="true" {/if}>{$item}</option>
{/foreach}
</select>
</td>
<td class="dataField" nowrap="nowrap">
{$MOD.LBL_PRODUCT}:
<input type="text" id="productName" value="{$productName}" name="productName" style="width:50%">
<input type="hidden" id="productId" name="productId" value="{$productId}">
<button
type="button"
id="selectProduct"
value="{$APP.LBL_ADD_BUTTON}"
title="Wybierz kontrahenta">
<img src="{sugar_getimagepath file="id-ff-select.png"}">
</button>
<button
type="button"
id="clearProduct"
value="Wyczyść"
title="Wyczyść">
<img src="{sugar_getimagepath file="id-ff-clear.png"}">
</button>
</td>
<td class="dataField" nowrap="nowrap">
{$MOD.LBL_CONTRACTOR}:
<input type="text" id="accountName" name="accountName" value="{$accountName}" style="width:50%">
<input type="hidden" id="accountId" name="accountId" value="{$accountId}">
<button
type="button"
id="selectAccount"
value="{$APP.LBL_ADD_BUTTON}"
title="Wybierz kontrahenta">
<img src="{sugar_getimagepath file="id-ff-select.png"}">
</button>
<button
type="button"
id="clearAccount"
value="Wyczyść"
title="Wyczyść">
<img src="{sugar_getimagepath file="id-ff-clear.png"}">
</button>
</td>
</tr>
</tbody>
</table>
<input type="submit" value="{$MOD.LBL_EXECUTE}">
<input class="button" name="clear" value="Wyczyść" type="button" onclick="location.href = 'index.php?module=EcmReports&action=AnalysisProductSale';">
<input id="pdfEksport" class="button" name="importToPDF" value="{$MOD.BTN_PDF_EXPORT}" type="button">
</form>
<table id="myTable" class="tablesorter tablesorter-blue">
<thead>
<tr>
<th>Nazwa</th>
{foreach from=$DATA key=key item=item}
<th>{$key}</th>
{/foreach}
<th>Suma</th>
</tr>
</thead>
<tbody>
<tr>
<td>netto</td>
{foreach from=$ROWS.netto key=key item=item}
{assign var=sumanetto value=$sumanetto+$item}
<td style="text-align: right;">{$item|number_format:2:",":"."}</td>
{/foreach}
<td style="text-align: right;">{$sumanetto|number_format:2:",":"."}</td>
</tr>
<tr>
<td>kupno</td>
{foreach from=$ROWS.kupno key=key item=item}
{assign var=sumakupno value=$sumakupno+$item}
<td style="text-align: right;">{$item|number_format:2:",":"."}</td>
{/foreach}
<td style="text-align: right;">{$sumakupno|number_format:2:",":"."}</td>
</tr>
<tr>
<td>dochód</td>
{foreach from=$ROWS.marza key=key item=item}
{assign var=sumamarza value=$sumamarza+$item}
<td style="text-align: right;">{$item|number_format:2:",":"."}</td>
{/foreach}
<td style="text-align: right;">{$sumamarza|number_format:2:",":"."}</td>
</tr>
<tr>
<td>marża %</td>
{foreach from=$ROWS.marzaprocent key=key item=item}
{assign var=sumamarzaprocent value=$sumamarzaprocent+$item}
<td style="text-align: right;">{$item|number_format:2:",":"."} %</td>
{/foreach}
<td style="text-align: right;">{$sumamarzaprocent/12|number_format:2:",":"."} %</td>
</tr>
</tbody>
</table>
<div id="chart_div" style="width: 100%; height: 500px;"></div>
<!-- Tablesorter script: required -->
<script src="modules/EcmReports/TableSorterNew/js/jquery.tablesorter.js"></script>
<script src="modules/EcmReports/javascript/AnalysisProductSale.js"></script>
<script src="modules/EcmReports/TableSorterNew/js/jquery.tablesorter.widgets.js"></script>
<link class="theme" rel="stylesheet" href="modules/EcmReports/TableSorter/css/theme.blue.css">