Commit | Line | Data |
---|---|---|
6a488035 TO |
1 | {* |
2 | +--------------------------------------------------------------------+ | |
1188c7a8 | 3 | | Copyright CiviCRM LLC. All rights reserved. | |
6a488035 | 4 | | | |
1188c7a8 TO |
5 | | This work is published under the GNU AGPLv3 license with some | |
6 | | permitted exceptions and without any warranty. For full license | | |
7 | | and copyright information, see https://civicrm.org/licensing | | |
6a488035 TO |
8 | +--------------------------------------------------------------------+ |
9 | *} | |
10 | {if $action eq 1 or $action eq 2 or $action eq 8} | |
11 | {include file="CRM/Financial/Form/FinancialType.tpl"} | |
12 | {else} | |
f6eedce7 | 13 | <div class="help"> |
5aa9fb54 AH |
14 | {capture assign="premiumLink"}{crmURL p="civicrm/admin/contribute/managePremiums" q="reset=1"}{/capture} |
15 | <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> | |
16 | {capture assign="acctLink"}{crmURL p="civicrm/admin/financial/financialAccount" q="reset=1&action=browse"}{/capture} | |
17 | <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 |
18 | </div> |
19 | ||
036aa39d | 20 | <div class="crm-content-block crm-block"> |
6a488035 TO |
21 | {if $rows} |
22 | <div id="ltype"> | |
23 | <p></p> | |
24 | <div class="form-item"> | |
25 | {strip} | |
1393e47e | 26 | {* handle enable/disable actions*} |
4d17a233 | 27 | {include file="CRM/common/enableDisableApi.tpl"} |
134bc82c | 28 | {include file="CRM/common/jsortable.tpl"} |
036aa39d MR |
29 | <table cellpadding="0" cellspacing="0" border="0" class="row-highlight"> |
30 | <thead class="sticky"> | |
6a488035 TO |
31 | <th>{ts}Name{/ts}</th> |
32 | <th>{ts}Description{/ts}</th> | |
036aa39d | 33 | <th>{ts}Financial Accounts{/ts}</th> |
6a488035 TO |
34 | <th>{ts}Deductible?{/ts}</th> |
35 | <th>{ts}Reserved?{/ts}</th> | |
36 | <th>{ts}Enabled?{/ts}</th> | |
37 | <th></th> | |
38 | </thead> | |
39 | {foreach from=$rows item=row} | |
134bc82c CW |
40 | <tr id="financial_type-{$row.id}" class="crm-entity {cycle values="odd-row,even-row"} {$row.class}{if NOT $row.is_active} disabled{/if}"> |
41 | <td class="crm-editable" data-field="name">{$row.name}</td> | |
7d644ac8 | 42 | <td class="crm-editable" data-field="description" data-type="textarea">{$row.description}</td> |
b633f8bd CW |
43 | <td>{$row.financial_account}</td> |
44 | <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 | 45 | <td>{if $row.is_reserved eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if}</td> |
46 | <td id="row_{$row.id}_status">{if $row.is_active eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if}</td> | |
47 | <td>{$row.action|replace:'xx':$row.id}</td> | |
6a488035 TO |
48 | </tr> |
49 | {/foreach} | |
50 | </table> | |
51 | {/strip} | |
6a488035 TO |
52 | </div> |
53 | </div> | |
54 | {else} | |
55 | <div class="messages status no-popup"> | |
34d6cec4 | 56 | {icon icon="fa-info-circle"}{/icon} |
e5e8ab99 | 57 | {ts}None found.{/ts} |
1393e47e | 58 | </div> |
6a488035 | 59 | {/if} |
e5e8ab99 CW |
60 | {if $action ne 1 and $action ne 2} |
61 | <div class="action-link"> | |
80bc2820 AH |
62 | {crmButton q="action=add&reset=1" id="newFinancialType" icon="plus-circle"}{ts}Add Financial Type{/ts}{/crmButton} |
63 | {crmButton p="civicrm/admin" q="reset=1" class="cancel" icon="times"}{ts}Done{/ts}{/crmButton} | |
e5e8ab99 CW |
64 | </div> |
65 | {/if} | |
036aa39d | 66 | </div> |
5aa9fb54 | 67 | {/if} |