X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Far.pl;h=b8aa128a9c1c8e55c9d34e25847e3bd971394bea;hb=d4c9b68ec69a5a04d8e185800718c665151b2bbc;hp=efd4c32452df41cd0662297669f333806b8051a0;hpb=2654e8ee56337d0e140dcf8bfb314ecf1ae655b0;p=kivitendo-erp.git diff --git a/bin/mozilla/ar.pl b/bin/mozilla/ar.pl index efd4c3245..b8aa128a9 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); @@ -1626,6 +1620,41 @@ sub ar_transactions { $lxdebug->leave_sub(); } +sub sales_invoice { + $lxdebug->enter_sub(); + + $auth->assert('invoice_edit'); + + + $form->{script} = 'is.pl'; + $script = "is"; + $form->{type} = "invoice"; + $locale = new Locale "$myconfig{countrycode}", "$script"; + + require "bin/mozilla/$form->{script}"; + &add; + + $lxdebug->leave_sub(); +} + +sub ar_transaction { + $lxdebug->enter_sub(); + + $auth->assert('general_ledger'); + + + $form->{script} = 'ar.pl'; + $script = "ar"; + $locale = new Locale "$myconfig{countrycode}", "$script"; + + require "bin/mozilla/$form->{script}"; + &add; + + $lxdebug->leave_sub(); +} + + + sub storno { $lxdebug->enter_sub();