Commit 67b894f5 authored by liudong1993's avatar liudong1993

1

parent b258eea0
......@@ -1929,9 +1929,12 @@ namespace Mall.WebApi.Controllers.MallBase
}
try
{
demodel.MinProfitRate = demodel.SpecificationPriceList.Where(x => x.SellingPrice > 0 && x.CostMoney > 0 && x.Commission > 0)?.Min(x => Math.Round(((x.SellingPrice ?? 0) - x.CostMoney - x.Commission) / (x.SellingPrice ?? 0), 2, MidpointRounding.AwayFromZero)) ?? 0;
var minlist = demodel.SpecificationPriceList.Where(x => x.SellingPrice > 0 && x.CostMoney > 0 && x.Commission > 0);
if (minlist.Any())
{
demodel.MinProfitRate = minlist.Min(x => Math.Round(((x.SellingPrice ?? 0) - x.CostMoney - x.Commission) / (x.SellingPrice ?? 0), 2, MidpointRounding.AwayFromZero));
}
}
catch
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment