Bug 22219: Remove duplicated items in inventory (when skipping waiting holds)

Test plan:
0/ Do not apply this patch
1/ Place several holds on a given item
2/ Use the inventory with the "skip waiting holds" option to list this item.
It will be displayed several times
3/ Apply this patch and confirm that the item is now only displayed once

Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This commit is contained in:
Jonathan Druart 2019-03-04 16:57:26 -03:00 committed by Nick Clemens
parent 2be9fd23d2
commit 08ea70c109
1 changed files with 2 additions and 2 deletions

View File

@ -777,9 +777,9 @@ sub GetItemsForInventory {
my $max_cnsort = GetClassSort($class_source,undef,$maxlocation);
my $select_columns = q{
SELECT items.itemnumber, barcode, itemcallnumber, title, author, biblio.biblionumber, biblio.frameworkcode, datelastseen, homebranch, location, notforloan, damaged, itemlost, withdrawn, stocknumber
SELECT DISTINCT(items.itemnumber), barcode, itemcallnumber, title, author, biblio.biblionumber, biblio.frameworkcode, datelastseen, homebranch, location, notforloan, damaged, itemlost, withdrawn, stocknumber
};
my $select_count = q{SELECT COUNT(*)};
my $select_count = q{SELECT COUNT(DISTINCT(items.itemnumber))};
my $query = q{
FROM items
LEFT JOIN biblio ON items.biblionumber = biblio.biblionumber