Bug 10705: change 'shipment cost' to 'shipping cost'
[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     //keep a copy of all budgets before removing the inactives
19     var budgetId = $("#shipmentcost_budgetid");
20     var disabledBudgetsCopy = budgetId.html();
21     $('.b_inactive').remove();
22
23     $('#showallfunds').click(function() {
24         if ($(this).is(":checked")) {
25             budgetId.html(disabledBudgetsCopy); //Puts back all the funds
26         }
27         else {
28             $('.b_inactive').remove();
29         }
30     });
31  });
32  //]]>
33 </script>
34 </head>
35 <body id="acq_parcels" class="acq">
36 [% INCLUDE 'header.inc' %]
37 [% INCLUDE 'acquisitions-search.inc' %]
38
39 <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>
40
41 [% IF ( count ) %]<div id="doc3" class="yui-t2">[% ELSE %]<div id="doc" class="yui-t7">[% END %]
42    
43    <div id="bd">
44         <div id="yui-main">
45         <div class="yui-b">
46
47 [% IF ( error_failed_to_create_invoice ) %]
48     <div id="error" class="dialog error">
49         <p>An error has occured. Invoice cannot be created.</p>
50     </div>
51 [% END %]
52 <h1>Receive shipment from vendor <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid %]">[% name %]</a></h1>
53
54     [% IF duplicate_invoices %]
55     <div id="parcels_duplicate_invoice" class="dialog alert">
56         <p>This invoice number has already been used. Would you like to receive on an existing invoice?</p>
57         <table>
58             <thead><tr><th>Invoice no.</th><th>Shipment date</th><th></th></tr></thead>
59             <tbody>
60                 [% FOREACH invoice IN duplicate_invoices %]
61                     <tr>
62                         <td>[% invoice.invoicenumber %]</td>
63                         <td>[% invoice.shipmentdate | $KohaDates %]</td>
64                         <td><a href="/cgi-bin/koha/acqui/parcel.pl?invoiceid=[% invoice.invoiceid %]">Receive</a></td>
65                     </tr>
66                 [% END %]
67             </tbody>
68         </table>
69         <form method="get" action="parcels.pl">
70             <input type="hidden" name="booksellerid" value="[% booksellerid %]" />
71             <input type="hidden" name="op" value="confirm" />
72             <input type="hidden" name="invoice" value="[% invoicenumber %]" />
73             <input type="hidden" name="shipmentdate" value="[% shipmentdate %]" />
74             <input type="hidden" name="shipmentcost" value="[% shipmentcost %]" />
75             <input type="hidden" name="shipmentcost_budgetid" value="[% shipmentcost_budgetid %]" />
76             <input type="submit" class="button" value="Create new invoice anyway" />
77         </form>
78     </div>
79     [% END %]
80
81
82 [% IF ( count ) %]
83 <p> [% count %] shipments</p>
84 <div id="resultlist">
85 <!-- Search Results Table -->
86
87 <table class="small" id="parcelst">
88     <thead>
89         <tr>
90             <th>Line</th>
91             <th>Date received</th>
92             <th>Invoice number</th>
93             <th>Item count</th>
94             <th>Biblio count</th>
95             <th>Items expected</th>
96         </tr>
97     </thead>
98     <tbody>
99     <!-- Actual Search Results -->
100     [% FOREACH searchresult IN searchresults %]
101         [% UNLESS ( loop.odd ) %]
102         <tr class="highlight">
103         [% ELSE %]
104         <tr>
105         [% END %]
106             <td>
107                 [% searchresult.number %]
108             </td>
109             <td>
110                 [% searchresult.datereceived %]
111             </td>
112             <td>
113                 [% IF ( searchresult.code ) %]
114                     <a href="/cgi-bin/koha/acqui/parcel.pl?invoiceid=[% searchresult.invoiceid %]">[% searchresult.code %]</a>
115                 [% ELSE %]
116                     <acronym title="not available">n/a</acronym>
117                 [% END %]
118             </td>
119             <td>
120                 [% searchresult.reccount %]
121             </td>
122             <td>
123                 [% searchresult.bibcount %]
124             </td>
125             <td>
126                 [% searchresult.itemcount %]
127             </td>
128         </tr>
129     [% END %]
130     </tbody>
131 </table>
132
133 <div id="resultnumber">
134 <!-- Row of numbers corresponding to search result pages -->
135 [% IF ( displayprev ) %]
136     <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>
137 [% END %]
138 [% FOREACH number IN numbers %]
139     [% IF ( number.highlight ) %]
140     <span class="current">[% number.number %]</span>
141     [% ELSE %]
142     <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>
143     [% END %]
144 [% END %]
145 [% IF ( displaynext ) %]
146     <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>
147 [% END %]
148 </div>
149 </div>
150 [% END %]
151
152     <div id="parcels_new_parcel">
153         <form method="get" action="parcels.pl">
154     <fieldset class="rows">
155     <legend>Receive a new shipment</legend>
156        <ol> <li>
157             <label for="invoice">Vendor invoice </label>
158             <input type="hidden" name="booksellerid" value="[% booksellerid %]" />
159             <input type="hidden" name="op" value="new" />
160                         <input type="text" size="20" id="invoice" name="invoice" class="focus" />
161         </li>
162                 [% IF ( gst ) %]
163         <li>
164             <label for="gst">GST:</label>
165             <input type="text" size="20" id="gst" name="gst" />
166         </li>
167                 [% END %]
168       <!--  // Removing freight input until shipping can be proplerly handled .
169           <li>
170             <label for="freight">Shipping:</label>
171             <input type="text" size="20" id="freight" name="freight" />
172         </li> -->
173          <li>
174             <label for="shipmentdate">Shipment date: </label>
175             <input type="text" id="shipmentdate" name="shipmentdate" maxlength="10" size="10" value="[% shipmentdate_today %]" class="datepicker" />
176             <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
177         </li>
178         <li>
179             <label for="shipmentcost">Shipping cost: </label>
180             <input type="text" id="shipmentcost" name="shipmentcost" size="10" />
181         </li>
182         <li>
183             <label for="shipmentcost_budgetid">Fund: </label>
184             <select id="shipmentcost_budgetid" name="shipmentcost_budgetid">
185                 <option value="">No fund</option>
186                 [% FOREACH budget IN budgets %]
187                     [% IF ( budget.b_active ) %]
188                         <option value="[% budget.b_id %]">[% budget.b_txt %]</option>
189                     [% ELSE %]
190                         <option value="[% budget.b_id %]" class="b_inactive">[% budget.b_txt %] (inactive)</option>
191                     [% END %]
192                 [% END %]
193             </select>
194             <label for="showallfunds" style="float:none;width:auto;">&nbsp;Show all:</label>
195             <input type="checkbox" id="showallfunds" />
196
197         </li>
198                 </ol>
199     </fieldset>
200             <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>
201         </form>
202     </div>
203 </div>
204 </div>
205 <div class="yui-b">
206 [% IF ( count ) %]<form method="get" action="parcels.pl">
207     <fieldset class="brief">
208         <h4>Filter</h4>
209         <ol>
210             <li> <input type="hidden" name="booksellerid" value="[% booksellerid %]" /></li>
211             <li><label for="filter">Invoice number:</label><input type="text" size="20" name="filter" value="[% filter %]" id="filter" /></li>
212             <li><label for="datefrom">From:</label><input type="text" size="9" id="datefrom" name="datefrom" value="[% datefrom %]" /><br /> 
213                 <label for="dateto">To:</label><input type="text" size="9" id="dateto" name="dateto" value="[% dateto %]" /></li>
214             <li><label for="orderby">Sort by :</label><select name="orderby" id="orderby">
215                 <option value="invoicenumber">Invoice number</option>
216                 <option value="shipmentdate">Shipment date</option>
217                 <option value="shipmentdate desc">Shipment date reverse</option>
218                 <option value="invoicenumber desc">Invoice number reverse</option>
219                 </select><br />
220                 <label for="resultsperpage">Results per page :</label><select name="resultsperpage" id="resultsperpage">
221                 <option value="20">20</option>
222                 <option value="30">30</option>
223                 <option value="50">50</option>
224                 <option value="100">100</option>
225                 </select></li>
226         </ol>
227         <fieldset class="action"><input type="submit" class="button" value="Filter" /> <a href="/cgi-bin/koha/acqui/parcels.pl?booksellerid=[% booksellerid %]">Clear</a></fieldset>
228         </fieldset>
229 </form>[% END %]
230 </div>
231 </div>
232 [% INCLUDE 'intranet-bottom.inc' %]