Bug 15758: Koha::Libraries - Remove GetBranchName
[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="[% interface %]/[% theme %]/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     var parcelst = $("#parcelst").dataTable($.extend(true, {}, dataTablesDefaults, {
12         "aoColumnDefs": [
13           { "sType": "title-string", "aTargets" : [ "title-string" ] }
14         ],
15         'bPaginate': false,
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 alert">
49         <p>An error has occurred. 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 | $KohaDates %]" />
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 class="title-string">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         <tr>
102             <td>
103                 [% searchresult.number %]
104             </td>
105             <td>
106                 <span title="[% searchresult.datereceived %]">[% searchresult.datereceived | $KohaDates %]</span>
107             </td>
108             <td>
109                 [% IF ( searchresult.code ) %]
110                     <a href="/cgi-bin/koha/acqui/parcel.pl?invoiceid=[% searchresult.invoiceid %]">[% searchresult.code %]</a>
111                 [% ELSE %]
112                     <abbr title="not available">n/a</abbr>
113                 [% END %]
114             </td>
115             <td>
116                 [% searchresult.reccount %]
117             </td>
118             <td>
119                 [% searchresult.bibcount %]
120             </td>
121             <td>
122                 [% searchresult.itemcount %]
123             </td>
124         </tr>
125     [% END %]
126     </tbody>
127 </table>
128
129 <div id="resultnumber">
130 <!-- Row of numbers corresponding to search result pages -->
131 [% IF ( displayprev ) %]
132     <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>
133 [% END %]
134 [% FOREACH number IN numbers %]
135     [% IF ( number.highlight ) %]
136     <span class="current">[% number.number %]</span>
137     [% ELSE %]
138     <a href="parcels.pl?booksellerid=[% 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>
139     [% END %]
140 [% END %]
141 [% IF ( displaynext ) %]
142     <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>
143 [% END %]
144 </div>
145 </div>
146 [% END %]
147
148     <div id="parcels_new_parcel">
149         <form method="get" action="parcels.pl" class="validated">
150     <fieldset class="rows">
151     <legend>Receive a new shipment</legend>
152        <ol> <li>
153             <label for="invoice" class="required">Vendor invoice:</label>
154             <input type="hidden" name="booksellerid" value="[% booksellerid %]" />
155             <input type="hidden" name="op" value="new" />
156             <input type="text" size="20" id="invoice" name="invoice" class="focus required" required="required" />
157         </li>
158                 [% IF ( gst ) %]
159         <li>
160             <label for="gst">GST:</label>
161             <input type="text" size="20" id="gst" name="gst" />
162         </li>
163                 [% END %]
164       <!--  // Removing freight input until shipping can be proplerly handled .
165           <li>
166             <label for="freight">Shipping:</label>
167             <input type="text" size="20" id="freight" name="freight" />
168         </li> -->
169          <li>
170             <label for="shipmentdate">Shipment date: </label>
171             <input type="text" id="shipmentdate" name="shipmentdate" maxlength="10" size="10" value="[% shipmentdate_today | $KohaDates %]" class="datepicker" />
172             <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
173         </li>
174         <li>
175             <label for="shipmentcost">Shipping cost: </label>
176             <input type="text" id="shipmentcost" name="shipmentcost" size="10" />
177         </li>
178         <li>
179             <label for="shipmentcost_budgetid">Shipping fund: </label>
180             <select id="shipmentcost_budgetid" name="shipmentcost_budgetid">
181                 <option value="">No fund</option>
182                 [% FOREACH budget IN budgets %]
183                     [% IF ( budget.b_active ) %]
184                         <option value="[% budget.b_id %]">[% budget.b_txt %]</option>
185                     [% ELSE %]
186                         <option value="[% budget.b_id %]" class="b_inactive">[% budget.b_txt %] (inactive)</option>
187                     [% END %]
188                 [% END %]
189             </select>
190             <label for="showallfunds" style="float:none;width:auto;">&nbsp;Show inactive:</label>
191             <input type="checkbox" id="showallfunds" />
192
193         </li>
194                 </ol>
195     </fieldset>
196             <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>
197         </form>
198     </div>
199 </div>
200 </div>
201 <div class="yui-b">
202 [% IF ( count ) %]<form method="get" action="parcels.pl">
203     <fieldset class="brief">
204         <h4>Filter</h4>
205         <ol>
206             <li> <input type="hidden" name="booksellerid" value="[% booksellerid %]" /></li>
207             <li><label for="filter">Invoice number:</label><input type="text" size="20" name="filter" value="[% filter %]" id="filter" /></li>
208             <li><label for="datefrom">From:</label><input type="text" size="9" id="datefrom" name="datefrom" value="[% datefrom %]" class="datepicker" /><br />
209                 <label for="dateto">To:</label><input type="text" size="9" id="dateto" name="dateto" value="[% dateto %]" class="datepicker" /></li>
210             <li><label for="orderby">Sort by :</label><select name="orderby" id="orderby">
211                 <option value="invoicenumber">Invoice number</option>
212                 <option value="shipmentdate">Shipment date</option>
213                 <option value="shipmentdate desc">Shipment date reverse</option>
214                 <option value="invoicenumber desc">Invoice number reverse</option>
215                 </select><br />
216                 <label for="resultsperpage">Results per page :</label><select name="resultsperpage" id="resultsperpage">
217                 <option value="20">20</option>
218                 <option value="30">30</option>
219                 <option value="50">50</option>
220                 <option value="100">100</option>
221                 </select></li>
222         </ol>
223         <fieldset class="action"><input type="submit" class="button" value="Filter" /> <a href="/cgi-bin/koha/acqui/parcels.pl?booksellerid=[% booksellerid %]">Clear</a></fieldset>
224         </fieldset>
225 </form>[% END %]
226 </div>
227 </div>
228 [% INCLUDE 'intranet-bottom.inc' %]