]> wagnertech.de Git - kivitendo-erp.git/blobdiff - SL/OE.pm
Via SMTP Zeilen normalisiert verschicken
[kivitendo-erp.git] / SL / OE.pm
index cfe5e25b152ece29ce12c3a45c33b722e240f172..07758a84d18bfb74d20ab7e1133d092991038fb7 100644 (file)
--- a/SL/OE.pm
+++ b/SL/OE.pm
@@ -190,7 +190,7 @@ SQL
   }
 
   if ($form->{periodic_invoices_active} ne $form->{periodic_invoices_inactive}) {
-    my $not  = 'NOT' if ($form->{periodic_invoices_inactive});
+    my $not  = $form->{periodic_invoices_inactive} ? 'NOT' : '';
     $query  .= qq| AND ${not} COALESCE(pcfg.active, 'f')|;
   }
 
@@ -725,9 +725,6 @@ sub retrieve {
 
   my ($query, $query_add, @values, @ids, $sth);
 
-  my $ic_cvar_configs = CVar->get_configs(module => 'IC',
-                                          dbh    => $dbh);
-
   # translate the ids (given by id_# and trans_id_#) into one array of ids, so we can join them later
   map {
     push @ids, $form->{"trans_id_$_"}
@@ -806,6 +803,9 @@ sub retrieve {
     if ($ref) {
       map { $form->{$_} = $ref->{$_} } keys %$ref;
 
+      # remove any trailing whitespace
+      $form->{currency} =~ s/\s*$//;
+
       $form->{saved_xyznumber} = $form->{$form->{type} =~ /_quotation$/ ? "quonumber" : "ordnumber"};
 
       # set all entries for multiple ids blank that yield different information