6 [% INCLUDE 'doc-head-open.inc' %]
7 <title>Acquisitions › Koha</title>
8 [% INCLUDE 'doc-head-close.inc' %]
9 [% Asset.css("lib/jquery/plugins/treetable/stylesheets/jquery.treetable.css") | $raw %]
12 <body id="acq_acqui-home" class="acq">
13 [% INCLUDE 'header.inc' %]
14 [% INCLUDE 'acquisitions-search.inc' %]
16 <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb">
19 <a href="/cgi-bin/koha/mainpage.pl">Home</a>
22 <a href="#" aria-current="page">Acquisitions</a>
27 <div class="main container-fluid">
29 <div class="col-sm-10 col-sm-push-2">
32 [% INCLUDE 'acquisitions-toolbar.inc' %]
35 [% INCLUDE 'budgets-active-currency.inc' hide = 'yes' %]
36 [% UNLESS ( loop_budget ) %]
37 [% IF ( CAN_user_acquisition_period_manage ) %]
38 <div class="dialog alert"><a href="/cgi-bin/koha/admin/aqbudgetperiods.pl">You must define a budget in Administration</a></div>
40 <div class="dialog alert">Your administrator must define a budget in Administration</div>
44 [% IF ( suggestions_count || all_pendingsuggestions ) %]
45 <div class="col-sm-6">
47 <div class="col-sm-12">
49 <div id="acqui_acqui_home_order">
51 <legend>Manage orders</legend>
52 <form name="findsupplier" action="/cgi-bin/koha/acqui/booksellers.pl" method="post">
53 <p><label for="supplierpage">Vendor: </label><input type="text" size="25" name="supplier" id="supplierpage" class="focus" />
54 <input type="submit" value="Search" />
61 [% IF ( CAN_user_suggestions_suggestions_manage && ( suggestions_count || all_pendingsuggestions ) ) %]
62 <div class="col-sm-6">
63 <div id="acqui_acqui_home_suggestions">
65 <legend>Pending suggestions</legend>
68 <a href="/cgi-bin/koha/suggestion/suggestion.pl?branchcode=[% Branches.GetLoggedInBranchcode | url %]#ASKED">
69 <span id="pendingsuggestions" class="pending-number-link">[% Branches.GetLoggedInBranchname | html %]: [% suggestions_count | html %]</span>
71 [% IF (all_pendingsuggestions > 0) %]
73 <a href="/cgi-bin/koha/suggestion/suggestion.pl?branchcode=__ANY__#ASKED">
74 <span id="all_pendingsuggestions" class="pending-number-link">All libraries: [% all_pendingsuggestions | html %]</span>
85 [% IF ( loop_budget ) %]
87 <h3>All available funds</h3>
89 <div id="BudgetsAndFunds">
90 <div class="toolbar btn-toolbar">
91 <span class="actions">
92 <a href="#" id="expand_all">Expand all</a> |
93 <a href="#" id="collapse_all">Collapse all</a> |
94 <a href="#" id="hide_inactive">Hide inactive budgets</a> |
95 <a href="#" id="show_inactive">Show inactive budgets</a> |
96 <select id="library-filter">
97 <option value="">Filter by library</option>
98 [% FOREACH b IN Branches.all %]
99 <option value="[% b.branchname | html %]">[% b.branchname | html %]</option>
105 <table id="accounts">
110 <th>Budget period description</th>
118 <th>Total available</th>
121 <tfoot id="funds_total">
125 <th colspan="4">Total</th>
126 <th class="data"></th>
127 <th class="data"></th>
128 <th class="data"></th>
129 <th class="data"></th>
133 [% FOREACH loop_budge IN loop_budget %]
134 [% IF loop_budge.budget_parent_id %]
135 <tr data-tt-id="[% loop_budge.budget_id | html %]" data-tt-parent-id="[% loop_budge.budget_parent_id | html %]">
137 <tr data-tt-id="[% loop_budge.budget_id | html %]">
140 <td>[% loop_budge.budget_period_active | html %]</td>
141 <td>Budget [% loop_budge.budget_period_description | html %] [id=[% loop_budge.budget_period_id | html %]][% UNLESS loop_budge.budget_period_active %] (inactive)[% END %]</td>
143 [% IF ( CAN_user_acquisition_budget_manage ) %]
144 <a href="/cgi-bin/koha/admin/aqbudgets.pl?budget_period_id=[% loop_budge.budget_period_id | uri %]">[% loop_budge.budget_code | html %]</a>
146 [% loop_budge.budget_code | html %]
149 <td>[% loop_budge.budget_name | html %]</td>
150 <td>[% IF ( loop_budge.budget_owner ) %]
151 <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>
156 <td>[% Branches.GetName( loop_budge.budget_branchcode ) | html %]</td>
158 <span class="total_amount" data-parent_id="[% loop_budge.budget_parent_id | html %]" data-self_id="[% loop_budge.budget_id | html %]">[% loop_budge.budget_amount | $Price %]</span>
161 <a href="ordered.pl?fund=[% loop_budge.budget_id | uri %]&fund_code=[% loop_budge.budget_code | uri %]">
162 [% IF !loop_budge.budget_parent_id %]
163 <a title="Ordered from this fund" href="ordered.pl?fund=[% loop_budge.budget_id | uri %]&fund_code=[% loop_budge.budget_code | uri %]">
164 (<span class="total_amount">[% loop_budge.budget_ordered | $Price %]</span>)
166 <span title="Ordered from this fund and children" class="inclusive_amount">[% loop_budge.total_ordered | $Price %]</span>
168 <a href="ordered.pl?fund=[% loop_budge.budget_id | uri %]&fund_code=[% loop_budge.budget_code | uri %]">
169 <span class="total_amount">[% loop_budge.budget_ordered | $Price %]</span>
174 [% IF !loop_budge.budget_parent_id %]
175 <a title="Spent from this fund" href="spent.pl?fund=[% loop_budge.budget_id | uri %]&fund_code=[% loop_budge.budget_code | uri %]">
176 (<span class="total_amount">[% loop_budge.budget_spent | $Price %]</span>)
178 <span title="Spent from this fund and children" class="inclusive_amount">[% loop_budge.total_spent | $Price %]</span>
180 <a href="spent.pl?fund=[% loop_budge.budget_id | uri %]&fund_code=[% loop_budge.budget_code | uri %]">
181 <span class="total_amount">[% loop_budge.budget_spent | $Price %]</span>
186 [% IF !loop_budge.budget_parent_id %]
187 (<span title="Remaining in this fund" class="parent_amount" data-parent_id="[% loop_budge.budget_parent_id | html %]" data-self_id="[% loop_budge.budget_id | html %]">[% loop_budge.budget_avail | $Price %]</span>)
188 <span title="Remaining with child funds included" class="total_amount" data-parent_id="[% loop_budge.budget_parent_id | html %]" data-self_id="[% loop_budge.budget_id | html %]">[% loop_budge.total_avail | $Price %]</span>
190 <span class="total_amount" data-parent_id="[% loop_budge.budget_parent_id | html %]" data-self_id="[% loop_budge.budget_id | html %]">[% loop_budge.budget_avail | $Price %]</span>
201 </div> <!-- /.col-sm-10.col-sm-push-2 -->
203 <div class="col-sm-2 col-sm-pull-10">
205 [% INCLUDE 'acquisitions-menu.inc' %]
208 </div> <!-- /.row -->
210 [% MACRO jsinclude BLOCK %]
211 [% INCLUDE 'datatables.inc' %]
212 [% Asset.js("lib/jquery/plugins/treetable/jquery.treetable.js") | $raw %]
213 [% Asset.js("js/acquisitions-menu.js") | $raw %]
214 [% INCLUDE 'columns_settings.inc' %]
216 dt_overwrite_html_sorting_localeCompare();
218 $(document).ready(function() {
220 var oTable = KohaTable("accounts", {
221 "fnDrawCallback": function ( oSettings ) {
222 if ( oSettings.aiDisplay.length == 0 )
227 var nTrs = $('#accounts tbody tr');
228 var iColspan = nTrs[0].getElementsByTagName('td').length;
230 for ( var i=0 ; i<nTrs.length ; i++ )
232 var iDisplayIndex = oSettings._iDisplayStart + i;
233 var sGroup = oSettings.aoData[ oSettings.aiDisplay[iDisplayIndex] ]._aData[1];
234 if ( sGroup != sLastGroup )
236 var nGroup = document.createElement( 'tr' );
237 var nCell = document.createElement( 'td' );
238 nCell.colSpan = iColspan;
239 nCell.className = "group";
240 nCell.innerHTML = sGroup;
241 nGroup.appendChild( nCell );
242 nTrs[i].parentNode.insertBefore( nGroup, nTrs[i] );
247 "footerCallback": function ( row, data, start, end, display ) {
248 var api = this.api(), data;
249 footer_column_sum( api, [ 6, 7, 8, 9 ] );
252 { "bVisible": false, "aTargets": [ 0, 1 ] },
253 { "bSortable": false, "aTargets": ["_all"] }
256 'aaSortingFixed': [[ 1, 'asc' ]],
261 $(oTable).treetable({
264 $(oTable).treetable('expandAll');
265 $("#expand_all").click(function(e){
267 $(oTable).treetable('expandAll');
269 $("#collapse_all").click(function(e){
271 $(oTable).treetable('collapseAll');
274 $("#hide_inactive").click(function(e){
276 oTable.fnFilter( 1, 0 ); // Show only active=1
278 $("#show_inactive").click(function(e){
280 oTable.fnFilter( '', 0 );
282 $("#hide_inactive").click();
284 $("#library-filter").change(function(){
285 $("#accounts").DataTable().search(this.value);
286 $("#accounts").DataTable().draw();
293 [% INCLUDE 'intranet-bottom.inc' %]