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