I'm working on pulling over all of our order history into Koha, and I have a question about the Spent amount in the acquisitions home page. It's calculating it incorrectly, because in Bookfund.pm the select statement is joining on bookfundid and not the budgetid so it's getting the amount spent in the entire fund and not the specific budget in that fund. Shouldn't the where clause have budgetdate less than or equal to AND startdate less than or equal to, not or? Thanks. Here's the select statement from Bookfund.pm: SELECT quantity,datereceived,freight,unitprice,listprice,ecost, quantityreceived,subscription FROM aqorders LEFT JOIN aqorderbreakdown ON aqorders.ordernumber=aqorderbreakdown.ordernumber LEFT JOIN aqbookfund ON (aqorderbreakdown.bookfundid=aqbookfund.bookfundid and aqorderbreakdown.branchcode=aqbookfund.branchcode) LEFT JOIN aqbudget ON (aqbudget.bookfundid=aqbookfund.bookfundid and aqbudget.branchcode=aqbookfund.branchcode) WHERE aqorderbreakdown.bookfundid=? AND (datecancellationprinted IS NULL OR datecancellationprinted='0000-00-00') AND ((budgetdate >= ? and budgetdate < ?) OR (startdate>=? and enddate<=?)) James Winter Arcadia University <http://www.arcadia.edu/> Systems Manager 215.517.2588 winterj@arcadia.edu <mailto:winterj@arcadia.edu>