From: Bernd Bleßmann Date: Wed, 14 Oct 2015 14:46:14 +0000 (+0200) Subject: Kosmetik X-Git-Tag: release-3.4.1~637 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=d0b6041775e664944a6228f2c99cb470dd69bb1f;p=kivitendo-erp.git Kosmetik --- diff --git a/SL/DB/Helper/FlattenToForm.pm b/SL/DB/Helper/FlattenToForm.pm index aea1a0d18..83f36cde3 100644 --- a/SL/DB/Helper/FlattenToForm.pm +++ b/SL/DB/Helper/FlattenToForm.pm @@ -94,10 +94,10 @@ sub _copy { @columns = grep { $src->can($_) } @columns; map { $form->{"${prefix}${_}${postfix}"} = ref($src->$_) eq 'DateTime' ? $src->$_->to_lxoffice : $src->$_ } @columns if !$format_amounts; - map { $form->{"${prefix}${_}${postfix}"} = $::form->format_amount(\%::myconfig, $src->$_ * 1, 2) } @columns if $format_amounts == 1; - map { $form->{"${prefix}${_}${postfix}"} = $src->$_ * 1 ? $::form->format_amount(\%::myconfig, $src->$_ * 1, 2) : 0 } @columns if $format_amounts == 2; + map { $form->{"${prefix}${_}${postfix}"} = $::form->format_amount(\%::myconfig, $src->$_ * 1, 2) } @columns if $format_amounts == 1; + map { $form->{"${prefix}${_}${postfix}"} = $src->$_ * 1 ? $::form->format_amount(\%::myconfig, $src->$_ * 1, 2) : 0 } @columns if $format_amounts == 2; map { $form->{"${prefix}${_}${postfix}"} = $src->$_ * 1 ? $::form->format_amount(\%::myconfig, $src->$_ * 100, 2) : 0 } @columns if $format_amounts == 3; - map { $form->{"${prefix}${_}${postfix}"} = $src->$_ * 1 ? $::form->format_amount(\%::myconfig, $src->$_ * 1, -2) : 0 } @columns if $format_amounts == 4; + map { $form->{"${prefix}${_}${postfix}"} = $src->$_ * 1 ? $::form->format_amount(\%::myconfig, $src->$_ * 1, -2) : 0 } @columns if $format_amounts == 4; return $src; }