Commit | Line | Data |
---|---|---|
6a488035 TO |
1 | {* |
2 | +--------------------------------------------------------------------+ | |
232624b1 | 3 | | CiviCRM version 4.4 | |
6a488035 TO |
4 | +--------------------------------------------------------------------+ |
5 | | Copyright CiviCRM LLC (c) 2004-2013 | | |
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/FinancialAccount.tpl"} | |
28 | {else} | |
29 | <div id="help"> | |
5aa9fb54 AH |
30 | {capture assign="typeLink"}{crmURL p="civicrm/admin/financial/financialType" q="reset=1"}{/capture} |
31 | {capture assign="paymentLink"}{crmURL p="civicrm/admin/options/payment_instrument" q="group=payment_instrument&reset=1"}{/capture} | |
32 | {capture assign="premiumLink"}{crmURL p="civicrm/admin/contribute/managePremiums" q="reset=1"}{/capture} | |
33 | <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 instruments</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> | |
6a488035 TO |
34 | </div> |
35 | {if $action ne 1 and $action ne 2} | |
36 | <div class="action-link"> | |
1393e47e | 37 | <a href="{crmURL q="action=add&reset=1"}" id="newFinancialAccount-top" class="button"><span><div class="icon add-icon"></div>{ts}Add Financial Account{/ts}</span></a> |
6a488035 TO |
38 | </div> |
39 | {/if} | |
40 | ||
41 | {if $rows} | |
42 | {include file="CRM/common/jsortable.tpl"} | |
43 | <div id="ltype"> | |
44 | <p></p> | |
45 | <div class="form-item"> | |
46 | {strip} | |
1393e47e | 47 | {* handle enable/disable actions*} |
4d17a233 CW |
48 | {include file="CRM/common/enableDisableApi.tpl"} |
49 | {include file="CRM/common/crmeditable.tpl"} | |
6a488035 TO |
50 | <table id="crm-financial_accounts" class="display"> |
51 | <thead class="sticky"> | |
52 | <th>{ts}Name{/ts}</th> | |
53 | <th>{ts}Description{/ts}</th> | |
54 | <th>{ts}Acctg Code{/ts}</th> | |
55 | <th id="sortable">{ts}Account Type{/ts}</th> | |
56 | <th>{ts}Deductible?{/ts}</th> | |
57 | <th>{ts}Reserved?{/ts}</th> | |
58 | <th>{ts}Default?{/ts}</th> | |
59 | <th>{ts}Enabled?{/ts}</th> | |
60 | <th></th> | |
61 | </thead> | |
62 | {foreach from=$rows item=row} | |
134bc82c CW |
63 | <tr id="financial_account-{$row.id}" class="crm-entity {cycle values="odd-row,even-row"} {$row.class}{if NOT $row.is_active} disabled{/if}"> |
64 | <td class="crm-editable" data-field="name">{$row.name}</td> | |
65 | <td class="crm-editable" data-field="description">{$row.description}</td> | |
66 | <td class="crm-editable" data-field="accounting_code">{$row.accounting_code}</td> | |
6a488035 TO |
67 | <td>{$row.financial_account_type_id}{if $row.account_type_code} ({$row.account_type_code}){/if}</td> |
68 | <td>{if $row.is_deductible eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if}</td> | |
69 | <td>{if $row.is_reserved eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if}</td> | |
70 | <td>{if $row.is_default eq 1}<img src="{$config->resourceBase}i/check.gif" alt="{ts}Default{/ts}" /> {/if}</td> | |
71 | <td id="row_{$row.id}_status">{if $row.is_active eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if}</td> | |
72 | <td>{$row.action|replace:'xx':$row.id}</td> | |
73 | </tr> | |
74 | {/foreach} | |
75 | </table> | |
76 | {/strip} | |
77 | ||
78 | {if $action ne 1 and $action ne 2} | |
79 | <div class="action-link"> | |
1393e47e | 80 | <a href="{crmURL q="action=add&reset=1"}" id="newFinancialAccount-bottom" class="button"><span><div class="icon add-icon"></div>{ts}Add Financial Account{/ts}</span></a> |
6a488035 TO |
81 | </div> |
82 | {/if} | |
83 | </div> | |
84 | </div> | |
85 | {else} | |
86 | <div class="messages status"> | |
87 | <div class="icon inform-icon"></div> | |
88 | {capture assign=crmURL}{crmURL q="action=add&reset=1"}{/capture} | |
89 | {ts 1=$crmURL}There are no Financial Account entered. You can <a href='%1'>add one</a>.{/ts} | |
1393e47e | 90 | </div> |
6a488035 | 91 | {/if} |
5aa9fb54 | 92 | {/if} |