5 [% INCLUDE 'doc-head-open.inc' %]
6 <title>Koha › Acquisitions</title>
7 [% INCLUDE 'doc-head-close.inc' %]
8 [% Asset.css("css/datatables.css") %]
9 [% Asset.css("lib/jquery/plugins/treetable/stylesheets/jquery.treetable.css") %]
12 <body id="acq_acqui-home" class="acq">
13 [% INCLUDE 'header.inc' %]
14 [% INCLUDE 'acquisitions-search.inc' %]
16 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › Acquisitions</div>
18 <div id="doc3" class="yui-t2">
24 [% INCLUDE 'acquisitions-toolbar.inc' %]
27 [% INCLUDE 'budgets-active-currency.inc' hide = 'yes' %]
28 [% UNLESS ( loop_budget ) %]
29 [% IF ( CAN_user_acquisition_period_manage ) %]
30 <div class="dialog alert"><a href="/cgi-bin/koha/admin/aqbudgetperiods.pl">You must define a budget in Administration</a></div>
32 <div class="dialog alert">Your administrator must define a budget in Administration</div>
36 <div class="yui-u first">
37 <div id="acqui_acqui_home_order">
39 <legend>Manage orders</legend>
40 <form name="findsupplier" action="/cgi-bin/koha/acqui/booksellers.pl" method="post">
41 <p><label for="supplierpage">Vendor: </label><input type="text" size="25" name="supplier" id="supplierpage" class="focus" />
42 <input type="submit" value="Search" />
49 [% IF ( suggestion && suggestions_count ) %]
51 <div id="acqui_acqui_home_suggestions">
53 <legend>Pending suggestions</legend>
54 <p>[% suggestions_count %] suggestions waiting. <a href="/cgi-bin/koha/suggestion/suggestion.pl#ASKED">Manage suggestions</a>.</p>
62 [% IF ( loop_budget ) %]
64 <h3>All available funds[% IF LoginBranchname %] for [% LoginBranchname %][% END %]</h3>
66 <div id="BudgetsAndFunds">
69 <span class="actions"><a href="#" id="expand_all">Expand all</a>
70 | <a href="#" id="collapse_all">Collapse all</a>
71 | <a href="#" id="hide_inactive">Hide inactive budgets</a>
72 | <a href="#" id="show_inactive">Show inactive budgets</a></span>
78 <th>Budget period description</th>
86 <th>Total available</th>
89 <tfoot id="funds_total">
93 <th colspan="4">Total</th>
94 <th class="data"></th>
95 <th class="data"></th>
96 <th class="data"></th>
97 <th class="data"></th>
101 [% FOREACH loop_budge IN loop_budget %]
102 [% IF loop_budge.budget_parent_id %]
103 <tr data-tt-id="[% loop_budge.budget_id %]" data-tt-parent-id="[% loop_budge.budget_parent_id %]">
105 <tr data-tt-id="[% loop_budge.budget_id %]">
108 <td>[% loop_budge.budget_period_active %]</td>
109 <td>Budget [% loop_budge.budget_period_description %] [id=[% loop_budge.budget_period_id %]][% UNLESS loop_budge.budget_period_active %] (inactive)[% END %]</td>
111 [% IF ( CAN_user_acquisition_budget_manage ) %]
112 <a href="/cgi-bin/koha/admin/aqbudgets.pl?budget_period_id=[% loop_budge.budget_period_id %]">[% loop_budge.budget_code %]</a>
114 [% loop_budge.budget_code %]
117 <td>[% loop_budge.budget_name %]</td>
118 <td>[% IF ( loop_budge.budget_owner ) %]
119 <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>
124 <td>[% Branches.GetName( loop_budge.budget_branchcode ) %]</td>
126 [% IF loop_budge.budget_parent_id %]
127 [% loop_budge.budget_amount | $Price %]
129 <span class="total_amount">[% loop_budge.budget_amount | $Price %]</span>
133 <a href="ordered.pl?fund=[% loop_budge.budget_id %]&fund_code=[% loop_budge.budget_code %]">
134 [% IF loop_budge.budget_parent_id %]
135 [% loop_budge.budget_ordered | $Price %]
137 <span class="total_amount">[% loop_budge.budget_ordered | $Price %]</span>
142 <a href="spent.pl?fund=[% loop_budge.budget_id %]&fund_code=[% loop_budge.budget_code %]">
143 [% IF loop_budge.budget_parent_id %]
144 [% loop_budge.budget_spent | $Price %]
146 <span class="total_amount">[% loop_budge.budget_spent | $Price %]</span>
151 [% IF loop_budge.budget_parent_id %]
152 [% loop_budge.budget_avail | $Price %]
154 <span class="total_amount">[% loop_budge.budget_avail | $Price %]</span>
167 [% INCLUDE 'acquisitions-menu.inc' %]
171 [% MACRO jsinclude BLOCK %]
172 [% INCLUDE 'datatables.inc' %]
173 [% Asset.js("lib/jquery/plugins/treetable/jquery.treetable.js") %]
174 [% Asset.js("js/acquisitions-menu.js") %]
175 <script type="text/javascript">
176 dt_overwrite_html_sorting_localeCompare();
178 $(document).ready(function() {
180 var oTable = $("#accounts").dataTable($.extend(true, {}, dataTablesDefaults, {
181 "fnDrawCallback": function ( oSettings ) {
182 if ( oSettings.aiDisplay.length == 0 )
187 var nTrs = $('#accounts tbody tr');
188 var iColspan = nTrs[0].getElementsByTagName('td').length;
190 for ( var i=0 ; i<nTrs.length ; i++ )
192 var iDisplayIndex = oSettings._iDisplayStart + i;
193 var sGroup = oSettings.aoData[ oSettings.aiDisplay[iDisplayIndex] ]._aData[1];
194 if ( sGroup != sLastGroup )
196 var nGroup = document.createElement( 'tr' );
197 var nCell = document.createElement( 'td' );
198 nCell.colSpan = iColspan;
199 nCell.className = "group";
200 nCell.innerHTML = sGroup;
201 nGroup.appendChild( nCell );
202 nTrs[i].parentNode.insertBefore( nGroup, nTrs[i] );
207 "footerCallback": function ( row, data, start, end, display ) {
208 var api = this.api(), data;
209 footer_column_sum( api, [ 6, 7, 8, 9 ] );
212 { "bVisible": false, "aTargets": [ 0, 1 ] },
213 { "bSortable": false, "aTargets": ["_all"] }
215 'dom': '<"top pager"ilpf>tr<"bottom pager"ip>',
217 'aaSortingFixed': [[ 1, 'asc' ]],
222 $(oTable).treetable({
225 $(oTable).treetable('expandAll');
226 $("#expand_all").click(function(e){
228 $(oTable).treetable('expandAll');
230 $("#collapse_all").click(function(e){
232 $(oTable).treetable('collapseAll');
235 $("#hide_inactive").click(function(e){
237 oTable.fnFilter( 1, 0 ); // Show only active=1
239 $("#show_inactive").click(function(e){
241 oTable.fnFilter( '', 0 );
243 $("#hide_inactive").click();
249 [% INCLUDE 'intranet-bottom.inc' %]