Revision 7e4a1765
Von Bernd Bleßmann vor fast 2 Jahren hinzugefügt
SL/DO.pm | ||
---|---|---|
44 | 44 |
use SL::DB::DeliveryOrder; |
45 | 45 |
use SL::DB::DeliveryOrder::TypeData qw(:types is_valid_type); |
46 | 46 |
use SL::DB::Status; |
47 |
use SL::DB::ValidityToken; |
|
47 | 48 |
use SL::DBUtils; |
48 | 49 |
use SL::Helper::ShippedQty; |
49 | 50 |
use SL::HTML::Restrict; |
... | ... | |
330 | 331 |
my $myconfig = \%main::myconfig; |
331 | 332 |
my $form = $main::form; |
332 | 333 |
|
334 |
my $validity_token; |
|
335 |
if (!$form->{id}) { |
|
336 |
$validity_token = SL::DB::Manager::ValidityToken->fetch_valid_token( |
|
337 |
scope => SL::DB::ValidityToken::SCOPE_DELIVERY_ORDER_SAVE(), |
|
338 |
token => $form->{form_validity_token}, |
|
339 |
); |
|
340 |
|
|
341 |
die $::locale->text('The form is not valid anymore.') if !$validity_token; |
|
342 |
} |
|
343 |
|
|
333 | 344 |
my $dbh = SL::DB->client->dbh; |
334 | 345 |
my $restricter = SL::HTML::Restrict->create; |
335 | 346 |
|
... | ... | |
606 | 617 |
|
607 | 618 |
Common::webdav_folder($form); |
608 | 619 |
|
620 |
$validity_token->delete if $validity_token; |
|
621 |
delete $form->{form_validity_token}; |
|
622 |
|
|
609 | 623 |
$main::lxdebug->leave_sub(); |
610 | 624 |
|
611 | 625 |
return 1; |
Auch abrufbar als: Unified diff
Gültigkeitstoken in Transaction abfragen und löschen: "alte" Controller
Lieferscheine
Einkaufsrechnung
Verkaufsrechnung
Kreditorenbuchung
Debitorenbuchung
Dialogbuchung