1 [% WRAPPER 'default/base.tt2' %]
3 var fundingSourceID = [% ctx.page_args.0 %];
4 function getFund(rowIndex) {
5 data = fsAllocationGrid.model.getRow(rowIndex);
7 var fund = openils.acq.Fund.retrieve(data.fund);
8 return '<a href="[% ctx.base_path %]/acq/fund/view/'+fund.id()+'">'+fund.code()+'</a>';
13 <!-- load the page-specific JS -->
14 <script src='[% ctx.media_prefix %]/js/ui/default/acq/financial/view_funding_source.js'> </script>
16 <div id='oils-acq-list-header' class='container'>
17 <div id='oils-acq-list-header-label'>Funding Source Details</div>
20 <div class='oils-acq-actions-div' style='margin:8px;'> <!-- XXX CSS -->
22 <!-- Dropdown menu for creating a new funding source credit -->
23 <div dojoType="dijit.form.DropDownButton">
24 <span>Apply Credit</span>
25 <div dojoType="dijit.TooltipDialog" execute="applyFSCredit(arguments[0]);">
26 <table class='dijitTooltipTable'>
28 <td><label for="amount">Amount: </label></td>
30 <!-- XXX get currency from funding source ... -->
31 <input dojoType="dijit.form.CurrencyTextBox" name="amount" currency='USD'> </input>
35 <td><label for="note">Note: </label></td>
37 <input dojoType="dijit.form.TextBox" name="note"> </input>
38 <!-- XXX textarea makes more sense, but it's buggy in the dropdown dialog .. perhaps a height issue?
39 <textarea dojoType='dijit.form.Textarea' name="note" style='min-height:6em'>
45 <td colspan='2' align='center'>
46 <button dojoType=dijit.form.Button type="submit">Apply</button>
52 <div dojoType="dijit.form.DropDownButton">
53 <span>Allocate to Fund</span>
54 <div dojoType="dijit.TooltipDialog" execute="applyFSAllocation(arguments[0]);">
55 <script type='dojo/connect' event='onOpen'>
56 openils.acq.Fund.createStore(
58 fundingSourceFundSelector.store =
59 new dojo.data.ItemFileReadStore({data:store});
60 fundingSourceFundSelector.setValue(store.items[0].code);
64 <table class='dijitTooltipTable'>
66 <td><label for="amount">Fund: </label></td>
68 <input jsId='fundingSourceFundSelector' name="fund"
69 dojoType="dijit.form.FilteringSelect" searchAttr='code' labelAttr='code'>
74 <td><label for="amount">Amount: </label></td>
76 <!-- XXX get currency from funding source ... -->
77 <input dojoType="dijit.form.CurrencyTextBox" name="amount" currency='USD'> </input>
81 <td><label for="amount">Percent: </label></td>
84 dojoType="dijit.form.NumberTextBox"
85 constraints="{min:0,max:100}"
86 promptMessage="Please enter an amount between 0 and 100"
92 <td><label for="note">Note: </label></td>
94 <input dojoType="dijit.form.TextBox" name="note"> </input>
98 <td colspan='2' align='center'>
99 <button dojoType=dijit.form.Button type="submit">Apply</button>
107 <div dojoType="dijit.layout.ContentPane" layoutAlign="top">
108 <div dojoType="dijit.layout.TabContainer">
109 <div dojoType="dijit.layout.ContentPane" class='oils-acq-detail-content-pane' title="Summary" selected='true'>
110 <script type='dojo/connect' event='onShow'>loadFSGrid();</script>
112 <div dojoType="dijit.layout.ContentPane" layoutAlign="top">
113 <div dojoType="dijit.layout.ContentPane" layoutAlign="client" style='height:600px;'>
114 <table jsId="fundingSourceGrid" dojoType="dojox.grid.DataGrid" query="{id: '*'}" rowSelector='20px'>
117 <th field="id">ID</th>
118 <th field="name" width='auto'>Name</th>
119 <th field="code">Code</th>
120 <th field="balance" get='getSummaryInfo'>Balance</th>
121 <th field="credit_total" get='getSummaryInfo'>Total Credits</th>
122 <th field="allocation_total" get='getSummaryInfo'>Total Debits</th>
123 <th field="currency_type">Currency Type</th>
124 <th field="owner" width='auto' get='getOrgInfo'>Owner</th>
131 <div dojoType="dijit.layout.ContentPane" class='oils-acq-detail-content-pane' title="Credits">
132 <script type='dojo/connect' event='onShow'>loadCreditGrid();
134 <div dojoType="dijit.layout.ContentPane" layoutAlign="top">
135 <div dojoType="dijit.layout.ContentPane" layoutAlign="client" style='height:600px;'>
136 <table jsId="fsCreditGrid" dojoType="dojox.grid.DataGrid" query="{id: '*'}" rowSelector='20px'>
139 <th field="id">ID</th>
140 <th field="amount">Amount</th>
141 <th field="note" width='auto'>Note</th>
148 <div dojoType="dijit.layout.ContentPane" class='oils-acq-detail-content-pane' title="Allocations">
149 <script type='dojo/connect' event='onShow'>loadAllocationGrid();</script>
150 <div dojoType="dijit.layout.ContentPane" layoutAlign="top">
151 <div dojoType="dijit.layout.ContentPane" layoutAlign="client" style='height:600px;'>
152 <table jsId="fsAllocationGrid" dojoType="dojox.grid.DataGrid" query="{id: '*'}" rowSelector='20px'>
155 <th field="id">ID</th>
156 <th field="fund" get='getFund'>Fund</th>
157 <th field="amount">Amount</th>
158 <th field="percent">Percent</th>
159 <th field="allocator">Allocated By</th>
160 <th field="note" width='auto'>Note</th>