Lines 2027-2038
sub GetLateOrMissingIssues {
Link Here
|
2027 |
$sth = $dbh->prepare( |
2027 |
$sth = $dbh->prepare( |
2028 |
"SELECT |
2028 |
"SELECT |
2029 |
serialid, aqbooksellerid, name, |
2029 |
serialid, aqbooksellerid, name, |
2030 |
biblio.title, planneddate, serialseq, |
2030 |
biblio.title, biblioitems.issn, planneddate, serialseq, |
2031 |
serial.status, serial.subscriptionid, claimdate, |
2031 |
serial.status, serial.subscriptionid, claimdate, |
2032 |
subscription.branchcode |
2032 |
subscription.branchcode |
2033 |
FROM serial |
2033 |
FROM serial |
2034 |
LEFT JOIN subscription ON serial.subscriptionid=subscription.subscriptionid |
2034 |
LEFT JOIN subscription ON serial.subscriptionid=subscription.subscriptionid |
2035 |
LEFT JOIN biblio ON subscription.biblionumber=biblio.biblionumber |
2035 |
LEFT JOIN biblio ON subscription.biblionumber=biblio.biblionumber |
|
|
2036 |
LEFT JOIN biblioitems ON subscription.biblionumber=biblioitems.biblionumber |
2036 |
LEFT JOIN aqbooksellers ON subscription.aqbooksellerid = aqbooksellers.id |
2037 |
LEFT JOIN aqbooksellers ON subscription.aqbooksellerid = aqbooksellers.id |
2037 |
WHERE subscription.subscriptionid = serial.subscriptionid |
2038 |
WHERE subscription.subscriptionid = serial.subscriptionid |
2038 |
AND (serial.STATUS IN (4, 41, 42, 43, 44) OR ((planneddate < now() AND serial.STATUS =1) OR serial.STATUS = 3 OR serial.STATUS = 7)) |
2039 |
AND (serial.STATUS IN (4, 41, 42, 43, 44) OR ((planneddate < now() AND serial.STATUS =1) OR serial.STATUS = 3 OR serial.STATUS = 7)) |