86d0f19c9ce495eb5614575c605f69f452268cd5
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / acqui / uncertainprice.tt
1 [% USE raw %]
2 [% USE Asset %]
3 [% USE Koha %]
4 [% PROCESS 'i18n.inc' %]
5 [% SET footerjs = 1 %]
6 [% INCLUDE 'doc-head-open.inc' %]
7 <title>Koha &rsaquo; Acquisitions &rsaquo; [% IF ( booksellername ) %]Orders with uncertain prices for vendor [% booksellername | html %][% ELSE %]Orders with uncertain prices[% END %]</title>
8 [% INCLUDE 'doc-head-close.inc' %]
9 </head>
10
11 <body id="acq_uncertainprice" class="acq">
12 [% INCLUDE 'header.inc' %]
13 [% INCLUDE 'acquisitions-search.inc' %]
14
15 <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 | html %]">[% booksellername | html %]</a> &rsaquo; Uncertain prices for vendor [% booksellername | html %][% ELSE %]Uncertain prices[% END %]</div>
16
17 <div class="main container-fluid">
18     <div class="row">
19         <div class="col-sm-10 col-sm-push-2">
20             <main>
21
22 [% INCLUDE 'acquisitions-toolbar.inc' %]
23         [% IF ( validate ) %]
24             [% SET metacontent = '0; url=' _  scriptname  _ '?booksellerid=' _  booksellerid %]
25             <META HTTP-EQUIV=Refresh CONTENT="[% metacontent | html %]">
26         [% ELSE %]
27         [% IF ( booksellername ) %]
28             <h1>Orders with uncertain prices for vendor <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid | uri %]">[% booksellername | html %]</a></h1>
29             <h2>Contact information</h2>
30             <p><strong>Address: </strong>
31                 [% booksellerpostal | html %]
32                 [% bookselleraddress1 | html %]
33                 [% bookselleraddress2 | html %]
34                 [% bookselleraddress3 | html %]
35                 [% bookselleraddress4 | html %]
36                 <a href="[% booksellerurl | url %]">[% booksellerurl | html %]</a>
37             </p>
38             <p><strong>Phone: </strong>
39                 [% booksellerphone | html %] / Fax:
40                 [% booksellerfax | html %]</p>
41             <dl>
42                 [% FOREACH contact IN contacts %]
43                     <dt><strong>Contact: </strong></dt>
44                     <dd>[% contact.name | html %]
45                         [% contact.position | html %]
46                         [% contact.phone | html %]
47                         [% contact.altphone | html %]
48                         [% contact.email | html %]
49                         [% contact.notes | html %]
50                     </dd>
51                 [% END %]
52             </dl>
53             [% IF ( booksellernotes ) %]
54             <p><strong>Notes: </strong>
55                 [% booksellernotes | html %]</p>
56             [% END %]
57         [% END %]
58
59         <h2>Orders with uncertain prices</h2>
60         <form action="[% scriptname | html %]" method="post">
61         <input type="hidden" name="booksellerid" value="[% booksellerid | html %]" />
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 | html %]" method="post" id="uncertainprices">
75         <input type="hidden" name="booksellerid" value="[% booksellerid | html %]" />
76         <input type="hidden" name="op" value="validate" />
77         <table id="uncertainpricet">
78         <thead>
79             <tr>
80             <th>Basket</th>
81            <th>[% tp('noun', 'Order') | html %]</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 | html %]
93         </td>
94             <td>
95             <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% uncertainpriceorder.biblionumber | uri %]">[% uncertainpriceorder.title | html %]</a>
96             [% IF ( uncertainpriceorder.author ) %] <em>by</em> [% uncertainpriceorder.author | html %][% END %]
97             [% IF ( uncertainpriceorder.publishercode ) %]
98                 <br /><em>Publisher:</em> [% uncertainpriceorder.publishercode | html %]
99                 [%- IF    ( uncertainpriceorder.publicationyear ) -%], [% uncertainpriceorder.publicationyear | html %]
100                 [%- ELSIF ( uncertainpriceorder.copyrightdate ) -%] [% uncertainpriceorder.copyrightdate | html %]
101                 [% END %]
102             [% END %]
103             [% IF ( uncertainpriceorder.isbn ) %]<br />[% uncertainpriceorder.isbn | html %][% END %]
104             <br />
105             <a href="neworderempty.pl?ordernumber=[% uncertainpriceorder.ordernumber | uri %]&amp;booksellerid=[% booksellerid | uri %]&amp;basketno=[% uncertainpriceorder.basketno | uri %]">
106                 Edit
107             </a>
108         </td>
109         <td>
110             [% uncertainpriceorder.firstname | html %] [% uncertainpriceorder.surname | html %]
111         </td>
112             <td>
113                 <input type="checkbox" name="uncertainprice[% uncertainpriceorder.ordernumber | html %]" value="1" checked="checked" />
114             </td>
115             <td>
116             <input class="check_uncertain" data-ordernumber="[% uncertainpriceorder.ordernumber | html %]" type="text" size="10" name="price[% uncertainpriceorder.ordernumber | html %]" value="[% uncertainpriceorder.listprice | html %]" />
117             </td>
118             <td>
119         [% IF basket.effective_create_items == 'ordering' %]
120             [% uncertainpriceorder.quantity | html %]
121             <input type="hidden" name="qty[% uncertainpriceorder.ordernumber | html %]" value="[% uncertainpriceorder.quantity | html %]" />
122         [% ELSE %]
123             <input class="check_uncertain" data-ordernumber="[% uncertainpriceorder.ordernumber | html %]" type="text" size="10" name="qty[% uncertainpriceorder.ordernumber | html %]" value="[% uncertainpriceorder.quantity | html %]" />
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 </main>
135 </div> <!-- /.col-sm-10.col-sm-push-2 -->
136
137 <div class="col-sm-2 col-sm-pull-10">
138     <aside>
139         [% INCLUDE 'vendor-menu.inc' %]
140     </aside>
141 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
142 </div> <!-- /.row -->
143
144 [% MACRO jsinclude BLOCK %]
145     [% Asset.js("js/acquisitions-menu.js") | $raw %]
146     [% INCLUDE 'datatables.inc' %]
147     <script>
148         $(document).ready(function() {
149             var uncertainpricet = $("#uncertainpricet").dataTable($.extend(true, {}, dataTablesDefaults, {
150                 "aoColumnDefs": [
151                     { "aTargets": [ -1, -2, -3 ], "bSortable": false, "bSearchable": false },
152                 ],
153                 "sPaginationType": "full"
154             }));
155             $(".check_uncertain").on("change",function(){
156                 var form = document.getElementById("uncertainprices");
157                 var ordernumber = $(this).data("ordernumber");
158                 uncheckbox( form, ordernumber );
159             });
160         });
161         var MSG_INVALIDPRICE = _("ERROR: Price is not a valid number, please check the price and try again!");
162     </script>
163     [% Asset.js("js/acq.js") | $raw %]
164 [% END %]
165
166 [% INCLUDE 'intranet-bottom.inc' %]