--- /dev/null
+[% WRAPPER base.tt2 %]
+<div dojoType="dijit.layout.ContentPane" layoutAlign="client" class='oils-header-panel'>
+ <div>Currency Type</div>
+ <div>
+ <button dojoType='dijit.form.Button' onClick='ctGrid.showCreateDialog()'>New Currency Type</button>
+ <button dojoType='dijit.form.Button' onClick='ctGrid.deleteSelected()'>Delete Selected</button>
+ </div>
+</div>
+<div dojoType="dijit.layout.ContentPane" layoutAlign="client">
+ <table jsId="ctGrid"
+ autoHeight='true'
+ dojoType="openils.widget.AutoGrid"
+ fieldOrder="['code', 'label']"
+ defaultCellWidth='25'
+ query="{code: '*'}"
+ fmClass='acqct'
+ editOnEnter='true'>
+ </table>
+</div>
+
+<script type="text/javascript">
+ dojo.require('dijit.layout.ContentPane');
+ dojo.require('dijit.form.Button');
+ dojo.require('openils.widget.AutoGrid');
+ dojo.require('openils.Util');
+ openils.Util.addOnLoad(
+ function() {
+ ctGrid.loadAll({order_by:{acqct : 'code'}});
+ }
+ );
+</script>
+
+[% END %]
+
+
+++ /dev/null
-[% WRAPPER base.tt2 %]
-<div dojoType="dijit.layout.ContentPane" layoutAlign="client" class='oils-header-panel'>
- <div>Currency Type</div>
- <div>
- <button dojoType='dijit.form.Button' onClick='ctGrid.showCreateDialog()'>New Currency Type</button>
- <button dojoType='dijit.form.Button' onClick='ctGrid.deleteSelected()'>Delete Selected</button>
- </div>
-</div>
-<div dojoType="dijit.layout.ContentPane" layoutAlign="client">
- <table jsId="ctGrid"
- autoHeight='true'
- dojoType="openils.widget.AutoGrid"
- fieldOrder="['code', 'label']"
- defaultCellWidth='25'
- query="{code: '*'}"
- fmClass='acqct'
- editOnEnter='true'>
- </table>
-</div>
-
-<script type="text/javascript">
- dojo.require('dijit.layout.ContentPane');
- dojo.require('dijit.form.Button');
- dojo.require('openils.widget.AutoGrid');
- dojo.require('openils.Util');
- openils.Util.addOnLoad(
- function() {
- ctGrid.loadAll({order_by:{acqct : 'code'}});
- }
- );
-</script>
-
-[% END %]
-
-
+++ /dev/null
-[% WRAPPER 'base.tt2' %]
-
-<!-- The main grid lives here -->
-<script type="text/javascript">
- function getName(rowIndex, item) {
- if(!item) return '';
- var name = this.grid.store.getValue(item, 'name');
- var id = this.grid.store.getValue(item, 'id');
- // weird hack to pass the data we need to the formatter which is now required for HTML cell values
- return id + ':' + name;
- }
-
- function formatName(value) {
- if(value) {
- var vals = value.split(/:/);
- return '<a href="[% ctx.base_path %]/acq/funding_source/view/'+vals[0]+'">'+vals[1]+'</a>';
- }
- }
-</script>
-
-<div dojoType="dijit.layout.ContentPane" layoutAlign="client">
-
- <div dojoType="dijit.layout.ContentPane" layoutAlign="top" class='oils-header-panel'>
- <div>Funding Sources</div>
- <div>
- <button dojoType='dijit.form.Button' onClick='fsGrid.showCreateDialog()'>New Funding Source</button>
- <button dojoType='dijit.form.Button' onClick='fsGrid.deleteSelected()'>Delete Selected</button>
- </div>
- </div>
-
- <table jsId="fsGrid"
- dojoType="openils.widget.AutoGrid"
- fieldOrder="['id', 'name', 'owner', 'code', 'currency_type', 'balance']"
- query="{name: '*'}"
- defaultCellWidth='"auto"'
- fmClass='acqfs'
- editOnEnter='true'>
- <thead>
- <tr>
- <th field="name" get='getName' formatter='formatName'/>
- <th field="owner" get='getOrgInfo'/>
- <th field="balance" get='getBalanceInfo'/>
- </tr>
- </thead>
- </table>
-</div>
-
-<!-- load the page-specific JS -->
-<script type="text/javascript" src='[% ctx.media_prefix %]/js/ui/default/acq/financial/list_funding_sources.js'></script>
-
-[% END %]
+++ /dev/null
-[% WRAPPER 'base.tt2' %]
-[% ctx.page_title = 'Funds' %]
-
-<!-- load the page-specific JS -->
-<script type="text/javascript">
- function getFundName(rowIndex, item) {
- if (!item) return null;
- return {
- "name": this.grid.store.getValue(item, "name"),
- "id": this.grid.store.getValue(item, "id")
- };
- }
-
- function formatName(value) {
- if (!value) return ""; // XXX
-
- var link = "<a href='/eg/acq/financial/view_fund/" +
- value.id + "'>" +
- value.name + "</a>";
-
- /* TODO: add another element here to which we can attach a tooltip
- showing tags */
- return link;
- }
-
- function createNewFund() {
- /* Set the display constraints before drawing the edit dialog;
- introduce Y2K and Y2K2C problem */
- lfGrid.overrideWidgetArgs = {year: { dijitArgs: {constraints : {min: 2000, max: 2200, pattern : '####'}}}};
- lfGrid.showCreateDialog();
- }
-
-</script>
-
-<table style='width:100%;'>
- <tr>
- <!-- TODO CSS -->
- <td style='text-align:left;font-size:130%;font-weight: bold;'>Funds</td>
- <td style='text-align:right;width:90%;'>
-
- <button dojoType='dijit.form.Button' onClick='createNewFund()'>New Fund</button>
- <button dojoType='dijit.form.Button' onClick='lfGrid.deleteSelected()'>Delete Selected</button>
-
- <div dojoType="dijit.form.DropDownButton">
- <span>Fund Propagation & Rollover</span>
- <div dojoType="dijit.TooltipDialog" execute="performRollover(arguments[0]);">
- <table class='dijitTooltipTable' id='oils-acq-rollover-tooltip-table'>
- <tr>
- <td colspan='2'>
- <div style='width:400px;'>
- Propagation creates new funds for the subsequent fiscal year based on the
- funds for the selected fiscal year. Only funds with the propagate setting
- enabled will be affected. No money or encumbrances are altered
- during this process.
- </div>
- </td>
- </tr>
- <tr>
- <td><label for="rollover">Perform Fiscal Year Close-out Operation: </label></td>
- <td>
- <input dojoType="dijit.form.CheckBox" name="rollover"> </input>
- </td>
- </tr>
- <tr>
- <td colspan='2'>
- <div style='width:400px;'>
- The year end close out operation moves encumbrances from the selected fiscal
- year to the analogous funds in the subsequent fiscal year and it deactivates
- funds for the selected fiscal year. Additionally, for all funds that have
- the "Rollover" setting enabled, this process will move all unspent money to
- the analogous fund in the subsequent fiscal year.
- </div>
- </td>
- </tr>
- <tr>
- <td>Context Org Unit:</td>
- <td><span id='oils-acq-rollover-ctxt-org'></span></td>
- </tr>
- <tr>
- <td>Include Funds for Descendant Org Units:</td>
- <td><input dojoType=dijit.form.CheckBox name='child_orgs'/></td>
- </tr>
- <tr>
- <td><label for="dry_run">Dry Run: </label></td>
- <td>
- <input dojoType="dijit.form.CheckBox" name="dry_run" checked='checked'> </input>
- </td>
- </tr>
- <tr>
- <td colspan='2'>
- <div style='width:400px;'>
- When Dry Run is selected, the system will generate a summary of
- the changes that would occur during the selected operation(s).
- No data will be changed.
- </div>
- </td>
- </tr>
- <tr>
- <td colspan='2' align='center'>
- <button dojoType=dijit.form.Button type="submit">Process</button>
- </td>
- </tr>
- </table>
- </div>
- </div>
- </td>
- </tr>
-</table>
-
-<div class="oils-acq-basic-roomy">
- <span>Context Org Unit</span>
- <select
- dojoType="openils.widget.OrgUnitFilteringSelect"
- jsId="contextOrgSelector"
- searchAttr="shortname"
- labelAttr="shortname">
- </select>
-
- <span>Year</span>
- <select dojoType="dijit.form.FilteringSelect"
- jsId="fundFilterYearSelect"
- labelAttr="year"
- searchAttr="year">
- </select>
-
- <div dojoType='dijit.form.Button' jsId='refreshButton'>Refresh</div>
-</div>
-
-<div dojoType="dijit.layout.ContentPane" layoutAlign="client">
- <div id='acq-fund-list-rollover-summary-wrapper'>
- <div id='acq-fund-list-rollover-summary' class='hidden'>
- <div id='acq-fund-list-rollover-summary-header'> </div>
- <ul>
- <li id='acq-fund-list-rollover-summary-dry-run'>These changes have <span class='oils-notify-text'>not</span> been committed yet.</li>
- <li id='acq-fund-list-rollover-summary-funds'></li>
- <li id='acq-fund-list-rollover-summary-rollover-amount'></li>
- </ul>
- </div>
- </div>
-</div>
-
-<div dojoType="dijit.layout.ContentPane" layoutAlign="client">
- <table jsId="lfGrid"
- dojoType="openils.widget.AutoGrid"
- fieldOrder="['id', 'name', 'code', 'year', 'org', 'currency_type', 'combined_balance']"
- requiredFields="['name', 'code', 'year', 'org', 'currency_type']"
- query="{id: '*'}"
- defaultCellWidth='"auto"'
- fmClass='acqf'
- showPaginator='true'
- editOnEnter='true'>
- <thead>
- <tr>
- <th field="name" get="getFundName" formatter="formatName"></th>
- <th field="combined_balance" name="Combined Balance" get="getBalanceInfo"></th>
- </tr>
- </thead>
- </table>
-</div>
-<div dojoType="openils.widget.ProgressDialog" jsId="progressDialog"></div>
-<script type="text/javascript" src='[% ctx.media_prefix %]/js/ui/default/acq/financial/list_funds.js'> </script>
-[% END %]
+++ /dev/null
-[% WRAPPER 'base.tt2' %]
-<script type="text/javascript"> var fundID = [% ctx.page_args.0 %] </script>
-
-<div id='oils-acq-list-header' class='container'>
- <div id='oils-acq-list-header-label'>Fund Details</div>
-</div>
-
-<div class='oils-acq-actions-div' style='margin:8px;'> <!-- XXX CSS -->
- <!-- Dropdown menu for creating a new funding source credit -->
- <div dojoType="dijit.form.DropDownButton">
- <span>Create Allocation</span>
- <div dojoType="dijit.TooltipDialog" execute="createAllocation(arguments[0]);">
- <script type='dojo/connect' event='onOpen'>
- openils.acq.FundingSource.createStore(
- function(store) {
- fundingSourceSelector.store =
- new dojo.data.ItemFileReadStore({data:store});
- fundingSourceSelector.setValue(store.items[0].code);
- },
- 'MANAGE_FUNDING_SOURCE'
- );
- </script>
- <table class='dijitTooltipTable'>
- <tr>
- <td><label for="amount">Funding Source: </label></td>
- <td>
- <input jsId='fundingSourceSelector' name="funding_source"
- dojoType="dijit.form.FilteringSelect" searchAttr='code' labelAttr='code'>
- </input>
- </td>
- </tr>
- <tr>
- <td><label for="amount">Amount: </label></td>
- <td>
- <input dojoType="dijit.form.CurrencyTextBox" name="amount"> </input>
- </td>
- </tr>
-
- <!-- Percent-based allocations are not supported. Will implement or remove later.
- <tr>
- <td><label for="amount">Percent: </label></td>
- <td>
- <input
- dojoType="dijit.form.NumberTextBox"
- constraints="{min:0,max:100}"
- promptMessage="Please enter an amount between 0 and 100"
- name="percent">
- </input>
- </td>
- </tr>
- -->
-
- <tr>
- <td><label for="note">Note: </label></td>
- <td>
- <input dojoType="dijit.form.TextBox" name="note"> </input>
- </td>
- </tr>
- <tr>
- <td colspan='2' align='center'>
- <button dojoType="dijit.form.Button" type="submit">Apply</button>
- </td>
- </tr>
- </table>
- </div>
- </div>
- <div dojoType="dijit.form.DropDownButton">
- <span>Transfer Money</span>
- <div jsId="xferDialog" dojoType="dijit.TooltipDialog">
- <script type="dojo/connect" event="onOpen">
- /* If a fund is selected (from a previous time that the
- user popped open this dialog), unselect it. Wouldn't want to
- accidentally encourage a transfer that the user didn't mean. */
- xferManager.clearFundSelector();
- xferManager.setFundName(fund);
- </script>
- <table id="oils-acq-fund-xfer-table">
- <tr>
- <th>
- <label for="oils-acq-fund-xfer-o-amount">
- Source amount<br />
- <em>Amount to transfer from<br />
- <span id="oils-acq-fund-xfer-name-fund"></span>
- </em>
- </label>
- </th>
- <td>
- <input dojoType="dijit.form.CurrencyTextBox"
- id="oils-acq-fund-xfer-o-amount"
- name="o_amount" />
- </td>
- </tr>
- <tr>
- <th>
- <label for="oils-acq-fund-xfer-d-selector">
- Destination fund
- </label>
- </th>
- <td>
- <span id="oils-acq-fund-xfer-d-selector"></span>
- </td>
- </tr>
- <tr id="oils-acq-fund-xfer-dest-amount" class="hidden">
- <th>
- <label for="oils-acq-fund-xfer-d-selector">
- Destination amount
- </label>
- </th>
- <td>
- <div class="oils-acq-basic-roomy">
- <input id="oils-acq-fund-xfer-same-o-d"
- dojoType="dijit.form.CheckBox" checked="checked"
- value="1" name="same_o_d" />
- <label for="oils-acq-fund-xfer-same-o-d">
- Same as source amount?
- </label>
- </div>
- <div class="oils-acq-basic-roomy">
- <input id="oils-acq-fund-xfer-d-amount"
- dojoType="dijit.form.CurrencyTextBox"
- name="d_amount" disabled="disabled" />
- </div>
- </td>
- </tr>
- <tr>
- <th>
- <label for="oils-acq-fund-xfer-note">Note</label>
- </th>
- <td>
- <input dojoType="dijit.form.TextBox" name="note"
- id="oils-acq-fund-xfer-note" />
- </td>
- </tr>
- <tr>
- <td colspan="2" id="oils-acq-fund-xfer-submit-row">
- <button onclick="xferManager.submit();"
- dojoType="dijit.form.Button" type="submit">
- Transfer
- </button>
- </td>
- </tr>
- </table>
- </div>
- </div>
-</div>
-
-
-<div dojoType="dijit.layout.ContentPane" layoutAlign="top">
- <div dojoType="dijit.layout.TabContainer">
-
- <!-- Fund Summary -->
- <div dojoType="dijit.layout.ContentPane"
- class='oils-acq-detail-content-pane' title="Summary" selected='true'>
-
- <div dojoType="dijit.layout.ContentPane" layoutAlign="top">
- <div dojoType="dijit.layout.ContentPane" layoutAlign="client" style='height:600px;'>
- <table jsId="fundGrid" dojoType="dojox.grid.DataGrid" query="{id: '*'}" rowSelector='20px'>
- <thead>
- <tr>
- <th field="id">ID</th>
- <th field="name">Name</th>
- <th field="code">Code</th>
- <th field="currency_type">Currency Type</th>
- <th field="org" get='getOrgInfo'>Owner</th>
- <th field="combined_balance" get='getSummaryInfo'>Balance</th>
- <th field="allocation_total" get='getSummaryInfo'>Total Allocated</th>
- <th field="spent_balance" get='getSummaryInfo'>Spent Balance</th>
- <th field="debit_total" get='getSummaryInfo'>Total Debits</th>
- <th field="spent_total" get='getSummaryInfo'>Total Spent</th>
- <th field="encumbrance_total" get='getSummaryInfo'>Total Encumbered</th>
- </tr>
- </thead>
- </table>
- </div>
- </div>
- </div>
-
- <!-- Fund Allocations -->
- <div dojoType="dijit.layout.ContentPane" class='oils-acq-detail-content-pane' title="Allocations">
- <script type='dojo/connect' event='onShow'>loadAllocationGrid();</script>
-
- <div dojoType="dijit.layout.ContentPane" layoutAlign="top">
- <div dojoType="dijit.layout.ContentPane" layoutAlign="client">
-
- <table
- jsId="fundAllocationGrid"
- autoHeight='true'
- dojoType="openils.widget.AutoGrid"
- fieldOrder="['funding_source', 'amount', 'create_time', 'allocator', 'note']"
- suppressFields="['id', 'fund']"
- defaultCellWidth='"auto"'
- fmClass="acqfa"
- query="{id: '*'}"
- showPaginator='true'>
-
- <thead>
- <tr>
- <th field='funding_source' get='getFundingSource' formatter='formatFundingSource'/>
- </tr>
- </thead>
- </table>
- </div>
- </div>
- </div>
-
- <!--- Fund Debits -->
- <div dojoType="dijit.layout.ContentPane" class='oils-acq-detail-content-pane' title="Debits">
- <script type='dojo/connect' event='onShow'>loadDebitGrid();</script>
-
- <div dojoType="dijit.layout.ContentPane" layoutAlign="top" style='height:600px;'>
- <button dojoType="dijit.form.Button" onClick="fundDebitGrid.refresh();">Refresh Grid</button>
- <div dojoType="dijit.layout.ContentPane" layoutAlign="client">
-
- <table
- jsId="fundDebitGrid"
- autoHeight='true'
- dojoType="openils.widget.AutoGrid"
- fieldOrder="['amount', 'encumbrance', 'debit_type', 'origin_amount', 'origin_currency_type']"
- suppressFields="['id', 'fund']"
- defaultCellWidth='"auto"'
- fmClass="acqfdeb"
- query="{id: '*'}"
- showPaginator='true'>
- </table>
- </div>
- </div>
- </div>
-
- <div dojoType="dijit.layout.ContentPane" class="oils-acq-detail-content-pane" title="Tags">
- <script type="dojo/connect" event="onShow">
- tagManager.displayFund(fund);
- </script>
- <div id="oils-acq-tag-manager-display"></div>
- <div id="oils-acq-tag-manager-add">
- <div dojoType="dijit.form.DropDownButton">
- <span>Add Tag</span>
- <div dojoType="dijit.TooltipDialog">
- <select dojoType="dijit.form.FilteringSelect"
- jsId="tagSelector">
- </select>
- <button onclick="tagManager.addMapping(
- fund, new acqft().fromStoreItem(tagSelector.item)
- );" type="submit" dojoType="dijit.form.Button">
- Add
- </button>
- </div>
- </div>
- </div>
- </div>
- </div>
-</div>
-
-<!-- load the page-specific JS -->
-<script type="text/javascript" src="[% ctx.media_prefix %]/js/ui/default/acq/common/tag_manager.js"></script>
-<script type="text/javascript" src='[% ctx.media_prefix %]/js/ui/default/acq/financial/view_fund.js'></script>
-
-[% END %]
+++ /dev/null
-[% WRAPPER 'base.tt2' %]
-<script type="text/javascript"> var fundingSourceID = [% ctx.page_args.0 %]; </script>
-
-<div id='oils-acq-list-header' class='container'>
- <div id='oils-acq-list-header-label'>Funding Source Details</div>
-</div>
-
-<div class='oils-acq-actions-div' style='margin:8px;'> <!-- XXX CSS -->
-
- <!-- Dropdown menu for creating a new funding source credit -->
- <div dojoType="dijit.form.DropDownButton">
- <span>Apply Credit</span>
- <div dojoType="dijit.TooltipDialog" execute="applyFSCredit(arguments[0]);">
- <table class='dijitTooltipTable'>
- <tr>
- <td><label for="amount">Amount: </label></td>
- <td>
- <input dojoType="dijit.form.CurrencyTextBox" name="amount"> </input>
- </td>
- </tr>
- <tr>
- <td><label for="note">Note: </label></td>
- <td>
- <input dojoType="dijit.form.TextBox" name="note"> </input>
- </td>
- </tr>
- <tr>
- <td colspan='2' align='center'>
- <button dojoType=dijit.form.Button type="submit">Apply</button>
- </td>
- </tr>
- </table>
- </div>
- </div>
- <div dojoType="dijit.form.DropDownButton">
- <span>Allocate to Fund</span>
- <div dojoType="dijit.TooltipDialog" execute="applyFSAllocation(arguments[0]);">
- <script type='dojo/connect' event='onOpen'>
- openils.acq.Fund.createStore(
- function(store) {
- fundingSourceFundSelector.store =
- new dojo.data.ItemFileReadStore({data:store});
- fundingSourceFundSelector.setValue(store.items[0].code);
- }, 'MANAGE_FUND'
- );
- </script>
- <table class='dijitTooltipTable'>
- <tr>
- <td><label for="amount">Fund: </label></td>
- <td>
- <input jsId='fundingSourceFundSelector' name="fund"
- dojoType="dijit.form.FilteringSelect" searchAttr='code' labelAttr='code'>
- </input>
- </td>
- </tr>
- <tr>
- <td><label for="amount">Amount: </label></td>
- <td>
- <input dojoType="dijit.form.CurrencyTextBox" name="amount"> </input>
- </td>
- </tr>
- <!-- Percent-based allocations are not supported. Will implement or remove later.
- <tr>
- <td><label for="amount">Percent: </label></td>
- <td>
- <input
- dojoType="dijit.form.NumberTextBox"
- constraints="{min:0,max:100}"
- promptMessage="Please enter an amount between 0 and 100"
- name="percent">
- </input>
- </td>
- </tr>
- -->
- <tr>
- <td><label for="note">Note: </label></td>
- <td>
- <input dojoType="dijit.form.TextBox" name="note"> </input>
- </td>
- </tr>
- <tr>
- <td colspan='2' align='center'>
- <button dojoType=dijit.form.Button type="submit">Apply</button>
- </td>
- </tr>
- </table>
- </div>
- </div>
-</div>
-
-<div dojoType="dijit.layout.ContentPane" layoutAlign="top">
- <div dojoType="dijit.layout.TabContainer">
-
- <div dojoType="dijit.layout.ContentPane" class='oils-acq-detail-content-pane' title="Summary" selected='true'>
- <script type='dojo/connect' event='onShow'>loadFSGrid();</script>
-
- <div dojoType="dijit.layout.ContentPane" layoutAlign="top">
- <div dojoType="dijit.layout.ContentPane" layoutAlign="client" style='height:600px;'>
- <table jsId="fundingSourceGrid" dojoType="dojox.grid.DataGrid" query="{id: '*'}" rowSelector='20px'>
- <thead>
- <tr>
- <th field="id">ID</th>
- <th field="name" width='auto'>Name</th>
- <th field="code">Code</th>
- <th field="balance" get='getSummaryInfo'>Balance</th>
- <th field="credit_total" get='getSummaryInfo'>Total Credits</th>
- <th field="allocation_total" get='getSummaryInfo'>Total Debits</th>
- <th field="currency_type">Currency Type</th>
- <th field="owner" width='auto' get='getOrgInfo'>Owner</th>
- </tr>
- </thead>
- </table>
- </div>
- </div>
- </div>
-
- <div dojoType="dijit.layout.ContentPane" class='oils-acq-detail-content-pane' title="Credits">
- <script type='dojo/connect' event='onShow'>loadCreditGrid(); </script>
-
- <div dojoType="dijit.layout.ContentPane" layoutAlign="top">
- <div dojoType="dijit.layout.ContentPane" layoutAlign="client">
-
- <table
- jsId="fsCreditGrid"
- autoheight="true"
- dojoType="openils.widget.AutoGrid"
- fieldOrder="['amount', 'effective_date', 'deadline_date', 'note']"
- suppressFields="['id', 'funding_source']"
- defaultCellWidth='"auto"'
- fmClass="acqfscred"
- query="{id: '*'}"
- showPaginator='true'>
- </table>
- </div>
- </div>
- </div>
-
- <!-- Fund Allocations -->
- <div dojoType="dijit.layout.ContentPane" class='oils-acq-detail-content-pane' title="Allocations">
- <script type='dojo/connect' event='onShow'>loadAllocationGrid();</script>
-
- <div dojoType="dijit.layout.ContentPane" layoutAlign="top">
- <div dojoType="dijit.layout.ContentPane" layoutAlign="client">
-
- <table
- jsId="fsAllocationGrid"
- autoHeight='true'
- dojoType="openils.widget.AutoGrid"
- fieldOrder="['fund', 'amount', 'create_time', 'allocator', 'note']"
- suppressFields="['id', 'funding_source']"
- defaultCellWidth='"auto"'
- fmClass="acqfa"
- query="{id: '*'}"
- showPaginator='true'>
-
- <thead>
- <tr>
- <th field='fund' get='getFund' formatter='formatFund'/>
- </tr>
- </thead>
- </table>
- </div>
- </div>
- </div>
-
- </div>
-</div>
-
-<!-- load the page-specific JS -->
-<script type="text/javascript" src='[% ctx.media_prefix %]/js/ui/default/acq/financial/view_funding_source.js'> </script>
-
-[% END %]
-
+++ /dev/null
-[% WRAPPER base.tt2 %]
-<script type="text/javascript">var providerId = [% ctx.page_args.0 %]</script>
-
-<div dojoType="dijit.layout.ContentPane" layoutAlign="top">
- <div dojoType="dijit.layout.TabContainer">
-
- <div dojoType="dijit.layout.ContentPane"
- class='oils-acq-detail-content-pane' title="Summary" selected='true' style='height:400px;'>
- <div dojoType="dijit.layout.ContentPane" layoutAlign="top">
- <div dojoType="dijit.layout.ContentPane" layoutAlign="client" style='height:600px;'>
- <table jsId="providerGrid" dojoType="dojox.grid.DataGrid" query="{id: '*'}" rowSelector='20px'>
- <thead>
- <tr>
- <th field="id">ID</th>
- <th field="name" width='auto'>Name</th>
- <th field="code">Code</th>
- <th field="owner" get='getOrgInfo'>Owner</th>
- <th field="currency_type">Currency Type</th>
- </tr>
- </thead>
- </table>
- </div>
- </div>
- </div>
-
- <div dojoType="dijit.layout.ContentPane"
- class='oils-acq-detail-content-pane' title="Order Record Format" style='height:400px;'>
-
- <div class='oils-acq-actions-div' style='margin:8px;'>
-
- <!--
- Dropdown menu for creating a new order record data type
- -->
- <div dojoType="dijit.form.DropDownButton">
- <span>Create Order Record Field</span>
- <div dojoType="dijit.TooltipDialog" execute="createOrderRecordField(arguments[0]);">
- <script type='dojo/connect' event='onOpen'>setORDesc();</script>
- <table class='dijitTooltipTable'>
- <tr>
- <td><label for="code">Code: </label></td>
- <td>
- <select id='oils-acq-provider-or-code' name="code" dojoType="dijit.form.ComboBox">
- <script type='dojo/connect' event='onChange'>setORDesc();</script>
- <option value='fund_code'>Fund Code</option>
- <option value='shelving_location'>Shelving Location</option>
- <option value='quantity'>Quantity</option>
- <option value='order_date'>Order Date</option>
- <option value='volume_count'>Volume Count </option>
- <option value='currency_type'>Currency Type</option>
- <option value='internal_notes'>Internal Notes </option>
- <option value='vendor_notes'>Vendor Notes</option>
- <option value='estimated_price'>Estimated Price</option>
- </select>
- </td>
- </tr>
- <tr>
- <td><label for="description">Description: </label></td>
- <td><input id='oils-acq-provider-or-desc' dojoType="dijit.form.TextBox" name="description"> </input></td>
- </tr>
- <tr>
- <td><label for="amount">Tag: </label></td>
- <td><input dojoType="dijit.form.TextBox" name="tag"></input></td>
- </tr>
- <tr>
- <td><label for="amount">Subfield: </label></td>
- <td><input dojoType="dijit.form.TextBox" name="subfield"></input></td>
- </tr>
- <tr>
- <td><label for="ident">Identifer Field?: </label></td>
- <td>
- <select dojoType="dijit.form.FilteringSelect" name="ident">
- <option value='f' selected='selected'>False</option>
- <option value='t'>True</option>
- </select>
- </td>
- </tr>
- <tr>
- <td><label for="amount">XPath (advanced): </label></td>
- <td><input dojoType="dijit.form.TextBox" name="xpath"></input></td>
- </tr>
- <tr>
- <td colspan='2' align='center'>
- <button dojoType='dijit.form.Button' type="submit">Apply</button>
- </td>
- </tr>
- </table>
- </div>
- </div>
-
- <!--
- Delete order record data types button
- -->
- <button dojoType="dijit.form.Button" onclick='deleteORDataFields();'>
- Delete Selected
- </button>
- </div>
-
- <script type='dojo/connect' event='onShow'>loadPADGrid();</script>
- <div dojoType="dijit.layout.ContentPane" layoutAlign="top">
- <div dojoType="dijit.layout.ContentPane" layoutAlign="client" style='height:600px;'>
- <table jsId="padGrid" dojoType="dojox.grid.DataGrid" query="{id: '*'}" rowSelector='20px'>
- <thead>
- <tr>
- <th field="id">ID</th>
- <th field="code" width='auto'>Code</th>
- <th field="description" width='auto'>Description</th>
- <th field="tag" get='getTag'>Tag</th>
- <th field="subfield" get='getSubfield'>Subfield</th>
- <th field="xpath" width='auto'>XPath</th>
- </tr>
- </thead>
- </table>
- </div>
- </div>
- </div>
-<script type="text/javascript" src='[% ctx.media_prefix %]/js/ui/default/acq/financial/view_provider.js'></script>
-[% END %]
-
--- /dev/null
+[% WRAPPER 'base.tt2' %]
+[% ctx.page_title = 'Funds' %]
+
+<!-- load the page-specific JS -->
+<script type="text/javascript">
+ function getFundName(rowIndex, item) {
+ if (!item) return null;
+ return {
+ "name": this.grid.store.getValue(item, "name"),
+ "id": this.grid.store.getValue(item, "id")
+ };
+ }
+
+ function formatName(value) {
+ if (!value) return ""; // XXX
+
+ var link = "<a href='/eg/acq/financial/view_fund/" +
+ value.id + "'>" +
+ value.name + "</a>";
+
+ /* TODO: add another element here to which we can attach a tooltip
+ showing tags */
+ return link;
+ }
+
+ function createNewFund() {
+ /* Set the display constraints before drawing the edit dialog;
+ introduce Y2K and Y2K2C problem */
+ lfGrid.overrideWidgetArgs = {year: { dijitArgs: {constraints : {min: 2000, max: 2200, pattern : '####'}}}};
+ lfGrid.showCreateDialog();
+ }
+
+</script>
+
+<table style='width:100%;'>
+ <tr>
+ <!-- TODO CSS -->
+ <td style='text-align:left;font-size:130%;font-weight: bold;'>Funds</td>
+ <td style='text-align:right;width:90%;'>
+
+ <button dojoType='dijit.form.Button' onClick='createNewFund()'>New Fund</button>
+ <button dojoType='dijit.form.Button' onClick='lfGrid.deleteSelected()'>Delete Selected</button>
+
+ <div dojoType="dijit.form.DropDownButton">
+ <span>Fund Propagation & Rollover</span>
+ <div dojoType="dijit.TooltipDialog" execute="performRollover(arguments[0]);">
+ <table class='dijitTooltipTable' id='oils-acq-rollover-tooltip-table'>
+ <tr>
+ <td colspan='2'>
+ <div style='width:400px;'>
+ Propagation creates new funds for the subsequent fiscal year based on the
+ funds for the selected fiscal year. Only funds with the propagate setting
+ enabled will be affected. No money or encumbrances are altered
+ during this process.
+ </div>
+ </td>
+ </tr>
+ <tr>
+ <td><label for="rollover">Perform Fiscal Year Close-out Operation: </label></td>
+ <td>
+ <input dojoType="dijit.form.CheckBox" name="rollover"> </input>
+ </td>
+ </tr>
+ <tr>
+ <td colspan='2'>
+ <div style='width:400px;'>
+ The year end close out operation moves encumbrances from the selected fiscal
+ year to the analogous funds in the subsequent fiscal year and it deactivates
+ funds for the selected fiscal year. Additionally, for all funds that have
+ the "Rollover" setting enabled, this process will move all unspent money to
+ the analogous fund in the subsequent fiscal year.
+ </div>
+ </td>
+ </tr>
+ <tr>
+ <td>Context Org Unit:</td>
+ <td><span id='oils-acq-rollover-ctxt-org'></span></td>
+ </tr>
+ <tr>
+ <td>Include Funds for Descendant Org Units:</td>
+ <td><input dojoType=dijit.form.CheckBox name='child_orgs'/></td>
+ </tr>
+ <tr>
+ <td><label for="dry_run">Dry Run: </label></td>
+ <td>
+ <input dojoType="dijit.form.CheckBox" name="dry_run" checked='checked'> </input>
+ </td>
+ </tr>
+ <tr>
+ <td colspan='2'>
+ <div style='width:400px;'>
+ When Dry Run is selected, the system will generate a summary of
+ the changes that would occur during the selected operation(s).
+ No data will be changed.
+ </div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan='2' align='center'>
+ <button dojoType=dijit.form.Button type="submit">Process</button>
+ </td>
+ </tr>
+ </table>
+ </div>
+ </div>
+ </td>
+ </tr>
+</table>
+
+<div class="oils-acq-basic-roomy">
+ <span>Context Org Unit</span>
+ <select
+ dojoType="openils.widget.OrgUnitFilteringSelect"
+ jsId="contextOrgSelector"
+ searchAttr="shortname"
+ labelAttr="shortname">
+ </select>
+
+ <span>Year</span>
+ <select dojoType="dijit.form.FilteringSelect"
+ jsId="fundFilterYearSelect"
+ labelAttr="year"
+ searchAttr="year">
+ </select>
+
+ <div dojoType='dijit.form.Button' jsId='refreshButton'>Refresh</div>
+</div>
+
+<div dojoType="dijit.layout.ContentPane" layoutAlign="client">
+ <div id='acq-fund-list-rollover-summary-wrapper'>
+ <div id='acq-fund-list-rollover-summary' class='hidden'>
+ <div id='acq-fund-list-rollover-summary-header'> </div>
+ <ul>
+ <li id='acq-fund-list-rollover-summary-dry-run'>These changes have <span class='oils-notify-text'>not</span> been committed yet.</li>
+ <li id='acq-fund-list-rollover-summary-funds'></li>
+ <li id='acq-fund-list-rollover-summary-rollover-amount'></li>
+ </ul>
+ </div>
+ </div>
+</div>
+
+<div dojoType="dijit.layout.ContentPane" layoutAlign="client">
+ <table jsId="lfGrid"
+ dojoType="openils.widget.AutoGrid"
+ fieldOrder="['id', 'name', 'code', 'year', 'org', 'currency_type', 'combined_balance']"
+ requiredFields="['name', 'code', 'year', 'org', 'currency_type']"
+ query="{id: '*'}"
+ defaultCellWidth='"auto"'
+ fmClass='acqf'
+ showPaginator='true'
+ editOnEnter='true'>
+ <thead>
+ <tr>
+ <th field="name" get="getFundName" formatter="formatName"></th>
+ <th field="combined_balance" name="Combined Balance" get="getBalanceInfo"></th>
+ </tr>
+ </thead>
+ </table>
+</div>
+<div dojoType="openils.widget.ProgressDialog" jsId="progressDialog"></div>
+<script type="text/javascript" src='[% ctx.media_prefix %]/js/ui/default/acq/financial/list_funds.js'> </script>
+[% END %]
--- /dev/null
+[% WRAPPER 'base.tt2' %]
+<script type="text/javascript"> var fundID = [% ctx.page_args.0 %] </script>
+
+<div id='oils-acq-list-header' class='container'>
+ <div id='oils-acq-list-header-label'>Fund Details</div>
+</div>
+
+<div class='oils-acq-actions-div' style='margin:8px;'> <!-- XXX CSS -->
+ <!-- Dropdown menu for creating a new funding source credit -->
+ <div dojoType="dijit.form.DropDownButton">
+ <span>Create Allocation</span>
+ <div dojoType="dijit.TooltipDialog" execute="createAllocation(arguments[0]);">
+ <script type='dojo/connect' event='onOpen'>
+ openils.acq.FundingSource.createStore(
+ function(store) {
+ fundingSourceSelector.store =
+ new dojo.data.ItemFileReadStore({data:store});
+ fundingSourceSelector.setValue(store.items[0].code);
+ },
+ 'MANAGE_FUNDING_SOURCE'
+ );
+ </script>
+ <table class='dijitTooltipTable'>
+ <tr>
+ <td><label for="amount">Funding Source: </label></td>
+ <td>
+ <input jsId='fundingSourceSelector' name="funding_source"
+ dojoType="dijit.form.FilteringSelect" searchAttr='code' labelAttr='code'>
+ </input>
+ </td>
+ </tr>
+ <tr>
+ <td><label for="amount">Amount: </label></td>
+ <td>
+ <input dojoType="dijit.form.CurrencyTextBox" name="amount"> </input>
+ </td>
+ </tr>
+
+ <!-- Percent-based allocations are not supported. Will implement or remove later.
+ <tr>
+ <td><label for="amount">Percent: </label></td>
+ <td>
+ <input
+ dojoType="dijit.form.NumberTextBox"
+ constraints="{min:0,max:100}"
+ promptMessage="Please enter an amount between 0 and 100"
+ name="percent">
+ </input>
+ </td>
+ </tr>
+ -->
+
+ <tr>
+ <td><label for="note">Note: </label></td>
+ <td>
+ <input dojoType="dijit.form.TextBox" name="note"> </input>
+ </td>
+ </tr>
+ <tr>
+ <td colspan='2' align='center'>
+ <button dojoType="dijit.form.Button" type="submit">Apply</button>
+ </td>
+ </tr>
+ </table>
+ </div>
+ </div>
+ <div dojoType="dijit.form.DropDownButton">
+ <span>Transfer Money</span>
+ <div jsId="xferDialog" dojoType="dijit.TooltipDialog">
+ <script type="dojo/connect" event="onOpen">
+ /* If a fund is selected (from a previous time that the
+ user popped open this dialog), unselect it. Wouldn't want to
+ accidentally encourage a transfer that the user didn't mean. */
+ xferManager.clearFundSelector();
+ xferManager.setFundName(fund);
+ </script>
+ <table id="oils-acq-fund-xfer-table">
+ <tr>
+ <th>
+ <label for="oils-acq-fund-xfer-o-amount">
+ Source amount<br />
+ <em>Amount to transfer from<br />
+ <span id="oils-acq-fund-xfer-name-fund"></span>
+ </em>
+ </label>
+ </th>
+ <td>
+ <input dojoType="dijit.form.CurrencyTextBox"
+ id="oils-acq-fund-xfer-o-amount"
+ name="o_amount" />
+ </td>
+ </tr>
+ <tr>
+ <th>
+ <label for="oils-acq-fund-xfer-d-selector">
+ Destination fund
+ </label>
+ </th>
+ <td>
+ <span id="oils-acq-fund-xfer-d-selector"></span>
+ </td>
+ </tr>
+ <tr id="oils-acq-fund-xfer-dest-amount" class="hidden">
+ <th>
+ <label for="oils-acq-fund-xfer-d-selector">
+ Destination amount
+ </label>
+ </th>
+ <td>
+ <div class="oils-acq-basic-roomy">
+ <input id="oils-acq-fund-xfer-same-o-d"
+ dojoType="dijit.form.CheckBox" checked="checked"
+ value="1" name="same_o_d" />
+ <label for="oils-acq-fund-xfer-same-o-d">
+ Same as source amount?
+ </label>
+ </div>
+ <div class="oils-acq-basic-roomy">
+ <input id="oils-acq-fund-xfer-d-amount"
+ dojoType="dijit.form.CurrencyTextBox"
+ name="d_amount" disabled="disabled" />
+ </div>
+ </td>
+ </tr>
+ <tr>
+ <th>
+ <label for="oils-acq-fund-xfer-note">Note</label>
+ </th>
+ <td>
+ <input dojoType="dijit.form.TextBox" name="note"
+ id="oils-acq-fund-xfer-note" />
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2" id="oils-acq-fund-xfer-submit-row">
+ <button onclick="xferManager.submit();"
+ dojoType="dijit.form.Button" type="submit">
+ Transfer
+ </button>
+ </td>
+ </tr>
+ </table>
+ </div>
+ </div>
+</div>
+
+
+<div dojoType="dijit.layout.ContentPane" layoutAlign="top">
+ <div dojoType="dijit.layout.TabContainer">
+
+ <!-- Fund Summary -->
+ <div dojoType="dijit.layout.ContentPane"
+ class='oils-acq-detail-content-pane' title="Summary" selected='true'>
+
+ <div dojoType="dijit.layout.ContentPane" layoutAlign="top">
+ <div dojoType="dijit.layout.ContentPane" layoutAlign="client" style='height:600px;'>
+ <table jsId="fundGrid" dojoType="dojox.grid.DataGrid" query="{id: '*'}" rowSelector='20px'>
+ <thead>
+ <tr>
+ <th field="id">ID</th>
+ <th field="name">Name</th>
+ <th field="code">Code</th>
+ <th field="currency_type">Currency Type</th>
+ <th field="org" get='getOrgInfo'>Owner</th>
+ <th field="combined_balance" get='getSummaryInfo'>Balance</th>
+ <th field="allocation_total" get='getSummaryInfo'>Total Allocated</th>
+ <th field="spent_balance" get='getSummaryInfo'>Spent Balance</th>
+ <th field="debit_total" get='getSummaryInfo'>Total Debits</th>
+ <th field="spent_total" get='getSummaryInfo'>Total Spent</th>
+ <th field="encumbrance_total" get='getSummaryInfo'>Total Encumbered</th>
+ </tr>
+ </thead>
+ </table>
+ </div>
+ </div>
+ </div>
+
+ <!-- Fund Allocations -->
+ <div dojoType="dijit.layout.ContentPane" class='oils-acq-detail-content-pane' title="Allocations">
+ <script type='dojo/connect' event='onShow'>loadAllocationGrid();</script>
+
+ <div dojoType="dijit.layout.ContentPane" layoutAlign="top">
+ <div dojoType="dijit.layout.ContentPane" layoutAlign="client">
+
+ <table
+ jsId="fundAllocationGrid"
+ autoHeight='true'
+ dojoType="openils.widget.AutoGrid"
+ fieldOrder="['funding_source', 'amount', 'create_time', 'allocator', 'note']"
+ suppressFields="['id', 'fund']"
+ defaultCellWidth='"auto"'
+ fmClass="acqfa"
+ query="{id: '*'}"
+ showPaginator='true'>
+
+ <thead>
+ <tr>
+ <th field='funding_source' get='getFundingSource' formatter='formatFundingSource'/>
+ </tr>
+ </thead>
+ </table>
+ </div>
+ </div>
+ </div>
+
+ <!--- Fund Debits -->
+ <div dojoType="dijit.layout.ContentPane" class='oils-acq-detail-content-pane' title="Debits">
+ <script type='dojo/connect' event='onShow'>loadDebitGrid();</script>
+
+ <div dojoType="dijit.layout.ContentPane" layoutAlign="top" style='height:600px;'>
+ <button dojoType="dijit.form.Button" onClick="fundDebitGrid.refresh();">Refresh Grid</button>
+ <div dojoType="dijit.layout.ContentPane" layoutAlign="client">
+
+ <table
+ jsId="fundDebitGrid"
+ autoHeight='true'
+ dojoType="openils.widget.AutoGrid"
+ fieldOrder="['amount', 'encumbrance', 'debit_type', 'origin_amount', 'origin_currency_type']"
+ suppressFields="['id', 'fund']"
+ defaultCellWidth='"auto"'
+ fmClass="acqfdeb"
+ query="{id: '*'}"
+ showPaginator='true'>
+ </table>
+ </div>
+ </div>
+ </div>
+
+ <div dojoType="dijit.layout.ContentPane" class="oils-acq-detail-content-pane" title="Tags">
+ <script type="dojo/connect" event="onShow">
+ tagManager.displayFund(fund);
+ </script>
+ <div id="oils-acq-tag-manager-display"></div>
+ <div id="oils-acq-tag-manager-add">
+ <div dojoType="dijit.form.DropDownButton">
+ <span>Add Tag</span>
+ <div dojoType="dijit.TooltipDialog">
+ <select dojoType="dijit.form.FilteringSelect"
+ jsId="tagSelector">
+ </select>
+ <button onclick="tagManager.addMapping(
+ fund, new acqft().fromStoreItem(tagSelector.item)
+ );" type="submit" dojoType="dijit.form.Button">
+ Add
+ </button>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+</div>
+
+<!-- load the page-specific JS -->
+<script type="text/javascript" src="[% ctx.media_prefix %]/js/ui/default/acq/common/tag_manager.js"></script>
+<script type="text/javascript" src='[% ctx.media_prefix %]/js/ui/default/acq/financial/view_fund.js'></script>
+
+[% END %]
--- /dev/null
+[% WRAPPER 'base.tt2' %]
+
+<!-- The main grid lives here -->
+<script type="text/javascript">
+ function getName(rowIndex, item) {
+ if(!item) return '';
+ var name = this.grid.store.getValue(item, 'name');
+ var id = this.grid.store.getValue(item, 'id');
+ // weird hack to pass the data we need to the formatter which is now required for HTML cell values
+ return id + ':' + name;
+ }
+
+ function formatName(value) {
+ if(value) {
+ var vals = value.split(/:/);
+ return '<a href="[% ctx.base_path %]/acq/funding_source/view/'+vals[0]+'">'+vals[1]+'</a>';
+ }
+ }
+</script>
+
+<div dojoType="dijit.layout.ContentPane" layoutAlign="client">
+
+ <div dojoType="dijit.layout.ContentPane" layoutAlign="top" class='oils-header-panel'>
+ <div>Funding Sources</div>
+ <div>
+ <button dojoType='dijit.form.Button' onClick='fsGrid.showCreateDialog()'>New Funding Source</button>
+ <button dojoType='dijit.form.Button' onClick='fsGrid.deleteSelected()'>Delete Selected</button>
+ </div>
+ </div>
+
+ <table jsId="fsGrid"
+ dojoType="openils.widget.AutoGrid"
+ fieldOrder="['id', 'name', 'owner', 'code', 'currency_type', 'balance']"
+ query="{name: '*'}"
+ defaultCellWidth='"auto"'
+ fmClass='acqfs'
+ editOnEnter='true'>
+ <thead>
+ <tr>
+ <th field="name" get='getName' formatter='formatName'/>
+ <th field="owner" get='getOrgInfo'/>
+ <th field="balance" get='getBalanceInfo'/>
+ </tr>
+ </thead>
+ </table>
+</div>
+
+<!-- load the page-specific JS -->
+<script type="text/javascript" src='[% ctx.media_prefix %]/js/ui/default/acq/financial/list_funding_sources.js'></script>
+
+[% END %]
--- /dev/null
+[% WRAPPER 'base.tt2' %]
+<script type="text/javascript"> var fundingSourceID = [% ctx.page_args.0 %]; </script>
+
+<div id='oils-acq-list-header' class='container'>
+ <div id='oils-acq-list-header-label'>Funding Source Details</div>
+</div>
+
+<div class='oils-acq-actions-div' style='margin:8px;'> <!-- XXX CSS -->
+
+ <!-- Dropdown menu for creating a new funding source credit -->
+ <div dojoType="dijit.form.DropDownButton">
+ <span>Apply Credit</span>
+ <div dojoType="dijit.TooltipDialog" execute="applyFSCredit(arguments[0]);">
+ <table class='dijitTooltipTable'>
+ <tr>
+ <td><label for="amount">Amount: </label></td>
+ <td>
+ <input dojoType="dijit.form.CurrencyTextBox" name="amount"> </input>
+ </td>
+ </tr>
+ <tr>
+ <td><label for="note">Note: </label></td>
+ <td>
+ <input dojoType="dijit.form.TextBox" name="note"> </input>
+ </td>
+ </tr>
+ <tr>
+ <td colspan='2' align='center'>
+ <button dojoType=dijit.form.Button type="submit">Apply</button>
+ </td>
+ </tr>
+ </table>
+ </div>
+ </div>
+ <div dojoType="dijit.form.DropDownButton">
+ <span>Allocate to Fund</span>
+ <div dojoType="dijit.TooltipDialog" execute="applyFSAllocation(arguments[0]);">
+ <script type='dojo/connect' event='onOpen'>
+ openils.acq.Fund.createStore(
+ function(store) {
+ fundingSourceFundSelector.store =
+ new dojo.data.ItemFileReadStore({data:store});
+ fundingSourceFundSelector.setValue(store.items[0].code);
+ }, 'MANAGE_FUND'
+ );
+ </script>
+ <table class='dijitTooltipTable'>
+ <tr>
+ <td><label for="amount">Fund: </label></td>
+ <td>
+ <input jsId='fundingSourceFundSelector' name="fund"
+ dojoType="dijit.form.FilteringSelect" searchAttr='code' labelAttr='code'>
+ </input>
+ </td>
+ </tr>
+ <tr>
+ <td><label for="amount">Amount: </label></td>
+ <td>
+ <input dojoType="dijit.form.CurrencyTextBox" name="amount"> </input>
+ </td>
+ </tr>
+ <!-- Percent-based allocations are not supported. Will implement or remove later.
+ <tr>
+ <td><label for="amount">Percent: </label></td>
+ <td>
+ <input
+ dojoType="dijit.form.NumberTextBox"
+ constraints="{min:0,max:100}"
+ promptMessage="Please enter an amount between 0 and 100"
+ name="percent">
+ </input>
+ </td>
+ </tr>
+ -->
+ <tr>
+ <td><label for="note">Note: </label></td>
+ <td>
+ <input dojoType="dijit.form.TextBox" name="note"> </input>
+ </td>
+ </tr>
+ <tr>
+ <td colspan='2' align='center'>
+ <button dojoType=dijit.form.Button type="submit">Apply</button>
+ </td>
+ </tr>
+ </table>
+ </div>
+ </div>
+</div>
+
+<div dojoType="dijit.layout.ContentPane" layoutAlign="top">
+ <div dojoType="dijit.layout.TabContainer">
+
+ <div dojoType="dijit.layout.ContentPane" class='oils-acq-detail-content-pane' title="Summary" selected='true'>
+ <script type='dojo/connect' event='onShow'>loadFSGrid();</script>
+
+ <div dojoType="dijit.layout.ContentPane" layoutAlign="top">
+ <div dojoType="dijit.layout.ContentPane" layoutAlign="client" style='height:600px;'>
+ <table jsId="fundingSourceGrid" dojoType="dojox.grid.DataGrid" query="{id: '*'}" rowSelector='20px'>
+ <thead>
+ <tr>
+ <th field="id">ID</th>
+ <th field="name" width='auto'>Name</th>
+ <th field="code">Code</th>
+ <th field="balance" get='getSummaryInfo'>Balance</th>
+ <th field="credit_total" get='getSummaryInfo'>Total Credits</th>
+ <th field="allocation_total" get='getSummaryInfo'>Total Debits</th>
+ <th field="currency_type">Currency Type</th>
+ <th field="owner" width='auto' get='getOrgInfo'>Owner</th>
+ </tr>
+ </thead>
+ </table>
+ </div>
+ </div>
+ </div>
+
+ <div dojoType="dijit.layout.ContentPane" class='oils-acq-detail-content-pane' title="Credits">
+ <script type='dojo/connect' event='onShow'>loadCreditGrid(); </script>
+
+ <div dojoType="dijit.layout.ContentPane" layoutAlign="top">
+ <div dojoType="dijit.layout.ContentPane" layoutAlign="client">
+
+ <table
+ jsId="fsCreditGrid"
+ autoheight="true"
+ dojoType="openils.widget.AutoGrid"
+ fieldOrder="['amount', 'effective_date', 'deadline_date', 'note']"
+ suppressFields="['id', 'funding_source']"
+ defaultCellWidth='"auto"'
+ fmClass="acqfscred"
+ query="{id: '*'}"
+ showPaginator='true'>
+ </table>
+ </div>
+ </div>
+ </div>
+
+ <!-- Fund Allocations -->
+ <div dojoType="dijit.layout.ContentPane" class='oils-acq-detail-content-pane' title="Allocations">
+ <script type='dojo/connect' event='onShow'>loadAllocationGrid();</script>
+
+ <div dojoType="dijit.layout.ContentPane" layoutAlign="top">
+ <div dojoType="dijit.layout.ContentPane" layoutAlign="client">
+
+ <table
+ jsId="fsAllocationGrid"
+ autoHeight='true'
+ dojoType="openils.widget.AutoGrid"
+ fieldOrder="['fund', 'amount', 'create_time', 'allocator', 'note']"
+ suppressFields="['id', 'funding_source']"
+ defaultCellWidth='"auto"'
+ fmClass="acqfa"
+ query="{id: '*'}"
+ showPaginator='true'>
+
+ <thead>
+ <tr>
+ <th field='fund' get='getFund' formatter='formatFund'/>
+ </tr>
+ </thead>
+ </table>
+ </div>
+ </div>
+ </div>
+
+ </div>
+</div>
+
+<!-- load the page-specific JS -->
+<script type="text/javascript" src='[% ctx.media_prefix %]/js/ui/default/acq/financial/view_funding_source.js'> </script>
+
+[% END %]
+