From: Bernd Blessmann Date: Fri, 13 May 2011 06:55:17 +0000 (+0200) Subject: Bug 1647 - Lieferanten-Einkaufspreise verlieren Nachkommastellen nicht mehr X-Git-Tag: release-2.6.3~25^2~35^2^2~2^2~2 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=9a7a811d2d254f95f3cf1664566ff4a5335eee31;p=kivitendo-erp.git Bug 1647 - Lieferanten-Einkaufspreise verlieren Nachkommastellen nicht mehr --- diff --git a/SL/IC.pm b/SL/IC.pm index b6007d9dc..cf7c99c36 100644 --- a/SL/IC.pm +++ b/SL/IC.pm @@ -502,7 +502,7 @@ sub save { if (($form->{"make_$i"}) || ($form->{"model_$i"})) { #hli $value = $form->parse_amount($myconfig, $form->{"lastcost_$i"}); - if ($value == $form->{"old_lastcost_$i"}) + if ($value == $form->parse_amount($myconfig, $form->{"old_lastcost_$i"})) { if ($form->{"lastupdate_$i"} eq "") { $lastupdate = 'now()'; @@ -1663,7 +1663,7 @@ sub prepare_parts_for_printing { } my $placeholders = join ', ', ('?') x scalar(@part_ids); - my $query = qq|SELECT mm.parts_id, mm.model, v.name AS make + my $query = qq|SELECT mm.parts_id, mm.model, mm.lastcost, v.name AS make FROM makemodel mm LEFT JOIN vendor v ON (mm.make = v.id) WHERE mm.parts_id IN ($placeholders)|; diff --git a/bin/mozilla/ic.pl b/bin/mozilla/ic.pl index e56178206..13e0a5ac2 100644 --- a/bin/mozilla/ic.pl +++ b/bin/mozilla/ic.pl @@ -1703,6 +1703,9 @@ sub update { # 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}; + # same for lastcosts + map { $form->{"lastcost_$_"} = $form->parse_amount(\%myconfig, $form->{"lastcost_$_"}) } 1 .. $form->{"makemodel_rows"}; + if ($form->{item} eq "assembly") { my $i = $form->{assembly_rows};