X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Far.pl;h=2960001fc39f3b39ce86dd72b282ad97c6cb48a2;hb=cd812c6bfa13b827806e526d22327b6aee07bc8d;hp=fcd9e83c690d05b3b51b35ee604f016f437ee5a5;hpb=e42233910a57d39f3ccef150db1212f7ecb7fb30;p=kivitendo-erp.git diff --git a/bin/mozilla/ar.pl b/bin/mozilla/ar.pl index fcd9e83c6..2960001fc 100644 --- a/bin/mozilla/ar.pl +++ b/bin/mozilla/ar.pl @@ -522,21 +522,13 @@ sub update { for my $i (1 .. $form->{rowcount}) { $form->{"amount_$i"} = $form->parse_amount(\%myconfig, $form->{"amount_$i"}); - $form->{"tax_$i"} = $form->parse_amount(\%myconfig, $form->{"tax_$i"}); if ($form->{"amount_$i"}) { push @a, {}; my $j = $#a; my ($taxkey, $rate) = split(/--/, $form->{"taxchart_$i"}); - if ($taxkey > 1) { - if ($form->{taxincluded}) { - $form->{"tax_$i"} = $form->{"amount_$i"} / ($rate + 1) * $rate; - } else { - $form->{"tax_$i"} = $form->{"amount_$i"} * $rate; - } - } else { - $form->{"tax_$i"} = 0; - } - $form->{"tax_$i"} = $form->round_amount($form->{"tax_$i"}, 2); + + my $tmpnetamount; + ($tmpnetamount,$form->{"tax_$i"}) = $form->calculate_tax($form->{"amount_$i"},$rate,$form->{taxincluded},2); $totaltax += $form->{"tax_$i"}; map { $a[$j]->{$_} = $form->{"${_}_$i"} } @flds; @@ -965,6 +957,9 @@ sub ar_transactions { if ($form->{customer}) { push @options, $locale->text('Customer') . " : $form->{customer}"; } + if ($form->{cp_name}) { + push @options, $locale->text('Contact Person') . " : $form->{cp_name}"; + } if ($form->{department}) { my ($department) = split /--/, $form->{department}; push @options, $locale->text('Department') . " : $department"; @@ -1104,7 +1099,7 @@ sub storno { # saving the history if(!exists $form->{addition} && $form->{id} ne "") { - $form->{snumbers} = "ordnumber_$form->{ordnumber}"; + $form->{snumbers} = qq|invnumber_| . $form->{invnumber}; $form->{addition} = "STORNO"; $form->save_history; }