|
Lines 102-108
sub GetSuppliersWithLateIssues {
Link Here
|
| 102 |
WHERE id > 0 |
102 |
WHERE id > 0 |
| 103 |
AND ( |
103 |
AND ( |
| 104 |
(planneddate < now() AND serial.status=1) |
104 |
(planneddate < now() AND serial.status=1) |
| 105 |
OR serial.STATUS = 3 OR serial.STATUS = 4 |
105 |
OR serial.STATUS IN (3, 4, 41, 42, 43, 44) |
| 106 |
) |
106 |
) |
| 107 |
AND subscription.closed = 0 |
107 |
AND subscription.closed = 0 |
| 108 |
ORDER BY name|; |
108 |
ORDER BY name|; |
|
Lines 425-431
sub PrepareSerialsData {
Link Here
|
| 425 |
} |
425 |
} |
| 426 |
} |
426 |
} |
| 427 |
$subs->{ "status" . $subs->{'status'} } = 1; |
427 |
$subs->{ "status" . $subs->{'status'} } = 1; |
| 428 |
$subs->{"checked"} = $subs->{'status'} =~ /1|3|4|7/; |
428 |
if ( grep { $_ == $subs->{status} } ( 1, 3, 4, 41, 42, 43, 44, 7 ) ) { |
|
|
429 |
$subs->{"checked"} = 1; |
| 430 |
} |
| 429 |
|
431 |
|
| 430 |
if ( $subs->{'year'} && $subs->{'year'} ne "" ) { |
432 |
if ( $subs->{'year'} && $subs->{'year'} ne "" ) { |
| 431 |
$year = $subs->{'year'}; |
433 |
$year = $subs->{'year'}; |
|
Lines 879-885
sub GetLatestSerials {
Link Here
|
| 879 |
my $strsth = "SELECT serialid,serialseq, status, planneddate, publisheddate, notes |
881 |
my $strsth = "SELECT serialid,serialseq, status, planneddate, publisheddate, notes |
| 880 |
FROM serial |
882 |
FROM serial |
| 881 |
WHERE subscriptionid = ? |
883 |
WHERE subscriptionid = ? |
| 882 |
AND (status =2 or status=4) |
884 |
AND status IN (2, 4, 41, 42, 43, 44) |
| 883 |
ORDER BY publisheddate DESC LIMIT 0,$limit |
885 |
ORDER BY publisheddate DESC LIMIT 0,$limit |
| 884 |
"; |
886 |
"; |
| 885 |
my $sth = $dbh->prepare($strsth); |
887 |
my $sth = $dbh->prepare($strsth); |
|
Lines 1248-1255
sub ModSerialStatus {
Link Here
|
| 1248 |
if ( $status == 2 || ($oldstatus == 2 && $status != 2) ) { |
1250 |
if ( $status == 2 || ($oldstatus == 2 && $status != 2) ) { |
| 1249 |
_update_receivedlist($subscriptionid); |
1251 |
_update_receivedlist($subscriptionid); |
| 1250 |
} |
1252 |
} |
| 1251 |
if($status == 4 || $status == 5 |
1253 |
if( grep { $_ == $status } ( 4, 41, 42, 43, 44, 5 ) |
| 1252 |
|| ($oldstatus == 4 && $status != 4) |
1254 |
|| ( |
|
|
1255 |
grep { $_ == $oldstatus } ( 4, 41, 42, 43, 44 ) |
| 1256 |
&& ! grep { $_ == $status } ( 4, 41, 42, 43, 44 ) ) |
| 1253 |
|| ($oldstatus == 5 && $status != 5)) { |
1257 |
|| ($oldstatus == 5 && $status != 5)) { |
| 1254 |
_update_missinglist($subscriptionid); |
1258 |
_update_missinglist($subscriptionid); |
| 1255 |
} |
1259 |
} |
|
Lines 2030-2036
sub GetLateOrMissingIssues {
Link Here
|
| 2030 |
LEFT JOIN biblio ON subscription.biblionumber=biblio.biblionumber |
2034 |
LEFT JOIN biblio ON subscription.biblionumber=biblio.biblionumber |
| 2031 |
LEFT JOIN aqbooksellers ON subscription.aqbooksellerid = aqbooksellers.id |
2035 |
LEFT JOIN aqbooksellers ON subscription.aqbooksellerid = aqbooksellers.id |
| 2032 |
WHERE subscription.subscriptionid = serial.subscriptionid |
2036 |
WHERE subscription.subscriptionid = serial.subscriptionid |
| 2033 |
AND (serial.STATUS = 4 OR ((planneddate < now() AND serial.STATUS =1) OR serial.STATUS = 3 OR serial.STATUS = 7)) |
2037 |
AND (serial.STATUS IN (4, 41, 42, 43, 44) OR ((planneddate < now() AND serial.STATUS =1) OR serial.STATUS = 3 OR serial.STATUS = 7)) |
| 2034 |
AND subscription.aqbooksellerid=$supplierid |
2038 |
AND subscription.aqbooksellerid=$supplierid |
| 2035 |
$byserial |
2039 |
$byserial |
| 2036 |
ORDER BY $order" |
2040 |
ORDER BY $order" |
|
Lines 2047-2053
sub GetLateOrMissingIssues {
Link Here
|
| 2047 |
LEFT JOIN biblio ON subscription.biblionumber=biblio.biblionumber |
2051 |
LEFT JOIN biblio ON subscription.biblionumber=biblio.biblionumber |
| 2048 |
LEFT JOIN aqbooksellers ON subscription.aqbooksellerid = aqbooksellers.id |
2052 |
LEFT JOIN aqbooksellers ON subscription.aqbooksellerid = aqbooksellers.id |
| 2049 |
WHERE subscription.subscriptionid = serial.subscriptionid |
2053 |
WHERE subscription.subscriptionid = serial.subscriptionid |
| 2050 |
AND (serial.STATUS = 4 OR ((planneddate < now() AND serial.STATUS =1) OR serial.STATUS = 3 OR serial.STATUS = 7)) |
2054 |
AND (serial.STATUS IN (4, 41, 42, 43, 44) OR ((planneddate < now() AND serial.STATUS =1) OR serial.STATUS = 3 OR serial.STATUS = 7)) |
| 2051 |
$byserial |
2055 |
$byserial |
| 2052 |
ORDER BY $order" |
2056 |
ORDER BY $order" |
| 2053 |
); |
2057 |
); |