X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Far.pl;h=5b3e3b2a1fdb76537b3f8c6eeb011e99ca568ed0;hb=82ab26a0d201bf24aba85e058e1cb23928a4b44a;hp=1e5aa98f26379b2dfee3846d90f97ad23c5cd842;hpb=590f737f0418ac7672e22efdf424265bf970f2c7;p=kivitendo-erp.git diff --git a/bin/mozilla/ar.pl b/bin/mozilla/ar.pl index 1e5aa98f2..5b3e3b2a1 100644 --- a/bin/mozilla/ar.pl +++ b/bin/mozilla/ar.pl @@ -38,6 +38,7 @@ use Data::Dumper; require "$form->{path}/arap.pl"; require "bin/mozilla/common.pl"; +require "bin/mozilla/drafts.pl"; 1; @@ -73,7 +74,9 @@ require "bin/mozilla/common.pl"; sub add { $lxdebug->enter_sub(); - + + return $lxdebug->leave_sub() if (load_draft_maybe()); + # saving the history if(!exists $form->{addition} && ($form->{id} ne "")) { $form->{addition} = "ADDED"; @@ -168,31 +171,10 @@ sub create_links { # build the popup menus $form->{taxincluded} = ($form->{id}) ? $form->{taxincluded} : "checked"; - map { - $tax .= - qq|\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; @@ -200,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; @@ -212,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; @@ -259,25 +240,25 @@ 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}"} =~ - /