Revision 7e4a1765
Von Bernd Bleßmann vor fast 2 Jahren hinzugefügt
SL/AP.pm | ||
---|---|---|
44 | 44 |
use SL::DB::Draft; |
45 | 45 |
use SL::DB::Order; |
46 | 46 |
use SL::DB::PurchaseInvoice; |
47 |
use SL::DB::ValidityToken; |
|
47 | 48 |
use SL::Util qw(trim); |
48 | 49 |
use SL::DB; |
49 | 50 |
use Data::Dumper; |
... | ... | |
63 | 64 |
sub _post_transaction { |
64 | 65 |
my ($self, $myconfig, $form, $provided_dbh, %params) = @_; |
65 | 66 |
|
67 |
my $validity_token; |
|
68 |
if (!$form->{id}) { |
|
69 |
$validity_token = SL::DB::Manager::ValidityToken->fetch_valid_token( |
|
70 |
scope => SL::DB::ValidityToken::SCOPE_PURCHASE_INVOICE_POST(), |
|
71 |
token => $form->{form_validity_token}, |
|
72 |
); |
|
73 |
|
|
74 |
die $::locale->text('The form is not valid anymore.') if !$validity_token; |
|
75 |
} |
|
76 |
|
|
66 | 77 |
my $payments_only = $params{payments_only}; |
67 | 78 |
my $dbh = $provided_dbh || SL::DB->client->dbh; |
68 | 79 |
|
... | ... | |
431 | 442 |
} |
432 | 443 |
} |
433 | 444 |
|
445 |
$validity_token->delete if $validity_token; |
|
446 |
delete $form->{form_validity_token}; |
|
447 |
|
|
434 | 448 |
return 1; |
435 | 449 |
} |
436 | 450 |
|
Auch abrufbar als: Unified diff
Gültigkeitstoken in Transaction abfragen und löschen: "alte" Controller
Lieferscheine
Einkaufsrechnung
Verkaufsrechnung
Kreditorenbuchung
Debitorenbuchung
Dialogbuchung