1 [% WRAPPER 'default/base.tt2' %]
3 var fundID = [% ctx.page_args.0 %]
4 function getFundingSource(rowIndex, item) {
6 var fs_id = this.grid.store.getValue(item, 'funding_source');
7 var fs = openils.acq.FundingSource.retrieve(fs_id);
8 return '<a href="[% ctx.base_uri %]/acq/funding_source/view/'+fs.id()+'">'+fs.name()+'</a>';
12 <!-- load the page-specific JS -->
13 <script src='[% ctx.media_prefix %]/js/ui/default/acq/financial/view_fund.js'> </script>
15 <div id='oils-acq-list-header' class='container'>
16 <div id='oils-acq-list-header-label'>Fund Details</div>
19 <div class='oils-acq-actions-div' style='margin:8px;'> <!-- XXX CSS -->
20 <!-- Dropdown menu for creating a new funding source credit -->
21 <div dojoType="dijit.form.DropDownButton">
22 <span>Create Allocation</span>
23 <div dojoType="dijit.TooltipDialog" execute="createAllocation(arguments[0]);">
24 <script type='dojo/connect' event='onOpen'>
25 openils.acq.FundingSource.createStore(
27 fundingSourceSelector.store =
28 new dojo.data.ItemFileReadStore({data:store});
29 fundingSourceSelector.setValue(store.items[0].code);
30 }, 'MANAGE_FUNDING_SOURCE'
33 <table class='dijitTooltipTable'>
35 <td><label for="amount">Funding Source: </label></td>
37 <input jsId='fundingSourceSelector' name="funding_source"
38 dojoType="dijit.form.FilteringSelect" searchAttr='code' labelAttr='code'>
43 <td><label for="amount">Amount: </label></td>
45 <!-- XXX get currency from funding source ... -->
46 <input dojoType="dijit.form.CurrencyTextBox" name="amount" currency='USD'> </input>
50 <td><label for="amount">Percent: </label></td>
53 dojoType="dijit.form.NumberTextBox"
54 constraints="{min:0,max:100}"
55 promptMessage="Please enter an amount between 0 and 100"
61 <td><label for="note">Note: </label></td>
63 <input dojoType="dijit.form.TextBox" name="note"> </input>
67 <td colspan='2' align='center'>
68 <button dojoType="dijit.form.Button" type="submit">Apply</button>
77 <div dojoType="dijit.layout.ContentPane" layoutAlign="top">
78 <div dojoType="dijit.layout.TabContainer">
79 <div dojoType="dijit.layout.ContentPane"
80 class='oils-acq-detail-content-pane' title="Summary" selected='true'>
82 <div dojoType="dijit.layout.ContentPane" layoutAlign="top">
83 <div dojoType="dijit.layout.ContentPane" layoutAlign="client" style='height:600px;'>
84 <table jsId="fundGrid" dojoType="dojox.grid.DataGrid" query="{id: '*'}" rowSelector='20px'>
87 <th field="id">ID</th>
88 <th field="name" width='auto'>Name</th>
89 <th field="code">Code</th>
90 <th field="currency_type">Currency Type</th>
91 <th field="org" get='getOrgInfo'>Owner</th>
92 <th field="combined_balance" get='getSummaryInfo'>Balance</th>
93 <th field="allocation_total" get='getSummaryInfo'>Total Allocated</th>
94 <th field="spent_balance" get='getSummaryInfo'>Spent Balance</th>
95 <th field="debit_total" get='getSummaryInfo'>Total Debits</th>
96 <th field="spent_total" get='getSummaryInfo'>Total Spent</th>
97 <th field="encumbrance_total" get='getSummaryInfo'>Total Encumbered</th>
103 {name: 'Balance (Total - (Spent + Encumbrances))")}', get:getSummaryInfo},
104 {name: 'Amount Allocated to this Fund")}', get:getSummaryInfo},
105 {name: 'Spent Balance (Total - Spent)")}', get:getSummaryInfo},
106 {name: 'Total Debits (Spent + Encumbered)")}', get:getSummaryInfo},
112 <div dojoType="dijit.layout.ContentPane" class='oils-acq-detail-content-pane' title="Allocations">
113 <script type='dojo/connect' event='onShow'>loadAllocationGrid();</script>
115 <div dojoType="dijit.layout.ContentPane" layoutAlign="top">
116 <div dojoType="dijit.layout.ContentPane" layoutAlign="client" style='height:600px;'>
117 <table jsId="fundAllocationGrid" dojoType="dojox.grid.DataGrid" query="{id: '*'}" rowSelector='20px'>
120 <th field="id">ID</th>
121 <th field="funding_source" get='getFundingSource'>Funding Source</th>
122 <th field="amount">Amount</th>
123 <th field="percent">Percent</th>
124 <th field="allocator">Allocated By</th>
125 <th field="note" width='auto'>Note</th>
133 <div dojoType="dijit.layout.ContentPane" class='oils-acq-detail-content-pane' title="Debits">
134 <script type='dojo/connect' event='onShow'>loadDebitGrid();</script>
136 <div dojoType="dijit.layout.ContentPane" layoutAlign="top">
137 <div dojoType="dijit.layout.ContentPane" layoutAlign="client" style='height:600px;'>
138 <table jsId="fundDebitGrid" dojoType="dojox.grid.DataGrid" query="{id: '*'}" rowSelector='20px'>
141 <th field="id">ID</th>
142 <th field="origin_amount">Origin Amount</th>
143 <th field="origin_currency_type">Origin Currency Type</th>
144 <th field="amount">Amount</th>
145 <th field="encumbrance">Encumbrance</th>
146 <th field="debit_type">Debit Type</th>
147 <th field="xfer_destination" get='getXferDestination'>Transfer Destination</th>