1 [% WRAPPER 'base.tt2' %]
2 [% ctx.page_title = l('Funds') %]
4 <!-- load the page-specific JS -->
5 <script type="text/javascript">
6 function getFundName(rowIndex, item) {
7 if (!item) return null;
9 "name": this.grid.store.getValue(item, "name"),
10 "id": this.grid.store.getValue(item, "id")
14 function formatName(value) {
15 if (!value) return ""; // XXX
17 var link = "<a href='/eg/acq/fund/view/" +
21 /* TODO: add another element here to which we can attach a tooltip
26 function createNewFund() {
27 /* Set the display constraints before drawing the edit dialog;
28 introduce Y2K and Y2K2C problem */
29 lfGrid.overrideWidgetArgs = {year: { dijitArgs: {constraints : {min: 2000, max: 2200, pattern : '####'}}}};
30 lfGrid.showCreateDialog();
35 <table style='width:100%;'>
38 <td style='text-align:left;font-size:130%;font-weight: bold;'>[% l('Funds') %]</td>
39 <td style='text-align:right;width:90%;'>
41 <button dojoType='dijit.form.Button' onClick='createNewFund()'>[% l('New Fund') %]</button>
42 <button dojoType='dijit.form.Button' onClick='lfGrid.deleteSelected()'>[% l('Delete Selected') %]</button>
44 <div dojoType="dijit.form.DropDownButton">
45 <span>[% l('Fund Propagation & Rollover') %]</span>
46 <div dojoType="dijit.TooltipDialog" execute="performRollover(arguments[0]);">
47 <table class='dijitTooltipTable' id='oils-acq-rollover-tooltip-table'>
50 <div style='width:400px;'>
51 [% l('Propagation creates new funds for the subsequent fiscal year based on the ' _
52 'funds for the selected fiscal year. Only funds with the propagate setting ' _
53 'enabled will be affected. No money or encumbrances are altered ' _
54 'during this process.') %]
59 <td><label for="rollover">[% l('Perform Fiscal Year Close-out Operation: ') %]</label></td>
61 <input dojoType="dijit.form.CheckBox" name="rollover"> </input>
66 <div style='width:400px;'>
67 [% l('The year end close out operation moves encumbrances from the selected fiscal ' _
68 'year to the analogous funds in the subsequent fiscal year and it deactivates ' _
69 'funds for the selected fiscal year. Additionally, for all funds that have ' _
70 'the "Rollover" setting enabled, this process will move all unspent money to ' _
71 'the analogous fund in the subsequent fiscal year.') %]
75 <tr class="encumb_only hidden">
76 <td><label for="encumb_only">[% l('Limit Fiscal Year Close-out Operation to Encumbrances: ') %]</label></td>
78 <input dojoType="dijit.form.CheckBox" name="encumb_only"> </input>
81 <tr class="encumb_only hidden">
83 <div style='width:400px;'>
84 [% l('This modifies the above described Close-out Operation, causing funds to be ' _
85 'transfered into the void (that is, entirely removed) instead of being transfered ' _
86 'to the analogous funds in the subsequent fiscal year.') %]
91 <td>[% l('Context Org Unit:') %]</td>
92 <td><span id='oils-acq-rollover-ctxt-org'></span></td>
95 <td>[% l('Include Funds for Descendant Org Units:') %]</td>
96 <td><input dojoType=dijit.form.CheckBox name='child_orgs'/></td>
99 <td><label for="dry_run">[% l('Dry Run: ') %]</label></td>
101 <input dojoType="dijit.form.CheckBox" name="dry_run" checked='checked'> </input>
106 <div style='width:400px;'>
107 [% l('When Dry Run is selected, the system will generate a summary of ' _
108 'the changes that would occur during the selected operation(s). ' _
109 'No data will be changed.') %]
114 <td colspan='2' align='center'>
115 <button dojoType=dijit.form.Button type="submit">[% l('Process') %]</button>
125 <div class="oils-acq-basic-roomy">
126 <span>[% l('Context Org Unit') %]</span>
128 dojoType="openils.widget.OrgUnitFilteringSelect"
129 jsId="contextOrgSelector"
130 searchAttr="shortname"
131 labelAttr="shortname">
134 <span>[% l('Year') %]</span>
135 <select dojoType="dijit.form.FilteringSelect"
136 jsId="fundFilterYearSelect"
141 <div dojoType='dijit.form.Button' jsId='refreshButton'>[% l('Refresh') %]</div>
144 <div dojoType="dijit.layout.ContentPane" layoutAlign="client">
145 <div id='acq-fund-list-rollover-summary-wrapper'>
146 <div id='acq-fund-list-rollover-summary' class='hidden'>
147 <div id='acq-fund-list-rollover-summary-header'> </div>
149 <li id='acq-fund-list-rollover-summary-dry-run'>[% l('These changes have [_1]not[_2] been committed yet.', '<span class="oils-notify-text">', '</span>') %]</li>
150 <li id='acq-fund-list-rollover-summary-funds'></li>
151 <li id='acq-fund-list-rollover-summary-rollover-amount'></li>
157 <div dojoType="dijit.layout.ContentPane" layoutAlign="client" style='height:80%'>
159 dojoType="openils.widget.AutoGrid"
160 fieldOrder="['id', 'name', 'code', 'year', 'org', 'currency_type', 'combined_balance']"
161 requiredFields="['name', 'code', 'year', 'org', 'currency_type']"
164 showLoadFilter='true'
170 <th field="name" get="getFundName" formatter="formatName"></th>
171 <th field="combined_balance" name="Combined Balance" get="getBalanceInfo"></th>
176 <div dojoType="openils.widget.ProgressDialog" jsId="progressDialog"></div>
177 <script type="text/javascript" src='[% ctx.media_prefix %]/js/ui/default/acq/financial/list_funds.js'> </script>