1 [% WRAPPER 'default/base.tt2' %]
2 <script type="text/javascript"> var fundID = [% ctx.page_args.0 %] </script>
4 <div id='oils-acq-list-header' class='container'>
5 <div id='oils-acq-list-header-label'>Fund Details</div>
8 <div class='oils-acq-actions-div' style='margin:8px;'> <!-- XXX CSS -->
9 <!-- Dropdown menu for creating a new funding source credit -->
10 <div dojoType="dijit.form.DropDownButton">
11 <span>Create Allocation</span>
12 <div dojoType="dijit.TooltipDialog" execute="createAllocation(arguments[0]);">
13 <script type='dojo/connect' event='onOpen'>
14 openils.acq.FundingSource.createStore(
16 fundingSourceSelector.store =
17 new dojo.data.ItemFileReadStore({data:store});
18 fundingSourceSelector.setValue(store.items[0].code);
20 'MANAGE_FUNDING_SOURCE'
23 <table class='dijitTooltipTable'>
25 <td><label for="amount">Funding Source: </label></td>
27 <input jsId='fundingSourceSelector' name="funding_source"
28 dojoType="dijit.form.FilteringSelect" searchAttr='code' labelAttr='code'>
33 <td><label for="amount">Amount: </label></td>
35 <input dojoType="dijit.form.CurrencyTextBox" name="amount"> </input>
39 <!-- Percent-based allocations are not supported. Will implement or remove later.
41 <td><label for="amount">Percent: </label></td>
44 dojoType="dijit.form.NumberTextBox"
45 constraints="{min:0,max:100}"
46 promptMessage="Please enter an amount between 0 and 100"
54 <td><label for="note">Note: </label></td>
56 <input dojoType="dijit.form.TextBox" name="note"> </input>
60 <td colspan='2' align='center'>
61 <button dojoType="dijit.form.Button" type="submit">Apply</button>
67 <div dojoType="dijit.form.DropDownButton">
68 <span>Transfer Money</span>
69 <div jsId="xferDialog" dojoType="dijit.TooltipDialog">
70 <script type="dojo/connect" event="onOpen">
71 /* If a fund is selected (from a previous time that the
72 user popped open this dialog), unselect it. Wouldn't want to
73 accidentally encourage a transfer that the user didn't mean. */
74 xferManager.clearFundSelector();
75 xferManager.setFundName(fund);
77 <table id="oils-acq-fund-xfer-table">
80 <label for="oils-acq-fund-xfer-o-amount">
82 <em>Amount to transfer from<br />
83 <span id="oils-acq-fund-xfer-name-fund"></span>
88 <input dojoType="dijit.form.CurrencyTextBox"
89 id="oils-acq-fund-xfer-o-amount"
95 <label for="oils-acq-fund-xfer-d-selector">
100 <span id="oils-acq-fund-xfer-d-selector"></span>
103 <tr id="oils-acq-fund-xfer-dest-amount" class="hidden">
105 <label for="oils-acq-fund-xfer-d-selector">
110 <div class="oils-acq-basic-roomy">
111 <input id="oils-acq-fund-xfer-same-o-d"
112 dojoType="dijit.form.CheckBox" checked="checked"
113 value="1" name="same_o_d" />
114 <label for="oils-acq-fund-xfer-same-o-d">
115 Same as source amount?
118 <div class="oils-acq-basic-roomy">
119 <input id="oils-acq-fund-xfer-d-amount"
120 dojoType="dijit.form.CurrencyTextBox"
121 name="d_amount" disabled="disabled" />
127 <label for="oils-acq-fund-xfer-note">Note</label>
130 <input dojoType="dijit.form.TextBox" name="note"
131 id="oils-acq-fund-xfer-note" />
135 <td colspan="2" id="oils-acq-fund-xfer-submit-row">
136 <button onclick="xferManager.submit();"
137 dojoType="dijit.form.Button" type="submit">
148 <div dojoType="dijit.layout.ContentPane" layoutAlign="top">
149 <div dojoType="dijit.layout.TabContainer">
151 <!-- Fund Summary -->
152 <div dojoType="dijit.layout.ContentPane"
153 class='oils-acq-detail-content-pane' title="Summary" selected='true'>
155 <div dojoType="dijit.layout.ContentPane" layoutAlign="top">
156 <div dojoType="dijit.layout.ContentPane" layoutAlign="client" style='height:600px;'>
157 <table jsId="fundGrid" dojoType="dojox.grid.DataGrid" query="{id: '*'}" rowSelector='20px'>
160 <th field="id">ID</th>
161 <th field="name">Name</th>
162 <th field="code">Code</th>
163 <th field="currency_type">Currency Type</th>
164 <th field="org" get='getOrgInfo'>Owner</th>
165 <th field="combined_balance" get='getSummaryInfo'>Balance</th>
166 <th field="allocation_total" get='getSummaryInfo'>Total Allocated</th>
167 <th field="spent_balance" get='getSummaryInfo'>Spent Balance</th>
168 <th field="debit_total" get='getSummaryInfo'>Total Debits</th>
169 <th field="spent_total" get='getSummaryInfo'>Total Spent</th>
170 <th field="encumbrance_total" get='getSummaryInfo'>Total Encumbered</th>
178 <!-- Fund Allocations -->
179 <div dojoType="dijit.layout.ContentPane" class='oils-acq-detail-content-pane' title="Allocations">
180 <script type='dojo/connect' event='onShow'>loadAllocationGrid();</script>
182 <div dojoType="dijit.layout.ContentPane" layoutAlign="top">
183 <div dojoType="dijit.layout.ContentPane" layoutAlign="client">
186 jsId="fundAllocationGrid"
188 dojoType="openils.widget.AutoGrid"
189 fieldOrder="['funding_source', 'amount', 'create_time', 'allocator', 'note']"
190 suppressFields="['id', 'fund']"
191 defaultCellWidth='"auto"'
194 showPaginator='true'>
198 <th field='funding_source' get='getFundingSource' formatter='formatFundingSource'/>
206 <!--- Fund Debits -->
207 <div dojoType="dijit.layout.ContentPane" class='oils-acq-detail-content-pane' title="Debits">
208 <script type='dojo/connect' event='onShow'>loadDebitGrid();</script>
210 <div dojoType="dijit.layout.ContentPane" layoutAlign="top" style='height:600px;'>
211 <button dojoType="dijit.form.Button" onClick="fundDebitGrid.refresh();">Refresh Grid</button>
212 <div dojoType="dijit.layout.ContentPane" layoutAlign="client">
217 dojoType="openils.widget.AutoGrid"
218 fieldOrder="['amount', 'encumbrance', 'debit_type', 'origin_amount', 'origin_currency_type']"
219 suppressFields="['id', 'fund']"
220 defaultCellWidth='"auto"'
223 showPaginator='true'>
229 <div dojoType="dijit.layout.ContentPane" class="oils-acq-detail-content-pane" title="Tags">
230 <script type="dojo/connect" event="onShow">
231 tagManager.displayFund(fund);
233 <div id="oils-acq-tag-manager-display"></div>
234 <div id="oils-acq-tag-manager-add">
235 <div dojoType="dijit.form.DropDownButton">
237 <div dojoType="dijit.TooltipDialog">
238 <select dojoType="dijit.form.FilteringSelect"
241 <button onclick="tagManager.addMapping(
242 fund, new acqft().fromStoreItem(tagSelector.item)
243 );" type="submit" dojoType="dijit.form.Button">
253 <!-- load the page-specific JS -->
254 <script type="text/javascript" src="[% ctx.media_prefix %]/js/ui/default/acq/common/tag_manager.js"></script>
255 <script type="text/javascript" src='[% ctx.media_prefix %]/js/ui/default/acq/financial/view_fund.js'></script>