@@ -, +, @@ on multi receiving serials 1. the number of issues to receive 2. if the received date must be set to today - Receive 1 or more serials using the "Multi receiving" buttons - Try with and without the new checkbox ticked and confirm the behaviour - Make sure "Edit serials" and "Generate next" buttons still work as --- .../prog/en/modules/serials/serials-collection.tt | 51 ++++++++++++++++++---- serials/serials-collection.pl | 9 +++- 2 files changed, 50 insertions(+), 10 deletions(-) --- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-collection.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-collection.tt @@ -21,6 +21,38 @@
+ + + [% UNLESS ( popup ) %] [% INCLUDE 'serials-toolbar.inc' %] @@ -112,10 +144,12 @@
[% IF ( CAN_user_serials_receive_serials ) %]

-   +

[% UNLESS subscription.closed %] - - [% IF ( subscriptions.size == 1 and !serialsadditems ) %] [% END %] +
+ [% IF ( subscriptions.size == 1 and !serialsadditems ) %]  + + [% END %] [% END %]

[% END %] @@ -273,12 +307,9 @@ [% Asset.js("js/serials-toolbar.js") %] [% Asset.js("lib/jquery/plugins/jquery.checkboxes.min.js") %] + --- a/serials/serials-collection.pl +++ a/serials/serials-collection.pl @@ -28,12 +28,15 @@ use C4::Letters; use C4::Output; use C4::Context; +use Koha::DateUtils qw( dt_from_string ); + use List::MoreUtils qw/uniq/; my $query = new CGI; my $op = $query->param('op') || q{}; my $nbissues=$query->param('nbissues'); +my $date_received_today = $query->param('date_received_today') || 0; my $dbh = C4::Context->dbh; my ($template, $loggedinuser, $cookie) @@ -66,8 +69,9 @@ if($op eq 'gennext' && @subscriptionid){ $sth->execute($subscriptionid); # modify actual expected issue, to generate the next if ( my $issue = $sth->fetchrow_hashref ) { + my $planneddate = $date_received_today ? dt_from_string : $issue->{planneddate}; ModSerialStatus( $issue->{serialid}, $issue->{serialseq}, - $issue->{planneddate}, $issue->{publisheddate}, + $planneddate, $issue->{publisheddate}, $issue->{publisheddatetext}, $status, "" ); } else { require C4::Serials::Numberpattern; @@ -81,9 +85,10 @@ if($op eq 'gennext' && @subscriptionid){ ## We generate the next publication date my $nextpublisheddate = GetNextDate($subscription, $expected->{publisheddate}, 1); + my $planneddate = $date_received_today ? dt_from_string : $nextpublisheddate; ## Creating the new issue NewIssue( $newserialseq, $subscriptionid, $subscription->{'biblionumber'}, - 1, $nextpublisheddate, $nextpublisheddate ); + 1, $planneddate, $nextpublisheddate ); ## Updating the subscription seq status my $squery = "UPDATE subscription SET lastvalue1=?, lastvalue2=?, lastvalue3=?, innerloop1=?, innerloop2=?, innerloop3=? --