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

(-)a/C4/Acquisition.pm (-2 / +6 lines)
Lines 565-571 sub GetBasketsInfosByBookseller { Link Here
565
        SELECT aqbasket.*,
565
        SELECT aqbasket.*,
566
          SUM(aqorders.quantity) AS total_items,
566
          SUM(aqorders.quantity) AS total_items,
567
          COUNT(DISTINCT aqorders.biblionumber) AS total_biblios,
567
          COUNT(DISTINCT aqorders.biblionumber) AS total_biblios,
568
          SUM(IF(aqorders.datereceived IS NULL, aqorders.quantity, 0)) AS expected_items
568
          SUM(
569
            IF(aqorders.datereceived IS NULL
570
              AND aqorders.datecancellationprinted IS NULL
571
            , aqorders.quantity
572
            , 0)
573
          ) AS expected_items
569
        FROM aqbasket
574
        FROM aqbasket
570
          LEFT JOIN aqorders ON aqorders.basketno = aqbasket.basketno
575
          LEFT JOIN aqorders ON aqorders.basketno = aqbasket.basketno
571
        WHERE booksellerid = ?
576
        WHERE booksellerid = ?
572
- 

Return to bug 8575