X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fcp.pl;h=7daa8883a88fbc4c30d3c18c5c64009db749551e;hb=d139dd31791627953f82749d02702bcb8308ebea;hp=1f061ad8e6c44bad3a660e10471c9882fa0176bc;hpb=6c27e6e48268d1a70e581d75f97446007bbedc68;p=kivitendo-erp.git diff --git a/bin/mozilla/cp.pl b/bin/mozilla/cp.pl index 1f061ad8e..7daa8883a 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; @@ -72,17 +73,17 @@ sub payment { $form->{"select$form->{vc}"} = ""; if ($form->{"all_$form->{vc}"}) { + $form->{"select$form->{vc}"} .= "\n"; # 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. @@ -107,12 +108,11 @@ sub payment { # geben und hier reinparsen, oder besser multibox oder html auslagern? # Antwort: form->currency wird mit oldcurrency oder curr[0] überschrieben # Wofür macht das Sinn? - @curr = split(/:/, $form->{currencies}); - chomp $curr[0]; + @curr = $form->get_all_currencies(); $form->{defaultcurrency} = $form->{currency} = $form->{oldcurrency} = - $curr[0]; + $form->get_default_currency(\%myconfig); - # 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 +130,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" && $form->{"all_$form->{vc}"}){ + my ($customername) = split /--/, $form->{ $form->{vc} }; + $form->{ $form->{vc} } = $customername . "--" . $form->{customer_id}; + } # bugfix 1771 # geändert von