… und beim Laden des Order-Objekts prüfen, ob eine id vorhanden ist.
$form->{delivery_term} = SL::DB::Manager::DeliveryTerm->find_by(id => $form->{delivery_term_id} || undef);
$form->{delivery_term}->description_long($form->{delivery_term}->translated_attribute('description_long', $form->{language_id})) if $form->{delivery_term} && $form->{language_id};
- $::form->{order} = SL::DB::Manager::Order->find_by(id => $::form->{id});
+ $form->{order} = SL::DB::Manager::Order->find_by(id => $form->{id}) if $form->{id};
$main::lxdebug->leave_sub();
}