From b6bfec5b7a26a17c649ce3aef9fa782a06cd3471 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 | 36 ++++----- 2 files changed, 22 insertions(+), 102 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 520f031..3c10eef 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 ) %] -
@@ -338,77 +330,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 70fc5c2..5aed884 100755 --- a/serials/claims.pl +++ b/serials/claims.pl @@ -59,26 +59,21 @@ for my $s (@{$supplierlist} ) { 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 { - $err = SendAlerts('claimissues',\@serialnums,$input->param("letter_code")); - if ( not ref $err or not exists $err->{error} ) { - UpdateClaimdateIssues(\@serialnums); - } - }; - if ( $@ ) { - $template->param(error_claim => $@); - } elsif ( ref $err and exists $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 { + $err = SendAlerts('claimissues',\@serialnums,$input->param("letter_code")); + if ( not ref $err or not exists $err->{error} ) { + UpdateClaimdateIssues(\@serialnums); } + }; + if ( $@ ) { + $template->param(error_claim => $@); + } elsif ( ref $err and exists $err->{error} and $err->{error} eq "no_email" ) { + $template->{VARS}->{'error_claim'} = "no_email"; + } else { + $template->{VARS}->{'info_claim'} = 1; } } @@ -102,13 +97,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