Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Jan 15, 2021 11:28:23 GMT
Hello,
The dbo.fn_TradeProperty function with the 'lay_avg_price' property is showing the wrong value. I've had a look at the database and was able to fix the problem by changing BidType='B' to BidType='L' on the third line of the following code:
if @prop='lay_avg_price'
begin
select @r=(select sum(isnull(size,0)*isnull(price,0)) from [tbl_bets] where id_trade=@id_trade and BidType='B' and Deleted=0)
select @r2=(select sum(isnull(size,0)) from [tbl_bets] where id_trade=@id_trade and BidType='L' and Deleted=0)
if @r2=0
begin
set @res=0
end
else
begin
set @res=isnull(@r,0)/@r2
end
end
Fraser.
|
|
|
Post by Ipposnif on Jan 17, 2021 10:42:06 GMT
Hi, I can confirm the bug and it will be fixed in the next release. Well done Fraser!
|
|