6 [% INCLUDE 'doc-head-open.inc' %]
7 <title>Koha › Acquisitions</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 ( suggestion && suggestions_count ) %]
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 && suggestion && suggestions_count ) %]
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 <span class="total_amount">[% loop_budge.budget_ordered | $Price %]</span>
166 <a href="spent.pl?fund=[% loop_budge.budget_id | uri %]&fund_code=[% loop_budge.budget_code | uri %]">
167 <span class="total_amount">[% loop_budge.budget_spent | $Price %]</span>
171 <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>
181 </div> <!-- /.col-sm-10.col-sm-push-2 -->
183 <div class="col-sm-2 col-sm-pull-10">
185 [% INCLUDE 'acquisitions-menu.inc' %]
188 </div> <!-- /.row -->
190 [% MACRO jsinclude BLOCK %]
191 [% INCLUDE 'datatables.inc' %]
192 [% Asset.js("lib/jquery/plugins/treetable/jquery.treetable.js") | $raw %]
193 [% Asset.js("js/acquisitions-menu.js") | $raw %]
194 [% INCLUDE 'columns_settings.inc' %]
196 dt_overwrite_html_sorting_localeCompare();
198 $(document).ready(function() {
200 var oTable = KohaTable("accounts", {
201 "fnDrawCallback": function ( oSettings ) {
202 if ( oSettings.aiDisplay.length == 0 )
207 var nTrs = $('#accounts tbody tr');
208 var iColspan = nTrs[0].getElementsByTagName('td').length;
210 for ( var i=0 ; i<nTrs.length ; i++ )
212 var iDisplayIndex = oSettings._iDisplayStart + i;
213 var sGroup = oSettings.aoData[ oSettings.aiDisplay[iDisplayIndex] ]._aData[1];
214 if ( sGroup != sLastGroup )
216 var nGroup = document.createElement( 'tr' );
217 var nCell = document.createElement( 'td' );
218 nCell.colSpan = iColspan;
219 nCell.className = "group";
220 nCell.innerHTML = sGroup;
221 nGroup.appendChild( nCell );
222 nTrs[i].parentNode.insertBefore( nGroup, nTrs[i] );
227 "footerCallback": function ( row, data, start, end, display ) {
228 var api = this.api(), data;
229 footer_column_sum( api, [ 6, 7, 8, 9 ] );
232 { "bVisible": false, "aTargets": [ 0, 1 ] },
233 { "bSortable": false, "aTargets": ["_all"] }
236 'aaSortingFixed': [[ 1, 'asc' ]],
241 $(oTable).treetable({
244 $(oTable).treetable('expandAll');
245 $("#expand_all").click(function(e){
247 $(oTable).treetable('expandAll');
249 $("#collapse_all").click(function(e){
251 $(oTable).treetable('collapseAll');
254 $("#hide_inactive").click(function(e){
256 oTable.fnFilter( 1, 0 ); // Show only active=1
258 $("#show_inactive").click(function(e){
260 oTable.fnFilter( '', 0 );
262 $("#hide_inactive").click();
264 $("#library-filter").change(function(){
265 $("#accounts").DataTable().search(this.value);
266 $("#accounts").DataTable().draw();
273 [% INCLUDE 'intranet-bottom.inc' %]