From ab6b20078ea67ce5c8a6f60d1e74958232ba20cd Mon Sep 17 00:00:00 2001 From: wainuiwitikapark Date: Fri, 15 Nov 2024 00:57:43 +0000 Subject: [PATCH] Bug 38009: Add a generate next button in serials receive page Adds a generate next button to the serials receive page (serials-edit.pl) that works similar to the button on the serials collection page. To test: 1. Go to Staff Client > Serials 2. Find an existing subscription or create a new one 3. Go to the Serials collection page for your serial e.g. /cgi-bin/koha/serials/serials-collection.pl?subscriptionid=1 4. Click on the "Generate next" button and notice that the table adds another row 5. Click on the "Receive" button at the top of the page 6. Notice that the page also shows the issues like the rows in the previous page 7. Apply patch 8. Repeat steps 1-5 9. Notice that the page also has a "Generate next" button at the top 10. Check that the button generates a new issue row on the page Sponsored-by: Pymble Ladies' College Signed-off-by: esther --- .../prog/en/includes/modals/generate_next.inc | 1 + .../intranet-tmpl/prog/en/modules/serials/serials-edit.tt | 5 +++++ serials/serials-collection.pl | 8 +++++++- 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/modals/generate_next.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/modals/generate_next.inc index 8d4594a76d..5895c417df 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/modals/generate_next.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/modals/generate_next.inc @@ -11,6 +11,7 @@ Do you really want to generate next serial? + diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-edit.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-edit.tt index cdb1b2dfff..e68ab05262 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-edit.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-edit.tt @@ -120,6 +120,11 @@ $(document).ready(function() {
[% INCLUDE 'messages.inc' %] +
+
+ [% INCLUDE 'modals/generate_next.inc' referrer="serials-edit" %] +
+

Serial edition [% bibliotitle | html %] [% IF location %] ([% AuthorisedValues.GetByCode('LOC', location) | html %])[% END %] [% IF ( callnumber ) %] callnumber: [% callnumber | html %][% END %]

diff --git a/serials/serials-collection.pl b/serials/serials-collection.pl index 025bde2179..99fe2e0f24 100755 --- a/serials/serials-collection.pl +++ b/serials/serials-collection.pl @@ -48,6 +48,7 @@ my $biblionumber = $query->param('biblionumber'); my @subscriptionid = $query->multi_param('subscriptionid'); my $skip_issues = $query->param('skip_issues') || 0; my $count_forward = $skip_issues + 1; +my $referrer = $query->param('referrer'); @subscriptionid= uniq @subscriptionid; @subscriptionid= sort @subscriptionid; @@ -104,7 +105,12 @@ if($op eq 'cud-gennext' && @subscriptionid){ last if $nbissues == 1; last if HasSubscriptionExpired($subscriptionid) > 0; } - print $query->redirect('/cgi-bin/koha/serials/serials-collection.pl?subscriptionid='.$subscriptionid); + if ($referrer eq "serials-edit") { + print $query->redirect('/cgi-bin/koha/serials/serials-edit.pl?subscriptionid='.$subscriptionid.'&serstatus=1,3'); + } + else { + print $query->redirect('/cgi-bin/koha/serials/serials-collection.pl?subscriptionid='.$subscriptionid); + } exit; } -- 2.39.5