This commit is contained in:
2024-04-27 09:23:34 +02:00
commit 11e713ca6f
11884 changed files with 3263371 additions and 0 deletions

View File

@@ -0,0 +1,360 @@
<!-- Tablesorter -->
<script type="text/javascript" src="include/jQuery/jquery-ui-lite/jquery-1.12.4.js"></script>
<link class="theme" rel="stylesheet" href="include/jQuery/jquery-ui-lite/jquery-ui.css">
<script type="text/javascript" src="include/jQuery/jquery-ui-lite/jquery-ui.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>
<link rel="stylesheet" type="text/css" href="modules/EcmInvoiceOuts/javascript/helper.css" media="screen" />
<div class="loading_panel" style="display:none"></div>
<script type="text/javascript" src="modules/EcmPaymentStates/javascript/AccountPaymentStates.js"></script>
<style type="text/css">
{literal}
thead, tfoot {font-weight: bold;}
/* 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.sumTr td {
background: #AAC1D5;
color: black;
}
table.tablesorter tbody tr.sumTr:hover td {
background: #9AAEC1;
color: black;
font-weight: bold;
}
.settle_panel {
display: none;
position: fixed;
z-index: 1000;
top: 0;
left: 0;
height: 100%;
width: 100%;
text-align: center;
padding-top: 5%;
background: rgba( 255, 255, 255, .8 );
text-align: center;
}
.settle_panel_main {
background: white;
border: 1px solid black;
width: 40%;
height: 40%;
display: inline-block;
}
#edit {
list-style-image: url('modules/EcmQuotes/images/edit_position.gif');
}
#delete {
list-style-image: url('modules/EcmSales/images/deleterow.gif');
}
#settled {
list-style-image: url('modules/EcmQuotes/images/search.gif');
}
#rel {
list-style-image: url('modules/EcmSales/images/relation.png');
}
#note {
list-style-image: url('modules/EcmQuotes/images/note.gif');
}
#email {
list-style-image: url('modules/EcmQuotes/images/email.gif');
}
{/literal}
</style>
<!-- begin header & search form -->
<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_ACCOUNTPAYMENTSTATES} {$ACCOUNT.NAME}</h2>
</td>
</tr>
</table>
<br />
{if $ACCOUNT.NAME==''}
<form action="index.php" method="post" name="searchForm">
<input type="hidden" name="module" value="EcmPaymentStates" />
<input type="hidden" name="action" value="AccountPaymentStates" />
<table style="border-top: 0px none; margin-bottom: 4px;width:100%" class="tabForm" border="0" cellpadding="0" cellspacing="0">
<tr>
<td class="dataLabel" width="10%" nowrap="nowrap">{$MOD.LBL_ACCOUNT_NAME}</td>
<td class="dataField" width="30%" nowrap="nowrap">
<input name="account_name" tabindex="" id="account_name" size="" value="{$ACCOUNT.NAME}" title="" type="text">
<input name="account_id" id="account_id" value="{$ACCOUNT.ID}" type="hidden">
<input name="btn_account_name" tabindex="" title="Select [Alt+T]" accesskey="T" class="button" value="Wybierz" onclick='
{literal}
open_popup("Accounts", 600, 400, "", true, false, {
"call_back_function":"set_return",
"form_name":"searchForm",
"field_to_name_array":{
"id":"account_id",
"name":"account_name"
}
},
"single", true);
{/literal}'
type="button"></td>
<td class="dataLabel" width="10%" nowrap="nowrap">{$MOD.LBL_SHOW_SETTLED}</td>
<td class="dataField" width="30%" nowrap="nowrap">
<input type="checkbox" id="show_settled" name="show_settled" {$SHOW_SETTLED}>
</td>
<td class="dataLabel" width="10%" nowrap="nowrap">{$MOD.LBL_AFER_P}</td>
<td class="dataField" width="30%" nowrap="nowrap">
<input type="checkbox" id="show_after_p" name="show_after_p" {$SHOW_AFTER_P}>
</td>
</tr>
</tbody>
</table>
<input class="button" name="submit" value="{$APP.LBL_SEARCH}" type="submit">
<input class="button" name="clear" value="{$APP.LBL_CLEAR_BUTTON_LABEL}" type="button" onclick="location.href='index.php?module=EcmPaymentStates&action=AccountPaymentStates';">
{else}
<form action="index.php" method="post" name="searchForm" id="searchForm">
<input type="hidden" name="module" value="EcmPaymentStates" />
<input type="hidden" name="action" value="AccountPaymentStates" />
<input name="account_name" tabindex="" id="account_name" size="" value="{$ACCOUNT.NAME}" title="" type="hidden">
<input type="hidden" id="show_settled" name="show_settled" value="{$SHOW_SETTLED}">
<input type="hidden" id="show_after_p" name="show_after_p" value="{$SHOW_AFTER_P}">
<input type="hidden" id="show_after_t" name="show_after_t" value="{$SHOW_AFTER_T}">
<input type="hidden" id="show_after_d" name="show_after_d" value="{$SHOW_AFTER_D}">
<input name="account_id" id="account_id" value="{$ACCOUNT.ID}" type="hidden">
<input class="button" name="switch" value="{if $SHOW_SETTLED}{$MOD.LBL_SHOW_SETTLED_OFF}{else}{$MOD.LBL_SHOW_SETTLED_ON}{/if}" onclick="sendPost();" type="button">
<input class="button" name="show_after_p" value="{if $SHOW_AFTER_P}{$MOD.LBL_AFER_P_OFF}{else}{$MOD.LBL_AFER_P_ON}{/if}" onclick="sendPost2();" type="button">
<input class="button" name="show_after_t" value="{if $SHOW_AFTER_T}{$MOD.LBL_AFER_T_OFF}{else}{$MOD.LBL_AFER_T_ON}{/if}" onclick="sendPost3();" type="button">
<input class="button" name="show_after_d" value="{if $SHOW_AFTER_D}Ukryj roz. wg daty{else}Pokaż roz. wg daty{/if}" onclick="sendPost4();" type="button">
<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>
<input class="button" name="submit" id="submit" value="{$APP.LBL_SEARCH}" type="submit" style="display:none">
{/if}
<br />
<!-- end header && search form-->
{if $PROCESS}
<div style="width: 100%; height: 500px; border: 1px sold blue; overflow: scrool;">
<div style="width: 49.8%; height: 500px; float: left; overflow: auto;">
<!-- WINIEN -->
<table id="winien" class="tablesorter tablesorter-blue" role="grid" style="width: 100%;">
<thead>
<tr class="tablesorter-headerRow" role="row">
<th width="20%" 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: center;" aria-sort="none" aria-label="Name: No sort applied, activate to apply an ascending sort">{$MOD.LBL_DATE}</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; text-align: center;" aria-sort="none" aria-label="Name: No sort applied, activate to apply an ascending sort">{$MOD.LBL_NAME}</th>
<th width="18%" 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; text-align: right;" aria-sort="none" aria-label="Name: No sort applied, activate to apply an ascending sort">{$MOD.LBL_VALUE}</th>
<th width="18%" 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; text-align: right;" aria-sort="none" aria-label="Name: No sort applied, activate to apply an ascending sort">{$MOD.LBL_SETTLED}</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; text-align: right;" aria-sort="none" aria-label="Name: No sort applied, activate to apply an ascending sort">{$MOD.LBL_UNSETTLED}</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; text-align: center;" aria-sort="none" aria-label="Name: No sort applied, activate to apply an ascending sort">{$MOD.LBL_ACTIONS}</th>
<th width="6%" 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">&nbsp;</th>
</tr>
</thead>
<tbody aria-live="polite" aria-relevant="all">
{foreach from=$WINIEN item=w}
{if $w.is_settled!=0}
{assign var="b" value="<b><span style=\"color:green;\">"}
{assign var="b2" value="</span></b>"}
{else}
{assign var="b" value=""}
{assign var="b2" value=""}
{/if}
<tr>
<td style="text-align: center;">{$b}{$w.register_date}{$b2}</td>
<td style="text-align: center;">{$b}{$w.document_no}{$b2}{if $w.note == '1'}(NOTA){/if}</td>
<td style="text-align: right;">{$b}{$w.total}{$b2}</td>
<td style="text-align: right;">{$b}{$w.settled}{$b2}</td>
<td style="text-align: right;">{$b}{$w.unsettled}{$b2}</td>
<td style="text-align:center;">
<img src="modules/EcmQuotes/images/options.gif" style="cursor: pointer;" onclick="showActions('{$w.id}')"/>
<div id="div_options_{$w.id}" class="hide_all" style="border: 1px solid #cccccc;background:#e6e6e6;padding:5px;position:absolute;display:none;text-align:left;">
<ul>
{if ($w.is_settled==0)}
<li id="edit" onclick="editTransaction('{$w.id}');">Edytuj</li>
<li id="delete" onclick="deleteTransaction('{$w.id}');">Usuń</li>
{else}
<li id="settled" onclick="showDetails('{$w.id}')">Rozliczenia</li>
<li id="rel" onclick="deleteRelation('{$w.id}');">Usuń relacje</li>
{/if}
{if $w.note == '1'}
<li id="note" onclick="showNote('{$w.note_id}');">Pokaż note</li>
<li id="email" onclick="sendNote('{$w.note_id}');">Wyślij note</li>
{/if}
</ul>
</div>
</td>
{if $w.is_settled == '0' ||( $w.is_settled != '0' && $SHOW_AFTER_P && $w.note != '1')}
<td style="text-align: center;"><input type="checkbox" name="winien[]" class="check" value="{$w.id}"/></td>
{else}
<td> &nbsp </td>
{/if}
</tr>
<tr id="details_{$w.id}" style="border-collapse: collapse; display:none;">
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td><div id="details_div_{$w.id}" style="width: 100%"></div></td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
{/foreach}
</tbody>
</table>
</div>
<div style="width: 0.2%; height: 500px; float: left; background-color: #000000;"></div>
<div style="width: 49.8%; height: 500px; float: right; overflow: auto;">
<!-- MA -->
<table id="ma" class="tablesorter tablesorter-blue" role="grid" style="width: 100%;">
<thead>
<tr class="tablesorter-headerRow" role="row">
<th width="6%" 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; text-align: center;" aria-label="Name: No sort applied, activate to apply an ascending sort">&nbsp</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; text-align: center;" aria-sort="none" aria-label="Name: No sort applied, activate to apply an ascending sort">{$MOD.LBL_ACTIONS}</th>
<th width="8%" 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; text-align: center;" aria-label="Name: No sort applied, activate to apply an ascending sort">{$MOD.LBL_UNSETTLED}</th>
<th width="18%" 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; text-align: right;" aria-label="Name: No sort applied, activate to apply an ascending sort">{$MOD.LBL_SETTLED}</th>
<th width="18%" 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; text-align: right;" aria-label="Name: No sort applied, activate to apply an ascending sort">{$MOD.LBL_VALUE}</th>
<th width="20%" 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; text-align: right;" aria-label="Name: No sort applied, activate to apply an ascending sort">{$MOD.LBL_NAME}</th>
<th width="20%" 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_DATE}</th>
</tr>
</thead>
<tbody aria-live="polite" aria-relevant="all">
{foreach from=$MA item=m}
{if $m.is_settled!=0}
{assign var="b" value="<b><span style=\"color:green;\">"}
{assign var="b2" value="</span></b>"}
{else}
{assign var="b" value=""}
{assign var="b2" value=""}
{/if}
<tr>
{if $m.is_settled == '0'}
<td style="text-align: center;"><input type="checkbox" class="check" name="ma[]" value="{$m.id}"/></td>
{else}
<td> &nbsp </td>
{/if}
<td style="text-align:center;">
<img src="modules/EcmQuotes/images/options.gif" style="cursor: pointer;" onclick="showActions('{$m.id}')"/>
<div id="div_options_{$m.id}" class="hide_all" style="border: 1px solid #cccccc;background:#e6e6e6;padding:5px;position:absolute;display:none;text-align:left;">
<ul>
{if ($w.is_settled==0)}
<li id="edit" onclick="editTransaction('{$m.id}');">Edytuj</li>
<li id="delete" onclick="deleteTransaction('{$m.id}');">Usuń</li>
{else}
<li id="settled" onclick="showDetails('{$m.id}')">Rozliczenia</li>
<li id="rel" onclick="deleteRelation('{$m.id}');">Usuń relacje</li>
{/if}
</ul>
</div>
<td style="text-align: right;">{$b}{$m.unsettled}{$b2}</td>
<td style="text-align: right;">{$b}{$m.settled}{$b2}</td>
<td style="text-align: right;">{$b}{$m.total}{$b2}</td>
<td style="text-align: center;">{$b}{$m.name}{$b2}&nbsp</td>
<td style="text-align: center;">{$b}{$m.register_date}{$b2}</td>
</tr>
<tr id="details_{$m.id}" style="border-collapse: collapse; display:none;">
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td><div id="details_div_{$m.id}" style="width: 100%"></div></td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
{/foreach}
</tbody>
</table>
</div>
</div>
<table style="border-top: 0px none; margin-bottom: 4px;width:100%" class="tabForm" border="0" cellpadding="0" cellspacing="0">
<tr>
<td align="left" style="width: 33%">
{$MOD.LBL_TOTAL_WINIEN}
</td>
<td align="center" style="width: 34%">
{$MOD.LBL_SALDO}
</td>
<td align="right" style="width: 33%">
{$MOD.LBL_TOTAL_MA}
</td>
</tr>
<tr>
<td align="left" style="width: 33%">
{$SUM.WINIEN} <span style="color: green">({$SUM.WINIEN_SETTLED})</span>
</td>
<td align="center" style="width: 34%">
<p {if $SUM.SALDO < 0} style="color: red;" {/if}>
{$SUM.SALDO}
</p>
</td>
<td align="right" style="width: 33%">
{$SUM.MA} <span style="color: green">({$SUM.MA_SETTLED})</span>
</td>
</tr>
</table>
</form>
<table style="width: 100%">
<tr>
<td align="left">
<a href="index.php?module=EcmTransactions&action=EditView&parent_id={$ACCOUNT.ID}&type=0&fromAccountPaymentStates=1">
<input type="button" value="Utwórz transakcje Winien"/>
</a>
</td>
<td align="right">
<a href="index.php?module=EcmTransactions&action=EditView&parent_id={$ACCOUNT.ID}&type=1&fromAccountPaymentStates=1">
<input type="button" value="Utwórz transakcje Ma"/>
</a>
</td>
</tr>
</table>
<div style="width:100%" align="center">
{if $SHOW_AFTER_P}
<form action="index.php" method="post" name="createNote" id="createNote">
<input type="hidden" name="module" value="EcmPaymentStates" />
<input type="hidden" name="action" value="createNote" />
<input type="hidden" name="id_list" value="" id="id_list"/>
<input type="hidden" name="to_pdf" value="1" id="to_pdf"/>
<input name="account_id" id="account_id" value="{$ACCOUNT.ID}" type="hidden">
<input type="button" class="button" value="Wystaw note(y)" onclick="makeNote();"/>
<input type="submit" id="submitNote" class="button" value="" style="display:none"/>
</form>
{elseif $SHOW_AFTER_T}
<input type="button" class="button" value="Wyślij Monit" onclick="createMonit(0);"/>
<input type="button" class="button" value="Pobierz Monit" onclick="createMonit(1);"/>
{else}
<input type="button" class="button" value="Do rozliczenia" onclick="showSettlePanel();"/>
{/if}
</div>
<div class="settle_panel">
<div class="settle_panel_main">
</div>
</div>
{/if}

View File

@@ -0,0 +1,55 @@
<td colspan=12>
Przeterminowane transakcje za okres {$okres}
<img src="modules/EcmQuotes/images/deleterow.gif" style="cursor: pointer;" onclick="hideDetails('details_{$ID}')"/>
<table style="width: 100%">
<tr>
<td>
Winien
</td>
<td>
Ma
</td>
</tr>
<tr>
<td style="width:50%">
<table style="width: 100%">
{foreach from=$ma item=r}
<tr>
<td align="center">
<a target="_blank" href="index.php?module=EcmTransactions&action=DetailView&record={$r.id}">{$r.name}</a>
</td>
<td align="right">
{$r.value|number_format:2:",":"."}
</td>
{if $r.parent_2_id!=""}
<td align="left" colspan=4>
<a target="_blank" href="index.php?module=Accounts&action=DetailView&record={$r.parent_2_id}">{$r.parent_2_name}</a>
</td>
{else}<td></td>
{/if}
</tr>
{/foreach}
</table>
</td>
<td style="width:50%">
<table style="width: 100%">
{foreach from=$winien item=r}
<tr>
<td align="center">
<a target="_blank" href="index.php?module=EcmTransactions&action=DetailView&record={$r.id}">{$r.name}</a>
</td>
<td align="right">
{$r.value|number_format:2:",":"."}
</td>
</tr>
{/foreach}
</table>
</td>
</tr>
</table>
</td>

View File

@@ -0,0 +1,121 @@
<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" ]
}
});
}
);
var ajax_url = "index.php?module=EcmPaymentStates&action=javahelper&to_pdf=1";
function showDetails(id) {
$('.hide_all').hide('slow');
$("#details_"+id).show('slow');
var params = {
job : 'searchBadTransactions',
parent_id : id,
};
$.ajax({
type : "POST",
url : ajax_url,
dataType : "text",
success : function(data) {
if (data != '-1')
$("#details_div_"+id).html(data);
$("#details_div_"+id).show('slow');
},
data : params
});
}
function hideDetails(id) {
$("#details_div_"+id).hide('slow');
}
{/literal}
</script>
<table cellspacing="0" cellpadding="0" border="0">
<tr>
<td><h2>Raport poprawności sald</h2></td>
</tr>
</table>
<br />
<table cellspacing="0" cellpadding="0" border="0" style="width: 100%;" id="myTable" class="tablesorter">
<thead>
<tr>
<th style="width: 35%">Kontrahent</th>
<th style="width: 10%">Saldo ogółem</th>
<th style="width: 10%">Saldo nierozliczonych</th>
<th style="width: 10%">Saldo wynikające z transakcji roliczonych</th>
<th>Szczegóły</th>
</tr>
</thead>
<tbody>
{foreach from=$tabela key="klucz" item="item" name="zostawienie"}
<tr>
<td style="font-weight:bold;"><a target="_blank" href="index.php?module=EcmPaymentStates&action=AccountPaymentStates&account_id={$item.parent_id}">{$item.parent_name}</a></td>
<td style="font-weight:bold;text-align: right;" data-sort-value="{$item.saldo}">{$item.saldo|number_format:2:",":"."}</td>
<td style="font-weight:bold;text-align: right;{if $item.saldo|string_format:"%.2f"==$item.saldo_nierozliczone|string_format:"%.2f"}color: green;{else}color:red;{/if}"" data-sort-value="{$item.saldo_nierozliczone}">{$item.saldo_nierozliczone|number_format:2:",":"."}</td>
<td style="font-weight:bold;text-align: right;{if $item.saldo_roz==0}color: green;{else}color:red;{/if}" data-sort-value="{$item.saldo_roz}">{$item.saldo_roz|number_format:2:",":"."}</td>
<td onclick="showDetails('{$item.parent_id}')">{if $item.saldo_roz!=0}Szczegoły{/if}<div id="details_div_{$item.parent_id}"></div></td>
</tr>
{/foreach}
</tbody>
</table>

View File

@@ -0,0 +1,34 @@
<table style="width: 100%">
<tr>
<td>
<img src="modules/EcmQuotes/images/deleterow.gif" style="cursor: pointer;" onclick="hideDetails('{$parent_id}')"/>
</td>
</tr>
<tr>
<td style="width: 50%">Winien
<table style="width: 100%">
{foreach from=$winien key="klucz" item="item" name="zostawienie"}
<tr>
<td align="center">
<a target="_blank" href="index.php?module=EcmTransactions&action=DetailView&record={$item.id}">{$item.name}</a>
</td>
</tr>
{/foreach}
</table>
</td>
<td style="width: 50%">Ma
<table style="width: 100%">
{foreach from=$ma item=r key="klucz" }
<tr>
<td align="center">
<a target="_blank" href="index.php?module=EcmTransactions&action=DetailView&record={$r.id}">{$r.name}</a>
</td>
</tr>
{/foreach}
</table>
</td>
</tr>
</table>

View File

@@ -0,0 +1,95 @@
{*
/**
* SugarCRM is a customer relationship management program developed by
* SugarCRM, Inc. Copyright (C) 2004 - 2007 SugarCRM Inc.
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License version 3 as published by the
* Free Software Foundation with the addition of the following permission added
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
* details.
*
* You should have received a copy of the GNU General Public License along with
* this program; if not, see http://www.gnu.org/licenses or write to the Free
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301 USA.
*
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU General Public License version 3.
*
* In accordance with Section 7(b) of the GNU General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "Powered by
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
* technical reasons, the Appropriate Legal Notices must display the words
* "Powered by SugarCRM".
*/
*}
<form name="ecmpaymentstatesQuickCreate" id="ecmpaymentstatesQuickCreate" method="POST" action="index.php">
<input type="hidden" name="module" value="EcmPaymentStates">
<input type="hidden" name="email_id" value="{$REQUEST.email_id}">
<input type="hidden" name="account_id" value="{$REQUEST.account_id}">
<input type="hidden" name="case_id" value="{$REQUEST.acase_id}">
<input type="hidden" name="contact_id" value="{$REQUEST.contact_id}">
<input type="hidden" name="return_action" value="{$REQUEST.return_action}">
<input type="hidden" name="return_module" value="{$REQUEST.return_module}">
<input type="hidden" name="return_id" value="{$REQUEST.return_id}">
<input type="hidden" name="action" value='Save'>
<input type="hidden" name="duplicate_parent_id" value="{$REQUEST.duplicate_parent_id}">
<input type="hidden" name="to_pdf" value='1'>
<input id='assigned_user_id' name='assigned_user_id' type="hidden" value="{$ASSIGNED_USER_ID}" />
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td align="left" style="padding-bottom: 2px;">
<input title="{$APP.LBL_SAVE_BUTTON_TITLE}" accessKey="{$APP.LBL_SAVE_BUTTON_KEY}" class="button" type="submit" name="button" {$saveOnclick|default:"onclick=\"return check_form('EcmPaymentStatesQuickCreate');\""} value=" {$APP.LBL_SAVE_BUTTON_LABEL} " >
<input title="{$APP.LBL_CANCEL_BUTTON_TITLE}" accessKey="{$APP.LBL_CANCEL_BUTTON_KEY}" class="button" type="submit" name="button" {$cancelOnclick|default:"onclick=\"this.form.action.value='$RETURN_ACTION'; this.form.module.value='$RETURN_MODULE'; this.form.record.value='$RETURN_ID'\""} value=" {$APP.LBL_CANCEL_BUTTON_LABEL} ">
<input title="{$APP.LBL_FULL_FORM_BUTTON_TITLE}" accessKey="{$APP.LBL_FULL_FORM_BUTTON_KEY}" class="button" type="submit" name="button" onclick="this.form.to_pdf.value='0';this.form.action.value='EditView'; this.form.module.value='EcmPaymentStates';" value=" {$APP.LBL_FULL_FORM_BUTTON_LABEL} "></td>
<td align="right" nowrap><span class="required">{$APP.LBL_REQUIRED_SYMBOL}</span> {$APP.NTC_REQUIRED}</td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="tabForm">
<tr>
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<th align="left" class="dataLabel" colspan="4"><h4 class="dataLabel"><slot>{$MOD.LBL_ECMPAYMENTSTATE_INFORMATION}</slot></h4></th>
</tr>
<tr>
<td valign="top" class="dataLabel" width="15%"><slot>{$MOD.LBL_SUBJECT} <span class="required">{$APP.LBL_REQUIRED_SYMBOL}</span></slot></td>
<td width="35%"><slot><textarea name='name' cols="40" tabindex='1' rows="1">{$NAME}</textarea></slot></td>
<td class="dataLabel" width="15%"><slot>{$MOD.LBL_TYPE}</slot></td>
<td width="35%"><slot><select tabindex='2' name='type'>{$TYPE_OPTIONS}</select></slot></td>
</tr>
<tr>
<td valign="top" class="dataLabel" rowspan="2" width="15%"><slot>{$MOD.LBL_DESCRIPTION}</slot></td>
<td rowspan="2" width="35%"><slot><textarea name='description' tabindex='1' cols="40" rows="4">{$DESCRIPTION}</textarea></slot></td>
<td class="dataLabel" width="15%"><slot>{$MOD.LBL_PRIORITY}</slot></td>
<td class="dataField" nowrap width="35%"><slot><select tabindex='2' name='priority'>{$PRIORITY_OPTIONS}</select></slot></td>
</tr>
<tr>
<td class="dataLabel" width="15%"><slot>{$MOD.LBL_STATUS}</slot></td>
<td width="35%"><slot><select tabindex='2' name='status'>{$STATUS_OPTIONS}</select></slot></td>
</tr>
</table>
</form>
<script>
{$additionalScripts}
</script>

View File

@@ -0,0 +1,145 @@
<link rel="stylesheet" type="text/css" href="include/jQuery/jquery.appendGrid-master/jquery.appendGrid-1.5.0.css"/>
<link rel="stylesheet" type="text/css" href="modules/Accounts/MyTable.css"/>
<link rel="stylesheet" type="text/css" href="include/jQuery/jquery-ui/themes/base/jquery-ui.css"/>
<script type="text/javascript"
src="include/jQuery/jquery-2.1.0.min.js"></script>
<script type="text/javascript"
src="include/jQuery/jquery.appendGrid-master/jquery.appendGrid-1.5.0.js"></script>
<script type="text/javascript"
src="include/jQuery/jquery-ui/ui/jquery-ui.js"></script>
<script type="text/javascript"
src="modules/EcmPaymentStates/javascript/interestLogic.js"></script>
<!-- begin header & search form -->
<style>
{literal}
input {
text-align: right;
}
{/literal}
</style>
<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_INTERESTTABLE}: Szczegóły</h2>
</td>
</tr>
</table>
<div id="LBL_PANEL_CATEGORIES2">
<form name="interestForm" method="post" action="index.php">
<input type="hidden" name="module" id="module" value='EcmPaymentStates'/>
<input type="hidden" name="action" id="action" value='interestView'/>
<input type="hidden" name="step" id="step" value='calculateAction'/>
<table width="100%" cellspacing="1" cellpadding="0" border="0" class="edit view">
<tbody>
<tr>
<th align="left" colspan="8"><h4>{$MOD.LBL_INTERESTTABLE_INFO}</h4></th>
</tr>
<tr>
<td width="37.5%" valign="top" colspan="3">
<div style="width:90%;border: 1px solid rgb(48,192,255);background-color:white;height:{$OPT.position_table_height}px;max-height:{$OPT.position_table_height}px;overflow:auto;">
<table cellpadding="0" cellspacing="0" border="0" class="list view">
<tr class="oddListRowS1">
<th style="text-align:center;"><b>Od</b></th>
<th style="text-align:center;"><b>Do</b></th>
<th style="text-align:center;"><b>%</b></th>
<th style="text-align:center;"><b>Symbol</b></th>
</tr>
{foreach from=$POSITIONS item=w}
<tr>
<td style="text-align:center;">{$w.date_from}</td>
<td style="text-align:center;">{$w.date_to}</td>
<td style="text-align:center;">{$w.rate}</td>
<td style="text-align:center;">{$w.symbol}</td>
</tr>
{/foreach}
</table>
</div>
</td>
</tr>
<tr>
<th align="left" colspan="8"><h4>{$MOD.LBL_INTEREST_CALC}</h4></th>
</tr>
<tr>
<td width="12.5%" valign="top" scope="row" id="_label">{$MOD.LBL_INTEREST_PAYMENT_TERM}</td>
<td width="37.5%" valign="top"><input type="text" value="{$REQ.payment_date}" name="payment_date" id="payment_date"><img border="0" src="themes/Sugar5/images/jscalendar.gif?s=bed8cd35065048ceebdc639ebe305e2c&amp;c=1" alt="Wprowadź datę" id="payment_date_trigger" align="absmiddle">
&nbsp;(<span class="dateFormat">dd.mm.yyyy</span>)
<script type="text/javascript">
{literal}
Calendar.setup ({
inputField : "payment_date",
daFormat : "%d.%m.%Y %H:%M",
button : "payment_date_trigger",
singleClick : true,
dateStr : "03.02.2015",
step : 1,
weekNumbers:false
}
);
{/literal}
</script></td>
<td width="12.5%" valign="top" scope="row" id="_label"></td>
<td width="37.5%" valign="top"></td>
</tr>
<tr>
<td width="12.5%" valign="top" scope="row" id="_label">{$MOD.LBL_INTEREST_AMOUNT}</td>
<td width="37.5%" valign="top"><input type="text" value="{$REQ.payment_after_date}" name="payment_after_date" id="payment_after_date"><img border="0" src="themes/Sugar5/images/jscalendar.gif?s=bed8cd35065048ceebdc639ebe305e2c&amp;c=1" alt="Wprowadź datę" id="payment_date_after_trigger" align="absmiddle">
&nbsp;(<span class="dateFormat">dd.mm.yyyy</span>)
<script type="text/javascript">
{literal}
Calendar.setup ({
inputField : "payment_after_date",
daFormat : "%d.%m.%Y %H:%M",
button : "payment_date_after_trigger",
singleClick : true,
dateStr : "03.02.2015",
step : 1,
weekNumbers:false
}
);
{/literal}
</script></td>
<td width="12.5%" valign="top" scope="row" id="_label"></td>
<td width="37.5%" valign="top"></td>
</tr>
<tr>
<td width="12.5%" valign="top" scope="row" id="_label">{$MOD.LBL_INTEREST_AFTER_PAID}</td>
<td width="37.5%" valign="top"><input type="text" value="{$REQ.amount}" name="amount" id="amount" onchange="$(this).val(FormatNumber($(this).val(),2))" onclick="$(this).select();"></td>
<td width="12.5%" valign="top" scope="row" id="_label"></td>
<td width="37.5%" valign="top"></td>
</tr>
{if $TABLE}
<tr>
<td width="37.5%" valign="top" colspan="3">
<div style="width:90%;border: 1px solid rgb(48,192,255);background-color:white;height:{$OPT.position_table_height}px;max-height:{$OPT.position_table_height}px;overflow:auto;">
<table cellpadding="0" cellspacing="0" border="0" class="list view">
<tr class="oddListRowS1">
<th style="text-align:center;"><b>Od</b></th>
<th style="text-align:center;"><b>Do</b></th>
<th style="text-align:center;"><b>Dni</b></th>
<th style="text-align:center;"><b>Kwota</b></th>
</tr>
{foreach from=$TABLE item=w}
<tr>
<td style="text-align:center;">{$w.date_from}</td>
<td style="text-align:center;">{$w.date_to}</td>
<td style="text-align:center;">{$w.days}</td>
<td style="text-align:right;">{$w.amount|number_format:3:".":","}</td>
</tr>
{/foreach}
</table>
</div>
</td>
</tr>
<tr>
<td width="12.5%" valign="top" scope="row" id="_label">Naliczonych odsetek</td>
<td width="37.5%" valign="top" style="color:red">{$TOTAL|number_format:2:".":","}</td></tr>
{/if}
</tbody>
</table>
</div>
<input class="button primary" type="button" value="Edytuj" name="button" onclick="window.location.href='index.php?module=EcmPaymentStates&action=interestView&step=editAction';" accesskey="S" title="Zapisz [Alt+S]">
<input class="button primary" type="submit" value="Oblicz" name="submit" accesskey="S" title="Zapisz [Alt+S]">

View File

@@ -0,0 +1,59 @@
<link rel="stylesheet" type="text/css" href="include/jQuery/jquery.appendGrid-master/jquery.appendGrid-1.5.0.css"/>
<link rel="stylesheet" type="text/css" href="modules/Accounts/MyTable.css"/>
<link rel="stylesheet" type="text/css" href="include/jQuery/jquery-ui/themes/base/jquery-ui.css"/>
<script type="text/javascript"
src="include/jQuery/jquery-2.1.0.min.js"></script>
<script type="text/javascript"
src="include/jQuery/jquery.appendGrid-master/jquery.appendGrid-1.5.0.js"></script>
<script type="text/javascript"
src="include/jQuery/jquery-ui/ui/jquery-ui.js"></script>
<script type="text/javascript"
src="modules/EcmPaymentStates/javascript/interestLogic.js"></script>
<script type="text/javascript"
src="modules/EcmPaymentStates/javascript/interestEditView.js"></script>
<link rel="stylesheet" type="text/css" href="modules/EcmInvoiceOuts/javascript/helper.css" media="screen" />
<div class="loading_panel" style="display:none"></div>
<!-- begin header & search form -->
<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_INTERESTTABLE}: Edycja</h2>
</td>
</tr>
</table>
<form name="interestForm" method="post" action="index.php">
<input type="hidden" name="module" id="module" value='EcmPaymentStates'/>
<input type="hidden" name="action" id="action" value='interestView'/>
<input type="hidden" name="step" id="step" value='saveAction'/>
<div id="LBL_PANEL_CATEGORIES2">
<table width="100%" cellspacing="1" cellpadding="0" border="0" class="edit view">
<tbody>
<tr>
<th align="left" colspan="8"><h4>{$MOD.LBL_INTERESTTABLE_INFO}</h4></th>
</tr>
<tr>
<td width="37.5%" valign="top" colspan="3">
<input type="hidden" name="positions" id="positions" value='{$POSITIONS}'/>
<div style="width:90%;border: 1px solid rgb(48,192,255);background-color:white;height:{$OPT.position_table_height}px;max-height:{$OPT.position_table_height}px;overflow:auto;">
<table id="tblAppendGrid" class="positions">
</table>
</div>
</td>
</tr>
<tr>
<td width="12.5%" valign="top" scope="row" id="_label"></td>
<td width="37.5%" valign="top"></td>
<td width="12.5%" valign="top" scope="row" id="_label"></td>
<td width="37.5%" valign="top"></td>
</tr>
</tbody>
</table>
</div>
<input class="button primary" type="submit" value="Zapisz" name="button" onclick="return check_form('EditView');" accesskey="S" title="Zapisz [Alt+S]">
<input class="button primary" type="button" value="Anuluj" name="button" onclick="window.location.href='index.php?module=EcmPaymentStates&action=interestView&step=detailAction';" accesskey="S" title="Anuluj">
</form>

View File

@@ -0,0 +1,145 @@
<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"/>
<script type="text/javascript" src="include/jQuery/jquery-2.1.0.min.js"></script>
<script type="text/javascript" src="include/jQuery/jquery-table/jquery.appendGrid-1.3.1.js"></script>
<script type="text/javascript" src="include/jQuery/jquery-ui/ui/jquery-ui.js"></script>
<script type="text/javascript" src="modules/EcmPaymentStates/javascript/summary.js"></script>
<style type="text/css">
{literal}
thead, tfoot {font-weight: bold;}
{/literal}
</style>
<table cellspacing="0" cellpadding="0" border="0">
<tr>
<td><h2>{$MOD.LBL_SUMMARY_TITLE}</h2></td>
</tr>
</table>
<br/>
<!--
<form action="index.php" method="post" name="searchForm">
<input type="hidden" name="module" value="EcmPaymentStates" />
<input type="hidden" name="action" value="summaryNew" />
<table style="border-top: 0px none; margin-bottom: 4px;width:100%" class="tabForm" border="0" cellpadding="0" cellspacing="0">
<tr>
<td class="dataLabel" width="10%" nowrap="nowrap">Typ kontrahenta</td>
<td class="dataField" width="10%" nowrap="nowrap">
<select id="account_type" name="account_type">
<option value="" {if $account_type eq ''} selected {/if}>Wszyscy</option>
<option value="rec" {if $account_type eq 'rec'} selected {/if}>Odbiorca</option>
<option value="sup" {if $account_type eq 'sup'} selected {/if}>Dostawca</option>
<option value="rs" {if $account_type eq 'rs'} selected {/if}>Odbiorca/Dostawca</option>
</select>
</td>
</tr>
</tbody>
</table>
<input class="button" name="submit" value="Szukaj" type="submit">
<br />
<br>
</form>
-->
<table cellpadding="0" cellspacing="0" border="0" class="ListView" style="width:100%;">
<thead>
<tr>
<td class="oddListRowS1" style="text-align:left; width: 15%">
<p style="cursor: pointer;" onClick="sortOrder('account', '{$SORT.account}')">{$MOD.LBL_SUMMARY_ACCOUNT}
{if $SORT.account == 'asc'}
<img width="8" height="10" border="0" align="absmiddle" alt="Sortuj" src="themes/Sugar5/images/arrow_down.gif">
{elseif $SORT.account == 'desc'}
<img width="8" height="10" border="0" align="absmiddle" alt="Sortuj" src="themes/Sugar5/images/arrow_up.gif">
{else}
<img width="8" height="10" border="0" align="absmiddle" alt="Sortuj" src="themes/Sugar5/images/arrow.gif">
{/if}
</p>
</td>
<td class="oddListRowS1" style="text-align:right; width: 10%;">
<p style="cursor: pointer;" onClick="sortOrder('unsettled', '{$SORT.unsettled}')">{$MOD.LBL_SUMMARY_UNSETTLED}
{if $SORT.unsettled == 'asc'}
<img width="8" height="10" border="0" align="absmiddle" alt="Sortuj" src="themes/Sugar5/images/arrow_down.gif">
{elseif $SORT.unsettled == 'desc'}
<img width="8" height="10" border="0" align="absmiddle" alt="Sortuj" src="themes/Sugar5/images/arrow_up.gif">
{else}
<img width="8" height="10" border="0" align="absmiddle" alt="Sortuj" src="themes/Sugar5/images/arrow.gif">
{/if}
</p>
</td>
<td class="oddListRowS1" style="text-align:right; width: 10%;">
<p style="cursor: pointer;" onClick="sortOrder('not_overdue', '{$SORT.not_overdue}')">{$MOD.LBL_SUMMARY_NOT_OVERDUE}
{if $SORT.not_overdue == 'asc'}
<img width="8" height="10" border="0" align="absmiddle" alt="Sortuj" src="themes/Sugar5/images/arrow_down.gif">
{elseif $SORT.not_overdue == 'desc'}
<img width="8" height="10" border="0" align="absmiddle" alt="Sortuj" src="themes/Sugar5/images/arrow_up.gif">
{else}
<img width="8" height="10" border="0" align="absmiddle" alt="Sortuj" src="themes/Sugar5/images/arrow.gif">
{/if}
</p>
</td>
<td class="oddListRowS1" style="text-align:right; width: 7%;">{$MOD.LBL_SUMMARY_NOT_OVERDUE_61}</td>
<td class="oddListRowS1" style="text-align:right; width: 7%;">{$MOD.LBL_SUMMARY_NOT_OVERDUE_31_60}</td>
<td class="oddListRowS1" style="text-align:right; width: 7%;">{$MOD.LBL_SUMMARY_NOT_OVERDUE_1_30}</td>
<td class="oddListRowS1" style="text-align:right; width: 10%;">
<p style="cursor: pointer;" onClick="sortOrder('overdue', '{$SORT.overdue}')">{$MOD.LBL_SUMMARY_OVERDUE}
{if $SORT.overdue == 'asc'}
<img width="8" height="10" border="0" align="absmiddle" alt="Sortuj" src="themes/Sugar5/images/arrow_down.gif">
{elseif $SORT.overdue == 'desc'}
<img width="8" height="10" border="0" align="absmiddle" alt="Sortuj" src="themes/Sugar5/images/arrow_up.gif">
{else}
<img width="8" height="10" border="0" align="absmiddle" alt="Sortuj" src="themes/Sugar5/images/arrow.gif">
{/if}
</p>
</td>
<td class="oddListRowS1" style="text-align:right; width: 7%;">{$MOD.LBL_SUMMARY_OVERDUE_1_30}</td>
<td class="oddListRowS1" style="text-align:right; width: 7%;">{$MOD.LBL_SUMMARY_OVERDUE_31_60}</td>
<td class="oddListRowS1" style="text-align:right; width: 7%;">{$MOD.LBL_SUMMARY_OVERDUE_61_90}</td>
<td class="oddListRowS1" style="text-align:right; width: 7%;">{$MOD.LBL_SUMMARY_OVERDUE_91_180}</td>
<td class="oddListRowS1" style="text-align:right;">{$MOD.LBL_SUMMARY_OVERDUE_181}</td>
</tr>
</thead>
<tbody>
{foreach from=$DATA item=ROW name=loop}
{if $smarty.foreach.loop.index % 2 == 1}
<tr>
{else}
<tr style="background-color: #e6e6e6;">
{/if}
<td class="oddListRowS1" style="text-align:left;">
<img src="modules/EcmQuotes/images/search.gif" style="cursor: pointer;" onclick="showDetails('{$ROW.id}')"/>&nbsp;
<a target="new" href="index.php?module=EcmPaymentStates&action=AccountPaymentStates&return_module=EcmPaymentStates&return_action=DetailView&parentTab=Rozrachunki&account_id={$ROW.id}">
{$ROW.name}
</a>
</td>
<td class="oddListRowS1" style="text-align:right;">{$ROW.unsettled}</td>
<td class="oddListRowS1" style="text-align:right;">{$ROW.not_overdue}</td>
<td class="oddListRowS1" style="text-align:right;">{$ROW.10}</td>
<td class="oddListRowS1" style="text-align:right;">{$ROW.9}</td>
<td class="oddListRowS1" style="text-align:right;">{$ROW.8}</td>
<td class="oddListRowS1" style="text-align:right;">{$ROW.overdue}</td>
<td class="oddListRowS1" style="text-align:right;">{$ROW.2}</td>
<td class="oddListRowS1" style="text-align:right;">{$ROW.3}</td>
<td class="oddListRowS1" style="text-align:right;">{$ROW.4}</td>
<td class="oddListRowS1" style="text-align:right;">{$ROW.5}</td>
<td class="oddListRowS1" style="text-align:right;">{$ROW.6}</td>
</tr>
<tr id="details_{$ROW.id}" style="border-collapse: collapse; display:none;">
</tr>
{/foreach}
</tbody>
<tfoot>
<td class="oddListRowS1" style="text-align:left;">&nbsp;</td>
<td class="oddListRowS1" style="text-align:right;">{$SUM.unsettled}</td>
<td class="oddListRowS1" style="text-align:right;">{$SUM.not_overdue}</td>
<td class="oddListRowS1" style="text-align:right;">{$SUM.10}</td>
<td class="oddListRowS1" style="text-align:right;">{$SUM.9}</td>
<td class="oddListRowS1" style="text-align:right;">{$SUM.8}</td>
<td class="oddListRowS1" style="text-align:right;">{$SUM.overdue}</td>
<td class="oddListRowS1" style="text-align:right;">{$SUM.2}</td>
<td class="oddListRowS1" style="text-align:right;">{$SUM.3}</td>
<td class="oddListRowS1" style="text-align:right;">{$SUM.4}</td>
<td class="oddListRowS1" style="text-align:right;">{$SUM.5}</td>
<td class="oddListRowS1" style="text-align:right;">{$SUM.6}</td>
</tr>
<tfoot>
</table>

View File

@@ -0,0 +1,76 @@
<td style="border: 1px dashed #e6e6e6;" colspan=3 valign="top">
<img src="modules/EcmQuotes/images/deleterow.gif" style="cursor: pointer;" onclick="hideDetails('{$ID}')"/>
</td>
<td style="text-align: right; border: 1px dashed #e6e6e6;" valign="top">
<table style="width: 100%">
{foreach from=$D10 key=ID item=ROW name=loop}
<tr><td>
<a href="index.php?module=EcmTransactions&action=DetailView&record={$ROW.id}" target="new">
{$ROW.name}</a>&nbsp;&nbsp;</td><td>&nbsp;{$ROW.value}<br>{$ROW.settled}</td></tr>
{/foreach}
</table>
</td>
<td style="text-align: right; border: 1px dashed #e6e6e6;" valign="top">
<table style="width: 100%">
{foreach from=$D9 key=ID item=ROW name=loop}
<tr><td>
<a href="index.php?module=EcmTransactions&action=DetailView&record={$ROW.id}" target="new">
{$ROW.name}</a>&nbsp;&nbsp;</td><td>&nbsp;{$ROW.value}<br>{$ROW.settled}</td></tr>
{/foreach}
</table>
</td>
<td style="text-align: right; border: 1px dashed #e6e6e6;" valign="top">
<table style="width: 100%">
{foreach from=$D8 key=ID item=ROW name=loop}
<tr><td>
<a href="index.php?module=EcmTransactions&action=DetailView&record={$ROW.id}" target="new">
{$ROW.name}</a>&nbsp;&nbsp;</td><td>&nbsp;{$ROW.value}<br>{$ROW.settled}</td></tr>
{/foreach}
</table>
</td>
<td>&nbsp</td>
<td style="text-align: right; border: 1px dashed #e6e6e6;" valign="top">
<table style="width: 100%">
{foreach from=$D2 key=ID item=ROW name=loop}
<tr><td>
<a href="index.php?module=EcmTransactions&action=DetailView&record={$ROW.id}" target="new">
{$ROW.name}</a>&nbsp;&nbsp;</td><td>&nbsp;{$ROW.value}<br>{$ROW.settled}</td></tr>
{/foreach}
</table>
</td>
<td style="text-align: right; border: 1px dashed #e6e6e6;" valign="top">
<table style="width: 100%">
{foreach from=$D3 key=ID item=ROW name=loop}
<tr><td>
<a href="index.php?module=EcmTransactions&action=DetailView&record={$ROW.id}" target="new">
{$ROW.name}</a>&nbsp;&nbsp;</td><td>&nbsp;{$ROW.value}<br>{$ROW.settled}</td></tr>
{/foreach}
</table>
</td>
<td style="text-align: right; border: 1px dashed #e6e6e6;" valign="top">
<table style="width: 100%">
{foreach from=$D4 key=ID item=ROW name=loop}
<tr><td>
<a href="index.php?module=EcmTransactions&action=DetailView&record={$ROW.id}" target="new">
{$ROW.name}</a>&nbsp;&nbsp;</td><td>&nbsp;{$ROW.value}<br>{$ROW.settled}</td></tr>
{/foreach}
</table>
</td>
<td style="text-align: right; border: 1px dashed #e6e6e6;" valign="top">
<table style="width: 100%">
{foreach from=$D5 key=ID item=ROW name=loop}
<tr><td>
<a href="index.php?module=EcmTransactions&action=DetailView&record={$ROW.id}" target="new">
{$ROW.name}</a>&nbsp;&nbsp;</td><td>&nbsp;{$ROW.value}<br>{$ROW.settled}</td></tr>
{/foreach}
</table>
</td>
<td style="text-align: right; border: 1px dashed #e6e6e6;" valign="top">
<table style="width: 100%">
{foreach from=$D6 key=ID item=ROW name=loop}
<tr><td>
<a href="index.php?module=EcmTransactions&action=DetailView&record={$ROW.id}" target="new">
{$ROW.name}</a>&nbsp;&nbsp;</td><td>&nbsp;{$ROW.value}<br>{$ROW.settled}</td></tr>
{/foreach}
</table>
</td>

View File

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