5 [% INCLUDE 'doc-head-open.inc' %]
7 [% IF ( batch_details ) %]
8 Batch [% import_batch_id | html %]
11 [% END %] › Order staged MARC records › Acquisitions › Koha
13 <style>@media (max-width: 767px) { #dataPreview { margin: 0; width : auto; } }</style>
14 [% INCLUDE 'doc-head-close.inc' %]
15 [%# As long as cataloging plugins rely on 'script' tags added inline, JS must be in the header %]
16 [% Asset.js("js/acquisitions-menu.js") | $raw %]
17 [% INCLUDE 'datatables.inc' %]
18 [% Asset.js("js/acq.js") | $raw %]
19 [% Asset.js("js/funds_sorts.js") | $raw %]
20 [% Asset.js("js/cataloging.js") | $raw %]
21 [% Asset.js("js/addorderiso2709.js") | $raw %]
22 [% INCLUDE 'calendar.inc' %]
25 <body id="acq_addorderiso2709" class="acq">
26 [% INCLUDE 'header.inc' %]
27 [% INCLUDE 'acquisitions-search.inc' %]
29 <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb">
32 <a href="/cgi-bin/koha/mainpage.pl">Home</a>
35 <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a>
38 <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid | uri %]">[% booksellername | html %]</a>
41 <a href="/cgi-bin/koha/acqui/basket.pl?basketno=[% basketno | uri %]">Basket [% basketno | html %]</a>
44 <a href="#" aria-current="page">Add orders from MARC file</a>
49 <div class="container-fluid">
51 <div class="col-sm-6 col-sm-offset-3 col-md-8 col-md-offset-2">
53 <div class="dialog alert">
54 <h4>No records imported</h4>
55 No records have been imported because they all match existing records in your catalog.<br />You'll have to treat them individually.
59 [% IF ( batch_details ) %]
61 Add orders from [% comments | html %]
62 ([% file_name | html %] staged on [% upload_timestamp | $KohaDates with_hours => 1 %])
64 <form action="/cgi-bin/koha/acqui/addorderiso2709.pl" method="post" id="Aform">
65 <div id="tabs" class="toptabs">
67 <li><a href="#records_to_import">Select to import</a></li>
68 <li><a href="#items_info" class="items_info">Item information</a></li>
69 <li><a href="#accounting_details">Default accounting details</a></li>
72 <div id="records_to_import">
73 <div id="searchheader" class="searchheader">
75 <span class="checkall"><a id="checkAll" href="#">Select all</a></span>
77 <span class="uncheckall"><a id="unCheckAll" href="#">Clear all</a></span>
80 <label for="matcher_id">Matching:</label>
81 <select name="matcher_id" id="matcher_id">
82 <option value="_TITLE_AUTHOR_">Title and author</option>
83 <option value="">Do not look for matching records</option>
84 [% FOREACH available_matcher IN available_matchers %]
85 [% IF ( available_matcher.code == current_matcher_code ) %]
86 <option value="[% available_matcher.matcher_id | html %]" selected="selected">
87 [% available_matcher.code | html %] ([% available_matcher.description | html %])
90 <option value="[% available_matcher.matcher_id | html %]">
91 [% available_matcher.code | html %] ([% available_matcher.description | html %])
99 <label for="showallbudgets" style="float:none;width:auto;"> Show inactive funds:</label>
100 <input type="checkbox" id="showallbudgets" />
103 </div> <!-- /#searchheader -->
105 <input type="hidden" name="op" value="import_records"/>
106 <input type="hidden" name="basketno" value="[% basketno | html %]" />
107 <input type="hidden" name="booksellerid" value="[% booksellerid | html %]" />
108 <input type="hidden" name="import_batch_id" value="[% import_batch_id | html %]" />
109 <input type="hidden" name="ordernumber" value="[% ordernumber | html %]" />
111 [% FOREACH biblio IN biblio_list %]
112 <fieldset class="biblio unselected rows" style="float:none;">
114 <label for="record_[% biblio.import_record_id | html %]" style="width:auto;">
115 <input type="checkbox" name="import_record_id" id="record_[% biblio.import_record_id | html %]" value="[% biblio.import_record_id | html %]" />
116 <span class="citation">[% biblio.citation | html %]</span>
118 <span class="links" style="font-weight: normal;">
119 ( <a href="/cgi-bin/koha/catalogue/showmarc.pl?importid=[% biblio.import_record_id | uri %]" class="previewData">MARC</a> | <a href="/cgi-bin/koha/catalogue/showmarc.pl?viewas=card&importid=[% biblio.import_record_id | html %]" class="previewData">Card</a> | <a href="/cgi-bin/koha/acqui/neworderempty.pl?booksellerid=[% booksellerid | html %]&basketno=[% basketno | html %]&breedingid=[% biblio.import_record_id | html %]&import_batch_id=[% biblio.import_batch_id | html %]&biblionumber=[% biblio.match_biblionumber | html %]">Add order</a> )
122 <div style="float:left">
126 [% IF ( biblio_lis.overlay_status == 'no_match' ) %]
127 <span>No match</span>
128 [% ELSIF ( biblio_lis.overlay_status == 'match_applied' ) %]
129 <span>Match applied</span>
130 [% ELSIF ( biblio_lis.overlay_status == 'auto_match' ) %]
131 <span>Match found</span>
133 [% biblio_lis.overlay_status | html %]
135 [% IF ( biblio.match_biblionumber ) %]
136 <span>Matches biblio [% biblio.match_biblionumber | uri %]</span> (score = [% biblio.match_score | html %]): <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblio.match_biblionumber | uri %]">[% biblio.match_citation | html %]</a>
140 <li class="quantity">
141 <label for="quantity_record_[% biblio.import_record_id | html %]" class="required">Quantity: </label>
142 <input id="quantity_record_[% biblio.import_record_id | html %]" type="text" pattern="[0-9]+" value="[% biblio.quantity.length ? biblio.quantity : 1 | html %]" name="quantity" />
143 <span class="required">Required</span>
146 <label for="price_record_[% biblio.import_record_id | html %]">Price: </label>
147 <input id="price_record_[% biblio.import_record_id | html %]" type="text" value="[% biblio.price | html %]" name="price" />
149 <li class="replacementprice">
150 <label for="replacementprice_record_[% biblio.import_record_id | html %]">Replacement price: </label>
151 <input id="replacementprice_record_[% biblio.import_record_id | html %]" type="text" value="[% biblio.replacementprice | html %]" name="replacementprice" />
153 <li class="discount">
154 <label for="discount_record_[% biblio.import_record_id | html %]">Discount: </label>
155 <input id="discount_record_[% biblio.import_record_id | html %]" type="text" value="[% biblio.discount | html %]" name="discount" size="6" /> %
156 <div class="hint">If empty, discount rate from vendor will be used</div>
160 <label for="fund_record_[% biblio.import_record_id | html %]">Fund: </label>
161 <input type="hidden" size="20" name="budget_id" value="[% budget_id | html %]" />[% Budget_name | html %]
163 <label for="fund_record_[% biblio.import_record_id | html %]">Fund: </label>
164 <select id="fund_record_[% biblio.import_record_id | html %]" name="budget_id">
165 <option value="">Select a fund (will use default if set)</option>
166 [% FOREACH budget IN budget_loop %]
167 [% IF ( budget.b_id == biblio.budget_id ) %]
168 [% IF budget.b_active %]
169 <option value="[% budget.b_id | html %]" data-sort1-authcat="[% budget.b_sort1_authcat | html %]" data-sort2-authcat="[% budget.b_sort2_authcat | html %]" selected="selected">[% budget.b_txt | html %]</option>
171 <option value="[% budget.b_id | html %]" data-sort1-authcat="[% budget.b_sort1_authcat | html %]" data-sort2-authcat="[% budget.b_sort2_authcat | html %]" selected="selected">[% budget.b_txt | html %] (inactive)</option>
174 [% IF budget.b_active %]<option value="[% budget.b_id | html %]" data-sort1-authcat="[% budget.b_sort1_authcat | html %]" data-sort2-authcat="[% budget.b_sort2_authcat | html %]">[% budget.b_txt | html %]</option>
175 [% ELSE %]<option value="[% budget.b_id | html %]" class="b_inactive" data-sort1-authcat="[% budget.b_sort1_authcat | html %]" data-sort2-authcat="[% budget.b_sort2_authcat | html %]">[% budget.b_txt | html %] (inactive)</option>
180 <span class="required" style="display:none">Required</span>
184 <label for="sort1_record_[% biblio.import_record_id | html %]">Statistic 1: </label>
185 <input id="sort1_record_[% biblio.import_record_id | html %]" type="text" size="20" name="sort1" value="[% biblio.sort1 | html %]" />
188 <label for="sort2_record_[% biblio.import_record_id | html %]">Statistic 2: </label>
189 <input id="sort2_record_[% biblio.import_record_id | html %]" type="text" size="20" name="sort2" value="[% biblio.sort2 | html %]" />
193 <div style="float:right">
194 [% IF biblio.item_error %]Item records could not be processed because the number of item fields was uneven.[% END %]
195 [% FOREACH item IN biblio.iteminfos %]
197 <legend>Item record [% item.item_id | html %]</legend>
200 <label for="homebranch_item_[% item.item_id | html %]">homebranch</label>
201 <select id="homebranch_item_[% item.item_id | html %]" name="homebranch_[% item.biblio_count | html %]">
202 [% FOREACH l IN libraries %]
203 [% IF l.branchcode == item.homebranch %]
204 <option value="[% l.branchcode | html %]" selected="selected">[% l.branchname | html %]</option>
206 <option value="[% l.branchcode | html %]">[% l.branchname | html %]</option>
213 <label for="holdingbranch_item_[% item.item_id | html %]">holdingbranch</label>
214 <select id="holdingbranch_item_[% item.item_id | html %]" name="holdingbranch_[% item.biblio_count | html %]">
215 [% FOREACH l IN libraries %]
216 [% IF l.branchcode == item.holdingbranch %]
217 <option value="[% l.branchcode | html %]" selected="selected">[% l.branchname | html %]</option>
219 <option value="[% l.branchcode | html %]">[% l.branchname | html %]</option>
225 <label for="itype_item_[% item.item_id | html %]">itype</label>
226 <select id="itype_item_[% item.item_id | html %]" name="itype_[% item.biblio_count | html %]">
227 [% FOREACH itemtype IN itemtypes %]
228 [% IF itemtype.itemtype == item.itype %]
229 <option value="[% itemtype.itemtype | html %]" selected="selected">[% itemtype.description | html %]</option>
231 <option value="[% itemtype.itemtype | html %]">[% itemtype.description | html %]</option>
238 <label for="nonpublic_note_item_[% item.item_id | html %]">nonpublic_note</label>
239 <input type="text" id="nonpublic_note_item_[% item.item_id | html %]" name="nonpublic_note_[% item.biblio_count | html %]" value="[% item.nonpublic_note | html %]">
242 <label for="public_note_item_[% item.item_id | html %]">public_note</label>
243 <input type="text" id="public_note_item_[% item.item_id | html %]" name="public_note_[% item.biblio_count | html %]" value="[% item.public_note | html %]">
246 <label for="loc_item_[% item.item_id | html %]">loc</label>
247 <select id="loc_item_[% item.item_id | html %]" name="loc_[% item.biblio_count | html %]">
248 <option value=""> </option>
249 [% FOREACH locationloo IN locationloop %]
250 [% IF ( locationloo.code ) == (item.loc) %]
251 <option value="[% locationloo.code | html %]" selected="selected">[% locationloo.description | html %]</option>
253 <option value="[% locationloo.code | html %]">[% locationloo.description | html %]</option>
260 <label for="ccode_item_[% item.item_id | html %]">ccode</label>
261 <select id="ccode_item_[% item.item_id | html %]" name="ccode_[% item.biblio_count | html %]">
262 <option value=""> </option>
263 [% FOREACH ccodeloo IN ccodeloop %]
264 [% IF ( ccodeloo.code ) == (item.ccode) %]
265 <option value="[% ccodeloo.code | html %]" selected="selected">[% ccodeloo.description | html %]</option>
267 <option value="[% ccodeloo.code | html %]">[% ccodeloo.description | html %]</option>
274 <label for="notforloan_item_[% item.item_id | html %]">notforloan</label>
275 <select id="notforloan_item_[% item.item_id | html %]" name="notforloan_[% item.biblio_count | html %]">
276 <option value=""> </option>
277 [% FOREACH n IN notforloanloop %]
278 [% IF n.code == item.notforloan %]
279 <option value="[% n.code | html %]" selected="selected">[% n.description | html %]</option>
281 <option value="[% n.code | html %]">[% n.description | html %]</option>
287 <label for="uri_item_[% item.item_id | html %]">uri</label>
288 <input type="text" id="uri_item_[% item.item_id | html %]" name="uri_[% item.biblio_count | html %]" value="[% item.uri | html %]">
291 <label for="copyno_item_[% item.item_id | html %]">copyno</label>
292 <input type="text" id="copyno_item_[% item.item_id | html %]" name="copyno_[% item.biblio_count | html %]" value="[% item.copyno | html %]">
295 <label for="budget_code_item_[% item.item_id | html %]">budget_code</label>
296 <select class="budget_code_item" id="budget_code_item_[% item.item_id | html %]" name="budget_code_[% item.biblio_count | html %]">
297 <option value="">Select a fund (will use default if set)</option>
298 [% FOREACH budget_loo IN budget_loop %]
299 [% IF ( budget_loo.b_id ) == ( item.budget_id ) %]<option value="[% budget_loo.b_id | html %]" selected="selected">[% budget_loo.b_txt | html %]</option>
300 [% ELSE %]<option value="[% budget_loo.b_id | html %]">[% budget_loo.b_txt | html %]</option>
304 <span class="item_fund required">Required</span>
307 <label for="price_item_[% item.item_id | html %]">price</label>
308 <input type="text" id="price_item_[% item.item_id | html %]" name="itemprice_[% item.biblio_count | html %]" value="[% item.itemprice | html %]">
311 <label for="replacementprice_item_[% item.item_id | html %]">replacement price</label>
312 <input type="text" id="replacementprice_item_[% item.item_id | html %]" name="replacementprice_[% item.biblio_count | html %]" value="[% item.replacementprice | html %]">
315 <label for="callnumber_item_[% item.item_id | html %]">callnumber</label>
316 <input type="text" id="callnumber_item_[% item.item_id | html %]" name="itemcallnumber_[% item.biblio_count | html %]" value="[% item.itemcallnumber | html %]">
320 [% END # /FOREACH item %]
322 </fieldset> <!-- .biblio.unselected.rows -->
324 [% END # /FOREACH biblio %]
325 <div class="modal" id="dataPreview" tabindex="-1" role="dialog" aria-labelledby="dataPreviewLabel">
326 <div class="modal-dialog modal-lg" role="document">
327 <div class="modal-content">
328 <div class="modal-header">
329 <button type="button" class="closebtn" data-dismiss="modal" aria-label="Close"><span
330 aria-hidden="true">×</span></button>
331 <h4 id="dataPreviewLabel">MARC preview</h4>
333 <div class="modal-body">
334 <div id="loading"> <img src="[% interface | html %]/[% theme | html %]/img/spinner-small.gif" alt="" /> Loading </div>
336 <div class="modal-footer">
337 <button class="btn btn-default" data-dismiss="modal" aria-hidden="true">Close</button>
339 </div> <!-- /.modal-content -->
340 </div> <!-- /.modal-dialog -->
341 </div> <!-- /#dataPreview -->
342 </div> <!-- /#records_to_import -->
344 <div id="items_info">
345 <h2>Item information</h2>
346 <p>Import all the checked items in the basket with the following parameters:</p>
349 <fieldset class="rows" style="float:none;">
350 <legend>Item</legend>
351 [% IF ( NoACQframework ) %]
352 <div class="dialog message">No ACQ framework, using default. You should create a framework with code ACQ, the items framework would be used</div>
354 [% FOREACH item IN items %]
355 <div id="outeritemblock">
358 [% FOREACH iteminformatio IN item.iteminformation %]
359 <li style="[% iteminformatio.hidden | html %];">
360 <div class="subfield_line" id="subfield[% iteminformatio.serialid | html %][% iteminformatio.countitems | html %][% iteminformatio.subfield | html %][% iteminformatio.random | html %]">
361 [% IF (iteminformatio.mandatory) %]
362 <label class="required">[% iteminformatio.subfield | html %] - [% iteminformatio.marc_lib | $raw %]</label>
364 <label>[% iteminformatio.subfield | html %] - [% iteminformatio.marc_lib | $raw %]</label>
367 [% IF ( iteminformatio.marc_value.type == 'select' ) %]
368 <select name="field_value" class="input_marceditor">
369 [% FOREACH value IN iteminformatio.marc_value.values %]
370 [% IF ( value == iteminformatio.marc_value.default ) %]
371 <option value="[% value | html %]" selected="selected">[% iteminformatio.marc_value.labels.$value | html %]</option>
373 <option value="[% value | html %]">[% iteminformatio.marc_value.labels.$value | html %]</option>
378 [% iteminformatio.marc_value | $raw %]
380 <input type="hidden" name="itemid" value="1" />
381 <input type="hidden" name="kohafield" value="[% iteminformatio.kohafield | html %]" />
382 <input type="hidden" name="tag" value="[% iteminformatio.tag | html %]" />
383 <input type="hidden" name="subfield" value="[% iteminformatio.subfield | html %]" />
384 <input type="hidden" name="mandatory" value="[% iteminformatio.mandatory | html %]" />
385 [% IF ( iteminformatio.mandatory ) %]
386 <span class="required">Required</span>
392 </div><!-- /#itemblock -->
393 </div> <!-- /#outeritemblock -->
394 [% END #/FOREACH item %]
396 [% END # /IF items %]
397 </div> <!-- /#items_info -->
399 <div id="accounting_details">
400 <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>
401 <fieldset class="rows" style="float:none;">
402 <legend>Accounting details</legend>
405 <!-- origquantityrec only here for javascript compatibility (additem.js needs it, useless here, useful when receiveing an order -->
406 <input id="origquantityrec" readonly="readonly" type="hidden" name="origquantityrec" value="1" />
410 <span class="label">Fund: </span>
411 <input type="hidden" size="20" name="budget_id" id="budget_id" value="[% budget_id | html %]" />[% Budget_name | html %]
415 <label for="all_currency">Currency:</label>
416 <select name="all_currency" id="all_currency">
417 [% FOREACH currency IN currencies %]
418 [% IF currency.currency == bookseller.listprice %]
419 <option value="[% currency.currency | html %]" selected="selected">[% currency.currency | html %]</option>
420 [% ELSIF not currency.archived %]
421 <option value="[% currency.currency | html %]">[% currency.currency | html %]</option>
427 <label for="all_budget_id">Fund: </label>
428 <select id="all_budget_id" name="all_budget_id">
429 <option value="">Select a fund (will populate orders/items if set)</option>
430 [% FOREACH budget_loo IN budget_loop %]
431 [% IF ( budget_loo.b_active ) %]
432 <option value="[% budget_loo.b_id | html %]" data-sort1-authcat="[% budget_loo.b_sort1_authcat | html %]" data-sort2-authcat="[% budget_loo.b_sort2_authcat | html %]">[% budget_loo.b_txt | html %]</option>
434 <option value="[% budget_loo.b_id | html %]" class="b_inactive" data-sort1-authcat="[% budget_loo.b_sort1_authcat | html %]" data-sort2-authcat="[% budget_loo.b_sort2_authcat | html %]">[% budget_loo.b_txt | html %] (inactive)</option>
438 <label for="all_showallbudgets" style="float:none;width:auto;"> Show inactive:</label>
439 <input type="checkbox" id="all_showallbudgets" />
443 <label for="all_order_internalnote">Internal note: </label>
444 <textarea id="all_order_internalnote" cols="30" rows="3" name="all_order_internalnote"></textarea>
447 <label for="all_order_vendornote">Vendor note: </label>
448 <textarea id="all_order_vendornote" cols="30" rows="3" name="all_order_vendornote"></textarea>
451 <div class="hint">The 2 following fields are available for your own usage. They can be useful for statistical purposes</div>
452 <label for="all_sort1">Statistic 1: </label>
453 <input type="text" id="all_sort1" size="20" name="all_sort1" value="" />
456 <label for="all_sort2">Statistic 2: </label>
457 <input type="text" id="all_sort2" size="20" name="all_sort2" value="" />
460 </fieldset> <!-- /.rows -->
461 </div> <!-- /#accounting_details -->
462 </div> <!-- /#tabs -->
464 <fieldset class="action">
465 <input id="add_order" type="submit" value="Save" /><a class="cancel" href="/cgi-bin/koha/acqui/basket.pl?basketno=[% basketno | html %]">Cancel</a>
467 </form> <!-- /#Aform -->
468 [% ELSE # IF ( batch_details ) %]
470 <h1>Choose the file to add to the basket</h1>
478 <th># Bibliographic records</th>
479 <th class="NoSort"> </th>
483 [% FOREACH batch_lis IN batch_list %]
485 <td>[% batch_lis.file_name | html %]</td>
486 <td>[% batch_lis.comments | html %]</td>
488 [% IF ( batch_lis.import_status == 'cleaned' ) %]
490 [% ELSIF ( batch_lis.import_status == 'imported' ) %]
491 <span>Imported</span>
492 [% ELSIF ( batch_lis.import_status == 'importing' ) %]
493 <span>Importing</span>
494 [% ELSIF ( batch_lis.import_status == 'reverted' ) %]
495 <span>Reverted</span>
496 [% ELSIF ( batch_lis.import_status == 'reverting' ) %]
497 <span>Reverting</span>
498 [% ELSIF ( batch_lis.import_status == 'staged' ) %]
501 [% batch_lis.import_status | html %]
504 <td data-order="[% batch_lis.staged_date | html %]">
505 [% batch_lis.staged_date | $KohaDates with_hours => 1 %]
507 <td>[% batch_lis.num_records | html %]</td>
509 <a href="[% batch_lis.scriptname | url %]?import_batch_id=[% batch_lis.import_batch_id | uri %]&basketno=[% basketno | uri %]&booksellerid=[% booksellerid | uri %]" class="btn btn-default btn-xs"><i class="fa fa-plus"></i> Add orders</a>
512 [% END # /FOREACH batch_lis %]
514 </table> <!-- /#files -->
516 [% END # /IF ( batch_details ) %]
517 </div> [% # /div.col-sm-6 %]
518 </div> [% # /div.row %]
520 [% INCLUDE 'intranet-bottom.inc' %]