X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/d0a22ba8bf8e2016ab378a27dd149fdd97ecc057..04caff2d7309da75f53424675795addff173f32c:/SL/Controller/CustomerVendor.pm?ds=inline diff --git a/SL/Controller/CustomerVendor.pm b/SL/Controller/CustomerVendor.pm index 7685e8b5a..b5c2151fb 100644 --- a/SL/Controller/CustomerVendor.pm +++ b/SL/Controller/CustomerVendor.pm @@ -145,7 +145,7 @@ sub _save { title => ($self->is_vendor() ? t8('Edit Vendor') : t8('Edit Customer')), %{$self->{template_args}} ); - ::end_of_request(); + $::dispatcher->end_request; } my $db = $self->{cv}->db; @@ -198,7 +198,7 @@ sub _save { $self->{shipto}->trans_id($self->{cv}->id); if( $self->{shipto}->shiptoname ne '' ) { - $self->{shipto}->save(); + $self->{shipto}->save(cascade => 1); } my $snumbers = $self->is_vendor() ? 'vendornumber_'. $self->{cv}->vendornumber : 'customernumber_'. $self->{cv}->customernumber; @@ -529,7 +529,8 @@ sub action_get_delivery { sub action_ajaj_get_shipto { my ($self) = @_; - my $data = { + my $data = {}; + $data->{shipto} = { map( { my $name = 'shipto'. $_; @@ -539,6 +540,8 @@ sub action_ajaj_get_shipto { ) }; + $data->{shipto_cvars} = $self->_prepare_cvar_configs_for_ajaj($self->{shipto}->cvars_by_config); + $self->render(\SL::JSON::to_json($data), { type => 'json', process => 0 }); } @@ -755,6 +758,7 @@ sub _instantiate_args { $self->_copy_form_to_cvars(target => $self->{cv}, source => $::form->{cv_cvars}); $self->_copy_form_to_cvars(target => $self->{contact}, source => $::form->{contact_cvars}); + $self->_copy_form_to_cvars(target => $self->{shipto}, source => $::form->{shipto_cvars}); } sub _load_customer_vendor {