logaction( "ACQUISITION", "CLAIM ISSUE", undef, "To=" . $mail{To} . " Title=" . $innerletter->{title} . " Content=" . $innerletter->{content} ) if $type eq 'claimissues';
}
} else {
- die "This bookseller has no email\n";
+ return {error => "no_email" };
}
warn "sending to From $userenv->{emailaddress} subj $innerletter->{title} Mess $innerletter->{content}" if $debug;
if ($op and $op eq "send_alert"){
my @ordernums = $input->param("claim_for");# FIXME: Fallback values?
+ my $err;
eval {
- SendAlerts( 'claimacquisition', \@ordernums, $input->param("letter_code") ); # FIXME: Fallback value?
+ $err = SendAlerts( 'claimacquisition', \@ordernums, $input->param("letter_code") ); # FIXME: Fallback value?
AddClaim ( $_ ) for @ordernums;
};
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;
}
<div id="acqui_lateorders">
[% IF error_claim %]
- <div class="error">[% error_claim %]</div>
+ [% IF ( error_claim == "no_email" ) %]
+ <div class="error">This vendor has no email</div>
+ [% ELSE %]
+ <div class="error">[% error_claim %]</div>
+ [% END %]
[% END %]
[% IF info_claim %]
<div class="info">Email has been sent.</div>
<th>Basket</th>
<th>Claims count</th>
<th>Claimed date</th>
- <!-- TMPL_IF name="Supplier" -->
[% IF Supplier %]
<th><a id="CheckAll" href="#">Check all</a><br /><a id="CheckNone" href="#">Uncheck all</a></th>
[% ELSE %]