From: Sven Schöling Date: Wed, 20 May 2009 13:27:32 +0000 (+0000) Subject: Pricegroup Informationen anständig im Template Formatieren und nicht *schauder* im... X-Git-Tag: release-2.6.0rc1~15 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=e851ae005e79c4d8046d59be4191e241439e312a;p=kivitendo-erp.git Pricegroup Informationen anständig im Template Formatieren und nicht *schauder* im Backend beim laden. Fix für Bug 996. --- diff --git a/SL/IC.pm b/SL/IC.pm index 0925a2b12..44b21ec62 100644 --- a/SL/IC.pm +++ b/SL/IC.pm @@ -127,8 +127,6 @@ sub get_part { while (($form->{"klass_$i"}, $form->{"pricegroup_id_$i"}, $form->{"price_$i"}, $form->{"pricegroup_$i"}) = $sth->fetchrow_array()) { - $form->{"price_$i"} = $form->round_amount($form->{"price_$i"}, 5); - $form->{"price_$i"} = $form->format_amount($myconfig, $form->{"price_$i"}, -2); push @pricegroups, $form->{"pricegroup_id_$i"}; $i++; } @@ -156,8 +154,6 @@ sub get_part { foreach $name (@pricegroups_not_used) { $form->{"klass_$i"} = "$name->{id}"; - $form->{"price_$i"} = $form->round_amount($form->{sellprice}, 5); - $form->{"price_$i"} = $form->format_amount($myconfig, $form->{"price_$i"}, -2); $form->{"pricegroup_id_$i"} = "$name->{id}"; $form->{"pricegroup_$i"} = "$name->{pricegroup}"; $i++; diff --git a/bin/mozilla/ic.pl b/bin/mozilla/ic.pl index e0d59d7d7..87c4f0177 100644 --- a/bin/mozilla/ic.pl +++ b/bin/mozilla/ic.pl @@ -1699,6 +1699,9 @@ sub assembly_row { sub update { $lxdebug->enter_sub(); + # parse pricegroups. and no, don't rely on check_form for this... + map { $form->{"price_$_"} = $form->parse_amount(\%myconfig, $form->{"price_$_"}) } 1 .. $form->{price_rows}; + if ($form->{item} eq "assembly") { my $i = $form->{assembly_rows}; diff --git a/templates/webpages/ic/price_row_de.html b/templates/webpages/ic/price_row_de.html index adea3e3e0..d4793087b 100644 --- a/templates/webpages/ic/price_row_de.html +++ b/templates/webpages/ic/price_row_de.html @@ -1,4 +1,5 @@ [%- USE HTML %] +[%- USE LxERP %] [%- IF PRICES.size %] @@ -10,8 +11,8 @@ [%- FOREACH row = PRICES %] [% HTML.escape(row.pricegroup) %] - - + + [%- END %] diff --git a/templates/webpages/ic/price_row_master.html b/templates/webpages/ic/price_row_master.html index 8fa33bd77..2aa61ee31 100644 --- a/templates/webpages/ic/price_row_master.html +++ b/templates/webpages/ic/price_row_master.html @@ -1,4 +1,5 @@ [%- USE HTML %] +[%- USE LxERP %] [%- IF PRICES.size %] @@ -10,8 +11,8 @@ [%- FOREACH row = PRICES %] [% HTML.escape(row.pricegroup) %] - - + + [%- END %]