IsValidBidPrice fix
This commit is contained in:
parent
2f2049230b
commit
d0c6e71b0c
|
|
@ -245,7 +245,7 @@ namespace Nop.Plugin.Misc.AuctionPlugin.Hubs
|
|||
var product = await auctionService.GetProductById(bidRequestMessage.ProductId);
|
||||
if (product == null) return;
|
||||
|
||||
if (IsValidBidPrice(product.Price, activeProductAuction.CurrentPrice, bidRequestMessage.BidPrice, customer)) return;
|
||||
if (!IsValidBidPrice(product.Price, activeProductAuction.CurrentPrice, bidRequestMessage.BidPrice, customer)) return;
|
||||
|
||||
var auctionBid = bidRequestMessage.CreateMainEntity();
|
||||
auctionBid.ProductAuctionMappingId = activeProductAuction.Id;
|
||||
|
|
@ -318,10 +318,10 @@ namespace Nop.Plugin.Misc.AuctionPlugin.Hubs
|
|||
if (productPrice >= bidRequestPrice || productToAuctionCurrentPrice >= bidRequestPrice || bidRequestPrice != GetNextBidPrice(productToAuctionCurrentPrice))
|
||||
{
|
||||
logger.Warning($"SignalRMessageHandler.IsValidBidPrice(); (productPrice >= bidRequestPrice || productToAuctionCurrentPrice >= bidRequestPrice || bidRequestPrice != GetNextBidPrice(productToAuctionCurrentPrice)); productPrice: {productPrice}; productToAuctionCurrentPrice: {productToAuctionCurrentPrice}; bidRequestPrice: {bidRequestPrice}", null, customer);
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
private static decimal GetStepAmount(decimal currentBidPrice) => AuctionService.GetStepAmount(currentBidPrice);
|
||||
|
|
|
|||
Loading…
Reference in New Issue