From 87caf4bbcb68cdd82781d8547c320a8e023162e6 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Fri, 9 Mar 2012 12:21:23 +0100 Subject: [PATCH 2/2] Bug 5342: Followup: Delete all occurrences of preview This feature is useless, apparently not used. --- .../prog/en/modules/serials/claims.tt | 88 ++------------------ serials/claims.pl | 34 +++----- 2 files changed, 21 insertions(+), 101 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/claims.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/claims.tt index 5b66937..e56fbb0 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/claims.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/claims.tt @@ -6,13 +6,13 @@ [% INCLUDE 'calendar.inc' %] [% INCLUDE 'header.inc' %] -[% UNLESS ( preview ) %] [% INCLUDE 'serials-search.inc' %] -[% END %] -[% UNLESS ( preview ) %] -
@@ -336,77 +328,11 @@ [% END %] -[% ELSE %] - -
-
- -[% IF ( supplierloop ) %] - [% FOREACH supplierloo IN supplierloop %] - [% IF ( supplierloo.name ) %] -

[% supplierloo.name %]
- [% END %] - [% IF ( supplierloo.postal ) %] - [% supplierloo.postal %]
- [% END %] - [% IF ( supplierloo.contphone ) %] - Ph: [% supplierloo.contphone %]
- [% END %] - [% IF ( supplierloo.contfax ) %] - Fax: [% supplierloo.contfax %]
- [% END %] - [% IF ( supplierloo.contemail ) %] - Email: [% supplierloo.contemail %]
- [% END %] - [% IF ( supplierloo.accountnumber ) %] - A/C: [% supplierloo.accountnumber %]

- [% END %] - [% IF ( supplierloo.contact ) %] -

Dear [% supplierloo.contact %]

- [% ELSE %] -

To whom it may concern

- [% END %] -

The following items have not been received from you and are now considered missing:

- [% END %] -[% END %] - [% IF ( missingissues ) %] -

Missing Issues

- - - - - - - - [% FOREACH missingissue IN missingissues %] - - - - - - - [% END %] -
VendorTitleIssue numberMissing since
- [% missingissue.name %] - - [% missingissue.Title |html %] - - [% missingissue.serialseq %] - - [% missingissue.planneddate %] -
- [% END %] - -

Print   Close

-[% END %] -
-[% UNLESS ( preview ) %]
[% INCLUDE 'serials-menu.inc' %]
-[% END %]
[% INCLUDE 'intranet-bottom.inc' %] diff --git a/serials/claims.pl b/serials/claims.pl index de1c1ef..e65d827 100755 --- a/serials/claims.pl +++ b/serials/claims.pl @@ -74,24 +74,19 @@ if ($supplierid) { my $branchloop = GetBranchesLoop(); unshift @$branchloop, {value=> 'all',name=>''}; -my $preview=0; -if($op && $op eq 'preview'){ - $preview = 1; -} else { - my @serialnums=$input->param('serialid'); - if (@serialnums) { # i.e. they have been flagged to generate claims - my $err; - eval { - SendAlerts('claimissues',\@serialnums,$input->param("letter_code")); - UpdateClaimdateIssues(\@serialnums); - }; - if ( $@ ) { - $template->param(error_claim => $@); - } elsif ( defined $err->{error} and $err->{error} eq "no_email" ) { - $template->{VARS}->{'error_claim'} = "no_email"; - } else { - $template->{VARS}->{'info_claim'} = 1; - } +my @serialnums=$input->param('serialid'); +if (@serialnums) { # i.e. they have been flagged to generate claims + my $err; + eval { + SendAlerts('claimissues',\@serialnums,$input->param("letter_code")); + UpdateClaimdateIssues(\@serialnums); + }; + if ( $@ ) { + $template->param(error_claim => $@); + } elsif ( defined $err->{error} and $err->{error} eq "no_email" ) { + $template->{VARS}->{'error_claim'} = "no_email"; + } else { + $template->{VARS}->{'info_claim'} = 1; } } $template->param('letters'=>\@letters,'letter'=>$letter); @@ -101,13 +96,12 @@ $template->param( phone => $supplierinfo[0]->{phone}, booksellerfax => $supplierinfo[0]->{booksellerfax}, bookselleremail => $supplierinfo[0]->{bookselleremail}, - preview => $preview, missingissues => \@missingissues, supplierid => $supplierid, claimletter => $claimletter, supplierloop => \@supplierinfo, branchloop => $branchloop, dateformat => C4::Context->preference("dateformat"), - DHTMLcalendar_dateformat => C4::Dates->DHTMLcalendar(), + DHTMLcalendar_dateformat => C4::Dates->DHTMLcalendar(), ); output_html_with_http_headers $input, $cookie, $template->output; -- 1.7.7.3