X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Farap.pl;h=75764a4348f44d71ae0f45b771a2c7663ae861af;hb=deb4d2dbb676d7d6f69dfe7815d6e0cb09bd4a44;hp=2544986805534a72d5709526c73b36ce3ff737ce;hpb=ce651068ffd6d20ef408dbc45d8a04a69a3dc3ed;p=kivitendo-erp.git diff --git a/bin/mozilla/arap.pl b/bin/mozilla/arap.pl index 254498680..75764a434 100644 --- a/bin/mozilla/arap.pl +++ b/bin/mozilla/arap.pl @@ -36,8 +36,8 @@ use strict; if (-f "bin/mozilla/custom_arap.pl") { eval { require "bin/mozilla/custom_arap.pl"; }; } -if (-f "bin/mozilla/$main::form->{login}_arap.pl") { - eval { require "bin/mozilla/$main::form->{login}_arap.pl"; }; +if (-f "bin/mozilla/$::myconfig{login}_arap.pl") { + eval { require "bin/mozilla/$::myconfig{login}_arap.pl"; }; } 1; @@ -61,7 +61,7 @@ sub check_name { $name = $name eq "customer" ? "customer" : "vendor"; - my ($new_name, $new_id) = split /--/, $form->{$name}; + my ($new_name,$new_id) = $form->{$name} =~ /^(.*?)--(\d+)$/; my $i = 0; # if we use a selection if ($form->{"select$name"}) { @@ -77,6 +77,8 @@ sub check_name { $form->{"${name}_id"} = $new_id; _reset_salesman_id(); + delete @{ $form }{qw(payment_id)}; + IS->get_customer(\%myconfig, \%$form) if ($name eq 'customer'); IR->get_vendor(\%myconfig, \%$form) if ($name eq 'vendor'); @@ -119,6 +121,8 @@ sub check_name { $form->{"old$name"} = qq|$form->{$name}--$form->{"${name}_id"}|; _reset_salesman_id(); + delete @{ $form }{qw(payment_id)}; + IS->get_customer(\%myconfig, \%$form) if ($name eq 'customer'); IR->get_vendor(\%myconfig, \%$form) if ($name eq 'vendor'); @@ -169,13 +173,11 @@ sub select_name { my $title = $locale->text('Select from one of the names below'); print qq| +

$title

+
{script}> - - - -
$title