Bug 33908: Improve translation of title tags: Acquisitions
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / acqui / neworderempty.tt
1 [% USE raw %]
2 [% USE Asset %]
3 [% USE Koha %]
4 [% USE KohaDates %]
5 [% USE Price %]
6 [% USE ItemTypes %]
7 [% USE AuthorisedValues %]
8 [% PROCESS 'i18n.inc' %]
9 [% INCLUDE 'doc-head-open.inc' %]
10 <title>[% FILTER collapse %]
11     [% IF ( ordernumber ) %]
12         [% tx("Modify order details (line #{ordernumber})", { ordernumber = ordernumber }) | html %]
13     [% ELSE %]
14         [% t("New order") | html %]
15     [% END %] &rsaquo;
16     [% tx("Basket {basketnumber}", { basketnumber = basketno }) | html %] &rsaquo;
17     [% t("Acquisitions") | html %] &rsaquo;
18     [% t("Koha") | html %]
19 [% END %]</title>
20 [% INCLUDE 'doc-head-close.inc' %]
21 [% FILTER collapse %]
22     <style>
23         #itemfieldset label,
24         #itemfieldset span.label {
25             flex-basis: 25%;
26             font-weight: 700;
27             margin-right: 1rem;
28             text-align: right;
29             width: 9rem;
30             font-size: 100%;
31             width: 25%;
32         }
33
34         #itemfieldset .input_marceditor {
35             flex-basis: 50%;
36         }
37
38         #itemfieldset .input_marceditor.flatpickr-input {
39             width: 50%;
40         }
41
42         #itemfieldset  .subfield_line {
43             display: flex;
44             flex-basis: 100%;
45         }
46     </style>
47 [% END %]
48     [% Asset.js("js/acquisitions-menu.js") | $raw %]
49     [% Asset.js("js/acq.js") | $raw %]
50     [% Asset.js("js/additem.js") | $raw %]
51     [% Asset.js("js/cataloging.js") | $raw %]
52     [% INCLUDE 'calendar.inc' %]
53     [% INCLUDE 'select2.inc' %]
54     <script>
55         actTotal = "";
56
57         function Check(ff) {
58             [% IF (AcqCreateItemOrdering) %]
59                 // Remove last itemblock if it is not in items_list
60                 var lastitemblock = $("#outeritemblock > div:last");
61                 var tobedeleted = true;
62                 var listitems = $("#items_list tr");
63                 $(listitems).each(function(){
64                     if($(this).attr('idblock') == $(lastitemblock).attr('id')){
65                         tobedeleted = false;
66                     }
67                 });
68                 if(tobedeleted){
69                     $(lastitemblock).remove();
70                 }
71             [% END %]
72
73             var ok=0;
74             var _alertString= _("Form not submitted because of the following problem(s)")+"\n";
75
76             _alertString +="-------------------------------------------------------------------\n\n";
77
78             if(isNull(ff.budget_id,1)){
79                 ok=1;
80                 _alertString += "\n- "+ _("You must select a fund");
81             }
82
83             if (!(isNum(ff.quantity,0)) || ff.quantity.value == 0){
84                 ok=1;
85                             _alertString += "\n- " + _("Quantity must be greater than '0'");
86             }
87
88             if (!(isNum(ff.listprice,0))){
89                 ok=1;
90                             _alertString += "\n- " + _("Vendor price must be a number");
91             }
92
93             if (!(isNum(ff.total,0))){
94                 ok=1;
95                             _alertString += "\n- " + _("Total must be a number");
96             }
97
98             if (totalExceedsBudget(ff.budget_id.value, ff.total.value  )  ) {
99                 ok=1;
100                 _alertString += "\n- " + _("Order total (%s) exceeds budget available (%s)").format(ff.total.value, actTotal);
101             }
102
103             if ( ff.field_value ) {
104                 var empty_item_mandatory = CheckMandatorySubfields(ff);
105                 if (empty_item_mandatory > 0) {
106                     ok = 1;
107                     _alertString +=
108                         "\n- " + _("%s item mandatory fields empty").format(empty_item_mandatory);
109                 }
110
111             }
112
113             if (ok) {
114                 alert(_alertString);
115                 [% IF (AcqCreateItemOrdering) %]
116                     if(tobedeleted) {
117                         $(lastitemblock).appendTo('#outeritemblock');
118                     }
119                 [% END %]
120                 return false;
121             }
122
123             [% IF (AcqCreateItemOrdering) %]
124                 if(check_additem('[% UniqueItemFields | html %]') == false) {
125                     alert(_("Duplicate values detected. Please correct the errors and resubmit.") );
126                     if(tobedeleted) {
127                         $(lastitemblock).appendTo('#outeritemblock');
128                     }
129                     return false;
130                 }
131             [% END %]
132         }
133
134         $(document).ready(function(){
135             [% IF AcqCreateItemOrdering and not basket.is_standing %]
136                 cloneItemBlock(0, '[% UniqueItemFields | html %]');
137             [% END %]
138
139             [% IF ( suggestionid ) %]updateCosts();[% END %]
140             $("#quantity").change(function() {
141                 updateCosts();
142             });
143
144             //We apply the function only for modify option
145             [% IF ( quantityrec and not subscriptionid ) %]
146                 [% IF ( acqcreate ) %]
147                     $('#quantity').blur(function(){
148                         // if user decreases the quantity
149                         if($(this).val() < [% quantityrec | html %]){
150                             alert(_("You have deleted item(s) in the order, don't forget to delete it(them) in the catalog"));
151                             return true;
152                         } else {
153                             // if user increases the quantity
154                             alert(_("You can't add a new item, please create a new order line"));
155                             // and we replace the original value
156                             $(this).val([% quantityrec | html %])
157                             updateCosts(); // blur is invoked after change which updated values
158                             return false;
159                         }
160                     });
161                 [% END %]
162             [% END %]
163
164             //keep a copy of all budgets before removing the inactives
165             disabledBudgetsCopy = $('#budget_id').html();
166             $('#budget_id .b_inactive').remove();
167
168             $('#showallbudgets').click(function() {
169                 if ($(this).is(":checked")) {
170                     $('#budget_id').html(disabledBudgetsCopy); //Puts back all the funds
171                 }
172                 else {
173                     $('#budget_id .b_inactive').remove();
174                 }
175             });
176
177             $("#budget_id").change(function(){
178                 var destination_sort1 = $(this).parents('fieldset.rows').find('input[name="sort1"]');
179                 var sort1_authcat = $(this).find("option:selected").attr('data-sort1-authcat');
180                 var sort1 = $(destination_sort1).val() || "";
181                 if ( destination_sort1.length < 1 ) {
182                     destination_sort1 = $(this).parents('fieldset.rows').find('select[name="sort1"]');
183                 }
184                 var destination_sort2 = $(this).parents('fieldset.rows').find('input[name="sort2"]');
185                 var sort2_authcat = $(this).find("option:selected").attr('data-sort2-authcat');
186                 var sort2 = $(destination_sort2).val() || "";
187                 if ( destination_sort2.length < 1 ) {
188                     destination_sort2 = $(this).parents('fieldset.rows').find('select[name="sort2"]');
189                 }
190                 getAuthValueDropbox( 'sort1', sort1_authcat, destination_sort1, sort1 );
191                 getAuthValueDropbox( 'sort2', sort2_authcat, destination_sort2, sort2 );
192             });
193             $("#budget_id").change();
194         });
195
196         function UserSearchPopup(f) {
197             window.open(
198                 "/cgi-bin/koha/members/search.pl?columns=cardnumber,name,category,branch,action&selection_type=add",
199                 'UserSearchPopup',
200                 'width=1024, height=768, scrollbars=yes, toolbar=no,'
201              );
202         }
203
204         function add_user(borrowernumber, borrowername) {
205             var ids = $("#users_ids").val();
206             if(ids.length > 0) {
207                 ids = ids.split(':');
208             } else {
209                 ids = new Array;
210             }
211         if (ids.indexOf(borrowernumber.toString()) < 0) {
212                 ids.push(borrowernumber);
213                 $("#users_ids").val(ids.join(':'));
214                 var li = '<li id="user_'+borrowernumber+'">'+borrowername
215                     + ' [<a style="cursor:pointer" onclick="del_user('+borrowernumber+');">'
216                     + _("Delete user") + '</a>]</li>';
217                 $("#users_names").append(li);
218                 return 0;
219             }
220             return -1;
221         }
222
223         function del_user(borrowernumber) {
224             $("#user_"+borrowernumber).remove();
225             var ids = $("#users_ids").val().split(':');
226             ids.splice(ids.indexOf(borrowernumber.toString()), 1);
227             $("#users_ids").val(ids.join(':'));
228         }
229     </script>
230 [% Asset.css("css/addbiblio.css") | $raw %]
231 </head>
232
233 <body id="acq_neworderempty" class="acq">
234
235 [% WRAPPER 'header.inc' %]
236     [% INCLUDE 'acquisitions-search.inc' %]
237 [% END %]
238
239 [% WRAPPER 'sub-header.inc' %]
240     [% WRAPPER breadcrumbs %]
241         [% WRAPPER breadcrumb_item %]
242             <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a>
243         [% END %]
244         [% WRAPPER breadcrumb_item %]
245             <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid | uri %]">[% name | html %]</a>
246         [% END %]
247         [% WRAPPER breadcrumb_item %]
248             <a href="/cgi-bin/koha/acqui/basket.pl?basketno=[% basketno | uri %]">Basket [% basketno | html %]</a>
249         [% END %]
250         [% IF ( ordernumber ) %]
251             [% WRAPPER breadcrumb_item bc_active= 1 %]
252                 <span>Modify order details (line #[% ordernumber | html %])</span>
253             [% END %]
254         [% ELSE %]
255             [% WRAPPER breadcrumb_item bc_active= 1 %]
256                 <span>New order</span>
257             [% END %]
258         [% END %]
259     [% END #/ WRAPPER breadcrumbs %]
260 [% END #/ WRAPPER sub-header.inc %]
261
262 [% INCLUDE 'blocking_errors.inc' %]
263
264 <div class="main container-fluid">
265     <div class="row">
266         <div class="col-sm-10 col-sm-push-2">
267             <main>
268
269 <h1>
270     [% IF ( ordernumber ) %]
271         Modify order line
272     [% ELSE %]
273         New order
274     [% END %]
275 </h1>
276
277 <div class="dialog alert order_error" style="display:none"></div>
278
279 [% IF ( basketno ) %]
280     <div id="acqui_basket_summary">
281     <fieldset class="rows">
282         <legend>Basket details</legend>
283         <ol>
284         [% IF ( basketnote ) %]<li><span class="label">Internal note:</span> [% basketnote | html %]</li>[% END %]
285         [% IF ( basketbooksellernote ) %]<li><span class="label">Vendor note:</span> [% basketbooksellernote | html %]</li>[% END %]
286         [% IF ( basketcontractno ) %]
287             <li><span class="label">Contract number: </span>[% basketcontractno | html %]</li>
288             <li><span class="label">Contract name:</span> <a href="/cgi-bin/koha/admin/aqcontract.pl?op=add_form&amp;contractnumber=[% basketcontractno | uri %]">[% basketcontractname | html %]</a></li>
289         [% END %]
290         [% IF ( authorisedbyname ) %]<li><span class="label">Managed by:</span>  [% authorisedbyname | html %]</li>[% END %]
291         [% IF ( creationdate ) %]<li><span class="label">Open on:</span>  [% creationdate | $KohaDates %]</li>[% END %]
292         [% IF ( closedate ) %]
293         <form action="/cgi-bin/koha/acqui/basketgroup.pl" method="post">
294         <li><span class="label">Closed on:</span>  [% closedate | $KohaDates %]</li>
295         [% IF ( basketgroups ) %]
296             <li>Basketgroup: <select id="basketgroupid" name="basketgroupid">
297                 [% FOREACH basketgroup IN basketgroups %]
298                     [% IF ( basketgroup.default ) %]
299                     <option value="[% basketgroup.id | html %]" selected="selected">[% basketgroup.name | html %]</option>
300                     [% ELSE %]
301                     <option value="[% basketgroup.id | html %]">[% basketgroup.name | html %]</option>
302                     [% END %]
303                 [% END %]
304                 </select>
305                 <input type="hidden" id="basketno" value="[% basketno | html %]" name="basketno" />
306                 <input type="hidden" value="mod_basket" name="op" />
307                 <input type="hidden" name="booksellerid" value="[% booksellerid | html %]" />
308             </li>
309             <fieldset class="action"><input type="submit" class="btn btn-primary" value="Change basketgroup" /></fieldset>
310         [% END %]
311         </form>
312         [% END %]
313         </ol>
314     </fieldset>
315     </div>
316 [% END %]
317
318 <form action="/cgi-bin/koha/acqui/addorder.pl" method="post" class="validated noEnterSubmit" id="Aform" onsubmit="return Check(this);" >
319
320     <fieldset class="rows">
321         <legend>Patrons</legend>
322         <ol>
323             <li>
324                 <span class="label">To notify on receiving:</span>
325                 <div style="float:left">
326                     <ul id="users_names" style="padding-left:0">
327                       [% FOREACH user IN users %]
328                         <li id="user_[% user.borrowernumber | html %]">
329                             [% user.firstname | html %] [% user.surname | html %]
330                             [<a onclick="del_user([% user.borrowernumber | html %]);" style="cursor:pointer">Delete user</a>]
331                         </li>
332                       [% END %]
333                     </ul>
334                     <input type="hidden" id="users_ids" name="users_ids" value="[% users_ids | html %]" />
335                     <input type="hidden" id="op" name="op" value="mod_users" />
336                     <input type="button" id="add_user" class="btn btn-default" onclick="UserSearchPopup();" value="Add user" />
337                 </div>
338             </li>
339         </ol>
340     </fieldset>
341
342 <fieldset class="rows">
343         <legend>
344             Catalog details
345             [% IF ( biblionumber ) %]
346                 <span><a href="/cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=[% biblionumber | uri %]"> Edit record</a></span>
347             [% END %]
348         </legend>
349         [% UNLESS ( existing ) %]
350         <input type="hidden" name="existing" value="no" />
351         [% END %]
352         <input type="hidden" name="ordernumber" value="[% ordernumber | html %]" />
353         <input type="hidden" name="basketno" value="[% basketno | html %]" />
354         <input type="hidden" name="booksellerid" value="[% booksellerid | html %]" />
355         <input type="hidden" name="biblionumber" value="[% biblionumber | html %]" />
356         <input type="hidden" name="listinc" id="listinc" value="[% listincgst | html %]" />
357         <input type="hidden" name="invoiceincgst" id="invoiceincgst" value="[% invoiceincgst | html %]" />
358         <input type="hidden" name="suggestionid" value="[% suggestionid | html %]" />
359         <input type="hidden" name="import_batch_id" value="[% import_batch_id | html %]" />
360
361         [% FOREACH c IN currencies %]
362             <input type="hidden" id="currency_rate_[% c.currency | html %]"  name="[% c.currency | html %]" value="[% c.rate | html %]" />
363         [% END %]
364
365         [% IF NOT Koha.Preference('UseACQFrameworkForBiblioRecords') OR NoACQframework %]
366             <ol><li>
367                 [% IF ( biblionumber ) %]
368                 <span class="label">Title</span>
369                     <input type="hidden" name="title" value="[% title | html %]" /> <span class="title">[% title | html %]</span>
370                 [% ELSE %]
371                 <label for="entertitle">Title: </label>
372                     <input type="text" id="entertitle" size="50" name="title" value="[% title | html %]" class="focus" required="required" />
373                     <span class="required">Required</span>
374                 [% END %]
375             </li>
376             <li>
377                 [% IF ( biblionumber ) %]
378                 <span class="label">Author: </span>
379                     <input type="hidden" name="author" id="author" value="[% author | html %]" />[% author | html %]
380                 [% ELSE %]
381                 <label for="author">Author: </label>
382                     <input type="text" size="50" name="author" id="author" value="[% author | html %]" />
383                 [% END %]
384             </li>
385             <li>
386                 [% IF ( biblionumber ) %]
387                 <span class="label">Publisher: </span>
388                     <input type="hidden" name="publishercode" id="publishercode" value="[% publishercode | html %]" />[% publishercode | html %]
389                 [% ELSE %]
390                 <label for="publishercode"> Publisher: </label>
391                     <input type="text" size="50" name="publishercode" id="publishercode" value="[% publishercode | html %]" />
392                 [% END %]
393             </li>
394             <li>
395                 [% IF ( biblionumber ) %]
396                 <span class="label">Edition: </span>
397                     <input type="hidden" name="editionstatement" id="editionstatement" value="[% editionstatement | html %]" />[% editionstatement | html %]
398
399                 [% ELSE %]
400                 <label for="editionstatement">Edition: </label>
401                     <input type="text" size="20" name="editionstatement" id="editionstatement" value="[% editionstatement | html %]" />
402                 [% END %]
403             </li>
404             <li>
405                 [% IF ( biblionumber ) %]
406                 <span class="label">Publication year: </span>
407                     <input type="hidden" name="publicationyear" id="publicationyear" value="[% publicationyear | html %]" />[% publicationyear | html %]
408                 [% ELSE %]
409                 <label for="publicationyear">Publication year: </label>
410                     <input type="text" size="10" name="publicationyear" id="publicationyear" value="[% publicationyear | html %]" />
411                 [% END %]
412             </li>
413             <li>
414                 [% IF ( biblionumber ) %]
415                 <span class="label">ISBN: </span>
416                     <input type="hidden" name="isbn" id="ISBN" value="[% isbn | html %]" />[% isbn | html %]
417                 [% ELSE %]
418                 <label for="ISBN">ISBN: </label>
419                     <input type="text" size="50" name="isbn" id="ISBN" value="[% isbn | html %]" />
420                 [% END %]
421             </li>
422             [% IF (UNIMARC) %]
423             <li>
424                 [% IF ( biblionumber ) %]
425                 <span class="label">EAN: </span>
426                     <input type="hidden" name="ean" id="EAN" value="[% ean | html %]" />[% ean | html %]
427                 [% ELSE %]
428                 <label for="EAN">EAN: </label>
429                     <input type="text" size="20" name="ean" id="EAN" value="[% ean | html %]" />
430                 [% END %]
431             </li>
432             [% END %]
433             <li>
434                 [% IF ( biblionumber ) %]
435                 <span class="label">Series: </span>
436                     <input type="hidden" name="series" id="series" value="[% seriestitle | html %]" />[% seriestitle | html %]
437                 [% ELSE %]
438                 <label for="series">Series: </label>
439                     <input type="text" size="50" name="series" id="series" value="[% seriestitle | html %]" />
440                 [% END %]
441             </li>
442                 [% UNLESS ( biblionumber ) %]
443                 [% IF ( itemtypeloop ) %]
444                 <li>
445                     <span class="label">Item type:</span>
446                     <select name="itemtype" style="width:12em;">
447                     [% FOREACH itemtype IN itemtypeloop %]
448                         <option value="[% itemtype.itemtype | html %]">[% itemtype.description | html %]</option>
449                     [% END %]
450                     </select>
451                 </li>
452                 [% END %]
453                 [% END %]
454             </ol>
455         [% ELSE %]
456             <input type="hidden" name="use_ACQ_framework" value="1" />
457             [% IF biblionumber %]
458                 <ol>
459                     [% FOREACH field IN catalog_details %]
460                         <li class="subfield_line">
461                             <label>[% field.lib | html %] ([% field.tag | html %][% field.subfield | html %])</label>
462                             [% field.value | html %]
463                         </li>
464                     [% END %]
465                 </ol>
466             [% ELSE %]
467                 <ol>
468                     [% FOREACH field IN catalog_details %]
469                         <li class="subfield_line">
470                             [% PROCESS display_subfield field=field %]
471                         </li>
472                     [% END %]
473                 </ol>
474             [% END %]
475         [% END %]
476     </fieldset>
477
478     [% IF ( suggestionid ) %]
479         <fieldset class="rows">
480         <legend>Suggestion</legend>
481         <ol>
482           <li>
483             <span class="label">Suggested by: </span>
484             [% surnamesuggestedby | html %][% IF ( firstnamesuggestedby ) %], [% firstnamesuggestedby | html %][% END %] (<a href="/cgi-bin/koha/suggestion/suggestion.pl?suggestionid=[% suggestionid | uri %]&amp;op=show">suggestion #[% suggestionid | html %]</a>)
485           </li>
486         </ol>
487         </fieldset>
488     [% END %]
489
490     [% UNLESS subscriptionid || basket.is_standing %][% # it is a suggestion, we have not items %]
491       [% IF (AcqCreateItemOrdering) %]
492
493       <div id="items_list" class="page-section" style="display:none">
494           <p><strong>Items list</strong></p>
495           <div style="width:100%;overflow:auto;">
496               <table>
497                   <thead>
498                       <tr>
499                           <th class="noExport">Actions</th>
500                           <th>Barcode</th>
501                           <th>Home library</th>
502                           <th>Holding library</th>
503                           <th>Not for loan</th>
504                           <th>Restricted</th>
505                           <th>Location</th>
506                           <th>Call number</th>
507                           <th>Copy number</th>
508                           <th>Inventory number</th>
509                           <th>Collection</th>
510                           <th>Item type</th>
511                           <th>Materials</th>
512                           <th>Notes</th>
513                       </tr>
514                   </thead>
515                   <tbody>
516                   </tbody>
517               </table>
518           </div>
519       </div>
520
521       <fieldset class="rows" id="itemfieldset">
522           <legend>Item</legend>
523           [% IF ( NoACQframework ) %]
524               <div class="dialog message">No ACQ framework, using default. You should create a framework with code ACQ, the items framework would be used</div>
525           [% END %]
526
527           [% UNLESS Koha.Preference('autoBarcode') == 'OFF' %]
528               <div class="dialog message">The autoBarcode system preference is set to [% Koha.Preference('autoBarcode') | html %] and items with blank barcodes will have barcodes generated upon save to database</div>
529           [% END %]
530
531           <div id="outeritemblock"></div>
532
533       </fieldset>
534       [% END %][%# | html UNLESS subscriptionid %]
535     [% END %][%# IF (AcqCreateItemOrdering) %]
536     <fieldset class="rows">
537         <legend>Accounting details</legend>
538         <ol>
539             <li>
540                 <label class="required" for="quantity">Quantity: </label>
541                 [% IF subscriptionid %]
542                     <input type="text" size="20" id="quantity" name="quantity" value="1" onchange="updateCosts();" />
543                 [% ELSIF AcqCreateItemOrdering %]
544                     [% IF basket.is_standing %]
545                         <input type="text" readonly="readonly" size="20" id="quantity" name="quantity" value="1" />
546                     [% ELSE %]
547                         <input type="text" readonly="readonly" size="20" id="quantity" name="quantity" value="0" />
548                     [% END %]
549                 [% ELSE %]
550                     [% IF basket.is_standing %]
551                         <input type="text" readonly="readonly" size="20" id="quantity" name="quantity" value="1" />
552                     [% ELSE %]
553                         <input type="text" size="20" id="quantity" name="quantity" value="[% quantityrec | html %]" onchange="updateCosts();" />
554                     [% END %]
555                 [% END %]
556                 <span class="required">Required</span>
557                 <!-- origquantityrec only here for javascript compatibility (additem.js needs it, useless here, useful when receiveing an order -->
558                 <input id="origquantityrec" readonly="readonly" type="hidden" name="origquantityrec" value="1" />
559
560                 [% IF subscription %]
561                     <br/>
562                     <div class="hint">
563                         <span>Frequency:</span> [% subscription.frequency.description | html %] |
564                         [% IF subscription.numberlength %]<span>Number of issues: [% subscription.numberlength | html %]</span>[% END %]
565                         [% IF subscription.weeklength   %]<span>Number of weeks: [% subscription.weeklength | html %]</span>[% END %]
566                         [% IF subscription.monthlength  %]<span>Number of months: [% subscription.monthlength | html %]</span>[% END %]
567                     </div>
568                 [% END %]
569             </li>
570             <li>
571                 <label class="required" for="budget_id">Fund: </label>
572                 [% active_count = 0 %]
573                 [% IF !ordernumber %]
574                     [% FOREACH budget_loo IN budget_loop %]
575                         [% active_count= active_count + budget_loo.b_active %]
576                     [% END %]
577                 [% END %]
578                 <select class="select2" id="budget_id" name="budget_id">
579                     <option value="">Select a fund</option>
580                 [% FOREACH budget_loo IN budget_loop %]
581                    [% level_indent_cnt = 0 %]
582                     [% level_indent = "" %]
583                     [% WHILE level_indent_cnt < budget_loo.b_level %]
584                         [% level_indent = level_indent _ " -- " %]
585                         [% level_indent_cnt = level_indent_cnt +1 %]
586                     [% END %]
587
588                     [% IF ( budget_loo.b_sel ) %]
589                         [% active_count = 0 #select no other fund %]
590                         <option value="[% budget_loo.b_id | html %]" selected="selected" data-sort1-authcat="[% budget_loo.b_sort1_authcat | html %]" data-sort2-authcat="[% budget_loo.b_sort2_authcat | html %]"
591                         >
592                     [% ELSIF active_count==1 && budget_loo.b_active %]
593                         <option value="[% budget_loo.b_id | html %]" selected="selected" data-sort1-authcat="[% budget_loo.b_sort1_authcat | html %]" data-sort2-authcat="[% budget_loo.b_sort2_authcat | html %]"
594                         >
595                     [% ELSE %]
596                         [% bdgclass=budget_loo.b_active? "": "b_inactive" | html %]
597                         <option value="[% budget_loo.b_id | html %]" class="[% bdgclass | html %]" data-sort1-authcat="[% budget_loo.b_sort1_authcat | html %]" data-sort2-authcat="[% budget_loo.b_sort2_authcat | html %]"
598                         >
599                     [% END %]
600                         [% level_indent | html %][% budget_loo.b_txt | html %][% IF !budget_loo.b_active %] (inactive)[% END %]
601                     </option>
602                 [% END %]
603                 </select>
604                 <span class="required">Required</span>
605                 <label for="showallbudgets" style="float:none;">&nbsp;Show inactive:</label>
606                 <input type="checkbox" id="showallbudgets" />
607             </li>
608                 <li>
609                         <label for="currency">Currency:</label>
610             <select name="currency" id="currency" onchange="updateCosts();">
611                 [% FOREACH c IN currencies %]
612                     [% IF ordernumber and c.currency == currency or not ordernumber and c.currency == vendor_currency %]
613                         <option value="[% c.currency | html %]" selected="selected">[% c.currency | html %]</option>
614                     [% ELSIF not c.archived %]
615                         <option value="[% c.currency | html %]">[% c.currency | html %]</option>
616                     [% END %]
617                 [% END %]
618             </select>
619                 </li>
620             <li>
621                 <label for="listprice">Vendor price: </label>
622                     <input class="decimal" type="text" size="20" name="listprice" id="listprice" value="[% listprice | html %]" onchange="updateCosts()" /> [% IF (listincgst == 1) %](tax inclusive)[% ELSE %](tax exclusive)[% END %]
623             </li>
624             <li>
625                     <label for="uncertainprice">Uncertain price: </label>
626                     [% IF ( uncertainprice ) %]
627                     <input type="checkbox" name="uncertainprice"  id="uncertainprice" value="1" checked="checked" />
628                     [% ELSE %]
629                     <input type="checkbox" name="uncertainprice" id="uncertainprice" value="1" />
630                 [% END %]
631             </li>
632             [% IF ( gst_values ) %]
633                 <li>
634                     <label for="tax_rate">Tax rate: </label>
635                     <select name="tax_rate" id="tax_rate" onchange="updateCosts();">
636                         [% SET gst_found = 0 %]
637                         [% FOREACH gst IN gst_values %]
638                           [% IF ( gst.option == tax_rate ) %]
639                             <option value="[% gst.option | html %]" selected="selected">[% gst.option * 100 | html %]%</option>
640                             [% SET gst_found = 1 %]
641                           [% ELSE %]
642                             <option value="[% gst.option | html %]">[% gst.option * 100 | html %]%</option>
643                           [% END %]
644                         [% END %]
645
646                         [% IF !gst_found %]
647                             <option value="[% tax_rate | html %]" selected="selected">[% tax_rate * 100 | html %]%</option>
648                         [% END %]
649                     </select>
650
651                     [% IF !gst_found %]<span class="required">Tax rate not defined in system preference TaxRates!</span>[% END %]
652             [% ELSE %]
653                     <input type="hidden" name="tax_rate" value="0" />
654                 </li>
655             [% END %]
656             <li>
657                 <label for="discount">Discount: </label>
658                 [% IF ( ordernumber ) %]
659                     <input type="text" size="6" name="discount" id="discount" value="[% orderdiscount | html %]" onchange="updateCosts();" />%
660                 [% ELSE %]
661                     <input type="text" size="6" name="discount" id="discount" value="[% discount | html %]" onchange="updateCosts();" />%
662                 [% END %]
663             </li>
664             <li>
665                 <label for="rrp">Retail price: </label>
666                 <input class="decimal" type="text" size="20" name="rrp" id="rrp" value="[% rrp | $Price on_editing => 1 %]" /> (adjusted for [% cur_active | html %], [% IF (listincgst == 1) %]tax inclusive[% ELSE %]tax exclusive[% END %])
667             </li>
668             <li>
669                 <label for="replacementprice">Replacement cost: </label>
670                 <input class="decimal" type="text" size="20" name="replacementprice" id="replacementprice" value="[% replacementprice | html | $Price on_editing => 1 %]" />
671             </li>
672             <li>
673                 <label for="ecost">Budgeted cost: </label>
674                 <input type="text" size="20" name="ecost" id="ecost" value="[% ecost | html %]" readonly="readonly"  /> [% IF (listincgst == 1) %](tax inclusive)[% ELSE %](tax exclusive)[% END %]
675             </li>
676             <li>
677                 <label for="total">Total: </label>
678                 <input type="text" id="total" size="20" name="total" value="[% total | html %]" readonly="readonly" /> (budgeted cost * quantity)
679             </li>
680             <li class="ordering_unitprice">
681                 <label for="unitprice">Actual cost: </label>
682                 <input class="decimal" type="text" id="unitprice" size="20" name="unitprice" value="[% unitprice | html %]" />
683                 [% IF (invoiceincgst == 1) %](tax inc.)[% ELSE %](tax exc.)[% END %]
684             </li>
685             <li>
686                 <label for="order_internalnote">Internal note: </label>
687                 <textarea id="order_internalnote" cols="30" rows="3" name="order_internalnote" >[% IF ( order_internalnote ) %][% order_internalnote | html %][% END %]</textarea>
688             </li>
689             <li>
690                 <label for="order_vendornote">Vendor note: </label>
691                 <textarea id="order_vendornote" cols="30" rows="3" name="order_vendornote" >[% IF ( order_vendornote ) %][% order_vendornote | html %][% END %]</textarea>
692             </li>
693             <li>
694                 <label for="estimated_delivery_date">Estimated delivery date: </label>
695                 <input type="text" id="estimated_delivery_date" size="10" name="estimated_delivery_date" class="flatpickr" value="[% estimated_delivery_date | html %]"/>
696                 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
697             </li>
698             <li>
699                 <div class="hint">The 2 following fields are available for your own usage. They can be useful for statistical purposes</div>
700             </li>
701             <li>
702                 <label for="sort1">Statistic 1: </label>
703                 <input id="sort1" type="text" id="sort1" size="20" name="sort1" value="[% sort1 | html %]" />
704             </li>
705             <li>
706                 <label for="sort2">Statistic 2: </label>
707                 <input id="sort2" type="text" id="sort2" size="20" name="sort2" value="[% sort2 | html %]" />
708             </li>
709         </ol>
710     </fieldset>
711
712 [% IF additional_fields.size %]
713     [% INCLUDE 'additional-fields-entry.inc' available = additional_fields values = additional_field_values %]
714 [% END %]
715
716     <fieldset class="action">
717         <input type="hidden" name="subscriptionid" value="[% subscriptionid | html %]" />
718         <input type="submit" class="btn btn-primary" value="Save" />
719         [% IF (suggestionid) %]
720             <a class="cancel" href="/cgi-bin/koha/acqui/newordersuggestion.pl?booksellerid=[% booksellerid | html %]&amp;basketno=[% basketno | html %]">Cancel</a>
721         [% ELSE %]
722             [% IF subscriptionid %]
723                 <a class="cancel" href="/cgi-bin/koha/acqui/newordersubscription.pl?booksellerid=[% booksellerid | html %]&amp;basketno=[% basketno | html %]">Cancel</a>
724             [% ELSE %]
725                 <a class="cancel" href="/cgi-bin/koha/acqui/basket.pl?basketno=[% basketno | html %]">Cancel</a>
726             [% END %]
727         [% END %]
728     </fieldset>
729 </form>
730
731 <div id="procModal" data-backdrop="static" class="modal fade" aria-labelledby="procModal" aria-hidden="true">
732     <div class="modal-dialog">
733     <div class="modal-content">
734     <div class="modal-body">
735     <h3>Processing multiple items</h3>
736     </div>
737     </div>
738     </div>
739 </div>
740
741 <div id="multiCountModal" class="modal fade" aria-labelledby="multiCountModal" aria-hidden="true">
742     <div class="modal-dialog">
743     <div class="modal-content">
744     <h3>Invalid number of copies</h3>
745     <p>Please enter a <strong>number</strong>, greater than or equal to 1</p>
746     </div>
747     </div>
748 </div>
749
750 </main>
751 </div> <!-- /.col-sm-10.col-sm-push-2 -->
752
753 <div class="col-sm-2 col-sm-pull-10">
754     <aside>
755         [% INCLUDE 'acquisitions-menu.inc' %]
756     </aside>
757 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
758 </div> <!-- /.row -->
759
760 [% MACRO jsinclude BLOCK %]
761 [% END %]
762
763 [% INCLUDE 'intranet-bottom.inc' %]
764
765 [% BLOCK display_subfield %]
766     <label>[% field.marc_lib | html %] ([% field.tag | html %][% field.subfield | html %])</label>
767
768     [% SET mv = field.marc_value %]
769     [% IF ( mv.type == 'text' ) %]
770         [% IF ( mv.readonly == 1 ) %]
771             <input type="text" id="[%- mv.id | html -%]" name="bib_field_value" value="[%- mv.value | html -%]" class="input_marceditor readonly" tabindex="1" size="[%- mv.size | html -%]" maxlength="[%- mv.maxlength | html -%]" readonly="readonly" />
772         [% ELSE %]
773             <input type="text" id="[%- mv.id | html -%]" name="bib_field_value" value="[%- mv.value | html -%]" class="input_marceditor" tabindex="1" size="[%- mv.size | html -%]" maxlength="[%- mv.maxlength | html -%]" />
774         [% END %]
775
776     [% ELSIF ( mv.type == 'text_complex' ) %]
777         <input type="text" id="[%- mv.id | html -%]" name="bib_field_value" value="[%- mv.value | html -%]" class="input_marceditor framework_plugin" tabindex="1" size="[%- mv.size | html -%]" maxlength="[%- mv.maxlength | html -%]" />
778         [% mv.javascript | $raw %]
779     [% ELSIF ( mv.type == 'hidden' ) %]
780         <input tabindex="1" type="hidden" id="[%- mv.id | html -%]" name="bib_field_value" size="[%- mv.size | html -%]" maxlength="[%- mv.maxlength | html -%]" value="[%- mv.value | html -%]" />
781     [% ELSIF ( mv.type == 'textarea' ) %]
782         <textarea cols="70" rows="4" id="[%- mv.id | html -%]" name="bib_field_value" class="input_marceditor" tabindex="1">[%- mv.value | html -%]</textarea>
783     [% ELSIF ( mv.type == 'select' ) %]
784         <select name="bib_field_value" tabindex="1" class="input_marceditor select2" id="[%- mv.id | html -%]">
785         [% FOREACH aval IN mv.values %]
786             [% IF aval == mv.default %]
787             <option value="[%- aval | html -%]" selected="selected">[%- mv.labels.$aval | html -%]</option>
788             [% ELSE %]
789             <option value="[%- aval | html -%]">[%- mv.labels.$aval | html -%]</option>
790             [% END %]
791         [% END %]
792         </select>
793     [% END  # /IF (mv.type...) %]
794
795     <div class="subfield_controls">
796         [% IF ( mv.type == 'text_complex' ) %]
797             [% IF mv.noclick %]
798                 <span class="buttonDot tag_editor disabled" tabindex="-1" title="Field autofilled by plugin"></span>
799             [% ELSE %]
800                 [% IF mv.plugin == "upload.pl" %]
801                     <a href="#" id="buttonDot_[% mv.id | html %]" class="tag_editor upload framework_plugin" tabindex="1"><i class="fa fa-upload" aria-hidden="true"></i> Upload</a>
802                 [% ELSE %]
803                     <a href="#" id="buttonDot_[% mv.id | html %]" class="buttonDot tag_editor framework_plugin" tabindex="1" title="Tag editor">Tag editor</a>
804                 [% END %]
805             [% END %]
806         [% END %]
807     </div>
808
809     <input type="hidden" name="bib_kohafield" value="[% field.kohafield | html %]" />
810     <input type="hidden" name="bib_tag" value="[% field.tag | html %]" />
811     <input type="hidden" name="bib_subfield" value="[% field.subfield | html %]" />
812     [% IF field.mandatory %] <span class="required">Required</span>[% END %]
813 [% END %]