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