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

View File

@@ -0,0 +1,38 @@
<style>
{literal}
.text-left {
text-align: left;
}
.text-right {
text-align: right !important;
}
.account_name {
background:rgba(0,0,0,0);
border:none;
text-color: black;
}
{/literal}
</style>
<h3>Podsumowanie zapisu transakcji</h3>
<table class="list view" style="width: 30%;" width="30%" cellspacing="0" cellpadding="0" border="0">
<thead>
<tr>
<th class="text-left" style="width: 75%;">Nazwa</th>
<th class="text-right">Kwota</th>
<th>&nbsp;</th>
</tr>
<thead>
<tbody>
{foreach from=$DATA item=row key=k}
<tr class="evenListRowS1">
<td class="text-left"><a href="index.php?module=EcmTransactions&action=DetailView&record={$row.id}" target="_blank">{$row.name}</a></td>
<td class="text-right">{$row.value}</td>
<td class="text-right">&nbsp;
{if $row.account_id!=""}
<a href="index.php?module=EcmPaymentStates&action=AccountPaymentStates&account_id={$row.account_id}" target="_blank">Przejdź do rozrachunków ({$row.account_name})</a>
{/if}
</td>
</tr>
{/foreach}
</tbody>
</table>

View File

@@ -0,0 +1,128 @@
<style>
{literal}
.text-left {
text-align: left;
}
.text-right {
text-align: right !important;
}
.account_name {
background:rgba(0,0,0,0);
border:none;
text-color: black;
}
{/literal}
</style>
<h3>Nazwa wyciągu: {$STATEMENT_NAME}</h3>
<form name="transactions">
<table class="list view" width="100%" cellspacing="0" cellpadding="0" border="0" id="transactions_table">
<thead>
<tr row-number="no-data">
<th class="text-left" style="width: 15%;">Konto z</th>
<th class="text-left" style="width: 40%;">Kontrahent</th>
<th class="text-right">Kwota</th>
<th class="text-center">Opis</th>
<th class="text-right">Data</th>
<th class="text-right">Opcje</th>
</tr>
<thead>
<tbody>
{foreach from=$DATA item=row key=k}
{if $row.sum!="1"}
<tr class="evenListRowS1" row-number="{$row.uniqID}"
{if $row.transaction_exists=="1"}
style="background: red;"
{/if}>
<td class="text-left">{$row.account}
{if $row.transaction_exists == "1"}
<br>
{foreach from=$row.transactions item=t key=k}
<a href="index.php?module=EcmTransactions&action=DetailView&record={$t.id}" target="_blank">{$t.desc}</a><br>
{/foreach}
{/if}
</td>
<td class="text-left">
{if $row.account_found == "1"}
<a href="index.php?module=Accounts&action=DetailView&record={$row.account_id}">{$row.account_name}</a>
{else}
<button id="btn_parent_name" class="button firstChild" onclick="{literal}open_popup( 'Accounts', 800, 500, '', true, false, {'call_back_function':'set_return','form_name':'transactions','field_to_name_array':{'id':'account_id_{/literal}{$row.uniqID}{literal}','name':'account_name_{/literal}{$row.uniqID}{literal}'}}, 'single', true );{/literal}" value="Wybierz" tabindex="103" name="btn_parent_name" type="button">
<img src="themes/default/images/id-ff-select.png?s=bed8cd35065048ceebdc639ebe305e2c&c=1">
</button>&nbsp;&nbsp;
<input style="width: 90%" id="account_name_{$row.uniqID}" name="account_name_{$row.uniqID}" class="account_name" value="Wybierz kontrahenta" disabled/>
<br>
{/if}
<input type="hidden" value="{$row.account_id}" name="account_id_{$row.uniqID}" id="account_id_{$row.uniqID}"/>
</td>
<td class="text-right">{$row.value}</td>
<td class="text-left">{$row.payer}<br>{$row.desc}</td>
<td class="text-right">{$row.date}</td>
<td class="text-right">
<a target="_blank" onclick="{literal}if (confirm('Usunąć wiersz?')) {var whichtr =$(this).closest('tr'); whichtr.remove(); calculateSum();}{/literal}">
<img src="modules/EcmSales/images/deleterow.gif" style="cursor:pointer;">
</a>
<input type="hidden" id="value_{$row.uniqID}" value="{$row.value}"/>
<input type="hidden" id="account_{$row.uniqID}" value="{$row.account}"/>
<input type="hidden" id="date_{$row.uniqID}" value="{$row.date}"/>
<input type="hidden" id="desc_{$row.uniqID}" value="{$row.desc}"/>
<input type="hidden" id="transaction_exists_{$row.uniqID}" value="{$row.transaction_exists}"/>
</td>
</tr>
{else}
<tr row-number="no-data">
<td class="text-right" colspan="2">Suma:&nbsp;</td>
<td class="text-right" id="sumCell">{$row.sum_val}</td>
<td colspan="3">&nbsp</td>
</tr>
{/if}
{/foreach}
</tbody>
</table>
</form>
<script>
{literal}
var saveTransactions = function() {
items = new Object();
$('#transactions_table tr').each(function() {
rowNumber = $(this).attr('row-number');
if (rowNumber != 'no-data') {
if($("#transaction_exists_"+rowNumber).val()!='1'){
items[rowNumber] = new Object();
items[rowNumber]["account"] = $("#account_"+rowNumber).val();
items[rowNumber]["account_id"] = $("#account_id_"+rowNumber).val();
items[rowNumber]["value"] = $("#value_"+rowNumber).val();
items[rowNumber]["date"] = $("#date_"+rowNumber).val();
items[rowNumber]["desc"] = $("#desc_"+rowNumber).val();
}
}
});
$("#transactions_data").val(utf8_to_b64(JSON.stringifyNoSecurity(items)));
$("#save_transactions").submit();
}
function utf8_to_b64( str ) {
return window.btoa(unescape(encodeURIComponent( str )));
}
var calculateSum = function() {
var sum = 0;
$('#transactions_table tr').each(function() {
rowNumber = $(this).attr('row-number');
if (rowNumber != 'no-data')
sum+= UnformatNumber($("#value_"+rowNumber).val());
});
console.log(FormatNumber(sum));
$('#sumCell').html(FormatNumber(sum));
}
{/literal}
</script>
<form id="save_transactions" method="post" action="index.php">
<input type="hidden" id="module" name="module" value="EcmTransactions"/>
<input type="hidden" id="action" name="action" value="mz_importBankStatement"/>
<input type="hidden" id="process" name="process" value="2"/>
<input type="hidden" id="to_pdf" name="to_pdf" value="0"/>
<input type="hidden" id="statement_name" name="statement_name" value="{$STATEMENT_NAME}"/>
<input type="hidden" id="statement_date" name="statement_date" value="{$STATEMENT_DATE}"/>
<input type="hidden" id="transactions_data" name="transactions_data" value=""/>
<input type="button" class="button" value="Zapisz transakcje" onClick="saveTransactions();"/>
</form>
{$red}

View File

@@ -0,0 +1,45 @@
<ul class="tablist" style="width:100%;"></ul>
<form action="index.php" method="post" name="mz_importBankStatement" enctype="multipart/form-data">
<input type="hidden" id="module" name="module" value="EcmTransactions"/>
<input type="hidden" id="action" name="action" value="mz_importBankStatement"/>
<input type="hidden" id="process" name="process" value="1"/>
<input type="hidden" id="to_pdf" name="to_pdf" value="0"/>
<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">Bank: </td>
<td class="dataField" width="8%" nowrap="nowrap">
<select name="bank" id="bank">
{foreach from=$BANKS item=b}
{assign var=cur_id value=$b.CURRENCY}
<option value="{$b.ID}">{$b.NAME}&nbsp;&nbsp;({$CUR.$cur_id})</option>
{/foreach}
</select>
</td>
</tr>
<tr>
<td class="dataLabel" width="5%" nowrap="nowrap">Data wyciągu: </td>
<td class="dataField" width="8%" nowrap="nowrap">
<input id="statement_date" name="statement_date" type="text" maxlength="10" size="11" tabindex="" title="" value="{$DATE}" autocomplete="off">
<img id="statement_date_trigger" border="0" align="absmiddle" alt="Enter Date" src="themes/default/images/jscalendar.gif">
<script language="JavaScript" type="text/javascript">
Calendar.setup ({ldelim}
inputField : "statement_date",
daFormat : "%d.%m.%Y",
button : "statement_date_trigger",
singleClick : true,
dateStr : "",
step : 1
{rdelim}
);
</script>
</td>
</tr>
<tr>
<td class="dataLabel" width="5%" nowrap="nowrap">Wybierz plik: </td>
<td class="dataField" width="8%" nowrap="nowrap">
<input type="file" name="file" id="file" accept=".csv"/>
</td>
</tr>
</table>
<input type="submit" class="button" value="Dalej"/>
</form>