3 [% INCLUDE 'doc-head-open.inc' %]
4 <title>Koha › Acquisitions</title>
5 [% INCLUDE 'doc-head-close.inc' %]
6 <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" />
7 [% INCLUDE 'datatables.inc' %]
8 <link href="[% interface %]/lib/jquery/plugins/treetable/stylesheets/jquery.treetable.css" rel="stylesheet" type="text/css" />
9 <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/treetable/jquery.treetable.js"></script>
11 <script type="text/javascript">
14 dt_overwrite_html_sorting_localeCompare();
16 $(document).ready(function() {
18 var oTable = $("#accounts").dataTable($.extend(true, {}, dataTablesDefaults, {
19 "fnDrawCallback": function ( oSettings ) {
20 if ( oSettings.aiDisplay.length == 0 )
25 var nTrs = $('#accounts tbody tr');
26 var iColspan = nTrs[0].getElementsByTagName('td').length;
28 for ( var i=0 ; i<nTrs.length ; i++ )
30 var iDisplayIndex = oSettings._iDisplayStart + i;
31 var sGroup = oSettings.aoData[ oSettings.aiDisplay[iDisplayIndex] ]._aData[1];
32 if ( sGroup != sLastGroup )
34 var nGroup = document.createElement( 'tr' );
35 var nCell = document.createElement( 'td' );
36 nCell.colSpan = iColspan;
37 nCell.className = "group";
38 nCell.innerHTML = sGroup;
39 nGroup.appendChild( nCell );
40 nTrs[i].parentNode.insertBefore( nGroup, nTrs[i] );
45 "footerCallback": function ( row, data, start, end, display ) {
46 var api = this.api(), data;
47 footer_column_sum( api, [ 6, 7, 8, 9 ] );
50 { "bVisible": false, "aTargets": [ 0, 1 ] },
51 { "bSortable": false, "aTargets": ["_all"] }
53 'dom': '<"top pager"ilpf>tr<"bottom pager"ip>',
55 'aaSortingFixed': [[ 1, 'asc' ]],
63 $(oTable).treetable('expandAll');
64 $("#expand_all").click(function(e){
66 $(oTable).treetable('expandAll');
68 $("#collapse_all").click(function(e){
70 $(oTable).treetable('collapseAll');
73 $("#hide_inactive").click(function(e){
75 oTable.fnFilter( 1, 0 ); // Show only active=1
77 $("#show_inactive").click(function(e){
79 oTable.fnFilter( '', 0 );
81 $("#hide_inactive").click();
88 <body id="acq_acqui-home" class="acq">
89 [% INCLUDE 'header.inc' %]
90 [% INCLUDE 'acquisitions-search.inc' %]
92 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › Acquisitions</div>
94 <div id="doc3" class="yui-t2">
100 [% INCLUDE 'acquisitions-toolbar.inc' %]
102 <h1>Acquisitions</h1>
103 [% INCLUDE 'budgets-active-currency.inc' hide = 'yes' %]
104 [% UNLESS ( loop_budget ) %]
105 [% IF ( CAN_user_acquisition_period_manage ) %]
106 <div class="dialog alert"><a href="/cgi-bin/koha/admin/aqbudgetperiods.pl">You must define a budget in Administration</a></div>
108 <div class="dialog alert">Your administrator must define a budget in Administration</div>
112 <div class="yui-u first">
113 <div id="acqui_acqui_home_order">
115 <legend>Manage orders</legend>
116 <form name="findsupplier" action="/cgi-bin/koha/acqui/booksellers.pl" method="post">
117 <p><label for="supplierpage">Vendor: </label><input type="text" size="25" name="supplier" id="supplierpage" class="focus" />
118 <input type="submit" value="Search" />
125 [% IF ( suggestion && suggestions_count ) %]
127 <div id="acqui_acqui_home_suggestions">
129 <legend>Pending suggestions</legend>
130 <p>[% suggestions_count %] suggestions waiting. <a href="/cgi-bin/koha/suggestion/suggestion.pl#ASKED">Manage suggestions</a>.</p>
138 [% IF ( loop_budget ) %]
140 <h3>All available funds[% IF LoginBranchname %] for [% LoginBranchname %][% END %]</h3>
142 <div id="BudgetsAndFunds">
143 <table id="accounts">
145 <span class="actions"><a href="#" id="expand_all">Expand all</a>
146 | <a href="#" id="collapse_all">Collapse all</a>
147 | <a href="#" id="hide_inactive">Hide inactive budgets</a>
148 | <a href="#" id="show_inactive">Show inactive budgets</a></span>
154 <th>Budget period description</th>
162 <th>Total available</th>
165 <tfoot id="funds_total">
169 <th colspan="4">Total</th>
170 <th class="data"></th>
171 <th class="data"></th>
172 <th class="data"></th>
173 <th class="data"></th>
177 [% FOREACH loop_budge IN loop_budget %]
178 [% IF loop_budge.budget_parent_id %]
179 <tr data-tt-id="[% loop_budge.budget_id %]" data-tt-parent-id="[% loop_budge.budget_parent_id %]">
181 <tr data-tt-id="[% loop_budge.budget_id %]">
184 <td>[% loop_budge.budget_period_active %]</td>
185 <td>Budget [% loop_budge.budget_period_description %] [id=[% loop_budge.budget_period_id %]][% UNLESS loop_budge.budget_period_active %] (inactive)[% END %]</td>
187 [% IF ( CAN_user_acquisition_budget_manage ) %]
188 <a href="/cgi-bin/koha/admin/aqbudgets.pl?budget_period_id=[% loop_budge.budget_period_id %]">[% loop_budge.budget_code %]</a>
190 [% loop_budge.budget_code %]
193 <td>[% loop_budge.budget_name %]</td>
194 <td>[% IF ( loop_budge.budget_owner_borrowernumber ) %]
195 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% loop_budge.budget_owner_borrowernumber %]">[% loop_budge.budget_owner_surname %], [% loop_budge.budget_owner_firstname %]</a>
200 <td>[% Branches.GetName( loop_budge.budget_branchcode ) %]</td>
202 [% IF loop_budge.budget_parent_id %]
203 [% loop_budge.budget_amount | $Price %]
205 <span class="total_amount">[% loop_budge.budget_amount | $Price %]</span>
209 <a href="ordered.pl?fund=[% loop_budge.budget_id %]&fund_code=[% loop_budge.budget_code %]">
210 [% IF loop_budge.budget_parent_id %]
211 [% loop_budge.budget_ordered | $Price %]
213 <span class="total_amount">[% loop_budge.budget_ordered | $Price %]</span>
218 <a href="spent.pl?fund=[% loop_budge.budget_id %]&fund_code=[% loop_budge.budget_code %]">
219 [% IF loop_budge.budget_parent_id %]
220 [% loop_budge.budget_spent | $Price %]
222 <span class="total_amount">[% loop_budge.budget_spent | $Price %]</span>
227 [% IF loop_budge.budget_parent_id %]
228 [% loop_budge.budget_avail | $Price %]
230 <span class="total_amount">[% loop_budge.budget_avail | $Price %]</span>
243 [% INCLUDE 'acquisitions-menu.inc' %]
246 [% INCLUDE 'intranet-bottom.inc' %]