Bug 7469: (follow-up) update shipment receiving form
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / acqui / parcels.tt
1 [% USE KohaDates %]
2 [% INCLUDE 'doc-head-open.inc' %]
3 <title>Koha &rsaquo; Acquisitions &rsaquo; Receive shipment from vendor [% name %]</title>
4 <link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
5 [% INCLUDE 'doc-head-close.inc' %]
6 [% INCLUDE 'calendar.inc' %]
7 [% INCLUDE 'datatables.inc' %]
8 <script type="text/javascript">
9 //<![CDATA[
10  $(document).ready(function() {
11 [% IF (dateformat == 'metric') %]
12     dt_add_type_uk_date();
13 [% END %]
14     var parcelst = $("#parcelst").dataTable($.extend(true, {}, dataTablesDefaults, {
15         "sPaginationType": "four_button"
16     } ) );
17  });
18  //]]>
19 </script>
20 </head>
21 <body id="acq_parcels" class="acq">
22 [% INCLUDE 'header.inc' %]
23 [% INCLUDE 'acquisitions-search.inc' %]
24
25 <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; <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid %]">[% name %]</a> &rsaquo; Receive shipment from vendor [% name %]</div>
26
27 [% IF ( count ) %]<div id="doc3" class="yui-t2">[% ELSE %]<div id="doc" class="yui-t7">[% END %]
28    
29    <div id="bd">
30         <div id="yui-main">
31         <div class="yui-b">
32
33 [% IF ( error_failed_to_create_invoice ) %]
34     <div id="error" class="dialog error">
35         <p>An error has occured. Invoice cannot be created.</p>
36     </div>
37 [% END %]
38 <h1>Receive shipment from vendor <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid %]">[% name %]</a></h1>
39
40     [% IF duplicate_invoices %]
41     <div id="parcels_duplicate_invoice" class="dialog alert">
42         <p>This invoice number has already been used. Would you like to receive on an existing invoice?</p>
43         <table>
44             <thead><tr><th>Invoice no.</th><th>Shipment date</th><th></th></tr></thead>
45             <tbody>
46                 [% FOREACH invoice IN duplicate_invoices %]
47                     <tr>
48                         <td>[% invoice.invoicenumber %]</td>
49                         <td>[% invoice.shipmentdate | $KohaDates %]</td>
50                         <td><a href="/cgi-bin/koha/acqui/parcel.pl?invoiceid=[% invoice.invoiceid %]">Receive</a></td>
51                     </tr>
52                 [% END %]
53             </tbody>
54         </table>
55         <form method="get" action="parcels.pl">
56             <input type="hidden" name="booksellerid" value="[% booksellerid %]" />
57             <input type="hidden" name="op" value="confirm" />
58             <input type="hidden" name="invoice" value="[% invoicenumber %]" />
59             <input type="hidden" name="shipmentdate" value="[% shipmentdate %]" />
60             <input type="hidden" name="shipmentcost" value="[% shipmentcost %]" />
61             <input type="hidden" name="shipmentcost_budgetid" value="[% shipmentcost_budgetid %]" />
62             <input type="submit" class="button" value="Create new invoice anyway" />
63         </form>
64     </div>
65     [% END %]
66
67
68 [% IF ( count ) %]
69 <p> [% count %] shipments</p>
70 <div id="resultlist">
71 <!-- Search Results Table -->
72
73 <table class="small" id="parcelst">
74     <thead>
75         <tr>
76             <th>Line</th>
77             <th>Date received</th>
78             <th>Invoice number</th>
79             <th>Item count</th>
80             <th>Biblio count</th>
81             <th>Items expected</th>
82         </tr>
83     </thead>
84     <tbody>
85     <!-- Actual Search Results -->
86     [% FOREACH searchresult IN searchresults %]
87         [% UNLESS ( loop.odd ) %]
88         <tr class="highlight">
89         [% ELSE %]
90         <tr>
91         [% END %]
92             <td>
93                 [% searchresult.number %]
94             </td>
95             <td>
96                 [% searchresult.datereceived %]
97             </td>
98             <td>
99                 [% IF ( searchresult.code ) %]
100                     <a href="/cgi-bin/koha/acqui/parcel.pl?invoiceid=[% searchresult.invoiceid %]">[% searchresult.code %]</a>
101                 [% ELSE %]
102                     <acronym title="not available">n/a</acronym>
103                 [% END %]
104             </td>
105             <td>
106                 [% searchresult.reccount %]
107             </td>
108             <td>
109                 [% searchresult.bibcount %]
110             </td>
111             <td>
112                 [% searchresult.itemcount %]
113             </td>
114         </tr>
115     [% END %]
116     </tbody>
117 </table>
118
119 <div id="resultnumber">
120 <!-- Row of numbers corresponding to search result pages -->
121 [% IF ( displayprev ) %]
122     <a href="parcels.pl?booksellerid=[% booksellerid %]&amp;startfrom=[% prevstartfrom %][% IF ( datefrom ) %]&amp;datefrom=[% datefrom %][% END %][% IF ( dateto ) %]&amp;dateto=[% dateto %][% END %][% IF ( code ) %]&amp;filter=[% code %][% END %][% IF ( orderby ) %]&amp;orderby=[% orderby %][% END %][% IF ( resultsperpage ) %]&amp;resultsperpage=[% resultsperpage %][% END %]&amp;type=intra">&lt;&lt; Previous</a>
123 [% END %]
124 [% FOREACH number IN numbers %]
125     [% IF ( number.highlight ) %]
126     <span class="current">[% number.number %]</span>
127     [% ELSE %]
128     <a href="parcels.pl?booksellerid=[% number.booksellerid %]&amp;startfrom=[% number.startfrom %][% IF ( number.datefrom ) %]&amp;datefrom=[% number.datefrom %][% END %][% IF ( number.dateto ) %]&amp;dateto=[% number.dateto %][% END %][% IF ( number.code ) %]&amp;filter=[% number.code %][% END %][% IF ( number.orderby ) %]&amp;orderby=[% number.orderby %][% END %][% IF ( number.resultsperpage ) %]&amp;resultsperpage=[% number.resultsperpage %][% END %]&amp;type=intra">[% number.number %]</a>
129     [% END %]
130 [% END %]
131 [% IF ( displaynext ) %]
132     <a href="parcels.pl?booksellerid=[% booksellerid %]&amp;startfrom=[% nextstartfrom %][% IF ( datefrom ) %]&amp;datefrom=[% datefrom %][% END %][% IF ( dateto ) %]&amp;dateto=[% dateto %][% END %][% IF ( code ) %]&amp;filter=[% code %][% END %][% IF ( orderby ) %]&amp;orderby=[% orderby %][% END %][% IF ( resultsperpage ) %]&amp;resultsperpage=[% resultsperpage %][% END %]&amp;type=intra">Next &gt;&gt;</a>
133 [% END %]
134 </div>
135 </div>
136 [% END %]
137
138     <div id="parcels_new_parcel">
139         <form method="get" action="parcels.pl">
140     <fieldset class="rows">
141     <legend>Receive a new shipment</legend>
142        <ol> <li>
143             <label for="invoice">Vendor invoice </label>
144             <input type="hidden" name="booksellerid" value="[% booksellerid %]" />
145             <input type="hidden" name="op" value="new" />
146                         <input type="text" size="20" id="invoice" name="invoice" class="focus" />
147         </li>
148                 [% IF ( gst ) %]
149         <li>
150             <label for="gst">GST:</label>
151             <input type="text" size="20" id="gst" name="gst" />
152         </li>
153                 [% END %]
154       <!--  // Removing freight input until shipping can be proplerly handled .
155           <li>
156             <label for="freight">Shipping:</label>
157             <input type="text" size="20" id="freight" name="freight" />
158         </li> -->
159          <li>
160             <label for="shipmentdate">Shipment date: </label>
161             <input type="text" id="shipmentdate" name="shipmentdate" maxlength="10" size="10" value="[% shipmentdate_today %]" class="datepicker" />
162             <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
163         </li>
164         <li>
165             <label for="shipmentcost">Shipment cost: </label>
166             <input type="text" id="shipmentcost" name="shipmentcost" size="10" />
167         </li>
168         <li>
169             <label for="shipmentcost_budgetid">Fund: </label>
170             <select id="shipmentcost_budgetid" name="shipmentcost_budgetid">
171                 <option value="">No fund</option>
172                 [% FOREACH budget IN budgets %]
173                     <option value="[% budget.budget_id %]">[% budget.budget_name %]</option>
174                 [% END %]
175             </select>
176         </li>
177                 </ol>
178     </fieldset>
179             <fieldset class="action"><input type="submit" class="button" value="Next" /> <a class="cancel" href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid %]">Cancel</a></fieldset>
180         </form>
181     </div>
182 </div>
183 </div>
184 <div class="yui-b">
185 [% IF ( count ) %]<form method="get" action="parcels.pl">
186     <fieldset class="brief">
187         <h4>Filter</h4>
188         <ol>
189             <li> <input type="hidden" name="booksellerid" value="[% booksellerid %]" /></li>
190             <li><label for="filter">Invoice number:</label><input type="text" size="20" name="filter" value="[% filter %]" id="filter" /></li>
191             <li><label for="datefrom">From:</label><input type="text" size="9" id="datefrom" name="datefrom" value="[% datefrom %]" /><br /> 
192                 <label for="dateto">To:</label><input type="text" size="9" id="dateto" name="dateto" value="[% dateto %]" /></li>
193             <li><label for="orderby">Sort by :</label><select name="orderby" id="orderby">
194                 <option value="invoicenumber">Invoice number</option>
195                 <option value="shipmentdate">Shipment date</option>
196                 <option value="shipmentdate desc">Shipment date reverse</option>
197                 <option value="invoicenumber desc">Invoice number reverse</option>
198                 </select><br />
199                 <label for="resultsperpage">Results per page :</label><select name="resultsperpage" id="resultsperpage">
200                 <option value="20">20</option>
201                 <option value="30">30</option>
202                 <option value="50">50</option>
203                 <option value="100">100</option>
204                 </select></li>
205         </ol>
206         <fieldset class="action"><input type="submit" class="button" value="Filter" /> <a href="/cgi-bin/koha/acqui/parcels.pl?booksellerid=[% booksellerid %]">Clear</a></fieldset>
207         </fieldset>
208 </form>[% END %]
209 </div>
210 </div>
211 [% INCLUDE 'intranet-bottom.inc' %]