X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FOE.pm;h=72c11ed3249d38f7e14d9490d98c4d81889337d2;hb=e411fd61f5174cd315a083226bb5e2e071a2caf4;hp=f9d5daba21efbdd982d9aa13d5a44b72f4fb655d;hpb=83914eeb2e95cdf587565952eef54be59dd58693;p=kivitendo-erp.git diff --git a/SL/OE.pm b/SL/OE.pm index f9d5daba2..72c11ed32 100644 --- a/SL/OE.pm +++ b/SL/OE.pm @@ -415,11 +415,11 @@ sub save { $exchangerate = $form->check_exchangerate($myconfig, $form->{currency}, $form->{transdate}, ($form->{vc} eq 'customer') ? 'buy' : 'sell'); } - $form->{exchangerate} = ($exchangerate) ? $exchangerate : $form->parse_amount($myconfig, $form->{exchangerate}); + $form->{exchangerate} = $exchangerate || $form->parse_amount($myconfig, $form->{exchangerate}); my $quotation = $form->{type} =~ /_order$/ ? 'f' : 't'; - ($null, $form->{department_id}) = split(/--/, $form->{department}); + ($null, $form->{department_id}) = split(/--/, $form->{department}) if $form->{department}; # save OE record $query = @@ -620,7 +620,7 @@ sub retrieve { my $ref = selectfirst_hashref_query($form, $dbh, $query); map { $form->{$_} = $ref->{$_} } keys %$ref; - ($form->{currency}) = split(/:/, $form->{currencies}); + ($form->{currency}) = split(/:/, $form->{currencies}) unless ($form->{currency}); # set reqdate if this is an invoice->order conversion. If someone knows a better check to ensure # we come from invoices, feel free.