Commit ca76bb78 authored by liudong1993's avatar liudong1993

1

parent 31663ab6
...@@ -105,5 +105,10 @@ namespace Mall.Model.Entity.Property ...@@ -105,5 +105,10 @@ namespace Mall.Model.Entity.Property
get; get;
set; set;
} }
/// <summary>
/// 账面单价 用于展示 不做计算的
/// </summary>
public decimal ShowUnit_Price { get; set; }
} }
} }
\ No newline at end of file
...@@ -823,6 +823,7 @@ namespace Mall.Module.Property ...@@ -823,6 +823,7 @@ namespace Mall.Module.Property
var iModel = ilist.FirstOrDefault(); var iModel = ilist.FirstOrDefault();
iModel.Number += item.Number;//增加库存 iModel.Number += item.Number;//增加库存
iModel.Money += item.Money; iModel.Money += item.Money;
iModel.ShowUnit_Price = iModel.Number > 0 ? Math.Round((iModel.Money ?? 0) / (iModel.Number ?? 1), 2, MidpointRounding.AwayFromZero) : 0;
var iflag = supplies_InventoryRepository.Update(iModel, trans); var iflag = supplies_InventoryRepository.Update(iModel, trans);
if (iflag) if (iflag)
{ {
...@@ -859,7 +860,8 @@ namespace Mall.Module.Property ...@@ -859,7 +860,8 @@ namespace Mall.Module.Property
SuppliesId = item.SuppliesId, SuppliesId = item.SuppliesId,
UpdateBy = demodel.UpdateBy, UpdateBy = demodel.UpdateBy,
UpdateDate = demodel.UpdateDate, UpdateDate = demodel.UpdateDate,
WarehouseId = demodel.WarehouseId WarehouseId = demodel.WarehouseId,
ShowUnit_Price = item.Number > 0 ? Math.Round((item.Money ?? 0) / (item.Number ?? 1), 2, MidpointRounding.AwayFromZero) : 0
}, trans); }, trans);
if (iId > 0) if (iId > 0)
{ {
......
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