修复bug

This commit is contained in:
18942506660
2024-08-08 14:19:33 +08:00
parent 6239a1e54e
commit 7b7018d1bf
6 changed files with 64 additions and 22 deletions

View File

@@ -183,6 +183,12 @@ namespace WMS.Web.Domain.Entitys
//改变状态
public void ChangeInstockStatus()
{
//明细都作废后 整个单据作废
if (this.Details.Count() == this.Details.Where(w => w.IsRepeal == true).Count())
{
this.Status = InstockStatus.Repeal;
return;
}
//明细中:所有的应入数量之和
var totalAccruedQty = this.Details.Where(x => x.IsRepeal != true).Sum(x => x.AccruedQty);