X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FIR.pm;h=45cd7de7d3f514205a281aebaade6f7571405928;hb=71fb51fb1cb66e6fefc6792fc6a25fed2a215f25;hp=f3f1fd0ca4ba5b065df0213bfa9e4dae4269d857;hpb=0a64ac3db8c430756ab6260399816714e44ec16d;p=kivitendo-erp.git diff --git a/SL/IR.pm b/SL/IR.pm index f3f1fd0ca..45cd7de7d 100644 --- a/SL/IR.pm +++ b/SL/IR.pm @@ -50,6 +50,7 @@ use SL::MoreCommon; use SL::DB::Default; use SL::DB::TaxZone; use SL::DB; +use SL::Presenter::Part qw(type_abbreviation classification_abbreviation); use List::Util qw(min); use strict; @@ -1309,8 +1310,8 @@ sub retrieve_item { if (($::form->{"partnumber_$i"} ne '') && ($ref->{ean} eq $::form->{"partnumber_$i"})) { push @{ $ref->{matches} ||= [] }, $::locale->text('EAN') . ': ' . $ref->{ean}; } - $ref->{type_and_classific} = $::request->presenter->type_abbreviation($ref->{part_type}). - $::request->presenter->classification_abbreviation($ref->{classification_id}); + $ref->{type_and_classific} = type_abbreviation($ref->{part_type}) . + classification_abbreviation($ref->{classification_id}); if (! $ref->{used_for_purchase} ) { $has_wrong_pclass = PCLASS_NOTFORPURCHASE; @@ -1447,6 +1448,13 @@ sub vendor_details { 'trans_id' => $form->{vendor_id}); map { $form->{"vc_cvar_$_->{name}"} = $_->{value} } @{ $custom_variables }; + if ($form->{cp_id}) { + $custom_variables = CVar->get_custom_variables(dbh => $dbh, + module => 'Contacts', + trans_id => $form->{cp_id}); + $form->{"cp_cvar_$_->{name}"} = $_->{value} for @{ $custom_variables }; + } + $form->{cp_greeting} = GenericTranslations->get('dbh' => $dbh, 'translation_type' => 'greetings::' . ($form->{cp_gender} eq 'f' ? 'female' : 'male'), 'allow_fallback' => 1);