[Koha-patches] [PATCH] [followup](bug #3080) refix the sql request

Nahuel ANGELINETTI nahuel.angelinetti at biblibre.com
Thu Jul 2 12:31:03 CEST 2009


This fix the sql request that have some problems of synthax and a table repeated in "FROM".
---
 acqui/spent.pl |   10 ++++------
 1 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/acqui/spent.pl b/acqui/spent.pl
index 578ed9b..6271b05 100755
--- a/acqui/spent.pl
+++ b/acqui/spent.pl
@@ -33,14 +33,12 @@ my $query =
     quantity-quantityreceived as tleft,
     aqorders.ordernumber
     as ordnum,entrydate,budgetdate,booksellerid,aqbasket.basketno
-    from aqorderbreakdown,aqbasket,aqorders
+    from aqorderbreakdown,aqorders
     left join biblioitems on  biblioitems.biblioitemnumber=aqorders.biblioitemnumber 
-    LEFT JOINaqbasket USING (basketno)
+    LEFT JOIN aqbasket USING (basketno)
     where bookfundid=? and
-    aqorders.ordernumber=aqorderbreakdown.ordernumber and
-    aqorders.basketno=aqbasket.basketno
-   and (
-	(datereceived >= ? and datereceived < ?))
+    aqorders.ordernumber=aqorderbreakdown.ordernumber
+   and (datereceived >= ? and datereceived < ?)
     and (datecancellationprinted is NULL or
 	   datecancellationprinted='0000-00-00')
 	and (closedate >= ? and closedate < ?)
-- 
1.6.0.4




More information about the Koha-patches mailing list