X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=sidebyside;f=bin%2Fmozilla%2Fcp.pl;h=7daa8883a88fbc4c30d3c18c5c64009db749551e;hb=eb07c9dd23c32937527813cd0dea27a8ffe5603e;hp=1f061ad8e6c44bad3a660e10471c9882fa0176bc;hpb=9b7c4fb29b4d7ce6714e90346a554a811f54b125;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