Lines 287-306
Link Here
|
287 |
<input type="text" size="10" id="datereceived" name="datereceived" value="[% datereceived | html %]" class="flatpickr" /> |
287 |
<input type="text" size="10" id="datereceived" name="datereceived" value="[% datereceived | html %]" class="flatpickr" /> |
288 |
<div class="hint">[% INCLUDE 'date-format.inc' %]</div> |
288 |
<div class="hint">[% INCLUDE 'date-format.inc' %]</div> |
289 |
</li> |
289 |
</li> |
290 |
<li><label for="bookfund">Fund: </label><select id="bookfund" name="bookfund"> |
290 |
<li> |
291 |
<option value="">Keep current ([% budget_period_description | html %] - [% order.fund.budget_name | html %])</option> |
291 |
<label class="required" for="bookfund">Fund: </label> |
292 |
[% FOREACH period IN budget_loop %] |
292 |
[% active_count = 0 %] |
293 |
<optgroup label="[% period.description | html %]"> |
293 |
[% IF !ordernumber %] |
294 |
[% FOREACH fund IN period.funds %] |
294 |
[% FOREACH budget_loo IN budget_loop %] |
295 |
[% IF ( fund.b_sel ) %] |
295 |
[% active_count= active_count + budget_loo.b_active %] |
296 |
<option value="[% fund.b_id | html %]" selected="selected">[% fund.b_txt | html %]</option> |
296 |
[% END %] |
297 |
[% ELSE %] |
297 |
[% END %] |
298 |
<option value="[% fund.b_id | html %]">[% fund.b_txt | html %]</option> |
298 |
<select class="select2" id="bookfund" name="bookfund"> |
299 |
[% END %] |
299 |
[% FOREACH budget_loo IN budget_loop %] |
|
|
300 |
[% level_indent_cnt = 0 %] |
301 |
[% level_indent = "" %] |
302 |
[% WHILE level_indent_cnt < budget_loo.b_level %] |
303 |
[% level_indent = level_indent _ " -- " %] |
304 |
[% level_indent_cnt = level_indent_cnt +1 %] |
305 |
[% END %] |
306 |
|
307 |
[% IF ( budget_loo.b_sel ) %] |
308 |
[% active_count = 0 #select no other fund %] |
309 |
<option value="[% budget_loo.b_id | html %]" selected="selected" data-sort1-authcat="[% budget_loo.b_sort1_authcat | html %]" data-sort2-authcat="[% budget_loo.b_sort2_authcat | html %]" |
310 |
> |
311 |
[% ELSIF active_count==1 && budget_loo.b_active %] |
312 |
<option value="[% budget_loo.b_id | html %]" selected="selected" data-sort1-authcat="[% budget_loo.b_sort1_authcat | html %]" data-sort2-authcat="[% budget_loo.b_sort2_authcat | html %]" |
313 |
> |
314 |
[% ELSE %] |
315 |
[% bdgclass=budget_loo.b_active? "": "b_inactive" | html %] |
316 |
<option value="[% budget_loo.b_id | html %]" class="[% bdgclass | html %]" data-sort1-authcat="[% budget_loo.b_sort1_authcat | html %]" data-sort2-authcat="[% budget_loo.b_sort2_authcat | html %]" |
317 |
> |
300 |
[% END %] |
318 |
[% END %] |
301 |
</optgroup> |
319 |
[% level_indent | html %][% budget_loo.b_txt | html %][% IF !budget_loo.b_active %] (inactive)[% END %] |
|
|
320 |
</option> |
302 |
[% END %] |
321 |
[% END %] |
303 |
</select></li> |
322 |
</select> |
|
|
323 |
<span class="required">Required</span> |
324 |
<label for="showallbudgets" style="float:none;"> Show inactive:</label> |
325 |
<input type="checkbox" id="showallbudgets" /> |
326 |
</li> |
304 |
<li><label> </label><span>(Current: [% budget_period_description | html %] - [% bookfund | html %])</span></li> |
327 |
<li><label> </label><span>(Current: [% budget_period_description | html %] - [% bookfund | html %])</span></li> |
305 |
<li> |
328 |
<li> |
306 |
<label for="creator">Ordered by: </label> |
329 |
<label for="creator">Ordered by: </label> |
Lines 434-439
Link Here
|
434 |
[% INCLUDE 'calendar.inc' %] |
457 |
[% INCLUDE 'calendar.inc' %] |
435 |
[% Asset.js("js/additem.js") | $raw %] |
458 |
[% Asset.js("js/additem.js") | $raw %] |
436 |
[% Asset.js("js/cataloging.js") | $raw %] |
459 |
[% Asset.js("js/cataloging.js") | $raw %] |
|
|
460 |
[% INCLUDE 'select2.inc' %] |
437 |
<script> |
461 |
<script> |
438 |
function Check(form) { |
462 |
function Check(form) { |
439 |
[% IF (AcqCreateItem == 'receiving') %] |
463 |
[% IF (AcqCreateItem == 'receiving') %] |
Lines 528-533
Link Here
|
528 |
[% END %] |
552 |
[% END %] |
529 |
|
553 |
|
530 |
$(document).ready(function() { |
554 |
$(document).ready(function() { |
|
|
555 |
|
556 |
//keep a copy of all budgets before removing the inactives |
557 |
disabledBudgetsCopy = $('#bookfund').html(); |
558 |
$('#bookfund .b_inactive').remove(); |
559 |
|
560 |
$('#showallbudgets').click(function() { |
561 |
if ($(this).is(":checked")) { |
562 |
$('#bookfund').html(disabledBudgetsCopy); //Puts back all the funds |
563 |
} |
564 |
else { |
565 |
$('#bookfund .b_inactive').remove(); |
566 |
} |
567 |
}); |
568 |
|
531 |
[% IF (AcqCreateItem == 'receiving') %] |
569 |
[% IF (AcqCreateItem == 'receiving') %] |
532 |
cloneItemBlock(0, '[% Koha.Preference('UniqueItemFields') | html %]'); |
570 |
cloneItemBlock(0, '[% Koha.Preference('UniqueItemFields') | html %]'); |
533 |
[% ELSIF (AcqCreateItem == 'ordering') && not order.subscriptionid %] |
571 |
[% ELSIF (AcqCreateItem == 'ordering') && not order.subscriptionid %] |
534 |
- |
|
|