X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FIR.pm;h=e5e02f5bed4ce480dd0adc25d67e1f353cc296b1;hb=67e30bc6ea4cd05775f927f89946f8368b69e712;hp=84ce10a17cad00641faf270583387f9670b1f15d;hpb=0f0cb3b708f9078b774a07cecd996e5bdc5fac63;p=kivitendo-erp.git diff --git a/SL/IR.pm b/SL/IR.pm index 84ce10a17..e5e02f5be 100644 --- a/SL/IR.pm +++ b/SL/IR.pm @@ -210,7 +210,7 @@ sub post_invoice { # update parts table by setting lastcost to current price, don't allow negative values by using abs $query = qq|UPDATE parts SET lastcost = ? WHERE id = ?|; - @values = (abs($form->{"sellprice_$i"} / $basefactor), conv_i($form->{"id_$i"})); + @values = (abs($fxsellprice * $form->{exchangerate} / $basefactor), conv_i($form->{"id_$i"})); do_query($form, $dbh, $query, @values); # check if we sold the item already and