入库后报表的批次库存数(实物)与上一次出库后的批次库存数差别大,修改可能存在的问题
This commit is contained in:
parent
e1629fbdc7
commit
013e282189
|
|
@ -259,12 +259,11 @@ namespace DM_Weight.ViewModels
|
|||
}).UpdateColumns(it => new { it.Quantity, it.ManuNo, it.EffDate, it.PosNo }).ExecuteCommand();
|
||||
// 获取更新完库存后的药品库存
|
||||
List<ChannelStock> nowChannels = SqlSugarHelper.Db.Queryable<ChannelStock>()
|
||||
.Where(cs => cs.MachineId.Equals(it.MachineId)||cs.MachineId.Equals(ConfigurationManager.AppSettings["jj_machineId"]))
|
||||
.Where(cs => cs.MachineId.Equals(ConfigurationManager.AppSettings["machineId"]) ||cs.MachineId.Equals(ConfigurationManager.AppSettings["jj_machineId"]))
|
||||
.Where(cs => cs.DrugId.Equals(it.DrugId))
|
||||
.Where(cs=>cs.ManuNo.Equals(it.ManuNo))
|
||||
.Where(cs => cs.DrawerType == 1)
|
||||
.ToList();
|
||||
|
||||
// 保存数据 出/入库记录
|
||||
SqlSugarHelper.Db.Insertable(new MachineRecord()
|
||||
{
|
||||
|
|
@ -280,7 +279,8 @@ namespace DM_Weight.ViewModels
|
|||
Quantity = it.AddQuantity,
|
||||
Type = 1,
|
||||
InvoiceId = InvoiceId
|
||||
//,StockQuantity = nowChannels.Sum(it => it.Quantity)
|
||||
,
|
||||
ReturnQuantity1 = nowChannels.Sum(it => it.Quantity)
|
||||
}).ExecuteCommand();
|
||||
|
||||
//查询上一条账册中的空瓶数
|
||||
|
|
|
|||
Loading…
Reference in New Issue