X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fcp.pl;h=a8caa526b1f1d3eda12614bd57f9f2b94a730197;hb=e97c628d0f75459a88926c33e4b370aa98c6b680;hp=1f061ad8e6c44bad3a660e10471c9882fa0176bc;hpb=9b7c4fb29b4d7ce6714e90346a554a811f54b125;p=kivitendo-erp.git
diff --git a/bin/mozilla/cp.pl b/bin/mozilla/cp.pl
index 1f061ad8e..a8caa526b 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