@@ -, +, @@ serials/claims.pl --- .../prog/en/modules/serials/claims.tt | 76 ---------------------- serials/claims.pl | 42 +++++------- 2 files changed, 18 insertions(+), 100 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,6 @@ [% INCLUDE 'header.inc' %] -[% UNLESS ( preview ) %] [% INCLUDE 'serials-search.inc' %] -[% END %] -[% UNLESS ( preview ) %] -
@@ -352,77 +342,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,30 +59,25 @@ for my $s (@{$supplierlist} ) { my $branchloop = GetBranchesLoop(); -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} ) { - if ( $err->{error} eq "no_email" ) { - $template->param( error_claim => 'no_vendor_email' ); - } elsif ( $err->{error} =~ m|Bad or missing From address| ) { - $template->param( error_claim => 'no_loggedin_user_email' ); - } - } else { - $template->param( 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} ) { + if ( $err->{error} eq "no_email" ) { + $template->param( error_claim => 'no_vendor_email' ); + } elsif ( $err->{error} =~ m|Bad or missing From address| ) { + $template->param( error_claim => 'no_loggedin_user_email' ); + } + } else { + $template->param( info_claim => 1 ); } } @@ -100,7 +95,6 @@ $template->param( phone => $supplierinfo[0]->{phone}, booksellerfax => $supplierinfo[0]->{booksellerfax}, bookselleremail => $supplierinfo[0]->{bookselleremail}, - preview => $preview, missingissues => \@missingissues, supplierid => $supplierid, claimletter => $claimletter, --