X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=sidebyside;f=bin%2Fmozilla%2Fam.pl;h=62c645a6f260961cd3a0398cba4f8604800f098c;hb=fc2f81b98f7a7308d71202c47d98611df6be1a7e;hp=c6586af5bd47e031afcce7a550a56be1e95dd214;hpb=6a8787147ad643549eb26cb4f9a373b5b354b8b9;p=kivitendo-erp.git
diff --git a/bin/mozilla/am.pl b/bin/mozilla/am.pl
index c6586af5b..62c645a6f 100644
--- a/bin/mozilla/am.pl
+++ b/bin/mozilla/am.pl
@@ -34,6 +34,7 @@
use utf8;
use SL::Auth;
+use SL::Auth::PasswordPolicy;
use SL::AM;
use SL::CA;
use SL::Form;
@@ -41,12 +42,11 @@ use SL::User;
use SL::USTVA;
use SL::Iconv;
use SL::TODO;
-use SL::Printer;
-use CGI::Ajax;
+use SL::DB::Printer;
+use SL::DB::Tax;
+use SL::DB::Language;
use CGI;
-use Data::Dumper;
-
require "bin/mozilla/common.pl";
use strict;
@@ -146,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;
@@ -256,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 = (
@@ -330,34 +344,35 @@ sub account_header {
}
# preselection chart type
- my $select_charttype = q{};
-
- my %charttype = (
- 'A' => $locale->text('Account'),
- 'H' => $locale->text('Heading'),
- );
+ my @all_charttypes = ({'name' => $locale->text('Account'), 'value' => 'A'},
+ {'name' => $locale->text('Heading'), 'value' => 'H'},
+ );
+ my $selected_charttype = $form->{charttype};
- foreach my $item ( sort({ $a <=> $b } keys %charttype) ) {
- if ($item eq $form->{charttype}) {
- $select_charttype .= qq|