1 [% WRAPPER 'default/base.tt2' %]
2 <script type="text/javascript"> var fundID = [% ctx.page_args.0 %] </script>
4 <!-- load the page-specific JS -->
5 <script type="text/javascript" src="[% ctx.media_prefix %]/js/ui/default/acq/common/tag_manager.js"></script>
6 <script type="text/javascript" src='[% ctx.media_prefix %]/js/ui/default/acq/financial/view_fund.js'></script>
8 <div id='oils-acq-list-header' class='container'>
9 <div id='oils-acq-list-header-label'>Fund Details</div>
12 <div class='oils-acq-actions-div' style='margin:8px;'> <!-- XXX CSS -->
13 <!-- Dropdown menu for creating a new funding source credit -->
14 <div dojoType="dijit.form.DropDownButton">
15 <span>Create Allocation</span>
16 <div dojoType="dijit.TooltipDialog" execute="createAllocation(arguments[0]);">
17 <script type='dojo/connect' event='onOpen'>
18 openils.acq.FundingSource.createStore(
20 fundingSourceSelector.store =
21 new dojo.data.ItemFileReadStore({data:store});
22 fundingSourceSelector.setValue(store.items[0].code);
24 'MANAGE_FUNDING_SOURCE'
27 <table class='dijitTooltipTable'>
29 <td><label for="amount">Funding Source: </label></td>
31 <input jsId='fundingSourceSelector' name="funding_source"
32 dojoType="dijit.form.FilteringSelect" searchAttr='code' labelAttr='code'>
37 <td><label for="amount">Amount: </label></td>
39 <input dojoType="dijit.form.CurrencyTextBox" name="amount"> </input>
43 <!-- Percent-based allocations are not supported. Will implement or remove later.
45 <td><label for="amount">Percent: </label></td>
48 dojoType="dijit.form.NumberTextBox"
49 constraints="{min:0,max:100}"
50 promptMessage="Please enter an amount between 0 and 100"
58 <td><label for="note">Note: </label></td>
60 <input dojoType="dijit.form.TextBox" name="note"> </input>
64 <td colspan='2' align='center'>
65 <button dojoType="dijit.form.Button" type="submit">Apply</button>
71 <div dojoType="dijit.form.DropDownButton">
72 <span>Transfer Money</span>
73 <div jsId="xferDialog" dojoType="dijit.TooltipDialog">
74 <script type="dojo/connect" event="onOpen">
75 /* If a fund is selected (from a previous time that the
76 user popped open this dialog), unselect it. Wouldn't want to
77 accidentally encourage a transfer that the user didn't mean. */
78 xferManager.clearFundSelector();
79 xferManager.setFundName(fund);
81 <table id="oils-acq-fund-xfer-table">
84 <label for="oils-acq-fund-xfer-o-amount">
86 <em>Amount to transfer from<br />
87 <span id="oils-acq-fund-xfer-name-fund"></span>
92 <input dojoType="dijit.form.CurrencyTextBox"
93 id="oils-acq-fund-xfer-o-amount"
99 <label for="oils-acq-fund-xfer-d-selector">
104 <span id="oils-acq-fund-xfer-d-selector"></span>
107 <tr id="oils-acq-fund-xfer-dest-amount" class="hidden">
109 <label for="oils-acq-fund-xfer-d-selector">
114 <div class="oils-acq-basic-roomy">
115 <input id="oils-acq-fund-xfer-same-o-d"
116 dojoType="dijit.form.CheckBox" checked="checked"
117 value="1" name="same_o_d" />
118 <label for="oils-acq-fund-xfer-same-o-d">
119 Same as source amount?
122 <div class="oils-acq-basic-roomy">
123 <input id="oils-acq-fund-xfer-d-amount"
124 dojoType="dijit.form.CurrencyTextBox"
125 name="d_amount" disabled="disabled" />
131 <label for="oils-acq-fund-xfer-note">Note</label>
134 <input dojoType="dijit.form.TextBox" name="note"
135 id="oils-acq-fund-xfer-note" />
139 <td colspan="2" id="oils-acq-fund-xfer-submit-row">
140 <button onclick="xferManager.submit();"
141 dojoType="dijit.form.Button" type="submit">
152 <div dojoType="dijit.layout.ContentPane" layoutAlign="top">
153 <div dojoType="dijit.layout.TabContainer">
155 <!-- Fund Summary -->
156 <div dojoType="dijit.layout.ContentPane"
157 class='oils-acq-detail-content-pane' title="Summary" selected='true'>
159 <div dojoType="dijit.layout.ContentPane" layoutAlign="top">
160 <div dojoType="dijit.layout.ContentPane" layoutAlign="client" style='height:600px;'>
161 <table jsId="fundGrid" dojoType="dojox.grid.DataGrid" query="{id: '*'}" rowSelector='20px'>
164 <th field="id">ID</th>
165 <th field="name">Name</th>
166 <th field="code">Code</th>
167 <th field="currency_type">Currency Type</th>
168 <th field="org" get='getOrgInfo'>Owner</th>
169 <th field="combined_balance" get='getSummaryInfo'>Balance</th>
170 <th field="allocation_total" get='getSummaryInfo'>Total Allocated</th>
171 <th field="spent_balance" get='getSummaryInfo'>Spent Balance</th>
172 <th field="debit_total" get='getSummaryInfo'>Total Debits</th>
173 <th field="spent_total" get='getSummaryInfo'>Total Spent</th>
174 <th field="encumbrance_total" get='getSummaryInfo'>Total Encumbered</th>
182 <!-- Fund Allocations -->
183 <div dojoType="dijit.layout.ContentPane" class='oils-acq-detail-content-pane' title="Allocations">
184 <script type='dojo/connect' event='onShow'>loadAllocationGrid();</script>
186 <div dojoType="dijit.layout.ContentPane" layoutAlign="top">
187 <div dojoType="dijit.layout.ContentPane" layoutAlign="client">
190 jsId="fundAllocationGrid"
192 dojoType="openils.widget.AutoGrid"
193 fieldOrder="['funding_source', 'amount', 'create_time', 'allocator', 'note']"
194 suppressFields="['id', 'fund']"
195 defaultCellWidth='"auto"'
198 showPaginator='true'>
202 <th field='funding_source' get='getFundingSource' formatter='formatFundingSource'/>
210 <!--- Fund Debits -->
211 <div dojoType="dijit.layout.ContentPane" class='oils-acq-detail-content-pane' title="Debits">
212 <script type='dojo/connect' event='onShow'>loadDebitGrid();</script>
214 <div dojoType="dijit.layout.ContentPane" layoutAlign="top" style='height:600px;'>
215 <div dojoType="dijit.layout.ContentPane" layoutAlign="client">
220 dojoType="openils.widget.AutoGrid"
221 fieldOrder="['amount', 'encumbrance', 'debit_type', 'origin_amount', 'origin_currency_type']"
222 suppressFields="['id', 'fund']"
223 defaultCellWidth='"auto"'
226 showPaginator='true'>
232 <div dojoType="dijit.layout.ContentPane" class="oils-acq-detail-content-pane" title="Tags">
233 <script type="dojo/connect" event="onShow">
234 tagManager.displayFund(fund);
236 <div id="oils-acq-tag-manager-display"></div>
237 <div id="oils-acq-tag-manager-add">
238 <div dojoType="dijit.form.DropDownButton">
240 <div dojoType="dijit.TooltipDialog">
241 <select dojoType="dijit.form.FilteringSelect"
244 <button onclick="tagManager.addMapping(
245 fund, new acqft().fromStoreItem(tagSelector.item)
246 );" type="submit" dojoType="dijit.form.Button">