Revision 7e4a1765
Von Bernd Bleßmann vor fast 2 Jahren hinzugefügt
SL/GL.pm | ||
---|---|---|
46 | 46 |
use SL::DBUtils; |
47 | 47 |
use SL::DB::Chart; |
48 | 48 |
use SL::DB::Draft; |
49 |
use SL::DB::ValidityToken; |
|
49 | 50 |
use SL::Util qw(trim); |
50 | 51 |
use SL::DB; |
51 | 52 |
|
... | ... | |
77 | 78 |
my ($self, $myconfig, $form) = @_; |
78 | 79 |
$main::lxdebug->enter_sub(); |
79 | 80 |
|
81 |
my $validity_token; |
|
82 |
if (!$form->{id}) { |
|
83 |
$validity_token = SL::DB::Manager::ValidityToken->fetch_valid_token( |
|
84 |
scope => SL::DB::ValidityToken::SCOPE_GL_TRANSACTION_POST(), |
|
85 |
token => $form->{form_validity_token}, |
|
86 |
); |
|
87 |
|
|
88 |
die $::locale->text('The form is not valid anymore.') if !$validity_token; |
|
89 |
} |
|
90 |
|
|
80 | 91 |
my ($debit, $credit) = (0, 0); |
81 | 92 |
my $project_id; |
82 | 93 |
|
... | ... | |
213 | 224 |
} |
214 | 225 |
} |
215 | 226 |
|
227 |
$validity_token->delete if $validity_token; |
|
228 |
delete $form->{form_validity_token}; |
|
229 |
|
|
216 | 230 |
return 1; |
217 | 231 |
} |
218 | 232 |
|
Auch abrufbar als: Unified diff
Gültigkeitstoken in Transaction abfragen und löschen: "alte" Controller
Lieferscheine
Einkaufsrechnung
Verkaufsrechnung
Kreditorenbuchung
Debitorenbuchung
Dialogbuchung