From: Thomas Heck Date: Tue, 30 Jul 2013 14:33:50 +0000 (+0200) Subject: Ansprechperson und Lieferadresse nach Speichern von Kunden wiederöffnen X-Git-Tag: release-3.1.0beta1~122 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=cc9fbc1ce20f72251a15dabc26465444450cb0cf;p=kivitendo-erp.git Ansprechperson und Lieferadresse nach Speichern von Kunden wiederöffnen --- 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 {