Revision 2dcde37c
Von Bernd Bleßmann vor etwa 1 Jahr hinzugefügt
SL/Controller/DeliveryOrder.pm | ||
---|---|---|
115 | 115 |
my $from_type = $::form->{from_type}; |
116 | 116 |
my $from_id = $::form->{from_id}; |
117 | 117 |
|
118 |
unless ($from_type && $from_id) { |
|
119 |
$self->js->flash('error', t8("Can't create new record.")); |
|
120 |
$self->js->flash('error', t8("No 'from_type' was given.")) unless ($from_type); |
|
121 |
$self->js->flash('error', t8("No 'from_id' was given.")) unless ($from_id); |
|
122 |
return $self->js->render(); |
|
123 |
} |
|
118 |
die "No 'from_type' was given." unless ($from_type); |
|
119 |
die "No 'from_id' was given." unless ($from_id); |
|
124 | 120 |
|
125 | 121 |
my $record = SL::Model::Record->get_record($from_type, $from_id); |
126 | 122 |
my $delivery_order = SL::Model::Record->new_from_workflow($record, $self->type); |
SL/Controller/Order.pm | ||
---|---|---|
103 | 103 |
my $from_type = $::form->{from_type}; |
104 | 104 |
my $from_id = $::form->{from_id}; |
105 | 105 |
|
106 |
unless ($from_type && $from_id) { |
|
107 |
$self->js->flash('error', t8("Can't create new record.")); |
|
108 |
$self->js->flash('error', t8("No 'from_type' was given.")) unless ($from_type); |
|
109 |
$self->js->flash('error', t8("No 'from_id' was given.")) unless ($from_id); |
|
110 |
return $self->js->render(); |
|
111 |
} |
|
106 |
die "No 'from_type' was given." unless ($from_type); |
|
107 |
die "No 'from_id' was given." unless ($from_id); |
|
112 | 108 |
|
113 | 109 |
my $record = SL::Model::Record->get_record($from_type, $from_id); |
114 | 110 |
my $order = SL::Model::Record->new_from_workflow($record, $self->type); |
SL/Controller/Reclamation.pm | ||
---|---|---|
117 | 117 |
my $from_type = $::form->{from_type}; |
118 | 118 |
my $from_id = $::form->{from_id}; |
119 | 119 |
|
120 |
unless ($from_type && $from_id) { |
|
121 |
$self->js->flash('error', t8("Can't create new record.")); |
|
122 |
$self->js->flash('error', t8("No 'from_type' was given.")) unless ($from_type); |
|
123 |
$self->js->flash('error', t8("No 'from_id' was given.")) unless ($from_id); |
|
124 |
return $self->js->render(); |
|
125 |
} |
|
120 |
die "No 'from_type' was given." unless ($from_type); |
|
121 |
die "No 'from_id' was given." unless ($from_id); |
|
126 | 122 |
|
127 | 123 |
my $record = SL::Model::Record->get_record($from_type, $from_id); |
128 | 124 |
my $reclamation = SL::Model::Record->new_from_workflow($record, $self->type); |
Auch abrufbar als: Unified diff
"neue" Beleg-Controller: interne Status-Fehler einfach mit "die" behandeln.