]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/web/templates/default/acq/financial/list_funds.tt2
cb653d94b4da9483135fab6f8915f2953b4a0969
[working/Evergreen.git] / Open-ILS / web / templates / default / acq / financial / list_funds.tt2
1 [% WRAPPER 'default/base.tt2' %]
2 [% ctx.page_title = 'Funds' %]
3
4 <!-- load the page-specific JS -->
5 <script src='[% ctx.media_prefix %]/js/ui/default/acq/financial/list_funds.js'> </script>
6 <script type="text/javascript">
7     function getFundName(rowIndex, item) {
8         if (!item) return null;
9         return {
10             "name": this.grid.store.getValue(item, "name"),
11             "id": this.grid.store.getValue(item, "id")
12         };
13     }
14
15     function formatName(value) {
16         if (!value) return ""; // XXX
17
18         var link = "<a href='/eg/acq/financial/view_fund/" +
19             value.id + "'>" +
20             value.name + "</a>";
21
22         /* TODO: add another element here to which we can attach a tooltip
23            showing tags */
24         return link;
25     }
26
27     function createNewFund() {
28         /* Set the display constraints before drawing the edit dialog;
29            introduce Y2K and Y2K2C problem */
30         lfGrid.overrideWidgetArgs = {year: { dijitArgs: {constraints : {min: 2000, max: 2200, pattern : '####'}}}};
31         lfGrid.showCreateDialog();
32     }
33
34 </script>
35
36 <table style='width:100%;'>
37     <tr>
38         <!-- TODO CSS -->
39         <td style='text-align:left;font-size:130%;font-weight: bold;'>Funds</td>
40         <td style='text-align:right;width:90%;'>
41
42             <button dojoType='dijit.form.Button' onClick='createNewFund()'>New Fund</button>
43             <button dojoType='dijit.form.Button' onClick='lfGrid.deleteSelected()'>Delete Selected</button>
44
45             <div dojoType="dijit.form.DropDownButton">
46                 <span>Fund Propagation &amp; Rollover</span>
47                 <div dojoType="dijit.TooltipDialog" execute="performRollover(arguments[0]);">
48                     <table class='dijitTooltipTable' id='oils-acq-rollover-tooltip-table'>
49                         <tr>
50                             <td colspan='2'>
51                                 <div style='width:400px;'>
52                                 Propagation creates new funds for the sugsequent fiscal year based on the
53                                 funds for the selected fiscal year.  Only funds with the propagate setting
54                                 enabled will be affected.  No money or encumbrances are altered
55                                 during this process.
56                                 </div>
57                             </td>
58                         </tr>
59                         <tr>
60                             <td><label for="rollover">Perform Fiscal Year Close-out Operation: </label></td>
61                             <td>
62                                 <input dojoType="dijit.form.CheckBox" name="rollover"> </input>
63                             </td>
64                         </tr>
65                         <tr>
66                             <td colspan='2'>
67                                 <div style='width:400px;'>
68                                 The year end close out operation moves encumbrances from the selected fiscal
69                                 year to the analogous funds in the subsequent fiscal year and it deactivates
70                                 funds for the selected fiscal year.  Additionally, for all funds that have
71                                 the "Rollver" setting enabled, this process will move all unspent money to
72                                 the analogous fund in the subsequent fiscal year.
73                                 </div>
74                             </td>
75                         </tr>
76                         <tr>
77                             <td>Context Org Unit:</td>
78                             <td><span id='oils-acq-rollover-ctxt-org'></span></td>
79                         </tr>
80                         <tr>
81                             <td>Include Funds for Descendant Org Units:</td>
82                             <td><input dojoType=dijit.form.CheckBox name='child_orgs'/></td>
83                         </tr>
84                         <tr>
85                             <td><label for="dry_run">Dry Run: </label></td>
86                             <td>
87                                 <input dojoType="dijit.form.CheckBox" name="dry_run" checked='checked'> </input>
88                             </td>
89                         </tr>
90                         <tr>
91                             <td colspan='2'>
92                                 <div style='width:400px;'>
93                                 When Dry Run is selected, the system will generate a summary of
94                                 the changes that would occur during the selected operation(s).
95                                 No data will be changed.
96                                 </div>
97                             </td>
98                         </tr>
99                         <tr>
100                             <td colspan='2' align='center'>
101                                 <button dojoType=dijit.form.Button type="submit">Process</button>
102                             </td>
103                         </tr>
104                     </table>
105                 </div>
106             </div>
107         </td>
108     </tr>
109 </table>
110
111 <div class="oils-acq-basic-roomy">
112     <span>Context Org Unit</span>
113     <select
114         dojoType="openils.widget.OrgUnitFilteringSelect"
115         jsId="contextOrgSelector"
116         searchAttr="shortname"
117         labelAttr="shortname">
118     </select>
119
120     <span>Year</span>
121     <select dojoType="dijit.form.FilteringSelect"
122         jsId="fundFilterYearSelect"
123         labelAttr="year"
124         searchAttr="year">
125     </select>
126
127     <div dojoType='dijit.form.Button' jsId='refreshButton'>Refresh</div>
128 </div>
129
130 <div dojoType="dijit.layout.ContentPane" layoutAlign="client">
131     <div id='acq-fund-list-rollover-summary-wrapper'>
132         <div id='acq-fund-list-rollover-summary' class='hidden'>
133             <div id='acq-fund-list-rollover-summary-header'> </div>
134             <ul>
135                 <li id='acq-fund-list-rollover-summary-dry-run'>These changes have <span class='oils-notify-text'>not</span> been committed yet.</li>
136                 <li id='acq-fund-list-rollover-summary-funds'></li>
137                 <li id='acq-fund-list-rollover-summary-rollover-amount'></li>
138             </ul>
139         </div>
140     </div>
141 </div>
142
143 <div dojoType="dijit.layout.ContentPane" layoutAlign="client">
144     <table  jsId="lfGrid"
145             dojoType="openils.widget.AutoGrid"
146             fieldOrder="['id', 'name', 'code', 'year', 'org', 'currency_type', 'combined_balance']"
147             requiredFields="['name', 'code', 'year', 'org', 'currency_type']"
148             query="{id: '*'}"
149             defaultCellWidth='"auto"'
150             fmClass='acqf'
151             showPaginator='true'
152             editOnEnter='true'>
153         <thead>
154             <tr>
155                 <th field="name" get="getFundName" formatter="formatName"></th>
156                 <th field="combined_balance" name="Combined Balance" get="getBalanceInfo"></th>
157             </tr>
158         </thead>
159     </table>
160 </div>
161 <div dojoType="openils.widget.ProgressDialog" jsId="progressDialog"></div>
162 [% END %]