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