Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision dba55a3c

Von Bernd Bleßmann vor mehr als 1 Jahr hinzugefügt

  • ID dba55a3c4cc11ecc215c88f4d1e155a653bc26dc
  • Vorgänger 2d0a3648
  • Nachfolger 8e405cb6

"neue" Beleg-Controller: interne Status-Fehler einfach mit "die" behandeln.

Unterschiede anzeigen:

SL/Controller/DeliveryOrder.pm
my $from_type = $::form->{from_type};
my $from_id = $::form->{from_id};
unless ($from_type && $from_id) {
$self->js->flash('error', t8("Can't create new record."));
$self->js->flash('error', t8("No 'from_type' was given.")) unless ($from_type);
$self->js->flash('error', t8("No 'from_id' was given.")) unless ($from_id);
return $self->js->render();
}
die "No 'from_type' was given." unless ($from_type);
die "No 'from_id' was given." unless ($from_id);
my $record = SL::Model::Record->get_record($from_type, $from_id);
my $delivery_order = SL::Model::Record->new_from_workflow($record, $self->type);
SL/Controller/Order.pm
my $from_type = $::form->{from_type};
my $from_id = $::form->{from_id};
unless ($from_type && $from_id) {
$self->js->flash('error', t8("Can't create new record."));
$self->js->flash('error', t8("No 'from_type' was given.")) unless ($from_type);
$self->js->flash('error', t8("No 'from_id' was given.")) unless ($from_id);
return $self->js->render();
}
die "No 'from_type' was given." unless ($from_type);
die "No 'from_id' was given." unless ($from_id);
my $record = SL::Model::Record->get_record($from_type, $from_id);
my $order = SL::Model::Record->new_from_workflow($record, $self->type);
SL/Controller/Reclamation.pm
my $from_type = $::form->{from_type};
my $from_id = $::form->{from_id};
unless ($from_type && $from_id) {
$self->js->flash('error', t8("Can't create new record."));
$self->js->flash('error', t8("No 'from_type' was given.")) unless ($from_type);
$self->js->flash('error', t8("No 'from_id' was given.")) unless ($from_id);
return $self->js->render();
}
die "No 'from_type' was given." unless ($from_type);
die "No 'from_id' was given." unless ($from_id);
my $record = SL::Model::Record->get_record($from_type, $from_id);
my $reclamation = SL::Model::Record->new_from_workflow($record, $self->type);

Auch abrufbar als: Unified diff