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} });
. $locale->text('Amount') . qq|</th>
<th class=listheading style="width:10%">|
. $locale->text('Tax') . qq|</th>
- <th class=listheading style="width:5%">|
- . $locale->text('Korrektur') . qq|</th>
<th class=listheading style="width:10%">|
. $locale->text('Taxkey') . qq|</th>
<th class=listheading style="width:10%">|
'-default' => $selected_taxchart))
. qq|</td>|;
- my $korrektur = $form->{"korrektur_$i"} ? 'checked' : '';
-
my $projectnumber =
NTI($cgi->popup_menu('-name' => "project_id_$i",
'-values' => \@project_values,
<tr>
<td>$selectAP_amount</td>
<td><input name="amount_$i" size=10 value=$form->{"amount_$i"}></td>
- <td><input name="tax_$i" size=10 value=$form->{"tax_$i"}></td>
- <td><input type="checkbox" name="korrektur_$i" value="1" "$korrektur"></td>
+ <td><input type="hidden" name="tax_$i" value="$form->{"tax_$i"}">$form->{"tax_$i"}</td>
$tax
<td>$projectnumber</td>
</tr>
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);
$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();