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