Files
crm.e5.pl/modules/EcmPaymentStates/tpls/summaryFast.html
2024-04-27 09:23:34 +02:00

197 lines
7.9 KiB
HTML

<script type="text/javascript" src="modules/EcmPaymentStates/javascript/jquery-latest.js"></script>
<script type="text/javascript" src="modules/EcmPaymentStates/javascript/jquery.tablesorter.js"></script>
<style type="text/css">
{literal}
/* tables */
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(modules/EcmPaymentStates/css/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(modules/EcmPaymentStates/css/asc.gif);
}
table.tablesorter thead tr .headerSortDown {
background-image: url(modules/EcmPaymentStates/css/desc.gif);
}
table.tablesorter thead tr .headerSortDown, table.tablesorter thead tr .headerSortUp {
background-color: #8dbdd8;
}
{/literal}
</style>
<script>
{literal}
$(document).ready(function()
{
$("#myTable").tablesorter({
theme: 'blue',
// initialize zebra striping of the table
widgets: ["zebra"],
// change the default striping class names
// updated in v2.1 to use widgetOptions.zebra = ["even", "odd"]
// widgetZebra: { css: [ "normal-row", "alt-row" ] } still works
widgetOptions : {
zebra : [ "normal-row", "alt-row" ]
}
});
}
);
function hideDetails(element){
$('#'+element).hide();
}
function getDetails(parent_id,date_start,date_end,type){
var ajax_url = "index.php?module=EcmPaymentStates&action=javahelper&to_pdf=1";
var params = {
job : 'getRangeTransactions',
parent_id : parent_id,
date_start: date_start,
date_end: date_end,
type:type
};
$.ajax({
type : "POST",
url : ajax_url,
dataType : "html",
async : false,
success : function(data) {
$('#details_'+parent_id).html(data);
$('#details_'+parent_id).show();
},
data : params
});
}
{/literal}
</script>
<table cellspacing="0" cellpadding="0" border="0">
<tr>
<td><h2>{$MOD.LBL_SUMMARY_TITLE}</h2></td>
</tr>
</table>
<br />
<table cellpadding="0" cellspacing="0" border="0" class="tablesorter flexitable" id="myTable"
style="width: 100%;">
<thead >
<tr class="flexitr">
<th style="text-align: left; width: 15%">
{$MOD.LBL_SUMMARY_ACCOUNT}
</th>
<th style="text-align: center; width: 10%;">
{$MOD.LBL_SUMMARY_UNSETTLED}
</th>
<th style="text-align: center; width: 10%;">
{$MOD.LBL_SUMMARY_NOT_OVERDUE}
</th>
<th style="text-align: center; width: 7%;">{$MOD.LBL_SUMMARY_NOT_OVERDUE_61}</th>
<th style="text-align: center; width: 7%;">{$MOD.LBL_SUMMARY_NOT_OVERDUE_31_60}</th>
<th style="text-align: center; width: 7%;">{$MOD.LBL_SUMMARY_NOT_OVERDUE_1_30}</th>
<th style="text-align: center; width: 10%;">
{$MOD.LBL_SUMMARY_OVERDUE}
</th>
<th style="text-align: center; width: 7%;">{$MOD.LBL_SUMMARY_OVERDUE_1_30}</th>
<th style="text-align: center; width: 7%;">{$MOD.LBL_SUMMARY_OVERDUE_31_60}</th>
<th style="text-align: center; width: 7%;">{$MOD.LBL_SUMMARY_OVERDUE_61_90}</th>
<th style="text-align: center; width: 7%;">{$MOD.LBL_SUMMARY_OVERDUE_91_180}</th>
<th style="text-align: center;">{$MOD.LBL_SUMMARY_OVERDUE_181}</th>
</tr>
</thead>
<tbody>
{foreach from=$DATA item=ROW name=loop}
<tr>
<td style="text-align: left;"><a target="new"
href="index.php?module=EcmPaymentStates&action=AccountPaymentStates&return_module=EcmPaymentStates&return_action=DetailView&parentTab=Rozrachunki&account_id={$ROW.parent_id}">
{$ROW.parent_name} </a></td>
<td style="text-align: right;" data-sort-value="{if !$ROW.not_settled}0{else}{$ROW.not_settled}{/if}">{$ROW.not_settled|number_format:2:",":"."}</td>
<td style="text-align: right;" data-sort-value="{if !$ROW.not_overpay}0{else}{$ROW.not_overpay}{/if}">{$ROW.not_overpay|number_format:2:",":"."}</td>
<td style="text-align: right;" data-sort-value="{if !$ROW.not_overpay_61}0{else}{$ROW.not_overpay_61}{/if}">{$ROW.not_overpay_61|number_format:2:",":"."}</td>
<td style="text-align: right;" data-sort-value="{if !$ROW.not_overpay_31_60}0{else}{$ROW.not_overpay_31_60}{/if}">{$ROW.not_overpay_31_60|number_format:2:",":"."}</td>
<td style="text-align: right;" data-sort-value="{if !$ROW.not_overpay_1_30}0{else}{$ROW.not_overpay_1_30}{/if}">{$ROW.not_overpay_1_30|number_format:2:",":"."}</td>
<td style="text-align: right;" data-sort-value="{if !$ROW.overpay}0{else}{$ROW.overpay}{/if}">{$ROW.overpay|number_format:2:",":"."}</td>
<td style="text-align: right;" data-sort-value="{if !$ROW.overpay_1_30}0{else}{$ROW.overpay_1_30}{/if}">{$ROW.overpay_1_30|number_format:2:",":"."}
<img src="modules/EcmQuotes/images/options.gif" style="cursor: pointer;" onclick="getDetails('{$ROW.parent_id}',0,30,{$account_type});">
<div id="{$ROW.parent_id}_30"></div>
</td>
<td style="text-align: right;" data-sort-value="{if !$ROW.overpay_31_60}0{else}{$ROW.overpay_31_60}{/if}">{$ROW.overpay_31_60|number_format:2:",":"."}
<img src="modules/EcmQuotes/images/options.gif" style="cursor: pointer;" onclick="getDetails('{$ROW.parent_id}',31,60,{$account_type});">
<div id="{$ROW.parent_id}_60"></div></td>
<td style="text-align: right;" data-sort-value="{if !$ROW.overpay_61_90}0{else}{$ROW.overpay_61_90}{/if}">{$ROW.overpay_61_90|number_format:2:",":"."}
<img src="modules/EcmQuotes/images/options.gif" style="cursor: pointer;" onclick="getDetails('{$ROW.parent_id}',61,90,{$account_type});">
<div id="{$ROW.parent_id}_90"></div>
</td>
<td style="text-align: right;" data-sort-value="{if !$ROW.overpay_91_180}0{else}{$ROW.overpay_91_180}{/if}">{$ROW.overpay_91_180|number_format:2:",":"."}
<img src="modules/EcmQuotes/images/options.gif" style="cursor: pointer;" onclick="getDetails('{$ROW.parent_id}',91,180,{$account_type});">
<div id="{$ROW.parent_id}_180"></div>
</td>
<td style="text-align: right;" data-sort-value="{if !$ROW.overpay_181}0{else}{$ROW.overpay_181}{/if}">{$ROW.overpay_181|number_format:2:",":"."}
<img src="modules/EcmQuotes/images/options.gif" style="cursor: pointer;" onclick="getDetails('{$ROW.parent_id}',181,0,{$account_type});">
<div id="{$ROW.parent_id}_0"></div>
</td>
</tr>
<tr id="details_{$ROW.parent_id}"
style="border-collapse: collapse; display: none;">
</tr>
{/foreach}
</tbody>
<tfoot>
<th style="text-align:left;">Podsumowanie:</th>
<th style="text-align:right;">{$SUM.not_settled|number_format:2:",":"."}</th>
<th style="text-align:right;">{$SUM.not_overpay|number_format:2:",":"."}</th>
<th style="text-align:right;">{$SUM.not_overpay_61|number_format:2:",":"."}</th>
<th style="text-align:right;">{$SUM.not_overpay_31_60|number_format:2:",":"."}</th>
<th style="text-align:right;">{$SUM.not_overpay_1_30|number_format:2:",":"."}</th>
<th style="text-align:right;">{$SUM.overpay|number_format:2:",":"."}</th>
<th style="text-align:right;">{$SUM.overpay_1_30|number_format:2:",":"."}</th>
<th style="text-align:right;">{$SUM.overpay_31_60|number_format:2:",":"."}</th>
<th style="text-align:right;">{$SUM.overpay_61_90|number_format:2:",":"."}</th>
<th style="text-align:right;">{$SUM.overpay_91_180|number_format:2:",":"."}</th>
<th style="text-align:right;">{$SUM.overpay_181|number_format:2:",":"."}</th>
</tr>
<tfoot>
</table>