X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=sidebyside;f=bin%2Fmozilla%2Fam.pl;h=e12c1ea51b9b18e77913b2018c81d586943dfae0;hb=eb07c9dd23c32937527813cd0dea27a8ffe5603e;hp=2dacb6f98245760af9c5100b25384bf59ca5f525;hpb=15f021a67aa7e26458a3fbac8efe89ef9c0b0657;p=kivitendo-erp.git
diff --git a/bin/mozilla/am.pl b/bin/mozilla/am.pl
index 2dacb6f98..e12c1ea51 100644
--- a/bin/mozilla/am.pl
+++ b/bin/mozilla/am.pl
@@ -42,7 +42,9 @@ use SL::User;
use SL::USTVA;
use SL::Iconv;
use SL::TODO;
-use SL::Printer;
+use SL::DB::Printer;
+use SL::DB::Tax;
+use SL::DB::Language;
use CGI;
require "bin/mozilla/common.pl";
@@ -144,7 +146,7 @@ sub account_header {
rate => '',
taxkey_id => '',
pos_ustva => '',
- startdate => '',
+ startdate => $form->{account_exists} ? '' : DateTime->new(year => 1970, month => 1, day => 1)->to_lxoffice,
};
push @{ $form->{ACCOUNT_TAXKEYS} }, $newtaxkey_ref;
@@ -336,7 +338,7 @@ sub account_header {
# account where AR_tax or AP_tax is set are not orphaned if they are used as
# tax-o-matic account
- if ( $form->{id} && !$form->{orphaned} && ($form->{link} =~ m/(AP_tax|AR_tax)/) ) {
+ if ( $form->{id} && $form->{orphaned} && ($form->{link} =~ m/(AP_tax|AR_tax)/) ) {
if (SL::DB::Manager::Tax->find_by(chart_id => $form->{id})) {
$form->{orphaned} = 0;
}
@@ -366,44 +368,18 @@ sub account_header {
}
sub form_footer {
- $main::lxdebug->enter_sub();
-
- my $form = $main::form;
- my $locale = $main::locale;
-
- $main::auth->assert('config');
-
- print qq|
-
-
-
-
|;
- if ((!$form->{id}) || ($form->{id} && $form->{orphaned}) || (($form->{type} eq "account") && (!$form->{new_chart_valid}))) {
- print qq|
-
-|;
-}
-
- if ($form->{id} && $form->{orphaned}) {
- print qq||;
- }
-
- if ($form->{id} && $form->{type} eq "account") {
- print qq|
- |;
- }
-
- print qq|
-
-
-