X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=sidebyside;f=bin%2Fmozilla%2Far.pl;h=caf48362feb16f359d1d0fd09cedf9018b13472e;hb=21e3b9697fa7e9481b79d0f16ef8cc5d0892f299;hp=0eeafff9579c0d23c1e2aba68b3d28f1186ad4cf;hpb=64c4e3c6b99559d33a9e7c29799f001bb64a58d7;p=kivitendo-erp.git
diff --git a/bin/mozilla/ar.pl b/bin/mozilla/ar.pl
index 0eeafff95..caf48362f 100644
--- a/bin/mozilla/ar.pl
+++ b/bin/mozilla/ar.pl
@@ -214,7 +214,7 @@ sub form_header {
my ($title, $readonly, $exchangerate, $rows);
my ($taxincluded, $notes, $department, $customer, $employee, $amount, $project);
my ($jsscript, $button1, $button2, $onload);
- my ($selectAR_amount, $selectAR_paid, $korrektur_checked, $ARselected, $tax);
+ my ($selectAR_amount, $selectAR_paid, $ARselected, $tax);
my (@column_index, %column_data);
@@ -340,12 +340,13 @@ sub form_header {
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" => "AR" },);
map({ $_->{link_split} = [ split(/:/, $_->{link}) ]; }
@{ $form->{ALL_CHARTS} });
@@ -544,8 +545,6 @@ $jsscript
|
. $locale->text('Tax') . qq| |
|
- . $locale->text('Korrektur') . qq| |
- |
. $locale->text('Taxkey') . qq| |
|
. $locale->text('Project') . qq| |
@@ -600,8 +599,6 @@ $jsscript
'-default' => $selected_taxchart))
. qq||;
- $korrektur_checked = ($form->{"korrektur_$i"} ? 'checked' : '');
-
my $projectnumber =
NTI($cgi->popup_menu('-name' => "project_id_$i",
'-values' => \@project_values,
@@ -612,8 +609,7 @@ $jsscript
$selectAR_amount |
{"amount_$i"}> |
- {"tax_$i"}> |
- |
+ $form->{"tax_$i"} |
$tax
$projectnumber |
@@ -932,17 +928,15 @@ sub update {
if ($form->{"amount_$i"}) {
push @a, {};
my $j = $#a;
- if (!$form->{"korrektur_$i"}) {
- 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;
- }
+ 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"} = 0;
+ $form->{"tax_$i"} = $form->{"amount_$i"} * $rate;
}
+ } else {
+ $form->{"tax_$i"} = 0;
}
$form->{"tax_$i"} = $form->round_amount($form->{"tax_$i"}, 2);
@@ -1583,8 +1577,8 @@ sub ar_transactions {
map { $ar->{$_} = $form->format_amount(\%myconfig, $ar->{$_}, 2) } qw(netamount tax amount paid due marge_total marge_percent);
- my $is_storno = $ar->{storno} && !$ar->{storno_id};
- my $has_storno = $ar->{storno} && $ar->{storno_id};
+ my $is_storno = $ar->{storno} && $ar->{storno_id};
+ my $has_storno = $ar->{storno} && !$ar->{storno_id};
$ar->{type} =
$has_storno ? $locale->text("Invoice with Storno (abbreviation)") :