X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/kivitendo-erp.git/blobdiff_plain/fb84ef1587044f423b948c60f66fd08b5d4e12a6..ae278b58747710a8c843a6bee9375186eafa17f7:/SL/Controller/CustomVariableConfig.pm diff --git a/SL/Controller/CustomVariableConfig.pm b/SL/Controller/CustomVariableConfig.pm index 456fe7176..1b780e5fc 100644 --- a/SL/Controller/CustomVariableConfig.pm +++ b/SL/Controller/CustomVariableConfig.pm @@ -164,6 +164,7 @@ sub init_modules { { module => 'IC', description => t8('Parts, services and assemblies') }, { module => 'Projects', description => t8('Projects') }, { module => 'RequirementSpecs', description => t8('Requirement Specs') }, + { module => 'ShipTo', description => t8('Shipping Address') }, )]; } @@ -196,13 +197,13 @@ sub create_or_update { return; } - my $dbh = $self->config->db; - $dbh->begin_work; + SL::DB->client->with_transaction(sub { + my $dbh = SL::DB->client->dbh; - $self->config->save; - $self->_set_cvar_validity() if $is_new; - - $dbh->commit; + $self->config->save; + $self->_set_cvar_validity() if $is_new; + 1; + }) or do { die SL::DB->client->error }; flash_later('info', $is_new ? t8('The custom variable has been created.') : t8('The custom variable has been saved.')); $self->redirect_to(action => 'list', module => $self->module);