Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 5d4c9dd1

Von Tamino Steinert vor fast 2 Jahren hinzugefügt

  • ID 5d4c9dd1722ed6ba0f37a91334013afa523acd30
  • Vorgänger 8b9e5920
  • Nachfolger 5ff56ded

BJ: CheckBelowMinimumStock: FIX: speichere keine IDs und Fehler

Unterschiede anzeigen:

SL/BackgroundJob/CheckBelowMinimumStock.pm
. "\n";
push @ids, $part_hash->{id};
}
$self->{job_obj}->set_data(
errors => $error_string,
ids => \@ids,
)->save;
$self->{errors} = $error_string;
$self->{ids} = \@ids;
}
return;
}
......
my $err = $mail->send;
if ($err) {
my $error = $self->{job_obj}->data_as_hash->{errors} . t8('Mailer error #1', $err);
$self->{job_obj}->set_data(errors => $error)->save;
$self->{errors} .= t8('Mailer error #1', $err);
}
return
......
my $filename = $email_template || ( (SL::DB::Default->get->templates || "templates/mails") . "/below_minimum_stock/error_email.html" );
my $content_type = $filename =~ m/.html$/ ? 'text/html' : 'text/plain';
my @ids = @{$self->{job_obj}->data_as_hash->{ids}};
my @ids = @{$self->{ids}};
my @parts = @{SL::DB::Manager::Part->get_all(where => [id => @ids])};
......
$self->check_below_minimum_stock();
my $data = $job_obj->data_as_hash;
if ($data->{errors}) {
if ($self->{errors}) {
# on error we have to inform the user
$self->send_email();
die $data->{errors};
die $self->{errors};
}
$job_obj->set_data(status => DONE())->save;

Auch abrufbar als: Unified diff