Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision d12196dd

Von Werner Hahn vor etwa 1 Jahr hinzugefügt

  • ID d12196dd818c4d759bef89d2179dd53d59097bde
  • Vorgänger f73ea35d
  • Nachfolger 3d0d2a52

Model/Record History snumbers setzen

Unterschiede anzeigen:

SL/Model/Record.pm
132 132
      my $spool = $::lx_office_conf{paths}->{spool};
133 133
      unlink map { "$spool/$_" } @spoolfiles if $spool;
134 134

  
135
      _save_history($record,'DELETED', \$params{history});
135
      _save_history($record,'DELETED', %{$params{history}});
136 136

  
137 137
      1;
138 138
  }) || push(@{$errors}, $db->error);
......
153 153
sub _save_history {
154 154
  my ($record, $addition, %history) = @_;
155 155

  
156
  my $number_type = $record->type =~ m{order} ? 'ordnumber' : 'quonumber';
157
  my $snumbers    = $number_type . '_' . $record->$number_type;
158

  
159 156
  SL::DB::History->new(
160 157
    trans_id    => $record->id,
161 158
    employee_id => SL::DB::Manager::Employee->current->id,
162 159
    what_done   => $record->type,
163
    snumbers    => $snumbers,
160
    snumbers    => $history{snumbers},
164 161
    addition    => $addition,
165 162
  )->save;
166 163
}

Auch abrufbar als: Unified diff