X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/kivitendo-erp.git/blobdiff_plain/7bc8df16096d7507322b4505f40e092e9a3f908c..e09347c89ca119213c4d8ba43083653cda793399:/SL/IS.pm diff --git a/SL/IS.pm b/SL/IS.pm index f1cddcd83..f1c95e957 100644 --- a/SL/IS.pm +++ b/SL/IS.pm @@ -44,6 +44,7 @@ use SL::CVar; use SL::Common; use SL::DBUtils; use SL::DO; +use SL::GenericTranslations; use SL::MoreCommon; use SL::IC; use Data::Dumper; @@ -423,6 +424,8 @@ sub customer_details { # connect to database my $dbh = $form->dbconnect($myconfig); + my $language_id = $form->{language_id}; + # get contact id, set it if nessessary $form->{cp_id} *= 1; @@ -484,6 +487,12 @@ sub customer_details { 'trans_id' => $form->{customer_id}); map { $form->{"vc_cvar_$_->{name}"} = $_->{value} } @{ $custom_variables }; + $form->{cp_greeting} = GenericTranslations->get('dbh' => $dbh, + 'translation_type' => 'greetings::' . ($form->{cp_gender} eq 'f' ? 'female' : 'male'), + 'language_id' => $language_id, + 'allow_fallback' => 1); + + $dbh->disconnect; $main::lxdebug->leave_sub();