X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fam.pl;h=20005138ea3f6d885fc3f7e98d1da4f0a8150cc1;hb=365c3820f4fe86e30b2b582e780d258299f1396c;hp=d112196606e1dc3db8bb3432a525d5aa8924209b;hpb=e16e1f36dec1679b1defb5efc5acd7290cc9de85;p=kivitendo-erp.git
diff --git a/bin/mozilla/am.pl b/bin/mozilla/am.pl
index d11219660..20005138e 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;
@@ -254,6 +256,20 @@ sub account_header {
}
+ my $select_er = q|\n|;
+ my %er = (
+ 1 => "Ertrag",
+ 6 => "Aufwand");
+ foreach my $item (sort({ $a <=> $b } keys(%er))) {
+ my $text = H($::locale->{iconv_utf8}->convert($er{$item}));
+ if ($item == $form->{pos_er}) {
+ $select_er .= qq|\n|;
+ } else {
+ $select_er .= qq|\n|;
+ }
+
+ }
+
my $select_bwa = q|\n|;
my %bwapos = (
@@ -336,7 +352,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;
}
@@ -356,6 +372,7 @@ sub account_header {
select_bwa => $select_bwa,
select_bilanz => $select_bilanz,
select_eur => $select_eur,
+ select_er => $select_er,
};
# Ausgabe des Templates
@@ -366,44 +383,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|
-
+ $::lxdebug->enter_sub;
+ $::auth->assert('config');
-