Bug 34169: Add decimal class to all relevant input fields in the acquisitions module
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / acqui / uncertainprice.tt
1 [% USE raw %]
2 [% USE Asset %]
3 [% USE Koha %]
4 [% USE Price %]
5 [% PROCESS 'i18n.inc' %]
6 [% SET footerjs = 1 %]
7 [% INCLUDE 'doc-head-open.inc' %]
8 <title>[% IF ( booksellername ) %]Orders with uncertain prices for vendor [% booksellername | html %][% ELSE %]Orders with uncertain prices[% END %] &rsaquo; Acquisitions &rsaquo; Koha</title>
9 [% INCLUDE 'doc-head-close.inc' %]
10 </head>
11
12 <body id="acq_uncertainprice" class="acq">
13 [% WRAPPER 'header.inc' %]
14     [% INCLUDE 'acquisitions-search.inc' %]
15 [% END %]
16
17 [% WRAPPER 'sub-header.inc' %]
18     [% WRAPPER breadcrumbs %]
19         [% WRAPPER breadcrumb_item %]
20             <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a>
21         [% END %]
22         [% IF ( booksellername ) %]
23             [% WRAPPER breadcrumb_item %]
24                 <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid | uri %]">[% booksellername | html %]</a>
25             [% END %]
26             [% WRAPPER breadcrumb_item bc_active= 1 %]
27                 <span>Uncertain prices for vendor [% booksellername | html %]</span>
28             [% END %]
29         [% ELSE %]
30             [% WRAPPER breadcrumb_item bc_active= 1 %]
31                 <span>Uncertain prices</span>
32             [% END %]
33         [% END %]
34     [% END #/ WRAPPER breadcrumbs %]
35 [% END #/ WRAPPER sub-header.inc %]
36
37 <div class="main container-fluid">
38     <div class="row">
39         <div class="col-sm-10 col-sm-push-2">
40             <main>
41
42 [% INCLUDE 'acquisitions-toolbar.inc' %]
43         [% IF ( validate ) %]
44             [% SET metacontent = '0; url=' _  scriptname  _ '?booksellerid=' _  booksellerid %]
45             <META HTTP-EQUIV=Refresh CONTENT="[% metacontent | html %]">
46         [% ELSE %]
47         [% IF ( booksellername ) %]
48             <h1>Orders with uncertain prices for vendor <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid | uri %]">[% booksellername | html %]</a></h1>
49
50             <div class="page-section">
51                 <h2>Contact information</h2>
52                 <p><strong>Address: </strong>
53                     [% booksellerpostal | html %]
54                     [% bookselleraddress1 | html %]
55                     [% bookselleraddress2 | html %]
56                     [% bookselleraddress3 | html %]
57                     [% bookselleraddress4 | html %]
58                 </p>
59                 <p><strong>Phone: </strong>
60                     [% booksellerphone | html %]
61                 <dl>
62                     [% FOREACH contact IN contacts %]
63                         <dt><strong>Contact: </strong></dt>
64                         <dd>[% contact.name | html %]
65                             [% contact.position | html %]
66                             [% contact.phone | html %]
67                             [% contact.altphone | html %]
68                             [% contact.email | html %]
69                             [% contact.notes | html %]
70                         </dd>
71                     [% END %]
72                 </dl>
73                 [% IF ( booksellernotes ) %]
74                 <p><strong>Notes: </strong>
75                     [% booksellernotes | html %]</p>
76                 [% END %]
77             </div> <!-- /.page-section -->
78         [% END %]
79
80         <div class="page-section">
81             <h2>Order lines with uncertain prices</h2>
82             <form action="[% scriptname | html %]" method="post">
83                 <input type="hidden" name="booksellerid" value="[% booksellerid | html %]" />
84                 <label for="owner">Orders from:</label>
85                 <select id="owner" name="owner">
86                     [% IF ( owner ) %]
87                         <option value="0">Everyone</option>
88                         <option value="1" selected="selected">me</option>
89                     [% ELSE %]
90                         <option value="0" selected="selected">Everyone</option>
91                         <option value="1">me</option>
92                     [% END %]
93                 </select>
94                 <input type="submit" class="btn btn-primary" value="Filter" />
95             </form>
96         </div> <!-- /.page-section -->
97         <form action="[% scriptname | html %]" method="post" id="uncertainprices">
98             <fieldset class="rows">
99                 <input type="hidden" name="booksellerid" value="[% booksellerid | html %]" />
100                 <input type="hidden" name="op" value="validate" />
101                 <table id="uncertainpricet">
102                     <thead>
103                         <tr>
104                             <th>Basket</th>
105                             <th>[% tp('noun', 'Order') | html %]</th>
106                             <th>By</th>
107                             <th class="NoSort">Uncertain</th>
108                             <th class="NoSort">Price</th>
109                             <th class="NoSort">Quantity</th>
110                             <th class="NoSort">Edit</th>
111                         </tr>
112                     </thead>
113                     <tbody>
114                         [% FOREACH uncertainpriceorder IN uncertainpriceorders %]
115                             <tr>
116                                 <td>
117                                     <a href="/cgi-bin/koha/acqui/basket.pl?basketno=[% uncertainpriceorder.basketno | uri %]">[% uncertainpriceorder.basketname | html %]</a>
118                                 </td>
119                                 <td>
120                                     [% INCLUDE 'biblio-title.inc' biblio=uncertainpriceorder link = 1 %]
121                                     [% IF ( uncertainpriceorder.author ) %] <em>by</em> [% uncertainpriceorder.author | html %][% END %]
122                                     [% IF ( uncertainpriceorder.publishercode ) %]
123                                         <br /><em>Publisher:</em> [% uncertainpriceorder.publishercode | html %]
124                                         [%- IF    ( uncertainpriceorder.publicationyear ) -%], [% uncertainpriceorder.publicationyear | html %]
125                                         [%- ELSIF ( uncertainpriceorder.copyrightdate ) -%] [% uncertainpriceorder.copyrightdate | html %]
126                                         [% END %]
127                                     [% END %]
128                                     [% IF ( uncertainpriceorder.isbn ) %]<br />[% uncertainpriceorder.isbn | html %][% END %]
129                                     <br />
130                                 </td>
131                                 <td>
132                                     [% uncertainpriceorder.firstname | html %] [% uncertainpriceorder.surname | html %]
133                                 </td>
134                                 <td>
135                                     <input type="checkbox" name="uncertainprice[% uncertainpriceorder.ordernumber | html %]" value="1" checked="checked" />
136                                 </td>
137                                 <td>
138                                     <input class="check_uncertain decimal" data-ordernumber="[% uncertainpriceorder.ordernumber | html %]" type="text" size="10" name="price[% uncertainpriceorder.ordernumber | html %]" value="[% uncertainpriceorder.listprice | $Price on_editing => 1 %]" />
139                                 </td>
140                                 <td>
141                                 [% IF basket.effective_create_items == 'ordering' %]
142                                     [% uncertainpriceorder.quantity | html %]
143                                     <input type="hidden" name="qty[% uncertainpriceorder.ordernumber | html %]" value="[% uncertainpriceorder.quantity | html %]" />
144                                 [% ELSE %]
145                                     <input class="check_uncertain" data-ordernumber="[% uncertainpriceorder.ordernumber | html %]" type="text" size="10" name="qty[% uncertainpriceorder.ordernumber | html %]" value="[% uncertainpriceorder.quantity | html %]" />
146                                 [% END %]
147                                 </td>
148                                 <td class="actions">
149                                     <a href="/cgi-bin/koha/acqui/neworderempty.pl?ordernumber=[% uncertainpriceorder.ordernumber | uri %]&amp;booksellerid=[% booksellerid | uri %]&amp;basketno=[% uncertainpriceorder.basketno | uri %]" class="btn btn-default btn-xs"><i class="fa-solid fa-pencil" aria-hidden="true"></i> Edit</a>
150                                 </td>
151                             </tr>
152                         [% END %]
153                     </tbody>
154                 </table>
155             </fieldset>
156             <fieldset class="action"><input type="submit" class="btn btn-primary" value="Save" /></fieldset>
157         </form>
158     [% END %]
159
160 </main>
161 </div> <!-- /.col-sm-10.col-sm-push-2 -->
162
163 <div class="col-sm-2 col-sm-pull-10">
164     <aside>
165         [% INCLUDE 'vendor-menu.inc' %]
166     </aside>
167 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
168 </div> <!-- /.row -->
169
170 [% MACRO jsinclude BLOCK %]
171     [% Asset.js("js/acquisitions-menu.js") | $raw %]
172     [% Asset.js("js/acq.js") | $raw %]
173     [% INCLUDE 'datatables.inc' %]
174     <script>
175         $(document).ready(function() {
176             var uncertainpricet = $("#uncertainpricet").dataTable($.extend(true, {}, dataTablesDefaults, {
177                 "aoColumnDefs": [
178                     { 'bSortable': false, "bSearchable": false, 'aTargets': [ 'NoSort' ] },
179                 ],
180                 "sPaginationType": "full"
181             }));
182             $(".check_uncertain").on("change",function(){
183                 var form = document.getElementById("uncertainprices");
184                 var ordernumber = $(this).data("ordernumber");
185                 uncheckbox( form, ordernumber );
186             });
187         });
188     </script>
189     [% Asset.js("js/acq.js") | $raw %]
190 [% END %]
191
192 [% INCLUDE 'intranet-bottom.inc' %]