X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fcp.pl;h=a70c32eebdcd2b2a74882e0053f4d0bec1567c57;hb=6e08e45474de9b64b0cdd310e0e93d8a998587e8;hp=1f061ad8e6c44bad3a660e10471c9882fa0176bc;hpb=5c5d0641f55504c2e9ed860633caba14d313981d;p=kivitendo-erp.git diff --git a/bin/mozilla/cp.pl b/bin/mozilla/cp.pl index 1f061ad8e..a70c32eeb 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,18 +72,19 @@ 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 my $accno_arap = IS->get_standard_accno_current_assets(\%myconfig, \%$form); - # Entsprechend präventiv die Auswahlliste für Kontonummer + # Entsprechend präventiv die Auswahlliste für Kontonummer # auch mit value= zusammenbauen (s.a. oben bugfix 1771) # Wichtig: Auch das Template anpassen, damit hidden input korrekt die " # escaped. @@ -112,7 +114,7 @@ sub payment { $form->{defaultcurrency} = $form->{currency} = $form->{oldcurrency} = $curr[0]; - # Entsprechend präventiv die Auswahlliste für Währungen + # Entsprechend präventiv die Auswahlliste für Währungen # auch mit value= zusammenbauen (s.a. oben bugfix 1771) $form->{selectcurrency} = ""; map { $form->{selectcurrency} .= "\n" } @curr; @@ -130,11 +132,17 @@ sub form_header { $auth->assert('cash'); my ($vc, $arap, $exchangerate); - my ($onload); 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