Bug 2703 - Clicking Spent on Budget Shows Nothing
Summary: Clicking Spent on Budget Shows Nothing
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Acquisitions (show other bugs)
Version: Main
Hardware: PC All
: PATCH-Sent (DO NOT USE) major
Assignee: Chris Cormack
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-10-21 07:23 UTC by Nicole C. Engard
Modified: 2012-10-25 22:37 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Cormack 2010-05-21 00:54:53 UTC


---- Reported by nengard@gmail.com 2008-10-21 07:23:34 ----

When you click on the link of the amount spent on the main Acq page it opens an empty table.  If you click the other links (comtd and total) they open their right windows.

Here's a sample link for 'spent' : cgi-bin/koha/acqui/spent.pl?bookfund=CHILD&start=2008-01-01&end=2008-12-31 

and one for 'comtd':  cgi-bin/koha/acqui/bookfund.pl?bookfund=CHILD&start=2008-01-01&end=2008-12-31



---- Additional Comments From oleonard@myacpl.org 2008-10-27 07:24:18 ----

I see this error for spent.pl in the log:

spent.pl: DBD::mysql::st execute failed: Unknown column 'aqorders.biblioitemnumber' in 'on clause'



---- Additional Comments From cookie.wolfrom@liblime.com 2008-12-17 09:31:01 ----

Library still waiting to have this fixed  



---- Additional Comments From jransom@library.org.nz 2009-01-26 16:56:25 ----

We are dead keen to get this fixed too please; can't go live without it.



---- Additional Comments From winterj@arcadia.edu 2009-01-27 05:58:30 ----

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')



---- Additional Comments From gmcharlt@gmail.com 2009-03-06 08:37:09 ----

Patch that James submitted for this bug has been pushed to HEAD.  Please test and close.



--- Bug imported by chris@bigballofwax.co.nz 2010-05-21 00:54 UTC  ---

This bug was previously known as _bug_ 2703 at http://bugs.koha.org/cgi-bin/bugzilla3/show_bug.cgi?id=2703

Actual time not defined. Setting to 0.0
The original assignee of this bug does not have
   an account here. Reassigning to the default assignee
   for the component, chris@bigballofwax.co.nz.
   Previous assignee was rch@liblime.com.
CC member joe.atzberger@liblime.com does not have an account here