X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fap.pl;h=24f5f245daa63a438e719da982187f286f89e19c;hb=f83ca50608bd8cb2af24bef702c4d0fd9fea9324;hp=30453f61983ef3ee329e2cf36f4058f7fa17acb4;hpb=f48493d4cf21cf968c7b72358a60e0f4fc8d2e97;p=kivitendo-erp.git diff --git a/bin/mozilla/ap.pl b/bin/mozilla/ap.pl index 30453f619..24f5f245d 100644 --- a/bin/mozilla/ap.pl +++ b/bin/mozilla/ap.pl @@ -298,12 +298,13 @@ selectvendor } | map({ push(@old_project_ids, $form->{"project_id_$_"}) if ($form->{"project_id_$_"}); } (1..$form->{"rowcount"})); - $form->get_lists("projects" => { "key" => "ALL_PROJECTS", - "all" => 0, - "old_id" => \@old_project_ids }, - "charts" => { "key" => "ALL_CHARTS", - "transdate" => $form->{transdate} }, - "taxcharts" => "ALL_TAXCHARTS"); + $form->get_lists("projects" => { "key" => "ALL_PROJECTS", + "all" => 0, + "old_id" => \@old_project_ids }, + "charts" => { "key" => "ALL_CHARTS", + "transdate" => $form->{transdate} }, + "taxcharts" => { "key" => "ALL_TAXCHARTS", + "module" => "AP" },); map({ $_->{link_split} = [ split(/:/, $_->{link}) ]; } @{ $form->{ALL_CHARTS} }); @@ -498,8 +499,6 @@ $jsscript . $locale->text('Amount') . qq| | . $locale->text('Tax') . qq| - | - . $locale->text('Korrektur') . qq| | . $locale->text('Taxkey') . qq| | @@ -555,8 +554,6 @@ $jsscript '-default' => $selected_taxchart)) . qq||; - my $korrektur = $form->{"korrektur_$i"} ? 'checked' : ''; - my $projectnumber = NTI($cgi->popup_menu('-name' => "project_id_$i", '-values' => \@project_values, @@ -567,8 +564,7 @@ $jsscript $selectAP_amount {"amount_$i"}> - {"tax_$i"}> - + $form->{"tax_$i"} $tax $projectnumber @@ -869,17 +865,15 @@ sub update { if ($form->{"amount_$i"}) { push @a, {}; $j = $#a; - if (!$form->{"korrektur_$i"}) { - ($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; - } + ($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"} = 0; + $form->{"tax_$i"} = $form->{"amount_$i"} * $rate; } + } else { + $form->{"tax_$i"} = 0; } $form->{"tax_$i"} = $form->round_amount($form->{"tax_$i"}, 2);