<link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
[% INCLUDE 'doc-head-close.inc' %]
[% INCLUDE 'datatables.inc' %]
-<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.checkboxes.min.js"></script>
+<script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.checkboxes.min.js"></script>
<script type="text/javascript" src="[% themelang %]/js/acq.js"></script>
<script type="text/JavaScript">
//<![CDATA[
"aaSorting": []
} ) );
+ // keep copy of the inactive budgets
+ disabledBudgetsCopy = $("select[name='all_budget_id']").html();
+ $("select[name='all_budget_id'] .b_inactive").remove();
+ $("select[name='budget_id'] .b_inactive").remove();
+
+ $("#showallbudgets").click(function() {
+ if ($(this).is(":checked")) {
+ $("select[name='budget_id']").html(disabledBudgetsCopy)
+ }
+ else {
+ $("select[name='budget_id'] .b_inactive").remove();
+ }
+ });
+
+ $("#all_showallbudgets").click(function() {
+ if ($(this).is(":checked")) {
+ $("select[name='all_budget_id']").html(disabledBudgetsCopy);
+ }
+ else {
+ $("select[name='all_budget_id'] .b_inactive").remove();
+ }
+ });
+
$("select[name='budget_id']").change(function(){
var sort1_authcat = $(this).find("option:selected").attr('data-sort1-authcat');
var sort2_authcat = $(this).find("option:selected").attr('data-sort2-authcat');
$(this).parent().siblings('li').find('input[name="sort2"]').attr('name', 'all_sort2');
} );
+ $("select[name='all_budget_id']").change();
+
$("#records_to_import fieldset.rows ol").hide();
$('input:checkbox[name="import_record_id"]').change(function(){
var container = $(this).parents("fieldset");
}
});
if ( error > 0 ) {
- alert(error + " " + _("quantity values are not filled or not a number"));
+ alert(error + " " + _("quantity values are not filled in or are not numbers"));
return false;
}
});
function disableUnchecked(form){
- $("div.biblio.unselected").each(function(){
+ $("fieldset.biblio.unselected").each(function(){
$(this).remove();
});
return 1;
<div id="tabs" class="toptabs">
<ul>
<li><a href="#records_to_import">Select to import</a></li>
- <li><a href="#items_info" class="items_info">Items information</a></li>
+ <li><a href="#items_info" class="items_info">Item information</a></li>
<li><a href="#accounting_details">Default accounting details</a></li>
</ul>
<div id="records_to_import">
- <span class="checkall"><a id="checkAll" href="#">Check All</a></span>
- <span class="uncheckall"><a id="unCheckAll" href="#">Uncheck All</a></span>
+ <span class="checkall"><a id="checkAll" href="#">Check all</a></span>
+ <span class="uncheckall"><a id="unCheckAll" href="#">Uncheck all</a></span>
+ <label for="showallbudgets" style="float:none;width:auto;"> Show all funds:</label>
+ <input type="checkbox" id="showallbudgets" />
<input type="hidden" name="op" value="import_records"/>
<input type="hidden" name="basketno" value="[% basketno %]" />
<input type="hidden" name="booksellerid" value="[% booksellerid %]" />
<input type="checkbox" name="import_record_id" id="record_[% biblio.import_record_id %]" value="[% biblio.import_record_id %]" />
<span class="citation">[% biblio.citation %]</span>
</label>
- ( Show <a href="/cgi-bin/koha/catalogue/showmarc.pl?importid=[% biblio.import_record_id %]" title="MARC" rel="gb_page_center[600,500]">MARC</a> | <a href="/cgi-bin/koha/catalogue/showmarc.pl?viewas=card&id=[% biblio.import_record_id %]" title="MARC" rel="gb_page_center[600,500]">Card</a> )
-
+ <span class="links" style="font-weight: normal;">
+ ( <a href="/cgi-bin/koha/catalogue/showmarc.pl?importid=[% biblio.import_record_id %]" title="MARC" rel="gb_page_center[600,500]">MARC</a> | <a href="/cgi-bin/koha/catalogue/showmarc.pl?viewas=card&importid=[% biblio.import_record_id %]" title="Card" rel="gb_page_center[600,500]">Card</a> | <a href="/cgi-bin/koha/acqui/neworderempty.pl?booksellerid=[% booksellerid %]&basketno=[% basketno %]&breedingid=[% biblio.import_record_id %]&import_batch_id=[% biblio.import_batch_id %]&biblionumber=[% biblio.match_biblionumber %]">Add order</a> )
+ </span>
</legend>
- <input type="hidden" value="[% biblio.rrp %]" name="rrp" />
<ol>
<li class="status">
<span class="match">
</li>
<li class="discount">
<label for="discount_record_[% biblio.import_record_id %]">Discount: </label>
- <input id="discount_record_[% biblio.import_record_id %]" type="text" value="[% biblio.discount %]" name="discount" />
+ <input id="discount_record_[% biblio.import_record_id %]" type="text" value="[% biblio.discount %]" name="discount" size="6" /> %
+ (If empty, discount rate from vendor will be used)
</li>
<li class="budget">
<label for="fund_record_[% biblio.import_record_id %]">Fund: </label>
<input type="hidden" size="20" name="budget_id" value="[% budget_id %]" />[% Budget_name %]
[% ELSE %]
<select id="fund_record_[% biblio.import_record_id %]" size="1" name="budget_id">
- <option value=""></option>
+ <option value="">Select a fund</option>
[% FOREACH budget IN budget_loop %]
[% IF ( budget.b_id == biblio.budget_id ) %]
+ [% IF budget.b_active %]
<option value="[% budget.b_id %]" data-sort1-authcat="[% budget.b_sort1_authcat %]" data-sort2-authcat="[% budget.b_sort2_authcat %]" selected="selected">[% budget.b_txt %]</option>
+ [% ELSE %]
+ <option value="[% budget.b_id %]" data-sort1-authcat="[% budget.b_sort1_authcat %]" data-sort2-authcat="[% budget.b_sort2_authcat %]" selected="selected">[% budget.b_txt %] (inactive)</option>
+ [% END %]
[% ELSE %]
- <option value="[% budget.b_id %]" data-sort1-authcat="[% budget.b_sort1_authcat %]" data-sort2-authcat="[% budget.b_sort2_authcat %]">[% budget.b_txt %]</option>
+ [% IF budget.b_active %]<option value="[% budget.b_id %]" data-sort1-authcat="[% budget.b_sort1_authcat %]" data-sort2-authcat="[% budget.b_sort2_authcat %]">[% budget.b_txt %]</option>
+ [% ELSE %]<option value="[% budget.b_id %]" class="b_inactive" data-sort1-authcat="[% budget.b_sort1_authcat %]" data-sort2-authcat="[% budget.b_sort2_authcat %]">[% budget.b_txt %] (inactive)</option>
+ [% END %]
[% END %]
[% END %]
</select>
[% END %]
</li>
<li class="sort1">
- <label for="sort1_record_[% biblio.import_record_id %]">Planning value1: </label>
+ <label for="sort1_record_[% biblio.import_record_id %]">Statistic 1: </label>
<input id="sort1_record_[% biblio.import_record_id %]" type="text" id="sort1" size="20" name="sort1" value="[% biblio.sort1 %]" />
</li>
<li class="sort2">
- <label for="sort2_record_[% biblio.import_record_id %]">Planning value2: </label>
+ <label for="sort2_record_[% biblio.import_record_id %]">Statistic 2: </label>
<input id="sort2_record_[% biblio.import_record_id %]" type="text" id="sort2" size="20" name="sort2" value="[% biblio.sort2 %]" />
</li>
</ol>
[% END %]
</div>
<div id="items_info">
- <h2>Items information</h2>
+ <h2>Item information</h2>
<p>Import all the checked items in the basket with the following parameters:</p>
[% IF ( items ) %]
[% END %] <!-- items -->
</div>
<div id="accounting_details">
+ <p>Import all the checked items in the basket with the following accounting details (used only if no information is filled for the item):</p>
<fieldset class="rows" style="float:none;">
<legend>Accounting details</legend>
<ol>
<li>
<label for="all_budget_id">Fund: </label>
<select id="all_budget_id" size="1" name="all_budget_id">
+ <option value="">Select a fund</option>
[% FOREACH budget_loo IN budget_loop %]
- [% IF ( budget_loo.b_sel ) %]
- <option value="[% budget_loo.b_id %]" data-sort1-authcat="[% budget_loo.b_sort1_authcat %]" data-sort2-authcat="[% budget_loo.b_sort2_authcat %]" selected="selected">[% budget_loo.b_txt %]</option>
- [% ELSE %]
- <option value="[% budget_loo.b_id %]" data-sort1-authcat="[% budget_loo.b_sort1_authcat %]" data-sort2-authcat="[% budget_loo.b_sort2_authcat %]">[% budget_loo.b_txt %]</option>
+ [% IF ( budget_loo.b_active ) %]<option value="[% budget_loo.b_id %]" data-sort1-authcat="[% budget_loo.b_sort1_authcat %]" data-sort2-authcat="[% budget_loo.b_sort2_authcat %]">[% budget_loo.b_txt %]</option>
+ [% ELSE %]<option value="[% budget_loo.b_id %]" class="b_inactive" data-sort1-authcat="[% budget_loo.b_sort1_authcat %]" data-sort2-authcat="[% budget_loo.b_sort2_authcat %]">[% budget_loo.b_txt %] (inactive)</option>
[% END %]
[% END %]
</select>
+ <label for="all_showallbudgets" style="float:none;width:auto;"> Show all:</label>
+ <input type="checkbox" id="all_showallbudgets" />
</li>
[% END %]
</li>
</li>
<li>
<div class="hint">The 2 following fields are available for your own usage. They can be useful for statistical purposes</div>
- <label for="sort1">Planning value1: </label>
- [% IF CGIsort1 %]
- <select id="all_sort1" size="1" name="all_sort1">
- [% FOREACH sort_opt IN CGIsort1 %]
- [% IF sort_opt.default %]
- <option value="[% sort_opt.id %]" selected="selected">[% sort_opt.label %]</option>
- [% ELSE %]
- <option value="[% sort_opt.id %]">[% sort_opt.label %]</option>
- [% END %]
- [% END %]
- </select>
- [% ELSE %]
- <input type="text" id="all_sort1" size="20" name="all_sort1" value="[% sort1 %]" />
- [% END %]
+ <label for="all_sort1">Statistic 1: </label>
+ <input type="text" id="all_sort1" size="20" name="all_sort1" value="" />
</li>
<li>
- <span id="sort2_zone">
- <label for="sort2">Planning value2: </label>
- [% IF CGIsort2 %]
- <select id="all_sort2" size="1" name="all_sort1">
- [% FOREACH sort_opt IN CGIsort2 %]
- [% IF sort_opt.default %]
- <option value="[% sort_opt.id %]" selected="selected">[% sort_opt.label %]</option>
- [% ELSE %]
- <option value="[% sort_opt.id %]">[% sort_opt.label %]</option>
- [% END %]
- [% END %]
- </select>
- [% ELSE %]
- <input type="text" id="all_sort2" size="20" name="all_sort2" value="[% sort2 %]" />
- [% END %]
- </span>
+ <label for="all_sort2">Statistic 2: </label>
+ <input type="text" id="all_sort2" size="20" name="all_sort2" value="" />
</li>
</ol>
</fieldset>