First commit
This commit is contained in:
commit
c6e2478c40
13918 changed files with 2303184 additions and 0 deletions
|
@ -0,0 +1,26 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| CiviCRM version 4.7 |
|
||||
+--------------------------------------------------------------------+
|
||||
| Copyright CiviCRM LLC (c) 2004-2017 |
|
||||
+--------------------------------------------------------------------+
|
||||
| This file is a part of CiviCRM. |
|
||||
| |
|
||||
| CiviCRM is free software; you can copy, modify, and distribute it |
|
||||
| under the terms of the GNU Affero General Public License |
|
||||
| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
|
||||
| |
|
||||
| CiviCRM 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 Affero General Public License for more details. |
|
||||
| |
|
||||
| You should have received a copy of the GNU Affero General Public |
|
||||
| License and the CiviCRM Licensing Exception along |
|
||||
| with this program; if not, contact CiviCRM LLC |
|
||||
| at info[AT]civicrm[DOT]org. If you have questions about the |
|
||||
| GNU Affero General Public License or the licensing of CiviCRM, |
|
||||
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
|
||||
+--------------------------------------------------------------------+
|
||||
*}
|
||||
{include file="CRM/Financial/Form/Search.tpl"}
|
|
@ -0,0 +1,192 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| CiviCRM version 4.7 |
|
||||
+--------------------------------------------------------------------+
|
||||
| Copyright CiviCRM LLC (c) 2004-2017 |
|
||||
+--------------------------------------------------------------------+
|
||||
| This file is a part of CiviCRM. |
|
||||
| |
|
||||
| CiviCRM is free software; you can copy, modify, and distribute it |
|
||||
| under the terms of the GNU Affero General Public License |
|
||||
| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
|
||||
| |
|
||||
| CiviCRM 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 Affero General Public License for more details. |
|
||||
| |
|
||||
| You should have received a copy of the GNU Affero General Public |
|
||||
| License and the CiviCRM Licensing Exception along |
|
||||
| with this program; if not, contact CiviCRM LLC |
|
||||
| at info[AT]civicrm[DOT]org. If you have questions about the |
|
||||
| GNU Affero General Public License or the licensing of CiviCRM, |
|
||||
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
|
||||
+--------------------------------------------------------------------+
|
||||
*}
|
||||
|
||||
<div id="enableDisableStatusMsg" class="crm-container" style="display:none;"></div>
|
||||
<table id="batch-summary" cellpadding="0" cellspacing="0" border="0" class="report crm-batch_summary">
|
||||
<thead class="sticky">
|
||||
<tr>
|
||||
{foreach from=$columnHeaders item=head}
|
||||
<th>{$head}</th>
|
||||
{/foreach}
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
{foreach from=$columnHeaders item=head key=rowKey}
|
||||
<td id="row_{$rowKey}" class="even-row"></td>
|
||||
{/foreach}
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div class="crm-submit-buttons">{if in_array($batchStatus, array('Open', 'Reopened'))}{$form.close_batch.html}{/if} {$form.export_batch.html}</div>
|
||||
|
||||
{if in_array($batchStatus, array('Open', 'Reopened'))} {* Add / remove transactions only allowed for Open/Reopened batches *}
|
||||
<br /><div class="form-layout-compressed">{$form.trans_remove.html} {$form.rSubmit.html}</div><br/>
|
||||
{/if}
|
||||
|
||||
<div id="ltype">
|
||||
<p></p>
|
||||
<div class="form-item">
|
||||
{strip}
|
||||
<table id="crm-transaction-selector-remove-{$entityID}" cellpadding="0" cellspacing="0" border="0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="crm-transaction-checkbox">{if in_array($batchStatus, array('Open', 'Reopened'))}{$form.toggleSelects.html}{/if}</th>
|
||||
<th class="crm-contact-type"></th>
|
||||
<th class="crm-contact-name">{ts}Name{/ts}</th>
|
||||
<th class="crm-amount">{ts}Amount{/ts}</th>
|
||||
<th class="crm-trxnID">{ts}Trxn ID{/ts}</th>
|
||||
<th class="crm-trxn_date">{ts}Payment/Transaction Date{/ts}</th>
|
||||
<th class="crm-received">{ts}Contribution Date{/ts}</th>
|
||||
<th class="crm-payment-method">{ts}Pay Method{/ts}</th>
|
||||
<th class="crm-status">{ts}Status{/ts}</th>
|
||||
<th class="crm-type">{ts}Type{/ts}</th>
|
||||
<th class="crm-transaction-links"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
{/strip}
|
||||
</div>
|
||||
</div>
|
||||
<br/>
|
||||
{include file="CRM/Financial/Form/BatchTransaction.tpl"}
|
||||
|
||||
{literal}
|
||||
<script type="text/javascript">
|
||||
CRM.$(function($) {
|
||||
var entityID = {/literal}{$entityID}{literal};
|
||||
batchSummary(entityID);
|
||||
CRM.$('#close_batch').click( function() {
|
||||
assignRemove(entityID, 'close');
|
||||
return false;
|
||||
});
|
||||
CRM.$('#export_batch').click( function() {
|
||||
assignRemove(entityID, 'export');
|
||||
return false;
|
||||
});
|
||||
});
|
||||
function assignRemove(recordID, op) {
|
||||
var recordBAO = 'CRM_Batch_BAO_Batch';
|
||||
if (op == 'assign' || op == 'remove') {
|
||||
recordBAO = 'CRM_Batch_BAO_EntityBatch';
|
||||
}
|
||||
var entityID = {/literal}"{$entityID}"{literal};
|
||||
if (op == 'close' || op == 'export') {
|
||||
var mismatch = checkMismatch();
|
||||
}
|
||||
else {
|
||||
CRM.$('#mark_x_' + recordID).closest('tr').block({message: {/literal}'{ts escape="js"}Updating{/ts}'{literal}});
|
||||
}
|
||||
if (op == 'close' || (op == 'export' && mismatch.length)) {
|
||||
CRM.$("#enableDisableStatusMsg").dialog({
|
||||
title: {/literal}'{ts escape="js"}Close Batch{/ts}'{literal},
|
||||
modal: true,
|
||||
open:function() {
|
||||
if (op == 'close') {
|
||||
var msg = {/literal}'{ts escape="js"}Are you sure you want to close this batch?{/ts}'{literal};
|
||||
}
|
||||
else {
|
||||
var msg = {/literal}'{ts escape="js"}Are you sure you want to close and export this batch?{/ts}'{literal};
|
||||
}
|
||||
CRM.$('#enableDisableStatusMsg').show().html(msg + mismatch);
|
||||
},
|
||||
buttons: {
|
||||
{/literal}"{ts escape='js'}Cancel{/ts}"{literal}: function() {
|
||||
CRM.$(this).dialog("close");
|
||||
},
|
||||
{/literal}"{ts escape='js'}OK{/ts}"{literal}: function() {
|
||||
CRM.$(this).dialog("close");
|
||||
saveRecord(recordID, op, recordBAO, entityID);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
else {
|
||||
saveRecord(recordID, op, recordBAO, entityID);
|
||||
}
|
||||
}
|
||||
|
||||
function noServerResponse() {
|
||||
CRM.alert({/literal}'{ts escape="js"}No response from the server. Check your internet connection and try reloading the page.{/ts}', '{ts escape="js"}Network Error{/ts}'{literal}, 'error');
|
||||
}
|
||||
|
||||
function saveRecord(recordID, op, recordBAO, entityID) {
|
||||
if (op == 'export') {
|
||||
window.location.href = CRM.url('civicrm/financial/batch/export', {reset: 1, id: recordID, status: 1});
|
||||
return;
|
||||
}
|
||||
var postUrl = {/literal}"{crmURL p='civicrm/ajax/rest' h=0 q='className=CRM_Financial_Page_AJAX&fnName=assignRemove'}"{literal};
|
||||
//post request and get response
|
||||
CRM.$.post( postUrl, { records: [recordID], recordBAO: recordBAO, op:op, entityID:entityID, key: {/literal}"{crmKey name='civicrm/ajax/ar'}"{literal} }, function( html ){
|
||||
//this is custom status set when record update success.
|
||||
if (html.status == 'record-updated-success') {
|
||||
if (op == 'close') {
|
||||
window.location.href = CRM.url('civicrm/financial/financialbatches', 'reset=1&batchStatus=2');
|
||||
}
|
||||
else {
|
||||
buildTransactionSelectorAssign( true );
|
||||
buildTransactionSelectorRemove();
|
||||
batchSummary(entityID);
|
||||
}
|
||||
}
|
||||
else {
|
||||
CRM.alert(html.status);
|
||||
}
|
||||
},
|
||||
'json').error(noServerResponse);
|
||||
}
|
||||
|
||||
function batchSummary(entityID) {
|
||||
var postUrl = {/literal}"{crmURL p='civicrm/ajax/rest' h=0 q='className=CRM_Financial_Page_AJAX&fnName=getBatchSummary'}"{literal};
|
||||
//post request and get response
|
||||
CRM.$.post( postUrl, {batchID: entityID}, function(html) {
|
||||
CRM.$.each(html, function(i, val) {
|
||||
CRM.$("#row_" + i).html(val);
|
||||
});
|
||||
},
|
||||
'json');
|
||||
}
|
||||
|
||||
function checkMismatch() {
|
||||
var txt = '';
|
||||
var enteredItem = CRM.$("#row_item_count").text();
|
||||
var assignedItem = CRM.$("#row_assigned_item_count").text();
|
||||
var enteredTotal = CRM.$("#row_total").text();
|
||||
var assignedTotal = CRM.$("#row_assigned_total").text();
|
||||
if (enteredItem != "" && enteredItem != assignedItem) {
|
||||
txt = '{/literal}<div class="messages crm-error"><strong>Item Count mismatch:</strong><br/>{ts escape="js"}Expected{/ts}:' + enteredItem +'<br/>{ts escape="js"}Current Total{/ts}:' + assignedItem + '</div>{literal}';
|
||||
}
|
||||
if (enteredTotal != "" && enteredTotal != assignedTotal) {
|
||||
txt += '{/literal}<div class="messages crm-error"><strong>Total Amount mismatch</strong><br/>{ts escape="js"}Expected{/ts}:' + enteredTotal +'<br/>{ts escape="js"}Current Total{/ts}:' + assignedTotal + '</div>{literal}';
|
||||
}
|
||||
if (txt.length) {
|
||||
txt += {/literal}'<div class="messages status">{ts escape="js"}Click OK to override and update expected values.{/ts}</div>'{literal}
|
||||
}
|
||||
return txt;
|
||||
}
|
||||
</script>
|
||||
{/literal}
|
|
@ -0,0 +1,91 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| CiviCRM version 4.7 |
|
||||
+--------------------------------------------------------------------+
|
||||
| Copyright CiviCRM LLC (c) 2004-2017 |
|
||||
+--------------------------------------------------------------------+
|
||||
| This file is a part of CiviCRM. |
|
||||
| |
|
||||
| CiviCRM is free software; you can copy, modify, and distribute it |
|
||||
| under the terms of the GNU Affero General Public License |
|
||||
| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
|
||||
| |
|
||||
| CiviCRM 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 Affero General Public License for more details. |
|
||||
| |
|
||||
| You should have received a copy of the GNU Affero General Public |
|
||||
| License and the CiviCRM Licensing Exception along |
|
||||
| with this program; if not, contact CiviCRM LLC |
|
||||
| at info[AT]civicrm[DOT]org. If you have questions about the |
|
||||
| GNU Affero General Public License or the licensing of CiviCRM, |
|
||||
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
|
||||
+--------------------------------------------------------------------+
|
||||
*}
|
||||
{if $action eq 1 or $action eq 2 or $action eq 8}
|
||||
{include file="CRM/Financial/Form/FinancialAccount.tpl"}
|
||||
{else}
|
||||
<div class="help">
|
||||
{capture assign="typeLink"}{crmURL p="civicrm/admin/financial/financialType" q="reset=1"}{/capture}
|
||||
{capture assign="paymentLink"}{crmURL p="civicrm/admin/options/payment_instrument" q="reset=1"}{/capture}
|
||||
{capture assign="premiumLink"}{crmURL p="civicrm/admin/contribute/managePremiums" q="reset=1"}{/capture}
|
||||
<p>{ts 1=$typeLink 2=$paymentLink 3=$premiumLink}Financial accounts correspond to those in your accounting system. <a href="%1">Financial types</a>, <a href="%2">payment methods</a>, and <a href="%3">premiums</a> are associated with financial accounts so that they can result in the proper double-entry transactions to export to your accounting system.{/ts}</p>
|
||||
</div>
|
||||
{if $action ne 1 and $action ne 2}
|
||||
<div class="action-link">
|
||||
<a href="{crmURL q="action=add&reset=1"}" id="newFinancialAccount-top" class="button"><span><i class="crm-i fa-plus-circle"></i> {ts}Add Financial Account{/ts}</span></a>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{if $rows}
|
||||
{include file="CRM/common/jsortable.tpl"}
|
||||
<div id="ltype">
|
||||
<p></p>
|
||||
<div class="form-item">
|
||||
{strip}
|
||||
{* handle enable/disable actions*}
|
||||
{include file="CRM/common/enableDisableApi.tpl"}
|
||||
<table id="crm-financial_accounts" class="display">
|
||||
<thead class="sticky">
|
||||
<th>{ts}Name{/ts}</th>
|
||||
<th>{ts}Description{/ts}</th>
|
||||
<th>{ts}Acctg Code{/ts}</th>
|
||||
<th id="sortable">{ts}Account Type{/ts}</th>
|
||||
<th>{ts}Deductible?{/ts}</th>
|
||||
<th>{ts}Reserved?{/ts}</th>
|
||||
<th>{ts}Default?{/ts}</th>
|
||||
<th>{ts}Enabled?{/ts}</th>
|
||||
<th></th>
|
||||
</thead>
|
||||
{foreach from=$rows item=row}
|
||||
<tr id="financial_account-{$row.id}" class="crm-entity {cycle values="odd-row,even-row"} {$row.class}{if NOT $row.is_active} disabled{/if}">
|
||||
<td class="crm-editable" data-field="name">{$row.name}</td>
|
||||
<td class="crm-editable" data-field="description" data-type="textarea">{$row.description}</td>
|
||||
<td class="crm-editable" data-field="accounting_code">{$row.accounting_code}</td>
|
||||
<td>{$row.financial_account_type_id}{if $row.account_type_code} ({$row.account_type_code}){/if}</td>
|
||||
<td>{if $row.is_deductible eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if}</td>
|
||||
<td>{if $row.is_reserved eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if}</td>
|
||||
<td>{if $row.is_default eq 1}<img src="{$config->resourceBase}i/check.gif" alt="{ts}Default{/ts}" /> {/if}</td>
|
||||
<td id="row_{$row.id}_status">{if $row.is_active eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if}</td>
|
||||
<td>{$row.action|replace:'xx':$row.id}</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</table>
|
||||
{/strip}
|
||||
|
||||
{if $action ne 1 and $action ne 2}
|
||||
<div class="action-link">
|
||||
<a href="{crmURL q="action=add&reset=1"}" id="newFinancialAccount-bottom" class="button"><span><i class="crm-i fa-plus-circle"></i> {ts}Add Financial Account{/ts}</span></a>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
{else}
|
||||
<div class="messages status">
|
||||
<div class="icon inform-icon"></div>
|
||||
{capture assign=crmURL}{crmURL q="action=add&reset=1"}{/capture}
|
||||
{ts 1=$crmURL}There are no Financial Account entered. You can <a href='%1'>add one</a>.{/ts}
|
||||
</div>
|
||||
{/if}
|
||||
{/if}
|
|
@ -0,0 +1,60 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| CiviCRM version 4.7 |
|
||||
+--------------------------------------------------------------------+
|
||||
| Copyright CiviCRM LLC (c) 2004-2017 |
|
||||
+--------------------------------------------------------------------+
|
||||
| This file is a part of CiviCRM. |
|
||||
| |
|
||||
| CiviCRM is free software; you can copy, modify, and distribute it |
|
||||
| under the terms of the GNU Affero General Public License |
|
||||
| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
|
||||
| |
|
||||
| CiviCRM 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 Affero General Public License for more details. |
|
||||
| |
|
||||
| You should have received a copy of the GNU Affero General Public |
|
||||
| License and the CiviCRM Licensing Exception along |
|
||||
| with this program; if not, contact CiviCRM LLC |
|
||||
| at info[AT]civicrm[DOT]org. If you have questions about the |
|
||||
| GNU Affero General Public License or the licensing of CiviCRM, |
|
||||
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
|
||||
+--------------------------------------------------------------------+
|
||||
*}
|
||||
{htxt id="payment_instrument-title"}
|
||||
{ts}Payment Method{/ts}
|
||||
{/htxt}
|
||||
{htxt id="payment_instrument"}
|
||||
<p>
|
||||
{ts}If you specify a payment method then this batch will be limited to exporting only transactions paid with that method.{/ts}
|
||||
</p>
|
||||
<p>
|
||||
{ts}Note that not all transactions are necessarily associated with a payment method.{/ts}
|
||||
</p>
|
||||
{/htxt}
|
||||
|
||||
{htxt id="item_count-title"}
|
||||
{ts}Number of Transactions{/ts}
|
||||
{/htxt}
|
||||
{htxt id="item_count"}
|
||||
<p>
|
||||
{ts}If you know in advance the number of transactions in this batch, you may specify it now.{/ts}
|
||||
</p>
|
||||
<p>
|
||||
{ts}When you close your batch, CiviCRM will verify that you have entered the correct number{/ts} ({ts}you will have the opportunity to override the warning if they do not match{/ts}).
|
||||
</p>
|
||||
{/htxt}
|
||||
|
||||
{htxt id="total-title"}
|
||||
{ts}Total Amount{/ts}
|
||||
{/htxt}
|
||||
{htxt id="total"}
|
||||
<p>
|
||||
{ts}If you know in advance the total amount in this batch, you may specify it now.{/ts}
|
||||
</p>
|
||||
<p>
|
||||
{ts}When you close your batch, CiviCRM will verify the totals entered match this number{/ts} ({ts}you will have the opportunity to override the warning if they do not match{/ts}).
|
||||
</p>
|
||||
{/htxt}
|
|
@ -0,0 +1,28 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| CiviCRM version 4.7 |
|
||||
+--------------------------------------------------------------------+
|
||||
| Copyright CiviCRM LLC (c) 2004-2017 |
|
||||
+--------------------------------------------------------------------+
|
||||
| This file is a part of CiviCRM. |
|
||||
| |
|
||||
| CiviCRM is free software; you can copy, modify, and distribute it |
|
||||
| under the terms of the GNU Affero General Public License |
|
||||
| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
|
||||
| |
|
||||
| CiviCRM 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 Affero General Public License for more details. |
|
||||
| |
|
||||
| You should have received a copy of the GNU Affero General Public |
|
||||
| License and the CiviCRM Licensing Exception along |
|
||||
| with this program; if not, contact CiviCRM LLC |
|
||||
| at info[AT]civicrm[DOT]org. If you have questions about the |
|
||||
| GNU Affero General Public License or the licensing of CiviCRM, |
|
||||
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
|
||||
+--------------------------------------------------------------------+
|
||||
*}
|
||||
{if $action eq 1 or $action eq 2 or $action eq 8 or $action eq 262144 or $action eq 524288 or $action eq 128}
|
||||
{include file="CRM/Financial/Form/FinancialBatch.tpl"}
|
||||
{/if}
|
|
@ -0,0 +1,81 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| CiviCRM version 4.7 |
|
||||
+--------------------------------------------------------------------+
|
||||
| Copyright CiviCRM LLC (c) 2004-2017 |
|
||||
+--------------------------------------------------------------------+
|
||||
| This file is a part of CiviCRM. |
|
||||
| |
|
||||
| CiviCRM is free software; you can copy, modify, and distribute it |
|
||||
| under the terms of the GNU Affero General Public License |
|
||||
| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
|
||||
| |
|
||||
| CiviCRM 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 Affero General Public License for more details. |
|
||||
| |
|
||||
| You should have received a copy of the GNU Affero General Public |
|
||||
| License and the CiviCRM Licensing Exception along |
|
||||
| with this program; if not, contact CiviCRM LLC |
|
||||
| at info[AT]civicrm[DOT]org. If you have questions about the |
|
||||
| GNU Affero General Public License or the licensing of CiviCRM, |
|
||||
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
|
||||
+--------------------------------------------------------------------+
|
||||
*}
|
||||
{if $action eq 1 or $action eq 2 or $action eq 8}
|
||||
{include file="CRM/Financial/Form/FinancialType.tpl"}
|
||||
{else}
|
||||
<div class="help">
|
||||
{capture assign="premiumLink"}{crmURL p="civicrm/admin/contribute/managePremiums" q="reset=1"}{/capture}
|
||||
<p>{ts 1=$premiumLink}Financial types are used to categorize contributions for reporting and accounting purposes. You may set up as many as needed, including commonly used types such as Donation, Campaign Contribution or Membership Dues. Additionally, financial types can account for the inventory and expense of <a href="%1">premiums</a>.{/ts}</p>
|
||||
{capture assign="acctLink"}{crmURL p="civicrm/admin/financial/financialAccount" q="reset=1&action=browse"}{/capture}
|
||||
<p>{ts 1=$acctLink}Each financial type relates to a number of <a href="%1">financial accounts</a> to track income, accounts receivable, and fees.</p>{/ts}
|
||||
</div>
|
||||
|
||||
{if $rows}
|
||||
<div id="ltype">
|
||||
<p></p>
|
||||
<div class="form-item">
|
||||
{strip}
|
||||
{* handle enable/disable actions*}
|
||||
{include file="CRM/common/enableDisableApi.tpl"}
|
||||
{include file="CRM/common/jsortable.tpl"}
|
||||
<table cellpadding="0" cellspacing="0" border="0">
|
||||
<thead class="sticky">
|
||||
<th>{ts}Name{/ts}</th>
|
||||
<th>{ts}Description{/ts}</th>
|
||||
<th>{ts}Financial Accounts{/ts}</th>
|
||||
<th>{ts}Deductible?{/ts}</th>
|
||||
<th>{ts}Reserved?{/ts}</th>
|
||||
<th>{ts}Enabled?{/ts}</th>
|
||||
<th></th>
|
||||
</thead>
|
||||
{foreach from=$rows item=row}
|
||||
<tr id="financial_type-{$row.id}" class="crm-entity {cycle values="odd-row,even-row"} {$row.class}{if NOT $row.is_active} disabled{/if}">
|
||||
<td class="crm-editable" data-field="name">{$row.name}</td>
|
||||
<td class="crm-editable" data-field="description" data-type="textarea">{$row.description}</td>
|
||||
<td>{$row.financial_account}</td>
|
||||
<td class="crm-editable" data-field="is_deductible" data-type="boolean">{if $row.is_deductible eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if}</td>
|
||||
<td>{if $row.is_reserved eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if}</td>
|
||||
<td id="row_{$row.id}_status">{if $row.is_active eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if}</td>
|
||||
<td>{$row.action|replace:'xx':$row.id}</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</table>
|
||||
{/strip}
|
||||
</div>
|
||||
</div>
|
||||
{else}
|
||||
<div class="messages status no-popup">
|
||||
<div class="icon inform-icon"></div>
|
||||
{ts}None found.{/ts}
|
||||
</div>
|
||||
{/if}
|
||||
{if $action ne 1 and $action ne 2}
|
||||
<div class="action-link">
|
||||
{crmButton q="action=add&reset=1" id="newFinancialType" icon="plus-circle"}{ts}Add Financial Type{/ts}{/crmButton}
|
||||
{crmButton p="civicrm/admin" q="reset=1" class="cancel" icon="times"}{ts}Done{/ts}{/crmButton}
|
||||
</div>
|
||||
{/if}
|
||||
{/if}
|
|
@ -0,0 +1,80 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| CiviCRM version 4.7 |
|
||||
+--------------------------------------------------------------------+
|
||||
| Copyright CiviCRM LLC (c) 2004-2017 |
|
||||
+--------------------------------------------------------------------+
|
||||
| This file is a part of CiviCRM. |
|
||||
| |
|
||||
| CiviCRM is free software; you can copy, modify, and distribute it |
|
||||
| under the terms of the GNU Affero General Public License |
|
||||
| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
|
||||
| |
|
||||
| CiviCRM 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 Affero General Public License for more details. |
|
||||
| |
|
||||
| You should have received a copy of the GNU Affero General Public |
|
||||
| License and the CiviCRM Licensing Exception along |
|
||||
| with this program; if not, contact CiviCRM LLC |
|
||||
| at info[AT]civicrm[DOT]org. If you have questions about the |
|
||||
| GNU Affero General Public License or the licensing of CiviCRM, |
|
||||
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
|
||||
+--------------------------------------------------------------------+
|
||||
*}
|
||||
{if $action eq 1 or $action eq 2 or $action eq 8}
|
||||
{include file="CRM/Financial/Form/FinancialTypeAccount.tpl"}
|
||||
{else}
|
||||
{if $rows}
|
||||
<div id="ltype">
|
||||
<div class="form-item">
|
||||
{if $action ne 1 and $action ne 2}
|
||||
<div class="action-link">
|
||||
{crmButton q="action=add&reset=1&aid=$aid" id="newfinancialTypeAccount" icon="plus-circle"}{ts}Assign Account{/ts}{/crmButton}
|
||||
{crmButton p="civicrm/admin/financial/financialType" q="action=update&id=`$aid`&reset=1" icon="pencil"}{ts}Edit Financial Type{/ts}{/crmButton}
|
||||
</div>
|
||||
{/if}
|
||||
{strip}
|
||||
{* handle enable/disable actions*}
|
||||
{include file="CRM/common/enableDisableApi.tpl"}
|
||||
<table cellpadding="0" cellspacing="0" border="0">
|
||||
<thead class="sticky">
|
||||
<th>{ts}Relationship{/ts}</th>
|
||||
<th>{ts}Financial Account{/ts}</th>
|
||||
<th>{ts}Accounting Code{/ts}</th>
|
||||
<th>{ts}Account Type (Code){/ts}</th>
|
||||
<th>{ts}Owned By{/ts}</th>
|
||||
<th>{ts}Is Active?{/ts}</th>
|
||||
<th></th>
|
||||
</thead>
|
||||
{foreach from=$rows item=row}
|
||||
<tr id="row_{$row.id}"class="{cycle values="odd-row,even-row"} {$row.class}{if NOT $row.is_active} disabled{/if}">
|
||||
<td>{$row.account_relationship}</td>
|
||||
<td>{$row.financial_account}</td>
|
||||
<td>{$row.accounting_code}</td>
|
||||
<td>{$row.financial_account_type}{if $row.account_type_code} ({$row.account_type_code}){/if}</td>
|
||||
<td>{$row.owned_by}</td>
|
||||
<td id="row_{$row.id}_status">{if $row.is_active eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if}</td>
|
||||
<td>{$row.action|replace:'xx':$row.id}</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</table>
|
||||
{/strip}
|
||||
|
||||
{if $action ne 1 and $action ne 2}
|
||||
<div class="action-link">
|
||||
{crmButton q="action=add&reset=1&aid=$aid" id="newfinancialTypeAccount" icon="plus-circle"}{ts}Assign Account{/ts}{/crmButton}
|
||||
{crmButton p="civicrm/admin/financial/financialType" q="action=update&id=`$aid`&reset=1" icon="pencil"}{ts}Edit Financial Type{/ts}{/crmButton}
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
{else}
|
||||
<div class="messages status no-popup">
|
||||
<div class="icon inform-icon"></div>
|
||||
{capture assign=crmURL}{crmURL q="action=add&reset=1&aid=$aid"}{/capture}
|
||||
{ts 1=$crmURL}There are no financial accounts assigned to this financial type. You can <a href='%1'>assign one</a>.{/ts}
|
||||
</div>
|
||||
{/if}
|
||||
{/if}
|
Loading…
Add table
Add a link
Reference in a new issue