[Koha-bugs] [Bug 2703] Clicking Spent on Budget Shows Nothing

bugzilla-daemon at pippin.metavore.com bugzilla-daemon at pippin.metavore.com
Tue Jan 27 14:58:30 CET 2009


http://bugs.koha.org/cgi-bin/bugzilla/show_bug.cgi?id=2703





------- Comment #4 from winterj at 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.



More information about the Koha-bugs mailing list