2 [% INCLUDE 'doc-head-open.inc' %]
3 <title>Koha › Acquisitions › Order staged MARC records
4 [% IF ( batch_details ) %]
5 › Batch [% import_batch_id %]
10 <link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
11 [% INCLUDE 'doc-head-close.inc' %]
12 [% INCLUDE 'datatables.inc' %]
13 <script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.checkboxes.min.js"></script>
14 <script type="text/javascript" src="[% themelang %]/js/acq.js"></script>
15 <script type="text/JavaScript">
17 $(document).ready(function() {
18 $("#files").dataTable($.extend(true, {}, dataTablesDefaults, {
20 { "bSortable": false, "bSearchable": false, 'aTargets': [ 'NoSort' ] },
21 { "sType": "anti-the", "aTargets" : [ "anti-the" ] },
22 { "sType": "title-string", "aTargets" : [ "title-string" ] }
24 "sPaginationType": "four_button",
28 $("select[name='budget_id']").change(function(){
29 var sort1_authcat = $(this).find("option:selected").attr('data-sort1-authcat');
30 var sort2_authcat = $(this).find("option:selected").attr('data-sort2-authcat');
31 var destination_sort1 = $(this).siblings('span.sort1').find('input[name="sort1"]');
32 var sort1 = $(destination_sort1).val();
33 if ( destination_sort1.length < 1 ) {
34 destination_sort1 = $(this).siblings('span.sort1').find('select[name="sort1"]');
36 var destination_sort2 = $(this).siblings('span.sort2').find('input[name="sort2"]');
37 var sort2 = $(destination_sort2).val();
38 if ( destination_sort2.length < 1 ) {
39 destination_sort2 = $(this).siblings('span.sort2').find('select[name="sort2"]');
41 getAuthValueDropbox( 'sort1', sort1_authcat, destination_sort1, sort1 );
43 getAuthValueDropbox( 'sort2', sort2_authcat, destination_sort2, sort2 );
46 $("select[name='budget_id']").change();
48 $("select[name='all_budget_id']").change(function(){
49 var sort1_authcat = $(this).find("option:selected").attr('data-sort1-authcat');
50 var sort2_authcat = $(this).find("option:selected").attr('data-sort2-authcat');
51 var destination_sort1 = $(this).parent().siblings('li').find('input[name="all_sort1"]');
52 if ( destination_sort1.length < 1 ) {
53 destination_sort1 = $(this).parent().siblings('li').find('select[name="all_sort1"]');
55 var destination_sort2 = $(this).parent().siblings('li').find('input[name="all_sort2"]');
56 if ( destination_sort2.length < 1 ) {
57 destination_sort2 = $(this).parent().siblings('li').find('select[name="all_sort2"]');
59 getAuthValueDropbox( 'sort1', sort1_authcat, destination_sort1 );
60 getAuthValueDropbox( 'sort2', sort2_authcat, destination_sort2 );
61 $(this).parent().siblings('li').find('select[name="sort1"]').attr('name', 'all_sort1');
62 $(this).parent().siblings('li').find('input[name="sort1"]').attr('name', 'all_sort1');
63 $(this).parent().siblings('li').find('select[name="sort2"]').attr('name', 'all_sort2');
64 $(this).parent().siblings('li').find('input[name="sort2"]').attr('name', 'all_sort2');
67 $('input:checkbox[name="import_record_id"]').change(function(){
68 if ( $(this).is(':checked') ) {
69 $(this).parent().addClass("selected");
70 $(this).parent().removeClass("unselected");
72 $(this).parent().addClass("unselected");
73 $(this).parent().removeClass("selected");
77 $("input:checkbox").attr("checked", false);
78 $("div.biblio.unselected select").attr("disabled", false);
79 $("div.biblio.unselected input").attr("disabled", false);
81 $("#checkAll").click(function(){
82 $("#Aform").checkCheckboxes();
83 $("input:checkbox[name='import_record_id']").change();
86 $("#unCheckAll").click(function(){
87 $("#Aform").unCheckCheckboxes();
88 $("input:checkbox[name='import_record_id']").change();
94 function disableUnchecked(form){
95 $("div.biblio.unselected").each(function(){
96 $(this).find('select').attr('disabled', 'disabled');
97 $(this).find('input').attr('disabled', 'disabled');
104 <body id="acq_addorderiso2709" class="acq">
105 [% INCLUDE 'header.inc' %]
106 [% INCLUDE 'acquisitions-search.inc' %]
107 <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>
108 <div id="doc3" class="yui-t2">
112 [% IF ( batch_details ) %]
113 <h1>Add orders from [% comments %]
114 ([% file_name %] staged on [% upload_timestamp | $KohaDates with_hours => 1 %])
117 <span class="checkall"><a id="checkAll" href="#">Check All</a></span>
118 <span class="uncheckall"><a id="unCheckAll" href="#">Uncheck All</a></span>
119 <form action="/cgi-bin/koha/acqui/addorderiso2709.pl" method="post" id="Aform" onsubmit="disableUnchecked(this); return false;">
120 <input type="hidden" name="op" value="import_records"/>
121 <input type="hidden" name="basketno" value="[% basketno %]" />
122 <input type="hidden" name="booksellerid" value="[% booksellerid %]" />
123 <input type="hidden" name="import_batch_id" value="[%import_batch_id %]" />
124 <input type="hidden" name="ordernumber" value="[% ordernumber %]" />
126 [% FOREACH cur IN loop_currencies %]
127 <input type="hidden" name="[% cur.currency %]" value="[% cur.rate %]" />
130 [% FOREACH biblio IN biblio_list %]
131 <div class="biblio unselected" style="border-radius: 5px 5px; -moz-border-radius: 5px; padding: 5px; margin:5px; border-style : solid; border-color : grey; border-width:1px;">
132 <input type="checkbox" name="import_record_id" id="record_[% biblio.import_record_id %]" value="[% biblio.import_record_id %]" />
133 <input type="hidden" value="[% biblio.rrp %]" name="rrp" />
134 <label for="record_[% biblio.import_record_id %]"><span class="citation" style="font-weight:bold;">[% biblio.citation %]</span></label>
135 <span class="match" style="display:block;">
136 [% IF ( biblio_lis.overlay_status == 'no_match' ) %]
138 [% ELSIF ( biblio_lis.overlay_status == 'match_applied' ) %]
140 [% ELSIF ( biblio_lis.overlay_status == 'auto_match' ) %]
143 [% biblio_lis.overlay_status %]
146 [% IF ( biblio.match_biblionumber ) %]
147 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>
149 <span class="quantity" style="display:block;">
150 Quantity: <input type="text" value="[% biblio.quantity %]" name="quantity" />
152 <span class="price" style="display:block;">
153 Price: <input type="text" value="[% biblio.price %]" name="price" />
155 <span class="discount" style="display:block;">
156 Discount: <input type="text" value="[% biblio.discount %]" name="discount" />
158 <span class="budget" style="display:block;">
160 <span class="label">Budget: </span>
161 <input type="hidden" size="20" name="budget_id" value="[% budget_id %]" />[% Budget_name %]
163 <label for="budget_id">Budget: </label>
164 <select size="1" name="budget_id">
165 <option value=""></option>
166 [% FOREACH budget IN budget_loop %]
167 [% IF ( budget.b_id == biblio.budget_id ) %]
168 <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>
170 <option value="[% budget.b_id %]" data-sort1-authcat="[% budget.b_sort1_authcat %]" data-sort2-authcat="[% budget.b_sort2_authcat %]">[% budget.b_txt %]</option>
176 <label for="sort1">Planning value1: </label>
177 <input type="text" id="sort1" size="20" name="sort1" value="[% biblio.sort1 %]" />
180 <label for="sort2">Planning value2: </label>
181 <input type="text" id="sort2" size="20" name="sort2" value="[% biblio.sort2 %]" />
188 <p>Import all the lines in the basket with the following parameters:</p>
191 <fieldset class="rows">
192 <legend>Item</legend>
193 [% IF ( NoACQframework ) %]
194 <div class="dialog message">No ACQ framework, using default. You should create a framework with code ACQ, the items framework would be used</div>
196 [% FOREACH item IN items %]
197 <div id="outeritemblock">
200 [% FOREACH iteminformatio IN item.iteminformation %]<li style="[% iteminformatio.hidden %];">
201 <div class="subfield_line" id="subfield[% iteminformatio.serialid %][% iteminformatio.countitems %][% iteminformatio.subfield %][% iteminformatio.random %]">
202 [% IF (iteminformatio.mandatory) %]
203 <label class="required">[% iteminformatio.subfield %] - [% iteminformatio.marc_lib %]</label>
205 <label>[% iteminformatio.subfield %] - [% iteminformatio.marc_lib %]</label>
208 [% iteminformatio.marc_value %]
209 <input type="hidden" name="itemid" value="1" />
210 <input type="hidden" name="kohafield" value="[% iteminformatio.kohafield %]" />
211 <input type="hidden" name="tag" value="[% iteminformatio.tag %]" />
212 <input type="hidden" name="subfield" value="[% iteminformatio.subfield %]" />
213 <input type="hidden" name="mandatory" value="[% iteminformatio.mandatory %]" />
214 [% IF ( iteminformatio.mandatory ) %] <span class="required">Required</span>[% END %]
218 </div><!-- /iteminformation -->
220 [% END %] <!-- /items -->
222 [% END %] <!-- items -->
224 <fieldset class="rows">
225 <legend>Accounting details</legend>
228 <!-- origquantityrec only here for javascript compatibility (additem.js needs it, useless here, usefull when receiveing an order -->
229 <input id="origquantityrec" readonly="readonly" type="hidden" name="origquantityrec" value="1" />
233 <span class="label">Budget: </span>
234 <input type="hidden" size="20" name="budget_id" id="budget_id" value="[% budget_id %]" />[% Budget_name %]
237 <label for="all_currency">Currency:</label>
238 <select name="all_currency" id="all_currency">
239 [% FOREACH loop_currencie IN loop_currencies %]
240 [% IF ( loop_currencie.selected ) %]
241 <option value="[% loop_currencie.currcode %]" selected="selected">[% loop_currencie.currcode %]</option>
243 <option value="[% loop_currencie.currcode %]">[% loop_currencie.currcode %]</option>
249 <label for="all_budget_id">Budget: </label>
250 <select id="all_budget_id" size="1" name="all_budget_id">
251 [% FOREACH budget_loo IN budget_loop %]
252 [% IF ( budget_loo.b_sel ) %]
253 <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>
255 <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>
263 <label for="all_order_internalnote">Internal note: </label>
264 <textarea id="all_order_internalnote" cols="30" rows="3" name="all_order_internalnote"></textarea>
267 <label for="all_order_vendornote">Vendor note: </label>
268 <textarea id="all_order_vendornote" cols="30" rows="3" name="all_order_vendornote"></textarea>
271 <div class="hint">The 2 following fields are available for your own usage. They can be useful for statistical purposes</div>
272 <label for="sort1">Planning value1: </label>
274 <select id="all_sort1" size="1" name="all_sort1">
275 [% FOREACH sort_opt IN CGIsort1 %]
276 [% IF sort_opt.default %]
277 <option value="[% sort_opt.id %]" selected="selected">[% sort_opt.label %]</option>
279 <option value="[% sort_opt.id %]">[% sort_opt.label %]</option>
284 <input type="text" id="all_sort1" size="20" name="all_sort1" value="[% sort1 %]" />
288 <span id="sort2_zone">
289 <label for="sort2">Planning value2: </label>
291 <select id="all_sort2" size="1" name="all_sort1">
292 [% FOREACH sort_opt IN CGIsort2 %]
293 [% IF sort_opt.default %]
294 <option value="[% sort_opt.id %]" selected="selected">[% sort_opt.label %]</option>
296 <option value="[% sort_opt.id %]">[% sort_opt.label %]</option>
301 <input type="text" id="all_sort2" size="20" name="all_sort2" value="[% sort2 %]" />
307 <fieldset class="action">
308 <input type="submit" value="Save" /><a class="cancel" href="/cgi-bin/koha/acqui/basket.pl?basketno=[% basketno %]">Cancel</a>
315 <h1>Choose the file to add to the basket</h1>
322 <th class="title-string">Staged</th>
324 <th class="NoSort"> </th>
328 [% FOREACH batch_lis IN batch_list %]
330 <td>[% batch_lis.file_name %]</td>
331 <td>[% batch_lis.comments %]</td>
333 [% IF ( batch_lis.import_status == 'cleaned' ) %]
335 [% ELSIF ( batch_lis.import_status == 'imported' ) %]
337 [% ELSIF ( batch_lis.import_status == 'importing' ) %]
339 [% ELSIF ( batch_lis.import_status == 'reverted' ) %]
341 [% ELSIF ( batch_lis.import_status == 'reverting' ) %]
343 [% ELSIF ( batch_lis.import_status == 'staged' ) %]
346 [% batch_lis.import_status %]
349 <td><span title="[% batch_lis.staged_date %]">[% batch_lis.staged_date | $KohaDates with_hours => 1 %]</span></td>
350 <td>[% batch_lis.num_biblios %]</td>
351 <td><a href="[% batch_lis.scriptname %]?import_batch_id=[% batch_lis.import_batch_id %]&basketno=[% basketno %]&booksellerid=[% booksellerid %]">Add orders</a></td>