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 class="main container-fluid">
20 <div class="col-sm-10 col-sm-push-2">
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 [% IF ( suggestion && suggestions_count ) %]
36 <div class="col-sm-6">
38 <div class="col-sm-12">
40 <div id="acqui_acqui_home_order">
42 <legend>Manage orders</legend>
43 <form name="findsupplier" action="/cgi-bin/koha/acqui/booksellers.pl" method="post">
44 <p><label for="supplierpage">Vendor: </label><input type="text" size="25" name="supplier" id="supplierpage" class="focus" />
45 <input type="submit" value="Search" />
52 [% IF ( suggestion && suggestions_count ) %]
53 <div class="col-sm-6">
54 <div id="acqui_acqui_home_suggestions">
56 <legend>Pending suggestions</legend>
57 <p>[% suggestions_count %] suggestions waiting. <a href="/cgi-bin/koha/suggestion/suggestion.pl#ASKED">Manage suggestions</a>.</p>
65 [% IF ( loop_budget ) %]
67 <h3>All available funds[% IF LoginBranchname %] for [% LoginBranchname %][% END %]</h3>
69 <div id="BudgetsAndFunds">
72 <span class="actions"><a href="#" id="expand_all">Expand all</a>
73 | <a href="#" id="collapse_all">Collapse all</a>
74 | <a href="#" id="hide_inactive">Hide inactive budgets</a>
75 | <a href="#" id="show_inactive">Show inactive budgets</a></span>
81 <th>Budget period description</th>
89 <th>Total available</th>
92 <tfoot id="funds_total">
96 <th colspan="4">Total</th>
97 <th class="data"></th>
98 <th class="data"></th>
99 <th class="data"></th>
100 <th class="data"></th>
104 [% FOREACH loop_budge IN loop_budget %]
105 [% IF loop_budge.budget_parent_id %]
106 <tr data-tt-id="[% loop_budge.budget_id %]" data-tt-parent-id="[% loop_budge.budget_parent_id %]">
108 <tr data-tt-id="[% loop_budge.budget_id %]">
111 <td>[% loop_budge.budget_period_active %]</td>
112 <td>Budget [% loop_budge.budget_period_description %] [id=[% loop_budge.budget_period_id %]][% UNLESS loop_budge.budget_period_active %] (inactive)[% END %]</td>
114 [% IF ( CAN_user_acquisition_budget_manage ) %]
115 <a href="/cgi-bin/koha/admin/aqbudgets.pl?budget_period_id=[% loop_budge.budget_period_id %]">[% loop_budge.budget_code %]</a>
117 [% loop_budge.budget_code %]
120 <td>[% loop_budge.budget_name %]</td>
121 <td>[% IF ( loop_budge.budget_owner ) %]
122 <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>
127 <td>[% Branches.GetName( loop_budge.budget_branchcode ) %]</td>
129 [% IF loop_budge.budget_parent_id %]
130 [% loop_budge.budget_amount | $Price %]
132 <span class="total_amount">[% loop_budge.budget_amount | $Price %]</span>
136 <a href="ordered.pl?fund=[% loop_budge.budget_id %]&fund_code=[% loop_budge.budget_code %]">
137 [% IF loop_budge.budget_parent_id %]
138 [% loop_budge.budget_ordered | $Price %]
140 <span class="total_amount">[% loop_budge.budget_ordered | $Price %]</span>
145 <a href="spent.pl?fund=[% loop_budge.budget_id %]&fund_code=[% loop_budge.budget_code %]">
146 [% IF loop_budge.budget_parent_id %]
147 [% loop_budge.budget_spent | $Price %]
149 <span class="total_amount">[% loop_budge.budget_spent | $Price %]</span>
154 [% IF loop_budge.budget_parent_id %]
155 [% loop_budge.budget_avail | $Price %]
157 <span class="total_amount">[% loop_budge.budget_avail | $Price %]</span>
168 </div> <!-- /.col-sm-10.col-sm-push-2 -->
170 <div class="col-sm-2 col-sm-pull-10">
172 [% INCLUDE 'acquisitions-menu.inc' %]
175 </div> <!-- /.row -->
177 [% MACRO jsinclude BLOCK %]
178 [% INCLUDE 'datatables.inc' %]
179 [% Asset.js("lib/jquery/plugins/treetable/jquery.treetable.js") %]
180 [% Asset.js("js/acquisitions-menu.js") %]
182 dt_overwrite_html_sorting_localeCompare();
184 $(document).ready(function() {
186 var oTable = $("#accounts").dataTable($.extend(true, {}, dataTablesDefaults, {
187 "fnDrawCallback": function ( oSettings ) {
188 if ( oSettings.aiDisplay.length == 0 )
193 var nTrs = $('#accounts tbody tr');
194 var iColspan = nTrs[0].getElementsByTagName('td').length;
196 for ( var i=0 ; i<nTrs.length ; i++ )
198 var iDisplayIndex = oSettings._iDisplayStart + i;
199 var sGroup = oSettings.aoData[ oSettings.aiDisplay[iDisplayIndex] ]._aData[1];
200 if ( sGroup != sLastGroup )
202 var nGroup = document.createElement( 'tr' );
203 var nCell = document.createElement( 'td' );
204 nCell.colSpan = iColspan;
205 nCell.className = "group";
206 nCell.innerHTML = sGroup;
207 nGroup.appendChild( nCell );
208 nTrs[i].parentNode.insertBefore( nGroup, nTrs[i] );
213 "footerCallback": function ( row, data, start, end, display ) {
214 var api = this.api(), data;
215 footer_column_sum( api, [ 6, 7, 8, 9 ] );
218 { "bVisible": false, "aTargets": [ 0, 1 ] },
219 { "bSortable": false, "aTargets": ["_all"] }
221 'dom': '<"top pager"ilpf>tr<"bottom pager"ip>',
223 'aaSortingFixed': [[ 1, 'asc' ]],
228 $(oTable).treetable({
231 $(oTable).treetable('expandAll');
232 $("#expand_all").click(function(e){
234 $(oTable).treetable('expandAll');
236 $("#collapse_all").click(function(e){
238 $(oTable).treetable('collapseAll');
241 $("#hide_inactive").click(function(e){
243 oTable.fnFilter( 1, 0 ); // Show only active=1
245 $("#show_inactive").click(function(e){
247 oTable.fnFilter( '', 0 );
249 $("#hide_inactive").click();
255 [% INCLUDE 'intranet-bottom.inc' %]