From: Moritz Bunkus Date: Thu, 1 Mar 2007 08:17:56 +0000 (+0000) Subject: Dialogbuchen: Weitere Drop-Down-Boxen werden bei jedem Aufbau aus der Datenbank ausge... X-Git-Tag: release-2.4.3^2~643 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=3253777d478fe7f8b8d85ef867c864cdae16d7fa;p=kivitendo-erp.git Dialogbuchen: Weitere Drop-Down-Boxen werden bei jedem Aufbau aus der Datenbank ausgelesen und durch das CGI-Modul ausgegeben. --- diff --git a/SL/AR.pm b/SL/AR.pm index f828270df..17dbd6499 100644 --- a/SL/AR.pm +++ b/SL/AR.pm @@ -61,8 +61,8 @@ sub post_transaction { $form->{AR_amounts}{"amount_$i"} = (split(/--/, $form->{"AR_amount_$i"}))[0]; } - ($form->{AR_amounts}{receivables}) = split(/--/, $form->{ARselected}); - ($form->{AR}{receivables}) = split(/--/, $form->{ARselected}); + $form->{AR_amounts}{receivables} = $form->{ARselected}; + $form->{AR}{receivables} = $form->{ARselected}; $form->{exchangerate} = ($exchangerate) @@ -378,7 +378,7 @@ sub post_payment { $form->get_exchangerate($dbh, $form->{currency}, $form->{transdate}, "buy"); - my ($accno_ar) = split(/--/, $form->{ARselected}); + my $accno_ar = $form->{ARselected}; # record payments and offsetting AR for my $i (1 .. $form->{paidaccounts}) { diff --git a/SL/IS.pm b/SL/IS.pm index 6c3dae2c9..a7b09917c 100644 --- a/SL/IS.pm +++ b/SL/IS.pm @@ -1856,8 +1856,7 @@ sub get_customer { $form->{"AR_amount_$i"} = "$ref->{accno}--$ref->{description}"; } if ($ref->{category} eq 'A') { - $form->{ARselected} = $form->{AR_1} = - "$ref->{accno}--$ref->{description}"; + $form->{ARselected} = $form->{AR_1} = $ref->{accno}; } } $sth->finish; diff --git a/bin/mozilla/ar.pl b/bin/mozilla/ar.pl index 60349d6e8..da4315b2e 100644 --- a/bin/mozilla/ar.pl +++ b/bin/mozilla/ar.pl @@ -175,19 +175,6 @@ sub create_links { $form->{forex} = $form->{exchangerate}; $exchangerate = ($form->{exchangerate}) ? $form->{exchangerate} : 1; foreach $key (keys %{ $form->{AR_links} }) { - - foreach $ref (@{ $form->{AR_links}{$key} }) { - if ($key eq "AR_paid") { - $form->{"select$key"} .= - "\n"; - } else { - $form->{"select$key"} .= - "\n"; - } - } - - $form->{$key} = $form->{"select$key"}; - # if there is a value we have an old entry my $j = 0; my $k = 0; @@ -195,8 +182,7 @@ sub create_links { for $i (1 .. scalar @{ $form->{acc_trans}{$key} }) { if ($key eq "AR_paid") { $j++; - $form->{"AR_paid_$j"} = - "$form->{acc_trans}{$key}->[$i-1]->{accno}--$form->{acc_trans}{$key}->[$i-1]->{description}"; + $form->{"AR_paid_$j"} = $form->{acc_trans}{$key}->[$i-1]->{accno}; # reverse paid $form->{"paid_$j"} = $form->{acc_trans}{$key}->[$i - 1]->{amount} * -1; @@ -207,9 +193,9 @@ sub create_links { $form->{"forex_$j"} = $form->{"exchangerate_$i"} = $form->{acc_trans}{$key}->[$i - 1]->{exchangerate}; - $form->{"AR_paid_$j"} = "$form->{acc_trans}{$key}->[$i-1]->{accno}"; $form->{"paid_project_id_$j"} = $form->{acc_trans}{$key}->[$i - 1]->{project_id}; $form->{paidaccounts}++; + } else { $akey = $key; @@ -254,15 +240,15 @@ sub create_links { $form->{"project_id_$k"} = "$form->{acc_trans}{$key}->[$i-1]->{project_id}"; } - $form->{"${key}_$k"} = - "$form->{acc_trans}{$key}->[$i-1]->{accno}--$form->{acc_trans}{$key}->[$i-1]->{description}"; $form->{"${key}_$i"} = "$form->{acc_trans}{$key}->[$i-1]->{accno}--$form->{acc_trans}{$key}->[$i-1]->{description}"; - my $q_description = quotemeta($form->{acc_trans}{$key}->[$i-1]->{description}); - $form->{"select${key}"} =~ - /