1 [% WRAPPER 'base.tt2' %]
2 <script type="text/javascript"> var fundingSourceID = [% ctx.page_args.0 %]; </script>
4 <div id='oils-acq-list-header' class='container'>
5 <div id='oils-acq-list-header-label'>[% l('Funding Source Details') %]</div>
8 <div class='oils-acq-actions-div' style='margin:8px;'> <!-- XXX CSS -->
10 <!-- Dropdown menu for creating a new funding source credit -->
11 <div dojoType="dijit.form.DropDownButton">
12 <span>[% l('Apply Credit') %]</span>
13 <div dojoType="dijit.TooltipDialog" execute="applyFSCredit(arguments[0]);">
14 <table class='dijitTooltipTable'>
16 <td><label for="amount">[% l('Amount: ') %]</label></td>
18 <input dojoType="dijit.form.CurrencyTextBox" name="amount"> </input>
22 <td><label for="note">[% l('Note: ') %]</label></td>
24 <input dojoType="dijit.form.TextBox" name="note"> </input>
28 <td colspan='2' align='center'>
29 <button dojoType=dijit.form.Button type="submit">[% l('Apply') %]</button>
35 <div dojoType="dijit.form.DropDownButton">
36 <span>[% l('Allocate to Fund') %]</span>
37 <div dojoType="dijit.TooltipDialog" execute="applyFSAllocation(arguments[0]);">
38 <script type='dojo/connect' event='onOpen'>
39 openils.acq.Fund.createStore(
41 fundingSourceFundSelector.store =
42 new dojo.data.ItemFileReadStore({data:store});
43 fundingSourceFundSelector.setValue(store.items[0].code);
47 <table class='dijitTooltipTable'>
49 <td><label for="amount">[% l('Fund: ') %]</label></td>
51 <input jsId='fundingSourceFundSelector' name="fund"
52 dojoType="dijit.form.FilteringSelect" searchAttr='code' labelAttr='code'>
57 <td><label for="amount">[% l('Amount: ') %]</label></td>
59 <input dojoType="dijit.form.CurrencyTextBox" name="amount"> </input>
62 <!-- Percent-based allocations are not supported. Will implement or remove later.
64 <td><label for="amount">[% l('Percent: ') %]</label></td>
67 dojoType="dijit.form.NumberTextBox"
68 constraints="{min:0,max:100}"
69 promptMessage="[% l('Please enter an amount between 0 and 100') %]"
76 <td><label for="note">[% l('Note: ') %]</label></td>
78 <input dojoType="dijit.form.TextBox" name="note"> </input>
82 <td colspan='2' align='center'>
83 <button dojoType=dijit.form.Button type="submit">[% l('Apply') %]</button>
91 <div dojoType="dijit.layout.ContentPane" layoutAlign="top">
92 <div dojoType="dijit.layout.TabContainer">
94 <div dojoType="dijit.layout.ContentPane" class='oils-acq-detail-content-pane' title="[% l('Summary') %]" selected='true'>
95 <script type='dojo/connect' event='onShow'>loadFSGrid();</script>
97 <div dojoType="dijit.layout.ContentPane" layoutAlign="top">
98 <div dojoType="dijit.layout.ContentPane" layoutAlign="client" style='height:600px;'>
99 <table jsId="fundingSourceGrid" dojoType="dojox.grid.DataGrid" query="{id: '*'}" rowSelector='20px'>
102 <th field="id">[% l('ID') %]</th>
103 <th field="name" width='auto'>[% l('Name') %]</th>
104 <th field="code">[% l('Code') %]</th>
105 <th field="balance" get='getSummaryInfo'>[% l('Balance') %]</th>
106 <th field="credit_total" get='getSummaryInfo'>[% l('Total Credits') %]</th>
107 <th field="allocation_total" get='getSummaryInfo'>[% l('Total Debits') %]</th>
108 <th field="currency_type">[% l('Currency Type') %]</th>
109 <th field="owner" width='auto' get='getOrgInfo'>[% l('Owner') %]</th>
117 <div dojoType="dijit.layout.ContentPane" class='oils-acq-detail-content-pane' title="[% l('Credits') %]">
118 <script type='dojo/connect' event='onShow'>loadCreditGrid(); </script>
120 <div dojoType="dijit.layout.ContentPane" layoutAlign="top">
121 <div dojoType="dijit.layout.ContentPane" layoutAlign="client">
126 dojoType="openils.widget.AutoGrid"
127 fieldOrder="['amount', 'effective_date', 'deadline_date', 'note']"
128 suppressFields="['id', 'funding_source']"
129 defaultCellWidth='"auto"'
132 showPaginator='true'>
138 <!-- Fund Allocations -->
139 <div dojoType="dijit.layout.ContentPane" class='oils-acq-detail-content-pane' title="[% l('Allocations') %]">
140 <script type='dojo/connect' event='onShow'>loadAllocationGrid();</script>
142 <div dojoType="dijit.layout.ContentPane" layoutAlign="top">
143 <div dojoType="dijit.layout.ContentPane" layoutAlign="client">
146 jsId="fsAllocationGrid"
148 dojoType="openils.widget.AutoGrid"
149 fieldOrder="['fund', 'amount', 'create_time', 'allocator', 'note']"
150 suppressFields="['id', 'funding_source']"
151 defaultCellWidth='"auto"'
154 showPaginator='true'>
158 <th field='fund' get='getFund' formatter='formatFund'/>
169 <!-- load the page-specific JS -->
170 <script type="text/javascript" src='[% ctx.media_prefix %]/js/ui/default/acq/financial/view_funding_source.js'> </script>