4 [% INCLUDE 'doc-head-open.inc' %]
5 <title>Koha › Acquisitions</title>
6 [% INCLUDE 'doc-head-close.inc' %]
7 <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" />
8 <link href="[% interface %]/lib/jquery/plugins/treetable/stylesheets/jquery.treetable.css" rel="stylesheet" type="text/css" />
11 <body id="acq_acqui-home" class="acq">
12 [% INCLUDE 'header.inc' %]
13 [% INCLUDE 'acquisitions-search.inc' %]
15 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › Acquisitions</div>
17 <div id="doc3" class="yui-t2">
23 [% INCLUDE 'acquisitions-toolbar.inc' %]
26 [% INCLUDE 'budgets-active-currency.inc' hide = 'yes' %]
27 [% UNLESS ( loop_budget ) %]
28 [% IF ( CAN_user_acquisition_period_manage ) %]
29 <div class="dialog alert"><a href="/cgi-bin/koha/admin/aqbudgetperiods.pl">You must define a budget in Administration</a></div>
31 <div class="dialog alert">Your administrator must define a budget in Administration</div>
35 <div class="yui-u first">
36 <div id="acqui_acqui_home_order">
38 <legend>Manage orders</legend>
39 <form name="findsupplier" action="/cgi-bin/koha/acqui/booksellers.pl" method="post">
40 <p><label for="supplierpage">Vendor: </label><input type="text" size="25" name="supplier" id="supplierpage" class="focus" />
41 <input type="submit" value="Search" />
48 [% IF ( suggestion && suggestions_count ) %]
50 <div id="acqui_acqui_home_suggestions">
52 <legend>Pending suggestions</legend>
53 <p>[% suggestions_count %] suggestions waiting. <a href="/cgi-bin/koha/suggestion/suggestion.pl#ASKED">Manage suggestions</a>.</p>
61 [% IF ( loop_budget ) %]
63 <h3>All available funds[% IF LoginBranchname %] for [% LoginBranchname %][% END %]</h3>
65 <div id="BudgetsAndFunds">
68 <span class="actions"><a href="#" id="expand_all">Expand all</a>
69 | <a href="#" id="collapse_all">Collapse all</a>
70 | <a href="#" id="hide_inactive">Hide inactive budgets</a>
71 | <a href="#" id="show_inactive">Show inactive budgets</a></span>
77 <th>Budget period description</th>
85 <th>Total available</th>
88 <tfoot id="funds_total">
92 <th colspan="4">Total</th>
93 <th class="data"></th>
94 <th class="data"></th>
95 <th class="data"></th>
96 <th class="data"></th>
100 [% FOREACH loop_budge IN loop_budget %]
101 [% IF loop_budge.budget_parent_id %]
102 <tr data-tt-id="[% loop_budge.budget_id %]" data-tt-parent-id="[% loop_budge.budget_parent_id %]">
104 <tr data-tt-id="[% loop_budge.budget_id %]">
107 <td>[% loop_budge.budget_period_active %]</td>
108 <td>Budget [% loop_budge.budget_period_description %] [id=[% loop_budge.budget_period_id %]][% UNLESS loop_budge.budget_period_active %] (inactive)[% END %]</td>
110 [% IF ( CAN_user_acquisition_budget_manage ) %]
111 <a href="/cgi-bin/koha/admin/aqbudgets.pl?budget_period_id=[% loop_budge.budget_period_id %]">[% loop_budge.budget_code %]</a>
113 [% loop_budge.budget_code %]
116 <td>[% loop_budge.budget_name %]</td>
117 <td>[% IF ( loop_budge.budget_owner_borrowernumber ) %]
118 <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>
123 <td>[% Branches.GetName( loop_budge.budget_branchcode ) %]</td>
125 [% IF loop_budge.budget_parent_id %]
126 [% loop_budge.budget_amount | $Price %]
128 <span class="total_amount">[% loop_budge.budget_amount | $Price %]</span>
132 <a href="ordered.pl?fund=[% loop_budge.budget_id %]&fund_code=[% loop_budge.budget_code %]">
133 [% IF loop_budge.budget_parent_id %]
134 [% loop_budge.budget_ordered | $Price %]
136 <span class="total_amount">[% loop_budge.budget_ordered | $Price %]</span>
141 <a href="spent.pl?fund=[% loop_budge.budget_id %]&fund_code=[% loop_budge.budget_code %]">
142 [% IF loop_budge.budget_parent_id %]
143 [% loop_budge.budget_spent | $Price %]
145 <span class="total_amount">[% loop_budge.budget_spent | $Price %]</span>
150 [% IF loop_budge.budget_parent_id %]
151 [% loop_budge.budget_avail | $Price %]
153 <span class="total_amount">[% loop_budge.budget_avail | $Price %]</span>
166 [% INCLUDE 'acquisitions-menu.inc' %]
170 [% MACRO jsinclude BLOCK %]
171 [% INCLUDE 'datatables.inc' %]
172 <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/treetable/jquery.treetable.js"></script>
173 <script type="text/javascript" src="[% interface %]/[% theme %]/js/acquisitions-menu.js"></script>
174 <script type="text/javascript">
175 dt_overwrite_html_sorting_localeCompare();
177 $(document).ready(function() {
179 var oTable = $("#accounts").dataTable($.extend(true, {}, dataTablesDefaults, {
180 "fnDrawCallback": function ( oSettings ) {
181 if ( oSettings.aiDisplay.length == 0 )
186 var nTrs = $('#accounts tbody tr');
187 var iColspan = nTrs[0].getElementsByTagName('td').length;
189 for ( var i=0 ; i<nTrs.length ; i++ )
191 var iDisplayIndex = oSettings._iDisplayStart + i;
192 var sGroup = oSettings.aoData[ oSettings.aiDisplay[iDisplayIndex] ]._aData[1];
193 if ( sGroup != sLastGroup )
195 var nGroup = document.createElement( 'tr' );
196 var nCell = document.createElement( 'td' );
197 nCell.colSpan = iColspan;
198 nCell.className = "group";
199 nCell.innerHTML = sGroup;
200 nGroup.appendChild( nCell );
201 nTrs[i].parentNode.insertBefore( nGroup, nTrs[i] );
206 "footerCallback": function ( row, data, start, end, display ) {
207 var api = this.api(), data;
208 footer_column_sum( api, [ 6, 7, 8, 9 ] );
211 { "bVisible": false, "aTargets": [ 0, 1 ] },
212 { "bSortable": false, "aTargets": ["_all"] }
214 'dom': '<"top pager"ilpf>tr<"bottom pager"ip>',
216 'aaSortingFixed': [[ 1, 'asc' ]],
221 $(oTable).treetable({
224 $(oTable).treetable('expandAll');
225 $("#expand_all").click(function(e){
227 $(oTable).treetable('expandAll');
229 $("#collapse_all").click(function(e){
231 $(oTable).treetable('collapseAll');
234 $("#hide_inactive").click(function(e){
236 oTable.fnFilter( 1, 0 ); // Show only active=1
238 $("#show_inactive").click(function(e){
240 oTable.fnFilter( '', 0 );
242 $("#hide_inactive").click();
248 [% INCLUDE 'intranet-bottom.inc' %]