Revision d87306b2
Von Werner Hahn vor fast 2 Jahren hinzugefügt
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
Model/Record History snumbers setzen