From cf3e99d4dacedca496a178f1db716bb1dfa9e035 Mon Sep 17 00:00:00 2001 From: Thomas Heck Date: Mon, 8 Jul 2013 13:51:24 +0200 Subject: [PATCH] =?utf8?q?CustomerVendor:=20Kaskadiertes=20L=C3=B6schen/Sp?= =?utf8?q?eichern?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- SL/Controller/CustomerVendor.pm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/SL/Controller/CustomerVendor.pm b/SL/Controller/CustomerVendor.pm index 2d4bd6cee..847dc71df 100644 --- a/SL/Controller/CustomerVendor.pm +++ b/SL/Controller/CustomerVendor.pm @@ -253,7 +253,7 @@ sub action_delete { else { $db->do_transaction(sub { - $self->{cv}->delete(); + $self->{cv}->delete(cascade => 1); my $snumbers = $self->is_vendor() ? 'vendornumber_'. $self->{cv}->vendornumber : 'customernumber_'. $self->{cv}->customernumber; SL::DB::History->new( @@ -286,7 +286,7 @@ sub action_delete_contact { $self->{contact}->save(); SL::Helper::Flash::flash('info', $::locale->text('Contact is in use and was flagged invalid.')); } else { - $self->{contact}->delete(); + $self->{contact}->delete(cascade => 1); SL::Helper::Flash::flash('info', $::locale->text('Contact deleted.')); } }) || die($db->error); @@ -309,10 +309,10 @@ sub action_delete_shipto { $db->do_transaction(sub { if ( $self->{shipto}->used ) { $self->{shipto}->detach(); - $self->{shipto}->save(); + $self->{shipto}->save(cascade => 1); SL::Helper::Flash::flash('info', $::locale->text('Shipto is in use and was flagged invalid.')); } else { - $self->{shipto}->delete(); + $self->{shipto}->delete(cascade => 1); SL::Helper::Flash::flash('info', $::locale->text('Shipto deleted.')); } }) || die($db->error); -- 2.20.1