Revision 7e4a1765
Von Bernd Bleßmann vor fast 2 Jahren hinzugefügt
SL/AR.pm | ||
---|---|---|
42 | 42 |
use SL::IO; |
43 | 43 |
use SL::MoreCommon; |
44 | 44 |
use SL::DB::Default; |
45 |
use SL::DB::ValidityToken; |
|
45 | 46 |
use SL::TransNumber; |
46 | 47 |
use SL::Util qw(trim); |
47 | 48 |
use SL::DB; |
... | ... | |
61 | 62 |
sub _post_transaction { |
62 | 63 |
my ($self, $myconfig, $form, $provided_dbh, %params) = @_; |
63 | 64 |
|
65 |
my $validity_token; |
|
66 |
if (!$form->{id}) { |
|
67 |
$validity_token = SL::DB::Manager::ValidityToken->fetch_valid_token( |
|
68 |
scope => SL::DB::ValidityToken::SCOPE_SALES_INVOICE_POST(), |
|
69 |
token => $form->{form_validity_token}, |
|
70 |
); |
|
71 |
|
|
72 |
die $::locale->text('The form is not valid anymore.') if !$validity_token; |
|
73 |
} |
|
74 |
|
|
64 | 75 |
my $payments_only = $params{payments_only}; |
65 | 76 |
|
66 | 77 |
my ($query, $sth, $null, $taxrate, $amount, $tax); |
... | ... | |
351 | 362 |
} |
352 | 363 |
} |
353 | 364 |
|
365 |
$validity_token->delete if $validity_token; |
|
366 |
delete $form->{form_validity_token}; |
|
367 |
|
|
354 | 368 |
return 1; |
355 | 369 |
} |
356 | 370 |
|
Auch abrufbar als: Unified diff
Gültigkeitstoken in Transaction abfragen und löschen: "alte" Controller
Lieferscheine
Einkaufsrechnung
Verkaufsrechnung
Kreditorenbuchung
Debitorenbuchung
Dialogbuchung