Revision d255a1f6
Von Sven Schöling vor etwa 7 Jahren hinzugefügt
SL/CVar.pm | ||
---|---|---|
183 | 183 |
$cvar->{value} = $form->format_amount($myconfig, $cvar->{value} * 1, $cvar->{precision}); |
184 | 184 |
} elsif ($cvar->{type} eq 'customer') { |
185 | 185 |
require SL::DB::Customer; |
186 |
$cvar->{value} = SL::DB::Manager::Customer->find_by(id => $cvar->{value} * 1);
|
|
186 |
$cvar->{value} = $cvar->{value} * 1 ? SL::DB::Customer->load_cached($cvar->{value} * 1) : undef;
|
|
187 | 187 |
} elsif ($cvar->{type} eq 'vendor') { |
188 | 188 |
require SL::DB::Vendor; |
189 |
$cvar->{value} = SL::DB::Manager::Vendor->find_by(id => $cvar->{value} * 1);
|
|
189 |
$cvar->{value} = $cvar->{value} * 1 ? SL::DB::Vendor->load_cached($cvar->{value} * 1) : undef;
|
|
190 | 190 |
} elsif ($cvar->{type} eq 'part') { |
191 | 191 |
require SL::DB::Part; |
192 |
$cvar->{value} = SL::DB::Manager::Part->find_by(id => $cvar->{value} * 1);
|
|
192 |
$cvar->{value} = $cvar->{value} * 1 ? SL::DB::Part->load_cached($cvar->{value} * 1) : undef;
|
|
193 | 193 |
} |
194 | 194 |
} |
195 | 195 |
|
Auch abrufbar als: Unified diff
CVar: Für Objekt-Cvars auch hier load_cached benutzen