Revision 7e4a1765
Von Bernd Bleßmann vor fast 2 Jahren hinzugefügt
SL/IS.pm | ||
---|---|---|
61 | 61 |
use SL::DB::Draft; |
62 | 62 |
use SL::DB::Tax; |
63 | 63 |
use SL::DB::TaxZone; |
64 |
use SL::DB::ValidityToken; |
|
64 | 65 |
use SL::TransNumber; |
65 | 66 |
use SL::DB; |
66 | 67 |
use SL::Presenter::Part qw(type_abbreviation classification_abbreviation); |
... | ... | |
761 | 762 |
sub _post_invoice { |
762 | 763 |
my ($self, $myconfig, $form, $provided_dbh, %params) = @_; |
763 | 764 |
|
765 |
my $validity_token; |
|
766 |
if (!$form->{id}) { |
|
767 |
$validity_token = SL::DB::Manager::ValidityToken->fetch_valid_token( |
|
768 |
scope => SL::DB::ValidityToken::SCOPE_SALES_INVOICE_POST(), |
|
769 |
token => $form->{form_validity_token}, |
|
770 |
); |
|
771 |
|
|
772 |
die $::locale->text('The form is not valid anymore.') if !$validity_token; |
|
773 |
} |
|
774 |
|
|
764 | 775 |
my $payments_only = $params{payments_only}; |
765 | 776 |
my $dbh = $provided_dbh || SL::DB->client->dbh; |
766 | 777 |
my $restricter = SL::HTML::Restrict->create; |
... | ... | |
1681 | 1692 |
$shop->connector->set_orderstatus($shop_order->shop_trans_id, "completed"); |
1682 | 1693 |
} |
1683 | 1694 |
|
1695 |
$validity_token->delete if $validity_token; |
|
1696 |
delete $form->{form_validity_token}; |
|
1697 |
|
|
1684 | 1698 |
return 1; |
1685 | 1699 |
} |
1686 | 1700 |
|
Auch abrufbar als: Unified diff
Gültigkeitstoken in Transaction abfragen und löschen: "alte" Controller
Lieferscheine
Einkaufsrechnung
Verkaufsrechnung
Kreditorenbuchung
Debitorenbuchung
Dialogbuchung