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>.biblio { padding: 0 .5em;margin:0; }.item_edit_form{border-top:1px solid #AAA;padding-top:.5em;}@media (max-width: 767px) { #dataPreview { margin: 0; width : auto; } }</style>
14 [% INCLUDE 'doc-head-close.inc' %]
15 [% Asset.css("css/addbiblio.css") | $raw %]
16 [%# As long as cataloging plugins rely on 'script' tags added inline, JS must be in the header %]
18 const template_path = "[% interface | html %]/[% theme | html %]";
20 [% Asset.js("js/acquisitions-menu.js") | $raw %]
21 [% INCLUDE 'datatables.inc' %]
22 [% Asset.js("js/acq.js") | $raw %]
23 [% Asset.js("js/funds_sorts.js") | $raw %]
24 [% Asset.js("js/cataloging.js") | $raw %]
25 [% Asset.js("js/addorderiso2709.js") | $raw %]
26 [% INCLUDE 'calendar.inc' %]
29 <body id="acq_addorderiso2709" class="acq">
30 [% WRAPPER 'header.inc' %]
31 [% INCLUDE 'acquisitions-search.inc' %]
34 [% WRAPPER 'sub-header.inc' %]
35 [% WRAPPER breadcrumbs %]
36 [% WRAPPER breadcrumb_item %]
37 <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a>
39 [% WRAPPER breadcrumb_item %]
40 <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid | uri %]">[% booksellername | html %]</a>
42 [% WRAPPER breadcrumb_item %]
43 <a href="/cgi-bin/koha/acqui/basket.pl?basketno=[% basketno | uri %]">Basket [% basketno | html %]</a>
45 [% WRAPPER breadcrumb_item bc_active= 1 %]
46 <span>Add orders from MARC file</span>
48 [% END #/ WRAPPER breadcrumbs %]
49 [% END #/ WRAPPER sub-header.inc %]
51 <div class="container-fluid">
53 <div class="col-md-10 col-md-offset-1">
55 <div class="dialog alert">
56 <h4>No records imported</h4>
57 No records have been imported because they all match existing records in your catalog.<br />You'll have to treat them individually.
61 [% IF ( batch_details ) %]
63 Add orders from [% comments | html %]
64 ([% file_name | html %] staged on [% upload_timestamp | $KohaDates with_hours => 1 %])
66 <form action="/cgi-bin/koha/acqui/addorderiso2709.pl" method="post" id="Aform">
67 [% WRAPPER tabs id= "tabs" %]
68 [% WRAPPER tabs_nav %]
69 [% WRAPPER tab_item tabname= "records_to_import" bt_active= 1 %] <span>Select to import</span> [% END %]
71 [% WRAPPER tab_item tabname= "items_info" %] <span>Item information</span> [% END %]
73 [% WRAPPER tab_item tabname= "accounting_details" %] <span>Default accounting details</span> [% END %]
76 [% WRAPPER tab_panels %]
77 [% WRAPPER tab_panel tabname= "records_to_import" bt_active= 1 %]
78 <div id="searchheader" class="searchheader">
80 <span class="checkall"><a id="checkAll" href="#">Select all</a></span>
82 <span class="uncheckall"><a id="unCheckAll" href="#">Clear all</a></span>
85 <label for="matcher_id">Matching:</label>
86 <select name="matcher_id" id="matcher_id">
87 <option value="_TITLE_AUTHOR_">Title and author</option>
88 <option value="">Do not look for matching records</option>
89 [% FOREACH available_matcher IN available_matchers %]
90 [% IF ( available_matcher.code == current_matcher_code ) %]
91 <option value="[% available_matcher.matcher_id | html %]" selected="selected">
92 [% available_matcher.code | html %] ([% available_matcher.description | html %])
95 <option value="[% available_matcher.matcher_id | html %]">
96 [% available_matcher.code | html %] ([% available_matcher.description | html %])
104 <label for="showallbudgets" style="float:none;width:auto;"> Show inactive funds:</label>
105 <input type="checkbox" id="showallbudgets" />
108 </div> <!-- /#searchheader -->
110 <input type="hidden" name="op" value="import_records"/>
111 <input type="hidden" name="basketno" value="[% basketno | html %]" />
112 <input type="hidden" name="booksellerid" value="[% booksellerid | html %]" />
113 <input type="hidden" name="import_batch_id" value="[% import_batch_id | html %]" />
114 <input type="hidden" name="ordernumber" value="[% ordernumber | html %]" />
116 <table class="biblio unselected dataTable">
118 [% FOREACH biblio IN import_biblio_list %]
121 <input type="checkbox" name="import_record_id" id="record_[% biblio.import_record_id | html %]" value="[% biblio.import_record_id | html %]" />
124 <label for="record_[% biblio.import_record_id | html %]">
125 <span class="title citation">
126 [%- biblio.import_biblio.title | html -%]
127 [% biblio.import_biblio.author | html -%]
128 [% IF (biblio.import_biblio.isbn || biblio.import_biblio.issn) -%]
129 ([%- biblio.import_biblio.isbn | html -%]
130 [%- IF (biblio.import_biblio.isbn && biblio.import_biblio.issn ) %] & [%- END -%]
131 [%- biblio.import_biblio.issn | html %])
135 <fieldset class="rows order_details">
138 <span class="label">Match:</span>
140 [% IF ( biblio_lis.overlay_status == 'no_match' ) %]
141 <span>No match</span>
142 [% ELSIF ( biblio_lis.overlay_status == 'match_applied' ) %]
143 <span>Match applied</span>
144 [% ELSIF ( biblio_lis.overlay_status == 'auto_match' ) %]
145 <span>Match found</span>
147 [% biblio_lis.overlay_status | html %]
149 [% IF ( biblio.match_biblionumber ) %]
150 <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>
154 <li class="quantity">
155 <label for="quantity_record_[% biblio.import_record_id | html %]" class="required">Quantity: </label>
156 <input id="quantity_record_[% biblio.import_record_id | html %]" type="text" pattern="[0-9]+" value="[% biblio.quantity.length ? biblio.quantity : 1 | html %]" name="quantity" />
157 <span class="required">Required</span>
160 <label for="price_record_[% biblio.import_record_id | html %]">Price: </label>
161 <input id="price_record_[% biblio.import_record_id | html %]" type="text" value="[% biblio.price | html %]" name="price" />
163 <li class="replacementprice">
164 <label for="replacementprice_record_[% biblio.import_record_id | html %]">Replacement price: </label>
165 <input id="replacementprice_record_[% biblio.import_record_id | html %]" type="text" value="[% biblio.replacementprice | html %]" name="replacementprice" />
167 <li class="discount">
168 <label for="discount_record_[% biblio.import_record_id | html %]">Discount: </label>
169 <input id="discount_record_[% biblio.import_record_id | html %]" type="text" value="[% biblio.discount | html %]" name="discount" size="6" /> %
170 <div class="hint">If empty, discount rate from vendor will be used</div>
174 <label for="fund_record_[% biblio.import_record_id | html %]">Fund: </label>
175 <input type="hidden" size="20" name="budget_id" value="[% budget_id | html %]" />[% Budget_name | html %]
177 <label for="fund_record_[% biblio.import_record_id | html %]">Fund: </label>
178 <select id="fund_record_[% biblio.import_record_id | html %]" name="budget_id">
179 <option value="">Select a fund (will use default if set)</option>
180 [% FOREACH budget IN budget_loop %]
181 [% IF ( budget.b_id == biblio.budget_id ) %]
182 [% IF budget.b_active %]
183 <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>
185 <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>
188 [% 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>
189 [% 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>
194 <span class="required" style="display:none">Required</span>
198 <label for="sort1_record_[% biblio.import_record_id | html %]">Statistic 1: </label>
199 <input id="sort1_record_[% biblio.import_record_id | html %]" type="text" size="20" name="sort1" value="[% biblio.sort1 | html %]" />
202 <label for="sort2_record_[% biblio.import_record_id | html %]">Statistic 2: </label>
203 <input id="sort2_record_[% biblio.import_record_id | html %]" type="text" size="20" name="sort2" value="[% biblio.sort2 | html %]" />
206 [% IF ( biblio.iteminfos.size ) %]
207 <div class="item_edit_form">
208 [% IF biblio.item_error %]Item records could not be processed because the number of item fields was uneven.[% END %]
209 [% FOREACH item IN biblio.iteminfos %]
211 <legend>Item record [% item.item_id | html %]</legend>
214 <label for="homebranch_item_[% item.item_id | html %]">homebranch</label>
215 <select id="homebranch_item_[% item.item_id | html %]" name="homebranch_[% biblio.import_record_id | html %]">
216 [% FOREACH l IN libraries %]
217 [% IF l.branchcode == item.homebranch %]
218 <option value="[% l.branchcode | html %]" selected="selected">[% l.branchname | html %]</option>
220 <option value="[% l.branchcode | html %]">[% l.branchname | html %]</option>
227 <label for="holdingbranch_item_[% item.item_id | html %]">holdingbranch</label>
228 <select id="holdingbranch_item_[% item.item_id | html %]" name="holdingbranch_[% biblio.import_record_id | html %]">
229 [% FOREACH l IN libraries %]
230 [% IF l.branchcode == item.holdingbranch %]
231 <option value="[% l.branchcode | html %]" selected="selected">[% l.branchname | html %]</option>
233 <option value="[% l.branchcode | html %]">[% l.branchname | html %]</option>
239 <label for="itype_item_[% item.item_id | html %]">itype</label>
240 <select id="itype_item_[% item.item_id | html %]" name="itype_[% biblio.import_record_id | html %]">
241 [% FOREACH itemtype IN itemtypes %]
242 [% IF itemtype.itemtype == item.itype %]
243 <option value="[% itemtype.itemtype | html %]" selected="selected">[% itemtype.description | html %]</option>
245 <option value="[% itemtype.itemtype | html %]">[% itemtype.description | html %]</option>
252 <label for="nonpublic_note_item_[% item.item_id | html %]">nonpublic_note</label>
253 <input type="text" id="nonpublic_note_item_[% item.item_id | html %]" name="nonpublic_note_[% biblio.import_record_id | html %]" value="[% item.nonpublic_note | html %]">
256 <label for="public_note_item_[% item.item_id | html %]">public_note</label>
257 <input type="text" id="public_note_item_[% item.item_id | html %]" name="public_note_[% biblio.import_record_id | html %]" value="[% item.public_note | html %]">
260 <label for="loc_item_[% item.item_id | html %]">loc</label>
261 <select id="loc_item_[% item.item_id | html %]" name="loc_[% biblio.import_record_id | html %]">
262 <option value=""> </option>
263 [% FOREACH locationloo IN locationloop %]
264 [% IF ( locationloo.code ) == (item.loc) %]
265 <option value="[% locationloo.code | html %]" selected="selected">[% locationloo.description | html %]</option>
267 <option value="[% locationloo.code | html %]">[% locationloo.description | html %]</option>
274 <label for="ccode_item_[% item.item_id | html %]">ccode</label>
275 <select id="ccode_item_[% item.item_id | html %]" name="ccode_[% biblio.import_record_id | html %]">
276 <option value=""> </option>
277 [% FOREACH ccodeloo IN ccodeloop %]
278 [% IF ( ccodeloo.code ) == (item.ccode) %]
279 <option value="[% ccodeloo.code | html %]" selected="selected">[% ccodeloo.description | html %]</option>
281 <option value="[% ccodeloo.code | html %]">[% ccodeloo.description | html %]</option>
288 <label for="notforloan_item_[% item.item_id | html %]">notforloan</label>
289 <select id="notforloan_item_[% item.item_id | html %]" name="notforloan_[% biblio.import_record_id | html %]">
290 <option value=""> </option>
291 [% FOREACH n IN notforloanloop %]
292 [% IF n.code == item.notforloan %]
293 <option value="[% n.code | html %]" selected="selected">[% n.description | html %]</option>
295 <option value="[% n.code | html %]">[% n.description | html %]</option>
301 <label for="uri_item_[% item.item_id | html %]">uri</label>
302 <input type="text" id="uri_item_[% item.item_id | html %]" name="uri_[% biblio.import_record_id | html %]" value="[% item.uri | html %]">
305 <label for="copyno_item_[% item.item_id | html %]">copyno</label>
306 <input type="text" id="copyno_item_[% item.item_id | html %]" name="copyno_[% biblio.import_record_id | html %]" value="[% item.copyno | html %]">
309 <label for="budget_code_item_[% item.item_id | html %]">budget_code</label>
310 <select class="budget_code_item" id="budget_code_item_[% item.item_id | html %]" name="budget_code_[% biblio.import_record_id | html %]">
311 <option value="">Select a fund (will use default if set)</option>
312 [% FOREACH budget_loo IN budget_loop %]
313 [% IF ( budget_loo.b_id ) == ( item.budget_id ) %]<option value="[% budget_loo.b_id | html %]" selected="selected">[% budget_loo.b_txt | html %]</option>
314 [% ELSE %]<option value="[% budget_loo.b_id | html %]">[% budget_loo.b_txt | html %]</option>
318 <span class="item_fund required">Required</span>
321 <label for="price_item_[% item.item_id | html %]">price</label>
322 <input type="text" id="price_item_[% item.item_id | html %]" name="itemprice_[% biblio.import_record_id | html %]" value="[% item.itemprice | html %]">
325 <label for="replacementprice_item_[% item.item_id | html %]">replacement price</label>
326 <input type="text" id="replacementprice_item_[% item.item_id | html %]" name="replacementprice_[% biblio.import_record_id | html %]" value="[% item.replacementprice | html %]">
329 <label for="callnumber_item_[% item.item_id | html %]">callnumber</label>
330 <input type="text" id="callnumber_item_[% item.item_id | html %]" name="itemcallnumber_[% biblio.import_record_id | html %]" value="[% item.itemcallnumber | html %]">
334 [% END # /FOREACH item %]
335 </div> <!-- /.item_edit_form -->
337 </fieldset> <!-- /.rows.order_details -->
340 <a href="/cgi-bin/koha/catalogue/showmarc.pl?importid=[% biblio.import_record_id | uri %]" class="previewData btn btn-default btn-xs">MARC</a>
341 <a href="/cgi-bin/koha/catalogue/showmarc.pl?viewas=card&importid=[% biblio.import_record_id | uri %]" class="previewData btn btn-default btn-xs">Card</a>
342 <a href="/cgi-bin/koha/acqui/neworderempty.pl?booksellerid=[% booksellerid | uri %]&basketno=[% basketno | uri %]&breedingid=[% biblio.import_record_id | uri %]&import_batch_id=[% biblio.import_batch_id | uri %]&biblionumber=[% biblio.match_biblionumber | uri %]" class="btn btn-default btn-xs">Add order</a>
345 [% END # /FOREACH biblio %]
347 </table> <!-- .biblio.unselected.rows -->
349 <div class="modal" id="dataPreview" tabindex="-1" role="dialog" aria-labelledby="dataPreviewLabel">
350 <div class="modal-dialog modal-lg" role="document">
351 <div class="modal-content">
352 <div class="modal-header">
353 <button type="button" class="closebtn" data-dismiss="modal" aria-label="Close"><span
354 aria-hidden="true">×</span></button>
355 <h4 id="dataPreviewLabel">MARC preview</h4>
357 <div class="modal-body">
358 <div id="loading"> <img src="[% interface | html %]/[% theme | html %]/img/spinner-small.gif" alt="" /> Loading </div>
360 <div class="modal-footer">
361 <button class="btn btn-default" data-dismiss="modal" aria-hidden="true">Close</button>
363 </div> <!-- /.modal-content -->
364 </div> <!-- /.modal-dialog -->
365 </div> <!-- /#dataPreview -->
366 [% END # /#records_to_import %]
369 [% WRAPPER tab_panel tabname= "items_info" %]
370 <h2>Item information</h2>
371 <p>Import all the checked items in the basket with the following parameters:</p>
373 <fieldset class="rows" style="float:none;">
374 <legend>Item</legend>
375 [% IF ( NoACQframework ) %]
376 <div class="dialog message">No ACQ framework, using default. You should create a framework with code ACQ, the items framework would be used</div>
378 <div class="item_edit_form">
379 [% FOREACH item IN items %]
380 <div id="outeritemblock">
383 [% FOREACH iteminformatio IN item.iteminformation %]
384 <li style="[% iteminformatio.hidden | html %];">
385 <div class="subfield_line" id="subfield[% iteminformatio.serialid | html %][% iteminformatio.countitems | html %][% iteminformatio.subfield | html %][% iteminformatio.random | html %]">
386 [% IF (iteminformatio.mandatory) %]
387 <label class="required">[% iteminformatio.subfield | html %] - [% iteminformatio.marc_lib | $raw %]</label>
389 <label>[% iteminformatio.subfield | html %] - [% iteminformatio.marc_lib | $raw %]</label>
392 [% IF ( iteminformatio.marc_value.type == 'select' ) %]
393 <select name="field_value" class="input_marceditor">
394 [% FOREACH value IN iteminformatio.marc_value.values %]
395 [% IF ( value == iteminformatio.marc_value.default ) %]
396 <option value="[% value | html %]" selected="selected">[% iteminformatio.marc_value.labels.$value | html %]</option>
398 <option value="[% value | html %]">[% iteminformatio.marc_value.labels.$value | html %]</option>
403 [% iteminformatio.marc_value | $raw %]
405 <input type="hidden" name="itemid" value="1" />
406 <input type="hidden" name="kohafield" value="[% iteminformatio.kohafield | html %]" />
407 <input type="hidden" name="tag" value="[% iteminformatio.tag | html %]" />
408 <input type="hidden" name="subfield" value="[% iteminformatio.subfield | html %]" />
409 <input type="hidden" name="mandatory" value="[% iteminformatio.mandatory | html %]" />
410 [% IF ( iteminformatio.mandatory ) %]
411 <span class="required">Required</span>
417 </div><!-- /#itemblock -->
418 </div> <!-- /#outeritemblock -->
419 [% END #/FOREACH item %]
420 </div> <!-- /.item_edit_form -->
422 [% END # /#items_info %]
423 [% END # /IF items %]
425 [% WRAPPER tab_panel tabname= "accounting_details" %]
426 <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>
427 <fieldset class="rows" style="float:none;">
428 <legend>Accounting details</legend>
431 <!-- origquantityrec only here for javascript compatibility (additem.js needs it, useless here, useful when receiveing an order -->
432 <input id="origquantityrec" readonly="readonly" type="hidden" name="origquantityrec" value="1" />
436 <span class="label">Fund: </span>
437 <input type="hidden" size="20" name="budget_id" id="budget_id" value="[% budget_id | html %]" />[% Budget_name | html %]
441 <label for="all_currency">Currency:</label>
442 <select name="all_currency" id="all_currency">
443 [% FOREACH currency IN currencies %]
444 [% IF currency.currency == bookseller.listprice %]
445 <option value="[% currency.currency | html %]" selected="selected">[% currency.currency | html %]</option>
446 [% ELSIF not currency.archived %]
447 <option value="[% currency.currency | html %]">[% currency.currency | html %]</option>
453 <label for="all_budget_id">Fund: </label>
454 <select id="all_budget_id" name="all_budget_id">
455 <option value="">Select a fund (will populate orders/items if set)</option>
456 [% FOREACH budget_loo IN budget_loop %]
457 [% IF ( budget_loo.b_active ) %]
458 <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>
460 <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>
464 <label for="all_showallbudgets" style="float:none;width:auto;"> Show inactive:</label>
465 <input type="checkbox" id="all_showallbudgets" />
469 <label for="all_order_internalnote">Internal note: </label>
470 <textarea id="all_order_internalnote" cols="30" rows="3" name="all_order_internalnote"></textarea>
473 <label for="all_order_vendornote">Vendor note: </label>
474 <textarea id="all_order_vendornote" cols="30" rows="3" name="all_order_vendornote"></textarea>
477 <div class="hint">The 2 following fields are available for your own usage. They can be useful for statistical purposes</div>
480 <label for="all_sort1">Statistic 1: </label>
481 <input type="text" id="all_sort1" size="20" name="all_sort1" value="" />
484 <label for="all_sort2">Statistic 2: </label>
485 <input type="text" id="all_sort2" size="20" name="all_sort2" value="" />
488 </fieldset> <!-- /.rows -->
489 [% END # /#accounting_details %]
490 [% END #/WRAPPER tab_panels %]
491 [% END # /WRAPPER tabs %]
492 <fieldset class="action">
493 <input type="submit" id="add_order" class="btn btn-primary" value="Save" /><a class="cancel" href="/cgi-bin/koha/acqui/basket.pl?basketno=[% basketno | html %]">Cancel</a>
495 </form> <!-- /#Aform -->
496 [% ELSE # IF ( batch_details ) %]
498 <h1>Choose the file to add to the basket</h1>
506 <th># Bibliographic records</th>
507 <th class="NoSort"> </th>
511 [% FOREACH batch_lis IN batch_list %]
513 <td>[% batch_lis.file_name | html %]</td>
514 <td>[% batch_lis.comments | html %]</td>
516 [% IF ( batch_lis.import_status == 'cleaned' ) %]
518 [% ELSIF ( batch_lis.import_status == 'imported' ) %]
519 <span>Imported</span>
520 [% ELSIF ( batch_lis.import_status == 'importing' ) %]
521 <span>Importing</span>
522 [% ELSIF ( batch_lis.import_status == 'reverted' ) %]
523 <span>Reverted</span>
524 [% ELSIF ( batch_lis.import_status == 'reverting' ) %]
525 <span>Reverting</span>
526 [% ELSIF ( batch_lis.import_status == 'staged' ) %]
529 [% batch_lis.import_status | html %]
532 <td data-order="[% batch_lis.staged_date | html %]">
533 [% batch_lis.staged_date | $KohaDates with_hours => 1 %]
535 <td>[% batch_lis.num_records | html %]</td>
537 <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>
540 [% END # /FOREACH batch_lis %]
542 </table> <!-- /#files -->
544 [% END # /IF ( batch_details ) %]
545 </div> [% # /div.col-sm-6 %]
546 </div> [% # /div.row %]
548 [% INCLUDE 'intranet-bottom.inc' %]