]> wagnertech.de Git - mfinanz.git/blobdiff - SL/OE.pm
Nur dann rowcount von form_details ableiten, wenn ein bestehender Vorgang aus der...
[mfinanz.git] / SL / OE.pm
index f9d5daba21efbdd982d9aa13d5a44b72f4fb655d..2e0ac4212a40773e6b379291ca24b19db5437393 100644 (file)
--- 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 =