@@ -, +, @@ --- .../prog/en/modules/serials/claims.tt | 82 +------------------- serials/claims.pl | 34 ++++---- 2 files changed, 18 insertions(+), 98 deletions(-) --- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/claims.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/claims.tt @@ -9,7 +9,7 @@ [% INCLUDE 'header.inc' %] -[% UNLESS ( preview ) %] [% INCLUDE 'serials-search.inc' %] -[% END %] -[% UNLESS ( preview ) %] -
@@ -320,77 +312,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' %] --- a/serials/claims.pl +++ a/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,7 +97,6 @@ $template->param( phone => $supplierinfo[0]->{phone}, booksellerfax => $supplierinfo[0]->{booksellerfax}, bookselleremail => $supplierinfo[0]->{bookselleremail}, - preview => $preview, missingissues => \@missingissues, supplierid => $supplierid, claimletter => $claimletter, --