$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';
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.