2d47b85692
Some vendors ship materials from the same invoice in multiple packages. In those cases, it would be good to notify the librarian when they enter a duplicate invoice number, so that they can continue receiving on the previously-created invoice, rather than creating an invoice with a duplicate number. To test: 1) Apply patch and run database update. 2) Make sure that you have created at least one invoice on acqui/parcels.pl and take note of the invoice number. 3) Try to create an invoice with the same invoice number. 4) Note that without changing your configuration this works exactly the same as before. 5) Turn on the AcqWarnOnDuplicateInvoice system preference. 6) Try to create a new invoice with the same number as the one you noted earlier. 7) Make sure you get a warning about a duplicate invoice. 8) Choose to receive on the existing invoice. 9) Confirm that you are receiving on said existing invoice. 10) Start the receiving process over, and this time choose "Create new invoice anyway." 11) Confirm that you are now receiving on a new invoice. Signed-off-by: Srdjan <srdjan@catalyst.net.nz> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Passes all tests and QA script. I have followed the test plan, but also checked some more things: - Checking the duplicate check works when you have the entered invoice number in your database multiple times already. - Checking that no duplicate message is shown if you enter the invoice number and it's already been used for an invoice from another vendor. Looks all good. I think the only thing we could argue about here is if this could be activated by default for new installations. Signed-off-by: Galen Charlton <gmc@esilibrary.com>
213 lines
9.6 KiB
Text
213 lines
9.6 KiB
Text
[% USE KohaDates %]
|
|
[% INCLUDE 'doc-head-open.inc' %]
|
|
<title>Koha › Acquisitions › Receive shipment from vendor [% name %]</title>
|
|
<link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
|
|
[% INCLUDE 'doc-head-close.inc' %]
|
|
[% INCLUDE 'calendar.inc' %]
|
|
<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.dataTables.min.js"></script>
|
|
[% INCLUDE 'datatables-strings.inc' %]
|
|
<script type="text/javascript" src="[% themelang %]/js/datatables.js"></script>
|
|
<script type="text/javascript">
|
|
//<![CDATA[
|
|
$(document).ready(function() {
|
|
[% IF (dateformat == 'metric') %]
|
|
dt_add_type_uk_date();
|
|
[% END %]
|
|
var parcelst = $("#parcelst").dataTable($.extend(true, {}, dataTablesDefaults, {
|
|
"sPaginationType": "four_button"
|
|
} ) );
|
|
});
|
|
//]]>
|
|
</script>
|
|
</head>
|
|
<body id="acq_parcels" class="acq">
|
|
[% INCLUDE 'header.inc' %]
|
|
[% INCLUDE 'acquisitions-search.inc' %]
|
|
|
|
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a> › <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid %]">[% name %]</a> › Receive shipment from vendor [% name %]</div>
|
|
|
|
[% IF ( count ) %]<div id="doc3" class="yui-t2">[% ELSE %]<div id="doc" class="yui-t7">[% END %]
|
|
|
|
<div id="bd">
|
|
<div id="yui-main">
|
|
<div class="yui-b">
|
|
|
|
[% IF ( error_failed_to_create_invoice ) %]
|
|
<div id="error" class="dialog error">
|
|
<p>An error has occured. Invoice cannot be created.</p>
|
|
</div>
|
|
[% END %]
|
|
<h1>Receive shipment from vendor <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid %]">[% name %]</a></h1>
|
|
|
|
[% IF duplicate_invoices %]
|
|
<div id="parcels_duplicate_invoice" class="dialog alert">
|
|
<p>This invoice number has already been used. Would you like to receive on an existing invoice?</p>
|
|
<table>
|
|
<thead><tr><th>Invoice no.</th><th>Shipment date</th><th></th></tr></thead>
|
|
<tbody>
|
|
[% FOREACH invoice IN duplicate_invoices %]
|
|
<tr>
|
|
<td>[% invoice.invoicenumber %]</td>
|
|
<td>[% invoice.shipmentdate | $KohaDates %]</td>
|
|
<td><a href="/cgi-bin/koha/acqui/parcel.pl?invoiceid=[% invoice.invoiceid %]">Receive</a></td>
|
|
</tr>
|
|
[% END %]
|
|
</tbody>
|
|
</table>
|
|
<form method="get" action="parcels.pl">
|
|
<input type="hidden" name="booksellerid" value="[% booksellerid %]" />
|
|
<input type="hidden" name="op" value="confirm" />
|
|
<input type="hidden" name="invoice" value="[% invoicenumber %]" />
|
|
<input type="hidden" name="shipmentdate" value="[% shipmentdate %]" />
|
|
<input type="hidden" name="shipmentcost" value="[% shipmentcost %]" />
|
|
<input type="hidden" name="shipmentcost_budgetid" value="[% shipmentcost_budgetid %]" />
|
|
<input type="submit" class="button" value="Create new invoice anyway" />
|
|
</form>
|
|
</div>
|
|
[% END %]
|
|
|
|
|
|
[% IF ( count ) %]
|
|
<p> [% count %] shipments</p>
|
|
<div id="resultlist">
|
|
<!-- Search Results Table -->
|
|
|
|
<table class="small" id="parcelst">
|
|
<thead>
|
|
<tr>
|
|
<th>Line</th>
|
|
<th>Date received</th>
|
|
<th>Invoice number</th>
|
|
<th>Item count</th>
|
|
<th>Biblio count</th>
|
|
<th>Items expected</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<!-- Actual Search Results -->
|
|
[% FOREACH searchresult IN searchresults %]
|
|
[% UNLESS ( loop.odd ) %]
|
|
<tr class="highlight">
|
|
[% ELSE %]
|
|
<tr>
|
|
[% END %]
|
|
<td>
|
|
[% searchresult.number %]
|
|
</td>
|
|
<td>
|
|
[% searchresult.datereceived %]
|
|
</td>
|
|
<td>
|
|
[% IF ( searchresult.code ) %]
|
|
<a href="/cgi-bin/koha/acqui/parcel.pl?invoiceid=[% searchresult.invoiceid %]">[% searchresult.code %]</a>
|
|
[% ELSE %]
|
|
<acronym title="not available">n/a</acronym>
|
|
[% END %]
|
|
</td>
|
|
<td>
|
|
[% searchresult.reccount %]
|
|
</td>
|
|
<td>
|
|
[% searchresult.bibcount %]
|
|
</td>
|
|
<td>
|
|
[% searchresult.itemcount %]
|
|
</td>
|
|
</tr>
|
|
[% END %]
|
|
</tbody>
|
|
</table>
|
|
|
|
<div id="resultnumber">
|
|
<!-- Row of numbers corresponding to search result pages -->
|
|
[% IF ( displayprev ) %]
|
|
<a href="parcels.pl?booksellerid=[% booksellerid %]&startfrom=[% prevstartfrom %][% IF ( datefrom ) %]&datefrom=[% datefrom %][% END %][% IF ( dateto ) %]&dateto=[% dateto %][% END %][% IF ( code ) %]&filter=[% code %][% END %][% IF ( orderby ) %]&orderby=[% orderby %][% END %][% IF ( resultsperpage ) %]&resultsperpage=[% resultsperpage %][% END %]&type=intra"><< Previous</a>
|
|
[% END %]
|
|
[% FOREACH number IN numbers %]
|
|
[% IF ( number.highlight ) %]
|
|
<span class="current">[% number.number %]</span>
|
|
[% ELSE %]
|
|
<a href="parcels.pl?booksellerid=[% number.booksellerid %]&startfrom=[% number.startfrom %][% IF ( number.datefrom ) %]&datefrom=[% number.datefrom %][% END %][% IF ( number.dateto ) %]&dateto=[% number.dateto %][% END %][% IF ( number.code ) %]&filter=[% number.code %][% END %][% IF ( number.orderby ) %]&orderby=[% number.orderby %][% END %][% IF ( number.resultsperpage ) %]&resultsperpage=[% number.resultsperpage %][% END %]&type=intra">[% number.number %]</a>
|
|
[% END %]
|
|
[% END %]
|
|
[% IF ( displaynext ) %]
|
|
<a href="parcels.pl?booksellerid=[% booksellerid %]&startfrom=[% nextstartfrom %][% IF ( datefrom ) %]&datefrom=[% datefrom %][% END %][% IF ( dateto ) %]&dateto=[% dateto %][% END %][% IF ( code ) %]&filter=[% code %][% END %][% IF ( orderby ) %]&orderby=[% orderby %][% END %][% IF ( resultsperpage ) %]&resultsperpage=[% resultsperpage %][% END %]&type=intra">Next >></a>
|
|
[% END %]
|
|
</div>
|
|
</div>
|
|
[% END %]
|
|
|
|
<div id="parcels_new_parcel">
|
|
<form method="get" action="parcels.pl">
|
|
<fieldset class="rows">
|
|
<legend>Receive a new shipment</legend>
|
|
<ol> <li>
|
|
<label for="invoice">Vendor invoice </label>
|
|
<input type="hidden" name="booksellerid" value="[% booksellerid %]" />
|
|
<input type="hidden" name="op" value="new" />
|
|
<input type="text" size="20" id="invoice" name="invoice" />
|
|
</li>
|
|
[% IF ( gst ) %]
|
|
<li>
|
|
<label for="gst">GST:</label>
|
|
<input type="text" size="20" id="gst" name="gst" />
|
|
</li>
|
|
[% END %]
|
|
<!-- // Removing freight input until shipping can be proplerly handled .
|
|
<li>
|
|
<label for="freight">Shipping:</label>
|
|
<input type="text" size="20" id="freight" name="freight" />
|
|
</li> -->
|
|
<li>
|
|
<label for="shipmentdate">Shipment date: </label>
|
|
<input type="text" id="shipmentdate" name="shipmentdate" maxlength="10" size="10" value="[% shipmentdate_today %]" class="datepicker" />
|
|
<div class="hint">[% INCLUDE 'date-format.inc' %]</div>
|
|
</li>
|
|
<li>
|
|
<label for="shipmentcost">Shipment cost: </label>
|
|
<input type="text" id="shipmentcost" name="shipmentcost" size="10" />
|
|
</li>
|
|
<li>
|
|
<label for="shipmentcost_budgetid">Fund: </label>
|
|
<select id="shipmentcost_budgetid" name="shipmentcost_budgetid">
|
|
<option value="">No fund</option>
|
|
[% FOREACH budget IN budgets %]
|
|
<option value="[% budget.budget_id %]">[% budget.budget_name %]</option>
|
|
[% END %]
|
|
</select>
|
|
</li>
|
|
</ol>
|
|
</fieldset>
|
|
<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>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="yui-b">
|
|
[% IF ( count ) %]<form method="get" action="parcels.pl">
|
|
<fieldset class="brief">
|
|
<h4>Filter</h4>
|
|
<ol>
|
|
<li> <input type="hidden" name="booksellerid" value="[% booksellerid %]" /></li>
|
|
<li><label for="filter">Invoice number:</label><input type="text" size="20" name="filter" value="[% filter %]" id="filter" /></li>
|
|
<li><label for="datefrom">From:</label><input type="text" size="9" id="datefrom" name="datefrom" value="[% datefrom %]" /><br />
|
|
<label for="dateto">To:</label><input type="text" size="9" id="dateto" name="dateto" value="[% dateto %]" /></li>
|
|
<li><label for="orderby">Sort by :</label><select name="orderby" id="orderby">
|
|
<option value="invoicenumber">Invoice number</option>
|
|
<option value="shipmentdate">Shipment date</option>
|
|
<option value="shipmentdate desc">Shipment date reverse</option>
|
|
<option value="invoicenumber desc">Invoice number reverse</option>
|
|
</select><br />
|
|
<label for="resultsperpage">Results per page :</label><select name="resultsperpage" id="resultsperpage">
|
|
<option value="20">20</option>
|
|
<option value="30">30</option>
|
|
<option value="50">50</option>
|
|
<option value="100">100</option>
|
|
</select></li>
|
|
</ol>
|
|
<fieldset class="action"><input type="submit" class="button" value="Filter" /> <a href="/cgi-bin/koha/acqui/parcels.pl?booksellerid=[% booksellerid %]">Clear</a></fieldset>
|
|
</fieldset>
|
|
</form>[% END %]
|
|
</div>
|
|
</div>
|
|
[% INCLUDE 'intranet-bottom.inc' %]
|