Revision f0dfaf1d
Von Jan Büren vor fast 2 Jahren hinzugefügt
SL/Form.pm | ||
---|---|---|
2623 | 2623 |
$ref = selectfirst_hashref_query($self, $dbh, $query); |
2624 | 2624 |
map { $self->{$_} = $ref->{$_} } keys %$ref; |
2625 | 2625 |
|
2626 |
if ($self->{"$self->{vc}_id"}) { |
|
2627 |
|
|
2628 |
# only setup currency |
|
2629 |
($self->{currency}) = $self->{defaultcurrency} if !$self->{currency}; |
|
2630 |
|
|
2631 |
} else { |
|
2632 |
|
|
2633 |
$self->lastname_used($dbh, $myconfig, $table, $module); |
|
2634 |
|
|
2635 |
# get exchangerate for currency |
|
2636 |
$self->{exchangerate} = |
|
2637 |
$self->check_exchangerate($myconfig, $self->{currency}, $self->{transdate}, $fld); |
|
2638 |
|
|
2639 |
} |
|
2640 |
|
|
2626 |
# failsafe, set currency if caller has not yet assigned one |
|
2627 |
$self->lastname_used($dbh, $myconfig, $table, $module) unless ($self->{"$self->{vc}_id"}); |
|
2628 |
$self->{currency} = $self->{defaultcurrency} unless $self->{currency}; |
|
2629 |
$self->{exchangerate} = |
|
2630 |
$self->check_exchangerate($myconfig, $self->{currency}, $self->{transdate}, $fld); |
|
2641 | 2631 |
} |
2642 | 2632 |
|
2643 | 2633 |
$main::lxdebug->leave_sub(); |
Auch abrufbar als: Unified diff
zu #555 Form::check_exchangerate was an 'undef'
Falls noch keine Kunden oder Lieferanten angelegt worden sind,
wird auch keine Standardwährung gesetzt. create_links etwas lesbarer
verbessert