From f68c0971ff5a67508aa4b6a6bf3cc5932188f66d Mon Sep 17 00:00:00 2001 From: jan Date: Thu, 7 Jan 2010 10:35:37 +0100 Subject: [PATCH] =?utf8?q?Berichte=20->=20BWA=20->=20Freier=20Zeitraum.=20?= =?utf8?q?Die=20Eingabe=20von=20nur=20dem=20Start-=20oder=20Enddatum=20f?= =?utf8?q?=C3=BChrt=20zu=20einem=20Fehler,=20da=20die=20Pr=C3=BCfung=20in?= =?utf8?q?=20RP.pm=20auf=20Inhalt=20der=20Variablen=20immer=20wahr=20ist.?= =?utf8?q?=20Entsprechend=20vorher=20gepr=C3=BCft?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- bin/mozilla/rp.pl | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/bin/mozilla/rp.pl b/bin/mozilla/rp.pl index 5164b7f10..45bbb4d0b 100644 --- a/bin/mozilla/rp.pl +++ b/bin/mozilla/rp.pl @@ -2714,12 +2714,20 @@ sub generate_bwa { }; } } else { - my ($yy, $mm, $dd) = $locale->parse_date(\%myconfig, $form->{fromdate}); - $form->{fromdate} = "${dd}.${mm}.${yy}"; - ($yy, $mm, $dd) = $locale->parse_date(\%myconfig, $form->{todate}); - $form->{todate} = "${dd}.${mm}.${yy}"; - $form->{comparefromdate} = "01.01.$yy"; - $form->{comparetodate} = $form->{todate}; + # die konvertierungen nur dann durchführen, wenn auch daten gesetzt sind. + # ansonsten ist die prüfung in RP.pm + # if (defined ($form->{fromdate|todate}=='..')) + # immer wahr + if ($form->{fromdate}){ + my ($yy, $mm, $dd) = $locale->parse_date(\%myconfig, $form->{fromdate}); + $form->{fromdate} = "${dd}.${mm}.${yy}"; + $form->{comparefromdate} = "01.01.$yy"; + } + if ($form->{todate}){ + my ($yy, $mm, $dd) = $locale->parse_date(\%myconfig, $form->{todate}); + $form->{todate} = "${dd}.${mm}.${yy}"; + $form->{comparetodate} = $form->{todate}; + } } RP->bwa(\%myconfig, \%$form); -- 2.20.1