Add TPL files
This commit is contained in:
95
modules/EcmTransactions/tpls/QuickCreate.tpl
Executable file
95
modules/EcmTransactions/tpls/QuickCreate.tpl
Executable 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="ecmpaymentsQuickCreate" id="ecmpaymentsQuickCreate" method="POST" action="index.php">
|
||||
<input type="hidden" name="module" value="EcmPayments">
|
||||
<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('EcmPaymentsQuickCreate');\""} 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='EcmPayments';" 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_ECMPAYMENT_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>
|
||||
38
modules/EcmTransactions/tpls/importBankStatement/afterSave.tpl
Executable file
38
modules/EcmTransactions/tpls/importBankStatement/afterSave.tpl
Executable 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> </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">
|
||||
{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>
|
||||
128
modules/EcmTransactions/tpls/importBankStatement/list.tpl
Executable file
128
modules/EcmTransactions/tpls/importBankStatement/list.tpl
Executable 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>
|
||||
<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: </td>
|
||||
<td class="text-right" id="sumCell">{$row.sum_val}</td>
|
||||
<td colspan="3"> </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}
|
||||
45
modules/EcmTransactions/tpls/importBankStatement/options.tpl
Executable file
45
modules/EcmTransactions/tpls/importBankStatement/options.tpl
Executable 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} ({$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>
|
||||
Reference in New Issue
Block a user