Add TPL files

This commit is contained in:
2025-05-12 15:46:37 +00:00
parent 4a4ed02e8a
commit b4d54ba40b
894 changed files with 120580 additions and 0 deletions

235
modules/EcmReports/Kartoteka.tpl Executable file
View File

@@ -0,0 +1,235 @@
<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.location.href = url;
}
{/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>Kartoteka ruchu towarów - Podsumowanie</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="Kartoteka" />
<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">{$MOD.LBL_PRODUCT_ACTIVE}</td>
<td class="dataField" width="10%" nowrap="nowrap">
<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>
<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=Kartoteka';">
<input id="pdf" class="button" name="pdf" value="PDF" onClick="pdfExport();" type="button">
<br>
<br>
<table id="myTable" class="tablesorter " role="grid" width="50%">
<thead>
<tr class="tablesorter-headerRow" role="row">
<th width="50%" 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;text-align:left;" aria-sort="none" aria-label="Name: No sort applied, activate to apply an ascending sort">Stan początkowy:</th>
<th width="50%" 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;text-align:right;" aria-sort="none" aria-label="Name: No sort applied, activate to apply an ascending sort">{$TOTAL_VALUE_OLD|number_format:2:",":"." }</th>
</tr>
</thead>
<tbody aria-live="polite" aria-relevant="all">
{assign var="number" value=1}
{foreach from=$DATA key="key" item="item" name=loop}
{foreach from=$item key="key2" item="item2" name=loop}
<tr>
<td class="oddListRowS1 alignLeft"><b>{$doc_name.$key2} {if $key==0}(+){else}(-){/if}</b></td>
<td class="oddListRowS1" style="text-align:right;" rowspan="{$currow}"><b>{$item2|number_format:2:",":"."}</b></td>
</tr>
{if $key==0}
{assign var=nowa_suma value=$nowa_suma+$item2}
{else}
{assign var=nowa_suma value=$nowa_suma-$item2}
{/if}
{/foreach}
{/foreach}
</tbody>
<tr class="tablesorter-headerRow" role="row">
<th width="10%" 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;text-align:left;" aria-sort="none" aria-label="Name: No sort applied, activate to apply an ascending sort">Stan końcowy:</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;text-align:right;" aria-sort="none" aria-label="Name: No sort applied, activate to apply an ascending sort">{$nowa_suma+$TOTAL_VALUE_OLD|number_format:2:",":"." }</th>
</tr>
</table>

View File

@@ -0,0 +1,90 @@
<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>{$MOD.LBL_REPORT_SALES_ANALYSIS_ECMQUOTE}</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="width:100%" class="edit view">
<tbody>
<tr>
<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';">
</form>
<table id="myTable" class="tablesorter tablesorter-blue" style="width:100%;">
<thead>
<tr>
<th>Nazwa</th>
{foreach from=$DATA key=key item=item}
<th>{$key}</th>
{/foreach}
<th>Suma</th>
</tr>
</thead>
<tbody>
<tr>
<td>Utworzona/Wysłana</td>
{foreach from=$ROWS.created key=key item=item}
{assign var=sumacreated value=$sumacreated+$item}
<td style="text-align: right;">{$item|number_format:0:",":"."}</td>
{/foreach}
<td style="text-align: right;">{$sumacreated|number_format:0:",":"."}</td>
</tr>
<tr>
<td>Przyjęta</td>
{foreach from=$ROWS.accepted key=key item=item}
{assign var=sumaaccepted value=$sumaaccepted+$item}
<td style="text-align: right;">{$item|number_format:0:",":"."}</td>
{/foreach}
<td style="text-align: right;">{$sumaaccepted|number_format:0:",":"."}</td>
</tr>
<tr>
<td>Odrzucona</td>
{foreach from=$ROWS.not_accepted key=key item=item}
{assign var=sumanot_accepted value=$sumanot_accepted+$item}
<td style="text-align: right;">{$item|number_format:0:",":"."}</td>
{/foreach}
<td style="text-align: right;">{$sumanot_accepted|number_format:0:",":"."}</td>
</tr>
</tbody>
</table>
<div id="chart_div" style="width: 100%; height: 500px;"></div>
<!-- Tablesorter script: required -->
<script src="modules/EcmReports/javascript/AnalysisEcmQuote.js"></script>
<link class="theme" rel="stylesheet" href="include/jQuery/tablesorter/themes/blue/style.css">
<script src="include/jQuery/tablesorter/jquery.tablesorter.min.js"></script>

View File

@@ -0,0 +1,175 @@
<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>{$MOD.LBL_REPORT_BUY_ANALIS_PRODUCT}</h2>
</td>
</tr>
</table>
<br>
<form action="index.php" method="get" class="EditView" name="AnalysisPZ">
<input type="hidden" name="module" value="EcmReports" />
<input type="hidden" name="action" value="AnalysisPZ" />
<input type="hidden" name="parentTab" value="Raporty" />
<table style="width:100%" class="edit view">
<tbody>
<tr >
{if !empty($product_group) }
<td rowspan='2'>
{$MOD.LBL_PRODUCT_GROUP}:
</td>
<td rowspan='2'>
<select multiple name="product_group[]" title="{$MOD.TIP_MULTIPLE}">
<!--<option {if @in_array("", $smarty.request.product_group) } selected="true" {/if} value=""></option>-->
{foreach from=$product_group key="key" item="item"}
<option
value="{$key}"
{if @in_array($key, $smarty.request.product_group) } selected="true" {/if}>
{$item}
</option>
{/foreach}
</select>
</td>
{/if}
{if !empty($product_group_2) }
<td rowspan='2'>
{$MOD.LBL_PRODUCT_GROUP_2}:
</td>
<td rowspan='2'>
<select multiple name="product_group_2[]" title="{$MOD.TIP_MULTIPLE}">
<!--<option {if @in_array("", $smarty.request.product_group_2) } selected="true" {/if} value=""></option>-->
{foreach from=$product_group_2 key="key" item="item"}
<option
value="{$key}"
{if @in_array($key, $smarty.request.product_group_2) } selected="true" {/if}>
{$item}
</option>
{/foreach}
</select>
</td>
{/if}
<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>
{if !empty($stock_array)}
<td rowspan='2'>
{$MOD.LBL_STOCK}:
</td>
<td rowspan='2'>
<select multiple name="stocks[]" title="{$MOD.TIP_MULTIPLE}">
{foreach from=$stock_array key="key" item="item"}
<option
value="{$key}"
{if @in_array($key, $smarty.request.stocks) } selected="true" {/if}>
{$item}
</option>
{/foreach}
</select>
</td>
{/if}
</tr>
<tr> <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}" name='submit'>
<input class="button" name="clear" value="Wyczyść" type="button" onclick="location.href = 'index.php?module=EcmReports&action=AnalysisPZ';">
</form>
{ if count($DATA)>0}
<table id="myTable" class="tablesorter tablesorter-blue">
<thead>
<tr>
<th>{$MOD.LBL_NAME}</th>
{foreach from=$DATA key=key item=item}
<th>{$key}</th>
{/foreach}
<th>Suma</th>
</tr>
</thead>
<tbody>
<tr>
<td>{$MOD.LBL_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 style=''>
<td>Ilość razem</td>
{foreach from=$ROWS.ilosc 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 style=''>
<td>Średnia cena</td>
{foreach from=$ROWS.srednia 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;">{$sumanetto/$sumakupno|number_format:2:",":"."}</td>
</tr>
<!--<tr>
<td>{$MOD.LBL_OVERHEAD} %</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>
{/if}
<div id="chart_div" style="width: 100%; height: 500px;"></div>
<div id="chart_div_ilosc" style="width: 100%; height: 500px;"></div>
<!-- Tablesorter script: required -->
<script src="include/jQuery/tablesorter/jquery.tablesorter.min.js"></script>
<link class="theme" rel="stylesheet" href="include/jQuery/tablesorter/themes/blue/style.css">
<script src="modules/EcmReports/javascript/AnalysisPZ.js"></script>

View File

@@ -0,0 +1,192 @@
<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>{$MOD.LBL_REPORT_SALES_ANALIS_PRODUCT}</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" />
<input type="hidden" name="parentTab" value="Raporty" />
<table style="width:100%" class="edit view">
<tbody>
<tr >
{if !empty($product_group) }
<td rowspan='2'>
{$MOD.LBL_PRODUCT_GROUP}:
</td>
<td rowspan='2'>
<select multiple name="product_group[]" title="{$MOD.TIP_MULTIPLE}">
<!--<option {if @in_array("", $smarty.request.product_group) } selected="true" {/if} value=""></option>-->
{foreach from=$product_group key="key" item="item"}
<option
value="{$key}"
{if @in_array($key, $smarty.request.product_group) } selected="true" {/if}>
{$item}
</option>
{/foreach}
</select>
</td>
{/if}
{if !empty($product_group_2) }
<td rowspan='2'>
{$MOD.LBL_PRODUCT_GROUP_2}:
</td>
<td rowspan='2'>
<select multiple name="product_group_2[]" title="{$MOD.TIP_MULTIPLE}">
<!--<option {if @in_array("", $smarty.request.product_group_2) } selected="true" {/if} value=""></option>-->
{foreach from=$product_group_2 key="key" item="item"}
<option
value="{$key}"
{if @in_array($key, $smarty.request.product_group_2) } selected="true" {/if}>
{$item}
</option>
{/foreach}
</select>
</td>
{/if}
<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>
{if !empty($stock_array)}
<td rowspan='2'>
{$MOD.LBL_STOCK}:
</td>
<td rowspan='2'>
<select multiple name="stocks[]" title="{$MOD.TIP_MULTIPLE}">
{foreach from=$stock_array key="key" item="item"}
<option
value="{$key}"
{if @in_array($key, $smarty.request.stocks) } selected="true" {/if}>
{$item}
</option>
{/foreach}
</select>
</td>
{/if}
</tr>
<tr> <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}" name='submit'>
<input class="button" name="clear" value="Wyczyść" type="button" onclick="location.href = 'index.php?module=EcmReports&action=AnalysisProductSale';">
</form>
{if count($DATA)>0}
<table id="myTable" class="tablesorter tablesorter-blue">
<thead>
<tr>
<th>{$MOD.LBL_NAME}</th>
{foreach from=$DATA key=key item=item}
<th>{$key}</th>
{/foreach}
<th>Suma</th>
</tr>
</thead>
<tbody>
<tr>
<td>{$MOD.LBL_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>{$MOD.LBL_PURCHASE}</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>{$MOD.LBL_INCOME}</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> Ilość razem</td>
{foreach from=$ROWS.ilosc 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|number_format:2:",":"."} </td>
</tr>
<tr>
<td> Średnia cena</td>
{foreach from=$ROWS.srednia key=key item=item}
{assign var=sumamt value=$sumamt+$item}
<td style="text-align: right;">{$item|number_format:2:",":"."} </td>
{/foreach}
<td style="text-align: right;">{$sumanetto/$sumamarzaprocent|number_format:2:",":"."} </td>
</tr>
<tr>
<td>{$MOD.LBL_OVERHEAD} %</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>
{/if}
<div id="chart_div" style="width: 100%; height: 500px;"></div>
<div id="chart_div_ilosc" style="width: 100%; height: 500px;"></div>
<!-- Tablesorter script: required -->
<script src="include/jQuery/tablesorter/jquery.tablesorter.min.js"></script>
<link class="theme" rel="stylesheet" href="include/jQuery/tablesorter/themes/blue/style.css">
<script src="modules/EcmReports/javascript/AnalysisProductSale.js"></script>

View File

@@ -0,0 +1,235 @@
<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.location.href = url;
}
{/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>Kartoteka ruchu towarów - Podsumowanie</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="Kartoteka" />
<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">{$MOD.LBL_PRODUCT_ACTIVE}</td>
<td class="dataField" width="10%" nowrap="nowrap">
<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>
<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=Kartoteka';">
<input id="pdf" class="button" name="pdf" value="PDF" onClick="pdfExport();" type="button">
<br>
<br>
<table id="myTable" class="tablesorter " role="grid" width="50%">
<thead>
<tr class="tablesorter-headerRow" role="row">
<th width="50%" 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;text-align:left;" aria-sort="none" aria-label="Name: No sort applied, activate to apply an ascending sort">Stan początkowy:</th>
<th width="50%" 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;text-align:right;" aria-sort="none" aria-label="Name: No sort applied, activate to apply an ascending sort">{$TOTAL_VALUE_OLD|number_format:2:",":"." } zł</th>
</tr>
</thead>
<tbody aria-live="polite" aria-relevant="all">
{assign var="number" value=1}
{foreach from=$DATA key="key" item="item" name=loop}
{foreach from=$item key="key2" item="item2" name=loop}
<tr>
<td class="oddListRowS1 alignLeft"><b>{$doc_name.$key2} {if $key==0}(+){else}(-){/if}</b></td>
<td class="oddListRowS1" style="text-align:right;" rowspan="{$currow}"><b>{$item2|number_format:2:",":"."} zł</b></td>
</tr>
{if $key==0}
{assign var=nowa_suma value=$nowa_suma+$item2}
{else}
{assign var=nowa_suma value=$nowa_suma-$item2}
{/if}
{/foreach}
{/foreach}
</tbody>
<tr class="tablesorter-headerRow" role="row">
<th width="10%" 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;text-align:left;" aria-sort="none" aria-label="Name: No sort applied, activate to apply an ascending sort">Stan końcowy:</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;text-align:right;" aria-sort="none" aria-label="Name: No sort applied, activate to apply an ascending sort">{$nowa_suma+$TOTAL_VALUE_OLD|number_format:2:",":"." } zł</th>
</tr>
</table>

View File

@@ -0,0 +1,289 @@
<style type="text/css">
{literal}
body {
font-size: 8px;
}
/* overall */
.tablesorter-blue {
width: 100%;
background-color: #fff;
margin: 10px 0 15px;
text-align: left;
border-spacing: 0;
border: #fff 1px solid;
border-width: 1px 0 0 1px;
}
.tablesorter-blue th,
.tablesorter-blue td {
border: #fff 1px solid;
border-width: 0 1px 1px 0;
}
/* header */
.tablesorter-blue th,
.tablesorter-blue thead td {
font: bold 10px/18px Arial, Sans-serif;
color: #fff;
background-color: #252525;
border-collapse: collapse;
padding: 4px;
border-top: 2px solid #ABC3D7;
}
.tablesorter-blue tbody td,
.tablesorter-blue tfoot th,
.tablesorter-blue tfoot td {
padding: 4px;
vertical-align: top;
}
.tablesorter-blue .header,
.tablesorter-blue .tablesorter-header {
/* black (unsorted) double arrow */
background-image: url(data:image/gif;base64,R0lGODlhFQAJAIAAACMtMP///yH5BAEAAAEALAAAAAAVAAkAAAIXjI+AywnaYnhUMoqt3gZXPmVg94yJVQAAOw==);
/* white (unsorted) double arrow */
/* background-image: url(data:image/gif;base64,R0lGODlhFQAJAIAAAP///////yH5BAEAAAEALAAAAAAVAAkAAAIXjI+AywnaYnhUMoqt3gZXPmVg94yJVQAAOw==); */
/* image */
/* background-image: url(images/black-unsorted.gif); */
background-repeat: no-repeat;
background-position: center right;
padding: 3px 18px 3px 3px;
white-space: normal;
cursor: pointer;
}
.tablesorter-blue .headerSortUp,
.tablesorter-blue .tablesorter-headerSortUp,
.tablesorter-blue .tablesorter-headerAsc {
background-color: #E7E7E9;
/* black asc arrow */
background-image: url(data:image/gif;base64,R0lGODlhFQAEAIAAACMtMP///yH5BAEAAAEALAAAAAAVAAQAAAINjI8Bya2wnINUMopZAQA7);
/* white asc arrow */
/* background-image: url(data:image/gif;base64,R0lGODlhFQAEAIAAAP///////yH5BAEAAAEALAAAAAAVAAQAAAINjI8Bya2wnINUMopZAQA7); */
/* image */
/* background-image: url(images/black-asc.gif); */
}
.tablesorter-blue .headerSortDown,
.tablesorter-blue .tablesorter-headerSortDown,
.tablesorter-blue .tablesorter-headerDesc {
background-color: #E7E7E9;
/* black desc arrow */
background-image: url(data:image/gif;base64,R0lGODlhFQAEAIAAACMtMP///yH5BAEAAAEALAAAAAAVAAQAAAINjB+gC+jP2ptn0WskLQA7);
/* white desc arrow */
/* background-image: url(data:image/gif;base64,R0lGODlhFQAEAIAAAP///////yH5BAEAAAEALAAAAAAVAAQAAAINjB+gC+jP2ptn0WskLQA7); */
/* image */
/* background-image: url(images/black-desc.gif); */
}
.tablesorter-blue thead .sorter-false {
background-image: none;
padding: 4px;
}
/* tfoot */
.tablesorter-blue tfoot .tablesorter-headerSortUp,
.tablesorter-blue tfoot .tablesorter-headerSortDown,
.tablesorter-blue tfoot .tablesorter-headerAsc,
.tablesorter-blue tfoot .tablesorter-headerDesc {
/* remove sort arrows from footer */
background-image: none;
}
/* tbody */
.tablesorter-blue td {
color: #3d3d3d;
background-color: #fff;
padding: 0px;
vertical-align: top;
}
/* hovered row colors
you'll need to add additional lines for
rows with more than 2 child rows
*/
.tablesorter-blue tbody > tr:hover > td,
.tablesorter-blue tbody > tr:hover + tr.tablesorter-childRow > td,
.tablesorter-blue tbody > tr:hover + tr.tablesorter-childRow + tr.tablesorter-childRow > td,
.tablesorter-blue tbody > tr.even:hover > td,
.tablesorter-blue tbody > tr.even:hover + tr.tablesorter-childRow > td,
.tablesorter-blue tbody > tr.even:hover + tr.tablesorter-childRow + tr.tablesorter-childRow > td {
background: #d9d9d9;
}
.tablesorter-blue tbody > tr.odd:hover > td,
.tablesorter-blue tbody > tr.odd:hover + tr.tablesorter-childRow > td,
.tablesorter-blue tbody > tr.odd:hover + tr.tablesorter-childRow + tr.tablesorter-childRow > td {
background: #bfbfbf;
}
/* table processing indicator */
.tablesorter-blue .tablesorter-processing {
background-position: center center !important;
background-repeat: no-repeat !important;
/* background-image: url(../addons/pager/icons/loading.gif) !important; */
background-image: url('data:image/gif;base64,R0lGODlhFAAUAKEAAO7u7lpaWgAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh+QQBCgACACwAAAAAFAAUAAACQZRvoIDtu1wLQUAlqKTVxqwhXIiBnDg6Y4eyx4lKW5XK7wrLeK3vbq8J2W4T4e1nMhpWrZCTt3xKZ8kgsggdJmUFACH5BAEKAAIALAcAAAALAAcAAAIUVB6ii7jajgCAuUmtovxtXnmdUAAAIfkEAQoAAgAsDQACAAcACwAAAhRUIpmHy/3gUVQAQO9NetuugCFWAAAh+QQBCgACACwNAAcABwALAAACE5QVcZjKbVo6ck2AF95m5/6BSwEAIfkEAQoAAgAsBwANAAsABwAAAhOUH3kr6QaAcSrGWe1VQl+mMUIBACH5BAEKAAIALAIADQALAAcAAAIUlICmh7ncTAgqijkruDiv7n2YUAAAIfkEAQoAAgAsAAAHAAcACwAAAhQUIGmHyedehIoqFXLKfPOAaZdWAAAh+QQFCgACACwAAAIABwALAAACFJQFcJiXb15zLYRl7cla8OtlGGgUADs=') !important;
}
/* Zebra Widget - row alternating colors */
.tablesorter-blue tbody tr.odd td {
background-color: #ebf2fa;
}
.tablesorter-blue tbody tr.even td {
background-color: #fff;
}
/* Column Widget - column sort colors */
.tablesorter-blue td.primary,
.tablesorter-blue tr.odd td.primary {
background-color: #99b3e6;
}
.tablesorter-blue tr.even td.primary {
background-color: #c2d1f0;
}
.tablesorter-blue td.secondary,
.tablesorter-blue tr.odd td.secondary {
background-color: #c2d1f0;
}
.tablesorter-blue tr.even td.secondary {
background-color: #d6e0f5;
}
.tablesorter-blue td.tertiary,
.tablesorter-blue tr.odd td.tertiary {
background-color: #d6e0f5;
}
.tablesorter-blue tr.even td.tertiary {
background-color: #ebf0fa;
}
/* caption */
caption {
background: #fff;
}
/* filter widget */
.tablesorter-blue .tablesorter-filter-row td {
background: #eee;
line-height: normal;
text-align: center; /* center the input */
-webkit-transition: line-height 0.1s ease;
-moz-transition: line-height 0.1s ease;
-o-transition: line-height 0.1s ease;
transition: line-height 0.1s ease;
}
/* optional disabled input styling */
.tablesorter-blue .tablesorter-filter-row .disabled {
opacity: 0.5;
filter: alpha(opacity=50);
cursor: not-allowed;
}
/* hidden filter row */
.tablesorter-blue .tablesorter-filter-row.hideme td {
/*** *********************************************** ***/
/*** change this padding to modify the thickness ***/
/*** of the closed filter row (height = padding x 2) ***/
padding: 2px;
/*** *********************************************** ***/
margin: 0;
line-height: 0;
cursor: pointer;
}
.tablesorter-blue .tablesorter-filter-row.hideme .tablesorter-filter {
height: 1px;
min-height: 0;
border: 0;
padding: 0;
margin: 0;
/* don't use visibility: hidden because it disables tabbing */
opacity: 0;
filter: alpha(opacity=0);
}
/* filters */
.tablesorter-blue .tablesorter-filter {
width: 98%;
height: auto;
margin: 0;
padding: 4px;
background-color: #fff;
border: 1px solid #bbb;
color: #333;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
-webkit-transition: height 0.1s ease;
-moz-transition: height 0.1s ease;
-o-transition: height 0.1s ease;
transition: height 0.1s ease;
}
/* ajax error row */
.tablesorter .tablesorter-errorRow td {
cursor: pointer;
background-color: #e6bf99;
}
#myTable tbody tr td.subcategory {
padding-left: 30px;
}
#myTable tbody tr td.product {
padding-left: 55px;
}
#myTable tbody tr.category td {
background-color: #96FF7C;
}
#myTable tbody tr.sumAll td{
background-color: #242424;
color: #fff;
}
#myTable tbody tr td.sumRow {
text-align: right;
}
#myTable tbody tr td.oddListRowS1 {
text-align: right;
}
#myTable tbody tr td.alignLeft {
text-align: left;
}
{/literal}
</style>
<table id="myTable" class="tablesorter tablesorter-blue" role="grid">
<thead>
<tr class="tablesorter-headerRow" role="row">
<th width="50%" 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;text-align:left;" aria-sort="none" aria-label="Name: No sort applied, activate to apply an ascending sort">Stan początkowy:</th>
<th width="50%" 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;text-align:right;" aria-sort="none" aria-label="Name: No sort applied, activate to apply an ascending sort">{$TOTAL_VALUE_OLD|number_format:2:",":"." } zł</th>
</tr>
</thead>
<tbody aria-live="polite" aria-relevant="all">
{assign var="number" value=1}
{foreach from=$DATA key="key" item="item" name=loop}
{foreach from=$item key="key2" item="item2" name=loop}
<tr>
<td class="oddListRowS1 alignLeft"><b>{$doc_name.$key2} { if $key==0}(+){else}(-){/if}</b></td>
<td class="oddListRowS1" style="text-align:right;" rowspan="{$currow}"><b>{$item2|number_format:2:",":"."} zł</b></td>
</tr>
{if $key==0}
{assign var=nowa_suma value=$nowa_suma+$item2}
{else}
{assign var=nowa_suma value=$nowa_suma-$item2}
{/if}
{/foreach}
{/foreach}
</tbody>
<tr class="tablesorter-headerRow" role="row">
<th width="10%" 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;text-align:left;" aria-sort="none" aria-label="Name: No sort applied, activate to apply an ascending sort">Stan końcowy:</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;text-align:right;" aria-sort="none" aria-label="Name: No sort applied, activate to apply an ascending sort">{$nowa_suma+$TOTAL_VALUE_OLD|number_format:2:",":"." } zł</th>
</tr>
</table>

View File

@@ -0,0 +1,343 @@
{literal}
<html>
<head>
<style>
@page {
size: auto;
odd-header-name: html_MyHeader1;
odd-footer-name: html_MyFooter1;
}
@page chapter2 {
odd-header-name: html_MyHeader2;
odd-footer-name: html_MyFooter2;
}
@page noheader {
odd-header-name: _blank;
odd-footer-name: _blank;
}
div.chapter2 {
page-break-before: always;
page: chapter2;
}
div.noheader {
page-break-before: always;
page: noheader;
}
body {
font-size: 8px;
}
/* overall */
.tablesorter-blue {
width: 100%;
background-color: #fff;
margin: 10px 0 15px;
text-align: left;
border-spacing: 0;
border: #fff 1px solid;
border-width: 1px 0 0 1px;
}
.tablesorter-blue th,
.tablesorter-blue td {
border: #fff 1px solid;
border-width: 0 1px 1px 0;
border-bottom: 1px solid black;
}
/* header */
.tablesorter-blue th,
.tablesorter-blue thead td {
font: bold 10px/18px Arial, Sans-serif;
color: #000;
background-color: #fff;
padding: 4px;
border-top: 2px solid red;
}
.tablesorter-blue tbody td,
.tablesorter-blue tfoot th,
.tablesorter-blue tfoot td {
padding: 4px;
vertical-align: top;
}
.tablesorter-blue .header,
.tablesorter-blue .tablesorter-header {
/* black (unsorted) double arrow */
background-image: url(data:image/gif;base64,R0lGODlhFQAJAIAAACMtMP///yH5BAEAAAEALAAAAAAVAAkAAAIXjI+AywnaYnhUMoqt3gZXPmVg94yJVQAAOw==);
/* white (unsorted) double arrow */
/* background-image: url(data:image/gif;base64,R0lGODlhFQAJAIAAAP///////yH5BAEAAAEALAAAAAAVAAkAAAIXjI+AywnaYnhUMoqt3gZXPmVg94yJVQAAOw==); */
/* image */
/* background-image: url(images/black-unsorted.gif); */
background-repeat: no-repeat;
background-position: center right;
padding: 3px 18px 3px 3px;
white-space: normal;
cursor: pointer;
}
.tablesorter-blue .headerSortUp,
.tablesorter-blue .tablesorter-headerSortUp,
.tablesorter-blue .tablesorter-headerAsc {
background-color: #E7E7E9;
/* black asc arrow */
background-image: url(data:image/gif;base64,R0lGODlhFQAEAIAAACMtMP///yH5BAEAAAEALAAAAAAVAAQAAAINjI8Bya2wnINUMopZAQA7);
/* white asc arrow */
/* background-image: url(data:image/gif;base64,R0lGODlhFQAEAIAAAP///////yH5BAEAAAEALAAAAAAVAAQAAAINjI8Bya2wnINUMopZAQA7); */
/* image */
/* background-image: url(images/black-asc.gif); */
}
.tablesorter-blue .headerSortDown,
.tablesorter-blue .tablesorter-headerSortDown,
.tablesorter-blue .tablesorter-headerDesc {
background-color: #E7E7E9;
/* black desc arrow */
background-image: url(data:image/gif;base64,R0lGODlhFQAEAIAAACMtMP///yH5BAEAAAEALAAAAAAVAAQAAAINjB+gC+jP2ptn0WskLQA7);
/* white desc arrow */
/* background-image: url(data:image/gif;base64,R0lGODlhFQAEAIAAAP///////yH5BAEAAAEALAAAAAAVAAQAAAINjB+gC+jP2ptn0WskLQA7); */
/* image */
/* background-image: url(images/black-desc.gif); */
}
.tablesorter-blue thead .sorter-false {
background-image: none;
padding: 4px;
}
/* tfoot */
.tablesorter-blue tfoot .tablesorter-headerSortUp,
.tablesorter-blue tfoot .tablesorter-headerSortDown,
.tablesorter-blue tfoot .tablesorter-headerAsc,
.tablesorter-blue tfoot .tablesorter-headerDesc {
/* remove sort arrows from footer */
background-image: none;
}
/* tbody */
.tablesorter-blue td {
color: #3d3d3d;
background-color: #fff;
padding: 0px;
vertical-align: top;
}
/* hovered row colors
you'll need to add additional lines for
rows with more than 2 child rows
*/
.tablesorter-blue tbody > tr:hover > td,
.tablesorter-blue tbody > tr:hover + tr.tablesorter-childRow > td,
.tablesorter-blue tbody > tr:hover + tr.tablesorter-childRow + tr.tablesorter-childRow > td,
.tablesorter-blue tbody > tr.even:hover > td,
.tablesorter-blue tbody > tr.even:hover + tr.tablesorter-childRow > td,
.tablesorter-blue tbody > tr.even:hover + tr.tablesorter-childRow + tr.tablesorter-childRow > td {
background: #d9d9d9;
}
.tablesorter-blue tbody > tr.odd:hover > td,
.tablesorter-blue tbody > tr.odd:hover + tr.tablesorter-childRow > td,
.tablesorter-blue tbody > tr.odd:hover + tr.tablesorter-childRow + tr.tablesorter-childRow > td {
background: #bfbfbf;
}
/* Zebra Widget - row alternating colors */
.tablesorter-blue tbody tr.odd td {
background-color: #ebf2fa;
}
.tablesorter-blue tbody tr.even td {
background-color: #fff;
}
/* Column Widget - column sort colors */
.tablesorter-blue td.primary,
.tablesorter-blue tr.odd td.primary {
background-color: #99b3e6;
}
.tablesorter-blue tr.even td.primary {
background-color: #c2d1f0;
}
.tablesorter-blue td.secondary,
.tablesorter-blue tr.odd td.secondary {
background-color: #c2d1f0;
}
.tablesorter-blue tr.even td.secondary {
background-color: #d6e0f5;
}
.tablesorter-blue td.tertiary,
.tablesorter-blue tr.odd td.tertiary {
background-color: #d6e0f5;
}
.tablesorter-blue tr.even td.tertiary {
background-color: #ebf0fa;
}
/* caption */
caption {
background: #fff;
}
/* filter widget */
.tablesorter-blue .tablesorter-filter-row td {
background: #eee;
line-height: normal;
text-align: center; /* center the input */
-webkit-transition: line-height 0.1s ease;
-moz-transition: line-height 0.1s ease;
-o-transition: line-height 0.1s ease;
transition: line-height 0.1s ease;
}
/* optional disabled input styling */
.tablesorter-blue .tablesorter-filter-row .disabled {
opacity: 0.5;
filter: alpha(opacity=50);
cursor: not-allowed;
}
/* hidden filter row */
.tablesorter-blue .tablesorter-filter-row.hideme td {
/*** *********************************************** ***/
/*** change this padding to modify the thickness ***/
/*** of the closed filter row (height = padding x 2) ***/
padding: 2px;
/*** *********************************************** ***/
margin: 0;
line-height: 0;
cursor: pointer;
}
.tablesorter-blue .tablesorter-filter-row.hideme .tablesorter-filter {
height: 1px;
min-height: 0;
border: 0;
padding: 0;
margin: 0;
/* don't use visibility: hidden because it disables tabbing */
opacity: 0;
filter: alpha(opacity=0);
}
/* filters */
.tablesorter-blue .tablesorter-filter {
width: 98%;
height: auto;
margin: 0;
padding: 4px;
background-color: #fff;
border: 1px solid #bbb;
color: #333;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
-webkit-transition: height 0.1s ease;
-moz-transition: height 0.1s ease;
-o-transition: height 0.1s ease;
transition: height 0.1s ease;
}
/* ajax error row */
.tablesorter .tablesorter-errorRow td {
cursor: pointer;
background-color: #e6bf99;
}
#myTable tfoot th {
text-align: right;
}
</style>
</head>
<body>
<htmlpageheader name="MyHeader1">
{/literal}
<div style="text-align: left; border-bottom: 1px solid #000000; font-weight: bold; font-size: 10pt;">
<table>
<tr>
<td style="font-size: 25px; font-weight: bold">Raport wartościowy</td>
</tr>
<tr>
<td style="font-size: 12px; font-weight: bold">SAAS-SYSTEMS</td>
</tr>
<tr>
<td style="font-size: 12px; font-weight: bold">Data wygenerowania: {$current_date_formatted}</td>
</tr>
<tr>
<td style="font-size: 12px; font-weight: bold">Rejestr od {$date_from_formatted} do {$date_to_formatted}</td>
</tr>
</table>
</div>
{literal}
</htmlpageheader>
<htmlpagefooter name="MyFooter1">
<table width="100%" style="vertical-align: bottom; font-family: serif; font-size: 8pt;
color: #000000; font-weight: bold; font-style: italic;"><tr>
<td width="33%"><span style="font-weight: bold; font-style: italic;">{DATE j.m.Y}</span></td>
<td width="33%" align="center" style="font-weight: bold; font-style: italic;">{PAGENO}/{nbpg}</td>
<td width="33%" style="text-align: right; ">Raport wartościowy</td>
</tr></table>
</htmlpagefooter>
<htmlpagefooter name="MyFooter2">
<table width="100%" style="vertical-align: bottom; font-family: serif; font-size: 8pt;
color: #000000; font-weight: bold; font-style: italic;"><tr>
<td width="33%"><span style="font-weight: bold; font-style: italic;">SAAS-SYSTEMS</span></td>
<td width="33%" align="center" style="font-weight: bold; font-style: italic;">{PAGENO}/{nbpg}</td>
<td width="33%" style="text-align: right; ">{DATE j-m-Y}</td>
</tr></table>
</htmlpagefooter>
{/literal}
<div>
<h1> {$MOD.LBL_SUBPANEL_TITLE} </h1>
{* Table headers *}
<table id="myTable" class="tablesorter-blue">
<thead>
<tr>
<th style="border-left: 1px solid black; border-top: 1px solid black;">{$MOD.LBL_CONTRACTOR}</th>
<th style="border-top: 1px solid black;">{$MOD.LBL_INVOICE_NUMBER}</th>
<th style="border-top: 1px solid black;">{$MOD.LBL_TYPE}</th>
<th style="border-top: 1px solid black;">{$MOD.LBL_DOCUMENT_DATE}</th>
<th style="border-top: 1px solid black;">{$MOD.LBL_PDF_TYPE}</th>
<th style="border-top: 1px solid black;">{$MOD.LBL_NET_VALUE}</th>
<th class="sorter-saas" style="border-top: 1px solid black;">{$MOD.LBL_GROSS_VALUE}</th>
<th class="nettoValue sorter-saas" style="border-top: 1px solid black;">{$MOD.LBL_COST}</th>
<th class="sorter-saas" style="border-top: 1px solid black; border-right: 1px solid black;">{$MOD.LBL_MARGIN}</th>
</tr>
</thead>
<tfoot>
<tr>
<th colspan="5"></th>
<th>{$SUM.netto|number_format:2:",":"." }</th>
<th>{$SUM.brutto|number_format:2:",":"." }</th>
<th>{$SUM.cost|number_format:2:",":"." }</th>
<th>{$SUM.margin|number_format:2:",":"." }</th>
</tr>
</tfoot>
<tbody aria-live="polite" aria-relevant="all">
{foreach from=$DATA item=ROW name=loop}
<tr>
<td style="text-align:left;">{$ROW.account.name}</td>
<td style="text-align:right;">{$ROW.document_no}</td>
<td style="text-align:right;">{$ROW.showType}</td>
<td style="text-align:right;">{$ROW.register_date|date_format:"%d.%m.%Y"}</td>
<td style="text-align:right;">{if $ROW.pdf_type == 'U'}
{$MOD.LBL_PDF_TYPE_U}
{/if}
{if $ROW.pdf_type == 'K'}
{$MOD.LBL_PDF_TYPE_K}
{/if}
{if $ROW.pdf_type == 'E'}
{$MOD.LBL_PDF_TYPE_E}
{/if}
</td>
<td class="gs" style="text-align:right;">{$ROW.total_netto|number_format:2:",":"." }</td>
<td style="text-align:right;">{$ROW.total_brutto|number_format:2:",":"." }</td>
<td class="gc" style="text-align:right;">{$ROW.purchase_price|number_format:2:",":"." }</td>
<td style="text-align:right;">{$ROW.margin|number_format:2:",":"." } ({$ROW.marginInPercent|number_format:2:",":"."}%)</td>
{/foreach}
</tr>
</tbody>
</table>

View File

@@ -0,0 +1,370 @@
<style type="text/css">
{literal}
body {
font-size: 8px;
}
/* overall */
.tablesorter-blue {
width: 100%;
background-color: #fff;
margin: 10px 0 15px;
text-align: left;
border-spacing: 0;
border: #fff 1px solid;
border-width: 1px 0 0 1px;
}
.tablesorter-blue th,
.tablesorter-blue td {
border: #fff 1px solid;
border-width: 0 1px 1px 0;
}
/* header */
.tablesorter-blue th,
.tablesorter-blue thead td {
font: bold 10px/18px Arial, Sans-serif;
color: #fff;
background-color: #252525;
border-collapse: collapse;
padding: 4px;
border-top: 2px solid #ABC3D7;
}
.tablesorter-blue tbody td,
.tablesorter-blue tfoot th,
.tablesorter-blue tfoot td {
padding: 4px;
vertical-align: top;
}
.tablesorter-blue .header,
.tablesorter-blue .tablesorter-header {
/* black (unsorted) double arrow */
background-image: url(data:image/gif;base64,R0lGODlhFQAJAIAAACMtMP///yH5BAEAAAEALAAAAAAVAAkAAAIXjI+AywnaYnhUMoqt3gZXPmVg94yJVQAAOw==);
/* white (unsorted) double arrow */
/* background-image: url(data:image/gif;base64,R0lGODlhFQAJAIAAAP///////yH5BAEAAAEALAAAAAAVAAkAAAIXjI+AywnaYnhUMoqt3gZXPmVg94yJVQAAOw==); */
/* image */
/* background-image: url(images/black-unsorted.gif); */
background-repeat: no-repeat;
background-position: center right;
padding: 3px 18px 3px 3px;
white-space: normal;
cursor: pointer;
}
.tablesorter-blue .headerSortUp,
.tablesorter-blue .tablesorter-headerSortUp,
.tablesorter-blue .tablesorter-headerAsc {
background-color: #E7E7E9;
/* black asc arrow */
background-image: url(data:image/gif;base64,R0lGODlhFQAEAIAAACMtMP///yH5BAEAAAEALAAAAAAVAAQAAAINjI8Bya2wnINUMopZAQA7);
/* white asc arrow */
/* background-image: url(data:image/gif;base64,R0lGODlhFQAEAIAAAP///////yH5BAEAAAEALAAAAAAVAAQAAAINjI8Bya2wnINUMopZAQA7); */
/* image */
/* background-image: url(images/black-asc.gif); */
}
.tablesorter-blue .headerSortDown,
.tablesorter-blue .tablesorter-headerSortDown,
.tablesorter-blue .tablesorter-headerDesc {
background-color: #E7E7E9;
/* black desc arrow */
background-image: url(data:image/gif;base64,R0lGODlhFQAEAIAAACMtMP///yH5BAEAAAEALAAAAAAVAAQAAAINjB+gC+jP2ptn0WskLQA7);
/* white desc arrow */
/* background-image: url(data:image/gif;base64,R0lGODlhFQAEAIAAAP///////yH5BAEAAAEALAAAAAAVAAQAAAINjB+gC+jP2ptn0WskLQA7); */
/* image */
/* background-image: url(images/black-desc.gif); */
}
.tablesorter-blue thead .sorter-false {
background-image: none;
padding: 4px;
}
/* tfoot */
.tablesorter-blue tfoot .tablesorter-headerSortUp,
.tablesorter-blue tfoot .tablesorter-headerSortDown,
.tablesorter-blue tfoot .tablesorter-headerAsc,
.tablesorter-blue tfoot .tablesorter-headerDesc {
/* remove sort arrows from footer */
background-image: none;
}
/* tbody */
.tablesorter-blue td {
color: #3d3d3d;
background-color: #fff;
padding: 0px;
vertical-align: top;
}
/* hovered row colors
you'll need to add additional lines for
rows with more than 2 child rows
*/
.tablesorter-blue tbody > tr:hover > td,
.tablesorter-blue tbody > tr:hover + tr.tablesorter-childRow > td,
.tablesorter-blue tbody > tr:hover + tr.tablesorter-childRow + tr.tablesorter-childRow > td,
.tablesorter-blue tbody > tr.even:hover > td,
.tablesorter-blue tbody > tr.even:hover + tr.tablesorter-childRow > td,
.tablesorter-blue tbody > tr.even:hover + tr.tablesorter-childRow + tr.tablesorter-childRow > td {
background: #d9d9d9;
}
.tablesorter-blue tbody > tr.odd:hover > td,
.tablesorter-blue tbody > tr.odd:hover + tr.tablesorter-childRow > td,
.tablesorter-blue tbody > tr.odd:hover + tr.tablesorter-childRow + tr.tablesorter-childRow > td {
background: #bfbfbf;
}
/* table processing indicator */
.tablesorter-blue .tablesorter-processing {
background-position: center center !important;
background-repeat: no-repeat !important;
/* background-image: url(../addons/pager/icons/loading.gif) !important; */
background-image: url('data:image/gif;base64,R0lGODlhFAAUAKEAAO7u7lpaWgAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh+QQBCgACACwAAAAAFAAUAAACQZRvoIDtu1wLQUAlqKTVxqwhXIiBnDg6Y4eyx4lKW5XK7wrLeK3vbq8J2W4T4e1nMhpWrZCTt3xKZ8kgsggdJmUFACH5BAEKAAIALAcAAAALAAcAAAIUVB6ii7jajgCAuUmtovxtXnmdUAAAIfkEAQoAAgAsDQACAAcACwAAAhRUIpmHy/3gUVQAQO9NetuugCFWAAAh+QQBCgACACwNAAcABwALAAACE5QVcZjKbVo6ck2AF95m5/6BSwEAIfkEAQoAAgAsBwANAAsABwAAAhOUH3kr6QaAcSrGWe1VQl+mMUIBACH5BAEKAAIALAIADQALAAcAAAIUlICmh7ncTAgqijkruDiv7n2YUAAAIfkEAQoAAgAsAAAHAAcACwAAAhQUIGmHyedehIoqFXLKfPOAaZdWAAAh+QQFCgACACwAAAIABwALAAACFJQFcJiXb15zLYRl7cla8OtlGGgUADs=') !important;
}
/* Zebra Widget - row alternating colors */
.tablesorter-blue tbody tr.odd td {
background-color: #ebf2fa;
}
.tablesorter-blue tbody tr.even td {
background-color: #fff;
}
/* Column Widget - column sort colors */
.tablesorter-blue td.primary,
.tablesorter-blue tr.odd td.primary {
background-color: #99b3e6;
}
.tablesorter-blue tr.even td.primary {
background-color: #c2d1f0;
}
.tablesorter-blue td.secondary,
.tablesorter-blue tr.odd td.secondary {
background-color: #c2d1f0;
}
.tablesorter-blue tr.even td.secondary {
background-color: #d6e0f5;
}
.tablesorter-blue td.tertiary,
.tablesorter-blue tr.odd td.tertiary {
background-color: #d6e0f5;
}
.tablesorter-blue tr.even td.tertiary {
background-color: #ebf0fa;
}
/* caption */
caption {
background: #fff;
}
/* filter widget */
.tablesorter-blue .tablesorter-filter-row td {
background: #eee;
line-height: normal;
text-align: center; /* center the input */
-webkit-transition: line-height 0.1s ease;
-moz-transition: line-height 0.1s ease;
-o-transition: line-height 0.1s ease;
transition: line-height 0.1s ease;
}
/* optional disabled input styling */
.tablesorter-blue .tablesorter-filter-row .disabled {
opacity: 0.5;
filter: alpha(opacity=50);
cursor: not-allowed;
}
/* hidden filter row */
.tablesorter-blue .tablesorter-filter-row.hideme td {
/*** *********************************************** ***/
/*** change this padding to modify the thickness ***/
/*** of the closed filter row (height = padding x 2) ***/
padding: 2px;
/*** *********************************************** ***/
margin: 0;
line-height: 0;
cursor: pointer;
}
.tablesorter-blue .tablesorter-filter-row.hideme .tablesorter-filter {
height: 1px;
min-height: 0;
border: 0;
padding: 0;
margin: 0;
/* don't use visibility: hidden because it disables tabbing */
opacity: 0;
filter: alpha(opacity=0);
}
/* filters */
.tablesorter-blue .tablesorter-filter {
width: 98%;
height: auto;
margin: 0;
padding: 4px;
background-color: #fff;
border: 1px solid #bbb;
color: #333;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
-webkit-transition: height 0.1s ease;
-moz-transition: height 0.1s ease;
-o-transition: height 0.1s ease;
transition: height 0.1s ease;
}
/* ajax error row */
.tablesorter .tablesorter-errorRow td {
cursor: pointer;
background-color: #e6bf99;
}
#myTable tbody tr td.subcategory {
padding-left: 30px;
}
#myTable tbody tr td.product {
padding-left: 55px;
}
#myTable tbody tr.category td {
background-color: #96FF7C;
}
#myTable tbody tr.sumAll td{
background-color: #242424;
color: #fff;
}
#myTable tbody tr td.sumRow {
text-align: right;
}
#myTable tbody tr td.oddListRowS1 {
text-align: right;
}
#myTable tbody tr td.alignLeft {
text-align: left;
}
{/literal}
</style>
<br>
<table style="font-size: 10px;">
<tr>
<td>
Wybrany produkt:
</td>
<td>
{$product_name}
</td>
</tr>
<tr>
<td>
Indeks:
</td>
<td>
{$product_indeks}
</td>
</tr>
<tr>
<td>
Stan początkowy (ilość):
</td>
<td style="text-align: right;">
{$start_quantity} {$product_unit}
</td>
</tr>
<tr>
<td>
Stan początkowy (wartość):
</td>
<td style="text-align: right;">
{$start_value|number_format:2:",":"."} zł
</td>
</tr>
</table>
<table id="myTable" >
<thead>
<tr class="tablesorter-headerRow" role="row">
<td width="8%" style="border: 1px solid black;text-align:center">L.p.</td>
<td width="8%" style="border: 1px solid black;text-align:center">Data</td>
<td width="15%" style="border: 1px solid black;text-align:center">Dokument</td>
<td width="8%" style="border: 1px solid black;text-align:center" >Kontrahent</td>
<td width="8%" style="border: 1px solid black;text-align:center">Przychód</td>
<td width="8%" style="border: 1px solid black;text-align:center" >Rozchód</td>
<td width="8%" style="border: 1px solid black;text-align:center">Stan po obr.</td>
</tr>
</thead>
<tbody id="functions-core" class="tablesorter-infoOnly">
{foreach from=$DATA key="key" item="item" name=loop}
<tr style="border-bottom:1pt solid black;">
<td class="oddListRowS1 alignLeft" style="border-bottom:1pt solid black;">{$item.lp}</td>
<td class="oddListRowS1 alignLeft" style="border-bottom:1pt solid black;">{$item.date_entered|date_format:"%d.%m.%Y"} </td>
<td class="oddListRowS1" style="text-align:left;" rowspan="{$currow}" style="border-bottom:1pt solid black;text-align:left;">{$item.doc_code} {$item.doc_name}</td>
<td class="oddListRowS1 sumRow" style="border-bottom:1pt solid black;text-align:left;">{$item.doc_parent_name}</td>
<td class="oddListRowS1 sumRow" style="border-bottom:1pt solid black;text-align:right;">
{if $item.type==0}
{if $item.correct=='correct'}
0 {$product_unit}<br>0,00 zł
{else}
{$item.quantity|number_format:$item.unit_precision:",":"."} {$product_unit}<br>{$item.value|number_format:2:",":"."} zł
{/if}
{else}
0 {$product_unit}<br>0,00 zł
{/if}</td>
</td>
<td class="oddListRowS1 sumRow" style="border-bottom:1pt solid black;text-align:right;">
{if $item.type==1}
{$item.quantity|number_format:$item.unit_precision:",":"."} {$product_unit}<br>{$item.value|number_format:2:",":"."} zł
{else}
{if $item.correct=='correct'}
{$item.quantity|number_format:$item.unit_precision:",":"."} {$product_unit}<br>{$item.value|number_format:2:",":"."}
{else}
0 {$product_unit}<br>0,00 zł
{/if}
{/if}
</td>
<td class="oddListRowS1 sumRow" style="border-bottom:1pt solid black;text-align:right;">{$item.after_quantity|number_format:2:",":"."} {$product_unit}<br>{$item.after_value|number_format:2:",":"."} zł</td>
</tr>
{/foreach}
</tbody>
<tr height="20" class="evenListRowS1">
<td width="1%" class="nowrap">
</td>
<td valign="top" align="left" scope="row">
</td>
<td valign="top" align="left" scope="row">
</td>
<td valign="top" align="right" scope="row">
Razem:
</td>
<td valign="top" align="right" scope="row">
{$sumTable.in_quantity|number_format:2:",":"."} {$product_unit}<br>{$sumTable.in_value|number_format:2:",":"."}
</td>
<td valign="top" align="right" scope="row">
{$sumTable.out_quantity|number_format:2:",":"."} {$product_unit}<br>{$sumTable.out_value|number_format:2:",":"."}
</td>
<td valign="top" align="right" scope="row">
{$sumTable.after_quantity|number_format:2:",":"."} {$product_unit}<br>{$sumTable.after_value|number_format:2:",":"."}
</td>
</tr>
</table>
<br/>

View File

@@ -0,0 +1,408 @@
{literal}
<html>
<head>
<style>
@page {
size: auto;
odd-header-name: html_MyHeader1;
odd-footer-name: html_MyFooter1;
}
@page chapter2 {
odd-header-name: html_MyHeader2;
odd-footer-name: html_MyFooter2;
}
@page noheader {
odd-header-name: _blank;
odd-footer-name: _blank;
}
div.chapter2 {
page-break-before: always;
page: chapter2;
}
div.noheader {
page-break-before: always;
page: noheader;
}
#newpage
{
padding-top: 80px;
}
body {
font-size: 10px;
}
/* overall */
.tablesorter-blue {
width: 100%;
background-color: #fff;
margin: 100px 0 15px;
text-align: left;
border-spacing: 0;
border: #fff 1px solid;
border-width: 1px 0 0 1px;
}
.tablesorter-blue th,
.tablesorter-blue td {
border: #fff 1px solid;
border-width: 0 1px 1px 0;
border-bottom: 1px solid black;
}
/* header */
.tablesorter-blue th,
.tablesorter-blue thead td {
font: bold 10px/18px Arial, Sans-serif;
color: #000;
background-color: #fff;
padding: 4px;
border-top: 2px solid red;
}
.tablesorter-blue tbody td,
.tablesorter-blue tfoot th,
.tablesorter-blue tfoot td {
padding: 4px;
vertical-align: top;
}
.tablesorter-blue .header,
.tablesorter-blue .tablesorter-header {
/* black (unsorted) double arrow */
background-image: url(data:image/gif;base64,R0lGODlhFQAJAIAAACMtMP///yH5BAEAAAEALAAAAAAVAAkAAAIXjI+AywnaYnhUMoqt3gZXPmVg94yJVQAAOw==);
/* white (unsorted) double arrow */
/* background-image: url(data:image/gif;base64,R0lGODlhFQAJAIAAAP///////yH5BAEAAAEALAAAAAAVAAkAAAIXjI+AywnaYnhUMoqt3gZXPmVg94yJVQAAOw==); */
/* image */
/* background-image: url(images/black-unsorted.gif); */
background-repeat: no-repeat;
background-position: center right;
padding: 3px 18px 3px 3px;
white-space: normal;
cursor: pointer;
}
.tablesorter-blue .headerSortUp,
.tablesorter-blue .tablesorter-headerSortUp,
.tablesorter-blue .tablesorter-headerAsc {
background-color: #E7E7E9;
/* black asc arrow */
background-image: url(data:image/gif;base64,R0lGODlhFQAEAIAAACMtMP///yH5BAEAAAEALAAAAAAVAAQAAAINjI8Bya2wnINUMopZAQA7);
/* white asc arrow */
/* background-image: url(data:image/gif;base64,R0lGODlhFQAEAIAAAP///////yH5BAEAAAEALAAAAAAVAAQAAAINjI8Bya2wnINUMopZAQA7); */
/* image */
/* background-image: url(images/black-asc.gif); */
}
.tablesorter-blue .headerSortDown,
.tablesorter-blue .tablesorter-headerSortDown,
.tablesorter-blue .tablesorter-headerDesc {
background-color: #E7E7E9;
/* black desc arrow */
background-image: url(data:image/gif;base64,R0lGODlhFQAEAIAAACMtMP///yH5BAEAAAEALAAAAAAVAAQAAAINjB+gC+jP2ptn0WskLQA7);
/* white desc arrow */
/* background-image: url(data:image/gif;base64,R0lGODlhFQAEAIAAAP///////yH5BAEAAAEALAAAAAAVAAQAAAINjB+gC+jP2ptn0WskLQA7); */
/* image */
/* background-image: url(images/black-desc.gif); */
}
.tablesorter-blue thead .sorter-false {
background-image: none;
padding: 4px;
}
/* tfoot */
.tablesorter-blue tfoot .tablesorter-headerSortUp,
.tablesorter-blue tfoot .tablesorter-headerSortDown,
.tablesorter-blue tfoot .tablesorter-headerAsc,
.tablesorter-blue tfoot .tablesorter-headerDesc {
/* remove sort arrows from footer */
background-image: none;
}
/* tbody */
.tablesorter-blue td {
color: #3d3d3d;
background-color: #fff;
padding: 0px;
vertical-align: top;
}
/* hovered row colors
you'll need to add additional lines for
rows with more than 2 child rows
*/
.tablesorter-blue tbody > tr:hover > td,
.tablesorter-blue tbody > tr:hover + tr.tablesorter-childRow > td,
.tablesorter-blue tbody > tr:hover + tr.tablesorter-childRow + tr.tablesorter-childRow > td,
.tablesorter-blue tbody > tr.even:hover > td,
.tablesorter-blue tbody > tr.even:hover + tr.tablesorter-childRow > td,
.tablesorter-blue tbody > tr.even:hover + tr.tablesorter-childRow + tr.tablesorter-childRow > td {
background: #d9d9d9;
}
.tablesorter-blue tbody > tr.odd:hover > td,
.tablesorter-blue tbody > tr.odd:hover + tr.tablesorter-childRow > td,
.tablesorter-blue tbody > tr.odd:hover + tr.tablesorter-childRow + tr.tablesorter-childRow > td {
background: #bfbfbf;
}
/* Zebra Widget - row alternating colors */
.tablesorter-blue tbody tr.odd td {
background-color: #ebf2fa;
}
.tablesorter-blue tbody tr.even td {
background-color: #fff;
}
/* Column Widget - column sort colors */
.tablesorter-blue td.primary,
.tablesorter-blue tr.odd td.primary {
background-color: #99b3e6;
}
.tablesorter-blue tr.even td.primary {
background-color: #c2d1f0;
}
.tablesorter-blue td.secondary,
.tablesorter-blue tr.odd td.secondary {
background-color: #c2d1f0;
}
.tablesorter-blue tr.even td.secondary {
background-color: #d6e0f5;
}
.tablesorter-blue td.tertiary,
.tablesorter-blue tr.odd td.tertiary {
background-color: #d6e0f5;
}
.tablesorter-blue tr.even td.tertiary {
background-color: #ebf0fa;
}
/* caption */
caption {
background: #fff;
}
/* filter widget */
.tablesorter-blue .tablesorter-filter-row td {
background: #eee;
line-height: normal;
text-align: center; /* center the input */
-webkit-transition: line-height 0.1s ease;
-moz-transition: line-height 0.1s ease;
-o-transition: line-height 0.1s ease;
transition: line-height 0.1s ease;
}
/* optional disabled input styling */
.tablesorter-blue .tablesorter-filter-row .disabled {
opacity: 0.5;
filter: alpha(opacity=50);
cursor: not-allowed;
}
/* hidden filter row */
.tablesorter-blue .tablesorter-filter-row.hideme td {
/*** *********************************************** ***/
/*** change this padding to modify the thickness ***/
/*** of the closed filter row (height = padding x 2) ***/
padding: 2px;
/*** *********************************************** ***/
margin: 0;
line-height: 0;
cursor: pointer;
}
.tablesorter-blue .tablesorter-filter-row.hideme .tablesorter-filter {
height: 1px;
min-height: 0;
border: 0;
padding: 0;
margin: 0;
/* don't use visibility: hidden because it disables tabbing */
opacity: 0;
filter: alpha(opacity=0);
}
/* filters */
.tablesorter-blue .tablesorter-filter {
width: 98%;
height: auto;
margin: 0;
padding: 4px;
background-color: #fff;
border: 1px solid #bbb;
color: #333;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
-webkit-transition: height 0.1s ease;
-moz-transition: height 0.1s ease;
-o-transition: height 0.1s ease;
transition: height 0.1s ease;
}
/* ajax error row */
.tablesorter .tablesorter-errorRow td {
cursor: pointer;
background-color: #e6bf99;
}
#table tfoot th {
text-align: right;
}
</style>
</head>
<body>
<htmlpageheader name="MyHeader1">
{/literal}
<div style="text-align: left; border-bottom: 1px solid #000000; font-weight: bold; font-size: 7pt;">
<table>
<tr>
<td style="font-size: 25px; font-weight: bold">{$MOD.LBL_REPORT_RECEIVE_REGISTER}</td>
</tr>
<tr>
<td style="font-size: 12px; font-weight: bold">{$EcmSysInfo->getName()}</td>
</tr>
<tr>
<td style="font-size: 12px; font-weight: bold">Data wygenerowania: {$current_date_formatted}</td>
</tr>
<tr>
<td style="font-size: 12px; font-weight: bold">Rejestr od: {$date_from} do: {$date_to}</td>
</tr>
</table>
</div>
{literal}
</htmlpageheader>
<htmlpagefooter name="MyFooter1">
<table width="100%" style="vertical-align: bottom; font-family: serif; font-size: 8pt;
color: #000000; font-weight: bold; font-style: italic;"><tr>
<td width="33%"><span style="font-weight: bold; font-style: italic;">{DATE j.m.Y}</span></td>
<td width="33%" align="center" style="font-weight: bold; font-style: italic;">{PAGENO}/{nbpg}</td>
<td width="33%" style="text-align: right; ">Rejestr zakupu</td>
</tr></table>
</htmlpagefooter>
<htmlpagefooter name="MyFooter2">
<table width="100%" style="vertical-align: bottom; font-family: serif; font-size: 8pt;
color: #000000; font-weight: bold; font-style: italic;"><tr>
<td width="33%"><span style="font-weight: bold; font-style: italic;">SAAS-SYSTEMS</span></td>
<td width="33%" align="center" style="font-weight: bold; font-style: italic;">{PAGENO}/{nbpg}</td>
<td width="33%" style="text-align: right; ">{DATE j-m-Y}</td>
</tr></table>
</htmlpagefooter>
{/literal}
<div>
{foreach from=$dataPart key=klucz item=data name=data}
<table id="myTable" class="tablesorter-blue">
<thead>
<tr>
<th style="border-left: 1px solid black; border-top: 1px solid black; font-weight: bold; font-size: 7pt;">Lp</th>
<th style="border-left: 1px solid black; border-top: 1px solid black; font-weight: bold; font-size: 7pt;">{$MOD.LBL_DOC_NUMBER}</th>
<th style="border-left: 1px solid black; border-top: 1px solid black; font-weight: bold; font-size: 7pt;">{$MOD.LBL_CREATE_LAB}</th>
<th style="border-left: 1px solid black; border-top: 1px solid black; font-weight: bold; font-size: 7pt;">{$MOD.LBL_SALE_DATE}</th>
<th style="border-left: 1px solid black; border-top: 1px solid black; font-weight: bold; font-size: 7pt;">{$MOD.LBL_SALES_NIP}</th>
<th style="border-left: 1px solid black; border-top: 1px solid black; font-weight: bold; font-size: 7pt;">{$MOD.LBL_LIST_SUBJECT}</th>
<th style="border-left: 1px solid black; border-top: 1px solid black; font-weight: bold; font-size: 7pt;">{$MOD.LBL_BUYER_VALUE_BRUTTO}</th>
{foreach from= $vat_value key= t item= w}
<th style="border-left: 1px solid black; border-top: 1px solid black; font-weight: bold; font-size: 7pt;">{$MOD.LBL_BUYER_VALUE_NETTO} {$t}</th>
{if $w.sumavat != NULL}
<th style="border-left: 1px solid black; border-top: 1px solid black; font-weight: bold; font-size: 7pt;">{$MOD.LBL_VAT} {$t}</th>
{/if}
{/foreach}
<th style="border-left: 1px solid black; border-top: 1px solid black; font-weight: bold; font-size: 7pt; ">{$MOD.LBL_SUM_VAT}</th>
</tr>
</thead>
<tbody>
{foreach from= $data key= k item= i}
<tr>
<td>{$k}</td>
<td> {$i.document_number}</td>
<td>{$i.document_date|date_format:"%d.%m.%Y"}</td>
<td>{$i.register_date|date_format:"%d.%m.%Y"}</td>
<td>{$i.to_vatid}</td>
<td>{$i.name}</td>
<td style = "text-align: right">{$i.value|number_format:2:",":"."}</td>
{foreach from=$vat_value key=o item=j}
{assign var=prawdafalsz value=false}
{foreach from=$i.vaty item = e}
{if $o == $e.vat_value}
{assign var=prawdafalsz value=true}
{assign var=prawdafalszvat value=$e.vat}
{assign var=prawdafalsznetto value=$e.netto}
{/if}
{/foreach}
{if $prawdafalsz == true }
<td style = "text-align: right">{$prawdafalsznetto|number_format:2:",":"."}</td>
{if $j.sumavat != NULL}
<td style = "text-align: right">{$prawdafalszvat|number_format:2:",":"."}</td>
{/if}
{else}
<td style = "text-align: right">0,00</td>
{if $j.sumavat != NULL}
<td style = "text-align: right">0,00</td>
{/if}
{/if}
{/foreach}
<td style = "text-align: right">{$i.vatsumapozycja|number_format:2:",":"."}</td>
</tr>
{/foreach}
</tbody>
<tfoot>
<tr>
<td style="text-align: right; font-weight: bold; font-size: 7pt;" colspan="6">{$MOD.LBL_PAGE_SUM}</td>
<td style="text-align: right; font-weight: bold; font-size: 7pt;">{$pageBruttoVat[$klucz].brutto|number_format:2:",":"."}</td>
{foreach from=$pageVatSum[$klucz] key =vatName item=vatValue}
<td style="text-align: right; font-weight: bold; font-size: 7pt;">{$vatValue.netto|number_format:2:",":"."}</td>
{if $vatValue.vat != 'null' || $vatValue.vat=='0'}
<td style="text-align: right; font-weight: bold; font-size: 7pt;">{$vatValue.vat|number_format:2:",":"."}</td>
{/if}
{/foreach}
<td style="text-align: right; font-weight: bold; font-size: 7pt; ">{$pageBruttoVat[$klucz].vat|number_format:2:",":"."}</td>
</tr>
<tr>
<td style="text-align: right; font-weight: bold; font-size: 7pt;" colspan="6">{$MOD.LBL_TRANSFER_SUM}</td>
<td style="text-align: right; font-weight: bold; font-size: 7pt;">{$partialBruttoVat[$klucz].brutto-$pageBruttoVat[$klucz].brutto|number_format:2:",":"."}</td>
{if $klucz>0}
{assign var='dupa' value=$klucz-1}
{foreach from=$partialVatSum[$dupa] key =vatName item=vatValue}
<td style="text-align: right; font-weight: bold; font-size: 7pt;">{$vatValue.netto|number_format:2:",":"."}</td>
{if $vatValue.vat != 'null' || $vatValue.vat=='0'}
<td style="text-align: right; font-weight: bold; font-size: 7pt;">{$vatValue.vat|number_format:2:",":"."}</td>
{/if}
{/foreach}
{else}
{foreach from=$partialVatSum[$klucz] key =vatName item=vatValue}
<td style="text-align: right; font-weight: bold; font-size: 7pt;">0,00</td>
{if $vatValue.vat != 'null' || $vatValue.vat=='0'}
<td style="text-align: right; font-weight: bold; font-size: 7pt;">0,00</td>
{/if}
{/foreach}
{/if}
<td style="text-align: right; font-weight: bold; font-size: 7pt; ">{$partialBruttoVat[$klucz].vat-$pageBruttoVat[$klucz].vat|number_format:2:",":"."}</td>
</tr>
<tr>
<td style="text-align: right; font-weight: bold; font-size: 7pt;" colspan="6">{$MOD.LBL_VALUE}</td>
<td style="text-align: right; font-weight: bold; font-size: 7pt;">{$partialBruttoVat[$klucz].brutto|number_format:2:",":"."}</td>
{foreach from=$partialVatSum[$klucz] key =vatName item=vatValue}
<td style="text-align: right; font-weight: bold; font-size: 7pt;">{$vatValue.netto|number_format:2:",":"."}</td>
{if $vatValue.vat != 'null' || $vatValue.vat=='0'}
<td style="text-align: right; font-weight: bold; font-size: 7pt;">{$vatValue.vat|number_format:2:",":"."}</td>
{/if}
{/foreach}
<td style="text-align: right; font-weight: bold; font-size: 7pt; ">{$partialBruttoVat[$klucz].vat|number_format:2:",":"."}</td>
</tr>
</tfoot>
</table>
{if !$smarty.foreach.data.last}
<newpage>
{/if}
{/foreach}
</div>
</body>
</html>

View File

@@ -0,0 +1,46 @@
<link class="theme" rel="stylesheet" href="modules/EcmReports/tpls/PDF/css/style.css">
<h1>{$MOD.LBL_REPORT} {$MOD.LBL_REPORT_ECMWORKCARDS}</h1>
<table id="myTable" class="tablesorter tablesorter-blue" role="grid">
<thead>
<tr class="tablesorter-headerRow" role="row">
<th width="15%" style = "border-bottom: 1px solid black;text-align: left">{$MOD.LBL_WORKER_NAME}</th>
<th width="7%" style = "border-bottom: 1px solid black;text-align: left">{$MOD.LBL_ACTION_CODE}</th>
<th width="30%" style = "border-bottom: 1px solid black;text-align: left">{$MOD.LBL_ACTION}</th>
<th width="5%" style = "border-bottom: 1px solid black;text-align: left">{$MOD.LBL_QUANTITY}</th>
<th width="7%" style = "border-bottom: 1px solid black;text-align: left">{$MOD.LBL_PRODUCT_CODE}</th>
<th width="40%" style = "border-bottom: 1px solid black;text-align: left">{$MOD.LBL_PRODUCTS}</th>
<th width="10%" style = "border-bottom: 1px solid black;text-align: right">{$MOD.LBL_SUM_NETTO}</th>
<th width="10%" style = "border-bottom: 1px solid black;text-align: right">{$MOD.LBL_SUM_BRUTTO}</th>
</tr>
</thead>
<tbody>
{foreach from=$data item=rekord key=kl}
<tr id="parent_{$kl}" class="{$rekord.class}">
<td style = "border-top: 1px solid black;border-left: 1px solid black;">{$rekord.work_name}</td>
<td colspan="5" style = "border-top: 1px solid black;"></td>
<td style = "border-top: 1px solid black;text-align: right">{$rekord.netto}</td>
<td style = "border-top: 1px solid black;border-right: 1px solid black;text-align: right">{$rekord.brutto}</td>
</tr>
{foreach from=$rekord.actions item=czynnosc}
<tr style="background-color: #e6e6e6;">
<td style = "border-left: 1px solid black;text-align: left"></td>
<td style = "text-align: left">{$czynnosc.actioncode}</td>
<td style = "text-align: left">{$czynnosc.actionname}</td>
<td style = "text-align: right">{$czynnosc.quantity}</td>
<td style = "text-align: left">{$czynnosc.productcode}</td>
<td style = "text-align: left">{$czynnosc.productname}</td>
<td style = "text-align: right">{$czynnosc.netto}</td>
<td style = "border-right: 1px solid black;text-align: right">{$czynnosc.brutto}</td>
</tr>
{/foreach}
{/foreach}
</tbody>
<tfoot>
<tr>
<th style="text-align: left;">{$MOD.LBL_SUM}</th>
<th colspan="5"></th>
<th style="text-align: right">{$suma.netto}</th>
<th style="text-align: right">{$suma.brutto}</th>
</tr>
</tfoot>
</table>

View File

@@ -0,0 +1,49 @@
<link class="theme" rel="stylesheet" href="modules/EcmReports/tpls/PDF/css/style.css">
<h1>{$MOD.LBL_REPORT} {$MOD.LBL_REPORT_ECMWORKCARDS_PRODUCTS} </h1>
<table id="myTable" class="tablesorter tablesorter-blue" role="grid">
<thead>
<tr class="tablesorter-headerRow" role="row">
<th width="40%" style = "border-bottom: 1px solid black;text-align: left">{$MOD.LBL_PRODUCTS}</th>
<th width="15%" style = "border-bottom: 1px solid black;text-align: left">{$MOD.LBL_WORKER_NAME}</th>
<th width="7%" style = "border-bottom: 1px solid black;text-align: left">{$MOD.LBL_ACTION_CODE}</th>
<th width="30%" style = "border-bottom: 1px solid black;text-align: left">{$MOD.LBL_ACTION}</th>
<th width="5%" style = "border-bottom: 1px solid black;text-align: left">{$MOD.LBL_QUANTITY}</th>
<th width="5%" style = "border-bottom: 1px solid black;text-align: left">{$MOD.LBL_PW_QUANTITY}</th>
<th width="11%" style = "border-bottom: 1px solid black;text-align: right">{$MOD.LBL_SUM_NETTO}</th>
<th width="11%" style = "border-bottom: 1px solid black;text-align: right">{$MOD.LBL_SUM_BRUTTO}</th>
</tr>
</thead>
<tbody>
{foreach from=$data item=rekord key=kl}
<tr id="parent_{$rekord.indeks}">
<td style = "border-top: 1px solid black;border-left: 1px solid black;">{$rekord.code} {$rekord.name}</td>
<td colspan="4" style = "border-top: 1px solid black;"></td>
<td style = "border-top: 1px solid black;text-align: right">{$rekord.pw}</td>
<td style = "border-top: 1px solid black;text-align: right">{$rekord.netto|number_format:2:",":"."}</td>
<td style = "border-top: 1px solid black;border-right: 1px solid black;text-align: right">{$rekord.brutto|number_format:2:",":"."}</td>
</tr>
{foreach from=$rekord.actions key=klucz item=pracownik}
{foreach from=$pracownik item=czynnosc}
<tr name="child_{$rekord.indeks}" style="background-color: #e6e6e6;" role="row">
<td style = "border-left: 1px solid black;text-align: left"></td>
<td style = "text-align: left">{$klucz}</td>
<td style = "text-align: left">{$czynnosc.actioncode}</td>
<td style = "text-align: left">{$czynnosc.actionname}</td>
<td style = "text-align: right">{$czynnosc.quantity}</td>
<td style = "text-align: right">{$rekord.pw}</td>
<td style = "text-align: right">{$czynnosc.netto|number_format:2:",":"."}</td>
<td style = "border-right: 1px solid black;text-align: right">{$czynnosc.brutto|number_format:2:",":"."}</td>
</tr>
{/foreach}
{/foreach}
{/foreach}
</tbody>
<tfoot>
<tr>
<th style="text-align: left;">{$MOD.LBL_SUM}</th>
<th colspan="5"></th>
<th style="text-align: right;">{$suma.netto|number_format:2:",":"."}</th>
<th style="text-align: right;">{$suma.brutto|number_format:2:",":"."}</th>
</tr>
</tfoot>
</table>

View File

@@ -0,0 +1,357 @@
<style type="text/css">
{literal}
body {
font-size: 8px;
}
/* overall */
.tablesorter-blue {
width: 100%;
background-color: #fff;
margin: 10px 0 15px;
text-align: left;
border-spacing: 0;
border: #fff 1px solid;
border-width: 1px 0 0 1px;
}
.tablesorter-blue th,
.tablesorter-blue td {
border: #fff 1px solid;
border-width: 0 1px 1px 0;
}
/* header */
.tablesorter-blue th,
.tablesorter-blue thead td {
font: bold 10px/18px Arial, Sans-serif;
color: #fff;
background-color: #252525;
border-collapse: collapse;
padding: 4px;
border-top: 2px solid #ABC3D7;
}
.tablesorter-blue tbody td,
.tablesorter-blue tfoot th,
.tablesorter-blue tfoot td {
padding: 4px;
vertical-align: top;
}
.tablesorter-blue .header,
.tablesorter-blue .tablesorter-header {
/* black (unsorted) double arrow */
background-image: url(data:image/gif;base64,R0lGODlhFQAJAIAAACMtMP///yH5BAEAAAEALAAAAAAVAAkAAAIXjI+AywnaYnhUMoqt3gZXPmVg94yJVQAAOw==);
/* white (unsorted) double arrow */
/* background-image: url(data:image/gif;base64,R0lGODlhFQAJAIAAAP///////yH5BAEAAAEALAAAAAAVAAkAAAIXjI+AywnaYnhUMoqt3gZXPmVg94yJVQAAOw==); */
/* image */
/* background-image: url(images/black-unsorted.gif); */
background-repeat: no-repeat;
background-position: center right;
padding: 3px 18px 3px 3px;
white-space: normal;
cursor: pointer;
}
.tablesorter-blue .headerSortUp,
.tablesorter-blue .tablesorter-headerSortUp,
.tablesorter-blue .tablesorter-headerAsc {
background-color: #E7E7E9;
/* black asc arrow */
background-image: url(data:image/gif;base64,R0lGODlhFQAEAIAAACMtMP///yH5BAEAAAEALAAAAAAVAAQAAAINjI8Bya2wnINUMopZAQA7);
/* white asc arrow */
/* background-image: url(data:image/gif;base64,R0lGODlhFQAEAIAAAP///////yH5BAEAAAEALAAAAAAVAAQAAAINjI8Bya2wnINUMopZAQA7); */
/* image */
/* background-image: url(images/black-asc.gif); */
}
.tablesorter-blue .headerSortDown,
.tablesorter-blue .tablesorter-headerSortDown,
.tablesorter-blue .tablesorter-headerDesc {
background-color: #E7E7E9;
/* black desc arrow */
background-image: url(data:image/gif;base64,R0lGODlhFQAEAIAAACMtMP///yH5BAEAAAEALAAAAAAVAAQAAAINjB+gC+jP2ptn0WskLQA7);
/* white desc arrow */
/* background-image: url(data:image/gif;base64,R0lGODlhFQAEAIAAAP///////yH5BAEAAAEALAAAAAAVAAQAAAINjB+gC+jP2ptn0WskLQA7); */
/* image */
/* background-image: url(images/black-desc.gif); */
}
.tablesorter-blue thead .sorter-false {
background-image: none;
padding: 4px;
}
/* tfoot */
.tablesorter-blue tfoot .tablesorter-headerSortUp,
.tablesorter-blue tfoot .tablesorter-headerSortDown,
.tablesorter-blue tfoot .tablesorter-headerAsc,
.tablesorter-blue tfoot .tablesorter-headerDesc {
/* remove sort arrows from footer */
background-image: none;
}
/* tbody */
.tablesorter-blue td {
color: #3d3d3d;
background-color: #fff;
padding: 0px;
vertical-align: top;
}
/* hovered row colors
you'll need to add additional lines for
rows with more than 2 child rows
*/
.tablesorter-blue tbody > tr:hover > td,
.tablesorter-blue tbody > tr:hover + tr.tablesorter-childRow > td,
.tablesorter-blue tbody > tr:hover + tr.tablesorter-childRow + tr.tablesorter-childRow > td,
.tablesorter-blue tbody > tr.even:hover > td,
.tablesorter-blue tbody > tr.even:hover + tr.tablesorter-childRow > td,
.tablesorter-blue tbody > tr.even:hover + tr.tablesorter-childRow + tr.tablesorter-childRow > td {
background: #d9d9d9;
}
.tablesorter-blue tbody > tr.odd:hover > td,
.tablesorter-blue tbody > tr.odd:hover + tr.tablesorter-childRow > td,
.tablesorter-blue tbody > tr.odd:hover + tr.tablesorter-childRow + tr.tablesorter-childRow > td {
background: #bfbfbf;
}
/* table processing indicator */
.tablesorter-blue .tablesorter-processing {
background-position: center center !important;
background-repeat: no-repeat !important;
/* background-image: url(../addons/pager/icons/loading.gif) !important; */
background-image: url('data:image/gif;base64,R0lGODlhFAAUAKEAAO7u7lpaWgAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh+QQBCgACACwAAAAAFAAUAAACQZRvoIDtu1wLQUAlqKTVxqwhXIiBnDg6Y4eyx4lKW5XK7wrLeK3vbq8J2W4T4e1nMhpWrZCTt3xKZ8kgsggdJmUFACH5BAEKAAIALAcAAAALAAcAAAIUVB6ii7jajgCAuUmtovxtXnmdUAAAIfkEAQoAAgAsDQACAAcACwAAAhRUIpmHy/3gUVQAQO9NetuugCFWAAAh+QQBCgACACwNAAcABwALAAACE5QVcZjKbVo6ck2AF95m5/6BSwEAIfkEAQoAAgAsBwANAAsABwAAAhOUH3kr6QaAcSrGWe1VQl+mMUIBACH5BAEKAAIALAIADQALAAcAAAIUlICmh7ncTAgqijkruDiv7n2YUAAAIfkEAQoAAgAsAAAHAAcACwAAAhQUIGmHyedehIoqFXLKfPOAaZdWAAAh+QQFCgACACwAAAIABwALAAACFJQFcJiXb15zLYRl7cla8OtlGGgUADs=') !important;
}
/* Zebra Widget - row alternating colors */
.tablesorter-blue tbody tr.odd td {
background-color: #ebf2fa;
}
.tablesorter-blue tbody tr.even td {
background-color: #fff;
}
/* Column Widget - column sort colors */
.tablesorter-blue td.primary,
.tablesorter-blue tr.odd td.primary {
background-color: #99b3e6;
}
.tablesorter-blue tr.even td.primary {
background-color: #c2d1f0;
}
.tablesorter-blue td.secondary,
.tablesorter-blue tr.odd td.secondary {
background-color: #c2d1f0;
}
.tablesorter-blue tr.even td.secondary {
background-color: #d6e0f5;
}
.tablesorter-blue td.tertiary,
.tablesorter-blue tr.odd td.tertiary {
background-color: #d6e0f5;
}
.tablesorter-blue tr.even td.tertiary {
background-color: #ebf0fa;
}
/* caption */
caption {
background: #fff;
}
/* filter widget */
.tablesorter-blue .tablesorter-filter-row td {
background: #eee;
line-height: normal;
text-align: center; /* center the input */
-webkit-transition: line-height 0.1s ease;
-moz-transition: line-height 0.1s ease;
-o-transition: line-height 0.1s ease;
transition: line-height 0.1s ease;
}
/* optional disabled input styling */
.tablesorter-blue .tablesorter-filter-row .disabled {
opacity: 0.5;
filter: alpha(opacity=50);
cursor: not-allowed;
}
/* hidden filter row */
.tablesorter-blue .tablesorter-filter-row.hideme td {
/*** *********************************************** ***/
/*** change this padding to modify the thickness ***/
/*** of the closed filter row (height = padding x 2) ***/
padding: 2px;
/*** *********************************************** ***/
margin: 0;
line-height: 0;
cursor: pointer;
}
.tablesorter-blue .tablesorter-filter-row.hideme .tablesorter-filter {
height: 1px;
min-height: 0;
border: 0;
padding: 0;
margin: 0;
/* don't use visibility: hidden because it disables tabbing */
opacity: 0;
filter: alpha(opacity=0);
}
/* filters */
.tablesorter-blue .tablesorter-filter {
width: 98%;
height: auto;
margin: 0;
padding: 4px;
background-color: #fff;
border: 1px solid #bbb;
color: #333;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
-webkit-transition: height 0.1s ease;
-moz-transition: height 0.1s ease;
-o-transition: height 0.1s ease;
transition: height 0.1s ease;
}
/* ajax error row */
.tablesorter .tablesorter-errorRow td {
cursor: pointer;
background-color: #e6bf99;
}
#myTable tbody tr td.subcategory {
padding-left: 30px;
}
#myTable tbody tr td.product {
padding-left: 55px;
}
#myTable tbody tr.category td {
background-color: #96FF7C;
}
#myTable tbody tr.sumAll td{
background-color: #242424;
color: #fff;
}
#myTable tbody tr td.sumRow {
text-align: right;
}
#myTable tbody tr td.oddListRowS1 {
text-align: right;
}
#myTable tbody tr td.alignLeft {
text-align: left;
}
{/literal}
</style>
<table id="myTable" class="tablesorter tablesorter-blue" role="grid">
<thead>
<tr class="tablesorter-headerRow" role="row">
<th>{$MOD.LBL_PRODUCTS}</th>
{if $searchBy=="product"}
<th>Indeks</th>
{/if}
<th>{$MOD.LBL_SOLD_AMOUNT}</th>
<th>{$MOD.LBL_VALUE_SALES}</th>
{*<th>Wartość sprzedaży bez korekt</th>*}
<th>{$MOD.LBL_AVERAGE_PRICE}</th>
<th>{$MOD.LBL_COST}</th>
<th>{$MOD.LBL_MARGIN}</th>
{if $searchBy=="none"}
<th>{$MOD.LBL_STOCK_STATES}</th>
<th>{$MOD.LBL_STOCK_VALUE}</th>
{/if}
</tr>
</thead>
{foreach from=$DATA item=CAT key=CATNAME name=loop}
{* Table headers *}
<tbody>
<tr class="category">
{if $CATNAME != ""}
<td class="oddListRowS1 alignLeft"><b> {$CATNAME}</b></td>
{/if}
{if $searchBy=="product"}
<td class="oddListRowS1" ></td>
{/if}
<td class="sumRow" ><b>{$DATA.$CATNAME.IloscSum|number_format:0:",":"." }</b></td>
<td class="sumRow" ><b>{$DATA.$CATNAME.SoldSum|number_format:2:",":"." }</b></td>
{* <td class="sumRow" ><b><span class='green-text'>{$DATA.$CATNAME.SoldSumNormal|number_format:2:",":"." }</span></b></td>*}
<td class="sumRow" ><b>{$DATA.$CATNAME.SredniaSum|number_format:2:",":"." }</b></td>
<td class="sumRow" ><b>{$DATA.$CATNAME.KosztSum|number_format:2:",":"." }</b></td>
<td class="sumRow" ><b>{$DATA.$CATNAME.MarzaSum|number_format:2:",":"." }%</b></td>
{if $searchBy=="none"}
<td class="sumRow" ><b>{$DATA.$CATNAME.StanSum|number_format:0:",":"." }</b></td>
<td class="sumRow" ><b>{$DATA.$CATNAME.WartoscSum|number_format:2:",":"." }</b></td>
{/if}
</tr>
</tbody>
{foreach from=$CAT item=CAT2 key=CAT2NAME name=loop}
{if $CAT2NAME!="IloscSum" && $CAT2NAME!="SoldSum" && $CAT2NAME!="SoldSumNormal" && $CAT2NAME!="IloscNormal" && $CAT2NAME!="SredniaSum" && $CAT2NAME!="KosztSum" && $CAT2NAME!="MarzaSum" && $CAT2NAME!="StanSum" && $CAT2NAME!="WartoscSum"}
<tbody>
<tr>
<td class="subcategory alignLeft"><b> {$CAT2NAME}</b></td>
{if $searchBy=="product"}
<td></td>
{/if}
<td class="sumRow" ><b>{$CAT.$CAT2NAME.IloscSum2|number_format:0:",":"." }</b></td>
<td class="sumRow" ><b>{$CAT.$CAT2NAME.SoldSum2|number_format:2:",":"." }</b></td>
{*<td class="sumRow" ><b><span class='green-text'>{$CAT.$CAT2NAME.SoldSumNormal2|number_format:2:",":"." }</span></b></td>*}
<td class="sumRow" ><b>{$CAT.$CAT2NAME.SredniaSum2|number_format:2:",":"." }</b></td>
<td class="sumRow" ><b>{$CAT.$CAT2NAME.KosztSum2|number_format:2:",":"." }</b></td>
<td class="sumRow" ><b>{$CAT.$CAT2NAME.MarzaSum2|number_format:2:",":"." }%</b></td>
</tr>
</tbody>
<tbody aria-live="polite" aria-relevant="all">
{foreach from=$CAT2 item=ROW name=loop}
{if $ROW.name!="IloscSum" && $ROW.name!="SoldSum" && $ROW.name!="SredniaSum" && $ROW.name!="KosztSum" && $ROW.name!="MarzaSum" && $CAT2NAME!="StanSum" && $CAT2NAME!="WartoscSum" && $ROW.name!=""}
<tr role="row">
<td class="alignLeft product" style="text-align:left;">
{$ROW.name}
</td>
{if $searchBy=="product"}
<td class="oddListRowS1 alignLeft" >{$ROW.code}</td>
{/if}
<td class="oddListRowS1" >{$ROW.ilosc|number_format:0:",":"."}</td>
<td class="oddListRowS1" >{$ROW.netto|number_format:2:",":"."}</td>
{* <td class="oddListRowS1" ><span class='green-text'>{$ROW.nettoNormal|number_format:2:",":"." }</span></td>*}
<td class="oddListRowS1" >{$ROW.srednia|number_format:2:",":"."}</td>
<td class="oddListRowS1" >{$ROW.koszt|number_format:2:",":"."}</td>
<td class="oddListRowS1" >{$ROW.marza|number_format:2:",":"."}%</td>
</tr>
{/if}
{/foreach}
</tbody>
<tbody id="stopRows"></tbody>
{/if}
{/foreach}
<tbody id="stopTables"></tbody>
{/foreach}
<tbody id="functions-core" class="tablesorter-infoOnly">
<tr class="sumAll">
<td class="oddListRowS1 alignLeft"><b>{$MOD.LBL_SUM}:</b></td>
{if $searchBy=="product"}
<td class="oddListRowS1" ></td>
{/if}
<td class="oddListRowS1 sumRow" ><b>{$SUM.IloscSumSum|number_format:0:",":"." }</b></td>
<td class="oddListRowS1 sumRow" ><b>{$SUM.SoldSumSum|number_format:2:",":"." }</b></td>
{* <td class="oddListRowS1 sumRow" ><b><span class='green-text'>{$SUM.SoldSumSumNormal|number_format:2:",":"." }</span></b></td>*}
<td class="oddListRowS1 sumRow" ><b>{$SUM.SredniaSumSum|number_format:2:",":"." }</b></td>
<td class="oddListRowS1 sumRow" ><b>{$SUM.KosztSumSum|number_format:2:",":"." }</b></td>
<td class="oddListRowS1 sumRow" ><b>{$SUM.MarzaSumSum|number_format:2:",":"." }%</b></td>
</tr>
</tbody>
</table>
<br/>

View File

@@ -0,0 +1,343 @@
<style type="text/css">
{literal}
body {
font-size: 8px;
}
/* overall */
.tablesorter-blue {
width: 100%;
background-color: #fff;
margin: 10px 0 15px;
text-align: left;
border-spacing: 0;
border: #fff 1px solid;
border-width: 1px 0 0 1px;
}
.tablesorter-blue th,
.tablesorter-blue td {
border: #fff 1px solid;
border-width: 0 1px 1px 0;
}
/* header */
.tablesorter-blue th,
.tablesorter-blue thead td {
font: bold 10px/18px Arial, Sans-serif;
color: #fff;
background-color: #252525;
border-collapse: collapse;
padding: 4px;
border-top: 2px solid #ABC3D7;
}
.tablesorter-blue tbody td,
.tablesorter-blue tfoot th,
.tablesorter-blue tfoot td {
padding: 4px;
vertical-align: top;
}
.tablesorter-blue .header,
.tablesorter-blue .tablesorter-header {
/* black (unsorted) double arrow */
background-image: url(data:image/gif;base64,R0lGODlhFQAJAIAAACMtMP///yH5BAEAAAEALAAAAAAVAAkAAAIXjI+AywnaYnhUMoqt3gZXPmVg94yJVQAAOw==);
/* white (unsorted) double arrow */
/* background-image: url(data:image/gif;base64,R0lGODlhFQAJAIAAAP///////yH5BAEAAAEALAAAAAAVAAkAAAIXjI+AywnaYnhUMoqt3gZXPmVg94yJVQAAOw==); */
/* image */
/* background-image: url(images/black-unsorted.gif); */
background-repeat: no-repeat;
background-position: center right;
padding: 3px 18px 3px 3px;
white-space: normal;
cursor: pointer;
}
.tablesorter-blue .headerSortUp,
.tablesorter-blue .tablesorter-headerSortUp,
.tablesorter-blue .tablesorter-headerAsc {
background-color: #E7E7E9;
/* black asc arrow */
background-image: url(data:image/gif;base64,R0lGODlhFQAEAIAAACMtMP///yH5BAEAAAEALAAAAAAVAAQAAAINjI8Bya2wnINUMopZAQA7);
/* white asc arrow */
/* background-image: url(data:image/gif;base64,R0lGODlhFQAEAIAAAP///////yH5BAEAAAEALAAAAAAVAAQAAAINjI8Bya2wnINUMopZAQA7); */
/* image */
/* background-image: url(images/black-asc.gif); */
}
.tablesorter-blue .headerSortDown,
.tablesorter-blue .tablesorter-headerSortDown,
.tablesorter-blue .tablesorter-headerDesc {
background-color: #E7E7E9;
/* black desc arrow */
background-image: url(data:image/gif;base64,R0lGODlhFQAEAIAAACMtMP///yH5BAEAAAEALAAAAAAVAAQAAAINjB+gC+jP2ptn0WskLQA7);
/* white desc arrow */
/* background-image: url(data:image/gif;base64,R0lGODlhFQAEAIAAAP///////yH5BAEAAAEALAAAAAAVAAQAAAINjB+gC+jP2ptn0WskLQA7); */
/* image */
/* background-image: url(images/black-desc.gif); */
}
.tablesorter-blue thead .sorter-false {
background-image: none;
padding: 4px;
}
/* tfoot */
.tablesorter-blue tfoot .tablesorter-headerSortUp,
.tablesorter-blue tfoot .tablesorter-headerSortDown,
.tablesorter-blue tfoot .tablesorter-headerAsc,
.tablesorter-blue tfoot .tablesorter-headerDesc {
/* remove sort arrows from footer */
background-image: none;
}
/* tbody */
.tablesorter-blue td {
color: #3d3d3d;
background-color: #fff;
padding: 0px;
vertical-align: top;
}
/* hovered row colors
you'll need to add additional lines for
rows with more than 2 child rows
*/
.tablesorter-blue tbody > tr:hover > td,
.tablesorter-blue tbody > tr:hover + tr.tablesorter-childRow > td,
.tablesorter-blue tbody > tr:hover + tr.tablesorter-childRow + tr.tablesorter-childRow > td,
.tablesorter-blue tbody > tr.even:hover > td,
.tablesorter-blue tbody > tr.even:hover + tr.tablesorter-childRow > td,
.tablesorter-blue tbody > tr.even:hover + tr.tablesorter-childRow + tr.tablesorter-childRow > td {
background: #d9d9d9;
}
.tablesorter-blue tbody > tr.odd:hover > td,
.tablesorter-blue tbody > tr.odd:hover + tr.tablesorter-childRow > td,
.tablesorter-blue tbody > tr.odd:hover + tr.tablesorter-childRow + tr.tablesorter-childRow > td {
background: #bfbfbf;
}
/* table processing indicator */
.tablesorter-blue .tablesorter-processing {
background-position: center center !important;
background-repeat: no-repeat !important;
/* background-image: url(../addons/pager/icons/loading.gif) !important; */
background-image: url('data:image/gif;base64,R0lGODlhFAAUAKEAAO7u7lpaWgAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh+QQBCgACACwAAAAAFAAUAAACQZRvoIDtu1wLQUAlqKTVxqwhXIiBnDg6Y4eyx4lKW5XK7wrLeK3vbq8J2W4T4e1nMhpWrZCTt3xKZ8kgsggdJmUFACH5BAEKAAIALAcAAAALAAcAAAIUVB6ii7jajgCAuUmtovxtXnmdUAAAIfkEAQoAAgAsDQACAAcACwAAAhRUIpmHy/3gUVQAQO9NetuugCFWAAAh+QQBCgACACwNAAcABwALAAACE5QVcZjKbVo6ck2AF95m5/6BSwEAIfkEAQoAAgAsBwANAAsABwAAAhOUH3kr6QaAcSrGWe1VQl+mMUIBACH5BAEKAAIALAIADQALAAcAAAIUlICmh7ncTAgqijkruDiv7n2YUAAAIfkEAQoAAgAsAAAHAAcACwAAAhQUIGmHyedehIoqFXLKfPOAaZdWAAAh+QQFCgACACwAAAIABwALAAACFJQFcJiXb15zLYRl7cla8OtlGGgUADs=') !important;
}
/* Zebra Widget - row alternating colors */
.tablesorter-blue tbody tr.odd td {
background-color: #ebf2fa;
}
.tablesorter-blue tbody tr.even td {
background-color: #fff;
}
/* Column Widget - column sort colors */
.tablesorter-blue td.primary,
.tablesorter-blue tr.odd td.primary {
background-color: #99b3e6;
}
.tablesorter-blue tr.even td.primary {
background-color: #c2d1f0;
}
.tablesorter-blue td.secondary,
.tablesorter-blue tr.odd td.secondary {
background-color: #c2d1f0;
}
.tablesorter-blue tr.even td.secondary {
background-color: #d6e0f5;
}
.tablesorter-blue td.tertiary,
.tablesorter-blue tr.odd td.tertiary {
background-color: #d6e0f5;
}
.tablesorter-blue tr.even td.tertiary {
background-color: #ebf0fa;
}
/* caption */
caption {
background: #fff;
}
/* filter widget */
.tablesorter-blue .tablesorter-filter-row td {
background: #eee;
line-height: normal;
text-align: center; /* center the input */
-webkit-transition: line-height 0.1s ease;
-moz-transition: line-height 0.1s ease;
-o-transition: line-height 0.1s ease;
transition: line-height 0.1s ease;
}
/* optional disabled input styling */
.tablesorter-blue .tablesorter-filter-row .disabled {
opacity: 0.5;
filter: alpha(opacity=50);
cursor: not-allowed;
}
/* hidden filter row */
.tablesorter-blue .tablesorter-filter-row.hideme td {
/*** *********************************************** ***/
/*** change this padding to modify the thickness ***/
/*** of the closed filter row (height = padding x 2) ***/
padding: 2px;
/*** *********************************************** ***/
margin: 0;
line-height: 0;
cursor: pointer;
}
.tablesorter-blue .tablesorter-filter-row.hideme .tablesorter-filter {
height: 1px;
min-height: 0;
border: 0;
padding: 0;
margin: 0;
/* don't use visibility: hidden because it disables tabbing */
opacity: 0;
filter: alpha(opacity=0);
}
/* filters */
.tablesorter-blue .tablesorter-filter {
width: 98%;
height: auto;
margin: 0;
padding: 4px;
background-color: #fff;
border: 1px solid #bbb;
color: #333;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
-webkit-transition: height 0.1s ease;
-moz-transition: height 0.1s ease;
-o-transition: height 0.1s ease;
transition: height 0.1s ease;
}
/* ajax error row */
.tablesorter .tablesorter-errorRow td {
cursor: pointer;
background-color: #e6bf99;
}
#myTable tbody tr td.category {
padding-left: 15px;
}
#myTable tbody tr td.subcategory {
padding-left: 30px;
}
#myTable tbody tr td.product {
padding-left: 55px;
}
#myTable tbody tr.contractor {
background-color: #96FF7C;
}
#myTable tbody tr.sumAll td {
background-color: #242424;
color: #ffffff;
}
#myTable tbody tr td.sumRow, #myTable tbody tr td.oddListRowS1 {
text-align: right;
}
{/literal}
</style>
<table id="myTable" class="tablesorter-blue">
<thead>
<tr class="tablesorter-headerRow" role="row">
<th>{$MOD.LBL_CONTRACTOR}</th>
<th>Indeks</th>
<th>{$MOD.LBL_SOLD_AMOUNT}</th>
<th>{$MOD.LBL_VALUE_SALES}</th>
<th>{$MOD.LBL_AVERAGE_PRICE}</th>
<th>{$MOD.LBL_COST}</th>
<th>{$MOD.LBL_MARGIN}</th>
</tr>
</thead>
{foreach from=$ContractorData item=DATA key=CONNAME name=loop}
{if $CONNAME!=""}
<tbody>
<tr class="contractor">
<td class="alignLeft"><b> {$CONNAME}</b></td>
<td class="sumRow" ></td>
<td class="sumRow" ><b>{$ContractorData.$CONNAME.IloscSum|number_format:0:",":"." }</b></td>
<td class="sumRow" ><b>{$ContractorData.$CONNAME.SoldSum|number_format:2:",":"." }</b></td>
<td class="sumRow" ><b>{$ContractorData.$CONNAME.SredniaSum|number_format:2:",":"." }</b></td>
<td class="sumRow" ><b>{$ContractorData.$CONNAME.KosztSum|number_format:2:",":"." }</b></td>
<td class="sumRow" ><b>{$ContractorData.$CONNAME.MarzaSum|number_format:2:",":"." }%</b></td>
</tr>
</tbody>
{foreach from=$DATA item=CAT key=CATNAME name=loop}
{if $CATNAME!="IloscSum" && $CATNAME!="SoldSum" && $CATNAME!="SredniaSum" && $CATNAME!="KosztSum" && $CATNAME!="MarzaSum" && $CATNAME!="StanSum" && $CATNAME!="WartoscSum"}
<tbody>
<tr>
<td class="alignLeft category"><b> {$CATNAME}</b></td>
<td class="sumRow" ></td>
<td class="sumRow" ><b>{$DATA.$CATNAME.IloscSum|number_format:0:",":"." }</b></td>
<td class="sumRow" ><b>{$DATA.$CATNAME.SoldSum|number_format:2:",":"." }</b></td>
<td class="sumRow" ><b>{$DATA.$CATNAME.SredniaSum|number_format:2:",":"." }</b></td>
<td class="sumRow" ><b>{$DATA.$CATNAME.KosztSum|number_format:2:",":"." }</b></td>
<td class="sumRow" ><b>{$DATA.$CATNAME.MarzaSum|number_format:2:",":"." }%</b></td>
</tr>
</tbody>
{foreach from=$CAT item=CAT2 key=CAT2NAME name=loop}
{if $CAT2NAME!="IloscSum" && $CAT2NAME!="SoldSum" && $CAT2NAME!="SoldSumNormal" && $CAT2NAME!="IloscNormal" && $CAT2NAME!="SredniaSum" && $CAT2NAME!="KosztSum" && $CAT2NAME!="MarzaSum" && $CAT2NAME!="StanSum" && $CAT2NAME!="WartoscSum"}
<tbody>
<tr>
<td class="alignLeft subcategory"><b> {$CAT2NAME}</b></td>
<td class="sumRow"></td>
<td class="sumRow" ><b>{$CAT.$CAT2NAME.IloscSum|number_format:0:",":"." }</b></td>
<td class="sumRow" ><b>{$CAT.$CAT2NAME.SoldSum|number_format:2:",":"." }</b></td>
<td class="sumRow" ><b>{$CAT.$CAT2NAME.SredniaSum|number_format:2:",":"." }</b></td>
<td class="sumRow" ><b>{$CAT.$CAT2NAME.KosztSum|number_format:2:",":"." }</b></td>
<td class="sumRow" ><b>{$CAT.$CAT2NAME.MarzaSum|number_format:2:",":"." }%</b></td>
</tr>
</tbody>
<tbody aria-live="polite" aria-relevant="all" class="rowShowHide">
{foreach from=$CAT2 item=ROW name=loop}
{if $ROW.name!="IloscSum" && $ROW.name!="SoldSum" && $ROW.name!="SredniaSum" && $ROW.name!="KosztSum" && $ROW.name!="MarzaSum" && $CAT2NAME!="StanSum" && $CAT2NAME!="WartoscSum" && $ROW.name!=""}
{if $smarty.foreach.loop.index % 2 == 1}
<tr role="row" class="products">
{else}
<tr role="row">
{/if}
<td class="oddListRowS1 alignLeft product" style="text-align:left;">
{$ROW.name}
</td>
<td class="oddListRowS1" >{$ROW.code}</td>
<td class="oddListRowS1" >{$ROW.ilosc|number_format:0:",":"."}</td>
<td class="oddListRowS1" >{$ROW.netto|number_format:2:",":"."}</td>
<td class="oddListRowS1" >{$ROW.srednia|number_format:2:",":"."}</td>
<td class="oddListRowS1" >{$ROW.koszt|number_format:2:",":"."}</td>
<td class="oddListRowS1" >{$ROW.marza|number_format:2:",":"."}%</td>
</tr>
{/if}
{/foreach}
</tbody>
<tbody id="stopRows"></tbody>
{/if}
{/foreach}
<tbody id="stopTables"></tbody>
{/if}
{/foreach}
<tbody id="stopCategory"></tbody>
{/if}
{/foreach}
<tbody id="functions-core" class="tablesorter-infoOnly">
<tr class="sumAll">
<td class="alignLeft"><b>{$MOD.LBL_SUM}:</b></td>
<td></td>
<td class="sumRow" ><b>{$SUM.IloscSumSum|number_format:0:",":"." }</b></td>
<td class="sumRow" ><b>{$SUM.SoldSumSum|number_format:2:",":"." }</b></td>
<td class="sumRow" ><b>{$SUM.SredniaSumSum|number_format:2:",":"." }</b></td>
<td class="sumRow" ><b>{$SUM.KosztSumSum|number_format:2:",":"." }</b></td>
<td class="sumRow" ><b>{$SUM.MarzaSumSum|number_format:2:",":"." }%</b></td>
</tr>
</tbody>
</table>
<br/>

View File

@@ -0,0 +1,113 @@
{if $viewSelected eq 'documents'}
<table id="myTable" style="font-size: 8pt; width:100%">
<thead>
<tr>
<th style="border: 1px solid black; font-weight: bold; font-size: 8pt;">Lp.</th>
<th style="border: 1px solid black; font-weight: bold; font-size: 8pt; width:10%">Numer dokumentu</th>
<th style="border: 1px solid black; font-weight: bold; font-size: 8pt; width:10%">Data</th>
<th style="border: 1px solid black; font-weight: bold; font-size: 8pt;">
{if $documentSelected eq 'EcmStockDocInsideOuts' or $documentSelected eq 'EcmStockDocInsideIns' or $documentSelected eq 'EcmStockDocCorrects'}
Kartoteka materiałowa
{elseif $documentSelected eq 'EcmStockDocMoves'}
Magazyn docelowy
{elseif $documentSelected eq 'EcmStockDocIns'}
Dostawca
{elseif $documentSelected eq 'EcmStockDocOuts'}
Odbiorca
{elseif $documentSelected eq 'EcmInvoiceOuts'}
Kontrahent
{/if}
</th>
<th style="border: 1px solid black; font-weight: bold; font-size: 8pt;">Opis dokumentu</th>
<th style="border: 1px solid black; font-weight: bold; font-size: 8pt;">Wartość</th>
<th style="border: 1px solid black; font-weight: bold; font-size: 8pt;">Magazyn</th>
</tr>
</thead>
<tbody >
{foreach from=$DATA.doc key="key" item="item" name=loop}
<tr>
<td>{assign var=pozycja value=$pozycja+1}{$pozycja}</td>
<td>
{$item.typ} {$item.numer}
</td>
<td>
{$item.data}
</td>
<td>
{if $documentSelected eq 'EcmStockDocInsideOuts' or $documentSelected eq 'EcmStockDocInsideIns' or $documentSelected eq 'EcmStockDocCorrects'}
{$item.kartoteka}
{elseif $documentSelected eq 'EcmStockDocMoves'}
{$item.magazynIn}
{elseif $documentSelected eq 'EcmStockDocIns' or $documentSelected eq 'EcmStockDocOuts' or $documentSelected eq 'EcmInvoiceOuts' }
{$item.accountNazwa}
{/if}
</td>
<td>
{$item.nazwa}
</td>
<td style="text-align: right">
{assign var=suma value=$suma+$item.wartosc}
{$item.wartosc|number_format:2:",":"."}
</td>
<td style="text-align: left">
{$item.magazyn}
</td>
</tr>
{/foreach}
</tbody>
<tfoot>
<tr>
<th colspan='5' style="border-top: 1px solid black;text-align:left;">Suma:</th>
<th style="border-top: 1px solid black;text-align:right;">{$suma|number_format:2:",":"." }</th>
<th style="border-top: 1px solid black;"></th>
</tr>
</tfoot>
</table>
{elseif $viewSelected eq 'positions'}
<table id="myTable" style="font-size: 8pt; width:100%">
<thead>
<tr>
<th style="border: 1px solid black; font-weight: bold; font-size: 8pt;">Lp.</th>
<th style="border: 1px solid black; font-weight: bold; font-size: 8pt;">Indeks</th>
<th style="border: 1px solid black; font-weight: bold; font-size: 8pt;">Nazwa</th>
<th style="border: 1px solid black; font-weight: bold; font-size: 8pt;">Jm</th>
<th style="border: 1px solid black; font-weight: bold; font-size: 8pt;">Ilość</th>
<th style="border: 1px solid black; font-weight: bold; font-size: 8pt;">Wartość</th>
</tr>
</thead>
<tbody aria-live="polite" aria-relevant="all">
{foreach from=$DATA.prod key="key" item="item" name=loop}
<tr>
<td>{assign var=pozycja value=$pozycja+1}{$pozycja}</td>
<td>
{$item.kod}
</td>
<td>
{$item.nazwa}
</td>
<td>
{$item.jm}
</td>
<td style="text-align: right">
{assign var=sumaIlosci value=$sumaIlosci+$item.ilosc}
{$item.ilosc|number_format:2:",":"."}
</td>
<td style="text-align: right">
{assign var=suma value=$suma+$item.wartosc}
{$item.wartosc|number_format:2:",":"."}
</td>
</tr>
{/foreach}
</tbody>
<tfoot>
<tr>
<th colspan='4' style="border-top: 1px solid black;text-align:left;">Suma:</th>
<th colspan='1' style="border-top: 1px solid black;text-align:right;">{$sumaIlosci|number_format:2:",":"." }</th>
<th colspan='1' style="border-top: 1px solid black;text-align:right;">{$suma|number_format:2:",":"." }</th>
</tr>
</tfoot>
</table>
{/if}

View File

@@ -0,0 +1,293 @@
<style type="text/css">
{literal}
body {
font-size: 8px;
}
/* overall */
.tablesorter-blue {
width: 100%;
background-color: #fff;
margin: 10px 0 15px;
text-align: left;
border-spacing: 0;
border: #fff 1px solid;
border-width: 1px 0 0 1px;
}
.tablesorter-blue th,
.tablesorter-blue td {
border: #fff 1px solid;
border-width: 0 1px 1px 0;
}
/* header */
.tablesorter-blue th,
.tablesorter-blue thead td {
font: bold 10px/18px Arial, Sans-serif;
color: #fff;
background-color: #252525;
border-collapse: collapse;
padding: 4px;
border-top: 2px solid #ABC3D7;
}
.tablesorter-blue tbody td,
.tablesorter-blue tfoot th,
.tablesorter-blue tfoot td {
padding: 4px;
vertical-align: top;
}
.tablesorter-blue .header,
.tablesorter-blue .tablesorter-header {
/* black (unsorted) double arrow */
background-image: url(data:image/gif;base64,R0lGODlhFQAJAIAAACMtMP///yH5BAEAAAEALAAAAAAVAAkAAAIXjI+AywnaYnhUMoqt3gZXPmVg94yJVQAAOw==);
/* white (unsorted) double arrow */
/* background-image: url(data:image/gif;base64,R0lGODlhFQAJAIAAAP///////yH5BAEAAAEALAAAAAAVAAkAAAIXjI+AywnaYnhUMoqt3gZXPmVg94yJVQAAOw==); */
/* image */
/* background-image: url(images/black-unsorted.gif); */
background-repeat: no-repeat;
background-position: center right;
padding: 3px 18px 3px 3px;
white-space: normal;
cursor: pointer;
}
.tablesorter-blue .headerSortUp,
.tablesorter-blue .tablesorter-headerSortUp,
.tablesorter-blue .tablesorter-headerAsc {
background-color: #E7E7E9;
/* black asc arrow */
background-image: url(data:image/gif;base64,R0lGODlhFQAEAIAAACMtMP///yH5BAEAAAEALAAAAAAVAAQAAAINjI8Bya2wnINUMopZAQA7);
/* white asc arrow */
/* background-image: url(data:image/gif;base64,R0lGODlhFQAEAIAAAP///////yH5BAEAAAEALAAAAAAVAAQAAAINjI8Bya2wnINUMopZAQA7); */
/* image */
/* background-image: url(images/black-asc.gif); */
}
.tablesorter-blue .headerSortDown,
.tablesorter-blue .tablesorter-headerSortDown,
.tablesorter-blue .tablesorter-headerDesc {
background-color: #E7E7E9;
/* black desc arrow */
background-image: url(data:image/gif;base64,R0lGODlhFQAEAIAAACMtMP///yH5BAEAAAEALAAAAAAVAAQAAAINjB+gC+jP2ptn0WskLQA7);
/* white desc arrow */
/* background-image: url(data:image/gif;base64,R0lGODlhFQAEAIAAAP///////yH5BAEAAAEALAAAAAAVAAQAAAINjB+gC+jP2ptn0WskLQA7); */
/* image */
/* background-image: url(images/black-desc.gif); */
}
.tablesorter-blue thead .sorter-false {
background-image: none;
padding: 4px;
}
/* tfoot */
.tablesorter-blue tfoot .tablesorter-headerSortUp,
.tablesorter-blue tfoot .tablesorter-headerSortDown,
.tablesorter-blue tfoot .tablesorter-headerAsc,
.tablesorter-blue tfoot .tablesorter-headerDesc {
/* remove sort arrows from footer */
background-image: none;
}
/* tbody */
.tablesorter-blue td {
color: #3d3d3d;
background-color: #fff;
padding: 0px;
vertical-align: top;
}
/* hovered row colors
you'll need to add additional lines for
rows with more than 2 child rows
*/
.tablesorter-blue tbody > tr:hover > td,
.tablesorter-blue tbody > tr:hover + tr.tablesorter-childRow > td,
.tablesorter-blue tbody > tr:hover + tr.tablesorter-childRow + tr.tablesorter-childRow > td,
.tablesorter-blue tbody > tr.even:hover > td,
.tablesorter-blue tbody > tr.even:hover + tr.tablesorter-childRow > td,
.tablesorter-blue tbody > tr.even:hover + tr.tablesorter-childRow + tr.tablesorter-childRow > td {
background: #d9d9d9;
}
.tablesorter-blue tbody > tr.odd:hover > td,
.tablesorter-blue tbody > tr.odd:hover + tr.tablesorter-childRow > td,
.tablesorter-blue tbody > tr.odd:hover + tr.tablesorter-childRow + tr.tablesorter-childRow > td {
background: #bfbfbf;
}
/* table processing indicator */
.tablesorter-blue .tablesorter-processing {
background-position: center center !important;
background-repeat: no-repeat !important;
/* background-image: url(../addons/pager/icons/loading.gif) !important; */
background-image: url('data:image/gif;base64,R0lGODlhFAAUAKEAAO7u7lpaWgAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh+QQBCgACACwAAAAAFAAUAAACQZRvoIDtu1wLQUAlqKTVxqwhXIiBnDg6Y4eyx4lKW5XK7wrLeK3vbq8J2W4T4e1nMhpWrZCTt3xKZ8kgsggdJmUFACH5BAEKAAIALAcAAAALAAcAAAIUVB6ii7jajgCAuUmtovxtXnmdUAAAIfkEAQoAAgAsDQACAAcACwAAAhRUIpmHy/3gUVQAQO9NetuugCFWAAAh+QQBCgACACwNAAcABwALAAACE5QVcZjKbVo6ck2AF95m5/6BSwEAIfkEAQoAAgAsBwANAAsABwAAAhOUH3kr6QaAcSrGWe1VQl+mMUIBACH5BAEKAAIALAIADQALAAcAAAIUlICmh7ncTAgqijkruDiv7n2YUAAAIfkEAQoAAgAsAAAHAAcACwAAAhQUIGmHyedehIoqFXLKfPOAaZdWAAAh+QQFCgACACwAAAIABwALAAACFJQFcJiXb15zLYRl7cla8OtlGGgUADs=') !important;
}
/* Zebra Widget - row alternating colors */
.tablesorter-blue tbody tr.odd td {
background-color: #ebf2fa;
}
.tablesorter-blue tbody tr.even td {
background-color: #fff;
}
/* Column Widget - column sort colors */
.tablesorter-blue td.primary,
.tablesorter-blue tr.odd td.primary {
background-color: #99b3e6;
}
.tablesorter-blue tr.even td.primary {
background-color: #c2d1f0;
}
.tablesorter-blue td.secondary,
.tablesorter-blue tr.odd td.secondary {
background-color: #c2d1f0;
}
.tablesorter-blue tr.even td.secondary {
background-color: #d6e0f5;
}
.tablesorter-blue td.tertiary,
.tablesorter-blue tr.odd td.tertiary {
background-color: #d6e0f5;
}
.tablesorter-blue tr.even td.tertiary {
background-color: #ebf0fa;
}
/* caption */
caption {
background: #fff;
}
/* filter widget */
.tablesorter-blue .tablesorter-filter-row td {
background: #eee;
line-height: normal;
text-align: center; /* center the input */
-webkit-transition: line-height 0.1s ease;
-moz-transition: line-height 0.1s ease;
-o-transition: line-height 0.1s ease;
transition: line-height 0.1s ease;
}
/* optional disabled input styling */
.tablesorter-blue .tablesorter-filter-row .disabled {
opacity: 0.5;
filter: alpha(opacity=50);
cursor: not-allowed;
}
/* hidden filter row */
.tablesorter-blue .tablesorter-filter-row.hideme td {
/*** *********************************************** ***/
/*** change this padding to modify the thickness ***/
/*** of the closed filter row (height = padding x 2) ***/
padding: 2px;
/*** *********************************************** ***/
margin: 0;
line-height: 0;
cursor: pointer;
}
.tablesorter-blue .tablesorter-filter-row.hideme .tablesorter-filter {
height: 1px;
min-height: 0;
border: 0;
padding: 0;
margin: 0;
/* don't use visibility: hidden because it disables tabbing */
opacity: 0;
filter: alpha(opacity=0);
}
/* filters */
.tablesorter-blue .tablesorter-filter {
width: 98%;
height: auto;
margin: 0;
padding: 4px;
background-color: #fff;
border: 1px solid #bbb;
color: #333;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
-webkit-transition: height 0.1s ease;
-moz-transition: height 0.1s ease;
-o-transition: height 0.1s ease;
transition: height 0.1s ease;
}
/* ajax error row */
.tablesorter .tablesorter-errorRow td {
cursor: pointer;
background-color: #e6bf99;
}
#myTable tbody tr td.subcategory {
padding-left: 30px;
}
#myTable tbody tr td.product {
padding-left: 55px;
}
#myTable tbody tr.category td {
background-color: #96FF7C;
}
#myTable tbody tr.sumAll td{
background-color: #242424;
color: #fff;
}
#myTable tbody tr td.sumRow {
text-align: right;
}
#myTable tbody tr td.oddListRowS1 {
text-align: right;
}
#myTable tbody tr td.alignLeft {
text-align: left;
}
{/literal}
</style>
<table id="myTable">
<thead>
<tr>
<th width="1%" style="border:1pt solid black">L.p.</th>
<th width="15%" style="border:1pt solid black">{$MOD.LBL_INDEX}/{$MOD.LBL_NAME}</th>
<th width="8%" style="border:1pt solid black">Stan {$date_from}</th>
<th width="8%" style="border:1pt solid black" >Przychód</th>
<th width="8%" style="border:1pt solid black">Rozchód</th>
<th width="8%" style="border:1pt solid black">Stan {$date_to}</th>
</tr>
</thead>
<tbody aria-live="polite" aria-relevant="all">
{assign var="number" value=1}
{foreach from=$DATA key="key" item="item" name=loop}
<tr>
<td style="border-bottom:1pt solid black;"><b>{$number}{assign var="number" value=$number+1}</b></td>
<td style="text-align:left;border-bottom:1pt solid black;" rowspan="{$currow}" ><b>{$item.product_code}</b><br><b>{$item.product_name}</b></td>
<td style="border-bottom:1pt solid black;text-align:right">{$item.total_quantity_old|number_format:$item.unit_precision:",":"."} {$item.unit_id}<br>{$item.total_price_old|number_format:2:",":"." }</td>
<td style="border-bottom:1pt solid black;text-align:right">{$item.przychod_q|number_format:$item.unit_precision:",":"."} {$item.unit_id}<br>{$item.przychod_w|number_format:2:",":"." }</td>
<td style="border-bottom:1pt solid black;text-align:right">{$item.rozchod_q|number_format:$item.unit_precision:",":"."} {$item.unit_id}<br>{$item.rozchod_w|number_format:2:",":"." }</td>
<td style="border-bottom:1pt solid black;text-align:right">{$item.total_quantity_now|number_format:$item.unit_precision:",":"."} {$item.unit_id}<br>{$item.total_price_now|number_format:2:",":"." }</td>
</tr>
{/foreach}
</tbody>
<tr>
<td></td>
<td style="text-align:right;"><b>Razem ilość:</b></td>
<td class="oddListRowS1 sumRow" style="text-align:right"><b>{$TOTAL_QUANTITY_OLD|number_format:2:",":"." }</b></td>
<td class="oddListRowS1 sumRow" style="text-align:right"><b>{$przychod_q|number_format:2:",":"." }</b></td>
<td class="oddListRowS1 sumRow" style="text-align:right"><b>{$rozchod_q|number_format:2:",":"." }</b></td>
<td class="oddListRowS1 sumRow" style="text-align:right"><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" style="text-align:right"><b>{$TOTAL_VALUE_OLD|number_format:2:",":"." }</b></td>
<td class="oddListRowS1 sumRow" style="text-align:right"><b>{$przychod_w|number_format:2:",":"." }</b></td>
<td class="oddListRowS1 sumRow" style="text-align:right"><b>{$rozchod_w|number_format:2:",":"." }</b></td>
<td class="oddListRowS1 sumRow" style="text-align:right"><b>{$TOTAL_VALUE_NOW|number_format:2:",":"." }</b></td>
</tr>
</table>

View File

@@ -0,0 +1,315 @@
<style type="text/css">
{literal}
body {
font-size: 8px;
}
/* overall */
.tablesorter-blue {
width: 100%;
background-color: #fff;
margin: 10px 0 15px;
text-align: left;
border-spacing: 0;
border: #fff 1px solid;
border-width: 1px 0 0 1px;
}
.tablesorter-blue th,
.tablesorter-blue td {
border: #fff 1px solid;
border-width: 0 1px 1px 0;
}
/* header */
.tablesorter-blue th,
.tablesorter-blue thead td {
font: bold 10px/18px Arial, Sans-serif;
color: #fff;
background-color: #252525;
border-collapse: collapse;
padding: 4px;
border-top: 2px solid #ABC3D7;
}
.tablesorter-blue tbody td,
.tablesorter-blue tfoot th,
.tablesorter-blue tfoot td {
padding: 4px;
vertical-align: top;
}
.tablesorter-blue .header,
.tablesorter-blue .tablesorter-header {
/* black (unsorted) double arrow */
background-image: url(data:image/gif;base64,R0lGODlhFQAJAIAAACMtMP///yH5BAEAAAEALAAAAAAVAAkAAAIXjI+AywnaYnhUMoqt3gZXPmVg94yJVQAAOw==);
/* white (unsorted) double arrow */
/* background-image: url(data:image/gif;base64,R0lGODlhFQAJAIAAAP///////yH5BAEAAAEALAAAAAAVAAkAAAIXjI+AywnaYnhUMoqt3gZXPmVg94yJVQAAOw==); */
/* image */
/* background-image: url(images/black-unsorted.gif); */
background-repeat: no-repeat;
background-position: center right;
padding: 3px 18px 3px 3px;
white-space: normal;
cursor: pointer;
}
.tablesorter-blue .headerSortUp,
.tablesorter-blue .tablesorter-headerSortUp,
.tablesorter-blue .tablesorter-headerAsc {
background-color: #E7E7E9;
/* black asc arrow */
background-image: url(data:image/gif;base64,R0lGODlhFQAEAIAAACMtMP///yH5BAEAAAEALAAAAAAVAAQAAAINjI8Bya2wnINUMopZAQA7);
/* white asc arrow */
/* background-image: url(data:image/gif;base64,R0lGODlhFQAEAIAAAP///////yH5BAEAAAEALAAAAAAVAAQAAAINjI8Bya2wnINUMopZAQA7); */
/* image */
/* background-image: url(images/black-asc.gif); */
}
.tablesorter-blue .headerSortDown,
.tablesorter-blue .tablesorter-headerSortDown,
.tablesorter-blue .tablesorter-headerDesc {
background-color: #E7E7E9;
/* black desc arrow */
background-image: url(data:image/gif;base64,R0lGODlhFQAEAIAAACMtMP///yH5BAEAAAEALAAAAAAVAAQAAAINjB+gC+jP2ptn0WskLQA7);
/* white desc arrow */
/* background-image: url(data:image/gif;base64,R0lGODlhFQAEAIAAAP///////yH5BAEAAAEALAAAAAAVAAQAAAINjB+gC+jP2ptn0WskLQA7); */
/* image */
/* background-image: url(images/black-desc.gif); */
}
.tablesorter-blue thead .sorter-false {
background-image: none;
padding: 4px;
}
/* tfoot */
.tablesorter-blue tfoot .tablesorter-headerSortUp,
.tablesorter-blue tfoot .tablesorter-headerSortDown,
.tablesorter-blue tfoot .tablesorter-headerAsc,
.tablesorter-blue tfoot .tablesorter-headerDesc {
/* remove sort arrows from footer */
background-image: none;
}
/* tbody */
.tablesorter-blue td {
color: #3d3d3d;
background-color: #fff;
padding: 0px;
vertical-align: top;
}
/* hovered row colors
you'll need to add additional lines for
rows with more than 2 child rows
*/
.tablesorter-blue tbody > tr:hover > td,
.tablesorter-blue tbody > tr:hover + tr.tablesorter-childRow > td,
.tablesorter-blue tbody > tr:hover + tr.tablesorter-childRow + tr.tablesorter-childRow > td,
.tablesorter-blue tbody > tr.even:hover > td,
.tablesorter-blue tbody > tr.even:hover + tr.tablesorter-childRow > td,
.tablesorter-blue tbody > tr.even:hover + tr.tablesorter-childRow + tr.tablesorter-childRow > td {
background: #d9d9d9;
}
.tablesorter-blue tbody > tr.odd:hover > td,
.tablesorter-blue tbody > tr.odd:hover + tr.tablesorter-childRow > td,
.tablesorter-blue tbody > tr.odd:hover + tr.tablesorter-childRow + tr.tablesorter-childRow > td {
background: #bfbfbf;
}
/* table processing indicator */
.tablesorter-blue .tablesorter-processing {
background-position: center center !important;
background-repeat: no-repeat !important;
/* background-image: url(../addons/pager/icons/loading.gif) !important; */
background-image: url('data:image/gif;base64,R0lGODlhFAAUAKEAAO7u7lpaWgAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh+QQBCgACACwAAAAAFAAUAAACQZRvoIDtu1wLQUAlqKTVxqwhXIiBnDg6Y4eyx4lKW5XK7wrLeK3vbq8J2W4T4e1nMhpWrZCTt3xKZ8kgsggdJmUFACH5BAEKAAIALAcAAAALAAcAAAIUVB6ii7jajgCAuUmtovxtXnmdUAAAIfkEAQoAAgAsDQACAAcACwAAAhRUIpmHy/3gUVQAQO9NetuugCFWAAAh+QQBCgACACwNAAcABwALAAACE5QVcZjKbVo6ck2AF95m5/6BSwEAIfkEAQoAAgAsBwANAAsABwAAAhOUH3kr6QaAcSrGWe1VQl+mMUIBACH5BAEKAAIALAIADQALAAcAAAIUlICmh7ncTAgqijkruDiv7n2YUAAAIfkEAQoAAgAsAAAHAAcACwAAAhQUIGmHyedehIoqFXLKfPOAaZdWAAAh+QQFCgACACwAAAIABwALAAACFJQFcJiXb15zLYRl7cla8OtlGGgUADs=') !important;
}
/* Zebra Widget - row alternating colors */
.tablesorter-blue tbody tr.odd td {
background-color: #ebf2fa;
}
.tablesorter-blue tbody tr.even td {
background-color: #fff;
}
/* Column Widget - column sort colors */
.tablesorter-blue td.primary,
.tablesorter-blue tr.odd td.primary {
background-color: #99b3e6;
}
.tablesorter-blue tr.even td.primary {
background-color: #c2d1f0;
}
.tablesorter-blue td.secondary,
.tablesorter-blue tr.odd td.secondary {
background-color: #c2d1f0;
}
.tablesorter-blue tr.even td.secondary {
background-color: #d6e0f5;
}
.tablesorter-blue td.tertiary,
.tablesorter-blue tr.odd td.tertiary {
background-color: #d6e0f5;
}
.tablesorter-blue tr.even td.tertiary {
background-color: #ebf0fa;
}
/* caption */
caption {
background: #fff;
}
/* filter widget */
.tablesorter-blue .tablesorter-filter-row td {
background: #eee;
line-height: normal;
text-align: center; /* center the input */
-webkit-transition: line-height 0.1s ease;
-moz-transition: line-height 0.1s ease;
-o-transition: line-height 0.1s ease;
transition: line-height 0.1s ease;
}
/* optional disabled input styling */
.tablesorter-blue .tablesorter-filter-row .disabled {
opacity: 0.5;
filter: alpha(opacity=50);
cursor: not-allowed;
}
/* hidden filter row */
.tablesorter-blue .tablesorter-filter-row.hideme td {
/*** *********************************************** ***/
/*** change this padding to modify the thickness ***/
/*** of the closed filter row (height = padding x 2) ***/
padding: 2px;
/*** *********************************************** ***/
margin: 0;
line-height: 0;
cursor: pointer;
}
.tablesorter-blue .tablesorter-filter-row.hideme .tablesorter-filter {
height: 1px;
min-height: 0;
border: 0;
padding: 0;
margin: 0;
/* don't use visibility: hidden because it disables tabbing */
opacity: 0;
filter: alpha(opacity=0);
}
/* filters */
.tablesorter-blue .tablesorter-filter {
width: 98%;
height: auto;
margin: 0;
padding: 4px;
background-color: #fff;
border: 1px solid #bbb;
color: #333;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
-webkit-transition: height 0.1s ease;
-moz-transition: height 0.1s ease;
-o-transition: height 0.1s ease;
transition: height 0.1s ease;
}
/* ajax error row */
.tablesorter .tablesorter-errorRow td {
cursor: pointer;
background-color: #e6bf99;
}
#myTable tbody tr td.subcategory {
padding-left: 30px;
}
#myTable tbody tr td.product {
padding-left: 55px;
}
#myTable tbody tr.category td {
background-color: #96FF7C;
}
#myTable tbody tr.sumAll td{
background-color: #242424;
color: #fff;
}
#myTable tbody tr td.sumRow {
text-align: right;
}
#myTable tbody tr td.oddListRowS1 {
text-align: right;
}
#myTable tbody tr td.alignLeft {
text-align: left;
}
{/literal}
</style>
<table id="myTable">
<thead>
<tr class="tablesorter-headerRow" role="row">
<td width="8%" style="border: 1px solid black;text-align:center;">L.p.</td>
<td width="8%" style="border: 1px solid black;text-align:center;">{$MOD.LBL_INDEX}</td>
<td width="15%" style="border: 1px solid black;text-align:center;">{$MOD.LBL_NAME}</td>
<td width="8%" style="border: 1px solid black;text-align:center;">Dokument</td>
{if $CONSIGNMENTS==TRUE}
<td width="8%" style="border: 1px solid black;text-align:center;">{$MOD.LBL_CONSIGNMENTS}</td>
{/if}
<td width="8%" style="border: 1px solid black;text-align:center;">{$MOD.LBL_QUANTITY}</td>
<td width="8%" style="border: 1px solid black;text-align:center;">{$MOD.LBL_PRICE}</td>
<td width="8%" style="border: 1px solid black;text-align:center;">Wartość</td>
</tr>
</thead>
<tbody id="functions-core" class="tablesorter-infoOnly">
{assign var="counter" value=1}
{assign var="amount" value=1}
{foreach from=$DATA key="key" item="item" name=loop}
<tr style="border-bottom:1pt solid black;">
{if $item.add|@count>1}
{assign var="rowspan" value=$item.add|@count}
{assign var="rowspanadd" value=1}
{assign var="currow" value=$rowspan+$rowspanadd}
{else}
{assign var="currow" value=1}
{/if}
<td class="oddListRowS1 alignLeft" rowspan="{$currow}" style="border-bottom:1px solid black;">{$counter}</td>
<td class="oddListRowS1 alignLeft" rowspan="{$currow}" style="border-bottom:1px solid black;">{$item.product_code}</td>
<td class="oddListRowS1" style="text-align:left;" rowspan="{$currow}" style="border-bottom:1px solid black;text-align:left;">{$item.product_name}</td>
<td class="oddListRowS1 sumRow" style="border-bottom:1px solid black;">{$item.parent_type} {$item.parent_name}</td>
{if $CONSIGNMENTS==TRUE}
<td class="oddListRowS1 sumRow" style="border-bottom:1px solid black;">{$item.part_no}</td>
{/if}
<td class="oddListRowS1 sumRow" style="border-bottom:1px solid black;">{$item.total_quantity|number_format:$item.unit_precision:",":"."}<br>{$item.unit_id}</td>
<td class="oddListRowS1 sumRow" style="border-bottom:1px solid black;">{$item.price|number_format:2:",":"." }</td>
<td class="oddListRowS1 sumRow" style="border-bottom:1px solid black;">{$item.total_price|number_format:2:",":"." }</td>
</tr>
{assign var="counter" value=$counter+$amount}
{if $item.add|@count>1}
{foreach from=$item.add key="kis" item="position" name=loop}
<tr>
<td class="oddListRowS1 sumRow" style="border-bottom:1px solid black;">{$position.parent_type} {$position.parent_name}</td>
{if $CONSIGNMENTS==TRUE}
<td class="oddListRowS1 sumRow" style="border-bottom:1px solid black;">{$position.part_no}</td>
{/if}
<td class="oddListRowS1 sumRow" style="border-bottom:1px solid black;">{$position.quantity|number_format:2:",":"." }</td>
<td class="oddListRowS1 sumRow" style="border-bottom:1px solid black;">{$position.price|number_format:2:",":"." }</td>
<td class="oddListRowS1 sumRow" style="border-bottom:1px solid black;">{$position.position_value|number_format:2:",":"." }</td>
</tr>
{/foreach}
{/if}
{/foreach}
</tbody>
<tr><td></td><td><td></td></td><td class="oddListRowS1 sumRow">Razem:</td><td></td>
<td class="oddListRowS1 sumRow" style="text-align: right;">{$TOTAL_QUANTITY|number_format:2:",":"." }</td><td></td>
<td class="oddListRowS1 sumRow" style="text-align: right;">{$TOTAL_VALUE|number_format:2:",":"." }</td></tr>
</table>
<br/>

View File

@@ -0,0 +1,411 @@
{literal}
<html>
<head>
<style>
@page {
size: auto;
odd-header-name: html_MyHeader1;
odd-footer-name: html_MyFooter1;
}
@page chapter2 {
odd-header-name: html_MyHeader2;
odd-footer-name: html_MyFooter2;
}
@page noheader {
odd-header-name: _blank;
odd-footer-name: _blank;
}
div.chapter2 {
page-break-before: always;
page: chapter2;
}
div.noheader {
page-break-before: always;
page: noheader;
}
body {
font-size: 8px;
}
/* overall */
.tablesorter-blue {
width: 100%;
background-color: #fff;
margin: 10px 0 15px;
text-align: left;
border-spacing: 0;
border: #fff 1px solid;
border-width: 1px 0 0 1px;
}
.tablesorter-blue th,
.tablesorter-blue td {
border: #fff 1px solid;
border-width: 0 1px 1px 0;
border-bottom: 1px solid black;
}
/* header */
.tablesorter-blue th,
.tablesorter-blue thead td {
font: bold 10px/18px Arial, Sans-serif;
color: #000;
background-color: #fff;
padding: 4px;
border-top: 2px solid red;
}
.tablesorter-blue tbody td,
.tablesorter-blue tfoot th,
.tablesorter-blue tfoot td {
padding: 4px;
vertical-align: top;
}
.tablesorter-blue .header,
.tablesorter-blue .tablesorter-header {
/* black (unsorted) double arrow */
background-image: url(data:image/gif;base64,R0lGODlhFQAJAIAAACMtMP///yH5BAEAAAEALAAAAAAVAAkAAAIXjI+AywnaYnhUMoqt3gZXPmVg94yJVQAAOw==);
/* white (unsorted) double arrow */
/* background-image: url(data:image/gif;base64,R0lGODlhFQAJAIAAAP///////yH5BAEAAAEALAAAAAAVAAkAAAIXjI+AywnaYnhUMoqt3gZXPmVg94yJVQAAOw==); */
/* image */
/* background-image: url(images/black-unsorted.gif); */
background-repeat: no-repeat;
background-position: center right;
padding: 3px 18px 3px 3px;
white-space: normal;
cursor: pointer;
}
.tablesorter-blue .headerSortUp,
.tablesorter-blue .tablesorter-headerSortUp,
.tablesorter-blue .tablesorter-headerAsc {
background-color: #E7E7E9;
/* black asc arrow */
background-image: url(data:image/gif;base64,R0lGODlhFQAEAIAAACMtMP///yH5BAEAAAEALAAAAAAVAAQAAAINjI8Bya2wnINUMopZAQA7);
/* white asc arrow */
/* background-image: url(data:image/gif;base64,R0lGODlhFQAEAIAAAP///////yH5BAEAAAEALAAAAAAVAAQAAAINjI8Bya2wnINUMopZAQA7); */
/* image */
/* background-image: url(images/black-asc.gif); */
}
.tablesorter-blue .headerSortDown,
.tablesorter-blue .tablesorter-headerSortDown,
.tablesorter-blue .tablesorter-headerDesc {
background-color: #E7E7E9;
/* black desc arrow */
background-image: url(data:image/gif;base64,R0lGODlhFQAEAIAAACMtMP///yH5BAEAAAEALAAAAAAVAAQAAAINjB+gC+jP2ptn0WskLQA7);
/* white desc arrow */
/* background-image: url(data:image/gif;base64,R0lGODlhFQAEAIAAAP///////yH5BAEAAAEALAAAAAAVAAQAAAINjB+gC+jP2ptn0WskLQA7); */
/* image */
/* background-image: url(images/black-desc.gif); */
}
.tablesorter-blue thead .sorter-false {
background-image: none;
padding: 4px;
}
/* tfoot */
.tablesorter-blue tfoot .tablesorter-headerSortUp,
.tablesorter-blue tfoot .tablesorter-headerSortDown,
.tablesorter-blue tfoot .tablesorter-headerAsc,
.tablesorter-blue tfoot .tablesorter-headerDesc {
/* remove sort arrows from footer */
background-image: none;
}
/* tbody */
.tablesorter-blue td {
color: #3d3d3d;
background-color: #fff;
padding: 0px;
vertical-align: top;
}
/* hovered row colors
you'll need to add additional lines for
rows with more than 2 child rows
*/
.tablesorter-blue tbody > tr:hover > td,
.tablesorter-blue tbody > tr:hover + tr.tablesorter-childRow > td,
.tablesorter-blue tbody > tr:hover + tr.tablesorter-childRow + tr.tablesorter-childRow > td,
.tablesorter-blue tbody > tr.even:hover > td,
.tablesorter-blue tbody > tr.even:hover + tr.tablesorter-childRow > td,
.tablesorter-blue tbody > tr.even:hover + tr.tablesorter-childRow + tr.tablesorter-childRow > td {
background: #d9d9d9;
}
.tablesorter-blue tbody > tr.odd:hover > td,
.tablesorter-blue tbody > tr.odd:hover + tr.tablesorter-childRow > td,
.tablesorter-blue tbody > tr.odd:hover + tr.tablesorter-childRow + tr.tablesorter-childRow > td {
background: #bfbfbf;
}
/* Zebra Widget - row alternating colors */
.tablesorter-blue tbody tr.odd td {
background-color: #ebf2fa;
}
.tablesorter-blue tbody tr.even td {
background-color: #fff;
}
/* Column Widget - column sort colors */
.tablesorter-blue td.primary,
.tablesorter-blue tr.odd td.primary {
background-color: #99b3e6;
}
.tablesorter-blue tr.even td.primary {
background-color: #c2d1f0;
}
.tablesorter-blue td.secondary,
.tablesorter-blue tr.odd td.secondary {
background-color: #c2d1f0;
}
.tablesorter-blue tr.even td.secondary {
background-color: #d6e0f5;
}
.tablesorter-blue td.tertiary,
.tablesorter-blue tr.odd td.tertiary {
background-color: #d6e0f5;
}
.tablesorter-blue tr.even td.tertiary {
background-color: #ebf0fa;
}
/* caption */
caption {
background: #fff;
}
/* filter widget */
.tablesorter-blue .tablesorter-filter-row td {
background: #eee;
line-height: normal;
text-align: center; /* center the input */
-webkit-transition: line-height 0.1s ease;
-moz-transition: line-height 0.1s ease;
-o-transition: line-height 0.1s ease;
transition: line-height 0.1s ease;
}
/* optional disabled input styling */
.tablesorter-blue .tablesorter-filter-row .disabled {
opacity: 0.5;
filter: alpha(opacity=50);
cursor: not-allowed;
}
/* hidden filter row */
.tablesorter-blue .tablesorter-filter-row.hideme td {
/*** *********************************************** ***/
/*** change this padding to modify the thickness ***/
/*** of the closed filter row (height = padding x 2) ***/
padding: 2px;
/*** *********************************************** ***/
margin: 0;
line-height: 0;
cursor: pointer;
}
.tablesorter-blue .tablesorter-filter-row.hideme .tablesorter-filter {
height: 1px;
min-height: 0;
border: 0;
padding: 0;
margin: 0;
/* don't use visibility: hidden because it disables tabbing */
opacity: 0;
filter: alpha(opacity=0);
}
/* filters */
.tablesorter-blue .tablesorter-filter {
width: 98%;
height: auto;
margin: 0;
padding: 4px;
background-color: #fff;
border: 1px solid #bbb;
color: #333;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
-webkit-transition: height 0.1s ease;
-moz-transition: height 0.1s ease;
-o-transition: height 0.1s ease;
transition: height 0.1s ease;
}
/* ajax error row */
.tablesorter .tablesorter-errorRow td {
cursor: pointer;
background-color: #e6bf99;
}
#myTable tfoot th {
text-align: right;
}
</style>
</head>
<body>
<htmlpageheader name="MyHeader1">
{/literal}
<div style="text-align: left; border-bottom: 1px solid #000000; font-weight: bold; font-size: 10pt;">
<table>
<tr>
<td style="font-size: 25px; font-weight: bold">Rejestr sprzedaży VAT</td>
</tr>
<tr>
<td style="font-size: 12px; font-weight: bold">SAAS-SYSTEMS</td>
</tr>
<tr>
<td style="font-size: 12px; font-weight: bold">Data wygenerowania: {$current_date_formatted}</td>
</tr>
<tr>
<td style="font-size: 12px; font-weight: bold">Rejestr od {$date_from_formatted} do {$date_to_formatted}</td>
</tr>
<tr>
<td style="font-size: 12px; font-weight: bold">Typ dokumentu: {$searchByType|upper} </td>
</tr>
</table>
</div>
{literal}
</htmlpageheader>
<htmlpagefooter name="MyFooter1">
<table width="100%" style="vertical-align: bottom; font-family: serif; font-size: 8pt;
color: #000000; font-weight: bold; font-style: italic;"><tr>
<td width="33%"><span style="font-weight: bold; font-style: italic;">{DATE j.m.Y}</span></td>
<td width="33%" align="center" style="font-weight: bold; font-style: italic;">{PAGENO}/{nbpg}</td>
<td width="33%" style="text-align: right; ">Rejestr sprzedaży VAT</td>
</tr></table>
</htmlpagefooter>
<htmlpagefooter name="MyFooter2">
<table width="100%" style="vertical-align: bottom; font-family: serif; font-size: 8pt;
color: #000000; font-weight: bold; font-style: italic;"><tr>
<td width="33%"><span style="font-weight: bold; font-style: italic;">SAAS-SYSTEMS</span></td>
<td width="33%" align="center" style="font-weight: bold; font-style: italic;">{PAGENO}/{nbpg}</td>
<td width="33%" style="text-align: right; ">{DATE j-m-Y}</td>
</tr></table>
</htmlpagefooter>
{/literal}
<div>
{assign var=position value=1}
{foreach from=$DATA item=PART name=part"}
{assign var=dataCount value=$DATA|@count}
<table id="myTable" class="tablesorter-blue">
<thead>
<tr>
<th style="border-left: 1px solid black; border-top: 1px solid black;">Lp.</th>
<th style="border-left: 1px solid black; border-top: 1px solid black;">{$MOD.LBL_DOC_NUMBER}</th>
<th style="border-top: 1px solid black;">{$MOD.LBL_CREATE_LAB}</th>
<th style="border-top: 1px solid black;">{$MOD.LBL_SALE_DATE}</th>
<th style="border-top: 1px solid black;">{$MOD.LBL_CONTRACTOR_NIP}</th>
<th style="border-top: 1px solid black;">{$MOD.LBL_LIST_SUBJECT}</th>
<th class="sorter-saas" style="border-top: 1px solid black;">{$MOD.LBL_ADDRESS}</th>
<th class="sorter-saas" style="border-top: 1px solid black;">{$MOD.LBL_GROSS_SALES}</th>
{ if $showNetto7 }<th class="sorter-saas" style="border-top: 1px solid black;">{$MOD.LBL_NET_SALES} 7%</th>{/if}
{ if $showNetto7 }<th class="sorter-saas" style="border-top: 1px solid black;">{$MOD.LBL_VAT} 7%</th>{/if}
{ if $showNetto8 }<th class="sorter-saas" style="border-top: 1px solid black;">{$MOD.LBL_NET_SALES} 8%</th>{/if}
{ if $showNetto8 }<th class="sorter-saas" style="border-top: 1px solid black;">{$MOD.LBL_VAT} 8%</th>{/if}
{ if $showNetto22 }<th class="sorter-saas" style="border-top: 1px solid black;">{$MOD.LBL_NET_SALES} 22%</th>{/if}
{ if $showNetto22 }<th class="sorter-saas" style="border-top: 1px solid black;">{$MOD.LBL_VAT} 22%</th> {/if}
{ if $showNetto23 }<th class="sorter-saas" style="border-top: 1px solid black;">{$MOD.LBL_NET_SALES} 23%</th>{/if}
{ if $showNetto23 }<th class="sorter-saas" style="border-top: 1px solid black;">{$MOD.LBL_VAT} 23%</th>{/if}
{ if $showNetto0 }<th class="sorter-saas" style="border-top: 1px solid black;">{$MOD.LBL_NET_SALES} 0%</th> {/if}
<th class="sorter-saas" style="border-top: 1px solid black; border-right: 1px solid black;">{$MOD.LBL_SUM_VAT}</th>
<!-- <th class="sorter-saas">{$MOD.LBL_COST_OF}</th> -->
</tr>
</thead>
<tfoot>
<tr>
<th colspan="7">Suma strony</th>
<th style="text-align:right;">{ $PART.partSum.brutto|number_format:2:",":"." }</th>
{ if $showNetto7 }<th style="text-align:right;">{ $PART.partSum.netto7|number_format:2:",":"." }</th>{/if}
{ if $showNetto7 }<th style="text-align:right;">{ $PART.partSum.vat7|number_format:2:",":"." }</th>{/if}
{ if $showNetto8 }<th style="text-align:right;">{ $PART.partSum.netto8|number_format:2:",":"." }</th>{/if}
{ if $showNetto8 }<th style="text-align:right;">{ $PART.partSum.vat8|number_format:2:",":"." }</th>{/if}
{ if $showNetto22 }<th style="text-align:right;">{ $PART.partSum.netto22|number_format:2:",":"." }</th>{/if}
{ if $showNetto22 }<th style="text-align:right;">{ $PART.partSum.vat22|number_format:2:",":"." }</th>{/if}
{ if $showNetto23 }<th style="text-align:right;">{ $PART.partSum.netto23|number_format:2:",":"." }</th>{/if}
{ if $showNetto23 }<th style="text-align:right;">{ $PART.partSum.vat23|number_format:2:",":"." }</th>{/if}
{ if $showNetto0 }<th style="text-align:right;">{ $PART.partSum.netto0|number_format:2:",":"." }</th>{/if}
<th class="align-right">{ $PART.partSum.vat|number_format:2:",":"." }</th>
<!-- <th class="align-right">{ $PART.partSum.purchase_price|number_format:2:",":"."}</th> -->
</tr>
<tr>
<th colspan="7">Suma z przeniesienia:</th>
<th style="text-align:right;">{ $PART.transferSum.brutto|number_format:2:",":"." }</th>
{ if $showNetto7 }<th style="text-align:right;">{ $PART.transferSum.netto7|number_format:2:",":"." }</th>{/if}
{ if $showNetto7 }<th style="text-align:right;">{ $PART.transferSum.vat7|number_format:2:",":"." }</th>{/if}
{ if $showNetto8 }<th style="text-align:right;">{ $PART.transferSum.netto8|number_format:2:",":"." }</th>{/if}
{ if $showNetto8 }<th style="text-align:right;">{ $PART.transferSum.vat8|number_format:2:",":"." }</th>{/if}
{ if $showNetto22 }<th style="text-align:right;">{ $PART.transferSum.netto22|number_format:2:",":"." }</th>{/if}
{ if $showNetto22 }<th style="text-align:right;">{ $PART.transferSum.vat22|number_format:2:",":"." }</th>{/if}
{ if $showNetto23 }<th style="text-align:right;">{ $PART.transferSum.netto23|number_format:2:",":"." }</th>{/if}
{ if $showNetto23 }<th style="text-align:right;">{ $PART.transferSum.vat23|number_format:2:",":"." }</th>{/if}
{ if $showNetto0 }<th style="text-align:right;">{ $PART.transferSum.netto0|number_format:2:",":"." }</th>{/if}
<th class="align-right">{ $PART.transferSum.vat|number_format:2:",":"." }</th>
<!-- <th class="align-right">{ $PART.transferSum.purchase_price|number_format:2:",":"."}</th> -->
</tr>
<tr>
<th colspan="7">Suma razem:</th>
<th style="text-align:right;">{ $PART.partSum.brutto+$PART.transferSum.brutto|number_format:2:",":"." }</th>
{ if $showNetto7 }<th style="text-align:right;">{ $PART.partSum.netto7+$PART.transferSum.netto7|number_format:2:",":"." }</th>{/if}
{ if $showNetto7 }<th style="text-align:right;">{ $PART.partSum.vat7+$PART.transferSum.vat7|number_format:2:",":"." }</th>{/if}
{ if $showNetto8 }<th style="text-align:right;">{ $PART.partSum.netto8+$PART.transferSum.netto8|number_format:2:",":"." }</th>{/if}
{ if $showNetto8 }<th style="text-align:right;">{ $PART.partSum.vat8+$PART.transferSum.vat8|number_format:2:",":"." }</th>{/if}
{ if $showNetto22 }<th style="text-align:right;">{ $PART.partSum.netto22+$PART.transferSum.netto22|number_format:2:",":"." }</th>{/if}
{ if $showNetto22 }<th style="text-align:right;">{ $PART.partSum.vat22+$PART.transferSum.vat22|number_format:2:",":"." }</th>{/if}
{ if $showNetto23 }<th style="text-align:right;">{ $PART.partSum.netto23+$PART.transferSum.netto23|number_format:2:",":"." }</th>{/if}
{ if $showNetto23 }<th style="text-align:right;">{ $PART.partSum.vat23+$PART.transferSum.vat23|number_format:2:",":"." }</th>{/if}
{ if $showNetto0 }<th style="text-align:right;">{ $PART.partSum.netto0+$PART.transferSum.netto0|number_format:2:",":"." }</th>{/if}
<th class="align-right">{ $PART.partSum.vat+$PART.transferSum.vat|number_format:2:",":"." }</th>
<!-- <th class="align-right">{ $PART.partSum.purchase_price+$PART.transferSum.purchase_price|number_format:2:",":"."}</th> -->
</tr>
{if $smarty.foreach.part.index == $dataCount-1 }
<tr>
<th colspan="15" style="text-align: left; padding: 5px; background-color: white; border-bottom: 2px solid black; color: #000; font-size: 12px;">Koniec wydruku</th>
</tr>
{/if}
</tfoot>
<tbody aria-live="polite" aria-relevant="all">
{foreach from=$PART key=key item=ROW name=loop}
{assign var=partCount value=$PART|@count}
{if $smarty.foreach.loop.index != $partCount-1 and $smarty.foreach.loop.index != $partCount-2 }
<tr>
<td>{$position}</td>
<td>{$ROW.document_no }</td>
<td>{$ROW.register_date}</td>
<td>{$ROW.sell_date }</td>
<td>{$ROW.account.to_vatid}</td>
<td>{$ROW.account.name}</td>
<td>{$ROW.account.register_address_postalcode} {$ROW.account.register_address_city}</td>
<td style="text-align:right;">{$ROW.total_brutto|number_format:2:",":"."}</td>
{ if $showNetto7 }<td style="text-align:right;">{$ROW.netto7|number_format:2:",":"."}</td>{/if}
{ if $showNetto7 }<td style="text-align:right;">{$ROW.vat7|number_format:2:",":"."}</td>{/if}
{ if $showNetto8 }<td style="text-align:right;">{$ROW.netto8|number_format:2:",":"."}</td>{/if}
{ if $showNetto8 }<td style="text-align:right;">{$ROW.vat8|number_format:2:",":"."}</td>{/if}
{ if $showNetto22 }<td style="text-align:right;">{$ROW.netto22|number_format:2:",":"."}</td>{/if}
{ if $showNetto22 }<td style="text-align:right;">{$ROW.vat22|number_format:2:",":"."}</td>{/if}
{ if $showNetto23 }<td style="text-align:right;">{$ROW.netto23|number_format:2:",":"."}</td>{/if}
{ if $showNetto23 }<td style="text-align:right;">{$ROW.vat23|number_format:2:",":"."}</td>{/if}
{ if $showNetto0 }<td style="text-align:right;">{$ROW.netto0|number_format:2:",":"."}</td>{/if}
<td style="text-align:right;">{$ROW.netto23*0.23|number_format:2:",":"."}</td>
<!-- <td style="text-align:right;">{$ROW.purchase_price|number_format:2:",":"."}</td> -->
</tr>
{assign var=position value=$position+1}
{/if}
{/foreach}
</tbody>
</table>
{if $smarty.foreach.part.index != $dataCount-1 }
<newpage>
{/if}
{/foreach}
</div>
</body></html>

View File

@@ -0,0 +1,97 @@
<style type="text/css">
{literal}
table.report {
width: 100%;
border-spacing: 1px;
font-family: 'Calibri';
font-size: 8pt;
}
table.report thead tr th,
table.report tbody tr td {
border: 1px solid #CCCCCC;
text-align: center;
}
table.report thead tr th {
background: #ebebeb;
}
table.report tbody tr.odd {
background: #f6f6f6;
}
table.report tbody tr.even {
background: #ffffff;
}
{/literal}
</style>
<table class="report" style="padding-top: 0px; margin-top:0px;width:100%;font-size:8pt;">
<thead>
<tr>
<th>{$MOD.LBL_NUMBER_LP}</th>
<th>{$MOD.LBL_DOCUMENT_NO}<br>{$MOD.LBL_CREATE_LAB}</th>
<th>{$MOD.LBL_TITLE}</th>
<th>{$MOD.LBL_PARENT_NAME}</th>
<th>{$MOD.LBL_AMOUNT_PLUS}</th>
<th>{$MOD.LBL_AMOUNT_MINUS}</th>
</tr>
</thead>
<tbody>
{foreach from=$DATA item=poz key=CATNAME name=loop}
{if $poz.type_id!=''}
<tr class="{$poz.class}">
<td width="5%">{$poz.number}</td>
<td width="15%" style="text-align:left;">
<table class="report" style="padding-top: 0px; margin-top:0px;">
<tr class="{$poz.class}">
<td style="text-align:left;">{$poz.document_no}</td>
</tr>
<tr>
<td style="text-align:left;">{$poz.date_entered|date_format:"%d.%m.%Y"}</td>
</tr>
</table>
</td>
<td width="22%" style="text-align:left;">{$poz.description}</td>
<td width="24%" style="text-align:left;">{$poz.parent_name}</td>
<td width="17%" style="text-align:right;">{if $poz.type_id==0} {$poz.amount|number_format:2:",":"."} {else} &nbsp;{/if}</td>
<td width="17%" style="text-align:right;">{if $poz.type_id==1} {$poz.amount|number_format:2:",":"."} {else} &nbsp;{/if}
</td>
</tr>
{assign var="i" value=$poz.number}
{/if}
{/foreach}
{assign var="currow" value=$poz.number+1}
<tr class="{if $currow%2}even{else}odd{/if}">
<td width="45%" style="border: 0px; background: #fff;" colspan="2">&nbsp;</td>
<td width="15%" style="border: 0px; background: #fff;"></td>
<td width="15%" style="text-align:left;">{$MOD.LBL_VALUE}</td>
<td width="15%" style="text-align:right;">{$DATA.in|number_format:2:",":"."}</td>
<td width="20%" style="text-align:right;">{$DATA.out|number_format:2:",":"."}</td>
</tr>
{assign var="currow" value=$currow+1}
<tr class="{if $currow%2}even{else}odd{/if}">
<td width="45%" style="border: 0px; background: #fff;" colspan="2">&nbsp;</td>
<td width="15%" style="border: 0px; background: #fff;"></td>
<td width="15%" style="text-align:left;">{$MOD.LBL_VALUE_BEFORE}:</td>
<td width="15%" style="text-align:right;">{$CASH_BEFORE|number_format:2:",":"."}</td>
<td width="20%" style="text-align:right;"></td>
</tr>
{assign var="currow" value=$currow+1}
<tr class="{if $currow%2}even{else}odd{/if}">
<td width="45%" style="border: 0px; background: #fff;" colspan="2">&nbsp;</td>
<td width="15%" style="border: 0px; background: #fff;"></td>
<td width="15%" style="text-align:left;">{$MOD.LBL_VALUE_TOTAL}:</td>
<td width="15%" style="text-align:right;">{$CASH_NOW|number_format:2:",":"."}</td>
<td width="20%" style="text-align:right;"></td>
</tr>
</tbody>
</table>

View File

@@ -0,0 +1,367 @@
<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/javascript/jquery.blockUI.js"></script>
<script type="text/javascript" src="modules/EcmReports/javascript/ProductOperationHistory.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' // <- This is what makes it open in a new window.
);
}
{/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 operacji magazynowych produktu 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="ProductOperations">
<input type="hidden" name="module" value="EcmReports" />
<input type="hidden" name="action" value="ProductOperationHistory" />
<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" required>
<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">Produkt</td>
<td class="dataField" width="10%" nowrap="nowrap">
<input type="text" name="product_name" id="product_name" oninput="SearchProduct()" style="width: 500px;" value="{$product_name}" required>
<input type="hidden" name="product_id" id="product_id" required value="{$product_id}">
<button onclick="{literal}open_popup(&quot;EcmProducts&quot;, 600, 400, &quot;&quot;, true, false, {&quot;call_back_function&quot;:&quot;set_return&quot;,&quot;form_name&quot;:&quot;ProductOperations&quot;,&quot;field_to_name_array&quot;:{&quot;id&quot;:&quot;product_id&quot;,&quot;name&quot;:&quot;product_name&quot;}}, &quot;single&quot;, true);{/literal}" value="Wybierz" class="button firstChild" accesskey="T" title="Wybierz [Alt+T]" tabindex="" name="btn_parent_name_basic" type="button">
<img src="themes/default/images/id-ff-select.png?s=bed8cd35065048ceebdc639ebe305e2c&amp;c=1"></button>
<button value="Wyczyść" onclick="this.form.product_id.value = ''; this.form.product_name.value = '';" class="button lastChild" accesskey="C" title="Wyczyść[Alt+C]" tabindex="" name="btn_clr_parent_name_basic" type="button"><img src="themes/default/images/id-ff-clear.png?s=bed8cd35065048ceebdc639ebe305e2c&amp;c=1"></button>
</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>
{if $SHOW_RESULT==true}
<table>
<tr>
<td>
Wybrany produkt:
</td>
<td>
{$product_name}
</td>
</tr>
<tr>
<td>
Indeks:
</td>
<td>
{$product_indeks}
</td>
</tr>
<tr>
<td>
Stan początkowy (ilość):
</td>
<td style="text-align: right;">
{$start_quantity} {$product_unit}
</td>
</tr>
<tr>
<td>
Stan początkowy (wartość):
</td>
<td style="text-align: right;">
{$start_value|number_format:2:",":"."}
</td>
</tr>
</table>
<div class="listViewBody">
<table width="100%" cellspacing="0" cellpadding="0" border="0" class="list view">
<tbody><tr height="20">
<th width="1%" nowrap="nowrap" class="selectCol" scope="col">
L.p.
</th>
<th width="0%" nowrap="nowrap" scope="col">
<div align="left" width="100%" style="white-space: nowrap;">
Data
</div>
</th>
<th width="37%" nowrap="nowrap" scope="col">
<div align="left" width="100%" style="white-space: nowrap;">
Dokument
</div>
</th>
<th width="27%" nowrap="nowrap" scope="col">
<div align="left" width="100%" style="white-space: nowrap;">
Kontrahent
</div>
</th>
<th width="18%" nowrap="nowrap" scope="col">
<div align="right" width="100%" style="white-space: nowrap;">
Przychód
</div>
</th>
<th width="10%" nowrap="nowrap" scope="col">
<div align="right" width="100%" style="white-space: nowrap;">
Rozchód
</div>
</th>
<th width="41%" nowrap="nowrap" scope="col">
<div align="right" width="100%" style="white-space: nowrap;">
Stan po obr.
</div>
</th>
</tr>
{foreach from=$DATA key="key" item="item" name=loop}
<tr height="20" class="evenListRowS1">
<td width="1%" class="nowrap">
{$item.lp}
</td>
<td valign="top" align="left" scope="row">
{$item.date_entered|date_format:"%d.%m.%Y"}
</td>
<td valign="top" align="left" scope="row">
{$item.doc_code} {$item.doc_name}
</td>
<td valign="top" align="left" scope="row">
{$item.doc_parent_name}
</td>
<td valign="top" align="right" scope="row">
{if $item.type==0}
{if $item.correct=='correct'}
0 {$product_unit}<br>0,00 zł
{else}
{$item.quantity|number_format:2:",":"."} {$product_unit}<br>{$item.value|number_format:2:",":"."}
{/if}
{else}
0 {$product_unit}<br>0,00 zł
{/if}
</td>
<td valign="top" align="right" scope="row">
{if $item.type==1}
{$item.quantity|number_format:2:",":"."} {$product_unit}<br>{$item.value|number_format:2:",":"."}
{else}
{if $item.correct=='correct'}
{$item.quantity|number_format:2:",":"."} {$product_unit}<br>{$item.value|number_format:2:",":"."}
{else}
0 {$product_unit}<br>0,00 zł
{/if}
{/if}
</td>
<td valign="top" align="right" scope="row">
{$item.after_quantity|number_format:2:",":"."} {$product_unit}<br>{$item.after_value|number_format:2:",":"."}
</td>
</tr>
{/foreach}
<tr height="20" class="evenListRowS1">
<td width="1%" class="nowrap">
</td>
<td valign="top" align="left" scope="row">
</td>
<td valign="top" align="left" scope="row">
</td>
<td valign="top" align="right" scope="row">
<b>Razem:</b>
</td>
<td valign="top" align="right" scope="row">
<b>{$sumTable.in_quantity|number_format:2:",":"."} {$product_unit}<br>{$sumTable.in_value|number_format:2:",":"."} zł</b>
</td>
<td valign="top" align="right" scope="row">
<b>{$sumTable.out_quantity|number_format:2:",":"."} {$product_unit}<br>{$sumTable.out_value|number_format:2:",":"."} zł</b>
</td>
<td valign="top" align="right" scope="row">
<b>{$sumTable.after_quantity|number_format:2:",":"."} {$product_unit}<br>{$sumTable.after_value|number_format:2:",":"."} zł</b>
</td>
</tr>
</table>
</div>
{/if}

View File

@@ -0,0 +1,273 @@
<script>
{literal}
$(document).ready(function(){
$(".rowShowHide").hide();
$(".tablesShowHide").hide();
// Listener odpowiadający za akcje po kliknięciu na przycisk "Exportuj do programu Excel"
$(".showTables").bind("click",function(){
if($(this).attr("class")=="plusStyle showTables")
{
//pobieramy następny wiersz tabeli którą chcemy pokazac po czym go wyswietlamy
var nextTBody = $(this).parent().parent().parent().next();
while($(nextTBody).attr("id")!="stopTables")
{
//sprawdzamy czy kategoria
if($(nextTBody).attr("class")=="tablesorter-infoOnly tablesShowHide")
{
$(nextTBody).show();
}
nextTBody=$(nextTBody).next();
}
$(this).html("[-]");
$(this).attr("class","plusStyle hideTables");
}else if($(this).attr("class")=="plusStyle hideTables")
{
//pobieramy następny wiersz tabeli którą chcemy schowac po czym go chowamy
var nextTBody = $(this).parent().parent().parent().next();
while($(nextTBody).attr("id")!="stopTables")
{
//tu chowamy wszystko więc nie sprawdzamy kategori
$(nextTBody).hide();
var changePlusMinus = $(nextTBody).children().children();
if($(changePlusMinus[0]).children("a").attr("class")=="hideRows")
{
$(changePlusMinus[0]).children("a").attr("class","showRows");
$(changePlusMinus[0]).children("a").html("[+]");
}
nextTBody=$(nextTBody).next();
}
$(this).html("[+]");
$(this).attr("class","plusStyle showTables");
}
});
});
{/literal}
</script>
<h1>Raport aktywności użytkowników</h1>
<ul class="tablist" style="width:100%;"></ul>
<form action="index.php" method="get" name="RaportAktywnosci">
<input type="hidden" id="module" name="module" value="EcmReports"/>
<input type="hidden" id="action" name="action" value="RaportAktywnosci"/>
<input type="hidden" id="process" name="process" value="1"/>
<table class="tabForm" cellspacing="0" cellpadding="0" border="0" style="border-top: 0px none; margin-bottom: 4px;width:100%">
<tr>
<td class="dataLabel" width="5%" nowrap="nowrap">Data od: </td>
<td class="dataField" width="8%" nowrap="nowrap">
<input id="date_from" name="date_from" type="text" maxlength="10" size="11" tabindex="" title="" 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">
Calendar.setup ({ldelim}
inputField : "date_from",
daFormat : "%d.%m.%Y",
button : "date_from_trigger",
singleClick : true,
dateStr : "",
step : 1
{rdelim}
);
</script>
</td>
</tr>
<tr>
<td class="dataLabel" width="5%" nowrap="nowrap">Data do: </td>
<td class="dataField" width="8%" nowrap="nowrap">
<input autocomplete="off" name="date_to" id="date_to" value="{$date_to}" title="" 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>
</tr>
</table>
<input type="submit" class="button" value="Wykonaj"/>
<input type="button" class="button" value="Wyczyść" onClick = "window.location='index.php?module=EcmReports&action=RaportAktywnosci'"/>
</form>
{if isset($lists)}
<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/tablesorter/themes/blue/style.css"/>
<link rel="stylesheet" type="text/css" href="include/jQuery/jquery-ui/themes/base/jquery-ui.css"/>
<style type="text/css">
{literal}
thead, tfoot {font-weight: bold;}
.additionalColumn {
background-color: #87CCED;
border-top: 1px solid black;
}
.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: #E8E8E8;
color: #343432;
}
table.tablesorter tbody tr.alt-row:hover td {
background: #E8E8E8;
color: #343432;
}
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="myTable" class="tablesorter tablesorter-blue" role="grid">
<thead>
<tr class="tablesorter-headerRow" role="row">
<th width="10%" 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">Użytkownik</th>
{foreach from=$moduleLabels item=label key=labelkey name=loop}
<th width="{$colWidth}%" 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">{$label}</th>
{/foreach}
</tr>
</thead>
{foreach from=$lists item=list key=listkey name=loop}
{* Table headers *}
<tbody id="functions-core" class="tablesorter-infoOnly">
<tr class="static category">
<td class="oddListRowS1 alignLeft width="10%"><a class="plusStyle showTables">[+]</a> <b>{$users[$listkey].first_name} {$users[$listkey].last_name}</b></td>
<td class="oddListRowS1 sumRow" width="{$colWidth}%"><b>{$list.accounts|@count}</b></td>
<td class="oddListRowS1 sumRow" width="{$colWidth}%"><b>{$list.ecmproducts|@count}</b></td>
<td class="oddListRowS1 sumRow" width="{$colWidth}%"><b>{$list.ecmquotes|@count}</b></td>
<td class="oddListRowS1 sumRow" width="{$colWidth}%"><b>{$list.ecmsales|@count}</b></td>
<td class="oddListRowS1 sumRow" width="{$colWidth}%"><b>{$list.ecminvoiceouts|@count}</b></td>
<td class="oddListRowS1 sumRow" width="{$colWidth}%"><b>{$list.ecmprepaymentinvoices|@count}</b></td>
<td class="oddListRowS1 sumRow" width="{$colWidth}%"><b>{$list.ecmreceipts|@count}</b></td>
<td class="oddListRowS1 sumRow" width="{$colWidth}%"><b>{$list.notes|@count}</b></td>
<td class="oddListRowS1 sumRow" width="{$colWidth}%"><b>{$list.tasks|@count}</b></td>
<td class="oddListRowS1 sumRow" width="{$colWidth}%"><b>{$list.documents|@count}</b></td>
</tr>
</tbody>
<tbody aria-live="polite" aria-relevant="all" class="tablesorter-infoOnly tablesShowHide">
{foreach from=$OrderByDateList[$listkey] item=data name=loop2}
{if $smarty.foreach.loop2.index % 2 == 1}
<tr role="row" class="contractor">
{else}
<tr class="contractor" role="row">
{/if}
<td class="oddListRowS1 alignLeft" style="text-align:right;">
{$smarty.foreach.loop2.index+1}
</td>
<td class="oddListRowS1 alignLeft" style="text-align:right;">
{$data.date_entered|date_format:"%d.%m.%Y %H:%M:%S"}
</td>
<td class="oddListRowS1 alignLeft" style="text-align:right;" colspan="9">
{if $data.module=='accounts'}
Dodano nowego <a target="_blank" href="index.php?module=Accounts&action=DetailView&record={$data.id}">kontrahenta</a>
{/if}
{if $data.module=='ecmproducts'}
Dodano nowy <a target="_blank" href="index.php?module=EcmProducts&action=DetailView&record={$data.id}">produkt</a>
{/if}
{if $data.module=='ecmquotes'}
Dodano nową <a target="_blank" href="index.php?module=EcmQuotes&action=DetailView&record={$data.id}">ofertę</a>
{/if}
{if $data.module=='ecmsales'}
Dodano nowe <a target="_blank" href="index.php?module=EcmSales&action=DetailView&record={$data.id}">zamówienie</a>
{/if}
{if $data.module=='ecminvoiceouts'}
Dodano nową <a target="_blank" href="index.php?module=EcmInvoiceOuts&action=DetailView&record={$data.id}">fakturę</a>
{/if}
{if $data.module=='ecmprepaymentinvoices'}
Dodano nową <a target="_blank" href="index.php?module=EcmPrepaymentInvoices&action=DetailView&record={$data.id}">fakturę zaliczkową</a>
{/if}
{if $data.module=='ecmreceipts'}
Dodano nowy <a target="_blank" href="index.php?module=EcmReceipts&action=DetailView&record={$data.id}">paragon</a>
{/if}
{if $data.module=='notes'}
Dodano nową <a target="_blank" href="index.php?module=Notes&action=DetailView&record={$data.id}">notatkę</a>
{/if}
{if $data.module=='tasks'}
Dodano nowe <a target="_blank" href="index.php?module=Tasks&action=DetailView&record={$data.id}">zadanie</a>
{/if}
{if $data.module=='documents'}
Dodano nowy <a target="_blank" href="index.php?module=Documents&action=DetailView&record={$data.id}">dokument</a>
{/if}
</td>
{/foreach}
</tbody>
<tbody id="stopTables"></tbody>
{/foreach}
</table>
{/if}

View File

@@ -0,0 +1,140 @@
<script type="text/javascript" src="modules/EcmReports/javascript/SendSMS.js"></script>
<link rel="stylesheet" type="text/css" href="modules/EcmReports/css/SearchTable.css"/>
<script src="include/jQuery/tablesorter/jquery.tablesorter.min.js"></script>
<link class="theme" rel="stylesheet" href="include/jQuery/tablesorter/themes/blue/style.css">
<style>
{literal}
.hidden{
display:none !important;
}
.show{
}
{/literal}
</style>
<h1>Raport wysłanych SMS'ów</h1>
<form action="index.php" method="get" name="ReportSalesByProduct">
<input type="hidden" name="module" value="EcmReports" />
<input type="hidden" name="action" value="SendSMS"/>
<input type="hidden" name="parentTab" value="Raporty" />
<table style="width:100%" class="edit view" id="SearchTable">
<tbody>
<tr>
<td>
Data od:
<input id="date_from" name="date_from" type="text" maxlength="10" size="11" title="{$MOD.LBL_DATE_FROM}" value="{$date_from_value}">
<img id="date_from_trigger" src="themes/default/images/jscalendar.gif">
</td>
<td rowspan='2'>
<p>
Numer telefonu:
<input id="number" name="number" type="text" maxlength="10" size="11" title="{$MOD.LBL_DATE_FROM}" value="{$number}">
</p><br>
<p>
{$MOD.LBL_CONTRACTOR}:
<input type="hidden" id="account_id" name="account_id" value="{$ACCOUNT_ID}">
<input type="text" id="account_name" name="account_name" value="{$ACCOUNT_NAME}">
<button
type="button"
id="selectAccount"
value="{$APP.LBL_ADD_BUTTON}"
title="{$MOD.TIP_CHOOSE_ACCOUNT}">
<img src="{sugar_getimagepath file="id-ff-select.png"}">
</button>
<button
type="button"
id="clearAccount"
value="{$MOD.LBL_CLEAR}"
title="{$MOD.LBL_CLEAR}">
<img src="{sugar_getimagepath file='id-ff-clear.png'}">
</button>
</p>
</td>
<td rowspan='2'>
Ukryj puste:
<input type="checkbox" name="empty" value="1" {if $empty==1}checked{/if}>
</td>
</tr>
<tr>
<td> Data do
<input id="date_to" name="date_to" type="text" maxlength="10" size="11" title="{$MOD.LBL_DATE_TO}" value="{$date_to_value}">
<img id="date_to_trigger" src="themes/default/images/jscalendar.gif">
</td>
</tr>
</tbody>
</table>
<input class="button" name="submit" value="Wykonaj" type="submit">
<input class="button" name="clear" value="{$MOD.LBL_CLEAR}" type="button" onclick="location.href='index.php?module=EcmReports&action=SendSMS';">
{if $executed==1}
{if $data!=null}
<input class="button" name="show" id="show" value="Pokaż transakcje" type="button" onclick="showHide();">
<input id="status" value="0" type="hidden" >
{/if}
{/if}
</form>
{if $executed==1}
<table id="myTable" class="tablesorter">
<thead>
<tr>
<th class='sortby' style="width:1%">L.p</th>
<th class='sortby' style="width:40%">Kontrahent</th>
<th class='sortby' style="width:5%">Numer</th>
<th class='sortby' style="width:34%">Treść</th>
<th class='sortby' style="width:5%">Kwota</th>
<th class='sortby' style="width:5%">Data</th>
</tr>
</thead>
<tbody>
{if $data!=null}
{foreach from=$data item=item key=item_name}
<tr>
<td>{$item.no}</td>
<td><img src="modules/EcmSales/images/add_position.gif" onclick="showPosition('{$item.id}');">&nbsp;{$item.parent_name}</td>
<td>{if $item.number!=''}<b>{$item.number}</b>{else}&nbsp;{/if}</td>
<td>{$item.description}</td>
<td style="text-align:right;"><b>{$item.total|number_format:2:",":"."}</b></td>
<td>{$item.send_date|date_format:"%d.%m.%Y %H:%M:%S"}</td>
</tr>
{if $item.records|@count>0}
<tr class="hidden" id="tr_{$item.id}">
<td class="" id="td1_{$item.id}" colspan="2"></td>
<td class="" id="td2_{$item.id}" colspan="4">
<table id="myTable2" class="tablesorter">
<thead>
<tr>
<th class='sortby' style="width:1%">L.p</th>
<th class='sortby' style="width:70%">Transakcja</th>
<th class='sortby' style="width:15%">Kwota</th>
<th class='sortby' style="width:14%">Termin płatności</th>
</tr>
</thead>
<tbody>
{foreach from=$item.records item=item2 key=item_name2}
<tr>
<td>{$item2.no}</td>
<td>{$item2.name}</td>
<td style="text-align:right;"><b>{$item2.total|number_format:2:",":"."}</b></td>
<td>{$item2.payment_date|date_format:"%d.%m.%Y"}</td>
</tr>
{/foreach}
</tbody>
</table>
</td>
</tr>
{/if}
{/foreach}
{else}
<tr>
<td style="width:100%;text-align:center;" colspan="6"><b>Brak danych do wyświetlenia</b></td>
</tr>
{/if}
</tbody>
</table>
{/if}

View File

@@ -0,0 +1,189 @@
<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 src="include/jQuery/jquery-2.1.0.min.js"></script>
<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.widgets.js"></script>
<script type="text/javascript" src="modules/EcmReports/javascript/ReportAcceptance.js"></script>
<style type="text/css">
{literal}
thead, tfoot {font-weight: bold;}
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: #E8E8E8;
color: #343432;
}
table.tablesorter tbody tr.alt-row:hover td {
background: #E8E8E8;
color: #343432;
}
.element{
position:fixed;
bottom: 0%;
width: 97%;
padding:10px;
font-family:Arial;
background-color: white;
border:1px solid black;
}
{/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>{$MOD.LBL_REPORT_ACCEPTANCE}</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="searchReportAcceptance" id="searchReportAcceptance">
<input type="hidden" name="module" value="EcmReports" />
<input type="hidden" name="action" value="ReportAcceptance" />
<input type="hidden" name="first_load" value ="{$first_load}"/>
<table style="border-top: 0px none; margin-bottom: 4px;width:100%" class="tabForm" border="0" cellpadding="0" cellspacing="0">
<tr>
{* Search by date_from *}
<td class="dataLabel" nowrap="nowrap"> Data od </td>
<td class="dataField" nowrap="nowrap">
<input id="date_from" name="date_from" type="text" maxlength="10" size="11" tabindex="" title="" 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">
Calendar.setup ({ldelim}
inputField : "date_from",
daFormat : "{$dateFormat}",
button : "date_from_trigger",
singleClick : true,
dateStr : "",
step : 1
{rdelim}
);
</script>
</td>
<td nowrap="nowrap" class="dataLabel">Nazwa Dokumentu:</td>
<td nowrap="nowrap" class="dataField">
<input type="text" value="{$doc_name}" size="60" id="doc_name" name="doc_name">
</td>
<td class="dataLabel" nowrap="nowrap">Status:</td>
<td class="dataField" nowrap="nowrap">
{html_options name=status options=$statusy selected=$status}
</td>
</tr>
<tr>
{* Search by date_to *}
<td class="dataLabel" nowrap="nowrap">Data do</td>
<td class="dataField" nowrap="nowrap">
<input autocomplete="off" name="date_to" id="date_to" value="{$date_to}" title="" 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 : "{$dateFormat}",
button : "date_to_trigger",
singleClick : true,
dateStr : "",
step : 1
{rdelim}
);
</script>
</td>
<td class="dataLabel" nowrap="nowrap">Kategoria:</td>
<td class="dataField" nowrap="nowrap">
<select id="category_id" name="category_id">
<option value="" label=""> </option
{foreach from=$category key=k item=v}
<option value="{$k}" label="{$v}"
{if $category_selected eq $k}
selected="selected"
{/if}
>{$v}</option>
{/foreach}
</select>
</td>
</tr>
</table>
</form>
<input class="button" name="submit" value="{$MOD.LBL_EXECUTE}" type="submit" form="searchReportAcceptance">
<input class="button" name="clear" value="{$MOD.LBL_CLEAR}" type="button" onclick="location.href='index.php?module=EcmReports&action=ReportAcceptance';">
<input class="button" name="print" id="print" value="PDF" type="submit" form="printReportAcceptance">
<form method="post" name="printReportAcceptance" action="index.php?module=EcmReports&action=printReportAcceptance&to_pdf=1" id="printReportAcceptance">
<table id="myTable" class="tablesorter tablesorter-blue" role="grid">
<thead>
<tr class="tablesorter-headerRow" role="row">
<th width="1%" class="header"><input type="checkbox" name="checkAll" id="checkAll"></th>
<th width="1%">Opis</th>
<th width="20%" 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_REPORT_ACCEPTANCE_DOCNAME}</th>
<th width="1%" class="sorter-saas tablesorter-header tablesorter-headerUnSorted" data-column="2" 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_DATE_CREATED}</th>
<th width="1%" class="sorter-saas tablesorter-header tablesorter-headerUnSorted" data-column="3" 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_REPORT_ACCEPTANCE_DOCDATE}</th>
<th width="5%" class="sorter-saas tablesorter-header tablesorter-headerUnSorted" data-column="4" 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_REPORT_ACCEPTANCE_CATEGORY}</th>
<th width="30%" 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">{$MOD.LBL_REPORT_ACCEPTANCE_DES}</th>
<th width="3%" 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">{$MOD.LBL_VALUE}</th>
</tr>
</thead>
<tbody>
{foreach from=$DATA item=i}
<tr>
<td><input type="checkbox" id="box_{$i.docid}" name="box_{$i.docid}" value='{$i.docid}'></td>
<td style="text-align: center">
{if $i.docreport == 1}
<input type="button" onclick="getDes('{$i.docid}')" value="Opis">
{else}
brak
{/if}
</td>
<td><a href="index.php?module=Documents&action=DetailView&record={$i.docid}">{$i.docname}</a></td>
<td>{$i.docdateentered}</td>
<td>{$i.docdate}</td>
<td>{$i.doccategory}</td>
<td>{$i.docdes}</td>
<td style="text-align: right;">{$i.docwartosc}</td>
</tr>
{/foreach}
</tbody>
<tfoot>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td style="text-align: right;">Suma:</td>
<td style="text-align: right;">{$SUMA}</td>
</tr>
</tfoot>
</form>
</table>
<div class="element" id="raport" style="display: none"></div>

View File

@@ -0,0 +1,198 @@
<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="include/jQuery/tablesorter-master/jquery.tablesorter.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/ReportBuyesByVat.js"></script>
{*<script type="text/javascript" src="https://www.google.com/jsapi"></script>*}
<style type="text/css">
{literal}
thead, tfoot {font-weight: bold;}
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: #E8E8E8;
color: #343432;
}
table.tablesorter tbody tr.alt-row:hover td {
background: #E8E8E8;
color: #343432;
}
.element{
position:fixed;
bottom: 0%;
width: 97%;
padding:10px;
font-family:Arial;
background-color: white;
border:1px solid black;
}
{/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>{$MOD.LBL_REPORT} {$MOD.LBL_REPORT_RECEIVE_REGISTER}</h2>
</td>
</tr>
</table>
<br>
<ul class="tablist" style="width:100%;">
<li>
<a class="current" href="#">{$MOD.LBL_SEARCH}</a>
</li>
</ul>
<form action="index.php" method="get" name="where" id="where">
<input type="hidden" name="module" value="EcmReports" />
<input type="hidden" name="action" value="ReportBuyesByVat" />
<input type="hidden" name="parentTab" value="Raporty"/>
<table style="border-top: 0px none; margin-bottom: 4px;width:100%" class="tabForm" border="0" cellpadding="0" cellspacing="0">
<tr>
<td style="white-space: nowrap">{$MOD.LBL_DATE_FROM}
<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: "{$dateFormat}",
button: "date_from_trigger",
singleClick: true,
dateStr: "",
step: 1
{rdelim}
);
</script>
</td>
<td style="white-space: nowrap">{$MOD.LBL_DATE_TO}
<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: "{$dateFormat}",
button: "date_to_trigger",
singleClick: true,
dateStr: "",
step: 1
{rdelim}
);
</script>
</td>
<td class="dataLabel" width="10%" nowrap="nowrap">Kategoria dokumentu</td>
<td class="dataField" width="30%" nowrap="nowrap">
<select name="category[]" multiple="multiple">
{foreach from=$category item=c key=k }
<option value="{$k}" {if @in_array($k, $category_selected) } selected="true" {/if}>{$c}</option>
{/foreach}
</select>
</td>
</tr>
</table>
</form>
<input class="button" value="{$MOD.LBL_EXECUTE}" type="submit" form="where">
<input class="button" value="{$MOD.LBL_CLEAR}" type="button" onclick="location.href = 'index.php?module=EcmReports&action=ReportBuyesByVat&amp;parentTab=Raporty';">
<!-- <input id="excelEksport" class="button" name="importToExcel" value="{$MOD.BTN_EXCEL_EXPORT}" type="button" onclick="excelExport();"> -->
<input id="pdfEksport" class="button" name="importToPDF" value="{$MOD.BTN_PDF_EXPORT}" type="button" >
<table class="tablesorter tablesorter-blue" role="grid" id='table'>
<thead>
<tr class="tablesorter-headerRow" role="row">
<th 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 width="9%" style = "text-align: left">{$MOD.LBL_DOC_NUMBER}</th>
<th 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 width="6%" style = "text-align: left">{$MOD.LBL_CREATE_LAB}</th>
<th class="sorter-text tablesorter-header tablesorter-headerUnSorted" data-column="2" 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 width="6%" style = "text-align: left">{$MOD.LBL_SALE_DATE}</th>
<th class="sorter-text tablesorter-header tablesorter-headerUnSorted" data-column="3" 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 width="8%" style = "text-align: left">{$MOD.LBL_SALES_NIP}</th>
<th class="sorter-text tablesorter-header tablesorter-headerUnSorted" data-column="4" 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 width="13%" style = "text-align: left">{$MOD.LBL_LIST_SUBJECT}</th>
<th class="sorter-text 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 width="8%" style = "text-align: left">{$MOD.LBL_ADDRESS}</th>
<th class="sorter-text 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 width="5%" style = "text-align: left">{$MOD.LBL_BUYER_VALUE_BRUTTO}</th>
{foreach from= $vat_value key= t item= w}
<th class="sorter-text tablesorter-header tablesorter-headerUnSorted" data-column="7" 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 width="4%" style = "text-align: left">{$MOD.LBL_BUYER_VALUE_NETTO} {$t}</th>
{if $w.sumavat != NULL}
<th class="sorter-text tablesorter-header tablesorter-headerUnSorted" data-column="8" 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 width="4%" style = "text-align: left">{$MOD.LBL_VAT} {$t}</th>
{/if}
{/foreach}
<th class="sorter-text tablesorter-header tablesorter-headerUnSorted" data-column="9" 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 width="4%" style = "text-align: left">{$MOD.LBL_SUM_VAT}</th>
</tr>
</thead>
<tbody>
{foreach from= $data key= k item= i}
<tr>
<td> <a target="new" href="index.php?module=Documents&offset=35&stamp=1429090400048670400&return_module=Documents&action=DetailView&record={$i.document_id}">{$i.document_number}</a></td>
<td>{$i.document_date|date_format:"%d.%m.%Y"}</td>
<td>{$i.register_date|date_format:"%d.%m.%Y"}</td>
<td>{$i.to_vatid}</td>
<td><a target="new" href="index.php?module=Accounts&return_module=Accounts&action=DetailView&record={$i.id}">{$i.name}</a></td>
<td>{$i.register_address_postalcode} {$i.register_address_city}</td>
<td style = "text-align: right">{$i.value|number_format:2:",":"."}</td>
{foreach from=$vat_value key=o item=j}
{assign var=prawdafalsz value=false}
{foreach from=$i.vaty item = e}
{if $o == $e.vat_value}
{assign var=prawdafalsz value=true}
{assign var=prawdafalszvat value=$e.vat}
{assign var=prawdafalsznetto value=$e.netto}
{/if}
{/foreach}
{if $prawdafalsz == true }
<td style = "text-align: right">{$prawdafalsznetto|number_format:2:",":"."}</td>
{if $j.sumavat != NULL}
<td style = "text-align: right">{$prawdafalszvat|number_format:2:",":"."}</td>
{/if}
{else}
<td style = "text-align: right">0,00</td>
{if $j.sumavat != NULL}
<td style = "text-align: right">0,00</td>
{/if}
{/if}
{/foreach}
<td style = "text-align: right">{$i.vatsumapozycja|number_format:2:",":"."}</td>
</tr>
{/foreach}
</tbody>
<tfoot style="background-color: #E8E8E8;">
<tr>
<td style="text-align: left;background-color: #E8E8E8; border: 1px solid #E8E8E8;">{$MOD.LBL_SUM}</td>
<td style="text-align: right;background-color: #E8E8E8; border: 1px solid #E8E8E8;" colspan="5"></td>
<td style="text-align: right;background-color: #E8E8E8; border: 1px solid #E8E8E8;">{$SumaBrutto|number_format:2:",":"."}</td>
{foreach from=$vat_value key =o item=j}
<td style="text-align: right;background-color: #E8E8E8; border: 1px solid #E8E8E8;">{$j.sumanetto|number_format:2:",":"."}</td>
{if $j.sumavat != NULL}
<td style="text-align: right;background-color: #E8E8E8; border: 1px solid #E8E8E8;">{$j.sumavat|number_format:2:",":"."}</td>
{/if}
{/foreach}
<td style="text-align: right;background-color: #E8E8E8; border: 1px solid #E8E8E8;">{$SumaVat|number_format:2:",":"."}</td>
</tr>
</tfoot>
</table>

View File

@@ -0,0 +1,367 @@
<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/ReportSales.js"></script>
<style type="text/css">
{literal}
thead, tfoot {font-weight: bold;}
.additionalColumn {
background-color: #87CCED;
border-top: 1px solid black;
}
.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: #E8E8E8;
color: #343432;
}
table.tablesorter tbody tr.alt-row:hover td {
background: #E8E8E8;
color: #343432;
}
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;
}
.green-text{
color:#2E8B57;
}
{/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>
{if $reportSales ==1}
Raport sprzedaży - cena produkcyjna
{else}
{$MOD.LBL_RAPORT_SALES}
{/if}
</h2>
</td>
</tr>
</table>
<br />
<ul class="tablist" style="width:100%;">
<li>
<a class="current" href="#">Podstawowe wyszukiwanie</a>
</li>
</ul>
<form action="index.php" method="get" name="searchReportSales">
<input type="hidden" name="module" value="EcmReports" />
<input type="hidden" name="action" value="{if $reportSales ==1}ReportSales2{else}ReportSales{/if}" />
<table style="border-top: 0px none; margin-bottom: 4px;width:100%" class="tabForm" border="0" cellpadding="0" cellspacing="0">
<tr>
{* Search by date_from *}
<td class="dataLabel" width="5%" nowrap="nowrap"> Data od </td>
<td class="dataField" width="10%" nowrap="nowrap">
<input id="date_from" name="date_from" type="text" maxlength="10" size="11" tabindex="" title="" 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">
Calendar.setup ({ldelim}
inputField : "date_from",
daFormat : "{$dateFormat}",
button : "date_from_trigger",
singleClick : true,
dateStr : "",
step : 1
{rdelim}
);
</script>
</td>
</td>
{* Search by date_to *}
<td class="dataLabel" width="5%" nowrap="nowrap">Data do</td>
<td class="dataField" width="10%" nowrap="nowrap">
<input autocomplete="off" name="date_to" id="date_to" value="{$date_to}" title="" 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 : "{$dateFormat}",
button : "date_to_trigger",
singleClick : true,
dateStr : "",
step : 1
{rdelim}
);
</script>
</td>
<td class="dataLabel" width="5%" nowrap="nowrap">{$MOD.LBL_GORUP_BY}</td>
<td class="dataField" width="10%" nowrap="nowrap">
<select name="groupByProducentsOrProducts">
<option value="product" { if $searchBy==""} selected="true" {/if} >produkt</option>
<option value="contractor" { if $searchBy=="contractor"} selected {/if} >kontrahent</option>
</select>
</td>
{* Open popup window to select contractor *}
<script language="JavaScript" type="text/javascript">
function getContractor(){ldelim}
open_popup("Accounts", 600, 400, "", true, false,
{ldelim}
"call_back_function":"set_return","form_name":"searchDailyReports","field_to_name_array":
{ldelim}"id":"account_id","name":"account_name"{rdelim}
{rdelim}, "single", true);
{rdelim};
</script>
</td>
<td class="dataLabel" width="5%" nowrap="nowrap">Typ dokumentu</td>
<td class="dataField" width="10%" nowrap="nowrap">
<select id="type" name="type">
<option value="%" { if $searchByType=="%"} selected="true" {/if} >normalny i korekta</option>
<option value="normal" { if $searchByType=="normal"} selected {/if} >normalny</option>
<option value="correct" { if $searchByType=="correct"} selected {/if} >korekta</option>
</select>
</td>
<td class="dataLabel" width="5%" nowrap="nowrap">Handlowiec</td>
<td class="dataField" width="10%" nowrap="nowrap">
<select id="user" name="selectUser">
<option value="" { if $selectUser==""} selected="true" {/if} >wszyscy</option>
{foreach from=$USERS item=USER key=count name=loop}
<option value="{$USER.id}" { if $selectUser==$USER.id} selected="true" {/if} >{$USER.first} {$USER.last}</option>
{/foreach}
</select>
</td>
<td class="dataLabel" width="5%" nowrap="nowrap">Grupa księgowa</td>
<td class="dataField" width="10%" nowrap="nowrap">
<select id="group_ks" name="group_ks">
{foreach from=$all_groups_ks item=GROUP key=COUNT name=loop}
{if $COUNT eq 0}
<option value="%" { if $group_ks=="%"} selected="true" {/if} >wszystkie</option>
{else}
<option value="{$COUNT}" { if $group_ks==$COUNT} selected="true" {/if} >{$GROUP}</option>
{/if}
{/foreach}
</select>
</td>
<td class="dataLabel" width="15%" nowrap="nowrap"></td>
</tr><tr>
<td class="dataLabel" width="5%" nowrap="nowrap">Typ sprzedaży</td>
<td class="dataField" width="10%" nowrap="nowrap">
<select id="pdf_type" name="selectPdfType">
<option value="" { if $selectedPdfType eq '' } selected="selected" {/if} >Wszystkie</option>
<option value="K" {if $selectedPdfType eq 'K'} selected="selected" {/if}>Kraj</option>
<option value="U" {if $selectedPdfType eq 'U'} selected="selected" {/if}>Unia</option>
<option value="E" {if $selectedPdfType eq 'E'} selected="selected" {/if}>Eksport</option>
</select>
</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={if $reportSales ==1}ReportSales2{else}ReportSales{/if}';">
<input id="excelEksport" class="button" name="importToExcel" value="{$MOD.BTN_EXCEL_EXPORT}" type="button">
<input id="pdfEksport" class="button" name="importToPDF" value="{$MOD.BTN_PDF_EXPORT}" type="button">
<br>
<br>
<table id="myTable" class="tablesorter tablesorter-blue" role="grid">
<thead>
<tr class="tablesorter-headerRow" role="row">
<th width="30%" 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">{$MOD.LBL_PRODUCTS}</th>
{if $searchBy=="product"}
<th width="10%" 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">Indeks</th>
{/if}
<th width="10%" class="sorter-saas tablesorter-header tablesorter-headerUnSorted" data-column="2" 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_SOLD_AMOUNT}</th>
<th width="10%" class="sorter-saas tablesorter-header tablesorter-headerUnSorted" data-column="3" 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_VALUE_SALES}</th>
{*<th width="8%" class="sorter-saas tablesorter-header tablesorter-headerUnSorted" data-column="4" 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">Wartość sprzedaży bez korekt</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">{$MOD.LBL_AVERAGE_PRICE}</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">{$MOD.LBL_COST}</th>
<th width="8%" class="sorter-saas tablesorter-header tablesorter-headerUnSorted" data-column="7" 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_MARGIN}</th>
{if $searchBy=="none"}
<th width="10%" class="sorter-saas tablesorter-header tablesorter-headerUnSorted" data-column="8" 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_STOCK_STATES}</th>
<th width="10%" class="sorter-saas tablesorter-header tablesorter-headerUnSorted" data-column="9" 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_STOCK_VALUE}</th>
{/if}
</tr>
</thead>
{foreach from=$DATA item=CAT key=CATNAME name=loop}
{* Table headers *}
<tbody id="functions-core" class="tablesorter-infoOnly">
<tr class="static category">
{if $CATNAME != ""}
<td class="oddListRowS1 alignLeft "><a class="plusStyle showTables">[+]</a><b> {$CATNAME}</b></td>
{/if}
{if $searchBy=="product"}
<td class="oddListRowS1 alignLeft" ></td>
{/if}
<td class="oddListRowS1 sumRow" ><b>{$DATA.$CATNAME.IloscSum|number_format:0:",":"." }</b></td>
<td class="oddListRowS1 sumRow" ><b>{$DATA.$CATNAME.SoldSum|number_format:2:",":"." }</b></td>
{* <td class="oddListRowS1 sumRow" ><b><span class='green-text'>{$DATA.$CATNAME.SoldSumNormal|number_format:2:",":"." }</span></b></td>*}
<td class="oddListRowS1 sumRow" ><b>{$DATA.$CATNAME.SredniaSum|number_format:2:",":"." }</b></td>
<td class="oddListRowS1 sumRow" ><b>{$DATA.$CATNAME.KosztSum|number_format:2:",":"." }</b></td>
<td class="oddListRowS1 sumRow" ><b>{$DATA.$CATNAME.MarzaSum|number_format:2:",":"." }%</b></td>
{if $searchBy=="none"}
<td class="oddListRowS1 sumRow" ><b>{$DATA.$CATNAME.StanSum|number_format:0:",":"." }</b></td>
<td class="oddListRowS1 sumRow" ><b>{$DATA.$CATNAME.WartoscSum|number_format:2:",":"." }</b></td>
{/if}
</tr>
</tbody>
{foreach from=$CAT item=CAT2 key=CAT2NAME name=loop}
{if $CAT2NAME!="IloscSum" && $CAT2NAME!="SoldSum" && $CAT2NAME!="SoldSumNormal" && $CAT2NAME!="IloscNormal" && $CAT2NAME!="SredniaSum" && $CAT2NAME!="KosztSum" && $CAT2NAME!="MarzaSum" && $CAT2NAME!="StanSum" && $CAT2NAME!="WartoscSum"}
<tbody id="functions-core" class="tablesorter-infoOnly tablesShowHide">
<tr class="subcategory">
<td class="oddListRowS1 alignLeft"><a class="showRows" style="color: cadetblue; text-decoration: none; cursor: pointer;">[+]</a><b> {$CAT2NAME}</b></td>
{if $searchBy=="product"}
<td class="oddListRowS1 alignLeft" ></td>
{/if}
<td class="oddListRowS1 sumRow" ><b>{$CAT.$CAT2NAME.IloscSum2|number_format:0:",":"." }</b></td>
<td class="oddListRowS1 sumRow" ><b>{$CAT.$CAT2NAME.SoldSum2|number_format:2:",":"." }</b></td>
{*<td class="oddListRowS1 sumRow" ><b><span class='green-text'>{$CAT.$CAT2NAME.SoldSumNormal2|number_format:2:",":"." }</span></b></td>*}
<td class="oddListRowS1 sumRow" ><b>{$CAT.$CAT2NAME.SredniaSum2|number_format:2:",":"." }</b></td>
<td class="oddListRowS1 sumRow" ><b>{$CAT.$CAT2NAME.KosztSum2|number_format:2:",":"." }</b></td>
<td class="oddListRowS1 sumRow" ><b>{$CAT.$CAT2NAME.MarzaSum2|number_format:2:",":"." }%</b></td>
</tr>
</tbody>
<tbody aria-live="polite" aria-relevant="all" class="rowShowHide">
{foreach from=$CAT2 item=ROW name=loop}
{if $ROW.name!="IloscSum" && $ROW.name!="SoldSum" && $ROW.name!="SredniaSum" && $ROW.name!="KosztSum" && $ROW.name!="MarzaSum" && $CAT2NAME!="StanSum" && $CAT2NAME!="WartoscSum" && $ROW.name!=""}
{if $smarty.foreach.loop.index % 2 == 1}
<tr role="row" class="contractor">
{else}
<tr class="contractor" role="row">
{/if}
{if $searchBy=="contractor"}
<td class="oddListRowS1 alignLeft" style="text-align:left;">
{if $CAT2NAME!="Reszta"}
<img category="{$CATNAME}" subcategory="{$CAT2NAME}" class="showProducts" style="color: graytext; text-decoration: none; cursor: pointer;" src="modules/EcmReports/images/search.gif" />
{/if}
<a href="index.php?module=Accounts&return_module=Accounts&action=DetailView&record={if $ROW.name != 'Media Saturn Holding'}{$ROW.parent_id}{else}1249{/if}" {if $ROW.name != 'Media Saturn Holding' }contractor="{$ROW.parent_id}"{else} contractor="1249" {/if} target="new">{$ROW.name}</a>
</td>
{else}
<td class="oddListRowS1 alignLeft" style="text-align:left;">
<img src="modules/EcmReports/images/search.gif" class="showContractors" style="color: graytext; text-decoration: none; cursor: pointer;" data-productid="{$ROW.id}" />
<a target="new" href="index.php?module=EcmProducts&action=index&return_module=EcmProducts&action=DetailView&record={$ROW.id}">
{$ROW.name}
</a>
</td>
{/if}
{if $searchBy=="product"}
<td class="oddListRowS1 alignLeft" >{$ROW.code}</td>
{/if}
<td class="oddListRowS1" >{$ROW.ilosc|number_format:0:",":"."}</td>
<td class="oddListRowS1" >{$ROW.netto|number_format:2:",":"."}</td>
{* <td class="oddListRowS1" ><span class='green-text'>{$ROW.nettoNormal|number_format:2:",":"." }</span></td>*}
<td class="oddListRowS1" >{$ROW.srednia|number_format:2:",":"."}</td>
<td class="oddListRowS1" >{$ROW.koszt|number_format:2:",":"."}</td>
<td class="oddListRowS1" >{$ROW.marza|number_format:2:",":"."}%</td>
</tr>
{/if}
{/foreach}
</tbody>
<tbody id="stopRows"></tbody>
{/if}
{/foreach}
<tbody id="stopTables"></tbody>
{/foreach}
<tbody id="functions-core" class="tablesorter-infoOnly">
<tr class="static category sumAll">
<td class="oddListRowS1 alignLeft"><b>{$MOD.LBL_SUM}:</b></td>
{if $searchBy=="product"}
<td class="oddListRowS1" ></td>
{/if}
<td class="oddListRowS1 sumRow" ><b>{$SUM.IloscSumSum|number_format:0:",":"." }</b></td>
<td class="oddListRowS1 sumRow" ><b>{$SUM.SoldSumSum|number_format:2:",":"." }</b></td>
{* <td class="oddListRowS1 sumRow" ><b><span class='green-text'>{$SUM.SoldSumSumNormal|number_format:2:",":"." }</span></b></td>*}
<td class="oddListRowS1 sumRow" ><b>{$SUM.SredniaSumSum|number_format:2:",":"." }</b></td>
<td class="oddListRowS1 sumRow" ><b>{$SUM.KosztSumSum|number_format:2:",":"." }</b></td>
<td class="oddListRowS1 sumRow" ><b>{$SUM.MarzaSumSum|number_format:2:",":"." }%</b></td>
</tr>
</tbody>
</table>
<br/>

View File

@@ -0,0 +1,180 @@
<script type="text/javascript" src="modules/EcmReports/javascript/ReportSalesByContractor.js"></script>
<link rel="stylesheet" type="text/css" href="modules/EcmReports/css/SearchTable.css"/>
<script src="include/jQuery/tablesorter/jquery.tablesorter.min.js"></script>
<link class="theme" rel="stylesheet" href="include/jQuery/tablesorter/themes/blue/style.css">
<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;" width="16" border="0" height="16">
</td>
<td>
<h2 id="raport_name">{$MOD.LBL_REPORT_SALES_BY_CONTRACTOR}</h2>
</td>
</tr>
</table>
<form action="index.php" method="get" name="ReportSalesByContractor">
<input type="hidden" name="module" value="EcmReports" />
<input type="hidden" name="action" value="ReportSalesByContractor"/>
<input type="hidden" name="parentTab" value="Raporty" />
<table style="width:100%" class="edit view" id="SearchTable">
<tbody>
<tr>
<td>
{$MOD.LBL_DATE_FROM}:
<input id="date_from" name="date_from" type="text" maxlength="10" size="11" title="{$MOD.LBL_DATE_FROM}" value="{$date_from_value}">
<img id="date_from_trigger" src="themes/default/images/jscalendar.gif">
</td>
<td>
{$MOD.LBL_DATE_TO}:
<input id="date_to" name="date_to" type="text" maxlength="10" size="11" title="{$MOD.LBL_DATE_TO}" value="{$date_to_value}">
<img id="date_to_trigger" src="themes/default/images/jscalendar.gif">
</td>
<td>
<table>
<tr>
<td>
{$MOD.LBL_DOCUMENT_SALES_TYPE}:
</td>
<td>
<select multiple name="document_sales_type[]" title="{$MOD.TIP_MULTIPLE}">
{foreach from=$MOD.DOCUMENT_SALES_LIST key="key" item="item"}
<option
value="{$key}"
{if @in_array($key, $DOCUMENT_SALES_SELECTED) } selected="true" {/if}>
{$item}
</option>
{/foreach}
</select>
</td>
</tr>
</table>
</td>
<td>
<table>
<tr>
<td>
{$MOD.LBL_PRODUCT_GROUP}:
</td>
<td>
<select multiple name="product_group[]" title="{$MOD.TIP_MULTIPLE}">
<option {if @in_array("", $PRODUCT_GROUP_SELECTED) } selected="true" {/if} value=""></option>
{foreach from=$APP_LIST_STRINGS.ecmproducts_group_ks_dom key="key" item="item"}
<option
value="{$key}"
{if @in_array($key, $PRODUCT_GROUP_SELECTED) } selected="true" {/if}>
{$item}
</option>
{/foreach}
</select>
</td>
</tr>
</table>
</td>
<td>
<table>
<tr>
<td>
{$MOD.LBL_STOCK}:
</td>
<td>
<select multiple name="stocks[]" title="{$MOD.TIP_MULTIPLE}">
{foreach from=$STOCK_LIST key="key" item="item"}
<option
value="{$key}"
{if @in_array($key, $STOCK_SELECTED) } selected="true" {/if}>
{$item}
</option>
{/foreach}
</select>
</td>
</tr>
</table>
</td>
<td>
{$MOD.LBL_TRADER}:
{html_options id=trader name=trader options=$TRADERS_LIST selected=$TRADER_SELECTED}
<button
type="button"
id="selectTrader"
value="{$APP.LBL_ADD_BUTTON}"
title="{$MOD.TIP_CHOOSE_TRADER}">
<img src="{sugar_getimagepath file="id-ff-select.png"}">
</button>
<button
type="button"
id="clearTrader"
value="{$MOD.LBL_CLEAR}"
title="{$MOD.LBL_CLEAR}">
<img src="{sugar_getimagepath file='id-ff-clear.png'}">
</button>
</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=ReportSalesByContractor';">
<!-- <input id="pdf" class="button" name="pdf" value="XLS" type="button" onclick="generateXLS()"> -->
<input id="pdf" class="button" name="pdf" value="{$MOD.LBL_PDF}" type="button" onclick="generatePDF()">
</form>
<table id="myTable" class="tablesorter">
<thead>
<tr>
<th>
{$MOD.LBL_NAME}
</th>
<th width="10%">
{$MOD.LBL_SALES_NETTO}
</th>
<th width="10%">
{$MOD.LBL_COST_PURCHASE}
</th>
<th width="10%">
{$MOD.LBL_INCOME_OVERHEAD}
</th>
</tr>
</thead>
<tbody>
{foreach from=$DATA item=item key=item_name}
<tr>
<td>
{$item.name}
</td>
<td class="money">
{$item.total_netto|number_format:2:",":"."}
{assign var=summary_netto value=$summary_netto+$item.total_netto}
</td>
<td class="money">
{$item.price_purchase|number_format:2:",":"."}
{assign var=summary_purchase value=$summary_purchase+$item.price_purchase}
</td>
<td class="money">
{$item.total_netto-$item.price_purchase|number_format:2:",":"."}
{assign var=tmp value=$item.total_netto-$item.price_purchase}
({$tmp/$item.total_netto*100|number_format:2:",":"."} %)
</td>
</tr>
{/foreach}
</tbody>
<tfoot>
<tr>
<td colspan="1">
{$MOD.LBL_SUMMARY}
</td>
<td class="money">
{$summary_netto|number_format:2:",":"."}
</td>
<td class="money">
{$summary_purchase|number_format:2:",":"."}
</td>
<td class="money">
{$summary_netto-$summary_purchase|number_format:2:",":"."}
{assign var=tmp value=$summary_netto-$summary_purchase}
({$tmp/$summary_netto*100|number_format:2:",":"."} %)
</td>
</tr>
</tfoot>
</table>

View File

@@ -0,0 +1,323 @@
<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/ReportSalesByContractor2.js"></script>
<style type="text/css">
{literal}
thead, tfoot {font-weight: bold;}
.additionalColumn {
background-color: #87CCED;
border-top: 1px solid black;
}
.groupActive {
border-top: 1px solid black;
border-bottom: 1px solid black;
border-left: 1px solid black;
background-color: #87CCED;
}
.sumRow {
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: #E8E8E8;
color: #343432;
}
table.tablesorter tbody tr.alt-row:hover td {
background: #E8E8E8;
color: #343432;
}
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 .alignLeft {
text-align: left;
}
table.tablesorter .sumRow, .oddListRowS1 {
text-align: right;
}
table.tablesorter .subcategory .alignLeft {
padding-left: 20px;
}
table.tablesorter .category .alignLeft {
padding-left: 10px;
}
table.tablesorter .products .alignLeft {
padding-left: 40px;
}
.plusStyle {
color: #abc3d7;
text-decoration: none;
cursor: pointer;
}
.sumAll td{
background-color: #BDC7B5;
}
{/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>
{if $reportSales ==1}
{$MOD.LBL_RAPORT_SALES_BY_CONTRACTOR} - cena produkcyjna
{else}
{$MOD.LBL_RAPORT_SALES_BY_CONTRACTOR}
{/if}
</h2>
</td>
</tr>
</table>
<br />
<ul class="tablist" style="width:100%;">
<li>
<a class="current" href="#">Podstawowe wyszukiwanie</a>
</li>
</ul>
<form action="index.php" method="get" name="searchReportSales">
<input type="hidden" name="module" value="EcmReports" />
<input type="hidden" name="action" value="{if $reportSales ==1}ReportSalesByContractor3{else}ReportSalesByContractor2{/if}" />
<table style="border-top: 0px none; margin-bottom: 4px;width:100%" class="tabForm" border="0" cellpadding="0" cellspacing="0">
<tr>
{* Search by date_from *}
<td class="dataLabel" width="5%" nowrap="nowrap"> Data od </td>
<td class="dataField" width="10%" nowrap="nowrap">
<input id="date_from" name="date_from" type="text" maxlength="10" size="11" tabindex="" title="" 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">
Calendar.setup ({ldelim}
inputField : "date_from",
daFormat : "{$dateFormat}",
button : "date_from_trigger",
singleClick : true,
dateStr : "",
step : 1
{rdelim}
);
</script>
</td>
</td>
{* Search by date_to *}
<td class="dataLabel" width="5%" nowrap="nowrap">Data do</td>
<td class="dataField" width="10%" nowrap="nowrap">
<input autocomplete="off" name="date_to" id="date_to" value="{$date_to}" title="" 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 : "{$dateFormat}",
button : "date_to_trigger",
singleClick : true,
dateStr : "",
step : 1
{rdelim}
);
</script>
<td class="dataLabel" width="5%" nowrap="nowrap">Typ dokumentu</td>
<td class="dataField" width="10%" nowrap="nowrap">
<select id="type" name="type">
<option value="%" { if $searchByType==""} selected="true" {/if} >normalny i korekta</option>
<option value="normal" { if $searchByType=="normal"} selected {/if} >normalny</option>
<option value="correct" { if $searchByType=="correct"} selected {/if} >korekta</option>
</select>
</td>
<td class="dataLabel" width="5%" nowrap="nowrap">Handlowiec</td>
<td class="dataField" width="10%" nowrap="nowrap">
<select id="user" name="selectUser">
<option value="" { if $selectedUser eq '' } selected="selected" {/if} >wszyscy</option>
{foreach from=$USERS item=USER key=count name=loop}
<option value="{$USER.id}" {if $selectedUser eq $USER.id} selected="selected" {/if}>{$USER.first} {$USER.last}</option>
{/foreach}
</select>
</td>
<td class="dataLabel" width="15%" nowrap="nowrap">
Grupuj "Media Saturn Holding" <input type="checkbox" value="enabled" name="group_media_saturn_holding" {if $group_media_saturn_holding == 'enabled'}checked{/if}>
</td>
<td class="dataLabel" width="5%" nowrap="nowrap">Typ sprzedaży</td>
<td class="dataField" width="10%" nowrap="nowrap">
<select id="pdf_type" name="selectPdfType">
<option value="" { if $selectedPdfType eq '' } selected="selected" {/if} >Wszystkie</option>
<option value="K" {if $selectedPdfType eq 'K'} selected="selected" {/if}>Kraj</option>
<option value="U" {if $selectedPdfType eq 'U'} selected="selected" {/if}>Unia</option>
<option value="E" {if $selectedPdfType eq 'E'} selected="selected" {/if}>Eksport</option>
</select>
</td>
<td class="dataLabel" width="5%" nowrap="nowrap">Źródło</td>
<td class="dataField" width="10%" nowrap="nowrap">
<select id="source" name="source">
<option value="" { if $source eq '' } selected="selected" {/if} >Wszystkie</option>
<option value="allegro" {if $source eq 'allegro'} selected="selected" {/if}>Allegro</option>
<option value="no-allegro" {if $source eq 'no-allegro'} selected="selected" {/if}>Oprócz Allegro</option>
</select>
</td> </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={if $reportSales ==1}ReportSalesByContractor3{else}ReportSalesByContractor2{/if}';">
<input id="excelEksport" class="button" name="importToExcel" value="{$MOD.BTN_EXCEL_EXPORT}" type="button">
<input id="pdfEksport" class="button" name="importToPDF" value="{$MOD.BTN_PDF_EXPORT}" type="button">
<br />
<br />
<table id="myTable" class="ablesorter-blue" role="grid">
<thead>
<tr class="tablesorter-headerRow" role="row">
<th width="30%" 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">{$MOD.LBL_CONTRACTOR}</th>
<th width="10%" 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">Indeks</th>
<th width="10%" class="sorter-saas 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_SOLD_AMOUNT}</th>
<th width="10%" class="sorter-saas tablesorter-header tablesorter-headerUnSorted" data-column="2" 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_VALUE_SALES}</th>
<th width="10%" class="sorter-saas tablesorter-header tablesorter-headerUnSorted" data-column="3" 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_AVERAGE_PRICE}</th>
<th width="8%" class="sorter-saas tablesorter-header tablesorter-headerUnSorted" data-column="4" 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_COST}</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">{$MOD.LBL_MARGIN}</th>
</tr>
</thead>
{foreach from=$ContractorData item=DATA key=CONNAME name=loop}
{if $CONNAME!=""}
<tbody id="functions-core" class="tablesorter-infoOnly">
<tr class="static contractor">
<td class="oddListRowS1 alignLeft"><a class="plusStyle showTablesContractor">[+]</a><b> {$CONNAME}</b></td>
<td class="oddListRowS1 sumRow" ></td>
<td class="oddListRowS1 sumRow" ><b>{$ContractorData.$CONNAME.IloscSum|number_format:0:",":"." }</b></td>
<td class="oddListRowS1 sumRow" ><b>{$ContractorData.$CONNAME.SoldSum|number_format:2:",":"." }</b></td>
<td class="oddListRowS1 sumRow" ><b>{$ContractorData.$CONNAME.SredniaSum|number_format:2:",":"." }</b></td>
<td class="oddListRowS1 sumRow" ><b>{$ContractorData.$CONNAME.KosztSum|number_format:2:",":"." }</b></td>
<td class="oddListRowS1 sumRow" ><b>{$ContractorData.$CONNAME.MarzaSum|number_format:2:",":"." }%</b></td>
</tr>
</tbody>
{foreach from=$DATA item=CAT key=CATNAME name=loop}
{if $CATNAME!="IloscSum" && $CATNAME!="SoldSum" && $CATNAME!="SredniaSum" && $CATNAME!="KosztSum" && $CATNAME!="MarzaSum" && $CATNAME!="StanSum" && $CATNAME!="WartoscSum"}
<tbody id="functions-core" class="tablesorter-infoOnly categoryShowHide">
<tr class="static category">
<td class="oddListRowS1 alignLeft "><a class="plusStyle showTables">[+]</a><b> {$CATNAME}</b></td>
<td class="oddListRowS1 sumRow" ></td>
<td class="oddListRowS1 sumRow" ><b>{$DATA.$CATNAME.IloscSum|number_format:0:",":"." }</b></td>
<td class="oddListRowS1 sumRow" ><b>{$DATA.$CATNAME.SoldSum|number_format:2:",":"." }</b></td>
<td class="oddListRowS1 sumRow" ><b>{$DATA.$CATNAME.SredniaSum|number_format:2:",":"." }</b></td>
<td class="oddListRowS1 sumRow" ><b>{$DATA.$CATNAME.KosztSum|number_format:2:",":"." }</b></td>
<td class="oddListRowS1 sumRow" ><b>{$DATA.$CATNAME.MarzaSum|number_format:2:",":"." }%</b></td>
</tr>
</tbody>
{foreach from=$CAT item=CAT2 key=CAT2NAME name=loop}
{if $CAT2NAME!="IloscSum" && $CAT2NAME!="SoldSum" && $CAT2NAME!="SoldSumNormal" && $CAT2NAME!="IloscNormal" && $CAT2NAME!="SredniaSum" && $CAT2NAME!="KosztSum" && $CAT2NAME!="MarzaSum" && $CAT2NAME!="StanSum" && $CAT2NAME!="WartoscSum"}
<tbody id="functions-core" class="tablesorter-infoOnly tablesShowHide">
<tr class="subcategory">
<td class="oddListRowS1 alignLeft"><a class="showRows" style="color: cadetblue; text-decoration: none; cursor: pointer;">[+]</a><b> {$CAT2NAME}</b></td>
<td class="oddListRowS1 sumRow"></td>
<td class="oddListRowS1 sumRow" ><b>{$CAT.$CAT2NAME.IloscSum|number_format:0:",":"." }</b></td>
<td class="oddListRowS1 sumRow" ><b>{$CAT.$CAT2NAME.SoldSum|number_format:2:",":"." }</b></td>
<td class="oddListRowS1 sumRow" ><b>{$CAT.$CAT2NAME.SredniaSum|number_format:2:",":"." }</b></td>
<td class="oddListRowS1 sumRow" ><b>{$CAT.$CAT2NAME.KosztSum|number_format:2:",":"." }</b></td>
<td class="oddListRowS1 sumRow" ><b>{$CAT.$CAT2NAME.MarzaSum|number_format:2:",":"." }%</b></td>
</tr>
</tbody>
<tbody aria-live="polite" aria-relevant="all" class="rowShowHide">
{foreach from=$CAT2 item=ROW name=loop}
{if $ROW.name!="IloscSum" && $ROW.name!="SoldSum" && $ROW.name!="SredniaSum" && $ROW.name!="KosztSum" && $ROW.name!="MarzaSum" && $CAT2NAME!="StanSum" && $CAT2NAME!="WartoscSum" && $ROW.name!=""}
{if $smarty.foreach.loop.index % 2 == 1}
<tr role="row" class="products">
{else}
<tr class="products" role="row">
{/if}
<td class="oddListRowS1 alignLeft" style="text-align:left;">
<a target="new" href="index.php?module=EcmProducts&action=index&return_module=EcmProducts&action=DetailView&record={$ROW.id}">{$ROW.name}</a>
</td>
<td class="oddListRowS1" >{$ROW.code}</td>
<td class="oddListRowS1" >{$ROW.ilosc|number_format:0:",":"."}</td>
<td class="oddListRowS1" >{$ROW.netto|number_format:2:",":"."}</td>
<td class="oddListRowS1" >{$ROW.srednia|number_format:2:",":"."}</td>
<td class="oddListRowS1" >{$ROW.koszt|number_format:2:",":"."}</td>
<td class="oddListRowS1" >{$ROW.marza|number_format:2:",":"."}%</td>
</tr>
{/if}
{/foreach}
</tbody>
<tbody id="stopRows"></tbody>
{/if}
{/foreach}
<tbody id="stopTables"></tbody>
{/if}
{/foreach}
<tbody id="stopCategory"></tbody>
{/if}
{/foreach}
<tbody id="functions-core" class="tablesorter-infoOnly">
<tr class="static sumAll">
<td class="oddListRowS1 alignLeft"><b>{$MOD.LBL_SUM}:</b></td>
<td class="oddListRowS1" ></td>
<td class="oddListRowS1 sumRow" ><b>{$SUM.IloscSumSum|number_format:0:",":"." }</b></td>
<td class="oddListRowS1 sumRow" ><b>{$SUM.SoldSumSum|number_format:2:",":"." }</b></td>
<td class="oddListRowS1 sumRow" ><b>{$SUM.SredniaSumSum|number_format:2:",":"." }</b></td>
<td class="oddListRowS1 sumRow" ><b>{$SUM.KosztSumSum|number_format:2:",":"." }</b></td>
<td class="oddListRowS1 sumRow" ><b>{$SUM.MarzaSumSum|number_format:2:",":"." }%</b></td>
</tr>
</tbody>
</table>
<br/>

View File

@@ -0,0 +1,206 @@
<html>
<head>
<style>
{literal}
.edit tr td{
vertical-align : middle;
}
.money ,.quantity{
text-align : right;
}
table.tablesorter {
font-family:arial;
background-color: #CDCDCD;
margin:10px 0pt 15px;
font-size: 8pt;
width: 100%;
text-align: left;
}
table.tablesorter thead tr th, table.tablesorter tfoot tr th {
background-color: #e6EEEE;
border: 1px solid #FFF;
font-size: 8pt;
padding: 4px;
}
table.tablesorter thead tr .header {
background-image: url(bg.gif);
background-repeat: no-repeat;
background-position: center right;
cursor: pointer;
}
table.tablesorter tbody td {
color: #3D3D3D;
padding: 4px;
background-color: #FFF;
vertical-align: top;
}
table.tablesorter tbody tr.odd td {
background-color:#F0F0F6;
}
table.tablesorter thead tr .headerSortUp {
background-image: url(asc.gif);
}
table.tablesorter thead tr .headerSortDown {
background-image: url(desc.gif);
}
table.tablesorter thead tr .headerSortDown, table.tablesorter thead tr .headerSortUp {
background-color: #8dbdd8;
}
{/literal}
</style>
</head>
<body>
<table style="width:100%;font-size:10px">
<thead>
<tr>
<td colspan='4'>
<p style="font-size:15px"><b>{$MOD.LBL_REPORT_SALES_BY_CONTRACTOR}</b></p>
</td>
<td style="text-align:right">
Data wygenerowania raportu:<br>
{$smarty.now|date_format:"%d.%m.%Y %H:%M:%S"}
</td>
</tr>
</thead>
<tbody>
<tr>
<td>
{$MOD.LBL_DATE_FROM}: {$date_from_value}<br>
{$MOD.LBL_DATE_TO}: {$date_to_value}
</td>
<td>
<table>
<tr>
<td>
{$MOD.LBL_DOCUMENT_SALES_TYPE}:
</td>
<td>
{if @count($DOCUMENT_SALES_SELECTED) == 0}
{foreach from=$MOD.DOCUMENT_SALES_LIST key="key" item="item"}
{$item}<br>
{/foreach}
{else}
{foreach from=$MOD.DOCUMENT_SALES_LIST key="key" item="item"}
{if @in_array($key, $DOCUMENT_SALES_SELECTED) } {$item}<br>{/if}
{/foreach}
{/if}
</td>
</tr>
</table>
</td>
<td>
<table>
<tr>
<td>
{$MOD.LBL_PRODUCT_GROUP}:
</td>
<td>
{if @count($PRODUCT_GROUP_SELECTED) == 0}
{foreach from=$APP_LIST_STRINGS.ecmproducts_group_ks_dom key="key" item="item"}
{$item}<br>
{/foreach}
{else}
{foreach from=$APP_LIST_STRINGS.ecmproducts_group_ks_dom key="key" item="item"}
{if @in_array($key, $PRODUCT_GROUP_SELECTED) } {$item}<br>{/if}
{/foreach}
{/if}
</td>
</tr>
</table>
</td>
<td>
<table>
<tr>
<td>
{$MOD.LBL_STOCK}:
</td>
<td>
{if @count($STOCK_SELECTED) == 0}
{foreach from=$STOCK_LIST key="key" item="item"}
{$item}<br>
{/foreach}
{else}
{foreach from=$STOCK_LIST key="key" item="item"}
{if @in_array($key, $STOCK_SELECTED) } {$item}<br>{/if}
{/foreach}
{/if}
</td>
</tr>
</table>
</td>
<td>
{$MOD.LBL_TRADER}:
{if $TRADER_SELECTED ==''}
Wszyscy
{else}
{foreach from=$TRADERS_LIST key="key" item="item"}
{if $key==$TRADER_SELECTED }{$item}{/if}
{/foreach}
{/if}
</td>
</tr>
</tbody>
</table>
<table id="myTable" class="tablesorter">
<thead>
<tr>
<th>
{$MOD.LBL_NAME}
</th>
<th width="10%">
{$MOD.LBL_SALES_NETTO}
</th>
<th width="10%">
{$MOD.LBL_COST_PURCHASE}
</th>
<th width="10%">
{$MOD.LBL_INCOME_OVERHEAD}
</th>
</tr>
</thead>
<tbody>
{foreach from=$DATA item=item key=item_name}
<tr>
<td>
{$item.name}
</td>
<td class="money">
{$item.total_netto|number_format:2:",":"."}
{assign var=summary_netto value=$summary_netto+$item.total_netto}
</td>
<td class="money">
{$item.price_purchase|number_format:2:",":"."}
{assign var=summary_purchase value=$summary_purchase+$item.price_purchase}
</td>
<td class="money">
{$item.total_netto-$item.price_purchase|number_format:2:",":"."}
{assign var=tmp value=$item.total_netto-$item.price_purchase}
({$tmp/$item.total_netto*100|number_format:2:",":"."} %)
</td>
</tr>
{/foreach}
</tbody>
<tfoot>
<tr>
<td colspan="1">
{$MOD.LBL_SUMMARY}
</td>
<td class="money">
{$summary_netto|number_format:2:",":"."}
</td>
<td class="money">
{$summary_purchase|number_format:2:",":"."}
</td>
<td class="money">
{$summary_netto-$summary_purchase|number_format:2:",":"."}
{assign var=tmp value=$summary_netto-$summary_purchase}
({$tmp/$summary_netto*100|number_format:2:",":"."} %)
</td>
</tr>
</tfoot>
</table>
</body>
</html>

View File

@@ -0,0 +1,239 @@
<script type="text/javascript" src="modules/EcmReports/javascript/ReportSalesByDocument.js"></script>
<link rel="stylesheet" type="text/css" href="modules/EcmReports/css/SearchTable.css"/>
<script src="include/jQuery/tablesorter/jquery.tablesorter.min.js"></script>
<link class="theme" rel="stylesheet" href="include/jQuery/tablesorter/themes/blue/style.css">
<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;" width="16" border="0" height="16">
</td>
<td>
<h2 id="raport_name">{$MOD.LBL_REPORT_SALES_BY_DOCUMENT}</h2>
</td>
</tr>
</table>
<form action="index.php" method="get" name="ReportSalesByDocument">
<input type="hidden" name="module" value="EcmReports" />
<input type="hidden" name="action" value="ReportSalesByDocument"/>
<input type="hidden" name="parentTab" value="Raporty" />
<table style="width:100%" class="edit view" id="SearchTable">
<tbody>
<tr>
<td>
<table>
<tr>
<td>
{$MOD.LBL_DATE_FROM}:
<input id="date_from" name="date_from" type="text" maxlength="10" size="11" title="{$MOD.LBL_DATE_FROM}" value="{$date_from_value}">
<img id="date_from_trigger" src="themes/default/images/jscalendar.gif">
</td>
</tr>
<tr>
<td>
{$MOD.LBL_DATE_TO}:
<input id="date_to" name="date_to" type="text" maxlength="10" size="11" title="{$MOD.LBL_DATE_TO}" value="{$date_to_value}">
<img id="date_to_trigger" src="themes/default/images/jscalendar.gif">
</td>
</tr>
</table>
</td>
<td>
<table>
<tr>
<td>
{$MOD.LBL_DOCUMENT_TYPE}:
</td>
<td>
<select multiple name="pdf_type[]" title="{$MOD.TIP_MULTIPLE}">
<option {if @in_array("", $PDF_TYPE_SELECTED) } selected="true" {/if} value=""></option>
{foreach from=$APP_LIST_STRINGS.account_invoice_type_dom key="key" item="item"}
<option
value="{$key}"
{if @in_array($key, $PDF_TYPE_SELECTED) } selected="true" {/if}>
{$item}
</option>
{/foreach}
</select>
</td>
</tr>
</table>
</td>
<td>
<table>
<tr>
<td>
{$MOD.LBL_DOCUMENT_SALES_TYPE}:
</td>
<td>
<select multiple name="document_sales_type[]" title="{$MOD.TIP_MULTIPLE}">
{foreach from=$MOD.DOCUMENT_SALES_LIST key="key" item="item"}
<option
value="{$key}"
{if @in_array($key, $DOCUMENT_SALES_SELECTED) } selected="true" {/if}>
{$item}
</option>
{/foreach}
</select>
</td>
</tr>
</table>
</td>
<td>
<!--<table>
<tr>
<td>
{$MOD.LBL_PRODUCT_GROUP}:
</td>
<td>
<select multiple name="product_group[]" title="{$MOD.TIP_MULTIPLE}">
<option {if @in_array("", $PRODUCT_GROUP_SELECTED) } selected="true" {/if} value=""></option>
{foreach from=$APP_LIST_STRINGS.ecmproducts_group_ks_dom key="key" item="item"}
<option
value="{$key}"
{if @in_array($key, $PRODUCT_GROUP_SELECTED) } selected="true" {/if}>
{$item}
</option>
{/foreach}
</select>
</td>
</tr>
</table>-->
</td>
<td>
<table>
<tr>
<td>
{$MOD.LBL_STOCK}:
</td>
<td>
<select multiple name="stocks[]" title="{$MOD.TIP_MULTIPLE}">
{foreach from=$STOCK_LIST key="key" item="item"}
<option
value="{$key}"
{if @in_array($key, $STOCK_SELECTED) } selected="true" {/if}>
{$item}
</option>
{/foreach}
</select>
</td>
</tr>
</table>
</td>
<td>
<p>
{$MOD.LBL_TRADER}:
{html_options id=trader name=trader[] multiple=true options=$TRADERS_LIST selected=$TRADER_SELECTED}
</p><br>
<p>
{$MOD.LBL_CONTRACTOR}:
<input type="hidden" id="account_id" name="account_id" value="{$ACCOUNT_ID}">
<input type="text" id="account_name" name="account_name" value="{$ACCOUNT_NAME}">
<button
type="button"
id="selectAccount"
value="{$APP.LBL_ADD_BUTTON}"
title="{$MOD.TIP_CHOOSE_ACCOUNT}">
<img src="{sugar_getimagepath file="id-ff-select.png"}">
</button>
<button
type="button"
id="clearAccount"
value="{$MOD.LBL_CLEAR}"
title="{$MOD.LBL_CLEAR}">
<img src="{sugar_getimagepath file='id-ff-clear.png'}">
</button>
</p>
</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=ReportSalesByDocument&parentTab=Raporty';">
<!-- <input id="pdf" class="button" name="pdf" value="XLS" type="button" onclick="generateXLS()"> -->
<input id="pdf" class="button" name="pdf" value="{$MOD.LBL_PDF}" type="button" onclick="generatePDF()">
</form>
<table id="myTable" class="tablesorter">
<thead>
<tr>
<th width="10%">
{$MOD.LBL_DOCUMENT}
</th>
<th width="5%">
{$MOD.LBL_DOCUMENT_DATE}
</th>
<th width="40%">
{$MOD.LBL_CONTRACTOR}
</th>
<th width="11%">
{$MOD.LBL_SALES_NETTO}
</th>
<th width="11%">
{$MOD.LBL_SALES_BRUTTO}
</th>
<th width="11%">
{$MOD.LBL_COST_PURCHASE}
</th>
<th width="16%">
{$MOD.LBL_INCOME_OVERHEAD}
</th>
</tr>
</thead>
<tbody>
{foreach from=$DATA item=item key=item_name}
<tr>
<td>
{$item.name}
</td>
<td>
{$item.register_date}
</td>
<td>
{$item.parent_name}
</td>
<td class="money">
{$item.total_netto|number_format:2:",":"."}
{assign var=summary_netto value=$summary_netto+$item.total_netto}
</td>
<td class="money">
{$item.total_brutto|number_format:2:",":"."}
{assign var=summary_brutto value=$summary_brutto+$item.total_brutto}
</td>
<td class="money">
{$item.price_purchase|number_format:2:",":"."}
{assign var=summary_purchase value=$summary_purchase+$item.price_purchase}
</td>
<td class="money">
{$item.total_netto-$item.price_purchase|number_format:2:",":"."}
{assign var=tmp value=$item.total_netto-$item.price_purchase}
({$tmp/$item.total_netto*100|number_format:2:",":"."} %)
</td>
</tr>
{/foreach}
</tbody>
<tfoot>
<tr>
<td colspan="3">
{$MOD.LBL_SUMMARY}
</td>
<td class="money">
{$summary_netto|number_format:2:",":"."}
</td>
<td class="money">
{$summary_brutto|number_format:2:",":"."}
</td>
<td class="money">
{$summary_purchase|number_format:2:",":"."}
</td>
<td class="money">
{$summary_netto-$summary_purchase|number_format:2:",":"."}
{assign var=tmp value=$summary_netto-$summary_purchase}
({$tmp/$summary_netto*100|number_format:2:",":"."} %)
</td>
</tr>
</tfoot>
</table>

View File

@@ -0,0 +1,229 @@
<html>
<head>
<style>
{literal}
.edit tr td{
vertical-align : middle;
}
.money ,.quantity{
text-align : right;
}
table.tablesorter {
font-family:arial;
background-color: #CDCDCD;
margin:10px 0pt 15px;
font-size: 8pt;
width: 100%;
text-align: left;
}
table.tablesorter thead tr th, table.tablesorter tfoot tr th {
background-color: #e6EEEE;
border: 1px solid #FFF;
font-size: 8pt;
padding: 4px;
}
table.tablesorter thead tr .header {
background-image: url(bg.gif);
background-repeat: no-repeat;
background-position: center right;
cursor: pointer;
}
table.tablesorter tbody td {
color: #3D3D3D;
padding: 4px;
background-color: #FFF;
vertical-align: top;
}
table.tablesorter tbody tr.odd td {
background-color:#F0F0F6;
}
table.tablesorter thead tr .headerSortUp {
background-image: url(asc.gif);
}
table.tablesorter thead tr .headerSortDown {
background-image: url(desc.gif);
}
table.tablesorter thead tr .headerSortDown, table.tablesorter thead tr .headerSortUp {
background-color: #8dbdd8;
}
{/literal}
</style>
</head>
<body>
<table style="width:100%;font-size:10px">
<thead>
<tr>
<td colspan='4'>
<p style="font-size:15px"><b>{$MOD.LBL_REPORT_SALES_BY_DOCUMENT}</b></p>
</td>
<td style="text-align:right">
Data wygenerowania raportu:<br>
{$smarty.now|date_format:"%d.%m.%Y %H:%M:%S"}
</td>
</tr>
</thead>
<tbody>
<tr>
<td>
{$MOD.LBL_DATE_FROM}: {$date_from_value}<br>
{$MOD.LBL_DATE_TO}: {$date_to_value}
</td>
<td>
<table>
<tr>
<td>
{$MOD.LBL_DOCUMENT_SALES_TYPE}:
</td>
<td>
{if @count($DOCUMENT_SALES_SELECTED) == 0}
{foreach from=$MOD.DOCUMENT_SALES_LIST key="key" item="item"}
{$item}<br>
{/foreach}
{else}
{foreach from=$MOD.DOCUMENT_SALES_LIST key="key" item="item"}
{if @in_array($key, $DOCUMENT_SALES_SELECTED) } {$item}<br>{/if}
{/foreach}
{/if}
</td>
</tr>
</table>
</td>
<td>
<table>
<tr>
<td>
{$MOD.LBL_PRODUCT_GROUP}:
</td>
<td>
{if @count($PRODUCT_GROUP_SELECTED) == 0}
{foreach from=$APP_LIST_STRINGS.ecmproducts_group_ks_dom key="key" item="item"}
{$item}<br>
{/foreach}
{else}
{foreach from=$APP_LIST_STRINGS.ecmproducts_group_ks_dom key="key" item="item"}
{if @in_array($key, $PRODUCT_GROUP_SELECTED) } {$item}<br>{/if}
{/foreach}
{/if}
</td>
</tr>
</table>
</td>
<td>
<table>
<tr>
<td>
{$MOD.LBL_STOCK}:
</td>
<td>
{if @count($STOCK_SELECTED) == 0}
{foreach from=$STOCK_LIST key="key" item="item"}
{$item}<br>
{/foreach}
{else}
{foreach from=$STOCK_LIST key="key" item="item"}
{if @in_array($key, $STOCK_SELECTED) } {$item}<br>{/if}
{/foreach}
{/if}
</td>
</tr>
</table>
</td>
<td>
{$MOD.LBL_TRADER}:
{if $TRADER_SELECTED ==''}
Wszyscy
{else}
{foreach from=$TRADERS_LIST key="key" item="item"}
{if @in_array($key, $TRADER_SELECTED) } {$item}<br>{/if}
{/foreach}
{/if}
</td>
</tr>
</tbody>
</table>
<table id="myTable" class="tablesorter">
<thead>
<tr>
<th>
{$MOD.LBL_DOCUMENT}
</th>
<th width="10%">
{$MOD.LBL_DOCUMENT_DATE}
</th>
<th>
{$MOD.LBL_CONTRACTOR}
</th>
<th width="10%">
{$MOD.LBL_SALES_NETTO}
</th>
<th width="10%">
{$MOD.LBL_SALES_BRUTTO}
</th>
<th width="10%">
{$MOD.LBL_COST_PURCHASE}
</th>
<th width="10%">
{$MOD.LBL_INCOME_OVERHEAD}
</th>
</tr>
</thead>
<tbody>
{foreach from=$DATA item=item key=item_name}
<tr>
<td>
{$item.name}
</td>
<td>
{$item.register_date}
</td>
<td>
{$item.parent_name}
</td>
<td class="money">
{$item.total_netto|number_format:2:",":"."}
{assign var=summary_netto value=$summary_netto+$item.total_netto}
</td>
<td class="money">
{$item.total_brutto|number_format:2:",":"."}
{assign var=summary_brutto value=$summary_brutto+$item.total_brutto}
</td>
<td class="money">
{$item.price_purchase|number_format:2:",":"."}
{assign var=summary_purchase value=$summary_purchase+$item.price_purchase}
</td>
<td class="money">
{$item.total_netto-$item.price_purchase|number_format:2:",":"."}
{assign var=tmp value=$item.total_netto-$item.price_purchase}
({$tmp/$item.total_netto*100|number_format:2:",":"."} %)
</td>
</tr>
{/foreach}
</tbody>
<tfoot>
<tr>
<td colspan="3">
{$MOD.LBL_SUMMARY}
</td>
<td class="money">
{$summary_netto|number_format:2:",":"."}
</td>
<td class="money">
{$summary_brutto|number_format:2:",":"."}
</td>
<td class="money">
{$summary_purchase|number_format:2:",":"."}
</td>
<td class="money">
{$summary_netto-$summary_purchase|number_format:2:",":"."}
{assign var=tmp value=$summary_netto-$summary_purchase}
({$tmp/$summary_netto*100|number_format:2:",":"."} %)
</td>
</tr>
</tfoot>
</table>
</body>
</html>

View File

@@ -0,0 +1,340 @@
<link rel="stylesheet" type="text/css" href="modules/EcmReports/css/SearchTable.css"/>
<link class="theme" rel="stylesheet" href="include/jQuery/tablesorter/themes/blue/style.css">
<link rel="stylesheet" href="modules/EcmReports/css/ReportSalesByGroup.css">
<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;" width="16" border="0" height="16">
</td>
<td>
<h2 id="raport_name">{$MOD.LBL_REPORT_SALES_BY_GROUP}</h2>
</td>
</tr>
</table>
<form action="index.php" method="get" name="ReportSalesByGroup" id="search-form">
<input type="hidden" name="module" value="EcmReports" />
<input type="hidden" name="action" value="ReportSalesByGroup"/>
<input type="hidden" name="parentTab" value="Raporty" />
<table style="width:100%" class="edit view" id="SearchTable">
<tbody>
<tr>
{if !empty($list_years)}
<td>
<table>
<tr>
<td>
Rok:
</td>
<td>
<select name="years_group[]" title="">
{foreach from=$list_years key=key item=item}
<option
value="{$item}"
{if @in_array($item, $smarty.request.years_group) } selected="true" {/if}>
{$item}
</option>
{/foreach}
</select>
</td>
</tr>
</table>
</td>
{/if}
{if !empty($list_months)}
<td>
<table>
<tr>
<td>
Miesiąc:
</td>
<td>
<select name="months_group[]" title="">
{foreach from=$list_months key=key item=item}
<option
value="{$key}"
{if @in_array($key, $smarty.request.months_group) } selected="true" {/if}>
{$months.$item}
</option>
{/foreach}
</select>
</td>
</tr>
</table>
</td>
{/if}
{if !empty($MOD.DOCUMENT_SALES_LIST)}
<td>
<table>
<tr>
<td>
{$MOD.LBL_DOCUMENT_SALES_TYPE}:
</td>
<td>
<select multiple name="document_sales_type[]" title="{$MOD.TIP_MULTIPLE}">
{foreach from=$MOD.DOCUMENT_SALES_LIST key="key" item="item"}
<option
value="{$key}"
{if @in_array($key, $smarty.request.document_sales_type) } selected="true" {/if}>
{$item}
</option>
{/foreach}
</select>
</td>
</tr>
</table>
</td>
{/if}
{if !empty($list_types) }
<td>
<table>
<tr>
<td>
Typ:
</td>
<td>
<select multiple name="types_group[]" title="">
<option {if @in_array("", $smarty.request.types_group) } selected="true" {/if} value=""></option>
{foreach from=$list_types key=key item=item}
<option
value="{$key}"
{if @in_array($key, $smarty.request.types_group) } selected="true" {/if}>
{$item}
</option>
{/foreach}
</select>
</td>
</tr>
</table>
</td>
{/if}
{if !empty($stock_array)}
<td>
<table>
<tr>
<td>
{$MOD.LBL_STOCK}:
</td>
<td>
<select multiple name="stocks[]" title="{$MOD.TIP_MULTIPLE}">
{foreach from=$stock_array key="key" item="item"}
<option
value="{$key}"
{if @in_array($key, $smarty.request.stocks) } selected="true" {/if}>
{$item}
</option>
{/foreach}
</select>
</td>
</tr>
</table>
</td>
{/if}
{if !empty($list_group_ks_without_filter)}
<td>
<table>
<tr>
<td>
{$MOD.LBL_PRODUCT_GROUP}:
</td>
<td>
<select multiple name="product_group[]" title="{$MOD.TIP_MULTIPLE}">
<option {if @in_array("", $smarty.request.product_group) } selected="true" {/if} value=""></option>
{foreach from=$list_group_ks_without_filter key="key" item="item"}
<option
value="{$key}"
{if @in_array($key, $smarty.request.product_group) } selected="true" {/if}>
{$item}
</option>
{/foreach}
</select>
</td>
</tr>
</table>
</td>
{/if}
<!--{if !empty($list_other_group_ks)}
<td>
<table>
<tr>
<td>
Grupy do sumy:
</td>
<td>
<select multiple name="product_other_group[]" title="{$MOD.TIP_MULTIPLE}">
<option {if @in_array("", $smarty.request.product_other_group) } selected="true" {/if} value=""></option>
{foreach from=$list_other_group_ks key="key" item="item"}
<option
value="{$key}"
{if @in_array($key, $smarty.request.product_other_group) } selected="true" {/if}>
{$item}
</option>
{/foreach}
</select>
</td>
</tr>
</table>
</td>
{/if}-->
<!--
{if !empty($list_types) }
<td>
<table>
<tr>
<td>
Typ do sumy:
</td>
<td>
<select multiple name="types_group_sum[]" title="">
<option {if @in_array("", $smarty.request.types_group) } selected="true" {/if} value=""></option>
{foreach from=$list_types key=key item=item}
<option
value="{$key}"
{if @in_array($key, $smarty.request.types_group_sum) } selected="true" {/if}>
{$item}
</option>
{/foreach}
</select>
</td>
</tr>
</table>
</td>
{/if}-->
</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=ReportSalesByGroup';">
<!-- <input id="xls" class="button" name="xls" value="XLS" type="button" {if empty($table_array)}disabled{/if} onclick="generateXLS()"> -->
<input id="pdf" class="button" name="pdf" value="{$MOD.LBL_PDF}" type="button" {if empty($table_array)}disabled{/if} onclick="generatePDF()">
<input id="chart" class="button" name="chart" value="Wykres" type="button" {if empty($table_array)}disabled{/if} onclick="btnChart()">
<label for="column-chart">Wykres kolumnowy</label>
<input type="radio" name="chart-type" id="column-chart" value="columnChart" checked>
<label for="line-chart">Wykres Liniowy</label>
<input type="radio" name="chart-type" id="line-chart" value="lineChart">
</form>
{if isset($smarty.request.submit) }
{if !empty($table_array)}
<table id="myTable" class="tablesorter">
<thead>
<tr>
<td>ROK</td>
<td>MIESIĄC</td>
<td>PROFIL GŁÓWNY</td>
<td>
ILU ODBIORCÓW W LICZBACH
<!--<input type="radio" name="chart1" value="accounts_count" checked>-->
</td>
<td>
ILE DOKUMENTÓW
<!--<input type="radio" name="chart1" value="documents_count">-->
</td>
{foreach from=$list_group_ks key=groups_key item=group_ks}
<td>
{if in_array($groups_key,$types_prod_req)}
{$group_ks}
<input type="radio" name="chart1" value="{$groups_key}">
{/if}
</td>
{/foreach}
<td>
Pozostałe
<input type="radio" name="chart1" value="suma" checked>
</td>
</tr>
</thead>
<tbody>
{foreach from=$table_array key=year_key item=year name=year_name}
{assign var=count_month value=0}
{* Generate sum all types for years column *}
{assign var=sum_type value=0}
{foreach from=$year key=month_key item=month name=month_name}
{math assign=sum_type equation="x + y" x=$sum_type y=$month|@count}
{/foreach}
{foreach from=$year key=month_key item=month name=month_name}
{assign var=count_type value=0}
{foreach from=$month key=type_key item=type name=type_name}
<tr {if $smarty.foreach.type_name.first} class="tr-style-top" {/if}>
{if $count_type == 0}
{if $count_month == 0}
<td rowspan="{$sum_type}" class="pull-right">{$year_key}</td>
{/if}
<td rowspan="{$month|@count}">{$months[$month_key]}</td>
{/if}
{if in_array($type_key,$types_group_req)}
{if !empty($list_types.$type_key) }
<td>{$list_types.$type_key}</td>
{else}
<td class="pull-left">Pozostałe</td>
{/if}
<td class="pull-right">{$type.accounts_count}</td>
<td class="pull-right">{$type.documents_count}</td>
{foreach from=$list_group_ks key=groups_key item=groups}
{assign var=found value=0}
{foreach from=$type.accounts_type key=group_key item=group name=group_name}
{if in_array($group_key,$types_prod_req)}
{if $groups_key == $group_key}
{assign var=found value=1}
<td class="pull-right"> {$group|number_format:2:".":","}</td>
{/if}
{/if}
{/foreach}
{if $found==0 }
<td class="pull-right">-</td>
{/if}
{/foreach}
<td class="pull-right">{$type.accounts_type.total|number_format:2:".":","}</td>
{/if}
</tr>
{assign var=count_type value=$count_type+1}
{/foreach}
{assign var=count_month value=$count_month+1}
{/foreach}
{/foreach}
</tbody>
</table>
<div id="chart_div"></div>
{/if}
{/if}
<script type="text/javascript" src="modules/EcmReports/javascript/ReportSalesByGroup.js"></script>
<script src="include/jQuery/tablesorter/jquery.tablesorter.min.js"></script>
<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>
<script type="text/javascript" src="https://www.google.com/jsapi"></script>
{*<script src="https://www.google.com/uds/?file=visualization&amp;v=1&amp;packages=corechart" type="text/javascript"></script>*}
<script type="text/javascript" src="modules/EcmReports/javascript/ReportSalesByGroupChart.js"></script>

View File

@@ -0,0 +1,5 @@
<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>
<script type="text/javascript" src="https://www.google.com/jsapi"></script>
<script src="https://www.google.com/uds/?file=visualization&amp;v=1&amp;packages=corechart" type="text/javascript"></script>
<script type="text/javascript" src="modules/EcmReports/javascript/ReportSalesByGroupChart.js"></script>
<div id="chart_div"></div>

View File

@@ -0,0 +1,225 @@
<html>
<head>
<style>
{literal}
.edit tr td{
vertical-align : middle;
}
.money ,.quantity{
text-align : right;
}
table.tablesorter {
font-family:arial;
background-color: #CDCDCD;
margin:10px 0pt 15px;
font-size: 8pt;
width: 100%;
text-align: left;
}
table.tablesorter thead tr th, table.tablesorter tfoot tr th {
background-color: #e6EEEE;
border: 1px solid #FFF;
font-size: 8pt;
padding: 4px;
}
table.tablesorter thead tr .header {
background-image: url(bg.gif);
background-repeat: no-repeat;
background-position: center right;
cursor: pointer;
}
table.tablesorter tbody td {
color: #3D3D3D;
padding: 4px;
background-color: #FFF;
vertical-align: top;
}
table.tablesorter tbody tr.odd td {
background-color:#F0F0F6;
}
table.tablesorter thead tr .headerSortUp {
background-image: url(asc.gif);
}
table.tablesorter thead tr .headerSortDown {
background-image: url(desc.gif);
}
table.tablesorter thead tr .headerSortDown, table.tablesorter thead tr .headerSortUp {
background-color: #8dbdd8;
}
{/literal}
</style>
<style>
{literal}
.pull-right {
text-align: right;
}
.pull-center {
text-align: right;
}
.tr-style-top td {
/*border-top: 1px solid #6d6d6d;*/
box-shadow: 0 1px 0 #828181 inset;
outline: none;
}
{/literal}
</style>
</head>
<body>
<table style="width:100%;font-size:10px">
<thead>
<tr>
<td colspan='4'>
<p style="font-size:15px"><b>Raport sprzedaż w grupach</b></p>
</td>
<td style="text-align:right">
Data wygenerowania raportu:<br>
{$smarty.now|date_format:"%d.%m.%Y %H:%M:%S"}
</td>
</tr>
</thead>
<tbody>
<tr>
<td>
<table>
<tr>
<td>
Rok:
</td>
<td>
<select name="years_group[]" title="">
{foreach from=$list_years key=key item=item}
<option
value="{$item}"
{if @in_array($item, $smarty.request.years_group) } selected="true" {/if}>
{$item}
</option>
{/foreach}
</select>
</td>
</tr>
</table>
</td>
<td>
<table>
<tr>
<td>
Miesiąc:
</td>
<td>
<select name="months_group[]" title="">
{foreach from=$list_months key=key item=item}
<option
value="{$key}"
{if @in_array($key, $smarty.request.months_group) } selected="true" {/if}>
{$months.$item}
</option>
{/foreach}
</select>
</td>
</tr>
</table>
</td>
</tr>
</tbody>
</table>
<table id="myTable" class="tablesorter">
<thead>
<tr>
<td>ROK</td>
<td>MIESIĄC</td>
<td>PROFIL GŁÓWNY</td>
<td>ILU ODBIORCÓW W LICZBACH</td>
<td>ILE DOKUMENTÓW</td>
{foreach from=$list_group_ks key=groups_key item=group_ks}
{if in_array($groups_key,$types_prod_req)}
<td>{$group_ks}</td>
{else}
<td></td>
{/if}
{/foreach}
<td>
Pozostałe
</td>
</tr>
</thead>
<tbody>
{foreach from=$table_array key=year_key item=year name=year_name}
{assign var=count_month value=0}
{* Generate sum all types for years column *}
{assign var=sum_type value=0}
{foreach from=$year key=month_key item=month name=month_name}
{math assign=sum_type equation="x + y" x=$sum_type y=$month|@count}
{/foreach}
{foreach from=$year key=month_key item=month name=month_name}
{assign var=count_type value=0}
{foreach from=$month key=type_key item=type name=type_name}
<tr {if $smarty.foreach.type_name.first} class="tr-style-top" {/if}>
{if $count_type == 0}
{if $count_month == 0}
<td rowspan="{$sum_type}" class="pull-right">{$year_key}</td>
{/if}
<td rowspan="{$month|@count}">{$months[$month_key]}</td>
{/if}
{if in_array($type_key,$types_group_req)}
{if !empty($list_types.$type_key)}
<td>{$list_types.$type_key}</td>
{else}
<td>Pozostałe</td>
{/if}
<td class="pull-right">{$type.accounts_count}</td>
<td class="pull-right">{$type.documents_count}</td>
{foreach from=$list_group_ks key=groups_key item=groups}
{assign var=found value=0}
{foreach from=$type.accounts_type key=group_key item=group name=group_name}
{if in_array($group_key,$types_prod_req)}
{if $groups_key == $group_key}
{assign var=found value=1}
<td class="pull-right"> {$group|number_format:2:",":"."}</td>
{/if}
{/if}
{/foreach}
{if $found==0}
<td class="pull-center">-</td>
{/if}
{/foreach}
<td class="pull-right">{$type.accounts_type.total|number_format:2:".":","}</td>
{/if}
</tr>
{assign var=count_type value=$count_type+1}
{/foreach}
{assign var=count_month value=$count_month+1}
{/foreach}
{/foreach}
</tbody>
</table>
</body>
</html>

View File

@@ -0,0 +1,259 @@
<script type="text/javascript" src="modules/EcmReports/javascript/ReportSalesByProduct.js"></script>
<link rel="stylesheet" type="text/css" href="modules/EcmReports/css/SearchTable.css"/>
<script src="include/jQuery/tablesorter/jquery.tablesorter.min.js"></script>
<link class="theme" rel="stylesheet" href="include/jQuery/tablesorter/themes/blue/style.css">
<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;" width="16" border="0" height="16">
</td>
<td>
<h2 id="raport_name">{$MOD.LBL_REPORT_SALES_BY_PRODUCT}</h2>
</td>
</tr>
</table>
<form action="index.php" method="get" name="ReportSalesByProduct">
<input type="hidden" name="module" value="EcmReports" />
<input type="hidden" name="action" value="ReportSalesByProduct"/>
<input type="hidden" name="parentTab" value="Raporty" />
<table style="width:100%" class="edit view" id="SearchTable">
<tbody>
<tr>
<td>
{$MOD.LBL_DATE_FROM}:
<input id="date_from" name="date_from" type="text" maxlength="10" size="11" title="{$MOD.LBL_DATE_FROM}" value="{$date_from_value}">
<img id="date_from_trigger" src="themes/default/images/jscalendar.gif">
</td>
<td rowspan='2'>
<table>
<tr>
<td>
{$MOD.LBL_DOCUMENT_SALES_TYPE}:
</td>
<td>
<select multiple name="document_sales_type[]" title="{$MOD.TIP_MULTIPLE}">
{foreach from=$MOD.DOCUMENT_SALES_LIST key="key" item="item"}
<option
value="{$key}"
{if @in_array($key, $DOCUMENT_SALES_SELECTED) } selected="true" {/if}>
{$item}
</option>
{/foreach}
</select>
</td>
</tr>
</table>
</td>
<td rowspan='2'>
<table>
<tr>
<td>
{$MOD.LBL_PRODUCT_GROUP}:
</td>
<td>
<select multiple name="product_group[]" title="{$MOD.TIP_MULTIPLE}">
<option {if @in_array("", $PRODUCT_GROUP_SELECTED) } selected="true" {/if} value=""></option>
{foreach from=$APP_LIST_STRINGS.ecmproducts_group_ks_dom key="key" item="item"}
<option
value="{$key}"
{if @in_array($key, $PRODUCT_GROUP_SELECTED) } selected="true" {/if}>
{$item}
</option>
{/foreach}
</select>
</td>
</tr>
</table>
</td>
<td rowspan='2'>
<table>
<tr>
<td>
{$MOD.LBL_PRODUCT_GROUP} 2:
</td>
<td>
<select multiple name="product_group_2[]" title="{$MOD.TIP_MULTIPLE}">
<option {if @in_array("", $PRODUCT_GROUP_SELECTED_2) } selected="true" {/if} value=""></option>
{foreach from=$APP_LIST_STRINGS.ecmproducts_group2_ks_dom key="key" item="item"}
<option
value="{$key}"
{if @in_array($key, $PRODUCT_GROUP_SELECTED_2) } selected="true" {/if}>
{$item}
</option>
{/foreach}
</select>
</td>
</tr>
</table>
</td>
<td rowspan='2'>
<table>
<tr>
<td>
{$MOD.LBL_STOCK}:
</td>
<td>
<select multiple name="stocks[]" title="{$MOD.TIP_MULTIPLE}">
{foreach from=$STOCK_LIST key="key" item="item"}
<option
value="{$key}"
{if @in_array($key, $STOCK_SELECTED) } selected="true" {/if}>
{$item}
</option>
{/foreach}
</select>
</td>
</tr>
</table>
</td>
<td rowspan='2'>
<table>
<tr>
<td>
Typ:
</td>
<td>
<select multiple name="account_type[]" title="{$MOD.TIP_MULTIPLE}">
{foreach from=$ACCOUNT_LIST key="key" item="item"}
<option
value="{$key}"
{if @in_array($key, $ACCOUNT_SELECTED) } selected="true" {/if}>
{$item}
</option>
{/foreach}
</select>
</td>
</tr>
</table>
</td>
<td rowspan='2'>
<p>
{$MOD.LBL_TRADER}:
{html_options id=trader name=trader[] multiple=true options=$TRADERS_LIST selected=$TRADER_SELECTED}
</p><br>
<p>
{$MOD.LBL_CONTRACTOR}:
<input type="hidden" id="account_id" name="account_id" value="{$ACCOUNT_ID}">
<input type="text" id="account_name" name="account_name" value="{$ACCOUNT_NAME}">
<button
type="button"
id="selectAccount"
value="{$APP.LBL_ADD_BUTTON}"
title="{$MOD.TIP_CHOOSE_ACCOUNT}">
<img src="{sugar_getimagepath file="id-ff-select.png"}">
</button>
<button
type="button"
id="clearAccount"
value="{$MOD.LBL_CLEAR}"
title="{$MOD.LBL_CLEAR}">
<img src="{sugar_getimagepath file='id-ff-clear.png'}">
</button>
</p>
</td>
</tr>
<tr>
<td> {$MOD.LBL_DATE_TO}:
<input id="date_to" name="date_to" type="text" maxlength="10" size="11" title="{$MOD.LBL_DATE_TO}" value="{$date_to_value}">
<img id="date_to_trigger" src="themes/default/images/jscalendar.gif">
</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=ReportSalesByProduct';">
<input id="pdf" class="button" name="pdf" value="{$MOD.LBL_PDF}" type="button" onclick="generatePDF()">
<!-- <input id="pdf" class="button" name="pdf" value="XLS" type="button" onclick="generateXLS()"> -->
</form>
<table id="myTable" class="tablesorter">
<thead>
<tr>
<th class='sortby'>
Indeks
</th>
<th class='sortby'>
{$MOD.LBL_NAME}
</th>
<th width="10%" class='sortby'>
{$MOD.LBL_QUANTITY}
</th>
<th width="5%" class='sortby'>
{$MOD.LBL_JM}
</th>
<th width="10%" class='sortby'>
{$MOD.LBL_SALES_NETTO}
</th>
<th width="10%" class='sortby'>
{$MOD.LBL_COST_PURCHASE}
</th>
<th width="10%" class='sortby'>
{$MOD.LBL_INCOME_OVERHEAD}
</th>
</tr>
</thead>
<tbody>
{foreach from=$DATA item=item key=item_name}
{if $item.quantity eq 0}
{else}
<tr>
<td >
{$item.code}
</td>
<td >
{$item.name}
</td>
<td class="quantity">
{$item.quantity|number_format:$item.jm_precision:",":"."}
</td>
<td>
{$item.jm_name}
</td>
<td class="money">
{$item.total_netto|number_format:2:",":"."}
</td>
<td class="money">
{$item.price_purchase|number_format:2:",":"."}
{assign var=summary_purchase value=$summary_purchase+$item.price_purchase}
</td>
<td class="money">
{$item.total_netto-$item.price_purchase|number_format:2:",":"."}
{assign var=tmp value=$item.total_netto-$item.price_purchase}
({$tmp/$item.price_purchase*100|number_format:2:",":"."} %)
</td>
</tr>
{/if}
{/foreach}
</tbody>
<tfoot>
<tr>
<td colspan="2">
{$MOD.LBL_SUMMARY}
</td>
<td colspan="1" class="money">
{$TOTAL3|number_format:2:",":"."}
</td>
<td colspan="1">
</td>
<td class="money">
{$TOTAL|number_format:2:",":"."}
</td>
<td class="money">
{$TOTAL2|number_format:2:",":"."}
</td>
<td class="money">
{assign var=tmp value=$TOTAL-$TOTAL2}
{$TOTAL-$TOTAL2|number_format:2:",":"."} ({$tmp/$TOTAL2*100|number_format:2:",":"."} %)
</td>
</tr>
</tfoot>
</table>

View File

@@ -0,0 +1,235 @@
<html>
<head>
<style>
{literal}
.edit tr td{
vertical-align : middle;
}
.money ,.quantity{
text-align : right;
}
table.tablesorter {
font-family:arial;
background-color: #CDCDCD;
margin:10px 0pt 15px;
font-size: 8pt;
width: 100%;
text-align: left;
}
table.tablesorter thead tr th, table.tablesorter tfoot tr th {
background-color: #e6EEEE;
border: 1px solid #FFF;
font-size: 8pt;
padding: 4px;
}
table.tablesorter thead tr .header {
background-image: url(bg.gif);
background-repeat: no-repeat;
background-position: center right;
cursor: pointer;
}
table.tablesorter tbody td {
color: #3D3D3D;
padding: 4px;
background-color: #FFF;
vertical-align: top;
}
table.tablesorter tbody tr.odd td {
background-color:#F0F0F6;
}
table.tablesorter thead tr .headerSortUp {
background-image: url(asc.gif);
}
table.tablesorter thead tr .headerSortDown {
background-image: url(desc.gif);
}
table.tablesorter thead tr .headerSortDown, table.tablesorter thead tr .headerSortUp {
background-color: #8dbdd8;
}
{/literal}
</style>
</head>
<body>
<table style="width:100%;font-size:10px">
<thead>
<tr>
<td colspan='4'>
<p style="font-size:15px"><b>{$MOD.LBL_REPORT_SALES_BY_PRODUCT}</b></p>
{$EcmSysInfo->getName()}
</td>
<td style="text-align:right">
Data wygenerowania raportu:<br>
{$smarty.now|date_format:"%d.%m.%Y %H:%M:%S"}
</td>
</tr>
</thead>
<tbody>
<tr>
<td >
{$MOD.LBL_DATE_FROM}: {$date_from_value}<br>
{$MOD.LBL_DATE_TO}: {$date_to_value}
</td>
<td >
<table>
<tr>
<td>
{$MOD.LBL_DOCUMENT_SALES_TYPE}:
</td>
<td>
{if @count($DOCUMENT_SALES_SELECTED) == 0}
{foreach from=$MOD.DOCUMENT_SALES_LIST key="key" item="item"}
{$item}<br>
{/foreach}
{else}
{foreach from=$MOD.DOCUMENT_SALES_LIST key="key" item="item"}
{if @in_array($key, $DOCUMENT_SALES_SELECTED) } {$item}<br>{/if}
{/foreach}
{/if}
</td>
</tr>
</table>
</td>
<td >
<table>
<tr>
<td>
{$MOD.LBL_PRODUCT_GROUP}:
</td>
<td>
{if @count($PRODUCT_GROUP_SELECTED) == 0}
{foreach from=$APP_LIST_STRINGS.ecmproducts_group_ks_dom key="key" item="item"}
{$item}<br>
{/foreach}
{else}
{foreach from=$APP_LIST_STRINGS.ecmproducts_group_ks_dom key="key" item="item"}
{if @in_array($key, $PRODUCT_GROUP_SELECTED) } {$item}<br>{/if}
{/foreach}
{/if}
</td>
</tr>
</table>
</td>
<td >
<table>
<tr>
<td>
{$MOD.LBL_STOCK}:
</td>
<td>
{if @count($STOCK_SELECTED) == 0}
{foreach from=$STOCK_LIST key="key" item="item"}
{$item}<br>
{/foreach}
{else}
{foreach from=$STOCK_LIST key="key" item="item"}
{if @in_array($key, $STOCK_SELECTED) } {$item}<br>{/if}
{/foreach}
{/if}
</td>
</tr>
</table>
</td>
<td >
{$MOD.LBL_TRADER}:
{if $TRADER_SELECTED ==''}
Wszyscy
{else}
{foreach from=$TRADERS_LIST key="key" item="item"}
{if @in_array($key, $TRADER_SELECTED) } {$item}<br>{/if}
{/foreach}
{/if}
</td>
</tr>
<tr>
</tr>
</tbody>
</table>
<table id="myTable" class="tablesorter">
<thead>
<tr>
<th>
Indeks
</th>
<th>
{$MOD.LBL_NAME}
</th>
<th width="10%">
{$MOD.LBL_QUANTITY}
</th>
<th width="5%">
{$MOD.LBL_JM}
</th>
<th width="10%">
{$MOD.LBL_SALES_NETTO}
</th>
<th width="10%">
{$MOD.LBL_COST_PURCHASE}
</th>
<th width="10%">
{$MOD.LBL_INCOME_OVERHEAD}
</th>
</tr>
</thead>
<tbody>
{foreach from=$DATA item=item key=item_name}
{if $item.quantity eq 0}
{else}
<tr>
<td >
{$item.code}
</td>
<td>
{$item.name}
</td>
<td class="quantity">
{$item.quantity|number_format:$item.jm_precision:",":"."}
</td>
<td>
{$item.jm_name}
</td>
<td class="money">
{$item.total_netto|number_format:2:",":"."}
{assign var=summary_netto value=$summary_netto+$item.total_netto}
</td>
<td class="money">
{$item.price_purchase|number_format:2:",":"."}
{assign var=summary_purchase value=$summary_purchase+$item.price_purchase}
</td>
<td class="money">
{$item.total_netto-$item.price_purchase|number_format:2:",":"."}
{assign var=tmp value=$item.total_netto-$item.price_purchase}
({$tmp/$item.total_netto*100|number_format:2:",":"."} %)
</td>
</tr>
{/if}
{/foreach}
</tbody>
<tfoot>
<tr>
<td colspan="2">
{$MOD.LBL_SUMMARY}
</td>
<td class="money">
{$TOTAL3|number_format:2:",":"."}
</td>
<td class="money">
</td>
<td class="money">
{$summary_netto|number_format:2:",":"."}
</td>
<td class="money">
{$summary_purchase|number_format:2:",":"."}
</td>
<td class="money">
{$summary_netto-$summary_purchase|number_format:2:",":"."}
</td>
</tr>
</tfoot>
</table>
</body>
</html>

View File

@@ -0,0 +1,85 @@
<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;" width="16" border="0" height="16">
</td>
<td>
<h2 id="raport_name">{$MOD.LBL_REPORT_SALES_VAT_SALES}</h2>
</td>
</tr>
</table>
<ul class="tablist" style="width:100%;"></ul>
<form target="_blank" action="index.php" method="get" name="ReportSalesVatSales">
<input type="hidden" id="module" name="module" value="EcmReports"/>
<input type="hidden" id="action" name="action" value="ReportSalesVatSales"/>
<input type="hidden" id="process" name="process" value="1"/>
<input type="hidden" id="to_xls" name="to_xls" value="0"/>
<input type="hidden" id="to_pdf" name="to_pdf" value="1"/>
<table class="tabForm" cellspacing="0" cellpadding="0" border="0" style="border-top: 0px none; margin-bottom: 4px;width:100%">
<tr>
<td class="dataLabel" width="5%" nowrap="nowrap">Magazyn: </td>
<td class="dataField" width="8%" nowrap="nowrap">
{$STOCKS}
</td>
<td class="dataLabel" width="5%" nowrap="nowrap">Typ dokumentu: </td>
<td class="dataField" width="8%" nowrap="nowrap">
{$TYPES}
</td>
<td class="dataLabel" width="5%" nowrap="nowrap">Rodzaj: </td>
<td class="dataField" width="8%" nowrap="nowrap">
{$KINDS}
</td>
<td class="dataLabel" width="5%" nowrap="nowrap">Kategoria: </td>
<td class="dataField" width="8%" nowrap="nowrap">
{$CATEGORIES}
</td>
</tr>
<tr>
<td class="dataLabel" width="5%" nowrap="nowrap">Grupuj kontrahentów: </td>
<td class="dataField" width="8%" nowrap="nowrap">
<input type="checkbox" name="group_accounts" id="group_accounts" {if $GROUP_ACCOUNTS == '1'} checked {/if}/>
</td>
</tr>
<tr>
<td class="dataLabel" width="5%" nowrap="nowrap">Data od: </td>
<td class="dataField" width="8%" nowrap="nowrap">
<input id="date_from" name="date_from" type="text" maxlength="10" size="11" tabindex="" title="" 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">
Calendar.setup ({ldelim}
inputField : "date_from",
daFormat : "%d.%m.%Y",
button : "date_from_trigger",
singleClick : true,
dateStr : "",
step : 1
{rdelim}
);
</script>
</td>
</tr>
<tr>
<td class="dataLabel" width="5%" nowrap="nowrap">Data do: </td>
<td class="dataField" width="8%" nowrap="nowrap">
<input autocomplete="off" name="date_to" id="date_to" value="{$DATE_TO}" title="" 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>
</tr>
</table>
<input type="submit" class="button" onclick="$('#to_xls').val(0);$('#to_pdf').val(1);" value="Wykonaj"/>
<!--<input type="submit" class="button" onclick="$('#to_xls').val(1);" value="XLS"/> -->
<input type="button" class="button" value="Wyczyść" onClick = "window.location='index.php?module=EcmReports&action=ReportSalesVatSales'"/>
</form>

View File

@@ -0,0 +1,196 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style>
{literal}
@page {
size: auto;
odd-header-name: html_Header;
}
#MainTable {
width: 100%;
font-size: 8pt;
border-collapse: collapse;
}
#MainTable .text-left {
text-align: left;
}
#MainTable .text-right {
text-align: right;
}
#MainTable .border-bottom {
border-collapse: collapse;
border-bottom: 1px solid black;
}
#MainTable .border-top {
border-collapse: collapse;
border-top: 1px solid black;
}
{/literal}
</style>
</head>
<body>
<htmlpageheader name="Header">
<div style="text-align: left; font-weight: bold; font-size: 10pt;">
<table style="width: 100%">
<tr><td style="width: 50%">
<table>
<tr>
<td style="font-size: 12px; font-weight: bold">{$COMPANY_NAME}</td>
</tr>
<tr>
<td style="font-size: 12px; font-weight: bold">Data wydruku: {$CUR_DATE}</td>
</tr>
<tr>
<td style="font-size: 12px; font-weight: bold">Rejestr sprzedaży VAT za okres od {$DATE_FROM} do {$DATE_TO}</td>
</tr>
<tr>
<td style="font-size: 12px; font-weight: bold">Strona {literal}{PAGENO} z {nbpg}{/literal}</td>
</tr>
</table>
</td><td style="text-align: right; vertical-align: top; font-size: 8pt;">
Ustawienia raportu:<br>
Magazyn: {$S_STOCK}<br>
Rodzaj: {$S_KIND}<br>
Kategoria: {$S_CATEGORY}<br>
Typ: {$S_TYPE}
</td></tr>
</table>
</div>
</htmlpageheader>
<div>
{foreach from=$PAGES item=PAGE name=page"}
{assign var=pagesCount value=$PAGES|@count}
{assign var=vatColSize value=0}
{math
assign="vatColSize"
equation="round(57/($vatsCount))"
}
<table id="MainTable">
<thead>
<tr>
<th class="border-top border-bottom" style="width: 3%;" rowspan="2">Lp.</th>
<th class="text-left border-top" style="width: 20%;">Nr dok.</th>
<th class="text-left border-top" style="width: 10%;">Data wyst.</th>
<th class="text-left border-top" colspan="{$vatsCount+2}">Odbiorca - NIP,Konto KS, Nazwa, Adres</th>
</tr>
<tr>
<th class="text-right border-bottom" style="width: 10%;">Sprz. brutto</th>
<th class="text-right border-bottom" style="width: 10%;">Sprz. netto</th>
{foreach from=$VATS key=vat_name item=i}
<th class="text-right border-bottom" style="width: {$vatColSize}%;">Netto {$vat_name}</th>
{if $i=='2'}
<th class="text-right border-bottom" style="width: {$vatColSize}%;">VAT {$vat_name}</th>
{/if}
{/foreach}
<th class="text-right border-bottom" style="width: 10%;">VAT Razem</th>
<th class="text-right border-bottom" style="width: 10%;">Koszt</th>
</tr>
</thead>
<tbody>
{foreach from=$PAGE.rows item=row}
{if $row.is_summary!=1}
<tr>
<td class="text-left border-bottom" rowspan="2">{$row.lp}</td>
<td class="text-left">{$row.document_no}</td>
<td class="text-left">{$row.register_date}</td>
<td class="text-left" colspan="{$vatsCount+2}">{$row.parent_info}</td>
</tr>
<tr>
<td class="text-right border-bottom">{$row.brutto|number_format:2:",":"."}</td>
<td class="text-right border-bottom">{$row.netto|number_format:2:",":"."}</td>
{foreach from=$row.vats item=v key=k}
<td class="text-right border-bottom">{$v[0]|number_format:2:",":"."}</td>
{if $VATS.$k == '2'}
<td class="text-right border-bottom">{$v[1]|number_format:2:",":"."}</td>
{/if}
{/foreach}
<td class="text-right border-bottom">{$row.vat|number_format:2:",":"."}</td>
<td class="text-right border-bottom">{$row.purchase|number_format:2:",":"."}</td>
</tr>
{else}
<tr>
<td class="text-left" colspan="{$vatsCount+5}"><b>Razem - {$row.index}</b></td>
</tr>
<tr>
<td class="text-right border-bottom">&nbsp;</td>
<td class="text-right border-bottom" >{$row.total_brutto|number_format:2:",":"."}</td>
<td class="text-right border-bottom" >{$row.total_netto|number_format:2:",":"."}</td>
{foreach from=$row.vats item=v key=k}
<td class="text-right border-bottom">{$v[0]|number_format:2:",":"."}</td>
{if $VATS.$k == '2'}
<td class="text-right border-bottom">{$v[1]|number_format:2:",":"."}</td>
{/if}
{/foreach}
<td class="text-right border-bottom" >{$row.total_vat|number_format:2:",":"."}</td>
<td class="text-right border-bottom" >{$row.total_purchase|number_format:2:",":"."}</td>
</tr>
{/if}
{/foreach}
<tr>
<td class="text-left" colspan="{$vatsCount+6}">Suma strony:</td>
</tr>
<tr>
<td class="border-bottom">&nbsp;</td>
<td class="text-right border-bottom">{$PAGE.site_brutto|number_format:2:",":"."}</td>
<td class="text-right border-bottom">{$PAGE.site_netto|number_format:2:",":"."}</td>
{foreach from=$PAGE.site_vats item=v key=k}
<td class="text-right border-bottom">{$v[0]|number_format:2:",":"."}</td>
{if $VATS.$k == '2'}
<td class="text-right border-bottom">{$v[1]|number_format:2:",":"."}</td>
{/if}
{/foreach}
<td class="text-right border-bottom">{$PAGE.site_vat|number_format:2:",":"."}</td>
<td class="text-right border-bottom">{$PAGE.site_purchase|number_format:2:",":"."}</td>
</tr>
<tr>
<td class="text-left" colspan="{$vatsCount+6}">Suma z przeniesienia:</td>
</tr>
<tr>
<td class="border-bottom">&nbsp;</td>
<td class="text-right border-bottom">{$PAGE.moved_brutto|number_format:2:",":"."}</td>
<td class="text-right border-bottom">{$PAGE.moved_netto|number_format:2:",":"."}</td>
{foreach from=$PAGE.moved_vats item=v key=k}
<td class="text-right border-bottom">{$v[0]|number_format:2:",":"."}</td>
{if $VATS.$k == '2'}
<td class="text-right border-bottom">{$v[1]|number_format:2:",":"."}</td>
{/if}
{/foreach}
<td class="text-right border-bottom">{$PAGE.moved_vat|number_format:2:",":"."}</td>
<td class="text-right border-bottom">{$PAGE.moved_purchase|number_format:2:",":"."}</td>
</tr>
<tr>
<td class="text-left" colspan="{$vatsCount+6}">Suma razem:</td>
</tr>
<tr>
<td class="border-bottom">&nbsp;</td>
<td class="text-right border-bottom">{$PAGE.total_brutto|number_format:2:",":"."}</td>
<td class="text-right border-bottom">{$PAGE.total_netto|number_format:2:",":"."}</td>
{foreach from=$PAGE.total_vats item=v key=k}
<td class="text-right border-bottom">{$v[0]|number_format:2:",":"."}</td>
{if $VATS.$k == '2'}
<td class="text-right border-bottom">{$v[1]|number_format:2:",":"."}</td>
{/if}
{/foreach}
<td class="text-right border-bottom">{$PAGE.total_vat|number_format:2:",":"."}</td>
<td class="text-right border-bottom">{$PAGE.total_purchase|number_format:2:",":"."}</td>
</tr>
</tbody>
</table>
{if $smarty.foreach.page.index != $pagesCount-1 }
<newpage>
{/if}
{/foreach}
<p style="font-size: 8pt;">
KONIEC WYDRUKU
</p>
</div>
</body>
</html>

View File

@@ -0,0 +1,261 @@
<link rel="stylesheet" type="text/css" href="modules/EcmReports/css/SearchTable.css"/>
<script src="include/jQuery/tablesorter/jquery.tablesorter.min.js"></script>
<link class="theme" rel="stylesheet" href="include/jQuery/tablesorter/themes/blue/style.css">
<script type="text/javascript" src="modules/EcmReports/javascript/ReportStockDocMoves.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>Obroty wg dokumentów</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="ReportStockDocMoves">
<input type="hidden" name="module" value="EcmReports" />
<input type="hidden" name="action" value="ReportStockDocMoves" />
<table style="border-top: 0px none; margin-bottom: 4px;width:100%" class="tabForm" border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td class="dataField" width="10%" nowrap="nowrap">
<span id="stockSelectedspan">{$MOD.LBL_STOCK}</span>
<select multiple="multiple" name="stockSelected[]">
{foreach from=$stocksList key="key" item="item"}
<option value="{$key}" {if @in_array($key, $stockSelected) } selected="true" {/if}>{$item}</option>
{/foreach}
</select>
</td>
<td class="dataField" width="10%" nowrap="nowrap">
Dokument
{html_options name=documentsSelected options=$documentList selected=$documentSelected}
</td>
<td class="dataField" width="10%" nowrap="nowrap">
Widok:
{html_options name=viewSelected options=$viewList selected=$viewSelected}
</td>
<td class="dataField" width="10%" nowrap="nowrap">
<span class="changebox kartotekamaterialowa">
Kartoteka materiałowa
<select multiple name="stockIndexSelected[]">
<option value="NULL" {if @in_array('NULL', $stockIndexSelected) } selected="true" {/if}></option>
{foreach from=$stockIndexList key="key" item="item"}
<option value="{$key}" {if @in_array($key, $stockIndexSelected) } selected="true" {/if}>{$item}</option>
{/foreach}
</select>
</span>
<span class="changebox magazyndocelowy">
Do magazynu
<select multiple="multiple" name="mmSelected[]">
{foreach from=$stocksList key="key" item="item"}
<option value="{$key}" {if @in_array($key, $mmSelected) } selected="true" {/if}>{$item}</option>
{/foreach}
</select>
</span>
<span class="changebox kontrahent">
{$MOD.LBL_CONTRACTOR}
<input type="text" id="accountName" name="accountName" value="{$accountName}">
<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="clear"
value="Wyczyść"
title="Wyczyść">
<img src="{sugar_getimagepath file="id-ff-clear.png"}">
</button>
</span>
<span class="changebox kategoriawz">
Kategoria
{html_options name=wz_category options=$kategorie_wz selected=$wz_category_selected}
</span>
</td>
</tr>
<tr>
<td class="dataLabel" width="10%" nowrap="nowrap">
Data od
<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">
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
<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>
</tr>
</tbody>
</table>
<input type="submit" value="{$MOD.LBL_EXECUTE}">
<input class="button" name="clear" value="{$MOD.LBL_CLEAR}" type="button" onclick="location.href = 'index.php?module=EcmReports&action=ReportStockDocMoves';">
<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>
<div class="content" style="text-align:center">
{if $viewSelected eq 'documents'}
<table id="myTable" class="tablesorter">
<thead>
<tr>
<th >Numer dokumentu</th>
<th>Data</th>
<th>
{if $documentSelected eq 'EcmStockDocInsideOuts' or $documentSelected eq 'EcmStockDocInsideIns' or $documentSelected eq 'EcmStockDocCorrects'}
Kartoteka materiałowa
{elseif $documentSelected eq 'EcmStockDocMoves'}
Magazyn docelowy
{elseif $documentSelected eq 'EcmStockDocIns'}
Dostawca
{elseif $documentSelected eq 'EcmStockDocOuts'}
Odbiorca
{elseif $documentSelected eq 'EcmInvoiceOuts'}
Kontrahent
{/if}
</th>
<th>Opis dokumentu</th>
<th>Wartość</th>
<th>Magazyn</th>
{if $documentSelected eq 'EcmStockDocOuts'}
<th>Kategoria</th>
{/if}
</tr>
</thead>
<tbody aria-live="polite" aria-relevant="all">
{foreach from=$DATA.doc key="key" item="item" name=loop}
<tr>
<td>
<a href="index.php?module={$documentSelected}&action=DetailView&record={$item.id}">{$item.typ} {$item.numer}</a>
</td>
<td>
{$item.data}
</td>
<td>
{if $documentSelected eq 'EcmStockDocInsideOuts' or $documentSelected eq 'EcmStockDocInsideIns' or $documentSelected eq 'EcmStockDocCorrects'}
{$item.kartoteka}
{elseif $documentSelected eq 'EcmStockDocMoves'}
{$item.magazynIn}
{elseif $documentSelected eq 'EcmStockDocIns' or $documentSelected eq 'EcmStockDocOuts' or $documentSelected eq 'EcmInvoiceOuts' }
<a href="index.php?module=Accounts&action=DetailView&record={$item.accountId}">{$item.accountNazwa}</a>
{/if}
</td>
<td>
{if $item.typ=='KS'}
{if $item.otyp==0}
Przychód
{/if}
{if $item.otyp==1}
Rozchód
{/if}
{else}
{$item.nazwa}
{/if}
</td>
<td style="text-align: right">
{assign var=suma value=$suma+$item.wartosc}
{$item.wartosc|number_format:2:",":"."}
</td>
<td style="text-align: left">
{$item.magazyn}
</td>
{if $documentSelected eq 'EcmStockDocOuts'}
<td>{$item.doccategory}</td>
{/if}
</tr>
{/foreach}
</tbody>
<tfoot>
<tr>
<th colspan='4' style="text-align:left;">Suma:</th>
<th style="text-align:right;">{$suma|number_format:2:",":"." }</th>
<th ></th>
{if $documentSelected eq 'EcmStockDocOuts'}
<th></th>
{/if}
</tr>
</tfoot>
</table>
{elseif $viewSelected eq 'positions'}
<table id="myTable" class="tablesorter">
<thead>
<tr>
<th>Indeks</th>
<th>Nazwa</th>
<th>Jm</th>
<th>Ilość</th>
<th>Wartość</th>
</tr>
</thead>
<tbody aria-live="polite" aria-relevant="all">
{foreach from=$DATA.prod key="key" item="item" name=loop}
<tr>
<td>
<a href="index.php?module=EcmProducts&action=DetailView&record={$item.id}">{$item.kod} </a>
</td>
<td>
<a href="index.php?module=EcmProducts&action=DetailView&record={$item.id}">{$item.nazwa} </a>
</td>
<td>
{$item.jm}
</td>
<td style="text-align: right">
{assign var=sumaIlosci value=$sumaIlosci+$item.ilosc}
{$item.ilosc|number_format:2:",":"."}
</td>
<td style="text-align: right">
{assign var=suma value=$suma+$item.wartosc}
{$item.wartosc|number_format:2:",":"."}
</td>
</tr>
{/foreach}
</tbody>
<tfoot>
<tr>
<th colspan='3' style="text-align:left;">Suma:</th>
<th colspan='1' style="text-align:right;">{$sumaIlosci|number_format:2:",":"." }</th>
<th colspan='1' style="text-align:right;">{$suma|number_format:2:",":"." }</th>
</tr>
</tfoot>
</table>
{/if}
<span id="info">Strona w budowie :)</span>
</div>

View File

@@ -0,0 +1,133 @@
{if $viewSelected eq 'documents'}
<table id="myTable" style="font-size: 8pt; width:100%">
<thead>
<tr>
<th style="border: 1px solid black; font-weight: bold; font-size: 8pt;">Lp.</th>
<th style="border: 1px solid black; font-weight: bold; font-size: 8pt; width:10%">Numer dokumentu</th>
<th style="border: 1px solid black; font-weight: bold; font-size: 8pt; width:10%">Data</th>
<th style="border: 1px solid black; font-weight: bold; font-size: 8pt;">
{if $documentSelected eq 'EcmStockDocInsideOuts' or $documentSelected eq 'EcmStockDocInsideIns' or $documentSelected eq 'EcmStockDocCorrects'}
Kartoteka materiałowa
{elseif $documentSelected eq 'EcmStockDocMoves'}
Magazyn docelowy
{elseif $documentSelected eq 'EcmStockDocIns'}
Dostawca
{elseif $documentSelected eq 'EcmStockDocOuts'}
Odbiorca
{elseif $documentSelected eq 'EcmInvoiceOuts'}
Kontrahent
{/if}
</th>
<th style="border: 1px solid black; font-weight: bold; font-size: 8pt;">Opis dokumentu</th>
<th style="border: 1px solid black; font-weight: bold; font-size: 8pt;">Wartość</th>
<th style="border: 1px solid black; font-weight: bold; font-size: 8pt;">Magazyn</th>
{if $documentSelected eq 'EcmStockDocOuts'}
<th style="border: 1px solid black; font-weight: bold; font-size: 8pt;">Kategoria</th>
{/if}
</tr>
</thead>
<tbody >
{foreach from=$DATA.doc key="key" item="item" name=loop}
<tr>
<td>{assign var=pozycja value=$pozycja+1}{$pozycja}</td>
<td>
{$item.typ} {$item.numer}
</td>
<td>
{$item.data}
</td>
<td>
{if $documentSelected eq 'EcmStockDocInsideOuts' or $documentSelected eq 'EcmStockDocInsideIns' or $documentSelected eq 'EcmStockDocCorrects'}
{$item.kartoteka}
{elseif $documentSelected eq 'EcmStockDocMoves'}
{$item.magazynIn}
{elseif $documentSelected eq 'EcmStockDocIns' or $documentSelected eq 'EcmStockDocOuts' or $documentSelected eq 'EcmInvoiceOuts' }
{$item.accountNazwa}
{/if}
</td>
<td>
{if $item.typ=='KS'}
{if $item.otyp==0}
Przychód
{/if}
{if $item.otyp==1}
Rozchód
{/if}
{else}
{$item.nazwa}
{/if}
</td>
<td style="text-align: right">
{assign var=suma value=$suma+$item.wartosc}
{$item.wartosc|number_format:2:",":"."}
</td>
<td style="text-align: left">
{$item.magazyn}
</td>
{if $documentSelected eq 'EcmStockDocOuts'}
<td style="text-align: left">
{$item.doccategory}
</td>
{/if}
</tr>
{/foreach}
</tbody>
<tfoot>
<tr>
<th colspan='5' style="border-top: 1px solid black;text-align:left;">Suma:</th>
<th style="border-top: 1px solid black;text-align:right;">{$suma|number_format:2:",":"." }</th>
<th style="border-top: 1px solid black;"></th>
{if $documentSelected eq 'EcmStockDocOuts'}
<th style="border-top: 1px solid black;"></th>
{/if}
</tr>
</tfoot>
</table>
{elseif $viewSelected eq 'positions'}
<table id="myTable" style="font-size: 8pt; width:100%">
<thead>
<tr>
<th style="border: 1px solid black; font-weight: bold; font-size: 8pt;">Lp.</th>
<th style="border: 1px solid black; font-weight: bold; font-size: 8pt;">Indeks</th>
<th style="border: 1px solid black; font-weight: bold; font-size: 8pt;">Nazwa</th>
<th style="border: 1px solid black; font-weight: bold; font-size: 8pt;">Jm</th>
<th style="border: 1px solid black; font-weight: bold; font-size: 8pt;">Ilość</th>
<th style="border: 1px solid black; font-weight: bold; font-size: 8pt;">Wartość</th>
</tr>
</thead>
<tbody aria-live="polite" aria-relevant="all">
{foreach from=$DATA.prod key="key" item="item" name=loop}
<tr>
<td>{assign var=pozycja value=$pozycja+1}{$pozycja}</td>
<td>
{$item.kod}
</td>
<td>
{$item.nazwa}
</td>
<td>
{$item.jm}
</td>
<td style="text-align: right">
{assign var=sumaIlosci value=$sumaIlosci+$item.ilosc}
{$item.ilosc|number_format:2:",":"."}
</td>
<td style="text-align: right">
{assign var=suma value=$suma+$item.wartosc}
{$item.wartosc|number_format:2:",":"."}
</td>
</tr>
{/foreach}
</tbody>
<tfoot>
<tr>
<th colspan='4' style="border-top: 1px solid black;text-align:left;">Suma:</th>
<th colspan='1' style="border-top: 1px solid black;text-align:right;">{$sumaIlosci|number_format:2:",":"." }</th>
<th colspan='1' style="border-top: 1px solid black;text-align:right;">{$suma|number_format:2:",":"." }</th>
</tr>
</tfoot>
</table>
{/if}

View File

@@ -0,0 +1,263 @@
<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/>

View File

@@ -0,0 +1,175 @@
<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>

View File

@@ -0,0 +1,168 @@
<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 src="http://code.jquery.com/jquery-1.11.0.min.js"></script>
<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="https://www.google.com/jsapi"></script>
<script type="text/javascript" src="modules/EcmReports/javascript/ReportValue.js"></script>
<style type="text/css">
{literal}
thead, tfoot {font-weight: bold;}
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: #E8E8E8;
color: #343432;
}
table.tablesorter tbody tr.alt-row:hover td {
background: #E8E8E8;
color: #343432;
}
.element{
position:fixed;
bottom: 0%;
width: 97%;
padding:10px;
font-family:Arial;
background-color: white;
border:1px solid black;
}
{/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>{$MOD.LBL_REPORT_VALUE_NAME}</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="where" id="where">
<input type="hidden" name="module" value="EcmReports" />
<input type="hidden" name="action" value="ReportValue" />
<input type="hidden" name="parentTab" value="Raporty"/>
<table style="border-top: 0px none; margin-bottom: 4px;width:100%" class="tabForm" border="0" cellpadding="0" cellspacing="0">
<tr>
<td style="white-space: nowrap">Data od:
<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">
Calendar.setup ({ldelim}
inputField : "date_from",
daFormat : "{$dateFormat}",
button : "date_from_trigger",
singleClick : true,
dateStr : "",
step : 1
{rdelim}
);
</script>
</td>
<td style="white-space: nowrap">Data do:
<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 : "{$dateFormat}",
button : "date_to_trigger",
singleClick : true,
dateStr : "",
step : 1
{rdelim}
);
</script>
</td>
</form>
<td>
<fieldset>
<legend>{$MOD.LBL_COLUMNS_SHOW}</legend>
{foreach from=$category key=k item=v}
{if in_array($k,$selectedColumns)}
<input type="checkbox" name="selectedColumns[]" value="{$k}" checked="true" > {$v} </input>
{else}
<input type="checkbox" name="selectedColumns[]" value="{$k}"> {$v} </input>
{/if}
{/foreach}
</fieldset>
</td>
</tr>
</table>
</form>
<input class="button" value="{$MOD.LBL_EXECUTE}" type="submit" form="where">
<input class="button" value="{$MOD.LBL_CLEAR}" type="button" onclick="location.href='index.php?module=EcmReports&action=ReportValue&amp;parentTab=Raporty';">
<table id="myTable" class="tablesorter tablesorter-blue" role="grid">
<thead>
<tr class="tablesorter-headerRow" role="row">
<th width="10%">{$MOD.LBL_YEAR_MONTH}</th>
{foreach from=$category key=k item=v}
{if in_array($k,$selectedColumns)}
<th value="{$k}">{$v}</th>
{/if}
{/foreach}
<th width="10%">{$MOD.LBL_SUM}</th>
</tr>
</thead>
<tbody>
{foreach from=$data key=rok item=miesiac}
{foreach from=$miesiac key=nazwa item=rekord}
<tr>
<td>{$rok} {$nazwa}</td>
{foreach from=$rekord key=kategoria item=wartosc}
<td style="text-align: right;">{$wartosc}</td>
{/foreach}
</tr>
{/foreach}
{/foreach}
</tbody>
<tfoot>
<tr>
<td>{$MOD.LBL_SUM}</td>
{foreach from=$suma item=summa}
<td style="text-align: right;">{$summa}</td>
{/foreach}
</tr>
</tfoot>
</table>
<div id="testujemy"></div>
<div id="chart_div" style="width: 100%; height: 500px;"></div>

View File

@@ -0,0 +1,201 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style>
{literal}
@page {
size: auto;
odd-header-name: html_Header;
}
#MainTable {
width: 100%;
font-size: 8pt;
border-collapse: collapse;
}
#MainTable .text-left {
text-align: left;
}
#MainTable .text-right {
text-align: right;
}
#MainTable .border-bottom {
border-collapse: collapse;
border-bottom: 1px solid black;
}
#MainTable .border-top {
border-collapse: collapse;
border-top: 1px solid black;
}
{/literal}
</style>
</head>
<body>
<htmlpageheader name="Header">
<div style="text-align: left; font-weight: bold; font-size: 10pt;">
<table style="width: 100%">
<tr><td style="width: 50%">
<table>
<tr>
<td style="font-size: 12px; font-weight: bold">{$COMPANY_NAME}</td>
</tr>
<tr>
<td style="font-size: 12px; font-weight: bold">Data wydruku: {$CUR_DATE}</td>
</tr>
<tr>
<td style="font-size: 12px; font-weight: bold">Rejestr zakupu za okres od {$DATE_FROM} do {$DATE_TO}</td>
</tr>
<tr>
<td style="font-size: 12px; font-weight: bold">Strona {literal}{PAGENO} z {nbpg}{/literal}</td>
</tr>
</table>
</td><td style="text-align: right; vertical-align: top; font-size: 8pt;">
Ustawienia raportu:<br>
Magazyn: {$S_STOCK}<br>
Rodzaj: {$S_KIND}<br>
Kategoria: {$S_CATEGORY}<br>
</td></tr>
</table>
</div>
</htmlpageheader>
<div>
{foreach from=$PAGES item=PAGE name=page"}
{assign var=pagesCount value=$PAGES|@count}
{assign var=vatColSize value=0}
{math
assign="vatColSize"
equation="round(37/($vatsCount))"
}
<table id="MainTable">
<thead>
<tr>
<th class="border-top border-bottom" style="width: 3%;" rowspan="2">Lp.</th>
<th class="text-left border-top" style="width: 10%;">Nr dok.</th>
<th class="text-left border-top" style="width: 10%;">Data wpływ.</th>
<th class="text-left border-top" style="width: 10%;">Data rejest.</th>
<th class="text-left border-top" style="width: 10%;">Nr PZ</th>
<th class="text-left border-top" colspan="{$vatsCount+1}">Odbiorca - NIP, Nazwa, Adres</th>
</tr>
<tr>
<th class="text-right border-bottom" style="width: 10%;">Rodzaj</th>
<th class="text-right border-bottom" style="width: 10%;">Zak. brutto</th>
<th class="text-right border-bottom" style="width: 10%;">Zak. netto</th>
<th class="text-right border-bottom" style="width: 10%;">Wartość PZ</th>
{foreach from=$VATS key=vat_name item=i}
<th class="text-right border-bottom" style="width: {$vatColSize}%;">Netto {$vat_name}</th>
{if $i=='2'}
<th class="text-right border-bottom" style="width: {$vatColSize}%;">VAT {$vat_name}</th>
{/if}
{/foreach}
<th class="text-right border-bottom" style="width: 10%;">VAT Razem</th>
</tr>
</thead>
<tbody>
{foreach from=$PAGE.rows item=row}
{if $row.is_summary!=1}
<tr>
<td class="text-left border-bottom" rowspan="2">{$row.lp}</td>
<td class="text-left">{$row.document_no}&nbsp;&nbsp;</td>
<td class="text-left">{$row.publish_date}</td>
<td class="text-left">{$row.register_date}</td>
<td class="text-left">{$row.rel_doc}</td>
<td class="text-left" colspan="{$vatsCount+1}">{$row.parent_info}</td>
</tr>
<tr>
<td class="text-right border-bottom">{$row.parent_type}</td>
<td class="text-right border-bottom">{$row.brutto|number_format:2:",":"."}</td>
<td class="text-right border-bottom">{$row.netto|number_format:2:",":"."}</td>
<td class="text-right border-bottom">{$row.rel_doc_total|number_format:2:",":"."}</td>
{foreach from=$row.vats item=v key=k}
<td class="text-right border-bottom">{$v[0]|number_format:2:",":"."}</td>
{if $VATS.$k == '2'}
<td class="text-right border-bottom">{$v[1]|number_format:2:",":"."}</td>
{/if}
{/foreach}
<td class="text-right border-bottom">{$row.vat|number_format:2:",":"."}</td>
</tr>
{else}
<tr>
<td class="text-left" colspan="{$vatsCount+6}"><b>Razem - {$row.index}</b></td>
</tr>
<tr>
<td class="text-right border-bottom" colspan="2">&nbsp;</td>
<td class="text-right border-bottom" >{$row.total_brutto|number_format:2:",":"."}</td>
<td class="text-right border-bottom" >{$row.total_netto|number_format:2:",":"."}</td>
<td class="text-right border-bottom" >{$row.total_rel|number_format:2:",":"."}</td>
{foreach from=$row.vats item=v key=k}
<td class="text-right border-bottom">{$v[0]|number_format:2:",":"."}</td>
{if $VATS.$k == '2'}
<td class="text-right border-bottom">{$v[1]|number_format:2:",":"."}</td>
{/if}
{/foreach}
<td class="text-right border-bottom" >{$row.total_vat|number_format:2:",":"."}</td>
</tr>
{/if}
{/foreach}
<tr>
<td class="text-left" colspan="{$vatsCount+5}">Suma strony:</td>
</tr>
<tr>
<td class="border-bottom" colspan="2">&nbsp;</td>
<td class="text-right border-bottom">{$PAGE.site_brutto|number_format:2:",":"."}</td>
<td class="text-right border-bottom">{$PAGE.site_netto|number_format:2:",":"."}</td>
<td class="text-right border-bottom">{$PAGE.site_pz|number_format:2:",":"."}</td>
{foreach from=$PAGE.site_vats item=v key=k}
<td class="text-right border-bottom">{$v[0]|number_format:2:",":"."}</td>
{if $VATS.$k == '2'}
<td class="text-right border-bottom">{$v[1]|number_format:2:",":"."}</td>
{/if}
{/foreach}
<td class="text-right border-bottom">{$PAGE.site_vat|number_format:2:",":"."}</td>
</tr>
<tr>
<td class="text-left" colspan="{$vatsCount+5}">Suma z przeniesienia:</td>
</tr>
<tr>
<td class="border-bottom" colspan="2">&nbsp;</td>
<td class="text-right border-bottom">{$PAGE.moved_brutto|number_format:2:",":"."}</td>
<td class="text-right border-bottom">{$PAGE.moved_netto|number_format:2:",":"."}</td>
<td class="text-right border-bottom">{$PAGE.moved_pz|number_format:2:",":"."}</td>
{foreach from=$PAGE.moved_vats item=v key=k}
<td class="text-right border-bottom">{$v[0]|number_format:2:",":"."}</td>
{if $VATS.$k == '2'}
<td class="text-right border-bottom">{$v[1]|number_format:2:",":"."}</td>
{/if}
{/foreach}
<td class="text-right border-bottom">{$PAGE.moved_vat|number_format:2:",":"."}</td>
</tr>
<tr>
<td class="text-left" colspan="{$vatsCount+5}">Suma razem:</td>
</tr>
<tr>
<td class="border-bottom" colspan="2">&nbsp;</td>
<td class="text-right border-bottom">{$PAGE.total_brutto|number_format:2:",":"."}</td>
<td class="text-right border-bottom">{$PAGE.total_netto|number_format:2:",":"."}</td>
<td class="text-right border-bottom">{$PAGE.total_pz|number_format:2:",":"."}</td>
{foreach from=$PAGE.total_vats item=v key=k}
<td class="text-right border-bottom">{$v[0]|number_format:2:",":"."}</td>
{if $VATS.$k == '2'}
<td class="text-right border-bottom">{$v[1]|number_format:2:",":"."}</td>
{/if}
{/foreach}
<td class="text-right border-bottom">{$PAGE.total_vat|number_format:2:",":"."}</td>
</tr>
</tbody>
</table>
{if $smarty.foreach.page.index != $pagesCount-1 }
<newpage>
{/if}
{/foreach}
<p style="font-size: 8pt;">
KONIEC WYDRUKU
</p>
</div>
</body>
</html>

View File

@@ -0,0 +1,69 @@
<ul class="tablist" style="width:100%;"></ul>
<form target="_blank" action="index.php" method="get" name="mzVatSales">
<input type="hidden" id="module" name="module" value="EcmReports"/>
<input type="hidden" id="action" name="action" value="mzVatPurchases"/>
<input type="hidden" id="process" name="process" value="1"/>
<input type="hidden" id="to_xls" name="to_xls" value="0"/>
<input type="hidden" id="to_xls" name="to_pdf" value="1"/>
<table class="tabForm" cellspacing="0" cellpadding="0" border="0" style="border-top: 0px none; margin-bottom: 4px;width:100%">
<tr>
<td class="dataLabel" width="5%" nowrap="nowrap">Magazyn: </td>
<td class="dataField" width="8%" nowrap="nowrap">
{$STOCKS}
</td>
<td class="dataLabel" width="5%" nowrap="nowrap">Rodzaj: </td>
<td class="dataField" width="8%" nowrap="nowrap">
{$KINDS}
</td>
<td class="dataLabel" width="5%" nowrap="nowrap">Kategoria: </td>
<td class="dataField" width="8%" nowrap="nowrap">
{$CATEGORIES}
</td>
</tr>
<tr>
<td class="dataLabel" width="5%" nowrap="nowrap">Grupuj kontrahentów: </td>
<td class="dataField" width="8%" nowrap="nowrap">
<input type="checkbox" name="group_accounts" id="group_accounts" {if $GROUP_ACCOUNTS == '1'} checked {/if}/>
</td>
</tr>
<tr>
<td class="dataLabel" width="5%" nowrap="nowrap">Data od: </td>
<td class="dataField" width="8%" nowrap="nowrap">
<input id="date_from" name="date_from" type="text" maxlength="10" size="11" tabindex="" title="" 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">
Calendar.setup ({ldelim}
inputField : "date_from",
daFormat : "%d.%m.%Y",
button : "date_from_trigger",
singleClick : true,
dateStr : "",
step : 1
{rdelim}
);
</script>
</td>
</tr>
<tr>
<td class="dataLabel" width="5%" nowrap="nowrap">Data do: </td>
<td class="dataField" width="8%" nowrap="nowrap">
<input autocomplete="off" name="date_to" id="date_to" value="{$DATE_TO}" title="" 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>
</tr>
</table>
<input type="submit" class="button" onclick="$('#to_xls').val(0);$('#to_pdf').val(1);" value="Wykonaj"/>
<input type="submit" class="button" onclick="$('#to_xls').val(1);" value="XLS"/>
<input type="button" class="button" value="Wyczyść" onClick = "window.location='index.php?module=EcmReports&action=mzVatPurchases'"/>
</form>

View File

@@ -0,0 +1,215 @@
<style type="text/css">
{literal}
table.report {
margin: 15px 0;
width: 100%;
border-spacing: 1px;
font-family: 'Calibri';
font-size: 13px;
}
table.report thead tr th,
table.report tbody tr td {
padding: 2px 5px;
border: 1px solid #CCCCCC;
text-align: center;
}
table.report thead tr th {
background: #ebebeb;
}
table.report tbody tr.odd {
background: #f6f6f6;
}
table.report tbody tr.even {
background: #ffffff;
}
{/literal}
</style>
<script type="text/javascript">
{literal}
function pdfExport() {
var url = $(location).attr('href');
url = url + "&toPDF=1&to_pdf=1";
window.open(url);
}
function xlsExport() {
var url = $(location).attr('href');
url = url + "&toPDF=1&to_pdf=1&to_xls=1";
window.open(url);
}
{/literal}
</script>
<table cellspacing="0" cellpadding="0" border="0">
<tr>
<td>
<h2>{$MOD.LBL_RAPORT_TITLE}</h2>
</td>
</tr>
</table>
<br />
<ul class="tablist">
<li>
<a class="current" href="#">Opcje</a>
</li>
</ul>
<form action="index.php" method="get" name="search_reports">
<input type="hidden" name="module" value="EcmReports" />
<input type="hidden" name="action" value="kpkwReport" />
<table style="border-top: 0px none; margin-bottom: 4px; width:100%" class="tabForm" border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td class="dataLabel" width="5%" nowrap="nowrap">
{$MOD.LBL_DATE_START}
</td>
<td class="dataField" width="10%" nowrap="nowrap">
<input autocomplete="off" name="date_from" id="date_from" value="{$currentFrom}" title="" tabindex="" size="11" maxlength="10" type="text">
<img src="themes/default/images/jscalendar.gif" alt="Enter Date" id="date_from_trigger" align="absmiddle" border="0">
<script type="text/javascript">
Calendar.setup ({ldelim}
inputField : "date_from",
daFormat : "{$dateFormat}",
button : "date_from_trigger",
singleClick : true,
dateStr : "",
step : 1
{rdelim}
);
</script>
</td>
<td class="dataLabel" width="5%" nowrap="nowrap">
{$MOD.LBL_DATE_END}
</td>
<td class="dataField" width="10%" nowrap="nowrap">
<input autocomplete="off" name="date_to" id="date_to" value="{$currentTo}" title="" 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 type="text/javascript">
Calendar.setup ({ldelim}
inputField : "date_to",
daFormat : "{$dateFormat}",
button : "date_to_trigger",
singleClick : true,
dateStr : "",
step : 1
{rdelim}
);
</script>
</td>
<td class="dataLabel" width="5%" nowrap="nowrap">
{$MOD.LBL_CASH2}
</td>
<td class="dataField" width="10%" nowrap="nowrap">
<input autocomplete="off" name="ecmcash_id" id="ecmcash_id" type="hidden" value="{$PARAMS.ecmcash_id}" title="" tabindex="" size="11" maxlength="10" type="text">
<input autocomplete="off" name="id_currency" id="id_currency" type="hidden" value="{$PARAMS.id_currency}" title="" tabindex="" size="11" maxlength="10" type="text">
<input autocomplete="off" name="cash_name" id="cash_name" value="{$PARAMS.cash_name}" title="" tabindex="" size="11" maxlength="10" type="text">
<input title="Wybierz [Alt+T]" accesskey="T" type="button" class="button" value="{$MOD.LBL_SELECT}" name="btn1" onclick='{literal}open_popup("EcmCashs", 600, 400, "", true, false,
{"call_back_function":"set_return","form_name":"search_reports","field_to_name_array":
{"id":"ecmcash_id","name":"cash_name","currency_id":"id_currency"}}, "single", true); {/literal}'></span>
</td>
<td class="dataLabel" width="5%" nowrap="nowrap">
{$MOD.LBL_CASH_USER2}
</td>
<td class="dataField" width="10%" nowrap="nowrap">
<select name="kasjer" id="kasjer">
<option value="">Wszyscy</option>
{foreach from=$USERS item=USER key=count name=loop}
<option value="{$USER.id}" { if $PARAMS.kasjer==$USER.id} selected="true" {/if} >{$USER.first_name} {$USER.last_name}</option>
{/foreach}
</select>
</td>
<td class="dataLabel" width="70%" nowrap="nowrap"></td>
</tr>
</tbody>
</table>
<input class="button" value="{$MOD.LBL_SUBMIT}" type="submit"/>
<input class="button" name="clear" value="{$MOD.LBL_CLEAR}" type="button" onclick="location.href='index.php?module=EcmReports&action=kpkwReport';">
<!-- <input id="excelEksport" class="button" name="importToExcel" onClick="xlsExport();" value="XLS" type="button"> -->
<input id="pdf" class="button" name="pdf" value="PDF" onClick="pdfExport();" type="button">
</form>
<center><h1>{$MOD.LBL_RAPORT_LABEL} <br>{$MOD.LBL_TIME} {$currentFrom} - {$currentTo}<BR>
{if $PARAMS.cash_name!=''} {$MOD.LBL_CASH}: {$PARAMS.cash_name}, {$MOD.LBL_CURRENCY_PDF}: {$PARAMS.id_currency}{/if}
{if $PARAMS.kasjer!=''}
<br>{$MOD.LBL_CASH_USER} {$USER_NAME}
{/if}
</h1></center><br>
<table class="report" style="padding-top: 0px; margin-top:0px;">
<thead>
<tr>
<th>{$MOD.LBL_NUMBER_LP}</th>
<th>{$MOD.LBL_DOCUMENT_NO}<br>{$MOD.LBL_CREATE_LAB}</th>
<th>{$MOD.LBL_TITLE}</th>
<th>{$MOD.LBL_PARENT_NAME}</th>
<th>{$MOD.LBL_AMOUNT_PLUS}</th>
<th>{$MOD.LBL_AMOUNT_MINUS}</th>
</tr>
</thead>
<tbody>
{foreach from=$DATA item=poz key=CATNAME name=loop}
{if $poz.type_id!=''}
<tr class="{$poz.class}">
<td width="5%">{$poz.number}</td>
<td width="15%" style="text-align:left;">
<table class="report" style="padding-top: 0px; margin-top:0px;">
<tr class="{$poz.class}">
<td style="text-align:left;">{$poz.document_no}</td>
</tr>
<tr>
<td style="text-align:left;">{$poz.date_entered|date_format:"%d.%m.%Y"}</td>
</tr>
</table>
</td>
<td width="22%" style="text-align:left;">{$poz.description}</td>
<td width="22%" style="text-align:left;">{$poz.parent_name}</td>
<td width="17%" style="text-align:right;">{if $poz.type_id==0} {$poz.amount|number_format:2:",":"."} {else} &nbsp;{/if}</td>
<td width="17%" style="text-align:right;">{if $poz.type_id==1} {$poz.amount|number_format:2:",":"."} {else} &nbsp;{/if}
</td>
</tr>
{assign var="i" value=$poz.number}
{/if}
{/foreach}
{assign var="currow" value=$poz.number+1}
<tr class="{if $currow%2}even{else}odd{/if}">
<td width="45%" style="border: 0px; background: #fff;" colspan="2">&nbsp;</td>
<td width="15%" style="border: 0px; background: #fff;"></td>
<td width="15%" style="text-align:left;">{$MOD.LBL_VALUE}</td>
<td width="15%" style="text-align:right;">{$DATA.in|number_format:2:",":"."}</td>
<td width="20%" style="text-align:right;">{$DATA.out|number_format:2:",":"."}</td>
<td width="20%" style="border: 0px;background: #fff;">&nbsp;
</td>
</tr>
{assign var="currow" value=$currow+1}
<tr class="{if $currow%2}even{else}odd{/if}">
<td width="45%" style="border: 0px; background: #fff;" colspan="2">&nbsp;</td>
<td width="15%" style="border: 0px; background: #fff;"></td>
<td width="15%" style="text-align:left;">{$MOD.LBL_VALUE_BEFORE}:</td>
<td width="15%" style="text-align:right;">{$CASH_BEFORE|number_format:2:",":"."}</td>
<td width="20%" style="text-align:right;"></td>
<td width="20%" style="border: 0px;background: #fff;">&nbsp;
</td>
</tr>
{assign var="currow" value=$currow+1}
<tr class="{if $currow%2}even{else}odd{/if}">
<td width="45%" style="border: 0px; background: #fff;" colspan="2">&nbsp;</td>
<td width="15%" style="border: 0px; background: #fff;"></td>
<td width="15%" style="text-align:left;">{$MOD.LBL_VALUE_TOTAL}:</td>
<td width="15%" style="text-align:right;">{$CASH_NOW|number_format:2:",":"."}</td>
<td width="20%" style="text-align:right;"></td>
<td width="20%" style="border: 0px;background: #fff;">&nbsp;
</td>
</tr>
</tbody>
</table>

View File

@@ -0,0 +1,232 @@
<html>
<head>
<style>
{literal}
.edit tr td{
vertical-align : middle;
}
.money ,.quantity{
text-align : right;
}
table.tablesorter {
font-family:arial;
background-color: #CDCDCD;
margin:10px 0pt 15px;
font-size: 8pt;
width: 100%;
text-align: left;
}
table.tablesorter thead tr th, table.tablesorter tfoot tr th {
background-color: #e6EEEE;
border: 1px solid #FFF;
font-size: 8pt;
padding: 4px;
}
table.tablesorter thead tr .header {
background-image: url(bg.gif);
background-repeat: no-repeat;
background-position: center right;
cursor: pointer;
}
table.tablesorter tbody td {
color: #3D3D3D;
padding: 4px;
background-color: #FFF;
vertical-align: top;
}
table.tablesorter tbody tr.odd td {
background-color:#F0F0F6;
}
table.tablesorter thead tr .headerSortUp {
background-image: url(asc.gif);
}
table.tablesorter thead tr .headerSortDown {
background-image: url(desc.gif);
}
table.tablesorter thead tr .headerSortDown, table.tablesorter thead tr .headerSortUp {
background-color: #8dbdd8;
}
{/literal}
</style>
</head>
<body>
<table style="width:100%;font-size:10px">
<thead>
<tr>
<td colspan='4'>
<p style="font-size:15px"><b>Raport ilościowy zakupu</b></p>
{$EcmSysInfo->getName()}
</td>
<td style="text-align:right">
Data wygenerowania raportu:<br>
{$smarty.now|date_format:"%d.%m.%Y %H:%M:%S"}
</td>
</tr>
</thead>
<tbody>
<tr>
<td >
{$MOD.LBL_DATE_FROM}: {$date_from_value}<br>
{$MOD.LBL_DATE_TO}: {$date_to_value}
</td>
<td >
<table>
<tr>
<td>
{$MOD.LBL_DOCUMENT_SALES_TYPE}:
</td>
<td>
{if @count($DOCUMENT_SALES_SELECTED) == 0}
{foreach from=$MOD.DOCUMENT_SALES_LIST key="key" item="item"}
{$item}<br>
{/foreach}
{else}
{foreach from=$MOD.DOCUMENT_SALES_LIST key="key" item="item"}
{if @in_array($key, $DOCUMENT_SALES_SELECTED) } {$item}<br>{/if}
{/foreach}
{/if}
</td>
</tr>
</table>
</td>
<td >
<table>
<tr>
<td>
{$MOD.LBL_PRODUCT_GROUP}:
</td>
<td>
{if @count($PRODUCT_GROUP_SELECTED) == 0}
{foreach from=$APP_LIST_STRINGS.ecmproducts_group_ks_dom key="key" item="item"}
{$item}<br>
{/foreach}
{else}
{foreach from=$APP_LIST_STRINGS.ecmproducts_group_ks_dom key="key" item="item"}
{if @in_array($key, $PRODUCT_GROUP_SELECTED) } {$item}<br>{/if}
{/foreach}
{/if}
</td>
</tr>
</table>
</td>
<td >
<table>
<tr>
<td>
{$MOD.LBL_STOCK}:
</td>
<td>
{if @count($STOCK_SELECTED) == 0}
{foreach from=$STOCK_LIST key="key" item="item"}
{$item}<br>
{/foreach}
{else}
{foreach from=$STOCK_LIST key="key" item="item"}
{if @in_array($key, $STOCK_SELECTED) } {$item}<br>{/if}
{/foreach}
{/if}
</td>
</tr>
</table>
</td>
<td >
{$MOD.LBL_TRADER}:
{if $TRADER_SELECTED ==''}
Wszyscy
{else}
{foreach from=$TRADERS_LIST key="key" item="item"}
{if @in_array($key, $TRADER_SELECTED) } {$item}<br>{/if}
{/foreach}
{/if}
</td>
</tr>
<tr>
</tr>
</tbody>
</table>
<table id="myTable" class="tablesorter">
<thead>
<tr>
<th>
Indeks
</th>
<th>
{$MOD.LBL_NAME}
</th>
<th width="10%">
{$MOD.LBL_QUANTITY}
</th>
<th width="5%">
{$MOD.LBL_JM}
</th>
<th width="10%">
Zakup Netto
</th>
<th width="10%">
Waga jedn. netto
</th>
<th width="10%">
Waga ogółem netto
</th>
</tr>
</thead>
<tbody>
{foreach from=$DATA item=item key=item_name}
{if $item.quantity eq 0}
{else}
<tr>
<td >
{$item.code}
</td>
<td>
{$item.name}
</td>
<td class="quantity">
{$item.quantity|number_format:$item.jm_precision:",":""}
</td>
<td>
{$item.jm_name}
</td>
<td class="money">
{$item.total_netto|number_format:2:",":"."}
{assign var=summary_netto value=$summary_netto+$item.total_netto}
</td>
<td class="quantity" style="text-align:right;">
{$item.position_weight|number_format:6:",":""}
</td>
<td class="quantity" style="text-align:right;">
{$item.position_total_weight|number_format:6:",":""}
</td>
</tr>
{/if}
{/foreach}
</tbody>
<tfoot>
<tr>
<td colspan="2">
{$MOD.LBL_SUMMARY}
</td>
<td class="money">
{$TOTAL3|number_format:2:",":""}
</td>
<td class="money">
</td>
<td class="money">
{$summary_netto|number_format:2:",":"."}
</td>
<td class="money">
</td>
<td class="money">
{$TOTAL4|number_format:6:",":""}
</td>
</tr>
</tfoot>
</table>
</body>
</html>

View File

@@ -0,0 +1,273 @@
<script type="text/javascript" src="modules/EcmReports/javascript/mzVatPurchases.js"></script>
<link rel="stylesheet" type="text/css" href="modules/EcmReports/css/SearchTable.css"/>
<script src="include/jQuery/tablesorter/jquery.tablesorter.min.js"></script>
<link class="theme" rel="stylesheet" href="include/jQuery/tablesorter/themes/blue/style.css">
<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;" width="16" border="0" height="16">
</td>
<td>
<h2 id="raport_name">Raport ilościowy zakupu</h2>
</td>
</tr>
</table>
<form action="index.php" method="get" name="ReportSalesByProduct">
<input type="hidden" name="module" value="EcmReports" />
<input type="hidden" name="action" value="mzVatPurchases"/>
<input type="hidden" name="parentTab" value="Raporty" />
<table style="width:100%" class="edit view" id="SearchTable">
<tbody>
<tr>
<td>
{$MOD.LBL_DATE_FROM}:
<input id="date_from" name="date_from" type="text" maxlength="10" size="11" title="{$MOD.LBL_DATE_FROM}" value="{$date_from_value}">
<img id="date_from_trigger" src="themes/default/images/jscalendar.gif">
</td>
<!--<td rowspan='2'>
<table>
<tr>
<td>
{$MOD.LBL_DOCUMENT_SALES_TYPE}:
</td>
<td>
<select multiple name="document_sales_type[]" title="{$MOD.TIP_MULTIPLE}">
{foreach from=$MOD.DOCUMENT_SALES_LIST key="key" item="item"}
<option
value="{$key}"
{if @in_array($key, $DOCUMENT_SALES_SELECTED) } selected="true" {/if}>
{$item}
</option>
{/foreach}
</select>
</td>
</tr>
</table>
</td>-->
<td rowspan='2'>
<table>
<tr>
<td>
{$MOD.LBL_PRODUCT_GROUP}:
</td>
<td>
<select multiple name="product_group[]" title="{$MOD.TIP_MULTIPLE}">
<option {if @in_array("", $PRODUCT_GROUP_SELECTED) } selected="true" {/if} value=""></option>
{foreach from=$APP_LIST_STRINGS.ecmproducts_group_ks_dom key="key" item="item"}
<option
value="{$key}"
{if @in_array($key, $PRODUCT_GROUP_SELECTED) } selected="true" {/if}>
{$item}
</option>
{/foreach}
</select>
</td>
</tr>
</table>
</td>
<td rowspan='2'>
<table>
<tr>
<td>
{$MOD.LBL_PRODUCT_GROUP} 2:
</td>
<td>
<select multiple name="product_group_2[]" title="{$MOD.TIP_MULTIPLE}">
<option {if @in_array("", $PRODUCT_GROUP_SELECTED_2) } selected="true" {/if} value=""></option>
{foreach from=$APP_LIST_STRINGS.ecmproducts_group2_ks_dom key="key" item="item"}
<option
value="{$key}"
{if @in_array($key, $PRODUCT_GROUP_SELECTED_2) } selected="true" {/if}>
{$item}
</option>
{/foreach}
</select>
</td>
</tr>
</table>
</td>
<td rowspan='2'>
<table>
<tr>
<td>
{$MOD.LBL_STOCK}:
</td>
<td>
<select multiple name="stocks[]" title="{$MOD.TIP_MULTIPLE}">
{foreach from=$STOCK_LIST key="key" item="item"}
<option
value="{$key}"
{if @in_array($key, $STOCK_SELECTED) } selected="true" {/if}>
{$item}
</option>
{/foreach}
</select>
</td>
</tr>
</table>
</td>
<td rowspan='2'>
<table>
<tr>
<td>
Typ:
</td>
<td>
<select multiple name="account_type[]" title="{$MOD.TIP_MULTIPLE}">
{foreach from=$ACCOUNT_LIST key="key" item="item"}
<option
value="{$key}"
{if @in_array($key, $ACCOUNT_SELECTED) } selected="true" {/if}>
{$item}
</option>
{/foreach}
</select>
</td>
</tr>
</table>
<br>
<p>
Kategoria produktu:
<input type="hidden" id="product_category_id" name="product_category_id" value="{$PRODUCT_CATEGORY_ID}">
<input type="text" id="product_category_name" name="product_category_name" value="{$PRODUCT_CATEGORY_NAME}">
<button
type="button"
id="selectProduct"
value="{$APP.LBL_ADD_BUTTON}"
title="{$MOD.TIP_CHOOSE_ACCOUNT}">
<img src="{sugar_getimagepath file="id-ff-select.png"}">
</button>
<button
type="button"
id="clearProduct"
value="{$MOD.LBL_CLEAR}"
title="{$MOD.LBL_CLEAR}">
<img src="{sugar_getimagepath file='id-ff-clear.png'}">
</button>
</p>
</td>
<td rowspan='2'>
<p>
{$MOD.LBL_TRADER}:
{html_options id=trader name=trader[] multiple=true options=$TRADERS_LIST selected=$TRADER_SELECTED}
</p><br>
<p>
{$MOD.LBL_CONTRACTOR}:
<input type="hidden" id="account_id" name="account_id" value="{$ACCOUNT_ID}">
<input type="text" id="account_name" name="account_name" value="{$ACCOUNT_NAME}">
<button
type="button"
id="selectAccount"
value="{$APP.LBL_ADD_BUTTON}"
title="{$MOD.TIP_CHOOSE_ACCOUNT}">
<img src="{sugar_getimagepath file="id-ff-select.png"}">
</button>
<button
type="button"
id="clearAccount"
value="{$MOD.LBL_CLEAR}"
title="{$MOD.LBL_CLEAR}">
<img src="{sugar_getimagepath file='id-ff-clear.png'}">
</button>
</p>
</td>
</tr>
<tr>
<td> {$MOD.LBL_DATE_TO}:
<input id="date_to" name="date_to" type="text" maxlength="10" size="11" title="{$MOD.LBL_DATE_TO}" value="{$date_to_value}">
<img id="date_to_trigger" src="themes/default/images/jscalendar.gif">
</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=mzVatPurchases';">
<input id="pdf" class="button" name="pdf" value="{$MOD.LBL_PDF}" type="button" onclick="generatePDF()">
<!-- <input id="pdf" class="button" name="pdf" value="XLS" type="button" onclick="generateXLS()"> -->
</form>
<table id="myTable" class="tablesorter">
<thead>
<tr>
<th class='sortby'>
Indeks
</th>
<th class='sortby'>
{$MOD.LBL_NAME}
</th>
<th width="10%" class='sortby'>
{$MOD.LBL_QUANTITY}
</th>
<th width="5%" class='sortby'>
{$MOD.LBL_JM}
</th>
<th width="10%" class='sortby'>
Zakup Netto
</th>
<th width="10%" class='sortby'>
Waga jedn. netto
</th>
<th width="10%" class='sortby'>
Waga ogółem netto
</th>
</tr>
</thead>
<tbody>
{foreach from=$DATA item=item key=item_name}
{if $item.quantity eq 0}
{else}
<tr>
<td >
{$item.code}
</td>
<td >
{$item.name}
</td>
<td class="quantity">
{$item.quantity|number_format:$item.jm_precision:",":""}
</td>
<td>
{$item.jm_name}
</td>
<td class="money">
{$item.total_netto|number_format:2:",":"."}
</td>
<td class="" style="text-align:right;">
{$item.position_weight|number_format:6:",":""}
</td>
<td class="" style="text-align:right;">
{$item.position_total_weight|number_format:6:",":""}
</td>
</tr>
{/if}
{/foreach}
</tbody>
<tfoot>
<tr>
<td colspan="2">
{$MOD.LBL_SUMMARY}
</td>
<td colspan="1" class="money">
{$TOTAL3|number_format:2:",":""}
</td>
<td colspan="1">
</td>
<td class="money">
{$TOTAL|number_format:2:",":"."}
</td>
<td class="money">
</td>
<td class="money" style="text-align:right;">
{$TOTAL4|number_format:6:",":""}
</td>
</tr>
</tfoot>
</table>

View File

@@ -0,0 +1,2 @@
</body>
</html>

View File

@@ -0,0 +1,53 @@
<html>
<head>
<style>
{literal}
.edit tr td{
vertical-align : middle;
}
.money ,.quantity{
text-align : right;
}
table.tablesorter {
font-family:arial;
background-color: #CDCDCD;
margin:10px 0pt 15px;
font-size: 8pt;
width: 100%;
text-align: left;
}
table.tablesorter thead tr th, table.tablesorter tfoot tr th {
background-color: #e6EEEE;
border: 1px solid #FFF;
font-size: 8pt;
padding: 4px;
}
table.tablesorter thead tr .header {
background-image: url(bg.gif);
background-repeat: no-repeat;
background-position: center right;
cursor: pointer;
}
table.tablesorter tbody td {
color: #3D3D3D;
padding: 4px;
background-color: #FFF;
vertical-align: top;
}
table.tablesorter tbody tr.odd td {
background-color:#F0F0F6;
}
table.tablesorter thead tr .headerSortUp {
background-image: url(asc.gif);
}
table.tablesorter thead tr .headerSortDown {
background-image: url(desc.gif);
}
table.tablesorter thead tr .headerSortDown, table.tablesorter thead tr .headerSortUp {
background-color: #8dbdd8;
}
{/literal}
</style>
</head>
<body>

View File

@@ -0,0 +1,103 @@
<link rel="stylesheet" type="text/css" href="modules/EcmReports/css/SearchTable.css"/>
<script src="include/jQuery/tablesorter/jquery.tablesorter.min.js"></script>
<link class="theme" rel="stylesheet" href="include/jQuery/tablesorter/themes/blue/style.css">
<h1>Raport PKWiU</h1>
<ul class="tablist" style="width:100%;"></ul>
<form action="index.php" method="get" name="RaportAktywnosci">
<input type="hidden" id="module" name="module" value="EcmReports"/>
<input type="hidden" id="action" name="action" value="pkwiu"/>
<input type="hidden" id="process" name="process" value="1"/>
<table class="tabForm" cellspacing="0" cellpadding="0" border="0" style="border-top: 0px none; margin-bottom: 4px;width:100%">
<tr>
<td class="dataLabel" width="5%" nowrap="nowrap">Data od: </td>
<td class="dataField" width="8%" nowrap="nowrap">
<input id="date_from" name="date_from" type="text" maxlength="10" size="11" tabindex="" title="" 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">
Calendar.setup ({ldelim}
inputField : "date_from",
daFormat : "%d.%m.%Y",
button : "date_from_trigger",
singleClick : true,
dateStr : "",
step : 1
{rdelim}
);
</script>
</td>
</tr>
<tr>
<td class="dataLabel" width="5%" nowrap="nowrap">Data do: </td>
<td class="dataField" width="8%" nowrap="nowrap">
<input autocomplete="off" name="date_to" id="date_to" value="{$date_to}" title="" 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>
</tr>
</table>
<input type="submit" class="button" value="Wykonaj"/>
<input type="button" class="button" value="Wyczyść" onClick = "window.location='index.php?module=EcmReports&action=pkwiu'"/>
</form>
{if $fired==true}
<table id="myTable" class="tablesorter">
<thead>
<tr>
<th class='sortby'>
KOD PKWiU
</th>
<th class='sortby'>
Kontrahent
</th>
<th width="10%" class='sortby'>
Ilość
</th>
</tr>
</thead>
{if $data|@count>0}
<tbody>
{foreach from=$data item=item key=item_name}
<tr>
<td><b>{$item.pkwiu}</b></td>
<td><b><a target="_blank" href="index.php?module=Accounts&action=DetailView&record={$item.parent_id}">{$item.parent_name}</a></b></td>
<td style="text-align:right"><b>{$item.sum|number_format:2:",":"."} kg</b></td>
</tr>
{assign var=total value=$total+$item.sum}
{/foreach}
</tbody>
<tfoot>
<tr>
<td colspan="2" style="text-align:right;">
Razem:
</td>
<td class="money">
{$total|number_format:2:",":"."} kg
</td>
</tr>
</tfoot>
{else}
<tbody>
<tr>
<td colspan="3"><b><center>BRAK DANYCH DO WYŚWIETLENIA</center></B></td>
</tr>
</tbody>
{/if}
</table>
{/if}