]> wagnertech.de Git - mfinanz.git/blobdiff - SL/CVar.pm
typ customer korrekt ans template system übergeben
[mfinanz.git] / SL / CVar.pm
index 2408222782c2ab8a13b0e573a2336415ccf1723e..bd58cbd7eff9b5dda1fbd26822420053f3565cc2 100644 (file)
@@ -716,6 +716,16 @@ sub parse {
   return $value;
 }
 
+sub format_to_template {
+  my ($self, $value, $config) = @_;
+  # stupid template expects everything formated. except objects
+  # do not use outside of print routines for legacy templates
+
+  return $::form->parse_amount(\%::myconfig, $value) if $config->{type} eq 'number';
+  return $value->to_lxoffice if $config->{type} eq 'date' && blessed $value && $value->can('to_lxoffice');
+  return $value;
+}
+
 1;
 
 __END__