From c2ed42c3f435937925ef825de61f2520196d1de6 Mon Sep 17 00:00:00 2001 From: Udo Spallek Date: Sat, 21 Jan 2006 14:54:35 +0000 Subject: [PATCH] Fixed date problems between database and screen-output, reported by Holger on the devel-ML. --- bin/mozilla/ustva.pl | 122 ++++++++++++++++++++++--------------------- 1 file changed, 62 insertions(+), 60 deletions(-) diff --git a/bin/mozilla/ustva.pl b/bin/mozilla/ustva.pl index 6fa1ed75e..2151c4ab1 100644 --- a/bin/mozilla/ustva.pl +++ b/bin/mozilla/ustva.pl @@ -29,7 +29,7 @@ require "$form->{path}/arap.pl"; #use strict; #no strict 'refs'; #use diagnostics; -#use warnings FATAL=> 'all'; +#use warnings; # FATAL=> 'all'; #use vars qw($locale $form %myconfig); #our ($myconfig); #use CGI::Carp "fatalsToBrowser"; @@ -76,13 +76,7 @@ sub report { $form->{title} = $locale->text('UStVA'); $form->{kz10} = ''; #Berichtigte Anmeldung? Ja =1 - # $accrual = ($eur) ? "" : "checked"; - # $cash = ($eur) ? "checked" : ""; - my $year = ''; - my $null = ''; - ($null, $null, $null, $null, $null, $year, $null, $null, $null) = - localtime(); - $year += 1900; + my $year = substr($form->datetonum($form->current_date(\%myconfig), \%myconfig),0,4); my $department = ''; local $hide = ''; @@ -233,7 +227,7 @@ sub report { # accounting years if SQL-Ledger Version < 2.4.1 # $year = $form->{year} * 1; - @years = sort { $b <=> $a } (2000 .. ($year+1)); + @years = sort { $b <=> $a } (2003 .. ($year+1)); $form->{all_years} = \@years; } map { $form->{selectaccountingyear} .= qq|