]> wagnertech.de Git - mfinanz.git/blobdiff - SL/Locale.pm
Kommissionenrest in SL::DB::Part entfernt.
[mfinanz.git] / SL / Locale.pm
index 754d69cf21a738519491f3ac23c95707818c9bcf..881d5925e3df2b1db9d0c39d51840b82db2ba8b8 100644 (file)
@@ -213,7 +213,7 @@ sub text {
   my $self = shift;
   my $text = shift;
 
-  if (exists $self->{texts}->{$text}) {
+  if ($self->{texts}->{$text}) {
     $text = $self->{iconv}->convert($self->{texts}->{$text});
   } else {
     $text = $self->{iconv_english}->convert($text);
@@ -417,6 +417,8 @@ sub format_date {
   my $dd       = shift;
   my $yy_len   = shift || 4;
 
+  ($yy, $mm, $dd) = ($yy->year, $yy->month, $yy->day) if ref $yy eq 'DateTime';
+
   $main::lxdebug->leave_sub() and return "" unless $yy && $mm && $dd;
 
   $yy = $yy % 100 if 2 == $yy_len;