Commit | Line | Data |
---|---|---|
6a488035 TO |
1 | {* |
2 | +--------------------------------------------------------------------+ | |
39de6fd5 | 3 | | CiviCRM version 4.6 | |
6a488035 | 4 | +--------------------------------------------------------------------+ |
e7112fa7 | 5 | | Copyright CiviCRM LLC (c) 2004-2015 | |
6a488035 TO |
6 | +--------------------------------------------------------------------+ |
7 | | This file is a part of CiviCRM. | | |
8 | | | | |
9 | | CiviCRM is free software; you can copy, modify, and distribute it | | |
10 | | under the terms of the GNU Affero General Public License | | |
11 | | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. | | |
12 | | | | |
13 | | CiviCRM is distributed in the hope that it will be useful, but | | |
14 | | WITHOUT ANY WARRANTY; without even the implied warranty of | | |
15 | | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | | |
16 | | See the GNU Affero General Public License for more details. | | |
17 | | | | |
18 | | You should have received a copy of the GNU Affero General Public | | |
19 | | License and the CiviCRM Licensing Exception along | | |
20 | | with this program; if not, contact CiviCRM LLC | | |
21 | | at info[AT]civicrm[DOT]org. If you have questions about the | | |
22 | | GNU Affero General Public License or the licensing of CiviCRM, | | |
23 | | see the CiviCRM license FAQ at http://civicrm.org/licensing | | |
24 | +--------------------------------------------------------------------+ | |
25 | *} | |
26 | {if $action eq 1 or $action eq 2 or $action eq 8} | |
27 | {include file="CRM/Financial/Form/FinancialType.tpl"} | |
28 | {else} | |
29 | <div id="help"> | |
5aa9fb54 AH |
30 | {capture assign="premiumLink"}{crmURL p="civicrm/admin/contribute/managePremiums" q="reset=1"}{/capture} |
31 | <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> | |
32 | {capture assign="acctLink"}{crmURL p="civicrm/admin/financial/financialAccount" q="reset=1&action=browse"}{/capture} | |
33 | <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} | |
6a488035 TO |
34 | </div> |
35 | ||
36 | {if $rows} | |
37 | <div id="ltype"> | |
38 | <p></p> | |
39 | <div class="form-item"> | |
40 | {strip} | |
1393e47e | 41 | {* handle enable/disable actions*} |
4d17a233 | 42 | {include file="CRM/common/enableDisableApi.tpl"} |
134bc82c | 43 | {include file="CRM/common/jsortable.tpl"} |
6a488035 TO |
44 | <table cellpadding="0" cellspacing="0" border="0"> |
45 | <thead class="sticky"> | |
46 | <th>{ts}Name{/ts}</th> | |
47 | <th>{ts}Description{/ts}</th> | |
1393e47e | 48 | <th>{ts}Financial Accounts{/ts}</th> |
6a488035 TO |
49 | <th>{ts}Deductible?{/ts}</th> |
50 | <th>{ts}Reserved?{/ts}</th> | |
51 | <th>{ts}Enabled?{/ts}</th> | |
52 | <th></th> | |
53 | </thead> | |
54 | {foreach from=$rows item=row} | |
134bc82c CW |
55 | <tr id="financial_type-{$row.id}" class="crm-entity {cycle values="odd-row,even-row"} {$row.class}{if NOT $row.is_active} disabled{/if}"> |
56 | <td class="crm-editable" data-field="name">{$row.name}</td> | |
7d644ac8 | 57 | <td class="crm-editable" data-field="description" data-type="textarea">{$row.description}</td> |
b633f8bd CW |
58 | <td>{$row.financial_account}</td> |
59 | <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> | |
1393e47e | 60 | <td>{if $row.is_reserved eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if}</td> |
61 | <td id="row_{$row.id}_status">{if $row.is_active eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if}</td> | |
62 | <td>{$row.action|replace:'xx':$row.id}</td> | |
6a488035 TO |
63 | </tr> |
64 | {/foreach} | |
65 | </table> | |
66 | {/strip} | |
6a488035 TO |
67 | </div> |
68 | </div> | |
69 | {else} | |
70 | <div class="messages status no-popup"> | |
71 | <div class="icon inform-icon"></div> | |
e5e8ab99 | 72 | {ts}None found.{/ts} |
1393e47e | 73 | </div> |
6a488035 | 74 | {/if} |
e5e8ab99 CW |
75 | {if $action ne 1 and $action ne 2} |
76 | <div class="action-link"> | |
f7296a9a CW |
77 | {crmButton q="action=add&reset=1" id="newFinancialType" icon="circle-plus"}{ts}Add Financial Type{/ts}{/crmButton} |
78 | {crmButton p="civicrm/admin" q="reset=1" class="cancel" icon="close"}{ts}Done{/ts}{/crmButton} | |
e5e8ab99 CW |
79 | </div> |
80 | {/if} | |
5aa9fb54 | 81 | {/if} |