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