2 [% INCLUDE 'doc-head-open.inc' %]
3 <title>Koha › Acquisitions › Order staged MARC records
4 [% IF ( batch_details ) %]
5 › Batch [% import_batch_id %]
10 [% INCLUDE 'greybox.inc' %]
11 <link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
12 [% INCLUDE 'doc-head-close.inc' %]
13 [% INCLUDE 'datatables.inc' %]
14 <script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.checkboxes.min.js"></script>
15 <script type="text/javascript" src="[% themelang %]/js/acq.js"></script>
16 <script type="text/JavaScript">
18 $(document).ready(function() {
19 $("#files").dataTable($.extend(true, {}, dataTablesDefaults, {
21 { "bSortable": false, "bSearchable": false, 'aTargets': [ 'NoSort' ] },
22 { "sType": "anti-the", "aTargets" : [ "anti-the" ] },
23 { "sType": "title-string", "aTargets" : [ "title-string" ] }
25 "sPaginationType": "four_button",
29 $("select[name='budget_id']").change(function(){
30 var sort1_authcat = $(this).find("option:selected").attr('data-sort1-authcat');
31 var sort2_authcat = $(this).find("option:selected").attr('data-sort2-authcat');
32 var destination_sort1 = $(this).parents('fieldset').find('li.sort1').find('input[name="sort1"]');
33 var sort1 = $(destination_sort1).val() || "";
34 if ( destination_sort1.length < 1 ) {
35 destination_sort1 = $(this).parents('fieldset').find('li.sort1 > select[name="sort1"]');
37 var destination_sort2 = $(this).parents('fieldset').find('li.sort2').find('input[name="sort2"]');
38 var sort2 = $(destination_sort2).val() || "";
39 if ( destination_sort2.length < 1 ) {
40 destination_sort2 = $(this).parents('fieldset').find('li.sort2').find('select[name="sort2"]');
42 getAuthValueDropbox( 'sort1', sort1_authcat, destination_sort1, sort1 );
44 getAuthValueDropbox( 'sort2', sort2_authcat, destination_sort2, sort2 );
47 $("select[name='budget_id']").change();
49 $("select[name='all_budget_id']").change(function(){
50 var sort1_authcat = $(this).find("option:selected").attr('data-sort1-authcat');
51 var sort2_authcat = $(this).find("option:selected").attr('data-sort2-authcat');
52 var destination_sort1 = $(this).parent().siblings('li').find('input[name="all_sort1"]');
53 if ( destination_sort1.length < 1 ) {
54 destination_sort1 = $(this).parent().siblings('li').find('select[name="all_sort1"]');
56 var destination_sort2 = $(this).parent().siblings('li').find('input[name="all_sort2"]');
57 if ( destination_sort2.length < 1 ) {
58 destination_sort2 = $(this).parent().siblings('li').find('select[name="all_sort2"]');
60 getAuthValueDropbox( 'sort1', sort1_authcat, destination_sort1 );
61 getAuthValueDropbox( 'sort2', sort2_authcat, destination_sort2 );
62 $(this).parent().siblings('li').find('select[name="sort1"]').attr('name', 'all_sort1');
63 $(this).parent().siblings('li').find('input[name="sort1"]').attr('name', 'all_sort1');
64 $(this).parent().siblings('li').find('select[name="sort2"]').attr('name', 'all_sort2');
65 $(this).parent().siblings('li').find('input[name="sort2"]').attr('name', 'all_sort2');
68 $("#records_to_import fieldset.rows ol").hide();
69 $('input:checkbox[name="import_record_id"]').change(function(){
70 var container = $(this).parents("fieldset");
71 if ( $(this).is(':checked') ) {
72 $(container).addClass("selected");
73 $(container).removeClass("unselected");
74 $(container).find("ol").toggle(true);
76 $(container).addClass("unselected");
77 $(container).removeClass("selected");
78 $(container).find("ol").toggle(false);
82 $("input:checkbox").attr("checked", false);
83 $("div.biblio.unselected select").attr("disabled", false);
84 $("div.biblio.unselected input").attr("disabled", false);
86 $("#checkAll").click(function(){
87 $("#Aform").checkCheckboxes();
88 $("input:checkbox[name='import_record_id']").change();
91 $("#unCheckAll").click(function(){
92 $("#Aform").unCheckCheckboxes();
93 $("input:checkbox[name='import_record_id']").change();
97 $("#Aform").on("submit", function(){
98 if ( $("input:checkbox[name='import_record_id']:checked").length < 1 ) {
99 alert(_("There is no record selected"));
104 $("input:checkbox[name='import_record_id']:checked").parents('fieldset').find('input[name="quantity"]').each(function(){
105 if ( $(this).val().length < 1 || isNaN( $(this).val() ) ) {
110 alert(error + " " + _("quantity values are not filled in or are not numbers"));
114 return disableUnchecked($(this));
119 function disableUnchecked(form){
120 $("div.biblio.unselected").each(function(){
128 <body id="acq_addorderiso2709" class="acq">
129 [% INCLUDE 'header.inc' %]
130 [% INCLUDE 'acquisitions-search.inc' %]
131 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a> › <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid %]">[% booksellername %]</a> › <a href="/cgi-bin/koha/acqui/basket.pl?basketno=[% basketno %]">Basket [% basketno %]</a> › Add orders from iso2709 file</div>
132 <div id="doc3" class="yui-t2">
136 [% IF ( batch_details ) %]
137 <h1>Add orders from [% comments %]
138 ([% file_name %] staged on [% upload_timestamp | $KohaDates with_hours => 1 %])
140 <form action="/cgi-bin/koha/acqui/addorderiso2709.pl" method="post" id="Aform">
141 <div id="tabs" class="toptabs">
143 <li><a href="#records_to_import">Select to import</a></li>
144 <li><a href="#items_info" class="items_info">Item information</a></li>
145 <li><a href="#accounting_details">Default accounting details</a></li>
148 <div id="records_to_import">
149 <span class="checkall"><a id="checkAll" href="#">Check all</a></span>
150 <span class="uncheckall"><a id="unCheckAll" href="#">Uncheck all</a></span>
151 <input type="hidden" name="op" value="import_records"/>
152 <input type="hidden" name="basketno" value="[% basketno %]" />
153 <input type="hidden" name="booksellerid" value="[% booksellerid %]" />
154 <input type="hidden" name="import_batch_id" value="[%import_batch_id %]" />
155 <input type="hidden" name="ordernumber" value="[% ordernumber %]" />
157 [% FOREACH cur IN loop_currencies %]
158 <input type="hidden" name="[% cur.currency %]" value="[% cur.rate %]" />
161 [% FOREACH biblio IN biblio_list %]
162 <fieldset class="biblio unselected rows" style="float:none;">
164 <label for="record_[% biblio.import_record_id %]" style="width:auto;">
165 <input type="checkbox" name="import_record_id" id="record_[% biblio.import_record_id %]" value="[% biblio.import_record_id %]" />
166 <span class="citation">[% biblio.citation %]</span>
168 <span class="links" style="font-weight: normal;">
169 ( <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> )
175 [% IF ( biblio_lis.overlay_status == 'no_match' ) %]
177 [% ELSIF ( biblio_lis.overlay_status == 'match_applied' ) %]
179 [% ELSIF ( biblio_lis.overlay_status == 'auto_match' ) %]
182 [% biblio_lis.overlay_status %]
184 [% IF ( biblio.match_biblionumber ) %]
185 Matches biblio [% biblio.match_biblionumber %] (score = [% biblio.match_score %]): <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblio.match_biblionumber %]">[% biblio.match_citation %]</a>
189 <li class="quantity">
190 <label for="quantity_record_[% biblio.import_record_id %]" class="required">Quantity: </label>
191 <input id="quantity_record_[% biblio.import_record_id %]" type="text" value="[% biblio.quantity.length ? biblio.quantity : 1 %]" name="quantity" />
194 <label for="price_record_[% biblio.import_record_id %]">Price: </label>
195 <input id="price_record_[% biblio.import_record_id %]" type="text" value="[% biblio.price %]" name="price" />
197 <li class="discount">
198 <label for="discount_record_[% biblio.import_record_id %]">Discount: </label>
199 <input id="discount_record_[% biblio.import_record_id %]" type="text" value="[% biblio.discount %]" name="discount" size="6" /> %
200 (If empty, discount rate from vendor will be used)
203 <label for="fund_record_[% biblio.import_record_id %]">Fund: </label>
205 <input type="hidden" size="20" name="budget_id" value="[% budget_id %]" />[% Budget_name %]
207 <select id="fund_record_[% biblio.import_record_id %]" size="1" name="budget_id">
208 <option value=""></option>
209 [% FOREACH budget IN budget_loop %]
210 [% IF ( budget.b_id == biblio.budget_id ) %]
211 <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>
213 <option value="[% budget.b_id %]" data-sort1-authcat="[% budget.b_sort1_authcat %]" data-sort2-authcat="[% budget.b_sort2_authcat %]">[% budget.b_txt %]</option>
220 <label for="sort1_record_[% biblio.import_record_id %]">Statistic 1: </label>
221 <input id="sort1_record_[% biblio.import_record_id %]" type="text" id="sort1" size="20" name="sort1" value="[% biblio.sort1 %]" />
224 <label for="sort2_record_[% biblio.import_record_id %]">Statistic 2: </label>
225 <input id="sort2_record_[% biblio.import_record_id %]" type="text" id="sort2" size="20" name="sort2" value="[% biblio.sort2 %]" />
231 <div id="items_info">
232 <h2>Item information</h2>
233 <p>Import all the checked items in the basket with the following parameters:</p>
236 <fieldset class="rows" style="float:none;">
237 <legend>Item</legend>
238 [% IF ( NoACQframework ) %]
239 <div class="dialog message">No ACQ framework, using default. You should create a framework with code ACQ, the items framework would be used</div>
241 [% FOREACH item IN items %]
242 <div id="outeritemblock">
245 [% FOREACH iteminformatio IN item.iteminformation %]<li style="[% iteminformatio.hidden %];">
246 <div class="subfield_line" id="subfield[% iteminformatio.serialid %][% iteminformatio.countitems %][% iteminformatio.subfield %][% iteminformatio.random %]">
247 [% IF (iteminformatio.mandatory) %]
248 <label class="required">[% iteminformatio.subfield %] - [% iteminformatio.marc_lib %]</label>
250 <label>[% iteminformatio.subfield %] - [% iteminformatio.marc_lib %]</label>
253 [% iteminformatio.marc_value %]
254 <input type="hidden" name="itemid" value="1" />
255 <input type="hidden" name="kohafield" value="[% iteminformatio.kohafield %]" />
256 <input type="hidden" name="tag" value="[% iteminformatio.tag %]" />
257 <input type="hidden" name="subfield" value="[% iteminformatio.subfield %]" />
258 <input type="hidden" name="mandatory" value="[% iteminformatio.mandatory %]" />
259 [% IF ( iteminformatio.mandatory ) %] <span class="required">Required</span>[% END %]
263 </div><!-- /iteminformation -->
265 [% END %] <!-- /items -->
267 [% END %] <!-- items -->
269 <div id="accounting_details">
270 <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>
271 <fieldset class="rows" style="float:none;">
272 <legend>Accounting details</legend>
275 <!-- origquantityrec only here for javascript compatibility (additem.js needs it, useless here, usefull when receiveing an order -->
276 <input id="origquantityrec" readonly="readonly" type="hidden" name="origquantityrec" value="1" />
280 <span class="label">Fund: </span>
281 <input type="hidden" size="20" name="budget_id" id="budget_id" value="[% budget_id %]" />[% Budget_name %]
284 <label for="all_currency">Currency:</label>
285 <select name="all_currency" id="all_currency">
286 [% FOREACH loop_currencie IN loop_currencies %]
287 [% IF ( loop_currencie.selected ) %]
288 <option value="[% loop_currencie.currcode %]" selected="selected">[% loop_currencie.currcode %]</option>
290 <option value="[% loop_currencie.currcode %]">[% loop_currencie.currcode %]</option>
296 <label for="all_budget_id">Fund: </label>
297 <select id="all_budget_id" size="1" name="all_budget_id">
298 [% FOREACH budget_loo IN budget_loop %]
299 [% IF ( budget_loo.b_sel ) %]
300 <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>
302 <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>
310 <label for="all_order_internalnote">Internal note: </label>
311 <textarea id="all_order_internalnote" cols="30" rows="3" name="all_order_internalnote"></textarea>
314 <label for="all_order_vendornote">Vendor note: </label>
315 <textarea id="all_order_vendornote" cols="30" rows="3" name="all_order_vendornote"></textarea>
318 <div class="hint">The 2 following fields are available for your own usage. They can be useful for statistical purposes</div>
319 <label for="sort1">Statistic 1: </label>
321 <select id="all_sort1" size="1" name="all_sort1">
322 [% FOREACH sort_opt IN CGIsort1 %]
323 [% IF sort_opt.default %]
324 <option value="[% sort_opt.id %]" selected="selected">[% sort_opt.label %]</option>
326 <option value="[% sort_opt.id %]">[% sort_opt.label %]</option>
331 <input type="text" id="all_sort1" size="20" name="all_sort1" value="[% sort1 %]" />
335 <span id="sort2_zone">
336 <label for="sort2">Statistic 2: </label>
338 <select id="all_sort2" size="1" name="all_sort1">
339 [% FOREACH sort_opt IN CGIsort2 %]
340 [% IF sort_opt.default %]
341 <option value="[% sort_opt.id %]" selected="selected">[% sort_opt.label %]</option>
343 <option value="[% sort_opt.id %]">[% sort_opt.label %]</option>
348 <input type="text" id="all_sort2" size="20" name="all_sort2" value="[% sort2 %]" />
357 <fieldset class="action">
358 <input type="submit" value="Save" /><a class="cancel" href="/cgi-bin/koha/acqui/basket.pl?basketno=[% basketno %]">Cancel</a>
363 <h1>Choose the file to add to the basket</h1>
370 <th class="title-string">Staged</th>
372 <th class="NoSort"> </th>
376 [% FOREACH batch_lis IN batch_list %]
378 <td>[% batch_lis.file_name %]</td>
379 <td>[% batch_lis.comments %]</td>
381 [% IF ( batch_lis.import_status == 'cleaned' ) %]
383 [% ELSIF ( batch_lis.import_status == 'imported' ) %]
385 [% ELSIF ( batch_lis.import_status == 'importing' ) %]
387 [% ELSIF ( batch_lis.import_status == 'reverted' ) %]
389 [% ELSIF ( batch_lis.import_status == 'reverting' ) %]
391 [% ELSIF ( batch_lis.import_status == 'staged' ) %]
394 [% batch_lis.import_status %]
397 <td><span title="[% batch_lis.staged_date %]">[% batch_lis.staged_date | $KohaDates with_hours => 1 %]</span></td>
398 <td>[% batch_lis.num_biblios %]</td>
399 <td><a href="[% batch_lis.scriptname %]?import_batch_id=[% batch_lis.import_batch_id %]&basketno=[% basketno %]&booksellerid=[% booksellerid %]">Add orders</a></td>