Lines 1108-1114
Note : if we change from "waited" to something else,then we will have to create
Link Here
|
1108 |
=cut |
1108 |
=cut |
1109 |
|
1109 |
|
1110 |
sub ModSerialStatus { |
1110 |
sub ModSerialStatus { |
1111 |
my ( $serialid, $serialseq, $planneddate, $publisheddate, $status, $notes ) = @_; |
1111 |
my ( $serialid, $serialseq, $planneddate, $publisheddate, $published_end_date, $status, $notes ) = @_; |
1112 |
|
1112 |
|
1113 |
#It is a usual serial |
1113 |
#It is a usual serial |
1114 |
# 1st, get previous status : |
1114 |
# 1st, get previous status : |
Lines 1125-1133
sub ModSerialStatus {
Link Here
|
1125 |
} |
1125 |
} |
1126 |
else { |
1126 |
else { |
1127 |
my $query = |
1127 |
my $query = |
1128 |
'UPDATE serial SET serialseq=?,publisheddate=?,planneddate=?,status=?,notes=? WHERE serialid = ?'; |
1128 |
'UPDATE serial SET serialseq=?,publisheddate=?,published_end_date=?,planneddate=?,status=?,notes=? WHERE serialid = ?'; |
1129 |
$sth = $dbh->prepare($query); |
1129 |
$sth = $dbh->prepare($query); |
1130 |
$sth->execute( $serialseq, $publisheddate, $planneddate, $status, $notes, $serialid ); |
1130 |
$sth->execute( $serialseq, $publisheddate, $published_end_date, $planneddate, $status, $notes, $serialid ); |
1131 |
$query = "SELECT * FROM subscription WHERE subscriptionid = ?"; |
1131 |
$query = "SELECT * FROM subscription WHERE subscriptionid = ?"; |
1132 |
$sth = $dbh->prepare($query); |
1132 |
$sth = $dbh->prepare($query); |
1133 |
$sth->execute($subscriptionid); |
1133 |
$sth->execute($subscriptionid); |
Lines 1173-1179
sub ModSerialStatus {
Link Here
|
1173 |
|
1173 |
|
1174 |
# next date (calculated from actual date & frequency parameters) |
1174 |
# next date (calculated from actual date & frequency parameters) |
1175 |
my $nextpublisheddate = GetNextDate( $publisheddate, $val ); |
1175 |
my $nextpublisheddate = GetNextDate( $publisheddate, $val ); |
1176 |
NewIssue( $newserialseq, $subscriptionid, $val->{'biblionumber'}, 1, $nextpublisheddate, $nextpublisheddate, undef, $newlastvalue1, $newlastvalue2, $newlastvalue3 ); |
1176 |
NewIssue( $newserialseq, $subscriptionid, $val->{'biblionumber'}, 1, $nextpublisheddate, $nextpublisheddate, $published_end_date, undef, $newlastvalue1, $newlastvalue2, $newlastvalue3 ); |
1177 |
$query = "UPDATE subscription SET lastvalue1=?, lastvalue2=?, lastvalue3=?, innerloop1=?, innerloop2=?, innerloop3=? |
1177 |
$query = "UPDATE subscription SET lastvalue1=?, lastvalue2=?, lastvalue3=?, innerloop1=?, innerloop2=?, innerloop3=? |
1178 |
WHERE subscriptionid = ?"; |
1178 |
WHERE subscriptionid = ?"; |
1179 |
$sth = $dbh->prepare($query); |
1179 |
$sth = $dbh->prepare($query); |
Lines 1483-1500
returns the serial id
Link Here
|
1483 |
=cut |
1483 |
=cut |
1484 |
|
1484 |
|
1485 |
sub NewIssue { |
1485 |
sub NewIssue { |
1486 |
my ( $serialseq, $subscriptionid, $biblionumber, $status, $planneddate, $publisheddate, $notes, $x, $y, $z ) = @_; |
1486 |
my ( $serialseq, $subscriptionid, $biblionumber, $status, $planneddate, $publisheddate, $published_end_date, $notes, $x, $y, $z ) = @_; |
1487 |
warn "NewIssue( $serialseq, $subscriptionid, $biblionumber, $status, $planneddate, $publisheddate, $notes, $x, $y, $z )"; |
|
|
1488 |
### FIXME biblionumber CAN be provided by subscriptionid. So Do we STILL NEED IT ? |
1487 |
### FIXME biblionumber CAN be provided by subscriptionid. So Do we STILL NEED IT ? |
1489 |
|
1488 |
|
1490 |
my $dbh = C4::Context->dbh; |
1489 |
my $dbh = C4::Context->dbh; |
1491 |
my $query = qq| |
1490 |
my $query = qq| |
1492 |
INSERT INTO serial |
1491 |
INSERT INTO serial |
1493 |
(serialseq,subscriptionid,biblionumber,status,publisheddate,planneddate,notes,serialseq_x,serialseq_y,serialseq_z) |
1492 |
(serialseq,subscriptionid,biblionumber,status,publisheddate,published_end_date,planneddate,notes,serialseq_x,serialseq_y,serialseq_z) |
1494 |
VALUES (?,?,?,?,?,?,?,?,?,?) |
1493 |
VALUES (?,?,?,?,?,?,?,?,?,?,?) |
1495 |
|; |
1494 |
|; |
1496 |
my $sth = $dbh->prepare($query); |
1495 |
my $sth = $dbh->prepare($query); |
1497 |
$sth->execute( $serialseq, $subscriptionid, $biblionumber, $status, $publisheddate, $planneddate, $notes, $x, $y, $z ); |
1496 |
$sth->execute( $serialseq, $subscriptionid, $biblionumber, $status, $publisheddate, $published_end_date, $planneddate, $notes, $x, $y, $z ); |
1498 |
my $serialid = $dbh->{'mysql_insertid'}; |
1497 |
my $serialid = $dbh->{'mysql_insertid'}; |
1499 |
$query = qq| |
1498 |
$query = qq| |
1500 |
SELECT missinglist,recievedlist |
1499 |
SELECT missinglist,recievedlist |