X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/7d026c7c58d00ec0f48beedf8a8c221738863772..cd98d068d97cb6a981d931898c5a230cd8efc0a2:/bin/mozilla/cp.pl diff --git a/bin/mozilla/cp.pl b/bin/mozilla/cp.pl index 1f061ad8e..885c88e62 100644 --- a/bin/mozilla/cp.pl +++ b/bin/mozilla/cp.pl @@ -36,6 +36,7 @@ use SL::IS; use SL::IR; use SL::AR; use SL::AP; +use Data::Dumper; use strict; #use warnings; @@ -71,13 +72,14 @@ sub payment { # für bugfix 1771 (doppelte Leerzeichen werden nicht 'gepostet') $form->{"select$form->{vc}"} = ""; + $form->{selectcustomer} .= "\n" if $form->{vc} eq "customer"; + if ($form->{"all_$form->{vc}"}) { # s.o. jb 12.10.2010 $form->{"$form->{vc}_id"} = $form->{"all_$form->{vc}"}->[0]->{id}; map { $form->{"select$form->{vc}"} .= "\n" } @{ $form->{"all_$form->{vc}"} }; } - CP->paymentaccounts(\%myconfig, \%$form); # Standard Konto für Umlaufvermögen @@ -135,6 +137,13 @@ sub form_header { if ($form->{ $form->{vc} } eq "") { map { $form->{"addr$_"} = "" } (1 .. 4); } + + # sometimes it happens that values in customer arrive without the signs '--' + # but in order to select the right option field we need values with '--' + if ($form->{vc} eq "customer"){ + my ($customername) = split /--/, $form->{ $form->{vc} }; + $form->{ $form->{vc} } = $customername . "--" . $form->{customer_id}; + } # bugfix 1771 # geändert von