X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/kivitendo-erp.git/blobdiff_plain/caf76b382f66a10ed60855f8067dca1dbfd122b8..d38be021dde6dae352b0d755d9574dfe2de9898d:/bin/mozilla/am.pl
diff --git a/bin/mozilla/am.pl b/bin/mozilla/am.pl
index 02290c7b2..95bea4dcd 100644
--- a/bin/mozilla/am.pl
+++ b/bin/mozilla/am.pl
@@ -3137,3 +3137,120 @@ sub swap_units {
$lxdebug->leave_sub();
}
+
+sub add_tax {
+ $lxdebug->enter_sub();
+
+ $form->{title} = $locale->text('Add');
+
+ $form->{callback} =
+ "$form->{script}?action=add_tax&login=$form->{login}&password=$form->{password}"
+ unless $form->{callback};
+
+ _get_taxaccount_selection();
+
+ $form->header();
+
+ my $parameters_ref = {
+# ChartTypeIsAccount => $ChartTypeIsAccount,
+ };
+
+ # Ausgabe des Templates
+ print($form->parse_html_template('am/edit_tax', $parameters_ref));
+
+ $lxdebug->leave_sub();
+}
+
+sub edit_tax {
+ $lxdebug->enter_sub();
+
+ $form->{title} = $locale->text('Edit');
+
+ AM->get_tax(\%myconfig, \%$form);
+ _get_taxaccount_selection();
+
+ $form->header();
+
+ my $parameters_ref = {
+ };
+
+ # Ausgabe des Templates
+ print($form->parse_html_template('am/edit_tax', $parameters_ref));
+
+ $lxdebug->leave_sub();
+}
+
+sub list_tax {
+ $lxdebug->enter_sub();
+
+ AM->taxes(\%myconfig, \%$form);
+
+ $form->{callback} =
+ "$form->{script}?action=list_tax&login=$form->{login}&password=$form->{password}";
+
+ $form->{title} = $locale->text('Tax-O-Matic');
+
+ $form->header();
+
+ # Ausgabe des Templates
+ print($form->parse_html_template('am/list_tax', $parameters_ref));
+
+ $lxdebug->leave_sub();
+}
+
+sub _get_taxaccount_selection{
+ $lxdebug->enter_sub();
+
+ AM->get_tax_accounts(\%myconfig, \%$form);
+
+ my $i = 0;
+ foreach my $taxaccount (@{ $form->{ACCOUNTS} } ) {
+
+ # Fill in the Taxaxxounts as select options
+ if ($form->{chart_id} == $taxaccount->{id}) {
+ $form->{ACCOUNTS}[$i]{select_taxaccount} .=
+ qq|