]> wagnertech.de Git - kivitendo-erp.git/commitdiff
Merge branch 'master' of vc.linet-services.de:public/lx-office-erp
authorSven Schöling <s.schoeling@linet-services.de>
Wed, 12 Oct 2011 15:01:16 +0000 (17:01 +0200)
committerSven Schöling <s.schoeling@linet-services.de>
Wed, 12 Oct 2011 15:01:16 +0000 (17:01 +0200)
1  2 
SL/IS.pm
SL/OE.pm

diff --combined SL/IS.pm
index bd385ef7d2354606e25eb80f992f4331545fbef3,d90a0d0dbffd2e669e570c5e7bd499bb8179d774..c9a44281d84f0aa95e511e6e108b7078017f9297
+++ b/SL/IS.pm
@@@ -353,9 -353,7 +353,9 @@@ sub invoice_details 
          $sth->finish;
        }
  
 -      map { push @{ $form->{TEMPLATE_ARRAYS}->{"ic_cvar_$_->{name}"} }, $form->{"ic_cvar_$_->{name}_$i"} } @{ $ic_cvar_configs };
 +      push @{ $form->{TEMPLATE_ARRAYS}->{"ic_cvar_$_->{name}"} },
 +        CVar->format_to_template(CVar->parse($form->{"ic_cvar_$_->{name}_$i"}, $_), $_)
 +          for @{ $ic_cvar_configs };
      }
    }
  
@@@ -879,7 -877,7 +879,7 @@@ sub post_invoice 
    # record payments and offsetting AR
    if (!$form->{storno}) {
      for my $i (1 .. $form->{paidaccounts}) {
 -      
 +
        if ($form->{"acc_trans_id_$i"}
            && $payments_only
            && ($::lx_office_conf{features}->{payments_changeable} == 0)) {
@@@ -1480,6 -1478,8 +1480,8 @@@ sub retrieve_invoice 
      $ref = selectfirst_hashref_query($form, $dbh, $query, $id);
      map { $form->{$_} = $ref->{$_} } keys %{ $ref };
  
+     # remove any trailing whitespace
+     $form->{currency} =~ s/\s*$//;
  
      $form->{exchangerate} = $form->get_exchangerate($dbh, $form->{currency}, $form->{invdate}, "buy");
  
diff --combined SL/OE.pm
index cfe5e25b152ece29ce12c3a45c33b722e240f172,5bf2a3da969c5e318eb6f1f6b1571df3b5607c89..bfa43f23536a7d522eb2baede844a2c23c65d4f4
+++ b/SL/OE.pm
@@@ -806,6 -806,9 +806,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
@@@ -1293,9 -1296,7 +1296,9 @@@ sub order_details 
          $sth->finish;
        }
  
 -      map { push @{ $form->{TEMPLATE_ARRAYS}->{"ic_cvar_$_->{name}"} }, $form->{"ic_cvar_$_->{name}_$i"} } @{ $ic_cvar_configs };
 +      push @{ $form->{TEMPLATE_ARRAYS}->{"ic_cvar_$_->{name}"} },
 +        CVar->format_to_template(CVar->parse($form->{"ic_cvar_$_->{name}_$i"}, $_), $_)
 +          for @{ $ic_cvar_configs };
      }
    }