Revision 7e4a1765
Von Bernd Bleßmann vor fast 2 Jahren hinzugefügt
bin/mozilla/do.pl | ||
---|---|---|
991 | 991 |
|
992 | 992 |
$form->mtime_ischanged('delivery_orders'); |
993 | 993 |
|
994 |
my $validity_token; |
|
995 |
if (!$form->{id}) { |
|
996 |
$validity_token = SL::DB::Manager::ValidityToken->fetch_valid_token( |
|
997 |
scope => SL::DB::ValidityToken::SCOPE_DELIVERY_ORDER_SAVE(), |
|
998 |
token => $form->{form_validity_token}, |
|
999 |
); |
|
1000 |
|
|
1001 |
$form->error($::locale->text('The form is not valid anymore.')) if !$validity_token; |
|
1002 |
} |
|
1003 |
|
|
1004 | 994 |
$form->{defaultcurrency} = $form->get_default_currency(\%myconfig); |
1005 | 995 |
|
1006 | 996 |
$form->isblank("transdate", $locale->text('Delivery Order Date missing!')); |
... | ... | |
1039 | 1029 |
$::dispatcher->end_request; |
1040 | 1030 |
} |
1041 | 1031 |
|
1042 |
$form->{id} = 0 if $form->{saveasnew}; |
|
1032 |
if ($form->{saveasnew}) { |
|
1033 |
$form->{id} = 0; |
|
1034 |
$form->{form_validity_token} = SL::DB::ValidityToken->create(scope => SL::DB::ValidityToken::SCOPE_DELIVERY_ORDER_SAVE())->token; |
|
1035 |
} |
|
1036 |
|
|
1043 | 1037 |
# we rely on converted_from_orderitems, if the workflow is used |
1044 | 1038 |
# be sure that at least one position is linked to the original orderitem |
1045 | 1039 |
if ($form->{convert_from_oe_ids}) { |
... | ... | |
1056 | 1050 |
} |
1057 | 1051 |
DO->save(); |
1058 | 1052 |
|
1059 |
$validity_token->delete if $validity_token; |
|
1060 |
delete $form->{form_validity_token}; |
|
1061 |
|
|
1062 | 1053 |
# saving the history |
1063 | 1054 |
if(!exists $form->{addition}) { |
1064 | 1055 |
$form->{snumbers} = qq|donumber_| . $form->{donumber}; |
Auch abrufbar als: Unified diff
Gültigkeitstoken in Transaction abfragen und löschen: "alte" Controller
Lieferscheine
Einkaufsrechnung
Verkaufsrechnung
Kreditorenbuchung
Debitorenbuchung
Dialogbuchung