Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 77548c6f

Von Thomas Heck vor mehr als 11 Jahren hinzugefügt

  • ID 77548c6f250eae38d8f1a2721b5b6cdaf7b4dea9
  • Vorgänger 1eed893e
  • Nachfolger 40b2e1e7

CustomerVendor: Kaskadiertes Löschen/Speichern

Unterschiede anzeigen:

SL/Controller/CustomerVendor.pm
253 253
  else {
254 254

  
255 255
    $db->do_transaction(sub {
256
      $self->{cv}->delete();
256
      $self->{cv}->delete(cascade => 1);
257 257

  
258 258
      my $snumbers = $self->is_vendor() ? 'vendornumber_'. $self->{cv}->vendornumber : 'customernumber_'. $self->{cv}->customernumber;
259 259
      SL::DB::History->new(
......
286 286
        $self->{contact}->save();
287 287
        SL::Helper::Flash::flash('info', $::locale->text('Contact is in use and was flagged invalid.'));
288 288
      } else {
289
        $self->{contact}->delete();
289
        $self->{contact}->delete(cascade => 1);
290 290
        SL::Helper::Flash::flash('info', $::locale->text('Contact deleted.'));
291 291
      }
292 292
    }) || die($db->error);
......
309 309
    $db->do_transaction(sub {
310 310
      if ( $self->{shipto}->used ) {
311 311
        $self->{shipto}->detach();
312
        $self->{shipto}->save();
312
        $self->{shipto}->save(cascade => 1);
313 313
        SL::Helper::Flash::flash('info', $::locale->text('Shipto is in use and was flagged invalid.'));
314 314
      } else {
315
        $self->{shipto}->delete();
315
        $self->{shipto}->delete(cascade => 1);
316 316
        SL::Helper::Flash::flash('info', $::locale->text('Shipto deleted.'));
317 317
      }
318 318
    }) || die($db->error);

Auch abrufbar als: Unified diff