From d11c3e608a793158e656355873153315eda2add7 Mon Sep 17 00:00:00 2001 From: Colin Campbell Date: Wed, 22 Jul 2009 17:41:00 +0100 Subject: [PATCH] (bug 3434) Fix generation of Serials Claims op was not being returned to claims.pl. It seems better logic to use whether the there are ids the user has flagged for claims to decide whether to generate the claims Signed-off-by: Galen Charlton --- .../prog/en/modules/serials/claims.tmpl | 3 +-- serials/claims.pl | 14 +++++++------- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/claims.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/claims.tmpl index e7d0b31c7f..8ee9aed982 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/claims.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/claims.tmpl @@ -55,7 +55,6 @@
" /> -

Missing Issues

@@ -74,7 +73,7 @@
- " onclick="document.claims.op='send_alert';" /> + " /> diff --git a/serials/claims.pl b/serials/claims.pl index b0a1e123c6..8fcea93ab6 100755 --- a/serials/claims.pl +++ b/serials/claims.pl @@ -66,13 +66,13 @@ if($supplierid){ my $preview=0; if($op eq 'preview'){ $preview = 1; -} - -if ($op eq "send_alert"){ - my @serialnums=$input->param("serialid"); - SendAlerts('claimissues',\@serialnums,$input->param("letter_code")); - my $cntupdate=UpdateClaimdateIssues(\@serialnums); - ### $cntupdate SHOULD be equal to scalar(@$serialnums) +} else { + my @serialnums=$input->param('serialid'); + if (@serialnums) { # i.e. they have been flagged to generate claims + SendAlerts('claimissues',\@serialnums,$input->param("letter_code")); + my $cntupdate=UpdateClaimdateIssues(\@serialnums); + ### $cntupdate SHOULD be equal to scalar(@$serialnums) TODO so what do we do about it?? + } } $template->param('letters'=>\@letters,'letter'=>$letter); -- 2.39.5