From db6d0200ccdb696fe6977e26556b2163f3497be1 Mon Sep 17 00:00:00 2001
From: maqiao <625215135@qq.com>
Date: Sat, 31 Aug 2024 09:51:01 +0800
Subject: [PATCH] =?UTF-8?q?=E8=B4=A6=E5=86=8C=E4=B8=AD=E7=94=9F=E6=88=90?=
=?UTF-8?q?=E6=97=A5=E7=BB=93=E5=AD=98=E4=BF=AE=E6=94=B9=E5=8F=82=E6=95=B0?=
=?UTF-8?q?=E7=94=B1=E6=9F=A5=E8=AF=A2=E5=88=97=E8=A1=A8=E4=B8=AD=E7=9A=84?=
=?UTF-8?q?=E5=80=BC=E6=94=B9=E4=B8=BA=E5=8F=98=E9=87=8F?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
DM_Weight/App.config | 2 +-
DM_Weight/ViewModels/AccountWindowViewModel.cs | 5 +++--
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/DM_Weight/App.config b/DM_Weight/App.config
index 6104183..16114ac 100644
--- a/DM_Weight/App.config
+++ b/DM_Weight/App.config
@@ -28,7 +28,7 @@
-
+
diff --git a/DM_Weight/ViewModels/AccountWindowViewModel.cs b/DM_Weight/ViewModels/AccountWindowViewModel.cs
index 0fcd484..ab62790 100644
--- a/DM_Weight/ViewModels/AccountWindowViewModel.cs
+++ b/DM_Weight/ViewModels/AccountWindowViewModel.cs
@@ -304,8 +304,9 @@ namespace DM_Weight.ViewModels
//账册中没有记录则把库存中的所有数据都要生成一条账册记录
// 保存数据 出/入库记录
// 获取药品总库存
+ string drugId= channelStockList[i].DrugId;
int channelStockQuantity = SqlSugarHelper.Db.Queryable()
- .Where(cs => cs.DrugId.Equals(channelStockList[i].DrugId)).Sum(it => it.Quantity);
+ .Where(cs => cs.DrugId.Equals(drugId)).Sum(it => it.Quantity);
string InvoiceId = "Account_" + CurrentTimeMillis();
@@ -314,7 +315,7 @@ namespace DM_Weight.ViewModels
MachineId = channelStockList[i].MachineId,
DrawerNo = 0,//channelStockList[i].DrawerNo,
ColNo = 0,//channelStockList[i].ColNo,
- DrugId = channelStockList[i].DrugId,
+ DrugId = drugId,
ManuNo = "",// channelStockList[i].ManuNo,
EffDate = null,// !String.IsNullOrEmpty(channelStockList[i].EffDate) ? DateTime.ParseExact(channelStockList[i].EffDate, "yyyy-MM-dd", System.Globalization.CultureInfo.CurrentCulture) : null,
Operator = HomeWindowViewModel.Operator?.Id,