Bug 2696: Fine payments should show what was paid for
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / acqui / uncertainprice.tt
1 [% USE Asset %]
2 [% USE Koha %]
3 [% SET footerjs = 1 %]
4 [% INCLUDE 'doc-head-open.inc' %]
5 <title>Koha &rsaquo; Acquisitions &rsaquo; [% IF ( booksellername ) %]Orders with uncertain prices for vendor [% booksellername %][% ELSE %]Orders with uncertain prices[% END %]</title>
6 [% Asset.css("css/datatables.css") %]
7 [% INCLUDE 'doc-head-close.inc' %]
8 </head>
9
10 <body id="acq_uncertainprice" class="acq">
11 [% INCLUDE 'header.inc' %]
12 [% INCLUDE 'acquisitions-search.inc' %]
13
14 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a> &rsaquo; [% IF ( booksellername ) %]<a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid %]">[% booksellername %]</a> &rsaquo; Uncertain prices for vendor [% booksellername %][% ELSE %]Uncertain prices[% END %]</div>
15
16 <div id="doc3" class="yui-t2">
17
18     <div id="bd">
19     <div id="yui-main">
20     <div class="yui-b">
21
22 [% INCLUDE 'acquisitions-toolbar.inc' %]
23         [% IF ( validate ) %]
24             [% SET metacontent = '0; url=' _  scriptname  _ '?booksellerid=' _  booksellerid %]
25             <META HTTP-EQUIV=Refresh CONTENT="[% metacontent %]">
26         [% ELSE %]
27         [% IF ( booksellername ) %]
28             <h1>Orders with uncertain prices for vendor <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid %]">[% booksellername %]</a></h1>
29             <h2>Contact information</h2>
30             <p><strong>Address: </strong>
31                 [% booksellerpostal %]
32                 [% bookselleraddress1 %]
33                 [% bookselleraddress2 %]
34                 [% bookselleraddress3 %]
35                 [% bookselleraddress4 %]
36                 <a href="[% booksellerurl %]">[% booksellerurl %]</a>
37             </p>
38             <p><strong>Phone: </strong>
39                 [% booksellerphone %] / Fax:
40                 [% booksellerfax %]</p>
41             <dl>
42                 [% FOREACH contact IN contacts %]
43                     <dt><strong>Contact: </strong></dt>
44                     <dd>[% contact.name %]
45                         [% contact.position %]
46                         [% contact.phone %]
47                         [% contact.altphone %]
48                         [% contact.email %]
49                         [% contact.notes %]
50                     </dd>
51                 [% END %]
52             </dl>
53             [% IF ( booksellernotes ) %]
54             <p><strong>Notes: </strong>
55                 [% booksellernotes %]</p>
56             [% END %]
57         [% END %]
58
59         <h2>Orders with uncertain prices</h2>
60         <form action="[% scriptname %]" method="post">
61         <input type="hidden" name="booksellerid" value="[% booksellerid %]" />
62         <label for="owner">Orders from:</label>
63         <select id="owner" name="owner">
64             [% IF ( owner ) %]
65             <option value="0">Everyone</option>
66             <option value="1" selected="selected">me</option>
67             [% ELSE %]
68             <option value="0" selected="selected">Everyone</option>
69             <option value="1">me</option>
70             [% END %]
71         </select>
72         <input type="submit" value="Filter" />
73         </form>
74         <form action="[% scriptname %]" method="post" id="uncertainprices">
75         <input type="hidden" name="booksellerid" value="[% booksellerid %]" />
76         <input type="hidden" name="op" value="validate" />
77         <table id="uncertainpricet">
78         <thead>
79             <tr>
80             <th>Basket</th>
81            <th>Order</th>
82             <th>By</th>
83             <th>Uncertain</th>
84             <th>Price</th>
85             <th>Quantity</th>
86             </tr>
87         </thead>
88         <tbody>
89             [% FOREACH uncertainpriceorder IN uncertainpriceorders %]
90             <tr>
91         <td>
92             [% uncertainpriceorder.basketname %]
93         </td>
94             <td>
95             <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% uncertainpriceorder.biblionumber %]">[% uncertainpriceorder.title |html %]</a>
96             [% IF ( uncertainpriceorder.author ) %] <em>by</em> [% uncertainpriceorder.author %][% END %]
97             [% IF ( uncertainpriceorder.publishercode ) %]
98                 <br /><em>Publisher:</em> [% uncertainpriceorder.publishercode %]
99                 [%- IF    ( uncertainpriceorder.publicationyear ) -%], [% uncertainpriceorder.publicationyear %]
100                 [%- ELSIF ( uncertainpriceorder.copyrightdate ) -%] [% uncertainpriceorder.copyrightdate %]
101                 [% END %]
102             [% END %]
103             [% IF ( uncertainpriceorder.isbn ) %]<br />[% uncertainpriceorder.isbn %][% END %]
104             <br />
105             <a href="neworderempty.pl?ordernumber=[% uncertainpriceorder.ordernumber %]&amp;booksellerid=[% booksellerid %]&amp;basketno=[% uncertainpriceorder.basketno %]">
106                 Edit
107             </a>
108         </td>
109         <td>
110             [% uncertainpriceorder.firstname %] [% uncertainpriceorder.surname %]
111         </td>
112             <td>
113                 <input type="checkbox" name="uncertainprice[% uncertainpriceorder.ordernumber %]" value="1" checked="checked" />
114             </td>
115             <td>
116             <input class="check_uncertain" data-ordernumber="[% uncertainpriceorder.ordernumber %]" type="text" size="10" name="price[% uncertainpriceorder.ordernumber %]" value="[% uncertainpriceorder.listprice %]" />
117             </td>
118             <td>
119         [% IF basket.effective_create_items == 'ordering' %]
120             [% uncertainpriceorder.quantity %]
121             <input type="hidden" name="qty[% uncertainpriceorder.ordernumber %]" value="[% uncertainpriceorder.quantity %]" />
122         [% ELSE %]
123             <input class="check_uncertain" data-ordernumber="[% uncertainpriceorder.ordernumber %]" type="text" size="10" name="qty[% uncertainpriceorder.ordernumber %]" value="[% uncertainpriceorder.quantity %]" />
124         [% END %]
125             </td>
126             </tr>
127             [% END %]
128     </tbody>
129         </table>
130     <fieldset class="action"><input type="submit" value="Save" /></fieldset>
131         </form>
132         [% END %]
133
134 </div>
135 </div>
136 <div class="yui-b">
137 [% INCLUDE 'vendor-menu.inc' %]
138 </div>
139 </div>
140
141 [% MACRO jsinclude BLOCK %]
142     [% Asset.js("js/acquisitions-menu.js") %]
143     [% INCLUDE 'datatables.inc' %]
144     <script type="text/javascript">
145         $(document).ready(function() {
146             var uncertainpricet = $("#uncertainpricet").dataTable($.extend(true, {}, dataTablesDefaults, {
147                 "aoColumnDefs": [
148                     { "aTargets": [ -1, -2, -3 ], "bSortable": false, "bSearchable": false },
149                 ],
150                 "sPaginationType": "four_button"
151             }));
152             $(".check_uncertain").on("change",function(){
153                 var form = document.getElementById("uncertainprices");
154                 var ordernumber = $(this).data("ordernumber");
155                 uncheckbox( form, ordernumber );
156             });
157         });
158         var MSG_INVALIDPRICE = _("ERROR: Price is not a valid number, please check the price and try again!");
159     </script>
160     [% Asset.js("js/acq.js") %]
161 [% END %]
162
163 [% INCLUDE 'intranet-bottom.inc' %]