Bug 30952: Staff interface redesign (header)
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / acqui / addorderiso2709.tt
1 [% USE raw %]
2 [% USE Asset %]
3 [% USE KohaDates %]
4 [% USE Branches %]
5 [% INCLUDE 'doc-head-open.inc' %]
6 <title>
7 [% IF ( batch_details ) %]
8     Batch [% import_batch_id | html %]
9 [% ELSE %]
10     Batch list
11 [% END %] &rsaquo; Order staged MARC records &rsaquo; Acquisitions &rsaquo; Koha
12 </title>
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' %]
23 </head>
24
25 <body id="acq_addorderiso2709" class="acq">
26 [% WRAPPER 'header.inc' %]
27     [% INCLUDE 'acquisitions-search.inc' %]
28 [% END %]
29
30     [% WRAPPER 'sub-header.inc' %]
31     <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb">
32         <ol>
33             <li>
34                 <a href="/cgi-bin/koha/mainpage.pl"><i class="fa fa-home"></i></a>
35             </li>
36             <li>
37                 <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a>
38             </li>
39             <li>
40                 <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid | uri %]">[% booksellername | html %]</a>
41             </li>
42             <li>
43                 <a href="/cgi-bin/koha/acqui/basket.pl?basketno=[% basketno | uri %]">Basket [% basketno | html %]</a>
44             </li>
45             <li>
46                 <a href="#" aria-current="page">Add orders from MARC file</a>
47             </li>
48         </ol>
49     </nav>
50     [% END %]
51
52     <div class="container-fluid">
53         <div class="row">
54             <div class="col-sm-6 col-sm-offset-3 col-md-8 col-md-offset-2">
55                 [% IF ( allmatch ) %]
56                     <div class="dialog alert">
57                         <h4>No records imported</h4>
58                         No records have been imported because they all match existing records in your catalog.<br />You'll have to treat them individually.
59                     </div>
60                 [% END %]
61
62                 [% IF ( batch_details ) %]
63                     <h1>
64                         Add orders from [% comments | html %]
65                         ([% file_name | html %] staged on [% upload_timestamp | $KohaDates  with_hours => 1 %])
66                     </h1>
67                     <form action="/cgi-bin/koha/acqui/addorderiso2709.pl" method="post" id="Aform">
68                         <div id="tabs" class="toptabs">
69                             <ul class="nav nav-tabs" role="tablist">
70                                 <li role="presentation" class="active"><a href="#records_to_import" aria-controls="records_to_import" role="tab" data-toggle="tab">Select to import</a></li>
71                                 <li role="presentation"><a href="#items_info" class="items_info" aria-controls="items_info" role="tab" data-toggle="tab">Item information</a></li>
72                                 <li role="presentation"><a href="#accounting_details" aria-controls="accounting_details" role="tab" data-toggle="tab">Default accounting details</a></li>
73                             </ul>
74
75                             <div class="tab-content">
76                                 <div id="records_to_import" role="tabpanel" class="tab-pane active" >
77                                     <div id="searchheader" class="searchheader">
78                                         <div>
79                                             <span class="checkall"><a id="checkAll" href="#">Select all</a></span>
80                                             |
81                                             <span class="uncheckall"><a id="unCheckAll" href="#">Clear all</a></span>
82                                             |
83                                             <span>
84                                                 <label for="matcher_id">Matching:</label>
85                                                     <select name="matcher_id" id="matcher_id">
86                                                         <option value="_TITLE_AUTHOR_">Title and author</option>
87                                                         <option value="">Do not look for matching records</option>
88                                                         [% FOREACH available_matcher IN available_matchers %]
89                                                             [% IF ( available_matcher.code == current_matcher_code ) %]
90                                                                 <option value="[% available_matcher.matcher_id | html %]" selected="selected">
91                                                                     [% available_matcher.code | html %] ([% available_matcher.description | html %])
92                                                                 </option>
93                                                             [% ELSE %]
94                                                                 <option value="[% available_matcher.matcher_id | html %]">
95                                                                     [% available_matcher.code | html %] ([% available_matcher.description | html %])
96                                                                 </option>
97                                                             [% END %]
98                                                         [% END %]
99                                                     </select>
100                                             </span>
101                                             |
102                                             <span>
103                                                 <label for="showallbudgets" style="float:none;width:auto;">&nbsp;Show inactive funds:</label>
104                                                 <input type="checkbox" id="showallbudgets" />
105                                             </span>
106                                         </div>
107                                     </div> <!-- /#searchheader -->
108
109                                     <input type="hidden" name="op" value="import_records"/>
110                                     <input type="hidden" name="basketno" value="[% basketno | html %]" />
111                                     <input type="hidden" name="booksellerid" value="[% booksellerid | html %]" />
112                                     <input type="hidden" name="import_batch_id" value="[% import_batch_id | html %]" />
113                                     <input type="hidden" name="ordernumber" value="[% ordernumber | html %]" />
114
115                                     [% FOREACH biblio IN biblio_list %]
116                                         <fieldset class="biblio unselected rows" style="float:none;">
117                                             <legend>
118                                                 <label for="record_[% biblio.import_record_id | html %]" style="width:auto;">
119                                                     <input type="checkbox" name="import_record_id" id="record_[% biblio.import_record_id | html %]" value="[% biblio.import_record_id | html %]" />
120                                                     <span class="citation">[% biblio.citation | html %]</span>
121                                                 </label>
122                                                 <span class="links" style="font-weight: normal;">
123                                                     ( <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&amp;importid=[% biblio.import_record_id | html %]" class="previewData">Card</a> | <a href="/cgi-bin/koha/acqui/neworderempty.pl?booksellerid=[% booksellerid | html %]&amp;basketno=[% basketno | html %]&amp;breedingid=[% biblio.import_record_id | html %]&amp;import_batch_id=[% biblio.import_batch_id | html %]&amp;biblionumber=[% biblio.match_biblionumber | html %]">Add order</a> )
124                                                 </span>
125                                             </legend>
126                                             <div style="float:left">
127                                                 <ol>
128                                                     <li class="status">
129                                                         <span class="match">
130                                                             [% IF ( biblio_lis.overlay_status == 'no_match' ) %]
131                                                             <span>No match</span>
132                                                             [% ELSIF ( biblio_lis.overlay_status == 'match_applied' ) %]
133                                                             <span>Match applied</span>
134                                                             [% ELSIF ( biblio_lis.overlay_status == 'auto_match' ) %]
135                                                             <span>Match found</span>
136                                                             [% ELSE %]
137                                                                 [% biblio_lis.overlay_status | html %]
138                                                             [% END %]
139                                                             [% IF ( biblio.match_biblionumber ) %]
140                                                             <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>
141                                                             [% END %]
142                                                         </span>
143                                                     </li>
144                                                     <li class="quantity">
145                                                         <label for="quantity_record_[% biblio.import_record_id | html %]" class="required">Quantity: </label>
146                                                         <input id="quantity_record_[% biblio.import_record_id | html %]" type="text" pattern="[0-9]+" value="[% biblio.quantity.length ? biblio.quantity : 1 | html %]" name="quantity" />
147                                                         <span class="required">Required</span>
148                                                     </li>
149                                                     <li class="price">
150                                                         <label for="price_record_[% biblio.import_record_id | html %]">Price: </label>
151                                                         <input id="price_record_[% biblio.import_record_id | html %]" type="text" value="[% biblio.price | html %]" name="price" />
152                                                     </li>
153                                                     <li class="replacementprice">
154                                                         <label for="replacementprice_record_[% biblio.import_record_id | html %]">Replacement price: </label>
155                                                         <input id="replacementprice_record_[% biblio.import_record_id | html %]" type="text" value="[% biblio.replacementprice | html %]" name="replacementprice" />
156                                                     </li>
157                                                     <li class="discount">
158                                                         <label for="discount_record_[% biblio.import_record_id | html %]">Discount: </label>
159                                                         <input id="discount_record_[% biblio.import_record_id | html %]" type="text" value="[% biblio.discount | html %]" name="discount" size="6" /> %
160                                                         <div class="hint">If empty, discount rate from vendor will be used</div>
161                                                     </li>
162                                                     <li class="fund">
163                                                         [% IF ( close ) %]
164                                                             <label for="fund_record_[% biblio.import_record_id | html %]">Fund: </label>
165                                                             <input type="hidden" size="20" name="budget_id" value="[% budget_id | html %]" />[% Budget_name | html %]
166                                                         [% ELSE %]
167                                                             <label for="fund_record_[% biblio.import_record_id | html %]">Fund: </label>
168                                                             <select id="fund_record_[% biblio.import_record_id | html %]" name="budget_id">
169                                                                 <option value="">Select a fund (will use default if set)</option>
170                                                                 [% FOREACH budget IN budget_loop %]
171                                                                     [% IF ( budget.b_id == biblio.budget_id ) %]
172                                                                     [% IF budget.b_active %]
173                                                                         <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>
174                                                                     [% ELSE %]
175                                                                     <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>
176                                                                 [% END %]
177                                                                 [% ELSE %]
178                                                                     [% 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>
179                                                                     [% 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                                                                     [% END %]
181                                                                     [% END %]
182                                                                 [% END %]
183                                                             </select>
184                                                             <span class="required" style="display:none">Required</span>
185                                                         [% END %]
186                                                     </li>
187                                                     <li class="sort1">
188                                                         <label for="sort1_record_[% biblio.import_record_id | html %]">Statistic 1: </label>
189                                                         <input id="sort1_record_[% biblio.import_record_id | html %]" type="text" size="20" name="sort1" value="[% biblio.sort1 | html %]" />
190                                                     </li>
191                                                     <li class="sort2">
192                                                         <label for="sort2_record_[% biblio.import_record_id | html %]">Statistic 2: </label>
193                                                         <input id="sort2_record_[% biblio.import_record_id | html %]" type="text" size="20" name="sort2" value="[% biblio.sort2 | html %]" />
194                                                     </li>
195                                                 </ol>
196                                             </div>
197                                             <div style="float:right">
198                                                 [% IF biblio.item_error %]Item records could not be processed because the number of item fields was uneven.[% END %]
199                                                 [% FOREACH item IN biblio.iteminfos %]
200                                                     <fieldset>
201                                                         <legend>Item record [% item.item_id | html %]</legend>
202                                                         <ol>
203                                                             <li>
204                                                                 <label for="homebranch_item_[% item.item_id | html %]">homebranch</label>
205                                                                 <select id="homebranch_item_[% item.item_id | html %]" name="homebranch_[% item.biblio_count | html %]">
206                                                                     [% FOREACH l IN libraries %]
207                                                                         [% IF l.branchcode == item.homebranch %]
208                                                                             <option value="[% l.branchcode | html %]" selected="selected">[% l.branchname | html %]</option>
209                                                                         [% ELSE %]
210                                                                             <option value="[% l.branchcode | html %]">[% l.branchname | html %]</option>
211                                                                         [% END %]
212                                                                     [% END %]
213                                                                 </select>
214                                                             </li>
215
216                                                             <li>
217                                                                 <label for="holdingbranch_item_[% item.item_id | html %]">holdingbranch</label>
218                                                                 <select id="holdingbranch_item_[% item.item_id | html %]" name="holdingbranch_[% item.biblio_count | html %]">
219                                                                     [% FOREACH l IN libraries %]
220                                                                         [% IF l.branchcode == item.holdingbranch %]
221                                                                             <option value="[% l.branchcode | html %]" selected="selected">[% l.branchname | html %]</option>
222                                                                         [% ELSE %]
223                                                                             <option value="[% l.branchcode | html %]">[% l.branchname | html %]</option>
224                                                                         [% END %]
225                                                                     [% END %]
226                                                                 </select>
227                                                             </li>
228                                                             <li>
229                                                                 <label for="itype_item_[% item.item_id | html %]">itype</label>
230                                                                 <select id="itype_item_[% item.item_id | html %]" name="itype_[% item.biblio_count | html %]">
231                                                                     [% FOREACH itemtype IN itemtypes %]
232                                                                         [% IF itemtype.itemtype == item.itype %]
233                                                                             <option value="[% itemtype.itemtype | html %]" selected="selected">[% itemtype.description | html %]</option>
234                                                                         [% ELSE %]
235                                                                             <option value="[% itemtype.itemtype | html %]">[% itemtype.description | html %]</option>
236                                                                         [% END %]
237                                                                     [% END %]
238                                                                 </select>
239                                                             </li>
240
241                                                             <li>
242                                                                 <label for="nonpublic_note_item_[% item.item_id | html %]">nonpublic_note</label>
243                                                                 <input type="text" id="nonpublic_note_item_[% item.item_id | html %]" name="nonpublic_note_[% item.biblio_count | html %]" value="[% item.nonpublic_note | html %]">
244                                                             </li>
245                                                             <li>
246                                                                 <label for="public_note_item_[% item.item_id | html %]">public_note</label>
247                                                                 <input type="text" id="public_note_item_[% item.item_id | html %]" name="public_note_[% item.biblio_count | html %]" value="[% item.public_note | html %]">
248                                                             </li>
249                                                             <li>
250                                                                 <label for="loc_item_[% item.item_id | html %]">loc</label>
251                                                                 <select id="loc_item_[% item.item_id | html %]" name="loc_[% item.biblio_count | html %]">
252                                                                     <option value=""> </option>
253                                                                     [% FOREACH locationloo IN locationloop %]
254                                                                         [% IF ( locationloo.code ) == (item.loc) %]
255                                                                             <option value="[% locationloo.code | html %]" selected="selected">[% locationloo.description | html %]</option>
256                                                                         [% ELSE %]
257                                                                             <option value="[% locationloo.code | html %]">[% locationloo.description | html %]</option>
258                                                                         [% END %]
259                                                                     [% END %]
260                                                                 </select>
261                                                             </li>
262
263                                                             <li>
264                                                                 <label for="ccode_item_[% item.item_id | html %]">ccode</label>
265                                                                 <select id="ccode_item_[% item.item_id | html %]" name="ccode_[% item.biblio_count | html %]">
266                                                                     <option value=""> </option>
267                                                                     [% FOREACH ccodeloo IN ccodeloop %]
268                                                                         [% IF ( ccodeloo.code ) == (item.ccode) %]
269                                                                             <option value="[% ccodeloo.code | html %]" selected="selected">[% ccodeloo.description | html %]</option>
270                                                                         [% ELSE %]
271                                                                             <option value="[% ccodeloo.code | html %]">[% ccodeloo.description | html %]</option>
272                                                                         [% END %]
273                                                                     [% END %]
274                                                                 </select>
275                                                             </li>
276
277                                                             <li>
278                                                                 <label for="notforloan_item_[% item.item_id | html %]">notforloan</label>
279                                                                 <select id="notforloan_item_[% item.item_id | html %]" name="notforloan_[% item.biblio_count | html %]">
280                                                                     <option value=""> </option>
281                                                                     [% FOREACH n IN notforloanloop %]
282                                                                         [% IF n.code == item.notforloan %]
283                                                                             <option value="[% n.code | html %]" selected="selected">[% n.description | html %]</option>
284                                                                         [% ELSE %]
285                                                                             <option value="[% n.code | html %]">[% n.description | html %]</option>
286                                                                         [% END %]
287                                                                     [% END %]
288                                                                 </select>
289                                                             </li>
290                                                             <li>
291                                                                 <label for="uri_item_[% item.item_id | html %]">uri</label>
292                                                                 <input type="text" id="uri_item_[% item.item_id | html %]" name="uri_[% item.biblio_count | html %]" value="[% item.uri | html %]">
293                                                             </li>
294                                                             <li>
295                                                                 <label for="copyno_item_[% item.item_id | html %]">copyno</label>
296                                                                 <input type="text" id="copyno_item_[% item.item_id | html %]" name="copyno_[% item.biblio_count | html %]" value="[% item.copyno | html %]">
297                                                             </li>
298                                                             <li>
299                                                                 <label for="budget_code_item_[% item.item_id | html %]">budget_code</label>
300                                                                 <select class="budget_code_item" id="budget_code_item_[% item.item_id | html %]" name="budget_code_[% item.biblio_count | html %]">
301                                                                     <option value="">Select a fund (will use default if set)</option>
302                                                                     [% FOREACH budget_loo IN budget_loop %]
303                                                                         [% IF ( budget_loo.b_id ) == ( item.budget_id ) %]<option value="[% budget_loo.b_id | html %]" selected="selected">[% budget_loo.b_txt | html %]</option>
304                                                                         [% ELSE %]<option value="[% budget_loo.b_id | html %]">[% budget_loo.b_txt | html %]</option>
305                                                                         [% END %]
306                                                                     [% END %]
307                                                                 </select>
308                                                                 <span class="item_fund required">Required</span>
309                                                             </li>
310                                                             <li>
311                                                                 <label for="price_item_[% item.item_id | html %]">price</label>
312                                                                 <input type="text" id="price_item_[% item.item_id | html %]" name="itemprice_[% item.biblio_count | html %]" value="[% item.itemprice | html %]">
313                                                             </li>
314                                                             <li>
315                                                                 <label for="replacementprice_item_[% item.item_id | html %]">replacement price</label>
316                                                                 <input type="text" id="replacementprice_item_[% item.item_id | html %]" name="replacementprice_[% item.biblio_count | html %]" value="[% item.replacementprice | html %]">
317                                                             </li>
318                                                             <li>
319                                                                 <label for="callnumber_item_[% item.item_id | html %]">callnumber</label>
320                                                                 <input type="text" id="callnumber_item_[% item.item_id | html %]" name="itemcallnumber_[% item.biblio_count | html %]" value="[% item.itemcallnumber | html %]">
321                                                             </li>
322                                                         </ol>
323                                                     </fieldset>
324                                                 [% END # /FOREACH item %]
325                                             </div>
326                                         </fieldset> <!-- .biblio.unselected.rows -->
327
328                                     [% END # /FOREACH biblio %]
329                                     <div class="modal" id="dataPreview" tabindex="-1" role="dialog" aria-labelledby="dataPreviewLabel">
330                                         <div class="modal-dialog modal-lg" role="document">
331                                             <div class="modal-content">
332                                                 <div class="modal-header">
333                                                     <button type="button" class="closebtn" data-dismiss="modal" aria-label="Close"><span
334                                                             aria-hidden="true">&times;</span></button>
335                                                     <h4 id="dataPreviewLabel">MARC preview</h4>
336                                                 </div>
337                                                 <div class="modal-body">
338                                                     <div id="loading"> <img src="[% interface | html %]/[% theme | html %]/img/spinner-small.gif" alt="" /> Loading </div>
339                                                 </div>
340                                                 <div class="modal-footer">
341                                                     <button class="btn btn-default" data-dismiss="modal" aria-hidden="true">Close</button>
342                                                 </div>
343                                             </div> <!-- /.modal-content -->
344                                         </div> <!-- /.modal-dialog -->
345                                     </div> <!-- /#dataPreview -->
346                                 </div> <!-- /#records_to_import -->
347
348                                 <div id="items_info" role="tabpanel" class="tab-pane">
349                                     <h2>Item information</h2>
350                                     <p>Import all the checked items in the basket with the following parameters:</p>
351
352                                     [% IF ( items ) %]
353                                         <fieldset class="rows" style="float:none;">
354                                             <legend>Item</legend>
355                                             [% IF ( NoACQframework ) %]
356                                                 <div class="dialog message">No ACQ framework, using default. You should create a framework with code ACQ, the items framework would be used</div>
357                                             [% END %]
358                                             [% FOREACH item IN items %]
359                                                 <div id="outeritemblock">
360                                                     <div id="itemblock">
361                                                         <ol>
362                                                             [% FOREACH iteminformatio IN item.iteminformation %]
363                                                                 <li style="[% iteminformatio.hidden | html %];">
364                                                                     <div class="subfield_line" id="subfield[% iteminformatio.serialid | html %][% iteminformatio.countitems | html %][% iteminformatio.subfield | html %][% iteminformatio.random | html %]">
365                                                                         [% IF (iteminformatio.mandatory) %]
366                                                                             <label class="required">[% iteminformatio.subfield | html %] - [% iteminformatio.marc_lib | $raw %]</label>
367                                                                         [% ELSE %]
368                                                                             <label>[% iteminformatio.subfield | html %] - [% iteminformatio.marc_lib | $raw %]</label>
369                                                                         [% END %]
370
371                                                                         [% IF ( iteminformatio.marc_value.type == 'select' ) %]
372                                                                             <select name="field_value" class="input_marceditor">
373                                                                                 [% FOREACH value IN iteminformatio.marc_value.values %]
374                                                                                     [% IF ( value == iteminformatio.marc_value.default ) %]
375                                                                                         <option value="[% value | html %]" selected="selected">[% iteminformatio.marc_value.labels.$value | html %]</option>
376                                                                                     [% ELSE %]
377                                                                                         <option value="[% value | html %]">[% iteminformatio.marc_value.labels.$value | html %]</option>
378                                                                                     [% END %]
379                                                                                 [% END %]
380                                                                             </select>
381                                                                         [% ELSE %]
382                                                                         [% iteminformatio.marc_value | $raw %]
383                                                                         [% END %]
384                                                                         <input type="hidden" name="itemid" value="1" />
385                                                                         <input type="hidden" name="kohafield" value="[% iteminformatio.kohafield | html %]" />
386                                                                         <input type="hidden" name="tag" value="[% iteminformatio.tag | html %]" />
387                                                                         <input type="hidden" name="subfield" value="[% iteminformatio.subfield | html %]" />
388                                                                         <input type="hidden" name="mandatory" value="[% iteminformatio.mandatory | html %]" />
389                                                                         [% IF ( iteminformatio.mandatory ) %]
390                                                                             <span class="required">Required</span>
391                                                                         [% END %]
392                                                                     </div>
393                                                                 </li>
394                                                             [% END %]
395                                                         </ol>
396                                                     </div><!-- /#itemblock -->
397                                                 </div> <!-- /#outeritemblock -->
398                                             [% END #/FOREACH item %]
399                                         </fieldset>
400                                     [% END # /IF items %]
401                                 </div> <!-- /#items_info -->
402
403                                 <div id="accounting_details" role="tabpanel" class="tab-pane">
404                                     <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>
405                                     <fieldset class="rows" style="float:none;">
406                                         <legend>Accounting details</legend>
407                                         <ol>
408                                             <li>
409                                                 <!-- origquantityrec only here for javascript compatibility (additem.js needs it, useless here, useful when receiveing an order -->
410                                                 <input id="origquantityrec" readonly="readonly" type="hidden" name="origquantityrec" value="1" />
411                                             </li>
412                                             [% IF ( close ) %]
413                                                 <li>
414                                                     <span class="label">Fund: </span>
415                                                     <input type="hidden" size="20" name="budget_id" id="budget_id" value="[% budget_id | html %]" />[% Budget_name | html %]
416                                                 </li>
417                                             [% ELSE %]
418                                                 <li>
419                                                     <label for="all_currency">Currency:</label>
420                                                     <select name="all_currency" id="all_currency">
421                                                         [% FOREACH currency IN currencies %]
422                                                             [% IF currency.currency == bookseller.listprice %]
423                                                                 <option value="[% currency.currency | html %]" selected="selected">[% currency.currency | html %]</option>
424                                                             [% ELSIF not currency.archived %]
425                                                                 <option value="[% currency.currency | html %]">[% currency.currency | html %]</option>
426                                                             [% END %]
427                                                         [% END %]
428                                                     </select>
429                                                 </li>
430                                                 <li>
431                                                     <label for="all_budget_id">Fund: </label>
432                                                     <select id="all_budget_id" name="all_budget_id">
433                                                         <option value="">Select a fund (will populate orders/items if set)</option>
434                                                         [% FOREACH budget_loo IN budget_loop %]
435                                                             [% IF ( budget_loo.b_active ) %]
436                                                                 <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>
437                                                             [% ELSE %]
438                                                                 <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>
439                                                             [% END %]
440                                                         [% END %]
441                                                     </select>
442                                                     <label for="all_showallbudgets" style="float:none;width:auto;">&nbsp;Show inactive:</label>
443                                                     <input type="checkbox" id="all_showallbudgets" />
444                                                 </li>
445                                             [% END #/IF close %]
446                                             <li>
447                                                 <label for="all_order_internalnote">Internal note: </label>
448                                                 <textarea id="all_order_internalnote" cols="30" rows="3" name="all_order_internalnote"></textarea>
449                                             </li>
450                                             <li>
451                                                 <label for="all_order_vendornote">Vendor note: </label>
452                                                 <textarea id="all_order_vendornote" cols="30" rows="3" name="all_order_vendornote"></textarea>
453                                             </li>
454                                             <li>
455                                                 <div class="hint">The 2 following fields are available for your own usage. They can be useful for statistical purposes</div>
456                                                 <label for="all_sort1">Statistic 1: </label>
457                                                 <input type="text" id="all_sort1" size="20" name="all_sort1" value="" />
458                                             </li>
459                                             <li>
460                                                 <label for="all_sort2">Statistic 2: </label>
461                                                 <input type="text" id="all_sort2" size="20" name="all_sort2" value="" />
462                                             </li>
463                                         </ol>
464                                     </fieldset> <!-- /.rows -->
465                                 </div> <!-- /#accounting_details -->
466                         </div> <!-- /#tabs -->
467
468                         <fieldset class="action">
469                             <input id="add_order" type="submit" value="Save" /><a class="cancel" href="/cgi-bin/koha/acqui/basket.pl?basketno=[% basketno | html %]">Cancel</a>
470                         </fieldset>
471                     </form> <!-- /#Aform -->
472                 [% ELSE # IF ( batch_details ) %]
473                     <div>
474                         <h1>Choose the file to add to the basket</h1>
475                         <table id="files">
476                             <thead>
477                                 <tr>
478                                     <th>File name</th>
479                                     <th>Comments</th>
480                                     <th>Status</th>
481                                     <th>Staged</th>
482                                     <th># Bibliographic records</th>
483                                     <th class="NoSort">&nbsp;</th>
484                                 </tr>
485                             </thead>
486                             <tbody>
487                                 [% FOREACH batch_lis IN batch_list %]
488                                     <tr>
489                                         <td>[% batch_lis.file_name | html %]</td>
490                                         <td>[% batch_lis.comments | html %]</td>
491                                         <td>
492                                             [% IF ( batch_lis.import_status == 'cleaned' ) %]
493                                                 <span>Cleaned</span>
494                                             [% ELSIF ( batch_lis.import_status == 'imported' ) %]
495                                                 <span>Imported</span>
496                                             [% ELSIF ( batch_lis.import_status == 'importing' ) %]
497                                                 <span>Importing</span>
498                                             [% ELSIF ( batch_lis.import_status == 'reverted' ) %]
499                                                 <span>Reverted</span>
500                                             [% ELSIF ( batch_lis.import_status == 'reverting' ) %]
501                                                 <span>Reverting</span>
502                                             [% ELSIF ( batch_lis.import_status == 'staged' ) %]
503                                                 <span>Staged</span>
504                                             [% ELSE %]
505                                                 [% batch_lis.import_status | html %]
506                                             [% END %]
507                                         </td>
508                                         <td data-order="[% batch_lis.staged_date | html %]">
509                                             [% batch_lis.staged_date | $KohaDates  with_hours => 1 %]
510                                         </td>
511                                         <td>[% batch_lis.num_records | html %]</td>
512                                         <td class="actions">
513                                             <a href="[% batch_lis.scriptname | url %]?import_batch_id=[% batch_lis.import_batch_id | uri %]&amp;basketno=[% basketno | uri %]&amp;booksellerid=[% booksellerid | uri %]" class="btn btn-default btn-xs"><i class="fa fa-plus"></i> Add orders</a>
514                                         </td>
515                                     </tr>
516                                 [% END # /FOREACH batch_lis %]
517                             </tbody>
518                         </table> <!-- /#files -->
519                     </div>
520                 [% END # /IF ( batch_details ) %]
521             </div> [% # /div.col-sm-6 %]
522         </div> [% # /div.row %]
523
524 [% INCLUDE 'intranet-bottom.inc' %]