X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fcp.pl;h=fb244b6309d418419196e813f2f83e9a71062050;hb=72de9676c87a4e842af49c4e474f4f1541029faa;hp=1f061ad8e6c44bad3a660e10471c9882fa0176bc;hpb=9b7c4fb29b4d7ce6714e90346a554a811f54b125;p=kivitendo-erp.git
diff --git a/bin/mozilla/cp.pl b/bin/mozilla/cp.pl
index 1f061ad8e..fb244b630 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,18 @@ 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" }
+ # hotfix for 2450. TODO remove legacy code and use L
+ 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 +109,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 +131,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