From ed4b292c1489bbad1a6b3aa7d2f929fabff254bc Mon Sep 17 00:00:00 2001 From: Bernd Blessmann Date: Fri, 11 May 2012 15:48:48 +0200 Subject: [PATCH] CVars-Type vendor und part auch richtig parsen --- SL/CVar.pm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/SL/CVar.pm b/SL/CVar.pm index cb1cd658f..0a91c59f6 100644 --- a/SL/CVar.pm +++ b/SL/CVar.pm @@ -739,6 +739,8 @@ sub parse { return $::form->parse_amount(\%::myconfig, $value) if $config->{type} eq 'number'; return DateTime->from_lxoffice($value) if $config->{type} eq 'date'; return !ref $value ? SL::DB::Manager::Customer->find_by(id => $value * 1) : $value if $config->{type} eq 'customer'; + return !ref $value ? SL::DB::Manager::Vendor->find_by(id => $value * 1) : $value if $config->{type} eq 'vendor'; + return !ref $value ? SL::DB::Manager::Part->find_by(id => $value * 1) : $value if $config->{type} eq 'part'; return $value; } -- 2.20.1