Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 2a8b6a74

Von Tamino Steinert vor mehr als 1 Jahr hinzugefügt

  • ID 2a8b6a74f3e8cbeeef1acc3f7292696db8096582
  • Vorgänger 22d2337c
  • Nachfolger 64b180ac

S:C:Record: Hole Typen aus Datenbankobjekt wenn ID gegeben

Unterschiede anzeigen:

SL/Controller/Reclamation.pm
sub init_type {
my ($self) = @_;
if (none { $::form->{type} eq $_ } @{$self->valid_types}) {
my $type = $self->reclamation->record_type : $::form->{type};
if (none { $type eq $_ } @{$self->valid_types}) {
die "Not a valid type for reclamation";
}
$self->type($::form->{type});
$self->type($type);
}
sub init_cv {
......
$reclamation = SL::DB::Reclamation->new(id => $::form->{id})->load();
} else {
$reclamation = SL::DB::Reclamation->new(
record_type => $self->type,
record_type => $::form->{type},
reclamation_items => [],
currency_id => $::instance_conf->get_currency_id(),
);
}
my $cv_id_method = $self->cv . '_id';
my $cv_id_method = $reclamation->type_data->properties('customervendor'). '_id';
if (!$::form->{id} && $::form->{$cv_id_method}) {
$reclamation->$cv_id_method($::form->{$cv_id_method});
$reclamation = SL::Model::Record->update_after_customer_vendor_change($reclamation);
......
}
sub init_type_data {
SL::DB::Helper::TypeDataProxy->new('SL::DB::Reclamation', $::form->{type});
my ($self) = @_;
SL::DB::Helper::TypeDataProxy->new('SL::DB::Reclamation', $self->reclamation->record_type);
}
1;

Auch abrufbar als: Unified diff