From cc9fbc1ce20f72251a15dabc26465444450cb0cf Mon Sep 17 00:00:00 2001 From: Thomas Heck Date: Tue, 30 Jul 2013 16:33:50 +0200 Subject: [PATCH] =?utf8?q?Ansprechperson=20und=20Lieferadresse=20nach=20Sp?= =?utf8?q?eichern=20von=20Kunden=20wieder=C3=B6ffnen?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- SL/Controller/CustomerVendor.pm | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/SL/Controller/CustomerVendor.pm b/SL/Controller/CustomerVendor.pm index b64c121af..2fabe1433 100644 --- a/SL/Controller/CustomerVendor.pm +++ b/SL/Controller/CustomerVendor.pm @@ -146,7 +146,21 @@ sub action_save { $self->_save(); - $self->redirect_to(action => 'edit', id => $self->{cv}->id, db => $self->is_vendor() ? 'vendor' : 'customer'); + my @redirect_params = ( + action => 'edit', + id => $self->{cv}->id, + db => ($self->is_vendor() ? 'vendor' : 'customer'), + ); + + if ( $self->{contact}->cp_id ) { + push(@redirect_params, contact_id => $self->{contact}->cp_id); + } + + if ( $self->{shipto}->shipto_id ) { + push(@redirect_params, shipto_id => $self->{shipto}->shipto_id); + } + + $self->redirect_to(@redirect_params); } sub action_save_and_close { -- 2.20.1