4 [% PROCESS 'i18n.inc' %]
6 [% PROCESS 'i18n.inc' %]
7 [% INCLUDE 'doc-head-open.inc' %]
8 <title>[% FILTER collapse %]
9 [% tx("Receive shipment from vendor {vendor}", { vendor = name }) | html %] ›
10 [% t("Acquisitions") | html %] ›
11 [% t("Koha") | html %]
13 [% INCLUDE 'doc-head-close.inc' %]
16 <body id="acq_parcels" class="acq">
17 [% WRAPPER 'header.inc' %]
18 [% INCLUDE 'acquisitions-search.inc' %]
21 [% WRAPPER 'sub-header.inc' %]
22 [% WRAPPER breadcrumbs %]
23 [% WRAPPER breadcrumb_item %]
24 <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a>
26 [% WRAPPER breadcrumb_item %]
27 <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid | uri %]">[% name | html %]</a>
29 [% WRAPPER breadcrumb_item bc_active= 1 %]
30 <span>Receive shipment from vendor [% name | html %]</span>
32 [% END #/ WRAPPER breadcrumbs %]
33 [% END #/ WRAPPER sub-header.inc %]
35 <div class="main container-fluid">
38 <div class="col-sm-10 col-sm-push-2">
40 <div class="col-md-10 col-md-offset-1 col-lg-8 col-lg-offset-2">
43 <h1>Receive shipment from vendor <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid | uri %]">[% name | html %]</a></h1>
45 [% IF ( error_failed_to_create_invoice ) %]
46 <div id="error" class="dialog alert">
47 <p>An error has occurred. Invoice cannot be created.</p>
51 [% IF duplicate_invoices %]
52 <div id="parcels_duplicate_invoice" class="dialog alert">
53 <p>This invoice number has already been used. Would you like to receive on an existing invoice?</p>
55 <thead><tr><th>Invoice number</th><th>Shipment date</th><th></th></tr></thead>
57 [% FOREACH invoice IN duplicate_invoices %]
59 <td>[% invoice.invoicenumber | html %]</td>
60 <td>[% invoice.shipmentdate | $KohaDates %]</td>
61 <td><a href="/cgi-bin/koha/acqui/parcel.pl?invoiceid=[% invoice.invoiceid | uri %]">Receive</a></td>
66 <form method="get" action="parcels.pl">
67 <input type="hidden" name="booksellerid" value="[% booksellerid | html %]" />
68 <input type="hidden" name="op" value="confirm" />
69 <input type="hidden" name="invoice" value="[% invoicenumber | html %]" />
70 <input type="hidden" name="shipmentdate" value="[% shipmentdate | $KohaDates dateformat => 'iso' %]" />
71 <input type="hidden" name="shipmentcost" value="[% shipmentcost | html %]" />
72 <input type="hidden" name="shipmentcost_budgetid" value="[% shipmentcost_budgetid | html %]" />
73 <input type="submit" class="btn btn-primary" value="Create new invoice anyway" />
80 <p> [% count | html %] shipments</p>
81 <div id="resultlist" class="page-section">
82 <!-- Search Results Table -->
84 <table class="small" id="parcelst">
88 <th>Date received</th>
89 <th>Invoice number</th>
91 <th>[% tp("Bibliographic record", "Record count") | html %]</th>
92 <th>Items expected</th>
96 <!-- Actual Search Results -->
97 [% FOREACH searchresult IN searchresults %]
100 [% searchresult.number | html %]
102 <td data-order="[% searchresult.datereceived | html %]">
103 [% searchresult.datereceived | $KohaDates %]
106 [% IF ( searchresult.code ) %]
107 <a href="/cgi-bin/koha/acqui/parcel.pl?invoiceid=[% searchresult.invoiceid | uri %]">[% searchresult.code | html %]</a>
109 <abbr title="not available">n/a</abbr>
113 [% searchresult.reccount | html %]
116 [% searchresult.bibcount | html %]
119 [% searchresult.itemcount | html %]
126 <div id="resultnumber">
127 <!-- Row of numbers corresponding to search result pages -->
128 [% IF ( displayprev ) %]
129 <a href="parcels.pl?booksellerid=[% booksellerid | uri %]&startfrom=[% prevstartfrom | uri %][% IF ( datefrom ) %]&datefrom=[% datefrom | uri %][% END %][% IF ( dateto ) %]&dateto=[% dateto | uri %][% END %][% IF ( code ) %]&filter=[% code | uri %][% END %][% IF ( orderby ) %]&orderby=[% orderby | uri %][% END %][% IF ( resultsperpage ) %]&resultsperpage=[% resultsperpage | uri %][% END %]&type=intra"><< Previous</a>
131 [% FOREACH number IN numbers %]
132 [% IF ( number.highlight ) %]
133 <span class="current">[% number.number | html %]</span>
135 <a href="parcels.pl?booksellerid=[% booksellerid | uri %]&startfrom=[% number.startfrom | uri %][% IF ( number.datefrom ) %]&datefrom=[% number.datefrom | uri %][% END %][% IF ( number.dateto ) %]&dateto=[% number.dateto | uri %][% END %][% IF ( number.code ) %]&filter=[% number.code | uri %][% END %][% IF ( number.orderby ) %]&orderby=[% number.orderby | uri %][% END %][% IF ( number.resultsperpage ) %]&resultsperpage=[% number.resultsperpage | uri %][% END %]&type=intra">[% number.number | html %]</a>
138 [% IF ( displaynext ) %]
139 <a href="parcels.pl?booksellerid=[% booksellerid | uri %]&startfrom=[% nextstartfrom | uri %][% IF ( datefrom ) %]&datefrom=[% datefrom | uri %][% END %][% IF ( dateto ) %]&dateto=[% dateto | uri %][% END %][% IF ( code ) %]&filter=[% code | uri %][% END %][% IF ( orderby ) %]&orderby=[% orderby | uri %][% END %][% IF ( resultsperpage ) %]&resultsperpage=[% resultsperpage | uri %][% END %]&type=intra">Next >></a>
145 <div id="parcels_new_parcel">
146 <form method="get" action="parcels.pl" class="validated">
147 <fieldset class="rows">
148 <legend>Receive a new shipment</legend>
150 <label for="invoice" class="required">Vendor invoice:</label>
151 <input type="hidden" name="booksellerid" value="[% booksellerid | html %]" />
152 <input type="hidden" name="op" value="new" />
153 <input type="text" size="20" id="invoice" name="invoice" class="focus required" required="required" />
157 <label for="gst">GST:</label>
158 <input type="text" size="20" id="gst" name="gst" />
161 <!-- // Removing freight input until shipping can be proplerly handled .
163 <label for="freight">Shipping:</label>
164 <input type="text" size="20" id="freight" name="freight" />
167 <label for="shipmentdate">Shipment date: </label>
168 <input type="text" id="shipmentdate" name="shipmentdate" maxlength="10" size="10" value="[% shipmentdate_today | html %]" class="flatpickr" />
169 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
172 <label for="shipmentcost">Shipping cost: </label>
173 <input class="decimal" type="text" id="shipmentcost" name="shipmentcost" size="10" />
176 <label for="shipmentcost_budgetid">Shipping fund: </label>
177 <select id="shipmentcost_budgetid" name="shipmentcost_budgetid">
178 <option value="">No fund</option>
179 [% FOREACH budget IN budgets %]
180 [% IF ( budget.b_active ) %]
181 <option value="[% budget.b_id | html %]">[% budget.b_txt | html %]</option>
183 <option value="[% budget.b_id | html %]" class="b_inactive">[% budget.b_txt | html %] (inactive)</option>
187 <label for="showallfunds" style="float:none;width:auto;"> Show inactive:</label>
188 <input type="checkbox" id="showallfunds" />
193 [% IF available_additional_fields %]
194 [% INCLUDE 'additional-fields-entry.inc' available=available_additional_fields values=additional_field_values %]
196 <fieldset class="action"><input type="submit" class="btn btn-default" value="Next" /> <a class="cancel" href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid | html %]">Cancel</a></fieldset>
200 </div> <!-- /.col-sm-10.col-sm-push-2 -->
203 <div class="col-sm-2 col-sm-pull-10">
205 <form method="get" action="parcels.pl">
206 <fieldset class="brief">
209 <li> <input type="hidden" name="booksellerid" value="[% booksellerid | html %]" /></li>
210 <li><label for="filter">Invoice number:</label><input type="text" size="20" name="filter" value="[% filter | html %]" id="filter" /></li>
212 <label for="datefrom">From:</label>
213 <input type="text" size="9" id="datefrom" name="datefrom" value="[% datefrom | html %]" class="flatpickr" />
214 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
217 <label for="dateto">To:</label>
218 <input type="text" size="9" id="dateto" name="dateto" value="[% dateto | html %]" class="flatpickr" />
219 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
221 <li><label for="orderby">Sort by :</label><select name="orderby" id="orderby">
222 <option value="invoicenumber">Invoice number</option>
223 <option value="shipmentdate">Shipment date</option>
224 <option value="shipmentdate desc">Shipment date reverse</option>
225 <option value="invoicenumber desc">Invoice number reverse</option>
227 <label for="resultsperpage">Results per page :</label><select name="resultsperpage" id="resultsperpage">
228 <option value="20">20</option>
229 <option value="30">30</option>
230 <option value="50">50</option>
231 <option value="100">100</option>
234 <fieldset class="action"><input type="submit" class="btn btn-default" value="Filter" /> <a href="/cgi-bin/koha/acqui/parcels.pl?booksellerid=[% booksellerid | uri %]">Clear</a></fieldset>
238 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
240 </div> <!-- /.row -->
242 [% MACRO jsinclude BLOCK %]
243 [% Asset.js("js/acquisitions-menu.js") | $raw %]
244 [% INCLUDE 'calendar.inc' %]
245 [% INCLUDE 'datatables.inc' %]
247 $(document).ready(function() {
248 var parcelst = $("#parcelst").dataTable($.extend(true, {}, dataTablesDefaults, {
252 //keep a copy of all budgets before removing the inactives
253 var budgetId = $("#shipmentcost_budgetid");
254 var disabledBudgetsCopy = budgetId.html();
255 $('.b_inactive').remove();
257 $('#showallfunds').click(function() {
258 if ($(this).is(":checked")) {
259 budgetId.html(disabledBudgetsCopy); //Puts back all the funds
262 $('.b_inactive').remove();
269 [% INCLUDE 'intranet-bottom.inc' %]