Lines 1088-1094
Note : if we change from "waited" to something else,then we will have to create
Link Here
|
1088 |
=cut |
1088 |
=cut |
1089 |
|
1089 |
|
1090 |
sub ModSerialStatus { |
1090 |
sub ModSerialStatus { |
1091 |
my ( $serialid, $serialseq, $planneddate, $publisheddate, $status, $notes ) = @_; |
1091 |
my ( $serialid, $serialseq, $planneddate, $publisheddate, $published_end_date, $status, $notes ) = @_; |
1092 |
|
1092 |
|
1093 |
#It is a usual serial |
1093 |
#It is a usual serial |
1094 |
# 1st, get previous status : |
1094 |
# 1st, get previous status : |
Lines 1105-1113
sub ModSerialStatus {
Link Here
|
1105 |
} |
1105 |
} |
1106 |
else { |
1106 |
else { |
1107 |
my $query = |
1107 |
my $query = |
1108 |
'UPDATE serial SET serialseq=?,publisheddate=?,planneddate=?,status=?,notes=? WHERE serialid = ?'; |
1108 |
'UPDATE serial SET serialseq=?,publisheddate=?,published_end_date=?,planneddate=?,status=?,notes=? WHERE serialid = ?'; |
1109 |
$sth = $dbh->prepare($query); |
1109 |
$sth = $dbh->prepare($query); |
1110 |
$sth->execute( $serialseq, $publisheddate, $planneddate, $status, $notes, $serialid ); |
1110 |
$sth->execute( $serialseq, $publisheddate, $published_end_date, $planneddate, $status, $notes, $serialid ); |
1111 |
$query = "SELECT * FROM subscription WHERE subscriptionid = ?"; |
1111 |
$query = "SELECT * FROM subscription WHERE subscriptionid = ?"; |
1112 |
$sth = $dbh->prepare($query); |
1112 |
$sth = $dbh->prepare($query); |
1113 |
$sth->execute($subscriptionid); |
1113 |
$sth->execute($subscriptionid); |
Lines 1153-1159
sub ModSerialStatus {
Link Here
|
1153 |
|
1153 |
|
1154 |
# next date (calculated from actual date & frequency parameters) |
1154 |
# next date (calculated from actual date & frequency parameters) |
1155 |
my $nextpublisheddate = GetNextDate( $publisheddate, $val ); |
1155 |
my $nextpublisheddate = GetNextDate( $publisheddate, $val ); |
1156 |
NewIssue( $newserialseq, $subscriptionid, $val->{'biblionumber'}, 1, $nextpublisheddate, $nextpublisheddate, undef, $newlastvalue1, $newlastvalue2, $newlastvalue3 ); |
1156 |
NewIssue( $newserialseq, $subscriptionid, $val->{'biblionumber'}, 1, $nextpublisheddate, $nextpublisheddate, $published_end_date, undef, $newlastvalue1, $newlastvalue2, $newlastvalue3 ); |
1157 |
$query = "UPDATE subscription SET lastvalue1=?, lastvalue2=?, lastvalue3=?, innerloop1=?, innerloop2=?, innerloop3=? |
1157 |
$query = "UPDATE subscription SET lastvalue1=?, lastvalue2=?, lastvalue3=?, innerloop1=?, innerloop2=?, innerloop3=? |
1158 |
WHERE subscriptionid = ?"; |
1158 |
WHERE subscriptionid = ?"; |
1159 |
$sth = $dbh->prepare($query); |
1159 |
$sth = $dbh->prepare($query); |
Lines 1463-1480
returns the serial id
Link Here
|
1463 |
=cut |
1463 |
=cut |
1464 |
|
1464 |
|
1465 |
sub NewIssue { |
1465 |
sub NewIssue { |
1466 |
my ( $serialseq, $subscriptionid, $biblionumber, $status, $planneddate, $publisheddate, $notes, $x, $y, $z ) = @_; |
1466 |
my ( $serialseq, $subscriptionid, $biblionumber, $status, $planneddate, $publisheddate, $published_end_date, $notes, $x, $y, $z ) = @_; |
1467 |
warn "NewIssue( $serialseq, $subscriptionid, $biblionumber, $status, $planneddate, $publisheddate, $notes, $x, $y, $z )"; |
|
|
1468 |
### FIXME biblionumber CAN be provided by subscriptionid. So Do we STILL NEED IT ? |
1467 |
### FIXME biblionumber CAN be provided by subscriptionid. So Do we STILL NEED IT ? |
1469 |
|
1468 |
|
1470 |
my $dbh = C4::Context->dbh; |
1469 |
my $dbh = C4::Context->dbh; |
1471 |
my $query = qq| |
1470 |
my $query = qq| |
1472 |
INSERT INTO serial |
1471 |
INSERT INTO serial |
1473 |
(serialseq,subscriptionid,biblionumber,status,publisheddate,planneddate,notes,serialseq_x,serialseq_y,serialseq_z) |
1472 |
(serialseq,subscriptionid,biblionumber,status,publisheddate,published_end_date,planneddate,notes,serialseq_x,serialseq_y,serialseq_z) |
1474 |
VALUES (?,?,?,?,?,?,?,?,?,?) |
1473 |
VALUES (?,?,?,?,?,?,?,?,?,?,?) |
1475 |
|; |
1474 |
|; |
1476 |
my $sth = $dbh->prepare($query); |
1475 |
my $sth = $dbh->prepare($query); |
1477 |
$sth->execute( $serialseq, $subscriptionid, $biblionumber, $status, $publisheddate, $planneddate, $notes, $x, $y, $z ); |
1476 |
$sth->execute( $serialseq, $subscriptionid, $biblionumber, $status, $publisheddate, $published_end_date, $planneddate, $notes, $x, $y, $z ); |
1478 |
my $serialid = $dbh->{'mysql_insertid'}; |
1477 |
my $serialid = $dbh->{'mysql_insertid'}; |
1479 |
$query = qq| |
1478 |
$query = qq| |
1480 |
SELECT missinglist,recievedlist |
1479 |
SELECT missinglist,recievedlist |