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