X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FIS.pm;h=f1c95e9577504a6b218016998563400c226ac8e8;hb=e09347c89ca119213c4d8ba43083653cda793399;hp=f1cddcd83b76ed830d8913a8108b92cd0ff6217d;hpb=7bc8df16096d7507322b4505f40e092e9a3f908c;p=kivitendo-erp.git 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();