View | Details | Raw Unified | Return to bug 14172
Collapse All | Expand All

(-)a/acqui/spent.pl (-6 / +5 lines)
Lines 69-86 SELECT Link Here
69
FROM (aqorders, aqbasket)
69
FROM (aqorders, aqbasket)
70
LEFT JOIN biblio ON
70
LEFT JOIN biblio ON
71
    biblio.biblionumber=aqorders.biblionumber
71
    biblio.biblionumber=aqorders.biblionumber
72
LEFT JOIN items ON
73
    biblio.biblionumber = items.biblionumber
74
LEFT JOIN aqorders_items ON
72
LEFT JOIN aqorders_items ON
75
     items.itemnumber = aqorders_items.itemnumber
73
    aqorders.ordernumber = aqorders_items.ordernumber
74
LEFT JOIN items ON
75
    aqorders_items.itemnumber = items.itemnumber
76
LEFT JOIN aqinvoices ON
76
LEFT JOIN aqinvoices ON
77
    aqorders.invoiceid = aqinvoices.invoiceid
77
    aqorders.invoiceid = aqinvoices.invoiceid
78
WHERE
78
WHERE
79
    aqorders.ordernumber=aqorders_items.ordernumber AND
80
    aqorders.basketno=aqbasket.basketno AND
79
    aqorders.basketno=aqbasket.basketno AND
81
    budget_id=? AND
80
    budget_id=? AND
82
    (datecancellationprinted IS NULL OR
81
    (datecancellationprinted IS NULL OR
83
        datecancellationprinted='0000-00-00')
82
        datecancellationprinted='0000-00-00') AND
83
    datereceived IS NOT NULL
84
    GROUP BY aqorders.ordernumber
84
    GROUP BY aqorders.ordernumber
85
EOQ
85
EOQ
86
my $sth = $dbh->prepare($query);
86
my $sth = $dbh->prepare($query);
87
- 

Return to bug 14172