Revision 7e4a1765
Von Bernd Bleßmann vor fast 2 Jahren hinzugefügt
SL/IR.pm | ||
---|---|---|
51 | 51 |
use SL::DB::Default; |
52 | 52 |
use SL::DB::TaxZone; |
53 | 53 |
use SL::DB::MakeModel; |
54 |
use SL::DB::ValidityToken; |
|
54 | 55 |
use SL::DB; |
55 | 56 |
use SL::Presenter::Part qw(type_abbreviation classification_abbreviation); |
56 | 57 |
use List::Util qw(min); |
... | ... | |
73 | 74 |
sub _post_invoice { |
74 | 75 |
my ($self, $myconfig, $form, $provided_dbh, %params) = @_; |
75 | 76 |
|
77 |
my $validity_token; |
|
78 |
if (!$form->{id}) { |
|
79 |
$validity_token = SL::DB::Manager::ValidityToken->fetch_valid_token( |
|
80 |
scope => SL::DB::ValidityToken::SCOPE_PURCHASE_INVOICE_POST(), |
|
81 |
token => $form->{form_validity_token}, |
|
82 |
); |
|
83 |
|
|
84 |
die $::locale->text('The form is not valid anymore.') if !$validity_token; |
|
85 |
} |
|
86 |
|
|
76 | 87 |
my $payments_only = $params{payments_only}; |
77 | 88 |
my $dbh = $provided_dbh || SL::DB->client->dbh; |
78 | 89 |
my $restricter = SL::HTML::Restrict->create; |
... | ... | |
854 | 865 |
} |
855 | 866 |
} |
856 | 867 |
|
868 |
$validity_token->delete if $validity_token; |
|
869 |
delete $form->{form_validity_token}; |
|
870 |
|
|
857 | 871 |
return 1; |
858 | 872 |
} |
859 | 873 |
|
Auch abrufbar als: Unified diff
Gültigkeitstoken in Transaction abfragen und löschen: "alte" Controller
Lieferscheine
Einkaufsrechnung
Verkaufsrechnung
Kreditorenbuchung
Debitorenbuchung
Dialogbuchung