X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/6ff01fdb61880344c2826c86955ef4c1e8f47db4..e09347c89ca119213c4d8ba43083653cda793399:/SL/IR.pm diff --git a/SL/IR.pm b/SL/IR.pm index e36b7f398..02b2fa680 100644 --- a/SL/IR.pm +++ b/SL/IR.pm @@ -39,6 +39,7 @@ use SL::ARAP; use SL::Common; use SL::DBUtils; use SL::DO; +use SL::GenericTranslations; use SL::MoreCommon; use List::Util qw(min); @@ -855,7 +856,8 @@ sub get_vendor { : "current_date"; # get vendor - @values = (); + my @values = (); + my $where = ''; if ($vid) { $where .= 'AND v.id = ?'; push @values, $vid; @@ -866,7 +868,7 @@ sub get_vendor { } my $query = qq|SELECT - v.id AS vendor_id, v.name AS vendor, v.discount as vendor_discount, + v.id AS vendor_id, v.name AS vendor, v.discount as vendor_discount, v.creditlimit, v.terms, v.notes AS intnotes, v.email, v.cc, v.bcc, v.language_id, v.payment_id, v.street, v.zipcode, v.city, v.country, v.taxzone_id, @@ -976,7 +978,7 @@ sub retrieve_item { $where .= qq| OR (NOT p.obsolete = '1' AND p.ean = ? )|; push @values, $form->{"partnumber_$i"}; } - + if ($form->{"description_$i"}) { $where .= " ORDER BY p.description"; } else { @@ -1146,6 +1148,10 @@ sub vendor_details { 'trans_id' => $form->{vendor_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'), + 'allow_fallback' => 1); + $dbh->disconnect(); $main::lxdebug->leave_sub();