X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=sidebyside;f=bin%2Fmozilla%2Fap.pl;h=bf54841661c352fa669caef54072ad9c1d898d53;hb=d4c9b68ec69a5a04d8e185800718c665151b2bbc;hp=30453f61983ef3ee329e2cf36f4058f7fa17acb4;hpb=f48493d4cf21cf968c7b72358a60e0f4fc8d2e97;p=kivitendo-erp.git
diff --git a/bin/mozilla/ap.pl b/bin/mozilla/ap.pl
index 30453f619..bf5484166 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);
@@ -1541,6 +1535,40 @@ sub ap_transactions {
$lxdebug->leave_sub();
}
+
+sub vendor_invoice {
+ $lxdebug->enter_sub();
+
+ $auth->assert('invoice_edit');
+
+
+ $form->{script} = 'ir.pl';
+ $script = "ir";
+ $form->{type} = "invoice";
+ $locale = new Locale "$myconfig{countrycode}", "$script";
+
+ require "bin/mozilla/$form->{script}";
+ &add;
+
+ $lxdebug->leave_sub();
+}
+
+sub ap_transaction {
+ $lxdebug->enter_sub();
+
+ $auth->assert('general_ledger');
+
+
+ $form->{script} = 'ap.pl';
+ $script = "ap";
+ $locale = new Locale "$myconfig{countrycode}", "$script";
+
+ require "bin/mozilla/$form->{script}";
+ &add;
+
+ $lxdebug->leave_sub();
+}
+
sub storno {
$lxdebug->enter_sub();