Lines 100-106
sub GetSuppliersWithLateIssues {
Link Here
|
100 |
WHERE id > 0 |
100 |
WHERE id > 0 |
101 |
AND ( |
101 |
AND ( |
102 |
(planneddate < now() AND serial.status=1) |
102 |
(planneddate < now() AND serial.status=1) |
103 |
OR serial.STATUS = 3 OR serial.STATUS = 4 |
103 |
OR serial.STATUS IN (3, 4, 41, 42, 43, 44) |
104 |
) |
104 |
) |
105 |
AND subscription.closed = 0 |
105 |
AND subscription.closed = 0 |
106 |
ORDER BY name|; |
106 |
ORDER BY name|; |
Lines 446-452
sub PrepareSerialsData {
Link Here
|
446 |
} |
446 |
} |
447 |
} |
447 |
} |
448 |
$subs->{ "status" . $subs->{'status'} } = 1; |
448 |
$subs->{ "status" . $subs->{'status'} } = 1; |
449 |
$subs->{"checked"} = $subs->{'status'} =~ /1|3|4|7/; |
449 |
if ( grep { $_ == $subs->{status} } ( 1, 3, 4, 41, 42, 43, 44, 7 ) ) { |
|
|
450 |
$subs->{"checked"} = 1; |
451 |
} |
450 |
|
452 |
|
451 |
if ( $subs->{'year'} && $subs->{'year'} ne "" ) { |
453 |
if ( $subs->{'year'} && $subs->{'year'} ne "" ) { |
452 |
$year = $subs->{'year'}; |
454 |
$year = $subs->{'year'}; |
Lines 885-891
sub GetLatestSerials {
Link Here
|
885 |
my $strsth = "SELECT serialid,serialseq, status, planneddate, publisheddate, notes |
887 |
my $strsth = "SELECT serialid,serialseq, status, planneddate, publisheddate, notes |
886 |
FROM serial |
888 |
FROM serial |
887 |
WHERE subscriptionid = ? |
889 |
WHERE subscriptionid = ? |
888 |
AND (status =2 or status=4) |
890 |
AND status IN (2, 4, 41, 42, 43, 44) |
889 |
ORDER BY publisheddate DESC LIMIT 0,$limit |
891 |
ORDER BY publisheddate DESC LIMIT 0,$limit |
890 |
"; |
892 |
"; |
891 |
my $sth = $dbh->prepare($strsth); |
893 |
my $sth = $dbh->prepare($strsth); |
Lines 1254-1261
sub ModSerialStatus {
Link Here
|
1254 |
if ( $status == 2 || ($oldstatus == 2 && $status != 2) ) { |
1256 |
if ( $status == 2 || ($oldstatus == 2 && $status != 2) ) { |
1255 |
_update_receivedlist($subscriptionid); |
1257 |
_update_receivedlist($subscriptionid); |
1256 |
} |
1258 |
} |
1257 |
if($status == 4 || $status == 5 |
1259 |
if( grep { $_ == $status } ( 4, 41, 42, 43, 44, 5 ) |
1258 |
|| ($oldstatus == 4 && $status != 4) |
1260 |
|| ( |
|
|
1261 |
grep { $_ == $oldstatus } ( 4, 41, 42, 43, 44 ) |
1262 |
&& ! grep { $_ == $status } ( 4, 41, 42, 43, 44 ) ) |
1259 |
|| ($oldstatus == 5 && $status != 5)) { |
1263 |
|| ($oldstatus == 5 && $status != 5)) { |
1260 |
_update_missinglist($subscriptionid); |
1264 |
_update_missinglist($subscriptionid); |
1261 |
} |
1265 |
} |
Lines 2036-2042
sub GetLateOrMissingIssues {
Link Here
|
2036 |
LEFT JOIN biblio ON subscription.biblionumber=biblio.biblionumber |
2040 |
LEFT JOIN biblio ON subscription.biblionumber=biblio.biblionumber |
2037 |
LEFT JOIN aqbooksellers ON subscription.aqbooksellerid = aqbooksellers.id |
2041 |
LEFT JOIN aqbooksellers ON subscription.aqbooksellerid = aqbooksellers.id |
2038 |
WHERE subscription.subscriptionid = serial.subscriptionid |
2042 |
WHERE subscription.subscriptionid = serial.subscriptionid |
2039 |
AND (serial.STATUS = 4 OR ((planneddate < now() AND serial.STATUS =1) OR serial.STATUS = 3 OR serial.STATUS = 7)) |
2043 |
AND (serial.STATUS IN (4, 41, 42, 43, 44) OR ((planneddate < now() AND serial.STATUS =1) OR serial.STATUS = 3 OR serial.STATUS = 7)) |
2040 |
AND subscription.aqbooksellerid=$supplierid |
2044 |
AND subscription.aqbooksellerid=$supplierid |
2041 |
$byserial |
2045 |
$byserial |
2042 |
ORDER BY $order" |
2046 |
ORDER BY $order" |
Lines 2053-2059
sub GetLateOrMissingIssues {
Link Here
|
2053 |
LEFT JOIN biblio ON subscription.biblionumber=biblio.biblionumber |
2057 |
LEFT JOIN biblio ON subscription.biblionumber=biblio.biblionumber |
2054 |
LEFT JOIN aqbooksellers ON subscription.aqbooksellerid = aqbooksellers.id |
2058 |
LEFT JOIN aqbooksellers ON subscription.aqbooksellerid = aqbooksellers.id |
2055 |
WHERE subscription.subscriptionid = serial.subscriptionid |
2059 |
WHERE subscription.subscriptionid = serial.subscriptionid |
2056 |
AND (serial.STATUS = 4 OR ((planneddate < now() AND serial.STATUS =1) OR serial.STATUS = 3 OR serial.STATUS = 7)) |
2060 |
AND (serial.STATUS IN (4, 41, 42, 43, 44) OR ((planneddate < now() AND serial.STATUS =1) OR serial.STATUS = 3 OR serial.STATUS = 7)) |
2057 |
$byserial |
2061 |
$byserial |
2058 |
ORDER BY $order" |
2062 |
ORDER BY $order" |
2059 |
); |
2063 |
); |