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>#dataPreview { width : 80%; } @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/addorderiso2709.js") | $raw %]
23 <body id="acq_addorderiso2709" class="acq">
24 [% INCLUDE 'header.inc' %]
25 [% INCLUDE 'acquisitions-search.inc' %]
27 <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb">
30 <a href="/cgi-bin/koha/mainpage.pl">Home</a>
33 <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a>
36 <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid | uri %]">[% booksellername | html %]</a>
39 <a href="/cgi-bin/koha/acqui/basket.pl?basketno=[% basketno | uri %]">Basket [% basketno | html %]</a>
42 <a href="#" aria-current="page">Add orders from MARC file</a>
47 <div class="container-fluid">
49 <div class="col-sm-6 col-sm-offset-3 col-md-8 col-md-offset-2">
50 [% IF ( allmatch ) %]<div class="dialog alert">
51 <h4>No records imported</h4>
52 No records have been imported because they all match existing records in your catalog.<br />You'll have to treat them individually.
56 [% IF ( batch_details ) %]
57 <h1>Add orders from [% comments | html %]
58 ([% file_name | html %] staged on [% upload_timestamp | $KohaDates with_hours => 1 %])
60 <form action="/cgi-bin/koha/acqui/addorderiso2709.pl" method="post" id="Aform">
61 <div id="tabs" class="toptabs">
63 <li><a href="#records_to_import">Select to import</a></li>
64 <li><a href="#items_info" class="items_info">Item information</a></li>
65 <li><a href="#accounting_details">Default accounting details</a></li>
68 <div id="records_to_import">
69 <div id="searchheader" class="searchheader">
71 <span class="checkall"><a id="checkAll" href="#">Select all</a></span>
73 <span class="uncheckall"><a id="unCheckAll" href="#">Clear all</a></span>
76 <label for="matcher_id">Matching:</label>
77 <select name="matcher_id" id="matcher_id">
78 <option value="_TITLE_AUTHOR_">Title and author</option>
79 <option value="">Do not look for matching records</option>
80 [% FOREACH available_matcher IN available_matchers %]
81 [% IF ( available_matcher.code == current_matcher_code ) %]
82 <option value="[% available_matcher.matcher_id | html %]" selected="selected">
83 [% available_matcher.code | html %] ([% available_matcher.description | html %])
86 <option value="[% available_matcher.matcher_id | html %]">
87 [% available_matcher.code | html %] ([% available_matcher.description | html %])
95 <label for="showallbudgets" style="float:none;width:auto;"> Show inactive funds:</label>
96 <input type="checkbox" id="showallbudgets" />
101 <input type="hidden" name="op" value="import_records"/>
102 <input type="hidden" name="basketno" value="[% basketno | html %]" />
103 <input type="hidden" name="booksellerid" value="[% booksellerid | html %]" />
104 <input type="hidden" name="import_batch_id" value="[% import_batch_id | html %]" />
105 <input type="hidden" name="ordernumber" value="[% ordernumber | html %]" />
107 [% FOREACH biblio IN biblio_list %]
108 <fieldset class="biblio unselected rows" style="float:none;">
110 <label for="record_[% biblio.import_record_id | html %]" style="width:auto;">
111 <input type="checkbox" name="import_record_id" id="record_[% biblio.import_record_id | html %]" value="[% biblio.import_record_id | html %]" />
112 <span class="citation">[% biblio.citation | html %]</span>
114 <span class="links" style="font-weight: normal;">
115 ( <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> )
118 <div style="float:left">
122 [% IF ( biblio_lis.overlay_status == 'no_match' ) %]
124 [% ELSIF ( biblio_lis.overlay_status == 'match_applied' ) %]
126 [% ELSIF ( biblio_lis.overlay_status == 'auto_match' ) %]
129 [% biblio_lis.overlay_status | html %]
131 [% IF ( biblio.match_biblionumber ) %]
132 Matches biblio [% biblio.match_biblionumber | uri %] (score = [% biblio.match_score | html %]): <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblio.match_biblionumber | uri %]">[% biblio.match_citation | html %]</a>
136 <li class="quantity">
137 <label for="quantity_record_[% biblio.import_record_id | html %]" class="required">Quantity: </label>
138 <input id="quantity_record_[% biblio.import_record_id | html %]" type="text" pattern="[0-9]+" value="[% biblio.quantity.length ? biblio.quantity : 1 | html %]" name="quantity" />
139 <span class="required">Required</span>
142 <label for="price_record_[% biblio.import_record_id | html %]">Price: </label>
143 <input id="price_record_[% biblio.import_record_id | html %]" type="text" value="[% biblio.price | html %]" name="price" />
145 <li class="replacementprice">
146 <label for="replacementprice_record_[% biblio.import_record_id | html %]">Replacement price: </label>
147 <input id="replacementprice_record_[% biblio.import_record_id | html %]" type="text" value="[% biblio.replacementprice | html %]" name="replacementprice" />
149 <li class="discount">
150 <label for="discount_record_[% biblio.import_record_id | html %]">Discount: </label>
151 <input id="discount_record_[% biblio.import_record_id | html %]" type="text" value="[% biblio.discount | html %]" name="discount" size="6" /> %
152 <div class="hint">If empty, discount rate from vendor will be used</div>
156 <label for="fund_record_[% biblio.import_record_id | html %]">Fund: </label>
157 <input type="hidden" size="20" name="budget_id" value="[% budget_id | html %]" />[% Budget_name | html %]
159 <label for="fund_record_[% biblio.import_record_id | html %]">Fund: </label>
160 <select id="fund_record_[% biblio.import_record_id | html %]" name="budget_id">
161 <option value="">Select a fund (will use default if set)</option>
162 [% FOREACH budget IN budget_loop %]
163 [% IF ( budget.b_id == biblio.budget_id ) %]
164 [% IF budget.b_active %]
165 <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>
167 <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>
170 [% 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>
171 [% 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>
176 <span class="required" style="display:none">Required</span>
180 <label for="sort1_record_[% biblio.import_record_id | html %]">Statistic 1: </label>
181 <input id="sort1_record_[% biblio.import_record_id | html %]" type="text" id="sort1" size="20" name="sort1" value="[% biblio.sort1 | html %]" />
184 <label for="sort2_record_[% biblio.import_record_id | html %]">Statistic 2: </label>
185 <input id="sort2_record_[% biblio.import_record_id | html %]" type="text" id="sort2" size="20" name="sort2" value="[% biblio.sort2 | html %]" />
189 <div style="float:right">
190 [% IF biblio.item_error %]Item records could not be processed because the number of item fields was uneven.[% END %]
191 [% FOREACH item IN biblio.iteminfos %]
193 <legend>Item record [% item.item_id | html %]</legend>
196 <label for="homebranch_item_[% item.item_id | html %]">homebranch</label><select id="homebranch_item_[% item.item_id | html %]" name="homebranch_[% item.biblio_count | html %]">
197 [% FOREACH l IN libraries %]
198 [% IF l.branchcode == item.homebranch %]
199 <option value="[% l.branchcode | html %]" selected="selected">[% l.branchname | html %]</option>
201 <option value="[% l.branchcode | html %]">[% l.branchname | html %]</option>
207 <li><label for="holdingbranch_item_[% item.item_id | html %]">holdingbranch</label><select id="holdingbranch_item_[% item.item_id | html %]" name="holdingbranch_[% item.biblio_count | html %]">
208 [% FOREACH l IN libraries %]
209 [% IF l.branchcode == item.holdingbranch %]
210 <option value="[% l.branchcode | html %]" selected="selected">[% l.branchname | html %]</option>
212 <option value="[% l.branchcode | html %]">[% l.branchname | html %]</option>
217 <li><label for="itype_item_[% item.item_id | html %]">itype</label><select id="itype_item_[% item.item_id | html %]" name="itype_[% item.biblio_count | html %]">
218 [% FOREACH itemtype IN itemtypes %]
219 [% IF itemtype.itemtype == item.itype %]
220 <option value="[% itemtype.itemtype | html %]" selected="selected">[% itemtype.description | html %]</option>
222 <option value="[% itemtype.itemtype | html %]">[% itemtype.description | html %]</option>
228 <li><label for="nonpublic_note_item_[% item.item_id | html %]">nonpublic_note</label><input type="text" id="nonpublic_note_item_[% item.item_id | html %]" name="nonpublic_note_[% item.biblio_count | html %]" value="[% item.nonpublic_note | html %]"></li>
229 <li><label for="public_note_item_[% item.item_id | html %]">public_note</label><input type="text" id="public_note_item_[% item.item_id | html %]" name="public_note_[% item.biblio_count | html %]" value="[% item.public_note | html %]"></li>
230 <li><label for="loc_item_[% item.item_id | html %]">loc</label><select id="loc_item_[% item.item_id | html %]" name="loc_[% item.biblio_count | html %]">
231 <option value=""> </option>
232 [% FOREACH locationloo IN locationloop %]
233 [% IF ( locationloo.code ) == (item.loc) %]<option value="[% locationloo.code | html %]" selected="selected">[% locationloo.description | html %]</option>[% ELSE %]<option value="[% locationloo.code | html %]">[% locationloo.description | html %]</option>[% END %]
238 <li><label for="ccode_item_[% item.item_id | html %]">ccode</label><select id="ccode_item_[% item.item_id | html %]" name="ccode_[% item.biblio_count | html %]">
239 <option value=""> </option>
240 [% FOREACH ccodeloo IN ccodeloop %]
241 [% IF ( ccodeloo.code ) == (item.ccode) %]<option value="[% ccodeloo.code | html %]" selected="selected">[% ccodeloo.description | html %]</option>[% ELSE %]<option value="[% ccodeloo.code | html %]">[% ccodeloo.description | html %]</option>[% END %]
246 <li><label for="notforloan_item_[% item.item_id | html %]">notforloan</label><select id="notforloan_item_[% item.item_id | html %]" name="notforloan_[% item.biblio_count | html %]">
247 <option value=""> </option>
248 [% FOREACH n IN notforloanloop %]
249 [% IF n.code == item.notforloan %]
250 <option value="[% n.code | html %]" selected="selected">[% n.description | html %]</option>
252 <option value="[% n.code | html %]">[% n.description | html %]</option>
257 <li><label for="uri_item_[% item.item_id | html %]">uri</label><input type="text" id="uri_item_[% item.item_id | html %]" name="uri_[% item.biblio_count | html %]" value="[% item.uri | html %]"></li>
258 <li><label for="copyno_item_[% item.item_id | html %]">copyno</label><input type="text" id="copyno_item_[% item.item_id | html %]" name="copyno_[% item.biblio_count | html %]" value="[% item.copyno | html %]"></li>
259 <li><label for="budget_code_item_[% item.item_id | html %]">budget_code</label><select class="budget_code_item" id="budget_code_item_[% item.item_id | html %]" name="budget_code_[% item.biblio_count | html %]">
260 <option value="">Select a fund (will use default if set)</option>
261 [% FOREACH budget_loo IN budget_loop %]
262 [% IF ( budget_loo.b_id ) == ( item.budget_id ) %]<option value="[% budget_loo.b_id | html %]" selected="selected">[% budget_loo.b_txt | html %]</option>
263 [% ELSE %]<option value="[% budget_loo.b_id | html %]">[% budget_loo.b_txt | html %]</option>
267 <span class="item_fund required">Required</span>
269 <li><label for="price_item_[% item.item_id | html %]">price</label><input type="text" id="price_item_[% item.item_id | html %]" name="itemprice_[% item.biblio_count | html %]" value="[% item.itemprice | html %]"></li>
270 <li><label for="replacementprice_item_[% item.item_id | html %]">replacement price</label><input type="text" id="replacementprice_item_[% item.item_id | html %]" name="replacementprice_[% item.biblio_count | html %]" value="[% item.replacementprice | html %]"></li>
271 <li><label for="callnumber_item_[% item.item_id | html %]">callnumber</label><input type="text" id="callnumber_item_[% item.item_id | html %]" name="itemcallnumber_[% item.biblio_count | html %]" value="[% item.itemcallnumber | html %]"></li>
277 <div id="dataPreview" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="dataPreviewLabel" aria-hidden="true">
278 <div class="modal-dialog">
279 <div class="modal-content">
280 <div class="modal-header">
281 <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
282 <h3 id="dataPreviewLabel">MARC preview</h3>
284 <div class="modal-body">
285 <div id="loading"> <img src="[% interface | html %]/[% theme | html %]/img/spinner-small.gif" alt="" /> Loading </div>
287 <div class="modal-footer">
288 <button class="btn btn-default" data-dismiss="modal" aria-hidden="true">Close</button>
295 <div id="items_info">
296 <h2>Item information</h2>
297 <p>Import all the checked items in the basket with the following parameters:</p>
300 <fieldset class="rows" style="float:none;">
301 <legend>Item</legend>
302 [% IF ( NoACQframework ) %]
303 <div class="dialog message">No ACQ framework, using default. You should create a framework with code ACQ, the items framework would be used</div>
305 [% FOREACH item IN items %]
306 <div id="outeritemblock">
309 [% FOREACH iteminformatio IN item.iteminformation %]<li style="[% iteminformatio.hidden | html %];">
310 <div class="subfield_line" id="subfield[% iteminformatio.serialid | html %][% iteminformatio.countitems | html %][% iteminformatio.subfield | html %][% iteminformatio.random | html %]">
311 [% IF (iteminformatio.mandatory) %]
312 <label class="required">[% iteminformatio.subfield | html %] - [% iteminformatio.marc_lib | $raw %]</label>
314 <label>[% iteminformatio.subfield | html %] - [% iteminformatio.marc_lib | $raw %]</label>
317 [% IF ( iteminformatio.marc_value.type == 'select' ) %]
318 <select name="field_value" class="input_marceditor">
319 [% FOREACH value IN iteminformatio.marc_value.values %]
320 [% IF ( value == iteminformatio.marc_value.default ) %]
321 <option value="[% value | html %]" selected="selected">[% iteminformatio.marc_value.labels.$value | html %]</option>
323 <option value="[% value | html %]">[% iteminformatio.marc_value.labels.$value | html %]</option>
328 [% iteminformatio.marc_value | $raw %]
330 <input type="hidden" name="itemid" value="1" />
331 <input type="hidden" name="kohafield" value="[% iteminformatio.kohafield | html %]" />
332 <input type="hidden" name="tag" value="[% iteminformatio.tag | html %]" />
333 <input type="hidden" name="subfield" value="[% iteminformatio.subfield | html %]" />
334 <input type="hidden" name="mandatory" value="[% iteminformatio.mandatory | html %]" />
335 [% IF ( iteminformatio.mandatory ) %] <span class="required">Required</span>[% END %]
339 </div><!-- /iteminformation -->
341 [% END %] <!-- /items -->
343 [% END %] <!-- items -->
345 <div id="accounting_details">
346 <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>
347 <fieldset class="rows" style="float:none;">
348 <legend>Accounting details</legend>
351 <!-- origquantityrec only here for javascript compatibility (additem.js needs it, useless here, useful when receiveing an order -->
352 <input id="origquantityrec" readonly="readonly" type="hidden" name="origquantityrec" value="1" />
356 <span class="label">Fund: </span>
357 <input type="hidden" size="20" name="budget_id" id="budget_id" value="[% budget_id | html %]" />[% Budget_name | html %]
360 <label for="all_currency">Currency:</label>
361 <select name="all_currency" id="all_currency">
362 [% FOREACH currency IN currencies %]
363 [% IF currency.currency == bookseller.listprice %]
364 <option value="[% currency.currency | html %]" selected="selected">[% currency.currency | html %]</option>
365 [% ELSIF not currency.archived %]
366 <option value="[% currency.currency | html %]">[% currency.currency | html %]</option>
372 <label for="all_budget_id">Fund: </label>
373 <select id="all_budget_id" name="all_budget_id">
374 <option value="">Select a fund (will populate orders/items if set)</option>
375 [% FOREACH budget_loo IN budget_loop %]
376 [% IF ( budget_loo.b_active ) %]<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>
377 [% ELSE %]<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>
381 <label for="all_showallbudgets" style="float:none;width:auto;"> Show inactive:</label>
382 <input type="checkbox" id="all_showallbudgets" />
387 <label for="all_order_internalnote">Internal note: </label>
388 <textarea id="all_order_internalnote" cols="30" rows="3" name="all_order_internalnote"></textarea>
391 <label for="all_order_vendornote">Vendor note: </label>
392 <textarea id="all_order_vendornote" cols="30" rows="3" name="all_order_vendornote"></textarea>
395 <div class="hint">The 2 following fields are available for your own usage. They can be useful for statistical purposes</div>
396 <label for="all_sort1">Statistic 1: </label>
397 <input type="text" id="all_sort1" size="20" name="all_sort1" value="" />
400 <label for="all_sort2">Statistic 2: </label>
401 <input type="text" id="all_sort2" size="20" name="all_sort2" value="" />
408 <fieldset class="action">
409 <input id="add_order" type="submit" value="Save" /><a class="cancel" href="/cgi-bin/koha/acqui/basket.pl?basketno=[% basketno | html %]">Cancel</a>
414 <h1>Choose the file to add to the basket</h1>
422 <th># Bibliographic records</th>
423 <th class="NoSort"> </th>
427 [% FOREACH batch_lis IN batch_list %]
429 <td>[% batch_lis.file_name | html %]</td>
430 <td>[% batch_lis.comments | html %]</td>
432 [% IF ( batch_lis.import_status == 'cleaned' ) %]
434 [% ELSIF ( batch_lis.import_status == 'imported' ) %]
436 [% ELSIF ( batch_lis.import_status == 'importing' ) %]
438 [% ELSIF ( batch_lis.import_status == 'reverted' ) %]
440 [% ELSIF ( batch_lis.import_status == 'reverting' ) %]
442 [% ELSIF ( batch_lis.import_status == 'staged' ) %]
445 [% batch_lis.import_status | html %]
448 <td data-order="[% batch_lis.staged_date | html %]">[% batch_lis.staged_date | $KohaDates with_hours => 1 %]</td>
449 <td>[% batch_lis.num_records | html %]</td>
451 <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>
459 </div> [% # /div.col-sm-6 %]
460 </div> [% # /div.row %]
462 [% INCLUDE 'intranet-bottom.inc' %]