Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision a03e4841

Von Bernd Bleßmann vor fast 2 Jahren hinzugefügt

  • ID a03e4841e8d7faaca994f8f5549c6448c203399e
  • Vorgänger 4b184957
  • Nachfolger 5cada5ab

Gültigkeitstoken Lieferscheine (alter Controller)

Unterschiede anzeigen:

bin/mozilla/do.pl
114 114
  $form->{show_details} = $::myconfig{show_form_details};
115 115
  $form->{callback} = build_std_url('action=add', 'type', 'vc') unless ($form->{callback});
116 116

  
117
  if (!$form->{form_validity_token}) {
118
    $form->{form_validity_token} = SL::DB::ValidityToken->create(scope => SL::DB::ValidityToken::SCOPE_DELIVERY_ORDER_SAVE())->token;
119
  }
120

  
117 121
  order_links(is_new => 1);
118 122
  prepare_order();
119 123
  display_form();
......
987 991

  
988 992
  $form->mtime_ischanged('delivery_orders');
989 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

  
990 1004
  $form->{defaultcurrency} = $form->get_default_currency(\%myconfig);
991 1005

  
992 1006
  $form->isblank("transdate", $locale->text('Delivery Order Date missing!'));
......
1041 1055
    }
1042 1056
  }
1043 1057
  DO->save();
1058

  
1059
  $validity_token->delete if $validity_token;
1060
  delete $form->{form_validity_token};
1061

  
1044 1062
  # saving the history
1045 1063
  if(!exists $form->{addition}) {
1046 1064
    $form->{snumbers} = qq|donumber_| . $form->{donumber};

Auch abrufbar als: Unified diff