diff --git a/acqui/ordered.pl b/acqui/ordered.pl index 75291d9f5c..7366cca04d 100755 --- a/acqui/ordered.pl +++ b/acqui/ordered.pl @@ -74,7 +74,13 @@ WHERE (datecancellationprinted IS NULL OR datecancellationprinted='0000-00-00') AND (quantity > quantityreceived OR quantityreceived IS NULL) - GROUP BY aqorders.ordernumber + GROUP BY aqorders.biblionumber, aqorders.basketno, aqorders.ordernumber, + tleft, + ecost, budgetdate, entrydate, + aqbasket.booksellerid, + aqbooksellers.name, + itype, + title EOQ my $sth = $dbh->prepare($query); diff --git a/acqui/spent.pl b/acqui/spent.pl index 69a25379f9..6a47161a90 100755 --- a/acqui/spent.pl +++ b/acqui/spent.pl @@ -83,7 +83,19 @@ WHERE (datecancellationprinted IS NULL OR datecancellationprinted='0000-00-00') AND datereceived IS NOT NULL - GROUP BY aqorders.ordernumber + GROUP BY aqorders.biblionumber, aqorders.basketno, aqorders.ordernumber, + tleft, + ecost, budgetdate, entrydate, + aqbasket.booksellerid, + itype, + title, + aqorders.invoiceid, + aqinvoices.invoicenumber, + quantityreceived, + unitprice, + datereceived, + aqbooksellers.name + EOQ my $sth = $dbh->prepare($query); $sth->execute($bookfund);