X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FIR.pm;h=e5e02f5bed4ce480dd0adc25d67e1f353cc296b1;hb=e9e0b17078690e4fae6210e9225c48c6d2991a36;hp=b3c99b829514a7a413caded520a2b62cca8eb206;hpb=b53c93926a26aeca51e097d2599841e33a1da6a3;p=kivitendo-erp.git diff --git a/SL/IR.pm b/SL/IR.pm index b3c99b829..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($fxsellprice / $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