6 [% INCLUDE 'doc-head-open.inc' %]
7 <title>Koha › Acquisitions</title>
8 [% INCLUDE 'doc-head-close.inc' %]
9 [% Asset.css("css/datatables.css") | $raw %]
10 [% Asset.css("lib/jquery/plugins/treetable/stylesheets/jquery.treetable.css") | $raw %]
13 <body id="acq_acqui-home" class="acq">
14 [% INCLUDE 'header.inc' %]
15 [% INCLUDE 'acquisitions-search.inc' %]
17 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › Acquisitions</div>
19 <div class="main container-fluid">
21 <div class="col-sm-10 col-sm-push-2">
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 [% IF ( suggestion && suggestions_count ) %]
37 <div class="col-sm-6">
39 <div class="col-sm-12">
41 <div id="acqui_acqui_home_order">
43 <legend>Manage orders</legend>
44 <form name="findsupplier" action="/cgi-bin/koha/acqui/booksellers.pl" method="post">
45 <p><label for="supplierpage">Vendor: </label><input type="text" size="25" name="supplier" id="supplierpage" class="focus" />
46 <input type="submit" value="Search" />
53 [% IF ( CAN_user_acquisition_suggestions_manage && suggestion && suggestions_count ) %]
54 <div class="col-sm-6">
55 <div id="acqui_acqui_home_suggestions">
57 <legend>Pending suggestions</legend>
58 <p>[% suggestions_count | html %] suggestions waiting. <a href="/cgi-bin/koha/suggestion/suggestion.pl#ASKED">Manage suggestions</a>.</p>
66 [% IF ( loop_budget ) %]
68 <h3>All available funds[% IF LoginBranchname %] for [% LoginBranchname | html %][% END %]</h3>
70 <div id="BudgetsAndFunds">
73 <span class="actions"><a href="#" id="expand_all">Expand all</a>
74 | <a href="#" id="collapse_all">Collapse all</a>
75 | <a href="#" id="hide_inactive">Hide inactive budgets</a>
76 | <a href="#" id="show_inactive">Show inactive budgets</a></span>
82 <th>Budget period description</th>
90 <th>Total available</th>
93 <tfoot id="funds_total">
97 <th colspan="4">Total</th>
98 <th class="data"></th>
99 <th class="data"></th>
100 <th class="data"></th>
101 <th class="data"></th>
105 [% FOREACH loop_budge IN loop_budget %]
106 [% IF loop_budge.budget_parent_id %]
107 <tr data-tt-id="[% loop_budge.budget_id | html %]" data-tt-parent-id="[% loop_budge.budget_parent_id | html %]">
109 <tr data-tt-id="[% loop_budge.budget_id | html %]">
112 <td>[% loop_budge.budget_period_active | html %]</td>
113 <td>Budget [% loop_budge.budget_period_description | html %] [id=[% loop_budge.budget_period_id | html %]][% UNLESS loop_budge.budget_period_active %] (inactive)[% END %]</td>
115 [% IF ( CAN_user_acquisition_budget_manage ) %]
116 <a href="/cgi-bin/koha/admin/aqbudgets.pl?budget_period_id=[% loop_budge.budget_period_id | uri %]">[% loop_budge.budget_code | html %]</a>
118 [% loop_budge.budget_code | html %]
121 <td>[% loop_budge.budget_name | html %]</td>
122 <td>[% IF ( loop_budge.budget_owner ) %]
123 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% loop_budge.budget_owner.borrowernumber | uri %]">[% loop_budge.budget_owner.surname | html %], [% loop_budge.budget_owner.firstname | html %]</a>
128 <td>[% Branches.GetName( loop_budge.budget_branchcode ) | html %]</td>
130 [% IF loop_budge.budget_parent_id %]
131 [% loop_budge.budget_amount | $Price %]
133 <span class="total_amount">[% loop_budge.budget_amount | $Price %]</span>
137 <a href="ordered.pl?fund=[% loop_budge.budget_id | uri %]&fund_code=[% loop_budge.budget_code | uri %]">
138 [% IF loop_budge.budget_parent_id %]
139 [% loop_budge.budget_ordered | $Price %]
141 <span class="total_amount">[% loop_budge.budget_ordered | $Price %]</span>
146 <a href="spent.pl?fund=[% loop_budge.budget_id | uri %]&fund_code=[% loop_budge.budget_code | uri %]">
147 [% IF loop_budge.budget_parent_id %]
148 [% loop_budge.budget_spent | $Price %]
150 <span class="total_amount">[% loop_budge.budget_spent | $Price %]</span>
155 [% IF loop_budge.budget_parent_id %]
156 [% loop_budge.budget_avail | $Price %]
158 <span class="total_amount">[% loop_budge.budget_avail | $Price %]</span>
169 </div> <!-- /.col-sm-10.col-sm-push-2 -->
171 <div class="col-sm-2 col-sm-pull-10">
173 [% INCLUDE 'acquisitions-menu.inc' %]
176 </div> <!-- /.row -->
178 [% MACRO jsinclude BLOCK %]
179 [% INCLUDE 'datatables.inc' %]
180 [% Asset.js("lib/jquery/plugins/treetable/jquery.treetable.js") | $raw %]
181 [% Asset.js("js/acquisitions-menu.js") | $raw %]
183 dt_overwrite_html_sorting_localeCompare();
185 $(document).ready(function() {
187 var oTable = $("#accounts").dataTable($.extend(true, {}, dataTablesDefaults, {
188 "fnDrawCallback": function ( oSettings ) {
189 if ( oSettings.aiDisplay.length == 0 )
194 var nTrs = $('#accounts tbody tr');
195 var iColspan = nTrs[0].getElementsByTagName('td').length;
197 for ( var i=0 ; i<nTrs.length ; i++ )
199 var iDisplayIndex = oSettings._iDisplayStart + i;
200 var sGroup = oSettings.aoData[ oSettings.aiDisplay[iDisplayIndex] ]._aData[1];
201 if ( sGroup != sLastGroup )
203 var nGroup = document.createElement( 'tr' );
204 var nCell = document.createElement( 'td' );
205 nCell.colSpan = iColspan;
206 nCell.className = "group";
207 nCell.innerHTML = sGroup;
208 nGroup.appendChild( nCell );
209 nTrs[i].parentNode.insertBefore( nGroup, nTrs[i] );
214 "footerCallback": function ( row, data, start, end, display ) {
215 var api = this.api(), data;
216 footer_column_sum( api, [ 6, 7, 8, 9 ] );
219 { "bVisible": false, "aTargets": [ 0, 1 ] },
220 { "bSortable": false, "aTargets": ["_all"] }
222 'dom': '<"top pager"ilpf>tr<"bottom pager"ip>',
224 'aaSortingFixed': [[ 1, 'asc' ]],
229 $(oTable).treetable({
232 $(oTable).treetable('expandAll');
233 $("#expand_all").click(function(e){
235 $(oTable).treetable('expandAll');
237 $("#collapse_all").click(function(e){
239 $(oTable).treetable('collapseAll');
242 $("#hide_inactive").click(function(e){
244 oTable.fnFilter( 1, 0 ); // Show only active=1
246 $("#show_inactive").click(function(e){
248 oTable.fnFilter( '', 0 );
250 $("#hide_inactive").click();
256 [% INCLUDE 'intranet-bottom.inc' %]