Files
crm.twinpol.com/modules/EcmReports/ReportSalesByProdutGroups.html

365 lines
14 KiB
HTML
Raw Normal View History

2025-05-12 15:45:02 +00:00
<!-- Tablesorter -->
<script type="text/javascript" src="https://mottie.github.io/tablesorter/docs/js/jquery-latest.min.js"></script>
<link class="theme" rel="stylesheet" href="https://mottie.github.io/tablesorter/docs/css/jquery-ui.min.css">
<script type="text/javascript" src="https://mottie.github.io/tablesorter/docs/js/jquery-ui.min.js"></script>
<script src="https://mottie.github.io/tablesorter/js/jquery.tablesorter.js"></script>
<script src="https://mottie.github.io/tablesorter/js/jquery.tablesorter.widgets.js"></script>
<script src="https://mottie.github.io/tablesorter/js/widgets/widget-scroller.js"></script>
<link class="theme" rel="stylesheet" href="modules/EcmReports/TableSorterNew/css/theme.blue.css">
<script type="text/javascript" src="modules/EcmReports/javascript/RaportZamowien.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;
}
/*
table#myTable-sticky th:first-child {
display:none;
}
*/
.plusStyle {
color: #abc3d7;
text-decoration: none;
cursor: pointer;
}
.green-text{
color:#2E8B57;
}
.fix {
position: absolute;
margin-left: -50px;
width: 100px;
}
.outer {
position: relative;
}
.inner {
overflow-x: scroll;
overflow-y: visible;
width: auto;
}
.ui-widget-content{
opacity: 0.9 !important;
}
#back2Top {
width: 40px;
line-height: 40px;
overflow: hidden;
z-index: 999;
display: block;
cursor: pointer;
position: fixed;
bottom: 50px;
right: 0;
background-color: #DDD;
color: #555;
text-align: center;
font-size: 30px;
text-decoration: none;
}
#back2Top:hover {
background-color: #DDF;
color: #000;
}
{/literal}
</style>
<script>
// call the tablesorter plugin
{literal}
$(document).ready(function(){
var startFixedColumns=1;
$("table").tablesorter({
showProcessing: true,
headerTemplate : '{content} {icon}',
widgets: [ 'zebra', 'scroller','stickyHeaders' ],
widgetOptions : {
scroller_height : '100%',
// set number of columns to fix
scroller_fixedColumns : startFixedColumns,
// add a fixed column overlay for styling
scroller_addFixedOverlay : false,
// add hover highlighting to the fixed column (disable if it causes slowing)
scroller_rowHighlight : 'hover',
// bar width is now calculated; set a value to override
scroller_barWidth : null,
stickyHeaders : '',
stickyHeaders_appendTo: $(".outer"),
// number or jquery selector targeting the position:fixed element
stickyHeaders_offset : 0,
// added to table ID, if it exists
stickyHeaders_cloneId : '-sticky',
// trigger "resize" event on headers
stickyHeaders_addResizeEvent : true,
// if false and a caption exist, it won't be included in the sticky header
stickyHeaders_includeCaption : true,
// The zIndex of the stickyHeaders, allows the user to adjust this to their needs
stickyHeaders_zIndex : 2,
// jQuery selector or object to attach sticky header to
stickyHeaders_attachTo : null
},
headers: {
4: {
sorter: 'number'
},
5: {
sorter: 'number'
},
6: {
sorter: 'number'
},
7: {
sorter: 'number'
},
8: {
sorter: 'number'
},
9: {
sorter: 'number'
},
10: {
sorter: 'number'
}
}
});
$($('.tablesorter-headerRow')[0]).children().click();
// update column value display
$( '.fixed-columns' ).text( startFixedColumns )
});
{/literal}
</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>Raport sprzedaży z podziałem na grupy produktów</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" target="" method="get" name="searchReportSales" id='searchReportSales'>
<input type="hidden" name="module" value="EcmReports" />
<input type="hidden" name="action" value="ReportSalesByProductGroups" />
<input type="hidden" name="to_pdf" id="to_pdf" value="0" />
<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="" value="{$date_from}" autocomplete="off">
<img id="date_from_trigger" border="0" align="absmiddle" 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}" tabindex="" size="11" maxlength="10" type="text">
<img src="themes/default/images/jscalendar.gif" 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>
</tr>
</tbody>
</table>
<input class="button" name="submit" id="wykonaj" value="Wykonaj" onclick="$('#to_pdf').val(0);$('#searchReportSales').attr('target',null);$('#submit').click();" type="button">
<input class="button" name="submit" id="submit" value="" type="submit" style="display:none;">
<input class="button" name="submit" id="pdf" value="PDF" onclick="$('#to_pdf').val(1);$('#searchReportSales').attr('target','_blank');$('#submit').click();" type="button">
<input class="button" name="submit" id="clear" value="Wyczyść" onclick="window.location='index.php?module=EcmReports&action=ReportSalesByProductGroups';" type="button">
<br>
<br>
</form>
{if $DATA!=NULL}
<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="">Nr dokumentu</th>
<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="">Data dokumentu</th>
<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="">Typ dokumentu</th>
<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="">Nabywca</th>
<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="">Wartość netto</th>
<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="">Wartość VAT</th>
<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="">Wartość brutto</th>
<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="">Wartość TH</th>
<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="">Wartość WG</th>
<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="">Wartość S</th>
<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="">Wartość T</th>
</tr>
</thead>
<tbody>
{foreach from=$DATA item=item name=loop key=id}
<tr>
<td class="oddListRowS1" style="text-align:left;"><a target="_blank" href="index.php?module=EcmInvoiceOuts&action=DetailView&record={$item.id}"><span title="{$item.name}">{$item.document_no}</span></a></td>
<td class="oddListRowS1" style="text-align:left;" >{$item.register_date|date_format:"%d.%m.%Y"}</td>
<td class="oddListRowS1" style="text-align:left;" >{$item.type}</td>
<td class="oddListRowS1" style="text-align:left;"><a target="_blank" href="index.php?module=Accounts&action=DetailView&record={$item.parent_id}">{$item.parent_name}</a></td>
<td class="oddListRowS1" style="text-align:right;color:blue;" data-value="{$item.total_netto}">{$item.total_netto|number_format:2:",":"."}</td>
<td class="oddListRowS1" style="text-align:right;color:blue;" data-value="{$item.total_vat}">{$item.total_vat|number_format:2:",":"."}</td>
<td class="oddListRowS1" style="text-align:right;color:blue;" data-value="{$item.total_brutto}">{$item.total_brutto|number_format:2:",":"."}</td>
<td class="oddListRowS1" style="text-align:right;color:blue;" data-value="{$item.TH}">{$item.TH|number_format:2:",":"."}</td>
<td class="oddListRowS1" style="text-align:right;color:blue;" data-value="{$item.WG}">{$item.WG|number_format:2:",":"."}</td>
<td class="oddListRowS1" style="text-align:right;color:blue;" data-value="{$item.S}">{$item.S|number_format:2:",":"."}</td>
<td class="oddListRowS1" style="text-align:right;color:blue;" data-value="{$item.T}">{$item.T|number_format:2:",":"."}</td>
</tr>
{/foreach}
</tbody>
<tfoot>
<tr>
<td class="oddListRowS1" style="text-align:right;"></td>
<td class="oddListRowS1" style="text-align:right;"></td>
<td class="oddListRowS1" style="text-align:right;"></td>
<td class="oddListRowS1" style="text-align:right;">Razem:</td>
<td class="oddListRowS1" style="text-align:right;color:blue;" >{$totals.total_netto|number_format:2:",":"."}</td>
<td class="oddListRowS1" style="text-align:right;color:blue;">{$totals.total_vat|number_format:2:",":"."}</td>
<td class="oddListRowS1" style="text-align:right;color:blue;">{$totals.total_brutto|number_format:2:",":"."}</td>
<td class="oddListRowS1" style="text-align:right;color:blue;">{$totals.TH|number_format:2:",":"."}</td>
<td class="oddListRowS1" style="text-align:right;color:blue;" >{$totals.WG|number_format:2:",":"."}</td>
<td class="oddListRowS1" style="text-align:right;color:blue;">{$totals.S|number_format:2:",":"."}</td>
<td class="oddListRowS1" style="text-align:right;color:blue;" >{$totals.T|number_format:2:",":"."}</td>
</tfoot>
</table>
{/if}