Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 65987c7f

Von Tamino Steinert vor 8 Monaten hinzugefügt

  • ID 65987c7ffdefad559c6cea991ed7aab254cb03b9
  • Vorgänger 4c84466a
  • Nachfolger 71b7d7ca

S:D:ValidityToken: Scope von Order auf Record geändert ...

Später für alle Belege verwenden.

Unterschiede anzeigen:

SL/Controller/Order.pm
112 112
  $self->pre_render();
113 113

  
114 114
  if (!$::form->{form_validity_token}) {
115
    $::form->{form_validity_token} = SL::DB::ValidityToken->create(scope => SL::DB::ValidityToken::SCOPE_ORDER_SAVE())->token;
115
    $::form->{form_validity_token} = SL::DB::ValidityToken->create(scope => SL::DB::ValidityToken::SCOPE_RECORD_SAVE())->token;
116 116
  }
117 117

  
118 118
  $self->render(
......
188 188
    $_->{render_second_row} = 1 for @{ $self->order->items_sorted };
189 189

  
190 190
    if (!$::form->{form_validity_token}) {
191
      $::form->{form_validity_token} = SL::DB::ValidityToken->create(scope => SL::DB::ValidityToken::SCOPE_ORDER_SAVE())->token;
191
      $::form->{form_validity_token} = SL::DB::ValidityToken->create(scope => SL::DB::ValidityToken::SCOPE_RECORD_SAVE())->token;
192 192
    }
193 193
  }
194 194

  
......
326 326
  }
327 327

  
328 328
  if (!$::form->{form_validity_token}) {
329
    $::form->{form_validity_token} = SL::DB::ValidityToken->create(scope => SL::DB::ValidityToken::SCOPE_ORDER_SAVE())->token;
329
    $::form->{form_validity_token} = SL::DB::ValidityToken->create(scope => SL::DB::ValidityToken::SCOPE_RECORD_SAVE())->token;
330 330
  }
331 331

  
332 332
  # save
......
964 964
  $_->{render_second_row} = 1 for @{ $self->order->items_sorted };
965 965

  
966 966
  if (!$::form->{form_validity_token}) {
967
    $::form->{form_validity_token} = SL::DB::ValidityToken->create(scope => SL::DB::ValidityToken::SCOPE_ORDER_SAVE())->token;
967
    $::form->{form_validity_token} = SL::DB::ValidityToken->create(scope => SL::DB::ValidityToken::SCOPE_RECORD_SAVE())->token;
968 968
  }
969 969

  
970 970
  $self->render(
......
1330 1330
  $_->{render_longdescription} = 1 for @{ $self->order->items_sorted };
1331 1331

  
1332 1332
  if (!$::form->{form_validity_token}) {
1333
    $::form->{form_validity_token} = SL::DB::ValidityToken->create(scope => SL::DB::ValidityToken::SCOPE_ORDER_SAVE())->token;
1333
    $::form->{form_validity_token} = SL::DB::ValidityToken->create(scope => SL::DB::ValidityToken::SCOPE_RECORD_SAVE())->token;
1334 1334
  }
1335 1335

  
1336 1336
  $self->render(
......
2079 2079
                       : undef;
2080 2080

  
2081 2081
  SL::Model::Record->save($self->order,
2082
                          with_validity_token  => { scope => SL::DB::ValidityToken::SCOPE_ORDER_SAVE(), token => $::form->{form_validity_token} },
2082
                          with_validity_token  => { scope => SL::DB::ValidityToken::SCOPE_RECORD_SAVE(), token => $::form->{form_validity_token} },
2083 2083
                          delete_custom_shipto => $self->is_custom_shipto_to_delete || $self->order->custom_shipto->is_empty,
2084 2084
                          items_to_delete      => $items_to_delete,
2085 2085
                          objects_to_close     => $objects_to_close,
SL/Controller/RecordBase.pm
8 8

  
9 9
use SL::Helper::Flash qw(flash flash_later);
10 10

  
11
use SL::DB::ValidityToken;
12

  
11 13
use Rose::Object::MakeMethods::Generic(
12 14
 scalar => [ qw(
13 15
   item_ids_to_delete is_custom_shipto_to_delete
......
24 26
  $self->pre_render();
25 27

  
26 28
  if (!$::form->{form_validity_token}) {
27
    $::form->{form_validity_token} = SL::DB::ValidityToken->create(scope => SL::DB::ValidityToken::SCOPE_ORDER_SAVE())->token; # TODO remove scope
29
    $::form->{form_validity_token} = SL::DB::ValidityToken->create(scope => SL::DB::ValidityToken::SCOPE_RECORD_SAVE())->token;
28 30
  }
29 31

  
30 32
  $self->render(
SL/DB/ValidityToken.pm
11 11

  
12 12
__PACKAGE__->meta->initialize;
13 13

  
14
use constant SCOPE_RECORD_SAVE           => 'Record::Save';
14 15
use constant SCOPE_SALES_INVOICE_POST    => 'SalesInvoice::Post';
15 16
use constant SCOPE_PURCHASE_INVOICE_POST => 'PurchaseInvoice::Post';
16 17
use constant SCOPE_DELIVERY_ORDER_SAVE   => 'DeliveryOrder::Save';
17
use constant SCOPE_ORDER_SAVE            => 'Order::Save';
18 18
use constant SCOPE_RECLAMATION_SAVE      => 'Reclamation::Save';
19 19
use constant SCOPE_GL_TRANSACTION_POST   => 'GLTransaction::Post';
20 20

  

Auch abrufbar als: Unified diff