http://bugs.koha.org/cgi-bin/bugzilla/show_bug.cgi?id=2703 ------- Comment #4 from winterj@arcadia.edu 2009-01-27 05:58 ------- The initial query in spent.pl: Select quantity,datereceived,freight,unitprice,listprice,ecost,quantityreceived # as qrev,subscription,title,itemtype,aqorders.biblionumber,aqorders.booksellerinvoicenumber, # quantity-quantityreceived as tleft, # aqorders.ordernumber # as ordnum,entrydate,budgetdate,booksellerid,aqbasket.basketno # from aqorders,aqorderbreakdown,aqbasket # left join biblioitems on biblioitems.biblioitemnumber=aqorders.biblioitemnumber # where bookfundid=? and # aqorders.ordernumber=aqorderbreakdown.ordernumber and # aqorders.basketno=aqbasket.basketno # and ( # (datereceived >= ? and datereceived < ?)) # and (datecancellationprinted is NULL or # datecancellationprinted='0000-00-00') and what it should be: Select distinct quantity,datereceived,freight,unitprice,listprice,ecost,quantityreceived as qrev,subscription,title,itype as itemtype,aqorders.biblionumber,aqorders.booksellerinvoicenumber, quantity-quantityreceived as tleft, aqorders.ordernumber as ordnum,entrydate,budgetdate,aqbasket.booksellerid,aqbasket.basketno from aqorders inner join aqorderbreakdown on aqorderbreakdown.ordernumber = aqorders.ordernumber inner join aqbasket on aqbasket.basketno = aqorders.basketno left join items on items.biblionumber=aqorders.biblionumber where bookfundid=? and aqorders.ordernumber=aqorderbreakdown.ordernumber and aqorders.basketno=aqbasket.basketno and ( (datereceived >= ? and datereceived < ?)) and (datecancellationprinted is NULL or datecancellationprinted='0000-00-00') ------- You are receiving this mail because: ------- You are the QA contact for the bug, or are watching the QA contact.